@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.
- package/cli/index.cjs +1 -1
- package/cli/index.js +1 -1
- package/cli/package.json +1 -1
- package/compiler/package.json +1 -1
- package/compiler/stencil.js +4 -4
- package/dev-server/client/index.js +1 -1
- package/dev-server/client/package.json +1 -1
- package/dev-server/connector.html +2 -2
- package/dev-server/index.js +1 -1
- package/dev-server/package.json +1 -1
- package/dev-server/server-process.js +2 -2
- package/internal/app-data/package.json +1 -1
- package/internal/app-globals/package.json +1 -1
- package/internal/client/index.js +31 -9
- package/internal/client/package.json +1 -1
- package/internal/client/patch-browser.js +1 -1
- package/internal/hydrate/index.js +32 -10
- package/internal/hydrate/package.json +1 -1
- package/internal/hydrate/runner.js +1 -1
- package/internal/package.json +1 -1
- package/internal/testing/index.js +30 -8
- package/internal/testing/package.json +1 -1
- package/mock-doc/index.cjs +1 -1
- package/mock-doc/index.js +1 -1
- package/mock-doc/package.json +1 -1
- package/package.json +1 -1
- package/screenshot/index.js +1 -1
- package/screenshot/package.json +1 -1
- package/screenshot/pixel-match.js +1 -1
- package/sys/node/index.js +12 -12
- package/sys/node/package.json +1 -1
- package/sys/node/worker.js +1 -1
- package/testing/index.js +1 -1
- package/testing/package.json +1 -1
|
@@ -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(
|
|
1419
|
-
|
|
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
|
-
|
|
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(
|
|
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, [
|
|
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(
|
|
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.
|
|
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
|
package/mock-doc/index.cjs
CHANGED
package/mock-doc/index.js
CHANGED
package/mock-doc/package.json
CHANGED
package/package.json
CHANGED
package/screenshot/index.js
CHANGED
package/screenshot/package.json
CHANGED