import type { VDTDocument, RenderWarning } from './vdt.js';
import { type SvgFontSyncProvider } from './svg/fonts.js';
import { type ExerciseData } from './exercises/digital.js';
export interface RenderHtmlOptions {
/** Layout mode: single vertical column or many columns laid out horizontally. */
mode?: 'single' | 'multi';
/** Horizontal gap between pages/columns in multi mode. Default: 24 */
columnGap?: number;
/** Outer padding around the document. Default: 24 */
padding?: number;
/** Background color for each page (overrides config). */
background?: string;
/** Resolver from a resource `fileId` to a displayable image URL (object
* URL, data URI, …). Image payloads live out-of-band (IndexedDB in the
* sandbox), so the host supplies them. When omitted, or when it returns
* undefined for a fileId, bitmap/SVG resources render as a neutral
* placeholder box so layout stays stable. */
resourceImageUrl?: ((fileId: string) => string | undefined) & {
/** The default of {@link RenderHtmlOptions.singleInk} for this
* resolver's URLs: `false` on one whose SVG URLs are already recoloured
* for single ink (`bundleImageUrl` does), `true` on one that serves the
* raw markup. */
singleInk?: boolean;
};
/** Whether `diagramStyle.singleInk` recolours SVG pictures here: each
* SVG `
` gets a CSS filter (an `feColorMatrix` on its page) that
* maps its pixels to tints of the document's ink — the mapping
* `applySingleInkToSvg` applies to the markup, and the PDF backend to
* SVG bytes. Bitmaps are never tinted, and neither is an SVG data URI
* whose markup `applySingleInkToSvg` marked. (A design image of a VDT built
* before design images carried `imageKind` is tinted when its URL is an
* SVG data URI or ends in `.svg`.) Every page then carries the filter
* definition. Defaults to the resolver's own `singleInk`, else false in
* postext 1.x: hosts written for 1.4 serve SVGs recoloured with
* `applySingleInkToSvg`, as the Sandbox does, and a picture tinted twice
* comes out lighter. Pass `true` when `resourceImageUrl` returns the raw
* markup. The next major release turns it on by default. */
singleInk?: boolean;
/** Resolver from a self-hosted video's `fileId` to a playable URL (an
* object URL, the file's address in a package…). When it is omitted or
* returns nothing, the video plays from its production address
* (`video.url`); with neither, the poster is shown. */
resourceVideoUrl?: (fileId: string) => string | undefined;
/** What a video resource is set as (#454): its player, or the printed
* poster with its play mark and QR code (linked to the video when
* `videoStyle.linkPoster`). `files` covers self-hosted videos, `streams`
* YouTube and Vimeo, `hls` a self-hosted video played from an HLS
* address (#476; default: as `files`). Each defaults to
* `videoStyle.html`. An HLS `