/** * Code listings in their box (#624). The build wraps each `code` block in a * synthetic `:::callout` whose style ({@link codeBoxStyle}) is built from * `codeStyle`: background, border, radius, padding, a title row or a label * tab, margins, page span, and the split rules of a box that may break * (`keepTogether: false`, `splitMinLines`, `repeatTitle`, the "continued" * marker). The callout machinery then places the listing, splits it between * lines across columns and pages and redraws its frame on each part, as it * does a box written by hand. A fence inside a `:::callout` is a box nested * in it. */ import type { ContentBlock, ParseOptions } from '../parse/index.js'; import type { CalloutStyleConfig } from '../types.js'; import type { ResolvedConfig } from '../vdt.js'; /** Style id of a listing's box. Not a user style: no configuration can * name it. */ export declare const CODE_BOX_STYLE_ID = "__postext-code"; /** How the configuration reads a text's code (#624): fences unless * `codeStyle.blocks` is off (a document stored before #624), indented code * when `codeStyle.indentedCode` asks for it. Undefined for the default * reading, so the parse memo keeps one entry per text. */ export declare function codeParseOptions(resolved: ResolvedConfig): ParseOptions | undefined; /** The box style of a document's listings (see the module comment): every * length in px, read against the code's size (and the body's for the * code's own em size). */ export declare function codeBoxStyle(resolved: ResolvedConfig): CalloutStyleConfig; /** * `blocks` with every `code` block wrapped in its box (a synthetic * `:::callout` of the {@link CODE_BOX_STYLE_ID} style). `wrapped` tells * whether any was: the build then adds the box's style. The same blocks * come back when none is. A listing in a right-to-left document reads left * to right (`direction: 'ltr'` on the code block). */ export declare function wrapCodeBlocks(blocks: readonly ContentBlock[], resolved: ResolvedConfig): { blocks: ContentBlock[]; wrapped: boolean; }; //# sourceMappingURL=codeBlocks.d.ts.map