import { SDTheme } from '../types/sd-styles.js'; import { StyleCatalogDiagnostic, StyleSourcePartStatus } from './catalog.js'; /** `styles.getTheme` takes no options. */ export type StylesGetThemeInput = Record; /** * Status of the package parts the theme is read from. A `missing` or * `malformed` theme part still yields a theme: the default Office theme, * labeled `source: 'fallback'`. */ export interface StylesThemeSourceStatus { theme: StyleSourcePartStatus; /** `word/settings.xml`, which carries `w:clrSchemeMapping`. */ settings: StyleSourcePartStatus; } export interface StylesGetThemeResult { /** Always present. `source` says whether it is the document's own theme or the Office fallback. */ theme: SDTheme & { source: 'document' | 'fallback'; }; sourceStatus: StylesThemeSourceStatus; diagnostics: StyleCatalogDiagnostic[]; } export interface StylesGetThemeAdapter { getTheme(input?: StylesGetThemeInput): StylesGetThemeResult; } /** Validates `styles.getTheme` input. `undefined` and `{}` are the only valid calls. */ export declare function validateStylesGetThemeInput(input?: StylesGetThemeInput): void; /** * Executes `styles.getTheme` using the provided adapter. * Validates input, then delegates to the adapter. */ export declare function executeStylesGetTheme(adapter: Partial | null | undefined, input?: StylesGetThemeInput): StylesGetThemeResult;