@vue/runtime-dom 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/runtime-dom.cjs.js +1 -1
- package/dist/runtime-dom.cjs.prod.js +1 -1
- package/dist/runtime-dom.esm-browser.js +56 -55
- package/dist/runtime-dom.esm-browser.prod.js +2 -2
- package/dist/runtime-dom.esm-bundler.js +1 -1
- package/dist/runtime-dom.global.js +53 -54
- package/dist/runtime-dom.global.prod.js +2 -2
- package/package.json +4 -4
package/dist/runtime-dom.cjs.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-dom v3.5.
|
|
2
|
+
* @vue/runtime-dom 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({}) ;
|
|
@@ -611,7 +612,7 @@ function cleanupDeps(sub) {
|
|
|
611
612
|
}
|
|
612
613
|
function isDirty(sub) {
|
|
613
614
|
for (let link = sub.deps; link; link = link.nextDep) {
|
|
614
|
-
if (link.dep.version !== link.version || link.dep.computed && refreshComputed(link.dep.computed)
|
|
615
|
+
if (link.dep.version !== link.version || link.dep.computed && refreshComputed(link.dep.computed) || link.dep.version !== link.version) {
|
|
615
616
|
return true;
|
|
616
617
|
}
|
|
617
618
|
}
|
|
@@ -887,9 +888,23 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) {
|
|
|
887
888
|
globalVersion++;
|
|
888
889
|
return;
|
|
889
890
|
}
|
|
890
|
-
|
|
891
|
+
const run = (dep) => {
|
|
892
|
+
if (dep) {
|
|
893
|
+
{
|
|
894
|
+
dep.trigger({
|
|
895
|
+
target,
|
|
896
|
+
type,
|
|
897
|
+
key,
|
|
898
|
+
newValue,
|
|
899
|
+
oldValue,
|
|
900
|
+
oldTarget
|
|
901
|
+
});
|
|
902
|
+
}
|
|
903
|
+
}
|
|
904
|
+
};
|
|
905
|
+
startBatch();
|
|
891
906
|
if (type === "clear") {
|
|
892
|
-
|
|
907
|
+
depsMap.forEach(run);
|
|
893
908
|
} else {
|
|
894
909
|
const targetIsArray = isArray(target);
|
|
895
910
|
const isArrayIndex = targetIsArray && isIntegerKey(key);
|
|
@@ -897,57 +912,43 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) {
|
|
|
897
912
|
const newLength = Number(newValue);
|
|
898
913
|
depsMap.forEach((dep, key2) => {
|
|
899
914
|
if (key2 === "length" || key2 === ARRAY_ITERATE_KEY || !isSymbol(key2) && key2 >= newLength) {
|
|
900
|
-
|
|
915
|
+
run(dep);
|
|
901
916
|
}
|
|
902
917
|
});
|
|
903
918
|
} else {
|
|
904
|
-
const push = (dep) => dep && deps.push(dep);
|
|
905
919
|
if (key !== void 0) {
|
|
906
|
-
|
|
920
|
+
run(depsMap.get(key));
|
|
907
921
|
}
|
|
908
922
|
if (isArrayIndex) {
|
|
909
|
-
|
|
923
|
+
run(depsMap.get(ARRAY_ITERATE_KEY));
|
|
910
924
|
}
|
|
911
925
|
switch (type) {
|
|
912
926
|
case "add":
|
|
913
927
|
if (!targetIsArray) {
|
|
914
|
-
|
|
928
|
+
run(depsMap.get(ITERATE_KEY));
|
|
915
929
|
if (isMap(target)) {
|
|
916
|
-
|
|
930
|
+
run(depsMap.get(MAP_KEY_ITERATE_KEY));
|
|
917
931
|
}
|
|
918
932
|
} else if (isArrayIndex) {
|
|
919
|
-
|
|
933
|
+
run(depsMap.get("length"));
|
|
920
934
|
}
|
|
921
935
|
break;
|
|
922
936
|
case "delete":
|
|
923
937
|
if (!targetIsArray) {
|
|
924
|
-
|
|
938
|
+
run(depsMap.get(ITERATE_KEY));
|
|
925
939
|
if (isMap(target)) {
|
|
926
|
-
|
|
940
|
+
run(depsMap.get(MAP_KEY_ITERATE_KEY));
|
|
927
941
|
}
|
|
928
942
|
}
|
|
929
943
|
break;
|
|
930
944
|
case "set":
|
|
931
945
|
if (isMap(target)) {
|
|
932
|
-
|
|
946
|
+
run(depsMap.get(ITERATE_KEY));
|
|
933
947
|
}
|
|
934
948
|
break;
|
|
935
949
|
}
|
|
936
950
|
}
|
|
937
951
|
}
|
|
938
|
-
startBatch();
|
|
939
|
-
for (const dep of deps) {
|
|
940
|
-
{
|
|
941
|
-
dep.trigger({
|
|
942
|
-
target,
|
|
943
|
-
type,
|
|
944
|
-
key,
|
|
945
|
-
newValue,
|
|
946
|
-
oldValue,
|
|
947
|
-
oldTarget
|
|
948
|
-
});
|
|
949
|
-
}
|
|
950
|
-
}
|
|
951
952
|
endBatch();
|
|
952
953
|
}
|
|
953
954
|
function getDepFromReactive(object, key) {
|
|
@@ -1685,7 +1686,7 @@ function toRaw(observed) {
|
|
|
1685
1686
|
return raw ? toRaw(raw) : observed;
|
|
1686
1687
|
}
|
|
1687
1688
|
function markRaw(value) {
|
|
1688
|
-
if (Object.isExtensible(value)) {
|
|
1689
|
+
if (!hasOwn(value, "__v_skip") && Object.isExtensible(value)) {
|
|
1689
1690
|
def(value, "__v_skip", true);
|
|
1690
1691
|
}
|
|
1691
1692
|
return value;
|
|
@@ -2584,23 +2585,19 @@ function flushJobs(seen) {
|
|
|
2584
2585
|
}
|
|
2585
2586
|
}
|
|
2586
2587
|
function checkRecursiveUpdates(seen, fn) {
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
const
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
10
|
|
2598
|
-
);
|
|
2599
|
-
return true;
|
|
2600
|
-
} else {
|
|
2601
|
-
seen.set(fn, count + 1);
|
|
2602
|
-
}
|
|
2588
|
+
const count = seen.get(fn) || 0;
|
|
2589
|
+
if (count > RECURSION_LIMIT) {
|
|
2590
|
+
const instance = fn.i;
|
|
2591
|
+
const componentName = instance && getComponentName(instance.type);
|
|
2592
|
+
handleError(
|
|
2593
|
+
`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.`,
|
|
2594
|
+
null,
|
|
2595
|
+
10
|
|
2596
|
+
);
|
|
2597
|
+
return true;
|
|
2603
2598
|
}
|
|
2599
|
+
seen.set(fn, count + 1);
|
|
2600
|
+
return false;
|
|
2604
2601
|
}
|
|
2605
2602
|
|
|
2606
2603
|
let isHmrUpdating = false;
|
|
@@ -3552,6 +3549,7 @@ function getInnerChild$1(vnode) {
|
|
|
3552
3549
|
}
|
|
3553
3550
|
function setTransitionHooks(vnode, hooks) {
|
|
3554
3551
|
if (vnode.shapeFlag & 6 && vnode.component) {
|
|
3552
|
+
vnode.transition = hooks;
|
|
3555
3553
|
setTransitionHooks(vnode.component.subTree, hooks);
|
|
3556
3554
|
} else if (vnode.shapeFlag & 128) {
|
|
3557
3555
|
vnode.ssContent.transition = hooks.clone(vnode.ssContent);
|
|
@@ -3596,7 +3594,7 @@ function defineComponent(options, extraOptions) {
|
|
|
3596
3594
|
function useId() {
|
|
3597
3595
|
const i = getCurrentInstance();
|
|
3598
3596
|
if (i) {
|
|
3599
|
-
return (i.appContext.config.idPrefix || "v") + "
|
|
3597
|
+
return (i.appContext.config.idPrefix || "v") + "-" + i.ids[0] + i.ids[1]++;
|
|
3600
3598
|
} else {
|
|
3601
3599
|
warn$1(
|
|
3602
3600
|
`useId() is called when there is no active component instance to be associated with.`
|
|
@@ -4953,13 +4951,15 @@ function renderList(source, renderItem, cache, index) {
|
|
|
4953
4951
|
const sourceIsArray = isArray(source);
|
|
4954
4952
|
if (sourceIsArray || isString(source)) {
|
|
4955
4953
|
const sourceIsReactiveArray = sourceIsArray && isReactive(source);
|
|
4954
|
+
let needsWrap = false;
|
|
4956
4955
|
if (sourceIsReactiveArray) {
|
|
4956
|
+
needsWrap = !isShallow(source);
|
|
4957
4957
|
source = shallowReadArray(source);
|
|
4958
4958
|
}
|
|
4959
4959
|
ret = new Array(source.length);
|
|
4960
4960
|
for (let i = 0, l = source.length; i < l; i++) {
|
|
4961
4961
|
ret[i] = renderItem(
|
|
4962
|
-
|
|
4962
|
+
needsWrap ? toReactive(source[i]) : source[i],
|
|
4963
4963
|
i,
|
|
4964
4964
|
void 0,
|
|
4965
4965
|
cached && cached[i]
|
|
@@ -7312,7 +7312,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
7312
7312
|
endMeasure(instance, `hydrate`);
|
|
7313
7313
|
}
|
|
7314
7314
|
};
|
|
7315
|
-
if (isAsyncWrapperVNode) {
|
|
7315
|
+
if (isAsyncWrapperVNode && type.__asyncHydrate) {
|
|
7316
7316
|
type.__asyncHydrate(
|
|
7317
7317
|
el,
|
|
7318
7318
|
instance,
|
|
@@ -8483,8 +8483,7 @@ function renderComponentRoot(instance) {
|
|
|
8483
8483
|
data,
|
|
8484
8484
|
setupState,
|
|
8485
8485
|
ctx,
|
|
8486
|
-
inheritAttrs
|
|
8487
|
-
isMounted
|
|
8486
|
+
inheritAttrs
|
|
8488
8487
|
} = instance;
|
|
8489
8488
|
const prev = setCurrentRenderingInstance(instance);
|
|
8490
8489
|
let result;
|
|
@@ -8604,7 +8603,7 @@ function renderComponentRoot(instance) {
|
|
|
8604
8603
|
`Component inside <Transition> renders non-element root node that cannot be animated.`
|
|
8605
8604
|
);
|
|
8606
8605
|
}
|
|
8607
|
-
root
|
|
8606
|
+
setTransitionHooks(root, vnode.transition);
|
|
8608
8607
|
}
|
|
8609
8608
|
if (setRoot) {
|
|
8610
8609
|
setRoot(root);
|
|
@@ -10384,7 +10383,7 @@ function isMemoSame(cached, memo) {
|
|
|
10384
10383
|
return true;
|
|
10385
10384
|
}
|
|
10386
10385
|
|
|
10387
|
-
const version = "3.5.
|
|
10386
|
+
const version = "3.5.4";
|
|
10388
10387
|
const warn = warn$1 ;
|
|
10389
10388
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
10390
10389
|
const devtools = devtools$1 ;
|
|
@@ -10397,7 +10396,9 @@ const _ssrUtils = {
|
|
|
10397
10396
|
isVNode: isVNode,
|
|
10398
10397
|
normalizeVNode,
|
|
10399
10398
|
getComponentPublicInstance,
|
|
10400
|
-
ensureValidVNode
|
|
10399
|
+
ensureValidVNode,
|
|
10400
|
+
pushWarningContext,
|
|
10401
|
+
popWarningContext
|
|
10401
10402
|
};
|
|
10402
10403
|
const ssrUtils = _ssrUtils ;
|
|
10403
10404
|
const resolveFilter = null;
|