UNPKG

@sutton-signwriting/sgnw-components

Version:

a javascript package of web components for use with the SignWriting script.

44 lines (39 loc) 1.29 kB
/*! * The Sutton SignWriting Web Components */ import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client'; import { o as overlap } from './global.js'; const sgnwSignboxCss = ".sc-sgnw-signbox-h{width:100%;height:100%;border-radius:10px;display:block}"; const SgnwSignbox$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement { constructor() { super(); this.__registerHost(); } paletteSymbolDropHandler(event) { const target = event.target; if (overlap(target, this.el)) { console.log(event.detail); } } render() { return (h(Host, null, h("slot", null))); } get el() { return this; } static get style() { return sgnwSignboxCss; } }, [6, "sgnw-signbox", undefined, [[8, "paletteSymbolDrop", "paletteSymbolDropHandler"]]]); function defineCustomElement$1() { if (typeof customElements === "undefined") { return; } const components = ["sgnw-signbox"]; components.forEach(tagName => { switch (tagName) { case "sgnw-signbox": if (!customElements.get(tagName)) { customElements.define(tagName, SgnwSignbox$1); } break; } }); } const SgnwSignbox = SgnwSignbox$1; const defineCustomElement = defineCustomElement$1; export { SgnwSignbox, defineCustomElement };