@stencil/core 4.45.1 → 4.45.2-dev.1791263369.8b082e0
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 +179 -87
- package/cli/index.js +179 -87
- package/cli/package.json +1 -1
- package/compiler/package.json +1 -1
- package/compiler/stencil.js +191 -94
- 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 +182 -90
- package/internal/app-data/package.json +1 -1
- package/internal/app-globals/package.json +1 -1
- package/internal/client/index.js +42 -28
- package/internal/client/package.json +1 -1
- package/internal/client/patch-browser.js +1 -1
- package/internal/client/shadow-css.js +1 -1
- package/internal/hydrate/index.js +220 -114
- package/internal/hydrate/package.json +1 -1
- package/internal/hydrate/runner.js +185 -91
- package/internal/package.json +1 -1
- package/internal/testing/index.js +219 -113
- package/internal/testing/package.json +1 -1
- package/mock-doc/index.cjs +7 -5
- package/mock-doc/index.d.ts +1 -1
- package/mock-doc/index.js +7 -5
- package/mock-doc/package.json +1 -1
- package/package.json +1 -1
- package/screenshot/index.js +178 -86
- package/screenshot/package.json +1 -1
- package/screenshot/pixel-match.js +1 -1
- package/sys/node/glob.js +1 -1
- package/sys/node/index.js +40 -40
- package/sys/node/package.json +1 -1
- package/sys/node/worker.js +1 -1
- package/testing/index.js +180 -88
- package/testing/package.json +1 -1
package/internal/client/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Stencil Client Platform v4.45.
|
|
2
|
+
Stencil Client Platform v4.45.2-dev.1791263369.8b082e0 | MIT Licensed | https://stenciljs.com
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
// src/client/client-build.ts
|
|
@@ -289,7 +289,7 @@ var queueDomWrites = [];
|
|
|
289
289
|
var queueDomWritesLow = [];
|
|
290
290
|
var scheduleFlush = () => {
|
|
291
291
|
var _a;
|
|
292
|
-
return ((_a = win.document) == null ? void 0 : _a.hidden) ?
|
|
292
|
+
return ((_a = win.document) == null ? void 0 : _a.hidden) ? setTimeout(flush, 16) : plt.raf(flush);
|
|
293
293
|
};
|
|
294
294
|
var queueTask = (queue, write) => (cb) => {
|
|
295
295
|
queue.push(cb);
|
|
@@ -2076,7 +2076,7 @@ var scopeSelector = (selector, scopeSelectorText, hostSelector, slotSelector) =>
|
|
|
2076
2076
|
}
|
|
2077
2077
|
}).join(", ");
|
|
2078
2078
|
};
|
|
2079
|
-
var isScopableAtRule = (selector) => selector.startsWith("@media") || selector.startsWith("@supports") || selector.startsWith("@page") || selector.startsWith("@document") || selector.startsWith("@layer");
|
|
2079
|
+
var isScopableAtRule = (selector) => selector.startsWith("@media") || selector.startsWith("@supports") || selector.startsWith("@page") || selector.startsWith("@document") || selector.startsWith("@layer") || selector.startsWith("@container");
|
|
2080
2080
|
var scopeSelectors = (cssText, scopeSelectorText, hostSelector, slotSelector, commentOriginalSelector) => {
|
|
2081
2081
|
return processRules(cssText, (rule) => {
|
|
2082
2082
|
let selector = rule.selector;
|
|
@@ -2432,7 +2432,12 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
2432
2432
|
newClasses = [...new Set(newClasses)].filter((c) => c);
|
|
2433
2433
|
classList.add(...newClasses);
|
|
2434
2434
|
} else {
|
|
2435
|
-
|
|
2435
|
+
let removedClasses = oldClasses.filter((c) => c && !newClasses.includes(c));
|
|
2436
|
+
if (BUILD18.hydrateClientSide && initialRender && !(flags & 4 /* isHost */)) {
|
|
2437
|
+
const ownClasses = getOwnHostClasses(elm);
|
|
2438
|
+
removedClasses = removedClasses.filter((c) => !ownClasses.includes(c));
|
|
2439
|
+
}
|
|
2440
|
+
classList.remove(...removedClasses);
|
|
2436
2441
|
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
2437
2442
|
}
|
|
2438
2443
|
} else if (BUILD18.vdomStyle && memberName === "style") {
|
|
@@ -2558,6 +2563,18 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
2558
2563
|
var ENUMERATED_ATTRIBUTES = /* @__PURE__ */ new Set(["draggable", "contenteditable", "spellcheck"]);
|
|
2559
2564
|
var isEnumeratedAttribute = (attrName) => ENUMERATED_ATTRIBUTES.has(attrName) || attrName.startsWith("aria-");
|
|
2560
2565
|
var parseClassListRegex = /\s/;
|
|
2566
|
+
var getOwnHostClasses = (elm) => {
|
|
2567
|
+
var _a, _b, _c;
|
|
2568
|
+
const hostRef = getHostRef(elm);
|
|
2569
|
+
if (!hostRef || !(hostRef.$flags$ & 2 /* hasRendered */)) {
|
|
2570
|
+
return [];
|
|
2571
|
+
}
|
|
2572
|
+
const ownClasses = parseClassList((_b = (_a = hostRef.$vnode$) == null ? void 0 : _a.$attrs$) == null ? void 0 : _b.class);
|
|
2573
|
+
if (BUILD18.hydratedClass) {
|
|
2574
|
+
ownClasses.push((_c = BUILD18.hydratedSelectorName) != null ? _c : "hydrated");
|
|
2575
|
+
}
|
|
2576
|
+
return ownClasses;
|
|
2577
|
+
};
|
|
2561
2578
|
var parseClassList = (value) => {
|
|
2562
2579
|
if (typeof value === "object" && value && "baseVal" in value) {
|
|
2563
2580
|
value = value.baseVal;
|
|
@@ -3630,6 +3647,19 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
3630
3647
|
|
|
3631
3648
|
// src/runtime/proxy-component.ts
|
|
3632
3649
|
var reflectedAttrValue = (propValue) => propValue == null || propValue === false ? null : propValue === true ? "" : String(propValue);
|
|
3650
|
+
var replayPendingSetterValues = (hostRef, cmpMeta) => {
|
|
3651
|
+
var _a;
|
|
3652
|
+
const instance = hostRef.$lazyInstance$;
|
|
3653
|
+
if (!instance) return;
|
|
3654
|
+
for (const [memberName, [memberFlags]] of Object.entries((_a = cmpMeta.$members$) != null ? _a : {})) {
|
|
3655
|
+
if (memberFlags & 4096 /* Setter */ && hostRef.$instanceValues$.has(memberName)) {
|
|
3656
|
+
const pendingValue = hostRef.$instanceValues$.get(memberName);
|
|
3657
|
+
if (instance[memberName] !== pendingValue) {
|
|
3658
|
+
instance[memberName] = pendingValue;
|
|
3659
|
+
}
|
|
3660
|
+
}
|
|
3661
|
+
}
|
|
3662
|
+
};
|
|
3633
3663
|
var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
3634
3664
|
var _a, _b;
|
|
3635
3665
|
const prototype = Cstr.prototype;
|
|
@@ -3686,9 +3716,8 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
3686
3716
|
return getValue(this, memberName);
|
|
3687
3717
|
}
|
|
3688
3718
|
const ref = getHostRef(this);
|
|
3689
|
-
|
|
3690
|
-
|
|
3691
|
-
return instance[memberName];
|
|
3719
|
+
if (!ref) return prototype[memberName];
|
|
3720
|
+
return ref.$lazyInstance$ ? ref.$lazyInstance$[memberName] : getValue(this, memberName);
|
|
3692
3721
|
}
|
|
3693
3722
|
if (!BUILD23.lazyLoad) {
|
|
3694
3723
|
return origGetter ? origGetter.apply(this) : getValue(this, memberName);
|
|
@@ -3742,13 +3771,6 @@ More information: https://stenciljs.com/docs/properties#prop-mutability`
|
|
|
3742
3771
|
if (BUILD23.lazyLoad) {
|
|
3743
3772
|
if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
|
|
3744
3773
|
setValue(this, memberName, newValue, cmpMeta);
|
|
3745
|
-
if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
|
|
3746
|
-
ref.$fetchedCbList$.push(() => {
|
|
3747
|
-
if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
|
|
3748
|
-
ref.$lazyInstance$[memberName] = newValue;
|
|
3749
|
-
}
|
|
3750
|
-
});
|
|
3751
|
-
}
|
|
3752
3774
|
return;
|
|
3753
3775
|
}
|
|
3754
3776
|
const parsedValue = parsePropertyValue(
|
|
@@ -3756,24 +3778,15 @@ More information: https://stenciljs.com/docs/properties#prop-mutability`
|
|
|
3756
3778
|
memberFlags,
|
|
3757
3779
|
BUILD23.formAssociated && !!(cmpMeta.$flags$ & 64 /* formAssociated */)
|
|
3758
3780
|
);
|
|
3759
|
-
|
|
3781
|
+
if (ref.$lazyInstance$) {
|
|
3760
3782
|
const currentValue = ref.$lazyInstance$[memberName];
|
|
3761
3783
|
if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
3762
3784
|
ref.$instanceValues$.set(memberName, currentValue);
|
|
3763
3785
|
}
|
|
3764
|
-
ref.$lazyInstance$[memberName] =
|
|
3786
|
+
ref.$lazyInstance$[memberName] = parsedValue;
|
|
3765
3787
|
setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
|
|
3766
|
-
};
|
|
3767
|
-
if (ref.$lazyInstance$) {
|
|
3768
|
-
setterSetVal(parsedValue);
|
|
3769
3788
|
} else {
|
|
3770
3789
|
ref.$instanceValues$.set(memberName, parsedValue);
|
|
3771
|
-
ref.$fetchedCbList$.push(() => {
|
|
3772
|
-
const pendingValue = ref.$instanceValues$.get(memberName);
|
|
3773
|
-
if (ref.$lazyInstance$[memberName] !== pendingValue) {
|
|
3774
|
-
setterSetVal(pendingValue);
|
|
3775
|
-
}
|
|
3776
|
-
});
|
|
3777
3790
|
}
|
|
3778
3791
|
}
|
|
3779
3792
|
}
|
|
@@ -3855,11 +3868,11 @@ More information: https://stenciljs.com/docs/properties#prop-mutability`
|
|
|
3855
3868
|
}
|
|
3856
3869
|
const isSpuriousBooleanRemoval = isBooleanTarget && newValue === null && this[propName] === void 0;
|
|
3857
3870
|
if (isBooleanTarget) {
|
|
3858
|
-
|
|
3871
|
+
const isFormAssociated = BUILD23.formAssociated && !!(cmpMeta.$flags$ & 64 /* formAssociated */);
|
|
3872
|
+
newValue = newValue === null || newValue === "false" && !isFormAssociated ? false : true;
|
|
3859
3873
|
}
|
|
3860
|
-
const currentValue = BUILD23.lazyLoad && propMemberFlags & 4096 /* Setter */ ? hostRef.$instanceValues$.get(propName) : this[propName];
|
|
3861
3874
|
const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
|
|
3862
|
-
if (!isSpuriousBooleanRemoval && newValue !=
|
|
3875
|
+
if (!isSpuriousBooleanRemoval && newValue != this[propName] && (!propDesc.get || !!propDesc.set)) {
|
|
3863
3876
|
this[propName] = newValue;
|
|
3864
3877
|
}
|
|
3865
3878
|
});
|
|
@@ -3932,6 +3945,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
3932
3945
|
}
|
|
3933
3946
|
if (BUILD24.member) {
|
|
3934
3947
|
hostRef.$flags$ &= ~8 /* isConstructingInstance */;
|
|
3948
|
+
replayPendingSetterValues(hostRef, cmpMeta);
|
|
3935
3949
|
}
|
|
3936
3950
|
if (BUILD24.propChangeCallback) {
|
|
3937
3951
|
hostRef.$flags$ |= 128 /* isWatchReady */;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stencil/core/internal/client",
|
|
3
|
-
"version": "4.45.
|
|
3
|
+
"version": "4.45.2-dev.1791263369.8b082e0",
|
|
4
4
|
"description": "Stencil internal client platform to be imported by the Stencil Compiler and internal runtime. Breaking changes can and will happen at any time.",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"exports": "./index.js",
|
|
@@ -299,7 +299,7 @@ var scopeSelector = (selector, scopeSelectorText, hostSelector, slotSelector) =>
|
|
|
299
299
|
}
|
|
300
300
|
}).join(", ");
|
|
301
301
|
};
|
|
302
|
-
var isScopableAtRule = (selector) => selector.startsWith("@media") || selector.startsWith("@supports") || selector.startsWith("@page") || selector.startsWith("@document") || selector.startsWith("@layer");
|
|
302
|
+
var isScopableAtRule = (selector) => selector.startsWith("@media") || selector.startsWith("@supports") || selector.startsWith("@page") || selector.startsWith("@document") || selector.startsWith("@layer") || selector.startsWith("@container");
|
|
303
303
|
var scopeSelectors = (cssText, scopeSelectorText, hostSelector, slotSelector, commentOriginalSelector) => {
|
|
304
304
|
return processRules(cssText, (rule) => {
|
|
305
305
|
let selector = rule.selector;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Stencil Hydrate Platform v4.45.
|
|
2
|
+
Stencil Hydrate Platform v4.45.2-dev.1791263369.8b082e0 | MIT Licensed | https://stenciljs.com
|
|
3
3
|
*/
|
|
4
4
|
var __create = Object.create;
|
|
5
5
|
var __defProp = Object.defineProperty;
|
|
@@ -109,6 +109,10 @@ var require_brace_expansion = __commonJS({
|
|
|
109
109
|
var escClose = "\0CLOSE" + Math.random() + "\0";
|
|
110
110
|
var escComma = "\0COMMA" + Math.random() + "\0";
|
|
111
111
|
var escPeriod = "\0PERIOD" + Math.random() + "\0";
|
|
112
|
+
var EXPANSION_MAX = 1e5;
|
|
113
|
+
var EXPANSION_MAX_LENGTH = 4e6;
|
|
114
|
+
var EXPANSION_MAX_DEPTH = 1e3;
|
|
115
|
+
var EXPANSION_MAX_REWRITES = 1e3;
|
|
112
116
|
function numeric(str) {
|
|
113
117
|
return parseInt(str, 10) == str ? parseInt(str, 10) : str.charCodeAt(0);
|
|
114
118
|
}
|
|
@@ -118,33 +122,49 @@ var require_brace_expansion = __commonJS({
|
|
|
118
122
|
function unescapeBraces(str) {
|
|
119
123
|
return str.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join(".");
|
|
120
124
|
}
|
|
125
|
+
function pushAll(target, items) {
|
|
126
|
+
for (var i2 = 0; i2 < items.length; i2++) {
|
|
127
|
+
target.push(items[i2]);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
121
130
|
function parseCommaParts(str) {
|
|
122
|
-
if (!str)
|
|
123
|
-
return [""];
|
|
124
131
|
var parts = [];
|
|
125
|
-
var
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
132
|
+
var carry = "";
|
|
133
|
+
for (; ; ) {
|
|
134
|
+
var m = balanced("{", "}", str);
|
|
135
|
+
if (!m) {
|
|
136
|
+
var tail = str.split(",");
|
|
137
|
+
tail[0] = carry + tail[0];
|
|
138
|
+
pushAll(parts, tail);
|
|
139
|
+
return parts;
|
|
140
|
+
}
|
|
141
|
+
var pre = m.pre;
|
|
142
|
+
var body = m.body;
|
|
143
|
+
var post = m.post;
|
|
144
|
+
var p = pre.split(",");
|
|
145
|
+
p[0] = carry + p[0];
|
|
146
|
+
p[p.length - 1] += "{" + body + "}";
|
|
147
|
+
if (!post.length) {
|
|
148
|
+
pushAll(parts, p);
|
|
149
|
+
return parts;
|
|
150
|
+
}
|
|
151
|
+
carry = p.pop();
|
|
152
|
+
pushAll(parts, p);
|
|
153
|
+
str = post;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
function expandTop(str, options) {
|
|
142
157
|
if (!str)
|
|
143
158
|
return [];
|
|
159
|
+
options = options || {};
|
|
160
|
+
var max = options.max == null ? EXPANSION_MAX : options.max;
|
|
161
|
+
var maxLength = options.maxLength == null ? EXPANSION_MAX_LENGTH : options.maxLength;
|
|
162
|
+
var maxDepth = options.maxDepth == null ? EXPANSION_MAX_DEPTH : options.maxDepth;
|
|
163
|
+
var maxRewrites = options.maxRewrites == null ? EXPANSION_MAX_REWRITES : options.maxRewrites;
|
|
144
164
|
if (str.substr(0, 2) === "{}") {
|
|
145
165
|
str = "\\{\\}" + str.substr(2);
|
|
146
166
|
}
|
|
147
|
-
return expand2(escapeBraces(str), true).map(unescapeBraces);
|
|
167
|
+
return expand2(escapeBraces(str), max, maxLength, maxDepth, 0, maxRewrites, true).map(unescapeBraces);
|
|
148
168
|
}
|
|
149
169
|
function embrace(str) {
|
|
150
170
|
return "{" + str + "}";
|
|
@@ -158,93 +178,165 @@ var require_brace_expansion = __commonJS({
|
|
|
158
178
|
function gte(i2, y) {
|
|
159
179
|
return i2 >= y;
|
|
160
180
|
}
|
|
161
|
-
function
|
|
162
|
-
var
|
|
163
|
-
var
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
181
|
+
function combine(acc, pre, values, max, maxLength, dropEmpties) {
|
|
182
|
+
var out = [];
|
|
183
|
+
var length = 0;
|
|
184
|
+
for (var a = 0; a < acc.length; a++) {
|
|
185
|
+
for (var v = 0; v < values.length; v++) {
|
|
186
|
+
if (out.length >= max) return out;
|
|
187
|
+
var expansion = acc[a] + pre + values[v];
|
|
188
|
+
if (dropEmpties && !expansion) continue;
|
|
189
|
+
if (length + expansion.length > maxLength) return out;
|
|
190
|
+
out.push(expansion);
|
|
191
|
+
length += expansion.length;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
return out;
|
|
195
|
+
}
|
|
196
|
+
function expandSequence(body, isAlphaSequence, max, maxLength) {
|
|
197
|
+
var n = body.split(/\.\./);
|
|
198
|
+
var N = [];
|
|
199
|
+
if (n[0] === void 0 || n[1] === void 0) {
|
|
200
|
+
return N;
|
|
201
|
+
}
|
|
202
|
+
var x = numeric(n[0]);
|
|
203
|
+
var y = numeric(n[1]);
|
|
204
|
+
var width = Math.max(n[0].length, n[1].length);
|
|
205
|
+
var incr = n.length === 3 && n[2] !== void 0 ? Math.max(Math.abs(numeric(n[2])), 1) : 1;
|
|
206
|
+
var test = lte;
|
|
207
|
+
var reverse = y < x;
|
|
208
|
+
if (reverse) {
|
|
209
|
+
incr *= -1;
|
|
210
|
+
test = gte;
|
|
211
|
+
}
|
|
212
|
+
var pad = n.some(isPadded);
|
|
213
|
+
var length = 0;
|
|
214
|
+
for (var i2 = x; test(i2, y) && N.length < max; i2 += incr) {
|
|
215
|
+
var c;
|
|
216
|
+
if (isAlphaSequence) {
|
|
217
|
+
c = String.fromCharCode(i2);
|
|
218
|
+
if (c === "\\") {
|
|
219
|
+
c = "";
|
|
220
|
+
}
|
|
221
|
+
} else {
|
|
222
|
+
c = String(i2);
|
|
223
|
+
if (pad) {
|
|
224
|
+
var need = width - c.length;
|
|
225
|
+
if (need > 0) {
|
|
226
|
+
var z = new Array(need + 1).join("0");
|
|
227
|
+
if (i2 < 0) {
|
|
228
|
+
c = "-" + z + c.slice(1);
|
|
229
|
+
} else {
|
|
230
|
+
c = z + c;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
if (length + c.length > maxLength) break;
|
|
236
|
+
N.push(c);
|
|
237
|
+
length += c.length;
|
|
238
|
+
}
|
|
239
|
+
return N;
|
|
240
|
+
}
|
|
241
|
+
function expand2(str, max, maxLength, maxDepth, depth, maxRewrites, isTop) {
|
|
242
|
+
if (depth > maxDepth) {
|
|
243
|
+
return [str];
|
|
244
|
+
}
|
|
245
|
+
var acc = [""];
|
|
246
|
+
var rewrites = 0;
|
|
247
|
+
var dropEmpties = false;
|
|
248
|
+
var firstGroup = true;
|
|
249
|
+
for (; ; ) {
|
|
250
|
+
const m = balanced("{", "}", str);
|
|
251
|
+
if (!m) {
|
|
252
|
+
return combine(acc, str, [""], max, maxLength, dropEmpties);
|
|
253
|
+
}
|
|
254
|
+
const pre = m.pre;
|
|
255
|
+
if (/\$$/.test(pre)) {
|
|
256
|
+
acc = combine(
|
|
257
|
+
acc,
|
|
258
|
+
pre + "{" + m.body + "}",
|
|
259
|
+
[""],
|
|
260
|
+
max,
|
|
261
|
+
maxLength,
|
|
262
|
+
dropEmpties && !m.post.length
|
|
263
|
+
);
|
|
264
|
+
firstGroup = false;
|
|
265
|
+
if (!m.post.length) break;
|
|
266
|
+
str = m.post;
|
|
267
|
+
continue;
|
|
171
268
|
}
|
|
172
|
-
} else {
|
|
173
269
|
var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
|
|
174
270
|
var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
|
|
175
271
|
var isSequence = isNumericSequence || isAlphaSequence;
|
|
176
272
|
var isOptions = m.body.indexOf(",") >= 0;
|
|
177
273
|
if (!isSequence && !isOptions) {
|
|
178
|
-
if (m.post.match(/,(?!,).*\}/)) {
|
|
274
|
+
if (rewrites < maxRewrites && m.post.match(/,(?!,).*\}/)) {
|
|
275
|
+
rewrites++;
|
|
179
276
|
str = m.pre + "{" + m.body + escClose + m.post;
|
|
180
|
-
|
|
277
|
+
isTop = true;
|
|
278
|
+
continue;
|
|
181
279
|
}
|
|
182
|
-
return
|
|
280
|
+
return combine(
|
|
281
|
+
acc,
|
|
282
|
+
pre + "{" + m.body + "}" + m.post,
|
|
283
|
+
[""],
|
|
284
|
+
max,
|
|
285
|
+
maxLength,
|
|
286
|
+
dropEmpties
|
|
287
|
+
);
|
|
288
|
+
}
|
|
289
|
+
if (firstGroup) {
|
|
290
|
+
dropEmpties = isTop && !isSequence;
|
|
291
|
+
firstGroup = false;
|
|
183
292
|
}
|
|
184
|
-
var
|
|
293
|
+
var values;
|
|
185
294
|
if (isSequence) {
|
|
186
|
-
|
|
295
|
+
values = expandSequence(m.body, isAlphaSequence, max, maxLength);
|
|
187
296
|
} else {
|
|
188
|
-
n = parseCommaParts(m.body);
|
|
189
|
-
if (n.length === 1) {
|
|
190
|
-
n = expand2(n[0], false).map(embrace);
|
|
297
|
+
var n = parseCommaParts(m.body);
|
|
298
|
+
if (n.length === 1 && n[0] !== void 0) {
|
|
299
|
+
n = expand2(n[0], max, maxLength, maxDepth, depth + 1, maxRewrites, false).map(embrace);
|
|
191
300
|
if (n.length === 1) {
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
301
|
+
acc = combine(
|
|
302
|
+
acc,
|
|
303
|
+
pre + n[0],
|
|
304
|
+
[""],
|
|
305
|
+
max,
|
|
306
|
+
maxLength,
|
|
307
|
+
dropEmpties && !m.post.length
|
|
308
|
+
);
|
|
309
|
+
if (!m.post.length) break;
|
|
310
|
+
str = m.post;
|
|
311
|
+
continue;
|
|
195
312
|
}
|
|
196
313
|
}
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
var width = Math.max(n[0].length, n[1].length);
|
|
203
|
-
var incr = n.length == 3 ? Math.abs(numeric(n[2])) : 1;
|
|
204
|
-
var test = lte;
|
|
205
|
-
var reverse = y < x;
|
|
206
|
-
if (reverse) {
|
|
207
|
-
incr *= -1;
|
|
208
|
-
test = gte;
|
|
314
|
+
var dropsEmpties = dropEmpties && !m.post.length && !pre;
|
|
315
|
+
for (var d = 0; dropsEmpties && d < acc.length; d++) {
|
|
316
|
+
if (acc[d]) {
|
|
317
|
+
dropsEmpties = false;
|
|
318
|
+
}
|
|
209
319
|
}
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
for (var
|
|
213
|
-
var
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
if (
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
c = String(i2);
|
|
220
|
-
if (pad) {
|
|
221
|
-
var need = width - c.length;
|
|
222
|
-
if (need > 0) {
|
|
223
|
-
var z = new Array(need + 1).join("0");
|
|
224
|
-
if (i2 < 0)
|
|
225
|
-
c = "-" + z + c.slice(1);
|
|
226
|
-
else
|
|
227
|
-
c = z + c;
|
|
228
|
-
}
|
|
320
|
+
values = [];
|
|
321
|
+
var valuesLength = 0;
|
|
322
|
+
outer: for (var j = 0; j < n.length; j++) {
|
|
323
|
+
var expanded = expand2(n[j], max, maxLength, maxDepth, depth + 1, maxRewrites, false);
|
|
324
|
+
for (var k = 0; k < expanded.length; k++) {
|
|
325
|
+
var v = expanded[k];
|
|
326
|
+
if (dropsEmpties && !v) continue;
|
|
327
|
+
if (values.length >= max || valuesLength + v.length > maxLength) {
|
|
328
|
+
break outer;
|
|
229
329
|
}
|
|
330
|
+
values.push(v);
|
|
331
|
+
valuesLength += v.length;
|
|
230
332
|
}
|
|
231
|
-
N.push(c);
|
|
232
|
-
}
|
|
233
|
-
} else {
|
|
234
|
-
N = [];
|
|
235
|
-
for (var j = 0; j < n.length; j++) {
|
|
236
|
-
N.push.apply(N, expand2(n[j], false));
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
for (var j = 0; j < N.length; j++) {
|
|
240
|
-
for (var k = 0; k < post.length; k++) {
|
|
241
|
-
var expansion = pre + N[j] + post[k];
|
|
242
|
-
if (!isTop || isSequence || expansion)
|
|
243
|
-
expansions.push(expansion);
|
|
244
333
|
}
|
|
245
334
|
}
|
|
335
|
+
acc = combine(acc, pre, values, max, maxLength, dropEmpties && !m.post.length);
|
|
336
|
+
if (!m.post.length) break;
|
|
337
|
+
str = m.post;
|
|
246
338
|
}
|
|
247
|
-
return
|
|
339
|
+
return acc;
|
|
248
340
|
}
|
|
249
341
|
}
|
|
250
342
|
});
|
|
@@ -2067,7 +2159,7 @@ var scopeSelector = (selector, scopeSelectorText, hostSelector, slotSelector) =>
|
|
|
2067
2159
|
}
|
|
2068
2160
|
}).join(", ");
|
|
2069
2161
|
};
|
|
2070
|
-
var isScopableAtRule = (selector) => selector.startsWith("@media") || selector.startsWith("@supports") || selector.startsWith("@page") || selector.startsWith("@document") || selector.startsWith("@layer");
|
|
2162
|
+
var isScopableAtRule = (selector) => selector.startsWith("@media") || selector.startsWith("@supports") || selector.startsWith("@page") || selector.startsWith("@document") || selector.startsWith("@layer") || selector.startsWith("@container");
|
|
2071
2163
|
var scopeSelectors = (cssText, scopeSelectorText, hostSelector, slotSelector, commentOriginalSelector) => {
|
|
2072
2164
|
return processRules(cssText, (rule) => {
|
|
2073
2165
|
let selector = rule.selector;
|
|
@@ -2423,7 +2515,12 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
2423
2515
|
newClasses = [...new Set(newClasses)].filter((c) => c);
|
|
2424
2516
|
classList.add(...newClasses);
|
|
2425
2517
|
} else {
|
|
2426
|
-
|
|
2518
|
+
let removedClasses = oldClasses.filter((c) => c && !newClasses.includes(c));
|
|
2519
|
+
if (BUILD12.hydrateClientSide && initialRender && !(flags & 4 /* isHost */)) {
|
|
2520
|
+
const ownClasses = getOwnHostClasses(elm);
|
|
2521
|
+
removedClasses = removedClasses.filter((c) => !ownClasses.includes(c));
|
|
2522
|
+
}
|
|
2523
|
+
classList.remove(...removedClasses);
|
|
2427
2524
|
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
2428
2525
|
}
|
|
2429
2526
|
} else if (BUILD12.vdomStyle && memberName === "style") {
|
|
@@ -2549,6 +2646,18 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
2549
2646
|
var ENUMERATED_ATTRIBUTES = /* @__PURE__ */ new Set(["draggable", "contenteditable", "spellcheck"]);
|
|
2550
2647
|
var isEnumeratedAttribute = (attrName) => ENUMERATED_ATTRIBUTES.has(attrName) || attrName.startsWith("aria-");
|
|
2551
2648
|
var parseClassListRegex = /\s/;
|
|
2649
|
+
var getOwnHostClasses = (elm) => {
|
|
2650
|
+
var _a2, _b, _c;
|
|
2651
|
+
const hostRef = getHostRef(elm);
|
|
2652
|
+
if (!hostRef || !(hostRef.$flags$ & 2 /* hasRendered */)) {
|
|
2653
|
+
return [];
|
|
2654
|
+
}
|
|
2655
|
+
const ownClasses = parseClassList((_b = (_a2 = hostRef.$vnode$) == null ? void 0 : _a2.$attrs$) == null ? void 0 : _b.class);
|
|
2656
|
+
if (BUILD12.hydratedClass) {
|
|
2657
|
+
ownClasses.push((_c = BUILD12.hydratedSelectorName) != null ? _c : "hydrated");
|
|
2658
|
+
}
|
|
2659
|
+
return ownClasses;
|
|
2660
|
+
};
|
|
2552
2661
|
var parseClassList = (value) => {
|
|
2553
2662
|
if (typeof value === "object" && value && "baseVal" in value) {
|
|
2554
2663
|
value = value.baseVal;
|
|
@@ -3621,6 +3730,19 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
3621
3730
|
|
|
3622
3731
|
// src/runtime/proxy-component.ts
|
|
3623
3732
|
var reflectedAttrValue = (propValue) => propValue == null || propValue === false ? null : propValue === true ? "" : String(propValue);
|
|
3733
|
+
var replayPendingSetterValues = (hostRef, cmpMeta) => {
|
|
3734
|
+
var _a2;
|
|
3735
|
+
const instance = hostRef.$lazyInstance$;
|
|
3736
|
+
if (!instance) return;
|
|
3737
|
+
for (const [memberName, [memberFlags]] of Object.entries((_a2 = cmpMeta.$members$) != null ? _a2 : {})) {
|
|
3738
|
+
if (memberFlags & 4096 /* Setter */ && hostRef.$instanceValues$.has(memberName)) {
|
|
3739
|
+
const pendingValue = hostRef.$instanceValues$.get(memberName);
|
|
3740
|
+
if (instance[memberName] !== pendingValue) {
|
|
3741
|
+
instance[memberName] = pendingValue;
|
|
3742
|
+
}
|
|
3743
|
+
}
|
|
3744
|
+
}
|
|
3745
|
+
};
|
|
3624
3746
|
var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
3625
3747
|
var _a2, _b;
|
|
3626
3748
|
const prototype = Cstr.prototype;
|
|
@@ -3677,9 +3799,8 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
3677
3799
|
return getValue(this, memberName);
|
|
3678
3800
|
}
|
|
3679
3801
|
const ref = getHostRef(this);
|
|
3680
|
-
|
|
3681
|
-
|
|
3682
|
-
return instance[memberName];
|
|
3802
|
+
if (!ref) return prototype[memberName];
|
|
3803
|
+
return ref.$lazyInstance$ ? ref.$lazyInstance$[memberName] : getValue(this, memberName);
|
|
3683
3804
|
}
|
|
3684
3805
|
if (!BUILD17.lazyLoad) {
|
|
3685
3806
|
return origGetter ? origGetter.apply(this) : getValue(this, memberName);
|
|
@@ -3733,13 +3854,6 @@ More information: https://stenciljs.com/docs/properties#prop-mutability`
|
|
|
3733
3854
|
if (BUILD17.lazyLoad) {
|
|
3734
3855
|
if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
|
|
3735
3856
|
setValue(this, memberName, newValue, cmpMeta);
|
|
3736
|
-
if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
|
|
3737
|
-
ref.$fetchedCbList$.push(() => {
|
|
3738
|
-
if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
|
|
3739
|
-
ref.$lazyInstance$[memberName] = newValue;
|
|
3740
|
-
}
|
|
3741
|
-
});
|
|
3742
|
-
}
|
|
3743
3857
|
return;
|
|
3744
3858
|
}
|
|
3745
3859
|
const parsedValue = parsePropertyValue(
|
|
@@ -3747,24 +3861,15 @@ More information: https://stenciljs.com/docs/properties#prop-mutability`
|
|
|
3747
3861
|
memberFlags,
|
|
3748
3862
|
BUILD17.formAssociated && !!(cmpMeta.$flags$ & 64 /* formAssociated */)
|
|
3749
3863
|
);
|
|
3750
|
-
|
|
3864
|
+
if (ref.$lazyInstance$) {
|
|
3751
3865
|
const currentValue = ref.$lazyInstance$[memberName];
|
|
3752
3866
|
if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
3753
3867
|
ref.$instanceValues$.set(memberName, currentValue);
|
|
3754
3868
|
}
|
|
3755
|
-
ref.$lazyInstance$[memberName] =
|
|
3869
|
+
ref.$lazyInstance$[memberName] = parsedValue;
|
|
3756
3870
|
setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
|
|
3757
|
-
};
|
|
3758
|
-
if (ref.$lazyInstance$) {
|
|
3759
|
-
setterSetVal(parsedValue);
|
|
3760
3871
|
} else {
|
|
3761
3872
|
ref.$instanceValues$.set(memberName, parsedValue);
|
|
3762
|
-
ref.$fetchedCbList$.push(() => {
|
|
3763
|
-
const pendingValue = ref.$instanceValues$.get(memberName);
|
|
3764
|
-
if (ref.$lazyInstance$[memberName] !== pendingValue) {
|
|
3765
|
-
setterSetVal(pendingValue);
|
|
3766
|
-
}
|
|
3767
|
-
});
|
|
3768
3873
|
}
|
|
3769
3874
|
}
|
|
3770
3875
|
}
|
|
@@ -3846,11 +3951,11 @@ More information: https://stenciljs.com/docs/properties#prop-mutability`
|
|
|
3846
3951
|
}
|
|
3847
3952
|
const isSpuriousBooleanRemoval = isBooleanTarget && newValue === null && this[propName] === void 0;
|
|
3848
3953
|
if (isBooleanTarget) {
|
|
3849
|
-
|
|
3954
|
+
const isFormAssociated = BUILD17.formAssociated && !!(cmpMeta.$flags$ & 64 /* formAssociated */);
|
|
3955
|
+
newValue = newValue === null || newValue === "false" && !isFormAssociated ? false : true;
|
|
3850
3956
|
}
|
|
3851
|
-
const currentValue = BUILD17.lazyLoad && propMemberFlags & 4096 /* Setter */ ? hostRef.$instanceValues$.get(propName) : this[propName];
|
|
3852
3957
|
const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
|
|
3853
|
-
if (!isSpuriousBooleanRemoval && newValue !=
|
|
3958
|
+
if (!isSpuriousBooleanRemoval && newValue != this[propName] && (!propDesc.get || !!propDesc.set)) {
|
|
3854
3959
|
this[propName] = newValue;
|
|
3855
3960
|
}
|
|
3856
3961
|
});
|
|
@@ -3923,6 +4028,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
3923
4028
|
}
|
|
3924
4029
|
if (BUILD18.member) {
|
|
3925
4030
|
hostRef.$flags$ &= ~8 /* isConstructingInstance */;
|
|
4031
|
+
replayPendingSetterValues(hostRef, cmpMeta);
|
|
3926
4032
|
}
|
|
3927
4033
|
if (BUILD18.propChangeCallback) {
|
|
3928
4034
|
hostRef.$flags$ |= 128 /* isWatchReady */;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stencil/core/internal/hydrate",
|
|
3
|
-
"version": "4.45.
|
|
3
|
+
"version": "4.45.2-dev.1791263369.8b082e0",
|
|
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
|