@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,16 +1,18 @@
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
-
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-custom-element.d.ts
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/bootstrap-lazy.d.ts
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/vdom-annotations.d.ts
202
+ //#region src/runtime/vdom/jsx-runtime.d.ts
203
+ declare function jsx(type: any, props: any, key?: string): VNode;
167
204
  /**
168
- * Updates the DOM generated on the server with annotations such as node attributes and
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 insertVdomAnnotations: (doc: Document, staticComponents: string[]) => void;
177
- //#endregion
178
- //#region src/runtime/vdom/vdom-render.d.ts
207
+ declare const jsxs: typeof jsx;
179
208
  /**
180
- * The main entry point for Stencil's virtual DOM-based rendering engine
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 renderVdom: (hostRef: HostRef, renderFnResults: VNode | VNode[], isInitialLoad?: boolean) => void;
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, insertVdomAnnotations, jsx, jsxs, parsePropertyValue, postUpdateComponent, proxyComponent, proxyCustomElement, render, renderVdom, setAssetPath, setMode, setNonce, setPlatformOptions, setTagTransformer, setValue, transformTag };
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 };