@stencil/core 4.45.1-dev.1790744939.423c579 → 4.45.1-dev.1790831344.bc393d0

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,7 +4190,7 @@ 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
+ var isScopableAtRule = (selector) => selector.startsWith("@media") || selector.startsWith("@supports") || selector.startsWith("@page") || selector.startsWith("@document") || selector.startsWith("@layer") || selector.startsWith("@container");
4194
4194
  var scopeSelectors = (cssText, scopeSelectorText, hostSelector, slotSelector, commentOriginalSelector) => {
4195
4195
  return processRules(cssText, (rule) => {
4196
4196
  let selector = rule.selector;
@@ -4411,7 +4411,12 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
4411
4411
  newClasses = [...new Set(newClasses)].filter((c) => c);
4412
4412
  classList.add(...newClasses);
4413
4413
  } else {
4414
- classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
4414
+ let removedClasses = oldClasses.filter((c) => c && !newClasses.includes(c));
4415
+ if (import_app_data11.BUILD.hydrateClientSide && initialRender && !(flags & 4 /* isHost */)) {
4416
+ const ownClasses = getOwnHostClasses(elm);
4417
+ removedClasses = removedClasses.filter((c) => !ownClasses.includes(c));
4418
+ }
4419
+ classList.remove(...removedClasses);
4415
4420
  classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
4416
4421
  }
4417
4422
  } else if (import_app_data11.BUILD.vdomStyle && memberName === "style") {
@@ -4537,6 +4542,18 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
4537
4542
  var ENUMERATED_ATTRIBUTES = /* @__PURE__ */ new Set(["draggable", "contenteditable", "spellcheck"]);
4538
4543
  var isEnumeratedAttribute = (attrName) => ENUMERATED_ATTRIBUTES.has(attrName) || attrName.startsWith("aria-");
4539
4544
  var parseClassListRegex = /\s/;
4545
+ var getOwnHostClasses = (elm) => {
4546
+ var _a2, _b, _c;
4547
+ const hostRef = getHostRef(elm);
4548
+ if (!hostRef || !(hostRef.$flags$ & 2 /* hasRendered */)) {
4549
+ return [];
4550
+ }
4551
+ const ownClasses = parseClassList((_b = (_a2 = hostRef.$vnode$) == null ? void 0 : _a2.$attrs$) == null ? void 0 : _b.class);
4552
+ if (import_app_data11.BUILD.hydratedClass) {
4553
+ ownClasses.push((_c = import_app_data11.BUILD.hydratedSelectorName) != null ? _c : "hydrated");
4554
+ }
4555
+ return ownClasses;
4556
+ };
4540
4557
  var parseClassList = (value) => {
4541
4558
  if (typeof value === "object" && value && "baseVal" in value) {
4542
4559
  value = value.baseVal;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/core/internal/testing",
3
- "version": "4.45.1-dev.1790744939.423c579",
3
+ "version": "4.45.1-dev.1790831344.bc393d0",
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.45.1-dev.1790744939.423c579 | MIT Licensed | https://stenciljs.com
2
+ Stencil Mock Doc (CommonJS) v4.45.1-dev.1790831344.bc393d0 | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
  "use strict";
5
5
  var __defProp = Object.defineProperty;
@@ -6615,13 +6615,15 @@ var MockTokenList = class {
6615
6615
  token = String(token);
6616
6616
  return getItems(this.elm, this.attr).includes(token);
6617
6617
  }
6618
- toggle(token) {
6618
+ toggle(token, force) {
6619
6619
  token = String(token);
6620
- if (this.contains(token) === true) {
6621
- this.remove(token);
6622
- } else {
6620
+ const shouldAdd = force === void 0 ? !this.contains(token) : !!force;
6621
+ if (shouldAdd) {
6623
6622
  this.add(token);
6623
+ } else {
6624
+ this.remove(token);
6624
6625
  }
6626
+ return shouldAdd;
6625
6627
  }
6626
6628
  get length() {
6627
6629
  return getItems(this.elm, this.attr).length;
@@ -961,7 +961,7 @@ declare class MockTokenList {
961
961
  add(...tokens: string[]): void;
962
962
  remove(...tokens: string[]): void;
963
963
  contains(token: string): boolean;
964
- toggle(token: string): void;
964
+ toggle(token: string, force?: boolean): boolean;
965
965
  get length(): number;
966
966
  item(index: number): string;
967
967
  toString(): string;
package/mock-doc/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- Stencil Mock Doc v4.45.1-dev.1790744939.423c579 | MIT Licensed | https://stenciljs.com
2
+ Stencil Mock Doc v4.45.1-dev.1790831344.bc393d0 | 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;
@@ -6563,13 +6563,15 @@ var MockTokenList = class {
6563
6563
  token = String(token);
6564
6564
  return getItems(this.elm, this.attr).includes(token);
6565
6565
  }
6566
- toggle(token) {
6566
+ toggle(token, force) {
6567
6567
  token = String(token);
6568
- if (this.contains(token) === true) {
6569
- this.remove(token);
6570
- } else {
6568
+ const shouldAdd = force === void 0 ? !this.contains(token) : !!force;
6569
+ if (shouldAdd) {
6571
6570
  this.add(token);
6571
+ } else {
6572
+ this.remove(token);
6572
6573
  }
6574
+ return shouldAdd;
6573
6575
  }
6574
6576
  get length() {
6575
6577
  return getItems(this.elm, this.attr).length;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/core/mock-doc",
3
- "version": "4.45.1-dev.1790744939.423c579",
3
+ "version": "4.45.1-dev.1790831344.bc393d0",
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.45.1-dev.1790744939.423c579",
3
+ "version": "4.45.1-dev.1790831344.bc393d0",
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.45.1-dev.1790744939.423c579 | MIT Licensed | https://stenciljs.com
2
+ Stencil Screenshot v4.45.1-dev.1790831344.bc393d0 | 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.45.1-dev.1790744939.423c579",
3
+ "version": "4.45.1-dev.1790831344.bc393d0",
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.45.1-dev.1790744939.423c579 | MIT Licensed | https://stenciljs.com
2
+ Stencil Screenshot Pixel Match v4.45.1-dev.1790831344.bc393d0 | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
  "use strict";
5
5
  var __create = Object.create;