@vue/runtime-dom 3.2.27 → 3.2.31
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/runtime-dom.cjs.js +5 -2
- package/dist/runtime-dom.cjs.prod.js +5 -2
- package/dist/runtime-dom.esm-browser.js +136 -103
- package/dist/runtime-dom.esm-browser.prod.js +1 -1
- package/dist/runtime-dom.esm-bundler.js +5 -2
- package/dist/runtime-dom.global.js +136 -102
- package/dist/runtime-dom.global.prod.js +1 -1
- package/package.json +6 -6
|
@@ -135,7 +135,15 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
135
135
|
'mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,' +
|
|
136
136
|
'polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,' +
|
|
137
137
|
'text,textPath,title,tspan,unknown,use,view';
|
|
138
|
+
/**
|
|
139
|
+
* Compiler only.
|
|
140
|
+
* Do NOT use in runtime code paths unless behind `true` flag.
|
|
141
|
+
*/
|
|
138
142
|
const isHTMLTag = /*#__PURE__*/ makeMap(HTML_TAGS);
|
|
143
|
+
/**
|
|
144
|
+
* Compiler only.
|
|
145
|
+
* Do NOT use in runtime code paths unless behind `true` flag.
|
|
146
|
+
*/
|
|
139
147
|
const isSVGTag = /*#__PURE__*/ makeMap(SVG_TAGS);
|
|
140
148
|
|
|
141
149
|
function looseCompareArrays(a, b) {
|
|
@@ -193,13 +201,15 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
193
201
|
* @private
|
|
194
202
|
*/
|
|
195
203
|
const toDisplayString = (val) => {
|
|
196
|
-
return val
|
|
197
|
-
?
|
|
198
|
-
:
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
204
|
+
return isString(val)
|
|
205
|
+
? val
|
|
206
|
+
: val == null
|
|
207
|
+
? ''
|
|
208
|
+
: isArray(val) ||
|
|
209
|
+
(isObject(val) &&
|
|
210
|
+
(val.toString === objectToString || !isFunction(val.toString)))
|
|
211
|
+
? JSON.stringify(val, replacer, 2)
|
|
212
|
+
: String(val);
|
|
203
213
|
};
|
|
204
214
|
const replacer = (_key, val) => {
|
|
205
215
|
// can't use isRef here since @vue/shared has no deps
|
|
@@ -273,6 +283,7 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
273
283
|
'onVnodeBeforeMount,onVnodeMounted,' +
|
|
274
284
|
'onVnodeBeforeUpdate,onVnodeUpdated,' +
|
|
275
285
|
'onVnodeBeforeUnmount,onVnodeUnmounted');
|
|
286
|
+
const isBuiltInDirective = /*#__PURE__*/ makeMap('bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo');
|
|
276
287
|
const cacheStringFunction = (fn) => {
|
|
277
288
|
const cache = Object.create(null);
|
|
278
289
|
return ((str) => {
|
|
@@ -338,7 +349,6 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
338
349
|
}
|
|
339
350
|
|
|
340
351
|
let activeEffectScope;
|
|
341
|
-
const effectScopeStack = [];
|
|
342
352
|
class EffectScope {
|
|
343
353
|
constructor(detached = false) {
|
|
344
354
|
this.active = true;
|
|
@@ -353,11 +363,11 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
353
363
|
run(fn) {
|
|
354
364
|
if (this.active) {
|
|
355
365
|
try {
|
|
356
|
-
this
|
|
366
|
+
activeEffectScope = this;
|
|
357
367
|
return fn();
|
|
358
368
|
}
|
|
359
369
|
finally {
|
|
360
|
-
this.
|
|
370
|
+
activeEffectScope = this.parent;
|
|
361
371
|
}
|
|
362
372
|
}
|
|
363
373
|
else {
|
|
@@ -365,23 +375,24 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
365
375
|
}
|
|
366
376
|
}
|
|
367
377
|
on() {
|
|
368
|
-
|
|
369
|
-
effectScopeStack.push(this);
|
|
370
|
-
activeEffectScope = this;
|
|
371
|
-
}
|
|
378
|
+
activeEffectScope = this;
|
|
372
379
|
}
|
|
373
380
|
off() {
|
|
374
|
-
|
|
375
|
-
effectScopeStack.pop();
|
|
376
|
-
activeEffectScope = effectScopeStack[effectScopeStack.length - 1];
|
|
377
|
-
}
|
|
381
|
+
activeEffectScope = this.parent;
|
|
378
382
|
}
|
|
379
383
|
stop(fromParent) {
|
|
380
384
|
if (this.active) {
|
|
381
|
-
|
|
382
|
-
this.
|
|
385
|
+
let i, l;
|
|
386
|
+
for (i = 0, l = this.effects.length; i < l; i++) {
|
|
387
|
+
this.effects[i].stop();
|
|
388
|
+
}
|
|
389
|
+
for (i = 0, l = this.cleanups.length; i < l; i++) {
|
|
390
|
+
this.cleanups[i]();
|
|
391
|
+
}
|
|
383
392
|
if (this.scopes) {
|
|
384
|
-
this.scopes.
|
|
393
|
+
for (i = 0, l = this.scopes.length; i < l; i++) {
|
|
394
|
+
this.scopes[i].stop(true);
|
|
395
|
+
}
|
|
385
396
|
}
|
|
386
397
|
// nested scope, dereference from parent to avoid memory leaks
|
|
387
398
|
if (this.parent && !fromParent) {
|
|
@@ -399,8 +410,7 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
399
410
|
function effectScope(detached) {
|
|
400
411
|
return new EffectScope(detached);
|
|
401
412
|
}
|
|
402
|
-
function recordEffectScope(effect, scope) {
|
|
403
|
-
scope = scope || activeEffectScope;
|
|
413
|
+
function recordEffectScope(effect, scope = activeEffectScope) {
|
|
404
414
|
if (scope && scope.active) {
|
|
405
415
|
scope.effects.push(effect);
|
|
406
416
|
}
|
|
@@ -463,7 +473,6 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
463
473
|
* When recursion depth is greater, fall back to using a full cleanup.
|
|
464
474
|
*/
|
|
465
475
|
const maxMarkerBits = 30;
|
|
466
|
-
const effectStack = [];
|
|
467
476
|
let activeEffect;
|
|
468
477
|
const ITERATE_KEY = Symbol('iterate' );
|
|
469
478
|
const MAP_KEY_ITERATE_KEY = Symbol('Map key iterate' );
|
|
@@ -473,35 +482,42 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
473
482
|
this.scheduler = scheduler;
|
|
474
483
|
this.active = true;
|
|
475
484
|
this.deps = [];
|
|
485
|
+
this.parent = undefined;
|
|
476
486
|
recordEffectScope(this, scope);
|
|
477
487
|
}
|
|
478
488
|
run() {
|
|
479
489
|
if (!this.active) {
|
|
480
490
|
return this.fn();
|
|
481
491
|
}
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
if (effectTrackDepth <= maxMarkerBits) {
|
|
488
|
-
initDepMarkers(this);
|
|
489
|
-
}
|
|
490
|
-
else {
|
|
491
|
-
cleanupEffect(this);
|
|
492
|
-
}
|
|
493
|
-
return this.fn();
|
|
492
|
+
let parent = activeEffect;
|
|
493
|
+
let lastShouldTrack = shouldTrack;
|
|
494
|
+
while (parent) {
|
|
495
|
+
if (parent === this) {
|
|
496
|
+
return;
|
|
494
497
|
}
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
498
|
+
parent = parent.parent;
|
|
499
|
+
}
|
|
500
|
+
try {
|
|
501
|
+
this.parent = activeEffect;
|
|
502
|
+
activeEffect = this;
|
|
503
|
+
shouldTrack = true;
|
|
504
|
+
trackOpBit = 1 << ++effectTrackDepth;
|
|
505
|
+
if (effectTrackDepth <= maxMarkerBits) {
|
|
506
|
+
initDepMarkers(this);
|
|
507
|
+
}
|
|
508
|
+
else {
|
|
509
|
+
cleanupEffect(this);
|
|
504
510
|
}
|
|
511
|
+
return this.fn();
|
|
512
|
+
}
|
|
513
|
+
finally {
|
|
514
|
+
if (effectTrackDepth <= maxMarkerBits) {
|
|
515
|
+
finalizeDepMarkers(this);
|
|
516
|
+
}
|
|
517
|
+
trackOpBit = 1 << --effectTrackDepth;
|
|
518
|
+
activeEffect = this.parent;
|
|
519
|
+
shouldTrack = lastShouldTrack;
|
|
520
|
+
this.parent = undefined;
|
|
505
521
|
}
|
|
506
522
|
}
|
|
507
523
|
stop() {
|
|
@@ -549,32 +565,24 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
549
565
|
trackStack.push(shouldTrack);
|
|
550
566
|
shouldTrack = false;
|
|
551
567
|
}
|
|
552
|
-
function enableTracking() {
|
|
553
|
-
trackStack.push(shouldTrack);
|
|
554
|
-
shouldTrack = true;
|
|
555
|
-
}
|
|
556
568
|
function resetTracking() {
|
|
557
569
|
const last = trackStack.pop();
|
|
558
570
|
shouldTrack = last === undefined ? true : last;
|
|
559
571
|
}
|
|
560
572
|
function track(target, type, key) {
|
|
561
|
-
if (
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
573
|
+
if (shouldTrack && activeEffect) {
|
|
574
|
+
let depsMap = targetMap.get(target);
|
|
575
|
+
if (!depsMap) {
|
|
576
|
+
targetMap.set(target, (depsMap = new Map()));
|
|
577
|
+
}
|
|
578
|
+
let dep = depsMap.get(key);
|
|
579
|
+
if (!dep) {
|
|
580
|
+
depsMap.set(key, (dep = createDep()));
|
|
581
|
+
}
|
|
582
|
+
const eventInfo = { effect: activeEffect, target, type, key }
|
|
583
|
+
;
|
|
584
|
+
trackEffects(dep, eventInfo);
|
|
571
585
|
}
|
|
572
|
-
const eventInfo = { effect: activeEffect, target, type, key }
|
|
573
|
-
;
|
|
574
|
-
trackEffects(dep, eventInfo);
|
|
575
|
-
}
|
|
576
|
-
function isTracking() {
|
|
577
|
-
return shouldTrack && activeEffect !== undefined;
|
|
578
586
|
}
|
|
579
587
|
function trackEffects(dep, debuggerEventExtraInfo) {
|
|
580
588
|
let shouldTrack = false;
|
|
@@ -735,6 +743,9 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
735
743
|
else if (key === "__v_isReadonly" /* IS_READONLY */) {
|
|
736
744
|
return isReadonly;
|
|
737
745
|
}
|
|
746
|
+
else if (key === "__v_isShallow" /* IS_SHALLOW */) {
|
|
747
|
+
return shallow;
|
|
748
|
+
}
|
|
738
749
|
else if (key === "__v_raw" /* RAW */ &&
|
|
739
750
|
receiver ===
|
|
740
751
|
(isReadonly
|
|
@@ -779,9 +790,14 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
779
790
|
function createSetter(shallow = false) {
|
|
780
791
|
return function set(target, key, value, receiver) {
|
|
781
792
|
let oldValue = target[key];
|
|
793
|
+
if (isReadonly(oldValue) && isRef(oldValue) && !isRef(value)) {
|
|
794
|
+
return false;
|
|
795
|
+
}
|
|
782
796
|
if (!shallow && !isReadonly(value)) {
|
|
783
|
-
|
|
784
|
-
|
|
797
|
+
if (!isShallow(value)) {
|
|
798
|
+
value = toRaw(value);
|
|
799
|
+
oldValue = toRaw(oldValue);
|
|
800
|
+
}
|
|
785
801
|
if (!isArray(target) && isRef(oldValue) && !isRef(value)) {
|
|
786
802
|
oldValue.value = value;
|
|
787
803
|
return true;
|
|
@@ -1168,7 +1184,7 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
1168
1184
|
}
|
|
1169
1185
|
function reactive(target) {
|
|
1170
1186
|
// if trying to observe a readonly proxy, return the readonly version.
|
|
1171
|
-
if (target
|
|
1187
|
+
if (isReadonly(target)) {
|
|
1172
1188
|
return target;
|
|
1173
1189
|
}
|
|
1174
1190
|
return createReactiveObject(target, false, mutableHandlers, mutableCollectionHandlers, reactiveMap);
|
|
@@ -1233,6 +1249,9 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
1233
1249
|
function isReadonly(value) {
|
|
1234
1250
|
return !!(value && value["__v_isReadonly" /* IS_READONLY */]);
|
|
1235
1251
|
}
|
|
1252
|
+
function isShallow(value) {
|
|
1253
|
+
return !!(value && value["__v_isShallow" /* IS_SHALLOW */]);
|
|
1254
|
+
}
|
|
1236
1255
|
function isProxy(value) {
|
|
1237
1256
|
return isReactive(value) || isReadonly(value);
|
|
1238
1257
|
}
|
|
@@ -1248,13 +1267,10 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
1248
1267
|
const toReadonly = (value) => isObject(value) ? readonly(value) : value;
|
|
1249
1268
|
|
|
1250
1269
|
function trackRefValue(ref) {
|
|
1251
|
-
if (
|
|
1270
|
+
if (shouldTrack && activeEffect) {
|
|
1252
1271
|
ref = toRaw(ref);
|
|
1253
|
-
if (!ref.dep) {
|
|
1254
|
-
ref.dep = createDep();
|
|
1255
|
-
}
|
|
1256
1272
|
{
|
|
1257
|
-
trackEffects(ref.dep, {
|
|
1273
|
+
trackEffects(ref.dep || (ref.dep = createDep()), {
|
|
1258
1274
|
target: ref,
|
|
1259
1275
|
type: "get" /* GET */,
|
|
1260
1276
|
key: 'value'
|
|
@@ -1276,7 +1292,7 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
1276
1292
|
}
|
|
1277
1293
|
}
|
|
1278
1294
|
function isRef(r) {
|
|
1279
|
-
return
|
|
1295
|
+
return !!(r && r.__v_isRef === true);
|
|
1280
1296
|
}
|
|
1281
1297
|
function ref(value) {
|
|
1282
1298
|
return createRef(value, false);
|
|
@@ -1291,22 +1307,22 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
1291
1307
|
return new RefImpl(rawValue, shallow);
|
|
1292
1308
|
}
|
|
1293
1309
|
class RefImpl {
|
|
1294
|
-
constructor(value,
|
|
1295
|
-
this.
|
|
1310
|
+
constructor(value, __v_isShallow) {
|
|
1311
|
+
this.__v_isShallow = __v_isShallow;
|
|
1296
1312
|
this.dep = undefined;
|
|
1297
1313
|
this.__v_isRef = true;
|
|
1298
|
-
this._rawValue =
|
|
1299
|
-
this._value =
|
|
1314
|
+
this._rawValue = __v_isShallow ? value : toRaw(value);
|
|
1315
|
+
this._value = __v_isShallow ? value : toReactive(value);
|
|
1300
1316
|
}
|
|
1301
1317
|
get value() {
|
|
1302
1318
|
trackRefValue(this);
|
|
1303
1319
|
return this._value;
|
|
1304
1320
|
}
|
|
1305
1321
|
set value(newVal) {
|
|
1306
|
-
newVal = this.
|
|
1322
|
+
newVal = this.__v_isShallow ? newVal : toRaw(newVal);
|
|
1307
1323
|
if (hasChanged(newVal, this._rawValue)) {
|
|
1308
1324
|
this._rawValue = newVal;
|
|
1309
|
-
this._value = this.
|
|
1325
|
+
this._value = this.__v_isShallow ? newVal : toReactive(newVal);
|
|
1310
1326
|
triggerRefValue(this, newVal);
|
|
1311
1327
|
}
|
|
1312
1328
|
}
|
|
@@ -1389,22 +1405,23 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
1389
1405
|
constructor(getter, _setter, isReadonly, isSSR) {
|
|
1390
1406
|
this._setter = _setter;
|
|
1391
1407
|
this.dep = undefined;
|
|
1392
|
-
this._dirty = true;
|
|
1393
1408
|
this.__v_isRef = true;
|
|
1409
|
+
this._dirty = true;
|
|
1394
1410
|
this.effect = new ReactiveEffect(getter, () => {
|
|
1395
1411
|
if (!this._dirty) {
|
|
1396
1412
|
this._dirty = true;
|
|
1397
1413
|
triggerRefValue(this);
|
|
1398
1414
|
}
|
|
1399
1415
|
});
|
|
1400
|
-
this.effect.
|
|
1416
|
+
this.effect.computed = this;
|
|
1417
|
+
this.effect.active = this._cacheable = !isSSR;
|
|
1401
1418
|
this["__v_isReadonly" /* IS_READONLY */] = isReadonly;
|
|
1402
1419
|
}
|
|
1403
1420
|
get value() {
|
|
1404
1421
|
// the computed ref may get wrapped by other proxies e.g. readonly() #3376
|
|
1405
1422
|
const self = toRaw(this);
|
|
1406
1423
|
trackRefValue(self);
|
|
1407
|
-
if (self._dirty) {
|
|
1424
|
+
if (self._dirty || !self._cacheable) {
|
|
1408
1425
|
self._dirty = false;
|
|
1409
1426
|
self._value = self.effect.run();
|
|
1410
1427
|
}
|
|
@@ -1581,7 +1598,7 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
1581
1598
|
[12 /* FUNCTION_REF */]: 'ref function',
|
|
1582
1599
|
[13 /* ASYNC_COMPONENT_LOADER */]: 'async component loader',
|
|
1583
1600
|
[14 /* SCHEDULER */]: 'scheduler flush. This is likely a Vue internals bug. ' +
|
|
1584
|
-
'Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/
|
|
1601
|
+
'Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/core'
|
|
1585
1602
|
};
|
|
1586
1603
|
function callWithErrorHandling(fn, instance, type, args) {
|
|
1587
1604
|
let res;
|
|
@@ -3042,7 +3059,7 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
3042
3059
|
if (instance) {
|
|
3043
3060
|
// #2400
|
|
3044
3061
|
// to support `app.use` plugins,
|
|
3045
|
-
// fallback to appContext's `provides` if the
|
|
3062
|
+
// fallback to appContext's `provides` if the instance is at root
|
|
3046
3063
|
const provides = instance.parent == null
|
|
3047
3064
|
? instance.vnode.appContext && instance.vnode.appContext.provides
|
|
3048
3065
|
: instance.parent.provides;
|
|
@@ -3108,7 +3125,7 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
3108
3125
|
let isMultiSource = false;
|
|
3109
3126
|
if (isRef(source)) {
|
|
3110
3127
|
getter = () => source.value;
|
|
3111
|
-
forceTrigger =
|
|
3128
|
+
forceTrigger = isShallow(source);
|
|
3112
3129
|
}
|
|
3113
3130
|
else if (isReactive(source)) {
|
|
3114
3131
|
getter = () => source;
|
|
@@ -3983,7 +4000,7 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
3983
4000
|
return pattern.some((p) => matches(p, name));
|
|
3984
4001
|
}
|
|
3985
4002
|
else if (isString(pattern)) {
|
|
3986
|
-
return pattern.split(',').
|
|
4003
|
+
return pattern.split(',').includes(name);
|
|
3987
4004
|
}
|
|
3988
4005
|
else if (pattern.test) {
|
|
3989
4006
|
return pattern.test(name);
|
|
@@ -4236,7 +4253,7 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
4236
4253
|
warn$1(`Write operation failed: computed property "${key}" is readonly.`);
|
|
4237
4254
|
}
|
|
4238
4255
|
;
|
|
4239
|
-
const c = computed({
|
|
4256
|
+
const c = computed$1({
|
|
4240
4257
|
get,
|
|
4241
4258
|
set
|
|
4242
4259
|
});
|
|
@@ -4635,7 +4652,9 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
4635
4652
|
// attrs point to the same object so it should already have been updated.
|
|
4636
4653
|
if (attrs !== rawCurrentProps) {
|
|
4637
4654
|
for (const key in attrs) {
|
|
4638
|
-
if (!rawProps ||
|
|
4655
|
+
if (!rawProps ||
|
|
4656
|
+
(!hasOwn(rawProps, key) &&
|
|
4657
|
+
(!false ))) {
|
|
4639
4658
|
delete attrs[key];
|
|
4640
4659
|
hasAttrsChanged = true;
|
|
4641
4660
|
}
|
|
@@ -5085,7 +5104,6 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
5085
5104
|
[bar, this.y]
|
|
5086
5105
|
])
|
|
5087
5106
|
*/
|
|
5088
|
-
const isBuiltInDirective = /*#__PURE__*/ makeMap('bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo');
|
|
5089
5107
|
function validateDirectiveName(name) {
|
|
5090
5108
|
if (isBuiltInDirective(name)) {
|
|
5091
5109
|
warn$1('Do not use built-in directive ids as custom directive id: ' + name);
|
|
@@ -5566,7 +5584,8 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
5566
5584
|
// e.g. <option :value="obj">, <input type="checkbox" :true-value="1">
|
|
5567
5585
|
const forcePatchValue = (type === 'input' && dirs) || type === 'option';
|
|
5568
5586
|
// skip props & children if this is hoisted static nodes
|
|
5569
|
-
|
|
5587
|
+
// #5405 in dev, always hydrate children for HMR
|
|
5588
|
+
{
|
|
5570
5589
|
if (dirs) {
|
|
5571
5590
|
invokeDirectiveHook(vnode, null, parentComponent, 'created');
|
|
5572
5591
|
}
|
|
@@ -5731,6 +5750,7 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
5731
5750
|
return [hydrate, hydrateNode];
|
|
5732
5751
|
}
|
|
5733
5752
|
|
|
5753
|
+
/* eslint-disable no-restricted-globals */
|
|
5734
5754
|
let supported;
|
|
5735
5755
|
let perf;
|
|
5736
5756
|
function startMeasure(instance, type) {
|
|
@@ -5758,7 +5778,6 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
5758
5778
|
if (supported !== undefined) {
|
|
5759
5779
|
return supported;
|
|
5760
5780
|
}
|
|
5761
|
-
/* eslint-disable no-restricted-globals */
|
|
5762
5781
|
if (typeof window !== 'undefined' && window.performance) {
|
|
5763
5782
|
supported = true;
|
|
5764
5783
|
perf = window.performance;
|
|
@@ -5766,7 +5785,6 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
5766
5785
|
else {
|
|
5767
5786
|
supported = false;
|
|
5768
5787
|
}
|
|
5769
|
-
/* eslint-enable no-restricted-globals */
|
|
5770
5788
|
return supported;
|
|
5771
5789
|
}
|
|
5772
5790
|
|
|
@@ -7643,7 +7661,7 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
7643
7661
|
shapeFlag: vnode.shapeFlag,
|
|
7644
7662
|
// if the vnode is cloned with extra props, we can no longer assume its
|
|
7645
7663
|
// existing patch flag to be reliable and need to add the FULL_PROPS flag.
|
|
7646
|
-
// note:
|
|
7664
|
+
// note: preserve flag for fragments since they use the flag for children
|
|
7647
7665
|
// fast paths only.
|
|
7648
7666
|
patchFlag: extraProps && vnode.type !== Fragment
|
|
7649
7667
|
? patchFlag === -1 // hoisted node
|
|
@@ -7805,7 +7823,8 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
7805
7823
|
else if (isOn(key)) {
|
|
7806
7824
|
const existing = ret[key];
|
|
7807
7825
|
const incoming = toMerge[key];
|
|
7808
|
-
if (
|
|
7826
|
+
if (incoming &&
|
|
7827
|
+
existing !== incoming &&
|
|
7809
7828
|
!(isArray(existing) && existing.includes(incoming))) {
|
|
7810
7829
|
ret[key] = existing
|
|
7811
7830
|
? [].concat(existing, incoming)
|
|
@@ -8100,9 +8119,11 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
8100
8119
|
const { data, setupState, ctx } = instance;
|
|
8101
8120
|
if (setupState !== EMPTY_OBJ && hasOwn(setupState, key)) {
|
|
8102
8121
|
setupState[key] = value;
|
|
8122
|
+
return true;
|
|
8103
8123
|
}
|
|
8104
8124
|
else if (data !== EMPTY_OBJ && hasOwn(data, key)) {
|
|
8105
8125
|
data[key] = value;
|
|
8126
|
+
return true;
|
|
8106
8127
|
}
|
|
8107
8128
|
else if (hasOwn(instance.props, key)) {
|
|
8108
8129
|
warn$1(`Attempting to mutate prop "${key}". Props are readonly.`, instance);
|
|
@@ -8136,6 +8157,15 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
8136
8157
|
hasOwn(ctx, key) ||
|
|
8137
8158
|
hasOwn(publicPropertiesMap, key) ||
|
|
8138
8159
|
hasOwn(appContext.config.globalProperties, key));
|
|
8160
|
+
},
|
|
8161
|
+
defineProperty(target, key, descriptor) {
|
|
8162
|
+
if (descriptor.get != null) {
|
|
8163
|
+
this.set(target, key, descriptor.get(), null);
|
|
8164
|
+
}
|
|
8165
|
+
else if (descriptor.value != null) {
|
|
8166
|
+
this.set(target, key, descriptor.value, null);
|
|
8167
|
+
}
|
|
8168
|
+
return Reflect.defineProperty(target, key, descriptor);
|
|
8139
8169
|
}
|
|
8140
8170
|
};
|
|
8141
8171
|
{
|
|
@@ -8625,7 +8655,7 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
8625
8655
|
* instance properties when it is accessed by a parent component via template
|
|
8626
8656
|
* refs.
|
|
8627
8657
|
*
|
|
8628
|
-
* `<script setup>` components are closed by default - i.e.
|
|
8658
|
+
* `<script setup>` components are closed by default - i.e. variables inside
|
|
8629
8659
|
* the `<script setup>` scope is not exposed to parent unless explicitly exposed
|
|
8630
8660
|
* via `defineExpose`.
|
|
8631
8661
|
*
|
|
@@ -8823,7 +8853,7 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
8823
8853
|
return [
|
|
8824
8854
|
'div',
|
|
8825
8855
|
{},
|
|
8826
|
-
['span', vueStyle, 'Reactive'],
|
|
8856
|
+
['span', vueStyle, isShallow(obj) ? 'ShallowReactive' : 'Reactive'],
|
|
8827
8857
|
'<',
|
|
8828
8858
|
formatValue(obj),
|
|
8829
8859
|
`>${isReadonly(obj) ? ` (readonly)` : ``}`
|
|
@@ -8833,7 +8863,7 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
8833
8863
|
return [
|
|
8834
8864
|
'div',
|
|
8835
8865
|
{},
|
|
8836
|
-
['span', vueStyle, 'Readonly'],
|
|
8866
|
+
['span', vueStyle, isShallow(obj) ? 'ShallowReadonly' : 'Readonly'],
|
|
8837
8867
|
'<',
|
|
8838
8868
|
formatValue(obj),
|
|
8839
8869
|
'>'
|
|
@@ -8962,7 +8992,7 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
8962
8992
|
}
|
|
8963
8993
|
}
|
|
8964
8994
|
function genRefFlag(v) {
|
|
8965
|
-
if (v
|
|
8995
|
+
if (isShallow(v)) {
|
|
8966
8996
|
return `ShallowRef`;
|
|
8967
8997
|
}
|
|
8968
8998
|
if (v.effect) {
|
|
@@ -9006,7 +9036,7 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
9006
9036
|
}
|
|
9007
9037
|
|
|
9008
9038
|
// Core API ------------------------------------------------------------------
|
|
9009
|
-
const version = "3.2.
|
|
9039
|
+
const version = "3.2.31";
|
|
9010
9040
|
/**
|
|
9011
9041
|
* SSR utils for \@vue/server-renderer. Only exposed in cjs builds.
|
|
9012
9042
|
* @internal
|
|
@@ -9080,7 +9110,10 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
9080
9110
|
insertStaticContent(content, parent, anchor, isSVG, start, end) {
|
|
9081
9111
|
// <parent> before | first ... last | anchor </parent>
|
|
9082
9112
|
const before = anchor ? anchor.previousSibling : parent.lastChild;
|
|
9083
|
-
|
|
9113
|
+
// #5308 can only take cached path if:
|
|
9114
|
+
// - has a single root node
|
|
9115
|
+
// - nextSibling info is still available
|
|
9116
|
+
if (start && (start === end || start.nextSibling)) {
|
|
9084
9117
|
// cached
|
|
9085
9118
|
while (true) {
|
|
9086
9119
|
parent.insertBefore(start.cloneNode(true), anchor);
|
|
@@ -9393,7 +9426,7 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
9393
9426
|
originalStop.call(e);
|
|
9394
9427
|
e._stopped = true;
|
|
9395
9428
|
};
|
|
9396
|
-
return value.map(fn => (e) => !e._stopped && fn(e));
|
|
9429
|
+
return value.map(fn => (e) => !e._stopped && fn && fn(e));
|
|
9397
9430
|
}
|
|
9398
9431
|
else {
|
|
9399
9432
|
return value;
|
|
@@ -10696,6 +10729,7 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
10696
10729
|
exports.isReadonly = isReadonly;
|
|
10697
10730
|
exports.isRef = isRef;
|
|
10698
10731
|
exports.isRuntimeOnly = isRuntimeOnly;
|
|
10732
|
+
exports.isShallow = isShallow;
|
|
10699
10733
|
exports.isVNode = isVNode;
|
|
10700
10734
|
exports.markRaw = markRaw;
|
|
10701
10735
|
exports.mergeDefaults = mergeDefaults;
|