@vue/runtime-dom 3.4.24 → 3.4.26
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 +1 -1
- package/dist/runtime-dom.cjs.prod.js +1 -1
- package/dist/runtime-dom.esm-browser.js +37 -37
- package/dist/runtime-dom.esm-browser.prod.js +3 -3
- package/dist/runtime-dom.esm-bundler.js +1 -1
- package/dist/runtime-dom.global.js +37 -37
- package/dist/runtime-dom.global.prod.js +5 -5
- package/package.json +3 -3
package/dist/runtime-dom.cjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-dom v3.4.
|
|
2
|
+
* @vue/runtime-dom v3.4.26
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -81,10 +81,11 @@ const invokeArrayFns = (fns, arg) => {
|
|
|
81
81
|
fns[i](arg);
|
|
82
82
|
}
|
|
83
83
|
};
|
|
84
|
-
const def = (obj, key, value) => {
|
|
84
|
+
const def = (obj, key, value, writable = false) => {
|
|
85
85
|
Object.defineProperty(obj, key, {
|
|
86
86
|
configurable: true,
|
|
87
87
|
enumerable: false,
|
|
88
|
+
writable,
|
|
88
89
|
value
|
|
89
90
|
});
|
|
90
91
|
};
|
|
@@ -476,11 +477,10 @@ class ReactiveEffect {
|
|
|
476
477
|
}
|
|
477
478
|
}
|
|
478
479
|
stop() {
|
|
479
|
-
var _a;
|
|
480
480
|
if (this.active) {
|
|
481
481
|
preCleanupEffect(this);
|
|
482
482
|
postCleanupEffect(this);
|
|
483
|
-
|
|
483
|
+
this.onStop && this.onStop();
|
|
484
484
|
this.active = false;
|
|
485
485
|
}
|
|
486
486
|
}
|
|
@@ -693,8 +693,8 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) {
|
|
|
693
693
|
resetScheduling();
|
|
694
694
|
}
|
|
695
695
|
function getDepFromReactive(object, key) {
|
|
696
|
-
|
|
697
|
-
return
|
|
696
|
+
const depsMap = targetMap.get(object);
|
|
697
|
+
return depsMap && depsMap.get(key);
|
|
698
698
|
}
|
|
699
699
|
|
|
700
700
|
const isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`);
|
|
@@ -2410,7 +2410,7 @@ function renderComponentRoot(instance) {
|
|
|
2410
2410
|
true ? {
|
|
2411
2411
|
get attrs() {
|
|
2412
2412
|
markAttrsAccessed();
|
|
2413
|
-
return attrs;
|
|
2413
|
+
return shallowReadonly(attrs);
|
|
2414
2414
|
},
|
|
2415
2415
|
slots,
|
|
2416
2416
|
emit
|
|
@@ -2443,7 +2443,7 @@ function renderComponentRoot(instance) {
|
|
|
2443
2443
|
propsOptions
|
|
2444
2444
|
);
|
|
2445
2445
|
}
|
|
2446
|
-
root = cloneVNode(root, fallthroughAttrs);
|
|
2446
|
+
root = cloneVNode(root, fallthroughAttrs, false, true);
|
|
2447
2447
|
} else if (!accessedAttrs && root.type !== Comment) {
|
|
2448
2448
|
const allAttrs = Object.keys(attrs);
|
|
2449
2449
|
const eventAttrs = [];
|
|
@@ -2477,7 +2477,7 @@ function renderComponentRoot(instance) {
|
|
|
2477
2477
|
`Runtime directive used on component with non-element root node. The directives will not function as intended.`
|
|
2478
2478
|
);
|
|
2479
2479
|
}
|
|
2480
|
-
root = cloneVNode(root);
|
|
2480
|
+
root = cloneVNode(root, null, false, true);
|
|
2481
2481
|
root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs;
|
|
2482
2482
|
}
|
|
2483
2483
|
if (vnode.transition) {
|
|
@@ -2968,7 +2968,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
2968
2968
|
let parentSuspenseId;
|
|
2969
2969
|
const isSuspensible = isVNodeSuspensible(vnode);
|
|
2970
2970
|
if (isSuspensible) {
|
|
2971
|
-
if (parentSuspense
|
|
2971
|
+
if (parentSuspense && parentSuspense.pendingBranch) {
|
|
2972
2972
|
parentSuspenseId = parentSuspense.pendingId;
|
|
2973
2973
|
parentSuspense.deps++;
|
|
2974
2974
|
}
|
|
@@ -3280,8 +3280,8 @@ function setActiveBranch(suspense, branch) {
|
|
|
3280
3280
|
}
|
|
3281
3281
|
}
|
|
3282
3282
|
function isVNodeSuspensible(vnode) {
|
|
3283
|
-
|
|
3284
|
-
return
|
|
3283
|
+
const suspensible = vnode.props && vnode.props.suspensible;
|
|
3284
|
+
return suspensible != null && suspensible !== false;
|
|
3285
3285
|
}
|
|
3286
3286
|
|
|
3287
3287
|
const ssrContextKey = Symbol.for("v-scx");
|
|
@@ -3514,34 +3514,29 @@ function createPathGetter(ctx, path) {
|
|
|
3514
3514
|
return cur;
|
|
3515
3515
|
};
|
|
3516
3516
|
}
|
|
3517
|
-
function traverse(value, depth
|
|
3518
|
-
if (!isObject(value) || value["__v_skip"]) {
|
|
3517
|
+
function traverse(value, depth = Infinity, seen) {
|
|
3518
|
+
if (depth <= 0 || !isObject(value) || value["__v_skip"]) {
|
|
3519
3519
|
return value;
|
|
3520
3520
|
}
|
|
3521
|
-
if (depth && depth > 0) {
|
|
3522
|
-
if (currentDepth >= depth) {
|
|
3523
|
-
return value;
|
|
3524
|
-
}
|
|
3525
|
-
currentDepth++;
|
|
3526
|
-
}
|
|
3527
3521
|
seen = seen || /* @__PURE__ */ new Set();
|
|
3528
3522
|
if (seen.has(value)) {
|
|
3529
3523
|
return value;
|
|
3530
3524
|
}
|
|
3531
3525
|
seen.add(value);
|
|
3526
|
+
depth--;
|
|
3532
3527
|
if (isRef(value)) {
|
|
3533
|
-
traverse(value.value, depth,
|
|
3528
|
+
traverse(value.value, depth, seen);
|
|
3534
3529
|
} else if (isArray(value)) {
|
|
3535
3530
|
for (let i = 0; i < value.length; i++) {
|
|
3536
|
-
traverse(value[i], depth,
|
|
3531
|
+
traverse(value[i], depth, seen);
|
|
3537
3532
|
}
|
|
3538
3533
|
} else if (isSet(value) || isMap(value)) {
|
|
3539
3534
|
value.forEach((v) => {
|
|
3540
|
-
traverse(v, depth,
|
|
3535
|
+
traverse(v, depth, seen);
|
|
3541
3536
|
});
|
|
3542
3537
|
} else if (isPlainObject(value)) {
|
|
3543
3538
|
for (const key in value) {
|
|
3544
|
-
traverse(value[key], depth,
|
|
3539
|
+
traverse(value[key], depth, seen);
|
|
3545
3540
|
}
|
|
3546
3541
|
}
|
|
3547
3542
|
return value;
|
|
@@ -3699,7 +3694,7 @@ const BaseTransitionImpl = {
|
|
|
3699
3694
|
instance
|
|
3700
3695
|
);
|
|
3701
3696
|
setTransitionHooks(oldInnerChild, leavingHooks);
|
|
3702
|
-
if (mode === "out-in") {
|
|
3697
|
+
if (mode === "out-in" && innerChild.type !== Comment) {
|
|
3703
3698
|
state.isLeaving = true;
|
|
3704
3699
|
leavingHooks.afterLeave = () => {
|
|
3705
3700
|
state.isLeaving = false;
|
|
@@ -3891,11 +3886,13 @@ function getKeepAliveChild(vnode) {
|
|
|
3891
3886
|
return vnode.component.subTree;
|
|
3892
3887
|
}
|
|
3893
3888
|
const { shapeFlag, children } = vnode;
|
|
3894
|
-
if (
|
|
3895
|
-
|
|
3896
|
-
|
|
3897
|
-
|
|
3898
|
-
|
|
3889
|
+
if (children) {
|
|
3890
|
+
if (shapeFlag & 16) {
|
|
3891
|
+
return children[0];
|
|
3892
|
+
}
|
|
3893
|
+
if (shapeFlag & 32 && isFunction(children.default)) {
|
|
3894
|
+
return children.default();
|
|
3895
|
+
}
|
|
3899
3896
|
}
|
|
3900
3897
|
}
|
|
3901
3898
|
function setTransitionHooks(vnode, hooks) {
|
|
@@ -4212,7 +4209,7 @@ const KeepAliveImpl = {
|
|
|
4212
4209
|
return () => {
|
|
4213
4210
|
pendingCacheKey = null;
|
|
4214
4211
|
if (!slots.default) {
|
|
4215
|
-
return
|
|
4212
|
+
return null;
|
|
4216
4213
|
}
|
|
4217
4214
|
const children = slots.default();
|
|
4218
4215
|
const rawVNode = children[0];
|
|
@@ -5495,7 +5492,7 @@ function hasInjectionContext() {
|
|
|
5495
5492
|
return !!(currentInstance || currentRenderingInstance || currentApp);
|
|
5496
5493
|
}
|
|
5497
5494
|
|
|
5498
|
-
const internalObjectProto =
|
|
5495
|
+
const internalObjectProto = {};
|
|
5499
5496
|
const createInternalObject = () => Object.create(internalObjectProto);
|
|
5500
5497
|
const isInternalObject = (obj) => Object.getPrototypeOf(obj) === internalObjectProto;
|
|
5501
5498
|
|
|
@@ -5953,7 +5950,7 @@ const initSlots = (instance, children) => {
|
|
|
5953
5950
|
const type = children._;
|
|
5954
5951
|
if (type) {
|
|
5955
5952
|
extend(slots, children);
|
|
5956
|
-
def(slots, "_", type);
|
|
5953
|
+
def(slots, "_", type, true);
|
|
5957
5954
|
} else {
|
|
5958
5955
|
normalizeObjectSlots(children, slots);
|
|
5959
5956
|
}
|
|
@@ -8700,8 +8697,8 @@ function guardReactiveProps(props) {
|
|
|
8700
8697
|
return null;
|
|
8701
8698
|
return isProxy(props) || isInternalObject(props) ? extend({}, props) : props;
|
|
8702
8699
|
}
|
|
8703
|
-
function cloneVNode(vnode, extraProps, mergeRef = false) {
|
|
8704
|
-
const { props, ref, patchFlag, children } = vnode;
|
|
8700
|
+
function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false) {
|
|
8701
|
+
const { props, ref, patchFlag, children, transition } = vnode;
|
|
8705
8702
|
const mergedProps = extraProps ? mergeProps(props || {}, extraProps) : props;
|
|
8706
8703
|
const cloned = {
|
|
8707
8704
|
__v_isVNode: true,
|
|
@@ -8731,7 +8728,7 @@ function cloneVNode(vnode, extraProps, mergeRef = false) {
|
|
|
8731
8728
|
dynamicChildren: vnode.dynamicChildren,
|
|
8732
8729
|
appContext: vnode.appContext,
|
|
8733
8730
|
dirs: vnode.dirs,
|
|
8734
|
-
transition
|
|
8731
|
+
transition,
|
|
8735
8732
|
// These should technically only be non-null on mounted VNodes. However,
|
|
8736
8733
|
// they *should* be copied for kept-alive vnodes. So we just always copy
|
|
8737
8734
|
// them since them being non-null during a mount doesn't affect the logic as
|
|
@@ -8745,6 +8742,9 @@ function cloneVNode(vnode, extraProps, mergeRef = false) {
|
|
|
8745
8742
|
ctx: vnode.ctx,
|
|
8746
8743
|
ce: vnode.ce
|
|
8747
8744
|
};
|
|
8745
|
+
if (transition && cloneTransition) {
|
|
8746
|
+
cloned.transition = transition.clone(cloned);
|
|
8747
|
+
}
|
|
8748
8748
|
return cloned;
|
|
8749
8749
|
}
|
|
8750
8750
|
function deepCloneVNode(vnode) {
|
|
@@ -9552,7 +9552,7 @@ function isMemoSame(cached, memo) {
|
|
|
9552
9552
|
return true;
|
|
9553
9553
|
}
|
|
9554
9554
|
|
|
9555
|
-
const version = "3.4.
|
|
9555
|
+
const version = "3.4.26";
|
|
9556
9556
|
const warn = warn$1 ;
|
|
9557
9557
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
9558
9558
|
const devtools = devtools$1 ;
|