@codingame/monaco-vscode-api 1.69.8 → 1.69.9
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/dist/api.js +6 -6
- package/dist/configuration.js +74 -384
- package/dist/contextkey.js +1 -13
- package/dist/dialogs.js +11 -11
- package/dist/extHost.js +1402 -2068
- package/dist/files.js +106 -100
- package/dist/keybindings.js +308 -358
- package/dist/languageConfiguration.js +4 -4
- package/dist/languageService.js +2 -2
- package/dist/languages.js +3 -3
- package/dist/layout.js +310 -292
- package/dist/missing-services.js +867 -5546
- package/dist/modelEditor.js +67 -67
- package/dist/monaco.js +13 -13
- package/dist/notifications.js +336 -266
- package/dist/polyfill.js +395 -394
- package/dist/services.js +1 -1
- package/dist/services2.js +27 -659
- package/dist/snippets.js +112 -104
- package/dist/textmate.js +88 -80
- package/dist/theme.js +408 -396
- package/dist/tokenClassification.js +3 -3
- package/dist/tokenClassificationRegistry.js +83 -77
- package/dist/workbenchThemeService.js +1 -1
- package/dist/workspaceContext.js +1 -1
- package/package.json +1 -1
package/dist/theme.js
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { E as ExtensionsRegistry, S as Sequencer, I as IExtensionService, o as IBrowserWorkbenchEnvironmentService, p as IHostColorSchemeService, q as IUserDataInitializationService
|
|
3
|
-
import {
|
|
4
|
-
import { T as
|
|
5
|
-
import {
|
|
1
|
+
import { E as Emitter, k as parse$1, m as getNodeType } from './polyfill.js';
|
|
2
|
+
import { E as ExtensionsRegistry, j as ExtensionMessageCollector, S as Sequencer, I as IExtensionService, o as IBrowserWorkbenchEnvironmentService, p as IHostColorSchemeService, q as IUserDataInitializationService } from './missing-services.js';
|
|
3
|
+
import { _ as __decorate, a as __param } from './contextkey.js';
|
|
4
|
+
import { T as ThemeSettings, E as ExtensionData, V as VS_DARK_THEME, a as VS_LIGHT_THEME, b as VS_HC_THEME, c as VS_HC_LIGHT_THEME, d as THEME_SCOPE_OPEN_PAREN, e as THEME_SCOPE_CLOSE_PAREN, f as THEME_SCOPE_WILDCARD, t as themeScopeRegex } from './workbenchThemeService.js';
|
|
5
|
+
import { editorBackground, editorForeground, editorSelectionBackground, editorInactiveSelection, editorSelectionHighlight, editorFindMatchHighlight, editorFindMatch, editorHoverHighlight, editorFindRangeHighlight, workbenchColorsSchemaId, asCssVariableName, Extensions as Extensions$2 } from 'monaco-editor/esm/vs/platform/theme/common/colorRegistry.js';
|
|
6
6
|
import { Color } from 'monaco-editor/esm/vs/base/common/color.js';
|
|
7
7
|
import { editorLineHighlight, editorRangeHighlight, editorCursorForeground, editorWhitespaces, editorIndentGuides, editorActiveIndentGuides } from 'monaco-editor/esm/vs/editor/common/core/editorColorRegistry.js';
|
|
8
8
|
import { g as getParseErrorMessage } from './jsonErrorMessages.js';
|
|
9
|
-
import {
|
|
10
|
-
import { isUndefined, isObject, isArray,
|
|
9
|
+
import { t as tokenStylingSchemaId, T as TokenStyle, p as parseClassifierString, S as SemanticTokenRule, g as getTokenClassificationRegistry } from './tokenClassificationRegistry.js';
|
|
10
|
+
import { isUndefined, isString, isObject, isArray, isBoolean } from 'monaco-editor/esm/vs/base/common/types.js';
|
|
11
11
|
import { ColorScheme } from 'monaco-editor/esm/vs/platform/theme/common/theme.js';
|
|
12
|
-
import { getThemeTypeSelector, ThemeIcon, Extensions as Extensions$3
|
|
12
|
+
import { IThemeService, getThemeTypeSelector, ThemeIcon, Extensions as Extensions$3 } from 'monaco-editor/esm/vs/platform/theme/common/themeService.js';
|
|
13
13
|
import { basename } from 'monaco-editor/esm/vs/base/common/path.js';
|
|
14
|
-
import {
|
|
14
|
+
import { joinPath, isEqual, extname, dirname, isEqualOrParent } from 'monaco-editor/esm/vs/base/common/resources.js';
|
|
15
15
|
import { localize } from 'monaco-editor/esm/vs/nls.js';
|
|
16
16
|
import { Registry } from 'monaco-editor/esm/vs/platform/registry/common/platform.js';
|
|
17
|
-
import { iconsSchemaId, IconFontDefinition
|
|
17
|
+
import { getIconRegistry, iconsSchemaId, IconFontDefinition } from 'monaco-editor/esm/vs/platform/theme/common/iconRegistry.js';
|
|
18
18
|
import { Extensions as Extensions$1 } from 'monaco-editor/esm/vs/platform/jsonschemas/common/jsonContributionRegistry.js';
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
19
|
+
import { createStyleSheet, asCSSUrl } from 'monaco-editor/esm/vs/base/browser/dom.js';
|
|
20
|
+
import { r as registerExtensionFile, g as getServiceOverride$1, a as getRemoteAuthority, I as IExtensionResourceLoaderService } from './files.js';
|
|
21
21
|
import { I as IWorkbenchLayoutService } from './layoutService.js';
|
|
22
|
-
import { Extensions
|
|
22
|
+
import { Extensions } from 'monaco-editor/esm/vs/platform/configuration/common/configurationRegistry.js';
|
|
23
23
|
import { isWeb } from 'monaco-editor/esm/vs/base/common/platform.js';
|
|
24
|
-
import {
|
|
24
|
+
import { S as Services, i as IFileService } from './services2.js';
|
|
25
25
|
import { onUnexpectedError } from 'monaco-editor/esm/vs/base/common/errors.js';
|
|
26
26
|
import { getIconsStyleSheet } from 'monaco-editor/esm/vs/platform/theme/browser/iconsStyleSheet.js';
|
|
27
27
|
import { IStorageService } from 'monaco-editor/esm/vs/platform/storage/common/storage.js';
|
|
@@ -32,12 +32,12 @@ import { ILanguageService } from 'monaco-editor/esm/vs/editor/common/languages/l
|
|
|
32
32
|
import { dispose } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
|
|
33
33
|
import { RunOnceScheduler } from 'monaco-editor/esm/vs/base/common/async.js';
|
|
34
34
|
import { c as consoleExtensionMessageHandler } from './tools.js';
|
|
35
|
-
import {
|
|
35
|
+
import { bd as DEFAULT_EXTENSION } from './extHost.js';
|
|
36
36
|
import { ExtensionIdentifier } from 'monaco-editor/esm/vs/platform/extensions/common/extensions.js';
|
|
37
37
|
import { URI } from 'monaco-editor/esm/vs/base/common/uri.js';
|
|
38
38
|
import { SyncDescriptor } from 'monaco-editor/esm/vs/platform/instantiation/common/descriptors.js';
|
|
39
39
|
function getColorRegistry () {
|
|
40
|
-
return Registry.as(Extensions.ColorContribution)
|
|
40
|
+
return ( Registry.as(Extensions$2.ColorContribution));
|
|
41
41
|
}
|
|
42
42
|
const settingToColorIdMapping = {};
|
|
43
43
|
function addSettingMapping(settingId, colorId) {
|
|
@@ -62,7 +62,7 @@ function convertSettings(oldSettings, result) {
|
|
|
62
62
|
if (mappings) {
|
|
63
63
|
const colorHex = settings[key];
|
|
64
64
|
if (typeof colorHex === 'string') {
|
|
65
|
-
const color = ( Color.fromHex(colorHex));
|
|
65
|
+
const color = ( (Color.fromHex(colorHex)));
|
|
66
66
|
for (const colorId of mappings) {
|
|
67
67
|
result.colors[colorId] = color;
|
|
68
68
|
}
|
|
@@ -518,7 +518,7 @@ function _parse(content, filename, locationKeyName) {
|
|
|
518
518
|
acceptInteger(parseInt(parseTagValue(tag), 10));
|
|
519
519
|
continue;
|
|
520
520
|
case 'date':
|
|
521
|
-
acceptDate(( new Date(parseTagValue(tag))));
|
|
521
|
+
acceptDate(( (new Date(parseTagValue(tag)))));
|
|
522
522
|
continue;
|
|
523
523
|
case 'data':
|
|
524
524
|
acceptData(parseTagValue(tag));
|
|
@@ -658,7 +658,7 @@ function newTokenizer(input) {
|
|
|
658
658
|
}
|
|
659
659
|
};
|
|
660
660
|
}
|
|
661
|
-
const colorRegistry = ( Registry.as(Extensions.ColorContribution));
|
|
661
|
+
const colorRegistry = ( (Registry.as(Extensions$2.ColorContribution)));
|
|
662
662
|
const tokenClassificationRegistry = getTokenClassificationRegistry();
|
|
663
663
|
const tokenGroupToScopesMap = {
|
|
664
664
|
comments: ['comment', 'punctuation.definition.comment'],
|
|
@@ -822,7 +822,7 @@ class ColorThemeData {
|
|
|
822
822
|
}
|
|
823
823
|
getTokenColorIndex() {
|
|
824
824
|
if (!this.tokenColorIndex) {
|
|
825
|
-
const index = ( new TokenColorIndex());
|
|
825
|
+
const index = ( (new TokenColorIndex()));
|
|
826
826
|
this.tokenColors.forEach(rule => {
|
|
827
827
|
index.add(rule.settings.foreground);
|
|
828
828
|
index.add(rule.settings.background);
|
|
@@ -937,7 +937,7 @@ class ColorThemeData {
|
|
|
937
937
|
for (const id in colors) {
|
|
938
938
|
const colorVal = colors[id];
|
|
939
939
|
if (typeof colorVal === 'string') {
|
|
940
|
-
this.customColorMap[id] = ( Color.fromHex(colorVal));
|
|
940
|
+
this.customColorMap[id] = ( (Color.fromHex(colorVal)));
|
|
941
941
|
}
|
|
942
942
|
}
|
|
943
943
|
}
|
|
@@ -1122,19 +1122,19 @@ class ColorThemeData {
|
|
|
1122
1122
|
return ColorThemeData.createUnloadedTheme(getThemeTypeSelector(themeType), colorMap);
|
|
1123
1123
|
}
|
|
1124
1124
|
static createUnloadedTheme(id, colorMap) {
|
|
1125
|
-
const themeData = ( new ColorThemeData(id, '', '__' + id));
|
|
1125
|
+
const themeData = ( (new ColorThemeData(id, '', '__' + id)));
|
|
1126
1126
|
themeData.isLoaded = false;
|
|
1127
1127
|
themeData.themeTokenColors = [];
|
|
1128
1128
|
themeData.watch = false;
|
|
1129
1129
|
if (colorMap) {
|
|
1130
1130
|
for (const id in colorMap) {
|
|
1131
|
-
themeData.colorMap[id] = ( Color.fromHex(colorMap[id]));
|
|
1131
|
+
themeData.colorMap[id] = ( (Color.fromHex(colorMap[id])));
|
|
1132
1132
|
}
|
|
1133
1133
|
}
|
|
1134
1134
|
return themeData;
|
|
1135
1135
|
}
|
|
1136
1136
|
static createLoadedEmptyTheme(id, settingsId) {
|
|
1137
|
-
const themeData = ( new ColorThemeData(id, '', settingsId));
|
|
1137
|
+
const themeData = ( (new ColorThemeData(id, '', settingsId)));
|
|
1138
1138
|
themeData.isLoaded = true;
|
|
1139
1139
|
themeData.themeTokenColors = [];
|
|
1140
1140
|
themeData.watch = false;
|
|
@@ -1147,13 +1147,13 @@ class ColorThemeData {
|
|
|
1147
1147
|
}
|
|
1148
1148
|
try {
|
|
1149
1149
|
const data = JSON.parse(input);
|
|
1150
|
-
const theme = ( new ColorThemeData('', '', ''));
|
|
1150
|
+
const theme = ( (new ColorThemeData('', '', '')));
|
|
1151
1151
|
for (const key in data) {
|
|
1152
1152
|
switch (key) {
|
|
1153
1153
|
case 'colorMap': {
|
|
1154
1154
|
const colorMapData = data[key];
|
|
1155
1155
|
for (const id in colorMapData) {
|
|
1156
|
-
theme.colorMap[id] = ( Color.fromHex(colorMapData[id]));
|
|
1156
|
+
theme.colorMap[id] = ( (Color.fromHex(colorMapData[id])));
|
|
1157
1157
|
}
|
|
1158
1158
|
break;
|
|
1159
1159
|
}
|
|
@@ -1199,7 +1199,7 @@ class ColorThemeData {
|
|
|
1199
1199
|
const id = `${baseTheme} ${themeSelector}`;
|
|
1200
1200
|
const label = theme.label || basename(theme.path);
|
|
1201
1201
|
const settingsId = theme.id || label;
|
|
1202
|
-
const themeData = ( new ColorThemeData(id, label, settingsId));
|
|
1202
|
+
const themeData = ( (new ColorThemeData(id, label, settingsId)));
|
|
1203
1203
|
themeData.description = theme.description;
|
|
1204
1204
|
themeData.watch = theme._watch === true;
|
|
1205
1205
|
themeData.location = colorThemeLocation;
|
|
@@ -1226,17 +1226,17 @@ async function _loadColorTheme(extensionResourceLoaderService, themeLocation, re
|
|
|
1226
1226
|
const errors = [];
|
|
1227
1227
|
const contentValue = parse$1(content, errors);
|
|
1228
1228
|
if (errors.length > 0) {
|
|
1229
|
-
return Promise.reject(( new Error((
|
|
1229
|
+
return Promise.reject(( (new Error( (localize(
|
|
1230
1230
|
'error.cannotparsejson',
|
|
1231
1231
|
"Problems parsing JSON theme file: {0}",
|
|
1232
1232
|
errors.map(e => getParseErrorMessage(e.error)).join(', ')
|
|
1233
|
-
)))));
|
|
1233
|
+
))))));
|
|
1234
1234
|
}
|
|
1235
1235
|
else if (getNodeType(contentValue) !== 'object') {
|
|
1236
|
-
return Promise.reject(( new Error((
|
|
1236
|
+
return Promise.reject(( (new Error( (localize(
|
|
1237
1237
|
'error.invalidformat',
|
|
1238
1238
|
"Invalid format for JSON theme file: Object expected."
|
|
1239
|
-
)))));
|
|
1239
|
+
))))));
|
|
1240
1240
|
}
|
|
1241
1241
|
if (contentValue.include) {
|
|
1242
1242
|
await _loadColorTheme(extensionResourceLoaderService, joinPath(dirname(themeLocation), contentValue.include), result);
|
|
@@ -1249,16 +1249,16 @@ async function _loadColorTheme(extensionResourceLoaderService, themeLocation, re
|
|
|
1249
1249
|
const colors = contentValue.colors;
|
|
1250
1250
|
if (colors) {
|
|
1251
1251
|
if (typeof colors !== 'object') {
|
|
1252
|
-
return Promise.reject(( new Error((
|
|
1252
|
+
return Promise.reject(( (new Error( (localize(
|
|
1253
1253
|
{ key: 'error.invalidformat.colors', comment: ['{0} will be replaced by a path. Values in quotes should not be translated.'] },
|
|
1254
1254
|
"Problem parsing color theme file: {0}. Property 'colors' is not of type 'object'.",
|
|
1255
|
-
|
|
1256
|
-
)))));
|
|
1255
|
+
(themeLocation.toString())
|
|
1256
|
+
))))));
|
|
1257
1257
|
}
|
|
1258
1258
|
for (const colorId in colors) {
|
|
1259
1259
|
const colorHex = colors[colorId];
|
|
1260
1260
|
if (typeof colorHex === 'string') {
|
|
1261
|
-
result.colors[colorId] = ( Color.fromHex(colors[colorId]));
|
|
1261
|
+
result.colors[colorId] = ( (Color.fromHex(colors[colorId])));
|
|
1262
1262
|
}
|
|
1263
1263
|
}
|
|
1264
1264
|
}
|
|
@@ -1271,11 +1271,11 @@ async function _loadColorTheme(extensionResourceLoaderService, themeLocation, re
|
|
|
1271
1271
|
await _loadSyntaxTokens(extensionResourceLoaderService, joinPath(dirname(themeLocation), tokenColors), result);
|
|
1272
1272
|
}
|
|
1273
1273
|
else {
|
|
1274
|
-
return Promise.reject(( new Error((
|
|
1274
|
+
return Promise.reject(( (new Error( (localize(
|
|
1275
1275
|
{ key: 'error.invalidformat.tokenColors', comment: ['{0} will be replaced by a path. Values in quotes should not be translated.'] },
|
|
1276
1276
|
"Problem parsing color theme file: {0}. Property 'tokenColors' should be either an array specifying colors or a path to a TextMate theme file",
|
|
1277
|
-
|
|
1278
|
-
)))));
|
|
1277
|
+
(themeLocation.toString())
|
|
1278
|
+
))))));
|
|
1279
1279
|
}
|
|
1280
1280
|
}
|
|
1281
1281
|
const semanticTokenColors = contentValue.semanticTokenColors;
|
|
@@ -1288,11 +1288,11 @@ async function _loadColorTheme(extensionResourceLoaderService, themeLocation, re
|
|
|
1288
1288
|
}
|
|
1289
1289
|
}
|
|
1290
1290
|
catch (e) {
|
|
1291
|
-
return Promise.reject(( new Error((
|
|
1291
|
+
return Promise.reject(( (new Error( (localize(
|
|
1292
1292
|
{ key: 'error.invalidformat.semanticTokenColors', comment: ['{0} will be replaced by a path. Values in quotes should not be translated.'] },
|
|
1293
1293
|
"Problem parsing color theme file: {0}. Property 'semanticTokenColors' contains a invalid selector",
|
|
1294
|
-
|
|
1295
|
-
)))));
|
|
1294
|
+
(themeLocation.toString())
|
|
1295
|
+
))))));
|
|
1296
1296
|
}
|
|
1297
1297
|
}
|
|
1298
1298
|
}
|
|
@@ -1307,24 +1307,26 @@ function _loadSyntaxTokens(extensionResourceLoaderService, themeLocation, result
|
|
|
1307
1307
|
const contentValue = parse(content);
|
|
1308
1308
|
const settings = contentValue.settings;
|
|
1309
1309
|
if (!Array.isArray(settings)) {
|
|
1310
|
-
return Promise.reject(( new Error((
|
|
1310
|
+
return Promise.reject(( (new Error( (localize(
|
|
1311
1311
|
'error.plist.invalidformat',
|
|
1312
1312
|
"Problem parsing tmTheme file: {0}. 'settings' is not array."
|
|
1313
|
-
)))));
|
|
1313
|
+
))))));
|
|
1314
1314
|
}
|
|
1315
1315
|
convertSettings(settings, result);
|
|
1316
1316
|
return Promise.resolve(null);
|
|
1317
1317
|
}
|
|
1318
1318
|
catch (e) {
|
|
1319
|
-
return Promise.reject(( new Error(
|
|
1319
|
+
return Promise.reject(( (new Error(
|
|
1320
|
+
(localize('error.cannotparse', "Problems parsing tmTheme file: {0}", e.message))
|
|
1321
|
+
))));
|
|
1320
1322
|
}
|
|
1321
1323
|
}, error => {
|
|
1322
|
-
return Promise.reject(( new Error((
|
|
1324
|
+
return Promise.reject(( (new Error( (localize(
|
|
1323
1325
|
'error.cannotload',
|
|
1324
1326
|
"Problems loading tmTheme file {0}: {1}",
|
|
1325
|
-
|
|
1327
|
+
(themeLocation.toString()),
|
|
1326
1328
|
error.message
|
|
1327
|
-
)))));
|
|
1329
|
+
))))));
|
|
1328
1330
|
});
|
|
1329
1331
|
}
|
|
1330
1332
|
const defaultThemeColors = {
|
|
@@ -1523,29 +1525,29 @@ const schema$1 = {
|
|
|
1523
1525
|
properties: {
|
|
1524
1526
|
id: {
|
|
1525
1527
|
type: 'string',
|
|
1526
|
-
description: ( localize('schema.id', 'The ID of the font.')),
|
|
1528
|
+
description: ( (localize('schema.id', 'The ID of the font.'))),
|
|
1527
1529
|
pattern: fontIdRegex,
|
|
1528
|
-
patternErrorMessage: ( localize(
|
|
1530
|
+
patternErrorMessage: ( (localize(
|
|
1529
1531
|
'schema.id.formatError',
|
|
1530
1532
|
'The ID must only contain letters, numbers, underscore and minus.'
|
|
1531
|
-
))
|
|
1533
|
+
)))
|
|
1532
1534
|
},
|
|
1533
1535
|
src: {
|
|
1534
1536
|
type: 'array',
|
|
1535
|
-
description: ( localize('schema.src', 'The location of the font.')),
|
|
1537
|
+
description: ( (localize('schema.src', 'The location of the font.'))),
|
|
1536
1538
|
items: {
|
|
1537
1539
|
type: 'object',
|
|
1538
1540
|
properties: {
|
|
1539
1541
|
path: {
|
|
1540
1542
|
type: 'string',
|
|
1541
|
-
description: ( localize(
|
|
1543
|
+
description: ( (localize(
|
|
1542
1544
|
'schema.font-path',
|
|
1543
1545
|
'The font path, relative to the current product icon theme file.'
|
|
1544
|
-
)),
|
|
1546
|
+
))),
|
|
1545
1547
|
},
|
|
1546
1548
|
format: {
|
|
1547
1549
|
type: 'string',
|
|
1548
|
-
description: ( localize('schema.font-format', 'The format of the font.')),
|
|
1550
|
+
description: ( (localize('schema.font-format', 'The format of the font.'))),
|
|
1549
1551
|
enum: ['woff', 'woff2', 'truetype', 'opentype', 'embedded-opentype', 'svg']
|
|
1550
1552
|
}
|
|
1551
1553
|
},
|
|
@@ -1557,10 +1559,10 @@ const schema$1 = {
|
|
|
1557
1559
|
},
|
|
1558
1560
|
weight: {
|
|
1559
1561
|
type: 'string',
|
|
1560
|
-
description: ( localize(
|
|
1562
|
+
description: ( (localize(
|
|
1561
1563
|
'schema.font-weight',
|
|
1562
1564
|
'The weight of the font. See https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight for valid values.'
|
|
1563
|
-
)),
|
|
1565
|
+
))),
|
|
1564
1566
|
anyOf: [
|
|
1565
1567
|
{ enum: ['normal', 'bold', 'lighter', 'bolder'] },
|
|
1566
1568
|
{ type: 'string', pattern: fontWeightRegex }
|
|
@@ -1568,10 +1570,10 @@ const schema$1 = {
|
|
|
1568
1570
|
},
|
|
1569
1571
|
style: {
|
|
1570
1572
|
type: 'string',
|
|
1571
|
-
description: ( localize(
|
|
1573
|
+
description: ( (localize(
|
|
1572
1574
|
'schema.font-style',
|
|
1573
1575
|
'The style of the font. See https://developer.mozilla.org/en-US/docs/Web/CSS/font-style for valid values.'
|
|
1574
|
-
)),
|
|
1576
|
+
))),
|
|
1575
1577
|
anyOf: [
|
|
1576
1578
|
{ enum: ['normal', 'italic', 'oblique'] },
|
|
1577
1579
|
{ type: 'string', pattern: fontStyleRegex }
|
|
@@ -1585,13 +1587,13 @@ const schema$1 = {
|
|
|
1585
1587
|
}
|
|
1586
1588
|
},
|
|
1587
1589
|
iconDefinitions: {
|
|
1588
|
-
description: ( localize('schema.iconDefinitions', 'Association of icon name to a font character.')),
|
|
1590
|
+
description: ( (localize('schema.iconDefinitions', 'Association of icon name to a font character.'))),
|
|
1589
1591
|
$ref: iconsSchemaId
|
|
1590
1592
|
}
|
|
1591
1593
|
}
|
|
1592
1594
|
};
|
|
1593
1595
|
function registerProductIconThemeSchemas() {
|
|
1594
|
-
const schemaRegistry = ( Registry.as(Extensions$1.JSONContribution));
|
|
1596
|
+
const schemaRegistry = ( (Registry.as(Extensions$1.JSONContribution)));
|
|
1595
1597
|
schemaRegistry.registerSchema(schemaId$1, schema$1);
|
|
1596
1598
|
}
|
|
1597
1599
|
const schemaId = 'vscode://schemas/icon-theme';
|
|
@@ -1602,84 +1604,84 @@ const schema = {
|
|
|
1602
1604
|
definitions: {
|
|
1603
1605
|
folderExpanded: {
|
|
1604
1606
|
type: 'string',
|
|
1605
|
-
description: ( localize(
|
|
1607
|
+
description: ( (localize(
|
|
1606
1608
|
'schema.folderExpanded',
|
|
1607
1609
|
'The folder icon for expanded folders. The expanded folder icon is optional. If not set, the icon defined for folder will be shown.'
|
|
1608
|
-
))
|
|
1610
|
+
)))
|
|
1609
1611
|
},
|
|
1610
1612
|
folder: {
|
|
1611
1613
|
type: 'string',
|
|
1612
|
-
description: ( localize(
|
|
1614
|
+
description: ( (localize(
|
|
1613
1615
|
'schema.folder',
|
|
1614
1616
|
'The folder icon for collapsed folders, and if folderExpanded is not set, also for expanded folders.'
|
|
1615
|
-
))
|
|
1617
|
+
)))
|
|
1616
1618
|
},
|
|
1617
1619
|
file: {
|
|
1618
1620
|
type: 'string',
|
|
1619
|
-
description: ( localize(
|
|
1621
|
+
description: ( (localize(
|
|
1620
1622
|
'schema.file',
|
|
1621
1623
|
'The default file icon, shown for all files that don\'t match any extension, filename or language id.'
|
|
1622
|
-
))
|
|
1624
|
+
)))
|
|
1623
1625
|
},
|
|
1624
1626
|
folderNames: {
|
|
1625
1627
|
type: 'object',
|
|
1626
|
-
description: ( localize(
|
|
1628
|
+
description: ( (localize(
|
|
1627
1629
|
'schema.folderNames',
|
|
1628
1630
|
'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.'
|
|
1629
|
-
)),
|
|
1631
|
+
))),
|
|
1630
1632
|
additionalProperties: {
|
|
1631
1633
|
type: 'string',
|
|
1632
|
-
description: ( localize('schema.folderName', 'The ID of the icon definition for the association.'))
|
|
1634
|
+
description: ( (localize('schema.folderName', 'The ID of the icon definition for the association.')))
|
|
1633
1635
|
}
|
|
1634
1636
|
},
|
|
1635
1637
|
folderNamesExpanded: {
|
|
1636
1638
|
type: 'object',
|
|
1637
|
-
description: ( localize(
|
|
1639
|
+
description: ( (localize(
|
|
1638
1640
|
'schema.folderNamesExpanded',
|
|
1639
1641
|
'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.'
|
|
1640
|
-
)),
|
|
1642
|
+
))),
|
|
1641
1643
|
additionalProperties: {
|
|
1642
1644
|
type: 'string',
|
|
1643
|
-
description: ( localize(
|
|
1645
|
+
description: ( (localize(
|
|
1644
1646
|
'schema.folderNameExpanded',
|
|
1645
1647
|
'The ID of the icon definition for the association.'
|
|
1646
|
-
))
|
|
1648
|
+
)))
|
|
1647
1649
|
}
|
|
1648
1650
|
},
|
|
1649
1651
|
fileExtensions: {
|
|
1650
1652
|
type: 'object',
|
|
1651
|
-
description: ( localize(
|
|
1653
|
+
description: ( (localize(
|
|
1652
1654
|
'schema.fileExtensions',
|
|
1653
1655
|
'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.'
|
|
1654
|
-
)),
|
|
1656
|
+
))),
|
|
1655
1657
|
additionalProperties: {
|
|
1656
1658
|
type: 'string',
|
|
1657
|
-
description: ( localize(
|
|
1659
|
+
description: ( (localize(
|
|
1658
1660
|
'schema.fileExtension',
|
|
1659
1661
|
'The ID of the icon definition for the association.'
|
|
1660
|
-
))
|
|
1662
|
+
)))
|
|
1661
1663
|
}
|
|
1662
1664
|
},
|
|
1663
1665
|
fileNames: {
|
|
1664
1666
|
type: 'object',
|
|
1665
|
-
description: ( localize(
|
|
1667
|
+
description: ( (localize(
|
|
1666
1668
|
'schema.fileNames',
|
|
1667
1669
|
'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.'
|
|
1668
|
-
)),
|
|
1670
|
+
))),
|
|
1669
1671
|
additionalProperties: {
|
|
1670
1672
|
type: 'string',
|
|
1671
|
-
description: ( localize('schema.fileName', 'The ID of the icon definition for the association.'))
|
|
1673
|
+
description: ( (localize('schema.fileName', 'The ID of the icon definition for the association.')))
|
|
1672
1674
|
}
|
|
1673
1675
|
},
|
|
1674
1676
|
languageIds: {
|
|
1675
1677
|
type: 'object',
|
|
1676
|
-
description: ( localize(
|
|
1678
|
+
description: ( (localize(
|
|
1677
1679
|
'schema.languageIds',
|
|
1678
1680
|
'Associates languages to icons. The object key is the language id as defined in the language contribution point.'
|
|
1679
|
-
)),
|
|
1681
|
+
))),
|
|
1680
1682
|
additionalProperties: {
|
|
1681
1683
|
type: 'string',
|
|
1682
|
-
description: ( localize('schema.languageId', 'The ID of the icon definition for the association.'))
|
|
1684
|
+
description: ( (localize('schema.languageId', 'The ID of the icon definition for the association.')))
|
|
1683
1685
|
}
|
|
1684
1686
|
},
|
|
1685
1687
|
associations: {
|
|
@@ -1715,35 +1717,35 @@ const schema = {
|
|
|
1715
1717
|
properties: {
|
|
1716
1718
|
fonts: {
|
|
1717
1719
|
type: 'array',
|
|
1718
|
-
description: ( localize('schema.fonts', 'Fonts that are used in the icon definitions.')),
|
|
1720
|
+
description: ( (localize('schema.fonts', 'Fonts that are used in the icon definitions.'))),
|
|
1719
1721
|
items: {
|
|
1720
1722
|
type: 'object',
|
|
1721
1723
|
properties: {
|
|
1722
1724
|
id: {
|
|
1723
1725
|
type: 'string',
|
|
1724
|
-
description: ( localize('schema.id', 'The ID of the font.')),
|
|
1726
|
+
description: ( (localize('schema.id', 'The ID of the font.'))),
|
|
1725
1727
|
pattern: fontIdRegex,
|
|
1726
|
-
patternErrorMessage: ( localize(
|
|
1728
|
+
patternErrorMessage: ( (localize(
|
|
1727
1729
|
'schema.id.formatError',
|
|
1728
1730
|
'The ID must only contain letter, numbers, underscore and minus.'
|
|
1729
|
-
))
|
|
1731
|
+
)))
|
|
1730
1732
|
},
|
|
1731
1733
|
src: {
|
|
1732
1734
|
type: 'array',
|
|
1733
|
-
description: ( localize('schema.src', 'The location of the font.')),
|
|
1735
|
+
description: ( (localize('schema.src', 'The location of the font.'))),
|
|
1734
1736
|
items: {
|
|
1735
1737
|
type: 'object',
|
|
1736
1738
|
properties: {
|
|
1737
1739
|
path: {
|
|
1738
1740
|
type: 'string',
|
|
1739
|
-
description: ( localize(
|
|
1741
|
+
description: ( (localize(
|
|
1740
1742
|
'schema.font-path',
|
|
1741
1743
|
'The font path, relative to the current file icon theme file.'
|
|
1742
|
-
)),
|
|
1744
|
+
))),
|
|
1743
1745
|
},
|
|
1744
1746
|
format: {
|
|
1745
1747
|
type: 'string',
|
|
1746
|
-
description: ( localize('schema.font-format', 'The format of the font.')),
|
|
1748
|
+
description: ( (localize('schema.font-format', 'The format of the font.'))),
|
|
1747
1749
|
enum: ['woff', 'woff2', 'truetype', 'opentype', 'embedded-opentype', 'svg']
|
|
1748
1750
|
}
|
|
1749
1751
|
},
|
|
@@ -1755,26 +1757,26 @@ const schema = {
|
|
|
1755
1757
|
},
|
|
1756
1758
|
weight: {
|
|
1757
1759
|
type: 'string',
|
|
1758
|
-
description: ( localize(
|
|
1760
|
+
description: ( (localize(
|
|
1759
1761
|
'schema.font-weight',
|
|
1760
1762
|
'The weight of the font. See https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight for valid values.'
|
|
1761
|
-
)),
|
|
1763
|
+
))),
|
|
1762
1764
|
pattern: fontWeightRegex
|
|
1763
1765
|
},
|
|
1764
1766
|
style: {
|
|
1765
1767
|
type: 'string',
|
|
1766
|
-
description: ( localize(
|
|
1768
|
+
description: ( (localize(
|
|
1767
1769
|
'schema.font-style',
|
|
1768
1770
|
'The style of the font. See https://developer.mozilla.org/en-US/docs/Web/CSS/font-style for valid values.'
|
|
1769
|
-
)),
|
|
1771
|
+
))),
|
|
1770
1772
|
pattern: fontStyleRegex
|
|
1771
1773
|
},
|
|
1772
1774
|
size: {
|
|
1773
1775
|
type: 'string',
|
|
1774
|
-
description: ( localize(
|
|
1776
|
+
description: ( (localize(
|
|
1775
1777
|
'schema.font-size',
|
|
1776
1778
|
'The default size of the font. See https://developer.mozilla.org/en-US/docs/Web/CSS/font-size for valid values.'
|
|
1777
|
-
)),
|
|
1779
|
+
))),
|
|
1778
1780
|
pattern: fontSizeRegex
|
|
1779
1781
|
}
|
|
1780
1782
|
},
|
|
@@ -1786,50 +1788,50 @@ const schema = {
|
|
|
1786
1788
|
},
|
|
1787
1789
|
iconDefinitions: {
|
|
1788
1790
|
type: 'object',
|
|
1789
|
-
description: ( localize(
|
|
1791
|
+
description: ( (localize(
|
|
1790
1792
|
'schema.iconDefinitions',
|
|
1791
1793
|
'Description of all icons that can be used when associating files to icons.'
|
|
1792
|
-
)),
|
|
1794
|
+
))),
|
|
1793
1795
|
additionalProperties: {
|
|
1794
1796
|
type: 'object',
|
|
1795
|
-
description: ( localize(
|
|
1797
|
+
description: ( (localize(
|
|
1796
1798
|
'schema.iconDefinition',
|
|
1797
1799
|
'An icon definition. The object key is the ID of the definition.'
|
|
1798
|
-
)),
|
|
1800
|
+
))),
|
|
1799
1801
|
properties: {
|
|
1800
1802
|
iconPath: {
|
|
1801
1803
|
type: 'string',
|
|
1802
|
-
description: ( localize(
|
|
1804
|
+
description: ( (localize(
|
|
1803
1805
|
'schema.iconPath',
|
|
1804
1806
|
'When using a SVG or PNG: The path to the image. The path is relative to the icon set file.'
|
|
1805
|
-
))
|
|
1807
|
+
)))
|
|
1806
1808
|
},
|
|
1807
1809
|
fontCharacter: {
|
|
1808
1810
|
type: 'string',
|
|
1809
|
-
description: ( localize(
|
|
1811
|
+
description: ( (localize(
|
|
1810
1812
|
'schema.fontCharacter',
|
|
1811
1813
|
'When using a glyph font: The character in the font to use.'
|
|
1812
|
-
))
|
|
1814
|
+
)))
|
|
1813
1815
|
},
|
|
1814
1816
|
fontColor: {
|
|
1815
1817
|
type: 'string',
|
|
1816
1818
|
format: 'color-hex',
|
|
1817
|
-
description: ( localize('schema.fontColor', 'When using a glyph font: The color to use.'))
|
|
1819
|
+
description: ( (localize('schema.fontColor', 'When using a glyph font: The color to use.')))
|
|
1818
1820
|
},
|
|
1819
1821
|
fontSize: {
|
|
1820
1822
|
type: 'string',
|
|
1821
|
-
description: ( localize(
|
|
1823
|
+
description: ( (localize(
|
|
1822
1824
|
'schema.fontSize',
|
|
1823
1825
|
'When using a font: The font size in percentage to the text font. If not set, defaults to the size in the font definition.'
|
|
1824
|
-
)),
|
|
1826
|
+
))),
|
|
1825
1827
|
pattern: fontSizeRegex
|
|
1826
1828
|
},
|
|
1827
1829
|
fontId: {
|
|
1828
1830
|
type: 'string',
|
|
1829
|
-
description: ( localize(
|
|
1831
|
+
description: ( (localize(
|
|
1830
1832
|
'schema.fontId',
|
|
1831
1833
|
'When using a font: The id of the font. If not set, defaults to the first font definition.'
|
|
1832
|
-
))
|
|
1834
|
+
)))
|
|
1833
1835
|
}
|
|
1834
1836
|
}
|
|
1835
1837
|
}
|
|
@@ -1860,36 +1862,36 @@ const schema = {
|
|
|
1860
1862
|
},
|
|
1861
1863
|
light: {
|
|
1862
1864
|
$ref: '#/definitions/associations',
|
|
1863
|
-
description: ( localize(
|
|
1865
|
+
description: ( (localize(
|
|
1864
1866
|
'schema.light',
|
|
1865
1867
|
'Optional associations for file icons in light color themes.'
|
|
1866
|
-
))
|
|
1868
|
+
)))
|
|
1867
1869
|
},
|
|
1868
1870
|
highContrast: {
|
|
1869
1871
|
$ref: '#/definitions/associations',
|
|
1870
|
-
description: ( localize(
|
|
1872
|
+
description: ( (localize(
|
|
1871
1873
|
'schema.highContrast',
|
|
1872
1874
|
'Optional associations for file icons in high contrast color themes.'
|
|
1873
|
-
))
|
|
1875
|
+
)))
|
|
1874
1876
|
},
|
|
1875
1877
|
hidesExplorerArrows: {
|
|
1876
1878
|
type: 'boolean',
|
|
1877
|
-
description: ( localize(
|
|
1879
|
+
description: ( (localize(
|
|
1878
1880
|
'schema.hidesExplorerArrows',
|
|
1879
1881
|
'Configures whether the file explorer\'s arrows should be hidden when this theme is active.'
|
|
1880
|
-
))
|
|
1882
|
+
)))
|
|
1881
1883
|
},
|
|
1882
1884
|
showLanguageModeIcons: {
|
|
1883
1885
|
type: 'boolean',
|
|
1884
|
-
description: ( localize(
|
|
1886
|
+
description: ( (localize(
|
|
1885
1887
|
'schema.showLanguageModeIcons',
|
|
1886
1888
|
'Configures whether the default language icons should be used if the theme does not define an icon for a language.'
|
|
1887
|
-
))
|
|
1889
|
+
)))
|
|
1888
1890
|
}
|
|
1889
1891
|
}
|
|
1890
1892
|
};
|
|
1891
1893
|
function registerFileIconThemeSchemas() {
|
|
1892
|
-
const schemaRegistry = ( Registry.as(Extensions$1.JSONContribution));
|
|
1894
|
+
const schemaRegistry = ( (Registry.as(Extensions$1.JSONContribution)));
|
|
1893
1895
|
schemaRegistry.registerSchema(schemaId, schema);
|
|
1894
1896
|
}
|
|
1895
1897
|
class FileIconThemeData {
|
|
@@ -1915,7 +1917,7 @@ class FileIconThemeData {
|
|
|
1915
1917
|
const id = extensionData.extensionId + '-' + iconTheme.id;
|
|
1916
1918
|
const label = iconTheme.label || basename(iconTheme.path);
|
|
1917
1919
|
const settingsId = iconTheme.id;
|
|
1918
|
-
const themeData = ( new FileIconThemeData(id, label, settingsId));
|
|
1920
|
+
const themeData = ( (new FileIconThemeData(id, label, settingsId)));
|
|
1919
1921
|
themeData.description = iconTheme.description;
|
|
1920
1922
|
themeData.location = iconThemeLocation;
|
|
1921
1923
|
themeData.extensionData = extensionData;
|
|
@@ -1926,7 +1928,7 @@ class FileIconThemeData {
|
|
|
1926
1928
|
static get noIconTheme() {
|
|
1927
1929
|
let themeData = FileIconThemeData._noIconTheme;
|
|
1928
1930
|
if (!themeData) {
|
|
1929
|
-
themeData = FileIconThemeData._noIconTheme = ( new FileIconThemeData('', '', null));
|
|
1931
|
+
themeData = FileIconThemeData._noIconTheme = ( (new FileIconThemeData('', '', null)));
|
|
1930
1932
|
themeData.hasFileIcons = false;
|
|
1931
1933
|
themeData.hasFolderIcons = false;
|
|
1932
1934
|
themeData.hidesExplorerArrows = false;
|
|
@@ -1937,7 +1939,7 @@ class FileIconThemeData {
|
|
|
1937
1939
|
return themeData;
|
|
1938
1940
|
}
|
|
1939
1941
|
static createUnloadedTheme(id) {
|
|
1940
|
-
const themeData = ( new FileIconThemeData(id, '', '__' + id));
|
|
1942
|
+
const themeData = ( (new FileIconThemeData(id, '', '__' + id)));
|
|
1941
1943
|
themeData.isLoaded = false;
|
|
1942
1944
|
themeData.hasFileIcons = false;
|
|
1943
1945
|
themeData.hasFolderIcons = false;
|
|
@@ -1953,7 +1955,7 @@ class FileIconThemeData {
|
|
|
1953
1955
|
}
|
|
1954
1956
|
try {
|
|
1955
1957
|
const data = JSON.parse(input);
|
|
1956
|
-
const theme = ( new FileIconThemeData('', '', null));
|
|
1958
|
+
const theme = ( (new FileIconThemeData('', '', null)));
|
|
1957
1959
|
for (const key in data) {
|
|
1958
1960
|
switch (key) {
|
|
1959
1961
|
case 'id':
|
|
@@ -2022,17 +2024,17 @@ class FileIconThemeLoader {
|
|
|
2022
2024
|
const errors = [];
|
|
2023
2025
|
const contentValue = parse$1(content, errors);
|
|
2024
2026
|
if (errors.length > 0) {
|
|
2025
|
-
return Promise.reject(( new Error((
|
|
2027
|
+
return Promise.reject(( (new Error( (localize(
|
|
2026
2028
|
'error.cannotparseicontheme',
|
|
2027
2029
|
"Problems parsing file icons file: {0}",
|
|
2028
2030
|
errors.map(e => getParseErrorMessage(e.error)).join(', ')
|
|
2029
|
-
)))));
|
|
2031
|
+
))))));
|
|
2030
2032
|
}
|
|
2031
2033
|
else if (getNodeType(contentValue) !== 'object') {
|
|
2032
|
-
return Promise.reject(( new Error((
|
|
2034
|
+
return Promise.reject(( (new Error( (localize(
|
|
2033
2035
|
'error.invalidformat',
|
|
2034
2036
|
"Invalid format for file icons theme file: Object expected."
|
|
2035
|
-
)))));
|
|
2037
|
+
))))));
|
|
2036
2038
|
}
|
|
2037
2039
|
return Promise.resolve(contentValue);
|
|
2038
2040
|
});
|
|
@@ -2167,7 +2169,7 @@ class FileIconThemeLoader {
|
|
|
2167
2169
|
const showLanguageModeIcons = iconThemeDocument.showLanguageModeIcons === true || (hasSpecificFileIcons && iconThemeDocument.showLanguageModeIcons !== false);
|
|
2168
2170
|
const cssRules = [];
|
|
2169
2171
|
const fonts = iconThemeDocument.fonts;
|
|
2170
|
-
const fontSizes = ( new Map());
|
|
2172
|
+
const fontSizes = ( (new Map()));
|
|
2171
2173
|
if (Array.isArray(fonts)) {
|
|
2172
2174
|
const defaultFontSize = fonts[0].size || '150%';
|
|
2173
2175
|
fonts.forEach(font => {
|
|
@@ -2358,34 +2360,34 @@ const textmateColorSchema = {
|
|
|
2358
2360
|
},
|
|
2359
2361
|
settings: {
|
|
2360
2362
|
type: 'object',
|
|
2361
|
-
description: ( localize('schema.token.settings', 'Colors and styles for the token.')),
|
|
2363
|
+
description: ( (localize('schema.token.settings', 'Colors and styles for the token.'))),
|
|
2362
2364
|
properties: {
|
|
2363
2365
|
foreground: {
|
|
2364
2366
|
type: 'string',
|
|
2365
|
-
description: ( localize('schema.token.foreground', 'Foreground color for the token.')),
|
|
2367
|
+
description: ( (localize('schema.token.foreground', 'Foreground color for the token.'))),
|
|
2366
2368
|
format: 'color-hex',
|
|
2367
2369
|
default: '#ff0000'
|
|
2368
2370
|
},
|
|
2369
2371
|
background: {
|
|
2370
2372
|
type: 'string',
|
|
2371
|
-
deprecationMessage: ( localize(
|
|
2373
|
+
deprecationMessage: ( (localize(
|
|
2372
2374
|
'schema.token.background.warning',
|
|
2373
2375
|
'Token background colors are currently not supported.'
|
|
2374
|
-
))
|
|
2376
|
+
)))
|
|
2375
2377
|
},
|
|
2376
2378
|
fontStyle: {
|
|
2377
2379
|
type: 'string',
|
|
2378
|
-
description: ( localize(
|
|
2380
|
+
description: ( (localize(
|
|
2379
2381
|
'schema.token.fontStyle',
|
|
2380
2382
|
'Font style of the rule: \'italic\', \'bold\', \'underline\', \'strikethrough\' or a combination. The empty string unsets inherited settings.'
|
|
2381
|
-
)),
|
|
2383
|
+
))),
|
|
2382
2384
|
pattern: '^(\\s*\\b(italic|bold|underline|strikethrough))*\\s*$',
|
|
2383
|
-
patternErrorMessage: ( localize(
|
|
2385
|
+
patternErrorMessage: ( (localize(
|
|
2384
2386
|
'schema.fontStyle.error',
|
|
2385
2387
|
'Font style must be \'italic\', \'bold\', \'underline\', \'strikethrough\' or a combination or the empty string.'
|
|
2386
|
-
)),
|
|
2388
|
+
))),
|
|
2387
2389
|
defaultSnippets: [
|
|
2388
|
-
{ label: ( localize('schema.token.fontStyle.none', 'None (clear inherited style)')), bodyText: '""' },
|
|
2390
|
+
{ label: ( (localize('schema.token.fontStyle.none', 'None (clear inherited style)'))), bodyText: '""' },
|
|
2389
2391
|
{ body: 'italic' },
|
|
2390
2392
|
{ body: 'bold' },
|
|
2391
2393
|
{ body: 'underline' },
|
|
@@ -2414,13 +2416,13 @@ const textmateColorSchema = {
|
|
|
2414
2416
|
properties: {
|
|
2415
2417
|
name: {
|
|
2416
2418
|
type: 'string',
|
|
2417
|
-
description: ( localize('schema.properties.name', 'Description of the rule.'))
|
|
2419
|
+
description: ( (localize('schema.properties.name', 'Description of the rule.')))
|
|
2418
2420
|
},
|
|
2419
2421
|
scope: {
|
|
2420
|
-
description: ( localize(
|
|
2422
|
+
description: ( (localize(
|
|
2421
2423
|
'schema.properties.scope',
|
|
2422
2424
|
'Scope selector against which this rule matches.'
|
|
2423
|
-
)),
|
|
2425
|
+
))),
|
|
2424
2426
|
anyOf: [
|
|
2425
2427
|
{
|
|
2426
2428
|
enum: textMateScopes
|
|
@@ -2459,166 +2461,172 @@ const colorThemeSchema = {
|
|
|
2459
2461
|
allowTrailingCommas: true,
|
|
2460
2462
|
properties: {
|
|
2461
2463
|
colors: {
|
|
2462
|
-
description: ( localize('schema.workbenchColors', 'Colors in the workbench')),
|
|
2464
|
+
description: ( (localize('schema.workbenchColors', 'Colors in the workbench'))),
|
|
2463
2465
|
$ref: workbenchColorsSchemaId,
|
|
2464
2466
|
additionalProperties: false
|
|
2465
2467
|
},
|
|
2466
2468
|
tokenColors: {
|
|
2467
2469
|
anyOf: [{
|
|
2468
2470
|
type: 'string',
|
|
2469
|
-
description: ( localize(
|
|
2471
|
+
description: ( (localize(
|
|
2470
2472
|
'schema.tokenColors.path',
|
|
2471
2473
|
'Path to a tmTheme file (relative to the current file).'
|
|
2472
|
-
))
|
|
2474
|
+
)))
|
|
2473
2475
|
},
|
|
2474
2476
|
{
|
|
2475
|
-
description: ( localize('schema.colors', 'Colors for syntax highlighting')),
|
|
2477
|
+
description: ( (localize('schema.colors', 'Colors for syntax highlighting'))),
|
|
2476
2478
|
$ref: textmateColorsSchemaId
|
|
2477
2479
|
}
|
|
2478
2480
|
]
|
|
2479
2481
|
},
|
|
2480
2482
|
semanticHighlighting: {
|
|
2481
2483
|
type: 'boolean',
|
|
2482
|
-
description: ( localize(
|
|
2484
|
+
description: ( (localize(
|
|
2483
2485
|
'schema.supportsSemanticHighlighting',
|
|
2484
2486
|
'Whether semantic highlighting should be enabled for this theme.'
|
|
2485
|
-
))
|
|
2487
|
+
)))
|
|
2486
2488
|
},
|
|
2487
2489
|
semanticTokenColors: {
|
|
2488
2490
|
type: 'object',
|
|
2489
|
-
description: ( localize('schema.semanticTokenColors', 'Colors for semantic tokens')),
|
|
2491
|
+
description: ( (localize('schema.semanticTokenColors', 'Colors for semantic tokens'))),
|
|
2490
2492
|
$ref: tokenStylingSchemaId
|
|
2491
2493
|
}
|
|
2492
2494
|
}
|
|
2493
2495
|
};
|
|
2494
2496
|
function registerColorThemeSchemas() {
|
|
2495
|
-
const schemaRegistry = ( Registry.as(Extensions$1.JSONContribution));
|
|
2497
|
+
const schemaRegistry = ( (Registry.as(Extensions$1.JSONContribution)));
|
|
2496
2498
|
schemaRegistry.registerSchema(colorThemeSchemaId, colorThemeSchema);
|
|
2497
2499
|
schemaRegistry.registerSchema(textmateColorsSchemaId, textmateColorSchema);
|
|
2498
2500
|
}
|
|
2499
2501
|
function registerColorThemeExtensionPoint() {
|
|
2500
|
-
return (
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2502
|
+
return (
|
|
2503
|
+
(ExtensionsRegistry.registerExtensionPoint({
|
|
2504
|
+
extensionPoint: 'themes',
|
|
2505
|
+
jsonSchema: {
|
|
2506
|
+
description: ( (localize(
|
|
2507
|
+
'vscode.extension.contributes.themes',
|
|
2508
|
+
'Contributes textmate color themes.'
|
|
2509
|
+
))),
|
|
2510
|
+
type: 'array',
|
|
2511
|
+
items: {
|
|
2512
|
+
type: 'object',
|
|
2513
|
+
defaultSnippets: [{ body: { label: '${1:label}', id: '${2:id}', uiTheme: VS_DARK_THEME, path: './themes/${3:id}.tmTheme.' } }],
|
|
2514
|
+
properties: {
|
|
2515
|
+
id: {
|
|
2516
|
+
description: ( (localize(
|
|
2517
|
+
'vscode.extension.contributes.themes.id',
|
|
2518
|
+
'Id of the color theme as used in the user settings.'
|
|
2519
|
+
))),
|
|
2520
|
+
type: 'string'
|
|
2521
|
+
},
|
|
2522
|
+
label: {
|
|
2523
|
+
description: ( (localize(
|
|
2524
|
+
'vscode.extension.contributes.themes.label',
|
|
2525
|
+
'Label of the color theme as shown in the UI.'
|
|
2526
|
+
))),
|
|
2527
|
+
type: 'string'
|
|
2528
|
+
},
|
|
2529
|
+
uiTheme: {
|
|
2530
|
+
description: ( (localize(
|
|
2531
|
+
'vscode.extension.contributes.themes.uiTheme',
|
|
2532
|
+
'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.'
|
|
2533
|
+
))),
|
|
2534
|
+
enum: [VS_LIGHT_THEME, VS_DARK_THEME, VS_HC_THEME, VS_HC_LIGHT_THEME]
|
|
2535
|
+
},
|
|
2536
|
+
path: {
|
|
2537
|
+
description: ( (localize(
|
|
2538
|
+
'vscode.extension.contributes.themes.path',
|
|
2539
|
+
'Path of the tmTheme file. The path is relative to the extension folder and is typically \'./colorthemes/awesome-color-theme.json\'.'
|
|
2540
|
+
))),
|
|
2541
|
+
type: 'string'
|
|
2542
|
+
}
|
|
2532
2543
|
},
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
'vscode.extension.contributes.themes.path',
|
|
2536
|
-
'Path of the tmTheme file. The path is relative to the extension folder and is typically \'./colorthemes/awesome-color-theme.json\'.'
|
|
2537
|
-
)),
|
|
2538
|
-
type: 'string'
|
|
2539
|
-
}
|
|
2540
|
-
},
|
|
2541
|
-
required: ['path', 'uiTheme']
|
|
2544
|
+
required: ['path', 'uiTheme']
|
|
2545
|
+
}
|
|
2542
2546
|
}
|
|
2543
|
-
}
|
|
2544
|
-
|
|
2547
|
+
}))
|
|
2548
|
+
);
|
|
2545
2549
|
}
|
|
2546
2550
|
function registerFileIconThemeExtensionPoint() {
|
|
2547
|
-
return (
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2551
|
+
return (
|
|
2552
|
+
(ExtensionsRegistry.registerExtensionPoint({
|
|
2553
|
+
extensionPoint: 'iconThemes',
|
|
2554
|
+
jsonSchema: {
|
|
2555
|
+
description: ( (localize('vscode.extension.contributes.iconThemes', 'Contributes file icon themes.'))),
|
|
2556
|
+
type: 'array',
|
|
2557
|
+
items: {
|
|
2558
|
+
type: 'object',
|
|
2559
|
+
defaultSnippets: [{ body: { id: '${1:id}', label: '${2:label}', path: './fileicons/${3:id}-icon-theme.json' } }],
|
|
2560
|
+
properties: {
|
|
2561
|
+
id: {
|
|
2562
|
+
description: ( (localize(
|
|
2563
|
+
'vscode.extension.contributes.iconThemes.id',
|
|
2564
|
+
'Id of the file icon theme as used in the user settings.'
|
|
2565
|
+
))),
|
|
2566
|
+
type: 'string'
|
|
2567
|
+
},
|
|
2568
|
+
label: {
|
|
2569
|
+
description: ( (localize(
|
|
2570
|
+
'vscode.extension.contributes.iconThemes.label',
|
|
2571
|
+
'Label of the file icon theme as shown in the UI.'
|
|
2572
|
+
))),
|
|
2573
|
+
type: 'string'
|
|
2574
|
+
},
|
|
2575
|
+
path: {
|
|
2576
|
+
description: ( (localize(
|
|
2577
|
+
'vscode.extension.contributes.iconThemes.path',
|
|
2578
|
+
'Path of the file icon theme definition file. The path is relative to the extension folder and is typically \'./fileicons/awesome-icon-theme.json\'.'
|
|
2579
|
+
))),
|
|
2580
|
+
type: 'string'
|
|
2581
|
+
}
|
|
2569
2582
|
},
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
'vscode.extension.contributes.iconThemes.path',
|
|
2573
|
-
'Path of the file icon theme definition file. The path is relative to the extension folder and is typically \'./fileicons/awesome-icon-theme.json\'.'
|
|
2574
|
-
)),
|
|
2575
|
-
type: 'string'
|
|
2576
|
-
}
|
|
2577
|
-
},
|
|
2578
|
-
required: ['path', 'id']
|
|
2583
|
+
required: ['path', 'id']
|
|
2584
|
+
}
|
|
2579
2585
|
}
|
|
2580
|
-
}
|
|
2581
|
-
|
|
2586
|
+
}))
|
|
2587
|
+
);
|
|
2582
2588
|
}
|
|
2583
2589
|
function registerProductIconThemeExtensionPoint() {
|
|
2584
|
-
return (
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2590
|
+
return (
|
|
2591
|
+
(ExtensionsRegistry.registerExtensionPoint({
|
|
2592
|
+
extensionPoint: 'productIconThemes',
|
|
2593
|
+
jsonSchema: {
|
|
2594
|
+
description: ( (localize(
|
|
2595
|
+
'vscode.extension.contributes.productIconThemes',
|
|
2596
|
+
'Contributes product icon themes.'
|
|
2597
|
+
))),
|
|
2598
|
+
type: 'array',
|
|
2599
|
+
items: {
|
|
2600
|
+
type: 'object',
|
|
2601
|
+
defaultSnippets: [{ body: { id: '${1:id}', label: '${2:label}', path: './producticons/${3:id}-product-icon-theme.json' } }],
|
|
2602
|
+
properties: {
|
|
2603
|
+
id: {
|
|
2604
|
+
description: ( (localize(
|
|
2605
|
+
'vscode.extension.contributes.productIconThemes.id',
|
|
2606
|
+
'Id of the product icon theme as used in the user settings.'
|
|
2607
|
+
))),
|
|
2608
|
+
type: 'string'
|
|
2609
|
+
},
|
|
2610
|
+
label: {
|
|
2611
|
+
description: ( (localize(
|
|
2612
|
+
'vscode.extension.contributes.productIconThemes.label',
|
|
2613
|
+
'Label of the product icon theme as shown in the UI.'
|
|
2614
|
+
))),
|
|
2615
|
+
type: 'string'
|
|
2616
|
+
},
|
|
2617
|
+
path: {
|
|
2618
|
+
description: ( (localize(
|
|
2619
|
+
'vscode.extension.contributes.productIconThemes.path',
|
|
2620
|
+
'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\'.'
|
|
2621
|
+
))),
|
|
2622
|
+
type: 'string'
|
|
2623
|
+
}
|
|
2609
2624
|
},
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
'vscode.extension.contributes.productIconThemes.path',
|
|
2613
|
-
'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\'.'
|
|
2614
|
-
)),
|
|
2615
|
-
type: 'string'
|
|
2616
|
-
}
|
|
2617
|
-
},
|
|
2618
|
-
required: ['path', 'id']
|
|
2625
|
+
required: ['path', 'id']
|
|
2626
|
+
}
|
|
2619
2627
|
}
|
|
2620
|
-
}
|
|
2621
|
-
|
|
2628
|
+
}))
|
|
2629
|
+
);
|
|
2622
2630
|
}
|
|
2623
2631
|
class ThemeRegistry {
|
|
2624
2632
|
constructor(themesExtPoint, create, idRequired = false, builtInTheme = undefined) {
|
|
@@ -2626,7 +2634,7 @@ class ThemeRegistry {
|
|
|
2626
2634
|
this.create = create;
|
|
2627
2635
|
this.idRequired = idRequired;
|
|
2628
2636
|
this.builtInTheme = builtInTheme;
|
|
2629
|
-
this.onDidChangeEmitter = ( new Emitter());
|
|
2637
|
+
this.onDidChangeEmitter = ( (new Emitter()));
|
|
2630
2638
|
this.onDidChange = this.onDidChangeEmitter.event;
|
|
2631
2639
|
this.extensionThemes = [];
|
|
2632
2640
|
this.initialize();
|
|
@@ -2651,47 +2659,47 @@ class ThemeRegistry {
|
|
|
2651
2659
|
delete previousIds[theme.id];
|
|
2652
2660
|
}
|
|
2653
2661
|
}
|
|
2654
|
-
const removed = ( Object.values(previousIds));
|
|
2662
|
+
const removed = ( (Object.values(previousIds)));
|
|
2655
2663
|
this.onDidChangeEmitter.fire({ themes: this.extensionThemes, added, removed });
|
|
2656
2664
|
});
|
|
2657
2665
|
}
|
|
2658
2666
|
onThemes(extensionData, extensionLocation, themeContributions, resultingThemes = [], log) {
|
|
2659
2667
|
if (!Array.isArray(themeContributions)) {
|
|
2660
|
-
log?.error(( localize(
|
|
2668
|
+
log?.error(( (localize(
|
|
2661
2669
|
'reqarray',
|
|
2662
2670
|
"Extension point `{0}` must be an array.",
|
|
2663
2671
|
this.themesExtPoint.name
|
|
2664
|
-
)));
|
|
2672
|
+
))));
|
|
2665
2673
|
return resultingThemes;
|
|
2666
2674
|
}
|
|
2667
2675
|
themeContributions.forEach(theme => {
|
|
2668
2676
|
if (!theme.path || !isString(theme.path)) {
|
|
2669
|
-
log?.error(( localize(
|
|
2677
|
+
log?.error(( (localize(
|
|
2670
2678
|
'reqpath',
|
|
2671
2679
|
"Expected string in `contributes.{0}.path`. Provided value: {1}",
|
|
2672
2680
|
this.themesExtPoint.name,
|
|
2673
2681
|
String(theme.path)
|
|
2674
|
-
)));
|
|
2682
|
+
))));
|
|
2675
2683
|
return;
|
|
2676
2684
|
}
|
|
2677
2685
|
if (this.idRequired && (!theme.id || !isString(theme.id))) {
|
|
2678
|
-
log?.error(( localize(
|
|
2686
|
+
log?.error(( (localize(
|
|
2679
2687
|
'reqid',
|
|
2680
2688
|
"Expected string in `contributes.{0}.id`. Provided value: {1}",
|
|
2681
2689
|
this.themesExtPoint.name,
|
|
2682
2690
|
String(theme.id)
|
|
2683
|
-
)));
|
|
2691
|
+
))));
|
|
2684
2692
|
return;
|
|
2685
2693
|
}
|
|
2686
2694
|
const themeLocation = joinPath(extensionLocation, theme.path);
|
|
2687
2695
|
if (!isEqualOrParent(themeLocation, extensionLocation)) {
|
|
2688
|
-
log?.warn(( localize(
|
|
2696
|
+
log?.warn(( (localize(
|
|
2689
2697
|
'invalid.path.1',
|
|
2690
2698
|
"Expected `contributes.{0}.path` ({1}) to be included inside extension's folder ({2}). This might make the extension non-portable.",
|
|
2691
2699
|
this.themesExtPoint.name,
|
|
2692
2700
|
themeLocation.path,
|
|
2693
2701
|
extensionLocation.path
|
|
2694
|
-
)));
|
|
2702
|
+
))));
|
|
2695
2703
|
}
|
|
2696
2704
|
const themeData = this.create(theme, themeLocation, extensionData);
|
|
2697
2705
|
resultingThemes.push(themeData);
|
|
@@ -2753,87 +2761,87 @@ const DEFAULT_THEME_HC_DARK_SETTING_VALUE = 'Default High Contrast';
|
|
|
2753
2761
|
const DEFAULT_THEME_HC_LIGHT_SETTING_VALUE = 'Default High Contrast Light';
|
|
2754
2762
|
const DEFAULT_FILE_ICON_THEME_SETTING_VALUE = 'vs-seti';
|
|
2755
2763
|
const DEFAULT_PRODUCT_ICON_THEME_SETTING_VALUE = 'Default';
|
|
2756
|
-
const configurationRegistry = ( Registry.as(Extensions
|
|
2764
|
+
const configurationRegistry = ( (Registry.as(Extensions.Configuration)));
|
|
2757
2765
|
const colorThemeSettingEnum = [];
|
|
2758
2766
|
const colorThemeSettingEnumItemLabels = [];
|
|
2759
2767
|
const colorThemeSettingEnumDescriptions = [];
|
|
2760
2768
|
const colorThemeSettingSchema = {
|
|
2761
2769
|
type: 'string',
|
|
2762
|
-
description: ( localize('colorTheme', "Specifies the color theme used in the workbench.")),
|
|
2770
|
+
description: ( (localize('colorTheme', "Specifies the color theme used in the workbench."))),
|
|
2763
2771
|
default: isWeb ? DEFAULT_THEME_LIGHT_SETTING_VALUE : DEFAULT_THEME_DARK_SETTING_VALUE,
|
|
2764
2772
|
enum: colorThemeSettingEnum,
|
|
2765
2773
|
enumDescriptions: colorThemeSettingEnumDescriptions,
|
|
2766
2774
|
enumItemLabels: colorThemeSettingEnumItemLabels,
|
|
2767
|
-
errorMessage: ( localize('colorThemeError', "Theme is unknown or not installed.")),
|
|
2775
|
+
errorMessage: ( (localize('colorThemeError', "Theme is unknown or not installed."))),
|
|
2768
2776
|
};
|
|
2769
2777
|
const preferredDarkThemeSettingSchema = {
|
|
2770
2778
|
type: 'string',
|
|
2771
|
-
markdownDescription: ( localize(
|
|
2779
|
+
markdownDescription: ( (localize(
|
|
2772
2780
|
{ key: 'preferredDarkColorTheme', comment: ['`#{0}#` will become a link to an other setting. Do not remove backtick or #'] },
|
|
2773
2781
|
'Specifies the preferred color theme for dark OS appearance when `#{0}#` is enabled.',
|
|
2774
2782
|
ThemeSettings.DETECT_COLOR_SCHEME
|
|
2775
|
-
)),
|
|
2783
|
+
))),
|
|
2776
2784
|
default: DEFAULT_THEME_DARK_SETTING_VALUE,
|
|
2777
2785
|
enum: colorThemeSettingEnum,
|
|
2778
2786
|
enumDescriptions: colorThemeSettingEnumDescriptions,
|
|
2779
2787
|
enumItemLabels: colorThemeSettingEnumItemLabels,
|
|
2780
|
-
errorMessage: ( localize('colorThemeError', "Theme is unknown or not installed.")),
|
|
2788
|
+
errorMessage: ( (localize('colorThemeError', "Theme is unknown or not installed."))),
|
|
2781
2789
|
};
|
|
2782
2790
|
const preferredLightThemeSettingSchema = {
|
|
2783
2791
|
type: 'string',
|
|
2784
|
-
markdownDescription: ( localize(
|
|
2792
|
+
markdownDescription: ( (localize(
|
|
2785
2793
|
{ key: 'preferredLightColorTheme', comment: ['`#{0}#` will become a link to an other setting. Do not remove backtick or #'] },
|
|
2786
2794
|
'Specifies the preferred color theme for light OS appearance when `#{0}#` is enabled.',
|
|
2787
2795
|
ThemeSettings.DETECT_COLOR_SCHEME
|
|
2788
|
-
)),
|
|
2796
|
+
))),
|
|
2789
2797
|
default: DEFAULT_THEME_LIGHT_SETTING_VALUE,
|
|
2790
2798
|
enum: colorThemeSettingEnum,
|
|
2791
2799
|
enumDescriptions: colorThemeSettingEnumDescriptions,
|
|
2792
2800
|
enumItemLabels: colorThemeSettingEnumItemLabels,
|
|
2793
|
-
errorMessage: ( localize('colorThemeError', "Theme is unknown or not installed.")),
|
|
2801
|
+
errorMessage: ( (localize('colorThemeError', "Theme is unknown or not installed."))),
|
|
2794
2802
|
};
|
|
2795
2803
|
const preferredHCDarkThemeSettingSchema = {
|
|
2796
2804
|
type: 'string',
|
|
2797
|
-
markdownDescription: ( localize(
|
|
2805
|
+
markdownDescription: ( (localize(
|
|
2798
2806
|
{ key: 'preferredHCDarkColorTheme', comment: ['`#{0}#` will become a link to an other setting. Do not remove backtick or #'] },
|
|
2799
2807
|
'Specifies the preferred color theme used in high contrast dark mode when `#{0}#` is enabled.',
|
|
2800
2808
|
ThemeSettings.DETECT_HC
|
|
2801
|
-
)),
|
|
2809
|
+
))),
|
|
2802
2810
|
default: DEFAULT_THEME_HC_DARK_SETTING_VALUE,
|
|
2803
2811
|
enum: colorThemeSettingEnum,
|
|
2804
2812
|
enumDescriptions: colorThemeSettingEnumDescriptions,
|
|
2805
2813
|
enumItemLabels: colorThemeSettingEnumItemLabels,
|
|
2806
|
-
errorMessage: ( localize('colorThemeError', "Theme is unknown or not installed.")),
|
|
2814
|
+
errorMessage: ( (localize('colorThemeError', "Theme is unknown or not installed."))),
|
|
2807
2815
|
};
|
|
2808
2816
|
const preferredHCLightThemeSettingSchema = {
|
|
2809
2817
|
type: 'string',
|
|
2810
|
-
markdownDescription: ( localize(
|
|
2818
|
+
markdownDescription: ( (localize(
|
|
2811
2819
|
{ key: 'preferredHCLightColorTheme', comment: ['`#{0}#` will become a link to an other setting. Do not remove backtick or #'] },
|
|
2812
2820
|
'Specifies the preferred color theme used in high contrast light mode when `#{0}#` is enabled.',
|
|
2813
2821
|
ThemeSettings.DETECT_HC
|
|
2814
|
-
)),
|
|
2822
|
+
))),
|
|
2815
2823
|
default: DEFAULT_THEME_HC_LIGHT_SETTING_VALUE,
|
|
2816
2824
|
enum: colorThemeSettingEnum,
|
|
2817
2825
|
enumDescriptions: colorThemeSettingEnumDescriptions,
|
|
2818
2826
|
enumItemLabels: colorThemeSettingEnumItemLabels,
|
|
2819
|
-
errorMessage: ( localize('colorThemeError', "Theme is unknown or not installed.")),
|
|
2827
|
+
errorMessage: ( (localize('colorThemeError', "Theme is unknown or not installed."))),
|
|
2820
2828
|
};
|
|
2821
2829
|
const detectColorSchemeSettingSchema = {
|
|
2822
2830
|
type: 'boolean',
|
|
2823
|
-
markdownDescription: ( localize(
|
|
2831
|
+
markdownDescription: ( (localize(
|
|
2824
2832
|
'detectColorScheme',
|
|
2825
2833
|
'If set, automatically switch to the preferred color theme based on the OS appearance. If the OS appearance is dark, the theme specified at `#{0}#` is used, for light `#{1}#`.',
|
|
2826
2834
|
ThemeSettings.PREFERRED_DARK_THEME,
|
|
2827
2835
|
ThemeSettings.PREFERRED_LIGHT_THEME
|
|
2828
|
-
)),
|
|
2836
|
+
))),
|
|
2829
2837
|
default: false
|
|
2830
2838
|
};
|
|
2831
2839
|
const colorCustomizationsSchema = {
|
|
2832
2840
|
type: 'object',
|
|
2833
|
-
description: ( localize(
|
|
2841
|
+
description: ( (localize(
|
|
2834
2842
|
'workbenchColors',
|
|
2835
2843
|
"Overrides colors from the currently selected color theme."
|
|
2836
|
-
)),
|
|
2844
|
+
))),
|
|
2837
2845
|
allOf: [{ $ref: workbenchColorsSchemaId }],
|
|
2838
2846
|
default: {},
|
|
2839
2847
|
defaultSnippets: [{
|
|
@@ -2843,33 +2851,33 @@ const colorCustomizationsSchema = {
|
|
|
2843
2851
|
const fileIconThemeSettingSchema = {
|
|
2844
2852
|
type: ['string', 'null'],
|
|
2845
2853
|
default: DEFAULT_FILE_ICON_THEME_SETTING_VALUE,
|
|
2846
|
-
description: ( localize(
|
|
2854
|
+
description: ( (localize(
|
|
2847
2855
|
'iconTheme',
|
|
2848
2856
|
"Specifies the file icon theme used in the workbench or 'null' to not show any file icons."
|
|
2849
|
-
)),
|
|
2857
|
+
))),
|
|
2850
2858
|
enum: [null],
|
|
2851
|
-
enumItemLabels: [( localize('noIconThemeLabel', 'None'))],
|
|
2852
|
-
enumDescriptions: [( localize('noIconThemeDesc', 'No file icons'))],
|
|
2853
|
-
errorMessage: ( localize('iconThemeError', "File icon theme is unknown or not installed."))
|
|
2859
|
+
enumItemLabels: [( (localize('noIconThemeLabel', 'None')))],
|
|
2860
|
+
enumDescriptions: [( (localize('noIconThemeDesc', 'No file icons')))],
|
|
2861
|
+
errorMessage: ( (localize('iconThemeError', "File icon theme is unknown or not installed.")))
|
|
2854
2862
|
};
|
|
2855
2863
|
const productIconThemeSettingSchema = {
|
|
2856
2864
|
type: ['string', 'null'],
|
|
2857
2865
|
default: DEFAULT_PRODUCT_ICON_THEME_SETTING_VALUE,
|
|
2858
|
-
description: ( localize('productIconTheme', "Specifies the product icon theme used.")),
|
|
2866
|
+
description: ( (localize('productIconTheme', "Specifies the product icon theme used."))),
|
|
2859
2867
|
enum: [DEFAULT_PRODUCT_ICON_THEME_SETTING_VALUE],
|
|
2860
|
-
enumItemLabels: [( localize('defaultProductIconThemeLabel', 'Default'))],
|
|
2861
|
-
enumDescriptions: [( localize('defaultProductIconThemeDesc', 'Default'))],
|
|
2862
|
-
errorMessage: ( localize('productIconThemeError', "Product icon theme is unknown or not installed."))
|
|
2868
|
+
enumItemLabels: [( (localize('defaultProductIconThemeLabel', 'Default')))],
|
|
2869
|
+
enumDescriptions: [( (localize('defaultProductIconThemeDesc', 'Default')))],
|
|
2870
|
+
errorMessage: ( (localize('productIconThemeError', "Product icon theme is unknown or not installed.")))
|
|
2863
2871
|
};
|
|
2864
2872
|
const detectHCSchemeSettingSchema = {
|
|
2865
2873
|
type: 'boolean',
|
|
2866
2874
|
default: true,
|
|
2867
|
-
markdownDescription: ( localize(
|
|
2875
|
+
markdownDescription: ( (localize(
|
|
2868
2876
|
'autoDetectHighContrast',
|
|
2869
2877
|
"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}#`",
|
|
2870
2878
|
ThemeSettings.PREFERRED_HC_DARK_THEME,
|
|
2871
2879
|
ThemeSettings.PREFERRED_HC_LIGHT_THEME
|
|
2872
|
-
)),
|
|
2880
|
+
))),
|
|
2873
2881
|
scope: 1
|
|
2874
2882
|
};
|
|
2875
2883
|
const themeSettingsConfiguration = {
|
|
@@ -2908,52 +2916,52 @@ const themeSpecificSettingKey = '^\\[[^\\]]*(\\]\\s*\\[[^\\]]*)*\\]$';
|
|
|
2908
2916
|
const tokenColorSchema = {
|
|
2909
2917
|
type: 'object',
|
|
2910
2918
|
properties: {
|
|
2911
|
-
comments: tokenGroupSettings(( localize('editorColors.comments', "Sets the colors and styles for comments"))),
|
|
2912
|
-
strings: tokenGroupSettings(( localize('editorColors.strings', "Sets the colors and styles for strings literals."))),
|
|
2913
|
-
keywords: tokenGroupSettings(( localize('editorColors.keywords', "Sets the colors and styles for keywords."))),
|
|
2914
|
-
numbers: tokenGroupSettings(( localize('editorColors.numbers', "Sets the colors and styles for number literals."))),
|
|
2915
|
-
types: tokenGroupSettings(( localize(
|
|
2919
|
+
comments: tokenGroupSettings(( (localize('editorColors.comments', "Sets the colors and styles for comments")))),
|
|
2920
|
+
strings: tokenGroupSettings(( (localize('editorColors.strings', "Sets the colors and styles for strings literals.")))),
|
|
2921
|
+
keywords: tokenGroupSettings(( (localize('editorColors.keywords', "Sets the colors and styles for keywords.")))),
|
|
2922
|
+
numbers: tokenGroupSettings(( (localize('editorColors.numbers', "Sets the colors and styles for number literals.")))),
|
|
2923
|
+
types: tokenGroupSettings(( (localize(
|
|
2916
2924
|
'editorColors.types',
|
|
2917
2925
|
"Sets the colors and styles for type declarations and references."
|
|
2918
|
-
))),
|
|
2919
|
-
functions: tokenGroupSettings(( localize(
|
|
2926
|
+
)))),
|
|
2927
|
+
functions: tokenGroupSettings(( (localize(
|
|
2920
2928
|
'editorColors.functions',
|
|
2921
2929
|
"Sets the colors and styles for functions declarations and references."
|
|
2922
|
-
))),
|
|
2923
|
-
variables: tokenGroupSettings(( localize(
|
|
2930
|
+
)))),
|
|
2931
|
+
variables: tokenGroupSettings(( (localize(
|
|
2924
2932
|
'editorColors.variables',
|
|
2925
2933
|
"Sets the colors and styles for variables declarations and references."
|
|
2926
|
-
))),
|
|
2934
|
+
)))),
|
|
2927
2935
|
textMateRules: {
|
|
2928
|
-
description: ( localize(
|
|
2936
|
+
description: ( (localize(
|
|
2929
2937
|
'editorColors.textMateRules',
|
|
2930
2938
|
'Sets colors and styles using textmate theming rules (advanced).'
|
|
2931
|
-
)),
|
|
2939
|
+
))),
|
|
2932
2940
|
$ref: textmateColorsSchemaId
|
|
2933
2941
|
},
|
|
2934
2942
|
semanticHighlighting: {
|
|
2935
|
-
description: ( localize(
|
|
2943
|
+
description: ( (localize(
|
|
2936
2944
|
'editorColors.semanticHighlighting',
|
|
2937
2945
|
'Whether semantic highlighting should be enabled for this theme.'
|
|
2938
|
-
)),
|
|
2939
|
-
deprecationMessage: ( localize(
|
|
2946
|
+
))),
|
|
2947
|
+
deprecationMessage: ( (localize(
|
|
2940
2948
|
'editorColors.semanticHighlighting.deprecationMessage',
|
|
2941
2949
|
'Use `enabled` in `editor.semanticTokenColorCustomizations` setting instead.'
|
|
2942
|
-
)),
|
|
2943
|
-
markdownDeprecationMessage: ( localize(
|
|
2950
|
+
))),
|
|
2951
|
+
markdownDeprecationMessage: ( (localize(
|
|
2944
2952
|
'editorColors.semanticHighlighting.deprecationMessageMarkdown',
|
|
2945
2953
|
'Use `enabled` in `#editor.semanticTokenColorCustomizations#` setting instead.'
|
|
2946
|
-
)),
|
|
2954
|
+
))),
|
|
2947
2955
|
type: 'boolean'
|
|
2948
2956
|
}
|
|
2949
2957
|
},
|
|
2950
2958
|
additionalProperties: false
|
|
2951
2959
|
};
|
|
2952
2960
|
const tokenColorCustomizationSchema = {
|
|
2953
|
-
description: ( localize(
|
|
2961
|
+
description: ( (localize(
|
|
2954
2962
|
'editorColors',
|
|
2955
2963
|
"Overrides editor syntax colors and font style from the currently selected color theme."
|
|
2956
|
-
)),
|
|
2964
|
+
))),
|
|
2957
2965
|
default: {},
|
|
2958
2966
|
allOf: [{ ...tokenColorSchema, patternProperties: { '^\\[': {} } }]
|
|
2959
2967
|
};
|
|
@@ -2962,28 +2970,28 @@ const semanticTokenColorSchema = {
|
|
|
2962
2970
|
properties: {
|
|
2963
2971
|
enabled: {
|
|
2964
2972
|
type: 'boolean',
|
|
2965
|
-
description: ( localize(
|
|
2973
|
+
description: ( (localize(
|
|
2966
2974
|
'editorColors.semanticHighlighting.enabled',
|
|
2967
2975
|
'Whether semantic highlighting is enabled or disabled for this theme'
|
|
2968
|
-
)),
|
|
2976
|
+
))),
|
|
2969
2977
|
suggestSortText: '0_enabled'
|
|
2970
2978
|
},
|
|
2971
2979
|
rules: {
|
|
2972
2980
|
$ref: tokenStylingSchemaId,
|
|
2973
|
-
description: ( localize(
|
|
2981
|
+
description: ( (localize(
|
|
2974
2982
|
'editorColors.semanticHighlighting.rules',
|
|
2975
2983
|
'Semantic token styling rules for this theme.'
|
|
2976
|
-
)),
|
|
2984
|
+
))),
|
|
2977
2985
|
suggestSortText: '0_rules'
|
|
2978
2986
|
}
|
|
2979
2987
|
},
|
|
2980
2988
|
additionalProperties: false
|
|
2981
2989
|
};
|
|
2982
2990
|
const semanticTokenColorCustomizationSchema = {
|
|
2983
|
-
description: ( localize(
|
|
2991
|
+
description: ( (localize(
|
|
2984
2992
|
'semanticTokenColors',
|
|
2985
2993
|
"Overrides editor semantic token color and styles from the currently selected color theme."
|
|
2986
|
-
)),
|
|
2994
|
+
))),
|
|
2987
2995
|
default: {},
|
|
2988
2996
|
allOf: [{ ...semanticTokenColorSchema, patternProperties: { '^\\[': {} } }]
|
|
2989
2997
|
};
|
|
@@ -3113,7 +3121,7 @@ class ThemeConfiguration {
|
|
|
3113
3121
|
const DEFAULT_PRODUCT_ICON_THEME_ID = '';
|
|
3114
3122
|
class ProductIconThemeData {
|
|
3115
3123
|
constructor(id, label, settingsId) {
|
|
3116
|
-
this.iconThemeDocument = { iconDefinitions: ( new Map()) };
|
|
3124
|
+
this.iconThemeDocument = { iconDefinitions: ( (new Map())) };
|
|
3117
3125
|
this.id = id;
|
|
3118
3126
|
this.label = label;
|
|
3119
3127
|
this.settingsId = settingsId;
|
|
@@ -3137,12 +3145,12 @@ class ProductIconThemeData {
|
|
|
3137
3145
|
this.iconThemeDocument = await _loadProductIconThemeDocument(fileService, location, warnings);
|
|
3138
3146
|
this.isLoaded = true;
|
|
3139
3147
|
if (warnings.length) {
|
|
3140
|
-
logService.error(( localize(
|
|
3148
|
+
logService.error(( (localize(
|
|
3141
3149
|
'error.parseicondefs',
|
|
3142
3150
|
"Problems processing product icons definitions in {0}:\n{1}",
|
|
3143
|
-
|
|
3151
|
+
(location.toString()),
|
|
3144
3152
|
warnings.join('\n')
|
|
3145
|
-
)));
|
|
3153
|
+
))));
|
|
3146
3154
|
}
|
|
3147
3155
|
return this.styleSheetContent;
|
|
3148
3156
|
}
|
|
@@ -3150,7 +3158,7 @@ class ProductIconThemeData {
|
|
|
3150
3158
|
const id = extensionData.extensionId + '-' + iconTheme.id;
|
|
3151
3159
|
const label = iconTheme.label || basename(iconTheme.path);
|
|
3152
3160
|
const settingsId = iconTheme.id;
|
|
3153
|
-
const themeData = ( new ProductIconThemeData(id, label, settingsId));
|
|
3161
|
+
const themeData = ( (new ProductIconThemeData(id, label, settingsId)));
|
|
3154
3162
|
themeData.description = iconTheme.description;
|
|
3155
3163
|
themeData.location = iconThemeLocation;
|
|
3156
3164
|
themeData.extensionData = extensionData;
|
|
@@ -3159,7 +3167,7 @@ class ProductIconThemeData {
|
|
|
3159
3167
|
return themeData;
|
|
3160
3168
|
}
|
|
3161
3169
|
static createUnloadedTheme(id) {
|
|
3162
|
-
const themeData = ( new ProductIconThemeData(id, '', '__' + id));
|
|
3170
|
+
const themeData = ( (new ProductIconThemeData(id, '', '__' + id)));
|
|
3163
3171
|
themeData.isLoaded = false;
|
|
3164
3172
|
themeData.extensionData = undefined;
|
|
3165
3173
|
themeData.watch = false;
|
|
@@ -3168,7 +3176,11 @@ class ProductIconThemeData {
|
|
|
3168
3176
|
static get defaultTheme() {
|
|
3169
3177
|
let themeData = ProductIconThemeData._defaultProductIconTheme;
|
|
3170
3178
|
if (!themeData) {
|
|
3171
|
-
themeData = ProductIconThemeData._defaultProductIconTheme = ( new ProductIconThemeData(
|
|
3179
|
+
themeData = ProductIconThemeData._defaultProductIconTheme = ( (new ProductIconThemeData(
|
|
3180
|
+
DEFAULT_PRODUCT_ICON_THEME_ID,
|
|
3181
|
+
(localize('defaultTheme', 'Default')),
|
|
3182
|
+
DEFAULT_PRODUCT_ICON_THEME_SETTING_VALUE
|
|
3183
|
+
)));
|
|
3172
3184
|
themeData.isLoaded = true;
|
|
3173
3185
|
themeData.extensionData = undefined;
|
|
3174
3186
|
themeData.watch = false;
|
|
@@ -3182,7 +3194,7 @@ class ProductIconThemeData {
|
|
|
3182
3194
|
}
|
|
3183
3195
|
try {
|
|
3184
3196
|
const data = JSON.parse(input);
|
|
3185
|
-
const theme = ( new ProductIconThemeData('', '', ''));
|
|
3197
|
+
const theme = ( (new ProductIconThemeData('', '', '')));
|
|
3186
3198
|
for (const key in data) {
|
|
3187
3199
|
switch (key) {
|
|
3188
3200
|
case 'id':
|
|
@@ -3202,7 +3214,7 @@ class ProductIconThemeData {
|
|
|
3202
3214
|
}
|
|
3203
3215
|
const { iconDefinitions, iconFontDefinitions } = data;
|
|
3204
3216
|
if (Array.isArray(iconDefinitions) && isObject(iconFontDefinitions)) {
|
|
3205
|
-
const restoredIconDefinitions = ( new Map());
|
|
3217
|
+
const restoredIconDefinitions = ( (new Map()));
|
|
3206
3218
|
for (const entry of iconDefinitions) {
|
|
3207
3219
|
const { id, fontCharacter, fontId } = entry;
|
|
3208
3220
|
if (isString(id) && isString(fontCharacter)) {
|
|
@@ -3256,26 +3268,26 @@ function _loadProductIconThemeDocument(fileService, location, warnings) {
|
|
|
3256
3268
|
const parseErrors = [];
|
|
3257
3269
|
const contentValue = parse$1(content, parseErrors);
|
|
3258
3270
|
if (parseErrors.length > 0) {
|
|
3259
|
-
return Promise.reject(( new Error((
|
|
3271
|
+
return Promise.reject(( (new Error( (localize(
|
|
3260
3272
|
'error.cannotparseicontheme',
|
|
3261
3273
|
"Problems parsing product icons file: {0}",
|
|
3262
3274
|
parseErrors.map(e => getParseErrorMessage(e.error)).join(', ')
|
|
3263
|
-
)))));
|
|
3275
|
+
))))));
|
|
3264
3276
|
}
|
|
3265
3277
|
else if (getNodeType(contentValue) !== 'object') {
|
|
3266
|
-
return Promise.reject(( new Error((
|
|
3278
|
+
return Promise.reject(( (new Error( (localize(
|
|
3267
3279
|
'error.invalidformat',
|
|
3268
3280
|
"Invalid format for product icons theme file: Object expected."
|
|
3269
|
-
)))));
|
|
3281
|
+
))))));
|
|
3270
3282
|
}
|
|
3271
3283
|
else if (!contentValue.iconDefinitions || !Array.isArray(contentValue.fonts) || !contentValue.fonts.length) {
|
|
3272
|
-
return Promise.reject(( new Error((
|
|
3284
|
+
return Promise.reject(( (new Error( (localize(
|
|
3273
3285
|
'error.missingProperties',
|
|
3274
3286
|
"Invalid format for product icons theme file: Must contain iconDefinitions and fonts."
|
|
3275
|
-
)))));
|
|
3287
|
+
))))));
|
|
3276
3288
|
}
|
|
3277
3289
|
const iconThemeDocumentLocationDirname = dirname(location);
|
|
3278
|
-
const sanitizedFonts = ( new Map());
|
|
3290
|
+
const sanitizedFonts = ( (new Map()));
|
|
3279
3291
|
for (const font of contentValue.fonts) {
|
|
3280
3292
|
if (isString(font.id) && font.id.match(fontIdRegex)) {
|
|
3281
3293
|
const fontId = font.id;
|
|
@@ -3284,22 +3296,22 @@ function _loadProductIconThemeDocument(fileService, location, warnings) {
|
|
|
3284
3296
|
fontWeight = font.weight;
|
|
3285
3297
|
}
|
|
3286
3298
|
else {
|
|
3287
|
-
warnings.push(( localize(
|
|
3299
|
+
warnings.push(( (localize(
|
|
3288
3300
|
'error.fontWeight',
|
|
3289
3301
|
'Invalid font weight in font \'{0}\'. Ignoring setting.',
|
|
3290
3302
|
font.id
|
|
3291
|
-
)));
|
|
3303
|
+
))));
|
|
3292
3304
|
}
|
|
3293
3305
|
let fontStyle = undefined;
|
|
3294
3306
|
if (isString(font.style) && font.style.match(fontStyleRegex)) {
|
|
3295
3307
|
fontStyle = font.style;
|
|
3296
3308
|
}
|
|
3297
3309
|
else {
|
|
3298
|
-
warnings.push(( localize(
|
|
3310
|
+
warnings.push(( (localize(
|
|
3299
3311
|
'error.fontStyle',
|
|
3300
3312
|
'Invalid font style in font \'{0}\'. Ignoring setting.',
|
|
3301
3313
|
font.id
|
|
3302
|
-
)));
|
|
3314
|
+
))));
|
|
3303
3315
|
}
|
|
3304
3316
|
const sanitizedSrc = [];
|
|
3305
3317
|
if (Array.isArray(font.src)) {
|
|
@@ -3309,11 +3321,11 @@ function _loadProductIconThemeDocument(fileService, location, warnings) {
|
|
|
3309
3321
|
sanitizedSrc.push({ location: iconFontLocation, format: s.format });
|
|
3310
3322
|
}
|
|
3311
3323
|
else {
|
|
3312
|
-
warnings.push(( localize(
|
|
3324
|
+
warnings.push(( (localize(
|
|
3313
3325
|
'error.fontSrc',
|
|
3314
3326
|
'Invalid font source in font \'{0}\'. Ignoring source.',
|
|
3315
3327
|
font.id
|
|
3316
|
-
)));
|
|
3328
|
+
))));
|
|
3317
3329
|
}
|
|
3318
3330
|
}
|
|
3319
3331
|
}
|
|
@@ -3321,22 +3333,22 @@ function _loadProductIconThemeDocument(fileService, location, warnings) {
|
|
|
3321
3333
|
sanitizedFonts.set(fontId, { weight: fontWeight, style: fontStyle, src: sanitizedSrc });
|
|
3322
3334
|
}
|
|
3323
3335
|
else {
|
|
3324
|
-
warnings.push(( localize(
|
|
3336
|
+
warnings.push(( (localize(
|
|
3325
3337
|
'error.noFontSrc',
|
|
3326
3338
|
'No valid font source in font \'{0}\'. Ignoring font definition.',
|
|
3327
3339
|
font.id
|
|
3328
|
-
)));
|
|
3340
|
+
))));
|
|
3329
3341
|
}
|
|
3330
3342
|
}
|
|
3331
3343
|
else {
|
|
3332
|
-
warnings.push(( localize(
|
|
3344
|
+
warnings.push(( (localize(
|
|
3333
3345
|
'error.fontId',
|
|
3334
3346
|
'Missing or invalid font id \'{0}\'. Skipping font definition.',
|
|
3335
3347
|
font.id
|
|
3336
|
-
)));
|
|
3348
|
+
))));
|
|
3337
3349
|
}
|
|
3338
3350
|
}
|
|
3339
|
-
const iconDefinitions = ( new Map());
|
|
3351
|
+
const iconDefinitions = ( (new Map()));
|
|
3340
3352
|
const primaryFontId = contentValue.fonts[0].id;
|
|
3341
3353
|
for (const iconId in contentValue.iconDefinitions) {
|
|
3342
3354
|
const definition = contentValue.iconDefinitions[iconId];
|
|
@@ -3348,19 +3360,19 @@ function _loadProductIconThemeDocument(fileService, location, warnings) {
|
|
|
3348
3360
|
iconDefinitions.set(iconId, { fontCharacter: definition.fontCharacter, font });
|
|
3349
3361
|
}
|
|
3350
3362
|
else {
|
|
3351
|
-
warnings.push(( localize(
|
|
3363
|
+
warnings.push(( (localize(
|
|
3352
3364
|
'error.icon.font',
|
|
3353
3365
|
'Skipping icon definition \'{0}\'. Unknown font.',
|
|
3354
3366
|
iconId
|
|
3355
|
-
)));
|
|
3367
|
+
))));
|
|
3356
3368
|
}
|
|
3357
3369
|
}
|
|
3358
3370
|
else {
|
|
3359
|
-
warnings.push(( localize(
|
|
3371
|
+
warnings.push(( (localize(
|
|
3360
3372
|
'error.icon.fontCharacter',
|
|
3361
3373
|
'Skipping icon definition \'{0}\'. Unknown fontCharacter.',
|
|
3362
3374
|
iconId
|
|
3363
|
-
)));
|
|
3375
|
+
))));
|
|
3364
3376
|
}
|
|
3365
3377
|
}
|
|
3366
3378
|
return { iconDefinitions };
|
|
@@ -3399,7 +3411,7 @@ const fileIconsEnabledClass = 'file-icons-enabled';
|
|
|
3399
3411
|
const colorThemeRulesClassName = 'contributedColorTheme';
|
|
3400
3412
|
const fileIconThemeRulesClassName = 'contributedFileIconTheme';
|
|
3401
3413
|
const productIconThemeRulesClassName = 'contributedProductIconTheme';
|
|
3402
|
-
const themingRegistry = ( Registry.as(Extensions$3.ThemingContribution));
|
|
3414
|
+
const themingRegistry = ( (Registry.as(Extensions$3.ThemingContribution)));
|
|
3403
3415
|
function validateThemeId(theme) {
|
|
3404
3416
|
switch (theme) {
|
|
3405
3417
|
case VS_LIGHT_THEME: return `vs ${defaultThemeExtensionId}-themes-light_vs-json`;
|
|
@@ -3424,43 +3436,43 @@ let WorkbenchThemeService = class WorkbenchThemeService {
|
|
|
3424
3436
|
this.hostColorService = hostColorService;
|
|
3425
3437
|
this.userDataInitializationService = userDataInitializationService;
|
|
3426
3438
|
this.languageService = languageService;
|
|
3427
|
-
this.themeExtensionsActivated = ( new Map());
|
|
3439
|
+
this.themeExtensionsActivated = ( (new Map()));
|
|
3428
3440
|
this.container = layoutService.container;
|
|
3429
|
-
this.settings = ( new ThemeConfiguration(configurationService));
|
|
3430
|
-
this.colorThemeRegistry = ( new ThemeRegistry(colorThemesExtPoint, ColorThemeData.fromExtensionTheme));
|
|
3431
|
-
this.colorThemeWatcher = ( new ThemeFileWatcher(fileService, environmentService, this.reloadCurrentColorTheme.bind(this)));
|
|
3432
|
-
this.onColorThemeChange = ( new Emitter({ leakWarningThreshold: 400 }));
|
|
3441
|
+
this.settings = ( (new ThemeConfiguration(configurationService)));
|
|
3442
|
+
this.colorThemeRegistry = ( (new ThemeRegistry(colorThemesExtPoint, ColorThemeData.fromExtensionTheme)));
|
|
3443
|
+
this.colorThemeWatcher = ( (new ThemeFileWatcher(fileService, environmentService, this.reloadCurrentColorTheme.bind(this))));
|
|
3444
|
+
this.onColorThemeChange = ( (new Emitter({ leakWarningThreshold: 400 })));
|
|
3433
3445
|
this.currentColorTheme = ColorThemeData.createUnloadedTheme('');
|
|
3434
|
-
this.colorThemeSequencer = ( new Sequencer());
|
|
3435
|
-
this.fileIconThemeWatcher = ( new ThemeFileWatcher(
|
|
3446
|
+
this.colorThemeSequencer = ( (new Sequencer()));
|
|
3447
|
+
this.fileIconThemeWatcher = ( (new ThemeFileWatcher(
|
|
3436
3448
|
fileService,
|
|
3437
3449
|
environmentService,
|
|
3438
3450
|
this.reloadCurrentFileIconTheme.bind(this)
|
|
3439
|
-
));
|
|
3440
|
-
this.fileIconThemeRegistry = ( new ThemeRegistry(
|
|
3451
|
+
)));
|
|
3452
|
+
this.fileIconThemeRegistry = ( (new ThemeRegistry(
|
|
3441
3453
|
fileIconThemesExtPoint,
|
|
3442
3454
|
FileIconThemeData.fromExtensionTheme,
|
|
3443
3455
|
true,
|
|
3444
3456
|
FileIconThemeData.noIconTheme
|
|
3445
|
-
));
|
|
3446
|
-
this.fileIconThemeLoader = ( new FileIconThemeLoader(extensionResourceLoaderService, languageService));
|
|
3447
|
-
this.onFileIconThemeChange = ( new Emitter({ leakWarningThreshold: 400 }));
|
|
3457
|
+
)));
|
|
3458
|
+
this.fileIconThemeLoader = ( (new FileIconThemeLoader(extensionResourceLoaderService, languageService)));
|
|
3459
|
+
this.onFileIconThemeChange = ( (new Emitter({ leakWarningThreshold: 400 })));
|
|
3448
3460
|
this.currentFileIconTheme = FileIconThemeData.createUnloadedTheme('');
|
|
3449
|
-
this.fileIconThemeSequencer = ( new Sequencer());
|
|
3450
|
-
this.productIconThemeWatcher = ( new ThemeFileWatcher(
|
|
3461
|
+
this.fileIconThemeSequencer = ( (new Sequencer()));
|
|
3462
|
+
this.productIconThemeWatcher = ( (new ThemeFileWatcher(
|
|
3451
3463
|
fileService,
|
|
3452
3464
|
environmentService,
|
|
3453
3465
|
this.reloadCurrentProductIconTheme.bind(this)
|
|
3454
|
-
));
|
|
3455
|
-
this.productIconThemeRegistry = ( new ThemeRegistry(
|
|
3466
|
+
)));
|
|
3467
|
+
this.productIconThemeRegistry = ( (new ThemeRegistry(
|
|
3456
3468
|
productIconThemesExtPoint,
|
|
3457
3469
|
ProductIconThemeData.fromExtensionTheme,
|
|
3458
3470
|
true,
|
|
3459
3471
|
ProductIconThemeData.defaultTheme
|
|
3460
|
-
));
|
|
3461
|
-
this.onProductIconThemeChange = ( new Emitter());
|
|
3472
|
+
)));
|
|
3473
|
+
this.onProductIconThemeChange = ( (new Emitter()));
|
|
3462
3474
|
this.currentProductIconTheme = ProductIconThemeData.createUnloadedTheme('');
|
|
3463
|
-
this.productIconThemeSequencer = ( new Sequencer());
|
|
3475
|
+
this.productIconThemeSequencer = ( (new Sequencer()));
|
|
3464
3476
|
let themeData = ColorThemeData.fromStorageData(this.storageService);
|
|
3465
3477
|
if (themeData && this.settings.colorTheme !== themeData.settingsId && this.settings.isDefaultColorTheme()) {
|
|
3466
3478
|
themeData = undefined;
|
|
@@ -3500,7 +3512,7 @@ let WorkbenchThemeService = class WorkbenchThemeService {
|
|
|
3500
3512
|
function updateAll() {
|
|
3501
3513
|
codiconStyleSheet.textContent = iconsStyleSheet.getCSS();
|
|
3502
3514
|
}
|
|
3503
|
-
const delayer = ( new RunOnceScheduler(updateAll, 0));
|
|
3515
|
+
const delayer = ( (new RunOnceScheduler(updateAll, 0)));
|
|
3504
3516
|
iconsStyleSheet.onDidChange(() => delayer.schedule());
|
|
3505
3517
|
delayer.schedule();
|
|
3506
3518
|
}
|
|
@@ -3799,7 +3811,7 @@ let WorkbenchThemeService = class WorkbenchThemeService {
|
|
|
3799
3811
|
});
|
|
3800
3812
|
}
|
|
3801
3813
|
updateDynamicCSSRules(themeData) {
|
|
3802
|
-
const cssRules = ( new Set());
|
|
3814
|
+
const cssRules = ( (new Set()));
|
|
3803
3815
|
const ruleCollector = {
|
|
3804
3816
|
addRule: (rule) => {
|
|
3805
3817
|
if (!cssRules.has(rule)) {
|
|
@@ -3813,7 +3825,7 @@ let WorkbenchThemeService = class WorkbenchThemeService {
|
|
|
3813
3825
|
for (const item of getColorRegistry().getColors()) {
|
|
3814
3826
|
const color = themeData.getColor(item.id, true);
|
|
3815
3827
|
if (color) {
|
|
3816
|
-
colorVariables.push(`${asCssVariableName(item.id)}: ${( color.toString())};`);
|
|
3828
|
+
colorVariables.push(`${asCssVariableName(item.id)}: ${( ( color.toString()))};`);
|
|
3817
3829
|
}
|
|
3818
3830
|
}
|
|
3819
3831
|
ruleCollector.addRule(`.monaco-workbench { ${colorVariables.join('\n')} }`);
|
|
@@ -4034,20 +4046,20 @@ let WorkbenchThemeService = class WorkbenchThemeService {
|
|
|
4034
4046
|
}
|
|
4035
4047
|
}
|
|
4036
4048
|
};
|
|
4037
|
-
WorkbenchThemeService = ( __decorate([
|
|
4038
|
-
( __param(0, IExtensionService)),
|
|
4039
|
-
( __param(1, IStorageService)),
|
|
4040
|
-
( __param(2, IConfigurationService)),
|
|
4041
|
-
( __param(3, ITelemetryService)),
|
|
4042
|
-
( __param(4, IBrowserWorkbenchEnvironmentService)),
|
|
4043
|
-
( __param(5, IFileService)),
|
|
4044
|
-
( __param(6, IExtensionResourceLoaderService)),
|
|
4045
|
-
( __param(7, IWorkbenchLayoutService)),
|
|
4046
|
-
( __param(8, ILogService)),
|
|
4047
|
-
( __param(9, IHostColorSchemeService)),
|
|
4048
|
-
( __param(10, IUserDataInitializationService)),
|
|
4049
|
-
( __param(11, ILanguageService))
|
|
4050
|
-
], WorkbenchThemeService));
|
|
4049
|
+
WorkbenchThemeService = ( (__decorate([
|
|
4050
|
+
( (__param(0, IExtensionService))),
|
|
4051
|
+
( (__param(1, IStorageService))),
|
|
4052
|
+
( (__param(2, IConfigurationService))),
|
|
4053
|
+
( (__param(3, ITelemetryService))),
|
|
4054
|
+
( (__param(4, IBrowserWorkbenchEnvironmentService))),
|
|
4055
|
+
( (__param(5, IFileService))),
|
|
4056
|
+
( (__param(6, IExtensionResourceLoaderService))),
|
|
4057
|
+
( (__param(7, IWorkbenchLayoutService))),
|
|
4058
|
+
( (__param(8, ILogService))),
|
|
4059
|
+
( (__param(9, IHostColorSchemeService))),
|
|
4060
|
+
( (__param(10, IUserDataInitializationService))),
|
|
4061
|
+
( (__param(11, ILanguageService)))
|
|
4062
|
+
], WorkbenchThemeService)));
|
|
4051
4063
|
class ThemeFileWatcher {
|
|
4052
4064
|
constructor(fileService, environmentService, onUpdate) {
|
|
4053
4065
|
this.fileService = fileService;
|
|
@@ -4109,7 +4121,7 @@ const DEFAULT_THEME_EXTENSION = {
|
|
|
4109
4121
|
isBuiltin: true,
|
|
4110
4122
|
isUserBuiltin: true,
|
|
4111
4123
|
isUnderDevelopment: false,
|
|
4112
|
-
extensionLocation: URI.from({ scheme: 'extension', path: '/' }),
|
|
4124
|
+
extensionLocation: ( URI.from({ scheme: 'extension', path: '/' })),
|
|
4113
4125
|
name: 'theme-defaults',
|
|
4114
4126
|
publisher: 'vscode',
|
|
4115
4127
|
version: '1.0.0',
|
|
@@ -4150,7 +4162,7 @@ function setDefaultThemes(_themes, getContent) {
|
|
|
4150
4162
|
function getServiceOverride() {
|
|
4151
4163
|
return {
|
|
4152
4164
|
...getServiceOverride$1(),
|
|
4153
|
-
[IThemeService.toString()]: new SyncDescriptor(StandaloneWorkbenchThemeService)
|
|
4165
|
+
[( IThemeService.toString())]: new SyncDescriptor(StandaloneWorkbenchThemeService)
|
|
4154
4166
|
};
|
|
4155
4167
|
}
|
|
4156
4168
|
export { getServiceOverride as default, setDefaultThemes, setThemes };
|