@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
@@ -102,6 +102,16 @@ interface ShadowEncapsulation {
102
102
  * declarative slotting behavior.
103
103
  */
104
104
  slotAssignment?: 'manual' | 'named';
105
+ /**
106
+ * When set to `true`, the shadow root is preserved when the host element is deep-cloned via
107
+ * `Node.cloneNode(true)`. Without this, cloning a shadow host produces an empty shell.
108
+ */
109
+ clonable?: boolean;
110
+ /**
111
+ * When set to `true`, marks the shadow root as serializable so it is included when the host
112
+ * element is serialized via `Element.getHTML({ serializableShadowRoots: true })`.
113
+ */
114
+ serializable?: boolean;
105
115
  }
106
116
  /**
107
117
  * Patch types for non-shadow DOM components that use slots.
@@ -453,7 +463,7 @@ declare function getAssetPath(path: string): string;
453
463
  * @param vnode - The virtual DOM tree to render
454
464
  * @param container - The container element to render the virtual DOM tree to
455
465
  */
456
- declare function render(vnode: VNode, container: Element): void;
466
+ declare function render(vnode: VNode, container: globalThis.Element): void;
457
467
  /**
458
468
  * Used to manually set the base path where assets can be found. For lazy-loaded
459
469
  * builds the asset path is automatically set and assets copied to the correct
@@ -484,7 +494,7 @@ declare function setNonce(nonce: string): void;
484
494
  * @param ref the ref to get the Stencil element for
485
495
  * @returns a reference to the element
486
496
  */
487
- declare function getElement(ref: any): HTMLStencilElement;
497
+ declare function getElement<T extends HTMLElement = HTMLStencilElement>(ref: any): T;
488
498
  /**
489
499
  * Get the shadow root for a Stencil component's host element.
490
500
  * This works for both open and closed shadow DOM modes.
@@ -557,6 +567,22 @@ declare function setTagTransformer(transformer: TagTransformer): void;
557
567
  * @returns the transformed tag e.g. `new-my-tag`
558
568
  */
559
569
  declare function transformTag(tag: string): string;
570
+ /**
571
+ * Registers a root - a shadowRoot, or `document` - to receive every plain CSS import
572
+ * (e.g. a dependency's own `import './foo.css'`) applied as a side effect.
573
+ * Call once per component instance that needs it, e.g. in `connectedCallback`.
574
+ * Pair with {@link unregisterSideEffectStyleTarget} in `disconnectedCallback`.
575
+ *
576
+ * @param root the root to register
577
+ */
578
+ declare function registerSideEffectStyleTarget(root: DocumentOrShadowRoot): void;
579
+ /**
580
+ * Removes a root registered via {@link registerSideEffectStyleTarget} - call in
581
+ * `disconnectedCallback`.
582
+ *
583
+ * @param root the root to unregister
584
+ */
585
+ declare function unregisterSideEffectStyleTarget(root: DocumentOrShadowRoot): void;
560
586
  type MixinFactory = (base: MixedInCtor) => MixedInCtor;
561
587
  /**
562
588
  * A constructor type that can be used as the base for mixin factories.
@@ -639,6 +665,17 @@ interface ComponentDidUpdate {
639
665
  */
640
666
  componentDidUpdate(): void;
641
667
  }
668
+ /**
669
+ * A map of `@Prop`/`@State` property names to their new and previous
670
+ * values, passed to `componentShouldUpdate` once per render cycle.
671
+ *
672
+ * Pass `this` as `T` to type `changes` against your component's own
673
+ * members, e.g. `componentShouldUpdate(changes: ComponentShouldUpdateChanges<this>)`.
674
+ */
675
+ type ComponentShouldUpdateChanges<T = any> = { [K in Extract<keyof T, string>]?: {
676
+ newVal: T[K];
677
+ oldVal: T[K];
678
+ }; };
642
679
  interface ComponentInterface {
643
680
  connectedCallback?(): void;
644
681
  disconnectedCallback?(): void;
@@ -664,14 +701,18 @@ interface ComponentInterface {
664
701
  */
665
702
  componentDidLoad?(): void;
666
703
  /**
667
- * A `@Prop` or `@State` property changed and a rerender is about to be requested.
704
+ * One or more `@Prop` or `@State` properties changed and a rerender is
705
+ * about to be requested. `changes` contains every property that changed
706
+ * since the last render, keyed by property name.
668
707
  *
669
- * Called multiple times throughout the life of
670
- * the component as its properties change.
708
+ * Called once per render cycle, batching all properties that changed
709
+ * synchronously since the last render.
710
+ *
711
+ * Return `false` to prevent the pending render.
671
712
  *
672
713
  * componentShouldUpdate is not called on the first render.
673
714
  */
674
- componentShouldUpdate?(newVal: any, oldVal: any, propName: string): boolean | void;
715
+ componentShouldUpdate?(changes: ComponentShouldUpdateChanges<this>): boolean | void;
675
716
  /**
676
717
  * The component is about to update and re-render.
677
718
  *
@@ -694,6 +735,54 @@ interface ComponentInterface {
694
735
  render?(): any;
695
736
  [memberName: string]: any;
696
737
  }
738
+ /**
739
+ * A reusable behavior that hooks into a `ReactiveControllerHost`'s lifecycle. Modeled after Lit's
740
+ * `ReactiveController` pattern: implement the hooks you need, then register an instance with a host
741
+ * via `host.addController(this)`.
742
+ */
743
+ interface ReactiveController {
744
+ hostConnected?(): void;
745
+ hostDisconnected?(): void;
746
+ hostWillLoad?(): Promise<void> | void;
747
+ hostDidLoad?(): void;
748
+ hostWillRender?(): Promise<void> | void;
749
+ hostDidRender?(): void;
750
+ hostWillUpdate?(): Promise<void> | void;
751
+ hostDidUpdate?(): void;
752
+ }
753
+ /**
754
+ * The shape added to a component by mixing in `ReactiveControllerHost` (see below).
755
+ */
756
+ interface ReactiveControllerHostInterface extends ComponentInterface, HTMLElement {
757
+ readonly controllers: ReadonlySet<ReactiveController>;
758
+ addController(controller: ReactiveController): void;
759
+ removeController(controller: ReactiveController): void;
760
+ requestUpdate(): void;
761
+ /**
762
+ * Resolves once the next pending render commits. Matches the shape of Lit's
763
+ * `ReactiveControllerHost.updateComplete`, for interop with controllers written against Lit's API
764
+ * (e.g. `@lit/context`).
765
+ */
766
+ readonly updateComplete: Promise<boolean>;
767
+ }
768
+ /**
769
+ * A mixin factory (for use with `Mixin()`) that adds `ReactiveController` support to a component,
770
+ * forwarding each Stencil lifecycle method to every registered controller's matching `hostX` hook.
771
+ *
772
+ * ```ts
773
+ * import { Mixin, ReactiveControllerHost } from '@stencil/core';
774
+ * import { MouseController } from './mouse-controller';
775
+ *
776
+ * class MyComponent extends Mixin(ReactiveControllerHost) {
777
+ * private mouse = new MouseController(this);
778
+ * render() { return <Host>{this.mouse.pos.x}, {this.mouse.pos.y}</Host>; }
779
+ * }
780
+ * ```
781
+ *
782
+ * @param Base the class to extend.
783
+ * @returns a class extending `Base` with reactive-controller support.
784
+ */
785
+ declare function ReactiveControllerHost<B extends MixedInCtor>(Base: B): MixedInCtor<InstanceType<B> & ReactiveControllerHostInterface>;
697
786
  interface EventEmitter<T = any> {
698
787
  emit: (data?: T) => CustomEvent<T>;
699
788
  }
@@ -1096,7 +1185,7 @@ declare namespace JSXBase {
1096
1185
  type?: string;
1097
1186
  value?: string | string[] | number;
1098
1187
  popoverTargetAction?: string;
1099
- popoverTargetElement?: Element | null;
1188
+ popoverTargetElement?: globalThis.Element | null;
1100
1189
  popoverTarget?: string;
1101
1190
  command?: string;
1102
1191
  commandFor?: string;
@@ -1127,6 +1216,7 @@ declare namespace JSXBase {
1127
1216
  onClose?: (event: Event) => void;
1128
1217
  open?: boolean;
1129
1218
  returnValue?: string;
1219
+ closedby?: 'any' | 'closerequest' | 'none';
1130
1220
  }
1131
1221
  interface EmbedHTMLAttributes<T> extends HTMLAttributes<T> {
1132
1222
  height?: number | string;
@@ -1164,6 +1254,8 @@ declare namespace JSXBase {
1164
1254
  allowtransparency?: string | boolean;
1165
1255
  frameBorder?: number | string;
1166
1256
  frameborder?: number | string;
1257
+ fetchPriority?: 'high' | 'low' | 'auto';
1258
+ fetchpriority?: 'high' | 'low' | 'auto';
1167
1259
  importance?: 'low' | 'auto' | 'high';
1168
1260
  height?: number | string;
1169
1261
  loading?: 'lazy' | 'auto' | 'eager';
@@ -1186,6 +1278,8 @@ declare namespace JSXBase {
1186
1278
  crossOrigin?: string;
1187
1279
  crossorigin?: string;
1188
1280
  decoding?: 'async' | 'auto' | 'sync';
1281
+ fetchPriority?: 'high' | 'low' | 'auto';
1282
+ fetchpriority?: 'high' | 'low' | 'auto';
1189
1283
  importance?: 'low' | 'auto' | 'high';
1190
1284
  height?: number | string;
1191
1285
  loading?: 'lazy' | 'auto' | 'eager';
@@ -1263,7 +1357,7 @@ declare namespace JSXBase {
1263
1357
  webkitEntries?: any;
1264
1358
  width?: number | string;
1265
1359
  popoverTargetAction?: string;
1266
- popoverTargetElement?: Element | null;
1360
+ popoverTargetElement?: globalThis.Element | null;
1267
1361
  popoverTarget?: string;
1268
1362
  }
1269
1363
  interface KeygenHTMLAttributes<T> extends HTMLAttributes<T> {
@@ -1285,6 +1379,8 @@ declare namespace JSXBase {
1285
1379
  }
1286
1380
  interface LinkHTMLAttributes<T> extends HTMLAttributes<T> {
1287
1381
  as?: string;
1382
+ fetchPriority?: 'high' | 'low' | 'auto';
1383
+ fetchpriority?: 'high' | 'low' | 'auto';
1288
1384
  href?: string;
1289
1385
  hrefLang?: string;
1290
1386
  hreflang?: string;
@@ -1408,6 +1504,8 @@ declare namespace JSXBase {
1408
1504
  crossOrigin?: string;
1409
1505
  crossorigin?: string;
1410
1506
  defer?: boolean;
1507
+ fetchPriority?: 'high' | 'low' | 'auto';
1508
+ fetchpriority?: 'high' | 'low' | 'auto';
1411
1509
  importance?: 'low' | 'auto' | 'high';
1412
1510
  integrity?: string;
1413
1511
  nonce?: string;
@@ -1523,7 +1621,10 @@ declare namespace JSXBase {
1523
1621
  tabIndex?: number;
1524
1622
  tabindex?: number | string;
1525
1623
  title?: string;
1624
+ translate?: 'yes' | 'no' | (string & {});
1526
1625
  popover?: string | null;
1626
+ focusgroup?: string;
1627
+ focusgroupstart?: boolean;
1527
1628
  inputMode?: string;
1528
1629
  inputmode?: string;
1529
1630
  enterKeyHint?: string;
@@ -1962,7 +2063,7 @@ declare namespace JSXBase {
1962
2063
  [key: `aria${string}`]: string | boolean | undefined;
1963
2064
  }
1964
2065
  }
1965
- interface JSXAttributes<T = Element> {
2066
+ interface JSXAttributes<T = globalThis.Element> {
1966
2067
  key?: string | number;
1967
2068
  ref?: (elm?: T) => void;
1968
2069
  children?: any;
@@ -1979,4 +2080,4 @@ interface CustomElementsDefineOptions {
1979
2080
  ce?: (eventName: string, opts?: any) => CustomEvent;
1980
2081
  }
1981
2082
  //#endregion
1982
- export { AttachInternals, AttachInternalsDecorator, AttachInternalsOptions, AttrDeserialize, AttrDeserializeDecorator, Build, ChildNode, Component, ComponentDecorator, ComponentDidLoad, ComponentDidUpdate, ComponentInterface, ComponentOptions, ComponentWillLoad, ComponentWillUpdate, CustomElementsDefineOptions, Element, ElementDecorator, EncapsulationOptions, Env, ErrorHandler, Event, EventDecorator, EventEmitter, EventOptions, Fragment, FunctionalComponent, FunctionalUtilities, HTMLStencilElement, Host, HostAttributes, LocalJSX as JSX, JSXAttributes, JSXBase, Listen, ListenDecorator, ListenOptions, ListenTargetOptions, Method, MethodDecorator, MethodOptions, MixedInCtor, Mixin, ModeStyles, NoneEncapsulation, Prop, PropDecorator, PropOptions, PropSerialize, PropSerializeDecorator, QueueApi, RafCallback, ResolutionHandler, ResolveVarFunction, ScopedEncapsulation, ShadowEncapsulation, ShadowRootOptions, SignalRef, SlotPatch, State, StateDecorator, TagTransformer, UserBuildConditionals, VNode, VNodeData, Watch, WatchDecorator, forceUpdate, getAssetPath, getElement, getMode, getRenderingRef, getShadowRoot, h, jsx, jsxs, readTask, render, resolveVar, setAssetPath, setErrorHandler, setMode, setNonce, setPlatformHelpers, setTagTransformer, transformTag, writeTask };
2083
+ export { AttachInternals, AttachInternalsDecorator, AttachInternalsOptions, AttrDeserialize, AttrDeserializeDecorator, Build, ChildNode, Component, ComponentDecorator, ComponentDidLoad, ComponentDidUpdate, ComponentInterface, ComponentOptions, ComponentShouldUpdateChanges, ComponentWillLoad, ComponentWillUpdate, CustomElementsDefineOptions, Element, ElementDecorator, EncapsulationOptions, Env, ErrorHandler, Event, EventDecorator, EventEmitter, EventOptions, Fragment, FunctionalComponent, FunctionalUtilities, HTMLStencilElement, Host, HostAttributes, LocalJSX as JSX, JSXAttributes, JSXBase, Listen, ListenDecorator, ListenOptions, ListenTargetOptions, Method, MethodDecorator, MethodOptions, MixedInCtor, Mixin, ModeStyles, NoneEncapsulation, Prop, PropDecorator, PropOptions, PropSerialize, PropSerializeDecorator, QueueApi, RafCallback, ReactiveController, ReactiveControllerHost, ReactiveControllerHostInterface, ResolutionHandler, ResolveVarFunction, ScopedEncapsulation, ShadowEncapsulation, ShadowRootOptions, SignalRef, SlotPatch, State, StateDecorator, TagTransformer, UserBuildConditionals, VNode, VNodeData, Watch, WatchDecorator, forceUpdate, getAssetPath, getElement, getMode, getRenderingRef, getShadowRoot, h, jsx, jsxs, readTask, registerSideEffectStyleTarget, render, resolveVar, setAssetPath, setErrorHandler, setMode, setNonce, setPlatformHelpers, setTagTransformer, transformTag, unregisterSideEffectStyleTarget, writeTask };
@@ -0,0 +1,4 @@
1
+ //#region src/runtime/fragment.ts
2
+ const Fragment = (_, children) => children;
3
+ //#endregion
4
+ export { Fragment as t };
@@ -40,8 +40,20 @@ const HOST_FLAGS = {
40
40
  isWatchReady: 128,
41
41
  isListenReady: 256,
42
42
  needsRerender: 512,
43
- devOnRender: 1024,
44
- devOnDidLoad: 2048
43
+ /**
44
+ * Set once this component's real (lazy-loaded) `connectedCallback` has fired for
45
+ * the first time. Lets a descendant skip creating/awaiting a connect-promise for
46
+ * an ancestor that's already connected. See {@link HostRef.$onFirstConnectResolve$}.
47
+ */
48
+ hasFiredConnected: 1024,
49
+ /**
50
+ * Set when a lazy component's dynamic `import()` fails to resolve a
51
+ * constructor. Distinct from `hasInitializedComponent` being unset, which
52
+ * is true while an initialization attempt is merely queued/in-flight.
53
+ */
54
+ hasFailedLoad: 2048,
55
+ devOnRender: 4096,
56
+ devOnDidLoad: 8192
45
57
  };
46
58
  const CF_scopedCssEncapsulation = 2;
47
59
  /**
@@ -126,7 +138,17 @@ const CMP_FLAGS = {
126
138
  * e.g. `encapsulation: { type: 'none', patches: ['all'] }`
127
139
  * Equivalent to the global `experimentalSlotFixes` config option.
128
140
  */
129
- patchAll: 32768
141
+ patchAll: 32768,
142
+ /**
143
+ * Determines if `clonable` is enabled for a component that uses the shadow DOM.
144
+ * e.g. `encapsulation: { type: 'shadow', clonable: true }` is set on the `@Component()` decorator
145
+ */
146
+ shadowClonable: 65536,
147
+ /**
148
+ * Determines if `serializable` is enabled for a component that uses the shadow DOM.
149
+ * e.g. `encapsulation: { type: 'shadow', serializable: true }` is set on the `@Component()` decorator
150
+ */
151
+ shadowSerializable: 1 << 17
130
152
  };
131
153
  /**
132
154
  * Default style mode id
@@ -221,6 +243,10 @@ const DOCS_VSCODE = "docs-vscode";
221
243
  */
222
244
  const DOCS_CUSTOM_ELEMENTS_MANIFEST = "docs-custom-elements-manifest";
223
245
  /**
246
+ * Constant for the 'docs-agent-skill' output target
247
+ */
248
+ const DOCS_AGENT_SKILL = "docs-agent-skill";
249
+ /**
224
250
  * Constant for the 'stats' output target
225
251
  */
226
252
  const STATS = "stats";
@@ -256,6 +282,7 @@ const VALID_CONFIG_OUTPUT_TARGETS = [
256
282
  DOCS_VSCODE,
257
283
  DOCS_CUSTOM,
258
284
  DOCS_CUSTOM_ELEMENTS_MANIFEST,
285
+ DOCS_AGENT_SKILL,
259
286
  COPY,
260
287
  CUSTOM,
261
288
  STATS
@@ -494,15 +521,4 @@ const isObject = (val) => val != null && typeof val === "object" && Array.isArra
494
521
  const isString = (v) => typeof v === "string";
495
522
  const isIterable = (v) => isDefined(v) && isFunction(v[Symbol.iterator]);
496
523
  //#endregion
497
- //#region src/utils/regular-expression.ts
498
- /**
499
- * Utility function that will escape all regular expression special characters in a string.
500
- *
501
- * @param text The string potentially containing special characters.
502
- * @returns The string with all special characters escaped.
503
- */
504
- const escapeRegExpSpecialCharacters = (text) => {
505
- return text.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
506
- };
507
- //#endregion
508
- export { VALID_CONFIG_OUTPUT_TARGETS as $, DEFAULT_STYLE_MODE as A, HOST_FLAGS as B, ASSETS as C, COLLECTION_MANIFEST_FILE_NAME as D, COLLECTION_APP_DATA_FILE_NAME as E, DOCS_README as F, NODE_TYPES as G, LISTENER_FLAGS as H, DOCS_VSCODE as I, STANDALONE as J, SSR as K, EVENT_FLAGS as L, DOCS_CUSTOM as M, DOCS_CUSTOM_ELEMENTS_MANIFEST as N, COPY as O, DOCS_JSON as P, TYPES as Q, GENERATED_DTS as R, queryNonceMetaTagContent as S, COLLECTION as T, LOADER_BUNDLE as U, HTML_NS as V, MEMBER_FLAGS as W, STYLE_EXT as X, STATS as Y, SVG_NS as Z, sortBy as _, fromEntries as a, toTitleCase as b, isDef as c, isNumber as d, WATCH_FLAGS as et, isObject as f, pluck as g, noop as h, flatOne as i, DIST_LAZY as j, CUSTOM as k, isFunction as l, mergeIntoWith as m, dashToPascalCase as n, XLINK_NS as nt, isBoolean as o, isString as p, SSR_WASM as q, escapeWithPattern as r, isComplexType as s, escapeRegExpSpecialCharacters as t, WWW as tt, isIterable as u, toCamelCase as v, CMP_FLAGS as w, unique as x, toDashCase as y, GLOBAL_STYLE as z };
524
+ export { VALID_CONFIG_OUTPUT_TARGETS as $, DIST_LAZY as A, HOST_FLAGS as B, CMP_FLAGS as C, COPY as D, COLLECTION_MANIFEST_FILE_NAME as E, DOCS_README as F, NODE_TYPES as G, LISTENER_FLAGS as H, DOCS_VSCODE as I, STANDALONE as J, SSR as K, EVENT_FLAGS as L, DOCS_CUSTOM as M, DOCS_CUSTOM_ELEMENTS_MANIFEST as N, CUSTOM as O, DOCS_JSON as P, TYPES as Q, GENERATED_DTS as R, ASSETS as S, COLLECTION_APP_DATA_FILE_NAME as T, LOADER_BUNDLE as U, HTML_NS as V, MEMBER_FLAGS as W, STYLE_EXT as X, STATS as Y, SVG_NS as Z, toCamelCase as _, isBoolean as a, unique as b, isFunction as c, isObject as d, WATCH_FLAGS as et, isString as f, sortBy as g, pluck as h, fromEntries as i, DOCS_AGENT_SKILL as j, DEFAULT_STYLE_MODE as k, isIterable as l, noop as m, escapeWithPattern as n, XLINK_NS as nt, isComplexType as o, mergeIntoWith as p, SSR_WASM as q, flatOne as r, isDef as s, dashToPascalCase as t, WWW as tt, isNumber as u, toDashCase as v, COLLECTION as w, queryNonceMetaTagContent as x, toTitleCase as y, GLOBAL_STYLE as z };
@@ -1,7 +1,6 @@
1
+ import "rolldown";
2
+ import "typescript";
1
3
  //#region src/declarations/stencil-public-runtime.d.ts
2
- interface ElementDecorator {
3
- (): PropertyDecorator;
4
- }
5
4
  interface EventDecorator {
6
5
  (opts?: EventOptions): PropertyDecorator;
7
6
  }
@@ -23,11 +22,6 @@ interface EventOptions {
23
22
  */
24
23
  composed?: boolean;
25
24
  }
26
- /**
27
- * The `@Element()` decorator is a reference to the actual host element
28
- * once it has rendered.
29
- */
30
- declare const Element$1: ElementDecorator;
31
25
  /**
32
26
  * Components can emit data and events using the Event Emitter decorator.
33
27
  * To dispatch Custom DOM events for other components to handle, use the
@@ -41,6 +35,27 @@ interface HTMLStencilElement extends HTMLElement {
41
35
  componentOnReady(): Promise<this>;
42
36
  }
43
37
  type TagTransformer = (tag: string) => string;
38
+ /**
39
+ * A constructor type that can be used as the base for mixin factories.
40
+ *
41
+ * ```ts
42
+ * import { MixedInCtor } from '@stencil/core';
43
+ *
44
+ * const AFactoryFn = <B extends MixedInCtor>(Base: B) => {class A extends Base { propA = A }; return A;}
45
+ * ```
46
+ */
47
+ type MixedInCtor<T = {}> = new (...args: any[]) => T;
48
+ /**
49
+ * A map of `@Prop`/`@State` property names to their new and previous
50
+ * values, passed to `componentShouldUpdate` once per render cycle.
51
+ *
52
+ * Pass `this` as `T` to type `changes` against your component's own
53
+ * members, e.g. `componentShouldUpdate(changes: ComponentShouldUpdateChanges<this>)`.
54
+ */
55
+ type ComponentShouldUpdateChanges<T = any> = { [K in Extract<keyof T, string>]?: {
56
+ newVal: T[K];
57
+ oldVal: T[K];
58
+ }; };
44
59
  interface ComponentInterface {
45
60
  connectedCallback?(): void;
46
61
  disconnectedCallback?(): void;
@@ -66,14 +81,18 @@ interface ComponentInterface {
66
81
  */
67
82
  componentDidLoad?(): void;
68
83
  /**
69
- * A `@Prop` or `@State` property changed and a rerender is about to be requested.
84
+ * One or more `@Prop` or `@State` properties changed and a rerender is
85
+ * about to be requested. `changes` contains every property that changed
86
+ * since the last render, keyed by property name.
70
87
  *
71
- * Called multiple times throughout the life of
72
- * the component as its properties change.
88
+ * Called once per render cycle, batching all properties that changed
89
+ * synchronously since the last render.
90
+ *
91
+ * Return `false` to prevent the pending render.
73
92
  *
74
93
  * componentShouldUpdate is not called on the first render.
75
94
  */
76
- componentShouldUpdate?(newVal: any, oldVal: any, propName: string): boolean | void;
95
+ componentShouldUpdate?(changes: ComponentShouldUpdateChanges<this>): boolean | void;
77
96
  /**
78
97
  * The component is about to update and re-render.
79
98
  *
@@ -96,6 +115,36 @@ interface ComponentInterface {
96
115
  render?(): any;
97
116
  [memberName: string]: any;
98
117
  }
118
+ /**
119
+ * A reusable behavior that hooks into a `ReactiveControllerHost`'s lifecycle. Modeled after Lit's
120
+ * `ReactiveController` pattern: implement the hooks you need, then register an instance with a host
121
+ * via `host.addController(this)`.
122
+ */
123
+ interface ReactiveController {
124
+ hostConnected?(): void;
125
+ hostDisconnected?(): void;
126
+ hostWillLoad?(): Promise<void> | void;
127
+ hostDidLoad?(): void;
128
+ hostWillRender?(): Promise<void> | void;
129
+ hostDidRender?(): void;
130
+ hostWillUpdate?(): Promise<void> | void;
131
+ hostDidUpdate?(): void;
132
+ }
133
+ /**
134
+ * The shape added to a component by mixing in `ReactiveControllerHost` (see below).
135
+ */
136
+ interface ReactiveControllerHostInterface extends ComponentInterface, HTMLElement {
137
+ readonly controllers: ReadonlySet<ReactiveController>;
138
+ addController(controller: ReactiveController): void;
139
+ removeController(controller: ReactiveController): void;
140
+ requestUpdate(): void;
141
+ /**
142
+ * Resolves once the next pending render commits. Matches the shape of Lit's
143
+ * `ReactiveControllerHost.updateComplete`, for interop with controllers written against Lit's API
144
+ * (e.g. `@lit/context`).
145
+ */
146
+ readonly updateComplete: Promise<boolean>;
147
+ }
99
148
  /**
100
149
  * Minimal interface matched by signal objects (from @stencil/core/signals).
101
150
  * Used in JSX attribute types.
@@ -403,7 +452,7 @@ declare namespace JSXBase {
403
452
  type?: string;
404
453
  value?: string | string[] | number;
405
454
  popoverTargetAction?: string;
406
- popoverTargetElement?: Element$1 | null;
455
+ popoverTargetElement?: globalThis.Element | null;
407
456
  popoverTarget?: string;
408
457
  command?: string;
409
458
  commandFor?: string;
@@ -434,6 +483,7 @@ declare namespace JSXBase {
434
483
  onClose?: (event: Event) => void;
435
484
  open?: boolean;
436
485
  returnValue?: string;
486
+ closedby?: 'any' | 'closerequest' | 'none';
437
487
  }
438
488
  interface EmbedHTMLAttributes<T> extends HTMLAttributes<T> {
439
489
  height?: number | string;
@@ -471,6 +521,8 @@ declare namespace JSXBase {
471
521
  allowtransparency?: string | boolean;
472
522
  frameBorder?: number | string;
473
523
  frameborder?: number | string;
524
+ fetchPriority?: 'high' | 'low' | 'auto';
525
+ fetchpriority?: 'high' | 'low' | 'auto';
474
526
  importance?: 'low' | 'auto' | 'high';
475
527
  height?: number | string;
476
528
  loading?: 'lazy' | 'auto' | 'eager';
@@ -493,6 +545,8 @@ declare namespace JSXBase {
493
545
  crossOrigin?: string;
494
546
  crossorigin?: string;
495
547
  decoding?: 'async' | 'auto' | 'sync';
548
+ fetchPriority?: 'high' | 'low' | 'auto';
549
+ fetchpriority?: 'high' | 'low' | 'auto';
496
550
  importance?: 'low' | 'auto' | 'high';
497
551
  height?: number | string;
498
552
  loading?: 'lazy' | 'auto' | 'eager';
@@ -570,7 +624,7 @@ declare namespace JSXBase {
570
624
  webkitEntries?: any;
571
625
  width?: number | string;
572
626
  popoverTargetAction?: string;
573
- popoverTargetElement?: Element$1 | null;
627
+ popoverTargetElement?: globalThis.Element | null;
574
628
  popoverTarget?: string;
575
629
  }
576
630
  interface KeygenHTMLAttributes<T> extends HTMLAttributes<T> {
@@ -592,6 +646,8 @@ declare namespace JSXBase {
592
646
  }
593
647
  interface LinkHTMLAttributes<T> extends HTMLAttributes<T> {
594
648
  as?: string;
649
+ fetchPriority?: 'high' | 'low' | 'auto';
650
+ fetchpriority?: 'high' | 'low' | 'auto';
595
651
  href?: string;
596
652
  hrefLang?: string;
597
653
  hreflang?: string;
@@ -715,6 +771,8 @@ declare namespace JSXBase {
715
771
  crossOrigin?: string;
716
772
  crossorigin?: string;
717
773
  defer?: boolean;
774
+ fetchPriority?: 'high' | 'low' | 'auto';
775
+ fetchpriority?: 'high' | 'low' | 'auto';
718
776
  importance?: 'low' | 'auto' | 'high';
719
777
  integrity?: string;
720
778
  nonce?: string;
@@ -830,7 +888,10 @@ declare namespace JSXBase {
830
888
  tabIndex?: number;
831
889
  tabindex?: number | string;
832
890
  title?: string;
891
+ translate?: 'yes' | 'no' | (string & {});
833
892
  popover?: string | null;
893
+ focusgroup?: string;
894
+ focusgroupstart?: boolean;
834
895
  inputMode?: string;
835
896
  inputmode?: string;
836
897
  enterKeyHint?: string;
@@ -1269,7 +1330,7 @@ declare namespace JSXBase {
1269
1330
  [key: `aria${string}`]: string | boolean | undefined;
1270
1331
  }
1271
1332
  }
1272
- interface JSXAttributes<T = Element$1> {
1333
+ interface JSXAttributes<T = globalThis.Element> {
1273
1334
  key?: string | number;
1274
1335
  ref?: (elm?: T) => void;
1275
1336
  children?: any;
@@ -1295,6 +1356,8 @@ interface BuildFeatures {
1295
1356
  shadowDelegatesFocus: boolean;
1296
1357
  shadowModeClosed: boolean;
1297
1358
  shadowSlotAssignmentManual: boolean;
1359
+ shadowClonable: boolean;
1360
+ shadowSerializable: boolean;
1298
1361
  scoped: boolean;
1299
1362
  /**
1300
1363
  * Every component has a render function
@@ -1311,6 +1374,8 @@ interface BuildFeatures {
1311
1374
  vdomKey: boolean;
1312
1375
  vdomListener: boolean;
1313
1376
  vdomPropOrAttr: boolean;
1377
+ /** True when at least one component uses the explicit `attr:`/`prop:` JSX prefix. */
1378
+ vdomPropOrAttrPrefix: boolean;
1314
1379
  vdomRef: boolean;
1315
1380
  vdomStyle: boolean;
1316
1381
  vdomText: boolean;
@@ -1501,6 +1566,15 @@ interface HostElement extends HTMLElement {
1501
1566
  * must be resolved for the top, ancestor component to be fully hydrated
1502
1567
  */
1503
1568
  ['s-p']?: Promise<void>[];
1569
+ /**
1570
+ * Pending Connects:
1571
+ * A list of {@link HostRef.$onFirstConnectPromise$} promises for descendants that
1572
+ * were already registered with this component (their nearest Stencil ancestor) by
1573
+ * the time this component's own initial `componentWillLoad` was scheduled. Awaited
1574
+ * so this component's `componentWillLoad` can't fire before those descendants'
1575
+ * real `connectedCallback`s have.
1576
+ */
1577
+ ['s-pc']?: Promise<void>[];
1504
1578
  componentOnReady?: () => Promise<this>;
1505
1579
  }
1506
1580
  /**
@@ -1540,6 +1614,11 @@ interface RenderNode extends HostElement {
1540
1614
  * Slot name of either the slot itself or the slotted node
1541
1615
  */
1542
1616
  ['s-sn']?: string;
1617
+ /**
1618
+ * `slot` attribute of a `<slot>` reference rendered as a text node (no fallback content),
1619
+ * since text nodes can't carry real DOM attributes.
1620
+ */
1621
+ ['s-sa']?: string;
1543
1622
  /**
1544
1623
  * Host element tag name:
1545
1624
  * The tag name of the host element that this
@@ -1592,7 +1671,7 @@ interface RenderNode extends HostElement {
1592
1671
  * Used to know the components encapsulation.
1593
1672
  * empty "" for shadow, "c" from scoped
1594
1673
  */
1595
- ['s-en']?: '' | /*shadow*/'c';
1674
+ ['s-en']?: '' | /*shadow*/ 'c';
1596
1675
  /**
1597
1676
  * On a `scoped: true` component
1598
1677
  * with `lightDomPatches` flag enabled,
@@ -1717,10 +1796,26 @@ interface PatchedSlotNode extends Node {
1717
1796
  __previousElementSibling?: RenderNode;
1718
1797
  }
1719
1798
  type LazyBundlesRuntimeData = LazyBundleRuntimeData[];
1720
- type LazyBundleRuntimeData = [/** bundleIds */string, ComponentRuntimeMetaCompact[]];
1721
- type ComponentRuntimeMetaCompact = [/** flags */number, /** tagname */string, /** members */{
1799
+ type LazyBundleRuntimeData = [
1800
+ /** bundleIds */
1801
+ string, ComponentRuntimeMetaCompact[]];
1802
+ type ComponentRuntimeMetaCompact = [
1803
+ /** flags */
1804
+ number,
1805
+ /** tagname */
1806
+ string,
1807
+ /** members */
1808
+ {
1722
1809
  [memberName: string]: ComponentRuntimeMember;
1723
- }?, /** listeners */ComponentRuntimeHostListener[]?, /** watchers */ComponentConstructorChangeHandlers?, /** serializers */ComponentConstructorChangeHandlers?, /** deserializers */ComponentConstructorChangeHandlers?];
1810
+ }?,
1811
+ /** listeners */
1812
+ ComponentRuntimeHostListener[]?,
1813
+ /** watchers */
1814
+ ComponentConstructorChangeHandlers?,
1815
+ /** serializers */
1816
+ ComponentConstructorChangeHandlers?,
1817
+ /** deserializers */
1818
+ ComponentConstructorChangeHandlers?];
1724
1819
  /**
1725
1820
  * Runtime metadata for a Stencil component
1726
1821
  */
@@ -1823,6 +1918,11 @@ interface HostRef {
1823
1918
  $cmpMeta$: ComponentRuntimeMeta;
1824
1919
  $hostElement$: HostElement;
1825
1920
  $instanceValues$?: Map<string, any>;
1921
+ /**
1922
+ * Prop/state changes accumulated since the last render, flushed to
1923
+ * `componentShouldUpdate` once per render cycle.
1924
+ */
1925
+ $queuedPropChanges$?: ComponentShouldUpdateChanges;
1826
1926
  $signalValues$?: Map<string, import('@preact/signals-core').Signal<any>>;
1827
1927
  /** Dispose function that tears down all signal effects for this component. */
1828
1928
  $signalCleanup$?: () => void;
@@ -1858,6 +1958,21 @@ interface HostRef {
1858
1958
  * It is called after {@link HostRef.$onInstancePromise$} resolves.
1859
1959
  */
1860
1960
  $onRenderResolve$?: () => void;
1961
+ /**
1962
+ * A promise that resolves once this component's real `connectedCallback` has fired
1963
+ * for the first time. Created lazily - either by a descendant that needs to wait for
1964
+ * this component's connection before firing its own real `connectedCallback`
1965
+ * ({@link HOST_FLAGS.hasFiredConnected}), or by this component registering itself
1966
+ * with its nearest Stencil ancestor's `s-pc` list. This is what lets a component's
1967
+ * real `connectedCallback` (and, transitively, a pending ancestor's initial
1968
+ * `componentWillLoad`) stay ordered correctly regardless of which of an
1969
+ * ancestor/descendant pair's lazy module happens to resolve first.
1970
+ */
1971
+ $onFirstConnectPromise$?: Promise<void>;
1972
+ /**
1973
+ * A callback which resolves {@link HostRef.$onFirstConnectPromise$}
1974
+ */
1975
+ $onFirstConnectResolve$?: () => void;
1861
1976
  $vnode$?: VNode;
1862
1977
  $queuedListeners$?: [string, any][];
1863
1978
  $rmListeners$?: (() => void)[];
@@ -1867,6 +1982,11 @@ interface HostRef {
1867
1982
  * Defer connectedCallback until after first render for components with slot relocation.
1868
1983
  */
1869
1984
  $deferredConnectedCallback$?: boolean;
1985
+ /**
1986
+ * The number of times this host's lazy component load has failed and been retried.
1987
+ * Used to give up retrying after {@link MAX_LAZY_LOAD_RETRIES} failed attempts.
1988
+ */
1989
+ $loadRetryCount$?: number;
1870
1990
  }
1871
1991
  interface PlatformRuntime {
1872
1992
  /**
@@ -1911,6 +2031,18 @@ interface PlatformRuntime {
1911
2031
  ce: (eventName: string, opts?: any) => CustomEvent;
1912
2032
  }
1913
2033
  type ChildType = VNode | number | string;
2034
+ type PropsType = VNodeProdData | number | string | null;
2035
+ interface VNodeProdData {
2036
+ key?: string | number;
2037
+ class?: {
2038
+ [className: string]: boolean;
2039
+ } | string;
2040
+ className?: {
2041
+ [className: string]: boolean;
2042
+ } | string;
2043
+ style?: any;
2044
+ [key: string]: any;
2045
+ }
1914
2046
  //#endregion
1915
2047
  //#region src/app-data/index.d.ts
1916
2048
  /**
@@ -1939,4 +2071,4 @@ declare const BUILD: BuildConditionals;
1939
2071
  declare const Env: {};
1940
2072
  declare const NAMESPACE: string;
1941
2073
  //#endregion
1942
- export { VNode as S, FunctionalComponent as _, ComponentConstructor as a, ResolutionHandler as b, ComponentRuntimeMeta as c, HostRef as d, LazyBundlesRuntimeData as f, CustomElementsDefineOptions as g, RuntimeRef as h, ChildType as i, ComponentRuntimeMetaCompact as l, RenderNode as m, Env as n, ComponentConstructorChangeHandlers as o, PlatformRuntime as p, NAMESPACE as r, ComponentRuntimeHostListener as s, BUILD as t, HostElement as u, HTMLStencilElement as v, TagTransformer as x, JSXBase as y };
2074
+ export { ReactiveControllerHostInterface as C, VNode as E, MixedInCtor as S, TagTransformer as T, ComponentInterface as _, ComponentConstructor as a, HTMLStencilElement as b, ComponentRuntimeMeta as c, HostRef as d, LazyBundlesRuntimeData as f, RuntimeRef as g, RenderNode as h, ChildType as i, ComponentRuntimeMetaCompact as l, PropsType as m, Env as n, ComponentConstructorChangeHandlers as o, PlatformRuntime as p, NAMESPACE as r, ComponentRuntimeHostListener as s, BUILD as t, HostElement as u, CustomElementsDefineOptions as v, ResolutionHandler as w, JSXBase as x, FunctionalComponent as y };