vue 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/vue.cjs.js +1 -1
- package/dist/vue.cjs.prod.js +1 -1
- package/dist/vue.esm-browser.js +44 -48
- package/dist/vue.esm-browser.prod.js +4 -4
- package/dist/vue.esm-bundler.js +1 -1
- package/dist/vue.global.js +44 -48
- package/dist/vue.global.prod.js +4 -4
- package/dist/vue.runtime.esm-browser.js +37 -37
- package/dist/vue.runtime.esm-browser.prod.js +3 -3
- package/dist/vue.runtime.esm-bundler.js +1 -1
- package/dist/vue.runtime.global.js +37 -37
- package/dist/vue.runtime.global.prod.js +5 -5
- package/package.json +6 -6
package/dist/vue.cjs.js
CHANGED
package/dist/vue.cjs.prod.js
CHANGED
package/dist/vue.esm-browser.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* vue v3.4.
|
|
2
|
+
* vue 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
|
};
|
|
@@ -541,11 +542,10 @@ class ReactiveEffect {
|
|
|
541
542
|
}
|
|
542
543
|
}
|
|
543
544
|
stop() {
|
|
544
|
-
var _a;
|
|
545
545
|
if (this.active) {
|
|
546
546
|
preCleanupEffect(this);
|
|
547
547
|
postCleanupEffect(this);
|
|
548
|
-
|
|
548
|
+
this.onStop && this.onStop();
|
|
549
549
|
this.active = false;
|
|
550
550
|
}
|
|
551
551
|
}
|
|
@@ -758,8 +758,8 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) {
|
|
|
758
758
|
resetScheduling();
|
|
759
759
|
}
|
|
760
760
|
function getDepFromReactive(object, key) {
|
|
761
|
-
|
|
762
|
-
return
|
|
761
|
+
const depsMap = targetMap.get(object);
|
|
762
|
+
return depsMap && depsMap.get(key);
|
|
763
763
|
}
|
|
764
764
|
|
|
765
765
|
const isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`);
|
|
@@ -2475,7 +2475,7 @@ function renderComponentRoot(instance) {
|
|
|
2475
2475
|
true ? {
|
|
2476
2476
|
get attrs() {
|
|
2477
2477
|
markAttrsAccessed();
|
|
2478
|
-
return attrs;
|
|
2478
|
+
return shallowReadonly(attrs);
|
|
2479
2479
|
},
|
|
2480
2480
|
slots,
|
|
2481
2481
|
emit
|
|
@@ -2508,7 +2508,7 @@ function renderComponentRoot(instance) {
|
|
|
2508
2508
|
propsOptions
|
|
2509
2509
|
);
|
|
2510
2510
|
}
|
|
2511
|
-
root = cloneVNode(root, fallthroughAttrs);
|
|
2511
|
+
root = cloneVNode(root, fallthroughAttrs, false, true);
|
|
2512
2512
|
} else if (!accessedAttrs && root.type !== Comment) {
|
|
2513
2513
|
const allAttrs = Object.keys(attrs);
|
|
2514
2514
|
const eventAttrs = [];
|
|
@@ -2542,7 +2542,7 @@ function renderComponentRoot(instance) {
|
|
|
2542
2542
|
`Runtime directive used on component with non-element root node. The directives will not function as intended.`
|
|
2543
2543
|
);
|
|
2544
2544
|
}
|
|
2545
|
-
root = cloneVNode(root);
|
|
2545
|
+
root = cloneVNode(root, null, false, true);
|
|
2546
2546
|
root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs;
|
|
2547
2547
|
}
|
|
2548
2548
|
if (vnode.transition) {
|
|
@@ -3033,7 +3033,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
3033
3033
|
let parentSuspenseId;
|
|
3034
3034
|
const isSuspensible = isVNodeSuspensible(vnode);
|
|
3035
3035
|
if (isSuspensible) {
|
|
3036
|
-
if (parentSuspense
|
|
3036
|
+
if (parentSuspense && parentSuspense.pendingBranch) {
|
|
3037
3037
|
parentSuspenseId = parentSuspense.pendingId;
|
|
3038
3038
|
parentSuspense.deps++;
|
|
3039
3039
|
}
|
|
@@ -3345,8 +3345,8 @@ function setActiveBranch(suspense, branch) {
|
|
|
3345
3345
|
}
|
|
3346
3346
|
}
|
|
3347
3347
|
function isVNodeSuspensible(vnode) {
|
|
3348
|
-
|
|
3349
|
-
return
|
|
3348
|
+
const suspensible = vnode.props && vnode.props.suspensible;
|
|
3349
|
+
return suspensible != null && suspensible !== false;
|
|
3350
3350
|
}
|
|
3351
3351
|
|
|
3352
3352
|
const ssrContextKey = Symbol.for("v-scx");
|
|
@@ -3579,34 +3579,29 @@ function createPathGetter(ctx, path) {
|
|
|
3579
3579
|
return cur;
|
|
3580
3580
|
};
|
|
3581
3581
|
}
|
|
3582
|
-
function traverse(value, depth
|
|
3583
|
-
if (!isObject(value) || value["__v_skip"]) {
|
|
3582
|
+
function traverse(value, depth = Infinity, seen) {
|
|
3583
|
+
if (depth <= 0 || !isObject(value) || value["__v_skip"]) {
|
|
3584
3584
|
return value;
|
|
3585
3585
|
}
|
|
3586
|
-
if (depth && depth > 0) {
|
|
3587
|
-
if (currentDepth >= depth) {
|
|
3588
|
-
return value;
|
|
3589
|
-
}
|
|
3590
|
-
currentDepth++;
|
|
3591
|
-
}
|
|
3592
3586
|
seen = seen || /* @__PURE__ */ new Set();
|
|
3593
3587
|
if (seen.has(value)) {
|
|
3594
3588
|
return value;
|
|
3595
3589
|
}
|
|
3596
3590
|
seen.add(value);
|
|
3591
|
+
depth--;
|
|
3597
3592
|
if (isRef(value)) {
|
|
3598
|
-
traverse(value.value, depth,
|
|
3593
|
+
traverse(value.value, depth, seen);
|
|
3599
3594
|
} else if (isArray(value)) {
|
|
3600
3595
|
for (let i = 0; i < value.length; i++) {
|
|
3601
|
-
traverse(value[i], depth,
|
|
3596
|
+
traverse(value[i], depth, seen);
|
|
3602
3597
|
}
|
|
3603
3598
|
} else if (isSet(value) || isMap(value)) {
|
|
3604
3599
|
value.forEach((v) => {
|
|
3605
|
-
traverse(v, depth,
|
|
3600
|
+
traverse(v, depth, seen);
|
|
3606
3601
|
});
|
|
3607
3602
|
} else if (isPlainObject(value)) {
|
|
3608
3603
|
for (const key in value) {
|
|
3609
|
-
traverse(value[key], depth,
|
|
3604
|
+
traverse(value[key], depth, seen);
|
|
3610
3605
|
}
|
|
3611
3606
|
}
|
|
3612
3607
|
return value;
|
|
@@ -3764,7 +3759,7 @@ const BaseTransitionImpl = {
|
|
|
3764
3759
|
instance
|
|
3765
3760
|
);
|
|
3766
3761
|
setTransitionHooks(oldInnerChild, leavingHooks);
|
|
3767
|
-
if (mode === "out-in") {
|
|
3762
|
+
if (mode === "out-in" && innerChild.type !== Comment) {
|
|
3768
3763
|
state.isLeaving = true;
|
|
3769
3764
|
leavingHooks.afterLeave = () => {
|
|
3770
3765
|
state.isLeaving = false;
|
|
@@ -3956,11 +3951,13 @@ function getKeepAliveChild(vnode) {
|
|
|
3956
3951
|
return vnode.component.subTree;
|
|
3957
3952
|
}
|
|
3958
3953
|
const { shapeFlag, children } = vnode;
|
|
3959
|
-
if (
|
|
3960
|
-
|
|
3961
|
-
|
|
3962
|
-
|
|
3963
|
-
|
|
3954
|
+
if (children) {
|
|
3955
|
+
if (shapeFlag & 16) {
|
|
3956
|
+
return children[0];
|
|
3957
|
+
}
|
|
3958
|
+
if (shapeFlag & 32 && isFunction(children.default)) {
|
|
3959
|
+
return children.default();
|
|
3960
|
+
}
|
|
3964
3961
|
}
|
|
3965
3962
|
}
|
|
3966
3963
|
function setTransitionHooks(vnode, hooks) {
|
|
@@ -4277,7 +4274,7 @@ const KeepAliveImpl = {
|
|
|
4277
4274
|
return () => {
|
|
4278
4275
|
pendingCacheKey = null;
|
|
4279
4276
|
if (!slots.default) {
|
|
4280
|
-
return
|
|
4277
|
+
return null;
|
|
4281
4278
|
}
|
|
4282
4279
|
const children = slots.default();
|
|
4283
4280
|
const rawVNode = children[0];
|
|
@@ -5560,7 +5557,7 @@ function hasInjectionContext() {
|
|
|
5560
5557
|
return !!(currentInstance || currentRenderingInstance || currentApp);
|
|
5561
5558
|
}
|
|
5562
5559
|
|
|
5563
|
-
const internalObjectProto =
|
|
5560
|
+
const internalObjectProto = {};
|
|
5564
5561
|
const createInternalObject = () => Object.create(internalObjectProto);
|
|
5565
5562
|
const isInternalObject = (obj) => Object.getPrototypeOf(obj) === internalObjectProto;
|
|
5566
5563
|
|
|
@@ -6018,7 +6015,7 @@ const initSlots = (instance, children) => {
|
|
|
6018
6015
|
const type = children._;
|
|
6019
6016
|
if (type) {
|
|
6020
6017
|
extend(slots, children);
|
|
6021
|
-
def(slots, "_", type);
|
|
6018
|
+
def(slots, "_", type, true);
|
|
6022
6019
|
} else {
|
|
6023
6020
|
normalizeObjectSlots(children, slots);
|
|
6024
6021
|
}
|
|
@@ -8765,8 +8762,8 @@ function guardReactiveProps(props) {
|
|
|
8765
8762
|
return null;
|
|
8766
8763
|
return isProxy(props) || isInternalObject(props) ? extend({}, props) : props;
|
|
8767
8764
|
}
|
|
8768
|
-
function cloneVNode(vnode, extraProps, mergeRef = false) {
|
|
8769
|
-
const { props, ref, patchFlag, children } = vnode;
|
|
8765
|
+
function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false) {
|
|
8766
|
+
const { props, ref, patchFlag, children, transition } = vnode;
|
|
8770
8767
|
const mergedProps = extraProps ? mergeProps(props || {}, extraProps) : props;
|
|
8771
8768
|
const cloned = {
|
|
8772
8769
|
__v_isVNode: true,
|
|
@@ -8796,7 +8793,7 @@ function cloneVNode(vnode, extraProps, mergeRef = false) {
|
|
|
8796
8793
|
dynamicChildren: vnode.dynamicChildren,
|
|
8797
8794
|
appContext: vnode.appContext,
|
|
8798
8795
|
dirs: vnode.dirs,
|
|
8799
|
-
transition
|
|
8796
|
+
transition,
|
|
8800
8797
|
// These should technically only be non-null on mounted VNodes. However,
|
|
8801
8798
|
// they *should* be copied for kept-alive vnodes. So we just always copy
|
|
8802
8799
|
// them since them being non-null during a mount doesn't affect the logic as
|
|
@@ -8810,6 +8807,9 @@ function cloneVNode(vnode, extraProps, mergeRef = false) {
|
|
|
8810
8807
|
ctx: vnode.ctx,
|
|
8811
8808
|
ce: vnode.ce
|
|
8812
8809
|
};
|
|
8810
|
+
if (transition && cloneTransition) {
|
|
8811
|
+
cloned.transition = transition.clone(cloned);
|
|
8812
|
+
}
|
|
8813
8813
|
return cloned;
|
|
8814
8814
|
}
|
|
8815
8815
|
function deepCloneVNode(vnode) {
|
|
@@ -9617,7 +9617,7 @@ function isMemoSame(cached, memo) {
|
|
|
9617
9617
|
return true;
|
|
9618
9618
|
}
|
|
9619
9619
|
|
|
9620
|
-
const version = "3.4.
|
|
9620
|
+
const version = "3.4.26";
|
|
9621
9621
|
const warn = warn$1 ;
|
|
9622
9622
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
9623
9623
|
const devtools = devtools$1 ;
|
|
@@ -12811,11 +12811,10 @@ const tokenizer = new Tokenizer(stack, {
|
|
|
12811
12811
|
}
|
|
12812
12812
|
},
|
|
12813
12813
|
onselfclosingtag(end) {
|
|
12814
|
-
var _a;
|
|
12815
12814
|
const name = currentOpenTag.tag;
|
|
12816
12815
|
currentOpenTag.isSelfClosing = true;
|
|
12817
12816
|
endOpenTag(end);
|
|
12818
|
-
if (
|
|
12817
|
+
if (stack[0] && stack[0].tag === name) {
|
|
12819
12818
|
onCloseTag(stack.shift(), end);
|
|
12820
12819
|
}
|
|
12821
12820
|
},
|
|
@@ -13116,16 +13115,15 @@ function endOpenTag(end) {
|
|
|
13116
13115
|
currentOpenTag = null;
|
|
13117
13116
|
}
|
|
13118
13117
|
function onText(content, start, end) {
|
|
13119
|
-
var _a;
|
|
13120
13118
|
{
|
|
13121
|
-
const tag =
|
|
13119
|
+
const tag = stack[0] && stack[0].tag;
|
|
13122
13120
|
if (tag !== "script" && tag !== "style" && content.includes("&")) {
|
|
13123
13121
|
content = currentOptions.decodeEntities(content, false);
|
|
13124
13122
|
}
|
|
13125
13123
|
}
|
|
13126
13124
|
const parent = stack[0] || currentRoot;
|
|
13127
13125
|
const lastNode = parent.children[parent.children.length - 1];
|
|
13128
|
-
if (
|
|
13126
|
+
if (lastNode && lastNode.type === 2) {
|
|
13129
13127
|
lastNode.content += content;
|
|
13130
13128
|
setLocEnd(lastNode.loc, end);
|
|
13131
13129
|
} else {
|
|
@@ -13201,11 +13199,10 @@ function isFragmentTemplate({ tag, props }) {
|
|
|
13201
13199
|
return false;
|
|
13202
13200
|
}
|
|
13203
13201
|
function isComponent({ tag, props }) {
|
|
13204
|
-
var _a;
|
|
13205
13202
|
if (currentOptions.isCustomElement(tag)) {
|
|
13206
13203
|
return false;
|
|
13207
13204
|
}
|
|
13208
|
-
if (tag === "component" || isUpperCase(tag.charCodeAt(0)) || isCoreComponent(tag) ||
|
|
13205
|
+
if (tag === "component" || isUpperCase(tag.charCodeAt(0)) || isCoreComponent(tag) || currentOptions.isBuiltInComponent && currentOptions.isBuiltInComponent(tag) || currentOptions.isNativeTag && !currentOptions.isNativeTag(tag)) {
|
|
13209
13206
|
return true;
|
|
13210
13207
|
}
|
|
13211
13208
|
for (let i = 0; i < props.length; i++) {
|
|
@@ -13225,7 +13222,6 @@ function isUpperCase(c) {
|
|
|
13225
13222
|
}
|
|
13226
13223
|
const windowsNewlineRE = /\r\n/g;
|
|
13227
13224
|
function condenseWhitespace(nodes, tag) {
|
|
13228
|
-
var _a, _b;
|
|
13229
13225
|
const shouldCondense = currentOptions.whitespace !== "preserve";
|
|
13230
13226
|
let removedWhitespace = false;
|
|
13231
13227
|
for (let i = 0; i < nodes.length; i++) {
|
|
@@ -13233,8 +13229,8 @@ function condenseWhitespace(nodes, tag) {
|
|
|
13233
13229
|
if (node.type === 2) {
|
|
13234
13230
|
if (!inPre) {
|
|
13235
13231
|
if (isAllWhitespace(node.content)) {
|
|
13236
|
-
const prev =
|
|
13237
|
-
const next =
|
|
13232
|
+
const prev = nodes[i - 1] && nodes[i - 1].type;
|
|
13233
|
+
const next = nodes[i + 1] && nodes[i + 1].type;
|
|
13238
13234
|
if (!prev || !next || shouldCondense && (prev === 3 && (next === 3 || next === 1) || prev === 1 && (next === 3 || next === 1 && hasNewlineChar(node.content)))) {
|
|
13239
13235
|
removedWhitespace = true;
|
|
13240
13236
|
nodes[i] = null;
|
|
@@ -13372,7 +13368,7 @@ function baseParse(input, options) {
|
|
|
13372
13368
|
}
|
|
13373
13369
|
tokenizer.mode = currentOptions.parseMode === "html" ? 1 : currentOptions.parseMode === "sfc" ? 2 : 0;
|
|
13374
13370
|
tokenizer.inXML = currentOptions.ns === 1 || currentOptions.ns === 2;
|
|
13375
|
-
const delimiters = options
|
|
13371
|
+
const delimiters = options && options.delimiters;
|
|
13376
13372
|
if (delimiters) {
|
|
13377
13373
|
tokenizer.delimiterOpen = toCharCodes(delimiters[0]);
|
|
13378
13374
|
tokenizer.delimiterClose = toCharCodes(delimiters[1]);
|