@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
|
@@ -456,7 +456,7 @@ const targetMap = new WeakMap();
|
|
|
456
456
|
let effectTrackDepth = 0;
|
|
457
457
|
let trackOpBit = 1;
|
|
458
458
|
/**
|
|
459
|
-
* The bitwise track markers support at most 30 levels
|
|
459
|
+
* The bitwise track markers support at most 30 levels of recursion.
|
|
460
460
|
* This value is chosen to enable modern JS engines to use a SMI on all platforms.
|
|
461
461
|
* When recursion depth is greater, fall back to using a full cleanup.
|
|
462
462
|
*/
|
|
@@ -785,7 +785,7 @@ const shallowSet = /*#__PURE__*/ createSetter(true);
|
|
|
785
785
|
function createSetter(shallow = false) {
|
|
786
786
|
return function set(target, key, value, receiver) {
|
|
787
787
|
let oldValue = target[key];
|
|
788
|
-
if (!shallow) {
|
|
788
|
+
if (!shallow && !isReadonly(value)) {
|
|
789
789
|
value = toRaw(value);
|
|
790
790
|
oldValue = toRaw(oldValue);
|
|
791
791
|
if (!isArray(target) && isRef(oldValue) && !isRef(value)) {
|
|
@@ -1466,19 +1466,22 @@ function registerHMR(instance) {
|
|
|
1466
1466
|
const id = instance.type.__hmrId;
|
|
1467
1467
|
let record = map.get(id);
|
|
1468
1468
|
if (!record) {
|
|
1469
|
-
createRecord(id);
|
|
1469
|
+
createRecord(id, instance.type);
|
|
1470
1470
|
record = map.get(id);
|
|
1471
1471
|
}
|
|
1472
|
-
record.add(instance);
|
|
1472
|
+
record.instances.add(instance);
|
|
1473
1473
|
}
|
|
1474
1474
|
function unregisterHMR(instance) {
|
|
1475
|
-
map.get(instance.type.__hmrId).delete(instance);
|
|
1475
|
+
map.get(instance.type.__hmrId).instances.delete(instance);
|
|
1476
1476
|
}
|
|
1477
|
-
function createRecord(id) {
|
|
1477
|
+
function createRecord(id, initialDef) {
|
|
1478
1478
|
if (map.has(id)) {
|
|
1479
1479
|
return false;
|
|
1480
1480
|
}
|
|
1481
|
-
map.set(id,
|
|
1481
|
+
map.set(id, {
|
|
1482
|
+
initialDef: normalizeClassComponent(initialDef),
|
|
1483
|
+
instances: new Set()
|
|
1484
|
+
});
|
|
1482
1485
|
return true;
|
|
1483
1486
|
}
|
|
1484
1487
|
function normalizeClassComponent(component) {
|
|
@@ -1489,7 +1492,9 @@ function rerender(id, newRender) {
|
|
|
1489
1492
|
if (!record) {
|
|
1490
1493
|
return;
|
|
1491
1494
|
}
|
|
1492
|
-
|
|
1495
|
+
// update initial record (for not-yet-rendered component)
|
|
1496
|
+
record.initialDef.render = newRender;
|
|
1497
|
+
[...record.instances].forEach(instance => {
|
|
1493
1498
|
if (newRender) {
|
|
1494
1499
|
instance.render = newRender;
|
|
1495
1500
|
normalizeClassComponent(instance.type).render = newRender;
|
|
@@ -1506,17 +1511,16 @@ function reload(id, newComp) {
|
|
|
1506
1511
|
if (!record)
|
|
1507
1512
|
return;
|
|
1508
1513
|
newComp = normalizeClassComponent(newComp);
|
|
1514
|
+
// update initial def (for not-yet-rendered components)
|
|
1515
|
+
updateComponentDef(record.initialDef, newComp);
|
|
1509
1516
|
// create a snapshot which avoids the set being mutated during updates
|
|
1510
|
-
const instances = [...record];
|
|
1517
|
+
const instances = [...record.instances];
|
|
1511
1518
|
for (const instance of instances) {
|
|
1512
1519
|
const oldComp = normalizeClassComponent(instance.type);
|
|
1513
1520
|
if (!hmrDirtyComponents.has(oldComp)) {
|
|
1514
1521
|
// 1. Update existing comp definition to match new one
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
if (key !== '__file' && !(key in newComp)) {
|
|
1518
|
-
delete oldComp[key];
|
|
1519
|
-
}
|
|
1522
|
+
if (oldComp !== record.initialDef) {
|
|
1523
|
+
updateComponentDef(oldComp, newComp);
|
|
1520
1524
|
}
|
|
1521
1525
|
// 2. mark definition dirty. This forces the renderer to replace the
|
|
1522
1526
|
// component on patch.
|
|
@@ -1562,6 +1566,14 @@ function reload(id, newComp) {
|
|
|
1562
1566
|
}
|
|
1563
1567
|
});
|
|
1564
1568
|
}
|
|
1569
|
+
function updateComponentDef(oldComp, newComp) {
|
|
1570
|
+
extend(oldComp, newComp);
|
|
1571
|
+
for (const key in oldComp) {
|
|
1572
|
+
if (key !== '__file' && !(key in newComp)) {
|
|
1573
|
+
delete oldComp[key];
|
|
1574
|
+
}
|
|
1575
|
+
}
|
|
1576
|
+
}
|
|
1565
1577
|
function tryWrap(fn) {
|
|
1566
1578
|
return (id, arg) => {
|
|
1567
1579
|
try {
|
|
@@ -1577,27 +1589,52 @@ function tryWrap(fn) {
|
|
|
1577
1589
|
|
|
1578
1590
|
let devtools;
|
|
1579
1591
|
let buffer = [];
|
|
1592
|
+
let devtoolsNotInstalled = false;
|
|
1580
1593
|
function emit(event, ...args) {
|
|
1581
1594
|
if (devtools) {
|
|
1582
1595
|
devtools.emit(event, ...args);
|
|
1583
1596
|
}
|
|
1584
|
-
else {
|
|
1597
|
+
else if (!devtoolsNotInstalled) {
|
|
1585
1598
|
buffer.push({ event, args });
|
|
1586
1599
|
}
|
|
1587
1600
|
}
|
|
1588
1601
|
function setDevtoolsHook(hook, target) {
|
|
1602
|
+
var _a, _b;
|
|
1589
1603
|
devtools = hook;
|
|
1590
1604
|
if (devtools) {
|
|
1591
1605
|
devtools.enabled = true;
|
|
1592
1606
|
buffer.forEach(({ event, args }) => devtools.emit(event, ...args));
|
|
1593
1607
|
buffer = [];
|
|
1594
1608
|
}
|
|
1595
|
-
else
|
|
1609
|
+
else if (
|
|
1610
|
+
// handle late devtools injection - only do this if we are in an actual
|
|
1611
|
+
// browser environment to avoid the timer handle stalling test runner exit
|
|
1612
|
+
// (#4815)
|
|
1613
|
+
// eslint-disable-next-line no-restricted-globals
|
|
1614
|
+
typeof window !== 'undefined' &&
|
|
1615
|
+
// some envs mock window but not fully
|
|
1616
|
+
window.HTMLElement &&
|
|
1617
|
+
// also exclude jsdom
|
|
1618
|
+
!((_b = (_a = window.navigator) === null || _a === void 0 ? void 0 : _a.userAgent) === null || _b === void 0 ? void 0 : _b.includes('jsdom'))) {
|
|
1596
1619
|
const replay = (target.__VUE_DEVTOOLS_HOOK_REPLAY__ =
|
|
1597
1620
|
target.__VUE_DEVTOOLS_HOOK_REPLAY__ || []);
|
|
1598
1621
|
replay.push((newHook) => {
|
|
1599
1622
|
setDevtoolsHook(newHook, target);
|
|
1600
1623
|
});
|
|
1624
|
+
// clear buffer after 3s - the user probably doesn't have devtools installed
|
|
1625
|
+
// at all, and keeping the buffer will cause memory leaks (#4738)
|
|
1626
|
+
setTimeout(() => {
|
|
1627
|
+
if (!devtools) {
|
|
1628
|
+
target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null;
|
|
1629
|
+
devtoolsNotInstalled = true;
|
|
1630
|
+
buffer = [];
|
|
1631
|
+
}
|
|
1632
|
+
}, 3000);
|
|
1633
|
+
}
|
|
1634
|
+
else {
|
|
1635
|
+
// non-browser env, assume not installed
|
|
1636
|
+
devtoolsNotInstalled = true;
|
|
1637
|
+
buffer = [];
|
|
1601
1638
|
}
|
|
1602
1639
|
}
|
|
1603
1640
|
function devtoolsInitApp(app, version) {
|
|
@@ -3216,7 +3253,9 @@ const BaseTransitionImpl = {
|
|
|
3216
3253
|
const rawProps = toRaw(props);
|
|
3217
3254
|
const { mode } = rawProps;
|
|
3218
3255
|
// check mode
|
|
3219
|
-
if ((process.env.NODE_ENV !== 'production') &&
|
|
3256
|
+
if ((process.env.NODE_ENV !== 'production') &&
|
|
3257
|
+
mode &&
|
|
3258
|
+
mode !== 'in-out' && mode !== 'out-in' && mode !== 'default') {
|
|
3220
3259
|
warn$1(`invalid <transition> mode: ${mode}`);
|
|
3221
3260
|
}
|
|
3222
3261
|
// at this point children has a guaranteed length of 1.
|
|
@@ -3862,7 +3901,7 @@ function registerKeepAliveHook(hook, type, target = currentInstance) {
|
|
|
3862
3901
|
}
|
|
3863
3902
|
current = current.parent;
|
|
3864
3903
|
}
|
|
3865
|
-
hook();
|
|
3904
|
+
return hook();
|
|
3866
3905
|
});
|
|
3867
3906
|
injectHook(type, wrappedHook, target);
|
|
3868
3907
|
// In addition to registering it on the target instance, we walk up the parent
|
|
@@ -5095,7 +5134,7 @@ return withDirectives(h(comp), [
|
|
|
5095
5134
|
[bar, this.y]
|
|
5096
5135
|
])
|
|
5097
5136
|
*/
|
|
5098
|
-
const isBuiltInDirective = /*#__PURE__*/ makeMap('bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text');
|
|
5137
|
+
const isBuiltInDirective = /*#__PURE__*/ makeMap('bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo');
|
|
5099
5138
|
function validateDirectiveName(name) {
|
|
5100
5139
|
if (isBuiltInDirective(name)) {
|
|
5101
5140
|
warn$1('Do not use built-in directive ids as custom directive id: ' + name);
|
|
@@ -5230,7 +5269,7 @@ function createCompatVue(createApp, createSingletonApp) {
|
|
|
5230
5269
|
return vm;
|
|
5231
5270
|
}
|
|
5232
5271
|
}
|
|
5233
|
-
Vue.version = "3.2.
|
|
5272
|
+
Vue.version = "3.2.23";
|
|
5234
5273
|
Vue.config = singletonApp.config;
|
|
5235
5274
|
Vue.use = (p, ...options) => {
|
|
5236
5275
|
if (p && isFunction(p.install)) {
|
|
@@ -6727,7 +6766,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6727
6766
|
}
|
|
6728
6767
|
};
|
|
6729
6768
|
const mountComponent = (initialVNode, container, anchor, parentComponent, parentSuspense, isSVG, optimized) => {
|
|
6730
|
-
// 2.x compat may pre-
|
|
6769
|
+
// 2.x compat may pre-create the component instance before actually
|
|
6731
6770
|
// mounting
|
|
6732
6771
|
const compatMountInstance = initialVNode.isCompatRoot && initialVNode.component;
|
|
6733
6772
|
const instance = compatMountInstance ||
|
|
@@ -7607,8 +7646,8 @@ function invokeVNodeHook(hook, instance, vnode, prevVNode = null) {
|
|
|
7607
7646
|
*
|
|
7608
7647
|
* #2080
|
|
7609
7648
|
* Inside keyed `template` fragment static children, if a fragment is moved,
|
|
7610
|
-
* the children will always moved
|
|
7611
|
-
*
|
|
7649
|
+
* the children will always be moved. Therefore, in order to ensure correct move
|
|
7650
|
+
* position, el should be inherited from previous nodes.
|
|
7612
7651
|
*/
|
|
7613
7652
|
function traverseStaticChildren(n1, n2, shallow = false) {
|
|
7614
7653
|
const ch1 = n1.children;
|
|
@@ -8740,7 +8779,8 @@ function mergeProps(...args) {
|
|
|
8740
8779
|
else if (isOn(key)) {
|
|
8741
8780
|
const existing = ret[key];
|
|
8742
8781
|
const incoming = toMerge[key];
|
|
8743
|
-
if (existing !== incoming
|
|
8782
|
+
if (existing !== incoming &&
|
|
8783
|
+
!(isArray(existing) && existing.includes(incoming))) {
|
|
8744
8784
|
ret[key] = existing
|
|
8745
8785
|
? [].concat(existing, incoming)
|
|
8746
8786
|
: incoming;
|
|
@@ -9185,23 +9225,23 @@ const PublicInstanceProxyHandlers = {
|
|
|
9185
9225
|
const n = accessCache[key];
|
|
9186
9226
|
if (n !== undefined) {
|
|
9187
9227
|
switch (n) {
|
|
9188
|
-
case
|
|
9228
|
+
case 1 /* SETUP */:
|
|
9189
9229
|
return setupState[key];
|
|
9190
|
-
case
|
|
9230
|
+
case 2 /* DATA */:
|
|
9191
9231
|
return data[key];
|
|
9192
|
-
case
|
|
9232
|
+
case 4 /* CONTEXT */:
|
|
9193
9233
|
return ctx[key];
|
|
9194
|
-
case
|
|
9234
|
+
case 3 /* PROPS */:
|
|
9195
9235
|
return props[key];
|
|
9196
9236
|
// default: just fallthrough
|
|
9197
9237
|
}
|
|
9198
9238
|
}
|
|
9199
9239
|
else if (setupState !== EMPTY_OBJ && hasOwn(setupState, key)) {
|
|
9200
|
-
accessCache[key] =
|
|
9240
|
+
accessCache[key] = 1 /* SETUP */;
|
|
9201
9241
|
return setupState[key];
|
|
9202
9242
|
}
|
|
9203
9243
|
else if (data !== EMPTY_OBJ && hasOwn(data, key)) {
|
|
9204
|
-
accessCache[key] =
|
|
9244
|
+
accessCache[key] = 2 /* DATA */;
|
|
9205
9245
|
return data[key];
|
|
9206
9246
|
}
|
|
9207
9247
|
else if (
|
|
@@ -9209,15 +9249,15 @@ const PublicInstanceProxyHandlers = {
|
|
|
9209
9249
|
// props
|
|
9210
9250
|
(normalizedProps = instance.propsOptions[0]) &&
|
|
9211
9251
|
hasOwn(normalizedProps, key)) {
|
|
9212
|
-
accessCache[key] =
|
|
9252
|
+
accessCache[key] = 3 /* PROPS */;
|
|
9213
9253
|
return props[key];
|
|
9214
9254
|
}
|
|
9215
9255
|
else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {
|
|
9216
|
-
accessCache[key] =
|
|
9256
|
+
accessCache[key] = 4 /* CONTEXT */;
|
|
9217
9257
|
return ctx[key];
|
|
9218
9258
|
}
|
|
9219
9259
|
else if (!__VUE_OPTIONS_API__ || shouldCacheAccess) {
|
|
9220
|
-
accessCache[key] =
|
|
9260
|
+
accessCache[key] = 0 /* OTHER */;
|
|
9221
9261
|
}
|
|
9222
9262
|
}
|
|
9223
9263
|
const publicGetter = publicPropertiesMap[key];
|
|
@@ -9238,7 +9278,7 @@ const PublicInstanceProxyHandlers = {
|
|
|
9238
9278
|
}
|
|
9239
9279
|
else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {
|
|
9240
9280
|
// user may set custom properties to `this` that start with `$`
|
|
9241
|
-
accessCache[key] =
|
|
9281
|
+
accessCache[key] = 4 /* CONTEXT */;
|
|
9242
9282
|
return ctx[key];
|
|
9243
9283
|
}
|
|
9244
9284
|
else if (
|
|
@@ -9309,7 +9349,7 @@ const PublicInstanceProxyHandlers = {
|
|
|
9309
9349
|
},
|
|
9310
9350
|
has({ _: { data, setupState, accessCache, ctx, appContext, propsOptions } }, key) {
|
|
9311
9351
|
let normalizedProps;
|
|
9312
|
-
return (accessCache[key]
|
|
9352
|
+
return (!!accessCache[key] ||
|
|
9313
9353
|
(data !== EMPTY_OBJ && hasOwn(data, key)) ||
|
|
9314
9354
|
(setupState !== EMPTY_OBJ && hasOwn(setupState, key)) ||
|
|
9315
9355
|
((normalizedProps = propsOptions[0]) && hasOwn(normalizedProps, key)) ||
|
|
@@ -10602,15 +10642,21 @@ function getContext() {
|
|
|
10602
10642
|
* only.
|
|
10603
10643
|
* @internal
|
|
10604
10644
|
*/
|
|
10605
|
-
function mergeDefaults(
|
|
10606
|
-
|
|
10607
|
-
|
|
10645
|
+
function mergeDefaults(raw, defaults) {
|
|
10646
|
+
const props = isArray(raw)
|
|
10647
|
+
? raw.reduce((normalized, p) => ((normalized[p] = {}), normalized), {})
|
|
10648
|
+
: raw;
|
|
10608
10649
|
for (const key in defaults) {
|
|
10609
|
-
const
|
|
10610
|
-
if (
|
|
10611
|
-
|
|
10650
|
+
const opt = props[key];
|
|
10651
|
+
if (opt) {
|
|
10652
|
+
if (isArray(opt) || isFunction(opt)) {
|
|
10653
|
+
props[key] = { type: opt, default: defaults[key] };
|
|
10654
|
+
}
|
|
10655
|
+
else {
|
|
10656
|
+
opt.default = defaults[key];
|
|
10657
|
+
}
|
|
10612
10658
|
}
|
|
10613
|
-
else if (
|
|
10659
|
+
else if (opt === null) {
|
|
10614
10660
|
props[key] = { default: defaults[key] };
|
|
10615
10661
|
}
|
|
10616
10662
|
else if ((process.env.NODE_ENV !== 'production')) {
|
|
@@ -10619,6 +10665,23 @@ props, defaults) {
|
|
|
10619
10665
|
}
|
|
10620
10666
|
return props;
|
|
10621
10667
|
}
|
|
10668
|
+
/**
|
|
10669
|
+
* Used to create a proxy for the rest element when destructuring props with
|
|
10670
|
+
* defineProps().
|
|
10671
|
+
* @internal
|
|
10672
|
+
*/
|
|
10673
|
+
function createPropsRestProxy(props, excludedKeys) {
|
|
10674
|
+
const ret = {};
|
|
10675
|
+
for (const key in props) {
|
|
10676
|
+
if (!excludedKeys.includes(key)) {
|
|
10677
|
+
Object.defineProperty(ret, key, {
|
|
10678
|
+
enumerable: true,
|
|
10679
|
+
get: () => props[key]
|
|
10680
|
+
});
|
|
10681
|
+
}
|
|
10682
|
+
}
|
|
10683
|
+
return ret;
|
|
10684
|
+
}
|
|
10622
10685
|
/**
|
|
10623
10686
|
* `<script setup>` helper for persisting the current instance context over
|
|
10624
10687
|
* async/await flows.
|
|
@@ -10911,7 +10974,7 @@ function isMemoSame(cached, memo) {
|
|
|
10911
10974
|
}
|
|
10912
10975
|
|
|
10913
10976
|
// Core API ------------------------------------------------------------------
|
|
10914
|
-
const version = "3.2.
|
|
10977
|
+
const version = "3.2.23";
|
|
10915
10978
|
const _ssrUtils = {
|
|
10916
10979
|
createComponentInstance,
|
|
10917
10980
|
setupComponent,
|
|
@@ -11048,16 +11111,8 @@ function patchClass(el, value, isSVG) {
|
|
|
11048
11111
|
|
|
11049
11112
|
function patchStyle(el, prev, next) {
|
|
11050
11113
|
const style = el.style;
|
|
11051
|
-
const
|
|
11052
|
-
if (!
|
|
11053
|
-
el.removeAttribute('style');
|
|
11054
|
-
}
|
|
11055
|
-
else if (isString(next)) {
|
|
11056
|
-
if (prev !== next) {
|
|
11057
|
-
style.cssText = next;
|
|
11058
|
-
}
|
|
11059
|
-
}
|
|
11060
|
-
else {
|
|
11114
|
+
const isCssString = isString(next);
|
|
11115
|
+
if (next && !isCssString) {
|
|
11061
11116
|
for (const key in next) {
|
|
11062
11117
|
setStyle(style, key, next[key]);
|
|
11063
11118
|
}
|
|
@@ -11069,11 +11124,22 @@ function patchStyle(el, prev, next) {
|
|
|
11069
11124
|
}
|
|
11070
11125
|
}
|
|
11071
11126
|
}
|
|
11072
|
-
|
|
11073
|
-
|
|
11074
|
-
|
|
11075
|
-
|
|
11076
|
-
|
|
11127
|
+
else {
|
|
11128
|
+
const currentDisplay = style.display;
|
|
11129
|
+
if (isCssString) {
|
|
11130
|
+
if (prev !== next) {
|
|
11131
|
+
style.cssText = next;
|
|
11132
|
+
}
|
|
11133
|
+
}
|
|
11134
|
+
else if (prev) {
|
|
11135
|
+
el.removeAttribute('style');
|
|
11136
|
+
}
|
|
11137
|
+
// indicates that the `display` of the element is controlled by `v-show`,
|
|
11138
|
+
// so we always keep the current `display` value regardless of the `style`
|
|
11139
|
+
// value, thus handing over control to `v-show`.
|
|
11140
|
+
if ('_vod' in el) {
|
|
11141
|
+
style.display = currentDisplay;
|
|
11142
|
+
}
|
|
11077
11143
|
}
|
|
11078
11144
|
}
|
|
11079
11145
|
const importantRE = /\s*!important$/;
|
|
@@ -11183,12 +11249,19 @@ prevChildren, parentComponent, parentSuspense, unmountChildren) {
|
|
|
11183
11249
|
el[key] = value == null ? '' : value;
|
|
11184
11250
|
return;
|
|
11185
11251
|
}
|
|
11186
|
-
if (key === 'value' &&
|
|
11252
|
+
if (key === 'value' &&
|
|
11253
|
+
el.tagName !== 'PROGRESS' &&
|
|
11254
|
+
// custom elements may use _value internally
|
|
11255
|
+
!el.tagName.includes('-')) {
|
|
11187
11256
|
// store value as _value as well since
|
|
11188
11257
|
// non-string values will be stringified.
|
|
11189
11258
|
el._value = value;
|
|
11190
11259
|
const newValue = value == null ? '' : value;
|
|
11191
|
-
if (el.value !== newValue
|
|
11260
|
+
if (el.value !== newValue ||
|
|
11261
|
+
// #4956: always set for OPTION elements because its value falls back to
|
|
11262
|
+
// textContent if no value attribute is present. And setting .value for
|
|
11263
|
+
// OPTION has no side effect
|
|
11264
|
+
el.tagName === 'OPTION') {
|
|
11192
11265
|
el.value = newValue;
|
|
11193
11266
|
}
|
|
11194
11267
|
if (value == null) {
|
|
@@ -11457,22 +11530,11 @@ class VueElement extends BaseClass {
|
|
|
11457
11530
|
}
|
|
11458
11531
|
this.attachShadow({ mode: 'open' });
|
|
11459
11532
|
}
|
|
11460
|
-
// set initial attrs
|
|
11461
|
-
for (let i = 0; i < this.attributes.length; i++) {
|
|
11462
|
-
this._setAttr(this.attributes[i].name);
|
|
11463
|
-
}
|
|
11464
|
-
// watch future attr changes
|
|
11465
|
-
new MutationObserver(mutations => {
|
|
11466
|
-
for (const m of mutations) {
|
|
11467
|
-
this._setAttr(m.attributeName);
|
|
11468
|
-
}
|
|
11469
|
-
}).observe(this, { attributes: true });
|
|
11470
11533
|
}
|
|
11471
11534
|
connectedCallback() {
|
|
11472
11535
|
this._connected = true;
|
|
11473
11536
|
if (!this._instance) {
|
|
11474
11537
|
this._resolveDef();
|
|
11475
|
-
this._update();
|
|
11476
11538
|
}
|
|
11477
11539
|
}
|
|
11478
11540
|
disconnectedCallback() {
|
|
@@ -11491,8 +11553,18 @@ class VueElement extends BaseClass {
|
|
|
11491
11553
|
if (this._resolved) {
|
|
11492
11554
|
return;
|
|
11493
11555
|
}
|
|
11556
|
+
this._resolved = true;
|
|
11557
|
+
// set initial attrs
|
|
11558
|
+
for (let i = 0; i < this.attributes.length; i++) {
|
|
11559
|
+
this._setAttr(this.attributes[i].name);
|
|
11560
|
+
}
|
|
11561
|
+
// watch future attr changes
|
|
11562
|
+
new MutationObserver(mutations => {
|
|
11563
|
+
for (const m of mutations) {
|
|
11564
|
+
this._setAttr(m.attributeName);
|
|
11565
|
+
}
|
|
11566
|
+
}).observe(this, { attributes: true });
|
|
11494
11567
|
const resolve = (def) => {
|
|
11495
|
-
this._resolved = true;
|
|
11496
11568
|
const { props, styles } = def;
|
|
11497
11569
|
const hasOptions = !isArray(props);
|
|
11498
11570
|
const rawKeys = props ? (hasOptions ? Object.keys(props) : props) : [];
|
|
@@ -11507,14 +11579,11 @@ class VueElement extends BaseClass {
|
|
|
11507
11579
|
}
|
|
11508
11580
|
}
|
|
11509
11581
|
}
|
|
11510
|
-
|
|
11511
|
-
this._numberProps = numberProps;
|
|
11512
|
-
this._update();
|
|
11513
|
-
}
|
|
11582
|
+
this._numberProps = numberProps;
|
|
11514
11583
|
// check if there are props set pre-upgrade or connect
|
|
11515
11584
|
for (const key of Object.keys(this)) {
|
|
11516
11585
|
if (key[0] !== '_') {
|
|
11517
|
-
this._setProp(key, this[key]);
|
|
11586
|
+
this._setProp(key, this[key], true, false);
|
|
11518
11587
|
}
|
|
11519
11588
|
}
|
|
11520
11589
|
// defining getter/setters on prototype
|
|
@@ -11528,7 +11597,10 @@ class VueElement extends BaseClass {
|
|
|
11528
11597
|
}
|
|
11529
11598
|
});
|
|
11530
11599
|
}
|
|
11600
|
+
// apply CSS
|
|
11531
11601
|
this._applyStyles(styles);
|
|
11602
|
+
// initial render
|
|
11603
|
+
this._update();
|
|
11532
11604
|
};
|
|
11533
11605
|
const asyncDef = this._def.__asyncLoader;
|
|
11534
11606
|
if (asyncDef) {
|
|
@@ -11554,10 +11626,10 @@ class VueElement extends BaseClass {
|
|
|
11554
11626
|
/**
|
|
11555
11627
|
* @internal
|
|
11556
11628
|
*/
|
|
11557
|
-
_setProp(key, val, shouldReflect = true) {
|
|
11629
|
+
_setProp(key, val, shouldReflect = true, shouldUpdate = true) {
|
|
11558
11630
|
if (val !== this._props[key]) {
|
|
11559
11631
|
this._props[key] = val;
|
|
11560
|
-
if (this._instance) {
|
|
11632
|
+
if (shouldUpdate && this._instance) {
|
|
11561
11633
|
this._update();
|
|
11562
11634
|
}
|
|
11563
11635
|
// reflect
|
|
@@ -12800,6 +12872,7 @@ var runtimeDom = /*#__PURE__*/Object.freeze({
|
|
|
12800
12872
|
defineExpose: defineExpose,
|
|
12801
12873
|
withDefaults: withDefaults,
|
|
12802
12874
|
mergeDefaults: mergeDefaults,
|
|
12875
|
+
createPropsRestProxy: createPropsRestProxy,
|
|
12803
12876
|
withAsyncContext: withAsyncContext,
|
|
12804
12877
|
getCurrentInstance: getCurrentInstance,
|
|
12805
12878
|
h: h,
|
|
@@ -12916,4 +12989,4 @@ Vue.compile = (() => {
|
|
|
12916
12989
|
const { configureCompat: configureCompat$1 } = Vue;
|
|
12917
12990
|
|
|
12918
12991
|
export default Vue;
|
|
12919
|
-
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 };
|
|
12992
|
+
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 };
|