@stencil/core 4.19.2-dev.1720760506.82a7bb9 → 4.19.2-dev.1720817033.ad4ba40
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.
- package/cli/index.cjs +1 -1
- package/cli/index.js +1 -1
- package/cli/package.json +1 -1
- package/compiler/package.json +1 -1
- package/compiler/stencil.js +31 -62
- package/dev-server/client/index.js +1 -1
- package/dev-server/client/package.json +1 -1
- package/dev-server/connector.html +2 -2
- package/dev-server/index.js +1 -1
- package/dev-server/package.json +1 -1
- package/dev-server/server-process.js +2 -2
- package/internal/app-data/package.json +1 -1
- package/internal/client/index.js +19 -14
- package/internal/client/package.json +1 -1
- package/internal/client/patch-browser.js +1 -1
- package/internal/client/shadow-css.js +6 -30
- package/internal/hydrate/index.js +22 -19
- package/internal/hydrate/package.json +1 -1
- package/internal/hydrate/runner.js +8 -5
- package/internal/package.json +1 -1
- package/internal/stencil-private.d.ts +0 -1
- package/internal/testing/index.js +18 -13
- package/internal/testing/package.json +1 -1
- package/mock-doc/index.cjs +3 -3
- package/mock-doc/index.js +3 -3
- package/mock-doc/package.json +1 -1
- package/package.json +1 -1
- package/screenshot/index.js +1 -1
- package/screenshot/package.json +1 -1
- package/screenshot/pixel-match.js +1 -1
- package/sys/node/index.js +1 -1
- package/sys/node/package.json +1 -1
- package/sys/node/worker.js +1 -1
- package/testing/index.js +1 -1
- package/testing/package.json +1 -1
package/internal/client/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Stencil Client Platform v4.19.2-dev.
|
|
2
|
+
Stencil Client Platform v4.19.2-dev.1720817033.ad4ba40 | MIT Licensed | https://stenciljs.com
|
|
3
3
|
*/
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
5
5
|
var __export = (target, all) => {
|
|
@@ -848,10 +848,21 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
848
848
|
if (nonce != null) {
|
|
849
849
|
styleElm.setAttribute("nonce", nonce);
|
|
850
850
|
}
|
|
851
|
-
if (BUILD13.hydrateServerSide || BUILD13.hotModuleReplacement) {
|
|
851
|
+
if ((BUILD13.hydrateServerSide || BUILD13.hotModuleReplacement) && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
|
|
852
852
|
styleElm.setAttribute(HYDRATED_STYLE_ID, scopeId2);
|
|
853
853
|
}
|
|
854
|
-
|
|
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
|
+
}
|
|
855
866
|
}
|
|
856
867
|
if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
|
|
857
868
|
styleElm.innerHTML += SLOT_FB_CSS;
|
|
@@ -876,7 +887,7 @@ var attachStyles = (hostRef) => {
|
|
|
876
887
|
cmpMeta,
|
|
877
888
|
hostRef.$modeName$
|
|
878
889
|
);
|
|
879
|
-
if ((BUILD13.shadowDom || BUILD13.scoped) && BUILD13.cssAnnotations && flags & 10 /* needsScopedEncapsulation */) {
|
|
890
|
+
if ((BUILD13.shadowDom || BUILD13.scoped) && BUILD13.cssAnnotations && flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */) {
|
|
880
891
|
elm["s-sc"] = scopeId2;
|
|
881
892
|
elm.classList.add(scopeId2 + "-h");
|
|
882
893
|
if (BUILD13.scoped && flags & 2 /* scopedCssEncapsulation */) {
|
|
@@ -886,7 +897,6 @@ var attachStyles = (hostRef) => {
|
|
|
886
897
|
endAttachStyles();
|
|
887
898
|
};
|
|
888
899
|
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{");
|
|
890
900
|
|
|
891
901
|
// src/runtime/vdom/vdom-render.ts
|
|
892
902
|
import { BUILD as BUILD16 } from "@stencil/core/internal/app-data";
|
|
@@ -1082,7 +1092,9 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
1082
1092
|
if (BUILD16.vdomAttribute) {
|
|
1083
1093
|
updateElement(null, newVNode2, isSvgMode);
|
|
1084
1094
|
}
|
|
1085
|
-
|
|
1095
|
+
const rootNode = elm.getRootNode();
|
|
1096
|
+
const isElementWithinShadowRoot = !rootNode.querySelector("body");
|
|
1097
|
+
if (!isElementWithinShadowRoot && BUILD16.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
|
|
1086
1098
|
elm.classList.add(elm["s-si"] = scopeId);
|
|
1087
1099
|
}
|
|
1088
1100
|
if (BUILD16.scoped) {
|
|
@@ -2145,7 +2157,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
2145
2157
|
const endRegisterStyles = createTime("registerStyles", cmpMeta.$tagName$);
|
|
2146
2158
|
if (!BUILD20.hydrateServerSide && BUILD20.shadowDom && // TODO(STENCIL-854): Remove code related to legacy shadowDomShim field
|
|
2147
2159
|
BUILD20.shadowDomShim && cmpMeta.$flags$ & 8 /* needsShadowDomShim */) {
|
|
2148
|
-
style = await import("./shadow-css.js").then((m) => m.scopeCss(style, scopeId2
|
|
2160
|
+
style = await import("./shadow-css.js").then((m) => m.scopeCss(style, scopeId2));
|
|
2149
2161
|
}
|
|
2150
2162
|
registerStyle(scopeId2, style, !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */));
|
|
2151
2163
|
endRegisterStyles();
|
|
@@ -2714,10 +2726,8 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
2714
2726
|
const metaCharset = /* @__PURE__ */ head.querySelector("meta[charset]");
|
|
2715
2727
|
const dataStyles = /* @__PURE__ */ doc.createElement("style");
|
|
2716
2728
|
const deferredConnectedCallbacks = [];
|
|
2717
|
-
const styles2 = /* @__PURE__ */ doc.querySelectorAll(`[${HYDRATED_STYLE_ID}]`);
|
|
2718
2729
|
let appLoadFallback;
|
|
2719
2730
|
let isBootstrapping = true;
|
|
2720
|
-
let i2 = 0;
|
|
2721
2731
|
Object.assign(plt, options);
|
|
2722
2732
|
plt.$resourcesUrl$ = new URL(options.resourcesUrl || "./", doc.baseURI).href;
|
|
2723
2733
|
if (BUILD25.asyncQueue) {
|
|
@@ -2728,11 +2738,6 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
2728
2738
|
if (BUILD25.hydrateClientSide) {
|
|
2729
2739
|
plt.$flags$ |= 2 /* appLoaded */;
|
|
2730
2740
|
}
|
|
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
|
-
}
|
|
2736
2741
|
let hasSlotRelocation = false;
|
|
2737
2742
|
lazyBundles.map((lazyBundle) => {
|
|
2738
2743
|
lazyBundle[1].map((compactMeta) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stencil/core/internal/client",
|
|
3
|
-
"version": "4.19.2-dev.
|
|
3
|
+
"version": "4.19.2-dev.1720817033.ad4ba40",
|
|
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",
|
|
@@ -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) => {
|
|
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);
|
|
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, co
|
|
|
290
290
|
return cssRule;
|
|
291
291
|
});
|
|
292
292
|
};
|
|
293
|
-
var scopeCssText = (cssText, scopeId, hostScopeId, slotScopeId
|
|
293
|
+
var scopeCssText = (cssText, scopeId, hostScopeId, slotScopeId) => {
|
|
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, commentOriginalS
|
|
|
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);
|
|
302
302
|
}
|
|
303
303
|
cssText = replaceShadowCssHost(cssText, hostScopeId);
|
|
304
304
|
cssText = cssText.replace(/>\s*\*\s+([^{, ]+)/gm, " $1 ");
|
|
@@ -315,37 +315,13 @@ var scopeCssText = (cssText, scopeId, hostScopeId, slotScopeId, commentOriginalS
|
|
|
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) => {
|
|
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
|
|
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);
|
|
323
|
+
const scoped = scopeCssText(cssText, scopeId, hostScopeId, slotScopeId);
|
|
343
324
|
cssText = [scoped.cssText, ...commentsWithHash].join("\n");
|
|
344
|
-
if (commentOriginalSelector) {
|
|
345
|
-
orgSelectors.forEach(({ placeholder, comment }) => {
|
|
346
|
-
cssText = cssText.replace(placeholder, comment);
|
|
347
|
-
});
|
|
348
|
-
}
|
|
349
325
|
scoped.slottedSelectors.forEach((slottedSelector) => {
|
|
350
326
|
const regex = new RegExp(escapeRegExpSpecialCharacters(slottedSelector.orgSelector), "g");
|
|
351
327
|
cssText = cssText.replace(regex, slottedSelector.updatedSelector);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Stencil Hydrate Platform v4.19.2-dev.
|
|
2
|
+
Stencil Hydrate Platform v4.19.2-dev.1720817033.ad4ba40 | MIT Licensed | https://stenciljs.com
|
|
3
3
|
*/
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
5
5
|
var __export = (target, all) => {
|
|
@@ -639,10 +639,21 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
639
639
|
if (nonce != null) {
|
|
640
640
|
styleElm.setAttribute("nonce", nonce);
|
|
641
641
|
}
|
|
642
|
-
if (BUILD7.hydrateServerSide || BUILD7.hotModuleReplacement) {
|
|
642
|
+
if ((BUILD7.hydrateServerSide || BUILD7.hotModuleReplacement) && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
|
|
643
643
|
styleElm.setAttribute(HYDRATED_STYLE_ID, scopeId2);
|
|
644
644
|
}
|
|
645
|
-
|
|
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
|
+
}
|
|
646
657
|
}
|
|
647
658
|
if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
|
|
648
659
|
styleElm.innerHTML += SLOT_FB_CSS;
|
|
@@ -667,7 +678,7 @@ var attachStyles = (hostRef) => {
|
|
|
667
678
|
cmpMeta,
|
|
668
679
|
hostRef.$modeName$
|
|
669
680
|
);
|
|
670
|
-
if ((BUILD7.shadowDom || BUILD7.scoped) && BUILD7.cssAnnotations && flags & 10 /* needsScopedEncapsulation */) {
|
|
681
|
+
if ((BUILD7.shadowDom || BUILD7.scoped) && BUILD7.cssAnnotations && flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */) {
|
|
671
682
|
elm["s-sc"] = scopeId2;
|
|
672
683
|
elm.classList.add(scopeId2 + "-h");
|
|
673
684
|
if (BUILD7.scoped && flags & 2 /* scopedCssEncapsulation */) {
|
|
@@ -677,7 +688,6 @@ var attachStyles = (hostRef) => {
|
|
|
677
688
|
endAttachStyles();
|
|
678
689
|
};
|
|
679
690
|
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{");
|
|
681
691
|
|
|
682
692
|
// src/runtime/vdom/vdom-render.ts
|
|
683
693
|
import { BUILD as BUILD10 } from "@stencil/core/internal/app-data";
|
|
@@ -873,7 +883,9 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
873
883
|
if (BUILD10.vdomAttribute) {
|
|
874
884
|
updateElement(null, newVNode2, isSvgMode);
|
|
875
885
|
}
|
|
876
|
-
|
|
886
|
+
const rootNode = elm.getRootNode();
|
|
887
|
+
const isElementWithinShadowRoot = !rootNode.querySelector("body");
|
|
888
|
+
if (!isElementWithinShadowRoot && BUILD10.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
|
|
877
889
|
elm.classList.add(elm["s-si"] = scopeId);
|
|
878
890
|
}
|
|
879
891
|
if (BUILD10.scoped) {
|
|
@@ -1936,7 +1948,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1936
1948
|
const endRegisterStyles = createTime("registerStyles", cmpMeta.$tagName$);
|
|
1937
1949
|
if (!BUILD14.hydrateServerSide && BUILD14.shadowDom && // TODO(STENCIL-854): Remove code related to legacy shadowDomShim field
|
|
1938
1950
|
BUILD14.shadowDomShim && cmpMeta.$flags$ & 8 /* needsShadowDomShim */) {
|
|
1939
|
-
style = await import("../client/shadow-css.js").then((m) => m.scopeCss(style, scopeId2
|
|
1951
|
+
style = await import("../client/shadow-css.js").then((m) => m.scopeCss(style, scopeId2));
|
|
1940
1952
|
}
|
|
1941
1953
|
registerStyle(scopeId2, style, !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */));
|
|
1942
1954
|
endRegisterStyles();
|
|
@@ -2505,10 +2517,8 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
2505
2517
|
const metaCharset = /* @__PURE__ */ head.querySelector("meta[charset]");
|
|
2506
2518
|
const dataStyles = /* @__PURE__ */ doc.createElement("style");
|
|
2507
2519
|
const deferredConnectedCallbacks = [];
|
|
2508
|
-
const styles2 = /* @__PURE__ */ doc.querySelectorAll(`[${HYDRATED_STYLE_ID}]`);
|
|
2509
2520
|
let appLoadFallback;
|
|
2510
2521
|
let isBootstrapping = true;
|
|
2511
|
-
let i2 = 0;
|
|
2512
2522
|
Object.assign(plt, options);
|
|
2513
2523
|
plt.$resourcesUrl$ = new URL(options.resourcesUrl || "./", doc.baseURI).href;
|
|
2514
2524
|
if (BUILD19.asyncQueue) {
|
|
@@ -2519,11 +2529,6 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
2519
2529
|
if (BUILD19.hydrateClientSide) {
|
|
2520
2530
|
plt.$flags$ |= 2 /* appLoaded */;
|
|
2521
2531
|
}
|
|
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
|
-
}
|
|
2527
2532
|
let hasSlotRelocation = false;
|
|
2528
2533
|
lazyBundles.map((lazyBundle) => {
|
|
2529
2534
|
lazyBundle[1].map((compactMeta) => {
|
|
@@ -2890,7 +2895,7 @@ var globalScripts = (
|
|
|
2890
2895
|
|
|
2891
2896
|
// src/hydrate/platform/proxy-host-element.ts
|
|
2892
2897
|
import { BUILD as BUILD21 } from "@stencil/core/internal/app-data";
|
|
2893
|
-
function proxyHostElement(elm, cmpMeta
|
|
2898
|
+
function proxyHostElement(elm, cmpMeta) {
|
|
2894
2899
|
if (typeof elm.componentOnReady !== "function") {
|
|
2895
2900
|
elm.componentOnReady = componentOnReady;
|
|
2896
2901
|
}
|
|
@@ -2903,10 +2908,8 @@ function proxyHostElement(elm, cmpMeta, opts) {
|
|
|
2903
2908
|
mode: "open",
|
|
2904
2909
|
delegatesFocus: !!(cmpMeta.$flags$ & 16 /* shadowDelegatesFocus */)
|
|
2905
2910
|
});
|
|
2906
|
-
} else if (opts.serializeShadowRoot) {
|
|
2907
|
-
elm.attachShadow({ mode: "open" });
|
|
2908
2911
|
} else {
|
|
2909
|
-
elm.
|
|
2912
|
+
elm.attachShadow({ mode: "open" });
|
|
2910
2913
|
}
|
|
2911
2914
|
}
|
|
2912
2915
|
if (cmpMeta.$members$ != null) {
|
|
@@ -3019,7 +3022,7 @@ function hydrateApp(win2, opts, results, afterHydrate, resolve) {
|
|
|
3019
3022
|
createdElements.add(elm);
|
|
3020
3023
|
elm.connectedCallback = patchedConnectedCallback2;
|
|
3021
3024
|
registerHost(elm, Cstr.cmpMeta);
|
|
3022
|
-
proxyHostElement(elm, Cstr.cmpMeta
|
|
3025
|
+
proxyHostElement(elm, Cstr.cmpMeta);
|
|
3023
3026
|
}
|
|
3024
3027
|
}
|
|
3025
3028
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stencil/core/internal/hydrate",
|
|
3
|
-
"version": "4.19.2-dev.
|
|
3
|
+
"version": "4.19.2-dev.1720817033.ad4ba40",
|
|
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.
|
|
2
|
+
Stencil Hydrate Runner v4.19.2-dev.1720817033.ad4ba40 | 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" ?
|
|
10417
|
+
serializeShadowRoot: typeof opts.serializeShadowRoot !== "boolean" ? true : 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 (
|
|
10543
|
+
if (shadowRoot != null && opts.serializeShadowRoot) {
|
|
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,7 +14884,10 @@ 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 =
|
|
14887
|
+
const children = [
|
|
14888
|
+
...Array.from(elm.children),
|
|
14889
|
+
...Array.from(elm.shadowRoot ? elm.shadowRoot.children : [])
|
|
14890
|
+
];
|
|
14888
14891
|
for (let i = 0, ii = children.length; i < ii; i++) {
|
|
14889
14892
|
const childElm = children[i];
|
|
14890
14893
|
const tagName = childElm.nodeName.toLowerCase();
|
|
@@ -15279,7 +15282,7 @@ function renderToString(html, options, asStream) {
|
|
|
15279
15282
|
const opts = normalizeHydrateOptions(options);
|
|
15280
15283
|
opts.serializeToHtml = true;
|
|
15281
15284
|
opts.fullDocument = typeof opts.fullDocument === "boolean" ? opts.fullDocument : true;
|
|
15282
|
-
opts.serializeShadowRoot =
|
|
15285
|
+
opts.serializeShadowRoot = typeof opts.serializeShadowRoot === "boolean" ? opts.serializeShadowRoot : true;
|
|
15283
15286
|
opts.constrainTimeouts = false;
|
|
15284
15287
|
return hydrateDocument(html, opts, asStream);
|
|
15285
15288
|
}
|
package/internal/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stencil/core/internal",
|
|
3
|
-
"version": "4.19.2-dev.
|
|
3
|
+
"version": "4.19.2-dev.1720817033.ad4ba40",
|
|
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,7 +1690,6 @@ 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;
|
|
1694
1693
|
sourceMap?: boolean;
|
|
1695
1694
|
minify?: boolean;
|
|
1696
1695
|
docs?: boolean;
|
|
@@ -1011,10 +1011,21 @@ 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) {
|
|
1014
|
+
if ((import_app_data7.BUILD.hydrateServerSide || import_app_data7.BUILD.hotModuleReplacement) && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
|
|
1015
1015
|
styleElm.setAttribute(HYDRATED_STYLE_ID, scopeId2);
|
|
1016
1016
|
}
|
|
1017
|
-
|
|
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
|
+
}
|
|
1018
1029
|
}
|
|
1019
1030
|
if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
|
|
1020
1031
|
styleElm.innerHTML += SLOT_FB_CSS;
|
|
@@ -1039,7 +1050,7 @@ var attachStyles = (hostRef) => {
|
|
|
1039
1050
|
cmpMeta,
|
|
1040
1051
|
hostRef.$modeName$
|
|
1041
1052
|
);
|
|
1042
|
-
if ((import_app_data7.BUILD.shadowDom || import_app_data7.BUILD.scoped) && import_app_data7.BUILD.cssAnnotations && flags & 10 /* needsScopedEncapsulation */) {
|
|
1053
|
+
if ((import_app_data7.BUILD.shadowDom || import_app_data7.BUILD.scoped) && import_app_data7.BUILD.cssAnnotations && flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */) {
|
|
1043
1054
|
elm["s-sc"] = scopeId2;
|
|
1044
1055
|
elm.classList.add(scopeId2 + "-h");
|
|
1045
1056
|
if (import_app_data7.BUILD.scoped && flags & 2 /* scopedCssEncapsulation */) {
|
|
@@ -1049,7 +1060,6 @@ var attachStyles = (hostRef) => {
|
|
|
1049
1060
|
endAttachStyles();
|
|
1050
1061
|
};
|
|
1051
1062
|
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{");
|
|
1053
1063
|
|
|
1054
1064
|
// src/runtime/vdom/vdom-render.ts
|
|
1055
1065
|
var import_app_data10 = require("@stencil/core/internal/app-data");
|
|
@@ -1245,7 +1255,9 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
1245
1255
|
if (import_app_data10.BUILD.vdomAttribute) {
|
|
1246
1256
|
updateElement(null, newVNode2, isSvgMode);
|
|
1247
1257
|
}
|
|
1248
|
-
|
|
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) {
|
|
1249
1261
|
elm.classList.add(elm["s-si"] = scopeId);
|
|
1250
1262
|
}
|
|
1251
1263
|
if (import_app_data10.BUILD.scoped) {
|
|
@@ -2308,7 +2320,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
2308
2320
|
const endRegisterStyles = createTime("registerStyles", cmpMeta.$tagName$);
|
|
2309
2321
|
if (!import_app_data14.BUILD.hydrateServerSide && import_app_data14.BUILD.shadowDom && // TODO(STENCIL-854): Remove code related to legacy shadowDomShim field
|
|
2310
2322
|
import_app_data14.BUILD.shadowDomShim && cmpMeta.$flags$ & 8 /* needsShadowDomShim */) {
|
|
2311
|
-
style = await import("../client/shadow-css.js").then((m) => m.scopeCss(style, scopeId2
|
|
2323
|
+
style = await import("../client/shadow-css.js").then((m) => m.scopeCss(style, scopeId2));
|
|
2312
2324
|
}
|
|
2313
2325
|
registerStyle(scopeId2, style, !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */));
|
|
2314
2326
|
endRegisterStyles();
|
|
@@ -2877,10 +2889,8 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
2877
2889
|
const metaCharset = /* @__PURE__ */ head.querySelector("meta[charset]");
|
|
2878
2890
|
const dataStyles = /* @__PURE__ */ doc.createElement("style");
|
|
2879
2891
|
const deferredConnectedCallbacks = [];
|
|
2880
|
-
const styles2 = /* @__PURE__ */ doc.querySelectorAll(`[${HYDRATED_STYLE_ID}]`);
|
|
2881
2892
|
let appLoadFallback;
|
|
2882
2893
|
let isBootstrapping = true;
|
|
2883
|
-
let i2 = 0;
|
|
2884
2894
|
Object.assign(plt, options);
|
|
2885
2895
|
plt.$resourcesUrl$ = new URL(options.resourcesUrl || "./", doc.baseURI).href;
|
|
2886
2896
|
if (import_app_data19.BUILD.asyncQueue) {
|
|
@@ -2891,11 +2901,6 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
2891
2901
|
if (import_app_data19.BUILD.hydrateClientSide) {
|
|
2892
2902
|
plt.$flags$ |= 2 /* appLoaded */;
|
|
2893
2903
|
}
|
|
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
|
-
}
|
|
2899
2904
|
let hasSlotRelocation = false;
|
|
2900
2905
|
lazyBundles.map((lazyBundle) => {
|
|
2901
2906
|
lazyBundle[1].map((compactMeta) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stencil/core/internal/testing",
|
|
3
|
-
"version": "4.19.2-dev.
|
|
3
|
+
"version": "4.19.2-dev.1720817033.ad4ba40",
|
|
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
|
package/mock-doc/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
Stencil Mock Doc (CommonJS) v4.19.2-dev.
|
|
2
|
+
Stencil Mock Doc (CommonJS) v4.19.2-dev.1720817033.ad4ba40 | 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" ?
|
|
6290
|
+
serializeShadowRoot: typeof opts.serializeShadowRoot !== "boolean" ? true : 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 (
|
|
6416
|
+
if (shadowRoot != null && opts.serializeShadowRoot) {
|
|
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.
|
|
2
|
+
Stencil Mock Doc v4.19.2-dev.1720817033.ad4ba40 | 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" ?
|
|
6237
|
+
serializeShadowRoot: typeof opts.serializeShadowRoot !== "boolean" ? true : 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 (
|
|
6363
|
+
if (shadowRoot != null && opts.serializeShadowRoot) {
|
|
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);
|
package/mock-doc/package.json
CHANGED
package/package.json
CHANGED
package/screenshot/index.js
CHANGED
package/screenshot/package.json
CHANGED
package/sys/node/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
Stencil Node System v4.19.2-dev.
|
|
2
|
+
Stencil Node System v4.19.2-dev.1720817033.ad4ba40 | 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
|
package/sys/node/package.json
CHANGED
package/sys/node/worker.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
Stencil Node System Worker v4.19.2-dev.
|
|
2
|
+
Stencil Node System Worker v4.19.2-dev.1720817033.ad4ba40 | 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);
|