@stencil/core 4.19.2-dev.1720817033.ad4ba40 → 4.19.2-dev.1721019702.82a7bb9

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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Stencil Client Platform v4.19.2-dev.1720817033.ad4ba40 | MIT Licensed | https://stenciljs.com
2
+ Stencil Client Platform v4.19.2-dev.1721019702.82a7bb9 | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
  var __defProp = Object.defineProperty;
5
5
  var __export = (target, all) => {
@@ -848,21 +848,10 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
848
848
  if (nonce != null) {
849
849
  styleElm.setAttribute("nonce", nonce);
850
850
  }
851
- if ((BUILD13.hydrateServerSide || BUILD13.hotModuleReplacement) && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
851
+ if (BUILD13.hydrateServerSide || BUILD13.hotModuleReplacement) {
852
852
  styleElm.setAttribute(HYDRATED_STYLE_ID, scopeId2);
853
853
  }
854
- const injectStyle = (
855
- /**
856
- * we render a scoped component
857
- */
858
- !(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) || /**
859
- * we are using shadow dom and render the style tag within the shadowRoot
860
- */
861
- cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */ && styleContainerNode.nodeName !== "HEAD"
862
- );
863
- if (injectStyle) {
864
- styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector("link"));
865
- }
854
+ styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector("link"));
866
855
  }
867
856
  if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
868
857
  styleElm.innerHTML += SLOT_FB_CSS;
@@ -887,7 +876,7 @@ var attachStyles = (hostRef) => {
887
876
  cmpMeta,
888
877
  hostRef.$modeName$
889
878
  );
890
- if ((BUILD13.shadowDom || BUILD13.scoped) && BUILD13.cssAnnotations && flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */) {
879
+ if ((BUILD13.shadowDom || BUILD13.scoped) && BUILD13.cssAnnotations && flags & 10 /* needsScopedEncapsulation */) {
891
880
  elm["s-sc"] = scopeId2;
892
881
  elm.classList.add(scopeId2 + "-h");
893
882
  if (BUILD13.scoped && flags & 2 /* scopedCssEncapsulation */) {
@@ -897,6 +886,7 @@ var attachStyles = (hostRef) => {
897
886
  endAttachStyles();
898
887
  };
899
888
  var getScopeId = (cmp, mode) => "sc-" + (BUILD13.mode && mode && cmp.$flags$ & 32 /* hasMode */ ? cmp.$tagName$ + "-" + mode : cmp.$tagName$);
889
+ var convertScopedToShadow = (css) => css.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g, "$1{");
900
890
 
901
891
  // src/runtime/vdom/vdom-render.ts
902
892
  import { BUILD as BUILD16 } from "@stencil/core/internal/app-data";
@@ -1092,9 +1082,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
1092
1082
  if (BUILD16.vdomAttribute) {
1093
1083
  updateElement(null, newVNode2, isSvgMode);
1094
1084
  }
1095
- const rootNode = elm.getRootNode();
1096
- const isElementWithinShadowRoot = !rootNode.querySelector("body");
1097
- if (!isElementWithinShadowRoot && BUILD16.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
1085
+ if ((BUILD16.shadowDom || BUILD16.scoped) && isDef(scopeId) && elm["s-si"] !== scopeId) {
1098
1086
  elm.classList.add(elm["s-si"] = scopeId);
1099
1087
  }
1100
1088
  if (BUILD16.scoped) {
@@ -2157,7 +2145,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
2157
2145
  const endRegisterStyles = createTime("registerStyles", cmpMeta.$tagName$);
2158
2146
  if (!BUILD20.hydrateServerSide && BUILD20.shadowDom && // TODO(STENCIL-854): Remove code related to legacy shadowDomShim field
2159
2147
  BUILD20.shadowDomShim && cmpMeta.$flags$ & 8 /* needsShadowDomShim */) {
2160
- style = await import("./shadow-css.js").then((m) => m.scopeCss(style, scopeId2));
2148
+ style = await import("./shadow-css.js").then((m) => m.scopeCss(style, scopeId2, false));
2161
2149
  }
2162
2150
  registerStyle(scopeId2, style, !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */));
2163
2151
  endRegisterStyles();
@@ -2726,8 +2714,10 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
2726
2714
  const metaCharset = /* @__PURE__ */ head.querySelector("meta[charset]");
2727
2715
  const dataStyles = /* @__PURE__ */ doc.createElement("style");
2728
2716
  const deferredConnectedCallbacks = [];
2717
+ const styles2 = /* @__PURE__ */ doc.querySelectorAll(`[${HYDRATED_STYLE_ID}]`);
2729
2718
  let appLoadFallback;
2730
2719
  let isBootstrapping = true;
2720
+ let i2 = 0;
2731
2721
  Object.assign(plt, options);
2732
2722
  plt.$resourcesUrl$ = new URL(options.resourcesUrl || "./", doc.baseURI).href;
2733
2723
  if (BUILD25.asyncQueue) {
@@ -2738,6 +2728,11 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
2738
2728
  if (BUILD25.hydrateClientSide) {
2739
2729
  plt.$flags$ |= 2 /* appLoaded */;
2740
2730
  }
2731
+ if (BUILD25.hydrateClientSide && BUILD25.shadowDom) {
2732
+ for (; i2 < styles2.length; i2++) {
2733
+ registerStyle(styles2[i2].getAttribute(HYDRATED_STYLE_ID), convertScopedToShadow(styles2[i2].innerHTML), true);
2734
+ }
2735
+ }
2741
2736
  let hasSlotRelocation = false;
2742
2737
  lazyBundles.map((lazyBundle) => {
2743
2738
  lazyBundle[1].map((compactMeta) => {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/core/internal/client",
3
- "version": "4.19.2-dev.1720817033.ad4ba40",
3
+ "version": "4.19.2-dev.1721019702.82a7bb9",
4
4
  "description": "Stencil internal client platform to be imported by the Stencil Compiler and internal runtime. Breaking changes can and will happen at any time.",
5
5
  "main": "./index.js",
6
6
  "exports": "./index.js",
@@ -1,5 +1,5 @@
1
1
  /*
2
- Stencil Client Patch Browser v4.19.2-dev.1720817033.ad4ba40 | MIT Licensed | https://stenciljs.com
2
+ Stencil Client Patch Browser v4.19.2-dev.1721019702.82a7bb9 | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
 
5
5
  // src/client/client-patch-browser.ts
@@ -274,14 +274,14 @@ var scopeSelector = (selector, scopeSelectorText, hostSelector, slotSelector) =>
274
274
  }
275
275
  }).join(", ");
276
276
  };
277
- var scopeSelectors = (cssText, scopeSelectorText, hostSelector, slotSelector) => {
277
+ var scopeSelectors = (cssText, scopeSelectorText, hostSelector, slotSelector, commentOriginalSelector) => {
278
278
  return processRules(cssText, (rule) => {
279
279
  let selector = rule.selector;
280
280
  let content = rule.content;
281
281
  if (rule.selector[0] !== "@") {
282
282
  selector = scopeSelector(rule.selector, scopeSelectorText, hostSelector, slotSelector);
283
283
  } else if (rule.selector.startsWith("@media") || rule.selector.startsWith("@supports") || rule.selector.startsWith("@page") || rule.selector.startsWith("@document")) {
284
- content = scopeSelectors(rule.content, scopeSelectorText, hostSelector, slotSelector);
284
+ content = scopeSelectors(rule.content, scopeSelectorText, hostSelector, slotSelector, commentOriginalSelector);
285
285
  }
286
286
  const cssRule = {
287
287
  selector: selector.replace(/\s{2,}/g, " ").trim(),
@@ -290,7 +290,7 @@ var scopeSelectors = (cssText, scopeSelectorText, hostSelector, slotSelector) =>
290
290
  return cssRule;
291
291
  });
292
292
  };
293
- var scopeCssText = (cssText, scopeId, hostScopeId, slotScopeId) => {
293
+ var scopeCssText = (cssText, scopeId, hostScopeId, slotScopeId, commentOriginalSelector) => {
294
294
  cssText = insertPolyfillHostInCssText(cssText);
295
295
  cssText = convertColonHost(cssText);
296
296
  cssText = convertColonHostContext(cssText);
@@ -298,7 +298,7 @@ var scopeCssText = (cssText, scopeId, hostScopeId, slotScopeId) => {
298
298
  cssText = slotted.cssText;
299
299
  cssText = convertShadowDOMSelectors(cssText);
300
300
  if (scopeId) {
301
- cssText = scopeSelectors(cssText, scopeId, hostScopeId, slotScopeId);
301
+ cssText = scopeSelectors(cssText, scopeId, hostScopeId, slotScopeId, commentOriginalSelector);
302
302
  }
303
303
  cssText = replaceShadowCssHost(cssText, hostScopeId);
304
304
  cssText = cssText.replace(/>\s*\*\s+([^{, ]+)/gm, " $1 ");
@@ -315,13 +315,37 @@ var scopeCssText = (cssText, scopeId, hostScopeId, slotScopeId) => {
315
315
  var replaceShadowCssHost = (cssText, hostScopeId) => {
316
316
  return cssText.replace(/-shadowcsshost-no-combinator/g, `.${hostScopeId}`);
317
317
  };
318
- var scopeCss = (cssText, scopeId) => {
318
+ var scopeCss = (cssText, scopeId, commentOriginalSelector) => {
319
319
  const hostScopeId = scopeId + "-h";
320
320
  const slotScopeId = scopeId + "-s";
321
321
  const commentsWithHash = extractCommentsWithHash(cssText);
322
322
  cssText = stripComments(cssText);
323
- const scoped = scopeCssText(cssText, scopeId, hostScopeId, slotScopeId);
323
+ const orgSelectors = [];
324
+ if (commentOriginalSelector) {
325
+ const processCommentedSelector = (rule) => {
326
+ const placeholder = `/*!@___${orgSelectors.length}___*/`;
327
+ const comment = `/*!@${rule.selector}*/`;
328
+ orgSelectors.push({ placeholder, comment });
329
+ rule.selector = placeholder + rule.selector;
330
+ return rule;
331
+ };
332
+ cssText = processRules(cssText, (rule) => {
333
+ if (rule.selector[0] !== "@") {
334
+ return processCommentedSelector(rule);
335
+ } else if (rule.selector.startsWith("@media") || rule.selector.startsWith("@supports") || rule.selector.startsWith("@page") || rule.selector.startsWith("@document")) {
336
+ rule.content = processRules(rule.content, processCommentedSelector);
337
+ return rule;
338
+ }
339
+ return rule;
340
+ });
341
+ }
342
+ const scoped = scopeCssText(cssText, scopeId, hostScopeId, slotScopeId, commentOriginalSelector);
324
343
  cssText = [scoped.cssText, ...commentsWithHash].join("\n");
344
+ if (commentOriginalSelector) {
345
+ orgSelectors.forEach(({ placeholder, comment }) => {
346
+ cssText = cssText.replace(placeholder, comment);
347
+ });
348
+ }
325
349
  scoped.slottedSelectors.forEach((slottedSelector) => {
326
350
  const regex = new RegExp(escapeRegExpSpecialCharacters(slottedSelector.orgSelector), "g");
327
351
  cssText = cssText.replace(regex, slottedSelector.updatedSelector);
@@ -1,5 +1,5 @@
1
1
  /*
2
- Stencil Hydrate Platform v4.19.2-dev.1720817033.ad4ba40 | MIT Licensed | https://stenciljs.com
2
+ Stencil Hydrate Platform v4.19.2-dev.1721019702.82a7bb9 | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
  var __defProp = Object.defineProperty;
5
5
  var __export = (target, all) => {
@@ -639,21 +639,10 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
639
639
  if (nonce != null) {
640
640
  styleElm.setAttribute("nonce", nonce);
641
641
  }
642
- if ((BUILD7.hydrateServerSide || BUILD7.hotModuleReplacement) && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
642
+ if (BUILD7.hydrateServerSide || BUILD7.hotModuleReplacement) {
643
643
  styleElm.setAttribute(HYDRATED_STYLE_ID, scopeId2);
644
644
  }
645
- const injectStyle = (
646
- /**
647
- * we render a scoped component
648
- */
649
- !(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) || /**
650
- * we are using shadow dom and render the style tag within the shadowRoot
651
- */
652
- cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */ && styleContainerNode.nodeName !== "HEAD"
653
- );
654
- if (injectStyle) {
655
- styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector("link"));
656
- }
645
+ styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector("link"));
657
646
  }
658
647
  if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
659
648
  styleElm.innerHTML += SLOT_FB_CSS;
@@ -678,7 +667,7 @@ var attachStyles = (hostRef) => {
678
667
  cmpMeta,
679
668
  hostRef.$modeName$
680
669
  );
681
- if ((BUILD7.shadowDom || BUILD7.scoped) && BUILD7.cssAnnotations && flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */) {
670
+ if ((BUILD7.shadowDom || BUILD7.scoped) && BUILD7.cssAnnotations && flags & 10 /* needsScopedEncapsulation */) {
682
671
  elm["s-sc"] = scopeId2;
683
672
  elm.classList.add(scopeId2 + "-h");
684
673
  if (BUILD7.scoped && flags & 2 /* scopedCssEncapsulation */) {
@@ -688,6 +677,7 @@ var attachStyles = (hostRef) => {
688
677
  endAttachStyles();
689
678
  };
690
679
  var getScopeId = (cmp, mode) => "sc-" + (BUILD7.mode && mode && cmp.$flags$ & 32 /* hasMode */ ? cmp.$tagName$ + "-" + mode : cmp.$tagName$);
680
+ var convertScopedToShadow = (css) => css.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g, "$1{");
691
681
 
692
682
  // src/runtime/vdom/vdom-render.ts
693
683
  import { BUILD as BUILD10 } from "@stencil/core/internal/app-data";
@@ -883,9 +873,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
883
873
  if (BUILD10.vdomAttribute) {
884
874
  updateElement(null, newVNode2, isSvgMode);
885
875
  }
886
- const rootNode = elm.getRootNode();
887
- const isElementWithinShadowRoot = !rootNode.querySelector("body");
888
- if (!isElementWithinShadowRoot && BUILD10.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
876
+ if ((BUILD10.shadowDom || BUILD10.scoped) && isDef(scopeId) && elm["s-si"] !== scopeId) {
889
877
  elm.classList.add(elm["s-si"] = scopeId);
890
878
  }
891
879
  if (BUILD10.scoped) {
@@ -1948,7 +1936,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1948
1936
  const endRegisterStyles = createTime("registerStyles", cmpMeta.$tagName$);
1949
1937
  if (!BUILD14.hydrateServerSide && BUILD14.shadowDom && // TODO(STENCIL-854): Remove code related to legacy shadowDomShim field
1950
1938
  BUILD14.shadowDomShim && cmpMeta.$flags$ & 8 /* needsShadowDomShim */) {
1951
- style = await import("../client/shadow-css.js").then((m) => m.scopeCss(style, scopeId2));
1939
+ style = await import("../client/shadow-css.js").then((m) => m.scopeCss(style, scopeId2, false));
1952
1940
  }
1953
1941
  registerStyle(scopeId2, style, !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */));
1954
1942
  endRegisterStyles();
@@ -2517,8 +2505,10 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
2517
2505
  const metaCharset = /* @__PURE__ */ head.querySelector("meta[charset]");
2518
2506
  const dataStyles = /* @__PURE__ */ doc.createElement("style");
2519
2507
  const deferredConnectedCallbacks = [];
2508
+ const styles2 = /* @__PURE__ */ doc.querySelectorAll(`[${HYDRATED_STYLE_ID}]`);
2520
2509
  let appLoadFallback;
2521
2510
  let isBootstrapping = true;
2511
+ let i2 = 0;
2522
2512
  Object.assign(plt, options);
2523
2513
  plt.$resourcesUrl$ = new URL(options.resourcesUrl || "./", doc.baseURI).href;
2524
2514
  if (BUILD19.asyncQueue) {
@@ -2529,6 +2519,11 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
2529
2519
  if (BUILD19.hydrateClientSide) {
2530
2520
  plt.$flags$ |= 2 /* appLoaded */;
2531
2521
  }
2522
+ if (BUILD19.hydrateClientSide && BUILD19.shadowDom) {
2523
+ for (; i2 < styles2.length; i2++) {
2524
+ registerStyle(styles2[i2].getAttribute(HYDRATED_STYLE_ID), convertScopedToShadow(styles2[i2].innerHTML), true);
2525
+ }
2526
+ }
2532
2527
  let hasSlotRelocation = false;
2533
2528
  lazyBundles.map((lazyBundle) => {
2534
2529
  lazyBundle[1].map((compactMeta) => {
@@ -2895,7 +2890,7 @@ var globalScripts = (
2895
2890
 
2896
2891
  // src/hydrate/platform/proxy-host-element.ts
2897
2892
  import { BUILD as BUILD21 } from "@stencil/core/internal/app-data";
2898
- function proxyHostElement(elm, cmpMeta) {
2893
+ function proxyHostElement(elm, cmpMeta, opts) {
2899
2894
  if (typeof elm.componentOnReady !== "function") {
2900
2895
  elm.componentOnReady = componentOnReady;
2901
2896
  }
@@ -2908,8 +2903,10 @@ function proxyHostElement(elm, cmpMeta) {
2908
2903
  mode: "open",
2909
2904
  delegatesFocus: !!(cmpMeta.$flags$ & 16 /* shadowDelegatesFocus */)
2910
2905
  });
2911
- } else {
2906
+ } else if (opts.serializeShadowRoot) {
2912
2907
  elm.attachShadow({ mode: "open" });
2908
+ } else {
2909
+ elm.shadowRoot = elm;
2913
2910
  }
2914
2911
  }
2915
2912
  if (cmpMeta.$members$ != null) {
@@ -3022,7 +3019,7 @@ function hydrateApp(win2, opts, results, afterHydrate, resolve) {
3022
3019
  createdElements.add(elm);
3023
3020
  elm.connectedCallback = patchedConnectedCallback2;
3024
3021
  registerHost(elm, Cstr.cmpMeta);
3025
- proxyHostElement(elm, Cstr.cmpMeta);
3022
+ proxyHostElement(elm, Cstr.cmpMeta, opts);
3026
3023
  }
3027
3024
  }
3028
3025
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/core/internal/hydrate",
3
- "version": "4.19.2-dev.1720817033.ad4ba40",
3
+ "version": "4.19.2-dev.1721019702.82a7bb9",
4
4
  "description": "Stencil internal hydrate platform to be imported by the Stencil Compiler. Breaking changes can and will happen at any time.",
5
5
  "main": "./index.js",
6
6
  "private": true
@@ -1,5 +1,5 @@
1
1
  /*
2
- Stencil Hydrate Runner v4.19.2-dev.1720817033.ad4ba40 | MIT Licensed | https://stenciljs.com
2
+ Stencil Hydrate Runner v4.19.2-dev.1721019702.82a7bb9 | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
  var __defProp = Object.defineProperty;
5
5
  var __export = (target, all) => {
@@ -10414,7 +10414,7 @@ function normalizeSerializationOptions(opts = {}) {
10414
10414
  removeAttributeQuotes: typeof opts.removeAttributeQuotes !== "boolean" ? false : opts.removeAttributeQuotes,
10415
10415
  removeBooleanAttributeQuotes: typeof opts.removeBooleanAttributeQuotes !== "boolean" ? false : opts.removeBooleanAttributeQuotes,
10416
10416
  removeHtmlComments: typeof opts.removeHtmlComments !== "boolean" ? false : opts.removeHtmlComments,
10417
- serializeShadowRoot: typeof opts.serializeShadowRoot !== "boolean" ? true : opts.serializeShadowRoot,
10417
+ serializeShadowRoot: typeof opts.serializeShadowRoot !== "boolean" ? false : opts.serializeShadowRoot,
10418
10418
  fullDocument: typeof opts.fullDocument !== "boolean" ? true : opts.fullDocument
10419
10419
  };
10420
10420
  }
@@ -10540,7 +10540,7 @@ style="${cssText}">`;
10540
10540
  }
10541
10541
  if (EMPTY_ELEMENTS.has(tagName) === false) {
10542
10542
  const shadowRoot = node.shadowRoot;
10543
- if (shadowRoot != null && opts.serializeShadowRoot) {
10543
+ if (opts.serializeShadowRoot && shadowRoot != null) {
10544
10544
  output.indent = output.indent + ((_c = opts.indentSpaces) != null ? _c : 0);
10545
10545
  yield* streamToHtml(shadowRoot, opts, output);
10546
10546
  output.indent = output.indent - ((_d = opts.indentSpaces) != null ? _d : 0);
@@ -14884,10 +14884,7 @@ var removeUnusedStyleText = (usedSelectors, diagnostics, styleElm) => {
14884
14884
 
14885
14885
  // src/hydrate/runner/inspect-element.ts
14886
14886
  function inspectElement(results, elm, depth) {
14887
- const children = [
14888
- ...Array.from(elm.children),
14889
- ...Array.from(elm.shadowRoot ? elm.shadowRoot.children : [])
14890
- ];
14887
+ const children = elm.children;
14891
14888
  for (let i = 0, ii = children.length; i < ii; i++) {
14892
14889
  const childElm = children[i];
14893
14890
  const tagName = childElm.nodeName.toLowerCase();
@@ -15282,7 +15279,7 @@ function renderToString(html, options, asStream) {
15282
15279
  const opts = normalizeHydrateOptions(options);
15283
15280
  opts.serializeToHtml = true;
15284
15281
  opts.fullDocument = typeof opts.fullDocument === "boolean" ? opts.fullDocument : true;
15285
- opts.serializeShadowRoot = typeof opts.serializeShadowRoot === "boolean" ? opts.serializeShadowRoot : true;
15282
+ opts.serializeShadowRoot = Boolean(opts.serializeShadowRoot);
15286
15283
  opts.constrainTimeouts = false;
15287
15284
  return hydrateDocument(html, opts, asStream);
15288
15285
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/core/internal",
3
- "version": "4.19.2-dev.1720817033.ad4ba40",
3
+ "version": "4.19.2-dev.1721019702.82a7bb9",
4
4
  "description": "Stencil internals only to be imported by the Stencil Compiler. Breaking changes can and will happen at any time.",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",
@@ -1690,6 +1690,7 @@ export interface TransformCssToEsmInput {
1690
1690
  * is not shared by multiple fields, nor is it a composite of multiple modes).
1691
1691
  */
1692
1692
  mode?: string;
1693
+ commentOriginalSelector?: boolean;
1693
1694
  sourceMap?: boolean;
1694
1695
  minify?: boolean;
1695
1696
  docs?: boolean;
@@ -1011,21 +1011,10 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
1011
1011
  if (nonce != null) {
1012
1012
  styleElm.setAttribute("nonce", nonce);
1013
1013
  }
1014
- if ((import_app_data7.BUILD.hydrateServerSide || import_app_data7.BUILD.hotModuleReplacement) && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
1014
+ if (import_app_data7.BUILD.hydrateServerSide || import_app_data7.BUILD.hotModuleReplacement) {
1015
1015
  styleElm.setAttribute(HYDRATED_STYLE_ID, scopeId2);
1016
1016
  }
1017
- const injectStyle = (
1018
- /**
1019
- * we render a scoped component
1020
- */
1021
- !(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) || /**
1022
- * we are using shadow dom and render the style tag within the shadowRoot
1023
- */
1024
- cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */ && styleContainerNode.nodeName !== "HEAD"
1025
- );
1026
- if (injectStyle) {
1027
- styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector("link"));
1028
- }
1017
+ styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector("link"));
1029
1018
  }
1030
1019
  if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
1031
1020
  styleElm.innerHTML += SLOT_FB_CSS;
@@ -1050,7 +1039,7 @@ var attachStyles = (hostRef) => {
1050
1039
  cmpMeta,
1051
1040
  hostRef.$modeName$
1052
1041
  );
1053
- if ((import_app_data7.BUILD.shadowDom || import_app_data7.BUILD.scoped) && import_app_data7.BUILD.cssAnnotations && flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */) {
1042
+ if ((import_app_data7.BUILD.shadowDom || import_app_data7.BUILD.scoped) && import_app_data7.BUILD.cssAnnotations && flags & 10 /* needsScopedEncapsulation */) {
1054
1043
  elm["s-sc"] = scopeId2;
1055
1044
  elm.classList.add(scopeId2 + "-h");
1056
1045
  if (import_app_data7.BUILD.scoped && flags & 2 /* scopedCssEncapsulation */) {
@@ -1060,6 +1049,7 @@ var attachStyles = (hostRef) => {
1060
1049
  endAttachStyles();
1061
1050
  };
1062
1051
  var getScopeId = (cmp, mode) => "sc-" + (import_app_data7.BUILD.mode && mode && cmp.$flags$ & 32 /* hasMode */ ? cmp.$tagName$ + "-" + mode : cmp.$tagName$);
1052
+ var convertScopedToShadow = (css) => css.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g, "$1{");
1063
1053
 
1064
1054
  // src/runtime/vdom/vdom-render.ts
1065
1055
  var import_app_data10 = require("@stencil/core/internal/app-data");
@@ -1255,9 +1245,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
1255
1245
  if (import_app_data10.BUILD.vdomAttribute) {
1256
1246
  updateElement(null, newVNode2, isSvgMode);
1257
1247
  }
1258
- const rootNode = elm.getRootNode();
1259
- const isElementWithinShadowRoot = !rootNode.querySelector("body");
1260
- if (!isElementWithinShadowRoot && import_app_data10.BUILD.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
1248
+ if ((import_app_data10.BUILD.shadowDom || import_app_data10.BUILD.scoped) && isDef(scopeId) && elm["s-si"] !== scopeId) {
1261
1249
  elm.classList.add(elm["s-si"] = scopeId);
1262
1250
  }
1263
1251
  if (import_app_data10.BUILD.scoped) {
@@ -2320,7 +2308,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
2320
2308
  const endRegisterStyles = createTime("registerStyles", cmpMeta.$tagName$);
2321
2309
  if (!import_app_data14.BUILD.hydrateServerSide && import_app_data14.BUILD.shadowDom && // TODO(STENCIL-854): Remove code related to legacy shadowDomShim field
2322
2310
  import_app_data14.BUILD.shadowDomShim && cmpMeta.$flags$ & 8 /* needsShadowDomShim */) {
2323
- style = await import("../client/shadow-css.js").then((m) => m.scopeCss(style, scopeId2));
2311
+ style = await import("../client/shadow-css.js").then((m) => m.scopeCss(style, scopeId2, false));
2324
2312
  }
2325
2313
  registerStyle(scopeId2, style, !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */));
2326
2314
  endRegisterStyles();
@@ -2889,8 +2877,10 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
2889
2877
  const metaCharset = /* @__PURE__ */ head.querySelector("meta[charset]");
2890
2878
  const dataStyles = /* @__PURE__ */ doc.createElement("style");
2891
2879
  const deferredConnectedCallbacks = [];
2880
+ const styles2 = /* @__PURE__ */ doc.querySelectorAll(`[${HYDRATED_STYLE_ID}]`);
2892
2881
  let appLoadFallback;
2893
2882
  let isBootstrapping = true;
2883
+ let i2 = 0;
2894
2884
  Object.assign(plt, options);
2895
2885
  plt.$resourcesUrl$ = new URL(options.resourcesUrl || "./", doc.baseURI).href;
2896
2886
  if (import_app_data19.BUILD.asyncQueue) {
@@ -2901,6 +2891,11 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
2901
2891
  if (import_app_data19.BUILD.hydrateClientSide) {
2902
2892
  plt.$flags$ |= 2 /* appLoaded */;
2903
2893
  }
2894
+ if (import_app_data19.BUILD.hydrateClientSide && import_app_data19.BUILD.shadowDom) {
2895
+ for (; i2 < styles2.length; i2++) {
2896
+ registerStyle(styles2[i2].getAttribute(HYDRATED_STYLE_ID), convertScopedToShadow(styles2[i2].innerHTML), true);
2897
+ }
2898
+ }
2904
2899
  let hasSlotRelocation = false;
2905
2900
  lazyBundles.map((lazyBundle) => {
2906
2901
  lazyBundle[1].map((compactMeta) => {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/core/internal/testing",
3
- "version": "4.19.2-dev.1720817033.ad4ba40",
3
+ "version": "4.19.2-dev.1721019702.82a7bb9",
4
4
  "description": "Stencil internal testing platform to be imported by the Stencil Compiler. Breaking changes can and will happen at any time.",
5
5
  "main": "./index.js",
6
6
  "private": true
@@ -1,5 +1,5 @@
1
1
  /*!
2
- Stencil Mock Doc (CommonJS) v4.19.2-dev.1720817033.ad4ba40 | MIT Licensed | https://stenciljs.com
2
+ Stencil Mock Doc (CommonJS) v4.19.2-dev.1721019702.82a7bb9 | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
  "use strict";
5
5
  var __defProp = Object.defineProperty;
@@ -6287,7 +6287,7 @@ function normalizeSerializationOptions(opts = {}) {
6287
6287
  removeAttributeQuotes: typeof opts.removeAttributeQuotes !== "boolean" ? false : opts.removeAttributeQuotes,
6288
6288
  removeBooleanAttributeQuotes: typeof opts.removeBooleanAttributeQuotes !== "boolean" ? false : opts.removeBooleanAttributeQuotes,
6289
6289
  removeHtmlComments: typeof opts.removeHtmlComments !== "boolean" ? false : opts.removeHtmlComments,
6290
- serializeShadowRoot: typeof opts.serializeShadowRoot !== "boolean" ? true : opts.serializeShadowRoot,
6290
+ serializeShadowRoot: typeof opts.serializeShadowRoot !== "boolean" ? false : opts.serializeShadowRoot,
6291
6291
  fullDocument: typeof opts.fullDocument !== "boolean" ? true : opts.fullDocument
6292
6292
  };
6293
6293
  }
@@ -6413,7 +6413,7 @@ style="${cssText}">`;
6413
6413
  }
6414
6414
  if (EMPTY_ELEMENTS.has(tagName) === false) {
6415
6415
  const shadowRoot = node.shadowRoot;
6416
- if (shadowRoot != null && opts.serializeShadowRoot) {
6416
+ if (opts.serializeShadowRoot && shadowRoot != null) {
6417
6417
  output.indent = output.indent + ((_c = opts.indentSpaces) != null ? _c : 0);
6418
6418
  yield* streamToHtml(shadowRoot, opts, output);
6419
6419
  output.indent = output.indent - ((_d = opts.indentSpaces) != null ? _d : 0);
package/mock-doc/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- Stencil Mock Doc v4.19.2-dev.1720817033.ad4ba40 | MIT Licensed | https://stenciljs.com
2
+ Stencil Mock Doc v4.19.2-dev.1721019702.82a7bb9 | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
 
5
5
  // src/runtime/runtime-constants.ts
@@ -6234,7 +6234,7 @@ function normalizeSerializationOptions(opts = {}) {
6234
6234
  removeAttributeQuotes: typeof opts.removeAttributeQuotes !== "boolean" ? false : opts.removeAttributeQuotes,
6235
6235
  removeBooleanAttributeQuotes: typeof opts.removeBooleanAttributeQuotes !== "boolean" ? false : opts.removeBooleanAttributeQuotes,
6236
6236
  removeHtmlComments: typeof opts.removeHtmlComments !== "boolean" ? false : opts.removeHtmlComments,
6237
- serializeShadowRoot: typeof opts.serializeShadowRoot !== "boolean" ? true : opts.serializeShadowRoot,
6237
+ serializeShadowRoot: typeof opts.serializeShadowRoot !== "boolean" ? false : opts.serializeShadowRoot,
6238
6238
  fullDocument: typeof opts.fullDocument !== "boolean" ? true : opts.fullDocument
6239
6239
  };
6240
6240
  }
@@ -6360,7 +6360,7 @@ style="${cssText}">`;
6360
6360
  }
6361
6361
  if (EMPTY_ELEMENTS.has(tagName) === false) {
6362
6362
  const shadowRoot = node.shadowRoot;
6363
- if (shadowRoot != null && opts.serializeShadowRoot) {
6363
+ if (opts.serializeShadowRoot && shadowRoot != null) {
6364
6364
  output.indent = output.indent + ((_c = opts.indentSpaces) != null ? _c : 0);
6365
6365
  yield* streamToHtml(shadowRoot, opts, output);
6366
6366
  output.indent = output.indent - ((_d = opts.indentSpaces) != null ? _d : 0);
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/core/mock-doc",
3
- "version": "4.19.2-dev.1720817033.ad4ba40",
3
+ "version": "4.19.2-dev.1721019702.82a7bb9",
4
4
  "description": "Mock window, document and DOM outside of a browser environment.",
5
5
  "main": "./index.cjs",
6
6
  "module": "./index.js",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/core",
3
- "version": "4.19.2-dev.1720817033.ad4ba40",
3
+ "version": "4.19.2-dev.1721019702.82a7bb9",
4
4
  "license": "MIT",
5
5
  "main": "./internal/stencil-core/index.cjs",
6
6
  "module": "./internal/stencil-core/index.js",
@@ -1,5 +1,5 @@
1
1
  /*
2
- Stencil Screenshot v4.19.2-dev.1720817033.ad4ba40 | MIT Licensed | https://stenciljs.com
2
+ Stencil Screenshot v4.19.2-dev.1721019702.82a7bb9 | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
  "use strict";
5
5
  var __create = Object.create;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/core/screenshot",
3
- "version": "4.19.2-dev.1720817033.ad4ba40",
3
+ "version": "4.19.2-dev.1721019702.82a7bb9",
4
4
  "description": "Stencil Screenshot.",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",
@@ -1,5 +1,5 @@
1
1
  /*
2
- Stencil Screenshot Pixel Match v4.19.2-dev.1720817033.ad4ba40 | MIT Licensed | https://stenciljs.com
2
+ Stencil Screenshot Pixel Match v4.19.2-dev.1721019702.82a7bb9 | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
  "use strict";
5
5
  var __create = Object.create;
package/sys/node/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- Stencil Node System v4.19.2-dev.1720817033.ad4ba40 | MIT Licensed | https://stenciljs.com
2
+ Stencil Node System v4.19.2-dev.1721019702.82a7bb9 | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
  "use strict";var yi=Object.create;var $t=Object.defineProperty;var bi=Object.getOwnPropertyDescriptor;var Ei=Object.getOwnPropertyNames;var Ti=Object.getPrototypeOf,xi=Object.prototype.hasOwnProperty;var he=(n,t)=>()=>(t||n((t={exports:{}}).exports,t),t.exports),Sr=(n,t)=>{for(var e in t)$t(n,e,{get:t[e],enumerable:!0})},Lr=(n,t,e,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Ei(t))!xi.call(n,i)&&i!==e&&$t(n,i,{get:()=>t[i],enumerable:!(r=bi(t,i))||r.enumerable});return n};var ve=(n,t,e)=>(e=n!=null?yi(Ti(n)):{},Lr(t||!n||!n.__esModule?$t(e,"default",{value:n,enumerable:!0}):e,n)),Ci=n=>Lr($t({},"__esModule",{value:!0}),n);var Dr=he((Oo,Dt)=>{"use strict";var Si=typeof process<"u"&&process.env.TERM_PROGRAM==="Hyper",Li=typeof process<"u"&&process.platform==="win32",Or=typeof process<"u"&&process.platform==="linux",_t={ballotDisabled:"\u2612",ballotOff:"\u2610",ballotOn:"\u2611",bullet:"\u2022",bulletWhite:"\u25E6",fullBlock:"\u2588",heart:"\u2764",identicalTo:"\u2261",line:"\u2500",mark:"\u203B",middot:"\xB7",minus:"\uFF0D",multiplication:"\xD7",obelus:"\xF7",pencilDownRight:"\u270E",pencilRight:"\u270F",pencilUpRight:"\u2710",percent:"%",pilcrow2:"\u2761",pilcrow:"\xB6",plusMinus:"\xB1",question:"?",section:"\xA7",starsOff:"\u2606",starsOn:"\u2605",upDownArrow:"\u2195"},Ar=Object.assign({},_t,{check:"\u221A",cross:"\xD7",ellipsisLarge:"...",ellipsis:"...",info:"i",questionSmall:"?",pointer:">",pointerSmall:"\xBB",radioOff:"( )",radioOn:"(*)",warning:"\u203C"}),Rr=Object.assign({},_t,{ballotCross:"\u2718",check:"\u2714",cross:"\u2716",ellipsisLarge:"\u22EF",ellipsis:"\u2026",info:"\u2139",questionFull:"\uFF1F",questionSmall:"\uFE56",pointer:Or?"\u25B8":"\u276F",pointerSmall:Or?"\u2023":"\u203A",radioOff:"\u25EF",radioOn:"\u25C9",warning:"\u26A0"});Dt.exports=Li&&!Si?Ar:Rr;Reflect.defineProperty(Dt.exports,"common",{enumerable:!1,value:_t});Reflect.defineProperty(Dt.exports,"windows",{enumerable:!1,value:Ar});Reflect.defineProperty(Dt.exports,"other",{enumerable:!1,value:Rr})});var wr=he((Ao,er)=>{"use strict";var Oi=n=>n!==null&&typeof n=="object"&&!Array.isArray(n),Ai=/[\u001b\u009b][[\]#;?()]*(?:(?:(?:[^\W_]*;?[^\W_]*)\u0007)|(?:(?:[0-9]{1,4}(;[0-9]{0,4})*)?[~0-9=<>cf-nqrtyA-PRZ]))/g,Ri=()=>typeof process<"u"?process.env.FORCE_COLOR!=="0":!1,Pr=()=>{let n={enabled:Ri(),visible:!0,styles:{},keys:{}},t=s=>{let l=s.open=`\x1B[${s.codes[0]}m`,a=s.close=`\x1B[${s.codes[1]}m`,d=s.regex=new RegExp(`\\u001b\\[${s.codes[1]}m`,"g");return s.wrap=(c,y)=>{c.includes(a)&&(c=c.replace(d,a+l));let h=l+c+a;return y?h.replace(/\r*\n/g,`${a}$&${l}`):h},s},e=(s,l,a)=>typeof s=="function"?s(l):s.wrap(l,a),r=(s,l)=>{if(s===""||s==null)return"";if(n.enabled===!1)return s;if(n.visible===!1)return"";let a=""+s,d=a.includes(`
5
5
  `),c=l.length;for(c>0&&l.includes("unstyle")&&(l=[...new Set(["unstyle",...l])].reverse());c-- >0;)a=e(n.styles[l[c]],a,d);return a},i=(s,l,a)=>{n.styles[s]=t({name:s,codes:l}),(n.keys[a]||(n.keys[a]=[])).push(s),Reflect.defineProperty(n,s,{configurable:!0,enumerable:!0,set(c){n.alias(s,c)},get(){let c=y=>r(y,c.stack);return Reflect.setPrototypeOf(c,n),c.stack=this.stack?this.stack.concat(s):[s],c}})};return i("reset",[0,0],"modifier"),i("bold",[1,22],"modifier"),i("dim",[2,22],"modifier"),i("italic",[3,23],"modifier"),i("underline",[4,24],"modifier"),i("inverse",[7,27],"modifier"),i("hidden",[8,28],"modifier"),i("strikethrough",[9,29],"modifier"),i("black",[30,39],"color"),i("red",[31,39],"color"),i("green",[32,39],"color"),i("yellow",[33,39],"color"),i("blue",[34,39],"color"),i("magenta",[35,39],"color"),i("cyan",[36,39],"color"),i("white",[37,39],"color"),i("gray",[90,39],"color"),i("grey",[90,39],"color"),i("bgBlack",[40,49],"bg"),i("bgRed",[41,49],"bg"),i("bgGreen",[42,49],"bg"),i("bgYellow",[43,49],"bg"),i("bgBlue",[44,49],"bg"),i("bgMagenta",[45,49],"bg"),i("bgCyan",[46,49],"bg"),i("bgWhite",[47,49],"bg"),i("blackBright",[90,39],"bright"),i("redBright",[91,39],"bright"),i("greenBright",[92,39],"bright"),i("yellowBright",[93,39],"bright"),i("blueBright",[94,39],"bright"),i("magentaBright",[95,39],"bright"),i("cyanBright",[96,39],"bright"),i("whiteBright",[97,39],"bright"),i("bgBlackBright",[100,49],"bgBright"),i("bgRedBright",[101,49],"bgBright"),i("bgGreenBright",[102,49],"bgBright"),i("bgYellowBright",[103,49],"bgBright"),i("bgBlueBright",[104,49],"bgBright"),i("bgMagentaBright",[105,49],"bgBright"),i("bgCyanBright",[106,49],"bgBright"),i("bgWhiteBright",[107,49],"bgBright"),n.ansiRegex=Ai,n.hasColor=n.hasAnsi=s=>(n.ansiRegex.lastIndex=0,typeof s=="string"&&s!==""&&n.ansiRegex.test(s)),n.alias=(s,l)=>{let a=typeof l=="string"?n[l]:l;if(typeof a!="function")throw new TypeError("Expected alias to be the name of an existing color (string) or a function");a.stack||(Reflect.defineProperty(a,"name",{value:s}),n.styles[s]=a,a.stack=[s]),Reflect.defineProperty(n,s,{configurable:!0,enumerable:!0,set(d){n.alias(s,d)},get(){let d=c=>r(c,d.stack);return Reflect.setPrototypeOf(d,n),d.stack=this.stack?this.stack.concat(a.stack):a.stack,d}})},n.theme=s=>{if(!Oi(s))throw new TypeError("Expected theme to be an object");for(let l of Object.keys(s))n.alias(l,s[l]);return n},n.alias("unstyle",s=>typeof s=="string"&&s!==""?(n.ansiRegex.lastIndex=0,s.replace(n.ansiRegex,"")):""),n.alias("noop",s=>s),n.none=n.clear=n.noop,n.stripColor=n.unstyle,n.symbols=Dr(),n.define=i,n};er.exports=Pr();er.exports.create=Pr});var Gr=he((yl,Vr)=>{Vr.exports=function(n){var t={};function e(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return n[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}return e.m=n,e.c=t,e.i=function(r){return r},e.d=function(r,i,s){e.o(r,i)||Object.defineProperty(r,i,{configurable:!1,enumerable:!0,get:s})},e.n=function(r){var i=r&&r.__esModule?function(){return r.default}:function(){return r};return e.d(i,"a",i),i},e.o=function(r,i){return Object.prototype.hasOwnProperty.call(r,i)},e.p="",e(e.s=14)}([function(n,t){n.exports=require("path")},function(n,t,e){"use strict";t.__esModule=!0;var r=e(173),i=s(r);function s(l){return l&&l.__esModule?l:{default:l}}t.default=function(l){return function(){var a=l.apply(this,arguments);return new i.default(function(d,c){function y(h,A){try{var x=a[h](A),g=x.value}catch(C){c(C);return}if(x.done)d(g);else return i.default.resolve(g).then(function(C){y("next",C)},function(C){y("throw",C)})}return y("next")})}}},function(n,t){n.exports=require("util")},function(n,t){n.exports=require("fs")},function(n,t,e){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r extends Error{constructor(c,y){super(c),this.code=y}}t.MessageError=r;class i extends r{constructor(c,y,h){super(c,y),this.process=h}}t.ProcessSpawnError=i;class s extends r{}t.SecurityError=s;class l extends r{}t.ProcessTermError=l;class a extends Error{constructor(c,y){super(c),this.responseCode=y}}t.ResponseError=a},function(n,t,e){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getFirstSuitableFolder=t.readFirstAvailableStream=t.makeTempDir=t.hardlinksWork=t.writeFilePreservingEol=t.getFileSizeOnDisk=t.walk=t.symlink=t.find=t.readJsonAndFile=t.readJson=t.readFileAny=t.hardlinkBulk=t.copyBulk=t.unlink=t.glob=t.link=t.chmod=t.lstat=t.exists=t.mkdirp=t.stat=t.access=t.rename=t.readdir=t.realpath=t.readlink=t.writeFile=t.open=t.readFileBuffer=t.lockQueue=t.constants=void 0;var r;function i(){return r=B(e(1))}let s=(()=>{var K=(0,(r||i()).default)(function*(G,U,j,V){let te=(()=>{var se=(0,(r||i()).default)(function*(Le){let ge=Le.src,re=Le.dest,Rt=Le.type,He=Le.onFresh||Je,ye=Le.onDone||Je;if(oe.has(re.toLowerCase())?V.verbose(`The case-insensitive file ${re} shouldn't be copied twice in one bulk copy`):oe.add(re.toLowerCase()),Rt==="symlink"){yield Ee((o||u()).default.dirname(re)),He(),Re.symlink.push({dest:re,linkname:ge}),ye();return}if(U.ignoreBasenames.indexOf((o||u()).default.basename(ge))>=0)return;let be=yield Ce(ge),rt;be.isDirectory()&&(rt=yield Se(ge));let Ne;try{Ne=yield Ce(re)}catch(ke){if(ke.code!=="ENOENT")throw ke}if(Ne){let ke=be.isSymbolicLink()&&Ne.isSymbolicLink(),nt=be.isDirectory()&&Ne.isDirectory(),qe=be.isFile()&&Ne.isFile();if(qe&&de.has(re)){ye(),V.verbose(V.lang("verboseFileSkipArtifact",ge));return}if(qe&&be.size===Ne.size&&(0,(X||Q()).fileDatesEqual)(be.mtime,Ne.mtime)){ye(),V.verbose(V.lang("verboseFileSkip",ge,re,be.size,+be.mtime));return}if(ke){let Oe=yield ae(ge);if(Oe===(yield ae(re))){ye(),V.verbose(V.lang("verboseFileSkipSymlink",ge,re,Oe));return}}if(nt){let Oe=yield Se(re);yt(rt,"src files not initialised");for(var Ye=Oe,lt=Array.isArray(Ye),je=0,Ye=lt?Ye:Ye[Symbol.iterator]();;){var Et;if(lt){if(je>=Ye.length)break;Et=Ye[je++]}else{if(je=Ye.next(),je.done)break;Et=je.value}let ft=Et;if(rt.indexOf(ft)<0){let it=(o||u()).default.join(re,ft);if(j.add(it),(yield Ce(it)).isDirectory())for(var Qe=yield Se(it),ut=Array.isArray(Qe),Ue=0,Qe=ut?Qe:Qe[Symbol.iterator]();;){var Tt;if(ut){if(Ue>=Qe.length)break;Tt=Qe[Ue++]}else{if(Ue=Qe.next(),Ue.done)break;Tt=Ue.value}let qt=Tt;j.add((o||u()).default.join(it,qt))}}}}}if(Ne&&Ne.isSymbolicLink()&&(yield(0,(X||Q()).unlink)(re),Ne=null),be.isSymbolicLink()){He();let ke=yield ae(ge);Re.symlink.push({dest:re,linkname:ke}),ye()}else if(be.isDirectory()){Ne||(V.verbose(V.lang("verboseFileFolder",re)),yield Ee(re));let ke=re.split((o||u()).default.sep);for(;ke.length;)oe.add(ke.join((o||u()).default.sep).toLowerCase()),ke.pop();yt(rt,"src files not initialised");let nt=rt.length;nt||ye();for(var Ze=rt,ct=Array.isArray(Ze),Xe=0,Ze=ct?Ze:Ze[Symbol.iterator]();;){var we;if(ct){if(Xe>=Ze.length)break;we=Ze[Xe++]}else{if(Xe=Ze.next(),Xe.done)break;we=Xe.value}let qe=we;G.push({dest:(o||u()).default.join(re,qe),onFresh:He,onDone:function(Oe){function ft(){return Oe.apply(this,arguments)}return ft.toString=function(){return Oe.toString()},ft}(function(){--nt===0&&ye()}),src:(o||u()).default.join(ge,qe)})}}else if(be.isFile())He(),Re.file.push({src:ge,dest:re,atime:be.atime,mtime:be.mtime,mode:be.mode}),ye();else throw new Error(`unsure how to copy this: ${ge}`)});return function(ge){return se.apply(this,arguments)}})(),de=new Set(U.artifactFiles||[]),oe=new Set;for(var ie=G,le=Array.isArray(ie),ne=0,ie=le?ie:ie[Symbol.iterator]();;){var $e;if(le){if(ne>=ie.length)break;$e=ie[ne++]}else{if(ne=ie.next(),ne.done)break;$e=ne.value}let se=$e,Le=se.onDone;se.onDone=function(){U.onProgress(se.dest),Le&&Le()}}U.onStart(G.length);let Re={file:[],symlink:[],link:[]};for(;G.length;){let se=G.splice(0,dt);yield Promise.all(se.map(te))}for(var De=de,at=Array.isArray(De),ze=0,De=at?De:De[Symbol.iterator]();;){var gt;if(at){if(ze>=De.length)break;gt=De[ze++]}else{if(ze=De.next(),ze.done)break;gt=ze.value}let se=gt;j.has(se)&&(V.verbose(V.lang("verboseFilePhantomExtraneous",se)),j.delete(se))}for(var Pe=j,At=Array.isArray(Pe),Ke=0,Pe=At?Pe:Pe[Symbol.iterator]();;){var pt;if(At){if(Ke>=Pe.length)break;pt=Pe[Ke++]}else{if(Ke=Pe.next(),Ke.done)break;pt=Ke.value}let se=pt;oe.has(se.toLowerCase())&&j.delete(se)}return Re});return function(U,j,V,te){return K.apply(this,arguments)}})(),l=(()=>{var K=(0,(r||i()).default)(function*(G,U,j,V){let te=(()=>{var se=(0,(r||i()).default)(function*(Le){let ge=Le.src,re=Le.dest,Rt=Le.onFresh||Je,He=Le.onDone||Je;if(oe.has(re.toLowerCase())){He();return}if(oe.add(re.toLowerCase()),U.ignoreBasenames.indexOf((o||u()).default.basename(ge))>=0)return;let ye=yield Ce(ge),be;ye.isDirectory()&&(be=yield Se(ge));let rt=yield We(re);if(rt){let we=yield Ce(re),ke=ye.isSymbolicLink()&&we.isSymbolicLink(),nt=ye.isDirectory()&&we.isDirectory(),qe=ye.isFile()&&we.isFile();if(ye.mode!==we.mode)try{yield Te(re,ye.mode)}catch(Oe){V.verbose(Oe)}if(qe&&de.has(re)){He(),V.verbose(V.lang("verboseFileSkipArtifact",ge));return}if(qe&&ye.ino!==null&&ye.ino===we.ino){He(),V.verbose(V.lang("verboseFileSkip",ge,re,ye.ino));return}if(ke){let Oe=yield ae(ge);if(Oe===(yield ae(re))){He(),V.verbose(V.lang("verboseFileSkipSymlink",ge,re,Oe));return}}if(nt){let Oe=yield Se(re);yt(be,"src files not initialised");for(var je=Oe,Ne=Array.isArray(je),lt=0,je=Ne?je:je[Symbol.iterator]();;){var Ye;if(Ne){if(lt>=je.length)break;Ye=je[lt++]}else{if(lt=je.next(),lt.done)break;Ye=lt.value}let ft=Ye;if(be.indexOf(ft)<0){let it=(o||u()).default.join(re,ft);if(j.add(it),(yield Ce(it)).isDirectory())for(var Ue=yield Se(it),Et=Array.isArray(Ue),ut=0,Ue=Et?Ue:Ue[Symbol.iterator]();;){var Qe;if(Et){if(ut>=Ue.length)break;Qe=Ue[ut++]}else{if(ut=Ue.next(),ut.done)break;Qe=ut.value}let qt=Qe;j.add((o||u()).default.join(it,qt))}}}}}if(ye.isSymbolicLink()){Rt();let we=yield ae(ge);Re.symlink.push({dest:re,linkname:we}),He()}else if(ye.isDirectory()){V.verbose(V.lang("verboseFileFolder",re)),yield Ee(re);let we=re.split((o||u()).default.sep);for(;we.length;)oe.add(we.join((o||u()).default.sep).toLowerCase()),we.pop();yt(be,"src files not initialised");let ke=be.length;ke||He();for(var Xe=be,Tt=Array.isArray(Xe),ct=0,Xe=Tt?Xe:Xe[Symbol.iterator]();;){var Ze;if(Tt){if(ct>=Xe.length)break;Ze=Xe[ct++]}else{if(ct=Xe.next(),ct.done)break;Ze=ct.value}let nt=Ze;G.push({onFresh:Rt,src:(o||u()).default.join(ge,nt),dest:(o||u()).default.join(re,nt),onDone:function(qe){function Oe(){return qe.apply(this,arguments)}return Oe.toString=function(){return qe.toString()},Oe}(function(){--ke===0&&He()})})}}else if(ye.isFile())Rt(),Re.link.push({src:ge,dest:re,removeDest:rt}),He();else throw new Error(`unsure how to copy this: ${ge}`)});return function(ge){return se.apply(this,arguments)}})(),de=new Set(U.artifactFiles||[]),oe=new Set;for(var ie=G,le=Array.isArray(ie),ne=0,ie=le?ie:ie[Symbol.iterator]();;){var $e;if(le){if(ne>=ie.length)break;$e=ie[ne++]}else{if(ne=ie.next(),ne.done)break;$e=ne.value}let se=$e,Le=se.onDone||Je;se.onDone=function(){U.onProgress(se.dest),Le()}}U.onStart(G.length);let Re={file:[],symlink:[],link:[]};for(;G.length;){let se=G.splice(0,dt);yield Promise.all(se.map(te))}for(var De=de,at=Array.isArray(De),ze=0,De=at?De:De[Symbol.iterator]();;){var gt;if(at){if(ze>=De.length)break;gt=De[ze++]}else{if(ze=De.next(),ze.done)break;gt=ze.value}let se=gt;j.has(se)&&(V.verbose(V.lang("verboseFilePhantomExtraneous",se)),j.delete(se))}for(var Pe=j,At=Array.isArray(Pe),Ke=0,Pe=At?Pe:Pe[Symbol.iterator]();;){var pt;if(At){if(Ke>=Pe.length)break;pt=Pe[Ke++]}else{if(Ke=Pe.next(),Ke.done)break;pt=Ke.value}let se=pt;oe.has(se.toLowerCase())&&j.delete(se)}return Re});return function(U,j,V,te){return K.apply(this,arguments)}})(),a=t.copyBulk=(()=>{var K=(0,(r||i()).default)(function*(G,U,j){let V={onStart:j&&j.onStart||Je,onProgress:j&&j.onProgress||Je,possibleExtraneous:j?j.possibleExtraneous:new Set,ignoreBasenames:j&&j.ignoreBasenames||[],artifactFiles:j&&j.artifactFiles||[]},te=yield s(G,V,V.possibleExtraneous,U);V.onStart(te.file.length+te.symlink.length+te.link.length);let de=te.file,oe=new Map;yield(b||L()).queue(de,(()=>{var ne=(0,(r||i()).default)(function*(ie){let $e;for(;$e=oe.get(ie.dest);)yield $e;U.verbose(U.lang("verboseFileCopy",ie.src,ie.dest));let Re=(0,(X||Q()).copyFile)(ie,function(){return oe.delete(ie.dest)});return oe.set(ie.dest,Re),V.onProgress(ie.dest),Re});return function(ie){return ne.apply(this,arguments)}})(),dt);let le=te.symlink;yield(b||L()).queue(le,function(ne){let ie=(o||u()).default.resolve((o||u()).default.dirname(ne.dest),ne.linkname);return U.verbose(U.lang("verboseFileSymlink",ne.dest,ie)),x(ie,ne.dest)})});return function(U,j,V){return K.apply(this,arguments)}})(),d=t.hardlinkBulk=(()=>{var K=(0,(r||i()).default)(function*(G,U,j){let V={onStart:j&&j.onStart||Je,onProgress:j&&j.onProgress||Je,possibleExtraneous:j?j.possibleExtraneous:new Set,artifactFiles:j&&j.artifactFiles||[],ignoreBasenames:[]},te=yield l(G,V,V.possibleExtraneous,U);V.onStart(te.file.length+te.symlink.length+te.link.length);let de=te.link;yield(b||L()).queue(de,(()=>{var le=(0,(r||i()).default)(function*(ne){U.verbose(U.lang("verboseFileLink",ne.src,ne.dest)),ne.removeDest&&(yield(0,(X||Q()).unlink)(ne.dest)),yield Mt(ne.src,ne.dest)});return function(ne){return le.apply(this,arguments)}})(),dt);let oe=te.symlink;yield(b||L()).queue(oe,function(le){let ne=(o||u()).default.resolve((o||u()).default.dirname(le.dest),le.linkname);return U.verbose(U.lang("verboseFileSymlink",le.dest,ne)),x(ne,le.dest)})});return function(U,j,V){return K.apply(this,arguments)}})(),c=t.readFileAny=(()=>{var K=(0,(r||i()).default)(function*(G){for(var V=G,U=Array.isArray(V),j=0,V=U?V:V[Symbol.iterator]();;){var te;if(U){if(j>=V.length)break;te=V[j++]}else{if(j=V.next(),j.done)break;te=j.value}let de=te;if(yield We(de))return Zt(de)}return null});return function(U){return K.apply(this,arguments)}})(),y=t.readJson=(()=>{var K=(0,(r||i()).default)(function*(G){return(yield h(G)).object});return function(U){return K.apply(this,arguments)}})(),h=t.readJsonAndFile=(()=>{var K=(0,(r||i()).default)(function*(G){let U=yield Zt(G);try{return{object:(0,(F||H()).default)(JSON.parse(Ot(U))),content:U}}catch(j){throw j.message=`${G}: ${j.message}`,j}});return function(U){return K.apply(this,arguments)}})(),A=t.find=(()=>{var K=(0,(r||i()).default)(function*(G,U){let j=U.split((o||u()).default.sep);for(;j.length;){let V=j.concat(G).join((o||u()).default.sep);if(yield We(V))return V;j.pop()}return!1});return function(U,j){return K.apply(this,arguments)}})(),x=t.symlink=(()=>{var K=(0,(r||i()).default)(function*(G,U){try{if((yield Ce(U)).isSymbolicLink()&&(yield Ae(U))===G)return}catch(j){if(j.code!=="ENOENT")throw j}if(yield(0,(X||Q()).unlink)(U),process.platform==="win32")yield Ft(G,U,"junction");else{let j;try{j=(o||u()).default.relative((E||S()).default.realpathSync((o||u()).default.dirname(U)),(E||S()).default.realpathSync(G))}catch(V){if(V.code!=="ENOENT")throw V;j=(o||u()).default.relative((o||u()).default.dirname(U),G)}yield Ft(j||".",U)}});return function(U,j){return K.apply(this,arguments)}})(),g=t.walk=(()=>{var K=(0,(r||i()).default)(function*(G,U,j=new Set){let V=[],te=yield Se(G);j.size&&(te=te.filter(function(ie){return!j.has(ie)}));for(var le=te,de=Array.isArray(le),oe=0,le=de?le:le[Symbol.iterator]();;){var ne;if(de){if(oe>=le.length)break;ne=le[oe++]}else{if(oe=le.next(),oe.done)break;ne=oe.value}let ie=ne,$e=U?(o||u()).default.join(U,ie):ie,Re=(o||u()).default.join(G,ie),at=yield Ce(Re);V.push({relative:$e,basename:ie,absolute:Re,mtime:+at.mtime}),at.isDirectory()&&(V=V.concat(yield g(Re,$e,j)))}return V});return function(U,j){return K.apply(this,arguments)}})(),C=t.getFileSizeOnDisk=(()=>{var K=(0,(r||i()).default)(function*(G){let U=yield Ce(G),j=U.size,V=U.blksize;return Math.ceil(j/V)*V});return function(U){return K.apply(this,arguments)}})(),T=(()=>{var K=(0,(r||i()).default)(function*(G){if(!(yield We(G)))return;let U=yield Y(G);for(let j=0;j<U.length;++j){if(U[j]===hi)return`\r
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/core/sys/node",
3
- "version": "4.19.2-dev.1720817033.ad4ba40",
3
+ "version": "4.19.2-dev.1721019702.82a7bb9",
4
4
  "description": "Stencil Node System.",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",
@@ -1,4 +1,4 @@
1
1
  /*!
2
- Stencil Node System Worker v4.19.2-dev.1720817033.ad4ba40 | MIT Licensed | https://stenciljs.com
2
+ Stencil Node System Worker v4.19.2-dev.1721019702.82a7bb9 | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
  "use strict";var f=Object.create;var d=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var E=Object.getOwnPropertyNames;var y=Object.getPrototypeOf,R=Object.prototype.hasOwnProperty;var g=(n,t,r,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let e of E(t))!R.call(n,e)&&e!==r&&d(n,e,{get:()=>t[e],enumerable:!(s=p(t,e))||s.enumerable});return n};var c=(n,t,r)=>(r=n!=null?f(y(n)):{},g(t||!n||!n.__esModule?d(r,"default",{value:n,enumerable:!0}):r,n));var l=c(require("../../compiler/stencil.js")),m=c(require("./index.js"));var a=(n,t)=>{let r=e=>{e&&e.code==="ERR_IPC_CHANNEL_CLOSED"&&n.exit(0)},s=(e,o)=>{let i={stencilId:e,stencilRtnValue:null,stencilRtnError:"Error"};typeof o=="string"?i.stencilRtnError+=": "+o:o&&(o.stack?i.stencilRtnError+=": "+o.stack:o.message&&(i.stencilRtnError+=":"+o.message)),n.send(i,r)};n.on("message",async e=>{if(e&&typeof e.stencilId=="number")try{let o={stencilId:e.stencilId,stencilRtnValue:await t(e),stencilRtnError:null};n.send(o,r)}catch(o){s(e.stencilId,o)}}),n.on("unhandledRejection",e=>{s(-1,e)})};var k=m.createNodeSys({process}),M=l.createWorkerMessageHandler(k);a(process,M);