vue 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.
package/dist/vue.cjs.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * vue v3.5.31
2
+ * vue v3.5.32
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -1,5 +1,5 @@
1
1
  /**
2
- * vue v3.5.31
2
+ * vue v3.5.32
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -1,5 +1,5 @@
1
1
  /**
2
- * vue v3.5.31
2
+ * vue v3.5.32
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -3261,6 +3261,7 @@ function createPathGetter(ctx, path) {
3261
3261
  };
3262
3262
  }
3263
3263
 
3264
+ const pendingMounts = /* @__PURE__ */ new WeakMap();
3264
3265
  const TeleportEndKey = /* @__PURE__ */ Symbol("_vte");
3265
3266
  const isTeleport = (type) => type.__isTeleport;
3266
3267
  const isTeleportDisabled = (props) => props && (props.disabled || props.disabled === "");
@@ -3302,91 +3303,86 @@ const TeleportImpl = {
3302
3303
  o: { insert, querySelector, createText, createComment }
3303
3304
  } = internals;
3304
3305
  const disabled = isTeleportDisabled(n2.props);
3305
- let { shapeFlag, children, dynamicChildren } = n2;
3306
+ let { dynamicChildren } = n2;
3306
3307
  if (isHmrUpdating) {
3307
3308
  optimized = false;
3308
3309
  dynamicChildren = null;
3309
3310
  }
3311
+ const mount = (vnode, container2, anchor2) => {
3312
+ if (vnode.shapeFlag & 16) {
3313
+ mountChildren(
3314
+ vnode.children,
3315
+ container2,
3316
+ anchor2,
3317
+ parentComponent,
3318
+ parentSuspense,
3319
+ namespace,
3320
+ slotScopeIds,
3321
+ optimized
3322
+ );
3323
+ }
3324
+ };
3325
+ const mountToTarget = (vnode = n2) => {
3326
+ const disabled2 = isTeleportDisabled(vnode.props);
3327
+ const target = vnode.target = resolveTarget(vnode.props, querySelector);
3328
+ const targetAnchor = prepareAnchor(target, vnode, createText, insert);
3329
+ if (target) {
3330
+ if (namespace !== "svg" && isTargetSVG(target)) {
3331
+ namespace = "svg";
3332
+ } else if (namespace !== "mathml" && isTargetMathML(target)) {
3333
+ namespace = "mathml";
3334
+ }
3335
+ if (parentComponent && parentComponent.isCE) {
3336
+ (parentComponent.ce._teleportTargets || (parentComponent.ce._teleportTargets = /* @__PURE__ */ new Set())).add(target);
3337
+ }
3338
+ if (!disabled2) {
3339
+ mount(vnode, target, targetAnchor);
3340
+ updateCssVars(vnode, false);
3341
+ }
3342
+ } else if (!disabled2) {
3343
+ warn$1("Invalid Teleport target on mount:", target, `(${typeof target})`);
3344
+ }
3345
+ };
3346
+ const queuePendingMount = (vnode) => {
3347
+ const mountJob = () => {
3348
+ if (pendingMounts.get(vnode) !== mountJob) return;
3349
+ pendingMounts.delete(vnode);
3350
+ if (isTeleportDisabled(vnode.props)) {
3351
+ mount(vnode, container, vnode.anchor);
3352
+ updateCssVars(vnode, true);
3353
+ }
3354
+ mountToTarget(vnode);
3355
+ };
3356
+ pendingMounts.set(vnode, mountJob);
3357
+ queuePostRenderEffect(mountJob, parentSuspense);
3358
+ };
3310
3359
  if (n1 == null) {
3311
3360
  const placeholder = n2.el = createComment("teleport start") ;
3312
3361
  const mainAnchor = n2.anchor = createComment("teleport end") ;
3313
3362
  insert(placeholder, container, anchor);
3314
3363
  insert(mainAnchor, container, anchor);
3315
- const mount = (container2, anchor2) => {
3316
- if (shapeFlag & 16) {
3317
- mountChildren(
3318
- children,
3319
- container2,
3320
- anchor2,
3321
- parentComponent,
3322
- parentSuspense,
3323
- namespace,
3324
- slotScopeIds,
3325
- optimized
3326
- );
3327
- }
3328
- };
3329
- const mountToTarget = () => {
3330
- const target = n2.target = resolveTarget(n2.props, querySelector);
3331
- const targetAnchor = prepareAnchor(target, n2, createText, insert);
3332
- if (target) {
3333
- if (namespace !== "svg" && isTargetSVG(target)) {
3334
- namespace = "svg";
3335
- } else if (namespace !== "mathml" && isTargetMathML(target)) {
3336
- namespace = "mathml";
3337
- }
3338
- if (parentComponent && parentComponent.isCE) {
3339
- (parentComponent.ce._teleportTargets || (parentComponent.ce._teleportTargets = /* @__PURE__ */ new Set())).add(target);
3340
- }
3341
- if (!disabled) {
3342
- mount(target, targetAnchor);
3343
- updateCssVars(n2, false);
3344
- }
3345
- } else if (!disabled) {
3346
- warn$1(
3347
- "Invalid Teleport target on mount:",
3348
- target,
3349
- `(${typeof target})`
3350
- );
3351
- }
3352
- };
3364
+ if (isTeleportDeferred(n2.props) || parentSuspense && parentSuspense.pendingBranch) {
3365
+ queuePendingMount(n2);
3366
+ return;
3367
+ }
3353
3368
  if (disabled) {
3354
- mount(container, mainAnchor);
3369
+ mount(n2, container, mainAnchor);
3355
3370
  updateCssVars(n2, true);
3356
3371
  }
3357
- if (isTeleportDeferred(n2.props) || parentSuspense && parentSuspense.pendingBranch) {
3358
- n2.el.__isMounted = false;
3359
- queuePostRenderEffect(() => {
3360
- if (n2.el.__isMounted !== false) return;
3361
- mountToTarget();
3362
- delete n2.el.__isMounted;
3363
- }, parentSuspense);
3364
- } else {
3365
- mountToTarget();
3366
- }
3372
+ mountToTarget();
3367
3373
  } else {
3368
3374
  n2.el = n1.el;
3369
- n2.targetStart = n1.targetStart;
3370
3375
  const mainAnchor = n2.anchor = n1.anchor;
3371
- const target = n2.target = n1.target;
3372
- const targetAnchor = n2.targetAnchor = n1.targetAnchor;
3373
- if (n1.el.__isMounted === false) {
3374
- queuePostRenderEffect(() => {
3375
- TeleportImpl.process(
3376
- n1,
3377
- n2,
3378
- container,
3379
- anchor,
3380
- parentComponent,
3381
- parentSuspense,
3382
- namespace,
3383
- slotScopeIds,
3384
- optimized,
3385
- internals
3386
- );
3387
- }, parentSuspense);
3376
+ const pendingMount = pendingMounts.get(n1);
3377
+ if (pendingMount) {
3378
+ pendingMount.flags |= 8;
3379
+ pendingMounts.delete(n1);
3380
+ queuePendingMount(n2);
3388
3381
  return;
3389
3382
  }
3383
+ n2.targetStart = n1.targetStart;
3384
+ const target = n2.target = n1.target;
3385
+ const targetAnchor = n2.targetAnchor = n1.targetAnchor;
3390
3386
  const wasDisabled = isTeleportDisabled(n1.props);
3391
3387
  const currentContainer = wasDisabled ? container : target;
3392
3388
  const currentAnchor = wasDisabled ? mainAnchor : targetAnchor;
@@ -3477,13 +3473,19 @@ const TeleportImpl = {
3477
3473
  target,
3478
3474
  props
3479
3475
  } = vnode;
3476
+ let shouldRemove = doRemove || !isTeleportDisabled(props);
3477
+ const pendingMount = pendingMounts.get(vnode);
3478
+ if (pendingMount) {
3479
+ pendingMount.flags |= 8;
3480
+ pendingMounts.delete(vnode);
3481
+ shouldRemove = false;
3482
+ }
3480
3483
  if (target) {
3481
3484
  hostRemove(targetStart);
3482
3485
  hostRemove(targetAnchor);
3483
3486
  }
3484
3487
  doRemove && hostRemove(anchor);
3485
3488
  if (shapeFlag & 16) {
3486
- const shouldRemove = doRemove || !isTeleportDisabled(props);
3487
3489
  for (let i = 0; i < children.length; i++) {
3488
3490
  const child = children[i];
3489
3491
  unmount(
@@ -9660,6 +9662,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
9660
9662
  if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) {
9661
9663
  return;
9662
9664
  }
9665
+ unsetCurrentInstance();
9663
9666
  instance.asyncResolved = true;
9664
9667
  const { vnode: vnode2 } = instance;
9665
9668
  {
@@ -10864,7 +10867,7 @@ function isMemoSame(cached, memo) {
10864
10867
  return true;
10865
10868
  }
10866
10869
 
10867
- const version = "3.5.31";
10870
+ const version = "3.5.32";
10868
10871
  const warn = warn$1 ;
10869
10872
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
10870
10873
  const devtools = devtools$1 ;