@stencil/core 4.27.0 → 4.27.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +10 -10
- 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 +80 -53
- package/internal/client/package.json +1 -1
- package/internal/client/patch-browser.js +3 -3
- package/internal/hydrate/index.js +79 -53
- package/internal/hydrate/package.json +1 -1
- package/internal/hydrate/runner.js +105 -106
- package/internal/package.json +1 -1
- package/internal/testing/index.js +77 -52
- package/internal/testing/package.json +1 -1
- package/mock-doc/index.cjs +1 -1
- package/mock-doc/index.js +1 -1
- 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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Stencil Hydrate Platform v4.27.
|
|
2
|
+
Stencil Hydrate Platform v4.27.1 | MIT Licensed | https://stenciljs.com
|
|
3
3
|
*/
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
5
5
|
var __export = (target, all) => {
|
|
@@ -59,9 +59,9 @@ var isComplexType = (o) => {
|
|
|
59
59
|
};
|
|
60
60
|
|
|
61
61
|
// src/utils/query-nonce-meta-tag-content.ts
|
|
62
|
-
function queryNonceMetaTagContent(
|
|
62
|
+
function queryNonceMetaTagContent(doc) {
|
|
63
63
|
var _a, _b, _c;
|
|
64
|
-
return (_c = (_b = (_a =
|
|
64
|
+
return (_c = (_b = (_a = doc.head) == null ? void 0 : _a.querySelector('meta[name="csp-nonce"]')) == null ? void 0 : _b.getAttribute("content")) != null ? _c : void 0;
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
// src/utils/regular-expression.ts
|
|
@@ -916,8 +916,8 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
|
|
|
916
916
|
delete hostElm["s-sc"];
|
|
917
917
|
}
|
|
918
918
|
}
|
|
919
|
-
if (!plt.$orgLocNodes$ || !plt.$orgLocNodes$.size) {
|
|
920
|
-
initializeDocumentHydrate(
|
|
919
|
+
if (win.document && (!plt.$orgLocNodes$ || !plt.$orgLocNodes$.size)) {
|
|
920
|
+
initializeDocumentHydrate(win.document.body, plt.$orgLocNodes$ = /* @__PURE__ */ new Map());
|
|
921
921
|
}
|
|
922
922
|
hostElm[HYDRATE_ID] = hostId;
|
|
923
923
|
hostElm.removeAttribute(HYDRATE_ID);
|
|
@@ -1243,8 +1243,8 @@ function addSlot(slotName, slotId, childVNode, node, parentVNode, childRenderNod
|
|
|
1243
1243
|
childVNode.$name$ = slotName || null;
|
|
1244
1244
|
childVNode.$tag$ = "slot";
|
|
1245
1245
|
const parentNodeId = (parentVNode == null ? void 0 : parentVNode.$elm$) ? parentVNode.$elm$["s-id"] || parentVNode.$elm$.getAttribute("s-id") : "";
|
|
1246
|
-
if (BUILD6.shadowDom && shadowRootNodes) {
|
|
1247
|
-
const slot = childVNode.$elm$ =
|
|
1246
|
+
if (BUILD6.shadowDom && shadowRootNodes && win.document) {
|
|
1247
|
+
const slot = childVNode.$elm$ = win.document.createElement(childVNode.$tag$);
|
|
1248
1248
|
if (childVNode.$name$) {
|
|
1249
1249
|
childVNode.$elm$.setAttribute("name", slotName);
|
|
1250
1250
|
}
|
|
@@ -1727,10 +1727,10 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
1727
1727
|
var _a;
|
|
1728
1728
|
const scopeId2 = getScopeId(cmpMeta, mode);
|
|
1729
1729
|
const style = styles.get(scopeId2);
|
|
1730
|
-
if (!BUILD10.attachStyles) {
|
|
1730
|
+
if (!BUILD10.attachStyles || !win.document) {
|
|
1731
1731
|
return scopeId2;
|
|
1732
1732
|
}
|
|
1733
|
-
styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode :
|
|
1733
|
+
styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : win.document;
|
|
1734
1734
|
if (style) {
|
|
1735
1735
|
if (typeof style === "string") {
|
|
1736
1736
|
styleContainerNode = styleContainerNode.head || styleContainerNode;
|
|
@@ -1743,9 +1743,9 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
1743
1743
|
if (BUILD10.hydrateClientSide && styleContainerNode.host && (styleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`))) {
|
|
1744
1744
|
styleElm.innerHTML = style;
|
|
1745
1745
|
} else {
|
|
1746
|
-
styleElm = document.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`) ||
|
|
1746
|
+
styleElm = document.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`) || win.document.createElement("style");
|
|
1747
1747
|
styleElm.innerHTML = style;
|
|
1748
|
-
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(
|
|
1748
|
+
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
|
|
1749
1749
|
if (nonce != null) {
|
|
1750
1750
|
styleElm.setAttribute("nonce", nonce);
|
|
1751
1751
|
}
|
|
@@ -1813,7 +1813,10 @@ var attachStyles = (hostRef) => {
|
|
|
1813
1813
|
var getScopeId = (cmp, mode) => "sc-" + (BUILD10.mode && mode && cmp.$flags$ & 32 /* hasMode */ ? cmp.$tagName$ + "-" + mode : cmp.$tagName$);
|
|
1814
1814
|
var convertScopedToShadow = (css) => css.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g, "$1{");
|
|
1815
1815
|
var hydrateScopedToShadow = () => {
|
|
1816
|
-
|
|
1816
|
+
if (!win.document) {
|
|
1817
|
+
return;
|
|
1818
|
+
}
|
|
1819
|
+
const styles2 = win.document.querySelectorAll(`[${HYDRATED_STYLE_ID}]`);
|
|
1817
1820
|
let i2 = 0;
|
|
1818
1821
|
for (; i2 < styles2.length; i2++) {
|
|
1819
1822
|
registerStyle(styles2[i2].getAttribute(HYDRATED_STYLE_ID), convertScopedToShadow(styles2[i2].innerHTML), true);
|
|
@@ -2030,9 +2033,9 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
2030
2033
|
);
|
|
2031
2034
|
}
|
|
2032
2035
|
if (BUILD13.vdomText && newVNode2.$text$ !== null) {
|
|
2033
|
-
elm = newVNode2.$elm$ =
|
|
2036
|
+
elm = newVNode2.$elm$ = win.document.createTextNode(newVNode2.$text$);
|
|
2034
2037
|
} else if (BUILD13.slotRelocation && newVNode2.$flags$ & 1 /* isSlotReference */) {
|
|
2035
|
-
elm = newVNode2.$elm$ = BUILD13.isDebug || BUILD13.hydrateServerSide ? slotReferenceDebugNode(newVNode2) :
|
|
2038
|
+
elm = newVNode2.$elm$ = BUILD13.isDebug || BUILD13.hydrateServerSide ? slotReferenceDebugNode(newVNode2) : win.document.createTextNode("");
|
|
2036
2039
|
if (BUILD13.vdomAttribute) {
|
|
2037
2040
|
updateElement(null, newVNode2, isSvgMode);
|
|
2038
2041
|
}
|
|
@@ -2040,10 +2043,15 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
2040
2043
|
if (BUILD13.svg && !isSvgMode) {
|
|
2041
2044
|
isSvgMode = newVNode2.$tag$ === "svg";
|
|
2042
2045
|
}
|
|
2043
|
-
|
|
2046
|
+
if (!win.document) {
|
|
2047
|
+
throw new Error(
|
|
2048
|
+
"You are trying to render a Stencil component in an environment that doesn't support the DOM. Make sure to populate the [`window`](https://developer.mozilla.org/en-US/docs/Web/API/Window/window) object before rendering a component."
|
|
2049
|
+
);
|
|
2050
|
+
}
|
|
2051
|
+
elm = newVNode2.$elm$ = BUILD13.svg ? win.document.createElementNS(
|
|
2044
2052
|
isSvgMode ? SVG_NS : HTML_NS,
|
|
2045
2053
|
!useNativeShadowDom && BUILD13.slotRelocation && newVNode2.$flags$ & 2 /* isSlotFallback */ ? "slot-fb" : newVNode2.$tag$
|
|
2046
|
-
) :
|
|
2054
|
+
) : win.document.createElement(
|
|
2047
2055
|
!useNativeShadowDom && BUILD13.slotRelocation && newVNode2.$flags$ & 2 /* isSlotFallback */ ? "slot-fb" : newVNode2.$tag$
|
|
2048
2056
|
);
|
|
2049
2057
|
if (BUILD13.svg && isSvgMode && newVNode2.$tag$ === "foreignObject") {
|
|
@@ -2478,8 +2486,8 @@ render() {
|
|
|
2478
2486
|
markSlotContentForRelocation(rootVnode.$elm$);
|
|
2479
2487
|
for (const relocateData of relocateNodes) {
|
|
2480
2488
|
const nodeToRelocate = relocateData.$nodeToRelocate$;
|
|
2481
|
-
if (!nodeToRelocate["s-ol"]) {
|
|
2482
|
-
const orgLocationNode = BUILD13.isDebug || BUILD13.hydrateServerSide ? originalLocationDebugNode(nodeToRelocate) :
|
|
2489
|
+
if (!nodeToRelocate["s-ol"] && win.document) {
|
|
2490
|
+
const orgLocationNode = BUILD13.isDebug || BUILD13.hydrateServerSide ? originalLocationDebugNode(nodeToRelocate) : win.document.createTextNode("");
|
|
2483
2491
|
orgLocationNode["s-nr"] = nodeToRelocate;
|
|
2484
2492
|
insertBefore(nodeToRelocate.parentNode, nodeToRelocate["s-ol"] = orgLocationNode, nodeToRelocate);
|
|
2485
2493
|
}
|
|
@@ -2550,12 +2558,18 @@ render() {
|
|
|
2550
2558
|
}
|
|
2551
2559
|
contentRef = void 0;
|
|
2552
2560
|
};
|
|
2553
|
-
var slotReferenceDebugNode = (slotVNode) =>
|
|
2554
|
-
|
|
2555
|
-
)
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2561
|
+
var slotReferenceDebugNode = (slotVNode) => {
|
|
2562
|
+
var _a;
|
|
2563
|
+
return (_a = win.document) == null ? void 0 : _a.createComment(
|
|
2564
|
+
`<slot${slotVNode.$name$ ? ' name="' + slotVNode.$name$ + '"' : ""}> (host=${hostTagName.toLowerCase()})`
|
|
2565
|
+
);
|
|
2566
|
+
};
|
|
2567
|
+
var originalLocationDebugNode = (nodeToRelocate) => {
|
|
2568
|
+
var _a;
|
|
2569
|
+
return (_a = win.document) == null ? void 0 : _a.createComment(
|
|
2570
|
+
`org-location for ` + (nodeToRelocate.localName ? `<${nodeToRelocate.localName}> (host=${nodeToRelocate["s-hn"]})` : `[${nodeToRelocate.textContent}]`)
|
|
2571
|
+
);
|
|
2572
|
+
};
|
|
2559
2573
|
|
|
2560
2574
|
// src/runtime/update-component.ts
|
|
2561
2575
|
var attachToAncestor = (hostRef, ancestorComponent) => {
|
|
@@ -3234,7 +3248,10 @@ var connectedCallback = (elm) => {
|
|
|
3234
3248
|
}
|
|
3235
3249
|
};
|
|
3236
3250
|
var setContentReference = (elm) => {
|
|
3237
|
-
|
|
3251
|
+
if (!win.document) {
|
|
3252
|
+
return;
|
|
3253
|
+
}
|
|
3254
|
+
const contentRefElm = elm["s-cr"] = win.document.createComment(
|
|
3238
3255
|
BUILD18.isDebug ? `content-ref (host=${elm.localName})` : ""
|
|
3239
3256
|
);
|
|
3240
3257
|
contentRefElm["s-cn"] = true;
|
|
@@ -3408,18 +3425,22 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
3408
3425
|
performance.mark("st:app:start");
|
|
3409
3426
|
}
|
|
3410
3427
|
installDevTools();
|
|
3428
|
+
if (!win.document) {
|
|
3429
|
+
console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");
|
|
3430
|
+
return;
|
|
3431
|
+
}
|
|
3411
3432
|
const endBootstrap = createTime("bootstrapLazy");
|
|
3412
3433
|
const cmpTags = [];
|
|
3413
3434
|
const exclude = options.exclude || [];
|
|
3414
3435
|
const customElements2 = win.customElements;
|
|
3415
|
-
const head =
|
|
3436
|
+
const head = win.document.head;
|
|
3416
3437
|
const metaCharset = /* @__PURE__ */ head.querySelector("meta[charset]");
|
|
3417
|
-
const dataStyles = /* @__PURE__ */
|
|
3438
|
+
const dataStyles = /* @__PURE__ */ win.document.createElement("style");
|
|
3418
3439
|
const deferredConnectedCallbacks = [];
|
|
3419
3440
|
let appLoadFallback;
|
|
3420
3441
|
let isBootstrapping = true;
|
|
3421
3442
|
Object.assign(plt, options);
|
|
3422
|
-
plt.$resourcesUrl$ = new URL(options.resourcesUrl || "./",
|
|
3443
|
+
plt.$resourcesUrl$ = new URL(options.resourcesUrl || "./", win.document.baseURI).href;
|
|
3423
3444
|
if (BUILD21.asyncQueue) {
|
|
3424
3445
|
if (options.syncQueue) {
|
|
3425
3446
|
plt.$flags$ |= 4 /* queueSync */;
|
|
@@ -3569,7 +3590,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
3569
3590
|
}
|
|
3570
3591
|
if (dataStyles.innerHTML.length) {
|
|
3571
3592
|
dataStyles.setAttribute("data-styles", "");
|
|
3572
|
-
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(
|
|
3593
|
+
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
|
|
3573
3594
|
if (nonce != null) {
|
|
3574
3595
|
dataStyles.setAttribute("nonce", nonce);
|
|
3575
3596
|
}
|
|
@@ -3595,7 +3616,7 @@ var Fragment = (_, children) => children;
|
|
|
3595
3616
|
// src/runtime/host-listener.ts
|
|
3596
3617
|
import { BUILD as BUILD22 } from "@stencil/core/internal/app-data";
|
|
3597
3618
|
var addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
|
|
3598
|
-
if (BUILD22.hostListener && listeners) {
|
|
3619
|
+
if (BUILD22.hostListener && listeners && win.document) {
|
|
3599
3620
|
if (BUILD22.hostListenerTargetParent) {
|
|
3600
3621
|
if (attachParentListeners) {
|
|
3601
3622
|
listeners = listeners.filter(([flags]) => flags & 32 /* TargetParent */);
|
|
@@ -3604,7 +3625,7 @@ var addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) =>
|
|
|
3604
3625
|
}
|
|
3605
3626
|
}
|
|
3606
3627
|
listeners.map(([flags, name, method]) => {
|
|
3607
|
-
const target = BUILD22.hostListenerTarget ? getHostListenerTarget(elm, flags) : elm;
|
|
3628
|
+
const target = BUILD22.hostListenerTarget ? getHostListenerTarget(win.document, elm, flags) : elm;
|
|
3608
3629
|
const handler = hostListenerProxy(hostRef, method);
|
|
3609
3630
|
const opts = hostListenerOpts(flags);
|
|
3610
3631
|
plt.ael(target, name, handler, opts);
|
|
@@ -3628,12 +3649,19 @@ var hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
|
3628
3649
|
consoleError(e, hostRef.$hostElement$);
|
|
3629
3650
|
}
|
|
3630
3651
|
};
|
|
3631
|
-
var getHostListenerTarget = (elm, flags) => {
|
|
3632
|
-
if (BUILD22.hostListenerTargetDocument && flags & 4 /* TargetDocument */)
|
|
3633
|
-
|
|
3634
|
-
|
|
3635
|
-
if (BUILD22.
|
|
3652
|
+
var getHostListenerTarget = (doc, elm, flags) => {
|
|
3653
|
+
if (BUILD22.hostListenerTargetDocument && flags & 4 /* TargetDocument */) {
|
|
3654
|
+
return doc;
|
|
3655
|
+
}
|
|
3656
|
+
if (BUILD22.hostListenerTargetWindow && flags & 8 /* TargetWindow */) {
|
|
3657
|
+
return win;
|
|
3658
|
+
}
|
|
3659
|
+
if (BUILD22.hostListenerTargetBody && flags & 16 /* TargetBody */) {
|
|
3660
|
+
return doc.body;
|
|
3661
|
+
}
|
|
3662
|
+
if (BUILD22.hostListenerTargetParent && flags & 32 /* TargetParent */ && elm.parentElement) {
|
|
3636
3663
|
return elm.parentElement;
|
|
3664
|
+
}
|
|
3637
3665
|
return elm;
|
|
3638
3666
|
};
|
|
3639
3667
|
var hostListenerOpts = (flags) => supportsListenerOptions ? {
|
|
@@ -3645,12 +3673,12 @@ var hostListenerOpts = (flags) => supportsListenerOptions ? {
|
|
|
3645
3673
|
var setNonce = (nonce) => plt.$nonce$ = nonce;
|
|
3646
3674
|
|
|
3647
3675
|
// src/runtime/vdom/vdom-annotations.ts
|
|
3648
|
-
var insertVdomAnnotations = (
|
|
3649
|
-
if (
|
|
3650
|
-
const docData = STENCIL_DOC_DATA in
|
|
3676
|
+
var insertVdomAnnotations = (doc, staticComponents) => {
|
|
3677
|
+
if (doc != null) {
|
|
3678
|
+
const docData = STENCIL_DOC_DATA in doc ? doc[STENCIL_DOC_DATA] : { ...DEFAULT_DOC_DATA };
|
|
3651
3679
|
docData.staticComponents = new Set(staticComponents);
|
|
3652
3680
|
const orgLocationNodes = [];
|
|
3653
|
-
parseVNodeAnnotations(
|
|
3681
|
+
parseVNodeAnnotations(doc, doc.body, docData, orgLocationNodes);
|
|
3654
3682
|
orgLocationNodes.forEach((orgLocationNode) => {
|
|
3655
3683
|
var _a;
|
|
3656
3684
|
if (orgLocationNode != null && orgLocationNode["s-nr"]) {
|
|
@@ -3676,11 +3704,11 @@ var insertVdomAnnotations = (doc2, staticComponents) => {
|
|
|
3676
3704
|
return;
|
|
3677
3705
|
}
|
|
3678
3706
|
}
|
|
3679
|
-
const commentBeforeTextNode =
|
|
3707
|
+
const commentBeforeTextNode = doc.createComment(childId);
|
|
3680
3708
|
commentBeforeTextNode.nodeValue = `${TEXT_NODE_ID}.${childId}`;
|
|
3681
3709
|
insertBefore(nodeRef.parentNode, commentBeforeTextNode, nodeRef);
|
|
3682
3710
|
} else if (nodeRef.nodeType === 8 /* CommentNode */) {
|
|
3683
|
-
const commentBeforeTextNode =
|
|
3711
|
+
const commentBeforeTextNode = doc.createComment(childId);
|
|
3684
3712
|
commentBeforeTextNode.nodeValue = `${COMMENT_NODE_ID}.${childId}`;
|
|
3685
3713
|
nodeRef.parentNode.insertBefore(commentBeforeTextNode, nodeRef);
|
|
3686
3714
|
}
|
|
@@ -3699,7 +3727,7 @@ var insertVdomAnnotations = (doc2, staticComponents) => {
|
|
|
3699
3727
|
});
|
|
3700
3728
|
}
|
|
3701
3729
|
};
|
|
3702
|
-
var parseVNodeAnnotations = (
|
|
3730
|
+
var parseVNodeAnnotations = (doc, node, docData, orgLocationNodes) => {
|
|
3703
3731
|
var _a;
|
|
3704
3732
|
if (node == null) {
|
|
3705
3733
|
return;
|
|
@@ -3715,13 +3743,13 @@ var parseVNodeAnnotations = (doc2, node, docData, orgLocationNodes) => {
|
|
|
3715
3743
|
const cmpData = {
|
|
3716
3744
|
nodeIds: 0
|
|
3717
3745
|
};
|
|
3718
|
-
insertVNodeAnnotations(
|
|
3746
|
+
insertVNodeAnnotations(doc, childNode, hostRef.$vnode$, docData, cmpData);
|
|
3719
3747
|
}
|
|
3720
|
-
parseVNodeAnnotations(
|
|
3748
|
+
parseVNodeAnnotations(doc, childNode, docData, orgLocationNodes);
|
|
3721
3749
|
});
|
|
3722
3750
|
}
|
|
3723
3751
|
};
|
|
3724
|
-
var insertVNodeAnnotations = (
|
|
3752
|
+
var insertVNodeAnnotations = (doc, hostElm, vnode, docData, cmpData) => {
|
|
3725
3753
|
if (vnode != null) {
|
|
3726
3754
|
const hostId = ++docData.hostIds;
|
|
3727
3755
|
hostElm.setAttribute(HYDRATE_ID, hostId);
|
|
@@ -3731,7 +3759,7 @@ var insertVNodeAnnotations = (doc2, hostElm, vnode, docData, cmpData) => {
|
|
|
3731
3759
|
if (vnode.$children$ != null) {
|
|
3732
3760
|
const depth = 0;
|
|
3733
3761
|
vnode.$children$.forEach((vnodeChild, index) => {
|
|
3734
|
-
insertChildVNodeAnnotations(
|
|
3762
|
+
insertChildVNodeAnnotations(doc, vnodeChild, cmpData, hostId, depth, index);
|
|
3735
3763
|
});
|
|
3736
3764
|
}
|
|
3737
3765
|
if (hostElm && vnode && vnode.$elm$ && !hostElm.hasAttribute(HYDRATE_CHILD_ID)) {
|
|
@@ -3752,7 +3780,7 @@ var insertVNodeAnnotations = (doc2, hostElm, vnode, docData, cmpData) => {
|
|
|
3752
3780
|
}
|
|
3753
3781
|
}
|
|
3754
3782
|
};
|
|
3755
|
-
var insertChildVNodeAnnotations = (
|
|
3783
|
+
var insertChildVNodeAnnotations = (doc, vnodeChild, cmpData, hostId, depth, index) => {
|
|
3756
3784
|
const childElm = vnodeChild.$elm$;
|
|
3757
3785
|
if (childElm == null) {
|
|
3758
3786
|
return;
|
|
@@ -3771,7 +3799,7 @@ var insertChildVNodeAnnotations = (doc2, vnodeChild, cmpData, hostId, depth, ind
|
|
|
3771
3799
|
const nodeName = parentNode == null ? void 0 : parentNode.nodeName;
|
|
3772
3800
|
if (nodeName !== "STYLE" && nodeName !== "SCRIPT") {
|
|
3773
3801
|
const textNodeId = `${TEXT_NODE_ID}.${childId}`;
|
|
3774
|
-
const commentBeforeTextNode =
|
|
3802
|
+
const commentBeforeTextNode = doc.createComment(textNodeId);
|
|
3775
3803
|
insertBefore(parentNode, commentBeforeTextNode, childElm);
|
|
3776
3804
|
}
|
|
3777
3805
|
} else if (childElm.nodeType === 8 /* CommentNode */) {
|
|
@@ -3784,7 +3812,7 @@ var insertChildVNodeAnnotations = (doc2, vnodeChild, cmpData, hostId, depth, ind
|
|
|
3784
3812
|
if (vnodeChild.$children$ != null) {
|
|
3785
3813
|
const childDepth = depth + 1;
|
|
3786
3814
|
vnodeChild.$children$.forEach((vnode, index2) => {
|
|
3787
|
-
insertChildVNodeAnnotations(
|
|
3815
|
+
insertChildVNodeAnnotations(doc, vnode, cmpData, hostId, childDepth, index2);
|
|
3788
3816
|
});
|
|
3789
3817
|
}
|
|
3790
3818
|
};
|
|
@@ -4015,7 +4043,7 @@ function hydrateApp(win2, opts, results, afterHydrate, resolve) {
|
|
|
4015
4043
|
return elm;
|
|
4016
4044
|
};
|
|
4017
4045
|
tmrId = globalThis.setTimeout(timeoutExceeded, opts.timeout);
|
|
4018
|
-
plt.$resourcesUrl$ = new URL(opts.resourcesUrl || "./",
|
|
4046
|
+
plt.$resourcesUrl$ = new URL(opts.resourcesUrl || "./", win2.document.baseURI).href;
|
|
4019
4047
|
globalScripts();
|
|
4020
4048
|
patchChild2(win2.document.body);
|
|
4021
4049
|
waitLoop2().then(hydratedComplete).catch(hydratedError);
|
|
@@ -4229,7 +4257,6 @@ var registerComponents = (Cstrs) => {
|
|
|
4229
4257
|
}
|
|
4230
4258
|
};
|
|
4231
4259
|
var win = window;
|
|
4232
|
-
var doc = win.document;
|
|
4233
4260
|
var readTask = (cb) => {
|
|
4234
4261
|
nextTick(() => {
|
|
4235
4262
|
try {
|
|
@@ -4333,7 +4360,6 @@ export {
|
|
|
4333
4360
|
createEvent,
|
|
4334
4361
|
defineCustomElement,
|
|
4335
4362
|
disconnectedCallback,
|
|
4336
|
-
doc,
|
|
4337
4363
|
forceModeUpdate,
|
|
4338
4364
|
forceUpdate,
|
|
4339
4365
|
getAssetPath,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stencil/core/internal/hydrate",
|
|
3
|
-
"version": "4.27.
|
|
3
|
+
"version": "4.27.1",
|
|
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
|