notform 2.2.5 → 3.0.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 (4) hide show
  1. package/README.md +77 -67
  2. package/dist/index.d.ts +402 -413
  3. package/dist/index.js +719 -644
  4. package/package.json +14 -13
package/dist/index.d.ts CHANGED
@@ -1,40 +1,50 @@
1
- import { Component, ComputedRef, MaybeRefOrGetter, Raw, Ref } from "vue";
1
+ import { Component, MaybeRefOrGetter } from "vue";
2
2
  import { StandardSchemaV1 } from "@standard-schema/spec";
3
- import { Get, PartialDeep, Paths as Paths$1 } from "type-fest";
3
+ import { ExcludeStrict, Get, PartialDeep, Paths } from "type-fest";
4
4
  //#region src/types/shared.d.ts
5
+ /** Events that can trigger field validation. */
6
+ type ValidationTrigger = 'onBlur' | 'onChange' | 'onInput' | 'onMount';
5
7
  /**
6
- * The validation mode determines when validation occurs.
7
- * - `lazy`: Validates on blur or submission.
8
- * - `eager`: Validates on blur, then on every change if an error exists.
9
- */
10
- type ValidationMode = 'eager' | 'lazy';
11
- /**
12
- * Interaction events that can trigger a validation check for a field.
13
- * - onBlur: Trigger validation when the field loses focus.
14
- * - onChange: Trigger validation when the field value is committed.
15
- * - onInput: Trigger validation on every keystroke.
16
- * - onMount: Trigger validation when the field is mounted.
17
- * - onFocus: Trigger validation when the field gains focus.
18
- */
19
- type ValidationTrigger = 'onBlur' | 'onChange' | 'onFocus' | 'onInput' | 'onMount';
20
- /**
21
- * Constructs a type where all properties of the input type are optional recursively.
22
- * @template TData The base data structure to transform.
8
+ * Recursively optional version of `TData`, including array items.
9
+ * @template TData Source data type.
23
10
  */
24
11
  type DeepPartial<TData> = PartialDeep<TData, {
25
12
  allowUndefinedInNonTupleArrays: true;
26
13
  recurseIntoArrays: true;
27
14
  }>;
28
15
  /**
29
- * Constructs a type representing all possible dot-separated paths within an object.
30
- * @template TReference The object type for which to generate paths.
16
+ * Input type accepted by a Standard Schema.
17
+ * @template TSchema Validation schema.
18
+ */
19
+ type InferInput<TSchema extends StandardSchemaV1> = StandardSchemaV1.InferInput<TSchema>;
20
+ /**
21
+ * Output type produced by a Standard Schema.
22
+ * @template TSchema Validation schema.
31
23
  */
32
- type Paths<TReference> = Extract<Paths$1<TReference, {
24
+ type InferOutput<TSchema extends StandardSchemaV1> = StandardSchemaV1.InferOutput<TSchema>;
25
+ /** One issue from a Standard Schema validation run. */
26
+ type Issue = StandardSchemaV1.Issue;
27
+ /**
28
+ * Dot-notated field paths derived from a schema's input type.
29
+ *
30
+ * The `| (string & {})` union member is deliberate: it keeps editor
31
+ * autocomplete suggesting the schema's real paths, while still letting any
32
+ * arbitrary string through the type checker — needed because a dynamically
33
+ * built path (e.g. `` `${item.path}.name` ``) can't always be proven to match
34
+ * the literal union `TypeFestPaths` computes.
35
+ * @template TSchema Validation schema.
36
+ */
37
+ type Paths$1<TSchema extends StandardSchemaV1> = Extract<Paths<InferInput<TSchema>, {
33
38
  maxRecursionDepth: 10;
34
39
  }>, string> | (string & {});
35
40
  /**
36
- * Represents a validation schema for object-based data structures.
37
- * Complies with the Standard Schema specification.
41
+ * Standard Schema constrained to object input.
42
+ *
43
+ * The `~standard.types.input` check exists purely at the type level, so that
44
+ * `useNotForm`'s `TSchema` is only inferred when the schema's input type is
45
+ * actually an `object` — this is what makes passing a non-object schema
46
+ * (e.g. `z.string()`) a compile-time error rather than a runtime surprise.
47
+ * @see {@linkcode https://github.com/standard-schema/standard-schema Standard Schema spec}
38
48
  */
39
49
  type ObjectSchema = StandardSchemaV1 & {
40
50
  '~standard': StandardSchemaV1['~standard'] & {
@@ -43,529 +53,508 @@ type ObjectSchema = StandardSchemaV1 & {
43
53
  };
44
54
  };
45
55
  };
46
- /**
47
- * Represents a segment of a validation path.
48
- * It can be either a string (for object properties) or a number (for array indices).
49
- */
50
- type Segment = PropertyKey | StandardSchemaV1.PathSegment;
51
- /**
52
- * Maps the index an array item occupied before a mutation to the index it
53
- * occupies after that mutation, or to `undefined` when the mutation removed the
54
- * item entirely.
55
- *
56
- * Each array mutation in `NotArrayField` (`prepend`, `remove`, `insert`,
57
- * `swap`, `move`) builds one of these to describe exactly how it reshuffles
58
- * indices, then passes it to `remapArrayFieldState`.
59
- * @param previousIndex The index the item occupied before the mutation.
60
- * @returns The index the item occupies after the mutation, or `undefined` if the item was removed.
61
- */
62
- type ArrayItemIndexMap = (previousIndex: number) => number | undefined;
63
56
  //#endregion
64
- //#region src/types/use-not-form.d.ts
57
+ //#region src/types/not-form-instance.d.ts
65
58
  /**
66
- * Configuration options for initializing a new form instance.
59
+ * Full form instance used by field components. `useNotForm` returns {@linkcode NotFormAPI}.
67
60
  * @template TSchema The form schema.
68
61
  */
69
- interface UseNotFormConfig<TSchema extends ObjectSchema> {
70
- /** The validation schema used to parse and validate form data */
71
- schema: MaybeRefOrGetter<TSchema>;
72
- /** The initial values of the form */
73
- initialValues?: DeepPartial<StandardSchemaV1.InferInput<TSchema>>;
74
- /** The initial errors of the form */
75
- initialErrors?: Array<StandardSchemaV1.Issue>;
62
+ interface NotFormInstance<TSchema extends ObjectSchema> {
63
+ /** Live field values. */
64
+ values: InferInput<TSchema>;
76
65
  /**
77
- * The validation triggers of the form.
78
- * @default { onBlur: true, onChange: true, onInput: true }
66
+ * Sets a field value by path. Does not validate — validation still only
67
+ * runs through a field's own configured triggers, or an explicit
68
+ * {@linkcode validate}/{@linkcode validateField} call.
69
+ * @template TPath Field path.
70
+ * @param path Dot path.
71
+ * @param value Value to assign.
79
72
  */
80
- validateOn?: Partial<Record<ValidationTrigger, boolean>>;
73
+ setValue: <TPath extends Paths$1<TSchema>>(path: TPath, value: Get<InferInput<TSchema>, TPath, {
74
+ strict: false;
75
+ }>) => void;
76
+ /** Whether any field is touched. */
77
+ isTouched: boolean;
81
78
  /**
82
- * The validation mode of the form.
83
- * @default 'eager'
79
+ * Touched field paths.
80
+ * @internal
84
81
  */
85
- validationMode?: ValidationMode;
82
+ touchedFields: Set<Paths$1<TSchema>>;
86
83
  /**
87
- * Callback triggered when form validation passes and the form is submitted.
88
- * @param values The validated output data from the schema.
84
+ * Marks a field as touched.
85
+ * @internal
86
+ * @param path Dot path.
89
87
  */
90
- onSubmit?: (values: StandardSchemaV1.InferOutput<TSchema>) => Promise<void> | void;
91
- }
92
- //#endregion
93
- //#region src/types/not-form.d.ts
94
- /**
95
- * The complete state and API of a form instance returned by `useNotForm`.
96
- * @template TSchema The form schema.
97
- */
98
- type NotFormInstance<TSchema extends ObjectSchema> = Raw<{
99
- /** The values the form was initialised or last reset with. */
100
- readonly initialValues: UseNotFormConfig<TSchema>['initialValues'];
101
- /** The errors the form was initialised or last reset with. */
102
- readonly initialErrors: UseNotFormConfig<TSchema>['initialErrors'];
103
- /** The resolved validation triggers for this form. */
104
- readonly validateOn: Required<NonNullable<UseNotFormConfig<TSchema>['validateOn']>>;
105
- /** The resolved validation mode for this form. */
106
- readonly validationMode: Required<NonNullable<UseNotFormConfig<TSchema>['validationMode']>>;
88
+ markFieldAsTouched: (path: Paths$1<TSchema>) => void;
107
89
  /**
108
- * Deeply reactive object of field values.
109
- * @example
110
- * - Access directly — no `.value` needed:
111
- * ```ts
112
- * form.values.email
113
- * ```
114
- *
115
- * - Use with `v-model` for two-way binding:
116
- * ```vue
117
- * <template>
118
- * <input v-model="form.values.email" />
119
- * </template>
120
- * ```
90
+ * Marks every current leaf field as touched. "Current" matters for arrays:
91
+ * an empty array contributes no leaf paths, so an item appended afterward
92
+ * (e.g. via `<NotArrayField>`'s `append`) starts untouched even though
93
+ * this was already called.
94
+ * @internal
121
95
  */
122
- values: StandardSchemaV1.InferInput<TSchema>;
96
+ markAllFieldsAsTouched: () => void;
123
97
  /**
124
- * Sets a field value by dot-separated path.
125
- *
126
- * Useful for deeply nested paths or custom inputs that do not use `v-model`.
127
- * Does **not** trigger validation — the field's event handlers are responsible for that.
128
- * @param path The dot-separated path to the field.
129
- * @param value The value to set.
130
- * @example
131
- * ```ts
132
- * form.setValue('address.city', 'Lagos')
133
- * ```
98
+ * Clears touched state for one field.
99
+ * @internal
100
+ * @param path Dot path.
134
101
  */
135
- setValue: <TPath extends Paths<StandardSchemaV1.InferInput<TSchema>>>(path: TPath, value: Get<StandardSchemaV1.InferInput<TSchema>, TPath, {
136
- strict: false;
137
- }>) => void;
102
+ unmarkFieldAsTouched: (path: Paths$1<TSchema>) => void;
138
103
  /**
139
- * The set of field paths the user has interacted with.
140
- * Populated for all paths when the form is submitted.
104
+ * Clears touched state for all fields.
105
+ * @internal
141
106
  */
142
- touchedFields: Set<Paths<StandardSchemaV1.InferInput<TSchema>>>;
143
- /** Whether any field has been touched. */
144
- isTouched: ComputedRef<boolean>;
107
+ unmarkAllFieldsAsTouched: () => void;
145
108
  /**
146
- * Marks a field as touched.
147
- * Called automatically by the field's `onBlur` handler.
148
- * @param path The dot-separated path to the field.
149
- * @example
150
- * ```ts
151
- * form.touchField('address.city')
152
- * ```
109
+ * Paths whose value differs from the baseline.
110
+ * @internal
153
111
  */
154
- touchField: (path: Paths<StandardSchemaV1.InferInput<TSchema>>) => void;
155
- /** The set of field paths whose current value differs from the initial value. */
156
- dirtyFields: Set<Paths<StandardSchemaV1.InferInput<TSchema>>>;
157
- /** Whether any field value differs from its initial value. */
158
- isDirty: ComputedRef<boolean>;
112
+ dirtyFields: Set<Paths$1<TSchema>>;
113
+ /** Whether any field is dirty. */
114
+ isDirty: boolean;
159
115
  /**
160
- * Marks a field as dirty.
161
- * Called automatically when a field value changes.
162
- * @param path The dot-separated path to the field.
163
- * @example
164
- * ```ts
165
- * form.dirtyField('address.city')
166
- * ```
116
+ * Updates dirty state by comparing current and baseline values.
117
+ * @internal
118
+ * @param path Dot path.
167
119
  */
168
- dirtyField: (path: Paths<StandardSchemaV1.InferInput<TSchema>>) => void;
169
- /** The raw validation issues produced by the last validation run. */
170
- errors: Array<StandardSchemaV1.Issue>;
120
+ syncDirtyState: (path: Paths$1<TSchema>) => void;
171
121
  /**
172
- * A flat map of field path to its first error message.
173
- *
174
- * Convenient for direct template access without calling `getFieldErrors`
175
- * @example
176
- * ```vue
177
- * <template>
178
- * <p>{{ form.errorsMap['address.city'] }}</p>
179
- * </template>
180
- * ```
122
+ * Updates dirty state for every current leaf field. Subject to the same
123
+ * "current shape only" caveat as {@linkcode markAllFieldsAsTouched}.
124
+ * @internal
125
+ */
126
+ syncAllDirtyStates: () => void;
127
+ /**
128
+ * Forces a field dirty.
129
+ * @internal
130
+ * @param path Dot path.
131
+ */
132
+ markFieldAsDirty: (path: Paths$1<TSchema>) => void;
133
+ /**
134
+ * Forces every current leaf field dirty. Subject to the same
135
+ * "current shape only" caveat as {@linkcode markAllFieldsAsTouched}.
136
+ * @internal
137
+ */
138
+ markAllFieldsAsDirty: () => void;
139
+ /**
140
+ * Clears dirty state for one field.
141
+ * @internal
142
+ * @param path Dot path.
181
143
  */
182
- errorsMap: ComputedRef<Partial<Record<Paths<StandardSchemaV1.InferInput<TSchema>>, string>>>;
144
+ unmarkFieldAsDirty: (path: Paths$1<TSchema>) => void;
183
145
  /**
184
- * Replaces an existing error for the same path, or appends it if none exists.
185
- * Useful for setting server-side errors after submission.
186
- * @param error The validation issue to set.
187
- * @example
188
- * ```ts
189
- * form.setError({ message: 'Invalid email', path: ['email'] })
190
- * ```
146
+ * Clears dirty state for all fields.
147
+ * @internal
191
148
  */
192
- setError: (error: StandardSchemaV1.Issue) => void;
149
+ unmarkAllFieldsAsDirty: () => void;
150
+ /** Issues from the last validation that wrote errors. */
151
+ errors: Array<Issue>;
193
152
  /**
194
- * Replaces all current errors with the provided issues.
195
- * @param errors The validation issues to set.
196
- * @example
197
- * ```ts
198
- * form.setErrors([
199
- * { message: 'Invalid email', path: ['email'] },
200
- * { message: 'Phone number must be at least 11 digits', path: ['phone'] }
201
- * ])
202
- * ```
153
+ * Upserts an issue at the same path, or appends it.
154
+ * @param error Issue to set.
155
+ */
156
+ setError: (error: Issue) => void;
157
+ /**
158
+ * Replaces the entire error list.
159
+ * @internal
160
+ * @param errors Replacement issues.
161
+ */
162
+ replaceErrors: (errors: Array<Issue>) => void;
163
+ /**
164
+ * Removes every issue.
165
+ * @internal
203
166
  */
204
- setErrors: (errors: Array<StandardSchemaV1.Issue>) => void;
205
- /** Removes all active validation errors. */
206
167
  clearErrors: () => void;
207
168
  /**
208
- * Get all the validation issues for a specific field path.
209
- * @param path The dot-separated path to the field.
210
- * @returns An array of validation issues for the given field path.
211
- * @example
212
- * ```ts
213
- * form.getFieldErrors('address.city')
214
- * ```
169
+ * Issues whose path exactly equals `path` — not issues nested underneath it.
170
+ *
171
+ * `getFieldErrors('groups.0')` will not return an issue reported at
172
+ * `groups.0.name`.
173
+ *
174
+ * `<NotArrayField>`'s `isValid`/`isTouched`/`isDirty`/
175
+ * `isValidating` aggregate recursively instead, for exactly this reason.
176
+ * @param path Dot path.
177
+ * @returns Matching issues.
215
178
  */
216
- getFieldErrors: (path: Paths<StandardSchemaV1.InferInput<TSchema>>) => Array<StandardSchemaV1.Issue>;
217
- /** Whether a validation run is currently in progress. */
218
- isValidating: Ref<boolean>;
179
+ getFieldErrors: (path: Paths$1<TSchema>) => Array<Issue>;
180
+ /** Whether any validation is in flight. */
181
+ isValidating: boolean;
182
+ /** Whether there are zero issues. */
183
+ isValid: boolean;
219
184
  /**
220
- * Validates the entire form against the schema.
221
- * Replaces all current errors with the result.
222
- * @returns A promise that resolves to the result of the validation.
185
+ * Paths currently validating.
186
+ * @internal
223
187
  */
224
- validate: () => Promise<StandardSchemaV1.Result<StandardSchemaV1.InferOutput<TSchema>>>;
188
+ validatingFields: Set<Paths$1<TSchema>>;
225
189
  /**
226
- * Validates a single field against the schema.
227
- * Only replaces errors for that field — all other fields are left untouched.
228
- * @param path The dot-separated path to the field.
229
- * @returns A promise that resolves to the result of the validation.
230
- * @example
231
- * ```ts
232
- * form.validateField('email')
233
- * ```
190
+ * Validates the whole form and replaces all errors.
191
+ *
192
+ * Concurrent calls are last-write-wins: each call still resolves with its
193
+ * own result, but only the most recently started call's result is written
194
+ * to `errors` — an older call that resolves later has its result silently
195
+ * discarded from shared state.
196
+ * @returns Standard Schema result.
234
197
  */
235
- validateField: (path: Paths<StandardSchemaV1.InferInput<TSchema>>) => Promise<StandardSchemaV1.Result<StandardSchemaV1.InferOutput<TSchema>>>;
236
- /** Whether the form currently has no validation errors. */
237
- isValid: ComputedRef<boolean>;
238
- /** Whether the form is currently running its submit handler. */
239
- isSubmitting: Ref<boolean>;
198
+ validate: () => Promise<StandardSchemaV1.Result<InferOutput<TSchema>>>;
240
199
  /**
241
- * Validates the form and runs `onSubmit` if it passes.
200
+ * Validates the form and writes issues only for `path`.
201
+ *
202
+ * `path` can be any granularity — a leaf field, an entire array field, or
203
+ * a specific item inside one; `<NotField>` and `<NotArrayField>` both call
204
+ * this with their own `path` internally.
242
205
  *
243
- * Marks all fields as touched and dirty before validating so all errors surface.
244
- * If validation fails, submission is aborted.
245
- * @param event The submit event.
246
- * @returns A promise that resolves when the form is submitted.
206
+ * Concurrent calls for the same `path` are last-write-wins, the same as
207
+ * {@linkcode validate}; a call started after this one, or a whole-form
208
+ * {@linkcode validate} call, supersedes it.
209
+ * @param path Dot path.
210
+ * @returns Standard Schema result.
211
+ */
212
+ validateField: (path: Paths$1<TSchema>) => Promise<StandardSchemaV1.Result<InferOutput<TSchema>>>;
213
+ /** Whether `onSubmit` is running. */
214
+ isSubmitting: boolean;
215
+ /**
216
+ * Touches all fields, validates, then runs `onSubmit` when valid.
217
+ * @param event Optional submit event. When given, `event.preventDefault()`
218
+ * is called immediately, before anything else — including before checking
219
+ * whether a submission is already in flight or whether validation passes.
247
220
  */
248
- submit: (event: SubmitEvent) => Promise<void>;
221
+ submit: (event?: SubmitEvent) => Promise<void>;
249
222
  /**
250
- * Resets the form to its initial state, or to new values and errors if provided.
223
+ * Restores values/errors to the baseline. Optional arguments become the
224
+ * new baseline, and reset to it immediately.
251
225
  *
252
- * Clears all touched and dirty tracking. If `values` or `errors` are passed,
253
- * they replace the stored baseline so subsequent resets return to the new state.
254
- * @param values Optional new values to reset the form to.
255
- * @param errors Optional new errors to reset the form to.
256
- * @example
257
- * ```ts
258
- * // Reset to original initial values
259
- * form.reset()
226
+ * `values`/`errors`, when given, fully replace the previous baseline —
227
+ * they are not merged with it. Any top-level key present in the old
228
+ * baseline but missing from `values` is simply gone afterward, the same
229
+ * way `initialValues`/`initialErrors` passed to `useNotForm` become the
230
+ * literal starting baseline rather than defaults merged with something
231
+ * else.
260
232
  *
261
- * // Reset to new values and errors (becomes the new baseline)
262
- * form.reset(
263
- * { name: 'Jane' },
264
- * [
265
- * { message: 'Invalid email', path: ['email'] }
266
- * ]
267
- * )
268
- * ```
233
+ * Also bumps the internal validation generation, so any `validate()`/
234
+ * `validateField()` call already in flight when this runs will still
235
+ * resolve with its own result, but will not write its issues to `errors`.
236
+ * @param values New baseline values.
237
+ * @param errors New baseline issues.
269
238
  */
270
- reset: (values?: DeepPartial<StandardSchemaV1.InferInput<TSchema>>, errors?: Array<StandardSchemaV1.Issue>) => void;
271
- }>;
272
- /** Props for the `NotForm` component. */
273
- interface NotFormProps {
274
- /** The form instance to provide to all descendant `NotField` components. */
275
- form: NotFormInstance<any>;
276
- }
277
- /** Slots for the `NotForm` component. */
278
- interface NotFormSlots {
279
- /** The default slot receives the full form instance */
280
- default?: () => any;
239
+ reset: (values?: DeepPartial<InferInput<TSchema>>, errors?: Array<Issue>) => void;
281
240
  }
282
241
  //#endregion
242
+ //#region src/types/not-form-api.d.ts
243
+ /**
244
+ * Public API from `useNotForm`: {@linkcode NotFormInstance} without `@internal` members.
245
+ *
246
+ * The excluded members are the path-set accessors and mutation helpers that
247
+ * `<NotField>` and `<NotArrayField>` use directly — `touchedFields`,
248
+ * `markFieldAsTouched`, `dirtyFields`, `syncDirtyState`, `validatingFields`,
249
+ * `replaceErrors`, `clearErrors`, and their siblings. Application code
250
+ * normally reaches the same information through `isTouched`/`isDirty`/
251
+ * `isValidating`, or through a specific field's own slot props, rather than
252
+ * these lower-level sets and setters directly.
253
+ * @template TSchema The form schema.
254
+ */
255
+ type NotFormAPI<TSchema extends ObjectSchema> = Pick<NotFormInstance<TSchema>, 'errors' | 'getFieldErrors' | 'isDirty' | 'isSubmitting' | 'isTouched' | 'isValid' | 'isValidating' | 'reset' | 'setError' | 'setValue' | 'submit' | 'validate' | 'validateField' | 'values'>;
256
+ //#endregion
283
257
  //#region src/types/not-array-field.d.ts
284
258
  /**
285
- * Props for the `NotArrayField` component.
286
- * @template TItemSchema The schema for a single array item.
259
+ * One array item from `<NotArrayField>`'s default slot.
260
+ * @template TSchema The form schema.
287
261
  */
288
- interface NotArrayFieldProps<TItemSchema extends StandardSchemaV1 = StandardSchemaV1> {
289
- /** Dot-separated path to the array within the form values. */
290
- path: string;
262
+ interface NotArrayFieldItem<TSchema extends ObjectSchema> {
263
+ /** Stable identity for `v-for` `:key`. Independent of the current index. */
264
+ key: string;
265
+ /** Dot path of this item at its **current** index. */
266
+ path: Paths$1<TSchema>;
267
+ /** Current position in the array. */
268
+ index: number;
269
+ }
270
+ /**
271
+ * Props for `<NotArrayField>`.
272
+ * @template TSchema The form schema.
273
+ * @template TItemSchema Item schema used only to type mutation helpers.
274
+ */
275
+ interface NotArrayFieldProps<TSchema extends ObjectSchema, TItemSchema extends StandardSchemaV1 = StandardSchemaV1> {
276
+ /** Dot path of the array field. */
277
+ path: Paths$1<TSchema>;
291
278
  /**
292
- * Schema for a single array item — used purely for type inference.
293
- * Enables typed `append`, `prepend`, `insert`, and `update` methods in the slot.
279
+ * Item schema for type inference only; never read at runtime. Does not
280
+ * validate items — array items are still validated through the form's
281
+ * own schema, the same as any other field.
294
282
  */
295
283
  itemSchema?: TItemSchema;
296
- /**
297
- * Explicit form instance override.
298
- * Takes priority over the instance provided by a `NotForm` ancestor.
299
- * Required when using `NotArrayField` outside of a `NotForm`.
300
- */
301
- form?: NotFormInstance<any>;
302
- /**
303
- * Per-field validation trigger overrides applied to the array as a whole.
304
- * Merged over the form-wide `validateOn` — only the keys you specify are overridden.
305
- */
306
- validateOn?: Partial<Record<Extract<ValidationTrigger, 'onChange' | 'onMount'>, boolean>>;
307
- }
308
- /** Represents a single item in the array field. */
309
- interface NotArrayFieldItem {
310
- /** Stable key used for looping — does not change when items are reordered. */
311
- key: string;
312
- /** Current index of this item in the array. */
313
- index: number;
314
- /** Full dot-separated path to this item — pass directly to `NotField`. */
315
- path: string;
284
+ /** Form instance. Overrides `<NotForm>` inject. Required outside `<NotForm>`. */
285
+ form?: NotFormAPI<TSchema>;
316
286
  }
317
287
  /**
318
- * Slots for the `NotArrayField` component.
288
+ * Slot props for `<NotArrayField>`.
319
289
  * @template TSchema The form schema.
320
- * @template TItem An array field item.
290
+ * @template TItemSchema Item schema used only to type mutation helpers.
321
291
  */
322
- interface NotArrayFieldSlots<TSchema extends ObjectSchema, TItem = any> {
323
- /** The default slot receives the full array state and manipulation methods. */
324
- default: (props: {
325
- /** The dot-separated path to this array field. */
292
+ interface NotArrayFieldSlots<TSchema extends ObjectSchema, TItemSchema extends StandardSchemaV1 = StandardSchemaV1> {
293
+ default?: (props: {
294
+ /** Dot path of the array field. */
326
295
  path: string;
327
- /** The array items with stable keys and paths. */
328
- items: Array<NotArrayFieldItem>;
329
- /** All validation issues for this array field from the last validation run. */
330
- errors: Array<StandardSchemaV1.Issue>;
331
- /** Whether this array field currently has no validation errors. */
296
+ /** Current items, each with a stable key and current path. */
297
+ items: Array<NotArrayFieldItem<TSchema>>;
298
+ /**
299
+ * Issues reported exactly at the array field's own path — not issues
300
+ * from individual items.
301
+ *
302
+ * The same exact-match behavior as `<NotField>`'s `errors`.
303
+ *
304
+ * See {@linkcode isValid} for the aggregate that also accounts for item-level issues.
305
+ */
306
+ errors: Array<Issue>;
307
+ /**
308
+ * Whether the array field's own path, and every path nested underneath
309
+ * it, have no issues — an item's own value, a field inside an object
310
+ * item, or an item inside a nested array, at any depth.
311
+ *
312
+ * Unlike {@linkcode errors}, this recurses.
313
+ */
332
314
  isValid: boolean;
333
315
  /**
334
- * Whether any item in this array has been touched.
335
- * Derived from the form's `touchedFields` set.
316
+ * Whether the array field's own path, or any path nested underneath it, has been touched.
317
+ *
318
+ * Recurses the same way as {@linkcode isValid}.
336
319
  */
337
320
  isTouched: boolean;
338
321
  /**
339
- * Whether any item in this array differs from its initial value.
340
- * Derived from the form's `dirtyFields` set.
322
+ * Whether the array field's own path, or any path nested underneath it, differs from the baseline.
323
+ *
324
+ * Recurses the same way as {@linkcode isValid}.
341
325
  */
342
326
  isDirty: boolean;
343
- /** Whether validation is currently running for this array field. */
344
- isValidating: boolean;
345
327
  /**
346
- * Manually triggers validation for this array field.
347
- * Useful when mutations are performed programmatically outside of the normal flow.
348
- * @returns A promise that resolves to the result of the validation.
328
+ * Whether the array field's own path, or any path nested underneath it, is currently validating.
329
+ *
330
+ * Recurses the same way as {@linkcode isValid}.
349
331
  */
350
- validate: () => ReturnType<NotFormInstance<TSchema>['validateField']>;
332
+ isValidating: boolean;
351
333
  /**
352
- * Appends a new item to the end of the array.
353
- * @param value The value to append.
334
+ * Appends a value at the end.
335
+ * @param value Value to append.
354
336
  */
355
- append: (value: TItem) => void;
337
+ append: (value: InferInput<TItemSchema>) => void;
356
338
  /**
357
- * Prepends a new item to the beginning of the array.
358
- * @param value The value to prepend.
339
+ * Inserts a value at the start. Shifts every existing item's own
340
+ * state — at any depth underneath it — forward by one position along
341
+ * with it.
342
+ * @param value Value to prepend.
359
343
  */
360
- prepend: (value: TItem) => void;
344
+ prepend: (value: InferInput<TItemSchema>) => void;
361
345
  /**
362
- * Removes the item at the given index.
363
- * @param index The index of the item to remove.
346
+ * Inserts a value at `index`, shifting later items — and their own
347
+ * state, at any depth underneath them — back by one position.
348
+ * @param index Insertion index.
349
+ * @param value Value to insert.
364
350
  */
365
- remove: (index: number) => void;
351
+ insert: (index: number, value: InferInput<TItemSchema>) => void;
366
352
  /**
367
- * Inserts a new item at the given index, shifting subsequent items forward.
368
- * @param index The index to insert the item at.
369
- * @param value The value to insert.
353
+ * Removes the item at `index`. That item's own state — at any depth
354
+ * underneath it — is discarded along with it; every later item's state
355
+ * shifts back by one position to follow it to its new index.
356
+ * @param index Index to remove.
370
357
  */
371
- insert: (index: number, value: TItem) => void;
358
+ remove: (index: number) => void;
372
359
  /**
373
- * Replaces the value at the given index.
374
- * @param index The index of the item to replace.
375
- * @param value The value to replace with.
360
+ * Replaces the value at `index` without changing its key.
361
+ * @param index Index to update.
362
+ * @param value New value.
376
363
  */
377
- update: (index: number, value: TItem) => void;
364
+ update: (index: number, value: InferInput<TItemSchema>) => void;
378
365
  /**
379
- * Swaps the positions of two items in the array.
380
- * @param indexA The index of the first item.
381
- * @param indexB The index of the second item.
366
+ * Swaps two items, moving keys and form state — at any depth
367
+ * underneath each item — with them.
368
+ * @param indexA First index.
369
+ * @param indexB Second index.
382
370
  */
383
371
  swap: (indexA: number, indexB: number) => void;
384
372
  /**
385
- * Moves an item from one index to another, shifting items between them.
386
- * @param from The current index of the item.
387
- * @param to The target index.
373
+ * Moves an item from `from` to `to`, moving keys and form state — at
374
+ * any depth underneath it — with it.
375
+ * @param from Current index.
376
+ * @param to Destination index.
388
377
  */
389
378
  move: (from: number, to: number) => void;
390
- }) => any;
379
+ }) => void;
391
380
  }
392
381
  //#endregion
393
382
  //#region src/components/not-array-field.vue.d.ts
394
- declare const __VLS_export$3: <TSchema extends ObjectSchema, TItemSchema extends StandardSchemaV1 = StandardSchemaV1, TItem = StandardSchemaV1.InferInput<TItemSchema>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal$1<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
395
- props: import("vue").PublicProps & __VLS_PrettifyLocal$1<NotArrayFieldProps<TItemSchema>> & (typeof globalThis extends {
383
+ declare const __VLS_export$3: <TSchema extends ObjectSchema, TItemSchema extends StandardSchemaV1 = StandardSchemaV1>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal$3<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
384
+ props: import("vue").PublicProps & __VLS_PrettifyLocal$3<NotArrayFieldProps<TSchema, TItemSchema>> & (typeof globalThis extends {
396
385
  __VLS_PROPS_FALLBACK: infer P;
397
386
  } ? P : {});
398
387
  expose: (exposed: {}) => void;
399
388
  attrs: any;
400
- slots: NotArrayFieldSlots<TSchema, TItem>;
389
+ slots: NotArrayFieldSlots<TSchema, TItemSchema>;
401
390
  emit: {};
402
391
  }>) => import("vue").VNode & {
403
392
  __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
404
393
  };
405
394
  declare const _default: typeof __VLS_export$3;
406
- type __VLS_PrettifyLocal$1<T> = (T extends any ? { [K in keyof T]: T[K]; } : { [K in keyof T as K]: T[K]; }) & {};
395
+ type __VLS_PrettifyLocal$3<T> = (T extends any ? { [K in keyof T]: T[K]; } : { [K in keyof T as K]: T[K]; }) & {};
407
396
  //#endregion
408
397
  //#region src/types/not-field.d.ts
409
- /** Props for the `NotField` component. */
410
- interface NotFieldProps {
411
- /** Dot-separated path to this field within the form values. */
412
- path: string;
413
- /**
414
- * Explicit form instance override.
415
- * Takes priority over the instance provided by a `NotForm` ancestor.
416
- * Required when using `NotField` outside of a `NotForm`.
417
- */
418
- form?: NotFormInstance<any>;
398
+ /**
399
+ * Props for `<NotField>`.
400
+ * @template TSchema The form schema.
401
+ */
402
+ interface NotFieldProps<TSchema extends ObjectSchema> {
403
+ /** Dot path of this field. */
404
+ path: Paths$1<TSchema>;
405
+ /** Form instance. Overrides `<NotForm>` inject. Required outside `<NotForm>`. */
406
+ form?: NotFormAPI<TSchema>;
419
407
  /**
420
- * Per-field validation trigger overrides.
421
- * Merged over the form-wide `validateOn` — only the keys you specify are overridden.
408
+ * Validation triggers merged over `{ onBlur: true, onChange: true }`.
409
+ *
410
+ * `onMount` is also a valid trigger here, even though it has no matching
411
+ * entry in `events` slot prop — there's no DOM event to bind for "the field
412
+ * just appeared," so it runs automatically, once, when the field mounts.
413
+ * @default { onBlur: true, onChange: true }
422
414
  */
423
415
  validateOn?: Partial<Record<ValidationTrigger, boolean>>;
424
416
  /**
425
- * Debounce delay in milliseconds for input- and change-triggered validation.
426
- *
427
- * When set, validation is deferred until the user stops typing for the given
428
- * duration. Only the final call within the window runs — earlier ones are
429
- * cancelled. Useful for async validators (e.g. username availability checks)
430
- * where firing on every keystroke would cause excessive requests.
431
- *
432
- * Blur- and submit-triggered validation always runs immediately, regardless
433
- * of this setting, so the field never feels unresponsive when the user leaves.
434
- *
435
- * Omit or set to `0` to disable debouncing (default behaviour).
417
+ * `lazy` — blur/submit only. `eager` — also revalidate on change/input while invalid.
418
+ * @default 'eager'
436
419
  */
420
+ validationMode?: 'eager' | 'lazy';
421
+ /** Debounce in ms for input/change validation. Blur always runs immediately. */
437
422
  debounce?: number;
438
423
  }
439
- /**
440
- * Slots for the `NotField` component.
441
- * @template TSchema The form schema.
442
- */
443
- interface NotFieldSlots<TSchema extends ObjectSchema> {
444
- /** The default slot receives the full field state and event handlers. */
424
+ /** Slot props for `<NotField>`. */
425
+ interface NotFieldSlots {
445
426
  default?: (props: {
446
- /** The dot-separated path to this field. */
447
- path: string;
427
+ /** Issues for this field path. */
428
+ errors: Array<Issue>;
448
429
  /**
449
- * The current value of this field — read-only snapshot for display purposes.
450
- * Do not mutate directly or use with `v-model`.
451
- * For two-way binding use `v-model="form.values.fieldName"` instead.
430
+ * Handlers to bind to the input. `onMount` is deliberately excluded —
431
+ * see the note on `validateOn` prop for why.
452
432
  */
453
- value: any;
454
- /** All validation issues for this field from the last validation run. */
455
- errors: Array<StandardSchemaV1.Issue>;
456
- /** Whether this field currently has no validation errors. */
457
- isValid: boolean;
458
- /** Whether the user has interacted with this field, or the form has been submitted. */
459
- isTouched: boolean;
460
- /** Whether this field's current value differs from its initial value. */
433
+ events: Record<ExcludeStrict<ValidationTrigger, 'onMount'>, () => void>;
434
+ /** Whether the value differs from the baseline. */
461
435
  isDirty: boolean;
462
- /** Whether an async validator is currently running for this field. */
436
+ /** Whether the user has interacted with this field. */
437
+ isTouched: boolean;
438
+ /** Whether this field has no issues. */
439
+ isValid: boolean;
440
+ /** Whether this field is currently validating. */
463
441
  isValidating: boolean;
464
- /**
465
- * Manually triggers validation for this field.
466
- * Useful for custom inputs that manage their own interaction events.
467
- * @returns A promise that resolves to the result of the validation.
468
- */
469
- validate: () => ReturnType<NotFormInstance<TSchema>['validateField']>;
470
- /**
471
- * Native DOM event handlers exposed by a field.
472
- * Spread onto a native input or bind individually to custom components.
473
- * @example
474
- * ```vue
475
- * <template>
476
- * <!-- spread -->
477
- * <input v-bind="events" />
478
- *
479
- * <!-- individual -->
480
- * <CustomCombobox v-on:focusout="events.onBlur" v-on:pick="events.onChange" />
481
- * </template>
482
- * ```
483
- */
484
- events: {
485
- /** Triggered when the field loses focus. */
486
- onBlur: () => void;
487
- /** Triggered on every keystroke or value change. */
488
- onInput: () => void;
489
- /** Triggered when the field value is committed. */
490
- onChange: () => void;
491
- /** Triggered when the field gains focus. */
492
- onFocus: () => void;
493
- };
494
- }) => any;
442
+ /** Dot path of this field. */
443
+ path: string;
444
+ }) => void;
495
445
  }
496
446
  //#endregion
497
447
  //#region src/components/not-field.vue.d.ts
498
- declare const __VLS_export$2: <TSchema extends ObjectSchema>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
499
- props: import("vue").PublicProps & __VLS_PrettifyLocal<NotFieldProps> & (typeof globalThis extends {
448
+ declare const __VLS_export$2: <TSchema extends ObjectSchema>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal$2<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
449
+ props: import("vue").PublicProps & __VLS_PrettifyLocal$2<NotFieldProps<TSchema>> & (typeof globalThis extends {
500
450
  __VLS_PROPS_FALLBACK: infer P;
501
451
  } ? P : {});
502
452
  expose: (exposed: {}) => void;
503
453
  attrs: any;
504
- slots: NotFieldSlots<TSchema>;
454
+ slots: NotFieldSlots;
505
455
  emit: {};
506
456
  }>) => import("vue").VNode & {
507
457
  __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
508
458
  };
509
459
  declare const _default$1: typeof __VLS_export$2;
510
- type __VLS_PrettifyLocal<T> = (T extends any ? { [K in keyof T]: T[K]; } : { [K in keyof T as K]: T[K]; }) & {};
460
+ type __VLS_PrettifyLocal$2<T> = (T extends any ? { [K in keyof T]: T[K]; } : { [K in keyof T as K]: T[K]; }) & {};
461
+ //#endregion
462
+ //#region src/types/not-form.d.ts
463
+ /**
464
+ * Props for `<NotForm>`.
465
+ * @template TSchema The form schema.
466
+ */
467
+ interface NotFormProps<TSchema extends ObjectSchema> {
468
+ /** Form instance provided to descendant field components. */
469
+ form: NotFormAPI<TSchema>;
470
+ }
471
+ /** Slot props for `<NotForm>`. */
472
+ interface NotFormSlots {
473
+ default?: () => void;
474
+ }
511
475
  //#endregion
512
476
  //#region src/components/not-form.vue.d.ts
513
- type __VLS_Slots$1 = NotFormSlots;
514
- declare const __VLS_base$1: import("vue").DefineComponent<NotFormProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<NotFormProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
515
- declare const __VLS_export$1: __VLS_WithSlots$1<typeof __VLS_base$1, __VLS_Slots$1>;
516
- declare const _default$2: typeof __VLS_export$1;
517
- type __VLS_WithSlots$1<T, S> = T & {
518
- new (): {
519
- $slots: S;
520
- };
477
+ declare const __VLS_export$1: <TSchema extends ObjectSchema>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal$1<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
478
+ props: import("vue").PublicProps & __VLS_PrettifyLocal$1<NotFormProps<TSchema>> & (typeof globalThis extends {
479
+ __VLS_PROPS_FALLBACK: infer P;
480
+ } ? P : {});
481
+ expose: (exposed: {}) => void;
482
+ attrs: any;
483
+ slots: NotFormSlots;
484
+ emit: {};
485
+ }>) => import("vue").VNode & {
486
+ __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
521
487
  };
488
+ declare const _default$2: typeof __VLS_export$1;
489
+ type __VLS_PrettifyLocal$1<T> = (T extends any ? { [K in keyof T]: T[K]; } : { [K in keyof T as K]: T[K]; }) & {};
522
490
  //#endregion
523
491
  //#region src/types/not-message.d.ts
524
- /** Props for the `NotMessage` component. */
525
- interface NotMessageProps {
492
+ /**
493
+ * Props for `<NotMessage>`.
494
+ * @template TSchema The form schema.
495
+ */
496
+ interface NotMessageProps<TSchema extends ObjectSchema> {
526
497
  /**
527
- * HTML Tag or component to render as
528
- * @default span
498
+ * Root element or component. When a component is given, the message is
499
+ * passed to it as **default slot content**, not as a prop — a component
500
+ * expecting a `message` prop instead will render with no visible text.
501
+ * @default 'span'
529
502
  */
530
503
  as?: Component | string;
531
- /** The name/path of the field whose error message should be displayed */
532
- path: string;
533
- /**
534
- * Explicit form instance override.
535
- * Takes priority over the instance provided by a `NotForm` ancestor.
536
- * Required when using `NotMessage` outside of a `NotForm`.
537
- */
538
- form?: NotFormInstance<any>;
504
+ /** Field path whose first error message is shown. */
505
+ path: Paths$1<TSchema>;
506
+ /** Form instance. Overrides `<NotForm>` inject. Required outside `<NotForm>`. */
507
+ form?: NotFormAPI<TSchema>;
539
508
  }
540
- /** Slots for the `NotMessage` component. */
509
+ /** Slot props for `<NotMessage>`. */
541
510
  interface NotMessageSlots {
542
- /** The default slot receives the error message context for custom rendering */
543
511
  default?: (props: {
544
- /** The first active validation error message for the specified field */
512
+ /** First active error message for `path`. */
545
513
  message?: string;
546
- }) => any;
514
+ }) => void;
547
515
  }
548
516
  //#endregion
549
517
  //#region src/components/not-message.vue.d.ts
550
- type __VLS_Slots = NotMessageSlots;
551
- declare const __VLS_base: import("vue").DefineComponent<NotMessageProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<NotMessageProps> & Readonly<{}>, {
552
- as: import("vue").Component | string;
553
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
554
- declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
555
- declare const _default$3: typeof __VLS_export;
556
- type __VLS_WithSlots<T, S> = T & {
557
- new (): {
558
- $slots: S;
559
- };
518
+ declare const __VLS_export: <TSchema extends ObjectSchema>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
519
+ props: import("vue").PublicProps & __VLS_PrettifyLocal<NotMessageProps<TSchema>> & (typeof globalThis extends {
520
+ __VLS_PROPS_FALLBACK: infer P;
521
+ } ? P : {});
522
+ expose: (exposed: {}) => void;
523
+ attrs: any;
524
+ slots: NotMessageSlots;
525
+ emit: {};
526
+ }>) => import("vue").VNode & {
527
+ __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
560
528
  };
529
+ declare const _default$3: typeof __VLS_export;
530
+ type __VLS_PrettifyLocal<T> = (T extends any ? { [K in keyof T]: T[K]; } : { [K in keyof T as K]: T[K]; }) & {};
531
+ //#endregion
532
+ //#region src/types/not-form-config.d.ts
533
+ /**
534
+ * Options passed to `useNotForm`.
535
+ * @template TSchema Validation schema.
536
+ */
537
+ interface UseNotFormConfig<TSchema extends ObjectSchema> {
538
+ /** Schema used to parse and validate values. */
539
+ schema: MaybeRefOrGetter<TSchema>;
540
+ /** Starting values; deep-cloned before use. */
541
+ initialValues?: DeepPartial<InferInput<TSchema>>;
542
+ /** Issues shown before the first validation run. */
543
+ initialErrors?: Array<Issue>;
544
+ /**
545
+ * Called after a successful submit validation.
546
+ * @param data Validated output.
547
+ */
548
+ onSubmit?: (data: InferOutput<TSchema>) => Promise<void> | void;
549
+ }
561
550
  //#endregion
562
551
  //#region src/composables/use-not-form.d.ts
563
552
  /**
564
- * Creates a reactive NotFormInstance for managing form state and validation.
565
- * @template TSchema The standard schema type.
566
- * @param config Configuration object.
567
- * @returns A reactive NotFormInstance.
553
+ * Creates a form instance and returns the public {@linkcode NotFormAPI}.
554
+ * @template TSchema The form schema.
555
+ * @param config Schema, initial values/errors, and submit handler.
556
+ * @returns Public form API. Child components still inject the full instance via `<NotForm>`.
568
557
  */
569
- declare function useNotForm<TSchema extends ObjectSchema>(config: UseNotFormConfig<TSchema>): NotFormInstance<TSchema>;
558
+ declare function useNotForm<TSchema extends ObjectSchema>(config: UseNotFormConfig<TSchema>): NotFormAPI<TSchema>;
570
559
  //#endregion
571
- export { type ArrayItemIndexMap, type DeepPartial, _default as NotArrayField, type NotArrayFieldItem, type NotArrayFieldProps, type NotArrayFieldSlots, _default$1 as NotField, type NotFieldProps, type NotFieldSlots, _default$2 as NotForm, type NotFormInstance, type NotFormProps, type NotFormSlots, _default$3 as NotMessage, type NotMessageProps, type NotMessageSlots, type ObjectSchema, type Paths, type Segment, type UseNotFormConfig, type ValidationMode, type ValidationTrigger, useNotForm };
560
+ export { _default as NotArrayField, type NotArrayFieldItem, type NotArrayFieldProps, type NotArrayFieldSlots, _default$1 as NotField, type NotFieldProps, type NotFieldSlots, _default$2 as NotForm, type NotFormAPI, type NotFormProps, type NotFormSlots, _default$3 as NotMessage, type NotMessageProps, type NotMessageSlots, type UseNotFormConfig, useNotForm };