/** * The words a `:::figure` says in its own edition (#935): its `alt`, * `caption` and `note`, from the fence's attributes or from `::alt[…]`, * `::caption[…]` and `::note[…]` lines, take the place of the resource's * (`altText`, `caption`, `note`) for the pages of that chapter. The * resource keeps one picture and one list of anchors; each Markdown file * brings the words of its language. */ import type { ContentBlock, FigureWordKind } from '../parse/types.js'; import type { Resource } from '../types.js'; /** What a figure says, by the resource field it replaces. */ export type FigureWordOverride = Partial>; /** * The words of the `:::figure` blocks of `blocks`, by resource id. A * resource set by two figures takes the words of the first. */ export declare function figureWordOverrides(blocks: readonly ContentBlock[]): Map; /** A later figure of a resource that gives words the pages do not show. */ export interface FigureWordConflict { resourceId: string; /** The words it gives that differ from the first figure's, or that the * first figure left unsaid (and so are not shown either). */ words: FigureWordKind[]; /** The source range, in `blocks`' own text, of the first of those words. */ start: number; end: number; } /** * The figures that give words to a resource an earlier figure of the same * `blocks` already gave words to (#986): the pages show the first figure's, * so the later figure's words are dropped. A figure that says the same * words, or none, is no conflict. */ export declare function figureWordConflicts(blocks: readonly ContentBlock[]): FigureWordConflict[]; /** `resources` with the figures' own words applied; the same array when no * figure gives any, and the resources a figure leaves alone as they are. */ export declare function withFigureWords(resources: readonly Resource[], blocks: readonly ContentBlock[]): Resource[]; //# sourceMappingURL=figureWords.d.ts.map