import type { DigitSystem, PostextConfig, ResolvedHeadingLevelConfig } from '../types.js'; import { columnCountUsed, layoutColumnCount, MULTIPLE_COLUMNS_MAX, MULTIPLE_COLUMNS_MIN } from '../defaults/layout.js'; export { columnCountUsed, layoutColumnCount, MULTIPLE_COLUMNS_MAX, MULTIPLE_COLUMNS_MIN }; export { balancingOnByDefault, avoidWidowsByDefault, avoidOrphansByDefault }; import { balancingOnByDefault, avoidWidowsByDefault, avoidOrphansByDefault } from '../defaults/index.js'; import { type BoundingBox, type ResolvedConfig } from '../vdt.js'; export declare function resolveAllConfig(rawConfig?: PostextConfig): ResolvedConfig; /** * Forget what the engine derived from `config` (its resolution, the part * palette's colour values): the next build resolves it again. For hosts * that change a config object in place on purpose; builds also notice a * change on their own (see {@link validateConfigCache}). */ export declare function invalidateConfig(config: PostextConfig): void; /** * Check, once per build, that `config` still reads as it did when it was * resolved; if it was changed in place since, drop the cached resolution * (and the part palette memo) so the build sees the change. Costs one * `JSON.stringify` of the config. */ export declare function validateConfigCache(config: PostextConfig | undefined): void; /** The base direction of a document: `direction` as written when it is * `'ltr'` or `'rtl'`; otherwise (`'auto'`, unset, or a value the engine * does not know, which `collectConfigWarnings` reports) the direction of * the document language's script (`directionOf`). */ export declare function resolveDirection(direction: unknown, documentLocale: string): 'ltr' | 'rtl'; /** The resolved base direction of a document (see * `ResolvedConfig.direction`). */ export declare function resolvedDirection(resolved: ResolvedConfig): 'ltr' | 'rtl'; /** Whether the document is set right to left in the Arabic script (Arabic, * Persian, Urdu…, `ar`, `fa`, `ur`, `ps`, `ug`, also in Nastaliq): there a * European number with no letter before it reads as an Arabic number * (`BidiOptions.arabicNumbers`, #665), so a Maghreb edition orders `3-1` * as a Mashriq one orders `٣-١`. A Hebrew document is not one. */ export declare function arabicNumbersOf(resolved: ResolvedConfig): boolean; /** The document language: `locale`, else the hyphenation locale as written * (which the Sandbox fills from the app language) — the same rule the table * continuation strings and `documentLocale` follow; a blank tag counts as * unset. */ export declare function resolvedLocale(resolved: ResolvedConfig): string; /** The digit system of the document's generated numbers (see * `PostextConfig.numerals`): `'latn'` unless the config or its language * says otherwise. */ export declare function documentNumerals(resolved: ResolvedConfig): DigitSystem; /** Index heading-level configs by level so per-block lookups in the * placement loop are O(1) instead of a linear `.find()`. */ export declare function buildHeadingLevelMap(resolved: ResolvedConfig): Map; export declare function computeBaselineGrid(resolved: ResolvedConfig): number; /** Whether the side column of a `oneAndHalf` layout sits at the left edge * of the content area on this page. `'outer'` / `'inner'` follow the page * only when the margins are mirrored: `mirrored` is whether this page * swaps them (`pageMirrored`: a verso of a left-bound book, a recto of a * right-bound one), whose outer edge is its left; otherwise they are * `'right'` / `'left'`. In a vertical flow the side column is a tier: the * flow's left is the sheet's top, and `'outer'` / `'inner'` are * `'right'` / `'left'` there (a tier has no outer edge). */ export declare function sideColumnOnLeft(resolved: ResolvedConfig, mirrored: boolean): boolean; /** Least share of the content width, in percent, that each column of a * `oneAndHalf` layout keeps (see {@link sideColumnPercentUsed}). */ export declare const SIDE_COLUMN_MIN_SHARE = 1; /** The side-column width a `oneAndHalf` page is cut with, in percent of * the content width (`contentWidthPx`, with a `gutterPx` gutter). The * value is used as written — a numeric string reads as its number — * while both columns keep at least {@link SIDE_COLUMN_MIN_SHARE} % of the * content width. One that would leave either column narrower (a side * column at or below 0, or one so wide that the main column vanishes * behind the gutter) is clamped to the nearest value that keeps it, and a * value that is not a number takes the default. `collectConfigWarnings` * reports each value this changes. */ export declare function sideColumnPercentUsed(value: number, contentWidthPx: number, gutterPx: number): number; /** Column boxes of a page in reading order. For a `oneAndHalf` layout the * main column comes first and the side column second whatever their * geometric order: a float-only side column (`sideColumnRole: 'floats'`) * is not part of the flow, and a text side column at the left still reads * after the main column (a marginal column). `mirrored` (the page swaps * its mirrored margins, see `pageMirrored`) decides the side of an * `'outer'` / `'inner'` side column. */ export declare function computeColumnBboxes(contentArea: BoundingBox, resolved: ResolvedConfig, mirrored?: boolean): BoundingBox[]; /** Whether the layout carries a float-only side column (a `oneAndHalf` * layout with `sideColumnRole: 'floats'`). */ export declare function hasFloatSideColumn(resolved: ResolvedConfig): boolean; //# sourceMappingURL=config.d.ts.map