@codingame/monaco-vscode-theme-service-override 1.82.4 → 1.82.5-next.1
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/external/tslib/tslib.es6.js +11 -0
- package/index.d.ts +1 -1
- package/index.js +1 -1
- package/package.json +2 -2
- package/theme.d.ts +7 -0
- package/theme.js +27 -0
- package/vscode/src/vs/workbench/services/themes/browser/fileIconThemeData.js +355 -0
- package/vscode/src/vs/workbench/services/themes/browser/productIconThemeData.js +292 -0
- package/vscode/src/vs/workbench/services/themes/browser/workbenchThemeService.js +744 -0
- package/vscode/src/vs/workbench/services/themes/common/colorThemeData.js +866 -0
- package/vscode/src/vs/workbench/services/themes/common/colorThemeSchema.js +267 -0
- package/vscode/src/vs/workbench/services/themes/common/fileIconThemeSchema.js +305 -0
- package/vscode/src/vs/workbench/services/themes/common/plistParser.js +440 -0
- package/vscode/src/vs/workbench/services/themes/common/productIconThemeSchema.js +96 -0
- package/vscode/src/vs/workbench/services/themes/common/textMateScopeMatcher.js +121 -0
- package/vscode/src/vs/workbench/services/themes/common/themeCompatibility.js +68 -0
- package/vscode/src/vs/workbench/services/themes/common/themeConfiguration.js +374 -0
- package/vscode/src/vs/workbench/services/themes/common/themeExtensionPoints.js +256 -0
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
import * as nls from 'monaco-editor/esm/vs/nls.js';
|
|
2
|
+
import { Registry } from 'monaco-editor/esm/vs/platform/registry/common/platform.js';
|
|
3
|
+
import { Extensions } from 'monaco-editor/esm/vs/platform/jsonschemas/common/jsonContributionRegistry.js';
|
|
4
|
+
import { workbenchColorsSchemaId } from 'monaco-editor/esm/vs/platform/theme/common/colorRegistry.js';
|
|
5
|
+
import { tokenStylingSchemaId } from 'vscode/vscode/vs/platform/theme/common/tokenClassificationRegistry';
|
|
6
|
+
|
|
7
|
+
const textMateScopes = [
|
|
8
|
+
'comment',
|
|
9
|
+
'comment.block',
|
|
10
|
+
'comment.block.documentation',
|
|
11
|
+
'comment.line',
|
|
12
|
+
'constant',
|
|
13
|
+
'constant.character',
|
|
14
|
+
'constant.character.escape',
|
|
15
|
+
'constant.numeric',
|
|
16
|
+
'constant.numeric.integer',
|
|
17
|
+
'constant.numeric.float',
|
|
18
|
+
'constant.numeric.hex',
|
|
19
|
+
'constant.numeric.octal',
|
|
20
|
+
'constant.other',
|
|
21
|
+
'constant.regexp',
|
|
22
|
+
'constant.rgb-value',
|
|
23
|
+
'emphasis',
|
|
24
|
+
'entity',
|
|
25
|
+
'entity.name',
|
|
26
|
+
'entity.name.class',
|
|
27
|
+
'entity.name.function',
|
|
28
|
+
'entity.name.method',
|
|
29
|
+
'entity.name.section',
|
|
30
|
+
'entity.name.selector',
|
|
31
|
+
'entity.name.tag',
|
|
32
|
+
'entity.name.type',
|
|
33
|
+
'entity.other',
|
|
34
|
+
'entity.other.attribute-name',
|
|
35
|
+
'entity.other.inherited-class',
|
|
36
|
+
'invalid',
|
|
37
|
+
'invalid.deprecated',
|
|
38
|
+
'invalid.illegal',
|
|
39
|
+
'keyword',
|
|
40
|
+
'keyword.control',
|
|
41
|
+
'keyword.operator',
|
|
42
|
+
'keyword.operator.new',
|
|
43
|
+
'keyword.operator.assignment',
|
|
44
|
+
'keyword.operator.arithmetic',
|
|
45
|
+
'keyword.operator.logical',
|
|
46
|
+
'keyword.other',
|
|
47
|
+
'markup',
|
|
48
|
+
'markup.bold',
|
|
49
|
+
'markup.changed',
|
|
50
|
+
'markup.deleted',
|
|
51
|
+
'markup.heading',
|
|
52
|
+
'markup.inline.raw',
|
|
53
|
+
'markup.inserted',
|
|
54
|
+
'markup.italic',
|
|
55
|
+
'markup.list',
|
|
56
|
+
'markup.list.numbered',
|
|
57
|
+
'markup.list.unnumbered',
|
|
58
|
+
'markup.other',
|
|
59
|
+
'markup.quote',
|
|
60
|
+
'markup.raw',
|
|
61
|
+
'markup.underline',
|
|
62
|
+
'markup.underline.link',
|
|
63
|
+
'meta',
|
|
64
|
+
'meta.block',
|
|
65
|
+
'meta.cast',
|
|
66
|
+
'meta.class',
|
|
67
|
+
'meta.function',
|
|
68
|
+
'meta.function-call',
|
|
69
|
+
'meta.preprocessor',
|
|
70
|
+
'meta.return-type',
|
|
71
|
+
'meta.selector',
|
|
72
|
+
'meta.tag',
|
|
73
|
+
'meta.type.annotation',
|
|
74
|
+
'meta.type',
|
|
75
|
+
'punctuation.definition.string.begin',
|
|
76
|
+
'punctuation.definition.string.end',
|
|
77
|
+
'punctuation.separator',
|
|
78
|
+
'punctuation.separator.continuation',
|
|
79
|
+
'punctuation.terminator',
|
|
80
|
+
'storage',
|
|
81
|
+
'storage.modifier',
|
|
82
|
+
'storage.type',
|
|
83
|
+
'string',
|
|
84
|
+
'string.interpolated',
|
|
85
|
+
'string.other',
|
|
86
|
+
'string.quoted',
|
|
87
|
+
'string.quoted.double',
|
|
88
|
+
'string.quoted.other',
|
|
89
|
+
'string.quoted.single',
|
|
90
|
+
'string.quoted.triple',
|
|
91
|
+
'string.regexp',
|
|
92
|
+
'string.unquoted',
|
|
93
|
+
'strong',
|
|
94
|
+
'support',
|
|
95
|
+
'support.class',
|
|
96
|
+
'support.constant',
|
|
97
|
+
'support.function',
|
|
98
|
+
'support.other',
|
|
99
|
+
'support.type',
|
|
100
|
+
'support.type.property-name',
|
|
101
|
+
'support.variable',
|
|
102
|
+
'variable',
|
|
103
|
+
'variable.language',
|
|
104
|
+
'variable.name',
|
|
105
|
+
'variable.other',
|
|
106
|
+
'variable.other.readwrite',
|
|
107
|
+
'variable.parameter'
|
|
108
|
+
];
|
|
109
|
+
const textmateColorsSchemaId = 'vscode://schemas/textmate-colors';
|
|
110
|
+
const textmateColorGroupSchemaId = `${textmateColorsSchemaId}#/definitions/colorGroup`;
|
|
111
|
+
const textmateColorSchema = {
|
|
112
|
+
type: 'array',
|
|
113
|
+
definitions: {
|
|
114
|
+
colorGroup: {
|
|
115
|
+
default: '#FF0000',
|
|
116
|
+
anyOf: [
|
|
117
|
+
{
|
|
118
|
+
type: 'string',
|
|
119
|
+
format: 'color-hex'
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
$ref: '#/definitions/settings'
|
|
123
|
+
}
|
|
124
|
+
]
|
|
125
|
+
},
|
|
126
|
+
settings: {
|
|
127
|
+
type: 'object',
|
|
128
|
+
description: ( nls.localize('schema.token.settings', 'Colors and styles for the token.')),
|
|
129
|
+
properties: {
|
|
130
|
+
foreground: {
|
|
131
|
+
type: 'string',
|
|
132
|
+
description: ( nls.localize('schema.token.foreground', 'Foreground color for the token.')),
|
|
133
|
+
format: 'color-hex',
|
|
134
|
+
default: '#ff0000'
|
|
135
|
+
},
|
|
136
|
+
background: {
|
|
137
|
+
type: 'string',
|
|
138
|
+
deprecationMessage: ( nls.localize(
|
|
139
|
+
'schema.token.background.warning',
|
|
140
|
+
'Token background colors are currently not supported.'
|
|
141
|
+
))
|
|
142
|
+
},
|
|
143
|
+
fontStyle: {
|
|
144
|
+
type: 'string',
|
|
145
|
+
description: ( nls.localize(
|
|
146
|
+
'schema.token.fontStyle',
|
|
147
|
+
'Font style of the rule: \'italic\', \'bold\', \'underline\', \'strikethrough\' or a combination. The empty string unsets inherited settings.'
|
|
148
|
+
)),
|
|
149
|
+
pattern: '^(\\s*\\b(italic|bold|underline|strikethrough))*\\s*$',
|
|
150
|
+
patternErrorMessage: ( nls.localize(
|
|
151
|
+
'schema.fontStyle.error',
|
|
152
|
+
'Font style must be \'italic\', \'bold\', \'underline\', \'strikethrough\' or a combination or the empty string.'
|
|
153
|
+
)),
|
|
154
|
+
defaultSnippets: [
|
|
155
|
+
{ label: ( nls.localize('schema.token.fontStyle.none', 'None (clear inherited style)')), bodyText: '""' },
|
|
156
|
+
{ body: 'italic' },
|
|
157
|
+
{ body: 'bold' },
|
|
158
|
+
{ body: 'underline' },
|
|
159
|
+
{ body: 'strikethrough' },
|
|
160
|
+
{ body: 'italic bold' },
|
|
161
|
+
{ body: 'italic underline' },
|
|
162
|
+
{ body: 'italic strikethrough' },
|
|
163
|
+
{ body: 'bold underline' },
|
|
164
|
+
{ body: 'bold strikethrough' },
|
|
165
|
+
{ body: 'underline strikethrough' },
|
|
166
|
+
{ body: 'italic bold underline' },
|
|
167
|
+
{ body: 'italic bold strikethrough' },
|
|
168
|
+
{ body: 'italic underline strikethrough' },
|
|
169
|
+
{ body: 'bold underline strikethrough' },
|
|
170
|
+
{ body: 'italic bold underline strikethrough' }
|
|
171
|
+
]
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
additionalProperties: false,
|
|
175
|
+
defaultSnippets: [{ body: { foreground: '${1:#FF0000}', fontStyle: '${2:bold}' } }]
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
items: {
|
|
179
|
+
type: 'object',
|
|
180
|
+
defaultSnippets: [{ body: { scope: '${1:keyword.operator}', settings: { foreground: '${2:#FF0000}' } } }],
|
|
181
|
+
properties: {
|
|
182
|
+
name: {
|
|
183
|
+
type: 'string',
|
|
184
|
+
description: ( nls.localize('schema.properties.name', 'Description of the rule.'))
|
|
185
|
+
},
|
|
186
|
+
scope: {
|
|
187
|
+
description: ( nls.localize(
|
|
188
|
+
'schema.properties.scope',
|
|
189
|
+
'Scope selector against which this rule matches.'
|
|
190
|
+
)),
|
|
191
|
+
anyOf: [
|
|
192
|
+
{
|
|
193
|
+
enum: textMateScopes
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
type: 'string'
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
type: 'array',
|
|
200
|
+
items: {
|
|
201
|
+
enum: textMateScopes
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
type: 'array',
|
|
206
|
+
items: {
|
|
207
|
+
type: 'string'
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
]
|
|
211
|
+
},
|
|
212
|
+
settings: {
|
|
213
|
+
$ref: '#/definitions/settings'
|
|
214
|
+
}
|
|
215
|
+
},
|
|
216
|
+
required: [
|
|
217
|
+
'settings'
|
|
218
|
+
],
|
|
219
|
+
additionalProperties: false
|
|
220
|
+
}
|
|
221
|
+
};
|
|
222
|
+
const colorThemeSchemaId = 'vscode://schemas/color-theme';
|
|
223
|
+
const colorThemeSchema = {
|
|
224
|
+
type: 'object',
|
|
225
|
+
allowComments: true,
|
|
226
|
+
allowTrailingCommas: true,
|
|
227
|
+
properties: {
|
|
228
|
+
colors: {
|
|
229
|
+
description: ( nls.localize('schema.workbenchColors', 'Colors in the workbench')),
|
|
230
|
+
$ref: workbenchColorsSchemaId,
|
|
231
|
+
additionalProperties: false
|
|
232
|
+
},
|
|
233
|
+
tokenColors: {
|
|
234
|
+
anyOf: [{
|
|
235
|
+
type: 'string',
|
|
236
|
+
description: ( nls.localize(
|
|
237
|
+
'schema.tokenColors.path',
|
|
238
|
+
'Path to a tmTheme file (relative to the current file).'
|
|
239
|
+
))
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
description: ( nls.localize('schema.colors', 'Colors for syntax highlighting')),
|
|
243
|
+
$ref: textmateColorsSchemaId
|
|
244
|
+
}
|
|
245
|
+
]
|
|
246
|
+
},
|
|
247
|
+
semanticHighlighting: {
|
|
248
|
+
type: 'boolean',
|
|
249
|
+
description: ( nls.localize(
|
|
250
|
+
'schema.supportsSemanticHighlighting',
|
|
251
|
+
'Whether semantic highlighting should be enabled for this theme.'
|
|
252
|
+
))
|
|
253
|
+
},
|
|
254
|
+
semanticTokenColors: {
|
|
255
|
+
type: 'object',
|
|
256
|
+
description: ( nls.localize('schema.semanticTokenColors', 'Colors for semantic tokens')),
|
|
257
|
+
$ref: tokenStylingSchemaId
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
};
|
|
261
|
+
function registerColorThemeSchemas() {
|
|
262
|
+
const schemaRegistry = ( Registry.as(Extensions.JSONContribution));
|
|
263
|
+
schemaRegistry.registerSchema(colorThemeSchemaId, colorThemeSchema);
|
|
264
|
+
schemaRegistry.registerSchema(textmateColorsSchemaId, textmateColorSchema);
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
export { colorThemeSchemaId, registerColorThemeSchemas, textmateColorGroupSchemaId, textmateColorsSchemaId };
|
|
@@ -0,0 +1,305 @@
|
|
|
1
|
+
import * as nls from 'monaco-editor/esm/vs/nls.js';
|
|
2
|
+
import { Registry } from 'monaco-editor/esm/vs/platform/registry/common/platform.js';
|
|
3
|
+
import { Extensions } from 'monaco-editor/esm/vs/platform/jsonschemas/common/jsonContributionRegistry.js';
|
|
4
|
+
import { fontIdRegex, fontWeightRegex, fontStyleRegex, fontSizeRegex } from './productIconThemeSchema.js';
|
|
5
|
+
|
|
6
|
+
const schemaId = 'vscode://schemas/icon-theme';
|
|
7
|
+
const schema = {
|
|
8
|
+
type: 'object',
|
|
9
|
+
allowComments: true,
|
|
10
|
+
allowTrailingCommas: true,
|
|
11
|
+
definitions: {
|
|
12
|
+
folderExpanded: {
|
|
13
|
+
type: 'string',
|
|
14
|
+
description: ( nls.localize(
|
|
15
|
+
'schema.folderExpanded',
|
|
16
|
+
'The folder icon for expanded folders. The expanded folder icon is optional. If not set, the icon defined for folder will be shown.'
|
|
17
|
+
))
|
|
18
|
+
},
|
|
19
|
+
folder: {
|
|
20
|
+
type: 'string',
|
|
21
|
+
description: ( nls.localize(
|
|
22
|
+
'schema.folder',
|
|
23
|
+
'The folder icon for collapsed folders, and if folderExpanded is not set, also for expanded folders.'
|
|
24
|
+
))
|
|
25
|
+
},
|
|
26
|
+
file: {
|
|
27
|
+
type: 'string',
|
|
28
|
+
description: ( nls.localize(
|
|
29
|
+
'schema.file',
|
|
30
|
+
'The default file icon, shown for all files that don\'t match any extension, filename or language id.'
|
|
31
|
+
))
|
|
32
|
+
},
|
|
33
|
+
folderNames: {
|
|
34
|
+
type: 'object',
|
|
35
|
+
description: ( nls.localize(
|
|
36
|
+
'schema.folderNames',
|
|
37
|
+
'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.'
|
|
38
|
+
)),
|
|
39
|
+
additionalProperties: {
|
|
40
|
+
type: 'string',
|
|
41
|
+
description: ( nls.localize('schema.folderName', 'The ID of the icon definition for the association.'))
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
folderNamesExpanded: {
|
|
45
|
+
type: 'object',
|
|
46
|
+
description: ( nls.localize(
|
|
47
|
+
'schema.folderNamesExpanded',
|
|
48
|
+
'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.'
|
|
49
|
+
)),
|
|
50
|
+
additionalProperties: {
|
|
51
|
+
type: 'string',
|
|
52
|
+
description: ( nls.localize(
|
|
53
|
+
'schema.folderNameExpanded',
|
|
54
|
+
'The ID of the icon definition for the association.'
|
|
55
|
+
))
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
fileExtensions: {
|
|
59
|
+
type: 'object',
|
|
60
|
+
description: ( nls.localize(
|
|
61
|
+
'schema.fileExtensions',
|
|
62
|
+
'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.'
|
|
63
|
+
)),
|
|
64
|
+
additionalProperties: {
|
|
65
|
+
type: 'string',
|
|
66
|
+
description: ( nls.localize(
|
|
67
|
+
'schema.fileExtension',
|
|
68
|
+
'The ID of the icon definition for the association.'
|
|
69
|
+
))
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
fileNames: {
|
|
73
|
+
type: 'object',
|
|
74
|
+
description: ( nls.localize(
|
|
75
|
+
'schema.fileNames',
|
|
76
|
+
'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.'
|
|
77
|
+
)),
|
|
78
|
+
additionalProperties: {
|
|
79
|
+
type: 'string',
|
|
80
|
+
description: ( nls.localize('schema.fileName', 'The ID of the icon definition for the association.'))
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
languageIds: {
|
|
84
|
+
type: 'object',
|
|
85
|
+
description: ( nls.localize(
|
|
86
|
+
'schema.languageIds',
|
|
87
|
+
'Associates languages to icons. The object key is the language id as defined in the language contribution point.'
|
|
88
|
+
)),
|
|
89
|
+
additionalProperties: {
|
|
90
|
+
type: 'string',
|
|
91
|
+
description: ( nls.localize('schema.languageId', 'The ID of the icon definition for the association.'))
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
associations: {
|
|
95
|
+
type: 'object',
|
|
96
|
+
properties: {
|
|
97
|
+
folderExpanded: {
|
|
98
|
+
$ref: '#/definitions/folderExpanded'
|
|
99
|
+
},
|
|
100
|
+
folder: {
|
|
101
|
+
$ref: '#/definitions/folder'
|
|
102
|
+
},
|
|
103
|
+
file: {
|
|
104
|
+
$ref: '#/definitions/file'
|
|
105
|
+
},
|
|
106
|
+
folderNames: {
|
|
107
|
+
$ref: '#/definitions/folderNames'
|
|
108
|
+
},
|
|
109
|
+
folderNamesExpanded: {
|
|
110
|
+
$ref: '#/definitions/folderNamesExpanded'
|
|
111
|
+
},
|
|
112
|
+
fileExtensions: {
|
|
113
|
+
$ref: '#/definitions/fileExtensions'
|
|
114
|
+
},
|
|
115
|
+
fileNames: {
|
|
116
|
+
$ref: '#/definitions/fileNames'
|
|
117
|
+
},
|
|
118
|
+
languageIds: {
|
|
119
|
+
$ref: '#/definitions/languageIds'
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
properties: {
|
|
125
|
+
fonts: {
|
|
126
|
+
type: 'array',
|
|
127
|
+
description: ( nls.localize('schema.fonts', 'Fonts that are used in the icon definitions.')),
|
|
128
|
+
items: {
|
|
129
|
+
type: 'object',
|
|
130
|
+
properties: {
|
|
131
|
+
id: {
|
|
132
|
+
type: 'string',
|
|
133
|
+
description: ( nls.localize('schema.id', 'The ID of the font.')),
|
|
134
|
+
pattern: fontIdRegex,
|
|
135
|
+
patternErrorMessage: ( nls.localize(
|
|
136
|
+
'schema.id.formatError',
|
|
137
|
+
'The ID must only contain letter, numbers, underscore and minus.'
|
|
138
|
+
))
|
|
139
|
+
},
|
|
140
|
+
src: {
|
|
141
|
+
type: 'array',
|
|
142
|
+
description: ( nls.localize('schema.src', 'The location of the font.')),
|
|
143
|
+
items: {
|
|
144
|
+
type: 'object',
|
|
145
|
+
properties: {
|
|
146
|
+
path: {
|
|
147
|
+
type: 'string',
|
|
148
|
+
description: ( nls.localize(
|
|
149
|
+
'schema.font-path',
|
|
150
|
+
'The font path, relative to the current file icon theme file.'
|
|
151
|
+
)),
|
|
152
|
+
},
|
|
153
|
+
format: {
|
|
154
|
+
type: 'string',
|
|
155
|
+
description: ( nls.localize('schema.font-format', 'The format of the font.')),
|
|
156
|
+
enum: ['woff', 'woff2', 'truetype', 'opentype', 'embedded-opentype', 'svg']
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
required: [
|
|
160
|
+
'path',
|
|
161
|
+
'format'
|
|
162
|
+
]
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
weight: {
|
|
166
|
+
type: 'string',
|
|
167
|
+
description: ( nls.localize(
|
|
168
|
+
'schema.font-weight',
|
|
169
|
+
'The weight of the font. See https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight for valid values.'
|
|
170
|
+
)),
|
|
171
|
+
pattern: fontWeightRegex
|
|
172
|
+
},
|
|
173
|
+
style: {
|
|
174
|
+
type: 'string',
|
|
175
|
+
description: ( nls.localize(
|
|
176
|
+
'schema.font-style',
|
|
177
|
+
'The style of the font. See https://developer.mozilla.org/en-US/docs/Web/CSS/font-style for valid values.'
|
|
178
|
+
)),
|
|
179
|
+
pattern: fontStyleRegex
|
|
180
|
+
},
|
|
181
|
+
size: {
|
|
182
|
+
type: 'string',
|
|
183
|
+
description: ( nls.localize(
|
|
184
|
+
'schema.font-size',
|
|
185
|
+
'The default size of the font. See https://developer.mozilla.org/en-US/docs/Web/CSS/font-size for valid values.'
|
|
186
|
+
)),
|
|
187
|
+
pattern: fontSizeRegex
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
required: [
|
|
191
|
+
'id',
|
|
192
|
+
'src'
|
|
193
|
+
]
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
iconDefinitions: {
|
|
197
|
+
type: 'object',
|
|
198
|
+
description: ( nls.localize(
|
|
199
|
+
'schema.iconDefinitions',
|
|
200
|
+
'Description of all icons that can be used when associating files to icons.'
|
|
201
|
+
)),
|
|
202
|
+
additionalProperties: {
|
|
203
|
+
type: 'object',
|
|
204
|
+
description: ( nls.localize(
|
|
205
|
+
'schema.iconDefinition',
|
|
206
|
+
'An icon definition. The object key is the ID of the definition.'
|
|
207
|
+
)),
|
|
208
|
+
properties: {
|
|
209
|
+
iconPath: {
|
|
210
|
+
type: 'string',
|
|
211
|
+
description: ( nls.localize(
|
|
212
|
+
'schema.iconPath',
|
|
213
|
+
'When using a SVG or PNG: The path to the image. The path is relative to the icon set file.'
|
|
214
|
+
))
|
|
215
|
+
},
|
|
216
|
+
fontCharacter: {
|
|
217
|
+
type: 'string',
|
|
218
|
+
description: ( nls.localize(
|
|
219
|
+
'schema.fontCharacter',
|
|
220
|
+
'When using a glyph font: The character in the font to use.'
|
|
221
|
+
))
|
|
222
|
+
},
|
|
223
|
+
fontColor: {
|
|
224
|
+
type: 'string',
|
|
225
|
+
format: 'color-hex',
|
|
226
|
+
description: ( nls.localize('schema.fontColor', 'When using a glyph font: The color to use.'))
|
|
227
|
+
},
|
|
228
|
+
fontSize: {
|
|
229
|
+
type: 'string',
|
|
230
|
+
description: ( nls.localize(
|
|
231
|
+
'schema.fontSize',
|
|
232
|
+
'When using a font: The font size in percentage to the text font. If not set, defaults to the size in the font definition.'
|
|
233
|
+
)),
|
|
234
|
+
pattern: fontSizeRegex
|
|
235
|
+
},
|
|
236
|
+
fontId: {
|
|
237
|
+
type: 'string',
|
|
238
|
+
description: ( nls.localize(
|
|
239
|
+
'schema.fontId',
|
|
240
|
+
'When using a font: The id of the font. If not set, defaults to the first font definition.'
|
|
241
|
+
))
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
},
|
|
246
|
+
folderExpanded: {
|
|
247
|
+
$ref: '#/definitions/folderExpanded'
|
|
248
|
+
},
|
|
249
|
+
folder: {
|
|
250
|
+
$ref: '#/definitions/folder'
|
|
251
|
+
},
|
|
252
|
+
file: {
|
|
253
|
+
$ref: '#/definitions/file'
|
|
254
|
+
},
|
|
255
|
+
folderNames: {
|
|
256
|
+
$ref: '#/definitions/folderNames'
|
|
257
|
+
},
|
|
258
|
+
folderNamesExpanded: {
|
|
259
|
+
$ref: '#/definitions/folderNamesExpanded'
|
|
260
|
+
},
|
|
261
|
+
fileExtensions: {
|
|
262
|
+
$ref: '#/definitions/fileExtensions'
|
|
263
|
+
},
|
|
264
|
+
fileNames: {
|
|
265
|
+
$ref: '#/definitions/fileNames'
|
|
266
|
+
},
|
|
267
|
+
languageIds: {
|
|
268
|
+
$ref: '#/definitions/languageIds'
|
|
269
|
+
},
|
|
270
|
+
light: {
|
|
271
|
+
$ref: '#/definitions/associations',
|
|
272
|
+
description: ( nls.localize(
|
|
273
|
+
'schema.light',
|
|
274
|
+
'Optional associations for file icons in light color themes.'
|
|
275
|
+
))
|
|
276
|
+
},
|
|
277
|
+
highContrast: {
|
|
278
|
+
$ref: '#/definitions/associations',
|
|
279
|
+
description: ( nls.localize(
|
|
280
|
+
'schema.highContrast',
|
|
281
|
+
'Optional associations for file icons in high contrast color themes.'
|
|
282
|
+
))
|
|
283
|
+
},
|
|
284
|
+
hidesExplorerArrows: {
|
|
285
|
+
type: 'boolean',
|
|
286
|
+
description: ( nls.localize(
|
|
287
|
+
'schema.hidesExplorerArrows',
|
|
288
|
+
'Configures whether the file explorer\'s arrows should be hidden when this theme is active.'
|
|
289
|
+
))
|
|
290
|
+
},
|
|
291
|
+
showLanguageModeIcons: {
|
|
292
|
+
type: 'boolean',
|
|
293
|
+
description: ( nls.localize(
|
|
294
|
+
'schema.showLanguageModeIcons',
|
|
295
|
+
'Configures whether the default language icons should be used if the theme does not define an icon for a language.'
|
|
296
|
+
))
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
};
|
|
300
|
+
function registerFileIconThemeSchemas() {
|
|
301
|
+
const schemaRegistry = ( Registry.as(Extensions.JSONContribution));
|
|
302
|
+
schemaRegistry.registerSchema(schemaId, schema);
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
export { registerFileIconThemeSchemas };
|