import type { ColorValue, ColorPaletteEntry, CompositionRule, Dimension, PostextConfig } from '../types.js'; import type { ResolvedConfig } from '../vdt.js'; export declare const DEFAULT_MAIN_COLOR_ID = "main-color"; export declare const DEFAULT_MAIN_COLOR_NAME = "Main Color"; export declare const DEFAULT_MAIN_COLOR_HEX = "#295AA3"; export declare const DEFAULT_MAIN_COLOR: ColorValue; export declare const DEFAULT_COLOR_PALETTE: ColorPaletteEntry[]; export declare function cloneDefaultColorPalette(): ColorPaletteEntry[]; export declare function isDefaultColorPalette(palette: ColorPaletteEntry[] | undefined): boolean; /** A composition rule's level as written (`bodyText.shortListSplit`, * `layout.openerFloats`, #749): one of the three words, else `undefined`. */ export declare function compositionRuleOf(value: unknown): CompositionRule | undefined; export declare function dimensionsEqual(a: Dimension, b: Dimension): boolean; export declare function colorsEqual(a: ColorValue, b: ColorValue): boolean; export declare function resolveColorValue(value: ColorValue | undefined, palette: ColorPaletteEntry[] | undefined, fallback: ColorValue): ColorValue; export declare function resolveColor(value: ColorValue | undefined, palette: ColorPaletteEntry[] | undefined): ColorValue | undefined; /** The resolved config with its palette-linked colours read through * `palette`. The colours listed below take the palette value and drop the * link (as they always have); every other palette-linked colour — the * design slots, `bodyText.referenceColor`, callout labels… — takes the * value and keeps the link (see `relinkPaletteColors`). */ /** `node` with every palette-linked colour set to the palette's: for the * styles a build adds after the configuration is resolved (the boxes an * exercise is set in), whose defaults link to `main-color`. */ export declare function relinkToPalette(node: T, palette: ColorPaletteEntry[] | undefined): T; export declare function applyPaletteToResolvedConfig(resolved: ResolvedConfig, palette: ColorPaletteEntry[] | undefined): ResolvedConfig; /** `config` with its palette-linked colours read through its own * `colorPalette`: the colours listed below take the palette value and drop * the link; every other one (design slots, `bodyText.referenceColor`…) * takes the value and keeps the link, so part and section palette * overrides still apply to it. `htmlViewer.overrides` is left as written. */ export declare function applyPaletteToConfig(config: PostextConfig | undefined): PostextConfig | undefined; /** * A config's logical alignment keyword read as the side it names (#371): * `'start'` is `'left'` and `'end'` is `'right'`, every other value is kept. * Body-flow sides already read in the text's own direction (see * `TextAlignKeyword`), so the two names agree wherever this applies; what * reads `'start'` against a box's own direction resolves it itself * (callout stripes, corners and label tabs, table cells). */ export declare function startEndAsLeftRight(value: T | 'start' | 'end'): Exclude | 'left' | 'right'; /** A `columns` value as a float takes it: a whole number, at least 1 (any * other value is 1). */ export declare function floatColumnCount(value: unknown): number; //# sourceMappingURL=shared.d.ts.map