@vue/compat 3.6.0-alpha.2 → 3.6.0-alpha.3
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/README.md +0 -1
- package/dist/vue.cjs.js +1028 -690
- package/dist/vue.cjs.prod.js +896 -580
- package/dist/vue.esm-browser.js +961 -668
- package/dist/vue.esm-browser.prod.js +10 -9
- package/dist/vue.esm-bundler.js +1022 -670
- package/dist/vue.global.js +961 -668
- package/dist/vue.global.prod.js +10 -9
- package/dist/vue.runtime.esm-browser.js +961 -668
- package/dist/vue.runtime.esm-browser.prod.js +10 -9
- package/dist/vue.runtime.esm-bundler.js +1022 -670
- package/dist/vue.runtime.global.js +961 -668
- package/dist/vue.runtime.global.prod.js +10 -9
- package/package.json +3 -3
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compat v3.6.0-alpha.
|
|
2
|
+
* @vue/compat v3.6.0-alpha.3
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
6
6
|
var Vue = (function () {
|
|
7
7
|
'use strict';
|
|
8
8
|
|
|
9
|
-
/*! #__NO_SIDE_EFFECTS__ */
|
|
10
9
|
// @__NO_SIDE_EFFECTS__
|
|
11
10
|
function makeMap(str) {
|
|
12
11
|
const map = /* @__PURE__ */ Object.create(null);
|
|
@@ -62,10 +61,10 @@ var Vue = (function () {
|
|
|
62
61
|
);
|
|
63
62
|
const cacheStringFunction = (fn) => {
|
|
64
63
|
const cache = /* @__PURE__ */ Object.create(null);
|
|
65
|
-
return (str) => {
|
|
64
|
+
return ((str) => {
|
|
66
65
|
const hit = cache[str];
|
|
67
66
|
return hit || (cache[str] = fn(str));
|
|
68
|
-
};
|
|
67
|
+
});
|
|
69
68
|
};
|
|
70
69
|
const camelizeRE = /-(\w)/g;
|
|
71
70
|
const camelizeReplacer = (_, c) => c ? c.toUpperCase() : "";
|
|
@@ -311,6 +310,9 @@ var Vue = (function () {
|
|
|
311
310
|
if ((key === "width" || key === "height") && (tagName === "IMG" || tagName === "VIDEO" || tagName === "CANVAS" || tagName === "SOURCE")) {
|
|
312
311
|
return true;
|
|
313
312
|
}
|
|
313
|
+
if (key === "sandbox" && tagName === "IFRAME") {
|
|
314
|
+
return true;
|
|
315
|
+
}
|
|
314
316
|
return false;
|
|
315
317
|
}
|
|
316
318
|
|
|
@@ -500,6 +502,7 @@ var Vue = (function () {
|
|
|
500
502
|
const notifyBuffer = [];
|
|
501
503
|
let batchDepth = 0;
|
|
502
504
|
let activeSub = void 0;
|
|
505
|
+
let globalVersion = 0;
|
|
503
506
|
let notifyIndex = 0;
|
|
504
507
|
let notifyBufferLength = 0;
|
|
505
508
|
function setActiveSub(sub) {
|
|
@@ -522,17 +525,18 @@ var Vue = (function () {
|
|
|
522
525
|
if (prevDep !== void 0 && prevDep.dep === dep) {
|
|
523
526
|
return;
|
|
524
527
|
}
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
sub.depsTail = nextDep;
|
|
531
|
-
return;
|
|
532
|
-
}
|
|
528
|
+
const nextDep = prevDep !== void 0 ? prevDep.nextDep : sub.deps;
|
|
529
|
+
if (nextDep !== void 0 && nextDep.dep === dep) {
|
|
530
|
+
nextDep.version = globalVersion;
|
|
531
|
+
sub.depsTail = nextDep;
|
|
532
|
+
return;
|
|
533
533
|
}
|
|
534
534
|
const prevSub = dep.subsTail;
|
|
535
|
+
if (prevSub !== void 0 && prevSub.version === globalVersion && prevSub.sub === sub) {
|
|
536
|
+
return;
|
|
537
|
+
}
|
|
535
538
|
const newLink = sub.depsTail = dep.subsTail = {
|
|
539
|
+
version: globalVersion,
|
|
536
540
|
dep,
|
|
537
541
|
sub,
|
|
538
542
|
prevDep,
|
|
@@ -638,6 +642,7 @@ var Vue = (function () {
|
|
|
638
642
|
} while (true);
|
|
639
643
|
}
|
|
640
644
|
function startTracking(sub) {
|
|
645
|
+
++globalVersion;
|
|
641
646
|
sub.depsTail = void 0;
|
|
642
647
|
sub.flags = sub.flags & -57 | 4 /* RecursedCheck */;
|
|
643
648
|
return setActiveSub(sub);
|
|
@@ -738,18 +743,12 @@ var Vue = (function () {
|
|
|
738
743
|
} while (link2 !== void 0);
|
|
739
744
|
}
|
|
740
745
|
function isValidLink(checkLink, sub) {
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
}
|
|
748
|
-
if (link2 === depsTail) {
|
|
749
|
-
break;
|
|
750
|
-
}
|
|
751
|
-
link2 = link2.nextDep;
|
|
752
|
-
} while (link2 !== void 0);
|
|
746
|
+
let link2 = sub.depsTail;
|
|
747
|
+
while (link2 !== void 0) {
|
|
748
|
+
if (link2 === checkLink) {
|
|
749
|
+
return true;
|
|
750
|
+
}
|
|
751
|
+
link2 = link2.prevDep;
|
|
753
752
|
}
|
|
754
753
|
return false;
|
|
755
754
|
}
|
|
@@ -989,7 +988,7 @@ var Vue = (function () {
|
|
|
989
988
|
join(separator) {
|
|
990
989
|
return reactiveReadArray(this).join(separator);
|
|
991
990
|
},
|
|
992
|
-
// keys() iterator only reads `length`, no
|
|
991
|
+
// keys() iterator only reads `length`, no optimization required
|
|
993
992
|
lastIndexOf(...args) {
|
|
994
993
|
return searchProxy(this, "lastIndexOf", args);
|
|
995
994
|
},
|
|
@@ -1041,7 +1040,7 @@ var Vue = (function () {
|
|
|
1041
1040
|
iter._next = iter.next;
|
|
1042
1041
|
iter.next = () => {
|
|
1043
1042
|
const result = iter._next();
|
|
1044
|
-
if (result.
|
|
1043
|
+
if (!result.done) {
|
|
1045
1044
|
result.value = wrapValue(result.value);
|
|
1046
1045
|
}
|
|
1047
1046
|
return result;
|
|
@@ -1172,7 +1171,8 @@ var Vue = (function () {
|
|
|
1172
1171
|
return res;
|
|
1173
1172
|
}
|
|
1174
1173
|
if (isRef(res)) {
|
|
1175
|
-
|
|
1174
|
+
const value = targetIsArray && isIntegerKey(key) ? res : res.value;
|
|
1175
|
+
return isReadonly2 && isObject(value) ? readonly(value) : value;
|
|
1176
1176
|
}
|
|
1177
1177
|
if (isObject(res)) {
|
|
1178
1178
|
return isReadonly2 ? readonly(res) : reactive(res);
|
|
@@ -1194,7 +1194,13 @@ var Vue = (function () {
|
|
|
1194
1194
|
}
|
|
1195
1195
|
if (!isArray(target) && isRef(oldValue) && !isRef(value)) {
|
|
1196
1196
|
if (isOldValueReadonly) {
|
|
1197
|
-
|
|
1197
|
+
{
|
|
1198
|
+
warn$2(
|
|
1199
|
+
`Set operation on key "${String(key)}" failed: target is readonly.`,
|
|
1200
|
+
target[key]
|
|
1201
|
+
);
|
|
1202
|
+
}
|
|
1203
|
+
return true;
|
|
1198
1204
|
} else {
|
|
1199
1205
|
oldValue.value = value;
|
|
1200
1206
|
return true;
|
|
@@ -1339,7 +1345,7 @@ var Vue = (function () {
|
|
|
1339
1345
|
get size() {
|
|
1340
1346
|
const target = this["__v_raw"];
|
|
1341
1347
|
!readonly && track(toRaw(target), "iterate", ITERATE_KEY);
|
|
1342
|
-
return
|
|
1348
|
+
return target.size;
|
|
1343
1349
|
},
|
|
1344
1350
|
has(key) {
|
|
1345
1351
|
const target = this["__v_raw"];
|
|
@@ -2342,11 +2348,11 @@ var Vue = (function () {
|
|
|
2342
2348
|
if (depth <= 0 || !isObject(value) || value["__v_skip"]) {
|
|
2343
2349
|
return value;
|
|
2344
2350
|
}
|
|
2345
|
-
seen = seen || /* @__PURE__ */ new
|
|
2346
|
-
if (seen.
|
|
2351
|
+
seen = seen || /* @__PURE__ */ new Map();
|
|
2352
|
+
if ((seen.get(value) || 0) >= depth) {
|
|
2347
2353
|
return value;
|
|
2348
2354
|
}
|
|
2349
|
-
seen.
|
|
2355
|
+
seen.set(value, depth);
|
|
2350
2356
|
depth--;
|
|
2351
2357
|
if (isRef(value)) {
|
|
2352
2358
|
traverse(value.value, depth, seen);
|
|
@@ -2892,8 +2898,10 @@ var Vue = (function () {
|
|
|
2892
2898
|
instance.hmrRerender();
|
|
2893
2899
|
} else {
|
|
2894
2900
|
const i = instance;
|
|
2895
|
-
i.
|
|
2896
|
-
|
|
2901
|
+
if (!(i.effect.flags & 1024)) {
|
|
2902
|
+
i.renderCache = [];
|
|
2903
|
+
i.effect.run();
|
|
2904
|
+
}
|
|
2897
2905
|
}
|
|
2898
2906
|
nextTick(() => {
|
|
2899
2907
|
isHmrUpdating = false;
|
|
@@ -2935,7 +2943,10 @@ var Vue = (function () {
|
|
|
2935
2943
|
if (parent.vapor) {
|
|
2936
2944
|
parent.hmrRerender();
|
|
2937
2945
|
} else {
|
|
2938
|
-
parent.effect.
|
|
2946
|
+
if (!(parent.effect.flags & 1024)) {
|
|
2947
|
+
parent.renderCache = [];
|
|
2948
|
+
parent.effect.run();
|
|
2949
|
+
}
|
|
2939
2950
|
}
|
|
2940
2951
|
nextTick(() => {
|
|
2941
2952
|
isHmrUpdating = false;
|
|
@@ -3045,7 +3056,6 @@ var Vue = (function () {
|
|
|
3045
3056
|
_devtoolsComponentRemoved(component);
|
|
3046
3057
|
}
|
|
3047
3058
|
};
|
|
3048
|
-
/*! #__NO_SIDE_EFFECTS__ */
|
|
3049
3059
|
// @__NO_SIDE_EFFECTS__
|
|
3050
3060
|
function createDevtoolsComponentHook(hook) {
|
|
3051
3061
|
return (component) => {
|
|
@@ -3759,9 +3769,6 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
3759
3769
|
insert(mainAnchor, container, anchor);
|
|
3760
3770
|
const mount = (container2, anchor2) => {
|
|
3761
3771
|
if (shapeFlag & 16) {
|
|
3762
|
-
if (parentComponent && parentComponent.isCE) {
|
|
3763
|
-
parentComponent.ce._teleportTarget = container2;
|
|
3764
|
-
}
|
|
3765
3772
|
mountChildren(
|
|
3766
3773
|
children,
|
|
3767
3774
|
container2,
|
|
@@ -3783,6 +3790,9 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
3783
3790
|
} else if (namespace !== "mathml" && isTargetMathML(target)) {
|
|
3784
3791
|
namespace = "mathml";
|
|
3785
3792
|
}
|
|
3793
|
+
if (parentComponent && parentComponent.isCE) {
|
|
3794
|
+
(parentComponent.ce._teleportTargets || (parentComponent.ce._teleportTargets = /* @__PURE__ */ new Set())).add(target);
|
|
3795
|
+
}
|
|
3786
3796
|
if (!disabled) {
|
|
3787
3797
|
mount(target, targetAnchor);
|
|
3788
3798
|
updateCssVars(n2, false);
|
|
@@ -3983,26 +3993,34 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
3983
3993
|
function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, {
|
|
3984
3994
|
o: { nextSibling, parentNode, querySelector, insert, createText }
|
|
3985
3995
|
}, hydrateChildren) {
|
|
3996
|
+
function hydrateDisabledTeleport(node2, vnode2, targetStart, targetAnchor) {
|
|
3997
|
+
vnode2.anchor = hydrateChildren(
|
|
3998
|
+
nextSibling(node2),
|
|
3999
|
+
vnode2,
|
|
4000
|
+
parentNode(node2),
|
|
4001
|
+
parentComponent,
|
|
4002
|
+
parentSuspense,
|
|
4003
|
+
slotScopeIds,
|
|
4004
|
+
optimized
|
|
4005
|
+
);
|
|
4006
|
+
vnode2.targetStart = targetStart;
|
|
4007
|
+
vnode2.targetAnchor = targetAnchor;
|
|
4008
|
+
}
|
|
3986
4009
|
const target = vnode.target = resolveTarget(
|
|
3987
4010
|
vnode.props,
|
|
3988
4011
|
querySelector
|
|
3989
4012
|
);
|
|
4013
|
+
const disabled = isTeleportDisabled(vnode.props);
|
|
3990
4014
|
if (target) {
|
|
3991
|
-
const disabled = isTeleportDisabled(vnode.props);
|
|
3992
4015
|
const targetNode = target._lpa || target.firstChild;
|
|
3993
4016
|
if (vnode.shapeFlag & 16) {
|
|
3994
4017
|
if (disabled) {
|
|
3995
|
-
|
|
3996
|
-
|
|
4018
|
+
hydrateDisabledTeleport(
|
|
4019
|
+
node,
|
|
3997
4020
|
vnode,
|
|
3998
|
-
|
|
3999
|
-
|
|
4000
|
-
parentSuspense,
|
|
4001
|
-
slotScopeIds,
|
|
4002
|
-
optimized
|
|
4021
|
+
targetNode,
|
|
4022
|
+
targetNode && nextSibling(targetNode)
|
|
4003
4023
|
);
|
|
4004
|
-
vnode.targetStart = targetNode;
|
|
4005
|
-
vnode.targetAnchor = targetNode && nextSibling(targetNode);
|
|
4006
4024
|
} else {
|
|
4007
4025
|
vnode.anchor = nextSibling(node);
|
|
4008
4026
|
let targetAnchor = targetNode;
|
|
@@ -4033,6 +4051,10 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
4033
4051
|
}
|
|
4034
4052
|
}
|
|
4035
4053
|
updateCssVars(vnode, disabled);
|
|
4054
|
+
} else if (disabled) {
|
|
4055
|
+
if (vnode.shapeFlag & 16) {
|
|
4056
|
+
hydrateDisabledTeleport(node, vnode, node, nextSibling(node));
|
|
4057
|
+
}
|
|
4036
4058
|
}
|
|
4037
4059
|
return vnode.anchor && nextSibling(vnode.anchor);
|
|
4038
4060
|
}
|
|
@@ -4073,7 +4095,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
4073
4095
|
isMounted: false,
|
|
4074
4096
|
isLeaving: false,
|
|
4075
4097
|
isUnmounting: false,
|
|
4076
|
-
|
|
4098
|
+
leavingNodes: /* @__PURE__ */ new Map()
|
|
4077
4099
|
};
|
|
4078
4100
|
onMounted(() => {
|
|
4079
4101
|
state.isMounted = true;
|
|
@@ -4105,7 +4127,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
4105
4127
|
onAppearCancelled: TransitionHookValidator
|
|
4106
4128
|
};
|
|
4107
4129
|
const recursiveGetSubtree = (instance) => {
|
|
4108
|
-
const subTree = instance.subTree;
|
|
4130
|
+
const subTree = instance.type.__vapor ? instance.block : instance.subTree;
|
|
4109
4131
|
return subTree.component ? recursiveGetSubtree(subTree.component) : subTree;
|
|
4110
4132
|
};
|
|
4111
4133
|
const BaseTransitionImpl = {
|
|
@@ -4122,9 +4144,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
4122
4144
|
const child = findNonCommentChild(children);
|
|
4123
4145
|
const rawProps = toRaw(props);
|
|
4124
4146
|
const { mode } = rawProps;
|
|
4125
|
-
|
|
4126
|
-
warn$1(`invalid <transition> mode: ${mode}`);
|
|
4127
|
-
}
|
|
4147
|
+
checkTransitionMode(mode);
|
|
4128
4148
|
if (state.isLeaving) {
|
|
4129
4149
|
return emptyPlaceholder(child);
|
|
4130
4150
|
}
|
|
@@ -4144,7 +4164,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
4144
4164
|
setTransitionHooks(innerChild, enterHooks);
|
|
4145
4165
|
}
|
|
4146
4166
|
let oldInnerChild = instance.subTree && getInnerChild$1(instance.subTree);
|
|
4147
|
-
if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(
|
|
4167
|
+
if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(oldInnerChild, innerChild) && recursiveGetSubtree(instance).type !== Comment) {
|
|
4148
4168
|
let leavingHooks = resolveTransitionHooks(
|
|
4149
4169
|
oldInnerChild,
|
|
4150
4170
|
rawProps,
|
|
@@ -4216,15 +4236,53 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
4216
4236
|
}
|
|
4217
4237
|
const BaseTransition = BaseTransitionImpl;
|
|
4218
4238
|
function getLeavingNodesForType(state, vnode) {
|
|
4219
|
-
const {
|
|
4220
|
-
let leavingVNodesCache =
|
|
4239
|
+
const { leavingNodes } = state;
|
|
4240
|
+
let leavingVNodesCache = leavingNodes.get(vnode.type);
|
|
4221
4241
|
if (!leavingVNodesCache) {
|
|
4222
4242
|
leavingVNodesCache = /* @__PURE__ */ Object.create(null);
|
|
4223
|
-
|
|
4243
|
+
leavingNodes.set(vnode.type, leavingVNodesCache);
|
|
4224
4244
|
}
|
|
4225
4245
|
return leavingVNodesCache;
|
|
4226
4246
|
}
|
|
4227
4247
|
function resolveTransitionHooks(vnode, props, state, instance, postClone) {
|
|
4248
|
+
const key = String(vnode.key);
|
|
4249
|
+
const leavingVNodesCache = getLeavingNodesForType(state, vnode);
|
|
4250
|
+
const context = {
|
|
4251
|
+
setLeavingNodeCache: () => {
|
|
4252
|
+
leavingVNodesCache[key] = vnode;
|
|
4253
|
+
},
|
|
4254
|
+
unsetLeavingNodeCache: () => {
|
|
4255
|
+
if (leavingVNodesCache[key] === vnode) {
|
|
4256
|
+
delete leavingVNodesCache[key];
|
|
4257
|
+
}
|
|
4258
|
+
},
|
|
4259
|
+
earlyRemove: () => {
|
|
4260
|
+
const leavingVNode = leavingVNodesCache[key];
|
|
4261
|
+
if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el[leaveCbKey]) {
|
|
4262
|
+
leavingVNode.el[leaveCbKey]();
|
|
4263
|
+
}
|
|
4264
|
+
},
|
|
4265
|
+
cloneHooks: (vnode2) => {
|
|
4266
|
+
const hooks = resolveTransitionHooks(
|
|
4267
|
+
vnode2,
|
|
4268
|
+
props,
|
|
4269
|
+
state,
|
|
4270
|
+
instance,
|
|
4271
|
+
postClone
|
|
4272
|
+
);
|
|
4273
|
+
if (postClone) postClone(hooks);
|
|
4274
|
+
return hooks;
|
|
4275
|
+
}
|
|
4276
|
+
};
|
|
4277
|
+
return baseResolveTransitionHooks(context, props, state, instance);
|
|
4278
|
+
}
|
|
4279
|
+
function baseResolveTransitionHooks(context, props, state, instance) {
|
|
4280
|
+
const {
|
|
4281
|
+
setLeavingNodeCache,
|
|
4282
|
+
unsetLeavingNodeCache,
|
|
4283
|
+
earlyRemove,
|
|
4284
|
+
cloneHooks
|
|
4285
|
+
} = context;
|
|
4228
4286
|
const {
|
|
4229
4287
|
appear,
|
|
4230
4288
|
mode,
|
|
@@ -4242,8 +4300,6 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
4242
4300
|
onAfterAppear,
|
|
4243
4301
|
onAppearCancelled
|
|
4244
4302
|
} = props;
|
|
4245
|
-
const key = String(vnode.key);
|
|
4246
|
-
const leavingVNodesCache = getLeavingNodesForType(state, vnode);
|
|
4247
4303
|
const callHook = (hook, args) => {
|
|
4248
4304
|
hook && callWithAsyncErrorHandling(
|
|
4249
4305
|
hook,
|
|
@@ -4279,10 +4335,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
4279
4335
|
/* cancelled */
|
|
4280
4336
|
);
|
|
4281
4337
|
}
|
|
4282
|
-
|
|
4283
|
-
if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el[leaveCbKey]) {
|
|
4284
|
-
leavingVNode.el[leaveCbKey]();
|
|
4285
|
-
}
|
|
4338
|
+
earlyRemove();
|
|
4286
4339
|
callHook(hook, [el]);
|
|
4287
4340
|
},
|
|
4288
4341
|
enter(el) {
|
|
@@ -4319,7 +4372,6 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
4319
4372
|
}
|
|
4320
4373
|
},
|
|
4321
4374
|
leave(el, remove) {
|
|
4322
|
-
const key2 = String(vnode.key);
|
|
4323
4375
|
if (el[enterCbKey$1]) {
|
|
4324
4376
|
el[enterCbKey$1](
|
|
4325
4377
|
true
|
|
@@ -4341,27 +4393,17 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
4341
4393
|
callHook(onAfterLeave, [el]);
|
|
4342
4394
|
}
|
|
4343
4395
|
el[leaveCbKey] = void 0;
|
|
4344
|
-
|
|
4345
|
-
delete leavingVNodesCache[key2];
|
|
4346
|
-
}
|
|
4396
|
+
unsetLeavingNodeCache(el);
|
|
4347
4397
|
};
|
|
4348
|
-
|
|
4398
|
+
setLeavingNodeCache(el);
|
|
4349
4399
|
if (onLeave) {
|
|
4350
4400
|
callAsyncHook(onLeave, [el, done]);
|
|
4351
4401
|
} else {
|
|
4352
4402
|
done();
|
|
4353
4403
|
}
|
|
4354
4404
|
},
|
|
4355
|
-
clone(
|
|
4356
|
-
|
|
4357
|
-
vnode2,
|
|
4358
|
-
props,
|
|
4359
|
-
state,
|
|
4360
|
-
instance,
|
|
4361
|
-
postClone
|
|
4362
|
-
);
|
|
4363
|
-
if (postClone) postClone(hooks2);
|
|
4364
|
-
return hooks2;
|
|
4405
|
+
clone(node) {
|
|
4406
|
+
return cloneHooks(node);
|
|
4365
4407
|
}
|
|
4366
4408
|
};
|
|
4367
4409
|
return hooks;
|
|
@@ -4395,8 +4437,15 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
4395
4437
|
}
|
|
4396
4438
|
function setTransitionHooks(vnode, hooks) {
|
|
4397
4439
|
if (vnode.shapeFlag & 6 && vnode.component) {
|
|
4398
|
-
vnode.
|
|
4399
|
-
|
|
4440
|
+
if (vnode.type.__vapor) {
|
|
4441
|
+
getVaporInterface(vnode.component, vnode).setTransitionHooks(
|
|
4442
|
+
vnode.component,
|
|
4443
|
+
hooks
|
|
4444
|
+
);
|
|
4445
|
+
} else {
|
|
4446
|
+
vnode.transition = hooks;
|
|
4447
|
+
setTransitionHooks(vnode.component.subTree, hooks);
|
|
4448
|
+
}
|
|
4400
4449
|
} else if (vnode.shapeFlag & 128) {
|
|
4401
4450
|
vnode.ssContent.transition = hooks.clone(vnode.ssContent);
|
|
4402
4451
|
vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
|
|
@@ -4426,8 +4475,12 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
4426
4475
|
}
|
|
4427
4476
|
return ret;
|
|
4428
4477
|
}
|
|
4478
|
+
function checkTransitionMode(mode) {
|
|
4479
|
+
if (mode && mode !== "in-out" && mode !== "out-in" && mode !== "default") {
|
|
4480
|
+
warn$1(`invalid <transition> mode: ${mode}`);
|
|
4481
|
+
}
|
|
4482
|
+
}
|
|
4429
4483
|
|
|
4430
|
-
/*! #__NO_SIDE_EFFECTS__ */
|
|
4431
4484
|
// @__NO_SIDE_EFFECTS__
|
|
4432
4485
|
function defineComponent(options, extraOptions) {
|
|
4433
4486
|
return isFunction(options) ? (
|
|
@@ -4480,6 +4533,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
4480
4533
|
return ret;
|
|
4481
4534
|
}
|
|
4482
4535
|
|
|
4536
|
+
const pendingSetRefMap = /* @__PURE__ */ new WeakMap();
|
|
4483
4537
|
function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
4484
4538
|
if (isArray(rawRef)) {
|
|
4485
4539
|
rawRef.forEach(
|
|
@@ -4511,28 +4565,23 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
4511
4565
|
const oldRef = oldRawRef && oldRawRef.r;
|
|
4512
4566
|
const refs = owner.refs === EMPTY_OBJ ? owner.refs = {} : owner.refs;
|
|
4513
4567
|
const setupState = owner.setupState;
|
|
4514
|
-
const
|
|
4515
|
-
const
|
|
4516
|
-
|
|
4517
|
-
if (hasOwn(rawSetupState, key) && !isRef(rawSetupState[key])) {
|
|
4518
|
-
warn$1(
|
|
4519
|
-
`Template ref "${key}" used on a non-ref value. It will not work in the production build.`
|
|
4520
|
-
);
|
|
4521
|
-
}
|
|
4522
|
-
if (knownTemplateRefs.has(rawSetupState[key])) {
|
|
4523
|
-
return false;
|
|
4524
|
-
}
|
|
4525
|
-
}
|
|
4526
|
-
return hasOwn(rawSetupState, key);
|
|
4568
|
+
const canSetSetupRef = createCanSetSetupRefChecker(setupState);
|
|
4569
|
+
const canSetRef = (ref2) => {
|
|
4570
|
+
return !knownTemplateRefs.has(ref2);
|
|
4527
4571
|
};
|
|
4528
4572
|
if (oldRef != null && oldRef !== ref) {
|
|
4573
|
+
invalidatePendingSetRef(oldRawRef);
|
|
4529
4574
|
if (isString(oldRef)) {
|
|
4530
4575
|
refs[oldRef] = null;
|
|
4531
4576
|
if (canSetSetupRef(oldRef)) {
|
|
4532
4577
|
setupState[oldRef] = null;
|
|
4533
4578
|
}
|
|
4534
4579
|
} else if (isRef(oldRef)) {
|
|
4535
|
-
oldRef
|
|
4580
|
+
if (canSetRef(oldRef)) {
|
|
4581
|
+
oldRef.value = null;
|
|
4582
|
+
}
|
|
4583
|
+
const oldRawRefAtom = oldRawRef;
|
|
4584
|
+
if (oldRawRefAtom.k) refs[oldRawRefAtom.k] = null;
|
|
4536
4585
|
}
|
|
4537
4586
|
}
|
|
4538
4587
|
if (isFunction(ref)) {
|
|
@@ -4543,7 +4592,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
4543
4592
|
if (_isString || _isRef) {
|
|
4544
4593
|
const doSet = () => {
|
|
4545
4594
|
if (rawRef.f) {
|
|
4546
|
-
const existing = _isString ? canSetSetupRef(ref) ? setupState[ref] : refs[ref] : ref.value;
|
|
4595
|
+
const existing = _isString ? canSetSetupRef(ref) ? setupState[ref] : refs[ref] : canSetRef(ref) || !rawRef.k ? ref.value : refs[rawRef.k];
|
|
4547
4596
|
if (isUnmount) {
|
|
4548
4597
|
isArray(existing) && remove(existing, refValue);
|
|
4549
4598
|
} else {
|
|
@@ -4554,8 +4603,11 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
4554
4603
|
setupState[ref] = refs[ref];
|
|
4555
4604
|
}
|
|
4556
4605
|
} else {
|
|
4557
|
-
|
|
4558
|
-
if (
|
|
4606
|
+
const newVal = [refValue];
|
|
4607
|
+
if (canSetRef(ref)) {
|
|
4608
|
+
ref.value = newVal;
|
|
4609
|
+
}
|
|
4610
|
+
if (rawRef.k) refs[rawRef.k] = newVal;
|
|
4559
4611
|
}
|
|
4560
4612
|
} else if (!existing.includes(refValue)) {
|
|
4561
4613
|
existing.push(refValue);
|
|
@@ -4567,15 +4619,23 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
4567
4619
|
setupState[ref] = value;
|
|
4568
4620
|
}
|
|
4569
4621
|
} else if (_isRef) {
|
|
4570
|
-
ref
|
|
4622
|
+
if (canSetRef(ref)) {
|
|
4623
|
+
ref.value = value;
|
|
4624
|
+
}
|
|
4571
4625
|
if (rawRef.k) refs[rawRef.k] = value;
|
|
4572
4626
|
} else {
|
|
4573
4627
|
warn$1("Invalid template ref type:", ref, `(${typeof ref})`);
|
|
4574
4628
|
}
|
|
4575
4629
|
};
|
|
4576
4630
|
if (value) {
|
|
4577
|
-
|
|
4631
|
+
const job = () => {
|
|
4632
|
+
doSet();
|
|
4633
|
+
pendingSetRefMap.delete(rawRef);
|
|
4634
|
+
};
|
|
4635
|
+
pendingSetRefMap.set(rawRef, job);
|
|
4636
|
+
queuePostRenderEffect(job, -1, parentSuspense);
|
|
4578
4637
|
} else {
|
|
4638
|
+
invalidatePendingSetRef(rawRef);
|
|
4579
4639
|
doSet();
|
|
4580
4640
|
}
|
|
4581
4641
|
} else {
|
|
@@ -4583,6 +4643,29 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
4583
4643
|
}
|
|
4584
4644
|
}
|
|
4585
4645
|
}
|
|
4646
|
+
function createCanSetSetupRefChecker(setupState) {
|
|
4647
|
+
const rawSetupState = toRaw(setupState);
|
|
4648
|
+
return setupState === void 0 || setupState === EMPTY_OBJ ? NO : (key) => {
|
|
4649
|
+
{
|
|
4650
|
+
if (hasOwn(rawSetupState, key) && !isRef(rawSetupState[key])) {
|
|
4651
|
+
warn$1(
|
|
4652
|
+
`Template ref "${key}" used on a non-ref value. It will not work in the production build.`
|
|
4653
|
+
);
|
|
4654
|
+
}
|
|
4655
|
+
if (knownTemplateRefs.has(rawSetupState[key])) {
|
|
4656
|
+
return false;
|
|
4657
|
+
}
|
|
4658
|
+
}
|
|
4659
|
+
return hasOwn(rawSetupState, key);
|
|
4660
|
+
};
|
|
4661
|
+
}
|
|
4662
|
+
function invalidatePendingSetRef(rawRef) {
|
|
4663
|
+
const pendingSetRef = pendingSetRefMap.get(rawRef);
|
|
4664
|
+
if (pendingSetRef) {
|
|
4665
|
+
pendingSetRef.flags |= 4;
|
|
4666
|
+
pendingSetRefMap.delete(rawRef);
|
|
4667
|
+
}
|
|
4668
|
+
}
|
|
4586
4669
|
|
|
4587
4670
|
let hasLoggedMismatchError = false;
|
|
4588
4671
|
const logMismatchError = () => {
|
|
@@ -4679,7 +4762,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
4679
4762
|
}
|
|
4680
4763
|
break;
|
|
4681
4764
|
case Comment:
|
|
4682
|
-
if (isTemplateNode(node)) {
|
|
4765
|
+
if (isTemplateNode$1(node)) {
|
|
4683
4766
|
nextNode = nextSibling(node);
|
|
4684
4767
|
replaceNode(
|
|
4685
4768
|
vnode.el = node.content.firstChild,
|
|
@@ -4727,9 +4810,15 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
4727
4810
|
);
|
|
4728
4811
|
}
|
|
4729
4812
|
break;
|
|
4813
|
+
case VaporSlot:
|
|
4814
|
+
nextNode = getVaporInterface(parentComponent, vnode).hydrateSlot(
|
|
4815
|
+
vnode,
|
|
4816
|
+
node
|
|
4817
|
+
);
|
|
4818
|
+
break;
|
|
4730
4819
|
default:
|
|
4731
4820
|
if (shapeFlag & 1) {
|
|
4732
|
-
if ((domType !== 1 || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) && !isTemplateNode(node)) {
|
|
4821
|
+
if ((domType !== 1 || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) && !isTemplateNode$1(node)) {
|
|
4733
4822
|
nextNode = onMismatch();
|
|
4734
4823
|
} else {
|
|
4735
4824
|
nextNode = hydrateElement(
|
|
@@ -4742,9 +4831,6 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
4742
4831
|
);
|
|
4743
4832
|
}
|
|
4744
4833
|
} else if (shapeFlag & 6) {
|
|
4745
|
-
if (vnode.type.__vapor) {
|
|
4746
|
-
throw new Error("Vapor component hydration is not supported yet.");
|
|
4747
|
-
}
|
|
4748
4834
|
vnode.slotScopeIds = slotScopeIds;
|
|
4749
4835
|
const container = parentNode(node);
|
|
4750
4836
|
if (isFragmentStart) {
|
|
@@ -4754,15 +4840,25 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
4754
4840
|
} else {
|
|
4755
4841
|
nextNode = nextSibling(node);
|
|
4756
4842
|
}
|
|
4757
|
-
|
|
4758
|
-
vnode
|
|
4759
|
-
|
|
4760
|
-
|
|
4761
|
-
|
|
4762
|
-
|
|
4763
|
-
|
|
4764
|
-
|
|
4765
|
-
|
|
4843
|
+
if (vnode.type.__vapor) {
|
|
4844
|
+
getVaporInterface(parentComponent, vnode).hydrate(
|
|
4845
|
+
vnode,
|
|
4846
|
+
node,
|
|
4847
|
+
container,
|
|
4848
|
+
null,
|
|
4849
|
+
parentComponent
|
|
4850
|
+
);
|
|
4851
|
+
} else {
|
|
4852
|
+
mountComponent(
|
|
4853
|
+
vnode,
|
|
4854
|
+
container,
|
|
4855
|
+
null,
|
|
4856
|
+
parentComponent,
|
|
4857
|
+
parentSuspense,
|
|
4858
|
+
getContainerType(container),
|
|
4859
|
+
optimized
|
|
4860
|
+
);
|
|
4861
|
+
}
|
|
4766
4862
|
if (isAsyncWrapper(vnode) && !vnode.type.__asyncResolved) {
|
|
4767
4863
|
let subTree;
|
|
4768
4864
|
if (isFragmentStart) {
|
|
@@ -4819,7 +4915,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
4819
4915
|
invokeDirectiveHook(vnode, null, parentComponent, "created");
|
|
4820
4916
|
}
|
|
4821
4917
|
let needCallTransitionHooks = false;
|
|
4822
|
-
if (isTemplateNode(el)) {
|
|
4918
|
+
if (isTemplateNode$1(el)) {
|
|
4823
4919
|
needCallTransitionHooks = needTransition(
|
|
4824
4920
|
null,
|
|
4825
4921
|
// no need check parentSuspense in hydration
|
|
@@ -4847,7 +4943,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
4847
4943
|
);
|
|
4848
4944
|
let hasWarned = false;
|
|
4849
4945
|
while (next) {
|
|
4850
|
-
if (!isMismatchAllowed(el, 1
|
|
4946
|
+
if (!isMismatchAllowed(el, 1)) {
|
|
4851
4947
|
if (!hasWarned) {
|
|
4852
4948
|
warn$1(
|
|
4853
4949
|
`Hydration children mismatch on`,
|
|
@@ -4868,14 +4964,16 @@ Server rendered element contains more child nodes than client vdom.`
|
|
|
4868
4964
|
if (clientText[0] === "\n" && (el.tagName === "PRE" || el.tagName === "TEXTAREA")) {
|
|
4869
4965
|
clientText = clientText.slice(1);
|
|
4870
4966
|
}
|
|
4871
|
-
|
|
4872
|
-
|
|
4967
|
+
const { textContent } = el;
|
|
4968
|
+
if (textContent !== clientText && // innerHTML normalize \r\n or \r into a single \n in the DOM
|
|
4969
|
+
textContent !== clientText.replace(/\r\n|\r/g, "\n")) {
|
|
4970
|
+
if (!isMismatchAllowed(el, 0)) {
|
|
4873
4971
|
warn$1(
|
|
4874
4972
|
`Hydration text content mismatch on`,
|
|
4875
4973
|
el,
|
|
4876
4974
|
`
|
|
4877
|
-
- rendered on server: ${
|
|
4878
|
-
- expected on client: ${
|
|
4975
|
+
- rendered on server: ${textContent}
|
|
4976
|
+
- expected on client: ${clientText}`
|
|
4879
4977
|
);
|
|
4880
4978
|
logMismatchError();
|
|
4881
4979
|
}
|
|
@@ -4951,7 +5049,7 @@ Server rendered element contains more child nodes than client vdom.`
|
|
|
4951
5049
|
} else if (isText && !vnode.children) {
|
|
4952
5050
|
insert(vnode.el = createText(""), container);
|
|
4953
5051
|
} else {
|
|
4954
|
-
if (!isMismatchAllowed(container, 1
|
|
5052
|
+
if (!isMismatchAllowed(container, 1)) {
|
|
4955
5053
|
if (!hasWarned) {
|
|
4956
5054
|
warn$1(
|
|
4957
5055
|
`Hydration children mismatch on`,
|
|
@@ -5001,7 +5099,7 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
5001
5099
|
}
|
|
5002
5100
|
};
|
|
5003
5101
|
const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => {
|
|
5004
|
-
if (!isMismatchAllowed(node.parentElement, 1
|
|
5102
|
+
if (!isMismatchAllowed(node.parentElement, 1)) {
|
|
5005
5103
|
warn$1(
|
|
5006
5104
|
`Hydration node mismatch:
|
|
5007
5105
|
- rendered on server:`,
|
|
@@ -5074,11 +5172,11 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
5074
5172
|
parent = parent.parent;
|
|
5075
5173
|
}
|
|
5076
5174
|
};
|
|
5077
|
-
const isTemplateNode = (node) => {
|
|
5078
|
-
return node.nodeType === 1 && node.tagName === "TEMPLATE";
|
|
5079
|
-
};
|
|
5080
5175
|
return [hydrate, hydrateNode];
|
|
5081
5176
|
}
|
|
5177
|
+
const isTemplateNode$1 = (node) => {
|
|
5178
|
+
return node.nodeType === 1 && node.tagName === "TEMPLATE";
|
|
5179
|
+
};
|
|
5082
5180
|
function propHasMismatch(el, key, clientValue, vnode, instance) {
|
|
5083
5181
|
let mismatchType;
|
|
5084
5182
|
let mismatchKey;
|
|
@@ -5093,7 +5191,7 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
5093
5191
|
}
|
|
5094
5192
|
expected = normalizeClass(clientValue);
|
|
5095
5193
|
if (!isSetEqual(toClassSet(actual || ""), toClassSet(expected))) {
|
|
5096
|
-
mismatchType = 2
|
|
5194
|
+
mismatchType = 2;
|
|
5097
5195
|
mismatchKey = `class`;
|
|
5098
5196
|
}
|
|
5099
5197
|
} else if (key === "style") {
|
|
@@ -5112,31 +5210,43 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
5112
5210
|
resolveCssVars(instance, vnode, expectedMap);
|
|
5113
5211
|
}
|
|
5114
5212
|
if (!isMapEqual(actualMap, expectedMap)) {
|
|
5115
|
-
mismatchType = 3
|
|
5213
|
+
mismatchType = 3;
|
|
5116
5214
|
mismatchKey = "style";
|
|
5117
5215
|
}
|
|
5118
|
-
} else if (
|
|
5119
|
-
|
|
5120
|
-
actual = el.hasAttribute(key);
|
|
5121
|
-
expected = includeBooleanAttr(clientValue);
|
|
5122
|
-
} else if (clientValue == null) {
|
|
5123
|
-
actual = el.hasAttribute(key);
|
|
5124
|
-
expected = false;
|
|
5125
|
-
} else {
|
|
5126
|
-
if (el.hasAttribute(key)) {
|
|
5127
|
-
actual = el.getAttribute(key);
|
|
5128
|
-
} else if (key === "value" && el.tagName === "TEXTAREA") {
|
|
5129
|
-
actual = el.value;
|
|
5130
|
-
} else {
|
|
5131
|
-
actual = false;
|
|
5132
|
-
}
|
|
5133
|
-
expected = isRenderableAttrValue(clientValue) ? String(clientValue) : false;
|
|
5134
|
-
}
|
|
5216
|
+
} else if (isValidHtmlOrSvgAttribute(el, key)) {
|
|
5217
|
+
({ actual, expected } = getAttributeMismatch(el, key, clientValue));
|
|
5135
5218
|
if (actual !== expected) {
|
|
5136
|
-
mismatchType = 4
|
|
5219
|
+
mismatchType = 4;
|
|
5137
5220
|
mismatchKey = key;
|
|
5138
5221
|
}
|
|
5139
5222
|
}
|
|
5223
|
+
return warnPropMismatch(el, mismatchKey, mismatchType, actual, expected);
|
|
5224
|
+
}
|
|
5225
|
+
function getAttributeMismatch(el, key, clientValue) {
|
|
5226
|
+
let actual;
|
|
5227
|
+
let expected;
|
|
5228
|
+
if (isBooleanAttr(key)) {
|
|
5229
|
+
actual = el.hasAttribute(key);
|
|
5230
|
+
expected = includeBooleanAttr(clientValue);
|
|
5231
|
+
} else if (clientValue == null) {
|
|
5232
|
+
actual = el.hasAttribute(key);
|
|
5233
|
+
expected = false;
|
|
5234
|
+
} else {
|
|
5235
|
+
if (el.hasAttribute(key)) {
|
|
5236
|
+
actual = el.getAttribute(key);
|
|
5237
|
+
} else if (key === "value" && el.tagName === "TEXTAREA") {
|
|
5238
|
+
actual = el.value;
|
|
5239
|
+
} else {
|
|
5240
|
+
actual = false;
|
|
5241
|
+
}
|
|
5242
|
+
expected = isRenderableAttrValue(clientValue) ? String(clientValue) : false;
|
|
5243
|
+
}
|
|
5244
|
+
return { actual, expected };
|
|
5245
|
+
}
|
|
5246
|
+
function isValidHtmlOrSvgAttribute(el, key) {
|
|
5247
|
+
return el instanceof SVGElement && isKnownSvgAttr(key) || el instanceof HTMLElement && (isBooleanAttr(key) || isKnownHtmlAttr(key));
|
|
5248
|
+
}
|
|
5249
|
+
function warnPropMismatch(el, mismatchKey, mismatchType, actual, expected) {
|
|
5140
5250
|
if (mismatchType != null && !isMismatchAllowed(el, mismatchType)) {
|
|
5141
5251
|
const format = (v) => v === false ? `(not rendered)` : `${mismatchKey}="${v}"`;
|
|
5142
5252
|
const preSegment = `Hydration ${MismatchTypeString[mismatchType]} mismatch on`;
|
|
@@ -5208,14 +5318,14 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
5208
5318
|
}
|
|
5209
5319
|
const allowMismatchAttr = "data-allow-mismatch";
|
|
5210
5320
|
const MismatchTypeString = {
|
|
5211
|
-
[0
|
|
5212
|
-
[1
|
|
5213
|
-
[2
|
|
5214
|
-
[3
|
|
5215
|
-
[4
|
|
5321
|
+
[0]: "text",
|
|
5322
|
+
[1]: "children",
|
|
5323
|
+
[2]: "class",
|
|
5324
|
+
[3]: "style",
|
|
5325
|
+
[4]: "attribute"
|
|
5216
5326
|
};
|
|
5217
5327
|
function isMismatchAllowed(el, allowedType) {
|
|
5218
|
-
if (allowedType === 0
|
|
5328
|
+
if (allowedType === 0 || allowedType === 1) {
|
|
5219
5329
|
while (el && !el.hasAttribute(allowMismatchAttr)) {
|
|
5220
5330
|
el = el.parentElement;
|
|
5221
5331
|
}
|
|
@@ -5227,7 +5337,7 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
5227
5337
|
return true;
|
|
5228
5338
|
} else {
|
|
5229
5339
|
const list = allowedAttr.split(",");
|
|
5230
|
-
if (allowedType === 0
|
|
5340
|
+
if (allowedType === 0 && list.includes("children")) {
|
|
5231
5341
|
return true;
|
|
5232
5342
|
}
|
|
5233
5343
|
return list.includes(MismatchTypeString[allowedType]);
|
|
@@ -5284,7 +5394,9 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
5284
5394
|
hasHydrated = true;
|
|
5285
5395
|
teardown();
|
|
5286
5396
|
hydrate();
|
|
5287
|
-
|
|
5397
|
+
if (!(`$evt${e.type}` in e.target)) {
|
|
5398
|
+
e.target.dispatchEvent(new e.constructor(e.type, e));
|
|
5399
|
+
}
|
|
5288
5400
|
}
|
|
5289
5401
|
};
|
|
5290
5402
|
const teardown = () => {
|
|
@@ -5326,104 +5438,46 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
5326
5438
|
}
|
|
5327
5439
|
|
|
5328
5440
|
const isAsyncWrapper = (i) => !!i.type.__asyncLoader;
|
|
5329
|
-
/*! #__NO_SIDE_EFFECTS__ */
|
|
5330
5441
|
// @__NO_SIDE_EFFECTS__
|
|
5331
5442
|
function defineAsyncComponent(source) {
|
|
5332
|
-
if (isFunction(source)) {
|
|
5333
|
-
source = { loader: source };
|
|
5334
|
-
}
|
|
5335
5443
|
const {
|
|
5336
|
-
|
|
5337
|
-
|
|
5338
|
-
|
|
5339
|
-
|
|
5340
|
-
|
|
5341
|
-
|
|
5342
|
-
|
|
5343
|
-
|
|
5344
|
-
|
|
5345
|
-
|
|
5346
|
-
|
|
5347
|
-
|
|
5348
|
-
let retries = 0;
|
|
5349
|
-
const retry = () => {
|
|
5350
|
-
retries++;
|
|
5351
|
-
pendingRequest = null;
|
|
5352
|
-
return load();
|
|
5353
|
-
};
|
|
5354
|
-
const load = () => {
|
|
5355
|
-
let thisRequest;
|
|
5356
|
-
return pendingRequest || (thisRequest = pendingRequest = loader().catch((err) => {
|
|
5357
|
-
err = err instanceof Error ? err : new Error(String(err));
|
|
5358
|
-
if (userOnError) {
|
|
5359
|
-
return new Promise((resolve, reject) => {
|
|
5360
|
-
const userRetry = () => resolve(retry());
|
|
5361
|
-
const userFail = () => reject(err);
|
|
5362
|
-
userOnError(err, userRetry, userFail, retries + 1);
|
|
5363
|
-
});
|
|
5364
|
-
} else {
|
|
5365
|
-
throw err;
|
|
5366
|
-
}
|
|
5367
|
-
}).then((comp) => {
|
|
5368
|
-
if (thisRequest !== pendingRequest && pendingRequest) {
|
|
5369
|
-
return pendingRequest;
|
|
5370
|
-
}
|
|
5371
|
-
if (!comp) {
|
|
5372
|
-
warn$1(
|
|
5373
|
-
`Async component loader resolved to undefined. If you are using retry(), make sure to return its return value.`
|
|
5374
|
-
);
|
|
5375
|
-
}
|
|
5376
|
-
if (comp && (comp.__esModule || comp[Symbol.toStringTag] === "Module")) {
|
|
5377
|
-
comp = comp.default;
|
|
5378
|
-
}
|
|
5379
|
-
if (comp && !isObject(comp) && !isFunction(comp)) {
|
|
5380
|
-
throw new Error(`Invalid async component load result: ${comp}`);
|
|
5381
|
-
}
|
|
5382
|
-
resolvedComp = comp;
|
|
5383
|
-
return comp;
|
|
5384
|
-
}));
|
|
5385
|
-
};
|
|
5444
|
+
load,
|
|
5445
|
+
getResolvedComp,
|
|
5446
|
+
setPendingRequest,
|
|
5447
|
+
source: {
|
|
5448
|
+
loadingComponent,
|
|
5449
|
+
errorComponent,
|
|
5450
|
+
delay,
|
|
5451
|
+
hydrate: hydrateStrategy,
|
|
5452
|
+
timeout,
|
|
5453
|
+
suspensible = true
|
|
5454
|
+
}
|
|
5455
|
+
} = createAsyncComponentContext(source);
|
|
5386
5456
|
return defineComponent({
|
|
5387
5457
|
name: "AsyncComponentWrapper",
|
|
5388
5458
|
__asyncLoader: load,
|
|
5389
5459
|
__asyncHydrate(el, instance, hydrate) {
|
|
5390
|
-
|
|
5391
|
-
|
|
5392
|
-
|
|
5393
|
-
|
|
5394
|
-
|
|
5395
|
-
|
|
5396
|
-
|
|
5397
|
-
|
|
5398
|
-
}
|
|
5399
|
-
hydrate();
|
|
5400
|
-
};
|
|
5401
|
-
const teardown = hydrateStrategy(
|
|
5402
|
-
performHydrate,
|
|
5403
|
-
(cb) => forEachElement(el, cb)
|
|
5404
|
-
);
|
|
5405
|
-
if (teardown) {
|
|
5406
|
-
(instance.bum || (instance.bum = [])).push(teardown);
|
|
5407
|
-
}
|
|
5408
|
-
(instance.u || (instance.u = [])).push(() => patched = true);
|
|
5409
|
-
} : hydrate;
|
|
5410
|
-
if (resolvedComp) {
|
|
5411
|
-
doHydrate();
|
|
5412
|
-
} else {
|
|
5413
|
-
load().then(() => !instance.isUnmounted && doHydrate());
|
|
5414
|
-
}
|
|
5460
|
+
performAsyncHydrate(
|
|
5461
|
+
el,
|
|
5462
|
+
instance,
|
|
5463
|
+
hydrate,
|
|
5464
|
+
getResolvedComp,
|
|
5465
|
+
load,
|
|
5466
|
+
hydrateStrategy
|
|
5467
|
+
);
|
|
5415
5468
|
},
|
|
5416
5469
|
get __asyncResolved() {
|
|
5417
|
-
return
|
|
5470
|
+
return getResolvedComp();
|
|
5418
5471
|
},
|
|
5419
5472
|
setup() {
|
|
5420
5473
|
const instance = currentInstance;
|
|
5421
5474
|
markAsyncBoundary(instance);
|
|
5475
|
+
let resolvedComp = getResolvedComp();
|
|
5422
5476
|
if (resolvedComp) {
|
|
5423
5477
|
return () => createInnerComp(resolvedComp, instance);
|
|
5424
5478
|
}
|
|
5425
5479
|
const onError = (err) => {
|
|
5426
|
-
|
|
5480
|
+
setPendingRequest(null);
|
|
5427
5481
|
handleError(
|
|
5428
5482
|
err,
|
|
5429
5483
|
instance,
|
|
@@ -5441,25 +5495,11 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
5441
5495
|
}) : null;
|
|
5442
5496
|
});
|
|
5443
5497
|
}
|
|
5444
|
-
const loaded =
|
|
5445
|
-
|
|
5446
|
-
|
|
5447
|
-
|
|
5448
|
-
|
|
5449
|
-
delayed.value = false;
|
|
5450
|
-
}, delay);
|
|
5451
|
-
}
|
|
5452
|
-
if (timeout != null) {
|
|
5453
|
-
setTimeout(() => {
|
|
5454
|
-
if (!loaded.value && !error.value) {
|
|
5455
|
-
const err = new Error(
|
|
5456
|
-
`Async component timed out after ${timeout}ms.`
|
|
5457
|
-
);
|
|
5458
|
-
onError(err);
|
|
5459
|
-
error.value = err;
|
|
5460
|
-
}
|
|
5461
|
-
}, timeout);
|
|
5462
|
-
}
|
|
5498
|
+
const { loaded, error, delayed } = useAsyncComponentState(
|
|
5499
|
+
delay,
|
|
5500
|
+
timeout,
|
|
5501
|
+
onError
|
|
5502
|
+
);
|
|
5463
5503
|
load().then(() => {
|
|
5464
5504
|
loaded.value = true;
|
|
5465
5505
|
if (instance.parent && instance.parent.vnode && isKeepAlive(instance.parent.vnode)) {
|
|
@@ -5470,6 +5510,7 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
5470
5510
|
error.value = err;
|
|
5471
5511
|
});
|
|
5472
5512
|
return () => {
|
|
5513
|
+
resolvedComp = getResolvedComp();
|
|
5473
5514
|
if (loaded.value && resolvedComp) {
|
|
5474
5515
|
return createInnerComp(resolvedComp, instance);
|
|
5475
5516
|
} else if (error.value && errorComponent) {
|
|
@@ -5477,7 +5518,10 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
5477
5518
|
error: error.value
|
|
5478
5519
|
});
|
|
5479
5520
|
} else if (loadingComponent && !delayed.value) {
|
|
5480
|
-
return
|
|
5521
|
+
return createInnerComp(
|
|
5522
|
+
loadingComponent,
|
|
5523
|
+
instance
|
|
5524
|
+
);
|
|
5481
5525
|
}
|
|
5482
5526
|
};
|
|
5483
5527
|
}
|
|
@@ -5491,6 +5535,108 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
5491
5535
|
delete parent.vnode.ce;
|
|
5492
5536
|
return vnode;
|
|
5493
5537
|
}
|
|
5538
|
+
function createAsyncComponentContext(source) {
|
|
5539
|
+
if (isFunction(source)) {
|
|
5540
|
+
source = { loader: source };
|
|
5541
|
+
}
|
|
5542
|
+
const { loader, onError: userOnError } = source;
|
|
5543
|
+
let pendingRequest = null;
|
|
5544
|
+
let resolvedComp;
|
|
5545
|
+
let retries = 0;
|
|
5546
|
+
const retry = () => {
|
|
5547
|
+
retries++;
|
|
5548
|
+
pendingRequest = null;
|
|
5549
|
+
return load();
|
|
5550
|
+
};
|
|
5551
|
+
const load = () => {
|
|
5552
|
+
let thisRequest;
|
|
5553
|
+
return pendingRequest || (thisRequest = pendingRequest = loader().catch((err) => {
|
|
5554
|
+
err = err instanceof Error ? err : new Error(String(err));
|
|
5555
|
+
if (userOnError) {
|
|
5556
|
+
return new Promise((resolve, reject) => {
|
|
5557
|
+
const userRetry = () => resolve(retry());
|
|
5558
|
+
const userFail = () => reject(err);
|
|
5559
|
+
userOnError(err, userRetry, userFail, retries + 1);
|
|
5560
|
+
});
|
|
5561
|
+
} else {
|
|
5562
|
+
throw err;
|
|
5563
|
+
}
|
|
5564
|
+
}).then((comp) => {
|
|
5565
|
+
if (thisRequest !== pendingRequest && pendingRequest) {
|
|
5566
|
+
return pendingRequest;
|
|
5567
|
+
}
|
|
5568
|
+
if (!comp) {
|
|
5569
|
+
warn$1(
|
|
5570
|
+
`Async component loader resolved to undefined. If you are using retry(), make sure to return its return value.`
|
|
5571
|
+
);
|
|
5572
|
+
}
|
|
5573
|
+
if (comp && (comp.__esModule || comp[Symbol.toStringTag] === "Module")) {
|
|
5574
|
+
comp = comp.default;
|
|
5575
|
+
}
|
|
5576
|
+
if (comp && !isObject(comp) && !isFunction(comp)) {
|
|
5577
|
+
throw new Error(`Invalid async component load result: ${comp}`);
|
|
5578
|
+
}
|
|
5579
|
+
resolvedComp = comp;
|
|
5580
|
+
return comp;
|
|
5581
|
+
}));
|
|
5582
|
+
};
|
|
5583
|
+
return {
|
|
5584
|
+
load,
|
|
5585
|
+
source,
|
|
5586
|
+
getResolvedComp: () => resolvedComp,
|
|
5587
|
+
setPendingRequest: (request) => pendingRequest = request
|
|
5588
|
+
};
|
|
5589
|
+
}
|
|
5590
|
+
const useAsyncComponentState = (delay, timeout, onError) => {
|
|
5591
|
+
const loaded = ref(false);
|
|
5592
|
+
const error = ref();
|
|
5593
|
+
const delayed = ref(!!delay);
|
|
5594
|
+
if (delay) {
|
|
5595
|
+
setTimeout(() => {
|
|
5596
|
+
delayed.value = false;
|
|
5597
|
+
}, delay);
|
|
5598
|
+
}
|
|
5599
|
+
if (timeout != null) {
|
|
5600
|
+
setTimeout(() => {
|
|
5601
|
+
if (!loaded.value && !error.value) {
|
|
5602
|
+
const err = new Error(`Async component timed out after ${timeout}ms.`);
|
|
5603
|
+
onError(err);
|
|
5604
|
+
error.value = err;
|
|
5605
|
+
}
|
|
5606
|
+
}, timeout);
|
|
5607
|
+
}
|
|
5608
|
+
return { loaded, error, delayed };
|
|
5609
|
+
};
|
|
5610
|
+
function performAsyncHydrate(el, instance, hydrate, getResolvedComp, load, hydrateStrategy) {
|
|
5611
|
+
let patched = false;
|
|
5612
|
+
(instance.bu || (instance.bu = [])).push(() => patched = true);
|
|
5613
|
+
const performHydrate = () => {
|
|
5614
|
+
if (patched) {
|
|
5615
|
+
{
|
|
5616
|
+
const resolvedComp = getResolvedComp();
|
|
5617
|
+
warn$1(
|
|
5618
|
+
`Skipping lazy hydration for component '${getComponentName(resolvedComp) || resolvedComp.__file}': it was updated before lazy hydration performed.`
|
|
5619
|
+
);
|
|
5620
|
+
}
|
|
5621
|
+
return;
|
|
5622
|
+
}
|
|
5623
|
+
hydrate();
|
|
5624
|
+
};
|
|
5625
|
+
const doHydrate = hydrateStrategy ? () => {
|
|
5626
|
+
const teardown = hydrateStrategy(
|
|
5627
|
+
performHydrate,
|
|
5628
|
+
(cb) => forEachElement(el, cb)
|
|
5629
|
+
);
|
|
5630
|
+
if (teardown) {
|
|
5631
|
+
(instance.bum || (instance.bum = [])).push(teardown);
|
|
5632
|
+
}
|
|
5633
|
+
} : performHydrate;
|
|
5634
|
+
if (getResolvedComp()) {
|
|
5635
|
+
doHydrate();
|
|
5636
|
+
} else {
|
|
5637
|
+
load().then(() => !instance.isUnmounted && doHydrate());
|
|
5638
|
+
}
|
|
5639
|
+
}
|
|
5494
5640
|
|
|
5495
5641
|
const isKeepAlive = (vnode) => vnode.type.__isKeepAlive;
|
|
5496
5642
|
const KeepAliveImpl = {
|
|
@@ -5514,86 +5660,37 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
5514
5660
|
keepAliveInstance.__v_cache = cache;
|
|
5515
5661
|
}
|
|
5516
5662
|
const parentSuspense = keepAliveInstance.suspense;
|
|
5663
|
+
const { renderer } = sharedContext;
|
|
5517
5664
|
const {
|
|
5518
|
-
|
|
5519
|
-
|
|
5520
|
-
|
|
5521
|
-
um: _unmount,
|
|
5522
|
-
o: { createElement }
|
|
5523
|
-
}
|
|
5524
|
-
} = sharedContext;
|
|
5665
|
+
um: _unmount,
|
|
5666
|
+
o: { createElement }
|
|
5667
|
+
} = renderer;
|
|
5525
5668
|
const storageContainer = createElement("div");
|
|
5669
|
+
sharedContext.getStorageContainer = () => storageContainer;
|
|
5670
|
+
sharedContext.getCachedComponent = (vnode) => {
|
|
5671
|
+
const key = vnode.key == null ? vnode.type : vnode.key;
|
|
5672
|
+
return cache.get(key);
|
|
5673
|
+
};
|
|
5526
5674
|
sharedContext.activate = (vnode, container, anchor, namespace, optimized) => {
|
|
5527
|
-
|
|
5528
|
-
move(
|
|
5675
|
+
activate(
|
|
5529
5676
|
vnode,
|
|
5530
5677
|
container,
|
|
5531
5678
|
anchor,
|
|
5532
|
-
|
|
5679
|
+
renderer,
|
|
5533
5680
|
keepAliveInstance,
|
|
5534
|
-
parentSuspense
|
|
5535
|
-
);
|
|
5536
|
-
patch(
|
|
5537
|
-
instance.vnode,
|
|
5538
|
-
vnode,
|
|
5539
|
-
container,
|
|
5540
|
-
anchor,
|
|
5541
|
-
instance,
|
|
5542
5681
|
parentSuspense,
|
|
5543
5682
|
namespace,
|
|
5544
|
-
vnode.slotScopeIds,
|
|
5545
5683
|
optimized
|
|
5546
5684
|
);
|
|
5547
|
-
queuePostRenderEffect(
|
|
5548
|
-
() => {
|
|
5549
|
-
instance.isDeactivated = false;
|
|
5550
|
-
if (instance.a) {
|
|
5551
|
-
invokeArrayFns(instance.a);
|
|
5552
|
-
}
|
|
5553
|
-
const vnodeHook = vnode.props && vnode.props.onVnodeMounted;
|
|
5554
|
-
if (vnodeHook) {
|
|
5555
|
-
invokeVNodeHook(vnodeHook, instance.parent, vnode);
|
|
5556
|
-
}
|
|
5557
|
-
},
|
|
5558
|
-
void 0,
|
|
5559
|
-
parentSuspense
|
|
5560
|
-
);
|
|
5561
|
-
{
|
|
5562
|
-
devtoolsComponentAdded(instance);
|
|
5563
|
-
}
|
|
5564
5685
|
};
|
|
5565
5686
|
sharedContext.deactivate = (vnode) => {
|
|
5566
|
-
|
|
5567
|
-
invalidateMount(instance.m);
|
|
5568
|
-
invalidateMount(instance.a);
|
|
5569
|
-
move(
|
|
5687
|
+
deactivate(
|
|
5570
5688
|
vnode,
|
|
5571
5689
|
storageContainer,
|
|
5572
|
-
|
|
5573
|
-
1,
|
|
5690
|
+
renderer,
|
|
5574
5691
|
keepAliveInstance,
|
|
5575
5692
|
parentSuspense
|
|
5576
5693
|
);
|
|
5577
|
-
queuePostRenderEffect(
|
|
5578
|
-
() => {
|
|
5579
|
-
if (instance.da) {
|
|
5580
|
-
invokeArrayFns(instance.da);
|
|
5581
|
-
}
|
|
5582
|
-
const vnodeHook = vnode.props && vnode.props.onVnodeUnmounted;
|
|
5583
|
-
if (vnodeHook) {
|
|
5584
|
-
invokeVNodeHook(vnodeHook, instance.parent, vnode);
|
|
5585
|
-
}
|
|
5586
|
-
instance.isDeactivated = true;
|
|
5587
|
-
},
|
|
5588
|
-
void 0,
|
|
5589
|
-
parentSuspense
|
|
5590
|
-
);
|
|
5591
|
-
{
|
|
5592
|
-
devtoolsComponentAdded(instance);
|
|
5593
|
-
}
|
|
5594
|
-
{
|
|
5595
|
-
instance.__keepAliveStorageContainer = storageContainer;
|
|
5596
|
-
}
|
|
5597
5694
|
};
|
|
5598
5695
|
function unmount(vnode) {
|
|
5599
5696
|
resetShapeFlag(vnode);
|
|
@@ -5744,7 +5841,7 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
5744
5841
|
function onDeactivated(hook, target) {
|
|
5745
5842
|
registerKeepAliveHook(hook, "da", target);
|
|
5746
5843
|
}
|
|
5747
|
-
function registerKeepAliveHook(hook, type, target =
|
|
5844
|
+
function registerKeepAliveHook(hook, type, target = getCurrentGenericInstance()) {
|
|
5748
5845
|
const wrappedHook = hook.__wdc || (hook.__wdc = () => {
|
|
5749
5846
|
let current = target;
|
|
5750
5847
|
while (current) {
|
|
@@ -5758,8 +5855,9 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
5758
5855
|
injectHook(type, wrappedHook, target);
|
|
5759
5856
|
if (target) {
|
|
5760
5857
|
let current = target.parent;
|
|
5761
|
-
while (current && current.parent
|
|
5762
|
-
|
|
5858
|
+
while (current && current.parent) {
|
|
5859
|
+
let parent = current.parent;
|
|
5860
|
+
if (isKeepAlive(parent.vapor ? parent : parent.vnode)) {
|
|
5763
5861
|
injectToKeepAliveRoot(wrappedHook, type, target, current);
|
|
5764
5862
|
}
|
|
5765
5863
|
current = current.parent;
|
|
@@ -5785,6 +5883,71 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
5785
5883
|
function getInnerChild(vnode) {
|
|
5786
5884
|
return vnode.shapeFlag & 128 ? vnode.ssContent : vnode;
|
|
5787
5885
|
}
|
|
5886
|
+
function activate(vnode, container, anchor, { p: patch, m: move }, parentComponent, parentSuspense, namespace, optimized) {
|
|
5887
|
+
const instance = vnode.component;
|
|
5888
|
+
move(
|
|
5889
|
+
vnode,
|
|
5890
|
+
container,
|
|
5891
|
+
anchor,
|
|
5892
|
+
0,
|
|
5893
|
+
parentComponent,
|
|
5894
|
+
parentSuspense
|
|
5895
|
+
);
|
|
5896
|
+
patch(
|
|
5897
|
+
instance.vnode,
|
|
5898
|
+
vnode,
|
|
5899
|
+
container,
|
|
5900
|
+
anchor,
|
|
5901
|
+
instance,
|
|
5902
|
+
parentSuspense,
|
|
5903
|
+
namespace,
|
|
5904
|
+
vnode.slotScopeIds,
|
|
5905
|
+
optimized
|
|
5906
|
+
);
|
|
5907
|
+
queuePostRenderEffect(
|
|
5908
|
+
() => {
|
|
5909
|
+
instance.isDeactivated = false;
|
|
5910
|
+
if (instance.a) {
|
|
5911
|
+
invokeArrayFns(instance.a);
|
|
5912
|
+
}
|
|
5913
|
+
const vnodeHook = vnode.props && vnode.props.onVnodeMounted;
|
|
5914
|
+
if (vnodeHook) {
|
|
5915
|
+
invokeVNodeHook(vnodeHook, instance.parent, vnode);
|
|
5916
|
+
}
|
|
5917
|
+
},
|
|
5918
|
+
void 0,
|
|
5919
|
+
parentSuspense
|
|
5920
|
+
);
|
|
5921
|
+
{
|
|
5922
|
+
devtoolsComponentAdded(instance);
|
|
5923
|
+
}
|
|
5924
|
+
}
|
|
5925
|
+
function deactivate(vnode, container, { m: move }, parentComponent, parentSuspense) {
|
|
5926
|
+
const instance = vnode.component;
|
|
5927
|
+
invalidateMount(instance.m);
|
|
5928
|
+
invalidateMount(instance.a);
|
|
5929
|
+
move(vnode, container, null, 1, parentComponent, parentSuspense);
|
|
5930
|
+
queuePostRenderEffect(
|
|
5931
|
+
() => {
|
|
5932
|
+
if (instance.da) {
|
|
5933
|
+
invokeArrayFns(instance.da);
|
|
5934
|
+
}
|
|
5935
|
+
const vnodeHook = vnode.props && vnode.props.onVnodeUnmounted;
|
|
5936
|
+
if (vnodeHook) {
|
|
5937
|
+
invokeVNodeHook(vnodeHook, instance.parent, vnode);
|
|
5938
|
+
}
|
|
5939
|
+
instance.isDeactivated = true;
|
|
5940
|
+
},
|
|
5941
|
+
void 0,
|
|
5942
|
+
parentSuspense
|
|
5943
|
+
);
|
|
5944
|
+
{
|
|
5945
|
+
devtoolsComponentAdded(instance);
|
|
5946
|
+
}
|
|
5947
|
+
{
|
|
5948
|
+
instance.__keepAliveStorageContainer = container;
|
|
5949
|
+
}
|
|
5950
|
+
}
|
|
5788
5951
|
|
|
5789
5952
|
function injectHook(type, hook, target = currentInstance, prepend = false) {
|
|
5790
5953
|
if (target) {
|
|
@@ -6260,12 +6423,13 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
6260
6423
|
return ret;
|
|
6261
6424
|
}
|
|
6262
6425
|
if (currentRenderingInstance && (currentRenderingInstance.ce || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.ce)) {
|
|
6426
|
+
const hasProps = Object.keys(props).length > 0;
|
|
6263
6427
|
if (name !== "default") props.name = name;
|
|
6264
6428
|
return openBlock(), createBlock(
|
|
6265
6429
|
Fragment,
|
|
6266
6430
|
null,
|
|
6267
6431
|
[createVNode("slot", props, fallback && fallback())],
|
|
6268
|
-
64
|
|
6432
|
+
hasProps ? -2 : 64
|
|
6269
6433
|
);
|
|
6270
6434
|
}
|
|
6271
6435
|
if (slot && slot.length > 1) {
|
|
@@ -6279,6 +6443,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
6279
6443
|
}
|
|
6280
6444
|
openBlock();
|
|
6281
6445
|
const validSlotContent = slot && ensureValidVNode(slot(props));
|
|
6446
|
+
ensureVaporSlotFallback(validSlotContent, fallback);
|
|
6282
6447
|
const slotKey = props.key || // slot content array of a dynamic conditional slot may have a branch
|
|
6283
6448
|
// key attached in the `createSlots` helper, respect that
|
|
6284
6449
|
validSlotContent && validSlotContent.key;
|
|
@@ -6308,6 +6473,14 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
6308
6473
|
return true;
|
|
6309
6474
|
}) ? vnodes : null;
|
|
6310
6475
|
}
|
|
6476
|
+
function ensureVaporSlotFallback(vnodes, fallback) {
|
|
6477
|
+
let vaporSlot;
|
|
6478
|
+
if (vnodes && vnodes.length === 1 && isVNode(vnodes[0]) && (vaporSlot = vnodes[0].vs)) {
|
|
6479
|
+
if (!vaporSlot.fallback && fallback) {
|
|
6480
|
+
vaporSlot.fallback = fallback;
|
|
6481
|
+
}
|
|
6482
|
+
}
|
|
6483
|
+
}
|
|
6311
6484
|
|
|
6312
6485
|
function toHandlers(obj, preserveCaseIfNecessary) {
|
|
6313
6486
|
const ret = {};
|
|
@@ -6369,7 +6542,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
6369
6542
|
}
|
|
6370
6543
|
return renderSlot(instance.slots, name, props, fallback && (() => fallback));
|
|
6371
6544
|
}
|
|
6372
|
-
function
|
|
6545
|
+
function legacyResolveScopedSlots(fns, raw, hasDynamicKeys) {
|
|
6373
6546
|
return createSlots(
|
|
6374
6547
|
raw || { $stable: !hasDynamicKeys },
|
|
6375
6548
|
mapKeyToName(fns)
|
|
@@ -6536,7 +6709,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
6536
6709
|
_b: () => legacyBindObjectProps,
|
|
6537
6710
|
_v: () => createTextVNode,
|
|
6538
6711
|
_e: () => createCommentVNode,
|
|
6539
|
-
_u: () =>
|
|
6712
|
+
_u: () => legacyResolveScopedSlots,
|
|
6540
6713
|
_g: () => legacyBindObjectListeners,
|
|
6541
6714
|
_d: () => legacyBindDynamicKeys,
|
|
6542
6715
|
_p: () => legacyPrependModifier
|
|
@@ -6708,10 +6881,10 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
6708
6881
|
return true;
|
|
6709
6882
|
},
|
|
6710
6883
|
has({
|
|
6711
|
-
_: { data, setupState, accessCache, ctx, appContext, propsOptions }
|
|
6884
|
+
_: { data, setupState, accessCache, ctx, appContext, propsOptions, type }
|
|
6712
6885
|
}, key) {
|
|
6713
|
-
let normalizedProps;
|
|
6714
|
-
return !!accessCache[key] || data !== EMPTY_OBJ && hasOwn(data, key) || hasSetupBinding(setupState, key) || (normalizedProps = propsOptions[0]) && hasOwn(normalizedProps, key) || hasOwn(ctx, key) || hasOwn(publicPropertiesMap, key) || hasOwn(appContext.config.globalProperties, key);
|
|
6886
|
+
let normalizedProps, cssModules;
|
|
6887
|
+
return !!(accessCache[key] || data !== EMPTY_OBJ && key[0] !== "$" && hasOwn(data, key) || hasSetupBinding(setupState, key) || (normalizedProps = propsOptions[0]) && hasOwn(normalizedProps, key) || hasOwn(ctx, key) || hasOwn(publicPropertiesMap, key) || hasOwn(appContext.config.globalProperties, key) || (cssModules = type.__cssModules) && cssModules[key]);
|
|
6715
6888
|
},
|
|
6716
6889
|
defineProperty(target, key, descriptor) {
|
|
6717
6890
|
if (descriptor.get != null) {
|
|
@@ -6863,15 +7036,15 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
6863
7036
|
return null;
|
|
6864
7037
|
}
|
|
6865
7038
|
function useSlots() {
|
|
6866
|
-
return getContext().slots;
|
|
7039
|
+
return getContext("useSlots").slots;
|
|
6867
7040
|
}
|
|
6868
7041
|
function useAttrs() {
|
|
6869
|
-
return getContext().attrs;
|
|
7042
|
+
return getContext("useAttrs").attrs;
|
|
6870
7043
|
}
|
|
6871
|
-
function getContext() {
|
|
7044
|
+
function getContext(calledFunctionName) {
|
|
6872
7045
|
const i = getCurrentGenericInstance();
|
|
6873
7046
|
if (!i) {
|
|
6874
|
-
warn$1(
|
|
7047
|
+
warn$1(`${calledFunctionName}() called without active instance.`);
|
|
6875
7048
|
}
|
|
6876
7049
|
if (i.vapor) {
|
|
6877
7050
|
return i;
|
|
@@ -7135,7 +7308,8 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
7135
7308
|
expose.forEach((key) => {
|
|
7136
7309
|
Object.defineProperty(exposed, key, {
|
|
7137
7310
|
get: () => publicThis[key],
|
|
7138
|
-
set: (val) => publicThis[key] = val
|
|
7311
|
+
set: (val) => publicThis[key] = val,
|
|
7312
|
+
enumerable: true
|
|
7139
7313
|
});
|
|
7140
7314
|
});
|
|
7141
7315
|
} else if (!instance.exposed) {
|
|
@@ -7458,7 +7632,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
7458
7632
|
return vm;
|
|
7459
7633
|
}
|
|
7460
7634
|
}
|
|
7461
|
-
Vue.version = `2.6.14-compat:${"3.6.0-alpha.
|
|
7635
|
+
Vue.version = `2.6.14-compat:${"3.6.0-alpha.3"}`;
|
|
7462
7636
|
Vue.config = singletonApp.config;
|
|
7463
7637
|
Vue.use = (plugin, ...options) => {
|
|
7464
7638
|
if (plugin && isFunction(plugin.install)) {
|
|
@@ -7472,22 +7646,22 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
7472
7646
|
singletonApp.mixin(m);
|
|
7473
7647
|
return Vue;
|
|
7474
7648
|
};
|
|
7475
|
-
Vue.component = (name, comp) => {
|
|
7649
|
+
Vue.component = ((name, comp) => {
|
|
7476
7650
|
if (comp) {
|
|
7477
7651
|
singletonApp.component(name, comp);
|
|
7478
7652
|
return Vue;
|
|
7479
7653
|
} else {
|
|
7480
7654
|
return singletonApp.component(name);
|
|
7481
7655
|
}
|
|
7482
|
-
};
|
|
7483
|
-
Vue.directive = (name, dir) => {
|
|
7656
|
+
});
|
|
7657
|
+
Vue.directive = ((name, dir) => {
|
|
7484
7658
|
if (dir) {
|
|
7485
7659
|
singletonApp.directive(name, dir);
|
|
7486
7660
|
return Vue;
|
|
7487
7661
|
} else {
|
|
7488
7662
|
return singletonApp.directive(name);
|
|
7489
7663
|
}
|
|
7490
|
-
};
|
|
7664
|
+
});
|
|
7491
7665
|
Vue.options = { _base: Vue };
|
|
7492
7666
|
let cid = 1;
|
|
7493
7667
|
Vue.cid = cid;
|
|
@@ -7550,14 +7724,14 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
7550
7724
|
assertCompatEnabled("GLOBAL_OBSERVABLE", null);
|
|
7551
7725
|
return reactive(target);
|
|
7552
7726
|
};
|
|
7553
|
-
Vue.filter = (name, filter) => {
|
|
7727
|
+
Vue.filter = ((name, filter) => {
|
|
7554
7728
|
if (filter) {
|
|
7555
7729
|
singletonApp.filter(name, filter);
|
|
7556
7730
|
return Vue;
|
|
7557
7731
|
} else {
|
|
7558
7732
|
return singletonApp.filter(name);
|
|
7559
7733
|
}
|
|
7560
|
-
};
|
|
7734
|
+
});
|
|
7561
7735
|
const util = {
|
|
7562
7736
|
warn: warn$1 ,
|
|
7563
7737
|
extend,
|
|
@@ -7716,7 +7890,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
7716
7890
|
{
|
|
7717
7891
|
for (let i = 0; i < container.attributes.length; i++) {
|
|
7718
7892
|
const attr = container.attributes[i];
|
|
7719
|
-
if (attr.name !== "v-cloak" && /^(v-|:|@)/.test(attr.name)) {
|
|
7893
|
+
if (attr.name !== "v-cloak" && /^(?:v-|:|@)/.test(attr.name)) {
|
|
7720
7894
|
warnDeprecation$1("GLOBAL_MOUNT_CONTAINER", null);
|
|
7721
7895
|
break;
|
|
7722
7896
|
}
|
|
@@ -8550,7 +8724,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
8550
8724
|
return args.some((elem) => elem.toLowerCase() === "boolean");
|
|
8551
8725
|
}
|
|
8552
8726
|
|
|
8553
|
-
const isInternalKey = (key) => key
|
|
8727
|
+
const isInternalKey = (key) => key === "_" || key === "_ctx" || key === "$stable";
|
|
8554
8728
|
const normalizeSlotValue = (value) => isArray(value) ? value.map(normalizeVNode) : [normalizeVNode(value)];
|
|
8555
8729
|
const normalizeSlot = (key, rawSlot, ctx) => {
|
|
8556
8730
|
if (rawSlot._n) {
|
|
@@ -8604,8 +8778,6 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
8604
8778
|
const initSlots = (instance, children, optimized) => {
|
|
8605
8779
|
const slots = instance.slots = createInternalObject();
|
|
8606
8780
|
if (instance.vnode.shapeFlag & 32) {
|
|
8607
|
-
const cacheIndexes = children.__;
|
|
8608
|
-
if (cacheIndexes) def(slots, "__", cacheIndexes, true);
|
|
8609
8781
|
const type = children._;
|
|
8610
8782
|
if (type) {
|
|
8611
8783
|
assignSlots(slots, children, optimized);
|
|
@@ -8669,12 +8841,10 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
8669
8841
|
if (instance.appContext.config.performance && isSupported()) {
|
|
8670
8842
|
const startTag = `vue-${type}-${instance.uid}`;
|
|
8671
8843
|
const endTag = startTag + `:end`;
|
|
8844
|
+
const measureName = `<${formatComponentName(instance, instance.type)}> ${type}`;
|
|
8672
8845
|
perf.mark(endTag);
|
|
8673
|
-
perf.measure(
|
|
8674
|
-
|
|
8675
|
-
startTag,
|
|
8676
|
-
endTag
|
|
8677
|
-
);
|
|
8846
|
+
perf.measure(measureName, startTag, endTag);
|
|
8847
|
+
perf.clearMeasures(measureName);
|
|
8678
8848
|
perf.clearMarks(startTag);
|
|
8679
8849
|
perf.clearMarks(endTag);
|
|
8680
8850
|
}
|
|
@@ -8913,15 +9083,25 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
8913
9083
|
optimized
|
|
8914
9084
|
);
|
|
8915
9085
|
} else {
|
|
8916
|
-
|
|
8917
|
-
|
|
8918
|
-
|
|
8919
|
-
|
|
8920
|
-
|
|
8921
|
-
|
|
8922
|
-
|
|
8923
|
-
|
|
8924
|
-
|
|
9086
|
+
const customElement = !!(n1.el && n1.el._isVueCE) ? n1.el : null;
|
|
9087
|
+
try {
|
|
9088
|
+
if (customElement) {
|
|
9089
|
+
customElement._beginPatch();
|
|
9090
|
+
}
|
|
9091
|
+
patchElement(
|
|
9092
|
+
n1,
|
|
9093
|
+
n2,
|
|
9094
|
+
parentComponent,
|
|
9095
|
+
parentSuspense,
|
|
9096
|
+
namespace,
|
|
9097
|
+
slotScopeIds,
|
|
9098
|
+
optimized
|
|
9099
|
+
);
|
|
9100
|
+
} finally {
|
|
9101
|
+
if (customElement) {
|
|
9102
|
+
customElement._endPatch();
|
|
9103
|
+
}
|
|
9104
|
+
}
|
|
8925
9105
|
}
|
|
8926
9106
|
};
|
|
8927
9107
|
const mountElement = (vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
|
|
@@ -8972,16 +9152,20 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
8972
9152
|
if (dirs) {
|
|
8973
9153
|
invokeDirectiveHook(vnode, null, parentComponent, "beforeMount");
|
|
8974
9154
|
}
|
|
8975
|
-
|
|
8976
|
-
|
|
8977
|
-
|
|
9155
|
+
if (transition) {
|
|
9156
|
+
performTransitionEnter(
|
|
9157
|
+
el,
|
|
9158
|
+
transition,
|
|
9159
|
+
() => hostInsert(el, container, anchor),
|
|
9160
|
+
parentSuspense
|
|
9161
|
+
);
|
|
9162
|
+
} else {
|
|
9163
|
+
hostInsert(el, container, anchor);
|
|
8978
9164
|
}
|
|
8979
|
-
|
|
8980
|
-
if ((vnodeHook = props && props.onVnodeMounted) || needCallTransitionHooks || dirs) {
|
|
9165
|
+
if ((vnodeHook = props && props.onVnodeMounted) || dirs) {
|
|
8981
9166
|
queuePostRenderEffect(
|
|
8982
9167
|
() => {
|
|
8983
9168
|
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
8984
|
-
needCallTransitionHooks && transition.enter(el);
|
|
8985
9169
|
dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted");
|
|
8986
9170
|
},
|
|
8987
9171
|
void 0,
|
|
@@ -8998,21 +9182,9 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
8998
9182
|
hostSetScopeId(el, slotScopeIds[i]);
|
|
8999
9183
|
}
|
|
9000
9184
|
}
|
|
9001
|
-
|
|
9002
|
-
|
|
9003
|
-
|
|
9004
|
-
subTree = filterSingleRoot(subTree.children) || subTree;
|
|
9005
|
-
}
|
|
9006
|
-
if (vnode === subTree || isSuspense(subTree.type) && (subTree.ssContent === vnode || subTree.ssFallback === vnode)) {
|
|
9007
|
-
const parentVNode = parentComponent.vnode;
|
|
9008
|
-
setScopeId(
|
|
9009
|
-
el,
|
|
9010
|
-
parentVNode,
|
|
9011
|
-
parentVNode.scopeId,
|
|
9012
|
-
parentVNode.slotScopeIds,
|
|
9013
|
-
parentComponent.parent
|
|
9014
|
-
);
|
|
9015
|
-
}
|
|
9185
|
+
const inheritedScopeIds = getInheritedScopeIds(vnode, parentComponent);
|
|
9186
|
+
for (let i = 0; i < inheritedScopeIds.length; i++) {
|
|
9187
|
+
hostSetScopeId(el, inheritedScopeIds[i]);
|
|
9016
9188
|
}
|
|
9017
9189
|
};
|
|
9018
9190
|
const mountChildren = (children, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, start = 0) => {
|
|
@@ -9253,12 +9425,21 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
9253
9425
|
n2.slotScopeIds = slotScopeIds;
|
|
9254
9426
|
if (n2.type.__vapor) {
|
|
9255
9427
|
if (n1 == null) {
|
|
9256
|
-
|
|
9257
|
-
n2
|
|
9258
|
-
|
|
9259
|
-
|
|
9260
|
-
|
|
9261
|
-
|
|
9428
|
+
if (n2.shapeFlag & 512) {
|
|
9429
|
+
getVaporInterface(parentComponent, n2).activate(
|
|
9430
|
+
n2,
|
|
9431
|
+
container,
|
|
9432
|
+
anchor,
|
|
9433
|
+
parentComponent
|
|
9434
|
+
);
|
|
9435
|
+
} else {
|
|
9436
|
+
getVaporInterface(parentComponent, n2).mount(
|
|
9437
|
+
n2,
|
|
9438
|
+
container,
|
|
9439
|
+
anchor,
|
|
9440
|
+
parentComponent
|
|
9441
|
+
);
|
|
9442
|
+
}
|
|
9262
9443
|
} else {
|
|
9263
9444
|
getVaporInterface(parentComponent, n2).update(
|
|
9264
9445
|
n1,
|
|
@@ -9322,6 +9503,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
9322
9503
|
if (!initialVNode.el) {
|
|
9323
9504
|
const placeholder = instance.subTree = createVNode(Comment);
|
|
9324
9505
|
processCommentNode(null, placeholder, container, anchor);
|
|
9506
|
+
initialVNode.placeholder = placeholder.el;
|
|
9325
9507
|
}
|
|
9326
9508
|
} else {
|
|
9327
9509
|
setupRenderEffect(
|
|
@@ -9889,7 +10071,11 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
9889
10071
|
for (i = toBePatched - 1; i >= 0; i--) {
|
|
9890
10072
|
const nextIndex = s2 + i;
|
|
9891
10073
|
const nextChild = c2[nextIndex];
|
|
9892
|
-
const
|
|
10074
|
+
const anchorVNode = c2[nextIndex + 1];
|
|
10075
|
+
const anchor = nextIndex + 1 < l2 ? (
|
|
10076
|
+
// #13559, fallback to el placeholder for unresolved async component
|
|
10077
|
+
anchorVNode.el || anchorVNode.placeholder
|
|
10078
|
+
) : parentAnchor;
|
|
9893
10079
|
if (newIndexToOldIndexMap[i] === 0) {
|
|
9894
10080
|
patch(
|
|
9895
10081
|
null,
|
|
@@ -9969,12 +10155,12 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
9969
10155
|
const needTransition2 = moveType !== 2 && shapeFlag & 1 && transition;
|
|
9970
10156
|
if (needTransition2) {
|
|
9971
10157
|
if (moveType === 0) {
|
|
9972
|
-
|
|
9973
|
-
|
|
9974
|
-
|
|
9975
|
-
() =>
|
|
9976
|
-
|
|
9977
|
-
|
|
10158
|
+
performTransitionEnter(
|
|
10159
|
+
el,
|
|
10160
|
+
transition,
|
|
10161
|
+
() => hostInsert(el, container, anchor),
|
|
10162
|
+
parentSuspense,
|
|
10163
|
+
true
|
|
9978
10164
|
);
|
|
9979
10165
|
} else {
|
|
9980
10166
|
const { leave, delayLeave, afterLeave } = transition;
|
|
@@ -9986,6 +10172,12 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
9986
10172
|
}
|
|
9987
10173
|
};
|
|
9988
10174
|
const performLeave = () => {
|
|
10175
|
+
if (el._isLeaving) {
|
|
10176
|
+
el[leaveCbKey](
|
|
10177
|
+
true
|
|
10178
|
+
/* cancelled */
|
|
10179
|
+
);
|
|
10180
|
+
}
|
|
9989
10181
|
leave(el, () => {
|
|
9990
10182
|
remove2();
|
|
9991
10183
|
afterLeave && afterLeave();
|
|
@@ -10025,7 +10217,14 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
10025
10217
|
parentComponent.renderCache[cacheIndex] = void 0;
|
|
10026
10218
|
}
|
|
10027
10219
|
if (shapeFlag & 256) {
|
|
10028
|
-
|
|
10220
|
+
if (vnode.type.__vapor) {
|
|
10221
|
+
getVaporInterface(parentComponent, vnode).deactivate(
|
|
10222
|
+
vnode,
|
|
10223
|
+
parentComponent.ctx.getStorageContainer()
|
|
10224
|
+
);
|
|
10225
|
+
} else {
|
|
10226
|
+
parentComponent.ctx.deactivate(vnode);
|
|
10227
|
+
}
|
|
10029
10228
|
return;
|
|
10030
10229
|
}
|
|
10031
10230
|
const shouldInvokeDirs = shapeFlag & 1 && dirs;
|
|
@@ -10113,22 +10312,15 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
10113
10312
|
removeStaticNode(vnode);
|
|
10114
10313
|
return;
|
|
10115
10314
|
}
|
|
10116
|
-
|
|
10117
|
-
|
|
10118
|
-
|
|
10119
|
-
transition
|
|
10120
|
-
|
|
10121
|
-
|
|
10122
|
-
|
|
10123
|
-
const { leave, delayLeave } = transition;
|
|
10124
|
-
const performLeave = () => leave(el, performRemove);
|
|
10125
|
-
if (delayLeave) {
|
|
10126
|
-
delayLeave(vnode.el, performRemove, performLeave);
|
|
10127
|
-
} else {
|
|
10128
|
-
performLeave();
|
|
10129
|
-
}
|
|
10315
|
+
if (transition) {
|
|
10316
|
+
performTransitionLeave(
|
|
10317
|
+
el,
|
|
10318
|
+
transition,
|
|
10319
|
+
() => hostRemove(el),
|
|
10320
|
+
!!(vnode.shapeFlag & 1)
|
|
10321
|
+
);
|
|
10130
10322
|
} else {
|
|
10131
|
-
|
|
10323
|
+
hostRemove(el);
|
|
10132
10324
|
}
|
|
10133
10325
|
};
|
|
10134
10326
|
const removeFragment = (cur, end) => {
|
|
@@ -10144,26 +10336,11 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
10144
10336
|
if (instance.type.__hmrId) {
|
|
10145
10337
|
unregisterHMR(instance);
|
|
10146
10338
|
}
|
|
10147
|
-
const {
|
|
10148
|
-
bum,
|
|
10149
|
-
scope,
|
|
10150
|
-
effect,
|
|
10151
|
-
subTree,
|
|
10152
|
-
um,
|
|
10153
|
-
m,
|
|
10154
|
-
a,
|
|
10155
|
-
parent,
|
|
10156
|
-
slots: { __: slotCacheKeys }
|
|
10157
|
-
} = instance;
|
|
10339
|
+
const { bum, scope, effect, subTree, um, m, a } = instance;
|
|
10158
10340
|
invalidateMount(m);
|
|
10159
10341
|
invalidateMount(a);
|
|
10160
10342
|
if (bum) {
|
|
10161
|
-
invokeArrayFns(bum);
|
|
10162
|
-
}
|
|
10163
|
-
if (parent && isArray(slotCacheKeys)) {
|
|
10164
|
-
slotCacheKeys.forEach((v) => {
|
|
10165
|
-
parent.renderCache[v] = void 0;
|
|
10166
|
-
});
|
|
10343
|
+
invokeArrayFns(bum);
|
|
10167
10344
|
}
|
|
10168
10345
|
if (isCompatEnabled$1("INSTANCE_EVENT_HOOKS", instance)) {
|
|
10169
10346
|
instance.emit("hook:beforeDestroy");
|
|
@@ -10188,12 +10365,6 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
10188
10365
|
void 0,
|
|
10189
10366
|
parentSuspense
|
|
10190
10367
|
);
|
|
10191
|
-
if (parentSuspense && parentSuspense.pendingBranch && !parentSuspense.isUnmounted && instance.asyncDep && !instance.asyncResolved && instance.suspenseId === parentSuspense.pendingId) {
|
|
10192
|
-
parentSuspense.deps--;
|
|
10193
|
-
if (parentSuspense.deps === 0) {
|
|
10194
|
-
parentSuspense.resolve();
|
|
10195
|
-
}
|
|
10196
|
-
}
|
|
10197
10368
|
{
|
|
10198
10369
|
devtoolsComponentRemoved(instance);
|
|
10199
10370
|
}
|
|
@@ -10206,7 +10377,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
10206
10377
|
const getNextHostNode = (vnode) => {
|
|
10207
10378
|
if (vnode.shapeFlag & 6) {
|
|
10208
10379
|
if (vnode.type.__vapor) {
|
|
10209
|
-
return hostNextSibling(vnode.
|
|
10380
|
+
return hostNextSibling(vnode.anchor);
|
|
10210
10381
|
}
|
|
10211
10382
|
return getNextHostNode(vnode.component.subTree);
|
|
10212
10383
|
}
|
|
@@ -10284,6 +10455,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
10284
10455
|
return {
|
|
10285
10456
|
render,
|
|
10286
10457
|
hydrate,
|
|
10458
|
+
hydrateNode,
|
|
10287
10459
|
internals,
|
|
10288
10460
|
createApp: createAppAPI(
|
|
10289
10461
|
mountApp,
|
|
@@ -10325,7 +10497,8 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
10325
10497
|
if (!shallow && c2.patchFlag !== -2)
|
|
10326
10498
|
traverseStaticChildren(c1, c2);
|
|
10327
10499
|
}
|
|
10328
|
-
if (c2.type === Text
|
|
10500
|
+
if (c2.type === Text && // avoid cached text nodes retaining detached dom nodes
|
|
10501
|
+
c2.patchFlag !== -1) {
|
|
10329
10502
|
c2.el = c1.el;
|
|
10330
10503
|
}
|
|
10331
10504
|
if (c2.type === Comment && !c2.el) {
|
|
@@ -10338,7 +10511,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
10338
10511
|
}
|
|
10339
10512
|
}
|
|
10340
10513
|
function locateNonHydratedAsyncRoot(instance) {
|
|
10341
|
-
const subComponent = instance.
|
|
10514
|
+
const subComponent = instance.subTree && instance.subTree.component;
|
|
10342
10515
|
if (subComponent) {
|
|
10343
10516
|
if (subComponent.asyncDep && !subComponent.asyncResolved) {
|
|
10344
10517
|
return subComponent;
|
|
@@ -10353,6 +10526,34 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
10353
10526
|
hooks[i].flags |= 4;
|
|
10354
10527
|
}
|
|
10355
10528
|
}
|
|
10529
|
+
function performTransitionEnter(el, transition, insert, parentSuspense, force = false) {
|
|
10530
|
+
if (force || needTransition(parentSuspense, transition)) {
|
|
10531
|
+
transition.beforeEnter(el);
|
|
10532
|
+
insert();
|
|
10533
|
+
queuePostRenderEffect(() => transition.enter(el), void 0, parentSuspense);
|
|
10534
|
+
} else {
|
|
10535
|
+
insert();
|
|
10536
|
+
}
|
|
10537
|
+
}
|
|
10538
|
+
function performTransitionLeave(el, transition, remove, isElement = true) {
|
|
10539
|
+
const performRemove = () => {
|
|
10540
|
+
remove();
|
|
10541
|
+
if (transition && !transition.persisted && transition.afterLeave) {
|
|
10542
|
+
transition.afterLeave();
|
|
10543
|
+
}
|
|
10544
|
+
};
|
|
10545
|
+
if (isElement && transition && !transition.persisted) {
|
|
10546
|
+
const { leave, delayLeave } = transition;
|
|
10547
|
+
const performLeave = () => leave(el, performRemove);
|
|
10548
|
+
if (delayLeave) {
|
|
10549
|
+
delayLeave(el, performRemove, performLeave);
|
|
10550
|
+
} else {
|
|
10551
|
+
performLeave();
|
|
10552
|
+
}
|
|
10553
|
+
} else {
|
|
10554
|
+
performRemove();
|
|
10555
|
+
}
|
|
10556
|
+
}
|
|
10356
10557
|
function getVaporInterface(instance, vnode) {
|
|
10357
10558
|
const ctx = instance ? instance.appContext : vnode.appContext;
|
|
10358
10559
|
const res = ctx && ctx.vapor;
|
|
@@ -10367,6 +10568,32 @@ app.use(vaporInteropPlugin)
|
|
|
10367
10568
|
}
|
|
10368
10569
|
return res;
|
|
10369
10570
|
}
|
|
10571
|
+
function getInheritedScopeIds(vnode, parentComponent) {
|
|
10572
|
+
const inheritedScopeIds = [];
|
|
10573
|
+
let currentParent = parentComponent;
|
|
10574
|
+
let currentVNode = vnode;
|
|
10575
|
+
while (currentParent) {
|
|
10576
|
+
let subTree = currentParent.subTree;
|
|
10577
|
+
if (!subTree) break;
|
|
10578
|
+
if (subTree.patchFlag > 0 && subTree.patchFlag & 2048) {
|
|
10579
|
+
subTree = filterSingleRoot(subTree.children) || subTree;
|
|
10580
|
+
}
|
|
10581
|
+
if (currentVNode === subTree || isSuspense(subTree.type) && (subTree.ssContent === currentVNode || subTree.ssFallback === currentVNode)) {
|
|
10582
|
+
const parentVNode = currentParent.vnode;
|
|
10583
|
+
if (parentVNode.scopeId) {
|
|
10584
|
+
inheritedScopeIds.push(parentVNode.scopeId);
|
|
10585
|
+
}
|
|
10586
|
+
if (parentVNode.slotScopeIds) {
|
|
10587
|
+
inheritedScopeIds.push(...parentVNode.slotScopeIds);
|
|
10588
|
+
}
|
|
10589
|
+
currentVNode = parentVNode;
|
|
10590
|
+
currentParent = currentParent.parent;
|
|
10591
|
+
} else {
|
|
10592
|
+
break;
|
|
10593
|
+
}
|
|
10594
|
+
}
|
|
10595
|
+
return inheritedScopeIds;
|
|
10596
|
+
}
|
|
10370
10597
|
|
|
10371
10598
|
const ssrContextKey = Symbol.for("v-scx");
|
|
10372
10599
|
const useSSRContext = () => {
|
|
@@ -10687,8 +10914,9 @@ app.use(vaporInteropPlugin)
|
|
|
10687
10914
|
function defaultPropGetter(props, key) {
|
|
10688
10915
|
return props[key];
|
|
10689
10916
|
}
|
|
10917
|
+
const mixinEmitsCache = /* @__PURE__ */ new WeakMap();
|
|
10690
10918
|
function normalizeEmitsOptions(comp, appContext, asMixin = false) {
|
|
10691
|
-
const cache = appContext.emitsCache;
|
|
10919
|
+
const cache = asMixin ? mixinEmitsCache : appContext.emitsCache;
|
|
10692
10920
|
const cached = cache.get(comp);
|
|
10693
10921
|
if (cached !== void 0) {
|
|
10694
10922
|
return cached;
|
|
@@ -11160,7 +11388,7 @@ app.use(vaporInteropPlugin)
|
|
|
11160
11388
|
const { activeBranch, pendingBranch, isInFallback, isHydrating } = suspense;
|
|
11161
11389
|
if (pendingBranch) {
|
|
11162
11390
|
suspense.pendingBranch = newBranch;
|
|
11163
|
-
if (isSameVNodeType(
|
|
11391
|
+
if (isSameVNodeType(pendingBranch, newBranch)) {
|
|
11164
11392
|
patch(
|
|
11165
11393
|
pendingBranch,
|
|
11166
11394
|
newBranch,
|
|
@@ -11231,7 +11459,7 @@ app.use(vaporInteropPlugin)
|
|
|
11231
11459
|
);
|
|
11232
11460
|
setActiveBranch(suspense, newFallback);
|
|
11233
11461
|
}
|
|
11234
|
-
} else if (activeBranch && isSameVNodeType(
|
|
11462
|
+
} else if (activeBranch && isSameVNodeType(activeBranch, newBranch)) {
|
|
11235
11463
|
patch(
|
|
11236
11464
|
activeBranch,
|
|
11237
11465
|
newBranch,
|
|
@@ -11262,7 +11490,7 @@ app.use(vaporInteropPlugin)
|
|
|
11262
11490
|
}
|
|
11263
11491
|
}
|
|
11264
11492
|
} else {
|
|
11265
|
-
if (activeBranch && isSameVNodeType(
|
|
11493
|
+
if (activeBranch && isSameVNodeType(activeBranch, newBranch)) {
|
|
11266
11494
|
patch(
|
|
11267
11495
|
activeBranch,
|
|
11268
11496
|
newBranch,
|
|
@@ -11375,7 +11603,8 @@ app.use(vaporInteropPlugin)
|
|
|
11375
11603
|
pendingId,
|
|
11376
11604
|
effects,
|
|
11377
11605
|
parentComponent: parentComponent2,
|
|
11378
|
-
container: container2
|
|
11606
|
+
container: container2,
|
|
11607
|
+
isInFallback
|
|
11379
11608
|
} = suspense;
|
|
11380
11609
|
let delayEnter = false;
|
|
11381
11610
|
if (suspense.isHydrating) {
|
|
@@ -11393,6 +11622,9 @@ app.use(vaporInteropPlugin)
|
|
|
11393
11622
|
parentComponent2
|
|
11394
11623
|
);
|
|
11395
11624
|
queuePostFlushCb(effects);
|
|
11625
|
+
if (isInFallback && vnode2.ssFallback) {
|
|
11626
|
+
vnode2.ssFallback.el = null;
|
|
11627
|
+
}
|
|
11396
11628
|
}
|
|
11397
11629
|
};
|
|
11398
11630
|
}
|
|
@@ -11401,6 +11633,9 @@ app.use(vaporInteropPlugin)
|
|
|
11401
11633
|
anchor = next(activeBranch);
|
|
11402
11634
|
}
|
|
11403
11635
|
unmount(activeBranch, parentComponent2, suspense, true);
|
|
11636
|
+
if (!delayEnter && isInFallback && vnode2.ssFallback) {
|
|
11637
|
+
vnode2.ssFallback.el = null;
|
|
11638
|
+
}
|
|
11404
11639
|
}
|
|
11405
11640
|
if (!delayEnter) {
|
|
11406
11641
|
move(
|
|
@@ -11525,6 +11760,7 @@ app.use(vaporInteropPlugin)
|
|
|
11525
11760
|
optimized2
|
|
11526
11761
|
);
|
|
11527
11762
|
if (placeholder) {
|
|
11763
|
+
vnode2.placeholder = null;
|
|
11528
11764
|
remove(placeholder);
|
|
11529
11765
|
}
|
|
11530
11766
|
updateHOCHostEl(instance, vnode2.el);
|
|
@@ -11787,15 +12023,11 @@ app.use(vaporInteropPlugin)
|
|
|
11787
12023
|
);
|
|
11788
12024
|
};
|
|
11789
12025
|
const normalizeKey = ({ key }) => key != null ? key : null;
|
|
11790
|
-
const normalizeRef = ({
|
|
11791
|
-
ref,
|
|
11792
|
-
ref_key,
|
|
11793
|
-
ref_for
|
|
11794
|
-
}) => {
|
|
12026
|
+
const normalizeRef = ({ ref, ref_key, ref_for }, i = currentRenderingInstance) => {
|
|
11795
12027
|
if (typeof ref === "number") {
|
|
11796
12028
|
ref = "" + ref;
|
|
11797
12029
|
}
|
|
11798
|
-
return ref != null ? isString(ref) || isRef(ref) || isFunction(ref) ? { i
|
|
12030
|
+
return ref != null ? isString(ref) || isRef(ref) || isFunction(ref) ? { i, r: ref, k: ref_key, f: !!ref_for } : ref : null;
|
|
11799
12031
|
};
|
|
11800
12032
|
function createBaseVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, shapeFlag = type === Fragment ? 0 : 1, isBlockNode = false, needFullChildrenNormalization = false) {
|
|
11801
12033
|
const vnode = {
|
|
@@ -11968,6 +12200,7 @@ Component that was made reactive: `,
|
|
|
11968
12200
|
suspense: vnode.suspense,
|
|
11969
12201
|
ssContent: vnode.ssContent && cloneVNode(vnode.ssContent),
|
|
11970
12202
|
ssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback),
|
|
12203
|
+
placeholder: vnode.placeholder,
|
|
11971
12204
|
el: vnode.el,
|
|
11972
12205
|
anchor: vnode.anchor,
|
|
11973
12206
|
ctx: vnode.ctx,
|
|
@@ -12495,7 +12728,7 @@ Component that was made reactive: `,
|
|
|
12495
12728
|
return instance.proxy;
|
|
12496
12729
|
}
|
|
12497
12730
|
}
|
|
12498
|
-
const classifyRE = /(?:^|[-_])
|
|
12731
|
+
const classifyRE = /(?:^|[-_])\w/g;
|
|
12499
12732
|
const classify = (str) => str.replace(classifyRE, (c) => c.toUpperCase()).replace(/[-_]/g, "");
|
|
12500
12733
|
function getComponentName(Component, includeInferred = true) {
|
|
12501
12734
|
return isFunction(Component) ? Component.displayName || Component.name : Component.name || includeInferred && Component.__name;
|
|
@@ -12531,23 +12764,28 @@ Component that was made reactive: `,
|
|
|
12531
12764
|
};
|
|
12532
12765
|
|
|
12533
12766
|
function h(type, propsOrChildren, children) {
|
|
12534
|
-
|
|
12535
|
-
|
|
12536
|
-
|
|
12537
|
-
|
|
12538
|
-
|
|
12767
|
+
try {
|
|
12768
|
+
setBlockTracking(-1);
|
|
12769
|
+
const l = arguments.length;
|
|
12770
|
+
if (l === 2) {
|
|
12771
|
+
if (isObject(propsOrChildren) && !isArray(propsOrChildren)) {
|
|
12772
|
+
if (isVNode(propsOrChildren)) {
|
|
12773
|
+
return createVNode(type, null, [propsOrChildren]);
|
|
12774
|
+
}
|
|
12775
|
+
return createVNode(type, propsOrChildren);
|
|
12776
|
+
} else {
|
|
12777
|
+
return createVNode(type, null, propsOrChildren);
|
|
12539
12778
|
}
|
|
12540
|
-
return createVNode(type, propsOrChildren);
|
|
12541
12779
|
} else {
|
|
12542
|
-
|
|
12543
|
-
|
|
12544
|
-
|
|
12545
|
-
|
|
12546
|
-
|
|
12547
|
-
|
|
12548
|
-
children = [children];
|
|
12780
|
+
if (l > 3) {
|
|
12781
|
+
children = Array.prototype.slice.call(arguments, 2);
|
|
12782
|
+
} else if (l === 3 && isVNode(children)) {
|
|
12783
|
+
children = [children];
|
|
12784
|
+
}
|
|
12785
|
+
return createVNode(type, propsOrChildren, children);
|
|
12549
12786
|
}
|
|
12550
|
-
|
|
12787
|
+
} finally {
|
|
12788
|
+
setBlockTracking(1);
|
|
12551
12789
|
}
|
|
12552
12790
|
}
|
|
12553
12791
|
|
|
@@ -12757,7 +12995,7 @@ Component that was made reactive: `,
|
|
|
12757
12995
|
return true;
|
|
12758
12996
|
}
|
|
12759
12997
|
|
|
12760
|
-
const version = "3.6.0-alpha.
|
|
12998
|
+
const version = "3.6.0-alpha.3";
|
|
12761
12999
|
const warn = warn$1 ;
|
|
12762
13000
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
12763
13001
|
const devtools = devtools$1 ;
|
|
@@ -13015,11 +13253,11 @@ Component that was made reactive: `,
|
|
|
13015
13253
|
addTransitionClass(el, legacyLeaveFromClass);
|
|
13016
13254
|
}
|
|
13017
13255
|
if (!el._enterCancelled) {
|
|
13018
|
-
forceReflow();
|
|
13256
|
+
forceReflow(el);
|
|
13019
13257
|
addTransitionClass(el, leaveActiveClass);
|
|
13020
13258
|
} else {
|
|
13021
13259
|
addTransitionClass(el, leaveActiveClass);
|
|
13022
|
-
forceReflow();
|
|
13260
|
+
forceReflow(el);
|
|
13023
13261
|
}
|
|
13024
13262
|
nextFrame(() => {
|
|
13025
13263
|
if (!el._isLeaving) {
|
|
@@ -13148,7 +13386,7 @@ Component that was made reactive: `,
|
|
|
13148
13386
|
type = timeout > 0 ? transitionTimeout > animationTimeout ? TRANSITION$1 : ANIMATION : null;
|
|
13149
13387
|
propCount = type ? type === TRANSITION$1 ? transitionDurations.length : animationDurations.length : 0;
|
|
13150
13388
|
}
|
|
13151
|
-
const hasTransform = type === TRANSITION$1 && /\b(transform|all)(
|
|
13389
|
+
const hasTransform = type === TRANSITION$1 && /\b(?:transform|all)(?:,|$)/.test(
|
|
13152
13390
|
getStyleProperties(`${TRANSITION$1}Property`).toString()
|
|
13153
13391
|
);
|
|
13154
13392
|
return {
|
|
@@ -13168,8 +13406,9 @@ Component that was made reactive: `,
|
|
|
13168
13406
|
if (s === "auto") return 0;
|
|
13169
13407
|
return Number(s.slice(0, -1).replace(",", ".")) * 1e3;
|
|
13170
13408
|
}
|
|
13171
|
-
function forceReflow() {
|
|
13172
|
-
|
|
13409
|
+
function forceReflow(el) {
|
|
13410
|
+
const targetDocument = el ? el.ownerDocument : document;
|
|
13411
|
+
return targetDocument.body.offsetHeight;
|
|
13173
13412
|
}
|
|
13174
13413
|
|
|
13175
13414
|
function patchClass(el, value, isSVG) {
|
|
@@ -13189,6 +13428,8 @@ Component that was made reactive: `,
|
|
|
13189
13428
|
const vShowOriginalDisplay = Symbol("_vod");
|
|
13190
13429
|
const vShowHidden = Symbol("_vsh");
|
|
13191
13430
|
const vShow = {
|
|
13431
|
+
// used for prop mismatch check during hydration
|
|
13432
|
+
name: "show",
|
|
13192
13433
|
beforeMount(el, { value }, { transition }) {
|
|
13193
13434
|
el[vShowOriginalDisplay] = el.style.display === "none" ? "" : el.style.display;
|
|
13194
13435
|
if (transition && value) {
|
|
@@ -13222,9 +13463,6 @@ Component that was made reactive: `,
|
|
|
13222
13463
|
setDisplay(el, value);
|
|
13223
13464
|
}
|
|
13224
13465
|
};
|
|
13225
|
-
{
|
|
13226
|
-
vShow.name = "show";
|
|
13227
|
-
}
|
|
13228
13466
|
function setDisplay(el, value) {
|
|
13229
13467
|
el.style.display = value ? el[vShowOriginalDisplay] : "none";
|
|
13230
13468
|
el[vShowHidden] = !value;
|
|
@@ -13303,7 +13541,7 @@ Component that was made reactive: `,
|
|
|
13303
13541
|
}
|
|
13304
13542
|
}
|
|
13305
13543
|
|
|
13306
|
-
const displayRE = /(
|
|
13544
|
+
const displayRE = /(?:^|;)\s*display\s*:/;
|
|
13307
13545
|
function patchStyle(el, prev, next) {
|
|
13308
13546
|
const style = el.style;
|
|
13309
13547
|
const isCssString = isString(next);
|
|
@@ -13652,11 +13890,10 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
13652
13890
|
}
|
|
13653
13891
|
|
|
13654
13892
|
const REMOVAL = {};
|
|
13655
|
-
/*! #__NO_SIDE_EFFECTS__ */
|
|
13656
13893
|
// @__NO_SIDE_EFFECTS__
|
|
13657
13894
|
function defineCustomElement(options, extraOptions, _createApp) {
|
|
13658
|
-
|
|
13659
|
-
if (isPlainObject(Comp)) extend(Comp, extraOptions);
|
|
13895
|
+
let Comp = defineComponent(options, extraOptions);
|
|
13896
|
+
if (isPlainObject(Comp)) Comp = extend({}, Comp, extraOptions);
|
|
13660
13897
|
class VueCustomElement extends VueElement {
|
|
13661
13898
|
constructor(initialProps) {
|
|
13662
13899
|
super(Comp, initialProps, _createApp);
|
|
@@ -13665,10 +13902,9 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
13665
13902
|
VueCustomElement.def = Comp;
|
|
13666
13903
|
return VueCustomElement;
|
|
13667
13904
|
}
|
|
13668
|
-
|
|
13669
|
-
const defineSSRCustomElement = /* @__NO_SIDE_EFFECTS__ */ (options, extraOptions) => {
|
|
13905
|
+
const defineSSRCustomElement = (/* @__NO_SIDE_EFFECTS__ */ (options, extraOptions) => {
|
|
13670
13906
|
return /* @__PURE__ */ defineCustomElement(options, extraOptions, createSSRApp);
|
|
13671
|
-
};
|
|
13907
|
+
});
|
|
13672
13908
|
const BaseClass = typeof HTMLElement !== "undefined" ? HTMLElement : class {
|
|
13673
13909
|
};
|
|
13674
13910
|
class VueElement extends BaseClass {
|
|
@@ -13692,6 +13928,8 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
13692
13928
|
this._nonce = this._def.nonce;
|
|
13693
13929
|
this._connected = false;
|
|
13694
13930
|
this._resolved = false;
|
|
13931
|
+
this._patching = false;
|
|
13932
|
+
this._dirty = false;
|
|
13695
13933
|
this._numberProps = null;
|
|
13696
13934
|
this._styleChildren = /* @__PURE__ */ new WeakSet();
|
|
13697
13935
|
this._ob = null;
|
|
@@ -13704,7 +13942,11 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
13704
13942
|
);
|
|
13705
13943
|
}
|
|
13706
13944
|
if (_def.shadowRoot !== false) {
|
|
13707
|
-
this.attachShadow(
|
|
13945
|
+
this.attachShadow(
|
|
13946
|
+
extend({}, _def.shadowRootOptions, {
|
|
13947
|
+
mode: "open"
|
|
13948
|
+
})
|
|
13949
|
+
);
|
|
13708
13950
|
this._root = this.shadowRoot;
|
|
13709
13951
|
} else {
|
|
13710
13952
|
this._root = this;
|
|
@@ -13764,9 +14006,18 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
13764
14006
|
this._app && this._app.unmount();
|
|
13765
14007
|
if (this._instance) this._instance.ce = void 0;
|
|
13766
14008
|
this._app = this._instance = null;
|
|
14009
|
+
if (this._teleportTargets) {
|
|
14010
|
+
this._teleportTargets.clear();
|
|
14011
|
+
this._teleportTargets = void 0;
|
|
14012
|
+
}
|
|
13767
14013
|
}
|
|
13768
14014
|
});
|
|
13769
14015
|
}
|
|
14016
|
+
_processMutations(mutations) {
|
|
14017
|
+
for (const m of mutations) {
|
|
14018
|
+
this._setAttr(m.attributeName);
|
|
14019
|
+
}
|
|
14020
|
+
}
|
|
13770
14021
|
/**
|
|
13771
14022
|
* resolve inner component definition (handle possible async component)
|
|
13772
14023
|
*/
|
|
@@ -13777,11 +14028,7 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
13777
14028
|
for (let i = 0; i < this.attributes.length; i++) {
|
|
13778
14029
|
this._setAttr(this.attributes[i].name);
|
|
13779
14030
|
}
|
|
13780
|
-
this._ob = new MutationObserver((
|
|
13781
|
-
for (const m of mutations) {
|
|
13782
|
-
this._setAttr(m.attributeName);
|
|
13783
|
-
}
|
|
13784
|
-
});
|
|
14031
|
+
this._ob = new MutationObserver(this._processMutations.bind(this));
|
|
13785
14032
|
this._ob.observe(this, { attributes: true });
|
|
13786
14033
|
const resolve = (def, isAsync = false) => {
|
|
13787
14034
|
this._resolved = true;
|
|
@@ -13858,7 +14105,7 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
13858
14105
|
return this._getProp(key);
|
|
13859
14106
|
},
|
|
13860
14107
|
set(val) {
|
|
13861
|
-
this._setProp(key, val, true,
|
|
14108
|
+
this._setProp(key, val, true, !this._patching);
|
|
13862
14109
|
}
|
|
13863
14110
|
});
|
|
13864
14111
|
}
|
|
@@ -13884,6 +14131,7 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
13884
14131
|
*/
|
|
13885
14132
|
_setProp(key, val, shouldReflect = true, shouldUpdate = false) {
|
|
13886
14133
|
if (val !== this._props[key]) {
|
|
14134
|
+
this._dirty = true;
|
|
13887
14135
|
if (val === REMOVAL) {
|
|
13888
14136
|
delete this._props[key];
|
|
13889
14137
|
} else {
|
|
@@ -13897,7 +14145,10 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
13897
14145
|
}
|
|
13898
14146
|
if (shouldReflect) {
|
|
13899
14147
|
const ob = this._ob;
|
|
13900
|
-
|
|
14148
|
+
if (ob) {
|
|
14149
|
+
this._processMutations(ob.takeRecords());
|
|
14150
|
+
ob.disconnect();
|
|
14151
|
+
}
|
|
13901
14152
|
if (val === true) {
|
|
13902
14153
|
this.setAttribute(hyphenate(key), "");
|
|
13903
14154
|
} else if (typeof val === "string" || typeof val === "number") {
|
|
@@ -14001,7 +14252,7 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
14001
14252
|
* Only called when shadowRoot is false
|
|
14002
14253
|
*/
|
|
14003
14254
|
_renderSlots() {
|
|
14004
|
-
const outlets =
|
|
14255
|
+
const outlets = this._getSlots();
|
|
14005
14256
|
const scopeId = this._instance.type.__scopeId;
|
|
14006
14257
|
for (let i = 0; i < outlets.length; i++) {
|
|
14007
14258
|
const o = outlets[i];
|
|
@@ -14027,12 +14278,45 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
14027
14278
|
parent.removeChild(o);
|
|
14028
14279
|
}
|
|
14029
14280
|
}
|
|
14281
|
+
/**
|
|
14282
|
+
* @internal
|
|
14283
|
+
*/
|
|
14284
|
+
_getSlots() {
|
|
14285
|
+
const roots = [this];
|
|
14286
|
+
if (this._teleportTargets) {
|
|
14287
|
+
roots.push(...this._teleportTargets);
|
|
14288
|
+
}
|
|
14289
|
+
const slots = /* @__PURE__ */ new Set();
|
|
14290
|
+
for (const root of roots) {
|
|
14291
|
+
const found = root.querySelectorAll("slot");
|
|
14292
|
+
for (let i = 0; i < found.length; i++) {
|
|
14293
|
+
slots.add(found[i]);
|
|
14294
|
+
}
|
|
14295
|
+
}
|
|
14296
|
+
return Array.from(slots);
|
|
14297
|
+
}
|
|
14030
14298
|
/**
|
|
14031
14299
|
* @internal
|
|
14032
14300
|
*/
|
|
14033
14301
|
_injectChildStyle(comp) {
|
|
14034
14302
|
this._applyStyles(comp.styles, comp);
|
|
14035
14303
|
}
|
|
14304
|
+
/**
|
|
14305
|
+
* @internal
|
|
14306
|
+
*/
|
|
14307
|
+
_beginPatch() {
|
|
14308
|
+
this._patching = true;
|
|
14309
|
+
this._dirty = false;
|
|
14310
|
+
}
|
|
14311
|
+
/**
|
|
14312
|
+
* @internal
|
|
14313
|
+
*/
|
|
14314
|
+
_endPatch() {
|
|
14315
|
+
this._patching = false;
|
|
14316
|
+
if (this._dirty && this._instance) {
|
|
14317
|
+
this._update();
|
|
14318
|
+
}
|
|
14319
|
+
}
|
|
14036
14320
|
/**
|
|
14037
14321
|
* @internal
|
|
14038
14322
|
*/
|
|
@@ -14116,26 +14400,13 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
14116
14400
|
prevChildren = [];
|
|
14117
14401
|
return;
|
|
14118
14402
|
}
|
|
14119
|
-
prevChildren.forEach(callPendingCbs);
|
|
14403
|
+
prevChildren.forEach((vnode) => callPendingCbs(vnode.el));
|
|
14120
14404
|
prevChildren.forEach(recordPosition);
|
|
14121
14405
|
const movedChildren = prevChildren.filter(applyTranslation);
|
|
14122
|
-
forceReflow();
|
|
14406
|
+
forceReflow(instance.vnode.el);
|
|
14123
14407
|
movedChildren.forEach((c) => {
|
|
14124
14408
|
const el = c.el;
|
|
14125
|
-
|
|
14126
|
-
addTransitionClass(el, moveClass);
|
|
14127
|
-
style.transform = style.webkitTransform = style.transitionDuration = "";
|
|
14128
|
-
const cb = el[moveCbKey] = (e) => {
|
|
14129
|
-
if (e && e.target !== el) {
|
|
14130
|
-
return;
|
|
14131
|
-
}
|
|
14132
|
-
if (!e || /transform$/.test(e.propertyName)) {
|
|
14133
|
-
el.removeEventListener("transitionend", cb);
|
|
14134
|
-
el[moveCbKey] = null;
|
|
14135
|
-
removeTransitionClass(el, moveClass);
|
|
14136
|
-
}
|
|
14137
|
-
};
|
|
14138
|
-
el.addEventListener("transitionend", cb);
|
|
14409
|
+
handleMovedChildren(el, moveClass);
|
|
14139
14410
|
});
|
|
14140
14411
|
prevChildren = [];
|
|
14141
14412
|
});
|
|
@@ -14164,10 +14435,10 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
14164
14435
|
instance
|
|
14165
14436
|
)
|
|
14166
14437
|
);
|
|
14167
|
-
positionMap.set(
|
|
14168
|
-
child,
|
|
14169
|
-
child.el.
|
|
14170
|
-
);
|
|
14438
|
+
positionMap.set(child, {
|
|
14439
|
+
left: child.el.offsetLeft,
|
|
14440
|
+
top: child.el.offsetTop
|
|
14441
|
+
});
|
|
14171
14442
|
}
|
|
14172
14443
|
}
|
|
14173
14444
|
}
|
|
@@ -14188,8 +14459,7 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
14188
14459
|
}
|
|
14189
14460
|
});
|
|
14190
14461
|
const TransitionGroup = TransitionGroupImpl;
|
|
14191
|
-
function callPendingCbs(
|
|
14192
|
-
const el = c.el;
|
|
14462
|
+
function callPendingCbs(el) {
|
|
14193
14463
|
if (el[moveCbKey]) {
|
|
14194
14464
|
el[moveCbKey]();
|
|
14195
14465
|
}
|
|
@@ -14198,19 +14468,30 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
14198
14468
|
}
|
|
14199
14469
|
}
|
|
14200
14470
|
function recordPosition(c) {
|
|
14201
|
-
newPositionMap.set(c,
|
|
14471
|
+
newPositionMap.set(c, {
|
|
14472
|
+
left: c.el.offsetLeft,
|
|
14473
|
+
top: c.el.offsetTop
|
|
14474
|
+
});
|
|
14202
14475
|
}
|
|
14203
14476
|
function applyTranslation(c) {
|
|
14204
|
-
|
|
14205
|
-
|
|
14477
|
+
if (baseApplyTranslation(
|
|
14478
|
+
positionMap.get(c),
|
|
14479
|
+
newPositionMap.get(c),
|
|
14480
|
+
c.el
|
|
14481
|
+
)) {
|
|
14482
|
+
return c;
|
|
14483
|
+
}
|
|
14484
|
+
}
|
|
14485
|
+
function baseApplyTranslation(oldPos, newPos, el) {
|
|
14206
14486
|
const dx = oldPos.left - newPos.left;
|
|
14207
14487
|
const dy = oldPos.top - newPos.top;
|
|
14208
14488
|
if (dx || dy) {
|
|
14209
|
-
const s =
|
|
14489
|
+
const s = el.style;
|
|
14210
14490
|
s.transform = s.webkitTransform = `translate(${dx}px,${dy}px)`;
|
|
14211
14491
|
s.transitionDuration = "0s";
|
|
14212
|
-
return
|
|
14492
|
+
return true;
|
|
14213
14493
|
}
|
|
14494
|
+
return false;
|
|
14214
14495
|
}
|
|
14215
14496
|
function hasCSSTransform(el, root, moveClass) {
|
|
14216
14497
|
const clone = el.cloneNode();
|
|
@@ -14228,6 +14509,22 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
14228
14509
|
container.removeChild(clone);
|
|
14229
14510
|
return hasTransform;
|
|
14230
14511
|
}
|
|
14512
|
+
const handleMovedChildren = (el, moveClass) => {
|
|
14513
|
+
const style = el.style;
|
|
14514
|
+
addTransitionClass(el, moveClass);
|
|
14515
|
+
style.transform = style.webkitTransform = style.transitionDuration = "";
|
|
14516
|
+
const cb = el[moveCbKey] = (e) => {
|
|
14517
|
+
if (e && e.target !== el) {
|
|
14518
|
+
return;
|
|
14519
|
+
}
|
|
14520
|
+
if (!e || e.propertyName.endsWith("transform")) {
|
|
14521
|
+
el.removeEventListener("transitionend", cb);
|
|
14522
|
+
el[moveCbKey] = null;
|
|
14523
|
+
removeTransitionClass(el, moveClass);
|
|
14524
|
+
}
|
|
14525
|
+
};
|
|
14526
|
+
el.addEventListener("transitionend", cb);
|
|
14527
|
+
};
|
|
14231
14528
|
|
|
14232
14529
|
const getModelAssigner = (vnode) => {
|
|
14233
14530
|
const fn = vnode.props["onUpdate:modelValue"] || vnode.props["onModelCompat:input"];
|
|
@@ -14263,21 +14560,21 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
14263
14560
|
vModelTextUpdate(el, oldValue, value, trim, number, lazy);
|
|
14264
14561
|
}
|
|
14265
14562
|
};
|
|
14563
|
+
function castValue(value, trim, number) {
|
|
14564
|
+
if (trim) value = value.trim();
|
|
14565
|
+
if (number) value = looseToNumber(value);
|
|
14566
|
+
return value;
|
|
14567
|
+
}
|
|
14266
14568
|
const vModelTextInit = (el, trim, number, lazy, set) => {
|
|
14267
14569
|
addEventListener(el, lazy ? "change" : "input", (e) => {
|
|
14268
14570
|
if (e.target.composing) return;
|
|
14269
|
-
|
|
14270
|
-
|
|
14271
|
-
|
|
14272
|
-
}
|
|
14273
|
-
if (number || el.type === "number") {
|
|
14274
|
-
domValue = looseToNumber(domValue);
|
|
14275
|
-
}
|
|
14276
|
-
(0, el[assignKey])(domValue);
|
|
14571
|
+
(0, el[assignKey])(
|
|
14572
|
+
castValue(el.value, trim, number || el.type === "number")
|
|
14573
|
+
);
|
|
14277
14574
|
});
|
|
14278
|
-
if (trim) {
|
|
14575
|
+
if (trim || number) {
|
|
14279
14576
|
addEventListener(el, "change", () => {
|
|
14280
|
-
el.value = el.value.
|
|
14577
|
+
el.value = castValue(el.value, trim, number || el.type === "number");
|
|
14281
14578
|
});
|
|
14282
14579
|
}
|
|
14283
14580
|
if (!lazy) {
|
|
@@ -14526,13 +14823,13 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
14526
14823
|
const withModifiers = (fn, modifiers) => {
|
|
14527
14824
|
const cache = fn._withMods || (fn._withMods = {});
|
|
14528
14825
|
const cacheKey = modifiers.join(".");
|
|
14529
|
-
return cache[cacheKey] || (cache[cacheKey] = (event, ...args) => {
|
|
14826
|
+
return cache[cacheKey] || (cache[cacheKey] = ((event, ...args) => {
|
|
14530
14827
|
for (let i = 0; i < modifiers.length; i++) {
|
|
14531
14828
|
const guard = modifierGuards[modifiers[i]];
|
|
14532
14829
|
if (guard && guard(event, modifiers)) return;
|
|
14533
14830
|
}
|
|
14534
14831
|
return fn(event, ...args);
|
|
14535
|
-
});
|
|
14832
|
+
}));
|
|
14536
14833
|
};
|
|
14537
14834
|
const keyNames = {
|
|
14538
14835
|
esc: "escape",
|
|
@@ -14562,7 +14859,7 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
14562
14859
|
}
|
|
14563
14860
|
const cache = fn._withKeys || (fn._withKeys = {});
|
|
14564
14861
|
const cacheKey = modifiers.join(".");
|
|
14565
|
-
return cache[cacheKey] || (cache[cacheKey] = (event) => {
|
|
14862
|
+
return cache[cacheKey] || (cache[cacheKey] = ((event) => {
|
|
14566
14863
|
if (!("key" in event)) {
|
|
14567
14864
|
return;
|
|
14568
14865
|
}
|
|
@@ -14592,7 +14889,7 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
14592
14889
|
}
|
|
14593
14890
|
}
|
|
14594
14891
|
}
|
|
14595
|
-
});
|
|
14892
|
+
}));
|
|
14596
14893
|
};
|
|
14597
14894
|
|
|
14598
14895
|
const rendererOptions = /* @__PURE__ */ extend({ patchProp }, nodeOps);
|
|
@@ -14606,13 +14903,13 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
14606
14903
|
enabledHydration = true;
|
|
14607
14904
|
return renderer;
|
|
14608
14905
|
}
|
|
14609
|
-
const render = (...args) => {
|
|
14906
|
+
const render = ((...args) => {
|
|
14610
14907
|
ensureRenderer().render(...args);
|
|
14611
|
-
};
|
|
14612
|
-
const hydrate = (...args) => {
|
|
14908
|
+
});
|
|
14909
|
+
const hydrate = ((...args) => {
|
|
14613
14910
|
ensureHydrationRenderer().hydrate(...args);
|
|
14614
|
-
};
|
|
14615
|
-
const createApp = (...args) => {
|
|
14911
|
+
});
|
|
14912
|
+
const createApp = ((...args) => {
|
|
14616
14913
|
const app = ensureRenderer().createApp(...args);
|
|
14617
14914
|
{
|
|
14618
14915
|
injectNativeTagCheck(app);
|
|
@@ -14628,7 +14925,7 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
14628
14925
|
if (container.nodeType === 1) {
|
|
14629
14926
|
for (let i = 0; i < container.attributes.length; i++) {
|
|
14630
14927
|
const attr = container.attributes[i];
|
|
14631
|
-
if (attr.name !== "v-cloak" && /^(v-|:|@)/.test(attr.name)) {
|
|
14928
|
+
if (attr.name !== "v-cloak" && /^(?:v-|:|@)/.test(attr.name)) {
|
|
14632
14929
|
compatUtils.warnDeprecation(
|
|
14633
14930
|
"GLOBAL_MOUNT_CONTAINER",
|
|
14634
14931
|
null
|
|
@@ -14649,8 +14946,8 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
14649
14946
|
return proxy;
|
|
14650
14947
|
};
|
|
14651
14948
|
return app;
|
|
14652
|
-
};
|
|
14653
|
-
const createSSRApp = (...args) => {
|
|
14949
|
+
});
|
|
14950
|
+
const createSSRApp = ((...args) => {
|
|
14654
14951
|
const app = ensureHydrationRenderer().createApp(...args);
|
|
14655
14952
|
{
|
|
14656
14953
|
injectNativeTagCheck(app);
|
|
@@ -14664,7 +14961,7 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
14664
14961
|
}
|
|
14665
14962
|
};
|
|
14666
14963
|
return app;
|
|
14667
|
-
};
|
|
14964
|
+
});
|
|
14668
14965
|
function resolveRootNamespace(container) {
|
|
14669
14966
|
if (container instanceof SVGElement) {
|
|
14670
14967
|
return "svg";
|
|
@@ -16163,7 +16460,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
16163
16460
|
return BASE_TRANSITION;
|
|
16164
16461
|
}
|
|
16165
16462
|
}
|
|
16166
|
-
const nonIdentifierRE =
|
|
16463
|
+
const nonIdentifierRE = /^$|^\d|[^\$\w\xA0-\uFFFF]/;
|
|
16167
16464
|
const isSimpleIdentifier = (name) => !nonIdentifierRE.test(name);
|
|
16168
16465
|
const validFirstIdentCharRE = /[A-Za-z_$\xA0-\uFFFF]/;
|
|
16169
16466
|
const validIdentCharRE = /[\.\?\w$\xA0-\uFFFF]/;
|
|
@@ -16232,7 +16529,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
16232
16529
|
return !currentOpenBracketCount && !currentOpenParensCount;
|
|
16233
16530
|
};
|
|
16234
16531
|
const isMemberExpression = isMemberExpressionBrowser ;
|
|
16235
|
-
const fnExpRE = /^\s*(async\s*)?(
|
|
16532
|
+
const fnExpRE = /^\s*(?:async\s*)?(?:\([^)]*?\)|[\w$_]+)\s*(?::[^=]+)?=>|^\s*(?:async\s+)?function(?:\s+[\w$]+)?\s*\(/;
|
|
16236
16533
|
const isFnExpressionBrowser = (exp) => fnExpRE.test(getExpSource(exp));
|
|
16237
16534
|
const isFnExpression = isFnExpressionBrowser ;
|
|
16238
16535
|
function assert(condition, msg) {
|
|
@@ -16275,6 +16572,9 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
16275
16572
|
function isText$1(node) {
|
|
16276
16573
|
return node.type === 5 || node.type === 2;
|
|
16277
16574
|
}
|
|
16575
|
+
function isVPre(p) {
|
|
16576
|
+
return p.type === 7 && p.name === "pre";
|
|
16577
|
+
}
|
|
16278
16578
|
function isVSlot(p) {
|
|
16279
16579
|
return p.type === 7 && p.name === "slot";
|
|
16280
16580
|
}
|
|
@@ -16533,7 +16833,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
16533
16833
|
ondirarg(start, end) {
|
|
16534
16834
|
if (start === end) return;
|
|
16535
16835
|
const arg = getSlice(start, end);
|
|
16536
|
-
if (inVPre) {
|
|
16836
|
+
if (inVPre && !isVPre(currentProp)) {
|
|
16537
16837
|
currentProp.name += arg;
|
|
16538
16838
|
setLocEnd(currentProp.nameLoc, end);
|
|
16539
16839
|
} else {
|
|
@@ -16548,7 +16848,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
16548
16848
|
},
|
|
16549
16849
|
ondirmodifier(start, end) {
|
|
16550
16850
|
const mod = getSlice(start, end);
|
|
16551
|
-
if (inVPre) {
|
|
16851
|
+
if (inVPre && !isVPre(currentProp)) {
|
|
16552
16852
|
currentProp.name += "." + mod;
|
|
16553
16853
|
setLocEnd(currentProp.nameLoc, end);
|
|
16554
16854
|
} else if (currentProp.name === "slot") {
|
|
@@ -17176,6 +17476,11 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
17176
17476
|
} else if (child.type === 12) {
|
|
17177
17477
|
const constantType = doNotHoistNode ? 0 : getConstantType(child, context);
|
|
17178
17478
|
if (constantType >= 2) {
|
|
17479
|
+
if (child.codegenNode.type === 14 && child.codegenNode.arguments.length > 0) {
|
|
17480
|
+
child.codegenNode.arguments.push(
|
|
17481
|
+
-1 + (` /* ${PatchFlagNames[-1]} */` )
|
|
17482
|
+
);
|
|
17483
|
+
}
|
|
17179
17484
|
toCache.push(child);
|
|
17180
17485
|
continue;
|
|
17181
17486
|
}
|
|
@@ -17204,7 +17509,6 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
17204
17509
|
}
|
|
17205
17510
|
}
|
|
17206
17511
|
let cachedAsArray = false;
|
|
17207
|
-
const slotCacheKeys = [];
|
|
17208
17512
|
if (toCache.length === children.length && node.type === 1) {
|
|
17209
17513
|
if (node.tagType === 0 && node.codegenNode && node.codegenNode.type === 13 && isArray(node.codegenNode.children)) {
|
|
17210
17514
|
node.codegenNode.children = getCacheExpression(
|
|
@@ -17214,7 +17518,6 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
17214
17518
|
} else if (node.tagType === 1 && node.codegenNode && node.codegenNode.type === 13 && node.codegenNode.children && !isArray(node.codegenNode.children) && node.codegenNode.children.type === 15) {
|
|
17215
17519
|
const slot = getSlotNode(node.codegenNode, "default");
|
|
17216
17520
|
if (slot) {
|
|
17217
|
-
slotCacheKeys.push(context.cached.length);
|
|
17218
17521
|
slot.returns = getCacheExpression(
|
|
17219
17522
|
createArrayExpression(slot.returns)
|
|
17220
17523
|
);
|
|
@@ -17224,7 +17527,6 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
17224
17527
|
const slotName = findDir(node, "slot", true);
|
|
17225
17528
|
const slot = slotName && slotName.arg && getSlotNode(parent.codegenNode, slotName.arg);
|
|
17226
17529
|
if (slot) {
|
|
17227
|
-
slotCacheKeys.push(context.cached.length);
|
|
17228
17530
|
slot.returns = getCacheExpression(
|
|
17229
17531
|
createArrayExpression(slot.returns)
|
|
17230
17532
|
);
|
|
@@ -17234,23 +17536,12 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
17234
17536
|
}
|
|
17235
17537
|
if (!cachedAsArray) {
|
|
17236
17538
|
for (const child of toCache) {
|
|
17237
|
-
slotCacheKeys.push(context.cached.length);
|
|
17238
17539
|
child.codegenNode = context.cache(child.codegenNode);
|
|
17239
17540
|
}
|
|
17240
17541
|
}
|
|
17241
|
-
if (slotCacheKeys.length && node.type === 1 && node.tagType === 1 && node.codegenNode && node.codegenNode.type === 13 && node.codegenNode.children && !isArray(node.codegenNode.children) && node.codegenNode.children.type === 15) {
|
|
17242
|
-
node.codegenNode.children.properties.push(
|
|
17243
|
-
createObjectProperty(
|
|
17244
|
-
`__`,
|
|
17245
|
-
createSimpleExpression(JSON.stringify(slotCacheKeys), false)
|
|
17246
|
-
)
|
|
17247
|
-
);
|
|
17248
|
-
}
|
|
17249
17542
|
function getCacheExpression(value) {
|
|
17250
17543
|
const exp = context.cache(value);
|
|
17251
|
-
|
|
17252
|
-
exp.needArraySpread = true;
|
|
17253
|
-
}
|
|
17544
|
+
exp.needArraySpread = true;
|
|
17254
17545
|
return exp;
|
|
17255
17546
|
}
|
|
17256
17547
|
function getSlotNode(node2, name) {
|
|
@@ -18381,7 +18672,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
18381
18672
|
}
|
|
18382
18673
|
|
|
18383
18674
|
const transformIf = createStructuralDirectiveTransform(
|
|
18384
|
-
/^(if|else|else-if)$/,
|
|
18675
|
+
/^(?:if|else|else-if)$/,
|
|
18385
18676
|
(node, dir, context) => {
|
|
18386
18677
|
return processIf(node, dir, context, (ifNode, branch, isRoot) => {
|
|
18387
18678
|
const siblings = context.parent.children;
|
|
@@ -18450,7 +18741,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
18450
18741
|
continue;
|
|
18451
18742
|
}
|
|
18452
18743
|
if (sibling && sibling.type === 9) {
|
|
18453
|
-
if (dir.name === "else-if" && sibling.branches[sibling.branches.length - 1].condition === void 0) {
|
|
18744
|
+
if ((dir.name === "else-if" || dir.name === "else") && sibling.branches[sibling.branches.length - 1].condition === void 0) {
|
|
18454
18745
|
context.onError(
|
|
18455
18746
|
createCompilerError(30, node.loc)
|
|
18456
18747
|
);
|
|
@@ -18599,80 +18890,6 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
18599
18890
|
}
|
|
18600
18891
|
}
|
|
18601
18892
|
|
|
18602
|
-
const transformBind = (dir, _node, context) => {
|
|
18603
|
-
const { modifiers, loc } = dir;
|
|
18604
|
-
const arg = dir.arg;
|
|
18605
|
-
let { exp } = dir;
|
|
18606
|
-
if (exp && exp.type === 4 && !exp.content.trim()) {
|
|
18607
|
-
{
|
|
18608
|
-
exp = void 0;
|
|
18609
|
-
}
|
|
18610
|
-
}
|
|
18611
|
-
if (!exp) {
|
|
18612
|
-
if (arg.type !== 4 || !arg.isStatic) {
|
|
18613
|
-
context.onError(
|
|
18614
|
-
createCompilerError(
|
|
18615
|
-
52,
|
|
18616
|
-
arg.loc
|
|
18617
|
-
)
|
|
18618
|
-
);
|
|
18619
|
-
return {
|
|
18620
|
-
props: [
|
|
18621
|
-
createObjectProperty(arg, createSimpleExpression("", true, loc))
|
|
18622
|
-
]
|
|
18623
|
-
};
|
|
18624
|
-
}
|
|
18625
|
-
transformBindShorthand(dir);
|
|
18626
|
-
exp = dir.exp;
|
|
18627
|
-
}
|
|
18628
|
-
if (arg.type !== 4) {
|
|
18629
|
-
arg.children.unshift(`(`);
|
|
18630
|
-
arg.children.push(`) || ""`);
|
|
18631
|
-
} else if (!arg.isStatic) {
|
|
18632
|
-
arg.content = `${arg.content} || ""`;
|
|
18633
|
-
}
|
|
18634
|
-
if (modifiers.some((mod) => mod.content === "camel")) {
|
|
18635
|
-
if (arg.type === 4) {
|
|
18636
|
-
if (arg.isStatic) {
|
|
18637
|
-
arg.content = camelize(arg.content);
|
|
18638
|
-
} else {
|
|
18639
|
-
arg.content = `${context.helperString(CAMELIZE)}(${arg.content})`;
|
|
18640
|
-
}
|
|
18641
|
-
} else {
|
|
18642
|
-
arg.children.unshift(`${context.helperString(CAMELIZE)}(`);
|
|
18643
|
-
arg.children.push(`)`);
|
|
18644
|
-
}
|
|
18645
|
-
}
|
|
18646
|
-
if (!context.inSSR) {
|
|
18647
|
-
if (modifiers.some((mod) => mod.content === "prop")) {
|
|
18648
|
-
injectPrefix(arg, ".");
|
|
18649
|
-
}
|
|
18650
|
-
if (modifiers.some((mod) => mod.content === "attr")) {
|
|
18651
|
-
injectPrefix(arg, "^");
|
|
18652
|
-
}
|
|
18653
|
-
}
|
|
18654
|
-
return {
|
|
18655
|
-
props: [createObjectProperty(arg, exp)]
|
|
18656
|
-
};
|
|
18657
|
-
};
|
|
18658
|
-
const transformBindShorthand = (dir, context) => {
|
|
18659
|
-
const arg = dir.arg;
|
|
18660
|
-
const propName = camelize(arg.content);
|
|
18661
|
-
dir.exp = createSimpleExpression(propName, false, arg.loc);
|
|
18662
|
-
};
|
|
18663
|
-
const injectPrefix = (arg, prefix) => {
|
|
18664
|
-
if (arg.type === 4) {
|
|
18665
|
-
if (arg.isStatic) {
|
|
18666
|
-
arg.content = prefix + arg.content;
|
|
18667
|
-
} else {
|
|
18668
|
-
arg.content = `\`${prefix}\${${arg.content}}\``;
|
|
18669
|
-
}
|
|
18670
|
-
} else {
|
|
18671
|
-
arg.children.unshift(`'${prefix}' + (`);
|
|
18672
|
-
arg.children.push(`)`);
|
|
18673
|
-
}
|
|
18674
|
-
};
|
|
18675
|
-
|
|
18676
18893
|
const transformFor = createStructuralDirectiveTransform(
|
|
18677
18894
|
"for",
|
|
18678
18895
|
(node, dir, context) => {
|
|
@@ -18684,10 +18901,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
18684
18901
|
const isTemplate = isTemplateNode(node);
|
|
18685
18902
|
const memo = findDir(node, "memo");
|
|
18686
18903
|
const keyProp = findProp(node, `key`, false, true);
|
|
18687
|
-
|
|
18688
|
-
if (isDirKey && !keyProp.exp) {
|
|
18689
|
-
transformBindShorthand(keyProp);
|
|
18690
|
-
}
|
|
18904
|
+
keyProp && keyProp.type === 7;
|
|
18691
18905
|
let keyExp = keyProp && (keyProp.type === 6 ? keyProp.value ? createSimpleExpression(keyProp.value.content, true) : void 0 : keyProp.exp);
|
|
18692
18906
|
const keyProperty = keyProp && keyExp ? createObjectProperty(`key`, keyExp) : null;
|
|
18693
18907
|
const isStableFragment = forNode.source.type === 4 && forNode.source.constType > 0;
|
|
@@ -18968,7 +19182,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
18968
19182
|
);
|
|
18969
19183
|
} else if (vElse = findDir(
|
|
18970
19184
|
slotElement,
|
|
18971
|
-
/^else(
|
|
19185
|
+
/^else(?:-if)?$/,
|
|
18972
19186
|
true
|
|
18973
19187
|
/* allowEmpty */
|
|
18974
19188
|
)) {
|
|
@@ -18980,7 +19194,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
18980
19194
|
break;
|
|
18981
19195
|
}
|
|
18982
19196
|
}
|
|
18983
|
-
if (prev && isTemplateNode(prev) && findDir(prev, /^(else-)?if$/)) {
|
|
19197
|
+
if (prev && isTemplateNode(prev) && findDir(prev, /^(?:else-)?if$/)) {
|
|
18984
19198
|
let conditional = dynamicSlots[dynamicSlots.length - 1];
|
|
18985
19199
|
while (conditional.alternate.type === 19) {
|
|
18986
19200
|
conditional = conditional.alternate;
|
|
@@ -19840,6 +20054,58 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
19840
20054
|
return ret;
|
|
19841
20055
|
};
|
|
19842
20056
|
|
|
20057
|
+
const transformBind = (dir, _node, context) => {
|
|
20058
|
+
const { modifiers, loc } = dir;
|
|
20059
|
+
const arg = dir.arg;
|
|
20060
|
+
let { exp } = dir;
|
|
20061
|
+
if (exp && exp.type === 4 && !exp.content.trim()) {
|
|
20062
|
+
{
|
|
20063
|
+
exp = void 0;
|
|
20064
|
+
}
|
|
20065
|
+
}
|
|
20066
|
+
if (arg.type !== 4) {
|
|
20067
|
+
arg.children.unshift(`(`);
|
|
20068
|
+
arg.children.push(`) || ""`);
|
|
20069
|
+
} else if (!arg.isStatic) {
|
|
20070
|
+
arg.content = arg.content ? `${arg.content} || ""` : `""`;
|
|
20071
|
+
}
|
|
20072
|
+
if (modifiers.some((mod) => mod.content === "camel")) {
|
|
20073
|
+
if (arg.type === 4) {
|
|
20074
|
+
if (arg.isStatic) {
|
|
20075
|
+
arg.content = camelize(arg.content);
|
|
20076
|
+
} else {
|
|
20077
|
+
arg.content = `${context.helperString(CAMELIZE)}(${arg.content})`;
|
|
20078
|
+
}
|
|
20079
|
+
} else {
|
|
20080
|
+
arg.children.unshift(`${context.helperString(CAMELIZE)}(`);
|
|
20081
|
+
arg.children.push(`)`);
|
|
20082
|
+
}
|
|
20083
|
+
}
|
|
20084
|
+
if (!context.inSSR) {
|
|
20085
|
+
if (modifiers.some((mod) => mod.content === "prop")) {
|
|
20086
|
+
injectPrefix(arg, ".");
|
|
20087
|
+
}
|
|
20088
|
+
if (modifiers.some((mod) => mod.content === "attr")) {
|
|
20089
|
+
injectPrefix(arg, "^");
|
|
20090
|
+
}
|
|
20091
|
+
}
|
|
20092
|
+
return {
|
|
20093
|
+
props: [createObjectProperty(arg, exp)]
|
|
20094
|
+
};
|
|
20095
|
+
};
|
|
20096
|
+
const injectPrefix = (arg, prefix) => {
|
|
20097
|
+
if (arg.type === 4) {
|
|
20098
|
+
if (arg.isStatic) {
|
|
20099
|
+
arg.content = prefix + arg.content;
|
|
20100
|
+
} else {
|
|
20101
|
+
arg.content = `\`${prefix}\${${arg.content}}\``;
|
|
20102
|
+
}
|
|
20103
|
+
} else {
|
|
20104
|
+
arg.children.unshift(`'${prefix}' + (`);
|
|
20105
|
+
arg.children.push(`)`);
|
|
20106
|
+
}
|
|
20107
|
+
};
|
|
20108
|
+
|
|
19843
20109
|
const transformText = (node, context) => {
|
|
19844
20110
|
if (node.type === 0 || node.type === 1 || node.type === 11 || node.type === 10) {
|
|
19845
20111
|
return () => {
|
|
@@ -20148,7 +20414,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
20148
20414
|
const transformMemo = (node, context) => {
|
|
20149
20415
|
if (node.type === 1) {
|
|
20150
20416
|
const dir = findDir(node, "memo");
|
|
20151
|
-
if (!dir || seen.has(node)) {
|
|
20417
|
+
if (!dir || seen.has(node) || context.inSSR) {
|
|
20152
20418
|
return;
|
|
20153
20419
|
}
|
|
20154
20420
|
seen.add(node);
|
|
@@ -20170,9 +20436,36 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
20170
20436
|
}
|
|
20171
20437
|
};
|
|
20172
20438
|
|
|
20439
|
+
const transformVBindShorthand = (node, context) => {
|
|
20440
|
+
if (node.type === 1) {
|
|
20441
|
+
for (const prop of node.props) {
|
|
20442
|
+
if (prop.type === 7 && prop.name === "bind" && (!prop.exp || // #13930 :foo in in-DOM templates will be parsed into :foo="" by browser
|
|
20443
|
+
prop.exp.type === 4 && !prop.exp.content.trim()) && prop.arg) {
|
|
20444
|
+
const arg = prop.arg;
|
|
20445
|
+
if (arg.type !== 4 || !arg.isStatic) {
|
|
20446
|
+
context.onError(
|
|
20447
|
+
createCompilerError(
|
|
20448
|
+
52,
|
|
20449
|
+
arg.loc
|
|
20450
|
+
)
|
|
20451
|
+
);
|
|
20452
|
+
prop.exp = createSimpleExpression("", true, arg.loc);
|
|
20453
|
+
} else {
|
|
20454
|
+
const propName = camelize(arg.content);
|
|
20455
|
+
if (validFirstIdentCharRE.test(propName[0]) || // allow hyphen first char for https://github.com/vuejs/language-tools/pull/3424
|
|
20456
|
+
propName[0] === "-") {
|
|
20457
|
+
prop.exp = createSimpleExpression(propName, false, arg.loc);
|
|
20458
|
+
}
|
|
20459
|
+
}
|
|
20460
|
+
}
|
|
20461
|
+
}
|
|
20462
|
+
}
|
|
20463
|
+
};
|
|
20464
|
+
|
|
20173
20465
|
function getBaseTransformPreset(prefixIdentifiers) {
|
|
20174
20466
|
return [
|
|
20175
20467
|
[
|
|
20468
|
+
transformVBindShorthand,
|
|
20176
20469
|
transformOnce,
|
|
20177
20470
|
transformIf,
|
|
20178
20471
|
transformMemo,
|
|
@@ -20623,46 +20916,46 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
20623
20916
|
if (node.type === 1 && node.tagType === 1) {
|
|
20624
20917
|
const component = context.isBuiltInComponent(node.tag);
|
|
20625
20918
|
if (component === TRANSITION) {
|
|
20626
|
-
return ()
|
|
20627
|
-
if (!node.children.length) {
|
|
20628
|
-
return;
|
|
20629
|
-
}
|
|
20630
|
-
if (hasMultipleChildren(node)) {
|
|
20631
|
-
context.onError(
|
|
20632
|
-
createDOMCompilerError(
|
|
20633
|
-
62,
|
|
20634
|
-
{
|
|
20635
|
-
start: node.children[0].loc.start,
|
|
20636
|
-
end: node.children[node.children.length - 1].loc.end,
|
|
20637
|
-
source: ""
|
|
20638
|
-
}
|
|
20639
|
-
)
|
|
20640
|
-
);
|
|
20641
|
-
}
|
|
20642
|
-
const child = node.children[0];
|
|
20643
|
-
if (child.type === 1) {
|
|
20644
|
-
for (const p of child.props) {
|
|
20645
|
-
if (p.type === 7 && p.name === "show") {
|
|
20646
|
-
node.props.push({
|
|
20647
|
-
type: 6,
|
|
20648
|
-
name: "persisted",
|
|
20649
|
-
nameLoc: node.loc,
|
|
20650
|
-
value: void 0,
|
|
20651
|
-
loc: node.loc
|
|
20652
|
-
});
|
|
20653
|
-
}
|
|
20654
|
-
}
|
|
20655
|
-
}
|
|
20656
|
-
};
|
|
20919
|
+
return postTransformTransition(node, context.onError);
|
|
20657
20920
|
}
|
|
20658
20921
|
}
|
|
20659
20922
|
};
|
|
20660
|
-
function
|
|
20923
|
+
function postTransformTransition(node, onError, hasMultipleChildren = defaultHasMultipleChildren) {
|
|
20924
|
+
return () => {
|
|
20925
|
+
if (!node.children.length) {
|
|
20926
|
+
return;
|
|
20927
|
+
}
|
|
20928
|
+
if (hasMultipleChildren(node)) {
|
|
20929
|
+
onError(
|
|
20930
|
+
createDOMCompilerError(62, {
|
|
20931
|
+
start: node.children[0].loc.start,
|
|
20932
|
+
end: node.children[node.children.length - 1].loc.end,
|
|
20933
|
+
source: ""
|
|
20934
|
+
})
|
|
20935
|
+
);
|
|
20936
|
+
}
|
|
20937
|
+
const child = node.children[0];
|
|
20938
|
+
if (child.type === 1) {
|
|
20939
|
+
for (const p of child.props) {
|
|
20940
|
+
if (p.type === 7 && p.name === "show") {
|
|
20941
|
+
node.props.push({
|
|
20942
|
+
type: 6,
|
|
20943
|
+
name: "persisted",
|
|
20944
|
+
nameLoc: node.loc,
|
|
20945
|
+
value: void 0,
|
|
20946
|
+
loc: node.loc
|
|
20947
|
+
});
|
|
20948
|
+
}
|
|
20949
|
+
}
|
|
20950
|
+
}
|
|
20951
|
+
};
|
|
20952
|
+
}
|
|
20953
|
+
function defaultHasMultipleChildren(node) {
|
|
20661
20954
|
const children = node.children = node.children.filter(
|
|
20662
20955
|
(c) => c.type !== 3 && !(c.type === 2 && !c.content.trim())
|
|
20663
20956
|
);
|
|
20664
20957
|
const child = children[0];
|
|
20665
|
-
return children.length !== 1 || child.type === 11 || child.type === 9 && child.branches.some(
|
|
20958
|
+
return children.length !== 1 || child.type === 11 || child.type === 9 && child.branches.some(defaultHasMultipleChildren);
|
|
20666
20959
|
}
|
|
20667
20960
|
|
|
20668
20961
|
const ignoreSideEffectTags = (node, context) => {
|