UNPKG

graphdb-workbench

Version:
55 lines (54 loc) 1.95 kB
import { Service } from '../../providers/service/service'; import { ThemeMode } from '../../models/application-settings'; /** * Service to manage the theme of the application. */ export declare class ThemeService implements Service { private readonly applicationSettingsStorageService; private readonly rootSelector; private readonly darkClass; /** * YASQE theme for dark mode. */ static readonly YASQE_DARK_THEME = "moxer"; /** * Applies the theme based on the saved application settings. */ applyDarkModeIfEnabled(): void; /** * Explicitly sets the theme mode. * @param mode The desired theme mode. */ setThemeMode(mode: ThemeMode): void; /** * Applies the color scheme to the application based on system preferences and saved settings. * If the user has not manually chosen a theme, the method applies the system's preferred color scheme (dark or light * mode). If the user has previously set a theme in the application settings, that preference takes precedence and is * applied instead. */ applyColorScheme(): void; /** * Applies a new color scheme based on the user's preference. * The theme will only be updated if the user has not manually chosen a theme. * @param newTheme The new theme mode based on the user's preference. */ applyNewColorScheme(newTheme: ThemeMode): void; /** * Checks whether dark mode is currently applied on the document. * * @returns `true` if the dark mode is applied, `false` otherwise. */ isDarkModeApplied(): boolean; /** * @returns `true` if dark mode is enabled in the saved settings. */ isDarkModeEnabledInSettings(): boolean; /** * @returns `true` if the theme mode is set in the saved settings. */ isThemeModeSet(): boolean; /** * @return the root `:root` element. */ private getRootElement; }