vue 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 v3.5.32
2
+ * vue v3.5.34
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.32
2
+ * vue v3.5.34
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -430,12 +430,18 @@ var Vue = (function (exports) {
430
430
  */
431
431
  this.cleanups = [];
432
432
  this._isPaused = false;
433
+ this._warnOnRun = true;
433
434
  this.__v_skip = true;
434
- this.parent = activeEffectScope;
435
435
  if (!detached && activeEffectScope) {
436
- this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(
437
- this
438
- ) - 1;
436
+ if (activeEffectScope.active) {
437
+ this.parent = activeEffectScope;
438
+ this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(
439
+ this
440
+ ) - 1;
441
+ } else {
442
+ this._active = false;
443
+ this._warnOnRun = false;
444
+ }
439
445
  }
440
446
  }
441
447
  get active() {
@@ -483,7 +489,7 @@ var Vue = (function (exports) {
483
489
  } finally {
484
490
  activeEffectScope = currentEffectScope;
485
491
  }
486
- } else {
492
+ } else if (this._warnOnRun) {
487
493
  warn$2(`cannot run an inactive effect scope.`);
488
494
  }
489
495
  }
@@ -503,7 +509,18 @@ var Vue = (function (exports) {
503
509
  */
504
510
  off() {
505
511
  if (this._on > 0 && --this._on === 0) {
506
- activeEffectScope = this.prevScope;
512
+ if (activeEffectScope === this) {
513
+ activeEffectScope = this.prevScope;
514
+ } else {
515
+ let current = activeEffectScope;
516
+ while (current) {
517
+ if (current.prevScope === this) {
518
+ current.prevScope = this.prevScope;
519
+ break;
520
+ }
521
+ current = current.prevScope;
522
+ }
523
+ }
507
524
  this.prevScope = void 0;
508
525
  }
509
526
  }
@@ -578,8 +595,12 @@ var Vue = (function (exports) {
578
595
  */
579
596
  this.cleanup = void 0;
580
597
  this.scheduler = void 0;
581
- if (activeEffectScope && activeEffectScope.active) {
582
- activeEffectScope.effects.push(this);
598
+ if (activeEffectScope) {
599
+ if (activeEffectScope.active) {
600
+ activeEffectScope.effects.push(this);
601
+ } else {
602
+ this.flags &= -2;
603
+ }
583
604
  }
584
605
  }
585
606
  pause() {
@@ -3275,7 +3296,7 @@ var Vue = (function (exports) {
3275
3296
  mc: mountChildren,
3276
3297
  pc: patchChildren,
3277
3298
  pbc: patchBlockChildren,
3278
- o: { insert, querySelector, createText, createComment }
3299
+ o: { insert, querySelector, createText, createComment, parentNode }
3279
3300
  } = internals;
3280
3301
  const disabled = isTeleportDisabled(n2.props);
3281
3302
  let { dynamicChildren } = n2;
@@ -3323,7 +3344,8 @@ var Vue = (function (exports) {
3323
3344
  if (pendingMounts.get(vnode) !== mountJob) return;
3324
3345
  pendingMounts.delete(vnode);
3325
3346
  if (isTeleportDisabled(vnode.props)) {
3326
- mount(vnode, container, vnode.anchor);
3347
+ const mountContainer = parentNode(vnode.el) || container;
3348
+ mount(vnode, mountContainer, vnode.anchor);
3327
3349
  updateCssVars(vnode, true);
3328
3350
  }
3329
3351
  mountToTarget(vnode);
@@ -3485,7 +3507,7 @@ var Vue = (function (exports) {
3485
3507
  if (isReorder) {
3486
3508
  insert(el, container, parentAnchor);
3487
3509
  }
3488
- if (!isReorder || isTeleportDisabled(props)) {
3510
+ if (!pendingMounts.has(vnode) && (!isReorder || isTeleportDisabled(props))) {
3489
3511
  if (shapeFlag & 16) {
3490
3512
  for (let i = 0; i < children.length; i++) {
3491
3513
  move(
@@ -3659,10 +3681,14 @@ var Vue = (function (exports) {
3659
3681
  const state = useTransitionState();
3660
3682
  return () => {
3661
3683
  const children = slots.default && getTransitionRawChildren(slots.default(), true);
3662
- if (!children || !children.length) {
3684
+ const child = children && children.length ? findNonCommentChild(children) : (
3685
+ // Keep explicit default-slot conditionals on the same transition path
3686
+ // as regular v-if branches, which render a comment placeholder.
3687
+ instance.subTree ? createCommentVNode() : void 0
3688
+ );
3689
+ if (!child) {
3663
3690
  return;
3664
3691
  }
3665
- const child = findNonCommentChild(children);
3666
3692
  const rawProps = toRaw(props);
3667
3693
  const { mode } = rawProps;
3668
3694
  if (mode && mode !== "in-out" && mode !== "out-in" && mode !== "default") {
@@ -7465,7 +7491,7 @@ If you want to remount the same app, move your app creation logic into a factory
7465
7491
  const receivedType = toRawType(value);
7466
7492
  const expectedValue = styleValue(value, expectedType);
7467
7493
  const receivedValue = styleValue(value, receivedType);
7468
- if (expectedTypes.length === 1 && isExplicable(expectedType) && !isBoolean(expectedType, receivedType)) {
7494
+ if (expectedTypes.length === 1 && isExplicable(expectedType) && isCoercible(expectedType, receivedType)) {
7469
7495
  message += ` with value ${expectedValue}`;
7470
7496
  }
7471
7497
  message += `, got ${receivedType} `;
@@ -7475,7 +7501,9 @@ If you want to remount the same app, move your app creation logic into a factory
7475
7501
  return message;
7476
7502
  }
7477
7503
  function styleValue(value, type) {
7478
- if (type === "String") {
7504
+ if (isSymbol(value)) {
7505
+ return value.toString();
7506
+ } else if (type === "String") {
7479
7507
  return `"${value}"`;
7480
7508
  } else if (type === "Number") {
7481
7509
  return `${Number(value)}`;
@@ -7487,8 +7515,11 @@ If you want to remount the same app, move your app creation logic into a factory
7487
7515
  const explicitTypes = ["string", "number", "boolean"];
7488
7516
  return explicitTypes.some((elem) => type.toLowerCase() === elem);
7489
7517
  }
7490
- function isBoolean(...args) {
7491
- return args.some((elem) => elem.toLowerCase() === "boolean");
7518
+ function isCoercible(...args) {
7519
+ return args.every((elem) => {
7520
+ const value = elem.toLowerCase();
7521
+ return value !== "boolean" && value !== "symbol";
7522
+ });
7492
7523
  }
7493
7524
 
7494
7525
  const isInternalKey = (key) => key === "_" || key === "_ctx" || key === "$stable";
@@ -9508,13 +9539,14 @@ If you want to remount the same app, move your app creation logic into a factory
9508
9539
  suspense.isHydrating = false;
9509
9540
  } else if (!resume) {
9510
9541
  delayEnter = activeBranch && pendingBranch.transition && pendingBranch.transition.mode === "out-in";
9542
+ let hasUpdatedAnchor = false;
9511
9543
  if (delayEnter) {
9512
9544
  activeBranch.transition.afterLeave = () => {
9513
9545
  if (pendingId === suspense.pendingId) {
9514
9546
  move(
9515
9547
  pendingBranch,
9516
9548
  container2,
9517
- anchor === initialAnchor ? next(activeBranch) : anchor,
9549
+ anchor === initialAnchor && !hasUpdatedAnchor ? next(activeBranch) : anchor,
9518
9550
  0
9519
9551
  );
9520
9552
  queuePostFlushCb(effects);
@@ -9527,6 +9559,7 @@ If you want to remount the same app, move your app creation logic into a factory
9527
9559
  if (activeBranch && !suspense.isFallbackMountPending) {
9528
9560
  if (parentNode(activeBranch.el) === container2) {
9529
9561
  anchor = next(activeBranch);
9562
+ hasUpdatedAnchor = true;
9530
9563
  }
9531
9564
  unmount(activeBranch, parentComponent2, suspense, true);
9532
9565
  if (!delayEnter && isInFallback && vnode2.ssFallback) {
@@ -10819,7 +10852,7 @@ Component that was made reactive: `,
10819
10852
  return true;
10820
10853
  }
10821
10854
 
10822
- const version = "3.5.32";
10855
+ const version = "3.5.34";
10823
10856
  const warn = warn$1 ;
10824
10857
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
10825
10858
  const devtools = devtools$1 ;
@@ -11347,7 +11380,19 @@ Component that was made reactive: `,
11347
11380
  if (key === "display") {
11348
11381
  hasControlledDisplay = true;
11349
11382
  }
11350
- setStyle(style, key, next[key]);
11383
+ const value = next[key];
11384
+ if (value != null) {
11385
+ if (!shouldPreserveTextareaResizeStyle(
11386
+ el,
11387
+ key,
11388
+ !isString(prev) && prev ? prev[key] : void 0,
11389
+ value
11390
+ )) {
11391
+ setStyle(style, key, value);
11392
+ }
11393
+ } else {
11394
+ setStyle(style, key, "");
11395
+ }
11351
11396
  }
11352
11397
  } else {
11353
11398
  if (isCssString) {
@@ -11420,6 +11465,9 @@ Component that was made reactive: `,
11420
11465
  }
11421
11466
  return rawName;
11422
11467
  }
11468
+ function shouldPreserveTextareaResizeStyle(el, key, prev, next) {
11469
+ return el.tagName === "TEXTAREA" && (key === "width" || key === "height") && isString(next) && prev === next;
11470
+ }
11423
11471
 
11424
11472
  const xlinkNS = "http://www.w3.org/1999/xlink";
11425
11473
  function patchAttr(el, key, value, isSVG, instance, isBoolean = isSpecialBooleanAttr(key)) {