@sutton-signwriting/sgnw-components
Version:
a javascript package of web components for use with the SignWriting script.
44 lines (39 loc) • 1.27 kB
JavaScript
/*!
* The Sutton SignWriting Web Components
*/
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
import { o as overlap } from './global.js';
const fswSignboxCss = ".sc-fsw-signbox-h{width:100%;height:100%;border-radius:10px;display:block}";
const FswSignbox$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 fswSignboxCss; }
}, [6, "fsw-signbox", undefined, [[8, "paletteSymbolDrop", "paletteSymbolDropHandler"]]]);
function defineCustomElement$1() {
if (typeof customElements === "undefined") {
return;
}
const components = ["fsw-signbox"];
components.forEach(tagName => { switch (tagName) {
case "fsw-signbox":
if (!customElements.get(tagName)) {
customElements.define(tagName, FswSignbox$1);
}
break;
} });
}
const FswSignbox = FswSignbox$1;
const defineCustomElement = defineCustomElement$1;
export { FswSignbox, defineCustomElement };