@stencil/core 5.0.0-alpha.3 → 5.0.0-alpha.31

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 (56) hide show
  1. package/README.md +94 -0
  2. package/dist/app-data/index.d.ts +2 -0
  3. package/dist/{runtime/app-data → app-data}/index.js +17 -11
  4. package/dist/{client-CSm3x5ke.mjs → client-D1MsT-Rp.mjs} +2717 -2424
  5. package/dist/compiler/index.d.mts +170 -6
  6. package/dist/compiler/index.mjs +4 -3
  7. package/dist/compiler/utils/index.d.mts +272 -2
  8. package/dist/compiler/utils/index.mjs +4 -3
  9. package/dist/{compiler-D6iP7Bzb.mjs → compiler-Cddp97Pg.mjs} +14953 -12327
  10. package/dist/declarations/stencil-ext-modules.d.ts +5 -5
  11. package/dist/declarations/stencil-public-compiler.d.ts +728 -287
  12. package/dist/declarations/stencil-public-compiler.js +2 -3
  13. package/dist/declarations/stencil-public-docs.d.ts +19 -0
  14. package/dist/declarations/stencil-public-runtime.d.ts +131 -17
  15. package/dist/fragment-Di1hWOC8.mjs +4 -0
  16. package/dist/{index-tUR6pD3J.d.mts → index-BHj3EBl2.d.mts} +1052 -668
  17. package/dist/{index-CyrGY82h.d.ts → index-D2PAsXxx.d.ts} +215 -40
  18. package/dist/index-VK8okIiF.d.mts +108 -0
  19. package/dist/index.d.mts +4 -1
  20. package/dist/index.mjs +91 -2
  21. package/dist/jsx-runtime.d.mts +18 -0
  22. package/dist/jsx-runtime.mjs +3 -0
  23. package/dist/{node-Bg-mO5dw.mjs → node-BQR4L-TG.mjs} +76 -73
  24. package/dist/reactive-controller-BdCpSAQP.d.mts +13 -0
  25. package/dist/{regular-expression-D5pGVpCu.mjs → regular-expression-XqU5zmPp.mjs} +141 -31
  26. package/dist/{chunk-CjcI7cDX.mjs → rolldown-runtime-BhDjJH2R.mjs} +1 -1
  27. package/dist/{runtime-BBCnuprF.js → runtime/client/lazy.js} +2987 -2443
  28. package/dist/runtime/client/{index.d.ts → runtime.d.ts} +228 -83
  29. package/dist/runtime/client/{index.js → runtime.js} +2852 -2432
  30. package/dist/runtime/index.d.ts +48 -29
  31. package/dist/runtime/index.js +5069 -2
  32. package/dist/runtime/server/index.d.mts +182 -75
  33. package/dist/runtime/server/index.mjs +2769 -2283
  34. package/dist/runtime/server/runner.d.mts +47 -32
  35. package/dist/runtime/server/runner.mjs +563 -687
  36. package/dist/signals/index.d.ts +49 -0
  37. package/dist/signals/index.js +199 -0
  38. package/dist/sys/node/index.d.mts +1 -2
  39. package/dist/sys/node/index.mjs +1 -1
  40. package/dist/sys/node/worker.d.mts +1 -1
  41. package/dist/sys/node/worker.mjs +6 -3
  42. package/dist/testing/index.d.mts +98 -9
  43. package/dist/testing/index.mjs +395 -70
  44. package/dist/util-BIa-iHnt.mjs +724 -0
  45. package/dist/validation-Dd3g77T5.mjs +778 -0
  46. package/package.json +49 -36
  47. package/dist/index-CXHCTQNt.d.mts +0 -190
  48. package/dist/index-hS-KBdAP.d.ts +0 -30
  49. package/dist/jsx-runtime-DlDkTqps.d.ts +0 -28
  50. package/dist/jsx-runtime.d.ts +0 -2
  51. package/dist/jsx-runtime.js +0 -2
  52. package/dist/runtime/app-data/index.d.ts +0 -2
  53. package/dist/validation-Byxie0Uk.mjs +0 -1445
  54. /package/{LICENSE.md → LICENSE} +0 -0
  55. /package/dist/{runtime/app-globals → app-globals}/index.d.ts +0 -0
  56. /package/dist/{runtime/app-globals → app-globals}/index.js +0 -0
@@ -1,4 +1,6 @@
1
- import { BUILD, Env, NAMESPACE } from "@stencil/core/runtime/app-data";
1
+ import { BUILD, Env, NAMESPACE } from "@stencil/core/app-data";
2
+ import "rolldown";
3
+ import "typescript";
2
4
  //#region src/declarations/stencil-public-runtime.d.ts
3
5
  interface ElementDecorator {
4
6
  (): PropertyDecorator;
@@ -49,6 +51,27 @@ interface HTMLStencilElement extends HTMLElement {
49
51
  componentOnReady(): Promise<this>;
50
52
  }
51
53
  type TagTransformer = (tag: string) => string;
54
+ /**
55
+ * A constructor type that can be used as the base for mixin factories.
56
+ *
57
+ * ```ts
58
+ * import { MixedInCtor } from '@stencil/core';
59
+ *
60
+ * const AFactoryFn = <B extends MixedInCtor>(Base: B) => {class A extends Base { propA = A }; return A;}
61
+ * ```
62
+ */
63
+ type MixedInCtor<T = {}> = new (...args: any[]) => T;
64
+ /**
65
+ * A map of `@Prop`/`@State` property names to their new and previous
66
+ * values, passed to `componentShouldUpdate` once per render cycle.
67
+ *
68
+ * Pass `this` as `T` to type `changes` against your component's own
69
+ * members, e.g. `componentShouldUpdate(changes: ComponentShouldUpdateChanges<this>)`.
70
+ */
71
+ type ComponentShouldUpdateChanges<T = any> = { [K in Extract<keyof T, string>]?: {
72
+ newVal: T[K];
73
+ oldVal: T[K];
74
+ }; };
52
75
  interface ComponentInterface {
53
76
  connectedCallback?(): void;
54
77
  disconnectedCallback?(): void;
@@ -74,14 +97,18 @@ interface ComponentInterface {
74
97
  */
75
98
  componentDidLoad?(): void;
76
99
  /**
77
- * A `@Prop` or `@State` property changed and a rerender is about to be requested.
100
+ * One or more `@Prop` or `@State` properties changed and a rerender is
101
+ * about to be requested. `changes` contains every property that changed
102
+ * since the last render, keyed by property name.
78
103
  *
79
- * Called multiple times throughout the life of
80
- * the component as its properties change.
104
+ * Called once per render cycle, batching all properties that changed
105
+ * synchronously since the last render.
106
+ *
107
+ * Return `false` to prevent the pending render.
81
108
  *
82
109
  * componentShouldUpdate is not called on the first render.
83
110
  */
84
- componentShouldUpdate?(newVal: any, oldVal: any, propName: string): boolean | void;
111
+ componentShouldUpdate?(changes: ComponentShouldUpdateChanges<this>): boolean | void;
85
112
  /**
86
113
  * The component is about to update and re-render.
87
114
  *
@@ -104,9 +131,47 @@ interface ComponentInterface {
104
131
  render?(): any;
105
132
  [memberName: string]: any;
106
133
  }
134
+ /**
135
+ * A reusable behavior that hooks into a `ReactiveControllerHost`'s lifecycle. Modeled after Lit's
136
+ * `ReactiveController` pattern: implement the hooks you need, then register an instance with a host
137
+ * via `host.addController(this)`.
138
+ */
139
+ interface ReactiveController {
140
+ hostConnected?(): void;
141
+ hostDisconnected?(): void;
142
+ hostWillLoad?(): Promise<void> | void;
143
+ hostDidLoad?(): void;
144
+ hostWillRender?(): Promise<void> | void;
145
+ hostDidRender?(): void;
146
+ hostWillUpdate?(): Promise<void> | void;
147
+ hostDidUpdate?(): void;
148
+ }
149
+ /**
150
+ * The shape added to a component by mixing in `ReactiveControllerHost` (see below).
151
+ */
152
+ interface ReactiveControllerHostInterface extends ComponentInterface, HTMLElement {
153
+ readonly controllers: ReadonlySet<ReactiveController>;
154
+ addController(controller: ReactiveController): void;
155
+ removeController(controller: ReactiveController): void;
156
+ requestUpdate(): void;
157
+ /**
158
+ * Resolves once the next pending render commits. Matches the shape of Lit's
159
+ * `ReactiveControllerHost.updateComplete`, for interop with controllers written against Lit's API
160
+ * (e.g. `@lit/context`).
161
+ */
162
+ readonly updateComplete: Promise<boolean>;
163
+ }
107
164
  interface RafCallback {
108
165
  (timeStamp: number): void;
109
166
  }
167
+ /**
168
+ * Minimal interface matched by signal objects (from @stencil/core/signals).
169
+ * Used in JSX attribute types.
170
+ */
171
+ interface SignalRef<T = any> {
172
+ readonly value: T;
173
+ peek(): T;
174
+ }
110
175
  /**
111
176
  * Utilities for working with functional Stencil components. An object
112
177
  * conforming to this interface is passed by the Stencil runtime as the third
@@ -148,7 +213,7 @@ interface FunctionalUtilities {
148
213
  map: (children: VNode[], cb: (vnode: ChildNode$1, index: number, array: ChildNode$1[]) => ChildNode$1) => VNode[];
149
214
  }
150
215
  interface FunctionalComponent<T = {}> {
151
- (props: T, children: VNode[], utils: FunctionalUtilities): VNode | VNode[] | null;
216
+ (props: T, children: VNode[], utils: FunctionalUtilities): VNode | null;
152
217
  }
153
218
  /**
154
219
  * A Child VDOM node
@@ -159,7 +224,7 @@ interface FunctionalComponent<T = {}> {
159
224
  * {@link FunctionalUtilities}).
160
225
  */
161
226
  interface ChildNode$1 {
162
- vtag?: string | number | Function;
227
+ vtag?: string | number | Function | symbol | null;
163
228
  vkey?: string | number;
164
229
  vtext?: string;
165
230
  vchildren?: VNode[];
@@ -171,13 +236,15 @@ interface ChildNode$1 {
171
236
  */
172
237
  interface VNode {
173
238
  $flags$: number;
174
- $tag$: string | number | Function;
239
+ $tag$: string | number | Function | symbol | null;
175
240
  $elm$: any;
176
241
  $text$: string;
177
242
  $children$: VNode[];
178
243
  $attrs$?: any;
179
244
  $name$?: string;
180
245
  $key$?: string | number;
246
+ /** Signal reference for vdom bypass: signal text nodes store the signal here. */
247
+ $signal$?: any;
181
248
  }
182
249
  declare namespace JSXBase {
183
250
  interface IntrinsicElements {
@@ -435,6 +502,7 @@ declare namespace JSXBase {
435
502
  onClose?: (event: Event$1) => void;
436
503
  open?: boolean;
437
504
  returnValue?: string;
505
+ closedby?: 'any' | 'closerequest' | 'none';
438
506
  }
439
507
  interface EmbedHTMLAttributes<T> extends HTMLAttributes<T> {
440
508
  height?: number | string;
@@ -472,6 +540,8 @@ declare namespace JSXBase {
472
540
  allowtransparency?: string | boolean;
473
541
  frameBorder?: number | string;
474
542
  frameborder?: number | string;
543
+ fetchPriority?: 'high' | 'low' | 'auto';
544
+ fetchpriority?: 'high' | 'low' | 'auto';
475
545
  importance?: 'low' | 'auto' | 'high';
476
546
  height?: number | string;
477
547
  loading?: 'lazy' | 'auto' | 'eager';
@@ -494,9 +564,12 @@ declare namespace JSXBase {
494
564
  crossOrigin?: string;
495
565
  crossorigin?: string;
496
566
  decoding?: 'async' | 'auto' | 'sync';
567
+ fetchPriority?: 'high' | 'low' | 'auto';
568
+ fetchpriority?: 'high' | 'low' | 'auto';
497
569
  importance?: 'low' | 'auto' | 'high';
498
570
  height?: number | string;
499
571
  loading?: 'lazy' | 'auto' | 'eager';
572
+ referrerPolicy?: ReferrerPolicy;
500
573
  sizes?: string;
501
574
  src?: string;
502
575
  srcSet?: string;
@@ -592,6 +665,8 @@ declare namespace JSXBase {
592
665
  }
593
666
  interface LinkHTMLAttributes<T> extends HTMLAttributes<T> {
594
667
  as?: string;
668
+ fetchPriority?: 'high' | 'low' | 'auto';
669
+ fetchpriority?: 'high' | 'low' | 'auto';
595
670
  href?: string;
596
671
  hrefLang?: string;
597
672
  hreflang?: string;
@@ -715,6 +790,8 @@ declare namespace JSXBase {
715
790
  crossOrigin?: string;
716
791
  crossorigin?: string;
717
792
  defer?: boolean;
793
+ fetchPriority?: 'high' | 'low' | 'auto';
794
+ fetchpriority?: 'high' | 'low' | 'auto';
718
795
  importance?: 'low' | 'auto' | 'high';
719
796
  integrity?: string;
720
797
  nonce?: string;
@@ -812,7 +889,7 @@ declare namespace JSXBase {
812
889
  autofocus?: boolean | string;
813
890
  class?: string | {
814
891
  [className: string]: boolean;
815
- };
892
+ } | SignalRef<string>;
816
893
  contentEditable?: boolean | string;
817
894
  contenteditable?: boolean | string;
818
895
  contextMenu?: string;
@@ -830,7 +907,10 @@ declare namespace JSXBase {
830
907
  tabIndex?: number;
831
908
  tabindex?: number | string;
832
909
  title?: string;
910
+ translate?: 'yes' | 'no' | (string & {});
833
911
  popover?: string | null;
912
+ focusgroup?: string;
913
+ focusgroupstart?: boolean;
834
914
  inputMode?: string;
835
915
  inputmode?: string;
836
916
  enterKeyHint?: string;
@@ -871,7 +951,7 @@ declare namespace JSXBase {
871
951
  interface SVGAttributes<T = SVGElement> extends DOMAttributes<T> {
872
952
  class?: string | {
873
953
  [className: string]: boolean;
874
- };
954
+ } | SignalRef<string>;
875
955
  color?: string;
876
956
  height?: number | string;
877
957
  id?: string;
@@ -1272,10 +1352,13 @@ declare namespace JSXBase {
1272
1352
  interface JSXAttributes<T = Element$2> {
1273
1353
  key?: string | number;
1274
1354
  ref?: (elm?: T) => void;
1355
+ children?: any;
1275
1356
  }
1276
1357
  interface CustomElementsDefineOptions {
1277
1358
  exclude?: string[];
1278
1359
  syncQueue?: boolean;
1360
+ /** Scoped custom element registry to define components in. Defaults to the global registry. */
1361
+ registry?: CustomElementRegistry;
1279
1362
  jmp?: (c: Function) => any;
1280
1363
  raf?: (c: FrameRequestCallback) => number;
1281
1364
  ael?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
@@ -1284,7 +1367,7 @@ interface CustomElementsDefineOptions {
1284
1367
  }
1285
1368
  //#endregion
1286
1369
  //#region src/declarations/stencil-public-compiler.d.ts
1287
- interface HydrateDocumentOptions {
1370
+ interface SsrDocumentOptions {
1288
1371
  /**
1289
1372
  * Build ID that will be added to `<html data-stencil-build="BUILD_ID">`. By default
1290
1373
  * a random ID will be generated
@@ -1301,7 +1384,7 @@ interface HydrateDocumentOptions {
1301
1384
  * JavaScript to read the structure of the HTML and rebuild each
1302
1385
  * component. Defaults to `true`.
1303
1386
  */
1304
- clientHydrateAnnotations?: boolean;
1387
+ clientSsrAnnotations?: boolean;
1305
1388
  /**
1306
1389
  * Constrain `setTimeout()` to 1ms, but still async. Also
1307
1390
  * only allows `setInterval()` to fire once, also constrained to 1ms.
@@ -1400,10 +1483,14 @@ interface HydrateDocumentOptions {
1400
1483
  default: 'declarative-shadow-dom' | 'scoped';
1401
1484
  } | boolean;
1402
1485
  }
1403
- interface SerializeDocumentOptions extends HydrateDocumentOptions {
1486
+ interface SerializeDocumentOptions extends SsrDocumentOptions {
1404
1487
  /**
1405
1488
  * Runs after the `document` has been hydrated.
1406
1489
  */
1490
+ afterSsr?(document: any): any | Promise<any>;
1491
+ /**
1492
+ * @deprecated Use `afterSsr` instead.
1493
+ */
1407
1494
  afterHydrate?(document: any): any | Promise<any>;
1408
1495
  /**
1409
1496
  * Sets an approximate line width the HTML should attempt to stay within.
@@ -1416,6 +1503,10 @@ interface SerializeDocumentOptions extends HydrateDocumentOptions {
1416
1503
  /**
1417
1504
  * Runs before the `document` has been hydrated.
1418
1505
  */
1506
+ beforeSsr?(document: any): any | Promise<any>;
1507
+ /**
1508
+ * @deprecated Use `beforeSsr` instead.
1509
+ */
1419
1510
  beforeHydrate?(document: any): any | Promise<any>;
1420
1511
  /**
1421
1512
  * Format the HTML in a nicely indented format.
@@ -1453,7 +1544,7 @@ interface SerializeDocumentOptions extends HydrateDocumentOptions {
1453
1544
  */
1454
1545
  modes?: ResolutionHandler[];
1455
1546
  }
1456
- interface HydrateFactoryOptions extends SerializeDocumentOptions {
1547
+ interface SsrFactoryOptions extends SerializeDocumentOptions {
1457
1548
  serializeToHtml: boolean;
1458
1549
  destroyWindow: boolean;
1459
1550
  destroyDocument: boolean;
@@ -1523,7 +1614,7 @@ interface HostElement extends HTMLElement {
1523
1614
  disconnectedCallback?: () => void;
1524
1615
  host?: Element;
1525
1616
  forceUpdate?: () => void;
1526
- __stencil__getHostRef?: () => HostRef;
1617
+ __s_ghr?: () => HostRef;
1527
1618
  /**
1528
1619
  * Unique stencil id for this element
1529
1620
  */
@@ -1577,6 +1668,15 @@ interface HostElement extends HTMLElement {
1577
1668
  * must be resolved for the top, ancestor component to be fully hydrated
1578
1669
  */
1579
1670
  ['s-p']?: Promise<void>[];
1671
+ /**
1672
+ * Pending Connects:
1673
+ * A list of {@link HostRef.$onFirstConnectPromise$} promises for descendants that
1674
+ * were already registered with this component (their nearest Stencil ancestor) by
1675
+ * the time this component's own initial `componentWillLoad` was scheduled. Awaited
1676
+ * so this component's `componentWillLoad` can't fire before those descendants'
1677
+ * real `connectedCallback`s have.
1678
+ */
1679
+ ['s-pc']?: Promise<void>[];
1580
1680
  componentOnReady?: () => Promise<this>;
1581
1681
  }
1582
1682
  /**
@@ -1616,6 +1716,11 @@ interface RenderNode extends HostElement {
1616
1716
  * Slot name of either the slot itself or the slotted node
1617
1717
  */
1618
1718
  ['s-sn']?: string;
1719
+ /**
1720
+ * `slot` attribute of a `<slot>` reference rendered as a text node (no fallback content),
1721
+ * since text nodes can't carry real DOM attributes.
1722
+ */
1723
+ ['s-sa']?: string;
1619
1724
  /**
1620
1725
  * Host element tag name:
1621
1726
  * The tag name of the host element that this
@@ -1668,64 +1773,64 @@ interface RenderNode extends HostElement {
1668
1773
  * Used to know the components encapsulation.
1669
1774
  * empty "" for shadow, "c" from scoped
1670
1775
  */
1671
- ['s-en']?: '' | /*shadow*/'c';
1776
+ ['s-en']?: '' | /*shadow*/ 'c';
1672
1777
  /**
1673
1778
  * On a `scoped: true` component
1674
- * with `experimentalSlotFixes` flag enabled,
1779
+ * with `lightDomPatches` flag enabled,
1675
1780
  * returns the internal `childNodes` of the component
1676
1781
  */
1677
1782
  readonly __childNodes?: NodeListOf<ChildNode>;
1678
1783
  /**
1679
1784
  * On a `scoped: true` component
1680
- * with `experimentalSlotFixes` flag enabled,
1785
+ * with `lightDomPatches` flag enabled,
1681
1786
  * returns the internal `children` of the component
1682
1787
  */
1683
1788
  readonly __children?: HTMLCollectionOf<Element>;
1684
1789
  /**
1685
1790
  * On a `scoped: true` component
1686
- * with `experimentalSlotFixes` flag enabled,
1791
+ * with `lightDomPatches` flag enabled,
1687
1792
  * returns the internal `firstChild` of the component
1688
1793
  */
1689
1794
  readonly __firstChild?: ChildNode;
1690
1795
  /**
1691
1796
  * On a `scoped: true` component
1692
- * with `experimentalSlotFixes` flag enabled,
1797
+ * with `lightDomPatches` flag enabled,
1693
1798
  * returns the internal `lastChild` of the component
1694
1799
  */
1695
1800
  readonly __lastChild?: ChildNode;
1696
1801
  /**
1697
1802
  * On a `scoped: true` component
1698
- * with `experimentalSlotFixes` flag enabled,
1803
+ * with `lightDomPatches` flag enabled,
1699
1804
  * returns the internal `textContent` of the component
1700
1805
  */
1701
1806
  __textContent?: string;
1702
1807
  /**
1703
1808
  * On a `scoped: true` component
1704
- * with `experimentalSlotFixes` flag enabled,
1809
+ * with `lightDomPatches` flag enabled,
1705
1810
  * gives access to the original `append` method
1706
1811
  */
1707
1812
  __append?: (...nodes: (Node | string)[]) => void;
1708
1813
  /**
1709
1814
  * On a `scoped: true` component
1710
- * with `experimentalSlotFixes` flag enabled,
1815
+ * with `lightDomPatches` flag enabled,
1711
1816
  * gives access to the original `prepend` method
1712
1817
  */
1713
1818
  __prepend?: (...nodes: (Node | string)[]) => void;
1714
1819
  /**
1715
1820
  * On a `scoped: true` component
1716
- * with `experimentalSlotFixes` flag enabled,
1821
+ * with `lightDomPatches` flag enabled,
1717
1822
  * gives access to the original `appendChild` method
1718
1823
  */
1719
1824
  __appendChild?: <T extends Node>(newChild: T) => T;
1720
1825
  /**
1721
1826
  * On a `scoped: true` component
1722
- * with `experimentalSlotFixes` flag enabled,
1827
+ * with `lightDomPatches` flag enabled,
1723
1828
  * gives access to the original `insertBefore` method
1724
1829
  */
1725
1830
  __insertBefore?: <T extends Node>(node: T, child: Node | null) => T;
1726
1831
  /**
1727
1832
  * On a `scoped: true` component
1728
- * with `experimentalSlotFixes` flag enabled,
1833
+ * with `lightDomPatches` flag enabled,
1729
1834
  * gives access to the original `removeChild` method
1730
1835
  */
1731
1836
  __removeChild?: <T extends Node>(child: T) => T;
@@ -1763,40 +1868,56 @@ interface PatchedSlotNode extends Node {
1763
1868
  ['s-sr']?: boolean;
1764
1869
  /**
1765
1870
  * On a `scoped: true` component
1766
- * with `experimentalSlotFixes` flag enabled,
1871
+ * with `lightDomPatches` flag enabled,
1767
1872
  * returns the actual `parentNode` of the component
1768
1873
  */
1769
1874
  __parentNode?: RenderNode;
1770
1875
  /**
1771
1876
  * On a `scoped: true` component
1772
- * with `experimentalSlotFixes` flag enabled,
1877
+ * with `lightDomPatches` flag enabled,
1773
1878
  * returns the actual `nextSibling` of the component
1774
1879
  */
1775
1880
  __nextSibling?: RenderNode;
1776
1881
  /**
1777
1882
  * On a `scoped: true` component
1778
- * with `experimentalSlotFixes` flag enabled,
1883
+ * with `lightDomPatches` flag enabled,
1779
1884
  * returns the actual `previousSibling` of the component
1780
1885
  */
1781
1886
  __previousSibling?: RenderNode;
1782
1887
  /**
1783
1888
  * On a `scoped: true` component
1784
- * with `experimentalSlotFixes` flag enabled,
1889
+ * with `lightDomPatches` flag enabled,
1785
1890
  * returns the actual `nextElementSibling` of the component
1786
1891
  */
1787
1892
  __nextElementSibling?: RenderNode;
1788
1893
  /**
1789
1894
  * On a `scoped: true` component
1790
- * with `experimentalSlotFixes` flag enabled,
1895
+ * with `lightDomPatches` flag enabled,
1791
1896
  * returns the actual `nextElementSibling` of the component
1792
1897
  */
1793
1898
  __previousElementSibling?: RenderNode;
1794
1899
  }
1795
1900
  type LazyBundlesRuntimeData = LazyBundleRuntimeData[];
1796
- type LazyBundleRuntimeData = [/** bundleIds */string, ComponentRuntimeMetaCompact[]];
1797
- type ComponentRuntimeMetaCompact = [/** flags */number, /** tagname */string, /** members */{
1901
+ type LazyBundleRuntimeData = [
1902
+ /** bundleIds */
1903
+ string, ComponentRuntimeMetaCompact[]];
1904
+ type ComponentRuntimeMetaCompact = [
1905
+ /** flags */
1906
+ number,
1907
+ /** tagname */
1908
+ string,
1909
+ /** members */
1910
+ {
1798
1911
  [memberName: string]: ComponentRuntimeMember;
1799
- }?, /** listeners */ComponentRuntimeHostListener[]?, /** watchers */ComponentConstructorChangeHandlers?, /** serializers */ComponentConstructorChangeHandlers?, /** deserializers */ComponentConstructorChangeHandlers?];
1912
+ }?,
1913
+ /** listeners */
1914
+ ComponentRuntimeHostListener[]?,
1915
+ /** watchers */
1916
+ ComponentConstructorChangeHandlers?,
1917
+ /** serializers */
1918
+ ComponentConstructorChangeHandlers?,
1919
+ /** deserializers */
1920
+ ComponentConstructorChangeHandlers?];
1800
1921
  /**
1801
1922
  * Runtime metadata for a Stencil component
1802
1923
  */
@@ -1888,7 +2009,7 @@ type ComponentRuntimeReflectingAttr = [string, string | undefined];
1888
2009
  * associated {@link HostRef} instance.
1889
2010
  */
1890
2011
  type RuntimeRef = HostElement | {
1891
- __stencil__getHostRef?: () => HostRef;
2012
+ __s_ghr?: () => HostRef;
1892
2013
  };
1893
2014
  /**
1894
2015
  * Interface used to track an Element, it's virtual Node (`VNode`), and other data
@@ -1899,6 +2020,14 @@ interface HostRef {
1899
2020
  $cmpMeta$: ComponentRuntimeMeta;
1900
2021
  $hostElement$: HostElement;
1901
2022
  $instanceValues$?: Map<string, any>;
2023
+ /**
2024
+ * Prop/state changes accumulated since the last render, flushed to
2025
+ * `componentShouldUpdate` once per render cycle.
2026
+ */
2027
+ $queuedPropChanges$?: ComponentShouldUpdateChanges;
2028
+ $signalValues$?: Map<string, import('@preact/signals-core').Signal<any>>;
2029
+ /** Dispose function that tears down all signal effects for this component. */
2030
+ $signalCleanup$?: () => void;
1902
2031
  $serializerValues$?: Map<string, string>;
1903
2032
  $lazyInstance$?: ComponentInterface;
1904
2033
  /**
@@ -1931,6 +2060,21 @@ interface HostRef {
1931
2060
  * It is called after {@link HostRef.$onInstancePromise$} resolves.
1932
2061
  */
1933
2062
  $onRenderResolve$?: () => void;
2063
+ /**
2064
+ * A promise that resolves once this component's real `connectedCallback` has fired
2065
+ * for the first time. Created lazily - either by a descendant that needs to wait for
2066
+ * this component's connection before firing its own real `connectedCallback`
2067
+ * ({@link HOST_FLAGS.hasFiredConnected}), or by this component registering itself
2068
+ * with its nearest Stencil ancestor's `s-pc` list. This is what lets a component's
2069
+ * real `connectedCallback` (and, transitively, a pending ancestor's initial
2070
+ * `componentWillLoad`) stay ordered correctly regardless of which of an
2071
+ * ancestor/descendant pair's lazy module happens to resolve first.
2072
+ */
2073
+ $onFirstConnectPromise$?: Promise<void>;
2074
+ /**
2075
+ * A callback which resolves {@link HostRef.$onFirstConnectPromise$}
2076
+ */
2077
+ $onFirstConnectResolve$?: () => void;
1934
2078
  $vnode$?: VNode;
1935
2079
  $queuedListeners$?: [string, any][];
1936
2080
  $rmListeners$?: (() => void)[];
@@ -1940,6 +2084,11 @@ interface HostRef {
1940
2084
  * Defer connectedCallback until after first render for components with slot relocation.
1941
2085
  */
1942
2086
  $deferredConnectedCallback$?: boolean;
2087
+ /**
2088
+ * The number of times this host's lazy component load has failed and been retried.
2089
+ * Used to give up retrying after {@link MAX_LAZY_LOAD_RETRIES} failed attempts.
2090
+ */
2091
+ $loadRetryCount$?: number;
1943
2092
  }
1944
2093
  interface PlatformRuntime {
1945
2094
  /**
@@ -2109,6 +2258,7 @@ declare const isMemberInElement: (elm: any, memberName: string) => boolean;
2109
2258
  declare const cmpModules: Map<string, {
2110
2259
  [exportName: string]: ComponentConstructor;
2111
2260
  }>;
2261
+ declare const setLazyLoadBasePath: (url: string) => void;
2112
2262
  declare const loadModule: (cmpMeta: ComponentRuntimeMeta, hostRef: HostRef, hmrVersionId?: string) => Promise<ComponentConstructor | undefined> | ComponentConstructor | undefined;
2113
2263
  //#endregion
2114
2264
  //#region src/client/client-log.d.ts
@@ -2122,7 +2272,7 @@ declare const setErrorHandler: (handler: ErrorHandler) => ErrorHandler;
2122
2272
  //#region src/client/client-style.d.ts
2123
2273
  declare const styles: StyleMap;
2124
2274
  declare const modeResolutionChain: ResolutionHandler[];
2125
- declare const setScopedSSR: (_opts: HydrateFactoryOptions) => void;
2275
+ declare const setScopedSsr: (_opts: SsrFactoryOptions) => void;
2126
2276
  declare const needsScopedSSR: () => boolean;
2127
2277
  //#endregion
2128
2278
  //#region src/client/client-task-queue.d.ts
@@ -2144,7 +2294,6 @@ declare const setPlatformHelpers: (helpers: {
2144
2294
  rel?: (el: any, eventName: string, listener: any, options: any) => void;
2145
2295
  ce?: (eventName: string, opts?: any) => any;
2146
2296
  }) => void;
2147
- declare const supportsShadow: boolean;
2148
2297
  declare const supportsListenerOptions: boolean;
2149
2298
  declare const promiseResolve: (v?: any) => Promise<any>;
2150
2299
  declare const supportsConstructableStylesheets: boolean;
@@ -2154,12 +2303,16 @@ declare const supportsMutableAdoptedStyleSheets: boolean;
2154
2303
  declare const getAssetPath: (path: string) => string;
2155
2304
  declare const setAssetPath: (path: string) => string;
2156
2305
  //#endregion
2157
- //#region src/runtime/bootstrap-custom-element.d.ts
2306
+ //#region src/runtime/bootstrap-standalone.d.ts
2158
2307
  declare const defineCustomElement: (Cstr: any, compactMeta: ComponentRuntimeMetaCompact) => void;
2159
2308
  declare const proxyCustomElement: (Cstr: any, compactMeta: ComponentRuntimeMetaCompact) => any;
2160
2309
  declare const forceModeUpdate: (elm: RenderNode) => void;
2161
2310
  //#endregion
2162
- //#region src/runtime/bootstrap-lazy.d.ts
2311
+ //#region src/runtime/registry.d.ts
2312
+ declare const setRegistry: (registry: CustomElementRegistry) => void;
2313
+ declare const getRegistry: () => CustomElementRegistry;
2314
+ //#endregion
2315
+ //#region src/runtime/bootstrap-loader.d.ts
2163
2316
  declare const bootstrapLazy: (lazyBundles: LazyBundlesRuntimeData, options?: CustomElementsDefineOptions) => void;
2164
2317
  //#endregion
2165
2318
  //#region src/runtime/connected-callback.d.ts
@@ -2211,6 +2364,30 @@ declare const getMode: (ref: RuntimeRef) => string;
2211
2364
  */
2212
2365
  declare const setNonce: (nonce: string) => string;
2213
2366
  //#endregion
2367
+ //#region src/runtime/normalize-watchers.d.ts
2368
+ /**
2369
+ * Normalizes watcher metadata to the current `{ [methodName]: flags }[]` format.
2370
+ *
2371
+ * Prior to Stencil 4.39.x (PR #6484), the `@Watch()` compiler emitted watcher
2372
+ * handlers as a plain string array: `{ "min": ["minChanged"] }`. The new format
2373
+ * wraps each entry in an object that carries option flags (e.g. `immediate`):
2374
+ * `{ "min": [{ "minChanged": 0 }] }`.
2375
+ *
2376
+ * When a library (e.g. Ionic Framework) was compiled with an older Stencil compiler
2377
+ * but consumed by an app using a newer Stencil runtime, the runtime's
2378
+ * `Object.entries(watcher)` call receives a string and misinterprets its character
2379
+ * indices as method names, causing:
2380
+ * `TypeError: instance[watchMethodName] is not a function`
2381
+ *
2382
+ * This helper should be used at `$watchers$` assignment sites that need to
2383
+ * accept both legacy and current compiler metadata so downstream code on those
2384
+ * paths can safely assume the new object format.
2385
+ *
2386
+ * @param raw The raw watcher map from compiled metadata (new or legacy format).
2387
+ * @returns A normalized watcher map in the `{ [methodName]: flags }[]` format, or `undefined` if `raw` is `undefined` or empty.
2388
+ */
2389
+ declare const normalizeWatchers: (raw: ComponentConstructorChangeHandlers | undefined) => ComponentConstructorChangeHandlers | undefined;
2390
+ //#endregion
2214
2391
  //#region src/runtime/parse-property-value.d.ts
2215
2392
  /**
2216
2393
  * Parse a new property value for a given property type.
@@ -2265,10 +2442,17 @@ declare const setPlatformOptions: (opts: SetPlatformOptions) => PlatformRuntime
2265
2442
  */
2266
2443
  declare const proxyComponent: (Cstr: ComponentConstructor, cmpMeta: ComponentRuntimeMeta, flags: number) => ComponentConstructor;
2267
2444
  //#endregion
2445
+ //#region src/runtime/reactive-controller.d.ts
2446
+ declare const ReactiveControllerHost: <B extends MixedInCtor<ComponentInterface & HTMLElement>>(Base: B) => B & MixedInCtor<ReactiveControllerHostInterface>;
2447
+ //#endregion
2268
2448
  //#region src/runtime/render.d.ts
2269
2449
  /**
2270
2450
  * Method to render a virtual DOM tree to a container element.
2271
2451
  *
2452
+ * Supports efficient re-renders: calling `render()` again on the same container
2453
+ * will diff the new VNode tree against the previous one and only update what changed,
2454
+ * preserving existing DOM elements and their state.
2455
+ *
2272
2456
  * @example
2273
2457
  * ```tsx
2274
2458
  * import { render } from '@stencil/core';
@@ -2316,53 +2500,14 @@ declare const h: (nodeName: any, vnodeData: any, ...children: ChildType[]) => VN
2316
2500
  declare const Host: {};
2317
2501
  //#endregion
2318
2502
  //#region src/runtime/vdom/jsx-runtime.d.ts
2319
- /**
2320
- * JSX runtime function for creating elements in production mode.
2321
- * Called by TypeScript's jsx transform for elements without static children.
2322
- *
2323
- * @param type - The element type (string tag name or functional component)
2324
- * @param props - The element props (includes children)
2325
- * @param key - Optional key for the element
2326
- * @returns A virtual DOM node
2327
- */
2328
2503
  declare function jsx(type: any, props: any, key?: string): VNode;
2329
2504
  /**
2330
- * JSX runtime function for creating elements with static children.
2331
- * Called by TypeScript's jsx transform as an optimization when children are static.
2332
- *
2333
- * @param type - The element type (string tag name or functional component)
2334
- * @param props - The element props (includes children)
2335
- * @param key - Optional key for the element
2336
- * @returns A virtual DOM node
2505
+ * @alias
2337
2506
  */
2338
- declare function jsxs(type: any, props: any, key?: string): VNode;
2339
- //#endregion
2340
- //#region src/runtime/vdom/vdom-annotations.d.ts
2507
+ declare const jsxs: typeof jsx;
2341
2508
  /**
2342
- * Updates the DOM generated on the server with annotations such as node attributes and
2343
- * comment nodes to facilitate future client-side hydration. These annotations are used for things
2344
- * like moving elements back to their original hosts if using Shadow DOM on the client, and for quickly
2345
- * reconstructing the vNode representations of the DOM.
2346
- *
2347
- * @param doc The DOM generated by the server.
2348
- * @param staticComponents Any components that should be considered static and do not need client-side hydration.
2349
- */
2350
- declare const insertVdomAnnotations: (doc: Document, staticComponents: string[]) => void;
2351
- //#endregion
2352
- //#region src/runtime/vdom/vdom-render.d.ts
2353
- /**
2354
- * The main entry point for Stencil's virtual DOM-based rendering engine
2355
- *
2356
- * Given a {@link d.HostRef} container and some virtual DOM nodes, this
2357
- * function will handle creating a virtual DOM tree with a single root, patching
2358
- * the current virtual DOM tree onto an old one (if any), dealing with slot
2359
- * relocation, and reflecting attributes.
2360
- *
2361
- * @param hostRef data needed to root and render the virtual DOM tree, such as
2362
- * the DOM node into which it should be rendered.
2363
- * @param renderFnResults the virtual DOM nodes to be rendered
2364
- * @param isInitialLoad whether or not this is the first call after page load
2509
+ * @alias
2365
2510
  */
2366
- declare const renderVdom: (hostRef: HostRef, renderFnResults: VNode | VNode[], isInitialLoad?: boolean) => void;
2511
+ declare const jsxDEV: typeof jsx;
2367
2512
  //#endregion
2368
- export { AttachInternals, AttrDeserialize, BUILD, Build, Component, Element$1 as Element, Env, Event, Fragment, H, H as HTMLElement, type HTMLStencilElement, HYDRATED_STYLE_ID, Host, type JSXBase, Listen, Method, Mixin, NAMESPACE, Prop, PropSerialize, STENCIL_DEV_MODE, State, Watch, addHostEventListeners, bootstrapLazy, cmpModules, connectedCallback, consoleDevError, consoleDevInfo, consoleDevWarn, consoleError, createEvent, defineCustomElement, disconnectedCallback, forceModeUpdate, forceUpdate, getAssetPath, getElement, getHostRef, getMode, getRenderingRef, getShadowRoot, getValue, h, insertVdomAnnotations, isMemberInElement, jsx, jsxs, loadModule, modeResolutionChain, needsScopedSSR, nextTick, parsePropertyValue, plt, postUpdateComponent, promiseResolve, proxyComponent, proxyCustomElement, readTask, registerHost, registerInstance, render, renderVdom, resolveVar, setAssetPath, setErrorHandler, setMode, setNonce, setPlatformHelpers, setPlatformOptions, setScopedSSR, setTagTransformer, setValue, styles, supportsConstructableStylesheets, supportsListenerOptions, supportsMutableAdoptedStyleSheets, supportsShadow, transformTag, win, writeTask };
2513
+ export { AttachInternals, AttrDeserialize, BUILD, Build, Component, Element$1 as Element, Env, Event, Fragment, H, H as HTMLElement, type HTMLStencilElement, HYDRATED_STYLE_ID, Host, type JSXBase, Listen, Method, Mixin, NAMESPACE, Prop, PropSerialize, ReactiveControllerHost, STENCIL_DEV_MODE, State, Watch, addHostEventListeners, bootstrapLazy, cmpModules, connectedCallback, consoleDevError, consoleDevInfo, consoleDevWarn, consoleError, createEvent, defineCustomElement, disconnectedCallback, forceModeUpdate, forceUpdate, getAssetPath, getElement, getHostRef, getMode, getRegistry, getRenderingRef, getShadowRoot, getValue, h, isMemberInElement, jsx, jsxDEV, jsxs, loadModule, modeResolutionChain, needsScopedSSR, nextTick, normalizeWatchers, parsePropertyValue, plt, postUpdateComponent, promiseResolve, proxyComponent, proxyCustomElement, readTask, registerHost, registerInstance, render, resolveVar, setAssetPath, setErrorHandler, setLazyLoadBasePath, setMode, setNonce, setPlatformHelpers, setPlatformOptions, setRegistry, setScopedSsr, setTagTransformer, setValue, styles, supportsConstructableStylesheets, supportsListenerOptions, supportsMutableAdoptedStyleSheets, transformTag, win, writeTask };