vue 3.5.2 → 3.5.4
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 +59 -65
- package/dist/vue.esm-browser.prod.js +3 -3
- package/dist/vue.esm-bundler.js +1 -1
- package/dist/vue.global.js +56 -64
- package/dist/vue.global.prod.js +4 -4
- package/dist/vue.runtime.esm-browser.js +56 -55
- 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 +53 -54
- package/dist/vue.runtime.global.prod.js +2 -2
- package/package.json +6 -6
package/dist/vue.cjs.js
CHANGED
package/dist/vue.cjs.prod.js
CHANGED
package/dist/vue.esm-browser.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* vue v3.5.
|
|
2
|
+
* vue v3.5.4
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
6
6
|
/*! #__NO_SIDE_EFFECTS__ */
|
|
7
7
|
// @__NO_SIDE_EFFECTS__
|
|
8
|
-
function makeMap(str
|
|
9
|
-
const
|
|
10
|
-
|
|
8
|
+
function makeMap(str) {
|
|
9
|
+
const map = /* @__PURE__ */ Object.create(null);
|
|
10
|
+
for (const key of str.split(",")) map[key] = 1;
|
|
11
|
+
return (val) => val in map;
|
|
11
12
|
}
|
|
12
13
|
|
|
13
14
|
const EMPTY_OBJ = Object.freeze({}) ;
|
|
@@ -678,7 +679,7 @@ function cleanupDeps(sub) {
|
|
|
678
679
|
}
|
|
679
680
|
function isDirty(sub) {
|
|
680
681
|
for (let link = sub.deps; link; link = link.nextDep) {
|
|
681
|
-
if (link.dep.version !== link.version || link.dep.computed && refreshComputed(link.dep.computed)
|
|
682
|
+
if (link.dep.version !== link.version || link.dep.computed && refreshComputed(link.dep.computed) || link.dep.version !== link.version) {
|
|
682
683
|
return true;
|
|
683
684
|
}
|
|
684
685
|
}
|
|
@@ -954,9 +955,23 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) {
|
|
|
954
955
|
globalVersion++;
|
|
955
956
|
return;
|
|
956
957
|
}
|
|
957
|
-
|
|
958
|
+
const run = (dep) => {
|
|
959
|
+
if (dep) {
|
|
960
|
+
{
|
|
961
|
+
dep.trigger({
|
|
962
|
+
target,
|
|
963
|
+
type,
|
|
964
|
+
key,
|
|
965
|
+
newValue,
|
|
966
|
+
oldValue,
|
|
967
|
+
oldTarget
|
|
968
|
+
});
|
|
969
|
+
}
|
|
970
|
+
}
|
|
971
|
+
};
|
|
972
|
+
startBatch();
|
|
958
973
|
if (type === "clear") {
|
|
959
|
-
|
|
974
|
+
depsMap.forEach(run);
|
|
960
975
|
} else {
|
|
961
976
|
const targetIsArray = isArray(target);
|
|
962
977
|
const isArrayIndex = targetIsArray && isIntegerKey(key);
|
|
@@ -964,57 +979,43 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) {
|
|
|
964
979
|
const newLength = Number(newValue);
|
|
965
980
|
depsMap.forEach((dep, key2) => {
|
|
966
981
|
if (key2 === "length" || key2 === ARRAY_ITERATE_KEY || !isSymbol(key2) && key2 >= newLength) {
|
|
967
|
-
|
|
982
|
+
run(dep);
|
|
968
983
|
}
|
|
969
984
|
});
|
|
970
985
|
} else {
|
|
971
|
-
const push = (dep) => dep && deps.push(dep);
|
|
972
986
|
if (key !== void 0) {
|
|
973
|
-
|
|
987
|
+
run(depsMap.get(key));
|
|
974
988
|
}
|
|
975
989
|
if (isArrayIndex) {
|
|
976
|
-
|
|
990
|
+
run(depsMap.get(ARRAY_ITERATE_KEY));
|
|
977
991
|
}
|
|
978
992
|
switch (type) {
|
|
979
993
|
case "add":
|
|
980
994
|
if (!targetIsArray) {
|
|
981
|
-
|
|
995
|
+
run(depsMap.get(ITERATE_KEY));
|
|
982
996
|
if (isMap(target)) {
|
|
983
|
-
|
|
997
|
+
run(depsMap.get(MAP_KEY_ITERATE_KEY));
|
|
984
998
|
}
|
|
985
999
|
} else if (isArrayIndex) {
|
|
986
|
-
|
|
1000
|
+
run(depsMap.get("length"));
|
|
987
1001
|
}
|
|
988
1002
|
break;
|
|
989
1003
|
case "delete":
|
|
990
1004
|
if (!targetIsArray) {
|
|
991
|
-
|
|
1005
|
+
run(depsMap.get(ITERATE_KEY));
|
|
992
1006
|
if (isMap(target)) {
|
|
993
|
-
|
|
1007
|
+
run(depsMap.get(MAP_KEY_ITERATE_KEY));
|
|
994
1008
|
}
|
|
995
1009
|
}
|
|
996
1010
|
break;
|
|
997
1011
|
case "set":
|
|
998
1012
|
if (isMap(target)) {
|
|
999
|
-
|
|
1013
|
+
run(depsMap.get(ITERATE_KEY));
|
|
1000
1014
|
}
|
|
1001
1015
|
break;
|
|
1002
1016
|
}
|
|
1003
1017
|
}
|
|
1004
1018
|
}
|
|
1005
|
-
startBatch();
|
|
1006
|
-
for (const dep of deps) {
|
|
1007
|
-
{
|
|
1008
|
-
dep.trigger({
|
|
1009
|
-
target,
|
|
1010
|
-
type,
|
|
1011
|
-
key,
|
|
1012
|
-
newValue,
|
|
1013
|
-
oldValue,
|
|
1014
|
-
oldTarget
|
|
1015
|
-
});
|
|
1016
|
-
}
|
|
1017
|
-
}
|
|
1018
1019
|
endBatch();
|
|
1019
1020
|
}
|
|
1020
1021
|
function getDepFromReactive(object, key) {
|
|
@@ -1752,7 +1753,7 @@ function toRaw(observed) {
|
|
|
1752
1753
|
return raw ? toRaw(raw) : observed;
|
|
1753
1754
|
}
|
|
1754
1755
|
function markRaw(value) {
|
|
1755
|
-
if (Object.isExtensible(value)) {
|
|
1756
|
+
if (!hasOwn(value, "__v_skip") && Object.isExtensible(value)) {
|
|
1756
1757
|
def(value, "__v_skip", true);
|
|
1757
1758
|
}
|
|
1758
1759
|
return value;
|
|
@@ -2651,23 +2652,19 @@ function flushJobs(seen) {
|
|
|
2651
2652
|
}
|
|
2652
2653
|
}
|
|
2653
2654
|
function checkRecursiveUpdates(seen, fn) {
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
const
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
10
|
|
2665
|
-
);
|
|
2666
|
-
return true;
|
|
2667
|
-
} else {
|
|
2668
|
-
seen.set(fn, count + 1);
|
|
2669
|
-
}
|
|
2655
|
+
const count = seen.get(fn) || 0;
|
|
2656
|
+
if (count > RECURSION_LIMIT) {
|
|
2657
|
+
const instance = fn.i;
|
|
2658
|
+
const componentName = instance && getComponentName(instance.type);
|
|
2659
|
+
handleError(
|
|
2660
|
+
`Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`,
|
|
2661
|
+
null,
|
|
2662
|
+
10
|
|
2663
|
+
);
|
|
2664
|
+
return true;
|
|
2670
2665
|
}
|
|
2666
|
+
seen.set(fn, count + 1);
|
|
2667
|
+
return false;
|
|
2671
2668
|
}
|
|
2672
2669
|
|
|
2673
2670
|
let isHmrUpdating = false;
|
|
@@ -3619,6 +3616,7 @@ function getInnerChild$1(vnode) {
|
|
|
3619
3616
|
}
|
|
3620
3617
|
function setTransitionHooks(vnode, hooks) {
|
|
3621
3618
|
if (vnode.shapeFlag & 6 && vnode.component) {
|
|
3619
|
+
vnode.transition = hooks;
|
|
3622
3620
|
setTransitionHooks(vnode.component.subTree, hooks);
|
|
3623
3621
|
} else if (vnode.shapeFlag & 128) {
|
|
3624
3622
|
vnode.ssContent.transition = hooks.clone(vnode.ssContent);
|
|
@@ -3663,7 +3661,7 @@ function defineComponent(options, extraOptions) {
|
|
|
3663
3661
|
function useId() {
|
|
3664
3662
|
const i = getCurrentInstance();
|
|
3665
3663
|
if (i) {
|
|
3666
|
-
return (i.appContext.config.idPrefix || "v") + "
|
|
3664
|
+
return (i.appContext.config.idPrefix || "v") + "-" + i.ids[0] + i.ids[1]++;
|
|
3667
3665
|
} else {
|
|
3668
3666
|
warn$1(
|
|
3669
3667
|
`useId() is called when there is no active component instance to be associated with.`
|
|
@@ -5020,13 +5018,15 @@ function renderList(source, renderItem, cache, index) {
|
|
|
5020
5018
|
const sourceIsArray = isArray(source);
|
|
5021
5019
|
if (sourceIsArray || isString(source)) {
|
|
5022
5020
|
const sourceIsReactiveArray = sourceIsArray && isReactive(source);
|
|
5021
|
+
let needsWrap = false;
|
|
5023
5022
|
if (sourceIsReactiveArray) {
|
|
5023
|
+
needsWrap = !isShallow(source);
|
|
5024
5024
|
source = shallowReadArray(source);
|
|
5025
5025
|
}
|
|
5026
5026
|
ret = new Array(source.length);
|
|
5027
5027
|
for (let i = 0, l = source.length; i < l; i++) {
|
|
5028
5028
|
ret[i] = renderItem(
|
|
5029
|
-
|
|
5029
|
+
needsWrap ? toReactive(source[i]) : source[i],
|
|
5030
5030
|
i,
|
|
5031
5031
|
void 0,
|
|
5032
5032
|
cached && cached[i]
|
|
@@ -7379,7 +7379,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
7379
7379
|
endMeasure(instance, `hydrate`);
|
|
7380
7380
|
}
|
|
7381
7381
|
};
|
|
7382
|
-
if (isAsyncWrapperVNode) {
|
|
7382
|
+
if (isAsyncWrapperVNode && type.__asyncHydrate) {
|
|
7383
7383
|
type.__asyncHydrate(
|
|
7384
7384
|
el,
|
|
7385
7385
|
instance,
|
|
@@ -8550,8 +8550,7 @@ function renderComponentRoot(instance) {
|
|
|
8550
8550
|
data,
|
|
8551
8551
|
setupState,
|
|
8552
8552
|
ctx,
|
|
8553
|
-
inheritAttrs
|
|
8554
|
-
isMounted
|
|
8553
|
+
inheritAttrs
|
|
8555
8554
|
} = instance;
|
|
8556
8555
|
const prev = setCurrentRenderingInstance(instance);
|
|
8557
8556
|
let result;
|
|
@@ -8671,7 +8670,7 @@ function renderComponentRoot(instance) {
|
|
|
8671
8670
|
`Component inside <Transition> renders non-element root node that cannot be animated.`
|
|
8672
8671
|
);
|
|
8673
8672
|
}
|
|
8674
|
-
root
|
|
8673
|
+
setTransitionHooks(root, vnode.transition);
|
|
8675
8674
|
}
|
|
8676
8675
|
if (setRoot) {
|
|
8677
8676
|
setRoot(root);
|
|
@@ -10451,7 +10450,7 @@ function isMemoSame(cached, memo) {
|
|
|
10451
10450
|
return true;
|
|
10452
10451
|
}
|
|
10453
10452
|
|
|
10454
|
-
const version = "3.5.
|
|
10453
|
+
const version = "3.5.4";
|
|
10455
10454
|
const warn = warn$1 ;
|
|
10456
10455
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
10457
10456
|
const devtools = devtools$1 ;
|
|
@@ -10464,7 +10463,9 @@ const _ssrUtils = {
|
|
|
10464
10463
|
isVNode: isVNode,
|
|
10465
10464
|
normalizeVNode,
|
|
10466
10465
|
getComponentPublicInstance,
|
|
10467
|
-
ensureValidVNode
|
|
10466
|
+
ensureValidVNode,
|
|
10467
|
+
pushWarningContext,
|
|
10468
|
+
popWarningContext
|
|
10468
10469
|
};
|
|
10469
10470
|
const ssrUtils = _ssrUtils ;
|
|
10470
10471
|
const resolveFilter = null;
|
|
@@ -15010,10 +15011,8 @@ function createRootCodegen(root, context) {
|
|
|
15010
15011
|
}
|
|
15011
15012
|
} else if (children.length > 1) {
|
|
15012
15013
|
let patchFlag = 64;
|
|
15013
|
-
let patchFlagText = PatchFlagNames[64];
|
|
15014
15014
|
if (children.filter((c) => c.type !== 3).length === 1) {
|
|
15015
15015
|
patchFlag |= 2048;
|
|
15016
|
-
patchFlagText += `, ${PatchFlagNames[2048]}`;
|
|
15017
15016
|
}
|
|
15018
15017
|
root.codegenNode = createVNodeCall(
|
|
15019
15018
|
context,
|
|
@@ -15913,10 +15912,8 @@ function createChildrenCodegenNode(branch, keyIndex, context) {
|
|
|
15913
15912
|
return vnodeCall;
|
|
15914
15913
|
} else {
|
|
15915
15914
|
let patchFlag = 64;
|
|
15916
|
-
let patchFlagText = PatchFlagNames[64];
|
|
15917
15915
|
if (!branch.isTemplateIf && children.filter((c) => c.type !== 3).length === 1) {
|
|
15918
15916
|
patchFlag |= 2048;
|
|
15919
|
-
patchFlagText += `, ${PatchFlagNames[2048]}`;
|
|
15920
15917
|
}
|
|
15921
15918
|
return createVNodeCall(
|
|
15922
15919
|
context,
|
|
@@ -17700,10 +17697,7 @@ const isNonKeyModifier = /* @__PURE__ */ makeMap(
|
|
|
17700
17697
|
`stop,prevent,self,ctrl,shift,alt,meta,exact,middle`
|
|
17701
17698
|
);
|
|
17702
17699
|
const maybeKeyModifier = /* @__PURE__ */ makeMap("left,right");
|
|
17703
|
-
const isKeyboardEvent = /* @__PURE__ */ makeMap(
|
|
17704
|
-
`onkeyup,onkeydown,onkeypress`,
|
|
17705
|
-
true
|
|
17706
|
-
);
|
|
17700
|
+
const isKeyboardEvent = /* @__PURE__ */ makeMap(`onkeyup,onkeydown,onkeypress`);
|
|
17707
17701
|
const resolveModifiers = (key, modifiers, context, loc) => {
|
|
17708
17702
|
const keyModifiers = [];
|
|
17709
17703
|
const nonKeyModifiers = [];
|
|
@@ -17715,7 +17709,7 @@ const resolveModifiers = (key, modifiers, context, loc) => {
|
|
|
17715
17709
|
} else {
|
|
17716
17710
|
if (maybeKeyModifier(modifier)) {
|
|
17717
17711
|
if (isStaticExp(key)) {
|
|
17718
|
-
if (isKeyboardEvent(key.content)) {
|
|
17712
|
+
if (isKeyboardEvent(key.content.toLowerCase())) {
|
|
17719
17713
|
keyModifiers.push(modifier);
|
|
17720
17714
|
} else {
|
|
17721
17715
|
nonKeyModifiers.push(modifier);
|
|
@@ -17768,7 +17762,7 @@ const transformOn = (dir, node, context) => {
|
|
|
17768
17762
|
]);
|
|
17769
17763
|
}
|
|
17770
17764
|
if (keyModifiers.length && // if event name is dynamic, always wrap with keys guard
|
|
17771
|
-
(!isStaticExp(key) || isKeyboardEvent(key.content))) {
|
|
17765
|
+
(!isStaticExp(key) || isKeyboardEvent(key.content.toLowerCase()))) {
|
|
17772
17766
|
handlerExp = createCallExpression(context.helper(V_ON_WITH_KEYS), [
|
|
17773
17767
|
handlerExp,
|
|
17774
17768
|
JSON.stringify(keyModifiers)
|