@vue/compat 3.4.25 → 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 +52 -54
- package/dist/vue.cjs.prod.js +52 -54
- package/dist/vue.esm-browser.js +51 -52
- package/dist/vue.esm-browser.prod.js +4 -4
- package/dist/vue.esm-bundler.js +51 -52
- package/dist/vue.global.js +51 -52
- package/dist/vue.global.prod.js +4 -4
- package/dist/vue.runtime.esm-browser.js +44 -41
- package/dist/vue.runtime.esm-browser.prod.js +3 -3
- package/dist/vue.runtime.esm-bundler.js +44 -41
- package/dist/vue.runtime.global.js +44 -41
- package/dist/vue.runtime.global.prod.js +3 -3
- package/package.json +2 -2
package/dist/vue.esm-browser.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compat v3.4.
|
|
2
|
+
* @vue/compat 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`);
|
|
@@ -2971,7 +2971,7 @@ function renderComponentRoot(instance) {
|
|
|
2971
2971
|
true ? {
|
|
2972
2972
|
get attrs() {
|
|
2973
2973
|
markAttrsAccessed();
|
|
2974
|
-
return attrs;
|
|
2974
|
+
return shallowReadonly(attrs);
|
|
2975
2975
|
},
|
|
2976
2976
|
slots,
|
|
2977
2977
|
emit
|
|
@@ -3004,7 +3004,7 @@ function renderComponentRoot(instance) {
|
|
|
3004
3004
|
propsOptions
|
|
3005
3005
|
);
|
|
3006
3006
|
}
|
|
3007
|
-
root = cloneVNode(root, fallthroughAttrs);
|
|
3007
|
+
root = cloneVNode(root, fallthroughAttrs, false, true);
|
|
3008
3008
|
} else if (!accessedAttrs && root.type !== Comment) {
|
|
3009
3009
|
const allAttrs = Object.keys(attrs);
|
|
3010
3010
|
const eventAttrs = [];
|
|
@@ -3042,10 +3042,15 @@ function renderComponentRoot(instance) {
|
|
|
3042
3042
|
getComponentName(instance.type)
|
|
3043
3043
|
);
|
|
3044
3044
|
}
|
|
3045
|
-
root = cloneVNode(
|
|
3046
|
-
|
|
3047
|
-
|
|
3048
|
-
|
|
3045
|
+
root = cloneVNode(
|
|
3046
|
+
root,
|
|
3047
|
+
{
|
|
3048
|
+
class: cls,
|
|
3049
|
+
style
|
|
3050
|
+
},
|
|
3051
|
+
false,
|
|
3052
|
+
true
|
|
3053
|
+
);
|
|
3049
3054
|
}
|
|
3050
3055
|
}
|
|
3051
3056
|
if (vnode.dirs) {
|
|
@@ -3054,7 +3059,7 @@ function renderComponentRoot(instance) {
|
|
|
3054
3059
|
`Runtime directive used on component with non-element root node. The directives will not function as intended.`
|
|
3055
3060
|
);
|
|
3056
3061
|
}
|
|
3057
|
-
root = cloneVNode(root);
|
|
3062
|
+
root = cloneVNode(root, null, false, true);
|
|
3058
3063
|
root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs;
|
|
3059
3064
|
}
|
|
3060
3065
|
if (vnode.transition) {
|
|
@@ -3549,7 +3554,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
3549
3554
|
let parentSuspenseId;
|
|
3550
3555
|
const isSuspensible = isVNodeSuspensible(vnode);
|
|
3551
3556
|
if (isSuspensible) {
|
|
3552
|
-
if (parentSuspense
|
|
3557
|
+
if (parentSuspense && parentSuspense.pendingBranch) {
|
|
3553
3558
|
parentSuspenseId = parentSuspense.pendingId;
|
|
3554
3559
|
parentSuspense.deps++;
|
|
3555
3560
|
}
|
|
@@ -3861,8 +3866,8 @@ function setActiveBranch(suspense, branch) {
|
|
|
3861
3866
|
}
|
|
3862
3867
|
}
|
|
3863
3868
|
function isVNodeSuspensible(vnode) {
|
|
3864
|
-
|
|
3865
|
-
return
|
|
3869
|
+
const suspensible = vnode.props && vnode.props.suspensible;
|
|
3870
|
+
return suspensible != null && suspensible !== false;
|
|
3866
3871
|
}
|
|
3867
3872
|
|
|
3868
3873
|
const legacyDirectiveHookMap = {
|
|
@@ -4143,34 +4148,29 @@ function createPathGetter(ctx, path) {
|
|
|
4143
4148
|
return cur;
|
|
4144
4149
|
};
|
|
4145
4150
|
}
|
|
4146
|
-
function traverse(value, depth
|
|
4147
|
-
if (!isObject(value) || value["__v_skip"]) {
|
|
4151
|
+
function traverse(value, depth = Infinity, seen) {
|
|
4152
|
+
if (depth <= 0 || !isObject(value) || value["__v_skip"]) {
|
|
4148
4153
|
return value;
|
|
4149
4154
|
}
|
|
4150
|
-
if (depth && depth > 0) {
|
|
4151
|
-
if (currentDepth >= depth) {
|
|
4152
|
-
return value;
|
|
4153
|
-
}
|
|
4154
|
-
currentDepth++;
|
|
4155
|
-
}
|
|
4156
4155
|
seen = seen || /* @__PURE__ */ new Set();
|
|
4157
4156
|
if (seen.has(value)) {
|
|
4158
4157
|
return value;
|
|
4159
4158
|
}
|
|
4160
4159
|
seen.add(value);
|
|
4160
|
+
depth--;
|
|
4161
4161
|
if (isRef(value)) {
|
|
4162
|
-
traverse(value.value, depth,
|
|
4162
|
+
traverse(value.value, depth, seen);
|
|
4163
4163
|
} else if (isArray(value)) {
|
|
4164
4164
|
for (let i = 0; i < value.length; i++) {
|
|
4165
|
-
traverse(value[i], depth,
|
|
4165
|
+
traverse(value[i], depth, seen);
|
|
4166
4166
|
}
|
|
4167
4167
|
} else if (isSet(value) || isMap(value)) {
|
|
4168
4168
|
value.forEach((v) => {
|
|
4169
|
-
traverse(v, depth,
|
|
4169
|
+
traverse(v, depth, seen);
|
|
4170
4170
|
});
|
|
4171
4171
|
} else if (isPlainObject(value)) {
|
|
4172
4172
|
for (const key in value) {
|
|
4173
|
-
traverse(value[key], depth,
|
|
4173
|
+
traverse(value[key], depth, seen);
|
|
4174
4174
|
}
|
|
4175
4175
|
}
|
|
4176
4176
|
return value;
|
|
@@ -4331,7 +4331,7 @@ const BaseTransitionImpl = {
|
|
|
4331
4331
|
instance
|
|
4332
4332
|
);
|
|
4333
4333
|
setTransitionHooks(oldInnerChild, leavingHooks);
|
|
4334
|
-
if (mode === "out-in") {
|
|
4334
|
+
if (mode === "out-in" && innerChild.type !== Comment) {
|
|
4335
4335
|
state.isLeaving = true;
|
|
4336
4336
|
leavingHooks.afterLeave = () => {
|
|
4337
4337
|
state.isLeaving = false;
|
|
@@ -4849,7 +4849,7 @@ const KeepAliveImpl = {
|
|
|
4849
4849
|
return () => {
|
|
4850
4850
|
pendingCacheKey = null;
|
|
4851
4851
|
if (!slots.default) {
|
|
4852
|
-
return
|
|
4852
|
+
return null;
|
|
4853
4853
|
}
|
|
4854
4854
|
const children = slots.default();
|
|
4855
4855
|
const rawVNode = children[0];
|
|
@@ -6545,13 +6545,13 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
6545
6545
|
return vm;
|
|
6546
6546
|
}
|
|
6547
6547
|
}
|
|
6548
|
-
Vue.version = `2.6.14-compat:${"3.4.
|
|
6548
|
+
Vue.version = `2.6.14-compat:${"3.4.26"}`;
|
|
6549
6549
|
Vue.config = singletonApp.config;
|
|
6550
|
-
Vue.use = (
|
|
6551
|
-
if (
|
|
6552
|
-
|
|
6553
|
-
} else if (isFunction(
|
|
6554
|
-
|
|
6550
|
+
Vue.use = (plugin, ...options) => {
|
|
6551
|
+
if (plugin && isFunction(plugin.install)) {
|
|
6552
|
+
plugin.install(Vue, ...options);
|
|
6553
|
+
} else if (isFunction(plugin)) {
|
|
6554
|
+
plugin(Vue, ...options);
|
|
6555
6555
|
}
|
|
6556
6556
|
return Vue;
|
|
6557
6557
|
};
|
|
@@ -7669,7 +7669,7 @@ const initSlots = (instance, children) => {
|
|
|
7669
7669
|
const type = children._;
|
|
7670
7670
|
if (type) {
|
|
7671
7671
|
extend(slots, children);
|
|
7672
|
-
def(slots, "_", type);
|
|
7672
|
+
def(slots, "_", type, true);
|
|
7673
7673
|
} else {
|
|
7674
7674
|
normalizeObjectSlots(children, slots, instance);
|
|
7675
7675
|
}
|
|
@@ -10508,8 +10508,8 @@ function guardReactiveProps(props) {
|
|
|
10508
10508
|
return null;
|
|
10509
10509
|
return isProxy(props) || isInternalObject(props) ? extend({}, props) : props;
|
|
10510
10510
|
}
|
|
10511
|
-
function cloneVNode(vnode, extraProps, mergeRef = false) {
|
|
10512
|
-
const { props, ref, patchFlag, children } = vnode;
|
|
10511
|
+
function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false) {
|
|
10512
|
+
const { props, ref, patchFlag, children, transition } = vnode;
|
|
10513
10513
|
const mergedProps = extraProps ? mergeProps(props || {}, extraProps) : props;
|
|
10514
10514
|
const cloned = {
|
|
10515
10515
|
__v_isVNode: true,
|
|
@@ -10539,7 +10539,7 @@ function cloneVNode(vnode, extraProps, mergeRef = false) {
|
|
|
10539
10539
|
dynamicChildren: vnode.dynamicChildren,
|
|
10540
10540
|
appContext: vnode.appContext,
|
|
10541
10541
|
dirs: vnode.dirs,
|
|
10542
|
-
transition
|
|
10542
|
+
transition,
|
|
10543
10543
|
// These should technically only be non-null on mounted VNodes. However,
|
|
10544
10544
|
// they *should* be copied for kept-alive vnodes. So we just always copy
|
|
10545
10545
|
// them since them being non-null during a mount doesn't affect the logic as
|
|
@@ -10553,6 +10553,9 @@ function cloneVNode(vnode, extraProps, mergeRef = false) {
|
|
|
10553
10553
|
ctx: vnode.ctx,
|
|
10554
10554
|
ce: vnode.ce
|
|
10555
10555
|
};
|
|
10556
|
+
if (transition && cloneTransition) {
|
|
10557
|
+
cloned.transition = transition.clone(cloned);
|
|
10558
|
+
}
|
|
10556
10559
|
{
|
|
10557
10560
|
defineLegacyVNodeProperties(cloned);
|
|
10558
10561
|
}
|
|
@@ -11375,7 +11378,7 @@ function isMemoSame(cached, memo) {
|
|
|
11375
11378
|
return true;
|
|
11376
11379
|
}
|
|
11377
11380
|
|
|
11378
|
-
const version = "3.4.
|
|
11381
|
+
const version = "3.4.26";
|
|
11379
11382
|
const warn = warn$1 ;
|
|
11380
11383
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
11381
11384
|
const devtools = devtools$1 ;
|
|
@@ -14801,11 +14804,10 @@ const tokenizer = new Tokenizer(stack, {
|
|
|
14801
14804
|
}
|
|
14802
14805
|
},
|
|
14803
14806
|
onselfclosingtag(end) {
|
|
14804
|
-
var _a;
|
|
14805
14807
|
const name = currentOpenTag.tag;
|
|
14806
14808
|
currentOpenTag.isSelfClosing = true;
|
|
14807
14809
|
endOpenTag(end);
|
|
14808
|
-
if (
|
|
14810
|
+
if (stack[0] && stack[0].tag === name) {
|
|
14809
14811
|
onCloseTag(stack.shift(), end);
|
|
14810
14812
|
}
|
|
14811
14813
|
},
|
|
@@ -15116,16 +15118,15 @@ function endOpenTag(end) {
|
|
|
15116
15118
|
currentOpenTag = null;
|
|
15117
15119
|
}
|
|
15118
15120
|
function onText(content, start, end) {
|
|
15119
|
-
var _a;
|
|
15120
15121
|
{
|
|
15121
|
-
const tag =
|
|
15122
|
+
const tag = stack[0] && stack[0].tag;
|
|
15122
15123
|
if (tag !== "script" && tag !== "style" && content.includes("&")) {
|
|
15123
15124
|
content = currentOptions.decodeEntities(content, false);
|
|
15124
15125
|
}
|
|
15125
15126
|
}
|
|
15126
15127
|
const parent = stack[0] || currentRoot;
|
|
15127
15128
|
const lastNode = parent.children[parent.children.length - 1];
|
|
15128
|
-
if (
|
|
15129
|
+
if (lastNode && lastNode.type === 2) {
|
|
15129
15130
|
lastNode.content += content;
|
|
15130
15131
|
setLocEnd(lastNode.loc, end);
|
|
15131
15132
|
} else {
|
|
@@ -15259,11 +15260,10 @@ function isFragmentTemplate({ tag, props }) {
|
|
|
15259
15260
|
return false;
|
|
15260
15261
|
}
|
|
15261
15262
|
function isComponent({ tag, props }) {
|
|
15262
|
-
var _a;
|
|
15263
15263
|
if (currentOptions.isCustomElement(tag)) {
|
|
15264
15264
|
return false;
|
|
15265
15265
|
}
|
|
15266
|
-
if (tag === "component" || isUpperCase(tag.charCodeAt(0)) || isCoreComponent(tag) ||
|
|
15266
|
+
if (tag === "component" || isUpperCase(tag.charCodeAt(0)) || isCoreComponent(tag) || currentOptions.isBuiltInComponent && currentOptions.isBuiltInComponent(tag) || currentOptions.isNativeTag && !currentOptions.isNativeTag(tag)) {
|
|
15267
15267
|
return true;
|
|
15268
15268
|
}
|
|
15269
15269
|
for (let i = 0; i < props.length; i++) {
|
|
@@ -15296,7 +15296,6 @@ function isUpperCase(c) {
|
|
|
15296
15296
|
}
|
|
15297
15297
|
const windowsNewlineRE = /\r\n/g;
|
|
15298
15298
|
function condenseWhitespace(nodes, tag) {
|
|
15299
|
-
var _a, _b;
|
|
15300
15299
|
const shouldCondense = currentOptions.whitespace !== "preserve";
|
|
15301
15300
|
let removedWhitespace = false;
|
|
15302
15301
|
for (let i = 0; i < nodes.length; i++) {
|
|
@@ -15304,8 +15303,8 @@ function condenseWhitespace(nodes, tag) {
|
|
|
15304
15303
|
if (node.type === 2) {
|
|
15305
15304
|
if (!inPre) {
|
|
15306
15305
|
if (isAllWhitespace(node.content)) {
|
|
15307
|
-
const prev =
|
|
15308
|
-
const next =
|
|
15306
|
+
const prev = nodes[i - 1] && nodes[i - 1].type;
|
|
15307
|
+
const next = nodes[i + 1] && nodes[i + 1].type;
|
|
15309
15308
|
if (!prev || !next || shouldCondense && (prev === 3 && (next === 3 || next === 1) || prev === 1 && (next === 3 || next === 1 && hasNewlineChar(node.content)))) {
|
|
15310
15309
|
removedWhitespace = true;
|
|
15311
15310
|
nodes[i] = null;
|
|
@@ -15443,7 +15442,7 @@ function baseParse(input, options) {
|
|
|
15443
15442
|
}
|
|
15444
15443
|
tokenizer.mode = currentOptions.parseMode === "html" ? 1 : currentOptions.parseMode === "sfc" ? 2 : 0;
|
|
15445
15444
|
tokenizer.inXML = currentOptions.ns === 1 || currentOptions.ns === 2;
|
|
15446
|
-
const delimiters = options
|
|
15445
|
+
const delimiters = options && options.delimiters;
|
|
15447
15446
|
if (delimiters) {
|
|
15448
15447
|
tokenizer.delimiterOpen = toCharCodes(delimiters[0]);
|
|
15449
15448
|
tokenizer.delimiterClose = toCharCodes(delimiters[1]);
|