import type { ZodType } from "zod"; import type { BlockRenderContext } from "./types.js"; /** * Schema-driven auto-editor. When a {@link BlockSpec} omits `Edit`, the registry * renders this: it walks the block's zod `data` schema and renders one control * per field (string → input, longtext → textarea, number, boolean → toggle, * enum → native select, array → repeating rows, object → nested fieldset). A * `markdown()`-tagged string field defers to the app-provided inline rich * editor via `ctx.renderMarkdownEditor` so prose stays Notion-editable. * * It uses plain accessible native controls (not template shadcn primitives, * which core does not bundle) styled to match the shadcn look. Validation runs * the spec's own schema on every edit; the raw edit is kept in local state so a * transiently-invalid value (e.g. mid-typing) doesn't get rolled back, and only * valid data is committed upstream. */ export declare function SchemaBlockEditor({ data, onChange, schema, editable, blockId, ctx, }: { data: T; onChange: (next: T) => void; schema: ZodType; editable: boolean; blockId?: string; ctx: BlockRenderContext; }): import("react").JSX.Element; //# sourceMappingURL=SchemaBlockEditor.d.ts.map