@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
  **/
@@ -3675,6 +3675,7 @@ function createPathGetter(ctx, path) {
3675
3675
  };
3676
3676
  }
3677
3677
 
3678
+ const pendingMounts = /* @__PURE__ */ new WeakMap();
3678
3679
  const TeleportEndKey = /* @__PURE__ */ Symbol("_vte");
3679
3680
  const isTeleport = (type) => type.__isTeleport;
3680
3681
  const isTeleportDisabled = (props) => props && (props.disabled || props.disabled === "");
@@ -3716,91 +3717,86 @@ const TeleportImpl = {
3716
3717
  o: { insert, querySelector, createText, createComment }
3717
3718
  } = internals;
3718
3719
  const disabled = isTeleportDisabled(n2.props);
3719
- let { shapeFlag, children, dynamicChildren } = n2;
3720
+ let { dynamicChildren } = n2;
3720
3721
  if (!!(process.env.NODE_ENV !== "production") && isHmrUpdating) {
3721
3722
  optimized = false;
3722
3723
  dynamicChildren = null;
3723
3724
  }
3725
+ const mount = (vnode, container2, anchor2) => {
3726
+ if (vnode.shapeFlag & 16) {
3727
+ mountChildren(
3728
+ vnode.children,
3729
+ container2,
3730
+ anchor2,
3731
+ parentComponent,
3732
+ parentSuspense,
3733
+ namespace,
3734
+ slotScopeIds,
3735
+ optimized
3736
+ );
3737
+ }
3738
+ };
3739
+ const mountToTarget = (vnode = n2) => {
3740
+ const disabled2 = isTeleportDisabled(vnode.props);
3741
+ const target = vnode.target = resolveTarget(vnode.props, querySelector);
3742
+ const targetAnchor = prepareAnchor(target, vnode, createText, insert);
3743
+ if (target) {
3744
+ if (namespace !== "svg" && isTargetSVG(target)) {
3745
+ namespace = "svg";
3746
+ } else if (namespace !== "mathml" && isTargetMathML(target)) {
3747
+ namespace = "mathml";
3748
+ }
3749
+ if (parentComponent && parentComponent.isCE) {
3750
+ (parentComponent.ce._teleportTargets || (parentComponent.ce._teleportTargets = /* @__PURE__ */ new Set())).add(target);
3751
+ }
3752
+ if (!disabled2) {
3753
+ mount(vnode, target, targetAnchor);
3754
+ updateCssVars(vnode, false);
3755
+ }
3756
+ } else if (!!(process.env.NODE_ENV !== "production") && !disabled2) {
3757
+ warn$1("Invalid Teleport target on mount:", target, `(${typeof target})`);
3758
+ }
3759
+ };
3760
+ const queuePendingMount = (vnode) => {
3761
+ const mountJob = () => {
3762
+ if (pendingMounts.get(vnode) !== mountJob) return;
3763
+ pendingMounts.delete(vnode);
3764
+ if (isTeleportDisabled(vnode.props)) {
3765
+ mount(vnode, container, vnode.anchor);
3766
+ updateCssVars(vnode, true);
3767
+ }
3768
+ mountToTarget(vnode);
3769
+ };
3770
+ pendingMounts.set(vnode, mountJob);
3771
+ queuePostRenderEffect(mountJob, parentSuspense);
3772
+ };
3724
3773
  if (n1 == null) {
3725
3774
  const placeholder = n2.el = !!(process.env.NODE_ENV !== "production") ? createComment("teleport start") : createText("");
3726
3775
  const mainAnchor = n2.anchor = !!(process.env.NODE_ENV !== "production") ? createComment("teleport end") : createText("");
3727
3776
  insert(placeholder, container, anchor);
3728
3777
  insert(mainAnchor, container, anchor);
3729
- const mount = (container2, anchor2) => {
3730
- if (shapeFlag & 16) {
3731
- mountChildren(
3732
- children,
3733
- container2,
3734
- anchor2,
3735
- parentComponent,
3736
- parentSuspense,
3737
- namespace,
3738
- slotScopeIds,
3739
- optimized
3740
- );
3741
- }
3742
- };
3743
- const mountToTarget = () => {
3744
- const target = n2.target = resolveTarget(n2.props, querySelector);
3745
- const targetAnchor = prepareAnchor(target, n2, createText, insert);
3746
- if (target) {
3747
- if (namespace !== "svg" && isTargetSVG(target)) {
3748
- namespace = "svg";
3749
- } else if (namespace !== "mathml" && isTargetMathML(target)) {
3750
- namespace = "mathml";
3751
- }
3752
- if (parentComponent && parentComponent.isCE) {
3753
- (parentComponent.ce._teleportTargets || (parentComponent.ce._teleportTargets = /* @__PURE__ */ new Set())).add(target);
3754
- }
3755
- if (!disabled) {
3756
- mount(target, targetAnchor);
3757
- updateCssVars(n2, false);
3758
- }
3759
- } else if (!!(process.env.NODE_ENV !== "production") && !disabled) {
3760
- warn$1(
3761
- "Invalid Teleport target on mount:",
3762
- target,
3763
- `(${typeof target})`
3764
- );
3765
- }
3766
- };
3778
+ if (isTeleportDeferred(n2.props) || parentSuspense && parentSuspense.pendingBranch) {
3779
+ queuePendingMount(n2);
3780
+ return;
3781
+ }
3767
3782
  if (disabled) {
3768
- mount(container, mainAnchor);
3783
+ mount(n2, container, mainAnchor);
3769
3784
  updateCssVars(n2, true);
3770
3785
  }
3771
- if (isTeleportDeferred(n2.props) || parentSuspense && parentSuspense.pendingBranch) {
3772
- n2.el.__isMounted = false;
3773
- queuePostRenderEffect(() => {
3774
- if (n2.el.__isMounted !== false) return;
3775
- mountToTarget();
3776
- delete n2.el.__isMounted;
3777
- }, parentSuspense);
3778
- } else {
3779
- mountToTarget();
3780
- }
3786
+ mountToTarget();
3781
3787
  } else {
3782
3788
  n2.el = n1.el;
3783
- n2.targetStart = n1.targetStart;
3784
3789
  const mainAnchor = n2.anchor = n1.anchor;
3785
- const target = n2.target = n1.target;
3786
- const targetAnchor = n2.targetAnchor = n1.targetAnchor;
3787
- if (n1.el.__isMounted === false) {
3788
- queuePostRenderEffect(() => {
3789
- TeleportImpl.process(
3790
- n1,
3791
- n2,
3792
- container,
3793
- anchor,
3794
- parentComponent,
3795
- parentSuspense,
3796
- namespace,
3797
- slotScopeIds,
3798
- optimized,
3799
- internals
3800
- );
3801
- }, parentSuspense);
3790
+ const pendingMount = pendingMounts.get(n1);
3791
+ if (pendingMount) {
3792
+ pendingMount.flags |= 8;
3793
+ pendingMounts.delete(n1);
3794
+ queuePendingMount(n2);
3802
3795
  return;
3803
3796
  }
3797
+ n2.targetStart = n1.targetStart;
3798
+ const target = n2.target = n1.target;
3799
+ const targetAnchor = n2.targetAnchor = n1.targetAnchor;
3804
3800
  const wasDisabled = isTeleportDisabled(n1.props);
3805
3801
  const currentContainer = wasDisabled ? container : target;
3806
3802
  const currentAnchor = wasDisabled ? mainAnchor : targetAnchor;
@@ -3891,13 +3887,19 @@ const TeleportImpl = {
3891
3887
  target,
3892
3888
  props
3893
3889
  } = vnode;
3890
+ let shouldRemove = doRemove || !isTeleportDisabled(props);
3891
+ const pendingMount = pendingMounts.get(vnode);
3892
+ if (pendingMount) {
3893
+ pendingMount.flags |= 8;
3894
+ pendingMounts.delete(vnode);
3895
+ shouldRemove = false;
3896
+ }
3894
3897
  if (target) {
3895
3898
  hostRemove(targetStart);
3896
3899
  hostRemove(targetAnchor);
3897
3900
  }
3898
3901
  doRemove && hostRemove(anchor);
3899
3902
  if (shapeFlag & 16) {
3900
- const shouldRemove = doRemove || !isTeleportDisabled(props);
3901
3903
  for (let i = 0; i < children.length; i++) {
3902
3904
  const child = children[i];
3903
3905
  unmount(
@@ -7478,7 +7480,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
7478
7480
  return vm;
7479
7481
  }
7480
7482
  }
7481
- Vue.version = `2.6.14-compat:${"3.5.31"}`;
7483
+ Vue.version = `2.6.14-compat:${"3.5.32"}`;
7482
7484
  Vue.config = singletonApp.config;
7483
7485
  Vue.use = (plugin, ...options) => {
7484
7486
  if (plugin && isFunction(plugin.install)) {
@@ -11350,6 +11352,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
11350
11352
  if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) {
11351
11353
  return;
11352
11354
  }
11355
+ unsetCurrentInstance();
11353
11356
  instance.asyncResolved = true;
11354
11357
  const { vnode: vnode2 } = instance;
11355
11358
  if (!!(process.env.NODE_ENV !== "production")) {
@@ -12647,7 +12650,7 @@ function isMemoSame(cached, memo) {
12647
12650
  return true;
12648
12651
  }
12649
12652
 
12650
- const version = "3.5.31";
12653
+ const version = "3.5.32";
12651
12654
  const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
12652
12655
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
12653
12656
  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
  **/
@@ -3632,6 +3632,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
3632
3632
  };
3633
3633
  }
3634
3634
 
3635
+ const pendingMounts = /* @__PURE__ */ new WeakMap();
3635
3636
  const TeleportEndKey = /* @__PURE__ */ Symbol("_vte");
3636
3637
  const isTeleport = (type) => type.__isTeleport;
3637
3638
  const isTeleportDisabled = (props) => props && (props.disabled || props.disabled === "");
@@ -3673,91 +3674,86 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
3673
3674
  o: { insert, querySelector, createText, createComment }
3674
3675
  } = internals;
3675
3676
  const disabled = isTeleportDisabled(n2.props);
3676
- let { shapeFlag, children, dynamicChildren } = n2;
3677
+ let { dynamicChildren } = n2;
3677
3678
  if (isHmrUpdating) {
3678
3679
  optimized = false;
3679
3680
  dynamicChildren = null;
3680
3681
  }
3682
+ const mount = (vnode, container2, anchor2) => {
3683
+ if (vnode.shapeFlag & 16) {
3684
+ mountChildren(
3685
+ vnode.children,
3686
+ container2,
3687
+ anchor2,
3688
+ parentComponent,
3689
+ parentSuspense,
3690
+ namespace,
3691
+ slotScopeIds,
3692
+ optimized
3693
+ );
3694
+ }
3695
+ };
3696
+ const mountToTarget = (vnode = n2) => {
3697
+ const disabled2 = isTeleportDisabled(vnode.props);
3698
+ const target = vnode.target = resolveTarget(vnode.props, querySelector);
3699
+ const targetAnchor = prepareAnchor(target, vnode, createText, insert);
3700
+ if (target) {
3701
+ if (namespace !== "svg" && isTargetSVG(target)) {
3702
+ namespace = "svg";
3703
+ } else if (namespace !== "mathml" && isTargetMathML(target)) {
3704
+ namespace = "mathml";
3705
+ }
3706
+ if (parentComponent && parentComponent.isCE) {
3707
+ (parentComponent.ce._teleportTargets || (parentComponent.ce._teleportTargets = /* @__PURE__ */ new Set())).add(target);
3708
+ }
3709
+ if (!disabled2) {
3710
+ mount(vnode, target, targetAnchor);
3711
+ updateCssVars(vnode, false);
3712
+ }
3713
+ } else if (!disabled2) {
3714
+ warn$1("Invalid Teleport target on mount:", target, `(${typeof target})`);
3715
+ }
3716
+ };
3717
+ const queuePendingMount = (vnode) => {
3718
+ const mountJob = () => {
3719
+ if (pendingMounts.get(vnode) !== mountJob) return;
3720
+ pendingMounts.delete(vnode);
3721
+ if (isTeleportDisabled(vnode.props)) {
3722
+ mount(vnode, container, vnode.anchor);
3723
+ updateCssVars(vnode, true);
3724
+ }
3725
+ mountToTarget(vnode);
3726
+ };
3727
+ pendingMounts.set(vnode, mountJob);
3728
+ queuePostRenderEffect(mountJob, parentSuspense);
3729
+ };
3681
3730
  if (n1 == null) {
3682
3731
  const placeholder = n2.el = createComment("teleport start") ;
3683
3732
  const mainAnchor = n2.anchor = createComment("teleport end") ;
3684
3733
  insert(placeholder, container, anchor);
3685
3734
  insert(mainAnchor, container, anchor);
3686
- const mount = (container2, anchor2) => {
3687
- if (shapeFlag & 16) {
3688
- mountChildren(
3689
- children,
3690
- container2,
3691
- anchor2,
3692
- parentComponent,
3693
- parentSuspense,
3694
- namespace,
3695
- slotScopeIds,
3696
- optimized
3697
- );
3698
- }
3699
- };
3700
- const mountToTarget = () => {
3701
- const target = n2.target = resolveTarget(n2.props, querySelector);
3702
- const targetAnchor = prepareAnchor(target, n2, createText, insert);
3703
- if (target) {
3704
- if (namespace !== "svg" && isTargetSVG(target)) {
3705
- namespace = "svg";
3706
- } else if (namespace !== "mathml" && isTargetMathML(target)) {
3707
- namespace = "mathml";
3708
- }
3709
- if (parentComponent && parentComponent.isCE) {
3710
- (parentComponent.ce._teleportTargets || (parentComponent.ce._teleportTargets = /* @__PURE__ */ new Set())).add(target);
3711
- }
3712
- if (!disabled) {
3713
- mount(target, targetAnchor);
3714
- updateCssVars(n2, false);
3715
- }
3716
- } else if (!disabled) {
3717
- warn$1(
3718
- "Invalid Teleport target on mount:",
3719
- target,
3720
- `(${typeof target})`
3721
- );
3722
- }
3723
- };
3735
+ if (isTeleportDeferred(n2.props) || parentSuspense && parentSuspense.pendingBranch) {
3736
+ queuePendingMount(n2);
3737
+ return;
3738
+ }
3724
3739
  if (disabled) {
3725
- mount(container, mainAnchor);
3740
+ mount(n2, container, mainAnchor);
3726
3741
  updateCssVars(n2, true);
3727
3742
  }
3728
- if (isTeleportDeferred(n2.props) || parentSuspense && parentSuspense.pendingBranch) {
3729
- n2.el.__isMounted = false;
3730
- queuePostRenderEffect(() => {
3731
- if (n2.el.__isMounted !== false) return;
3732
- mountToTarget();
3733
- delete n2.el.__isMounted;
3734
- }, parentSuspense);
3735
- } else {
3736
- mountToTarget();
3737
- }
3743
+ mountToTarget();
3738
3744
  } else {
3739
3745
  n2.el = n1.el;
3740
- n2.targetStart = n1.targetStart;
3741
3746
  const mainAnchor = n2.anchor = n1.anchor;
3742
- const target = n2.target = n1.target;
3743
- const targetAnchor = n2.targetAnchor = n1.targetAnchor;
3744
- if (n1.el.__isMounted === false) {
3745
- queuePostRenderEffect(() => {
3746
- TeleportImpl.process(
3747
- n1,
3748
- n2,
3749
- container,
3750
- anchor,
3751
- parentComponent,
3752
- parentSuspense,
3753
- namespace,
3754
- slotScopeIds,
3755
- optimized,
3756
- internals
3757
- );
3758
- }, parentSuspense);
3747
+ const pendingMount = pendingMounts.get(n1);
3748
+ if (pendingMount) {
3749
+ pendingMount.flags |= 8;
3750
+ pendingMounts.delete(n1);
3751
+ queuePendingMount(n2);
3759
3752
  return;
3760
3753
  }
3754
+ n2.targetStart = n1.targetStart;
3755
+ const target = n2.target = n1.target;
3756
+ const targetAnchor = n2.targetAnchor = n1.targetAnchor;
3761
3757
  const wasDisabled = isTeleportDisabled(n1.props);
3762
3758
  const currentContainer = wasDisabled ? container : target;
3763
3759
  const currentAnchor = wasDisabled ? mainAnchor : targetAnchor;
@@ -3848,13 +3844,19 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
3848
3844
  target,
3849
3845
  props
3850
3846
  } = vnode;
3847
+ let shouldRemove = doRemove || !isTeleportDisabled(props);
3848
+ const pendingMount = pendingMounts.get(vnode);
3849
+ if (pendingMount) {
3850
+ pendingMount.flags |= 8;
3851
+ pendingMounts.delete(vnode);
3852
+ shouldRemove = false;
3853
+ }
3851
3854
  if (target) {
3852
3855
  hostRemove(targetStart);
3853
3856
  hostRemove(targetAnchor);
3854
3857
  }
3855
3858
  doRemove && hostRemove(anchor);
3856
3859
  if (shapeFlag & 16) {
3857
- const shouldRemove = doRemove || !isTeleportDisabled(props);
3858
3860
  for (let i = 0; i < children.length; i++) {
3859
3861
  const child = children[i];
3860
3862
  unmount(
@@ -7412,7 +7414,7 @@ If this is a native custom element, make sure to exclude it from component resol
7412
7414
  return vm;
7413
7415
  }
7414
7416
  }
7415
- Vue.version = `2.6.14-compat:${"3.5.31"}`;
7417
+ Vue.version = `2.6.14-compat:${"3.5.32"}`;
7416
7418
  Vue.config = singletonApp.config;
7417
7419
  Vue.use = (plugin, ...options) => {
7418
7420
  if (plugin && isFunction(plugin.install)) {
@@ -11244,6 +11246,7 @@ If you want to remount the same app, move your app creation logic into a factory
11244
11246
  if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) {
11245
11247
  return;
11246
11248
  }
11249
+ unsetCurrentInstance();
11247
11250
  instance.asyncResolved = true;
11248
11251
  const { vnode: vnode2 } = instance;
11249
11252
  {
@@ -12513,7 +12516,7 @@ Component that was made reactive: `,
12513
12516
  return true;
12514
12517
  }
12515
12518
 
12516
- const version = "3.5.31";
12519
+ const version = "3.5.32";
12517
12520
  const warn = warn$1 ;
12518
12521
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
12519
12522
  const devtools = devtools$1 ;