vue 3.5.7 → 3.5.9
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 +5 -14
- package/dist/vue.cjs.prod.js +5 -14
- package/dist/vue.esm-browser.js +58 -52
- package/dist/vue.esm-browser.prod.js +4 -4
- package/dist/vue.esm-bundler.js +6 -15
- package/dist/vue.global.js +58 -52
- package/dist/vue.global.prod.js +4 -4
- package/dist/vue.runtime.esm-browser.js +48 -39
- 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 +48 -39
- package/dist/vue.runtime.global.prod.js +2 -2
- package/package.json +6 -6
package/dist/vue.esm-bundler.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* vue v3.5.
|
|
2
|
+
* vue v3.5.9
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -7,7 +7,7 @@ import * as runtimeDom from '@vue/runtime-dom';
|
|
|
7
7
|
import { initCustomFormatter, registerRuntimeCompiler, warn } from '@vue/runtime-dom';
|
|
8
8
|
export * from '@vue/runtime-dom';
|
|
9
9
|
import { compile } from '@vue/compiler-dom';
|
|
10
|
-
import { isString, NOOP, extend, generateCodeFrame
|
|
10
|
+
import { isString, NOOP, genCacheKey, extend, generateCodeFrame } from '@vue/shared';
|
|
11
11
|
|
|
12
12
|
function initDev() {
|
|
13
13
|
{
|
|
@@ -18,15 +18,7 @@ function initDev() {
|
|
|
18
18
|
if (!!(process.env.NODE_ENV !== "production")) {
|
|
19
19
|
initDev();
|
|
20
20
|
}
|
|
21
|
-
const compileCache = /* @__PURE__ */
|
|
22
|
-
function getCache(options) {
|
|
23
|
-
let c = compileCache.get(options != null ? options : EMPTY_OBJ);
|
|
24
|
-
if (!c) {
|
|
25
|
-
c = /* @__PURE__ */ Object.create(null);
|
|
26
|
-
compileCache.set(options != null ? options : EMPTY_OBJ, c);
|
|
27
|
-
}
|
|
28
|
-
return c;
|
|
29
|
-
}
|
|
21
|
+
const compileCache = /* @__PURE__ */ Object.create(null);
|
|
30
22
|
function compileToFunction(template, options) {
|
|
31
23
|
if (!isString(template)) {
|
|
32
24
|
if (template.nodeType) {
|
|
@@ -36,9 +28,8 @@ function compileToFunction(template, options) {
|
|
|
36
28
|
return NOOP;
|
|
37
29
|
}
|
|
38
30
|
}
|
|
39
|
-
const key = template;
|
|
40
|
-
const
|
|
41
|
-
const cached = cache[key];
|
|
31
|
+
const key = genCacheKey(template, options);
|
|
32
|
+
const cached = compileCache[key];
|
|
42
33
|
if (cached) {
|
|
43
34
|
return cached;
|
|
44
35
|
}
|
|
@@ -73,7 +64,7 @@ ${codeFrame}` : message);
|
|
|
73
64
|
}
|
|
74
65
|
const render = new Function("Vue", code)(runtimeDom);
|
|
75
66
|
render._rc = true;
|
|
76
|
-
return
|
|
67
|
+
return compileCache[key] = render;
|
|
77
68
|
}
|
|
78
69
|
registerRuntimeCompiler(compileToFunction);
|
|
79
70
|
|
package/dist/vue.global.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* vue v3.5.
|
|
2
|
+
* vue v3.5.9
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -109,6 +109,12 @@ var Vue = (function (exports) {
|
|
|
109
109
|
const getGlobalThis = () => {
|
|
110
110
|
return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {});
|
|
111
111
|
};
|
|
112
|
+
function genCacheKey(source, options) {
|
|
113
|
+
return source + JSON.stringify(
|
|
114
|
+
options,
|
|
115
|
+
(_, val) => typeof val === "function" ? val.toString() : val
|
|
116
|
+
);
|
|
117
|
+
}
|
|
112
118
|
|
|
113
119
|
const PatchFlagNames = {
|
|
114
120
|
[1]: `TEXT`,
|
|
@@ -642,11 +648,14 @@ var Vue = (function (exports) {
|
|
|
642
648
|
let error;
|
|
643
649
|
while (batchedSub) {
|
|
644
650
|
let e = batchedSub;
|
|
645
|
-
|
|
651
|
+
let next;
|
|
646
652
|
while (e) {
|
|
647
|
-
const next = e.next;
|
|
648
|
-
e.next = void 0;
|
|
649
653
|
e.flags &= ~8;
|
|
654
|
+
e = e.next;
|
|
655
|
+
}
|
|
656
|
+
e = batchedSub;
|
|
657
|
+
batchedSub = void 0;
|
|
658
|
+
while (e) {
|
|
650
659
|
if (e.flags & 1) {
|
|
651
660
|
try {
|
|
652
661
|
;
|
|
@@ -655,6 +664,8 @@ var Vue = (function (exports) {
|
|
|
655
664
|
if (!error) error = err;
|
|
656
665
|
}
|
|
657
666
|
}
|
|
667
|
+
next = e.next;
|
|
668
|
+
e.next = void 0;
|
|
658
669
|
e = next;
|
|
659
670
|
}
|
|
660
671
|
}
|
|
@@ -734,7 +745,7 @@ var Vue = (function (exports) {
|
|
|
734
745
|
computed.flags &= ~2;
|
|
735
746
|
}
|
|
736
747
|
}
|
|
737
|
-
function removeSub(link,
|
|
748
|
+
function removeSub(link, soft = false) {
|
|
738
749
|
const { dep, prevSub, nextSub } = link;
|
|
739
750
|
if (prevSub) {
|
|
740
751
|
prevSub.nextSub = nextSub;
|
|
@@ -750,17 +761,15 @@ var Vue = (function (exports) {
|
|
|
750
761
|
if (dep.subsHead === link) {
|
|
751
762
|
dep.subsHead = nextSub;
|
|
752
763
|
}
|
|
753
|
-
if (!dep.subs) {
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
removeSub(l, true);
|
|
758
|
-
}
|
|
759
|
-
} else if (dep.map && !fromComputed) {
|
|
760
|
-
dep.map.delete(dep.key);
|
|
761
|
-
if (!dep.map.size) targetMap.delete(dep.target);
|
|
764
|
+
if (!dep.subs && dep.computed) {
|
|
765
|
+
dep.computed.flags &= ~4;
|
|
766
|
+
for (let l = dep.computed.deps; l; l = l.nextDep) {
|
|
767
|
+
removeSub(l, true);
|
|
762
768
|
}
|
|
763
769
|
}
|
|
770
|
+
if (!soft && !--dep.sc && dep.map) {
|
|
771
|
+
dep.map.delete(dep.key);
|
|
772
|
+
}
|
|
764
773
|
}
|
|
765
774
|
function removeDep(link) {
|
|
766
775
|
const { prevDep, nextDep } = link;
|
|
@@ -845,6 +854,10 @@ var Vue = (function (exports) {
|
|
|
845
854
|
this.target = void 0;
|
|
846
855
|
this.map = void 0;
|
|
847
856
|
this.key = void 0;
|
|
857
|
+
/**
|
|
858
|
+
* Subscriber counter
|
|
859
|
+
*/
|
|
860
|
+
this.sc = 0;
|
|
848
861
|
{
|
|
849
862
|
this.subsHead = void 0;
|
|
850
863
|
}
|
|
@@ -863,9 +876,7 @@ var Vue = (function (exports) {
|
|
|
863
876
|
activeSub.depsTail.nextDep = link;
|
|
864
877
|
activeSub.depsTail = link;
|
|
865
878
|
}
|
|
866
|
-
|
|
867
|
-
addSub(link);
|
|
868
|
-
}
|
|
879
|
+
addSub(link);
|
|
869
880
|
} else if (link.version === -1) {
|
|
870
881
|
link.version = this.version;
|
|
871
882
|
if (link.nextDep) {
|
|
@@ -929,22 +940,25 @@ var Vue = (function (exports) {
|
|
|
929
940
|
}
|
|
930
941
|
}
|
|
931
942
|
function addSub(link) {
|
|
932
|
-
|
|
933
|
-
if (
|
|
934
|
-
computed
|
|
935
|
-
|
|
936
|
-
|
|
943
|
+
link.dep.sc++;
|
|
944
|
+
if (link.sub.flags & 4) {
|
|
945
|
+
const computed = link.dep.computed;
|
|
946
|
+
if (computed && !link.dep.subs) {
|
|
947
|
+
computed.flags |= 4 | 16;
|
|
948
|
+
for (let l = computed.deps; l; l = l.nextDep) {
|
|
949
|
+
addSub(l);
|
|
950
|
+
}
|
|
937
951
|
}
|
|
952
|
+
const currentTail = link.dep.subs;
|
|
953
|
+
if (currentTail !== link) {
|
|
954
|
+
link.prevSub = currentTail;
|
|
955
|
+
if (currentTail) currentTail.nextSub = link;
|
|
956
|
+
}
|
|
957
|
+
if (link.dep.subsHead === void 0) {
|
|
958
|
+
link.dep.subsHead = link;
|
|
959
|
+
}
|
|
960
|
+
link.dep.subs = link;
|
|
938
961
|
}
|
|
939
|
-
const currentTail = link.dep.subs;
|
|
940
|
-
if (currentTail !== link) {
|
|
941
|
-
link.prevSub = currentTail;
|
|
942
|
-
if (currentTail) currentTail.nextSub = link;
|
|
943
|
-
}
|
|
944
|
-
if (link.dep.subsHead === void 0) {
|
|
945
|
-
link.dep.subsHead = link;
|
|
946
|
-
}
|
|
947
|
-
link.dep.subs = link;
|
|
948
962
|
}
|
|
949
963
|
const targetMap = /* @__PURE__ */ new WeakMap();
|
|
950
964
|
const ITERATE_KEY = Symbol(
|
|
@@ -1048,8 +1062,8 @@ var Vue = (function (exports) {
|
|
|
1048
1062
|
endBatch();
|
|
1049
1063
|
}
|
|
1050
1064
|
function getDepFromReactive(object, key) {
|
|
1051
|
-
|
|
1052
|
-
return
|
|
1065
|
+
const depMap = targetMap.get(object);
|
|
1066
|
+
return depMap && depMap.get(key);
|
|
1053
1067
|
}
|
|
1054
1068
|
|
|
1055
1069
|
function reactiveReadArray(array) {
|
|
@@ -3701,6 +3715,7 @@ var Vue = (function (exports) {
|
|
|
3701
3715
|
`useId() is called when there is no active component instance to be associated with.`
|
|
3702
3716
|
);
|
|
3703
3717
|
}
|
|
3718
|
+
return "";
|
|
3704
3719
|
}
|
|
3705
3720
|
function markAsyncBoundary(instance) {
|
|
3706
3721
|
instance.ids = [instance.ids[0] + instance.ids[2]++ + "-", 0, 0];
|
|
@@ -9729,7 +9744,7 @@ Component that was made reactive: `,
|
|
|
9729
9744
|
// #3666, avoid reference pollution when reusing vnode
|
|
9730
9745
|
child.slice()
|
|
9731
9746
|
);
|
|
9732
|
-
} else if (
|
|
9747
|
+
} else if (isVNode(child)) {
|
|
9733
9748
|
return cloneIfMounted(child);
|
|
9734
9749
|
} else {
|
|
9735
9750
|
return createVNode(Text, null, String(child));
|
|
@@ -10460,7 +10475,7 @@ Component that was made reactive: `,
|
|
|
10460
10475
|
return true;
|
|
10461
10476
|
}
|
|
10462
10477
|
|
|
10463
|
-
const version = "3.5.
|
|
10478
|
+
const version = "3.5.9";
|
|
10464
10479
|
const warn = warn$1 ;
|
|
10465
10480
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
10466
10481
|
const devtools = devtools$1 ;
|
|
@@ -11939,7 +11954,7 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
11939
11954
|
setChecked(el, binding, vnode);
|
|
11940
11955
|
}
|
|
11941
11956
|
};
|
|
11942
|
-
function setChecked(el, { value
|
|
11957
|
+
function setChecked(el, { value }, vnode) {
|
|
11943
11958
|
el._modelValue = value;
|
|
11944
11959
|
let checked;
|
|
11945
11960
|
if (isArray(value)) {
|
|
@@ -11989,19 +12004,19 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
11989
12004
|
},
|
|
11990
12005
|
// set value in mounted & updated because <select> relies on its children
|
|
11991
12006
|
// <option>s.
|
|
11992
|
-
mounted(el, { value
|
|
12007
|
+
mounted(el, { value }) {
|
|
11993
12008
|
setSelected(el, value);
|
|
11994
12009
|
},
|
|
11995
12010
|
beforeUpdate(el, _binding, vnode) {
|
|
11996
12011
|
el[assignKey] = getModelAssigner(vnode);
|
|
11997
12012
|
},
|
|
11998
|
-
updated(el, { value
|
|
12013
|
+
updated(el, { value }) {
|
|
11999
12014
|
if (!el._assigning) {
|
|
12000
12015
|
setSelected(el, value);
|
|
12001
12016
|
}
|
|
12002
12017
|
}
|
|
12003
12018
|
};
|
|
12004
|
-
function setSelected(el, value
|
|
12019
|
+
function setSelected(el, value) {
|
|
12005
12020
|
const isMultiple = el.multiple;
|
|
12006
12021
|
const isArrayValue = isArray(value);
|
|
12007
12022
|
if (isMultiple && !isArrayValue && !isSet(value)) {
|
|
@@ -17829,15 +17844,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
17829
17844
|
{
|
|
17830
17845
|
initDev();
|
|
17831
17846
|
}
|
|
17832
|
-
const compileCache = /* @__PURE__ */
|
|
17833
|
-
function getCache(options) {
|
|
17834
|
-
let c = compileCache.get(options != null ? options : EMPTY_OBJ);
|
|
17835
|
-
if (!c) {
|
|
17836
|
-
c = /* @__PURE__ */ Object.create(null);
|
|
17837
|
-
compileCache.set(options != null ? options : EMPTY_OBJ, c);
|
|
17838
|
-
}
|
|
17839
|
-
return c;
|
|
17840
|
-
}
|
|
17847
|
+
const compileCache = /* @__PURE__ */ Object.create(null);
|
|
17841
17848
|
function compileToFunction(template, options) {
|
|
17842
17849
|
if (!isString(template)) {
|
|
17843
17850
|
if (template.nodeType) {
|
|
@@ -17847,9 +17854,8 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
17847
17854
|
return NOOP;
|
|
17848
17855
|
}
|
|
17849
17856
|
}
|
|
17850
|
-
const key = template;
|
|
17851
|
-
const
|
|
17852
|
-
const cached = cache[key];
|
|
17857
|
+
const key = genCacheKey(template, options);
|
|
17858
|
+
const cached = compileCache[key];
|
|
17853
17859
|
if (cached) {
|
|
17854
17860
|
return cached;
|
|
17855
17861
|
}
|
|
@@ -17884,7 +17890,7 @@ ${codeFrame}` : message);
|
|
|
17884
17890
|
}
|
|
17885
17891
|
const render = new Function(code)() ;
|
|
17886
17892
|
render._rc = true;
|
|
17887
|
-
return
|
|
17893
|
+
return compileCache[key] = render;
|
|
17888
17894
|
}
|
|
17889
17895
|
registerRuntimeCompiler(compileToFunction);
|
|
17890
17896
|
|