@vue/runtime-dom 3.5.32 → 3.5.34

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.32
2
+ * @vue/runtime-dom v3.5.34
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.32
2
+ * @vue/runtime-dom v3.5.34
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.32
2
+ * @vue/runtime-dom v3.5.34
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -354,12 +354,18 @@ class EffectScope {
354
354
  */
355
355
  this.cleanups = [];
356
356
  this._isPaused = false;
357
+ this._warnOnRun = true;
357
358
  this.__v_skip = true;
358
- this.parent = activeEffectScope;
359
359
  if (!detached && activeEffectScope) {
360
- this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(
361
- this
362
- ) - 1;
360
+ if (activeEffectScope.active) {
361
+ this.parent = activeEffectScope;
362
+ this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(
363
+ this
364
+ ) - 1;
365
+ } else {
366
+ this._active = false;
367
+ this._warnOnRun = false;
368
+ }
363
369
  }
364
370
  }
365
371
  get active() {
@@ -407,7 +413,7 @@ class EffectScope {
407
413
  } finally {
408
414
  activeEffectScope = currentEffectScope;
409
415
  }
410
- } else {
416
+ } else if (this._warnOnRun) {
411
417
  warn$2(`cannot run an inactive effect scope.`);
412
418
  }
413
419
  }
@@ -427,7 +433,18 @@ class EffectScope {
427
433
  */
428
434
  off() {
429
435
  if (this._on > 0 && --this._on === 0) {
430
- activeEffectScope = this.prevScope;
436
+ if (activeEffectScope === this) {
437
+ activeEffectScope = this.prevScope;
438
+ } else {
439
+ let current = activeEffectScope;
440
+ while (current) {
441
+ if (current.prevScope === this) {
442
+ current.prevScope = this.prevScope;
443
+ break;
444
+ }
445
+ current = current.prevScope;
446
+ }
447
+ }
431
448
  this.prevScope = void 0;
432
449
  }
433
450
  }
@@ -502,8 +519,12 @@ class ReactiveEffect {
502
519
  */
503
520
  this.cleanup = void 0;
504
521
  this.scheduler = void 0;
505
- if (activeEffectScope && activeEffectScope.active) {
506
- activeEffectScope.effects.push(this);
522
+ if (activeEffectScope) {
523
+ if (activeEffectScope.active) {
524
+ activeEffectScope.effects.push(this);
525
+ } else {
526
+ this.flags &= -2;
527
+ }
507
528
  }
508
529
  }
509
530
  pause() {
@@ -3227,7 +3248,7 @@ const TeleportImpl = {
3227
3248
  mc: mountChildren,
3228
3249
  pc: patchChildren,
3229
3250
  pbc: patchBlockChildren,
3230
- o: { insert, querySelector, createText, createComment }
3251
+ o: { insert, querySelector, createText, createComment, parentNode }
3231
3252
  } = internals;
3232
3253
  const disabled = isTeleportDisabled(n2.props);
3233
3254
  let { dynamicChildren } = n2;
@@ -3275,7 +3296,8 @@ const TeleportImpl = {
3275
3296
  if (pendingMounts.get(vnode) !== mountJob) return;
3276
3297
  pendingMounts.delete(vnode);
3277
3298
  if (isTeleportDisabled(vnode.props)) {
3278
- mount(vnode, container, vnode.anchor);
3299
+ const mountContainer = parentNode(vnode.el) || container;
3300
+ mount(vnode, mountContainer, vnode.anchor);
3279
3301
  updateCssVars(vnode, true);
3280
3302
  }
3281
3303
  mountToTarget(vnode);
@@ -3437,7 +3459,7 @@ function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }
3437
3459
  if (isReorder) {
3438
3460
  insert(el, container, parentAnchor);
3439
3461
  }
3440
- if (!isReorder || isTeleportDisabled(props)) {
3462
+ if (!pendingMounts.has(vnode) && (!isReorder || isTeleportDisabled(props))) {
3441
3463
  if (shapeFlag & 16) {
3442
3464
  for (let i = 0; i < children.length; i++) {
3443
3465
  move(
@@ -3611,10 +3633,14 @@ const BaseTransitionImpl = {
3611
3633
  const state = useTransitionState();
3612
3634
  return () => {
3613
3635
  const children = slots.default && getTransitionRawChildren(slots.default(), true);
3614
- if (!children || !children.length) {
3636
+ const child = children && children.length ? findNonCommentChild(children) : (
3637
+ // Keep explicit default-slot conditionals on the same transition path
3638
+ // as regular v-if branches, which render a comment placeholder.
3639
+ instance.subTree ? createCommentVNode() : void 0
3640
+ );
3641
+ if (!child) {
3615
3642
  return;
3616
3643
  }
3617
- const child = findNonCommentChild(children);
3618
3644
  const rawProps = toRaw(props);
3619
3645
  const { mode } = rawProps;
3620
3646
  if (mode && mode !== "in-out" && mode !== "out-in" && mode !== "default") {
@@ -7426,7 +7452,7 @@ function getInvalidTypeMessage(name, value, expectedTypes) {
7426
7452
  const receivedType = toRawType(value);
7427
7453
  const expectedValue = styleValue(value, expectedType);
7428
7454
  const receivedValue = styleValue(value, receivedType);
7429
- if (expectedTypes.length === 1 && isExplicable(expectedType) && !isBoolean(expectedType, receivedType)) {
7455
+ if (expectedTypes.length === 1 && isExplicable(expectedType) && isCoercible(expectedType, receivedType)) {
7430
7456
  message += ` with value ${expectedValue}`;
7431
7457
  }
7432
7458
  message += `, got ${receivedType} `;
@@ -7436,7 +7462,9 @@ function getInvalidTypeMessage(name, value, expectedTypes) {
7436
7462
  return message;
7437
7463
  }
7438
7464
  function styleValue(value, type) {
7439
- if (type === "String") {
7465
+ if (isSymbol(value)) {
7466
+ return value.toString();
7467
+ } else if (type === "String") {
7440
7468
  return `"${value}"`;
7441
7469
  } else if (type === "Number") {
7442
7470
  return `${Number(value)}`;
@@ -7448,8 +7476,11 @@ function isExplicable(type) {
7448
7476
  const explicitTypes = ["string", "number", "boolean"];
7449
7477
  return explicitTypes.some((elem) => type.toLowerCase() === elem);
7450
7478
  }
7451
- function isBoolean(...args) {
7452
- return args.some((elem) => elem.toLowerCase() === "boolean");
7479
+ function isCoercible(...args) {
7480
+ return args.every((elem) => {
7481
+ const value = elem.toLowerCase();
7482
+ return value !== "boolean" && value !== "symbol";
7483
+ });
7453
7484
  }
7454
7485
 
7455
7486
  const isInternalKey = (key) => key === "_" || key === "_ctx" || key === "$stable";
@@ -9469,13 +9500,14 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
9469
9500
  suspense.isHydrating = false;
9470
9501
  } else if (!resume) {
9471
9502
  delayEnter = activeBranch && pendingBranch.transition && pendingBranch.transition.mode === "out-in";
9503
+ let hasUpdatedAnchor = false;
9472
9504
  if (delayEnter) {
9473
9505
  activeBranch.transition.afterLeave = () => {
9474
9506
  if (pendingId === suspense.pendingId) {
9475
9507
  move(
9476
9508
  pendingBranch,
9477
9509
  container2,
9478
- anchor === initialAnchor ? next(activeBranch) : anchor,
9510
+ anchor === initialAnchor && !hasUpdatedAnchor ? next(activeBranch) : anchor,
9479
9511
  0
9480
9512
  );
9481
9513
  queuePostFlushCb(effects);
@@ -9488,6 +9520,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
9488
9520
  if (activeBranch && !suspense.isFallbackMountPending) {
9489
9521
  if (parentNode(activeBranch.el) === container2) {
9490
9522
  anchor = next(activeBranch);
9523
+ hasUpdatedAnchor = true;
9491
9524
  }
9492
9525
  unmount(activeBranch, parentComponent2, suspense, true);
9493
9526
  if (!delayEnter && isInFallback && vnode2.ssFallback) {
@@ -10794,7 +10827,7 @@ function isMemoSame(cached, memo) {
10794
10827
  return true;
10795
10828
  }
10796
10829
 
10797
- const version = "3.5.32";
10830
+ const version = "3.5.34";
10798
10831
  const warn = warn$1 ;
10799
10832
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
10800
10833
  const devtools = devtools$1 ;
@@ -11341,7 +11374,19 @@ function patchStyle(el, prev, next) {
11341
11374
  if (key === "display") {
11342
11375
  hasControlledDisplay = true;
11343
11376
  }
11344
- setStyle(style, key, next[key]);
11377
+ const value = next[key];
11378
+ if (value != null) {
11379
+ if (!shouldPreserveTextareaResizeStyle(
11380
+ el,
11381
+ key,
11382
+ !isString(prev) && prev ? prev[key] : void 0,
11383
+ value
11384
+ )) {
11385
+ setStyle(style, key, value);
11386
+ }
11387
+ } else {
11388
+ setStyle(style, key, "");
11389
+ }
11345
11390
  }
11346
11391
  } else {
11347
11392
  if (isCssString) {
@@ -11414,6 +11459,9 @@ function autoPrefix(style, rawName) {
11414
11459
  }
11415
11460
  return rawName;
11416
11461
  }
11462
+ function shouldPreserveTextareaResizeStyle(el, key, prev, next) {
11463
+ return el.tagName === "TEXTAREA" && (key === "width" || key === "height") && isString(next) && prev === next;
11464
+ }
11417
11465
 
11418
11466
  const xlinkNS = "http://www.w3.org/1999/xlink";
11419
11467
  function patchAttr(el, key, value, isSVG, instance, isBoolean = isSpecialBooleanAttr(key)) {