import type { FormValue, Submission, SubmissionResult } from '@conform-to/dom/future'; import type { FormIntent, IntentHandler, NormalizeIntentType, UnknownIntent, TransportIntent, ResetIntent, SubmitIntent, ValidateIntent, UpdateIntent, InsertIntent, RemoveIntent, ReorderIntent, DefaultIntentHandlers } from './types'; export declare function defineIntent void, Payload = never>(definition?: Partial, Payload>>): IntentHandler, Payload>; export declare function mergeIntentHandlers>, CustomHandlers extends Record> | undefined>(defaultHandlers: DefaultHandlers, customHandlers: CustomHandlers): DefaultHandlers & CustomHandlers; /** * Serializes a transport intent to string format. */ export declare function serializeIntent(intent: TransportIntent): string; /** * Parses the serialized intent string into a transport intent. * Throws if the serialized arguments are malformed. */ export declare function deserializeIntent(serializedIntent: string): TransportIntent | undefined; export declare function parseIntent>>(intentValue: string | null, options: { handlers: Handlers; }): FormIntent, Handlers> | { type: 'submit'; payload: string | undefined; } | undefined; export declare function resolveIntent(submission: Submission, options: { handlers: Record>; intent: UnknownIntent | undefined; }): Record | undefined; export declare function applyIntent(result: SubmissionResult, intent: UnknownIntent | undefined, options: { handlers: Record>; }): SubmissionResult; export declare function insertItem(list: Array, item: Item, index: number): void; export declare function removeItem(list: Array, index: number): void; export declare function reorderItems(list: Array, fromIndex: number, toIndex: number): void; /** * Updates list keys by removing child keys and optionally transforming remaining keys. */ export declare function updateListKeys(keys: Record | undefined, keyToBeRemoved: string, updateKey?: (key: string) => string | null): Record; export declare const submit: IntentHandler; export declare const reset: IntentHandler; export declare const validate: IntentHandler; export declare const update: IntentHandler; export declare const insert: IntentHandler; export declare const remove: IntentHandler; export declare const reorder: IntentHandler; /** * Default Intent handlers * - reset: clears form data * - validate: marks fields as touched for validation display * - update: updates specific field values * - insert/remove/reorder: manages array field operations */ export declare const defaultIntentHandlers: DefaultIntentHandlers; /** * Parses and resolves a submission payload using the default form intent handlers. * * See https://conform.guide/api/react/future/resolveSubmission */ export declare function resolveSubmission> = {}>(submission: Submission, options?: { handlers?: IntentHandlers; }): { intent: FormIntent, DefaultIntentHandlers & IntentHandlers> | { type: 'submit'; payload: string | undefined; } | undefined; targetValue: Record | undefined; }; //# sourceMappingURL=intent.d.ts.map