@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.
@@ -64,7 +64,10 @@ const nodeOps = {
64
64
  insertStaticContent(content, parent, anchor, isSVG, start, end) {
65
65
  // <parent> before | first ... last | anchor </parent>
66
66
  const before = anchor ? anchor.previousSibling : parent.lastChild;
67
- if (start && end) {
67
+ // #5308 can only take cached path if:
68
+ // - has a single root node
69
+ // - nextSibling info is still available
70
+ if (start && (start === end || start.nextSibling)) {
68
71
  // cached
69
72
  while (true) {
70
73
  parent.insertBefore(start.cloneNode(true), anchor);
@@ -377,7 +380,7 @@ function patchStopImmediatePropagation(e, value) {
377
380
  originalStop.call(e);
378
381
  e._stopped = true;
379
382
  };
380
- return value.map(fn => (e) => !e._stopped && fn(e));
383
+ return value.map(fn => (e) => !e._stopped && fn && fn(e));
381
384
  }
382
385
  else {
383
386
  return value;
@@ -64,7 +64,10 @@ const nodeOps = {
64
64
  insertStaticContent(content, parent, anchor, isSVG, start, end) {
65
65
  // <parent> before | first ... last | anchor </parent>
66
66
  const before = anchor ? anchor.previousSibling : parent.lastChild;
67
- if (start && end) {
67
+ // #5308 can only take cached path if:
68
+ // - has a single root node
69
+ // - nextSibling info is still available
70
+ if (start && (start === end || start.nextSibling)) {
68
71
  // cached
69
72
  while (true) {
70
73
  parent.insertBefore(start.cloneNode(true), anchor);
@@ -373,7 +376,7 @@ function patchStopImmediatePropagation(e, value) {
373
376
  originalStop.call(e);
374
377
  e._stopped = true;
375
378
  };
376
- return value.map(fn => (e) => !e._stopped && fn(e));
379
+ return value.map(fn => (e) => !e._stopped && fn && fn(e));
377
380
  }
378
381
  else {
379
382
  return value;
@@ -132,7 +132,15 @@ const SVG_TAGS = 'svg,animate,animateMotion,animateTransform,circle,clipPath,col
132
132
  'mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,' +
133
133
  'polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,' +
134
134
  'text,textPath,title,tspan,unknown,use,view';
135
+ /**
136
+ * Compiler only.
137
+ * Do NOT use in runtime code paths unless behind `true` flag.
138
+ */
135
139
  const isHTMLTag = /*#__PURE__*/ makeMap(HTML_TAGS);
140
+ /**
141
+ * Compiler only.
142
+ * Do NOT use in runtime code paths unless behind `true` flag.
143
+ */
136
144
  const isSVGTag = /*#__PURE__*/ makeMap(SVG_TAGS);
137
145
 
138
146
  function looseCompareArrays(a, b) {
@@ -190,13 +198,15 @@ function looseIndexOf(arr, val) {
190
198
  * @private
191
199
  */
192
200
  const toDisplayString = (val) => {
193
- return val == null
194
- ? ''
195
- : isArray(val) ||
196
- (isObject(val) &&
197
- (val.toString === objectToString || !isFunction(val.toString)))
198
- ? JSON.stringify(val, replacer, 2)
199
- : String(val);
201
+ return isString(val)
202
+ ? val
203
+ : val == null
204
+ ? ''
205
+ : isArray(val) ||
206
+ (isObject(val) &&
207
+ (val.toString === objectToString || !isFunction(val.toString)))
208
+ ? JSON.stringify(val, replacer, 2)
209
+ : String(val);
200
210
  };
201
211
  const replacer = (_key, val) => {
202
212
  // can't use isRef here since @vue/shared has no deps
@@ -270,6 +280,7 @@ const isReservedProp = /*#__PURE__*/ makeMap(
270
280
  'onVnodeBeforeMount,onVnodeMounted,' +
271
281
  'onVnodeBeforeUpdate,onVnodeUpdated,' +
272
282
  'onVnodeBeforeUnmount,onVnodeUnmounted');
283
+ const isBuiltInDirective = /*#__PURE__*/ makeMap('bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo');
273
284
  const cacheStringFunction = (fn) => {
274
285
  const cache = Object.create(null);
275
286
  return ((str) => {
@@ -335,7 +346,6 @@ function warn(msg, ...args) {
335
346
  }
336
347
 
337
348
  let activeEffectScope;
338
- const effectScopeStack = [];
339
349
  class EffectScope {
340
350
  constructor(detached = false) {
341
351
  this.active = true;
@@ -350,11 +360,11 @@ class EffectScope {
350
360
  run(fn) {
351
361
  if (this.active) {
352
362
  try {
353
- this.on();
363
+ activeEffectScope = this;
354
364
  return fn();
355
365
  }
356
366
  finally {
357
- this.off();
367
+ activeEffectScope = this.parent;
358
368
  }
359
369
  }
360
370
  else {
@@ -362,23 +372,24 @@ class EffectScope {
362
372
  }
363
373
  }
364
374
  on() {
365
- if (this.active) {
366
- effectScopeStack.push(this);
367
- activeEffectScope = this;
368
- }
375
+ activeEffectScope = this;
369
376
  }
370
377
  off() {
371
- if (this.active) {
372
- effectScopeStack.pop();
373
- activeEffectScope = effectScopeStack[effectScopeStack.length - 1];
374
- }
378
+ activeEffectScope = this.parent;
375
379
  }
376
380
  stop(fromParent) {
377
381
  if (this.active) {
378
- this.effects.forEach(e => e.stop());
379
- this.cleanups.forEach(cleanup => cleanup());
382
+ let i, l;
383
+ for (i = 0, l = this.effects.length; i < l; i++) {
384
+ this.effects[i].stop();
385
+ }
386
+ for (i = 0, l = this.cleanups.length; i < l; i++) {
387
+ this.cleanups[i]();
388
+ }
380
389
  if (this.scopes) {
381
- this.scopes.forEach(e => e.stop(true));
390
+ for (i = 0, l = this.scopes.length; i < l; i++) {
391
+ this.scopes[i].stop(true);
392
+ }
382
393
  }
383
394
  // nested scope, dereference from parent to avoid memory leaks
384
395
  if (this.parent && !fromParent) {
@@ -396,8 +407,7 @@ class EffectScope {
396
407
  function effectScope(detached) {
397
408
  return new EffectScope(detached);
398
409
  }
399
- function recordEffectScope(effect, scope) {
400
- scope = scope || activeEffectScope;
410
+ function recordEffectScope(effect, scope = activeEffectScope) {
401
411
  if (scope && scope.active) {
402
412
  scope.effects.push(effect);
403
413
  }
@@ -460,7 +470,6 @@ let trackOpBit = 1;
460
470
  * When recursion depth is greater, fall back to using a full cleanup.
461
471
  */
462
472
  const maxMarkerBits = 30;
463
- const effectStack = [];
464
473
  let activeEffect;
465
474
  const ITERATE_KEY = Symbol('iterate' );
466
475
  const MAP_KEY_ITERATE_KEY = Symbol('Map key iterate' );
@@ -470,35 +479,42 @@ class ReactiveEffect {
470
479
  this.scheduler = scheduler;
471
480
  this.active = true;
472
481
  this.deps = [];
482
+ this.parent = undefined;
473
483
  recordEffectScope(this, scope);
474
484
  }
475
485
  run() {
476
486
  if (!this.active) {
477
487
  return this.fn();
478
488
  }
479
- if (!effectStack.includes(this)) {
480
- try {
481
- effectStack.push((activeEffect = this));
482
- enableTracking();
483
- trackOpBit = 1 << ++effectTrackDepth;
484
- if (effectTrackDepth <= maxMarkerBits) {
485
- initDepMarkers(this);
486
- }
487
- else {
488
- cleanupEffect(this);
489
- }
490
- return this.fn();
489
+ let parent = activeEffect;
490
+ let lastShouldTrack = shouldTrack;
491
+ while (parent) {
492
+ if (parent === this) {
493
+ return;
491
494
  }
492
- finally {
493
- if (effectTrackDepth <= maxMarkerBits) {
494
- finalizeDepMarkers(this);
495
- }
496
- trackOpBit = 1 << --effectTrackDepth;
497
- resetTracking();
498
- effectStack.pop();
499
- const n = effectStack.length;
500
- activeEffect = n > 0 ? effectStack[n - 1] : undefined;
495
+ parent = parent.parent;
496
+ }
497
+ try {
498
+ this.parent = activeEffect;
499
+ activeEffect = this;
500
+ shouldTrack = true;
501
+ trackOpBit = 1 << ++effectTrackDepth;
502
+ if (effectTrackDepth <= maxMarkerBits) {
503
+ initDepMarkers(this);
504
+ }
505
+ else {
506
+ cleanupEffect(this);
501
507
  }
508
+ return this.fn();
509
+ }
510
+ finally {
511
+ if (effectTrackDepth <= maxMarkerBits) {
512
+ finalizeDepMarkers(this);
513
+ }
514
+ trackOpBit = 1 << --effectTrackDepth;
515
+ activeEffect = this.parent;
516
+ shouldTrack = lastShouldTrack;
517
+ this.parent = undefined;
502
518
  }
503
519
  }
504
520
  stop() {
@@ -546,32 +562,24 @@ function pauseTracking() {
546
562
  trackStack.push(shouldTrack);
547
563
  shouldTrack = false;
548
564
  }
549
- function enableTracking() {
550
- trackStack.push(shouldTrack);
551
- shouldTrack = true;
552
- }
553
565
  function resetTracking() {
554
566
  const last = trackStack.pop();
555
567
  shouldTrack = last === undefined ? true : last;
556
568
  }
557
569
  function track(target, type, key) {
558
- if (!isTracking()) {
559
- return;
560
- }
561
- let depsMap = targetMap.get(target);
562
- if (!depsMap) {
563
- targetMap.set(target, (depsMap = new Map()));
564
- }
565
- let dep = depsMap.get(key);
566
- if (!dep) {
567
- depsMap.set(key, (dep = createDep()));
570
+ if (shouldTrack && activeEffect) {
571
+ let depsMap = targetMap.get(target);
572
+ if (!depsMap) {
573
+ targetMap.set(target, (depsMap = new Map()));
574
+ }
575
+ let dep = depsMap.get(key);
576
+ if (!dep) {
577
+ depsMap.set(key, (dep = createDep()));
578
+ }
579
+ const eventInfo = { effect: activeEffect, target, type, key }
580
+ ;
581
+ trackEffects(dep, eventInfo);
568
582
  }
569
- const eventInfo = { effect: activeEffect, target, type, key }
570
- ;
571
- trackEffects(dep, eventInfo);
572
- }
573
- function isTracking() {
574
- return shouldTrack && activeEffect !== undefined;
575
583
  }
576
584
  function trackEffects(dep, debuggerEventExtraInfo) {
577
585
  let shouldTrack = false;
@@ -732,6 +740,9 @@ function createGetter(isReadonly = false, shallow = false) {
732
740
  else if (key === "__v_isReadonly" /* IS_READONLY */) {
733
741
  return isReadonly;
734
742
  }
743
+ else if (key === "__v_isShallow" /* IS_SHALLOW */) {
744
+ return shallow;
745
+ }
735
746
  else if (key === "__v_raw" /* RAW */ &&
736
747
  receiver ===
737
748
  (isReadonly
@@ -776,9 +787,14 @@ const shallowSet = /*#__PURE__*/ createSetter(true);
776
787
  function createSetter(shallow = false) {
777
788
  return function set(target, key, value, receiver) {
778
789
  let oldValue = target[key];
790
+ if (isReadonly(oldValue) && isRef(oldValue) && !isRef(value)) {
791
+ return false;
792
+ }
779
793
  if (!shallow && !isReadonly(value)) {
780
- value = toRaw(value);
781
- oldValue = toRaw(oldValue);
794
+ if (!isShallow(value)) {
795
+ value = toRaw(value);
796
+ oldValue = toRaw(oldValue);
797
+ }
782
798
  if (!isArray(target) && isRef(oldValue) && !isRef(value)) {
783
799
  oldValue.value = value;
784
800
  return true;
@@ -1165,7 +1181,7 @@ function getTargetType(value) {
1165
1181
  }
1166
1182
  function reactive(target) {
1167
1183
  // if trying to observe a readonly proxy, return the readonly version.
1168
- if (target && target["__v_isReadonly" /* IS_READONLY */]) {
1184
+ if (isReadonly(target)) {
1169
1185
  return target;
1170
1186
  }
1171
1187
  return createReactiveObject(target, false, mutableHandlers, mutableCollectionHandlers, reactiveMap);
@@ -1230,6 +1246,9 @@ function isReactive(value) {
1230
1246
  function isReadonly(value) {
1231
1247
  return !!(value && value["__v_isReadonly" /* IS_READONLY */]);
1232
1248
  }
1249
+ function isShallow(value) {
1250
+ return !!(value && value["__v_isShallow" /* IS_SHALLOW */]);
1251
+ }
1233
1252
  function isProxy(value) {
1234
1253
  return isReactive(value) || isReadonly(value);
1235
1254
  }
@@ -1245,13 +1264,10 @@ const toReactive = (value) => isObject(value) ? reactive(value) : value;
1245
1264
  const toReadonly = (value) => isObject(value) ? readonly(value) : value;
1246
1265
 
1247
1266
  function trackRefValue(ref) {
1248
- if (isTracking()) {
1267
+ if (shouldTrack && activeEffect) {
1249
1268
  ref = toRaw(ref);
1250
- if (!ref.dep) {
1251
- ref.dep = createDep();
1252
- }
1253
1269
  {
1254
- trackEffects(ref.dep, {
1270
+ trackEffects(ref.dep || (ref.dep = createDep()), {
1255
1271
  target: ref,
1256
1272
  type: "get" /* GET */,
1257
1273
  key: 'value'
@@ -1273,7 +1289,7 @@ function triggerRefValue(ref, newVal) {
1273
1289
  }
1274
1290
  }
1275
1291
  function isRef(r) {
1276
- return Boolean(r && r.__v_isRef === true);
1292
+ return !!(r && r.__v_isRef === true);
1277
1293
  }
1278
1294
  function ref(value) {
1279
1295
  return createRef(value, false);
@@ -1288,22 +1304,22 @@ function createRef(rawValue, shallow) {
1288
1304
  return new RefImpl(rawValue, shallow);
1289
1305
  }
1290
1306
  class RefImpl {
1291
- constructor(value, _shallow) {
1292
- this._shallow = _shallow;
1307
+ constructor(value, __v_isShallow) {
1308
+ this.__v_isShallow = __v_isShallow;
1293
1309
  this.dep = undefined;
1294
1310
  this.__v_isRef = true;
1295
- this._rawValue = _shallow ? value : toRaw(value);
1296
- this._value = _shallow ? value : toReactive(value);
1311
+ this._rawValue = __v_isShallow ? value : toRaw(value);
1312
+ this._value = __v_isShallow ? value : toReactive(value);
1297
1313
  }
1298
1314
  get value() {
1299
1315
  trackRefValue(this);
1300
1316
  return this._value;
1301
1317
  }
1302
1318
  set value(newVal) {
1303
- newVal = this._shallow ? newVal : toRaw(newVal);
1319
+ newVal = this.__v_isShallow ? newVal : toRaw(newVal);
1304
1320
  if (hasChanged(newVal, this._rawValue)) {
1305
1321
  this._rawValue = newVal;
1306
- this._value = this._shallow ? newVal : toReactive(newVal);
1322
+ this._value = this.__v_isShallow ? newVal : toReactive(newVal);
1307
1323
  triggerRefValue(this, newVal);
1308
1324
  }
1309
1325
  }
@@ -1386,22 +1402,23 @@ class ComputedRefImpl {
1386
1402
  constructor(getter, _setter, isReadonly, isSSR) {
1387
1403
  this._setter = _setter;
1388
1404
  this.dep = undefined;
1389
- this._dirty = true;
1390
1405
  this.__v_isRef = true;
1406
+ this._dirty = true;
1391
1407
  this.effect = new ReactiveEffect(getter, () => {
1392
1408
  if (!this._dirty) {
1393
1409
  this._dirty = true;
1394
1410
  triggerRefValue(this);
1395
1411
  }
1396
1412
  });
1397
- this.effect.active = !isSSR;
1413
+ this.effect.computed = this;
1414
+ this.effect.active = this._cacheable = !isSSR;
1398
1415
  this["__v_isReadonly" /* IS_READONLY */] = isReadonly;
1399
1416
  }
1400
1417
  get value() {
1401
1418
  // the computed ref may get wrapped by other proxies e.g. readonly() #3376
1402
1419
  const self = toRaw(this);
1403
1420
  trackRefValue(self);
1404
- if (self._dirty) {
1421
+ if (self._dirty || !self._cacheable) {
1405
1422
  self._dirty = false;
1406
1423
  self._value = self.effect.run();
1407
1424
  }
@@ -1578,7 +1595,7 @@ const ErrorTypeStrings = {
1578
1595
  [12 /* FUNCTION_REF */]: 'ref function',
1579
1596
  [13 /* ASYNC_COMPONENT_LOADER */]: 'async component loader',
1580
1597
  [14 /* SCHEDULER */]: 'scheduler flush. This is likely a Vue internals bug. ' +
1581
- 'Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/vue-next'
1598
+ 'Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/core'
1582
1599
  };
1583
1600
  function callWithErrorHandling(fn, instance, type, args) {
1584
1601
  let res;
@@ -3040,7 +3057,7 @@ function inject(key, defaultValue, treatDefaultAsFactory = false) {
3040
3057
  if (instance) {
3041
3058
  // #2400
3042
3059
  // to support `app.use` plugins,
3043
- // fallback to appContext's `provides` if the intance is at root
3060
+ // fallback to appContext's `provides` if the instance is at root
3044
3061
  const provides = instance.parent == null
3045
3062
  ? instance.vnode.appContext && instance.vnode.appContext.provides
3046
3063
  : instance.parent.provides;
@@ -3106,7 +3123,7 @@ function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = EM
3106
3123
  let isMultiSource = false;
3107
3124
  if (isRef(source)) {
3108
3125
  getter = () => source.value;
3109
- forceTrigger = !!source._shallow;
3126
+ forceTrigger = isShallow(source);
3110
3127
  }
3111
3128
  else if (isReactive(source)) {
3112
3129
  getter = () => source;
@@ -3981,7 +3998,7 @@ function matches(pattern, name) {
3981
3998
  return pattern.some((p) => matches(p, name));
3982
3999
  }
3983
4000
  else if (isString(pattern)) {
3984
- return pattern.split(',').indexOf(name) > -1;
4001
+ return pattern.split(',').includes(name);
3985
4002
  }
3986
4003
  else if (pattern.test) {
3987
4004
  return pattern.test(name);
@@ -4234,7 +4251,7 @@ function applyOptions(instance) {
4234
4251
  warn$1(`Write operation failed: computed property "${key}" is readonly.`);
4235
4252
  }
4236
4253
  ;
4237
- const c = computed({
4254
+ const c = computed$1({
4238
4255
  get,
4239
4256
  set
4240
4257
  });
@@ -4633,7 +4650,9 @@ function updateProps(instance, rawProps, rawPrevProps, optimized) {
4633
4650
  // attrs point to the same object so it should already have been updated.
4634
4651
  if (attrs !== rawCurrentProps) {
4635
4652
  for (const key in attrs) {
4636
- if (!rawProps || !hasOwn(rawProps, key)) {
4653
+ if (!rawProps ||
4654
+ (!hasOwn(rawProps, key) &&
4655
+ (!false ))) {
4637
4656
  delete attrs[key];
4638
4657
  hasAttrsChanged = true;
4639
4658
  }
@@ -5083,7 +5102,6 @@ return withDirectives(h(comp), [
5083
5102
  [bar, this.y]
5084
5103
  ])
5085
5104
  */
5086
- const isBuiltInDirective = /*#__PURE__*/ makeMap('bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo');
5087
5105
  function validateDirectiveName(name) {
5088
5106
  if (isBuiltInDirective(name)) {
5089
5107
  warn$1('Do not use built-in directive ids as custom directive id: ' + name);
@@ -5564,7 +5582,8 @@ function createHydrationFunctions(rendererInternals) {
5564
5582
  // e.g. <option :value="obj">, <input type="checkbox" :true-value="1">
5565
5583
  const forcePatchValue = (type === 'input' && dirs) || type === 'option';
5566
5584
  // skip props & children if this is hoisted static nodes
5567
- if (forcePatchValue || patchFlag !== -1 /* HOISTED */) {
5585
+ // #5405 in dev, always hydrate children for HMR
5586
+ {
5568
5587
  if (dirs) {
5569
5588
  invokeDirectiveHook(vnode, null, parentComponent, 'created');
5570
5589
  }
@@ -5729,6 +5748,7 @@ function createHydrationFunctions(rendererInternals) {
5729
5748
  return [hydrate, hydrateNode];
5730
5749
  }
5731
5750
 
5751
+ /* eslint-disable no-restricted-globals */
5732
5752
  let supported;
5733
5753
  let perf;
5734
5754
  function startMeasure(instance, type) {
@@ -5756,7 +5776,6 @@ function isSupported() {
5756
5776
  if (supported !== undefined) {
5757
5777
  return supported;
5758
5778
  }
5759
- /* eslint-disable no-restricted-globals */
5760
5779
  if (typeof window !== 'undefined' && window.performance) {
5761
5780
  supported = true;
5762
5781
  perf = window.performance;
@@ -5764,7 +5783,6 @@ function isSupported() {
5764
5783
  else {
5765
5784
  supported = false;
5766
5785
  }
5767
- /* eslint-enable no-restricted-globals */
5768
5786
  return supported;
5769
5787
  }
5770
5788
 
@@ -7641,7 +7659,7 @@ function cloneVNode(vnode, extraProps, mergeRef = false) {
7641
7659
  shapeFlag: vnode.shapeFlag,
7642
7660
  // if the vnode is cloned with extra props, we can no longer assume its
7643
7661
  // existing patch flag to be reliable and need to add the FULL_PROPS flag.
7644
- // note: perserve flag for fragments since they use the flag for children
7662
+ // note: preserve flag for fragments since they use the flag for children
7645
7663
  // fast paths only.
7646
7664
  patchFlag: extraProps && vnode.type !== Fragment
7647
7665
  ? patchFlag === -1 // hoisted node
@@ -7803,7 +7821,8 @@ function mergeProps(...args) {
7803
7821
  else if (isOn(key)) {
7804
7822
  const existing = ret[key];
7805
7823
  const incoming = toMerge[key];
7806
- if (existing !== incoming &&
7824
+ if (incoming &&
7825
+ existing !== incoming &&
7807
7826
  !(isArray(existing) && existing.includes(incoming))) {
7808
7827
  ret[key] = existing
7809
7828
  ? [].concat(existing, incoming)
@@ -8098,9 +8117,11 @@ const PublicInstanceProxyHandlers = {
8098
8117
  const { data, setupState, ctx } = instance;
8099
8118
  if (setupState !== EMPTY_OBJ && hasOwn(setupState, key)) {
8100
8119
  setupState[key] = value;
8120
+ return true;
8101
8121
  }
8102
8122
  else if (data !== EMPTY_OBJ && hasOwn(data, key)) {
8103
8123
  data[key] = value;
8124
+ return true;
8104
8125
  }
8105
8126
  else if (hasOwn(instance.props, key)) {
8106
8127
  warn$1(`Attempting to mutate prop "${key}". Props are readonly.`, instance);
@@ -8134,6 +8155,15 @@ const PublicInstanceProxyHandlers = {
8134
8155
  hasOwn(ctx, key) ||
8135
8156
  hasOwn(publicPropertiesMap, key) ||
8136
8157
  hasOwn(appContext.config.globalProperties, key));
8158
+ },
8159
+ defineProperty(target, key, descriptor) {
8160
+ if (descriptor.get != null) {
8161
+ this.set(target, key, descriptor.get(), null);
8162
+ }
8163
+ else if (descriptor.value != null) {
8164
+ this.set(target, key, descriptor.value, null);
8165
+ }
8166
+ return Reflect.defineProperty(target, key, descriptor);
8137
8167
  }
8138
8168
  };
8139
8169
  {
@@ -8623,7 +8653,7 @@ function defineEmits() {
8623
8653
  * instance properties when it is accessed by a parent component via template
8624
8654
  * refs.
8625
8655
  *
8626
- * `<script setup>` components are closed by default - i.e. varaibles inside
8656
+ * `<script setup>` components are closed by default - i.e. variables inside
8627
8657
  * the `<script setup>` scope is not exposed to parent unless explicitly exposed
8628
8658
  * via `defineExpose`.
8629
8659
  *
@@ -8826,7 +8856,7 @@ function initCustomFormatter() {
8826
8856
  return [
8827
8857
  'div',
8828
8858
  {},
8829
- ['span', vueStyle, 'Reactive'],
8859
+ ['span', vueStyle, isShallow(obj) ? 'ShallowReactive' : 'Reactive'],
8830
8860
  '<',
8831
8861
  formatValue(obj),
8832
8862
  `>${isReadonly(obj) ? ` (readonly)` : ``}`
@@ -8836,7 +8866,7 @@ function initCustomFormatter() {
8836
8866
  return [
8837
8867
  'div',
8838
8868
  {},
8839
- ['span', vueStyle, 'Readonly'],
8869
+ ['span', vueStyle, isShallow(obj) ? 'ShallowReadonly' : 'Readonly'],
8840
8870
  '<',
8841
8871
  formatValue(obj),
8842
8872
  '>'
@@ -8965,7 +8995,7 @@ function initCustomFormatter() {
8965
8995
  }
8966
8996
  }
8967
8997
  function genRefFlag(v) {
8968
- if (v._shallow) {
8998
+ if (isShallow(v)) {
8969
8999
  return `ShallowRef`;
8970
9000
  }
8971
9001
  if (v.effect) {
@@ -9009,7 +9039,7 @@ function isMemoSame(cached, memo) {
9009
9039
  }
9010
9040
 
9011
9041
  // Core API ------------------------------------------------------------------
9012
- const version = "3.2.27";
9042
+ const version = "3.2.31";
9013
9043
  /**
9014
9044
  * SSR utils for \@vue/server-renderer. Only exposed in cjs builds.
9015
9045
  * @internal
@@ -9083,7 +9113,10 @@ const nodeOps = {
9083
9113
  insertStaticContent(content, parent, anchor, isSVG, start, end) {
9084
9114
  // <parent> before | first ... last | anchor </parent>
9085
9115
  const before = anchor ? anchor.previousSibling : parent.lastChild;
9086
- if (start && end) {
9116
+ // #5308 can only take cached path if:
9117
+ // - has a single root node
9118
+ // - nextSibling info is still available
9119
+ if (start && (start === end || start.nextSibling)) {
9087
9120
  // cached
9088
9121
  while (true) {
9089
9122
  parent.insertBefore(start.cloneNode(true), anchor);
@@ -9396,7 +9429,7 @@ function patchStopImmediatePropagation(e, value) {
9396
9429
  originalStop.call(e);
9397
9430
  e._stopped = true;
9398
9431
  };
9399
- return value.map(fn => (e) => !e._stopped && fn(e));
9432
+ return value.map(fn => (e) => !e._stopped && fn && fn(e));
9400
9433
  }
9401
9434
  else {
9402
9435
  return value;
@@ -10652,4 +10685,4 @@ function normalizeContainer(container) {
10652
10685
  */
10653
10686
  const initDirectivesForSSR = NOOP;
10654
10687
 
10655
- export { BaseTransition, Comment, EffectScope, Fragment, KeepAlive, ReactiveEffect, Static, Suspense, Teleport, Text, Transition, TransitionGroup, VueElement, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, cloneVNode, compatUtils, computed$1 as computed, 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, 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 };
10688
+ export { BaseTransition, Comment, EffectScope, Fragment, KeepAlive, ReactiveEffect, Static, Suspense, Teleport, Text, Transition, TransitionGroup, VueElement, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, cloneVNode, compatUtils, computed$1 as computed, 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, isShallow, 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, 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 };