@vue/runtime-dom 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-dom.cjs.js +3 -2
- package/dist/runtime-dom.cjs.prod.js +3 -2
- package/dist/runtime-dom.esm-browser.js +118 -82
- package/dist/runtime-dom.esm-browser.prod.js +3 -3
- package/dist/runtime-dom.esm-bundler.js +3 -2
- package/dist/runtime-dom.global.js +118 -82
- package/dist/runtime-dom.global.prod.js +3 -3
- package/package.json +4 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-dom v3.5.
|
|
2
|
+
* @vue/runtime-dom v3.5.32
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -1882,16 +1882,16 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
1882
1882
|
return ret;
|
|
1883
1883
|
}
|
|
1884
1884
|
class ObjectRefImpl {
|
|
1885
|
-
constructor(_object,
|
|
1885
|
+
constructor(_object, key, _defaultValue) {
|
|
1886
1886
|
this._object = _object;
|
|
1887
|
-
this._key = _key;
|
|
1888
1887
|
this._defaultValue = _defaultValue;
|
|
1889
1888
|
this["__v_isRef"] = true;
|
|
1890
1889
|
this._value = void 0;
|
|
1890
|
+
this._key = isSymbol(key) ? key : String(key);
|
|
1891
1891
|
this._raw = toRaw(_object);
|
|
1892
1892
|
let shallow = true;
|
|
1893
1893
|
let obj = _object;
|
|
1894
|
-
if (!isArray(_object) || !isIntegerKey(
|
|
1894
|
+
if (!isArray(_object) || isSymbol(this._key) || !isIntegerKey(this._key)) {
|
|
1895
1895
|
do {
|
|
1896
1896
|
shallow = !isProxy(obj) || isShallow(obj);
|
|
1897
1897
|
} while (shallow && (obj = obj["__v_raw"]));
|
|
@@ -2691,6 +2691,13 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
2691
2691
|
}
|
|
2692
2692
|
|
|
2693
2693
|
let isHmrUpdating = false;
|
|
2694
|
+
const setHmrUpdating = (v) => {
|
|
2695
|
+
try {
|
|
2696
|
+
return isHmrUpdating;
|
|
2697
|
+
} finally {
|
|
2698
|
+
isHmrUpdating = v;
|
|
2699
|
+
}
|
|
2700
|
+
};
|
|
2694
2701
|
const hmrDirtyComponents = /* @__PURE__ */ new Map();
|
|
2695
2702
|
{
|
|
2696
2703
|
getGlobalThis().__VUE_HMR_RUNTIME__ = {
|
|
@@ -3156,6 +3163,7 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
3156
3163
|
};
|
|
3157
3164
|
}
|
|
3158
3165
|
|
|
3166
|
+
const pendingMounts = /* @__PURE__ */ new WeakMap();
|
|
3159
3167
|
const TeleportEndKey = /* @__PURE__ */ Symbol("_vte");
|
|
3160
3168
|
const isTeleport = (type) => type.__isTeleport;
|
|
3161
3169
|
const isTeleportDisabled = (props) => props && (props.disabled || props.disabled === "");
|
|
@@ -3197,88 +3205,84 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
3197
3205
|
o: { insert, querySelector, createText, createComment }
|
|
3198
3206
|
} = internals;
|
|
3199
3207
|
const disabled = isTeleportDisabled(n2.props);
|
|
3200
|
-
let {
|
|
3208
|
+
let { dynamicChildren } = n2;
|
|
3201
3209
|
if (isHmrUpdating) {
|
|
3202
3210
|
optimized = false;
|
|
3203
3211
|
dynamicChildren = null;
|
|
3204
3212
|
}
|
|
3213
|
+
const mount = (vnode, container2, anchor2) => {
|
|
3214
|
+
if (vnode.shapeFlag & 16) {
|
|
3215
|
+
mountChildren(
|
|
3216
|
+
vnode.children,
|
|
3217
|
+
container2,
|
|
3218
|
+
anchor2,
|
|
3219
|
+
parentComponent,
|
|
3220
|
+
parentSuspense,
|
|
3221
|
+
namespace,
|
|
3222
|
+
slotScopeIds,
|
|
3223
|
+
optimized
|
|
3224
|
+
);
|
|
3225
|
+
}
|
|
3226
|
+
};
|
|
3227
|
+
const mountToTarget = (vnode = n2) => {
|
|
3228
|
+
const disabled2 = isTeleportDisabled(vnode.props);
|
|
3229
|
+
const target = vnode.target = resolveTarget(vnode.props, querySelector);
|
|
3230
|
+
const targetAnchor = prepareAnchor(target, vnode, createText, insert);
|
|
3231
|
+
if (target) {
|
|
3232
|
+
if (namespace !== "svg" && isTargetSVG(target)) {
|
|
3233
|
+
namespace = "svg";
|
|
3234
|
+
} else if (namespace !== "mathml" && isTargetMathML(target)) {
|
|
3235
|
+
namespace = "mathml";
|
|
3236
|
+
}
|
|
3237
|
+
if (parentComponent && parentComponent.isCE) {
|
|
3238
|
+
(parentComponent.ce._teleportTargets || (parentComponent.ce._teleportTargets = /* @__PURE__ */ new Set())).add(target);
|
|
3239
|
+
}
|
|
3240
|
+
if (!disabled2) {
|
|
3241
|
+
mount(vnode, target, targetAnchor);
|
|
3242
|
+
updateCssVars(vnode, false);
|
|
3243
|
+
}
|
|
3244
|
+
} else if (!disabled2) {
|
|
3245
|
+
warn$1("Invalid Teleport target on mount:", target, `(${typeof target})`);
|
|
3246
|
+
}
|
|
3247
|
+
};
|
|
3248
|
+
const queuePendingMount = (vnode) => {
|
|
3249
|
+
const mountJob = () => {
|
|
3250
|
+
if (pendingMounts.get(vnode) !== mountJob) return;
|
|
3251
|
+
pendingMounts.delete(vnode);
|
|
3252
|
+
if (isTeleportDisabled(vnode.props)) {
|
|
3253
|
+
mount(vnode, container, vnode.anchor);
|
|
3254
|
+
updateCssVars(vnode, true);
|
|
3255
|
+
}
|
|
3256
|
+
mountToTarget(vnode);
|
|
3257
|
+
};
|
|
3258
|
+
pendingMounts.set(vnode, mountJob);
|
|
3259
|
+
queuePostRenderEffect(mountJob, parentSuspense);
|
|
3260
|
+
};
|
|
3205
3261
|
if (n1 == null) {
|
|
3206
3262
|
const placeholder = n2.el = createComment("teleport start") ;
|
|
3207
3263
|
const mainAnchor = n2.anchor = createComment("teleport end") ;
|
|
3208
3264
|
insert(placeholder, container, anchor);
|
|
3209
3265
|
insert(mainAnchor, container, anchor);
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
container2,
|
|
3215
|
-
anchor2,
|
|
3216
|
-
parentComponent,
|
|
3217
|
-
parentSuspense,
|
|
3218
|
-
namespace,
|
|
3219
|
-
slotScopeIds,
|
|
3220
|
-
optimized
|
|
3221
|
-
);
|
|
3222
|
-
}
|
|
3223
|
-
};
|
|
3224
|
-
const mountToTarget = () => {
|
|
3225
|
-
const target = n2.target = resolveTarget(n2.props, querySelector);
|
|
3226
|
-
const targetAnchor = prepareAnchor(target, n2, createText, insert);
|
|
3227
|
-
if (target) {
|
|
3228
|
-
if (namespace !== "svg" && isTargetSVG(target)) {
|
|
3229
|
-
namespace = "svg";
|
|
3230
|
-
} else if (namespace !== "mathml" && isTargetMathML(target)) {
|
|
3231
|
-
namespace = "mathml";
|
|
3232
|
-
}
|
|
3233
|
-
if (parentComponent && parentComponent.isCE) {
|
|
3234
|
-
(parentComponent.ce._teleportTargets || (parentComponent.ce._teleportTargets = /* @__PURE__ */ new Set())).add(target);
|
|
3235
|
-
}
|
|
3236
|
-
if (!disabled) {
|
|
3237
|
-
mount(target, targetAnchor);
|
|
3238
|
-
updateCssVars(n2, false);
|
|
3239
|
-
}
|
|
3240
|
-
} else if (!disabled) {
|
|
3241
|
-
warn$1(
|
|
3242
|
-
"Invalid Teleport target on mount:",
|
|
3243
|
-
target,
|
|
3244
|
-
`(${typeof target})`
|
|
3245
|
-
);
|
|
3246
|
-
}
|
|
3247
|
-
};
|
|
3266
|
+
if (isTeleportDeferred(n2.props) || parentSuspense && parentSuspense.pendingBranch) {
|
|
3267
|
+
queuePendingMount(n2);
|
|
3268
|
+
return;
|
|
3269
|
+
}
|
|
3248
3270
|
if (disabled) {
|
|
3249
|
-
mount(container, mainAnchor);
|
|
3271
|
+
mount(n2, container, mainAnchor);
|
|
3250
3272
|
updateCssVars(n2, true);
|
|
3251
3273
|
}
|
|
3252
|
-
|
|
3253
|
-
n2.el.__isMounted = false;
|
|
3254
|
-
queuePostRenderEffect(() => {
|
|
3255
|
-
mountToTarget();
|
|
3256
|
-
delete n2.el.__isMounted;
|
|
3257
|
-
}, parentSuspense);
|
|
3258
|
-
} else {
|
|
3259
|
-
mountToTarget();
|
|
3260
|
-
}
|
|
3274
|
+
mountToTarget();
|
|
3261
3275
|
} else {
|
|
3262
|
-
|
|
3263
|
-
|
|
3264
|
-
|
|
3265
|
-
|
|
3266
|
-
|
|
3267
|
-
|
|
3268
|
-
|
|
3269
|
-
parentComponent,
|
|
3270
|
-
parentSuspense,
|
|
3271
|
-
namespace,
|
|
3272
|
-
slotScopeIds,
|
|
3273
|
-
optimized,
|
|
3274
|
-
internals
|
|
3275
|
-
);
|
|
3276
|
-
}, parentSuspense);
|
|
3276
|
+
n2.el = n1.el;
|
|
3277
|
+
const mainAnchor = n2.anchor = n1.anchor;
|
|
3278
|
+
const pendingMount = pendingMounts.get(n1);
|
|
3279
|
+
if (pendingMount) {
|
|
3280
|
+
pendingMount.flags |= 8;
|
|
3281
|
+
pendingMounts.delete(n1);
|
|
3282
|
+
queuePendingMount(n2);
|
|
3277
3283
|
return;
|
|
3278
3284
|
}
|
|
3279
|
-
n2.el = n1.el;
|
|
3280
3285
|
n2.targetStart = n1.targetStart;
|
|
3281
|
-
const mainAnchor = n2.anchor = n1.anchor;
|
|
3282
3286
|
const target = n2.target = n1.target;
|
|
3283
3287
|
const targetAnchor = n2.targetAnchor = n1.targetAnchor;
|
|
3284
3288
|
const wasDisabled = isTeleportDisabled(n1.props);
|
|
@@ -3371,13 +3375,19 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
3371
3375
|
target,
|
|
3372
3376
|
props
|
|
3373
3377
|
} = vnode;
|
|
3378
|
+
let shouldRemove = doRemove || !isTeleportDisabled(props);
|
|
3379
|
+
const pendingMount = pendingMounts.get(vnode);
|
|
3380
|
+
if (pendingMount) {
|
|
3381
|
+
pendingMount.flags |= 8;
|
|
3382
|
+
pendingMounts.delete(vnode);
|
|
3383
|
+
shouldRemove = false;
|
|
3384
|
+
}
|
|
3374
3385
|
if (target) {
|
|
3375
3386
|
hostRemove(targetStart);
|
|
3376
3387
|
hostRemove(targetAnchor);
|
|
3377
3388
|
}
|
|
3378
3389
|
doRemove && hostRemove(anchor);
|
|
3379
3390
|
if (shapeFlag & 16) {
|
|
3380
|
-
const shouldRemove = doRemove || !isTeleportDisabled(props);
|
|
3381
3391
|
for (let i = 0; i < children.length; i++) {
|
|
3382
3392
|
const child = children[i];
|
|
3383
3393
|
unmount(
|
|
@@ -3743,7 +3753,7 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
3743
3753
|
callHook(hook, [el]);
|
|
3744
3754
|
},
|
|
3745
3755
|
enter(el) {
|
|
3746
|
-
if (leavingVNodesCache[key] === vnode) return;
|
|
3756
|
+
if (!isHmrUpdating && leavingVNodesCache[key] === vnode) return;
|
|
3747
3757
|
let hook = onEnter;
|
|
3748
3758
|
let afterHook = onAfterEnter;
|
|
3749
3759
|
let cancelHook = onEnterCancelled;
|
|
@@ -6978,11 +6988,12 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
6978
6988
|
}
|
|
6979
6989
|
return nextProp !== prevProp;
|
|
6980
6990
|
}
|
|
6981
|
-
function updateHOCHostEl({ vnode, parent }, el) {
|
|
6991
|
+
function updateHOCHostEl({ vnode, parent, suspense }, el) {
|
|
6982
6992
|
while (parent) {
|
|
6983
6993
|
const root = parent.subTree;
|
|
6984
6994
|
if (root.suspense && root.suspense.activeBranch === vnode) {
|
|
6985
|
-
root.el =
|
|
6995
|
+
root.suspense.vnode.el = root.el = el;
|
|
6996
|
+
vnode = root;
|
|
6986
6997
|
}
|
|
6987
6998
|
if (root === vnode) {
|
|
6988
6999
|
(vnode = parent.vnode).el = el;
|
|
@@ -6991,6 +7002,9 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
6991
7002
|
break;
|
|
6992
7003
|
}
|
|
6993
7004
|
}
|
|
7005
|
+
if (suspense && suspense.activeBranch === vnode) {
|
|
7006
|
+
suspense.vnode.el = el;
|
|
7007
|
+
}
|
|
6994
7008
|
}
|
|
6995
7009
|
|
|
6996
7010
|
const internalObjectProto = {};
|
|
@@ -7832,10 +7846,17 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
7832
7846
|
}
|
|
7833
7847
|
hostInsert(el, container, anchor);
|
|
7834
7848
|
if ((vnodeHook = props && props.onVnodeMounted) || needCallTransitionHooks || dirs) {
|
|
7849
|
+
const isHmr = isHmrUpdating;
|
|
7835
7850
|
queuePostRenderEffect(() => {
|
|
7836
|
-
|
|
7837
|
-
|
|
7838
|
-
|
|
7851
|
+
let prev;
|
|
7852
|
+
prev = setHmrUpdating(isHmr);
|
|
7853
|
+
try {
|
|
7854
|
+
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
7855
|
+
needCallTransitionHooks && transition.enter(el);
|
|
7856
|
+
dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted");
|
|
7857
|
+
} finally {
|
|
7858
|
+
setHmrUpdating(prev);
|
|
7859
|
+
}
|
|
7839
7860
|
}, parentSuspense);
|
|
7840
7861
|
}
|
|
7841
7862
|
};
|
|
@@ -8756,7 +8777,8 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
8756
8777
|
shapeFlag,
|
|
8757
8778
|
patchFlag,
|
|
8758
8779
|
dirs,
|
|
8759
|
-
cacheIndex
|
|
8780
|
+
cacheIndex,
|
|
8781
|
+
memo
|
|
8760
8782
|
} = vnode;
|
|
8761
8783
|
if (patchFlag === -2) {
|
|
8762
8784
|
optimized = false;
|
|
@@ -8818,10 +8840,14 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
8818
8840
|
remove(vnode);
|
|
8819
8841
|
}
|
|
8820
8842
|
}
|
|
8821
|
-
|
|
8843
|
+
const shouldInvalidateMemo = memo != null && cacheIndex == null;
|
|
8844
|
+
if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || shouldInvokeDirs || shouldInvalidateMemo) {
|
|
8822
8845
|
queuePostRenderEffect(() => {
|
|
8823
8846
|
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
8824
8847
|
shouldInvokeDirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted");
|
|
8848
|
+
if (shouldInvalidateMemo) {
|
|
8849
|
+
vnode.el = null;
|
|
8850
|
+
}
|
|
8825
8851
|
}, parentSuspense);
|
|
8826
8852
|
}
|
|
8827
8853
|
};
|
|
@@ -9375,6 +9401,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
9375
9401
|
pendingId: suspenseId++,
|
|
9376
9402
|
timeout: typeof timeout === "number" ? timeout : -1,
|
|
9377
9403
|
activeBranch: null,
|
|
9404
|
+
isFallbackMountPending: false,
|
|
9378
9405
|
pendingBranch: null,
|
|
9379
9406
|
isInFallback: !isHydrating,
|
|
9380
9407
|
isHydrating,
|
|
@@ -9424,7 +9451,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
9424
9451
|
}
|
|
9425
9452
|
};
|
|
9426
9453
|
}
|
|
9427
|
-
if (activeBranch) {
|
|
9454
|
+
if (activeBranch && !suspense.isFallbackMountPending) {
|
|
9428
9455
|
if (parentNode(activeBranch.el) === container2) {
|
|
9429
9456
|
anchor = next(activeBranch);
|
|
9430
9457
|
}
|
|
@@ -9437,6 +9464,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
9437
9464
|
move(pendingBranch, container2, anchor, 0);
|
|
9438
9465
|
}
|
|
9439
9466
|
}
|
|
9467
|
+
suspense.isFallbackMountPending = false;
|
|
9440
9468
|
setActiveBranch(suspense, pendingBranch);
|
|
9441
9469
|
suspense.pendingBranch = null;
|
|
9442
9470
|
suspense.isInFallback = false;
|
|
@@ -9472,6 +9500,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
9472
9500
|
triggerEvent(vnode2, "onFallback");
|
|
9473
9501
|
const anchor2 = next(activeBranch);
|
|
9474
9502
|
const mountFallback = () => {
|
|
9503
|
+
suspense.isFallbackMountPending = false;
|
|
9475
9504
|
if (!suspense.isInFallback) {
|
|
9476
9505
|
return;
|
|
9477
9506
|
}
|
|
@@ -9491,6 +9520,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
9491
9520
|
};
|
|
9492
9521
|
const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === "out-in";
|
|
9493
9522
|
if (delayEnter) {
|
|
9523
|
+
suspense.isFallbackMountPending = true;
|
|
9494
9524
|
activeBranch.transition.afterLeave = mountFallback;
|
|
9495
9525
|
}
|
|
9496
9526
|
suspense.isInFallback = true;
|
|
@@ -9525,6 +9555,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
9525
9555
|
if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) {
|
|
9526
9556
|
return;
|
|
9527
9557
|
}
|
|
9558
|
+
unsetCurrentInstance();
|
|
9528
9559
|
instance.asyncResolved = true;
|
|
9529
9560
|
const { vnode: vnode2 } = instance;
|
|
9530
9561
|
{
|
|
@@ -10041,6 +10072,10 @@ Component that was made reactive: `,
|
|
|
10041
10072
|
const incoming = toMerge[key];
|
|
10042
10073
|
if (incoming && existing !== incoming && !(isArray(existing) && existing.includes(incoming))) {
|
|
10043
10074
|
ret[key] = existing ? [].concat(existing, incoming) : incoming;
|
|
10075
|
+
} else if (incoming == null && existing == null && // mergeProps({ 'onUpdate:modelValue': undefined }) should not retain
|
|
10076
|
+
// the model listener.
|
|
10077
|
+
!isModelListener(key)) {
|
|
10078
|
+
ret[key] = incoming;
|
|
10044
10079
|
}
|
|
10045
10080
|
} else if (key !== "") {
|
|
10046
10081
|
ret[key] = toMerge[key];
|
|
@@ -10711,7 +10746,7 @@ Component that was made reactive: `,
|
|
|
10711
10746
|
return true;
|
|
10712
10747
|
}
|
|
10713
10748
|
|
|
10714
|
-
const version = "3.5.
|
|
10749
|
+
const version = "3.5.32";
|
|
10715
10750
|
const warn = warn$1 ;
|
|
10716
10751
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
10717
10752
|
const devtools = devtools$1 ;
|
|
@@ -12271,7 +12306,8 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
12271
12306
|
if (elValue === newValue) {
|
|
12272
12307
|
return;
|
|
12273
12308
|
}
|
|
12274
|
-
|
|
12309
|
+
const rootNode = el.getRootNode();
|
|
12310
|
+
if ((rootNode instanceof Document || rootNode instanceof ShadowRoot) && rootNode.activeElement === el && el.type !== "range") {
|
|
12275
12311
|
if (lazy && value === oldValue) {
|
|
12276
12312
|
return;
|
|
12277
12313
|
}
|