@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.
- package/README.md +94 -0
- package/dist/app-data/index.d.ts +2 -0
- package/dist/{runtime/app-data → app-data}/index.js +17 -11
- package/dist/{client-CSm3x5ke.mjs → client-D1MsT-Rp.mjs} +2717 -2424
- package/dist/compiler/index.d.mts +170 -6
- package/dist/compiler/index.mjs +4 -3
- package/dist/compiler/utils/index.d.mts +272 -2
- package/dist/compiler/utils/index.mjs +4 -3
- package/dist/{compiler-D6iP7Bzb.mjs → compiler-Cddp97Pg.mjs} +14953 -12327
- package/dist/declarations/stencil-ext-modules.d.ts +5 -5
- package/dist/declarations/stencil-public-compiler.d.ts +728 -287
- package/dist/declarations/stencil-public-compiler.js +2 -3
- package/dist/declarations/stencil-public-docs.d.ts +19 -0
- package/dist/declarations/stencil-public-runtime.d.ts +131 -17
- package/dist/fragment-Di1hWOC8.mjs +4 -0
- package/dist/{index-tUR6pD3J.d.mts → index-BHj3EBl2.d.mts} +1052 -668
- package/dist/{index-CyrGY82h.d.ts → index-D2PAsXxx.d.ts} +215 -40
- package/dist/index-VK8okIiF.d.mts +108 -0
- package/dist/index.d.mts +4 -1
- package/dist/index.mjs +91 -2
- package/dist/jsx-runtime.d.mts +18 -0
- package/dist/jsx-runtime.mjs +3 -0
- package/dist/{node-Bg-mO5dw.mjs → node-BQR4L-TG.mjs} +76 -73
- package/dist/reactive-controller-BdCpSAQP.d.mts +13 -0
- package/dist/{regular-expression-D5pGVpCu.mjs → regular-expression-XqU5zmPp.mjs} +141 -31
- package/dist/{chunk-CjcI7cDX.mjs → rolldown-runtime-BhDjJH2R.mjs} +1 -1
- package/dist/{runtime-BBCnuprF.js → runtime/client/lazy.js} +2987 -2443
- package/dist/runtime/client/{index.d.ts → runtime.d.ts} +228 -83
- package/dist/runtime/client/{index.js → runtime.js} +2852 -2432
- package/dist/runtime/index.d.ts +48 -29
- package/dist/runtime/index.js +5069 -2
- package/dist/runtime/server/index.d.mts +182 -75
- package/dist/runtime/server/index.mjs +2769 -2283
- package/dist/runtime/server/runner.d.mts +47 -32
- package/dist/runtime/server/runner.mjs +563 -687
- package/dist/signals/index.d.ts +49 -0
- package/dist/signals/index.js +199 -0
- package/dist/sys/node/index.d.mts +1 -2
- package/dist/sys/node/index.mjs +1 -1
- package/dist/sys/node/worker.d.mts +1 -1
- package/dist/sys/node/worker.mjs +6 -3
- package/dist/testing/index.d.mts +98 -9
- package/dist/testing/index.mjs +395 -70
- package/dist/util-BIa-iHnt.mjs +724 -0
- package/dist/validation-Dd3g77T5.mjs +778 -0
- package/package.json +49 -36
- package/dist/index-CXHCTQNt.d.mts +0 -190
- package/dist/index-hS-KBdAP.d.ts +0 -30
- package/dist/jsx-runtime-DlDkTqps.d.ts +0 -28
- package/dist/jsx-runtime.d.ts +0 -2
- package/dist/jsx-runtime.js +0 -2
- package/dist/runtime/app-data/index.d.ts +0 -2
- package/dist/validation-Byxie0Uk.mjs +0 -1445
- /package/{LICENSE.md → LICENSE} +0 -0
- /package/dist/{runtime/app-globals → app-globals}/index.d.ts +0 -0
- /package/dist/{runtime/app-globals → app-globals}/index.js +0 -0
package/dist/runtime/index.d.ts
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as jsxs, r as Fragment, t as jsx } from "../jsx-runtime-DlDkTqps.js";
|
|
3
|
-
|
|
1
|
+
import { C as ResolutionHandler, S as ReactiveControllerHostInterface, T as VNode, _ as CustomElementsDefineOptions, a as ComponentConstructor, b as JSXBase, c as ComponentRuntimeMeta, d as HostRef, f as LazyBundlesRuntimeData, g as ComponentInterface, h as RuntimeRef, i as ChildType, l as ComponentRuntimeMetaCompact, m as RenderNode, o as ComponentConstructorChangeHandlers, p as PlatformRuntime, s as ComponentRuntimeHostListener, u as HostElement, v as FunctionalComponent, w as TagTransformer, x as MixedInCtor, y as HTMLStencilElement } from "../index-D2PAsXxx.js";
|
|
4
2
|
//#region src/runtime/asset-path.d.ts
|
|
5
3
|
declare const getAssetPath: (path: string) => string;
|
|
6
4
|
declare const setAssetPath: (path: string) => string;
|
|
7
5
|
//#endregion
|
|
8
|
-
//#region src/runtime/bootstrap-
|
|
6
|
+
//#region src/runtime/bootstrap-standalone.d.ts
|
|
9
7
|
declare const defineCustomElement: (Cstr: any, compactMeta: ComponentRuntimeMetaCompact) => void;
|
|
10
8
|
declare const proxyCustomElement: (Cstr: any, compactMeta: ComponentRuntimeMetaCompact) => any;
|
|
11
9
|
declare const forceModeUpdate: (elm: RenderNode) => void;
|
|
12
10
|
//#endregion
|
|
13
|
-
//#region src/runtime/
|
|
11
|
+
//#region src/runtime/registry.d.ts
|
|
12
|
+
declare const setRegistry: (registry: CustomElementRegistry) => void;
|
|
13
|
+
declare const getRegistry: () => CustomElementRegistry;
|
|
14
|
+
//#endregion
|
|
15
|
+
//#region src/runtime/bootstrap-loader.d.ts
|
|
14
16
|
declare const bootstrapLazy: (lazyBundles: LazyBundlesRuntimeData, options?: CustomElementsDefineOptions) => void;
|
|
15
17
|
//#endregion
|
|
16
18
|
//#region src/runtime/connected-callback.d.ts
|
|
@@ -39,6 +41,9 @@ declare const createEvent: (ref: RuntimeRef, name: string, flags: number) => {
|
|
|
39
41
|
emit: (detail: any) => CustomEvent<any>;
|
|
40
42
|
};
|
|
41
43
|
//#endregion
|
|
44
|
+
//#region src/runtime/fragment.d.ts
|
|
45
|
+
declare const Fragment: FunctionalComponent;
|
|
46
|
+
//#endregion
|
|
42
47
|
//#region src/runtime/host-listener.d.ts
|
|
43
48
|
declare const addHostEventListeners: (elm: HostElement, hostRef: HostRef, listeners?: ComponentRuntimeHostListener[]) => void;
|
|
44
49
|
//#endregion
|
|
@@ -59,6 +64,30 @@ declare const getMode: (ref: RuntimeRef) => string;
|
|
|
59
64
|
*/
|
|
60
65
|
declare const setNonce: (nonce: string) => string;
|
|
61
66
|
//#endregion
|
|
67
|
+
//#region src/runtime/normalize-watchers.d.ts
|
|
68
|
+
/**
|
|
69
|
+
* Normalizes watcher metadata to the current `{ [methodName]: flags }[]` format.
|
|
70
|
+
*
|
|
71
|
+
* Prior to Stencil 4.39.x (PR #6484), the `@Watch()` compiler emitted watcher
|
|
72
|
+
* handlers as a plain string array: `{ "min": ["minChanged"] }`. The new format
|
|
73
|
+
* wraps each entry in an object that carries option flags (e.g. `immediate`):
|
|
74
|
+
* `{ "min": [{ "minChanged": 0 }] }`.
|
|
75
|
+
*
|
|
76
|
+
* When a library (e.g. Ionic Framework) was compiled with an older Stencil compiler
|
|
77
|
+
* but consumed by an app using a newer Stencil runtime, the runtime's
|
|
78
|
+
* `Object.entries(watcher)` call receives a string and misinterprets its character
|
|
79
|
+
* indices as method names, causing:
|
|
80
|
+
* `TypeError: instance[watchMethodName] is not a function`
|
|
81
|
+
*
|
|
82
|
+
* This helper should be used at `$watchers$` assignment sites that need to
|
|
83
|
+
* accept both legacy and current compiler metadata so downstream code on those
|
|
84
|
+
* paths can safely assume the new object format.
|
|
85
|
+
*
|
|
86
|
+
* @param raw The raw watcher map from compiled metadata (new or legacy format).
|
|
87
|
+
* @returns A normalized watcher map in the `{ [methodName]: flags }[]` format, or `undefined` if `raw` is `undefined` or empty.
|
|
88
|
+
*/
|
|
89
|
+
declare const normalizeWatchers: (raw: ComponentConstructorChangeHandlers | undefined) => ComponentConstructorChangeHandlers | undefined;
|
|
90
|
+
//#endregion
|
|
62
91
|
//#region src/runtime/parse-property-value.d.ts
|
|
63
92
|
/**
|
|
64
93
|
* Parse a new property value for a given property type.
|
|
@@ -113,10 +142,17 @@ declare const setPlatformOptions: (opts: SetPlatformOptions) => PlatformRuntime
|
|
|
113
142
|
*/
|
|
114
143
|
declare const proxyComponent: (Cstr: ComponentConstructor, cmpMeta: ComponentRuntimeMeta, flags: number) => ComponentConstructor;
|
|
115
144
|
//#endregion
|
|
145
|
+
//#region src/runtime/reactive-controller.d.ts
|
|
146
|
+
declare const ReactiveControllerHost: <B extends MixedInCtor<ComponentInterface & HTMLElement>>(Base: B) => B & MixedInCtor<ReactiveControllerHostInterface>;
|
|
147
|
+
//#endregion
|
|
116
148
|
//#region src/runtime/render.d.ts
|
|
117
149
|
/**
|
|
118
150
|
* Method to render a virtual DOM tree to a container element.
|
|
119
151
|
*
|
|
152
|
+
* Supports efficient re-renders: calling `render()` again on the same container
|
|
153
|
+
* will diff the new VNode tree against the previous one and only update what changed,
|
|
154
|
+
* preserving existing DOM elements and their state.
|
|
155
|
+
*
|
|
120
156
|
* @example
|
|
121
157
|
* ```tsx
|
|
122
158
|
* import { render } from '@stencil/core';
|
|
@@ -163,32 +199,15 @@ declare const forceUpdate: (ref: any) => boolean;
|
|
|
163
199
|
declare const h: (nodeName: any, vnodeData: any, ...children: ChildType[]) => VNode;
|
|
164
200
|
declare const Host: {};
|
|
165
201
|
//#endregion
|
|
166
|
-
//#region src/runtime/vdom/
|
|
202
|
+
//#region src/runtime/vdom/jsx-runtime.d.ts
|
|
203
|
+
declare function jsx(type: any, props: any, key?: string): VNode;
|
|
167
204
|
/**
|
|
168
|
-
*
|
|
169
|
-
* comment nodes to facilitate future client-side hydration. These annotations are used for things
|
|
170
|
-
* like moving elements back to their original hosts if using Shadow DOM on the client, and for quickly
|
|
171
|
-
* reconstructing the vNode representations of the DOM.
|
|
172
|
-
*
|
|
173
|
-
* @param doc The DOM generated by the server.
|
|
174
|
-
* @param staticComponents Any components that should be considered static and do not need client-side hydration.
|
|
205
|
+
* @alias
|
|
175
206
|
*/
|
|
176
|
-
declare const
|
|
177
|
-
//#endregion
|
|
178
|
-
//#region src/runtime/vdom/vdom-render.d.ts
|
|
207
|
+
declare const jsxs: typeof jsx;
|
|
179
208
|
/**
|
|
180
|
-
*
|
|
181
|
-
*
|
|
182
|
-
* Given a {@link d.HostRef} container and some virtual DOM nodes, this
|
|
183
|
-
* function will handle creating a virtual DOM tree with a single root, patching
|
|
184
|
-
* the current virtual DOM tree onto an old one (if any), dealing with slot
|
|
185
|
-
* relocation, and reflecting attributes.
|
|
186
|
-
*
|
|
187
|
-
* @param hostRef data needed to root and render the virtual DOM tree, such as
|
|
188
|
-
* the DOM node into which it should be rendered.
|
|
189
|
-
* @param renderFnResults the virtual DOM nodes to be rendered
|
|
190
|
-
* @param isInitialLoad whether or not this is the first call after page load
|
|
209
|
+
* @alias
|
|
191
210
|
*/
|
|
192
|
-
declare const
|
|
211
|
+
declare const jsxDEV: typeof jsx;
|
|
193
212
|
//#endregion
|
|
194
|
-
export { Fragment, type HTMLStencilElement, HYDRATED_STYLE_ID, Host, type JSXBase, Mixin, addHostEventListeners, bootstrapLazy, connectedCallback, createEvent, defineCustomElement, disconnectedCallback, forceModeUpdate, forceUpdate, getAssetPath, getElement, getMode, getRenderingRef, getShadowRoot, getValue, h,
|
|
213
|
+
export { Fragment, type HTMLStencilElement, HYDRATED_STYLE_ID, Host, type JSXBase, Mixin, ReactiveControllerHost, addHostEventListeners, bootstrapLazy, connectedCallback, createEvent, defineCustomElement, disconnectedCallback, forceModeUpdate, forceUpdate, getAssetPath, getElement, getMode, getRegistry, getRenderingRef, getShadowRoot, getValue, h, jsx, jsxDEV, jsxs, normalizeWatchers, parsePropertyValue, postUpdateComponent, proxyComponent, proxyCustomElement, render, setAssetPath, setMode, setNonce, setPlatformOptions, setRegistry, setTagTransformer, setValue, transformTag };
|