@stencil/core 5.0.0-alpha.2 → 5.0.0-alpha.4
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-DucyoZT4.mjs → client-Dti6fFpE.mjs} +108 -69
- package/dist/compiler/index.d.mts +3 -3
- 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-DyK1_szo.mjs → compiler-BYRrEeD-.mjs} +2065 -2106
- package/dist/declarations/stencil-public-compiler.d.ts +4085 -2
- package/dist/declarations/stencil-public-compiler.js +0 -1
- package/dist/declarations/stencil-public-docs.d.ts +494 -1
- package/dist/declarations/stencil-public-runtime.d.ts +1943 -2
- package/dist/{index-fIuYTL9f.d.mts → index-9LTuoSiw.d.mts} +18 -2
- package/dist/{index-D-LlB2nw.d.mts → index-BwTaN1Nq.d.mts} +199 -809
- package/dist/{index-BONzXKJt.d.ts → index-CyrGY82h.d.ts} +5 -7
- package/dist/{index-CHjZtib0.d.ts → index-hS-KBdAP.d.ts} +1 -1
- package/dist/index.d.mts +1 -0
- package/dist/index.mjs +2 -2
- package/dist/{jsx-runtime-DBzBJLKk.d.ts → jsx-runtime-DlDkTqps.d.ts} +1 -1
- package/dist/jsx-runtime.d.ts +1 -1
- package/dist/jsx-runtime.js +1 -1
- package/dist/{node-BWBQAh8C.mjs → node-BF2jSfWg.mjs} +3 -14
- package/dist/regular-expression-D5pGVpCu.mjs +415 -0
- package/dist/runtime/app-data/index.d.ts +1 -1
- package/dist/runtime/app-data/index.js +1 -2
- package/dist/runtime/client/index.d.ts +18 -4
- package/dist/runtime/client/index.js +130 -214
- package/dist/runtime/index.d.ts +20 -4
- package/dist/runtime/index.js +2 -2
- package/dist/runtime/server/index.d.mts +18 -7
- package/dist/runtime/server/index.mjs +128 -215
- package/dist/runtime/server/runner.d.mts +1 -17
- package/dist/runtime/server/runner.mjs +12 -394
- package/dist/{runtime-CqlPYKjW.js → runtime-COEYYPyw.js} +130 -214
- 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 +3 -3
- package/dist/testing/index.mjs +20 -18
- package/dist/{validation-BR7tMYEv.mjs → validation-Byxie0Uk.mjs} +28 -24
- package/package.json +9 -13
- package/dist/serialize-o-Sj1lvg.mjs +0 -792
- package/dist/stencil-public-compiler-C_X1iolo.d.ts +0 -4455
- package/dist/stencil-public-runtime-DlV8o7-z.d.ts +0 -1845
package/dist/runtime/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as ResolutionHandler, a as ComponentRuntimeMeta, c as HostRef, d as RenderNode, f as RuntimeRef, g as JSXBase, h as HTMLStencilElement, i as ComponentRuntimeHostListener, l as LazyBundlesRuntimeData, n as ChildType, o as ComponentRuntimeMetaCompact, p as CustomElementsDefineOptions, r as ComponentConstructor, s as HostElement, u as PlatformRuntime, v as TagTransformer, y as VNode } from "../index-
|
|
2
|
-
import { n as jsxs, r as Fragment, t as jsx } from "../jsx-runtime-
|
|
1
|
+
import { _ as ResolutionHandler, a as ComponentRuntimeMeta, c as HostRef, d as RenderNode, f as RuntimeRef, g as JSXBase, h as HTMLStencilElement, i as ComponentRuntimeHostListener, l as LazyBundlesRuntimeData, n as ChildType, o as ComponentRuntimeMetaCompact, p as CustomElementsDefineOptions, r as ComponentConstructor, s as HostElement, u as PlatformRuntime, v as TagTransformer, y as VNode } from "../index-CyrGY82h.js";
|
|
2
|
+
import { n as jsxs, r as Fragment, t as jsx } from "../jsx-runtime-DlDkTqps.js";
|
|
3
3
|
|
|
4
4
|
//#region src/runtime/asset-path.d.ts
|
|
5
5
|
declare const getAssetPath: (path: string) => string;
|
|
@@ -21,6 +21,18 @@ declare const disconnectedCallback: (elm: HostElement) => Promise<void>;
|
|
|
21
21
|
//#endregion
|
|
22
22
|
//#region src/runtime/element.d.ts
|
|
23
23
|
declare const getElement: (ref: any) => HostElement;
|
|
24
|
+
/**
|
|
25
|
+
* Get the shadow root for a Stencil component's host element.
|
|
26
|
+
* This works for both open and closed shadow DOM modes.
|
|
27
|
+
*
|
|
28
|
+
* For closed shadow DOM, `element.shadowRoot` returns `null` by design,
|
|
29
|
+
* but Stencil stores the reference internally so components can still
|
|
30
|
+
* access their own shadow root.
|
|
31
|
+
*
|
|
32
|
+
* @param element The host element (from @Element() decorator)
|
|
33
|
+
* @returns The shadow root, or null if no shadow root exists
|
|
34
|
+
*/
|
|
35
|
+
declare const getShadowRoot: (element: HTMLElement) => ShadowRoot | null;
|
|
24
36
|
//#endregion
|
|
25
37
|
//#region src/runtime/event-emitter.d.ts
|
|
26
38
|
declare const createEvent: (ref: RuntimeRef, name: string, flags: number) => {
|
|
@@ -28,7 +40,7 @@ declare const createEvent: (ref: RuntimeRef, name: string, flags: number) => {
|
|
|
28
40
|
};
|
|
29
41
|
//#endregion
|
|
30
42
|
//#region src/runtime/host-listener.d.ts
|
|
31
|
-
declare const addHostEventListeners: (elm: HostElement, hostRef: HostRef, listeners?: ComponentRuntimeHostListener[]
|
|
43
|
+
declare const addHostEventListeners: (elm: HostElement, hostRef: HostRef, listeners?: ComponentRuntimeHostListener[]) => void;
|
|
32
44
|
//#endregion
|
|
33
45
|
//#region src/runtime/mixin.d.ts
|
|
34
46
|
type Ctor<T = {}> = new (...args: any[]) => T;
|
|
@@ -105,6 +117,10 @@ declare const proxyComponent: (Cstr: ComponentConstructor, cmpMeta: ComponentRun
|
|
|
105
117
|
/**
|
|
106
118
|
* Method to render a virtual DOM tree to a container element.
|
|
107
119
|
*
|
|
120
|
+
* Supports efficient re-renders: calling `render()` again on the same container
|
|
121
|
+
* will diff the new VNode tree against the previous one and only update what changed,
|
|
122
|
+
* preserving existing DOM elements and their state.
|
|
123
|
+
*
|
|
108
124
|
* @example
|
|
109
125
|
* ```tsx
|
|
110
126
|
* import { render } from '@stencil/core';
|
|
@@ -179,4 +195,4 @@ declare const insertVdomAnnotations: (doc: Document, staticComponents: string[])
|
|
|
179
195
|
*/
|
|
180
196
|
declare const renderVdom: (hostRef: HostRef, renderFnResults: VNode | VNode[], isInitialLoad?: boolean) => void;
|
|
181
197
|
//#endregion
|
|
182
|
-
export { Fragment, type HTMLStencilElement, HYDRATED_STYLE_ID, Host, type JSXBase, Mixin, addHostEventListeners, bootstrapLazy, connectedCallback, createEvent, defineCustomElement, disconnectedCallback, forceModeUpdate, forceUpdate, getAssetPath, getElement, getMode, getRenderingRef, getValue, h, insertVdomAnnotations, jsx, jsxs, parsePropertyValue, postUpdateComponent, proxyComponent, proxyCustomElement, render, renderVdom, setAssetPath, setMode, setNonce, setPlatformOptions, setTagTransformer, setValue, transformTag };
|
|
198
|
+
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, insertVdomAnnotations, jsx, jsxs, parsePropertyValue, postUpdateComponent, proxyComponent, proxyCustomElement, render, renderVdom, setAssetPath, setMode, setNonce, setPlatformOptions, setTagTransformer, setValue, transformTag };
|
package/dist/runtime/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as
|
|
2
|
-
export { Fragment, HYDRATED_STYLE_ID, Host, Mixin, addHostEventListeners, bootstrapLazy, connectedCallback, createEvent, defineCustomElement, disconnectedCallback, forceModeUpdate, forceUpdate, getAssetPath, getElement, getMode, getRenderingRef, getValue, h, insertVdomAnnotations, jsx, jsxs, parsePropertyValue, postUpdateComponent, proxyComponent, proxyCustomElement, render, renderVdom, setAssetPath, setMode, setNonce, setPlatformOptions, setTagTransformer, setValue, transformTag };
|
|
1
|
+
import { A as h, C as postUpdateComponent, D as getMode, E as parsePropertyValue, F as HYDRATED_STYLE_ID, M as getShadowRoot, N as getAssetPath, O as setMode, P as setAssetPath, S as getRenderingRef, T as createEvent, _ as connectedCallback, a as transformTag, b as setValue, c as setNonce, d as Fragment, f as bootstrapLazy, g as disconnectedCallback, h as proxyCustomElement, i as setTagTransformer, j as getElement, k as Host, l as Mixin, m as forceModeUpdate, n as jsx, o as render, p as defineCustomElement, r as jsxs, s as setPlatformOptions, t as insertVdomAnnotations, u as addHostEventListeners, v as proxyComponent, w as renderVdom, x as forceUpdate, y as getValue } from "../runtime-COEYYPyw.js";
|
|
2
|
+
export { Fragment, HYDRATED_STYLE_ID, Host, Mixin, addHostEventListeners, bootstrapLazy, connectedCallback, createEvent, defineCustomElement, disconnectedCallback, forceModeUpdate, forceUpdate, getAssetPath, getElement, getMode, getRenderingRef, getShadowRoot, getValue, h, insertVdomAnnotations, jsx, jsxs, parsePropertyValue, postUpdateComponent, proxyComponent, proxyCustomElement, render, renderVdom, setAssetPath, setMode, setNonce, setPlatformOptions, setTagTransformer, setValue, transformTag };
|
|
@@ -139,8 +139,6 @@ interface VNode {
|
|
|
139
139
|
interface CustomElementsDefineOptions {
|
|
140
140
|
exclude?: string[];
|
|
141
141
|
syncQueue?: boolean;
|
|
142
|
-
/** @deprecated in-favour of `setTagTransformer` and `transformTag` */
|
|
143
|
-
transformTagName?: (tagName: string) => string;
|
|
144
142
|
jmp?: (c: Function) => any;
|
|
145
143
|
raf?: (c: FrameRequestCallback) => number;
|
|
146
144
|
ael?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
|
|
@@ -933,10 +931,6 @@ declare const hAsync: (nodeName: any, vnodeData: any, ...children: ChildType[])
|
|
|
933
931
|
//#region src/server/platform/hydrate-app.d.ts
|
|
934
932
|
declare function hydrateApp(win: Window & typeof globalThis, opts: HydrateFactoryOptions, results: HydrateResults, afterHydrate: (win: Window, opts: HydrateFactoryOptions, results: HydrateResults, resolve: (results: HydrateResults) => void) => void, resolve: (results: HydrateResults) => void): void;
|
|
935
933
|
//#endregion
|
|
936
|
-
//#region src/runtime/asset-path.d.ts
|
|
937
|
-
declare const getAssetPath: (path: string) => string;
|
|
938
|
-
declare const setAssetPath: (path: string) => string;
|
|
939
|
-
//#endregion
|
|
940
934
|
//#region src/runtime/bootstrap-custom-element.d.ts
|
|
941
935
|
declare const defineCustomElement: (Cstr: any, compactMeta: ComponentRuntimeMetaCompact) => void;
|
|
942
936
|
declare const proxyCustomElement: (Cstr: any, compactMeta: ComponentRuntimeMetaCompact) => any;
|
|
@@ -963,7 +957,7 @@ declare const createEvent: (ref: RuntimeRef, name: string, flags: number) => {
|
|
|
963
957
|
declare const Fragment: FunctionalComponent;
|
|
964
958
|
//#endregion
|
|
965
959
|
//#region src/runtime/host-listener.d.ts
|
|
966
|
-
declare const addHostEventListeners: (elm: HostElement, hostRef: HostRef, listeners?: ComponentRuntimeHostListener[]
|
|
960
|
+
declare const addHostEventListeners: (elm: HostElement, hostRef: HostRef, listeners?: ComponentRuntimeHostListener[]) => void;
|
|
967
961
|
//#endregion
|
|
968
962
|
//#region src/runtime/mixin.d.ts
|
|
969
963
|
type Ctor<T = {}> = new (...args: any[]) => T;
|
|
@@ -1136,6 +1130,23 @@ declare const registerHost: (elm: HostElement, cmpMeta: ComponentRuntimeMeta) =>
|
|
|
1136
1130
|
declare const Build: UserBuildConditionals;
|
|
1137
1131
|
declare const styles: StyleMap;
|
|
1138
1132
|
declare const modeResolutionChain: ResolutionHandler[];
|
|
1133
|
+
/**
|
|
1134
|
+
* Server-side implementation of getAssetPath.
|
|
1135
|
+
*
|
|
1136
|
+
* Unlike the client-side version, this doesn't use import.meta.url as a fallback
|
|
1137
|
+
* because it doesn't make sense in the bundled hydrate factory context.
|
|
1138
|
+
* The base URL must come from plt.$resourcesUrl$ (set via hydration options).
|
|
1139
|
+
* @param path - The relative path to the asset
|
|
1140
|
+
* @returns The resolved asset path, which may be an absolute URL if resourcesUrl is set to an external URL, or a relative path if resourcesUrl is a relative path or not set at all
|
|
1141
|
+
*/
|
|
1142
|
+
declare const getAssetPath: (path: string) => string;
|
|
1143
|
+
/**
|
|
1144
|
+
* Sets the base URL for resolving asset paths in the server/hydrate context.
|
|
1145
|
+
* @param path - The base URL to use for resolving asset paths. This should typically be set to the same value as the `resourcesUrl` option passed to `hydrateDocument` to ensure that asset paths are resolved correctly in the server/hydrate context.
|
|
1146
|
+
* If not set, it defaults to './', which is a reasonable default for server-side rendering.
|
|
1147
|
+
* @returns void
|
|
1148
|
+
*/
|
|
1149
|
+
declare const setAssetPath: (path: string) => string;
|
|
1139
1150
|
/**
|
|
1140
1151
|
* Checks to see any components are rendered with `scoped`
|
|
1141
1152
|
* @param opts - SSR options
|