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
  **/
@@ -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
  **/
@@ -1748,9 +1748,6 @@ var Vue = (function (exports) {
1748
1748
  return 0 /* INVALID */;
1749
1749
  }
1750
1750
  }
1751
- function getTargetType(value) {
1752
- return value["__v_skip"] || !Object.isExtensible(value) ? 0 /* INVALID */ : targetTypeMap(toRawType(value));
1753
- }
1754
1751
  // @__NO_SIDE_EFFECTS__
1755
1752
  function reactive(target) {
1756
1753
  if (/* @__PURE__ */ isReadonly(target)) {
@@ -1808,14 +1805,17 @@ var Vue = (function (exports) {
1808
1805
  if (target["__v_raw"] && !(isReadonly2 && target["__v_isReactive"])) {
1809
1806
  return target;
1810
1807
  }
1811
- const targetType = getTargetType(target);
1812
- if (targetType === 0 /* INVALID */) {
1808
+ if (target["__v_skip"] || !Object.isExtensible(target)) {
1813
1809
  return target;
1814
1810
  }
1815
1811
  const existingProxy = proxyMap.get(target);
1816
1812
  if (existingProxy) {
1817
1813
  return existingProxy;
1818
1814
  }
1815
+ const targetType = targetTypeMap(toRawType(target));
1816
+ if (targetType === 0 /* INVALID */) {
1817
+ return target;
1818
+ }
1819
1819
  const proxy = new Proxy(
1820
1820
  target,
1821
1821
  targetType === 2 /* COLLECTION */ ? collectionHandlers : baseHandlers
@@ -3470,19 +3470,18 @@ var Vue = (function (exports) {
3470
3470
  target,
3471
3471
  props
3472
3472
  } = vnode;
3473
- let shouldRemove = doRemove || !isTeleportDisabled(props);
3473
+ const shouldRemove = doRemove || !isTeleportDisabled(props);
3474
3474
  const pendingMount = pendingMounts.get(vnode);
3475
3475
  if (pendingMount) {
3476
3476
  pendingMount.flags |= 8;
3477
3477
  pendingMounts.delete(vnode);
3478
- shouldRemove = false;
3479
3478
  }
3480
3479
  if (target) {
3481
3480
  hostRemove(targetStart);
3482
3481
  hostRemove(targetAnchor);
3483
3482
  }
3484
3483
  doRemove && hostRemove(anchor);
3485
- if (shapeFlag & 16) {
3484
+ if (!pendingMount && shapeFlag & 16) {
3486
3485
  for (let i = 0; i < children.length; i++) {
3487
3486
  const child = children[i];
3488
3487
  unmount(
@@ -4450,20 +4449,16 @@ var Vue = (function (exports) {
4450
4449
  slotScopeIds,
4451
4450
  optimized
4452
4451
  );
4453
- let hasWarned = false;
4454
- while (next) {
4455
- if (!isMismatchAllowed(el, 1 /* CHILDREN */)) {
4456
- if (!hasWarned) {
4457
- warn$1(
4458
- `Hydration children mismatch on`,
4459
- el,
4460
- `
4452
+ if (next && !isMismatchAllowed(el, 1 /* CHILDREN */)) {
4453
+ warn$1(
4454
+ `Hydration children mismatch on`,
4455
+ el,
4456
+ `
4461
4457
  Server rendered element contains more child nodes than client vdom.`
4462
- );
4463
- hasWarned = true;
4464
- }
4465
- logMismatchError();
4466
- }
4458
+ );
4459
+ logMismatchError();
4460
+ }
4461
+ while (next) {
4467
4462
  const cur = next;
4468
4463
  next = next.nextSibling;
4469
4464
  remove(cur);
@@ -4526,7 +4521,7 @@ Server rendered element contains more child nodes than client vdom.`
4526
4521
  optimized = optimized || !!parentVNode.dynamicChildren;
4527
4522
  const children = parentVNode.children;
4528
4523
  const l = children.length;
4529
- let hasWarned = false;
4524
+ let hasCheckedMismatch = false;
4530
4525
  for (let i = 0; i < l; i++) {
4531
4526
  const vnode = optimized ? children[i] : children[i] = normalizeVNode(children[i]);
4532
4527
  const isText = vnode.type === Text;
@@ -4554,17 +4549,17 @@ Server rendered element contains more child nodes than client vdom.`
4554
4549
  } else if (isText && !vnode.children) {
4555
4550
  insert(vnode.el = createText(""), container);
4556
4551
  } else {
4557
- if (!isMismatchAllowed(container, 1 /* CHILDREN */)) {
4558
- if (!hasWarned) {
4552
+ if (!hasCheckedMismatch) {
4553
+ hasCheckedMismatch = true;
4554
+ if (!isMismatchAllowed(container, 1 /* CHILDREN */)) {
4559
4555
  warn$1(
4560
4556
  `Hydration children mismatch on`,
4561
4557
  container,
4562
4558
  `
4563
4559
  Server rendered element contains fewer child nodes than client vdom.`
4564
4560
  );
4565
- hasWarned = true;
4561
+ logMismatchError();
4566
4562
  }
4567
- logMismatchError();
4568
4563
  }
4569
4564
  patch(
4570
4565
  null,
@@ -8837,9 +8832,13 @@ If you want to remount the same app, move your app creation logic into a factory
8837
8832
  const needTransition2 = moveType !== 2 && shapeFlag & 1 && transition;
8838
8833
  if (needTransition2) {
8839
8834
  if (moveType === 0) {
8840
- transition.beforeEnter(el);
8841
- hostInsert(el, container, anchor);
8842
- queuePostRenderEffect(() => transition.enter(el), parentSuspense);
8835
+ if (transition.persisted && !el[leaveCbKey]) {
8836
+ hostInsert(el, container, anchor);
8837
+ } else {
8838
+ transition.beforeEnter(el);
8839
+ hostInsert(el, container, anchor);
8840
+ queuePostRenderEffect(() => transition.enter(el), parentSuspense);
8841
+ }
8843
8842
  } else {
8844
8843
  const { leave, delayLeave, afterLeave } = transition;
8845
8844
  const remove2 = () => {
@@ -8850,16 +8849,21 @@ If you want to remount the same app, move your app creation logic into a factory
8850
8849
  }
8851
8850
  };
8852
8851
  const performLeave = () => {
8852
+ const wasLeaving = el._isLeaving || !!el[leaveCbKey];
8853
8853
  if (el._isLeaving) {
8854
8854
  el[leaveCbKey](
8855
8855
  true
8856
8856
  /* cancelled */
8857
8857
  );
8858
8858
  }
8859
- leave(el, () => {
8859
+ if (transition.persisted && !wasLeaving) {
8860
8860
  remove2();
8861
- afterLeave && afterLeave();
8862
- });
8861
+ } else {
8862
+ leave(el, () => {
8863
+ remove2();
8864
+ afterLeave && afterLeave();
8865
+ });
8866
+ }
8863
8867
  };
8864
8868
  if (delayLeave) {
8865
8869
  delayLeave(el, remove2, performLeave);
@@ -10852,7 +10856,7 @@ Component that was made reactive: `,
10852
10856
  return true;
10853
10857
  }
10854
10858
 
10855
- const version = "3.5.34";
10859
+ const version = "3.5.35";
10856
10860
  const warn = warn$1 ;
10857
10861
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
10858
10862
  const devtools = devtools$1 ;
@@ -11590,12 +11594,37 @@ Component that was made reactive: `,
11590
11594
  } else if (e._vts <= invoker.attached) {
11591
11595
  return;
11592
11596
  }
11593
- callWithAsyncErrorHandling(
11594
- patchStopImmediatePropagation(e, invoker.value),
11595
- instance,
11596
- 5,
11597
- [e]
11598
- );
11597
+ const value = invoker.value;
11598
+ if (isArray(value)) {
11599
+ const originalStop = e.stopImmediatePropagation;
11600
+ e.stopImmediatePropagation = () => {
11601
+ originalStop.call(e);
11602
+ e._stopped = true;
11603
+ };
11604
+ const handlers = value.slice();
11605
+ const args = [e];
11606
+ for (let i = 0; i < handlers.length; i++) {
11607
+ if (e._stopped) {
11608
+ break;
11609
+ }
11610
+ const handler = handlers[i];
11611
+ if (handler) {
11612
+ callWithAsyncErrorHandling(
11613
+ handler,
11614
+ instance,
11615
+ 5,
11616
+ args
11617
+ );
11618
+ }
11619
+ }
11620
+ } else {
11621
+ callWithAsyncErrorHandling(
11622
+ value,
11623
+ instance,
11624
+ 5,
11625
+ [e]
11626
+ );
11627
+ }
11599
11628
  };
11600
11629
  invoker.value = initialValue;
11601
11630
  invoker.attached = getNow();
@@ -11611,20 +11640,6 @@ Expected function or array of functions, received type ${typeof value}.`
11611
11640
  );
11612
11641
  return NOOP;
11613
11642
  }
11614
- function patchStopImmediatePropagation(e, value) {
11615
- if (isArray(value)) {
11616
- const originalStop = e.stopImmediatePropagation;
11617
- e.stopImmediatePropagation = () => {
11618
- originalStop.call(e);
11619
- e._stopped = true;
11620
- };
11621
- return value.map(
11622
- (fn) => (e2) => !e2._stopped && fn && fn(e2)
11623
- );
11624
- } else {
11625
- return value;
11626
- }
11627
- }
11628
11643
 
11629
11644
  const isNativeOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // lowercase letter
11630
11645
  key.charCodeAt(2) > 96 && key.charCodeAt(2) < 123;
@@ -16330,7 +16345,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
16330
16345
  const keyProp = findProp(node, `key`, false, true);
16331
16346
  keyProp && keyProp.type === 7;
16332
16347
  let keyExp = keyProp && (keyProp.type === 6 ? keyProp.value ? createSimpleExpression(keyProp.value.content, true) : void 0 : keyProp.exp);
16333
- const keyProperty = keyProp && keyExp ? createObjectProperty(`key`, keyExp) : null;
16348
+ const keyProperty = keyExp ? createObjectProperty(`key`, keyExp) : null;
16334
16349
  const isStableFragment = forNode.source.type === 4 && forNode.source.constType > 0;
16335
16350
  const fragmentFlag = isStableFragment ? 64 : keyProp ? 128 : 256;
16336
16351
  forNode.codegenNode = createVNodeCall(