@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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Stencil Hydrate Platform v4.35.3 | MIT Licensed | https://stenciljs.com
2
+ Stencil Hydrate Platform v4.36.0 | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
  var __defProp = Object.defineProperty;
5
5
  var __export = (target, all) => {
@@ -266,7 +266,13 @@ function createShadowRoot(cmpMeta) {
266
266
  delegatesFocus: !!(cmpMeta.$flags$ & 16 /* shadowDelegatesFocus */)
267
267
  }) : this.attachShadow({ mode: "open" });
268
268
  if (globalStyleSheet === void 0) globalStyleSheet = (_a = createStyleSheetIfNeededAndSupported(globalStyles)) != null ? _a : null;
269
- if (globalStyleSheet) shadowRoot.adoptedStyleSheets.push(globalStyleSheet);
269
+ if (globalStyleSheet) {
270
+ if (supportsMutableAdoptedStyleSheets) {
271
+ shadowRoot.adoptedStyleSheets.push(globalStyleSheet);
272
+ } else {
273
+ shadowRoot.adoptedStyleSheets = [...shadowRoot.adoptedStyleSheets, globalStyleSheet];
274
+ }
275
+ }
270
276
  }
271
277
 
272
278
  // src/utils/util.ts
@@ -813,6 +819,9 @@ var validNodesPatches = [
813
819
  "parentNode"
814
820
  ];
815
821
  function patchHostOriginalAccessor(accessorName, node) {
822
+ if (!globalThis.Node || !globalThis.Element) {
823
+ return;
824
+ }
816
825
  let accessor;
817
826
  if (validElementPatches.includes(accessorName)) {
818
827
  accessor = Object.getOwnPropertyDescriptor(Element.prototype, accessorName);
@@ -979,7 +988,11 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
979
988
  if (supportsConstructableStylesheets) {
980
989
  const stylesheet = new CSSStyleSheet();
981
990
  stylesheet.replaceSync(style);
982
- styleContainerNode.adoptedStyleSheets.unshift(stylesheet);
991
+ if (supportsMutableAdoptedStyleSheets) {
992
+ styleContainerNode.adoptedStyleSheets.unshift(stylesheet);
993
+ } else {
994
+ styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
995
+ }
983
996
  } else {
984
997
  const existingStyleContainer = styleContainerNode.querySelector("style");
985
998
  if (existingStyleContainer) {
@@ -1004,7 +1017,11 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
1004
1017
  }
1005
1018
  }
1006
1019
  } else if (BUILD6.constructableCSS && !styleContainerNode.adoptedStyleSheets.includes(style)) {
1007
- styleContainerNode.adoptedStyleSheets.push(style);
1020
+ if (supportsMutableAdoptedStyleSheets) {
1021
+ styleContainerNode.adoptedStyleSheets.push(style);
1022
+ } else {
1023
+ styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
1024
+ }
1008
1025
  }
1009
1026
  }
1010
1027
  return scopeId2;
@@ -1180,7 +1197,7 @@ var validateInputProperties = (inputElm) => {
1180
1197
 
1181
1198
  // src/runtime/client-hydrate.ts
1182
1199
  var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
1183
- var _a, _b;
1200
+ var _a, _b, _c;
1184
1201
  const endHydrate = createTime("hydrateClient", tagName);
1185
1202
  const shadowRoot = hostElm.shadowRoot;
1186
1203
  const childRenderNodes = [];
@@ -1244,15 +1261,17 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
1244
1261
  if (childRenderNode.$tag$ === "slot") {
1245
1262
  node["s-cr"] = hostElm["s-cr"];
1246
1263
  }
1247
- } else if (((_b = childRenderNode.$tag$) == null ? void 0 : _b.toString().includes("-")) && !childRenderNode.$elm$.shadowRoot) {
1264
+ } else if (((_b = childRenderNode.$tag$) == null ? void 0 : _b.toString().includes("-")) && childRenderNode.$tag$ !== "slot-fb" && !childRenderNode.$elm$.shadowRoot) {
1248
1265
  const cmpMeta = getHostRef(childRenderNode.$elm$);
1249
- const scopeId3 = getScopeId(
1250
- cmpMeta.$cmpMeta$,
1251
- BUILD8.mode ? childRenderNode.$elm$.getAttribute("s-mode") : void 0
1252
- );
1253
- const styleSheet = win.document.querySelector(`style[sty-id="${scopeId3}"]`);
1254
- if (styleSheet) {
1255
- hostElm.shadowRoot.append(styleSheet.cloneNode(true));
1266
+ if (cmpMeta) {
1267
+ const scopeId3 = getScopeId(
1268
+ cmpMeta.$cmpMeta$,
1269
+ BUILD8.mode ? childRenderNode.$elm$.getAttribute("s-mode") : void 0
1270
+ );
1271
+ const styleSheet = win.document.querySelector(`style[sty-id="${scopeId3}"]`);
1272
+ if (styleSheet) {
1273
+ hostElm.shadowRoot.append(styleSheet.cloneNode(true));
1274
+ }
1256
1275
  }
1257
1276
  }
1258
1277
  if (childRenderNode.$tag$ === "slot") {
@@ -1300,6 +1319,9 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
1300
1319
  }
1301
1320
  if (!hosts[slottedItem.hostId]) continue;
1302
1321
  const hostEle = hosts[slottedItem.hostId];
1322
+ if (hostEle.shadowRoot && slottedItem.node.parentElement !== hostEle) {
1323
+ hostEle.appendChild(slottedItem.node);
1324
+ }
1303
1325
  if (!hostEle.shadowRoot || !shadowRoot) {
1304
1326
  if (!slottedItem.slot["s-cr"]) {
1305
1327
  slottedItem.slot["s-cr"] = hostEle["s-cr"];
@@ -1310,13 +1332,13 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
1310
1332
  }
1311
1333
  }
1312
1334
  addSlotRelocateNode(slottedItem.node, slottedItem.slot, false, slottedItem.node["s-oo"]);
1335
+ if (((_c = slottedItem.node.parentElement) == null ? void 0 : _c.shadowRoot) && slottedItem.node["getAttribute"] && slottedItem.node.getAttribute("slot")) {
1336
+ slottedItem.node.removeAttribute("slot");
1337
+ }
1313
1338
  if (BUILD8.experimentalSlotFixes) {
1314
1339
  patchSlottedNode(slottedItem.node);
1315
1340
  }
1316
1341
  }
1317
- if (hostEle.shadowRoot && slottedItem.node.parentElement !== hostEle) {
1318
- hostEle.appendChild(slottedItem.node);
1319
- }
1320
1342
  }
1321
1343
  }
1322
1344
  if (BUILD8.scoped && scopeId2 && slotNodes.length) {
@@ -1329,7 +1351,10 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
1329
1351
  const rnLen = shadowRootNodes.length;
1330
1352
  if (rnLen) {
1331
1353
  for (rnIdex; rnIdex < rnLen; rnIdex++) {
1332
- shadowRoot.appendChild(shadowRootNodes[rnIdex]);
1354
+ const node = shadowRootNodes[rnIdex];
1355
+ if (node) {
1356
+ shadowRoot.appendChild(node);
1357
+ }
1333
1358
  }
1334
1359
  Array.from(hostElm.childNodes).forEach((node) => {
1335
1360
  if (typeof node["s-en"] !== "string" && typeof node["s-sn"] !== "string") {
@@ -1588,13 +1613,17 @@ function addSlot(slotName, slotId, childVNode, node, parentVNode, childRenderNod
1588
1613
  parentVNode.$children$[childVNode.$index$] = childVNode;
1589
1614
  }
1590
1615
  var addSlottedNodes = (slottedNodes, slotNodeId, slotName, slotNode, hostId) => {
1616
+ var _a, _b;
1591
1617
  let slottedNode = slotNode.nextSibling;
1592
1618
  slottedNodes[slotNodeId] = slottedNodes[slotNodeId] || [];
1593
- while (slottedNode && ((slottedNode["getAttribute"] && slottedNode.getAttribute("slot") || slottedNode["s-sn"]) === slotName || slotName === "" && !slottedNode["s-sn"] && (slottedNode.nodeType === 8 /* CommentNode */ || slottedNode.nodeType === 3 /* TextNode */ || slottedNode.tagName === "SLOT"))) {
1594
- slottedNode["s-sn"] = slotName;
1595
- slottedNodes[slotNodeId].push({ slot: slotNode, node: slottedNode, hostId });
1596
- slottedNode = slottedNode.nextSibling;
1597
- }
1619
+ if (!slottedNode || ((_a = slottedNode.nodeValue) == null ? void 0 : _a.startsWith(SLOT_NODE_ID + "."))) return;
1620
+ do {
1621
+ 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 */))) {
1622
+ slottedNode["s-sn"] = slotName;
1623
+ slottedNodes[slotNodeId].push({ slot: slotNode, node: slottedNode, hostId });
1624
+ }
1625
+ slottedNode = slottedNode == null ? void 0 : slottedNode.nextSibling;
1626
+ } while (slottedNode && !((_b = slottedNode.nodeValue) == null ? void 0 : _b.startsWith(SLOT_NODE_ID + ".")));
1598
1627
  };
1599
1628
  var findCorrespondingNode = (node, type) => {
1600
1629
  let sibling = node;
@@ -2016,7 +2045,10 @@ var scopeCss = (cssText, scopeId2, commentOriginalSelector) => {
2016
2045
  // src/runtime/mode.ts
2017
2046
  var computeMode = (elm) => modeResolutionChain.map((h2) => h2(elm)).find((m) => !!m);
2018
2047
  var setMode = (handler) => modeResolutionChain.push(handler);
2019
- var getMode = (ref) => getHostRef(ref).$modeName$;
2048
+ var getMode = (ref) => {
2049
+ var _a;
2050
+ return (_a = getHostRef(ref)) == null ? void 0 : _a.$modeName$;
2051
+ };
2020
2052
 
2021
2053
  // src/runtime/proxy-component.ts
2022
2054
  import { BUILD as BUILD17 } from "@stencil/core/internal/app-data";
@@ -2065,7 +2097,10 @@ import { BUILD as BUILD11 } from "@stencil/core/internal/app-data";
2065
2097
 
2066
2098
  // src/runtime/element.ts
2067
2099
  import { BUILD as BUILD10 } from "@stencil/core/internal/app-data";
2068
- var getElement = (ref) => BUILD10.lazyLoad ? getHostRef(ref).$hostElement$ : ref;
2100
+ var getElement = (ref) => {
2101
+ var _a;
2102
+ return BUILD10.lazyLoad ? (_a = getHostRef(ref)) == null ? void 0 : _a.$hostElement$ : ref;
2103
+ };
2069
2104
 
2070
2105
  // src/runtime/event-emitter.ts
2071
2106
  var createEvent = (ref, name, flags) => {
@@ -2865,6 +2900,12 @@ var scheduleUpdate = (hostRef, isInitialLoad) => {
2865
2900
  }
2866
2901
  attachToAncestor(hostRef, hostRef.$ancestorComponent$);
2867
2902
  const dispatch = () => dispatchHooks(hostRef, isInitialLoad);
2903
+ if (isInitialLoad) {
2904
+ queueMicrotask(() => {
2905
+ dispatch();
2906
+ });
2907
+ return;
2908
+ }
2868
2909
  return BUILD15.taskQueue ? writeTask(dispatch) : dispatch();
2869
2910
  };
2870
2911
  var dispatchHooks = (hostRef, isInitialLoad) => {
@@ -3054,9 +3095,10 @@ var postUpdateComponent = (hostRef) => {
3054
3095
  }
3055
3096
  };
3056
3097
  var forceUpdate = (ref) => {
3098
+ var _a;
3057
3099
  if (BUILD15.updatable && (Build.isBrowser || Build.isTesting)) {
3058
3100
  const hostRef = getHostRef(ref);
3059
- const isConnected = hostRef.$hostElement$.isConnected;
3101
+ const isConnected = (_a = hostRef == null ? void 0 : hostRef.$hostElement$) == null ? void 0 : _a.isConnected;
3060
3102
  if (isConnected && (hostRef.$flags$ & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
3061
3103
  scheduleUpdate(hostRef, false);
3062
3104
  }
@@ -3121,6 +3163,9 @@ var serverSideConnected = (elm) => {
3121
3163
  var getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
3122
3164
  var setValue = (ref, propName, newVal, cmpMeta) => {
3123
3165
  const hostRef = getHostRef(ref);
3166
+ if (!hostRef) {
3167
+ return;
3168
+ }
3124
3169
  if (BUILD16.lazyLoad && !hostRef) {
3125
3170
  throw new Error(
3126
3171
  `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).`
@@ -3202,10 +3247,11 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
3202
3247
  const originalFormAssociatedCallback = prototype[cbName];
3203
3248
  Object.defineProperty(prototype, cbName, {
3204
3249
  value(...args) {
3250
+ var _a2;
3205
3251
  const hostRef = getHostRef(this);
3206
- const instance = BUILD17.lazyLoad ? hostRef.$lazyInstance$ : this;
3252
+ const instance = BUILD17.lazyLoad ? hostRef == null ? void 0 : hostRef.$lazyInstance$ : this;
3207
3253
  if (!instance) {
3208
- hostRef.$onReadyPromise$.then((asyncInstance) => {
3254
+ (_a2 = hostRef == null ? void 0 : hostRef.$onReadyPromise$) == null ? void 0 : _a2.then((asyncInstance) => {
3209
3255
  const cb = asyncInstance[cbName];
3210
3256
  typeof cb === "function" && cb.call(asyncInstance, ...args);
3211
3257
  });
@@ -3250,6 +3296,9 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
3250
3296
  Object.defineProperty(prototype, memberName, {
3251
3297
  set(newValue) {
3252
3298
  const ref = getHostRef(this);
3299
+ if (!ref) {
3300
+ return;
3301
+ }
3253
3302
  if (BUILD17.isDev) {
3254
3303
  if (
3255
3304
  // we are proxying the instance (not element)
@@ -3347,7 +3396,7 @@ More information: https://stenciljs.com/docs/properties#prop-mutability`
3347
3396
  } else if (propName == null) {
3348
3397
  const hostRef = getHostRef(this);
3349
3398
  const flags2 = hostRef == null ? void 0 : hostRef.$flags$;
3350
- if (flags2 && !(flags2 & 8 /* isConstructingInstance */) && flags2 & 128 /* isWatchReady */ && newValue !== oldValue) {
3399
+ if (hostRef && flags2 && !(flags2 & 8 /* isConstructingInstance */) && flags2 & 128 /* isWatchReady */ && newValue !== oldValue) {
3351
3400
  const elm = BUILD17.lazyLoad ? hostRef.$hostElement$ : this;
3352
3401
  const instance = BUILD17.lazyLoad ? hostRef.$lazyInstance$ : elm;
3353
3402
  const entry = (_a2 = cmpMeta.$watchers$) == null ? void 0 : _a2[attrName];
@@ -3481,6 +3530,9 @@ var fireConnectedCallback = (instance, elm) => {
3481
3530
  var connectedCallback = (elm) => {
3482
3531
  if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
3483
3532
  const hostRef = getHostRef(elm);
3533
+ if (!hostRef) {
3534
+ return;
3535
+ }
3484
3536
  const cmpMeta = hostRef.$cmpMeta$;
3485
3537
  const endConnected = createTime("connectedCallback", cmpMeta.$tagName$);
3486
3538
  if (BUILD19.hostListenerTargetParent) {
@@ -3506,11 +3558,6 @@ var connectedCallback = (elm) => {
3506
3558
  if (BUILD19.hydrateServerSide || (BUILD19.slot || BUILD19.shadowDom) && // TODO(STENCIL-854): Remove code related to legacy shadowDomShim field
3507
3559
  cmpMeta.$flags$ & (4 /* hasSlotRelocation */ | 8 /* needsShadowDomShim */)) {
3508
3560
  setContentReference(elm);
3509
- } else if (BUILD19.hydrateClientSide && !(cmpMeta.$flags$ & 4 /* hasSlotRelocation */)) {
3510
- const commendPlaceholder = elm.firstChild;
3511
- if ((commendPlaceholder == null ? void 0 : commendPlaceholder.nodeType) === 8 /* CommentNode */ && !commendPlaceholder["s-cn"] && !commendPlaceholder.nodeValue) {
3512
- elm.removeChild(commendPlaceholder);
3513
- }
3514
3561
  }
3515
3562
  }
3516
3563
  if (BUILD19.asyncLoading) {
@@ -3569,7 +3616,7 @@ var disconnectedCallback = async (elm) => {
3569
3616
  if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
3570
3617
  const hostRef = getHostRef(elm);
3571
3618
  if (BUILD20.hostListener) {
3572
- if (hostRef.$rmListeners$) {
3619
+ if (hostRef == null ? void 0 : hostRef.$rmListeners$) {
3573
3620
  hostRef.$rmListeners$.map((rmListener) => rmListener());
3574
3621
  hostRef.$rmListeners$ = void 0;
3575
3622
  }
@@ -3615,7 +3662,7 @@ var proxyCustomElement = (Cstr, compactMeta) => {
3615
3662
  cmpMeta.$flags$ |= 8 /* needsShadowDomShim */;
3616
3663
  }
3617
3664
  if (BUILD21.experimentalSlotFixes) {
3618
- if (BUILD21.scoped && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
3665
+ if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
3619
3666
  patchPseudoShadowDom(Cstr.prototype);
3620
3667
  }
3621
3668
  } else {
@@ -3645,6 +3692,9 @@ var proxyCustomElement = (Cstr, compactMeta) => {
3645
3692
  connectedCallback() {
3646
3693
  if (!this.__hasHostListenerAttached) {
3647
3694
  const hostRef = getHostRef(this);
3695
+ if (!hostRef) {
3696
+ return;
3697
+ }
3648
3698
  addHostEventListeners(this, hostRef, cmpMeta.$listeners$, false);
3649
3699
  this.__hasHostListenerAttached = true;
3650
3700
  }
@@ -3682,7 +3732,7 @@ var forceModeUpdate = (elm) => {
3682
3732
  if (BUILD21.style && BUILD21.mode && !BUILD21.lazyLoad) {
3683
3733
  const mode = computeMode(elm);
3684
3734
  const hostRef = getHostRef(elm);
3685
- if (hostRef.$modeName$ !== mode) {
3735
+ if (hostRef && hostRef.$modeName$ !== mode) {
3686
3736
  const cmpMeta = hostRef.$cmpMeta$;
3687
3737
  const oldScopeId = elm["s-sc"];
3688
3738
  const scopeId2 = getScopeId(cmpMeta, mode);
@@ -3707,6 +3757,9 @@ import { BUILD as BUILD22 } from "@stencil/core/internal/app-data";
3707
3757
  // src/runtime/hmr-component.ts
3708
3758
  var hmrStart = (hostElement, cmpMeta, hmrVersionId) => {
3709
3759
  const hostRef = getHostRef(hostElement);
3760
+ if (!hostRef) {
3761
+ return;
3762
+ }
3710
3763
  hostRef.$flags$ = 1 /* hasConnected */;
3711
3764
  initializeComponent(hostElement, hostRef, cmpMeta, hmrVersionId);
3712
3765
  };
@@ -3799,6 +3852,9 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
3799
3852
  }
3800
3853
  connectedCallback() {
3801
3854
  const hostRef = getHostRef(this);
3855
+ if (!hostRef) {
3856
+ return;
3857
+ }
3802
3858
  if (!this.hasRegisteredEventListeners) {
3803
3859
  this.hasRegisteredEventListeners = true;
3804
3860
  addHostEventListeners(this, hostRef, cmpMeta.$listeners$, false);
@@ -3818,6 +3874,9 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
3818
3874
  plt.raf(() => {
3819
3875
  var _a3;
3820
3876
  const hostRef = getHostRef(this);
3877
+ if (!hostRef) {
3878
+ return;
3879
+ }
3821
3880
  const i2 = deferredConnectedCallbacks.findIndex((host) => host === this);
3822
3881
  if (i2 > -1) {
3823
3882
  deferredConnectedCallbacks.splice(i2, 1);
@@ -3828,11 +3887,12 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
3828
3887
  });
3829
3888
  }
3830
3889
  componentOnReady() {
3831
- return getHostRef(this).$onReadyPromise$;
3890
+ var _a3;
3891
+ return (_a3 = getHostRef(this)) == null ? void 0 : _a3.$onReadyPromise$;
3832
3892
  }
3833
3893
  };
3834
3894
  if (BUILD22.experimentalSlotFixes) {
3835
- if (BUILD22.scoped && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
3895
+ if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
3836
3896
  patchPseudoShadowDom(HostElement.prototype);
3837
3897
  }
3838
3898
  } else {
@@ -4177,7 +4237,7 @@ function proxyHostElement(elm, cstr) {
4177
4237
  get: function() {
4178
4238
  var _a2;
4179
4239
  const ref = getHostRef(this);
4180
- const attrPropVal2 = (_a2 = ref.$instanceValues$) == null ? void 0 : _a2.get(memberName);
4240
+ const attrPropVal2 = (_a2 = ref == null ? void 0 : ref.$instanceValues$) == null ? void 0 : _a2.get(memberName);
4181
4241
  if (origGetter && attrPropVal2 === void 0 && !getValue(this, memberName)) {
4182
4242
  setValue(this, memberName, origGetter.apply(this), cmpMeta);
4183
4243
  }
@@ -4338,13 +4398,16 @@ async function hydrateComponent(win2, results, tagName, elm, waitingElements) {
4338
4398
  if (cmpMeta != null) {
4339
4399
  waitingElements.add(elm);
4340
4400
  const hostRef = getHostRef(this);
4401
+ if (!hostRef) {
4402
+ return;
4403
+ }
4341
4404
  addHostEventListeners(this, hostRef, cmpMeta.$listeners$, false);
4342
4405
  try {
4343
4406
  connectedCallback(elm);
4344
4407
  await elm.componentOnReady();
4345
4408
  results.hydratedCount++;
4346
4409
  const ref = getHostRef(elm);
4347
- const modeName = !ref.$modeName$ ? "$" : ref.$modeName$;
4410
+ const modeName = !(ref == null ? void 0 : ref.$modeName$) ? "$" : ref == null ? void 0 : ref.$modeName$;
4348
4411
  if (!results.components.some((c) => c.tag === tagName && c.mode === modeName)) {
4349
4412
  results.components.push({
4350
4413
  tag: tagName,
@@ -4578,6 +4641,7 @@ var setPlatformHelpers = (helpers) => {
4578
4641
  var supportsShadow = BUILD24.shadowDom;
4579
4642
  var supportsListenerOptions = false;
4580
4643
  var supportsConstructableStylesheets = false;
4644
+ var supportsMutableAdoptedStyleSheets = false;
4581
4645
  var getHostRef = (ref) => {
4582
4646
  if (ref.__stencil__getHostRef) {
4583
4647
  return ref.__stencil__getHostRef();
@@ -4674,6 +4738,7 @@ export {
4674
4738
  styles,
4675
4739
  supportsConstructableStylesheets,
4676
4740
  supportsListenerOptions,
4741
+ supportsMutableAdoptedStyleSheets,
4677
4742
  supportsShadow,
4678
4743
  win,
4679
4744
  writeTask
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/core/internal/hydrate",
3
- "version": "4.35.3",
3
+ "version": "4.36.0",
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.35.3 | MIT Licensed | https://stenciljs.com
2
+ Stencil Hydrate Runner v4.36.0 | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
  var __defProp = Object.defineProperty;
5
5
  var __export = (target, all) => {
@@ -10380,6 +10380,11 @@ function* streamToHtml(node, opts, output) {
10380
10380
  const mode = ` shadowrootmode="open"`;
10381
10381
  yield mode;
10382
10382
  output.currentLineWidth += mode.length;
10383
+ if (node.delegatesFocus) {
10384
+ const delegatesFocusAttr = " shadowrootdelegatesfocus";
10385
+ yield delegatesFocusAttr;
10386
+ output.currentLineWidth += delegatesFocusAttr.length;
10387
+ }
10383
10388
  }
10384
10389
  const attrsLength = node.attributes.length;
10385
10390
  const attributes = opts.prettyHtml && attrsLength > 1 ? cloneAttributes(node.attributes, true) : node.attributes;
@@ -10945,7 +10950,9 @@ var MockElement = class extends MockNode2 {
10945
10950
  addEventListener(this, type, handler);
10946
10951
  }
10947
10952
  attachShadow(_opts) {
10953
+ var _a2;
10948
10954
  const shadowRoot = this.ownerDocument.createDocumentFragment();
10955
+ shadowRoot.delegatesFocus = (_a2 = _opts.delegatesFocus) != null ? _a2 : false;
10949
10956
  this.shadowRoot = shadowRoot;
10950
10957
  return shadowRoot;
10951
10958
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/core/internal",
3
- "version": "4.35.3",
3
+ "version": "4.36.0",
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",