/** * A theme, compiled into the document's style set. * * The output is DocxIR: style ids and their resolved formatting, in the units * OOXML uses, naming no backend. Both adapters map it to their own option * shape, so which styles a document defines — and what each one says — is * decided once, here, rather than once per renderer. */ /** * Style ids a `statistic` lowers to. * * Exported because the compiler names them on every statistic paragraph it * emits and the two must not drift: a `w:pStyle` pointing at a style the * document does not define is not an error anywhere in OOXML, it just resolves * to Normal — which is how the component came to render as two ordinary body * paragraphs with nothing to tell the number from its caption. */ export declare const STATISTIC_NUMBER_STYLE_ID = "StatisticNumber"; export declare const STATISTIC_DESCRIPTION_STYLE_ID = "StatisticDescription"; /** * The number's size, in points, per the component's `size` prop. * * `medium` is what the style itself carries; the compiler overrides the run * for the other two, so a document that never states `size` needs no run * properties at all and restyling every statistic stays a one-style edit. */ export declare const STATISTIC_SIZE_POINTS: Readonly>; /** What a statistic paints, in points, on one theme. */ export interface StatisticSizes { /** The figure at the size the component names. */ number: number; /** The figure at `medium`: what the number style itself carries. */ medium: number; /** The unit and the trend set beside the figure. */ suffix: number; /** The description under the figure. */ description: number; } /** * The sizes a statistic paints on a theme, decided once for the style set, * the compiler and the quality facts. * * A theme that restyles the component's own styles decides the figure and * the description. Else a theme with type roles paints the figure in its * `stat` role — `small` and `large` a step of its type scale either side — * and the unit, trend and description in its `label` role, so a report built * from statistics stays on the theme's scale (#454). A theme with neither * keeps the built-in sizes, the unit and trend at half the figure. */ export declare function statisticSizes(theme: ThemeConfig, size: unknown): StatisticSizes; import type { DocxIrParagraphStyle, DocxIrStyles } from '../ir/types'; import type { ThemeConfig } from './index'; export declare function createDocumentStyles(themeNameOrObject?: string | ThemeConfig, language?: string): DocxIrStyles; /** * The two paragraph styles a `statistic` lowers to. * * Separate from `createDocumentStyles`, and appended by the compiler only when * the document actually contains a statistic. Defining them unconditionally * would rewrite `word/styles.xml` in every document ever produced — including * the ones with no statistic in them — to fix a component most documents never * use, and every recorded golden with it. * * A theme that names either id under `styles` has already had it emitted as a * custom style, so that one is skipped rather than defined twice: two entries * with the same id leave the later one winning, and the later one here is the * default, not the theme's. */ export declare function createStatisticStyles(theme: ThemeConfig): DocxIrParagraphStyle[]; //# sourceMappingURL=themeToStyles.d.ts.map