@vue/runtime-dom 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-dom v3.5.31
2
+ * @vue/runtime-dom v3.5.33
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -467,7 +467,19 @@ function patchStyle(el, prev, next) {
467
467
  if (key === "display") {
468
468
  hasControlledDisplay = true;
469
469
  }
470
- setStyle(style, key, next[key]);
470
+ const value = next[key];
471
+ if (value != null) {
472
+ if (!shouldPreserveTextareaResizeStyle(
473
+ el,
474
+ key,
475
+ !shared.isString(prev) && prev ? prev[key] : void 0,
476
+ value
477
+ )) {
478
+ setStyle(style, key, value);
479
+ }
480
+ } else {
481
+ setStyle(style, key, "");
482
+ }
471
483
  }
472
484
  } else {
473
485
  if (isCssString) {
@@ -540,6 +552,9 @@ function autoPrefix(style, rawName) {
540
552
  }
541
553
  return rawName;
542
554
  }
555
+ function shouldPreserveTextareaResizeStyle(el, key, prev, next) {
556
+ return el.tagName === "TEXTAREA" && (key === "width" || key === "height") && shared.isString(next) && prev === next;
557
+ }
543
558
 
544
559
  const xlinkNS = "http://www.w3.org/1999/xlink";
545
560
  function patchAttr(el, key, value, isSVG, instance, isBoolean = shared.isSpecialBooleanAttr(key)) {
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/runtime-dom v3.5.31
2
+ * @vue/runtime-dom v3.5.33
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -463,7 +463,19 @@ function patchStyle(el, prev, next) {
463
463
  if (key === "display") {
464
464
  hasControlledDisplay = true;
465
465
  }
466
- setStyle(style, key, next[key]);
466
+ const value = next[key];
467
+ if (value != null) {
468
+ if (!shouldPreserveTextareaResizeStyle(
469
+ el,
470
+ key,
471
+ !shared.isString(prev) && prev ? prev[key] : void 0,
472
+ value
473
+ )) {
474
+ setStyle(style, key, value);
475
+ }
476
+ } else {
477
+ setStyle(style, key, "");
478
+ }
467
479
  }
468
480
  } else {
469
481
  if (isCssString) {
@@ -528,6 +540,9 @@ function autoPrefix(style, rawName) {
528
540
  }
529
541
  return rawName;
530
542
  }
543
+ function shouldPreserveTextareaResizeStyle(el, key, prev, next) {
544
+ return el.tagName === "TEXTAREA" && (key === "width" || key === "height") && shared.isString(next) && prev === next;
545
+ }
531
546
 
532
547
  const xlinkNS = "http://www.w3.org/1999/xlink";
533
548
  function patchAttr(el, key, value, isSVG, instance, isBoolean = shared.isSpecialBooleanAttr(key)) {
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/runtime-dom v3.5.31
2
+ * @vue/runtime-dom v3.5.33
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -427,7 +427,18 @@ class EffectScope {
427
427
  */
428
428
  off() {
429
429
  if (this._on > 0 && --this._on === 0) {
430
- activeEffectScope = this.prevScope;
430
+ if (activeEffectScope === this) {
431
+ activeEffectScope = this.prevScope;
432
+ } else {
433
+ let current = activeEffectScope;
434
+ while (current) {
435
+ if (current.prevScope === this) {
436
+ current.prevScope = this.prevScope;
437
+ break;
438
+ }
439
+ current = current.prevScope;
440
+ }
441
+ }
431
442
  this.prevScope = void 0;
432
443
  }
433
444
  }
@@ -3188,6 +3199,7 @@ function createPathGetter(ctx, path) {
3188
3199
  };
3189
3200
  }
3190
3201
 
3202
+ const pendingMounts = /* @__PURE__ */ new WeakMap();
3191
3203
  const TeleportEndKey = /* @__PURE__ */ Symbol("_vte");
3192
3204
  const isTeleport = (type) => type.__isTeleport;
3193
3205
  const isTeleportDisabled = (props) => props && (props.disabled || props.disabled === "");
@@ -3226,94 +3238,90 @@ const TeleportImpl = {
3226
3238
  mc: mountChildren,
3227
3239
  pc: patchChildren,
3228
3240
  pbc: patchBlockChildren,
3229
- o: { insert, querySelector, createText, createComment }
3241
+ o: { insert, querySelector, createText, createComment, parentNode }
3230
3242
  } = internals;
3231
3243
  const disabled = isTeleportDisabled(n2.props);
3232
- let { shapeFlag, children, dynamicChildren } = n2;
3244
+ let { dynamicChildren } = n2;
3233
3245
  if (isHmrUpdating) {
3234
3246
  optimized = false;
3235
3247
  dynamicChildren = null;
3236
3248
  }
3249
+ const mount = (vnode, container2, anchor2) => {
3250
+ if (vnode.shapeFlag & 16) {
3251
+ mountChildren(
3252
+ vnode.children,
3253
+ container2,
3254
+ anchor2,
3255
+ parentComponent,
3256
+ parentSuspense,
3257
+ namespace,
3258
+ slotScopeIds,
3259
+ optimized
3260
+ );
3261
+ }
3262
+ };
3263
+ const mountToTarget = (vnode = n2) => {
3264
+ const disabled2 = isTeleportDisabled(vnode.props);
3265
+ const target = vnode.target = resolveTarget(vnode.props, querySelector);
3266
+ const targetAnchor = prepareAnchor(target, vnode, createText, insert);
3267
+ if (target) {
3268
+ if (namespace !== "svg" && isTargetSVG(target)) {
3269
+ namespace = "svg";
3270
+ } else if (namespace !== "mathml" && isTargetMathML(target)) {
3271
+ namespace = "mathml";
3272
+ }
3273
+ if (parentComponent && parentComponent.isCE) {
3274
+ (parentComponent.ce._teleportTargets || (parentComponent.ce._teleportTargets = /* @__PURE__ */ new Set())).add(target);
3275
+ }
3276
+ if (!disabled2) {
3277
+ mount(vnode, target, targetAnchor);
3278
+ updateCssVars(vnode, false);
3279
+ }
3280
+ } else if (!disabled2) {
3281
+ warn$1("Invalid Teleport target on mount:", target, `(${typeof target})`);
3282
+ }
3283
+ };
3284
+ const queuePendingMount = (vnode) => {
3285
+ const mountJob = () => {
3286
+ if (pendingMounts.get(vnode) !== mountJob) return;
3287
+ pendingMounts.delete(vnode);
3288
+ if (isTeleportDisabled(vnode.props)) {
3289
+ const mountContainer = parentNode(vnode.el) || container;
3290
+ mount(vnode, mountContainer, vnode.anchor);
3291
+ updateCssVars(vnode, true);
3292
+ }
3293
+ mountToTarget(vnode);
3294
+ };
3295
+ pendingMounts.set(vnode, mountJob);
3296
+ queuePostRenderEffect(mountJob, parentSuspense);
3297
+ };
3237
3298
  if (n1 == null) {
3238
3299
  const placeholder = n2.el = createComment("teleport start") ;
3239
3300
  const mainAnchor = n2.anchor = createComment("teleport end") ;
3240
3301
  insert(placeholder, container, anchor);
3241
3302
  insert(mainAnchor, container, anchor);
3242
- const mount = (container2, anchor2) => {
3243
- if (shapeFlag & 16) {
3244
- mountChildren(
3245
- children,
3246
- container2,
3247
- anchor2,
3248
- parentComponent,
3249
- parentSuspense,
3250
- namespace,
3251
- slotScopeIds,
3252
- optimized
3253
- );
3254
- }
3255
- };
3256
- const mountToTarget = () => {
3257
- const target = n2.target = resolveTarget(n2.props, querySelector);
3258
- const targetAnchor = prepareAnchor(target, n2, createText, insert);
3259
- if (target) {
3260
- if (namespace !== "svg" && isTargetSVG(target)) {
3261
- namespace = "svg";
3262
- } else if (namespace !== "mathml" && isTargetMathML(target)) {
3263
- namespace = "mathml";
3264
- }
3265
- if (parentComponent && parentComponent.isCE) {
3266
- (parentComponent.ce._teleportTargets || (parentComponent.ce._teleportTargets = /* @__PURE__ */ new Set())).add(target);
3267
- }
3268
- if (!disabled) {
3269
- mount(target, targetAnchor);
3270
- updateCssVars(n2, false);
3271
- }
3272
- } else if (!disabled) {
3273
- warn$1(
3274
- "Invalid Teleport target on mount:",
3275
- target,
3276
- `(${typeof target})`
3277
- );
3278
- }
3279
- };
3303
+ if (isTeleportDeferred(n2.props) || parentSuspense && parentSuspense.pendingBranch) {
3304
+ queuePendingMount(n2);
3305
+ return;
3306
+ }
3280
3307
  if (disabled) {
3281
- mount(container, mainAnchor);
3308
+ mount(n2, container, mainAnchor);
3282
3309
  updateCssVars(n2, true);
3283
3310
  }
3284
- if (isTeleportDeferred(n2.props) || parentSuspense && parentSuspense.pendingBranch) {
3285
- n2.el.__isMounted = false;
3286
- queuePostRenderEffect(() => {
3287
- if (n2.el.__isMounted !== false) return;
3288
- mountToTarget();
3289
- delete n2.el.__isMounted;
3290
- }, parentSuspense);
3291
- } else {
3292
- mountToTarget();
3293
- }
3311
+ mountToTarget();
3294
3312
  } else {
3295
3313
  n2.el = n1.el;
3296
- n2.targetStart = n1.targetStart;
3297
3314
  const mainAnchor = n2.anchor = n1.anchor;
3298
- const target = n2.target = n1.target;
3299
- const targetAnchor = n2.targetAnchor = n1.targetAnchor;
3300
- if (n1.el.__isMounted === false) {
3301
- queuePostRenderEffect(() => {
3302
- TeleportImpl.process(
3303
- n1,
3304
- n2,
3305
- container,
3306
- anchor,
3307
- parentComponent,
3308
- parentSuspense,
3309
- namespace,
3310
- slotScopeIds,
3311
- optimized,
3312
- internals
3313
- );
3314
- }, parentSuspense);
3315
+ const pendingMount = pendingMounts.get(n1);
3316
+ if (pendingMount) {
3317
+ pendingMount.flags |= 8;
3318
+ pendingMounts.delete(n1);
3319
+ queuePendingMount(n2);
3315
3320
  return;
3316
3321
  }
3322
+ n2.targetStart = n1.targetStart;
3323
+ const target = n2.target = n1.target;
3324
+ const targetAnchor = n2.targetAnchor = n1.targetAnchor;
3317
3325
  const wasDisabled = isTeleportDisabled(n1.props);
3318
3326
  const currentContainer = wasDisabled ? container : target;
3319
3327
  const currentAnchor = wasDisabled ? mainAnchor : targetAnchor;
@@ -3404,13 +3412,19 @@ const TeleportImpl = {
3404
3412
  target,
3405
3413
  props
3406
3414
  } = vnode;
3415
+ let shouldRemove = doRemove || !isTeleportDisabled(props);
3416
+ const pendingMount = pendingMounts.get(vnode);
3417
+ if (pendingMount) {
3418
+ pendingMount.flags |= 8;
3419
+ pendingMounts.delete(vnode);
3420
+ shouldRemove = false;
3421
+ }
3407
3422
  if (target) {
3408
3423
  hostRemove(targetStart);
3409
3424
  hostRemove(targetAnchor);
3410
3425
  }
3411
3426
  doRemove && hostRemove(anchor);
3412
3427
  if (shapeFlag & 16) {
3413
- const shouldRemove = doRemove || !isTeleportDisabled(props);
3414
3428
  for (let i = 0; i < children.length; i++) {
3415
3429
  const child = children[i];
3416
3430
  unmount(
@@ -3435,7 +3449,7 @@ function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }
3435
3449
  if (isReorder) {
3436
3450
  insert(el, container, parentAnchor);
3437
3451
  }
3438
- if (!isReorder || isTeleportDisabled(props)) {
3452
+ if (!pendingMounts.has(vnode) && (!isReorder || isTeleportDisabled(props))) {
3439
3453
  if (shapeFlag & 16) {
3440
3454
  for (let i = 0; i < children.length; i++) {
3441
3455
  move(
@@ -3609,10 +3623,14 @@ const BaseTransitionImpl = {
3609
3623
  const state = useTransitionState();
3610
3624
  return () => {
3611
3625
  const children = slots.default && getTransitionRawChildren(slots.default(), true);
3612
- if (!children || !children.length) {
3626
+ const child = children && children.length ? findNonCommentChild(children) : (
3627
+ // Keep explicit default-slot conditionals on the same transition path
3628
+ // as regular v-if branches, which render a comment placeholder.
3629
+ instance.subTree ? createCommentVNode() : void 0
3630
+ );
3631
+ if (!child) {
3613
3632
  return;
3614
3633
  }
3615
- const child = findNonCommentChild(children);
3616
3634
  const rawProps = toRaw(props);
3617
3635
  const { mode } = rawProps;
3618
3636
  if (mode && mode !== "in-out" && mode !== "out-in" && mode !== "default") {
@@ -9587,6 +9605,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
9587
9605
  if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) {
9588
9606
  return;
9589
9607
  }
9608
+ unsetCurrentInstance();
9590
9609
  instance.asyncResolved = true;
9591
9610
  const { vnode: vnode2 } = instance;
9592
9611
  {
@@ -10791,7 +10810,7 @@ function isMemoSame(cached, memo) {
10791
10810
  return true;
10792
10811
  }
10793
10812
 
10794
- const version = "3.5.31";
10813
+ const version = "3.5.33";
10795
10814
  const warn = warn$1 ;
10796
10815
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
10797
10816
  const devtools = devtools$1 ;
@@ -11338,7 +11357,19 @@ function patchStyle(el, prev, next) {
11338
11357
  if (key === "display") {
11339
11358
  hasControlledDisplay = true;
11340
11359
  }
11341
- setStyle(style, key, next[key]);
11360
+ const value = next[key];
11361
+ if (value != null) {
11362
+ if (!shouldPreserveTextareaResizeStyle(
11363
+ el,
11364
+ key,
11365
+ !isString(prev) && prev ? prev[key] : void 0,
11366
+ value
11367
+ )) {
11368
+ setStyle(style, key, value);
11369
+ }
11370
+ } else {
11371
+ setStyle(style, key, "");
11372
+ }
11342
11373
  }
11343
11374
  } else {
11344
11375
  if (isCssString) {
@@ -11411,6 +11442,9 @@ function autoPrefix(style, rawName) {
11411
11442
  }
11412
11443
  return rawName;
11413
11444
  }
11445
+ function shouldPreserveTextareaResizeStyle(el, key, prev, next) {
11446
+ return el.tagName === "TEXTAREA" && (key === "width" || key === "height") && isString(next) && prev === next;
11447
+ }
11414
11448
 
11415
11449
  const xlinkNS = "http://www.w3.org/1999/xlink";
11416
11450
  function patchAttr(el, key, value, isSVG, instance, isBoolean = isSpecialBooleanAttr(key)) {