@codingame/monaco-vscode-theme-service-override 3.2.3 → 4.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,301 +0,0 @@
1
- import { localizeWithPath } from 'vscode/vscode/vs/nls';
2
- import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
3
- import { Extensions } from 'vscode/vscode/vs/platform/jsonschemas/common/jsonContributionRegistry';
4
- import { workbenchColorsSchemaId } from 'vscode/vscode/vs/platform/theme/common/colorRegistry';
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: ( localizeWithPath(
129
- 'vs/workbench/services/themes/common/colorThemeSchema',
130
- 'schema.token.settings',
131
- 'Colors and styles for the token.'
132
- )),
133
- properties: {
134
- foreground: {
135
- type: 'string',
136
- description: ( localizeWithPath(
137
- 'vs/workbench/services/themes/common/colorThemeSchema',
138
- 'schema.token.foreground',
139
- 'Foreground color for the token.'
140
- )),
141
- format: 'color-hex',
142
- default: '#ff0000'
143
- },
144
- background: {
145
- type: 'string',
146
- deprecationMessage: ( localizeWithPath(
147
- 'vs/workbench/services/themes/common/colorThemeSchema',
148
- 'schema.token.background.warning',
149
- 'Token background colors are currently not supported.'
150
- ))
151
- },
152
- fontStyle: {
153
- type: 'string',
154
- description: ( localizeWithPath(
155
- 'vs/workbench/services/themes/common/colorThemeSchema',
156
- 'schema.token.fontStyle',
157
- 'Font style of the rule: \'italic\', \'bold\', \'underline\', \'strikethrough\' or a combination. The empty string unsets inherited settings.'
158
- )),
159
- pattern: '^(\\s*\\b(italic|bold|underline|strikethrough))*\\s*$',
160
- patternErrorMessage: ( localizeWithPath(
161
- 'vs/workbench/services/themes/common/colorThemeSchema',
162
- 'schema.fontStyle.error',
163
- 'Font style must be \'italic\', \'bold\', \'underline\', \'strikethrough\' or a combination or the empty string.'
164
- )),
165
- defaultSnippets: [
166
- { label: ( localizeWithPath(
167
- 'vs/workbench/services/themes/common/colorThemeSchema',
168
- 'schema.token.fontStyle.none',
169
- 'None (clear inherited style)'
170
- )), bodyText: '""' },
171
- { body: 'italic' },
172
- { body: 'bold' },
173
- { body: 'underline' },
174
- { body: 'strikethrough' },
175
- { body: 'italic bold' },
176
- { body: 'italic underline' },
177
- { body: 'italic strikethrough' },
178
- { body: 'bold underline' },
179
- { body: 'bold strikethrough' },
180
- { body: 'underline strikethrough' },
181
- { body: 'italic bold underline' },
182
- { body: 'italic bold strikethrough' },
183
- { body: 'italic underline strikethrough' },
184
- { body: 'bold underline strikethrough' },
185
- { body: 'italic bold underline strikethrough' }
186
- ]
187
- }
188
- },
189
- additionalProperties: false,
190
- defaultSnippets: [{ body: { foreground: '${1:#FF0000}', fontStyle: '${2:bold}' } }]
191
- }
192
- },
193
- items: {
194
- type: 'object',
195
- defaultSnippets: [{ body: { scope: '${1:keyword.operator}', settings: { foreground: '${2:#FF0000}' } } }],
196
- properties: {
197
- name: {
198
- type: 'string',
199
- description: ( localizeWithPath(
200
- 'vs/workbench/services/themes/common/colorThemeSchema',
201
- 'schema.properties.name',
202
- 'Description of the rule.'
203
- ))
204
- },
205
- scope: {
206
- description: ( localizeWithPath(
207
- 'vs/workbench/services/themes/common/colorThemeSchema',
208
- 'schema.properties.scope',
209
- 'Scope selector against which this rule matches.'
210
- )),
211
- anyOf: [
212
- {
213
- enum: textMateScopes
214
- },
215
- {
216
- type: 'string'
217
- },
218
- {
219
- type: 'array',
220
- items: {
221
- enum: textMateScopes
222
- }
223
- },
224
- {
225
- type: 'array',
226
- items: {
227
- type: 'string'
228
- }
229
- }
230
- ]
231
- },
232
- settings: {
233
- $ref: '#/definitions/settings'
234
- }
235
- },
236
- required: [
237
- 'settings'
238
- ],
239
- additionalProperties: false
240
- }
241
- };
242
- const colorThemeSchemaId = 'vscode://schemas/color-theme';
243
- const colorThemeSchema = {
244
- type: 'object',
245
- allowComments: true,
246
- allowTrailingCommas: true,
247
- properties: {
248
- colors: {
249
- description: ( localizeWithPath(
250
- 'vs/workbench/services/themes/common/colorThemeSchema',
251
- 'schema.workbenchColors',
252
- 'Colors in the workbench'
253
- )),
254
- $ref: workbenchColorsSchemaId,
255
- additionalProperties: false
256
- },
257
- tokenColors: {
258
- anyOf: [{
259
- type: 'string',
260
- description: ( localizeWithPath(
261
- 'vs/workbench/services/themes/common/colorThemeSchema',
262
- 'schema.tokenColors.path',
263
- 'Path to a tmTheme file (relative to the current file).'
264
- ))
265
- },
266
- {
267
- description: ( localizeWithPath(
268
- 'vs/workbench/services/themes/common/colorThemeSchema',
269
- 'schema.colors',
270
- 'Colors for syntax highlighting'
271
- )),
272
- $ref: textmateColorsSchemaId
273
- }
274
- ]
275
- },
276
- semanticHighlighting: {
277
- type: 'boolean',
278
- description: ( localizeWithPath(
279
- 'vs/workbench/services/themes/common/colorThemeSchema',
280
- 'schema.supportsSemanticHighlighting',
281
- 'Whether semantic highlighting should be enabled for this theme.'
282
- ))
283
- },
284
- semanticTokenColors: {
285
- type: 'object',
286
- description: ( localizeWithPath(
287
- 'vs/workbench/services/themes/common/colorThemeSchema',
288
- 'schema.semanticTokenColors',
289
- 'Colors for semantic tokens'
290
- )),
291
- $ref: tokenStylingSchemaId
292
- }
293
- }
294
- };
295
- function registerColorThemeSchemas() {
296
- const schemaRegistry = ( Registry.as(Extensions.JSONContribution));
297
- schemaRegistry.registerSchema(colorThemeSchemaId, colorThemeSchema);
298
- schemaRegistry.registerSchema(textmateColorsSchemaId, textmateColorSchema);
299
- }
300
-
301
- export { colorThemeSchemaId, registerColorThemeSchemas, textmateColorGroupSchemaId, textmateColorsSchemaId };