@vue/runtime-core 3.3.10 → 3.3.12

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.
@@ -290,13 +290,16 @@ function queuePostFlushCb(cb) {
290
290
  }
291
291
  queueFlush();
292
292
  }
293
- function flushPreFlushCbs(seen, i = isFlushing ? flushIndex + 1 : 0) {
293
+ function flushPreFlushCbs(instance, seen, i = isFlushing ? flushIndex + 1 : 0) {
294
294
  {
295
295
  seen = seen || /* @__PURE__ */ new Map();
296
296
  }
297
297
  for (; i < queue.length; i++) {
298
298
  const cb = queue[i];
299
299
  if (cb && cb.pre) {
300
+ if (instance && cb.id !== instance.uid) {
301
+ continue;
302
+ }
300
303
  if (checkRecursiveUpdates(seen, cb)) {
301
304
  continue;
302
305
  }
@@ -1402,7 +1405,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
1402
1405
  timeout: typeof timeout === "number" ? timeout : -1,
1403
1406
  activeBranch: null,
1404
1407
  pendingBranch: null,
1405
- isInFallback: true,
1408
+ isInFallback: !isHydrating,
1406
1409
  isHydrating,
1407
1410
  isUnmounted: false,
1408
1411
  effects: [],
@@ -1488,6 +1491,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
1488
1491
  }
1489
1492
  const { vnode: vnode2, activeBranch, parentComponent: parentComponent2, container: container2, isSVG: isSVG2 } = suspense;
1490
1493
  triggerEvent(vnode2, "onFallback");
1494
+ const anchor2 = next(activeBranch);
1491
1495
  const mountFallback = () => {
1492
1496
  if (!suspense.isInFallback) {
1493
1497
  return;
@@ -1496,7 +1500,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
1496
1500
  null,
1497
1501
  fallbackVNode,
1498
1502
  container2,
1499
- next(activeBranch),
1503
+ anchor2,
1500
1504
  parentComponent2,
1501
1505
  null,
1502
1506
  // fallback tree will not have suspense context
@@ -4738,6 +4742,16 @@ function createHydrationFunctions(rendererInternals) {
4738
4742
  if (dirs) {
4739
4743
  invokeDirectiveHook(vnode, null, parentComponent, "created");
4740
4744
  }
4745
+ let needCallTransitionHooks = false;
4746
+ if (isTemplateNode(el)) {
4747
+ needCallTransitionHooks = needTransition(parentSuspense, transition) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear;
4748
+ const content = el.content.firstChild;
4749
+ if (needCallTransitionHooks) {
4750
+ transition.beforeEnter(content);
4751
+ }
4752
+ replaceNode(content, el, parentComponent);
4753
+ vnode.el = el = content;
4754
+ }
4741
4755
  if (props) {
4742
4756
  if (forcePatch || !optimized || patchFlag & (16 | 32)) {
4743
4757
  for (const key in props) {
@@ -4770,16 +4784,6 @@ function createHydrationFunctions(rendererInternals) {
4770
4784
  if (vnodeHooks = props && props.onVnodeBeforeMount) {
4771
4785
  invokeVNodeHook(vnodeHooks, parentComponent, vnode);
4772
4786
  }
4773
- let needCallTransitionHooks = false;
4774
- if (isTemplateNode(el)) {
4775
- needCallTransitionHooks = needTransition(parentSuspense, transition) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear;
4776
- const content = el.content.firstChild;
4777
- if (needCallTransitionHooks) {
4778
- transition.beforeEnter(content);
4779
- }
4780
- replaceNode(content, el, parentComponent);
4781
- vnode.el = el = content;
4782
- }
4783
4787
  if (dirs) {
4784
4788
  invokeDirectiveHook(vnode, null, parentComponent, "beforeMount");
4785
4789
  }
@@ -5869,7 +5873,7 @@ function baseCreateRenderer(options, createHydrationFns) {
5869
5873
  updateProps(instance, nextVNode.props, prevProps, optimized);
5870
5874
  updateSlots(instance, nextVNode.children, optimized);
5871
5875
  reactivity.pauseTracking();
5872
- flushPreFlushCbs();
5876
+ flushPreFlushCbs(instance);
5873
5877
  reactivity.resetTracking();
5874
5878
  };
5875
5879
  const patchChildren = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized = false) => {
@@ -7758,7 +7762,7 @@ function isMemoSame(cached, memo) {
7758
7762
  return true;
7759
7763
  }
7760
7764
 
7761
- const version = "3.3.10";
7765
+ const version = "3.3.12";
7762
7766
  const _ssrUtils = {
7763
7767
  createComponentInstance,
7764
7768
  setupComponent,
@@ -139,10 +139,13 @@ function queuePostFlushCb(cb) {
139
139
  }
140
140
  queueFlush();
141
141
  }
142
- function flushPreFlushCbs(seen, i = isFlushing ? flushIndex + 1 : 0) {
142
+ function flushPreFlushCbs(instance, seen, i = isFlushing ? flushIndex + 1 : 0) {
143
143
  for (; i < queue.length; i++) {
144
144
  const cb = queue[i];
145
145
  if (cb && cb.pre) {
146
+ if (instance && cb.id !== instance.uid) {
147
+ continue;
148
+ }
146
149
  queue.splice(i, 1);
147
150
  i--;
148
151
  cb();
@@ -901,7 +904,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
901
904
  timeout: typeof timeout === "number" ? timeout : -1,
902
905
  activeBranch: null,
903
906
  pendingBranch: null,
904
- isInFallback: true,
907
+ isInFallback: !isHydrating,
905
908
  isHydrating,
906
909
  isUnmounted: false,
907
910
  effects: [],
@@ -975,6 +978,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
975
978
  }
976
979
  const { vnode: vnode2, activeBranch, parentComponent: parentComponent2, container: container2, isSVG: isSVG2 } = suspense;
977
980
  triggerEvent(vnode2, "onFallback");
981
+ const anchor2 = next(activeBranch);
978
982
  const mountFallback = () => {
979
983
  if (!suspense.isInFallback) {
980
984
  return;
@@ -983,7 +987,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
983
987
  null,
984
988
  fallbackVNode,
985
989
  container2,
986
- next(activeBranch),
990
+ anchor2,
987
991
  parentComponent2,
988
992
  null,
989
993
  // fallback tree will not have suspense context
@@ -3651,6 +3655,16 @@ function createHydrationFunctions(rendererInternals) {
3651
3655
  if (dirs) {
3652
3656
  invokeDirectiveHook(vnode, null, parentComponent, "created");
3653
3657
  }
3658
+ let needCallTransitionHooks = false;
3659
+ if (isTemplateNode(el)) {
3660
+ needCallTransitionHooks = needTransition(parentSuspense, transition) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear;
3661
+ const content = el.content.firstChild;
3662
+ if (needCallTransitionHooks) {
3663
+ transition.beforeEnter(content);
3664
+ }
3665
+ replaceNode(content, el, parentComponent);
3666
+ vnode.el = el = content;
3667
+ }
3654
3668
  if (props) {
3655
3669
  if (forcePatch || !optimized || patchFlag & (16 | 32)) {
3656
3670
  for (const key in props) {
@@ -3683,16 +3697,6 @@ function createHydrationFunctions(rendererInternals) {
3683
3697
  if (vnodeHooks = props && props.onVnodeBeforeMount) {
3684
3698
  invokeVNodeHook(vnodeHooks, parentComponent, vnode);
3685
3699
  }
3686
- let needCallTransitionHooks = false;
3687
- if (isTemplateNode(el)) {
3688
- needCallTransitionHooks = needTransition(parentSuspense, transition) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear;
3689
- const content = el.content.firstChild;
3690
- if (needCallTransitionHooks) {
3691
- transition.beforeEnter(content);
3692
- }
3693
- replaceNode(content, el, parentComponent);
3694
- vnode.el = el = content;
3695
- }
3696
3700
  if (dirs) {
3697
3701
  invokeDirectiveHook(vnode, null, parentComponent, "beforeMount");
3698
3702
  }
@@ -4598,7 +4602,7 @@ function baseCreateRenderer(options, createHydrationFns) {
4598
4602
  updateProps(instance, nextVNode.props, prevProps, optimized);
4599
4603
  updateSlots(instance, nextVNode.children, optimized);
4600
4604
  reactivity.pauseTracking();
4601
- flushPreFlushCbs();
4605
+ flushPreFlushCbs(instance);
4602
4606
  reactivity.resetTracking();
4603
4607
  };
4604
4608
  const patchChildren = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized = false) => {
@@ -6090,7 +6094,7 @@ function isMemoSame(cached, memo) {
6090
6094
  return true;
6091
6095
  }
6092
6096
 
6093
- const version = "3.3.10";
6097
+ const version = "3.3.12";
6094
6098
  const _ssrUtils = {
6095
6099
  createComponentInstance,
6096
6100
  setupComponent,
@@ -14,7 +14,7 @@ declare const SlotSymbol: unique symbol;
14
14
  export type SlotsType<T extends Record<string, any> = Record<string, any>> = {
15
15
  [SlotSymbol]?: T;
16
16
  };
17
- type StrictUnwrapSlotsType<S extends SlotsType, T = NonNullable<S[typeof SlotSymbol]>> = [keyof S] extends [never] ? Slots : Readonly<T>;
17
+ type StrictUnwrapSlotsType<S extends SlotsType, T = NonNullable<S[typeof SlotSymbol]>> = [keyof S] extends [never] ? Slots : Readonly<T> & T;
18
18
  type UnwrapSlotsType<S extends SlotsType, T = NonNullable<S[typeof SlotSymbol]>> = [keyof S] extends [never] ? Slots : Readonly<Prettify<{
19
19
  [K in keyof T]: NonNullable<T[K]> extends (...args: any[]) => any ? T[K] : Slot<T[K]>;
20
20
  }>>;
@@ -58,9 +58,9 @@ export declare function queuePostFlushCb(cb: SchedulerJobs): void;
58
58
  export type ObjectEmitsOptions = Record<string, ((...args: any[]) => any) | null>;
59
59
  export type EmitsOptions = ObjectEmitsOptions | string[];
60
60
  type EmitsToProps<T extends EmitsOptions> = T extends string[] ? {
61
- [K in string & `on${Capitalize<T[number]>}`]?: (...args: any[]) => any;
61
+ [K in `on${Capitalize<T[number]>}`]?: (...args: any[]) => any;
62
62
  } : T extends ObjectEmitsOptions ? {
63
- [K in string & `on${Capitalize<string & keyof T>}`]?: K extends `on${infer C}` ? T[Uncapitalize<C>] extends null ? (...args: any[]) => any : (...args: T[Uncapitalize<C>] extends (...args: infer P) => any ? P : never) => any : never;
63
+ [K in `on${Capitalize<string & keyof T>}`]?: K extends `on${infer C}` ? (...args: T[Uncapitalize<C>] extends (...args: infer P) => any ? P : T[Uncapitalize<C>] extends null ? any[] : never) => any : never;
64
64
  } : {};
65
65
  type EmitFn<Options = ObjectEmitsOptions, Event extends keyof Options = keyof Options> = Options extends Array<infer V> ? (event: V, ...args: any[]) => void : {} extends Options ? (event: string, ...args: any[]) => void : UnionToIntersection<{
66
66
  [key in Event]: Options[key] extends (...args: infer Args) => any ? (event: key, ...args: Args) => void : (event: key, ...args: any[]) => void;
@@ -1186,9 +1186,9 @@ export declare function defineAsyncComponent<T extends Component = {
1186
1186
  * foo?: string
1187
1187
  * bar: number
1188
1188
  * }>()
1189
+ * ```
1189
1190
  *
1190
1191
  * @see {@link https://vuejs.org/api/sfc-script-setup.html#defineprops-defineemits}
1191
- * ```
1192
1192
  *
1193
1193
  * This is only usable inside `<script setup>`, is compiled away in the
1194
1194
  * output and should **not** be actually called at runtime.
@@ -1214,8 +1214,9 @@ type BooleanKey<T, K extends keyof T = keyof T> = K extends any ? [T[K]] extends
1214
1214
  * Example type-based declaration:
1215
1215
  * ```ts
1216
1216
  * const emit = defineEmits<{
1217
- * (event: 'change'): void
1218
- * (event: 'update', id: number): void
1217
+ * // <eventName>: <expected arguments>
1218
+ * change: []
1219
+ * update: [value: string] // named tuple syntax
1219
1220
  * }>()
1220
1221
  *
1221
1222
  * emit('change')
@@ -294,13 +294,16 @@ function queuePostFlushCb(cb) {
294
294
  }
295
295
  queueFlush();
296
296
  }
297
- function flushPreFlushCbs(seen, i = isFlushing ? flushIndex + 1 : 0) {
297
+ function flushPreFlushCbs(instance, seen, i = isFlushing ? flushIndex + 1 : 0) {
298
298
  if (!!(process.env.NODE_ENV !== "production")) {
299
299
  seen = seen || /* @__PURE__ */ new Map();
300
300
  }
301
301
  for (; i < queue.length; i++) {
302
302
  const cb = queue[i];
303
303
  if (cb && cb.pre) {
304
+ if (instance && cb.id !== instance.uid) {
305
+ continue;
306
+ }
304
307
  if (!!(process.env.NODE_ENV !== "production") && checkRecursiveUpdates(seen, cb)) {
305
308
  continue;
306
309
  }
@@ -1406,7 +1409,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
1406
1409
  timeout: typeof timeout === "number" ? timeout : -1,
1407
1410
  activeBranch: null,
1408
1411
  pendingBranch: null,
1409
- isInFallback: true,
1412
+ isInFallback: !isHydrating,
1410
1413
  isHydrating,
1411
1414
  isUnmounted: false,
1412
1415
  effects: [],
@@ -1492,6 +1495,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
1492
1495
  }
1493
1496
  const { vnode: vnode2, activeBranch, parentComponent: parentComponent2, container: container2, isSVG: isSVG2 } = suspense;
1494
1497
  triggerEvent(vnode2, "onFallback");
1498
+ const anchor2 = next(activeBranch);
1495
1499
  const mountFallback = () => {
1496
1500
  if (!suspense.isInFallback) {
1497
1501
  return;
@@ -1500,7 +1504,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
1500
1504
  null,
1501
1505
  fallbackVNode,
1502
1506
  container2,
1503
- next(activeBranch),
1507
+ anchor2,
1504
1508
  parentComponent2,
1505
1509
  null,
1506
1510
  // fallback tree will not have suspense context
@@ -4748,6 +4752,16 @@ function createHydrationFunctions(rendererInternals) {
4748
4752
  if (dirs) {
4749
4753
  invokeDirectiveHook(vnode, null, parentComponent, "created");
4750
4754
  }
4755
+ let needCallTransitionHooks = false;
4756
+ if (isTemplateNode(el)) {
4757
+ needCallTransitionHooks = needTransition(parentSuspense, transition) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear;
4758
+ const content = el.content.firstChild;
4759
+ if (needCallTransitionHooks) {
4760
+ transition.beforeEnter(content);
4761
+ }
4762
+ replaceNode(content, el, parentComponent);
4763
+ vnode.el = el = content;
4764
+ }
4751
4765
  if (props) {
4752
4766
  if (forcePatch || !optimized || patchFlag & (16 | 32)) {
4753
4767
  for (const key in props) {
@@ -4780,16 +4794,6 @@ function createHydrationFunctions(rendererInternals) {
4780
4794
  if (vnodeHooks = props && props.onVnodeBeforeMount) {
4781
4795
  invokeVNodeHook(vnodeHooks, parentComponent, vnode);
4782
4796
  }
4783
- let needCallTransitionHooks = false;
4784
- if (isTemplateNode(el)) {
4785
- needCallTransitionHooks = needTransition(parentSuspense, transition) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear;
4786
- const content = el.content.firstChild;
4787
- if (needCallTransitionHooks) {
4788
- transition.beforeEnter(content);
4789
- }
4790
- replaceNode(content, el, parentComponent);
4791
- vnode.el = el = content;
4792
- }
4793
4797
  if (dirs) {
4794
4798
  invokeDirectiveHook(vnode, null, parentComponent, "beforeMount");
4795
4799
  }
@@ -5913,7 +5917,7 @@ function baseCreateRenderer(options, createHydrationFns) {
5913
5917
  updateProps(instance, nextVNode.props, prevProps, optimized);
5914
5918
  updateSlots(instance, nextVNode.children, optimized);
5915
5919
  pauseTracking();
5916
- flushPreFlushCbs();
5920
+ flushPreFlushCbs(instance);
5917
5921
  resetTracking();
5918
5922
  };
5919
5923
  const patchChildren = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized = false) => {
@@ -7818,7 +7822,7 @@ function isMemoSame(cached, memo) {
7818
7822
  return true;
7819
7823
  }
7820
7824
 
7821
- const version = "3.3.10";
7825
+ const version = "3.3.12";
7822
7826
  const _ssrUtils = {
7823
7827
  createComponentInstance,
7824
7828
  setupComponent,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vue/runtime-core",
3
- "version": "3.3.10",
3
+ "version": "3.3.12",
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.10",
36
- "@vue/reactivity": "3.3.10"
35
+ "@vue/reactivity": "3.3.12",
36
+ "@vue/shared": "3.3.12"
37
37
  }
38
38
  }