@macrulez/vue-form-schema 0.1.7 → 0.2.0

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.
Files changed (105) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +461 -180
  3. package/dist/MaskEngine-BEXwX4BK.js +144 -0
  4. package/dist/MaskEngine-CPr-fSPy.cjs +1 -0
  5. package/dist/ValidationEngine-BC4U1ef1.js +135 -0
  6. package/dist/ValidationEngine-Diz-qTFs.cjs +1 -0
  7. package/dist/_plugin-vue_export-helper-BHFhmbuH.cjs +1 -0
  8. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
  9. package/dist/core/ConditionEvaluator.d.ts.map +1 -1
  10. package/dist/core/MaskEngine.d.ts.map +1 -1
  11. package/dist/core/ValidationEngine.d.ts +13 -0
  12. package/dist/core/ValidationEngine.d.ts.map +1 -1
  13. package/dist/core/formRegistry.d.ts +33 -0
  14. package/dist/core/formRegistry.d.ts.map +1 -0
  15. package/dist/core/inferTypes.d.ts.map +1 -1
  16. package/dist/core/schemaUtils.d.ts +38 -0
  17. package/dist/core/schemaUtils.d.ts.map +1 -1
  18. package/dist/core/serverErrors.d.ts +69 -0
  19. package/dist/core/serverErrors.d.ts.map +1 -0
  20. package/dist/core/types.d.ts +22 -2
  21. package/dist/core/types.d.ts.map +1 -1
  22. package/dist/core/useForm.d.ts +4 -1
  23. package/dist/core/useForm.d.ts.map +1 -1
  24. package/dist/core/useMultiStepForm.d.ts.map +1 -1
  25. package/dist/devtools/index.d.ts +26 -0
  26. package/dist/devtools/index.d.ts.map +1 -0
  27. package/dist/devtools.cjs +1 -0
  28. package/dist/devtools.d.ts +6 -0
  29. package/dist/devtools.js +93 -0
  30. package/dist/formRegistry-Bv1eaWQ-.js +31 -0
  31. package/dist/formRegistry-DaDmXyYY.cjs +1 -0
  32. package/dist/index.cjs +1 -1
  33. package/dist/index.d.ts +5 -3
  34. package/dist/index.d.ts.map +1 -1
  35. package/dist/index.js +392 -359
  36. package/dist/openapi.cjs +1 -0
  37. package/dist/openapi.d.ts +202 -0
  38. package/dist/openapi.js +118 -0
  39. package/dist/parsers/json.d.ts.map +1 -1
  40. package/dist/parsers/openapi.d.ts +139 -0
  41. package/dist/parsers/openapi.d.ts.map +1 -0
  42. package/dist/parsers/valibot.d.ts +13 -4
  43. package/dist/parsers/valibot.d.ts.map +1 -1
  44. package/dist/parsers/yup.d.ts +10 -4
  45. package/dist/parsers/yup.d.ts.map +1 -1
  46. package/dist/parsers/zod.d.ts +18 -4
  47. package/dist/parsers/zod.d.ts.map +1 -1
  48. package/dist/schemaUtils-Cc7CwGXB.cjs +1 -0
  49. package/dist/schemaUtils-Cvlsk24U.js +337 -0
  50. package/dist/style.css +1 -0
  51. package/dist/ui/index.d.ts +1 -0
  52. package/dist/ui/index.d.ts.map +1 -1
  53. package/dist/ui/naive/index.d.ts +11 -0
  54. package/dist/ui/naive/index.d.ts.map +1 -0
  55. package/dist/ui/primevue/index.d.ts +11 -0
  56. package/dist/ui/primevue/index.d.ts.map +1 -0
  57. package/dist/ui/shadcn/index.d.ts +11 -0
  58. package/dist/ui/shadcn/index.d.ts.map +1 -0
  59. package/dist/ui/tailwind/index.d.ts +11 -0
  60. package/dist/ui/tailwind/index.d.ts.map +1 -0
  61. package/dist/ui-naive.cjs +1 -0
  62. package/dist/ui-naive.d.ts +411 -0
  63. package/dist/ui-naive.js +667 -0
  64. package/dist/ui-primevue.cjs +1 -0
  65. package/dist/ui-primevue.d.ts +411 -0
  66. package/dist/ui-primevue.js +651 -0
  67. package/dist/ui-shadcn.cjs +1 -0
  68. package/dist/ui-shadcn.d.ts +411 -0
  69. package/dist/ui-shadcn.js +650 -0
  70. package/dist/ui-tailwind.cjs +1 -0
  71. package/dist/ui-tailwind.d.ts +411 -0
  72. package/dist/ui-tailwind.js +669 -0
  73. package/dist/ui.cjs +1 -1
  74. package/dist/ui.d.ts +61 -10
  75. package/dist/ui.js +434 -299
  76. package/dist/valibot.cjs +1 -1
  77. package/dist/valibot.d.ts +35 -4
  78. package/dist/valibot.js +47 -20
  79. package/dist/yup.cjs +1 -1
  80. package/dist/yup.d.ts +33 -5
  81. package/dist/yup.js +16 -15
  82. package/dist/zod.cjs +1 -1
  83. package/dist/zod.d.ts +41 -5
  84. package/dist/zod.js +58 -28
  85. package/package.json +99 -25
  86. package/dist/MaskEngine-BqJQYybS.js +0 -233
  87. package/dist/MaskEngine-BwAs2Zb0.cjs +0 -1
  88. package/dist/__tests__/ConditionEvaluator.test.d.ts +0 -2
  89. package/dist/__tests__/ConditionEvaluator.test.d.ts.map +0 -1
  90. package/dist/__tests__/MaskEngine.test.d.ts +0 -2
  91. package/dist/__tests__/MaskEngine.test.d.ts.map +0 -1
  92. package/dist/__tests__/ValidationEngine.test.d.ts +0 -2
  93. package/dist/__tests__/ValidationEngine.test.d.ts.map +0 -1
  94. package/dist/__tests__/parsers.test.d.ts +0 -2
  95. package/dist/__tests__/parsers.test.d.ts.map +0 -1
  96. package/dist/__tests__/phase3.test.d.ts +0 -2
  97. package/dist/__tests__/phase3.test.d.ts.map +0 -1
  98. package/dist/__tests__/phase4.test.d.ts +0 -2
  99. package/dist/__tests__/phase4.test.d.ts.map +0 -1
  100. package/dist/__tests__/useFieldArray.test.d.ts +0 -2
  101. package/dist/__tests__/useFieldArray.test.d.ts.map +0 -1
  102. package/dist/__tests__/useForm.test.d.ts +0 -2
  103. package/dist/__tests__/useForm.test.d.ts.map +0 -1
  104. package/dist/__tests__/useMultiStepForm.test.d.ts +0 -2
  105. package/dist/__tests__/useMultiStepForm.test.d.ts.map +0 -1
@@ -0,0 +1,411 @@
1
+ import { Component } from 'vue';
2
+ import { ComponentOptionsMixin } from 'vue';
3
+ import { ComponentProvideOptions } from 'vue';
4
+ import { ComputedRef } from 'vue';
5
+ import { DefineComponent } from 'vue';
6
+ import { ExtractPropTypes } from 'vue';
7
+ import { PropType } from 'vue';
8
+ import { PublicProps } from 'vue';
9
+ import { Ref } from 'vue';
10
+
11
+ declare const __VLS_component: DefineComponent<ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
12
+ form: UseFormReturn;
13
+ components?: Partial<Record<FieldDefinition["type"], Component | string>>;
14
+ submitLabel?: string;
15
+ /**
16
+ * Internal: the field list to render. Used by the `group` case to recurse
17
+ * into `field.fields` instead of re-rendering the whole top-level schema
18
+ * (which would recurse into the same group forever). Defaults to the
19
+ * form's top-level fields — not meant to be passed by consumers.
20
+ */
21
+ fields?: FieldDefinition[];
22
+ }>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
23
+ submit: () => void;
24
+ }, string, PublicProps, Readonly<ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
25
+ form: UseFormReturn;
26
+ components?: Partial<Record<FieldDefinition["type"], Component | string>>;
27
+ submitLabel?: string;
28
+ /**
29
+ * Internal: the field list to render. Used by the `group` case to recurse
30
+ * into `field.fields` instead of re-rendering the whole top-level schema
31
+ * (which would recurse into the same group forever). Defaults to the
32
+ * form's top-level fields — not meant to be passed by consumers.
33
+ */
34
+ fields?: FieldDefinition[];
35
+ }>>> & Readonly<{
36
+ onSubmit?: (() => any) | undefined;
37
+ }>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
38
+
39
+ declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
40
+
41
+ declare type __VLS_NonUndefinedable_10<T> = T extends undefined ? never : T;
42
+
43
+ declare type __VLS_NonUndefinedable_2<T> = T extends undefined ? never : T;
44
+
45
+ declare type __VLS_NonUndefinedable_3<T> = T extends undefined ? never : T;
46
+
47
+ declare type __VLS_NonUndefinedable_4<T> = T extends undefined ? never : T;
48
+
49
+ declare type __VLS_NonUndefinedable_5<T> = T extends undefined ? never : T;
50
+
51
+ declare type __VLS_NonUndefinedable_6<T> = T extends undefined ? never : T;
52
+
53
+ declare type __VLS_NonUndefinedable_7<T> = T extends undefined ? never : T;
54
+
55
+ declare type __VLS_NonUndefinedable_8<T> = T extends undefined ? never : T;
56
+
57
+ declare type __VLS_NonUndefinedable_9<T> = T extends undefined ? never : T;
58
+
59
+ declare function __VLS_template(): Partial<Record<`field-${string}`, (_: {
60
+ field: FieldDefinition;
61
+ value: unknown;
62
+ error: string[];
63
+ touched: boolean;
64
+ setValue: (v: unknown) => void;
65
+ touch: () => void;
66
+ }) => any>> & {
67
+ submit?(_: {
68
+ isSubmitting: boolean;
69
+ isValid: boolean;
70
+ }): any;
71
+ };
72
+
73
+ declare type __VLS_TypePropsToRuntimeProps<T> = {
74
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
75
+ type: PropType<__VLS_NonUndefinedable<T[K]>>;
76
+ } : {
77
+ type: PropType<T[K]>;
78
+ required: true;
79
+ };
80
+ };
81
+
82
+ declare type __VLS_TypePropsToRuntimeProps_10<T> = {
83
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
84
+ type: PropType<__VLS_NonUndefinedable_10<T[K]>>;
85
+ } : {
86
+ type: PropType<T[K]>;
87
+ required: true;
88
+ };
89
+ };
90
+
91
+ declare type __VLS_TypePropsToRuntimeProps_2<T> = {
92
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
93
+ type: PropType<__VLS_NonUndefinedable_2<T[K]>>;
94
+ } : {
95
+ type: PropType<T[K]>;
96
+ required: true;
97
+ };
98
+ };
99
+
100
+ declare type __VLS_TypePropsToRuntimeProps_3<T> = {
101
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
102
+ type: PropType<__VLS_NonUndefinedable_3<T[K]>>;
103
+ } : {
104
+ type: PropType<T[K]>;
105
+ required: true;
106
+ };
107
+ };
108
+
109
+ declare type __VLS_TypePropsToRuntimeProps_4<T> = {
110
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
111
+ type: PropType<__VLS_NonUndefinedable_4<T[K]>>;
112
+ } : {
113
+ type: PropType<T[K]>;
114
+ required: true;
115
+ };
116
+ };
117
+
118
+ declare type __VLS_TypePropsToRuntimeProps_5<T> = {
119
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
120
+ type: PropType<__VLS_NonUndefinedable_5<T[K]>>;
121
+ } : {
122
+ type: PropType<T[K]>;
123
+ required: true;
124
+ };
125
+ };
126
+
127
+ declare type __VLS_TypePropsToRuntimeProps_6<T> = {
128
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
129
+ type: PropType<__VLS_NonUndefinedable_6<T[K]>>;
130
+ } : {
131
+ type: PropType<T[K]>;
132
+ required: true;
133
+ };
134
+ };
135
+
136
+ declare type __VLS_TypePropsToRuntimeProps_7<T> = {
137
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
138
+ type: PropType<__VLS_NonUndefinedable_7<T[K]>>;
139
+ } : {
140
+ type: PropType<T[K]>;
141
+ required: true;
142
+ };
143
+ };
144
+
145
+ declare type __VLS_TypePropsToRuntimeProps_8<T> = {
146
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
147
+ type: PropType<__VLS_NonUndefinedable_8<T[K]>>;
148
+ } : {
149
+ type: PropType<T[K]>;
150
+ required: true;
151
+ };
152
+ };
153
+
154
+ declare type __VLS_TypePropsToRuntimeProps_9<T> = {
155
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
156
+ type: PropType<__VLS_NonUndefinedable_9<T[K]>>;
157
+ } : {
158
+ type: PropType<T[K]>;
159
+ required: true;
160
+ };
161
+ };
162
+
163
+ declare type __VLS_WithTemplateSlots<T, S> = T & {
164
+ new (): {
165
+ $slots: S;
166
+ };
167
+ };
168
+
169
+ declare type AsyncValidatorFn = (value: unknown, values: Record<string, unknown>) => Promise<string | null>;
170
+
171
+ declare interface FieldDefinition {
172
+ type: FieldType;
173
+ /** Dot-path for nested fields, e.g. "address.city" */
174
+ name: string;
175
+ label?: string;
176
+ placeholder?: string;
177
+ defaultValue?: unknown | ((values: Record<string, unknown>) => unknown);
178
+ required?: boolean;
179
+ /** Static or dynamic disabled state */
180
+ disabled?: boolean | ((values: Record<string, unknown>) => boolean);
181
+ /** Static or dynamic visibility; string is evaluated as expression */
182
+ visible?: boolean | string | ((values: Record<string, unknown>) => boolean);
183
+ validators?: ValidatorFn[];
184
+ asyncValidators?: AsyncValidatorFn[];
185
+ mask?: string | MaskConfig;
186
+ /** For select / radio — static list, sync function, or async function */
187
+ options?: FieldOption[] | ((values: Record<string, unknown>) => FieldOption[] | Promise<FieldOption[]>);
188
+ /**
189
+ * Field names whose values trigger re-fetching of async options.
190
+ * Only relevant when `options` is an async function.
191
+ */
192
+ optionsDeps?: string[];
193
+ /** Internal: set by useForm when async options are loading. Read-only for consumers. */
194
+ optionsLoading?: boolean;
195
+ /** For group and array */
196
+ fields?: FieldDefinition[];
197
+ /**
198
+ * Applied on every setField call before the value is stored.
199
+ * Use for trimming, type coercion, formatting, etc.
200
+ */
201
+ transform?: (value: unknown, values: Record<string, unknown>) => unknown;
202
+ /**
203
+ * Applied at submit time to produce the final payload value.
204
+ * Runs after all validation passes.
205
+ */
206
+ parse?: (raw: unknown) => unknown;
207
+ /**
208
+ * Custom Vue component to render this field.
209
+ * Receives FormFieldProps and must emit 'update:modelValue' and 'blur'.
210
+ */
211
+ component?: Component | string;
212
+ /** Accepted file types, e.g. "image/*,.pdf" — passed to <input accept> */
213
+ accept?: string;
214
+ /** Allow selecting multiple files */
215
+ multiple?: boolean;
216
+ /** Maximum file size in bytes */
217
+ maxSize?: number;
218
+ /** Maximum number of files (only relevant when multiple=true) */
219
+ maxFiles?: number;
220
+ }
221
+
222
+ declare interface FieldOption {
223
+ label: string;
224
+ value: unknown;
225
+ }
226
+
227
+ declare type FieldType = 'text' | 'number' | 'email' | 'select' | 'checkbox' | 'radio' | 'textarea' | 'date' | 'array' | 'group' | 'file';
228
+
229
+ declare interface MaskConfig {
230
+ preset?: MaskPreset;
231
+ /** Custom mask pattern: '#' = digit, 'A' = letter, other chars are literals */
232
+ pattern?: string;
233
+ }
234
+
235
+ declare type MaskPreset = 'phone-ru' | 'phone-eu' | 'date' | 'inn' | 'iban';
236
+
237
+ export declare const NaiveFormRenderer: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
238
+
239
+ export declare const NuArrayField: DefineComponent<ExtractPropTypes<__VLS_TypePropsToRuntimeProps_10<{
240
+ field: FieldDefinition;
241
+ form: UseFormReturn;
242
+ components?: Partial<Record<FieldDefinition["type"], Component | string>>;
243
+ }>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes<__VLS_TypePropsToRuntimeProps_10<{
244
+ field: FieldDefinition;
245
+ form: UseFormReturn;
246
+ components?: Partial<Record<FieldDefinition["type"], Component | string>>;
247
+ }>>> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
248
+
249
+ export declare const NuCheckboxField: DefineComponent<ExtractPropTypes<__VLS_TypePropsToRuntimeProps_6<{
250
+ field: FieldDefinition;
251
+ modelValue: boolean | null;
252
+ error?: string[];
253
+ touched?: boolean;
254
+ }>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
255
+ blur: () => void;
256
+ "update:modelValue": (value: boolean) => void;
257
+ }, string, PublicProps, Readonly<ExtractPropTypes<__VLS_TypePropsToRuntimeProps_6<{
258
+ field: FieldDefinition;
259
+ modelValue: boolean | null;
260
+ error?: string[];
261
+ touched?: boolean;
262
+ }>>> & Readonly<{
263
+ onBlur?: (() => any) | undefined;
264
+ "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
265
+ }>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
266
+
267
+ export declare const NuDateField: DefineComponent<ExtractPropTypes<__VLS_TypePropsToRuntimeProps_8<{
268
+ field: FieldDefinition;
269
+ modelValue: string | null;
270
+ error?: string[];
271
+ touched?: boolean;
272
+ }>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
273
+ blur: () => void;
274
+ "update:modelValue": (value: string) => void;
275
+ }, string, PublicProps, Readonly<ExtractPropTypes<__VLS_TypePropsToRuntimeProps_8<{
276
+ field: FieldDefinition;
277
+ modelValue: string | null;
278
+ error?: string[];
279
+ touched?: boolean;
280
+ }>>> & Readonly<{
281
+ onBlur?: (() => any) | undefined;
282
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
283
+ }>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
284
+
285
+ export declare const NuFileField: DefineComponent<ExtractPropTypes<__VLS_TypePropsToRuntimeProps_9<{
286
+ field: FieldDefinition;
287
+ modelValue: File | File[] | null;
288
+ error?: string[];
289
+ touched?: boolean;
290
+ }>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
291
+ blur: () => void;
292
+ "update:modelValue": (value: File | File[] | null) => void;
293
+ }, string, PublicProps, Readonly<ExtractPropTypes<__VLS_TypePropsToRuntimeProps_9<{
294
+ field: FieldDefinition;
295
+ modelValue: File | File[] | null;
296
+ error?: string[];
297
+ touched?: boolean;
298
+ }>>> & Readonly<{
299
+ onBlur?: (() => any) | undefined;
300
+ "onUpdate:modelValue"?: ((value: File | File[] | null) => any) | undefined;
301
+ }>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
302
+
303
+ export declare const NuNumberField: DefineComponent<ExtractPropTypes<__VLS_TypePropsToRuntimeProps_3<{
304
+ field: FieldDefinition;
305
+ modelValue: number | null;
306
+ error?: string[];
307
+ touched?: boolean;
308
+ }>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
309
+ blur: () => void;
310
+ "update:modelValue": (value: number | null) => void;
311
+ }, string, PublicProps, Readonly<ExtractPropTypes<__VLS_TypePropsToRuntimeProps_3<{
312
+ field: FieldDefinition;
313
+ modelValue: number | null;
314
+ error?: string[];
315
+ touched?: boolean;
316
+ }>>> & Readonly<{
317
+ onBlur?: (() => any) | undefined;
318
+ "onUpdate:modelValue"?: ((value: number | null) => any) | undefined;
319
+ }>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
320
+
321
+ export declare const NuRadioField: DefineComponent<ExtractPropTypes<__VLS_TypePropsToRuntimeProps_7<{
322
+ field: FieldDefinition;
323
+ modelValue: unknown;
324
+ error?: string[];
325
+ touched?: boolean;
326
+ }>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
327
+ blur: () => void;
328
+ "update:modelValue": (value: unknown) => void;
329
+ }, string, PublicProps, Readonly<ExtractPropTypes<__VLS_TypePropsToRuntimeProps_7<{
330
+ field: FieldDefinition;
331
+ modelValue: unknown;
332
+ error?: string[];
333
+ touched?: boolean;
334
+ }>>> & Readonly<{
335
+ onBlur?: (() => any) | undefined;
336
+ "onUpdate:modelValue"?: ((value: unknown) => any) | undefined;
337
+ }>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
338
+
339
+ export declare const NuSelectField: DefineComponent<ExtractPropTypes<__VLS_TypePropsToRuntimeProps_5<{
340
+ field: FieldDefinition;
341
+ modelValue: unknown;
342
+ error?: string[];
343
+ touched?: boolean;
344
+ }>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
345
+ blur: () => void;
346
+ "update:modelValue": (value: unknown) => void;
347
+ }, string, PublicProps, Readonly<ExtractPropTypes<__VLS_TypePropsToRuntimeProps_5<{
348
+ field: FieldDefinition;
349
+ modelValue: unknown;
350
+ error?: string[];
351
+ touched?: boolean;
352
+ }>>> & Readonly<{
353
+ onBlur?: (() => any) | undefined;
354
+ "onUpdate:modelValue"?: ((value: unknown) => any) | undefined;
355
+ }>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
356
+
357
+ export declare const NuTextareaField: DefineComponent<ExtractPropTypes<__VLS_TypePropsToRuntimeProps_4<{
358
+ field: FieldDefinition;
359
+ modelValue: string | null;
360
+ error?: string[];
361
+ touched?: boolean;
362
+ }>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
363
+ blur: () => void;
364
+ "update:modelValue": (value: string) => void;
365
+ }, string, PublicProps, Readonly<ExtractPropTypes<__VLS_TypePropsToRuntimeProps_4<{
366
+ field: FieldDefinition;
367
+ modelValue: string | null;
368
+ error?: string[];
369
+ touched?: boolean;
370
+ }>>> & Readonly<{
371
+ onBlur?: (() => any) | undefined;
372
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
373
+ }>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
374
+
375
+ export declare const NuTextField: DefineComponent<ExtractPropTypes<__VLS_TypePropsToRuntimeProps_2<{
376
+ field: FieldDefinition;
377
+ modelValue: string | null;
378
+ error?: string[];
379
+ touched?: boolean;
380
+ }>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
381
+ blur: () => void;
382
+ "update:modelValue": (value: string) => void;
383
+ }, string, PublicProps, Readonly<ExtractPropTypes<__VLS_TypePropsToRuntimeProps_2<{
384
+ field: FieldDefinition;
385
+ modelValue: string | null;
386
+ error?: string[];
387
+ touched?: boolean;
388
+ }>>> & Readonly<{
389
+ onBlur?: (() => any) | undefined;
390
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
391
+ }>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
392
+
393
+ declare interface UseFormReturn<T extends Record<string, unknown> = Record<string, unknown>> {
394
+ fields: ComputedRef<FieldDefinition[]>;
395
+ values: Ref<T>;
396
+ errors: Ref<Record<string, string[]>>;
397
+ touched: Ref<Record<string, boolean>>;
398
+ /** Per-field async options loading state */
399
+ optionsLoading: Ref<Record<string, boolean>>;
400
+ isDirty: ComputedRef<boolean>;
401
+ isValid: ComputedRef<boolean>;
402
+ isSubmitting: Ref<boolean>;
403
+ submit(): Promise<void>;
404
+ reset(values?: Partial<T>): void;
405
+ setField(path: string, value: unknown): void;
406
+ getField(path: string): unknown;
407
+ }
408
+
409
+ declare type ValidatorFn = (value: unknown, values: Record<string, unknown>) => string | null;
410
+
411
+ export { }