import { Color } from "../../../base/common/color.js";
import { Event } from "../../../base/common/event.js";
import { Disposable, IDisposable } from "../../../base/common/lifecycle.js";
import { IEnvironmentService } from "../../environment/common/environment.service.js";
import { ColorIdentifier } from "./colorRegistry.js";
import { IconContribution, IconDefinition } from "./iconRegistry.js";
import { ColorScheme, ThemeTypeSelector } from "./theme.js";
import { IThemeService } from "./themeService.service.js";
export declare function themeColorFromId(id: ColorIdentifier): {
id: string;
};
export declare const FileThemeIcon: import("../../../base/common/themables.js").ThemeIcon;
export declare const FolderThemeIcon: import("../../../base/common/themables.js").ThemeIcon;
export declare function getThemeTypeSelector(type: ColorScheme): ThemeTypeSelector;
export interface ITokenStyle {
readonly foreground: number | undefined;
readonly bold: boolean | undefined;
readonly underline: boolean | undefined;
readonly strikethrough: boolean | undefined;
readonly italic: boolean | undefined;
}
export interface IColorTheme {
readonly type: ColorScheme;
readonly label: string;
/**
* Resolves the color of the given color identifier. If the theme does not
* specify the color, the default color is returned unless useDefault is set to false.
* @param color the id of the color
* @param useDefault specifies if the default color should be used. If not set, the default is used.
*/
getColor(color: ColorIdentifier, useDefault?: boolean): Color | undefined;
/**
* Returns whether the theme defines a value for the color. If not, that means the
* default color will be used.
*/
defines(color: ColorIdentifier): boolean;
/**
* Returns the token style for a given classification. The result uses the MetadataConsts format
*/
getTokenStyleMetadata(type: string, modifiers: string[], modelLanguage: string): ITokenStyle | undefined;
/**
* List of all colors used with tokens. getTokenStyleMetadata references the colors by index into this list.
*/
readonly tokenColorMap: string[];
/**
* List of all the fonts used with tokens.
*/
readonly tokenFontMap: IFontTokenOptions[];
/**
* Defines whether semantic highlighting should be enabled for the theme.
*/
readonly semanticHighlighting: boolean;
}
export declare class IFontTokenOptions {
fontFamily?: string;
fontSizeMultiplier?: number;
lineHeightMultiplier?: number;
}
export interface IFileIconTheme {
readonly hasFileIcons: boolean;
readonly hasFolderIcons: boolean;
readonly hidesExplorerArrows: boolean;
}
export interface IProductIconTheme {
/**
* Resolves the definition for the given icon as defined by the theme.
*
* @param iconContribution The icon
*/
getIcon(iconContribution: IconContribution): IconDefinition | undefined;
}
export interface ICssStyleCollector {
addRule(rule: string): void;
}
export interface IThemingParticipant {
(theme: IColorTheme, collector: ICssStyleCollector, environment: IEnvironmentService): void;
}
export declare const Extensions: {
ThemingContribution: string;
};
export interface IThemingRegistry {
/**
* Register a theming participant that is invoked on every theme change.
*/
onColorThemeChange(participant: IThemingParticipant): IDisposable;
getThemingParticipants(): IThemingParticipant[];
readonly onThemingParticipantAdded: Event;
}
export declare function registerThemingParticipant(participant: IThemingParticipant): IDisposable;
/**
* Utility base class for all themable components.
*/
export declare class Themable extends Disposable {
protected themeService: IThemeService;
protected theme: IColorTheme;
constructor(themeService: IThemeService);
protected onThemeChange(theme: IColorTheme): void;
updateStyles(): void;
protected getColor(id: string, modify?: (color: Color, theme: IColorTheme) => Color): string | null;
}
export interface IPartsSplash {
zoomLevel: number | undefined;
baseTheme: ThemeTypeSelector;
colorInfo: {
background: string;
foreground: string | undefined;
editorBackground: string | undefined;
titleBarBackground: string | undefined;
titleBarBorder: string | undefined;
activityBarBackground: string | undefined;
activityBarBorder: string | undefined;
sideBarBackground: string | undefined;
sideBarBorder: string | undefined;
statusBarBackground: string | undefined;
statusBarBorder: string | undefined;
statusBarNoFolderBackground: string | undefined;
windowBorder: string | undefined;
};
layoutInfo: {
sideBarSide: string;
editorPartMinWidth: number;
titleBarHeight: number;
activityBarWidth: number;
sideBarWidth: number;
auxiliaryBarWidth: number;
statusBarHeight: number;
windowBorder: boolean;
windowBorderRadius: string | undefined;
} | undefined;
}