@stencil/core 4.35.1-dev.1751000577.7132259 → 4.35.1-dev.1751346287.f018c73

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.
@@ -592,17 +592,24 @@ var globalStyles = (
592
592
  ""
593
593
  );
594
594
 
595
+ // src/utils/style.ts
596
+ function createStyleSheetIfNeededAndSupported(styles2) {
597
+ if (!styles2 || !supportsConstructableStylesheets) return void 0;
598
+ const sheet = new CSSStyleSheet();
599
+ sheet.replaceSync(styles2);
600
+ return sheet;
601
+ }
602
+
595
603
  // src/utils/shadow-root.ts
604
+ var globalStyleSheet;
596
605
  function createShadowRoot(cmpMeta) {
606
+ var _a;
597
607
  const shadowRoot = import_app_data.BUILD.shadowDelegatesFocus ? this.attachShadow({
598
608
  mode: "open",
599
609
  delegatesFocus: !!(cmpMeta.$flags$ & 16 /* shadowDelegatesFocus */)
600
610
  }) : this.attachShadow({ mode: "open" });
601
- if (supportsConstructableStylesheets) {
602
- const sheet = new CSSStyleSheet();
603
- sheet.replaceSync(globalStyles);
604
- shadowRoot.adoptedStyleSheets.push(sheet);
605
- }
611
+ if (globalStyleSheet === void 0) globalStyleSheet = (_a = createStyleSheetIfNeededAndSupported(globalStyles)) != null ? _a : null;
612
+ if (globalStyleSheet) shadowRoot.adoptedStyleSheets.push(globalStyleSheet);
606
613
  }
607
614
 
608
615
  // src/utils/util.ts
@@ -1315,7 +1322,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
1315
1322
  if (supportsConstructableStylesheets) {
1316
1323
  const stylesheet = new CSSStyleSheet();
1317
1324
  stylesheet.replaceSync(style);
1318
- styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
1325
+ styleContainerNode.adoptedStyleSheets.unshift(stylesheet);
1319
1326
  } else {
1320
1327
  const existingStyleContainer = styleContainerNode.querySelector("style");
1321
1328
  if (existingStyleContainer) {
@@ -1340,7 +1347,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
1340
1347
  }
1341
1348
  }
1342
1349
  } else if (import_app_data5.BUILD.constructableCSS && !styleContainerNode.adoptedStyleSheets.includes(style)) {
1343
- styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
1350
+ styleContainerNode.adoptedStyleSheets.push(style);
1344
1351
  }
1345
1352
  }
1346
1353
  return scopeId2;
@@ -2932,6 +2939,8 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
2932
2939
  !isInitialRender && import_app_data13.BUILD.updatable && oldChildren !== null
2933
2940
  ) {
2934
2941
  removeVnodes(oldChildren, 0, oldChildren.length - 1);
2942
+ } else if (import_app_data13.BUILD.hydrateClientSide && isInitialRender && import_app_data13.BUILD.updatable && oldChildren !== null && newChildren === null) {
2943
+ newVNode2.$children$ = oldChildren;
2935
2944
  }
2936
2945
  if (import_app_data13.BUILD.svg && isSvgMode && tag === "svg") {
2937
2946
  isSvgMode = false;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/core/internal/testing",
3
- "version": "4.35.1-dev.1751000577.7132259",
3
+ "version": "4.35.1-dev.1751346287.f018c73",
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.35.1-dev.1751000577.7132259 | MIT Licensed | https://stenciljs.com
2
+ Stencil Mock Doc (CommonJS) v4.35.1-dev.1751346287.f018c73 | 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.35.1-dev.1751000577.7132259 | MIT Licensed | https://stenciljs.com
2
+ Stencil Mock Doc v4.35.1-dev.1751346287.f018c73 | 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.35.1-dev.1751000577.7132259",
3
+ "version": "4.35.1-dev.1751346287.f018c73",
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.35.1-dev.1751000577.7132259",
3
+ "version": "4.35.1-dev.1751346287.f018c73",
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.35.1-dev.1751000577.7132259 | MIT Licensed | https://stenciljs.com
2
+ Stencil Screenshot v4.35.1-dev.1751346287.f018c73 | 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.35.1-dev.1751000577.7132259",
3
+ "version": "4.35.1-dev.1751346287.f018c73",
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.35.1-dev.1751000577.7132259 | MIT Licensed | https://stenciljs.com
2
+ Stencil Screenshot Pixel Match v4.35.1-dev.1751346287.f018c73 | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
  "use strict";
5
5
  var __create = Object.create;