@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.
- package/dist/{client-Dnio47yQ.mjs → client-fWOou5EW.mjs} +2324 -2125
- package/dist/compiler/index.d.mts +5 -5
- package/dist/compiler/index.mjs +2 -2
- package/dist/compiler/utils/index.d.mts +2 -2
- package/dist/compiler/utils/index.mjs +3 -3
- package/dist/{compiler-Dxri2g8Z.mjs → compiler-CdUbDTbV.mjs} +13329 -12670
- package/dist/declarations/stencil-public-compiler.d.ts +254 -121
- package/dist/declarations/stencil-public-docs.d.ts +10 -0
- package/dist/declarations/stencil-public-runtime.d.ts +49 -12
- package/dist/{index-D5zaocDq.d.mts → index-D8vvsppY.d.mts} +228 -180
- package/dist/{index-D61XZw0f.d.ts → index-Dap2E02-.d.ts} +82 -31
- package/dist/{index-Dat4djoo.d.mts → index-UUlemGuu.d.mts} +13 -2
- package/dist/index.d.mts +0 -1
- package/dist/index.mjs +1 -1
- package/dist/jsx-runtime.d.mts +18 -0
- package/dist/jsx-runtime.mjs +2 -0
- package/dist/{node-pj6rF4Wt.mjs → node-klLZLdDe.mjs} +59 -55
- package/dist/{regular-expression-D0_N0PGa.mjs → regular-expression-DUdhF3Ei.mjs} +72 -6
- package/dist/runtime/app-data/index.d.ts +1 -1
- package/dist/runtime/app-data/index.js +15 -9
- package/dist/{runtime-CKyUrF4i.js → runtime/client/lazy.js} +2539 -2199
- package/dist/runtime/client/{index.d.ts → runtime.d.ts} +49 -40
- package/dist/runtime/client/{index.js → runtime.js} +2401 -2185
- package/dist/runtime/index.d.ts +20 -3
- package/dist/runtime/index.js +4956 -2
- package/dist/runtime/server/index.d.mts +30 -39
- package/dist/runtime/server/index.mjs +2369 -2185
- package/dist/runtime/server/runner.d.mts +4 -6
- package/dist/runtime/server/runner.mjs +307 -361
- package/dist/signals/index.d.ts +47 -0
- package/dist/signals/index.js +199 -0
- package/dist/sys/node/index.d.mts +1 -1
- package/dist/sys/node/index.mjs +1 -1
- package/dist/sys/node/worker.mjs +2 -2
- package/dist/testing/index.d.mts +97 -3
- package/dist/testing/index.mjs +199 -47
- package/dist/{validation-BA8nzXu_.mjs → validation-2QipI30K.mjs} +21 -32
- package/package.json +41 -27
- package/dist/index-D-XN9HW_.d.ts +0 -30
- package/dist/jsx-runtime-B3vQbWIW.d.ts +0 -28
- package/dist/jsx-runtime.d.ts +0 -2
- package/dist/jsx-runtime.js +0 -2
- /package/dist/{chunk-CjcI7cDX.mjs → chunk-z9aeyW2b.mjs} +0 -0
|
@@ -107,6 +107,14 @@ interface ComponentInterface {
|
|
|
107
107
|
interface RafCallback {
|
|
108
108
|
(timeStamp: number): void;
|
|
109
109
|
}
|
|
110
|
+
/**
|
|
111
|
+
* Minimal interface matched by signal objects (from @stencil/core/signals).
|
|
112
|
+
* Used in JSX attribute types.
|
|
113
|
+
*/
|
|
114
|
+
interface SignalRef<T = any> {
|
|
115
|
+
readonly value: T;
|
|
116
|
+
peek(): T;
|
|
117
|
+
}
|
|
110
118
|
/**
|
|
111
119
|
* Utilities for working with functional Stencil components. An object
|
|
112
120
|
* conforming to this interface is passed by the Stencil runtime as the third
|
|
@@ -148,7 +156,7 @@ interface FunctionalUtilities {
|
|
|
148
156
|
map: (children: VNode[], cb: (vnode: ChildNode$1, index: number, array: ChildNode$1[]) => ChildNode$1) => VNode[];
|
|
149
157
|
}
|
|
150
158
|
interface FunctionalComponent<T = {}> {
|
|
151
|
-
(props: T, children: VNode[], utils: FunctionalUtilities): VNode |
|
|
159
|
+
(props: T, children: VNode[], utils: FunctionalUtilities): VNode | null;
|
|
152
160
|
}
|
|
153
161
|
/**
|
|
154
162
|
* A Child VDOM node
|
|
@@ -159,7 +167,7 @@ interface FunctionalComponent<T = {}> {
|
|
|
159
167
|
* {@link FunctionalUtilities}).
|
|
160
168
|
*/
|
|
161
169
|
interface ChildNode$1 {
|
|
162
|
-
vtag?: string | number | Function;
|
|
170
|
+
vtag?: string | number | Function | symbol | null;
|
|
163
171
|
vkey?: string | number;
|
|
164
172
|
vtext?: string;
|
|
165
173
|
vchildren?: VNode[];
|
|
@@ -171,13 +179,15 @@ interface ChildNode$1 {
|
|
|
171
179
|
*/
|
|
172
180
|
interface VNode {
|
|
173
181
|
$flags$: number;
|
|
174
|
-
$tag$: string | number | Function;
|
|
182
|
+
$tag$: string | number | Function | symbol | null;
|
|
175
183
|
$elm$: any;
|
|
176
184
|
$text$: string;
|
|
177
185
|
$children$: VNode[];
|
|
178
186
|
$attrs$?: any;
|
|
179
187
|
$name$?: string;
|
|
180
188
|
$key$?: string | number;
|
|
189
|
+
/** Signal reference for vdom bypass: signal text nodes store the signal here. */
|
|
190
|
+
$signal$?: any;
|
|
181
191
|
}
|
|
182
192
|
declare namespace JSXBase {
|
|
183
193
|
interface IntrinsicElements {
|
|
@@ -813,7 +823,7 @@ declare namespace JSXBase {
|
|
|
813
823
|
autofocus?: boolean | string;
|
|
814
824
|
class?: string | {
|
|
815
825
|
[className: string]: boolean;
|
|
816
|
-
}
|
|
826
|
+
} | SignalRef<string>;
|
|
817
827
|
contentEditable?: boolean | string;
|
|
818
828
|
contenteditable?: boolean | string;
|
|
819
829
|
contextMenu?: string;
|
|
@@ -872,7 +882,7 @@ declare namespace JSXBase {
|
|
|
872
882
|
interface SVGAttributes<T = SVGElement> extends DOMAttributes<T> {
|
|
873
883
|
class?: string | {
|
|
874
884
|
[className: string]: boolean;
|
|
875
|
-
}
|
|
885
|
+
} | SignalRef<string>;
|
|
876
886
|
color?: string;
|
|
877
887
|
height?: number | string;
|
|
878
888
|
id?: string;
|
|
@@ -1273,10 +1283,13 @@ declare namespace JSXBase {
|
|
|
1273
1283
|
interface JSXAttributes<T = Element$2> {
|
|
1274
1284
|
key?: string | number;
|
|
1275
1285
|
ref?: (elm?: T) => void;
|
|
1286
|
+
children?: any;
|
|
1276
1287
|
}
|
|
1277
1288
|
interface CustomElementsDefineOptions {
|
|
1278
1289
|
exclude?: string[];
|
|
1279
1290
|
syncQueue?: boolean;
|
|
1291
|
+
/** Scoped custom element registry to define components in. Defaults to the global registry. */
|
|
1292
|
+
registry?: CustomElementRegistry;
|
|
1280
1293
|
jmp?: (c: Function) => any;
|
|
1281
1294
|
raf?: (c: FrameRequestCallback) => number;
|
|
1282
1295
|
ael?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
|
|
@@ -1532,7 +1545,7 @@ interface HostElement extends HTMLElement {
|
|
|
1532
1545
|
disconnectedCallback?: () => void;
|
|
1533
1546
|
host?: Element;
|
|
1534
1547
|
forceUpdate?: () => void;
|
|
1535
|
-
|
|
1548
|
+
__s_ghr?: () => HostRef;
|
|
1536
1549
|
/**
|
|
1537
1550
|
* Unique stencil id for this element
|
|
1538
1551
|
*/
|
|
@@ -1680,61 +1693,61 @@ interface RenderNode extends HostElement {
|
|
|
1680
1693
|
['s-en']?: '' | /*shadow*/'c';
|
|
1681
1694
|
/**
|
|
1682
1695
|
* On a `scoped: true` component
|
|
1683
|
-
* with `
|
|
1696
|
+
* with `lightDomPatches` flag enabled,
|
|
1684
1697
|
* returns the internal `childNodes` of the component
|
|
1685
1698
|
*/
|
|
1686
1699
|
readonly __childNodes?: NodeListOf<ChildNode>;
|
|
1687
1700
|
/**
|
|
1688
1701
|
* On a `scoped: true` component
|
|
1689
|
-
* with `
|
|
1702
|
+
* with `lightDomPatches` flag enabled,
|
|
1690
1703
|
* returns the internal `children` of the component
|
|
1691
1704
|
*/
|
|
1692
1705
|
readonly __children?: HTMLCollectionOf<Element>;
|
|
1693
1706
|
/**
|
|
1694
1707
|
* On a `scoped: true` component
|
|
1695
|
-
* with `
|
|
1708
|
+
* with `lightDomPatches` flag enabled,
|
|
1696
1709
|
* returns the internal `firstChild` of the component
|
|
1697
1710
|
*/
|
|
1698
1711
|
readonly __firstChild?: ChildNode;
|
|
1699
1712
|
/**
|
|
1700
1713
|
* On a `scoped: true` component
|
|
1701
|
-
* with `
|
|
1714
|
+
* with `lightDomPatches` flag enabled,
|
|
1702
1715
|
* returns the internal `lastChild` of the component
|
|
1703
1716
|
*/
|
|
1704
1717
|
readonly __lastChild?: ChildNode;
|
|
1705
1718
|
/**
|
|
1706
1719
|
* On a `scoped: true` component
|
|
1707
|
-
* with `
|
|
1720
|
+
* with `lightDomPatches` flag enabled,
|
|
1708
1721
|
* returns the internal `textContent` of the component
|
|
1709
1722
|
*/
|
|
1710
1723
|
__textContent?: string;
|
|
1711
1724
|
/**
|
|
1712
1725
|
* On a `scoped: true` component
|
|
1713
|
-
* with `
|
|
1726
|
+
* with `lightDomPatches` flag enabled,
|
|
1714
1727
|
* gives access to the original `append` method
|
|
1715
1728
|
*/
|
|
1716
1729
|
__append?: (...nodes: (Node | string)[]) => void;
|
|
1717
1730
|
/**
|
|
1718
1731
|
* On a `scoped: true` component
|
|
1719
|
-
* with `
|
|
1732
|
+
* with `lightDomPatches` flag enabled,
|
|
1720
1733
|
* gives access to the original `prepend` method
|
|
1721
1734
|
*/
|
|
1722
1735
|
__prepend?: (...nodes: (Node | string)[]) => void;
|
|
1723
1736
|
/**
|
|
1724
1737
|
* On a `scoped: true` component
|
|
1725
|
-
* with `
|
|
1738
|
+
* with `lightDomPatches` flag enabled,
|
|
1726
1739
|
* gives access to the original `appendChild` method
|
|
1727
1740
|
*/
|
|
1728
1741
|
__appendChild?: <T extends Node>(newChild: T) => T;
|
|
1729
1742
|
/**
|
|
1730
1743
|
* On a `scoped: true` component
|
|
1731
|
-
* with `
|
|
1744
|
+
* with `lightDomPatches` flag enabled,
|
|
1732
1745
|
* gives access to the original `insertBefore` method
|
|
1733
1746
|
*/
|
|
1734
1747
|
__insertBefore?: <T extends Node>(node: T, child: Node | null) => T;
|
|
1735
1748
|
/**
|
|
1736
1749
|
* On a `scoped: true` component
|
|
1737
|
-
* with `
|
|
1750
|
+
* with `lightDomPatches` flag enabled,
|
|
1738
1751
|
* gives access to the original `removeChild` method
|
|
1739
1752
|
*/
|
|
1740
1753
|
__removeChild?: <T extends Node>(child: T) => T;
|
|
@@ -1772,31 +1785,31 @@ interface PatchedSlotNode extends Node {
|
|
|
1772
1785
|
['s-sr']?: boolean;
|
|
1773
1786
|
/**
|
|
1774
1787
|
* On a `scoped: true` component
|
|
1775
|
-
* with `
|
|
1788
|
+
* with `lightDomPatches` flag enabled,
|
|
1776
1789
|
* returns the actual `parentNode` of the component
|
|
1777
1790
|
*/
|
|
1778
1791
|
__parentNode?: RenderNode;
|
|
1779
1792
|
/**
|
|
1780
1793
|
* On a `scoped: true` component
|
|
1781
|
-
* with `
|
|
1794
|
+
* with `lightDomPatches` flag enabled,
|
|
1782
1795
|
* returns the actual `nextSibling` of the component
|
|
1783
1796
|
*/
|
|
1784
1797
|
__nextSibling?: RenderNode;
|
|
1785
1798
|
/**
|
|
1786
1799
|
* On a `scoped: true` component
|
|
1787
|
-
* with `
|
|
1800
|
+
* with `lightDomPatches` flag enabled,
|
|
1788
1801
|
* returns the actual `previousSibling` of the component
|
|
1789
1802
|
*/
|
|
1790
1803
|
__previousSibling?: RenderNode;
|
|
1791
1804
|
/**
|
|
1792
1805
|
* On a `scoped: true` component
|
|
1793
|
-
* with `
|
|
1806
|
+
* with `lightDomPatches` flag enabled,
|
|
1794
1807
|
* returns the actual `nextElementSibling` of the component
|
|
1795
1808
|
*/
|
|
1796
1809
|
__nextElementSibling?: RenderNode;
|
|
1797
1810
|
/**
|
|
1798
1811
|
* On a `scoped: true` component
|
|
1799
|
-
* with `
|
|
1812
|
+
* with `lightDomPatches` flag enabled,
|
|
1800
1813
|
* returns the actual `nextElementSibling` of the component
|
|
1801
1814
|
*/
|
|
1802
1815
|
__previousElementSibling?: RenderNode;
|
|
@@ -1897,7 +1910,7 @@ type ComponentRuntimeReflectingAttr = [string, string | undefined];
|
|
|
1897
1910
|
* associated {@link HostRef} instance.
|
|
1898
1911
|
*/
|
|
1899
1912
|
type RuntimeRef = HostElement | {
|
|
1900
|
-
|
|
1913
|
+
__s_ghr?: () => HostRef;
|
|
1901
1914
|
};
|
|
1902
1915
|
/**
|
|
1903
1916
|
* Interface used to track an Element, it's virtual Node (`VNode`), and other data
|
|
@@ -1908,6 +1921,9 @@ interface HostRef {
|
|
|
1908
1921
|
$cmpMeta$: ComponentRuntimeMeta;
|
|
1909
1922
|
$hostElement$: HostElement;
|
|
1910
1923
|
$instanceValues$?: Map<string, any>;
|
|
1924
|
+
$signalValues$?: Map<string, import('@preact/signals-core').Signal<any>>;
|
|
1925
|
+
/** Dispose function that tears down all signal effects for this component. */
|
|
1926
|
+
$signalCleanup$?: () => void;
|
|
1911
1927
|
$serializerValues$?: Map<string, string>;
|
|
1912
1928
|
$lazyInstance$?: ComponentInterface;
|
|
1913
1929
|
/**
|
|
@@ -2118,6 +2134,7 @@ declare const isMemberInElement: (elm: any, memberName: string) => boolean;
|
|
|
2118
2134
|
declare const cmpModules: Map<string, {
|
|
2119
2135
|
[exportName: string]: ComponentConstructor;
|
|
2120
2136
|
}>;
|
|
2137
|
+
declare const setLazyLoadBasePath: (url: string) => void;
|
|
2121
2138
|
declare const loadModule: (cmpMeta: ComponentRuntimeMeta, hostRef: HostRef, hmrVersionId?: string) => Promise<ComponentConstructor | undefined> | ComponentConstructor | undefined;
|
|
2122
2139
|
//#endregion
|
|
2123
2140
|
//#region src/client/client-log.d.ts
|
|
@@ -2153,7 +2170,6 @@ declare const setPlatformHelpers: (helpers: {
|
|
|
2153
2170
|
rel?: (el: any, eventName: string, listener: any, options: any) => void;
|
|
2154
2171
|
ce?: (eventName: string, opts?: any) => any;
|
|
2155
2172
|
}) => void;
|
|
2156
|
-
declare const supportsShadow: boolean;
|
|
2157
2173
|
declare const supportsListenerOptions: boolean;
|
|
2158
2174
|
declare const promiseResolve: (v?: any) => Promise<any>;
|
|
2159
2175
|
declare const supportsConstructableStylesheets: boolean;
|
|
@@ -2168,6 +2184,10 @@ declare const defineCustomElement: (Cstr: any, compactMeta: ComponentRuntimeMeta
|
|
|
2168
2184
|
declare const proxyCustomElement: (Cstr: any, compactMeta: ComponentRuntimeMetaCompact) => any;
|
|
2169
2185
|
declare const forceModeUpdate: (elm: RenderNode) => void;
|
|
2170
2186
|
//#endregion
|
|
2187
|
+
//#region src/runtime/registry.d.ts
|
|
2188
|
+
declare const setRegistry: (registry: CustomElementRegistry) => void;
|
|
2189
|
+
declare const getRegistry: () => CustomElementRegistry;
|
|
2190
|
+
//#endregion
|
|
2171
2191
|
//#region src/runtime/bootstrap-loader.d.ts
|
|
2172
2192
|
declare const bootstrapLazy: (lazyBundles: LazyBundlesRuntimeData, options?: CustomElementsDefineOptions) => void;
|
|
2173
2193
|
//#endregion
|
|
@@ -2353,26 +2373,15 @@ declare const h: (nodeName: any, vnodeData: any, ...children: ChildType[]) => VN
|
|
|
2353
2373
|
declare const Host: {};
|
|
2354
2374
|
//#endregion
|
|
2355
2375
|
//#region src/runtime/vdom/jsx-runtime.d.ts
|
|
2376
|
+
declare function jsx(type: any, props: any, key?: string): VNode;
|
|
2356
2377
|
/**
|
|
2357
|
-
*
|
|
2358
|
-
* Called by TypeScript's jsx transform for elements without static children.
|
|
2359
|
-
*
|
|
2360
|
-
* @param type - The element type (string tag name or functional component)
|
|
2361
|
-
* @param props - The element props (includes children)
|
|
2362
|
-
* @param key - Optional key for the element
|
|
2363
|
-
* @returns A virtual DOM node
|
|
2378
|
+
* @alias
|
|
2364
2379
|
*/
|
|
2365
|
-
declare
|
|
2380
|
+
declare const jsxs: typeof jsx;
|
|
2366
2381
|
/**
|
|
2367
|
-
*
|
|
2368
|
-
* Called by TypeScript's jsx transform as an optimization when children are static.
|
|
2369
|
-
*
|
|
2370
|
-
* @param type - The element type (string tag name or functional component)
|
|
2371
|
-
* @param props - The element props (includes children)
|
|
2372
|
-
* @param key - Optional key for the element
|
|
2373
|
-
* @returns A virtual DOM node
|
|
2382
|
+
* @alias
|
|
2374
2383
|
*/
|
|
2375
|
-
declare
|
|
2384
|
+
declare const jsxDEV: typeof jsx;
|
|
2376
2385
|
//#endregion
|
|
2377
2386
|
//#region src/runtime/vdom/vdom-annotations.d.ts
|
|
2378
2387
|
/**
|
|
@@ -2402,4 +2411,4 @@ declare const insertVdomAnnotations: (doc: Document, staticComponents: string[])
|
|
|
2402
2411
|
*/
|
|
2403
2412
|
declare const renderVdom: (hostRef: HostRef, renderFnResults: VNode | VNode[], isInitialLoad?: boolean) => void;
|
|
2404
2413
|
//#endregion
|
|
2405
|
-
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, normalizeWatchers, 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,
|
|
2414
|
+
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, getRegistry, getRenderingRef, getShadowRoot, getValue, h, insertVdomAnnotations, isMemberInElement, jsx, jsxDEV, jsxs, loadModule, modeResolutionChain, needsScopedSSR, nextTick, normalizeWatchers, parsePropertyValue, plt, postUpdateComponent, promiseResolve, proxyComponent, proxyCustomElement, readTask, registerHost, registerInstance, render, renderVdom, resolveVar, setAssetPath, setErrorHandler, setLazyLoadBasePath, setMode, setNonce, setPlatformHelpers, setPlatformOptions, setRegistry, setScopedSsr, setTagTransformer, setValue, styles, supportsConstructableStylesheets, supportsListenerOptions, supportsMutableAdoptedStyleSheets, transformTag, win, writeTask };
|