import { BrandOptions, VegaThemeOverrideColors } from './theme'; import type { ActionColorAccessibilityResult } from './controllers/action-color-accessibility-validator'; import './controllers/dark-mode-style-controller'; import { VegaPublicAPIRuntimeMetricsSlimmerBase } from '../slimmers/runtime-metrics/public-api-runtime-metrics-slimmer-base'; /** * Vega components theme manager */ declare class ThemeManager { protected vegaPublicAPIRuntimeMetricsSlimmer: VegaPublicAPIRuntimeMetricsSlimmerBase; /** * It takes the colors you passed in, parses them into the correct format, and then applies them to the theme. * * When `overrideColors.overrideTokenMap` is provided (typically the `contrastCapPatches` * returned by `validateColorAccessibility()`), matching tokens in the generated theme are replaced * with the patched values before applying. * * @param {VegaThemeOverrideColors} overrideColors - OverrideColors - This is the object that you pass to the function. * @vegaVersion 1.20.0 */ overrideColors(overrideColors: VegaThemeOverrideColors): Promise; /** * It removes all the custom override theme styles from the DOM * * @vegaVersion 1.20.0 */ reset(): Promise; /** * This function toggles the dark mode of a webpage by adding or removing a 'dark' class to the HTML element. * * @param {boolean | undefined} darkMode - A boolean or undefined value that determines whether to enable or disable dark mode. * If it is true, dark mode is enabled. * If it is false, dark mode is disabled. * @vegaVersion 1.32.0 */ toggleDarkMode(darkMode: boolean): void; /** * The function checks if the HTML element has a class of "dark" and returns a boolean value accordingly. * * @returns {boolean} A boolean value indicating whether the HTML element has a class of "dark", which is * typically used to indicate that the website is in dark mode. * @vegaVersion 1.32.0 */ isDarkMode(): boolean; /** * This function switches the Vega theme to a brand theme based on the provided options. * * @param {BrandOptions} options - The options includes 'gp', 'genius' and 'heartland' options * @vegaVersion 2.47.0 */ applyBranding(options: BrandOptions): void; /** * Validate a full override-color payload against WCAG 2.1 AA thresholds (light mode only) * without applying any theme changes. * * Returns per-token contrast details, a suggested accessible `actionColor`, and * `contrastCapPatches` — token-level repairs for tokens whose formula hard-caps contrast * below the threshold. Pass the patches back via * `overrideColors({ ..., overrideTokenMap: result.contrastCapPatches })` to apply them. * * Note: Only `actionColor`-driven tokens are validated. `sidebarColor` tokens are not * evaluated by this method. The `actionColor` value must be a 3- or 6-digit hex string * (with optional leading `#`). * * @param {VegaThemeOverrideColors} overrideColors The same payload passed to `overrideColors()` * @returns {Promise} Per-token contrast report with patches * @vegaVersion 2.88.0 */ validateColorAccessibility(overrideColors: VegaThemeOverrideColors): Promise; } export declare const VegaThemeManager: ThemeManager; export {};