/** * The source map of comics (#885, DESIGN §6–§7): what a point of a comic * shows and where it is written, read from the stamps of the frames the * split generated. Elements, innermost first: a balloon's glyph (`text`), * the balloon (`box`), a panel's picture (`resource`), the panel's frame * (`frame`), the comic (`template`: the `:::page` or `:::strip` fence). * A text panel's paragraphs are blocks of the page and answer as text does, * with the frame and the comic after them. Ids are the frames' (`cm`, * `cm:`, `cm::b`): the same in every locale and * across relayouts. * * Used by `composed/sourceMap.ts` (`sourceAt`, `elementsForSource`, * `findElement`); nothing here lays anything out. */ import type { VDTComicBalloon, VDTComicPage, VDTDesignTextBlock, VDTFrame, VDTPage, VDTPoint } from '../vdt.js'; import type { SourceElement } from '../composed/sourceMap.js'; type File = { file?: string; }; /** A comic as an element (`template` level): its fence. */ export declare function comicElement(comic: VDTComicPage, file: File): SourceElement | undefined; /** A frame the split generated as an element: its panel's source. */ export declare function comicFrameElement(comic: VDTComicPage, frame: VDTFrame, file: File): SourceElement | undefined; /** A balloon as an element: its script line(s). */ export declare function comicBalloonElement(b: VDTComicBalloon, file: File): SourceElement; /** Whether a point lies in a frame: in its outline when it has one. */ export declare function pointInComicFrame(frame: Pick, p: VDTPoint): boolean; /** The frames of a comic in hit order: the one painted last first (an * inset over its panel). */ export declare function comicFramesTopFirst(comic: Pick): VDTFrame[]; /** The frame of the page's comics under a sheet point, with its comic, * the one on top first; undefined off every comic frame. */ export declare function comicFrameAt(page: VDTPage, x: number, y: number): { comic: VDTComicPage; frame: VDTFrame; } | undefined; /** * What the comics of `page` show at sheet point `p`, innermost first, or * undefined where they show nothing: a balloon (its glyph first, through * `glyph`), else a panel (its picture first) and its frame; then the * comic. A text panel's words are not answered here: its blocks are the * page's (the caller's flow answers them, then asks {@link comicTextAncestors}). */ export declare function comicChainAt(page: VDTPage, p: VDTPoint, file: File, glyph: (b: VDTDesignTextBlock, p: VDTPoint) => { start: number; end: number; } | undefined, onText: (frame: VDTFrame) => boolean): SourceElement[] | undefined; /** The text frame of the page's comic holding block `id`, and the elements * round it (its frame, the comic): what a text panel's words answer after * their own chain. */ export declare function comicTextAncestors(page: VDTPage, blockId: string, file: File): SourceElement[]; /** The comics, frames and balloons of `page` whose source meets `meets`. */ export declare function comicElementsForSource(page: VDTPage, meets: (r: { start: number; end: number; }) => boolean, file: File): SourceElement[]; /** The comic, frame or balloon of `page` with stable id `id`. */ export declare function findComicElement(page: VDTPage, id: string, file: File): SourceElement | undefined; export {}; //# sourceMappingURL=sourceMap.d.ts.map