import type { ContentBlock, DirectiveAttrs } from '../parse/types.js'; import type { ColorPaletteEntry, FolioPaperConfig } from '../types.js'; /** An attribute of a `:::paper` fence the engine could not read. */ export interface PaperAttributeIssue { key: string; value: string; } /** * The paper stock a `:::paper{…}` fence names, as the partial * {@link FolioPaperConfig} it writes (unset fields follow the document's * `folio.paper` and the stock), and the attributes it could not read: * an unknown stock, finish or texture, a weight, bulk or texture strength * that is not a positive number (`textureStrength` may be 0 … 2), a shade * that is neither a `#rgb` / `#rrggbb` hex nor a palette entry id, a * `showThrough` other than `true` / `false`, and any other key. */ export declare function parsePaperAttrs(attrs: DirectiveAttrs | undefined, palette?: readonly ColorPaletteEntry[]): { paper: FolioPaperConfig; issues: PaperAttributeIssue[]; }; /** * The paper every content block is printed on: the merged config of the * `:::paper` containers around it (an inner fence's fields over the outer * one's), `undefined` outside any. Indexed like `blocks`; the fence * markers themselves carry the paper they open or close. */ export declare function paperByBlock(blocks: readonly ContentBlock[], palette?: readonly ColorPaletteEntry[]): (FolioPaperConfig | undefined)[]; /** A laid-out block, by the source block it comes from. */ interface IndexedBlock { contentIndex?: number; } interface PaperPage { columns: readonly { blocks: readonly IndexedBlock[]; }[]; floats?: readonly IndexedBlock[]; paper?: FolioPaperConfig; } /** * Stamps `page.paper` on the pages set with content from inside a * `:::paper` container (see {@link paperByBlock}). A run starts and ends on * a page boundary, so a page's first block decides — its column flow * first, then its floats. A page with neither (a parity blank) between two * pages of the same run belongs to the run too: it is printed on the same * sheets. Pages outside every run are left without the key. */ export declare function stampPagePaper(pages: PaperPage[], byBlock: readonly (FolioPaperConfig | undefined)[]): void; export {}; //# sourceMappingURL=paper.d.ts.map