@vue/runtime-dom 3.5.33 → 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.33
2
+ * @vue/runtime-dom 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/runtime-dom v3.5.33
2
+ * @vue/runtime-dom 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/runtime-dom v3.5.33
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
  }
@@ -513,8 +519,12 @@ class ReactiveEffect {
513
519
  */
514
520
  this.cleanup = void 0;
515
521
  this.scheduler = void 0;
516
- if (activeEffectScope && activeEffectScope.active) {
517
- activeEffectScope.effects.push(this);
522
+ if (activeEffectScope) {
523
+ if (activeEffectScope.active) {
524
+ activeEffectScope.effects.push(this);
525
+ } else {
526
+ this.flags &= -2;
527
+ }
518
528
  }
519
529
  }
520
530
  pause() {
@@ -7442,7 +7452,7 @@ function getInvalidTypeMessage(name, value, expectedTypes) {
7442
7452
  const receivedType = toRawType(value);
7443
7453
  const expectedValue = styleValue(value, expectedType);
7444
7454
  const receivedValue = styleValue(value, receivedType);
7445
- if (expectedTypes.length === 1 && isExplicable(expectedType) && !isBoolean(expectedType, receivedType)) {
7455
+ if (expectedTypes.length === 1 && isExplicable(expectedType) && isCoercible(expectedType, receivedType)) {
7446
7456
  message += ` with value ${expectedValue}`;
7447
7457
  }
7448
7458
  message += `, got ${receivedType} `;
@@ -7452,7 +7462,9 @@ function getInvalidTypeMessage(name, value, expectedTypes) {
7452
7462
  return message;
7453
7463
  }
7454
7464
  function styleValue(value, type) {
7455
- if (type === "String") {
7465
+ if (isSymbol(value)) {
7466
+ return value.toString();
7467
+ } else if (type === "String") {
7456
7468
  return `"${value}"`;
7457
7469
  } else if (type === "Number") {
7458
7470
  return `${Number(value)}`;
@@ -7464,8 +7476,11 @@ function isExplicable(type) {
7464
7476
  const explicitTypes = ["string", "number", "boolean"];
7465
7477
  return explicitTypes.some((elem) => type.toLowerCase() === elem);
7466
7478
  }
7467
- function isBoolean(...args) {
7468
- 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
+ });
7469
7484
  }
7470
7485
 
7471
7486
  const isInternalKey = (key) => key === "_" || key === "_ctx" || key === "$stable";
@@ -9485,13 +9500,14 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
9485
9500
  suspense.isHydrating = false;
9486
9501
  } else if (!resume) {
9487
9502
  delayEnter = activeBranch && pendingBranch.transition && pendingBranch.transition.mode === "out-in";
9503
+ let hasUpdatedAnchor = false;
9488
9504
  if (delayEnter) {
9489
9505
  activeBranch.transition.afterLeave = () => {
9490
9506
  if (pendingId === suspense.pendingId) {
9491
9507
  move(
9492
9508
  pendingBranch,
9493
9509
  container2,
9494
- anchor === initialAnchor ? next(activeBranch) : anchor,
9510
+ anchor === initialAnchor && !hasUpdatedAnchor ? next(activeBranch) : anchor,
9495
9511
  0
9496
9512
  );
9497
9513
  queuePostFlushCb(effects);
@@ -9504,6 +9520,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
9504
9520
  if (activeBranch && !suspense.isFallbackMountPending) {
9505
9521
  if (parentNode(activeBranch.el) === container2) {
9506
9522
  anchor = next(activeBranch);
9523
+ hasUpdatedAnchor = true;
9507
9524
  }
9508
9525
  unmount(activeBranch, parentComponent2, suspense, true);
9509
9526
  if (!delayEnter && isInFallback && vnode2.ssFallback) {
@@ -10810,7 +10827,7 @@ function isMemoSame(cached, memo) {
10810
10827
  return true;
10811
10828
  }
10812
10829
 
10813
- const version = "3.5.33";
10830
+ const version = "3.5.34";
10814
10831
  const warn = warn$1 ;
10815
10832
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
10816
10833
  const devtools = devtools$1 ;