@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
  **/
@@ -215,10 +215,9 @@ var Vue = (function () {
215
215
  return ret;
216
216
  }
217
217
  function stringifyStyle(styles) {
218
+ if (!styles) return "";
219
+ if (isString(styles)) return styles;
218
220
  let ret = "";
219
- if (!styles || isString(styles)) {
220
- return ret;
221
- }
222
221
  for (const key in styles) {
223
222
  const value = styles[key];
224
223
  if (isString(value) || typeof value === "number") {
@@ -400,6 +399,10 @@ var Vue = (function () {
400
399
  * @internal
401
400
  */
402
401
  this._active = true;
402
+ /**
403
+ * @internal track `on` calls, allow `on` call multiple times
404
+ */
405
+ this._on = 0;
403
406
  /**
404
407
  * @internal
405
408
  */
@@ -470,28 +473,38 @@ var Vue = (function () {
470
473
  * @internal
471
474
  */
472
475
  on() {
473
- activeEffectScope = this;
476
+ if (++this._on === 1) {
477
+ this.prevScope = activeEffectScope;
478
+ activeEffectScope = this;
479
+ }
474
480
  }
475
481
  /**
476
482
  * This should only be called on non-detached scopes
477
483
  * @internal
478
484
  */
479
485
  off() {
480
- activeEffectScope = this.parent;
486
+ if (this._on > 0 && --this._on === 0) {
487
+ activeEffectScope = this.prevScope;
488
+ this.prevScope = void 0;
489
+ }
481
490
  }
482
491
  stop(fromParent) {
483
492
  if (this._active) {
493
+ this._active = false;
484
494
  let i, l;
485
495
  for (i = 0, l = this.effects.length; i < l; i++) {
486
496
  this.effects[i].stop();
487
497
  }
498
+ this.effects.length = 0;
488
499
  for (i = 0, l = this.cleanups.length; i < l; i++) {
489
500
  this.cleanups[i]();
490
501
  }
502
+ this.cleanups.length = 0;
491
503
  if (this.scopes) {
492
504
  for (i = 0, l = this.scopes.length; i < l; i++) {
493
505
  this.scopes[i].stop(true);
494
506
  }
507
+ this.scopes.length = 0;
495
508
  }
496
509
  if (!this.detached && this.parent && !fromParent) {
497
510
  const last = this.parent.scopes.pop();
@@ -501,7 +514,6 @@ var Vue = (function () {
501
514
  }
502
515
  }
503
516
  this.parent = void 0;
504
- this._active = false;
505
517
  }
506
518
  }
507
519
  }
@@ -556,7 +568,7 @@ var Vue = (function () {
556
568
  }
557
569
  resume() {
558
570
  if (this.flags & 64) {
559
- this.flags &= ~64;
571
+ this.flags &= -65;
560
572
  if (pausedQueueEffects.has(this)) {
561
573
  pausedQueueEffects.delete(this);
562
574
  this.trigger();
@@ -596,7 +608,7 @@ var Vue = (function () {
596
608
  cleanupDeps(this);
597
609
  activeSub = prevEffect;
598
610
  shouldTrack = prevShouldTrack;
599
- this.flags &= ~2;
611
+ this.flags &= -3;
600
612
  }
601
613
  }
602
614
  stop() {
@@ -607,7 +619,7 @@ var Vue = (function () {
607
619
  this.deps = this.depsTail = void 0;
608
620
  cleanupEffect(this);
609
621
  this.onStop && this.onStop();
610
- this.flags &= ~1;
622
+ this.flags &= -2;
611
623
  }
612
624
  }
613
625
  trigger() {
@@ -657,7 +669,7 @@ var Vue = (function () {
657
669
  while (e) {
658
670
  const next = e.next;
659
671
  e.next = void 0;
660
- e.flags &= ~8;
672
+ e.flags &= -9;
661
673
  e = next;
662
674
  }
663
675
  }
@@ -668,7 +680,7 @@ var Vue = (function () {
668
680
  while (e) {
669
681
  const next = e.next;
670
682
  e.next = void 0;
671
- e.flags &= ~8;
683
+ e.flags &= -9;
672
684
  if (e.flags & 1) {
673
685
  try {
674
686
  ;
@@ -724,17 +736,16 @@ var Vue = (function () {
724
736
  if (computed.flags & 4 && !(computed.flags & 16)) {
725
737
  return;
726
738
  }
727
- computed.flags &= ~16;
739
+ computed.flags &= -17;
728
740
  if (computed.globalVersion === globalVersion) {
729
741
  return;
730
742
  }
731
743
  computed.globalVersion = globalVersion;
732
- const dep = computed.dep;
733
- computed.flags |= 2;
734
- if (dep.version > 0 && !computed.isSSR && computed.deps && !isDirty(computed)) {
735
- computed.flags &= ~2;
744
+ if (!computed.isSSR && computed.flags & 128 && (!computed.deps && !computed._dirty || !isDirty(computed))) {
736
745
  return;
737
746
  }
747
+ computed.flags |= 2;
748
+ const dep = computed.dep;
738
749
  const prevSub = activeSub;
739
750
  const prevShouldTrack = shouldTrack;
740
751
  activeSub = computed;
@@ -743,6 +754,7 @@ var Vue = (function () {
743
754
  prepareDeps(computed);
744
755
  const value = computed.fn(computed._value);
745
756
  if (dep.version === 0 || hasChanged(value, computed._value)) {
757
+ computed.flags |= 128;
746
758
  computed._value = value;
747
759
  dep.version++;
748
760
  }
@@ -753,7 +765,7 @@ var Vue = (function () {
753
765
  activeSub = prevSub;
754
766
  shouldTrack = prevShouldTrack;
755
767
  cleanupDeps(computed);
756
- computed.flags &= ~2;
768
+ computed.flags &= -3;
757
769
  }
758
770
  }
759
771
  function removeSub(link, soft = false) {
@@ -772,7 +784,7 @@ var Vue = (function () {
772
784
  if (dep.subs === link) {
773
785
  dep.subs = prevSub;
774
786
  if (!prevSub && dep.computed) {
775
- dep.computed.flags &= ~4;
787
+ dep.computed.flags &= -5;
776
788
  for (let l = dep.computed.deps; l; l = l.nextDep) {
777
789
  removeSub(l, true);
778
790
  }
@@ -1267,6 +1279,7 @@ var Vue = (function () {
1267
1279
  this._isShallow = _isShallow;
1268
1280
  }
1269
1281
  get(target, key, receiver) {
1282
+ if (key === "__v_skip") return target["__v_skip"];
1270
1283
  const isReadonly2 = this._isReadonly, isShallow2 = this._isShallow;
1271
1284
  if (key === "__v_isReactive") {
1272
1285
  return !isReadonly2;
@@ -1704,14 +1717,14 @@ var Vue = (function () {
1704
1717
  if (target["__v_raw"] && !(isReadonly2 && target["__v_isReactive"])) {
1705
1718
  return target;
1706
1719
  }
1707
- const existingProxy = proxyMap.get(target);
1708
- if (existingProxy) {
1709
- return existingProxy;
1710
- }
1711
1720
  const targetType = getTargetType(target);
1712
1721
  if (targetType === 0 /* INVALID */) {
1713
1722
  return target;
1714
1723
  }
1724
+ const existingProxy = proxyMap.get(target);
1725
+ if (existingProxy) {
1726
+ return existingProxy;
1727
+ }
1715
1728
  const proxy = new Proxy(
1716
1729
  target,
1717
1730
  targetType === 2 /* COLLECTION */ ? collectionHandlers : baseHandlers
@@ -2103,7 +2116,7 @@ var Vue = (function () {
2103
2116
  const scope = getCurrentScope();
2104
2117
  const watchHandle = () => {
2105
2118
  effect.stop();
2106
- if (scope) {
2119
+ if (scope && scope.active) {
2107
2120
  remove(scope.effects, effect);
2108
2121
  }
2109
2122
  };
@@ -2555,11 +2568,11 @@ var Vue = (function () {
2555
2568
  queue.splice(i, 1);
2556
2569
  i--;
2557
2570
  if (cb.flags & 4) {
2558
- cb.flags &= ~1;
2571
+ cb.flags &= -2;
2559
2572
  }
2560
2573
  cb();
2561
2574
  if (!(cb.flags & 4)) {
2562
- cb.flags &= ~1;
2575
+ cb.flags &= -2;
2563
2576
  }
2564
2577
  }
2565
2578
  }
@@ -2584,10 +2597,10 @@ var Vue = (function () {
2584
2597
  continue;
2585
2598
  }
2586
2599
  if (cb.flags & 4) {
2587
- cb.flags &= ~1;
2600
+ cb.flags &= -2;
2588
2601
  }
2589
2602
  if (!(cb.flags & 8)) cb();
2590
- cb.flags &= ~1;
2603
+ cb.flags &= -2;
2591
2604
  }
2592
2605
  activePostFlushCbs = null;
2593
2606
  postFlushIndex = 0;
@@ -2623,7 +2636,7 @@ var Vue = (function () {
2623
2636
  for (; flushIndex < queue.length; flushIndex++) {
2624
2637
  const job = queue[flushIndex];
2625
2638
  if (job) {
2626
- job.flags &= ~1;
2639
+ job.flags &= -2;
2627
2640
  }
2628
2641
  }
2629
2642
  flushIndex = -1;
@@ -3591,11 +3604,32 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
3591
3604
  updateCssVars(n2, true);
3592
3605
  }
3593
3606
  if (isTeleportDeferred(n2.props)) {
3594
- queuePostRenderEffect(mountToTarget, parentSuspense);
3607
+ queuePostRenderEffect(() => {
3608
+ mountToTarget();
3609
+ n2.el.__isMounted = true;
3610
+ }, parentSuspense);
3595
3611
  } else {
3596
3612
  mountToTarget();
3597
3613
  }
3598
3614
  } else {
3615
+ if (isTeleportDeferred(n2.props) && !n1.el.__isMounted) {
3616
+ queuePostRenderEffect(() => {
3617
+ TeleportImpl.process(
3618
+ n1,
3619
+ n2,
3620
+ container,
3621
+ anchor,
3622
+ parentComponent,
3623
+ parentSuspense,
3624
+ namespace,
3625
+ slotScopeIds,
3626
+ optimized,
3627
+ internals
3628
+ );
3629
+ delete n1.el.__isMounted;
3630
+ }, parentSuspense);
3631
+ return;
3632
+ }
3599
3633
  n2.el = n1.el;
3600
3634
  n2.targetStart = n1.targetStart;
3601
3635
  const mainAnchor = n2.anchor = n1.anchor;
@@ -3619,7 +3653,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
3619
3653
  namespace,
3620
3654
  slotScopeIds
3621
3655
  );
3622
- traverseStaticChildren(n1, n2, true);
3656
+ traverseStaticChildren(n1, n2, false);
3623
3657
  } else if (!optimized) {
3624
3658
  patchChildren(
3625
3659
  n1,
@@ -3901,10 +3935,9 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
3901
3935
  if (innerChild.type !== Comment) {
3902
3936
  setTransitionHooks(innerChild, enterHooks);
3903
3937
  }
3904
- const oldChild = instance.subTree;
3905
- const oldInnerChild = oldChild && getInnerChild$1(oldChild);
3938
+ let oldInnerChild = instance.subTree && getInnerChild$1(instance.subTree);
3906
3939
  if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(innerChild, oldInnerChild) && recursiveGetSubtree(instance).type !== Comment) {
3907
- const leavingHooks = resolveTransitionHooks(
3940
+ let leavingHooks = resolveTransitionHooks(
3908
3941
  oldInnerChild,
3909
3942
  rawProps,
3910
3943
  state,
@@ -3919,6 +3952,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
3919
3952
  instance.update();
3920
3953
  }
3921
3954
  delete leavingHooks.afterLeave;
3955
+ oldInnerChild = void 0;
3922
3956
  };
3923
3957
  return emptyPlaceholder(child);
3924
3958
  } else if (mode === "in-out" && innerChild.type !== Comment) {
@@ -3932,10 +3966,19 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
3932
3966
  earlyRemove();
3933
3967
  el[leaveCbKey] = void 0;
3934
3968
  delete enterHooks.delayedLeave;
3969
+ oldInnerChild = void 0;
3970
+ };
3971
+ enterHooks.delayedLeave = () => {
3972
+ delayedLeave();
3973
+ delete enterHooks.delayedLeave;
3974
+ oldInnerChild = void 0;
3935
3975
  };
3936
- enterHooks.delayedLeave = delayedLeave;
3937
3976
  };
3977
+ } else {
3978
+ oldInnerChild = void 0;
3938
3979
  }
3980
+ } else if (oldInnerChild) {
3981
+ oldInnerChild = void 0;
3939
3982
  }
3940
3983
  return child;
3941
3984
  };
@@ -4243,6 +4286,9 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
4243
4286
  return;
4244
4287
  }
4245
4288
  if (isAsyncWrapper(vnode) && !isUnmount) {
4289
+ if (vnode.shapeFlag & 512 && vnode.type.__asyncResolved && vnode.component.subTree.component) {
4290
+ setRef(rawRef, oldRawRef, parentSuspense, vnode.component.subTree);
4291
+ }
4246
4292
  return;
4247
4293
  }
4248
4294
  const refValue = vnode.shapeFlag & 4 ? getComponentPublicInstance(vnode.component) : vnode.el;
@@ -4507,7 +4553,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
4507
4553
  getContainerType(container),
4508
4554
  optimized
4509
4555
  );
4510
- if (isAsyncWrapper(vnode)) {
4556
+ if (isAsyncWrapper(vnode) && !vnode.type.__asyncResolved) {
4511
4557
  let subTree;
4512
4558
  if (isFragmentStart) {
4513
4559
  subTree = createVNode(Fragment);
@@ -4776,6 +4822,10 @@ Server rendered element contains fewer child nodes than client vdom.`
4776
4822
  getContainerType(container),
4777
4823
  slotScopeIds
4778
4824
  );
4825
+ if (parentComponent) {
4826
+ parentComponent.vnode.el = vnode.el;
4827
+ updateHOCHostEl(parentComponent, vnode.el);
4828
+ }
4779
4829
  return next;
4780
4830
  };
4781
4831
  const locateClosingAnchor = (node, open = "[", close = "]") => {
@@ -5285,6 +5335,9 @@ Server rendered element contains fewer child nodes than client vdom.`
5285
5335
  {
5286
5336
  devtoolsComponentAdded(instance2);
5287
5337
  }
5338
+ {
5339
+ instance2.__keepAliveStorageContainer = storageContainer;
5340
+ }
5288
5341
  };
5289
5342
  function unmount(vnode) {
5290
5343
  resetShapeFlag(vnode);
@@ -5372,7 +5425,7 @@ Server rendered element contains fewer child nodes than client vdom.`
5372
5425
  );
5373
5426
  const { include, exclude, max } = props;
5374
5427
  if (include && (!name || !matches(include, name)) || exclude && name && matches(exclude, name)) {
5375
- vnode.shapeFlag &= ~256;
5428
+ vnode.shapeFlag &= -257;
5376
5429
  current = vnode;
5377
5430
  return rawVNode;
5378
5431
  }
@@ -5463,8 +5516,8 @@ Server rendered element contains fewer child nodes than client vdom.`
5463
5516
  }, target);
5464
5517
  }
5465
5518
  function resetShapeFlag(vnode) {
5466
- vnode.shapeFlag &= ~256;
5467
- vnode.shapeFlag &= ~512;
5519
+ vnode.shapeFlag &= -257;
5520
+ vnode.shapeFlag &= -513;
5468
5521
  }
5469
5522
  function getInnerChild(vnode) {
5470
5523
  return vnode.shapeFlag & 128 ? vnode.ssContent : vnode;
@@ -5866,14 +5919,16 @@ If this is a native custom element, make sure to exclude it from component resol
5866
5919
  if (sourceIsArray || isString(source)) {
5867
5920
  const sourceIsReactiveArray = sourceIsArray && isReactive(source);
5868
5921
  let needsWrap = false;
5922
+ let isReadonlySource = false;
5869
5923
  if (sourceIsReactiveArray) {
5870
5924
  needsWrap = !isShallow(source);
5925
+ isReadonlySource = isReadonly(source);
5871
5926
  source = shallowReadArray(source);
5872
5927
  }
5873
5928
  ret = new Array(source.length);
5874
5929
  for (let i = 0, l = source.length; i < l; i++) {
5875
5930
  ret[i] = renderItem(
5876
- needsWrap ? toReactive(source[i]) : source[i],
5931
+ needsWrap ? isReadonlySource ? toReadonly(toReactive(source[i])) : toReactive(source[i]) : source[i],
5877
5932
  i,
5878
5933
  void 0,
5879
5934
  cached && cached[i]
@@ -7122,7 +7177,7 @@ If this is a native custom element, make sure to exclude it from component resol
7122
7177
  return vm;
7123
7178
  }
7124
7179
  }
7125
- Vue.version = `2.6.14-compat:${"3.5.12"}`;
7180
+ Vue.version = `2.6.14-compat:${"3.5.14"}`;
7126
7181
  Vue.config = singletonApp.config;
7127
7182
  Vue.use = (plugin, ...options) => {
7128
7183
  if (plugin && isFunction(plugin.install)) {
@@ -7616,11 +7671,9 @@ If this is a native custom element, make sure to exclude it from component resol
7616
7671
  }
7617
7672
  {
7618
7673
  context.reload = () => {
7619
- render(
7620
- cloneVNode(vnode),
7621
- rootContainer,
7622
- namespace
7623
- );
7674
+ const cloned = cloneVNode(vnode);
7675
+ cloned.el = null;
7676
+ render(cloned, rootContainer, namespace);
7624
7677
  };
7625
7678
  }
7626
7679
  if (isHydrate && hydrate) {
@@ -8218,7 +8271,7 @@ If you want to remount the same app, move your app creation logic into a factory
8218
8271
  return rawSlot;
8219
8272
  }
8220
8273
  const normalized = withCtx((...args) => {
8221
- if (currentInstance && (!ctx || ctx.root === currentInstance.root)) {
8274
+ if (currentInstance && !(ctx === null && currentRenderingInstance) && !(ctx && ctx.root !== currentInstance.root)) {
8222
8275
  warn$1(
8223
8276
  `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.`
8224
8277
  );
@@ -8257,7 +8310,7 @@ If you want to remount the same app, move your app creation logic into a factory
8257
8310
  };
8258
8311
  const assignSlots = (slots, children, optimized) => {
8259
8312
  for (const key in children) {
8260
- if (optimized || key !== "_") {
8313
+ if (optimized || !isInternalKey(key)) {
8261
8314
  slots[key] = children[key];
8262
8315
  }
8263
8316
  }
@@ -8944,8 +8997,8 @@ If you want to remount the same app, move your app creation logic into a factory
8944
8997
  endMeasure(instance, `init`);
8945
8998
  }
8946
8999
  }
9000
+ if (isHmrUpdating) initialVNode.el = null;
8947
9001
  if (instance.asyncDep) {
8948
- if (isHmrUpdating) initialVNode.el = null;
8949
9002
  parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect, optimized);
8950
9003
  if (!initialVNode.el) {
8951
9004
  const placeholder = instance.subTree = createVNode(Comment);
@@ -9531,7 +9584,13 @@ If you want to remount the same app, move your app creation logic into a factory
9531
9584
  queuePostRenderEffect(() => transition.enter(el), parentSuspense);
9532
9585
  } else {
9533
9586
  const { leave, delayLeave, afterLeave } = transition;
9534
- const remove2 = () => hostInsert(el, container, anchor);
9587
+ const remove2 = () => {
9588
+ if (vnode.ctx.isUnmounted) {
9589
+ hostRemove(el);
9590
+ } else {
9591
+ hostInsert(el, container, anchor);
9592
+ }
9593
+ };
9535
9594
  const performLeave = () => {
9536
9595
  leave(el, () => {
9537
9596
  remove2();
@@ -9564,7 +9623,9 @@ If you want to remount the same app, move your app creation logic into a factory
9564
9623
  optimized = false;
9565
9624
  }
9566
9625
  if (ref != null) {
9626
+ pauseTracking();
9567
9627
  setRef(ref, null, parentSuspense, vnode, true);
9628
+ resetTracking();
9568
9629
  }
9569
9630
  if (cacheIndex != null) {
9570
9631
  parentComponent.renderCache[cacheIndex] = void 0;
@@ -9676,12 +9737,27 @@ If you want to remount the same app, move your app creation logic into a factory
9676
9737
  if (instance.type.__hmrId) {
9677
9738
  unregisterHMR(instance);
9678
9739
  }
9679
- const { bum, scope, job, subTree, um, m, a } = instance;
9740
+ const {
9741
+ bum,
9742
+ scope,
9743
+ job,
9744
+ subTree,
9745
+ um,
9746
+ m,
9747
+ a,
9748
+ parent,
9749
+ slots: { __: slotCacheKeys }
9750
+ } = instance;
9680
9751
  invalidateMount(m);
9681
9752
  invalidateMount(a);
9682
9753
  if (bum) {
9683
9754
  invokeArrayFns(bum);
9684
9755
  }
9756
+ if (parent && isArray(slotCacheKeys)) {
9757
+ slotCacheKeys.forEach((v) => {
9758
+ parent.renderCache[v] = void 0;
9759
+ });
9760
+ }
9685
9761
  if (isCompatEnabled$1("INSTANCE_EVENT_HOOKS", instance)) {
9686
9762
  instance.emit("hook:beforeDestroy");
9687
9763
  }
@@ -9786,8 +9862,8 @@ If you want to remount the same app, move your app creation logic into a factory
9786
9862
  effect.flags |= 32;
9787
9863
  job.flags |= 4;
9788
9864
  } else {
9789
- effect.flags &= ~32;
9790
- job.flags &= ~4;
9865
+ effect.flags &= -33;
9866
+ job.flags &= -5;
9791
9867
  }
9792
9868
  }
9793
9869
  function needTransition(parentSuspense, transition) {
@@ -9814,6 +9890,9 @@ If you want to remount the same app, move your app creation logic into a factory
9814
9890
  if (c2.type === Comment && !c2.el) {
9815
9891
  c2.el = c1.el;
9816
9892
  }
9893
+ {
9894
+ c2.el && (c2.el.__vnode = c2);
9895
+ }
9817
9896
  }
9818
9897
  }
9819
9898
  }
@@ -10309,7 +10388,7 @@ If you want to remount the same app, move your app creation logic into a factory
10309
10388
  }
10310
10389
  if (extraAttrs.length) {
10311
10390
  warn$1(
10312
- `Extraneous non-props attributes (${extraAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.`
10391
+ `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.`
10313
10392
  );
10314
10393
  }
10315
10394
  if (eventAttrs.length) {
@@ -11170,9 +11249,9 @@ If you want to remount the same app, move your app creation logic into a factory
11170
11249
  currentBlock = blockStack[blockStack.length - 1] || null;
11171
11250
  }
11172
11251
  let isBlockTreeEnabled = 1;
11173
- function setBlockTracking(value) {
11252
+ function setBlockTracking(value, inVOnce = false) {
11174
11253
  isBlockTreeEnabled += value;
11175
- if (value < 0 && currentBlock) {
11254
+ if (value < 0 && currentBlock && inVOnce) {
11176
11255
  currentBlock.hasOnce = true;
11177
11256
  }
11178
11257
  }
@@ -11216,8 +11295,8 @@ If you want to remount the same app, move your app creation logic into a factory
11216
11295
  if (n2.shapeFlag & 6 && n1.component) {
11217
11296
  const dirtyInstances = hmrDirtyComponents.get(n2.type);
11218
11297
  if (dirtyInstances && dirtyInstances.has(n1.component)) {
11219
- n1.shapeFlag &= ~256;
11220
- n2.shapeFlag &= ~512;
11298
+ n1.shapeFlag &= -257;
11299
+ n2.shapeFlag &= -513;
11221
11300
  return false;
11222
11301
  }
11223
11302
  }
@@ -11676,7 +11755,7 @@ Component that was made reactive: `,
11676
11755
  const { props, children } = instance.vnode;
11677
11756
  const isStateful = isStatefulComponent(instance);
11678
11757
  initProps(instance, props, isStateful, isSSR);
11679
- initSlots(instance, children, optimized);
11758
+ initSlots(instance, children, optimized || isSSR);
11680
11759
  const setupResult = isStateful ? setupStatefulComponent(instance, isSSR) : void 0;
11681
11760
  isSSR && setInSSRSetupState(false);
11682
11761
  return setupResult;
@@ -12017,13 +12096,15 @@ Component that was made reactive: `,
12017
12096
  if (obj.__isVue) {
12018
12097
  return ["div", vueStyle, `VueInstance`];
12019
12098
  } else if (isRef(obj)) {
12099
+ pauseTracking();
12100
+ const value = obj.value;
12101
+ resetTracking();
12020
12102
  return [
12021
12103
  "div",
12022
12104
  {},
12023
12105
  ["span", vueStyle, genRefFlag(obj)],
12024
12106
  "<",
12025
- // avoid debugger accessing value affecting behavior
12026
- formatValue("_value" in obj ? obj._value : obj),
12107
+ formatValue(value),
12027
12108
  `>`
12028
12109
  ];
12029
12110
  } else if (isReactive(obj)) {
@@ -12204,7 +12285,7 @@ Component that was made reactive: `,
12204
12285
  return true;
12205
12286
  }
12206
12287
 
12207
- const version = "3.5.12";
12288
+ const version = "3.5.14";
12208
12289
  const warn = warn$1 ;
12209
12290
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
12210
12291
  const devtools = devtools$1 ;
@@ -12402,7 +12483,8 @@ Component that was made reactive: `,
12402
12483
  onAppear = onEnter,
12403
12484
  onAppearCancelled = onEnterCancelled
12404
12485
  } = baseProps;
12405
- const finishEnter = (el, isAppear, done) => {
12486
+ const finishEnter = (el, isAppear, done, isCancelled) => {
12487
+ el._enterCancelled = isCancelled;
12406
12488
  removeTransitionClass(el, isAppear ? appearToClass : enterToClass);
12407
12489
  removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass);
12408
12490
  done && done();
@@ -12460,8 +12542,13 @@ Component that was made reactive: `,
12460
12542
  if (legacyClassEnabled && legacyLeaveFromClass) {
12461
12543
  addTransitionClass(el, legacyLeaveFromClass);
12462
12544
  }
12463
- addTransitionClass(el, leaveActiveClass);
12464
- forceReflow();
12545
+ if (!el._enterCancelled) {
12546
+ forceReflow();
12547
+ addTransitionClass(el, leaveActiveClass);
12548
+ } else {
12549
+ addTransitionClass(el, leaveActiveClass);
12550
+ forceReflow();
12551
+ }
12465
12552
  nextFrame(() => {
12466
12553
  if (!el._isLeaving) {
12467
12554
  return;
@@ -12478,11 +12565,11 @@ Component that was made reactive: `,
12478
12565
  callHook(onLeave, [el, resolve]);
12479
12566
  },
12480
12567
  onEnterCancelled(el) {
12481
- finishEnter(el, false);
12568
+ finishEnter(el, false, void 0, true);
12482
12569
  callHook(onEnterCancelled, [el]);
12483
12570
  },
12484
12571
  onAppearCancelled(el) {
12485
- finishEnter(el, true);
12572
+ finishEnter(el, true, void 0, true);
12486
12573
  callHook(onAppearCancelled, [el]);
12487
12574
  },
12488
12575
  onLeaveCancelled(el) {
@@ -12695,10 +12782,11 @@ Component that was made reactive: `,
12695
12782
  }
12696
12783
  updateTeleports(vars);
12697
12784
  };
12698
- onBeforeMount(() => {
12699
- watchPostEffect(setVars);
12785
+ onBeforeUpdate(() => {
12786
+ queuePostFlushCb(setVars);
12700
12787
  });
12701
12788
  onMounted(() => {
12789
+ watch(setVars, NOOP, { flush: "post" });
12702
12790
  const ob = new MutationObserver(setVars);
12703
12791
  ob.observe(instance.subTree.el.parentNode, { childList: true });
12704
12792
  onUnmounted(() => ob.disconnect());
@@ -13084,7 +13172,7 @@ Expected function or array of functions, received type ${typeof value}.`
13084
13172
  }
13085
13173
  return false;
13086
13174
  }
13087
- if (key === "spellcheck" || key === "draggable" || key === "translate") {
13175
+ if (key === "spellcheck" || key === "draggable" || key === "translate" || key === "autocorrect") {
13088
13176
  return false;
13089
13177
  }
13090
13178
  if (key === "form") {
@@ -13349,6 +13437,8 @@ Expected function or array of functions, received type ${typeof value}.`
13349
13437
  this._update();
13350
13438
  }
13351
13439
  if (shouldReflect) {
13440
+ const ob = this._ob;
13441
+ ob && ob.disconnect();
13352
13442
  if (val === true) {
13353
13443
  this.setAttribute(hyphenate(key), "");
13354
13444
  } else if (typeof val === "string" || typeof val === "number") {
@@ -13356,6 +13446,7 @@ Expected function or array of functions, received type ${typeof value}.`
13356
13446
  } else if (!val) {
13357
13447
  this.removeAttribute(hyphenate(key));
13358
13448
  }
13449
+ ob && ob.observe(this, { attributes: true });
13359
13450
  }
13360
13451
  }
13361
13452
  }
@@ -13561,6 +13652,7 @@ Expected function or array of functions, received type ${typeof value}.`
13561
13652
  instance.vnode.el,
13562
13653
  moveClass
13563
13654
  )) {
13655
+ prevChildren = [];
13564
13656
  return;
13565
13657
  }
13566
13658
  prevChildren.forEach(callPendingCbs);
@@ -13584,6 +13676,7 @@ Expected function or array of functions, received type ${typeof value}.`
13584
13676
  };
13585
13677
  el.addEventListener("transitionend", cb);
13586
13678
  });
13679
+ prevChildren = [];
13587
13680
  });
13588
13681
  return () => {
13589
13682
  const rawProps = toRaw(props);
@@ -14578,12 +14671,13 @@ Make sure to use the production build (*.prod.js) when deploying for production.
14578
14671
  loc: locStub
14579
14672
  };
14580
14673
  }
14581
- function createCacheExpression(index, value, needPauseTracking = false) {
14674
+ function createCacheExpression(index, value, needPauseTracking = false, inVOnce = false) {
14582
14675
  return {
14583
14676
  type: 20,
14584
14677
  index,
14585
14678
  value,
14586
14679
  needPauseTracking,
14680
+ inVOnce,
14587
14681
  needArraySpread: false,
14588
14682
  loc: locStub
14589
14683
  };
@@ -16039,7 +16133,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
16039
16133
  "COMPILER_V_BIND_SYNC",
16040
16134
  currentOptions,
16041
16135
  currentProp.loc,
16042
- currentProp.rawName
16136
+ currentProp.arg.loc.source
16043
16137
  )) {
16044
16138
  currentProp.name = "model";
16045
16139
  currentProp.modifiers.splice(syncIndex, 1);
@@ -16615,6 +16709,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
16615
16709
  }
16616
16710
  }
16617
16711
  let cachedAsArray = false;
16712
+ const slotCacheKeys = [];
16618
16713
  if (toCache.length === children.length && node.type === 1) {
16619
16714
  if (node.tagType === 0 && node.codegenNode && node.codegenNode.type === 13 && isArray(node.codegenNode.children)) {
16620
16715
  node.codegenNode.children = getCacheExpression(
@@ -16624,6 +16719,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
16624
16719
  } else if (node.tagType === 1 && node.codegenNode && node.codegenNode.type === 13 && node.codegenNode.children && !isArray(node.codegenNode.children) && node.codegenNode.children.type === 15) {
16625
16720
  const slot = getSlotNode(node.codegenNode, "default");
16626
16721
  if (slot) {
16722
+ slotCacheKeys.push(context.cached.length);
16627
16723
  slot.returns = getCacheExpression(
16628
16724
  createArrayExpression(slot.returns)
16629
16725
  );
@@ -16633,6 +16729,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
16633
16729
  const slotName = findDir(node, "slot", true);
16634
16730
  const slot = slotName && slotName.arg && getSlotNode(parent.codegenNode, slotName.arg);
16635
16731
  if (slot) {
16732
+ slotCacheKeys.push(context.cached.length);
16636
16733
  slot.returns = getCacheExpression(
16637
16734
  createArrayExpression(slot.returns)
16638
16735
  );
@@ -16642,9 +16739,18 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
16642
16739
  }
16643
16740
  if (!cachedAsArray) {
16644
16741
  for (const child of toCache) {
16742
+ slotCacheKeys.push(context.cached.length);
16645
16743
  child.codegenNode = context.cache(child.codegenNode);
16646
16744
  }
16647
16745
  }
16746
+ if (slotCacheKeys.length && node.type === 1 && node.tagType === 1 && node.codegenNode && node.codegenNode.type === 13 && node.codegenNode.children && !isArray(node.codegenNode.children) && node.codegenNode.children.type === 15) {
16747
+ node.codegenNode.children.properties.push(
16748
+ createObjectProperty(
16749
+ `__`,
16750
+ createSimpleExpression(JSON.stringify(slotCacheKeys), false)
16751
+ )
16752
+ );
16753
+ }
16648
16754
  function getCacheExpression(value) {
16649
16755
  const exp = context.cache(value);
16650
16756
  if (inFor && context.hmr) {
@@ -16967,11 +17073,12 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
16967
17073
  identifier.hoisted = exp;
16968
17074
  return identifier;
16969
17075
  },
16970
- cache(exp, isVNode = false) {
17076
+ cache(exp, isVNode = false, inVOnce = false) {
16971
17077
  const cacheExp = createCacheExpression(
16972
17078
  context.cached.length,
16973
17079
  exp,
16974
- isVNode
17080
+ isVNode,
17081
+ inVOnce
16975
17082
  );
16976
17083
  context.cached.push(cacheExp);
16977
17084
  return cacheExp;
@@ -17684,7 +17791,9 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
17684
17791
  push(`_cache[${node.index}] || (`);
17685
17792
  if (needPauseTracking) {
17686
17793
  indent();
17687
- push(`${helper(SET_BLOCK_TRACKING)}(-1),`);
17794
+ push(`${helper(SET_BLOCK_TRACKING)}(-1`);
17795
+ if (node.inVOnce) push(`, true`);
17796
+ push(`),`);
17688
17797
  newline();
17689
17798
  push(`(`);
17690
17799
  }
@@ -17741,12 +17850,14 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
17741
17850
  context
17742
17851
  );
17743
17852
  } else if (node.type === 1) {
17853
+ const memo = findDir(node, "memo");
17744
17854
  for (let i = 0; i < node.props.length; i++) {
17745
17855
  const dir = node.props[i];
17746
17856
  if (dir.type === 7 && dir.name !== "for") {
17747
17857
  const exp = dir.exp;
17748
17858
  const arg = dir.arg;
17749
- if (exp && exp.type === 4 && !(dir.name === "on" && arg)) {
17859
+ if (exp && exp.type === 4 && !(dir.name === "on" && arg) && // key has been processed in transformFor(vMemo + vFor)
17860
+ !(memo && arg && arg.type === 4 && arg.content === "key")) {
17750
17861
  dir.exp = processExpression(
17751
17862
  exp,
17752
17863
  context,
@@ -18074,10 +18185,11 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
18074
18185
  const isTemplate = isTemplateNode(node);
18075
18186
  const memo = findDir(node, "memo");
18076
18187
  const keyProp = findProp(node, `key`, false, true);
18077
- if (keyProp && keyProp.type === 7 && !keyProp.exp) {
18188
+ const isDirKey = keyProp && keyProp.type === 7;
18189
+ if (isDirKey && !keyProp.exp) {
18078
18190
  transformBindShorthand(keyProp);
18079
18191
  }
18080
- const keyExp = keyProp && (keyProp.type === 6 ? keyProp.value ? createSimpleExpression(keyProp.value.content, true) : void 0 : keyProp.exp);
18192
+ let keyExp = keyProp && (keyProp.type === 6 ? keyProp.value ? createSimpleExpression(keyProp.value.content, true) : void 0 : keyProp.exp);
18081
18193
  const keyProperty = keyProp && keyExp ? createObjectProperty(`key`, keyExp) : null;
18082
18194
  const isStableFragment = forNode.source.type === 4 && forNode.source.constType > 0;
18083
18195
  const fragmentFlag = isStableFragment ? 64 : keyProp ? 128 : 256;
@@ -19316,8 +19428,8 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
19316
19428
  if (cur.codegenNode) {
19317
19429
  cur.codegenNode = context.cache(
19318
19430
  cur.codegenNode,
19431
+ true,
19319
19432
  true
19320
- /* isVNode */
19321
19433
  );
19322
19434
  }
19323
19435
  };
@@ -19339,8 +19451,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
19339
19451
  context.onError(createCompilerError(44, exp.loc));
19340
19452
  return createTransformProps();
19341
19453
  }
19342
- const maybeRef = false;
19343
- if (!expString.trim() || !isMemberExpression(exp) && !maybeRef) {
19454
+ if (!expString.trim() || !isMemberExpression(exp) && true) {
19344
19455
  context.onError(
19345
19456
  createCompilerError(42, exp.loc)
19346
19457
  );