/**
* HTML of a comic page (#565): the panels, their pictures cropped to their
* outlines, borders and pop-out cut-outs, and the lettering, painted in the
* order the canvas paints them (SPEC D5) and read in reading order: each
* panel a `` holding its picture (an inline SVG clipped to the
* panel's outline, named by its text alternative), followed by its
* balloons and captions as paragraphs and its sound effects as named
* images. Balloons sit over every panel (`z-index`), sound effects over
* every balloon, whatever their place in the reading order.
*
* Everything is in sheet coordinates: the markup is laid over the page
* box, outside any flow frame.
*/
import type { ComicCastMember } from './types.js';
import type { VDTComicArt, VDTComicPage, VDTComicPanel, VDTDesignTextBlock } from './vdt.js';
/** How a comic page's markup gets its pictures and its text. */
export interface ComicHtmlPaint {
/** The URL of a picture, or undefined (a placeholder is drawn). */
artUrl: (art: VDTComicArt) => string | undefined;
/** Extra CSS declarations for a picture (a single-ink filter). */
artStyle?: (art: VDTComicArt, url: string) => string;
/** The HTML of a design text block (the lettering's lines). */
text: (block: VDTDesignTextBlock) => string;
/** Prefix of the ids the markup sets (clip paths): unique per page of
* the document the markup goes into. */
idBase: string;
/** `comics.cast`: the names speakers are announced under. */
cast?: readonly ComicCastMember[];
/** Markup laid over a panel, after its figure and before its lettering
* (a text panel's frame, #885), by panel index. */
overPanel?: (panel: VDTComicPanel) => string;
}
/** Options of {@link comicPanelSvg}. */
export interface ComicPanelSvgOptions {
/** The URL of a picture, or undefined (a placeholder is drawn). */
href: (art: VDTComicArt) => string | undefined;
artStyle?: (art: VDTComicArt, url: string) => string;
/** Id of the panel's clip path. */
clipId: string;
/** The text alternative: the SVG is then an image of that name
* (`role="img"`); without one it is hidden from assistive technology. */
label?: string;
/** A document of its own (XML: `xmlns`, `xlink:href`), sized `width` px
* wide (default: the panel's own width) — the reflowable EPUB's panel
* picture. Otherwise it fills the box it is placed in. */
standalone?: {
width?: number;
};
/** Stroke the panel's border (default true). */
border?: boolean;
/** Draw the pop-out cut-out (default true). */
pop?: boolean;
/** Class of the `