@formisch/vue 0.3.0 → 0.5.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 (3) hide show
  1. package/dist/index.d.ts +678 -34
  2. package/dist/index.js +237 -29
  3. package/package.json +3 -3
package/dist/index.d.ts CHANGED
@@ -1,55 +1,185 @@
1
1
  import * as v from "valibot";
2
- import * as vue11 from "vue";
2
+ import * as vue3 from "vue";
3
3
  import { ComponentPublicInstance, MaybeRefOrGetter, ShallowRef as Signal } from "vue";
4
4
 
5
5
  //#region ../../packages/core/dist/index.vue.d.ts
6
+
6
7
  //#region src/types/schema.d.ts
8
+ /**
9
+ * Schema type.
10
+ */
7
11
  type Schema = v.GenericSchema | v.GenericSchemaAsync;
8
12
  //#endregion
9
13
  //#region src/types/signal.d.ts
14
+ /**
15
+ * Batch interface.
16
+ */
10
17
 
11
18
  //#endregion
12
19
  //#region src/types/field.d.ts
13
20
  /**
14
- * Value type of the field element.
21
+ * Field element type.
15
22
  */
16
23
  type FieldElement = HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement;
24
+ /**
25
+ * Internal base store interface.
26
+ */
17
27
  interface InternalBaseStore {
28
+ /**
29
+ * The kind of field store.
30
+ */
18
31
  kind: "array" | "object" | "value";
32
+ /**
33
+ * The name of the field.
34
+ */
19
35
  name: string;
36
+ /**
37
+ * The schema of the field.
38
+ */
20
39
  schema: Schema;
40
+ /**
41
+ * The initial elements of the field.
42
+ */
21
43
  initialElements: FieldElement[];
44
+ /**
45
+ * The elements of the field.
46
+ */
22
47
  elements: FieldElement[];
48
+ /**
49
+ * The errors of the field.
50
+ */
23
51
  errors: Signal<[string, ...string[]] | null>;
52
+ /**
53
+ * The touched state of the field.
54
+ */
24
55
  isTouched: Signal<boolean>;
56
+ /**
57
+ * The dirty state of the field.
58
+ */
25
59
  isDirty: Signal<boolean>;
26
60
  }
61
+ /**
62
+ * Internal array store interface.
63
+ */
27
64
  interface InternalArrayStore extends InternalBaseStore {
65
+ /**
66
+ * The kind of field store.
67
+ */
28
68
  kind: "array";
69
+ /**
70
+ * The children of the array field.
71
+ */
29
72
  children: InternalFieldStore[];
73
+ /**
74
+ * The initial input of the array field.
75
+ *
76
+ * Hint: The initial input is used for resetting and may only be changed
77
+ * during this process. It does not move when a field is moved.
78
+ */
30
79
  initialInput: Signal<true | null | undefined>;
80
+ /**
81
+ * The start input of the array field.
82
+ *
83
+ * Hint: The start input is used to determine whether the field is dirty
84
+ * and moves with it.
85
+ */
31
86
  startInput: Signal<true | null | undefined>;
87
+ /**
88
+ * The input of the array field.
89
+ *
90
+ * Hint: The input indicates whether it is `null`, `undefined`, or found in
91
+ * the children.
92
+ */
32
93
  input: Signal<true | null | undefined>;
94
+ /**
95
+ * The initial items of the array field.
96
+ *
97
+ * Hint: The initial items are used for resetting and may only be changed
98
+ * during this process. It does not move when a field is moved.
99
+ */
33
100
  initialItems: Signal<string[]>;
101
+ /**
102
+ * The start items of the array field.
103
+ *
104
+ * Hint: The start items are used to determine whether the field is dirty
105
+ * and moves with it.
106
+ */
34
107
  startItems: Signal<string[]>;
108
+ /**
109
+ * The items of the array field.
110
+ */
35
111
  items: Signal<string[]>;
36
112
  }
113
+ /**
114
+ * Internal object store interface.
115
+ */
37
116
  interface InternalObjectStore extends InternalBaseStore {
117
+ /**
118
+ * The kind of field store.
119
+ */
38
120
  kind: "object";
121
+ /**
122
+ * The children of the object field.
123
+ */
39
124
  children: Record<string, InternalFieldStore>;
125
+ /**
126
+ * The initial input of the object field.
127
+ *
128
+ * Hint: The initial input is used for resetting and may only be changed
129
+ * during this process. It does not move when a field is moved.
130
+ */
40
131
  initialInput: Signal<true | null | undefined>;
132
+ /**
133
+ * The start input of the object field.
134
+ *
135
+ * Hint: The start input is used to determine whether the field is dirty
136
+ * and moves with it.
137
+ */
41
138
  startInput: Signal<true | null | undefined>;
139
+ /**
140
+ * The input of the object field.
141
+ *
142
+ * Hint: The input indicates whether it is `null`, `undefined`, or found in
143
+ * the children.
144
+ */
42
145
  input: Signal<true | null | undefined>;
43
146
  }
147
+ /**
148
+ * Internal value store interface.
149
+ */
44
150
  interface InternalValueStore extends InternalBaseStore {
151
+ /**
152
+ * The kind of field store.
153
+ */
45
154
  kind: "value";
155
+ /**
156
+ * The initial input of the value field.
157
+ *
158
+ * Hint: The initial input is used for resetting and may only be changed
159
+ * during this process. It does not move when a field is moved.
160
+ */
46
161
  initialInput: Signal<unknown>;
162
+ /**
163
+ * The start input of the value field.
164
+ *
165
+ * Hint: The start input is used to determine whether the field is dirty
166
+ * and moves with it.
167
+ */
47
168
  startInput: Signal<unknown>;
169
+ /**
170
+ * The input of the value field.
171
+ */
48
172
  input: Signal<unknown>;
49
173
  }
174
+ /**
175
+ * Internal field store type.
176
+ */
50
177
  type InternalFieldStore = InternalArrayStore | InternalObjectStore | InternalValueStore;
51
178
  //#endregion
52
179
  //#region src/values.d.ts
180
+ /**
181
+ * Internal symbol constant.
182
+ */
53
183
  declare const INTERNAL: "~internal";
54
184
  //#endregion
55
185
  //#region src/types/utils.d.ts
@@ -76,28 +206,81 @@ type PartialValues<TValue> = TValue extends readonly unknown[] ? number extends
76
206
  //#endregion
77
207
  //#region src/types/form.d.ts
78
208
  /**
79
- * Value type of the validation mode.
209
+ * Validation mode type.
80
210
  */
81
211
  type ValidationMode = "initial" | "touch" | "input" | "change" | "blur" | "submit";
212
+ /**
213
+ * Form config interface.
214
+ */
82
215
  interface FormConfig<TSchema extends Schema = Schema> {
216
+ /**
217
+ * The schema of the form.
218
+ */
83
219
  readonly schema: TSchema;
220
+ /**
221
+ * The initial input of the form.
222
+ */
84
223
  readonly initialInput?: DeepPartial<v.InferInput<TSchema>> | undefined;
224
+ /**
225
+ * The validation mode of the form.
226
+ */
85
227
  readonly validate?: ValidationMode | undefined;
228
+ /**
229
+ * The revalidation mode of the form.
230
+ */
86
231
  readonly revalidate?: Exclude<ValidationMode, "initial"> | undefined;
87
232
  }
233
+ /**
234
+ * Internal form store interface.
235
+ */
88
236
  interface InternalFormStore<TSchema extends Schema = Schema> extends InternalObjectStore {
237
+ /**
238
+ * The element of the form.
239
+ */
89
240
  element?: HTMLFormElement;
241
+ /**
242
+ * The number of active validators.
243
+ */
90
244
  validators: number;
245
+ /**
246
+ * The validation mode of the form.
247
+ */
91
248
  validate: ValidationMode;
249
+ /**
250
+ * The revalidation mode of the form.
251
+ */
92
252
  revalidate: Exclude<ValidationMode, "initial">;
253
+ /**
254
+ * The parse function of the form.
255
+ */
93
256
  parse: (input: unknown) => Promise<v.SafeParseResult<TSchema>>;
257
+ /**
258
+ * The submitting state of the form.
259
+ */
94
260
  isSubmitting: Signal<boolean>;
261
+ /**
262
+ * The submitted state of the form.
263
+ */
95
264
  isSubmitted: Signal<boolean>;
265
+ /**
266
+ * The validating state of the form.
267
+ */
96
268
  isValidating: Signal<boolean>;
97
269
  }
270
+ /**
271
+ * Base form store interface.
272
+ */
98
273
  interface BaseFormStore<TSchema extends Schema = Schema> {
99
- [INTERNAL]: InternalFormStore<TSchema>;
274
+ /**
275
+ * The internal form store.
276
+ *
277
+ * @internal
278
+ */
279
+ readonly [INTERNAL]: InternalFormStore<TSchema>;
100
280
  }
281
+ /**
282
+ * Submit handler type.
283
+ */
101
284
  type SubmitHandler<TSchema extends Schema> = (output: v.InferOutput<TSchema>, event: SubmitEvent) => MaybePromise<unknown>;
102
285
  //#endregion
103
286
  //#region src/types/path.d.ts
@@ -126,7 +309,7 @@ type KeyOf<TValue> = IsAny<TValue> extends true ? never : TValue extends readonl
126
309
  */
127
310
  type MergeUnion<T> = { [K in KeyOf<T>]: T extends Record<K, infer V> ? V : never };
128
311
  /**
129
- * Lazily evaluate only the first valid path segment based on the given value.
312
+ * Lazily evaluates only the first valid path segment based on the given value.
130
313
  */
131
314
  type LazyPath<TValue, TPathToCheck extends Path, TValidPath extends Path = readonly []> = TPathToCheck extends readonly [] ? TValidPath : TPathToCheck extends readonly [infer TFirstKey extends KeyOf<TValue>, ...infer TPathRest extends Path] ? LazyPath<Required<MergeUnion<TValue>[TFirstKey]>, TPathRest, readonly [...TValidPath, TFirstKey]> : IsNever<KeyOf<TValue>> extends false ? readonly [...TValidPath, KeyOf<TValue>] : TValidPath;
132
315
  /**
@@ -147,272 +330,733 @@ type IsOrHasArray<TValue> = IsAny<TValue> extends true ? false : TValue extends
147
330
  */
148
331
  type KeyOfArrayPath<TValue> = IsAny<TValue> extends true ? never : TValue extends readonly (infer TItem)[] ? number extends TValue["length"] ? IsOrHasArray<TItem> extends true ? number : never : { [TKey in keyof TValue]: TKey extends `${infer TIndex extends number}` ? IsOrHasArray<NonNullable<TValue[TKey]>> extends true ? TIndex : never : never }[number] : TValue extends Record<string, unknown> ? { [TKey in keyof TValue]: IsOrHasArray<NonNullable<TValue[TKey]>> extends true ? TKey : never }[keyof TValue] & PathKey : never;
149
332
  /**
150
- * Lazily evaluate only the first valid array path segment based on the given value.
333
+ * Lazily evaluates only the first valid array path segment based on the given value.
151
334
  */
152
335
  type LazyArrayPath<TValue, TPathToCheck extends Path, TValidPath extends Path = readonly []> = TPathToCheck extends readonly [] ? TValue extends readonly unknown[] ? TValidPath : readonly [...TValidPath, KeyOfArrayPath<TValue>] : TPathToCheck extends readonly [infer TFirstKey extends KeyOfArrayPath<TValue>, ...infer TPathRest extends Path] ? LazyArrayPath<Required<MergeUnion<TValue>[TFirstKey]>, TPathRest, readonly [...TValidPath, TFirstKey]> : IsNever<KeyOfArrayPath<TValue>> extends false ? readonly [...TValidPath, KeyOfArrayPath<TValue>] : never;
153
336
  /**
154
- * Returns the path if valid, otherwise the first possible valid array path based on
155
- * the given value.
337
+ * Returns the path if valid, otherwise the first possible valid array path
338
+ * based on the given value.
156
339
  */
157
340
  type ValidArrayPath<TValue, TPath extends RequiredPath> = TPath extends LazyArrayPath<Required<TValue>, TPath> ? TPath : LazyArrayPath<Required<TValue>, TPath>;
158
341
  //#endregion
159
342
  //#region src/array/copyItemState/copyItemState.d.ts
160
343
  /**
161
- * Copies the deeply nested state (signal values) from one array item to another.
162
- * This includes the `isTouched`, `isDirty`, `startInput`, `input`, `startItems`, and `items` properties.
344
+ * Copies the deeply nested state (signal values) from one field store to
345
+ * another. This includes the `elements`, `errors`, `startInput`, `input`,
346
+ * `isTouched`, `isDirty`, and for arrays `startItems` and `items` properties.
163
347
  * Recursively walks through the field stores and copies all signal values.
164
348
  *
165
- * @param internalArrayStore - The field store of the array (not the array item)
166
- * @param fromIndex - The source index to copy from
167
- * @param toIndex - The destination index to copy to
349
+ * @param fromInternalFieldStore The source field store to copy from.
350
+ * @param toInternalFieldStore The destination field store to copy to.
168
351
  */
169
352
  //#endregion
170
353
  //#region ../../packages/methods/dist/index.vue.d.ts
171
354
  //#region src/focus/focus.d.ts
355
+
356
+ /**
357
+ * Focus field config interface.
358
+ */
172
359
  interface FocusFieldConfig<TSchema extends Schema, TFieldPath extends RequiredPath> {
173
- readonly form: BaseFormStore<TSchema>;
360
+ /**
361
+ * The path to the field to focus.
362
+ */
174
363
  readonly path: ValidPath<v.InferInput<TSchema>, TFieldPath>;
175
364
  }
176
- declare function focus<TSchema extends Schema, TFieldPath extends RequiredPath>(config: FocusFieldConfig<TSchema, TFieldPath>): void;
365
+ /**
366
+ * Focuses the first input element of a field. This is useful for
367
+ * programmatically setting focus to a specific field, such as after
368
+ * validation errors or user interactions.
369
+ *
370
+ * @param form The form store containing the field.
371
+ * @param config The focus field configuration.
372
+ */
373
+ declare function focus<TSchema extends Schema, TFieldPath extends RequiredPath>(form: BaseFormStore<TSchema>, config: FocusFieldConfig<TSchema, TFieldPath>): void;
177
374
  //#endregion
178
375
  //#region src/getAllErrors/getAllErrors.d.ts
376
+ /**
377
+ * Retrieves all error messages from all fields in the form by walking through
378
+ * the entire field store tree. This is useful for displaying a summary of all
379
+ * validation errors across the form.
380
+ *
381
+ * @param form The form store to retrieve errors from.
382
+ *
383
+ * @returns A non-empty array of error messages, or null if no errors exist.
384
+ */
179
385
  declare function getAllErrors(form: BaseFormStore): [string, ...string[]] | null;
180
386
  //#endregion
181
387
  //#region src/getErrors/getErrors.d.ts
388
+ /**
389
+ * Get form errors config interface.
390
+ */
182
391
  interface GetFormErrorsConfig {
392
+ /**
393
+ * The path to a field. Leave undefined to get form-level errors.
394
+ */
183
395
  readonly path?: undefined;
184
396
  }
397
+ /**
398
+ * Get field errors config interface.
399
+ */
185
400
  interface GetFieldErrorsConfig<TSchema extends Schema, TFieldPath extends RequiredPath> {
401
+ /**
402
+ * The path to the field to retrieve errors from.
403
+ */
186
404
  readonly path: ValidPath<v.InferInput<TSchema>, TFieldPath>;
187
405
  }
406
+ /**
407
+ * Retrieves error messages from the form. When called without a config,
408
+ * returns form-level errors. When called with a path, returns errors for
409
+ * that specific field.
410
+ *
411
+ * @param form The form store to retrieve errors from.
412
+ *
413
+ * @returns A non-empty array of error messages, or null if no errors exist.
414
+ */
188
415
  declare function getErrors<TSchema extends Schema>(form: BaseFormStore<TSchema>): [string, ...string[]] | null;
416
+ /**
417
+ * Retrieves error messages from the form. When called without a config,
418
+ * returns form-level errors. When called with a path, returns errors for
419
+ * that specific field.
420
+ *
421
+ * @param form The form store to retrieve errors from.
422
+ * @param config The get errors configuration.
423
+ *
424
+ * @returns A non-empty array of error messages, or null if no errors exist.
425
+ */
189
426
  declare function getErrors<TSchema extends Schema, TFieldPath extends RequiredPath | undefined = undefined>(form: BaseFormStore<TSchema>, config: TFieldPath extends RequiredPath ? GetFieldErrorsConfig<TSchema, TFieldPath> : GetFormErrorsConfig): [string, ...string[]] | null;
190
427
  //#endregion
191
428
  //#region src/getInput/getInput.d.ts
429
+ /**
430
+ * Get form input config interface.
431
+ */
192
432
  interface GetFormInputConfig {
433
+ /**
434
+ * The path to a field. Leave undefined to get the entire form input.
435
+ */
193
436
  readonly path?: undefined;
194
437
  }
438
+ /**
439
+ * Get field input config interface.
440
+ */
195
441
  interface GetFieldInputConfig<TSchema extends Schema, TFieldPath extends RequiredPath> {
442
+ /**
443
+ * The path to the field to retrieve input from.
444
+ */
196
445
  readonly path: ValidPath<v.InferInput<TSchema>, TFieldPath>;
197
446
  }
447
+ /**
448
+ * Retrieves the current input value of a specific field or the entire form.
449
+ * Returns a partial object as not all fields may have been set.
450
+ *
451
+ * @param form The form store to retrieve input from.
452
+ *
453
+ * @returns The partial input values of the form or the specified field.
454
+ */
198
455
  declare function getInput<TSchema extends Schema>(form: BaseFormStore<TSchema>): PartialValues<v.InferInput<TSchema>>;
456
+ /**
457
+ * Retrieves the current input value of a specific field or the entire form.
458
+ * Returns a partial object as not all fields may have been set.
459
+ *
460
+ * @param form The form store to retrieve input from.
461
+ * @param config The get input configuration.
462
+ *
463
+ * @returns The partial input values of the form or the specified field.
464
+ */
199
465
  declare function getInput<TSchema extends Schema, TFieldPath extends RequiredPath | undefined = undefined>(form: BaseFormStore<TSchema>, config: TFieldPath extends RequiredPath ? GetFieldInputConfig<TSchema, TFieldPath> : GetFormInputConfig): PartialValues<TFieldPath extends RequiredPath ? PathValue<v.InferInput<TSchema>, TFieldPath> : v.InferInput<TSchema>>;
200
466
  //#endregion
201
467
  //#region src/handleSubmit/handleSubmit.d.ts
468
+ /**
469
+ * Creates a submit event handler for the form that prevents default browser
470
+ * submission, validates the form input, and calls the provided handler if
471
+ * validation succeeds. This is designed to be used with the form's onsubmit event.
472
+ *
473
+ * @param form The form store to handle submission for.
474
+ * @param handler The submit handler function called with validated output if validation succeeds.
475
+ *
476
+ * @returns A submit event handler function to attach to the form element.
477
+ */
202
478
  declare function handleSubmit<TSchema extends Schema>(form: BaseFormStore<TSchema>, handler: SubmitHandler<TSchema>): (event: SubmitEvent) => void;
203
479
  //#endregion
204
480
  //#region src/insert/insert.d.ts
481
+ /**
482
+ * Insert array field config interface.
483
+ */
205
484
  interface InsertConfig<TSchema extends Schema, TFieldArrayPath extends RequiredPath> {
485
+ /**
486
+ * The path to the field array to insert into.
487
+ */
206
488
  readonly path: ValidArrayPath<v.InferInput<TSchema>, TFieldArrayPath>;
489
+ /**
490
+ * The index to insert the new item at. If undefined, appends to the end.
491
+ */
207
492
  readonly at?: number | undefined;
493
+ /**
494
+ * The partial initial input value for the new item.
495
+ */
208
496
  readonly initialInput?: DeepPartial<PathValue<v.InferInput<TSchema>, [...TFieldArrayPath, number]>> | undefined;
209
497
  }
498
+ /**
499
+ * Inserts a new item into a field array at the specified index. All items at
500
+ * or after the insertion point are shifted up by one index.
501
+ *
502
+ * @param form The form store containing the field array.
503
+ * @param config The insert configuration specifying the path, index, and initial value.
504
+ */
210
505
  declare function insert<TSchema extends Schema, TFieldArrayPath extends RequiredPath>(form: BaseFormStore<TSchema>, config: InsertConfig<TSchema, TFieldArrayPath>): void;
211
506
  //#endregion
212
507
  //#region src/move/move.d.ts
508
+ /**
509
+ * Move array field config interface.
510
+ */
213
511
  interface MoveConfig<TSchema extends Schema, TFieldArrayPath extends RequiredPath> {
512
+ /**
513
+ * The path to the field array to move an item within.
514
+ */
214
515
  readonly path: ValidArrayPath<v.InferInput<TSchema>, TFieldArrayPath>;
516
+ /**
517
+ * The index of the item to move from.
518
+ */
215
519
  readonly from: number;
520
+ /**
521
+ * The index to move the item to.
522
+ */
216
523
  readonly to: number;
217
524
  }
525
+ /**
526
+ * Moves an item from one index to another within a field array. All items
527
+ * between the source and destination indices are shifted accordingly.
528
+ *
529
+ * @param form The form store containing the field array.
530
+ * @param config The move configuration specifying the path and source/destination indices.
531
+ */
218
532
  declare function move<TSchema extends Schema, TFieldArrayPath extends RequiredPath>(form: BaseFormStore<TSchema>, config: MoveConfig<TSchema, TFieldArrayPath>): void;
219
533
  //#endregion
220
534
  //#region src/remove/remove.d.ts
535
+ /**
536
+ * Remove array field config interface.
537
+ */
221
538
  interface RemoveConfig<TSchema extends Schema, TFieldArrayPath extends RequiredPath> {
539
+ /**
540
+ * The path to the field array to remove an item from.
541
+ */
222
542
  readonly path: ValidArrayPath<v.InferInput<TSchema>, TFieldArrayPath>;
543
+ /**
544
+ * The index of the item to remove.
545
+ */
223
546
  readonly at: number;
224
547
  }
548
+ /**
549
+ * Removes an item from a field array at the specified index. All items after
550
+ * the removed item are shifted down by one index.
551
+ *
552
+ * @param form The form store containing the field array.
553
+ * @param config The remove configuration specifying the path and index.
554
+ */
225
555
  declare function remove<TSchema extends Schema, TFieldArrayPath extends RequiredPath>(form: BaseFormStore<TSchema>, config: RemoveConfig<TSchema, TFieldArrayPath>): void;
226
556
  //#endregion
227
557
  //#region src/replace/replace.d.ts
558
+ /**
559
+ * Replace array field config interface.
560
+ */
228
561
  interface ReplaceConfig<TSchema extends Schema, TFieldArrayPath extends RequiredPath> {
562
+ /**
563
+ * The path to the field array to replace an item within.
564
+ */
229
565
  readonly path: ValidArrayPath<v.InferInput<TSchema>, TFieldArrayPath>;
566
+ /**
567
+ * The index of the item to replace.
568
+ */
230
569
  readonly at: number;
570
+ /**
571
+ * The partial initial input value for the replacement item.
572
+ */
231
573
  readonly initialInput?: DeepPartial<PathValue<v.InferInput<TSchema>, [...TFieldArrayPath, number]>> | undefined;
232
574
  }
575
+ /**
576
+ * Replaces an item in a field array at the specified index with new initial input.
577
+ *
578
+ * @param form The form store containing the field array.
579
+ * @param config The replace configuration specifying the path, index, and initial input.
580
+ */
233
581
  declare function replace<TSchema extends Schema, TFieldArrayPath extends RequiredPath>(form: BaseFormStore<TSchema>, config: ReplaceConfig<TSchema, TFieldArrayPath>): void;
234
582
  //#endregion
235
583
  //#region src/reset/reset.d.ts
584
+ /**
585
+ * Reset base config interface.
586
+ */
236
587
  interface ResetBaseConfig {
588
+ /**
589
+ * Whether to keep the current input values during reset. Defaults to false.
590
+ */
237
591
  readonly keepInput?: boolean | undefined;
592
+ /**
593
+ * Whether to keep the touched state during reset. Defaults to false.
594
+ */
238
595
  readonly keepTouched?: boolean | undefined;
596
+ /**
597
+ * Whether to keep the error messages during reset. Defaults to false.
598
+ */
239
599
  readonly keepErrors?: boolean | undefined;
240
600
  }
601
+ /**
602
+ * Reset form config interface.
603
+ */
241
604
  interface ResetFormConfig<TSchema extends Schema> extends ResetBaseConfig {
605
+ /**
606
+ * The path to a field. Leave undefined to reset the entire form.
607
+ */
242
608
  readonly path?: undefined;
609
+ /**
610
+ * The new initial input to reset to. If provided, replaces the form's
611
+ * initial input.
612
+ */
243
613
  readonly initialInput?: DeepPartial<v.InferInput<TSchema>> | undefined;
244
- readonly keepSubmitCount?: boolean | undefined;
614
+ /**
615
+ * Whether to keep the submitted state during reset. Defaults to false.
616
+ */
245
617
  readonly keepSubmitted?: boolean | undefined;
246
618
  }
619
+ /**
620
+ * Reset field config interface.
621
+ */
247
622
  interface ResetFieldConfig<TSchema extends Schema, TFieldPath extends RequiredPath> extends ResetBaseConfig {
623
+ /**
624
+ * The path to the field to reset.
625
+ */
248
626
  readonly path: ValidPath<v.InferInput<TSchema>, TFieldPath>;
627
+ /**
628
+ * The new initial input to reset the field to. If provided, replaces the
629
+ * field's initial input.
630
+ */
249
631
  readonly initialInput?: DeepPartial<PathValue<v.InferInput<TSchema>, TFieldPath>>;
250
632
  }
633
+ /**
634
+ * Resets a specific field or the entire form to its initial state. Provides
635
+ * fine-grained control over which state to preserve during reset through the
636
+ * configuration options.
637
+ *
638
+ * @param form The form store to reset.
639
+ */
251
640
  declare function reset(form: BaseFormStore): void;
641
+ /**
642
+ * Resets a specific field or the entire form to its initial state. Provides
643
+ * fine-grained control over which state to preserve during reset through the
644
+ * configuration options.
645
+ *
646
+ * @param form The form store to reset.
647
+ * @param config The reset configuration specifying what to reset and what to keep.
648
+ */
252
649
  declare function reset<TSchema extends Schema, TFieldPath extends RequiredPath | undefined = undefined>(form: BaseFormStore<TSchema>, config: TFieldPath extends RequiredPath ? ResetFieldConfig<TSchema, TFieldPath> : ResetFormConfig<TSchema>): void;
253
650
  //#endregion
254
651
  //#region src/setErrors/setErrors.d.ts
652
+ /**
653
+ * Set form errors config interface.
654
+ */
255
655
  interface SetFormErrorsConfig {
656
+ /**
657
+ * The path to a field. Leave undefined to set form-level errors.
658
+ */
256
659
  readonly path?: undefined;
660
+ /**
661
+ * The error messages to set, or null to clear errors.
662
+ */
257
663
  readonly errors: [string, ...string[]] | null;
258
664
  }
665
+ /**
666
+ * Set field errors config interface.
667
+ */
259
668
  interface SetFieldErrorsConfig<TSchema extends Schema, TFieldPath extends RequiredPath> {
669
+ /**
670
+ * The path to the field to set errors on.
671
+ */
260
672
  readonly path: ValidPath<v.InferInput<TSchema>, TFieldPath>;
673
+ /**
674
+ * The error messages to set, or null to clear errors.
675
+ */
261
676
  readonly errors: [string, ...string[]] | null;
262
677
  }
678
+ /**
679
+ * Sets or clears error messages on the form or a specific field. This is
680
+ * useful for setting custom validation errors that don't come from schema
681
+ * validation.
682
+ *
683
+ * @param form The form store to set errors on.
684
+ * @param config The set errors configuration specifying the path and error messages.
685
+ */
263
686
  declare function setErrors<TSchema extends Schema, TFieldPath extends RequiredPath | undefined = undefined>(form: BaseFormStore<TSchema>, config: TFieldPath extends RequiredPath ? SetFieldErrorsConfig<TSchema, TFieldPath> : SetFormErrorsConfig): void;
264
687
  //#endregion
265
688
  //#region src/setInput/setInput.d.ts
689
+ /**
690
+ * Set form input config interface.
691
+ */
266
692
  interface SetFormInputConfig<TSchema extends Schema> {
693
+ /**
694
+ * The path to a field. Leave undefined to set the entire form input.
695
+ */
267
696
  readonly path?: undefined;
697
+ /**
698
+ * The input value to set for the form.
699
+ */
268
700
  readonly input: v.InferInput<TSchema>;
269
701
  }
702
+ /**
703
+ * Set field input config interface.
704
+ */
270
705
  interface SetFieldInputConfig<TSchema extends Schema, TFieldPath extends RequiredPath> {
706
+ /**
707
+ * The path to the field to set input on.
708
+ */
271
709
  readonly path: ValidPath<v.InferInput<TSchema>, TFieldPath>;
710
+ /**
711
+ * The input value to set for the field.
712
+ */
272
713
  readonly input: PathValue<v.InferInput<TSchema>, TFieldPath>;
273
714
  }
715
+ /**
716
+ * Sets the input value of a specific field or the entire form. This updates
717
+ * the field value(s) and triggers validation if required by the form's
718
+ * validation mode.
719
+ *
720
+ * @param form The form store to set input on.
721
+ * @param config The set form input configuration specifying the new input values.
722
+ */
274
723
  declare function setInput<TSchema extends Schema>(form: BaseFormStore<TSchema>, config: SetFormInputConfig<TSchema>): void;
724
+ /**
725
+ * Sets the input value of a specific field or the entire form. This updates
726
+ * the field value(s) and triggers validation if required by the form's
727
+ * validation mode.
728
+ *
729
+ * @param form The form store to set input on.
730
+ * @param config The set input configuration specifying the path and new value.
731
+ */
275
732
  declare function setInput<TSchema extends Schema, TFieldPath extends RequiredPath | undefined = undefined>(form: BaseFormStore<TSchema>, config: TFieldPath extends RequiredPath ? SetFieldInputConfig<TSchema, TFieldPath> : SetFormInputConfig<TSchema>): void;
276
733
  //#endregion
277
734
  //#region src/submit/submit.d.ts
735
+ /**
736
+ * Programmatically requests form submission by calling the native
737
+ * `requestSubmit()` method on the underlying form element.
738
+ *
739
+ * @param form The form store to submit.
740
+ */
278
741
  declare function submit(form: BaseFormStore): void;
279
742
  //#endregion
280
743
  //#region src/swap/swap.d.ts
744
+ /**
745
+ * Swap array field config interface.
746
+ */
281
747
  interface SwapConfig<TSchema extends Schema, TFieldArrayPath extends RequiredPath> {
748
+ /**
749
+ * The path to the field array to swap items within.
750
+ */
282
751
  readonly path: ValidArrayPath<v.InferInput<TSchema>, TFieldArrayPath>;
752
+ /**
753
+ * The index of the first item to swap.
754
+ */
283
755
  readonly at: number;
756
+ /**
757
+ * The index of the second item to swap with the first.
758
+ */
284
759
  readonly and: number;
285
760
  }
761
+ /**
762
+ * Swaps two items in a field array by exchanging their positions.
763
+ *
764
+ * @param form The form store containing the field array.
765
+ * @param config The swap configuration specifying the path and indices to swap.
766
+ */
286
767
  declare function swap<TSchema extends Schema, TFieldArrayPath extends RequiredPath>(form: BaseFormStore<TSchema>, config: SwapConfig<TSchema, TFieldArrayPath>): void;
287
768
  //#endregion
288
769
  //#region src/validate/validate.d.ts
770
+ /**
771
+ * Validate form config interface.
772
+ */
289
773
  interface ValidateFormConfig {
774
+ /**
775
+ * Whether to focus the first field with errors after validation. Defaults to false.
776
+ */
290
777
  readonly shouldFocus?: boolean | undefined;
291
778
  }
779
+ /**
780
+ * Validates the entire form input against its schema. Returns a safe parse result
781
+ * indicating success or failure with detailed issues. Optionally focuses the first
782
+ * field with validation errors.
783
+ *
784
+ * @param form The form store to validate.
785
+ * @param config The validate form configuration specifying focus behavior.
786
+ *
787
+ * @returns A promise resolving to the validation result.
788
+ */
292
789
  declare function validate<TSchema extends Schema>(form: BaseFormStore<TSchema>, config?: ValidateFormConfig): Promise<v.SafeParseResult<TSchema>>;
293
790
  //#endregion
294
791
  //#endregion
295
792
  //#region src/types/field.d.ts
296
793
  /**
297
- * Value type of the field element props.
794
+ * Field element props interface.
298
795
  */
299
796
  interface FieldElementProps {
797
+ /**
798
+ * The name of the field.
799
+ */
300
800
  readonly name: string;
801
+ /**
802
+ * Whether the field should autofocus.
803
+ */
301
804
  readonly autofocus: boolean;
805
+ /**
806
+ * The ref callback to register the field element.
807
+ */
302
808
  readonly ref: (element: Element | ComponentPublicInstance | null) => void;
809
+ /**
810
+ * The focus event handler of the field element.
811
+ */
303
812
  readonly onFocus: (event: FocusEvent) => void;
813
+ /**
814
+ * The change event handler of the field element.
815
+ */
304
816
  readonly onChange: (event: Event) => void;
817
+ /**
818
+ * The blur event handler of the field element.
819
+ */
305
820
  readonly onBlur: (event: FocusEvent) => void;
306
821
  }
307
822
  /**
308
- * Value type of the field store.
823
+ * Field store interface.
309
824
  */
310
825
  interface FieldStore<TSchema extends Schema = Schema, TFieldPath extends RequiredPath = RequiredPath> {
826
+ /**
827
+ * The path to the field within the form.
828
+ */
311
829
  readonly path: ValidPath<v.InferInput<TSchema>, TFieldPath>;
830
+ /**
831
+ * The current input value of the field.
832
+ */
312
833
  get input(): PartialValues<PathValue<v.InferInput<TSchema>, TFieldPath>>;
834
+ /**
835
+ * Sets the current input value of the field.
836
+ */
313
837
  set input(value: PartialValues<PathValue<v.InferInput<TSchema>, TFieldPath>>);
838
+ /**
839
+ * The current error messages of the field.
840
+ */
314
841
  readonly errors: [string, ...string[]] | null;
842
+ /**
843
+ * Whether the field has been touched.
844
+ */
315
845
  readonly isTouched: boolean;
846
+ /**
847
+ * Whether the field input differs from its initial value.
848
+ */
316
849
  readonly isDirty: boolean;
850
+ /**
851
+ * Whether the field is valid according to the schema.
852
+ */
317
853
  readonly isValid: boolean;
854
+ /**
855
+ * The props for the field element.
856
+ */
318
857
  readonly props: FieldElementProps;
319
858
  }
320
859
  /**
321
- * Value type of the field array store.
860
+ * Field array store interface.
322
861
  */
323
862
  interface FieldArrayStore<TSchema extends Schema = Schema, TFieldArrayPath extends RequiredPath = RequiredPath> {
863
+ /**
864
+ * The path to the array field within the form.
865
+ */
324
866
  readonly path: ValidArrayPath<v.InferInput<TSchema>, TFieldArrayPath>;
867
+ /**
868
+ * The item IDs of the array field.
869
+ */
325
870
  readonly items: string[];
871
+ /**
872
+ * The current error messages of the field array.
873
+ */
326
874
  readonly errors: [string, ...string[]] | null;
875
+ /**
876
+ * Whether the field array has been touched.
877
+ */
327
878
  readonly isTouched: boolean;
879
+ /**
880
+ * Whether the field array input differs from its initial value.
881
+ */
328
882
  readonly isDirty: boolean;
883
+ /**
884
+ * Whether the field array is valid according to the schema.
885
+ */
329
886
  readonly isValid: boolean;
330
887
  }
331
888
  //#endregion
332
889
  //#region src/types/form.d.ts
890
+ /**
891
+ * Form store interface.
892
+ */
333
893
  interface FormStore<TSchema extends Schema = Schema> extends BaseFormStore<TSchema> {
894
+ /**
895
+ * Whether the form is currently submitting.
896
+ */
334
897
  readonly isSubmitting: boolean;
898
+ /**
899
+ * Whether the form has been submitted.
900
+ */
335
901
  readonly isSubmitted: boolean;
902
+ /**
903
+ * Whether the form is currently validating.
904
+ */
336
905
  readonly isValidating: boolean;
906
+ /**
907
+ * Whether any field in the form has been touched.
908
+ */
337
909
  readonly isTouched: boolean;
910
+ /**
911
+ * Whether any field in the form differs from its initial value.
912
+ */
338
913
  readonly isDirty: boolean;
914
+ /**
915
+ * Whether the form is valid according to the schema.
916
+ */
339
917
  readonly isValid: boolean;
918
+ /**
919
+ * The current error messages of the form.
920
+ *
921
+ * Hint: This property only contains validation errors at the root level
922
+ * of the form. To get all errors from all fields, use `getAllErrors`.
923
+ */
340
924
  readonly errors: [string, ...string[]] | null;
341
925
  }
342
926
  //#endregion
343
927
  //#region src/components/Field/Field.vue.d.ts
344
928
  /**
345
- * Properties of the `Field` component.
929
+ * Field component props interface.
346
930
  */
347
931
  interface FieldProps<TSchema extends Schema = Schema, TFieldPath extends RequiredPath = RequiredPath> {
932
+ /**
933
+ * The form store to which the field belongs.
934
+ */
348
935
  readonly of: FormStore<TSchema>;
936
+ /**
937
+ * The path to the field within the form schema.
938
+ */
349
939
  readonly path: ValidPath<v.InferInput<TSchema>, TFieldPath>;
350
940
  }
351
- declare const _default: <TSchema extends Schema, TFieldPath extends RequiredPath>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal$2<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
352
- props: __VLS_PrettifyLocal$2<Pick<Partial<{}> & Omit<{} & vue11.VNodeProps & vue11.AllowedComponentProps & vue11.ComponentCustomProps, never>, never> & FieldProps<TSchema, TFieldPath> & {}> & vue11.PublicProps;
353
- expose(exposed: vue11.ShallowUnwrapRef<{}>): void;
941
+ declare const __VLS_export$2: <TSchema extends Schema, TFieldPath extends RequiredPath>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal$2<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
942
+ props: __VLS_PrettifyLocal$2<FieldProps<TSchema, TFieldPath>> & vue3.PublicProps;
943
+ expose: (exposed: {}) => void;
354
944
  attrs: any;
355
945
  slots: {
356
946
  default(props: FieldStore<TSchema, TFieldPath>): any;
357
947
  };
358
948
  emit: {};
359
- }>) => vue11.VNode & {
949
+ }>) => vue3.VNode & {
360
950
  __ctx?: Awaited<typeof __VLS_setup>;
361
951
  };
952
+ declare const _default: typeof __VLS_export$2;
362
953
  type __VLS_PrettifyLocal$2<T> = { [K in keyof T as K]: T[K] } & {};
363
954
  //#endregion
364
955
  //#region src/components/FieldArray/FieldArray.vue.d.ts
365
956
  /**
366
- * Properties of the `FieldArray` component.
957
+ * Field array component props interface.
367
958
  */
368
959
  interface FieldArrayProps<TSchema extends Schema = Schema, TFieldArrayPath extends RequiredPath = RequiredPath> {
960
+ /**
961
+ * The form store to which the field array belongs.
962
+ */
369
963
  readonly of: FormStore<TSchema>;
964
+ /**
965
+ * The path to the field array within the form schema.
966
+ */
370
967
  readonly path: ValidArrayPath<v.InferInput<TSchema>, TFieldArrayPath>;
371
968
  }
372
- declare const _default$1: <TSchema extends Schema, TFieldArrayPath extends RequiredPath>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal$1<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
373
- props: __VLS_PrettifyLocal$1<Pick<Partial<{}> & Omit<{} & vue11.VNodeProps & vue11.AllowedComponentProps & vue11.ComponentCustomProps, never>, never> & FieldArrayProps<TSchema, TFieldArrayPath> & {}> & vue11.PublicProps;
374
- expose(exposed: vue11.ShallowUnwrapRef<{}>): void;
969
+ declare const __VLS_export$1: <TSchema extends Schema, TFieldArrayPath extends RequiredPath>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal$1<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
970
+ props: __VLS_PrettifyLocal$1<FieldArrayProps<TSchema, TFieldArrayPath>> & vue3.PublicProps;
971
+ expose: (exposed: {}) => void;
375
972
  attrs: any;
376
973
  slots: {
377
974
  default(props: FieldArrayStore<TSchema, TFieldArrayPath>): any;
378
975
  };
379
976
  emit: {};
380
- }>) => vue11.VNode & {
977
+ }>) => vue3.VNode & {
381
978
  __ctx?: Awaited<typeof __VLS_setup>;
382
979
  };
980
+ declare const _default$1: typeof __VLS_export$1;
383
981
  type __VLS_PrettifyLocal$1<T> = { [K in keyof T as K]: T[K] } & {};
384
982
  //#endregion
385
983
  //#region src/components/Form/Form.vue.d.ts
984
+ /**
985
+ * Form component props interface.
986
+ */
386
987
  interface FormProps<TSchema extends Schema = Schema> {
988
+ /**
989
+ * The form store instance.
990
+ */
387
991
  of: FormStore<TSchema>;
992
+ /**
993
+ * The submit handler called when the form is submitted and validation succeeds.
994
+ */
388
995
  onSubmit: SubmitHandler<TSchema>;
389
996
  }
390
- declare const _default$2: <TSchema extends Schema = Schema>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
391
- props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & vue11.VNodeProps & vue11.AllowedComponentProps & vue11.ComponentCustomProps, never>, never> & FormProps<TSchema> & {}> & vue11.PublicProps;
392
- expose(exposed: vue11.ShallowUnwrapRef<{}>): void;
997
+ declare const __VLS_export: <TSchema extends Schema = Schema>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
998
+ props: __VLS_PrettifyLocal<FormProps<TSchema>> & vue3.PublicProps;
999
+ expose: (exposed: {}) => void;
393
1000
  attrs: any;
394
1001
  slots: {
395
1002
  default?: (props: {}) => any;
396
1003
  };
397
1004
  emit: {};
398
- }>) => vue11.VNode & {
1005
+ }>) => vue3.VNode & {
399
1006
  __ctx?: Awaited<typeof __VLS_setup>;
400
1007
  };
1008
+ declare const _default$2: typeof __VLS_export;
401
1009
  type __VLS_PrettifyLocal<T> = { [K in keyof T as K]: T[K] } & {};
402
1010
  //#endregion
403
1011
  //#region src/composables/useField/useField.d.ts
1012
+ /**
1013
+ * Use field config interface.
1014
+ */
404
1015
  interface UseFieldConfig<TSchema extends Schema = Schema, TFieldPath extends RequiredPath = RequiredPath> {
1016
+ /**
1017
+ * The path to the field within the form schema.
1018
+ */
405
1019
  readonly path: ValidPath<v.InferInput<TSchema>, TFieldPath>;
406
1020
  }
1021
+ /**
1022
+ * Creates a reactive field store of a specific field within a form store.
1023
+ *
1024
+ * @param form The form store instance, ref, or getter function.
1025
+ * @param config The field configuration, ref, or getter function.
1026
+ *
1027
+ * @returns The field store with reactive properties and element props.
1028
+ */
407
1029
  declare function useField<TSchema extends Schema, TFieldPath extends RequiredPath>(form: MaybeRefOrGetter<FormStore<TSchema>>, config: MaybeRefOrGetter<UseFieldConfig<TSchema, TFieldPath>>): FieldStore<TSchema, TFieldPath>;
408
1030
  //#endregion
409
1031
  //#region src/composables/useFieldArray/useFieldArray.d.ts
1032
+ /**
1033
+ * Use field array config interface.
1034
+ */
410
1035
  interface UseFieldArrayConfig<TSchema extends Schema = Schema, TFieldArrayPath extends RequiredPath = RequiredPath> {
1036
+ /**
1037
+ * The path to the field array within the form schema.
1038
+ */
411
1039
  readonly path: ValidArrayPath<v.InferInput<TSchema>, TFieldArrayPath>;
412
1040
  }
1041
+ /**
1042
+ * Creates a reactive field array store of a specific field array within a form store.
1043
+ *
1044
+ * @param form The form store instance, ref, or getter function.
1045
+ * @param config The field array configuration, ref, or getter function.
1046
+ *
1047
+ * @returns The field array store with reactive properties for array management.
1048
+ */
413
1049
  declare function useFieldArray<TSchema extends Schema, TFieldArrayPath extends RequiredPath>(form: MaybeRefOrGetter<FormStore<TSchema>>, config: MaybeRefOrGetter<UseFieldArrayConfig<TSchema, TFieldArrayPath>>): FieldArrayStore<TSchema, TFieldArrayPath>;
414
1050
  //#endregion
415
1051
  //#region src/composables/useForm/useForm.d.ts
1052
+ /**
1053
+ * Creates a reactive form store from a form configuration. The form store
1054
+ * manages form state and provides reactive properties.
1055
+ *
1056
+ * @param config The form configuration.
1057
+ *
1058
+ * @returns The form store with reactive properties.
1059
+ */
416
1060
  declare function useForm<TSchema extends Schema>(config: FormConfig<TSchema>): FormStore<TSchema>;
417
1061
  //#endregion
418
- export { _default as Field, _default$1 as FieldArray, FieldArrayStore, FieldElementProps, FieldStore, FocusFieldConfig, _default$2 as Form, FormStore, GetFieldErrorsConfig, GetFieldInputConfig, GetFormErrorsConfig, GetFormInputConfig, InsertConfig, MoveConfig, RemoveConfig, ReplaceConfig, ResetFieldConfig, ResetFormConfig, SetFieldErrorsConfig, SetFieldInputConfig, SetFormErrorsConfig, SetFormInputConfig, type SubmitHandler, SwapConfig, UseFieldArrayConfig, UseFieldConfig, ValidateFormConfig, focus, getAllErrors, getErrors, getInput, handleSubmit, insert, move, remove, replace, reset, setErrors, setInput, submit, swap, useField, useFieldArray, useForm, validate };
1062
+ export { type DeepPartial, _default as Field, _default$1 as FieldArray, FieldArrayStore, type FieldElement, FieldElementProps, FieldStore, FocusFieldConfig, _default$2 as Form, type FormConfig, FormStore, GetFieldErrorsConfig, GetFieldInputConfig, GetFormErrorsConfig, GetFormInputConfig, InsertConfig, MoveConfig, type PartialValues, type PathValue, RemoveConfig, ReplaceConfig, type RequiredPath, ResetFieldConfig, ResetFormConfig, type Schema, SetFieldErrorsConfig, SetFieldInputConfig, SetFormErrorsConfig, SetFormInputConfig, type SubmitHandler, SwapConfig, UseFieldArrayConfig, UseFieldConfig, type ValidArrayPath, type ValidPath, ValidateFormConfig, type ValidationMode, focus, getAllErrors, getErrors, getInput, handleSubmit, insert, move, remove, replace, reset, setErrors, setInput, submit, swap, useField, useFieldArray, useForm, validate };