@cabloy/vue-runtime-core 3.4.31 → 3.4.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
- import { computed as computed$1, ShallowUnwrapRef, UnwrapNestedRefs, DebuggerEvent, ComputedGetter, WritableComputedOptions, Ref, ReactiveEffect, ComputedRef, DebuggerOptions, reactive } from '@vue/reactivity';
2
- export { ComputedGetter, ComputedRef, ComputedSetter, CustomRefFactory, DebuggerEvent, DebuggerEventExtraInfo, DebuggerOptions, DeepReadonly, EffectScheduler, EffectScope, MaybeRef, MaybeRefOrGetter, Raw, ReactiveEffect, ReactiveEffectOptions, ReactiveEffectRunner, ReactiveFlags, Ref, ShallowReactive, ShallowRef, ShallowUnwrapRef, ToRef, ToRefs, TrackOpTypes, TriggerOpTypes, UnwrapNestedRefs, UnwrapRef, WritableComputedOptions, WritableComputedRef, customRef, effect, effectScope, getCurrentScope, isProxy, isReactive, isReadonly, isRef, isShallow, markRaw, onScopeDispose, proxyRefs, reactive, readonly, ref, shallowReactive, shallowReadonly, shallowRef, stop, toRaw, toRef, toRefs, toValue, triggerRef, unref } from '@vue/reactivity';
1
+ import { computed as computed$1, ShallowUnwrapRef, UnwrapNestedRefs, DebuggerEvent, ComputedGetter, WritableComputedOptions, Ref, ReactiveEffect, ComputedRef, DebuggerOptions, ReactiveMarker, reactive } from '@vue/reactivity';
2
+ export { ComputedGetter, ComputedRef, ComputedSetter, CustomRefFactory, DebuggerEvent, DebuggerEventExtraInfo, DebuggerOptions, DeepReadonly, EffectScheduler, EffectScope, MaybeRef, MaybeRefOrGetter, Raw, Reactive, ReactiveEffect, ReactiveEffectOptions, ReactiveEffectRunner, ReactiveFlags, Ref, ShallowReactive, ShallowRef, ShallowUnwrapRef, ToRef, ToRefs, TrackOpTypes, TriggerOpTypes, UnwrapNestedRefs, UnwrapRef, WritableComputedOptions, WritableComputedRef, customRef, effect, effectScope, getCurrentScope, isProxy, isReactive, isReadonly, isRef, isShallow, markRaw, onScopeDispose, proxyRefs, reactive, readonly, ref, shallowReactive, shallowReadonly, shallowRef, stop, toRaw, toRef, toRefs, toValue, triggerRef, unref } from '@vue/reactivity';
3
3
  import { IfAny, Prettify, Awaited, UnionToIntersection, LooseRequired } from '@vue/shared';
4
4
  export { camelize, capitalize, normalizeClass, normalizeProps, normalizeStyle, toDisplayString, toHandlerKey } from '@vue/shared';
5
5
 
@@ -198,7 +198,7 @@ export interface SuspenseBoundary {
198
198
  fallback(fallbackVNode: VNode): void;
199
199
  move(container: RendererElement, anchor: RendererNode | null, type: MoveType): void;
200
200
  next(): RendererNode | null;
201
- registerDep(instance: ComponentInternalInstance, setupRenderEffect: SetupRenderEffectFn): void;
201
+ registerDep(instance: ComponentInternalInstance, setupRenderEffect: SetupRenderEffectFn, optimized: boolean): void;
202
202
  unmount(parentSuspense: SuspenseBoundary | null, doRemove?: boolean): void;
203
203
  }
204
204
  declare function createSuspenseBoundary(vnode: VNode, parentSuspense: SuspenseBoundary | null, parentComponent: ComponentInternalInstance | null, container: RendererElement, hiddenContainer: RendererElement, anchor: RendererNode | null, namespace: ElementNamespace, slotScopeIds: string[] | null, optimized: boolean, rendererInternals: RendererInternals, isHydrating?: boolean): SuspenseBoundary;
@@ -268,7 +268,7 @@ export declare const BaseTransition: new () => {
268
268
  default(): VNode[];
269
269
  };
270
270
  };
271
- export declare function resolveTransitionHooks(vnode: VNode, props: BaseTransitionProps<any>, state: TransitionState, instance: ComponentInternalInstance): TransitionHooks;
271
+ export declare function resolveTransitionHooks(vnode: VNode, props: BaseTransitionProps<any>, state: TransitionState, instance: ComponentInternalInstance, postClone?: (hooks: TransitionHooks) => void): TransitionHooks;
272
272
  export declare function setTransitionHooks(vnode: VNode, hooks: TransitionHooks): void;
273
273
  export declare function getTransitionRawChildren(children: VNode[], keepComment?: boolean, parentKey?: VNode['key']): VNode[];
274
274
 
@@ -488,7 +488,7 @@ return withDirectives(h(comp), [
488
488
  */
489
489
 
490
490
  export interface DirectiveBinding<V = any> {
491
- instance: ComponentPublicInstance | null;
491
+ instance: ComponentPublicInstance | Record<string, any> | null;
492
492
  value: V;
493
493
  oldValue: V | null;
494
494
  arg?: string;
@@ -772,7 +772,7 @@ export interface App<HostElement = any> {
772
772
  directive<T = any, V = any>(name: string, directive: Directive<T, V>): this;
773
773
  mount(rootContainer: HostElement | string, isHydrate?: boolean, namespace?: boolean | ElementNamespace): ComponentPublicInstance;
774
774
  unmount(): void;
775
- provide<T>(key: InjectionKey<T> | string, value: T): this;
775
+ provide<T, K = InjectionKey<T> | string | number>(key: K, value: K extends InjectionKey<infer V> ? V : T): this;
776
776
  /**
777
777
  * Runs a function with the app as active instance. This allows using of `inject()` within the function to get access
778
778
  * to variables provided via `app.provide()`.
@@ -896,7 +896,7 @@ type VNodeNormalizedRef = VNodeNormalizedRefAtom | VNodeNormalizedRefAtom[];
896
896
  type VNodeMountHook = (vnode: VNode) => void;
897
897
  type VNodeUpdateHook = (vnode: VNode, oldVNode: VNode) => void;
898
898
  export type VNodeProps = {
899
- key?: string | number | symbol;
899
+ key?: PropertyKey;
900
900
  ref?: VNodeRef;
901
901
  ref_for?: boolean;
902
902
  ref_key?: string;
@@ -916,7 +916,7 @@ export interface VNode<HostNode = RendererNode, HostElement = RendererElement, E
916
916
  }> {
917
917
  type: VNodeTypes;
918
918
  props: (VNodeProps & ExtraProps) | null;
919
- key: string | number | symbol | null;
919
+ key: PropertyKey | null;
920
920
  ref: VNodeNormalizedRef | null;
921
921
  /**
922
922
  * SFC only. This is assigned on vnode creation using currentScopeId
@@ -1087,7 +1087,7 @@ export type SetupContext<E = EmitsOptions, S extends SlotsType = {}> = E extends
1087
1087
  attrs: Data;
1088
1088
  slots: UnwrapSlotsType<S>;
1089
1089
  emit: EmitFn<E>;
1090
- expose: (exposed?: Record<string, any>) => void;
1090
+ expose: <Exposed extends Record<string, any> = Record<string, any>>(exposed?: Exposed) => void;
1091
1091
  } : never;
1092
1092
  /**
1093
1093
  * We expose a subset of properties on the internal instance as they are
@@ -1142,8 +1142,9 @@ export declare const isRuntimeOnly: () => boolean;
1142
1142
  export type WatchEffect = (onCleanup: OnCleanup) => void;
1143
1143
  export type WatchSource<T = any> = Ref<T> | ComputedRef<T> | (() => T);
1144
1144
  export type WatchCallback<V = any, OV = any> = (value: V, oldValue: OV, onCleanup: OnCleanup) => any;
1145
+ type MaybeUndefined<T, I> = I extends true ? T | undefined : T;
1145
1146
  type MapSources<T, Immediate> = {
1146
- [K in keyof T]: T[K] extends WatchSource<infer V> ? Immediate extends true ? V | undefined : V : T[K] extends object ? Immediate extends true ? T[K] | undefined : T[K] : never;
1147
+ [K in keyof T]: T[K] extends WatchSource<infer V> ? MaybeUndefined<V, Immediate> : T[K] extends object ? MaybeUndefined<T[K], Immediate> : never;
1147
1148
  };
1148
1149
  type OnCleanup = (cleanupFn: () => void) => void;
1149
1150
  export interface WatchOptionsBase extends DebuggerOptions {
@@ -1159,10 +1160,10 @@ export declare function watchEffect(effect: WatchEffect, options?: WatchOptionsB
1159
1160
  export declare function watchPostEffect(effect: WatchEffect, options?: DebuggerOptions): WatchStopHandle;
1160
1161
  export declare function watchSyncEffect(effect: WatchEffect, options?: DebuggerOptions): WatchStopHandle;
1161
1162
  type MultiWatchSources = (WatchSource<unknown> | object)[];
1162
- export declare function watch<T, Immediate extends Readonly<boolean> = false>(source: WatchSource<T>, cb: WatchCallback<T, Immediate extends true ? T | undefined : T>, options?: WatchOptions<Immediate>): WatchStopHandle;
1163
+ export declare function watch<T, Immediate extends Readonly<boolean> = false>(source: WatchSource<T>, cb: WatchCallback<T, MaybeUndefined<T, Immediate>>, options?: WatchOptions<Immediate>): WatchStopHandle;
1164
+ export declare function watch<T extends Readonly<MultiWatchSources>, Immediate extends Readonly<boolean> = false>(sources: readonly [...T] | T, cb: [T] extends [ReactiveMarker] ? WatchCallback<T, MaybeUndefined<T, Immediate>> : WatchCallback<MapSources<T, false>, MapSources<T, Immediate>>, options?: WatchOptions<Immediate>): WatchStopHandle;
1163
1165
  export declare function watch<T extends MultiWatchSources, Immediate extends Readonly<boolean> = false>(sources: [...T], cb: WatchCallback<MapSources<T, false>, MapSources<T, Immediate>>, options?: WatchOptions<Immediate>): WatchStopHandle;
1164
- export declare function watch<T extends Readonly<MultiWatchSources>, Immediate extends Readonly<boolean> = false>(source: T, cb: WatchCallback<MapSources<T, false>, MapSources<T, Immediate>>, options?: WatchOptions<Immediate>): WatchStopHandle;
1165
- export declare function watch<T extends object, Immediate extends Readonly<boolean> = false>(source: T, cb: WatchCallback<T, Immediate extends true ? T | undefined : T>, options?: WatchOptions<Immediate>): WatchStopHandle;
1166
+ export declare function watch<T extends object, Immediate extends Readonly<boolean> = false>(source: T, cb: WatchCallback<T, MaybeUndefined<T, Immediate>>, options?: WatchOptions<Immediate>): WatchStopHandle;
1166
1167
 
1167
1168
  type AsyncComponentResolveResult<T = Component> = T | {
1168
1169
  default: T;
@@ -1237,7 +1238,7 @@ type BooleanKey<T, K extends keyof T = keyof T> = K extends any ? [T[K]] extends
1237
1238
  * const emit = defineEmits<{
1238
1239
  * // <eventName>: <expected arguments>
1239
1240
  * change: []
1240
- * update: [value: string] // named tuple syntax
1241
+ * update: [value: number] // named tuple syntax
1241
1242
  * }>()
1242
1243
  *
1243
1244
  * emit('change')
@@ -1284,7 +1285,7 @@ export declare function defineOptions<RawBindings = {}, D = {}, C extends Comput
1284
1285
  slots?: undefined;
1285
1286
  }): void;
1286
1287
  export declare function defineSlots<S extends Record<string, any> = Record<string, any>>(): StrictUnwrapSlotsType<SlotsType<S>>;
1287
- export type ModelRef<T, M extends string | number | symbol = string> = Ref<T> & [
1288
+ export type ModelRef<T, M extends PropertyKey = string> = Ref<T> & [
1288
1289
  ModelRef<T, M>,
1289
1290
  Record<M, true | undefined>
1290
1291
  ];
@@ -1325,20 +1326,20 @@ type DefineModelOptions<T = any> = {
1325
1326
  * const count = defineModel<number>('count', { default: 0 })
1326
1327
  * ```
1327
1328
  */
1328
- export declare function defineModel<T, M extends string | number | symbol = string>(options: {
1329
+ export declare function defineModel<T, M extends PropertyKey = string>(options: {
1329
1330
  required: true;
1330
1331
  } & PropOptions<T> & DefineModelOptions<T>): ModelRef<T, M>;
1331
- export declare function defineModel<T, M extends string | number | symbol = string>(options: {
1332
+ export declare function defineModel<T, M extends PropertyKey = string>(options: {
1332
1333
  default: any;
1333
1334
  } & PropOptions<T> & DefineModelOptions<T>): ModelRef<T, M>;
1334
- export declare function defineModel<T, M extends string | number | symbol = string>(options?: PropOptions<T> & DefineModelOptions<T>): ModelRef<T | undefined, M>;
1335
- export declare function defineModel<T, M extends string | number | symbol = string>(name: string, options: {
1335
+ export declare function defineModel<T, M extends PropertyKey = string>(options?: PropOptions<T> & DefineModelOptions<T>): ModelRef<T | undefined, M>;
1336
+ export declare function defineModel<T, M extends PropertyKey = string>(name: string, options: {
1336
1337
  required: true;
1337
1338
  } & PropOptions<T> & DefineModelOptions<T>): ModelRef<T, M>;
1338
- export declare function defineModel<T, M extends string | number | symbol = string>(name: string, options: {
1339
+ export declare function defineModel<T, M extends PropertyKey = string>(name: string, options: {
1339
1340
  default: any;
1340
1341
  } & PropOptions<T> & DefineModelOptions<T>): ModelRef<T, M>;
1341
- export declare function defineModel<T, M extends string | number | symbol = string>(name: string, options?: PropOptions<T> & DefineModelOptions<T>): ModelRef<T | undefined, M>;
1342
+ export declare function defineModel<T, M extends PropertyKey = string>(name: string, options?: PropOptions<T> & DefineModelOptions<T>): ModelRef<T | undefined, M>;
1342
1343
  type NotUndefined<T> = T extends undefined ? never : T;
1343
1344
  type MappedOmit<T, K extends keyof any> = {
1344
1345
  [P in keyof T as P extends K ? never : P]: T[P];
@@ -1377,7 +1378,7 @@ export declare function withDefaults<T, BKeys extends keyof T, Defaults extends
1377
1378
  export declare function useSlots(): SetupContext['slots'];
1378
1379
  export declare function useAttrs(): SetupContext['attrs'];
1379
1380
 
1380
- export declare function useModel<M extends string | number | symbol, T extends Record<string, any>, K extends keyof T>(props: T, name: K, options?: DefineModelOptions<T[K]>): ModelRef<T[K], M>;
1381
+ export declare function useModel<M extends PropertyKey, T extends Record<string, any>, K extends keyof T>(props: T, name: K, options?: DefineModelOptions<T[K]>): ModelRef<T[K], M>;
1381
1382
 
1382
1383
  type RawProps = VNodeProps & {
1383
1384
  __v_isVNode?: never;
@@ -1581,8 +1582,8 @@ export type LegacyConfig = {
1581
1582
 
1582
1583
  type LegacyPublicInstance = ComponentPublicInstance & LegacyPublicProperties;
1583
1584
  interface LegacyPublicProperties {
1584
- $set(target: object, key: string, value: any): void;
1585
- $delete(target: object, key: string): void;
1585
+ $set<T extends Record<keyof any, any>, K extends keyof T>(target: T, key: K, value: T[K]): void;
1586
+ $delete<T extends Record<keyof any, any>, K extends keyof T>(target: T, key: K): void;
1586
1587
  $mount(el?: string | Element): this;
1587
1588
  $destroy(): void;
1588
1589
  $scopedSlots: Slots;
@@ -1619,11 +1620,11 @@ export type CompatVue = Pick<App, 'version' | 'component' | 'directive'> & {
1619
1620
  /**
1620
1621
  * @deprecated Vue 3 no longer needs set() for adding new properties.
1621
1622
  */
1622
- set(target: any, key: string | number | symbol, value: any): void;
1623
+ set(target: any, key: PropertyKey, value: any): void;
1623
1624
  /**
1624
1625
  * @deprecated Vue 3 no longer needs delete() for property deletions.
1625
1626
  */
1626
- delete(target: any, key: string | number | symbol): void;
1627
+ delete(target: any, key: PropertyKey): void;
1627
1628
  /**
1628
1629
  * @deprecated use `reactive` instead.
1629
1630
  */