import { ContributionProvider, Deferred, DisposableCollection, Event, IThemeColor, URI, WithEventBus } from '@opensumi/ide-core-common'; import { ThemeContributionProvider } from '../common'; import { Color } from '../common/color'; import { ColorIdentifier, ExtColorContribution, IColorCustomizations, ITheme, IThemeContribution, IThemeData, IThemeService, ITokenColorCustomizations, ThemeInfo, ThemeType } from '../common/theme.service'; export declare const CUSTOM_WORKBENCH_COLORS_SETTING = "workbench.colorCustomizations"; export declare const CUSTOM_EDITOR_COLORS_SETTING = "editor.tokenColorCustomizations"; export declare const COLOR_THEME_SETTING = "general.theme"; export declare class WorkbenchThemeService extends WithEventBus implements IThemeService { private colorRegistry; private cssVarRegistry; private colorClassNameMap; colorThemeLoaded: Deferred; currentThemeId: string; private currentTheme?; private latestApplyTheme; private themes; private themeContributionRegistry; private themeChangeEmitter; protected extensionReady: boolean; onThemeChange: Event; private themeStore; private logger; private preferenceService; private preferenceSchemaProvider; private preferenceSettings; private readonly styleService; protected readonly themeContributionProvider: ContributionProvider; private readonly appLifeCycleService; constructor(); ensureValidTheme(defaultThemeId?: string): Promise; onDidExtensionContributes(): Promise; get preferenceThemeId(): string | undefined; registerThemes(themeContributions: IThemeContribution[], extPath: URI): DisposableCollection; applyTheme(themeId: string): Promise; registerColor(contribution: ExtColorContribution): void; getCurrentTheme(): Promise; getCurrentThemeSync(): Theme; getColor(colorId: string | IThemeColor | undefined): string | undefined; getColorVar(colorId: string | IThemeColor | undefined): string | undefined; getColorClassNameByColorToken(colorId: string | IThemeColor): string | undefined; getAvailableThemeInfos(): ThemeInfo[]; protected doSetPreferenceSchema(): void; private get colorCustomizations(); private get tokenColorCustomizations(); private listen; private checkColorContribution; private parseColorValue; private getTheme; private doApplyTheme; protected toggleBaseThemeClass(prevThemeType: ThemeType, themeType: ThemeType): void; protected applyPlatformClass(): void; } export declare class Themable extends WithEventBus { themeService: WorkbenchThemeService; protected theme: ITheme; constructor(); get currentTheme(): ITheme; protected getColor(id: ColorIdentifier, useDefault?: boolean): Promise; protected getColorSync(id: ColorIdentifier, useDefault?: boolean): Color | undefined; private listenThemeChange; style(): Promise; } declare class Theme implements ITheme { readonly type: ThemeType; readonly themeData: IThemeData; private readonly colorRegistry; private readonly defaultColors; private colorMap; private customColorMap; private customTokenColors; constructor(type: ThemeType, themeData: IThemeData); getColor(colorId: ColorIdentifier, useDefault?: boolean): Color | undefined; defines(color: ColorIdentifier): boolean; setCustomColors(colors: IColorCustomizations): void; setCustomTokenColors(customTokenColors: ITokenColorCustomizations): void; private addCustomTokenColors; private overwriteCustomColors; protected patchColors(): void; private patchTokenColors; private getColors; private getDefault; } export {}; //# sourceMappingURL=workbench.theme.service.d.ts.map