@stencil/core 5.0.0-alpha.9 → 5.0.0-beta.1

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 (49) hide show
  1. package/README.md +94 -0
  2. package/dist/app-data/index.d.ts +1 -1
  3. package/dist/app-data/index.js +4 -1
  4. package/dist/client-BRu0GtRn.mjs +2368 -0
  5. package/dist/compiler/browser.d.ts +1534 -0
  6. package/dist/compiler/browser.js +16436 -0
  7. package/dist/compiler/index.d.mts +167 -3
  8. package/dist/compiler/index.mjs +3 -3
  9. package/dist/compiler/utils/index.d.mts +272 -2
  10. package/dist/compiler/utils/index.mjs +4 -3
  11. package/dist/{compiler-C0qmPoKu.mjs → compiler-CJG6qvQt.mjs} +2978 -1231
  12. package/dist/declarations/stencil-ext-modules.d.ts +5 -5
  13. package/dist/declarations/stencil-public-compiler.d.ts +226 -69
  14. package/dist/declarations/stencil-public-docs.d.ts +9 -0
  15. package/dist/declarations/stencil-public-runtime.d.ts +111 -10
  16. package/dist/fragment-Di1hWOC8.mjs +4 -0
  17. package/dist/{regular-expression-CFVJOTUh.mjs → helpers-Cpp3qc3u.mjs} +31 -15
  18. package/dist/{index-xAkMgLX_.d.ts → index-BXAcVN2j.d.ts} +152 -20
  19. package/dist/{index-vY35H18z.d.mts → index-BopBfjPu.d.mts} +508 -848
  20. package/dist/index-DmHmu3y0.d.mts +100 -0
  21. package/dist/index.d.mts +6 -0
  22. package/dist/index.mjs +171 -2
  23. package/dist/jsx-runtime.mjs +2 -1
  24. package/dist/{node--akYC-sG.mjs → node-75gQKkFz.mjs} +60 -58
  25. package/dist/{chunk-z9aeyW2b.mjs → rolldown-runtime-BhDjJH2R.mjs} +1 -1
  26. package/dist/runtime/client/lazy.js +577 -189
  27. package/dist/runtime/client/runtime.d.ts +178 -21
  28. package/dist/runtime/client/runtime.js +577 -189
  29. package/dist/runtime/index.d.ts +32 -4
  30. package/dist/runtime/index.js +576 -187
  31. package/dist/runtime/server/index.d.mts +107 -9
  32. package/dist/runtime/server/index.mjs +499 -182
  33. package/dist/runtime/server/runner.d.mts +3 -0
  34. package/dist/runtime/server/runner.mjs +320 -337
  35. package/dist/signals/index.d.ts +2 -0
  36. package/dist/signals/index.js +4 -1
  37. package/dist/sys/node/index.d.mts +1 -2
  38. package/dist/sys/node/index.mjs +1 -1
  39. package/dist/sys/node/worker.d.mts +1 -1
  40. package/dist/sys/node/worker.mjs +6 -3
  41. package/dist/testing/index.d.mts +4731 -105
  42. package/dist/testing/index.mjs +7563 -797
  43. package/dist/util-IKfWWLJo.mjs +724 -0
  44. package/dist/validation-DAdGTrys.mjs +791 -0
  45. package/package.json +31 -27
  46. package/dist/client-aTQ7xHxx.mjs +0 -4678
  47. package/dist/index-BvkyxSY6.d.mts +0 -205
  48. package/dist/validation-ByxKj8bC.mjs +0 -1458
  49. /package/{LICENSE.md → LICENSE} +0 -0
@@ -1,5 +1,4 @@
1
- import { S as VNode, _ as FunctionalComponent, a as ComponentConstructor, b as ResolutionHandler, c as ComponentRuntimeMeta, d as HostRef, f as LazyBundlesRuntimeData, g as CustomElementsDefineOptions, 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 HTMLStencilElement, x as TagTransformer, y as JSXBase } from "../index-xAkMgLX_.js";
2
-
1
+ import { C as ReactiveControllerHostInterface, E as VNode, S as MixedInCtor, T as TagTransformer, _ as ComponentInterface, a as ComponentConstructor, b as HTMLStencilElement, c as ComponentRuntimeMeta, d as HostRef, f as LazyBundlesRuntimeData, g as RuntimeRef, h as RenderNode, i as ChildType, l as ComponentRuntimeMetaCompact, m as PropsType, o as ComponentConstructorChangeHandlers, p as PlatformRuntime, s as ComponentRuntimeHostListener, u as HostElement, v as CustomElementsDefineOptions, w as ResolutionHandler, x as JSXBase, y as FunctionalComponent } from "../index-BXAcVN2j.js";
3
2
  //#region src/runtime/asset-path.d.ts
4
3
  declare const getAssetPath: (path: string) => string;
5
4
  declare const setAssetPath: (path: string) => string;
@@ -48,6 +47,32 @@ declare const Fragment: FunctionalComponent;
48
47
  //#region src/runtime/host-listener.d.ts
49
48
  declare const addHostEventListeners: (elm: HostElement, hostRef: HostRef, listeners?: ComponentRuntimeHostListener[]) => void;
50
49
  //#endregion
50
+ //#region src/runtime/inject-side-effect-style.d.ts
51
+ /**
52
+ * Registers a root (a shadow root, or `document`) to receive every side-effect CSS import
53
+ * (a plain, non-component `import './foo.css'`), now and in future. Call in `connectedCallback`,
54
+ * paired with `unregisterSideEffectStyleTarget` in `disconnectedCallback` so the registry doesn't
55
+ * hold disconnected roots forever.
56
+ * @param root the root to register
57
+ */
58
+ declare function registerSideEffectStyleTarget(root: DocumentOrShadowRoot): void;
59
+ /**
60
+ * Removes a root registered via `registerSideEffectStyleTarget` - call in `disconnectedCallback`.
61
+ * @param root the root to unregister
62
+ */
63
+ declare function unregisterSideEffectStyleTarget(root: DocumentOrShadowRoot): void;
64
+ /**
65
+ * Applies plain (non-component) CSS text to every registered root - respects shadow DOM
66
+ * encapsulation instead of always reaching for the top-level document. Not meant to be called
67
+ * directly: this is what the compiler's CSS-to-ESM output calls for CSS with no Stencil `tag`
68
+ * (i.e. not a component's own `styleUrl`), typically a third-party dependency's CSS import.
69
+ *
70
+ * `@font-face` rules are pulled out and adopted onto top-level `document` not per-root
71
+ * (Chromium (https://issues.chromium.org/issues/41085401) per-root never loads).
72
+ * @param cssText the CSS text to apply
73
+ */
74
+ declare function injectSideEffectStyle(cssText: string): void;
75
+ //#endregion
51
76
  //#region src/runtime/mixin.d.ts
52
77
  type Ctor<T = {}> = new (...args: any[]) => T;
53
78
  declare function Mixin(...mixins: ((base: Ctor) => Ctor)[]): Ctor<{}>;
@@ -143,6 +168,9 @@ declare const setPlatformOptions: (opts: SetPlatformOptions) => PlatformRuntime
143
168
  */
144
169
  declare const proxyComponent: (Cstr: ComponentConstructor, cmpMeta: ComponentRuntimeMeta, flags: number) => ComponentConstructor;
145
170
  //#endregion
171
+ //#region src/runtime/reactive-controller.d.ts
172
+ declare const ReactiveControllerHost: <B extends MixedInCtor<ComponentInterface & HTMLElement>>(Base: B) => B & MixedInCtor<ReactiveControllerHostInterface>;
173
+ //#endregion
146
174
  //#region src/runtime/render.d.ts
147
175
  /**
148
176
  * Method to render a virtual DOM tree to a container element.
@@ -194,7 +222,7 @@ declare const postUpdateComponent: (hostRef: HostRef) => void;
194
222
  declare const forceUpdate: (ref: any) => boolean;
195
223
  //#endregion
196
224
  //#region src/runtime/vdom/h.d.ts
197
- declare const h: (nodeName: any, vnodeData: any, ...children: ChildType[]) => VNode;
225
+ declare const h: (nodeName: any, vnodeData: PropsType, ...children: ChildType[]) => VNode;
198
226
  declare const Host: {};
199
227
  //#endregion
200
228
  //#region src/runtime/vdom/jsx-runtime.d.ts
@@ -208,4 +236,4 @@ declare const jsxs: typeof jsx;
208
236
  */
209
237
  declare const jsxDEV: typeof jsx;
210
238
  //#endregion
211
- export { Fragment, type HTMLStencilElement, HYDRATED_STYLE_ID, Host, type JSXBase, Mixin, 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 };
239
+ 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, injectSideEffectStyle, jsx, jsxDEV, jsxs, normalizeWatchers, parsePropertyValue, postUpdateComponent, proxyComponent, proxyCustomElement, registerSideEffectStyleTarget, render, setAssetPath, setMode, setNonce, setPlatformOptions, setRegistry, setTagTransformer, setValue, transformTag, unregisterSideEffectStyleTarget };