vue 3.5.34 → 3.5.35

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.34
2
+ * vue v3.5.35
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -1675,9 +1675,6 @@ var Vue = (function (exports) {
1675
1675
  return 0 /* INVALID */;
1676
1676
  }
1677
1677
  }
1678
- function getTargetType(value) {
1679
- return value["__v_skip"] || !Object.isExtensible(value) ? 0 /* INVALID */ : targetTypeMap(toRawType(value));
1680
- }
1681
1678
  // @__NO_SIDE_EFFECTS__
1682
1679
  function reactive(target) {
1683
1680
  if (/* @__PURE__ */ isReadonly(target)) {
@@ -1735,14 +1732,17 @@ var Vue = (function (exports) {
1735
1732
  if (target["__v_raw"] && !(isReadonly2 && target["__v_isReactive"])) {
1736
1733
  return target;
1737
1734
  }
1738
- const targetType = getTargetType(target);
1739
- if (targetType === 0 /* INVALID */) {
1735
+ if (target["__v_skip"] || !Object.isExtensible(target)) {
1740
1736
  return target;
1741
1737
  }
1742
1738
  const existingProxy = proxyMap.get(target);
1743
1739
  if (existingProxy) {
1744
1740
  return existingProxy;
1745
1741
  }
1742
+ const targetType = targetTypeMap(toRawType(target));
1743
+ if (targetType === 0 /* INVALID */) {
1744
+ return target;
1745
+ }
1746
1746
  const proxy = new Proxy(
1747
1747
  target,
1748
1748
  targetType === 2 /* COLLECTION */ ? collectionHandlers : baseHandlers
@@ -3397,19 +3397,18 @@ var Vue = (function (exports) {
3397
3397
  target,
3398
3398
  props
3399
3399
  } = vnode;
3400
- let shouldRemove = doRemove || !isTeleportDisabled(props);
3400
+ const shouldRemove = doRemove || !isTeleportDisabled(props);
3401
3401
  const pendingMount = pendingMounts.get(vnode);
3402
3402
  if (pendingMount) {
3403
3403
  pendingMount.flags |= 8;
3404
3404
  pendingMounts.delete(vnode);
3405
- shouldRemove = false;
3406
3405
  }
3407
3406
  if (target) {
3408
3407
  hostRemove(targetStart);
3409
3408
  hostRemove(targetAnchor);
3410
3409
  }
3411
3410
  doRemove && hostRemove(anchor);
3412
- if (shapeFlag & 16) {
3411
+ if (!pendingMount && shapeFlag & 16) {
3413
3412
  for (let i = 0; i < children.length; i++) {
3414
3413
  const child = children[i];
3415
3414
  unmount(
@@ -4377,20 +4376,16 @@ var Vue = (function (exports) {
4377
4376
  slotScopeIds,
4378
4377
  optimized
4379
4378
  );
4380
- let hasWarned = false;
4381
- while (next) {
4382
- if (!isMismatchAllowed(el, 1 /* CHILDREN */)) {
4383
- if (!hasWarned) {
4384
- warn$1(
4385
- `Hydration children mismatch on`,
4386
- el,
4387
- `
4379
+ if (next && !isMismatchAllowed(el, 1 /* CHILDREN */)) {
4380
+ warn$1(
4381
+ `Hydration children mismatch on`,
4382
+ el,
4383
+ `
4388
4384
  Server rendered element contains more child nodes than client vdom.`
4389
- );
4390
- hasWarned = true;
4391
- }
4392
- logMismatchError();
4393
- }
4385
+ );
4386
+ logMismatchError();
4387
+ }
4388
+ while (next) {
4394
4389
  const cur = next;
4395
4390
  next = next.nextSibling;
4396
4391
  remove(cur);
@@ -4453,7 +4448,7 @@ Server rendered element contains more child nodes than client vdom.`
4453
4448
  optimized = optimized || !!parentVNode.dynamicChildren;
4454
4449
  const children = parentVNode.children;
4455
4450
  const l = children.length;
4456
- let hasWarned = false;
4451
+ let hasCheckedMismatch = false;
4457
4452
  for (let i = 0; i < l; i++) {
4458
4453
  const vnode = optimized ? children[i] : children[i] = normalizeVNode(children[i]);
4459
4454
  const isText = vnode.type === Text;
@@ -4481,17 +4476,17 @@ Server rendered element contains more child nodes than client vdom.`
4481
4476
  } else if (isText && !vnode.children) {
4482
4477
  insert(vnode.el = createText(""), container);
4483
4478
  } else {
4484
- if (!isMismatchAllowed(container, 1 /* CHILDREN */)) {
4485
- if (!hasWarned) {
4479
+ if (!hasCheckedMismatch) {
4480
+ hasCheckedMismatch = true;
4481
+ if (!isMismatchAllowed(container, 1 /* CHILDREN */)) {
4486
4482
  warn$1(
4487
4483
  `Hydration children mismatch on`,
4488
4484
  container,
4489
4485
  `
4490
4486
  Server rendered element contains fewer child nodes than client vdom.`
4491
4487
  );
4492
- hasWarned = true;
4488
+ logMismatchError();
4493
4489
  }
4494
- logMismatchError();
4495
4490
  }
4496
4491
  patch(
4497
4492
  null,
@@ -8764,9 +8759,13 @@ If you want to remount the same app, move your app creation logic into a factory
8764
8759
  const needTransition2 = moveType !== 2 && shapeFlag & 1 && transition;
8765
8760
  if (needTransition2) {
8766
8761
  if (moveType === 0) {
8767
- transition.beforeEnter(el);
8768
- hostInsert(el, container, anchor);
8769
- queuePostRenderEffect(() => transition.enter(el), parentSuspense);
8762
+ if (transition.persisted && !el[leaveCbKey]) {
8763
+ hostInsert(el, container, anchor);
8764
+ } else {
8765
+ transition.beforeEnter(el);
8766
+ hostInsert(el, container, anchor);
8767
+ queuePostRenderEffect(() => transition.enter(el), parentSuspense);
8768
+ }
8770
8769
  } else {
8771
8770
  const { leave, delayLeave, afterLeave } = transition;
8772
8771
  const remove2 = () => {
@@ -8777,16 +8776,21 @@ If you want to remount the same app, move your app creation logic into a factory
8777
8776
  }
8778
8777
  };
8779
8778
  const performLeave = () => {
8779
+ const wasLeaving = el._isLeaving || !!el[leaveCbKey];
8780
8780
  if (el._isLeaving) {
8781
8781
  el[leaveCbKey](
8782
8782
  true
8783
8783
  /* cancelled */
8784
8784
  );
8785
8785
  }
8786
- leave(el, () => {
8786
+ if (transition.persisted && !wasLeaving) {
8787
8787
  remove2();
8788
- afterLeave && afterLeave();
8789
- });
8788
+ } else {
8789
+ leave(el, () => {
8790
+ remove2();
8791
+ afterLeave && afterLeave();
8792
+ });
8793
+ }
8790
8794
  };
8791
8795
  if (delayLeave) {
8792
8796
  delayLeave(el, remove2, performLeave);
@@ -10779,7 +10783,7 @@ Component that was made reactive: `,
10779
10783
  return true;
10780
10784
  }
10781
10785
 
10782
- const version = "3.5.34";
10786
+ const version = "3.5.35";
10783
10787
  const warn = warn$1 ;
10784
10788
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
10785
10789
  const devtools = devtools$1 ;
@@ -11517,12 +11521,37 @@ Component that was made reactive: `,
11517
11521
  } else if (e._vts <= invoker.attached) {
11518
11522
  return;
11519
11523
  }
11520
- callWithAsyncErrorHandling(
11521
- patchStopImmediatePropagation(e, invoker.value),
11522
- instance,
11523
- 5,
11524
- [e]
11525
- );
11524
+ const value = invoker.value;
11525
+ if (isArray(value)) {
11526
+ const originalStop = e.stopImmediatePropagation;
11527
+ e.stopImmediatePropagation = () => {
11528
+ originalStop.call(e);
11529
+ e._stopped = true;
11530
+ };
11531
+ const handlers = value.slice();
11532
+ const args = [e];
11533
+ for (let i = 0; i < handlers.length; i++) {
11534
+ if (e._stopped) {
11535
+ break;
11536
+ }
11537
+ const handler = handlers[i];
11538
+ if (handler) {
11539
+ callWithAsyncErrorHandling(
11540
+ handler,
11541
+ instance,
11542
+ 5,
11543
+ args
11544
+ );
11545
+ }
11546
+ }
11547
+ } else {
11548
+ callWithAsyncErrorHandling(
11549
+ value,
11550
+ instance,
11551
+ 5,
11552
+ [e]
11553
+ );
11554
+ }
11526
11555
  };
11527
11556
  invoker.value = initialValue;
11528
11557
  invoker.attached = getNow();
@@ -11538,20 +11567,6 @@ Expected function or array of functions, received type ${typeof value}.`
11538
11567
  );
11539
11568
  return NOOP;
11540
11569
  }
11541
- function patchStopImmediatePropagation(e, value) {
11542
- if (isArray(value)) {
11543
- const originalStop = e.stopImmediatePropagation;
11544
- e.stopImmediatePropagation = () => {
11545
- originalStop.call(e);
11546
- e._stopped = true;
11547
- };
11548
- return value.map(
11549
- (fn) => (e2) => !e2._stopped && fn && fn(e2)
11550
- );
11551
- } else {
11552
- return value;
11553
- }
11554
- }
11555
11570
 
11556
11571
  const isNativeOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // lowercase letter
11557
11572
  key.charCodeAt(2) > 96 && key.charCodeAt(2) < 123;