/** * The book's outline: what a `:::toc` lists. Two sources produce the same * shape — the parsed markdown (titles, numbers and parts known, page labels * not) and a laid-out document (page labels known) — so a chapter laid out * on its own can take the whole book's outline from its host while the * engine derives one from a single document by laying it out again. */ import type { ContentBlock } from '../parse/index.js'; import { type HeadingNumberingOptions, type HeadingTemplates } from '../numbering.js'; import type { HeadingCounters, OutlineEntry, PostextConfig } from '../types.js'; import type { ResolvedConfig, VDTDocument } from '../vdt.js'; import { type StatementCounterState } from './statementNumbering.js'; /** Whether the parsed content holds a `:::toc` directive. */ export declare function hasTocDirective(blocks: readonly ContentBlock[]): boolean; /** Whether the parsed content holds a `:::index` directive. */ export declare function hasIndexDirective(blocks: readonly ContentBlock[]): boolean; /** The entries `:::toc` reads (headings and parts). */ export declare function tocOutline(entries: readonly OutlineEntry[]): OutlineEntry[]; /** The entries a cross-reference may name (#262): headings with an id and * anchors. */ export declare function anchorOutline(entries: readonly OutlineEntry[]): OutlineEntry[]; /** The entries `:::index` reads (index marks). */ export declare function indexOutline(entries: readonly OutlineEntry[]): OutlineEntry[]; /** The heading templates of the resolved config (level → template). */ export declare function headingTemplatesOf(resolved: ResolvedConfig): HeadingTemplates; /** What heading numbering takes from the resolved config beside the level * templates: the document language (spelled-out counters), its digits * (decimal counters) and the heading styles' own templates. */ export declare function headingNumberingOptions(resolved: ResolvedConfig): HeadingNumberingOptions; /** * The outline of parsed content: one entry per heading (every level — the * contents pick the levels they list) and per part, in document order, * without page labels. Numbers follow the level templates (or a heading * style's own), else the chapter ordinal for level 1, continuing from * `before` (the counters and chapter ordinal the preceding content left). */ export declare function computeOutline(blocks: readonly ContentBlock[], resolved: ResolvedConfig, before?: HeadingCounters, /** The equation and statement counters the preceding content left * (`LayoutContinuation.statementCounters`, #530). */ counters?: StatementCounterState): OutlineEntry[]; /** `computeOutline` over a parsed document with a raw config. */ export declare function computeOutlineFor(blocks: readonly ContentBlock[], config: PostextConfig | undefined, before?: HeadingCounters, counters?: StatementCounterState): OutlineEntry[]; /** * The outline of a laid-out document: the entries `computeOutline` gives * for its content (`parsedOutline`, in the same order), each with the label * of the page it landed on. Parts come from the part pages (with * `parts.page: false`, the page their content starts on), headings from * the heading blocks; both in page order (a part page always precedes its * chapters). */ export declare function outlineFromDoc(doc: VDTDocument, parsedOutline: readonly OutlineEntry[]): OutlineEntry[]; /** A stable fingerprint of an outline — what a contents page depends on. */ export declare function outlineKey(entries: readonly OutlineEntry[] | undefined): string; export declare function sameOutline(a: readonly OutlineEntry[] | undefined, b: readonly OutlineEntry[] | undefined): boolean; //# sourceMappingURL=outline.d.ts.map