@stencil/core 4.43.3-dev.1776059610.86eebde → 4.43.4

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.
@@ -288,6 +288,7 @@ __export(index_exports, {
288
288
  modeResolutionChain: () => modeResolutionChain,
289
289
  needsScopedSSR: () => needsScopedSSR,
290
290
  nextTick: () => nextTick,
291
+ normalizeWatchers: () => normalizeWatchers,
291
292
  parsePropertyValue: () => parsePropertyValue,
292
293
  plt: () => plt,
293
294
  postUpdateComponent: () => postUpdateComponent,
@@ -4300,6 +4301,31 @@ var getMode = (ref) => {
4300
4301
  return (_a2 = getHostRef(ref)) == null ? void 0 : _a2.$modeName$;
4301
4302
  };
4302
4303
 
4304
+ // src/runtime/normalize-watchers.ts
4305
+ var normalizeWatchers = (raw) => {
4306
+ if (!raw) return void 0;
4307
+ const keys = Object.keys(raw);
4308
+ if (keys.length === 0) return void 0;
4309
+ let hasLegacy = false;
4310
+ for (const propName of keys) {
4311
+ if (hasLegacy) break;
4312
+ for (const h2 of raw[propName]) {
4313
+ if (typeof h2 === "string") {
4314
+ hasLegacy = true;
4315
+ break;
4316
+ }
4317
+ }
4318
+ }
4319
+ if (!hasLegacy) return raw;
4320
+ const out = {};
4321
+ for (const propName of keys) {
4322
+ out[propName] = raw[propName].map(
4323
+ (h2) => typeof h2 === "string" ? { [h2]: 0 } : h2
4324
+ );
4325
+ }
4326
+ return out;
4327
+ };
4328
+
4303
4329
  // src/runtime/proxy-component.ts
4304
4330
  var import_app_data16 = require("@stencil/core/internal/app-data");
4305
4331
 
@@ -5599,7 +5625,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
5599
5625
  if (import_app_data16.BUILD.member && cmpMeta.$members$ || import_app_data16.BUILD.propChangeCallback) {
5600
5626
  if (import_app_data16.BUILD.propChangeCallback) {
5601
5627
  if (Cstr.watchers && !cmpMeta.$watchers$) {
5602
- cmpMeta.$watchers$ = Cstr.watchers;
5628
+ cmpMeta.$watchers$ = normalizeWatchers(Cstr.watchers);
5603
5629
  }
5604
5630
  if (Cstr.deserializers && !cmpMeta.$deserializers$) {
5605
5631
  cmpMeta.$deserializers$ = Cstr.deserializers;
@@ -5831,7 +5857,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
5831
5857
  }
5832
5858
  if (import_app_data17.BUILD.member && !Cstr.isProxied) {
5833
5859
  if (import_app_data17.BUILD.propChangeCallback) {
5834
- cmpMeta.$watchers$ = Cstr.watchers;
5860
+ cmpMeta.$watchers$ = normalizeWatchers(Cstr.watchers);
5835
5861
  cmpMeta.$serializers$ = Cstr.serializers;
5836
5862
  cmpMeta.$deserializers$ = Cstr.deserializers;
5837
5863
  }
@@ -6048,7 +6074,7 @@ var proxyCustomElement = (Cstr, compactMeta) => {
6048
6074
  cmpMeta.$listeners$ = compactMeta[3];
6049
6075
  }
6050
6076
  if (import_app_data20.BUILD.propChangeCallback) {
6051
- cmpMeta.$watchers$ = Cstr.$watchers$;
6077
+ cmpMeta.$watchers$ = normalizeWatchers(Cstr.$watchers$);
6052
6078
  cmpMeta.$deserializers$ = Cstr.$deserializers$;
6053
6079
  cmpMeta.$serializers$ = Cstr.$serializers$;
6054
6080
  }
@@ -6207,7 +6233,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
6207
6233
  let hasSlotRelocation = false;
6208
6234
  lazyBundles.map((lazyBundle) => {
6209
6235
  lazyBundle[1].map((compactMeta) => {
6210
- var _a3, _b, _c;
6236
+ var _a3, _b;
6211
6237
  const cmpMeta = {
6212
6238
  $flags$: compactMeta[0],
6213
6239
  $tagName$: compactMeta[1],
@@ -6227,9 +6253,9 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
6227
6253
  cmpMeta.$attrsToReflect$ = [];
6228
6254
  }
6229
6255
  if (import_app_data21.BUILD.propChangeCallback) {
6230
- cmpMeta.$watchers$ = (_a3 = compactMeta[4]) != null ? _a3 : {};
6231
- cmpMeta.$serializers$ = (_b = compactMeta[5]) != null ? _b : {};
6232
- cmpMeta.$deserializers$ = (_c = compactMeta[6]) != null ? _c : {};
6256
+ cmpMeta.$watchers$ = normalizeWatchers(compactMeta[4]);
6257
+ cmpMeta.$serializers$ = (_a3 = compactMeta[5]) != null ? _a3 : {};
6258
+ cmpMeta.$deserializers$ = (_b = compactMeta[6]) != null ? _b : {};
6233
6259
  }
6234
6260
  if (import_app_data21.BUILD.shadowDom && !supportsShadow && cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
6235
6261
  cmpMeta.$flags$ |= 8 /* needsShadowDomShim */;
@@ -6716,6 +6742,7 @@ var scopedSSR = false;
6716
6742
  modeResolutionChain,
6717
6743
  needsScopedSSR,
6718
6744
  nextTick,
6745
+ normalizeWatchers,
6719
6746
  parsePropertyValue,
6720
6747
  plt,
6721
6748
  postUpdateComponent,
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/core/internal/testing",
3
- "version": "4.43.3-dev.1776059610.86eebde",
3
+ "version": "4.43.4",
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.43.3-dev.1776059610.86eebde | MIT Licensed | https://stenciljs.com
2
+ Stencil Mock Doc (CommonJS) v4.43.4 | 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.43.3-dev.1776059610.86eebde | MIT Licensed | https://stenciljs.com
2
+ Stencil Mock Doc v4.43.4 | 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;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/core/mock-doc",
3
- "version": "4.43.3-dev.1776059610.86eebde",
3
+ "version": "4.43.4",
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.43.3-dev.1776059610.86eebde",
3
+ "version": "4.43.4",
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.43.3-dev.1776059610.86eebde | MIT Licensed | https://stenciljs.com
2
+ Stencil Screenshot v4.43.4 | 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.43.3-dev.1776059610.86eebde",
3
+ "version": "4.43.4",
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.43.3-dev.1776059610.86eebde | MIT Licensed | https://stenciljs.com
2
+ Stencil Screenshot Pixel Match v4.43.4 | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
  "use strict";
5
5
  var __create = Object.create;