@stencil/core 5.0.0-alpha.5 → 5.0.0-alpha.6

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 (43) hide show
  1. package/dist/{client-Dnio47yQ.mjs → client-fWOou5EW.mjs} +2324 -2125
  2. package/dist/compiler/index.d.mts +5 -5
  3. package/dist/compiler/index.mjs +2 -2
  4. package/dist/compiler/utils/index.d.mts +2 -2
  5. package/dist/compiler/utils/index.mjs +3 -3
  6. package/dist/{compiler-Dxri2g8Z.mjs → compiler-CdUbDTbV.mjs} +13329 -12670
  7. package/dist/declarations/stencil-public-compiler.d.ts +254 -121
  8. package/dist/declarations/stencil-public-docs.d.ts +10 -0
  9. package/dist/declarations/stencil-public-runtime.d.ts +49 -12
  10. package/dist/{index-D5zaocDq.d.mts → index-D8vvsppY.d.mts} +228 -180
  11. package/dist/{index-D61XZw0f.d.ts → index-Dap2E02-.d.ts} +82 -31
  12. package/dist/{index-Dat4djoo.d.mts → index-UUlemGuu.d.mts} +13 -2
  13. package/dist/index.d.mts +0 -1
  14. package/dist/index.mjs +1 -1
  15. package/dist/jsx-runtime.d.mts +18 -0
  16. package/dist/jsx-runtime.mjs +2 -0
  17. package/dist/{node-pj6rF4Wt.mjs → node-klLZLdDe.mjs} +59 -55
  18. package/dist/{regular-expression-D0_N0PGa.mjs → regular-expression-DUdhF3Ei.mjs} +72 -6
  19. package/dist/runtime/app-data/index.d.ts +1 -1
  20. package/dist/runtime/app-data/index.js +15 -9
  21. package/dist/{runtime-CKyUrF4i.js → runtime/client/lazy.js} +2539 -2199
  22. package/dist/runtime/client/{index.d.ts → runtime.d.ts} +49 -40
  23. package/dist/runtime/client/{index.js → runtime.js} +2401 -2185
  24. package/dist/runtime/index.d.ts +20 -3
  25. package/dist/runtime/index.js +4956 -2
  26. package/dist/runtime/server/index.d.mts +30 -39
  27. package/dist/runtime/server/index.mjs +2369 -2185
  28. package/dist/runtime/server/runner.d.mts +4 -6
  29. package/dist/runtime/server/runner.mjs +307 -361
  30. package/dist/signals/index.d.ts +47 -0
  31. package/dist/signals/index.js +199 -0
  32. package/dist/sys/node/index.d.mts +1 -1
  33. package/dist/sys/node/index.mjs +1 -1
  34. package/dist/sys/node/worker.mjs +2 -2
  35. package/dist/testing/index.d.mts +97 -3
  36. package/dist/testing/index.mjs +199 -47
  37. package/dist/{validation-BA8nzXu_.mjs → validation-2QipI30K.mjs} +21 -32
  38. package/package.json +41 -27
  39. package/dist/index-D-XN9HW_.d.ts +0 -30
  40. package/dist/jsx-runtime-B3vQbWIW.d.ts +0 -28
  41. package/dist/jsx-runtime.d.ts +0 -2
  42. package/dist/jsx-runtime.js +0 -2
  43. /package/dist/{chunk-CjcI7cDX.mjs → chunk-z9aeyW2b.mjs} +0 -0
@@ -105,7 +105,7 @@ interface FunctionalUtilities {
105
105
  map: (children: VNode[], cb: (vnode: ChildNode$1, index: number, array: ChildNode$1[]) => ChildNode$1) => VNode[];
106
106
  }
107
107
  interface FunctionalComponent<T = {}> {
108
- (props: T, children: VNode[], utils: FunctionalUtilities): VNode | VNode[] | null;
108
+ (props: T, children: VNode[], utils: FunctionalUtilities): VNode | null;
109
109
  }
110
110
  /**
111
111
  * A Child VDOM node
@@ -116,7 +116,7 @@ interface FunctionalComponent<T = {}> {
116
116
  * {@link FunctionalUtilities}).
117
117
  */
118
118
  interface ChildNode$1 {
119
- vtag?: string | number | Function;
119
+ vtag?: string | number | Function | symbol | null;
120
120
  vkey?: string | number;
121
121
  vtext?: string;
122
122
  vchildren?: VNode[];
@@ -128,17 +128,21 @@ interface ChildNode$1 {
128
128
  */
129
129
  interface VNode {
130
130
  $flags$: number;
131
- $tag$: string | number | Function;
131
+ $tag$: string | number | Function | symbol | null;
132
132
  $elm$: any;
133
133
  $text$: string;
134
134
  $children$: VNode[];
135
135
  $attrs$?: any;
136
136
  $name$?: string;
137
137
  $key$?: string | number;
138
+ /** Signal reference for vdom bypass: signal text nodes store the signal here. */
139
+ $signal$?: any;
138
140
  }
139
141
  interface CustomElementsDefineOptions {
140
142
  exclude?: string[];
141
143
  syncQueue?: boolean;
144
+ /** Scoped custom element registry to define components in. Defaults to the global registry. */
145
+ registry?: CustomElementRegistry;
142
146
  jmp?: (c: Function) => any;
143
147
  raf?: (c: FrameRequestCallback) => number;
144
148
  ael?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
@@ -418,7 +422,7 @@ interface HostElement extends HTMLElement {
418
422
  disconnectedCallback?: () => void;
419
423
  host?: Element;
420
424
  forceUpdate?: () => void;
421
- __stencil__getHostRef?: () => HostRef;
425
+ __s_ghr?: () => HostRef;
422
426
  /**
423
427
  * Unique stencil id for this element
424
428
  */
@@ -618,61 +622,61 @@ interface RenderNode extends HostElement {
618
622
  ['s-en']?: '' | /*shadow*/'c';
619
623
  /**
620
624
  * On a `scoped: true` component
621
- * with `experimentalSlotFixes` flag enabled,
625
+ * with `lightDomPatches` flag enabled,
622
626
  * returns the internal `childNodes` of the component
623
627
  */
624
628
  readonly __childNodes?: NodeListOf<ChildNode>;
625
629
  /**
626
630
  * On a `scoped: true` component
627
- * with `experimentalSlotFixes` flag enabled,
631
+ * with `lightDomPatches` flag enabled,
628
632
  * returns the internal `children` of the component
629
633
  */
630
634
  readonly __children?: HTMLCollectionOf<Element>;
631
635
  /**
632
636
  * On a `scoped: true` component
633
- * with `experimentalSlotFixes` flag enabled,
637
+ * with `lightDomPatches` flag enabled,
634
638
  * returns the internal `firstChild` of the component
635
639
  */
636
640
  readonly __firstChild?: ChildNode;
637
641
  /**
638
642
  * On a `scoped: true` component
639
- * with `experimentalSlotFixes` flag enabled,
643
+ * with `lightDomPatches` flag enabled,
640
644
  * returns the internal `lastChild` of the component
641
645
  */
642
646
  readonly __lastChild?: ChildNode;
643
647
  /**
644
648
  * On a `scoped: true` component
645
- * with `experimentalSlotFixes` flag enabled,
649
+ * with `lightDomPatches` flag enabled,
646
650
  * returns the internal `textContent` of the component
647
651
  */
648
652
  __textContent?: string;
649
653
  /**
650
654
  * On a `scoped: true` component
651
- * with `experimentalSlotFixes` flag enabled,
655
+ * with `lightDomPatches` flag enabled,
652
656
  * gives access to the original `append` method
653
657
  */
654
658
  __append?: (...nodes: (Node | string)[]) => void;
655
659
  /**
656
660
  * On a `scoped: true` component
657
- * with `experimentalSlotFixes` flag enabled,
661
+ * with `lightDomPatches` flag enabled,
658
662
  * gives access to the original `prepend` method
659
663
  */
660
664
  __prepend?: (...nodes: (Node | string)[]) => void;
661
665
  /**
662
666
  * On a `scoped: true` component
663
- * with `experimentalSlotFixes` flag enabled,
667
+ * with `lightDomPatches` flag enabled,
664
668
  * gives access to the original `appendChild` method
665
669
  */
666
670
  __appendChild?: <T extends Node>(newChild: T) => T;
667
671
  /**
668
672
  * On a `scoped: true` component
669
- * with `experimentalSlotFixes` flag enabled,
673
+ * with `lightDomPatches` flag enabled,
670
674
  * gives access to the original `insertBefore` method
671
675
  */
672
676
  __insertBefore?: <T extends Node>(node: T, child: Node | null) => T;
673
677
  /**
674
678
  * On a `scoped: true` component
675
- * with `experimentalSlotFixes` flag enabled,
679
+ * with `lightDomPatches` flag enabled,
676
680
  * gives access to the original `removeChild` method
677
681
  */
678
682
  __removeChild?: <T extends Node>(child: T) => T;
@@ -710,31 +714,31 @@ interface PatchedSlotNode extends Node {
710
714
  ['s-sr']?: boolean;
711
715
  /**
712
716
  * On a `scoped: true` component
713
- * with `experimentalSlotFixes` flag enabled,
717
+ * with `lightDomPatches` flag enabled,
714
718
  * returns the actual `parentNode` of the component
715
719
  */
716
720
  __parentNode?: RenderNode;
717
721
  /**
718
722
  * On a `scoped: true` component
719
- * with `experimentalSlotFixes` flag enabled,
723
+ * with `lightDomPatches` flag enabled,
720
724
  * returns the actual `nextSibling` of the component
721
725
  */
722
726
  __nextSibling?: RenderNode;
723
727
  /**
724
728
  * On a `scoped: true` component
725
- * with `experimentalSlotFixes` flag enabled,
729
+ * with `lightDomPatches` flag enabled,
726
730
  * returns the actual `previousSibling` of the component
727
731
  */
728
732
  __previousSibling?: RenderNode;
729
733
  /**
730
734
  * On a `scoped: true` component
731
- * with `experimentalSlotFixes` flag enabled,
735
+ * with `lightDomPatches` flag enabled,
732
736
  * returns the actual `nextElementSibling` of the component
733
737
  */
734
738
  __nextElementSibling?: RenderNode;
735
739
  /**
736
740
  * On a `scoped: true` component
737
- * with `experimentalSlotFixes` flag enabled,
741
+ * with `lightDomPatches` flag enabled,
738
742
  * returns the actual `nextElementSibling` of the component
739
743
  */
740
744
  __previousElementSibling?: RenderNode;
@@ -835,7 +839,7 @@ type ComponentRuntimeReflectingAttr = [string, string | undefined];
835
839
  * associated {@link HostRef} instance.
836
840
  */
837
841
  type RuntimeRef = HostElement | {
838
- __stencil__getHostRef?: () => HostRef;
842
+ __s_ghr?: () => HostRef;
839
843
  };
840
844
  /**
841
845
  * Interface used to track an Element, it's virtual Node (`VNode`), and other data
@@ -846,6 +850,9 @@ interface HostRef {
846
850
  $cmpMeta$: ComponentRuntimeMeta;
847
851
  $hostElement$: HostElement;
848
852
  $instanceValues$?: Map<string, any>;
853
+ $signalValues$?: Map<string, import('@preact/signals-core').Signal<any>>;
854
+ /** Dispose function that tears down all signal effects for this component. */
855
+ $signalCleanup$?: () => void;
849
856
  $serializerValues$?: Map<string, string>;
850
857
  $lazyInstance$?: ComponentInterface;
851
858
  /**
@@ -1078,26 +1085,11 @@ declare const forceUpdate: (ref: any) => boolean;
1078
1085
  declare const Host: {};
1079
1086
  //#endregion
1080
1087
  //#region src/runtime/vdom/jsx-runtime.d.ts
1081
- /**
1082
- * JSX runtime function for creating elements in production mode.
1083
- * Called by TypeScript's jsx transform for elements without static children.
1084
- *
1085
- * @param type - The element type (string tag name or functional component)
1086
- * @param props - The element props (includes children)
1087
- * @param key - Optional key for the element
1088
- * @returns A virtual DOM node
1089
- */
1090
1088
  declare function jsx(type: any, props: any, key?: string): VNode;
1091
1089
  /**
1092
- * JSX runtime function for creating elements with static children.
1093
- * Called by TypeScript's jsx transform as an optimization when children are static.
1094
- *
1095
- * @param type - The element type (string tag name or functional component)
1096
- * @param props - The element props (includes children)
1097
- * @param key - Optional key for the element
1098
- * @returns A virtual DOM node
1090
+ * @alias
1099
1091
  */
1100
- declare function jsxs(type: any, props: any, key?: string): VNode;
1092
+ declare const jsxs: typeof jsx;
1101
1093
  //#endregion
1102
1094
  //#region src/runtime/vdom/vdom-annotations.d.ts
1103
1095
  /**
@@ -1151,7 +1143,6 @@ declare const setPlatformHelpers: (helpers: {
1151
1143
  rel?: (el: any, eventName: string, listener: any, options: any) => void;
1152
1144
  ce?: (eventName: string, opts?: any) => any;
1153
1145
  }) => void;
1154
- declare const supportsShadow: boolean;
1155
1146
  declare const supportsListenerOptions = false;
1156
1147
  declare const supportsConstructableStylesheets = false;
1157
1148
  declare const supportsMutableAdoptedStyleSheets = false;
@@ -1185,4 +1176,4 @@ declare const setAssetPath: (path: string) => string;
1185
1176
  declare const setScopedSsr: (opts: SsrFactoryOptions) => void;
1186
1177
  declare const needsScopedSSR: () => boolean;
1187
1178
  //#endregion
1188
- export { BUILD, Build, Env, Fragment, Host, Mixin, NAMESPACE, addHostEventListeners, bootstrapLazy, cmpModules, connectedCallback, consoleDevError, consoleDevInfo, consoleDevWarn, consoleError, createEvent, defineCustomElement, disconnectedCallback, forceModeUpdate, forceUpdate, getAssetPath, getElement, getHostRef, getMode, getRenderingRef, getShadowRoot, getValue, hAsync as h, insertVdomAnnotations, isMemberInElement, jsx, jsxs, loadModule, modeResolutionChain, needsScopedSSR, nextTick, parsePropertyValue, plt, postUpdateComponent, proxyComponent, proxyCustomElement, readTask, registerComponents, registerHost, registerInstance, renderVdom, setAssetPath, setErrorHandler, setMode, setNonce, setPlatformHelpers, setScopedSsr, setTagTransformer, setValue, ssrApp, styles, supportsConstructableStylesheets, supportsListenerOptions, supportsMutableAdoptedStyleSheets, supportsShadow, transformTag, win, writeTask };
1179
+ export { BUILD, Build, Env, Fragment, Host, Mixin, NAMESPACE, addHostEventListeners, bootstrapLazy, cmpModules, connectedCallback, consoleDevError, consoleDevInfo, consoleDevWarn, consoleError, createEvent, defineCustomElement, disconnectedCallback, forceModeUpdate, forceUpdate, getAssetPath, getElement, getHostRef, getMode, getRenderingRef, getShadowRoot, getValue, hAsync as h, insertVdomAnnotations, isMemberInElement, jsx, jsxs, loadModule, modeResolutionChain, needsScopedSSR, nextTick, parsePropertyValue, plt, postUpdateComponent, proxyComponent, proxyCustomElement, readTask, registerComponents, registerHost, registerInstance, renderVdom, setAssetPath, setErrorHandler, setMode, setNonce, setPlatformHelpers, setScopedSsr, setTagTransformer, setValue, ssrApp, styles, supportsConstructableStylesheets, supportsListenerOptions, supportsMutableAdoptedStyleSheets, transformTag, win, writeTask };