import { StandardSchemaV1 } from "./types.mjs"; import { InputRule } from "../types.mjs"; //#region ../react-form/src/standard-schema/adapter.d.ts /** * Duck-type guard: is `value` a Standard-Schema-compliant validator? * * We intentionally avoid importing any concrete library — anything exposing a * `~standard.validate` function is accepted (seal, zod, valibot, arktype, …). */ declare function isStandardSchema(value: any): value is StandardSchemaV1; /** * Run a Standard Schema against a value and normalize the result to a plain * `{ issues }` shape. Always returns a Promise — the spec allows `validate` to * be sync or async, so we await uniformly. */ declare function runStandardSchema(schema: StandardSchemaV1, value: unknown): Promise>; /** * Convert a Standard Schema issue path (e.g. `["user", { key: "addresses" }, 0, * "city"]`) into a dot-notation form-control name (`user.addresses.0.city`). */ declare function issuePathToName(path: StandardSchemaV1.Issue["path"]): string; /** * Wrap a **single-field** Standard Schema as an `InputRule` so it can run inside * the per-control rule pipeline. The first issue's message becomes the rendered * error. * * Used by `useFormControl({ schema })`. The rule is async (the spec permits an * async `validate`) and participates in the engine's async gating just like any * other promise-returning rule. */ declare function standardSchemaToRule(schema: StandardSchemaV1, name?: string): InputRule; //#endregion export { isStandardSchema, issuePathToName, runStandardSchema, standardSchemaToRule }; //# sourceMappingURL=adapter.d.mts.map