@vue/runtime-core 3.5.30 → 3.5.32
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-core.cjs.js +113 -78
- package/dist/runtime-core.cjs.prod.js +99 -71
- package/dist/runtime-core.d.ts +21 -0
- package/dist/runtime-core.esm-bundler.js +113 -78
- package/package.json +3 -3
package/dist/runtime-core.cjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-core v3.5.
|
|
2
|
+
* @vue/runtime-core v3.5.32
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -445,6 +445,13 @@ function checkRecursiveUpdates(seen, fn) {
|
|
|
445
445
|
}
|
|
446
446
|
|
|
447
447
|
let isHmrUpdating = false;
|
|
448
|
+
const setHmrUpdating = (v) => {
|
|
449
|
+
try {
|
|
450
|
+
return isHmrUpdating;
|
|
451
|
+
} finally {
|
|
452
|
+
isHmrUpdating = v;
|
|
453
|
+
}
|
|
454
|
+
};
|
|
448
455
|
const hmrDirtyComponents = /* @__PURE__ */ new Map();
|
|
449
456
|
{
|
|
450
457
|
shared.getGlobalThis().__VUE_HMR_RUNTIME__ = {
|
|
@@ -938,6 +945,7 @@ function createPathGetter(ctx, path) {
|
|
|
938
945
|
};
|
|
939
946
|
}
|
|
940
947
|
|
|
948
|
+
const pendingMounts = /* @__PURE__ */ new WeakMap();
|
|
941
949
|
const TeleportEndKey = /* @__PURE__ */ Symbol("_vte");
|
|
942
950
|
const isTeleport = (type) => type.__isTeleport;
|
|
943
951
|
const isTeleportDisabled = (props) => props && (props.disabled || props.disabled === "");
|
|
@@ -979,88 +987,84 @@ const TeleportImpl = {
|
|
|
979
987
|
o: { insert, querySelector, createText, createComment }
|
|
980
988
|
} = internals;
|
|
981
989
|
const disabled = isTeleportDisabled(n2.props);
|
|
982
|
-
let {
|
|
990
|
+
let { dynamicChildren } = n2;
|
|
983
991
|
if (isHmrUpdating) {
|
|
984
992
|
optimized = false;
|
|
985
993
|
dynamicChildren = null;
|
|
986
994
|
}
|
|
995
|
+
const mount = (vnode, container2, anchor2) => {
|
|
996
|
+
if (vnode.shapeFlag & 16) {
|
|
997
|
+
mountChildren(
|
|
998
|
+
vnode.children,
|
|
999
|
+
container2,
|
|
1000
|
+
anchor2,
|
|
1001
|
+
parentComponent,
|
|
1002
|
+
parentSuspense,
|
|
1003
|
+
namespace,
|
|
1004
|
+
slotScopeIds,
|
|
1005
|
+
optimized
|
|
1006
|
+
);
|
|
1007
|
+
}
|
|
1008
|
+
};
|
|
1009
|
+
const mountToTarget = (vnode = n2) => {
|
|
1010
|
+
const disabled2 = isTeleportDisabled(vnode.props);
|
|
1011
|
+
const target = vnode.target = resolveTarget(vnode.props, querySelector);
|
|
1012
|
+
const targetAnchor = prepareAnchor(target, vnode, createText, insert);
|
|
1013
|
+
if (target) {
|
|
1014
|
+
if (namespace !== "svg" && isTargetSVG(target)) {
|
|
1015
|
+
namespace = "svg";
|
|
1016
|
+
} else if (namespace !== "mathml" && isTargetMathML(target)) {
|
|
1017
|
+
namespace = "mathml";
|
|
1018
|
+
}
|
|
1019
|
+
if (parentComponent && parentComponent.isCE) {
|
|
1020
|
+
(parentComponent.ce._teleportTargets || (parentComponent.ce._teleportTargets = /* @__PURE__ */ new Set())).add(target);
|
|
1021
|
+
}
|
|
1022
|
+
if (!disabled2) {
|
|
1023
|
+
mount(vnode, target, targetAnchor);
|
|
1024
|
+
updateCssVars(vnode, false);
|
|
1025
|
+
}
|
|
1026
|
+
} else if (!disabled2) {
|
|
1027
|
+
warn$1("Invalid Teleport target on mount:", target, `(${typeof target})`);
|
|
1028
|
+
}
|
|
1029
|
+
};
|
|
1030
|
+
const queuePendingMount = (vnode) => {
|
|
1031
|
+
const mountJob = () => {
|
|
1032
|
+
if (pendingMounts.get(vnode) !== mountJob) return;
|
|
1033
|
+
pendingMounts.delete(vnode);
|
|
1034
|
+
if (isTeleportDisabled(vnode.props)) {
|
|
1035
|
+
mount(vnode, container, vnode.anchor);
|
|
1036
|
+
updateCssVars(vnode, true);
|
|
1037
|
+
}
|
|
1038
|
+
mountToTarget(vnode);
|
|
1039
|
+
};
|
|
1040
|
+
pendingMounts.set(vnode, mountJob);
|
|
1041
|
+
queuePostRenderEffect(mountJob, parentSuspense);
|
|
1042
|
+
};
|
|
987
1043
|
if (n1 == null) {
|
|
988
1044
|
const placeholder = n2.el = createComment("teleport start") ;
|
|
989
1045
|
const mainAnchor = n2.anchor = createComment("teleport end") ;
|
|
990
1046
|
insert(placeholder, container, anchor);
|
|
991
1047
|
insert(mainAnchor, container, anchor);
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
container2,
|
|
997
|
-
anchor2,
|
|
998
|
-
parentComponent,
|
|
999
|
-
parentSuspense,
|
|
1000
|
-
namespace,
|
|
1001
|
-
slotScopeIds,
|
|
1002
|
-
optimized
|
|
1003
|
-
);
|
|
1004
|
-
}
|
|
1005
|
-
};
|
|
1006
|
-
const mountToTarget = () => {
|
|
1007
|
-
const target = n2.target = resolveTarget(n2.props, querySelector);
|
|
1008
|
-
const targetAnchor = prepareAnchor(target, n2, createText, insert);
|
|
1009
|
-
if (target) {
|
|
1010
|
-
if (namespace !== "svg" && isTargetSVG(target)) {
|
|
1011
|
-
namespace = "svg";
|
|
1012
|
-
} else if (namespace !== "mathml" && isTargetMathML(target)) {
|
|
1013
|
-
namespace = "mathml";
|
|
1014
|
-
}
|
|
1015
|
-
if (parentComponent && parentComponent.isCE) {
|
|
1016
|
-
(parentComponent.ce._teleportTargets || (parentComponent.ce._teleportTargets = /* @__PURE__ */ new Set())).add(target);
|
|
1017
|
-
}
|
|
1018
|
-
if (!disabled) {
|
|
1019
|
-
mount(target, targetAnchor);
|
|
1020
|
-
updateCssVars(n2, false);
|
|
1021
|
-
}
|
|
1022
|
-
} else if (!disabled) {
|
|
1023
|
-
warn$1(
|
|
1024
|
-
"Invalid Teleport target on mount:",
|
|
1025
|
-
target,
|
|
1026
|
-
`(${typeof target})`
|
|
1027
|
-
);
|
|
1028
|
-
}
|
|
1029
|
-
};
|
|
1048
|
+
if (isTeleportDeferred(n2.props) || parentSuspense && parentSuspense.pendingBranch) {
|
|
1049
|
+
queuePendingMount(n2);
|
|
1050
|
+
return;
|
|
1051
|
+
}
|
|
1030
1052
|
if (disabled) {
|
|
1031
|
-
mount(container, mainAnchor);
|
|
1053
|
+
mount(n2, container, mainAnchor);
|
|
1032
1054
|
updateCssVars(n2, true);
|
|
1033
1055
|
}
|
|
1034
|
-
|
|
1035
|
-
n2.el.__isMounted = false;
|
|
1036
|
-
queuePostRenderEffect(() => {
|
|
1037
|
-
mountToTarget();
|
|
1038
|
-
delete n2.el.__isMounted;
|
|
1039
|
-
}, parentSuspense);
|
|
1040
|
-
} else {
|
|
1041
|
-
mountToTarget();
|
|
1042
|
-
}
|
|
1056
|
+
mountToTarget();
|
|
1043
1057
|
} else {
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
parentComponent,
|
|
1052
|
-
parentSuspense,
|
|
1053
|
-
namespace,
|
|
1054
|
-
slotScopeIds,
|
|
1055
|
-
optimized,
|
|
1056
|
-
internals
|
|
1057
|
-
);
|
|
1058
|
-
}, parentSuspense);
|
|
1058
|
+
n2.el = n1.el;
|
|
1059
|
+
const mainAnchor = n2.anchor = n1.anchor;
|
|
1060
|
+
const pendingMount = pendingMounts.get(n1);
|
|
1061
|
+
if (pendingMount) {
|
|
1062
|
+
pendingMount.flags |= 8;
|
|
1063
|
+
pendingMounts.delete(n1);
|
|
1064
|
+
queuePendingMount(n2);
|
|
1059
1065
|
return;
|
|
1060
1066
|
}
|
|
1061
|
-
n2.el = n1.el;
|
|
1062
1067
|
n2.targetStart = n1.targetStart;
|
|
1063
|
-
const mainAnchor = n2.anchor = n1.anchor;
|
|
1064
1068
|
const target = n2.target = n1.target;
|
|
1065
1069
|
const targetAnchor = n2.targetAnchor = n1.targetAnchor;
|
|
1066
1070
|
const wasDisabled = isTeleportDisabled(n1.props);
|
|
@@ -1153,13 +1157,19 @@ const TeleportImpl = {
|
|
|
1153
1157
|
target,
|
|
1154
1158
|
props
|
|
1155
1159
|
} = vnode;
|
|
1160
|
+
let shouldRemove = doRemove || !isTeleportDisabled(props);
|
|
1161
|
+
const pendingMount = pendingMounts.get(vnode);
|
|
1162
|
+
if (pendingMount) {
|
|
1163
|
+
pendingMount.flags |= 8;
|
|
1164
|
+
pendingMounts.delete(vnode);
|
|
1165
|
+
shouldRemove = false;
|
|
1166
|
+
}
|
|
1156
1167
|
if (target) {
|
|
1157
1168
|
hostRemove(targetStart);
|
|
1158
1169
|
hostRemove(targetAnchor);
|
|
1159
1170
|
}
|
|
1160
1171
|
doRemove && hostRemove(anchor);
|
|
1161
1172
|
if (shapeFlag & 16) {
|
|
1162
|
-
const shouldRemove = doRemove || !isTeleportDisabled(props);
|
|
1163
1173
|
for (let i = 0; i < children.length; i++) {
|
|
1164
1174
|
const child = children[i];
|
|
1165
1175
|
unmount(
|
|
@@ -1525,7 +1535,7 @@ function resolveTransitionHooks(vnode, props, state, instance, postClone) {
|
|
|
1525
1535
|
callHook(hook, [el]);
|
|
1526
1536
|
},
|
|
1527
1537
|
enter(el) {
|
|
1528
|
-
if (leavingVNodesCache[key] === vnode) return;
|
|
1538
|
+
if (!isHmrUpdating && leavingVNodesCache[key] === vnode) return;
|
|
1529
1539
|
let hook = onEnter;
|
|
1530
1540
|
let afterHook = onAfterEnter;
|
|
1531
1541
|
let cancelHook = onEnterCancelled;
|
|
@@ -4766,11 +4776,12 @@ function hasPropValueChanged(nextProps, prevProps, key) {
|
|
|
4766
4776
|
}
|
|
4767
4777
|
return nextProp !== prevProp;
|
|
4768
4778
|
}
|
|
4769
|
-
function updateHOCHostEl({ vnode, parent }, el) {
|
|
4779
|
+
function updateHOCHostEl({ vnode, parent, suspense }, el) {
|
|
4770
4780
|
while (parent) {
|
|
4771
4781
|
const root = parent.subTree;
|
|
4772
4782
|
if (root.suspense && root.suspense.activeBranch === vnode) {
|
|
4773
|
-
root.el =
|
|
4783
|
+
root.suspense.vnode.el = root.el = el;
|
|
4784
|
+
vnode = root;
|
|
4774
4785
|
}
|
|
4775
4786
|
if (root === vnode) {
|
|
4776
4787
|
(vnode = parent.vnode).el = el;
|
|
@@ -4779,6 +4790,9 @@ function updateHOCHostEl({ vnode, parent }, el) {
|
|
|
4779
4790
|
break;
|
|
4780
4791
|
}
|
|
4781
4792
|
}
|
|
4793
|
+
if (suspense && suspense.activeBranch === vnode) {
|
|
4794
|
+
suspense.vnode.el = el;
|
|
4795
|
+
}
|
|
4782
4796
|
}
|
|
4783
4797
|
|
|
4784
4798
|
const internalObjectProto = {};
|
|
@@ -5620,10 +5634,17 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
5620
5634
|
}
|
|
5621
5635
|
hostInsert(el, container, anchor);
|
|
5622
5636
|
if ((vnodeHook = props && props.onVnodeMounted) || needCallTransitionHooks || dirs) {
|
|
5637
|
+
const isHmr = isHmrUpdating;
|
|
5623
5638
|
queuePostRenderEffect(() => {
|
|
5624
|
-
|
|
5625
|
-
|
|
5626
|
-
|
|
5639
|
+
let prev;
|
|
5640
|
+
prev = setHmrUpdating(isHmr);
|
|
5641
|
+
try {
|
|
5642
|
+
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
5643
|
+
needCallTransitionHooks && transition.enter(el);
|
|
5644
|
+
dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted");
|
|
5645
|
+
} finally {
|
|
5646
|
+
setHmrUpdating(prev);
|
|
5647
|
+
}
|
|
5627
5648
|
}, parentSuspense);
|
|
5628
5649
|
}
|
|
5629
5650
|
};
|
|
@@ -6544,7 +6565,8 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6544
6565
|
shapeFlag,
|
|
6545
6566
|
patchFlag,
|
|
6546
6567
|
dirs,
|
|
6547
|
-
cacheIndex
|
|
6568
|
+
cacheIndex,
|
|
6569
|
+
memo
|
|
6548
6570
|
} = vnode;
|
|
6549
6571
|
if (patchFlag === -2) {
|
|
6550
6572
|
optimized = false;
|
|
@@ -6606,10 +6628,14 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6606
6628
|
remove(vnode);
|
|
6607
6629
|
}
|
|
6608
6630
|
}
|
|
6609
|
-
|
|
6631
|
+
const shouldInvalidateMemo = memo != null && cacheIndex == null;
|
|
6632
|
+
if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || shouldInvokeDirs || shouldInvalidateMemo) {
|
|
6610
6633
|
queuePostRenderEffect(() => {
|
|
6611
6634
|
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
6612
6635
|
shouldInvokeDirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted");
|
|
6636
|
+
if (shouldInvalidateMemo) {
|
|
6637
|
+
vnode.el = null;
|
|
6638
|
+
}
|
|
6613
6639
|
}, parentSuspense);
|
|
6614
6640
|
}
|
|
6615
6641
|
};
|
|
@@ -7163,6 +7189,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
7163
7189
|
pendingId: suspenseId++,
|
|
7164
7190
|
timeout: typeof timeout === "number" ? timeout : -1,
|
|
7165
7191
|
activeBranch: null,
|
|
7192
|
+
isFallbackMountPending: false,
|
|
7166
7193
|
pendingBranch: null,
|
|
7167
7194
|
isInFallback: !isHydrating,
|
|
7168
7195
|
isHydrating,
|
|
@@ -7212,7 +7239,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
7212
7239
|
}
|
|
7213
7240
|
};
|
|
7214
7241
|
}
|
|
7215
|
-
if (activeBranch) {
|
|
7242
|
+
if (activeBranch && !suspense.isFallbackMountPending) {
|
|
7216
7243
|
if (parentNode(activeBranch.el) === container2) {
|
|
7217
7244
|
anchor = next(activeBranch);
|
|
7218
7245
|
}
|
|
@@ -7225,6 +7252,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
7225
7252
|
move(pendingBranch, container2, anchor, 0);
|
|
7226
7253
|
}
|
|
7227
7254
|
}
|
|
7255
|
+
suspense.isFallbackMountPending = false;
|
|
7228
7256
|
setActiveBranch(suspense, pendingBranch);
|
|
7229
7257
|
suspense.pendingBranch = null;
|
|
7230
7258
|
suspense.isInFallback = false;
|
|
@@ -7260,6 +7288,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
7260
7288
|
triggerEvent(vnode2, "onFallback");
|
|
7261
7289
|
const anchor2 = next(activeBranch);
|
|
7262
7290
|
const mountFallback = () => {
|
|
7291
|
+
suspense.isFallbackMountPending = false;
|
|
7263
7292
|
if (!suspense.isInFallback) {
|
|
7264
7293
|
return;
|
|
7265
7294
|
}
|
|
@@ -7279,6 +7308,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
7279
7308
|
};
|
|
7280
7309
|
const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === "out-in";
|
|
7281
7310
|
if (delayEnter) {
|
|
7311
|
+
suspense.isFallbackMountPending = true;
|
|
7282
7312
|
activeBranch.transition.afterLeave = mountFallback;
|
|
7283
7313
|
}
|
|
7284
7314
|
suspense.isInFallback = true;
|
|
@@ -7313,6 +7343,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
7313
7343
|
if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) {
|
|
7314
7344
|
return;
|
|
7315
7345
|
}
|
|
7346
|
+
unsetCurrentInstance();
|
|
7316
7347
|
instance.asyncResolved = true;
|
|
7317
7348
|
const { vnode: vnode2 } = instance;
|
|
7318
7349
|
{
|
|
@@ -7829,6 +7860,10 @@ function mergeProps(...args) {
|
|
|
7829
7860
|
const incoming = toMerge[key];
|
|
7830
7861
|
if (incoming && existing !== incoming && !(shared.isArray(existing) && existing.includes(incoming))) {
|
|
7831
7862
|
ret[key] = existing ? [].concat(existing, incoming) : incoming;
|
|
7863
|
+
} else if (incoming == null && existing == null && // mergeProps({ 'onUpdate:modelValue': undefined }) should not retain
|
|
7864
|
+
// the model listener.
|
|
7865
|
+
!shared.isModelListener(key)) {
|
|
7866
|
+
ret[key] = incoming;
|
|
7832
7867
|
}
|
|
7833
7868
|
} else if (key !== "") {
|
|
7834
7869
|
ret[key] = toMerge[key];
|
|
@@ -8513,7 +8548,7 @@ function isMemoSame(cached, memo) {
|
|
|
8513
8548
|
return true;
|
|
8514
8549
|
}
|
|
8515
8550
|
|
|
8516
|
-
const version = "3.5.
|
|
8551
|
+
const version = "3.5.32";
|
|
8517
8552
|
const warn = warn$1 ;
|
|
8518
8553
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
8519
8554
|
const devtools = devtools$1 ;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-core v3.5.
|
|
2
|
+
* @vue/runtime-core v3.5.32
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -512,6 +512,7 @@ function createPathGetter(ctx, path) {
|
|
|
512
512
|
};
|
|
513
513
|
}
|
|
514
514
|
|
|
515
|
+
const pendingMounts = /* @__PURE__ */ new WeakMap();
|
|
515
516
|
const TeleportEndKey = /* @__PURE__ */ Symbol("_vte");
|
|
516
517
|
const isTeleport = (type) => type.__isTeleport;
|
|
517
518
|
const isTeleportDisabled = (props) => props && (props.disabled || props.disabled === "");
|
|
@@ -542,78 +543,78 @@ const TeleportImpl = {
|
|
|
542
543
|
o: { insert, querySelector, createText, createComment }
|
|
543
544
|
} = internals;
|
|
544
545
|
const disabled = isTeleportDisabled(n2.props);
|
|
545
|
-
let {
|
|
546
|
+
let { dynamicChildren } = n2;
|
|
547
|
+
const mount = (vnode, container2, anchor2) => {
|
|
548
|
+
if (vnode.shapeFlag & 16) {
|
|
549
|
+
mountChildren(
|
|
550
|
+
vnode.children,
|
|
551
|
+
container2,
|
|
552
|
+
anchor2,
|
|
553
|
+
parentComponent,
|
|
554
|
+
parentSuspense,
|
|
555
|
+
namespace,
|
|
556
|
+
slotScopeIds,
|
|
557
|
+
optimized
|
|
558
|
+
);
|
|
559
|
+
}
|
|
560
|
+
};
|
|
561
|
+
const mountToTarget = (vnode = n2) => {
|
|
562
|
+
const disabled2 = isTeleportDisabled(vnode.props);
|
|
563
|
+
const target = vnode.target = resolveTarget(vnode.props, querySelector);
|
|
564
|
+
const targetAnchor = prepareAnchor(target, vnode, createText, insert);
|
|
565
|
+
if (target) {
|
|
566
|
+
if (namespace !== "svg" && isTargetSVG(target)) {
|
|
567
|
+
namespace = "svg";
|
|
568
|
+
} else if (namespace !== "mathml" && isTargetMathML(target)) {
|
|
569
|
+
namespace = "mathml";
|
|
570
|
+
}
|
|
571
|
+
if (parentComponent && parentComponent.isCE) {
|
|
572
|
+
(parentComponent.ce._teleportTargets || (parentComponent.ce._teleportTargets = /* @__PURE__ */ new Set())).add(target);
|
|
573
|
+
}
|
|
574
|
+
if (!disabled2) {
|
|
575
|
+
mount(vnode, target, targetAnchor);
|
|
576
|
+
updateCssVars(vnode, false);
|
|
577
|
+
}
|
|
578
|
+
}
|
|
579
|
+
};
|
|
580
|
+
const queuePendingMount = (vnode) => {
|
|
581
|
+
const mountJob = () => {
|
|
582
|
+
if (pendingMounts.get(vnode) !== mountJob) return;
|
|
583
|
+
pendingMounts.delete(vnode);
|
|
584
|
+
if (isTeleportDisabled(vnode.props)) {
|
|
585
|
+
mount(vnode, container, vnode.anchor);
|
|
586
|
+
updateCssVars(vnode, true);
|
|
587
|
+
}
|
|
588
|
+
mountToTarget(vnode);
|
|
589
|
+
};
|
|
590
|
+
pendingMounts.set(vnode, mountJob);
|
|
591
|
+
queuePostRenderEffect(mountJob, parentSuspense);
|
|
592
|
+
};
|
|
546
593
|
if (n1 == null) {
|
|
547
594
|
const placeholder = n2.el = createText("");
|
|
548
595
|
const mainAnchor = n2.anchor = createText("");
|
|
549
596
|
insert(placeholder, container, anchor);
|
|
550
597
|
insert(mainAnchor, container, anchor);
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
container2,
|
|
556
|
-
anchor2,
|
|
557
|
-
parentComponent,
|
|
558
|
-
parentSuspense,
|
|
559
|
-
namespace,
|
|
560
|
-
slotScopeIds,
|
|
561
|
-
optimized
|
|
562
|
-
);
|
|
563
|
-
}
|
|
564
|
-
};
|
|
565
|
-
const mountToTarget = () => {
|
|
566
|
-
const target = n2.target = resolveTarget(n2.props, querySelector);
|
|
567
|
-
const targetAnchor = prepareAnchor(target, n2, createText, insert);
|
|
568
|
-
if (target) {
|
|
569
|
-
if (namespace !== "svg" && isTargetSVG(target)) {
|
|
570
|
-
namespace = "svg";
|
|
571
|
-
} else if (namespace !== "mathml" && isTargetMathML(target)) {
|
|
572
|
-
namespace = "mathml";
|
|
573
|
-
}
|
|
574
|
-
if (parentComponent && parentComponent.isCE) {
|
|
575
|
-
(parentComponent.ce._teleportTargets || (parentComponent.ce._teleportTargets = /* @__PURE__ */ new Set())).add(target);
|
|
576
|
-
}
|
|
577
|
-
if (!disabled) {
|
|
578
|
-
mount(target, targetAnchor);
|
|
579
|
-
updateCssVars(n2, false);
|
|
580
|
-
}
|
|
581
|
-
}
|
|
582
|
-
};
|
|
598
|
+
if (isTeleportDeferred(n2.props) || parentSuspense && parentSuspense.pendingBranch) {
|
|
599
|
+
queuePendingMount(n2);
|
|
600
|
+
return;
|
|
601
|
+
}
|
|
583
602
|
if (disabled) {
|
|
584
|
-
mount(container, mainAnchor);
|
|
603
|
+
mount(n2, container, mainAnchor);
|
|
585
604
|
updateCssVars(n2, true);
|
|
586
605
|
}
|
|
587
|
-
|
|
588
|
-
n2.el.__isMounted = false;
|
|
589
|
-
queuePostRenderEffect(() => {
|
|
590
|
-
mountToTarget();
|
|
591
|
-
delete n2.el.__isMounted;
|
|
592
|
-
}, parentSuspense);
|
|
593
|
-
} else {
|
|
594
|
-
mountToTarget();
|
|
595
|
-
}
|
|
606
|
+
mountToTarget();
|
|
596
607
|
} else {
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
parentComponent,
|
|
605
|
-
parentSuspense,
|
|
606
|
-
namespace,
|
|
607
|
-
slotScopeIds,
|
|
608
|
-
optimized,
|
|
609
|
-
internals
|
|
610
|
-
);
|
|
611
|
-
}, parentSuspense);
|
|
608
|
+
n2.el = n1.el;
|
|
609
|
+
const mainAnchor = n2.anchor = n1.anchor;
|
|
610
|
+
const pendingMount = pendingMounts.get(n1);
|
|
611
|
+
if (pendingMount) {
|
|
612
|
+
pendingMount.flags |= 8;
|
|
613
|
+
pendingMounts.delete(n1);
|
|
614
|
+
queuePendingMount(n2);
|
|
612
615
|
return;
|
|
613
616
|
}
|
|
614
|
-
n2.el = n1.el;
|
|
615
617
|
n2.targetStart = n1.targetStart;
|
|
616
|
-
const mainAnchor = n2.anchor = n1.anchor;
|
|
617
618
|
const target = n2.target = n1.target;
|
|
618
619
|
const targetAnchor = n2.targetAnchor = n1.targetAnchor;
|
|
619
620
|
const wasDisabled = isTeleportDisabled(n1.props);
|
|
@@ -700,13 +701,19 @@ const TeleportImpl = {
|
|
|
700
701
|
target,
|
|
701
702
|
props
|
|
702
703
|
} = vnode;
|
|
704
|
+
let shouldRemove = doRemove || !isTeleportDisabled(props);
|
|
705
|
+
const pendingMount = pendingMounts.get(vnode);
|
|
706
|
+
if (pendingMount) {
|
|
707
|
+
pendingMount.flags |= 8;
|
|
708
|
+
pendingMounts.delete(vnode);
|
|
709
|
+
shouldRemove = false;
|
|
710
|
+
}
|
|
703
711
|
if (target) {
|
|
704
712
|
hostRemove(targetStart);
|
|
705
713
|
hostRemove(targetAnchor);
|
|
706
714
|
}
|
|
707
715
|
doRemove && hostRemove(anchor);
|
|
708
716
|
if (shapeFlag & 16) {
|
|
709
|
-
const shouldRemove = doRemove || !isTeleportDisabled(props);
|
|
710
717
|
for (let i = 0; i < children.length; i++) {
|
|
711
718
|
const child = children[i];
|
|
712
719
|
unmount(
|
|
@@ -3624,11 +3631,12 @@ function hasPropValueChanged(nextProps, prevProps, key) {
|
|
|
3624
3631
|
}
|
|
3625
3632
|
return nextProp !== prevProp;
|
|
3626
3633
|
}
|
|
3627
|
-
function updateHOCHostEl({ vnode, parent }, el) {
|
|
3634
|
+
function updateHOCHostEl({ vnode, parent, suspense }, el) {
|
|
3628
3635
|
while (parent) {
|
|
3629
3636
|
const root = parent.subTree;
|
|
3630
3637
|
if (root.suspense && root.suspense.activeBranch === vnode) {
|
|
3631
|
-
root.el =
|
|
3638
|
+
root.suspense.vnode.el = root.el = el;
|
|
3639
|
+
vnode = root;
|
|
3632
3640
|
}
|
|
3633
3641
|
if (root === vnode) {
|
|
3634
3642
|
(vnode = parent.vnode).el = el;
|
|
@@ -3637,6 +3645,9 @@ function updateHOCHostEl({ vnode, parent }, el) {
|
|
|
3637
3645
|
break;
|
|
3638
3646
|
}
|
|
3639
3647
|
}
|
|
3648
|
+
if (suspense && suspense.activeBranch === vnode) {
|
|
3649
|
+
suspense.vnode.el = el;
|
|
3650
|
+
}
|
|
3640
3651
|
}
|
|
3641
3652
|
|
|
3642
3653
|
const internalObjectProto = {};
|
|
@@ -4263,9 +4274,12 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4263
4274
|
hostInsert(el, container, anchor);
|
|
4264
4275
|
if ((vnodeHook = props && props.onVnodeMounted) || needCallTransitionHooks || dirs) {
|
|
4265
4276
|
queuePostRenderEffect(() => {
|
|
4266
|
-
|
|
4267
|
-
|
|
4268
|
-
|
|
4277
|
+
try {
|
|
4278
|
+
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
4279
|
+
needCallTransitionHooks && transition.enter(el);
|
|
4280
|
+
dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted");
|
|
4281
|
+
} finally {
|
|
4282
|
+
}
|
|
4269
4283
|
}, parentSuspense);
|
|
4270
4284
|
}
|
|
4271
4285
|
};
|
|
@@ -5092,7 +5106,8 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
5092
5106
|
shapeFlag,
|
|
5093
5107
|
patchFlag,
|
|
5094
5108
|
dirs,
|
|
5095
|
-
cacheIndex
|
|
5109
|
+
cacheIndex,
|
|
5110
|
+
memo
|
|
5096
5111
|
} = vnode;
|
|
5097
5112
|
if (patchFlag === -2) {
|
|
5098
5113
|
optimized = false;
|
|
@@ -5154,10 +5169,14 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
5154
5169
|
remove(vnode);
|
|
5155
5170
|
}
|
|
5156
5171
|
}
|
|
5157
|
-
|
|
5172
|
+
const shouldInvalidateMemo = memo != null && cacheIndex == null;
|
|
5173
|
+
if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || shouldInvokeDirs || shouldInvalidateMemo) {
|
|
5158
5174
|
queuePostRenderEffect(() => {
|
|
5159
5175
|
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
5160
5176
|
shouldInvokeDirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted");
|
|
5177
|
+
if (shouldInvalidateMemo) {
|
|
5178
|
+
vnode.el = null;
|
|
5179
|
+
}
|
|
5161
5180
|
}, parentSuspense);
|
|
5162
5181
|
}
|
|
5163
5182
|
};
|
|
@@ -5684,6 +5703,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
5684
5703
|
pendingId: suspenseId++,
|
|
5685
5704
|
timeout: typeof timeout === "number" ? timeout : -1,
|
|
5686
5705
|
activeBranch: null,
|
|
5706
|
+
isFallbackMountPending: false,
|
|
5687
5707
|
pendingBranch: null,
|
|
5688
5708
|
isInFallback: !isHydrating,
|
|
5689
5709
|
isHydrating,
|
|
@@ -5721,7 +5741,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
5721
5741
|
}
|
|
5722
5742
|
};
|
|
5723
5743
|
}
|
|
5724
|
-
if (activeBranch) {
|
|
5744
|
+
if (activeBranch && !suspense.isFallbackMountPending) {
|
|
5725
5745
|
if (parentNode(activeBranch.el) === container2) {
|
|
5726
5746
|
anchor = next(activeBranch);
|
|
5727
5747
|
}
|
|
@@ -5734,6 +5754,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
5734
5754
|
move(pendingBranch, container2, anchor, 0);
|
|
5735
5755
|
}
|
|
5736
5756
|
}
|
|
5757
|
+
suspense.isFallbackMountPending = false;
|
|
5737
5758
|
setActiveBranch(suspense, pendingBranch);
|
|
5738
5759
|
suspense.pendingBranch = null;
|
|
5739
5760
|
suspense.isInFallback = false;
|
|
@@ -5769,6 +5790,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
5769
5790
|
triggerEvent(vnode2, "onFallback");
|
|
5770
5791
|
const anchor2 = next(activeBranch);
|
|
5771
5792
|
const mountFallback = () => {
|
|
5793
|
+
suspense.isFallbackMountPending = false;
|
|
5772
5794
|
if (!suspense.isInFallback) {
|
|
5773
5795
|
return;
|
|
5774
5796
|
}
|
|
@@ -5788,6 +5810,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
5788
5810
|
};
|
|
5789
5811
|
const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === "out-in";
|
|
5790
5812
|
if (delayEnter) {
|
|
5813
|
+
suspense.isFallbackMountPending = true;
|
|
5791
5814
|
activeBranch.transition.afterLeave = mountFallback;
|
|
5792
5815
|
}
|
|
5793
5816
|
suspense.isInFallback = true;
|
|
@@ -5822,6 +5845,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
5822
5845
|
if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) {
|
|
5823
5846
|
return;
|
|
5824
5847
|
}
|
|
5848
|
+
unsetCurrentInstance();
|
|
5825
5849
|
instance.asyncResolved = true;
|
|
5826
5850
|
const { vnode: vnode2 } = instance;
|
|
5827
5851
|
handleSetupResult(instance, asyncSetupResult, false);
|
|
@@ -6292,6 +6316,10 @@ function mergeProps(...args) {
|
|
|
6292
6316
|
const incoming = toMerge[key];
|
|
6293
6317
|
if (incoming && existing !== incoming && !(shared.isArray(existing) && existing.includes(incoming))) {
|
|
6294
6318
|
ret[key] = existing ? [].concat(existing, incoming) : incoming;
|
|
6319
|
+
} else if (incoming == null && existing == null && // mergeProps({ 'onUpdate:modelValue': undefined }) should not retain
|
|
6320
|
+
// the model listener.
|
|
6321
|
+
!shared.isModelListener(key)) {
|
|
6322
|
+
ret[key] = incoming;
|
|
6295
6323
|
}
|
|
6296
6324
|
} else if (key !== "") {
|
|
6297
6325
|
ret[key] = toMerge[key];
|
|
@@ -6658,7 +6686,7 @@ function isMemoSame(cached, memo) {
|
|
|
6658
6686
|
return true;
|
|
6659
6687
|
}
|
|
6660
6688
|
|
|
6661
|
-
const version = "3.5.
|
|
6689
|
+
const version = "3.5.32";
|
|
6662
6690
|
const warn$1 = shared.NOOP;
|
|
6663
6691
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
6664
6692
|
const devtools = void 0;
|
package/dist/runtime-core.d.ts
CHANGED
|
@@ -271,6 +271,22 @@ export declare function defineOptions<RawBindings = {}, D = {}, C extends Comput
|
|
|
271
271
|
*/
|
|
272
272
|
slots?: never;
|
|
273
273
|
}): void;
|
|
274
|
+
/**
|
|
275
|
+
* Vue `<script setup>` compiler macro for providing type hints to IDEs for
|
|
276
|
+
* slot name and slot props type checking.
|
|
277
|
+
*
|
|
278
|
+
* Example usage:
|
|
279
|
+
* ```ts
|
|
280
|
+
* const slots = defineSlots<{
|
|
281
|
+
* default(props: { msg: string }): any
|
|
282
|
+
* }>()
|
|
283
|
+
* ```
|
|
284
|
+
*
|
|
285
|
+
* This is only usable inside `<script setup>`, is compiled away in the
|
|
286
|
+
* output and should **not** be actually called at runtime.
|
|
287
|
+
*
|
|
288
|
+
* @see {@link https://vuejs.org/api/sfc-script-setup.html#defineslots}
|
|
289
|
+
*/
|
|
274
290
|
export declare function defineSlots<S extends Record<string, any> = Record<string, any>>(): StrictUnwrapSlotsType<SlotsType<S>>;
|
|
275
291
|
export type ModelRef<T, M extends PropertyKey = string, G = T, S = T> = Ref<G, S> & [
|
|
276
292
|
ModelRef<T, M, G, S>,
|
|
@@ -524,6 +540,10 @@ export interface SuspenseProps {
|
|
|
524
540
|
onResolve?: () => void;
|
|
525
541
|
onPending?: () => void;
|
|
526
542
|
onFallback?: () => void;
|
|
543
|
+
/**
|
|
544
|
+
* Switch to fallback content if it takes longer than `timeout` milliseconds to render the new default content.
|
|
545
|
+
* A `timeout` value of `0` will cause the fallback content to be displayed immediately when default content is replaced.
|
|
546
|
+
*/
|
|
527
547
|
timeout?: string | number;
|
|
528
548
|
/**
|
|
529
549
|
* Allow suspense to be captured by parent suspense
|
|
@@ -557,6 +577,7 @@ export interface SuspenseBoundary {
|
|
|
557
577
|
container: RendererElement;
|
|
558
578
|
hiddenContainer: RendererElement;
|
|
559
579
|
activeBranch: VNode | null;
|
|
580
|
+
isFallbackMountPending: boolean;
|
|
560
581
|
pendingBranch: VNode | null;
|
|
561
582
|
deps: number;
|
|
562
583
|
pendingId: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-core v3.5.
|
|
2
|
+
* @vue/runtime-core v3.5.32
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -448,6 +448,13 @@ function checkRecursiveUpdates(seen, fn) {
|
|
|
448
448
|
}
|
|
449
449
|
|
|
450
450
|
let isHmrUpdating = false;
|
|
451
|
+
const setHmrUpdating = (v) => {
|
|
452
|
+
try {
|
|
453
|
+
return isHmrUpdating;
|
|
454
|
+
} finally {
|
|
455
|
+
isHmrUpdating = v;
|
|
456
|
+
}
|
|
457
|
+
};
|
|
451
458
|
const hmrDirtyComponents = /* @__PURE__ */ new Map();
|
|
452
459
|
if (!!(process.env.NODE_ENV !== "production")) {
|
|
453
460
|
getGlobalThis().__VUE_HMR_RUNTIME__ = {
|
|
@@ -941,6 +948,7 @@ function createPathGetter(ctx, path) {
|
|
|
941
948
|
};
|
|
942
949
|
}
|
|
943
950
|
|
|
951
|
+
const pendingMounts = /* @__PURE__ */ new WeakMap();
|
|
944
952
|
const TeleportEndKey = /* @__PURE__ */ Symbol("_vte");
|
|
945
953
|
const isTeleport = (type) => type.__isTeleport;
|
|
946
954
|
const isTeleportDisabled = (props) => props && (props.disabled || props.disabled === "");
|
|
@@ -982,88 +990,84 @@ const TeleportImpl = {
|
|
|
982
990
|
o: { insert, querySelector, createText, createComment }
|
|
983
991
|
} = internals;
|
|
984
992
|
const disabled = isTeleportDisabled(n2.props);
|
|
985
|
-
let {
|
|
993
|
+
let { dynamicChildren } = n2;
|
|
986
994
|
if (!!(process.env.NODE_ENV !== "production") && isHmrUpdating) {
|
|
987
995
|
optimized = false;
|
|
988
996
|
dynamicChildren = null;
|
|
989
997
|
}
|
|
998
|
+
const mount = (vnode, container2, anchor2) => {
|
|
999
|
+
if (vnode.shapeFlag & 16) {
|
|
1000
|
+
mountChildren(
|
|
1001
|
+
vnode.children,
|
|
1002
|
+
container2,
|
|
1003
|
+
anchor2,
|
|
1004
|
+
parentComponent,
|
|
1005
|
+
parentSuspense,
|
|
1006
|
+
namespace,
|
|
1007
|
+
slotScopeIds,
|
|
1008
|
+
optimized
|
|
1009
|
+
);
|
|
1010
|
+
}
|
|
1011
|
+
};
|
|
1012
|
+
const mountToTarget = (vnode = n2) => {
|
|
1013
|
+
const disabled2 = isTeleportDisabled(vnode.props);
|
|
1014
|
+
const target = vnode.target = resolveTarget(vnode.props, querySelector);
|
|
1015
|
+
const targetAnchor = prepareAnchor(target, vnode, createText, insert);
|
|
1016
|
+
if (target) {
|
|
1017
|
+
if (namespace !== "svg" && isTargetSVG(target)) {
|
|
1018
|
+
namespace = "svg";
|
|
1019
|
+
} else if (namespace !== "mathml" && isTargetMathML(target)) {
|
|
1020
|
+
namespace = "mathml";
|
|
1021
|
+
}
|
|
1022
|
+
if (parentComponent && parentComponent.isCE) {
|
|
1023
|
+
(parentComponent.ce._teleportTargets || (parentComponent.ce._teleportTargets = /* @__PURE__ */ new Set())).add(target);
|
|
1024
|
+
}
|
|
1025
|
+
if (!disabled2) {
|
|
1026
|
+
mount(vnode, target, targetAnchor);
|
|
1027
|
+
updateCssVars(vnode, false);
|
|
1028
|
+
}
|
|
1029
|
+
} else if (!!(process.env.NODE_ENV !== "production") && !disabled2) {
|
|
1030
|
+
warn$1("Invalid Teleport target on mount:", target, `(${typeof target})`);
|
|
1031
|
+
}
|
|
1032
|
+
};
|
|
1033
|
+
const queuePendingMount = (vnode) => {
|
|
1034
|
+
const mountJob = () => {
|
|
1035
|
+
if (pendingMounts.get(vnode) !== mountJob) return;
|
|
1036
|
+
pendingMounts.delete(vnode);
|
|
1037
|
+
if (isTeleportDisabled(vnode.props)) {
|
|
1038
|
+
mount(vnode, container, vnode.anchor);
|
|
1039
|
+
updateCssVars(vnode, true);
|
|
1040
|
+
}
|
|
1041
|
+
mountToTarget(vnode);
|
|
1042
|
+
};
|
|
1043
|
+
pendingMounts.set(vnode, mountJob);
|
|
1044
|
+
queuePostRenderEffect(mountJob, parentSuspense);
|
|
1045
|
+
};
|
|
990
1046
|
if (n1 == null) {
|
|
991
1047
|
const placeholder = n2.el = !!(process.env.NODE_ENV !== "production") ? createComment("teleport start") : createText("");
|
|
992
1048
|
const mainAnchor = n2.anchor = !!(process.env.NODE_ENV !== "production") ? createComment("teleport end") : createText("");
|
|
993
1049
|
insert(placeholder, container, anchor);
|
|
994
1050
|
insert(mainAnchor, container, anchor);
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
container2,
|
|
1000
|
-
anchor2,
|
|
1001
|
-
parentComponent,
|
|
1002
|
-
parentSuspense,
|
|
1003
|
-
namespace,
|
|
1004
|
-
slotScopeIds,
|
|
1005
|
-
optimized
|
|
1006
|
-
);
|
|
1007
|
-
}
|
|
1008
|
-
};
|
|
1009
|
-
const mountToTarget = () => {
|
|
1010
|
-
const target = n2.target = resolveTarget(n2.props, querySelector);
|
|
1011
|
-
const targetAnchor = prepareAnchor(target, n2, createText, insert);
|
|
1012
|
-
if (target) {
|
|
1013
|
-
if (namespace !== "svg" && isTargetSVG(target)) {
|
|
1014
|
-
namespace = "svg";
|
|
1015
|
-
} else if (namespace !== "mathml" && isTargetMathML(target)) {
|
|
1016
|
-
namespace = "mathml";
|
|
1017
|
-
}
|
|
1018
|
-
if (parentComponent && parentComponent.isCE) {
|
|
1019
|
-
(parentComponent.ce._teleportTargets || (parentComponent.ce._teleportTargets = /* @__PURE__ */ new Set())).add(target);
|
|
1020
|
-
}
|
|
1021
|
-
if (!disabled) {
|
|
1022
|
-
mount(target, targetAnchor);
|
|
1023
|
-
updateCssVars(n2, false);
|
|
1024
|
-
}
|
|
1025
|
-
} else if (!!(process.env.NODE_ENV !== "production") && !disabled) {
|
|
1026
|
-
warn$1(
|
|
1027
|
-
"Invalid Teleport target on mount:",
|
|
1028
|
-
target,
|
|
1029
|
-
`(${typeof target})`
|
|
1030
|
-
);
|
|
1031
|
-
}
|
|
1032
|
-
};
|
|
1051
|
+
if (isTeleportDeferred(n2.props) || parentSuspense && parentSuspense.pendingBranch) {
|
|
1052
|
+
queuePendingMount(n2);
|
|
1053
|
+
return;
|
|
1054
|
+
}
|
|
1033
1055
|
if (disabled) {
|
|
1034
|
-
mount(container, mainAnchor);
|
|
1056
|
+
mount(n2, container, mainAnchor);
|
|
1035
1057
|
updateCssVars(n2, true);
|
|
1036
1058
|
}
|
|
1037
|
-
|
|
1038
|
-
n2.el.__isMounted = false;
|
|
1039
|
-
queuePostRenderEffect(() => {
|
|
1040
|
-
mountToTarget();
|
|
1041
|
-
delete n2.el.__isMounted;
|
|
1042
|
-
}, parentSuspense);
|
|
1043
|
-
} else {
|
|
1044
|
-
mountToTarget();
|
|
1045
|
-
}
|
|
1059
|
+
mountToTarget();
|
|
1046
1060
|
} else {
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
parentComponent,
|
|
1055
|
-
parentSuspense,
|
|
1056
|
-
namespace,
|
|
1057
|
-
slotScopeIds,
|
|
1058
|
-
optimized,
|
|
1059
|
-
internals
|
|
1060
|
-
);
|
|
1061
|
-
}, parentSuspense);
|
|
1061
|
+
n2.el = n1.el;
|
|
1062
|
+
const mainAnchor = n2.anchor = n1.anchor;
|
|
1063
|
+
const pendingMount = pendingMounts.get(n1);
|
|
1064
|
+
if (pendingMount) {
|
|
1065
|
+
pendingMount.flags |= 8;
|
|
1066
|
+
pendingMounts.delete(n1);
|
|
1067
|
+
queuePendingMount(n2);
|
|
1062
1068
|
return;
|
|
1063
1069
|
}
|
|
1064
|
-
n2.el = n1.el;
|
|
1065
1070
|
n2.targetStart = n1.targetStart;
|
|
1066
|
-
const mainAnchor = n2.anchor = n1.anchor;
|
|
1067
1071
|
const target = n2.target = n1.target;
|
|
1068
1072
|
const targetAnchor = n2.targetAnchor = n1.targetAnchor;
|
|
1069
1073
|
const wasDisabled = isTeleportDisabled(n1.props);
|
|
@@ -1156,13 +1160,19 @@ const TeleportImpl = {
|
|
|
1156
1160
|
target,
|
|
1157
1161
|
props
|
|
1158
1162
|
} = vnode;
|
|
1163
|
+
let shouldRemove = doRemove || !isTeleportDisabled(props);
|
|
1164
|
+
const pendingMount = pendingMounts.get(vnode);
|
|
1165
|
+
if (pendingMount) {
|
|
1166
|
+
pendingMount.flags |= 8;
|
|
1167
|
+
pendingMounts.delete(vnode);
|
|
1168
|
+
shouldRemove = false;
|
|
1169
|
+
}
|
|
1159
1170
|
if (target) {
|
|
1160
1171
|
hostRemove(targetStart);
|
|
1161
1172
|
hostRemove(targetAnchor);
|
|
1162
1173
|
}
|
|
1163
1174
|
doRemove && hostRemove(anchor);
|
|
1164
1175
|
if (shapeFlag & 16) {
|
|
1165
|
-
const shouldRemove = doRemove || !isTeleportDisabled(props);
|
|
1166
1176
|
for (let i = 0; i < children.length; i++) {
|
|
1167
1177
|
const child = children[i];
|
|
1168
1178
|
unmount(
|
|
@@ -1529,7 +1539,7 @@ function resolveTransitionHooks(vnode, props, state, instance, postClone) {
|
|
|
1529
1539
|
callHook(hook, [el]);
|
|
1530
1540
|
},
|
|
1531
1541
|
enter(el) {
|
|
1532
|
-
if (leavingVNodesCache[key] === vnode) return;
|
|
1542
|
+
if (!isHmrUpdating && leavingVNodesCache[key] === vnode) return;
|
|
1533
1543
|
let hook = onEnter;
|
|
1534
1544
|
let afterHook = onAfterEnter;
|
|
1535
1545
|
let cancelHook = onEnterCancelled;
|
|
@@ -4788,11 +4798,12 @@ function hasPropValueChanged(nextProps, prevProps, key) {
|
|
|
4788
4798
|
}
|
|
4789
4799
|
return nextProp !== prevProp;
|
|
4790
4800
|
}
|
|
4791
|
-
function updateHOCHostEl({ vnode, parent }, el) {
|
|
4801
|
+
function updateHOCHostEl({ vnode, parent, suspense }, el) {
|
|
4792
4802
|
while (parent) {
|
|
4793
4803
|
const root = parent.subTree;
|
|
4794
4804
|
if (root.suspense && root.suspense.activeBranch === vnode) {
|
|
4795
|
-
root.el =
|
|
4805
|
+
root.suspense.vnode.el = root.el = el;
|
|
4806
|
+
vnode = root;
|
|
4796
4807
|
}
|
|
4797
4808
|
if (root === vnode) {
|
|
4798
4809
|
(vnode = parent.vnode).el = el;
|
|
@@ -4801,6 +4812,9 @@ function updateHOCHostEl({ vnode, parent }, el) {
|
|
|
4801
4812
|
break;
|
|
4802
4813
|
}
|
|
4803
4814
|
}
|
|
4815
|
+
if (suspense && suspense.activeBranch === vnode) {
|
|
4816
|
+
suspense.vnode.el = el;
|
|
4817
|
+
}
|
|
4804
4818
|
}
|
|
4805
4819
|
|
|
4806
4820
|
const internalObjectProto = {};
|
|
@@ -5669,10 +5683,17 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
5669
5683
|
}
|
|
5670
5684
|
hostInsert(el, container, anchor);
|
|
5671
5685
|
if ((vnodeHook = props && props.onVnodeMounted) || needCallTransitionHooks || dirs) {
|
|
5686
|
+
const isHmr = !!(process.env.NODE_ENV !== "production") && isHmrUpdating;
|
|
5672
5687
|
queuePostRenderEffect(() => {
|
|
5673
|
-
|
|
5674
|
-
|
|
5675
|
-
|
|
5688
|
+
let prev;
|
|
5689
|
+
if (!!(process.env.NODE_ENV !== "production")) prev = setHmrUpdating(isHmr);
|
|
5690
|
+
try {
|
|
5691
|
+
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
5692
|
+
needCallTransitionHooks && transition.enter(el);
|
|
5693
|
+
dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted");
|
|
5694
|
+
} finally {
|
|
5695
|
+
if (!!(process.env.NODE_ENV !== "production")) setHmrUpdating(prev);
|
|
5696
|
+
}
|
|
5676
5697
|
}, parentSuspense);
|
|
5677
5698
|
}
|
|
5678
5699
|
};
|
|
@@ -6604,7 +6625,8 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6604
6625
|
shapeFlag,
|
|
6605
6626
|
patchFlag,
|
|
6606
6627
|
dirs,
|
|
6607
|
-
cacheIndex
|
|
6628
|
+
cacheIndex,
|
|
6629
|
+
memo
|
|
6608
6630
|
} = vnode;
|
|
6609
6631
|
if (patchFlag === -2) {
|
|
6610
6632
|
optimized = false;
|
|
@@ -6666,10 +6688,14 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6666
6688
|
remove(vnode);
|
|
6667
6689
|
}
|
|
6668
6690
|
}
|
|
6669
|
-
|
|
6691
|
+
const shouldInvalidateMemo = memo != null && cacheIndex == null;
|
|
6692
|
+
if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || shouldInvokeDirs || shouldInvalidateMemo) {
|
|
6670
6693
|
queuePostRenderEffect(() => {
|
|
6671
6694
|
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
6672
6695
|
shouldInvokeDirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted");
|
|
6696
|
+
if (shouldInvalidateMemo) {
|
|
6697
|
+
vnode.el = null;
|
|
6698
|
+
}
|
|
6673
6699
|
}, parentSuspense);
|
|
6674
6700
|
}
|
|
6675
6701
|
};
|
|
@@ -7223,6 +7249,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
7223
7249
|
pendingId: suspenseId++,
|
|
7224
7250
|
timeout: typeof timeout === "number" ? timeout : -1,
|
|
7225
7251
|
activeBranch: null,
|
|
7252
|
+
isFallbackMountPending: false,
|
|
7226
7253
|
pendingBranch: null,
|
|
7227
7254
|
isInFallback: !isHydrating,
|
|
7228
7255
|
isHydrating,
|
|
@@ -7272,7 +7299,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
7272
7299
|
}
|
|
7273
7300
|
};
|
|
7274
7301
|
}
|
|
7275
|
-
if (activeBranch) {
|
|
7302
|
+
if (activeBranch && !suspense.isFallbackMountPending) {
|
|
7276
7303
|
if (parentNode(activeBranch.el) === container2) {
|
|
7277
7304
|
anchor = next(activeBranch);
|
|
7278
7305
|
}
|
|
@@ -7285,6 +7312,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
7285
7312
|
move(pendingBranch, container2, anchor, 0);
|
|
7286
7313
|
}
|
|
7287
7314
|
}
|
|
7315
|
+
suspense.isFallbackMountPending = false;
|
|
7288
7316
|
setActiveBranch(suspense, pendingBranch);
|
|
7289
7317
|
suspense.pendingBranch = null;
|
|
7290
7318
|
suspense.isInFallback = false;
|
|
@@ -7320,6 +7348,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
7320
7348
|
triggerEvent(vnode2, "onFallback");
|
|
7321
7349
|
const anchor2 = next(activeBranch);
|
|
7322
7350
|
const mountFallback = () => {
|
|
7351
|
+
suspense.isFallbackMountPending = false;
|
|
7323
7352
|
if (!suspense.isInFallback) {
|
|
7324
7353
|
return;
|
|
7325
7354
|
}
|
|
@@ -7339,6 +7368,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
7339
7368
|
};
|
|
7340
7369
|
const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === "out-in";
|
|
7341
7370
|
if (delayEnter) {
|
|
7371
|
+
suspense.isFallbackMountPending = true;
|
|
7342
7372
|
activeBranch.transition.afterLeave = mountFallback;
|
|
7343
7373
|
}
|
|
7344
7374
|
suspense.isInFallback = true;
|
|
@@ -7373,6 +7403,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
7373
7403
|
if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) {
|
|
7374
7404
|
return;
|
|
7375
7405
|
}
|
|
7406
|
+
unsetCurrentInstance();
|
|
7376
7407
|
instance.asyncResolved = true;
|
|
7377
7408
|
const { vnode: vnode2 } = instance;
|
|
7378
7409
|
if (!!(process.env.NODE_ENV !== "production")) {
|
|
@@ -7889,6 +7920,10 @@ function mergeProps(...args) {
|
|
|
7889
7920
|
const incoming = toMerge[key];
|
|
7890
7921
|
if (incoming && existing !== incoming && !(isArray(existing) && existing.includes(incoming))) {
|
|
7891
7922
|
ret[key] = existing ? [].concat(existing, incoming) : incoming;
|
|
7923
|
+
} else if (incoming == null && existing == null && // mergeProps({ 'onUpdate:modelValue': undefined }) should not retain
|
|
7924
|
+
// the model listener.
|
|
7925
|
+
!isModelListener(key)) {
|
|
7926
|
+
ret[key] = incoming;
|
|
7892
7927
|
}
|
|
7893
7928
|
} else if (key !== "") {
|
|
7894
7929
|
ret[key] = toMerge[key];
|
|
@@ -8587,7 +8622,7 @@ function isMemoSame(cached, memo) {
|
|
|
8587
8622
|
return true;
|
|
8588
8623
|
}
|
|
8589
8624
|
|
|
8590
|
-
const version = "3.5.
|
|
8625
|
+
const version = "3.5.32";
|
|
8591
8626
|
const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
|
|
8592
8627
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
8593
8628
|
const devtools = !!(process.env.NODE_ENV !== "production") || true ? devtools$1 : void 0;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue/runtime-core",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.32",
|
|
4
4
|
"description": "@vue/runtime-core",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "dist/runtime-core.esm-bundler.js",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
},
|
|
47
47
|
"homepage": "https://github.com/vuejs/core/tree/main/packages/runtime-core#readme",
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@vue/shared": "3.5.
|
|
50
|
-
"@vue/reactivity": "3.5.
|
|
49
|
+
"@vue/shared": "3.5.32",
|
|
50
|
+
"@vue/reactivity": "3.5.32"
|
|
51
51
|
}
|
|
52
52
|
}
|