import type { PPTChartElement, PPTCodeElement, PPTLatexElement, PPTMermaidElement } from '../types/slides'; type Raster = ImageBitmap | HTMLCanvasElement; type RasterProducer = () => Promise | Raster | null; export declare const requestRaster: (key: string, produce: RasterProducer, invalidate: () => void) => Raster | undefined; /** * Run a paint and return the raster jobs it is missing, keyed by resource. * Offscreen renders wait for exactly these instead of every pending raster in * the page, so slides rendered side by side no longer wait for each other. */ export declare const collectRasterJobs: (paint: () => void) => Map>; export declare const getChartRaster: (element: PPTChartElement, colors: string[], textColor: string, lineColor: string, invalidate: () => void) => Raster | undefined; export declare const getMermaidRaster: (element: PPTMermaidElement, invalidate: () => void) => Raster | undefined; export declare const getCodeRaster: (element: PPTCodeElement, invalidate: () => void) => Raster | undefined; /** * Tight MathLive snapshot of a formula — same nowrap, max-content stage as * `LatexContent`. SnapDOM v3 `width`/`height` are output size only and do not * reflow the live tree, but a flex host sized to the slide box *does*: the * stage shrinks (`min-width:auto`), `.ML__latex` wraps, and the thumbnail * becomes two lines of fallback-looking text. Capture the unconstrained * stage, then `paintLatex` scales that bitmap into the authored box. * * Font size is the fitted size (not a CSS transform) so radical/fraction * rules snap at the painted size. `reconcile: true` pins inline/table-cell * boxes SnapDOM otherwise warns may re-wrap under font fallback. */ export declare const getLatexRaster: (element: PPTLatexElement, invalidate: () => void) => Raster | undefined; /** * Typeset inline/display math at the painted font size and snapshot it. * The booth is `.fika-embed-root` so scoped MathLive CSS applies; a white * or empty capture falls back to readable TeX-ish text instead of a gap. */ export declare const getInlineMathRaster: (latex: string, fontSize: number, color: string, display: boolean, invalidate: () => void) => Raster | undefined; export declare const hasPendingRasters: () => boolean; export declare const clearSlideRasterResources: () => void; export {};