@stencil/core 4.33.1-dev.1749248891.8108e9b → 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 +49 -63
- 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/stencil-public-compiler.d.ts +1 -11
- 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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Stencil Hydrate Platform v4.33.1-dev.
|
|
2
|
+
Stencil Hydrate Platform v4.33.1-dev.1749506469.8e2d607 | MIT Licensed | https://stenciljs.com
|
|
3
3
|
*/
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
5
5
|
var __export = (target, all) => {
|
|
@@ -1065,15 +1065,19 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
|
|
|
1065
1065
|
vnode.$elm$ = hostElm;
|
|
1066
1066
|
const members = Object.entries(((_a = hostRef.$cmpMeta$) == null ? void 0 : _a.$members$) || {});
|
|
1067
1067
|
members.forEach(([memberName, [memberFlags, metaAttributeName]]) => {
|
|
1068
|
-
var _a2;
|
|
1068
|
+
var _a2, _b;
|
|
1069
1069
|
if (!(memberFlags & 31 /* Prop */)) {
|
|
1070
1070
|
return;
|
|
1071
1071
|
}
|
|
1072
1072
|
const attributeName = metaAttributeName || memberName;
|
|
1073
1073
|
const attrVal = hostElm.getAttribute(attributeName);
|
|
1074
1074
|
if (attrVal !== null) {
|
|
1075
|
-
const attrPropVal = parsePropertyValue(
|
|
1076
|
-
|
|
1075
|
+
const attrPropVal = parsePropertyValue(
|
|
1076
|
+
attrVal,
|
|
1077
|
+
memberFlags,
|
|
1078
|
+
BUILD7.formAssociated && !!(((_a2 = hostRef.$cmpMeta$) == null ? void 0 : _a2.$flags$) & 64 /* formAssociated */)
|
|
1079
|
+
);
|
|
1080
|
+
(_b = hostRef == null ? void 0 : hostRef.$instanceValues$) == null ? void 0 : _b.set(memberName, attrPropVal);
|
|
1077
1081
|
}
|
|
1078
1082
|
});
|
|
1079
1083
|
let scopeId2;
|
|
@@ -1844,7 +1848,7 @@ import { BUILD as BUILD16 } from "@stencil/core/internal/app-data";
|
|
|
1844
1848
|
|
|
1845
1849
|
// src/runtime/parse-property-value.ts
|
|
1846
1850
|
import { BUILD as BUILD8 } from "@stencil/core/internal/app-data";
|
|
1847
|
-
var parsePropertyValue = (propValue, propType) => {
|
|
1851
|
+
var parsePropertyValue = (propValue, propType, isFormAssociated) => {
|
|
1848
1852
|
if ((BUILD8.hydrateClientSide || BUILD8.hydrateServerSide) && typeof propValue === "string" && (propValue.startsWith("{") && propValue.endsWith("}") || propValue.startsWith("[") && propValue.endsWith("]"))) {
|
|
1849
1853
|
try {
|
|
1850
1854
|
propValue = JSON.parse(propValue);
|
|
@@ -1858,7 +1862,11 @@ var parsePropertyValue = (propValue, propType) => {
|
|
|
1858
1862
|
}
|
|
1859
1863
|
if (propValue != null && !isComplexType(propValue)) {
|
|
1860
1864
|
if (BUILD8.propBoolean && propType & 4 /* Boolean */) {
|
|
1861
|
-
|
|
1865
|
+
if (BUILD8.formAssociated && isFormAssociated && typeof propValue === "string") {
|
|
1866
|
+
return propValue === "" || !!propValue;
|
|
1867
|
+
} else {
|
|
1868
|
+
return propValue === "false" ? false : propValue === "" || !!propValue;
|
|
1869
|
+
}
|
|
1862
1870
|
}
|
|
1863
1871
|
if (BUILD8.propNumber && propType & 2 /* Number */) {
|
|
1864
1872
|
return typeof propValue === "string" ? parseFloat(propValue) : typeof propValue === "number" ? propValue : NaN;
|
|
@@ -3052,7 +3060,11 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
3052
3060
|
const oldVal = hostRef.$instanceValues$.get(propName);
|
|
3053
3061
|
const flags = hostRef.$flags$;
|
|
3054
3062
|
const instance = BUILD16.lazyLoad ? hostRef.$lazyInstance$ : elm;
|
|
3055
|
-
newVal = parsePropertyValue(
|
|
3063
|
+
newVal = parsePropertyValue(
|
|
3064
|
+
newVal,
|
|
3065
|
+
cmpMeta.$members$[propName][0],
|
|
3066
|
+
BUILD16.formAssociated && !!(cmpMeta.$flags$ & 64 /* formAssociated */)
|
|
3067
|
+
);
|
|
3056
3068
|
const areBothNaN = Number.isNaN(oldVal) && Number.isNaN(newVal);
|
|
3057
3069
|
const didValueChange = newVal !== oldVal && !areBothNaN;
|
|
3058
3070
|
if ((!BUILD16.lazyLoad || !(flags & 8 /* isConstructingInstance */) || oldVal === void 0) && didValueChange) {
|
|
@@ -3190,7 +3202,13 @@ More information: https://stenciljs.com/docs/properties#prop-mutability`
|
|
|
3190
3202
|
} else if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
3191
3203
|
ref.$instanceValues$.set(memberName, currentValue);
|
|
3192
3204
|
}
|
|
3193
|
-
origSetter.apply(this, [
|
|
3205
|
+
origSetter.apply(this, [
|
|
3206
|
+
parsePropertyValue(
|
|
3207
|
+
newValue,
|
|
3208
|
+
memberFlags,
|
|
3209
|
+
BUILD17.formAssociated && !!(cmpMeta.$flags$ & 64 /* formAssociated */)
|
|
3210
|
+
)
|
|
3211
|
+
]);
|
|
3194
3212
|
newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
3195
3213
|
setValue(this, memberName, newValue, cmpMeta);
|
|
3196
3214
|
return;
|
|
@@ -3216,7 +3234,11 @@ More information: https://stenciljs.com/docs/properties#prop-mutability`
|
|
|
3216
3234
|
if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
3217
3235
|
ref.$instanceValues$.set(memberName, currentValue);
|
|
3218
3236
|
}
|
|
3219
|
-
ref.$lazyInstance$[memberName] = parsePropertyValue(
|
|
3237
|
+
ref.$lazyInstance$[memberName] = parsePropertyValue(
|
|
3238
|
+
newValue,
|
|
3239
|
+
memberFlags,
|
|
3240
|
+
BUILD17.formAssociated && !!(cmpMeta.$flags$ & 64 /* formAssociated */)
|
|
3241
|
+
);
|
|
3220
3242
|
setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
|
|
3221
3243
|
};
|
|
3222
3244
|
if (ref.$lazyInstance$) {
|
|
@@ -4046,7 +4068,7 @@ function proxyHostElement(elm, cstr) {
|
|
|
4046
4068
|
let attrPropVal;
|
|
4047
4069
|
const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(cstr.prototype, memberName) || {};
|
|
4048
4070
|
if (attrValue != null) {
|
|
4049
|
-
attrPropVal = parsePropertyValue(attrValue, memberFlags);
|
|
4071
|
+
attrPropVal = parsePropertyValue(attrValue, memberFlags, !!(cmpMeta.$flags$ & 64 /* formAssociated */));
|
|
4050
4072
|
}
|
|
4051
4073
|
if (propValue !== void 0) {
|
|
4052
4074
|
attrPropVal = propValue;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stencil/core/internal/hydrate",
|
|
3
|
-
"version": "4.33.1-dev.
|
|
3
|
+
"version": "4.33.1-dev.1749506469.8e2d607",
|
|
4
4
|
"description": "Stencil internal hydrate 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 Hydrate Runner v4.33.1-dev.
|
|
2
|
+
Stencil Hydrate Runner v4.33.1-dev.1749506469.8e2d607 | MIT Licensed | https://stenciljs.com
|
|
3
3
|
*/
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
5
5
|
var __export = (target, all) => {
|
package/internal/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stencil/core/internal",
|
|
3
|
-
"version": "4.33.1-dev.
|
|
3
|
+
"version": "4.33.1-dev.1749506469.8e2d607",
|
|
4
4
|
"description": "Stencil internals only to be imported by the Stencil Compiler. Breaking changes can and will happen at any time.",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"types": "./index.d.ts",
|
|
@@ -250,6 +250,7 @@ export interface StencilConfig {
|
|
|
250
250
|
docs?: StencilDocsConfig;
|
|
251
251
|
globalScript?: string;
|
|
252
252
|
srcIndexHtml?: string;
|
|
253
|
+
watch?: boolean;
|
|
253
254
|
testing?: TestingConfig;
|
|
254
255
|
maxConcurrentWorkers?: number;
|
|
255
256
|
preamble?: string;
|
|
@@ -272,17 +273,6 @@ export interface StencilConfig {
|
|
|
272
273
|
sys?: CompilerSystem;
|
|
273
274
|
tsconfig?: string;
|
|
274
275
|
validateTypes?: boolean;
|
|
275
|
-
/**
|
|
276
|
-
* Sets whether Stencil will watch for changes in the source files and rebuild the project automatically.
|
|
277
|
-
* @default true
|
|
278
|
-
*/
|
|
279
|
-
watch?: boolean;
|
|
280
|
-
/**
|
|
281
|
-
* External directories to watch for changes. By default, Stencil will watch the root and {@link StencilConfig.srcDir}
|
|
282
|
-
* directory for changes. If you want to watch additional directories, including e.g. `node_modules`, you can add them here.
|
|
283
|
-
* @default []
|
|
284
|
-
*/
|
|
285
|
-
watchExternalDirs?: string[];
|
|
286
276
|
/**
|
|
287
277
|
* An array of RegExp patterns that are matched against all source files before adding
|
|
288
278
|
* to the watch list in watch mode. If the file path matches any of the patterns, when it
|
|
@@ -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