@vue/compat 3.6.0-beta.9 → 3.6.0-rc.10

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,30 +1,30 @@
1
1
  //#region packages/shared/src/slotFlags.d.ts
2
2
  declare enum SlotFlags {
3
3
  /**
4
- * Stable slots that only reference slot props or context state. The slot
5
- * can fully capture its own dependencies so when passed down the parent won't
6
- * need to force the child to update.
7
- */
4
+ * Stable slots that only reference slot props or context state. The slot
5
+ * can fully capture its own dependencies so when passed down the parent won't
6
+ * need to force the child to update.
7
+ */
8
8
  STABLE = 1,
9
9
  /**
10
- * Slots that reference scope variables (v-for or an outer slot prop), or
11
- * has conditional structure (v-if, v-for). The parent will need to force
12
- * the child to update because the slot does not fully capture its dependencies.
13
- */
10
+ * Slots that reference scope variables (v-for or an outer slot prop), or
11
+ * has conditional structure (v-if, v-for). The parent will need to force
12
+ * the child to update because the slot does not fully capture its dependencies.
13
+ */
14
14
  DYNAMIC = 2,
15
15
  /**
16
- * `<slot/>` being forwarded into a child component. Whether the parent needs
17
- * to update the child is dependent on what kind of slots the parent itself
18
- * received. This has to be refined at runtime, when the child's vnode
19
- * is being created (in `normalizeChildren`)
20
- */
16
+ * `<slot/>` being forwarded into a child component. Whether the parent needs
17
+ * to update the child is dependent on what kind of slots the parent itself
18
+ * received. This has to be refined at runtime, when the child's vnode
19
+ * is being created (in `normalizeChildren`)
20
+ */
21
21
  FORWARDED = 3
22
22
  }
23
23
  //#endregion
24
24
  //#region packages/shared/src/typeUtils.d.ts
25
- type Prettify<T> = { [K in keyof T]: T[K] } & {};
25
+ type Prettify<T> = { [K in keyof T]: T[K]; } & {};
26
26
  type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends ((k: infer I) => void) ? I : never;
27
- type LooseRequired<T> = { [P in keyof (T & Required<T>)]: T[P] };
27
+ type LooseRequired<T> = { [P in keyof (T & Required<T>)]: T[P]; };
28
28
  type IfAny<T, Y, N> = 0 extends 1 & T ? Y : N;
29
29
  //#endregion
30
30
  //#region packages/reactivity/src/constants.d.ts
@@ -56,25 +56,25 @@ declare class EffectScope implements ReactiveNode {
56
56
  subsTail: Link | undefined;
57
57
  flags: number;
58
58
  /**
59
- * @internal
60
- */
59
+ * @internal
60
+ */
61
61
  cleanups: (() => void)[];
62
62
  /**
63
- * @internal
64
- */
63
+ * @internal
64
+ */
65
65
  cleanupsLength: number;
66
66
  constructor(detached?: boolean);
67
67
  get active(): boolean;
68
68
  pause(): void;
69
69
  /**
70
- * Resumes the effect scope, including all child scopes and effects.
71
- */
70
+ * Resumes the effect scope, including all child scopes and effects.
71
+ */
72
72
  resume(): void;
73
73
  run<T>(fn: () => T): T | undefined;
74
74
  stop(): void;
75
75
  /**
76
- * @internal
77
- */
76
+ * @internal
77
+ */
78
78
  reset(): void;
79
79
  }
80
80
  //#endregion
@@ -133,12 +133,12 @@ declare class ReactiveEffect<T = any> implements ReactiveEffectOptions, Reactive
133
133
  subsTail: Link | undefined;
134
134
  flags: number;
135
135
  /**
136
- * @internal
137
- */
136
+ * @internal
137
+ */
138
138
  cleanups: (() => void)[];
139
139
  /**
140
- * @internal
141
- */
140
+ * @internal
141
+ */
142
142
  cleanupsLength: number;
143
143
  onTrack?: (event: DebuggerEvent) => void;
144
144
  onTrigger?: (event: DebuggerEvent) => void;
@@ -161,15 +161,15 @@ interface WritableComputedOptions<T, S = T> {
161
161
  set: ComputedSetter<S>;
162
162
  }
163
163
  /**
164
- * @private exported by @vue/reactivity for Vue core use, but not exported from
165
- * the main vue package
166
- */
164
+ * @private exported by @vue/reactivity for Vue core use, but not exported from
165
+ * the main vue package
166
+ */
167
167
  declare class ComputedRefImpl<T = any> implements ReactiveNode {
168
168
  fn: ComputedGetter<T>;
169
169
  private readonly setter;
170
170
  /**
171
- * @internal
172
- */
171
+ * @internal
172
+ */
173
173
  _value: T | undefined;
174
174
  subs: Link | undefined;
175
175
  subsTail: Link | undefined;
@@ -177,24 +177,24 @@ declare class ComputedRefImpl<T = any> implements ReactiveNode {
177
177
  depsTail: Link | undefined;
178
178
  flags: ReactiveFlags;
179
179
  /**
180
- * @internal
181
- */
180
+ * @internal
181
+ */
182
182
  readonly __v_isRef = true;
183
183
  /**
184
- * @internal
185
- */
184
+ * @internal
185
+ */
186
186
  readonly __v_isReadonly: boolean;
187
187
  get effect(): this;
188
188
  get dep(): ReactiveNode;
189
189
  /**
190
- * @internal
191
- * for backwards compat
192
- */
190
+ * @internal
191
+ * for backwards compat
192
+ */
193
193
  get _dirty(): boolean;
194
194
  /**
195
- * @internal
196
- * for backwards compat
197
- */
195
+ * @internal
196
+ * for backwards compat
197
+ */
198
198
  set _dirty(v: boolean);
199
199
  onTrack?: (event: DebuggerEvent) => void;
200
200
  onTrigger?: (event: DebuggerEvent) => void;
@@ -212,22 +212,25 @@ interface ReactiveMarker {
212
212
  }
213
213
  type Reactive<T> = UnwrapNestedRefs<T> & (T extends readonly any[] ? ReactiveMarker : {});
214
214
  /**
215
- * Returns a reactive proxy of the object.
216
- *
217
- * The reactive conversion is "deep": it affects all nested properties. A
218
- * reactive object also deeply unwraps any properties that are refs while
219
- * maintaining reactivity.
220
- *
221
- * @example
222
- * ```js
223
- * const obj = reactive({ count: 0 })
224
- * ```
225
- *
226
- * @param target - The source object.
227
- * @see {@link https://vuejs.org/api/reactivity-core.html#reactive}
228
- */
215
+ * Returns a reactive proxy of the object.
216
+ *
217
+ * The reactive conversion is "deep": it affects all nested properties. A
218
+ * reactive object also deeply unwraps any properties that are refs while
219
+ * maintaining reactivity.
220
+ *
221
+ * @example
222
+ * ```js
223
+ * const obj = reactive({ count: 0 })
224
+ * ```
225
+ *
226
+ * @param target - The source object.
227
+ * @see {@link https://vuejs.org/api/reactivity-core.html#reactive}
228
+ */
229
229
  declare function reactive<T extends object>(target: T): Reactive<T>;
230
- declare const ShallowReactiveMarker: unique symbol;
230
+ declare class ShallowReactiveBrandClass {
231
+ private __shallowReactiveBrand?;
232
+ }
233
+ type ShallowReactiveBrand = ShallowReactiveBrandClass;
231
234
  type Primitive = string | number | boolean | bigint | symbol | undefined | null;
232
235
  type Builtin = Primitive | Function | Date | Error | RegExp;
233
236
  //#endregion
@@ -238,10 +241,10 @@ interface Ref<T = any, S = T> {
238
241
  get value(): T;
239
242
  set value(_: S);
240
243
  /**
241
- * Type differentiator only.
242
- * We need this to be in public d.ts but don't want it to show up in IDE
243
- * autocomplete, so we use a private Symbol instead.
244
- */
244
+ * Type differentiator only.
245
+ * We need this to be in public d.ts but don't want it to show up in IDE
246
+ * autocomplete, so we use a private Symbol instead.
247
+ */
245
248
  [RefSymbol]: true;
246
249
  }
247
250
  declare const ShallowRefMarker: unique symbol;
@@ -249,27 +252,25 @@ type ShallowRef<T = any, S = T> = Ref<T, S> & {
249
252
  [ShallowRefMarker]?: true;
250
253
  };
251
254
  /**
252
- * This is a special exported interface for other packages to declare
253
- * additional types that should bail out for ref unwrapping. For example
254
- * \@vue/runtime-dom can declare it like so in its d.ts:
255
- *
256
- * ``` ts
257
- * declare module '@vue/reactivity' {
258
- * export interface RefUnwrapBailTypes {
259
- * runtimeDOMBailTypes: Node | Window
260
- * }
261
- * }
262
- * ```
263
- */
255
+ * This is a special exported interface for other packages to declare
256
+ * additional types that should bail out for ref unwrapping. For example
257
+ * \@vue/runtime-dom can declare it like so in its d.ts:
258
+ *
259
+ * ``` ts
260
+ * declare module '@vue/reactivity' {
261
+ * export interface RefUnwrapBailTypes {
262
+ * runtimeDOMBailTypes: Node | Window
263
+ * }
264
+ * }
265
+ * ```
266
+ */
264
267
  interface RefUnwrapBailTypes {}
265
- type ShallowUnwrapRef<T> = { [K in keyof T]: DistributeRef<T[K]> };
268
+ type ShallowUnwrapRef<T> = T extends ShallowReactiveBrand ? T : { [K in keyof T]: DistributeRef<T[K]>; };
266
269
  type DistributeRef<T> = T extends Ref<infer V, unknown> ? V : T;
267
270
  type UnwrapRef<T> = T extends ShallowRef<infer V, unknown> ? V : T extends Ref<infer V, unknown> ? UnwrapRefSimple<V> : UnwrapRefSimple<T>;
268
271
  type UnwrapRefSimple<T> = T extends Builtin | Ref | RefUnwrapBailTypes[keyof RefUnwrapBailTypes] | {
269
272
  [RawSymbol]?: true;
270
- } ? T : T extends Map<infer K, infer V> ? Map<K, UnwrapRefSimple<V>> & UnwrapRef<Omit<T, keyof Map<any, any>>> : T extends WeakMap<infer K, infer V> ? WeakMap<K, UnwrapRefSimple<V>> & UnwrapRef<Omit<T, keyof WeakMap<any, any>>> : T extends Set<infer V> ? Set<UnwrapRefSimple<V>> & UnwrapRef<Omit<T, keyof Set<any>>> : T extends WeakSet<infer V> ? WeakSet<UnwrapRefSimple<V>> & UnwrapRef<Omit<T, keyof WeakSet<any>>> : T extends ReadonlyArray<any> ? { [K in keyof T]: UnwrapRefSimple<T[K]> } : T extends object & {
271
- [ShallowReactiveMarker]: never;
272
- } ? T : T extends object ? { [P in keyof T]: P extends symbol ? T[P] : UnwrapRef<T[P]> } : T;
273
+ } ? T : T extends ShallowReactiveBrand ? T : T extends Map<infer K, infer V> ? Map<K, UnwrapRefSimple<V>> & UnwrapRef<Omit<T, keyof Map<any, any>>> : T extends WeakMap<infer K, infer V> ? WeakMap<K, UnwrapRefSimple<V>> & UnwrapRef<Omit<T, keyof WeakMap<any, any>>> : T extends Set<infer V> ? Set<UnwrapRefSimple<V>> & UnwrapRef<Omit<T, keyof Set<any>>> : T extends WeakSet<infer V> ? WeakSet<UnwrapRefSimple<V>> & UnwrapRef<Omit<T, keyof WeakSet<any>>> : T extends ReadonlyArray<any> ? { [K in keyof T]: UnwrapRefSimple<T[K]>; } : T extends object ? { [P in keyof T]: P extends symbol ? T[P] : UnwrapRef<T[P]>; } : T;
273
274
  //#endregion
274
275
  //#region packages/reactivity/src/watch.d.ts
275
276
  type WatchCallback<V = any, OV = any> = (value: V, oldValue: OV, onCleanup: OnCleanup) => any;
@@ -286,24 +287,24 @@ declare const SlotSymbol: unique symbol;
286
287
  type SlotsType<T extends Record<string, any> = Record<string, any>> = {
287
288
  [SlotSymbol]?: T;
288
289
  };
289
- type UnwrapSlotsType<S extends SlotsType, T = NonNullable<S[typeof SlotSymbol]>> = [keyof S] extends [never] ? Slots : Readonly<Prettify<{ [K in keyof T]: NonNullable<T[K]> extends ((...args: any[]) => any) ? T[K] : Slot<T[K]> }>>;
290
+ type UnwrapSlotsType<S extends SlotsType, T = NonNullable<S[typeof SlotSymbol]>> = [keyof S] extends [never] ? Slots : Readonly<Prettify<{ [K in keyof T]: NonNullable<T[K]> extends ((...args: any[]) => any) ? T[K] : Slot<T[K]>; }>>;
290
291
  type RawSlots = {
291
292
  [name: string]: unknown;
292
293
  $stable?: boolean;
293
294
  /**
294
- * for tracking slot owner instance. This is attached during
295
- * normalizeChildren when the component vnode is created.
296
- * @internal
297
- */
295
+ * for tracking slot owner instance. This is attached during
296
+ * normalizeChildren when the component vnode is created.
297
+ * @internal
298
+ */
298
299
  _ctx?: ComponentInternalInstance | null;
299
300
  /**
300
- * indicates compiler generated slots
301
- * we use a reserved property instead of a vnode patchFlag because the slots
302
- * object may be directly passed down to a child component in a manual
303
- * render function, and the optimization hint need to be on the slot object
304
- * itself to be preserved.
305
- * @internal
306
- */
301
+ * indicates compiler generated slots
302
+ * we use a reserved property instead of a vnode patchFlag because the slots
303
+ * object may be directly passed down to a child component in a manual
304
+ * render function, and the optimization hint need to be on the slot object
305
+ * itself to be preserved.
306
+ * @internal
307
+ */
307
308
  _?: SlotFlags;
308
309
  };
309
310
  //#endregion
@@ -311,34 +312,39 @@ type RawSlots = {
311
312
  declare enum SchedulerJobFlags {
312
313
  QUEUED = 1,
313
314
  /**
314
- * Indicates whether the effect is allowed to recursively trigger itself
315
- * when managed by the scheduler.
316
- *
317
- * By default, a job cannot trigger itself because some built-in method calls,
318
- * e.g. Array.prototype.push actually performs reads as well (#1740) which
319
- * can lead to confusing infinite loops.
320
- * The allowed cases are component update functions and watch callbacks.
321
- * Component update functions may update child component props, which in turn
322
- * trigger flush: "pre" watch callbacks that mutates state that the parent
323
- * relies on (#1801). Watch callbacks doesn't track its dependencies so if it
324
- * triggers itself again, it's likely intentional and it is the user's
325
- * responsibility to perform recursive state mutation that eventually
326
- * stabilizes (#1727).
327
- */
315
+ * Indicates whether the effect is allowed to recursively trigger itself
316
+ * when managed by the scheduler.
317
+ *
318
+ * By default, a job cannot trigger itself because some built-in method calls,
319
+ * e.g. Array.prototype.push actually performs reads as well (#1740) which
320
+ * can lead to confusing infinite loops.
321
+ * The allowed cases are component update functions and watch callbacks.
322
+ * Component update functions may update child component props, which in turn
323
+ * trigger flush: "pre" watch callbacks that mutates state that the parent
324
+ * relies on (#1801). Watch callbacks doesn't track its dependencies so if it
325
+ * triggers itself again, it's likely intentional and it is the user's
326
+ * responsibility to perform recursive state mutation that eventually
327
+ * stabilizes (#1727).
328
+ */
328
329
  ALLOW_RECURSE = 2,
329
- DISPOSED = 4
330
+ DISPOSED = 4,
331
+ /**
332
+ * Requeue a Suspense effect if its pending branch is discarded.
333
+ * @internal
334
+ */
335
+ REQUEUE_ON_SUSPENSE_DISCARD = 8
330
336
  }
331
337
  interface SchedulerJob extends Function {
332
338
  order?: number;
333
339
  /**
334
- * flags can technically be undefined, but it can still be used in bitwise
335
- * operations just like 0.
336
- */
340
+ * flags can technically be undefined, but it can still be used in bitwise
341
+ * operations just like 0.
342
+ */
337
343
  flags?: SchedulerJobFlags;
338
344
  /**
339
- * Attached by renderer.ts when setting up a component's render effect
340
- * Used to obtain component information when reporting max recursive updates.
341
- */
345
+ * Attached by renderer.ts when setting up a component's render effect
346
+ * Used to obtain component information when reporting max recursive updates.
347
+ */
342
348
  i?: GenericComponentInstance;
343
349
  }
344
350
  declare function nextTick(): Promise<void>;
@@ -346,7 +352,7 @@ declare function nextTick<T, R>(this: T, fn: (this: T) => R | Promise<R>): Promi
346
352
  //#endregion
347
353
  //#region packages/runtime-core/src/componentProps.d.ts
348
354
  type ComponentPropsOptions<P = Data> = ComponentObjectPropsOptions<P> | string[];
349
- type ComponentObjectPropsOptions<P = Data> = { [K in keyof P]: Prop<P[K]> | null };
355
+ type ComponentObjectPropsOptions<P = Data> = { [K in keyof P]: Prop<P[K]> | null; };
350
356
  type Prop<T, D = T> = PropOptions<T, D> | PropType<T>;
351
357
  type DefaultFactory<T> = (props: Data) => T | null | undefined;
352
358
  interface PropOptions<T = any, D = T> {
@@ -355,12 +361,12 @@ interface PropOptions<T = any, D = T> {
355
361
  default?: D | DefaultFactory<D> | null | undefined | object;
356
362
  validator?(value: unknown, props: Data): boolean;
357
363
  /**
358
- * @internal
359
- */
364
+ * @internal
365
+ */
360
366
  skipCheck?: boolean;
361
367
  /**
362
- * @internal
363
- */
368
+ * @internal
369
+ */
364
370
  skipFactory?: boolean;
365
371
  }
366
372
  type PropType<T> = PropConstructor<T> | (PropConstructor<T> | null)[];
@@ -369,11 +375,11 @@ type PropConstructor<T = any> = {
369
375
  } | {
370
376
  (): T;
371
377
  } | PropMethod<T>;
372
- type PropMethod<T, TConstructor = any> = [T] extends [((...args: any) => any) | undefined] ? {
378
+ type PropMethod<T, TConstructor = any> = {
373
379
  new (): TConstructor;
374
380
  (): T;
375
381
  readonly prototype: TConstructor;
376
- } : never;
382
+ };
377
383
  type RequiredKeys<T> = { [K in keyof T]: T[K] extends {
378
384
  required: true;
379
385
  } | {
@@ -382,7 +388,7 @@ type RequiredKeys<T> = { [K in keyof T]: T[K] extends {
382
388
  type: BooleanConstructor;
383
389
  } ? T[K] extends {
384
390
  default: undefined | (() => undefined);
385
- } ? never : K : never }[keyof T];
391
+ } ? never : K : never; }[keyof T];
386
392
  type OptionalKeys<T> = Exclude<keyof T, RequiredKeys<T>>;
387
393
  type DefaultKeys<T> = { [K in keyof T]: T[K] extends {
388
394
  default: any;
@@ -391,7 +397,7 @@ type DefaultKeys<T> = { [K in keyof T]: T[K] extends {
391
397
  } ? T[K] extends {
392
398
  type: BooleanConstructor;
393
399
  required: true;
394
- } ? never : K : never }[keyof T];
400
+ } ? never : K : never; }[keyof T];
395
401
  type InferPropType<T, NullAsAny = true> = [T] extends [null] ? NullAsAny extends true ? any : null : [T] extends [{
396
402
  type: null | true;
397
403
  }] ? any : [T] extends [ObjectConstructor | {
@@ -402,32 +408,32 @@ type InferPropType<T, NullAsAny = true> = [T] extends [null] ? NullAsAny extends
402
408
  type: DateConstructor;
403
409
  }] ? Date : [T] extends [(infer U)[] | {
404
410
  type: (infer U)[];
405
- }] ? 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;
411
+ }] ? 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;
406
412
  /**
407
- * Extract prop types from a runtime props options object.
408
- * The extracted types are **internal** - i.e. the resolved props received by
409
- * the component.
410
- * - Boolean props are always present
411
- * - Props with default values are always present
412
- *
413
- * To extract accepted props from the parent, use {@link ExtractPublicPropTypes}.
414
- */
413
+ * Extract prop types from a runtime props options object.
414
+ * The extracted types are **internal** - i.e. the resolved props received by
415
+ * the component.
416
+ * - Boolean props are always present
417
+ * - Props with default values are always present
418
+ *
419
+ * To extract accepted props from the parent, use {@link ExtractPublicPropTypes}.
420
+ */
415
421
  type ExtractPropTypes<O> = { [K in keyof Pick<O, RequiredKeys<O>>]: O[K] extends {
416
422
  default: any;
417
- } ? Exclude<InferPropType<O[K]>, undefined> : InferPropType<O[K]> } & { [K in keyof Pick<O, OptionalKeys<O>>]?: InferPropType<O[K]> };
423
+ } ? Exclude<InferPropType<O[K]>, undefined> : InferPropType<O[K]>; } & { [K in keyof Pick<O, OptionalKeys<O>>]?: InferPropType<O[K]>; };
418
424
  declare enum BooleanFlags {
419
425
  shouldCast = 0,
420
426
  shouldCastTrue = 1
421
427
  }
422
- type ExtractDefaultPropTypes<O> = O extends object ? { [K in keyof Pick<O, DefaultKeys<O>>]: InferPropType<O[K]> } : {};
428
+ type ExtractDefaultPropTypes<O> = O extends object ? { [K in keyof Pick<O, DefaultKeys<O>>]: InferPropType<O[K]>; } : {};
423
429
  type NormalizedProp = PropOptions & {
424
430
  [BooleanFlags.shouldCast]?: boolean;
425
431
  [BooleanFlags.shouldCastTrue]?: boolean;
426
432
  };
427
433
  /**
428
- * normalized value is a tuple of the actual normalized options
429
- * and an array of prop keys that need value casting (booleans and defaults)
430
- */
434
+ * normalized value is a tuple of the actual normalized options
435
+ * and an array of prop keys that need value casting (booleans and defaults)
436
+ */
431
437
  type NormalizedProps = Record<string, NormalizedProp>;
432
438
  type NormalizedPropsOptions = [NormalizedProps, string[]] | [];
433
439
  //#endregion
@@ -435,11 +441,11 @@ type NormalizedPropsOptions = [NormalizedProps, string[]] | [];
435
441
  type ComponentTypeEmits = ((...args: any[]) => any) | Record<string, any>;
436
442
  //#endregion
437
443
  //#region packages/runtime-core/src/componentEmits.d.ts
438
- type ObjectEmitsOptions = Record<string, ((...args: any[]) => any) | null>;
444
+ type ObjectEmitsOptions = Record<string, ((...args: any[]) => any) | null | any[]>;
439
445
  type EmitsOptions = ObjectEmitsOptions | string[];
440
- type EmitsToProps<T extends EmitsOptions | ComponentTypeEmits> = T extends string[] ? { [K in `on${Capitalize<T[number]>}`]?: (...args: any[]) => any } : T extends ObjectEmitsOptions ? { [K in string & keyof T as `on${Capitalize<K>}`]?: (...args: T[K] extends ((...args: infer P) => any) ? P : T[K] extends null ? any[] : never) => any } : {};
441
- type ShortEmitsToObject<E> = E extends Record<string, any[]> ? { [K in keyof E]: (...args: E[K]) => any } : E;
442
- 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<{ [key in Event]: Options[key] extends ((...args: infer Args) => any) ? (event: key, ...args: Args) => void : Options[key] extends any[] ? (event: key, ...args: Options[key]) => void : (event: key, ...args: any[]) => void }[Event]>;
446
+ type EmitsToProps<T extends EmitsOptions | ComponentTypeEmits> = T extends string[] ? { [K in `on${Capitalize<T[number]>}`]?: (...args: any[]) => any; } : T extends ObjectEmitsOptions ? { [K in string & keyof T as `on${Capitalize<K>}`]?: (...args: T[K] extends ((...args: infer P) => any) ? P : T[K] extends null ? any[] : T[K] extends any[] ? T[K] : never) => any; } : {};
447
+ type ShortEmitsToObject<E> = E extends Record<string, any[]> ? { [K in keyof E]: (...args: E[K]) => any; } : E;
448
+ 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<{ [key in Event]: Options[key] extends ((...args: infer Args) => any) ? (event: key, ...args: Args) => void : Options[key] extends any[] ? (event: key, ...args: Options[key]) => void : (event: key, ...args: any[]) => void; }[Event]>;
443
449
  //#endregion
444
450
  //#region packages/runtime-core/src/directives.d.ts
445
451
  interface DirectiveBinding<Value = any, Modifiers extends string = string, Arg = any> {
@@ -454,10 +460,10 @@ type DirectiveHook<HostElement = any, Prev = VNode<any, HostElement> | null, Val
454
460
  type SSRDirectiveHook<Value = any, Modifiers extends string = string, Arg = any> = (binding: DirectiveBinding<Value, Modifiers, Arg>, vnode: VNode) => Data | undefined;
455
461
  interface ObjectDirective<HostElement = any, Value = any, Modifiers extends string = string, Arg = any> {
456
462
  /**
457
- * @internal without this, ts-expect-error in directives.test-d.ts somehow
458
- * fails when running tsc, but passes in IDE and when testing against built
459
- * dts. Could be a TS bug.
460
- */
463
+ * @internal without this, ts-expect-error in directives.test-d.ts somehow
464
+ * fails when running tsc, but passes in IDE and when testing against built
465
+ * dts. Could be a TS bug.
466
+ */
461
467
  __mod?: Modifiers;
462
468
  created?: DirectiveHook<HostElement, null, Value, Modifiers, Arg>;
463
469
  beforeMount?: DirectiveHook<HostElement, null, Value, Modifiers, Arg>;
@@ -475,30 +481,30 @@ type DirectiveModifiers<K extends string = string> = Partial<Record<K, boolean>>
475
481
  //#endregion
476
482
  //#region packages/runtime-core/src/componentPublicInstance.d.ts
477
483
  /**
478
- * Custom properties added to component instances in any way and can be accessed through `this`
479
- *
480
- * @example
481
- * Here is an example of adding a property `$router` to every component instance:
482
- * ```ts
483
- * import { createApp } from 'vue'
484
- * import { Router, createRouter } from 'vue-router'
485
- *
486
- * declare module 'vue' {
487
- * interface ComponentCustomProperties {
488
- * $router: Router
489
- * }
490
- * }
491
- *
492
- * // effectively adding the router to every component instance
493
- * const app = createApp({})
494
- * const router = createRouter()
495
- * app.config.globalProperties.$router = router
496
- *
497
- * const vm = app.mount('#app')
498
- * // we can access the router from the instance
499
- * vm.$router.push('/')
500
- * ```
501
- */
484
+ * Custom properties added to component instances in any way and can be accessed through `this`
485
+ *
486
+ * @example
487
+ * Here is an example of adding a property `$router` to every component instance:
488
+ * ```ts
489
+ * import { createApp } from 'vue'
490
+ * import { Router, createRouter } from 'vue-router'
491
+ *
492
+ * declare module 'vue' {
493
+ * interface ComponentCustomProperties {
494
+ * $router: Router
495
+ * }
496
+ * }
497
+ *
498
+ * // effectively adding the router to every component instance
499
+ * const app = createApp({})
500
+ * const router = createRouter()
501
+ * app.config.globalProperties.$router = router
502
+ *
503
+ * const vm = app.mount('#app')
504
+ * // we can access the router from the instance
505
+ * vm.$router.push('/')
506
+ * ```
507
+ */
502
508
  interface ComponentCustomProperties {}
503
509
  type IsDefaultMixinComponent<T> = T extends ComponentOptionsMixin ? ComponentOptionsMixin extends T ? true : false : false;
504
510
  type MixinToOptionTypes<T> = T extends ComponentOptionsBase<infer P, infer B, infer D, infer C, infer M, infer Mixin, infer Extends, any, any, infer Defaults, any, any, any, any, any, any, any> ? OptionTypesType<P & {}, B & {}, D & {}, C & {}, M & {}, Defaults & {}> & IntersectionMixin<Mixin> & IntersectionMixin<Extends> : never;
@@ -515,15 +521,15 @@ type ComponentPublicInstanceConstructor<T extends ComponentPublicInstance<Props,
515
521
  new (...args: any[]): T;
516
522
  };
517
523
  /**
518
- * This is the same as `CreateComponentPublicInstance` but adds local components,
519
- * global directives, exposed, and provide inference.
520
- * It changes the arguments order so that we don't need to repeat mixin
521
- * inference everywhere internally, but it has to be a new type to avoid
522
- * breaking types that relies on previous arguments order (#10842)
523
- */
524
- type CreateComponentPublicInstanceWithMixins<P = {}, B = {}, D = {}, C extends ComputedOptions = {}, M extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = {}, PublicProps = P, Defaults = {}, MakeDefaultsOptional extends boolean = false, I extends ComponentInjectOptions = {}, S extends SlotsType = {}, LC extends Record<string, Component> = {}, Directives extends Record<string, Directive> = {}, Exposed extends string = string, TypeRefs extends Data = {}, TypeEl extends Element = any, Provide extends ComponentProvideOptions = ComponentProvideOptions, PublicMixin = IntersectionMixin<Mixin> & IntersectionMixin<Extends>, PublicP = UnwrapMixinsType<PublicMixin, "P"> & EnsureNonVoid<P>, PublicB = UnwrapMixinsType<PublicMixin, "B"> & EnsureNonVoid<B>, PublicD = UnwrapMixinsType<PublicMixin, "D"> & EnsureNonVoid<D>, PublicC extends ComputedOptions = UnwrapMixinsType<PublicMixin, "C"> & EnsureNonVoid<C>, PublicM extends MethodOptions = UnwrapMixinsType<PublicMixin, "M"> & EnsureNonVoid<M>, PublicDefaults = UnwrapMixinsType<PublicMixin, "Defaults"> & EnsureNonVoid<Defaults>> = ComponentPublicInstance<PublicP, PublicB, PublicD, PublicC, PublicM, E, PublicProps, PublicDefaults, MakeDefaultsOptional, ComponentOptionsBase<P, B, D, C, M, Mixin, Extends, E, string, Defaults, {}, string, S, LC, Directives, Exposed, Provide>, I, S, Exposed, TypeRefs, TypeEl>;
524
+ * This is the same as `CreateComponentPublicInstance` but adds local components,
525
+ * global directives, exposed, and provide inference.
526
+ * It changes the arguments order so that we don't need to repeat mixin
527
+ * inference everywhere internally, but it has to be a new type to avoid
528
+ * breaking types that relies on previous arguments order (#10842)
529
+ */
530
+ type CreateComponentPublicInstanceWithMixins<P = {}, B = {}, D = {}, C extends ComputedOptions = {}, M extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = {}, PublicProps = P, Defaults = {}, MakeDefaultsOptional extends boolean = false, I extends ComponentInjectOptions = {}, S extends SlotsType = {}, LC extends Record<string, Component> = {}, Directives extends Record<string, Directive> = {}, Exposed extends string = string, TypeRefs extends Data = {}, TypeEl = any, Provide extends ComponentProvideOptions = ComponentProvideOptions, PublicMixin = IntersectionMixin<Mixin> & IntersectionMixin<Extends>, PublicP = UnwrapMixinsType<PublicMixin, "P"> & EnsureNonVoid<P>, PublicB = UnwrapMixinsType<PublicMixin, "B"> & EnsureNonVoid<B>, PublicD = UnwrapMixinsType<PublicMixin, "D"> & EnsureNonVoid<D>, PublicC extends ComputedOptions = UnwrapMixinsType<PublicMixin, "C"> & EnsureNonVoid<C>, PublicM extends MethodOptions = UnwrapMixinsType<PublicMixin, "M"> & EnsureNonVoid<M>, PublicDefaults = UnwrapMixinsType<PublicMixin, "Defaults"> & EnsureNonVoid<Defaults>> = ComponentPublicInstance<PublicP, PublicB, PublicD, PublicC, PublicM, E, PublicProps, PublicDefaults, MakeDefaultsOptional, ComponentOptionsBase<P, B, D, C, M, Mixin, Extends, E, string, Defaults, {}, string, S, LC, Directives, Exposed, Provide>, I, S, Exposed, TypeRefs, TypeEl>;
525
531
  type ExposedKeys<T, Exposed extends string & keyof T> = "" extends Exposed ? T : Pick<T, Exposed>;
526
- type ComponentPublicInstance<P = {}, B = {}, D = {}, C extends ComputedOptions = {}, M extends MethodOptions = {}, E extends EmitsOptions = {}, PublicProps = {}, Defaults = {}, MakeDefaultsOptional extends boolean = false, Options = ComponentOptionsBase<any, any, any, any, any, any, any, any, any>, I extends ComponentInjectOptions = {}, S extends SlotsType = {}, Exposed extends string = "", TypeRefs extends Data = {}, TypeEl extends Element = any> = {
532
+ type ComponentPublicInstance<P = {}, B = {}, D = {}, C extends ComputedOptions = {}, M extends MethodOptions = {}, E extends EmitsOptions = {}, PublicProps = {}, Defaults = {}, MakeDefaultsOptional extends boolean = false, Options = ComponentOptionsBase<any, any, any, any, any, any, any, any, any>, I extends ComponentInjectOptions = {}, S extends SlotsType = {}, Exposed extends string = "", TypeRefs extends Data = {}, TypeEl = any> = {
527
533
  $: ComponentInternalInstance;
528
534
  $data: D;
529
535
  $props: MakeDefaultsOptional extends true ? Partial<Defaults> & Omit<Prettify<P> & PublicProps, keyof Defaults> : Prettify<P> & PublicProps;
@@ -565,15 +571,15 @@ interface SuspenseProps {
565
571
  onPending?: () => void;
566
572
  onFallback?: () => void;
567
573
  /**
568
- * Switch to fallback content if it takes longer than `timeout` milliseconds to render the new default content.
569
- * A `timeout` value of `0` will cause the fallback content to be displayed immediately when default content is replaced.
570
- */
574
+ * Switch to fallback content if it takes longer than `timeout` milliseconds to render the new default content.
575
+ * A `timeout` value of `0` will cause the fallback content to be displayed immediately when default content is replaced.
576
+ */
571
577
  timeout?: string | number;
572
578
  /**
573
- * Allow suspense to be captured by parent suspense
574
- *
575
- * @default false
576
- */
579
+ * Allow suspense to be captured by parent suspense
580
+ *
581
+ * @default false
582
+ */
577
583
  suspensible?: boolean;
578
584
  }
579
585
  declare const SuspenseImpl: {
@@ -768,23 +774,39 @@ declare function configureCompat(config: CompatConfig): void;
768
774
  //#endregion
769
775
  //#region packages/runtime-core/src/componentOptions.d.ts
770
776
  /**
771
- * Interface for declaring custom options.
772
- *
773
- * @example
774
- * ```ts
775
- * declare module 'vue' {
776
- * interface ComponentCustomOptions {
777
- * beforeRouteUpdate?(
778
- * to: Route,
779
- * from: Route,
780
- * next: () => void
781
- * ): void
782
- * }
783
- * }
784
- * ```
785
- */
777
+ * Interface for declaring custom options.
778
+ *
779
+ * @example
780
+ * ```ts
781
+ * declare module 'vue' {
782
+ * interface ComponentCustomOptions {
783
+ * beforeRouteUpdate?(
784
+ * to: Route,
785
+ * from: Route,
786
+ * next: () => void
787
+ * ): void
788
+ * }
789
+ * }
790
+ * ```
791
+ */
786
792
  interface ComponentCustomOptions {}
787
- type RenderFunction = () => VNodeChild;
793
+ /**
794
+ * Registry for additional render result types.
795
+ *
796
+ * @example
797
+ * ```ts
798
+ * import type { VaporRenderResult } from 'vue'
799
+ *
800
+ * declare module 'vue' {
801
+ * interface RenderResultExtensions {
802
+ * vapor: VaporRenderResult
803
+ * }
804
+ * }
805
+ * ```
806
+ */
807
+ interface RenderResultExtensions {}
808
+ type RenderResult = VNodeChild | RenderResultExtensions[keyof RenderResultExtensions] | RenderResult[];
809
+ type RenderFunction = () => RenderResult;
788
810
  interface ComponentOptionsBase<Props, RawBindings, D, C extends ComputedOptions, M extends MethodOptions, Mixin extends ComponentOptionsMixin, Extends extends ComponentOptionsMixin, E extends EmitsOptions, EE extends string = string, Defaults = {}, I extends ComponentInjectOptions = {}, II extends string = string, S extends SlotsType = {}, LC extends Record<string, Component> = {}, Directives extends Record<string, Directive> = {}, Exposed extends string = string, Provide extends ComponentProvideOptions = ComponentProvideOptions> extends LegacyOptions<Props, D, C, M, Mixin, Extends, I, II, Provide>, ComponentInternalOptions, AsyncComponentInternalOptions, ComponentCustomOptions {
789
811
  setup?: (this: void, props: LooseRequired<Props & Prettify<UnwrapMixinsType<IntersectionMixin<Mixin> & IntersectionMixin<Extends>, "P">>>, ctx: SetupContext<E, S>) => Promise<RawBindings> | RawBindings | RenderFunction | void;
790
812
  name?: string;
@@ -799,16 +821,16 @@ interface ComponentOptionsBase<Props, RawBindings, D, C extends ComputedOptions,
799
821
  serverPrefetch?(): void | Promise<any>;
800
822
  compilerOptions?: RuntimeCompilerOptions;
801
823
  /**
802
- * SSR only. This is produced by compiler-ssr and attached in compiler-sfc
803
- * not user facing, so the typing is lax and for test only.
804
- * @internal
805
- */
824
+ * SSR only. This is produced by compiler-ssr and attached in compiler-sfc
825
+ * not user facing, so the typing is lax and for test only.
826
+ * @internal
827
+ */
806
828
  ssrRender?: (ctx: any, push: (item: any) => void, parentInstance: ComponentInternalInstance, attrs: Data | undefined, $props: ComponentInternalInstance["props"], $setup: ComponentInternalInstance["setupState"], $data: ComponentInternalInstance["data"], $options: ComponentInternalInstance["ctx"]) => void;
807
829
  /**
808
- * Only generated by compiler-sfc to mark a ssr render function inlined and
809
- * returned from setup()
810
- * @internal
811
- */
830
+ * Only generated by compiler-sfc to mark a ssr render function inlined and
831
+ * returned from setup()
832
+ * @internal
833
+ */
812
834
  __ssrInlineRender?: boolean;
813
835
  call?: (this: unknown, ...args: unknown[]) => never;
814
836
  __isFragment?: never;
@@ -817,8 +839,8 @@ interface ComponentOptionsBase<Props, RawBindings, D, C extends ComputedOptions,
817
839
  __defaults?: Defaults;
818
840
  }
819
841
  /**
820
- * Subset of compiler options that makes sense for the runtime.
821
- */
842
+ * Subset of compiler options that makes sense for the runtime.
843
+ */
822
844
  interface RuntimeCompilerOptions {
823
845
  isCustomElement?: (tag: string) => boolean;
824
846
  whitespace?: "preserve" | "condense";
@@ -833,7 +855,7 @@ interface MethodOptions {
833
855
  }
834
856
  type ExtractComputedReturns<T extends any> = { [key in keyof T]: T[key] extends {
835
857
  get: (...args: any[]) => infer TReturn;
836
- } ? TReturn : T[key] extends ((...args: any[]) => infer TReturn) ? TReturn : never };
858
+ } ? TReturn : T[key] extends ((...args: any[]) => infer TReturn) ? TReturn : never; };
837
859
  type ObjectWatchOptionItem = {
838
860
  handler: WatchCallback | string;
839
861
  } & WatchOptions;
@@ -847,7 +869,7 @@ type ObjectInjectOptions = Record<string | symbol, string | symbol | {
847
869
  from?: string | symbol;
848
870
  default?: unknown;
849
871
  }>;
850
- type InjectToObject<T extends ComponentInjectOptions> = T extends string[] ? { [K in T[number]]?: unknown } : T extends ObjectInjectOptions ? { [K in keyof T]?: unknown } : never;
872
+ type InjectToObject<T extends ComponentInjectOptions> = T extends string[] ? { [K in T[number]]?: unknown; } : T extends ObjectInjectOptions ? { [K in keyof T]?: unknown; } : never;
851
873
  interface LegacyOptions<Props, D, C extends ComputedOptions, M extends MethodOptions, Mixin extends ComponentOptionsMixin, Extends extends ComponentOptionsMixin, I extends ComponentInjectOptions, II extends string, Provide extends ComponentProvideOptions = ComponentProvideOptions> {
852
874
  compatConfig?: CompatConfig;
853
875
  [key: string]: any;
@@ -878,18 +900,18 @@ interface LegacyOptions<Props, D, C extends ComputedOptions, M extends MethodOpt
878
900
  renderTriggered?: DebuggerHook;
879
901
  errorCaptured?: ErrorCapturedHook;
880
902
  /**
881
- * runtime compile only
882
- * @deprecated use `compilerOptions.delimiters` instead.
883
- */
903
+ * runtime compile only
904
+ * @deprecated use `compilerOptions.delimiters` instead.
905
+ */
884
906
  delimiters?: [string, string];
885
907
  /**
886
- * #3468
887
- *
888
- * type-only, used to assist Mixin's type inference,
889
- * TypeScript will try to simplify the inferred `Mixin` type,
890
- * with the `__differentiator`, TypeScript won't be able to combine different mixins,
891
- * because the `__differentiator` will be different
892
- */
908
+ * #3468
909
+ *
910
+ * type-only, used to assist Mixin's type inference,
911
+ * TypeScript will try to simplify the inferred `Mixin` type,
912
+ * with the `__differentiator`, TypeScript won't be able to combine different mixins,
913
+ * because the `__differentiator` will be different
914
+ */
893
915
  __differentiator?: keyof D | keyof C | keyof M;
894
916
  }
895
917
  type MergedHook<T = () => void> = T | T[];
@@ -902,9 +924,11 @@ type MergedComponentOptionsOverride = {
902
924
  beforeUpdate?: MergedHook;
903
925
  updated?: MergedHook;
904
926
  activated?: MergedHook;
905
- deactivated?: MergedHook; /** @deprecated use `beforeUnmount` instead */
927
+ deactivated?: MergedHook;
928
+ /** @deprecated use `beforeUnmount` instead */
906
929
  beforeDestroy?: MergedHook;
907
- beforeUnmount?: MergedHook; /** @deprecated use `unmounted` instead */
930
+ beforeUnmount?: MergedHook;
931
+ /** @deprecated use `unmounted` instead */
908
932
  destroyed?: MergedHook;
909
933
  unmounted?: MergedHook;
910
934
  renderTracked?: MergedHook<DebuggerHook>;
@@ -928,7 +952,7 @@ type InjectionKey<T> = symbol & InjectionConstraint<T>;
928
952
  //#region packages/runtime-core/src/apiDefineComponent.d.ts
929
953
  type PublicProps = VNodeProps & AllowedComponentProps & ComponentCustomProps;
930
954
  type ResolveProps<PropsOrPropOptions, E extends EmitsOptions> = Readonly<PropsOrPropOptions extends ComponentPropsOptions ? ExtractPropTypes<PropsOrPropOptions> : PropsOrPropOptions> & ({} extends E ? {} : EmitsToProps<E>);
931
- type DefineComponent<PropsOrPropOptions = {}, RawBindings = {}, D = {}, C extends ComputedOptions = ComputedOptions, M extends MethodOptions = MethodOptions, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = {}, EE extends string = string, PP = PublicProps, Props = ResolveProps<PropsOrPropOptions, E>, Defaults = ExtractDefaultPropTypes<PropsOrPropOptions>, S extends SlotsType = {}, LC extends Record<string, Component> = {}, Directives extends Record<string, Directive> = {}, Exposed extends string = string, Provide extends ComponentProvideOptions = ComponentProvideOptions, MakeDefaultsOptional extends boolean = true, TypeRefs extends Record<string, unknown> = {}, TypeEl extends Element = any> = ComponentPublicInstanceConstructor<CreateComponentPublicInstanceWithMixins<Props, RawBindings, D, C, M, Mixin, Extends, E, PP, Defaults, MakeDefaultsOptional, {}, S, LC & GlobalComponents, Directives & GlobalDirectives, Exposed, TypeRefs, TypeEl>> & ComponentOptionsBase<Props, RawBindings, D, C, M, Mixin, Extends, E, EE, Defaults, {}, string, S, LC & GlobalComponents, Directives & GlobalDirectives, Exposed, Provide> & PP;
955
+ type DefineComponent<PropsOrPropOptions = {}, RawBindings = {}, D = {}, C extends ComputedOptions = ComputedOptions, M extends MethodOptions = MethodOptions, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = {}, EE extends string = string, PP = PublicProps, Props = ResolveProps<PropsOrPropOptions, E>, Defaults = ExtractDefaultPropTypes<PropsOrPropOptions>, S extends SlotsType = {}, LC extends Record<string, Component> = {}, Directives extends Record<string, Directive> = {}, Exposed extends string = string, Provide extends ComponentProvideOptions = ComponentProvideOptions, MakeDefaultsOptional extends boolean = true, TypeRefs extends Record<string, unknown> = {}, TypeEl = any> = ComponentPublicInstanceConstructor<CreateComponentPublicInstanceWithMixins<Props, RawBindings, D, C, M, Mixin, Extends, E, PP, Defaults, MakeDefaultsOptional, {}, S, LC & GlobalComponents, Directives & GlobalDirectives, Exposed, TypeRefs, TypeEl>> & ComponentOptionsBase<Props, RawBindings, D, C, M, Mixin, Extends, E, EE, Defaults, {}, string, S, LC & GlobalComponents, Directives & GlobalDirectives, Exposed, Provide> & PP;
932
956
  //#endregion
933
957
  //#region packages/runtime-core/src/apiCreateApp.d.ts
934
958
  interface App<HostElement = any> {
@@ -947,11 +971,11 @@ interface App<HostElement = any> {
947
971
  onUnmount(cb: () => void): void;
948
972
  provide<T, K = InjectionKey<T> | string | number>(key: K, value: K extends InjectionKey<infer V> ? V : T): this;
949
973
  /**
950
- * Runs a function with the app as active instance. This allows using of `inject()` within the function to get access
951
- * to variables provided via `app.provide()`.
952
- *
953
- * @param fn - function to run with the app as active instance
954
- */
974
+ * Runs a function with the app as active instance. This allows using of `inject()` within the function to get access
975
+ * to variables provided via `app.provide()`.
976
+ *
977
+ * @param fn - function to run with the app as active instance
978
+ */
955
979
  runWithContext<T>(fn: () => T): T;
956
980
  _uid: number;
957
981
  _component: GenericComponent;
@@ -960,40 +984,40 @@ interface App<HostElement = any> {
960
984
  _context: AppContext;
961
985
  _instance: GenericComponentInstance | null;
962
986
  /**
963
- * @internal custom element vnode
964
- */
987
+ * @internal custom element vnode
988
+ */
965
989
  _ceVNode?: VNode;
966
990
  /**
967
- * @internal vapor custom element instance
968
- */
991
+ * @internal vapor custom element instance
992
+ */
969
993
  _ceComponent?: GenericComponentInstance | null;
970
994
  /**
971
- * v2 compat only
972
- */
995
+ * v2 compat only
996
+ */
973
997
  filter?(name: string): Function | undefined;
974
998
  filter?(name: string, filter: Function): this;
975
999
  /**
976
- * @internal v3 compat only
977
- */
1000
+ * @internal v3 compat only
1001
+ */
978
1002
  _createRoot?(options: ComponentOptions): ComponentPublicInstance;
979
1003
  }
980
1004
  type OptionMergeFunction = (to: unknown, from: unknown) => any;
981
1005
  /**
982
- * Shared app config between vdom and vapor
983
- */
1006
+ * Shared app config between vdom and vapor
1007
+ */
984
1008
  interface GenericAppConfig {
985
1009
  performance?: boolean;
986
1010
  errorHandler?: (err: unknown, instance: ComponentPublicInstance | null, info: string) => void;
987
1011
  warnHandler?: (msg: string, instance: ComponentPublicInstance | null, trace: string) => void;
988
1012
  /**
989
- * Whether to throw unhandled errors in production.
990
- * Default is `false` to avoid crashing on any error (and only logs it)
991
- * But in some cases, e.g. SSR, throwing might be more desirable.
992
- */
1013
+ * Whether to throw unhandled errors in production.
1014
+ * Default is `false` to avoid crashing on any error (and only logs it)
1015
+ * But in some cases, e.g. SSR, throwing might be more desirable.
1016
+ */
993
1017
  throwUnhandledErrorInProduction?: boolean;
994
1018
  /**
995
- * Prefix for all useId() calls within this app
996
- */
1019
+ * Prefix for all useId() calls within this app
1020
+ */
997
1021
  idPrefix?: string;
998
1022
  }
999
1023
  interface AppConfig extends GenericAppConfig {
@@ -1001,37 +1025,62 @@ interface AppConfig extends GenericAppConfig {
1001
1025
  optionMergeStrategies: Record<string, OptionMergeFunction>;
1002
1026
  globalProperties: ComponentCustomProperties & Record<string, any>;
1003
1027
  /**
1004
- * Options to pass to `@vue/compiler-dom`.
1005
- * Only supported in runtime compiler build.
1006
- */
1028
+ * Options to pass to `@vue/compiler-dom`.
1029
+ * Only supported in runtime compiler build.
1030
+ */
1007
1031
  compilerOptions: RuntimeCompilerOptions;
1008
1032
  /**
1009
- * @deprecated use config.compilerOptions.isCustomElement
1010
- */
1033
+ * @deprecated use config.compilerOptions.isCustomElement
1034
+ */
1011
1035
  isCustomElement?: (tag: string) => boolean;
1012
1036
  }
1013
1037
  /**
1014
- * The vapor in vdom implementation is in runtime-vapor/src/vdomInterop.ts
1015
- */
1016
- interface VaporInteropInterface {
1017
- mount(vnode: VNode, container: any, anchor: any, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, onBeforeMount?: () => void): GenericComponentInstance;
1018
- update(n1: VNode, n2: VNode, shouldUpdate: boolean, onBeforeUpdate?: () => void): void;
1019
- unmount(vnode: VNode, doRemove?: boolean): void;
1020
- move(vnode: VNode, container: any, anchor: any, moveType: MoveType): void;
1021
- slot(n1: VNode | null, n2: VNode, container: any, anchor: any, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null): void;
1022
- hydrate(vnode: VNode, node: any, container: any, anchor: any, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null): Node;
1023
- hydrateSlot(vnode: VNode, node: any): Node;
1024
- activate(vnode: VNode, container: any, anchor: any, parentComponent: ComponentInternalInstance): void;
1025
- deactivate(vnode: VNode, container: any): void;
1038
+ * The vapor in vdom implementation is in runtime-vapor/src/vdomInterop.ts
1039
+ */
1040
+ interface VaporInVdomInterface {
1041
+ mount(vnode: VNode, container: RendererElement, anchor: RendererNode | null, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null): GenericComponentInstance;
1042
+ update(n1: VNode, n2: VNode, shouldUpdate: boolean): void;
1043
+ unmount(vnode: VNode, doRemove: boolean | undefined, parentSuspense: SuspenseBoundary | null): void;
1044
+ move(vnode: VNode, container: RendererElement, anchor: RendererNode | null, moveType: MoveType, parentSuspense: SuspenseBoundary | null): void;
1045
+ slot(n1: VNode | null, n2: VNode, container: RendererElement, anchor: RendererNode | null, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, slotScopeIds: string[] | null): void;
1046
+ hydrate(vnode: VNode, node: Node, container: RendererElement, anchor: RendererNode | null, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null): Node | null;
1047
+ hydrateSlot(vnode: VNode, node: Node, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, slotScopeIds: string[] | null): Node | null;
1048
+ activate(vnode: VNode, container: RendererElement, anchor: RendererNode | null, parentComponent: ComponentInternalInstance, parentSuspense: SuspenseBoundary | null): void;
1049
+ deactivate(vnode: VNode, container: RendererElement, parentSuspense: SuspenseBoundary | null): void;
1026
1050
  setTransitionHooks(component: ComponentInternalInstance, transition: TransitionHooks): void;
1027
- vdomMount: (component: ConcreteComponent, parentComponent: any, props?: any, slots?: any) => any;
1028
- vdomUnmount: UnmountComponentFn;
1029
- vdomSlot: (slots: any, name: string | (() => string), props: Record<string, any>, parentComponent: any, fallback?: any) => any;
1030
- vdomMountVNode: (vnode: VNode, parentComponent: any) => any;
1051
+ applyCssVars(vnode: VNode, vars: Record<string, string>): void;
1052
+ /**
1053
+ * Hands the fallback of a vdom outlet over to the vapor slot its content
1054
+ * consists of, if it is that one slot.
1055
+ */
1056
+ attachSlotOutlet(content: VNodeArrayChildren, fallback: () => VNodeArrayChildren, owner: ComponentInternalInstance | null): boolean;
1057
+ /**
1058
+ * Hydrates an outlet marked `vo` whose fallback the server rendered in place
1059
+ * of the whole content (`<!--(-->`).
1060
+ */
1061
+ hydrateSlotOutlet(outlet: VNode, open: Comment, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, slotScopeIds: string[] | null): Node | null;
1031
1062
  }
1032
1063
  /**
1033
- * Minimal app context shared between vdom and vapor
1034
- */
1064
+ * Options for rendering a VDOM slot inside vapor. `flags` carries the
1065
+ * outlet's VaporSlotFlags describing its position in the fallback chain;
1066
+ * see renderVDOMSlot.
1067
+ */
1068
+ interface VdomSlotOptions {
1069
+ fallback?: (...args: any[]) => any;
1070
+ flags?: number;
1071
+ adoptAnchor?: Node;
1072
+ }
1073
+ /**
1074
+ * The vdom in vapor implementation is in runtime-vapor/src/vdomInterop.ts
1075
+ */
1076
+ interface VdomInVaporInterface {
1077
+ mount: (component: ConcreteComponent, parentComponent: any, props?: any, slots?: any, once?: boolean, inputScope?: EffectScope) => any;
1078
+ slot: (slots: any, name: string | (() => string), props: Record<string, any>, parentComponent: any, options?: VdomSlotOptions) => any;
1079
+ mountVNode: (vnode: VNode, parentComponent: any, isSingleRoot?: boolean, rawProps?: any, once?: boolean) => any;
1080
+ }
1081
+ /**
1082
+ * Minimal app context shared between vdom and vapor
1083
+ */
1035
1084
  interface GenericAppContext {
1036
1085
  app: App;
1037
1086
  config: GenericAppConfig;
@@ -1039,14 +1088,18 @@ interface GenericAppContext {
1039
1088
  components?: Record<string, Component>;
1040
1089
  directives?: Record<string, Directive>;
1041
1090
  /**
1042
- * HMR only
1043
- * @internal
1044
- */
1091
+ * HMR only
1092
+ * @internal
1093
+ */
1045
1094
  reload?: () => void;
1046
1095
  /**
1047
- * @internal vapor interop only
1048
- */
1049
- vapor?: VaporInteropInterface;
1096
+ * @internal vapor interop only
1097
+ */
1098
+ vapor?: VaporInVdomInterface;
1099
+ /**
1100
+ * @internal vdom interop only
1101
+ */
1102
+ vdom?: VdomInVaporInterface;
1050
1103
  }
1051
1104
  interface AppContext extends GenericAppContext {
1052
1105
  config: AppConfig;
@@ -1054,26 +1107,26 @@ interface AppContext extends GenericAppContext {
1054
1107
  directives: Record<string, Directive>;
1055
1108
  mixins: ComponentOptions[];
1056
1109
  /**
1057
- * Cache for merged/normalized component options
1058
- * Each app instance has its own cache because app-level global mixins and
1059
- * optionMergeStrategies can affect merge behavior.
1060
- * @internal
1061
- */
1110
+ * Cache for merged/normalized component options
1111
+ * Each app instance has its own cache because app-level global mixins and
1112
+ * optionMergeStrategies can affect merge behavior.
1113
+ * @internal
1114
+ */
1062
1115
  optionsCache: WeakMap<ComponentOptions, MergedComponentOptions>;
1063
1116
  /**
1064
- * Cache for normalized props options
1065
- * @internal
1066
- */
1117
+ * Cache for normalized props options
1118
+ * @internal
1119
+ */
1067
1120
  propsCache: WeakMap<ConcreteComponent, NormalizedPropsOptions>;
1068
1121
  /**
1069
- * Cache for normalized emits options
1070
- * @internal
1071
- */
1122
+ * Cache for normalized emits options
1123
+ * @internal
1124
+ */
1072
1125
  emitsCache: WeakMap<ConcreteComponent, ObjectEmitsOptions | null>;
1073
1126
  /**
1074
- * v2 compat only
1075
- * @internal
1076
- */
1127
+ * v2 compat only
1128
+ * @internal
1129
+ */
1077
1130
  filters?: Record<string, Function>;
1078
1131
  }
1079
1132
  type PluginInstallFunction<Options = any[]> = Options extends unknown[] ? (app: App, ...options: Options) => any : (app: App, options: Options) => any;
@@ -1081,7 +1134,7 @@ type ObjectPlugin<Options = any[]> = {
1081
1134
  install: PluginInstallFunction<Options>;
1082
1135
  };
1083
1136
  type FunctionPlugin<Options = any[]> = PluginInstallFunction<Options> & Partial<ObjectPlugin<Options>>;
1084
- type Plugin<Options = any[], P extends unknown[] = (Options extends unknown[] ? Options : [Options])> = FunctionPlugin<P> | ObjectPlugin<P>;
1137
+ type Plugin<Options = any[], P extends unknown[] = Options extends unknown[] ? Options : [Options]> = FunctionPlugin<P> | ObjectPlugin<P>;
1085
1138
  //#endregion
1086
1139
  //#region packages/runtime-core/src/components/Teleport.d.ts
1087
1140
  type TeleportVNode = VNode<RendererNode, RendererElement, TeleportProps>;
@@ -1094,12 +1147,7 @@ declare const TeleportImpl: {
1094
1147
  name: string;
1095
1148
  __isTeleport: boolean;
1096
1149
  process(n1: TeleportVNode | null, n2: TeleportVNode, container: RendererElement, anchor: RendererNode | null, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, namespace: ElementNamespace, slotScopeIds: string[] | null, optimized: boolean, internals: RendererInternals): void;
1097
- remove(vnode: VNode, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, {
1098
- um: unmount,
1099
- o: {
1100
- remove: hostRemove
1101
- }
1102
- }: RendererInternals, doRemove: boolean): void;
1150
+ remove(vnode: VNode, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, { um: unmount, o: { remove: hostRemove } }: RendererInternals, doRemove: boolean): void;
1103
1151
  move: typeof moveTeleport;
1104
1152
  hydrate: typeof hydrateTeleport;
1105
1153
  };
@@ -1108,21 +1156,8 @@ declare enum TeleportMoveTypes {
1108
1156
  TOGGLE = 1,
1109
1157
  REORDER = 2
1110
1158
  }
1111
- declare function moveTeleport(vnode: VNode, container: RendererElement, parentAnchor: RendererNode | null, {
1112
- o: {
1113
- insert
1114
- },
1115
- m: move
1116
- }: RendererInternals, parentComponent: ComponentInternalInstance | null, moveType?: TeleportMoveTypes): void;
1117
- declare function hydrateTeleport(node: Node, vnode: TeleportVNode, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, slotScopeIds: string[] | null, optimized: boolean, {
1118
- o: {
1119
- nextSibling,
1120
- parentNode,
1121
- querySelector,
1122
- insert,
1123
- createText
1124
- }
1125
- }: RendererInternals<Node, Element>, hydrateChildren: (node: Node | null, vnode: VNode, container: Element, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, slotScopeIds: string[] | null, optimized: boolean) => Node | null): Node | null;
1159
+ declare function moveTeleport(vnode: VNode, container: RendererElement, parentAnchor: RendererNode | null, { o: { insert }, m: move }: RendererInternals, parentComponent: ComponentInternalInstance | null, moveType?: TeleportMoveTypes): void;
1160
+ declare function hydrateTeleport(node: Node, vnode: TeleportVNode, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, slotScopeIds: string[] | null, optimized: boolean, { o: { nextSibling, parentNode, querySelector, insert, createText } }: RendererInternals<Node, Element>, hydrateChildren: (node: Node | null, vnode: VNode, container: Element, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, slotScopeIds: string[] | null, optimized: boolean) => Node | null): Node | null;
1126
1161
  declare const Teleport: {
1127
1162
  __isTeleport: true;
1128
1163
  new (): {
@@ -1141,27 +1176,27 @@ declare const Fragment: {
1141
1176
  };
1142
1177
  };
1143
1178
  declare const Text: unique symbol;
1144
- declare const Comment: unique symbol;
1179
+ declare const Comment$1: unique symbol;
1145
1180
  declare const Static: unique symbol;
1146
1181
  declare const VaporSlot: unique symbol;
1147
- type VNodeTypes = string | VNode | Component | typeof Text | typeof Static | typeof Comment | typeof Fragment | typeof Teleport | typeof TeleportImpl | typeof Suspense | typeof SuspenseImpl | typeof VaporSlot;
1182
+ type VNodeTypes = string | VNode | Component | typeof Text | typeof Static | typeof Comment$1 | typeof Fragment | typeof Teleport | typeof TeleportImpl | typeof Suspense | typeof SuspenseImpl | typeof VaporSlot;
1148
1183
  type VNodeRef = string | Ref | ((ref: Element | ComponentPublicInstance | null, refs: Record<string, any>) => void);
1149
1184
  type VNodeNormalizedRefAtom = {
1150
1185
  /**
1151
- * component instance
1152
- */
1186
+ * component instance
1187
+ */
1153
1188
  i: ComponentInternalInstance;
1154
1189
  /**
1155
- * Actual ref
1156
- */
1190
+ * Actual ref
1191
+ */
1157
1192
  r: VNodeRef;
1158
1193
  /**
1159
- * setup ref key
1160
- */
1194
+ * setup ref key
1195
+ */
1161
1196
  k?: string;
1162
1197
  /**
1163
- * refInFor marker
1164
- */
1198
+ * refInFor marker
1199
+ */
1165
1200
  f?: boolean;
1166
1201
  };
1167
1202
  type VNodeNormalizedRef = VNodeNormalizedRefAtom | VNodeNormalizedRefAtom[];
@@ -1183,34 +1218,52 @@ type VNodeChildAtom = VNode | string | number | boolean | null | undefined | voi
1183
1218
  type VNodeArrayChildren = Array<VNodeArrayChildren | VNodeChildAtom>;
1184
1219
  type VNodeChild = VNodeChildAtom | VNodeArrayChildren;
1185
1220
  type VNodeNormalizedChildren = string | VNodeArrayChildren | RawSlots | null;
1221
+ /**
1222
+ * A vdom outlet rendering a vapor slot, recorded on the slot's vnode: the
1223
+ * outlet that produced the vnode first, then every enclosing outlet whose
1224
+ * content is only that slot. Interop resolves their fallbacks in turn once
1225
+ * the slot renders empty. Internal to vapor interop.
1226
+ */
1227
+ interface VdomSlotOutlet {
1228
+ fallback: () => VNodeArrayChildren;
1229
+ owner: ComponentInternalInstance | null;
1230
+ innerIds?: number;
1231
+ }
1186
1232
  interface VNode<HostNode = RendererNode, HostElement = RendererElement, ExtraProps = {
1187
1233
  [key: string]: any;
1188
1234
  }> {
1189
1235
  /**
1190
- * @internal
1191
- */
1236
+ * @internal
1237
+ */
1192
1238
  __v_isVNode: true;
1193
1239
  /**
1194
- * @internal
1195
- */
1240
+ * @internal
1241
+ */
1196
1242
  [ReactiveFlags$1.SKIP]: true;
1197
1243
  type: VNodeTypes;
1198
1244
  props: (VNodeProps & ExtraProps) | null;
1199
1245
  key: PropertyKey | null;
1200
1246
  ref: VNodeNormalizedRef | null;
1201
1247
  /**
1202
- * SFC only. This is assigned on vnode creation using currentScopeId
1203
- * which is set alongside currentRenderingInstance.
1204
- */
1248
+ * SFC only. This is assigned on vnode creation using currentScopeId
1249
+ * which is set alongside currentRenderingInstance.
1250
+ */
1205
1251
  scopeId: string | null;
1206
1252
  /**
1207
- * SFC only. This is assigned to:
1208
- * - Slot fragment vnodes with :slotted SFC styles.
1209
- * - Component vnodes (during patch/hydration) so that its root node can
1210
- * inherit the component's slotScopeIds
1211
- * @internal
1212
- */
1253
+ * SFC only. This is assigned to:
1254
+ * - Slot fragment vnodes with :slotted SFC styles.
1255
+ * - Component vnodes (during patch/hydration) so that its root node can
1256
+ * inherit the component's slotScopeIds
1257
+ * @internal
1258
+ */
1213
1259
  slotScopeIds: string[] | null;
1260
+ /**
1261
+ * Root-only scope ids published by the vapor interop onto vnodes serving
1262
+ * as a vapor component's effective root; consumed by getInheritedScopeIds
1263
+ * where the effective-root chain tops out (before insertion).
1264
+ * @internal
1265
+ */
1266
+ vaporScopeIds?: string[];
1214
1267
  children: VNodeNormalizedChildren;
1215
1268
  component: ComponentInternalInstance | null;
1216
1269
  dirs: DirectiveBinding[] | null;
@@ -1222,112 +1275,132 @@ interface VNode<HostNode = RendererNode, HostElement = RendererElement, ExtraPro
1222
1275
  targetStart: HostNode | null;
1223
1276
  targetAnchor: HostNode | null;
1224
1277
  /**
1225
- * number of elements contained in a static vnode
1226
- * @internal
1227
- */
1278
+ * number of elements contained in a static vnode
1279
+ * @internal
1280
+ */
1228
1281
  staticCount: number;
1229
1282
  suspense: SuspenseBoundary | null;
1230
1283
  /**
1231
- * @internal
1232
- */
1284
+ * @internal
1285
+ */
1233
1286
  ssContent: VNode | null;
1234
1287
  /**
1235
- * @internal
1236
- */
1288
+ * @internal
1289
+ */
1237
1290
  ssFallback: VNode | null;
1238
1291
  shapeFlag: number;
1239
1292
  patchFlag: number;
1240
1293
  /**
1241
- * @internal
1242
- */
1294
+ * @internal
1295
+ */
1243
1296
  dynamicProps: string[] | null;
1244
1297
  /**
1245
- * @internal
1246
- */
1298
+ * @internal
1299
+ */
1247
1300
  dynamicChildren: (VNode[] & {
1248
1301
  hasOnce?: boolean;
1249
1302
  }) | null;
1250
1303
  appContext: AppContext | null;
1251
1304
  /**
1252
- * @internal lexical scope owner instance
1253
- */
1305
+ * @internal lexical scope owner instance
1306
+ */
1254
1307
  ctx: ComponentInternalInstance | null;
1255
1308
  /**
1256
- * @internal attached by v-memo
1257
- */
1309
+ * @internal attached by v-memo
1310
+ */
1258
1311
  memo?: any[];
1259
1312
  /**
1260
- * @internal index for cleaning v-memo cache
1261
- */
1313
+ * @internal index for cleaning v-memo cache
1314
+ */
1262
1315
  cacheIndex?: number;
1263
1316
  /**
1264
- * @internal __COMPAT__ only
1265
- */
1317
+ * @internal __COMPAT__ only
1318
+ */
1266
1319
  isCompatRoot?: true;
1267
1320
  /**
1268
- * @internal custom element interception hook
1269
- */
1321
+ * @internal custom element interception hook
1322
+ */
1270
1323
  ce?: (instance: ComponentInternalInstance) => void;
1271
1324
  /**
1272
- * @internal VDOM in Vapor interop hook
1273
- */
1325
+ * @internal VDOM in Vapor interop hook
1326
+ */
1274
1327
  vi?: (instance: ComponentInternalInstance) => void;
1275
1328
  /**
1276
- * @internal Vapor slot in VDOM metadata
1277
- */
1329
+ * @internal Vapor slot in VDOM metadata
1330
+ */
1278
1331
  vs?: {
1279
1332
  slot: (props: any) => any;
1280
- fallback: (() => VNodeArrayChildren) | undefined;
1333
+ outlets?: readonly VdomSlotOutlet[];
1334
+ state?: unknown;
1281
1335
  ref?: ShallowRef<any>;
1336
+ scope?: EffectScope;
1282
1337
  };
1283
1338
  /**
1284
- * @internal Vapor slot Block
1285
- */
1339
+ * @internal Vapor slot Block
1340
+ */
1286
1341
  vb?: any;
1342
+ /**
1343
+ * @internal vapor interop only — the fragment of a vdom slot outlet whose
1344
+ * fallback a forwarded vapor slot resolves
1345
+ */
1346
+ vo?: boolean;
1347
+ /**
1348
+ * @internal vapor interop only — internal before-update notification, fired
1349
+ * before this vnode is patched (alongside onVnodeBeforeUpdate). Single-owner:
1350
+ * the interop layer assigns (never appends) so re-tracking replaces the
1351
+ * previous callback.
1352
+ */
1353
+ ibu?: () => void;
1354
+ /**
1355
+ * @internal vapor interop only — internal updated notification, fired after
1356
+ * this vnode is patched (alongside onVnodeUpdated) so the interop layer can
1357
+ * refresh its snapshot of the DOM range. Single-owner; see `ibu`.
1358
+ */
1359
+ iu?: () => void;
1287
1360
  }
1288
1361
  //#endregion
1289
1362
  //#region packages/runtime-core/src/component.d.ts
1290
1363
  type Data = Record<string, unknown>;
1291
1364
  /**
1292
- * For extending allowed non-declared attrs on components in TSX
1293
- */
1365
+ * For extending allowed non-declared attrs on components in TSX
1366
+ */
1294
1367
  interface AllowedAttrs {}
1295
1368
  type Attrs = Data & AllowedAttrs;
1296
1369
  /**
1297
- * For extending allowed non-declared props on components in TSX
1298
- */
1370
+ * For extending allowed non-declared props on components in TSX
1371
+ */
1299
1372
  interface ComponentCustomProps {}
1300
1373
  /**
1301
- * For globally defined Directives
1302
- * Here is an example of adding a directive `VTooltip` as global directive:
1303
- *
1304
- * @example
1305
- * ```ts
1306
- * import VTooltip from 'v-tooltip'
1307
- *
1308
- * declare module '@vue/runtime-core' {
1309
- * interface GlobalDirectives {
1310
- * VTooltip
1311
- * }
1312
- * }
1313
- * ```
1314
- */
1374
+ * For globally defined Directives
1375
+ * Here is an example of adding a directive `VTooltip` as global directive:
1376
+ *
1377
+ * @example
1378
+ * ```ts
1379
+ * import VTooltip from 'v-tooltip'
1380
+ *
1381
+ * declare module '@vue/runtime-core' {
1382
+ * interface GlobalDirectives {
1383
+ * VTooltip
1384
+ * }
1385
+ * }
1386
+ * ```
1387
+ */
1315
1388
  interface GlobalDirectives {}
1316
1389
  /**
1317
- * For globally defined Components
1318
- * Here is an example of adding a component `RouterView` as global component:
1319
- *
1320
- * @example
1321
- * ```ts
1322
- * import { RouterView } from 'vue-router'
1323
- *
1324
- * declare module '@vue/runtime-core' {
1325
- * interface GlobalComponents {
1326
- * RouterView
1327
- * }
1328
- * }
1329
- * ```
1330
- */
1390
+ * For globally defined Components
1391
+ * Here is an example of adding a component `RouterView` as global component:
1392
+ *
1393
+ * @example
1394
+ * ```ts
1395
+ * import { RouterView } from 'vue-router'
1396
+ *
1397
+ * declare module '@vue/runtime-core' {
1398
+ * interface GlobalComponents {
1399
+ * RouterView
1400
+ * }
1401
+ * }
1402
+ * ```
1403
+ */
1331
1404
  interface GlobalComponents {
1332
1405
  Teleport: DefineComponent<TeleportProps>;
1333
1406
  Suspense: DefineComponent<SuspenseProps>;
@@ -1335,65 +1408,65 @@ interface GlobalComponents {
1335
1408
  BaseTransition: DefineComponent<BaseTransitionProps>;
1336
1409
  }
1337
1410
  /**
1338
- * Default allowed non-declared props on component in TSX
1339
- */
1411
+ * Default allowed non-declared props on component in TSX
1412
+ */
1340
1413
  interface AllowedComponentProps {
1341
1414
  class?: unknown;
1342
1415
  style?: unknown;
1343
1416
  }
1344
1417
  interface ComponentInternalOptions {
1345
1418
  /**
1346
- * indicates vapor component
1347
- */
1419
+ * indicates vapor component
1420
+ */
1348
1421
  __vapor?: boolean;
1349
1422
  /**
1350
- * whether this vapor component has multiple root nodes
1351
- */
1423
+ * whether this vapor component has multiple root nodes
1424
+ */
1352
1425
  __multiRoot?: boolean;
1353
1426
  /**
1354
- * indicates keep-alive component
1355
- */
1427
+ * indicates keep-alive component
1428
+ */
1356
1429
  __isKeepAlive?: boolean;
1357
1430
  /**
1358
- * @internal
1359
- */
1431
+ * @internal
1432
+ */
1360
1433
  __scopeId?: string;
1361
1434
  /**
1362
- * @internal
1363
- */
1435
+ * @internal
1436
+ */
1364
1437
  __cssModules?: Data;
1365
1438
  /**
1366
- * @internal
1367
- */
1439
+ * @internal
1440
+ */
1368
1441
  __hmrId?: string;
1369
1442
  /**
1370
- * Compat build only, for bailing out of certain compatibility behavior
1371
- */
1443
+ * Compat build only, for bailing out of certain compatibility behavior
1444
+ */
1372
1445
  __isBuiltIn?: boolean;
1373
1446
  /**
1374
- * This one should be exposed so that devtools can make use of it
1375
- */
1447
+ * This one should be exposed so that devtools can make use of it
1448
+ */
1376
1449
  __file?: string;
1377
1450
  /**
1378
- * name inferred from filename
1379
- */
1451
+ * name inferred from filename
1452
+ */
1380
1453
  __name?: string;
1381
1454
  }
1382
1455
  interface AsyncComponentInternalOptions<R = ConcreteComponent, I = ComponentInternalInstance> {
1383
1456
  /**
1384
- * marker for AsyncComponentWrapper
1385
- * @internal
1386
- */
1457
+ * marker for AsyncComponentWrapper
1458
+ * @internal
1459
+ */
1387
1460
  __asyncLoader?: () => Promise<R>;
1388
1461
  /**
1389
- * the inner component resolved by the AsyncComponentWrapper
1390
- * @internal
1391
- */
1462
+ * the inner component resolved by the AsyncComponentWrapper
1463
+ * @internal
1464
+ */
1392
1465
  __asyncResolved?: R;
1393
1466
  /**
1394
- * Exposed for lazy hydration
1395
- * @internal
1396
- */
1467
+ * Exposed for lazy hydration
1468
+ * @internal
1469
+ */
1397
1470
  __asyncHydrate?: (el: Element, instance: I, hydrate: () => void) => void;
1398
1471
  }
1399
1472
  interface FunctionalComponent<P = {}, E extends EmitsOptions | Record<string, any[]> = {}, S extends Record<string, any> = any, EE extends EmitsOptions = ShortEmitsToObject<E>> extends ComponentInternalOptions {
@@ -1406,24 +1479,24 @@ interface FunctionalComponent<P = {}, E extends EmitsOptions | Record<string, an
1406
1479
  compatConfig?: CompatConfig;
1407
1480
  }
1408
1481
  /**
1409
- * Type used where a function accepts both vdom and vapor components.
1410
- */
1482
+ * Type used where a function accepts both vdom and vapor components.
1483
+ */
1411
1484
  type GenericComponent = ({
1412
1485
  name?: string;
1413
1486
  } | ((() => any) & {
1414
1487
  displayName?: string;
1415
1488
  })) & ComponentInternalOptions;
1416
1489
  /**
1417
- * Concrete component type matches its actual value: it's either an options
1418
- * object, or a function. Use this where the code expects to work with actual
1419
- * values, e.g. checking if its a function or not. This is mostly for internal
1420
- * implementation code.
1421
- */
1490
+ * Concrete component type matches its actual value: it's either an options
1491
+ * object, or a function. Use this where the code expects to work with actual
1492
+ * values, e.g. checking if its a function or not. This is mostly for internal
1493
+ * implementation code.
1494
+ */
1422
1495
  type ConcreteComponent<Props = {}, RawBindings = any, D = any, C extends ComputedOptions = ComputedOptions, M extends MethodOptions = MethodOptions, E extends EmitsOptions | Record<string, any[]> = {}, S extends Record<string, any> = any> = ComponentOptions<Props, RawBindings, D, C, M> | FunctionalComponent<Props, E, S>;
1423
1496
  /**
1424
- * A type used in public APIs where a component type is expected.
1425
- * The constructor type is an artificial type returned by defineComponent().
1426
- */
1497
+ * A type used in public APIs where a component type is expected.
1498
+ * The constructor type is an artificial type returned by defineComponent().
1499
+ */
1427
1500
  type Component<PropsOrInstance = any, RawBindings = any, D = any, C extends ComputedOptions = ComputedOptions, M extends MethodOptions = MethodOptions, E extends EmitsOptions | Record<string, any[]> = {}, S extends Record<string, any> = any> = ConcreteComponent<PropsOrInstance, RawBindings, D, C, M, E, S> | ComponentPublicInstanceConstructor<PropsOrInstance>;
1428
1501
  type LifecycleHook<TFn = Function> = (TFn & SchedulerJob)[] | null;
1429
1502
  type SetupContext<E = EmitsOptions, S extends SlotsType = {}> = E extends any ? {
@@ -1433,8 +1506,8 @@ type SetupContext<E = EmitsOptions, S extends SlotsType = {}> = E extends any ?
1433
1506
  expose: <Exposed extends Record<string, any> = Record<string, any>>(exposed?: Exposed) => void;
1434
1507
  } : never;
1435
1508
  /**
1436
- * @internal
1437
- */
1509
+ * @internal
1510
+ */
1438
1511
  type InternalRenderFunction = {
1439
1512
  (ctx: ComponentPublicInstance, cache: ComponentInternalInstance["renderCache"], $props: ComponentInternalInstance["props"], $setup: ComponentInternalInstance["setupState"], $data: ComponentInternalInstance["data"], $options: ComponentInternalInstance["ctx"]): VNodeChild;
1440
1513
  _rc?: boolean;
@@ -1442,10 +1515,10 @@ type InternalRenderFunction = {
1442
1515
  _compatWrapped?: boolean;
1443
1516
  };
1444
1517
  /**
1445
- * Base component instance interface that is shared between vdom mode and vapor
1446
- * mode, so that we can have a mixed instance tree and reuse core logic that
1447
- * operate on both.
1448
- */
1518
+ * Base component instance interface that is shared between vdom mode and vapor
1519
+ * mode, so that we can have a mixed instance tree and reuse core logic that
1520
+ * operate on both.
1521
+ */
1449
1522
  interface GenericComponentInstance {
1450
1523
  vapor?: boolean;
1451
1524
  uid: number;
@@ -1454,197 +1527,197 @@ interface GenericComponentInstance {
1454
1527
  parent: GenericComponentInstance | null;
1455
1528
  appContext: GenericAppContext;
1456
1529
  /**
1457
- * Object containing values this component provides for its descendants
1458
- * @internal
1459
- */
1530
+ * Object containing values this component provides for its descendants
1531
+ * @internal
1532
+ */
1460
1533
  provides: Data;
1461
1534
  /**
1462
- * Tracking reactive effects (e.g. watchers) associated with this component
1463
- * so that they can be automatically stopped on component unmount
1464
- * @internal
1465
- */
1535
+ * Tracking reactive effects (e.g. watchers) associated with this component
1536
+ * so that they can be automatically stopped on component unmount
1537
+ * @internal
1538
+ */
1466
1539
  scope: EffectScope;
1467
1540
  /**
1468
- * render function will have different types between vdom and vapor
1469
- */
1541
+ * render function will have different types between vdom and vapor
1542
+ */
1470
1543
  render?: Function | null;
1471
1544
  /**
1472
- * SSR render function
1473
- * (they are the same between vdom and vapor components.)
1474
- * @internal
1475
- */
1545
+ * SSR render function
1546
+ * (they are the same between vdom and vapor components.)
1547
+ * @internal
1548
+ */
1476
1549
  ssrRender?: Function | null;
1477
1550
  props: Data;
1478
1551
  attrs: Data;
1479
1552
  refs: Data;
1480
1553
  emit: EmitFn;
1481
1554
  /**
1482
- * used for keeping track of .once event handlers on components
1483
- * @internal
1484
- */
1555
+ * used for keeping track of .once event handlers on components
1556
+ * @internal
1557
+ */
1485
1558
  emitted: Record<string, boolean> | null;
1486
1559
  /**
1487
- * used for caching the value returned from props default factory functions to
1488
- * avoid unnecessary watcher trigger
1489
- * @internal
1490
- */
1560
+ * used for caching the value returned from props default factory functions to
1561
+ * avoid unnecessary watcher trigger
1562
+ * @internal
1563
+ */
1491
1564
  propsDefaults: Data | null;
1492
1565
  /**
1493
- * used for getting the keys of a component's raw props, vapor only
1494
- * @internal
1495
- */
1566
+ * used for getting the keys of a component's raw props, vapor only
1567
+ * @internal
1568
+ */
1496
1569
  rawKeys?: () => string[];
1497
1570
  exposed: Record<string, any> | null;
1498
1571
  exposeProxy: Record<string, any> | null;
1499
1572
  /**
1500
- * setup related
1501
- * @internal
1502
- */
1573
+ * setup related
1574
+ * @internal
1575
+ */
1503
1576
  setupState?: Data;
1504
1577
  /**
1505
- * devtools access to additional info
1506
- * @internal
1507
- */
1578
+ * devtools access to additional info
1579
+ * @internal
1580
+ */
1508
1581
  devtoolsRawSetupState?: any;
1509
1582
  isMounted: boolean;
1510
1583
  isUnmounted: boolean;
1511
1584
  isDeactivated: boolean;
1512
1585
  /**
1513
- * for tracking useId()
1514
- * first element is the current boundary prefix
1515
- * second number is the index of the useId call within that boundary
1516
- * @internal
1517
- */
1586
+ * for tracking useId()
1587
+ * first element is the current boundary prefix
1588
+ * second number is the index of the useId call within that boundary
1589
+ * @internal
1590
+ */
1518
1591
  ids: [string, number, number];
1519
1592
  /**
1520
- * resolved props options
1521
- * @internal
1522
- */
1593
+ * resolved props options
1594
+ * @internal
1595
+ */
1523
1596
  propsOptions?: NormalizedPropsOptions;
1524
1597
  /**
1525
- * resolved emits options
1526
- * @internal
1527
- */
1598
+ * resolved emits options
1599
+ * @internal
1600
+ */
1528
1601
  emitsOptions?: ObjectEmitsOptions | null;
1529
1602
  /**
1530
- * Public instance proxy, vdom only
1531
- */
1603
+ * Public instance proxy, vdom only
1604
+ */
1532
1605
  proxy?: any;
1533
1606
  /**
1534
- * suspense related
1535
- * @internal
1536
- */
1607
+ * suspense related
1608
+ * @internal
1609
+ */
1537
1610
  suspense: SuspenseBoundary | null;
1538
1611
  /**
1539
- * suspense pending batch id
1540
- * @internal
1541
- */
1612
+ * suspense pending batch id
1613
+ * @internal
1614
+ */
1542
1615
  suspenseId: number;
1543
1616
  /**
1544
- * @internal
1545
- */
1617
+ * @internal
1618
+ */
1546
1619
  asyncDep: Promise<any> | null;
1547
1620
  /**
1548
- * @internal
1549
- */
1621
+ * @internal
1622
+ */
1550
1623
  asyncResolved: boolean;
1551
1624
  /**
1552
- * `updateTeleportCssVars`
1553
- * For updating css vars on contained teleports
1554
- * @internal
1555
- */
1625
+ * `updateTeleportCssVars`
1626
+ * For updating css vars on contained teleports
1627
+ * @internal
1628
+ */
1556
1629
  ut?: (vars?: Record<string, string>) => void;
1557
1630
  /**
1558
- * dev only. For style v-bind hydration mismatch checks
1559
- * @internal
1560
- */
1631
+ * dev only. For style v-bind hydration mismatch checks
1632
+ * @internal
1633
+ */
1561
1634
  getCssVars?: () => Record<string, string>;
1562
1635
  /**
1563
- * @internal
1564
- */
1636
+ * @internal
1637
+ */
1565
1638
  [LifecycleHooks.BEFORE_CREATE]?: LifecycleHook;
1566
1639
  /**
1567
- * @internal
1568
- */
1640
+ * @internal
1641
+ */
1569
1642
  [LifecycleHooks.CREATED]?: LifecycleHook;
1570
1643
  /**
1571
- * @internal
1572
- */
1644
+ * @internal
1645
+ */
1573
1646
  [LifecycleHooks.BEFORE_MOUNT]?: LifecycleHook;
1574
1647
  /**
1575
- * @internal
1576
- */
1648
+ * @internal
1649
+ */
1577
1650
  [LifecycleHooks.MOUNTED]?: LifecycleHook;
1578
1651
  /**
1579
- * @internal
1580
- */
1652
+ * @internal
1653
+ */
1581
1654
  [LifecycleHooks.BEFORE_UPDATE]?: LifecycleHook;
1582
1655
  /**
1583
- * @internal
1584
- */
1656
+ * @internal
1657
+ */
1585
1658
  [LifecycleHooks.UPDATED]?: LifecycleHook;
1586
1659
  /**
1587
- * @internal
1588
- */
1660
+ * @internal
1661
+ */
1589
1662
  [LifecycleHooks.BEFORE_UNMOUNT]?: LifecycleHook;
1590
1663
  /**
1591
- * @internal
1592
- */
1664
+ * @internal
1665
+ */
1593
1666
  [LifecycleHooks.UNMOUNTED]?: LifecycleHook;
1594
1667
  /**
1595
- * @internal
1596
- */
1668
+ * @internal
1669
+ */
1597
1670
  [LifecycleHooks.RENDER_TRACKED]?: LifecycleHook;
1598
1671
  /**
1599
- * @internal
1600
- */
1672
+ * @internal
1673
+ */
1601
1674
  [LifecycleHooks.RENDER_TRIGGERED]?: LifecycleHook;
1602
1675
  /**
1603
- * @internal
1604
- */
1676
+ * @internal
1677
+ */
1605
1678
  [LifecycleHooks.ACTIVATED]?: LifecycleHook;
1606
1679
  /**
1607
- * @internal
1608
- */
1680
+ * @internal
1681
+ */
1609
1682
  [LifecycleHooks.DEACTIVATED]?: LifecycleHook;
1610
1683
  /**
1611
- * @internal
1612
- */
1684
+ * @internal
1685
+ */
1613
1686
  [LifecycleHooks.ERROR_CAPTURED]?: LifecycleHook;
1614
1687
  /**
1615
- * @internal
1616
- */
1688
+ * @internal
1689
+ */
1617
1690
  [LifecycleHooks.SERVER_PREFETCH]?: LifecycleHook<() => Promise<unknown>>;
1618
1691
  /**
1619
- * @internal vapor only
1620
- */
1692
+ * @internal vapor only
1693
+ */
1621
1694
  hmrRerender?: () => void;
1622
1695
  /**
1623
- * @internal vapor only
1624
- */
1696
+ * @internal vapor only
1697
+ */
1625
1698
  hmrReload?: (newComp: any) => void;
1626
1699
  vnode?: VNode;
1627
1700
  subTree?: VNode;
1628
1701
  /**
1629
- * Custom Element instance (if component is created by defineCustomElement)
1630
- * @internal
1631
- */
1702
+ * Custom Element instance (if component is created by defineCustomElement)
1703
+ * @internal
1704
+ */
1632
1705
  ce?: ComponentCustomElementInterface;
1633
1706
  /**
1634
- * is custom element? (kept only for compatibility)
1635
- * @internal
1636
- */
1707
+ * is custom element? (kept only for compatibility)
1708
+ * @internal
1709
+ */
1637
1710
  isCE?: boolean;
1638
1711
  /**
1639
- * custom element specific HMR method
1640
- * @internal
1641
- */
1712
+ * custom element specific HMR method
1713
+ * @internal
1714
+ */
1642
1715
  ceReload?: (newStyles?: string[]) => void;
1643
1716
  }
1644
1717
  /**
1645
- * We expose a subset of properties on the internal instance as they are
1646
- * useful for advanced external libraries and tools.
1647
- */
1718
+ * We expose a subset of properties on the internal instance as they are
1719
+ * useful for advanced external libraries and tools.
1720
+ */
1648
1721
  interface ComponentInternalInstance extends GenericComponentInstance {
1649
1722
  vapor?: never;
1650
1723
  uid: number;
@@ -1653,84 +1726,84 @@ interface ComponentInternalInstance extends GenericComponentInstance {
1653
1726
  root: GenericComponentInstance;
1654
1727
  appContext: AppContext;
1655
1728
  /**
1656
- * Vnode representing this component in its parent's vdom tree
1657
- */
1729
+ * Vnode representing this component in its parent's vdom tree
1730
+ */
1658
1731
  vnode: VNode;
1659
1732
  /**
1660
- * The pending new vnode from parent updates
1661
- * @internal
1662
- */
1733
+ * The pending new vnode from parent updates
1734
+ * @internal
1735
+ */
1663
1736
  next: VNode | null;
1664
1737
  /**
1665
- * Root vnode of this component's own vdom tree
1666
- */
1738
+ * Root vnode of this component's own vdom tree
1739
+ */
1667
1740
  subTree: VNode;
1668
1741
  /**
1669
- * Render effect instance
1670
- */
1742
+ * Render effect instance
1743
+ */
1671
1744
  effect: ReactiveEffect;
1672
1745
  /**
1673
- * Force update render effect
1674
- */
1746
+ * Force update render effect
1747
+ */
1675
1748
  update: () => void;
1676
1749
  /**
1677
- * Render effect job to be passed to scheduler (checks if dirty)
1678
- */
1750
+ * Render effect job to be passed to scheduler (checks if dirty)
1751
+ */
1679
1752
  job: SchedulerJob;
1680
1753
  /**
1681
- * The render function that returns vdom tree.
1682
- * @internal
1683
- */
1754
+ * The render function that returns vdom tree.
1755
+ * @internal
1756
+ */
1684
1757
  render: InternalRenderFunction | null;
1685
1758
  /**
1686
- * cache for proxy access type to avoid hasOwnProperty calls
1687
- * @internal
1688
- */
1759
+ * cache for proxy access type to avoid hasOwnProperty calls
1760
+ * @internal
1761
+ */
1689
1762
  accessCache: Data | null;
1690
1763
  /**
1691
- * cache for render function values that rely on _ctx but won't need updates
1692
- * after initialized (e.g. inline handlers)
1693
- * @internal
1694
- */
1764
+ * cache for render function values that rely on _ctx but won't need updates
1765
+ * after initialized (e.g. inline handlers)
1766
+ * @internal
1767
+ */
1695
1768
  renderCache: (Function | VNode | undefined)[];
1696
1769
  /**
1697
- * Resolved component registry, only for components with mixins or extends
1698
- * @internal
1699
- */
1770
+ * Resolved component registry, only for components with mixins or extends
1771
+ * @internal
1772
+ */
1700
1773
  components: Record<string, ConcreteComponent> | null;
1701
1774
  /**
1702
- * Resolved directive registry, only for components with mixins or extends
1703
- * @internal
1704
- */
1775
+ * Resolved directive registry, only for components with mixins or extends
1776
+ * @internal
1777
+ */
1705
1778
  directives: Record<string, Directive> | null;
1706
1779
  /**
1707
- * Resolved filters registry, v2 compat only
1708
- * @internal
1709
- */
1780
+ * Resolved filters registry, v2 compat only
1781
+ * @internal
1782
+ */
1710
1783
  filters?: Record<string, Function>;
1711
1784
  /**
1712
- * resolved props options
1713
- * @internal
1714
- */
1785
+ * resolved props options
1786
+ * @internal
1787
+ */
1715
1788
  propsOptions: NormalizedPropsOptions;
1716
1789
  /**
1717
- * resolved emits options
1718
- * @internal
1719
- */
1790
+ * resolved emits options
1791
+ * @internal
1792
+ */
1720
1793
  emitsOptions: ObjectEmitsOptions | null;
1721
1794
  /**
1722
- * resolved inheritAttrs options
1723
- * @internal
1724
- */
1795
+ * resolved inheritAttrs options
1796
+ * @internal
1797
+ */
1725
1798
  inheritAttrs?: boolean;
1726
1799
  /**
1727
- * setup related
1728
- * @internal
1729
- */
1800
+ * setup related
1801
+ * @internal
1802
+ */
1730
1803
  setupState: Data;
1731
1804
  /**
1732
- * @internal
1733
- */
1805
+ * @internal
1806
+ */
1734
1807
  setupContext?: SetupContext | null;
1735
1808
  proxy: ComponentPublicInstance | null;
1736
1809
  data: Data;
@@ -1738,79 +1811,79 @@ interface ComponentInternalInstance extends GenericComponentInstance {
1738
1811
  slots: InternalSlots;
1739
1812
  exposeProxy: Record<string, any> | null;
1740
1813
  /**
1741
- * alternative proxy used only for runtime-compiled render functions using
1742
- * `with` block
1743
- * @internal
1744
- */
1814
+ * alternative proxy used only for runtime-compiled render functions using
1815
+ * `with` block
1816
+ * @internal
1817
+ */
1745
1818
  withProxy: ComponentPublicInstance | null;
1746
1819
  /**
1747
- * This is the target for the public instance proxy. It also holds properties
1748
- * injected by user options (computed, methods etc.) and user-attached
1749
- * custom properties (via `this.x = ...`)
1750
- * @internal
1751
- */
1820
+ * This is the target for the public instance proxy. It also holds properties
1821
+ * injected by user options (computed, methods etc.) and user-attached
1822
+ * custom properties (via `this.x = ...`)
1823
+ * @internal
1824
+ */
1752
1825
  ctx: Data;
1753
1826
  /**
1754
- * suspense pending batch id
1755
- * @internal
1756
- */
1827
+ * suspense pending batch id
1828
+ * @internal
1829
+ */
1757
1830
  suspenseId: number;
1758
1831
  /**
1759
- * @internal
1760
- */
1832
+ * @internal
1833
+ */
1761
1834
  asyncDep: Promise<any> | null;
1762
1835
  /**
1763
- * @internal
1764
- */
1836
+ * @internal
1837
+ */
1765
1838
  asyncResolved: boolean;
1766
1839
  /**
1767
- * For caching bound $forceUpdate on public proxy access
1768
- * @internal
1769
- */
1840
+ * For caching bound $forceUpdate on public proxy access
1841
+ * @internal
1842
+ */
1770
1843
  f?: () => void;
1771
1844
  /**
1772
- * For caching bound $nextTick on public proxy access
1773
- * @internal
1774
- */
1845
+ * For caching bound $nextTick on public proxy access
1846
+ * @internal
1847
+ */
1775
1848
  n?: () => Promise<void>;
1776
1849
  /**
1777
- * v2 compat only, for caching mutated $options
1778
- * @internal
1779
- */
1850
+ * v2 compat only, for caching mutated $options
1851
+ * @internal
1852
+ */
1780
1853
  resolvedOptions?: MergedComponentOptions;
1781
1854
  }
1782
1855
  interface ComponentCustomElementInterface {
1783
1856
  /**
1784
- * @internal
1785
- */
1857
+ * @internal
1858
+ */
1786
1859
  _isVueCE: boolean;
1787
1860
  /**
1788
- * @internal
1789
- */
1861
+ * @internal
1862
+ */
1790
1863
  _injectChildStyle(type: ConcreteComponent, parent?: ConcreteComponent): void;
1791
1864
  /**
1792
- * @internal
1793
- */
1865
+ * @internal
1866
+ */
1794
1867
  _removeChildStyle(type: ConcreteComponent): void;
1795
1868
  /**
1796
- * @internal
1797
- */
1869
+ * @internal
1870
+ */
1798
1871
  _setProp(key: string, val: any, shouldReflect?: boolean, shouldUpdate?: boolean): void;
1799
1872
  /**
1800
- * @internal
1801
- */
1873
+ * @internal
1874
+ */
1802
1875
  _beginPatch(): void;
1803
1876
  /**
1804
- * @internal
1805
- */
1877
+ * @internal
1878
+ */
1806
1879
  _endPatch(): void;
1807
1880
  /**
1808
- * @internal attached by the nested Teleport when shadowRoot is false.
1809
- */
1881
+ * @internal attached by the nested Teleport when shadowRoot is false.
1882
+ */
1810
1883
  _teleportTargets?: Set<RendererElement>;
1811
1884
  /**
1812
- * @internal check if shadow root is enabled
1813
- */
1885
+ * @internal check if shadow root is enabled
1886
+ */
1814
1887
  _hasShadowRoot(): boolean;
1815
1888
  }
1816
1889
  //#endregion
@@ -1827,28 +1900,28 @@ interface WatchOptions<Immediate = boolean> extends WatchEffectOptions {
1827
1900
  //#region packages/runtime-core/src/compat/globalConfig.d.ts
1828
1901
  type LegacyConfig = {
1829
1902
  /**
1830
- * @deprecated `config.silent` option has been removed
1831
- */
1903
+ * @deprecated `config.silent` option has been removed
1904
+ */
1832
1905
  silent?: boolean;
1833
1906
  /**
1834
- * @deprecated use __VUE_PROD_DEVTOOLS__ compile-time feature flag instead
1835
- * https://github.com/vuejs/core/tree/main/packages/vue#bundler-build-feature-flags
1836
- */
1907
+ * @deprecated use __VUE_PROD_DEVTOOLS__ compile-time feature flag instead
1908
+ * https://github.com/vuejs/core/tree/main/packages/vue#bundler-build-feature-flags
1909
+ */
1837
1910
  devtools?: boolean;
1838
1911
  /**
1839
- * @deprecated use `config.isCustomElement` instead
1840
- * https://v3-migration.vuejs.org/breaking-changes/global-api.html#config-ignoredelements-is-now-config-iscustomelement
1841
- */
1912
+ * @deprecated use `config.isCustomElement` instead
1913
+ * https://v3-migration.vuejs.org/breaking-changes/global-api.html#config-ignoredelements-is-now-config-iscustomelement
1914
+ */
1842
1915
  ignoredElements?: (string | RegExp)[];
1843
1916
  /**
1844
- * @deprecated
1845
- * https://v3-migration.vuejs.org/breaking-changes/keycode-modifiers.html
1846
- */
1917
+ * @deprecated
1918
+ * https://v3-migration.vuejs.org/breaking-changes/keycode-modifiers.html
1919
+ */
1847
1920
  keyCodes?: Record<string, number | number[]>;
1848
1921
  /**
1849
- * @deprecated
1850
- * https://v3-migration.vuejs.org/breaking-changes/global-api.html#config-productiontip-removed
1851
- */
1922
+ * @deprecated
1923
+ * https://v3-migration.vuejs.org/breaking-changes/global-api.html#config-productiontip-removed
1924
+ */
1852
1925
  productionTip?: boolean;
1853
1926
  };
1854
1927
  //#endregion
@@ -1869,10 +1942,10 @@ interface LegacyPublicProperties {
1869
1942
  //#endregion
1870
1943
  //#region packages/runtime-core/src/compat/global.d.ts
1871
1944
  /**
1872
- * @deprecated the default `Vue` export has been removed in Vue 3. The type for
1873
- * the default export is provided only for migration purposes. Please use
1874
- * named imports instead - e.g. `import { createApp } from 'vue'`.
1875
- */
1945
+ * @deprecated the default `Vue` export has been removed in Vue 3. The type for
1946
+ * the default export is provided only for migration purposes. Please use
1947
+ * named imports instead - e.g. `import { createApp } from 'vue'`.
1948
+ */
1876
1949
  type CompatVue = Pick<App, "version" | "component" | "directive"> & {
1877
1950
  configureCompat: typeof configureCompat;
1878
1951
  new (options?: ComponentOptions): LegacyPublicInstance;
@@ -1888,40 +1961,40 @@ type CompatVue = Pick<App, "version" | "component" | "directive"> & {
1888
1961
  directive<T = any, V = any>(name: string, directive: Directive<T, V>): CompatVue;
1889
1962
  compile(template: string): RenderFunction;
1890
1963
  /**
1891
- * @deprecated Vue 3 no longer supports extending constructors.
1892
- */
1964
+ * @deprecated Vue 3 no longer supports extending constructors.
1965
+ */
1893
1966
  extend: (options?: ComponentOptions) => CompatVue;
1894
1967
  /**
1895
- * @deprecated Vue 3 no longer needs set() for adding new properties.
1896
- */
1968
+ * @deprecated Vue 3 no longer needs set() for adding new properties.
1969
+ */
1897
1970
  set(target: any, key: PropertyKey, value: any): void;
1898
1971
  /**
1899
- * @deprecated Vue 3 no longer needs delete() for property deletions.
1900
- */
1972
+ * @deprecated Vue 3 no longer needs delete() for property deletions.
1973
+ */
1901
1974
  delete(target: any, key: PropertyKey): void;
1902
1975
  /**
1903
- * @deprecated use `reactive` instead.
1904
- */
1976
+ * @deprecated use `reactive` instead.
1977
+ */
1905
1978
  observable: typeof reactive;
1906
1979
  /**
1907
- * @deprecated filters have been removed from Vue 3.
1908
- */
1980
+ * @deprecated filters have been removed from Vue 3.
1981
+ */
1909
1982
  filter(name: string, arg?: any): null;
1910
1983
  /**
1911
- * @internal
1912
- */
1984
+ * @internal
1985
+ */
1913
1986
  cid: number;
1914
1987
  /**
1915
- * @internal
1916
- */
1988
+ * @internal
1989
+ */
1917
1990
  options: ComponentOptions;
1918
1991
  /**
1919
- * @internal
1920
- */
1992
+ * @internal
1993
+ */
1921
1994
  util: any;
1922
1995
  /**
1923
- * @internal
1924
- */
1996
+ * @internal
1997
+ */
1925
1998
  super: CompatVue;
1926
1999
  };
1927
2000
  //#endregion
@@ -1980,21 +2053,17 @@ type SystemModifiers = (typeof systemModifiers)[number];
1980
2053
  type CompatModifiers = keyof typeof keyNames;
1981
2054
  type VOnModifiers = SystemModifiers | ModifierGuards | CompatModifiers;
1982
2055
  type ModifierGuards = "shift" | "ctrl" | "alt" | "meta" | "left" | "right" | "stop" | "prevent" | "self" | "middle" | "exact";
1983
- /**
1984
- * @private
1985
- */
1986
2056
  declare const keyNames: Record<"esc" | "space" | "up" | "left" | "right" | "down" | "delete", string>;
1987
- /**
1988
- * @private
1989
- */
1990
2057
  type VOnDirective = Directive<any, any, VOnModifiers>;
1991
2058
  //#endregion
1992
2059
  //#region packages/runtime-dom/src/directives/vModel.d.ts
1993
2060
  type AssignerFn = (value: any) => void;
1994
2061
  declare const assignKey: unique symbol;
2062
+ declare const initialValueKey: unique symbol;
1995
2063
  type ModelDirective<T, Modifiers extends string = string> = ObjectDirective<T & {
1996
2064
  [assignKey]: AssignerFn;
1997
- _assigning?: boolean;
2065
+ [initialValueKey]?: string;
2066
+ _pendingValue?: [multiple: boolean, value: any];
1998
2067
  }, any, Modifiers>;
1999
2068
  declare const vModelText: ModelDirective<HTMLInputElement | HTMLTextAreaElement, "trim" | "number" | "lazy">;
2000
2069
  declare const vModelCheckbox: ModelDirective<HTMLInputElement>;
@@ -22177,13 +22246,13 @@ declare namespace DataType {
22177
22246
  //#region packages/runtime-dom/src/jsx.d.ts
22178
22247
  interface CSSProperties extends Properties<string | number>, PropertiesHyphen<string | number> {
22179
22248
  /**
22180
- * The index signature was removed to enable closed typing for style
22181
- * using CSSType. You're able to use type assertion or module augmentation
22182
- * to add properties or an index signature of your own.
22183
- *
22184
- * For examples and more information, visit:
22185
- * https://github.com/frenic/csstype#what-should-i-do-when-i-get-type-errors
22186
- */
22249
+ * The index signature was removed to enable closed typing for style
22250
+ * using CSSType. You're able to use type assertion or module augmentation
22251
+ * to add properties or an index signature of your own.
22252
+ *
22253
+ * For examples and more information, visit:
22254
+ * https://github.com/frenic/csstype#what-should-i-do-when-i-get-type-errors
22255
+ */
22187
22256
  [v: `--${string}`]: string | number | undefined;
22188
22257
  }
22189
22258
  type StyleValue = false | null | undefined | string | CSSProperties | Array<StyleValue>;
@@ -22191,10 +22260,10 @@ type ClassValue = false | null | undefined | string | Record<string, any> | Arra
22191
22260
  //#endregion
22192
22261
  //#region packages/runtime-dom/src/index.d.ts
22193
22262
  /**
22194
- * This is a stub implementation to prevent the need to use dom types.
22195
- *
22196
- * To enable proper types, add `"dom"` to `"lib"` in your `tsconfig.json`.
22197
- */
22263
+ * This is a stub implementation to prevent the need to use dom types.
22264
+ *
22265
+ * To enable proper types, add `"dom"` to `"lib"` in your `tsconfig.json`.
22266
+ */
22198
22267
  type DomType<T> = typeof globalThis extends {
22199
22268
  window: unknown;
22200
22269
  } ? T : never;