@lmvz-ds/components 0.12.4 → 0.12.5-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/app-globals-V2Kpy_OQ.js.map +1 -0
- package/dist/cjs/assets-Cswkqk_c.js +18971 -0
- package/dist/cjs/assets-Cswkqk_c.js.map +1 -0
- package/dist/cjs/axe-C2rxi-K2.js +32837 -0
- package/dist/cjs/axe-C2rxi-K2.js.map +1 -0
- package/dist/cjs/header-integration.lmvz-button.lmvz-header.lmvz-icon.lmvz-input.lmvz-menuitem-BTL_B6qg.js +3665 -0
- package/dist/cjs/header-integration.lmvz-button.lmvz-header.lmvz-icon.lmvz-input.lmvz-menuitem-BTL_B6qg.js.map +1 -0
- package/dist/cjs/header-integration_6.cjs.entry.js +18 -0
- package/dist/cjs/header-integration_6.cjs.entry.js.map +1 -0
- package/dist/cjs/icons-jn_Uak9B.js +1063 -0
- package/dist/cjs/icons-jn_Uak9B.js.map +1 -0
- package/dist/cjs/index-DpBPf1cE.js +2112 -0
- package/dist/cjs/index-DpBPf1cE.js.map +1 -0
- package/dist/cjs/index.cjs.js.map +1 -0
- package/dist/cjs/lmvz-action.cjs.entry.js.map +1 -0
- package/dist/cjs/lmvz-card.cjs.entry.js.map +1 -0
- package/dist/cjs/lmvz-chip.cjs.entry.js.map +1 -0
- package/dist/cjs/lmvz-components.cjs.js.map +1 -0
- package/dist/cjs/loader.cjs.js.map +1 -0
- package/dist/collection/api/ds.constants.js.map +1 -0
- package/dist/collection/api/index.js.map +1 -0
- package/dist/collection/components/lmvz-action/lmvz-action.js.map +1 -0
- package/dist/collection/components/lmvz-button/lmvz-button.js.map +1 -0
- package/dist/collection/components/lmvz-card/lmvz-card.js.map +1 -0
- package/dist/collection/components/lmvz-chip/lmvz-chip.js.map +1 -0
- package/dist/collection/components/lmvz-header/lmvz-header.js.map +1 -0
- package/dist/collection/components/lmvz-icon/icons.js.map +1 -0
- package/dist/collection/components/lmvz-icon/lmvz-icon.js.map +1 -0
- package/dist/collection/components/lmvz-icon/public.js.map +1 -0
- package/dist/collection/components/lmvz-icon/test/icons.unit.js.map +1 -0
- package/dist/collection/components/lmvz-input/lmvz-input.js.map +1 -0
- package/dist/collection/components/lmvz-menuitem/lmvz-menuitem.js.map +1 -0
- package/dist/collection/index.js.map +1 -0
- package/dist/collection/integration/header-integration.js +22 -4
- package/dist/collection/integration/header-integration.js.map +1 -0
- package/dist/collection/utils/assets.js.map +1 -0
- package/dist/collection/utils/component.js.map +1 -0
- package/dist/collection/utils/effect.js.map +1 -0
- package/dist/collection/utils/element-activation-controller.js.map +1 -0
- package/dist/collection/utils/environment.js.map +1 -0
- package/dist/collection/utils/http.js.map +1 -0
- package/dist/collection/utils/http.test.js.map +1 -0
- package/dist/collection/utils/list-keyboard-controller.js.map +1 -0
- package/dist/collection/utils/public.js.map +1 -0
- package/dist/collection/utils/reactive-controller-host.js.map +1 -0
- package/dist/collection/utils/typing.js.map +1 -0
- package/dist/collection/utils/validation/aria-validation-controller.js.map +1 -0
- package/dist/collection/utils/validation/svg.js.map +1 -0
- package/dist/components/header-integration.d.ts +11 -0
- package/dist/components/header-integration.js +2 -0
- package/dist/components/header-integration.js.map +1 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/lmvz-action.js.map +1 -0
- package/dist/components/lmvz-button.js.map +1 -0
- package/dist/components/lmvz-card.js.map +1 -0
- package/dist/components/lmvz-chip.js.map +1 -0
- package/dist/components/lmvz-header.js.map +1 -0
- package/dist/components/lmvz-icon.js.map +1 -0
- package/dist/components/lmvz-input.js.map +1 -0
- package/dist/components/lmvz-menuitem.js.map +1 -0
- package/dist/components/p-B3JVFwO1.js.map +1 -0
- package/dist/components/p-B85MJLTf.js.map +1 -0
- package/dist/components/p-CN0JX9-m.js.map +1 -0
- package/dist/components/p-Cd4nH2vx.js +2 -0
- package/dist/components/p-Cd4nH2vx.js.map +1 -0
- package/dist/components/p-CdofjRtQ.js.map +1 -0
- package/dist/components/p-CkTUjPwD.js +2 -0
- package/dist/components/p-CkTUjPwD.js.map +1 -0
- package/dist/components/p-CpI4KFOu.js +2 -0
- package/dist/components/p-CpI4KFOu.js.map +1 -0
- package/dist/components/p-D1HbKFuh.js.map +1 -0
- package/dist/components/p-D7xthqTT.js +2 -0
- package/dist/components/p-D7xthqTT.js.map +1 -0
- package/dist/components/p-DBeynNeU.js +2 -0
- package/dist/components/p-DBeynNeU.js.map +1 -0
- package/dist/components/p-DMLRPGid.js.map +1 -0
- package/dist/components/p-UiqQVZhU.js +2 -0
- package/dist/components/p-UiqQVZhU.js.map +1 -0
- package/dist/components/p-Xq267cFM.js +2 -0
- package/dist/components/p-Xq267cFM.js.map +1 -0
- package/dist/components/p-glDDybgu.js +2 -0
- package/dist/components/p-glDDybgu.js.map +1 -0
- package/dist/esm/app-globals-DQuL1Twl.js.map +1 -0
- package/dist/esm/assets-K2FHD9qn.js +18770 -0
- package/dist/esm/assets-K2FHD9qn.js.map +1 -0
- package/dist/esm/axe-CZ0Rtkog.js +32835 -0
- package/dist/esm/axe-CZ0Rtkog.js.map +1 -0
- package/dist/esm/header-integration.lmvz-button.lmvz-header.lmvz-icon.lmvz-input.lmvz-menuitem-CW3FGLZC.js +3657 -0
- package/dist/esm/header-integration.lmvz-button.lmvz-header.lmvz-icon.lmvz-input.lmvz-menuitem-CW3FGLZC.js.map +1 -0
- package/dist/esm/header-integration_6.entry.js +7 -0
- package/dist/esm/header-integration_6.entry.js.map +1 -0
- package/dist/esm/icons-BITzEzmq.js +1032 -0
- package/dist/esm/icons-BITzEzmq.js.map +1 -0
- package/dist/esm/index-D2eyw7iv.js +2101 -0
- package/dist/esm/index-D2eyw7iv.js.map +1 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/lmvz-action.entry.js.map +1 -0
- package/dist/esm/lmvz-card.entry.js.map +1 -0
- package/dist/esm/lmvz-chip.entry.js.map +1 -0
- package/dist/esm/lmvz-components.js.map +1 -0
- package/dist/esm/loader.js.map +1 -0
- package/dist/lmvz-components/index.esm.js.map +1 -0
- package/dist/lmvz-components/lmvz-components.esm.js.map +1 -0
- package/dist/lmvz-components/p-366a01f8.entry.js +2 -0
- package/dist/lmvz-components/p-366a01f8.entry.js.map +1 -0
- package/dist/lmvz-components/p-84ee7919.entry.js +2 -0
- package/dist/lmvz-components/p-84ee7919.entry.js.map +1 -0
- package/dist/lmvz-components/p-BLwPC3DQ.js +2 -0
- package/dist/lmvz-components/p-BLwPC3DQ.js.map +1 -0
- package/dist/lmvz-components/p-D2eyw7iv.js +3 -0
- package/dist/lmvz-components/p-D2eyw7iv.js.map +1 -0
- package/dist/lmvz-components/p-DANVVVBd.js +7 -0
- package/dist/lmvz-components/p-DANVVVBd.js.map +1 -0
- package/dist/lmvz-components/p-DQuL1Twl.js.map +1 -0
- package/dist/lmvz-components/p-DlDurXvX.js +2 -0
- package/dist/lmvz-components/p-DlDurXvX.js.map +1 -0
- package/dist/lmvz-components/p-Hc4uxoTU.js +13 -0
- package/dist/lmvz-components/p-Hc4uxoTU.js.map +1 -0
- package/dist/lmvz-components/p-a4200b26.entry.js +2 -0
- package/dist/lmvz-components/p-a4200b26.entry.js.map +1 -0
- package/dist/lmvz-components/p-d3243bae.entry.js +2 -0
- package/dist/lmvz-components/p-d3243bae.entry.js.map +1 -0
- package/dist/manifest.json +26 -2
- package/package.json +10 -9
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["lmvzCardCss","LmvzCard","__stencil_proxyCustomElement","HTMLElement","cardTitle","imageUrl","description","primaryActionLabel","primaryAction","fallbackImage","runSync","syncCreateAssetUrlSafely","_onPrimaryClick","this","emit","_onOverflowClick","event","console","log","render","imgStyle","backgroundImage","h","Host","key","role","class","style","name","onClick","bind"],"sources":["src/components/lmvz-card/lmvz-card.css?tag=lmvz-card&encapsulation=scoped","src/components/lmvz-card/lmvz-card.tsx"],"sourcesContent":["@import url('../../styles/internal/define-layers.css');\n\n@import url('../../styles/fragments/_routerFont.css') layer(lmvz-ds.theme);\n@import url('../../styles/fragments/_reset.css') layer(lmvz-ds.reset);\n\n:host {\n /** component dependencies */\n /* * the (invalid nested) import will be handled by postcss */\n /* stylelint-disable no-invalid-position-at-import-rule */\n @import url('../../styles/fragments/_buttons.css');\n\n display: flex;\n min-width: var(--lmvz-other-component-card-minwidth);\n max-width: var(--lmvz-other-component-card-maxwidth);\n flex-direction: column;\n align-items: flex-start;\n\n border-radius: var(--lmvz-semantic-border-radius-lg);\n border: var(--lmvz-semantic-border-width-default) solid var(--lmvz-semantic-color-border-default);\n background: var(--lmvz-semantic-color-surface-primary);\n}\n\n* {\n color: var(--lmvz-semantic-color-on-surface-primary);\n font: var(--lmvz-typography-body-md);\n}\n\n.top {\n display: flex;\n padding: var(--lmvz-dimension-8-12);\n flex-direction: column;\n justify-content: center;\n align-items: center;\n align-self: stretch;\n}\n\n.bottom {\n display: flex;\n min-width: 150px;\n padding: var(--lmvz-dimension-4-6) var(--lmvz-dimension-10-14) var(--lmvz-dimension-10-14) var(--lmvz-dimension-10-14);\n flex-direction: column;\n align-items: flex-start;\n align-self: stretch;\n}\n\n.title {\n margin: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n align-self: stretch;\n\n padding-bottom: var(--lmvz-global-s4);\n overflow-wrap: break-word;\n font: var(--lmvz-typography-heading-2xl);\n}\n\n.description {\n display: flex;\n margin: 0;\n padding-bottom: var(--lmvz-component-body-sm-padding-bottom);\n align-items: flex-start;\n align-self: stretch;\n white-space: pre-line;\n font: var(--lmvz-typography-body-md);\n}\n\n.image-wrapper {\n aspect-ratio: 4 / 3;\n width: 100%;\n background-size: cover;\n background-position: center;\n flex: 1 0 0;\n align-self: stretch;\n border-radius: var(--lmvz-semantic-border-radius-md);\n}\n\n.actions {\n margin-top: var(--lmvz-component-form-wrapper-gap-y);\n display: flex;\n align-items: center;\n gap: var(--lmvz-component-input-md-gap-x);\n align-self: stretch;\n}\n\nbutton.primary,\nlmvz-button.primary {\n display: flex;\n justify-content: center;\n align-items: center;\n gap: var(--lmvz-component-input-md-gap-x);\n flex: 1 0 0;\n}\n\n/* .overflow-button {\n anchor-name: --overflow-button;\n} */\n\n/* menu {\n position: fixed;\n position-anchor: --overflow-button;\n\n inset-block-start: anchor(end);\n inset-inline-end: anchor(self-end);\n margin: 5px 0 0 5px;\n} */\n","import { Component, Event, EventEmitter, h, Host, Prop } from '@stencil/core';\n\nimport { runSync } from 'effect/Effect';\nimport { syncCreateAssetUrlSafely } from '../../utils/assets';\n\n@Component({\n tag: 'lmvz-card',\n styleUrl: 'lmvz-card.css',\n scoped: true,\n assetsDirs: ['../../assets'],\n})\nexport class LmvzCard {\n /** Card title (required) */\n @Prop() cardTitle!: string;\n\n /** Optional image URL; placeholder used if omitted */\n @Prop() imageUrl?: string;\n\n /** Optional description */\n @Prop() description?: string;\n\n /** Primary action button label */\n @Prop() primaryActionLabel: string = '';\n\n /** Event emitted when primary button is clicked */\n @Event() primaryAction!: EventEmitter<PointerEvent>;\n\n private get fallbackImage() {\n return runSync(syncCreateAssetUrlSafely('card-placeholder.svg'));\n }\n\n private _onPrimaryClick() {\n this.primaryAction.emit();\n }\n\n private _onOverflowClick(event: PointerEvent) {\n // TODO: show menu\n console.log(event);\n }\n\n render() {\n const imgStyle = {\n backgroundImage: `url(${this.imageUrl ?? this.fallbackImage})`,\n };\n return (\n <Host role=\"article\">\n <div class=\"top\">\n <div class=\"image-wrapper\" style={imgStyle}>\n <div class=\"chip-slot\">\n <slot name=\"chip\"></slot>\n </div>\n </div>\n </div>\n <div class=\"bottom\">\n <header>\n <h2 class=\"title\">{this.cardTitle}</h2>\n </header>\n <p class=\"description\">{this.description}</p>\n {/* TODO: hide unless actions are available https://stackoverflow.com/questions/53796599/how-to-determine-number-of-children-in-a-slot */}\n <div class=\"actions\">\n <button class=\"primary\" onClick={this._onPrimaryClick.bind(this)} data-testid=\"primary\">\n {this.primaryActionLabel}\n </button>\n {/* popoverTarget=\"mypopover\" */}\n <button class=\"tertiary\" aria-label=\"More actions\" onClick={this._onOverflowClick}>\n <span class=\"icon-placeholder\">...</span>\n </button>\n {/* <menu id=\"mypopover\" popover=\"manual\">\n <li>TEST</li>\n </menu> */}\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"+IAAA,MAAMA,EAAc,IAAM,6mP,MCWbC,EAAQC,EAAA,MAAAD,UAAAE,E,sGAEXC,UAGAC,SAGAC,YAGAC,mBAA6B,GAG5BC,cAET,iBAAYC,GACV,OAAOC,EAAQC,EAAyB,wB,CAGlC,eAAAC,GACNC,KAAKL,cAAcM,M,CAGb,gBAAAC,CAAiBC,GAEvBC,QAAQC,IAAIF,E,CAGd,MAAAG,GACE,MAAMC,EAAW,CACfC,gBAAiB,OAAOR,KAAKR,UAAYQ,KAAKJ,kBAEhD,OACEa,EAACC,EAAI,CAAAC,IAAA,2CAACC,KAAK,WACTH,EAAA,OAAAE,IAAA,2CAAKE,MAAM,OACTJ,EAAA,OAAAE,IAAA,2CAAKE,MAAM,gBAAgBC,MAAOP,GAChCE,EAAA,OAAAE,IAAA,2CAAKE,MAAM,aACTJ,EAAA,QAAAE,IAAA,2CAAMI,KAAK,YAIjBN,EAAA,OAAAE,IAAA,2CAAKE,MAAM,UACTJ,EAAA,UAAAE,IAAA,4CACEF,EAAA,MAAAE,IAAA,2CAAIE,MAAM,SAASb,KAAKT,YAE1BkB,EAAA,KAAAE,IAAA,2CAAGE,MAAM,eAAeb,KAAKP,aAE7BgB,EAAA,OAAAE,IAAA,2CAAKE,MAAM,WACTJ,EAAA,UAAAE,IAAA,2CAAQE,MAAM,UAAUG,QAAShB,KAAKD,gBAAgBkB,KAAKjB,MAAK,cAAc,WAC3EA,KAAKN,oBAGRe,EAAA,UAAAE,IAAA,2CAAQE,MAAM,WAAU,aAAY,eAAeG,QAAShB,KAAKE,kBAC/DO,EAAA,QAAAE,IAAA,2CAAME,MAAM,oBAAkB,U","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["lmvzChipCss","LmvzChip","__stencil_proxyCustomElement","HTMLElement","text","render","h","Host","key","this"],"sources":["src/components/lmvz-chip/lmvz-chip.css?tag=lmvz-chip&encapsulation=shadow","src/components/lmvz-chip/lmvz-chip.tsx"],"sourcesContent":[":host {\n display: block;\n}\n","import { Component, Host, Prop, h } from '@stencil/core';\n\n@Component({\n tag: 'lmvz-chip',\n styleUrl: 'lmvz-chip.css',\n shadow: true,\n})\nexport class LmvzChip {\n @Prop() text: string;\n\n render() {\n return <Host>{this.text}</Host>;\n }\n}\n"],"mappings":"2DAAA,MAAMA,EAAc,IAAM,uB,MCObC,EAAQC,EAAA,MAAAD,UAAAE,E,iFACXC,KAER,MAAAC,GACE,OAAOC,EAACC,EAAI,CAAAC,IAAA,4CAAEC,KAAKL,K","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":[],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":[],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":[],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":[],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["componentOnReady","el","callback","then","resolvedEl","raf","inheritAttributes","attributes","attributeObject","forEach","attr","hasAttribute","value","getAttribute","removeAttribute","ariaAttributes","inheritAriaAttributes","ignoreList","attributesToInherit","h","__zone_symbol__requestAnimationFrame","requestAnimationFrame","setTimeout","getDeepActiveElement","root","document","activeElement","shadowRoot","next","canReceiveFocus","HTMLElement","tabIndex","checkVisibility","offsetParent","findFormByRef","form","HTMLFormElement","getElementById","console","warn","undefined","closest"],"sources":["src/utils/component.ts"],"sourcesContent":["/**\n * Adapted from ionic-team/ionic-framework/core/src/utils/helpers.ts\n * v8.7.17\n *\n * Major changes are marked with `// ! LMVZ-DS` comments\n *\n * MIT License\n *\n * Copyright (c) 2015-present Drifty Co.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n// ! LMVZ-DS:\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport type { EventEmitter } from '@stencil/core';\n\ndeclare const __zone_symbol__requestAnimationFrame: typeof window.requestAnimationFrame;\ndeclare const requestAnimationFrame: typeof window.requestAnimationFrame;\n\nexport const transitionEndAsync = (el: HTMLElement | null, expectedDuration = 0) => {\n return new Promise(resolve => {\n transitionEnd(el, expectedDuration, resolve);\n });\n};\n\n/**\n * Allows developer to wait for a transition\n * to finish and fallback to a timer if the\n * transition is cancelled or otherwise\n * never finishes. Also see transitionEndAsync\n * which is an await-able version of this.\n */\nconst transitionEnd = (el: HTMLElement | null, expectedDuration = 0, callback: (ev?: TransitionEvent) => void) => {\n let unRegTrans: (() => void) | undefined;\n let animationTimeout: number | undefined;\n const opts: AddEventListenerOptions = { passive: true };\n const ANIMATION_FALLBACK_TIMEOUT = 500;\n\n const unregister = () => {\n if (unRegTrans) {\n unRegTrans();\n }\n };\n\n const onTransitionEnd = (ev?: Event) => {\n if (ev === undefined || el === ev.target) {\n unregister();\n callback(ev as TransitionEvent);\n }\n };\n\n if (el) {\n el.addEventListener('webkitTransitionEnd', onTransitionEnd, opts);\n el.addEventListener('transitionend', onTransitionEnd, opts);\n animationTimeout = setTimeout(onTransitionEnd, expectedDuration + ANIMATION_FALLBACK_TIMEOUT) as unknown as number;\n\n unRegTrans = () => {\n if (animationTimeout !== undefined) {\n clearTimeout(animationTimeout);\n animationTimeout = undefined;\n }\n el.removeEventListener('webkitTransitionEnd', onTransitionEnd, opts);\n el.removeEventListener('transitionend', onTransitionEnd, opts);\n };\n }\n\n return unregister;\n};\n\n/**\n * Waits for a component to be ready for\n * both custom element and non-custom element builds.\n * If non-custom element build, el.componentOnReady\n * will be used.\n * For custom element builds, we wait a frame\n * so that the inner contents of the component\n * have a chance to render.\n *\n * Use this utility rather than calling\n * el.componentOnReady yourself.\n */\nexport const componentOnReady = (el: any, callback: any) => {\n if (el.componentOnReady) {\n el.componentOnReady().then((resolvedEl: any) => callback(resolvedEl));\n } else {\n raf(() => callback(el));\n }\n};\n\n/**\n * This functions checks if a Stencil component is using\n * the lazy loaded build of Stencil. Returns `true` if\n * the component is lazy loaded. Returns `false` otherwise.\n */\nexport const hasLazyBuild = (stencilEl: HTMLElement) => {\n return (stencilEl as any).componentOnReady !== undefined;\n};\n\nexport type Attributes = { [key: string]: any };\n\n/**\n * Elements inside of web components sometimes need to inherit global attributes\n * set on the host. For example, the inner input in `ion-input` should inherit\n * the `title` attribute that developers set directly on `ion-input`. This\n * helper function should be called in componentWillLoad and assigned to a variable\n * that is later used in the render function.\n *\n * This does not need to be reactive as changing attributes on the host element\n * does not trigger a re-render.\n */\nexport const inheritAttributes = (el: HTMLElement, attributes: string[] = []) => {\n const attributeObject: Attributes = {};\n\n attributes.forEach(attr => {\n if (el.hasAttribute(attr)) {\n const value = el.getAttribute(attr);\n if (value !== null) {\n attributeObject[attr] = el.getAttribute(attr);\n }\n el.removeAttribute(attr);\n }\n });\n\n return attributeObject;\n};\n\n/**\n * List of available ARIA attributes + `role`.\n * Removed deprecated attributes.\n * https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes\n */\nconst ariaAttributes = [\n 'role',\n 'aria-activedescendant',\n 'aria-atomic',\n 'aria-autocomplete',\n 'aria-braillelabel',\n 'aria-brailleroledescription',\n 'aria-busy',\n 'aria-checked',\n 'aria-colcount',\n 'aria-colindex',\n 'aria-colindextext',\n 'aria-colspan',\n 'aria-controls',\n 'aria-current',\n 'aria-describedby',\n 'aria-description',\n 'aria-details',\n 'aria-disabled',\n 'aria-errormessage',\n 'aria-expanded',\n 'aria-flowto',\n 'aria-haspopup',\n 'aria-hidden',\n 'aria-invalid',\n 'aria-keyshortcuts',\n 'aria-label',\n 'aria-labelledby',\n 'aria-level',\n 'aria-live',\n 'aria-multiline',\n 'aria-multiselectable',\n 'aria-orientation',\n 'aria-owns',\n 'aria-placeholder',\n 'aria-posinset',\n 'aria-pressed',\n 'aria-readonly',\n 'aria-relevant',\n 'aria-required',\n 'aria-roledescription',\n 'aria-rowcount',\n 'aria-rowindex',\n 'aria-rowindextext',\n 'aria-rowspan',\n 'aria-selected',\n 'aria-setsize',\n 'aria-sort',\n 'aria-valuemax',\n 'aria-valuemin',\n 'aria-valuenow',\n 'aria-valuetext',\n];\n\n/**\n * Returns an array of aria attributes that should be copied from\n * the shadow host element to a target within the light DOM.\n * @param el The element that the attributes should be copied from.\n * @param ignoreList The list of aria-attributes to ignore reflecting and removing from the host.\n * Use this in instances where we manually specify aria attributes on the `<Host>` element.\n */\nexport const inheritAriaAttributes = (el: HTMLElement, ignoreList?: string[]) => {\n let attributesToInherit = ariaAttributes;\n if (ignoreList && ignoreList.length > 0) {\n attributesToInherit = attributesToInherit.filter(attr => !ignoreList.includes(attr));\n }\n return inheritAttributes(el, attributesToInherit);\n};\n\nexport const addEventListener = (el: any, eventName: string, callback: any, opts?: any) => {\n return el.addEventListener(eventName, callback, opts);\n};\n\nexport const removeEventListener = (el: any, eventName: string, callback: any, opts?: any) => {\n return el.removeEventListener(eventName, callback, opts);\n};\n\n/**\n * Gets the root context of a shadow dom element\n * On newer browsers this will be the shadowRoot,\n * but for older browser this may just be the\n * element itself.\n *\n * Useful for whenever you need to explicitly\n * do \"myElement.shadowRoot!.querySelector(...)\".\n */\nexport const getElementRoot = (el: HTMLElement, fallback: HTMLElement = el) => {\n return el.shadowRoot || fallback;\n};\n\n/**\n * Patched version of requestAnimationFrame that avoids ngzone\n * Use only when you know ngzone should not run\n */\nexport const raf = (h: FrameRequestCallback) => {\n if (typeof __zone_symbol__requestAnimationFrame === 'function') {\n return __zone_symbol__requestAnimationFrame(h);\n }\n if (typeof requestAnimationFrame === 'function') {\n return requestAnimationFrame(h);\n }\n return setTimeout(h);\n};\n\nexport const hasShadowDom = (el: HTMLElement) => {\n return !!el.shadowRoot && !!(el as any).attachShadow;\n};\n\nexport const focusVisibleElement = (el: HTMLElement) => {\n el.focus();\n\n // ! LMVZ-DS: removed ion-focusable handling\n};\n\n/**\n * This method is used to add a hidden input to a host element that contains\n * a Shadow DOM. It does not add the input inside of the Shadow root which\n * allows it to be picked up inside of forms. It should contain the same\n * values as the host element.\n *\n * @param always Add a hidden input even if the container does not use Shadow\n * @param container The element where the input will be added\n * @param name The name of the input\n * @param value The value of the input\n * @param disabled If true, the input is disabled\n */\nexport const renderHiddenInput = (always: boolean, container: HTMLElement, name: string, value: string | undefined | null, disabled: boolean) => {\n if (always || hasShadowDom(container)) {\n let input = container.querySelector('input.aux-input') as HTMLInputElement | null;\n if (!input) {\n input = container.ownerDocument!.createElement('input');\n input.type = 'hidden';\n input.classList.add('aux-input');\n container.appendChild(input);\n }\n input.disabled = disabled;\n input.name = name;\n input.value = value || '';\n }\n};\n\nexport const clamp = (min: number, n: number, max: number) => {\n return Math.max(min, Math.min(n, max));\n};\n\nexport const assert = (actual: any, reason: string) => {\n if (!actual) {\n const message = 'ASSERT: ' + reason;\n console.error(message);\n debugger; // eslint-disable-line\n throw new Error(message);\n }\n};\n\nexport const now = (ev: UIEvent) => {\n return ev.timeStamp || Date.now();\n};\n\nexport const pointerCoord = (ev: any): { x: number; y: number } => {\n // get X coordinates for either a mouse click\n // or a touch depending on the given event\n if (ev) {\n const changedTouches = ev.changedTouches;\n if (changedTouches && changedTouches.length > 0) {\n const touch = changedTouches[0];\n return { x: touch.clientX, y: touch.clientY };\n }\n if (ev.pageX !== undefined) {\n return { x: ev.pageX, y: ev.pageY };\n }\n }\n return { x: 0, y: 0 };\n};\n\n// ! removed isEndSide (for RTL handling) via menu-interface\n\nexport const deferEvent = (event: EventEmitter): EventEmitter => {\n return debounceEvent(event, 0);\n};\n\nexport const debounceEvent = (event: EventEmitter, wait: number): EventEmitter => {\n const original = (event as any)._original || event;\n return {\n _original: event,\n emit: debounce(original.emit.bind(original), wait),\n } as EventEmitter;\n};\n\nexport const debounce = (func: (...args: any[]) => void, wait = 0) => {\n let timer: any;\n return (...args: any[]): any => {\n clearTimeout(timer);\n timer = setTimeout(func, wait, ...args);\n };\n};\n\n/**\n * Check whether the two string maps are shallow equal.\n *\n * undefined is treated as an empty map.\n *\n * @returns whether the keys are the same and the values are shallow equal.\n */\nexport const shallowEqualStringMap = (map1: { [k: string]: any } | undefined, map2: { [k: string]: any } | undefined): boolean => {\n map1 ??= {};\n map2 ??= {};\n\n if (map1 === map2) {\n return true;\n }\n\n const keys1 = Object.keys(map1);\n\n if (keys1.length !== Object.keys(map2).length) {\n return false;\n }\n\n for (const k1 of keys1) {\n if (!(k1 in map2)) {\n return false;\n }\n if (map1[k1] !== map2[k1]) {\n return false;\n }\n }\n\n return true;\n};\n\n/**\n * Checks input for usable number. Not NaN and not Infinite.\n */\nexport const isSafeNumber = (input: unknown): input is number => {\n return typeof input === 'number' && !isNaN(input) && isFinite(input);\n};\n\n// CUSTOM LMVZ-DS utilities for components\n\nexport function getDeepActiveElement(root = document) {\n let activeElement = root.activeElement;\n\n // No focus at all\n if (!activeElement) {\n return null;\n }\n\n // Walk through shadow DOMs\n while (activeElement && activeElement.shadowRoot) {\n const next = activeElement.shadowRoot.activeElement;\n if (!next) {\n // Focus is effectively on the host element itself\n break;\n }\n activeElement = next;\n }\n\n return activeElement;\n}\n\nexport function canReceiveFocus(el: Element): boolean {\n return (\n el instanceof HTMLElement && el.tabIndex >= 0 && !el.hasAttribute('disabled') && el.getAttribute('aria-hidden') !== 'true' && el.checkVisibility() && el.offsetParent !== null\n );\n}\n\nexport type FormRef = string | HTMLFormElement | undefined;\n\n/**\n * Finds the form element based on the provided `form` selector or element reference.\n */\nexport function findFormByRef(form: FormRef, el: HTMLElement): HTMLFormElement | null {\n if (form instanceof HTMLFormElement) {\n return form;\n }\n if (typeof form === 'string') {\n // Check if the string provided is a form id.\n const el: HTMLElement | null = document.getElementById(form);\n if (el) {\n if (el instanceof HTMLFormElement) {\n return el;\n } else {\n /**\n * The developer referenced the form using an id string,\n * but the element with that id is not a form element.\n */\n console.warn(`No Form found with selector: \"#${form}\". Verify that the element with id exists and is actually a <form> element.`, el);\n return null;\n }\n } else {\n /**\n * The developer referenced the form using an id string,\n * but the element with that id could not be found in the DOM.\n */\n console.warn(`No Form found with selector: \"#${form}\". Verify that the id is correct and the form is rendered in the DOM.`, el);\n return null;\n }\n }\n if (form !== undefined) {\n /**\n * The developer specified an HTMLElement for the form attribute,\n * but the element is not a HTMLFormElement.\n * This will also catch if the developer passes null as the form attribute.\n */\n console.warn(`The provided \"form\" element is invalid. Verify that the form is a HTMLFormElement and rendered in the DOM.`, el);\n return null;\n }\n /**\n * If the form element is not set, the button may be inside\n * of a form element. Query the closest form element to the button.\n */\n return el.closest('form');\n}\n"],"mappings":"MAmGaA,EAAmB,CAACC,EAASC,KACxC,GAAID,EAAGD,iBAAkB,CACvBC,EAAGD,mBAAmBG,MAAMC,GAAoBF,EAASE,I,KACpD,CAC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,EAAGgC,eAAiB,IAE9K,CAOM,SAAUC,EAAcC,EAAelC,GAC3C,GAAIkC,aAAgBC,gBAAiB,CACnC,OAAOD,C,CAET,UAAWA,IAAS,SAAU,CAE5B,MAAMlC,EAAyBwB,SAASY,eAAeF,GACvD,GAAIlC,EAAI,CACN,GAAIA,aAAcmC,gBAAiB,CACjC,OAAOnC,C,KACF,CAKLqC,QAAQC,KAAK,kCAAkCJ,+EAAmFlC,GAClI,OAAO,I,MAEJ,CAKLqC,QAAQC,KAAK,kCAAkCJ,yEAA6ElC,GAC5H,OAAO,I,EAGX,GAAIkC,IAASK,UAAW,CAMtBF,QAAQC,KAAK,6GAA8GtC,GAC3H,OAAO,I,CAMT,OAAOA,EAAGwC,QAAQ,OACpB,Q","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":[],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["ElementActivationController","host","config","constructor","this","hostDidLoad","el","hasAttribute","console","warn","addEventListener","handleKeyDown","bind","handleActivation","event","keys","includes","key","preventDefault","lmvzActivation","emit","localHandler"],"sources":["src/utils/element-activation-controller.ts"],"sourcesContent":["import type { EventEmitter } from '@stencil/core';\nimport type { ReactiveController } from './reactive-controller-host';\n\nexport type ElementActivationHost = {\n el: HTMLElement;\n lmvzActivation: EventEmitter<void>;\n};\n\ntype Config = {\n localHandler?: (event: Event) => unknown;\n keys?: string[];\n};\n\nexport class ElementActivationController implements ReactiveController {\n constructor(\n private host: ElementActivationHost,\n private config?: Config,\n ) {}\n\n hostDidLoad() {\n if (!this.host.el.hasAttribute('tabindex')) {\n console.warn('Interactive element does not have a tabindex attribute!', this.host.el);\n }\n this.host.el.addEventListener('keydown', this.handleKeyDown.bind(this));\n this.host.el.addEventListener('click', this.handleActivation.bind(this));\n }\n\n private handleKeyDown = (event: KeyboardEvent) => {\n // Activate on Enter or Space key press\n if ((this.config?.keys ?? ['Enter', ' ']).includes(event.key)) {\n // Prevent default scrolling behavior for Space key\n event.preventDefault();\n this.handleActivation(event);\n }\n };\n\n private handleActivation = (event: Event) => {\n this.host.lmvzActivation.emit();\n if (this.config?.localHandler) {\n this.config.localHandler(event);\n }\n };\n}\n"],"mappings":"MAaaA,EAEDC,KACAC,OAFV,WAAAC,CACUF,EACAC,GADAE,KAAAH,OACAG,KAAAF,Q,CAGV,WAAAG,GACE,IAAKD,KAAKH,KAAKK,GAAGC,aAAa,YAAa,CAC1CC,QAAQC,KAAK,0DAA2DL,KAAKH,KAAKK,G,CAEpFF,KAAKH,KAAKK,GAAGI,iBAAiB,UAAWN,KAAKO,cAAcC,KAAKR,OACjEA,KAAKH,KAAKK,GAAGI,iBAAiB,QAASN,KAAKS,iBAAiBD,KAAKR,M,CAG5DO,cAAiBG,IAEvB,IAAKV,KAAKF,QAAQa,MAAQ,CAAC,QAAS,MAAMC,SAASF,EAAMG,KAAM,CAE7DH,EAAMI,iBACNd,KAAKS,iBAAiBC,E,GAIlBD,iBAAoBC,IAC1BV,KAAKH,KAAKkB,eAAeC,OACzB,GAAIhB,KAAKF,QAAQmB,aAAc,CAC7BjB,KAAKF,OAAOmB,aAAaP,E","ignoreList":[]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{p as t,h as e,c as s,t as i}from"./p-DBeynNeU.js";import{g as n,b as r,l as o,i as c,c as a,d as h,m as l,e as u,f as d,h as f,j as m,k as v,n as p,s as g,o as w,p as z,q as y,t as b,u as k,v as x,w as S,x as C,y as E,z as _,A as D,B as T,C as V,D as L,E as M,F as P,G as R,H as O,I as j,J as N,K as B,L as I,M as $,N as A,O as U,P as F,Q as H,R as K,S as q,T as G,U as Q,V as W,W as Z,X as J,Y as X,Z as Y,_ as tt,$ as et,r as st,a0 as it,a1 as nt,a2 as rt,a3 as ot}from"./p-CdofjRtQ.js";import{u as ct,o as at,p as ht,E as lt,a as ut,_ as dt,s as ft,i as mt,d as vt,R as pt,A as gt}from"./p-D7xthqTT.js";import{T as wt,s as zt}from"./p-UiqQVZhU.js";const yt=Symbol.for("effect/Brand/Refined");const bt=(t,e)=>[{message:t,meta:e}];function kt(...t){const e=t.length===2?e=>t[0](e)?r(e):o(t[1](e)):e=>l(t[0](e),{onNone:()=>r(e),onSome:o});return Object.assign((t=>n(e(t),c)),{[yt]:yt,option:t=>h(e(t)),either:e,is:t=>a(e(t))})}const xt=(t,e,s,i)=>D({_tag:"Complete",key:t,exit:e,entryStats:s,timeToLiveMillis:i});const St=(t,e)=>D({_tag:"Pending",key:t,deferred:e});const Ct=(t,e)=>D({_tag:"Refreshing",deferred:t,complete:e});const Et=Symbol.for("effect/Cache/MapKey");class _t{current;[Et]=Et;previous=undefined;next=undefined;constructor(t){this.current=t}[j](){return N($(this.current),I($(this.previous)),I($(this.next)),B(this))}[A](t){if(this===t){return true}return Tt(t)&&F(this.current,t.current)&&F(this.previous,t.previous)&&F(this.next,t.next)}}const Dt=t=>new _t(t);const Tt=t=>U(t,Et);class Vt{head=undefined;tail=undefined;add(t){if(t!==this.tail){if(this.tail===undefined){this.head=t;this.tail=t}else{const e=t.previous;const s=t.next;if(s!==undefined){t.next=undefined;if(e!==undefined){e.next=s;s.previous=e}else{this.head=s;this.head.previous=undefined}}this.tail.next=t;t.previous=this.tail;this.tail=t}}}remove(){const t=this.head;if(t!==undefined){const e=t.next;if(e!==undefined){t.next=undefined;this.head=e;this.head.previous=undefined}else{this.head=undefined;this.tail=undefined}}return t}}const Lt=()=>new Vt;const Mt=(t,e,s,i,n,r)=>({map:t,keys:e,accesses:s,updating:i,hits:n,misses:r});const Pt=()=>Mt(L(),Lt(),ut(),O(false),0,0);const Rt="effect/Cache";const Ot=Symbol.for(Rt);const jt={_Key:t=>t,_Error:t=>t,_Value:t=>t};const Nt="effect/ConsumerCache";const Bt=Symbol.for(Nt);const It={_Key:t=>t,_Error:t=>t,_Value:t=>t};const $t=t=>t;const At=t=>({loadedMillis:t});class Ut{capacity;context;fiberId;lookup;timeToLive;[Ot]=jt;[Bt]=It;cacheState;constructor(t,e,s,i,n){this.capacity=t;this.context=e;this.fiberId=s;this.lookup=i;this.timeToLive=n;this.cacheState=Pt()}get(t){return d(this.getEither(t),p)}get cacheStats(){return g((()=>$t({hits:this.cacheState.hits,misses:this.cacheState.misses,size:w(this.cacheState.map)})))}getOption(t){return z((()=>l(y(this.cacheState.map,t),{onNone:()=>{const e=Dt(t);this.trackAccess(e);this.trackMiss();return b(k())},onSome:t=>this.resolveMapValue(t)})))}getOptionComplete(t){return z((()=>l(y(this.cacheState.map,t),{onNone:()=>{const e=Dt(t);this.trackAccess(e);this.trackMiss();return b(k())},onSome:t=>this.resolveMapValue(t,true)})))}contains(t){return g((()=>x(this.cacheState.map,t)))}entryStats(t){return g((()=>{const e=y(this.cacheState.map,t);if(S(e)){switch(e.value._tag){case"Complete":{const t=e.value.entryStats.loadedMillis;return C(At(t))}case"Pending":{return k()}case"Refreshing":{const t=e.value.complete.entryStats.loadedMillis;return C(At(t))}}}return k()}))}getEither(t){return z((()=>{const e=t;let s=undefined;let i=undefined;let n=E(y(this.cacheState.map,e));if(n===undefined){i=ct(this.fiberId);s=Dt(e);if(x(this.cacheState.map,e)){n=E(y(this.cacheState.map,e))}else{_(this.cacheState.map,e,St(s,i))}}if(n===undefined){this.trackAccess(s);this.trackMiss();return d(this.lookupValueOf(t,i),r)}else{return T(this.resolveMapValue(n),l({onNone:()=>this.getEither(t),onSome:t=>b(o(t))}))}}))}invalidate(t){return g((()=>{V(this.cacheState.map,t)}))}invalidateWhen(t,e){return g((()=>{const s=y(this.cacheState.map,t);if(S(s)&&s.value._tag==="Complete"){if(s.value.exit._tag==="Success"){if(e(s.value.exit.value)){V(this.cacheState.map,t)}}}}))}get invalidateAll(){return g((()=>{this.cacheState.map=L()}))}refresh(t){return M((e=>z((()=>{const s=t;const i=ct(this.fiberId);let n=E(y(this.cacheState.map,s));if(n===undefined){if(x(this.cacheState.map,s)){n=E(y(this.cacheState.map,s))}else{_(this.cacheState.map,s,St(Dt(s),i))}}if(n===undefined){return H(this.lookupValueOf(t,i))}else{switch(n._tag){case"Complete":{if(this.hasExpired(e,n.timeToLiveMillis)){const e=E(y(this.cacheState.map,s));if(F(e,n)){V(this.cacheState.map,s)}return H(this.get(t))}return N(this.lookupValueOf(t,i),K((()=>{const t=E(y(this.cacheState.map,s));if(F(t,n)){const t=Ct(i,n);_(this.cacheState.map,s,t);return true}return false})),H)}case"Pending":{return dt(n.deferred)}case"Refreshing":{return dt(n.deferred)}}}}))))}set(t,e){return M((s=>g((()=>{const i=s.unsafeCurrentTimeMillis();const n=t;const r=ft(e);const o=xt(Dt(n),r,At(i),i+q(u(this.timeToLive(r))));_(this.cacheState.map,n,o)}))))}get size(){return g((()=>w(this.cacheState.map)))}get values(){return g((()=>{const t=[];for(const e of this.cacheState.map){if(e[1]._tag==="Complete"&&e[1].exit._tag==="Success"){t.push(e[1].exit.value)}}return t}))}get entries(){return g((()=>{const t=[];for(const e of this.cacheState.map){if(e[1]._tag==="Complete"&&e[1].exit._tag==="Success"){t.push([e[0],e[1].exit.value])}}return t}))}get keys(){return g((()=>{const t=[];for(const e of this.cacheState.map){if(e[1]._tag==="Complete"&&e[1].exit._tag==="Success"){t.push(e[0])}}return t}))}resolveMapValue(t,e=false){return M((s=>{switch(t._tag){case"Complete":{this.trackAccess(t.key);if(this.hasExpired(s,t.timeToLiveMillis)){V(this.cacheState.map,t.key.current);return b(k())}this.trackHit();return d(t.exit,C)}case"Pending":{this.trackAccess(t.key);this.trackHit();if(e){return b(k())}return d(dt(t.deferred),C)}case"Refreshing":{this.trackAccess(t.complete.key);this.trackHit();if(this.hasExpired(s,t.complete.timeToLiveMillis)){if(e){return b(k())}return d(dt(t.deferred),C)}return d(t.complete.exit,C)}}}))}trackHit(){this.cacheState.hits=this.cacheState.hits+1}trackMiss(){this.cacheState.misses=this.cacheState.misses+1}trackAccess(t){at(this.cacheState.accesses,t);if(P(this.cacheState.updating,false,true)){let t=true;while(t){const e=ht(this.cacheState.accesses,lt);if(e===lt){t=false}else{this.cacheState.keys.add(e)}}let e=w(this.cacheState.map);t=e>this.capacity;while(t){const s=this.cacheState.keys.remove();if(s!==undefined){if(x(this.cacheState.map,s.current)){V(this.cacheState.map,s.current);e=e-1;t=e>this.capacity}}else{t=false}}R(this.cacheState.updating,false)}}hasExpired(t,e){return t.unsafeCurrentTimeMillis()>e}lookupValueOf(t,e){return M((s=>z((()=>{const i=t;return N(this.lookup(t),Z(this.context),W,T((t=>{const n=s.unsafeCurrentTimeMillis();const r=At(n);const o=xt(Dt(i),t,r,n+q(u(this.timeToLive(t))));_(this.cacheState.map,i,o);return Q(vt(e,t),t)})),G((()=>Q(mt(e),g((()=>{V(this.cacheState.map,i)}))))))}))))}}const Ft=t=>{const e=u(t.timeToLive);return Ht({capacity:t.capacity,lookup:t.lookup,timeToLive:()=>e})};const Ht=t=>d(f([m(),v]),(([e,s])=>new Ut(t.capacity,e,s,t.lookup,(e=>u(t.timeToLive(e))))));const Kt=Ft;class qt extends(wt("FetchError")){}class Gt extends(wt("NotFoundError")){}const Qt=(t,e)=>J((function*(){const s=yield*X({try:()=>fetch(t,e),catch:t=>new qt({cause:t})});if(s.status===404){return yield*new Gt({url:s.url})}return s}));class Wt extends(wt("ResponseTextError")){constructor(t){super(new Error(`Failed to read response text`,{cause:t}))}}const Zt=t=>X({try:()=>t.text(),catch:t=>new Wt(t)});const Jt=kt(te,(()=>bt("SVG data is malformed")));class Xt extends(wt("BrandValidationError")){constructor(t,e){super(new Error(`Brand validation failed for type ${e}.`,{cause:t}))}}const Yt=t=>Y({try:()=>Jt(t),catch:t=>new Xt(t,"SVGString")});function te(t){if(typeof t!=="string"){return false}try{const e=new DOMParser;const s=e.parseFromString(t,"image/svg+xml");return s.documentElement.nodeName==="svg"}catch{return false}}const ee=()=>Jt(`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"></svg>`);const se=()=>Kt({capacity:200,timeToLive:et,lookup:t=>J((function*(){const e=t;const s=yield*zt(`${e}.svg`,"icons");const i=yield*Qt(s);const n=yield*Zt(i);return yield*Yt(n)}))});let ie=null;function ne(t){const e=t;return J((function*(){if(!ie){ie=yield*se()}return yield*ie.get(e)}))}function re(){return J((function*(){if(ie){yield*ie.invalidateAll}else{tt("Attempted to clear icon cache before it was initialized")}}))}const oe=()=>`.sc-lmvz-icon-h{--lmvz-icon-color:var(--lmvz-component-color, var(--lmvz-semantic-color-on-surface-input-primary, #000000));display:inline-block;line-height:0;svg{display:block}svg>path{stroke:var(--lmvz-icon-color);fill:none}}[size='xs'].sc-lmvz-icon-h{svg{width:var(--lmvz-component-icon-size-xs, clamp(0.75rem, 0.69rem + 0.26vw, 1rem));height:var(--lmvz-component-icon-size-xs, clamp(0.75rem, 0.69rem + 0.26vw, 1rem))}}[size='sm'].sc-lmvz-icon-h{svg{width:var(--lmvz-component-icon-size-sm, clamp(0.88rem, 0.81rem + 0.26vw, 1.13rem));height:var(--lmvz-component-icon-size-sm, clamp(0.88rem, 0.81rem + 0.26vw, 1.13rem))}}[size='md'].sc-lmvz-icon-h{svg{width:var(--lmvz-component-icon-size-md, clamp(1rem, 0.88rem + 0.52vw, 1.5rem));height:var(--lmvz-component-icon-size-md, clamp(1rem, 0.88rem + 0.52vw, 1.5rem))}}[size='lg'].sc-lmvz-icon-h{svg{width:var(--lmvz-component-icon-size-lg, clamp(1.5rem, 1.38rem + 0.52vw, 2rem));height:var(--lmvz-component-icon-size-lg, clamp(1.5rem, 1.38rem + 0.52vw, 2rem))}}[size='inherit'].sc-lmvz-icon-h{svg{width:inherit;height:inherit}}[weight='light'].sc-lmvz-icon-h{svg>path{stroke-width:1}}[weight='medium'].sc-lmvz-icon-h{svg>path{stroke-width:1.5}}[weight='bold'].sc-lmvz-icon-h{svg>path{stroke-width:2}}[weight='filled'].sc-lmvz-icon-h{svg>path{stroke-width:2;fill:var(--lmvz-icon-color)}}`;const ce=t(class t extends pt{intersectionObserver;get el(){return this}icon;weight="medium";size="md";iconData;visible=false;ariaLabel;get ariaHidden(){return!this.ariaLabel}constructor(t){super(false);if(t!==false){this.__registerHost()}this.addController(new gt(this))}connectedCallback(){this.waitUntilVisible((()=>{this.visible=true;this.loadIconPathData()}))}disconnectedCallback(){if(this.intersectionObserver){this.intersectionObserver.disconnect();this.intersectionObserver=null}}async loadIconPathData(){const{icon:t,visible:e}=this;if(!t||!e){return}this.iconData=await st(ne(this.icon).pipe(it((e=>nt(`Error loading icon "${t}":`,e.message,e.cause,e.stack))),rt((()=>ot(ee())))))}render(){return e(s,{key:"50d0f96ec5085a47ca7783e5232dfb503fa32d29",role:"img","aria-hidden":`${this.ariaHidden}`,innerHTML:this.iconData})}waitUntilVisible(t,e=50){if(typeof window==="undefined"||!window.IntersectionObserver){t();return}this.intersectionObserver=new IntersectionObserver((e=>{e.some((e=>{if(e.isIntersecting){this.intersectionObserver.disconnect();this.intersectionObserver=null;t();return true}return false}))}),{rootMargin:`${e}px`});this.intersectionObserver.observe(this.el)}static get assetsDirs(){return["../../assets/icons"]}static get watchers(){return{icon:[{loadIconPathData:0}]}}static get style(){return oe()}},[514,"lmvz-icon",{icon:[513],weight:[513],size:[513],ariaLabel:[513,"aria-label"],iconData:[32],visible:[32]},undefined,{icon:[{loadIconPathData:0}]}]);function ae(){if(typeof customElements==="undefined"){return}const t=["lmvz-icon"];t.forEach((t=>{switch(t){case"lmvz-icon":if(!customElements.get(i(t))){customElements.define(i(t),ce)}break}}))}export{ce as L,re as c,ae as d};
|
|
2
|
+
//# sourceMappingURL=p-Cd4nH2vx.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["RefinedConstructorsTypeId","Symbol","for","error","message","meta","refined","args","either","length","unbranded","Either.right","Either.left","Option.match","onNone","onSome","Object","assign","Either.getOrThrowWith","identity","option","Option.getRight","is","Either.isRight","complete","key","exit","entryStats","timeToLiveMillis","Data.struct","_tag","pending","deferred","refreshing","MapKeyTypeId","MapKeyImpl","current","previous","undefined","next","constructor","this","Hash.symbol","pipe","Hash.hash","Hash.combine","Hash.cached","Equal.symbol","that","isMapKey","Equal.equals","makeMapKey","u","hasProperty","KeySetImpl","head","tail","add","remove","makeKeySet","makeCacheState","map","keys","accesses","updating","hits","misses","initialCacheState","MutableHashMap.empty","MutableQueue.unbounded","MutableRef.make","CacheSymbolKey","CacheTypeId","cacheVariance","_Key","_","_Error","_Value","ConsumerCacheSymbolKey","ConsumerCacheTypeId","consumerCacheVariance","makeCacheStats","options","makeEntryStats","loadedMillis","CacheImpl","capacity","context","fiberId","lookup","timeToLive","cacheState","get","core.map","getEither","Either.merge","cacheStats","core.sync","size","MutableHashMap.size","getOption","core.suspend","MutableHashMap.get","mapKey","trackAccess","trackMiss","core.succeed","Option.none","value","resolveMapValue","getOptionComplete","contains","MutableHashMap.has","Option.isSome","loaded","Option.some","k","Option.getOrUndefined","Deferred.unsafeMake","MutableHashMap.set","lookupValueOf","core.flatMap","invalidate","MutableHashMap.remove","invalidateWhen","when","invalidateAll","refresh","effect.clockWith","clock","core.asVoid","hasExpired","found","effect.when","mapValue","Deferred.await","set","now","unsafeCurrentTimeMillis","lookupResult","Exit.succeed","Duration.toMillis","Duration.decode","values","entry","push","entries","ignorePending","trackHit","MutableQueue.offer","MutableRef.compareAndSet","loop","MutableQueue.poll","MutableQueue.EmptyMutableQueue","MutableRef.set","input","core.provideContext","core.exit","stats","core.zipRight","Deferred.done","core.onInterrupt","Deferred.interrupt","make","makeWith","fiberRuntime.all","core.context","core.fiberId","internal.make","FetchError","Data.TaggedError","NotFoundError","httpClient","init","Effect.gen","response","Effect.tryPromise","try","fetch","catch","cause","status","url","ResponseTextError","super","Error","responseAsText","res","text","SVGString","Brand.refined","isValidSVG","Brand.error","BrandValidationError","type","createValidSVGString","svg","Effect.try","parser","DOMParser","doc","parseFromString","documentElement","nodeName","emptyDefaultSvg","createIconCache","Cache.make","Duration.infinity","name","assetPath","syncCreateAssetUrlSafely","responseString","cacheInstance","fetchIconSvg","clearIconCache","Effect.logWarning","lmvzIconCss","LmvzIcon","__stencil_proxyCustomElement","ReactiveControllerHost","intersectionObserver","icon","weight","iconData","visible","ariaLabel","ariaHidden","registerHost","addController","AriaValidationController","connectedCallback","waitUntilVisible","loadIconPathData","disconnectedCallback","disconnect","Effect.runPromise","Effect.tapError","Effect.logError","stack","Effect.catchAll","Effect.succeed","render","h","Host","role","innerHTML","callback","rootMargin","window","IntersectionObserver","some","isIntersecting","observe","el"],"sources":["../../node_modules/effect/dist/esm/Brand.js","../../node_modules/effect/dist/esm/internal/cache.js","../../node_modules/effect/dist/esm/Cache.js","src/utils/http.ts","src/utils/validation/svg.ts","src/components/lmvz-icon/icons.ts","src/components/lmvz-icon/lmvz-icon.css?tag=lmvz-icon&encapsulation=scoped","src/components/lmvz-icon/lmvz-icon.tsx"],"sourcesContent":["/**\n * This module provides types and utility functions to create and work with branded types,\n * which are TypeScript types with an added type tag to prevent accidental usage of a value in the wrong context.\n *\n * The `refined` and `nominal` functions are both used to create branded types in TypeScript.\n * The main difference between them is that `refined` allows for validation of the data, while `nominal` does not.\n *\n * The `nominal` function is used to create a new branded type that has the same underlying type as the input, but with a different name.\n * This is useful when you want to distinguish between two values of the same type that have different meanings.\n * The `nominal` function does not perform any validation of the input data.\n *\n * On the other hand, the `refined` function is used to create a new branded type that has the same underlying type as the input,\n * but with a different name, and it also allows for validation of the input data.\n * The `refined` function takes a predicate that is used to validate the input data.\n * If the input data fails the validation, a `BrandErrors` is returned, which provides information about the specific validation failure.\n *\n * @since 2.0.0\n */\nimport * as Arr from \"./Array.js\";\nimport * as Either from \"./Either.js\";\nimport { identity, unsafeCoerce } from \"./Function.js\";\nimport * as Option from \"./Option.js\";\n/**\n * @since 2.0.0\n * @category symbols\n */\nexport const BrandTypeId = /*#__PURE__*/Symbol.for(\"effect/Brand\");\n/**\n * @since 2.0.0\n * @category symbols\n */\nexport const RefinedConstructorsTypeId = /*#__PURE__*/Symbol.for(\"effect/Brand/Refined\");\n/**\n * Returns a `BrandErrors` that contains a single `RefinementError`.\n *\n * @since 2.0.0\n * @category constructors\n */\nexport const error = (message, meta) => [{\n message,\n meta\n}];\n/**\n * Takes a variable number of `BrandErrors` and returns a single `BrandErrors` that contains all refinement errors.\n *\n * @since 2.0.0\n * @category constructors\n */\nexport const errors = (...errors) => Arr.flatten(errors);\nexport function refined(...args) {\n const either = args.length === 2 ? unbranded => args[0](unbranded) ? Either.right(unbranded) : Either.left(args[1](unbranded)) : unbranded => {\n return Option.match(args[0](unbranded), {\n onNone: () => Either.right(unbranded),\n onSome: Either.left\n });\n };\n return Object.assign(unbranded => Either.getOrThrowWith(either(unbranded), identity), {\n [RefinedConstructorsTypeId]: RefinedConstructorsTypeId,\n option: args => Option.getRight(either(args)),\n either,\n is: args => Either.isRight(either(args))\n });\n}\n/**\n * This function returns a `Brand.Constructor` that **does not apply any runtime checks**, it just returns the provided value.\n * It can be used to create nominal types that allow distinguishing between two values of the same type but with different meanings.\n *\n * If you also want to perform some validation, see {@link refined}.\n *\n * **Example**\n *\n * ```ts\n * import * as assert from \"node:assert\"\n * import { Brand } from \"effect\"\n *\n * type UserId = number & Brand.Brand<\"UserId\">\n *\n * const UserId = Brand.nominal<UserId>()\n *\n * console.log(UserId(1))\n * // 1\n * ```\n *\n * @since 2.0.0\n * @category constructors\n */\nexport const nominal = () => {\n // @ts-expect-error\n return Object.assign(args => args, {\n [RefinedConstructorsTypeId]: RefinedConstructorsTypeId,\n option: args => Option.some(args),\n either: args => Either.right(args),\n is: _args => true\n });\n};\n/**\n * Combines two or more brands together to form a single branded type.\n * This API is useful when you want to validate that the input data passes multiple brand validators.\n *\n * **Example**\n *\n * ```ts\n * import * as assert from \"node:assert\"\n * import { Brand } from \"effect\"\n *\n * type Int = number & Brand.Brand<\"Int\">\n * const Int = Brand.refined<Int>(\n * (n) => Number.isInteger(n),\n * (n) => Brand.error(`Expected ${n} to be an integer`)\n * )\n * type Positive = number & Brand.Brand<\"Positive\">\n * const Positive = Brand.refined<Positive>(\n * (n) => n > 0,\n * (n) => Brand.error(`Expected ${n} to be positive`)\n * )\n *\n * const PositiveInt = Brand.all(Int, Positive)\n *\n * console.log(PositiveInt(1))\n * // 1\n *\n * assert.throws(() => PositiveInt(1.1))\n * ```\n *\n * @since 2.0.0\n * @category combining\n */\nexport const all = (...brands) => {\n const either = args => {\n let result = Either.right(args);\n for (const brand of brands) {\n const nextResult = brand.either(args);\n if (Either.isLeft(result) && Either.isLeft(nextResult)) {\n result = Either.left([...result.left, ...nextResult.left]);\n } else {\n result = Either.isLeft(result) ? result : nextResult;\n }\n }\n return result;\n };\n // @ts-expect-error\n return Object.assign(args => Either.match(either(args), {\n onLeft: e => {\n throw e;\n },\n onRight: identity\n }), {\n [RefinedConstructorsTypeId]: RefinedConstructorsTypeId,\n option: args => Option.getRight(either(args)),\n either,\n is: args => Either.isRight(either(args))\n });\n};\n/**\n * Retrieves the unbranded value from a `Brand` instance.\n *\n * @since 3.15.0\n * @category getters\n */\nexport const unbranded = unsafeCoerce;\n//# sourceMappingURL=Brand.js.map","import * as Context from \"../Context.js\";\nimport * as Deferred from \"../Deferred.js\";\nimport * as Duration from \"../Duration.js\";\nimport * as Either from \"../Either.js\";\nimport * as Equal from \"../Equal.js\";\nimport * as Exit from \"../Exit.js\";\nimport { pipe } from \"../Function.js\";\nimport * as Hash from \"../Hash.js\";\nimport * as MutableHashMap from \"../MutableHashMap.js\";\nimport * as MutableQueue from \"../MutableQueue.js\";\nimport * as MutableRef from \"../MutableRef.js\";\nimport * as Option from \"../Option.js\";\nimport { hasProperty } from \"../Predicate.js\";\nimport * as effect from \"./core-effect.js\";\nimport * as core from \"./core.js\";\nimport * as Data from \"./data.js\";\nimport { none } from \"./fiberId.js\";\nimport * as fiberRuntime from \"./fiberRuntime.js\";\n/** @internal */\nexport const complete = (key, exit, entryStats, timeToLiveMillis) => Data.struct({\n _tag: \"Complete\",\n key,\n exit,\n entryStats,\n timeToLiveMillis\n});\n/** @internal */\nexport const pending = (key, deferred) => Data.struct({\n _tag: \"Pending\",\n key,\n deferred\n});\n/** @internal */\nexport const refreshing = (deferred, complete) => Data.struct({\n _tag: \"Refreshing\",\n deferred,\n complete\n});\n/** @internal */\nexport const MapKeyTypeId = /*#__PURE__*/Symbol.for(\"effect/Cache/MapKey\");\nclass MapKeyImpl {\n current;\n [MapKeyTypeId] = MapKeyTypeId;\n previous = undefined;\n next = undefined;\n constructor(current) {\n this.current = current;\n }\n [Hash.symbol]() {\n return pipe(Hash.hash(this.current), Hash.combine(Hash.hash(this.previous)), Hash.combine(Hash.hash(this.next)), Hash.cached(this));\n }\n [Equal.symbol](that) {\n if (this === that) {\n return true;\n }\n return isMapKey(that) && Equal.equals(this.current, that.current) && Equal.equals(this.previous, that.previous) && Equal.equals(this.next, that.next);\n }\n}\n/** @internal */\nexport const makeMapKey = current => new MapKeyImpl(current);\n/** @internal */\nexport const isMapKey = u => hasProperty(u, MapKeyTypeId);\nclass KeySetImpl {\n head = undefined;\n tail = undefined;\n add(key) {\n if (key !== this.tail) {\n if (this.tail === undefined) {\n this.head = key;\n this.tail = key;\n } else {\n const previous = key.previous;\n const next = key.next;\n if (next !== undefined) {\n key.next = undefined;\n if (previous !== undefined) {\n previous.next = next;\n next.previous = previous;\n } else {\n this.head = next;\n this.head.previous = undefined;\n }\n }\n this.tail.next = key;\n key.previous = this.tail;\n this.tail = key;\n }\n }\n }\n remove() {\n const key = this.head;\n if (key !== undefined) {\n const next = key.next;\n if (next !== undefined) {\n key.next = undefined;\n this.head = next;\n this.head.previous = undefined;\n } else {\n this.head = undefined;\n this.tail = undefined;\n }\n }\n return key;\n }\n}\n/** @internal */\nexport const makeKeySet = () => new KeySetImpl();\n/**\n * Constructs a new `CacheState` from the specified values.\n *\n * @internal\n */\nexport const makeCacheState = (map, keys, accesses, updating, hits, misses) => ({\n map,\n keys,\n accesses,\n updating,\n hits,\n misses\n});\n/**\n * Constructs an initial cache state.\n *\n * @internal\n */\nexport const initialCacheState = () => makeCacheState(MutableHashMap.empty(), makeKeySet(), MutableQueue.unbounded(), MutableRef.make(false), 0, 0);\n/** @internal */\nconst CacheSymbolKey = \"effect/Cache\";\n/** @internal */\nexport const CacheTypeId = /*#__PURE__*/Symbol.for(CacheSymbolKey);\nconst cacheVariance = {\n /* c8 ignore next */\n _Key: _ => _,\n /* c8 ignore next */\n _Error: _ => _,\n /* c8 ignore next */\n _Value: _ => _\n};\n/** @internal */\nconst ConsumerCacheSymbolKey = \"effect/ConsumerCache\";\n/** @internal */\nexport const ConsumerCacheTypeId = /*#__PURE__*/Symbol.for(ConsumerCacheSymbolKey);\nconst consumerCacheVariance = {\n /* c8 ignore next */\n _Key: _ => _,\n /* c8 ignore next */\n _Error: _ => _,\n /* c8 ignore next */\n _Value: _ => _\n};\n/** @internal */\nexport const makeCacheStats = options => options;\n/** @internal */\nexport const makeEntryStats = loadedMillis => ({\n loadedMillis\n});\nclass CacheImpl {\n capacity;\n context;\n fiberId;\n lookup;\n timeToLive;\n [CacheTypeId] = cacheVariance;\n [ConsumerCacheTypeId] = consumerCacheVariance;\n cacheState;\n constructor(capacity, context, fiberId, lookup, timeToLive) {\n this.capacity = capacity;\n this.context = context;\n this.fiberId = fiberId;\n this.lookup = lookup;\n this.timeToLive = timeToLive;\n this.cacheState = initialCacheState();\n }\n get(key) {\n return core.map(this.getEither(key), Either.merge);\n }\n get cacheStats() {\n return core.sync(() => makeCacheStats({\n hits: this.cacheState.hits,\n misses: this.cacheState.misses,\n size: MutableHashMap.size(this.cacheState.map)\n }));\n }\n getOption(key) {\n return core.suspend(() => Option.match(MutableHashMap.get(this.cacheState.map, key), {\n onNone: () => {\n const mapKey = makeMapKey(key);\n this.trackAccess(mapKey);\n this.trackMiss();\n return core.succeed(Option.none());\n },\n onSome: value => this.resolveMapValue(value)\n }));\n }\n getOptionComplete(key) {\n return core.suspend(() => Option.match(MutableHashMap.get(this.cacheState.map, key), {\n onNone: () => {\n const mapKey = makeMapKey(key);\n this.trackAccess(mapKey);\n this.trackMiss();\n return core.succeed(Option.none());\n },\n onSome: value => this.resolveMapValue(value, true)\n }));\n }\n contains(key) {\n return core.sync(() => MutableHashMap.has(this.cacheState.map, key));\n }\n entryStats(key) {\n return core.sync(() => {\n const option = MutableHashMap.get(this.cacheState.map, key);\n if (Option.isSome(option)) {\n switch (option.value._tag) {\n case \"Complete\":\n {\n const loaded = option.value.entryStats.loadedMillis;\n return Option.some(makeEntryStats(loaded));\n }\n case \"Pending\":\n {\n return Option.none();\n }\n case \"Refreshing\":\n {\n const loaded = option.value.complete.entryStats.loadedMillis;\n return Option.some(makeEntryStats(loaded));\n }\n }\n }\n return Option.none();\n });\n }\n getEither(key) {\n return core.suspend(() => {\n const k = key;\n let mapKey = undefined;\n let deferred = undefined;\n let value = Option.getOrUndefined(MutableHashMap.get(this.cacheState.map, k));\n if (value === undefined) {\n deferred = Deferred.unsafeMake(this.fiberId);\n mapKey = makeMapKey(k);\n if (MutableHashMap.has(this.cacheState.map, k)) {\n value = Option.getOrUndefined(MutableHashMap.get(this.cacheState.map, k));\n } else {\n MutableHashMap.set(this.cacheState.map, k, pending(mapKey, deferred));\n }\n }\n if (value === undefined) {\n this.trackAccess(mapKey);\n this.trackMiss();\n return core.map(this.lookupValueOf(key, deferred), Either.right);\n } else {\n return core.flatMap(this.resolveMapValue(value), Option.match({\n onNone: () => this.getEither(key),\n onSome: value => core.succeed(Either.left(value))\n }));\n }\n });\n }\n invalidate(key) {\n return core.sync(() => {\n MutableHashMap.remove(this.cacheState.map, key);\n });\n }\n invalidateWhen(key, when) {\n return core.sync(() => {\n const value = MutableHashMap.get(this.cacheState.map, key);\n if (Option.isSome(value) && value.value._tag === \"Complete\") {\n if (value.value.exit._tag === \"Success\") {\n if (when(value.value.exit.value)) {\n MutableHashMap.remove(this.cacheState.map, key);\n }\n }\n }\n });\n }\n get invalidateAll() {\n return core.sync(() => {\n this.cacheState.map = MutableHashMap.empty();\n });\n }\n refresh(key) {\n return effect.clockWith(clock => core.suspend(() => {\n const k = key;\n const deferred = Deferred.unsafeMake(this.fiberId);\n let value = Option.getOrUndefined(MutableHashMap.get(this.cacheState.map, k));\n if (value === undefined) {\n if (MutableHashMap.has(this.cacheState.map, k)) {\n value = Option.getOrUndefined(MutableHashMap.get(this.cacheState.map, k));\n } else {\n MutableHashMap.set(this.cacheState.map, k, pending(makeMapKey(k), deferred));\n }\n }\n if (value === undefined) {\n return core.asVoid(this.lookupValueOf(key, deferred));\n } else {\n switch (value._tag) {\n case \"Complete\":\n {\n if (this.hasExpired(clock, value.timeToLiveMillis)) {\n const found = Option.getOrUndefined(MutableHashMap.get(this.cacheState.map, k));\n if (Equal.equals(found, value)) {\n MutableHashMap.remove(this.cacheState.map, k);\n }\n return core.asVoid(this.get(key));\n }\n // Only trigger the lookup if we're still the current value, `completedResult`\n return pipe(this.lookupValueOf(key, deferred), effect.when(() => {\n const current = Option.getOrUndefined(MutableHashMap.get(this.cacheState.map, k));\n if (Equal.equals(current, value)) {\n const mapValue = refreshing(deferred, value);\n MutableHashMap.set(this.cacheState.map, k, mapValue);\n return true;\n }\n return false;\n }), core.asVoid);\n }\n case \"Pending\":\n {\n return Deferred.await(value.deferred);\n }\n case \"Refreshing\":\n {\n return Deferred.await(value.deferred);\n }\n }\n }\n }));\n }\n set(key, value) {\n return effect.clockWith(clock => core.sync(() => {\n const now = clock.unsafeCurrentTimeMillis();\n const k = key;\n const lookupResult = Exit.succeed(value);\n const mapValue = complete(makeMapKey(k), lookupResult, makeEntryStats(now), now + Duration.toMillis(Duration.decode(this.timeToLive(lookupResult))));\n MutableHashMap.set(this.cacheState.map, k, mapValue);\n }));\n }\n get size() {\n return core.sync(() => {\n return MutableHashMap.size(this.cacheState.map);\n });\n }\n get values() {\n return core.sync(() => {\n const values = [];\n for (const entry of this.cacheState.map) {\n if (entry[1]._tag === \"Complete\" && entry[1].exit._tag === \"Success\") {\n values.push(entry[1].exit.value);\n }\n }\n return values;\n });\n }\n get entries() {\n return core.sync(() => {\n const values = [];\n for (const entry of this.cacheState.map) {\n if (entry[1]._tag === \"Complete\" && entry[1].exit._tag === \"Success\") {\n values.push([entry[0], entry[1].exit.value]);\n }\n }\n return values;\n });\n }\n get keys() {\n return core.sync(() => {\n const keys = [];\n for (const entry of this.cacheState.map) {\n if (entry[1]._tag === \"Complete\" && entry[1].exit._tag === \"Success\") {\n keys.push(entry[0]);\n }\n }\n return keys;\n });\n }\n resolveMapValue(value, ignorePending = false) {\n return effect.clockWith(clock => {\n switch (value._tag) {\n case \"Complete\":\n {\n this.trackAccess(value.key);\n if (this.hasExpired(clock, value.timeToLiveMillis)) {\n MutableHashMap.remove(this.cacheState.map, value.key.current);\n return core.succeed(Option.none());\n }\n this.trackHit();\n return core.map(value.exit, Option.some);\n }\n case \"Pending\":\n {\n this.trackAccess(value.key);\n this.trackHit();\n if (ignorePending) {\n return core.succeed(Option.none());\n }\n return core.map(Deferred.await(value.deferred), Option.some);\n }\n case \"Refreshing\":\n {\n this.trackAccess(value.complete.key);\n this.trackHit();\n if (this.hasExpired(clock, value.complete.timeToLiveMillis)) {\n if (ignorePending) {\n return core.succeed(Option.none());\n }\n return core.map(Deferred.await(value.deferred), Option.some);\n }\n return core.map(value.complete.exit, Option.some);\n }\n }\n });\n }\n trackHit() {\n this.cacheState.hits = this.cacheState.hits + 1;\n }\n trackMiss() {\n this.cacheState.misses = this.cacheState.misses + 1;\n }\n trackAccess(key) {\n MutableQueue.offer(this.cacheState.accesses, key);\n if (MutableRef.compareAndSet(this.cacheState.updating, false, true)) {\n let loop = true;\n while (loop) {\n const key = MutableQueue.poll(this.cacheState.accesses, MutableQueue.EmptyMutableQueue);\n if (key === MutableQueue.EmptyMutableQueue) {\n loop = false;\n } else {\n this.cacheState.keys.add(key);\n }\n }\n let size = MutableHashMap.size(this.cacheState.map);\n loop = size > this.capacity;\n while (loop) {\n const key = this.cacheState.keys.remove();\n if (key !== undefined) {\n if (MutableHashMap.has(this.cacheState.map, key.current)) {\n MutableHashMap.remove(this.cacheState.map, key.current);\n size = size - 1;\n loop = size > this.capacity;\n }\n } else {\n loop = false;\n }\n }\n MutableRef.set(this.cacheState.updating, false);\n }\n }\n hasExpired(clock, timeToLiveMillis) {\n return clock.unsafeCurrentTimeMillis() > timeToLiveMillis;\n }\n lookupValueOf(input, deferred) {\n return effect.clockWith(clock => core.suspend(() => {\n const key = input;\n return pipe(this.lookup(input), core.provideContext(this.context), core.exit, core.flatMap(exit => {\n const now = clock.unsafeCurrentTimeMillis();\n const stats = makeEntryStats(now);\n const value = complete(makeMapKey(key), exit, stats, now + Duration.toMillis(Duration.decode(this.timeToLive(exit))));\n MutableHashMap.set(this.cacheState.map, key, value);\n return core.zipRight(Deferred.done(deferred, exit), exit);\n }), core.onInterrupt(() => core.zipRight(Deferred.interrupt(deferred), core.sync(() => {\n MutableHashMap.remove(this.cacheState.map, key);\n }))));\n }));\n }\n}\n/** @internal */\nexport const make = options => {\n const timeToLive = Duration.decode(options.timeToLive);\n return makeWith({\n capacity: options.capacity,\n lookup: options.lookup,\n timeToLive: () => timeToLive\n });\n};\n/** @internal */\nexport const makeWith = options => core.map(fiberRuntime.all([core.context(), core.fiberId]), ([context, fiberId]) => new CacheImpl(options.capacity, context, fiberId, options.lookup, exit => Duration.decode(options.timeToLive(exit))));\n/** @internal */\nexport const unsafeMakeWith = (capacity, lookup, timeToLive) => new CacheImpl(capacity, Context.empty(), none, lookup, exit => Duration.decode(timeToLive(exit)));\n//# sourceMappingURL=cache.js.map","import * as internal from \"./internal/cache.js\";\n/**\n * @since 2.0.0\n * @category symbols\n */\nexport const CacheTypeId = internal.CacheTypeId;\n/**\n * @since 3.6.4\n * @category symbols\n */\nexport const ConsumerCacheTypeId = internal.ConsumerCacheTypeId;\n/**\n * Constructs a new cache with the specified capacity, time to live, and\n * lookup function.\n *\n * @since 2.0.0\n * @category constructors\n */\nexport const make = internal.make;\n/**\n * Constructs a new cache with the specified capacity, time to live, and\n * lookup function, where the time to live can depend on the `Exit` value\n * returned by the lookup function.\n *\n * @since 2.0.0\n * @category constructors\n */\nexport const makeWith = internal.makeWith;\n/**\n * Constructs a new `CacheStats` from the specified values.\n *\n * @since 2.0.0\n * @category constructors\n */\nexport const makeCacheStats = internal.makeCacheStats;\n/**\n * Constructs a new `EntryStats` from the specified values.\n *\n * @since 2.0.0\n * @category constructors\n */\nexport const makeEntryStats = internal.makeEntryStats;\n//# sourceMappingURL=Cache.js.map","import { Data, Effect } from 'effect';\n\nexport class FetchError extends Data.TaggedError('FetchError')<{ cause: unknown }> {}\nexport class NotFoundError extends Data.TaggedError('NotFoundError')<{ url: string }> {}\n\nexport const httpClient = (input: RequestInfo | URL, init?: RequestInit) =>\n Effect.gen(function* () {\n const response = yield* Effect.tryPromise({\n try: () => fetch(input, init),\n catch: error => new FetchError({ cause: error }),\n });\n\n if (response.status === 404) {\n return yield* new NotFoundError({ url: response.url });\n }\n\n return response;\n });\n\nexport class ResponseTextError extends Data.TaggedError('ResponseTextError')<Error> {\n constructor(error: Error) {\n super(new Error(`Failed to read response text`, { cause: error }));\n }\n}\n\nexport const responseAsText = (res: Response) =>\n Effect.tryPromise({\n try: () => res.text(),\n catch: error => new ResponseTextError(error as Error),\n });\n","import { Brand, Data, Effect } from 'effect';\n\nexport type SVGString = string & Brand.Brand<'SVG'>;\nexport const SVGString = Brand.refined<SVGString>(isValidSVG, () => Brand.error('SVG data is malformed'));\nexport class BrandValidationError extends Data.TaggedError('BrandValidationError')<Error> {\n constructor(error: Error, type: string) {\n super(new Error(`Brand validation failed for type ${type}.`, { cause: error }));\n }\n}\n\nexport const createValidSVGString = (svg: string) =>\n Effect.try({\n try: () => SVGString(svg),\n catch: error => new BrandValidationError(error as Error, 'SVGString'),\n });\n\nfunction isValidSVG(svg: string): boolean {\n if (typeof svg !== 'string') {\n return false;\n }\n try {\n const parser = new DOMParser();\n const doc = parser.parseFromString(svg, 'image/svg+xml');\n return doc.documentElement.nodeName === 'svg';\n } catch {\n return false;\n }\n}\n","import { Cache, Duration, Effect } from 'effect';\nimport { Icon } from '../..';\nimport { syncCreateAssetUrlSafely } from '../../utils/assets';\nimport type { UnwrapEffect } from '../../utils/effect';\nimport { httpClient, responseAsText } from '../../utils/http';\nimport { createValidSVGString, SVGString } from '../../utils/validation/svg';\n\nexport type IconData = SVGString;\nexport type IconCacheKey = `${Icon.IconName}`;\nexport const emptyDefaultSvg = () => SVGString(`<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"></svg>`);\n\n// Create a cache for icon data (concurrent-safe, TTL infinite)\nconst createIconCache = () =>\n Cache.make({\n capacity: 200,\n timeToLive: Duration.infinity,\n lookup: (key: IconCacheKey) =>\n Effect.gen(function* () {\n const name = key as Icon.IconName;\n const assetPath = yield* syncCreateAssetUrlSafely(`${name}.svg`, 'icons');\n const res = yield* httpClient(assetPath);\n const responseString = yield* responseAsText(res);\n return yield* createValidSVGString(responseString);\n }),\n });\n\nlet cacheInstance: UnwrapEffect<ReturnType<typeof createIconCache>>[0] | null = null;\n\n/**\n * Fetches an icon from the cache by name, falling back to an empty default SVG if not found.\n *\n * @param name - The name of the icon to fetch from the cache.\n * @returns An Effect that yields a valid SVG string (branded), always.\n *\n * @example\n * ```typescript\n * const iconEffect = fetchIcon('home');\n * ```\n */\nexport function fetchIconSvg(name: Icon.IconName) {\n const key: IconCacheKey = name;\n return Effect.gen(function* () {\n if (!cacheInstance) {\n cacheInstance = yield* createIconCache();\n }\n return yield* cacheInstance.get(key) satisfies Effect.Effect<SVGString, unknown, never>;\n });\n}\n\nexport function clearIconCache() {\n return Effect.gen(function* () {\n if (cacheInstance) {\n yield* cacheInstance.invalidateAll;\n } else {\n Effect.logWarning('Attempted to clear icon cache before it was initialized');\n }\n });\n}\n",":host {\n /**\n * @prop --lmvz-icon-color: The icon's color. This is inferred from the context (e.g. button) but can be overridden if needed, or when the icon is used standalone.\n */\n --lmvz-icon-color: var(--lmvz-component-color, var(--lmvz-semantic-color-on-surface-input-primary));\n\n display: inline-block;\n\n /* prevent additional whitespace */\n line-height: 0;\n\n svg {\n display: block;\n }\n\n svg > path {\n stroke: var(--lmvz-icon-color);\n fill: none;\n }\n}\n\n:host([size='xs']) {\n svg {\n width: var(--lmvz-component-icon-size-xs);\n height: var(--lmvz-component-icon-size-xs);\n }\n}\n:host([size='sm']) {\n svg {\n width: var(--lmvz-component-icon-size-sm);\n height: var(--lmvz-component-icon-size-sm);\n }\n}\n:host([size='md']) {\n svg {\n width: var(--lmvz-component-icon-size-md);\n height: var(--lmvz-component-icon-size-md);\n }\n}\n:host([size='lg']) {\n svg {\n width: var(--lmvz-component-icon-size-lg);\n height: var(--lmvz-component-icon-size-lg);\n }\n}\n:host([size='inherit']) {\n svg {\n width: inherit;\n height: inherit;\n }\n}\n\n:host([weight='light']) {\n svg > path {\n stroke-width: 1;\n }\n}\n:host([weight='medium']) {\n svg > path {\n /* TODO: use semantic token */\n stroke-width: 1.5;\n }\n}\n:host([weight='bold']) {\n svg > path {\n /* TODO: use semantic token */\n stroke-width: 2;\n }\n}\n:host([weight='filled']) {\n svg > path {\n stroke-width: 2;\n fill: var(--lmvz-icon-color);\n }\n}\n","import { Build, Component, Element, h, Host, Prop, State, Watch } from '@stencil/core';\nimport { Effect } from 'effect';\nimport { Icon } from '../../api';\nimport { ReactiveControllerHost } from '../../utils/reactive-controller-host';\nimport { AriaValidationController, type AriaValidationHost } from '../../utils/validation/aria-validation-controller';\nimport { emptyDefaultSvg, fetchIconSvg, IconData } from './icons';\n\n/**\n * `lmvz-icon` is a web component that lazy-loads and displays an SVG icon from our predefined icon set.\n * It uses an IntersectionObserver to defer loading the icon until it becomes visible in the viewport. Once loaded, icon data is cached across instances.\n */\n@Component({\n tag: 'lmvz-icon',\n styleUrl: 'lmvz-icon.css',\n scoped: true,\n assetsDirs: ['../../assets/icons'],\n})\nexport class LmvzIcon extends ReactiveControllerHost implements AriaValidationHost {\n private intersectionObserver: IntersectionObserver;\n\n @Element() el!: HTMLElement;\n\n /**\n * The name of the icon to display (required).\n */\n @Prop({ reflect: true }) icon!: Icon.IconName;\n\n /**\n * The weight/style of the icon (optional, default is 'medium').\n */\n @Prop({ reflect: true }) weight?: Icon.IconWeight = 'medium';\n\n /**\n * The size of the icon (optional, default is 'md').\n */\n @Prop({ reflect: true }) size?: Icon.Size = 'md';\n\n @State() private iconData: IconData;\n @State() private visible = false;\n\n @Prop({ reflect: true }) ariaLabel?: string;\n\n private get ariaHidden() {\n return !this.ariaLabel;\n }\n\n constructor() {\n super();\n this.addController(new AriaValidationController(this));\n }\n\n connectedCallback() {\n this.waitUntilVisible(() => {\n this.visible = true;\n this.loadIconPathData();\n });\n }\n\n disconnectedCallback() {\n if (this.intersectionObserver) {\n this.intersectionObserver.disconnect();\n this.intersectionObserver = null;\n }\n }\n\n @Watch('icon')\n private async loadIconPathData() {\n const { icon, visible } = this;\n\n if (!Build.isBrowser || !icon || !visible) {\n return;\n }\n this.iconData = await Effect.runPromise(\n fetchIconSvg(this.icon).pipe(\n Effect.tapError(error => Effect.logError(`Error loading icon \"${icon}\":`, error.message, error.cause, error.stack)),\n Effect.catchAll(() => Effect.succeed(emptyDefaultSvg())),\n ),\n );\n }\n\n render() {\n return <Host role=\"img\" aria-hidden={`${this.ariaHidden}`} innerHTML={this.iconData}></Host>;\n }\n\n private waitUntilVisible(callback: () => unknown, rootMargin = 50) {\n if (!Build.isBrowser || typeof window === 'undefined' || !window.IntersectionObserver) {\n callback();\n return;\n }\n\n this.intersectionObserver = new IntersectionObserver(\n entries => {\n entries.some(entry => {\n if (entry.isIntersecting) {\n this.intersectionObserver.disconnect();\n this.intersectionObserver = null;\n callback();\n return true;\n }\n return false;\n });\n },\n { rootMargin: `${rootMargin}px` },\n );\n\n this.intersectionObserver.observe(this.el);\n }\n}\n"],"mappings":"kpBA+BO,MAAMA,GAAyCC,OAAOC,IAAI,wBAO1D,MAAMC,GAAQ,CAACC,EAASC,IAAS,CAAC,CACvCD,UACAC,SASK,SAASC,MAAWC,GACzB,MA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