import type { MermaidProcessResult } from "./types.js"; /** * Find the mmdc binary. Since @mermaid-js/mermaid-cli is a bundled dependency, * mmdc is installed alongside md2cf. This function searches: * 1. Sibling to the running script (same .bin dir as md2cf) * 2. CWD's node_modules/.bin (development / monorepo) * 3. Global PATH (fallback) * * Returns the path to mmdc or null if not found. */ export declare function findMmdc(): string | null; /** * Render a mermaid code block to a PNG image using the mmdc CLI. * Returns an object with the PNG buffer and filename on success, or an error on failure. */ export declare function renderMermaidToPng(mermaidCode: string, index: number, mmdcPath: string): { success: true; pngBuffer: Buffer; filename: string; } | { success: false; error: string; }; /** * Check if a markdown string contains any mermaid code blocks. */ export declare function hasMermaidBlocks(markdown: string): boolean; /** * Extract mermaid code blocks from markdown, render each to PNG, * and replace the blocks with placeholder strings. * * Placeholders follow the pattern: MERMAID_DIAGRAM_PLACEHOLDER_0, MERMAID_DIAGRAM_PLACEHOLDER_1, etc. * Failed renders use: MERMAID_ERROR_PLACEHOLDER_0, etc. * * Returns the modified markdown and the processed blocks with PNG data. */ export declare function processMermaidBlocks(markdown: string, mmdcPath: string): MermaidProcessResult; //# sourceMappingURL=mermaid.d.ts.map