import type { FieldError, FieldRegistration, RegisterOptions } from './types'; /** UI slice for one field, computed by `` from the store. */ export type FormFieldPresentation = { error?: string; invalid: boolean; }; export type FormContextActions = { register: (registration: FieldRegistration) => () => void; updateFieldOptions: (name: string, options: RegisterOptions) => void; handleFieldChange: (name: string) => void; handleFieldBlur: (name: string) => void; /** Notified whenever the form publishes a new presentation snapshot. */ subscribePresentation: (listener: (value: FormContextValue) => void) => () => void; }; export type FormContextValue = { /** False until `` has created its store and bound real actions. */ ready: boolean; /** Bumps when form store state changes. */ revision: number; /** Per-field messages and invalid flags; only the form writes this map. */ fields: Record; /** Current validation errors keyed by field name, including errors not yet displayed by the validation mode. */ errors: Partial>; /** Registration and validation triggers; fields call these instead of touching the store. */ actions: FormContextActions; }; export declare const formContext: { __context__: FormContextValue; };