@vue/compat 3.5.12 → 3.5.14

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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/compat v3.5.12
2
+ * @vue/compat v3.5.14
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -144,10 +144,9 @@ var Vue = (function () {
144
144
  return ret;
145
145
  }
146
146
  function stringifyStyle(styles) {
147
+ if (!styles) return "";
148
+ if (isString(styles)) return styles;
147
149
  let ret = "";
148
- if (!styles || isString(styles)) {
149
- return ret;
150
- }
151
150
  for (const key in styles) {
152
151
  const value = styles[key];
153
152
  if (isString(value) || typeof value === "number") {
@@ -327,6 +326,10 @@ var Vue = (function () {
327
326
  * @internal
328
327
  */
329
328
  this._active = true;
329
+ /**
330
+ * @internal track `on` calls, allow `on` call multiple times
331
+ */
332
+ this._on = 0;
330
333
  /**
331
334
  * @internal
332
335
  */
@@ -397,28 +400,38 @@ var Vue = (function () {
397
400
  * @internal
398
401
  */
399
402
  on() {
400
- activeEffectScope = this;
403
+ if (++this._on === 1) {
404
+ this.prevScope = activeEffectScope;
405
+ activeEffectScope = this;
406
+ }
401
407
  }
402
408
  /**
403
409
  * This should only be called on non-detached scopes
404
410
  * @internal
405
411
  */
406
412
  off() {
407
- activeEffectScope = this.parent;
413
+ if (this._on > 0 && --this._on === 0) {
414
+ activeEffectScope = this.prevScope;
415
+ this.prevScope = void 0;
416
+ }
408
417
  }
409
418
  stop(fromParent) {
410
419
  if (this._active) {
420
+ this._active = false;
411
421
  let i, l;
412
422
  for (i = 0, l = this.effects.length; i < l; i++) {
413
423
  this.effects[i].stop();
414
424
  }
425
+ this.effects.length = 0;
415
426
  for (i = 0, l = this.cleanups.length; i < l; i++) {
416
427
  this.cleanups[i]();
417
428
  }
429
+ this.cleanups.length = 0;
418
430
  if (this.scopes) {
419
431
  for (i = 0, l = this.scopes.length; i < l; i++) {
420
432
  this.scopes[i].stop(true);
421
433
  }
434
+ this.scopes.length = 0;
422
435
  }
423
436
  if (!this.detached && this.parent && !fromParent) {
424
437
  const last = this.parent.scopes.pop();
@@ -428,7 +441,6 @@ var Vue = (function () {
428
441
  }
429
442
  }
430
443
  this.parent = void 0;
431
- this._active = false;
432
444
  }
433
445
  }
434
446
  }
@@ -483,7 +495,7 @@ var Vue = (function () {
483
495
  }
484
496
  resume() {
485
497
  if (this.flags & 64) {
486
- this.flags &= ~64;
498
+ this.flags &= -65;
487
499
  if (pausedQueueEffects.has(this)) {
488
500
  pausedQueueEffects.delete(this);
489
501
  this.trigger();
@@ -523,7 +535,7 @@ var Vue = (function () {
523
535
  cleanupDeps(this);
524
536
  activeSub = prevEffect;
525
537
  shouldTrack = prevShouldTrack;
526
- this.flags &= ~2;
538
+ this.flags &= -3;
527
539
  }
528
540
  }
529
541
  stop() {
@@ -534,7 +546,7 @@ var Vue = (function () {
534
546
  this.deps = this.depsTail = void 0;
535
547
  cleanupEffect(this);
536
548
  this.onStop && this.onStop();
537
- this.flags &= ~1;
549
+ this.flags &= -2;
538
550
  }
539
551
  }
540
552
  trigger() {
@@ -584,7 +596,7 @@ var Vue = (function () {
584
596
  while (e) {
585
597
  const next = e.next;
586
598
  e.next = void 0;
587
- e.flags &= ~8;
599
+ e.flags &= -9;
588
600
  e = next;
589
601
  }
590
602
  }
@@ -595,7 +607,7 @@ var Vue = (function () {
595
607
  while (e) {
596
608
  const next = e.next;
597
609
  e.next = void 0;
598
- e.flags &= ~8;
610
+ e.flags &= -9;
599
611
  if (e.flags & 1) {
600
612
  try {
601
613
  ;
@@ -651,17 +663,16 @@ var Vue = (function () {
651
663
  if (computed.flags & 4 && !(computed.flags & 16)) {
652
664
  return;
653
665
  }
654
- computed.flags &= ~16;
666
+ computed.flags &= -17;
655
667
  if (computed.globalVersion === globalVersion) {
656
668
  return;
657
669
  }
658
670
  computed.globalVersion = globalVersion;
659
- const dep = computed.dep;
660
- computed.flags |= 2;
661
- if (dep.version > 0 && !computed.isSSR && computed.deps && !isDirty(computed)) {
662
- computed.flags &= ~2;
671
+ if (!computed.isSSR && computed.flags & 128 && (!computed.deps && !computed._dirty || !isDirty(computed))) {
663
672
  return;
664
673
  }
674
+ computed.flags |= 2;
675
+ const dep = computed.dep;
665
676
  const prevSub = activeSub;
666
677
  const prevShouldTrack = shouldTrack;
667
678
  activeSub = computed;
@@ -670,6 +681,7 @@ var Vue = (function () {
670
681
  prepareDeps(computed);
671
682
  const value = computed.fn(computed._value);
672
683
  if (dep.version === 0 || hasChanged(value, computed._value)) {
684
+ computed.flags |= 128;
673
685
  computed._value = value;
674
686
  dep.version++;
675
687
  }
@@ -680,7 +692,7 @@ var Vue = (function () {
680
692
  activeSub = prevSub;
681
693
  shouldTrack = prevShouldTrack;
682
694
  cleanupDeps(computed);
683
- computed.flags &= ~2;
695
+ computed.flags &= -3;
684
696
  }
685
697
  }
686
698
  function removeSub(link, soft = false) {
@@ -699,7 +711,7 @@ var Vue = (function () {
699
711
  if (dep.subs === link) {
700
712
  dep.subs = prevSub;
701
713
  if (!prevSub && dep.computed) {
702
- dep.computed.flags &= ~4;
714
+ dep.computed.flags &= -5;
703
715
  for (let l = dep.computed.deps; l; l = l.nextDep) {
704
716
  removeSub(l, true);
705
717
  }
@@ -1194,6 +1206,7 @@ var Vue = (function () {
1194
1206
  this._isShallow = _isShallow;
1195
1207
  }
1196
1208
  get(target, key, receiver) {
1209
+ if (key === "__v_skip") return target["__v_skip"];
1197
1210
  const isReadonly2 = this._isReadonly, isShallow2 = this._isShallow;
1198
1211
  if (key === "__v_isReactive") {
1199
1212
  return !isReadonly2;
@@ -1631,14 +1644,14 @@ var Vue = (function () {
1631
1644
  if (target["__v_raw"] && !(isReadonly2 && target["__v_isReactive"])) {
1632
1645
  return target;
1633
1646
  }
1634
- const existingProxy = proxyMap.get(target);
1635
- if (existingProxy) {
1636
- return existingProxy;
1637
- }
1638
1647
  const targetType = getTargetType(target);
1639
1648
  if (targetType === 0 /* INVALID */) {
1640
1649
  return target;
1641
1650
  }
1651
+ const existingProxy = proxyMap.get(target);
1652
+ if (existingProxy) {
1653
+ return existingProxy;
1654
+ }
1642
1655
  const proxy = new Proxy(
1643
1656
  target,
1644
1657
  targetType === 2 /* COLLECTION */ ? collectionHandlers : baseHandlers
@@ -2030,7 +2043,7 @@ var Vue = (function () {
2030
2043
  const scope = getCurrentScope();
2031
2044
  const watchHandle = () => {
2032
2045
  effect.stop();
2033
- if (scope) {
2046
+ if (scope && scope.active) {
2034
2047
  remove(scope.effects, effect);
2035
2048
  }
2036
2049
  };
@@ -2482,11 +2495,11 @@ var Vue = (function () {
2482
2495
  queue.splice(i, 1);
2483
2496
  i--;
2484
2497
  if (cb.flags & 4) {
2485
- cb.flags &= ~1;
2498
+ cb.flags &= -2;
2486
2499
  }
2487
2500
  cb();
2488
2501
  if (!(cb.flags & 4)) {
2489
- cb.flags &= ~1;
2502
+ cb.flags &= -2;
2490
2503
  }
2491
2504
  }
2492
2505
  }
@@ -2511,10 +2524,10 @@ var Vue = (function () {
2511
2524
  continue;
2512
2525
  }
2513
2526
  if (cb.flags & 4) {
2514
- cb.flags &= ~1;
2527
+ cb.flags &= -2;
2515
2528
  }
2516
2529
  if (!(cb.flags & 8)) cb();
2517
- cb.flags &= ~1;
2530
+ cb.flags &= -2;
2518
2531
  }
2519
2532
  activePostFlushCbs = null;
2520
2533
  postFlushIndex = 0;
@@ -2550,7 +2563,7 @@ var Vue = (function () {
2550
2563
  for (; flushIndex < queue.length; flushIndex++) {
2551
2564
  const job = queue[flushIndex];
2552
2565
  if (job) {
2553
- job.flags &= ~1;
2566
+ job.flags &= -2;
2554
2567
  }
2555
2568
  }
2556
2569
  flushIndex = -1;
@@ -3518,11 +3531,32 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
3518
3531
  updateCssVars(n2, true);
3519
3532
  }
3520
3533
  if (isTeleportDeferred(n2.props)) {
3521
- queuePostRenderEffect(mountToTarget, parentSuspense);
3534
+ queuePostRenderEffect(() => {
3535
+ mountToTarget();
3536
+ n2.el.__isMounted = true;
3537
+ }, parentSuspense);
3522
3538
  } else {
3523
3539
  mountToTarget();
3524
3540
  }
3525
3541
  } else {
3542
+ if (isTeleportDeferred(n2.props) && !n1.el.__isMounted) {
3543
+ queuePostRenderEffect(() => {
3544
+ TeleportImpl.process(
3545
+ n1,
3546
+ n2,
3547
+ container,
3548
+ anchor,
3549
+ parentComponent,
3550
+ parentSuspense,
3551
+ namespace,
3552
+ slotScopeIds,
3553
+ optimized,
3554
+ internals
3555
+ );
3556
+ delete n1.el.__isMounted;
3557
+ }, parentSuspense);
3558
+ return;
3559
+ }
3526
3560
  n2.el = n1.el;
3527
3561
  n2.targetStart = n1.targetStart;
3528
3562
  const mainAnchor = n2.anchor = n1.anchor;
@@ -3546,7 +3580,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
3546
3580
  namespace,
3547
3581
  slotScopeIds
3548
3582
  );
3549
- traverseStaticChildren(n1, n2, true);
3583
+ traverseStaticChildren(n1, n2, false);
3550
3584
  } else if (!optimized) {
3551
3585
  patchChildren(
3552
3586
  n1,
@@ -3828,10 +3862,9 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
3828
3862
  if (innerChild.type !== Comment) {
3829
3863
  setTransitionHooks(innerChild, enterHooks);
3830
3864
  }
3831
- const oldChild = instance.subTree;
3832
- const oldInnerChild = oldChild && getInnerChild$1(oldChild);
3865
+ let oldInnerChild = instance.subTree && getInnerChild$1(instance.subTree);
3833
3866
  if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(innerChild, oldInnerChild) && recursiveGetSubtree(instance).type !== Comment) {
3834
- const leavingHooks = resolveTransitionHooks(
3867
+ let leavingHooks = resolveTransitionHooks(
3835
3868
  oldInnerChild,
3836
3869
  rawProps,
3837
3870
  state,
@@ -3846,6 +3879,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
3846
3879
  instance.update();
3847
3880
  }
3848
3881
  delete leavingHooks.afterLeave;
3882
+ oldInnerChild = void 0;
3849
3883
  };
3850
3884
  return emptyPlaceholder(child);
3851
3885
  } else if (mode === "in-out" && innerChild.type !== Comment) {
@@ -3859,10 +3893,19 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
3859
3893
  earlyRemove();
3860
3894
  el[leaveCbKey] = void 0;
3861
3895
  delete enterHooks.delayedLeave;
3896
+ oldInnerChild = void 0;
3897
+ };
3898
+ enterHooks.delayedLeave = () => {
3899
+ delayedLeave();
3900
+ delete enterHooks.delayedLeave;
3901
+ oldInnerChild = void 0;
3862
3902
  };
3863
- enterHooks.delayedLeave = delayedLeave;
3864
3903
  };
3904
+ } else {
3905
+ oldInnerChild = void 0;
3865
3906
  }
3907
+ } else if (oldInnerChild) {
3908
+ oldInnerChild = void 0;
3866
3909
  }
3867
3910
  return child;
3868
3911
  };
@@ -4170,6 +4213,9 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
4170
4213
  return;
4171
4214
  }
4172
4215
  if (isAsyncWrapper(vnode) && !isUnmount) {
4216
+ if (vnode.shapeFlag & 512 && vnode.type.__asyncResolved && vnode.component.subTree.component) {
4217
+ setRef(rawRef, oldRawRef, parentSuspense, vnode.component.subTree);
4218
+ }
4173
4219
  return;
4174
4220
  }
4175
4221
  const refValue = vnode.shapeFlag & 4 ? getComponentPublicInstance(vnode.component) : vnode.el;
@@ -4434,7 +4480,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
4434
4480
  getContainerType(container),
4435
4481
  optimized
4436
4482
  );
4437
- if (isAsyncWrapper(vnode)) {
4483
+ if (isAsyncWrapper(vnode) && !vnode.type.__asyncResolved) {
4438
4484
  let subTree;
4439
4485
  if (isFragmentStart) {
4440
4486
  subTree = createVNode(Fragment);
@@ -4703,6 +4749,10 @@ Server rendered element contains fewer child nodes than client vdom.`
4703
4749
  getContainerType(container),
4704
4750
  slotScopeIds
4705
4751
  );
4752
+ if (parentComponent) {
4753
+ parentComponent.vnode.el = vnode.el;
4754
+ updateHOCHostEl(parentComponent, vnode.el);
4755
+ }
4706
4756
  return next;
4707
4757
  };
4708
4758
  const locateClosingAnchor = (node, open = "[", close = "]") => {
@@ -5212,6 +5262,9 @@ Server rendered element contains fewer child nodes than client vdom.`
5212
5262
  {
5213
5263
  devtoolsComponentAdded(instance2);
5214
5264
  }
5265
+ {
5266
+ instance2.__keepAliveStorageContainer = storageContainer;
5267
+ }
5215
5268
  };
5216
5269
  function unmount(vnode) {
5217
5270
  resetShapeFlag(vnode);
@@ -5299,7 +5352,7 @@ Server rendered element contains fewer child nodes than client vdom.`
5299
5352
  );
5300
5353
  const { include, exclude, max } = props;
5301
5354
  if (include && (!name || !matches(include, name)) || exclude && name && matches(exclude, name)) {
5302
- vnode.shapeFlag &= ~256;
5355
+ vnode.shapeFlag &= -257;
5303
5356
  current = vnode;
5304
5357
  return rawVNode;
5305
5358
  }
@@ -5390,8 +5443,8 @@ Server rendered element contains fewer child nodes than client vdom.`
5390
5443
  }, target);
5391
5444
  }
5392
5445
  function resetShapeFlag(vnode) {
5393
- vnode.shapeFlag &= ~256;
5394
- vnode.shapeFlag &= ~512;
5446
+ vnode.shapeFlag &= -257;
5447
+ vnode.shapeFlag &= -513;
5395
5448
  }
5396
5449
  function getInnerChild(vnode) {
5397
5450
  return vnode.shapeFlag & 128 ? vnode.ssContent : vnode;
@@ -5793,14 +5846,16 @@ If this is a native custom element, make sure to exclude it from component resol
5793
5846
  if (sourceIsArray || isString(source)) {
5794
5847
  const sourceIsReactiveArray = sourceIsArray && isReactive(source);
5795
5848
  let needsWrap = false;
5849
+ let isReadonlySource = false;
5796
5850
  if (sourceIsReactiveArray) {
5797
5851
  needsWrap = !isShallow(source);
5852
+ isReadonlySource = isReadonly(source);
5798
5853
  source = shallowReadArray(source);
5799
5854
  }
5800
5855
  ret = new Array(source.length);
5801
5856
  for (let i = 0, l = source.length; i < l; i++) {
5802
5857
  ret[i] = renderItem(
5803
- needsWrap ? toReactive(source[i]) : source[i],
5858
+ needsWrap ? isReadonlySource ? toReadonly(toReactive(source[i])) : toReactive(source[i]) : source[i],
5804
5859
  i,
5805
5860
  void 0,
5806
5861
  cached && cached[i]
@@ -7049,7 +7104,7 @@ If this is a native custom element, make sure to exclude it from component resol
7049
7104
  return vm;
7050
7105
  }
7051
7106
  }
7052
- Vue.version = `2.6.14-compat:${"3.5.12"}`;
7107
+ Vue.version = `2.6.14-compat:${"3.5.14"}`;
7053
7108
  Vue.config = singletonApp.config;
7054
7109
  Vue.use = (plugin, ...options) => {
7055
7110
  if (plugin && isFunction(plugin.install)) {
@@ -7543,11 +7598,9 @@ If this is a native custom element, make sure to exclude it from component resol
7543
7598
  }
7544
7599
  {
7545
7600
  context.reload = () => {
7546
- render(
7547
- cloneVNode(vnode),
7548
- rootContainer,
7549
- namespace
7550
- );
7601
+ const cloned = cloneVNode(vnode);
7602
+ cloned.el = null;
7603
+ render(cloned, rootContainer, namespace);
7551
7604
  };
7552
7605
  }
7553
7606
  if (isHydrate && hydrate) {
@@ -8145,7 +8198,7 @@ If you want to remount the same app, move your app creation logic into a factory
8145
8198
  return rawSlot;
8146
8199
  }
8147
8200
  const normalized = withCtx((...args) => {
8148
- if (currentInstance && (!ctx || ctx.root === currentInstance.root)) {
8201
+ if (currentInstance && !(ctx === null && currentRenderingInstance) && !(ctx && ctx.root !== currentInstance.root)) {
8149
8202
  warn$1(
8150
8203
  `Slot "${key}" invoked outside of the render function: this will not track dependencies used in the slot. Invoke the slot function inside the render function instead.`
8151
8204
  );
@@ -8184,7 +8237,7 @@ If you want to remount the same app, move your app creation logic into a factory
8184
8237
  };
8185
8238
  const assignSlots = (slots, children, optimized) => {
8186
8239
  for (const key in children) {
8187
- if (optimized || key !== "_") {
8240
+ if (optimized || !isInternalKey(key)) {
8188
8241
  slots[key] = children[key];
8189
8242
  }
8190
8243
  }
@@ -8871,8 +8924,8 @@ If you want to remount the same app, move your app creation logic into a factory
8871
8924
  endMeasure(instance, `init`);
8872
8925
  }
8873
8926
  }
8927
+ if (isHmrUpdating) initialVNode.el = null;
8874
8928
  if (instance.asyncDep) {
8875
- if (isHmrUpdating) initialVNode.el = null;
8876
8929
  parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect, optimized);
8877
8930
  if (!initialVNode.el) {
8878
8931
  const placeholder = instance.subTree = createVNode(Comment);
@@ -9458,7 +9511,13 @@ If you want to remount the same app, move your app creation logic into a factory
9458
9511
  queuePostRenderEffect(() => transition.enter(el), parentSuspense);
9459
9512
  } else {
9460
9513
  const { leave, delayLeave, afterLeave } = transition;
9461
- const remove2 = () => hostInsert(el, container, anchor);
9514
+ const remove2 = () => {
9515
+ if (vnode.ctx.isUnmounted) {
9516
+ hostRemove(el);
9517
+ } else {
9518
+ hostInsert(el, container, anchor);
9519
+ }
9520
+ };
9462
9521
  const performLeave = () => {
9463
9522
  leave(el, () => {
9464
9523
  remove2();
@@ -9491,7 +9550,9 @@ If you want to remount the same app, move your app creation logic into a factory
9491
9550
  optimized = false;
9492
9551
  }
9493
9552
  if (ref != null) {
9553
+ pauseTracking();
9494
9554
  setRef(ref, null, parentSuspense, vnode, true);
9555
+ resetTracking();
9495
9556
  }
9496
9557
  if (cacheIndex != null) {
9497
9558
  parentComponent.renderCache[cacheIndex] = void 0;
@@ -9603,12 +9664,27 @@ If you want to remount the same app, move your app creation logic into a factory
9603
9664
  if (instance.type.__hmrId) {
9604
9665
  unregisterHMR(instance);
9605
9666
  }
9606
- const { bum, scope, job, subTree, um, m, a } = instance;
9667
+ const {
9668
+ bum,
9669
+ scope,
9670
+ job,
9671
+ subTree,
9672
+ um,
9673
+ m,
9674
+ a,
9675
+ parent,
9676
+ slots: { __: slotCacheKeys }
9677
+ } = instance;
9607
9678
  invalidateMount(m);
9608
9679
  invalidateMount(a);
9609
9680
  if (bum) {
9610
9681
  invokeArrayFns(bum);
9611
9682
  }
9683
+ if (parent && isArray(slotCacheKeys)) {
9684
+ slotCacheKeys.forEach((v) => {
9685
+ parent.renderCache[v] = void 0;
9686
+ });
9687
+ }
9612
9688
  if (isCompatEnabled("INSTANCE_EVENT_HOOKS", instance)) {
9613
9689
  instance.emit("hook:beforeDestroy");
9614
9690
  }
@@ -9713,8 +9789,8 @@ If you want to remount the same app, move your app creation logic into a factory
9713
9789
  effect.flags |= 32;
9714
9790
  job.flags |= 4;
9715
9791
  } else {
9716
- effect.flags &= ~32;
9717
- job.flags &= ~4;
9792
+ effect.flags &= -33;
9793
+ job.flags &= -5;
9718
9794
  }
9719
9795
  }
9720
9796
  function needTransition(parentSuspense, transition) {
@@ -9741,6 +9817,9 @@ If you want to remount the same app, move your app creation logic into a factory
9741
9817
  if (c2.type === Comment && !c2.el) {
9742
9818
  c2.el = c1.el;
9743
9819
  }
9820
+ {
9821
+ c2.el && (c2.el.__vnode = c2);
9822
+ }
9744
9823
  }
9745
9824
  }
9746
9825
  }
@@ -10236,7 +10315,7 @@ If you want to remount the same app, move your app creation logic into a factory
10236
10315
  }
10237
10316
  if (extraAttrs.length) {
10238
10317
  warn$1(
10239
- `Extraneous non-props attributes (${extraAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.`
10318
+ `Extraneous non-props attributes (${extraAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text or teleport root nodes.`
10240
10319
  );
10241
10320
  }
10242
10321
  if (eventAttrs.length) {
@@ -11097,9 +11176,9 @@ If you want to remount the same app, move your app creation logic into a factory
11097
11176
  currentBlock = blockStack[blockStack.length - 1] || null;
11098
11177
  }
11099
11178
  let isBlockTreeEnabled = 1;
11100
- function setBlockTracking(value) {
11179
+ function setBlockTracking(value, inVOnce = false) {
11101
11180
  isBlockTreeEnabled += value;
11102
- if (value < 0 && currentBlock) {
11181
+ if (value < 0 && currentBlock && inVOnce) {
11103
11182
  currentBlock.hasOnce = true;
11104
11183
  }
11105
11184
  }
@@ -11143,8 +11222,8 @@ If you want to remount the same app, move your app creation logic into a factory
11143
11222
  if (n2.shapeFlag & 6 && n1.component) {
11144
11223
  const dirtyInstances = hmrDirtyComponents.get(n2.type);
11145
11224
  if (dirtyInstances && dirtyInstances.has(n1.component)) {
11146
- n1.shapeFlag &= ~256;
11147
- n2.shapeFlag &= ~512;
11225
+ n1.shapeFlag &= -257;
11226
+ n2.shapeFlag &= -513;
11148
11227
  return false;
11149
11228
  }
11150
11229
  }
@@ -11603,7 +11682,7 @@ Component that was made reactive: `,
11603
11682
  const { props, children } = instance.vnode;
11604
11683
  const isStateful = isStatefulComponent(instance);
11605
11684
  initProps(instance, props, isStateful, isSSR);
11606
- initSlots(instance, children, optimized);
11685
+ initSlots(instance, children, optimized || isSSR);
11607
11686
  const setupResult = isStateful ? setupStatefulComponent(instance, isSSR) : void 0;
11608
11687
  isSSR && setInSSRSetupState(false);
11609
11688
  return setupResult;
@@ -11944,13 +12023,15 @@ Component that was made reactive: `,
11944
12023
  if (obj.__isVue) {
11945
12024
  return ["div", vueStyle, `VueInstance`];
11946
12025
  } else if (isRef(obj)) {
12026
+ pauseTracking();
12027
+ const value = obj.value;
12028
+ resetTracking();
11947
12029
  return [
11948
12030
  "div",
11949
12031
  {},
11950
12032
  ["span", vueStyle, genRefFlag(obj)],
11951
12033
  "<",
11952
- // avoid debugger accessing value affecting behavior
11953
- formatValue("_value" in obj ? obj._value : obj),
12034
+ formatValue(value),
11954
12035
  `>`
11955
12036
  ];
11956
12037
  } else if (isReactive(obj)) {
@@ -12131,7 +12212,7 @@ Component that was made reactive: `,
12131
12212
  return true;
12132
12213
  }
12133
12214
 
12134
- const version = "3.5.12";
12215
+ const version = "3.5.14";
12135
12216
  const warn = warn$1 ;
12136
12217
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
12137
12218
  const devtools = devtools$1 ;
@@ -12329,7 +12410,8 @@ Component that was made reactive: `,
12329
12410
  onAppear = onEnter,
12330
12411
  onAppearCancelled = onEnterCancelled
12331
12412
  } = baseProps;
12332
- const finishEnter = (el, isAppear, done) => {
12413
+ const finishEnter = (el, isAppear, done, isCancelled) => {
12414
+ el._enterCancelled = isCancelled;
12333
12415
  removeTransitionClass(el, isAppear ? appearToClass : enterToClass);
12334
12416
  removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass);
12335
12417
  done && done();
@@ -12387,8 +12469,13 @@ Component that was made reactive: `,
12387
12469
  if (legacyClassEnabled && legacyLeaveFromClass) {
12388
12470
  addTransitionClass(el, legacyLeaveFromClass);
12389
12471
  }
12390
- addTransitionClass(el, leaveActiveClass);
12391
- forceReflow();
12472
+ if (!el._enterCancelled) {
12473
+ forceReflow();
12474
+ addTransitionClass(el, leaveActiveClass);
12475
+ } else {
12476
+ addTransitionClass(el, leaveActiveClass);
12477
+ forceReflow();
12478
+ }
12392
12479
  nextFrame(() => {
12393
12480
  if (!el._isLeaving) {
12394
12481
  return;
@@ -12405,11 +12492,11 @@ Component that was made reactive: `,
12405
12492
  callHook(onLeave, [el, resolve]);
12406
12493
  },
12407
12494
  onEnterCancelled(el) {
12408
- finishEnter(el, false);
12495
+ finishEnter(el, false, void 0, true);
12409
12496
  callHook(onEnterCancelled, [el]);
12410
12497
  },
12411
12498
  onAppearCancelled(el) {
12412
- finishEnter(el, true);
12499
+ finishEnter(el, true, void 0, true);
12413
12500
  callHook(onAppearCancelled, [el]);
12414
12501
  },
12415
12502
  onLeaveCancelled(el) {
@@ -12622,10 +12709,11 @@ Component that was made reactive: `,
12622
12709
  }
12623
12710
  updateTeleports(vars);
12624
12711
  };
12625
- onBeforeMount(() => {
12626
- watchPostEffect(setVars);
12712
+ onBeforeUpdate(() => {
12713
+ queuePostFlushCb(setVars);
12627
12714
  });
12628
12715
  onMounted(() => {
12716
+ watch(setVars, NOOP, { flush: "post" });
12629
12717
  const ob = new MutationObserver(setVars);
12630
12718
  ob.observe(instance.subTree.el.parentNode, { childList: true });
12631
12719
  onUnmounted(() => ob.disconnect());
@@ -13011,7 +13099,7 @@ Expected function or array of functions, received type ${typeof value}.`
13011
13099
  }
13012
13100
  return false;
13013
13101
  }
13014
- if (key === "spellcheck" || key === "draggable" || key === "translate") {
13102
+ if (key === "spellcheck" || key === "draggable" || key === "translate" || key === "autocorrect") {
13015
13103
  return false;
13016
13104
  }
13017
13105
  if (key === "form") {
@@ -13276,6 +13364,8 @@ Expected function or array of functions, received type ${typeof value}.`
13276
13364
  this._update();
13277
13365
  }
13278
13366
  if (shouldReflect) {
13367
+ const ob = this._ob;
13368
+ ob && ob.disconnect();
13279
13369
  if (val === true) {
13280
13370
  this.setAttribute(hyphenate(key), "");
13281
13371
  } else if (typeof val === "string" || typeof val === "number") {
@@ -13283,6 +13373,7 @@ Expected function or array of functions, received type ${typeof value}.`
13283
13373
  } else if (!val) {
13284
13374
  this.removeAttribute(hyphenate(key));
13285
13375
  }
13376
+ ob && ob.observe(this, { attributes: true });
13286
13377
  }
13287
13378
  }
13288
13379
  }
@@ -13488,6 +13579,7 @@ Expected function or array of functions, received type ${typeof value}.`
13488
13579
  instance.vnode.el,
13489
13580
  moveClass
13490
13581
  )) {
13582
+ prevChildren = [];
13491
13583
  return;
13492
13584
  }
13493
13585
  prevChildren.forEach(callPendingCbs);
@@ -13511,6 +13603,7 @@ Expected function or array of functions, received type ${typeof value}.`
13511
13603
  };
13512
13604
  el.addEventListener("transitionend", cb);
13513
13605
  });
13606
+ prevChildren = [];
13514
13607
  });
13515
13608
  return () => {
13516
13609
  const rawProps = toRaw(props);