@stencil/core 5.0.0-alpha.32 → 5.0.0-alpha.34

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 (34) hide show
  1. package/dist/app-data/index.d.ts +1 -1
  2. package/dist/app-data/index.js +3 -0
  3. package/dist/client-BVfiFFJ4.mjs +2368 -0
  4. package/dist/compiler/index.d.mts +1 -1
  5. package/dist/compiler/index.mjs +2 -3
  6. package/dist/compiler/utils/index.d.mts +1 -1
  7. package/dist/compiler/utils/index.mjs +3 -3
  8. package/dist/{compiler-D2MlfN4O.mjs → compiler-DkOB0Joz.mjs} +479 -13
  9. package/dist/declarations/stencil-public-compiler.d.ts +24 -3
  10. package/dist/declarations/stencil-public-runtime.d.ts +10 -0
  11. package/dist/{regular-expression-XqU5zmPp.mjs → helpers-Cpp3qc3u.mjs} +12 -13
  12. package/dist/{index-BHj3EBl2.d.mts → index-BcfVWmNG.d.mts} +44 -3
  13. package/dist/{index-D2PAsXxx.d.ts → index-BsC_D1Ve.d.ts} +4 -0
  14. package/dist/{index-VK8okIiF.d.mts → index-Cy8qbpEV.d.mts} +2 -10
  15. package/dist/index.mjs +1 -1
  16. package/dist/jsx-runtime.mjs +1 -1
  17. package/dist/{node-DRT35FuO.mjs → node-DQBayfoI.mjs} +3 -3
  18. package/dist/runtime/client/lazy.js +15 -3
  19. package/dist/runtime/client/runtime.js +15 -3
  20. package/dist/runtime/index.d.ts +1 -1
  21. package/dist/runtime/index.js +15 -3
  22. package/dist/runtime/server/index.mjs +15 -3
  23. package/dist/runtime/server/runner.mjs +21 -3
  24. package/dist/signals/index.js +3 -0
  25. package/dist/sys/node/index.d.mts +1 -1
  26. package/dist/sys/node/index.mjs +1 -1
  27. package/dist/sys/node/worker.mjs +2 -2
  28. package/dist/testing/index.d.mts +4681 -100
  29. package/dist/testing/index.mjs +7558 -780
  30. package/dist/{util-BIa-iHnt.mjs → util-IKfWWLJo.mjs} +1 -1
  31. package/dist/{validation-Dd3g77T5.mjs → validation-DAdGTrys.mjs} +16 -3
  32. package/package.json +4 -4
  33. package/dist/client-C3HYn-8p.mjs +0 -4850
  34. package/dist/reactive-controller-BdCpSAQP.d.mts +0 -13
@@ -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.
@@ -138,7 +138,17 @@ const CMP_FLAGS = {
138
138
  * e.g. `encapsulation: { type: 'none', patches: ['all'] }`
139
139
  * Equivalent to the global `experimentalSlotFixes` config option.
140
140
  */
141
- 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
142
152
  };
143
153
  /**
144
154
  * Default style mode id
@@ -511,15 +521,4 @@ const isObject = (val) => val != null && typeof val === "object" && Array.isArra
511
521
  const isString = (v) => typeof v === "string";
512
522
  const isIterable = (v) => isDefined(v) && isFunction(v[Symbol.iterator]);
513
523
  //#endregion
514
- //#region src/utils/regular-expression.ts
515
- /**
516
- * Utility function that will escape all regular expression special characters in a string.
517
- *
518
- * @param text The string potentially containing special characters.
519
- * @returns The string with all special characters escaped.
520
- */
521
- const escapeRegExpSpecialCharacters = (text) => {
522
- return text.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
523
- };
524
- //#endregion
525
- export { TYPES as $, DEFAULT_STYLE_MODE as A, GLOBAL_STYLE as B, ASSETS as C, COLLECTION_MANIFEST_FILE_NAME as D, COLLECTION_APP_DATA_FILE_NAME as E, DOCS_JSON as F, MEMBER_FLAGS as G, HTML_NS as H, DOCS_README as I, SSR_WASM as J, NODE_TYPES as K, DOCS_VSCODE as L, DOCS_AGENT_SKILL as M, DOCS_CUSTOM as N, COPY as O, DOCS_CUSTOM_ELEMENTS_MANIFEST as P, SVG_NS as Q, EVENT_FLAGS as R, queryNonceMetaTagContent as S, COLLECTION as T, LISTENER_FLAGS as U, HOST_FLAGS as V, LOADER_BUNDLE as W, STATS as X, STANDALONE as Y, STYLE_EXT as Z, sortBy as _, fromEntries as a, toTitleCase as b, isDef as c, isNumber as d, VALID_CONFIG_OUTPUT_TARGETS 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, WWW as nt, isBoolean as o, isString as p, SSR as q, escapeWithPattern as r, XLINK_NS as rt, isComplexType as s, escapeRegExpSpecialCharacters as t, WATCH_FLAGS as tt, isIterable as u, toCamelCase as v, CMP_FLAGS as w, unique as x, toDashCase as y, GENERATED_DTS 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 };
@@ -144,6 +144,16 @@ declare const CMP_FLAGS: {
144
144
  * Equivalent to the global `experimentalSlotFixes` config option.
145
145
  */
146
146
  readonly patchAll: number;
147
+ /**
148
+ * Determines if `clonable` is enabled for a component that uses the shadow DOM.
149
+ * e.g. `encapsulation: { type: 'shadow', clonable: true }` is set on the `@Component()` decorator
150
+ */
151
+ readonly shadowClonable: number;
152
+ /**
153
+ * Determines if `serializable` is enabled for a component that uses the shadow DOM.
154
+ * e.g. `encapsulation: { type: 'shadow', serializable: true }` is set on the `@Component()` decorator
155
+ */
156
+ readonly shadowSerializable: number;
147
157
  };
148
158
  /**
149
159
  * Default style mode id
@@ -1446,6 +1456,16 @@ interface ShadowEncapsulation {
1446
1456
  * declarative slotting behavior.
1447
1457
  */
1448
1458
  slotAssignment?: 'manual' | 'named';
1459
+ /**
1460
+ * When set to `true`, the shadow root is preserved when the host element is deep-cloned via
1461
+ * `Node.cloneNode(true)`. Without this, cloning a shadow host produces an empty shell.
1462
+ */
1463
+ clonable?: boolean;
1464
+ /**
1465
+ * When set to `true`, marks the shadow root as serializable so it is included when the host
1466
+ * element is serialized via `Element.getHTML({ serializableShadowRoots: true })`.
1467
+ */
1468
+ serializable?: boolean;
1449
1469
  }
1450
1470
  /**
1451
1471
  * Patch types for non-shadow DOM components that use slots.
@@ -4281,9 +4301,11 @@ interface CompilerRequestResponse {
4281
4301
  interface TranspileOptions {
4282
4302
  /**
4283
4303
  * A component can be defined as a custom element by using `customelement`, or the
4284
- * component class can be exported by using `module`. Default is `customelement`.
4304
+ * component class can be exported by using `module`. Set to `null` to leave the
4305
+ * class's own export as-is (used with `componentMetadata: 'compilerstatic'` for
4306
+ * unit-testing preprocessors). Default is `customelement`.
4285
4307
  */
4286
- componentExport?: 'customelement' | 'module' | string | undefined;
4308
+ componentExport?: 'customelement' | 'module' | string | null | undefined;
4287
4309
  /**
4288
4310
  * Sets how and if component metadata should be assigned on the compiled
4289
4311
  * component output. The `compilerstatic` value will set the metadata to
@@ -4318,8 +4340,11 @@ interface TranspileOptions {
4318
4340
  /**
4319
4341
  * How component styles should be associated to the component. The `static`
4320
4342
  * setting will assign the styles as a static getter on the component class.
4343
+ * Set to `null` to skip the assignment entirely (and leave any `styleUrl`
4344
+ * import unresolved) - useful for unit-testing preprocessors that don't
4345
+ * need real stylesheets.
4321
4346
  */
4322
- style?: 'static' | string | undefined;
4347
+ style?: 'static' | string | null | undefined;
4323
4348
  /**
4324
4349
  * How style data should be added for imports. For example, the `queryparams` value
4325
4350
  * adds the component's tagname and encapsulation info as querystring parameter
@@ -4538,6 +4563,8 @@ interface BuildFeatures {
4538
4563
  shadowDelegatesFocus: boolean;
4539
4564
  shadowModeClosed: boolean;
4540
4565
  shadowSlotAssignmentManual: boolean;
4566
+ shadowClonable: boolean;
4567
+ shadowSerializable: boolean;
4541
4568
  scoped: boolean;
4542
4569
  /**
4543
4570
  * Every component has a render function
@@ -4554,6 +4581,8 @@ interface BuildFeatures {
4554
4581
  vdomKey: boolean;
4555
4582
  vdomListener: boolean;
4556
4583
  vdomPropOrAttr: boolean;
4584
+ /** True when at least one component uses the explicit `attr:`/`prop:` JSX prefix. */
4585
+ vdomPropOrAttrPrefix: boolean;
4557
4586
  vdomRef: boolean;
4558
4587
  vdomStyle: boolean;
4559
4588
  vdomText: boolean;
@@ -5002,6 +5031,7 @@ interface ComponentCompilerFeatures {
5002
5031
  hasVdomKey: boolean;
5003
5032
  hasVdomListener: boolean;
5004
5033
  hasVdomPropOrAttr: boolean;
5034
+ hasVdomPropOrAttrPrefix: boolean;
5005
5035
  hasVdomRef: boolean;
5006
5036
  hasVdomRender: boolean;
5007
5037
  hasVdomStyle: boolean;
@@ -5085,6 +5115,16 @@ interface ComponentCompilerMeta extends ComponentCompilerFeatures {
5085
5115
  properties: ComponentCompilerProperty[];
5086
5116
  serializers: ComponentCompilerChangeHandler[];
5087
5117
  shadowDelegatesFocus: boolean;
5118
+ /**
5119
+ * Whether the shadow root is preserved when the host element is deep-cloned via
5120
+ * `Node.cloneNode(true)`. Only applicable when encapsulation is 'shadow'.
5121
+ */
5122
+ shadowClonable: boolean;
5123
+ /**
5124
+ * Whether the shadow root is marked serializable for `Element.getHTML({ serializableShadowRoots: true })`.
5125
+ * Only applicable when encapsulation is 'shadow'.
5126
+ */
5127
+ shadowSerializable: boolean;
5088
5128
  /**
5089
5129
  * Shadow DOM mode. 'open' (default) or 'closed'.
5090
5130
  * Only applicable when encapsulation is 'shadow'.
@@ -5663,6 +5703,7 @@ interface Module {
5663
5703
  hasVdomKey: boolean;
5664
5704
  hasVdomListener: boolean;
5665
5705
  hasVdomPropOrAttr: boolean;
5706
+ hasVdomPropOrAttrPrefix: boolean;
5666
5707
  hasVdomRef: boolean;
5667
5708
  hasVdomRender: boolean;
5668
5709
  hasVdomStyle: boolean;
@@ -1364,6 +1364,8 @@ interface BuildFeatures {
1364
1364
  shadowDelegatesFocus: boolean;
1365
1365
  shadowModeClosed: boolean;
1366
1366
  shadowSlotAssignmentManual: boolean;
1367
+ shadowClonable: boolean;
1368
+ shadowSerializable: boolean;
1367
1369
  scoped: boolean;
1368
1370
  /**
1369
1371
  * Every component has a render function
@@ -1380,6 +1382,8 @@ interface BuildFeatures {
1380
1382
  vdomKey: boolean;
1381
1383
  vdomListener: boolean;
1382
1384
  vdomPropOrAttr: boolean;
1385
+ /** True when at least one component uses the explicit `attr:`/`prop:` JSX prefix. */
1386
+ vdomPropOrAttrPrefix: boolean;
1383
1387
  vdomRef: boolean;
1384
1388
  vdomStyle: boolean;
1385
1389
  vdomText: boolean;
@@ -1,4 +1,4 @@
1
- import { Ca as VNode, Et as HostElement, Sa as UserBuildConditionals, ba as ResolutionHandler, cn as RuntimeRef, ga as FunctionalComponent, ha as ErrorHandler, p as ChildType, va as RafCallback, xa as TagTransformer } from "./index-BHj3EBl2.mjs";
1
+ import { Ca as VNode, Et as HostElement, Sa as UserBuildConditionals, ba as ResolutionHandler, cn as RuntimeRef, ga as FunctionalComponent, ha as ErrorHandler, p as ChildType, va as RafCallback, xa as TagTransformer } from "./index-BcfVWmNG.mjs";
2
2
  //#region src/client/client-build.d.ts
3
3
  declare const Build: UserBuildConditionals;
4
4
  //#endregion
@@ -18,9 +18,6 @@ declare const setPlatformHelpers: (helpers: {
18
18
  ce?: (eventName: string, opts?: any) => any;
19
19
  }) => void;
20
20
  //#endregion
21
- //#region src/app-data/index.d.ts
22
- declare const Env: {};
23
- //#endregion
24
21
  //#region src/runtime/element.d.ts
25
22
  declare const getElement: (ref: any) => HostElement;
26
23
  /**
@@ -36,11 +33,6 @@ declare const getElement: (ref: any) => HostElement;
36
33
  */
37
34
  declare const getShadowRoot: (element: HTMLElement) => ShadowRoot | null;
38
35
  //#endregion
39
- //#region src/runtime/event-emitter.d.ts
40
- declare const createEvent: (ref: RuntimeRef, name: string, flags: number) => {
41
- emit: (detail: any) => CustomEvent<any>;
42
- };
43
- //#endregion
44
36
  //#region src/runtime/fragment.d.ts
45
37
  declare const Fragment: FunctionalComponent;
46
38
  //#endregion
@@ -105,4 +97,4 @@ declare const jsxs: typeof jsx;
105
97
  */
106
98
  declare const jsxDEV: typeof jsx;
107
99
  //#endregion
108
- export { Build as S, Env as _, h as a, writeTask as b, setTagTransformer as c, getMode as d, setMode as f, getShadowRoot as g, getElement as h, Host as i, transformTag as l, createEvent as m, jsxDEV as n, forceUpdate as o, Fragment as p, jsxs as r, getRenderingRef as s, jsx as t, render as u, setPlatformHelpers as v, setErrorHandler as x, readTask as y };
100
+ export { readTask as _, h as a, Build as b, setTagTransformer as c, getMode as d, setMode as f, setPlatformHelpers as g, getShadowRoot as h, Host as i, transformTag as l, getElement as m, jsxDEV as n, forceUpdate as o, Fragment as p, jsxs as r, getRenderingRef as s, jsx as t, render as u, writeTask as v, setErrorHandler as y };
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { C as setAssetPath, E as setPlatformHelpers, I as Build, N as setErrorHandler, S as getAssetPath, T as writeTask, a as transformTag, b as getElement, c as Mixin, d as setMode, g as getRenderingRef, h as forceUpdate, i as setTagTransformer, m as h, o as render, p as Host, s as ReactiveControllerHost, u as getMode, w as readTask, x as getShadowRoot } from "./client-C3HYn-8p.mjs";
1
+ import { C as setErrorHandler, _ as getAssetPath, a as transformTag, b as writeTask, c as Mixin, d as Host, f as h, g as getShadowRoot, h as getElement, i as setTagTransformer, l as getMode, m as getRenderingRef, o as render, p as forceUpdate, s as ReactiveControllerHost, u as setMode, v as setAssetPath, w as Build, x as setPlatformHelpers, y as readTask } from "./client-BVfiFFJ4.mjs";
2
2
  import { t as Fragment } from "./fragment-Di1hWOC8.mjs";
3
3
  //#region src/client/client-decorators.ts
4
4
  /**
@@ -1,3 +1,3 @@
1
- import { n as jsxDEV, r as jsxs, t as jsx } from "./client-C3HYn-8p.mjs";
1
+ import { n as jsxDEV, r as jsxs, t as jsx } from "./client-BVfiFFJ4.mjs";
2
2
  import { t as Fragment } from "./fragment-Di1hWOC8.mjs";
3
3
  export { Fragment, jsx, jsxDEV, jsxs };
@@ -1,7 +1,7 @@
1
1
  import { n as __require } from "./rolldown-runtime-BhDjJH2R.mjs";
2
- import "./client-C3HYn-8p.mjs";
3
- import { h as noop, i as flatOne, l as isFunction, p as isString } from "./regular-expression-XqU5zmPp.mjs";
4
- import { $ as catchError, K as normalizePath, X as buildError, Y as TASK_CANCELED_MSG, nt as shouldIgnoreError, rt as isGlob } from "./util-BIa-iHnt.mjs";
2
+ import "./client-BVfiFFJ4.mjs";
3
+ import { c as isFunction, f as isString, m as noop, r as flatOne } from "./helpers-Cpp3qc3u.mjs";
4
+ import { $ as catchError, K as normalizePath, X as buildError, Y as TASK_CANCELED_MSG, nt as shouldIgnoreError, rt as isGlob } from "./util-IKfWWLJo.mjs";
5
5
  import fs from "node:fs";
6
6
  import nodePath from "node:path";
7
7
  import { pathToFileURL } from "node:url";
@@ -242,7 +242,17 @@ const CMP_FLAGS = {
242
242
  * e.g. `encapsulation: { type: 'none', patches: ['all'] }`
243
243
  * Equivalent to the global `experimentalSlotFixes` config option.
244
244
  */
245
- patchAll: 32768
245
+ patchAll: 32768,
246
+ /**
247
+ * Determines if `clonable` is enabled for a component that uses the shadow DOM.
248
+ * e.g. `encapsulation: { type: 'shadow', clonable: true }` is set on the `@Component()` decorator
249
+ */
250
+ shadowClonable: 65536,
251
+ /**
252
+ * Determines if `serializable` is enabled for a component that uses the shadow DOM.
253
+ * e.g. `encapsulation: { type: 'shadow', serializable: true }` is set on the `@Component()` decorator
254
+ */
255
+ shadowSerializable: 1 << 17
246
256
  };
247
257
  /**
248
258
  * Namespaces
@@ -682,6 +692,8 @@ function createShadowRoot(cmpMeta) {
682
692
  if (BUILD.shadowSlotAssignmentManual) {
683
693
  if (!!(cmpMeta.$flags$ & CMP_FLAGS.shadowSlotAssignmentManual)) opts.slotAssignment = "manual";
684
694
  }
695
+ if (BUILD.shadowClonable) opts.clonable = !!(cmpMeta.$flags$ & CMP_FLAGS.shadowClonable);
696
+ if (BUILD.shadowSerializable) opts.serializable = !!(cmpMeta.$flags$ & CMP_FLAGS.shadowSerializable);
685
697
  const shadowRoot = this.attachShadow(opts);
686
698
  if (BUILD.shadowModeClosed && isClosed) this.__shadowRoot = shadowRoot;
687
699
  if (globalStyleSheet === void 0) globalStyleSheet = createStyleSheetIfNeededAndSupported(globalStyles) ?? null;
@@ -1809,7 +1821,7 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialR
1809
1821
  if (oldValue) plt.rel(elm, memberName, oldValue, capture);
1810
1822
  if (newValue) plt.ael(elm, memberName, newValue, capture);
1811
1823
  }
1812
- } else if (BUILD.vdomPropOrAttr && memberName[0] === "a" && memberName.startsWith("attr:")) {
1824
+ } else if (BUILD.vdomPropOrAttrPrefix && memberName[0] === "a" && memberName.startsWith("attr:")) {
1813
1825
  const propName = memberName.slice(5);
1814
1826
  let attrName;
1815
1827
  if (BUILD.member) {
@@ -1824,7 +1836,7 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialR
1824
1836
  if (newValue !== false || elm.getAttribute(attrName) === "") elm.removeAttribute(attrName);
1825
1837
  } else elm.setAttribute(attrName, newValue === true ? "" : newValue);
1826
1838
  return;
1827
- } else if (BUILD.vdomPropOrAttr && memberName[0] === "p" && memberName.startsWith("prop:")) {
1839
+ } else if (BUILD.vdomPropOrAttrPrefix && memberName[0] === "p" && memberName.startsWith("prop:")) {
1828
1840
  const propName = memberName.slice(5);
1829
1841
  try {
1830
1842
  elm[propName] = newValue;
@@ -236,7 +236,17 @@ const CMP_FLAGS = {
236
236
  * e.g. `encapsulation: { type: 'none', patches: ['all'] }`
237
237
  * Equivalent to the global `experimentalSlotFixes` config option.
238
238
  */
239
- patchAll: 32768
239
+ patchAll: 32768,
240
+ /**
241
+ * Determines if `clonable` is enabled for a component that uses the shadow DOM.
242
+ * e.g. `encapsulation: { type: 'shadow', clonable: true }` is set on the `@Component()` decorator
243
+ */
244
+ shadowClonable: 65536,
245
+ /**
246
+ * Determines if `serializable` is enabled for a component that uses the shadow DOM.
247
+ * e.g. `encapsulation: { type: 'shadow', serializable: true }` is set on the `@Component()` decorator
248
+ */
249
+ shadowSerializable: 1 << 17
240
250
  };
241
251
  /**
242
252
  * Namespaces
@@ -676,6 +686,8 @@ function createShadowRoot(cmpMeta) {
676
686
  if (BUILD$1.shadowSlotAssignmentManual) {
677
687
  if (!!(cmpMeta.$flags$ & CMP_FLAGS.shadowSlotAssignmentManual)) opts.slotAssignment = "manual";
678
688
  }
689
+ if (BUILD$1.shadowClonable) opts.clonable = !!(cmpMeta.$flags$ & CMP_FLAGS.shadowClonable);
690
+ if (BUILD$1.shadowSerializable) opts.serializable = !!(cmpMeta.$flags$ & CMP_FLAGS.shadowSerializable);
679
691
  const shadowRoot = this.attachShadow(opts);
680
692
  if (BUILD$1.shadowModeClosed && isClosed) this.__shadowRoot = shadowRoot;
681
693
  if (globalStyleSheet === void 0) globalStyleSheet = createStyleSheetIfNeededAndSupported(globalStyles) ?? null;
@@ -1803,7 +1815,7 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialR
1803
1815
  if (oldValue) plt.rel(elm, memberName, oldValue, capture);
1804
1816
  if (newValue) plt.ael(elm, memberName, newValue, capture);
1805
1817
  }
1806
- } else if (BUILD$1.vdomPropOrAttr && memberName[0] === "a" && memberName.startsWith("attr:")) {
1818
+ } else if (BUILD$1.vdomPropOrAttrPrefix && memberName[0] === "a" && memberName.startsWith("attr:")) {
1807
1819
  const propName = memberName.slice(5);
1808
1820
  let attrName;
1809
1821
  if (BUILD$1.member) {
@@ -1818,7 +1830,7 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialR
1818
1830
  if (newValue !== false || elm.getAttribute(attrName) === "") elm.removeAttribute(attrName);
1819
1831
  } else elm.setAttribute(attrName, newValue === true ? "" : newValue);
1820
1832
  return;
1821
- } else if (BUILD$1.vdomPropOrAttr && memberName[0] === "p" && memberName.startsWith("prop:")) {
1833
+ } else if (BUILD$1.vdomPropOrAttrPrefix && memberName[0] === "p" && memberName.startsWith("prop:")) {
1822
1834
  const propName = memberName.slice(5);
1823
1835
  try {
1824
1836
  elm[propName] = newValue;
@@ -1,4 +1,4 @@
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";
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-BsC_D1Ve.js";
2
2
  //#region src/runtime/asset-path.d.ts
3
3
  declare const getAssetPath: (path: string) => string;
4
4
  declare const setAssetPath: (path: string) => string;
@@ -148,7 +148,17 @@ const CMP_FLAGS = {
148
148
  * e.g. `encapsulation: { type: 'none', patches: ['all'] }`
149
149
  * Equivalent to the global `experimentalSlotFixes` config option.
150
150
  */
151
- patchAll: 32768
151
+ patchAll: 32768,
152
+ /**
153
+ * Determines if `clonable` is enabled for a component that uses the shadow DOM.
154
+ * e.g. `encapsulation: { type: 'shadow', clonable: true }` is set on the `@Component()` decorator
155
+ */
156
+ shadowClonable: 65536,
157
+ /**
158
+ * Determines if `serializable` is enabled for a component that uses the shadow DOM.
159
+ * e.g. `encapsulation: { type: 'shadow', serializable: true }` is set on the `@Component()` decorator
160
+ */
161
+ shadowSerializable: 1 << 17
152
162
  };
153
163
  /**
154
164
  * Namespaces
@@ -553,6 +563,8 @@ function createShadowRoot(cmpMeta) {
553
563
  if (BUILD.shadowSlotAssignmentManual) {
554
564
  if (!!(cmpMeta.$flags$ & CMP_FLAGS.shadowSlotAssignmentManual)) opts.slotAssignment = "manual";
555
565
  }
566
+ if (BUILD.shadowClonable) opts.clonable = !!(cmpMeta.$flags$ & CMP_FLAGS.shadowClonable);
567
+ if (BUILD.shadowSerializable) opts.serializable = !!(cmpMeta.$flags$ & CMP_FLAGS.shadowSerializable);
556
568
  const shadowRoot = this.attachShadow(opts);
557
569
  if (BUILD.shadowModeClosed && isClosed) this.__shadowRoot = shadowRoot;
558
570
  if (globalStyleSheet === void 0) globalStyleSheet = createStyleSheetIfNeededAndSupported("") ?? null;
@@ -1675,7 +1687,7 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialR
1675
1687
  if (oldValue) plt.rel(elm, memberName, oldValue, capture);
1676
1688
  if (newValue) plt.ael(elm, memberName, newValue, capture);
1677
1689
  }
1678
- } else if (BUILD.vdomPropOrAttr && memberName[0] === "a" && memberName.startsWith("attr:")) {
1690
+ } else if (BUILD.vdomPropOrAttrPrefix && memberName[0] === "a" && memberName.startsWith("attr:")) {
1679
1691
  const propName = memberName.slice(5);
1680
1692
  let attrName;
1681
1693
  if (BUILD.member) {
@@ -1690,7 +1702,7 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialR
1690
1702
  if (newValue !== false || elm.getAttribute(attrName) === "") elm.removeAttribute(attrName);
1691
1703
  } else elm.setAttribute(attrName, newValue === true ? "" : newValue);
1692
1704
  return;
1693
- } else if (BUILD.vdomPropOrAttr && memberName[0] === "p" && memberName.startsWith("prop:")) {
1705
+ } else if (BUILD.vdomPropOrAttrPrefix && memberName[0] === "p" && memberName.startsWith("prop:")) {
1694
1706
  const propName = memberName.slice(5);
1695
1707
  try {
1696
1708
  elm[propName] = newValue;
@@ -141,7 +141,17 @@ const CMP_FLAGS = {
141
141
  * e.g. `encapsulation: { type: 'none', patches: ['all'] }`
142
142
  * Equivalent to the global `experimentalSlotFixes` config option.
143
143
  */
144
- patchAll: 32768
144
+ patchAll: 32768,
145
+ /**
146
+ * Determines if `clonable` is enabled for a component that uses the shadow DOM.
147
+ * e.g. `encapsulation: { type: 'shadow', clonable: true }` is set on the `@Component()` decorator
148
+ */
149
+ shadowClonable: 65536,
150
+ /**
151
+ * Determines if `serializable` is enabled for a component that uses the shadow DOM.
152
+ * e.g. `encapsulation: { type: 'shadow', serializable: true }` is set on the `@Component()` decorator
153
+ */
154
+ shadowSerializable: 1 << 17
145
155
  };
146
156
  /**
147
157
  * Namespaces
@@ -330,6 +340,8 @@ function createShadowRoot(cmpMeta) {
330
340
  if (BUILD$1.shadowSlotAssignmentManual) {
331
341
  if (!!(cmpMeta.$flags$ & CMP_FLAGS.shadowSlotAssignmentManual)) opts.slotAssignment = "manual";
332
342
  }
343
+ if (BUILD$1.shadowClonable) opts.clonable = !!(cmpMeta.$flags$ & CMP_FLAGS.shadowClonable);
344
+ if (BUILD$1.shadowSerializable) opts.serializable = !!(cmpMeta.$flags$ & CMP_FLAGS.shadowSerializable);
333
345
  const shadowRoot = this.attachShadow(opts);
334
346
  if (BUILD$1.shadowModeClosed && isClosed) this.__shadowRoot = shadowRoot;
335
347
  if (globalStyleSheet === void 0) globalStyleSheet = null;
@@ -1423,7 +1435,7 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialR
1423
1435
  if (oldValue) plt.rel(elm, memberName, oldValue, capture);
1424
1436
  if (newValue) plt.ael(elm, memberName, newValue, capture);
1425
1437
  }
1426
- } else if (BUILD$1.vdomPropOrAttr && memberName[0] === "a" && memberName.startsWith("attr:")) {
1438
+ } else if (BUILD$1.vdomPropOrAttrPrefix && memberName[0] === "a" && memberName.startsWith("attr:")) {
1427
1439
  const propName = memberName.slice(5);
1428
1440
  let attrName;
1429
1441
  if (BUILD$1.member) {
@@ -1438,7 +1450,7 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialR
1438
1450
  if (newValue !== false || elm.getAttribute(attrName) === "") elm.removeAttribute(attrName);
1439
1451
  } else elm.setAttribute(attrName, newValue === true ? "" : newValue);
1440
1452
  return;
1441
- } else if (BUILD$1.vdomPropOrAttr && memberName[0] === "p" && memberName.startsWith("prop:")) {
1453
+ } else if (BUILD$1.vdomPropOrAttrPrefix && memberName[0] === "p" && memberName.startsWith("prop:")) {
1442
1454
  const propName = memberName.slice(5);
1443
1455
  try {
1444
1456
  elm[propName] = newValue;
@@ -7639,6 +7639,14 @@ function* streamToHtml(node, opts, output) {
7639
7639
  yield " shadowrootdelegatesfocus";
7640
7640
  output.currentLineWidth += 25;
7641
7641
  }
7642
+ if (node.clonable) {
7643
+ yield " shadowrootclonable";
7644
+ output.currentLineWidth += 19;
7645
+ }
7646
+ if (node.serializable) {
7647
+ yield " shadowrootserializable";
7648
+ output.currentLineWidth += 23;
7649
+ }
7642
7650
  }
7643
7651
  const attrsLength = node.attributes.length;
7644
7652
  const attributes = opts.prettyHtml && attrsLength > 1 ? cloneAttributes(node.attributes, true) : node.attributes;
@@ -8262,6 +8270,8 @@ var MockElement = class extends MockNode {
8262
8270
  const shadowRoot = this.ownerDocument.createDocumentFragment();
8263
8271
  shadowRoot.mode = _opts.mode ?? "open";
8264
8272
  shadowRoot.delegatesFocus = _opts.delegatesFocus ?? false;
8273
+ shadowRoot.clonable = _opts.clonable ?? false;
8274
+ shadowRoot.serializable = _opts.serializable ?? false;
8265
8275
  this.shadowRoot = shadowRoot;
8266
8276
  return shadowRoot;
8267
8277
  }
@@ -11306,11 +11316,16 @@ var MockResizeObserver = class {
11306
11316
  var MockShadowRoot = class extends MockDocumentFragment {
11307
11317
  _mode = "open";
11308
11318
  _delegatesFocus = false;
11319
+ _clonable = false;
11320
+ _serializable = false;
11309
11321
  get activeElement() {
11310
11322
  return null;
11311
11323
  }
11312
- get cloneable() {
11313
- return false;
11324
+ get clonable() {
11325
+ return this._clonable;
11326
+ }
11327
+ set clonable(value) {
11328
+ this._clonable = value;
11314
11329
  }
11315
11330
  get delegatesFocus() {
11316
11331
  return this._delegatesFocus;
@@ -11342,7 +11357,10 @@ var MockShadowRoot = class extends MockDocumentFragment {
11342
11357
  return null;
11343
11358
  }
11344
11359
  get serializable() {
11345
- return false;
11360
+ return this._serializable;
11361
+ }
11362
+ set serializable(value) {
11363
+ this._serializable = value;
11346
11364
  }
11347
11365
  get slotAssignment() {
11348
11366
  return "named";
@@ -57,6 +57,7 @@ const BUILD = {
57
57
  vdomListener: true,
58
58
  vdomRef: true,
59
59
  vdomPropOrAttr: true,
60
+ vdomPropOrAttrPrefix: true,
60
61
  vdomRender: true,
61
62
  vdomStyle: true,
62
63
  vdomText: true,
@@ -95,6 +96,8 @@ const BUILD = {
95
96
  devTools: false,
96
97
  shadowDelegatesFocus: true,
97
98
  shadowSlotAssignmentManual: false,
99
+ shadowClonable: true,
100
+ shadowSerializable: true,
98
101
  initializeNextTick: false,
99
102
  asyncLoading: true,
100
103
  asyncQueue: false
@@ -1,4 +1,4 @@
1
- import { ni as Logger, yr as CompilerSystem } from "../../index-BHj3EBl2.mjs";
1
+ import { ni as Logger, yr as CompilerSystem } from "../../index-BcfVWmNG.mjs";
2
2
  //#region src/sys/node/logger/index.d.ts
3
3
  /**
4
4
  * Create a logger to run in a Node environment
@@ -1,2 +1,2 @@
1
- import { n as setupNodeProcess, r as createNodeLogger, t as createNodeSys } from "../../node-DRT35FuO.mjs";
1
+ import { n as setupNodeProcess, r as createNodeLogger, t as createNodeSys } from "../../node-DQBayfoI.mjs";
2
2
  export { createNodeLogger, createNodeSys, setupNodeProcess };
@@ -1,5 +1,5 @@
1
- import { l as createWorkerMessageHandler } from "../../compiler-D2MlfN4O.mjs";
2
- import { t as createNodeSys } from "../../node-DRT35FuO.mjs";
1
+ import { l as createWorkerMessageHandler } from "../../compiler-DkOB0Joz.mjs";
2
+ import { t as createNodeSys } from "../../node-DQBayfoI.mjs";
3
3
  //#region src/sys/node/node-worker-thread.ts
4
4
  /**
5
5
  * Initialize a worker thread, setting up various machinery for managing