@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.esm-browser.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
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
|
-
/*! #__NO_SIDE_EFFECTS__ */
|
|
7
6
|
// @__NO_SIDE_EFFECTS__
|
|
8
7
|
function makeMap(str) {
|
|
9
8
|
const map = /* @__PURE__ */ Object.create(null);
|
|
@@ -61,10 +60,10 @@ const cacheStringFunction = (fn) => {
|
|
|
61
60
|
return hit || (cache[str] = fn(str));
|
|
62
61
|
});
|
|
63
62
|
};
|
|
64
|
-
const camelizeRE =
|
|
63
|
+
const camelizeRE = /-\w/g;
|
|
65
64
|
const camelize = cacheStringFunction(
|
|
66
65
|
(str) => {
|
|
67
|
-
return str.replace(camelizeRE, (
|
|
66
|
+
return str.replace(camelizeRE, (c) => c.slice(1).toUpperCase());
|
|
68
67
|
}
|
|
69
68
|
);
|
|
70
69
|
const hyphenateRE = /\B([A-Z])/g;
|
|
@@ -1216,7 +1215,7 @@ function iterator(self, method, wrapValue) {
|
|
|
1216
1215
|
iter._next = iter.next;
|
|
1217
1216
|
iter.next = () => {
|
|
1218
1217
|
const result = iter._next();
|
|
1219
|
-
if (result.
|
|
1218
|
+
if (!result.done) {
|
|
1220
1219
|
result.value = wrapValue(result.value);
|
|
1221
1220
|
}
|
|
1222
1221
|
return result;
|
|
@@ -1343,7 +1342,8 @@ class BaseReactiveHandler {
|
|
|
1343
1342
|
return res;
|
|
1344
1343
|
}
|
|
1345
1344
|
if (isRef(res)) {
|
|
1346
|
-
|
|
1345
|
+
const value = targetIsArray && isIntegerKey(key) ? res : res.value;
|
|
1346
|
+
return isReadonly2 && isObject(value) ? readonly(value) : value;
|
|
1347
1347
|
}
|
|
1348
1348
|
if (isObject(res)) {
|
|
1349
1349
|
return isReadonly2 ? readonly(res) : reactive(res);
|
|
@@ -2227,11 +2227,11 @@ function traverse(value, depth = Infinity, seen) {
|
|
|
2227
2227
|
if (depth <= 0 || !isObject(value) || value["__v_skip"]) {
|
|
2228
2228
|
return value;
|
|
2229
2229
|
}
|
|
2230
|
-
seen = seen || /* @__PURE__ */ new
|
|
2231
|
-
if (seen.
|
|
2230
|
+
seen = seen || /* @__PURE__ */ new Map();
|
|
2231
|
+
if ((seen.get(value) || 0) >= depth) {
|
|
2232
2232
|
return value;
|
|
2233
2233
|
}
|
|
2234
|
-
seen.
|
|
2234
|
+
seen.set(value, depth);
|
|
2235
2235
|
depth--;
|
|
2236
2236
|
if (isRef(value)) {
|
|
2237
2237
|
traverse(value.value, depth, seen);
|
|
@@ -2770,10 +2770,12 @@ function reload(id, newComp) {
|
|
|
2770
2770
|
dirtyInstances.delete(instance);
|
|
2771
2771
|
} else if (instance.parent) {
|
|
2772
2772
|
queueJob(() => {
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2773
|
+
if (!(instance.job.flags & 8)) {
|
|
2774
|
+
isHmrUpdating = true;
|
|
2775
|
+
instance.parent.update();
|
|
2776
|
+
isHmrUpdating = false;
|
|
2777
|
+
dirtyInstances.delete(instance);
|
|
2778
|
+
}
|
|
2777
2779
|
});
|
|
2778
2780
|
} else if (instance.appContext.reload) {
|
|
2779
2781
|
instance.appContext.reload();
|
|
@@ -2877,7 +2879,6 @@ const devtoolsComponentRemoved = (component) => {
|
|
|
2877
2879
|
_devtoolsComponentRemoved(component);
|
|
2878
2880
|
}
|
|
2879
2881
|
};
|
|
2880
|
-
/*! #__NO_SIDE_EFFECTS__ */
|
|
2881
2882
|
// @__NO_SIDE_EFFECTS__
|
|
2882
2883
|
function createDevtoolsComponentHook(hook) {
|
|
2883
2884
|
return (component) => {
|
|
@@ -3591,9 +3592,6 @@ const TeleportImpl = {
|
|
|
3591
3592
|
insert(mainAnchor, container, anchor);
|
|
3592
3593
|
const mount = (container2, anchor2) => {
|
|
3593
3594
|
if (shapeFlag & 16) {
|
|
3594
|
-
if (parentComponent && parentComponent.isCE) {
|
|
3595
|
-
parentComponent.ce._teleportTarget = container2;
|
|
3596
|
-
}
|
|
3597
3595
|
mountChildren(
|
|
3598
3596
|
children,
|
|
3599
3597
|
container2,
|
|
@@ -3615,6 +3613,9 @@ const TeleportImpl = {
|
|
|
3615
3613
|
} else if (namespace !== "mathml" && isTargetMathML(target)) {
|
|
3616
3614
|
namespace = "mathml";
|
|
3617
3615
|
}
|
|
3616
|
+
if (parentComponent && parentComponent.isCE) {
|
|
3617
|
+
(parentComponent.ce._teleportTargets || (parentComponent.ce._teleportTargets = /* @__PURE__ */ new Set())).add(target);
|
|
3618
|
+
}
|
|
3618
3619
|
if (!disabled) {
|
|
3619
3620
|
mount(target, targetAnchor);
|
|
3620
3621
|
updateCssVars(n2, false);
|
|
@@ -3803,26 +3804,34 @@ function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }
|
|
|
3803
3804
|
function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, {
|
|
3804
3805
|
o: { nextSibling, parentNode, querySelector, insert, createText }
|
|
3805
3806
|
}, hydrateChildren) {
|
|
3807
|
+
function hydrateDisabledTeleport(node2, vnode2, targetStart, targetAnchor) {
|
|
3808
|
+
vnode2.anchor = hydrateChildren(
|
|
3809
|
+
nextSibling(node2),
|
|
3810
|
+
vnode2,
|
|
3811
|
+
parentNode(node2),
|
|
3812
|
+
parentComponent,
|
|
3813
|
+
parentSuspense,
|
|
3814
|
+
slotScopeIds,
|
|
3815
|
+
optimized
|
|
3816
|
+
);
|
|
3817
|
+
vnode2.targetStart = targetStart;
|
|
3818
|
+
vnode2.targetAnchor = targetAnchor;
|
|
3819
|
+
}
|
|
3806
3820
|
const target = vnode.target = resolveTarget(
|
|
3807
3821
|
vnode.props,
|
|
3808
3822
|
querySelector
|
|
3809
3823
|
);
|
|
3824
|
+
const disabled = isTeleportDisabled(vnode.props);
|
|
3810
3825
|
if (target) {
|
|
3811
|
-
const disabled = isTeleportDisabled(vnode.props);
|
|
3812
3826
|
const targetNode = target._lpa || target.firstChild;
|
|
3813
3827
|
if (vnode.shapeFlag & 16) {
|
|
3814
3828
|
if (disabled) {
|
|
3815
|
-
|
|
3816
|
-
|
|
3829
|
+
hydrateDisabledTeleport(
|
|
3830
|
+
node,
|
|
3817
3831
|
vnode,
|
|
3818
|
-
|
|
3819
|
-
|
|
3820
|
-
parentSuspense,
|
|
3821
|
-
slotScopeIds,
|
|
3822
|
-
optimized
|
|
3832
|
+
targetNode,
|
|
3833
|
+
targetNode && nextSibling(targetNode)
|
|
3823
3834
|
);
|
|
3824
|
-
vnode.targetStart = targetNode;
|
|
3825
|
-
vnode.targetAnchor = targetNode && nextSibling(targetNode);
|
|
3826
3835
|
} else {
|
|
3827
3836
|
vnode.anchor = nextSibling(node);
|
|
3828
3837
|
let targetAnchor = targetNode;
|
|
@@ -3853,6 +3862,10 @@ function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScope
|
|
|
3853
3862
|
}
|
|
3854
3863
|
}
|
|
3855
3864
|
updateCssVars(vnode, disabled);
|
|
3865
|
+
} else if (disabled) {
|
|
3866
|
+
if (vnode.shapeFlag & 16) {
|
|
3867
|
+
hydrateDisabledTeleport(node, vnode, node, nextSibling(node));
|
|
3868
|
+
}
|
|
3856
3869
|
}
|
|
3857
3870
|
return vnode.anchor && nextSibling(vnode.anchor);
|
|
3858
3871
|
}
|
|
@@ -3964,7 +3977,7 @@ const BaseTransitionImpl = {
|
|
|
3964
3977
|
setTransitionHooks(innerChild, enterHooks);
|
|
3965
3978
|
}
|
|
3966
3979
|
let oldInnerChild = instance.subTree && getInnerChild$1(instance.subTree);
|
|
3967
|
-
if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(
|
|
3980
|
+
if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(oldInnerChild, innerChild) && recursiveGetSubtree(instance).type !== Comment) {
|
|
3968
3981
|
let leavingHooks = resolveTransitionHooks(
|
|
3969
3982
|
oldInnerChild,
|
|
3970
3983
|
rawProps,
|
|
@@ -4247,7 +4260,6 @@ function getTransitionRawChildren(children, keepComment = false, parentKey) {
|
|
|
4247
4260
|
return ret;
|
|
4248
4261
|
}
|
|
4249
4262
|
|
|
4250
|
-
/*! #__NO_SIDE_EFFECTS__ */
|
|
4251
4263
|
// @__NO_SIDE_EFFECTS__
|
|
4252
4264
|
function defineComponent(options, extraOptions) {
|
|
4253
4265
|
return isFunction(options) ? (
|
|
@@ -4300,6 +4312,7 @@ function useTemplateRef(key) {
|
|
|
4300
4312
|
return ret;
|
|
4301
4313
|
}
|
|
4302
4314
|
|
|
4315
|
+
const pendingSetRefMap = /* @__PURE__ */ new WeakMap();
|
|
4303
4316
|
function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
4304
4317
|
if (isArray(rawRef)) {
|
|
4305
4318
|
rawRef.forEach(
|
|
@@ -4349,6 +4362,7 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
4349
4362
|
return !knownTemplateRefs.has(ref2);
|
|
4350
4363
|
};
|
|
4351
4364
|
if (oldRef != null && oldRef !== ref) {
|
|
4365
|
+
invalidatePendingSetRef(oldRawRef);
|
|
4352
4366
|
if (isString(oldRef)) {
|
|
4353
4367
|
refs[oldRef] = null;
|
|
4354
4368
|
if (canSetSetupRef(oldRef)) {
|
|
@@ -4406,9 +4420,15 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
4406
4420
|
}
|
|
4407
4421
|
};
|
|
4408
4422
|
if (value) {
|
|
4409
|
-
|
|
4410
|
-
|
|
4423
|
+
const job = () => {
|
|
4424
|
+
doSet();
|
|
4425
|
+
pendingSetRefMap.delete(rawRef);
|
|
4426
|
+
};
|
|
4427
|
+
job.id = -1;
|
|
4428
|
+
pendingSetRefMap.set(rawRef, job);
|
|
4429
|
+
queuePostRenderEffect(job, parentSuspense);
|
|
4411
4430
|
} else {
|
|
4431
|
+
invalidatePendingSetRef(rawRef);
|
|
4412
4432
|
doSet();
|
|
4413
4433
|
}
|
|
4414
4434
|
} else {
|
|
@@ -4416,6 +4436,13 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
4416
4436
|
}
|
|
4417
4437
|
}
|
|
4418
4438
|
}
|
|
4439
|
+
function invalidatePendingSetRef(rawRef) {
|
|
4440
|
+
const pendingSetRef = pendingSetRefMap.get(rawRef);
|
|
4441
|
+
if (pendingSetRef) {
|
|
4442
|
+
pendingSetRef.flags |= 8;
|
|
4443
|
+
pendingSetRefMap.delete(rawRef);
|
|
4444
|
+
}
|
|
4445
|
+
}
|
|
4419
4446
|
|
|
4420
4447
|
let hasLoggedMismatchError = false;
|
|
4421
4448
|
const logMismatchError = () => {
|
|
@@ -5148,7 +5175,6 @@ function forEachElement(node, cb) {
|
|
|
5148
5175
|
}
|
|
5149
5176
|
|
|
5150
5177
|
const isAsyncWrapper = (i) => !!i.type.__asyncLoader;
|
|
5151
|
-
/*! #__NO_SIDE_EFFECTS__ */
|
|
5152
5178
|
// @__NO_SIDE_EFFECTS__
|
|
5153
5179
|
function defineAsyncComponent(source) {
|
|
5154
5180
|
if (isFunction(source)) {
|
|
@@ -6049,12 +6075,13 @@ function createSlots(slots, dynamicSlots) {
|
|
|
6049
6075
|
|
|
6050
6076
|
function renderSlot(slots, name, props = {}, fallback, noSlotted) {
|
|
6051
6077
|
if (currentRenderingInstance.ce || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.ce) {
|
|
6078
|
+
const hasProps = Object.keys(props).length > 0;
|
|
6052
6079
|
if (name !== "default") props.name = name;
|
|
6053
6080
|
return openBlock(), createBlock(
|
|
6054
6081
|
Fragment,
|
|
6055
6082
|
null,
|
|
6056
6083
|
[createVNode("slot", props, fallback && fallback())],
|
|
6057
|
-
64
|
|
6084
|
+
hasProps ? -2 : 64
|
|
6058
6085
|
);
|
|
6059
6086
|
}
|
|
6060
6087
|
let slot = slots[name];
|
|
@@ -7245,7 +7272,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
7245
7272
|
return vm;
|
|
7246
7273
|
}
|
|
7247
7274
|
}
|
|
7248
|
-
Vue.version = `2.6.14-compat:${"3.5.
|
|
7275
|
+
Vue.version = `2.6.14-compat:${"3.5.22"}`;
|
|
7249
7276
|
Vue.config = singletonApp.config;
|
|
7250
7277
|
Vue.use = (plugin, ...options) => {
|
|
7251
7278
|
if (plugin && isFunction(plugin.install)) {
|
|
@@ -7503,7 +7530,7 @@ function installCompatMount(app, context, render) {
|
|
|
7503
7530
|
{
|
|
7504
7531
|
for (let i = 0; i < container.attributes.length; i++) {
|
|
7505
7532
|
const attr = container.attributes[i];
|
|
7506
|
-
if (attr.name !== "v-cloak" && /^(v-|:|@)/.test(attr.name)) {
|
|
7533
|
+
if (attr.name !== "v-cloak" && /^(?:v-|:|@)/.test(attr.name)) {
|
|
7507
7534
|
warnDeprecation$1("GLOBAL_MOUNT_CONTAINER", null);
|
|
7508
7535
|
break;
|
|
7509
7536
|
}
|
|
@@ -10315,8 +10342,9 @@ function emit(instance, event, ...rawArgs) {
|
|
|
10315
10342
|
return emit$1(instance, event, args);
|
|
10316
10343
|
}
|
|
10317
10344
|
}
|
|
10345
|
+
const mixinEmitsCache = /* @__PURE__ */ new WeakMap();
|
|
10318
10346
|
function normalizeEmitsOptions(comp, appContext, asMixin = false) {
|
|
10319
|
-
const cache = appContext.emitsCache;
|
|
10347
|
+
const cache = asMixin ? mixinEmitsCache : appContext.emitsCache;
|
|
10320
10348
|
const cached = cache.get(comp);
|
|
10321
10349
|
if (cached !== void 0) {
|
|
10322
10350
|
return cached;
|
|
@@ -10788,7 +10816,7 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
|
|
|
10788
10816
|
const { activeBranch, pendingBranch, isInFallback, isHydrating } = suspense;
|
|
10789
10817
|
if (pendingBranch) {
|
|
10790
10818
|
suspense.pendingBranch = newBranch;
|
|
10791
|
-
if (isSameVNodeType(
|
|
10819
|
+
if (isSameVNodeType(pendingBranch, newBranch)) {
|
|
10792
10820
|
patch(
|
|
10793
10821
|
pendingBranch,
|
|
10794
10822
|
newBranch,
|
|
@@ -10859,7 +10887,7 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
|
|
|
10859
10887
|
);
|
|
10860
10888
|
setActiveBranch(suspense, newFallback);
|
|
10861
10889
|
}
|
|
10862
|
-
} else if (activeBranch && isSameVNodeType(
|
|
10890
|
+
} else if (activeBranch && isSameVNodeType(activeBranch, newBranch)) {
|
|
10863
10891
|
patch(
|
|
10864
10892
|
activeBranch,
|
|
10865
10893
|
newBranch,
|
|
@@ -10890,7 +10918,7 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
|
|
|
10890
10918
|
}
|
|
10891
10919
|
}
|
|
10892
10920
|
} else {
|
|
10893
|
-
if (activeBranch && isSameVNodeType(
|
|
10921
|
+
if (activeBranch && isSameVNodeType(activeBranch, newBranch)) {
|
|
10894
10922
|
patch(
|
|
10895
10923
|
activeBranch,
|
|
10896
10924
|
newBranch,
|
|
@@ -12126,7 +12154,7 @@ function getComponentPublicInstance(instance) {
|
|
|
12126
12154
|
return instance.proxy;
|
|
12127
12155
|
}
|
|
12128
12156
|
}
|
|
12129
|
-
const classifyRE = /(?:^|[-_])
|
|
12157
|
+
const classifyRE = /(?:^|[-_])\w/g;
|
|
12130
12158
|
const classify = (str) => str.replace(classifyRE, (c) => c.toUpperCase()).replace(/[-_]/g, "");
|
|
12131
12159
|
function getComponentName(Component, includeInferred = true) {
|
|
12132
12160
|
return isFunction(Component) ? Component.displayName || Component.name : Component.name || includeInferred && Component.__name;
|
|
@@ -12169,23 +12197,28 @@ const computed = (getterOrOptions, debugOptions) => {
|
|
|
12169
12197
|
};
|
|
12170
12198
|
|
|
12171
12199
|
function h(type, propsOrChildren, children) {
|
|
12172
|
-
|
|
12173
|
-
|
|
12174
|
-
|
|
12175
|
-
|
|
12176
|
-
|
|
12200
|
+
try {
|
|
12201
|
+
setBlockTracking(-1);
|
|
12202
|
+
const l = arguments.length;
|
|
12203
|
+
if (l === 2) {
|
|
12204
|
+
if (isObject(propsOrChildren) && !isArray(propsOrChildren)) {
|
|
12205
|
+
if (isVNode(propsOrChildren)) {
|
|
12206
|
+
return createVNode(type, null, [propsOrChildren]);
|
|
12207
|
+
}
|
|
12208
|
+
return createVNode(type, propsOrChildren);
|
|
12209
|
+
} else {
|
|
12210
|
+
return createVNode(type, null, propsOrChildren);
|
|
12177
12211
|
}
|
|
12178
|
-
return createVNode(type, propsOrChildren);
|
|
12179
12212
|
} else {
|
|
12180
|
-
|
|
12181
|
-
|
|
12182
|
-
|
|
12183
|
-
|
|
12184
|
-
|
|
12185
|
-
|
|
12186
|
-
children = [children];
|
|
12213
|
+
if (l > 3) {
|
|
12214
|
+
children = Array.prototype.slice.call(arguments, 2);
|
|
12215
|
+
} else if (l === 3 && isVNode(children)) {
|
|
12216
|
+
children = [children];
|
|
12217
|
+
}
|
|
12218
|
+
return createVNode(type, propsOrChildren, children);
|
|
12187
12219
|
}
|
|
12188
|
-
|
|
12220
|
+
} finally {
|
|
12221
|
+
setBlockTracking(1);
|
|
12189
12222
|
}
|
|
12190
12223
|
}
|
|
12191
12224
|
|
|
@@ -12395,7 +12428,7 @@ function isMemoSame(cached, memo) {
|
|
|
12395
12428
|
return true;
|
|
12396
12429
|
}
|
|
12397
12430
|
|
|
12398
|
-
const version = "3.5.
|
|
12431
|
+
const version = "3.5.22";
|
|
12399
12432
|
const warn = warn$1 ;
|
|
12400
12433
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
12401
12434
|
const devtools = devtools$1 ;
|
|
@@ -12665,11 +12698,11 @@ function resolveTransitionProps(rawProps) {
|
|
|
12665
12698
|
addTransitionClass(el, legacyLeaveFromClass);
|
|
12666
12699
|
}
|
|
12667
12700
|
if (!el._enterCancelled) {
|
|
12668
|
-
forceReflow();
|
|
12701
|
+
forceReflow(el);
|
|
12669
12702
|
addTransitionClass(el, leaveActiveClass);
|
|
12670
12703
|
} else {
|
|
12671
12704
|
addTransitionClass(el, leaveActiveClass);
|
|
12672
|
-
forceReflow();
|
|
12705
|
+
forceReflow(el);
|
|
12673
12706
|
}
|
|
12674
12707
|
nextFrame(() => {
|
|
12675
12708
|
if (!el._isLeaving) {
|
|
@@ -12798,7 +12831,7 @@ function getTransitionInfo(el, expectedType) {
|
|
|
12798
12831
|
type = timeout > 0 ? transitionTimeout > animationTimeout ? TRANSITION$1 : ANIMATION : null;
|
|
12799
12832
|
propCount = type ? type === TRANSITION$1 ? transitionDurations.length : animationDurations.length : 0;
|
|
12800
12833
|
}
|
|
12801
|
-
const hasTransform = type === TRANSITION$1 && /\b(transform|all)(
|
|
12834
|
+
const hasTransform = type === TRANSITION$1 && /\b(?:transform|all)(?:,|$)/.test(
|
|
12802
12835
|
getStyleProperties(`${TRANSITION$1}Property`).toString()
|
|
12803
12836
|
);
|
|
12804
12837
|
return {
|
|
@@ -12818,8 +12851,9 @@ function toMs(s) {
|
|
|
12818
12851
|
if (s === "auto") return 0;
|
|
12819
12852
|
return Number(s.slice(0, -1).replace(",", ".")) * 1e3;
|
|
12820
12853
|
}
|
|
12821
|
-
function forceReflow() {
|
|
12822
|
-
|
|
12854
|
+
function forceReflow(el) {
|
|
12855
|
+
const targetDocument = el ? el.ownerDocument : document;
|
|
12856
|
+
return targetDocument.body.offsetHeight;
|
|
12823
12857
|
}
|
|
12824
12858
|
|
|
12825
12859
|
function patchClass(el, value, isSVG) {
|
|
@@ -12959,7 +12993,7 @@ function setVarsOnNode(el, vars) {
|
|
|
12959
12993
|
}
|
|
12960
12994
|
}
|
|
12961
12995
|
|
|
12962
|
-
const displayRE = /(
|
|
12996
|
+
const displayRE = /(?:^|;)\s*display\s*:/;
|
|
12963
12997
|
function patchStyle(el, prev, next) {
|
|
12964
12998
|
const style = el.style;
|
|
12965
12999
|
const isCssString = isString(next);
|
|
@@ -13326,11 +13360,10 @@ function shouldSetAsProp(el, key, value, isSVG) {
|
|
|
13326
13360
|
}
|
|
13327
13361
|
|
|
13328
13362
|
const REMOVAL = {};
|
|
13329
|
-
/*! #__NO_SIDE_EFFECTS__ */
|
|
13330
13363
|
// @__NO_SIDE_EFFECTS__
|
|
13331
13364
|
function defineCustomElement(options, extraOptions, _createApp) {
|
|
13332
|
-
|
|
13333
|
-
if (isPlainObject(Comp)) extend(Comp, extraOptions);
|
|
13365
|
+
let Comp = defineComponent(options, extraOptions);
|
|
13366
|
+
if (isPlainObject(Comp)) Comp = extend({}, Comp, extraOptions);
|
|
13334
13367
|
class VueCustomElement extends VueElement {
|
|
13335
13368
|
constructor(initialProps) {
|
|
13336
13369
|
super(Comp, initialProps, _createApp);
|
|
@@ -13339,7 +13372,6 @@ function defineCustomElement(options, extraOptions, _createApp) {
|
|
|
13339
13372
|
VueCustomElement.def = Comp;
|
|
13340
13373
|
return VueCustomElement;
|
|
13341
13374
|
}
|
|
13342
|
-
|
|
13343
13375
|
const defineSSRCustomElement = (/* @__NO_SIDE_EFFECTS__ */ (options, extraOptions) => {
|
|
13344
13376
|
return /* @__PURE__ */ defineCustomElement(options, extraOptions, createSSRApp);
|
|
13345
13377
|
});
|
|
@@ -13378,7 +13410,11 @@ class VueElement extends BaseClass {
|
|
|
13378
13410
|
);
|
|
13379
13411
|
}
|
|
13380
13412
|
if (_def.shadowRoot !== false) {
|
|
13381
|
-
this.attachShadow(
|
|
13413
|
+
this.attachShadow(
|
|
13414
|
+
extend({}, _def.shadowRootOptions, {
|
|
13415
|
+
mode: "open"
|
|
13416
|
+
})
|
|
13417
|
+
);
|
|
13382
13418
|
this._root = this.shadowRoot;
|
|
13383
13419
|
} else {
|
|
13384
13420
|
this._root = this;
|
|
@@ -13438,9 +13474,18 @@ class VueElement extends BaseClass {
|
|
|
13438
13474
|
this._app && this._app.unmount();
|
|
13439
13475
|
if (this._instance) this._instance.ce = void 0;
|
|
13440
13476
|
this._app = this._instance = null;
|
|
13477
|
+
if (this._teleportTargets) {
|
|
13478
|
+
this._teleportTargets.clear();
|
|
13479
|
+
this._teleportTargets = void 0;
|
|
13480
|
+
}
|
|
13441
13481
|
}
|
|
13442
13482
|
});
|
|
13443
13483
|
}
|
|
13484
|
+
_processMutations(mutations) {
|
|
13485
|
+
for (const m of mutations) {
|
|
13486
|
+
this._setAttr(m.attributeName);
|
|
13487
|
+
}
|
|
13488
|
+
}
|
|
13444
13489
|
/**
|
|
13445
13490
|
* resolve inner component definition (handle possible async component)
|
|
13446
13491
|
*/
|
|
@@ -13451,11 +13496,7 @@ class VueElement extends BaseClass {
|
|
|
13451
13496
|
for (let i = 0; i < this.attributes.length; i++) {
|
|
13452
13497
|
this._setAttr(this.attributes[i].name);
|
|
13453
13498
|
}
|
|
13454
|
-
this._ob = new MutationObserver((
|
|
13455
|
-
for (const m of mutations) {
|
|
13456
|
-
this._setAttr(m.attributeName);
|
|
13457
|
-
}
|
|
13458
|
-
});
|
|
13499
|
+
this._ob = new MutationObserver(this._processMutations.bind(this));
|
|
13459
13500
|
this._ob.observe(this, { attributes: true });
|
|
13460
13501
|
const resolve = (def, isAsync = false) => {
|
|
13461
13502
|
this._resolved = true;
|
|
@@ -13571,7 +13612,10 @@ class VueElement extends BaseClass {
|
|
|
13571
13612
|
}
|
|
13572
13613
|
if (shouldReflect) {
|
|
13573
13614
|
const ob = this._ob;
|
|
13574
|
-
|
|
13615
|
+
if (ob) {
|
|
13616
|
+
this._processMutations(ob.takeRecords());
|
|
13617
|
+
ob.disconnect();
|
|
13618
|
+
}
|
|
13575
13619
|
if (val === true) {
|
|
13576
13620
|
this.setAttribute(hyphenate(key), "");
|
|
13577
13621
|
} else if (typeof val === "string" || typeof val === "number") {
|
|
@@ -13675,7 +13719,7 @@ class VueElement extends BaseClass {
|
|
|
13675
13719
|
* Only called when shadowRoot is false
|
|
13676
13720
|
*/
|
|
13677
13721
|
_renderSlots() {
|
|
13678
|
-
const outlets =
|
|
13722
|
+
const outlets = this._getSlots();
|
|
13679
13723
|
const scopeId = this._instance.type.__scopeId;
|
|
13680
13724
|
for (let i = 0; i < outlets.length; i++) {
|
|
13681
13725
|
const o = outlets[i];
|
|
@@ -13701,6 +13745,19 @@ class VueElement extends BaseClass {
|
|
|
13701
13745
|
parent.removeChild(o);
|
|
13702
13746
|
}
|
|
13703
13747
|
}
|
|
13748
|
+
/**
|
|
13749
|
+
* @internal
|
|
13750
|
+
*/
|
|
13751
|
+
_getSlots() {
|
|
13752
|
+
const roots = [this];
|
|
13753
|
+
if (this._teleportTargets) {
|
|
13754
|
+
roots.push(...this._teleportTargets);
|
|
13755
|
+
}
|
|
13756
|
+
return roots.reduce((res, i) => {
|
|
13757
|
+
res.push(...Array.from(i.querySelectorAll("slot")));
|
|
13758
|
+
return res;
|
|
13759
|
+
}, []);
|
|
13760
|
+
}
|
|
13704
13761
|
/**
|
|
13705
13762
|
* @internal
|
|
13706
13763
|
*/
|
|
@@ -13805,7 +13862,7 @@ const TransitionGroupImpl = /* @__PURE__ */ decorate({
|
|
|
13805
13862
|
prevChildren.forEach(callPendingCbs);
|
|
13806
13863
|
prevChildren.forEach(recordPosition);
|
|
13807
13864
|
const movedChildren = prevChildren.filter(applyTranslation);
|
|
13808
|
-
forceReflow();
|
|
13865
|
+
forceReflow(instance.vnode.el);
|
|
13809
13866
|
movedChildren.forEach((c) => {
|
|
13810
13867
|
const el = c.el;
|
|
13811
13868
|
const style = el.style;
|
|
@@ -13815,7 +13872,7 @@ const TransitionGroupImpl = /* @__PURE__ */ decorate({
|
|
|
13815
13872
|
if (e && e.target !== el) {
|
|
13816
13873
|
return;
|
|
13817
13874
|
}
|
|
13818
|
-
if (!e ||
|
|
13875
|
+
if (!e || e.propertyName.endsWith("transform")) {
|
|
13819
13876
|
el.removeEventListener("transitionend", cb);
|
|
13820
13877
|
el[moveCbKey] = null;
|
|
13821
13878
|
removeTransitionClass(el, moveClass);
|
|
@@ -14314,7 +14371,7 @@ const createApp = ((...args) => {
|
|
|
14314
14371
|
if (container.nodeType === 1) {
|
|
14315
14372
|
for (let i = 0; i < container.attributes.length; i++) {
|
|
14316
14373
|
const attr = container.attributes[i];
|
|
14317
|
-
if (attr.name !== "v-cloak" && /^(v-|:|@)/.test(attr.name)) {
|
|
14374
|
+
if (attr.name !== "v-cloak" && /^(?:v-|:|@)/.test(attr.name)) {
|
|
14318
14375
|
compatUtils.warnDeprecation(
|
|
14319
14376
|
"GLOBAL_MOUNT_CONTAINER",
|
|
14320
14377
|
null
|
|
@@ -15925,7 +15982,7 @@ const isMemberExpressionBrowser = (exp) => {
|
|
|
15925
15982
|
return !currentOpenBracketCount && !currentOpenParensCount;
|
|
15926
15983
|
};
|
|
15927
15984
|
const isMemberExpression = isMemberExpressionBrowser ;
|
|
15928
|
-
const fnExpRE = /^\s*(async\s*)?(
|
|
15985
|
+
const fnExpRE = /^\s*(?:async\s*)?(?:\([^)]*?\)|[\w$_]+)\s*(?::[^=]+)?=>|^\s*(?:async\s+)?function(?:\s+[\w$]+)?\s*\(/;
|
|
15929
15986
|
const isFnExpressionBrowser = (exp) => fnExpRE.test(getExpSource(exp));
|
|
15930
15987
|
const isFnExpression = isFnExpressionBrowser ;
|
|
15931
15988
|
function assert(condition, msg) {
|
|
@@ -18064,7 +18121,7 @@ function processExpression(node, context, asParams = false, asRawStatements = fa
|
|
|
18064
18121
|
}
|
|
18065
18122
|
|
|
18066
18123
|
const transformIf = createStructuralDirectiveTransform(
|
|
18067
|
-
/^(if|else|else-if)$/,
|
|
18124
|
+
/^(?:if|else|else-if)$/,
|
|
18068
18125
|
(node, dir, context) => {
|
|
18069
18126
|
return processIf(node, dir, context, (ifNode, branch, isRoot) => {
|
|
18070
18127
|
const siblings = context.parent.children;
|
|
@@ -18282,80 +18339,6 @@ function getParentCondition(node) {
|
|
|
18282
18339
|
}
|
|
18283
18340
|
}
|
|
18284
18341
|
|
|
18285
|
-
const transformBind = (dir, _node, context) => {
|
|
18286
|
-
const { modifiers, loc } = dir;
|
|
18287
|
-
const arg = dir.arg;
|
|
18288
|
-
let { exp } = dir;
|
|
18289
|
-
if (exp && exp.type === 4 && !exp.content.trim()) {
|
|
18290
|
-
{
|
|
18291
|
-
exp = void 0;
|
|
18292
|
-
}
|
|
18293
|
-
}
|
|
18294
|
-
if (!exp) {
|
|
18295
|
-
if (arg.type !== 4 || !arg.isStatic) {
|
|
18296
|
-
context.onError(
|
|
18297
|
-
createCompilerError(
|
|
18298
|
-
52,
|
|
18299
|
-
arg.loc
|
|
18300
|
-
)
|
|
18301
|
-
);
|
|
18302
|
-
return {
|
|
18303
|
-
props: [
|
|
18304
|
-
createObjectProperty(arg, createSimpleExpression("", true, loc))
|
|
18305
|
-
]
|
|
18306
|
-
};
|
|
18307
|
-
}
|
|
18308
|
-
transformBindShorthand(dir);
|
|
18309
|
-
exp = dir.exp;
|
|
18310
|
-
}
|
|
18311
|
-
if (arg.type !== 4) {
|
|
18312
|
-
arg.children.unshift(`(`);
|
|
18313
|
-
arg.children.push(`) || ""`);
|
|
18314
|
-
} else if (!arg.isStatic) {
|
|
18315
|
-
arg.content = arg.content ? `${arg.content} || ""` : `""`;
|
|
18316
|
-
}
|
|
18317
|
-
if (modifiers.some((mod) => mod.content === "camel")) {
|
|
18318
|
-
if (arg.type === 4) {
|
|
18319
|
-
if (arg.isStatic) {
|
|
18320
|
-
arg.content = camelize(arg.content);
|
|
18321
|
-
} else {
|
|
18322
|
-
arg.content = `${context.helperString(CAMELIZE)}(${arg.content})`;
|
|
18323
|
-
}
|
|
18324
|
-
} else {
|
|
18325
|
-
arg.children.unshift(`${context.helperString(CAMELIZE)}(`);
|
|
18326
|
-
arg.children.push(`)`);
|
|
18327
|
-
}
|
|
18328
|
-
}
|
|
18329
|
-
if (!context.inSSR) {
|
|
18330
|
-
if (modifiers.some((mod) => mod.content === "prop")) {
|
|
18331
|
-
injectPrefix(arg, ".");
|
|
18332
|
-
}
|
|
18333
|
-
if (modifiers.some((mod) => mod.content === "attr")) {
|
|
18334
|
-
injectPrefix(arg, "^");
|
|
18335
|
-
}
|
|
18336
|
-
}
|
|
18337
|
-
return {
|
|
18338
|
-
props: [createObjectProperty(arg, exp)]
|
|
18339
|
-
};
|
|
18340
|
-
};
|
|
18341
|
-
const transformBindShorthand = (dir, context) => {
|
|
18342
|
-
const arg = dir.arg;
|
|
18343
|
-
const propName = camelize(arg.content);
|
|
18344
|
-
dir.exp = createSimpleExpression(propName, false, arg.loc);
|
|
18345
|
-
};
|
|
18346
|
-
const injectPrefix = (arg, prefix) => {
|
|
18347
|
-
if (arg.type === 4) {
|
|
18348
|
-
if (arg.isStatic) {
|
|
18349
|
-
arg.content = prefix + arg.content;
|
|
18350
|
-
} else {
|
|
18351
|
-
arg.content = `\`${prefix}\${${arg.content}}\``;
|
|
18352
|
-
}
|
|
18353
|
-
} else {
|
|
18354
|
-
arg.children.unshift(`'${prefix}' + (`);
|
|
18355
|
-
arg.children.push(`)`);
|
|
18356
|
-
}
|
|
18357
|
-
};
|
|
18358
|
-
|
|
18359
18342
|
const transformFor = createStructuralDirectiveTransform(
|
|
18360
18343
|
"for",
|
|
18361
18344
|
(node, dir, context) => {
|
|
@@ -18367,10 +18350,7 @@ const transformFor = createStructuralDirectiveTransform(
|
|
|
18367
18350
|
const isTemplate = isTemplateNode(node);
|
|
18368
18351
|
const memo = findDir(node, "memo");
|
|
18369
18352
|
const keyProp = findProp(node, `key`, false, true);
|
|
18370
|
-
|
|
18371
|
-
if (isDirKey && !keyProp.exp) {
|
|
18372
|
-
transformBindShorthand(keyProp);
|
|
18373
|
-
}
|
|
18353
|
+
keyProp && keyProp.type === 7;
|
|
18374
18354
|
let keyExp = keyProp && (keyProp.type === 6 ? keyProp.value ? createSimpleExpression(keyProp.value.content, true) : void 0 : keyProp.exp);
|
|
18375
18355
|
const keyProperty = keyProp && keyExp ? createObjectProperty(`key`, keyExp) : null;
|
|
18376
18356
|
const isStableFragment = forNode.source.type === 4 && forNode.source.constType > 0;
|
|
@@ -18651,7 +18631,7 @@ function buildSlots(node, context, buildSlotFn = buildClientSlotFn) {
|
|
|
18651
18631
|
);
|
|
18652
18632
|
} else if (vElse = findDir(
|
|
18653
18633
|
slotElement,
|
|
18654
|
-
/^else(
|
|
18634
|
+
/^else(?:-if)?$/,
|
|
18655
18635
|
true
|
|
18656
18636
|
/* allowEmpty */
|
|
18657
18637
|
)) {
|
|
@@ -18663,7 +18643,7 @@ function buildSlots(node, context, buildSlotFn = buildClientSlotFn) {
|
|
|
18663
18643
|
break;
|
|
18664
18644
|
}
|
|
18665
18645
|
}
|
|
18666
|
-
if (prev && isTemplateNode(prev) && findDir(prev, /^(else-)?if$/)) {
|
|
18646
|
+
if (prev && isTemplateNode(prev) && findDir(prev, /^(?:else-)?if$/)) {
|
|
18667
18647
|
let conditional = dynamicSlots[dynamicSlots.length - 1];
|
|
18668
18648
|
while (conditional.alternate.type === 19) {
|
|
18669
18649
|
conditional = conditional.alternate;
|
|
@@ -19523,6 +19503,58 @@ const transformOn$1 = (dir, node, context, augmentor) => {
|
|
|
19523
19503
|
return ret;
|
|
19524
19504
|
};
|
|
19525
19505
|
|
|
19506
|
+
const transformBind = (dir, _node, context) => {
|
|
19507
|
+
const { modifiers, loc } = dir;
|
|
19508
|
+
const arg = dir.arg;
|
|
19509
|
+
let { exp } = dir;
|
|
19510
|
+
if (exp && exp.type === 4 && !exp.content.trim()) {
|
|
19511
|
+
{
|
|
19512
|
+
exp = void 0;
|
|
19513
|
+
}
|
|
19514
|
+
}
|
|
19515
|
+
if (arg.type !== 4) {
|
|
19516
|
+
arg.children.unshift(`(`);
|
|
19517
|
+
arg.children.push(`) || ""`);
|
|
19518
|
+
} else if (!arg.isStatic) {
|
|
19519
|
+
arg.content = arg.content ? `${arg.content} || ""` : `""`;
|
|
19520
|
+
}
|
|
19521
|
+
if (modifiers.some((mod) => mod.content === "camel")) {
|
|
19522
|
+
if (arg.type === 4) {
|
|
19523
|
+
if (arg.isStatic) {
|
|
19524
|
+
arg.content = camelize(arg.content);
|
|
19525
|
+
} else {
|
|
19526
|
+
arg.content = `${context.helperString(CAMELIZE)}(${arg.content})`;
|
|
19527
|
+
}
|
|
19528
|
+
} else {
|
|
19529
|
+
arg.children.unshift(`${context.helperString(CAMELIZE)}(`);
|
|
19530
|
+
arg.children.push(`)`);
|
|
19531
|
+
}
|
|
19532
|
+
}
|
|
19533
|
+
if (!context.inSSR) {
|
|
19534
|
+
if (modifiers.some((mod) => mod.content === "prop")) {
|
|
19535
|
+
injectPrefix(arg, ".");
|
|
19536
|
+
}
|
|
19537
|
+
if (modifiers.some((mod) => mod.content === "attr")) {
|
|
19538
|
+
injectPrefix(arg, "^");
|
|
19539
|
+
}
|
|
19540
|
+
}
|
|
19541
|
+
return {
|
|
19542
|
+
props: [createObjectProperty(arg, exp)]
|
|
19543
|
+
};
|
|
19544
|
+
};
|
|
19545
|
+
const injectPrefix = (arg, prefix) => {
|
|
19546
|
+
if (arg.type === 4) {
|
|
19547
|
+
if (arg.isStatic) {
|
|
19548
|
+
arg.content = prefix + arg.content;
|
|
19549
|
+
} else {
|
|
19550
|
+
arg.content = `\`${prefix}\${${arg.content}}\``;
|
|
19551
|
+
}
|
|
19552
|
+
} else {
|
|
19553
|
+
arg.children.unshift(`'${prefix}' + (`);
|
|
19554
|
+
arg.children.push(`)`);
|
|
19555
|
+
}
|
|
19556
|
+
};
|
|
19557
|
+
|
|
19526
19558
|
const transformText = (node, context) => {
|
|
19527
19559
|
if (node.type === 0 || node.type === 1 || node.type === 11 || node.type === 10) {
|
|
19528
19560
|
return () => {
|
|
@@ -19853,9 +19885,35 @@ const transformMemo = (node, context) => {
|
|
|
19853
19885
|
}
|
|
19854
19886
|
};
|
|
19855
19887
|
|
|
19888
|
+
const transformVBindShorthand = (node, context) => {
|
|
19889
|
+
if (node.type === 1) {
|
|
19890
|
+
for (const prop of node.props) {
|
|
19891
|
+
if (prop.type === 7 && prop.name === "bind" && !prop.exp) {
|
|
19892
|
+
const arg = prop.arg;
|
|
19893
|
+
if (arg.type !== 4 || !arg.isStatic) {
|
|
19894
|
+
context.onError(
|
|
19895
|
+
createCompilerError(
|
|
19896
|
+
52,
|
|
19897
|
+
arg.loc
|
|
19898
|
+
)
|
|
19899
|
+
);
|
|
19900
|
+
prop.exp = createSimpleExpression("", true, arg.loc);
|
|
19901
|
+
} else {
|
|
19902
|
+
const propName = camelize(arg.content);
|
|
19903
|
+
if (validFirstIdentCharRE.test(propName[0]) || // allow hyphen first char for https://github.com/vuejs/language-tools/pull/3424
|
|
19904
|
+
propName[0] === "-") {
|
|
19905
|
+
prop.exp = createSimpleExpression(propName, false, arg.loc);
|
|
19906
|
+
}
|
|
19907
|
+
}
|
|
19908
|
+
}
|
|
19909
|
+
}
|
|
19910
|
+
}
|
|
19911
|
+
};
|
|
19912
|
+
|
|
19856
19913
|
function getBaseTransformPreset(prefixIdentifiers) {
|
|
19857
19914
|
return [
|
|
19858
19915
|
[
|
|
19916
|
+
transformVBindShorthand,
|
|
19859
19917
|
transformOnce,
|
|
19860
19918
|
transformIf,
|
|
19861
19919
|
transformMemo,
|