import { ReactNode } from 'react'; import { CustomFieldDef, CustomFieldDraft } from '../schema/index.ts'; /** * Host integration for custom fields. `fields` is the list the host seeded via * config; `createField` is called when an author creates one — the host * persists it and resolves with the finalized def (real `key`). `enabled` marks * "integration mode": the builder shows the author's fields instead of our * generic input types, since the host brings the real inputs. */ export interface CustomFieldsApi { fields: CustomFieldDef[]; enabled: boolean; createField?: (draft: CustomFieldDraft) => Promise; } export declare function CustomFieldsProvider({ fields, createField, children, }: { fields?: CustomFieldDef[]; createField?: (draft: CustomFieldDraft) => Promise; children: ReactNode; }): import("react").JSX.Element; export declare function useCustomFields(): CustomFieldsApi;