@stencil/core 4.35.3-dev.1752210255.bfbd683 → 4.35.3-dev.1752469555.051522f
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 +72 -27
- package/internal/client/package.json +1 -1
- package/internal/client/patch-browser.js +1 -1
- package/internal/hydrate/index.js +77 -29
- package/internal/hydrate/package.json +1 -1
- package/internal/hydrate/runner.js +1 -1
- package/internal/package.json +1 -1
- package/internal/testing/index.js +71 -26
- 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 +25 -25
- 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
|
@@ -1542,7 +1542,7 @@ var validateInputProperties = (inputElm) => {
|
|
|
1542
1542
|
|
|
1543
1543
|
// src/runtime/client-hydrate.ts
|
|
1544
1544
|
var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
|
|
1545
|
-
var _a, _b;
|
|
1545
|
+
var _a, _b, _c;
|
|
1546
1546
|
const endHydrate = createTime("hydrateClient", tagName);
|
|
1547
1547
|
const shadowRoot = hostElm.shadowRoot;
|
|
1548
1548
|
const childRenderNodes = [];
|
|
@@ -1606,15 +1606,17 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
|
|
|
1606
1606
|
if (childRenderNode.$tag$ === "slot") {
|
|
1607
1607
|
node["s-cr"] = hostElm["s-cr"];
|
|
1608
1608
|
}
|
|
1609
|
-
} else if (((_b = childRenderNode.$tag$) == null ? void 0 : _b.toString().includes("-")) && !childRenderNode.$elm$.shadowRoot) {
|
|
1609
|
+
} else if (((_b = childRenderNode.$tag$) == null ? void 0 : _b.toString().includes("-")) && childRenderNode.$tag$ !== "slot-fb" && !childRenderNode.$elm$.shadowRoot) {
|
|
1610
1610
|
const cmpMeta = getHostRef(childRenderNode.$elm$);
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1611
|
+
if (cmpMeta) {
|
|
1612
|
+
const scopeId3 = getScopeId(
|
|
1613
|
+
cmpMeta.$cmpMeta$,
|
|
1614
|
+
import_app_data7.BUILD.mode ? childRenderNode.$elm$.getAttribute("s-mode") : void 0
|
|
1615
|
+
);
|
|
1616
|
+
const styleSheet = win.document.querySelector(`style[sty-id="${scopeId3}"]`);
|
|
1617
|
+
if (styleSheet) {
|
|
1618
|
+
hostElm.shadowRoot.append(styleSheet.cloneNode(true));
|
|
1619
|
+
}
|
|
1618
1620
|
}
|
|
1619
1621
|
}
|
|
1620
1622
|
if (childRenderNode.$tag$ === "slot") {
|
|
@@ -1662,6 +1664,9 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
|
|
|
1662
1664
|
}
|
|
1663
1665
|
if (!hosts[slottedItem.hostId]) continue;
|
|
1664
1666
|
const hostEle = hosts[slottedItem.hostId];
|
|
1667
|
+
if (hostEle.shadowRoot && slottedItem.node.parentElement !== hostEle) {
|
|
1668
|
+
hostEle.appendChild(slottedItem.node);
|
|
1669
|
+
}
|
|
1665
1670
|
if (!hostEle.shadowRoot || !shadowRoot) {
|
|
1666
1671
|
if (!slottedItem.slot["s-cr"]) {
|
|
1667
1672
|
slottedItem.slot["s-cr"] = hostEle["s-cr"];
|
|
@@ -1672,13 +1677,13 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
|
|
|
1672
1677
|
}
|
|
1673
1678
|
}
|
|
1674
1679
|
addSlotRelocateNode(slottedItem.node, slottedItem.slot, false, slottedItem.node["s-oo"]);
|
|
1680
|
+
if (((_c = slottedItem.node.parentElement) == null ? void 0 : _c.shadowRoot) && slottedItem.node["getAttribute"] && slottedItem.node.getAttribute("slot")) {
|
|
1681
|
+
slottedItem.node.removeAttribute("slot");
|
|
1682
|
+
}
|
|
1675
1683
|
if (import_app_data7.BUILD.experimentalSlotFixes) {
|
|
1676
1684
|
patchSlottedNode(slottedItem.node);
|
|
1677
1685
|
}
|
|
1678
1686
|
}
|
|
1679
|
-
if (hostEle.shadowRoot && slottedItem.node.parentElement !== hostEle) {
|
|
1680
|
-
hostEle.appendChild(slottedItem.node);
|
|
1681
|
-
}
|
|
1682
1687
|
}
|
|
1683
1688
|
}
|
|
1684
1689
|
if (import_app_data7.BUILD.scoped && scopeId2 && slotNodes.length) {
|
|
@@ -1950,13 +1955,17 @@ function addSlot(slotName, slotId, childVNode, node, parentVNode, childRenderNod
|
|
|
1950
1955
|
parentVNode.$children$[childVNode.$index$] = childVNode;
|
|
1951
1956
|
}
|
|
1952
1957
|
var addSlottedNodes = (slottedNodes, slotNodeId, slotName, slotNode, hostId) => {
|
|
1958
|
+
var _a, _b;
|
|
1953
1959
|
let slottedNode = slotNode.nextSibling;
|
|
1954
1960
|
slottedNodes[slotNodeId] = slottedNodes[slotNodeId] || [];
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1961
|
+
if (!slottedNode || ((_a = slottedNode.nodeValue) == null ? void 0 : _a.startsWith(SLOT_NODE_ID + "."))) return;
|
|
1962
|
+
do {
|
|
1963
|
+
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 */))) {
|
|
1964
|
+
slottedNode["s-sn"] = slotName;
|
|
1965
|
+
slottedNodes[slotNodeId].push({ slot: slotNode, node: slottedNode, hostId });
|
|
1966
|
+
}
|
|
1967
|
+
slottedNode = slottedNode == null ? void 0 : slottedNode.nextSibling;
|
|
1968
|
+
} while (slottedNode && !((_b = slottedNode.nodeValue) == null ? void 0 : _b.startsWith(SLOT_NODE_ID + ".")));
|
|
1960
1969
|
};
|
|
1961
1970
|
var findCorrespondingNode = (node, type) => {
|
|
1962
1971
|
let sibling = node;
|
|
@@ -2378,7 +2387,10 @@ var scopeCss = (cssText, scopeId2, commentOriginalSelector) => {
|
|
|
2378
2387
|
// src/runtime/mode.ts
|
|
2379
2388
|
var computeMode = (elm) => modeResolutionChain.map((h2) => h2(elm)).find((m) => !!m);
|
|
2380
2389
|
var setMode = (handler) => modeResolutionChain.push(handler);
|
|
2381
|
-
var getMode = (ref) =>
|
|
2390
|
+
var getMode = (ref) => {
|
|
2391
|
+
var _a;
|
|
2392
|
+
return (_a = getHostRef(ref)) == null ? void 0 : _a.$modeName$;
|
|
2393
|
+
};
|
|
2382
2394
|
|
|
2383
2395
|
// src/runtime/proxy-component.ts
|
|
2384
2396
|
var import_app_data16 = require("@stencil/core/internal/app-data");
|
|
@@ -2427,7 +2439,10 @@ var import_app_data10 = require("@stencil/core/internal/app-data");
|
|
|
2427
2439
|
|
|
2428
2440
|
// src/runtime/element.ts
|
|
2429
2441
|
var import_app_data9 = require("@stencil/core/internal/app-data");
|
|
2430
|
-
var getElement = (ref) =>
|
|
2442
|
+
var getElement = (ref) => {
|
|
2443
|
+
var _a;
|
|
2444
|
+
return import_app_data9.BUILD.lazyLoad ? (_a = getHostRef(ref)) == null ? void 0 : _a.$hostElement$ : ref;
|
|
2445
|
+
};
|
|
2431
2446
|
|
|
2432
2447
|
// src/runtime/event-emitter.ts
|
|
2433
2448
|
var createEvent = (ref, name, flags) => {
|
|
@@ -3227,6 +3242,12 @@ var scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
|
3227
3242
|
}
|
|
3228
3243
|
attachToAncestor(hostRef, hostRef.$ancestorComponent$);
|
|
3229
3244
|
const dispatch = () => dispatchHooks(hostRef, isInitialLoad);
|
|
3245
|
+
if (isInitialLoad) {
|
|
3246
|
+
queueMicrotask(() => {
|
|
3247
|
+
dispatch();
|
|
3248
|
+
});
|
|
3249
|
+
return;
|
|
3250
|
+
}
|
|
3230
3251
|
return import_app_data14.BUILD.taskQueue ? writeTask(dispatch) : dispatch();
|
|
3231
3252
|
};
|
|
3232
3253
|
var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
@@ -3416,9 +3437,10 @@ var postUpdateComponent = (hostRef) => {
|
|
|
3416
3437
|
}
|
|
3417
3438
|
};
|
|
3418
3439
|
var forceUpdate = (ref) => {
|
|
3440
|
+
var _a;
|
|
3419
3441
|
if (import_app_data14.BUILD.updatable && (Build.isBrowser || Build.isTesting)) {
|
|
3420
3442
|
const hostRef = getHostRef(ref);
|
|
3421
|
-
const isConnected = hostRef.$hostElement
|
|
3443
|
+
const isConnected = (_a = hostRef == null ? void 0 : hostRef.$hostElement$) == null ? void 0 : _a.isConnected;
|
|
3422
3444
|
if (isConnected && (hostRef.$flags$ & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
|
|
3423
3445
|
scheduleUpdate(hostRef, false);
|
|
3424
3446
|
}
|
|
@@ -3483,6 +3505,9 @@ var serverSideConnected = (elm) => {
|
|
|
3483
3505
|
var getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
|
|
3484
3506
|
var setValue = (ref, propName, newVal, cmpMeta) => {
|
|
3485
3507
|
const hostRef = getHostRef(ref);
|
|
3508
|
+
if (!hostRef) {
|
|
3509
|
+
return;
|
|
3510
|
+
}
|
|
3486
3511
|
if (import_app_data15.BUILD.lazyLoad && !hostRef) {
|
|
3487
3512
|
throw new Error(
|
|
3488
3513
|
`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).`
|
|
@@ -3564,10 +3589,11 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
3564
3589
|
const originalFormAssociatedCallback = prototype[cbName];
|
|
3565
3590
|
Object.defineProperty(prototype, cbName, {
|
|
3566
3591
|
value(...args) {
|
|
3592
|
+
var _a2;
|
|
3567
3593
|
const hostRef = getHostRef(this);
|
|
3568
|
-
const instance = import_app_data16.BUILD.lazyLoad ? hostRef.$lazyInstance$ : this;
|
|
3594
|
+
const instance = import_app_data16.BUILD.lazyLoad ? hostRef == null ? void 0 : hostRef.$lazyInstance$ : this;
|
|
3569
3595
|
if (!instance) {
|
|
3570
|
-
hostRef.$onReadyPromise
|
|
3596
|
+
(_a2 = hostRef == null ? void 0 : hostRef.$onReadyPromise$) == null ? void 0 : _a2.then((asyncInstance) => {
|
|
3571
3597
|
const cb = asyncInstance[cbName];
|
|
3572
3598
|
typeof cb === "function" && cb.call(asyncInstance, ...args);
|
|
3573
3599
|
});
|
|
@@ -3612,6 +3638,9 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
3612
3638
|
Object.defineProperty(prototype, memberName, {
|
|
3613
3639
|
set(newValue) {
|
|
3614
3640
|
const ref = getHostRef(this);
|
|
3641
|
+
if (!ref) {
|
|
3642
|
+
return;
|
|
3643
|
+
}
|
|
3615
3644
|
if (import_app_data16.BUILD.isDev) {
|
|
3616
3645
|
if (
|
|
3617
3646
|
// we are proxying the instance (not element)
|
|
@@ -3709,7 +3738,7 @@ More information: https://stenciljs.com/docs/properties#prop-mutability`
|
|
|
3709
3738
|
} else if (propName == null) {
|
|
3710
3739
|
const hostRef = getHostRef(this);
|
|
3711
3740
|
const flags2 = hostRef == null ? void 0 : hostRef.$flags$;
|
|
3712
|
-
if (flags2 && !(flags2 & 8 /* isConstructingInstance */) && flags2 & 128 /* isWatchReady */ && newValue !== oldValue) {
|
|
3741
|
+
if (hostRef && flags2 && !(flags2 & 8 /* isConstructingInstance */) && flags2 & 128 /* isWatchReady */ && newValue !== oldValue) {
|
|
3713
3742
|
const elm = import_app_data16.BUILD.lazyLoad ? hostRef.$hostElement$ : this;
|
|
3714
3743
|
const instance = import_app_data16.BUILD.lazyLoad ? hostRef.$lazyInstance$ : elm;
|
|
3715
3744
|
const entry = (_a2 = cmpMeta.$watchers$) == null ? void 0 : _a2[attrName];
|
|
@@ -3843,6 +3872,9 @@ var fireConnectedCallback = (instance, elm) => {
|
|
|
3843
3872
|
var connectedCallback = (elm) => {
|
|
3844
3873
|
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
3845
3874
|
const hostRef = getHostRef(elm);
|
|
3875
|
+
if (!hostRef) {
|
|
3876
|
+
return;
|
|
3877
|
+
}
|
|
3846
3878
|
const cmpMeta = hostRef.$cmpMeta$;
|
|
3847
3879
|
const endConnected = createTime("connectedCallback", cmpMeta.$tagName$);
|
|
3848
3880
|
if (import_app_data18.BUILD.hostListenerTargetParent) {
|
|
@@ -3931,7 +3963,7 @@ var disconnectedCallback = async (elm) => {
|
|
|
3931
3963
|
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
3932
3964
|
const hostRef = getHostRef(elm);
|
|
3933
3965
|
if (import_app_data19.BUILD.hostListener) {
|
|
3934
|
-
if (hostRef.$rmListeners$) {
|
|
3966
|
+
if (hostRef == null ? void 0 : hostRef.$rmListeners$) {
|
|
3935
3967
|
hostRef.$rmListeners$.map((rmListener) => rmListener());
|
|
3936
3968
|
hostRef.$rmListeners$ = void 0;
|
|
3937
3969
|
}
|
|
@@ -4007,6 +4039,9 @@ var proxyCustomElement = (Cstr, compactMeta) => {
|
|
|
4007
4039
|
connectedCallback() {
|
|
4008
4040
|
if (!this.__hasHostListenerAttached) {
|
|
4009
4041
|
const hostRef = getHostRef(this);
|
|
4042
|
+
if (!hostRef) {
|
|
4043
|
+
return;
|
|
4044
|
+
}
|
|
4010
4045
|
addHostEventListeners(this, hostRef, cmpMeta.$listeners$, false);
|
|
4011
4046
|
this.__hasHostListenerAttached = true;
|
|
4012
4047
|
}
|
|
@@ -4044,7 +4079,7 @@ var forceModeUpdate = (elm) => {
|
|
|
4044
4079
|
if (import_app_data20.BUILD.style && import_app_data20.BUILD.mode && !import_app_data20.BUILD.lazyLoad) {
|
|
4045
4080
|
const mode = computeMode(elm);
|
|
4046
4081
|
const hostRef = getHostRef(elm);
|
|
4047
|
-
if (hostRef.$modeName$ !== mode) {
|
|
4082
|
+
if (hostRef && hostRef.$modeName$ !== mode) {
|
|
4048
4083
|
const cmpMeta = hostRef.$cmpMeta$;
|
|
4049
4084
|
const oldScopeId = elm["s-sc"];
|
|
4050
4085
|
const scopeId2 = getScopeId(cmpMeta, mode);
|
|
@@ -4069,6 +4104,9 @@ var import_app_data21 = require("@stencil/core/internal/app-data");
|
|
|
4069
4104
|
// src/runtime/hmr-component.ts
|
|
4070
4105
|
var hmrStart = (hostElement, cmpMeta, hmrVersionId) => {
|
|
4071
4106
|
const hostRef = getHostRef(hostElement);
|
|
4107
|
+
if (!hostRef) {
|
|
4108
|
+
return;
|
|
4109
|
+
}
|
|
4072
4110
|
hostRef.$flags$ = 1 /* hasConnected */;
|
|
4073
4111
|
initializeComponent(hostElement, hostRef, cmpMeta, hmrVersionId);
|
|
4074
4112
|
};
|
|
@@ -4161,6 +4199,9 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
4161
4199
|
}
|
|
4162
4200
|
connectedCallback() {
|
|
4163
4201
|
const hostRef = getHostRef(this);
|
|
4202
|
+
if (!hostRef) {
|
|
4203
|
+
return;
|
|
4204
|
+
}
|
|
4164
4205
|
if (!this.hasRegisteredEventListeners) {
|
|
4165
4206
|
this.hasRegisteredEventListeners = true;
|
|
4166
4207
|
addHostEventListeners(this, hostRef, cmpMeta.$listeners$, false);
|
|
@@ -4180,6 +4221,9 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
4180
4221
|
plt.raf(() => {
|
|
4181
4222
|
var _a3;
|
|
4182
4223
|
const hostRef = getHostRef(this);
|
|
4224
|
+
if (!hostRef) {
|
|
4225
|
+
return;
|
|
4226
|
+
}
|
|
4183
4227
|
const i2 = deferredConnectedCallbacks.findIndex((host) => host === this);
|
|
4184
4228
|
if (i2 > -1) {
|
|
4185
4229
|
deferredConnectedCallbacks.splice(i2, 1);
|
|
@@ -4190,7 +4234,8 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
4190
4234
|
});
|
|
4191
4235
|
}
|
|
4192
4236
|
componentOnReady() {
|
|
4193
|
-
|
|
4237
|
+
var _a3;
|
|
4238
|
+
return (_a3 = getHostRef(this)) == null ? void 0 : _a3.$onReadyPromise$;
|
|
4194
4239
|
}
|
|
4195
4240
|
};
|
|
4196
4241
|
if (import_app_data21.BUILD.experimentalSlotFixes) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stencil/core/internal/testing",
|
|
3
|
-
"version": "4.35.3-dev.
|
|
3
|
+
"version": "4.35.3-dev.1752469555.051522f",
|
|
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
package/mock-doc/index.js
CHANGED
package/mock-doc/package.json
CHANGED
package/package.json
CHANGED
package/screenshot/index.js
CHANGED
package/screenshot/package.json
CHANGED