import type { Config as DOMPurifyConfig } from 'dompurify'; import React, { ReactNode } from 'react'; import type { XMarkdownProps } from '../interface'; interface RendererOptions { components?: XMarkdownProps['components']; dompurifyConfig?: DOMPurifyConfig; streaming?: XMarkdownProps['streaming']; } declare class Renderer { private readonly options; private static readonly NON_WHITESPACE_REGEX; constructor(options: RendererOptions); private detectUnclosedTags; /** * Configure DOMPurify to preserve components and target attributes, filter everything else */ private configureDOMPurify; private createReplaceElement; private processChildren; processHtml(htmlString: string): React.ReactNode; render(html: string): ReactNode | null; } export default Renderer;