import { DocumentNode, ComputedGeometry, RenderOptions } from '@imprint-pdf/core'; import { ReactElement } from 'react'; interface InspectorRenderResult { pdf: Uint8Array; tree: DocumentNode; geometries: Map; } declare function renderToBuffer(element: ReactElement, options?: RenderOptions): Promise; /** * Renders the document and returns the bytes as a chunked `ReadableStream`. * * pdf-lib produces the buffer in one shot, so the chunking here is a * downstream-friendly optimisation: it lets HTTP frameworks send the * `Content-Type: application/pdf` headers and start flushing bytes * immediately, which matters for sub-100 ms TTFB targets on edge runtimes * (Cloudflare Workers, Vercel Edge, Deno Deploy, Bun). 64 KB chunks match * Node's default high-water mark and keep memory usage flat for large PDFs. */ declare function renderToStream(element: ReactElement, options?: RenderOptions): Promise>; /** * Single-pass render that returns the PDF bytes alongside the post-layout * PdfNode tree and per-node geometry map. Powers `imprint dev`'s inspector; * not part of the public render API. */ declare function renderForInspector(element: ReactElement, options?: RenderOptions): Promise; export { type InspectorRenderResult as I, renderToBuffer as a, renderToStream as b, renderForInspector as r };