@stencil/core 4.44.2 → 4.45.0-dev.1789362557.c12290d

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.
@@ -4190,13 +4190,14 @@ var scopeSelector = (selector, scopeSelectorText, hostSelector, slotSelector) =>
4190
4190
  }
4191
4191
  }).join(", ");
4192
4192
  };
4193
+ var isScopableAtRule = (selector) => selector.startsWith("@media") || selector.startsWith("@supports") || selector.startsWith("@page") || selector.startsWith("@document") || selector.startsWith("@layer");
4193
4194
  var scopeSelectors = (cssText, scopeSelectorText, hostSelector, slotSelector, commentOriginalSelector) => {
4194
4195
  return processRules(cssText, (rule) => {
4195
4196
  let selector = rule.selector;
4196
4197
  let content = rule.content;
4197
4198
  if (rule.selector[0] !== "@") {
4198
4199
  selector = scopeSelector(rule.selector, scopeSelectorText, hostSelector, slotSelector);
4199
- } else if (rule.selector.startsWith("@media") || rule.selector.startsWith("@supports") || rule.selector.startsWith("@page") || rule.selector.startsWith("@document")) {
4200
+ } else if (isScopableAtRule(rule.selector)) {
4200
4201
  content = scopeSelectors(rule.content, scopeSelectorText, hostSelector, slotSelector, commentOriginalSelector);
4201
4202
  }
4202
4203
  const cssRule = {
@@ -4275,15 +4276,16 @@ var scopeCss = (cssText, scopeId2, commentOriginalSelector) => {
4275
4276
  rule.selector = placeholder + rule.selector;
4276
4277
  return rule;
4277
4278
  };
4278
- cssText = processRules(cssText, (rule) => {
4279
+ const commentSelectors = (input) => processRules(input, (rule) => {
4279
4280
  if (rule.selector[0] !== "@") {
4280
4281
  return processCommentedSelector(rule);
4281
- } else if (rule.selector.startsWith("@media") || rule.selector.startsWith("@supports") || rule.selector.startsWith("@page") || rule.selector.startsWith("@document")) {
4282
- rule.content = processRules(rule.content, processCommentedSelector);
4283
- return rule;
4282
+ }
4283
+ if (isScopableAtRule(rule.selector)) {
4284
+ rule.content = commentSelectors(rule.content);
4284
4285
  }
4285
4286
  return rule;
4286
4287
  });
4288
+ cssText = commentSelectors(cssText);
4287
4289
  }
4288
4290
  const scoped = scopeCssText(cssText, scopeId2, hostScopeId, slotScopeId, commentOriginalSelector);
4289
4291
  cssText = [scoped.cssText, ...commentsWithHash].join("\n");
@@ -4833,7 +4835,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
4833
4835
  if (import_app_data13.BUILD.vdomKey && idxInOld >= 0) {
4834
4836
  elmToMove = oldCh[idxInOld];
4835
4837
  if (elmToMove.$tag$ !== newStartVnode.$tag$) {
4836
- node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld);
4838
+ node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx);
4837
4839
  } else {
4838
4840
  patch(elmToMove, newStartVnode, isInitialRender);
4839
4841
  oldCh[idxInOld] = void 0;
@@ -5725,23 +5727,28 @@ More information: https://stenciljs.com/docs/properties#prop-mutability`
5725
5727
  }
5726
5728
  return;
5727
5729
  }
5728
- const setterSetVal = () => {
5730
+ const parsedValue = parsePropertyValue(
5731
+ newValue,
5732
+ memberFlags,
5733
+ import_app_data16.BUILD.formAssociated && !!(cmpMeta.$flags$ & 64 /* formAssociated */)
5734
+ );
5735
+ const setterSetVal = (val) => {
5729
5736
  const currentValue = ref.$lazyInstance$[memberName];
5730
5737
  if (!ref.$instanceValues$.get(memberName) && currentValue) {
5731
5738
  ref.$instanceValues$.set(memberName, currentValue);
5732
5739
  }
5733
- ref.$lazyInstance$[memberName] = parsePropertyValue(
5734
- newValue,
5735
- memberFlags,
5736
- import_app_data16.BUILD.formAssociated && !!(cmpMeta.$flags$ & 64 /* formAssociated */)
5737
- );
5740
+ ref.$lazyInstance$[memberName] = val;
5738
5741
  setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
5739
5742
  };
5740
5743
  if (ref.$lazyInstance$) {
5741
- setterSetVal();
5744
+ setterSetVal(parsedValue);
5742
5745
  } else {
5746
+ ref.$instanceValues$.set(memberName, parsedValue);
5743
5747
  ref.$fetchedCbList$.push(() => {
5744
- setterSetVal();
5748
+ const pendingValue = ref.$instanceValues$.get(memberName);
5749
+ if (ref.$lazyInstance$[memberName] !== pendingValue) {
5750
+ setterSetVal(pendingValue);
5751
+ }
5745
5752
  });
5746
5753
  }
5747
5754
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/core/internal/testing",
3
- "version": "4.44.2",
3
+ "version": "4.45.0-dev.1789362557.c12290d",
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.44.2 | MIT Licensed | https://stenciljs.com
2
+ Stencil Mock Doc (CommonJS) v4.45.0-dev.1789362557.c12290d | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
  "use strict";
5
5
  var __defProp = Object.defineProperty;
@@ -9839,11 +9839,14 @@ function resetWindow(win) {
9839
9839
  } catch (e2) {
9840
9840
  }
9841
9841
  }
9842
- win.fetch = null;
9843
- win.Headers = null;
9844
- win.Request = null;
9845
- win.Response = null;
9846
- win.FetchError = null;
9842
+ const windowDestroyed = () => {
9843
+ throw new Error("MockWindow was already destroyed");
9844
+ };
9845
+ win.fetch = windowDestroyed;
9846
+ win.Headers = windowDestroyed;
9847
+ win.Request = windowDestroyed;
9848
+ win.Response = windowDestroyed;
9849
+ win.FetchError = windowDestroyed;
9847
9850
  }
9848
9851
  }
9849
9852
  function resetWindowDimensions(win) {
package/mock-doc/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- Stencil Mock Doc v4.44.2 | MIT Licensed | https://stenciljs.com
2
+ Stencil Mock Doc v4.45.0-dev.1789362557.c12290d | 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;
@@ -9787,11 +9787,14 @@ function resetWindow(win) {
9787
9787
  } catch (e2) {
9788
9788
  }
9789
9789
  }
9790
- win.fetch = null;
9791
- win.Headers = null;
9792
- win.Request = null;
9793
- win.Response = null;
9794
- win.FetchError = null;
9790
+ const windowDestroyed = () => {
9791
+ throw new Error("MockWindow was already destroyed");
9792
+ };
9793
+ win.fetch = windowDestroyed;
9794
+ win.Headers = windowDestroyed;
9795
+ win.Request = windowDestroyed;
9796
+ win.Response = windowDestroyed;
9797
+ win.FetchError = windowDestroyed;
9795
9798
  }
9796
9799
  }
9797
9800
  function resetWindowDimensions(win) {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/core/mock-doc",
3
- "version": "4.44.2",
3
+ "version": "4.45.0-dev.1789362557.c12290d",
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.44.2",
3
+ "version": "4.45.0-dev.1789362557.c12290d",
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.44.2 | MIT Licensed | https://stenciljs.com
2
+ Stencil Screenshot v4.45.0-dev.1789362557.c12290d | 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.44.2",
3
+ "version": "4.45.0-dev.1789362557.c12290d",
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.44.2 | MIT Licensed | https://stenciljs.com
2
+ Stencil Screenshot Pixel Match v4.45.0-dev.1789362557.c12290d | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
  "use strict";
5
5
  var __create = Object.create;