vue 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/vue.cjs.js +1 -1
- package/dist/vue.cjs.prod.js +1 -1
- package/dist/vue.esm-browser.js +119 -83
- package/dist/vue.esm-browser.prod.js +7 -7
- package/dist/vue.esm-bundler.js +1 -1
- package/dist/vue.global.js +119 -83
- package/dist/vue.global.prod.js +8 -8
- package/dist/vue.runtime.esm-browser.js +118 -82
- package/dist/vue.runtime.esm-browser.prod.js +3 -3
- package/dist/vue.runtime.esm-bundler.js +1 -1
- package/dist/vue.runtime.global.js +118 -82
- package/dist/vue.runtime.global.prod.js +3 -3
- 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,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* vue v3.5.
|
|
2
|
+
* vue v3.5.32
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -1952,16 +1952,16 @@ function toRefs(object) {
|
|
|
1952
1952
|
return ret;
|
|
1953
1953
|
}
|
|
1954
1954
|
class ObjectRefImpl {
|
|
1955
|
-
constructor(_object,
|
|
1955
|
+
constructor(_object, key, _defaultValue) {
|
|
1956
1956
|
this._object = _object;
|
|
1957
|
-
this._key = _key;
|
|
1958
1957
|
this._defaultValue = _defaultValue;
|
|
1959
1958
|
this["__v_isRef"] = true;
|
|
1960
1959
|
this._value = void 0;
|
|
1960
|
+
this._key = isSymbol(key) ? key : String(key);
|
|
1961
1961
|
this._raw = toRaw(_object);
|
|
1962
1962
|
let shallow = true;
|
|
1963
1963
|
let obj = _object;
|
|
1964
|
-
if (!isArray(_object) || !isIntegerKey(
|
|
1964
|
+
if (!isArray(_object) || isSymbol(this._key) || !isIntegerKey(this._key)) {
|
|
1965
1965
|
do {
|
|
1966
1966
|
shallow = !isProxy(obj) || isShallow(obj);
|
|
1967
1967
|
} while (shallow && (obj = obj["__v_raw"]));
|
|
@@ -2761,6 +2761,13 @@ function checkRecursiveUpdates(seen, fn) {
|
|
|
2761
2761
|
}
|
|
2762
2762
|
|
|
2763
2763
|
let isHmrUpdating = false;
|
|
2764
|
+
const setHmrUpdating = (v) => {
|
|
2765
|
+
try {
|
|
2766
|
+
return isHmrUpdating;
|
|
2767
|
+
} finally {
|
|
2768
|
+
isHmrUpdating = v;
|
|
2769
|
+
}
|
|
2770
|
+
};
|
|
2764
2771
|
const hmrDirtyComponents = /* @__PURE__ */ new Map();
|
|
2765
2772
|
{
|
|
2766
2773
|
getGlobalThis().__VUE_HMR_RUNTIME__ = {
|
|
@@ -3254,6 +3261,7 @@ function createPathGetter(ctx, path) {
|
|
|
3254
3261
|
};
|
|
3255
3262
|
}
|
|
3256
3263
|
|
|
3264
|
+
const pendingMounts = /* @__PURE__ */ new WeakMap();
|
|
3257
3265
|
const TeleportEndKey = /* @__PURE__ */ Symbol("_vte");
|
|
3258
3266
|
const isTeleport = (type) => type.__isTeleport;
|
|
3259
3267
|
const isTeleportDisabled = (props) => props && (props.disabled || props.disabled === "");
|
|
@@ -3295,88 +3303,84 @@ const TeleportImpl = {
|
|
|
3295
3303
|
o: { insert, querySelector, createText, createComment }
|
|
3296
3304
|
} = internals;
|
|
3297
3305
|
const disabled = isTeleportDisabled(n2.props);
|
|
3298
|
-
let {
|
|
3306
|
+
let { dynamicChildren } = n2;
|
|
3299
3307
|
if (isHmrUpdating) {
|
|
3300
3308
|
optimized = false;
|
|
3301
3309
|
dynamicChildren = null;
|
|
3302
3310
|
}
|
|
3311
|
+
const mount = (vnode, container2, anchor2) => {
|
|
3312
|
+
if (vnode.shapeFlag & 16) {
|
|
3313
|
+
mountChildren(
|
|
3314
|
+
vnode.children,
|
|
3315
|
+
container2,
|
|
3316
|
+
anchor2,
|
|
3317
|
+
parentComponent,
|
|
3318
|
+
parentSuspense,
|
|
3319
|
+
namespace,
|
|
3320
|
+
slotScopeIds,
|
|
3321
|
+
optimized
|
|
3322
|
+
);
|
|
3323
|
+
}
|
|
3324
|
+
};
|
|
3325
|
+
const mountToTarget = (vnode = n2) => {
|
|
3326
|
+
const disabled2 = isTeleportDisabled(vnode.props);
|
|
3327
|
+
const target = vnode.target = resolveTarget(vnode.props, querySelector);
|
|
3328
|
+
const targetAnchor = prepareAnchor(target, vnode, createText, insert);
|
|
3329
|
+
if (target) {
|
|
3330
|
+
if (namespace !== "svg" && isTargetSVG(target)) {
|
|
3331
|
+
namespace = "svg";
|
|
3332
|
+
} else if (namespace !== "mathml" && isTargetMathML(target)) {
|
|
3333
|
+
namespace = "mathml";
|
|
3334
|
+
}
|
|
3335
|
+
if (parentComponent && parentComponent.isCE) {
|
|
3336
|
+
(parentComponent.ce._teleportTargets || (parentComponent.ce._teleportTargets = /* @__PURE__ */ new Set())).add(target);
|
|
3337
|
+
}
|
|
3338
|
+
if (!disabled2) {
|
|
3339
|
+
mount(vnode, target, targetAnchor);
|
|
3340
|
+
updateCssVars(vnode, false);
|
|
3341
|
+
}
|
|
3342
|
+
} else if (!disabled2) {
|
|
3343
|
+
warn$1("Invalid Teleport target on mount:", target, `(${typeof target})`);
|
|
3344
|
+
}
|
|
3345
|
+
};
|
|
3346
|
+
const queuePendingMount = (vnode) => {
|
|
3347
|
+
const mountJob = () => {
|
|
3348
|
+
if (pendingMounts.get(vnode) !== mountJob) return;
|
|
3349
|
+
pendingMounts.delete(vnode);
|
|
3350
|
+
if (isTeleportDisabled(vnode.props)) {
|
|
3351
|
+
mount(vnode, container, vnode.anchor);
|
|
3352
|
+
updateCssVars(vnode, true);
|
|
3353
|
+
}
|
|
3354
|
+
mountToTarget(vnode);
|
|
3355
|
+
};
|
|
3356
|
+
pendingMounts.set(vnode, mountJob);
|
|
3357
|
+
queuePostRenderEffect(mountJob, parentSuspense);
|
|
3358
|
+
};
|
|
3303
3359
|
if (n1 == null) {
|
|
3304
3360
|
const placeholder = n2.el = createComment("teleport start") ;
|
|
3305
3361
|
const mainAnchor = n2.anchor = createComment("teleport end") ;
|
|
3306
3362
|
insert(placeholder, container, anchor);
|
|
3307
3363
|
insert(mainAnchor, container, anchor);
|
|
3308
|
-
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
container2,
|
|
3313
|
-
anchor2,
|
|
3314
|
-
parentComponent,
|
|
3315
|
-
parentSuspense,
|
|
3316
|
-
namespace,
|
|
3317
|
-
slotScopeIds,
|
|
3318
|
-
optimized
|
|
3319
|
-
);
|
|
3320
|
-
}
|
|
3321
|
-
};
|
|
3322
|
-
const mountToTarget = () => {
|
|
3323
|
-
const target = n2.target = resolveTarget(n2.props, querySelector);
|
|
3324
|
-
const targetAnchor = prepareAnchor(target, n2, createText, insert);
|
|
3325
|
-
if (target) {
|
|
3326
|
-
if (namespace !== "svg" && isTargetSVG(target)) {
|
|
3327
|
-
namespace = "svg";
|
|
3328
|
-
} else if (namespace !== "mathml" && isTargetMathML(target)) {
|
|
3329
|
-
namespace = "mathml";
|
|
3330
|
-
}
|
|
3331
|
-
if (parentComponent && parentComponent.isCE) {
|
|
3332
|
-
(parentComponent.ce._teleportTargets || (parentComponent.ce._teleportTargets = /* @__PURE__ */ new Set())).add(target);
|
|
3333
|
-
}
|
|
3334
|
-
if (!disabled) {
|
|
3335
|
-
mount(target, targetAnchor);
|
|
3336
|
-
updateCssVars(n2, false);
|
|
3337
|
-
}
|
|
3338
|
-
} else if (!disabled) {
|
|
3339
|
-
warn$1(
|
|
3340
|
-
"Invalid Teleport target on mount:",
|
|
3341
|
-
target,
|
|
3342
|
-
`(${typeof target})`
|
|
3343
|
-
);
|
|
3344
|
-
}
|
|
3345
|
-
};
|
|
3364
|
+
if (isTeleportDeferred(n2.props) || parentSuspense && parentSuspense.pendingBranch) {
|
|
3365
|
+
queuePendingMount(n2);
|
|
3366
|
+
return;
|
|
3367
|
+
}
|
|
3346
3368
|
if (disabled) {
|
|
3347
|
-
mount(container, mainAnchor);
|
|
3369
|
+
mount(n2, container, mainAnchor);
|
|
3348
3370
|
updateCssVars(n2, true);
|
|
3349
3371
|
}
|
|
3350
|
-
|
|
3351
|
-
n2.el.__isMounted = false;
|
|
3352
|
-
queuePostRenderEffect(() => {
|
|
3353
|
-
mountToTarget();
|
|
3354
|
-
delete n2.el.__isMounted;
|
|
3355
|
-
}, parentSuspense);
|
|
3356
|
-
} else {
|
|
3357
|
-
mountToTarget();
|
|
3358
|
-
}
|
|
3372
|
+
mountToTarget();
|
|
3359
3373
|
} else {
|
|
3360
|
-
|
|
3361
|
-
|
|
3362
|
-
|
|
3363
|
-
|
|
3364
|
-
|
|
3365
|
-
|
|
3366
|
-
|
|
3367
|
-
parentComponent,
|
|
3368
|
-
parentSuspense,
|
|
3369
|
-
namespace,
|
|
3370
|
-
slotScopeIds,
|
|
3371
|
-
optimized,
|
|
3372
|
-
internals
|
|
3373
|
-
);
|
|
3374
|
-
}, parentSuspense);
|
|
3374
|
+
n2.el = n1.el;
|
|
3375
|
+
const mainAnchor = n2.anchor = n1.anchor;
|
|
3376
|
+
const pendingMount = pendingMounts.get(n1);
|
|
3377
|
+
if (pendingMount) {
|
|
3378
|
+
pendingMount.flags |= 8;
|
|
3379
|
+
pendingMounts.delete(n1);
|
|
3380
|
+
queuePendingMount(n2);
|
|
3375
3381
|
return;
|
|
3376
3382
|
}
|
|
3377
|
-
n2.el = n1.el;
|
|
3378
3383
|
n2.targetStart = n1.targetStart;
|
|
3379
|
-
const mainAnchor = n2.anchor = n1.anchor;
|
|
3380
3384
|
const target = n2.target = n1.target;
|
|
3381
3385
|
const targetAnchor = n2.targetAnchor = n1.targetAnchor;
|
|
3382
3386
|
const wasDisabled = isTeleportDisabled(n1.props);
|
|
@@ -3469,13 +3473,19 @@ const TeleportImpl = {
|
|
|
3469
3473
|
target,
|
|
3470
3474
|
props
|
|
3471
3475
|
} = vnode;
|
|
3476
|
+
let shouldRemove = doRemove || !isTeleportDisabled(props);
|
|
3477
|
+
const pendingMount = pendingMounts.get(vnode);
|
|
3478
|
+
if (pendingMount) {
|
|
3479
|
+
pendingMount.flags |= 8;
|
|
3480
|
+
pendingMounts.delete(vnode);
|
|
3481
|
+
shouldRemove = false;
|
|
3482
|
+
}
|
|
3472
3483
|
if (target) {
|
|
3473
3484
|
hostRemove(targetStart);
|
|
3474
3485
|
hostRemove(targetAnchor);
|
|
3475
3486
|
}
|
|
3476
3487
|
doRemove && hostRemove(anchor);
|
|
3477
3488
|
if (shapeFlag & 16) {
|
|
3478
|
-
const shouldRemove = doRemove || !isTeleportDisabled(props);
|
|
3479
3489
|
for (let i = 0; i < children.length; i++) {
|
|
3480
3490
|
const child = children[i];
|
|
3481
3491
|
unmount(
|
|
@@ -3841,7 +3851,7 @@ function resolveTransitionHooks(vnode, props, state, instance, postClone) {
|
|
|
3841
3851
|
callHook(hook, [el]);
|
|
3842
3852
|
},
|
|
3843
3853
|
enter(el) {
|
|
3844
|
-
if (leavingVNodesCache[key] === vnode) return;
|
|
3854
|
+
if (!isHmrUpdating && leavingVNodesCache[key] === vnode) return;
|
|
3845
3855
|
let hook = onEnter;
|
|
3846
3856
|
let afterHook = onAfterEnter;
|
|
3847
3857
|
let cancelHook = onEnterCancelled;
|
|
@@ -7085,11 +7095,12 @@ function hasPropValueChanged(nextProps, prevProps, key) {
|
|
|
7085
7095
|
}
|
|
7086
7096
|
return nextProp !== prevProp;
|
|
7087
7097
|
}
|
|
7088
|
-
function updateHOCHostEl({ vnode, parent }, el) {
|
|
7098
|
+
function updateHOCHostEl({ vnode, parent, suspense }, el) {
|
|
7089
7099
|
while (parent) {
|
|
7090
7100
|
const root = parent.subTree;
|
|
7091
7101
|
if (root.suspense && root.suspense.activeBranch === vnode) {
|
|
7092
|
-
root.el =
|
|
7102
|
+
root.suspense.vnode.el = root.el = el;
|
|
7103
|
+
vnode = root;
|
|
7093
7104
|
}
|
|
7094
7105
|
if (root === vnode) {
|
|
7095
7106
|
(vnode = parent.vnode).el = el;
|
|
@@ -7098,6 +7109,9 @@ function updateHOCHostEl({ vnode, parent }, el) {
|
|
|
7098
7109
|
break;
|
|
7099
7110
|
}
|
|
7100
7111
|
}
|
|
7112
|
+
if (suspense && suspense.activeBranch === vnode) {
|
|
7113
|
+
suspense.vnode.el = el;
|
|
7114
|
+
}
|
|
7101
7115
|
}
|
|
7102
7116
|
|
|
7103
7117
|
const internalObjectProto = {};
|
|
@@ -7939,10 +7953,17 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
7939
7953
|
}
|
|
7940
7954
|
hostInsert(el, container, anchor);
|
|
7941
7955
|
if ((vnodeHook = props && props.onVnodeMounted) || needCallTransitionHooks || dirs) {
|
|
7956
|
+
const isHmr = isHmrUpdating;
|
|
7942
7957
|
queuePostRenderEffect(() => {
|
|
7943
|
-
|
|
7944
|
-
|
|
7945
|
-
|
|
7958
|
+
let prev;
|
|
7959
|
+
prev = setHmrUpdating(isHmr);
|
|
7960
|
+
try {
|
|
7961
|
+
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
7962
|
+
needCallTransitionHooks && transition.enter(el);
|
|
7963
|
+
dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted");
|
|
7964
|
+
} finally {
|
|
7965
|
+
setHmrUpdating(prev);
|
|
7966
|
+
}
|
|
7946
7967
|
}, parentSuspense);
|
|
7947
7968
|
}
|
|
7948
7969
|
};
|
|
@@ -8863,7 +8884,8 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8863
8884
|
shapeFlag,
|
|
8864
8885
|
patchFlag,
|
|
8865
8886
|
dirs,
|
|
8866
|
-
cacheIndex
|
|
8887
|
+
cacheIndex,
|
|
8888
|
+
memo
|
|
8867
8889
|
} = vnode;
|
|
8868
8890
|
if (patchFlag === -2) {
|
|
8869
8891
|
optimized = false;
|
|
@@ -8925,10 +8947,14 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8925
8947
|
remove(vnode);
|
|
8926
8948
|
}
|
|
8927
8949
|
}
|
|
8928
|
-
|
|
8950
|
+
const shouldInvalidateMemo = memo != null && cacheIndex == null;
|
|
8951
|
+
if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || shouldInvokeDirs || shouldInvalidateMemo) {
|
|
8929
8952
|
queuePostRenderEffect(() => {
|
|
8930
8953
|
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
8931
8954
|
shouldInvokeDirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted");
|
|
8955
|
+
if (shouldInvalidateMemo) {
|
|
8956
|
+
vnode.el = null;
|
|
8957
|
+
}
|
|
8932
8958
|
}, parentSuspense);
|
|
8933
8959
|
}
|
|
8934
8960
|
};
|
|
@@ -9482,6 +9508,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
9482
9508
|
pendingId: suspenseId++,
|
|
9483
9509
|
timeout: typeof timeout === "number" ? timeout : -1,
|
|
9484
9510
|
activeBranch: null,
|
|
9511
|
+
isFallbackMountPending: false,
|
|
9485
9512
|
pendingBranch: null,
|
|
9486
9513
|
isInFallback: !isHydrating,
|
|
9487
9514
|
isHydrating,
|
|
@@ -9531,7 +9558,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
9531
9558
|
}
|
|
9532
9559
|
};
|
|
9533
9560
|
}
|
|
9534
|
-
if (activeBranch) {
|
|
9561
|
+
if (activeBranch && !suspense.isFallbackMountPending) {
|
|
9535
9562
|
if (parentNode(activeBranch.el) === container2) {
|
|
9536
9563
|
anchor = next(activeBranch);
|
|
9537
9564
|
}
|
|
@@ -9544,6 +9571,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
9544
9571
|
move(pendingBranch, container2, anchor, 0);
|
|
9545
9572
|
}
|
|
9546
9573
|
}
|
|
9574
|
+
suspense.isFallbackMountPending = false;
|
|
9547
9575
|
setActiveBranch(suspense, pendingBranch);
|
|
9548
9576
|
suspense.pendingBranch = null;
|
|
9549
9577
|
suspense.isInFallback = false;
|
|
@@ -9579,6 +9607,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
9579
9607
|
triggerEvent(vnode2, "onFallback");
|
|
9580
9608
|
const anchor2 = next(activeBranch);
|
|
9581
9609
|
const mountFallback = () => {
|
|
9610
|
+
suspense.isFallbackMountPending = false;
|
|
9582
9611
|
if (!suspense.isInFallback) {
|
|
9583
9612
|
return;
|
|
9584
9613
|
}
|
|
@@ -9598,6 +9627,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
9598
9627
|
};
|
|
9599
9628
|
const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === "out-in";
|
|
9600
9629
|
if (delayEnter) {
|
|
9630
|
+
suspense.isFallbackMountPending = true;
|
|
9601
9631
|
activeBranch.transition.afterLeave = mountFallback;
|
|
9602
9632
|
}
|
|
9603
9633
|
suspense.isInFallback = true;
|
|
@@ -9632,6 +9662,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
9632
9662
|
if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) {
|
|
9633
9663
|
return;
|
|
9634
9664
|
}
|
|
9665
|
+
unsetCurrentInstance();
|
|
9635
9666
|
instance.asyncResolved = true;
|
|
9636
9667
|
const { vnode: vnode2 } = instance;
|
|
9637
9668
|
{
|
|
@@ -10148,6 +10179,10 @@ function mergeProps(...args) {
|
|
|
10148
10179
|
const incoming = toMerge[key];
|
|
10149
10180
|
if (incoming && existing !== incoming && !(isArray(existing) && existing.includes(incoming))) {
|
|
10150
10181
|
ret[key] = existing ? [].concat(existing, incoming) : incoming;
|
|
10182
|
+
} else if (incoming == null && existing == null && // mergeProps({ 'onUpdate:modelValue': undefined }) should not retain
|
|
10183
|
+
// the model listener.
|
|
10184
|
+
!isModelListener(key)) {
|
|
10185
|
+
ret[key] = incoming;
|
|
10151
10186
|
}
|
|
10152
10187
|
} else if (key !== "") {
|
|
10153
10188
|
ret[key] = toMerge[key];
|
|
@@ -10832,7 +10867,7 @@ function isMemoSame(cached, memo) {
|
|
|
10832
10867
|
return true;
|
|
10833
10868
|
}
|
|
10834
10869
|
|
|
10835
|
-
const version = "3.5.
|
|
10870
|
+
const version = "3.5.32";
|
|
10836
10871
|
const warn = warn$1 ;
|
|
10837
10872
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
10838
10873
|
const devtools = devtools$1 ;
|
|
@@ -12423,7 +12458,8 @@ const vModelText = {
|
|
|
12423
12458
|
if (elValue === newValue) {
|
|
12424
12459
|
return;
|
|
12425
12460
|
}
|
|
12426
|
-
|
|
12461
|
+
const rootNode = el.getRootNode();
|
|
12462
|
+
if ((rootNode instanceof Document || rootNode instanceof ShadowRoot) && rootNode.activeElement === el && el.type !== "range") {
|
|
12427
12463
|
if (lazy && value === oldValue) {
|
|
12428
12464
|
return;
|
|
12429
12465
|
}
|
|
@@ -16629,7 +16665,7 @@ const transformFor = createStructuralDirectiveTransform(
|
|
|
16629
16665
|
loop.body = createBlockStatement([
|
|
16630
16666
|
createCompoundExpression([`const _memo = (`, memo.exp, `)`]),
|
|
16631
16667
|
createCompoundExpression([
|
|
16632
|
-
`if (_cached`,
|
|
16668
|
+
`if (_cached && _cached.el`,
|
|
16633
16669
|
...keyExp ? [` && _cached.key === `, keyExp] : [],
|
|
16634
16670
|
` && ${context.helperString(
|
|
16635
16671
|
IS_MEMO_SAME
|