@stencil/core 4.40.1-dev.1766985084.e893bd1 → 4.40.1-dev.1767157662.9e38aa7
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 +5 -5
- 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 +48 -23
- package/internal/client/package.json +1 -1
- package/internal/client/patch-browser.js +1 -1
- package/internal/hydrate/index.js +48 -23
- package/internal/hydrate/package.json +1 -1
- package/internal/hydrate/runner.js +1 -1
- package/internal/package.json +1 -1
- package/internal/stencil-private.d.ts +4 -0
- package/internal/testing/index.js +47 -22
- 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 +28 -28
- 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.40.1-dev.
|
|
2
|
+
Stencil Hydrate Platform v4.40.1-dev.1767157662.9e38aa7 | MIT Licensed | https://stenciljs.com
|
|
3
3
|
*/
|
|
4
4
|
var __create = Object.create;
|
|
5
5
|
var __defProp = Object.defineProperty;
|
|
@@ -4015,11 +4015,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
4015
4015
|
patchSlotNode(elm);
|
|
4016
4016
|
oldVNode = oldParentVNode && oldParentVNode.$children$ && oldParentVNode.$children$[childIndex];
|
|
4017
4017
|
if (oldVNode && oldVNode.$tag$ === newVNode2.$tag$ && oldParentVNode.$elm$) {
|
|
4018
|
-
|
|
4019
|
-
relocateToHostRoot(oldParentVNode.$elm$);
|
|
4020
|
-
} else {
|
|
4021
|
-
putBackInOriginalLocation(oldParentVNode.$elm$, false);
|
|
4022
|
-
}
|
|
4018
|
+
relocateToHostRoot(oldParentVNode.$elm$);
|
|
4023
4019
|
}
|
|
4024
4020
|
if (BUILD14.scoped || BUILD14.hydrateServerSide && 128 /* shadowNeedsScopedCss */) {
|
|
4025
4021
|
addRemoveSlotScopedClass(contentRef, elm, newParentVNode.$elm$, oldParentVNode == null ? void 0 : oldParentVNode.$elm$);
|
|
@@ -4051,7 +4047,7 @@ var relocateToHostRoot = (parentElm) => {
|
|
|
4051
4047
|
var putBackInOriginalLocation = (parentElm, recursive) => {
|
|
4052
4048
|
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
4053
4049
|
const oldSlotChildNodes = Array.from(parentElm.__childNodes || parentElm.childNodes);
|
|
4054
|
-
if (parentElm["s-sr"]
|
|
4050
|
+
if (parentElm["s-sr"]) {
|
|
4055
4051
|
let node = parentElm;
|
|
4056
4052
|
while (node = node.nextSibling) {
|
|
4057
4053
|
if (node && node["s-sn"] === parentElm["s-sn"] && node["s-sh"] === hostTagName) {
|
|
@@ -4239,7 +4235,7 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
4239
4235
|
}
|
|
4240
4236
|
if (BUILD14.vdomAttribute || BUILD14.reflect) {
|
|
4241
4237
|
if (BUILD14.slot && tag === "slot" && !useNativeShadowDom) {
|
|
4242
|
-
if (
|
|
4238
|
+
if (oldVNode.$name$ !== newVNode2.$name$) {
|
|
4243
4239
|
newVNode2.$elm$["s-sn"] = newVNode2.$name$ || "";
|
|
4244
4240
|
relocateToHostRoot(newVNode2.$elm$.parentElement);
|
|
4245
4241
|
}
|
|
@@ -4282,7 +4278,7 @@ var markSlotContentForRelocation = (elm) => {
|
|
|
4282
4278
|
const slotName = childNode["s-sn"];
|
|
4283
4279
|
for (j = hostContentNodes.length - 1; j >= 0; j--) {
|
|
4284
4280
|
node = hostContentNodes[j];
|
|
4285
|
-
if (!node["s-cn"] && !node["s-nr"] && node["s-hn"] !== childNode["s-hn"] && (!
|
|
4281
|
+
if (!node["s-cn"] && !node["s-nr"] && node["s-hn"] !== childNode["s-hn"] && (!node["s-sh"] || node["s-sh"] !== childNode["s-hn"])) {
|
|
4286
4282
|
if (isNodeLocatedInSlot(node, slotName)) {
|
|
4287
4283
|
let relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
|
|
4288
4284
|
checkSlotFallbackVisibility = true;
|
|
@@ -4326,19 +4322,19 @@ var nullifyVNodeRefs = (vNode) => {
|
|
|
4326
4322
|
vNode.$children$ && vNode.$children$.map(nullifyVNodeRefs);
|
|
4327
4323
|
}
|
|
4328
4324
|
};
|
|
4329
|
-
var insertBefore = (parent, newNode, reference) => {
|
|
4325
|
+
var insertBefore = (parent, newNode, reference, isInitialLoad) => {
|
|
4330
4326
|
if (BUILD14.scoped && typeof newNode["s-sn"] === "string" && !!newNode["s-sr"] && !!newNode["s-cr"]) {
|
|
4331
4327
|
addRemoveSlotScopedClass(newNode["s-cr"], newNode, parent, newNode.parentElement);
|
|
4332
|
-
} else if (
|
|
4333
|
-
if (parent.getRootNode().nodeType !== 11 /* DOCUMENT_FRAGMENT_NODE */) {
|
|
4328
|
+
} else if (typeof newNode["s-sn"] === "string") {
|
|
4329
|
+
if (BUILD14.experimentalSlotFixes && parent.getRootNode().nodeType !== 11 /* DOCUMENT_FRAGMENT_NODE */) {
|
|
4334
4330
|
patchParentNode(newNode);
|
|
4335
4331
|
}
|
|
4336
4332
|
parent.insertBefore(newNode, reference);
|
|
4337
4333
|
const { slotNode } = findSlotFromSlottedNode(newNode);
|
|
4338
|
-
if (slotNode) dispatchSlotChangeEvent(slotNode);
|
|
4334
|
+
if (slotNode && !isInitialLoad) dispatchSlotChangeEvent(slotNode);
|
|
4339
4335
|
return newNode;
|
|
4340
4336
|
}
|
|
4341
|
-
if (
|
|
4337
|
+
if (parent.__insertBefore) {
|
|
4342
4338
|
return parent.__insertBefore(newNode, reference);
|
|
4343
4339
|
} else {
|
|
4344
4340
|
return parent == null ? void 0 : parent.insertBefore(newNode, reference);
|
|
@@ -4426,7 +4422,12 @@ render() {
|
|
|
4426
4422
|
if (!nodeToRelocate["s-ol"] && win.document) {
|
|
4427
4423
|
const orgLocationNode = BUILD14.isDebug || BUILD14.hydrateServerSide ? originalLocationDebugNode(nodeToRelocate) : win.document.createTextNode("");
|
|
4428
4424
|
orgLocationNode["s-nr"] = nodeToRelocate;
|
|
4429
|
-
insertBefore(
|
|
4425
|
+
insertBefore(
|
|
4426
|
+
nodeToRelocate.parentNode,
|
|
4427
|
+
nodeToRelocate["s-ol"] = orgLocationNode,
|
|
4428
|
+
nodeToRelocate,
|
|
4429
|
+
isInitialLoad
|
|
4430
|
+
);
|
|
4430
4431
|
}
|
|
4431
4432
|
}
|
|
4432
4433
|
for (const relocateData of relocateNodes) {
|
|
@@ -4438,7 +4439,7 @@ render() {
|
|
|
4438
4439
|
if (slotRefNode) {
|
|
4439
4440
|
const parentNodeRef = slotRefNode.parentNode;
|
|
4440
4441
|
let insertBeforeNode = slotRefNode.nextSibling;
|
|
4441
|
-
if (!BUILD14.hydrateServerSide &&
|
|
4442
|
+
if (!BUILD14.hydrateServerSide && insertBeforeNode && insertBeforeNode.nodeType === 1 /* ElementNode */) {
|
|
4442
4443
|
let orgLocationNode = (_b = nodeToRelocate["s-ol"]) == null ? void 0 : _b.previousSibling;
|
|
4443
4444
|
while (orgLocationNode) {
|
|
4444
4445
|
let refNode = (_c = orgLocationNode["s-nr"]) != null ? _c : null;
|
|
@@ -4459,10 +4460,18 @@ render() {
|
|
|
4459
4460
|
const nextSibling = nodeToRelocate.__nextSibling || nodeToRelocate.nextSibling;
|
|
4460
4461
|
if (!insertBeforeNode && parentNodeRef !== parent || nextSibling !== insertBeforeNode) {
|
|
4461
4462
|
if (nodeToRelocate !== insertBeforeNode) {
|
|
4462
|
-
|
|
4463
|
-
|
|
4463
|
+
insertBefore(parentNodeRef, nodeToRelocate, insertBeforeNode, isInitialLoad);
|
|
4464
|
+
if (nodeToRelocate.nodeType === 8 /* CommentNode */ && nodeToRelocate.nodeValue.startsWith("s-nt-")) {
|
|
4465
|
+
const textNode = win.document.createTextNode(nodeToRelocate.nodeValue.replace(/^s-nt-/, ""));
|
|
4466
|
+
textNode["s-hn"] = nodeToRelocate["s-hn"];
|
|
4467
|
+
textNode["s-sn"] = nodeToRelocate["s-sn"];
|
|
4468
|
+
textNode["s-sh"] = nodeToRelocate["s-sh"];
|
|
4469
|
+
textNode["s-sr"] = nodeToRelocate["s-sr"];
|
|
4470
|
+
textNode["s-ol"] = nodeToRelocate["s-ol"];
|
|
4471
|
+
textNode["s-ol"]["s-nr"] = textNode;
|
|
4472
|
+
insertBefore(nodeToRelocate.parentNode, textNode, nodeToRelocate, isInitialLoad);
|
|
4473
|
+
nodeToRelocate.parentNode.removeChild(nodeToRelocate);
|
|
4464
4474
|
}
|
|
4465
|
-
insertBefore(parentNodeRef, nodeToRelocate, insertBeforeNode);
|
|
4466
4475
|
if (nodeToRelocate.nodeType === 1 /* ElementNode */ && nodeToRelocate.tagName !== "SLOT-FB") {
|
|
4467
4476
|
nodeToRelocate.hidden = (_d = nodeToRelocate["s-ih"]) != null ? _d : false;
|
|
4468
4477
|
}
|
|
@@ -4480,14 +4489,21 @@ render() {
|
|
|
4480
4489
|
plt.$flags$ &= ~1 /* isTmpDisconnected */;
|
|
4481
4490
|
relocateNodes.length = 0;
|
|
4482
4491
|
}
|
|
4483
|
-
if (BUILD14.
|
|
4492
|
+
if (BUILD14.slotRelocation && !useNativeShadowDom && !(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) && hostElm["s-cr"]) {
|
|
4484
4493
|
const children = rootVnode.$elm$.__childNodes || rootVnode.$elm$.childNodes;
|
|
4485
4494
|
for (const childNode of children) {
|
|
4486
|
-
if (childNode["s-hn"] !== hostTagName && !childNode["s-sh"]
|
|
4495
|
+
if (childNode["s-hn"] !== hostTagName && !childNode["s-sh"]) {
|
|
4487
4496
|
if (isInitialLoad && childNode["s-ih"] == null) {
|
|
4488
4497
|
childNode["s-ih"] = (_e = childNode.hidden) != null ? _e : false;
|
|
4489
4498
|
}
|
|
4490
|
-
childNode.
|
|
4499
|
+
if (childNode.nodeType === 1 /* ElementNode */) {
|
|
4500
|
+
childNode.hidden = true;
|
|
4501
|
+
} else if (childNode.nodeType === 3 /* TextNode */ && !!childNode.nodeValue.trim()) {
|
|
4502
|
+
const textCommentNode = win.document.createComment("s-nt-" + childNode.nodeValue);
|
|
4503
|
+
textCommentNode["s-sn"] = childNode["s-sn"];
|
|
4504
|
+
insertBefore(childNode.parentNode, textCommentNode, childNode, isInitialLoad);
|
|
4505
|
+
childNode.parentNode.removeChild(childNode);
|
|
4506
|
+
}
|
|
4491
4507
|
}
|
|
4492
4508
|
}
|
|
4493
4509
|
}
|
|
@@ -4549,6 +4565,10 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
4549
4565
|
let maybePromise;
|
|
4550
4566
|
if (isInitialLoad) {
|
|
4551
4567
|
if (BUILD15.lazyLoad) {
|
|
4568
|
+
if (BUILD15.slotRelocation && hostRef.$deferredConnectedCallback$) {
|
|
4569
|
+
hostRef.$deferredConnectedCallback$ = false;
|
|
4570
|
+
safeCall(instance, "connectedCallback", void 0, elm);
|
|
4571
|
+
}
|
|
4552
4572
|
if (BUILD15.hostListener) {
|
|
4553
4573
|
hostRef.$flags$ |= 256 /* isListenReady */;
|
|
4554
4574
|
if (hostRef.$queuedListeners$) {
|
|
@@ -5172,7 +5192,12 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
5172
5192
|
hostRef.$flags$ |= 128 /* isWatchReady */;
|
|
5173
5193
|
}
|
|
5174
5194
|
endNewInstance();
|
|
5175
|
-
|
|
5195
|
+
const needsDeferredCallback = BUILD18.slotRelocation && cmpMeta.$flags$ & 4 /* hasSlotRelocation */;
|
|
5196
|
+
if (!needsDeferredCallback) {
|
|
5197
|
+
fireConnectedCallback(hostRef.$lazyInstance$, elm);
|
|
5198
|
+
} else {
|
|
5199
|
+
hostRef.$deferredConnectedCallback$ = true;
|
|
5200
|
+
}
|
|
5176
5201
|
} else {
|
|
5177
5202
|
Cstr = elm.constructor;
|
|
5178
5203
|
const cmpTag = elm.localName;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stencil/core/internal/hydrate",
|
|
3
|
-
"version": "4.40.1-dev.
|
|
3
|
+
"version": "4.40.1-dev.1767157662.9e38aa7",
|
|
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.40.1-dev.
|
|
2
|
+
Stencil Hydrate Runner v4.40.1-dev.1767157662.9e38aa7 | MIT Licensed | https://stenciljs.com
|
|
3
3
|
*/
|
|
4
4
|
var __create = Object.create;
|
|
5
5
|
var __defProp = Object.defineProperty;
|
package/internal/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stencil/core/internal",
|
|
3
|
-
"version": "4.40.1-dev.
|
|
3
|
+
"version": "4.40.1-dev.1767157662.9e38aa7",
|
|
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",
|
|
@@ -1582,6 +1582,10 @@ export interface HostRef {
|
|
|
1582
1582
|
$rmListeners$?: (() => void)[];
|
|
1583
1583
|
$modeName$?: string;
|
|
1584
1584
|
$renderCount$?: number;
|
|
1585
|
+
/**
|
|
1586
|
+
* Defer connectedCallback until after first render for components with slot relocation.
|
|
1587
|
+
*/
|
|
1588
|
+
$deferredConnectedCallback$?: boolean;
|
|
1585
1589
|
}
|
|
1586
1590
|
export interface PlatformRuntime {
|
|
1587
1591
|
/**
|
|
@@ -4376,11 +4376,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
4376
4376
|
patchSlotNode(elm);
|
|
4377
4377
|
oldVNode = oldParentVNode && oldParentVNode.$children$ && oldParentVNode.$children$[childIndex];
|
|
4378
4378
|
if (oldVNode && oldVNode.$tag$ === newVNode2.$tag$ && oldParentVNode.$elm$) {
|
|
4379
|
-
|
|
4380
|
-
relocateToHostRoot(oldParentVNode.$elm$);
|
|
4381
|
-
} else {
|
|
4382
|
-
putBackInOriginalLocation(oldParentVNode.$elm$, false);
|
|
4383
|
-
}
|
|
4379
|
+
relocateToHostRoot(oldParentVNode.$elm$);
|
|
4384
4380
|
}
|
|
4385
4381
|
if (import_app_data13.BUILD.scoped || import_app_data13.BUILD.hydrateServerSide && 128 /* shadowNeedsScopedCss */) {
|
|
4386
4382
|
addRemoveSlotScopedClass(contentRef, elm, newParentVNode.$elm$, oldParentVNode == null ? void 0 : oldParentVNode.$elm$);
|
|
@@ -4412,7 +4408,7 @@ var relocateToHostRoot = (parentElm) => {
|
|
|
4412
4408
|
var putBackInOriginalLocation = (parentElm, recursive) => {
|
|
4413
4409
|
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
4414
4410
|
const oldSlotChildNodes = Array.from(parentElm.__childNodes || parentElm.childNodes);
|
|
4415
|
-
if (parentElm["s-sr"]
|
|
4411
|
+
if (parentElm["s-sr"]) {
|
|
4416
4412
|
let node = parentElm;
|
|
4417
4413
|
while (node = node.nextSibling) {
|
|
4418
4414
|
if (node && node["s-sn"] === parentElm["s-sn"] && node["s-sh"] === hostTagName) {
|
|
@@ -4600,7 +4596,7 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
4600
4596
|
}
|
|
4601
4597
|
if (import_app_data13.BUILD.vdomAttribute || import_app_data13.BUILD.reflect) {
|
|
4602
4598
|
if (import_app_data13.BUILD.slot && tag === "slot" && !useNativeShadowDom) {
|
|
4603
|
-
if (
|
|
4599
|
+
if (oldVNode.$name$ !== newVNode2.$name$) {
|
|
4604
4600
|
newVNode2.$elm$["s-sn"] = newVNode2.$name$ || "";
|
|
4605
4601
|
relocateToHostRoot(newVNode2.$elm$.parentElement);
|
|
4606
4602
|
}
|
|
@@ -4643,7 +4639,7 @@ var markSlotContentForRelocation = (elm) => {
|
|
|
4643
4639
|
const slotName = childNode["s-sn"];
|
|
4644
4640
|
for (j = hostContentNodes.length - 1; j >= 0; j--) {
|
|
4645
4641
|
node = hostContentNodes[j];
|
|
4646
|
-
if (!node["s-cn"] && !node["s-nr"] && node["s-hn"] !== childNode["s-hn"] && (!
|
|
4642
|
+
if (!node["s-cn"] && !node["s-nr"] && node["s-hn"] !== childNode["s-hn"] && (!node["s-sh"] || node["s-sh"] !== childNode["s-hn"])) {
|
|
4647
4643
|
if (isNodeLocatedInSlot(node, slotName)) {
|
|
4648
4644
|
let relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
|
|
4649
4645
|
checkSlotFallbackVisibility = true;
|
|
@@ -4687,19 +4683,19 @@ var nullifyVNodeRefs = (vNode) => {
|
|
|
4687
4683
|
vNode.$children$ && vNode.$children$.map(nullifyVNodeRefs);
|
|
4688
4684
|
}
|
|
4689
4685
|
};
|
|
4690
|
-
var insertBefore = (parent, newNode, reference) => {
|
|
4686
|
+
var insertBefore = (parent, newNode, reference, isInitialLoad) => {
|
|
4691
4687
|
if (import_app_data13.BUILD.scoped && typeof newNode["s-sn"] === "string" && !!newNode["s-sr"] && !!newNode["s-cr"]) {
|
|
4692
4688
|
addRemoveSlotScopedClass(newNode["s-cr"], newNode, parent, newNode.parentElement);
|
|
4693
|
-
} else if (
|
|
4694
|
-
if (parent.getRootNode().nodeType !== 11 /* DOCUMENT_FRAGMENT_NODE */) {
|
|
4689
|
+
} else if (typeof newNode["s-sn"] === "string") {
|
|
4690
|
+
if (import_app_data13.BUILD.experimentalSlotFixes && parent.getRootNode().nodeType !== 11 /* DOCUMENT_FRAGMENT_NODE */) {
|
|
4695
4691
|
patchParentNode(newNode);
|
|
4696
4692
|
}
|
|
4697
4693
|
parent.insertBefore(newNode, reference);
|
|
4698
4694
|
const { slotNode } = findSlotFromSlottedNode(newNode);
|
|
4699
|
-
if (slotNode) dispatchSlotChangeEvent(slotNode);
|
|
4695
|
+
if (slotNode && !isInitialLoad) dispatchSlotChangeEvent(slotNode);
|
|
4700
4696
|
return newNode;
|
|
4701
4697
|
}
|
|
4702
|
-
if (
|
|
4698
|
+
if (parent.__insertBefore) {
|
|
4703
4699
|
return parent.__insertBefore(newNode, reference);
|
|
4704
4700
|
} else {
|
|
4705
4701
|
return parent == null ? void 0 : parent.insertBefore(newNode, reference);
|
|
@@ -4787,7 +4783,12 @@ render() {
|
|
|
4787
4783
|
if (!nodeToRelocate["s-ol"] && win.document) {
|
|
4788
4784
|
const orgLocationNode = import_app_data13.BUILD.isDebug || import_app_data13.BUILD.hydrateServerSide ? originalLocationDebugNode(nodeToRelocate) : win.document.createTextNode("");
|
|
4789
4785
|
orgLocationNode["s-nr"] = nodeToRelocate;
|
|
4790
|
-
insertBefore(
|
|
4786
|
+
insertBefore(
|
|
4787
|
+
nodeToRelocate.parentNode,
|
|
4788
|
+
nodeToRelocate["s-ol"] = orgLocationNode,
|
|
4789
|
+
nodeToRelocate,
|
|
4790
|
+
isInitialLoad
|
|
4791
|
+
);
|
|
4791
4792
|
}
|
|
4792
4793
|
}
|
|
4793
4794
|
for (const relocateData of relocateNodes) {
|
|
@@ -4799,7 +4800,7 @@ render() {
|
|
|
4799
4800
|
if (slotRefNode) {
|
|
4800
4801
|
const parentNodeRef = slotRefNode.parentNode;
|
|
4801
4802
|
let insertBeforeNode = slotRefNode.nextSibling;
|
|
4802
|
-
if (!import_app_data13.BUILD.hydrateServerSide &&
|
|
4803
|
+
if (!import_app_data13.BUILD.hydrateServerSide && insertBeforeNode && insertBeforeNode.nodeType === 1 /* ElementNode */) {
|
|
4803
4804
|
let orgLocationNode = (_b = nodeToRelocate["s-ol"]) == null ? void 0 : _b.previousSibling;
|
|
4804
4805
|
while (orgLocationNode) {
|
|
4805
4806
|
let refNode = (_c = orgLocationNode["s-nr"]) != null ? _c : null;
|
|
@@ -4820,10 +4821,18 @@ render() {
|
|
|
4820
4821
|
const nextSibling = nodeToRelocate.__nextSibling || nodeToRelocate.nextSibling;
|
|
4821
4822
|
if (!insertBeforeNode && parentNodeRef !== parent || nextSibling !== insertBeforeNode) {
|
|
4822
4823
|
if (nodeToRelocate !== insertBeforeNode) {
|
|
4823
|
-
|
|
4824
|
-
|
|
4824
|
+
insertBefore(parentNodeRef, nodeToRelocate, insertBeforeNode, isInitialLoad);
|
|
4825
|
+
if (nodeToRelocate.nodeType === 8 /* CommentNode */ && nodeToRelocate.nodeValue.startsWith("s-nt-")) {
|
|
4826
|
+
const textNode = win.document.createTextNode(nodeToRelocate.nodeValue.replace(/^s-nt-/, ""));
|
|
4827
|
+
textNode["s-hn"] = nodeToRelocate["s-hn"];
|
|
4828
|
+
textNode["s-sn"] = nodeToRelocate["s-sn"];
|
|
4829
|
+
textNode["s-sh"] = nodeToRelocate["s-sh"];
|
|
4830
|
+
textNode["s-sr"] = nodeToRelocate["s-sr"];
|
|
4831
|
+
textNode["s-ol"] = nodeToRelocate["s-ol"];
|
|
4832
|
+
textNode["s-ol"]["s-nr"] = textNode;
|
|
4833
|
+
insertBefore(nodeToRelocate.parentNode, textNode, nodeToRelocate, isInitialLoad);
|
|
4834
|
+
nodeToRelocate.parentNode.removeChild(nodeToRelocate);
|
|
4825
4835
|
}
|
|
4826
|
-
insertBefore(parentNodeRef, nodeToRelocate, insertBeforeNode);
|
|
4827
4836
|
if (nodeToRelocate.nodeType === 1 /* ElementNode */ && nodeToRelocate.tagName !== "SLOT-FB") {
|
|
4828
4837
|
nodeToRelocate.hidden = (_d = nodeToRelocate["s-ih"]) != null ? _d : false;
|
|
4829
4838
|
}
|
|
@@ -4841,14 +4850,21 @@ render() {
|
|
|
4841
4850
|
plt.$flags$ &= ~1 /* isTmpDisconnected */;
|
|
4842
4851
|
relocateNodes.length = 0;
|
|
4843
4852
|
}
|
|
4844
|
-
if (import_app_data13.BUILD.
|
|
4853
|
+
if (import_app_data13.BUILD.slotRelocation && !useNativeShadowDom && !(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) && hostElm["s-cr"]) {
|
|
4845
4854
|
const children = rootVnode.$elm$.__childNodes || rootVnode.$elm$.childNodes;
|
|
4846
4855
|
for (const childNode of children) {
|
|
4847
|
-
if (childNode["s-hn"] !== hostTagName && !childNode["s-sh"]
|
|
4856
|
+
if (childNode["s-hn"] !== hostTagName && !childNode["s-sh"]) {
|
|
4848
4857
|
if (isInitialLoad && childNode["s-ih"] == null) {
|
|
4849
4858
|
childNode["s-ih"] = (_e = childNode.hidden) != null ? _e : false;
|
|
4850
4859
|
}
|
|
4851
|
-
childNode.
|
|
4860
|
+
if (childNode.nodeType === 1 /* ElementNode */) {
|
|
4861
|
+
childNode.hidden = true;
|
|
4862
|
+
} else if (childNode.nodeType === 3 /* TextNode */ && !!childNode.nodeValue.trim()) {
|
|
4863
|
+
const textCommentNode = win.document.createComment("s-nt-" + childNode.nodeValue);
|
|
4864
|
+
textCommentNode["s-sn"] = childNode["s-sn"];
|
|
4865
|
+
insertBefore(childNode.parentNode, textCommentNode, childNode, isInitialLoad);
|
|
4866
|
+
childNode.parentNode.removeChild(childNode);
|
|
4867
|
+
}
|
|
4852
4868
|
}
|
|
4853
4869
|
}
|
|
4854
4870
|
}
|
|
@@ -4910,6 +4926,10 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
4910
4926
|
let maybePromise;
|
|
4911
4927
|
if (isInitialLoad) {
|
|
4912
4928
|
if (import_app_data14.BUILD.lazyLoad) {
|
|
4929
|
+
if (import_app_data14.BUILD.slotRelocation && hostRef.$deferredConnectedCallback$) {
|
|
4930
|
+
hostRef.$deferredConnectedCallback$ = false;
|
|
4931
|
+
safeCall(instance, "connectedCallback", void 0, elm);
|
|
4932
|
+
}
|
|
4913
4933
|
if (import_app_data14.BUILD.hostListener) {
|
|
4914
4934
|
hostRef.$flags$ |= 256 /* isListenReady */;
|
|
4915
4935
|
if (hostRef.$queuedListeners$) {
|
|
@@ -5533,7 +5553,12 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
5533
5553
|
hostRef.$flags$ |= 128 /* isWatchReady */;
|
|
5534
5554
|
}
|
|
5535
5555
|
endNewInstance();
|
|
5536
|
-
|
|
5556
|
+
const needsDeferredCallback = import_app_data17.BUILD.slotRelocation && cmpMeta.$flags$ & 4 /* hasSlotRelocation */;
|
|
5557
|
+
if (!needsDeferredCallback) {
|
|
5558
|
+
fireConnectedCallback(hostRef.$lazyInstance$, elm);
|
|
5559
|
+
} else {
|
|
5560
|
+
hostRef.$deferredConnectedCallback$ = true;
|
|
5561
|
+
}
|
|
5537
5562
|
} else {
|
|
5538
5563
|
Cstr = elm.constructor;
|
|
5539
5564
|
const cmpTag = elm.localName;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stencil/core/internal/testing",
|
|
3
|
-
"version": "4.40.1-dev.
|
|
3
|
+
"version": "4.40.1-dev.1767157662.9e38aa7",
|
|
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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
Stencil Mock Doc v4.40.1-dev.
|
|
2
|
+
Stencil Mock Doc v4.40.1-dev.1767157662.9e38aa7 | MIT Licensed | https://stenciljs.com
|
|
3
3
|
*/
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
5
5
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
package/mock-doc/package.json
CHANGED
package/package.json
CHANGED
package/screenshot/index.js
CHANGED
package/screenshot/package.json
CHANGED