@devschile/chucao 1.7.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.
Files changed (124) hide show
  1. package/README.md +13 -12
  2. package/dist/chucao/chucao.css +1 -1
  3. package/dist/chucao/chucao.esm.js +1 -1
  4. package/dist/chucao/index.esm.js +1 -1
  5. package/dist/chucao/index.esm.js.map +1 -1
  6. package/dist/chucao/{p-9a614e82.entry.js → p-13ab5f9a.entry.js} +2 -2
  7. package/dist/chucao/{p-053d58a4.entry.js → p-1cc7042e.entry.js} +2 -2
  8. package/dist/chucao/{p-c598f978.entry.js → p-23c5220b.entry.js} +2 -2
  9. package/dist/chucao/p-2d7e81b2.entry.js +2 -0
  10. package/dist/chucao/p-2d7e81b2.entry.js.map +1 -0
  11. package/dist/chucao/p-421cda05.entry.js +2 -0
  12. package/dist/chucao/{p-0305f2eb.entry.js.map → p-421cda05.entry.js.map} +1 -1
  13. package/dist/chucao/p-Bvah_WQV.js +3 -0
  14. package/dist/chucao/p-Bvah_WQV.js.map +1 -0
  15. package/dist/chucao/{p-ad3206a2.entry.js → p-c16b18b7.entry.js} +2 -2
  16. package/dist/chucao/p-cbb2b478.entry.js +2 -0
  17. package/dist/chucao/p-cbb2b478.entry.js.map +1 -0
  18. package/dist/chucao/{p-20492b73.entry.js → p-cfb6db53.entry.js} +2 -2
  19. package/dist/chucao/{p-488c7838.entry.js → p-df73f786.entry.js} +2 -2
  20. package/dist/chucao/{p-fe8e9537.entry.js → p-e8fe65bb.entry.js} +2 -2
  21. package/dist/cjs/ch-accordion.cjs.entry.js +1 -1
  22. package/dist/cjs/ch-alert_8.cjs.entry.js +4 -4
  23. package/dist/cjs/ch-checkbox.cjs.entry.js +2 -2
  24. package/dist/cjs/ch-divider.cjs.entry.js +1 -1
  25. package/dist/cjs/ch-link.cjs.entry.js +1 -1
  26. package/dist/cjs/ch-modal.cjs.entry.js +167 -0
  27. package/dist/cjs/ch-modal.cjs.entry.js.map +1 -0
  28. package/dist/cjs/ch-radio.cjs.entry.js +1 -1
  29. package/dist/cjs/ch-tabs.cjs.entry.js +1 -1
  30. package/dist/cjs/ch-textarea.cjs.entry.js +2 -2
  31. package/dist/cjs/ch-tooltip.cjs.entry.js +82 -0
  32. package/dist/cjs/ch-tooltip.cjs.entry.js.map +1 -0
  33. package/dist/cjs/chucao.cjs.js +2 -2
  34. package/dist/cjs/{index-ls4U227d.js → index-DMeDkSQU.js} +148 -5
  35. package/dist/cjs/index-DMeDkSQU.js.map +1 -0
  36. package/dist/cjs/index.cjs.js +5 -0
  37. package/dist/cjs/index.cjs.js.map +1 -1
  38. package/dist/cjs/loader.cjs.js +2 -2
  39. package/dist/collection/collection-manifest.json +2 -0
  40. package/dist/collection/components/ch-card/ch-card.js +1 -1
  41. package/dist/collection/components/ch-checkbox/ch-checkbox.js +1 -1
  42. package/dist/collection/components/ch-input/ch-input.js +1 -1
  43. package/dist/collection/components/ch-modal/ch-modal.css +69 -0
  44. package/dist/collection/components/ch-modal/ch-modal.js +278 -0
  45. package/dist/collection/components/ch-modal/ch-modal.js.map +1 -0
  46. package/dist/collection/components/ch-switch/ch-switch.js +1 -1
  47. package/dist/collection/components/ch-textarea/ch-textarea.js +1 -1
  48. package/dist/collection/components/ch-tooltip/ch-tooltip.css +100 -0
  49. package/dist/collection/components/ch-tooltip/ch-tooltip.js +168 -0
  50. package/dist/collection/components/ch-tooltip/ch-tooltip.js.map +1 -0
  51. package/dist/collection/tokens/tokens.js +4 -0
  52. package/dist/collection/tokens/tokens.js.map +1 -1
  53. package/dist/collection/tokens/types.js.map +1 -1
  54. package/dist/components/ch-accordion.js +1 -1
  55. package/dist/components/ch-alert.js +1 -1
  56. package/dist/components/ch-badge.js +1 -1
  57. package/dist/components/ch-button.js +1 -1
  58. package/dist/components/ch-card.js +1 -1
  59. package/dist/components/ch-checkbox.js +1 -1
  60. package/dist/components/ch-divider.js +1 -1
  61. package/dist/components/ch-input.js +1 -1
  62. package/dist/components/ch-link.js +1 -1
  63. package/dist/components/ch-modal.d.ts +11 -0
  64. package/dist/components/ch-modal.js +2 -0
  65. package/dist/components/ch-modal.js.map +1 -0
  66. package/dist/components/ch-radio.js +1 -1
  67. package/dist/components/ch-select.js +1 -1
  68. package/dist/components/ch-spinner.js +1 -1
  69. package/dist/components/ch-switch.js +1 -1
  70. package/dist/components/ch-tabs.js +1 -1
  71. package/dist/components/ch-textarea.js +1 -1
  72. package/dist/components/ch-tooltip.d.ts +11 -0
  73. package/dist/components/ch-tooltip.js +2 -0
  74. package/dist/components/ch-tooltip.js.map +1 -0
  75. package/dist/components/index.js +1 -1
  76. package/dist/components/index.js.map +1 -1
  77. package/dist/components/p-hyy-cLgi.js +2 -0
  78. package/dist/components/p-hyy-cLgi.js.map +1 -0
  79. package/dist/esm/ch-accordion.entry.js +1 -1
  80. package/dist/esm/ch-alert_8.entry.js +4 -4
  81. package/dist/esm/ch-checkbox.entry.js +2 -2
  82. package/dist/esm/ch-divider.entry.js +1 -1
  83. package/dist/esm/ch-link.entry.js +1 -1
  84. package/dist/esm/ch-modal.entry.js +165 -0
  85. package/dist/esm/ch-modal.entry.js.map +1 -0
  86. package/dist/esm/ch-radio.entry.js +1 -1
  87. package/dist/esm/ch-tabs.entry.js +1 -1
  88. package/dist/esm/ch-textarea.entry.js +2 -2
  89. package/dist/esm/ch-tooltip.entry.js +80 -0
  90. package/dist/esm/ch-tooltip.entry.js.map +1 -0
  91. package/dist/esm/chucao.js +3 -3
  92. package/dist/esm/{index-pfWAsOzE.js → index-Bvah_WQV.js} +148 -6
  93. package/dist/esm/index-Bvah_WQV.js.map +1 -0
  94. package/dist/esm/index.js +5 -1
  95. package/dist/esm/index.js.map +1 -1
  96. package/dist/esm/loader.js +3 -3
  97. package/dist/types/components/ch-modal/ch-modal.d.ts +67 -0
  98. package/dist/types/components/ch-tooltip/ch-tooltip.d.ts +47 -0
  99. package/dist/types/components.d.ts +216 -0
  100. package/dist/types/tokens/tokens.d.ts +4 -0
  101. package/dist/types/tokens/types.d.ts +1 -1
  102. package/dist-react/components.d.ts +10 -1
  103. package/dist-react/components.js +21 -0
  104. package/dist-react/components.ts +31 -1
  105. package/dist-vue/index.d.ts +2 -0
  106. package/dist-vue/index.js +15 -0
  107. package/dist-vue/index.ts +19 -0
  108. package/hydrate/index.js +409 -8
  109. package/hydrate/index.mjs +409 -8
  110. package/package.json +1 -1
  111. package/dist/chucao/p-0305f2eb.entry.js +0 -2
  112. package/dist/chucao/p-pfWAsOzE.js +0 -3
  113. package/dist/chucao/p-pfWAsOzE.js.map +0 -1
  114. package/dist/cjs/index-ls4U227d.js.map +0 -1
  115. package/dist/components/p-ONE3uKkF.js +0 -2
  116. package/dist/components/p-ONE3uKkF.js.map +0 -1
  117. package/dist/esm/index-pfWAsOzE.js.map +0 -1
  118. /package/dist/chucao/{p-9a614e82.entry.js.map → p-13ab5f9a.entry.js.map} +0 -0
  119. /package/dist/chucao/{p-053d58a4.entry.js.map → p-1cc7042e.entry.js.map} +0 -0
  120. /package/dist/chucao/{p-c598f978.entry.js.map → p-23c5220b.entry.js.map} +0 -0
  121. /package/dist/chucao/{p-ad3206a2.entry.js.map → p-c16b18b7.entry.js.map} +0 -0
  122. /package/dist/chucao/{p-20492b73.entry.js.map → p-cfb6db53.entry.js.map} +0 -0
  123. /package/dist/chucao/{p-488c7838.entry.js.map → p-df73f786.entry.js.map} +0 -0
  124. /package/dist/chucao/{p-fe8e9537.entry.js.map → p-e8fe65bb.entry.js.map} +0 -0
@@ -1,10 +1,10 @@
1
1
  'use strict';
2
2
 
3
3
  const NAMESPACE = 'chucao';
4
- const BUILD = /* chucao */ { hotModuleReplacement: false, lazyLoad: true, prop: true, propChangeCallback: false, updatable: true};
4
+ const BUILD = /* chucao */ { hotModuleReplacement: false, lazyLoad: true, propChangeCallback: true, state: true, updatable: true};
5
5
 
6
6
  const globalScripts = () => {};
7
- 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;--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)}";
7
+ 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)}";
8
8
 
9
9
  /*
10
10
  Stencil Client Platform v4.44.0 | MIT Licensed | https://stenciljs.com
@@ -87,7 +87,7 @@ var registerInstance = (lazyInstance, hostRef) => {
87
87
  if (!hostRef) return;
88
88
  lazyInstance.__stencil__getHostRef = () => hostRef;
89
89
  hostRef.$lazyInstance$ = lazyInstance;
90
- if (hostRef.$cmpMeta$.$flags$ & 512 /* hasModernPropertyDecls */ && (BUILD.prop)) {
90
+ if (hostRef.$cmpMeta$.$flags$ & 512 /* hasModernPropertyDecls */ && (BUILD.state)) {
91
91
  reWireGetterSetter(lazyInstance, hostRef);
92
92
  }
93
93
  };
@@ -180,6 +180,23 @@ var plt = {
180
180
  rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
181
181
  ce: (eventName, opts) => new CustomEvent(eventName, opts)
182
182
  };
183
+ var supportsListenerOptions = /* @__PURE__ */ (() => {
184
+ var _a;
185
+ let supportsListenerOptions2 = false;
186
+ try {
187
+ (_a = win.document) == null ? void 0 : _a.addEventListener(
188
+ "e",
189
+ null,
190
+ Object.defineProperty({}, "passive", {
191
+ get() {
192
+ supportsListenerOptions2 = true;
193
+ }
194
+ })
195
+ );
196
+ } catch (e) {
197
+ }
198
+ return supportsListenerOptions2;
199
+ })();
183
200
  var promiseResolve = (v) => Promise.resolve(v);
184
201
  var supportsConstructableStylesheets = /* @__PURE__ */ (() => {
185
202
  try {
@@ -966,6 +983,31 @@ var findCorrespondingNode = (node, type) => {
966
983
  return sibling;
967
984
  };
968
985
 
986
+ // src/runtime/normalize-watchers.ts
987
+ var normalizeWatchers = (raw) => {
988
+ if (!raw) return void 0;
989
+ const keys = Object.keys(raw);
990
+ if (keys.length === 0) return void 0;
991
+ let hasLegacy = false;
992
+ for (const propName of keys) {
993
+ if (hasLegacy) break;
994
+ for (const h2 of raw[propName]) {
995
+ if (typeof h2 === "string") {
996
+ hasLegacy = true;
997
+ break;
998
+ }
999
+ }
1000
+ }
1001
+ if (!hasLegacy) return raw;
1002
+ const out = {};
1003
+ for (const propName of keys) {
1004
+ out[propName] = raw[propName].map(
1005
+ (h2) => typeof h2 === "string" ? { [h2]: 0 } : h2
1006
+ );
1007
+ }
1008
+ return out;
1009
+ };
1010
+
969
1011
  // src/utils/remote-value.ts
970
1012
  var RemoteValue = class _RemoteValue {
971
1013
  /**
@@ -1597,6 +1639,13 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
1597
1639
  let maybePromise;
1598
1640
  if (isInitialLoad) {
1599
1641
  {
1642
+ {
1643
+ hostRef.$flags$ |= 256 /* isListenReady */;
1644
+ if (hostRef.$queuedListeners$) {
1645
+ hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event, elm));
1646
+ hostRef.$queuedListeners$ = void 0;
1647
+ }
1648
+ }
1600
1649
  if (hostRef.$fetchedCbList$.length) {
1601
1650
  hostRef.$fetchedCbList$.forEach((cb) => cb(elm));
1602
1651
  }
@@ -1729,6 +1778,7 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
1729
1778
  `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).`
1730
1779
  );
1731
1780
  }
1781
+ const elm = hostRef.$hostElement$ ;
1732
1782
  const oldVal = hostRef.$instanceValues$.get(propName);
1733
1783
  const flags = hostRef.$flags$;
1734
1784
  const instance = hostRef.$lazyInstance$ ;
@@ -1739,6 +1789,27 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
1739
1789
  const didValueChange = newVal !== oldVal && !areBothNaN;
1740
1790
  if ((!(flags & 8 /* isConstructingInstance */) || oldVal === void 0) && didValueChange) {
1741
1791
  hostRef.$instanceValues$.set(propName, newVal);
1792
+ if (cmpMeta.$watchers$) {
1793
+ const watchMethods = cmpMeta.$watchers$[propName];
1794
+ if (watchMethods) {
1795
+ watchMethods.map((watcher) => {
1796
+ try {
1797
+ const [[watchMethodName, watcherFlags]] = Object.entries(watcher);
1798
+ if (flags & 128 /* isWatchReady */ || watcherFlags & 1 /* Immediate */) {
1799
+ if (!instance) {
1800
+ hostRef.$fetchedCbList$.push(() => {
1801
+ hostRef.$lazyInstance$[watchMethodName](newVal, oldVal, propName);
1802
+ });
1803
+ } else {
1804
+ instance[watchMethodName](newVal, oldVal, propName);
1805
+ }
1806
+ }
1807
+ } catch (e) {
1808
+ consoleError(e, elm);
1809
+ }
1810
+ });
1811
+ }
1812
+ }
1742
1813
  if (flags & 2 /* hasRendered */) {
1743
1814
  if (instance.componentShouldUpdate) {
1744
1815
  const shouldUpdate = instance.componentShouldUpdate(newVal, oldVal, propName);
@@ -1758,6 +1829,17 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
1758
1829
  var _a, _b;
1759
1830
  const prototype = Cstr.prototype;
1760
1831
  if (cmpMeta.$members$ || BUILD.propChangeCallback) {
1832
+ {
1833
+ if (Cstr.watchers && !cmpMeta.$watchers$) {
1834
+ cmpMeta.$watchers$ = normalizeWatchers(Cstr.watchers);
1835
+ }
1836
+ if (Cstr.deserializers && !cmpMeta.$deserializers$) {
1837
+ cmpMeta.$deserializers$ = Cstr.deserializers;
1838
+ }
1839
+ if (Cstr.serializers && !cmpMeta.$serializers$) {
1840
+ cmpMeta.$serializers$ = Cstr.serializers;
1841
+ }
1842
+ }
1761
1843
  const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
1762
1844
  members.map(([memberName, [memberFlags]]) => {
1763
1845
  if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
@@ -1917,6 +1999,11 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1917
1999
  throw new Error(`Constructor for "${cmpMeta.$tagName$}#${hostRef.$modeName$}" was not found`);
1918
2000
  }
1919
2001
  if (!Cstr.isProxied) {
2002
+ {
2003
+ cmpMeta.$watchers$ = normalizeWatchers(Cstr.watchers);
2004
+ cmpMeta.$serializers$ = Cstr.serializers;
2005
+ cmpMeta.$deserializers$ = Cstr.deserializers;
2006
+ }
1920
2007
  proxyComponent(Cstr, cmpMeta, 2 /* proxyState */);
1921
2008
  Cstr.isProxied = true;
1922
2009
  }
@@ -1932,6 +2019,9 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1932
2019
  {
1933
2020
  hostRef.$flags$ &= -9 /* isConstructingInstance */;
1934
2021
  }
2022
+ {
2023
+ hostRef.$flags$ |= 128 /* isWatchReady */;
2024
+ }
1935
2025
  endNewInstance();
1936
2026
  {
1937
2027
  fireConnectedCallback(hostRef.$lazyInstance$, elm);
@@ -2022,6 +2112,7 @@ var connectedCallback = (elm) => {
2022
2112
  initializeComponent(elm, hostRef, cmpMeta);
2023
2113
  }
2024
2114
  } else {
2115
+ addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
2025
2116
  if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
2026
2117
  fireConnectedCallback(hostRef.$lazyInstance$, elm);
2027
2118
  } else if (hostRef.$flags$ & 1024 /* hasFailedLoad */) {
@@ -2041,6 +2132,12 @@ var disconnectInstance = (instance, elm) => {
2041
2132
  var disconnectedCallback = async (elm) => {
2042
2133
  if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
2043
2134
  const hostRef = getHostRef(elm);
2135
+ {
2136
+ if (hostRef == null ? void 0 : hostRef.$rmListeners$) {
2137
+ hostRef.$rmListeners$.map((rmListener) => rmListener());
2138
+ hostRef.$rmListeners$ = void 0;
2139
+ }
2140
+ }
2044
2141
  if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
2045
2142
  disconnectInstance(hostRef.$lazyInstance$, elm);
2046
2143
  } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
@@ -2082,6 +2179,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
2082
2179
  }
2083
2180
  lazyBundles.map((lazyBundle) => {
2084
2181
  lazyBundle[1].map((compactMeta) => {
2182
+ var _a2, _b;
2085
2183
  const cmpMeta = {
2086
2184
  $flags$: compactMeta[0],
2087
2185
  $tagName$: compactMeta[1],
@@ -2091,6 +2189,14 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
2091
2189
  {
2092
2190
  cmpMeta.$members$ = compactMeta[2];
2093
2191
  }
2192
+ {
2193
+ cmpMeta.$listeners$ = compactMeta[3];
2194
+ }
2195
+ {
2196
+ cmpMeta.$watchers$ = normalizeWatchers(compactMeta[4]);
2197
+ cmpMeta.$serializers$ = (_a2 = compactMeta[5]) != null ? _a2 : {};
2198
+ cmpMeta.$deserializers$ = (_b = compactMeta[6]) != null ? _b : {};
2199
+ }
2094
2200
  const tagName = transformTag(cmpMeta.$tagName$);
2095
2201
  const HostElement = class extends HTMLElement {
2096
2202
  ["s-p"];
@@ -2122,6 +2228,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
2122
2228
  }
2123
2229
  if (!this.hasRegisteredEventListeners) {
2124
2230
  this.hasRegisteredEventListeners = true;
2231
+ addHostEventListeners(this, hostRef, cmpMeta.$listeners$);
2125
2232
  }
2126
2233
  if (appLoadFallback) {
2127
2234
  clearTimeout(appLoadFallback);
@@ -2185,6 +2292,41 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
2185
2292
  }
2186
2293
  endBootstrap();
2187
2294
  };
2295
+ var addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
2296
+ if (listeners && win.document) {
2297
+ listeners.map(([flags, name, method]) => {
2298
+ const target = getHostListenerTarget(win.document, elm, flags) ;
2299
+ const handler = hostListenerProxy(hostRef, method);
2300
+ const opts = hostListenerOpts(flags);
2301
+ plt.ael(target, name, handler, opts);
2302
+ (hostRef.$rmListeners$ = hostRef.$rmListeners$ || []).push(() => plt.rel(target, name, handler, opts));
2303
+ });
2304
+ }
2305
+ };
2306
+ var hostListenerProxy = (hostRef, methodName) => (ev) => {
2307
+ var _a;
2308
+ try {
2309
+ {
2310
+ if (hostRef.$flags$ & 256 /* isListenReady */) {
2311
+ (_a = hostRef.$lazyInstance$) == null ? void 0 : _a[methodName](ev);
2312
+ } else {
2313
+ (hostRef.$queuedListeners$ = hostRef.$queuedListeners$ || []).push([methodName, ev]);
2314
+ }
2315
+ }
2316
+ } catch (e) {
2317
+ consoleError(e, hostRef.$hostElement$);
2318
+ }
2319
+ };
2320
+ var getHostListenerTarget = (doc, elm, flags) => {
2321
+ if (flags & 4 /* TargetDocument */) {
2322
+ return doc;
2323
+ }
2324
+ return elm;
2325
+ };
2326
+ var hostListenerOpts = (flags) => supportsListenerOptions ? {
2327
+ passive: (flags & 1 /* Passive */) !== 0,
2328
+ capture: (flags & 2 /* Capture */) !== 0
2329
+ } : (flags & 2 /* Capture */) !== 0;
2188
2330
 
2189
2331
  // src/runtime/nonce.ts
2190
2332
  var setNonce = (nonce) => plt.$nonce$ = nonce;
@@ -2195,11 +2337,12 @@ function transformTag(tag) {
2195
2337
  exports.Host = Host;
2196
2338
  exports.bootstrapLazy = bootstrapLazy;
2197
2339
  exports.createEvent = createEvent;
2340
+ exports.getElement = getElement;
2198
2341
  exports.globalScripts = globalScripts;
2199
2342
  exports.h = h;
2200
2343
  exports.promiseResolve = promiseResolve;
2201
2344
  exports.registerInstance = registerInstance;
2202
2345
  exports.setNonce = setNonce;
2203
- //# sourceMappingURL=index-ls4U227d.js.map
2346
+ //# sourceMappingURL=index-DMeDkSQU.js.map
2204
2347
 
2205
- //# sourceMappingURL=index-ls4U227d.js.map
2348
+ //# sourceMappingURL=index-DMeDkSQU.js.map