/** * The script of a comic panel (#558): one balloon per line, * `key{attrs}: text`. * * - The colon may be fullwidth (`:`), as a Chinese or Japanese input * method types it. * - A line indented by two spaces or a tab continues the balloon above (a * space joins the lines, none between Chinese or Japanese characters); a * line ending with a backslash breaks the balloon's line there. * - Blank lines and `` are ignored. * - `key` is a speaker id (letters, digits, `_ . -`), the same in every * translation; `caption`, `sfx` and `note` are reserved. * - The text is inline Markdown, read by the same passes as a resource * caption: emphasis, `:ruby`, `:tcy`, `:ltr` / `:rtl`, forced breaks. */ import { type ComicScriptItem, type ComicSourceRange } from './types.js'; /** One source line of a script, as the page parser hands it over: its text * (comments blanked out) and where it starts. */ export interface ComicScriptLine { text: string; start: number; } /** `"62% 40%"` (or `62 40`, `0.62 0.4` read as fractions when both are at * most 1 and written without `%`) as fractions; undefined when it is not * two numbers. */ export declare function parseComicPoint(value: string | undefined): { x: number; y: number; } | undefined; /** The text of a balloon read as inline Markdown, spaces collapsed, with * its absolute source map. `content` starts at `contentStart`. */ export declare function readBalloonText(content: string, contentStart: number): Pick; /** Value ranges of an attribute blob starting at `blobStart`. */ export declare function attrValueSources(blob: string, blobStart: number): Record; /** * The balloons of a panel's script lines, in order. `markdown` is the text * the offsets point into (the lines' text may have comments blanked out, * at the same length). A line that is not a script line and continues * nothing is lettered as a caption and marked `stray`. */ export declare function parseComicScript(markdown: string, lines: readonly ComicScriptLine[]): ComicScriptItem[]; //# sourceMappingURL=script.d.ts.map