@vue/runtime-core 3.5.41 → 3.5.43

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-core v3.5.41
2
+ * @vue/runtime-core v3.5.43
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -2064,13 +2064,15 @@ function createHydrationFunctions(rendererInternals) {
2064
2064
  getContainerType(container),
2065
2065
  optimized
2066
2066
  );
2067
- if (isAsyncWrapper(vnode) && !vnode.type.__asyncResolved) {
2067
+ if ((isAsyncWrapper(vnode) || vnode.component.asyncDep) && !vnode.component.subTree) {
2068
2068
  let subTree;
2069
2069
  if (isFragmentStart) {
2070
- subTree = createVNode(Fragment);
2070
+ subTree = createVNode(Static);
2071
2071
  subTree.anchor = nextNode ? nextNode.previousSibling : container.lastChild;
2072
2072
  } else {
2073
- subTree = node.nodeType === 3 ? createTextVNode("") : createVNode("div");
2073
+ subTree = node.nodeType === 3 ? createTextVNode("") : createVNode(
2074
+ node.nodeType === 8 ? Comment : "div"
2075
+ );
2074
2076
  }
2075
2077
  subTree.el = node;
2076
2078
  vnode.component.subTree = subTree;
@@ -2973,7 +2975,10 @@ const KeepAliveImpl = {
2973
2975
  if (pendingCacheKey != null) {
2974
2976
  if (isSuspense(instance.subTree.type)) {
2975
2977
  queuePostRenderEffect(() => {
2976
- cache.set(pendingCacheKey, getInnerChild(instance.subTree));
2978
+ const vnode = getInnerChild(instance.subTree);
2979
+ if (vnode.component) {
2980
+ cache.set(pendingCacheKey, vnode);
2981
+ }
2977
2982
  }, instance.subTree.suspense);
2978
2983
  } else {
2979
2984
  cache.set(pendingCacheKey, getInnerChild(instance.subTree));
@@ -3374,12 +3379,41 @@ const getPublicInstance = (i) => {
3374
3379
  if (isStatefulComponent(i)) return getComponentPublicInstance(i);
3375
3380
  return getPublicInstance(i.parent);
3376
3381
  };
3382
+ const resolveDevRootEl = (vnode) => {
3383
+ let found = false;
3384
+ while (true) {
3385
+ if (vnode.patchFlag > 0 && vnode.patchFlag & 2048) {
3386
+ const root = filterSingleRoot(vnode.children);
3387
+ if (!root) {
3388
+ return;
3389
+ }
3390
+ vnode = root;
3391
+ found = true;
3392
+ continue;
3393
+ }
3394
+ const component = vnode.component;
3395
+ if (component && component.subTree) {
3396
+ vnode = component.subTree;
3397
+ continue;
3398
+ }
3399
+ const suspense = vnode.suspense;
3400
+ if (suspense && suspense.activeBranch) {
3401
+ vnode = suspense.activeBranch;
3402
+ continue;
3403
+ }
3404
+ return found ? vnode.el : void 0;
3405
+ }
3406
+ };
3407
+ const getDevRootFragmentEl = (i) => {
3408
+ const el = i.subTree && resolveDevRootEl(i.subTree);
3409
+ return el === void 0 ? i.vnode.el : el;
3410
+ };
3377
3411
  const publicPropertiesMap = (
3378
3412
  // Move PURE marker to new line to workaround compiler discarding it
3379
3413
  // due to type annotation
3380
3414
  /* @__PURE__ */ shared.extend(/* @__PURE__ */ Object.create(null), {
3381
3415
  $: (i) => i,
3382
- $el: (i) => i.vnode.el,
3416
+ $el: (i) => getDevRootFragmentEl(i) ,
3383
3417
  $data: (i) => i.data,
3384
3418
  $props: (i) => reactivity.shallowReadonly(i.props) ,
3385
3419
  $attrs: (i) => reactivity.shallowReadonly(i.attrs) ,
@@ -4482,7 +4516,7 @@ function emit(instance, event, ...rawArgs) {
4482
4516
  args = rawArgs.map((a) => shared.isString(a) ? a.trim() : a);
4483
4517
  }
4484
4518
  if (modifiers.number) {
4485
- args = rawArgs.map(shared.looseToNumber);
4519
+ args = args.map(shared.looseToNumber);
4486
4520
  }
4487
4521
  }
4488
4522
  {
@@ -5481,6 +5515,12 @@ function baseCreateRenderer(options, createHydrationFns) {
5481
5515
  optimized = false;
5482
5516
  n2.dynamicChildren = null;
5483
5517
  }
5518
+ if (n2.dynamicChildren && n1 && n1.dynamicChildren && n1.dynamicChildren.hasOnce) {
5519
+ if (n2.dynamicChildren === shared.EMPTY_ARR) {
5520
+ n2.dynamicChildren = [];
5521
+ }
5522
+ n2.dynamicChildren.hasOnce = true;
5523
+ }
5484
5524
  const { type, ref, shapeFlag } = n2;
5485
5525
  switch (type) {
5486
5526
  case Text:
@@ -6088,6 +6128,7 @@ function baseCreateRenderer(options, createHydrationFns) {
6088
6128
  {
6089
6129
  pushWarningContext(n2);
6090
6130
  }
6131
+ n2.el = n1.el;
6091
6132
  updateComponentPreRender(instance, n2, optimized);
6092
6133
  {
6093
6134
  popWarningContext();
@@ -6679,7 +6720,7 @@ function baseCreateRenderer(options, createHydrationFns) {
6679
6720
  cacheIndex,
6680
6721
  memo
6681
6722
  } = vnode;
6682
- if (patchFlag === -2) {
6723
+ if (patchFlag === -2 || dynamicChildren && dynamicChildren.hasOnce) {
6683
6724
  optimized = false;
6684
6725
  }
6685
6726
  if (ref != null) {
@@ -6687,7 +6728,7 @@ function baseCreateRenderer(options, createHydrationFns) {
6687
6728
  setRef(ref, null, parentSuspense, vnode, true);
6688
6729
  reactivity.resetTracking();
6689
6730
  }
6690
- if (cacheIndex != null) {
6731
+ if (cacheIndex != null && (!vnode.ctx || vnode.ctx === parentComponent)) {
6691
6732
  parentComponent.renderCache[cacheIndex] = void 0;
6692
6733
  }
6693
6734
  if (shapeFlag & 256) {
@@ -6768,6 +6809,9 @@ function baseCreateRenderer(options, createHydrationFns) {
6768
6809
  }
6769
6810
  if (type === Static) {
6770
6811
  removeStaticNode(vnode);
6812
+ if (transition && !transition.persisted && transition.afterLeave) {
6813
+ transition.afterLeave();
6814
+ }
6771
6815
  return;
6772
6816
  }
6773
6817
  const performRemove = () => {
@@ -6811,6 +6855,9 @@ function baseCreateRenderer(options, createHydrationFns) {
6811
6855
  if (job) {
6812
6856
  job.flags |= 8;
6813
6857
  unmount(subTree, instance, parentSuspense, doRemove);
6858
+ } else if (instance.vnode.el && subTree) {
6859
+ subTree.transition = instance.vnode.transition;
6860
+ unmount(subTree, instance, parentSuspense, doRemove);
6814
6861
  }
6815
6862
  if (um) {
6816
6863
  queuePostRenderEffect(um, parentSuspense);
@@ -7025,7 +7072,7 @@ const SuspenseImpl = {
7025
7072
  rendererInternals
7026
7073
  );
7027
7074
  } else {
7028
- if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback) {
7075
+ if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback && !parentSuspense.isHydrating) {
7029
7076
  n2.suspense = n1.suspense;
7030
7077
  n2.suspense.vnode = n2;
7031
7078
  n2.el = n1.el;
@@ -7111,10 +7158,12 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
7111
7158
  if (pendingBranch) {
7112
7159
  suspense.pendingBranch = newBranch;
7113
7160
  if (isSameVNodeType(pendingBranch, newBranch)) {
7161
+ suspense.deps++;
7114
7162
  patch(
7115
7163
  pendingBranch,
7116
7164
  newBranch,
7117
- suspense.hiddenContainer,
7165
+ // a hydrating pending branch is adopted SSR DOM, already in place
7166
+ isHydrating ? container : suspense.hiddenContainer,
7118
7167
  null,
7119
7168
  parentComponent,
7120
7169
  suspense,
@@ -7122,10 +7171,11 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
7122
7171
  slotScopeIds,
7123
7172
  optimized
7124
7173
  );
7174
+ suspense.deps--;
7125
7175
  if (suspense.deps <= 0) {
7126
7176
  suspense.resolve();
7127
7177
  } else if (isInFallback) {
7128
- if (!isHydrating) {
7178
+ if (!isHydrating && !suspense.isFallbackMountPending) {
7129
7179
  patch(
7130
7180
  activeBranch,
7131
7181
  newFallback,
@@ -7166,7 +7216,7 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
7166
7216
  );
7167
7217
  if (suspense.deps <= 0) {
7168
7218
  suspense.resolve();
7169
- } else {
7219
+ } else if (!suspense.isFallbackMountPending) {
7170
7220
  patch(
7171
7221
  activeBranch,
7172
7222
  newFallback,
@@ -7387,6 +7437,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
7387
7437
  suspense.effects = [];
7388
7438
  if (isSuspensible) {
7389
7439
  if (parentSuspense && parentSuspense.pendingBranch && parentSuspenseId === parentSuspense.pendingId) {
7440
+ parentSuspenseId = void 0;
7390
7441
  parentSuspense.deps--;
7391
7442
  if (parentSuspense.deps === 0 && !sync) {
7392
7443
  parentSuspense.resolve();
@@ -7407,9 +7458,10 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
7407
7458
  if (!suspense.isInFallback) {
7408
7459
  return;
7409
7460
  }
7461
+ const latestFallback = suspense.vnode.ssFallback;
7410
7462
  patch(
7411
7463
  null,
7412
- fallbackVNode,
7464
+ latestFallback,
7413
7465
  container2,
7414
7466
  anchor2,
7415
7467
  parentComponent2,
@@ -7419,7 +7471,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
7419
7471
  slotScopeIds,
7420
7472
  optimized
7421
7473
  );
7422
- setActiveBranch(suspense, fallbackVNode);
7474
+ setActiveBranch(suspense, latestFallback);
7423
7475
  };
7424
7476
  const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === "out-in";
7425
7477
  if (delayEnter) {
@@ -7459,6 +7511,12 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
7459
7511
  return;
7460
7512
  }
7461
7513
  unsetCurrentInstance();
7514
+ if (hydratedEl && !instance.scope.active) {
7515
+ if (isInPendingSuspense && --suspense.deps === 0) {
7516
+ suspense.resolve();
7517
+ }
7518
+ return;
7519
+ }
7462
7520
  instance.asyncResolved = true;
7463
7521
  const { vnode: vnode2 } = instance;
7464
7522
  {
@@ -7880,7 +7938,8 @@ function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false
7880
7938
  el: vnode.el,
7881
7939
  anchor: vnode.anchor,
7882
7940
  ctx: vnode.ctx,
7883
- ce: vnode.ce
7941
+ ce: vnode.ce,
7942
+ cacheIndex: vnode.cacheIndex
7884
7943
  };
7885
7944
  if (transition && cloneTransition) {
7886
7945
  setTransitionHooks(
@@ -8685,7 +8744,7 @@ function isMemoSame(cached, memo) {
8685
8744
  return true;
8686
8745
  }
8687
8746
 
8688
- const version = "3.5.41";
8747
+ const version = "3.5.43";
8689
8748
  const warn = warn$1 ;
8690
8749
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
8691
8750
  const devtools = devtools$1 ;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/runtime-core v3.5.41
2
+ * @vue/runtime-core v3.5.43
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -1545,13 +1545,15 @@ function createHydrationFunctions(rendererInternals) {
1545
1545
  getContainerType(container),
1546
1546
  optimized
1547
1547
  );
1548
- if (isAsyncWrapper(vnode) && !vnode.type.__asyncResolved) {
1548
+ if ((isAsyncWrapper(vnode) || vnode.component.asyncDep) && !vnode.component.subTree) {
1549
1549
  let subTree;
1550
1550
  if (isFragmentStart) {
1551
- subTree = createVNode(Fragment);
1551
+ subTree = createVNode(Static);
1552
1552
  subTree.anchor = nextNode ? nextNode.previousSibling : container.lastChild;
1553
1553
  } else {
1554
- subTree = node.nodeType === 3 ? createTextVNode("") : createVNode("div");
1554
+ subTree = node.nodeType === 3 ? createTextVNode("") : createVNode(
1555
+ node.nodeType === 8 ? Comment : "div"
1556
+ );
1555
1557
  }
1556
1558
  subTree.el = node;
1557
1559
  vnode.component.subTree = subTree;
@@ -2274,7 +2276,10 @@ const KeepAliveImpl = {
2274
2276
  if (pendingCacheKey != null) {
2275
2277
  if (isSuspense(instance.subTree.type)) {
2276
2278
  queuePostRenderEffect(() => {
2277
- cache.set(pendingCacheKey, getInnerChild(instance.subTree));
2279
+ const vnode = getInnerChild(instance.subTree);
2280
+ if (vnode.component) {
2281
+ cache.set(pendingCacheKey, vnode);
2282
+ }
2278
2283
  }, instance.subTree.suspense);
2279
2284
  } else {
2280
2285
  cache.set(pendingCacheKey, getInnerChild(instance.subTree));
@@ -3429,7 +3434,7 @@ function emit(instance, event, ...rawArgs) {
3429
3434
  args = rawArgs.map((a) => shared.isString(a) ? a.trim() : a);
3430
3435
  }
3431
3436
  if (modifiers.number) {
3432
- args = rawArgs.map(shared.looseToNumber);
3437
+ args = args.map(shared.looseToNumber);
3433
3438
  }
3434
3439
  }
3435
3440
  let handlerName;
@@ -4135,6 +4140,12 @@ function baseCreateRenderer(options, createHydrationFns) {
4135
4140
  optimized = false;
4136
4141
  n2.dynamicChildren = null;
4137
4142
  }
4143
+ if (n2.dynamicChildren && n1 && n1.dynamicChildren && n1.dynamicChildren.hasOnce) {
4144
+ if (n2.dynamicChildren === shared.EMPTY_ARR) {
4145
+ n2.dynamicChildren = [];
4146
+ }
4147
+ n2.dynamicChildren.hasOnce = true;
4148
+ }
4138
4149
  const { type, ref, shapeFlag } = n2;
4139
4150
  switch (type) {
4140
4151
  case Text:
@@ -4687,6 +4698,7 @@ function baseCreateRenderer(options, createHydrationFns) {
4687
4698
  const instance = n2.component = n1.component;
4688
4699
  if (shouldUpdateComponent(n1, n2, optimized)) {
4689
4700
  if (instance.asyncDep && !instance.asyncResolved) {
4701
+ n2.el = n1.el;
4690
4702
  updateComponentPreRender(instance, n2, optimized);
4691
4703
  return;
4692
4704
  } else {
@@ -5216,7 +5228,7 @@ function baseCreateRenderer(options, createHydrationFns) {
5216
5228
  cacheIndex,
5217
5229
  memo
5218
5230
  } = vnode;
5219
- if (patchFlag === -2) {
5231
+ if (patchFlag === -2 || dynamicChildren && dynamicChildren.hasOnce) {
5220
5232
  optimized = false;
5221
5233
  }
5222
5234
  if (ref != null) {
@@ -5224,7 +5236,7 @@ function baseCreateRenderer(options, createHydrationFns) {
5224
5236
  setRef(ref, null, parentSuspense, vnode, true);
5225
5237
  reactivity.resetTracking();
5226
5238
  }
5227
- if (cacheIndex != null) {
5239
+ if (cacheIndex != null && (!vnode.ctx || vnode.ctx === parentComponent)) {
5228
5240
  parentComponent.renderCache[cacheIndex] = void 0;
5229
5241
  }
5230
5242
  if (shapeFlag & 256) {
@@ -5297,6 +5309,9 @@ function baseCreateRenderer(options, createHydrationFns) {
5297
5309
  }
5298
5310
  if (type === Static) {
5299
5311
  removeStaticNode(vnode);
5312
+ if (transition && !transition.persisted && transition.afterLeave) {
5313
+ transition.afterLeave();
5314
+ }
5300
5315
  return;
5301
5316
  }
5302
5317
  const performRemove = () => {
@@ -5337,6 +5352,9 @@ function baseCreateRenderer(options, createHydrationFns) {
5337
5352
  if (job) {
5338
5353
  job.flags |= 8;
5339
5354
  unmount(subTree, instance, parentSuspense, doRemove);
5355
+ } else if (instance.vnode.el && subTree) {
5356
+ subTree.transition = instance.vnode.transition;
5357
+ unmount(subTree, instance, parentSuspense, doRemove);
5340
5358
  }
5341
5359
  if (um) {
5342
5360
  queuePostRenderEffect(um, parentSuspense);
@@ -5545,7 +5563,7 @@ const SuspenseImpl = {
5545
5563
  rendererInternals
5546
5564
  );
5547
5565
  } else {
5548
- if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback) {
5566
+ if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback && !parentSuspense.isHydrating) {
5549
5567
  n2.suspense = n1.suspense;
5550
5568
  n2.suspense.vnode = n2;
5551
5569
  n2.el = n1.el;
@@ -5631,10 +5649,12 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
5631
5649
  if (pendingBranch) {
5632
5650
  suspense.pendingBranch = newBranch;
5633
5651
  if (isSameVNodeType(pendingBranch, newBranch)) {
5652
+ suspense.deps++;
5634
5653
  patch(
5635
5654
  pendingBranch,
5636
5655
  newBranch,
5637
- suspense.hiddenContainer,
5656
+ // a hydrating pending branch is adopted SSR DOM, already in place
5657
+ isHydrating ? container : suspense.hiddenContainer,
5638
5658
  null,
5639
5659
  parentComponent,
5640
5660
  suspense,
@@ -5642,10 +5662,11 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
5642
5662
  slotScopeIds,
5643
5663
  optimized
5644
5664
  );
5665
+ suspense.deps--;
5645
5666
  if (suspense.deps <= 0) {
5646
5667
  suspense.resolve();
5647
5668
  } else if (isInFallback) {
5648
- if (!isHydrating) {
5669
+ if (!isHydrating && !suspense.isFallbackMountPending) {
5649
5670
  patch(
5650
5671
  activeBranch,
5651
5672
  newFallback,
@@ -5686,7 +5707,7 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
5686
5707
  );
5687
5708
  if (suspense.deps <= 0) {
5688
5709
  suspense.resolve();
5689
- } else {
5710
+ } else if (!suspense.isFallbackMountPending) {
5690
5711
  patch(
5691
5712
  activeBranch,
5692
5713
  newFallback,
@@ -5885,6 +5906,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
5885
5906
  suspense.effects = [];
5886
5907
  if (isSuspensible) {
5887
5908
  if (parentSuspense && parentSuspense.pendingBranch && parentSuspenseId === parentSuspense.pendingId) {
5909
+ parentSuspenseId = void 0;
5888
5910
  parentSuspense.deps--;
5889
5911
  if (parentSuspense.deps === 0 && !sync) {
5890
5912
  parentSuspense.resolve();
@@ -5905,9 +5927,10 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
5905
5927
  if (!suspense.isInFallback) {
5906
5928
  return;
5907
5929
  }
5930
+ const latestFallback = suspense.vnode.ssFallback;
5908
5931
  patch(
5909
5932
  null,
5910
- fallbackVNode,
5933
+ latestFallback,
5911
5934
  container2,
5912
5935
  anchor2,
5913
5936
  parentComponent2,
@@ -5917,7 +5940,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
5917
5940
  slotScopeIds,
5918
5941
  optimized
5919
5942
  );
5920
- setActiveBranch(suspense, fallbackVNode);
5943
+ setActiveBranch(suspense, latestFallback);
5921
5944
  };
5922
5945
  const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === "out-in";
5923
5946
  if (delayEnter) {
@@ -5957,6 +5980,12 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
5957
5980
  return;
5958
5981
  }
5959
5982
  unsetCurrentInstance();
5983
+ if (hydratedEl && !instance.scope.active) {
5984
+ if (isInPendingSuspense && --suspense.deps === 0) {
5985
+ suspense.resolve();
5986
+ }
5987
+ return;
5988
+ }
5960
5989
  instance.asyncResolved = true;
5961
5990
  const { vnode: vnode2 } = instance;
5962
5991
  handleSetupResult(instance, asyncSetupResult, false);
@@ -6326,7 +6355,8 @@ function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false
6326
6355
  el: vnode.el,
6327
6356
  anchor: vnode.anchor,
6328
6357
  ctx: vnode.ctx,
6329
- ce: vnode.ce
6358
+ ce: vnode.ce,
6359
+ cacheIndex: vnode.cacheIndex
6330
6360
  };
6331
6361
  if (transition && cloneTransition) {
6332
6362
  setTransitionHooks(
@@ -6806,7 +6836,7 @@ function isMemoSame(cached, memo) {
6806
6836
  return true;
6807
6837
  }
6808
6838
 
6809
- const version = "3.5.41";
6839
+ const version = "3.5.43";
6810
6840
  const warn$1 = shared.NOOP;
6811
6841
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
6812
6842
  const devtools = void 0;
@@ -80,13 +80,11 @@ type PropConstructor<T = any> = {
80
80
  } | {
81
81
  (): T;
82
82
  } | PropMethod<T>;
83
- type PropMethod<T, TConstructor = any> = [T] extends [
84
- ((...args: any) => any) | undefined
85
- ] ? {
83
+ type PropMethod<T, TConstructor = any> = {
86
84
  new (): TConstructor;
87
85
  (): T;
88
86
  readonly prototype: TConstructor;
89
- } : never;
87
+ };
90
88
  type RequiredKeys<T> = {
91
89
  [K in keyof T]: T[K] extends {
92
90
  required: true;
@@ -119,7 +117,7 @@ type InferPropType<T, NullAsAny = true> = [T] extends [null] ? NullAsAny extends
119
117
  type: DateConstructor;
120
118
  }] ? Date : [T] extends [(infer U)[] | {
121
119
  type: (infer U)[];
122
- }] ? U extends DateConstructor ? Date | InferPropType<U, false> : InferPropType<U, false> : [T] extends [Prop<infer V, infer D>] ? unknown extends V ? keyof V extends never ? IfAny<V, V, D> : V : V : T;
120
+ }] ? U extends DateConstructor ? Date | InferPropType<U, false> : InferPropType<U, false> : [T] extends [Prop<infer V, infer D>] ? unknown extends V ? keyof V extends never ? IfAny<V, V, unknown extends D ? V : D> : V : V : T;
123
121
  /**
124
122
  * Extract prop types from a runtime props options object.
125
123
  * The extracted types are **internal** - i.e. the resolved props received by
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/runtime-core v3.5.41
2
+ * @vue/runtime-core v3.5.43
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -2068,13 +2068,15 @@ function createHydrationFunctions(rendererInternals) {
2068
2068
  getContainerType(container),
2069
2069
  optimized
2070
2070
  );
2071
- if (isAsyncWrapper(vnode) && !vnode.type.__asyncResolved) {
2071
+ if ((isAsyncWrapper(vnode) || vnode.component.asyncDep) && !vnode.component.subTree) {
2072
2072
  let subTree;
2073
2073
  if (isFragmentStart) {
2074
- subTree = createVNode(Fragment);
2074
+ subTree = createVNode(Static);
2075
2075
  subTree.anchor = nextNode ? nextNode.previousSibling : container.lastChild;
2076
2076
  } else {
2077
- subTree = node.nodeType === 3 ? createTextVNode("") : createVNode("div");
2077
+ subTree = node.nodeType === 3 ? createTextVNode("") : createVNode(
2078
+ node.nodeType === 8 ? Comment : "div"
2079
+ );
2078
2080
  }
2079
2081
  subTree.el = node;
2080
2082
  vnode.component.subTree = subTree;
@@ -2992,7 +2994,10 @@ const KeepAliveImpl = {
2992
2994
  if (pendingCacheKey != null) {
2993
2995
  if (isSuspense(instance.subTree.type)) {
2994
2996
  queuePostRenderEffect(() => {
2995
- cache.set(pendingCacheKey, getInnerChild(instance.subTree));
2997
+ const vnode = getInnerChild(instance.subTree);
2998
+ if (vnode.component) {
2999
+ cache.set(pendingCacheKey, vnode);
3000
+ }
2996
3001
  }, instance.subTree.suspense);
2997
3002
  } else {
2998
3003
  cache.set(pendingCacheKey, getInnerChild(instance.subTree));
@@ -3393,12 +3398,41 @@ const getPublicInstance = (i) => {
3393
3398
  if (isStatefulComponent(i)) return getComponentPublicInstance(i);
3394
3399
  return getPublicInstance(i.parent);
3395
3400
  };
3401
+ const resolveDevRootEl = (vnode) => {
3402
+ let found = false;
3403
+ while (true) {
3404
+ if (vnode.patchFlag > 0 && vnode.patchFlag & 2048) {
3405
+ const root = filterSingleRoot(vnode.children);
3406
+ if (!root) {
3407
+ return;
3408
+ }
3409
+ vnode = root;
3410
+ found = true;
3411
+ continue;
3412
+ }
3413
+ const component = vnode.component;
3414
+ if (component && component.subTree) {
3415
+ vnode = component.subTree;
3416
+ continue;
3417
+ }
3418
+ const suspense = vnode.suspense;
3419
+ if (suspense && suspense.activeBranch) {
3420
+ vnode = suspense.activeBranch;
3421
+ continue;
3422
+ }
3423
+ return found ? vnode.el : void 0;
3424
+ }
3425
+ };
3426
+ const getDevRootFragmentEl = (i) => {
3427
+ const el = i.subTree && resolveDevRootEl(i.subTree);
3428
+ return el === void 0 ? i.vnode.el : el;
3429
+ };
3396
3430
  const publicPropertiesMap = (
3397
3431
  // Move PURE marker to new line to workaround compiler discarding it
3398
3432
  // due to type annotation
3399
3433
  /* @__PURE__ */ extend(/* @__PURE__ */ Object.create(null), {
3400
3434
  $: (i) => i,
3401
- $el: (i) => i.vnode.el,
3435
+ $el: (i) => !!(process.env.NODE_ENV !== "production") ? getDevRootFragmentEl(i) : i.vnode.el,
3402
3436
  $data: (i) => i.data,
3403
3437
  $props: (i) => !!(process.env.NODE_ENV !== "production") ? shallowReadonly(i.props) : i.props,
3404
3438
  $attrs: (i) => !!(process.env.NODE_ENV !== "production") ? shallowReadonly(i.attrs) : i.attrs,
@@ -4505,7 +4539,7 @@ function emit(instance, event, ...rawArgs) {
4505
4539
  args = rawArgs.map((a) => isString(a) ? a.trim() : a);
4506
4540
  }
4507
4541
  if (modifiers.number) {
4508
- args = rawArgs.map(looseToNumber);
4542
+ args = args.map(looseToNumber);
4509
4543
  }
4510
4544
  }
4511
4545
  if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) {
@@ -5531,6 +5565,12 @@ function baseCreateRenderer(options, createHydrationFns) {
5531
5565
  optimized = false;
5532
5566
  n2.dynamicChildren = null;
5533
5567
  }
5568
+ if (n2.dynamicChildren && n1 && n1.dynamicChildren && n1.dynamicChildren.hasOnce) {
5569
+ if (n2.dynamicChildren === EMPTY_ARR) {
5570
+ n2.dynamicChildren = [];
5571
+ }
5572
+ n2.dynamicChildren.hasOnce = true;
5573
+ }
5534
5574
  const { type, ref, shapeFlag } = n2;
5535
5575
  switch (type) {
5536
5576
  case Text:
@@ -6149,6 +6189,7 @@ function baseCreateRenderer(options, createHydrationFns) {
6149
6189
  if (!!(process.env.NODE_ENV !== "production")) {
6150
6190
  pushWarningContext(n2);
6151
6191
  }
6192
+ n2.el = n1.el;
6152
6193
  updateComponentPreRender(instance, n2, optimized);
6153
6194
  if (!!(process.env.NODE_ENV !== "production")) {
6154
6195
  popWarningContext();
@@ -6740,7 +6781,7 @@ function baseCreateRenderer(options, createHydrationFns) {
6740
6781
  cacheIndex,
6741
6782
  memo
6742
6783
  } = vnode;
6743
- if (patchFlag === -2) {
6784
+ if (patchFlag === -2 || dynamicChildren && dynamicChildren.hasOnce) {
6744
6785
  optimized = false;
6745
6786
  }
6746
6787
  if (ref != null) {
@@ -6748,7 +6789,7 @@ function baseCreateRenderer(options, createHydrationFns) {
6748
6789
  setRef(ref, null, parentSuspense, vnode, true);
6749
6790
  resetTracking();
6750
6791
  }
6751
- if (cacheIndex != null) {
6792
+ if (cacheIndex != null && (!vnode.ctx || vnode.ctx === parentComponent)) {
6752
6793
  parentComponent.renderCache[cacheIndex] = void 0;
6753
6794
  }
6754
6795
  if (shapeFlag & 256) {
@@ -6829,6 +6870,9 @@ function baseCreateRenderer(options, createHydrationFns) {
6829
6870
  }
6830
6871
  if (type === Static) {
6831
6872
  removeStaticNode(vnode);
6873
+ if (transition && !transition.persisted && transition.afterLeave) {
6874
+ transition.afterLeave();
6875
+ }
6832
6876
  return;
6833
6877
  }
6834
6878
  const performRemove = () => {
@@ -6872,6 +6916,9 @@ function baseCreateRenderer(options, createHydrationFns) {
6872
6916
  if (job) {
6873
6917
  job.flags |= 8;
6874
6918
  unmount(subTree, instance, parentSuspense, doRemove);
6919
+ } else if (instance.vnode.el && subTree) {
6920
+ subTree.transition = instance.vnode.transition;
6921
+ unmount(subTree, instance, parentSuspense, doRemove);
6875
6922
  }
6876
6923
  if (um) {
6877
6924
  queuePostRenderEffect(um, parentSuspense);
@@ -7086,7 +7133,7 @@ const SuspenseImpl = {
7086
7133
  rendererInternals
7087
7134
  );
7088
7135
  } else {
7089
- if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback) {
7136
+ if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback && !parentSuspense.isHydrating) {
7090
7137
  n2.suspense = n1.suspense;
7091
7138
  n2.suspense.vnode = n2;
7092
7139
  n2.el = n1.el;
@@ -7172,10 +7219,12 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
7172
7219
  if (pendingBranch) {
7173
7220
  suspense.pendingBranch = newBranch;
7174
7221
  if (isSameVNodeType(pendingBranch, newBranch)) {
7222
+ suspense.deps++;
7175
7223
  patch(
7176
7224
  pendingBranch,
7177
7225
  newBranch,
7178
- suspense.hiddenContainer,
7226
+ // a hydrating pending branch is adopted SSR DOM, already in place
7227
+ isHydrating ? container : suspense.hiddenContainer,
7179
7228
  null,
7180
7229
  parentComponent,
7181
7230
  suspense,
@@ -7183,10 +7232,11 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
7183
7232
  slotScopeIds,
7184
7233
  optimized
7185
7234
  );
7235
+ suspense.deps--;
7186
7236
  if (suspense.deps <= 0) {
7187
7237
  suspense.resolve();
7188
7238
  } else if (isInFallback) {
7189
- if (!isHydrating) {
7239
+ if (!isHydrating && !suspense.isFallbackMountPending) {
7190
7240
  patch(
7191
7241
  activeBranch,
7192
7242
  newFallback,
@@ -7227,7 +7277,7 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
7227
7277
  );
7228
7278
  if (suspense.deps <= 0) {
7229
7279
  suspense.resolve();
7230
- } else {
7280
+ } else if (!suspense.isFallbackMountPending) {
7231
7281
  patch(
7232
7282
  activeBranch,
7233
7283
  newFallback,
@@ -7448,6 +7498,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
7448
7498
  suspense.effects = [];
7449
7499
  if (isSuspensible) {
7450
7500
  if (parentSuspense && parentSuspense.pendingBranch && parentSuspenseId === parentSuspense.pendingId) {
7501
+ parentSuspenseId = void 0;
7451
7502
  parentSuspense.deps--;
7452
7503
  if (parentSuspense.deps === 0 && !sync) {
7453
7504
  parentSuspense.resolve();
@@ -7468,9 +7519,10 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
7468
7519
  if (!suspense.isInFallback) {
7469
7520
  return;
7470
7521
  }
7522
+ const latestFallback = suspense.vnode.ssFallback;
7471
7523
  patch(
7472
7524
  null,
7473
- fallbackVNode,
7525
+ latestFallback,
7474
7526
  container2,
7475
7527
  anchor2,
7476
7528
  parentComponent2,
@@ -7480,7 +7532,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
7480
7532
  slotScopeIds,
7481
7533
  optimized
7482
7534
  );
7483
- setActiveBranch(suspense, fallbackVNode);
7535
+ setActiveBranch(suspense, latestFallback);
7484
7536
  };
7485
7537
  const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === "out-in";
7486
7538
  if (delayEnter) {
@@ -7520,6 +7572,12 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
7520
7572
  return;
7521
7573
  }
7522
7574
  unsetCurrentInstance();
7575
+ if (hydratedEl && !instance.scope.active) {
7576
+ if (isInPendingSuspense && --suspense.deps === 0) {
7577
+ suspense.resolve();
7578
+ }
7579
+ return;
7580
+ }
7523
7581
  instance.asyncResolved = true;
7524
7582
  const { vnode: vnode2 } = instance;
7525
7583
  if (!!(process.env.NODE_ENV !== "production")) {
@@ -7941,7 +7999,8 @@ function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false
7941
7999
  el: vnode.el,
7942
8000
  anchor: vnode.anchor,
7943
8001
  ctx: vnode.ctx,
7944
- ce: vnode.ce
8002
+ ce: vnode.ce,
8003
+ cacheIndex: vnode.cacheIndex
7945
8004
  };
7946
8005
  if (transition && cloneTransition) {
7947
8006
  setTransitionHooks(
@@ -8760,7 +8819,7 @@ function isMemoSame(cached, memo) {
8760
8819
  return true;
8761
8820
  }
8762
8821
 
8763
- const version = "3.5.41";
8822
+ const version = "3.5.43";
8764
8823
  const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
8765
8824
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
8766
8825
  const devtools = !!(process.env.NODE_ENV !== "production") || true ? devtools$1 : void 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vue/runtime-core",
3
- "version": "3.5.41",
3
+ "version": "3.5.43",
4
4
  "description": "@vue/runtime-core",
5
5
  "main": "index.js",
6
6
  "module": "dist/runtime-core.esm-bundler.js",
@@ -46,7 +46,7 @@
46
46
  },
47
47
  "homepage": "https://github.com/vuejs/core/tree/main/packages/runtime-core#readme",
48
48
  "dependencies": {
49
- "@vue/shared": "3.5.41",
50
- "@vue/reactivity": "3.5.41"
49
+ "@vue/shared": "3.5.43",
50
+ "@vue/reactivity": "3.5.43"
51
51
  }
52
52
  }