@vue/runtime-core 3.3.0-alpha.3 → 3.3.0-alpha.4

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.
@@ -21,7 +21,7 @@ function warn(msg, ...args) {
21
21
  callWithErrorHandling(
22
22
  appWarnHandler,
23
23
  instance,
24
- "11",
24
+ 11,
25
25
  [
26
26
  msg + args.join(""),
27
27
  instance && instance.proxy,
@@ -134,21 +134,21 @@ const ErrorTypeStrings = {
134
134
  ["ec"]: "errorCaptured hook",
135
135
  ["rtc"]: "renderTracked hook",
136
136
  ["rtg"]: "renderTriggered hook",
137
- ["0"]: "setup function",
138
- ["1"]: "render function",
139
- ["2"]: "watcher getter",
140
- ["3"]: "watcher callback",
141
- ["4"]: "watcher cleanup function",
142
- ["5"]: "native event handler",
143
- ["6"]: "component event handler",
144
- ["7"]: "vnode hook",
145
- ["8"]: "directive hook",
146
- ["9"]: "transition hook",
147
- ["10"]: "app errorHandler",
148
- ["11"]: "app warnHandler",
149
- ["12"]: "ref function",
150
- ["13"]: "async component loader",
151
- ["14"]: "scheduler flush. This is likely a Vue internals bug. Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/core"
137
+ [0]: "setup function",
138
+ [1]: "render function",
139
+ [2]: "watcher getter",
140
+ [3]: "watcher callback",
141
+ [4]: "watcher cleanup function",
142
+ [5]: "native event handler",
143
+ [6]: "component event handler",
144
+ [7]: "vnode hook",
145
+ [8]: "directive hook",
146
+ [9]: "transition hook",
147
+ [10]: "app errorHandler",
148
+ [11]: "app warnHandler",
149
+ [12]: "ref function",
150
+ [13]: "async component loader",
151
+ [14]: "scheduler flush. This is likely a Vue internals bug. Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/core"
152
152
  };
153
153
  function callWithErrorHandling(fn, instance, type, args) {
154
154
  let res;
@@ -197,7 +197,7 @@ function handleError(err, instance, type, throwInDev = true) {
197
197
  callWithErrorHandling(
198
198
  appErrorHandler,
199
199
  null,
200
- "10",
200
+ 10,
201
201
  [err, exposedInstance, errorInfo]
202
202
  );
203
203
  return;
@@ -350,7 +350,7 @@ function flushJobs(seen) {
350
350
  if (check(job)) {
351
351
  continue;
352
352
  }
353
- callWithErrorHandling(job, null, "14");
353
+ callWithErrorHandling(job, null, 14);
354
354
  }
355
355
  }
356
356
  } finally {
@@ -658,7 +658,7 @@ function emit(instance, event, ...rawArgs) {
658
658
  callWithAsyncErrorHandling(
659
659
  handler,
660
660
  instance,
661
- "6",
661
+ 6,
662
662
  args
663
663
  );
664
664
  }
@@ -673,7 +673,7 @@ function emit(instance, event, ...rawArgs) {
673
673
  callWithAsyncErrorHandling(
674
674
  onceHandler,
675
675
  instance,
676
- "6",
676
+ 6,
677
677
  args
678
678
  );
679
679
  }
@@ -844,7 +844,7 @@ function renderComponentRoot(instance) {
844
844
  }
845
845
  } catch (err) {
846
846
  blockStack.length = 0;
847
- handleError(err, instance, "1");
847
+ handleError(err, instance, 1);
848
848
  result = createVNode(Comment);
849
849
  }
850
850
  let root = result;
@@ -1355,7 +1355,7 @@ function createSuspenseBoundary(vnode, parent, parentComponent, container, hidde
1355
1355
  if (delayEnter) {
1356
1356
  activeBranch.transition.afterLeave = () => {
1357
1357
  if (pendingId === suspense.pendingId) {
1358
- move(pendingBranch, container2, anchor2, "0");
1358
+ move(pendingBranch, container2, anchor2, 0);
1359
1359
  }
1360
1360
  };
1361
1361
  }
@@ -1365,7 +1365,7 @@ function createSuspenseBoundary(vnode, parent, parentComponent, container, hidde
1365
1365
  unmount(activeBranch, parentComponent2, suspense, true);
1366
1366
  }
1367
1367
  if (!delayEnter) {
1368
- move(pendingBranch, container2, anchor2, "0");
1368
+ move(pendingBranch, container2, anchor2, 0);
1369
1369
  }
1370
1370
  }
1371
1371
  setActiveBranch(suspense, pendingBranch);
@@ -1443,7 +1443,7 @@ function createSuspenseBoundary(vnode, parent, parentComponent, container, hidde
1443
1443
  }
1444
1444
  const hydratedEl = instance.vnode.el;
1445
1445
  instance.asyncDep.catch((err) => {
1446
- handleError(err, instance, "0");
1446
+ handleError(err, instance, 0);
1447
1447
  }).then((asyncSetupResult) => {
1448
1448
  if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) {
1449
1449
  return;
@@ -1687,14 +1687,14 @@ function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = sh
1687
1687
  } else if (reactivity.isReactive(s)) {
1688
1688
  return traverse(s);
1689
1689
  } else if (shared.isFunction(s)) {
1690
- return callWithErrorHandling(s, instance, "2");
1690
+ return callWithErrorHandling(s, instance, 2);
1691
1691
  } else {
1692
1692
  warnInvalidSource(s);
1693
1693
  }
1694
1694
  });
1695
1695
  } else if (shared.isFunction(source)) {
1696
1696
  if (cb) {
1697
- getter = () => callWithErrorHandling(source, instance, "2");
1697
+ getter = () => callWithErrorHandling(source, instance, 2);
1698
1698
  } else {
1699
1699
  getter = () => {
1700
1700
  if (instance && instance.isUnmounted) {
@@ -1706,7 +1706,7 @@ function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = sh
1706
1706
  return callWithAsyncErrorHandling(
1707
1707
  source,
1708
1708
  instance,
1709
- "3",
1709
+ 3,
1710
1710
  [onCleanup]
1711
1711
  );
1712
1712
  };
@@ -1722,7 +1722,7 @@ function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = sh
1722
1722
  let cleanup;
1723
1723
  let onCleanup = (fn) => {
1724
1724
  cleanup = effect.onStop = () => {
1725
- callWithErrorHandling(fn, instance, "4");
1725
+ callWithErrorHandling(fn, instance, 4);
1726
1726
  };
1727
1727
  };
1728
1728
  let ssrCleanup;
@@ -1731,7 +1731,7 @@ function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = sh
1731
1731
  if (!cb) {
1732
1732
  getter();
1733
1733
  } else if (immediate) {
1734
- callWithAsyncErrorHandling(cb, instance, "3", [
1734
+ callWithAsyncErrorHandling(cb, instance, 3, [
1735
1735
  getter(),
1736
1736
  isMultiSource ? [] : void 0,
1737
1737
  onCleanup
@@ -1757,7 +1757,7 @@ function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = sh
1757
1757
  if (cleanup) {
1758
1758
  cleanup();
1759
1759
  }
1760
- callWithAsyncErrorHandling(cb, instance, "3", [
1760
+ callWithAsyncErrorHandling(cb, instance, 3, [
1761
1761
  newValue,
1762
1762
  // pass undefined as the old value when it's changed for the first time
1763
1763
  oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue,
@@ -2034,7 +2034,7 @@ function resolveTransitionHooks(vnode, props, state, instance) {
2034
2034
  hook && callWithAsyncErrorHandling(
2035
2035
  hook,
2036
2036
  instance,
2037
- "9",
2037
+ 9,
2038
2038
  args
2039
2039
  );
2040
2040
  };
@@ -2266,7 +2266,7 @@ function defineAsyncComponent(source) {
2266
2266
  handleError(
2267
2267
  err,
2268
2268
  instance,
2269
- "13",
2269
+ 13,
2270
2270
  !errorComponent
2271
2271
  /* do not throw in dev if user provided error component */
2272
2272
  );
@@ -2371,7 +2371,7 @@ const KeepAliveImpl = {
2371
2371
  const storageContainer = createElement("div");
2372
2372
  sharedContext.activate = (vnode, container, anchor, isSVG, optimized) => {
2373
2373
  const instance2 = vnode.component;
2374
- move(vnode, container, anchor, "0", parentSuspense);
2374
+ move(vnode, container, anchor, 0, parentSuspense);
2375
2375
  patch(
2376
2376
  instance2.vnode,
2377
2377
  vnode,
@@ -2399,7 +2399,7 @@ const KeepAliveImpl = {
2399
2399
  };
2400
2400
  sharedContext.deactivate = (vnode) => {
2401
2401
  const instance2 = vnode.component;
2402
- move(vnode, storageContainer, null, "1", parentSuspense);
2402
+ move(vnode, storageContainer, null, 1, parentSuspense);
2403
2403
  queuePostRenderEffect(() => {
2404
2404
  if (instance2.da) {
2405
2405
  shared.invokeArrayFns(instance2.da);
@@ -2678,7 +2678,7 @@ function invokeDirectiveHook(vnode, prevVNode, instance, name) {
2678
2678
  let hook = binding.dir[name];
2679
2679
  if (hook) {
2680
2680
  reactivity.pauseTracking();
2681
- callWithAsyncErrorHandling(hook, instance, "8", [
2681
+ callWithAsyncErrorHandling(hook, instance, 8, [
2682
2682
  vnode.el,
2683
2683
  binding,
2684
2684
  vnode,
@@ -4223,7 +4223,7 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
4223
4223
  }
4224
4224
  }
4225
4225
  if (shared.isFunction(ref)) {
4226
- callWithErrorHandling(ref, owner, "12", [value, refs]);
4226
+ callWithErrorHandling(ref, owner, 12, [value, refs]);
4227
4227
  } else {
4228
4228
  const _isString = shared.isString(ref);
4229
4229
  const _isRef = reactivity.isRef(ref);
@@ -5871,7 +5871,7 @@ function baseCreateRenderer(options, createHydrationFns) {
5871
5871
  );
5872
5872
  } else if (moved) {
5873
5873
  if (j < 0 || i !== increasingNewIndexSequence[j]) {
5874
- move(nextChild, container, anchor, "2");
5874
+ move(nextChild, container, anchor, 2);
5875
5875
  } else {
5876
5876
  j--;
5877
5877
  }
@@ -5905,9 +5905,9 @@ function baseCreateRenderer(options, createHydrationFns) {
5905
5905
  moveStaticNode(vnode, container, anchor);
5906
5906
  return;
5907
5907
  }
5908
- const needTransition = moveType !== "2" && shapeFlag & 1 && transition;
5908
+ const needTransition = moveType !== 2 && shapeFlag & 1 && transition;
5909
5909
  if (needTransition) {
5910
- if (moveType === "0") {
5910
+ if (moveType === 0) {
5911
5911
  transition.beforeEnter(el);
5912
5912
  hostInsert(el, container, anchor);
5913
5913
  queuePostRenderEffect(() => transition.enter(el), parentSuspense);
@@ -6305,7 +6305,7 @@ const TeleportImpl = {
6305
6305
  container,
6306
6306
  mainAnchor,
6307
6307
  internals,
6308
- "1"
6308
+ 1
6309
6309
  );
6310
6310
  }
6311
6311
  } else {
@@ -6320,7 +6320,7 @@ const TeleportImpl = {
6320
6320
  nextTarget,
6321
6321
  null,
6322
6322
  internals,
6323
- "0"
6323
+ 0
6324
6324
  );
6325
6325
  } else {
6326
6326
  warn(
@@ -6335,7 +6335,7 @@ const TeleportImpl = {
6335
6335
  target,
6336
6336
  targetAnchor,
6337
6337
  internals,
6338
- "1"
6338
+ 1
6339
6339
  );
6340
6340
  }
6341
6341
  }
@@ -6366,12 +6366,12 @@ const TeleportImpl = {
6366
6366
  move: moveTeleport,
6367
6367
  hydrate: hydrateTeleport
6368
6368
  };
6369
- function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = "2") {
6370
- if (moveType === "0") {
6369
+ function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = 2) {
6370
+ if (moveType === 0) {
6371
6371
  insert(vnode.targetAnchor, container, parentAnchor);
6372
6372
  }
6373
6373
  const { el, anchor, shapeFlag, children, props } = vnode;
6374
- const isReorder = moveType === "2";
6374
+ const isReorder = moveType === 2;
6375
6375
  if (isReorder) {
6376
6376
  insert(el, container, parentAnchor);
6377
6377
  }
@@ -6382,7 +6382,7 @@ function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }
6382
6382
  children[i],
6383
6383
  container,
6384
6384
  parentAnchor,
6385
- "2"
6385
+ 2
6386
6386
  );
6387
6387
  }
6388
6388
  }
@@ -6810,7 +6810,7 @@ function mergeProps(...args) {
6810
6810
  return ret;
6811
6811
  }
6812
6812
  function invokeVNodeHook(hook, instance, vnode, prevVNode = null) {
6813
- callWithAsyncErrorHandling(hook, instance, "7", [
6813
+ callWithAsyncErrorHandling(hook, instance, 7, [
6814
6814
  vnode,
6815
6815
  prevVNode
6816
6816
  ]);
@@ -6976,7 +6976,7 @@ function setupStatefulComponent(instance, isSSR) {
6976
6976
  const setupResult = callWithErrorHandling(
6977
6977
  setup,
6978
6978
  instance,
6979
- "0",
6979
+ 0,
6980
6980
  [reactivity.shallowReadonly(instance.props) , setupContext]
6981
6981
  );
6982
6982
  reactivity.resetTracking();
@@ -6987,7 +6987,7 @@ function setupStatefulComponent(instance, isSSR) {
6987
6987
  return setupResult.then((resolvedResult) => {
6988
6988
  handleSetupResult(instance, resolvedResult, isSSR);
6989
6989
  }).catch((e) => {
6990
- handleError(e, instance, "0");
6990
+ handleError(e, instance, 0);
6991
6991
  });
6992
6992
  } else {
6993
6993
  instance.asyncDep = setupResult;
@@ -7533,7 +7533,7 @@ function isMemoSame(cached, memo) {
7533
7533
  return true;
7534
7534
  }
7535
7535
 
7536
- const version = "3.3.0-alpha.3";
7536
+ const version = "3.3.0-alpha.4";
7537
7537
  const _ssrUtils = {
7538
7538
  createComponentInstance,
7539
7539
  setupComponent,
@@ -59,7 +59,7 @@ function handleError(err, instance, type, throwInDev = true) {
59
59
  callWithErrorHandling(
60
60
  appErrorHandler,
61
61
  null,
62
- "10",
62
+ 10,
63
63
  [err, exposedInstance, errorInfo]
64
64
  );
65
65
  return;
@@ -181,7 +181,7 @@ function flushJobs(seen) {
181
181
  const job = queue[flushIndex];
182
182
  if (job && job.active !== false) {
183
183
  if (false) ;
184
- callWithErrorHandling(job, null, "14");
184
+ callWithErrorHandling(job, null, 14);
185
185
  }
186
186
  }
187
187
  } finally {
@@ -255,7 +255,7 @@ function emit(instance, event, ...rawArgs) {
255
255
  callWithAsyncErrorHandling(
256
256
  handler,
257
257
  instance,
258
- "6",
258
+ 6,
259
259
  args
260
260
  );
261
261
  }
@@ -270,7 +270,7 @@ function emit(instance, event, ...rawArgs) {
270
270
  callWithAsyncErrorHandling(
271
271
  onceHandler,
272
272
  instance,
273
- "6",
273
+ 6,
274
274
  args
275
275
  );
276
276
  }
@@ -431,7 +431,7 @@ function renderComponentRoot(instance) {
431
431
  }
432
432
  } catch (err) {
433
433
  blockStack.length = 0;
434
- handleError(err, instance, "1");
434
+ handleError(err, instance, 1);
435
435
  result = createVNode(Comment);
436
436
  }
437
437
  let root = result;
@@ -853,7 +853,7 @@ function createSuspenseBoundary(vnode, parent, parentComponent, container, hidde
853
853
  if (delayEnter) {
854
854
  activeBranch.transition.afterLeave = () => {
855
855
  if (pendingId === suspense.pendingId) {
856
- move(pendingBranch, container2, anchor2, "0");
856
+ move(pendingBranch, container2, anchor2, 0);
857
857
  }
858
858
  };
859
859
  }
@@ -863,7 +863,7 @@ function createSuspenseBoundary(vnode, parent, parentComponent, container, hidde
863
863
  unmount(activeBranch, parentComponent2, suspense, true);
864
864
  }
865
865
  if (!delayEnter) {
866
- move(pendingBranch, container2, anchor2, "0");
866
+ move(pendingBranch, container2, anchor2, 0);
867
867
  }
868
868
  }
869
869
  setActiveBranch(suspense, pendingBranch);
@@ -941,7 +941,7 @@ function createSuspenseBoundary(vnode, parent, parentComponent, container, hidde
941
941
  }
942
942
  const hydratedEl = instance.vnode.el;
943
943
  instance.asyncDep.catch((err) => {
944
- handleError(err, instance, "0");
944
+ handleError(err, instance, 0);
945
945
  }).then((asyncSetupResult) => {
946
946
  if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) {
947
947
  return;
@@ -1144,12 +1144,12 @@ function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = sh
1144
1144
  } else if (reactivity.isReactive(s)) {
1145
1145
  return traverse(s);
1146
1146
  } else if (shared.isFunction(s)) {
1147
- return callWithErrorHandling(s, instance, "2");
1147
+ return callWithErrorHandling(s, instance, 2);
1148
1148
  } else ;
1149
1149
  });
1150
1150
  } else if (shared.isFunction(source)) {
1151
1151
  if (cb) {
1152
- getter = () => callWithErrorHandling(source, instance, "2");
1152
+ getter = () => callWithErrorHandling(source, instance, 2);
1153
1153
  } else {
1154
1154
  getter = () => {
1155
1155
  if (instance && instance.isUnmounted) {
@@ -1161,7 +1161,7 @@ function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = sh
1161
1161
  return callWithAsyncErrorHandling(
1162
1162
  source,
1163
1163
  instance,
1164
- "3",
1164
+ 3,
1165
1165
  [onCleanup]
1166
1166
  );
1167
1167
  };
@@ -1176,7 +1176,7 @@ function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = sh
1176
1176
  let cleanup;
1177
1177
  let onCleanup = (fn) => {
1178
1178
  cleanup = effect.onStop = () => {
1179
- callWithErrorHandling(fn, instance, "4");
1179
+ callWithErrorHandling(fn, instance, 4);
1180
1180
  };
1181
1181
  };
1182
1182
  let ssrCleanup;
@@ -1185,7 +1185,7 @@ function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = sh
1185
1185
  if (!cb) {
1186
1186
  getter();
1187
1187
  } else if (immediate) {
1188
- callWithAsyncErrorHandling(cb, instance, "3", [
1188
+ callWithAsyncErrorHandling(cb, instance, 3, [
1189
1189
  getter(),
1190
1190
  isMultiSource ? [] : void 0,
1191
1191
  onCleanup
@@ -1211,7 +1211,7 @@ function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = sh
1211
1211
  if (cleanup) {
1212
1212
  cleanup();
1213
1213
  }
1214
- callWithAsyncErrorHandling(cb, instance, "3", [
1214
+ callWithAsyncErrorHandling(cb, instance, 3, [
1215
1215
  newValue,
1216
1216
  // pass undefined as the old value when it's changed for the first time
1217
1217
  oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue,
@@ -1474,7 +1474,7 @@ function resolveTransitionHooks(vnode, props, state, instance) {
1474
1474
  hook && callWithAsyncErrorHandling(
1475
1475
  hook,
1476
1476
  instance,
1477
- "9",
1477
+ 9,
1478
1478
  args
1479
1479
  );
1480
1480
  };
@@ -1698,7 +1698,7 @@ function defineAsyncComponent(source) {
1698
1698
  handleError(
1699
1699
  err,
1700
1700
  instance,
1701
- "13",
1701
+ 13,
1702
1702
  !errorComponent
1703
1703
  /* do not throw in dev if user provided error component */
1704
1704
  );
@@ -1800,7 +1800,7 @@ const KeepAliveImpl = {
1800
1800
  const storageContainer = createElement("div");
1801
1801
  sharedContext.activate = (vnode, container, anchor, isSVG, optimized) => {
1802
1802
  const instance2 = vnode.component;
1803
- move(vnode, container, anchor, "0", parentSuspense);
1803
+ move(vnode, container, anchor, 0, parentSuspense);
1804
1804
  patch(
1805
1805
  instance2.vnode,
1806
1806
  vnode,
@@ -1825,7 +1825,7 @@ const KeepAliveImpl = {
1825
1825
  };
1826
1826
  sharedContext.deactivate = (vnode) => {
1827
1827
  const instance2 = vnode.component;
1828
- move(vnode, storageContainer, null, "1", parentSuspense);
1828
+ move(vnode, storageContainer, null, 1, parentSuspense);
1829
1829
  queuePostRenderEffect(() => {
1830
1830
  if (instance2.da) {
1831
1831
  shared.invokeArrayFns(instance2.da);
@@ -2087,7 +2087,7 @@ function invokeDirectiveHook(vnode, prevVNode, instance, name) {
2087
2087
  let hook = binding.dir[name];
2088
2088
  if (hook) {
2089
2089
  reactivity.pauseTracking();
2090
- callWithAsyncErrorHandling(hook, instance, "8", [
2090
+ callWithAsyncErrorHandling(hook, instance, 8, [
2091
2091
  vnode.el,
2092
2092
  binding,
2093
2093
  vnode,
@@ -3223,7 +3223,7 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
3223
3223
  }
3224
3224
  }
3225
3225
  if (shared.isFunction(ref)) {
3226
- callWithErrorHandling(ref, owner, "12", [value, refs]);
3226
+ callWithErrorHandling(ref, owner, 12, [value, refs]);
3227
3227
  } else {
3228
3228
  const _isString = shared.isString(ref);
3229
3229
  const _isRef = reactivity.isRef(ref);
@@ -4653,7 +4653,7 @@ function baseCreateRenderer(options, createHydrationFns) {
4653
4653
  );
4654
4654
  } else if (moved) {
4655
4655
  if (j < 0 || i !== increasingNewIndexSequence[j]) {
4656
- move(nextChild, container, anchor, "2");
4656
+ move(nextChild, container, anchor, 2);
4657
4657
  } else {
4658
4658
  j--;
4659
4659
  }
@@ -4687,9 +4687,9 @@ function baseCreateRenderer(options, createHydrationFns) {
4687
4687
  moveStaticNode(vnode, container, anchor);
4688
4688
  return;
4689
4689
  }
4690
- const needTransition = moveType !== "2" && shapeFlag & 1 && transition;
4690
+ const needTransition = moveType !== 2 && shapeFlag & 1 && transition;
4691
4691
  if (needTransition) {
4692
- if (moveType === "0") {
4692
+ if (moveType === 0) {
4693
4693
  transition.beforeEnter(el);
4694
4694
  hostInsert(el, container, anchor);
4695
4695
  queuePostRenderEffect(() => transition.enter(el), parentSuspense);
@@ -5053,7 +5053,7 @@ const TeleportImpl = {
5053
5053
  container,
5054
5054
  mainAnchor,
5055
5055
  internals,
5056
- "1"
5056
+ 1
5057
5057
  );
5058
5058
  }
5059
5059
  } else {
@@ -5068,7 +5068,7 @@ const TeleportImpl = {
5068
5068
  nextTarget,
5069
5069
  null,
5070
5070
  internals,
5071
- "0"
5071
+ 0
5072
5072
  );
5073
5073
  }
5074
5074
  } else if (wasDisabled) {
@@ -5077,7 +5077,7 @@ const TeleportImpl = {
5077
5077
  target,
5078
5078
  targetAnchor,
5079
5079
  internals,
5080
- "1"
5080
+ 1
5081
5081
  );
5082
5082
  }
5083
5083
  }
@@ -5108,12 +5108,12 @@ const TeleportImpl = {
5108
5108
  move: moveTeleport,
5109
5109
  hydrate: hydrateTeleport
5110
5110
  };
5111
- function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = "2") {
5112
- if (moveType === "0") {
5111
+ function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = 2) {
5112
+ if (moveType === 0) {
5113
5113
  insert(vnode.targetAnchor, container, parentAnchor);
5114
5114
  }
5115
5115
  const { el, anchor, shapeFlag, children, props } = vnode;
5116
- const isReorder = moveType === "2";
5116
+ const isReorder = moveType === 2;
5117
5117
  if (isReorder) {
5118
5118
  insert(el, container, parentAnchor);
5119
5119
  }
@@ -5124,7 +5124,7 @@ function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }
5124
5124
  children[i],
5125
5125
  container,
5126
5126
  parentAnchor,
5127
- "2"
5127
+ 2
5128
5128
  );
5129
5129
  }
5130
5130
  }
@@ -5518,7 +5518,7 @@ function mergeProps(...args) {
5518
5518
  return ret;
5519
5519
  }
5520
5520
  function invokeVNodeHook(hook, instance, vnode, prevVNode = null) {
5521
- callWithAsyncErrorHandling(hook, instance, "7", [
5521
+ callWithAsyncErrorHandling(hook, instance, 7, [
5522
5522
  vnode,
5523
5523
  prevVNode
5524
5524
  ]);
@@ -5649,7 +5649,7 @@ function setupStatefulComponent(instance, isSSR) {
5649
5649
  const setupResult = callWithErrorHandling(
5650
5650
  setup,
5651
5651
  instance,
5652
- "0",
5652
+ 0,
5653
5653
  [instance.props, setupContext]
5654
5654
  );
5655
5655
  reactivity.resetTracking();
@@ -5660,7 +5660,7 @@ function setupStatefulComponent(instance, isSSR) {
5660
5660
  return setupResult.then((resolvedResult) => {
5661
5661
  handleSetupResult(instance, resolvedResult, isSSR);
5662
5662
  }).catch((e) => {
5663
- handleError(e, instance, "0");
5663
+ handleError(e, instance, 0);
5664
5664
  });
5665
5665
  } else {
5666
5666
  instance.asyncDep = setupResult;
@@ -5908,7 +5908,7 @@ function isMemoSame(cached, memo) {
5908
5908
  return true;
5909
5909
  }
5910
5910
 
5911
- const version = "3.3.0-alpha.3";
5911
+ const version = "3.3.0-alpha.4";
5912
5912
  const _ssrUtils = {
5913
5913
  createComponentInstance,
5914
5914
  setupComponent,
@@ -21,7 +21,7 @@ function warn(msg, ...args) {
21
21
  callWithErrorHandling(
22
22
  appWarnHandler,
23
23
  instance,
24
- "11",
24
+ 11,
25
25
  [
26
26
  msg + args.join(""),
27
27
  instance && instance.proxy,
@@ -136,21 +136,21 @@ const ErrorTypeStrings = {
136
136
  ["ec"]: "errorCaptured hook",
137
137
  ["rtc"]: "renderTracked hook",
138
138
  ["rtg"]: "renderTriggered hook",
139
- ["0"]: "setup function",
140
- ["1"]: "render function",
141
- ["2"]: "watcher getter",
142
- ["3"]: "watcher callback",
143
- ["4"]: "watcher cleanup function",
144
- ["5"]: "native event handler",
145
- ["6"]: "component event handler",
146
- ["7"]: "vnode hook",
147
- ["8"]: "directive hook",
148
- ["9"]: "transition hook",
149
- ["10"]: "app errorHandler",
150
- ["11"]: "app warnHandler",
151
- ["12"]: "ref function",
152
- ["13"]: "async component loader",
153
- ["14"]: "scheduler flush. This is likely a Vue internals bug. Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/core"
139
+ [0]: "setup function",
140
+ [1]: "render function",
141
+ [2]: "watcher getter",
142
+ [3]: "watcher callback",
143
+ [4]: "watcher cleanup function",
144
+ [5]: "native event handler",
145
+ [6]: "component event handler",
146
+ [7]: "vnode hook",
147
+ [8]: "directive hook",
148
+ [9]: "transition hook",
149
+ [10]: "app errorHandler",
150
+ [11]: "app warnHandler",
151
+ [12]: "ref function",
152
+ [13]: "async component loader",
153
+ [14]: "scheduler flush. This is likely a Vue internals bug. Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/core"
154
154
  };
155
155
  function callWithErrorHandling(fn, instance, type, args) {
156
156
  let res;
@@ -199,7 +199,7 @@ function handleError(err, instance, type, throwInDev = true) {
199
199
  callWithErrorHandling(
200
200
  appErrorHandler,
201
201
  null,
202
- "10",
202
+ 10,
203
203
  [err, exposedInstance, errorInfo]
204
204
  );
205
205
  return;
@@ -354,7 +354,7 @@ function flushJobs(seen) {
354
354
  if (process.env.NODE_ENV !== "production" && check(job)) {
355
355
  continue;
356
356
  }
357
- callWithErrorHandling(job, null, "14");
357
+ callWithErrorHandling(job, null, 14);
358
358
  }
359
359
  }
360
360
  } finally {
@@ -662,7 +662,7 @@ function emit(instance, event, ...rawArgs) {
662
662
  callWithAsyncErrorHandling(
663
663
  handler,
664
664
  instance,
665
- "6",
665
+ 6,
666
666
  args
667
667
  );
668
668
  }
@@ -677,7 +677,7 @@ function emit(instance, event, ...rawArgs) {
677
677
  callWithAsyncErrorHandling(
678
678
  onceHandler,
679
679
  instance,
680
- "6",
680
+ 6,
681
681
  args
682
682
  );
683
683
  }
@@ -848,7 +848,7 @@ function renderComponentRoot(instance) {
848
848
  }
849
849
  } catch (err) {
850
850
  blockStack.length = 0;
851
- handleError(err, instance, "1");
851
+ handleError(err, instance, 1);
852
852
  result = createVNode(Comment);
853
853
  }
854
854
  let root = result;
@@ -1359,7 +1359,7 @@ function createSuspenseBoundary(vnode, parent, parentComponent, container, hidde
1359
1359
  if (delayEnter) {
1360
1360
  activeBranch.transition.afterLeave = () => {
1361
1361
  if (pendingId === suspense.pendingId) {
1362
- move(pendingBranch, container2, anchor2, "0");
1362
+ move(pendingBranch, container2, anchor2, 0);
1363
1363
  }
1364
1364
  };
1365
1365
  }
@@ -1369,7 +1369,7 @@ function createSuspenseBoundary(vnode, parent, parentComponent, container, hidde
1369
1369
  unmount(activeBranch, parentComponent2, suspense, true);
1370
1370
  }
1371
1371
  if (!delayEnter) {
1372
- move(pendingBranch, container2, anchor2, "0");
1372
+ move(pendingBranch, container2, anchor2, 0);
1373
1373
  }
1374
1374
  }
1375
1375
  setActiveBranch(suspense, pendingBranch);
@@ -1447,7 +1447,7 @@ function createSuspenseBoundary(vnode, parent, parentComponent, container, hidde
1447
1447
  }
1448
1448
  const hydratedEl = instance.vnode.el;
1449
1449
  instance.asyncDep.catch((err) => {
1450
- handleError(err, instance, "0");
1450
+ handleError(err, instance, 0);
1451
1451
  }).then((asyncSetupResult) => {
1452
1452
  if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) {
1453
1453
  return;
@@ -1691,14 +1691,14 @@ function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = EM
1691
1691
  } else if (isReactive(s)) {
1692
1692
  return traverse(s);
1693
1693
  } else if (isFunction(s)) {
1694
- return callWithErrorHandling(s, instance, "2");
1694
+ return callWithErrorHandling(s, instance, 2);
1695
1695
  } else {
1696
1696
  process.env.NODE_ENV !== "production" && warnInvalidSource(s);
1697
1697
  }
1698
1698
  });
1699
1699
  } else if (isFunction(source)) {
1700
1700
  if (cb) {
1701
- getter = () => callWithErrorHandling(source, instance, "2");
1701
+ getter = () => callWithErrorHandling(source, instance, 2);
1702
1702
  } else {
1703
1703
  getter = () => {
1704
1704
  if (instance && instance.isUnmounted) {
@@ -1710,7 +1710,7 @@ function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = EM
1710
1710
  return callWithAsyncErrorHandling(
1711
1711
  source,
1712
1712
  instance,
1713
- "3",
1713
+ 3,
1714
1714
  [onCleanup]
1715
1715
  );
1716
1716
  };
@@ -1726,7 +1726,7 @@ function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = EM
1726
1726
  let cleanup;
1727
1727
  let onCleanup = (fn) => {
1728
1728
  cleanup = effect.onStop = () => {
1729
- callWithErrorHandling(fn, instance, "4");
1729
+ callWithErrorHandling(fn, instance, 4);
1730
1730
  };
1731
1731
  };
1732
1732
  let ssrCleanup;
@@ -1735,7 +1735,7 @@ function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = EM
1735
1735
  if (!cb) {
1736
1736
  getter();
1737
1737
  } else if (immediate) {
1738
- callWithAsyncErrorHandling(cb, instance, "3", [
1738
+ callWithAsyncErrorHandling(cb, instance, 3, [
1739
1739
  getter(),
1740
1740
  isMultiSource ? [] : void 0,
1741
1741
  onCleanup
@@ -1761,7 +1761,7 @@ function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = EM
1761
1761
  if (cleanup) {
1762
1762
  cleanup();
1763
1763
  }
1764
- callWithAsyncErrorHandling(cb, instance, "3", [
1764
+ callWithAsyncErrorHandling(cb, instance, 3, [
1765
1765
  newValue,
1766
1766
  // pass undefined as the old value when it's changed for the first time
1767
1767
  oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue,
@@ -2040,7 +2040,7 @@ function resolveTransitionHooks(vnode, props, state, instance) {
2040
2040
  hook && callWithAsyncErrorHandling(
2041
2041
  hook,
2042
2042
  instance,
2043
- "9",
2043
+ 9,
2044
2044
  args
2045
2045
  );
2046
2046
  };
@@ -2272,7 +2272,7 @@ function defineAsyncComponent(source) {
2272
2272
  handleError(
2273
2273
  err,
2274
2274
  instance,
2275
- "13",
2275
+ 13,
2276
2276
  !errorComponent
2277
2277
  /* do not throw in dev if user provided error component */
2278
2278
  );
@@ -2377,7 +2377,7 @@ const KeepAliveImpl = {
2377
2377
  const storageContainer = createElement("div");
2378
2378
  sharedContext.activate = (vnode, container, anchor, isSVG, optimized) => {
2379
2379
  const instance2 = vnode.component;
2380
- move(vnode, container, anchor, "0", parentSuspense);
2380
+ move(vnode, container, anchor, 0, parentSuspense);
2381
2381
  patch(
2382
2382
  instance2.vnode,
2383
2383
  vnode,
@@ -2405,7 +2405,7 @@ const KeepAliveImpl = {
2405
2405
  };
2406
2406
  sharedContext.deactivate = (vnode) => {
2407
2407
  const instance2 = vnode.component;
2408
- move(vnode, storageContainer, null, "1", parentSuspense);
2408
+ move(vnode, storageContainer, null, 1, parentSuspense);
2409
2409
  queuePostRenderEffect(() => {
2410
2410
  if (instance2.da) {
2411
2411
  invokeArrayFns(instance2.da);
@@ -2684,7 +2684,7 @@ function invokeDirectiveHook(vnode, prevVNode, instance, name) {
2684
2684
  let hook = binding.dir[name];
2685
2685
  if (hook) {
2686
2686
  pauseTracking();
2687
- callWithAsyncErrorHandling(hook, instance, "8", [
2687
+ callWithAsyncErrorHandling(hook, instance, 8, [
2688
2688
  vnode.el,
2689
2689
  binding,
2690
2690
  vnode,
@@ -4233,7 +4233,7 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
4233
4233
  }
4234
4234
  }
4235
4235
  if (isFunction(ref)) {
4236
- callWithErrorHandling(ref, owner, "12", [value, refs]);
4236
+ callWithErrorHandling(ref, owner, 12, [value, refs]);
4237
4237
  } else {
4238
4238
  const _isString = isString(ref);
4239
4239
  const _isRef = isRef(ref);
@@ -5902,7 +5902,7 @@ function baseCreateRenderer(options, createHydrationFns) {
5902
5902
  );
5903
5903
  } else if (moved) {
5904
5904
  if (j < 0 || i !== increasingNewIndexSequence[j]) {
5905
- move(nextChild, container, anchor, "2");
5905
+ move(nextChild, container, anchor, 2);
5906
5906
  } else {
5907
5907
  j--;
5908
5908
  }
@@ -5936,9 +5936,9 @@ function baseCreateRenderer(options, createHydrationFns) {
5936
5936
  moveStaticNode(vnode, container, anchor);
5937
5937
  return;
5938
5938
  }
5939
- const needTransition = moveType !== "2" && shapeFlag & 1 && transition;
5939
+ const needTransition = moveType !== 2 && shapeFlag & 1 && transition;
5940
5940
  if (needTransition) {
5941
- if (moveType === "0") {
5941
+ if (moveType === 0) {
5942
5942
  transition.beforeEnter(el);
5943
5943
  hostInsert(el, container, anchor);
5944
5944
  queuePostRenderEffect(() => transition.enter(el), parentSuspense);
@@ -6336,7 +6336,7 @@ const TeleportImpl = {
6336
6336
  container,
6337
6337
  mainAnchor,
6338
6338
  internals,
6339
- "1"
6339
+ 1
6340
6340
  );
6341
6341
  }
6342
6342
  } else {
@@ -6351,7 +6351,7 @@ const TeleportImpl = {
6351
6351
  nextTarget,
6352
6352
  null,
6353
6353
  internals,
6354
- "0"
6354
+ 0
6355
6355
  );
6356
6356
  } else if (process.env.NODE_ENV !== "production") {
6357
6357
  warn(
@@ -6366,7 +6366,7 @@ const TeleportImpl = {
6366
6366
  target,
6367
6367
  targetAnchor,
6368
6368
  internals,
6369
- "1"
6369
+ 1
6370
6370
  );
6371
6371
  }
6372
6372
  }
@@ -6397,12 +6397,12 @@ const TeleportImpl = {
6397
6397
  move: moveTeleport,
6398
6398
  hydrate: hydrateTeleport
6399
6399
  };
6400
- function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = "2") {
6401
- if (moveType === "0") {
6400
+ function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = 2) {
6401
+ if (moveType === 0) {
6402
6402
  insert(vnode.targetAnchor, container, parentAnchor);
6403
6403
  }
6404
6404
  const { el, anchor, shapeFlag, children, props } = vnode;
6405
- const isReorder = moveType === "2";
6405
+ const isReorder = moveType === 2;
6406
6406
  if (isReorder) {
6407
6407
  insert(el, container, parentAnchor);
6408
6408
  }
@@ -6413,7 +6413,7 @@ function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }
6413
6413
  children[i],
6414
6414
  container,
6415
6415
  parentAnchor,
6416
- "2"
6416
+ 2
6417
6417
  );
6418
6418
  }
6419
6419
  }
@@ -6841,7 +6841,7 @@ function mergeProps(...args) {
6841
6841
  return ret;
6842
6842
  }
6843
6843
  function invokeVNodeHook(hook, instance, vnode, prevVNode = null) {
6844
- callWithAsyncErrorHandling(hook, instance, "7", [
6844
+ callWithAsyncErrorHandling(hook, instance, 7, [
6845
6845
  vnode,
6846
6846
  prevVNode
6847
6847
  ]);
@@ -7009,7 +7009,7 @@ function setupStatefulComponent(instance, isSSR) {
7009
7009
  const setupResult = callWithErrorHandling(
7010
7010
  setup,
7011
7011
  instance,
7012
- "0",
7012
+ 0,
7013
7013
  [process.env.NODE_ENV !== "production" ? shallowReadonly(instance.props) : instance.props, setupContext]
7014
7014
  );
7015
7015
  resetTracking();
@@ -7020,7 +7020,7 @@ function setupStatefulComponent(instance, isSSR) {
7020
7020
  return setupResult.then((resolvedResult) => {
7021
7021
  handleSetupResult(instance, resolvedResult, isSSR);
7022
7022
  }).catch((e) => {
7023
- handleError(e, instance, "0");
7023
+ handleError(e, instance, 0);
7024
7024
  });
7025
7025
  } else {
7026
7026
  instance.asyncDep = setupResult;
@@ -7580,7 +7580,7 @@ function isMemoSame(cached, memo) {
7580
7580
  return true;
7581
7581
  }
7582
7582
 
7583
- const version = "3.3.0-alpha.3";
7583
+ const version = "3.3.0-alpha.4";
7584
7584
  const _ssrUtils = {
7585
7585
  createComponentInstance,
7586
7586
  setupComponent,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vue/runtime-core",
3
- "version": "3.3.0-alpha.3",
3
+ "version": "3.3.0-alpha.4",
4
4
  "description": "@vue/runtime-core",
5
5
  "main": "index.js",
6
6
  "module": "dist/runtime-core.esm-bundler.js",
@@ -32,7 +32,7 @@
32
32
  },
33
33
  "homepage": "https://github.com/vuejs/core/tree/main/packages/runtime-core#readme",
34
34
  "dependencies": {
35
- "@vue/shared": "3.3.0-alpha.3",
36
- "@vue/reactivity": "3.3.0-alpha.3"
35
+ "@vue/shared": "3.3.0-alpha.4",
36
+ "@vue/reactivity": "3.3.0-alpha.4"
37
37
  }
38
38
  }