@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
package/dist/runtime-dom.cjs.js
CHANGED
|
@@ -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
|
**/
|
|
@@ -1511,7 +1511,8 @@ const vModelText = {
|
|
|
1511
1511
|
if (elValue === newValue) {
|
|
1512
1512
|
return;
|
|
1513
1513
|
}
|
|
1514
|
-
|
|
1514
|
+
const rootNode = el.getRootNode();
|
|
1515
|
+
if ((rootNode instanceof Document || rootNode instanceof ShadowRoot) && rootNode.activeElement === el && el.type !== "range") {
|
|
1515
1516
|
if (lazy && value === oldValue) {
|
|
1516
1517
|
return;
|
|
1517
1518
|
}
|
|
@@ -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
|
**/
|
|
@@ -1417,7 +1417,8 @@ const vModelText = {
|
|
|
1417
1417
|
if (elValue === newValue) {
|
|
1418
1418
|
return;
|
|
1419
1419
|
}
|
|
1420
|
-
|
|
1420
|
+
const rootNode = el.getRootNode();
|
|
1421
|
+
if ((rootNode instanceof Document || rootNode instanceof ShadowRoot) && rootNode.activeElement === el && el.type !== "range") {
|
|
1421
1422
|
if (lazy && value === oldValue) {
|
|
1422
1423
|
return;
|
|
1423
1424
|
}
|
|
@@ -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
|
**/
|
|
@@ -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__ = {
|
|
@@ -3274,9 +3281,10 @@ const TeleportImpl = {
|
|
|
3274
3281
|
mount(container, mainAnchor);
|
|
3275
3282
|
updateCssVars(n2, true);
|
|
3276
3283
|
}
|
|
3277
|
-
if (isTeleportDeferred(n2.props)) {
|
|
3284
|
+
if (isTeleportDeferred(n2.props) || parentSuspense && parentSuspense.pendingBranch) {
|
|
3278
3285
|
n2.el.__isMounted = false;
|
|
3279
3286
|
queuePostRenderEffect(() => {
|
|
3287
|
+
if (n2.el.__isMounted !== false) return;
|
|
3280
3288
|
mountToTarget();
|
|
3281
3289
|
delete n2.el.__isMounted;
|
|
3282
3290
|
}, parentSuspense);
|
|
@@ -3284,7 +3292,12 @@ const TeleportImpl = {
|
|
|
3284
3292
|
mountToTarget();
|
|
3285
3293
|
}
|
|
3286
3294
|
} else {
|
|
3287
|
-
|
|
3295
|
+
n2.el = n1.el;
|
|
3296
|
+
n2.targetStart = n1.targetStart;
|
|
3297
|
+
const mainAnchor = n2.anchor = n1.anchor;
|
|
3298
|
+
const target = n2.target = n1.target;
|
|
3299
|
+
const targetAnchor = n2.targetAnchor = n1.targetAnchor;
|
|
3300
|
+
if (n1.el.__isMounted === false) {
|
|
3288
3301
|
queuePostRenderEffect(() => {
|
|
3289
3302
|
TeleportImpl.process(
|
|
3290
3303
|
n1,
|
|
@@ -3301,11 +3314,6 @@ const TeleportImpl = {
|
|
|
3301
3314
|
}, parentSuspense);
|
|
3302
3315
|
return;
|
|
3303
3316
|
}
|
|
3304
|
-
n2.el = n1.el;
|
|
3305
|
-
n2.targetStart = n1.targetStart;
|
|
3306
|
-
const mainAnchor = n2.anchor = n1.anchor;
|
|
3307
|
-
const target = n2.target = n1.target;
|
|
3308
|
-
const targetAnchor = n2.targetAnchor = n1.targetAnchor;
|
|
3309
3317
|
const wasDisabled = isTeleportDisabled(n1.props);
|
|
3310
3318
|
const currentContainer = wasDisabled ? container : target;
|
|
3311
3319
|
const currentAnchor = wasDisabled ? mainAnchor : targetAnchor;
|
|
@@ -3768,7 +3776,7 @@ function resolveTransitionHooks(vnode, props, state, instance, postClone) {
|
|
|
3768
3776
|
callHook(hook, [el]);
|
|
3769
3777
|
},
|
|
3770
3778
|
enter(el) {
|
|
3771
|
-
if (leavingVNodesCache[key] === vnode) return;
|
|
3779
|
+
if (!isHmrUpdating && leavingVNodesCache[key] === vnode) return;
|
|
3772
3780
|
let hook = onEnter;
|
|
3773
3781
|
let afterHook = onAfterEnter;
|
|
3774
3782
|
let cancelHook = onEnterCancelled;
|
|
@@ -7012,11 +7020,12 @@ function hasPropValueChanged(nextProps, prevProps, key) {
|
|
|
7012
7020
|
}
|
|
7013
7021
|
return nextProp !== prevProp;
|
|
7014
7022
|
}
|
|
7015
|
-
function updateHOCHostEl({ vnode, parent }, el) {
|
|
7023
|
+
function updateHOCHostEl({ vnode, parent, suspense }, el) {
|
|
7016
7024
|
while (parent) {
|
|
7017
7025
|
const root = parent.subTree;
|
|
7018
7026
|
if (root.suspense && root.suspense.activeBranch === vnode) {
|
|
7019
|
-
root.el =
|
|
7027
|
+
root.suspense.vnode.el = root.el = el;
|
|
7028
|
+
vnode = root;
|
|
7020
7029
|
}
|
|
7021
7030
|
if (root === vnode) {
|
|
7022
7031
|
(vnode = parent.vnode).el = el;
|
|
@@ -7025,6 +7034,9 @@ function updateHOCHostEl({ vnode, parent }, el) {
|
|
|
7025
7034
|
break;
|
|
7026
7035
|
}
|
|
7027
7036
|
}
|
|
7037
|
+
if (suspense && suspense.activeBranch === vnode) {
|
|
7038
|
+
suspense.vnode.el = el;
|
|
7039
|
+
}
|
|
7028
7040
|
}
|
|
7029
7041
|
|
|
7030
7042
|
const internalObjectProto = {};
|
|
@@ -7866,10 +7878,17 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
7866
7878
|
}
|
|
7867
7879
|
hostInsert(el, container, anchor);
|
|
7868
7880
|
if ((vnodeHook = props && props.onVnodeMounted) || needCallTransitionHooks || dirs) {
|
|
7881
|
+
const isHmr = isHmrUpdating;
|
|
7869
7882
|
queuePostRenderEffect(() => {
|
|
7870
|
-
|
|
7871
|
-
|
|
7872
|
-
|
|
7883
|
+
let prev;
|
|
7884
|
+
prev = setHmrUpdating(isHmr);
|
|
7885
|
+
try {
|
|
7886
|
+
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
7887
|
+
needCallTransitionHooks && transition.enter(el);
|
|
7888
|
+
dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted");
|
|
7889
|
+
} finally {
|
|
7890
|
+
setHmrUpdating(prev);
|
|
7891
|
+
}
|
|
7873
7892
|
}, parentSuspense);
|
|
7874
7893
|
}
|
|
7875
7894
|
};
|
|
@@ -8790,7 +8809,8 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8790
8809
|
shapeFlag,
|
|
8791
8810
|
patchFlag,
|
|
8792
8811
|
dirs,
|
|
8793
|
-
cacheIndex
|
|
8812
|
+
cacheIndex,
|
|
8813
|
+
memo
|
|
8794
8814
|
} = vnode;
|
|
8795
8815
|
if (patchFlag === -2) {
|
|
8796
8816
|
optimized = false;
|
|
@@ -8852,10 +8872,14 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8852
8872
|
remove(vnode);
|
|
8853
8873
|
}
|
|
8854
8874
|
}
|
|
8855
|
-
|
|
8875
|
+
const shouldInvalidateMemo = memo != null && cacheIndex == null;
|
|
8876
|
+
if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || shouldInvokeDirs || shouldInvalidateMemo) {
|
|
8856
8877
|
queuePostRenderEffect(() => {
|
|
8857
8878
|
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
8858
8879
|
shouldInvokeDirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted");
|
|
8880
|
+
if (shouldInvalidateMemo) {
|
|
8881
|
+
vnode.el = null;
|
|
8882
|
+
}
|
|
8859
8883
|
}, parentSuspense);
|
|
8860
8884
|
}
|
|
8861
8885
|
};
|
|
@@ -9409,6 +9433,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
9409
9433
|
pendingId: suspenseId++,
|
|
9410
9434
|
timeout: typeof timeout === "number" ? timeout : -1,
|
|
9411
9435
|
activeBranch: null,
|
|
9436
|
+
isFallbackMountPending: false,
|
|
9412
9437
|
pendingBranch: null,
|
|
9413
9438
|
isInFallback: !isHydrating,
|
|
9414
9439
|
isHydrating,
|
|
@@ -9458,7 +9483,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
9458
9483
|
}
|
|
9459
9484
|
};
|
|
9460
9485
|
}
|
|
9461
|
-
if (activeBranch) {
|
|
9486
|
+
if (activeBranch && !suspense.isFallbackMountPending) {
|
|
9462
9487
|
if (parentNode(activeBranch.el) === container2) {
|
|
9463
9488
|
anchor = next(activeBranch);
|
|
9464
9489
|
}
|
|
@@ -9471,6 +9496,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
9471
9496
|
move(pendingBranch, container2, anchor, 0);
|
|
9472
9497
|
}
|
|
9473
9498
|
}
|
|
9499
|
+
suspense.isFallbackMountPending = false;
|
|
9474
9500
|
setActiveBranch(suspense, pendingBranch);
|
|
9475
9501
|
suspense.pendingBranch = null;
|
|
9476
9502
|
suspense.isInFallback = false;
|
|
@@ -9506,6 +9532,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
9506
9532
|
triggerEvent(vnode2, "onFallback");
|
|
9507
9533
|
const anchor2 = next(activeBranch);
|
|
9508
9534
|
const mountFallback = () => {
|
|
9535
|
+
suspense.isFallbackMountPending = false;
|
|
9509
9536
|
if (!suspense.isInFallback) {
|
|
9510
9537
|
return;
|
|
9511
9538
|
}
|
|
@@ -9525,6 +9552,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
9525
9552
|
};
|
|
9526
9553
|
const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === "out-in";
|
|
9527
9554
|
if (delayEnter) {
|
|
9555
|
+
suspense.isFallbackMountPending = true;
|
|
9528
9556
|
activeBranch.transition.afterLeave = mountFallback;
|
|
9529
9557
|
}
|
|
9530
9558
|
suspense.isInFallback = true;
|
|
@@ -10075,6 +10103,10 @@ function mergeProps(...args) {
|
|
|
10075
10103
|
const incoming = toMerge[key];
|
|
10076
10104
|
if (incoming && existing !== incoming && !(isArray(existing) && existing.includes(incoming))) {
|
|
10077
10105
|
ret[key] = existing ? [].concat(existing, incoming) : incoming;
|
|
10106
|
+
} else if (incoming == null && existing == null && // mergeProps({ 'onUpdate:modelValue': undefined }) should not retain
|
|
10107
|
+
// the model listener.
|
|
10108
|
+
!isModelListener(key)) {
|
|
10109
|
+
ret[key] = incoming;
|
|
10078
10110
|
}
|
|
10079
10111
|
} else if (key !== "") {
|
|
10080
10112
|
ret[key] = toMerge[key];
|
|
@@ -10759,7 +10791,7 @@ function isMemoSame(cached, memo) {
|
|
|
10759
10791
|
return true;
|
|
10760
10792
|
}
|
|
10761
10793
|
|
|
10762
|
-
const version = "3.5.
|
|
10794
|
+
const version = "3.5.31";
|
|
10763
10795
|
const warn = warn$1 ;
|
|
10764
10796
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
10765
10797
|
const devtools = devtools$1 ;
|
|
@@ -12350,7 +12382,8 @@ const vModelText = {
|
|
|
12350
12382
|
if (elValue === newValue) {
|
|
12351
12383
|
return;
|
|
12352
12384
|
}
|
|
12353
|
-
|
|
12385
|
+
const rootNode = el.getRootNode();
|
|
12386
|
+
if ((rootNode instanceof Document || rootNode instanceof ShadowRoot) && rootNode.activeElement === el && el.type !== "range") {
|
|
12354
12387
|
if (lazy && value === oldValue) {
|
|
12355
12388
|
return;
|
|
12356
12389
|
}
|