/** * Composed pages in the block stream (#855, DESIGN ยง5.1): the content of * each `::::page{template}` fence regrouped into one synthetic box per * *story*, the text a frame (and the frames it chains to with `next`) * receives. The layout then sets each story with the box typesetter * (`pipeline/frameLayout.ts`) at its frames' widths, cut at their heights. * * A story is one contiguous `:::callout` of the frameless * {@link FRAME_STYLE_ID} style, so the callout plan, the measure caches and * `contentIndex` treat it like any box. Inside it the content keeps its * Markdown order; the stories of a page follow each other in the order of * their first block, which is the reading order of the page (tagged PDF, * reflowable output). The frame's real style is chosen at layout time. * * Which story a block joins is decided here, with the template as written * (its `extends` chain, without the variant of a side, unknown at this * point): a block's `slot` names its frame; the first heading of a level * that names no slot goes to the frame that `takes` it; any other block * with no slot, and content naming a slot the template lacks, goes to the * flow frame. With no flow frame that content stays outside the stories, * after them, and the layout sets it in the flow on the page after. */ import type { ContentBlock } from '../parse/types.js'; import type { CalloutStyleConfig } from '../types.js'; import { type PageTemplateSource } from './templates.js'; import type { ResolvedFrame, ResolvedPageTemplate } from './types.js'; /** Style id of a story's box. Not a user style: no configuration can name * it. A story whose frame is missing on its page (a variant dropped it) * is set in the flow in this frameless box. */ export declare const FRAME_STYLE_ID = "__postext-frame"; /** `containerAttrs` key of a story's box: the name of its first frame. */ export declare const FRAME_ATTR = "__frame"; /** `containerAttrs` key of the flow frame's story box whose first paragraph * followed, in the Markdown, a heading another frame `takes` (#947): the heading's * `sourceStart`. The paragraph takes the drop cap of that heading's level * as the first paragraph after it in the flow does. */ export declare const CAP_HEADING_ATTR = "__capHeading"; /** The frames of a chain, from its head (`next` after `next`), each once. */ export declare function frameChain(template: ResolvedPageTemplate, head: string): ResolvedFrame[]; /** The head of the chain frame `name` belongs to. */ export declare function chainHead(template: ResolvedPageTemplate, name: string): string; /** * `blocks` with the content of every composed page of a known template * regrouped into its stories (see the module comment). A page whose * template is unknown keeps its blocks as they are: its content is set in * the flow (`templateUnknown`). The same array comes back when nothing * changes. */ export declare function wrapComposedPages(blocks: readonly ContentBlock[], config: PageTemplateSource | undefined): { blocks: ContentBlock[]; wrapped: boolean; }; /** The frameless box a story is laid in when its frame has no `style`: * no frame, padding, title or icon, its children set in the text's own * typography (`deriveCalloutMeasureContext`), cut between lines keeping * `splitMinLines` lines of text on each side (the body's orphan and widow * minimums). */ export declare function frameBoxStyle(splitMinLines: number): CalloutStyleConfig; //# sourceMappingURL=wrap.d.ts.map