@devschile/chucao 1.6.0 → 1.8.0
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/README.md +15 -12
- package/dist/chucao/chucao.css +1 -1
- package/dist/chucao/chucao.esm.js +1 -1
- package/dist/chucao/chucao.esm.js.map +1 -1
- package/dist/chucao/index.esm.js +1 -1
- package/dist/chucao/index.esm.js.map +1 -1
- package/dist/chucao/{p-175aee94.entry.js → p-13ab5f9a.entry.js} +2 -2
- package/dist/chucao/{p-dde82d7d.entry.js → p-1cc7042e.entry.js} +2 -2
- package/dist/chucao/p-23c5220b.entry.js +2 -0
- package/dist/chucao/p-23c5220b.entry.js.map +1 -0
- package/dist/chucao/p-2d7e81b2.entry.js +2 -0
- package/dist/chucao/p-2d7e81b2.entry.js.map +1 -0
- package/dist/chucao/{p-af2c57b5.entry.js → p-421cda05.entry.js} +2 -2
- package/dist/chucao/p-Bvah_WQV.js +3 -0
- package/dist/chucao/p-Bvah_WQV.js.map +1 -0
- package/dist/chucao/{p-d75eeeea.entry.js → p-c16b18b7.entry.js} +2 -2
- package/dist/chucao/p-cbb2b478.entry.js +2 -0
- package/dist/chucao/p-cbb2b478.entry.js.map +1 -0
- package/dist/chucao/{p-fcc70c8d.entry.js → p-cfb6db53.entry.js} +2 -2
- package/dist/chucao/p-df73f786.entry.js +2 -0
- package/dist/chucao/{p-85a49fd7.entry.js → p-e8fe65bb.entry.js} +2 -2
- package/dist/cjs/ch-accordion.cjs.entry.js +1 -1
- package/dist/cjs/{ch-badge_6.cjs.entry.js → ch-alert_8.cjs.entry.js} +73 -9
- package/dist/cjs/ch-alert_8.cjs.entry.js.map +1 -0
- package/dist/cjs/ch-checkbox.cjs.entry.js +2 -2
- package/dist/cjs/ch-divider.cjs.entry.js +2 -2
- package/dist/cjs/ch-link.cjs.entry.js +1 -1
- package/dist/cjs/ch-modal.cjs.entry.js +167 -0
- package/dist/cjs/ch-modal.cjs.entry.js.map +1 -0
- package/dist/cjs/ch-radio.cjs.entry.js +2 -2
- package/dist/cjs/ch-tabs.cjs.entry.js +2 -2
- package/dist/cjs/ch-textarea.cjs.entry.js +2 -2
- package/dist/cjs/ch-tooltip.cjs.entry.js +82 -0
- package/dist/cjs/ch-tooltip.cjs.entry.js.map +1 -0
- package/dist/cjs/chucao.cjs.js +3 -3
- package/dist/cjs/chucao.cjs.js.map +1 -1
- package/dist/cjs/{index-CiYvuUBV.js → index-DMeDkSQU.js} +183 -11
- package/dist/cjs/index-DMeDkSQU.js.map +1 -0
- package/dist/cjs/index.cjs.js +12 -1
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +5 -1
- package/dist/collection/components/ch-alert/ch-alert.css +77 -0
- package/dist/collection/components/ch-alert/ch-alert.js +118 -0
- package/dist/collection/components/ch-alert/ch-alert.js.map +1 -0
- package/dist/collection/components/ch-badge/ch-badge.js +1 -1
- package/dist/collection/components/ch-button/ch-button.js +1 -1
- package/dist/collection/components/ch-button/ch-button.js.map +1 -1
- package/dist/collection/components/ch-card/ch-card.js +1 -1
- package/dist/collection/components/ch-checkbox/ch-checkbox.js +1 -1
- package/dist/collection/components/ch-divider/ch-divider.js +1 -1
- package/dist/collection/components/ch-input/ch-input.js +1 -1
- package/dist/collection/components/ch-modal/ch-modal.css +69 -0
- package/dist/collection/components/ch-modal/ch-modal.js +278 -0
- package/dist/collection/components/ch-modal/ch-modal.js.map +1 -0
- package/dist/collection/components/ch-radio/ch-radio.js +1 -1
- package/dist/collection/components/ch-select/ch-select.js +1 -1
- package/dist/collection/components/ch-spinner/ch-spinner.css +39 -0
- package/dist/collection/components/ch-spinner/ch-spinner.js +90 -0
- package/dist/collection/components/ch-spinner/ch-spinner.js.map +1 -0
- package/dist/collection/components/ch-switch/ch-switch.js +1 -1
- package/dist/collection/components/ch-tabs/ch-tabs.js +1 -1
- package/dist/collection/components/ch-textarea/ch-textarea.js +1 -1
- package/dist/collection/components/ch-tooltip/ch-tooltip.css +100 -0
- package/dist/collection/components/ch-tooltip/ch-tooltip.js +168 -0
- package/dist/collection/components/ch-tooltip/ch-tooltip.js.map +1 -0
- package/dist/collection/tokens/tokens.js +9 -1
- package/dist/collection/tokens/tokens.js.map +1 -1
- package/dist/collection/tokens/types.js.map +1 -1
- package/dist/components/ch-accordion.js +1 -1
- package/dist/components/ch-alert.d.ts +11 -0
- package/dist/components/ch-alert.js +2 -0
- package/dist/components/ch-alert.js.map +1 -0
- package/dist/components/ch-badge.js +1 -1
- package/dist/components/ch-button.js +1 -1
- package/dist/components/ch-button.js.map +1 -1
- package/dist/components/ch-card.js +1 -1
- package/dist/components/ch-card.js.map +1 -1
- package/dist/components/ch-checkbox.js +1 -1
- package/dist/components/ch-divider.js +1 -1
- package/dist/components/ch-input.js +1 -1
- package/dist/components/ch-link.js +1 -1
- package/dist/components/ch-modal.d.ts +11 -0
- package/dist/components/ch-modal.js +2 -0
- package/dist/components/ch-modal.js.map +1 -0
- package/dist/components/ch-radio.js +1 -1
- package/dist/components/ch-select.js +1 -1
- package/dist/components/ch-spinner.d.ts +11 -0
- package/dist/components/ch-spinner.js +2 -0
- package/dist/components/ch-spinner.js.map +1 -0
- package/dist/components/ch-switch.js +1 -1
- package/dist/components/ch-tabs.js +1 -1
- package/dist/components/ch-textarea.js +1 -1
- package/dist/components/ch-tooltip.d.ts +11 -0
- package/dist/components/ch-tooltip.js +2 -0
- package/dist/components/ch-tooltip.js.map +1 -0
- package/dist/components/index.js +1 -1
- package/dist/components/index.js.map +1 -1
- package/dist/components/p-hyy-cLgi.js +2 -0
- package/dist/components/p-hyy-cLgi.js.map +1 -0
- package/dist/esm/ch-accordion.entry.js +1 -1
- package/dist/esm/{ch-badge_6.entry.js → ch-alert_8.entry.js} +72 -10
- package/dist/esm/ch-alert_8.entry.js.map +1 -0
- package/dist/esm/ch-checkbox.entry.js +2 -2
- package/dist/esm/ch-divider.entry.js +2 -2
- package/dist/esm/ch-link.entry.js +1 -1
- package/dist/esm/ch-modal.entry.js +165 -0
- package/dist/esm/ch-modal.entry.js.map +1 -0
- package/dist/esm/ch-radio.entry.js +2 -2
- package/dist/esm/ch-tabs.entry.js +2 -2
- package/dist/esm/ch-textarea.entry.js +2 -2
- package/dist/esm/ch-tooltip.entry.js +80 -0
- package/dist/esm/ch-tooltip.entry.js.map +1 -0
- package/dist/esm/chucao.js +4 -4
- package/dist/esm/chucao.js.map +1 -1
- package/dist/esm/{index-ImsAHlk9.js → index-Bvah_WQV.js} +183 -12
- package/dist/esm/index-Bvah_WQV.js.map +1 -0
- package/dist/esm/index.js +10 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/types/components/ch-alert/ch-alert.d.ts +34 -0
- package/dist/types/components/ch-modal/ch-modal.d.ts +67 -0
- package/dist/types/components/ch-spinner/ch-spinner.d.ts +25 -0
- package/dist/types/components/ch-tooltip/ch-tooltip.d.ts +47 -0
- package/dist/types/components.d.ts +369 -0
- package/dist/types/stencil-public-runtime.d.ts +11 -0
- package/dist/types/tokens/tokens.d.ts +8 -0
- package/dist/types/tokens/types.d.ts +3 -3
- package/dist-react/components.d.ts +18 -1
- package/dist-react/components.js +39 -0
- package/dist-react/components.ts +55 -1
- package/dist-vue/index.d.ts +4 -0
- package/dist-vue/index.js +28 -0
- package/dist-vue/index.ts +36 -0
- package/hydrate/index.js +542 -19
- package/hydrate/index.mjs +542 -19
- package/package.json +6 -2
- package/dist/chucao/p-ImsAHlk9.js +0 -3
- package/dist/chucao/p-ImsAHlk9.js.map +0 -1
- package/dist/chucao/p-b4520f1c.entry.js +0 -2
- package/dist/chucao/p-b4520f1c.entry.js.map +0 -1
- package/dist/chucao/p-fe0c9320.entry.js +0 -2
- package/dist/cjs/ch-badge_6.cjs.entry.js.map +0 -1
- package/dist/cjs/index-CiYvuUBV.js.map +0 -1
- package/dist/components/p-x4aZoujY.js +0 -2
- package/dist/components/p-x4aZoujY.js.map +0 -1
- package/dist/esm/ch-badge_6.entry.js.map +0 -1
- package/dist/esm/index-ImsAHlk9.js.map +0 -1
- /package/dist/chucao/{p-175aee94.entry.js.map → p-13ab5f9a.entry.js.map} +0 -0
- /package/dist/chucao/{p-dde82d7d.entry.js.map → p-1cc7042e.entry.js.map} +0 -0
- /package/dist/chucao/{p-af2c57b5.entry.js.map → p-421cda05.entry.js.map} +0 -0
- /package/dist/chucao/{p-d75eeeea.entry.js.map → p-c16b18b7.entry.js.map} +0 -0
- /package/dist/chucao/{p-fcc70c8d.entry.js.map → p-cfb6db53.entry.js.map} +0 -0
- /package/dist/chucao/{p-fe0c9320.entry.js.map → p-df73f786.entry.js.map} +0 -0
- /package/dist/chucao/{p-85a49fd7.entry.js.map → p-e8fe65bb.entry.js.map} +0 -0
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { r as registerInstance, a as getElement, h, H as Host } from './index-Bvah_WQV.js';
|
|
2
|
+
|
|
3
|
+
const chTooltipCss = () => `:host{display:inline-block}.anchor{position:relative;display:inline-flex}.bubble{position:absolute;z-index:var(--z-index-dropdown);width:max-content;max-width:16rem;padding:var(--spacing-md) var(--spacing-2xl);border:var(--border-width) solid var(--border);border-radius:var(--radius-sm);background:var(--color-background-base);color:var(--text);font-family:var(--font-body);font-size:var(--typography-size-sm);line-height:1.4;opacity:0;visibility:hidden;transition:opacity var(--duration-fast) var(--easing-default), visibility var(--duration-fast) var(--easing-default)}.bubble--visible{opacity:1;visibility:visible}.bubble::before{content:'';position:absolute}.bubble--top{bottom:100%;left:50%;transform:translateX(-50%);margin-bottom:var(--spacing-md)}.bubble--top::before{top:100%;left:0;right:0;height:var(--spacing-md)}.bubble--bottom{top:100%;left:50%;transform:translateX(-50%);margin-top:var(--spacing-md)}.bubble--bottom::before{bottom:100%;left:0;right:0;height:var(--spacing-md)}.bubble--left{right:100%;top:50%;transform:translateY(-50%);margin-right:var(--spacing-md)}.bubble--left::before{left:100%;top:0;bottom:0;width:var(--spacing-md)}.bubble--right{left:100%;top:50%;transform:translateY(-50%);margin-left:var(--spacing-md)}.bubble--right::before{right:100%;top:0;bottom:0;width:var(--spacing-md)}@media (prefers-reduced-motion: reduce){.bubble{transition:none}}`;
|
|
4
|
+
|
|
5
|
+
let tooltipIds = 0;
|
|
6
|
+
const ChTooltip = class {
|
|
7
|
+
constructor(hostRef) {
|
|
8
|
+
registerInstance(this, hostRef);
|
|
9
|
+
}
|
|
10
|
+
get el() { return getElement(this); }
|
|
11
|
+
fallbackId = `ch-tooltip-${++tooltipIds}`;
|
|
12
|
+
/**
|
|
13
|
+
* Which side of the trigger the bubble is placed on.
|
|
14
|
+
*/
|
|
15
|
+
placement = 'top';
|
|
16
|
+
// Hover and focus are tracked apart so that neither cancels the other: a
|
|
17
|
+
// pointer passing over and away must not hide a tooltip whose trigger still
|
|
18
|
+
// holds keyboard focus.
|
|
19
|
+
hovered = false;
|
|
20
|
+
focused = false;
|
|
21
|
+
dismissed = false;
|
|
22
|
+
get visible() {
|
|
23
|
+
return (this.hovered || this.focused) && !this.dismissed;
|
|
24
|
+
}
|
|
25
|
+
componentDidLoad() {
|
|
26
|
+
this.associate();
|
|
27
|
+
}
|
|
28
|
+
handleMouseEnter() {
|
|
29
|
+
this.hovered = true;
|
|
30
|
+
this.dismissed = false;
|
|
31
|
+
}
|
|
32
|
+
handleMouseLeave() {
|
|
33
|
+
this.hovered = false;
|
|
34
|
+
}
|
|
35
|
+
handleFocusIn() {
|
|
36
|
+
this.focused = true;
|
|
37
|
+
this.dismissed = false;
|
|
38
|
+
}
|
|
39
|
+
handleFocusOut() {
|
|
40
|
+
this.focused = false;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Listens on the document because a tooltip opened by hovering leaves focus
|
|
44
|
+
* wherever it was, so a host-scoped handler would never see the key.
|
|
45
|
+
*/
|
|
46
|
+
handleKeyDown(event) {
|
|
47
|
+
if (event.key === 'Escape' && this.visible) {
|
|
48
|
+
this.dismissed = true;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
slotted(name) {
|
|
52
|
+
return Array.from(this.el.children).find(child => child.getAttribute('slot') === name);
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Points the trigger at the text with `aria-describedby`. Re-run on
|
|
56
|
+
* `slotchange` because a framework re-render can replace the slotted nodes
|
|
57
|
+
* and take the attributes with them.
|
|
58
|
+
*/
|
|
59
|
+
associate = () => {
|
|
60
|
+
const trigger = this.slotted('trigger');
|
|
61
|
+
const content = this.slotted('content');
|
|
62
|
+
if (!trigger || !content) {
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
if (!content.id) {
|
|
66
|
+
content.id = this.fallbackId;
|
|
67
|
+
}
|
|
68
|
+
content.setAttribute('role', 'tooltip');
|
|
69
|
+
trigger.setAttribute('aria-describedby', content.id);
|
|
70
|
+
};
|
|
71
|
+
render() {
|
|
72
|
+
return (h(Host, { key: '654d4a12f84c94e014691e911e7c63c6c45b8755' }, h("span", { key: '726269e02fedc37efc39f1561d8b9baf83d6a4cc', class: "anchor" }, h("slot", { key: '876cb19249032d6d1c66f22bd2c255683b6a7f66', name: "trigger", onSlotchange: this.associate }), h("span", { key: '7436eb75b40b33d0b6c8ce194245d4a08a29facb', class: { 'bubble': true, [`bubble--${this.placement}`]: true, 'bubble--visible': this.visible } }, h("slot", { key: '24648cc6078d61803793df011058da9515b466b5', name: "content", onSlotchange: this.associate })))));
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
ChTooltip.style = chTooltipCss();
|
|
76
|
+
|
|
77
|
+
export { ChTooltip as ch_tooltip };
|
|
78
|
+
//# sourceMappingURL=ch-tooltip.entry.js.map
|
|
79
|
+
|
|
80
|
+
//# sourceMappingURL=ch-tooltip.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ch-tooltip.entry.js","sources":["src/components/ch-tooltip/ch-tooltip.css?tag=ch-tooltip&encapsulation=shadow","src/components/ch-tooltip/ch-tooltip.tsx"],"sourcesContent":[":host {\n display: inline-block;\n}\n\n.anchor {\n position: relative;\n display: inline-flex;\n}\n\n.bubble {\n position: absolute;\n z-index: var(--z-index-dropdown);\n width: max-content;\n max-width: 16rem;\n padding: var(--spacing-md) var(--spacing-2xl);\n border: var(--border-width) solid var(--border);\n border-radius: var(--radius-sm);\n background: var(--color-background-base);\n color: var(--text);\n font-family: var(--font-body);\n font-size: var(--typography-size-sm);\n line-height: 1.4;\n opacity: 0;\n visibility: hidden;\n transition:\n opacity var(--duration-fast) var(--easing-default),\n visibility var(--duration-fast) var(--easing-default);\n}\n\n.bubble--visible {\n opacity: 1;\n visibility: visible;\n}\n\n.bubble::before {\n content: '';\n position: absolute;\n}\n\n.bubble--top {\n bottom: 100%;\n left: 50%;\n transform: translateX(-50%);\n margin-bottom: var(--spacing-md);\n}\n\n.bubble--top::before {\n top: 100%;\n left: 0;\n right: 0;\n height: var(--spacing-md);\n}\n\n.bubble--bottom {\n top: 100%;\n left: 50%;\n transform: translateX(-50%);\n margin-top: var(--spacing-md);\n}\n\n.bubble--bottom::before {\n bottom: 100%;\n left: 0;\n right: 0;\n height: var(--spacing-md);\n}\n\n.bubble--left {\n right: 100%;\n top: 50%;\n transform: translateY(-50%);\n margin-right: var(--spacing-md);\n}\n\n.bubble--left::before {\n left: 100%;\n top: 0;\n bottom: 0;\n width: var(--spacing-md);\n}\n\n.bubble--right {\n left: 100%;\n top: 50%;\n transform: translateY(-50%);\n margin-left: var(--spacing-md);\n}\n\n.bubble--right::before {\n right: 100%;\n top: 0;\n bottom: 0;\n width: var(--spacing-md);\n}\n\n@media (prefers-reduced-motion: reduce) {\n .bubble {\n transition: none;\n }\n}\n","import { Component, Element, Host, Listen, Prop, State, h } from '@stencil/core';\n\nexport type ChTooltipPlacement = 'top' | 'bottom' | 'left' | 'right';\n\nlet tooltipIds = 0;\n\n/**\n * Short help text shown on hover and on focus.\n *\n * Both the trigger and the text come from the consumer's light DOM through\n * named slots. That is what makes the accessible association work: an\n * `aria-describedby` IDREF only resolves within a single tree, and slotted\n * nodes stay in the document tree even though they render inside the shadow\n * root. Keeping the text in the shadow root instead would need a reference\n * pointing into a shadow tree, which the platform does not allow — element\n * reflection only points outwards, and `referenceTarget` is not available yet.\n *\n * The trigger has to be a natively focusable element (`<button>`, `<a>`,\n * `<input>`). A chucao component such as `ch-button` will not be described,\n * because `aria-*` set on a custom element host does not reach the native\n * element inside it — see the discussion in issue #47.\n */\n@Component({\n tag: 'ch-tooltip',\n styleUrl: 'ch-tooltip.css',\n shadow: true,\n})\nexport class ChTooltip {\n @Element() private el: HTMLElement;\n\n private readonly fallbackId = `ch-tooltip-${++tooltipIds}`;\n\n /**\n * Which side of the trigger the bubble is placed on.\n */\n @Prop() placement: ChTooltipPlacement = 'top';\n\n // Hover and focus are tracked apart so that neither cancels the other: a\n // pointer passing over and away must not hide a tooltip whose trigger still\n // holds keyboard focus.\n @State() hovered = false;\n @State() focused = false;\n @State() dismissed = false;\n\n private get visible() {\n return (this.hovered || this.focused) && !this.dismissed;\n }\n\n componentDidLoad() {\n this.associate();\n }\n\n @Listen('mouseenter')\n handleMouseEnter() {\n this.hovered = true;\n this.dismissed = false;\n }\n\n @Listen('mouseleave')\n handleMouseLeave() {\n this.hovered = false;\n }\n\n @Listen('focusin')\n handleFocusIn() {\n this.focused = true;\n this.dismissed = false;\n }\n\n @Listen('focusout')\n handleFocusOut() {\n this.focused = false;\n }\n\n /**\n * Listens on the document because a tooltip opened by hovering leaves focus\n * wherever it was, so a host-scoped handler would never see the key.\n */\n @Listen('keydown', { target: 'document' })\n handleKeyDown(event: KeyboardEvent) {\n if (event.key === 'Escape' && this.visible) {\n this.dismissed = true;\n }\n }\n\n private slotted(name: string) {\n return Array.from(this.el.children).find(child => child.getAttribute('slot') === name);\n }\n\n /**\n * Points the trigger at the text with `aria-describedby`. Re-run on\n * `slotchange` because a framework re-render can replace the slotted nodes\n * and take the attributes with them.\n */\n private associate = () => {\n const trigger = this.slotted('trigger');\n const content = this.slotted('content');\n if (!trigger || !content) {\n return;\n }\n if (!content.id) {\n content.id = this.fallbackId;\n }\n content.setAttribute('role', 'tooltip');\n trigger.setAttribute('aria-describedby', content.id);\n };\n\n render() {\n return (\n <Host>\n <span class=\"anchor\">\n <slot name=\"trigger\" onSlotchange={this.associate}></slot>\n <span class={{ 'bubble': true, [`bubble--${this.placement}`]: true, 'bubble--visible': this.visible }}>\n <slot name=\"content\" onSlotchange={this.associate}></slot>\n </span>\n </span>\n </Host>\n );\n }\n}\n"],"names":[],"mappings":";;AAAA,MAAM,YAAY,GAAG,MAAM,CAAC,02CAA02C,CAAC;;ACIv4C,IAAI,UAAU,GAAG,CAAC;MAuBL,SAAS,GAAA,MAAA;;;;;AAGH,IAAA,UAAU,GAAG,CAAA,WAAA,EAAc,EAAE,UAAU,EAAE;AAE1D;;AAEG;IACK,SAAS,GAAuB,KAAK;;;;IAKpC,OAAO,GAAG,KAAK;IACf,OAAO,GAAG,KAAK;IACf,SAAS,GAAG,KAAK;AAE1B,IAAA,IAAY,OAAO,GAAA;AACjB,QAAA,OAAO,CAAC,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,OAAO,KAAK,CAAC,IAAI,CAAC,SAAS;;IAG1D,gBAAgB,GAAA;QACd,IAAI,CAAC,SAAS,EAAE;;IAIlB,gBAAgB,GAAA;AACd,QAAA,IAAI,CAAC,OAAO,GAAG,IAAI;AACnB,QAAA,IAAI,CAAC,SAAS,GAAG,KAAK;;IAIxB,gBAAgB,GAAA;AACd,QAAA,IAAI,CAAC,OAAO,GAAG,KAAK;;IAItB,aAAa,GAAA;AACX,QAAA,IAAI,CAAC,OAAO,GAAG,IAAI;AACnB,QAAA,IAAI,CAAC,SAAS,GAAG,KAAK;;IAIxB,cAAc,GAAA;AACZ,QAAA,IAAI,CAAC,OAAO,GAAG,KAAK;;AAGtB;;;AAGG;AAEH,IAAA,aAAa,CAAC,KAAoB,EAAA;QAChC,IAAI,KAAK,CAAC,GAAG,KAAK,QAAQ,IAAI,IAAI,CAAC,OAAO,EAAE;AAC1C,YAAA,IAAI,CAAC,SAAS,GAAG,IAAI;;;AAIjB,IAAA,OAAO,CAAC,IAAY,EAAA;QAC1B,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,KAAK,IAAI,KAAK,CAAC,YAAY,CAAC,MAAM,CAAC,KAAK,IAAI,CAAC;;AAGxF;;;;AAIG;IACK,SAAS,GAAG,MAAK;QACvB,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC;QACvC,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC;AACvC,QAAA,IAAI,CAAC,OAAO,IAAI,CAAC,OAAO,EAAE;YACxB;;AAEF,QAAA,IAAI,CAAC,OAAO,CAAC,EAAE,EAAE;AACf,YAAA,OAAO,CAAC,EAAE,GAAG,IAAI,CAAC,UAAU;;AAE9B,QAAA,OAAO,CAAC,YAAY,CAAC,MAAM,EAAE,SAAS,CAAC;QACvC,OAAO,CAAC,YAAY,CAAC,kBAAkB,EAAE,OAAO,CAAC,EAAE,CAAC;AACtD,KAAC;IAED,MAAM,GAAA;QACJ,QACE,EAAC,IAAI,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,EACH,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,KAAK,EAAC,QAAQ,EAAA,EAClB,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,IAAI,EAAC,SAAS,EAAC,YAAY,EAAE,IAAI,CAAC,SAAS,EAAA,CAAS,EAC1D,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,KAAK,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAA,QAAA,EAAW,IAAI,CAAC,SAAS,CAAA,CAAE,GAAG,IAAI,EAAE,iBAAiB,EAAE,IAAI,CAAC,OAAO,EAAE,EAAA,EACnG,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,IAAI,EAAC,SAAS,EAAC,YAAY,EAAE,IAAI,CAAC,SAAS,EAAA,CAAS,CACrD,CACF,CACF;;;;;;;"}
|
package/dist/esm/chucao.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { p as promiseResolve, g as globalScripts, b as bootstrapLazy } from './index-
|
|
2
|
-
export { s as setNonce } from './index-
|
|
1
|
+
import { p as promiseResolve, g as globalScripts, b as bootstrapLazy } from './index-Bvah_WQV.js';
|
|
2
|
+
export { s as setNonce } from './index-Bvah_WQV.js';
|
|
3
3
|
|
|
4
4
|
/*
|
|
5
|
-
Stencil Client Patch Browser v4.
|
|
5
|
+
Stencil Client Patch Browser v4.44.0 | MIT Licensed | https://stenciljs.com
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
var patchBrowser = () => {
|
|
@@ -16,7 +16,7 @@ var patchBrowser = () => {
|
|
|
16
16
|
|
|
17
17
|
patchBrowser().then(async (options) => {
|
|
18
18
|
await globalScripts();
|
|
19
|
-
return bootstrapLazy([["ch-
|
|
19
|
+
return bootstrapLazy([["ch-alert_8",[[769,"ch-alert",{"variant":[1],"dismissLabel":[1,"dismiss-label"]}],[769,"ch-badge",{"variant":[1]}],[769,"ch-button",{"variant":[1],"disabled":[4],"label":[1]}],[257,"ch-card"],[513,"ch-input",{"label":[1],"type":[1],"value":[1025],"placeholder":[1],"name":[1],"disabled":[4],"required":[4],"hint":[1],"errorMessage":[1,"error-message"],"invalid":[4]}],[513,"ch-select",{"label":[1],"options":[16],"value":[1025],"placeholder":[1],"name":[1],"disabled":[4],"required":[4],"hint":[1],"errorMessage":[1,"error-message"],"invalid":[4]}],[513,"ch-spinner",{"size":[1],"label":[1]}],[513,"ch-switch",{"label":[1],"name":[1],"value":[1],"checked":[1028],"disabled":[4],"required":[4],"hint":[1],"errorMessage":[1,"error-message"],"invalid":[4]}]]],["ch-accordion",[[769,"ch-accordion",{"items":[16],"value":[1025]}]]],["ch-checkbox",[[513,"ch-checkbox",{"label":[1],"name":[1],"value":[1],"checked":[1028],"disabled":[4],"required":[4],"hint":[1],"errorMessage":[1,"error-message"],"invalid":[4]}]]],["ch-divider",[[513,"ch-divider",{"orientation":[1]}]]],["ch-link",[[769,"ch-link",{"href":[1],"target":[1],"variant":[1],"disabled":[4]}]]],["ch-modal",[[769,"ch-modal",{"open":[1028],"label":[1],"closeLabel":[1,"close-label"]},null,{"open":[{"handleOpenChange":0}]}]]],["ch-radio",[[513,"ch-radio",{"label":[1],"options":[16],"value":[1025],"name":[1],"disabled":[4],"required":[4],"hint":[1],"errorMessage":[1,"error-message"],"invalid":[4]}]]],["ch-tabs",[[769,"ch-tabs",{"tabs":[16],"value":[1025],"label":[1]}]]],["ch-textarea",[[513,"ch-textarea",{"label":[1],"value":[1025],"placeholder":[1],"rows":[2],"name":[1],"disabled":[4],"required":[4],"hint":[1],"errorMessage":[1,"error-message"],"invalid":[4]}]]],["ch-tooltip",[[769,"ch-tooltip",{"placement":[1],"hovered":[32],"focused":[32],"dismissed":[32]},[[1,"mouseenter","handleMouseEnter"],[1,"mouseleave","handleMouseLeave"],[0,"focusin","handleFocusIn"],[0,"focusout","handleFocusOut"],[4,"keydown","handleKeyDown"]]]]]], options);
|
|
20
20
|
});
|
|
21
21
|
//# sourceMappingURL=chucao.js.map
|
|
22
22
|
|
package/dist/esm/chucao.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chucao.js","sources":["node_modules/.pnpm/@stencil+core@4.
|
|
1
|
+
{"version":3,"file":"chucao.js","sources":["node_modules/.pnpm/@stencil+core@4.44.0/node_modules/@stencil/core/internal/client/patch-browser.js","@lazy-browser-entrypoint?app-data=conditional"],"sourcesContent":["/*\n Stencil Client Patch Browser v4.44.0 | MIT Licensed | https://stenciljs.com\n */\n\n// src/client/client-patch-browser.ts\nimport { BUILD, NAMESPACE } from \"@stencil/core/internal/app-data\";\nimport { consoleDevInfo, H, promiseResolve, win } from \"@stencil/core\";\nvar patchBrowser = () => {\n if (BUILD.isDev && !BUILD.isTesting) {\n consoleDevInfo(\"Running in development mode.\");\n }\n if (BUILD.cloneNodeFix) {\n patchCloneNodeFix(H.prototype);\n }\n const scriptElm = BUILD.scriptDataOpts ? win.document && Array.from(win.document.querySelectorAll(\"script\")).find(\n (s) => new RegExp(`/${NAMESPACE}(\\\\.esm)?\\\\.js($|\\\\?|#)`).test(s.src) || s.getAttribute(\"data-stencil-namespace\") === NAMESPACE\n ) : null;\n const importMeta = import.meta.url;\n const opts = BUILD.scriptDataOpts ? (scriptElm || {})[\"data-opts\"] || {} : {};\n if (importMeta !== \"\") {\n opts.resourcesUrl = new URL(\".\", importMeta).href;\n }\n return promiseResolve(opts);\n};\nvar patchCloneNodeFix = (HTMLElementPrototype) => {\n const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;\n HTMLElementPrototype.cloneNode = function(deep) {\n if (this.nodeName === \"TEMPLATE\") {\n return nativeCloneNodeFn.call(this, deep);\n }\n const clonedNode = nativeCloneNodeFn.call(this, false);\n const srcChildNodes = this.childNodes;\n if (deep) {\n for (let i = 0; i < srcChildNodes.length; i++) {\n if (srcChildNodes[i].nodeType !== 2) {\n clonedNode.appendChild(srcChildNodes[i].cloneNode(true));\n }\n }\n }\n return clonedNode;\n };\n};\nexport {\n patchBrowser\n};\n","export { setNonce } from '@stencil/core';\nimport { bootstrapLazy } from '@stencil/core';\nimport { patchBrowser } from '@stencil/core/internal/client/patch-browser';\nimport { globalScripts } from '@stencil/core/internal/app-globals';\npatchBrowser().then(async (options) => {\n await globalScripts();\n return bootstrapLazy([/*!__STENCIL_LAZY_DATA__*/], options);\n});\n"],"names":[],"mappings":";;;AAAA;AACA;AACA;;AAKA,IAAI,YAAY,GAAG,MAAM;AAUzB,EAAE,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG;AACpC,EAAE,MAAM,IAAI,GAAiE,EAAE;AAC/E,EAAE,IAAI,UAAU,KAAK,EAAE,EAAE;AACzB,IAAI,IAAI,CAAC,YAAY,GAAG,IAAI,GAAG,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC,IAAI;AACrD;AACA,EAAE,OAAO,cAAc,CAAC,IAAI,CAAC;AAC7B,CAAC;;ACnBD,YAAY,EAAE,CAAC,IAAI,CAAC,OAAO,OAAO,KAAK;AACvC,EAAE,MAAM,aAAa,EAAE;AACvB,EAAE,OAAO,aAAa,CAAC,4BAA4B,EAAE,OAAO,CAAC;AAC7D,CAAC,CAAC","x_google_ignoreList":[0]}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
const NAMESPACE = 'chucao';
|
|
2
|
-
const BUILD = /* chucao */ { hotModuleReplacement: false, lazyLoad: true,
|
|
2
|
+
const BUILD = /* chucao */ { hotModuleReplacement: false, lazyLoad: true, propChangeCallback: true, state: true, updatable: true};
|
|
3
3
|
|
|
4
4
|
const globalScripts = () => {};
|
|
5
|
-
const globalStyles = ":root{--color-background-base:#100a1c;--color-background-top-glow:#201e40;--color-background-bottom-glow:#261226;--color-surface-default:rgba(32, 30, 64, 0.6);--color-surface-hover:rgba(45, 212, 191, 0.08);--color-border-default:rgba(255, 255, 255, 0.08);--color-border-hover:rgba(45, 212, 191, 0.3);--color-accent-default:#2dd4bf;--color-accent-hover:#5ee8d4;--color-accent-text:#06210f;--color-status-positive:#4ade80;--color-status-positive-background:rgba(34, 197, 94, 0.18);--color-status-warning:#f87171;--color-status-warning-background:rgba(248, 113, 113, 0.15);--color-text-primary:#ffffff;--color-text-secondary:rgba(255, 255, 255, 0.55);--color-brand-huemul-dark:#85422b;--color-brand-huemul-light:#b45b38;--color-brand-stroke:#1d1d1b;--typography-body:Fira Sans, Droid Sans, Helvetica Neue, sans-serif;--typography-heading:Inconsolata, monospace;--typography-size-xs:0.68rem;--typography-size-sm:0.85rem;--typography-size-md:1rem;--typography-size-lg:1.25rem;--typography-size-xl:1.5rem;--typography-weight-regular:400;--typography-weight-semibold:600;--typography-weight-bold:700;--typography-tracking-badge:0.03em;--spacing-2xs:0.18rem;--spacing-xs:0.25rem;--spacing-sm:0.35rem;--spacing-md:0.5rem;--spacing-lg:0.6rem;--spacing-xl:0.8rem;--spacing-2xl:1rem;--spacing-3xl:1.25rem;--spacing-4xl:1.35rem;--spacing-5xl:1.5rem;--spacing-6xl:2rem;--spacing-shift:2px;--spacing-elevate:1px;--radius-sm:6px;--radius-md:8px;--radius-pill:999px;--border-width:1px;--border-accent-bar:3px;--shadow-focus-ring:0 0 0 3px rgba(45, 212, 191, 0.12);--shadow-card-hover:0 4px 20px rgba(45, 212, 191, 0.06);--effect-blur:10px;--duration-fast:150ms;--duration-normal:200ms;--easing-default:ease;--focus-outline-width:2px;--focus-outline-offset:2px;--opacity-disabled:0.5;--z-index-base:0;--z-index-dropdown:100;--z-index-modal:1000;--layout-max-width:68rem}@font-face{font-family:'Fira Sans';font-style:normal;font-weight:400;font-display:swap;src:url('https://static.devschile.cl/chucao/fonts/fira-sans-latin-400-normal.woff2') format('woff2')}@font-face{font-family:'Fira Sans';font-style:normal;font-weight:600;font-display:swap;src:url('https://static.devschile.cl/chucao/fonts/fira-sans-latin-600-normal.woff2') format('woff2')}@font-face{font-family:'Fira Sans';font-style:normal;font-weight:700;font-display:swap;src:url('https://static.devschile.cl/chucao/fonts/fira-sans-latin-700-normal.woff2') format('woff2')}@font-face{font-family:'Inconsolata';font-style:normal;font-weight:400;font-display:swap;src:url('https://static.devschile.cl/chucao/fonts/inconsolata-latin-400-normal.woff2') format('woff2')}:root{--bg:var(--color-background-base);--bg-gradient:radial-gradient(50% 30% ellipse at center top, var(--color-background-top-glow) 0%, rgba(0, 0, 0, 0) 100%),\n radial-gradient(60% 50% ellipse at center bottom, var(--color-background-bottom-glow) 0%, var(--color-background-base) 100%);--surface:var(--color-surface-default);--surface-hover:var(--color-surface-hover);--border:var(--color-border-default);--border-hover:var(--color-border-hover);--text:var(--color-text-primary);--text-muted:var(--color-text-secondary);--accent:var(--color-accent-default);--accent-hover:var(--color-accent-hover);--font-body:var(--typography-body);--font-heading:var(--typography-heading);--radius:var(--radius-sm)}body{font-family:var(--font-body)}.ch-container{width:100%;max-width:var(--layout-max-width);margin-inline:auto}.ch-visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0}.ch-flex{display:flex}.ch-flex-col{display:flex;flex-direction:column}.ch-items-center{align-items:center}.ch-justify-center{justify-content:center}.ch-justify-between{justify-content:space-between}.ch-gap-sm{gap:var(--spacing-md)}.ch-gap-md{gap:var(--spacing-2xl)}.ch-text-center{text-align:center}.ch-text-primary{color:var(--text)}.ch-text-muted{color:var(--text-muted)}.ch-text-accent{color:var(--accent)}.ch-heading{font-family:var(--font-heading)}";
|
|
5
|
+
const globalStyles = ":root{--color-background-base:#100a1c;--color-background-top-glow:#201e40;--color-background-bottom-glow:#261226;--color-surface-default:rgba(32, 30, 64, 0.6);--color-surface-hover:rgba(45, 212, 191, 0.08);--color-scrim-default:rgba(0, 0, 0, 0.6);--color-border-default:rgba(255, 255, 255, 0.08);--color-border-hover:rgba(45, 212, 191, 0.3);--color-accent-default:#2dd4bf;--color-accent-hover:#5ee8d4;--color-accent-text:#06210f;--color-status-positive:#4ade80;--color-status-positive-background:rgba(34, 197, 94, 0.18);--color-status-warning:#f87171;--color-status-warning-background:rgba(248, 113, 113, 0.15);--color-text-primary:#ffffff;--color-text-secondary:rgba(255, 255, 255, 0.55);--color-brand-huemul-dark:#85422b;--color-brand-huemul-light:#b45b38;--color-brand-stroke:#1d1d1b;--typography-body:Fira Sans, Droid Sans, Helvetica Neue, sans-serif;--typography-heading:Inconsolata, monospace;--typography-size-xs:0.68rem;--typography-size-sm:0.85rem;--typography-size-md:1rem;--typography-size-lg:1.25rem;--typography-size-xl:1.5rem;--typography-weight-regular:400;--typography-weight-semibold:600;--typography-weight-bold:700;--typography-tracking-badge:0.03em;--spacing-2xs:0.18rem;--spacing-xs:0.25rem;--spacing-sm:0.35rem;--spacing-md:0.5rem;--spacing-lg:0.6rem;--spacing-xl:0.8rem;--spacing-2xl:1rem;--spacing-3xl:1.25rem;--spacing-4xl:1.35rem;--spacing-5xl:1.5rem;--spacing-6xl:2rem;--spacing-shift:2px;--spacing-elevate:1px;--radius-sm:6px;--radius-md:8px;--radius-pill:999px;--border-width:1px;--border-accent-bar:3px;--shadow-focus-ring:0 0 0 3px rgba(45, 212, 191, 0.12);--shadow-card-hover:0 4px 20px rgba(45, 212, 191, 0.06);--effect-blur:10px;--duration-fast:150ms;--duration-normal:200ms;--duration-spin:800ms;--easing-default:ease;--easing-linear:linear;--focus-outline-width:2px;--focus-outline-offset:2px;--opacity-disabled:0.5;--z-index-base:0;--z-index-dropdown:100;--z-index-modal:1000;--layout-max-width:68rem}@font-face{font-family:'Fira Sans';font-style:normal;font-weight:400;font-display:swap;src:url('https://static.devschile.cl/chucao/fonts/fira-sans-latin-400-normal.woff2') format('woff2')}@font-face{font-family:'Fira Sans';font-style:normal;font-weight:600;font-display:swap;src:url('https://static.devschile.cl/chucao/fonts/fira-sans-latin-600-normal.woff2') format('woff2')}@font-face{font-family:'Fira Sans';font-style:normal;font-weight:700;font-display:swap;src:url('https://static.devschile.cl/chucao/fonts/fira-sans-latin-700-normal.woff2') format('woff2')}@font-face{font-family:'Inconsolata';font-style:normal;font-weight:400;font-display:swap;src:url('https://static.devschile.cl/chucao/fonts/inconsolata-latin-400-normal.woff2') format('woff2')}:root{--bg:var(--color-background-base);--bg-gradient:radial-gradient(50% 30% ellipse at center top, var(--color-background-top-glow) 0%, rgba(0, 0, 0, 0) 100%),\n radial-gradient(60% 50% ellipse at center bottom, var(--color-background-bottom-glow) 0%, var(--color-background-base) 100%);--surface:var(--color-surface-default);--surface-hover:var(--color-surface-hover);--border:var(--color-border-default);--border-hover:var(--color-border-hover);--text:var(--color-text-primary);--text-muted:var(--color-text-secondary);--accent:var(--color-accent-default);--accent-hover:var(--color-accent-hover);--font-body:var(--typography-body);--font-heading:var(--typography-heading);--radius:var(--radius-sm)}body{font-family:var(--font-body)}.ch-container{width:100%;max-width:var(--layout-max-width);margin-inline:auto}.ch-visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0}.ch-flex{display:flex}.ch-flex-col{display:flex;flex-direction:column}.ch-items-center{align-items:center}.ch-justify-center{justify-content:center}.ch-justify-between{justify-content:space-between}.ch-gap-sm{gap:var(--spacing-md)}.ch-gap-md{gap:var(--spacing-2xl)}.ch-text-center{text-align:center}.ch-text-primary{color:var(--text)}.ch-text-muted{color:var(--text-muted)}.ch-text-accent{color:var(--accent)}.ch-heading{font-family:var(--font-heading)}";
|
|
6
6
|
|
|
7
7
|
/*
|
|
8
|
-
Stencil Client Platform v4.
|
|
8
|
+
Stencil Client Platform v4.44.0 | MIT Licensed | https://stenciljs.com
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
var PrimitiveType = /* @__PURE__ */ ((PrimitiveType2) => {
|
|
@@ -85,7 +85,7 @@ var registerInstance = (lazyInstance, hostRef) => {
|
|
|
85
85
|
if (!hostRef) return;
|
|
86
86
|
lazyInstance.__stencil__getHostRef = () => hostRef;
|
|
87
87
|
hostRef.$lazyInstance$ = lazyInstance;
|
|
88
|
-
if (hostRef.$cmpMeta$.$flags$ & 512 /* hasModernPropertyDecls */ && (BUILD.
|
|
88
|
+
if (hostRef.$cmpMeta$.$flags$ & 512 /* hasModernPropertyDecls */ && (BUILD.state)) {
|
|
89
89
|
reWireGetterSetter(lazyInstance, hostRef);
|
|
90
90
|
}
|
|
91
91
|
};
|
|
@@ -114,7 +114,9 @@ var consoleError = (e, el) => (0, console.error)(e, el);
|
|
|
114
114
|
|
|
115
115
|
// src/client/client-load-module.ts
|
|
116
116
|
var cmpModules = /* @__PURE__ */ new Map();
|
|
117
|
+
var failedLoadAttempts = /* @__PURE__ */ new Map();
|
|
117
118
|
var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
119
|
+
var _a;
|
|
118
120
|
const exportName = cmpMeta.$tagName$.replace(/-/g, "_");
|
|
119
121
|
const bundleId = cmpMeta.$lazyBundleId$;
|
|
120
122
|
if (!bundleId) {
|
|
@@ -124,21 +126,28 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
124
126
|
if (module) {
|
|
125
127
|
return module[exportName];
|
|
126
128
|
}
|
|
129
|
+
const retryCount = (_a = failedLoadAttempts.get(bundleId)) != null ? _a : 0;
|
|
130
|
+
const cacheBustParams = [
|
|
131
|
+
retryCount > 0 ? `s-retry=${retryCount}` : "",
|
|
132
|
+
""
|
|
133
|
+
].filter(Boolean).join("&");
|
|
127
134
|
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/
|
|
128
135
|
return import(
|
|
129
136
|
/* @vite-ignore */
|
|
130
137
|
/* webpackInclude: /\.entry\.js$/ */
|
|
131
138
|
/* webpackExclude: /\.system\.entry\.js$/ */
|
|
132
139
|
/* webpackMode: "lazy" */
|
|
133
|
-
`./${bundleId}.entry.js${""}`
|
|
140
|
+
`./${bundleId}.entry.js${cacheBustParams ? "?" + cacheBustParams : ""}`
|
|
134
141
|
).then(
|
|
135
142
|
(importedModule) => {
|
|
136
143
|
{
|
|
144
|
+
failedLoadAttempts.delete(bundleId);
|
|
137
145
|
cmpModules.set(bundleId, importedModule);
|
|
138
146
|
}
|
|
139
147
|
return importedModule[exportName];
|
|
140
148
|
},
|
|
141
149
|
(e) => {
|
|
150
|
+
failedLoadAttempts.set(bundleId, retryCount + 1);
|
|
142
151
|
consoleError(e, hostRef.$hostElement$);
|
|
143
152
|
}
|
|
144
153
|
);
|
|
@@ -157,6 +166,8 @@ var HYDRATE_ID = "s-id";
|
|
|
157
166
|
var HYDRATED_STYLE_ID = "sty-id";
|
|
158
167
|
var HYDRATE_CHILD_ID = "c-id";
|
|
159
168
|
var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
|
|
169
|
+
var MAX_LAZY_LOAD_RETRIES = 3;
|
|
170
|
+
var LAZY_LOAD_RETRY_INTERVAL_MS = 1e3;
|
|
160
171
|
var win = typeof window !== "undefined" ? window : {};
|
|
161
172
|
var plt = {
|
|
162
173
|
$flags$: 0,
|
|
@@ -167,6 +178,23 @@ var plt = {
|
|
|
167
178
|
rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
|
|
168
179
|
ce: (eventName, opts) => new CustomEvent(eventName, opts)
|
|
169
180
|
};
|
|
181
|
+
var supportsListenerOptions = /* @__PURE__ */ (() => {
|
|
182
|
+
var _a;
|
|
183
|
+
let supportsListenerOptions2 = false;
|
|
184
|
+
try {
|
|
185
|
+
(_a = win.document) == null ? void 0 : _a.addEventListener(
|
|
186
|
+
"e",
|
|
187
|
+
null,
|
|
188
|
+
Object.defineProperty({}, "passive", {
|
|
189
|
+
get() {
|
|
190
|
+
supportsListenerOptions2 = true;
|
|
191
|
+
}
|
|
192
|
+
})
|
|
193
|
+
);
|
|
194
|
+
} catch (e) {
|
|
195
|
+
}
|
|
196
|
+
return supportsListenerOptions2;
|
|
197
|
+
})();
|
|
170
198
|
var promiseResolve = (v) => Promise.resolve(v);
|
|
171
199
|
var supportsConstructableStylesheets = /* @__PURE__ */ (() => {
|
|
172
200
|
try {
|
|
@@ -183,6 +211,10 @@ var supportsMutableAdoptedStyleSheets = supportsConstructableStylesheets ? /* @_
|
|
|
183
211
|
var queuePending = false;
|
|
184
212
|
var queueDomReads = [];
|
|
185
213
|
var queueDomWrites = [];
|
|
214
|
+
var scheduleFlush = () => {
|
|
215
|
+
var _a;
|
|
216
|
+
return ((_a = win.document) == null ? void 0 : _a.hidden) ? nextTick(flush) : plt.raf(flush);
|
|
217
|
+
};
|
|
186
218
|
var queueTask = (queue, write) => (cb) => {
|
|
187
219
|
queue.push(cb);
|
|
188
220
|
if (!queuePending) {
|
|
@@ -190,7 +222,7 @@ var queueTask = (queue, write) => (cb) => {
|
|
|
190
222
|
if (write && plt.$flags$ & 4 /* queueSync */) {
|
|
191
223
|
nextTick(flush);
|
|
192
224
|
} else {
|
|
193
|
-
|
|
225
|
+
scheduleFlush();
|
|
194
226
|
}
|
|
195
227
|
}
|
|
196
228
|
};
|
|
@@ -209,7 +241,7 @@ var flush = () => {
|
|
|
209
241
|
{
|
|
210
242
|
consume(queueDomWrites);
|
|
211
243
|
if (queuePending = queueDomReads.length > 0) {
|
|
212
|
-
|
|
244
|
+
scheduleFlush();
|
|
213
245
|
}
|
|
214
246
|
}
|
|
215
247
|
};
|
|
@@ -504,6 +536,11 @@ var h = (nodeName, vnodeData, ...children) => {
|
|
|
504
536
|
} else if (child != null && typeof child !== "boolean") {
|
|
505
537
|
if (simple = typeof nodeName !== "function" && !isComplexType(child)) {
|
|
506
538
|
child = String(child);
|
|
539
|
+
} else if (typeof nodeName !== "function" && child.$flags$ === void 0) {
|
|
540
|
+
{
|
|
541
|
+
consoleError("Invalid vNode child");
|
|
542
|
+
}
|
|
543
|
+
continue;
|
|
507
544
|
}
|
|
508
545
|
if (simple && lastSimple) {
|
|
509
546
|
vNodeChildren[vNodeChildren.length - 1].$text$ += child;
|
|
@@ -944,6 +981,31 @@ var findCorrespondingNode = (node, type) => {
|
|
|
944
981
|
return sibling;
|
|
945
982
|
};
|
|
946
983
|
|
|
984
|
+
// src/runtime/normalize-watchers.ts
|
|
985
|
+
var normalizeWatchers = (raw) => {
|
|
986
|
+
if (!raw) return void 0;
|
|
987
|
+
const keys = Object.keys(raw);
|
|
988
|
+
if (keys.length === 0) return void 0;
|
|
989
|
+
let hasLegacy = false;
|
|
990
|
+
for (const propName of keys) {
|
|
991
|
+
if (hasLegacy) break;
|
|
992
|
+
for (const h2 of raw[propName]) {
|
|
993
|
+
if (typeof h2 === "string") {
|
|
994
|
+
hasLegacy = true;
|
|
995
|
+
break;
|
|
996
|
+
}
|
|
997
|
+
}
|
|
998
|
+
}
|
|
999
|
+
if (!hasLegacy) return raw;
|
|
1000
|
+
const out = {};
|
|
1001
|
+
for (const propName of keys) {
|
|
1002
|
+
out[propName] = raw[propName].map(
|
|
1003
|
+
(h2) => typeof h2 === "string" ? { [h2]: 0 } : h2
|
|
1004
|
+
);
|
|
1005
|
+
}
|
|
1006
|
+
return out;
|
|
1007
|
+
};
|
|
1008
|
+
|
|
947
1009
|
// src/utils/remote-value.ts
|
|
948
1010
|
var RemoteValue = class _RemoteValue {
|
|
949
1011
|
/**
|
|
@@ -1575,6 +1637,13 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
1575
1637
|
let maybePromise;
|
|
1576
1638
|
if (isInitialLoad) {
|
|
1577
1639
|
{
|
|
1640
|
+
{
|
|
1641
|
+
hostRef.$flags$ |= 256 /* isListenReady */;
|
|
1642
|
+
if (hostRef.$queuedListeners$) {
|
|
1643
|
+
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event, elm));
|
|
1644
|
+
hostRef.$queuedListeners$ = void 0;
|
|
1645
|
+
}
|
|
1646
|
+
}
|
|
1578
1647
|
if (hostRef.$fetchedCbList$.length) {
|
|
1579
1648
|
hostRef.$fetchedCbList$.forEach((cb) => cb(elm));
|
|
1580
1649
|
}
|
|
@@ -1707,6 +1776,7 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
1707
1776
|
`Couldn't find host element for "${cmpMeta.$tagName$}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/stenciljs/core/issues/5457).`
|
|
1708
1777
|
);
|
|
1709
1778
|
}
|
|
1779
|
+
const elm = hostRef.$hostElement$ ;
|
|
1710
1780
|
const oldVal = hostRef.$instanceValues$.get(propName);
|
|
1711
1781
|
const flags = hostRef.$flags$;
|
|
1712
1782
|
const instance = hostRef.$lazyInstance$ ;
|
|
@@ -1717,6 +1787,27 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
1717
1787
|
const didValueChange = newVal !== oldVal && !areBothNaN;
|
|
1718
1788
|
if ((!(flags & 8 /* isConstructingInstance */) || oldVal === void 0) && didValueChange) {
|
|
1719
1789
|
hostRef.$instanceValues$.set(propName, newVal);
|
|
1790
|
+
if (cmpMeta.$watchers$) {
|
|
1791
|
+
const watchMethods = cmpMeta.$watchers$[propName];
|
|
1792
|
+
if (watchMethods) {
|
|
1793
|
+
watchMethods.map((watcher) => {
|
|
1794
|
+
try {
|
|
1795
|
+
const [[watchMethodName, watcherFlags]] = Object.entries(watcher);
|
|
1796
|
+
if (flags & 128 /* isWatchReady */ || watcherFlags & 1 /* Immediate */) {
|
|
1797
|
+
if (!instance) {
|
|
1798
|
+
hostRef.$fetchedCbList$.push(() => {
|
|
1799
|
+
hostRef.$lazyInstance$[watchMethodName](newVal, oldVal, propName);
|
|
1800
|
+
});
|
|
1801
|
+
} else {
|
|
1802
|
+
instance[watchMethodName](newVal, oldVal, propName);
|
|
1803
|
+
}
|
|
1804
|
+
}
|
|
1805
|
+
} catch (e) {
|
|
1806
|
+
consoleError(e, elm);
|
|
1807
|
+
}
|
|
1808
|
+
});
|
|
1809
|
+
}
|
|
1810
|
+
}
|
|
1720
1811
|
if (flags & 2 /* hasRendered */) {
|
|
1721
1812
|
if (instance.componentShouldUpdate) {
|
|
1722
1813
|
const shouldUpdate = instance.componentShouldUpdate(newVal, oldVal, propName);
|
|
@@ -1736,6 +1827,17 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1736
1827
|
var _a, _b;
|
|
1737
1828
|
const prototype = Cstr.prototype;
|
|
1738
1829
|
if (cmpMeta.$members$ || BUILD.propChangeCallback) {
|
|
1830
|
+
{
|
|
1831
|
+
if (Cstr.watchers && !cmpMeta.$watchers$) {
|
|
1832
|
+
cmpMeta.$watchers$ = normalizeWatchers(Cstr.watchers);
|
|
1833
|
+
}
|
|
1834
|
+
if (Cstr.deserializers && !cmpMeta.$deserializers$) {
|
|
1835
|
+
cmpMeta.$deserializers$ = Cstr.deserializers;
|
|
1836
|
+
}
|
|
1837
|
+
if (Cstr.serializers && !cmpMeta.$serializers$) {
|
|
1838
|
+
cmpMeta.$serializers$ = Cstr.serializers;
|
|
1839
|
+
}
|
|
1840
|
+
}
|
|
1739
1841
|
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
1740
1842
|
members.map(([memberName, [memberFlags]]) => {
|
|
1741
1843
|
if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
|
|
@@ -1870,10 +1972,12 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1870
1972
|
|
|
1871
1973
|
// src/runtime/initialize-component.ts
|
|
1872
1974
|
var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
1975
|
+
var _a;
|
|
1873
1976
|
let Cstr;
|
|
1874
1977
|
try {
|
|
1875
1978
|
if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
|
|
1876
1979
|
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
1980
|
+
hostRef.$flags$ &= -1025 /* hasFailedLoad */;
|
|
1877
1981
|
const bundleId = cmpMeta.$lazyBundleId$;
|
|
1878
1982
|
if (bundleId) {
|
|
1879
1983
|
const CstrImport = loadModule(cmpMeta, hostRef);
|
|
@@ -1885,9 +1989,19 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1885
1989
|
Cstr = CstrImport;
|
|
1886
1990
|
}
|
|
1887
1991
|
if (!Cstr) {
|
|
1992
|
+
hostRef.$flags$ &= -33 /* hasInitializedComponent */;
|
|
1993
|
+
hostRef.$loadRetryCount$ = ((_a = hostRef.$loadRetryCount$) != null ? _a : 0) + 1;
|
|
1994
|
+
if (hostRef.$loadRetryCount$ < MAX_LAZY_LOAD_RETRIES) {
|
|
1995
|
+
hostRef.$flags$ |= 1024 /* hasFailedLoad */;
|
|
1996
|
+
}
|
|
1888
1997
|
throw new Error(`Constructor for "${cmpMeta.$tagName$}#${hostRef.$modeName$}" was not found`);
|
|
1889
1998
|
}
|
|
1890
1999
|
if (!Cstr.isProxied) {
|
|
2000
|
+
{
|
|
2001
|
+
cmpMeta.$watchers$ = normalizeWatchers(Cstr.watchers);
|
|
2002
|
+
cmpMeta.$serializers$ = Cstr.serializers;
|
|
2003
|
+
cmpMeta.$deserializers$ = Cstr.deserializers;
|
|
2004
|
+
}
|
|
1891
2005
|
proxyComponent(Cstr, cmpMeta, 2 /* proxyState */);
|
|
1892
2006
|
Cstr.isProxied = true;
|
|
1893
2007
|
}
|
|
@@ -1903,6 +2017,9 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1903
2017
|
{
|
|
1904
2018
|
hostRef.$flags$ &= -9 /* isConstructingInstance */;
|
|
1905
2019
|
}
|
|
2020
|
+
{
|
|
2021
|
+
hostRef.$flags$ |= 128 /* isWatchReady */;
|
|
2022
|
+
}
|
|
1906
2023
|
endNewInstance();
|
|
1907
2024
|
{
|
|
1908
2025
|
fireConnectedCallback(hostRef.$lazyInstance$, elm);
|
|
@@ -1938,7 +2055,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1938
2055
|
hostRef.$onRenderResolve$();
|
|
1939
2056
|
hostRef.$onRenderResolve$ = void 0;
|
|
1940
2057
|
}
|
|
1941
|
-
if (hostRef.$onReadyResolve$) {
|
|
2058
|
+
if (hostRef.$onReadyResolve$ && !(hostRef.$flags$ & 1024 /* hasFailedLoad */)) {
|
|
1942
2059
|
hostRef.$onReadyResolve$(elm);
|
|
1943
2060
|
}
|
|
1944
2061
|
}
|
|
@@ -1993,8 +2110,11 @@ var connectedCallback = (elm) => {
|
|
|
1993
2110
|
initializeComponent(elm, hostRef, cmpMeta);
|
|
1994
2111
|
}
|
|
1995
2112
|
} else {
|
|
2113
|
+
addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
|
|
1996
2114
|
if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
|
1997
2115
|
fireConnectedCallback(hostRef.$lazyInstance$, elm);
|
|
2116
|
+
} else if (hostRef.$flags$ & 1024 /* hasFailedLoad */) {
|
|
2117
|
+
setTimeout(() => initializeComponent(elm, hostRef, cmpMeta), LAZY_LOAD_RETRY_INTERVAL_MS);
|
|
1998
2118
|
} else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
|
1999
2119
|
hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$, elm));
|
|
2000
2120
|
}
|
|
@@ -2010,6 +2130,12 @@ var disconnectInstance = (instance, elm) => {
|
|
|
2010
2130
|
var disconnectedCallback = async (elm) => {
|
|
2011
2131
|
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
2012
2132
|
const hostRef = getHostRef(elm);
|
|
2133
|
+
{
|
|
2134
|
+
if (hostRef == null ? void 0 : hostRef.$rmListeners$) {
|
|
2135
|
+
hostRef.$rmListeners$.map((rmListener) => rmListener());
|
|
2136
|
+
hostRef.$rmListeners$ = void 0;
|
|
2137
|
+
}
|
|
2138
|
+
}
|
|
2013
2139
|
if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
|
2014
2140
|
disconnectInstance(hostRef.$lazyInstance$, elm);
|
|
2015
2141
|
} else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
|
@@ -2051,6 +2177,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
2051
2177
|
}
|
|
2052
2178
|
lazyBundles.map((lazyBundle) => {
|
|
2053
2179
|
lazyBundle[1].map((compactMeta) => {
|
|
2180
|
+
var _a2, _b;
|
|
2054
2181
|
const cmpMeta = {
|
|
2055
2182
|
$flags$: compactMeta[0],
|
|
2056
2183
|
$tagName$: compactMeta[1],
|
|
@@ -2060,6 +2187,14 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
2060
2187
|
{
|
|
2061
2188
|
cmpMeta.$members$ = compactMeta[2];
|
|
2062
2189
|
}
|
|
2190
|
+
{
|
|
2191
|
+
cmpMeta.$listeners$ = compactMeta[3];
|
|
2192
|
+
}
|
|
2193
|
+
{
|
|
2194
|
+
cmpMeta.$watchers$ = normalizeWatchers(compactMeta[4]);
|
|
2195
|
+
cmpMeta.$serializers$ = (_a2 = compactMeta[5]) != null ? _a2 : {};
|
|
2196
|
+
cmpMeta.$deserializers$ = (_b = compactMeta[6]) != null ? _b : {};
|
|
2197
|
+
}
|
|
2063
2198
|
const tagName = transformTag(cmpMeta.$tagName$);
|
|
2064
2199
|
const HostElement = class extends HTMLElement {
|
|
2065
2200
|
["s-p"];
|
|
@@ -2091,6 +2226,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
2091
2226
|
}
|
|
2092
2227
|
if (!this.hasRegisteredEventListeners) {
|
|
2093
2228
|
this.hasRegisteredEventListeners = true;
|
|
2229
|
+
addHostEventListeners(this, hostRef, cmpMeta.$listeners$);
|
|
2094
2230
|
}
|
|
2095
2231
|
if (appLoadFallback) {
|
|
2096
2232
|
clearTimeout(appLoadFallback);
|
|
@@ -2104,7 +2240,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
2104
2240
|
}
|
|
2105
2241
|
disconnectedCallback() {
|
|
2106
2242
|
plt.jmp(() => disconnectedCallback(this));
|
|
2107
|
-
|
|
2243
|
+
nextTick(() => {
|
|
2108
2244
|
var _a3;
|
|
2109
2245
|
const hostRef = getHostRef(this);
|
|
2110
2246
|
if (!hostRef) {
|
|
@@ -2154,6 +2290,41 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
2154
2290
|
}
|
|
2155
2291
|
endBootstrap();
|
|
2156
2292
|
};
|
|
2293
|
+
var addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
|
|
2294
|
+
if (listeners && win.document) {
|
|
2295
|
+
listeners.map(([flags, name, method]) => {
|
|
2296
|
+
const target = getHostListenerTarget(win.document, elm, flags) ;
|
|
2297
|
+
const handler = hostListenerProxy(hostRef, method);
|
|
2298
|
+
const opts = hostListenerOpts(flags);
|
|
2299
|
+
plt.ael(target, name, handler, opts);
|
|
2300
|
+
(hostRef.$rmListeners$ = hostRef.$rmListeners$ || []).push(() => plt.rel(target, name, handler, opts));
|
|
2301
|
+
});
|
|
2302
|
+
}
|
|
2303
|
+
};
|
|
2304
|
+
var hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
2305
|
+
var _a;
|
|
2306
|
+
try {
|
|
2307
|
+
{
|
|
2308
|
+
if (hostRef.$flags$ & 256 /* isListenReady */) {
|
|
2309
|
+
(_a = hostRef.$lazyInstance$) == null ? void 0 : _a[methodName](ev);
|
|
2310
|
+
} else {
|
|
2311
|
+
(hostRef.$queuedListeners$ = hostRef.$queuedListeners$ || []).push([methodName, ev]);
|
|
2312
|
+
}
|
|
2313
|
+
}
|
|
2314
|
+
} catch (e) {
|
|
2315
|
+
consoleError(e, hostRef.$hostElement$);
|
|
2316
|
+
}
|
|
2317
|
+
};
|
|
2318
|
+
var getHostListenerTarget = (doc, elm, flags) => {
|
|
2319
|
+
if (flags & 4 /* TargetDocument */) {
|
|
2320
|
+
return doc;
|
|
2321
|
+
}
|
|
2322
|
+
return elm;
|
|
2323
|
+
};
|
|
2324
|
+
var hostListenerOpts = (flags) => supportsListenerOptions ? {
|
|
2325
|
+
passive: (flags & 1 /* Passive */) !== 0,
|
|
2326
|
+
capture: (flags & 2 /* Capture */) !== 0
|
|
2327
|
+
} : (flags & 2 /* Capture */) !== 0;
|
|
2157
2328
|
|
|
2158
2329
|
// src/runtime/nonce.ts
|
|
2159
2330
|
var setNonce = (nonce) => plt.$nonce$ = nonce;
|
|
@@ -2161,7 +2332,7 @@ function transformTag(tag) {
|
|
|
2161
2332
|
return tag;
|
|
2162
2333
|
}
|
|
2163
2334
|
|
|
2164
|
-
export { Host as H, bootstrapLazy as b, createEvent as c, globalScripts as g, h, promiseResolve as p, registerInstance as r, setNonce as s };
|
|
2165
|
-
//# sourceMappingURL=index-
|
|
2335
|
+
export { Host as H, getElement as a, bootstrapLazy as b, createEvent as c, globalScripts as g, h, promiseResolve as p, registerInstance as r, setNonce as s };
|
|
2336
|
+
//# sourceMappingURL=index-Bvah_WQV.js.map
|
|
2166
2337
|
|
|
2167
|
-
//# sourceMappingURL=index-
|
|
2338
|
+
//# sourceMappingURL=index-Bvah_WQV.js.map
|