/** * Converts a page's `blocks` layout to Markdown by CONVENTION — the same field * names the project already standardises on (heading, subheading, body, * content, image, items/faq/…; see the naming rules in agents.md). The plugin * can't know each project's block shapes, but it CAN rely on those conventions, * so most blocks convert with zero per-project wiring. Special blocks get an * `overrides` entry keyed by blockType. * * Output is for AI/agent consumption (per-page Markdown, llms-full.txt), not * on-page rendering — it extracts readable text, not pixel-perfect layout. * * blocksToMarkdown(page.layout) * blocksToMarkdown(page.layout, { * overrides: { gallery: (b) => `(${(b.images as unknown[])?.length ?? 0} photos)` }, * }) */ type Block = Record & { blockType?: string; }; type BlockToMarkdown = (block: Block) => string; type BlocksToMarkdownArgs = { /** Per-blockType custom renderers. Return '' to omit a block. */ overrides?: Record; }; export declare function blocksToMarkdown(layout: unknown, args?: BlocksToMarkdownArgs): string; export {};