Path: blob/main/src/vs/editor/standalone/common/standaloneTheme.ts
3296 views
/*---------------------------------------------------------------------------------------------1* Copyright (c) Microsoft Corporation. All rights reserved.2* Licensed under the MIT License. See License.txt in the project root for license information.3*--------------------------------------------------------------------------------------------*/45import { Color } from '../../../base/common/color.js';6import { ITokenThemeRule, TokenTheme } from '../../common/languages/supports/tokenization.js';7import { createDecorator } from '../../../platform/instantiation/common/instantiation.js';8import { IColorTheme, IThemeService } from '../../../platform/theme/common/themeService.js';910export const IStandaloneThemeService = createDecorator<IStandaloneThemeService>('themeService');1112export type BuiltinTheme = 'vs' | 'vs-dark' | 'hc-black' | 'hc-light';13export type IColors = { [colorId: string]: string };1415export interface IStandaloneThemeData {16base: BuiltinTheme;17inherit: boolean;18rules: ITokenThemeRule[];19encodedTokensColors?: string[];20colors: IColors;21}2223export interface IStandaloneTheme extends IColorTheme {24tokenTheme: TokenTheme;25themeName: string;26}2728export interface IStandaloneThemeService extends IThemeService {29readonly _serviceBrand: undefined;3031setTheme(themeName: string): void;3233setAutoDetectHighContrast(autoDetectHighContrast: boolean): void;3435defineTheme(themeName: string, themeData: IStandaloneThemeData): void;3637getColorTheme(): IStandaloneTheme;3839setColorMapOverride(colorMapOverride: Color[] | null): void;4041}424344