@stencil/core 4.35.3 → 4.36.0
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 +4 -4
- 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/app-globals/package.json +1 -1
- package/internal/client/index.js +100 -38
- package/internal/client/package.json +1 -1
- package/internal/client/patch-browser.js +1 -1
- package/internal/hydrate/index.js +105 -40
- package/internal/hydrate/package.json +1 -1
- package/internal/hydrate/runner.js +8 -1
- package/internal/package.json +1 -1
- package/internal/testing/index.js +100 -37
- package/internal/testing/package.json +1 -1
- package/mock-doc/index.cjs +8 -1
- package/mock-doc/index.js +8 -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 +8 -8
- package/sys/node/package.json +1 -1
- package/sys/node/worker.js +1 -1
- package/testing/index.js +2 -1
- package/testing/package.json +1 -1
package/internal/client/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Stencil Client Platform v4.
|
|
2
|
+
Stencil Client Platform v4.36.0 | MIT Licensed | https://stenciljs.com
|
|
3
3
|
*/
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
5
5
|
var __export = (target, all) => {
|
|
@@ -248,6 +248,7 @@ var supportsConstructableStylesheets = BUILD6.constructableCSS ? /* @__PURE__ */
|
|
|
248
248
|
}
|
|
249
249
|
return false;
|
|
250
250
|
})() : false;
|
|
251
|
+
var supportsMutableAdoptedStyleSheets = supportsConstructableStylesheets ? /* @__PURE__ */ (() => !!win.document && Object.getOwnPropertyDescriptor(win.document.adoptedStyleSheets, "length").writable)() : false;
|
|
251
252
|
|
|
252
253
|
// src/client/client-task-queue.ts
|
|
253
254
|
var queueCongestion = 0;
|
|
@@ -525,7 +526,13 @@ function createShadowRoot(cmpMeta) {
|
|
|
525
526
|
delegatesFocus: !!(cmpMeta.$flags$ & 16 /* shadowDelegatesFocus */)
|
|
526
527
|
}) : this.attachShadow({ mode: "open" });
|
|
527
528
|
if (globalStyleSheet === void 0) globalStyleSheet = (_a = createStyleSheetIfNeededAndSupported(globalStyles)) != null ? _a : null;
|
|
528
|
-
if (globalStyleSheet)
|
|
529
|
+
if (globalStyleSheet) {
|
|
530
|
+
if (supportsMutableAdoptedStyleSheets) {
|
|
531
|
+
shadowRoot.adoptedStyleSheets.push(globalStyleSheet);
|
|
532
|
+
} else {
|
|
533
|
+
shadowRoot.adoptedStyleSheets = [...shadowRoot.adoptedStyleSheets, globalStyleSheet];
|
|
534
|
+
}
|
|
535
|
+
}
|
|
529
536
|
}
|
|
530
537
|
|
|
531
538
|
// src/utils/util.ts
|
|
@@ -1045,6 +1052,9 @@ var validNodesPatches = [
|
|
|
1045
1052
|
"parentNode"
|
|
1046
1053
|
];
|
|
1047
1054
|
function patchHostOriginalAccessor(accessorName, node) {
|
|
1055
|
+
if (!globalThis.Node || !globalThis.Element) {
|
|
1056
|
+
return;
|
|
1057
|
+
}
|
|
1048
1058
|
let accessor;
|
|
1049
1059
|
if (validElementPatches.includes(accessorName)) {
|
|
1050
1060
|
accessor = Object.getOwnPropertyDescriptor(Element.prototype, accessorName);
|
|
@@ -1211,7 +1221,11 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
1211
1221
|
if (supportsConstructableStylesheets) {
|
|
1212
1222
|
const stylesheet = new CSSStyleSheet();
|
|
1213
1223
|
stylesheet.replaceSync(style);
|
|
1214
|
-
|
|
1224
|
+
if (supportsMutableAdoptedStyleSheets) {
|
|
1225
|
+
styleContainerNode.adoptedStyleSheets.unshift(stylesheet);
|
|
1226
|
+
} else {
|
|
1227
|
+
styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
|
|
1228
|
+
}
|
|
1215
1229
|
} else {
|
|
1216
1230
|
const existingStyleContainer = styleContainerNode.querySelector("style");
|
|
1217
1231
|
if (existingStyleContainer) {
|
|
@@ -1236,7 +1250,11 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
1236
1250
|
}
|
|
1237
1251
|
}
|
|
1238
1252
|
} else if (BUILD12.constructableCSS && !styleContainerNode.adoptedStyleSheets.includes(style)) {
|
|
1239
|
-
|
|
1253
|
+
if (supportsMutableAdoptedStyleSheets) {
|
|
1254
|
+
styleContainerNode.adoptedStyleSheets.push(style);
|
|
1255
|
+
} else {
|
|
1256
|
+
styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
|
|
1257
|
+
}
|
|
1240
1258
|
}
|
|
1241
1259
|
}
|
|
1242
1260
|
return scopeId2;
|
|
@@ -1412,7 +1430,7 @@ var validateInputProperties = (inputElm) => {
|
|
|
1412
1430
|
|
|
1413
1431
|
// src/runtime/client-hydrate.ts
|
|
1414
1432
|
var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
|
|
1415
|
-
var _a, _b;
|
|
1433
|
+
var _a, _b, _c;
|
|
1416
1434
|
const endHydrate = createTime("hydrateClient", tagName);
|
|
1417
1435
|
const shadowRoot = hostElm.shadowRoot;
|
|
1418
1436
|
const childRenderNodes = [];
|
|
@@ -1476,15 +1494,17 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
|
|
|
1476
1494
|
if (childRenderNode.$tag$ === "slot") {
|
|
1477
1495
|
node["s-cr"] = hostElm["s-cr"];
|
|
1478
1496
|
}
|
|
1479
|
-
} else if (((_b = childRenderNode.$tag$) == null ? void 0 : _b.toString().includes("-")) && !childRenderNode.$elm$.shadowRoot) {
|
|
1497
|
+
} else if (((_b = childRenderNode.$tag$) == null ? void 0 : _b.toString().includes("-")) && childRenderNode.$tag$ !== "slot-fb" && !childRenderNode.$elm$.shadowRoot) {
|
|
1480
1498
|
const cmpMeta = getHostRef(childRenderNode.$elm$);
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1499
|
+
if (cmpMeta) {
|
|
1500
|
+
const scopeId3 = getScopeId(
|
|
1501
|
+
cmpMeta.$cmpMeta$,
|
|
1502
|
+
BUILD14.mode ? childRenderNode.$elm$.getAttribute("s-mode") : void 0
|
|
1503
|
+
);
|
|
1504
|
+
const styleSheet = win.document.querySelector(`style[sty-id="${scopeId3}"]`);
|
|
1505
|
+
if (styleSheet) {
|
|
1506
|
+
hostElm.shadowRoot.append(styleSheet.cloneNode(true));
|
|
1507
|
+
}
|
|
1488
1508
|
}
|
|
1489
1509
|
}
|
|
1490
1510
|
if (childRenderNode.$tag$ === "slot") {
|
|
@@ -1532,6 +1552,9 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
|
|
|
1532
1552
|
}
|
|
1533
1553
|
if (!hosts[slottedItem.hostId]) continue;
|
|
1534
1554
|
const hostEle = hosts[slottedItem.hostId];
|
|
1555
|
+
if (hostEle.shadowRoot && slottedItem.node.parentElement !== hostEle) {
|
|
1556
|
+
hostEle.appendChild(slottedItem.node);
|
|
1557
|
+
}
|
|
1535
1558
|
if (!hostEle.shadowRoot || !shadowRoot) {
|
|
1536
1559
|
if (!slottedItem.slot["s-cr"]) {
|
|
1537
1560
|
slottedItem.slot["s-cr"] = hostEle["s-cr"];
|
|
@@ -1542,13 +1565,13 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
|
|
|
1542
1565
|
}
|
|
1543
1566
|
}
|
|
1544
1567
|
addSlotRelocateNode(slottedItem.node, slottedItem.slot, false, slottedItem.node["s-oo"]);
|
|
1568
|
+
if (((_c = slottedItem.node.parentElement) == null ? void 0 : _c.shadowRoot) && slottedItem.node["getAttribute"] && slottedItem.node.getAttribute("slot")) {
|
|
1569
|
+
slottedItem.node.removeAttribute("slot");
|
|
1570
|
+
}
|
|
1545
1571
|
if (BUILD14.experimentalSlotFixes) {
|
|
1546
1572
|
patchSlottedNode(slottedItem.node);
|
|
1547
1573
|
}
|
|
1548
1574
|
}
|
|
1549
|
-
if (hostEle.shadowRoot && slottedItem.node.parentElement !== hostEle) {
|
|
1550
|
-
hostEle.appendChild(slottedItem.node);
|
|
1551
|
-
}
|
|
1552
1575
|
}
|
|
1553
1576
|
}
|
|
1554
1577
|
if (BUILD14.scoped && scopeId2 && slotNodes.length) {
|
|
@@ -1561,7 +1584,10 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
|
|
|
1561
1584
|
const rnLen = shadowRootNodes.length;
|
|
1562
1585
|
if (rnLen) {
|
|
1563
1586
|
for (rnIdex; rnIdex < rnLen; rnIdex++) {
|
|
1564
|
-
|
|
1587
|
+
const node = shadowRootNodes[rnIdex];
|
|
1588
|
+
if (node) {
|
|
1589
|
+
shadowRoot.appendChild(node);
|
|
1590
|
+
}
|
|
1565
1591
|
}
|
|
1566
1592
|
Array.from(hostElm.childNodes).forEach((node) => {
|
|
1567
1593
|
if (typeof node["s-en"] !== "string" && typeof node["s-sn"] !== "string") {
|
|
@@ -1820,13 +1846,17 @@ function addSlot(slotName, slotId, childVNode, node, parentVNode, childRenderNod
|
|
|
1820
1846
|
parentVNode.$children$[childVNode.$index$] = childVNode;
|
|
1821
1847
|
}
|
|
1822
1848
|
var addSlottedNodes = (slottedNodes, slotNodeId, slotName, slotNode, hostId) => {
|
|
1849
|
+
var _a, _b;
|
|
1823
1850
|
let slottedNode = slotNode.nextSibling;
|
|
1824
1851
|
slottedNodes[slotNodeId] = slottedNodes[slotNodeId] || [];
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1852
|
+
if (!slottedNode || ((_a = slottedNode.nodeValue) == null ? void 0 : _a.startsWith(SLOT_NODE_ID + "."))) return;
|
|
1853
|
+
do {
|
|
1854
|
+
if (slottedNode && ((slottedNode["getAttribute"] && slottedNode.getAttribute("slot") || slottedNode["s-sn"]) === slotName || slotName === "" && !slottedNode["s-sn"] && (!slottedNode["getAttribute"] || !slottedNode.getAttribute("slot")) && (slottedNode.nodeType === 8 /* CommentNode */ || slottedNode.nodeType === 3 /* TextNode */))) {
|
|
1855
|
+
slottedNode["s-sn"] = slotName;
|
|
1856
|
+
slottedNodes[slotNodeId].push({ slot: slotNode, node: slottedNode, hostId });
|
|
1857
|
+
}
|
|
1858
|
+
slottedNode = slottedNode == null ? void 0 : slottedNode.nextSibling;
|
|
1859
|
+
} while (slottedNode && !((_b = slottedNode.nodeValue) == null ? void 0 : _b.startsWith(SLOT_NODE_ID + ".")));
|
|
1830
1860
|
};
|
|
1831
1861
|
var findCorrespondingNode = (node, type) => {
|
|
1832
1862
|
let sibling = node;
|
|
@@ -2248,7 +2278,10 @@ var scopeCss = (cssText, scopeId2, commentOriginalSelector) => {
|
|
|
2248
2278
|
// src/runtime/mode.ts
|
|
2249
2279
|
var computeMode = (elm) => modeResolutionChain.map((h2) => h2(elm)).find((m) => !!m);
|
|
2250
2280
|
var setMode = (handler) => modeResolutionChain.push(handler);
|
|
2251
|
-
var getMode = (ref) =>
|
|
2281
|
+
var getMode = (ref) => {
|
|
2282
|
+
var _a;
|
|
2283
|
+
return (_a = getHostRef(ref)) == null ? void 0 : _a.$modeName$;
|
|
2284
|
+
};
|
|
2252
2285
|
|
|
2253
2286
|
// src/runtime/proxy-component.ts
|
|
2254
2287
|
import { BUILD as BUILD23 } from "@stencil/core/internal/app-data";
|
|
@@ -2297,7 +2330,10 @@ import { BUILD as BUILD17 } from "@stencil/core/internal/app-data";
|
|
|
2297
2330
|
|
|
2298
2331
|
// src/runtime/element.ts
|
|
2299
2332
|
import { BUILD as BUILD16 } from "@stencil/core/internal/app-data";
|
|
2300
|
-
var getElement = (ref) =>
|
|
2333
|
+
var getElement = (ref) => {
|
|
2334
|
+
var _a;
|
|
2335
|
+
return BUILD16.lazyLoad ? (_a = getHostRef(ref)) == null ? void 0 : _a.$hostElement$ : ref;
|
|
2336
|
+
};
|
|
2301
2337
|
|
|
2302
2338
|
// src/runtime/event-emitter.ts
|
|
2303
2339
|
var createEvent = (ref, name, flags) => {
|
|
@@ -3097,6 +3133,12 @@ var scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
|
3097
3133
|
}
|
|
3098
3134
|
attachToAncestor(hostRef, hostRef.$ancestorComponent$);
|
|
3099
3135
|
const dispatch = () => dispatchHooks(hostRef, isInitialLoad);
|
|
3136
|
+
if (isInitialLoad) {
|
|
3137
|
+
queueMicrotask(() => {
|
|
3138
|
+
dispatch();
|
|
3139
|
+
});
|
|
3140
|
+
return;
|
|
3141
|
+
}
|
|
3100
3142
|
return BUILD21.taskQueue ? writeTask(dispatch) : dispatch();
|
|
3101
3143
|
};
|
|
3102
3144
|
var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
@@ -3286,9 +3328,10 @@ var postUpdateComponent = (hostRef) => {
|
|
|
3286
3328
|
}
|
|
3287
3329
|
};
|
|
3288
3330
|
var forceUpdate = (ref) => {
|
|
3331
|
+
var _a;
|
|
3289
3332
|
if (BUILD21.updatable && (Build.isBrowser || Build.isTesting)) {
|
|
3290
3333
|
const hostRef = getHostRef(ref);
|
|
3291
|
-
const isConnected = hostRef.$hostElement
|
|
3334
|
+
const isConnected = (_a = hostRef == null ? void 0 : hostRef.$hostElement$) == null ? void 0 : _a.isConnected;
|
|
3292
3335
|
if (isConnected && (hostRef.$flags$ & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
|
|
3293
3336
|
scheduleUpdate(hostRef, false);
|
|
3294
3337
|
}
|
|
@@ -3353,6 +3396,9 @@ var serverSideConnected = (elm) => {
|
|
|
3353
3396
|
var getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
|
|
3354
3397
|
var setValue = (ref, propName, newVal, cmpMeta) => {
|
|
3355
3398
|
const hostRef = getHostRef(ref);
|
|
3399
|
+
if (!hostRef) {
|
|
3400
|
+
return;
|
|
3401
|
+
}
|
|
3356
3402
|
if (BUILD22.lazyLoad && !hostRef) {
|
|
3357
3403
|
throw new Error(
|
|
3358
3404
|
`Couldn't find host element for "${cmpMeta.$tagName$}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/stenciljs/core/issues/5457).`
|
|
@@ -3434,10 +3480,11 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
3434
3480
|
const originalFormAssociatedCallback = prototype[cbName];
|
|
3435
3481
|
Object.defineProperty(prototype, cbName, {
|
|
3436
3482
|
value(...args) {
|
|
3483
|
+
var _a2;
|
|
3437
3484
|
const hostRef = getHostRef(this);
|
|
3438
|
-
const instance = BUILD23.lazyLoad ? hostRef.$lazyInstance$ : this;
|
|
3485
|
+
const instance = BUILD23.lazyLoad ? hostRef == null ? void 0 : hostRef.$lazyInstance$ : this;
|
|
3439
3486
|
if (!instance) {
|
|
3440
|
-
hostRef.$onReadyPromise
|
|
3487
|
+
(_a2 = hostRef == null ? void 0 : hostRef.$onReadyPromise$) == null ? void 0 : _a2.then((asyncInstance) => {
|
|
3441
3488
|
const cb = asyncInstance[cbName];
|
|
3442
3489
|
typeof cb === "function" && cb.call(asyncInstance, ...args);
|
|
3443
3490
|
});
|
|
@@ -3482,6 +3529,9 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
3482
3529
|
Object.defineProperty(prototype, memberName, {
|
|
3483
3530
|
set(newValue) {
|
|
3484
3531
|
const ref = getHostRef(this);
|
|
3532
|
+
if (!ref) {
|
|
3533
|
+
return;
|
|
3534
|
+
}
|
|
3485
3535
|
if (BUILD23.isDev) {
|
|
3486
3536
|
if (
|
|
3487
3537
|
// we are proxying the instance (not element)
|
|
@@ -3579,7 +3629,7 @@ More information: https://stenciljs.com/docs/properties#prop-mutability`
|
|
|
3579
3629
|
} else if (propName == null) {
|
|
3580
3630
|
const hostRef = getHostRef(this);
|
|
3581
3631
|
const flags2 = hostRef == null ? void 0 : hostRef.$flags$;
|
|
3582
|
-
if (flags2 && !(flags2 & 8 /* isConstructingInstance */) && flags2 & 128 /* isWatchReady */ && newValue !== oldValue) {
|
|
3632
|
+
if (hostRef && flags2 && !(flags2 & 8 /* isConstructingInstance */) && flags2 & 128 /* isWatchReady */ && newValue !== oldValue) {
|
|
3583
3633
|
const elm = BUILD23.lazyLoad ? hostRef.$hostElement$ : this;
|
|
3584
3634
|
const instance = BUILD23.lazyLoad ? hostRef.$lazyInstance$ : elm;
|
|
3585
3635
|
const entry = (_a2 = cmpMeta.$watchers$) == null ? void 0 : _a2[attrName];
|
|
@@ -3713,6 +3763,9 @@ var fireConnectedCallback = (instance, elm) => {
|
|
|
3713
3763
|
var connectedCallback = (elm) => {
|
|
3714
3764
|
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
3715
3765
|
const hostRef = getHostRef(elm);
|
|
3766
|
+
if (!hostRef) {
|
|
3767
|
+
return;
|
|
3768
|
+
}
|
|
3716
3769
|
const cmpMeta = hostRef.$cmpMeta$;
|
|
3717
3770
|
const endConnected = createTime("connectedCallback", cmpMeta.$tagName$);
|
|
3718
3771
|
if (BUILD25.hostListenerTargetParent) {
|
|
@@ -3738,11 +3791,6 @@ var connectedCallback = (elm) => {
|
|
|
3738
3791
|
if (BUILD25.hydrateServerSide || (BUILD25.slot || BUILD25.shadowDom) && // TODO(STENCIL-854): Remove code related to legacy shadowDomShim field
|
|
3739
3792
|
cmpMeta.$flags$ & (4 /* hasSlotRelocation */ | 8 /* needsShadowDomShim */)) {
|
|
3740
3793
|
setContentReference(elm);
|
|
3741
|
-
} else if (BUILD25.hydrateClientSide && !(cmpMeta.$flags$ & 4 /* hasSlotRelocation */)) {
|
|
3742
|
-
const commendPlaceholder = elm.firstChild;
|
|
3743
|
-
if ((commendPlaceholder == null ? void 0 : commendPlaceholder.nodeType) === 8 /* CommentNode */ && !commendPlaceholder["s-cn"] && !commendPlaceholder.nodeValue) {
|
|
3744
|
-
elm.removeChild(commendPlaceholder);
|
|
3745
|
-
}
|
|
3746
3794
|
}
|
|
3747
3795
|
}
|
|
3748
3796
|
if (BUILD25.asyncLoading) {
|
|
@@ -3801,7 +3849,7 @@ var disconnectedCallback = async (elm) => {
|
|
|
3801
3849
|
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
3802
3850
|
const hostRef = getHostRef(elm);
|
|
3803
3851
|
if (BUILD26.hostListener) {
|
|
3804
|
-
if (hostRef.$rmListeners$) {
|
|
3852
|
+
if (hostRef == null ? void 0 : hostRef.$rmListeners$) {
|
|
3805
3853
|
hostRef.$rmListeners$.map((rmListener) => rmListener());
|
|
3806
3854
|
hostRef.$rmListeners$ = void 0;
|
|
3807
3855
|
}
|
|
@@ -3847,7 +3895,7 @@ var proxyCustomElement = (Cstr, compactMeta) => {
|
|
|
3847
3895
|
cmpMeta.$flags$ |= 8 /* needsShadowDomShim */;
|
|
3848
3896
|
}
|
|
3849
3897
|
if (BUILD27.experimentalSlotFixes) {
|
|
3850
|
-
if (
|
|
3898
|
+
if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
|
|
3851
3899
|
patchPseudoShadowDom(Cstr.prototype);
|
|
3852
3900
|
}
|
|
3853
3901
|
} else {
|
|
@@ -3877,6 +3925,9 @@ var proxyCustomElement = (Cstr, compactMeta) => {
|
|
|
3877
3925
|
connectedCallback() {
|
|
3878
3926
|
if (!this.__hasHostListenerAttached) {
|
|
3879
3927
|
const hostRef = getHostRef(this);
|
|
3928
|
+
if (!hostRef) {
|
|
3929
|
+
return;
|
|
3930
|
+
}
|
|
3880
3931
|
addHostEventListeners(this, hostRef, cmpMeta.$listeners$, false);
|
|
3881
3932
|
this.__hasHostListenerAttached = true;
|
|
3882
3933
|
}
|
|
@@ -3914,7 +3965,7 @@ var forceModeUpdate = (elm) => {
|
|
|
3914
3965
|
if (BUILD27.style && BUILD27.mode && !BUILD27.lazyLoad) {
|
|
3915
3966
|
const mode = computeMode(elm);
|
|
3916
3967
|
const hostRef = getHostRef(elm);
|
|
3917
|
-
if (hostRef.$modeName$ !== mode) {
|
|
3968
|
+
if (hostRef && hostRef.$modeName$ !== mode) {
|
|
3918
3969
|
const cmpMeta = hostRef.$cmpMeta$;
|
|
3919
3970
|
const oldScopeId = elm["s-sc"];
|
|
3920
3971
|
const scopeId2 = getScopeId(cmpMeta, mode);
|
|
@@ -3939,6 +3990,9 @@ import { BUILD as BUILD28 } from "@stencil/core/internal/app-data";
|
|
|
3939
3990
|
// src/runtime/hmr-component.ts
|
|
3940
3991
|
var hmrStart = (hostElement, cmpMeta, hmrVersionId) => {
|
|
3941
3992
|
const hostRef = getHostRef(hostElement);
|
|
3993
|
+
if (!hostRef) {
|
|
3994
|
+
return;
|
|
3995
|
+
}
|
|
3942
3996
|
hostRef.$flags$ = 1 /* hasConnected */;
|
|
3943
3997
|
initializeComponent(hostElement, hostRef, cmpMeta, hmrVersionId);
|
|
3944
3998
|
};
|
|
@@ -4031,6 +4085,9 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
4031
4085
|
}
|
|
4032
4086
|
connectedCallback() {
|
|
4033
4087
|
const hostRef = getHostRef(this);
|
|
4088
|
+
if (!hostRef) {
|
|
4089
|
+
return;
|
|
4090
|
+
}
|
|
4034
4091
|
if (!this.hasRegisteredEventListeners) {
|
|
4035
4092
|
this.hasRegisteredEventListeners = true;
|
|
4036
4093
|
addHostEventListeners(this, hostRef, cmpMeta.$listeners$, false);
|
|
@@ -4050,6 +4107,9 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
4050
4107
|
plt.raf(() => {
|
|
4051
4108
|
var _a3;
|
|
4052
4109
|
const hostRef = getHostRef(this);
|
|
4110
|
+
if (!hostRef) {
|
|
4111
|
+
return;
|
|
4112
|
+
}
|
|
4053
4113
|
const i2 = deferredConnectedCallbacks.findIndex((host) => host === this);
|
|
4054
4114
|
if (i2 > -1) {
|
|
4055
4115
|
deferredConnectedCallbacks.splice(i2, 1);
|
|
@@ -4060,11 +4120,12 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
4060
4120
|
});
|
|
4061
4121
|
}
|
|
4062
4122
|
componentOnReady() {
|
|
4063
|
-
|
|
4123
|
+
var _a3;
|
|
4124
|
+
return (_a3 = getHostRef(this)) == null ? void 0 : _a3.$onReadyPromise$;
|
|
4064
4125
|
}
|
|
4065
4126
|
};
|
|
4066
4127
|
if (BUILD28.experimentalSlotFixes) {
|
|
4067
|
-
if (
|
|
4128
|
+
if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
|
|
4068
4129
|
patchPseudoShadowDom(HostElement.prototype);
|
|
4069
4130
|
}
|
|
4070
4131
|
} else {
|
|
@@ -4410,6 +4471,7 @@ export {
|
|
|
4410
4471
|
styles,
|
|
4411
4472
|
supportsConstructableStylesheets,
|
|
4412
4473
|
supportsListenerOptions,
|
|
4474
|
+
supportsMutableAdoptedStyleSheets,
|
|
4413
4475
|
supportsShadow,
|
|
4414
4476
|
win,
|
|
4415
4477
|
writeTask
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stencil/core/internal/client",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.36.0",
|
|
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",
|