vue 3.5.0-beta.1 → 3.5.0-beta.2
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/dist/vue.cjs.js +1 -1
- package/dist/vue.cjs.prod.js +1 -1
- package/dist/vue.esm-browser.js +39 -33
- package/dist/vue.esm-browser.prod.js +6 -6
- package/dist/vue.esm-bundler.js +1 -1
- package/dist/vue.global.js +39 -33
- package/dist/vue.global.prod.js +6 -6
- package/dist/vue.runtime.esm-browser.js +30 -27
- package/dist/vue.runtime.esm-browser.prod.js +2 -2
- package/dist/vue.runtime.esm-bundler.js +1 -1
- package/dist/vue.runtime.global.js +30 -27
- package/dist/vue.runtime.global.prod.js +2 -2
- package/package.json +6 -6
package/dist/vue.esm-bundler.js
CHANGED
package/dist/vue.global.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* vue v3.5.0-beta.
|
|
2
|
+
* vue v3.5.0-beta.2
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -535,11 +535,11 @@ var Vue = (function (exports) {
|
|
|
535
535
|
}
|
|
536
536
|
}
|
|
537
537
|
pause() {
|
|
538
|
-
this.flags |=
|
|
538
|
+
this.flags |= 64;
|
|
539
539
|
}
|
|
540
540
|
resume() {
|
|
541
|
-
if (this.flags &
|
|
542
|
-
this.flags &= ~
|
|
541
|
+
if (this.flags & 64) {
|
|
542
|
+
this.flags &= ~64;
|
|
543
543
|
if (pausedQueueEffects.has(this)) {
|
|
544
544
|
pausedQueueEffects.delete(this);
|
|
545
545
|
this.trigger();
|
|
@@ -553,9 +553,6 @@ var Vue = (function (exports) {
|
|
|
553
553
|
if (this.flags & 2 && !(this.flags & 32)) {
|
|
554
554
|
return;
|
|
555
555
|
}
|
|
556
|
-
if (this.flags & 64) {
|
|
557
|
-
return this.trigger();
|
|
558
|
-
}
|
|
559
556
|
if (!(this.flags & 8)) {
|
|
560
557
|
this.flags |= 8;
|
|
561
558
|
this.nextEffect = batchedEffect;
|
|
@@ -599,7 +596,7 @@ var Vue = (function (exports) {
|
|
|
599
596
|
}
|
|
600
597
|
}
|
|
601
598
|
trigger() {
|
|
602
|
-
if (this.flags &
|
|
599
|
+
if (this.flags & 64) {
|
|
603
600
|
pausedQueueEffects.add(this);
|
|
604
601
|
} else if (this.scheduler) {
|
|
605
602
|
this.scheduler();
|
|
@@ -629,6 +626,7 @@ var Vue = (function (exports) {
|
|
|
629
626
|
batchDepth--;
|
|
630
627
|
return;
|
|
631
628
|
}
|
|
629
|
+
batchDepth--;
|
|
632
630
|
let error;
|
|
633
631
|
while (batchedEffect) {
|
|
634
632
|
let e = batchedEffect;
|
|
@@ -647,7 +645,6 @@ var Vue = (function (exports) {
|
|
|
647
645
|
e = next;
|
|
648
646
|
}
|
|
649
647
|
}
|
|
650
|
-
batchDepth--;
|
|
651
648
|
if (error) throw error;
|
|
652
649
|
}
|
|
653
650
|
function prepareDeps(sub) {
|
|
@@ -1050,26 +1047,26 @@ var Vue = (function (exports) {
|
|
|
1050
1047
|
});
|
|
1051
1048
|
},
|
|
1052
1049
|
every(fn, thisArg) {
|
|
1053
|
-
return apply(this, "every", fn, thisArg);
|
|
1050
|
+
return apply(this, "every", fn, thisArg, void 0, arguments);
|
|
1054
1051
|
},
|
|
1055
1052
|
filter(fn, thisArg) {
|
|
1056
|
-
return apply(this, "filter", fn, thisArg, (v) => v.map(toReactive));
|
|
1053
|
+
return apply(this, "filter", fn, thisArg, (v) => v.map(toReactive), arguments);
|
|
1057
1054
|
},
|
|
1058
1055
|
find(fn, thisArg) {
|
|
1059
|
-
return apply(this, "find", fn, thisArg, toReactive);
|
|
1056
|
+
return apply(this, "find", fn, thisArg, toReactive, arguments);
|
|
1060
1057
|
},
|
|
1061
1058
|
findIndex(fn, thisArg) {
|
|
1062
|
-
return apply(this, "findIndex", fn, thisArg);
|
|
1059
|
+
return apply(this, "findIndex", fn, thisArg, void 0, arguments);
|
|
1063
1060
|
},
|
|
1064
1061
|
findLast(fn, thisArg) {
|
|
1065
|
-
return apply(this, "findLast", fn, thisArg, toReactive);
|
|
1062
|
+
return apply(this, "findLast", fn, thisArg, toReactive, arguments);
|
|
1066
1063
|
},
|
|
1067
1064
|
findLastIndex(fn, thisArg) {
|
|
1068
|
-
return apply(this, "findLastIndex", fn, thisArg);
|
|
1065
|
+
return apply(this, "findLastIndex", fn, thisArg, void 0, arguments);
|
|
1069
1066
|
},
|
|
1070
1067
|
// flat, flatMap could benefit from ARRAY_ITERATE but are not straight-forward to implement
|
|
1071
1068
|
forEach(fn, thisArg) {
|
|
1072
|
-
return apply(this, "forEach", fn, thisArg);
|
|
1069
|
+
return apply(this, "forEach", fn, thisArg, void 0, arguments);
|
|
1073
1070
|
},
|
|
1074
1071
|
includes(...args) {
|
|
1075
1072
|
return searchProxy(this, "includes", args);
|
|
@@ -1085,7 +1082,7 @@ var Vue = (function (exports) {
|
|
|
1085
1082
|
return searchProxy(this, "lastIndexOf", args);
|
|
1086
1083
|
},
|
|
1087
1084
|
map(fn, thisArg) {
|
|
1088
|
-
return apply(this, "map", fn, thisArg);
|
|
1085
|
+
return apply(this, "map", fn, thisArg, void 0, arguments);
|
|
1089
1086
|
},
|
|
1090
1087
|
pop() {
|
|
1091
1088
|
return noTracking(this, "pop");
|
|
@@ -1104,7 +1101,7 @@ var Vue = (function (exports) {
|
|
|
1104
1101
|
},
|
|
1105
1102
|
// slice could use ARRAY_ITERATE but also seems to beg for range tracking
|
|
1106
1103
|
some(fn, thisArg) {
|
|
1107
|
-
return apply(this, "some", fn, thisArg);
|
|
1104
|
+
return apply(this, "some", fn, thisArg, void 0, arguments);
|
|
1108
1105
|
},
|
|
1109
1106
|
splice(...args) {
|
|
1110
1107
|
return noTracking(this, "splice", args);
|
|
@@ -1140,8 +1137,13 @@ var Vue = (function (exports) {
|
|
|
1140
1137
|
}
|
|
1141
1138
|
return iter;
|
|
1142
1139
|
}
|
|
1143
|
-
|
|
1140
|
+
const arrayProto = Array.prototype;
|
|
1141
|
+
function apply(self, method, fn, thisArg, wrappedRetFn, args) {
|
|
1144
1142
|
const arr = shallowReadArray(self);
|
|
1143
|
+
let methodFn;
|
|
1144
|
+
if ((methodFn = arr[method]) !== arrayProto[method]) {
|
|
1145
|
+
return methodFn.apply(arr, args);
|
|
1146
|
+
}
|
|
1145
1147
|
let needsWrap = false;
|
|
1146
1148
|
let wrappedFn = fn;
|
|
1147
1149
|
if (arr !== self) {
|
|
@@ -1156,7 +1158,7 @@ var Vue = (function (exports) {
|
|
|
1156
1158
|
};
|
|
1157
1159
|
}
|
|
1158
1160
|
}
|
|
1159
|
-
const result = arr
|
|
1161
|
+
const result = methodFn.call(arr, wrappedFn, thisArg);
|
|
1160
1162
|
return needsWrap && wrappedRetFn ? wrappedRetFn(result) : result;
|
|
1161
1163
|
}
|
|
1162
1164
|
function reduce(self, method, fn, args) {
|
|
@@ -3561,6 +3563,7 @@ var Vue = (function (exports) {
|
|
|
3561
3563
|
const isSVGContainer = (container) => container.namespaceURI.includes("svg") && container.tagName !== "foreignObject";
|
|
3562
3564
|
const isMathMLContainer = (container) => container.namespaceURI.includes("MathML");
|
|
3563
3565
|
const getContainerType = (container) => {
|
|
3566
|
+
if (container.nodeType !== 1) return void 0;
|
|
3564
3567
|
if (isSVGContainer(container)) return "svg";
|
|
3565
3568
|
if (isMathMLContainer(container)) return "mathml";
|
|
3566
3569
|
return void 0;
|
|
@@ -4483,7 +4486,7 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
4483
4486
|
function pruneCache(filter) {
|
|
4484
4487
|
cache.forEach((vnode, key) => {
|
|
4485
4488
|
const name = getComponentName(vnode.type);
|
|
4486
|
-
if (name &&
|
|
4489
|
+
if (name && !filter(name)) {
|
|
4487
4490
|
pruneCacheEntry(key);
|
|
4488
4491
|
}
|
|
4489
4492
|
});
|
|
@@ -4602,6 +4605,7 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
4602
4605
|
} else if (isString(pattern)) {
|
|
4603
4606
|
return pattern.split(",").includes(name);
|
|
4604
4607
|
} else if (isRegExp(pattern)) {
|
|
4608
|
+
pattern.lastIndex = 0;
|
|
4605
4609
|
return pattern.test(name);
|
|
4606
4610
|
}
|
|
4607
4611
|
return false;
|
|
@@ -8091,7 +8095,6 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
8091
8095
|
const effect = new ReactiveEffect(getter);
|
|
8092
8096
|
let scheduler;
|
|
8093
8097
|
if (flush === "sync") {
|
|
8094
|
-
effect.flags |= 64;
|
|
8095
8098
|
scheduler = job;
|
|
8096
8099
|
} else if (flush === "post") {
|
|
8097
8100
|
scheduler = () => queuePostRenderEffect(job, instance && instance.suspense);
|
|
@@ -10321,7 +10324,7 @@ Component that was made reactive: `,
|
|
|
10321
10324
|
return true;
|
|
10322
10325
|
}
|
|
10323
10326
|
|
|
10324
|
-
const version = "3.5.0-beta.
|
|
10327
|
+
const version = "3.5.0-beta.2";
|
|
10325
10328
|
const warn = warn$1 ;
|
|
10326
10329
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
10327
10330
|
const devtools = devtools$1 ;
|
|
@@ -11173,7 +11176,6 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
11173
11176
|
this._ob = null;
|
|
11174
11177
|
if (this.shadowRoot && _createApp !== createApp) {
|
|
11175
11178
|
this._root = this.shadowRoot;
|
|
11176
|
-
this._mount(_def);
|
|
11177
11179
|
} else {
|
|
11178
11180
|
if (this.shadowRoot) {
|
|
11179
11181
|
warn(
|
|
@@ -11186,9 +11188,9 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
11186
11188
|
} else {
|
|
11187
11189
|
this._root = this;
|
|
11188
11190
|
}
|
|
11189
|
-
|
|
11190
|
-
|
|
11191
|
-
|
|
11191
|
+
}
|
|
11192
|
+
if (!this._def.__asyncLoader) {
|
|
11193
|
+
this._resolveProps(this._def);
|
|
11192
11194
|
}
|
|
11193
11195
|
}
|
|
11194
11196
|
connectedCallback() {
|
|
@@ -11388,6 +11390,7 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
11388
11390
|
vnode.ce = (instance) => {
|
|
11389
11391
|
this._instance = instance;
|
|
11390
11392
|
instance.ce = this;
|
|
11393
|
+
instance.isCE = true;
|
|
11391
11394
|
{
|
|
11392
11395
|
instance.ceReload = (newStyles) => {
|
|
11393
11396
|
if (this._styles) {
|
|
@@ -13271,8 +13274,9 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
13271
13274
|
const validFirstIdentCharRE = /[A-Za-z_$\xA0-\uFFFF]/;
|
|
13272
13275
|
const validIdentCharRE = /[\.\?\w$\xA0-\uFFFF]/;
|
|
13273
13276
|
const whitespaceRE = /\s+[.[]\s*|\s*[.[]\s+/g;
|
|
13274
|
-
const
|
|
13275
|
-
|
|
13277
|
+
const getExpSource = (exp) => exp.type === 4 ? exp.content : exp.loc.source;
|
|
13278
|
+
const isMemberExpressionBrowser = (exp) => {
|
|
13279
|
+
const path = getExpSource(exp).trim().replace(whitespaceRE, (s) => s.trim());
|
|
13276
13280
|
let state = 0 /* inMemberExp */;
|
|
13277
13281
|
let stateStack = [];
|
|
13278
13282
|
let currentOpenBracketCount = 0;
|
|
@@ -13334,6 +13338,9 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
13334
13338
|
return !currentOpenBracketCount && !currentOpenParensCount;
|
|
13335
13339
|
};
|
|
13336
13340
|
const isMemberExpression = isMemberExpressionBrowser ;
|
|
13341
|
+
const fnExpRE = /^\s*(async\s*)?(\([^)]*?\)|[\w$_]+)\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/;
|
|
13342
|
+
const isFnExpressionBrowser = (exp) => fnExpRE.test(getExpSource(exp));
|
|
13343
|
+
const isFnExpression = isFnExpressionBrowser ;
|
|
13337
13344
|
function assert(condition, msg) {
|
|
13338
13345
|
if (!condition) {
|
|
13339
13346
|
throw new Error(msg || `unexpected compiler condition`);
|
|
@@ -16691,7 +16698,6 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
16691
16698
|
};
|
|
16692
16699
|
}
|
|
16693
16700
|
|
|
16694
|
-
const fnExpRE = /^\s*(async\s*)?(\([^)]*?\)|[\w$_]+)\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/;
|
|
16695
16701
|
const transformOn$1 = (dir, node, context, augmentor) => {
|
|
16696
16702
|
const { loc, modifiers, arg } = dir;
|
|
16697
16703
|
if (!dir.exp && !modifiers.length) {
|
|
@@ -16735,8 +16741,8 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
16735
16741
|
}
|
|
16736
16742
|
let shouldCache = context.cacheHandlers && !exp && !context.inVOnce;
|
|
16737
16743
|
if (exp) {
|
|
16738
|
-
const isMemberExp = isMemberExpression(exp
|
|
16739
|
-
const isInlineStatement = !(isMemberExp ||
|
|
16744
|
+
const isMemberExp = isMemberExpression(exp);
|
|
16745
|
+
const isInlineStatement = !(isMemberExp || isFnExpression(exp));
|
|
16740
16746
|
const hasMultipleStatements = exp.content.includes(`;`);
|
|
16741
16747
|
{
|
|
16742
16748
|
validateBrowserExpression(
|
|
@@ -16884,7 +16890,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
16884
16890
|
return createTransformProps();
|
|
16885
16891
|
}
|
|
16886
16892
|
const maybeRef = false;
|
|
16887
|
-
if (!expString.trim() || !isMemberExpression(
|
|
16893
|
+
if (!expString.trim() || !isMemberExpression(exp) && !maybeRef) {
|
|
16888
16894
|
context.onError(
|
|
16889
16895
|
createCompilerError(42, exp.loc)
|
|
16890
16896
|
);
|