UNPKG

1.38 kBTypeScriptView Raw
1import { ContributionProvider } from '../common/contribution-provider';
2import { Theme, ThemeType } from '../common/theme';
3import { ColorRegistry } from './color-registry';
4import { FrontendApplicationContribution } from './frontend-application-contribution';
5import { ThemeService } from './theming';
6import { SecondaryWindowHandler } from './secondary-window-handler';
7export declare const StylingParticipant: unique symbol;
8export interface StylingParticipant {
9 registerThemeStyle(theme: ColorTheme, collector: CssStyleCollector): void;
10}
11export interface ColorTheme {
12 type: ThemeType;
13 label: string;
14 getColor(color: string): string | undefined;
15}
16export interface CssStyleCollector {
17 addRule(rule: string): void;
18}
19export declare class StylingService implements FrontendApplicationContribution {
20 protected cssElements: Map<Window, HTMLStyleElement>;
21 protected readonly themeService: ThemeService;
22 protected readonly colorRegistry: ColorRegistry;
23 protected readonly themingParticipants: ContributionProvider<StylingParticipant>;
24 protected readonly secondaryWindowHandler: SecondaryWindowHandler;
25 onStart(): void;
26 registerWindow(win: Window): void;
27 protected applyStylingToWindows(theme: Theme): void;
28 protected applyStyling(theme: Theme, cssElement: HTMLStyleElement): void;
29}
30//# sourceMappingURL=styling-service.d.ts.map
\No newline at end of file