@vue/runtime-core 3.5.31 → 3.5.33

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/runtime-core v3.5.31
2
+ * @vue/runtime-core v3.5.33
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -945,6 +945,7 @@ function createPathGetter(ctx, path) {
945
945
  };
946
946
  }
947
947
 
948
+ const pendingMounts = /* @__PURE__ */ new WeakMap();
948
949
  const TeleportEndKey = /* @__PURE__ */ Symbol("_vte");
949
950
  const isTeleport = (type) => type.__isTeleport;
950
951
  const isTeleportDisabled = (props) => props && (props.disabled || props.disabled === "");
@@ -983,94 +984,90 @@ const TeleportImpl = {
983
984
  mc: mountChildren,
984
985
  pc: patchChildren,
985
986
  pbc: patchBlockChildren,
986
- o: { insert, querySelector, createText, createComment }
987
+ o: { insert, querySelector, createText, createComment, parentNode }
987
988
  } = internals;
988
989
  const disabled = isTeleportDisabled(n2.props);
989
- let { shapeFlag, children, dynamicChildren } = n2;
990
+ let { dynamicChildren } = n2;
990
991
  if (isHmrUpdating) {
991
992
  optimized = false;
992
993
  dynamicChildren = null;
993
994
  }
995
+ const mount = (vnode, container2, anchor2) => {
996
+ if (vnode.shapeFlag & 16) {
997
+ mountChildren(
998
+ vnode.children,
999
+ container2,
1000
+ anchor2,
1001
+ parentComponent,
1002
+ parentSuspense,
1003
+ namespace,
1004
+ slotScopeIds,
1005
+ optimized
1006
+ );
1007
+ }
1008
+ };
1009
+ const mountToTarget = (vnode = n2) => {
1010
+ const disabled2 = isTeleportDisabled(vnode.props);
1011
+ const target = vnode.target = resolveTarget(vnode.props, querySelector);
1012
+ const targetAnchor = prepareAnchor(target, vnode, createText, insert);
1013
+ if (target) {
1014
+ if (namespace !== "svg" && isTargetSVG(target)) {
1015
+ namespace = "svg";
1016
+ } else if (namespace !== "mathml" && isTargetMathML(target)) {
1017
+ namespace = "mathml";
1018
+ }
1019
+ if (parentComponent && parentComponent.isCE) {
1020
+ (parentComponent.ce._teleportTargets || (parentComponent.ce._teleportTargets = /* @__PURE__ */ new Set())).add(target);
1021
+ }
1022
+ if (!disabled2) {
1023
+ mount(vnode, target, targetAnchor);
1024
+ updateCssVars(vnode, false);
1025
+ }
1026
+ } else if (!disabled2) {
1027
+ warn$1("Invalid Teleport target on mount:", target, `(${typeof target})`);
1028
+ }
1029
+ };
1030
+ const queuePendingMount = (vnode) => {
1031
+ const mountJob = () => {
1032
+ if (pendingMounts.get(vnode) !== mountJob) return;
1033
+ pendingMounts.delete(vnode);
1034
+ if (isTeleportDisabled(vnode.props)) {
1035
+ const mountContainer = parentNode(vnode.el) || container;
1036
+ mount(vnode, mountContainer, vnode.anchor);
1037
+ updateCssVars(vnode, true);
1038
+ }
1039
+ mountToTarget(vnode);
1040
+ };
1041
+ pendingMounts.set(vnode, mountJob);
1042
+ queuePostRenderEffect(mountJob, parentSuspense);
1043
+ };
994
1044
  if (n1 == null) {
995
1045
  const placeholder = n2.el = createComment("teleport start") ;
996
1046
  const mainAnchor = n2.anchor = createComment("teleport end") ;
997
1047
  insert(placeholder, container, anchor);
998
1048
  insert(mainAnchor, container, anchor);
999
- const mount = (container2, anchor2) => {
1000
- if (shapeFlag & 16) {
1001
- mountChildren(
1002
- children,
1003
- container2,
1004
- anchor2,
1005
- parentComponent,
1006
- parentSuspense,
1007
- namespace,
1008
- slotScopeIds,
1009
- optimized
1010
- );
1011
- }
1012
- };
1013
- const mountToTarget = () => {
1014
- const target = n2.target = resolveTarget(n2.props, querySelector);
1015
- const targetAnchor = prepareAnchor(target, n2, createText, insert);
1016
- if (target) {
1017
- if (namespace !== "svg" && isTargetSVG(target)) {
1018
- namespace = "svg";
1019
- } else if (namespace !== "mathml" && isTargetMathML(target)) {
1020
- namespace = "mathml";
1021
- }
1022
- if (parentComponent && parentComponent.isCE) {
1023
- (parentComponent.ce._teleportTargets || (parentComponent.ce._teleportTargets = /* @__PURE__ */ new Set())).add(target);
1024
- }
1025
- if (!disabled) {
1026
- mount(target, targetAnchor);
1027
- updateCssVars(n2, false);
1028
- }
1029
- } else if (!disabled) {
1030
- warn$1(
1031
- "Invalid Teleport target on mount:",
1032
- target,
1033
- `(${typeof target})`
1034
- );
1035
- }
1036
- };
1049
+ if (isTeleportDeferred(n2.props) || parentSuspense && parentSuspense.pendingBranch) {
1050
+ queuePendingMount(n2);
1051
+ return;
1052
+ }
1037
1053
  if (disabled) {
1038
- mount(container, mainAnchor);
1054
+ mount(n2, container, mainAnchor);
1039
1055
  updateCssVars(n2, true);
1040
1056
  }
1041
- if (isTeleportDeferred(n2.props) || parentSuspense && parentSuspense.pendingBranch) {
1042
- n2.el.__isMounted = false;
1043
- queuePostRenderEffect(() => {
1044
- if (n2.el.__isMounted !== false) return;
1045
- mountToTarget();
1046
- delete n2.el.__isMounted;
1047
- }, parentSuspense);
1048
- } else {
1049
- mountToTarget();
1050
- }
1057
+ mountToTarget();
1051
1058
  } else {
1052
1059
  n2.el = n1.el;
1053
- n2.targetStart = n1.targetStart;
1054
1060
  const mainAnchor = n2.anchor = n1.anchor;
1055
- const target = n2.target = n1.target;
1056
- const targetAnchor = n2.targetAnchor = n1.targetAnchor;
1057
- if (n1.el.__isMounted === false) {
1058
- queuePostRenderEffect(() => {
1059
- TeleportImpl.process(
1060
- n1,
1061
- n2,
1062
- container,
1063
- anchor,
1064
- parentComponent,
1065
- parentSuspense,
1066
- namespace,
1067
- slotScopeIds,
1068
- optimized,
1069
- internals
1070
- );
1071
- }, parentSuspense);
1061
+ const pendingMount = pendingMounts.get(n1);
1062
+ if (pendingMount) {
1063
+ pendingMount.flags |= 8;
1064
+ pendingMounts.delete(n1);
1065
+ queuePendingMount(n2);
1072
1066
  return;
1073
1067
  }
1068
+ n2.targetStart = n1.targetStart;
1069
+ const target = n2.target = n1.target;
1070
+ const targetAnchor = n2.targetAnchor = n1.targetAnchor;
1074
1071
  const wasDisabled = isTeleportDisabled(n1.props);
1075
1072
  const currentContainer = wasDisabled ? container : target;
1076
1073
  const currentAnchor = wasDisabled ? mainAnchor : targetAnchor;
@@ -1161,13 +1158,19 @@ const TeleportImpl = {
1161
1158
  target,
1162
1159
  props
1163
1160
  } = vnode;
1161
+ let shouldRemove = doRemove || !isTeleportDisabled(props);
1162
+ const pendingMount = pendingMounts.get(vnode);
1163
+ if (pendingMount) {
1164
+ pendingMount.flags |= 8;
1165
+ pendingMounts.delete(vnode);
1166
+ shouldRemove = false;
1167
+ }
1164
1168
  if (target) {
1165
1169
  hostRemove(targetStart);
1166
1170
  hostRemove(targetAnchor);
1167
1171
  }
1168
1172
  doRemove && hostRemove(anchor);
1169
1173
  if (shapeFlag & 16) {
1170
- const shouldRemove = doRemove || !isTeleportDisabled(props);
1171
1174
  for (let i = 0; i < children.length; i++) {
1172
1175
  const child = children[i];
1173
1176
  unmount(
@@ -1192,7 +1195,7 @@ function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }
1192
1195
  if (isReorder) {
1193
1196
  insert(el, container, parentAnchor);
1194
1197
  }
1195
- if (!isReorder || isTeleportDisabled(props)) {
1198
+ if (!pendingMounts.has(vnode) && (!isReorder || isTeleportDisabled(props))) {
1196
1199
  if (shapeFlag & 16) {
1197
1200
  for (let i = 0; i < children.length; i++) {
1198
1201
  move(
@@ -1366,10 +1369,14 @@ const BaseTransitionImpl = {
1366
1369
  const state = useTransitionState();
1367
1370
  return () => {
1368
1371
  const children = slots.default && getTransitionRawChildren(slots.default(), true);
1369
- if (!children || !children.length) {
1372
+ const child = children && children.length ? findNonCommentChild(children) : (
1373
+ // Keep explicit default-slot conditionals on the same transition path
1374
+ // as regular v-if branches, which render a comment placeholder.
1375
+ instance.subTree ? createCommentVNode() : void 0
1376
+ );
1377
+ if (!child) {
1370
1378
  return;
1371
1379
  }
1372
- const child = findNonCommentChild(children);
1373
1380
  const rawProps = reactivity.toRaw(props);
1374
1381
  const { mode } = rawProps;
1375
1382
  if (mode && mode !== "in-out" && mode !== "out-in" && mode !== "default") {
@@ -7341,6 +7348,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
7341
7348
  if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) {
7342
7349
  return;
7343
7350
  }
7351
+ unsetCurrentInstance();
7344
7352
  instance.asyncResolved = true;
7345
7353
  const { vnode: vnode2 } = instance;
7346
7354
  {
@@ -8545,7 +8553,7 @@ function isMemoSame(cached, memo) {
8545
8553
  return true;
8546
8554
  }
8547
8555
 
8548
- const version = "3.5.31";
8556
+ const version = "3.5.33";
8549
8557
  const warn = warn$1 ;
8550
8558
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
8551
8559
  const devtools = devtools$1 ;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/runtime-core v3.5.31
2
+ * @vue/runtime-core v3.5.33
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -512,6 +512,7 @@ function createPathGetter(ctx, path) {
512
512
  };
513
513
  }
514
514
 
515
+ const pendingMounts = /* @__PURE__ */ new WeakMap();
515
516
  const TeleportEndKey = /* @__PURE__ */ Symbol("_vte");
516
517
  const isTeleport = (type) => type.__isTeleport;
517
518
  const isTeleportDisabled = (props) => props && (props.disabled || props.disabled === "");
@@ -539,84 +540,84 @@ const TeleportImpl = {
539
540
  mc: mountChildren,
540
541
  pc: patchChildren,
541
542
  pbc: patchBlockChildren,
542
- o: { insert, querySelector, createText, createComment }
543
+ o: { insert, querySelector, createText, createComment, parentNode }
543
544
  } = internals;
544
545
  const disabled = isTeleportDisabled(n2.props);
545
- let { shapeFlag, children, dynamicChildren } = n2;
546
+ let { dynamicChildren } = n2;
547
+ const mount = (vnode, container2, anchor2) => {
548
+ if (vnode.shapeFlag & 16) {
549
+ mountChildren(
550
+ vnode.children,
551
+ container2,
552
+ anchor2,
553
+ parentComponent,
554
+ parentSuspense,
555
+ namespace,
556
+ slotScopeIds,
557
+ optimized
558
+ );
559
+ }
560
+ };
561
+ const mountToTarget = (vnode = n2) => {
562
+ const disabled2 = isTeleportDisabled(vnode.props);
563
+ const target = vnode.target = resolveTarget(vnode.props, querySelector);
564
+ const targetAnchor = prepareAnchor(target, vnode, createText, insert);
565
+ if (target) {
566
+ if (namespace !== "svg" && isTargetSVG(target)) {
567
+ namespace = "svg";
568
+ } else if (namespace !== "mathml" && isTargetMathML(target)) {
569
+ namespace = "mathml";
570
+ }
571
+ if (parentComponent && parentComponent.isCE) {
572
+ (parentComponent.ce._teleportTargets || (parentComponent.ce._teleportTargets = /* @__PURE__ */ new Set())).add(target);
573
+ }
574
+ if (!disabled2) {
575
+ mount(vnode, target, targetAnchor);
576
+ updateCssVars(vnode, false);
577
+ }
578
+ }
579
+ };
580
+ const queuePendingMount = (vnode) => {
581
+ const mountJob = () => {
582
+ if (pendingMounts.get(vnode) !== mountJob) return;
583
+ pendingMounts.delete(vnode);
584
+ if (isTeleportDisabled(vnode.props)) {
585
+ const mountContainer = parentNode(vnode.el) || container;
586
+ mount(vnode, mountContainer, vnode.anchor);
587
+ updateCssVars(vnode, true);
588
+ }
589
+ mountToTarget(vnode);
590
+ };
591
+ pendingMounts.set(vnode, mountJob);
592
+ queuePostRenderEffect(mountJob, parentSuspense);
593
+ };
546
594
  if (n1 == null) {
547
595
  const placeholder = n2.el = createText("");
548
596
  const mainAnchor = n2.anchor = createText("");
549
597
  insert(placeholder, container, anchor);
550
598
  insert(mainAnchor, container, anchor);
551
- const mount = (container2, anchor2) => {
552
- if (shapeFlag & 16) {
553
- mountChildren(
554
- children,
555
- container2,
556
- anchor2,
557
- parentComponent,
558
- parentSuspense,
559
- namespace,
560
- slotScopeIds,
561
- optimized
562
- );
563
- }
564
- };
565
- const mountToTarget = () => {
566
- const target = n2.target = resolveTarget(n2.props, querySelector);
567
- const targetAnchor = prepareAnchor(target, n2, createText, insert);
568
- if (target) {
569
- if (namespace !== "svg" && isTargetSVG(target)) {
570
- namespace = "svg";
571
- } else if (namespace !== "mathml" && isTargetMathML(target)) {
572
- namespace = "mathml";
573
- }
574
- if (parentComponent && parentComponent.isCE) {
575
- (parentComponent.ce._teleportTargets || (parentComponent.ce._teleportTargets = /* @__PURE__ */ new Set())).add(target);
576
- }
577
- if (!disabled) {
578
- mount(target, targetAnchor);
579
- updateCssVars(n2, false);
580
- }
581
- }
582
- };
599
+ if (isTeleportDeferred(n2.props) || parentSuspense && parentSuspense.pendingBranch) {
600
+ queuePendingMount(n2);
601
+ return;
602
+ }
583
603
  if (disabled) {
584
- mount(container, mainAnchor);
604
+ mount(n2, container, mainAnchor);
585
605
  updateCssVars(n2, true);
586
606
  }
587
- if (isTeleportDeferred(n2.props) || parentSuspense && parentSuspense.pendingBranch) {
588
- n2.el.__isMounted = false;
589
- queuePostRenderEffect(() => {
590
- if (n2.el.__isMounted !== false) return;
591
- mountToTarget();
592
- delete n2.el.__isMounted;
593
- }, parentSuspense);
594
- } else {
595
- mountToTarget();
596
- }
607
+ mountToTarget();
597
608
  } else {
598
609
  n2.el = n1.el;
599
- n2.targetStart = n1.targetStart;
600
610
  const mainAnchor = n2.anchor = n1.anchor;
601
- const target = n2.target = n1.target;
602
- const targetAnchor = n2.targetAnchor = n1.targetAnchor;
603
- if (n1.el.__isMounted === false) {
604
- queuePostRenderEffect(() => {
605
- TeleportImpl.process(
606
- n1,
607
- n2,
608
- container,
609
- anchor,
610
- parentComponent,
611
- parentSuspense,
612
- namespace,
613
- slotScopeIds,
614
- optimized,
615
- internals
616
- );
617
- }, parentSuspense);
611
+ const pendingMount = pendingMounts.get(n1);
612
+ if (pendingMount) {
613
+ pendingMount.flags |= 8;
614
+ pendingMounts.delete(n1);
615
+ queuePendingMount(n2);
618
616
  return;
619
617
  }
618
+ n2.targetStart = n1.targetStart;
619
+ const target = n2.target = n1.target;
620
+ const targetAnchor = n2.targetAnchor = n1.targetAnchor;
620
621
  const wasDisabled = isTeleportDisabled(n1.props);
621
622
  const currentContainer = wasDisabled ? container : target;
622
623
  const currentAnchor = wasDisabled ? mainAnchor : targetAnchor;
@@ -701,13 +702,19 @@ const TeleportImpl = {
701
702
  target,
702
703
  props
703
704
  } = vnode;
705
+ let shouldRemove = doRemove || !isTeleportDisabled(props);
706
+ const pendingMount = pendingMounts.get(vnode);
707
+ if (pendingMount) {
708
+ pendingMount.flags |= 8;
709
+ pendingMounts.delete(vnode);
710
+ shouldRemove = false;
711
+ }
704
712
  if (target) {
705
713
  hostRemove(targetStart);
706
714
  hostRemove(targetAnchor);
707
715
  }
708
716
  doRemove && hostRemove(anchor);
709
717
  if (shapeFlag & 16) {
710
- const shouldRemove = doRemove || !isTeleportDisabled(props);
711
718
  for (let i = 0; i < children.length; i++) {
712
719
  const child = children[i];
713
720
  unmount(
@@ -732,7 +739,7 @@ function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }
732
739
  if (isReorder) {
733
740
  insert(el, container, parentAnchor);
734
741
  }
735
- if (!isReorder || isTeleportDisabled(props)) {
742
+ if (!pendingMounts.has(vnode) && (!isReorder || isTeleportDisabled(props))) {
736
743
  if (shapeFlag & 16) {
737
744
  for (let i = 0; i < children.length; i++) {
738
745
  move(
@@ -906,10 +913,14 @@ const BaseTransitionImpl = {
906
913
  const state = useTransitionState();
907
914
  return () => {
908
915
  const children = slots.default && getTransitionRawChildren(slots.default(), true);
909
- if (!children || !children.length) {
916
+ const child = children && children.length ? findNonCommentChild(children) : (
917
+ // Keep explicit default-slot conditionals on the same transition path
918
+ // as regular v-if branches, which render a comment placeholder.
919
+ instance.subTree ? createCommentVNode() : void 0
920
+ );
921
+ if (!child) {
910
922
  return;
911
923
  }
912
- const child = findNonCommentChild(children);
913
924
  const rawProps = reactivity.toRaw(props);
914
925
  const { mode } = rawProps;
915
926
  if (state.isLeaving) {
@@ -5839,6 +5850,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
5839
5850
  if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) {
5840
5851
  return;
5841
5852
  }
5853
+ unsetCurrentInstance();
5842
5854
  instance.asyncResolved = true;
5843
5855
  const { vnode: vnode2 } = instance;
5844
5856
  handleSetupResult(instance, asyncSetupResult, false);
@@ -6679,7 +6691,7 @@ function isMemoSame(cached, memo) {
6679
6691
  return true;
6680
6692
  }
6681
6693
 
6682
- const version = "3.5.31";
6694
+ const version = "3.5.33";
6683
6695
  const warn$1 = shared.NOOP;
6684
6696
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
6685
6697
  const devtools = void 0;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/runtime-core v3.5.31
2
+ * @vue/runtime-core v3.5.33
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -948,6 +948,7 @@ function createPathGetter(ctx, path) {
948
948
  };
949
949
  }
950
950
 
951
+ const pendingMounts = /* @__PURE__ */ new WeakMap();
951
952
  const TeleportEndKey = /* @__PURE__ */ Symbol("_vte");
952
953
  const isTeleport = (type) => type.__isTeleport;
953
954
  const isTeleportDisabled = (props) => props && (props.disabled || props.disabled === "");
@@ -986,94 +987,90 @@ const TeleportImpl = {
986
987
  mc: mountChildren,
987
988
  pc: patchChildren,
988
989
  pbc: patchBlockChildren,
989
- o: { insert, querySelector, createText, createComment }
990
+ o: { insert, querySelector, createText, createComment, parentNode }
990
991
  } = internals;
991
992
  const disabled = isTeleportDisabled(n2.props);
992
- let { shapeFlag, children, dynamicChildren } = n2;
993
+ let { dynamicChildren } = n2;
993
994
  if (!!(process.env.NODE_ENV !== "production") && isHmrUpdating) {
994
995
  optimized = false;
995
996
  dynamicChildren = null;
996
997
  }
998
+ const mount = (vnode, container2, anchor2) => {
999
+ if (vnode.shapeFlag & 16) {
1000
+ mountChildren(
1001
+ vnode.children,
1002
+ container2,
1003
+ anchor2,
1004
+ parentComponent,
1005
+ parentSuspense,
1006
+ namespace,
1007
+ slotScopeIds,
1008
+ optimized
1009
+ );
1010
+ }
1011
+ };
1012
+ const mountToTarget = (vnode = n2) => {
1013
+ const disabled2 = isTeleportDisabled(vnode.props);
1014
+ const target = vnode.target = resolveTarget(vnode.props, querySelector);
1015
+ const targetAnchor = prepareAnchor(target, vnode, createText, insert);
1016
+ if (target) {
1017
+ if (namespace !== "svg" && isTargetSVG(target)) {
1018
+ namespace = "svg";
1019
+ } else if (namespace !== "mathml" && isTargetMathML(target)) {
1020
+ namespace = "mathml";
1021
+ }
1022
+ if (parentComponent && parentComponent.isCE) {
1023
+ (parentComponent.ce._teleportTargets || (parentComponent.ce._teleportTargets = /* @__PURE__ */ new Set())).add(target);
1024
+ }
1025
+ if (!disabled2) {
1026
+ mount(vnode, target, targetAnchor);
1027
+ updateCssVars(vnode, false);
1028
+ }
1029
+ } else if (!!(process.env.NODE_ENV !== "production") && !disabled2) {
1030
+ warn$1("Invalid Teleport target on mount:", target, `(${typeof target})`);
1031
+ }
1032
+ };
1033
+ const queuePendingMount = (vnode) => {
1034
+ const mountJob = () => {
1035
+ if (pendingMounts.get(vnode) !== mountJob) return;
1036
+ pendingMounts.delete(vnode);
1037
+ if (isTeleportDisabled(vnode.props)) {
1038
+ const mountContainer = parentNode(vnode.el) || container;
1039
+ mount(vnode, mountContainer, vnode.anchor);
1040
+ updateCssVars(vnode, true);
1041
+ }
1042
+ mountToTarget(vnode);
1043
+ };
1044
+ pendingMounts.set(vnode, mountJob);
1045
+ queuePostRenderEffect(mountJob, parentSuspense);
1046
+ };
997
1047
  if (n1 == null) {
998
1048
  const placeholder = n2.el = !!(process.env.NODE_ENV !== "production") ? createComment("teleport start") : createText("");
999
1049
  const mainAnchor = n2.anchor = !!(process.env.NODE_ENV !== "production") ? createComment("teleport end") : createText("");
1000
1050
  insert(placeholder, container, anchor);
1001
1051
  insert(mainAnchor, container, anchor);
1002
- const mount = (container2, anchor2) => {
1003
- if (shapeFlag & 16) {
1004
- mountChildren(
1005
- children,
1006
- container2,
1007
- anchor2,
1008
- parentComponent,
1009
- parentSuspense,
1010
- namespace,
1011
- slotScopeIds,
1012
- optimized
1013
- );
1014
- }
1015
- };
1016
- const mountToTarget = () => {
1017
- const target = n2.target = resolveTarget(n2.props, querySelector);
1018
- const targetAnchor = prepareAnchor(target, n2, createText, insert);
1019
- if (target) {
1020
- if (namespace !== "svg" && isTargetSVG(target)) {
1021
- namespace = "svg";
1022
- } else if (namespace !== "mathml" && isTargetMathML(target)) {
1023
- namespace = "mathml";
1024
- }
1025
- if (parentComponent && parentComponent.isCE) {
1026
- (parentComponent.ce._teleportTargets || (parentComponent.ce._teleportTargets = /* @__PURE__ */ new Set())).add(target);
1027
- }
1028
- if (!disabled) {
1029
- mount(target, targetAnchor);
1030
- updateCssVars(n2, false);
1031
- }
1032
- } else if (!!(process.env.NODE_ENV !== "production") && !disabled) {
1033
- warn$1(
1034
- "Invalid Teleport target on mount:",
1035
- target,
1036
- `(${typeof target})`
1037
- );
1038
- }
1039
- };
1052
+ if (isTeleportDeferred(n2.props) || parentSuspense && parentSuspense.pendingBranch) {
1053
+ queuePendingMount(n2);
1054
+ return;
1055
+ }
1040
1056
  if (disabled) {
1041
- mount(container, mainAnchor);
1057
+ mount(n2, container, mainAnchor);
1042
1058
  updateCssVars(n2, true);
1043
1059
  }
1044
- if (isTeleportDeferred(n2.props) || parentSuspense && parentSuspense.pendingBranch) {
1045
- n2.el.__isMounted = false;
1046
- queuePostRenderEffect(() => {
1047
- if (n2.el.__isMounted !== false) return;
1048
- mountToTarget();
1049
- delete n2.el.__isMounted;
1050
- }, parentSuspense);
1051
- } else {
1052
- mountToTarget();
1053
- }
1060
+ mountToTarget();
1054
1061
  } else {
1055
1062
  n2.el = n1.el;
1056
- n2.targetStart = n1.targetStart;
1057
1063
  const mainAnchor = n2.anchor = n1.anchor;
1058
- const target = n2.target = n1.target;
1059
- const targetAnchor = n2.targetAnchor = n1.targetAnchor;
1060
- if (n1.el.__isMounted === false) {
1061
- queuePostRenderEffect(() => {
1062
- TeleportImpl.process(
1063
- n1,
1064
- n2,
1065
- container,
1066
- anchor,
1067
- parentComponent,
1068
- parentSuspense,
1069
- namespace,
1070
- slotScopeIds,
1071
- optimized,
1072
- internals
1073
- );
1074
- }, parentSuspense);
1064
+ const pendingMount = pendingMounts.get(n1);
1065
+ if (pendingMount) {
1066
+ pendingMount.flags |= 8;
1067
+ pendingMounts.delete(n1);
1068
+ queuePendingMount(n2);
1075
1069
  return;
1076
1070
  }
1071
+ n2.targetStart = n1.targetStart;
1072
+ const target = n2.target = n1.target;
1073
+ const targetAnchor = n2.targetAnchor = n1.targetAnchor;
1077
1074
  const wasDisabled = isTeleportDisabled(n1.props);
1078
1075
  const currentContainer = wasDisabled ? container : target;
1079
1076
  const currentAnchor = wasDisabled ? mainAnchor : targetAnchor;
@@ -1164,13 +1161,19 @@ const TeleportImpl = {
1164
1161
  target,
1165
1162
  props
1166
1163
  } = vnode;
1164
+ let shouldRemove = doRemove || !isTeleportDisabled(props);
1165
+ const pendingMount = pendingMounts.get(vnode);
1166
+ if (pendingMount) {
1167
+ pendingMount.flags |= 8;
1168
+ pendingMounts.delete(vnode);
1169
+ shouldRemove = false;
1170
+ }
1167
1171
  if (target) {
1168
1172
  hostRemove(targetStart);
1169
1173
  hostRemove(targetAnchor);
1170
1174
  }
1171
1175
  doRemove && hostRemove(anchor);
1172
1176
  if (shapeFlag & 16) {
1173
- const shouldRemove = doRemove || !isTeleportDisabled(props);
1174
1177
  for (let i = 0; i < children.length; i++) {
1175
1178
  const child = children[i];
1176
1179
  unmount(
@@ -1195,7 +1198,7 @@ function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }
1195
1198
  if (isReorder) {
1196
1199
  insert(el, container, parentAnchor);
1197
1200
  }
1198
- if (!isReorder || isTeleportDisabled(props)) {
1201
+ if (!pendingMounts.has(vnode) && (!isReorder || isTeleportDisabled(props))) {
1199
1202
  if (shapeFlag & 16) {
1200
1203
  for (let i = 0; i < children.length; i++) {
1201
1204
  move(
@@ -1369,10 +1372,14 @@ const BaseTransitionImpl = {
1369
1372
  const state = useTransitionState();
1370
1373
  return () => {
1371
1374
  const children = slots.default && getTransitionRawChildren(slots.default(), true);
1372
- if (!children || !children.length) {
1375
+ const child = children && children.length ? findNonCommentChild(children) : (
1376
+ // Keep explicit default-slot conditionals on the same transition path
1377
+ // as regular v-if branches, which render a comment placeholder.
1378
+ instance.subTree ? createCommentVNode() : void 0
1379
+ );
1380
+ if (!child) {
1373
1381
  return;
1374
1382
  }
1375
- const child = findNonCommentChild(children);
1376
1383
  const rawProps = toRaw(props);
1377
1384
  const { mode } = rawProps;
1378
1385
  if (!!(process.env.NODE_ENV !== "production") && mode && mode !== "in-out" && mode !== "out-in" && mode !== "default") {
@@ -7401,6 +7408,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
7401
7408
  if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) {
7402
7409
  return;
7403
7410
  }
7411
+ unsetCurrentInstance();
7404
7412
  instance.asyncResolved = true;
7405
7413
  const { vnode: vnode2 } = instance;
7406
7414
  if (!!(process.env.NODE_ENV !== "production")) {
@@ -8619,7 +8627,7 @@ function isMemoSame(cached, memo) {
8619
8627
  return true;
8620
8628
  }
8621
8629
 
8622
- const version = "3.5.31";
8630
+ const version = "3.5.33";
8623
8631
  const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
8624
8632
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
8625
8633
  const devtools = !!(process.env.NODE_ENV !== "production") || true ? devtools$1 : void 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vue/runtime-core",
3
- "version": "3.5.31",
3
+ "version": "3.5.33",
4
4
  "description": "@vue/runtime-core",
5
5
  "main": "index.js",
6
6
  "module": "dist/runtime-core.esm-bundler.js",
@@ -46,7 +46,7 @@
46
46
  },
47
47
  "homepage": "https://github.com/vuejs/core/tree/main/packages/runtime-core#readme",
48
48
  "dependencies": {
49
- "@vue/shared": "3.5.31",
50
- "@vue/reactivity": "3.5.31"
49
+ "@vue/shared": "3.5.33",
50
+ "@vue/reactivity": "3.5.33"
51
51
  }
52
52
  }