@vue/compat 3.2.19 → 3.2.23
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 +170 -101
- package/dist/vue.cjs.prod.js +137 -86
- package/dist/vue.esm-browser.js +159 -86
- package/dist/vue.esm-browser.prod.js +1 -1
- package/dist/vue.esm-bundler.js +160 -86
- package/dist/vue.global.js +158 -85
- package/dist/vue.global.prod.js +1 -1
- package/dist/vue.runtime.esm-browser.js +152 -80
- package/dist/vue.runtime.esm-browser.prod.js +1 -1
- package/dist/vue.runtime.esm-bundler.js +153 -80
- package/dist/vue.runtime.global.js +151 -79
- package/dist/vue.runtime.global.prod.js +1 -1
- package/package.json +2 -2
package/dist/vue.esm-bundler.js
CHANGED
|
@@ -531,7 +531,7 @@ const targetMap = new WeakMap();
|
|
|
531
531
|
let effectTrackDepth = 0;
|
|
532
532
|
let trackOpBit = 1;
|
|
533
533
|
/**
|
|
534
|
-
* The bitwise track markers support at most 30 levels
|
|
534
|
+
* The bitwise track markers support at most 30 levels of recursion.
|
|
535
535
|
* This value is chosen to enable modern JS engines to use a SMI on all platforms.
|
|
536
536
|
* When recursion depth is greater, fall back to using a full cleanup.
|
|
537
537
|
*/
|
|
@@ -860,7 +860,7 @@ const shallowSet = /*#__PURE__*/ createSetter(true);
|
|
|
860
860
|
function createSetter(shallow = false) {
|
|
861
861
|
return function set(target, key, value, receiver) {
|
|
862
862
|
let oldValue = target[key];
|
|
863
|
-
if (!shallow) {
|
|
863
|
+
if (!shallow && !isReadonly(value)) {
|
|
864
864
|
value = toRaw(value);
|
|
865
865
|
oldValue = toRaw(oldValue);
|
|
866
866
|
if (!isArray(target) && isRef(oldValue) && !isRef(value)) {
|
|
@@ -1541,19 +1541,22 @@ function registerHMR(instance) {
|
|
|
1541
1541
|
const id = instance.type.__hmrId;
|
|
1542
1542
|
let record = map.get(id);
|
|
1543
1543
|
if (!record) {
|
|
1544
|
-
createRecord(id);
|
|
1544
|
+
createRecord(id, instance.type);
|
|
1545
1545
|
record = map.get(id);
|
|
1546
1546
|
}
|
|
1547
|
-
record.add(instance);
|
|
1547
|
+
record.instances.add(instance);
|
|
1548
1548
|
}
|
|
1549
1549
|
function unregisterHMR(instance) {
|
|
1550
|
-
map.get(instance.type.__hmrId).delete(instance);
|
|
1550
|
+
map.get(instance.type.__hmrId).instances.delete(instance);
|
|
1551
1551
|
}
|
|
1552
|
-
function createRecord(id) {
|
|
1552
|
+
function createRecord(id, initialDef) {
|
|
1553
1553
|
if (map.has(id)) {
|
|
1554
1554
|
return false;
|
|
1555
1555
|
}
|
|
1556
|
-
map.set(id,
|
|
1556
|
+
map.set(id, {
|
|
1557
|
+
initialDef: normalizeClassComponent(initialDef),
|
|
1558
|
+
instances: new Set()
|
|
1559
|
+
});
|
|
1557
1560
|
return true;
|
|
1558
1561
|
}
|
|
1559
1562
|
function normalizeClassComponent(component) {
|
|
@@ -1564,7 +1567,9 @@ function rerender(id, newRender) {
|
|
|
1564
1567
|
if (!record) {
|
|
1565
1568
|
return;
|
|
1566
1569
|
}
|
|
1567
|
-
|
|
1570
|
+
// update initial record (for not-yet-rendered component)
|
|
1571
|
+
record.initialDef.render = newRender;
|
|
1572
|
+
[...record.instances].forEach(instance => {
|
|
1568
1573
|
if (newRender) {
|
|
1569
1574
|
instance.render = newRender;
|
|
1570
1575
|
normalizeClassComponent(instance.type).render = newRender;
|
|
@@ -1581,17 +1586,16 @@ function reload(id, newComp) {
|
|
|
1581
1586
|
if (!record)
|
|
1582
1587
|
return;
|
|
1583
1588
|
newComp = normalizeClassComponent(newComp);
|
|
1589
|
+
// update initial def (for not-yet-rendered components)
|
|
1590
|
+
updateComponentDef(record.initialDef, newComp);
|
|
1584
1591
|
// create a snapshot which avoids the set being mutated during updates
|
|
1585
|
-
const instances = [...record];
|
|
1592
|
+
const instances = [...record.instances];
|
|
1586
1593
|
for (const instance of instances) {
|
|
1587
1594
|
const oldComp = normalizeClassComponent(instance.type);
|
|
1588
1595
|
if (!hmrDirtyComponents.has(oldComp)) {
|
|
1589
1596
|
// 1. Update existing comp definition to match new one
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
if (key !== '__file' && !(key in newComp)) {
|
|
1593
|
-
delete oldComp[key];
|
|
1594
|
-
}
|
|
1597
|
+
if (oldComp !== record.initialDef) {
|
|
1598
|
+
updateComponentDef(oldComp, newComp);
|
|
1595
1599
|
}
|
|
1596
1600
|
// 2. mark definition dirty. This forces the renderer to replace the
|
|
1597
1601
|
// component on patch.
|
|
@@ -1637,6 +1641,14 @@ function reload(id, newComp) {
|
|
|
1637
1641
|
}
|
|
1638
1642
|
});
|
|
1639
1643
|
}
|
|
1644
|
+
function updateComponentDef(oldComp, newComp) {
|
|
1645
|
+
extend(oldComp, newComp);
|
|
1646
|
+
for (const key in oldComp) {
|
|
1647
|
+
if (key !== '__file' && !(key in newComp)) {
|
|
1648
|
+
delete oldComp[key];
|
|
1649
|
+
}
|
|
1650
|
+
}
|
|
1651
|
+
}
|
|
1640
1652
|
function tryWrap(fn) {
|
|
1641
1653
|
return (id, arg) => {
|
|
1642
1654
|
try {
|
|
@@ -1652,27 +1664,52 @@ function tryWrap(fn) {
|
|
|
1652
1664
|
|
|
1653
1665
|
let devtools;
|
|
1654
1666
|
let buffer = [];
|
|
1667
|
+
let devtoolsNotInstalled = false;
|
|
1655
1668
|
function emit(event, ...args) {
|
|
1656
1669
|
if (devtools) {
|
|
1657
1670
|
devtools.emit(event, ...args);
|
|
1658
1671
|
}
|
|
1659
|
-
else {
|
|
1672
|
+
else if (!devtoolsNotInstalled) {
|
|
1660
1673
|
buffer.push({ event, args });
|
|
1661
1674
|
}
|
|
1662
1675
|
}
|
|
1663
1676
|
function setDevtoolsHook(hook, target) {
|
|
1677
|
+
var _a, _b;
|
|
1664
1678
|
devtools = hook;
|
|
1665
1679
|
if (devtools) {
|
|
1666
1680
|
devtools.enabled = true;
|
|
1667
1681
|
buffer.forEach(({ event, args }) => devtools.emit(event, ...args));
|
|
1668
1682
|
buffer = [];
|
|
1669
1683
|
}
|
|
1670
|
-
else
|
|
1684
|
+
else if (
|
|
1685
|
+
// handle late devtools injection - only do this if we are in an actual
|
|
1686
|
+
// browser environment to avoid the timer handle stalling test runner exit
|
|
1687
|
+
// (#4815)
|
|
1688
|
+
// eslint-disable-next-line no-restricted-globals
|
|
1689
|
+
typeof window !== 'undefined' &&
|
|
1690
|
+
// some envs mock window but not fully
|
|
1691
|
+
window.HTMLElement &&
|
|
1692
|
+
// also exclude jsdom
|
|
1693
|
+
!((_b = (_a = window.navigator) === null || _a === void 0 ? void 0 : _a.userAgent) === null || _b === void 0 ? void 0 : _b.includes('jsdom'))) {
|
|
1671
1694
|
const replay = (target.__VUE_DEVTOOLS_HOOK_REPLAY__ =
|
|
1672
1695
|
target.__VUE_DEVTOOLS_HOOK_REPLAY__ || []);
|
|
1673
1696
|
replay.push((newHook) => {
|
|
1674
1697
|
setDevtoolsHook(newHook, target);
|
|
1675
1698
|
});
|
|
1699
|
+
// clear buffer after 3s - the user probably doesn't have devtools installed
|
|
1700
|
+
// at all, and keeping the buffer will cause memory leaks (#4738)
|
|
1701
|
+
setTimeout(() => {
|
|
1702
|
+
if (!devtools) {
|
|
1703
|
+
target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null;
|
|
1704
|
+
devtoolsNotInstalled = true;
|
|
1705
|
+
buffer = [];
|
|
1706
|
+
}
|
|
1707
|
+
}, 3000);
|
|
1708
|
+
}
|
|
1709
|
+
else {
|
|
1710
|
+
// non-browser env, assume not installed
|
|
1711
|
+
devtoolsNotInstalled = true;
|
|
1712
|
+
buffer = [];
|
|
1676
1713
|
}
|
|
1677
1714
|
}
|
|
1678
1715
|
function devtoolsInitApp(app, version) {
|
|
@@ -3291,7 +3328,9 @@ const BaseTransitionImpl = {
|
|
|
3291
3328
|
const rawProps = toRaw(props);
|
|
3292
3329
|
const { mode } = rawProps;
|
|
3293
3330
|
// check mode
|
|
3294
|
-
if ((process.env.NODE_ENV !== 'production') &&
|
|
3331
|
+
if ((process.env.NODE_ENV !== 'production') &&
|
|
3332
|
+
mode &&
|
|
3333
|
+
mode !== 'in-out' && mode !== 'out-in' && mode !== 'default') {
|
|
3295
3334
|
warn$1(`invalid <transition> mode: ${mode}`);
|
|
3296
3335
|
}
|
|
3297
3336
|
// at this point children has a guaranteed length of 1.
|
|
@@ -3937,7 +3976,7 @@ function registerKeepAliveHook(hook, type, target = currentInstance) {
|
|
|
3937
3976
|
}
|
|
3938
3977
|
current = current.parent;
|
|
3939
3978
|
}
|
|
3940
|
-
hook();
|
|
3979
|
+
return hook();
|
|
3941
3980
|
});
|
|
3942
3981
|
injectHook(type, wrappedHook, target);
|
|
3943
3982
|
// In addition to registering it on the target instance, we walk up the parent
|
|
@@ -5170,7 +5209,7 @@ return withDirectives(h(comp), [
|
|
|
5170
5209
|
[bar, this.y]
|
|
5171
5210
|
])
|
|
5172
5211
|
*/
|
|
5173
|
-
const isBuiltInDirective = /*#__PURE__*/ makeMap('bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text');
|
|
5212
|
+
const isBuiltInDirective = /*#__PURE__*/ makeMap('bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo');
|
|
5174
5213
|
function validateDirectiveName(name) {
|
|
5175
5214
|
if (isBuiltInDirective(name)) {
|
|
5176
5215
|
warn$1('Do not use built-in directive ids as custom directive id: ' + name);
|
|
@@ -5305,7 +5344,7 @@ function createCompatVue(createApp, createSingletonApp) {
|
|
|
5305
5344
|
return vm;
|
|
5306
5345
|
}
|
|
5307
5346
|
}
|
|
5308
|
-
Vue.version = "3.2.
|
|
5347
|
+
Vue.version = "3.2.23";
|
|
5309
5348
|
Vue.config = singletonApp.config;
|
|
5310
5349
|
Vue.use = (p, ...options) => {
|
|
5311
5350
|
if (p && isFunction(p.install)) {
|
|
@@ -6802,7 +6841,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6802
6841
|
}
|
|
6803
6842
|
};
|
|
6804
6843
|
const mountComponent = (initialVNode, container, anchor, parentComponent, parentSuspense, isSVG, optimized) => {
|
|
6805
|
-
// 2.x compat may pre-
|
|
6844
|
+
// 2.x compat may pre-create the component instance before actually
|
|
6806
6845
|
// mounting
|
|
6807
6846
|
const compatMountInstance = initialVNode.isCompatRoot && initialVNode.component;
|
|
6808
6847
|
const instance = compatMountInstance ||
|
|
@@ -7682,8 +7721,8 @@ function invokeVNodeHook(hook, instance, vnode, prevVNode = null) {
|
|
|
7682
7721
|
*
|
|
7683
7722
|
* #2080
|
|
7684
7723
|
* Inside keyed `template` fragment static children, if a fragment is moved,
|
|
7685
|
-
* the children will always moved
|
|
7686
|
-
*
|
|
7724
|
+
* the children will always be moved. Therefore, in order to ensure correct move
|
|
7725
|
+
* position, el should be inherited from previous nodes.
|
|
7687
7726
|
*/
|
|
7688
7727
|
function traverseStaticChildren(n1, n2, shallow = false) {
|
|
7689
7728
|
const ch1 = n1.children;
|
|
@@ -8815,7 +8854,8 @@ function mergeProps(...args) {
|
|
|
8815
8854
|
else if (isOn(key)) {
|
|
8816
8855
|
const existing = ret[key];
|
|
8817
8856
|
const incoming = toMerge[key];
|
|
8818
|
-
if (existing !== incoming
|
|
8857
|
+
if (existing !== incoming &&
|
|
8858
|
+
!(isArray(existing) && existing.includes(incoming))) {
|
|
8819
8859
|
ret[key] = existing
|
|
8820
8860
|
? [].concat(existing, incoming)
|
|
8821
8861
|
: incoming;
|
|
@@ -9260,23 +9300,23 @@ const PublicInstanceProxyHandlers = {
|
|
|
9260
9300
|
const n = accessCache[key];
|
|
9261
9301
|
if (n !== undefined) {
|
|
9262
9302
|
switch (n) {
|
|
9263
|
-
case
|
|
9303
|
+
case 1 /* SETUP */:
|
|
9264
9304
|
return setupState[key];
|
|
9265
|
-
case
|
|
9305
|
+
case 2 /* DATA */:
|
|
9266
9306
|
return data[key];
|
|
9267
|
-
case
|
|
9307
|
+
case 4 /* CONTEXT */:
|
|
9268
9308
|
return ctx[key];
|
|
9269
|
-
case
|
|
9309
|
+
case 3 /* PROPS */:
|
|
9270
9310
|
return props[key];
|
|
9271
9311
|
// default: just fallthrough
|
|
9272
9312
|
}
|
|
9273
9313
|
}
|
|
9274
9314
|
else if (setupState !== EMPTY_OBJ && hasOwn(setupState, key)) {
|
|
9275
|
-
accessCache[key] =
|
|
9315
|
+
accessCache[key] = 1 /* SETUP */;
|
|
9276
9316
|
return setupState[key];
|
|
9277
9317
|
}
|
|
9278
9318
|
else if (data !== EMPTY_OBJ && hasOwn(data, key)) {
|
|
9279
|
-
accessCache[key] =
|
|
9319
|
+
accessCache[key] = 2 /* DATA */;
|
|
9280
9320
|
return data[key];
|
|
9281
9321
|
}
|
|
9282
9322
|
else if (
|
|
@@ -9284,15 +9324,15 @@ const PublicInstanceProxyHandlers = {
|
|
|
9284
9324
|
// props
|
|
9285
9325
|
(normalizedProps = instance.propsOptions[0]) &&
|
|
9286
9326
|
hasOwn(normalizedProps, key)) {
|
|
9287
|
-
accessCache[key] =
|
|
9327
|
+
accessCache[key] = 3 /* PROPS */;
|
|
9288
9328
|
return props[key];
|
|
9289
9329
|
}
|
|
9290
9330
|
else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {
|
|
9291
|
-
accessCache[key] =
|
|
9331
|
+
accessCache[key] = 4 /* CONTEXT */;
|
|
9292
9332
|
return ctx[key];
|
|
9293
9333
|
}
|
|
9294
9334
|
else if (!__VUE_OPTIONS_API__ || shouldCacheAccess) {
|
|
9295
|
-
accessCache[key] =
|
|
9335
|
+
accessCache[key] = 0 /* OTHER */;
|
|
9296
9336
|
}
|
|
9297
9337
|
}
|
|
9298
9338
|
const publicGetter = publicPropertiesMap[key];
|
|
@@ -9313,7 +9353,7 @@ const PublicInstanceProxyHandlers = {
|
|
|
9313
9353
|
}
|
|
9314
9354
|
else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {
|
|
9315
9355
|
// user may set custom properties to `this` that start with `$`
|
|
9316
|
-
accessCache[key] =
|
|
9356
|
+
accessCache[key] = 4 /* CONTEXT */;
|
|
9317
9357
|
return ctx[key];
|
|
9318
9358
|
}
|
|
9319
9359
|
else if (
|
|
@@ -9384,7 +9424,7 @@ const PublicInstanceProxyHandlers = {
|
|
|
9384
9424
|
},
|
|
9385
9425
|
has({ _: { data, setupState, accessCache, ctx, appContext, propsOptions } }, key) {
|
|
9386
9426
|
let normalizedProps;
|
|
9387
|
-
return (accessCache[key]
|
|
9427
|
+
return (!!accessCache[key] ||
|
|
9388
9428
|
(data !== EMPTY_OBJ && hasOwn(data, key)) ||
|
|
9389
9429
|
(setupState !== EMPTY_OBJ && hasOwn(setupState, key)) ||
|
|
9390
9430
|
((normalizedProps = propsOptions[0]) && hasOwn(normalizedProps, key)) ||
|
|
@@ -10677,15 +10717,21 @@ function getContext() {
|
|
|
10677
10717
|
* only.
|
|
10678
10718
|
* @internal
|
|
10679
10719
|
*/
|
|
10680
|
-
function mergeDefaults(
|
|
10681
|
-
|
|
10682
|
-
|
|
10720
|
+
function mergeDefaults(raw, defaults) {
|
|
10721
|
+
const props = isArray(raw)
|
|
10722
|
+
? raw.reduce((normalized, p) => ((normalized[p] = {}), normalized), {})
|
|
10723
|
+
: raw;
|
|
10683
10724
|
for (const key in defaults) {
|
|
10684
|
-
const
|
|
10685
|
-
if (
|
|
10686
|
-
|
|
10725
|
+
const opt = props[key];
|
|
10726
|
+
if (opt) {
|
|
10727
|
+
if (isArray(opt) || isFunction(opt)) {
|
|
10728
|
+
props[key] = { type: opt, default: defaults[key] };
|
|
10729
|
+
}
|
|
10730
|
+
else {
|
|
10731
|
+
opt.default = defaults[key];
|
|
10732
|
+
}
|
|
10687
10733
|
}
|
|
10688
|
-
else if (
|
|
10734
|
+
else if (opt === null) {
|
|
10689
10735
|
props[key] = { default: defaults[key] };
|
|
10690
10736
|
}
|
|
10691
10737
|
else if ((process.env.NODE_ENV !== 'production')) {
|
|
@@ -10694,6 +10740,23 @@ props, defaults) {
|
|
|
10694
10740
|
}
|
|
10695
10741
|
return props;
|
|
10696
10742
|
}
|
|
10743
|
+
/**
|
|
10744
|
+
* Used to create a proxy for the rest element when destructuring props with
|
|
10745
|
+
* defineProps().
|
|
10746
|
+
* @internal
|
|
10747
|
+
*/
|
|
10748
|
+
function createPropsRestProxy(props, excludedKeys) {
|
|
10749
|
+
const ret = {};
|
|
10750
|
+
for (const key in props) {
|
|
10751
|
+
if (!excludedKeys.includes(key)) {
|
|
10752
|
+
Object.defineProperty(ret, key, {
|
|
10753
|
+
enumerable: true,
|
|
10754
|
+
get: () => props[key]
|
|
10755
|
+
});
|
|
10756
|
+
}
|
|
10757
|
+
}
|
|
10758
|
+
return ret;
|
|
10759
|
+
}
|
|
10697
10760
|
/**
|
|
10698
10761
|
* `<script setup>` helper for persisting the current instance context over
|
|
10699
10762
|
* async/await flows.
|
|
@@ -10986,7 +11049,7 @@ function isMemoSame(cached, memo) {
|
|
|
10986
11049
|
}
|
|
10987
11050
|
|
|
10988
11051
|
// Core API ------------------------------------------------------------------
|
|
10989
|
-
const version = "3.2.
|
|
11052
|
+
const version = "3.2.23";
|
|
10990
11053
|
const _ssrUtils = {
|
|
10991
11054
|
createComponentInstance,
|
|
10992
11055
|
setupComponent,
|
|
@@ -11123,16 +11186,8 @@ function patchClass(el, value, isSVG) {
|
|
|
11123
11186
|
|
|
11124
11187
|
function patchStyle(el, prev, next) {
|
|
11125
11188
|
const style = el.style;
|
|
11126
|
-
const
|
|
11127
|
-
if (!
|
|
11128
|
-
el.removeAttribute('style');
|
|
11129
|
-
}
|
|
11130
|
-
else if (isString(next)) {
|
|
11131
|
-
if (prev !== next) {
|
|
11132
|
-
style.cssText = next;
|
|
11133
|
-
}
|
|
11134
|
-
}
|
|
11135
|
-
else {
|
|
11189
|
+
const isCssString = isString(next);
|
|
11190
|
+
if (next && !isCssString) {
|
|
11136
11191
|
for (const key in next) {
|
|
11137
11192
|
setStyle(style, key, next[key]);
|
|
11138
11193
|
}
|
|
@@ -11144,11 +11199,22 @@ function patchStyle(el, prev, next) {
|
|
|
11144
11199
|
}
|
|
11145
11200
|
}
|
|
11146
11201
|
}
|
|
11147
|
-
|
|
11148
|
-
|
|
11149
|
-
|
|
11150
|
-
|
|
11151
|
-
|
|
11202
|
+
else {
|
|
11203
|
+
const currentDisplay = style.display;
|
|
11204
|
+
if (isCssString) {
|
|
11205
|
+
if (prev !== next) {
|
|
11206
|
+
style.cssText = next;
|
|
11207
|
+
}
|
|
11208
|
+
}
|
|
11209
|
+
else if (prev) {
|
|
11210
|
+
el.removeAttribute('style');
|
|
11211
|
+
}
|
|
11212
|
+
// indicates that the `display` of the element is controlled by `v-show`,
|
|
11213
|
+
// so we always keep the current `display` value regardless of the `style`
|
|
11214
|
+
// value, thus handing over control to `v-show`.
|
|
11215
|
+
if ('_vod' in el) {
|
|
11216
|
+
style.display = currentDisplay;
|
|
11217
|
+
}
|
|
11152
11218
|
}
|
|
11153
11219
|
}
|
|
11154
11220
|
const importantRE = /\s*!important$/;
|
|
@@ -11258,12 +11324,19 @@ prevChildren, parentComponent, parentSuspense, unmountChildren) {
|
|
|
11258
11324
|
el[key] = value == null ? '' : value;
|
|
11259
11325
|
return;
|
|
11260
11326
|
}
|
|
11261
|
-
if (key === 'value' &&
|
|
11327
|
+
if (key === 'value' &&
|
|
11328
|
+
el.tagName !== 'PROGRESS' &&
|
|
11329
|
+
// custom elements may use _value internally
|
|
11330
|
+
!el.tagName.includes('-')) {
|
|
11262
11331
|
// store value as _value as well since
|
|
11263
11332
|
// non-string values will be stringified.
|
|
11264
11333
|
el._value = value;
|
|
11265
11334
|
const newValue = value == null ? '' : value;
|
|
11266
|
-
if (el.value !== newValue
|
|
11335
|
+
if (el.value !== newValue ||
|
|
11336
|
+
// #4956: always set for OPTION elements because its value falls back to
|
|
11337
|
+
// textContent if no value attribute is present. And setting .value for
|
|
11338
|
+
// OPTION has no side effect
|
|
11339
|
+
el.tagName === 'OPTION') {
|
|
11267
11340
|
el.value = newValue;
|
|
11268
11341
|
}
|
|
11269
11342
|
if (value == null) {
|
|
@@ -11532,22 +11605,11 @@ class VueElement extends BaseClass {
|
|
|
11532
11605
|
}
|
|
11533
11606
|
this.attachShadow({ mode: 'open' });
|
|
11534
11607
|
}
|
|
11535
|
-
// set initial attrs
|
|
11536
|
-
for (let i = 0; i < this.attributes.length; i++) {
|
|
11537
|
-
this._setAttr(this.attributes[i].name);
|
|
11538
|
-
}
|
|
11539
|
-
// watch future attr changes
|
|
11540
|
-
new MutationObserver(mutations => {
|
|
11541
|
-
for (const m of mutations) {
|
|
11542
|
-
this._setAttr(m.attributeName);
|
|
11543
|
-
}
|
|
11544
|
-
}).observe(this, { attributes: true });
|
|
11545
11608
|
}
|
|
11546
11609
|
connectedCallback() {
|
|
11547
11610
|
this._connected = true;
|
|
11548
11611
|
if (!this._instance) {
|
|
11549
11612
|
this._resolveDef();
|
|
11550
|
-
this._update();
|
|
11551
11613
|
}
|
|
11552
11614
|
}
|
|
11553
11615
|
disconnectedCallback() {
|
|
@@ -11566,8 +11628,18 @@ class VueElement extends BaseClass {
|
|
|
11566
11628
|
if (this._resolved) {
|
|
11567
11629
|
return;
|
|
11568
11630
|
}
|
|
11631
|
+
this._resolved = true;
|
|
11632
|
+
// set initial attrs
|
|
11633
|
+
for (let i = 0; i < this.attributes.length; i++) {
|
|
11634
|
+
this._setAttr(this.attributes[i].name);
|
|
11635
|
+
}
|
|
11636
|
+
// watch future attr changes
|
|
11637
|
+
new MutationObserver(mutations => {
|
|
11638
|
+
for (const m of mutations) {
|
|
11639
|
+
this._setAttr(m.attributeName);
|
|
11640
|
+
}
|
|
11641
|
+
}).observe(this, { attributes: true });
|
|
11569
11642
|
const resolve = (def) => {
|
|
11570
|
-
this._resolved = true;
|
|
11571
11643
|
const { props, styles } = def;
|
|
11572
11644
|
const hasOptions = !isArray(props);
|
|
11573
11645
|
const rawKeys = props ? (hasOptions ? Object.keys(props) : props) : [];
|
|
@@ -11582,14 +11654,11 @@ class VueElement extends BaseClass {
|
|
|
11582
11654
|
}
|
|
11583
11655
|
}
|
|
11584
11656
|
}
|
|
11585
|
-
|
|
11586
|
-
this._numberProps = numberProps;
|
|
11587
|
-
this._update();
|
|
11588
|
-
}
|
|
11657
|
+
this._numberProps = numberProps;
|
|
11589
11658
|
// check if there are props set pre-upgrade or connect
|
|
11590
11659
|
for (const key of Object.keys(this)) {
|
|
11591
11660
|
if (key[0] !== '_') {
|
|
11592
|
-
this._setProp(key, this[key]);
|
|
11661
|
+
this._setProp(key, this[key], true, false);
|
|
11593
11662
|
}
|
|
11594
11663
|
}
|
|
11595
11664
|
// defining getter/setters on prototype
|
|
@@ -11603,7 +11672,10 @@ class VueElement extends BaseClass {
|
|
|
11603
11672
|
}
|
|
11604
11673
|
});
|
|
11605
11674
|
}
|
|
11675
|
+
// apply CSS
|
|
11606
11676
|
this._applyStyles(styles);
|
|
11677
|
+
// initial render
|
|
11678
|
+
this._update();
|
|
11607
11679
|
};
|
|
11608
11680
|
const asyncDef = this._def.__asyncLoader;
|
|
11609
11681
|
if (asyncDef) {
|
|
@@ -11629,10 +11701,10 @@ class VueElement extends BaseClass {
|
|
|
11629
11701
|
/**
|
|
11630
11702
|
* @internal
|
|
11631
11703
|
*/
|
|
11632
|
-
_setProp(key, val, shouldReflect = true) {
|
|
11704
|
+
_setProp(key, val, shouldReflect = true, shouldUpdate = true) {
|
|
11633
11705
|
if (val !== this._props[key]) {
|
|
11634
11706
|
this._props[key] = val;
|
|
11635
|
-
if (this._instance) {
|
|
11707
|
+
if (shouldUpdate && this._instance) {
|
|
11636
11708
|
this._update();
|
|
11637
11709
|
}
|
|
11638
11710
|
// reflect
|
|
@@ -12875,6 +12947,7 @@ var runtimeDom = /*#__PURE__*/Object.freeze({
|
|
|
12875
12947
|
defineExpose: defineExpose,
|
|
12876
12948
|
withDefaults: withDefaults,
|
|
12877
12949
|
mergeDefaults: mergeDefaults,
|
|
12950
|
+
createPropsRestProxy: createPropsRestProxy,
|
|
12878
12951
|
withAsyncContext: withAsyncContext,
|
|
12879
12952
|
getCurrentInstance: getCurrentInstance,
|
|
12880
12953
|
h: h,
|
|
@@ -13379,7 +13452,7 @@ const isMemberExpressionBrowser = (path) => {
|
|
|
13379
13452
|
const isMemberExpression = isMemberExpressionBrowser
|
|
13380
13453
|
;
|
|
13381
13454
|
function getInnerRange(loc, offset, length) {
|
|
13382
|
-
const source = loc.source.
|
|
13455
|
+
const source = loc.source.slice(offset, offset + length);
|
|
13383
13456
|
const newLoc = {
|
|
13384
13457
|
source,
|
|
13385
13458
|
start: advancePositionWithClone(loc.start, loc.source, offset),
|
|
@@ -14095,6 +14168,7 @@ function parseTag(context, type, parent) {
|
|
|
14095
14168
|
}
|
|
14096
14169
|
if (hasIf && hasFor) {
|
|
14097
14170
|
warnDeprecation$1("COMPILER_V_IF_V_FOR_PRECEDENCE" /* COMPILER_V_IF_V_FOR_PRECEDENCE */, context, getSelection(context, start));
|
|
14171
|
+
break;
|
|
14098
14172
|
}
|
|
14099
14173
|
}
|
|
14100
14174
|
}
|
|
@@ -14252,10 +14326,10 @@ function parseAttribute(context, nameSet) {
|
|
|
14252
14326
|
isStatic = false;
|
|
14253
14327
|
if (!content.endsWith(']')) {
|
|
14254
14328
|
emitError(context, 27 /* X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END */);
|
|
14255
|
-
content = content.
|
|
14329
|
+
content = content.slice(1);
|
|
14256
14330
|
}
|
|
14257
14331
|
else {
|
|
14258
|
-
content = content.
|
|
14332
|
+
content = content.slice(1, content.length - 1);
|
|
14259
14333
|
}
|
|
14260
14334
|
}
|
|
14261
14335
|
else if (isSlot) {
|
|
@@ -14281,7 +14355,7 @@ function parseAttribute(context, nameSet) {
|
|
|
14281
14355
|
valueLoc.end = advancePositionWithClone(valueLoc.start, value.content);
|
|
14282
14356
|
valueLoc.source = valueLoc.source.slice(1, -1);
|
|
14283
14357
|
}
|
|
14284
|
-
const modifiers = match[3] ? match[3].
|
|
14358
|
+
const modifiers = match[3] ? match[3].slice(1).split('.') : [];
|
|
14285
14359
|
if (isPropShorthand)
|
|
14286
14360
|
modifiers.push('prop');
|
|
14287
14361
|
// 2.x compat v-bind:foo.sync -> v-model:foo
|
|
@@ -14502,7 +14576,7 @@ function isEnd(context, mode, ancestors) {
|
|
|
14502
14576
|
}
|
|
14503
14577
|
function startsWithEndTagOpen(source, tag) {
|
|
14504
14578
|
return (startsWith(source, '</') &&
|
|
14505
|
-
source.
|
|
14579
|
+
source.slice(2, 2 + tag.length).toLowerCase() === tag.toLowerCase() &&
|
|
14506
14580
|
/[\t\r\n\f />]/.test(source[2 + tag.length] || '>'));
|
|
14507
14581
|
}
|
|
14508
14582
|
|
|
@@ -16972,7 +17046,7 @@ function stringifyDynamicPropNames(props) {
|
|
|
16972
17046
|
return propsNamesString + `]`;
|
|
16973
17047
|
}
|
|
16974
17048
|
function isComponentTag(tag) {
|
|
16975
|
-
return tag
|
|
17049
|
+
return tag === 'component' || tag === 'Component';
|
|
16976
17050
|
}
|
|
16977
17051
|
|
|
16978
17052
|
const transformSlotOutlet = (node, context) => {
|
|
@@ -18113,4 +18187,4 @@ Vue.compile = compileToFunction;
|
|
|
18113
18187
|
const { configureCompat: configureCompat$1 } = Vue;
|
|
18114
18188
|
|
|
18115
18189
|
export default Vue;
|
|
18116
|
-
export { BaseTransition, Comment, EffectScope, Fragment, KeepAlive, ReactiveEffect, Static, Suspense, Teleport, Text, Transition, TransitionGroup, VueElement, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, cloneVNode, compatUtils, computed, configureCompat$1 as configureCompat, createApp, createBlock, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createRenderer, createSSRApp, createSlots, createStaticVNode, createTextVNode, createVNode, customRef, defineAsyncComponent, defineComponent, defineCustomElement, defineEmits, defineExpose, defineProps, defineSSRCustomElement, devtools, effect, effectScope, getCurrentInstance, getCurrentScope, getTransitionRawChildren, guardReactiveProps, h, handleError, hydrate, initCustomFormatter, initDirectivesForSSR, inject, isMemoSame, isProxy, isReactive, isReadonly, isRef, isRuntimeOnly, isVNode, markRaw, mergeDefaults, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onScopeDispose, onServerPrefetch, onUnmounted, onUpdated, openBlock, popScopeId, provide, proxyRefs, pushScopeId, queuePostFlushCb, reactive, readonly, ref, registerRuntimeCompiler, render, renderList, renderSlot, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter$1 as resolveFilter, resolveTransitionHooks, setBlockTracking, setDevtoolsHook, setTransitionHooks, shallowReactive, shallowReadonly, shallowRef, ssrContextKey, ssrUtils, stop, toDisplayString, toHandlerKey, toHandlers, toRaw, toRef, toRefs, transformVNodeArgs, triggerRef, unref, useAttrs, useCssModule, useCssVars, useSSRContext, useSlots, useTransitionState, vModelCheckbox, vModelDynamic, vModelRadio, vModelSelect, vModelText, vShow, version, warn$1 as warn, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withKeys, withMemo, withModifiers, withScopeId };
|
|
18190
|
+
export { BaseTransition, Comment, EffectScope, Fragment, KeepAlive, ReactiveEffect, Static, Suspense, Teleport, Text, Transition, TransitionGroup, VueElement, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, cloneVNode, compatUtils, computed, configureCompat$1 as configureCompat, createApp, createBlock, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createPropsRestProxy, createRenderer, createSSRApp, createSlots, createStaticVNode, createTextVNode, createVNode, customRef, defineAsyncComponent, defineComponent, defineCustomElement, defineEmits, defineExpose, defineProps, defineSSRCustomElement, devtools, effect, effectScope, getCurrentInstance, getCurrentScope, getTransitionRawChildren, guardReactiveProps, h, handleError, hydrate, initCustomFormatter, initDirectivesForSSR, inject, isMemoSame, isProxy, isReactive, isReadonly, isRef, isRuntimeOnly, isVNode, markRaw, mergeDefaults, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onScopeDispose, onServerPrefetch, onUnmounted, onUpdated, openBlock, popScopeId, provide, proxyRefs, pushScopeId, queuePostFlushCb, reactive, readonly, ref, registerRuntimeCompiler, render, renderList, renderSlot, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter$1 as resolveFilter, resolveTransitionHooks, setBlockTracking, setDevtoolsHook, setTransitionHooks, shallowReactive, shallowReadonly, shallowRef, ssrContextKey, ssrUtils, stop, toDisplayString, toHandlerKey, toHandlers, toRaw, toRef, toRefs, transformVNodeArgs, triggerRef, unref, useAttrs, useCssModule, useCssVars, useSSRContext, useSlots, useTransitionState, vModelCheckbox, vModelDynamic, vModelRadio, vModelSelect, vModelText, vShow, version, warn$1 as warn, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withKeys, withMemo, withModifiers, withScopeId };
|