@stencil/core 4.33.1-dev.1749445631.af2acd4 → 4.33.1-dev.1749506469.8e2d607

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.
@@ -1408,15 +1408,19 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
1408
1408
  vnode.$elm$ = hostElm;
1409
1409
  const members = Object.entries(((_a = hostRef.$cmpMeta$) == null ? void 0 : _a.$members$) || {});
1410
1410
  members.forEach(([memberName, [memberFlags, metaAttributeName]]) => {
1411
- var _a2;
1411
+ var _a2, _b;
1412
1412
  if (!(memberFlags & 31 /* Prop */)) {
1413
1413
  return;
1414
1414
  }
1415
1415
  const attributeName = metaAttributeName || memberName;
1416
1416
  const attrVal = hostElm.getAttribute(attributeName);
1417
1417
  if (attrVal !== null) {
1418
- const attrPropVal = parsePropertyValue(attrVal, memberFlags);
1419
- (_a2 = hostRef == null ? void 0 : hostRef.$instanceValues$) == null ? void 0 : _a2.set(memberName, attrPropVal);
1418
+ const attrPropVal = parsePropertyValue(
1419
+ attrVal,
1420
+ memberFlags,
1421
+ import_app_data6.BUILD.formAssociated && !!(((_a2 = hostRef.$cmpMeta$) == null ? void 0 : _a2.$flags$) & 64 /* formAssociated */)
1422
+ );
1423
+ (_b = hostRef == null ? void 0 : hostRef.$instanceValues$) == null ? void 0 : _b.set(memberName, attrPropVal);
1420
1424
  }
1421
1425
  });
1422
1426
  let scopeId2;
@@ -2187,7 +2191,7 @@ var import_app_data15 = require("@stencil/core/internal/app-data");
2187
2191
 
2188
2192
  // src/runtime/parse-property-value.ts
2189
2193
  var import_app_data7 = require("@stencil/core/internal/app-data");
2190
- var parsePropertyValue = (propValue, propType) => {
2194
+ var parsePropertyValue = (propValue, propType, isFormAssociated) => {
2191
2195
  if ((import_app_data7.BUILD.hydrateClientSide || import_app_data7.BUILD.hydrateServerSide) && typeof propValue === "string" && (propValue.startsWith("{") && propValue.endsWith("}") || propValue.startsWith("[") && propValue.endsWith("]"))) {
2192
2196
  try {
2193
2197
  propValue = JSON.parse(propValue);
@@ -2201,7 +2205,11 @@ var parsePropertyValue = (propValue, propType) => {
2201
2205
  }
2202
2206
  if (propValue != null && !isComplexType(propValue)) {
2203
2207
  if (import_app_data7.BUILD.propBoolean && propType & 4 /* Boolean */) {
2204
- return propValue === "false" ? false : propValue === "" || !!propValue;
2208
+ if (import_app_data7.BUILD.formAssociated && isFormAssociated && typeof propValue === "string") {
2209
+ return propValue === "" || !!propValue;
2210
+ } else {
2211
+ return propValue === "false" ? false : propValue === "" || !!propValue;
2212
+ }
2205
2213
  }
2206
2214
  if (import_app_data7.BUILD.propNumber && propType & 2 /* Number */) {
2207
2215
  return typeof propValue === "string" ? parseFloat(propValue) : typeof propValue === "number" ? propValue : NaN;
@@ -3395,7 +3403,11 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
3395
3403
  const oldVal = hostRef.$instanceValues$.get(propName);
3396
3404
  const flags = hostRef.$flags$;
3397
3405
  const instance = import_app_data15.BUILD.lazyLoad ? hostRef.$lazyInstance$ : elm;
3398
- newVal = parsePropertyValue(newVal, cmpMeta.$members$[propName][0]);
3406
+ newVal = parsePropertyValue(
3407
+ newVal,
3408
+ cmpMeta.$members$[propName][0],
3409
+ import_app_data15.BUILD.formAssociated && !!(cmpMeta.$flags$ & 64 /* formAssociated */)
3410
+ );
3399
3411
  const areBothNaN = Number.isNaN(oldVal) && Number.isNaN(newVal);
3400
3412
  const didValueChange = newVal !== oldVal && !areBothNaN;
3401
3413
  if ((!import_app_data15.BUILD.lazyLoad || !(flags & 8 /* isConstructingInstance */) || oldVal === void 0) && didValueChange) {
@@ -3533,7 +3545,13 @@ More information: https://stenciljs.com/docs/properties#prop-mutability`
3533
3545
  } else if (!ref.$instanceValues$.get(memberName) && currentValue) {
3534
3546
  ref.$instanceValues$.set(memberName, currentValue);
3535
3547
  }
3536
- origSetter.apply(this, [parsePropertyValue(newValue, memberFlags)]);
3548
+ origSetter.apply(this, [
3549
+ parsePropertyValue(
3550
+ newValue,
3551
+ memberFlags,
3552
+ import_app_data16.BUILD.formAssociated && !!(cmpMeta.$flags$ & 64 /* formAssociated */)
3553
+ )
3554
+ ]);
3537
3555
  newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
3538
3556
  setValue(this, memberName, newValue, cmpMeta);
3539
3557
  return;
@@ -3559,7 +3577,11 @@ More information: https://stenciljs.com/docs/properties#prop-mutability`
3559
3577
  if (!ref.$instanceValues$.get(memberName) && currentValue) {
3560
3578
  ref.$instanceValues$.set(memberName, currentValue);
3561
3579
  }
3562
- ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, memberFlags);
3580
+ ref.$lazyInstance$[memberName] = parsePropertyValue(
3581
+ newValue,
3582
+ memberFlags,
3583
+ import_app_data16.BUILD.formAssociated && !!(cmpMeta.$flags$ & 64 /* formAssociated */)
3584
+ );
3563
3585
  setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
3564
3586
  };
3565
3587
  if (ref.$lazyInstance$) {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/core/internal/testing",
3
- "version": "4.33.1-dev.1749445631.af2acd4",
3
+ "version": "4.33.1-dev.1749506469.8e2d607",
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.33.1-dev.1749445631.af2acd4 | MIT Licensed | https://stenciljs.com
2
+ Stencil Mock Doc (CommonJS) v4.33.1-dev.1749506469.8e2d607 | 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.33.1-dev.1749445631.af2acd4 | MIT Licensed | https://stenciljs.com
2
+ Stencil Mock Doc v4.33.1-dev.1749506469.8e2d607 | 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.33.1-dev.1749445631.af2acd4",
3
+ "version": "4.33.1-dev.1749506469.8e2d607",
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.33.1-dev.1749445631.af2acd4",
3
+ "version": "4.33.1-dev.1749506469.8e2d607",
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.33.1-dev.1749445631.af2acd4 | MIT Licensed | https://stenciljs.com
2
+ Stencil Screenshot v4.33.1-dev.1749506469.8e2d607 | 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.33.1-dev.1749445631.af2acd4",
3
+ "version": "4.33.1-dev.1749506469.8e2d607",
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.33.1-dev.1749445631.af2acd4 | MIT Licensed | https://stenciljs.com
2
+ Stencil Screenshot Pixel Match v4.33.1-dev.1749506469.8e2d607 | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
  "use strict";
5
5
  var __create = Object.create;