/** * The exercises in a build (#1227): the resolved config with the chip and * paragraph styles every exercise style sets its exercises with, and the * expansion of a document's exercises against its page. */ import type { ContentBlock } from '../parse/index.js'; import type { LayoutContinuation, OutlineEntry } from '../types.js'; import type { ResolvedConfig, VDTDocument } from '../vdt.js'; import { type ExerciseSettings } from '../defaults/exercises.js'; import { type ExerciseExpansion } from './expand.js'; import type { ExerciseRecord } from './record.js'; /** The exercise settings a resolved config reads: its own, else the * defaults in the document language. */ export declare function exerciseSettingsFor(resolved: ResolvedConfig): ExerciseSettings; /** `resolved` with the chip and paragraph styles of every exercise style * among its own (after them, so no fence's fallback finds them first). */ export declare function withExerciseStyles(resolved: ResolvedConfig): ResolvedConfig; /** The exercise counters a continuation carries. */ export declare function exerciseCountersOf(continuation: LayoutContinuation | undefined): Record; /** The counters as `statementCounters` entries. */ export declare function exerciseCounterEntries(counters: Record, heading: { h1: number; h2: number; h3: number; h4: number; h5: number; h6: number; }): Record; /** Whether the blocks need the expansion (an exercise or a `:::solutions` * line). */ export declare function needsExerciseExpansion(blocks: readonly ContentBlock[]): boolean; /** Expand the exercises of `blocks` for a page of `resolved`, `measurePx` * the width of the flow's first column. */ export declare function expandDocumentExercises(blocks: readonly ContentBlock[], resolved: ResolvedConfig, measurePx: number, continuation: LayoutContinuation | undefined, outline?: readonly OutlineEntry[]): ExerciseExpansion; /** Stamp `turn` on the frame and the content of every box printed upside * down (`turn="180"`): the frame's centre on its page. */ export declare function markTurnedBoxes(doc: VDTDocument): void; /** The exercise counters after `blocks`, numbered on from `before` (a * book's earlier chapters), for the next chapter's continuation. */ export declare function exerciseCountersAfter(blocks: readonly ContentBlock[], resolved: ResolvedConfig, before: LayoutContinuation | undefined): Record; /** The outline entries of a document's exercises (#1229): each one's number, * key and worked solution, under the chapter it is in, for a * `:::solutions{scope="book"}` in another chapter. */ export declare function exerciseOutlineEntries(blocks: readonly ContentBlock[], resolved: ResolvedConfig, before: LayoutContinuation | undefined): OutlineEntry[]; /** {@link exerciseOutlineEntries}, and what a reference to each exercise * with an `{#id}` prints ("Exercise 3"), by id. */ export declare function exerciseOutline(blocks: readonly ContentBlock[], resolved: ResolvedConfig, before: LayoutContinuation | undefined): { entries: OutlineEntry[]; records: ExerciseRecord[]; }; /** The outline with the anchor of each exercise that has an `{#id}` * numbered as a numbered box's is: a reference prints "Exercise 3", with * `style=number` its number, with `style=title` its title. */ export declare function nameExerciseAnchors(outline: OutlineEntry[], records: readonly ExerciseRecord[]): OutlineEntry[]; /** Whether the blocks print the book's solutions (`:::solutions{scope="book"}`). */ export declare function hasBookSolutions(blocks: readonly ContentBlock[]): boolean; //# sourceMappingURL=build.d.ts.map