/** The theme every other theme layers on top of; selected by `:root`, not by a `data-theme` value. */ export declare const DEFAULT_THEME = "default"; export type ThemeName = string; /** * Every theme the stylesheets define, discovered rather than listed, so adding a fourth theme file * automatically brings it into the contrast matrix instead of silently going unchecked. */ export declare const discoverThemeNames: () => ThemeName[]; export declare class TokenResolutionError extends Error { } /** * Follows a `var()` chain to a literal. `var(--a, fallback)` uses the fallback only when `--a` is * undefined, matching CSS. A cycle or a missing terminal value throws rather than resolving to * something plausible — a contrast suite that silently treats an unresolvable token as black would * report passes it has not earned. */ export declare const resolveDeclaration: (declarations: ReadonlyMap, value: string, seen?: ReadonlySet) => string; export interface UnresolvableToken { readonly property: string; readonly reason: string; } export interface ThemeResolution { readonly resolved: Map; /** * Properties whose `var()` chain never reaches a literal. At runtime the browser treats these * as invalid at computed-value time, so the declaration is dropped entirely and the element * falls back to the inherited or initial value — i.e. the styling the token file *says* it * applies is silently not applied. Worth a test of its own. */ readonly unresolvable: UnresolvableToken[]; } export declare const resolveTheme: (theme: ThemeName) => ThemeResolution; /** Every custom property that applies to `theme`, resolved to a literal value. */ export declare const resolveThemeTokens: (theme: ThemeName) => Map; /** `resolveThemeTokens` for every discovered theme, keyed by theme name. */ export declare const resolveAllThemes: () => Map>;