@stencil/core 4.22.3-dev.1732597307.7bdf128 → 4.22.3-dev.1732770122.a15bc5d

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.
@@ -1325,8 +1325,12 @@ var relocateToHostRoot = (parentElm) => {
1325
1325
  plt.$flags$ |= 1 /* isTmpDisconnected */;
1326
1326
  const host = parentElm.closest(hostTagName.toLowerCase());
1327
1327
  if (host != null) {
1328
- const contentRefNode = Array.from(host.childNodes).find((ref) => ref["s-cr"]);
1329
- const childNodeArray = Array.from(parentElm.childNodes);
1328
+ const contentRefNode = Array.from(host.__childNodes || host.childNodes).find(
1329
+ (ref) => ref["s-cr"]
1330
+ );
1331
+ const childNodeArray = Array.from(
1332
+ parentElm.__childNodes || parentElm.childNodes
1333
+ );
1330
1334
  for (const childNode of contentRefNode ? childNodeArray.reverse() : childNodeArray) {
1331
1335
  if (childNode["s-sh"] != null) {
1332
1336
  insertBefore(host, childNode, contentRefNode != null ? contentRefNode : null);
@@ -1339,7 +1343,7 @@ var relocateToHostRoot = (parentElm) => {
1339
1343
  };
1340
1344
  var putBackInOriginalLocation = (parentElm, recursive) => {
1341
1345
  plt.$flags$ |= 1 /* isTmpDisconnected */;
1342
- const oldSlotChildNodes = Array.from(parentElm.childNodes);
1346
+ const oldSlotChildNodes = Array.from(parentElm.__childNodes || parentElm.childNodes);
1343
1347
  if (parentElm["s-sr"] && import_app_data10.BUILD.experimentalSlotFixes) {
1344
1348
  let node = parentElm;
1345
1349
  while (node = node.nextSibling) {
@@ -1560,7 +1564,7 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
1560
1564
  }
1561
1565
  };
1562
1566
  var updateFallbackSlotVisibility = (elm) => {
1563
- const childNodes = elm.childNodes;
1567
+ const childNodes = elm.__childNodes || elm.childNodes;
1564
1568
  for (const childNode of childNodes) {
1565
1569
  if (childNode.nodeType === 1 /* ElementNode */) {
1566
1570
  if (childNode["s-sr"]) {
@@ -1591,9 +1595,10 @@ var markSlotContentForRelocation = (elm) => {
1591
1595
  let node;
1592
1596
  let hostContentNodes;
1593
1597
  let j;
1594
- for (const childNode of elm.childNodes) {
1598
+ const children = elm.__childNodes || elm.childNodes;
1599
+ for (const childNode of children) {
1595
1600
  if (childNode["s-sr"] && (node = childNode["s-cr"]) && node.parentNode) {
1596
- hostContentNodes = node.parentNode.childNodes;
1601
+ hostContentNodes = node.parentNode.__childNodes || node.parentNode.childNodes;
1597
1602
  const slotName = childNode["s-sn"];
1598
1603
  for (j = hostContentNodes.length - 1; j >= 0; j--) {
1599
1604
  node = hostContentNodes[j];
@@ -1682,7 +1687,7 @@ var updateElementScopeIds = (element, parent, iterateChildNodes = false) => {
1682
1687
  if (scopeIds.size) {
1683
1688
  (_a = element.classList) == null ? void 0 : _a.add(...element["s-scs"] = Array.from(scopeIds));
1684
1689
  if (element["s-ol"] || iterateChildNodes) {
1685
- for (const childNode of Array.from(element.childNodes)) {
1690
+ for (const childNode of Array.from(element.__childNodes || element.childNodes)) {
1686
1691
  updateElementScopeIds(childNode, element, true);
1687
1692
  }
1688
1693
  }
@@ -1800,7 +1805,8 @@ render() {
1800
1805
  relocateNodes.length = 0;
1801
1806
  }
1802
1807
  if (import_app_data10.BUILD.experimentalScopedSlotChanges && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
1803
- for (const childNode of rootVnode.$elm$.childNodes) {
1808
+ const children = rootVnode.$elm$.__childNodes || rootVnode.$elm$.childNodes;
1809
+ for (const childNode of children) {
1804
1810
  if (childNode["s-hn"] !== hostTagName && !childNode["s-sh"]) {
1805
1811
  if (isInitialLoad && childNode["s-ih"] == null) {
1806
1812
  childNode["s-ih"] = (_e = childNode.hidden) != null ? _e : false;
@@ -2192,31 +2198,77 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
2192
2198
  const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
2193
2199
  members.map(([memberName, [memberFlags]]) => {
2194
2200
  if ((import_app_data13.BUILD.prop || import_app_data13.BUILD.state) && (memberFlags & 31 /* Prop */ || (!import_app_data13.BUILD.lazyLoad || flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
2195
- Object.defineProperty(prototype, memberName, {
2196
- get() {
2197
- return getValue(this, memberName);
2198
- },
2199
- set(newValue) {
2200
- if (import_app_data13.BUILD.isDev) {
2201
- const ref = getHostRef(this);
2202
- if (
2203
- // we are proxying the instance (not element)
2204
- (flags & 1 /* isElementConstructor */) === 0 && // the element is not constructing
2205
- (ref && ref.$flags$ & 8 /* isConstructingInstance */) === 0 && // the member is a prop
2206
- (memberFlags & 31 /* Prop */) !== 0 && // the member is not mutable
2207
- (memberFlags & 1024 /* Mutable */) === 0
2208
- ) {
2209
- consoleDevWarn(
2210
- `@Prop() "${memberName}" on <${cmpMeta.$tagName$}> is immutable but was modified from within the component.
2201
+ if ((memberFlags & 2048 /* Getter */) === 0) {
2202
+ Object.defineProperty(prototype, memberName, {
2203
+ get() {
2204
+ return getValue(this, memberName);
2205
+ },
2206
+ set(newValue) {
2207
+ if (import_app_data13.BUILD.isDev) {
2208
+ const ref = getHostRef(this);
2209
+ if (
2210
+ // we are proxying the instance (not element)
2211
+ (flags & 1 /* isElementConstructor */) === 0 && // the element is not constructing
2212
+ (ref && ref.$flags$ & 8 /* isConstructingInstance */) === 0 && // the member is a prop
2213
+ (memberFlags & 31 /* Prop */) !== 0 && // the member is not mutable
2214
+ (memberFlags & 1024 /* Mutable */) === 0
2215
+ ) {
2216
+ consoleDevWarn(
2217
+ `@Prop() "${memberName}" on <${cmpMeta.$tagName$}> is immutable but was modified from within the component.
2211
2218
  More information: https://stenciljs.com/docs/properties#prop-mutability`
2212
- );
2219
+ );
2220
+ }
2213
2221
  }
2214
- }
2215
- setValue(this, memberName, newValue, cmpMeta);
2216
- },
2217
- configurable: true,
2218
- enumerable: true
2219
- });
2222
+ setValue(this, memberName, newValue, cmpMeta);
2223
+ },
2224
+ configurable: true,
2225
+ enumerable: true
2226
+ });
2227
+ } else if (flags & 1 /* isElementConstructor */ && memberFlags & 2048 /* Getter */) {
2228
+ if (import_app_data13.BUILD.lazyLoad) {
2229
+ Object.defineProperty(prototype, memberName, {
2230
+ get() {
2231
+ const ref = getHostRef(this);
2232
+ const instance = import_app_data13.BUILD.lazyLoad && ref ? ref.$lazyInstance$ : prototype;
2233
+ if (!instance) return;
2234
+ return instance[memberName];
2235
+ },
2236
+ configurable: true,
2237
+ enumerable: true
2238
+ });
2239
+ }
2240
+ if (memberFlags & 4096 /* Setter */) {
2241
+ const origSetter = Object.getOwnPropertyDescriptor(prototype, memberName).set;
2242
+ Object.defineProperty(prototype, memberName, {
2243
+ set(newValue) {
2244
+ const ref = getHostRef(this);
2245
+ if (origSetter) {
2246
+ const currentValue = ref.$hostElement$[memberName];
2247
+ if (!ref.$instanceValues$.get(memberName) && currentValue) {
2248
+ ref.$instanceValues$.set(memberName, currentValue);
2249
+ }
2250
+ origSetter.apply(this, [parsePropertyValue(newValue, cmpMeta.$members$[memberName][0])]);
2251
+ setValue(this, memberName, ref.$hostElement$[memberName], cmpMeta);
2252
+ return;
2253
+ }
2254
+ if (!ref) return;
2255
+ const setterSetVal = () => {
2256
+ const currentValue = ref.$lazyInstance$[memberName];
2257
+ if (!ref.$instanceValues$.get(memberName) && currentValue) {
2258
+ ref.$instanceValues$.set(memberName, currentValue);
2259
+ }
2260
+ ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, cmpMeta.$members$[memberName][0]);
2261
+ setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
2262
+ };
2263
+ if (ref.$lazyInstance$) {
2264
+ setterSetVal();
2265
+ } else {
2266
+ ref.$onReadyPromise$.then(() => setterSetVal());
2267
+ }
2268
+ }
2269
+ });
2270
+ }
2271
+ }
2220
2272
  } else if (import_app_data13.BUILD.lazyLoad && import_app_data13.BUILD.method && flags & 1 /* isElementConstructor */ && memberFlags & 64 /* Method */) {
2221
2273
  Object.defineProperty(prototype, memberName, {
2222
2274
  value(...args) {
@@ -2257,7 +2309,10 @@ More information: https://stenciljs.com/docs/properties#prop-mutability`
2257
2309
  }
2258
2310
  return;
2259
2311
  }
2260
- this[propName] = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
2312
+ const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
2313
+ if (!propDesc.get || !!propDesc.set) {
2314
+ this[propName] = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
2315
+ }
2261
2316
  });
2262
2317
  };
2263
2318
  Cstr.observedAttributes = Array.from(
@@ -2469,7 +2524,7 @@ var disconnectedCallback = async (elm) => {
2469
2524
 
2470
2525
  // src/runtime/dom-extras.ts
2471
2526
  var import_app_data17 = require("@stencil/core/internal/app-data");
2472
- var patchPseudoShadowDom = (hostElementPrototype, descriptorPrototype) => {
2527
+ var patchPseudoShadowDom = (hostElementPrototype) => {
2473
2528
  patchCloneNode(hostElementPrototype);
2474
2529
  patchSlotAppendChild(hostElementPrototype);
2475
2530
  patchSlotAppend(hostElementPrototype);
@@ -2478,7 +2533,7 @@ var patchPseudoShadowDom = (hostElementPrototype, descriptorPrototype) => {
2478
2533
  patchSlotInsertAdjacentHTML(hostElementPrototype);
2479
2534
  patchSlotInsertAdjacentText(hostElementPrototype);
2480
2535
  patchTextContent(hostElementPrototype);
2481
- patchChildSlotNodes(hostElementPrototype, descriptorPrototype);
2536
+ patchChildSlotNodes(hostElementPrototype);
2482
2537
  patchSlotRemoveChild(hostElementPrototype);
2483
2538
  };
2484
2539
  var patchCloneNode = (HostElementPrototype) => {
@@ -2507,9 +2562,10 @@ var patchCloneNode = (HostElementPrototype) => {
2507
2562
  "s-rf",
2508
2563
  "s-scs"
2509
2564
  ];
2510
- for (; i2 < srcNode.childNodes.length; i2++) {
2511
- slotted = srcNode.childNodes[i2]["s-nr"];
2512
- nonStencilNode = stencilPrivates.every((privateField) => !srcNode.childNodes[i2][privateField]);
2565
+ const childNodes = this.__childNodes || this.childNodes;
2566
+ for (; i2 < childNodes.length; i2++) {
2567
+ slotted = childNodes[i2]["s-nr"];
2568
+ nonStencilNode = stencilPrivates.every((privateField) => !childNodes[i2][privateField]);
2513
2569
  if (slotted) {
2514
2570
  if (import_app_data17.BUILD.appendChildSlotFix && clonedNode.__appendChild) {
2515
2571
  clonedNode.__appendChild(slotted.cloneNode(true));
@@ -2518,7 +2574,7 @@ var patchCloneNode = (HostElementPrototype) => {
2518
2574
  }
2519
2575
  }
2520
2576
  if (nonStencilNode) {
2521
- clonedNode.appendChild(srcNode.childNodes[i2].cloneNode(true));
2577
+ clonedNode.appendChild(childNodes[i2].cloneNode(true));
2522
2578
  }
2523
2579
  }
2524
2580
  }
@@ -2529,13 +2585,9 @@ var patchSlotAppendChild = (HostElementPrototype) => {
2529
2585
  HostElementPrototype.__appendChild = HostElementPrototype.appendChild;
2530
2586
  HostElementPrototype.appendChild = function(newChild) {
2531
2587
  const slotName = newChild["s-sn"] = getSlotName(newChild);
2532
- const slotNode = getHostSlotNode(this.childNodes, slotName, this.tagName);
2588
+ const slotNode = getHostSlotNode(this.__childNodes || this.childNodes, slotName, this.tagName);
2533
2589
  if (slotNode) {
2534
- const slotPlaceholder = document.createTextNode("");
2535
- slotPlaceholder["s-nr"] = newChild;
2536
- slotNode["s-cr"].parentNode.__appendChild(slotPlaceholder);
2537
- newChild["s-ol"] = slotPlaceholder;
2538
- newChild["s-sh"] = slotNode["s-hn"];
2590
+ addSlotRelocateNode(newChild, slotNode);
2539
2591
  const slotChildNodes = getHostSlotChildNodes(slotNode, slotName);
2540
2592
  const appendAfter = slotChildNodes[slotChildNodes.length - 1];
2541
2593
  const insertedNode = insertBefore(appendAfter.parentNode, newChild, appendAfter.nextSibling);
@@ -2549,35 +2601,29 @@ var patchSlotRemoveChild = (ElementPrototype) => {
2549
2601
  ElementPrototype.__removeChild = ElementPrototype.removeChild;
2550
2602
  ElementPrototype.removeChild = function(toRemove) {
2551
2603
  if (toRemove && typeof toRemove["s-sn"] !== "undefined") {
2552
- const slotNode = getHostSlotNode(this.childNodes, toRemove["s-sn"], this.tagName);
2553
- if (slotNode) {
2554
- const slotChildNodes = getHostSlotChildNodes(slotNode, toRemove["s-sn"]);
2555
- const existingNode = slotChildNodes.find((n) => n === toRemove);
2556
- if (existingNode) {
2557
- existingNode.remove();
2558
- updateFallbackSlotVisibility(this);
2559
- return;
2560
- }
2604
+ const childNodes = this.__childNodes || this.childNodes;
2605
+ const slotNode = getHostSlotNode(childNodes, toRemove["s-sn"], this.tagName);
2606
+ if (slotNode && toRemove.isConnected) {
2607
+ toRemove.remove();
2608
+ updateFallbackSlotVisibility(this);
2609
+ return;
2561
2610
  }
2562
2611
  }
2563
2612
  return this.__removeChild(toRemove);
2564
2613
  };
2565
2614
  };
2566
2615
  var patchSlotPrepend = (HostElementPrototype) => {
2567
- const originalPrepend = HostElementPrototype.prepend;
2616
+ HostElementPrototype.__prepend = HostElementPrototype.prepend;
2568
2617
  HostElementPrototype.prepend = function(...newChildren) {
2569
2618
  newChildren.forEach((newChild) => {
2570
2619
  if (typeof newChild === "string") {
2571
2620
  newChild = this.ownerDocument.createTextNode(newChild);
2572
2621
  }
2573
2622
  const slotName = newChild["s-sn"] = getSlotName(newChild);
2574
- const slotNode = getHostSlotNode(this.childNodes, slotName, this.tagName);
2623
+ const childNodes = this.__childNodes || this.childNodes;
2624
+ const slotNode = getHostSlotNode(childNodes, slotName, this.tagName);
2575
2625
  if (slotNode) {
2576
- const slotPlaceholder = document.createTextNode("");
2577
- slotPlaceholder["s-nr"] = newChild;
2578
- slotNode["s-cr"].parentNode.__appendChild(slotPlaceholder);
2579
- newChild["s-ol"] = slotPlaceholder;
2580
- newChild["s-sh"] = slotNode["s-hn"];
2626
+ addSlotRelocateNode(newChild, slotNode, true);
2581
2627
  const slotChildNodes = getHostSlotChildNodes(slotNode, slotName);
2582
2628
  const appendAfter = slotChildNodes[0];
2583
2629
  return insertBefore(appendAfter.parentNode, newChild, appendAfter.nextSibling);
@@ -2585,11 +2631,12 @@ var patchSlotPrepend = (HostElementPrototype) => {
2585
2631
  if (newChild.nodeType === 1 && !!newChild.getAttribute("slot")) {
2586
2632
  newChild.hidden = true;
2587
2633
  }
2588
- return originalPrepend.call(this, newChild);
2634
+ return HostElementPrototype.__prepend(newChild);
2589
2635
  });
2590
2636
  };
2591
2637
  };
2592
2638
  var patchSlotAppend = (HostElementPrototype) => {
2639
+ HostElementPrototype.__append = HostElementPrototype.append;
2593
2640
  HostElementPrototype.append = function(...newChildren) {
2594
2641
  newChildren.forEach((newChild) => {
2595
2642
  if (typeof newChild === "string") {
@@ -2641,126 +2688,86 @@ var patchSlotInsertAdjacentElement = (HostElementPrototype) => {
2641
2688
  };
2642
2689
  };
2643
2690
  var patchTextContent = (hostElementPrototype) => {
2644
- const descriptor = Object.getOwnPropertyDescriptor(Node.prototype, "textContent");
2645
- Object.defineProperty(hostElementPrototype, "__textContent", descriptor);
2646
- if (import_app_data17.BUILD.experimentalScopedSlotChanges) {
2647
- Object.defineProperty(hostElementPrototype, "textContent", {
2648
- // To mimic shadow root behavior, we need to return the text content of all
2649
- // nodes in a slot reference node
2650
- get() {
2651
- const slotRefNodes = getAllChildSlotNodes(this.childNodes);
2652
- const textContent = slotRefNodes.map((node) => {
2653
- var _a, _b;
2654
- const text = [];
2655
- let slotContent = node.nextSibling;
2656
- while (slotContent && slotContent["s-sn"] === node["s-sn"]) {
2657
- if (slotContent.nodeType === 3 /* TEXT_NODE */ || slotContent.nodeType === 1 /* ELEMENT_NODE */) {
2658
- text.push((_b = (_a = slotContent.textContent) == null ? void 0 : _a.trim()) != null ? _b : "");
2659
- }
2660
- slotContent = slotContent.nextSibling;
2661
- }
2662
- return text.filter((ref) => ref !== "").join(" ");
2663
- }).filter((text) => text !== "").join(" ");
2664
- return " " + textContent + " ";
2665
- },
2666
- // To mimic shadow root behavior, we need to overwrite all nodes in a slot
2667
- // reference node. If a default slot reference node exists, the text content will be
2668
- // placed there. Otherwise, the new text node will be hidden
2669
- set(value) {
2670
- const slotRefNodes = getAllChildSlotNodes(this.childNodes);
2671
- slotRefNodes.forEach((node) => {
2672
- let slotContent = node.nextSibling;
2673
- while (slotContent && slotContent["s-sn"] === node["s-sn"]) {
2674
- const tmp = slotContent;
2675
- slotContent = slotContent.nextSibling;
2676
- tmp.remove();
2677
- }
2678
- if (node["s-sn"] === "") {
2679
- const textNode = this.ownerDocument.createTextNode(value);
2680
- textNode["s-sn"] = "";
2681
- insertBefore(node.parentElement, textNode, node.nextSibling);
2682
- } else {
2683
- node.remove();
2684
- }
2685
- });
2686
- }
2687
- });
2688
- } else {
2689
- Object.defineProperty(hostElementPrototype, "textContent", {
2690
- get() {
2691
- var _a;
2692
- const slotNode = getHostSlotNode(this.childNodes, "", this.tagName);
2693
- if (((_a = slotNode == null ? void 0 : slotNode.nextSibling) == null ? void 0 : _a.nodeType) === 3 /* TEXT_NODE */) {
2694
- return slotNode.nextSibling.textContent;
2695
- } else if (slotNode) {
2696
- return slotNode.textContent;
2697
- } else {
2698
- return this.__textContent;
2699
- }
2700
- },
2701
- set(value) {
2702
- var _a;
2703
- const slotNode = getHostSlotNode(this.childNodes, "", this.tagName);
2704
- if (((_a = slotNode == null ? void 0 : slotNode.nextSibling) == null ? void 0 : _a.nodeType) === 3 /* TEXT_NODE */) {
2705
- slotNode.nextSibling.textContent = value;
2706
- } else if (slotNode) {
2707
- slotNode.textContent = value;
2708
- } else {
2709
- this.__textContent = value;
2710
- const contentRefElm = this["s-cr"];
2711
- if (contentRefElm) {
2712
- insertBefore(this, contentRefElm, this.firstChild);
2713
- }
2714
- }
2715
- }
2716
- });
2717
- }
2691
+ let descriptor = Object.getOwnPropertyDescriptor(Node.prototype, "textContent");
2692
+ if (!descriptor) {
2693
+ descriptor = Object.getOwnPropertyDescriptor(hostElementPrototype, "textContent");
2694
+ }
2695
+ if (descriptor) Object.defineProperty(hostElementPrototype, "__textContent", descriptor);
2696
+ Object.defineProperty(hostElementPrototype, "textContent", {
2697
+ get: function() {
2698
+ let text = "";
2699
+ const childNodes = this.__childNodes ? this.childNodes : getSlottedChildNodes(this.childNodes);
2700
+ childNodes.forEach((node) => text += node.textContent || "");
2701
+ return text;
2702
+ },
2703
+ set: function(value) {
2704
+ const childNodes = this.__childNodes ? this.childNodes : getSlottedChildNodes(this.childNodes);
2705
+ childNodes.forEach((node) => {
2706
+ if (node["s-ol"]) node["s-ol"].remove();
2707
+ node.remove();
2708
+ });
2709
+ this.insertAdjacentHTML("beforeend", value);
2710
+ }
2711
+ });
2718
2712
  };
2719
- var patchChildSlotNodes = (elm, cmpMeta) => {
2713
+ var patchChildSlotNodes = (elm) => {
2720
2714
  class FakeNodeList extends Array {
2721
2715
  item(n) {
2722
2716
  return this[n];
2723
2717
  }
2724
2718
  }
2725
- if (cmpMeta.$flags$ & 8 /* needsShadowDomShim */) {
2726
- const childNodesFn = elm.__lookupGetter__("childNodes");
2727
- Object.defineProperty(elm, "children", {
2728
- get() {
2729
- return this.childNodes.map((n) => n.nodeType === 1);
2730
- }
2731
- });
2732
- Object.defineProperty(elm, "childElementCount", {
2733
- get() {
2734
- return elm.children.length;
2735
- }
2736
- });
2737
- Object.defineProperty(elm, "childNodes", {
2738
- get() {
2739
- const childNodes = childNodesFn.call(this);
2740
- if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0 && getHostRef(this).$flags$ & 2 /* hasRendered */) {
2741
- const result = new FakeNodeList();
2742
- for (let i2 = 0; i2 < childNodes.length; i2++) {
2743
- const slot = childNodes[i2]["s-nr"];
2744
- if (slot) {
2745
- result.push(slot);
2746
- }
2747
- }
2748
- return result;
2749
- }
2750
- return FakeNodeList.from(childNodes);
2751
- }
2752
- });
2719
+ let childNodesFn = Object.getOwnPropertyDescriptor(Node.prototype, "childNodes");
2720
+ if (!childNodesFn) {
2721
+ childNodesFn = Object.getOwnPropertyDescriptor(elm, "childNodes");
2722
+ }
2723
+ if (childNodesFn) Object.defineProperty(elm, "__childNodes", childNodesFn);
2724
+ Object.defineProperty(elm, "children", {
2725
+ get() {
2726
+ return this.childNodes.filter((n) => n.nodeType === 1);
2727
+ }
2728
+ });
2729
+ Object.defineProperty(elm, "childElementCount", {
2730
+ get() {
2731
+ return this.children.length;
2732
+ }
2733
+ });
2734
+ if (!childNodesFn) return;
2735
+ Object.defineProperty(elm, "childNodes", {
2736
+ get() {
2737
+ var _a, _b;
2738
+ if (!plt.$flags$ || !((_a = getHostRef(this)) == null ? void 0 : _a.$flags$) || (plt.$flags$ & 1 /* isTmpDisconnected */) === 0 && ((_b = getHostRef(this)) == null ? void 0 : _b.$flags$) & 2 /* hasRendered */) {
2739
+ const result = new FakeNodeList();
2740
+ const nodes = getSlottedChildNodes(this.__childNodes);
2741
+ result.push(...nodes);
2742
+ return result;
2743
+ }
2744
+ return FakeNodeList.from(this.__childNodes);
2745
+ }
2746
+ });
2747
+ };
2748
+ var addSlotRelocateNode = (newChild, slotNode, prepend) => {
2749
+ let slottedNodeLocation;
2750
+ if (newChild["s-ol"] && newChild["s-ol"].isConnected) {
2751
+ slottedNodeLocation = newChild["s-ol"];
2752
+ } else {
2753
+ slottedNodeLocation = document.createTextNode("");
2754
+ slottedNodeLocation["s-nr"] = newChild;
2753
2755
  }
2756
+ const parent = slotNode["s-cr"].parentNode;
2757
+ const appendMethod = prepend ? parent.__prepend : parent.__appendChild;
2758
+ newChild["s-ol"] = slottedNodeLocation;
2759
+ newChild["s-sh"] = slotNode["s-hn"];
2760
+ appendMethod.call(parent, slottedNodeLocation);
2754
2761
  };
2755
- var getAllChildSlotNodes = (childNodes) => {
2756
- const slotRefNodes = [];
2757
- for (const childNode of Array.from(childNodes)) {
2758
- if (childNode["s-sr"]) {
2759
- slotRefNodes.push(childNode);
2762
+ var getSlottedChildNodes = (childNodes) => {
2763
+ const result = [];
2764
+ for (let i2 = 0; i2 < childNodes.length; i2++) {
2765
+ const slottedNode = childNodes[i2]["s-nr"];
2766
+ if (slottedNode && slottedNode.isConnected) {
2767
+ result.push(slottedNode);
2760
2768
  }
2761
- slotRefNodes.push(...getAllChildSlotNodes(childNode.childNodes));
2762
2769
  }
2763
- return slotRefNodes;
2770
+ return result;
2764
2771
  };
2765
2772
  var getSlotName = (node) => node["s-sn"] || node.nodeType === 1 && node.getAttribute("slot") || "";
2766
2773
  var getHostSlotNode = (childNodes, slotName, hostName) => {
@@ -2812,11 +2819,11 @@ var proxyCustomElement = (Cstr, compactMeta) => {
2812
2819
  }
2813
2820
  if (import_app_data18.BUILD.experimentalSlotFixes) {
2814
2821
  if (import_app_data18.BUILD.scoped && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
2815
- patchPseudoShadowDom(Cstr.prototype, cmpMeta);
2822
+ patchPseudoShadowDom(Cstr.prototype);
2816
2823
  }
2817
2824
  } else {
2818
2825
  if (import_app_data18.BUILD.slotChildNodesFix) {
2819
- patchChildSlotNodes(Cstr.prototype, cmpMeta);
2826
+ patchChildSlotNodes(Cstr.prototype);
2820
2827
  }
2821
2828
  if (import_app_data18.BUILD.cloneNodeFix) {
2822
2829
  patchCloneNode(Cstr.prototype);
@@ -3022,11 +3029,11 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
3022
3029
  };
3023
3030
  if (import_app_data19.BUILD.experimentalSlotFixes) {
3024
3031
  if (import_app_data19.BUILD.scoped && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
3025
- patchPseudoShadowDom(HostElement.prototype, cmpMeta);
3032
+ patchPseudoShadowDom(HostElement.prototype);
3026
3033
  }
3027
3034
  } else {
3028
3035
  if (import_app_data19.BUILD.slotChildNodesFix) {
3029
- patchChildSlotNodes(HostElement.prototype, cmpMeta);
3036
+ patchChildSlotNodes(HostElement.prototype);
3030
3037
  }
3031
3038
  if (import_app_data19.BUILD.cloneNodeFix) {
3032
3039
  patchCloneNode(HostElement.prototype);
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/core/internal/testing",
3
- "version": "4.22.3-dev.1732597307.7bdf128",
3
+ "version": "4.22.3-dev.1732770122.a15bc5d",
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
@@ -1,5 +1,5 @@
1
1
  /*!
2
- Stencil Mock Doc (CommonJS) v4.22.3-dev.1732597307.7bdf128 | MIT Licensed | https://stenciljs.com
2
+ Stencil Mock Doc (CommonJS) v4.22.3-dev.1732770122.a15bc5d | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
  "use strict";
5
5
  var __defProp = Object.defineProperty;
package/mock-doc/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- Stencil Mock Doc v4.22.3-dev.1732597307.7bdf128 | MIT Licensed | https://stenciljs.com
2
+ Stencil Mock Doc v4.22.3-dev.1732770122.a15bc5d | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
 
5
5
  // src/runtime/runtime-constants.ts
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/core/mock-doc",
3
- "version": "4.22.3-dev.1732597307.7bdf128",
3
+ "version": "4.22.3-dev.1732770122.a15bc5d",
4
4
  "description": "Mock window, document and DOM outside of a browser environment.",
5
5
  "main": "./index.cjs",
6
6
  "module": "./index.js",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/core",
3
- "version": "4.22.3-dev.1732597307.7bdf128",
3
+ "version": "4.22.3-dev.1732770122.a15bc5d",
4
4
  "license": "MIT",
5
5
  "main": "./internal/stencil-core/index.cjs",
6
6
  "module": "./internal/stencil-core/index.js",
@@ -1,5 +1,5 @@
1
1
  /*
2
- Stencil Screenshot v4.22.3-dev.1732597307.7bdf128 | MIT Licensed | https://stenciljs.com
2
+ Stencil Screenshot v4.22.3-dev.1732770122.a15bc5d | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
  "use strict";
5
5
  var __create = Object.create;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/core/screenshot",
3
- "version": "4.22.3-dev.1732597307.7bdf128",
3
+ "version": "4.22.3-dev.1732770122.a15bc5d",
4
4
  "description": "Stencil Screenshot.",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",
@@ -1,5 +1,5 @@
1
1
  /*
2
- Stencil Screenshot Pixel Match v4.22.3-dev.1732597307.7bdf128 | MIT Licensed | https://stenciljs.com
2
+ Stencil Screenshot Pixel Match v4.22.3-dev.1732770122.a15bc5d | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
  "use strict";
5
5
  var __create = Object.create;