import type { SvelteMap } from "svelte/reactivity"; import type { DataURLToBlob } from "../../lib/file.js"; import type { Schema } from "../../core/index.js"; import type { Translate, Translation } from "../translation.js"; import { type ExtraUiOptions, type UiOptionsRegistry, type UiSchema, type UiSchemaRoot } from "../ui-schema.js"; import type { FormSubmission, FieldsValidation } from "../errors.js"; import type { Icons } from "../icons.js"; import type { FormMerger } from "../merger.js"; import type { Theme } from "../components.js"; import type { FormValue, KeyedArraysMap, PathTrieRef } from "../model.js"; import type { ResolveFieldType } from "../fields.js"; import { FORM_DATA_URL_TO_BLOB, FORM_DISABLED, FORM_UI_EXTRA_OPTIONS, FORM_RESOLVER, FORM_FIELDS_VALIDATION_MODE, FORM_ICONS, FORM_KEYED_ARRAYS, FORM_MARK_SCHEMA_CHANGE, FORM_MERGER, FORM_SCHEMA, FORM_THEME, FORM_TRANSLATE, FORM_TRANSLATION, FORM_UI_OPTIONS_REGISTRY, FORM_UI_SCHEMA, FORM_UI_SCHEMA_ROOT, FORM_VALIDATOR, FORM_VALUE, FORM_FIELDS_STATE_MAP, FORM_ID_FROM_PATH, FORM_ERRORS, FORM_PATHS_TRIE_REF, FORM_ROOT_PATH, FORM_ID_PREFIX, FormErrors, FORM_RETRIEVED_SCHEMA, FORM_CONFIGS_CACHE } from "../internals.js"; import type { FieldPath, Id } from "../id.js"; import type { FieldState } from "../field-state.js"; import type { FormValidator } from "../validator.js"; import type { Config } from "../config.js"; export interface FormState { readonly submission: FormSubmission; readonly fieldsValidation: FieldsValidation; readonly isChanged: boolean; readonly isSubmitted: boolean; submit: (e: SubmitEvent) => void; reset: (e?: Event) => void; [FORM_VALUE]: FormValue; readonly [FORM_ID_PREFIX]: string; readonly [FORM_ROOT_PATH]: FieldPath; readonly [FORM_ID_FROM_PATH]: (path: FieldPath) => Id; readonly [FORM_PATHS_TRIE_REF]: PathTrieRef; readonly [FORM_ERRORS]: FormErrors; readonly [FORM_MARK_SCHEMA_CHANGE]: () => void; readonly [FORM_KEYED_ARRAYS]: KeyedArraysMap; readonly [FORM_FIELDS_VALIDATION_MODE]: number; readonly [FORM_SCHEMA]: Schema; /** @deprecated */ readonly [FORM_RETRIEVED_SCHEMA]: Schema; readonly [FORM_UI_SCHEMA_ROOT]: UiSchemaRoot; readonly [FORM_UI_SCHEMA]: UiSchema; readonly [FORM_UI_OPTIONS_REGISTRY]: UiOptionsRegistry; readonly [FORM_UI_EXTRA_OPTIONS]?: ExtraUiOptions; readonly [FORM_VALIDATOR]: FormValidator; readonly [FORM_MERGER]: FormMerger; readonly [FORM_ICONS]?: Icons; readonly [FORM_DISABLED]: boolean; readonly [FORM_DATA_URL_TO_BLOB]: DataURLToBlob; readonly [FORM_TRANSLATION]: Translation; readonly [FORM_TRANSLATE]: Translate; readonly [FORM_RESOLVER]: ResolveFieldType; readonly [FORM_THEME]: Theme; readonly [FORM_FIELDS_STATE_MAP]: SvelteMap; readonly [FORM_CONFIGS_CACHE]: WeakMap; } export declare function getFormContext(): FormState; export declare function setFormContext(form: FormState): void; /** @deprecated use `setFormContext` */ export declare const setFormContext2: typeof setFormContext;