type MermaidAPI = { initialize: (config: Record) => void; render: (id: string, code: string) => Promise<{ svg: string; }>; }; type DOMPurifyAPI = { sanitize: (dirty: string, config?: Record) => string; }; export declare class MermaidRenderSuperseded extends Error { constructor(); } export declare const isMermaidRenderSuperseded: (err: unknown) => boolean; /** * Diagram type. Set here, not per diagram: mermaid's directive sanitizer * keeps only a single bare family name in `themeVariables.fontFamily` * (stacks, quotes and even `sans-serif` are dropped), whereas the initialize * config takes the full stack. Inter is the embed's shipped body face and is * inlined into image renders by `renderMermaidForImage`. */ export declare const MERMAID_FONT_FAMILY = "Inter, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif"; export declare const whenMermaidReady: () => Promise<[MermaidAPI, DOMPurifyAPI]>; export declare const prefetchMermaid: () => void; export declare const isMermaidReady: () => boolean; export declare const renderMermaid: (code: string, key?: string) => Promise; /** * Diagram SVG for ``/canvas consumers (thumbnails, export): the same * markup with the web fonts it names inlined, since an SVG drawn as an image * cannot reach the page's `@font-face` rules and would fall back to serif. */ export declare const renderMermaidForImage: (code: string, key?: string) => Promise; export {};