import { ComponentType } from 'react'; /** Props passed to every render-extension component. */ interface RenderExtensionProps { /** The inner content of the custom tag (raw string). */ content: string; /** Parsed HTML attributes from the opening tag. */ attributes: Record; } /** Registers a custom tag with a React component for rendering. */ interface RenderExtension { /** Tag name to match, e.g. "questions", "thinking". Case-insensitive. */ tag: string; /** React component that renders the matched tag. */ component: ComponentType; /** * Whether this is a block-level element. * Block extensions are wrapped in a `
`, inline in a ``. * @default true */ block?: boolean; } /** A parsed segment — either raw HTML or a matched extension tag. */ type ContentSegment = { type: "html"; content: string; } | { type: "extension"; tag: string; content: string; attributes: Record; }; /** Register a single render extension globally (available to all ContentRenderer and Editor instances). */ declare function registerExtension(extension: RenderExtension): void; /** Register multiple render extensions globally. */ declare function registerExtensions(extensions: RenderExtension[]): void; export { type ContentSegment as C, type RenderExtension as R, type RenderExtensionProps as a, registerExtensions as b, registerExtension as r };