import { RunProperties } from '../ooxml/types.js'; import { WordThemeColorPalette, WordThemeFontScheme } from '../ooxml/word-style-model/parse-theme.js'; import { TextRunStyleAttrs } from './types.js'; export interface NormalizeRunAttrsContext { /** Font track selected from the text segment, independently of run language. */ fontScript?: 'eastAsia'; /** Compiled theme color palette from the Word style model. */ themeColors?: WordThemeColorPalette; /** Compiled theme font scheme. */ themeFontScheme?: WordThemeFontScheme; /** Font-table family and pitch, keyed by font name or its normalized lowercase name. */ fontTable?: Readonly>; /** * Resolved background color in which the run will render (e.g. shaded cell * background). When set and the run color resolves to `auto`, the * normalizer picks a contrasting color so dark-on-dark text does not * silently render unreadable inside shaded cells. */ backgroundColor?: string; } export declare function normalizeRunAttrsFromOoxml(props: RunProperties | null | undefined, context?: NormalizeRunAttrsContext): TextRunStyleAttrs; interface FontScriptSegment { text: string; fontScript?: 'eastAsia'; } /** * Preserve Latin and East Asian font attribution across compatible text leaves. * Iteration uses code points so supplementary Han and combining marks stay intact. */ export declare function splitEastAsianFontSegments(text: string, precedingFontScript?: 'eastAsia'): FontScriptSegment[]; export {};