import type { CustomSerialize, FieldName, FormError, FormValue, Serialize, Submission, SubmissionResult, ValidationAttributes } from '@conform-to/dom/future'; import type { StandardSchemaV1 } from './standard-schema'; export type Prettify = { [K in keyof T]: T[K]; } & {}; /** Reference to a form element. Can be either a React ref object or a form ID string. */ export type FormRef = React.RefObject | string; export type DefaultControlValue = string | string[] | File | File[] | FileList; export type Control = { /** * Current string value derived from the control payload. */ value: string | undefined; /** * Checked state derived from the control payload. */ checked: boolean | undefined; /** * Current string array derived from the control payload. */ options: string[] | undefined; /** * Current file array derived from the control payload. */ files: File[] | undefined; /** * The rendered payload used as the source for base control(s). * * For simple native controls, this mirrors `defaultValue` / `defaultChecked`. * For structural controls (i.e. `
`), this is the latest payload * snapshot that drives which hidden inputs are rendered. */ defaultValue: DefaultValue | null | undefined; /** * Current payload snapshot derived from the registered base control(s). * * For structural controls (i.e. `
`), this is reconstructed from * descendant fields under the registered fieldset name. */ payload: Payload | null | undefined; /** * Registers the base control element. * * Accepts ``, `