@codingame/monaco-vscode-theme-service-override 14.0.3 → 14.0.4
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 +6 -6
- 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 +13 -13
- 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": "14.0.
|
|
3
|
+
"version": "14.0.4",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "VSCode public API plugged on the monaco editor - theme service-override",
|
|
6
6
|
"keywords": [],
|
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
},
|
|
16
16
|
"type": "module",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@codingame/monaco-vscode-411e0589-fa79-504b-b32c-80a88847b23a-common": "14.0.
|
|
19
|
-
"@codingame/monaco-vscode-7443a901-21f6-577a-9674-42893b997ee0-common": "14.0.
|
|
20
|
-
"@codingame/monaco-vscode-9d0168a3-519b-57f3-9bcc-89efc41f951a-common": "14.0.
|
|
21
|
-
"@codingame/monaco-vscode-api": "14.0.
|
|
22
|
-
"@codingame/monaco-vscode-files-service-override": "14.0.
|
|
18
|
+
"@codingame/monaco-vscode-411e0589-fa79-504b-b32c-80a88847b23a-common": "14.0.4",
|
|
19
|
+
"@codingame/monaco-vscode-7443a901-21f6-577a-9674-42893b997ee0-common": "14.0.4",
|
|
20
|
+
"@codingame/monaco-vscode-9d0168a3-519b-57f3-9bcc-89efc41f951a-common": "14.0.4",
|
|
21
|
+
"@codingame/monaco-vscode-api": "14.0.4",
|
|
22
|
+
"@codingame/monaco-vscode-files-service-override": "14.0.4"
|
|
23
23
|
},
|
|
24
24
|
"main": "index.js",
|
|
25
25
|
"module": "index.js",
|
|
@@ -53,7 +53,7 @@ import { defaultToggleStyles } from '@codingame/monaco-vscode-api/vscode/vs/plat
|
|
|
53
53
|
import { DisposableStore } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
54
54
|
import Severity from '@codingame/monaco-vscode-api/vscode/vs/base/common/severity';
|
|
55
55
|
|
|
56
|
-
const manageExtensionIcon = registerIcon('theme-selection-manage-extension', Codicon.gear, ( localize(
|
|
56
|
+
const manageExtensionIcon = registerIcon('theme-selection-manage-extension', Codicon.gear, ( localize(10541, 'Icon for the \'Manage\' action in the theme selection quick pick.')));
|
|
57
57
|
var ConfigureItem;
|
|
58
58
|
(function (ConfigureItem) {
|
|
59
59
|
ConfigureItem["BROWSE_GALLERY"] = "marketplace";
|
|
@@ -161,7 +161,7 @@ let MarketplaceThemesPicker = class MarketplaceThemesPicker {
|
|
|
161
161
|
quickpick.matchOnDescription = true;
|
|
162
162
|
quickpick.buttons = [this.quickInputService.backButton];
|
|
163
163
|
quickpick.title = 'Marketplace Themes';
|
|
164
|
-
quickpick.placeholder = ( localize(
|
|
164
|
+
quickpick.placeholder = ( localize(10542, "Type to Search More. Select to Install. Up/Down Keys to Preview"));
|
|
165
165
|
quickpick.canSelectMany = false;
|
|
166
166
|
disposables.add(quickpick.onDidChangeValue(() => this.trigger(quickpick.value)));
|
|
167
167
|
disposables.add(quickpick.onDidAccept(async (_) => {
|
|
@@ -213,7 +213,7 @@ let MarketplaceThemesPicker = class MarketplaceThemesPicker {
|
|
|
213
213
|
items = items.concat({ label: '$(loading~spin) Searching for themes...', id: undefined, alwaysShow: true });
|
|
214
214
|
}
|
|
215
215
|
else if (items.length === 0 && this._searchError) {
|
|
216
|
-
items = [{ label: `$(error) ${( localize(
|
|
216
|
+
items = [{ label: `$(error) ${( localize(10543, 'Error while searching for themes: {0}', this._searchError))}`, id: undefined, alwaysShow: true }];
|
|
217
217
|
}
|
|
218
218
|
const activeItemId = quickpick.activeItems[0]?.id;
|
|
219
219
|
const newActiveItem = activeItemId ? items.find(i => isItem(i) && i.id === activeItemId) : undefined;
|
|
@@ -232,12 +232,12 @@ let MarketplaceThemesPicker = class MarketplaceThemesPicker {
|
|
|
232
232
|
this.extensionsWorkbenchService.openSearch(`@id:${galleryExtension.identifier.id}`);
|
|
233
233
|
const result = await this.dialogService.confirm({
|
|
234
234
|
message: ( localize(
|
|
235
|
-
|
|
235
|
+
10544,
|
|
236
236
|
"This will install extension '{0}' published by '{1}'. Do you want to continue?",
|
|
237
237
|
galleryExtension.displayName,
|
|
238
238
|
galleryExtension.publisherDisplayName
|
|
239
239
|
)),
|
|
240
|
-
primaryButton: ( localize(
|
|
240
|
+
primaryButton: ( localize(10545, "OK"))
|
|
241
241
|
});
|
|
242
242
|
if (!result.confirmed) {
|
|
243
243
|
return false;
|
|
@@ -245,7 +245,7 @@ let MarketplaceThemesPicker = class MarketplaceThemesPicker {
|
|
|
245
245
|
try {
|
|
246
246
|
await this.progressService.withProgress({
|
|
247
247
|
location: ProgressLocation.Notification,
|
|
248
|
-
title: ( localize(
|
|
248
|
+
title: ( localize(10546, "Installing Extension {0}...", galleryExtension.displayName))
|
|
249
249
|
}, async () => {
|
|
250
250
|
await this.extensionManagementService.installFromGallery(galleryExtension, {
|
|
251
251
|
isMachineScoped: false,
|
|
@@ -392,7 +392,7 @@ registerAction2(class extends Action2 {
|
|
|
392
392
|
constructor() {
|
|
393
393
|
super({
|
|
394
394
|
id: SelectColorThemeCommandId,
|
|
395
|
-
title: ( localize2(
|
|
395
|
+
title: ( localize2(10547, 'Color Theme')),
|
|
396
396
|
category: Categories.Preferences,
|
|
397
397
|
f1: true,
|
|
398
398
|
keybinding: {
|
|
@@ -403,12 +403,12 @@ registerAction2(class extends Action2 {
|
|
|
403
403
|
}
|
|
404
404
|
getTitle(colorScheme) {
|
|
405
405
|
switch (colorScheme) {
|
|
406
|
-
case ColorScheme.DARK: return localize(
|
|
407
|
-
case ColorScheme.LIGHT: return localize(
|
|
408
|
-
case ColorScheme.HIGH_CONTRAST_DARK: return localize(
|
|
409
|
-
case ColorScheme.HIGH_CONTRAST_LIGHT: return localize(
|
|
406
|
+
case ColorScheme.DARK: return localize(10548, "Select Color Theme for System Dark Mode");
|
|
407
|
+
case ColorScheme.LIGHT: return localize(10549, "Select Color Theme for System Light Mode");
|
|
408
|
+
case ColorScheme.HIGH_CONTRAST_DARK: return localize(10550, "Select Color Theme for High Contrast Dark Mode");
|
|
409
|
+
case ColorScheme.HIGH_CONTRAST_LIGHT: return localize(10551, "Select Color Theme for High Contrast Light Mode");
|
|
410
410
|
default:
|
|
411
|
-
return localize(
|
|
411
|
+
return localize(10552, "Select Color Theme (detect system color mode disabled)");
|
|
412
412
|
}
|
|
413
413
|
}
|
|
414
414
|
async run(accessor) {
|
|
@@ -418,7 +418,7 @@ registerAction2(class extends Action2 {
|
|
|
418
418
|
let modeConfigureToggle;
|
|
419
419
|
if (preferredColorScheme) {
|
|
420
420
|
modeConfigureToggle = ( new Toggle({
|
|
421
|
-
title: ( localize(
|
|
421
|
+
title: ( localize(10553, 'Detect system color mode enabled. Click to configure.')),
|
|
422
422
|
icon: Codicon.colorMode,
|
|
423
423
|
isChecked: false,
|
|
424
424
|
...defaultToggleStyles
|
|
@@ -426,15 +426,15 @@ registerAction2(class extends Action2 {
|
|
|
426
426
|
}
|
|
427
427
|
else {
|
|
428
428
|
modeConfigureToggle = ( new Toggle({
|
|
429
|
-
title: ( localize(
|
|
429
|
+
title: ( localize(10554, 'Detect system color mode disabled. Click to configure.')),
|
|
430
430
|
icon: Codicon.colorMode,
|
|
431
431
|
isChecked: false,
|
|
432
432
|
...defaultToggleStyles
|
|
433
433
|
}));
|
|
434
434
|
}
|
|
435
435
|
const options = {
|
|
436
|
-
installMessage: ( localize(
|
|
437
|
-
browseMessage: '$(plus) ' + ( localize(
|
|
436
|
+
installMessage: ( localize(10555, "Install Additional Color Themes...")),
|
|
437
|
+
browseMessage: '$(plus) ' + ( localize(10556, "Browse Additional Color Themes...")),
|
|
438
438
|
placeholderMessage: this.getTitle(preferredColorScheme),
|
|
439
439
|
marketplaceTag: 'category:themes',
|
|
440
440
|
toggles: [modeConfigureToggle],
|
|
@@ -449,9 +449,9 @@ registerAction2(class extends Action2 {
|
|
|
449
449
|
const picker = instantiationService.createInstance(InstalledThemesPicker, options, setTheme, getMarketplaceColorThemes);
|
|
450
450
|
const themes = await themeService.getColorThemes();
|
|
451
451
|
const currentTheme = themeService.getColorTheme();
|
|
452
|
-
const lightEntries = toEntries(themes.filter(t => t.type === ColorScheme.LIGHT), ( localize(
|
|
453
|
-
const darkEntries = toEntries(themes.filter(t => t.type === ColorScheme.DARK), ( localize(
|
|
454
|
-
const hcEntries = toEntries(themes.filter(t => isHighContrast(t.type)), ( localize(
|
|
452
|
+
const lightEntries = toEntries(themes.filter(t => t.type === ColorScheme.LIGHT), ( localize(10557, "light themes")));
|
|
453
|
+
const darkEntries = toEntries(themes.filter(t => t.type === ColorScheme.DARK), ( localize(10558, "dark themes")));
|
|
454
|
+
const hcEntries = toEntries(themes.filter(t => isHighContrast(t.type)), ( localize(10559, "high contrast themes")));
|
|
455
455
|
let picks;
|
|
456
456
|
switch (preferredColorScheme) {
|
|
457
457
|
case ColorScheme.DARK:
|
|
@@ -474,7 +474,7 @@ registerAction2(class extends Action2 {
|
|
|
474
474
|
constructor() {
|
|
475
475
|
super({
|
|
476
476
|
id: SelectFileIconThemeCommandId,
|
|
477
|
-
title: ( localize2(
|
|
477
|
+
title: ( localize2(10560, 'File Icon Theme')),
|
|
478
478
|
category: Categories.Preferences,
|
|
479
479
|
f1: true
|
|
480
480
|
});
|
|
@@ -482,8 +482,8 @@ registerAction2(class extends Action2 {
|
|
|
482
482
|
async run(accessor) {
|
|
483
483
|
const themeService = accessor.get(IWorkbenchThemeService);
|
|
484
484
|
const options = {
|
|
485
|
-
installMessage: ( localize(
|
|
486
|
-
placeholderMessage: ( localize(
|
|
485
|
+
installMessage: ( localize(10561, "Install Additional File Icon Themes...")),
|
|
486
|
+
placeholderMessage: ( localize(10562, "Select File Icon Theme (Up/Down Keys to Preview)")),
|
|
487
487
|
marketplaceTag: 'tag:icon-theme'
|
|
488
488
|
};
|
|
489
489
|
const setTheme = (theme, settingsTarget) => themeService.setFileIconTheme(theme, settingsTarget);
|
|
@@ -491,8 +491,8 @@ registerAction2(class extends Action2 {
|
|
|
491
491
|
const instantiationService = accessor.get(IInstantiationService);
|
|
492
492
|
const picker = instantiationService.createInstance(InstalledThemesPicker, options, setTheme, getMarketplaceColorThemes);
|
|
493
493
|
const picks = [
|
|
494
|
-
{ type: 'separator', label: ( localize(
|
|
495
|
-
{ id: '', theme: FileIconThemeData.noIconTheme, label: ( localize(
|
|
494
|
+
{ type: 'separator', label: ( localize(10563, 'file icon themes')) },
|
|
495
|
+
{ id: '', theme: FileIconThemeData.noIconTheme, label: ( localize(10564, 'None')), description: ( localize(10565, 'Disable File Icons')) },
|
|
496
496
|
...toEntries(await themeService.getFileIconThemes()),
|
|
497
497
|
];
|
|
498
498
|
await picker.openQuickPick(picks, themeService.getFileIconTheme());
|
|
@@ -503,7 +503,7 @@ registerAction2(class extends Action2 {
|
|
|
503
503
|
constructor() {
|
|
504
504
|
super({
|
|
505
505
|
id: SelectProductIconThemeCommandId,
|
|
506
|
-
title: ( localize2(
|
|
506
|
+
title: ( localize2(10566, 'Product Icon Theme')),
|
|
507
507
|
category: Categories.Preferences,
|
|
508
508
|
f1: true
|
|
509
509
|
});
|
|
@@ -511,9 +511,9 @@ registerAction2(class extends Action2 {
|
|
|
511
511
|
async run(accessor) {
|
|
512
512
|
const themeService = accessor.get(IWorkbenchThemeService);
|
|
513
513
|
const options = {
|
|
514
|
-
installMessage: ( localize(
|
|
515
|
-
browseMessage: '$(plus) ' + ( localize(
|
|
516
|
-
placeholderMessage: ( localize(
|
|
514
|
+
installMessage: ( localize(10567, "Install Additional Product Icon Themes...")),
|
|
515
|
+
browseMessage: '$(plus) ' + ( localize(10568, "Browse Additional Product Icon Themes...")),
|
|
516
|
+
placeholderMessage: ( localize(10569, "Select Product Icon Theme (Up/Down Keys to Preview)")),
|
|
517
517
|
marketplaceTag: 'tag:product-icon-theme'
|
|
518
518
|
};
|
|
519
519
|
const setTheme = (theme, settingsTarget) => themeService.setProductIconTheme(theme, settingsTarget);
|
|
@@ -521,8 +521,8 @@ registerAction2(class extends Action2 {
|
|
|
521
521
|
const instantiationService = accessor.get(IInstantiationService);
|
|
522
522
|
const picker = instantiationService.createInstance(InstalledThemesPicker, options, setTheme, getMarketplaceColorThemes);
|
|
523
523
|
const picks = [
|
|
524
|
-
{ type: 'separator', label: ( localize(
|
|
525
|
-
{ id: DEFAULT_PRODUCT_ICON_THEME_ID, theme: ProductIconThemeData.defaultTheme, label: ( localize(
|
|
524
|
+
{ type: 'separator', label: ( localize(10570, 'product icon themes')) },
|
|
525
|
+
{ id: DEFAULT_PRODUCT_ICON_THEME_ID, theme: ProductIconThemeData.defaultTheme, label: ( localize(10571, 'Default')) },
|
|
526
526
|
...toEntries(await themeService.getProductIconThemes()),
|
|
527
527
|
];
|
|
528
528
|
await picker.openQuickPick(picks, themeService.getProductIconTheme());
|
|
@@ -580,13 +580,13 @@ function toEntries(themes, label) {
|
|
|
580
580
|
}
|
|
581
581
|
const configureButton = {
|
|
582
582
|
iconClass: ThemeIcon.asClassName(manageExtensionIcon),
|
|
583
|
-
tooltip: ( localize(
|
|
583
|
+
tooltip: ( localize(10572, "Manage Extension")),
|
|
584
584
|
};
|
|
585
585
|
registerAction2(class extends Action2 {
|
|
586
586
|
constructor() {
|
|
587
587
|
super({
|
|
588
588
|
id: 'workbench.action.generateColorTheme',
|
|
589
|
-
title: ( localize2(
|
|
589
|
+
title: ( localize2(10573, 'Generate Color Theme From Current Settings')),
|
|
590
590
|
category: Categories.Developer,
|
|
591
591
|
f1: true
|
|
592
592
|
});
|
|
@@ -636,7 +636,7 @@ registerAction2(class extends Action2 {
|
|
|
636
636
|
constructor() {
|
|
637
637
|
super({
|
|
638
638
|
id: toggleLightDarkThemesCommandId,
|
|
639
|
-
title: ( localize2(
|
|
639
|
+
title: ( localize2(10574, 'Toggle between Light/Dark Themes')),
|
|
640
640
|
category: Categories.Preferences,
|
|
641
641
|
f1: true,
|
|
642
642
|
});
|
|
@@ -648,13 +648,13 @@ registerAction2(class extends Action2 {
|
|
|
648
648
|
const preferencesService = accessor.get(IPreferencesService);
|
|
649
649
|
if (configurationService.getValue(ThemeSettings.DETECT_COLOR_SCHEME)) {
|
|
650
650
|
const message = ( localize(
|
|
651
|
-
|
|
651
|
+
10575,
|
|
652
652
|
"Cannot toggle between light and dark themes when `{0}` is enabled in settings.",
|
|
653
653
|
ThemeSettings.DETECT_COLOR_SCHEME
|
|
654
654
|
));
|
|
655
655
|
notificationService.prompt(Severity.Info, message, [
|
|
656
656
|
{
|
|
657
|
-
label: ( localize(
|
|
657
|
+
label: ( localize(10576, "Open Settings")),
|
|
658
658
|
run: () => {
|
|
659
659
|
return preferencesService.openUserSettings({ query: ThemeSettings.DETECT_COLOR_SCHEME });
|
|
660
660
|
}
|
|
@@ -692,7 +692,7 @@ registerAction2(class extends Action2 {
|
|
|
692
692
|
constructor() {
|
|
693
693
|
super({
|
|
694
694
|
id: browseColorThemesInMarketplaceCommandId,
|
|
695
|
-
title: ( localize2(
|
|
695
|
+
title: ( localize2(10577, 'Browse Color Themes in Marketplace')),
|
|
696
696
|
category: Categories.Preferences,
|
|
697
697
|
f1: true,
|
|
698
698
|
});
|
|
@@ -728,13 +728,13 @@ registerAction2(class extends Action2 {
|
|
|
728
728
|
});
|
|
729
729
|
const ThemesSubMenu = ( new MenuId('ThemesSubMenu'));
|
|
730
730
|
MenuRegistry.appendMenuItem(MenuId.GlobalActivity, {
|
|
731
|
-
title: ( localize(
|
|
731
|
+
title: ( localize(10578, "Themes")),
|
|
732
732
|
submenu: ThemesSubMenu,
|
|
733
733
|
group: '2_configuration',
|
|
734
734
|
order: 7
|
|
735
735
|
});
|
|
736
736
|
MenuRegistry.appendMenuItem(MenuId.MenubarPreferencesMenu, {
|
|
737
|
-
title: ( localize(
|
|
737
|
+
title: ( localize(10579, "&&Theme")),
|
|
738
738
|
submenu: ThemesSubMenu,
|
|
739
739
|
group: '2_configuration',
|
|
740
740
|
order: 7
|
|
@@ -742,21 +742,21 @@ MenuRegistry.appendMenuItem(MenuId.MenubarPreferencesMenu, {
|
|
|
742
742
|
MenuRegistry.appendMenuItem(ThemesSubMenu, {
|
|
743
743
|
command: {
|
|
744
744
|
id: SelectColorThemeCommandId,
|
|
745
|
-
title: ( localize(
|
|
745
|
+
title: ( localize(10547, 'Color Theme'))
|
|
746
746
|
},
|
|
747
747
|
order: 1
|
|
748
748
|
});
|
|
749
749
|
MenuRegistry.appendMenuItem(ThemesSubMenu, {
|
|
750
750
|
command: {
|
|
751
751
|
id: SelectFileIconThemeCommandId,
|
|
752
|
-
title: ( localize(
|
|
752
|
+
title: ( localize(10580, "File Icon Theme"))
|
|
753
753
|
},
|
|
754
754
|
order: 2
|
|
755
755
|
});
|
|
756
756
|
MenuRegistry.appendMenuItem(ThemesSubMenu, {
|
|
757
757
|
command: {
|
|
758
758
|
id: SelectProductIconThemeCommandId,
|
|
759
|
-
title: ( localize(
|
|
759
|
+
title: ( localize(10581, "Product Icon Theme"))
|
|
760
760
|
},
|
|
761
761
|
order: 3
|
|
762
762
|
});
|
|
@@ -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
|
+
12018,
|
|
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(12019, "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
|
+
12020,
|
|
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(12021, '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
|
+
12022,
|
|
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(12023, "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
|
+
12024,
|
|
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(12025, '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(12026, '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(12027, '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
|
+
12028,
|
|
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
|
+
12029,
|
|
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(12030, 'Skipping icon definition \'{0}\'. Unknown font.', iconId)));
|
|
237
237
|
}
|
|
238
238
|
}
|
|
239
239
|
else {
|
|
240
|
-
warnings.push(( localize(
|
|
240
|
+
warnings.push(( localize(12031, '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(12063, 'Colors and styles for the token.')),
|
|
140
140
|
properties: {
|
|
141
141
|
foreground: {
|
|
142
142
|
type: 'string',
|
|
143
|
-
description: ( localize(
|
|
143
|
+
description: ( localize(12064, '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(12065, 'Token background colors are currently not supported.'))
|
|
150
150
|
},
|
|
151
151
|
fontStyle: {
|
|
152
152
|
type: 'string',
|
|
153
153
|
description: ( localize(
|
|
154
|
-
|
|
154
|
+
12066,
|
|
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
|
+
12067,
|
|
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(12068, 'None (clear inherited style)')), bodyText: '""' },
|
|
164
164
|
{ body: 'italic' },
|
|
165
165
|
{ body: 'bold' },
|
|
166
166
|
{ body: 'underline' },
|
|
@@ -189,10 +189,10 @@ const textmateColorSchema = {
|
|
|
189
189
|
properties: {
|
|
190
190
|
name: {
|
|
191
191
|
type: 'string',
|
|
192
|
-
description: ( localize(
|
|
192
|
+
description: ( localize(12069, 'Description of the rule.'))
|
|
193
193
|
},
|
|
194
194
|
scope: {
|
|
195
|
-
description: ( localize(
|
|
195
|
+
description: ( localize(12070, 'Scope selector against which this rule matches.')),
|
|
196
196
|
anyOf: [
|
|
197
197
|
{
|
|
198
198
|
enum: textMateScopes
|
|
@@ -231,28 +231,28 @@ const colorThemeSchema = {
|
|
|
231
231
|
allowTrailingCommas: true,
|
|
232
232
|
properties: {
|
|
233
233
|
colors: {
|
|
234
|
-
description: ( localize(
|
|
234
|
+
description: ( localize(12071, 'Colors in the workbench')),
|
|
235
235
|
$ref: workbenchColorsSchemaId,
|
|
236
236
|
additionalProperties: false
|
|
237
237
|
},
|
|
238
238
|
tokenColors: {
|
|
239
239
|
anyOf: [{
|
|
240
240
|
type: 'string',
|
|
241
|
-
description: ( localize(
|
|
241
|
+
description: ( localize(12072, 'Path to a tmTheme file (relative to the current file).'))
|
|
242
242
|
},
|
|
243
243
|
{
|
|
244
|
-
description: ( localize(
|
|
244
|
+
description: ( localize(12073, 'Colors for syntax highlighting')),
|
|
245
245
|
$ref: textmateColorsSchemaId
|
|
246
246
|
}
|
|
247
247
|
]
|
|
248
248
|
},
|
|
249
249
|
semanticHighlighting: {
|
|
250
250
|
type: 'boolean',
|
|
251
|
-
description: ( localize(
|
|
251
|
+
description: ( localize(12074, 'Whether semantic highlighting should be enabled for this theme.'))
|
|
252
252
|
},
|
|
253
253
|
semanticTokenColors: {
|
|
254
254
|
type: 'object',
|
|
255
|
-
description: ( localize(
|
|
255
|
+
description: ( localize(12075, 'Colors for semantic tokens')),
|
|
256
256
|
$ref: tokenStylingSchemaId
|
|
257
257
|
}
|
|
258
258
|
}
|
|
@@ -13,113 +13,113 @@ const schema = {
|
|
|
13
13
|
folderExpanded: {
|
|
14
14
|
type: 'string',
|
|
15
15
|
description: ( localize(
|
|
16
|
-
|
|
16
|
+
12076,
|
|
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
|
+
12077,
|
|
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
|
+
12078,
|
|
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
|
+
12079,
|
|
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
|
+
12080,
|
|
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
|
+
12081,
|
|
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(12082, '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
|
+
12083,
|
|
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(12084, '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
|
+
12085,
|
|
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(12082, '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
|
+
12086,
|
|
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(12087, '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
|
+
12088,
|
|
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(12089, '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
|
+
12090,
|
|
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(12091, '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
|
+
12092,
|
|
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(12093, '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(12094, '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(12095, '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(12096, '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(12097, '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(12098, '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
|
+
12099,
|
|
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
|
+
12100,
|
|
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
|
+
12101,
|
|
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
|
+
12102,
|
|
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(12103, '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
|
+
12104,
|
|
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(12105, '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(12106, '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
|
+
12107,
|
|
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
|
+
12108,
|
|
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(12109, '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
|
+
12110,
|
|
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
|
+
12111,
|
|
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
|
+
12112,
|
|
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(12126, '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(12127, '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(12128, '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(12129, '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
|
+
12130,
|
|
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
|
+
12131,
|
|
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(12132, '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
|
+
12133,
|
|
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(12134, "Theme is unknown or not installed.")),
|
|
45
45
|
};
|
|
46
46
|
const preferredDarkThemeSettingSchema = {
|
|
47
47
|
type: 'string',
|
|
48
48
|
markdownDescription: ( localize(
|
|
49
|
-
|
|
49
|
+
12135,
|
|
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(12134, "Theme is unknown or not installed.")),
|
|
59
59
|
};
|
|
60
60
|
const preferredLightThemeSettingSchema = {
|
|
61
61
|
type: 'string',
|
|
62
62
|
markdownDescription: ( localize(
|
|
63
|
-
|
|
63
|
+
12136,
|
|
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(12134, "Theme is unknown or not installed.")),
|
|
73
73
|
};
|
|
74
74
|
const preferredHCDarkThemeSettingSchema = {
|
|
75
75
|
type: 'string',
|
|
76
76
|
markdownDescription: ( localize(
|
|
77
|
-
|
|
77
|
+
12137,
|
|
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(12134, "Theme is unknown or not installed.")),
|
|
87
87
|
};
|
|
88
88
|
const preferredHCLightThemeSettingSchema = {
|
|
89
89
|
type: 'string',
|
|
90
90
|
markdownDescription: ( localize(
|
|
91
|
-
|
|
91
|
+
12138,
|
|
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(12134, "Theme is unknown or not installed.")),
|
|
101
101
|
};
|
|
102
102
|
const detectColorSchemeSettingSchema = {
|
|
103
103
|
type: 'boolean',
|
|
104
104
|
markdownDescription: ( localize(
|
|
105
|
-
|
|
105
|
+
12139,
|
|
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(12140, "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
|
+
12141,
|
|
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(12142, 'None'))],
|
|
131
|
+
enumDescriptions: [( localize(12143, 'No file icons'))],
|
|
132
|
+
errorMessage: ( localize(12144, "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(12145, "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(12146, 'Default'))],
|
|
140
|
+
enumDescriptions: [( localize(12147, 'Default'))],
|
|
141
|
+
errorMessage: ( localize(12148, "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
|
+
12149,
|
|
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(12150, "Sets the colors and styles for comments"))),
|
|
192
|
+
strings: tokenGroupSettings(( localize(12151, "Sets the colors and styles for strings literals."))),
|
|
193
|
+
keywords: tokenGroupSettings(( localize(12152, "Sets the colors and styles for keywords."))),
|
|
194
|
+
numbers: tokenGroupSettings(( localize(12153, "Sets the colors and styles for number literals."))),
|
|
195
|
+
types: tokenGroupSettings(( localize(12154, "Sets the colors and styles for type declarations and references."))),
|
|
196
196
|
functions: tokenGroupSettings(( localize(
|
|
197
|
-
|
|
197
|
+
12155,
|
|
198
198
|
"Sets the colors and styles for functions declarations and references."
|
|
199
199
|
))),
|
|
200
200
|
variables: tokenGroupSettings(( localize(
|
|
201
|
-
|
|
201
|
+
12156,
|
|
202
202
|
"Sets the colors and styles for variables declarations and references."
|
|
203
203
|
))),
|
|
204
204
|
textMateRules: {
|
|
205
|
-
description: ( localize(
|
|
205
|
+
description: ( localize(12157, 'Sets colors and styles using textmate theming rules (advanced).')),
|
|
206
206
|
$ref: textmateColorsSchemaId
|
|
207
207
|
},
|
|
208
208
|
semanticHighlighting: {
|
|
209
|
-
description: ( localize(
|
|
209
|
+
description: ( localize(12158, 'Whether semantic highlighting should be enabled for this theme.')),
|
|
210
210
|
deprecationMessage: ( localize(
|
|
211
|
-
|
|
211
|
+
12159,
|
|
212
212
|
'Use `enabled` in `editor.semanticTokenColorCustomizations` setting instead.'
|
|
213
213
|
)),
|
|
214
214
|
markdownDeprecationMessage: ( localize(
|
|
215
|
-
|
|
215
|
+
12160,
|
|
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
|
+
12161,
|
|
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
|
+
12162,
|
|
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(12163, '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
|
+
12164,
|
|
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(12165, '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(12166, '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(12167, '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
|
+
12168,
|
|
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
|
+
12169,
|
|
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(12170, '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(12171, '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(12172, '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
|
+
12173,
|
|
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(12174, '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(12175, '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(12176, '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
|
+
12177,
|
|
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(12178, "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(12179, "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(12180, "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(12181, "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(12182, "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
|
+
12183,
|
|
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
|
+
12184,
|
|
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
|
+
12185,
|
|
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,
|