@vue/runtime-core 3.5.19 → 3.5.21

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.19
2
+ * @vue/runtime-core v3.5.21
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -447,11 +447,14 @@ function checkRecursiveUpdates(seen, fn) {
447
447
  let isHmrUpdating = false;
448
448
  const hmrDirtyComponents = /* @__PURE__ */ new Map();
449
449
  {
450
- shared.getGlobalThis().__VUE_HMR_RUNTIME__ = {
451
- createRecord: tryWrap(createRecord),
452
- rerender: tryWrap(rerender),
453
- reload: tryWrap(reload)
454
- };
450
+ const g = shared.getGlobalThis();
451
+ if (!g.__VUE_HMR_RUNTIME__) {
452
+ g.__VUE_HMR_RUNTIME__ = {
453
+ createRecord: tryWrap(createRecord),
454
+ rerender: tryWrap(rerender),
455
+ reload: tryWrap(reload)
456
+ };
457
+ }
455
458
  }
456
459
  const map = /* @__PURE__ */ new Map();
457
460
  function registerHMR(instance) {
@@ -524,10 +527,12 @@ function reload(id, newComp) {
524
527
  dirtyInstances.delete(instance);
525
528
  } else if (instance.parent) {
526
529
  queueJob(() => {
527
- isHmrUpdating = true;
528
- instance.parent.update();
529
- isHmrUpdating = false;
530
- dirtyInstances.delete(instance);
530
+ if (!(instance.job.flags & 8)) {
531
+ isHmrUpdating = true;
532
+ instance.parent.update();
533
+ isHmrUpdating = false;
534
+ dirtyInstances.delete(instance);
535
+ }
531
536
  });
532
537
  } else if (instance.appContext.reload) {
533
538
  instance.appContext.reload();
@@ -631,7 +636,6 @@ const devtoolsComponentRemoved = (component) => {
631
636
  _devtoolsComponentRemoved(component);
632
637
  }
633
638
  };
634
- /*! #__NO_SIDE_EFFECTS__ */
635
639
  // @__NO_SIDE_EFFECTS__
636
640
  function createDevtoolsComponentHook(hook) {
637
641
  return (component) => {
@@ -1029,26 +1033,34 @@ function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }
1029
1033
  function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, {
1030
1034
  o: { nextSibling, parentNode, querySelector, insert, createText }
1031
1035
  }, hydrateChildren) {
1036
+ function hydrateDisabledTeleport(node2, vnode2, targetStart, targetAnchor) {
1037
+ vnode2.anchor = hydrateChildren(
1038
+ nextSibling(node2),
1039
+ vnode2,
1040
+ parentNode(node2),
1041
+ parentComponent,
1042
+ parentSuspense,
1043
+ slotScopeIds,
1044
+ optimized
1045
+ );
1046
+ vnode2.targetStart = targetStart;
1047
+ vnode2.targetAnchor = targetAnchor;
1048
+ }
1032
1049
  const target = vnode.target = resolveTarget(
1033
1050
  vnode.props,
1034
1051
  querySelector
1035
1052
  );
1053
+ const disabled = isTeleportDisabled(vnode.props);
1036
1054
  if (target) {
1037
- const disabled = isTeleportDisabled(vnode.props);
1038
1055
  const targetNode = target._lpa || target.firstChild;
1039
1056
  if (vnode.shapeFlag & 16) {
1040
1057
  if (disabled) {
1041
- vnode.anchor = hydrateChildren(
1042
- nextSibling(node),
1058
+ hydrateDisabledTeleport(
1059
+ node,
1043
1060
  vnode,
1044
- parentNode(node),
1045
- parentComponent,
1046
- parentSuspense,
1047
- slotScopeIds,
1048
- optimized
1061
+ targetNode,
1062
+ targetNode && nextSibling(targetNode)
1049
1063
  );
1050
- vnode.targetStart = targetNode;
1051
- vnode.targetAnchor = targetNode && nextSibling(targetNode);
1052
1064
  } else {
1053
1065
  vnode.anchor = nextSibling(node);
1054
1066
  let targetAnchor = targetNode;
@@ -1079,6 +1091,10 @@ function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScope
1079
1091
  }
1080
1092
  }
1081
1093
  updateCssVars(vnode, disabled);
1094
+ } else if (disabled) {
1095
+ if (vnode.shapeFlag & 16) {
1096
+ hydrateDisabledTeleport(node, vnode, node, nextSibling(node));
1097
+ }
1082
1098
  }
1083
1099
  return vnode.anchor && nextSibling(vnode.anchor);
1084
1100
  }
@@ -1190,7 +1206,7 @@ const BaseTransitionImpl = {
1190
1206
  setTransitionHooks(innerChild, enterHooks);
1191
1207
  }
1192
1208
  let oldInnerChild = instance.subTree && getInnerChild$1(instance.subTree);
1193
- if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(innerChild, oldInnerChild) && recursiveGetSubtree(instance).type !== Comment) {
1209
+ if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(oldInnerChild, innerChild) && recursiveGetSubtree(instance).type !== Comment) {
1194
1210
  let leavingHooks = resolveTransitionHooks(
1195
1211
  oldInnerChild,
1196
1212
  rawProps,
@@ -1470,7 +1486,6 @@ function getTransitionRawChildren(children, keepComment = false, parentKey) {
1470
1486
  return ret;
1471
1487
  }
1472
1488
 
1473
- /*! #__NO_SIDE_EFFECTS__ */
1474
1489
  // @__NO_SIDE_EFFECTS__
1475
1490
  function defineComponent(options, extraOptions) {
1476
1491
  return shared.isFunction(options) ? (
@@ -1523,6 +1538,7 @@ function useTemplateRef(key) {
1523
1538
  return ret;
1524
1539
  }
1525
1540
 
1541
+ const pendingSetRefMap = /* @__PURE__ */ new WeakMap();
1526
1542
  function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
1527
1543
  if (shared.isArray(rawRef)) {
1528
1544
  rawRef.forEach(
@@ -1572,6 +1588,7 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
1572
1588
  return !knownTemplateRefs.has(ref2);
1573
1589
  };
1574
1590
  if (oldRef != null && oldRef !== ref) {
1591
+ invalidatePendingSetRef(oldRawRef);
1575
1592
  if (shared.isString(oldRef)) {
1576
1593
  refs[oldRef] = null;
1577
1594
  if (canSetSetupRef(oldRef)) {
@@ -1629,9 +1646,15 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
1629
1646
  }
1630
1647
  };
1631
1648
  if (value) {
1632
- doSet.id = -1;
1633
- queuePostRenderEffect(doSet, parentSuspense);
1649
+ const job = () => {
1650
+ doSet();
1651
+ pendingSetRefMap.delete(rawRef);
1652
+ };
1653
+ job.id = -1;
1654
+ pendingSetRefMap.set(rawRef, job);
1655
+ queuePostRenderEffect(job, parentSuspense);
1634
1656
  } else {
1657
+ invalidatePendingSetRef(rawRef);
1635
1658
  doSet();
1636
1659
  }
1637
1660
  } else {
@@ -1639,6 +1662,13 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
1639
1662
  }
1640
1663
  }
1641
1664
  }
1665
+ function invalidatePendingSetRef(rawRef) {
1666
+ const pendingSetRef = pendingSetRefMap.get(rawRef);
1667
+ if (pendingSetRef) {
1668
+ pendingSetRef.flags |= 8;
1669
+ pendingSetRefMap.delete(rawRef);
1670
+ }
1671
+ }
1642
1672
 
1643
1673
  let hasLoggedMismatchError = false;
1644
1674
  const logMismatchError = () => {
@@ -2371,7 +2401,6 @@ function forEachElement(node, cb) {
2371
2401
  }
2372
2402
 
2373
2403
  const isAsyncWrapper = (i) => !!i.type.__asyncLoader;
2374
- /*! #__NO_SIDE_EFFECTS__ */
2375
2404
  // @__NO_SIDE_EFFECTS__
2376
2405
  function defineAsyncComponent(source) {
2377
2406
  if (shared.isFunction(source)) {
@@ -6406,8 +6435,9 @@ function emit(instance, event, ...rawArgs) {
6406
6435
  );
6407
6436
  }
6408
6437
  }
6438
+ const mixinEmitsCache = /* @__PURE__ */ new WeakMap();
6409
6439
  function normalizeEmitsOptions(comp, appContext, asMixin = false) {
6410
- const cache = appContext.emitsCache;
6440
+ const cache = asMixin ? mixinEmitsCache : appContext.emitsCache;
6411
6441
  const cached = cache.get(comp);
6412
6442
  if (cached !== void 0) {
6413
6443
  return cached;
@@ -6855,7 +6885,7 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
6855
6885
  const { activeBranch, pendingBranch, isInFallback, isHydrating } = suspense;
6856
6886
  if (pendingBranch) {
6857
6887
  suspense.pendingBranch = newBranch;
6858
- if (isSameVNodeType(newBranch, pendingBranch)) {
6888
+ if (isSameVNodeType(pendingBranch, newBranch)) {
6859
6889
  patch(
6860
6890
  pendingBranch,
6861
6891
  newBranch,
@@ -6926,7 +6956,7 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
6926
6956
  );
6927
6957
  setActiveBranch(suspense, newFallback);
6928
6958
  }
6929
- } else if (activeBranch && isSameVNodeType(newBranch, activeBranch)) {
6959
+ } else if (activeBranch && isSameVNodeType(activeBranch, newBranch)) {
6930
6960
  patch(
6931
6961
  activeBranch,
6932
6962
  newBranch,
@@ -6957,7 +6987,7 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
6957
6987
  }
6958
6988
  }
6959
6989
  } else {
6960
- if (activeBranch && isSameVNodeType(newBranch, activeBranch)) {
6990
+ if (activeBranch && isSameVNodeType(activeBranch, newBranch)) {
6961
6991
  patch(
6962
6992
  activeBranch,
6963
6993
  newBranch,
@@ -8114,7 +8144,7 @@ function getComponentPublicInstance(instance) {
8114
8144
  return instance.proxy;
8115
8145
  }
8116
8146
  }
8117
- const classifyRE = /(?:^|[-_])(\w)/g;
8147
+ const classifyRE = /(?:^|[-_])\w/g;
8118
8148
  const classify = (str) => str.replace(classifyRE, (c) => c.toUpperCase()).replace(/[-_]/g, "");
8119
8149
  function getComponentName(Component, includeInferred = true) {
8120
8150
  return shared.isFunction(Component) ? Component.displayName || Component.name : Component.name || includeInferred && Component.__name;
@@ -8157,15 +8187,23 @@ const computed = (getterOrOptions, debugOptions) => {
8157
8187
  };
8158
8188
 
8159
8189
  function h(type, propsOrChildren, children) {
8190
+ const doCreateVNode = (type2, props, children2) => {
8191
+ setBlockTracking(-1);
8192
+ try {
8193
+ return createVNode(type2, props, children2);
8194
+ } finally {
8195
+ setBlockTracking(1);
8196
+ }
8197
+ };
8160
8198
  const l = arguments.length;
8161
8199
  if (l === 2) {
8162
8200
  if (shared.isObject(propsOrChildren) && !shared.isArray(propsOrChildren)) {
8163
8201
  if (isVNode(propsOrChildren)) {
8164
- return createVNode(type, null, [propsOrChildren]);
8202
+ return doCreateVNode(type, null, [propsOrChildren]);
8165
8203
  }
8166
- return createVNode(type, propsOrChildren);
8204
+ return doCreateVNode(type, propsOrChildren);
8167
8205
  } else {
8168
- return createVNode(type, null, propsOrChildren);
8206
+ return doCreateVNode(type, null, propsOrChildren);
8169
8207
  }
8170
8208
  } else {
8171
8209
  if (l > 3) {
@@ -8173,7 +8211,7 @@ function h(type, propsOrChildren, children) {
8173
8211
  } else if (l === 3 && isVNode(children)) {
8174
8212
  children = [children];
8175
8213
  }
8176
- return createVNode(type, propsOrChildren, children);
8214
+ return doCreateVNode(type, propsOrChildren, children);
8177
8215
  }
8178
8216
  }
8179
8217
 
@@ -8383,7 +8421,7 @@ function isMemoSame(cached, memo) {
8383
8421
  return true;
8384
8422
  }
8385
8423
 
8386
- const version = "3.5.19";
8424
+ const version = "3.5.21";
8387
8425
  const warn = warn$1 ;
8388
8426
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
8389
8427
  const devtools = devtools$1 ;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/runtime-core v3.5.19
2
+ * @vue/runtime-core v3.5.21
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -614,26 +614,34 @@ function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }
614
614
  function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, {
615
615
  o: { nextSibling, parentNode, querySelector, insert, createText }
616
616
  }, hydrateChildren) {
617
+ function hydrateDisabledTeleport(node2, vnode2, targetStart, targetAnchor) {
618
+ vnode2.anchor = hydrateChildren(
619
+ nextSibling(node2),
620
+ vnode2,
621
+ parentNode(node2),
622
+ parentComponent,
623
+ parentSuspense,
624
+ slotScopeIds,
625
+ optimized
626
+ );
627
+ vnode2.targetStart = targetStart;
628
+ vnode2.targetAnchor = targetAnchor;
629
+ }
617
630
  const target = vnode.target = resolveTarget(
618
631
  vnode.props,
619
632
  querySelector
620
633
  );
634
+ const disabled = isTeleportDisabled(vnode.props);
621
635
  if (target) {
622
- const disabled = isTeleportDisabled(vnode.props);
623
636
  const targetNode = target._lpa || target.firstChild;
624
637
  if (vnode.shapeFlag & 16) {
625
638
  if (disabled) {
626
- vnode.anchor = hydrateChildren(
627
- nextSibling(node),
639
+ hydrateDisabledTeleport(
640
+ node,
628
641
  vnode,
629
- parentNode(node),
630
- parentComponent,
631
- parentSuspense,
632
- slotScopeIds,
633
- optimized
642
+ targetNode,
643
+ targetNode && nextSibling(targetNode)
634
644
  );
635
- vnode.targetStart = targetNode;
636
- vnode.targetAnchor = targetNode && nextSibling(targetNode);
637
645
  } else {
638
646
  vnode.anchor = nextSibling(node);
639
647
  let targetAnchor = targetNode;
@@ -664,6 +672,10 @@ function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScope
664
672
  }
665
673
  }
666
674
  updateCssVars(vnode, disabled);
675
+ } else if (disabled) {
676
+ if (vnode.shapeFlag & 16) {
677
+ hydrateDisabledTeleport(node, vnode, node, nextSibling(node));
678
+ }
667
679
  }
668
680
  return vnode.anchor && nextSibling(vnode.anchor);
669
681
  }
@@ -772,7 +784,7 @@ const BaseTransitionImpl = {
772
784
  setTransitionHooks(innerChild, enterHooks);
773
785
  }
774
786
  let oldInnerChild = instance.subTree && getInnerChild$1(instance.subTree);
775
- if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(innerChild, oldInnerChild) && recursiveGetSubtree(instance).type !== Comment) {
787
+ if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(oldInnerChild, innerChild) && recursiveGetSubtree(instance).type !== Comment) {
776
788
  let leavingHooks = resolveTransitionHooks(
777
789
  oldInnerChild,
778
790
  rawProps,
@@ -1045,7 +1057,6 @@ function getTransitionRawChildren(children, keepComment = false, parentKey) {
1045
1057
  return ret;
1046
1058
  }
1047
1059
 
1048
- /*! #__NO_SIDE_EFFECTS__ */
1049
1060
  // @__NO_SIDE_EFFECTS__
1050
1061
  function defineComponent(options, extraOptions) {
1051
1062
  return shared.isFunction(options) ? (
@@ -1083,6 +1094,7 @@ function useTemplateRef(key) {
1083
1094
  return ret;
1084
1095
  }
1085
1096
 
1097
+ const pendingSetRefMap = /* @__PURE__ */ new WeakMap();
1086
1098
  function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
1087
1099
  if (shared.isArray(rawRef)) {
1088
1100
  rawRef.forEach(
@@ -1113,6 +1125,7 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
1113
1125
  return shared.hasOwn(rawSetupState, key);
1114
1126
  };
1115
1127
  if (oldRef != null && oldRef !== ref) {
1128
+ invalidatePendingSetRef(oldRawRef);
1116
1129
  if (shared.isString(oldRef)) {
1117
1130
  refs[oldRef] = null;
1118
1131
  if (canSetSetupRef(oldRef)) {
@@ -1168,14 +1181,27 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
1168
1181
  } else ;
1169
1182
  };
1170
1183
  if (value) {
1171
- doSet.id = -1;
1172
- queuePostRenderEffect(doSet, parentSuspense);
1184
+ const job = () => {
1185
+ doSet();
1186
+ pendingSetRefMap.delete(rawRef);
1187
+ };
1188
+ job.id = -1;
1189
+ pendingSetRefMap.set(rawRef, job);
1190
+ queuePostRenderEffect(job, parentSuspense);
1173
1191
  } else {
1192
+ invalidatePendingSetRef(rawRef);
1174
1193
  doSet();
1175
1194
  }
1176
1195
  }
1177
1196
  }
1178
1197
  }
1198
+ function invalidatePendingSetRef(rawRef) {
1199
+ const pendingSetRef = pendingSetRefMap.get(rawRef);
1200
+ if (pendingSetRef) {
1201
+ pendingSetRef.flags |= 8;
1202
+ pendingSetRefMap.delete(rawRef);
1203
+ }
1204
+ }
1179
1205
 
1180
1206
  let hasLoggedMismatchError = false;
1181
1207
  const logMismatchError = () => {
@@ -1737,7 +1763,6 @@ function forEachElement(node, cb) {
1737
1763
  }
1738
1764
 
1739
1765
  const isAsyncWrapper = (i) => !!i.type.__asyncLoader;
1740
- /*! #__NO_SIDE_EFFECTS__ */
1741
1766
  // @__NO_SIDE_EFFECTS__
1742
1767
  function defineAsyncComponent(source) {
1743
1768
  if (shared.isFunction(source)) {
@@ -5019,8 +5044,9 @@ function emit(instance, event, ...rawArgs) {
5019
5044
  );
5020
5045
  }
5021
5046
  }
5047
+ const mixinEmitsCache = /* @__PURE__ */ new WeakMap();
5022
5048
  function normalizeEmitsOptions(comp, appContext, asMixin = false) {
5023
- const cache = appContext.emitsCache;
5049
+ const cache = asMixin ? mixinEmitsCache : appContext.emitsCache;
5024
5050
  const cached = cache.get(comp);
5025
5051
  if (cached !== void 0) {
5026
5052
  return cached;
@@ -5389,7 +5415,7 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
5389
5415
  const { activeBranch, pendingBranch, isInFallback, isHydrating } = suspense;
5390
5416
  if (pendingBranch) {
5391
5417
  suspense.pendingBranch = newBranch;
5392
- if (isSameVNodeType(newBranch, pendingBranch)) {
5418
+ if (isSameVNodeType(pendingBranch, newBranch)) {
5393
5419
  patch(
5394
5420
  pendingBranch,
5395
5421
  newBranch,
@@ -5460,7 +5486,7 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
5460
5486
  );
5461
5487
  setActiveBranch(suspense, newFallback);
5462
5488
  }
5463
- } else if (activeBranch && isSameVNodeType(newBranch, activeBranch)) {
5489
+ } else if (activeBranch && isSameVNodeType(activeBranch, newBranch)) {
5464
5490
  patch(
5465
5491
  activeBranch,
5466
5492
  newBranch,
@@ -5491,7 +5517,7 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
5491
5517
  }
5492
5518
  }
5493
5519
  } else {
5494
- if (activeBranch && isSameVNodeType(newBranch, activeBranch)) {
5520
+ if (activeBranch && isSameVNodeType(activeBranch, newBranch)) {
5495
5521
  patch(
5496
5522
  activeBranch,
5497
5523
  newBranch,
@@ -6478,15 +6504,23 @@ const computed = (getterOrOptions, debugOptions) => {
6478
6504
  };
6479
6505
 
6480
6506
  function h(type, propsOrChildren, children) {
6507
+ const doCreateVNode = (type2, props, children2) => {
6508
+ setBlockTracking(-1);
6509
+ try {
6510
+ return createVNode(type2, props, children2);
6511
+ } finally {
6512
+ setBlockTracking(1);
6513
+ }
6514
+ };
6481
6515
  const l = arguments.length;
6482
6516
  if (l === 2) {
6483
6517
  if (shared.isObject(propsOrChildren) && !shared.isArray(propsOrChildren)) {
6484
6518
  if (isVNode(propsOrChildren)) {
6485
- return createVNode(type, null, [propsOrChildren]);
6519
+ return doCreateVNode(type, null, [propsOrChildren]);
6486
6520
  }
6487
- return createVNode(type, propsOrChildren);
6521
+ return doCreateVNode(type, propsOrChildren);
6488
6522
  } else {
6489
- return createVNode(type, null, propsOrChildren);
6523
+ return doCreateVNode(type, null, propsOrChildren);
6490
6524
  }
6491
6525
  } else {
6492
6526
  if (l > 3) {
@@ -6494,7 +6528,7 @@ function h(type, propsOrChildren, children) {
6494
6528
  } else if (l === 3 && isVNode(children)) {
6495
6529
  children = [children];
6496
6530
  }
6497
- return createVNode(type, propsOrChildren, children);
6531
+ return doCreateVNode(type, propsOrChildren, children);
6498
6532
  }
6499
6533
  }
6500
6534
 
@@ -6530,7 +6564,7 @@ function isMemoSame(cached, memo) {
6530
6564
  return true;
6531
6565
  }
6532
6566
 
6533
- const version = "3.5.19";
6567
+ const version = "3.5.21";
6534
6568
  const warn$1 = shared.NOOP;
6535
6569
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
6536
6570
  const devtools = void 0;
@@ -58,7 +58,8 @@ interface SchedulerJob extends Function {
58
58
  i?: ComponentInternalInstance;
59
59
  }
60
60
  type SchedulerJobs = SchedulerJob | SchedulerJob[];
61
- export declare function nextTick<T = void, R = void>(this: T, fn?: (this: T) => R): Promise<Awaited<R>>;
61
+ export declare function nextTick(): Promise<void>;
62
+ export declare function nextTick<T, R>(this: T, fn: (this: T) => R | Promise<R>): Promise<R>;
62
63
  export declare function queuePostFlushCb(cb: SchedulerJobs): void;
63
64
 
64
65
  export type ComponentPropsOptions<P = Data> = ComponentObjectPropsOptions<P> | string[];
@@ -1523,7 +1524,6 @@ export interface AsyncComponentOptions<T = any> {
1523
1524
  hydrate?: HydrationStrategy;
1524
1525
  onError?: (error: Error, retry: () => void, fail: () => void, attempts: number) => any;
1525
1526
  }
1526
- /*! #__NO_SIDE_EFFECTS__ */
1527
1527
  export declare function defineAsyncComponent<T extends Component = {
1528
1528
  new (): ComponentPublicInstance;
1529
1529
  }>(source: AsyncComponentLoader<T> | AsyncComponentOptions<T>): T;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/runtime-core v3.5.19
2
+ * @vue/runtime-core v3.5.21
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -450,11 +450,14 @@ function checkRecursiveUpdates(seen, fn) {
450
450
  let isHmrUpdating = false;
451
451
  const hmrDirtyComponents = /* @__PURE__ */ new Map();
452
452
  if (!!(process.env.NODE_ENV !== "production")) {
453
- getGlobalThis().__VUE_HMR_RUNTIME__ = {
454
- createRecord: tryWrap(createRecord),
455
- rerender: tryWrap(rerender),
456
- reload: tryWrap(reload)
457
- };
453
+ const g = getGlobalThis();
454
+ if (!g.__VUE_HMR_RUNTIME__) {
455
+ g.__VUE_HMR_RUNTIME__ = {
456
+ createRecord: tryWrap(createRecord),
457
+ rerender: tryWrap(rerender),
458
+ reload: tryWrap(reload)
459
+ };
460
+ }
458
461
  }
459
462
  const map = /* @__PURE__ */ new Map();
460
463
  function registerHMR(instance) {
@@ -527,10 +530,12 @@ function reload(id, newComp) {
527
530
  dirtyInstances.delete(instance);
528
531
  } else if (instance.parent) {
529
532
  queueJob(() => {
530
- isHmrUpdating = true;
531
- instance.parent.update();
532
- isHmrUpdating = false;
533
- dirtyInstances.delete(instance);
533
+ if (!(instance.job.flags & 8)) {
534
+ isHmrUpdating = true;
535
+ instance.parent.update();
536
+ isHmrUpdating = false;
537
+ dirtyInstances.delete(instance);
538
+ }
534
539
  });
535
540
  } else if (instance.appContext.reload) {
536
541
  instance.appContext.reload();
@@ -634,7 +639,6 @@ const devtoolsComponentRemoved = (component) => {
634
639
  _devtoolsComponentRemoved(component);
635
640
  }
636
641
  };
637
- /*! #__NO_SIDE_EFFECTS__ */
638
642
  // @__NO_SIDE_EFFECTS__
639
643
  function createDevtoolsComponentHook(hook) {
640
644
  return (component) => {
@@ -1032,26 +1036,34 @@ function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }
1032
1036
  function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, {
1033
1037
  o: { nextSibling, parentNode, querySelector, insert, createText }
1034
1038
  }, hydrateChildren) {
1039
+ function hydrateDisabledTeleport(node2, vnode2, targetStart, targetAnchor) {
1040
+ vnode2.anchor = hydrateChildren(
1041
+ nextSibling(node2),
1042
+ vnode2,
1043
+ parentNode(node2),
1044
+ parentComponent,
1045
+ parentSuspense,
1046
+ slotScopeIds,
1047
+ optimized
1048
+ );
1049
+ vnode2.targetStart = targetStart;
1050
+ vnode2.targetAnchor = targetAnchor;
1051
+ }
1035
1052
  const target = vnode.target = resolveTarget(
1036
1053
  vnode.props,
1037
1054
  querySelector
1038
1055
  );
1056
+ const disabled = isTeleportDisabled(vnode.props);
1039
1057
  if (target) {
1040
- const disabled = isTeleportDisabled(vnode.props);
1041
1058
  const targetNode = target._lpa || target.firstChild;
1042
1059
  if (vnode.shapeFlag & 16) {
1043
1060
  if (disabled) {
1044
- vnode.anchor = hydrateChildren(
1045
- nextSibling(node),
1061
+ hydrateDisabledTeleport(
1062
+ node,
1046
1063
  vnode,
1047
- parentNode(node),
1048
- parentComponent,
1049
- parentSuspense,
1050
- slotScopeIds,
1051
- optimized
1064
+ targetNode,
1065
+ targetNode && nextSibling(targetNode)
1052
1066
  );
1053
- vnode.targetStart = targetNode;
1054
- vnode.targetAnchor = targetNode && nextSibling(targetNode);
1055
1067
  } else {
1056
1068
  vnode.anchor = nextSibling(node);
1057
1069
  let targetAnchor = targetNode;
@@ -1082,6 +1094,10 @@ function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScope
1082
1094
  }
1083
1095
  }
1084
1096
  updateCssVars(vnode, disabled);
1097
+ } else if (disabled) {
1098
+ if (vnode.shapeFlag & 16) {
1099
+ hydrateDisabledTeleport(node, vnode, node, nextSibling(node));
1100
+ }
1085
1101
  }
1086
1102
  return vnode.anchor && nextSibling(vnode.anchor);
1087
1103
  }
@@ -1193,7 +1209,7 @@ const BaseTransitionImpl = {
1193
1209
  setTransitionHooks(innerChild, enterHooks);
1194
1210
  }
1195
1211
  let oldInnerChild = instance.subTree && getInnerChild$1(instance.subTree);
1196
- if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(innerChild, oldInnerChild) && recursiveGetSubtree(instance).type !== Comment) {
1212
+ if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(oldInnerChild, innerChild) && recursiveGetSubtree(instance).type !== Comment) {
1197
1213
  let leavingHooks = resolveTransitionHooks(
1198
1214
  oldInnerChild,
1199
1215
  rawProps,
@@ -1474,7 +1490,6 @@ function getTransitionRawChildren(children, keepComment = false, parentKey) {
1474
1490
  return ret;
1475
1491
  }
1476
1492
 
1477
- /*! #__NO_SIDE_EFFECTS__ */
1478
1493
  // @__NO_SIDE_EFFECTS__
1479
1494
  function defineComponent(options, extraOptions) {
1480
1495
  return isFunction(options) ? (
@@ -1527,6 +1542,7 @@ function useTemplateRef(key) {
1527
1542
  return ret;
1528
1543
  }
1529
1544
 
1545
+ const pendingSetRefMap = /* @__PURE__ */ new WeakMap();
1530
1546
  function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
1531
1547
  if (isArray(rawRef)) {
1532
1548
  rawRef.forEach(
@@ -1576,6 +1592,7 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
1576
1592
  return !!!(process.env.NODE_ENV !== "production") || !knownTemplateRefs.has(ref2);
1577
1593
  };
1578
1594
  if (oldRef != null && oldRef !== ref) {
1595
+ invalidatePendingSetRef(oldRawRef);
1579
1596
  if (isString(oldRef)) {
1580
1597
  refs[oldRef] = null;
1581
1598
  if (canSetSetupRef(oldRef)) {
@@ -1633,9 +1650,15 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
1633
1650
  }
1634
1651
  };
1635
1652
  if (value) {
1636
- doSet.id = -1;
1637
- queuePostRenderEffect(doSet, parentSuspense);
1653
+ const job = () => {
1654
+ doSet();
1655
+ pendingSetRefMap.delete(rawRef);
1656
+ };
1657
+ job.id = -1;
1658
+ pendingSetRefMap.set(rawRef, job);
1659
+ queuePostRenderEffect(job, parentSuspense);
1638
1660
  } else {
1661
+ invalidatePendingSetRef(rawRef);
1639
1662
  doSet();
1640
1663
  }
1641
1664
  } else if (!!(process.env.NODE_ENV !== "production")) {
@@ -1643,6 +1666,13 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
1643
1666
  }
1644
1667
  }
1645
1668
  }
1669
+ function invalidatePendingSetRef(rawRef) {
1670
+ const pendingSetRef = pendingSetRefMap.get(rawRef);
1671
+ if (pendingSetRef) {
1672
+ pendingSetRef.flags |= 8;
1673
+ pendingSetRefMap.delete(rawRef);
1674
+ }
1675
+ }
1646
1676
 
1647
1677
  let hasLoggedMismatchError = false;
1648
1678
  const logMismatchError = () => {
@@ -2386,7 +2416,6 @@ function forEachElement(node, cb) {
2386
2416
  }
2387
2417
 
2388
2418
  const isAsyncWrapper = (i) => !!i.type.__asyncLoader;
2389
- /*! #__NO_SIDE_EFFECTS__ */
2390
2419
  // @__NO_SIDE_EFFECTS__
2391
2420
  function defineAsyncComponent(source) {
2392
2421
  if (isFunction(source)) {
@@ -6466,8 +6495,9 @@ function emit(instance, event, ...rawArgs) {
6466
6495
  );
6467
6496
  }
6468
6497
  }
6498
+ const mixinEmitsCache = /* @__PURE__ */ new WeakMap();
6469
6499
  function normalizeEmitsOptions(comp, appContext, asMixin = false) {
6470
- const cache = appContext.emitsCache;
6500
+ const cache = __VUE_OPTIONS_API__ && asMixin ? mixinEmitsCache : appContext.emitsCache;
6471
6501
  const cached = cache.get(comp);
6472
6502
  if (cached !== void 0) {
6473
6503
  return cached;
@@ -6915,7 +6945,7 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
6915
6945
  const { activeBranch, pendingBranch, isInFallback, isHydrating } = suspense;
6916
6946
  if (pendingBranch) {
6917
6947
  suspense.pendingBranch = newBranch;
6918
- if (isSameVNodeType(newBranch, pendingBranch)) {
6948
+ if (isSameVNodeType(pendingBranch, newBranch)) {
6919
6949
  patch(
6920
6950
  pendingBranch,
6921
6951
  newBranch,
@@ -6986,7 +7016,7 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
6986
7016
  );
6987
7017
  setActiveBranch(suspense, newFallback);
6988
7018
  }
6989
- } else if (activeBranch && isSameVNodeType(newBranch, activeBranch)) {
7019
+ } else if (activeBranch && isSameVNodeType(activeBranch, newBranch)) {
6990
7020
  patch(
6991
7021
  activeBranch,
6992
7022
  newBranch,
@@ -7017,7 +7047,7 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
7017
7047
  }
7018
7048
  }
7019
7049
  } else {
7020
- if (activeBranch && isSameVNodeType(newBranch, activeBranch)) {
7050
+ if (activeBranch && isSameVNodeType(activeBranch, newBranch)) {
7021
7051
  patch(
7022
7052
  activeBranch,
7023
7053
  newBranch,
@@ -8188,7 +8218,7 @@ function getComponentPublicInstance(instance) {
8188
8218
  return instance.proxy;
8189
8219
  }
8190
8220
  }
8191
- const classifyRE = /(?:^|[-_])(\w)/g;
8221
+ const classifyRE = /(?:^|[-_])\w/g;
8192
8222
  const classify = (str) => str.replace(classifyRE, (c) => c.toUpperCase()).replace(/[-_]/g, "");
8193
8223
  function getComponentName(Component, includeInferred = true) {
8194
8224
  return isFunction(Component) ? Component.displayName || Component.name : Component.name || includeInferred && Component.__name;
@@ -8231,15 +8261,23 @@ const computed = (getterOrOptions, debugOptions) => {
8231
8261
  };
8232
8262
 
8233
8263
  function h(type, propsOrChildren, children) {
8264
+ const doCreateVNode = (type2, props, children2) => {
8265
+ setBlockTracking(-1);
8266
+ try {
8267
+ return createVNode(type2, props, children2);
8268
+ } finally {
8269
+ setBlockTracking(1);
8270
+ }
8271
+ };
8234
8272
  const l = arguments.length;
8235
8273
  if (l === 2) {
8236
8274
  if (isObject(propsOrChildren) && !isArray(propsOrChildren)) {
8237
8275
  if (isVNode(propsOrChildren)) {
8238
- return createVNode(type, null, [propsOrChildren]);
8276
+ return doCreateVNode(type, null, [propsOrChildren]);
8239
8277
  }
8240
- return createVNode(type, propsOrChildren);
8278
+ return doCreateVNode(type, propsOrChildren);
8241
8279
  } else {
8242
- return createVNode(type, null, propsOrChildren);
8280
+ return doCreateVNode(type, null, propsOrChildren);
8243
8281
  }
8244
8282
  } else {
8245
8283
  if (l > 3) {
@@ -8247,7 +8285,7 @@ function h(type, propsOrChildren, children) {
8247
8285
  } else if (l === 3 && isVNode(children)) {
8248
8286
  children = [children];
8249
8287
  }
8250
- return createVNode(type, propsOrChildren, children);
8288
+ return doCreateVNode(type, propsOrChildren, children);
8251
8289
  }
8252
8290
  }
8253
8291
 
@@ -8457,7 +8495,7 @@ function isMemoSame(cached, memo) {
8457
8495
  return true;
8458
8496
  }
8459
8497
 
8460
- const version = "3.5.19";
8498
+ const version = "3.5.21";
8461
8499
  const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
8462
8500
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
8463
8501
  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.19",
3
+ "version": "3.5.21",
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.19",
50
- "@vue/reactivity": "3.5.19"
49
+ "@vue/shared": "3.5.21",
50
+ "@vue/reactivity": "3.5.21"
51
51
  }
52
52
  }