@vue/compat 3.5.20 → 3.5.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/vue.cjs.js +272 -176
- package/dist/vue.cjs.prod.js +263 -168
- package/dist/vue.esm-browser.js +216 -158
- package/dist/vue.esm-browser.prod.js +9 -9
- package/dist/vue.esm-bundler.js +216 -158
- package/dist/vue.global.js +216 -158
- package/dist/vue.global.prod.js +9 -9
- package/dist/vue.runtime.esm-browser.js +133 -76
- package/dist/vue.runtime.esm-browser.prod.js +3 -3
- package/dist/vue.runtime.esm-bundler.js +133 -76
- package/dist/vue.runtime.global.js +133 -76
- package/dist/vue.runtime.global.prod.js +3 -3
- package/package.json +3 -3
package/dist/vue.global.js
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compat v3.5.
|
|
2
|
+
* @vue/compat v3.5.22
|
|
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);
|
|
@@ -64,10 +63,10 @@ var Vue = (function () {
|
|
|
64
63
|
return hit || (cache[str] = fn(str));
|
|
65
64
|
});
|
|
66
65
|
};
|
|
67
|
-
const camelizeRE =
|
|
66
|
+
const camelizeRE = /-\w/g;
|
|
68
67
|
const camelize = cacheStringFunction(
|
|
69
68
|
(str) => {
|
|
70
|
-
return str.replace(camelizeRE, (
|
|
69
|
+
return str.replace(camelizeRE, (c) => c.slice(1).toUpperCase());
|
|
71
70
|
}
|
|
72
71
|
);
|
|
73
72
|
const hyphenateRE = /\B([A-Z])/g;
|
|
@@ -1219,7 +1218,7 @@ var Vue = (function () {
|
|
|
1219
1218
|
iter._next = iter.next;
|
|
1220
1219
|
iter.next = () => {
|
|
1221
1220
|
const result = iter._next();
|
|
1222
|
-
if (result.
|
|
1221
|
+
if (!result.done) {
|
|
1223
1222
|
result.value = wrapValue(result.value);
|
|
1224
1223
|
}
|
|
1225
1224
|
return result;
|
|
@@ -1346,7 +1345,8 @@ var Vue = (function () {
|
|
|
1346
1345
|
return res;
|
|
1347
1346
|
}
|
|
1348
1347
|
if (isRef(res)) {
|
|
1349
|
-
|
|
1348
|
+
const value = targetIsArray && isIntegerKey(key) ? res : res.value;
|
|
1349
|
+
return isReadonly2 && isObject(value) ? readonly(value) : value;
|
|
1350
1350
|
}
|
|
1351
1351
|
if (isObject(res)) {
|
|
1352
1352
|
return isReadonly2 ? readonly(res) : reactive(res);
|
|
@@ -2230,11 +2230,11 @@ var Vue = (function () {
|
|
|
2230
2230
|
if (depth <= 0 || !isObject(value) || value["__v_skip"]) {
|
|
2231
2231
|
return value;
|
|
2232
2232
|
}
|
|
2233
|
-
seen = seen || /* @__PURE__ */ new
|
|
2234
|
-
if (seen.
|
|
2233
|
+
seen = seen || /* @__PURE__ */ new Map();
|
|
2234
|
+
if ((seen.get(value) || 0) >= depth) {
|
|
2235
2235
|
return value;
|
|
2236
2236
|
}
|
|
2237
|
-
seen.
|
|
2237
|
+
seen.set(value, depth);
|
|
2238
2238
|
depth--;
|
|
2239
2239
|
if (isRef(value)) {
|
|
2240
2240
|
traverse(value.value, depth, seen);
|
|
@@ -2773,10 +2773,12 @@ var Vue = (function () {
|
|
|
2773
2773
|
dirtyInstances.delete(instance);
|
|
2774
2774
|
} else if (instance.parent) {
|
|
2775
2775
|
queueJob(() => {
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2776
|
+
if (!(instance.job.flags & 8)) {
|
|
2777
|
+
isHmrUpdating = true;
|
|
2778
|
+
instance.parent.update();
|
|
2779
|
+
isHmrUpdating = false;
|
|
2780
|
+
dirtyInstances.delete(instance);
|
|
2781
|
+
}
|
|
2780
2782
|
});
|
|
2781
2783
|
} else if (instance.appContext.reload) {
|
|
2782
2784
|
instance.appContext.reload();
|
|
@@ -2880,7 +2882,6 @@ var Vue = (function () {
|
|
|
2880
2882
|
_devtoolsComponentRemoved(component);
|
|
2881
2883
|
}
|
|
2882
2884
|
};
|
|
2883
|
-
/*! #__NO_SIDE_EFFECTS__ */
|
|
2884
2885
|
// @__NO_SIDE_EFFECTS__
|
|
2885
2886
|
function createDevtoolsComponentHook(hook) {
|
|
2886
2887
|
return (component) => {
|
|
@@ -3594,9 +3595,6 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
3594
3595
|
insert(mainAnchor, container, anchor);
|
|
3595
3596
|
const mount = (container2, anchor2) => {
|
|
3596
3597
|
if (shapeFlag & 16) {
|
|
3597
|
-
if (parentComponent && parentComponent.isCE) {
|
|
3598
|
-
parentComponent.ce._teleportTarget = container2;
|
|
3599
|
-
}
|
|
3600
3598
|
mountChildren(
|
|
3601
3599
|
children,
|
|
3602
3600
|
container2,
|
|
@@ -3618,6 +3616,9 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
3618
3616
|
} else if (namespace !== "mathml" && isTargetMathML(target)) {
|
|
3619
3617
|
namespace = "mathml";
|
|
3620
3618
|
}
|
|
3619
|
+
if (parentComponent && parentComponent.isCE) {
|
|
3620
|
+
(parentComponent.ce._teleportTargets || (parentComponent.ce._teleportTargets = /* @__PURE__ */ new Set())).add(target);
|
|
3621
|
+
}
|
|
3621
3622
|
if (!disabled) {
|
|
3622
3623
|
mount(target, targetAnchor);
|
|
3623
3624
|
updateCssVars(n2, false);
|
|
@@ -3806,26 +3807,34 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
3806
3807
|
function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, {
|
|
3807
3808
|
o: { nextSibling, parentNode, querySelector, insert, createText }
|
|
3808
3809
|
}, hydrateChildren) {
|
|
3810
|
+
function hydrateDisabledTeleport(node2, vnode2, targetStart, targetAnchor) {
|
|
3811
|
+
vnode2.anchor = hydrateChildren(
|
|
3812
|
+
nextSibling(node2),
|
|
3813
|
+
vnode2,
|
|
3814
|
+
parentNode(node2),
|
|
3815
|
+
parentComponent,
|
|
3816
|
+
parentSuspense,
|
|
3817
|
+
slotScopeIds,
|
|
3818
|
+
optimized
|
|
3819
|
+
);
|
|
3820
|
+
vnode2.targetStart = targetStart;
|
|
3821
|
+
vnode2.targetAnchor = targetAnchor;
|
|
3822
|
+
}
|
|
3809
3823
|
const target = vnode.target = resolveTarget(
|
|
3810
3824
|
vnode.props,
|
|
3811
3825
|
querySelector
|
|
3812
3826
|
);
|
|
3827
|
+
const disabled = isTeleportDisabled(vnode.props);
|
|
3813
3828
|
if (target) {
|
|
3814
|
-
const disabled = isTeleportDisabled(vnode.props);
|
|
3815
3829
|
const targetNode = target._lpa || target.firstChild;
|
|
3816
3830
|
if (vnode.shapeFlag & 16) {
|
|
3817
3831
|
if (disabled) {
|
|
3818
|
-
|
|
3819
|
-
|
|
3832
|
+
hydrateDisabledTeleport(
|
|
3833
|
+
node,
|
|
3820
3834
|
vnode,
|
|
3821
|
-
|
|
3822
|
-
|
|
3823
|
-
parentSuspense,
|
|
3824
|
-
slotScopeIds,
|
|
3825
|
-
optimized
|
|
3835
|
+
targetNode,
|
|
3836
|
+
targetNode && nextSibling(targetNode)
|
|
3826
3837
|
);
|
|
3827
|
-
vnode.targetStart = targetNode;
|
|
3828
|
-
vnode.targetAnchor = targetNode && nextSibling(targetNode);
|
|
3829
3838
|
} else {
|
|
3830
3839
|
vnode.anchor = nextSibling(node);
|
|
3831
3840
|
let targetAnchor = targetNode;
|
|
@@ -3856,6 +3865,10 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
3856
3865
|
}
|
|
3857
3866
|
}
|
|
3858
3867
|
updateCssVars(vnode, disabled);
|
|
3868
|
+
} else if (disabled) {
|
|
3869
|
+
if (vnode.shapeFlag & 16) {
|
|
3870
|
+
hydrateDisabledTeleport(node, vnode, node, nextSibling(node));
|
|
3871
|
+
}
|
|
3859
3872
|
}
|
|
3860
3873
|
return vnode.anchor && nextSibling(vnode.anchor);
|
|
3861
3874
|
}
|
|
@@ -3967,7 +3980,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
3967
3980
|
setTransitionHooks(innerChild, enterHooks);
|
|
3968
3981
|
}
|
|
3969
3982
|
let oldInnerChild = instance.subTree && getInnerChild$1(instance.subTree);
|
|
3970
|
-
if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(
|
|
3983
|
+
if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(oldInnerChild, innerChild) && recursiveGetSubtree(instance).type !== Comment) {
|
|
3971
3984
|
let leavingHooks = resolveTransitionHooks(
|
|
3972
3985
|
oldInnerChild,
|
|
3973
3986
|
rawProps,
|
|
@@ -4250,7 +4263,6 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
4250
4263
|
return ret;
|
|
4251
4264
|
}
|
|
4252
4265
|
|
|
4253
|
-
/*! #__NO_SIDE_EFFECTS__ */
|
|
4254
4266
|
// @__NO_SIDE_EFFECTS__
|
|
4255
4267
|
function defineComponent(options, extraOptions) {
|
|
4256
4268
|
return isFunction(options) ? (
|
|
@@ -4303,6 +4315,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
4303
4315
|
return ret;
|
|
4304
4316
|
}
|
|
4305
4317
|
|
|
4318
|
+
const pendingSetRefMap = /* @__PURE__ */ new WeakMap();
|
|
4306
4319
|
function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
4307
4320
|
if (isArray(rawRef)) {
|
|
4308
4321
|
rawRef.forEach(
|
|
@@ -4352,6 +4365,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
4352
4365
|
return !knownTemplateRefs.has(ref2);
|
|
4353
4366
|
};
|
|
4354
4367
|
if (oldRef != null && oldRef !== ref) {
|
|
4368
|
+
invalidatePendingSetRef(oldRawRef);
|
|
4355
4369
|
if (isString(oldRef)) {
|
|
4356
4370
|
refs[oldRef] = null;
|
|
4357
4371
|
if (canSetSetupRef(oldRef)) {
|
|
@@ -4409,9 +4423,15 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
4409
4423
|
}
|
|
4410
4424
|
};
|
|
4411
4425
|
if (value) {
|
|
4412
|
-
|
|
4413
|
-
|
|
4426
|
+
const job = () => {
|
|
4427
|
+
doSet();
|
|
4428
|
+
pendingSetRefMap.delete(rawRef);
|
|
4429
|
+
};
|
|
4430
|
+
job.id = -1;
|
|
4431
|
+
pendingSetRefMap.set(rawRef, job);
|
|
4432
|
+
queuePostRenderEffect(job, parentSuspense);
|
|
4414
4433
|
} else {
|
|
4434
|
+
invalidatePendingSetRef(rawRef);
|
|
4415
4435
|
doSet();
|
|
4416
4436
|
}
|
|
4417
4437
|
} else {
|
|
@@ -4419,6 +4439,13 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
4419
4439
|
}
|
|
4420
4440
|
}
|
|
4421
4441
|
}
|
|
4442
|
+
function invalidatePendingSetRef(rawRef) {
|
|
4443
|
+
const pendingSetRef = pendingSetRefMap.get(rawRef);
|
|
4444
|
+
if (pendingSetRef) {
|
|
4445
|
+
pendingSetRef.flags |= 8;
|
|
4446
|
+
pendingSetRefMap.delete(rawRef);
|
|
4447
|
+
}
|
|
4448
|
+
}
|
|
4422
4449
|
|
|
4423
4450
|
let hasLoggedMismatchError = false;
|
|
4424
4451
|
const logMismatchError = () => {
|
|
@@ -5151,7 +5178,6 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
5151
5178
|
}
|
|
5152
5179
|
|
|
5153
5180
|
const isAsyncWrapper = (i) => !!i.type.__asyncLoader;
|
|
5154
|
-
/*! #__NO_SIDE_EFFECTS__ */
|
|
5155
5181
|
// @__NO_SIDE_EFFECTS__
|
|
5156
5182
|
function defineAsyncComponent(source) {
|
|
5157
5183
|
if (isFunction(source)) {
|
|
@@ -6046,12 +6072,13 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
6046
6072
|
|
|
6047
6073
|
function renderSlot(slots, name, props = {}, fallback, noSlotted) {
|
|
6048
6074
|
if (currentRenderingInstance.ce || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.ce) {
|
|
6075
|
+
const hasProps = Object.keys(props).length > 0;
|
|
6049
6076
|
if (name !== "default") props.name = name;
|
|
6050
6077
|
return openBlock(), createBlock(
|
|
6051
6078
|
Fragment,
|
|
6052
6079
|
null,
|
|
6053
6080
|
[createVNode("slot", props, fallback && fallback())],
|
|
6054
|
-
64
|
|
6081
|
+
hasProps ? -2 : 64
|
|
6055
6082
|
);
|
|
6056
6083
|
}
|
|
6057
6084
|
let slot = slots[name];
|
|
@@ -7239,7 +7266,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
7239
7266
|
return vm;
|
|
7240
7267
|
}
|
|
7241
7268
|
}
|
|
7242
|
-
Vue.version = `2.6.14-compat:${"3.5.
|
|
7269
|
+
Vue.version = `2.6.14-compat:${"3.5.22"}`;
|
|
7243
7270
|
Vue.config = singletonApp.config;
|
|
7244
7271
|
Vue.use = (plugin, ...options) => {
|
|
7245
7272
|
if (plugin && isFunction(plugin.install)) {
|
|
@@ -7497,7 +7524,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
7497
7524
|
{
|
|
7498
7525
|
for (let i = 0; i < container.attributes.length; i++) {
|
|
7499
7526
|
const attr = container.attributes[i];
|
|
7500
|
-
if (attr.name !== "v-cloak" && /^(v-|:|@)/.test(attr.name)) {
|
|
7527
|
+
if (attr.name !== "v-cloak" && /^(?:v-|:|@)/.test(attr.name)) {
|
|
7501
7528
|
warnDeprecation$1("GLOBAL_MOUNT_CONTAINER", null);
|
|
7502
7529
|
break;
|
|
7503
7530
|
}
|
|
@@ -10281,8 +10308,9 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
10281
10308
|
return emit$1(instance, event, args);
|
|
10282
10309
|
}
|
|
10283
10310
|
}
|
|
10311
|
+
const mixinEmitsCache = /* @__PURE__ */ new WeakMap();
|
|
10284
10312
|
function normalizeEmitsOptions(comp, appContext, asMixin = false) {
|
|
10285
|
-
const cache = appContext.emitsCache;
|
|
10313
|
+
const cache = asMixin ? mixinEmitsCache : appContext.emitsCache;
|
|
10286
10314
|
const cached = cache.get(comp);
|
|
10287
10315
|
if (cached !== void 0) {
|
|
10288
10316
|
return cached;
|
|
@@ -10754,7 +10782,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
10754
10782
|
const { activeBranch, pendingBranch, isInFallback, isHydrating } = suspense;
|
|
10755
10783
|
if (pendingBranch) {
|
|
10756
10784
|
suspense.pendingBranch = newBranch;
|
|
10757
|
-
if (isSameVNodeType(
|
|
10785
|
+
if (isSameVNodeType(pendingBranch, newBranch)) {
|
|
10758
10786
|
patch(
|
|
10759
10787
|
pendingBranch,
|
|
10760
10788
|
newBranch,
|
|
@@ -10825,7 +10853,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
10825
10853
|
);
|
|
10826
10854
|
setActiveBranch(suspense, newFallback);
|
|
10827
10855
|
}
|
|
10828
|
-
} else if (activeBranch && isSameVNodeType(
|
|
10856
|
+
} else if (activeBranch && isSameVNodeType(activeBranch, newBranch)) {
|
|
10829
10857
|
patch(
|
|
10830
10858
|
activeBranch,
|
|
10831
10859
|
newBranch,
|
|
@@ -10856,7 +10884,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
10856
10884
|
}
|
|
10857
10885
|
}
|
|
10858
10886
|
} else {
|
|
10859
|
-
if (activeBranch && isSameVNodeType(
|
|
10887
|
+
if (activeBranch && isSameVNodeType(activeBranch, newBranch)) {
|
|
10860
10888
|
patch(
|
|
10861
10889
|
activeBranch,
|
|
10862
10890
|
newBranch,
|
|
@@ -12078,7 +12106,7 @@ Component that was made reactive: `,
|
|
|
12078
12106
|
return instance.proxy;
|
|
12079
12107
|
}
|
|
12080
12108
|
}
|
|
12081
|
-
const classifyRE = /(?:^|[-_])
|
|
12109
|
+
const classifyRE = /(?:^|[-_])\w/g;
|
|
12082
12110
|
const classify = (str) => str.replace(classifyRE, (c) => c.toUpperCase()).replace(/[-_]/g, "");
|
|
12083
12111
|
function getComponentName(Component, includeInferred = true) {
|
|
12084
12112
|
return isFunction(Component) ? Component.displayName || Component.name : Component.name || includeInferred && Component.__name;
|
|
@@ -12121,23 +12149,28 @@ Component that was made reactive: `,
|
|
|
12121
12149
|
};
|
|
12122
12150
|
|
|
12123
12151
|
function h(type, propsOrChildren, children) {
|
|
12124
|
-
|
|
12125
|
-
|
|
12126
|
-
|
|
12127
|
-
|
|
12128
|
-
|
|
12152
|
+
try {
|
|
12153
|
+
setBlockTracking(-1);
|
|
12154
|
+
const l = arguments.length;
|
|
12155
|
+
if (l === 2) {
|
|
12156
|
+
if (isObject(propsOrChildren) && !isArray(propsOrChildren)) {
|
|
12157
|
+
if (isVNode(propsOrChildren)) {
|
|
12158
|
+
return createVNode(type, null, [propsOrChildren]);
|
|
12159
|
+
}
|
|
12160
|
+
return createVNode(type, propsOrChildren);
|
|
12161
|
+
} else {
|
|
12162
|
+
return createVNode(type, null, propsOrChildren);
|
|
12129
12163
|
}
|
|
12130
|
-
return createVNode(type, propsOrChildren);
|
|
12131
12164
|
} else {
|
|
12132
|
-
|
|
12133
|
-
|
|
12134
|
-
|
|
12135
|
-
|
|
12136
|
-
|
|
12137
|
-
|
|
12138
|
-
children = [children];
|
|
12165
|
+
if (l > 3) {
|
|
12166
|
+
children = Array.prototype.slice.call(arguments, 2);
|
|
12167
|
+
} else if (l === 3 && isVNode(children)) {
|
|
12168
|
+
children = [children];
|
|
12169
|
+
}
|
|
12170
|
+
return createVNode(type, propsOrChildren, children);
|
|
12139
12171
|
}
|
|
12140
|
-
|
|
12172
|
+
} finally {
|
|
12173
|
+
setBlockTracking(1);
|
|
12141
12174
|
}
|
|
12142
12175
|
}
|
|
12143
12176
|
|
|
@@ -12347,7 +12380,7 @@ Component that was made reactive: `,
|
|
|
12347
12380
|
return true;
|
|
12348
12381
|
}
|
|
12349
12382
|
|
|
12350
|
-
const version = "3.5.
|
|
12383
|
+
const version = "3.5.22";
|
|
12351
12384
|
const warn = warn$1 ;
|
|
12352
12385
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
12353
12386
|
const devtools = devtools$1 ;
|
|
@@ -12605,11 +12638,11 @@ Component that was made reactive: `,
|
|
|
12605
12638
|
addTransitionClass(el, legacyLeaveFromClass);
|
|
12606
12639
|
}
|
|
12607
12640
|
if (!el._enterCancelled) {
|
|
12608
|
-
forceReflow();
|
|
12641
|
+
forceReflow(el);
|
|
12609
12642
|
addTransitionClass(el, leaveActiveClass);
|
|
12610
12643
|
} else {
|
|
12611
12644
|
addTransitionClass(el, leaveActiveClass);
|
|
12612
|
-
forceReflow();
|
|
12645
|
+
forceReflow(el);
|
|
12613
12646
|
}
|
|
12614
12647
|
nextFrame(() => {
|
|
12615
12648
|
if (!el._isLeaving) {
|
|
@@ -12738,7 +12771,7 @@ Component that was made reactive: `,
|
|
|
12738
12771
|
type = timeout > 0 ? transitionTimeout > animationTimeout ? TRANSITION$1 : ANIMATION : null;
|
|
12739
12772
|
propCount = type ? type === TRANSITION$1 ? transitionDurations.length : animationDurations.length : 0;
|
|
12740
12773
|
}
|
|
12741
|
-
const hasTransform = type === TRANSITION$1 && /\b(transform|all)(
|
|
12774
|
+
const hasTransform = type === TRANSITION$1 && /\b(?:transform|all)(?:,|$)/.test(
|
|
12742
12775
|
getStyleProperties(`${TRANSITION$1}Property`).toString()
|
|
12743
12776
|
);
|
|
12744
12777
|
return {
|
|
@@ -12758,8 +12791,9 @@ Component that was made reactive: `,
|
|
|
12758
12791
|
if (s === "auto") return 0;
|
|
12759
12792
|
return Number(s.slice(0, -1).replace(",", ".")) * 1e3;
|
|
12760
12793
|
}
|
|
12761
|
-
function forceReflow() {
|
|
12762
|
-
|
|
12794
|
+
function forceReflow(el) {
|
|
12795
|
+
const targetDocument = el ? el.ownerDocument : document;
|
|
12796
|
+
return targetDocument.body.offsetHeight;
|
|
12763
12797
|
}
|
|
12764
12798
|
|
|
12765
12799
|
function patchClass(el, value, isSVG) {
|
|
@@ -12892,7 +12926,7 @@ Component that was made reactive: `,
|
|
|
12892
12926
|
}
|
|
12893
12927
|
}
|
|
12894
12928
|
|
|
12895
|
-
const displayRE = /(
|
|
12929
|
+
const displayRE = /(?:^|;)\s*display\s*:/;
|
|
12896
12930
|
function patchStyle(el, prev, next) {
|
|
12897
12931
|
const style = el.style;
|
|
12898
12932
|
const isCssString = isString(next);
|
|
@@ -13259,11 +13293,10 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
13259
13293
|
}
|
|
13260
13294
|
|
|
13261
13295
|
const REMOVAL = {};
|
|
13262
|
-
/*! #__NO_SIDE_EFFECTS__ */
|
|
13263
13296
|
// @__NO_SIDE_EFFECTS__
|
|
13264
13297
|
function defineCustomElement(options, extraOptions, _createApp) {
|
|
13265
|
-
|
|
13266
|
-
if (isPlainObject(Comp)) extend(Comp, extraOptions);
|
|
13298
|
+
let Comp = defineComponent(options, extraOptions);
|
|
13299
|
+
if (isPlainObject(Comp)) Comp = extend({}, Comp, extraOptions);
|
|
13267
13300
|
class VueCustomElement extends VueElement {
|
|
13268
13301
|
constructor(initialProps) {
|
|
13269
13302
|
super(Comp, initialProps, _createApp);
|
|
@@ -13272,7 +13305,6 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
13272
13305
|
VueCustomElement.def = Comp;
|
|
13273
13306
|
return VueCustomElement;
|
|
13274
13307
|
}
|
|
13275
|
-
|
|
13276
13308
|
const defineSSRCustomElement = (/* @__NO_SIDE_EFFECTS__ */ (options, extraOptions) => {
|
|
13277
13309
|
return /* @__PURE__ */ defineCustomElement(options, extraOptions, createSSRApp);
|
|
13278
13310
|
});
|
|
@@ -13311,7 +13343,11 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
13311
13343
|
);
|
|
13312
13344
|
}
|
|
13313
13345
|
if (_def.shadowRoot !== false) {
|
|
13314
|
-
this.attachShadow(
|
|
13346
|
+
this.attachShadow(
|
|
13347
|
+
extend({}, _def.shadowRootOptions, {
|
|
13348
|
+
mode: "open"
|
|
13349
|
+
})
|
|
13350
|
+
);
|
|
13315
13351
|
this._root = this.shadowRoot;
|
|
13316
13352
|
} else {
|
|
13317
13353
|
this._root = this;
|
|
@@ -13371,9 +13407,18 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
13371
13407
|
this._app && this._app.unmount();
|
|
13372
13408
|
if (this._instance) this._instance.ce = void 0;
|
|
13373
13409
|
this._app = this._instance = null;
|
|
13410
|
+
if (this._teleportTargets) {
|
|
13411
|
+
this._teleportTargets.clear();
|
|
13412
|
+
this._teleportTargets = void 0;
|
|
13413
|
+
}
|
|
13374
13414
|
}
|
|
13375
13415
|
});
|
|
13376
13416
|
}
|
|
13417
|
+
_processMutations(mutations) {
|
|
13418
|
+
for (const m of mutations) {
|
|
13419
|
+
this._setAttr(m.attributeName);
|
|
13420
|
+
}
|
|
13421
|
+
}
|
|
13377
13422
|
/**
|
|
13378
13423
|
* resolve inner component definition (handle possible async component)
|
|
13379
13424
|
*/
|
|
@@ -13384,11 +13429,7 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
13384
13429
|
for (let i = 0; i < this.attributes.length; i++) {
|
|
13385
13430
|
this._setAttr(this.attributes[i].name);
|
|
13386
13431
|
}
|
|
13387
|
-
this._ob = new MutationObserver((
|
|
13388
|
-
for (const m of mutations) {
|
|
13389
|
-
this._setAttr(m.attributeName);
|
|
13390
|
-
}
|
|
13391
|
-
});
|
|
13432
|
+
this._ob = new MutationObserver(this._processMutations.bind(this));
|
|
13392
13433
|
this._ob.observe(this, { attributes: true });
|
|
13393
13434
|
const resolve = (def, isAsync = false) => {
|
|
13394
13435
|
this._resolved = true;
|
|
@@ -13504,7 +13545,10 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
13504
13545
|
}
|
|
13505
13546
|
if (shouldReflect) {
|
|
13506
13547
|
const ob = this._ob;
|
|
13507
|
-
|
|
13548
|
+
if (ob) {
|
|
13549
|
+
this._processMutations(ob.takeRecords());
|
|
13550
|
+
ob.disconnect();
|
|
13551
|
+
}
|
|
13508
13552
|
if (val === true) {
|
|
13509
13553
|
this.setAttribute(hyphenate(key), "");
|
|
13510
13554
|
} else if (typeof val === "string" || typeof val === "number") {
|
|
@@ -13608,7 +13652,7 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
13608
13652
|
* Only called when shadowRoot is false
|
|
13609
13653
|
*/
|
|
13610
13654
|
_renderSlots() {
|
|
13611
|
-
const outlets =
|
|
13655
|
+
const outlets = this._getSlots();
|
|
13612
13656
|
const scopeId = this._instance.type.__scopeId;
|
|
13613
13657
|
for (let i = 0; i < outlets.length; i++) {
|
|
13614
13658
|
const o = outlets[i];
|
|
@@ -13634,6 +13678,19 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
13634
13678
|
parent.removeChild(o);
|
|
13635
13679
|
}
|
|
13636
13680
|
}
|
|
13681
|
+
/**
|
|
13682
|
+
* @internal
|
|
13683
|
+
*/
|
|
13684
|
+
_getSlots() {
|
|
13685
|
+
const roots = [this];
|
|
13686
|
+
if (this._teleportTargets) {
|
|
13687
|
+
roots.push(...this._teleportTargets);
|
|
13688
|
+
}
|
|
13689
|
+
return roots.reduce((res, i) => {
|
|
13690
|
+
res.push(...Array.from(i.querySelectorAll("slot")));
|
|
13691
|
+
return res;
|
|
13692
|
+
}, []);
|
|
13693
|
+
}
|
|
13637
13694
|
/**
|
|
13638
13695
|
* @internal
|
|
13639
13696
|
*/
|
|
@@ -13726,7 +13783,7 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
13726
13783
|
prevChildren.forEach(callPendingCbs);
|
|
13727
13784
|
prevChildren.forEach(recordPosition);
|
|
13728
13785
|
const movedChildren = prevChildren.filter(applyTranslation);
|
|
13729
|
-
forceReflow();
|
|
13786
|
+
forceReflow(instance.vnode.el);
|
|
13730
13787
|
movedChildren.forEach((c) => {
|
|
13731
13788
|
const el = c.el;
|
|
13732
13789
|
const style = el.style;
|
|
@@ -13736,7 +13793,7 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
13736
13793
|
if (e && e.target !== el) {
|
|
13737
13794
|
return;
|
|
13738
13795
|
}
|
|
13739
|
-
if (!e ||
|
|
13796
|
+
if (!e || e.propertyName.endsWith("transform")) {
|
|
13740
13797
|
el.removeEventListener("transitionend", cb);
|
|
13741
13798
|
el[moveCbKey] = null;
|
|
13742
13799
|
removeTransitionClass(el, moveClass);
|
|
@@ -14201,7 +14258,7 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
14201
14258
|
if (container.nodeType === 1) {
|
|
14202
14259
|
for (let i = 0; i < container.attributes.length; i++) {
|
|
14203
14260
|
const attr = container.attributes[i];
|
|
14204
|
-
if (attr.name !== "v-cloak" && /^(v-|:|@)/.test(attr.name)) {
|
|
14261
|
+
if (attr.name !== "v-cloak" && /^(?:v-|:|@)/.test(attr.name)) {
|
|
14205
14262
|
compatUtils.warnDeprecation(
|
|
14206
14263
|
"GLOBAL_MOUNT_CONTAINER",
|
|
14207
14264
|
null
|
|
@@ -15805,7 +15862,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
15805
15862
|
return !currentOpenBracketCount && !currentOpenParensCount;
|
|
15806
15863
|
};
|
|
15807
15864
|
const isMemberExpression = isMemberExpressionBrowser ;
|
|
15808
|
-
const fnExpRE = /^\s*(async\s*)?(
|
|
15865
|
+
const fnExpRE = /^\s*(?:async\s*)?(?:\([^)]*?\)|[\w$_]+)\s*(?::[^=]+)?=>|^\s*(?:async\s+)?function(?:\s+[\w$]+)?\s*\(/;
|
|
15809
15866
|
const isFnExpressionBrowser = (exp) => fnExpRE.test(getExpSource(exp));
|
|
15810
15867
|
const isFnExpression = isFnExpressionBrowser ;
|
|
15811
15868
|
function assert(condition, msg) {
|
|
@@ -17944,7 +18001,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
17944
18001
|
}
|
|
17945
18002
|
|
|
17946
18003
|
const transformIf = createStructuralDirectiveTransform(
|
|
17947
|
-
/^(if|else|else-if)$/,
|
|
18004
|
+
/^(?:if|else|else-if)$/,
|
|
17948
18005
|
(node, dir, context) => {
|
|
17949
18006
|
return processIf(node, dir, context, (ifNode, branch, isRoot) => {
|
|
17950
18007
|
const siblings = context.parent.children;
|
|
@@ -18162,80 +18219,6 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
18162
18219
|
}
|
|
18163
18220
|
}
|
|
18164
18221
|
|
|
18165
|
-
const transformBind = (dir, _node, context) => {
|
|
18166
|
-
const { modifiers, loc } = dir;
|
|
18167
|
-
const arg = dir.arg;
|
|
18168
|
-
let { exp } = dir;
|
|
18169
|
-
if (exp && exp.type === 4 && !exp.content.trim()) {
|
|
18170
|
-
{
|
|
18171
|
-
exp = void 0;
|
|
18172
|
-
}
|
|
18173
|
-
}
|
|
18174
|
-
if (!exp) {
|
|
18175
|
-
if (arg.type !== 4 || !arg.isStatic) {
|
|
18176
|
-
context.onError(
|
|
18177
|
-
createCompilerError(
|
|
18178
|
-
52,
|
|
18179
|
-
arg.loc
|
|
18180
|
-
)
|
|
18181
|
-
);
|
|
18182
|
-
return {
|
|
18183
|
-
props: [
|
|
18184
|
-
createObjectProperty(arg, createSimpleExpression("", true, loc))
|
|
18185
|
-
]
|
|
18186
|
-
};
|
|
18187
|
-
}
|
|
18188
|
-
transformBindShorthand(dir);
|
|
18189
|
-
exp = dir.exp;
|
|
18190
|
-
}
|
|
18191
|
-
if (arg.type !== 4) {
|
|
18192
|
-
arg.children.unshift(`(`);
|
|
18193
|
-
arg.children.push(`) || ""`);
|
|
18194
|
-
} else if (!arg.isStatic) {
|
|
18195
|
-
arg.content = arg.content ? `${arg.content} || ""` : `""`;
|
|
18196
|
-
}
|
|
18197
|
-
if (modifiers.some((mod) => mod.content === "camel")) {
|
|
18198
|
-
if (arg.type === 4) {
|
|
18199
|
-
if (arg.isStatic) {
|
|
18200
|
-
arg.content = camelize(arg.content);
|
|
18201
|
-
} else {
|
|
18202
|
-
arg.content = `${context.helperString(CAMELIZE)}(${arg.content})`;
|
|
18203
|
-
}
|
|
18204
|
-
} else {
|
|
18205
|
-
arg.children.unshift(`${context.helperString(CAMELIZE)}(`);
|
|
18206
|
-
arg.children.push(`)`);
|
|
18207
|
-
}
|
|
18208
|
-
}
|
|
18209
|
-
if (!context.inSSR) {
|
|
18210
|
-
if (modifiers.some((mod) => mod.content === "prop")) {
|
|
18211
|
-
injectPrefix(arg, ".");
|
|
18212
|
-
}
|
|
18213
|
-
if (modifiers.some((mod) => mod.content === "attr")) {
|
|
18214
|
-
injectPrefix(arg, "^");
|
|
18215
|
-
}
|
|
18216
|
-
}
|
|
18217
|
-
return {
|
|
18218
|
-
props: [createObjectProperty(arg, exp)]
|
|
18219
|
-
};
|
|
18220
|
-
};
|
|
18221
|
-
const transformBindShorthand = (dir, context) => {
|
|
18222
|
-
const arg = dir.arg;
|
|
18223
|
-
const propName = camelize(arg.content);
|
|
18224
|
-
dir.exp = createSimpleExpression(propName, false, arg.loc);
|
|
18225
|
-
};
|
|
18226
|
-
const injectPrefix = (arg, prefix) => {
|
|
18227
|
-
if (arg.type === 4) {
|
|
18228
|
-
if (arg.isStatic) {
|
|
18229
|
-
arg.content = prefix + arg.content;
|
|
18230
|
-
} else {
|
|
18231
|
-
arg.content = `\`${prefix}\${${arg.content}}\``;
|
|
18232
|
-
}
|
|
18233
|
-
} else {
|
|
18234
|
-
arg.children.unshift(`'${prefix}' + (`);
|
|
18235
|
-
arg.children.push(`)`);
|
|
18236
|
-
}
|
|
18237
|
-
};
|
|
18238
|
-
|
|
18239
18222
|
const transformFor = createStructuralDirectiveTransform(
|
|
18240
18223
|
"for",
|
|
18241
18224
|
(node, dir, context) => {
|
|
@@ -18247,10 +18230,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
18247
18230
|
const isTemplate = isTemplateNode(node);
|
|
18248
18231
|
const memo = findDir(node, "memo");
|
|
18249
18232
|
const keyProp = findProp(node, `key`, false, true);
|
|
18250
|
-
|
|
18251
|
-
if (isDirKey && !keyProp.exp) {
|
|
18252
|
-
transformBindShorthand(keyProp);
|
|
18253
|
-
}
|
|
18233
|
+
keyProp && keyProp.type === 7;
|
|
18254
18234
|
let keyExp = keyProp && (keyProp.type === 6 ? keyProp.value ? createSimpleExpression(keyProp.value.content, true) : void 0 : keyProp.exp);
|
|
18255
18235
|
const keyProperty = keyProp && keyExp ? createObjectProperty(`key`, keyExp) : null;
|
|
18256
18236
|
const isStableFragment = forNode.source.type === 4 && forNode.source.constType > 0;
|
|
@@ -18531,7 +18511,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
18531
18511
|
);
|
|
18532
18512
|
} else if (vElse = findDir(
|
|
18533
18513
|
slotElement,
|
|
18534
|
-
/^else(
|
|
18514
|
+
/^else(?:-if)?$/,
|
|
18535
18515
|
true
|
|
18536
18516
|
/* allowEmpty */
|
|
18537
18517
|
)) {
|
|
@@ -18543,7 +18523,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
18543
18523
|
break;
|
|
18544
18524
|
}
|
|
18545
18525
|
}
|
|
18546
|
-
if (prev && isTemplateNode(prev) && findDir(prev, /^(else-)?if$/)) {
|
|
18526
|
+
if (prev && isTemplateNode(prev) && findDir(prev, /^(?:else-)?if$/)) {
|
|
18547
18527
|
let conditional = dynamicSlots[dynamicSlots.length - 1];
|
|
18548
18528
|
while (conditional.alternate.type === 19) {
|
|
18549
18529
|
conditional = conditional.alternate;
|
|
@@ -19403,6 +19383,58 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
19403
19383
|
return ret;
|
|
19404
19384
|
};
|
|
19405
19385
|
|
|
19386
|
+
const transformBind = (dir, _node, context) => {
|
|
19387
|
+
const { modifiers, loc } = dir;
|
|
19388
|
+
const arg = dir.arg;
|
|
19389
|
+
let { exp } = dir;
|
|
19390
|
+
if (exp && exp.type === 4 && !exp.content.trim()) {
|
|
19391
|
+
{
|
|
19392
|
+
exp = void 0;
|
|
19393
|
+
}
|
|
19394
|
+
}
|
|
19395
|
+
if (arg.type !== 4) {
|
|
19396
|
+
arg.children.unshift(`(`);
|
|
19397
|
+
arg.children.push(`) || ""`);
|
|
19398
|
+
} else if (!arg.isStatic) {
|
|
19399
|
+
arg.content = arg.content ? `${arg.content} || ""` : `""`;
|
|
19400
|
+
}
|
|
19401
|
+
if (modifiers.some((mod) => mod.content === "camel")) {
|
|
19402
|
+
if (arg.type === 4) {
|
|
19403
|
+
if (arg.isStatic) {
|
|
19404
|
+
arg.content = camelize(arg.content);
|
|
19405
|
+
} else {
|
|
19406
|
+
arg.content = `${context.helperString(CAMELIZE)}(${arg.content})`;
|
|
19407
|
+
}
|
|
19408
|
+
} else {
|
|
19409
|
+
arg.children.unshift(`${context.helperString(CAMELIZE)}(`);
|
|
19410
|
+
arg.children.push(`)`);
|
|
19411
|
+
}
|
|
19412
|
+
}
|
|
19413
|
+
if (!context.inSSR) {
|
|
19414
|
+
if (modifiers.some((mod) => mod.content === "prop")) {
|
|
19415
|
+
injectPrefix(arg, ".");
|
|
19416
|
+
}
|
|
19417
|
+
if (modifiers.some((mod) => mod.content === "attr")) {
|
|
19418
|
+
injectPrefix(arg, "^");
|
|
19419
|
+
}
|
|
19420
|
+
}
|
|
19421
|
+
return {
|
|
19422
|
+
props: [createObjectProperty(arg, exp)]
|
|
19423
|
+
};
|
|
19424
|
+
};
|
|
19425
|
+
const injectPrefix = (arg, prefix) => {
|
|
19426
|
+
if (arg.type === 4) {
|
|
19427
|
+
if (arg.isStatic) {
|
|
19428
|
+
arg.content = prefix + arg.content;
|
|
19429
|
+
} else {
|
|
19430
|
+
arg.content = `\`${prefix}\${${arg.content}}\``;
|
|
19431
|
+
}
|
|
19432
|
+
} else {
|
|
19433
|
+
arg.children.unshift(`'${prefix}' + (`);
|
|
19434
|
+
arg.children.push(`)`);
|
|
19435
|
+
}
|
|
19436
|
+
};
|
|
19437
|
+
|
|
19406
19438
|
const transformText = (node, context) => {
|
|
19407
19439
|
if (node.type === 0 || node.type === 1 || node.type === 11 || node.type === 10) {
|
|
19408
19440
|
return () => {
|
|
@@ -19733,9 +19765,35 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
19733
19765
|
}
|
|
19734
19766
|
};
|
|
19735
19767
|
|
|
19768
|
+
const transformVBindShorthand = (node, context) => {
|
|
19769
|
+
if (node.type === 1) {
|
|
19770
|
+
for (const prop of node.props) {
|
|
19771
|
+
if (prop.type === 7 && prop.name === "bind" && !prop.exp) {
|
|
19772
|
+
const arg = prop.arg;
|
|
19773
|
+
if (arg.type !== 4 || !arg.isStatic) {
|
|
19774
|
+
context.onError(
|
|
19775
|
+
createCompilerError(
|
|
19776
|
+
52,
|
|
19777
|
+
arg.loc
|
|
19778
|
+
)
|
|
19779
|
+
);
|
|
19780
|
+
prop.exp = createSimpleExpression("", true, arg.loc);
|
|
19781
|
+
} else {
|
|
19782
|
+
const propName = camelize(arg.content);
|
|
19783
|
+
if (validFirstIdentCharRE.test(propName[0]) || // allow hyphen first char for https://github.com/vuejs/language-tools/pull/3424
|
|
19784
|
+
propName[0] === "-") {
|
|
19785
|
+
prop.exp = createSimpleExpression(propName, false, arg.loc);
|
|
19786
|
+
}
|
|
19787
|
+
}
|
|
19788
|
+
}
|
|
19789
|
+
}
|
|
19790
|
+
}
|
|
19791
|
+
};
|
|
19792
|
+
|
|
19736
19793
|
function getBaseTransformPreset(prefixIdentifiers) {
|
|
19737
19794
|
return [
|
|
19738
19795
|
[
|
|
19796
|
+
transformVBindShorthand,
|
|
19739
19797
|
transformOnce,
|
|
19740
19798
|
transformIf,
|
|
19741
19799
|
transformMemo,
|