import { ReactElement, ReactNode, type JSX } from 'react'; type Node = Element | Text; type Mark = 'bold' | 'italic' | 'underline' | 'strikethrough' | 'code' | 'superscript' | 'subscript' | 'keyboard'; type Element = { children: Node[]; [key: string]: unknown; }; type Text = { text: string; [key: string]: unknown; }; type Component = (props: Props) => ReactElement | null; type OnlyChildrenComponent = Component<{ children: ReactNode; }> | keyof JSX.IntrinsicElements; type MarkRenderers = { [Key in Mark]: OnlyChildrenComponent; }; interface Renderers { inline: { link: Component<{ children: ReactNode; href: string; }> | 'a'; } & MarkRenderers; block: { block: OnlyChildrenComponent; paragraph: Component<{ children: ReactNode; textAlign: 'center' | 'end' | undefined; }>; blockquote: OnlyChildrenComponent; code: Component<{ children: string; language?: string; [key: string]: unknown; }> | keyof JSX.IntrinsicElements; layout: Component<{ layout: [number, ...number[]]; children: ReactElement[]; }>; divider: Component<{}> | keyof JSX.IntrinsicElements; heading: Component<{ level: 1 | 2 | 3 | 4 | 5 | 6; children: ReactNode; textAlign: 'center' | 'end' | undefined; [key: string]: unknown; }>; list: Component<{ type: 'ordered' | 'unordered'; children: ReactElement[]; }>; image: Component<{ src: string; alt: string; title?: string; }>; table: Component<{ head?: { children: ReactNode; colSpan?: number; rowSpan?: number; }[]; body: { children: ReactNode; colSpan?: number; rowSpan?: number; }[][]; }>; }; } export declare const defaultRenderers: Renderers; export type DocumentRendererProps> = Record>> = { document: Element[]; renderers?: { inline?: Partial; block?: Partial; }; componentBlocks?: ComponentBlocks; }; export declare function DocumentRenderer>>(props: DocumentRendererProps): JSX.Element; export {};