@volverjs/form-vue 0.0.10-beta.3 → 0.0.10-beta.5

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 { type InjectionKey, type Ref } from 'vue';
2
- import type { AnyZodObject, ZodEffects } from 'zod';
1
+ import { type InjectionKey, type Ref, type DeepReadonly } from 'vue';
2
+ import type { AnyZodObject, TypeOf, ZodEffects, z } from 'zod';
3
3
  import type { InjectedFormData, InjectedFormWrapperData } from './types';
4
4
  export declare const defineFormWrapper: <Schema extends AnyZodObject | ZodEffects<AnyZodObject, {
5
5
  [x: string]: any;
@@ -13,7 +13,105 @@ export declare const defineFormWrapper: <Schema extends AnyZodObject | ZodEffect
13
13
  [x: string]: any;
14
14
  }, {
15
15
  [x: string]: any;
16
- }>>(formProvideKey: InjectionKey<InjectedFormData<Schema>>, wrapperProvideKey: InjectionKey<InjectedFormWrapperData<Schema>>) => import("vue").DefineComponent<{
16
+ }>>(formProvideKey: InjectionKey<InjectedFormData<Schema>>, wrapperProvideKey: InjectionKey<InjectedFormWrapperData<Schema>>) => {
17
+ new (...args: any[]): {
18
+ $: import("vue").ComponentInternalInstance;
19
+ $data: {};
20
+ $props: Partial<{
21
+ tag: string;
22
+ }> & Omit<Readonly<import("vue").ExtractPropTypes<{
23
+ name: {
24
+ type: StringConstructor;
25
+ required: true;
26
+ };
27
+ tag: {
28
+ type: StringConstructor;
29
+ default: undefined;
30
+ };
31
+ }>> & {
32
+ onValid?: ((...args: any[]) => any) | undefined;
33
+ onInvalid?: ((...args: any[]) => any) | undefined;
34
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "tag">;
35
+ $attrs: {
36
+ [x: string]: unknown;
37
+ };
38
+ $refs: {
39
+ [x: string]: unknown;
40
+ };
41
+ $slots: Readonly<{
42
+ [name: string]: import("vue").Slot | undefined;
43
+ }>;
44
+ $root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null;
45
+ $parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null;
46
+ $emit: (event: "valid" | "invalid", ...args: any[]) => void;
47
+ $el: any;
48
+ $options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
49
+ name: {
50
+ type: StringConstructor;
51
+ required: true;
52
+ };
53
+ tag: {
54
+ type: StringConstructor;
55
+ default: undefined;
56
+ };
57
+ }>> & {
58
+ onValid?: ((...args: any[]) => any) | undefined;
59
+ onInvalid?: ((...args: any[]) => any) | undefined;
60
+ }, {
61
+ formData: Ref<Partial<TypeOf<Schema>> | undefined> | undefined;
62
+ errors: Readonly<Ref<DeepReadonly<z.inferFormattedError<Schema_1, string>>>> | undefined;
63
+ invalid: import("vue").ComputedRef<boolean>;
64
+ fields: Ref<Set<string>>;
65
+ fieldsErrors: Ref<Map<string, Record<string, {
66
+ _errors: string[];
67
+ }>>>;
68
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("valid" | "invalid")[], string, {
69
+ tag: string;
70
+ }, {}, string> & {
71
+ beforeCreate?: ((() => void) | (() => void)[]) | undefined;
72
+ created?: ((() => void) | (() => void)[]) | undefined;
73
+ beforeMount?: ((() => void) | (() => void)[]) | undefined;
74
+ mounted?: ((() => void) | (() => void)[]) | undefined;
75
+ beforeUpdate?: ((() => void) | (() => void)[]) | undefined;
76
+ updated?: ((() => void) | (() => void)[]) | undefined;
77
+ activated?: ((() => void) | (() => void)[]) | undefined;
78
+ deactivated?: ((() => void) | (() => void)[]) | undefined;
79
+ beforeDestroy?: ((() => void) | (() => void)[]) | undefined;
80
+ beforeUnmount?: ((() => void) | (() => void)[]) | undefined;
81
+ destroyed?: ((() => void) | (() => void)[]) | undefined;
82
+ unmounted?: ((() => void) | (() => void)[]) | undefined;
83
+ renderTracked?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
84
+ renderTriggered?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
85
+ errorCaptured?: (((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null, info: string) => boolean | void)[]) | undefined;
86
+ };
87
+ $forceUpdate: () => void;
88
+ $nextTick: typeof import("vue").nextTick;
89
+ $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (args_0: R, args_1: R) => any : (...args: any) => any, options?: import("vue").WatchOptions<boolean> | undefined): import("vue").WatchStopHandle;
90
+ } & Readonly<import("vue").ExtractPropTypes<{
91
+ name: {
92
+ type: StringConstructor;
93
+ required: true;
94
+ };
95
+ tag: {
96
+ type: StringConstructor;
97
+ default: undefined;
98
+ };
99
+ }>> & {
100
+ onValid?: ((...args: any[]) => any) | undefined;
101
+ onInvalid?: ((...args: any[]) => any) | undefined;
102
+ } & import("vue").ShallowUnwrapRef<{
103
+ formData: Ref<Partial<TypeOf<Schema>> | undefined> | undefined;
104
+ errors: Readonly<Ref<DeepReadonly<z.inferFormattedError<Schema_1, string>>>> | undefined;
105
+ invalid: import("vue").ComputedRef<boolean>;
106
+ fields: Ref<Set<string>>;
107
+ fieldsErrors: Ref<Map<string, Record<string, {
108
+ _errors: string[];
109
+ }>>>;
110
+ }> & {} & import("vue").ComponentCustomProperties & {};
111
+ __isFragment?: undefined;
112
+ __isTeleport?: undefined;
113
+ __isSuspense?: undefined;
114
+ } & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
17
115
  name: {
18
116
  type: StringConstructor;
19
117
  required: true;
@@ -22,25 +120,28 @@ export declare const defineFormWrapper: <Schema extends AnyZodObject | ZodEffect
22
120
  type: StringConstructor;
23
121
  default: undefined;
24
122
  };
123
+ }>> & {
124
+ onValid?: ((...args: any[]) => any) | undefined;
125
+ onInvalid?: ((...args: any[]) => any) | undefined;
25
126
  }, {
26
- formProvided: InjectedFormData<Schema> | undefined;
127
+ formData: Ref<Partial<TypeOf<Schema>> | undefined> | undefined;
128
+ errors: Readonly<Ref<DeepReadonly<z.inferFormattedError<Schema_1, string>>>> | undefined;
27
129
  invalid: import("vue").ComputedRef<boolean>;
28
130
  fields: Ref<Set<string>>;
29
- errors: Ref<Map<string, Record<string, {
131
+ fieldsErrors: Ref<Map<string, Record<string, {
30
132
  _errors: string[];
31
133
  }>>>;
32
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("valid" | "invalid")[], "valid" | "invalid", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
33
- name: {
34
- type: StringConstructor;
35
- required: true;
36
- };
37
- tag: {
38
- type: StringConstructor;
39
- default: undefined;
40
- };
41
- }>> & {
42
- onValid?: ((...args: any[]) => any) | undefined;
43
- onInvalid?: ((...args: any[]) => any) | undefined;
44
- }, {
134
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("valid" | "invalid")[], "valid" | "invalid", {
45
135
  tag: string;
46
- }>;
136
+ }, {}, string> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
137
+ $slots: {
138
+ default: (_: {
139
+ invalid: boolean;
140
+ formData: unknown extends Partial<TypeOf<Schema>> | undefined ? undefined : Partial<TypeOf<Schema>> | undefined;
141
+ errors: Readonly<Ref<DeepReadonly<z.inferFormattedError<Schema, string>>>>;
142
+ fieldsErrors: Map<string, Record<string, {
143
+ _errors: string[];
144
+ }>>;
145
+ }) => any;
146
+ };
147
+ });
package/dist/index.d.ts CHANGED
@@ -46,7 +46,105 @@ export declare const formFactory: <Schema extends AnyZodObject | ZodEffects<AnyZ
46
46
  modelValue: Record<string, any>;
47
47
  continuosValidation: boolean;
48
48
  }>;
49
- VvFormWrapper: import("vue").DefineComponent<{
49
+ VvFormWrapper: {
50
+ new (...args: any[]): {
51
+ $: import("vue").ComponentInternalInstance;
52
+ $data: {};
53
+ $props: Partial<{
54
+ tag: string;
55
+ }> & Omit<Readonly<import("vue").ExtractPropTypes<{
56
+ name: {
57
+ type: StringConstructor;
58
+ required: true;
59
+ };
60
+ tag: {
61
+ type: StringConstructor;
62
+ default: undefined;
63
+ };
64
+ }>> & {
65
+ onValid?: ((...args: any[]) => any) | undefined;
66
+ onInvalid?: ((...args: any[]) => any) | undefined;
67
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "tag">;
68
+ $attrs: {
69
+ [x: string]: unknown;
70
+ };
71
+ $refs: {
72
+ [x: string]: unknown;
73
+ };
74
+ $slots: Readonly<{
75
+ [name: string]: import("vue").Slot | undefined;
76
+ }>;
77
+ $root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null;
78
+ $parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null;
79
+ $emit: (event: "valid" | "invalid", ...args: any[]) => void;
80
+ $el: any;
81
+ $options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
82
+ name: {
83
+ type: StringConstructor;
84
+ required: true;
85
+ };
86
+ tag: {
87
+ type: StringConstructor;
88
+ default: undefined;
89
+ };
90
+ }>> & {
91
+ onValid?: ((...args: any[]) => any) | undefined;
92
+ onInvalid?: ((...args: any[]) => any) | undefined;
93
+ }, {
94
+ formData: import("vue").Ref<Partial<import("zod").TypeOf<Schema>> | undefined> | undefined;
95
+ errors: Readonly<import("vue").Ref<DeepReadonly<import("zod").inferFormattedError<Schema_1, string>>>> | undefined;
96
+ invalid: import("vue").ComputedRef<boolean>;
97
+ fields: import("vue").Ref<Set<string>>;
98
+ fieldsErrors: import("vue").Ref<Map<string, Record<string, {
99
+ _errors: string[];
100
+ }>>>;
101
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("valid" | "invalid")[], string, {
102
+ tag: string;
103
+ }, {}, string> & {
104
+ beforeCreate?: ((() => void) | (() => void)[]) | undefined;
105
+ created?: ((() => void) | (() => void)[]) | undefined;
106
+ beforeMount?: ((() => void) | (() => void)[]) | undefined;
107
+ mounted?: ((() => void) | (() => void)[]) | undefined;
108
+ beforeUpdate?: ((() => void) | (() => void)[]) | undefined;
109
+ updated?: ((() => void) | (() => void)[]) | undefined;
110
+ activated?: ((() => void) | (() => void)[]) | undefined;
111
+ deactivated?: ((() => void) | (() => void)[]) | undefined;
112
+ beforeDestroy?: ((() => void) | (() => void)[]) | undefined;
113
+ beforeUnmount?: ((() => void) | (() => void)[]) | undefined;
114
+ destroyed?: ((() => void) | (() => void)[]) | undefined;
115
+ unmounted?: ((() => void) | (() => void)[]) | undefined;
116
+ renderTracked?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
117
+ renderTriggered?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
118
+ errorCaptured?: (((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null, info: string) => boolean | void)[]) | undefined;
119
+ };
120
+ $forceUpdate: () => void;
121
+ $nextTick: typeof import("vue").nextTick;
122
+ $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (args_0: R, args_1: R) => any : (...args: any) => any, options?: import("vue").WatchOptions<boolean> | undefined): import("vue").WatchStopHandle;
123
+ } & Readonly<import("vue").ExtractPropTypes<{
124
+ name: {
125
+ type: StringConstructor;
126
+ required: true;
127
+ };
128
+ tag: {
129
+ type: StringConstructor;
130
+ default: undefined;
131
+ };
132
+ }>> & {
133
+ onValid?: ((...args: any[]) => any) | undefined;
134
+ onInvalid?: ((...args: any[]) => any) | undefined;
135
+ } & import("vue").ShallowUnwrapRef<{
136
+ formData: import("vue").Ref<Partial<import("zod").TypeOf<Schema>> | undefined> | undefined;
137
+ errors: Readonly<import("vue").Ref<DeepReadonly<import("zod").inferFormattedError<Schema_1, string>>>> | undefined;
138
+ invalid: import("vue").ComputedRef<boolean>;
139
+ fields: import("vue").Ref<Set<string>>;
140
+ fieldsErrors: import("vue").Ref<Map<string, Record<string, {
141
+ _errors: string[];
142
+ }>>>;
143
+ }> & {} & import("vue").ComponentCustomProperties & {};
144
+ __isFragment?: undefined;
145
+ __isTeleport?: undefined;
146
+ __isSuspense?: undefined;
147
+ } & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
50
148
  name: {
51
149
  type: StringConstructor;
52
150
  required: true;
@@ -55,28 +153,31 @@ export declare const formFactory: <Schema extends AnyZodObject | ZodEffects<AnyZ
55
153
  type: StringConstructor;
56
154
  default: undefined;
57
155
  };
156
+ }>> & {
157
+ onValid?: ((...args: any[]) => any) | undefined;
158
+ onInvalid?: ((...args: any[]) => any) | undefined;
58
159
  }, {
59
- formProvided: InjectedFormData<Schema> | undefined;
160
+ formData: import("vue").Ref<Partial<import("zod").TypeOf<Schema>> | undefined> | undefined;
161
+ errors: Readonly<import("vue").Ref<DeepReadonly<import("zod").inferFormattedError<Schema_1, string>>>> | undefined;
60
162
  invalid: import("vue").ComputedRef<boolean>;
61
163
  fields: import("vue").Ref<Set<string>>;
62
- errors: import("vue").Ref<Map<string, Record<string, {
164
+ fieldsErrors: import("vue").Ref<Map<string, Record<string, {
63
165
  _errors: string[];
64
166
  }>>>;
65
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("valid" | "invalid")[], "valid" | "invalid", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
66
- name: {
67
- type: StringConstructor;
68
- required: true;
69
- };
70
- tag: {
71
- type: StringConstructor;
72
- default: undefined;
73
- };
74
- }>> & {
75
- onValid?: ((...args: any[]) => any) | undefined;
76
- onInvalid?: ((...args: any[]) => any) | undefined;
77
- }, {
167
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("valid" | "invalid")[], "valid" | "invalid", {
78
168
  tag: string;
79
- }>;
169
+ }, {}, string> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
170
+ $slots: {
171
+ default: (_: {
172
+ invalid: boolean;
173
+ formData: unknown extends Partial<import("zod").TypeOf<Schema>> | undefined ? undefined : Partial<import("zod").TypeOf<Schema>> | undefined;
174
+ errors: Readonly<import("vue").Ref<import("vue").DeepReadonly<import("zod").inferFormattedError<Schema, string>>>>;
175
+ fieldsErrors: Map<string, Record<string, {
176
+ _errors: string[];
177
+ }>>;
178
+ }) => any;
179
+ };
180
+ });
80
181
  VvFormField: import("vue").DefineComponent<{
81
182
  type: {
82
183
  type: import("vue").PropType<"number" | "text" | "email" | "password" | "tel" | "url" | "search" | "date" | "time" | "datetimeLocal" | "month" | "week" | "color" | "select" | "checkbox" | "radio" | "textarea" | "radioGroup" | "checkboxGroup" | "combobox" | "custom">;
@@ -207,7 +308,105 @@ export declare const useForm: <Schema extends AnyZodObject | ZodEffects<AnyZodOb
207
308
  modelValue: Record<string, any>;
208
309
  continuosValidation: boolean;
209
310
  }>;
210
- VvFormWrapper: import("vue").DefineComponent<{
311
+ VvFormWrapper: {
312
+ new (...args: any[]): {
313
+ $: import("vue").ComponentInternalInstance;
314
+ $data: {};
315
+ $props: Partial<{
316
+ tag: string;
317
+ }> & Omit<Readonly<import("vue").ExtractPropTypes<{
318
+ name: {
319
+ type: StringConstructor;
320
+ required: true;
321
+ };
322
+ tag: {
323
+ type: StringConstructor;
324
+ default: undefined;
325
+ };
326
+ }>> & {
327
+ onValid?: ((...args: any[]) => any) | undefined;
328
+ onInvalid?: ((...args: any[]) => any) | undefined;
329
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "tag">;
330
+ $attrs: {
331
+ [x: string]: unknown;
332
+ };
333
+ $refs: {
334
+ [x: string]: unknown;
335
+ };
336
+ $slots: Readonly<{
337
+ [name: string]: import("vue").Slot | undefined;
338
+ }>;
339
+ $root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null;
340
+ $parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null;
341
+ $emit: (event: "valid" | "invalid", ...args: any[]) => void;
342
+ $el: any;
343
+ $options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
344
+ name: {
345
+ type: StringConstructor;
346
+ required: true;
347
+ };
348
+ tag: {
349
+ type: StringConstructor;
350
+ default: undefined;
351
+ };
352
+ }>> & {
353
+ onValid?: ((...args: any[]) => any) | undefined;
354
+ onInvalid?: ((...args: any[]) => any) | undefined;
355
+ }, {
356
+ formData: import("vue").Ref<Partial<import("zod").TypeOf<Schema>> | undefined> | undefined;
357
+ errors: Readonly<import("vue").Ref<DeepReadonly<import("zod").inferFormattedError<Schema_1, string>>>> | undefined;
358
+ invalid: import("vue").ComputedRef<boolean>;
359
+ fields: import("vue").Ref<Set<string>>;
360
+ fieldsErrors: import("vue").Ref<Map<string, Record<string, {
361
+ _errors: string[];
362
+ }>>>;
363
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("valid" | "invalid")[], string, {
364
+ tag: string;
365
+ }, {}, string> & {
366
+ beforeCreate?: ((() => void) | (() => void)[]) | undefined;
367
+ created?: ((() => void) | (() => void)[]) | undefined;
368
+ beforeMount?: ((() => void) | (() => void)[]) | undefined;
369
+ mounted?: ((() => void) | (() => void)[]) | undefined;
370
+ beforeUpdate?: ((() => void) | (() => void)[]) | undefined;
371
+ updated?: ((() => void) | (() => void)[]) | undefined;
372
+ activated?: ((() => void) | (() => void)[]) | undefined;
373
+ deactivated?: ((() => void) | (() => void)[]) | undefined;
374
+ beforeDestroy?: ((() => void) | (() => void)[]) | undefined;
375
+ beforeUnmount?: ((() => void) | (() => void)[]) | undefined;
376
+ destroyed?: ((() => void) | (() => void)[]) | undefined;
377
+ unmounted?: ((() => void) | (() => void)[]) | undefined;
378
+ renderTracked?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
379
+ renderTriggered?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
380
+ errorCaptured?: (((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null, info: string) => boolean | void)[]) | undefined;
381
+ };
382
+ $forceUpdate: () => void;
383
+ $nextTick: typeof import("vue").nextTick;
384
+ $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (args_0: R, args_1: R) => any : (...args: any) => any, options?: import("vue").WatchOptions<boolean> | undefined): import("vue").WatchStopHandle;
385
+ } & Readonly<import("vue").ExtractPropTypes<{
386
+ name: {
387
+ type: StringConstructor;
388
+ required: true;
389
+ };
390
+ tag: {
391
+ type: StringConstructor;
392
+ default: undefined;
393
+ };
394
+ }>> & {
395
+ onValid?: ((...args: any[]) => any) | undefined;
396
+ onInvalid?: ((...args: any[]) => any) | undefined;
397
+ } & import("vue").ShallowUnwrapRef<{
398
+ formData: import("vue").Ref<Partial<import("zod").TypeOf<Schema>> | undefined> | undefined;
399
+ errors: Readonly<import("vue").Ref<DeepReadonly<import("zod").inferFormattedError<Schema_1, string>>>> | undefined;
400
+ invalid: import("vue").ComputedRef<boolean>;
401
+ fields: import("vue").Ref<Set<string>>;
402
+ fieldsErrors: import("vue").Ref<Map<string, Record<string, {
403
+ _errors: string[];
404
+ }>>>;
405
+ }> & {} & import("vue").ComponentCustomProperties & {};
406
+ __isFragment?: undefined;
407
+ __isTeleport?: undefined;
408
+ __isSuspense?: undefined;
409
+ } & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
211
410
  name: {
212
411
  type: StringConstructor;
213
412
  required: true;
@@ -216,28 +415,31 @@ export declare const useForm: <Schema extends AnyZodObject | ZodEffects<AnyZodOb
216
415
  type: StringConstructor;
217
416
  default: undefined;
218
417
  };
418
+ }>> & {
419
+ onValid?: ((...args: any[]) => any) | undefined;
420
+ onInvalid?: ((...args: any[]) => any) | undefined;
219
421
  }, {
220
- formProvided: InjectedFormData<Schema> | undefined;
422
+ formData: import("vue").Ref<Partial<import("zod").TypeOf<Schema>> | undefined> | undefined;
423
+ errors: Readonly<import("vue").Ref<DeepReadonly<import("zod").inferFormattedError<Schema_1, string>>>> | undefined;
221
424
  invalid: import("vue").ComputedRef<boolean>;
222
425
  fields: import("vue").Ref<Set<string>>;
223
- errors: import("vue").Ref<Map<string, Record<string, {
426
+ fieldsErrors: import("vue").Ref<Map<string, Record<string, {
224
427
  _errors: string[];
225
428
  }>>>;
226
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("valid" | "invalid")[], "valid" | "invalid", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
227
- name: {
228
- type: StringConstructor;
229
- required: true;
230
- };
231
- tag: {
232
- type: StringConstructor;
233
- default: undefined;
234
- };
235
- }>> & {
236
- onValid?: ((...args: any[]) => any) | undefined;
237
- onInvalid?: ((...args: any[]) => any) | undefined;
238
- }, {
429
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("valid" | "invalid")[], "valid" | "invalid", {
239
430
  tag: string;
240
- }>;
431
+ }, {}, string> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
432
+ $slots: {
433
+ default: (_: {
434
+ invalid: boolean;
435
+ formData: unknown extends Partial<import("zod").TypeOf<Schema>> | undefined ? undefined : Partial<import("zod").TypeOf<Schema>> | undefined;
436
+ errors: Readonly<import("vue").Ref<import("vue").DeepReadonly<import("zod").inferFormattedError<Schema, string>>>>;
437
+ fieldsErrors: Map<string, Record<string, {
438
+ _errors: string[];
439
+ }>>;
440
+ }) => any;
441
+ };
442
+ });
241
443
  VvFormField: import("vue").DefineComponent<{
242
444
  type: {
243
445
  type: import("vue").PropType<"number" | "text" | "email" | "password" | "tel" | "url" | "search" | "date" | "time" | "datetimeLocal" | "month" | "week" | "color" | "select" | "checkbox" | "radio" | "textarea" | "radioGroup" | "checkboxGroup" | "combobox" | "custom">;