@codingame/monaco-vscode-theme-service-override 25.0.0 → 25.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +3 -3
- package/vscode/src/vs/workbench/contrib/themes/browser/themes.contribution.js +41 -41
- package/vscode/src/vs/workbench/services/themes/browser/fileIconThemeData.js +2 -2
- package/vscode/src/vs/workbench/services/themes/browser/productIconThemeData.js +12 -12
- package/vscode/src/vs/workbench/services/themes/browser/workbenchThemeService.js +1 -1
- package/vscode/src/vs/workbench/services/themes/common/colorThemeSchema.js +16 -16
- package/vscode/src/vs/workbench/services/themes/common/fileIconThemeSchema.js +38 -38
- package/vscode/src/vs/workbench/services/themes/common/productIconThemeSchema.js +7 -7
- package/vscode/src/vs/workbench/services/themes/common/themeConfiguration.js +36 -36
- package/vscode/src/vs/workbench/services/themes/common/themeExtensionPoints.js +21 -21
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-theme-service-override",
|
|
3
|
-
"version": "25.
|
|
3
|
+
"version": "25.1.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "VSCode public API plugged on the monaco editor - theme service-override",
|
|
6
6
|
"keywords": [],
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
},
|
|
16
16
|
"type": "module",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@codingame/monaco-vscode-api": "25.
|
|
19
|
-
"@codingame/monaco-vscode-files-service-override": "25.
|
|
18
|
+
"@codingame/monaco-vscode-api": "25.1.0",
|
|
19
|
+
"@codingame/monaco-vscode-files-service-override": "25.1.0"
|
|
20
20
|
},
|
|
21
21
|
"main": "index.js",
|
|
22
22
|
"module": "index.js",
|
|
@@ -52,7 +52,7 @@ import { IPreferencesService } from '@codingame/monaco-vscode-api/vscode/vs/work
|
|
|
52
52
|
import { DisposableStore } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
53
53
|
import Severity from '@codingame/monaco-vscode-api/vscode/vs/base/common/severity';
|
|
54
54
|
|
|
55
|
-
const manageExtensionIcon = registerIcon('theme-selection-manage-extension', Codicon.gear, ( localize(
|
|
55
|
+
const manageExtensionIcon = registerIcon('theme-selection-manage-extension', Codicon.gear, ( localize(12775, 'Icon for the \'Manage\' action in the theme selection quick pick.')));
|
|
56
56
|
var ConfigureItem;
|
|
57
57
|
(function (ConfigureItem) {
|
|
58
58
|
ConfigureItem["BROWSE_GALLERY"] = "marketplace";
|
|
@@ -160,7 +160,7 @@ let MarketplaceThemesPicker = class MarketplaceThemesPicker {
|
|
|
160
160
|
quickpick.matchOnDescription = true;
|
|
161
161
|
quickpick.buttons = [this.quickInputService.backButton];
|
|
162
162
|
quickpick.title = 'Marketplace Themes';
|
|
163
|
-
quickpick.placeholder = ( localize(
|
|
163
|
+
quickpick.placeholder = ( localize(12776, "Type to Search More. Select to Install. Up/Down Keys to Preview"));
|
|
164
164
|
quickpick.canSelectMany = false;
|
|
165
165
|
disposables.add(quickpick.onDidChangeValue(() => this.trigger(quickpick.value)));
|
|
166
166
|
disposables.add(quickpick.onDidAccept(async (_) => {
|
|
@@ -212,7 +212,7 @@ let MarketplaceThemesPicker = class MarketplaceThemesPicker {
|
|
|
212
212
|
items = items.concat({ label: '$(loading~spin) Searching for themes...', id: undefined, alwaysShow: true });
|
|
213
213
|
}
|
|
214
214
|
else if (items.length === 0 && this._searchError) {
|
|
215
|
-
items = [{ label: `$(error) ${( localize(
|
|
215
|
+
items = [{ label: `$(error) ${( localize(12777, 'Error while searching for themes: {0}', this._searchError))}`, id: undefined, alwaysShow: true }];
|
|
216
216
|
}
|
|
217
217
|
const activeItemId = quickpick.activeItems[0]?.id;
|
|
218
218
|
const newActiveItem = activeItemId ? items.find(i => isItem(i) && i.id === activeItemId) : undefined;
|
|
@@ -231,12 +231,12 @@ let MarketplaceThemesPicker = class MarketplaceThemesPicker {
|
|
|
231
231
|
this.extensionsWorkbenchService.openSearch(`@id:${galleryExtension.identifier.id}`);
|
|
232
232
|
const result = await this.dialogService.confirm({
|
|
233
233
|
message: ( localize(
|
|
234
|
-
|
|
234
|
+
12778,
|
|
235
235
|
"This will install extension '{0}' published by '{1}'. Do you want to continue?",
|
|
236
236
|
galleryExtension.displayName,
|
|
237
237
|
galleryExtension.publisherDisplayName
|
|
238
238
|
)),
|
|
239
|
-
primaryButton: ( localize(
|
|
239
|
+
primaryButton: ( localize(12779, "OK"))
|
|
240
240
|
});
|
|
241
241
|
if (!result.confirmed) {
|
|
242
242
|
return false;
|
|
@@ -244,7 +244,7 @@ let MarketplaceThemesPicker = class MarketplaceThemesPicker {
|
|
|
244
244
|
try {
|
|
245
245
|
await this.progressService.withProgress({
|
|
246
246
|
location: ProgressLocation.Notification,
|
|
247
|
-
title: ( localize(
|
|
247
|
+
title: ( localize(12780, "Installing Extension {0}...", galleryExtension.displayName))
|
|
248
248
|
}, async () => {
|
|
249
249
|
await this.extensionManagementService.installFromGallery(galleryExtension, {
|
|
250
250
|
isMachineScoped: false,
|
|
@@ -390,7 +390,7 @@ registerAction2(class extends Action2 {
|
|
|
390
390
|
constructor() {
|
|
391
391
|
super({
|
|
392
392
|
id: SelectColorThemeCommandId,
|
|
393
|
-
title: ( localize2(
|
|
393
|
+
title: ( localize2(12781, 'Color Theme')),
|
|
394
394
|
category: Categories.Preferences,
|
|
395
395
|
f1: true,
|
|
396
396
|
keybinding: {
|
|
@@ -401,12 +401,12 @@ registerAction2(class extends Action2 {
|
|
|
401
401
|
}
|
|
402
402
|
getTitle(colorScheme) {
|
|
403
403
|
switch (colorScheme) {
|
|
404
|
-
case ColorScheme.DARK: return localize(
|
|
405
|
-
case ColorScheme.LIGHT: return localize(
|
|
406
|
-
case ColorScheme.HIGH_CONTRAST_DARK: return localize(
|
|
407
|
-
case ColorScheme.HIGH_CONTRAST_LIGHT: return localize(
|
|
404
|
+
case ColorScheme.DARK: return localize(12782, "Select Color Theme for System Dark Mode");
|
|
405
|
+
case ColorScheme.LIGHT: return localize(12783, "Select Color Theme for System Light Mode");
|
|
406
|
+
case ColorScheme.HIGH_CONTRAST_DARK: return localize(12784, "Select Color Theme for High Contrast Dark Mode");
|
|
407
|
+
case ColorScheme.HIGH_CONTRAST_LIGHT: return localize(12785, "Select Color Theme for High Contrast Light Mode");
|
|
408
408
|
default:
|
|
409
|
-
return localize(
|
|
409
|
+
return localize(12786, "Select Color Theme (detect system color mode disabled)");
|
|
410
410
|
}
|
|
411
411
|
}
|
|
412
412
|
async run(accessor) {
|
|
@@ -415,14 +415,14 @@ registerAction2(class extends Action2 {
|
|
|
415
415
|
const preferredColorScheme = themeService.getPreferredColorScheme();
|
|
416
416
|
const modeConfigureButton = {
|
|
417
417
|
tooltip: preferredColorScheme
|
|
418
|
-
? ( localize(
|
|
419
|
-
: ( localize(
|
|
418
|
+
? ( localize(12787, 'Detect system color mode enabled. Click to configure.'))
|
|
419
|
+
: ( localize(12788, 'Detect system color mode disabled. Click to configure.')),
|
|
420
420
|
iconClass: ThemeIcon.asClassName(Codicon.colorMode),
|
|
421
421
|
location: QuickInputButtonLocation.Inline
|
|
422
422
|
};
|
|
423
423
|
const options = {
|
|
424
|
-
installMessage: ( localize(
|
|
425
|
-
browseMessage: '$(plus) ' + ( localize(
|
|
424
|
+
installMessage: ( localize(12789, "Install Additional Color Themes...")),
|
|
425
|
+
browseMessage: '$(plus) ' + ( localize(12790, "Browse Additional Color Themes...")),
|
|
426
426
|
placeholderMessage: this.getTitle(preferredColorScheme),
|
|
427
427
|
marketplaceTag: 'category:themes',
|
|
428
428
|
buttons: [modeConfigureButton],
|
|
@@ -437,9 +437,9 @@ registerAction2(class extends Action2 {
|
|
|
437
437
|
const picker = instantiationService.createInstance(InstalledThemesPicker, options, setTheme, getMarketplaceColorThemes);
|
|
438
438
|
const themes = await themeService.getColorThemes();
|
|
439
439
|
const currentTheme = themeService.getColorTheme();
|
|
440
|
-
const lightEntries = toEntries(themes.filter(t => t.type === ColorScheme.LIGHT), ( localize(
|
|
441
|
-
const darkEntries = toEntries(themes.filter(t => t.type === ColorScheme.DARK), ( localize(
|
|
442
|
-
const hcEntries = toEntries(themes.filter(t => isHighContrast(t.type)), ( localize(
|
|
440
|
+
const lightEntries = toEntries(themes.filter(t => t.type === ColorScheme.LIGHT), ( localize(12791, "light themes")));
|
|
441
|
+
const darkEntries = toEntries(themes.filter(t => t.type === ColorScheme.DARK), ( localize(12792, "dark themes")));
|
|
442
|
+
const hcEntries = toEntries(themes.filter(t => isHighContrast(t.type)), ( localize(12793, "high contrast themes")));
|
|
443
443
|
let picks;
|
|
444
444
|
switch (preferredColorScheme) {
|
|
445
445
|
case ColorScheme.DARK:
|
|
@@ -462,7 +462,7 @@ registerAction2(class extends Action2 {
|
|
|
462
462
|
constructor() {
|
|
463
463
|
super({
|
|
464
464
|
id: SelectFileIconThemeCommandId,
|
|
465
|
-
title: ( localize2(
|
|
465
|
+
title: ( localize2(12794, 'File Icon Theme')),
|
|
466
466
|
category: Categories.Preferences,
|
|
467
467
|
f1: true
|
|
468
468
|
});
|
|
@@ -470,8 +470,8 @@ registerAction2(class extends Action2 {
|
|
|
470
470
|
async run(accessor) {
|
|
471
471
|
const themeService = accessor.get(IWorkbenchThemeService);
|
|
472
472
|
const options = {
|
|
473
|
-
installMessage: ( localize(
|
|
474
|
-
placeholderMessage: ( localize(
|
|
473
|
+
installMessage: ( localize(12795, "Install Additional File Icon Themes...")),
|
|
474
|
+
placeholderMessage: ( localize(12796, "Select File Icon Theme (Up/Down Keys to Preview)")),
|
|
475
475
|
marketplaceTag: 'tag:icon-theme'
|
|
476
476
|
};
|
|
477
477
|
const setTheme = (theme, settingsTarget) => themeService.setFileIconTheme(theme, settingsTarget);
|
|
@@ -479,8 +479,8 @@ registerAction2(class extends Action2 {
|
|
|
479
479
|
const instantiationService = accessor.get(IInstantiationService);
|
|
480
480
|
const picker = instantiationService.createInstance(InstalledThemesPicker, options, setTheme, getMarketplaceColorThemes);
|
|
481
481
|
const picks = [
|
|
482
|
-
{ type: 'separator', label: ( localize(
|
|
483
|
-
{ id: '', theme: FileIconThemeData.noIconTheme, label: ( localize(
|
|
482
|
+
{ type: 'separator', label: ( localize(12797, 'file icon themes')) },
|
|
483
|
+
{ id: '', theme: FileIconThemeData.noIconTheme, label: ( localize(12798, 'None')), description: ( localize(12799, 'Disable File Icons')) },
|
|
484
484
|
...toEntries(await themeService.getFileIconThemes()),
|
|
485
485
|
];
|
|
486
486
|
await picker.openQuickPick(picks, themeService.getFileIconTheme());
|
|
@@ -491,7 +491,7 @@ registerAction2(class extends Action2 {
|
|
|
491
491
|
constructor() {
|
|
492
492
|
super({
|
|
493
493
|
id: SelectProductIconThemeCommandId,
|
|
494
|
-
title: ( localize2(
|
|
494
|
+
title: ( localize2(12800, 'Product Icon Theme')),
|
|
495
495
|
category: Categories.Preferences,
|
|
496
496
|
f1: true
|
|
497
497
|
});
|
|
@@ -499,9 +499,9 @@ registerAction2(class extends Action2 {
|
|
|
499
499
|
async run(accessor) {
|
|
500
500
|
const themeService = accessor.get(IWorkbenchThemeService);
|
|
501
501
|
const options = {
|
|
502
|
-
installMessage: ( localize(
|
|
503
|
-
browseMessage: '$(plus) ' + ( localize(
|
|
504
|
-
placeholderMessage: ( localize(
|
|
502
|
+
installMessage: ( localize(12801, "Install Additional Product Icon Themes...")),
|
|
503
|
+
browseMessage: '$(plus) ' + ( localize(12802, "Browse Additional Product Icon Themes...")),
|
|
504
|
+
placeholderMessage: ( localize(12803, "Select Product Icon Theme (Up/Down Keys to Preview)")),
|
|
505
505
|
marketplaceTag: 'tag:product-icon-theme'
|
|
506
506
|
};
|
|
507
507
|
const setTheme = (theme, settingsTarget) => themeService.setProductIconTheme(theme, settingsTarget);
|
|
@@ -509,8 +509,8 @@ registerAction2(class extends Action2 {
|
|
|
509
509
|
const instantiationService = accessor.get(IInstantiationService);
|
|
510
510
|
const picker = instantiationService.createInstance(InstalledThemesPicker, options, setTheme, getMarketplaceColorThemes);
|
|
511
511
|
const picks = [
|
|
512
|
-
{ type: 'separator', label: ( localize(
|
|
513
|
-
{ id: DEFAULT_PRODUCT_ICON_THEME_ID, theme: ProductIconThemeData.defaultTheme, label: ( localize(
|
|
512
|
+
{ type: 'separator', label: ( localize(12804, 'product icon themes')) },
|
|
513
|
+
{ id: DEFAULT_PRODUCT_ICON_THEME_ID, theme: ProductIconThemeData.defaultTheme, label: ( localize(12805, 'Default')) },
|
|
514
514
|
...toEntries(await themeService.getProductIconThemes()),
|
|
515
515
|
];
|
|
516
516
|
await picker.openQuickPick(picks, themeService.getProductIconTheme());
|
|
@@ -568,13 +568,13 @@ function toEntries(themes, label) {
|
|
|
568
568
|
}
|
|
569
569
|
const configureButton = {
|
|
570
570
|
iconClass: ThemeIcon.asClassName(manageExtensionIcon),
|
|
571
|
-
tooltip: ( localize(
|
|
571
|
+
tooltip: ( localize(12806, "Manage Extension")),
|
|
572
572
|
};
|
|
573
573
|
registerAction2(class extends Action2 {
|
|
574
574
|
constructor() {
|
|
575
575
|
super({
|
|
576
576
|
id: 'workbench.action.generateColorTheme',
|
|
577
|
-
title: ( localize2(
|
|
577
|
+
title: ( localize2(12807, 'Generate Color Theme From Current Settings')),
|
|
578
578
|
category: Categories.Developer,
|
|
579
579
|
f1: true
|
|
580
580
|
});
|
|
@@ -624,7 +624,7 @@ registerAction2(class extends Action2 {
|
|
|
624
624
|
constructor() {
|
|
625
625
|
super({
|
|
626
626
|
id: toggleLightDarkThemesCommandId,
|
|
627
|
-
title: ( localize2(
|
|
627
|
+
title: ( localize2(12808, 'Toggle between Light/Dark Themes')),
|
|
628
628
|
category: Categories.Preferences,
|
|
629
629
|
f1: true,
|
|
630
630
|
});
|
|
@@ -636,13 +636,13 @@ registerAction2(class extends Action2 {
|
|
|
636
636
|
const preferencesService = accessor.get(IPreferencesService);
|
|
637
637
|
if (configurationService.getValue(ThemeSettings.DETECT_COLOR_SCHEME)) {
|
|
638
638
|
const message = ( localize(
|
|
639
|
-
|
|
639
|
+
12809,
|
|
640
640
|
"Cannot toggle between light and dark themes when `{0}` is enabled in settings.",
|
|
641
641
|
ThemeSettings.DETECT_COLOR_SCHEME
|
|
642
642
|
));
|
|
643
643
|
notificationService.prompt(Severity.Info, message, [
|
|
644
644
|
{
|
|
645
|
-
label: ( localize(
|
|
645
|
+
label: ( localize(12810, "Open Settings")),
|
|
646
646
|
run: () => {
|
|
647
647
|
return preferencesService.openUserSettings({ query: ThemeSettings.DETECT_COLOR_SCHEME });
|
|
648
648
|
}
|
|
@@ -680,7 +680,7 @@ registerAction2(class extends Action2 {
|
|
|
680
680
|
constructor() {
|
|
681
681
|
super({
|
|
682
682
|
id: browseColorThemesInMarketplaceCommandId,
|
|
683
|
-
title: ( localize2(
|
|
683
|
+
title: ( localize2(12811, 'Browse Color Themes in Marketplace')),
|
|
684
684
|
category: Categories.Preferences,
|
|
685
685
|
f1: true,
|
|
686
686
|
});
|
|
@@ -721,13 +721,13 @@ registerAction2(class extends Action2 {
|
|
|
721
721
|
});
|
|
722
722
|
const ThemesSubMenu = ( new MenuId('ThemesSubMenu'));
|
|
723
723
|
MenuRegistry.appendMenuItem(MenuId.GlobalActivity, {
|
|
724
|
-
title: ( localize(
|
|
724
|
+
title: ( localize(12812, "Themes")),
|
|
725
725
|
submenu: ThemesSubMenu,
|
|
726
726
|
group: '2_configuration',
|
|
727
727
|
order: 7
|
|
728
728
|
});
|
|
729
729
|
MenuRegistry.appendMenuItem(MenuId.MenubarPreferencesMenu, {
|
|
730
|
-
title: ( localize(
|
|
730
|
+
title: ( localize(12813, "&&Themes")),
|
|
731
731
|
submenu: ThemesSubMenu,
|
|
732
732
|
group: '2_configuration',
|
|
733
733
|
order: 7
|
|
@@ -735,21 +735,21 @@ MenuRegistry.appendMenuItem(MenuId.MenubarPreferencesMenu, {
|
|
|
735
735
|
MenuRegistry.appendMenuItem(ThemesSubMenu, {
|
|
736
736
|
command: {
|
|
737
737
|
id: SelectColorThemeCommandId,
|
|
738
|
-
title: ( localize(
|
|
738
|
+
title: ( localize(12781, 'Color Theme'))
|
|
739
739
|
},
|
|
740
740
|
order: 1
|
|
741
741
|
});
|
|
742
742
|
MenuRegistry.appendMenuItem(ThemesSubMenu, {
|
|
743
743
|
command: {
|
|
744
744
|
id: SelectFileIconThemeCommandId,
|
|
745
|
-
title: ( localize(
|
|
745
|
+
title: ( localize(12814, "File Icon Theme"))
|
|
746
746
|
},
|
|
747
747
|
order: 2
|
|
748
748
|
});
|
|
749
749
|
MenuRegistry.appendMenuItem(ThemesSubMenu, {
|
|
750
750
|
command: {
|
|
751
751
|
id: SelectProductIconThemeCommandId,
|
|
752
|
-
title: ( localize(
|
|
752
|
+
title: ( localize(12815, "Product Icon Theme"))
|
|
753
753
|
},
|
|
754
754
|
order: 3
|
|
755
755
|
});
|
|
@@ -141,13 +141,13 @@ class FileIconThemeLoader {
|
|
|
141
141
|
const contentValue = parse(content, errors);
|
|
142
142
|
if (errors.length > 0) {
|
|
143
143
|
return Promise.reject(( new Error(( localize(
|
|
144
|
-
|
|
144
|
+
14316,
|
|
145
145
|
"Problems parsing file icons file: {0}",
|
|
146
146
|
( errors.map(e => getParseErrorMessage(e.error))).join(', ')
|
|
147
147
|
)))));
|
|
148
148
|
}
|
|
149
149
|
else if (getNodeType(contentValue) !== 'object') {
|
|
150
|
-
return Promise.reject(( new Error(( localize(
|
|
150
|
+
return Promise.reject(( new Error(( localize(14317, "Invalid format for file icons theme file: Object expected.")))));
|
|
151
151
|
}
|
|
152
152
|
return Promise.resolve(contentValue);
|
|
153
153
|
});
|
|
@@ -39,7 +39,7 @@ class ProductIconThemeData {
|
|
|
39
39
|
this.isLoaded = true;
|
|
40
40
|
if (warnings.length) {
|
|
41
41
|
logService.error(( localize(
|
|
42
|
-
|
|
42
|
+
14318,
|
|
43
43
|
"Problems processing product icons definitions in {0}:\n{1}",
|
|
44
44
|
(location.toString()),
|
|
45
45
|
warnings.join('\n')
|
|
@@ -70,7 +70,7 @@ class ProductIconThemeData {
|
|
|
70
70
|
static get defaultTheme() {
|
|
71
71
|
let themeData = ProductIconThemeData._defaultProductIconTheme;
|
|
72
72
|
if (!themeData) {
|
|
73
|
-
themeData = ProductIconThemeData._defaultProductIconTheme = ( new ProductIconThemeData(DEFAULT_PRODUCT_ICON_THEME_ID, ( localize(
|
|
73
|
+
themeData = ProductIconThemeData._defaultProductIconTheme = ( new ProductIconThemeData(DEFAULT_PRODUCT_ICON_THEME_ID, ( localize(14319, 'Default')), ThemeSettingDefaults.PRODUCT_ICON_THEME));
|
|
74
74
|
themeData.isLoaded = true;
|
|
75
75
|
themeData.extensionData = undefined;
|
|
76
76
|
themeData.watch = false;
|
|
@@ -157,17 +157,17 @@ function _loadProductIconThemeDocument(fileService, location, warnings) {
|
|
|
157
157
|
const contentValue = parse(content, parseErrors);
|
|
158
158
|
if (parseErrors.length > 0) {
|
|
159
159
|
return Promise.reject(( new Error(( localize(
|
|
160
|
-
|
|
160
|
+
14320,
|
|
161
161
|
"Problems parsing product icons file: {0}",
|
|
162
162
|
( parseErrors.map(e => getParseErrorMessage(e.error))).join(', ')
|
|
163
163
|
)))));
|
|
164
164
|
}
|
|
165
165
|
else if (getNodeType(contentValue) !== 'object') {
|
|
166
|
-
return Promise.reject(( new Error(( localize(
|
|
166
|
+
return Promise.reject(( new Error(( localize(14321, "Invalid format for product icons theme file: Object expected.")))));
|
|
167
167
|
}
|
|
168
168
|
else if (!contentValue.iconDefinitions || !Array.isArray(contentValue.fonts) || !contentValue.fonts.length) {
|
|
169
169
|
return Promise.reject(( new Error(( localize(
|
|
170
|
-
|
|
170
|
+
14322,
|
|
171
171
|
"Invalid format for product icons theme file: Must contain iconDefinitions and fonts."
|
|
172
172
|
)))));
|
|
173
173
|
}
|
|
@@ -181,14 +181,14 @@ function _loadProductIconThemeDocument(fileService, location, warnings) {
|
|
|
181
181
|
fontWeight = font.weight;
|
|
182
182
|
}
|
|
183
183
|
else {
|
|
184
|
-
warnings.push(( localize(
|
|
184
|
+
warnings.push(( localize(14323, 'Invalid font weight in font \'{0}\'. Ignoring setting.', font.id)));
|
|
185
185
|
}
|
|
186
186
|
let fontStyle = undefined;
|
|
187
187
|
if (isString(font.style) && font.style.match(fontStyleRegex)) {
|
|
188
188
|
fontStyle = font.style;
|
|
189
189
|
}
|
|
190
190
|
else {
|
|
191
|
-
warnings.push(( localize(
|
|
191
|
+
warnings.push(( localize(14324, 'Invalid font style in font \'{0}\'. Ignoring setting.', font.id)));
|
|
192
192
|
}
|
|
193
193
|
const sanitizedSrc = [];
|
|
194
194
|
if (Array.isArray(font.src)) {
|
|
@@ -198,7 +198,7 @@ function _loadProductIconThemeDocument(fileService, location, warnings) {
|
|
|
198
198
|
sanitizedSrc.push({ location: iconFontLocation, format: s.format });
|
|
199
199
|
}
|
|
200
200
|
else {
|
|
201
|
-
warnings.push(( localize(
|
|
201
|
+
warnings.push(( localize(14325, 'Invalid font source in font \'{0}\'. Ignoring source.', font.id)));
|
|
202
202
|
}
|
|
203
203
|
}
|
|
204
204
|
}
|
|
@@ -207,7 +207,7 @@ function _loadProductIconThemeDocument(fileService, location, warnings) {
|
|
|
207
207
|
}
|
|
208
208
|
else {
|
|
209
209
|
warnings.push(( localize(
|
|
210
|
-
|
|
210
|
+
14326,
|
|
211
211
|
'No valid font source in font \'{0}\'. Ignoring font definition.',
|
|
212
212
|
font.id
|
|
213
213
|
)));
|
|
@@ -215,7 +215,7 @@ function _loadProductIconThemeDocument(fileService, location, warnings) {
|
|
|
215
215
|
}
|
|
216
216
|
else {
|
|
217
217
|
warnings.push(( localize(
|
|
218
|
-
|
|
218
|
+
14327,
|
|
219
219
|
'Missing or invalid font id \'{0}\'. Skipping font definition.',
|
|
220
220
|
font.id
|
|
221
221
|
)));
|
|
@@ -233,11 +233,11 @@ function _loadProductIconThemeDocument(fileService, location, warnings) {
|
|
|
233
233
|
iconDefinitions.set(iconId, { fontCharacter: definition.fontCharacter, font });
|
|
234
234
|
}
|
|
235
235
|
else {
|
|
236
|
-
warnings.push(( localize(
|
|
236
|
+
warnings.push(( localize(14328, 'Skipping icon definition \'{0}\'. Unknown font.', iconId)));
|
|
237
237
|
}
|
|
238
238
|
}
|
|
239
239
|
else {
|
|
240
|
-
warnings.push(( localize(
|
|
240
|
+
warnings.push(( localize(14329, 'Skipping icon definition \'{0}\': Needs to be defined', iconId)));
|
|
241
241
|
}
|
|
242
242
|
}
|
|
243
243
|
return { iconDefinitions };
|
|
@@ -136,31 +136,31 @@ const textmateColorSchema = {
|
|
|
136
136
|
},
|
|
137
137
|
settings: {
|
|
138
138
|
type: 'object',
|
|
139
|
-
description: ( localize(
|
|
139
|
+
description: ( localize(14361, 'Colors and styles for the token.')),
|
|
140
140
|
properties: {
|
|
141
141
|
foreground: {
|
|
142
142
|
type: 'string',
|
|
143
|
-
description: ( localize(
|
|
143
|
+
description: ( localize(14362, 'Foreground color for the token.')),
|
|
144
144
|
format: 'color-hex',
|
|
145
145
|
default: '#ff0000'
|
|
146
146
|
},
|
|
147
147
|
background: {
|
|
148
148
|
type: 'string',
|
|
149
|
-
deprecationMessage: ( localize(
|
|
149
|
+
deprecationMessage: ( localize(14363, 'Token background colors are currently not supported.'))
|
|
150
150
|
},
|
|
151
151
|
fontStyle: {
|
|
152
152
|
type: 'string',
|
|
153
153
|
description: ( localize(
|
|
154
|
-
|
|
154
|
+
14364,
|
|
155
155
|
'Font style of the rule: \'italic\', \'bold\', \'underline\', \'strikethrough\' or a combination. The empty string unsets inherited settings.'
|
|
156
156
|
)),
|
|
157
157
|
pattern: '^(\\s*\\b(italic|bold|underline|strikethrough))*\\s*$',
|
|
158
158
|
patternErrorMessage: ( localize(
|
|
159
|
-
|
|
159
|
+
14365,
|
|
160
160
|
'Font style must be \'italic\', \'bold\', \'underline\', \'strikethrough\' or a combination or the empty string.'
|
|
161
161
|
)),
|
|
162
162
|
defaultSnippets: [
|
|
163
|
-
{ label: ( localize(
|
|
163
|
+
{ label: ( localize(14366, 'None (clear inherited style)')), bodyText: '""' },
|
|
164
164
|
{ body: 'italic' },
|
|
165
165
|
{ body: 'bold' },
|
|
166
166
|
{ body: 'underline' },
|
|
@@ -180,15 +180,15 @@ const textmateColorSchema = {
|
|
|
180
180
|
},
|
|
181
181
|
fontFamily: {
|
|
182
182
|
type: 'string',
|
|
183
|
-
description: ( localize(
|
|
183
|
+
description: ( localize(14367, 'Font family for the token (e.g., "Fira Code", "JetBrains Mono").'))
|
|
184
184
|
},
|
|
185
185
|
fontSize: {
|
|
186
186
|
type: 'string',
|
|
187
|
-
description: ( localize(
|
|
187
|
+
description: ( localize(14368, 'Font size string for the token (e.g., "14px", "1.2em").'))
|
|
188
188
|
},
|
|
189
189
|
lineHeight: {
|
|
190
190
|
type: 'number',
|
|
191
|
-
description: ( localize(
|
|
191
|
+
description: ( localize(14369, 'Line height number for the token (e.g., "20").'))
|
|
192
192
|
}
|
|
193
193
|
},
|
|
194
194
|
additionalProperties: false,
|
|
@@ -201,10 +201,10 @@ const textmateColorSchema = {
|
|
|
201
201
|
properties: {
|
|
202
202
|
name: {
|
|
203
203
|
type: 'string',
|
|
204
|
-
description: ( localize(
|
|
204
|
+
description: ( localize(14370, 'Description of the rule.'))
|
|
205
205
|
},
|
|
206
206
|
scope: {
|
|
207
|
-
description: ( localize(
|
|
207
|
+
description: ( localize(14371, 'Scope selector against which this rule matches.')),
|
|
208
208
|
anyOf: [
|
|
209
209
|
{
|
|
210
210
|
enum: textMateScopes
|
|
@@ -243,28 +243,28 @@ const colorThemeSchema = {
|
|
|
243
243
|
allowTrailingCommas: true,
|
|
244
244
|
properties: {
|
|
245
245
|
colors: {
|
|
246
|
-
description: ( localize(
|
|
246
|
+
description: ( localize(14372, 'Colors in the workbench')),
|
|
247
247
|
$ref: workbenchColorsSchemaId,
|
|
248
248
|
additionalProperties: false
|
|
249
249
|
},
|
|
250
250
|
tokenColors: {
|
|
251
251
|
anyOf: [{
|
|
252
252
|
type: 'string',
|
|
253
|
-
description: ( localize(
|
|
253
|
+
description: ( localize(14373, 'Path to a tmTheme file (relative to the current file).'))
|
|
254
254
|
},
|
|
255
255
|
{
|
|
256
|
-
description: ( localize(
|
|
256
|
+
description: ( localize(14374, 'Colors for syntax highlighting')),
|
|
257
257
|
$ref: textmateColorsSchemaId
|
|
258
258
|
}
|
|
259
259
|
]
|
|
260
260
|
},
|
|
261
261
|
semanticHighlighting: {
|
|
262
262
|
type: 'boolean',
|
|
263
|
-
description: ( localize(
|
|
263
|
+
description: ( localize(14375, 'Whether semantic highlighting should be enabled for this theme.'))
|
|
264
264
|
},
|
|
265
265
|
semanticTokenColors: {
|
|
266
266
|
type: 'object',
|
|
267
|
-
description: ( localize(
|
|
267
|
+
description: ( localize(14376, 'Colors for semantic tokens')),
|
|
268
268
|
$ref: tokenStylingSchemaId
|
|
269
269
|
}
|
|
270
270
|
}
|
|
@@ -13,113 +13,113 @@ const schema = {
|
|
|
13
13
|
folderExpanded: {
|
|
14
14
|
type: 'string',
|
|
15
15
|
description: ( localize(
|
|
16
|
-
|
|
16
|
+
14377,
|
|
17
17
|
'The folder icon for expanded folders. The expanded folder icon is optional. If not set, the icon defined for folder will be shown.'
|
|
18
18
|
))
|
|
19
19
|
},
|
|
20
20
|
folder: {
|
|
21
21
|
type: 'string',
|
|
22
22
|
description: ( localize(
|
|
23
|
-
|
|
23
|
+
14378,
|
|
24
24
|
'The folder icon for collapsed folders, and if folderExpanded is not set, also for expanded folders.'
|
|
25
25
|
))
|
|
26
26
|
},
|
|
27
27
|
file: {
|
|
28
28
|
type: 'string',
|
|
29
29
|
description: ( localize(
|
|
30
|
-
|
|
30
|
+
14379,
|
|
31
31
|
'The default file icon, shown for all files that don\'t match any extension, filename or language id.'
|
|
32
32
|
))
|
|
33
33
|
},
|
|
34
34
|
rootFolder: {
|
|
35
35
|
type: 'string',
|
|
36
36
|
description: ( localize(
|
|
37
|
-
|
|
37
|
+
14380,
|
|
38
38
|
'The folder icon for collapsed root folders, and if rootFolderExpanded is not set, also for expanded root folders.'
|
|
39
39
|
))
|
|
40
40
|
},
|
|
41
41
|
rootFolderExpanded: {
|
|
42
42
|
type: 'string',
|
|
43
43
|
description: ( localize(
|
|
44
|
-
|
|
44
|
+
14381,
|
|
45
45
|
'The folder icon for expanded root folders. The expanded root folder icon is optional. If not set, the icon defined for root folder will be shown.'
|
|
46
46
|
))
|
|
47
47
|
},
|
|
48
48
|
rootFolderNames: {
|
|
49
49
|
type: 'object',
|
|
50
50
|
description: ( localize(
|
|
51
|
-
|
|
51
|
+
14382,
|
|
52
52
|
'Associates root folder names to icons. The object key is the root folder name. No patterns or wildcards are allowed. Root folder name matching is case insensitive.'
|
|
53
53
|
)),
|
|
54
54
|
additionalProperties: {
|
|
55
55
|
type: 'string',
|
|
56
|
-
description: ( localize(
|
|
56
|
+
description: ( localize(14383, 'The ID of the icon definition for the association.'))
|
|
57
57
|
}
|
|
58
58
|
},
|
|
59
59
|
rootFolderNamesExpanded: {
|
|
60
60
|
type: 'object',
|
|
61
61
|
description: ( localize(
|
|
62
|
-
|
|
62
|
+
14384,
|
|
63
63
|
'Associates root folder names to icons for expanded root folders. The object key is the root folder name. No patterns or wildcards are allowed. Root folder name matching is case insensitive.'
|
|
64
64
|
)),
|
|
65
65
|
additionalProperties: {
|
|
66
66
|
type: 'string',
|
|
67
|
-
description: ( localize(
|
|
67
|
+
description: ( localize(14385, 'The ID of the icon definition for the association.'))
|
|
68
68
|
}
|
|
69
69
|
},
|
|
70
70
|
folderNames: {
|
|
71
71
|
type: 'object',
|
|
72
72
|
description: ( localize(
|
|
73
|
-
|
|
73
|
+
14386,
|
|
74
74
|
'Associates folder names to icons. The object key is the folder name, not including any path segments. No patterns or wildcards are allowed. Folder name matching is case insensitive.'
|
|
75
75
|
)),
|
|
76
76
|
additionalProperties: {
|
|
77
77
|
type: 'string',
|
|
78
|
-
description: ( localize(
|
|
78
|
+
description: ( localize(14383, 'The ID of the icon definition for the association.'))
|
|
79
79
|
}
|
|
80
80
|
},
|
|
81
81
|
folderNamesExpanded: {
|
|
82
82
|
type: 'object',
|
|
83
83
|
description: ( localize(
|
|
84
|
-
|
|
84
|
+
14387,
|
|
85
85
|
'Associates folder names to icons for expanded folders. The object key is the folder name, not including any path segments. No patterns or wildcards are allowed. Folder name matching is case insensitive.'
|
|
86
86
|
)),
|
|
87
87
|
additionalProperties: {
|
|
88
88
|
type: 'string',
|
|
89
|
-
description: ( localize(
|
|
89
|
+
description: ( localize(14388, 'The ID of the icon definition for the association.'))
|
|
90
90
|
}
|
|
91
91
|
},
|
|
92
92
|
fileExtensions: {
|
|
93
93
|
type: 'object',
|
|
94
94
|
description: ( localize(
|
|
95
|
-
|
|
95
|
+
14389,
|
|
96
96
|
'Associates file extensions to icons. The object key is the file extension name. The extension name is the last segment of a file name after the last dot (not including the dot). Extensions are compared case insensitive.'
|
|
97
97
|
)),
|
|
98
98
|
additionalProperties: {
|
|
99
99
|
type: 'string',
|
|
100
|
-
description: ( localize(
|
|
100
|
+
description: ( localize(14390, 'The ID of the icon definition for the association.'))
|
|
101
101
|
}
|
|
102
102
|
},
|
|
103
103
|
fileNames: {
|
|
104
104
|
type: 'object',
|
|
105
105
|
description: ( localize(
|
|
106
|
-
|
|
106
|
+
14391,
|
|
107
107
|
'Associates file names to icons. The object key is the full file name, but not including any path segments. File name can include dots and a possible file extension. No patterns or wildcards are allowed. File name matching is case insensitive.'
|
|
108
108
|
)),
|
|
109
109
|
additionalProperties: {
|
|
110
110
|
type: 'string',
|
|
111
|
-
description: ( localize(
|
|
111
|
+
description: ( localize(14392, 'The ID of the icon definition for the association.'))
|
|
112
112
|
}
|
|
113
113
|
},
|
|
114
114
|
languageIds: {
|
|
115
115
|
type: 'object',
|
|
116
116
|
description: ( localize(
|
|
117
|
-
|
|
117
|
+
14393,
|
|
118
118
|
'Associates languages to icons. The object key is the language id as defined in the language contribution point.'
|
|
119
119
|
)),
|
|
120
120
|
additionalProperties: {
|
|
121
121
|
type: 'string',
|
|
122
|
-
description: ( localize(
|
|
122
|
+
description: ( localize(14394, 'The ID of the icon definition for the association.'))
|
|
123
123
|
}
|
|
124
124
|
},
|
|
125
125
|
associations: {
|
|
@@ -167,29 +167,29 @@ const schema = {
|
|
|
167
167
|
properties: {
|
|
168
168
|
fonts: {
|
|
169
169
|
type: 'array',
|
|
170
|
-
description: ( localize(
|
|
170
|
+
description: ( localize(14395, 'Fonts that are used in the icon definitions.')),
|
|
171
171
|
items: {
|
|
172
172
|
type: 'object',
|
|
173
173
|
properties: {
|
|
174
174
|
id: {
|
|
175
175
|
type: 'string',
|
|
176
|
-
description: ( localize(
|
|
176
|
+
description: ( localize(14396, 'The ID of the font.')),
|
|
177
177
|
pattern: fontIdRegex.source,
|
|
178
178
|
patternErrorMessage: fontIdErrorMessage
|
|
179
179
|
},
|
|
180
180
|
src: {
|
|
181
181
|
type: 'array',
|
|
182
|
-
description: ( localize(
|
|
182
|
+
description: ( localize(14397, 'The location of the font.')),
|
|
183
183
|
items: {
|
|
184
184
|
type: 'object',
|
|
185
185
|
properties: {
|
|
186
186
|
path: {
|
|
187
187
|
type: 'string',
|
|
188
|
-
description: ( localize(
|
|
188
|
+
description: ( localize(14398, 'The font path, relative to the current file icon theme file.')),
|
|
189
189
|
},
|
|
190
190
|
format: {
|
|
191
191
|
type: 'string',
|
|
192
|
-
description: ( localize(
|
|
192
|
+
description: ( localize(14399, 'The format of the font.')),
|
|
193
193
|
enum: ['woff', 'woff2', 'truetype', 'opentype', 'embedded-opentype', 'svg']
|
|
194
194
|
}
|
|
195
195
|
},
|
|
@@ -202,7 +202,7 @@ const schema = {
|
|
|
202
202
|
weight: {
|
|
203
203
|
type: 'string',
|
|
204
204
|
description: ( localize(
|
|
205
|
-
|
|
205
|
+
14400,
|
|
206
206
|
'The weight of the font. See https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight for valid values.'
|
|
207
207
|
)),
|
|
208
208
|
pattern: fontWeightRegex.source
|
|
@@ -210,7 +210,7 @@ const schema = {
|
|
|
210
210
|
style: {
|
|
211
211
|
type: 'string',
|
|
212
212
|
description: ( localize(
|
|
213
|
-
|
|
213
|
+
14401,
|
|
214
214
|
'The style of the font. See https://developer.mozilla.org/en-US/docs/Web/CSS/font-style for valid values.'
|
|
215
215
|
)),
|
|
216
216
|
pattern: fontStyleRegex.source
|
|
@@ -218,7 +218,7 @@ const schema = {
|
|
|
218
218
|
size: {
|
|
219
219
|
type: 'string',
|
|
220
220
|
description: ( localize(
|
|
221
|
-
|
|
221
|
+
14402,
|
|
222
222
|
'The default size of the font. We strongly recommend using a percentage value, for example: 125%.'
|
|
223
223
|
)),
|
|
224
224
|
pattern: fontSizeRegex.source
|
|
@@ -233,34 +233,34 @@ const schema = {
|
|
|
233
233
|
iconDefinitions: {
|
|
234
234
|
type: 'object',
|
|
235
235
|
description: ( localize(
|
|
236
|
-
|
|
236
|
+
14403,
|
|
237
237
|
'Description of all icons that can be used when associating files to icons.'
|
|
238
238
|
)),
|
|
239
239
|
additionalProperties: {
|
|
240
240
|
type: 'object',
|
|
241
|
-
description: ( localize(
|
|
241
|
+
description: ( localize(14404, 'An icon definition. The object key is the ID of the definition.')),
|
|
242
242
|
properties: {
|
|
243
243
|
iconPath: {
|
|
244
244
|
type: 'string',
|
|
245
245
|
description: ( localize(
|
|
246
|
-
|
|
246
|
+
14405,
|
|
247
247
|
'When using a SVG or PNG: The path to the image. The path is relative to the icon set file.'
|
|
248
248
|
))
|
|
249
249
|
},
|
|
250
250
|
fontCharacter: {
|
|
251
251
|
type: 'string',
|
|
252
|
-
description: ( localize(
|
|
252
|
+
description: ( localize(14406, 'When using a glyph font: The character in the font to use.'))
|
|
253
253
|
},
|
|
254
254
|
fontColor: {
|
|
255
255
|
type: 'string',
|
|
256
256
|
format: 'color-hex',
|
|
257
|
-
description: ( localize(
|
|
257
|
+
description: ( localize(14407, 'When using a glyph font: The color to use.')),
|
|
258
258
|
pattern: fontColorRegex.source
|
|
259
259
|
},
|
|
260
260
|
fontSize: {
|
|
261
261
|
type: 'string',
|
|
262
262
|
description: ( localize(
|
|
263
|
-
|
|
263
|
+
14408,
|
|
264
264
|
'When using a font: The font size in percentage to the text font. If not set, defaults to the size in the font definition.'
|
|
265
265
|
)),
|
|
266
266
|
pattern: fontSizeRegex.source
|
|
@@ -268,7 +268,7 @@ const schema = {
|
|
|
268
268
|
fontId: {
|
|
269
269
|
type: 'string',
|
|
270
270
|
description: ( localize(
|
|
271
|
-
|
|
271
|
+
14409,
|
|
272
272
|
'When using a font: The id of the font. If not set, defaults to the first font definition.'
|
|
273
273
|
)),
|
|
274
274
|
pattern: fontIdRegex.source,
|
|
@@ -315,26 +315,26 @@ const schema = {
|
|
|
315
315
|
},
|
|
316
316
|
light: {
|
|
317
317
|
$ref: '#/definitions/associations',
|
|
318
|
-
description: ( localize(
|
|
318
|
+
description: ( localize(14410, 'Optional associations for file icons in light color themes.'))
|
|
319
319
|
},
|
|
320
320
|
highContrast: {
|
|
321
321
|
$ref: '#/definitions/associations',
|
|
322
322
|
description: ( localize(
|
|
323
|
-
|
|
323
|
+
14411,
|
|
324
324
|
'Optional associations for file icons in high contrast color themes.'
|
|
325
325
|
))
|
|
326
326
|
},
|
|
327
327
|
hidesExplorerArrows: {
|
|
328
328
|
type: 'boolean',
|
|
329
329
|
description: ( localize(
|
|
330
|
-
|
|
330
|
+
14412,
|
|
331
331
|
'Configures whether the file explorer\'s arrows should be hidden when this theme is active.'
|
|
332
332
|
))
|
|
333
333
|
},
|
|
334
334
|
showLanguageModeIcons: {
|
|
335
335
|
type: 'boolean',
|
|
336
336
|
description: ( localize(
|
|
337
|
-
|
|
337
|
+
14413,
|
|
338
338
|
'Configures whether the default language icons should be used if the theme does not define an icon for a language.'
|
|
339
339
|
))
|
|
340
340
|
}
|
|
@@ -17,23 +17,23 @@ const schema = {
|
|
|
17
17
|
properties: {
|
|
18
18
|
id: {
|
|
19
19
|
type: 'string',
|
|
20
|
-
description: ( localize(
|
|
20
|
+
description: ( localize(14427, 'The ID of the font.')),
|
|
21
21
|
pattern: fontIdRegex.source,
|
|
22
22
|
patternErrorMessage: fontIdErrorMessage
|
|
23
23
|
},
|
|
24
24
|
src: {
|
|
25
25
|
type: 'array',
|
|
26
|
-
description: ( localize(
|
|
26
|
+
description: ( localize(14428, 'The location of the font.')),
|
|
27
27
|
items: {
|
|
28
28
|
type: 'object',
|
|
29
29
|
properties: {
|
|
30
30
|
path: {
|
|
31
31
|
type: 'string',
|
|
32
|
-
description: ( localize(
|
|
32
|
+
description: ( localize(14429, 'The font path, relative to the current product icon theme file.')),
|
|
33
33
|
},
|
|
34
34
|
format: {
|
|
35
35
|
type: 'string',
|
|
36
|
-
description: ( localize(
|
|
36
|
+
description: ( localize(14430, 'The format of the font.')),
|
|
37
37
|
enum: ['woff', 'woff2', 'truetype', 'opentype', 'embedded-opentype', 'svg']
|
|
38
38
|
}
|
|
39
39
|
},
|
|
@@ -46,7 +46,7 @@ const schema = {
|
|
|
46
46
|
weight: {
|
|
47
47
|
type: 'string',
|
|
48
48
|
description: ( localize(
|
|
49
|
-
|
|
49
|
+
14431,
|
|
50
50
|
'The weight of the font. See https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight for valid values.'
|
|
51
51
|
)),
|
|
52
52
|
anyOf: [
|
|
@@ -57,7 +57,7 @@ const schema = {
|
|
|
57
57
|
style: {
|
|
58
58
|
type: 'string',
|
|
59
59
|
description: ( localize(
|
|
60
|
-
|
|
60
|
+
14432,
|
|
61
61
|
'The style of the font. See https://developer.mozilla.org/en-US/docs/Web/CSS/font-style for valid values.'
|
|
62
62
|
)),
|
|
63
63
|
anyOf: [
|
|
@@ -73,7 +73,7 @@ const schema = {
|
|
|
73
73
|
}
|
|
74
74
|
},
|
|
75
75
|
iconDefinitions: {
|
|
76
|
-
description: ( localize(
|
|
76
|
+
description: ( localize(14433, 'Association of icon name to a font character.')),
|
|
77
77
|
$ref: iconsSchemaId
|
|
78
78
|
}
|
|
79
79
|
}
|
|
@@ -32,7 +32,7 @@ const COLOR_THEME_CONFIGURATION_SETTINGS_TAG = 'colorThemeConfiguration';
|
|
|
32
32
|
const colorThemeSettingSchema = {
|
|
33
33
|
type: 'string',
|
|
34
34
|
markdownDescription: ( localize(
|
|
35
|
-
|
|
35
|
+
14434,
|
|
36
36
|
"Specifies the color theme used in the workbench when {0} is not enabled.",
|
|
37
37
|
formatSettingAsLink(ThemeSettings.DETECT_COLOR_SCHEME)
|
|
38
38
|
)),
|
|
@@ -41,12 +41,12 @@ const colorThemeSettingSchema = {
|
|
|
41
41
|
enum: colorThemeSettingEnum,
|
|
42
42
|
enumDescriptions: colorThemeSettingEnumDescriptions,
|
|
43
43
|
enumItemLabels: colorThemeSettingEnumItemLabels,
|
|
44
|
-
errorMessage: ( localize(
|
|
44
|
+
errorMessage: ( localize(14435, "Theme is unknown or not installed.")),
|
|
45
45
|
};
|
|
46
46
|
const preferredDarkThemeSettingSchema = {
|
|
47
47
|
type: 'string',
|
|
48
48
|
markdownDescription: ( localize(
|
|
49
|
-
|
|
49
|
+
14436,
|
|
50
50
|
'Specifies the color theme when system color mode is dark and {0} is enabled.',
|
|
51
51
|
formatSettingAsLink(ThemeSettings.DETECT_COLOR_SCHEME)
|
|
52
52
|
)),
|
|
@@ -55,12 +55,12 @@ const preferredDarkThemeSettingSchema = {
|
|
|
55
55
|
enum: colorThemeSettingEnum,
|
|
56
56
|
enumDescriptions: colorThemeSettingEnumDescriptions,
|
|
57
57
|
enumItemLabels: colorThemeSettingEnumItemLabels,
|
|
58
|
-
errorMessage: ( localize(
|
|
58
|
+
errorMessage: ( localize(14435, "Theme is unknown or not installed.")),
|
|
59
59
|
};
|
|
60
60
|
const preferredLightThemeSettingSchema = {
|
|
61
61
|
type: 'string',
|
|
62
62
|
markdownDescription: ( localize(
|
|
63
|
-
|
|
63
|
+
14437,
|
|
64
64
|
'Specifies the color theme when system color mode is light and {0} is enabled.',
|
|
65
65
|
formatSettingAsLink(ThemeSettings.DETECT_COLOR_SCHEME)
|
|
66
66
|
)),
|
|
@@ -69,12 +69,12 @@ const preferredLightThemeSettingSchema = {
|
|
|
69
69
|
enum: colorThemeSettingEnum,
|
|
70
70
|
enumDescriptions: colorThemeSettingEnumDescriptions,
|
|
71
71
|
enumItemLabels: colorThemeSettingEnumItemLabels,
|
|
72
|
-
errorMessage: ( localize(
|
|
72
|
+
errorMessage: ( localize(14435, "Theme is unknown or not installed.")),
|
|
73
73
|
};
|
|
74
74
|
const preferredHCDarkThemeSettingSchema = {
|
|
75
75
|
type: 'string',
|
|
76
76
|
markdownDescription: ( localize(
|
|
77
|
-
|
|
77
|
+
14438,
|
|
78
78
|
'Specifies the color theme when in high contrast dark mode and {0} is enabled.',
|
|
79
79
|
formatSettingAsLink(ThemeSettings.DETECT_HC)
|
|
80
80
|
)),
|
|
@@ -83,12 +83,12 @@ const preferredHCDarkThemeSettingSchema = {
|
|
|
83
83
|
enum: colorThemeSettingEnum,
|
|
84
84
|
enumDescriptions: colorThemeSettingEnumDescriptions,
|
|
85
85
|
enumItemLabels: colorThemeSettingEnumItemLabels,
|
|
86
|
-
errorMessage: ( localize(
|
|
86
|
+
errorMessage: ( localize(14435, "Theme is unknown or not installed.")),
|
|
87
87
|
};
|
|
88
88
|
const preferredHCLightThemeSettingSchema = {
|
|
89
89
|
type: 'string',
|
|
90
90
|
markdownDescription: ( localize(
|
|
91
|
-
|
|
91
|
+
14439,
|
|
92
92
|
'Specifies the color theme when in high contrast light mode and {0} is enabled.',
|
|
93
93
|
formatSettingAsLink(ThemeSettings.DETECT_HC)
|
|
94
94
|
)),
|
|
@@ -97,12 +97,12 @@ const preferredHCLightThemeSettingSchema = {
|
|
|
97
97
|
enum: colorThemeSettingEnum,
|
|
98
98
|
enumDescriptions: colorThemeSettingEnumDescriptions,
|
|
99
99
|
enumItemLabels: colorThemeSettingEnumItemLabels,
|
|
100
|
-
errorMessage: ( localize(
|
|
100
|
+
errorMessage: ( localize(14435, "Theme is unknown or not installed.")),
|
|
101
101
|
};
|
|
102
102
|
const detectColorSchemeSettingSchema = {
|
|
103
103
|
type: 'boolean',
|
|
104
104
|
markdownDescription: ( localize(
|
|
105
|
-
|
|
105
|
+
14440,
|
|
106
106
|
'If enabled, will automatically select a color theme based on the system color mode. If the system color mode is dark, {0} is used, else {1}.',
|
|
107
107
|
formatSettingAsLink(ThemeSettings.PREFERRED_DARK_THEME),
|
|
108
108
|
formatSettingAsLink(ThemeSettings.PREFERRED_LIGHT_THEME)
|
|
@@ -112,7 +112,7 @@ const detectColorSchemeSettingSchema = {
|
|
|
112
112
|
};
|
|
113
113
|
const colorCustomizationsSchema = {
|
|
114
114
|
type: 'object',
|
|
115
|
-
description: ( localize(
|
|
115
|
+
description: ( localize(14441, "Overrides colors from the currently selected color theme.")),
|
|
116
116
|
allOf: [{ $ref: workbenchColorsSchemaId }],
|
|
117
117
|
default: {},
|
|
118
118
|
defaultSnippets: [{
|
|
@@ -123,28 +123,28 @@ const fileIconThemeSettingSchema = {
|
|
|
123
123
|
type: ['string', 'null'],
|
|
124
124
|
default: ThemeSettingDefaults.FILE_ICON_THEME,
|
|
125
125
|
description: ( localize(
|
|
126
|
-
|
|
126
|
+
14442,
|
|
127
127
|
"Specifies the file icon theme used in the workbench or 'null' to not show any file icons."
|
|
128
128
|
)),
|
|
129
129
|
enum: [null],
|
|
130
|
-
enumItemLabels: [( localize(
|
|
131
|
-
enumDescriptions: [( localize(
|
|
132
|
-
errorMessage: ( localize(
|
|
130
|
+
enumItemLabels: [( localize(14443, 'None'))],
|
|
131
|
+
enumDescriptions: [( localize(14444, 'No file icons'))],
|
|
132
|
+
errorMessage: ( localize(14445, "File icon theme is unknown or not installed."))
|
|
133
133
|
};
|
|
134
134
|
const productIconThemeSettingSchema = {
|
|
135
135
|
type: ['string', 'null'],
|
|
136
136
|
default: ThemeSettingDefaults.PRODUCT_ICON_THEME,
|
|
137
|
-
description: ( localize(
|
|
137
|
+
description: ( localize(14446, "Specifies the product icon theme used.")),
|
|
138
138
|
enum: [ThemeSettingDefaults.PRODUCT_ICON_THEME],
|
|
139
|
-
enumItemLabels: [( localize(
|
|
140
|
-
enumDescriptions: [( localize(
|
|
141
|
-
errorMessage: ( localize(
|
|
139
|
+
enumItemLabels: [( localize(14447, 'Default'))],
|
|
140
|
+
enumDescriptions: [( localize(14448, 'Default'))],
|
|
141
|
+
errorMessage: ( localize(14449, "Product icon theme is unknown or not installed."))
|
|
142
142
|
};
|
|
143
143
|
const detectHCSchemeSettingSchema = {
|
|
144
144
|
type: 'boolean',
|
|
145
145
|
default: true,
|
|
146
146
|
markdownDescription: ( localize(
|
|
147
|
-
|
|
147
|
+
14450,
|
|
148
148
|
"If enabled, will automatically change to high contrast theme if the OS is using a high contrast theme. The high contrast theme to use is specified by {0} and {1}.",
|
|
149
149
|
formatSettingAsLink(ThemeSettings.PREFERRED_HC_DARK_THEME),
|
|
150
150
|
formatSettingAsLink(ThemeSettings.PREFERRED_HC_LIGHT_THEME)
|
|
@@ -188,31 +188,31 @@ const themeSpecificSettingKey = '^\\[[^\\]]*(\\]\\s*\\[[^\\]]*)*\\]$';
|
|
|
188
188
|
const tokenColorSchema = {
|
|
189
189
|
type: 'object',
|
|
190
190
|
properties: {
|
|
191
|
-
comments: tokenGroupSettings(( localize(
|
|
192
|
-
strings: tokenGroupSettings(( localize(
|
|
193
|
-
keywords: tokenGroupSettings(( localize(
|
|
194
|
-
numbers: tokenGroupSettings(( localize(
|
|
195
|
-
types: tokenGroupSettings(( localize(
|
|
191
|
+
comments: tokenGroupSettings(( localize(14451, "Sets the colors and styles for comments"))),
|
|
192
|
+
strings: tokenGroupSettings(( localize(14452, "Sets the colors and styles for strings literals."))),
|
|
193
|
+
keywords: tokenGroupSettings(( localize(14453, "Sets the colors and styles for keywords."))),
|
|
194
|
+
numbers: tokenGroupSettings(( localize(14454, "Sets the colors and styles for number literals."))),
|
|
195
|
+
types: tokenGroupSettings(( localize(14455, "Sets the colors and styles for type declarations and references."))),
|
|
196
196
|
functions: tokenGroupSettings(( localize(
|
|
197
|
-
|
|
197
|
+
14456,
|
|
198
198
|
"Sets the colors and styles for functions declarations and references."
|
|
199
199
|
))),
|
|
200
200
|
variables: tokenGroupSettings(( localize(
|
|
201
|
-
|
|
201
|
+
14457,
|
|
202
202
|
"Sets the colors and styles for variables declarations and references."
|
|
203
203
|
))),
|
|
204
204
|
textMateRules: {
|
|
205
|
-
description: ( localize(
|
|
205
|
+
description: ( localize(14458, 'Sets colors and styles using textmate theming rules (advanced).')),
|
|
206
206
|
$ref: textmateColorsSchemaId
|
|
207
207
|
},
|
|
208
208
|
semanticHighlighting: {
|
|
209
|
-
description: ( localize(
|
|
209
|
+
description: ( localize(14459, 'Whether semantic highlighting should be enabled for this theme.')),
|
|
210
210
|
deprecationMessage: ( localize(
|
|
211
|
-
|
|
211
|
+
14460,
|
|
212
212
|
'Use `enabled` in `editor.semanticTokenColorCustomizations` setting instead.'
|
|
213
213
|
)),
|
|
214
214
|
markdownDeprecationMessage: ( localize(
|
|
215
|
-
|
|
215
|
+
14461,
|
|
216
216
|
'Use `enabled` in {0} setting instead.',
|
|
217
217
|
formatSettingAsLink('editor.semanticTokenColorCustomizations')
|
|
218
218
|
)),
|
|
@@ -223,7 +223,7 @@ const tokenColorSchema = {
|
|
|
223
223
|
};
|
|
224
224
|
const tokenColorCustomizationSchema = {
|
|
225
225
|
description: ( localize(
|
|
226
|
-
|
|
226
|
+
14462,
|
|
227
227
|
"Overrides editor syntax colors and font style from the currently selected color theme."
|
|
228
228
|
)),
|
|
229
229
|
default: {},
|
|
@@ -235,14 +235,14 @@ const semanticTokenColorSchema = {
|
|
|
235
235
|
enabled: {
|
|
236
236
|
type: 'boolean',
|
|
237
237
|
description: ( localize(
|
|
238
|
-
|
|
238
|
+
14463,
|
|
239
239
|
'Whether semantic highlighting is enabled or disabled for this theme'
|
|
240
240
|
)),
|
|
241
241
|
suggestSortText: '0_enabled'
|
|
242
242
|
},
|
|
243
243
|
rules: {
|
|
244
244
|
$ref: tokenStylingSchemaId,
|
|
245
|
-
description: ( localize(
|
|
245
|
+
description: ( localize(14464, 'Semantic token styling rules for this theme.')),
|
|
246
246
|
suggestSortText: '0_rules'
|
|
247
247
|
}
|
|
248
248
|
},
|
|
@@ -250,7 +250,7 @@ const semanticTokenColorSchema = {
|
|
|
250
250
|
};
|
|
251
251
|
const semanticTokenColorCustomizationSchema = {
|
|
252
252
|
description: ( localize(
|
|
253
|
-
|
|
253
|
+
14465,
|
|
254
254
|
"Overrides editor semantic token color and styles from the currently selected color theme."
|
|
255
255
|
)),
|
|
256
256
|
default: {},
|
|
@@ -16,30 +16,30 @@ function registerColorThemeExtensionPoint() {
|
|
|
16
16
|
return ExtensionsRegistry.registerExtensionPoint({
|
|
17
17
|
extensionPoint: 'themes',
|
|
18
18
|
jsonSchema: {
|
|
19
|
-
description: ( localize(
|
|
19
|
+
description: ( localize(14466, 'Contributes textmate color themes.')),
|
|
20
20
|
type: 'array',
|
|
21
21
|
items: {
|
|
22
22
|
type: 'object',
|
|
23
23
|
defaultSnippets: [{ body: { label: '${1:label}', id: '${2:id}', uiTheme: ThemeTypeSelector.VS_DARK, path: './themes/${3:id}.tmTheme.' } }],
|
|
24
24
|
properties: {
|
|
25
25
|
id: {
|
|
26
|
-
description: ( localize(
|
|
26
|
+
description: ( localize(14467, 'Id of the color theme as used in the user settings.')),
|
|
27
27
|
type: 'string'
|
|
28
28
|
},
|
|
29
29
|
label: {
|
|
30
|
-
description: ( localize(
|
|
30
|
+
description: ( localize(14468, 'Label of the color theme as shown in the UI.')),
|
|
31
31
|
type: 'string'
|
|
32
32
|
},
|
|
33
33
|
uiTheme: {
|
|
34
34
|
description: ( localize(
|
|
35
|
-
|
|
35
|
+
14469,
|
|
36
36
|
'Base theme defining the colors around the editor: \'vs\' is the light color theme, \'vs-dark\' is the dark color theme. \'hc-black\' is the dark high contrast theme, \'hc-light\' is the light high contrast theme.'
|
|
37
37
|
)),
|
|
38
38
|
enum: [ThemeTypeSelector.VS, ThemeTypeSelector.VS_DARK, ThemeTypeSelector.HC_BLACK, ThemeTypeSelector.HC_LIGHT]
|
|
39
39
|
},
|
|
40
40
|
path: {
|
|
41
41
|
description: ( localize(
|
|
42
|
-
|
|
42
|
+
14470,
|
|
43
43
|
'Path of the tmTheme file. The path is relative to the extension folder and is typically \'./colorthemes/awesome-color-theme.json\'.'
|
|
44
44
|
)),
|
|
45
45
|
type: 'string'
|
|
@@ -54,23 +54,23 @@ function registerFileIconThemeExtensionPoint() {
|
|
|
54
54
|
return ExtensionsRegistry.registerExtensionPoint({
|
|
55
55
|
extensionPoint: 'iconThemes',
|
|
56
56
|
jsonSchema: {
|
|
57
|
-
description: ( localize(
|
|
57
|
+
description: ( localize(14471, 'Contributes file icon themes.')),
|
|
58
58
|
type: 'array',
|
|
59
59
|
items: {
|
|
60
60
|
type: 'object',
|
|
61
61
|
defaultSnippets: [{ body: { id: '${1:id}', label: '${2:label}', path: './fileicons/${3:id}-icon-theme.json' } }],
|
|
62
62
|
properties: {
|
|
63
63
|
id: {
|
|
64
|
-
description: ( localize(
|
|
64
|
+
description: ( localize(14472, 'Id of the file icon theme as used in the user settings.')),
|
|
65
65
|
type: 'string'
|
|
66
66
|
},
|
|
67
67
|
label: {
|
|
68
|
-
description: ( localize(
|
|
68
|
+
description: ( localize(14473, 'Label of the file icon theme as shown in the UI.')),
|
|
69
69
|
type: 'string'
|
|
70
70
|
},
|
|
71
71
|
path: {
|
|
72
72
|
description: ( localize(
|
|
73
|
-
|
|
73
|
+
14474,
|
|
74
74
|
'Path of the file icon theme definition file. The path is relative to the extension folder and is typically \'./fileicons/awesome-icon-theme.json\'.'
|
|
75
75
|
)),
|
|
76
76
|
type: 'string'
|
|
@@ -85,23 +85,23 @@ function registerProductIconThemeExtensionPoint() {
|
|
|
85
85
|
return ExtensionsRegistry.registerExtensionPoint({
|
|
86
86
|
extensionPoint: 'productIconThemes',
|
|
87
87
|
jsonSchema: {
|
|
88
|
-
description: ( localize(
|
|
88
|
+
description: ( localize(14475, 'Contributes product icon themes.')),
|
|
89
89
|
type: 'array',
|
|
90
90
|
items: {
|
|
91
91
|
type: 'object',
|
|
92
92
|
defaultSnippets: [{ body: { id: '${1:id}', label: '${2:label}', path: './producticons/${3:id}-product-icon-theme.json' } }],
|
|
93
93
|
properties: {
|
|
94
94
|
id: {
|
|
95
|
-
description: ( localize(
|
|
95
|
+
description: ( localize(14476, 'Id of the product icon theme as used in the user settings.')),
|
|
96
96
|
type: 'string'
|
|
97
97
|
},
|
|
98
98
|
label: {
|
|
99
|
-
description: ( localize(
|
|
99
|
+
description: ( localize(14477, 'Label of the product icon theme as shown in the UI.')),
|
|
100
100
|
type: 'string'
|
|
101
101
|
},
|
|
102
102
|
path: {
|
|
103
103
|
description: ( localize(
|
|
104
|
-
|
|
104
|
+
14478,
|
|
105
105
|
'Path of the product icon theme definition file. The path is relative to the extension folder and is typically \'./producticons/awesome-product-icon-theme.json\'.'
|
|
106
106
|
)),
|
|
107
107
|
type: 'string'
|
|
@@ -123,19 +123,19 @@ class ThemeDataRenderer extends Disposable {
|
|
|
123
123
|
render(manifest) {
|
|
124
124
|
const markdown = ( new MarkdownString());
|
|
125
125
|
if (manifest.contributes?.themes) {
|
|
126
|
-
markdown.appendMarkdown(`### ${( localize(
|
|
126
|
+
markdown.appendMarkdown(`### ${( localize(14479, "Color Themes"))}\n\n`);
|
|
127
127
|
for (const theme of manifest.contributes.themes) {
|
|
128
128
|
markdown.appendMarkdown(`- ${theme.label}\n`);
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
131
|
if (manifest.contributes?.iconThemes) {
|
|
132
|
-
markdown.appendMarkdown(`### ${( localize(
|
|
132
|
+
markdown.appendMarkdown(`### ${( localize(14480, "File Icon Themes"))}\n\n`);
|
|
133
133
|
for (const theme of manifest.contributes.iconThemes) {
|
|
134
134
|
markdown.appendMarkdown(`- ${theme.label}\n`);
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
137
|
if (manifest.contributes?.productIconThemes) {
|
|
138
|
-
markdown.appendMarkdown(`### ${( localize(
|
|
138
|
+
markdown.appendMarkdown(`### ${( localize(14481, "Product Icon Themes"))}\n\n`);
|
|
139
139
|
for (const theme of manifest.contributes.productIconThemes) {
|
|
140
140
|
markdown.appendMarkdown(`- ${theme.label}\n`);
|
|
141
141
|
}
|
|
@@ -148,7 +148,7 @@ class ThemeDataRenderer extends Disposable {
|
|
|
148
148
|
}
|
|
149
149
|
( Registry.as(Extensions.ExtensionFeaturesRegistry)).registerExtensionFeature({
|
|
150
150
|
id: 'themes',
|
|
151
|
-
label: ( localize(
|
|
151
|
+
label: ( localize(14482, "Themes")),
|
|
152
152
|
access: {
|
|
153
153
|
canToggle: false
|
|
154
154
|
},
|
|
@@ -194,13 +194,13 @@ class ThemeRegistry {
|
|
|
194
194
|
}
|
|
195
195
|
onThemes(extensionData, extensionLocation, themeContributions, resultingThemes = [], log) {
|
|
196
196
|
if (!Array.isArray(themeContributions)) {
|
|
197
|
-
log?.error(( localize(
|
|
197
|
+
log?.error(( localize(14483, "Extension point `{0}` must be an array.", this.themesExtPoint.name)));
|
|
198
198
|
return resultingThemes;
|
|
199
199
|
}
|
|
200
200
|
themeContributions.forEach(theme => {
|
|
201
201
|
if (!theme.path || !isString(theme.path)) {
|
|
202
202
|
log?.error(( localize(
|
|
203
|
-
|
|
203
|
+
14484,
|
|
204
204
|
"Expected string in `contributes.{0}.path`. Provided value: {1}",
|
|
205
205
|
this.themesExtPoint.name,
|
|
206
206
|
String(theme.path)
|
|
@@ -209,7 +209,7 @@ class ThemeRegistry {
|
|
|
209
209
|
}
|
|
210
210
|
if (this.idRequired && (!theme.id || !isString(theme.id))) {
|
|
211
211
|
log?.error(( localize(
|
|
212
|
-
|
|
212
|
+
14485,
|
|
213
213
|
"Expected string in `contributes.{0}.id`. Provided value: {1}",
|
|
214
214
|
this.themesExtPoint.name,
|
|
215
215
|
String(theme.id)
|
|
@@ -219,7 +219,7 @@ class ThemeRegistry {
|
|
|
219
219
|
const themeLocation = joinPath(extensionLocation, theme.path);
|
|
220
220
|
if (!isEqualOrParent(themeLocation, extensionLocation)) {
|
|
221
221
|
log?.warn(( localize(
|
|
222
|
-
|
|
222
|
+
14486,
|
|
223
223
|
"Expected `contributes.{0}.path` ({1}) to be included inside extension's folder ({2}). This might make the extension non-portable.",
|
|
224
224
|
this.themesExtPoint.name,
|
|
225
225
|
themeLocation.path,
|