@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.cjs.prod.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
|
**/
|
|
@@ -88,10 +88,11 @@ const invokeArrayFns = (fns, arg) => {
|
|
|
88
88
|
fns[i](arg);
|
|
89
89
|
}
|
|
90
90
|
};
|
|
91
|
-
const def = (obj, key, value) => {
|
|
91
|
+
const def = (obj, key, value, writable = false) => {
|
|
92
92
|
Object.defineProperty(obj, key, {
|
|
93
93
|
configurable: true,
|
|
94
94
|
enumerable: false,
|
|
95
|
+
writable,
|
|
95
96
|
value
|
|
96
97
|
});
|
|
97
98
|
};
|
|
@@ -1831,7 +1832,9 @@ const ErrorCodes = {
|
|
|
1831
1832
|
"ASYNC_COMPONENT_LOADER": 13,
|
|
1832
1833
|
"13": "ASYNC_COMPONENT_LOADER",
|
|
1833
1834
|
"SCHEDULER": 14,
|
|
1834
|
-
"14": "SCHEDULER"
|
|
1835
|
+
"14": "SCHEDULER",
|
|
1836
|
+
"APP_UNMOUNT_CLEANUP": 15,
|
|
1837
|
+
"15": "APP_UNMOUNT_CLEANUP"
|
|
1835
1838
|
};
|
|
1836
1839
|
const ErrorTypeStrings$1 = {
|
|
1837
1840
|
["sp"]: "serverPrefetch hook",
|
|
@@ -1862,7 +1865,8 @@ const ErrorTypeStrings$1 = {
|
|
|
1862
1865
|
[11]: "app warnHandler",
|
|
1863
1866
|
[12]: "ref function",
|
|
1864
1867
|
[13]: "async component loader",
|
|
1865
|
-
[14]: "scheduler flush. This is likely a Vue internals bug. Please open an issue at https://github.com/vuejs/core ."
|
|
1868
|
+
[14]: "scheduler flush. This is likely a Vue internals bug. Please open an issue at https://github.com/vuejs/core .",
|
|
1869
|
+
[15]: "app unmount cleanup function"
|
|
1866
1870
|
};
|
|
1867
1871
|
function callWithErrorHandling(fn, instance, type, args) {
|
|
1868
1872
|
try {
|
|
@@ -2494,7 +2498,7 @@ function renderComponentRoot(instance) {
|
|
|
2494
2498
|
false ? {
|
|
2495
2499
|
get attrs() {
|
|
2496
2500
|
markAttrsAccessed();
|
|
2497
|
-
return attrs;
|
|
2501
|
+
return shallowReadonly(attrs);
|
|
2498
2502
|
},
|
|
2499
2503
|
slots,
|
|
2500
2504
|
emit
|
|
@@ -2523,21 +2527,26 @@ function renderComponentRoot(instance) {
|
|
|
2523
2527
|
propsOptions
|
|
2524
2528
|
);
|
|
2525
2529
|
}
|
|
2526
|
-
root = cloneVNode(root, fallthroughAttrs);
|
|
2530
|
+
root = cloneVNode(root, fallthroughAttrs, false, true);
|
|
2527
2531
|
}
|
|
2528
2532
|
}
|
|
2529
2533
|
}
|
|
2530
2534
|
if (isCompatEnabled$1("INSTANCE_ATTRS_CLASS_STYLE", instance) && vnode.shapeFlag & 4 && root.shapeFlag & (1 | 6)) {
|
|
2531
2535
|
const { class: cls, style } = vnode.props || {};
|
|
2532
2536
|
if (cls || style) {
|
|
2533
|
-
root = cloneVNode(
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
+
root = cloneVNode(
|
|
2538
|
+
root,
|
|
2539
|
+
{
|
|
2540
|
+
class: cls,
|
|
2541
|
+
style
|
|
2542
|
+
},
|
|
2543
|
+
false,
|
|
2544
|
+
true
|
|
2545
|
+
);
|
|
2537
2546
|
}
|
|
2538
2547
|
}
|
|
2539
2548
|
if (vnode.dirs) {
|
|
2540
|
-
root = cloneVNode(root);
|
|
2549
|
+
root = cloneVNode(root, null, false, true);
|
|
2541
2550
|
root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs;
|
|
2542
2551
|
}
|
|
2543
2552
|
if (vnode.transition) {
|
|
@@ -2977,7 +2986,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
2977
2986
|
let parentSuspenseId;
|
|
2978
2987
|
const isSuspensible = isVNodeSuspensible(vnode);
|
|
2979
2988
|
if (isSuspensible) {
|
|
2980
|
-
if (parentSuspense
|
|
2989
|
+
if (parentSuspense && parentSuspense.pendingBranch) {
|
|
2981
2990
|
parentSuspenseId = parentSuspense.pendingId;
|
|
2982
2991
|
parentSuspense.deps++;
|
|
2983
2992
|
}
|
|
@@ -3265,8 +3274,8 @@ function setActiveBranch(suspense, branch) {
|
|
|
3265
3274
|
}
|
|
3266
3275
|
}
|
|
3267
3276
|
function isVNodeSuspensible(vnode) {
|
|
3268
|
-
|
|
3269
|
-
return
|
|
3277
|
+
const suspensible = vnode.props && vnode.props.suspensible;
|
|
3278
|
+
return suspensible != null && suspensible !== false;
|
|
3270
3279
|
}
|
|
3271
3280
|
|
|
3272
3281
|
const legacyDirectiveHookMap = {
|
|
@@ -3525,34 +3534,29 @@ function createPathGetter(ctx, path) {
|
|
|
3525
3534
|
return cur;
|
|
3526
3535
|
};
|
|
3527
3536
|
}
|
|
3528
|
-
function traverse(value, depth
|
|
3529
|
-
if (!isObject(value) || value["__v_skip"]) {
|
|
3537
|
+
function traverse(value, depth = Infinity, seen) {
|
|
3538
|
+
if (depth <= 0 || !isObject(value) || value["__v_skip"]) {
|
|
3530
3539
|
return value;
|
|
3531
3540
|
}
|
|
3532
|
-
if (depth && depth > 0) {
|
|
3533
|
-
if (currentDepth >= depth) {
|
|
3534
|
-
return value;
|
|
3535
|
-
}
|
|
3536
|
-
currentDepth++;
|
|
3537
|
-
}
|
|
3538
3541
|
seen = seen || /* @__PURE__ */ new Set();
|
|
3539
3542
|
if (seen.has(value)) {
|
|
3540
3543
|
return value;
|
|
3541
3544
|
}
|
|
3542
3545
|
seen.add(value);
|
|
3546
|
+
depth--;
|
|
3543
3547
|
if (isRef(value)) {
|
|
3544
|
-
traverse(value.value, depth,
|
|
3548
|
+
traverse(value.value, depth, seen);
|
|
3545
3549
|
} else if (isArray(value)) {
|
|
3546
3550
|
for (let i = 0; i < value.length; i++) {
|
|
3547
|
-
traverse(value[i], depth,
|
|
3551
|
+
traverse(value[i], depth, seen);
|
|
3548
3552
|
}
|
|
3549
3553
|
} else if (isSet(value) || isMap(value)) {
|
|
3550
3554
|
value.forEach((v) => {
|
|
3551
|
-
traverse(v, depth,
|
|
3555
|
+
traverse(v, depth, seen);
|
|
3552
3556
|
});
|
|
3553
3557
|
} else if (isPlainObject(value)) {
|
|
3554
3558
|
for (const key in value) {
|
|
3555
|
-
traverse(value[key], depth,
|
|
3559
|
+
traverse(value[key], depth, seen);
|
|
3556
3560
|
}
|
|
3557
3561
|
}
|
|
3558
3562
|
return value;
|
|
@@ -3689,7 +3693,7 @@ const BaseTransitionImpl = {
|
|
|
3689
3693
|
instance
|
|
3690
3694
|
);
|
|
3691
3695
|
setTransitionHooks(oldInnerChild, leavingHooks);
|
|
3692
|
-
if (mode === "out-in") {
|
|
3696
|
+
if (mode === "out-in" && innerChild.type !== Comment) {
|
|
3693
3697
|
state.isLeaving = true;
|
|
3694
3698
|
leavingHooks.afterLeave = () => {
|
|
3695
3699
|
state.isLeaving = false;
|
|
@@ -4206,7 +4210,7 @@ const KeepAliveImpl = {
|
|
|
4206
4210
|
return () => {
|
|
4207
4211
|
pendingCacheKey = null;
|
|
4208
4212
|
if (!slots.default) {
|
|
4209
|
-
return
|
|
4213
|
+
return null;
|
|
4210
4214
|
}
|
|
4211
4215
|
const children = slots.default();
|
|
4212
4216
|
const rawVNode = children[0];
|
|
@@ -5641,13 +5645,13 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
5641
5645
|
return vm;
|
|
5642
5646
|
}
|
|
5643
5647
|
}
|
|
5644
|
-
Vue.version = `2.6.14-compat:${"3.5.0-alpha.
|
|
5648
|
+
Vue.version = `2.6.14-compat:${"3.5.0-alpha.2"}`;
|
|
5645
5649
|
Vue.config = singletonApp.config;
|
|
5646
|
-
Vue.use = (
|
|
5647
|
-
if (
|
|
5648
|
-
|
|
5649
|
-
} else if (isFunction(
|
|
5650
|
-
|
|
5650
|
+
Vue.use = (plugin, ...options) => {
|
|
5651
|
+
if (plugin && isFunction(plugin.install)) {
|
|
5652
|
+
plugin.install(Vue, ...options);
|
|
5653
|
+
} else if (isFunction(plugin)) {
|
|
5654
|
+
plugin(Vue, ...options);
|
|
5651
5655
|
}
|
|
5652
5656
|
return Vue;
|
|
5653
5657
|
};
|
|
@@ -6007,6 +6011,7 @@ function createAppAPI(render, hydrate) {
|
|
|
6007
6011
|
}
|
|
6008
6012
|
const context = createAppContext();
|
|
6009
6013
|
const installedPlugins = /* @__PURE__ */ new WeakSet();
|
|
6014
|
+
const pluginCleanupFns = [];
|
|
6010
6015
|
let isMounted = false;
|
|
6011
6016
|
const app = context.app = {
|
|
6012
6017
|
_uid: uid$1++,
|
|
@@ -6073,8 +6078,16 @@ function createAppAPI(render, hydrate) {
|
|
|
6073
6078
|
return getExposeProxy(vnode.component) || vnode.component.proxy;
|
|
6074
6079
|
}
|
|
6075
6080
|
},
|
|
6081
|
+
onUnmount(cleanupFn) {
|
|
6082
|
+
pluginCleanupFns.push(cleanupFn);
|
|
6083
|
+
},
|
|
6076
6084
|
unmount() {
|
|
6077
6085
|
if (isMounted) {
|
|
6086
|
+
callWithAsyncErrorHandling(
|
|
6087
|
+
pluginCleanupFns,
|
|
6088
|
+
app._instance,
|
|
6089
|
+
15
|
|
6090
|
+
);
|
|
6078
6091
|
render(null, app._container);
|
|
6079
6092
|
delete app._container.__vue_app__;
|
|
6080
6093
|
}
|
|
@@ -6517,7 +6530,7 @@ const initSlots = (instance, children) => {
|
|
|
6517
6530
|
const type = children._;
|
|
6518
6531
|
if (type) {
|
|
6519
6532
|
extend$1(slots, children);
|
|
6520
|
-
def(slots, "_", type);
|
|
6533
|
+
def(slots, "_", type, true);
|
|
6521
6534
|
} else {
|
|
6522
6535
|
normalizeObjectSlots(children, slots);
|
|
6523
6536
|
}
|
|
@@ -8947,8 +8960,8 @@ function guardReactiveProps(props) {
|
|
|
8947
8960
|
return null;
|
|
8948
8961
|
return isProxy(props) || isInternalObject(props) ? extend$1({}, props) : props;
|
|
8949
8962
|
}
|
|
8950
|
-
function cloneVNode(vnode, extraProps, mergeRef = false) {
|
|
8951
|
-
const { props, ref, patchFlag, children } = vnode;
|
|
8963
|
+
function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false) {
|
|
8964
|
+
const { props, ref, patchFlag, children, transition } = vnode;
|
|
8952
8965
|
const mergedProps = extraProps ? mergeProps(props || {}, extraProps) : props;
|
|
8953
8966
|
const cloned = {
|
|
8954
8967
|
__v_isVNode: true,
|
|
@@ -8978,7 +8991,7 @@ function cloneVNode(vnode, extraProps, mergeRef = false) {
|
|
|
8978
8991
|
dynamicChildren: vnode.dynamicChildren,
|
|
8979
8992
|
appContext: vnode.appContext,
|
|
8980
8993
|
dirs: vnode.dirs,
|
|
8981
|
-
transition
|
|
8994
|
+
transition,
|
|
8982
8995
|
// These should technically only be non-null on mounted VNodes. However,
|
|
8983
8996
|
// they *should* be copied for kept-alive vnodes. So we just always copy
|
|
8984
8997
|
// them since them being non-null during a mount doesn't affect the logic as
|
|
@@ -8992,6 +9005,9 @@ function cloneVNode(vnode, extraProps, mergeRef = false) {
|
|
|
8992
9005
|
ctx: vnode.ctx,
|
|
8993
9006
|
ce: vnode.ce
|
|
8994
9007
|
};
|
|
9008
|
+
if (transition && cloneTransition) {
|
|
9009
|
+
cloned.transition = transition.clone(cloned);
|
|
9010
|
+
}
|
|
8995
9011
|
{
|
|
8996
9012
|
defineLegacyVNodeProperties(cloned);
|
|
8997
9013
|
}
|
|
@@ -9500,7 +9516,7 @@ function isMemoSame(cached, memo) {
|
|
|
9500
9516
|
return true;
|
|
9501
9517
|
}
|
|
9502
9518
|
|
|
9503
|
-
const version = "3.5.0-alpha.
|
|
9519
|
+
const version = "3.5.0-alpha.2";
|
|
9504
9520
|
const warn$1 = NOOP;
|
|
9505
9521
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
9506
9522
|
const devtools = void 0;
|
|
@@ -13079,11 +13095,10 @@ const tokenizer = new Tokenizer(stack, {
|
|
|
13079
13095
|
}
|
|
13080
13096
|
},
|
|
13081
13097
|
onselfclosingtag(end) {
|
|
13082
|
-
var _a;
|
|
13083
13098
|
const name = currentOpenTag.tag;
|
|
13084
13099
|
currentOpenTag.isSelfClosing = true;
|
|
13085
13100
|
endOpenTag(end);
|
|
13086
|
-
if (
|
|
13101
|
+
if (stack[0] && stack[0].tag === name) {
|
|
13087
13102
|
onCloseTag(stack.shift(), end);
|
|
13088
13103
|
}
|
|
13089
13104
|
},
|
|
@@ -13399,7 +13414,7 @@ function endOpenTag(end) {
|
|
|
13399
13414
|
function onText(content, start, end) {
|
|
13400
13415
|
const parent = stack[0] || currentRoot;
|
|
13401
13416
|
const lastNode = parent.children[parent.children.length - 1];
|
|
13402
|
-
if (
|
|
13417
|
+
if (lastNode && lastNode.type === 2) {
|
|
13403
13418
|
lastNode.content += content;
|
|
13404
13419
|
setLocEnd(lastNode.loc, end);
|
|
13405
13420
|
} else {
|
|
@@ -13503,11 +13518,10 @@ function isFragmentTemplate({ tag, props }) {
|
|
|
13503
13518
|
return false;
|
|
13504
13519
|
}
|
|
13505
13520
|
function isComponent({ tag, props }) {
|
|
13506
|
-
var _a;
|
|
13507
13521
|
if (currentOptions.isCustomElement(tag)) {
|
|
13508
13522
|
return false;
|
|
13509
13523
|
}
|
|
13510
|
-
if (tag === "component" || isUpperCase(tag.charCodeAt(0)) || isCoreComponent(tag) ||
|
|
13524
|
+
if (tag === "component" || isUpperCase(tag.charCodeAt(0)) || isCoreComponent(tag) || currentOptions.isBuiltInComponent && currentOptions.isBuiltInComponent(tag) || currentOptions.isNativeTag && !currentOptions.isNativeTag(tag)) {
|
|
13511
13525
|
return true;
|
|
13512
13526
|
}
|
|
13513
13527
|
for (let i = 0; i < props.length; i++) {
|
|
@@ -13540,7 +13554,6 @@ function isUpperCase(c) {
|
|
|
13540
13554
|
}
|
|
13541
13555
|
const windowsNewlineRE = /\r\n/g;
|
|
13542
13556
|
function condenseWhitespace(nodes, tag) {
|
|
13543
|
-
var _a, _b;
|
|
13544
13557
|
const shouldCondense = currentOptions.whitespace !== "preserve";
|
|
13545
13558
|
let removedWhitespace = false;
|
|
13546
13559
|
for (let i = 0; i < nodes.length; i++) {
|
|
@@ -13548,8 +13561,8 @@ function condenseWhitespace(nodes, tag) {
|
|
|
13548
13561
|
if (node.type === 2) {
|
|
13549
13562
|
if (!inPre) {
|
|
13550
13563
|
if (isAllWhitespace(node.content)) {
|
|
13551
|
-
const prev =
|
|
13552
|
-
const next =
|
|
13564
|
+
const prev = nodes[i - 1] && nodes[i - 1].type;
|
|
13565
|
+
const next = nodes[i + 1] && nodes[i + 1].type;
|
|
13553
13566
|
if (!prev || !next || shouldCondense && (prev === 3 && (next === 3 || next === 1) || prev === 1 && (next === 3 || next === 1 && hasNewlineChar(node.content)))) {
|
|
13554
13567
|
removedWhitespace = true;
|
|
13555
13568
|
nodes[i] = null;
|
|
@@ -13702,7 +13715,7 @@ function baseParse(input, options) {
|
|
|
13702
13715
|
}
|
|
13703
13716
|
tokenizer.mode = currentOptions.parseMode === "html" ? 1 : currentOptions.parseMode === "sfc" ? 2 : 0;
|
|
13704
13717
|
tokenizer.inXML = currentOptions.ns === 1 || currentOptions.ns === 2;
|
|
13705
|
-
const delimiters = options
|
|
13718
|
+
const delimiters = options && options.delimiters;
|
|
13706
13719
|
if (delimiters) {
|
|
13707
13720
|
tokenizer.delimiterOpen = toCharCodes(delimiters[0]);
|
|
13708
13721
|
tokenizer.delimiterClose = toCharCodes(delimiters[1]);
|
|
@@ -15029,7 +15042,6 @@ function genReturnStatement({ returns }, context) {
|
|
|
15029
15042
|
}
|
|
15030
15043
|
|
|
15031
15044
|
const isLiteralWhitelisted = /* @__PURE__ */ makeMap("true,false,null,this");
|
|
15032
|
-
const constantBailRE = /\w\s*\(|\.[^\d]/;
|
|
15033
15045
|
const transformExpression = (node, context) => {
|
|
15034
15046
|
if (node.type === 5) {
|
|
15035
15047
|
node.content = processExpression(
|
|
@@ -15124,7 +15136,6 @@ function processExpression(node, context, asParams = false, asRawStatements = fa
|
|
|
15124
15136
|
return `_ctx.${raw}`;
|
|
15125
15137
|
};
|
|
15126
15138
|
const rawExp = node.content;
|
|
15127
|
-
const bailConstant = constantBailRE.test(rawExp);
|
|
15128
15139
|
let ast = node.ast;
|
|
15129
15140
|
if (ast === false) {
|
|
15130
15141
|
return node;
|
|
@@ -15186,7 +15197,7 @@ function processExpression(node, context, asParams = false, asRawStatements = fa
|
|
|
15186
15197
|
node2.name = rewriteIdentifier(node2.name, parent, node2);
|
|
15187
15198
|
ids.push(node2);
|
|
15188
15199
|
} else {
|
|
15189
|
-
if (!(needPrefix && isLocal) &&
|
|
15200
|
+
if (!(needPrefix && isLocal) && parent.type !== "CallExpression" && parent.type !== "NewExpression" && parent.type !== "MemberExpression") {
|
|
15190
15201
|
node2.isConstant = true;
|
|
15191
15202
|
}
|
|
15192
15203
|
ids.push(node2);
|
|
@@ -15230,7 +15241,7 @@ function processExpression(node, context, asParams = false, asRawStatements = fa
|
|
|
15230
15241
|
ret.ast = ast;
|
|
15231
15242
|
} else {
|
|
15232
15243
|
ret = node;
|
|
15233
|
-
ret.constType =
|
|
15244
|
+
ret.constType = 3;
|
|
15234
15245
|
}
|
|
15235
15246
|
ret.identifiers = Object.keys(knownIds);
|
|
15236
15247
|
return ret;
|
package/dist/vue.esm-browser.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
|
};
|
|
@@ -2082,7 +2083,9 @@ const ErrorCodes = {
|
|
|
2082
2083
|
"ASYNC_COMPONENT_LOADER": 13,
|
|
2083
2084
|
"13": "ASYNC_COMPONENT_LOADER",
|
|
2084
2085
|
"SCHEDULER": 14,
|
|
2085
|
-
"14": "SCHEDULER"
|
|
2086
|
+
"14": "SCHEDULER",
|
|
2087
|
+
"APP_UNMOUNT_CLEANUP": 15,
|
|
2088
|
+
"15": "APP_UNMOUNT_CLEANUP"
|
|
2086
2089
|
};
|
|
2087
2090
|
const ErrorTypeStrings$1 = {
|
|
2088
2091
|
["sp"]: "serverPrefetch hook",
|
|
@@ -2113,7 +2116,8 @@ const ErrorTypeStrings$1 = {
|
|
|
2113
2116
|
[11]: "app warnHandler",
|
|
2114
2117
|
[12]: "ref function",
|
|
2115
2118
|
[13]: "async component loader",
|
|
2116
|
-
[14]: "scheduler flush. This is likely a Vue internals bug. Please open an issue at https://github.com/vuejs/core ."
|
|
2119
|
+
[14]: "scheduler flush. This is likely a Vue internals bug. Please open an issue at https://github.com/vuejs/core .",
|
|
2120
|
+
[15]: "app unmount cleanup function"
|
|
2117
2121
|
};
|
|
2118
2122
|
function callWithErrorHandling(fn, instance, type, args) {
|
|
2119
2123
|
try {
|
|
@@ -3334,7 +3338,7 @@ function renderComponentRoot(instance) {
|
|
|
3334
3338
|
true ? {
|
|
3335
3339
|
get attrs() {
|
|
3336
3340
|
markAttrsAccessed();
|
|
3337
|
-
return attrs;
|
|
3341
|
+
return shallowReadonly(attrs);
|
|
3338
3342
|
},
|
|
3339
3343
|
slots,
|
|
3340
3344
|
emit
|
|
@@ -3367,7 +3371,7 @@ function renderComponentRoot(instance) {
|
|
|
3367
3371
|
propsOptions
|
|
3368
3372
|
);
|
|
3369
3373
|
}
|
|
3370
|
-
root = cloneVNode(root, fallthroughAttrs);
|
|
3374
|
+
root = cloneVNode(root, fallthroughAttrs, false, true);
|
|
3371
3375
|
} else if (!accessedAttrs && root.type !== Comment) {
|
|
3372
3376
|
const allAttrs = Object.keys(attrs);
|
|
3373
3377
|
const eventAttrs = [];
|
|
@@ -3405,10 +3409,15 @@ function renderComponentRoot(instance) {
|
|
|
3405
3409
|
getComponentName(instance.type)
|
|
3406
3410
|
);
|
|
3407
3411
|
}
|
|
3408
|
-
root = cloneVNode(
|
|
3409
|
-
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
+
root = cloneVNode(
|
|
3413
|
+
root,
|
|
3414
|
+
{
|
|
3415
|
+
class: cls,
|
|
3416
|
+
style
|
|
3417
|
+
},
|
|
3418
|
+
false,
|
|
3419
|
+
true
|
|
3420
|
+
);
|
|
3412
3421
|
}
|
|
3413
3422
|
}
|
|
3414
3423
|
if (vnode.dirs) {
|
|
@@ -3417,7 +3426,7 @@ function renderComponentRoot(instance) {
|
|
|
3417
3426
|
`Runtime directive used on component with non-element root node. The directives will not function as intended.`
|
|
3418
3427
|
);
|
|
3419
3428
|
}
|
|
3420
|
-
root = cloneVNode(root);
|
|
3429
|
+
root = cloneVNode(root, null, false, true);
|
|
3421
3430
|
root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs;
|
|
3422
3431
|
}
|
|
3423
3432
|
if (vnode.transition) {
|
|
@@ -3912,7 +3921,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
3912
3921
|
let parentSuspenseId;
|
|
3913
3922
|
const isSuspensible = isVNodeSuspensible(vnode);
|
|
3914
3923
|
if (isSuspensible) {
|
|
3915
|
-
if (parentSuspense
|
|
3924
|
+
if (parentSuspense && parentSuspense.pendingBranch) {
|
|
3916
3925
|
parentSuspenseId = parentSuspense.pendingId;
|
|
3917
3926
|
parentSuspense.deps++;
|
|
3918
3927
|
}
|
|
@@ -4224,8 +4233,8 @@ function setActiveBranch(suspense, branch) {
|
|
|
4224
4233
|
}
|
|
4225
4234
|
}
|
|
4226
4235
|
function isVNodeSuspensible(vnode) {
|
|
4227
|
-
|
|
4228
|
-
return
|
|
4236
|
+
const suspensible = vnode.props && vnode.props.suspensible;
|
|
4237
|
+
return suspensible != null && suspensible !== false;
|
|
4229
4238
|
}
|
|
4230
4239
|
|
|
4231
4240
|
const legacyDirectiveHookMap = {
|
|
@@ -4509,34 +4518,29 @@ function createPathGetter(ctx, path) {
|
|
|
4509
4518
|
return cur;
|
|
4510
4519
|
};
|
|
4511
4520
|
}
|
|
4512
|
-
function traverse(value, depth
|
|
4513
|
-
if (!isObject(value) || value["__v_skip"]) {
|
|
4521
|
+
function traverse(value, depth = Infinity, seen) {
|
|
4522
|
+
if (depth <= 0 || !isObject(value) || value["__v_skip"]) {
|
|
4514
4523
|
return value;
|
|
4515
4524
|
}
|
|
4516
|
-
if (depth && depth > 0) {
|
|
4517
|
-
if (currentDepth >= depth) {
|
|
4518
|
-
return value;
|
|
4519
|
-
}
|
|
4520
|
-
currentDepth++;
|
|
4521
|
-
}
|
|
4522
4525
|
seen = seen || /* @__PURE__ */ new Set();
|
|
4523
4526
|
if (seen.has(value)) {
|
|
4524
4527
|
return value;
|
|
4525
4528
|
}
|
|
4526
4529
|
seen.add(value);
|
|
4530
|
+
depth--;
|
|
4527
4531
|
if (isRef(value)) {
|
|
4528
|
-
traverse(value.value, depth,
|
|
4532
|
+
traverse(value.value, depth, seen);
|
|
4529
4533
|
} else if (isArray(value)) {
|
|
4530
4534
|
for (let i = 0; i < value.length; i++) {
|
|
4531
|
-
traverse(value[i], depth,
|
|
4535
|
+
traverse(value[i], depth, seen);
|
|
4532
4536
|
}
|
|
4533
4537
|
} else if (isSet(value) || isMap(value)) {
|
|
4534
4538
|
value.forEach((v) => {
|
|
4535
|
-
traverse(v, depth,
|
|
4539
|
+
traverse(v, depth, seen);
|
|
4536
4540
|
});
|
|
4537
4541
|
} else if (isPlainObject(value)) {
|
|
4538
4542
|
for (const key in value) {
|
|
4539
|
-
traverse(value[key], depth,
|
|
4543
|
+
traverse(value[key], depth, seen);
|
|
4540
4544
|
}
|
|
4541
4545
|
}
|
|
4542
4546
|
return value;
|
|
@@ -4682,7 +4686,7 @@ const BaseTransitionImpl = {
|
|
|
4682
4686
|
instance
|
|
4683
4687
|
);
|
|
4684
4688
|
setTransitionHooks(oldInnerChild, leavingHooks);
|
|
4685
|
-
if (mode === "out-in") {
|
|
4689
|
+
if (mode === "out-in" && innerChild.type !== Comment) {
|
|
4686
4690
|
state.isLeaving = true;
|
|
4687
4691
|
leavingHooks.afterLeave = () => {
|
|
4688
4692
|
state.isLeaving = false;
|
|
@@ -5220,7 +5224,7 @@ const KeepAliveImpl = {
|
|
|
5220
5224
|
return () => {
|
|
5221
5225
|
pendingCacheKey = null;
|
|
5222
5226
|
if (!slots.default) {
|
|
5223
|
-
return
|
|
5227
|
+
return null;
|
|
5224
5228
|
}
|
|
5225
5229
|
const children = slots.default();
|
|
5226
5230
|
const rawVNode = children[0];
|
|
@@ -6925,13 +6929,13 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
6925
6929
|
return vm;
|
|
6926
6930
|
}
|
|
6927
6931
|
}
|
|
6928
|
-
Vue.version = `2.6.14-compat:${"3.5.0-alpha.
|
|
6932
|
+
Vue.version = `2.6.14-compat:${"3.5.0-alpha.2"}`;
|
|
6929
6933
|
Vue.config = singletonApp.config;
|
|
6930
|
-
Vue.use = (
|
|
6931
|
-
if (
|
|
6932
|
-
|
|
6933
|
-
} else if (isFunction(
|
|
6934
|
-
|
|
6934
|
+
Vue.use = (plugin, ...options) => {
|
|
6935
|
+
if (plugin && isFunction(plugin.install)) {
|
|
6936
|
+
plugin.install(Vue, ...options);
|
|
6937
|
+
} else if (isFunction(plugin)) {
|
|
6938
|
+
plugin(Vue, ...options);
|
|
6935
6939
|
}
|
|
6936
6940
|
return Vue;
|
|
6937
6941
|
};
|
|
@@ -7330,6 +7334,7 @@ function createAppAPI(render, hydrate) {
|
|
|
7330
7334
|
}
|
|
7331
7335
|
const context = createAppContext();
|
|
7332
7336
|
const installedPlugins = /* @__PURE__ */ new WeakSet();
|
|
7337
|
+
const pluginCleanupFns = [];
|
|
7333
7338
|
let isMounted = false;
|
|
7334
7339
|
const app = context.app = {
|
|
7335
7340
|
_uid: uid$1++,
|
|
@@ -7447,8 +7452,21 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
7447
7452
|
);
|
|
7448
7453
|
}
|
|
7449
7454
|
},
|
|
7455
|
+
onUnmount(cleanupFn) {
|
|
7456
|
+
if (typeof cleanupFn !== "function") {
|
|
7457
|
+
warn$1(
|
|
7458
|
+
`Expected function as first argument to app.onUnmount(), but got ${typeof cleanupFn}`
|
|
7459
|
+
);
|
|
7460
|
+
}
|
|
7461
|
+
pluginCleanupFns.push(cleanupFn);
|
|
7462
|
+
},
|
|
7450
7463
|
unmount() {
|
|
7451
7464
|
if (isMounted) {
|
|
7465
|
+
callWithAsyncErrorHandling(
|
|
7466
|
+
pluginCleanupFns,
|
|
7467
|
+
app._instance,
|
|
7468
|
+
15
|
|
7469
|
+
);
|
|
7452
7470
|
render(null, app._container);
|
|
7453
7471
|
{
|
|
7454
7472
|
app._instance = null;
|
|
@@ -8049,7 +8067,7 @@ const initSlots = (instance, children) => {
|
|
|
8049
8067
|
const type = children._;
|
|
8050
8068
|
if (type) {
|
|
8051
8069
|
extend(slots, children);
|
|
8052
|
-
def(slots, "_", type);
|
|
8070
|
+
def(slots, "_", type, true);
|
|
8053
8071
|
} else {
|
|
8054
8072
|
normalizeObjectSlots(children, slots, instance);
|
|
8055
8073
|
}
|
|
@@ -10887,8 +10905,8 @@ function guardReactiveProps(props) {
|
|
|
10887
10905
|
return null;
|
|
10888
10906
|
return isProxy(props) || isInternalObject(props) ? extend({}, props) : props;
|
|
10889
10907
|
}
|
|
10890
|
-
function cloneVNode(vnode, extraProps, mergeRef = false) {
|
|
10891
|
-
const { props, ref, patchFlag, children } = vnode;
|
|
10908
|
+
function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false) {
|
|
10909
|
+
const { props, ref, patchFlag, children, transition } = vnode;
|
|
10892
10910
|
const mergedProps = extraProps ? mergeProps(props || {}, extraProps) : props;
|
|
10893
10911
|
const cloned = {
|
|
10894
10912
|
__v_isVNode: true,
|
|
@@ -10918,7 +10936,7 @@ function cloneVNode(vnode, extraProps, mergeRef = false) {
|
|
|
10918
10936
|
dynamicChildren: vnode.dynamicChildren,
|
|
10919
10937
|
appContext: vnode.appContext,
|
|
10920
10938
|
dirs: vnode.dirs,
|
|
10921
|
-
transition
|
|
10939
|
+
transition,
|
|
10922
10940
|
// These should technically only be non-null on mounted VNodes. However,
|
|
10923
10941
|
// they *should* be copied for kept-alive vnodes. So we just always copy
|
|
10924
10942
|
// them since them being non-null during a mount doesn't affect the logic as
|
|
@@ -10932,6 +10950,9 @@ function cloneVNode(vnode, extraProps, mergeRef = false) {
|
|
|
10932
10950
|
ctx: vnode.ctx,
|
|
10933
10951
|
ce: vnode.ce
|
|
10934
10952
|
};
|
|
10953
|
+
if (transition && cloneTransition) {
|
|
10954
|
+
cloned.transition = transition.clone(cloned);
|
|
10955
|
+
}
|
|
10935
10956
|
{
|
|
10936
10957
|
defineLegacyVNodeProperties(cloned);
|
|
10937
10958
|
}
|
|
@@ -11756,7 +11777,7 @@ function isMemoSame(cached, memo) {
|
|
|
11756
11777
|
return true;
|
|
11757
11778
|
}
|
|
11758
11779
|
|
|
11759
|
-
const version = "3.5.0-alpha.
|
|
11780
|
+
const version = "3.5.0-alpha.2";
|
|
11760
11781
|
const warn = warn$1 ;
|
|
11761
11782
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
11762
11783
|
const devtools = devtools$1 ;
|
|
@@ -15184,11 +15205,10 @@ const tokenizer = new Tokenizer(stack, {
|
|
|
15184
15205
|
}
|
|
15185
15206
|
},
|
|
15186
15207
|
onselfclosingtag(end) {
|
|
15187
|
-
var _a;
|
|
15188
15208
|
const name = currentOpenTag.tag;
|
|
15189
15209
|
currentOpenTag.isSelfClosing = true;
|
|
15190
15210
|
endOpenTag(end);
|
|
15191
|
-
if (
|
|
15211
|
+
if (stack[0] && stack[0].tag === name) {
|
|
15192
15212
|
onCloseTag(stack.shift(), end);
|
|
15193
15213
|
}
|
|
15194
15214
|
},
|
|
@@ -15499,16 +15519,15 @@ function endOpenTag(end) {
|
|
|
15499
15519
|
currentOpenTag = null;
|
|
15500
15520
|
}
|
|
15501
15521
|
function onText(content, start, end) {
|
|
15502
|
-
var _a;
|
|
15503
15522
|
{
|
|
15504
|
-
const tag =
|
|
15523
|
+
const tag = stack[0] && stack[0].tag;
|
|
15505
15524
|
if (tag !== "script" && tag !== "style" && content.includes("&")) {
|
|
15506
15525
|
content = currentOptions.decodeEntities(content, false);
|
|
15507
15526
|
}
|
|
15508
15527
|
}
|
|
15509
15528
|
const parent = stack[0] || currentRoot;
|
|
15510
15529
|
const lastNode = parent.children[parent.children.length - 1];
|
|
15511
|
-
if (
|
|
15530
|
+
if (lastNode && lastNode.type === 2) {
|
|
15512
15531
|
lastNode.content += content;
|
|
15513
15532
|
setLocEnd(lastNode.loc, end);
|
|
15514
15533
|
} else {
|
|
@@ -15642,11 +15661,10 @@ function isFragmentTemplate({ tag, props }) {
|
|
|
15642
15661
|
return false;
|
|
15643
15662
|
}
|
|
15644
15663
|
function isComponent({ tag, props }) {
|
|
15645
|
-
var _a;
|
|
15646
15664
|
if (currentOptions.isCustomElement(tag)) {
|
|
15647
15665
|
return false;
|
|
15648
15666
|
}
|
|
15649
|
-
if (tag === "component" || isUpperCase(tag.charCodeAt(0)) || isCoreComponent(tag) ||
|
|
15667
|
+
if (tag === "component" || isUpperCase(tag.charCodeAt(0)) || isCoreComponent(tag) || currentOptions.isBuiltInComponent && currentOptions.isBuiltInComponent(tag) || currentOptions.isNativeTag && !currentOptions.isNativeTag(tag)) {
|
|
15650
15668
|
return true;
|
|
15651
15669
|
}
|
|
15652
15670
|
for (let i = 0; i < props.length; i++) {
|
|
@@ -15679,7 +15697,6 @@ function isUpperCase(c) {
|
|
|
15679
15697
|
}
|
|
15680
15698
|
const windowsNewlineRE = /\r\n/g;
|
|
15681
15699
|
function condenseWhitespace(nodes, tag) {
|
|
15682
|
-
var _a, _b;
|
|
15683
15700
|
const shouldCondense = currentOptions.whitespace !== "preserve";
|
|
15684
15701
|
let removedWhitespace = false;
|
|
15685
15702
|
for (let i = 0; i < nodes.length; i++) {
|
|
@@ -15687,8 +15704,8 @@ function condenseWhitespace(nodes, tag) {
|
|
|
15687
15704
|
if (node.type === 2) {
|
|
15688
15705
|
if (!inPre) {
|
|
15689
15706
|
if (isAllWhitespace(node.content)) {
|
|
15690
|
-
const prev =
|
|
15691
|
-
const next =
|
|
15707
|
+
const prev = nodes[i - 1] && nodes[i - 1].type;
|
|
15708
|
+
const next = nodes[i + 1] && nodes[i + 1].type;
|
|
15692
15709
|
if (!prev || !next || shouldCondense && (prev === 3 && (next === 3 || next === 1) || prev === 1 && (next === 3 || next === 1 && hasNewlineChar(node.content)))) {
|
|
15693
15710
|
removedWhitespace = true;
|
|
15694
15711
|
nodes[i] = null;
|
|
@@ -15826,7 +15843,7 @@ function baseParse(input, options) {
|
|
|
15826
15843
|
}
|
|
15827
15844
|
tokenizer.mode = currentOptions.parseMode === "html" ? 1 : currentOptions.parseMode === "sfc" ? 2 : 0;
|
|
15828
15845
|
tokenizer.inXML = currentOptions.ns === 1 || currentOptions.ns === 2;
|
|
15829
|
-
const delimiters = options
|
|
15846
|
+
const delimiters = options && options.delimiters;
|
|
15830
15847
|
if (delimiters) {
|
|
15831
15848
|
tokenizer.delimiterOpen = toCharCodes(delimiters[0]);
|
|
15832
15849
|
tokenizer.delimiterClose = toCharCodes(delimiters[1]);
|