/** * The free-form JSON field: the honest editor for a schema node the form has no * STRUCTURED control for — a property-less object, a bare `additionalProperties`- * open object, an items-less array, an empty/multi-type/`allOf` shape. Rather than * dead-end on an "Unsupported" badge (a value the user can see but not set), it * offers a mono textarea seeded with the current value pretty-printed and commits * the PARSED value through the same `onChange` a structured field uses. * * Validation is LOUD and local: the buffer must parse as JSON, and — when the * schema commits to a container (`jsonType` `'object'`/`'array'`) — the parsed * value must be that container. An invalid buffer shows an inline error and does * NOT commit, so a half-typed edit never writes a broken value through; the last * committed value stands until the buffer is valid again. * * The buffer is LOCAL state (an invalid buffer has no committed value to derive * from), resynced only when a DIFFERENT value arrives from the parent — the same * `lastEmitted` guard `record-field` uses, so a parent echoing our own commit back * does not clobber what is being typed. */ import type { ReactNode } from 'react'; /** The JSON container a `json` field commits to (see `classify`). */ type JsonType = 'object' | 'array' | 'any'; export declare function JsonField({ heading, description, error, jsonType, nullable, value, onChange, }: { heading: string; description: string | undefined; error: string | undefined; jsonType: JsonType; nullable: boolean; value: unknown; onChange: (value: unknown) => void; }): ReactNode; export {}; //# sourceMappingURL=json-field.d.ts.map