@vue/compat 3.5.0-alpha.1 → 3.5.0-alpha.2
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 +68 -52
- package/dist/vue.cjs.prod.js +63 -52
- package/dist/vue.esm-browser.js +67 -50
- package/dist/vue.esm-browser.prod.js +6 -6
- package/dist/vue.esm-bundler.js +67 -50
- package/dist/vue.global.js +67 -50
- package/dist/vue.global.prod.js +4 -4
- package/dist/vue.runtime.esm-browser.js +60 -39
- package/dist/vue.runtime.esm-browser.prod.js +5 -5
- package/dist/vue.runtime.esm-bundler.js +60 -39
- package/dist/vue.runtime.global.js +60 -39
- package/dist/vue.runtime.global.prod.js +4 -4
- package/package.json +2 -2
package/dist/vue.esm-bundler.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compat v3.5.0-alpha.
|
|
2
|
+
* @vue/compat v3.5.0-alpha.2
|
|
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
|
};
|
|
@@ -2094,7 +2095,9 @@ const ErrorCodes = {
|
|
|
2094
2095
|
"ASYNC_COMPONENT_LOADER": 13,
|
|
2095
2096
|
"13": "ASYNC_COMPONENT_LOADER",
|
|
2096
2097
|
"SCHEDULER": 14,
|
|
2097
|
-
"14": "SCHEDULER"
|
|
2098
|
+
"14": "SCHEDULER",
|
|
2099
|
+
"APP_UNMOUNT_CLEANUP": 15,
|
|
2100
|
+
"15": "APP_UNMOUNT_CLEANUP"
|
|
2098
2101
|
};
|
|
2099
2102
|
const ErrorTypeStrings$1 = {
|
|
2100
2103
|
["sp"]: "serverPrefetch hook",
|
|
@@ -2125,7 +2128,8 @@ const ErrorTypeStrings$1 = {
|
|
|
2125
2128
|
[11]: "app warnHandler",
|
|
2126
2129
|
[12]: "ref function",
|
|
2127
2130
|
[13]: "async component loader",
|
|
2128
|
-
[14]: "scheduler flush. This is likely a Vue internals bug. Please open an issue at https://github.com/vuejs/core ."
|
|
2131
|
+
[14]: "scheduler flush. This is likely a Vue internals bug. Please open an issue at https://github.com/vuejs/core .",
|
|
2132
|
+
[15]: "app unmount cleanup function"
|
|
2129
2133
|
};
|
|
2130
2134
|
function callWithErrorHandling(fn, instance, type, args) {
|
|
2131
2135
|
try {
|
|
@@ -3351,7 +3355,7 @@ function renderComponentRoot(instance) {
|
|
|
3351
3355
|
!!(process.env.NODE_ENV !== "production") ? {
|
|
3352
3356
|
get attrs() {
|
|
3353
3357
|
markAttrsAccessed();
|
|
3354
|
-
return attrs;
|
|
3358
|
+
return shallowReadonly(attrs);
|
|
3355
3359
|
},
|
|
3356
3360
|
slots,
|
|
3357
3361
|
emit
|
|
@@ -3384,7 +3388,7 @@ function renderComponentRoot(instance) {
|
|
|
3384
3388
|
propsOptions
|
|
3385
3389
|
);
|
|
3386
3390
|
}
|
|
3387
|
-
root = cloneVNode(root, fallthroughAttrs);
|
|
3391
|
+
root = cloneVNode(root, fallthroughAttrs, false, true);
|
|
3388
3392
|
} else if (!!(process.env.NODE_ENV !== "production") && !accessedAttrs && root.type !== Comment) {
|
|
3389
3393
|
const allAttrs = Object.keys(attrs);
|
|
3390
3394
|
const eventAttrs = [];
|
|
@@ -3422,10 +3426,15 @@ function renderComponentRoot(instance) {
|
|
|
3422
3426
|
getComponentName(instance.type)
|
|
3423
3427
|
);
|
|
3424
3428
|
}
|
|
3425
|
-
root = cloneVNode(
|
|
3426
|
-
|
|
3427
|
-
|
|
3428
|
-
|
|
3429
|
+
root = cloneVNode(
|
|
3430
|
+
root,
|
|
3431
|
+
{
|
|
3432
|
+
class: cls,
|
|
3433
|
+
style
|
|
3434
|
+
},
|
|
3435
|
+
false,
|
|
3436
|
+
true
|
|
3437
|
+
);
|
|
3429
3438
|
}
|
|
3430
3439
|
}
|
|
3431
3440
|
if (vnode.dirs) {
|
|
@@ -3434,7 +3443,7 @@ function renderComponentRoot(instance) {
|
|
|
3434
3443
|
`Runtime directive used on component with non-element root node. The directives will not function as intended.`
|
|
3435
3444
|
);
|
|
3436
3445
|
}
|
|
3437
|
-
root = cloneVNode(root);
|
|
3446
|
+
root = cloneVNode(root, null, false, true);
|
|
3438
3447
|
root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs;
|
|
3439
3448
|
}
|
|
3440
3449
|
if (vnode.transition) {
|
|
@@ -3929,7 +3938,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
3929
3938
|
let parentSuspenseId;
|
|
3930
3939
|
const isSuspensible = isVNodeSuspensible(vnode);
|
|
3931
3940
|
if (isSuspensible) {
|
|
3932
|
-
if (parentSuspense
|
|
3941
|
+
if (parentSuspense && parentSuspense.pendingBranch) {
|
|
3933
3942
|
parentSuspenseId = parentSuspense.pendingId;
|
|
3934
3943
|
parentSuspense.deps++;
|
|
3935
3944
|
}
|
|
@@ -4241,8 +4250,8 @@ function setActiveBranch(suspense, branch) {
|
|
|
4241
4250
|
}
|
|
4242
4251
|
}
|
|
4243
4252
|
function isVNodeSuspensible(vnode) {
|
|
4244
|
-
|
|
4245
|
-
return
|
|
4253
|
+
const suspensible = vnode.props && vnode.props.suspensible;
|
|
4254
|
+
return suspensible != null && suspensible !== false;
|
|
4246
4255
|
}
|
|
4247
4256
|
|
|
4248
4257
|
const legacyDirectiveHookMap = {
|
|
@@ -4547,34 +4556,29 @@ function createPathGetter(ctx, path) {
|
|
|
4547
4556
|
return cur;
|
|
4548
4557
|
};
|
|
4549
4558
|
}
|
|
4550
|
-
function traverse(value, depth
|
|
4551
|
-
if (!isObject(value) || value["__v_skip"]) {
|
|
4559
|
+
function traverse(value, depth = Infinity, seen) {
|
|
4560
|
+
if (depth <= 0 || !isObject(value) || value["__v_skip"]) {
|
|
4552
4561
|
return value;
|
|
4553
4562
|
}
|
|
4554
|
-
if (depth && depth > 0) {
|
|
4555
|
-
if (currentDepth >= depth) {
|
|
4556
|
-
return value;
|
|
4557
|
-
}
|
|
4558
|
-
currentDepth++;
|
|
4559
|
-
}
|
|
4560
4563
|
seen = seen || /* @__PURE__ */ new Set();
|
|
4561
4564
|
if (seen.has(value)) {
|
|
4562
4565
|
return value;
|
|
4563
4566
|
}
|
|
4564
4567
|
seen.add(value);
|
|
4568
|
+
depth--;
|
|
4565
4569
|
if (isRef(value)) {
|
|
4566
|
-
traverse(value.value, depth,
|
|
4570
|
+
traverse(value.value, depth, seen);
|
|
4567
4571
|
} else if (isArray(value)) {
|
|
4568
4572
|
for (let i = 0; i < value.length; i++) {
|
|
4569
|
-
traverse(value[i], depth,
|
|
4573
|
+
traverse(value[i], depth, seen);
|
|
4570
4574
|
}
|
|
4571
4575
|
} else if (isSet(value) || isMap(value)) {
|
|
4572
4576
|
value.forEach((v) => {
|
|
4573
|
-
traverse(v, depth,
|
|
4577
|
+
traverse(v, depth, seen);
|
|
4574
4578
|
});
|
|
4575
4579
|
} else if (isPlainObject(value)) {
|
|
4576
4580
|
for (const key in value) {
|
|
4577
|
-
traverse(value[key], depth,
|
|
4581
|
+
traverse(value[key], depth, seen);
|
|
4578
4582
|
}
|
|
4579
4583
|
}
|
|
4580
4584
|
return value;
|
|
@@ -4720,7 +4724,7 @@ const BaseTransitionImpl = {
|
|
|
4720
4724
|
instance
|
|
4721
4725
|
);
|
|
4722
4726
|
setTransitionHooks(oldInnerChild, leavingHooks);
|
|
4723
|
-
if (mode === "out-in") {
|
|
4727
|
+
if (mode === "out-in" && innerChild.type !== Comment) {
|
|
4724
4728
|
state.isLeaving = true;
|
|
4725
4729
|
leavingHooks.afterLeave = () => {
|
|
4726
4730
|
state.isLeaving = false;
|
|
@@ -5266,7 +5270,7 @@ const KeepAliveImpl = {
|
|
|
5266
5270
|
return () => {
|
|
5267
5271
|
pendingCacheKey = null;
|
|
5268
5272
|
if (!slots.default) {
|
|
5269
|
-
return
|
|
5273
|
+
return null;
|
|
5270
5274
|
}
|
|
5271
5275
|
const children = slots.default();
|
|
5272
5276
|
const rawVNode = children[0];
|
|
@@ -6973,13 +6977,13 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
6973
6977
|
return vm;
|
|
6974
6978
|
}
|
|
6975
6979
|
}
|
|
6976
|
-
Vue.version = `2.6.14-compat:${"3.5.0-alpha.
|
|
6980
|
+
Vue.version = `2.6.14-compat:${"3.5.0-alpha.2"}`;
|
|
6977
6981
|
Vue.config = singletonApp.config;
|
|
6978
|
-
Vue.use = (
|
|
6979
|
-
if (
|
|
6980
|
-
|
|
6981
|
-
} else if (isFunction(
|
|
6982
|
-
|
|
6982
|
+
Vue.use = (plugin, ...options) => {
|
|
6983
|
+
if (plugin && isFunction(plugin.install)) {
|
|
6984
|
+
plugin.install(Vue, ...options);
|
|
6985
|
+
} else if (isFunction(plugin)) {
|
|
6986
|
+
plugin(Vue, ...options);
|
|
6983
6987
|
}
|
|
6984
6988
|
return Vue;
|
|
6985
6989
|
};
|
|
@@ -7379,6 +7383,7 @@ function createAppAPI(render, hydrate) {
|
|
|
7379
7383
|
}
|
|
7380
7384
|
const context = createAppContext();
|
|
7381
7385
|
const installedPlugins = /* @__PURE__ */ new WeakSet();
|
|
7386
|
+
const pluginCleanupFns = [];
|
|
7382
7387
|
let isMounted = false;
|
|
7383
7388
|
const app = context.app = {
|
|
7384
7389
|
_uid: uid$1++,
|
|
@@ -7498,8 +7503,21 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
7498
7503
|
);
|
|
7499
7504
|
}
|
|
7500
7505
|
},
|
|
7506
|
+
onUnmount(cleanupFn) {
|
|
7507
|
+
if (!!(process.env.NODE_ENV !== "production") && typeof cleanupFn !== "function") {
|
|
7508
|
+
warn$1(
|
|
7509
|
+
`Expected function as first argument to app.onUnmount(), but got ${typeof cleanupFn}`
|
|
7510
|
+
);
|
|
7511
|
+
}
|
|
7512
|
+
pluginCleanupFns.push(cleanupFn);
|
|
7513
|
+
},
|
|
7501
7514
|
unmount() {
|
|
7502
7515
|
if (isMounted) {
|
|
7516
|
+
callWithAsyncErrorHandling(
|
|
7517
|
+
pluginCleanupFns,
|
|
7518
|
+
app._instance,
|
|
7519
|
+
15
|
|
7520
|
+
);
|
|
7503
7521
|
render(null, app._container);
|
|
7504
7522
|
if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) {
|
|
7505
7523
|
app._instance = null;
|
|
@@ -8100,7 +8118,7 @@ const initSlots = (instance, children) => {
|
|
|
8100
8118
|
const type = children._;
|
|
8101
8119
|
if (type) {
|
|
8102
8120
|
extend(slots, children);
|
|
8103
|
-
def(slots, "_", type);
|
|
8121
|
+
def(slots, "_", type, true);
|
|
8104
8122
|
} else {
|
|
8105
8123
|
normalizeObjectSlots(children, slots, instance);
|
|
8106
8124
|
}
|
|
@@ -10986,8 +11004,8 @@ function guardReactiveProps(props) {
|
|
|
10986
11004
|
return null;
|
|
10987
11005
|
return isProxy(props) || isInternalObject(props) ? extend({}, props) : props;
|
|
10988
11006
|
}
|
|
10989
|
-
function cloneVNode(vnode, extraProps, mergeRef = false) {
|
|
10990
|
-
const { props, ref, patchFlag, children } = vnode;
|
|
11007
|
+
function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false) {
|
|
11008
|
+
const { props, ref, patchFlag, children, transition } = vnode;
|
|
10991
11009
|
const mergedProps = extraProps ? mergeProps(props || {}, extraProps) : props;
|
|
10992
11010
|
const cloned = {
|
|
10993
11011
|
__v_isVNode: true,
|
|
@@ -11017,7 +11035,7 @@ function cloneVNode(vnode, extraProps, mergeRef = false) {
|
|
|
11017
11035
|
dynamicChildren: vnode.dynamicChildren,
|
|
11018
11036
|
appContext: vnode.appContext,
|
|
11019
11037
|
dirs: vnode.dirs,
|
|
11020
|
-
transition
|
|
11038
|
+
transition,
|
|
11021
11039
|
// These should technically only be non-null on mounted VNodes. However,
|
|
11022
11040
|
// they *should* be copied for kept-alive vnodes. So we just always copy
|
|
11023
11041
|
// them since them being non-null during a mount doesn't affect the logic as
|
|
@@ -11031,6 +11049,9 @@ function cloneVNode(vnode, extraProps, mergeRef = false) {
|
|
|
11031
11049
|
ctx: vnode.ctx,
|
|
11032
11050
|
ce: vnode.ce
|
|
11033
11051
|
};
|
|
11052
|
+
if (transition && cloneTransition) {
|
|
11053
|
+
cloned.transition = transition.clone(cloned);
|
|
11054
|
+
}
|
|
11034
11055
|
{
|
|
11035
11056
|
defineLegacyVNodeProperties(cloned);
|
|
11036
11057
|
}
|
|
@@ -11886,7 +11907,7 @@ function isMemoSame(cached, memo) {
|
|
|
11886
11907
|
return true;
|
|
11887
11908
|
}
|
|
11888
11909
|
|
|
11889
|
-
const version = "3.5.0-alpha.
|
|
11910
|
+
const version = "3.5.0-alpha.2";
|
|
11890
11911
|
const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
|
|
11891
11912
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
11892
11913
|
const devtools = !!(process.env.NODE_ENV !== "production") || true ? devtools$1 : void 0;
|
|
@@ -15364,11 +15385,10 @@ const tokenizer = new Tokenizer(stack, {
|
|
|
15364
15385
|
}
|
|
15365
15386
|
},
|
|
15366
15387
|
onselfclosingtag(end) {
|
|
15367
|
-
var _a;
|
|
15368
15388
|
const name = currentOpenTag.tag;
|
|
15369
15389
|
currentOpenTag.isSelfClosing = true;
|
|
15370
15390
|
endOpenTag(end);
|
|
15371
|
-
if (
|
|
15391
|
+
if (stack[0] && stack[0].tag === name) {
|
|
15372
15392
|
onCloseTag(stack.shift(), end);
|
|
15373
15393
|
}
|
|
15374
15394
|
},
|
|
@@ -15679,16 +15699,15 @@ function endOpenTag(end) {
|
|
|
15679
15699
|
currentOpenTag = null;
|
|
15680
15700
|
}
|
|
15681
15701
|
function onText(content, start, end) {
|
|
15682
|
-
var _a;
|
|
15683
15702
|
{
|
|
15684
|
-
const tag =
|
|
15703
|
+
const tag = stack[0] && stack[0].tag;
|
|
15685
15704
|
if (tag !== "script" && tag !== "style" && content.includes("&")) {
|
|
15686
15705
|
content = currentOptions.decodeEntities(content, false);
|
|
15687
15706
|
}
|
|
15688
15707
|
}
|
|
15689
15708
|
const parent = stack[0] || currentRoot;
|
|
15690
15709
|
const lastNode = parent.children[parent.children.length - 1];
|
|
15691
|
-
if (
|
|
15710
|
+
if (lastNode && lastNode.type === 2) {
|
|
15692
15711
|
lastNode.content += content;
|
|
15693
15712
|
setLocEnd(lastNode.loc, end);
|
|
15694
15713
|
} else {
|
|
@@ -15822,11 +15841,10 @@ function isFragmentTemplate({ tag, props }) {
|
|
|
15822
15841
|
return false;
|
|
15823
15842
|
}
|
|
15824
15843
|
function isComponent({ tag, props }) {
|
|
15825
|
-
var _a;
|
|
15826
15844
|
if (currentOptions.isCustomElement(tag)) {
|
|
15827
15845
|
return false;
|
|
15828
15846
|
}
|
|
15829
|
-
if (tag === "component" || isUpperCase(tag.charCodeAt(0)) || isCoreComponent(tag) ||
|
|
15847
|
+
if (tag === "component" || isUpperCase(tag.charCodeAt(0)) || isCoreComponent(tag) || currentOptions.isBuiltInComponent && currentOptions.isBuiltInComponent(tag) || currentOptions.isNativeTag && !currentOptions.isNativeTag(tag)) {
|
|
15830
15848
|
return true;
|
|
15831
15849
|
}
|
|
15832
15850
|
for (let i = 0; i < props.length; i++) {
|
|
@@ -15859,7 +15877,6 @@ function isUpperCase(c) {
|
|
|
15859
15877
|
}
|
|
15860
15878
|
const windowsNewlineRE = /\r\n/g;
|
|
15861
15879
|
function condenseWhitespace(nodes, tag) {
|
|
15862
|
-
var _a, _b;
|
|
15863
15880
|
const shouldCondense = currentOptions.whitespace !== "preserve";
|
|
15864
15881
|
let removedWhitespace = false;
|
|
15865
15882
|
for (let i = 0; i < nodes.length; i++) {
|
|
@@ -15867,8 +15884,8 @@ function condenseWhitespace(nodes, tag) {
|
|
|
15867
15884
|
if (node.type === 2) {
|
|
15868
15885
|
if (!inPre) {
|
|
15869
15886
|
if (isAllWhitespace(node.content)) {
|
|
15870
|
-
const prev =
|
|
15871
|
-
const next =
|
|
15887
|
+
const prev = nodes[i - 1] && nodes[i - 1].type;
|
|
15888
|
+
const next = nodes[i + 1] && nodes[i + 1].type;
|
|
15872
15889
|
if (!prev || !next || shouldCondense && (prev === 3 && (next === 3 || next === 1) || prev === 1 && (next === 3 || next === 1 && hasNewlineChar(node.content)))) {
|
|
15873
15890
|
removedWhitespace = true;
|
|
15874
15891
|
nodes[i] = null;
|
|
@@ -16006,7 +16023,7 @@ function baseParse(input, options) {
|
|
|
16006
16023
|
}
|
|
16007
16024
|
tokenizer.mode = currentOptions.parseMode === "html" ? 1 : currentOptions.parseMode === "sfc" ? 2 : 0;
|
|
16008
16025
|
tokenizer.inXML = currentOptions.ns === 1 || currentOptions.ns === 2;
|
|
16009
|
-
const delimiters = options
|
|
16026
|
+
const delimiters = options && options.delimiters;
|
|
16010
16027
|
if (delimiters) {
|
|
16011
16028
|
tokenizer.delimiterOpen = toCharCodes(delimiters[0]);
|
|
16012
16029
|
tokenizer.delimiterClose = toCharCodes(delimiters[1]);
|
package/dist/vue.global.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compat v3.5.0-alpha.
|
|
2
|
+
* @vue/compat v3.5.0-alpha.2
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -84,10 +84,11 @@ var Vue = (function () {
|
|
|
84
84
|
fns[i](arg);
|
|
85
85
|
}
|
|
86
86
|
};
|
|
87
|
-
const def = (obj, key, value) => {
|
|
87
|
+
const def = (obj, key, value, writable = false) => {
|
|
88
88
|
Object.defineProperty(obj, key, {
|
|
89
89
|
configurable: true,
|
|
90
90
|
enumerable: false,
|
|
91
|
+
writable,
|
|
91
92
|
value
|
|
92
93
|
});
|
|
93
94
|
};
|
|
@@ -2085,7 +2086,9 @@ var Vue = (function () {
|
|
|
2085
2086
|
"ASYNC_COMPONENT_LOADER": 13,
|
|
2086
2087
|
"13": "ASYNC_COMPONENT_LOADER",
|
|
2087
2088
|
"SCHEDULER": 14,
|
|
2088
|
-
"14": "SCHEDULER"
|
|
2089
|
+
"14": "SCHEDULER",
|
|
2090
|
+
"APP_UNMOUNT_CLEANUP": 15,
|
|
2091
|
+
"15": "APP_UNMOUNT_CLEANUP"
|
|
2089
2092
|
};
|
|
2090
2093
|
const ErrorTypeStrings$1 = {
|
|
2091
2094
|
["sp"]: "serverPrefetch hook",
|
|
@@ -2116,7 +2119,8 @@ var Vue = (function () {
|
|
|
2116
2119
|
[11]: "app warnHandler",
|
|
2117
2120
|
[12]: "ref function",
|
|
2118
2121
|
[13]: "async component loader",
|
|
2119
|
-
[14]: "scheduler flush. This is likely a Vue internals bug. Please open an issue at https://github.com/vuejs/core ."
|
|
2122
|
+
[14]: "scheduler flush. This is likely a Vue internals bug. Please open an issue at https://github.com/vuejs/core .",
|
|
2123
|
+
[15]: "app unmount cleanup function"
|
|
2120
2124
|
};
|
|
2121
2125
|
function callWithErrorHandling(fn, instance, type, args) {
|
|
2122
2126
|
try {
|
|
@@ -3337,7 +3341,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
3337
3341
|
true ? {
|
|
3338
3342
|
get attrs() {
|
|
3339
3343
|
markAttrsAccessed();
|
|
3340
|
-
return attrs;
|
|
3344
|
+
return shallowReadonly(attrs);
|
|
3341
3345
|
},
|
|
3342
3346
|
slots,
|
|
3343
3347
|
emit
|
|
@@ -3370,7 +3374,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
3370
3374
|
propsOptions
|
|
3371
3375
|
);
|
|
3372
3376
|
}
|
|
3373
|
-
root = cloneVNode(root, fallthroughAttrs);
|
|
3377
|
+
root = cloneVNode(root, fallthroughAttrs, false, true);
|
|
3374
3378
|
} else if (!accessedAttrs && root.type !== Comment) {
|
|
3375
3379
|
const allAttrs = Object.keys(attrs);
|
|
3376
3380
|
const eventAttrs = [];
|
|
@@ -3408,10 +3412,15 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
3408
3412
|
getComponentName(instance.type)
|
|
3409
3413
|
);
|
|
3410
3414
|
}
|
|
3411
|
-
root = cloneVNode(
|
|
3412
|
-
|
|
3413
|
-
|
|
3414
|
-
|
|
3415
|
+
root = cloneVNode(
|
|
3416
|
+
root,
|
|
3417
|
+
{
|
|
3418
|
+
class: cls,
|
|
3419
|
+
style
|
|
3420
|
+
},
|
|
3421
|
+
false,
|
|
3422
|
+
true
|
|
3423
|
+
);
|
|
3415
3424
|
}
|
|
3416
3425
|
}
|
|
3417
3426
|
if (vnode.dirs) {
|
|
@@ -3420,7 +3429,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
3420
3429
|
`Runtime directive used on component with non-element root node. The directives will not function as intended.`
|
|
3421
3430
|
);
|
|
3422
3431
|
}
|
|
3423
|
-
root = cloneVNode(root);
|
|
3432
|
+
root = cloneVNode(root, null, false, true);
|
|
3424
3433
|
root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs;
|
|
3425
3434
|
}
|
|
3426
3435
|
if (vnode.transition) {
|
|
@@ -3915,7 +3924,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
3915
3924
|
let parentSuspenseId;
|
|
3916
3925
|
const isSuspensible = isVNodeSuspensible(vnode);
|
|
3917
3926
|
if (isSuspensible) {
|
|
3918
|
-
if (parentSuspense
|
|
3927
|
+
if (parentSuspense && parentSuspense.pendingBranch) {
|
|
3919
3928
|
parentSuspenseId = parentSuspense.pendingId;
|
|
3920
3929
|
parentSuspense.deps++;
|
|
3921
3930
|
}
|
|
@@ -4227,8 +4236,8 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
4227
4236
|
}
|
|
4228
4237
|
}
|
|
4229
4238
|
function isVNodeSuspensible(vnode) {
|
|
4230
|
-
|
|
4231
|
-
return
|
|
4239
|
+
const suspensible = vnode.props && vnode.props.suspensible;
|
|
4240
|
+
return suspensible != null && suspensible !== false;
|
|
4232
4241
|
}
|
|
4233
4242
|
|
|
4234
4243
|
const legacyDirectiveHookMap = {
|
|
@@ -4506,34 +4515,29 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
4506
4515
|
return cur;
|
|
4507
4516
|
};
|
|
4508
4517
|
}
|
|
4509
|
-
function traverse(value, depth
|
|
4510
|
-
if (!isObject(value) || value["__v_skip"]) {
|
|
4518
|
+
function traverse(value, depth = Infinity, seen) {
|
|
4519
|
+
if (depth <= 0 || !isObject(value) || value["__v_skip"]) {
|
|
4511
4520
|
return value;
|
|
4512
4521
|
}
|
|
4513
|
-
if (depth && depth > 0) {
|
|
4514
|
-
if (currentDepth >= depth) {
|
|
4515
|
-
return value;
|
|
4516
|
-
}
|
|
4517
|
-
currentDepth++;
|
|
4518
|
-
}
|
|
4519
4522
|
seen = seen || /* @__PURE__ */ new Set();
|
|
4520
4523
|
if (seen.has(value)) {
|
|
4521
4524
|
return value;
|
|
4522
4525
|
}
|
|
4523
4526
|
seen.add(value);
|
|
4527
|
+
depth--;
|
|
4524
4528
|
if (isRef(value)) {
|
|
4525
|
-
traverse(value.value, depth,
|
|
4529
|
+
traverse(value.value, depth, seen);
|
|
4526
4530
|
} else if (isArray(value)) {
|
|
4527
4531
|
for (let i = 0; i < value.length; i++) {
|
|
4528
|
-
traverse(value[i], depth,
|
|
4532
|
+
traverse(value[i], depth, seen);
|
|
4529
4533
|
}
|
|
4530
4534
|
} else if (isSet(value) || isMap(value)) {
|
|
4531
4535
|
value.forEach((v) => {
|
|
4532
|
-
traverse(v, depth,
|
|
4536
|
+
traverse(v, depth, seen);
|
|
4533
4537
|
});
|
|
4534
4538
|
} else if (isPlainObject(value)) {
|
|
4535
4539
|
for (const key in value) {
|
|
4536
|
-
traverse(value[key], depth,
|
|
4540
|
+
traverse(value[key], depth, seen);
|
|
4537
4541
|
}
|
|
4538
4542
|
}
|
|
4539
4543
|
return value;
|
|
@@ -4679,7 +4683,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
4679
4683
|
instance
|
|
4680
4684
|
);
|
|
4681
4685
|
setTransitionHooks(oldInnerChild, leavingHooks);
|
|
4682
|
-
if (mode === "out-in") {
|
|
4686
|
+
if (mode === "out-in" && innerChild.type !== Comment) {
|
|
4683
4687
|
state.isLeaving = true;
|
|
4684
4688
|
leavingHooks.afterLeave = () => {
|
|
4685
4689
|
state.isLeaving = false;
|
|
@@ -5217,7 +5221,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
5217
5221
|
return () => {
|
|
5218
5222
|
pendingCacheKey = null;
|
|
5219
5223
|
if (!slots.default) {
|
|
5220
|
-
return
|
|
5224
|
+
return null;
|
|
5221
5225
|
}
|
|
5222
5226
|
const children = slots.default();
|
|
5223
5227
|
const rawVNode = children[0];
|
|
@@ -6922,13 +6926,13 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
6922
6926
|
return vm;
|
|
6923
6927
|
}
|
|
6924
6928
|
}
|
|
6925
|
-
Vue.version = `2.6.14-compat:${"3.5.0-alpha.
|
|
6929
|
+
Vue.version = `2.6.14-compat:${"3.5.0-alpha.2"}`;
|
|
6926
6930
|
Vue.config = singletonApp.config;
|
|
6927
|
-
Vue.use = (
|
|
6928
|
-
if (
|
|
6929
|
-
|
|
6930
|
-
} else if (isFunction(
|
|
6931
|
-
|
|
6931
|
+
Vue.use = (plugin, ...options) => {
|
|
6932
|
+
if (plugin && isFunction(plugin.install)) {
|
|
6933
|
+
plugin.install(Vue, ...options);
|
|
6934
|
+
} else if (isFunction(plugin)) {
|
|
6935
|
+
plugin(Vue, ...options);
|
|
6932
6936
|
}
|
|
6933
6937
|
return Vue;
|
|
6934
6938
|
};
|
|
@@ -7327,6 +7331,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
7327
7331
|
}
|
|
7328
7332
|
const context = createAppContext();
|
|
7329
7333
|
const installedPlugins = /* @__PURE__ */ new WeakSet();
|
|
7334
|
+
const pluginCleanupFns = [];
|
|
7330
7335
|
let isMounted = false;
|
|
7331
7336
|
const app = context.app = {
|
|
7332
7337
|
_uid: uid$1++,
|
|
@@ -7444,8 +7449,21 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
7444
7449
|
);
|
|
7445
7450
|
}
|
|
7446
7451
|
},
|
|
7452
|
+
onUnmount(cleanupFn) {
|
|
7453
|
+
if (typeof cleanupFn !== "function") {
|
|
7454
|
+
warn$1(
|
|
7455
|
+
`Expected function as first argument to app.onUnmount(), but got ${typeof cleanupFn}`
|
|
7456
|
+
);
|
|
7457
|
+
}
|
|
7458
|
+
pluginCleanupFns.push(cleanupFn);
|
|
7459
|
+
},
|
|
7447
7460
|
unmount() {
|
|
7448
7461
|
if (isMounted) {
|
|
7462
|
+
callWithAsyncErrorHandling(
|
|
7463
|
+
pluginCleanupFns,
|
|
7464
|
+
app._instance,
|
|
7465
|
+
15
|
|
7466
|
+
);
|
|
7449
7467
|
render(null, app._container);
|
|
7450
7468
|
{
|
|
7451
7469
|
app._instance = null;
|
|
@@ -8046,7 +8064,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
8046
8064
|
const type = children._;
|
|
8047
8065
|
if (type) {
|
|
8048
8066
|
extend(slots, children);
|
|
8049
|
-
def(slots, "_", type);
|
|
8067
|
+
def(slots, "_", type, true);
|
|
8050
8068
|
} else {
|
|
8051
8069
|
normalizeObjectSlots(children, slots, instance);
|
|
8052
8070
|
}
|
|
@@ -10884,8 +10902,8 @@ Component that was made reactive: `,
|
|
|
10884
10902
|
return null;
|
|
10885
10903
|
return isProxy(props) || isInternalObject(props) ? extend({}, props) : props;
|
|
10886
10904
|
}
|
|
10887
|
-
function cloneVNode(vnode, extraProps, mergeRef = false) {
|
|
10888
|
-
const { props, ref, patchFlag, children } = vnode;
|
|
10905
|
+
function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false) {
|
|
10906
|
+
const { props, ref, patchFlag, children, transition } = vnode;
|
|
10889
10907
|
const mergedProps = extraProps ? mergeProps(props || {}, extraProps) : props;
|
|
10890
10908
|
const cloned = {
|
|
10891
10909
|
__v_isVNode: true,
|
|
@@ -10915,7 +10933,7 @@ Component that was made reactive: `,
|
|
|
10915
10933
|
dynamicChildren: vnode.dynamicChildren,
|
|
10916
10934
|
appContext: vnode.appContext,
|
|
10917
10935
|
dirs: vnode.dirs,
|
|
10918
|
-
transition
|
|
10936
|
+
transition,
|
|
10919
10937
|
// These should technically only be non-null on mounted VNodes. However,
|
|
10920
10938
|
// they *should* be copied for kept-alive vnodes. So we just always copy
|
|
10921
10939
|
// them since them being non-null during a mount doesn't affect the logic as
|
|
@@ -10929,6 +10947,9 @@ Component that was made reactive: `,
|
|
|
10929
10947
|
ctx: vnode.ctx,
|
|
10930
10948
|
ce: vnode.ce
|
|
10931
10949
|
};
|
|
10950
|
+
if (transition && cloneTransition) {
|
|
10951
|
+
cloned.transition = transition.clone(cloned);
|
|
10952
|
+
}
|
|
10932
10953
|
{
|
|
10933
10954
|
defineLegacyVNodeProperties(cloned);
|
|
10934
10955
|
}
|
|
@@ -11753,7 +11774,7 @@ Component that was made reactive: `,
|
|
|
11753
11774
|
return true;
|
|
11754
11775
|
}
|
|
11755
11776
|
|
|
11756
|
-
const version = "3.5.0-alpha.
|
|
11777
|
+
const version = "3.5.0-alpha.2";
|
|
11757
11778
|
const warn = warn$1 ;
|
|
11758
11779
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
11759
11780
|
const devtools = devtools$1 ;
|
|
@@ -15169,11 +15190,10 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
15169
15190
|
}
|
|
15170
15191
|
},
|
|
15171
15192
|
onselfclosingtag(end) {
|
|
15172
|
-
var _a;
|
|
15173
15193
|
const name = currentOpenTag.tag;
|
|
15174
15194
|
currentOpenTag.isSelfClosing = true;
|
|
15175
15195
|
endOpenTag(end);
|
|
15176
|
-
if (
|
|
15196
|
+
if (stack[0] && stack[0].tag === name) {
|
|
15177
15197
|
onCloseTag(stack.shift(), end);
|
|
15178
15198
|
}
|
|
15179
15199
|
},
|
|
@@ -15484,16 +15504,15 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
15484
15504
|
currentOpenTag = null;
|
|
15485
15505
|
}
|
|
15486
15506
|
function onText(content, start, end) {
|
|
15487
|
-
var _a;
|
|
15488
15507
|
{
|
|
15489
|
-
const tag =
|
|
15508
|
+
const tag = stack[0] && stack[0].tag;
|
|
15490
15509
|
if (tag !== "script" && tag !== "style" && content.includes("&")) {
|
|
15491
15510
|
content = currentOptions.decodeEntities(content, false);
|
|
15492
15511
|
}
|
|
15493
15512
|
}
|
|
15494
15513
|
const parent = stack[0] || currentRoot;
|
|
15495
15514
|
const lastNode = parent.children[parent.children.length - 1];
|
|
15496
|
-
if (
|
|
15515
|
+
if (lastNode && lastNode.type === 2) {
|
|
15497
15516
|
lastNode.content += content;
|
|
15498
15517
|
setLocEnd(lastNode.loc, end);
|
|
15499
15518
|
} else {
|
|
@@ -15627,11 +15646,10 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
15627
15646
|
return false;
|
|
15628
15647
|
}
|
|
15629
15648
|
function isComponent({ tag, props }) {
|
|
15630
|
-
var _a;
|
|
15631
15649
|
if (currentOptions.isCustomElement(tag)) {
|
|
15632
15650
|
return false;
|
|
15633
15651
|
}
|
|
15634
|
-
if (tag === "component" || isUpperCase(tag.charCodeAt(0)) || isCoreComponent(tag) ||
|
|
15652
|
+
if (tag === "component" || isUpperCase(tag.charCodeAt(0)) || isCoreComponent(tag) || currentOptions.isBuiltInComponent && currentOptions.isBuiltInComponent(tag) || currentOptions.isNativeTag && !currentOptions.isNativeTag(tag)) {
|
|
15635
15653
|
return true;
|
|
15636
15654
|
}
|
|
15637
15655
|
for (let i = 0; i < props.length; i++) {
|
|
@@ -15664,7 +15682,6 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
15664
15682
|
}
|
|
15665
15683
|
const windowsNewlineRE = /\r\n/g;
|
|
15666
15684
|
function condenseWhitespace(nodes, tag) {
|
|
15667
|
-
var _a, _b;
|
|
15668
15685
|
const shouldCondense = currentOptions.whitespace !== "preserve";
|
|
15669
15686
|
let removedWhitespace = false;
|
|
15670
15687
|
for (let i = 0; i < nodes.length; i++) {
|
|
@@ -15672,8 +15689,8 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
15672
15689
|
if (node.type === 2) {
|
|
15673
15690
|
if (!inPre) {
|
|
15674
15691
|
if (isAllWhitespace(node.content)) {
|
|
15675
|
-
const prev =
|
|
15676
|
-
const next =
|
|
15692
|
+
const prev = nodes[i - 1] && nodes[i - 1].type;
|
|
15693
|
+
const next = nodes[i + 1] && nodes[i + 1].type;
|
|
15677
15694
|
if (!prev || !next || shouldCondense && (prev === 3 && (next === 3 || next === 1) || prev === 1 && (next === 3 || next === 1 && hasNewlineChar(node.content)))) {
|
|
15678
15695
|
removedWhitespace = true;
|
|
15679
15696
|
nodes[i] = null;
|
|
@@ -15811,7 +15828,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
15811
15828
|
}
|
|
15812
15829
|
tokenizer.mode = currentOptions.parseMode === "html" ? 1 : currentOptions.parseMode === "sfc" ? 2 : 0;
|
|
15813
15830
|
tokenizer.inXML = currentOptions.ns === 1 || currentOptions.ns === 2;
|
|
15814
|
-
const delimiters = options
|
|
15831
|
+
const delimiters = options && options.delimiters;
|
|
15815
15832
|
if (delimiters) {
|
|
15816
15833
|
tokenizer.delimiterOpen = toCharCodes(delimiters[0]);
|
|
15817
15834
|
tokenizer.delimiterClose = toCharCodes(delimiters[1]);
|