/** * Chinese and Japanese annotations in the HTML backend (#193, #194, #195, * #428): the marks of a line (`VDTLine.marks`) as positioned `aria-hidden` * boxes and small SVG paths, a ruby base and its reading as a semantic * `` whose reading runs are positioned text (see {@link RUBY_OPEN}), * a warichu note's rows as two positioned runs inside a `role="note"` box * that reads the note once, and a character's kanbun marks (#430) as * positioned `aria-hidden` text and a rule (the backend adds the 送り仮名 * as transparent text after the character, which reads and copies as * `學ビテ`; the 返り点 are reading-order marks, not read). Everything sits * in the line's box (its left edge and top are the line's `bbox.x` / * `bbox.y`), at the geometry the layout gave it: the same the canvas and * PDF backends draw. */ import type { VDTAnnotationRun, VDTKunten, VDTLine, VDTLineSegment, VDTRuby, VDTWarichu } from './vdt.js'; /** The marks of a line as markup inside its box; '' when it has none. * They hang from a box of no size set on the line's text baseline (a box * in the line's font, as the text spans are), so they follow the text * wherever the browser puts its baseline. */ export declare function lineMarksHtml(line: VDTLine, color: string): string; /** The highlight bands of a line (`VDTLine.highlights`, `:mark[…]`, #888) * as boxes inside its box, placed from its top left corner: the first * markup of the line, so its text paints over them. '' when it has * none. */ export declare function lineHighlightsHtml(line: VDTLine): string; /** The marks of a vertical line (`VDTLine.marks`) inside its box of the * turned flow (see `renderVerticalLine` in the HTML backend): placed from * the line's baseline in the flow frame, as the canvas draws them, so they * turn onto the sheet with the flow (dots right of the column, lines left * of it). '' when it has none. */ export declare function verticalLineMarksHtml(line: VDTLine, color: string): string; /** Quotes the family of a CSS font shorthand for a `style` attribute (the * backend's own `quoteFontString`). */ export type FontQuoter = (font: string) => string; /** * The `` that holds ruby bases and their readings (#428), and the * `` of each reading. The layout places every base and every run of a * reading itself, as absolutely positioned boxes of the line; these * elements only say what the boxes are, so a screen reader and the * browser's ruby semantics see a base with its reading (one `` per * annotation: a jukugo reading's bases and readings alternate in it). * * `display:contents` makes them generate no box, so the positioned runs * keep the line box as their containing block, and `all:inherit` undoes * what the user agent's stylesheet gives `` (half the font size, line * height `normal`, `text-indent:0`, `font-variant-east-asian:ruby`): the * runs inherit what they inherited before, and their baselines (an outer * box's strut, see {@link runHtml}) land where the canvas and the PDF put * them. The page paints exactly as without the elements. */ export declare const RUBY_OPEN = ""; export declare const RT_OPEN = ""; /** A ruby base's reading, from the base segment's `x`: the runs of one * `` (see {@link RUBY_OPEN}), read by assistive technology. */ export declare function rubyHtml(ruby: VDTRuby, x: number, color: string, quote: FontQuoter): string; /** The readings of a chip's ruby words (`VDTChip.readings`, #1244), from * the chip box's left edge `x`: read by assistive technology, as a blank * is read by its label. */ export declare function chipReadingsHtml(runs: readonly VDTAnnotationRun[], x: number, color: string, quote: FontQuoter): string; /** The annotation a ruby base belongs to, when the layout names it * (`VDTRuby.id`, #422): the bases of one jukugo reading share it and * go in one ``. Without it, every base is a `` of its own. */ export declare function rubyGroupOf(ruby: VDTRuby): string | undefined; /** A footnote marker in the line gap (`VDTLineSegment.sideMarker`, JLReq * §4.2.3), from its segment's `x`: its run, which is the marker's text * and is read (and copied) as such. */ export declare function sideMarkerHtml(marker: NonNullable, x: number, color: string, quote: FontQuoter): string; /** A character's kanbun marks, from its segment's `x`: the runs, and the * 竪点 hung from the line's baseline as the line's marks are. */ export declare function kuntenHtml(kunten: VDTKunten, x: number, color: string, quote: FontQuoter): string; /** The 竪点 of a character on a vertical line, inside the line's box of the * turned flow (see {@link verticalLineMarksHtml}); '' when it has none. */ export declare function verticalKuntenTateHtml(kunten: VDTKunten, x: number, line: VDTLine, color: string): string; /** A warichu note's part: its rows, in a box that reads the note once. */ export declare function warichuHtml(warichu: VDTWarichu, x: number, color: string, quote: FontQuoter): string; //# sourceMappingURL=htmlAnnotations.d.ts.map