chore(vscode): update to 1.54.2

This commit is contained in:
Joe Previte
2021-03-11 10:27:10 -07:00
1459 changed files with 53404 additions and 51004 deletions

View File

@@ -0,0 +1,61 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { ThemeIcon } from 'vs/platform/theme/common/themeService';
import { getIconRegistry, IconContribution, IconFontContribution } from 'vs/platform/theme/common/iconRegistry';
import { asCSSPropertyValue, asCSSUrl } from 'vs/base/browser/dom';
import { Event, Emitter } from 'vs/base/common/event';
export interface IIconsStyleSheet {
getCSS(): string;
readonly onDidChange: Event<void>;
}
export function getIconsStyleSheet(): IIconsStyleSheet {
const onDidChangeEmmiter = new Emitter<void>();
const iconRegistry = getIconRegistry();
iconRegistry.onDidChange(() => onDidChangeEmmiter.fire());
return {
onDidChange: onDidChangeEmmiter.event,
getCSS() {
const usedFontIds: { [id: string]: IconFontContribution } = {};
const formatIconRule = (contribution: IconContribution): string | undefined => {
let definition = contribution.defaults;
while (ThemeIcon.isThemeIcon(definition)) {
const c = iconRegistry.getIcon(definition.id);
if (!c) {
return undefined;
}
definition = c.defaults;
}
const fontId = definition.fontId;
if (fontId) {
const fontContribution = iconRegistry.getIconFont(fontId);
if (fontContribution) {
usedFontIds[fontId] = fontContribution;
return `.codicon-${contribution.id}:before { content: '${definition.fontCharacter}'; font-family: ${asCSSPropertyValue(fontId)}; }`;
}
}
return `.codicon-${contribution.id}:before { content: '${definition.fontCharacter}'; }`;
};
const rules = [];
for (let contribution of iconRegistry.getIcons()) {
const rule = formatIconRule(contribution);
if (rule) {
rules.push(rule);
}
}
for (let id in usedFontIds) {
const fontContribution = usedFontIds[id];
const src = fontContribution.definition.src.map(l => `${asCSSUrl(l.location)} format('${l.format}')`).join(', ');
rules.push(`@font-face { src: ${src}; font-family: ${asCSSPropertyValue(id)}; }`);
}
return rules.join('\n');
}
};
}

View File

@@ -248,7 +248,7 @@ export const editorErrorForeground = registerColor('editorError.foreground', { d
export const editorErrorBorder = registerColor('editorError.border', { dark: null, light: null, hc: Color.fromHex('#E47777').transparent(0.8) }, nls.localize('errorBorder', 'Border color of error boxes in the editor.'));
export const editorWarningBackground = registerColor('editorWarning.background', { dark: null, light: null, hc: null }, nls.localize('editorWarning.background', 'Background color of warning text in the editor. The color must not be opaque so as not to hide underlying decorations.'), true);
export const editorWarningForeground = registerColor('editorWarning.foreground', { dark: '#CCA700', light: '#E9A700', hc: null }, nls.localize('editorWarning.foreground', 'Foreground color of warning squigglies in the editor.'));
export const editorWarningForeground = registerColor('editorWarning.foreground', { dark: '#CCA700', light: '#BF8803', hc: null }, nls.localize('editorWarning.foreground', 'Foreground color of warning squigglies in the editor.'));
export const editorWarningBorder = registerColor('editorWarning.border', { dark: null, light: null, hc: Color.fromHex('#FFCC00').transparent(0.8) }, nls.localize('warningBorder', 'Border color of warning boxes in the editor.'));
export const editorInfoBackground = registerColor('editorInfo.background', { dark: null, light: null, hc: null }, nls.localize('editorInfo.background', 'Background color of info text in the editor. The color must not be opaque so as not to hide underlying decorations.'), true);
@@ -258,7 +258,7 @@ export const editorInfoBorder = registerColor('editorInfo.border', { dark: null,
export const editorHintForeground = registerColor('editorHint.foreground', { dark: Color.fromHex('#eeeeee').transparent(0.7), light: '#6c6c6c', hc: null }, nls.localize('editorHint.foreground', 'Foreground color of hint squigglies in the editor.'));
export const editorHintBorder = registerColor('editorHint.border', { dark: null, light: null, hc: Color.fromHex('#eeeeee').transparent(0.8) }, nls.localize('hintBorder', 'Border color of hint boxes in the editor.'));
export const sashHoverBorder = registerColor('sash.hoverBorder', { dark: null, light: null, hc: null }, nls.localize('sashActiveBorder', "Border color of active sashes."));
export const sashHoverBorder = registerColor('sash.hoverBorder', { dark: focusBorder, light: focusBorder, hc: focusBorder }, nls.localize('sashActiveBorder', "Border color of active sashes."));
/**
* Editor background color.
@@ -362,16 +362,18 @@ export const diffDiagonalFill = registerColor('diffEditor.diagonalFill', { dark:
/**
* List and tree colors
*/
export const listFocusBackground = registerColor('list.focusBackground', { dark: '#062F4A', light: '#D6EBFF', hc: null }, nls.localize('listFocusBackground', "List/Tree background color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not."));
export const listFocusBackground = registerColor('list.focusBackground', { dark: null, light: null, hc: null }, nls.localize('listFocusBackground', "List/Tree background color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not."));
export const listFocusForeground = registerColor('list.focusForeground', { dark: null, light: null, hc: null }, nls.localize('listFocusForeground', "List/Tree foreground color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not."));
export const listFocusOutline = registerColor('list.focusOutline', { dark: focusBorder, light: focusBorder, hc: activeContrastBorder }, nls.localize('listFocusOutline', "List/Tree outline color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not."));
export const listActiveSelectionBackground = registerColor('list.activeSelectionBackground', { dark: '#094771', light: '#0060C0', hc: null }, nls.localize('listActiveSelectionBackground', "List/Tree background color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not."));
export const listActiveSelectionForeground = registerColor('list.activeSelectionForeground', { dark: Color.white, light: Color.white, hc: null }, nls.localize('listActiveSelectionForeground', "List/Tree foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not."));
export const listInactiveSelectionBackground = registerColor('list.inactiveSelectionBackground', { dark: '#37373D', light: '#E4E6F1', hc: null }, nls.localize('listInactiveSelectionBackground', "List/Tree background color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not."));
export const listInactiveSelectionForeground = registerColor('list.inactiveSelectionForeground', { dark: null, light: null, hc: null }, nls.localize('listInactiveSelectionForeground', "List/Tree foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not."));
export const listInactiveFocusBackground = registerColor('list.inactiveFocusBackground', { dark: null, light: null, hc: null }, nls.localize('listInactiveFocusBackground', "List/Tree background color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not."));
export const listInactiveFocusOutline = registerColor('list.inactiveFocusOutline', { dark: null, light: null, hc: null }, nls.localize('listInactiveFocusOutline', "List/Tree outline color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not."));
export const listHoverBackground = registerColor('list.hoverBackground', { dark: '#2A2D2E', light: '#F0F0F0', hc: null }, nls.localize('listHoverBackground', "List/Tree background when hovering over items using the mouse."));
export const listHoverForeground = registerColor('list.hoverForeground', { dark: null, light: null, hc: null }, nls.localize('listHoverForeground', "List/Tree foreground when hovering over items using the mouse."));
export const listDropBackground = registerColor('list.dropBackground', { dark: listFocusBackground, light: listFocusBackground, hc: null }, nls.localize('listDropBackground', "List/Tree drag and drop background when moving items around using the mouse."));
export const listDropBackground = registerColor('list.dropBackground', { dark: '#062F4A', light: '#D6EBFF', hc: null }, nls.localize('listDropBackground', "List/Tree drag and drop background when moving items around using the mouse."));
export const listHighlightForeground = registerColor('list.highlightForeground', { dark: '#0097fb', light: '#0066BF', hc: focusBorder }, nls.localize('highlight', 'List/Tree foreground color of the match highlights when searching inside the list/tree.'));
export const listInvalidItemForeground = registerColor('list.invalidItemForeground', { dark: '#B89500', light: '#B89500', hc: '#B89500' }, nls.localize('invalidItemForeground', 'List/Tree foreground color for invalid items, for example an unresolved root in explorer.'));
export const listErrorForeground = registerColor('list.errorForeground', { dark: '#F88070', light: '#B01011', hc: null }, nls.localize('listErrorForeground', 'Foreground color of list items containing errors.'));
@@ -382,8 +384,15 @@ export const listFilterWidgetNoMatchesOutline = registerColor('listFilterWidget.
export const listFilterMatchHighlight = registerColor('list.filterMatchBackground', { dark: editorFindMatchHighlight, light: editorFindMatchHighlight, hc: null }, nls.localize('listFilterMatchHighlight', 'Background color of the filtered match.'));
export const listFilterMatchHighlightBorder = registerColor('list.filterMatchBorder', { dark: editorFindMatchHighlightBorder, light: editorFindMatchHighlightBorder, hc: contrastBorder }, nls.localize('listFilterMatchHighlightBorder', 'Border color of the filtered match.'));
export const treeIndentGuidesStroke = registerColor('tree.indentGuidesStroke', { dark: '#585858', light: '#a9a9a9', hc: '#a9a9a9' }, nls.localize('treeIndentGuidesStroke', "Tree stroke color for the indentation guides."));
export const tableColumnsBorder = registerColor('tree.tableColumnsBorder', { dark: '#CCCCCC20', light: '#61616120', hc: null }, nls.localize('treeIndentGuidesStroke', "Tree stroke color for the indentation guides."));
export const listDeemphasizedForeground = registerColor('list.deemphasizedForeground', { dark: '#8C8C8C', light: '#8E8E90', hc: '#A7A8A9' }, nls.localize('listDeemphasizedForeground', "List/Tree foreground color for items that are deemphasized. "));
/**
* Quick pick widget (dependent on List and tree colors)
*/
export const _deprecatedQuickInputListFocusBackground = registerColor('quickInput.list.focusBackground', { dark: null, light: null, hc: null }, '', undefined, nls.localize('quickInput.list.focusBackground deprecation', "Please use quickInputList.focusBackground instead"));
export const quickInputListFocusBackground = registerColor('quickInputList.focusBackground', { dark: oneOf(_deprecatedQuickInputListFocusBackground, listFocusBackground, '#062F4A'), light: oneOf(_deprecatedQuickInputListFocusBackground, listFocusBackground, '#D6EBFF'), hc: null }, nls.localize('quickInput.listFocusBackground', "Quick picker background color for the focused item."));
/**
* Menu colors
*/

View File

@@ -11,11 +11,11 @@ import { localize } from 'vs/nls';
import { Extensions as JSONExtensions, IJSONContributionRegistry } from 'vs/platform/jsonschemas/common/jsonContributionRegistry';
import { RunOnceScheduler } from 'vs/base/common/async';
import * as Codicons from 'vs/base/common/codicons';
import { URI } from 'vs/base/common/uri';
// ------ API types
// color registry
// icon registry
export const Extensions = {
IconContribution: 'base.contributions.icons'
};
@@ -24,7 +24,7 @@ export type IconDefaults = ThemeIcon | IconDefinition;
export interface IconDefinition {
fontId?: string;
character: string;
fontCharacter: string;
}
export interface IconContribution {
@@ -34,6 +34,15 @@ export interface IconContribution {
defaults: IconDefaults;
}
export interface IconFontContribution {
id: string;
definition: IconFontDefinition;
}
export interface IconFontDefinition {
src: { location: URI, format: string; }[]
}
export interface IIconRegistry {
readonly onDidChange: Event<void>;
@@ -42,12 +51,12 @@ export interface IIconRegistry {
* Register a icon to the registry.
* @param id The icon id
* @param defaults The default values
* @description the description
* @param description The description
*/
registerIcon(id: string, defaults: IconDefaults, description?: string): ThemeIcon;
/**
* Register a icon to the registry.
* Deregister a icon from the registry.
*/
deregisterIcon(id: string): void;
@@ -62,7 +71,7 @@ export interface IIconRegistry {
getIcon(id: string): IconContribution | undefined;
/**
* JSON schema for an object to assign icon values to one of the color contributions.
* JSON schema for an object to assign icon values to one of the icon contributions.
*/
getIconSchema(): IJSONSchema;
@@ -72,10 +81,26 @@ export interface IIconRegistry {
getIconReferenceSchema(): IJSONSchema;
/**
* The CSS for all icons
* Register a icon font to the registry.
* @param id The icon font id
* @param definition The iocn font definition
*/
getCSS(): string;
registerIconFont(id: string, definition: IconFontDefinition): IconFontContribution;
/**
* Deregister an icon font to the registry.
*/
deregisterIconFont(id: string): void;
/**
* Get all icon font contributions
*/
getIconFonts(): IconFontContribution[];
/**
* Get the icon font for the given id
*/
getIconFont(id: string): IconFontContribution | undefined;
}
class IconRegistry implements IIconRegistry {
@@ -99,10 +124,13 @@ class IconRegistry implements IIconRegistry {
type: 'object',
properties: {}
};
private iconReferenceSchema: IJSONSchema & { enum: string[], enumDescriptions: string[] } = { type: 'string', enum: [], enumDescriptions: [] };
private iconReferenceSchema: IJSONSchema & { enum: string[], enumDescriptions: string[] } = { type: 'string', pattern: `^${Codicons.CSSIcon.iconNameExpression}$`, enum: [], enumDescriptions: [] };
private iconFontsById: { [key: string]: IconFontContribution };
constructor() {
this.iconsById = {};
this.iconFontsById = {};
}
public registerIcon(id: string, defaults: IconDefaults, description?: string, deprecationMessage?: string): ThemeIcon {
@@ -164,27 +192,27 @@ class IconRegistry implements IIconRegistry {
return this.iconReferenceSchema;
}
public getCSS() {
const rules = [];
for (let id in this.iconsById) {
const rule = this.formatRule(id);
if (rule) {
rules.push(rule);
}
public registerIconFont(id: string, definition: IconFontDefinition): IconFontContribution {
const existing = this.iconFontsById[id];
if (existing) {
return existing;
}
return rules.join('\n');
let iconFontContribution: IconFontContribution = { id, definition };
this.iconFontsById[id] = iconFontContribution;
this._onDidChange.fire();
return iconFontContribution;
}
private formatRule(id: string): string | undefined {
let definition = this.iconsById[id].defaults;
while (ThemeIcon.isThemeIcon(definition)) {
const c = this.iconsById[definition.id];
if (!c) {
return undefined;
}
definition = c.defaults;
}
return `.codicon-${id}:before { content: '${definition.character}'; }`;
public deregisterIconFont(id: string): void {
delete this.iconFontsById[id];
}
public getIconFonts(): IconFontContribution[] {
return Object.keys(this.iconFontsById).map(id => this.iconFontsById[id]);
}
public getIconFont(id: string): IconFontContribution | undefined {
return this.iconFontsById[id];
}
public toString() {
@@ -200,7 +228,7 @@ class IconRegistry implements IIconRegistry {
let reference = [];
reference.push(`| preview | identifier | default codicon id | description`);
reference.push(`| preview | identifier | default codicon ID | description`);
reference.push(`| ----------- | --------------------------------- | --------------------------------- | --------------------------------- |`);
const contributions = Object.keys(this.iconsById).map(key => this.iconsById[key]);

View File

@@ -4,10 +4,11 @@
*--------------------------------------------------------------------------------------------*/
import { IColorTheme, IThemeService } from 'vs/platform/theme/common/themeService';
import { focusBorder, inputBackground, inputForeground, ColorIdentifier, selectForeground, selectBackground, selectListBackground, selectBorder, inputBorder, foreground, editorBackground, contrastBorder, inputActiveOptionBorder, inputActiveOptionBackground, inputActiveOptionForeground, listFocusBackground, listFocusForeground, listActiveSelectionBackground, listActiveSelectionForeground, listInactiveSelectionForeground, listInactiveSelectionBackground, listInactiveFocusBackground, listHoverBackground, listHoverForeground, listDropBackground, pickerGroupBorder, pickerGroupForeground, widgetShadow, inputValidationInfoBorder, inputValidationInfoBackground, inputValidationWarningBorder, inputValidationWarningBackground, inputValidationErrorBorder, inputValidationErrorBackground, activeContrastBorder, buttonForeground, buttonBackground, buttonHoverBackground, ColorFunction, badgeBackground, badgeForeground, progressBarBackground, breadcrumbsForeground, breadcrumbsFocusForeground, breadcrumbsActiveSelectionForeground, breadcrumbsBackground, editorWidgetBorder, inputValidationInfoForeground, inputValidationWarningForeground, inputValidationErrorForeground, menuForeground, menuBackground, menuSelectionForeground, menuSelectionBackground, menuSelectionBorder, menuBorder, menuSeparatorBackground, darken, listFilterWidgetOutline, listFilterWidgetNoMatchesOutline, listFilterWidgetBackground, editorWidgetBackground, treeIndentGuidesStroke, editorWidgetForeground, simpleCheckboxBackground, simpleCheckboxBorder, simpleCheckboxForeground, ColorValue, resolveColorValue, textLinkForeground, problemsWarningIconForeground, problemsErrorIconForeground, problemsInfoIconForeground, buttonSecondaryBackground, buttonSecondaryForeground, buttonSecondaryHoverBackground } from 'vs/platform/theme/common/colorRegistry';
import { focusBorder, inputBackground, inputForeground, ColorIdentifier, selectForeground, selectBackground, selectListBackground, selectBorder, inputBorder, foreground, editorBackground, contrastBorder, inputActiveOptionBorder, inputActiveOptionBackground, inputActiveOptionForeground, listFocusBackground, listFocusForeground, listActiveSelectionBackground, listActiveSelectionForeground, listInactiveSelectionForeground, listInactiveSelectionBackground, listInactiveFocusBackground, listHoverBackground, listHoverForeground, listDropBackground, pickerGroupBorder, pickerGroupForeground, widgetShadow, inputValidationInfoBorder, inputValidationInfoBackground, inputValidationWarningBorder, inputValidationWarningBackground, inputValidationErrorBorder, inputValidationErrorBackground, activeContrastBorder, buttonForeground, buttonBackground, buttonHoverBackground, ColorFunction, badgeBackground, badgeForeground, progressBarBackground, breadcrumbsForeground, breadcrumbsFocusForeground, breadcrumbsActiveSelectionForeground, breadcrumbsBackground, editorWidgetBorder, inputValidationInfoForeground, inputValidationWarningForeground, inputValidationErrorForeground, menuForeground, menuBackground, menuSelectionForeground, menuSelectionBackground, menuSelectionBorder, menuBorder, menuSeparatorBackground, darken, listFilterWidgetOutline, listFilterWidgetNoMatchesOutline, listFilterWidgetBackground, editorWidgetBackground, treeIndentGuidesStroke, editorWidgetForeground, simpleCheckboxBackground, simpleCheckboxBorder, simpleCheckboxForeground, ColorValue, resolveColorValue, textLinkForeground, problemsWarningIconForeground, problemsErrorIconForeground, problemsInfoIconForeground, buttonSecondaryBackground, buttonSecondaryForeground, buttonSecondaryHoverBackground, listFocusOutline, listInactiveFocusOutline, tableColumnsBorder, quickInputListFocusBackground } from 'vs/platform/theme/common/colorRegistry';
import { IDisposable } from 'vs/base/common/lifecycle';
import { Color } from 'vs/base/common/color';
import { IThemable, styleFn } from 'vs/base/common/styler';
import { ColorScheme } from 'vs/platform/theme/common/theme';
export interface IStyleOverrides {
[color: string]: ColorIdentifier | undefined;
@@ -128,9 +129,9 @@ export function attachSelectBoxStyler(widget: IThemable, themeService: IThemeSer
decoratorRightForeground: (style && style.pickerGroupForeground) || pickerGroupForeground,
selectBorder: (style && style.selectBorder) || selectBorder,
focusBorder: (style && style.focusBorder) || focusBorder,
listFocusBackground: (style && style.listFocusBackground) || listFocusBackground,
listFocusBackground: (style && style.listFocusBackground) || quickInputListFocusBackground,
listFocusForeground: (style && style.listFocusForeground) || listFocusForeground,
listFocusOutline: (style && style.listFocusOutline) || activeContrastBorder,
listFocusOutline: (style && style.listFocusOutline) || ((theme: IColorTheme) => theme.type === ColorScheme.HIGH_CONTRAST ? activeContrastBorder : Color.transparent),
listHoverBackground: (style && style.listHoverBackground) || listHoverBackground,
listHoverForeground: (style && style.listHoverForeground) || listHoverForeground,
listHoverOutline: (style && style.listFocusOutline) || activeContrastBorder,
@@ -210,6 +211,7 @@ export interface IListStyleOverrides extends IStyleOverrides {
listBackground?: ColorIdentifier;
listFocusBackground?: ColorIdentifier;
listFocusForeground?: ColorIdentifier;
listFocusOutline?: ColorIdentifier;
listActiveSelectionBackground?: ColorIdentifier;
listActiveSelectionForeground?: ColorIdentifier;
listFocusAndSelectionBackground?: ColorIdentifier;
@@ -217,11 +219,10 @@ export interface IListStyleOverrides extends IStyleOverrides {
listInactiveSelectionBackground?: ColorIdentifier;
listInactiveSelectionForeground?: ColorIdentifier;
listInactiveFocusBackground?: ColorIdentifier;
listInactiveFocusOutline?: ColorIdentifier;
listHoverBackground?: ColorIdentifier;
listHoverForeground?: ColorIdentifier;
listDropBackground?: ColorIdentifier;
listFocusOutline?: ColorIdentifier;
listInactiveFocusOutline?: ColorIdentifier;
listSelectionOutline?: ColorIdentifier;
listHoverOutline?: ColorIdentifier;
listFilterWidgetBackground?: ColorIdentifier;
@@ -229,6 +230,7 @@ export interface IListStyleOverrides extends IStyleOverrides {
listFilterWidgetNoMatchesOutline?: ColorIdentifier;
listMatchesShadow?: ColorIdentifier;
treeIndentGuidesStroke?: ColorIdentifier;
tableColumnsBorder?: ColorIdentifier;
}
export function attachListStyler(widget: IThemable, themeService: IThemeService, overrides?: IColorMapping): IDisposable {
@@ -236,26 +238,28 @@ export function attachListStyler(widget: IThemable, themeService: IThemeService,
}
export const defaultListStyles: IColorMapping = {
listFocusBackground: listFocusBackground,
listFocusForeground: listFocusForeground,
listActiveSelectionBackground: darken(listActiveSelectionBackground, 0.1),
listActiveSelectionForeground: listActiveSelectionForeground,
listFocusBackground,
listFocusForeground,
listFocusOutline,
listActiveSelectionBackground,
listActiveSelectionForeground,
listFocusAndSelectionBackground: listActiveSelectionBackground,
listFocusAndSelectionForeground: listActiveSelectionForeground,
listInactiveSelectionBackground: listInactiveSelectionBackground,
listInactiveSelectionForeground: listInactiveSelectionForeground,
listInactiveFocusBackground: listInactiveFocusBackground,
listHoverBackground: listHoverBackground,
listHoverForeground: listHoverForeground,
listDropBackground: listDropBackground,
listFocusOutline: activeContrastBorder,
listInactiveSelectionBackground,
listInactiveSelectionForeground,
listInactiveFocusBackground,
listInactiveFocusOutline,
listHoverBackground,
listHoverForeground,
listDropBackground,
listSelectionOutline: activeContrastBorder,
listHoverOutline: activeContrastBorder,
listFilterWidgetBackground: listFilterWidgetBackground,
listFilterWidgetOutline: listFilterWidgetOutline,
listFilterWidgetNoMatchesOutline: listFilterWidgetNoMatchesOutline,
listFilterWidgetBackground,
listFilterWidgetOutline,
listFilterWidgetNoMatchesOutline,
listMatchesShadow: widgetShadow,
treeIndentGuidesStroke: treeIndentGuidesStroke
treeIndentGuidesStroke,
tableColumnsBorder
};
export interface IButtonStyleOverrides extends IStyleOverrides {

View File

@@ -40,18 +40,15 @@ export namespace ThemeIcon {
return obj && typeof obj === 'object' && typeof (<ThemeIcon>obj).id === 'string' && (typeof (<ThemeIcon>obj).color === 'undefined' || ThemeColor.isThemeColor((<ThemeIcon>obj).color));
}
const _regexFromString = /^\$\(([a-z.]+\/)?([a-z-~]+)\)$/i;
const _regexFromString = new RegExp(`^\\$\\((${CSSIcon.iconNameExpression}(?:${CSSIcon.iconModifierExpression})?)\\)$`);
export function fromString(str: string): ThemeIcon | undefined {
const match = _regexFromString.exec(str);
if (!match) {
return undefined;
}
let [, owner, name] = match;
if (!owner || owner === 'codicon/') {
return { id: name };
}
return { id: owner + name };
let [, name] = match;
return { id: name };
}
export function modify(icon: ThemeIcon, modifier: 'disabled' | 'spin' | undefined): ThemeIcon {