@vue/compat 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 +120 -84
- package/dist/vue.cjs.prod.js +106 -77
- package/dist/vue.esm-browser.js +120 -84
- package/dist/vue.esm-browser.prod.js +8 -8
- package/dist/vue.esm-bundler.js +120 -84
- package/dist/vue.global.js +120 -84
- package/dist/vue.global.prod.js +8 -8
- package/dist/vue.runtime.esm-browser.js +119 -83
- package/dist/vue.runtime.esm-browser.prod.js +3 -3
- package/dist/vue.runtime.esm-bundler.js +119 -83
- package/dist/vue.runtime.global.js +119 -83
- package/dist/vue.runtime.global.prod.js +3 -3
- package/package.json +3 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compat v3.5.
|
|
2
|
+
* @vue/compat v3.5.32
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -1879,16 +1879,16 @@ function toRefs(object) {
|
|
|
1879
1879
|
return ret;
|
|
1880
1880
|
}
|
|
1881
1881
|
class ObjectRefImpl {
|
|
1882
|
-
constructor(_object,
|
|
1882
|
+
constructor(_object, key, _defaultValue) {
|
|
1883
1883
|
this._object = _object;
|
|
1884
|
-
this._key = _key;
|
|
1885
1884
|
this._defaultValue = _defaultValue;
|
|
1886
1885
|
this["__v_isRef"] = true;
|
|
1887
1886
|
this._value = void 0;
|
|
1887
|
+
this._key = isSymbol(key) ? key : String(key);
|
|
1888
1888
|
this._raw = toRaw(_object);
|
|
1889
1889
|
let shallow = true;
|
|
1890
1890
|
let obj = _object;
|
|
1891
|
-
if (!isArray(_object) || !isIntegerKey(
|
|
1891
|
+
if (!isArray(_object) || isSymbol(this._key) || !isIntegerKey(this._key)) {
|
|
1892
1892
|
do {
|
|
1893
1893
|
shallow = !isProxy(obj) || isShallow(obj);
|
|
1894
1894
|
} while (shallow && (obj = obj["__v_raw"]));
|
|
@@ -2688,6 +2688,13 @@ function checkRecursiveUpdates(seen, fn) {
|
|
|
2688
2688
|
}
|
|
2689
2689
|
|
|
2690
2690
|
let isHmrUpdating = false;
|
|
2691
|
+
const setHmrUpdating = (v) => {
|
|
2692
|
+
try {
|
|
2693
|
+
return isHmrUpdating;
|
|
2694
|
+
} finally {
|
|
2695
|
+
isHmrUpdating = v;
|
|
2696
|
+
}
|
|
2697
|
+
};
|
|
2691
2698
|
const hmrDirtyComponents = /* @__PURE__ */ new Map();
|
|
2692
2699
|
{
|
|
2693
2700
|
getGlobalThis().__VUE_HMR_RUNTIME__ = {
|
|
@@ -3650,6 +3657,7 @@ function createPathGetter(ctx, path) {
|
|
|
3650
3657
|
};
|
|
3651
3658
|
}
|
|
3652
3659
|
|
|
3660
|
+
const pendingMounts = /* @__PURE__ */ new WeakMap();
|
|
3653
3661
|
const TeleportEndKey = /* @__PURE__ */ Symbol("_vte");
|
|
3654
3662
|
const isTeleport = (type) => type.__isTeleport;
|
|
3655
3663
|
const isTeleportDisabled = (props) => props && (props.disabled || props.disabled === "");
|
|
@@ -3691,88 +3699,84 @@ const TeleportImpl = {
|
|
|
3691
3699
|
o: { insert, querySelector, createText, createComment }
|
|
3692
3700
|
} = internals;
|
|
3693
3701
|
const disabled = isTeleportDisabled(n2.props);
|
|
3694
|
-
let {
|
|
3702
|
+
let { dynamicChildren } = n2;
|
|
3695
3703
|
if (isHmrUpdating) {
|
|
3696
3704
|
optimized = false;
|
|
3697
3705
|
dynamicChildren = null;
|
|
3698
3706
|
}
|
|
3707
|
+
const mount = (vnode, container2, anchor2) => {
|
|
3708
|
+
if (vnode.shapeFlag & 16) {
|
|
3709
|
+
mountChildren(
|
|
3710
|
+
vnode.children,
|
|
3711
|
+
container2,
|
|
3712
|
+
anchor2,
|
|
3713
|
+
parentComponent,
|
|
3714
|
+
parentSuspense,
|
|
3715
|
+
namespace,
|
|
3716
|
+
slotScopeIds,
|
|
3717
|
+
optimized
|
|
3718
|
+
);
|
|
3719
|
+
}
|
|
3720
|
+
};
|
|
3721
|
+
const mountToTarget = (vnode = n2) => {
|
|
3722
|
+
const disabled2 = isTeleportDisabled(vnode.props);
|
|
3723
|
+
const target = vnode.target = resolveTarget(vnode.props, querySelector);
|
|
3724
|
+
const targetAnchor = prepareAnchor(target, vnode, createText, insert);
|
|
3725
|
+
if (target) {
|
|
3726
|
+
if (namespace !== "svg" && isTargetSVG(target)) {
|
|
3727
|
+
namespace = "svg";
|
|
3728
|
+
} else if (namespace !== "mathml" && isTargetMathML(target)) {
|
|
3729
|
+
namespace = "mathml";
|
|
3730
|
+
}
|
|
3731
|
+
if (parentComponent && parentComponent.isCE) {
|
|
3732
|
+
(parentComponent.ce._teleportTargets || (parentComponent.ce._teleportTargets = /* @__PURE__ */ new Set())).add(target);
|
|
3733
|
+
}
|
|
3734
|
+
if (!disabled2) {
|
|
3735
|
+
mount(vnode, target, targetAnchor);
|
|
3736
|
+
updateCssVars(vnode, false);
|
|
3737
|
+
}
|
|
3738
|
+
} else if (!disabled2) {
|
|
3739
|
+
warn$1("Invalid Teleport target on mount:", target, `(${typeof target})`);
|
|
3740
|
+
}
|
|
3741
|
+
};
|
|
3742
|
+
const queuePendingMount = (vnode) => {
|
|
3743
|
+
const mountJob = () => {
|
|
3744
|
+
if (pendingMounts.get(vnode) !== mountJob) return;
|
|
3745
|
+
pendingMounts.delete(vnode);
|
|
3746
|
+
if (isTeleportDisabled(vnode.props)) {
|
|
3747
|
+
mount(vnode, container, vnode.anchor);
|
|
3748
|
+
updateCssVars(vnode, true);
|
|
3749
|
+
}
|
|
3750
|
+
mountToTarget(vnode);
|
|
3751
|
+
};
|
|
3752
|
+
pendingMounts.set(vnode, mountJob);
|
|
3753
|
+
queuePostRenderEffect(mountJob, parentSuspense);
|
|
3754
|
+
};
|
|
3699
3755
|
if (n1 == null) {
|
|
3700
3756
|
const placeholder = n2.el = createComment("teleport start") ;
|
|
3701
3757
|
const mainAnchor = n2.anchor = createComment("teleport end") ;
|
|
3702
3758
|
insert(placeholder, container, anchor);
|
|
3703
3759
|
insert(mainAnchor, container, anchor);
|
|
3704
|
-
|
|
3705
|
-
|
|
3706
|
-
|
|
3707
|
-
|
|
3708
|
-
container2,
|
|
3709
|
-
anchor2,
|
|
3710
|
-
parentComponent,
|
|
3711
|
-
parentSuspense,
|
|
3712
|
-
namespace,
|
|
3713
|
-
slotScopeIds,
|
|
3714
|
-
optimized
|
|
3715
|
-
);
|
|
3716
|
-
}
|
|
3717
|
-
};
|
|
3718
|
-
const mountToTarget = () => {
|
|
3719
|
-
const target = n2.target = resolveTarget(n2.props, querySelector);
|
|
3720
|
-
const targetAnchor = prepareAnchor(target, n2, createText, insert);
|
|
3721
|
-
if (target) {
|
|
3722
|
-
if (namespace !== "svg" && isTargetSVG(target)) {
|
|
3723
|
-
namespace = "svg";
|
|
3724
|
-
} else if (namespace !== "mathml" && isTargetMathML(target)) {
|
|
3725
|
-
namespace = "mathml";
|
|
3726
|
-
}
|
|
3727
|
-
if (parentComponent && parentComponent.isCE) {
|
|
3728
|
-
(parentComponent.ce._teleportTargets || (parentComponent.ce._teleportTargets = /* @__PURE__ */ new Set())).add(target);
|
|
3729
|
-
}
|
|
3730
|
-
if (!disabled) {
|
|
3731
|
-
mount(target, targetAnchor);
|
|
3732
|
-
updateCssVars(n2, false);
|
|
3733
|
-
}
|
|
3734
|
-
} else if (!disabled) {
|
|
3735
|
-
warn$1(
|
|
3736
|
-
"Invalid Teleport target on mount:",
|
|
3737
|
-
target,
|
|
3738
|
-
`(${typeof target})`
|
|
3739
|
-
);
|
|
3740
|
-
}
|
|
3741
|
-
};
|
|
3760
|
+
if (isTeleportDeferred(n2.props) || parentSuspense && parentSuspense.pendingBranch) {
|
|
3761
|
+
queuePendingMount(n2);
|
|
3762
|
+
return;
|
|
3763
|
+
}
|
|
3742
3764
|
if (disabled) {
|
|
3743
|
-
mount(container, mainAnchor);
|
|
3765
|
+
mount(n2, container, mainAnchor);
|
|
3744
3766
|
updateCssVars(n2, true);
|
|
3745
3767
|
}
|
|
3746
|
-
|
|
3747
|
-
n2.el.__isMounted = false;
|
|
3748
|
-
queuePostRenderEffect(() => {
|
|
3749
|
-
mountToTarget();
|
|
3750
|
-
delete n2.el.__isMounted;
|
|
3751
|
-
}, parentSuspense);
|
|
3752
|
-
} else {
|
|
3753
|
-
mountToTarget();
|
|
3754
|
-
}
|
|
3768
|
+
mountToTarget();
|
|
3755
3769
|
} else {
|
|
3756
|
-
|
|
3757
|
-
|
|
3758
|
-
|
|
3759
|
-
|
|
3760
|
-
|
|
3761
|
-
|
|
3762
|
-
|
|
3763
|
-
parentComponent,
|
|
3764
|
-
parentSuspense,
|
|
3765
|
-
namespace,
|
|
3766
|
-
slotScopeIds,
|
|
3767
|
-
optimized,
|
|
3768
|
-
internals
|
|
3769
|
-
);
|
|
3770
|
-
}, parentSuspense);
|
|
3770
|
+
n2.el = n1.el;
|
|
3771
|
+
const mainAnchor = n2.anchor = n1.anchor;
|
|
3772
|
+
const pendingMount = pendingMounts.get(n1);
|
|
3773
|
+
if (pendingMount) {
|
|
3774
|
+
pendingMount.flags |= 8;
|
|
3775
|
+
pendingMounts.delete(n1);
|
|
3776
|
+
queuePendingMount(n2);
|
|
3771
3777
|
return;
|
|
3772
3778
|
}
|
|
3773
|
-
n2.el = n1.el;
|
|
3774
3779
|
n2.targetStart = n1.targetStart;
|
|
3775
|
-
const mainAnchor = n2.anchor = n1.anchor;
|
|
3776
3780
|
const target = n2.target = n1.target;
|
|
3777
3781
|
const targetAnchor = n2.targetAnchor = n1.targetAnchor;
|
|
3778
3782
|
const wasDisabled = isTeleportDisabled(n1.props);
|
|
@@ -3865,13 +3869,19 @@ const TeleportImpl = {
|
|
|
3865
3869
|
target,
|
|
3866
3870
|
props
|
|
3867
3871
|
} = vnode;
|
|
3872
|
+
let shouldRemove = doRemove || !isTeleportDisabled(props);
|
|
3873
|
+
const pendingMount = pendingMounts.get(vnode);
|
|
3874
|
+
if (pendingMount) {
|
|
3875
|
+
pendingMount.flags |= 8;
|
|
3876
|
+
pendingMounts.delete(vnode);
|
|
3877
|
+
shouldRemove = false;
|
|
3878
|
+
}
|
|
3868
3879
|
if (target) {
|
|
3869
3880
|
hostRemove(targetStart);
|
|
3870
3881
|
hostRemove(targetAnchor);
|
|
3871
3882
|
}
|
|
3872
3883
|
doRemove && hostRemove(anchor);
|
|
3873
3884
|
if (shapeFlag & 16) {
|
|
3874
|
-
const shouldRemove = doRemove || !isTeleportDisabled(props);
|
|
3875
3885
|
for (let i = 0; i < children.length; i++) {
|
|
3876
3886
|
const child = children[i];
|
|
3877
3887
|
unmount(
|
|
@@ -4240,7 +4250,7 @@ function resolveTransitionHooks(vnode, props, state, instance, postClone) {
|
|
|
4240
4250
|
callHook(hook, [el]);
|
|
4241
4251
|
},
|
|
4242
4252
|
enter(el) {
|
|
4243
|
-
if (leavingVNodesCache[key] === vnode) return;
|
|
4253
|
+
if (!isHmrUpdating && leavingVNodesCache[key] === vnode) return;
|
|
4244
4254
|
let hook = onEnter;
|
|
4245
4255
|
let afterHook = onAfterEnter;
|
|
4246
4256
|
let cancelHook = onEnterCancelled;
|
|
@@ -7438,7 +7448,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
7438
7448
|
return vm;
|
|
7439
7449
|
}
|
|
7440
7450
|
}
|
|
7441
|
-
Vue.version = `2.6.14-compat:${"3.5.
|
|
7451
|
+
Vue.version = `2.6.14-compat:${"3.5.32"}`;
|
|
7442
7452
|
Vue.config = singletonApp.config;
|
|
7443
7453
|
Vue.use = (plugin, ...options) => {
|
|
7444
7454
|
if (plugin && isFunction(plugin.install)) {
|
|
@@ -8597,11 +8607,12 @@ function hasPropValueChanged(nextProps, prevProps, key) {
|
|
|
8597
8607
|
}
|
|
8598
8608
|
return nextProp !== prevProp;
|
|
8599
8609
|
}
|
|
8600
|
-
function updateHOCHostEl({ vnode, parent }, el) {
|
|
8610
|
+
function updateHOCHostEl({ vnode, parent, suspense }, el) {
|
|
8601
8611
|
while (parent) {
|
|
8602
8612
|
const root = parent.subTree;
|
|
8603
8613
|
if (root.suspense && root.suspense.activeBranch === vnode) {
|
|
8604
|
-
root.el =
|
|
8614
|
+
root.suspense.vnode.el = root.el = el;
|
|
8615
|
+
vnode = root;
|
|
8605
8616
|
}
|
|
8606
8617
|
if (root === vnode) {
|
|
8607
8618
|
(vnode = parent.vnode).el = el;
|
|
@@ -8610,6 +8621,9 @@ function updateHOCHostEl({ vnode, parent }, el) {
|
|
|
8610
8621
|
break;
|
|
8611
8622
|
}
|
|
8612
8623
|
}
|
|
8624
|
+
if (suspense && suspense.activeBranch === vnode) {
|
|
8625
|
+
suspense.vnode.el = el;
|
|
8626
|
+
}
|
|
8613
8627
|
}
|
|
8614
8628
|
|
|
8615
8629
|
function createPropsDefaultThis(instance, rawProps, propKey) {
|
|
@@ -9523,10 +9537,17 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
9523
9537
|
}
|
|
9524
9538
|
hostInsert(el, container, anchor);
|
|
9525
9539
|
if ((vnodeHook = props && props.onVnodeMounted) || needCallTransitionHooks || dirs) {
|
|
9540
|
+
const isHmr = isHmrUpdating;
|
|
9526
9541
|
queuePostRenderEffect(() => {
|
|
9527
|
-
|
|
9528
|
-
|
|
9529
|
-
|
|
9542
|
+
let prev;
|
|
9543
|
+
prev = setHmrUpdating(isHmr);
|
|
9544
|
+
try {
|
|
9545
|
+
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
9546
|
+
needCallTransitionHooks && transition.enter(el);
|
|
9547
|
+
dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted");
|
|
9548
|
+
} finally {
|
|
9549
|
+
setHmrUpdating(prev);
|
|
9550
|
+
}
|
|
9530
9551
|
}, parentSuspense);
|
|
9531
9552
|
}
|
|
9532
9553
|
};
|
|
@@ -10472,7 +10493,8 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
10472
10493
|
shapeFlag,
|
|
10473
10494
|
patchFlag,
|
|
10474
10495
|
dirs,
|
|
10475
|
-
cacheIndex
|
|
10496
|
+
cacheIndex,
|
|
10497
|
+
memo
|
|
10476
10498
|
} = vnode;
|
|
10477
10499
|
if (patchFlag === -2) {
|
|
10478
10500
|
optimized = false;
|
|
@@ -10534,10 +10556,14 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
10534
10556
|
remove(vnode);
|
|
10535
10557
|
}
|
|
10536
10558
|
}
|
|
10537
|
-
|
|
10559
|
+
const shouldInvalidateMemo = memo != null && cacheIndex == null;
|
|
10560
|
+
if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || shouldInvokeDirs || shouldInvalidateMemo) {
|
|
10538
10561
|
queuePostRenderEffect(() => {
|
|
10539
10562
|
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
10540
10563
|
shouldInvokeDirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted");
|
|
10564
|
+
if (shouldInvalidateMemo) {
|
|
10565
|
+
vnode.el = null;
|
|
10566
|
+
}
|
|
10541
10567
|
}, parentSuspense);
|
|
10542
10568
|
}
|
|
10543
10569
|
};
|
|
@@ -11100,6 +11126,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
11100
11126
|
pendingId: suspenseId++,
|
|
11101
11127
|
timeout: typeof timeout === "number" ? timeout : -1,
|
|
11102
11128
|
activeBranch: null,
|
|
11129
|
+
isFallbackMountPending: false,
|
|
11103
11130
|
pendingBranch: null,
|
|
11104
11131
|
isInFallback: !isHydrating,
|
|
11105
11132
|
isHydrating,
|
|
@@ -11149,7 +11176,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
11149
11176
|
}
|
|
11150
11177
|
};
|
|
11151
11178
|
}
|
|
11152
|
-
if (activeBranch) {
|
|
11179
|
+
if (activeBranch && !suspense.isFallbackMountPending) {
|
|
11153
11180
|
if (parentNode(activeBranch.el) === container2) {
|
|
11154
11181
|
anchor = next(activeBranch);
|
|
11155
11182
|
}
|
|
@@ -11162,6 +11189,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
11162
11189
|
move(pendingBranch, container2, anchor, 0);
|
|
11163
11190
|
}
|
|
11164
11191
|
}
|
|
11192
|
+
suspense.isFallbackMountPending = false;
|
|
11165
11193
|
setActiveBranch(suspense, pendingBranch);
|
|
11166
11194
|
suspense.pendingBranch = null;
|
|
11167
11195
|
suspense.isInFallback = false;
|
|
@@ -11197,6 +11225,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
11197
11225
|
triggerEvent(vnode2, "onFallback");
|
|
11198
11226
|
const anchor2 = next(activeBranch);
|
|
11199
11227
|
const mountFallback = () => {
|
|
11228
|
+
suspense.isFallbackMountPending = false;
|
|
11200
11229
|
if (!suspense.isInFallback) {
|
|
11201
11230
|
return;
|
|
11202
11231
|
}
|
|
@@ -11216,6 +11245,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
11216
11245
|
};
|
|
11217
11246
|
const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === "out-in";
|
|
11218
11247
|
if (delayEnter) {
|
|
11248
|
+
suspense.isFallbackMountPending = true;
|
|
11219
11249
|
activeBranch.transition.afterLeave = mountFallback;
|
|
11220
11250
|
}
|
|
11221
11251
|
suspense.isInFallback = true;
|
|
@@ -11250,6 +11280,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
11250
11280
|
if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) {
|
|
11251
11281
|
return;
|
|
11252
11282
|
}
|
|
11283
|
+
unsetCurrentInstance();
|
|
11253
11284
|
instance.asyncResolved = true;
|
|
11254
11285
|
const { vnode: vnode2 } = instance;
|
|
11255
11286
|
{
|
|
@@ -11833,6 +11864,10 @@ function mergeProps(...args) {
|
|
|
11833
11864
|
const incoming = toMerge[key];
|
|
11834
11865
|
if (incoming && existing !== incoming && !(isArray(existing) && existing.includes(incoming))) {
|
|
11835
11866
|
ret[key] = existing ? [].concat(existing, incoming) : incoming;
|
|
11867
|
+
} else if (incoming == null && existing == null && // mergeProps({ 'onUpdate:modelValue': undefined }) should not retain
|
|
11868
|
+
// the model listener.
|
|
11869
|
+
!isModelListener(key)) {
|
|
11870
|
+
ret[key] = incoming;
|
|
11836
11871
|
}
|
|
11837
11872
|
} else if (key !== "") {
|
|
11838
11873
|
ret[key] = toMerge[key];
|
|
@@ -12529,7 +12564,7 @@ function isMemoSame(cached, memo) {
|
|
|
12529
12564
|
return true;
|
|
12530
12565
|
}
|
|
12531
12566
|
|
|
12532
|
-
const version = "3.5.
|
|
12567
|
+
const version = "3.5.32";
|
|
12533
12568
|
const warn = warn$1 ;
|
|
12534
12569
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
12535
12570
|
const devtools = devtools$1 ;
|
|
@@ -14217,7 +14252,8 @@ const vModelText = {
|
|
|
14217
14252
|
if (elValue === newValue) {
|
|
14218
14253
|
return;
|
|
14219
14254
|
}
|
|
14220
|
-
|
|
14255
|
+
const rootNode = el.getRootNode();
|
|
14256
|
+
if ((rootNode instanceof Document || rootNode instanceof ShadowRoot) && rootNode.activeElement === el && el.type !== "range") {
|
|
14221
14257
|
if (lazy && value === oldValue) {
|
|
14222
14258
|
return;
|
|
14223
14259
|
}
|