@vue/runtime-dom 3.5.30 → 3.5.31
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 +55 -22
- 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 +55 -22
- 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.31
|
|
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__ = {
|
|
@@ -3249,9 +3256,10 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
3249
3256
|
mount(container, mainAnchor);
|
|
3250
3257
|
updateCssVars(n2, true);
|
|
3251
3258
|
}
|
|
3252
|
-
if (isTeleportDeferred(n2.props)) {
|
|
3259
|
+
if (isTeleportDeferred(n2.props) || parentSuspense && parentSuspense.pendingBranch) {
|
|
3253
3260
|
n2.el.__isMounted = false;
|
|
3254
3261
|
queuePostRenderEffect(() => {
|
|
3262
|
+
if (n2.el.__isMounted !== false) return;
|
|
3255
3263
|
mountToTarget();
|
|
3256
3264
|
delete n2.el.__isMounted;
|
|
3257
3265
|
}, parentSuspense);
|
|
@@ -3259,7 +3267,12 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
3259
3267
|
mountToTarget();
|
|
3260
3268
|
}
|
|
3261
3269
|
} else {
|
|
3262
|
-
|
|
3270
|
+
n2.el = n1.el;
|
|
3271
|
+
n2.targetStart = n1.targetStart;
|
|
3272
|
+
const mainAnchor = n2.anchor = n1.anchor;
|
|
3273
|
+
const target = n2.target = n1.target;
|
|
3274
|
+
const targetAnchor = n2.targetAnchor = n1.targetAnchor;
|
|
3275
|
+
if (n1.el.__isMounted === false) {
|
|
3263
3276
|
queuePostRenderEffect(() => {
|
|
3264
3277
|
TeleportImpl.process(
|
|
3265
3278
|
n1,
|
|
@@ -3276,11 +3289,6 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
3276
3289
|
}, parentSuspense);
|
|
3277
3290
|
return;
|
|
3278
3291
|
}
|
|
3279
|
-
n2.el = n1.el;
|
|
3280
|
-
n2.targetStart = n1.targetStart;
|
|
3281
|
-
const mainAnchor = n2.anchor = n1.anchor;
|
|
3282
|
-
const target = n2.target = n1.target;
|
|
3283
|
-
const targetAnchor = n2.targetAnchor = n1.targetAnchor;
|
|
3284
3292
|
const wasDisabled = isTeleportDisabled(n1.props);
|
|
3285
3293
|
const currentContainer = wasDisabled ? container : target;
|
|
3286
3294
|
const currentAnchor = wasDisabled ? mainAnchor : targetAnchor;
|
|
@@ -3743,7 +3751,7 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
3743
3751
|
callHook(hook, [el]);
|
|
3744
3752
|
},
|
|
3745
3753
|
enter(el) {
|
|
3746
|
-
if (leavingVNodesCache[key] === vnode) return;
|
|
3754
|
+
if (!isHmrUpdating && leavingVNodesCache[key] === vnode) return;
|
|
3747
3755
|
let hook = onEnter;
|
|
3748
3756
|
let afterHook = onAfterEnter;
|
|
3749
3757
|
let cancelHook = onEnterCancelled;
|
|
@@ -6978,11 +6986,12 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
6978
6986
|
}
|
|
6979
6987
|
return nextProp !== prevProp;
|
|
6980
6988
|
}
|
|
6981
|
-
function updateHOCHostEl({ vnode, parent }, el) {
|
|
6989
|
+
function updateHOCHostEl({ vnode, parent, suspense }, el) {
|
|
6982
6990
|
while (parent) {
|
|
6983
6991
|
const root = parent.subTree;
|
|
6984
6992
|
if (root.suspense && root.suspense.activeBranch === vnode) {
|
|
6985
|
-
root.el =
|
|
6993
|
+
root.suspense.vnode.el = root.el = el;
|
|
6994
|
+
vnode = root;
|
|
6986
6995
|
}
|
|
6987
6996
|
if (root === vnode) {
|
|
6988
6997
|
(vnode = parent.vnode).el = el;
|
|
@@ -6991,6 +7000,9 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
6991
7000
|
break;
|
|
6992
7001
|
}
|
|
6993
7002
|
}
|
|
7003
|
+
if (suspense && suspense.activeBranch === vnode) {
|
|
7004
|
+
suspense.vnode.el = el;
|
|
7005
|
+
}
|
|
6994
7006
|
}
|
|
6995
7007
|
|
|
6996
7008
|
const internalObjectProto = {};
|
|
@@ -7832,10 +7844,17 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
7832
7844
|
}
|
|
7833
7845
|
hostInsert(el, container, anchor);
|
|
7834
7846
|
if ((vnodeHook = props && props.onVnodeMounted) || needCallTransitionHooks || dirs) {
|
|
7847
|
+
const isHmr = isHmrUpdating;
|
|
7835
7848
|
queuePostRenderEffect(() => {
|
|
7836
|
-
|
|
7837
|
-
|
|
7838
|
-
|
|
7849
|
+
let prev;
|
|
7850
|
+
prev = setHmrUpdating(isHmr);
|
|
7851
|
+
try {
|
|
7852
|
+
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
7853
|
+
needCallTransitionHooks && transition.enter(el);
|
|
7854
|
+
dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted");
|
|
7855
|
+
} finally {
|
|
7856
|
+
setHmrUpdating(prev);
|
|
7857
|
+
}
|
|
7839
7858
|
}, parentSuspense);
|
|
7840
7859
|
}
|
|
7841
7860
|
};
|
|
@@ -8756,7 +8775,8 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
8756
8775
|
shapeFlag,
|
|
8757
8776
|
patchFlag,
|
|
8758
8777
|
dirs,
|
|
8759
|
-
cacheIndex
|
|
8778
|
+
cacheIndex,
|
|
8779
|
+
memo
|
|
8760
8780
|
} = vnode;
|
|
8761
8781
|
if (patchFlag === -2) {
|
|
8762
8782
|
optimized = false;
|
|
@@ -8818,10 +8838,14 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
8818
8838
|
remove(vnode);
|
|
8819
8839
|
}
|
|
8820
8840
|
}
|
|
8821
|
-
|
|
8841
|
+
const shouldInvalidateMemo = memo != null && cacheIndex == null;
|
|
8842
|
+
if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || shouldInvokeDirs || shouldInvalidateMemo) {
|
|
8822
8843
|
queuePostRenderEffect(() => {
|
|
8823
8844
|
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
8824
8845
|
shouldInvokeDirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted");
|
|
8846
|
+
if (shouldInvalidateMemo) {
|
|
8847
|
+
vnode.el = null;
|
|
8848
|
+
}
|
|
8825
8849
|
}, parentSuspense);
|
|
8826
8850
|
}
|
|
8827
8851
|
};
|
|
@@ -9375,6 +9399,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
9375
9399
|
pendingId: suspenseId++,
|
|
9376
9400
|
timeout: typeof timeout === "number" ? timeout : -1,
|
|
9377
9401
|
activeBranch: null,
|
|
9402
|
+
isFallbackMountPending: false,
|
|
9378
9403
|
pendingBranch: null,
|
|
9379
9404
|
isInFallback: !isHydrating,
|
|
9380
9405
|
isHydrating,
|
|
@@ -9424,7 +9449,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
9424
9449
|
}
|
|
9425
9450
|
};
|
|
9426
9451
|
}
|
|
9427
|
-
if (activeBranch) {
|
|
9452
|
+
if (activeBranch && !suspense.isFallbackMountPending) {
|
|
9428
9453
|
if (parentNode(activeBranch.el) === container2) {
|
|
9429
9454
|
anchor = next(activeBranch);
|
|
9430
9455
|
}
|
|
@@ -9437,6 +9462,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
9437
9462
|
move(pendingBranch, container2, anchor, 0);
|
|
9438
9463
|
}
|
|
9439
9464
|
}
|
|
9465
|
+
suspense.isFallbackMountPending = false;
|
|
9440
9466
|
setActiveBranch(suspense, pendingBranch);
|
|
9441
9467
|
suspense.pendingBranch = null;
|
|
9442
9468
|
suspense.isInFallback = false;
|
|
@@ -9472,6 +9498,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
9472
9498
|
triggerEvent(vnode2, "onFallback");
|
|
9473
9499
|
const anchor2 = next(activeBranch);
|
|
9474
9500
|
const mountFallback = () => {
|
|
9501
|
+
suspense.isFallbackMountPending = false;
|
|
9475
9502
|
if (!suspense.isInFallback) {
|
|
9476
9503
|
return;
|
|
9477
9504
|
}
|
|
@@ -9491,6 +9518,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
9491
9518
|
};
|
|
9492
9519
|
const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === "out-in";
|
|
9493
9520
|
if (delayEnter) {
|
|
9521
|
+
suspense.isFallbackMountPending = true;
|
|
9494
9522
|
activeBranch.transition.afterLeave = mountFallback;
|
|
9495
9523
|
}
|
|
9496
9524
|
suspense.isInFallback = true;
|
|
@@ -10041,6 +10069,10 @@ Component that was made reactive: `,
|
|
|
10041
10069
|
const incoming = toMerge[key];
|
|
10042
10070
|
if (incoming && existing !== incoming && !(isArray(existing) && existing.includes(incoming))) {
|
|
10043
10071
|
ret[key] = existing ? [].concat(existing, incoming) : incoming;
|
|
10072
|
+
} else if (incoming == null && existing == null && // mergeProps({ 'onUpdate:modelValue': undefined }) should not retain
|
|
10073
|
+
// the model listener.
|
|
10074
|
+
!isModelListener(key)) {
|
|
10075
|
+
ret[key] = incoming;
|
|
10044
10076
|
}
|
|
10045
10077
|
} else if (key !== "") {
|
|
10046
10078
|
ret[key] = toMerge[key];
|
|
@@ -10711,7 +10743,7 @@ Component that was made reactive: `,
|
|
|
10711
10743
|
return true;
|
|
10712
10744
|
}
|
|
10713
10745
|
|
|
10714
|
-
const version = "3.5.
|
|
10746
|
+
const version = "3.5.31";
|
|
10715
10747
|
const warn = warn$1 ;
|
|
10716
10748
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
10717
10749
|
const devtools = devtools$1 ;
|
|
@@ -12271,7 +12303,8 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
12271
12303
|
if (elValue === newValue) {
|
|
12272
12304
|
return;
|
|
12273
12305
|
}
|
|
12274
|
-
|
|
12306
|
+
const rootNode = el.getRootNode();
|
|
12307
|
+
if ((rootNode instanceof Document || rootNode instanceof ShadowRoot) && rootNode.activeElement === el && el.type !== "range") {
|
|
12275
12308
|
if (lazy && value === oldValue) {
|
|
12276
12309
|
return;
|
|
12277
12310
|
}
|