@codingame/monaco-vscode-theme-service-override 13.0.0 → 13.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 +6 -9
- package/vscode/src/vs/workbench/contrib/themes/browser/themes.contribution.js +49 -49
- 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.d.ts +2 -2
- package/vscode/src/vs/workbench/services/themes/browser/workbenchThemeService.js +2 -2
- package/vscode/src/vs/workbench/services/themes/common/colorThemeSchema.js +14 -14
- package/vscode/src/vs/workbench/services/themes/common/fileIconThemeSchema.js +40 -40
- package/vscode/src/vs/workbench/services/themes/common/themeConfiguration.js +37 -37
- 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": "13.
|
|
3
|
+
"version": "13.1.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "VSCode public API plugged on the monaco editor - theme service-override",
|
|
6
6
|
"keywords": [],
|
|
@@ -15,15 +15,12 @@
|
|
|
15
15
|
},
|
|
16
16
|
"type": "module",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@codingame/monaco-vscode-
|
|
19
|
-
"@codingame/monaco-vscode-
|
|
20
|
-
"@codingame/monaco-vscode-9d0168a3-519b-57f3-9bcc-89efc41f951a-common": "13.
|
|
21
|
-
"@codingame/monaco-vscode-
|
|
18
|
+
"@codingame/monaco-vscode-411e0589-fa79-504b-b32c-80a88847b23a-common": "13.1.0",
|
|
19
|
+
"@codingame/monaco-vscode-7443a901-21f6-577a-9674-42893b997ee0-common": "13.1.0",
|
|
20
|
+
"@codingame/monaco-vscode-9d0168a3-519b-57f3-9bcc-89efc41f951a-common": "13.1.0",
|
|
21
|
+
"@codingame/monaco-vscode-api": "13.1.0",
|
|
22
|
+
"@codingame/monaco-vscode-files-service-override": "13.1.0"
|
|
22
23
|
},
|
|
23
|
-
"peerDependencies": {
|
|
24
|
-
"@codingame/monaco-vscode-api": "13.0.0"
|
|
25
|
-
},
|
|
26
|
-
"peerDependenciesMeta": {},
|
|
27
24
|
"main": "index.js",
|
|
28
25
|
"module": "index.js",
|
|
29
26
|
"types": "index.d.ts",
|
|
@@ -7,7 +7,7 @@ import { equalsIgnoreCase } from '@codingame/monaco-vscode-api/vscode/vs/base/co
|
|
|
7
7
|
import { Registry } from '@codingame/monaco-vscode-api/vscode/vs/platform/registry/common/platform';
|
|
8
8
|
import { Categories } from '@codingame/monaco-vscode-api/vscode/vs/platform/action/common/actionCommonCategories';
|
|
9
9
|
import { ThemeSettings, ThemeSettingDefaults } from '@codingame/monaco-vscode-9d0168a3-519b-57f3-9bcc-89efc41f951a-common/vscode/vs/workbench/services/themes/common/workbenchThemeService';
|
|
10
|
-
import { IWorkbenchThemeService } from '@codingame/monaco-vscode-
|
|
10
|
+
import { IWorkbenchThemeService } from '@codingame/monaco-vscode-7443a901-21f6-577a-9674-42893b997ee0-common/vscode/vs/workbench/services/themes/common/workbenchThemeService.service';
|
|
11
11
|
import { IExtensionsWorkbenchService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/extensions/common/extensions.service';
|
|
12
12
|
import { IExtensionGalleryService, IExtensionManagementService } from '@codingame/monaco-vscode-api/vscode/vs/platform/extensionManagement/common/extensionManagement.service';
|
|
13
13
|
import { Extensions } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colorUtils';
|
|
@@ -62,7 +62,7 @@ import { DisposableStore } from '@codingame/monaco-vscode-api/vscode/vs/base/com
|
|
|
62
62
|
import Severity from '@codingame/monaco-vscode-api/vscode/vs/base/common/severity';
|
|
63
63
|
|
|
64
64
|
var DefaultThemeUpdatedNotificationContribution_1;
|
|
65
|
-
const manageExtensionIcon = registerIcon('theme-selection-manage-extension', Codicon.gear, ( localize(
|
|
65
|
+
const manageExtensionIcon = registerIcon('theme-selection-manage-extension', Codicon.gear, ( localize(10339, 'Icon for the \'Manage\' action in the theme selection quick pick.')));
|
|
66
66
|
var ConfigureItem;
|
|
67
67
|
(function (ConfigureItem) {
|
|
68
68
|
ConfigureItem["BROWSE_GALLERY"] = "marketplace";
|
|
@@ -170,7 +170,7 @@ let MarketplaceThemesPicker = class MarketplaceThemesPicker {
|
|
|
170
170
|
quickpick.matchOnDescription = true;
|
|
171
171
|
quickpick.buttons = [this.quickInputService.backButton];
|
|
172
172
|
quickpick.title = 'Marketplace Themes';
|
|
173
|
-
quickpick.placeholder = ( localize(
|
|
173
|
+
quickpick.placeholder = ( localize(10340, "Type to Search More. Select to Install. Up/Down Keys to Preview"));
|
|
174
174
|
quickpick.canSelectMany = false;
|
|
175
175
|
disposables.add(quickpick.onDidChangeValue(() => this.trigger(quickpick.value)));
|
|
176
176
|
disposables.add(quickpick.onDidAccept(async (_) => {
|
|
@@ -222,7 +222,7 @@ let MarketplaceThemesPicker = class MarketplaceThemesPicker {
|
|
|
222
222
|
items = items.concat({ label: '$(loading~spin) Searching for themes...', id: undefined, alwaysShow: true });
|
|
223
223
|
}
|
|
224
224
|
else if (items.length === 0 && this._searchError) {
|
|
225
|
-
items = [{ label: `$(error) ${( localize(
|
|
225
|
+
items = [{ label: `$(error) ${( localize(10341, 'Error while searching for themes: {0}', this._searchError))}`, id: undefined, alwaysShow: true }];
|
|
226
226
|
}
|
|
227
227
|
const activeItemId = quickpick.activeItems[0]?.id;
|
|
228
228
|
const newActiveItem = activeItemId ? items.find(i => isItem(i) && i.id === activeItemId) : undefined;
|
|
@@ -241,12 +241,12 @@ let MarketplaceThemesPicker = class MarketplaceThemesPicker {
|
|
|
241
241
|
this.extensionsWorkbenchService.openSearch(`@id:${galleryExtension.identifier.id}`);
|
|
242
242
|
const result = await this.dialogService.confirm({
|
|
243
243
|
message: ( localize(
|
|
244
|
-
|
|
244
|
+
10342,
|
|
245
245
|
"This will install extension '{0}' published by '{1}'. Do you want to continue?",
|
|
246
246
|
galleryExtension.displayName,
|
|
247
247
|
galleryExtension.publisherDisplayName
|
|
248
248
|
)),
|
|
249
|
-
primaryButton: ( localize(
|
|
249
|
+
primaryButton: ( localize(10343, "OK"))
|
|
250
250
|
});
|
|
251
251
|
if (!result.confirmed) {
|
|
252
252
|
return false;
|
|
@@ -254,7 +254,7 @@ let MarketplaceThemesPicker = class MarketplaceThemesPicker {
|
|
|
254
254
|
try {
|
|
255
255
|
await this.progressService.withProgress({
|
|
256
256
|
location: ProgressLocation.Notification,
|
|
257
|
-
title: ( localize(
|
|
257
|
+
title: ( localize(10344, "Installing Extension {0}...", galleryExtension.displayName))
|
|
258
258
|
}, async () => {
|
|
259
259
|
await this.extensionManagementService.installFromGallery(galleryExtension, {
|
|
260
260
|
isMachineScoped: false,
|
|
@@ -401,7 +401,7 @@ registerAction2(class extends Action2 {
|
|
|
401
401
|
constructor() {
|
|
402
402
|
super({
|
|
403
403
|
id: SelectColorThemeCommandId,
|
|
404
|
-
title: ( localize2(
|
|
404
|
+
title: ( localize2(10345, 'Color Theme')),
|
|
405
405
|
category: Categories.Preferences,
|
|
406
406
|
f1: true,
|
|
407
407
|
keybinding: {
|
|
@@ -412,12 +412,12 @@ registerAction2(class extends Action2 {
|
|
|
412
412
|
}
|
|
413
413
|
getTitle(colorScheme) {
|
|
414
414
|
switch (colorScheme) {
|
|
415
|
-
case ColorScheme.DARK: return localize(
|
|
416
|
-
case ColorScheme.LIGHT: return localize(
|
|
417
|
-
case ColorScheme.HIGH_CONTRAST_DARK: return localize(
|
|
418
|
-
case ColorScheme.HIGH_CONTRAST_LIGHT: return localize(
|
|
415
|
+
case ColorScheme.DARK: return localize(10346, "Select Color Theme for System Dark Mode");
|
|
416
|
+
case ColorScheme.LIGHT: return localize(10347, "Select Color Theme for System Light Mode");
|
|
417
|
+
case ColorScheme.HIGH_CONTRAST_DARK: return localize(10348, "Select Color Theme for High Contrast Dark Mode");
|
|
418
|
+
case ColorScheme.HIGH_CONTRAST_LIGHT: return localize(10349, "Select Color Theme for High Contrast Light Mode");
|
|
419
419
|
default:
|
|
420
|
-
return localize(
|
|
420
|
+
return localize(10350, "Select Color Theme (detect system color mode disabled)");
|
|
421
421
|
}
|
|
422
422
|
}
|
|
423
423
|
async run(accessor) {
|
|
@@ -427,7 +427,7 @@ registerAction2(class extends Action2 {
|
|
|
427
427
|
let modeConfigureToggle;
|
|
428
428
|
if (preferredColorScheme) {
|
|
429
429
|
modeConfigureToggle = ( new Toggle({
|
|
430
|
-
title: ( localize(
|
|
430
|
+
title: ( localize(10351, 'Detect system color mode enabled. Click to configure.')),
|
|
431
431
|
icon: Codicon.colorMode,
|
|
432
432
|
isChecked: false,
|
|
433
433
|
...defaultToggleStyles
|
|
@@ -435,15 +435,15 @@ registerAction2(class extends Action2 {
|
|
|
435
435
|
}
|
|
436
436
|
else {
|
|
437
437
|
modeConfigureToggle = ( new Toggle({
|
|
438
|
-
title: ( localize(
|
|
438
|
+
title: ( localize(10352, 'Detect system color mode disabled. Click to configure.')),
|
|
439
439
|
icon: Codicon.colorMode,
|
|
440
440
|
isChecked: false,
|
|
441
441
|
...defaultToggleStyles
|
|
442
442
|
}));
|
|
443
443
|
}
|
|
444
444
|
const options = {
|
|
445
|
-
installMessage: ( localize(
|
|
446
|
-
browseMessage: '$(plus) ' + ( localize(
|
|
445
|
+
installMessage: ( localize(10353, "Install Additional Color Themes...")),
|
|
446
|
+
browseMessage: '$(plus) ' + ( localize(10354, "Browse Additional Color Themes...")),
|
|
447
447
|
placeholderMessage: this.getTitle(preferredColorScheme),
|
|
448
448
|
marketplaceTag: 'category:themes',
|
|
449
449
|
toggles: [modeConfigureToggle],
|
|
@@ -458,9 +458,9 @@ registerAction2(class extends Action2 {
|
|
|
458
458
|
const picker = instantiationService.createInstance(InstalledThemesPicker, options, setTheme, getMarketplaceColorThemes);
|
|
459
459
|
const themes = await themeService.getColorThemes();
|
|
460
460
|
const currentTheme = themeService.getColorTheme();
|
|
461
|
-
const lightEntries = toEntries(themes.filter(t => t.type === ColorScheme.LIGHT), ( localize(
|
|
462
|
-
const darkEntries = toEntries(themes.filter(t => t.type === ColorScheme.DARK), ( localize(
|
|
463
|
-
const hcEntries = toEntries(themes.filter(t => isHighContrast(t.type)), ( localize(
|
|
461
|
+
const lightEntries = toEntries(themes.filter(t => t.type === ColorScheme.LIGHT), ( localize(10355, "light themes")));
|
|
462
|
+
const darkEntries = toEntries(themes.filter(t => t.type === ColorScheme.DARK), ( localize(10356, "dark themes")));
|
|
463
|
+
const hcEntries = toEntries(themes.filter(t => isHighContrast(t.type)), ( localize(10357, "high contrast themes")));
|
|
464
464
|
let picks;
|
|
465
465
|
switch (preferredColorScheme) {
|
|
466
466
|
case ColorScheme.DARK:
|
|
@@ -483,7 +483,7 @@ registerAction2(class extends Action2 {
|
|
|
483
483
|
constructor() {
|
|
484
484
|
super({
|
|
485
485
|
id: SelectFileIconThemeCommandId,
|
|
486
|
-
title: ( localize2(
|
|
486
|
+
title: ( localize2(10358, 'File Icon Theme')),
|
|
487
487
|
category: Categories.Preferences,
|
|
488
488
|
f1: true
|
|
489
489
|
});
|
|
@@ -491,8 +491,8 @@ registerAction2(class extends Action2 {
|
|
|
491
491
|
async run(accessor) {
|
|
492
492
|
const themeService = accessor.get(IWorkbenchThemeService);
|
|
493
493
|
const options = {
|
|
494
|
-
installMessage: ( localize(
|
|
495
|
-
placeholderMessage: ( localize(
|
|
494
|
+
installMessage: ( localize(10359, "Install Additional File Icon Themes...")),
|
|
495
|
+
placeholderMessage: ( localize(10360, "Select File Icon Theme (Up/Down Keys to Preview)")),
|
|
496
496
|
marketplaceTag: 'tag:icon-theme'
|
|
497
497
|
};
|
|
498
498
|
const setTheme = (theme, settingsTarget) => themeService.setFileIconTheme(theme, settingsTarget);
|
|
@@ -500,8 +500,8 @@ registerAction2(class extends Action2 {
|
|
|
500
500
|
const instantiationService = accessor.get(IInstantiationService);
|
|
501
501
|
const picker = instantiationService.createInstance(InstalledThemesPicker, options, setTheme, getMarketplaceColorThemes);
|
|
502
502
|
const picks = [
|
|
503
|
-
{ type: 'separator', label: ( localize(
|
|
504
|
-
{ id: '', theme: FileIconThemeData.noIconTheme, label: ( localize(
|
|
503
|
+
{ type: 'separator', label: ( localize(10361, 'file icon themes')) },
|
|
504
|
+
{ id: '', theme: FileIconThemeData.noIconTheme, label: ( localize(10362, 'None')), description: ( localize(10363, 'Disable File Icons')) },
|
|
505
505
|
...toEntries(await themeService.getFileIconThemes()),
|
|
506
506
|
];
|
|
507
507
|
await picker.openQuickPick(picks, themeService.getFileIconTheme());
|
|
@@ -512,7 +512,7 @@ registerAction2(class extends Action2 {
|
|
|
512
512
|
constructor() {
|
|
513
513
|
super({
|
|
514
514
|
id: SelectProductIconThemeCommandId,
|
|
515
|
-
title: ( localize2(
|
|
515
|
+
title: ( localize2(10364, 'Product Icon Theme')),
|
|
516
516
|
category: Categories.Preferences,
|
|
517
517
|
f1: true
|
|
518
518
|
});
|
|
@@ -520,9 +520,9 @@ registerAction2(class extends Action2 {
|
|
|
520
520
|
async run(accessor) {
|
|
521
521
|
const themeService = accessor.get(IWorkbenchThemeService);
|
|
522
522
|
const options = {
|
|
523
|
-
installMessage: ( localize(
|
|
524
|
-
browseMessage: '$(plus) ' + ( localize(
|
|
525
|
-
placeholderMessage: ( localize(
|
|
523
|
+
installMessage: ( localize(10365, "Install Additional Product Icon Themes...")),
|
|
524
|
+
browseMessage: '$(plus) ' + ( localize(10366, "Browse Additional Product Icon Themes...")),
|
|
525
|
+
placeholderMessage: ( localize(10367, "Select Product Icon Theme (Up/Down Keys to Preview)")),
|
|
526
526
|
marketplaceTag: 'tag:product-icon-theme'
|
|
527
527
|
};
|
|
528
528
|
const setTheme = (theme, settingsTarget) => themeService.setProductIconTheme(theme, settingsTarget);
|
|
@@ -530,8 +530,8 @@ registerAction2(class extends Action2 {
|
|
|
530
530
|
const instantiationService = accessor.get(IInstantiationService);
|
|
531
531
|
const picker = instantiationService.createInstance(InstalledThemesPicker, options, setTheme, getMarketplaceColorThemes);
|
|
532
532
|
const picks = [
|
|
533
|
-
{ type: 'separator', label: ( localize(
|
|
534
|
-
{ id: DEFAULT_PRODUCT_ICON_THEME_ID, theme: ProductIconThemeData.defaultTheme, label: ( localize(
|
|
533
|
+
{ type: 'separator', label: ( localize(10368, 'product icon themes')) },
|
|
534
|
+
{ id: DEFAULT_PRODUCT_ICON_THEME_ID, theme: ProductIconThemeData.defaultTheme, label: ( localize(10369, 'Default')) },
|
|
535
535
|
...toEntries(await themeService.getProductIconThemes()),
|
|
536
536
|
];
|
|
537
537
|
await picker.openQuickPick(picks, themeService.getProductIconTheme());
|
|
@@ -589,13 +589,13 @@ function toEntries(themes, label) {
|
|
|
589
589
|
}
|
|
590
590
|
const configureButton = {
|
|
591
591
|
iconClass: ThemeIcon.asClassName(manageExtensionIcon),
|
|
592
|
-
tooltip: ( localize(
|
|
592
|
+
tooltip: ( localize(10370, "Manage Extension")),
|
|
593
593
|
};
|
|
594
594
|
registerAction2(class extends Action2 {
|
|
595
595
|
constructor() {
|
|
596
596
|
super({
|
|
597
597
|
id: 'workbench.action.generateColorTheme',
|
|
598
|
-
title: ( localize2(
|
|
598
|
+
title: ( localize2(10371, 'Generate Color Theme From Current Settings')),
|
|
599
599
|
category: Categories.Developer,
|
|
600
600
|
f1: true
|
|
601
601
|
});
|
|
@@ -645,7 +645,7 @@ registerAction2(class extends Action2 {
|
|
|
645
645
|
constructor() {
|
|
646
646
|
super({
|
|
647
647
|
id: toggleLightDarkThemesCommandId,
|
|
648
|
-
title: ( localize2(
|
|
648
|
+
title: ( localize2(10372, 'Toggle between Light/Dark Themes')),
|
|
649
649
|
category: Categories.Preferences,
|
|
650
650
|
f1: true,
|
|
651
651
|
});
|
|
@@ -657,13 +657,13 @@ registerAction2(class extends Action2 {
|
|
|
657
657
|
const preferencesService = accessor.get(IPreferencesService);
|
|
658
658
|
if (configurationService.getValue(ThemeSettings.DETECT_COLOR_SCHEME)) {
|
|
659
659
|
const message = ( localize(
|
|
660
|
-
|
|
660
|
+
10373,
|
|
661
661
|
"Cannot toggle between light and dark themes when `{0}` is enabled in settings.",
|
|
662
662
|
ThemeSettings.DETECT_COLOR_SCHEME
|
|
663
663
|
));
|
|
664
664
|
notificationService.prompt(Severity.Info, message, [
|
|
665
665
|
{
|
|
666
|
-
label: ( localize(
|
|
666
|
+
label: ( localize(10374, "Open Settings")),
|
|
667
667
|
run: () => {
|
|
668
668
|
return preferencesService.openUserSettings({ query: ThemeSettings.DETECT_COLOR_SCHEME });
|
|
669
669
|
}
|
|
@@ -701,7 +701,7 @@ registerAction2(class extends Action2 {
|
|
|
701
701
|
constructor() {
|
|
702
702
|
super({
|
|
703
703
|
id: browseColorThemesInMarketplaceCommandId,
|
|
704
|
-
title: ( localize2(
|
|
704
|
+
title: ( localize2(10375, 'Browse Color Themes in Marketplace')),
|
|
705
705
|
category: Categories.Preferences,
|
|
706
706
|
f1: true,
|
|
707
707
|
});
|
|
@@ -737,13 +737,13 @@ registerAction2(class extends Action2 {
|
|
|
737
737
|
});
|
|
738
738
|
const ThemesSubMenu = ( new MenuId('ThemesSubMenu'));
|
|
739
739
|
MenuRegistry.appendMenuItem(MenuId.GlobalActivity, {
|
|
740
|
-
title: ( localize(
|
|
740
|
+
title: ( localize(10376, "Themes")),
|
|
741
741
|
submenu: ThemesSubMenu,
|
|
742
742
|
group: '2_configuration',
|
|
743
743
|
order: 7
|
|
744
744
|
});
|
|
745
745
|
MenuRegistry.appendMenuItem(MenuId.MenubarPreferencesMenu, {
|
|
746
|
-
title: ( localize(
|
|
746
|
+
title: ( localize(10377, "&&Theme")),
|
|
747
747
|
submenu: ThemesSubMenu,
|
|
748
748
|
group: '2_configuration',
|
|
749
749
|
order: 7
|
|
@@ -751,21 +751,21 @@ MenuRegistry.appendMenuItem(MenuId.MenubarPreferencesMenu, {
|
|
|
751
751
|
MenuRegistry.appendMenuItem(ThemesSubMenu, {
|
|
752
752
|
command: {
|
|
753
753
|
id: SelectColorThemeCommandId,
|
|
754
|
-
title: ( localize(
|
|
754
|
+
title: ( localize(10345, 'Color Theme'))
|
|
755
755
|
},
|
|
756
756
|
order: 1
|
|
757
757
|
});
|
|
758
758
|
MenuRegistry.appendMenuItem(ThemesSubMenu, {
|
|
759
759
|
command: {
|
|
760
760
|
id: SelectFileIconThemeCommandId,
|
|
761
|
-
title: ( localize(
|
|
761
|
+
title: ( localize(10378, "File Icon Theme"))
|
|
762
762
|
},
|
|
763
763
|
order: 2
|
|
764
764
|
});
|
|
765
765
|
MenuRegistry.appendMenuItem(ThemesSubMenu, {
|
|
766
766
|
command: {
|
|
767
767
|
id: SelectProductIconThemeCommandId,
|
|
768
|
-
title: ( localize(
|
|
768
|
+
title: ( localize(10379, "Product Icon Theme"))
|
|
769
769
|
},
|
|
770
770
|
order: 3
|
|
771
771
|
});
|
|
@@ -807,20 +807,20 @@ let DefaultThemeUpdatedNotificationContribution = class DefaultThemeUpdatedNotif
|
|
|
807
807
|
if (newTheme) {
|
|
808
808
|
const choices = [
|
|
809
809
|
{
|
|
810
|
-
label: ( localize(
|
|
810
|
+
label: ( localize(10380, "Keep New Theme")),
|
|
811
811
|
run: () => {
|
|
812
812
|
this._writeTelemetry('keepNew');
|
|
813
813
|
}
|
|
814
814
|
},
|
|
815
815
|
{
|
|
816
|
-
label: ( localize(
|
|
816
|
+
label: ( localize(10381, "Browse Themes")),
|
|
817
817
|
run: () => {
|
|
818
818
|
this._writeTelemetry('browse');
|
|
819
819
|
this._commandService.executeCommand(SelectColorThemeCommandId);
|
|
820
820
|
}
|
|
821
821
|
},
|
|
822
822
|
{
|
|
823
|
-
label: ( localize(
|
|
823
|
+
label: ( localize(10382, "Revert")),
|
|
824
824
|
run: async () => {
|
|
825
825
|
this._writeTelemetry('keepOld');
|
|
826
826
|
const oldSettingsId = usingLight ? ThemeSettingDefaults.COLOR_THEME_LIGHT_OLD : ThemeSettingDefaults.COLOR_THEME_DARK_OLD;
|
|
@@ -832,7 +832,7 @@ let DefaultThemeUpdatedNotificationContribution = class DefaultThemeUpdatedNotif
|
|
|
832
832
|
}
|
|
833
833
|
];
|
|
834
834
|
await this._notificationService.prompt(Severity.Info, ( localize(
|
|
835
|
-
|
|
835
|
+
10383,
|
|
836
836
|
"Visual Studio Code now ships with a new default theme '{0}'. If you prefer, you can switch back to the old theme or try one of the many other color themes available.",
|
|
837
837
|
newTheme.label
|
|
838
838
|
)), choices, {
|
|
@@ -845,20 +845,20 @@ let DefaultThemeUpdatedNotificationContribution = class DefaultThemeUpdatedNotif
|
|
|
845
845
|
const theme = (await this._workbenchThemeService.getColorThemes()).find(theme => theme.settingsId === newThemeSettingsId);
|
|
846
846
|
if (theme) {
|
|
847
847
|
const choices = [{
|
|
848
|
-
label: ( localize(
|
|
848
|
+
label: ( localize(10384, "Try New Theme")),
|
|
849
849
|
run: () => {
|
|
850
850
|
this._writeTelemetry('tryNew');
|
|
851
851
|
this._workbenchThemeService.setColorTheme(theme, 'auto');
|
|
852
852
|
}
|
|
853
853
|
},
|
|
854
854
|
{
|
|
855
|
-
label: ( localize(
|
|
855
|
+
label: ( localize(10385, "Cancel")),
|
|
856
856
|
run: () => {
|
|
857
857
|
this._writeTelemetry('cancel');
|
|
858
858
|
}
|
|
859
859
|
}];
|
|
860
860
|
await this._notificationService.prompt(Severity.Info, ( localize(
|
|
861
|
-
|
|
861
|
+
10386,
|
|
862
862
|
"Visual Studio Code now ships with a new default theme '{0}'. Do you want to give it a try?",
|
|
863
863
|
theme.label
|
|
864
864
|
)), choices, { onCancel: () => this._writeTelemetry('cancel') });
|
|
@@ -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
|
+
11795,
|
|
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(11796, "Invalid format for file icons theme file: Object expected.")))));
|
|
151
151
|
}
|
|
152
152
|
return Promise.resolve(contentValue);
|
|
153
153
|
});
|
|
@@ -40,7 +40,7 @@ class ProductIconThemeData {
|
|
|
40
40
|
this.isLoaded = true;
|
|
41
41
|
if (warnings.length) {
|
|
42
42
|
logService.error(( localize(
|
|
43
|
-
|
|
43
|
+
11797,
|
|
44
44
|
"Problems processing product icons definitions in {0}:\n{1}",
|
|
45
45
|
(location.toString()),
|
|
46
46
|
warnings.join('\n')
|
|
@@ -71,7 +71,7 @@ class ProductIconThemeData {
|
|
|
71
71
|
static get defaultTheme() {
|
|
72
72
|
let themeData = ProductIconThemeData._defaultProductIconTheme;
|
|
73
73
|
if (!themeData) {
|
|
74
|
-
themeData = ProductIconThemeData._defaultProductIconTheme = ( new ProductIconThemeData(DEFAULT_PRODUCT_ICON_THEME_ID, ( localize(
|
|
74
|
+
themeData = ProductIconThemeData._defaultProductIconTheme = ( new ProductIconThemeData(DEFAULT_PRODUCT_ICON_THEME_ID, ( localize(11798, 'Default')), ThemeSettingDefaults.PRODUCT_ICON_THEME));
|
|
75
75
|
themeData.isLoaded = true;
|
|
76
76
|
themeData.extensionData = undefined;
|
|
77
77
|
themeData.watch = false;
|
|
@@ -158,17 +158,17 @@ function _loadProductIconThemeDocument(fileService, location, warnings) {
|
|
|
158
158
|
const contentValue = parse(content, parseErrors);
|
|
159
159
|
if (parseErrors.length > 0) {
|
|
160
160
|
return Promise.reject(( new Error(( localize(
|
|
161
|
-
|
|
161
|
+
11799,
|
|
162
162
|
"Problems parsing product icons file: {0}",
|
|
163
163
|
( parseErrors.map(e => getParseErrorMessage(e.error))).join(', ')
|
|
164
164
|
)))));
|
|
165
165
|
}
|
|
166
166
|
else if (getNodeType(contentValue) !== 'object') {
|
|
167
|
-
return Promise.reject(( new Error(( localize(
|
|
167
|
+
return Promise.reject(( new Error(( localize(11800, "Invalid format for product icons theme file: Object expected.")))));
|
|
168
168
|
}
|
|
169
169
|
else if (!contentValue.iconDefinitions || !Array.isArray(contentValue.fonts) || !contentValue.fonts.length) {
|
|
170
170
|
return Promise.reject(( new Error(( localize(
|
|
171
|
-
|
|
171
|
+
11801,
|
|
172
172
|
"Invalid format for product icons theme file: Must contain iconDefinitions and fonts."
|
|
173
173
|
)))));
|
|
174
174
|
}
|
|
@@ -182,14 +182,14 @@ function _loadProductIconThemeDocument(fileService, location, warnings) {
|
|
|
182
182
|
fontWeight = font.weight;
|
|
183
183
|
}
|
|
184
184
|
else {
|
|
185
|
-
warnings.push(( localize(
|
|
185
|
+
warnings.push(( localize(11802, 'Invalid font weight in font \'{0}\'. Ignoring setting.', font.id)));
|
|
186
186
|
}
|
|
187
187
|
let fontStyle = undefined;
|
|
188
188
|
if (isString(font.style) && font.style.match(fontStyleRegex)) {
|
|
189
189
|
fontStyle = font.style;
|
|
190
190
|
}
|
|
191
191
|
else {
|
|
192
|
-
warnings.push(( localize(
|
|
192
|
+
warnings.push(( localize(11803, 'Invalid font style in font \'{0}\'. Ignoring setting.', font.id)));
|
|
193
193
|
}
|
|
194
194
|
const sanitizedSrc = [];
|
|
195
195
|
if (Array.isArray(font.src)) {
|
|
@@ -199,7 +199,7 @@ function _loadProductIconThemeDocument(fileService, location, warnings) {
|
|
|
199
199
|
sanitizedSrc.push({ location: iconFontLocation, format: s.format });
|
|
200
200
|
}
|
|
201
201
|
else {
|
|
202
|
-
warnings.push(( localize(
|
|
202
|
+
warnings.push(( localize(11804, 'Invalid font source in font \'{0}\'. Ignoring source.', font.id)));
|
|
203
203
|
}
|
|
204
204
|
}
|
|
205
205
|
}
|
|
@@ -208,7 +208,7 @@ function _loadProductIconThemeDocument(fileService, location, warnings) {
|
|
|
208
208
|
}
|
|
209
209
|
else {
|
|
210
210
|
warnings.push(( localize(
|
|
211
|
-
|
|
211
|
+
11805,
|
|
212
212
|
'No valid font source in font \'{0}\'. Ignoring font definition.',
|
|
213
213
|
font.id
|
|
214
214
|
)));
|
|
@@ -216,7 +216,7 @@ function _loadProductIconThemeDocument(fileService, location, warnings) {
|
|
|
216
216
|
}
|
|
217
217
|
else {
|
|
218
218
|
warnings.push(( localize(
|
|
219
|
-
|
|
219
|
+
11806,
|
|
220
220
|
'Missing or invalid font id \'{0}\'. Skipping font definition.',
|
|
221
221
|
font.id
|
|
222
222
|
)));
|
|
@@ -234,12 +234,12 @@ function _loadProductIconThemeDocument(fileService, location, warnings) {
|
|
|
234
234
|
iconDefinitions.set(iconId, { fontCharacter: definition.fontCharacter, font });
|
|
235
235
|
}
|
|
236
236
|
else {
|
|
237
|
-
warnings.push(( localize(
|
|
237
|
+
warnings.push(( localize(11807, 'Skipping icon definition \'{0}\'. Unknown font.', iconId)));
|
|
238
238
|
}
|
|
239
239
|
}
|
|
240
240
|
else {
|
|
241
241
|
warnings.push(( localize(
|
|
242
|
-
|
|
242
|
+
11808,
|
|
243
243
|
'Skipping icon definition \'{0}\'. Unknown fontCharacter. Must use a sing; character or a \\ followed by a Unicode code points in hexadecimal.',
|
|
244
244
|
iconId
|
|
245
245
|
)));
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { IExtensionService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions.service";
|
|
2
2
|
import { IWorkbenchColorTheme, IWorkbenchFileIconTheme, IWorkbenchProductIconTheme, ThemeSettingTarget } from "@codingame/monaco-vscode-9d0168a3-519b-57f3-9bcc-89efc41f951a-common/vscode/vs/workbench/services/themes/common/workbenchThemeService";
|
|
3
|
-
import { IWorkbenchThemeService } from "@codingame/monaco-vscode-
|
|
3
|
+
import { IWorkbenchThemeService } from "@codingame/monaco-vscode-7443a901-21f6-577a-9674-42893b997ee0-common/vscode/vs/workbench/services/themes/common/workbenchThemeService.service";
|
|
4
4
|
import { IStorageService } from "@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service";
|
|
5
5
|
import { ITelemetryService } from "@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service";
|
|
6
6
|
import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
|
|
7
7
|
import { Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event";
|
|
8
8
|
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
9
9
|
import { FileIconThemeData } from "./fileIconThemeData.js";
|
|
10
|
-
import { IBrowserWorkbenchEnvironmentService } from "@codingame/monaco-vscode-
|
|
10
|
+
import { IBrowserWorkbenchEnvironmentService } from "@codingame/monaco-vscode-411e0589-fa79-504b-b32c-80a88847b23a-common/vscode/vs/workbench/services/environment/browser/environmentService.service";
|
|
11
11
|
import { IFileService } from "@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service";
|
|
12
12
|
import { IWorkbenchLayoutService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/layout/browser/layoutService.service";
|
|
13
13
|
import { IExtensionResourceLoaderService } from "@codingame/monaco-vscode-api/vscode/vs/platform/extensionResourceLoader/common/extensionResourceLoader.service";
|
|
@@ -18,7 +18,7 @@ import { registerFileIconThemeSchemas } from '../common/fileIconThemeSchema.js';
|
|
|
18
18
|
import { Disposable, dispose } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
19
19
|
import { FileIconThemeData, FileIconThemeLoader } from './fileIconThemeData.js';
|
|
20
20
|
import { createStyleSheet } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/domStylesheets';
|
|
21
|
-
import { IBrowserWorkbenchEnvironmentService } from '@codingame/monaco-vscode-
|
|
21
|
+
import { IBrowserWorkbenchEnvironmentService } from '@codingame/monaco-vscode-411e0589-fa79-504b-b32c-80a88847b23a-common/vscode/vs/workbench/services/environment/browser/environmentService.service';
|
|
22
22
|
import { FileChangeType } from '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files';
|
|
23
23
|
import { IFileService } from '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service';
|
|
24
24
|
import { joinPath, isEqual } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
|
|
@@ -373,7 +373,7 @@ let WorkbenchThemeService = class WorkbenchThemeService extends Disposable {
|
|
|
373
373
|
}
|
|
374
374
|
catch (error) {
|
|
375
375
|
throw ( new Error(( localize(
|
|
376
|
-
|
|
376
|
+
11809,
|
|
377
377
|
"Unable to load {0}: {1}",
|
|
378
378
|
themeData.location?.toString(),
|
|
379
379
|
error.message
|
|
@@ -13,7 +13,7 @@ import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/mini
|
|
|
13
13
|
import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/miscColors';
|
|
14
14
|
import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/quickpickColors';
|
|
15
15
|
import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/searchColors';
|
|
16
|
-
import { tokenStylingSchemaId } from '@codingame/monaco-vscode-
|
|
16
|
+
import { tokenStylingSchemaId } from '@codingame/monaco-vscode-7443a901-21f6-577a-9674-42893b997ee0-common/vscode/vs/platform/theme/common/tokenClassificationRegistry';
|
|
17
17
|
|
|
18
18
|
const textMateScopes = [
|
|
19
19
|
'comment',
|
|
@@ -136,31 +136,31 @@ const textmateColorSchema = {
|
|
|
136
136
|
},
|
|
137
137
|
settings: {
|
|
138
138
|
type: 'object',
|
|
139
|
-
description: ( localize(
|
|
139
|
+
description: ( localize(11840, 'Colors and styles for the token.')),
|
|
140
140
|
properties: {
|
|
141
141
|
foreground: {
|
|
142
142
|
type: 'string',
|
|
143
|
-
description: ( localize(
|
|
143
|
+
description: ( localize(11841, '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(11842, 'Token background colors are currently not supported.'))
|
|
150
150
|
},
|
|
151
151
|
fontStyle: {
|
|
152
152
|
type: 'string',
|
|
153
153
|
description: ( localize(
|
|
154
|
-
|
|
154
|
+
11843,
|
|
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
|
+
11844,
|
|
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(11845, '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(11846, 'Description of the rule.'))
|
|
193
193
|
},
|
|
194
194
|
scope: {
|
|
195
|
-
description: ( localize(
|
|
195
|
+
description: ( localize(11847, '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(11848, '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(11849, 'Path to a tmTheme file (relative to the current file).'))
|
|
242
242
|
},
|
|
243
243
|
{
|
|
244
|
-
description: ( localize(
|
|
244
|
+
description: ( localize(11850, '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(11851, 'Whether semantic highlighting should be enabled for this theme.'))
|
|
252
252
|
},
|
|
253
253
|
semanticTokenColors: {
|
|
254
254
|
type: 'object',
|
|
255
|
-
description: ( localize(
|
|
255
|
+
description: ( localize(11852, '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
|
+
11853,
|
|
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
|
+
11854,
|
|
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
|
+
11855,
|
|
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
|
+
11856,
|
|
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
|
+
11857,
|
|
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
|
+
11858,
|
|
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(11859, '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
|
+
11860,
|
|
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(11861, '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
|
+
11862,
|
|
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(11859, '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
|
+
11863,
|
|
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(11864, '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
|
+
11865,
|
|
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(11866, '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
|
+
11867,
|
|
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(11868, '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
|
+
11869,
|
|
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(11870, '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(11871, '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(11872, 'The ID of the font.')),
|
|
177
177
|
pattern: fontIdRegex,
|
|
178
|
-
patternErrorMessage: ( localize(
|
|
178
|
+
patternErrorMessage: ( localize(11873, 'The ID must only contain letter, numbers, underscore and minus.'))
|
|
179
179
|
},
|
|
180
180
|
src: {
|
|
181
181
|
type: 'array',
|
|
182
|
-
description: ( localize(
|
|
182
|
+
description: ( localize(11874, '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(11875, '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(11876, '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
|
+
11877,
|
|
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
|
|
@@ -210,7 +210,7 @@ const schema = {
|
|
|
210
210
|
style: {
|
|
211
211
|
type: 'string',
|
|
212
212
|
description: ( localize(
|
|
213
|
-
|
|
213
|
+
11878,
|
|
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
|
|
@@ -218,7 +218,7 @@ const schema = {
|
|
|
218
218
|
size: {
|
|
219
219
|
type: 'string',
|
|
220
220
|
description: ( localize(
|
|
221
|
-
|
|
221
|
+
11879,
|
|
222
222
|
'The default size of the font. We strongly recommend using a percentage value, for example: 125%.'
|
|
223
223
|
)),
|
|
224
224
|
pattern: fontSizeRegex
|
|
@@ -233,39 +233,39 @@ const schema = {
|
|
|
233
233
|
iconDefinitions: {
|
|
234
234
|
type: 'object',
|
|
235
235
|
description: ( localize(
|
|
236
|
-
|
|
236
|
+
11880,
|
|
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(11881, '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
|
+
11882,
|
|
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(11883, 'When using a glyph font: The character in the font to use.')),
|
|
253
253
|
pattern: fontCharacterRegex,
|
|
254
254
|
patternErrorMessage: ( localize(
|
|
255
|
-
|
|
255
|
+
11884,
|
|
256
256
|
'The fontCharacter must be a single letter or a backslash and followed by unicode code points in hexadecimal.'
|
|
257
257
|
))
|
|
258
258
|
},
|
|
259
259
|
fontColor: {
|
|
260
260
|
type: 'string',
|
|
261
261
|
format: 'color-hex',
|
|
262
|
-
description: ( localize(
|
|
262
|
+
description: ( localize(11885, 'When using a glyph font: The color to use.')),
|
|
263
263
|
pattern: fontColorRegex
|
|
264
264
|
},
|
|
265
265
|
fontSize: {
|
|
266
266
|
type: 'string',
|
|
267
267
|
description: ( localize(
|
|
268
|
-
|
|
268
|
+
11886,
|
|
269
269
|
'When using a font: The font size in percentage to the text font. If not set, defaults to the size in the font definition.'
|
|
270
270
|
)),
|
|
271
271
|
pattern: fontSizeRegex
|
|
@@ -273,7 +273,7 @@ const schema = {
|
|
|
273
273
|
fontId: {
|
|
274
274
|
type: 'string',
|
|
275
275
|
description: ( localize(
|
|
276
|
-
|
|
276
|
+
11887,
|
|
277
277
|
'When using a font: The id of the font. If not set, defaults to the first font definition.'
|
|
278
278
|
))
|
|
279
279
|
}
|
|
@@ -318,26 +318,26 @@ const schema = {
|
|
|
318
318
|
},
|
|
319
319
|
light: {
|
|
320
320
|
$ref: '#/definitions/associations',
|
|
321
|
-
description: ( localize(
|
|
321
|
+
description: ( localize(11888, 'Optional associations for file icons in light color themes.'))
|
|
322
322
|
},
|
|
323
323
|
highContrast: {
|
|
324
324
|
$ref: '#/definitions/associations',
|
|
325
325
|
description: ( localize(
|
|
326
|
-
|
|
326
|
+
11889,
|
|
327
327
|
'Optional associations for file icons in high contrast color themes.'
|
|
328
328
|
))
|
|
329
329
|
},
|
|
330
330
|
hidesExplorerArrows: {
|
|
331
331
|
type: 'boolean',
|
|
332
332
|
description: ( localize(
|
|
333
|
-
|
|
333
|
+
11890,
|
|
334
334
|
'Configures whether the file explorer\'s arrows should be hidden when this theme is active.'
|
|
335
335
|
))
|
|
336
336
|
},
|
|
337
337
|
showLanguageModeIcons: {
|
|
338
338
|
type: 'boolean',
|
|
339
339
|
description: ( localize(
|
|
340
|
-
|
|
340
|
+
11891,
|
|
341
341
|
'Configures whether the default language icons should be used if the theme does not define an icon for a language.'
|
|
342
342
|
))
|
|
343
343
|
}
|
|
@@ -15,7 +15,7 @@ import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/mini
|
|
|
15
15
|
import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/miscColors';
|
|
16
16
|
import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/quickpickColors';
|
|
17
17
|
import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/searchColors';
|
|
18
|
-
import { tokenStylingSchemaId } from '@codingame/monaco-vscode-
|
|
18
|
+
import { tokenStylingSchemaId } from '@codingame/monaco-vscode-7443a901-21f6-577a-9674-42893b997ee0-common/vscode/vs/platform/theme/common/tokenClassificationRegistry';
|
|
19
19
|
import { ThemeSettings, ThemeSettingDefaults } from '@codingame/monaco-vscode-9d0168a3-519b-57f3-9bcc-89efc41f951a-common/vscode/vs/workbench/services/themes/common/workbenchThemeService';
|
|
20
20
|
import { ConfigurationTarget } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration';
|
|
21
21
|
import { isWeb } from '@codingame/monaco-vscode-api/vscode/vs/base/common/platform';
|
|
@@ -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
|
+
11914,
|
|
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(11915, "Theme is unknown or not installed.")),
|
|
45
45
|
};
|
|
46
46
|
const preferredDarkThemeSettingSchema = {
|
|
47
47
|
type: 'string',
|
|
48
48
|
markdownDescription: ( localize(
|
|
49
|
-
|
|
49
|
+
11916,
|
|
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(11915, "Theme is unknown or not installed.")),
|
|
59
59
|
};
|
|
60
60
|
const preferredLightThemeSettingSchema = {
|
|
61
61
|
type: 'string',
|
|
62
62
|
markdownDescription: ( localize(
|
|
63
|
-
|
|
63
|
+
11917,
|
|
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(11915, "Theme is unknown or not installed.")),
|
|
73
73
|
};
|
|
74
74
|
const preferredHCDarkThemeSettingSchema = {
|
|
75
75
|
type: 'string',
|
|
76
76
|
markdownDescription: ( localize(
|
|
77
|
-
|
|
77
|
+
11918,
|
|
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(11915, "Theme is unknown or not installed.")),
|
|
87
87
|
};
|
|
88
88
|
const preferredHCLightThemeSettingSchema = {
|
|
89
89
|
type: 'string',
|
|
90
90
|
markdownDescription: ( localize(
|
|
91
|
-
|
|
91
|
+
11919,
|
|
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(11915, "Theme is unknown or not installed.")),
|
|
101
101
|
};
|
|
102
102
|
const detectColorSchemeSettingSchema = {
|
|
103
103
|
type: 'boolean',
|
|
104
104
|
markdownDescription: ( localize(
|
|
105
|
-
|
|
105
|
+
11920,
|
|
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(11921, "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
|
+
11922,
|
|
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(11923, 'None'))],
|
|
131
|
+
enumDescriptions: [( localize(11924, 'No file icons'))],
|
|
132
|
+
errorMessage: ( localize(11925, "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(11926, "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(11927, 'Default'))],
|
|
140
|
+
enumDescriptions: [( localize(11928, 'Default'))],
|
|
141
|
+
errorMessage: ( localize(11929, "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
|
+
11930,
|
|
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(11931, "Sets the colors and styles for comments"))),
|
|
192
|
+
strings: tokenGroupSettings(( localize(11932, "Sets the colors and styles for strings literals."))),
|
|
193
|
+
keywords: tokenGroupSettings(( localize(11933, "Sets the colors and styles for keywords."))),
|
|
194
|
+
numbers: tokenGroupSettings(( localize(11934, "Sets the colors and styles for number literals."))),
|
|
195
|
+
types: tokenGroupSettings(( localize(11935, "Sets the colors and styles for type declarations and references."))),
|
|
196
196
|
functions: tokenGroupSettings(( localize(
|
|
197
|
-
|
|
197
|
+
11936,
|
|
198
198
|
"Sets the colors and styles for functions declarations and references."
|
|
199
199
|
))),
|
|
200
200
|
variables: tokenGroupSettings(( localize(
|
|
201
|
-
|
|
201
|
+
11937,
|
|
202
202
|
"Sets the colors and styles for variables declarations and references."
|
|
203
203
|
))),
|
|
204
204
|
textMateRules: {
|
|
205
|
-
description: ( localize(
|
|
205
|
+
description: ( localize(11938, 'Sets colors and styles using textmate theming rules (advanced).')),
|
|
206
206
|
$ref: textmateColorsSchemaId
|
|
207
207
|
},
|
|
208
208
|
semanticHighlighting: {
|
|
209
|
-
description: ( localize(
|
|
209
|
+
description: ( localize(11939, 'Whether semantic highlighting should be enabled for this theme.')),
|
|
210
210
|
deprecationMessage: ( localize(
|
|
211
|
-
|
|
211
|
+
11940,
|
|
212
212
|
'Use `enabled` in `editor.semanticTokenColorCustomizations` setting instead.'
|
|
213
213
|
)),
|
|
214
214
|
markdownDeprecationMessage: ( localize(
|
|
215
|
-
|
|
215
|
+
11941,
|
|
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
|
+
11942,
|
|
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
|
+
11943,
|
|
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(11944, '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
|
+
11945,
|
|
254
254
|
"Overrides editor semantic token color and styles from the currently selected color theme."
|
|
255
255
|
)),
|
|
256
256
|
default: {},
|
|
@@ -15,30 +15,30 @@ function registerColorThemeExtensionPoint() {
|
|
|
15
15
|
return ExtensionsRegistry.registerExtensionPoint({
|
|
16
16
|
extensionPoint: 'themes',
|
|
17
17
|
jsonSchema: {
|
|
18
|
-
description: ( localize(
|
|
18
|
+
description: ( localize(11946, 'Contributes textmate color themes.')),
|
|
19
19
|
type: 'array',
|
|
20
20
|
items: {
|
|
21
21
|
type: 'object',
|
|
22
22
|
defaultSnippets: [{ body: { label: '${1:label}', id: '${2:id}', uiTheme: VS_DARK_THEME, path: './themes/${3:id}.tmTheme.' } }],
|
|
23
23
|
properties: {
|
|
24
24
|
id: {
|
|
25
|
-
description: ( localize(
|
|
25
|
+
description: ( localize(11947, 'Id of the color theme as used in the user settings.')),
|
|
26
26
|
type: 'string'
|
|
27
27
|
},
|
|
28
28
|
label: {
|
|
29
|
-
description: ( localize(
|
|
29
|
+
description: ( localize(11948, 'Label of the color theme as shown in the UI.')),
|
|
30
30
|
type: 'string'
|
|
31
31
|
},
|
|
32
32
|
uiTheme: {
|
|
33
33
|
description: ( localize(
|
|
34
|
-
|
|
34
|
+
11949,
|
|
35
35
|
'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.'
|
|
36
36
|
)),
|
|
37
37
|
enum: [VS_LIGHT_THEME, VS_DARK_THEME, VS_HC_THEME, VS_HC_LIGHT_THEME]
|
|
38
38
|
},
|
|
39
39
|
path: {
|
|
40
40
|
description: ( localize(
|
|
41
|
-
|
|
41
|
+
11950,
|
|
42
42
|
'Path of the tmTheme file. The path is relative to the extension folder and is typically \'./colorthemes/awesome-color-theme.json\'.'
|
|
43
43
|
)),
|
|
44
44
|
type: 'string'
|
|
@@ -53,23 +53,23 @@ function registerFileIconThemeExtensionPoint() {
|
|
|
53
53
|
return ExtensionsRegistry.registerExtensionPoint({
|
|
54
54
|
extensionPoint: 'iconThemes',
|
|
55
55
|
jsonSchema: {
|
|
56
|
-
description: ( localize(
|
|
56
|
+
description: ( localize(11951, 'Contributes file icon themes.')),
|
|
57
57
|
type: 'array',
|
|
58
58
|
items: {
|
|
59
59
|
type: 'object',
|
|
60
60
|
defaultSnippets: [{ body: { id: '${1:id}', label: '${2:label}', path: './fileicons/${3:id}-icon-theme.json' } }],
|
|
61
61
|
properties: {
|
|
62
62
|
id: {
|
|
63
|
-
description: ( localize(
|
|
63
|
+
description: ( localize(11952, 'Id of the file icon theme as used in the user settings.')),
|
|
64
64
|
type: 'string'
|
|
65
65
|
},
|
|
66
66
|
label: {
|
|
67
|
-
description: ( localize(
|
|
67
|
+
description: ( localize(11953, 'Label of the file icon theme as shown in the UI.')),
|
|
68
68
|
type: 'string'
|
|
69
69
|
},
|
|
70
70
|
path: {
|
|
71
71
|
description: ( localize(
|
|
72
|
-
|
|
72
|
+
11954,
|
|
73
73
|
'Path of the file icon theme definition file. The path is relative to the extension folder and is typically \'./fileicons/awesome-icon-theme.json\'.'
|
|
74
74
|
)),
|
|
75
75
|
type: 'string'
|
|
@@ -84,23 +84,23 @@ function registerProductIconThemeExtensionPoint() {
|
|
|
84
84
|
return ExtensionsRegistry.registerExtensionPoint({
|
|
85
85
|
extensionPoint: 'productIconThemes',
|
|
86
86
|
jsonSchema: {
|
|
87
|
-
description: ( localize(
|
|
87
|
+
description: ( localize(11955, 'Contributes product icon themes.')),
|
|
88
88
|
type: 'array',
|
|
89
89
|
items: {
|
|
90
90
|
type: 'object',
|
|
91
91
|
defaultSnippets: [{ body: { id: '${1:id}', label: '${2:label}', path: './producticons/${3:id}-product-icon-theme.json' } }],
|
|
92
92
|
properties: {
|
|
93
93
|
id: {
|
|
94
|
-
description: ( localize(
|
|
94
|
+
description: ( localize(11956, 'Id of the product icon theme as used in the user settings.')),
|
|
95
95
|
type: 'string'
|
|
96
96
|
},
|
|
97
97
|
label: {
|
|
98
|
-
description: ( localize(
|
|
98
|
+
description: ( localize(11957, 'Label of the product icon theme as shown in the UI.')),
|
|
99
99
|
type: 'string'
|
|
100
100
|
},
|
|
101
101
|
path: {
|
|
102
102
|
description: ( localize(
|
|
103
|
-
|
|
103
|
+
11958,
|
|
104
104
|
'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\'.'
|
|
105
105
|
)),
|
|
106
106
|
type: 'string'
|
|
@@ -122,19 +122,19 @@ class ThemeDataRenderer extends Disposable {
|
|
|
122
122
|
render(manifest) {
|
|
123
123
|
const markdown = ( new MarkdownString());
|
|
124
124
|
if (manifest.contributes?.themes) {
|
|
125
|
-
markdown.appendMarkdown(`### ${( localize(
|
|
125
|
+
markdown.appendMarkdown(`### ${( localize(11959, "Color Themes"))}\n\n`);
|
|
126
126
|
for (const theme of manifest.contributes.themes) {
|
|
127
127
|
markdown.appendMarkdown(`- ${theme.label}\n`);
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
130
|
if (manifest.contributes?.iconThemes) {
|
|
131
|
-
markdown.appendMarkdown(`### ${( localize(
|
|
131
|
+
markdown.appendMarkdown(`### ${( localize(11960, "File Icon Themes"))}\n\n`);
|
|
132
132
|
for (const theme of manifest.contributes.iconThemes) {
|
|
133
133
|
markdown.appendMarkdown(`- ${theme.label}\n`);
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
136
|
if (manifest.contributes?.productIconThemes) {
|
|
137
|
-
markdown.appendMarkdown(`### ${( localize(
|
|
137
|
+
markdown.appendMarkdown(`### ${( localize(11961, "Product Icon Themes"))}\n\n`);
|
|
138
138
|
for (const theme of manifest.contributes.productIconThemes) {
|
|
139
139
|
markdown.appendMarkdown(`- ${theme.label}\n`);
|
|
140
140
|
}
|
|
@@ -147,7 +147,7 @@ class ThemeDataRenderer extends Disposable {
|
|
|
147
147
|
}
|
|
148
148
|
( Registry.as(Extensions.ExtensionFeaturesRegistry)).registerExtensionFeature({
|
|
149
149
|
id: 'themes',
|
|
150
|
-
label: ( localize(
|
|
150
|
+
label: ( localize(11962, "Themes")),
|
|
151
151
|
access: {
|
|
152
152
|
canToggle: false
|
|
153
153
|
},
|
|
@@ -193,13 +193,13 @@ class ThemeRegistry {
|
|
|
193
193
|
}
|
|
194
194
|
onThemes(extensionData, extensionLocation, themeContributions, resultingThemes = [], log) {
|
|
195
195
|
if (!Array.isArray(themeContributions)) {
|
|
196
|
-
log?.error(( localize(
|
|
196
|
+
log?.error(( localize(11963, "Extension point `{0}` must be an array.", this.themesExtPoint.name)));
|
|
197
197
|
return resultingThemes;
|
|
198
198
|
}
|
|
199
199
|
themeContributions.forEach(theme => {
|
|
200
200
|
if (!theme.path || !isString(theme.path)) {
|
|
201
201
|
log?.error(( localize(
|
|
202
|
-
|
|
202
|
+
11964,
|
|
203
203
|
"Expected string in `contributes.{0}.path`. Provided value: {1}",
|
|
204
204
|
this.themesExtPoint.name,
|
|
205
205
|
String(theme.path)
|
|
@@ -208,7 +208,7 @@ class ThemeRegistry {
|
|
|
208
208
|
}
|
|
209
209
|
if (this.idRequired && (!theme.id || !isString(theme.id))) {
|
|
210
210
|
log?.error(( localize(
|
|
211
|
-
|
|
211
|
+
11965,
|
|
212
212
|
"Expected string in `contributes.{0}.id`. Provided value: {1}",
|
|
213
213
|
this.themesExtPoint.name,
|
|
214
214
|
String(theme.id)
|
|
@@ -218,7 +218,7 @@ class ThemeRegistry {
|
|
|
218
218
|
const themeLocation = joinPath(extensionLocation, theme.path);
|
|
219
219
|
if (!isEqualOrParent(themeLocation, extensionLocation)) {
|
|
220
220
|
log?.warn(( localize(
|
|
221
|
-
|
|
221
|
+
11966,
|
|
222
222
|
"Expected `contributes.{0}.path` ({1}) to be included inside extension's folder ({2}). This might make the extension non-portable.",
|
|
223
223
|
this.themesExtPoint.name,
|
|
224
224
|
themeLocation.path,
|