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.
@@ -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
  **/
@@ -3236,6 +3236,7 @@ var Vue = (function (exports) {
3236
3236
  };
3237
3237
  }
3238
3238
 
3239
+ const pendingMounts = /* @__PURE__ */ new WeakMap();
3239
3240
  const TeleportEndKey = /* @__PURE__ */ Symbol("_vte");
3240
3241
  const isTeleport = (type) => type.__isTeleport;
3241
3242
  const isTeleportDisabled = (props) => props && (props.disabled || props.disabled === "");
@@ -3277,91 +3278,86 @@ var Vue = (function (exports) {
3277
3278
  o: { insert, querySelector, createText, createComment }
3278
3279
  } = internals;
3279
3280
  const disabled = isTeleportDisabled(n2.props);
3280
- let { shapeFlag, children, dynamicChildren } = n2;
3281
+ let { dynamicChildren } = n2;
3281
3282
  if (isHmrUpdating) {
3282
3283
  optimized = false;
3283
3284
  dynamicChildren = null;
3284
3285
  }
3286
+ const mount = (vnode, container2, anchor2) => {
3287
+ if (vnode.shapeFlag & 16) {
3288
+ mountChildren(
3289
+ vnode.children,
3290
+ container2,
3291
+ anchor2,
3292
+ parentComponent,
3293
+ parentSuspense,
3294
+ namespace,
3295
+ slotScopeIds,
3296
+ optimized
3297
+ );
3298
+ }
3299
+ };
3300
+ const mountToTarget = (vnode = n2) => {
3301
+ const disabled2 = isTeleportDisabled(vnode.props);
3302
+ const target = vnode.target = resolveTarget(vnode.props, querySelector);
3303
+ const targetAnchor = prepareAnchor(target, vnode, createText, insert);
3304
+ if (target) {
3305
+ if (namespace !== "svg" && isTargetSVG(target)) {
3306
+ namespace = "svg";
3307
+ } else if (namespace !== "mathml" && isTargetMathML(target)) {
3308
+ namespace = "mathml";
3309
+ }
3310
+ if (parentComponent && parentComponent.isCE) {
3311
+ (parentComponent.ce._teleportTargets || (parentComponent.ce._teleportTargets = /* @__PURE__ */ new Set())).add(target);
3312
+ }
3313
+ if (!disabled2) {
3314
+ mount(vnode, target, targetAnchor);
3315
+ updateCssVars(vnode, false);
3316
+ }
3317
+ } else if (!disabled2) {
3318
+ warn$1("Invalid Teleport target on mount:", target, `(${typeof target})`);
3319
+ }
3320
+ };
3321
+ const queuePendingMount = (vnode) => {
3322
+ const mountJob = () => {
3323
+ if (pendingMounts.get(vnode) !== mountJob) return;
3324
+ pendingMounts.delete(vnode);
3325
+ if (isTeleportDisabled(vnode.props)) {
3326
+ mount(vnode, container, vnode.anchor);
3327
+ updateCssVars(vnode, true);
3328
+ }
3329
+ mountToTarget(vnode);
3330
+ };
3331
+ pendingMounts.set(vnode, mountJob);
3332
+ queuePostRenderEffect(mountJob, parentSuspense);
3333
+ };
3285
3334
  if (n1 == null) {
3286
3335
  const placeholder = n2.el = createComment("teleport start") ;
3287
3336
  const mainAnchor = n2.anchor = createComment("teleport end") ;
3288
3337
  insert(placeholder, container, anchor);
3289
3338
  insert(mainAnchor, container, anchor);
3290
- const mount = (container2, anchor2) => {
3291
- if (shapeFlag & 16) {
3292
- mountChildren(
3293
- children,
3294
- container2,
3295
- anchor2,
3296
- parentComponent,
3297
- parentSuspense,
3298
- namespace,
3299
- slotScopeIds,
3300
- optimized
3301
- );
3302
- }
3303
- };
3304
- const mountToTarget = () => {
3305
- const target = n2.target = resolveTarget(n2.props, querySelector);
3306
- const targetAnchor = prepareAnchor(target, n2, createText, insert);
3307
- if (target) {
3308
- if (namespace !== "svg" && isTargetSVG(target)) {
3309
- namespace = "svg";
3310
- } else if (namespace !== "mathml" && isTargetMathML(target)) {
3311
- namespace = "mathml";
3312
- }
3313
- if (parentComponent && parentComponent.isCE) {
3314
- (parentComponent.ce._teleportTargets || (parentComponent.ce._teleportTargets = /* @__PURE__ */ new Set())).add(target);
3315
- }
3316
- if (!disabled) {
3317
- mount(target, targetAnchor);
3318
- updateCssVars(n2, false);
3319
- }
3320
- } else if (!disabled) {
3321
- warn$1(
3322
- "Invalid Teleport target on mount:",
3323
- target,
3324
- `(${typeof target})`
3325
- );
3326
- }
3327
- };
3339
+ if (isTeleportDeferred(n2.props) || parentSuspense && parentSuspense.pendingBranch) {
3340
+ queuePendingMount(n2);
3341
+ return;
3342
+ }
3328
3343
  if (disabled) {
3329
- mount(container, mainAnchor);
3344
+ mount(n2, container, mainAnchor);
3330
3345
  updateCssVars(n2, true);
3331
3346
  }
3332
- if (isTeleportDeferred(n2.props) || parentSuspense && parentSuspense.pendingBranch) {
3333
- n2.el.__isMounted = false;
3334
- queuePostRenderEffect(() => {
3335
- if (n2.el.__isMounted !== false) return;
3336
- mountToTarget();
3337
- delete n2.el.__isMounted;
3338
- }, parentSuspense);
3339
- } else {
3340
- mountToTarget();
3341
- }
3347
+ mountToTarget();
3342
3348
  } else {
3343
3349
  n2.el = n1.el;
3344
- n2.targetStart = n1.targetStart;
3345
3350
  const mainAnchor = n2.anchor = n1.anchor;
3346
- const target = n2.target = n1.target;
3347
- const targetAnchor = n2.targetAnchor = n1.targetAnchor;
3348
- if (n1.el.__isMounted === false) {
3349
- queuePostRenderEffect(() => {
3350
- TeleportImpl.process(
3351
- n1,
3352
- n2,
3353
- container,
3354
- anchor,
3355
- parentComponent,
3356
- parentSuspense,
3357
- namespace,
3358
- slotScopeIds,
3359
- optimized,
3360
- internals
3361
- );
3362
- }, parentSuspense);
3351
+ const pendingMount = pendingMounts.get(n1);
3352
+ if (pendingMount) {
3353
+ pendingMount.flags |= 8;
3354
+ pendingMounts.delete(n1);
3355
+ queuePendingMount(n2);
3363
3356
  return;
3364
3357
  }
3358
+ n2.targetStart = n1.targetStart;
3359
+ const target = n2.target = n1.target;
3360
+ const targetAnchor = n2.targetAnchor = n1.targetAnchor;
3365
3361
  const wasDisabled = isTeleportDisabled(n1.props);
3366
3362
  const currentContainer = wasDisabled ? container : target;
3367
3363
  const currentAnchor = wasDisabled ? mainAnchor : targetAnchor;
@@ -3452,13 +3448,19 @@ var Vue = (function (exports) {
3452
3448
  target,
3453
3449
  props
3454
3450
  } = vnode;
3451
+ let shouldRemove = doRemove || !isTeleportDisabled(props);
3452
+ const pendingMount = pendingMounts.get(vnode);
3453
+ if (pendingMount) {
3454
+ pendingMount.flags |= 8;
3455
+ pendingMounts.delete(vnode);
3456
+ shouldRemove = false;
3457
+ }
3455
3458
  if (target) {
3456
3459
  hostRemove(targetStart);
3457
3460
  hostRemove(targetAnchor);
3458
3461
  }
3459
3462
  doRemove && hostRemove(anchor);
3460
3463
  if (shapeFlag & 16) {
3461
- const shouldRemove = doRemove || !isTeleportDisabled(props);
3462
3464
  for (let i = 0; i < children.length; i++) {
3463
3465
  const child = children[i];
3464
3466
  unmount(
@@ -9626,6 +9628,7 @@ If you want to remount the same app, move your app creation logic into a factory
9626
9628
  if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) {
9627
9629
  return;
9628
9630
  }
9631
+ unsetCurrentInstance();
9629
9632
  instance.asyncResolved = true;
9630
9633
  const { vnode: vnode2 } = instance;
9631
9634
  {
@@ -10816,7 +10819,7 @@ Component that was made reactive: `,
10816
10819
  return true;
10817
10820
  }
10818
10821
 
10819
- const version = "3.5.31";
10822
+ const version = "3.5.32";
10820
10823
  const warn = warn$1 ;
10821
10824
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
10822
10825
  const devtools = devtools$1 ;