@vue/compat 3.5.31 → 3.5.32

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.31
2
+ * @vue/compat v3.5.32
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -3748,6 +3748,7 @@ function createPathGetter(ctx, path) {
3748
3748
  };
3749
3749
  }
3750
3750
 
3751
+ const pendingMounts = /* @__PURE__ */ new WeakMap();
3751
3752
  const TeleportEndKey = /* @__PURE__ */ Symbol("_vte");
3752
3753
  const isTeleport = (type) => type.__isTeleport;
3753
3754
  const isTeleportDisabled = (props) => props && (props.disabled || props.disabled === "");
@@ -3789,91 +3790,86 @@ const TeleportImpl = {
3789
3790
  o: { insert, querySelector, createText, createComment }
3790
3791
  } = internals;
3791
3792
  const disabled = isTeleportDisabled(n2.props);
3792
- let { shapeFlag, children, dynamicChildren } = n2;
3793
+ let { dynamicChildren } = n2;
3793
3794
  if (!!(process.env.NODE_ENV !== "production") && isHmrUpdating) {
3794
3795
  optimized = false;
3795
3796
  dynamicChildren = null;
3796
3797
  }
3798
+ const mount = (vnode, container2, anchor2) => {
3799
+ if (vnode.shapeFlag & 16) {
3800
+ mountChildren(
3801
+ vnode.children,
3802
+ container2,
3803
+ anchor2,
3804
+ parentComponent,
3805
+ parentSuspense,
3806
+ namespace,
3807
+ slotScopeIds,
3808
+ optimized
3809
+ );
3810
+ }
3811
+ };
3812
+ const mountToTarget = (vnode = n2) => {
3813
+ const disabled2 = isTeleportDisabled(vnode.props);
3814
+ const target = vnode.target = resolveTarget(vnode.props, querySelector);
3815
+ const targetAnchor = prepareAnchor(target, vnode, createText, insert);
3816
+ if (target) {
3817
+ if (namespace !== "svg" && isTargetSVG(target)) {
3818
+ namespace = "svg";
3819
+ } else if (namespace !== "mathml" && isTargetMathML(target)) {
3820
+ namespace = "mathml";
3821
+ }
3822
+ if (parentComponent && parentComponent.isCE) {
3823
+ (parentComponent.ce._teleportTargets || (parentComponent.ce._teleportTargets = /* @__PURE__ */ new Set())).add(target);
3824
+ }
3825
+ if (!disabled2) {
3826
+ mount(vnode, target, targetAnchor);
3827
+ updateCssVars(vnode, false);
3828
+ }
3829
+ } else if (!!(process.env.NODE_ENV !== "production") && !disabled2) {
3830
+ warn$1("Invalid Teleport target on mount:", target, `(${typeof target})`);
3831
+ }
3832
+ };
3833
+ const queuePendingMount = (vnode) => {
3834
+ const mountJob = () => {
3835
+ if (pendingMounts.get(vnode) !== mountJob) return;
3836
+ pendingMounts.delete(vnode);
3837
+ if (isTeleportDisabled(vnode.props)) {
3838
+ mount(vnode, container, vnode.anchor);
3839
+ updateCssVars(vnode, true);
3840
+ }
3841
+ mountToTarget(vnode);
3842
+ };
3843
+ pendingMounts.set(vnode, mountJob);
3844
+ queuePostRenderEffect(mountJob, parentSuspense);
3845
+ };
3797
3846
  if (n1 == null) {
3798
3847
  const placeholder = n2.el = !!(process.env.NODE_ENV !== "production") ? createComment("teleport start") : createText("");
3799
3848
  const mainAnchor = n2.anchor = !!(process.env.NODE_ENV !== "production") ? createComment("teleport end") : createText("");
3800
3849
  insert(placeholder, container, anchor);
3801
3850
  insert(mainAnchor, container, anchor);
3802
- const mount = (container2, anchor2) => {
3803
- if (shapeFlag & 16) {
3804
- mountChildren(
3805
- children,
3806
- container2,
3807
- anchor2,
3808
- parentComponent,
3809
- parentSuspense,
3810
- namespace,
3811
- slotScopeIds,
3812
- optimized
3813
- );
3814
- }
3815
- };
3816
- const mountToTarget = () => {
3817
- const target = n2.target = resolveTarget(n2.props, querySelector);
3818
- const targetAnchor = prepareAnchor(target, n2, createText, insert);
3819
- if (target) {
3820
- if (namespace !== "svg" && isTargetSVG(target)) {
3821
- namespace = "svg";
3822
- } else if (namespace !== "mathml" && isTargetMathML(target)) {
3823
- namespace = "mathml";
3824
- }
3825
- if (parentComponent && parentComponent.isCE) {
3826
- (parentComponent.ce._teleportTargets || (parentComponent.ce._teleportTargets = /* @__PURE__ */ new Set())).add(target);
3827
- }
3828
- if (!disabled) {
3829
- mount(target, targetAnchor);
3830
- updateCssVars(n2, false);
3831
- }
3832
- } else if (!!(process.env.NODE_ENV !== "production") && !disabled) {
3833
- warn$1(
3834
- "Invalid Teleport target on mount:",
3835
- target,
3836
- `(${typeof target})`
3837
- );
3838
- }
3839
- };
3851
+ if (isTeleportDeferred(n2.props) || parentSuspense && parentSuspense.pendingBranch) {
3852
+ queuePendingMount(n2);
3853
+ return;
3854
+ }
3840
3855
  if (disabled) {
3841
- mount(container, mainAnchor);
3856
+ mount(n2, container, mainAnchor);
3842
3857
  updateCssVars(n2, true);
3843
3858
  }
3844
- if (isTeleportDeferred(n2.props) || parentSuspense && parentSuspense.pendingBranch) {
3845
- n2.el.__isMounted = false;
3846
- queuePostRenderEffect(() => {
3847
- if (n2.el.__isMounted !== false) return;
3848
- mountToTarget();
3849
- delete n2.el.__isMounted;
3850
- }, parentSuspense);
3851
- } else {
3852
- mountToTarget();
3853
- }
3859
+ mountToTarget();
3854
3860
  } else {
3855
3861
  n2.el = n1.el;
3856
- n2.targetStart = n1.targetStart;
3857
3862
  const mainAnchor = n2.anchor = n1.anchor;
3858
- const target = n2.target = n1.target;
3859
- const targetAnchor = n2.targetAnchor = n1.targetAnchor;
3860
- if (n1.el.__isMounted === false) {
3861
- queuePostRenderEffect(() => {
3862
- TeleportImpl.process(
3863
- n1,
3864
- n2,
3865
- container,
3866
- anchor,
3867
- parentComponent,
3868
- parentSuspense,
3869
- namespace,
3870
- slotScopeIds,
3871
- optimized,
3872
- internals
3873
- );
3874
- }, parentSuspense);
3863
+ const pendingMount = pendingMounts.get(n1);
3864
+ if (pendingMount) {
3865
+ pendingMount.flags |= 8;
3866
+ pendingMounts.delete(n1);
3867
+ queuePendingMount(n2);
3875
3868
  return;
3876
3869
  }
3870
+ n2.targetStart = n1.targetStart;
3871
+ const target = n2.target = n1.target;
3872
+ const targetAnchor = n2.targetAnchor = n1.targetAnchor;
3877
3873
  const wasDisabled = isTeleportDisabled(n1.props);
3878
3874
  const currentContainer = wasDisabled ? container : target;
3879
3875
  const currentAnchor = wasDisabled ? mainAnchor : targetAnchor;
@@ -3964,13 +3960,19 @@ const TeleportImpl = {
3964
3960
  target,
3965
3961
  props
3966
3962
  } = vnode;
3963
+ let shouldRemove = doRemove || !isTeleportDisabled(props);
3964
+ const pendingMount = pendingMounts.get(vnode);
3965
+ if (pendingMount) {
3966
+ pendingMount.flags |= 8;
3967
+ pendingMounts.delete(vnode);
3968
+ shouldRemove = false;
3969
+ }
3967
3970
  if (target) {
3968
3971
  hostRemove(targetStart);
3969
3972
  hostRemove(targetAnchor);
3970
3973
  }
3971
3974
  doRemove && hostRemove(anchor);
3972
3975
  if (shapeFlag & 16) {
3973
- const shouldRemove = doRemove || !isTeleportDisabled(props);
3974
3976
  for (let i = 0; i < children.length; i++) {
3975
3977
  const child = children[i];
3976
3978
  unmount(
@@ -7551,7 +7553,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
7551
7553
  return vm;
7552
7554
  }
7553
7555
  }
7554
- Vue.version = `2.6.14-compat:${"3.5.31"}`;
7556
+ Vue.version = `2.6.14-compat:${"3.5.32"}`;
7555
7557
  Vue.config = singletonApp.config;
7556
7558
  Vue.use = (plugin, ...options) => {
7557
7559
  if (plugin && isFunction(plugin.install)) {
@@ -11423,6 +11425,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
11423
11425
  if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) {
11424
11426
  return;
11425
11427
  }
11428
+ unsetCurrentInstance();
11426
11429
  instance.asyncResolved = true;
11427
11430
  const { vnode: vnode2 } = instance;
11428
11431
  if (!!(process.env.NODE_ENV !== "production")) {
@@ -12720,7 +12723,7 @@ function isMemoSame(cached, memo) {
12720
12723
  return true;
12721
12724
  }
12722
12725
 
12723
- const version = "3.5.31";
12726
+ const version = "3.5.32";
12724
12727
  const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
12725
12728
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
12726
12729
  const devtools = !!(process.env.NODE_ENV !== "production") || true ? devtools$1 : void 0;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/compat v3.5.31
2
+ * @vue/compat v3.5.32
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -3705,6 +3705,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
3705
3705
  };
3706
3706
  }
3707
3707
 
3708
+ const pendingMounts = /* @__PURE__ */ new WeakMap();
3708
3709
  const TeleportEndKey = /* @__PURE__ */ Symbol("_vte");
3709
3710
  const isTeleport = (type) => type.__isTeleport;
3710
3711
  const isTeleportDisabled = (props) => props && (props.disabled || props.disabled === "");
@@ -3746,91 +3747,86 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
3746
3747
  o: { insert, querySelector, createText, createComment }
3747
3748
  } = internals;
3748
3749
  const disabled = isTeleportDisabled(n2.props);
3749
- let { shapeFlag, children, dynamicChildren } = n2;
3750
+ let { dynamicChildren } = n2;
3750
3751
  if (isHmrUpdating) {
3751
3752
  optimized = false;
3752
3753
  dynamicChildren = null;
3753
3754
  }
3755
+ const mount = (vnode, container2, anchor2) => {
3756
+ if (vnode.shapeFlag & 16) {
3757
+ mountChildren(
3758
+ vnode.children,
3759
+ container2,
3760
+ anchor2,
3761
+ parentComponent,
3762
+ parentSuspense,
3763
+ namespace,
3764
+ slotScopeIds,
3765
+ optimized
3766
+ );
3767
+ }
3768
+ };
3769
+ const mountToTarget = (vnode = n2) => {
3770
+ const disabled2 = isTeleportDisabled(vnode.props);
3771
+ const target = vnode.target = resolveTarget(vnode.props, querySelector);
3772
+ const targetAnchor = prepareAnchor(target, vnode, createText, insert);
3773
+ if (target) {
3774
+ if (namespace !== "svg" && isTargetSVG(target)) {
3775
+ namespace = "svg";
3776
+ } else if (namespace !== "mathml" && isTargetMathML(target)) {
3777
+ namespace = "mathml";
3778
+ }
3779
+ if (parentComponent && parentComponent.isCE) {
3780
+ (parentComponent.ce._teleportTargets || (parentComponent.ce._teleportTargets = /* @__PURE__ */ new Set())).add(target);
3781
+ }
3782
+ if (!disabled2) {
3783
+ mount(vnode, target, targetAnchor);
3784
+ updateCssVars(vnode, false);
3785
+ }
3786
+ } else if (!disabled2) {
3787
+ warn$1("Invalid Teleport target on mount:", target, `(${typeof target})`);
3788
+ }
3789
+ };
3790
+ const queuePendingMount = (vnode) => {
3791
+ const mountJob = () => {
3792
+ if (pendingMounts.get(vnode) !== mountJob) return;
3793
+ pendingMounts.delete(vnode);
3794
+ if (isTeleportDisabled(vnode.props)) {
3795
+ mount(vnode, container, vnode.anchor);
3796
+ updateCssVars(vnode, true);
3797
+ }
3798
+ mountToTarget(vnode);
3799
+ };
3800
+ pendingMounts.set(vnode, mountJob);
3801
+ queuePostRenderEffect(mountJob, parentSuspense);
3802
+ };
3754
3803
  if (n1 == null) {
3755
3804
  const placeholder = n2.el = createComment("teleport start") ;
3756
3805
  const mainAnchor = n2.anchor = createComment("teleport end") ;
3757
3806
  insert(placeholder, container, anchor);
3758
3807
  insert(mainAnchor, container, anchor);
3759
- const mount = (container2, anchor2) => {
3760
- if (shapeFlag & 16) {
3761
- mountChildren(
3762
- children,
3763
- container2,
3764
- anchor2,
3765
- parentComponent,
3766
- parentSuspense,
3767
- namespace,
3768
- slotScopeIds,
3769
- optimized
3770
- );
3771
- }
3772
- };
3773
- const mountToTarget = () => {
3774
- const target = n2.target = resolveTarget(n2.props, querySelector);
3775
- const targetAnchor = prepareAnchor(target, n2, createText, insert);
3776
- if (target) {
3777
- if (namespace !== "svg" && isTargetSVG(target)) {
3778
- namespace = "svg";
3779
- } else if (namespace !== "mathml" && isTargetMathML(target)) {
3780
- namespace = "mathml";
3781
- }
3782
- if (parentComponent && parentComponent.isCE) {
3783
- (parentComponent.ce._teleportTargets || (parentComponent.ce._teleportTargets = /* @__PURE__ */ new Set())).add(target);
3784
- }
3785
- if (!disabled) {
3786
- mount(target, targetAnchor);
3787
- updateCssVars(n2, false);
3788
- }
3789
- } else if (!disabled) {
3790
- warn$1(
3791
- "Invalid Teleport target on mount:",
3792
- target,
3793
- `(${typeof target})`
3794
- );
3795
- }
3796
- };
3808
+ if (isTeleportDeferred(n2.props) || parentSuspense && parentSuspense.pendingBranch) {
3809
+ queuePendingMount(n2);
3810
+ return;
3811
+ }
3797
3812
  if (disabled) {
3798
- mount(container, mainAnchor);
3813
+ mount(n2, container, mainAnchor);
3799
3814
  updateCssVars(n2, true);
3800
3815
  }
3801
- if (isTeleportDeferred(n2.props) || parentSuspense && parentSuspense.pendingBranch) {
3802
- n2.el.__isMounted = false;
3803
- queuePostRenderEffect(() => {
3804
- if (n2.el.__isMounted !== false) return;
3805
- mountToTarget();
3806
- delete n2.el.__isMounted;
3807
- }, parentSuspense);
3808
- } else {
3809
- mountToTarget();
3810
- }
3816
+ mountToTarget();
3811
3817
  } else {
3812
3818
  n2.el = n1.el;
3813
- n2.targetStart = n1.targetStart;
3814
3819
  const mainAnchor = n2.anchor = n1.anchor;
3815
- const target = n2.target = n1.target;
3816
- const targetAnchor = n2.targetAnchor = n1.targetAnchor;
3817
- if (n1.el.__isMounted === false) {
3818
- queuePostRenderEffect(() => {
3819
- TeleportImpl.process(
3820
- n1,
3821
- n2,
3822
- container,
3823
- anchor,
3824
- parentComponent,
3825
- parentSuspense,
3826
- namespace,
3827
- slotScopeIds,
3828
- optimized,
3829
- internals
3830
- );
3831
- }, parentSuspense);
3820
+ const pendingMount = pendingMounts.get(n1);
3821
+ if (pendingMount) {
3822
+ pendingMount.flags |= 8;
3823
+ pendingMounts.delete(n1);
3824
+ queuePendingMount(n2);
3832
3825
  return;
3833
3826
  }
3827
+ n2.targetStart = n1.targetStart;
3828
+ const target = n2.target = n1.target;
3829
+ const targetAnchor = n2.targetAnchor = n1.targetAnchor;
3834
3830
  const wasDisabled = isTeleportDisabled(n1.props);
3835
3831
  const currentContainer = wasDisabled ? container : target;
3836
3832
  const currentAnchor = wasDisabled ? mainAnchor : targetAnchor;
@@ -3921,13 +3917,19 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
3921
3917
  target,
3922
3918
  props
3923
3919
  } = vnode;
3920
+ let shouldRemove = doRemove || !isTeleportDisabled(props);
3921
+ const pendingMount = pendingMounts.get(vnode);
3922
+ if (pendingMount) {
3923
+ pendingMount.flags |= 8;
3924
+ pendingMounts.delete(vnode);
3925
+ shouldRemove = false;
3926
+ }
3924
3927
  if (target) {
3925
3928
  hostRemove(targetStart);
3926
3929
  hostRemove(targetAnchor);
3927
3930
  }
3928
3931
  doRemove && hostRemove(anchor);
3929
3932
  if (shapeFlag & 16) {
3930
- const shouldRemove = doRemove || !isTeleportDisabled(props);
3931
3933
  for (let i = 0; i < children.length; i++) {
3932
3934
  const child = children[i];
3933
3935
  unmount(
@@ -7485,7 +7487,7 @@ If this is a native custom element, make sure to exclude it from component resol
7485
7487
  return vm;
7486
7488
  }
7487
7489
  }
7488
- Vue.version = `2.6.14-compat:${"3.5.31"}`;
7490
+ Vue.version = `2.6.14-compat:${"3.5.32"}`;
7489
7491
  Vue.config = singletonApp.config;
7490
7492
  Vue.use = (plugin, ...options) => {
7491
7493
  if (plugin && isFunction(plugin.install)) {
@@ -11317,6 +11319,7 @@ If you want to remount the same app, move your app creation logic into a factory
11317
11319
  if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) {
11318
11320
  return;
11319
11321
  }
11322
+ unsetCurrentInstance();
11320
11323
  instance.asyncResolved = true;
11321
11324
  const { vnode: vnode2 } = instance;
11322
11325
  {
@@ -12586,7 +12589,7 @@ Component that was made reactive: `,
12586
12589
  return true;
12587
12590
  }
12588
12591
 
12589
- const version = "3.5.31";
12592
+ const version = "3.5.32";
12590
12593
  const warn = warn$1 ;
12591
12594
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
12592
12595
  const devtools = devtools$1 ;