UNPKG

@salla.sa/twilight-components

Version:
51 lines (47 loc) 1.57 kB
/*! * Crafted with ❤ by Salla */ import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client'; const SallaHook$1 = /*@__PURE__*/ proxyCustomElement(class SallaHook extends HTMLElement { constructor() { super(); this.__registerHost(); this.__attachShadow(); } /** * Mounts a given HTML element into the hook position. * @param element The element to inject. */ async mount(element) { this.host.before(element); } render() { return h(Host, { key: 'a887790b6c3fa466e88b0b1c90fda502f3aca812' }); } async componentDidLoad() { // Register this component for hooks system, already on it logic to run componentDidLoad trigger await Salla.hooks.registerComponent('salla-hook', this); } get host() { return this; } static get style() { return ":host {\n all: unset;\n display: none; /* marker only */\n }"; } }, [1, "salla-hook", { "name": [1], "mount": [64] }]); function defineCustomElement$1() { if (typeof customElements === "undefined") { return; } const components = ["salla-hook"]; components.forEach(tagName => { switch (tagName) { case "salla-hook": if (!customElements.get(tagName)) { customElements.define(tagName, SallaHook$1); } break; } }); } defineCustomElement$1(); const SallaHook = SallaHook$1; const defineCustomElement = defineCustomElement$1; export { SallaHook, defineCustomElement };