export type { FormField, FormFieldType, FormSection, FormEntry } from './form-field'; import { type FormEntry } from './form-field'; import { type FormMessages } from './createForm.svelte'; import type { EditorDir } from './editor-contract'; type Props = { fields: ReadonlyArray; initial?: Record; /** Called with the visible-field values on a valid submit. May be async - * the Submit button shows a loading state until it settles. */ onSubmit?: (values: Record) => void | Promise; onChange?: (values: Record) => void; /** When set, a secondary Cancel button renders next to Submit. */ onCancel?: () => void; submitLabel?: string; cancelLabel?: string; /** Show a Reset button that restores the initial values. */ showReset?: boolean; resetLabel?: string; /** Render titled sections as a validated multi-step wizard (requires sections). */ stepper?: boolean; /** Render titled sections as tabs (requires sections; ignored with `stepper`). */ tabs?: boolean; /** Columns in the responsive field grid (a section can override its own). */ columns?: number; disabled?: boolean; /** Inject server-side errors (`{ field: message }`); applied reactively. */ serverErrors?: Record; /** A form-level error message shown in a banner above the fields. */ formError?: string; /** Show a summary of field errors (with focus links) above the form after a * failed submit. */ errorSummary?: boolean; /** Heading for the error summary. Default "Please fix the following:". */ errorSummaryTitle?: string; /** * Re-seed the form when the `initial` object identity changes (e.g. editing a * different record). `off` (default) seeds once; `always` re-seeds on every * change; `ifPristine` re-seeds only when the user has no unsaved edits. */ reinitialize?: 'off' | 'always' | 'ifPristine'; /** Text direction; `rtl` mirrors the form layout. */ dir?: EditorDir; /** Override the built-in generated strings (required / min-max items / checking). */ messages?: Partial; }; declare const SvForm: import("svelte").Component; type SvForm = ReturnType; export default SvForm;