@codingame/monaco-vscode-93784a59-b4cf-520c-8339-f8104d3a4f3e-common 18.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/empty.js ADDED
@@ -0,0 +1 @@
1
+ export {}
package/package.json ADDED
@@ -0,0 +1,43 @@
1
+ {
2
+ "name": "@codingame/monaco-vscode-93784a59-b4cf-520c-8339-f8104d3a4f3e-common",
3
+ "version": "18.0.0",
4
+ "private": false,
5
+ "description": "VSCode public API plugged on the monaco editor - common package (base, chat, extension-gallery, interactive, localization, mcp, notebook, remote-agent, search, telemetry, terminal, textmate, theme, treesitter, view-common, walkthrough)",
6
+ "keywords": [],
7
+ "author": {
8
+ "name": "CodinGame",
9
+ "url": "http://www.codingame.com"
10
+ },
11
+ "license": "MIT",
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "git+ssh://git@github.com/CodinGame/monaco-vscode-api.git"
15
+ },
16
+ "type": "module",
17
+ "dependencies": {
18
+ "@codingame/monaco-vscode-api": "18.0.0"
19
+ },
20
+ "exports": {
21
+ ".": {
22
+ "default": "./empty.js"
23
+ },
24
+ "./vscode/*.css": {
25
+ "default": "./vscode/src/*.css"
26
+ },
27
+ "./vscode/*": {
28
+ "types": "./vscode/src/*.d.ts",
29
+ "default": "./vscode/src/*.js"
30
+ },
31
+ "./*": {
32
+ "types": "./*.d.ts",
33
+ "default": "./*.js"
34
+ }
35
+ },
36
+ "typesVersions": {
37
+ "*": {
38
+ "vscode/*": [
39
+ "./vscode/src/*.d.ts"
40
+ ]
41
+ }
42
+ }
43
+ }
@@ -0,0 +1,34 @@
1
+ import { VSBufferReadableStream } from "@codingame/monaco-vscode-api/vscode/vs/base/common/buffer";
2
+ export declare function isOfflineError(error: unknown): boolean;
3
+ export declare class OfflineError extends Error {
4
+ constructor();
5
+ }
6
+ export interface IHeaders {
7
+ "Proxy-Authorization"?: string;
8
+ "x-operation-id"?: string;
9
+ "retry-after"?: string;
10
+ etag?: string;
11
+ "Content-Length"?: string;
12
+ "activityid"?: string;
13
+ "X-Market-User-Id"?: string;
14
+ [header: string]: string | string[] | undefined;
15
+ }
16
+ export interface IRequestOptions {
17
+ type?: string;
18
+ url?: string;
19
+ user?: string;
20
+ password?: string;
21
+ headers?: IHeaders;
22
+ timeout?: number;
23
+ data?: string;
24
+ followRedirects?: number;
25
+ proxyAuthorization?: string;
26
+ disableCache?: boolean;
27
+ }
28
+ export interface IRequestContext {
29
+ res: {
30
+ headers: IHeaders;
31
+ statusCode?: number;
32
+ };
33
+ stream: VSBufferReadableStream;
34
+ }
@@ -0,0 +1,17 @@
1
+
2
+
3
+ const offlineName = 'Offline';
4
+ function isOfflineError(error) {
5
+ if (error instanceof OfflineError) {
6
+ return true;
7
+ }
8
+ return error instanceof Error && error.name === offlineName && error.message === offlineName;
9
+ }
10
+ class OfflineError extends Error {
11
+ constructor() {
12
+ super(offlineName);
13
+ this.name = this.message;
14
+ }
15
+ }
16
+
17
+ export { OfflineError, isOfflineError };
@@ -0,0 +1,20 @@
1
+ import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
2
+ import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
3
+ import { IQuickPickItem } from "@codingame/monaco-vscode-api/vscode/vs/platform/quickinput/common/quickInput";
4
+ import { IGalleryExtension } from "@codingame/monaco-vscode-api/vscode/vs/platform/extensionManagement/common/extensionManagement";
5
+ import { IExtensionGalleryService } from "@codingame/monaco-vscode-api/vscode/vs/platform/extensionManagement/common/extensionManagement.service";
6
+ import { ILanguagePackService } from "@codingame/monaco-vscode-api/vscode/vs/platform/languagePacks/common/languagePacks.service";
7
+ export declare function getLocale(extension: IGalleryExtension): string | undefined;
8
+ export interface ILanguagePackItem extends IQuickPickItem {
9
+ readonly extensionId?: string;
10
+ readonly galleryExtension?: IGalleryExtension;
11
+ }
12
+ export declare abstract class LanguagePackBaseService extends Disposable implements ILanguagePackService {
13
+ protected readonly extensionGalleryService: IExtensionGalleryService;
14
+ readonly _serviceBrand: undefined;
15
+ constructor(extensionGalleryService: IExtensionGalleryService);
16
+ abstract getBuiltInExtensionTranslationsUri(id: string, language: string): Promise<URI | undefined>;
17
+ abstract getInstalledLanguages(): Promise<Array<ILanguagePackItem>>;
18
+ getAvailableLanguages(): Promise<ILanguagePackItem[]>;
19
+ protected createQuickPickItem(locale: string, languageName?: string, languagePack?: IGalleryExtension): IQuickPickItem;
20
+ }
@@ -0,0 +1,80 @@
1
+
2
+ import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
3
+ import { CancellationTokenSource } from '@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation';
4
+ import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
5
+ import { language } from '@codingame/monaco-vscode-api/vscode/vs/base/common/platform';
6
+ import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
7
+ import { IExtensionGalleryService } from '@codingame/monaco-vscode-api/vscode/vs/platform/extensionManagement/common/extensionManagement.service';
8
+
9
+ function getLocale(extension) {
10
+ return extension.tags.find(t => t.startsWith('lp-'))?.split('lp-')[1];
11
+ }
12
+ let LanguagePackBaseService = class LanguagePackBaseService extends Disposable {
13
+ constructor(extensionGalleryService) {
14
+ super();
15
+ this.extensionGalleryService = extensionGalleryService;
16
+ }
17
+ async getAvailableLanguages() {
18
+ const timeout = ( new CancellationTokenSource());
19
+ setTimeout(() => timeout.cancel(), 1000);
20
+ let result;
21
+ try {
22
+ result = await this.extensionGalleryService.query({
23
+ text: 'category:"language packs"',
24
+ pageSize: 20
25
+ }, timeout.token);
26
+ }
27
+ catch (_) {
28
+ return [];
29
+ }
30
+ const languagePackExtensions = result.firstPage.filter(e => e.properties.localizedLanguages?.length && ( e.tags.some(t => t.startsWith('lp-'))));
31
+ const allFromMarketplace = ( languagePackExtensions.map(lp => {
32
+ const languageName = lp.properties.localizedLanguages?.[0];
33
+ const locale = getLocale(lp);
34
+ const baseQuickPick = this.createQuickPickItem(locale, languageName, lp);
35
+ return {
36
+ ...baseQuickPick,
37
+ extensionId: lp.identifier.id,
38
+ galleryExtension: lp
39
+ };
40
+ }));
41
+ allFromMarketplace.push(this.createQuickPickItem('en', 'English'));
42
+ return allFromMarketplace;
43
+ }
44
+ createQuickPickItem(locale, languageName, languagePack) {
45
+ const label = languageName ?? locale;
46
+ let description;
47
+ if (label !== locale) {
48
+ description = `(${locale})`;
49
+ }
50
+ if (locale.toLowerCase() === language.toLowerCase()) {
51
+ description ??= '';
52
+ description += ( localize(1897, " (Current)"));
53
+ }
54
+ if (languagePack?.installCount) {
55
+ description ??= '';
56
+ const count = languagePack.installCount;
57
+ let countLabel;
58
+ if (count > 1000000) {
59
+ countLabel = `${Math.floor(count / 100000) / 10}M`;
60
+ }
61
+ else if (count > 1000) {
62
+ countLabel = `${Math.floor(count / 1000)}K`;
63
+ }
64
+ else {
65
+ countLabel = String(count);
66
+ }
67
+ description += ` $(cloud-download) ${countLabel}`;
68
+ }
69
+ return {
70
+ id: locale,
71
+ label,
72
+ description
73
+ };
74
+ }
75
+ };
76
+ LanguagePackBaseService = ( __decorate([
77
+ ( __param(0, IExtensionGalleryService))
78
+ ], LanguagePackBaseService));
79
+
80
+ export { LanguagePackBaseService, getLocale };
@@ -0,0 +1,100 @@
1
+ import { Color } from "@codingame/monaco-vscode-api/vscode/vs/base/common/color";
2
+ import { Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event";
3
+ import { IJSONSchema } from "@codingame/monaco-vscode-api/vscode/vs/base/common/jsonSchema";
4
+ import { IColorTheme } from "@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/themeService";
5
+ type TokenClassificationString = string;
6
+ export declare const typeAndModifierIdPattern = "^\\w+[-_\\w+]*$";
7
+ export interface TokenSelector {
8
+ match(type: string, modifiers: string[], language: string): number;
9
+ readonly id: string;
10
+ }
11
+ export interface TokenTypeOrModifierContribution {
12
+ readonly num: number;
13
+ readonly id: string;
14
+ readonly superType?: string;
15
+ readonly description: string;
16
+ readonly deprecationMessage?: string;
17
+ }
18
+ export interface TokenStyleData {
19
+ foreground: Color | undefined;
20
+ bold: boolean | undefined;
21
+ underline: boolean | undefined;
22
+ strikethrough: boolean | undefined;
23
+ italic: boolean | undefined;
24
+ }
25
+ export declare class TokenStyle implements Readonly<TokenStyleData> {
26
+ readonly foreground: Color | undefined;
27
+ readonly bold: boolean | undefined;
28
+ readonly underline: boolean | undefined;
29
+ readonly strikethrough: boolean | undefined;
30
+ readonly italic: boolean | undefined;
31
+ constructor(foreground: Color | undefined, bold: boolean | undefined, underline: boolean | undefined, strikethrough: boolean | undefined, italic: boolean | undefined);
32
+ }
33
+ export declare namespace TokenStyle {
34
+ function toJSONObject(style: TokenStyle): any;
35
+ function fromJSONObject(obj: any): TokenStyle | undefined;
36
+ function equals(s1: any, s2: any): boolean;
37
+ function is(s: any): s is TokenStyle;
38
+ function fromData(data: {
39
+ foreground: Color | undefined;
40
+ bold: boolean | undefined;
41
+ underline: boolean | undefined;
42
+ strikethrough: boolean | undefined;
43
+ italic: boolean | undefined;
44
+ }): TokenStyle;
45
+ function fromSettings(foreground: string | undefined, fontStyle: string | undefined): TokenStyle;
46
+ function fromSettings(foreground: string | undefined, fontStyle: string | undefined, bold: boolean | undefined, underline: boolean | undefined, strikethrough: boolean | undefined, italic: boolean | undefined): TokenStyle;
47
+ }
48
+ export type ProbeScope = string[];
49
+ export interface TokenStyleFunction {
50
+ (theme: IColorTheme): TokenStyle | undefined;
51
+ }
52
+ export interface TokenStyleDefaults {
53
+ scopesToProbe?: ProbeScope[];
54
+ light?: TokenStyleValue;
55
+ dark?: TokenStyleValue;
56
+ hcDark?: TokenStyleValue;
57
+ hcLight?: TokenStyleValue;
58
+ }
59
+ export interface SemanticTokenDefaultRule {
60
+ selector: TokenSelector;
61
+ defaults: TokenStyleDefaults;
62
+ }
63
+ export interface SemanticTokenRule {
64
+ style: TokenStyle;
65
+ selector: TokenSelector;
66
+ }
67
+ export declare namespace SemanticTokenRule {
68
+ function fromJSONObject(registry: ITokenClassificationRegistry, o: any): SemanticTokenRule | undefined;
69
+ function toJSONObject(rule: SemanticTokenRule): any;
70
+ function equals(r1: SemanticTokenRule | undefined, r2: SemanticTokenRule | undefined): boolean;
71
+ function is(r: any): r is SemanticTokenRule;
72
+ }
73
+ export type TokenStyleValue = TokenStyle | TokenClassificationString;
74
+ export interface ITokenClassificationRegistry {
75
+ readonly onDidChangeSchema: Event<void>;
76
+ registerTokenType(id: string, description: string, superType?: string, deprecationMessage?: string): void;
77
+ registerTokenModifier(id: string, description: string): void;
78
+ parseTokenSelector(selectorString: string, language?: string): TokenSelector;
79
+ registerTokenStyleDefault(selector: TokenSelector, defaults: TokenStyleDefaults): void;
80
+ deregisterTokenStyleDefault(selector: TokenSelector): void;
81
+ deregisterTokenType(id: string): void;
82
+ deregisterTokenModifier(id: string): void;
83
+ getTokenTypes(): TokenTypeOrModifierContribution[];
84
+ getTokenModifiers(): TokenTypeOrModifierContribution[];
85
+ getTokenStylingDefaultRules(): SemanticTokenDefaultRule[];
86
+ getTokenStylingSchema(): IJSONSchema;
87
+ }
88
+ export declare function parseClassifierString(s: string, defaultLanguage: string): {
89
+ type: string;
90
+ modifiers: string[];
91
+ language: string;
92
+ };
93
+ export declare function parseClassifierString(s: string, defaultLanguage?: string): {
94
+ type: string;
95
+ modifiers: string[];
96
+ language: string | undefined;
97
+ };
98
+ export declare function getTokenClassificationRegistry(): ITokenClassificationRegistry;
99
+ export declare const tokenStylingSchemaId = "vscode://schemas/token-styling";
100
+ export {};
@@ -0,0 +1,472 @@
1
+
2
+ import { RunOnceScheduler } from '@codingame/monaco-vscode-api/vscode/vs/base/common/async';
3
+ import { Color } from '@codingame/monaco-vscode-api/vscode/vs/base/common/color';
4
+ import { Emitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
5
+ import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
6
+ import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
7
+ import { Extensions as Extensions$1 } from '@codingame/monaco-vscode-api/vscode/vs/platform/jsonschemas/common/jsonContributionRegistry';
8
+ import { Registry } from '@codingame/monaco-vscode-api/vscode/vs/platform/registry/common/platform';
9
+
10
+ const TOKEN_TYPE_WILDCARD = '*';
11
+ const TOKEN_CLASSIFIER_LANGUAGE_SEPARATOR = ':';
12
+ const CLASSIFIER_MODIFIER_SEPARATOR = '.';
13
+ const idPattern = '\\w+[-_\\w+]*';
14
+ const typeAndModifierIdPattern = `^${idPattern}$`;
15
+ const selectorPattern = `^(${idPattern}|\\*)(\\${CLASSIFIER_MODIFIER_SEPARATOR}${idPattern})*(${TOKEN_CLASSIFIER_LANGUAGE_SEPARATOR}${idPattern})?$`;
16
+ const fontStylePattern = '^(\\s*(italic|bold|underline|strikethrough))*\\s*$';
17
+ class TokenStyle {
18
+ constructor(foreground, bold, underline, strikethrough, italic) {
19
+ this.foreground = foreground;
20
+ this.bold = bold;
21
+ this.underline = underline;
22
+ this.strikethrough = strikethrough;
23
+ this.italic = italic;
24
+ }
25
+ }
26
+ (function (TokenStyle) {
27
+ function toJSONObject(style) {
28
+ return {
29
+ _foreground: style.foreground === undefined ? null : Color.Format.CSS.formatHexA(style.foreground, true),
30
+ _bold: style.bold === undefined ? null : style.bold,
31
+ _underline: style.underline === undefined ? null : style.underline,
32
+ _italic: style.italic === undefined ? null : style.italic,
33
+ _strikethrough: style.strikethrough === undefined ? null : style.strikethrough,
34
+ };
35
+ }
36
+ TokenStyle.toJSONObject = toJSONObject;
37
+ function fromJSONObject(obj) {
38
+ if (obj) {
39
+ const boolOrUndef = (b) => (typeof b === 'boolean') ? b : undefined;
40
+ const colorOrUndef = (s) => (typeof s === 'string') ? ( Color.fromHex(s)) : undefined;
41
+ return ( new TokenStyle(
42
+ colorOrUndef(obj._foreground),
43
+ boolOrUndef(obj._bold),
44
+ boolOrUndef(obj._underline),
45
+ boolOrUndef(obj._strikethrough),
46
+ boolOrUndef(obj._italic)
47
+ ));
48
+ }
49
+ return undefined;
50
+ }
51
+ TokenStyle.fromJSONObject = fromJSONObject;
52
+ function equals(s1, s2) {
53
+ if (s1 === s2) {
54
+ return true;
55
+ }
56
+ return s1 !== undefined && s2 !== undefined
57
+ && (s1.foreground instanceof Color ? s1.foreground.equals(s2.foreground) : s2.foreground === undefined)
58
+ && s1.bold === s2.bold
59
+ && s1.underline === s2.underline
60
+ && s1.strikethrough === s2.strikethrough
61
+ && s1.italic === s2.italic;
62
+ }
63
+ TokenStyle.equals = equals;
64
+ function is(s) {
65
+ return s instanceof TokenStyle;
66
+ }
67
+ TokenStyle.is = is;
68
+ function fromData(data) {
69
+ return ( new TokenStyle(
70
+ data.foreground,
71
+ data.bold,
72
+ data.underline,
73
+ data.strikethrough,
74
+ data.italic
75
+ ));
76
+ }
77
+ TokenStyle.fromData = fromData;
78
+ function fromSettings(foreground, fontStyle, bold, underline, strikethrough, italic) {
79
+ let foregroundColor = undefined;
80
+ if (foreground !== undefined) {
81
+ foregroundColor = ( Color.fromHex(foreground));
82
+ }
83
+ if (fontStyle !== undefined) {
84
+ bold = italic = underline = strikethrough = false;
85
+ const expression = /italic|bold|underline|strikethrough/g;
86
+ let match;
87
+ while ((match = expression.exec(fontStyle))) {
88
+ switch (match[0]) {
89
+ case 'bold':
90
+ bold = true;
91
+ break;
92
+ case 'italic':
93
+ italic = true;
94
+ break;
95
+ case 'underline':
96
+ underline = true;
97
+ break;
98
+ case 'strikethrough':
99
+ strikethrough = true;
100
+ break;
101
+ }
102
+ }
103
+ }
104
+ return ( new TokenStyle(foregroundColor, bold, underline, strikethrough, italic));
105
+ }
106
+ TokenStyle.fromSettings = fromSettings;
107
+ })(TokenStyle || (TokenStyle = {}));
108
+ var SemanticTokenRule;
109
+ (function (SemanticTokenRule) {
110
+ function fromJSONObject(registry, o) {
111
+ if (o && typeof o._selector === 'string' && o._style) {
112
+ const style = TokenStyle.fromJSONObject(o._style);
113
+ if (style) {
114
+ try {
115
+ return { selector: registry.parseTokenSelector(o._selector), style };
116
+ }
117
+ catch (_ignore) {
118
+ }
119
+ }
120
+ }
121
+ return undefined;
122
+ }
123
+ SemanticTokenRule.fromJSONObject = fromJSONObject;
124
+ function toJSONObject(rule) {
125
+ return {
126
+ _selector: rule.selector.id,
127
+ _style: TokenStyle.toJSONObject(rule.style)
128
+ };
129
+ }
130
+ SemanticTokenRule.toJSONObject = toJSONObject;
131
+ function equals(r1, r2) {
132
+ if (r1 === r2) {
133
+ return true;
134
+ }
135
+ return r1 !== undefined && r2 !== undefined
136
+ && r1.selector && r2.selector && r1.selector.id === r2.selector.id
137
+ && TokenStyle.equals(r1.style, r2.style);
138
+ }
139
+ SemanticTokenRule.equals = equals;
140
+ function is(r) {
141
+ return r && r.selector && typeof r.selector.id === 'string' && TokenStyle.is(r.style);
142
+ }
143
+ SemanticTokenRule.is = is;
144
+ })(SemanticTokenRule || (SemanticTokenRule = {}));
145
+ const Extensions = {
146
+ TokenClassificationContribution: 'base.contributions.tokenClassification'
147
+ };
148
+ class TokenClassificationRegistry extends Disposable {
149
+ constructor() {
150
+ super();
151
+ this._onDidChangeSchema = this._register(( new Emitter()));
152
+ this.onDidChangeSchema = this._onDidChangeSchema.event;
153
+ this.currentTypeNumber = 0;
154
+ this.currentModifierBit = 1;
155
+ this.tokenStylingDefaultRules = [];
156
+ this.tokenStylingSchema = {
157
+ type: 'object',
158
+ properties: {},
159
+ patternProperties: {
160
+ [selectorPattern]: getStylingSchemeEntry()
161
+ },
162
+ additionalProperties: false,
163
+ definitions: {
164
+ style: {
165
+ type: 'object',
166
+ description: ( localize(2298, 'Colors and styles for the token.')),
167
+ properties: {
168
+ foreground: {
169
+ type: 'string',
170
+ description: ( localize(2299, 'Foreground color for the token.')),
171
+ format: 'color-hex',
172
+ default: '#ff0000'
173
+ },
174
+ background: {
175
+ type: 'string',
176
+ deprecationMessage: ( localize(2300, 'Token background colors are currently not supported.'))
177
+ },
178
+ fontStyle: {
179
+ type: 'string',
180
+ description: ( localize(
181
+ 2301,
182
+ 'Sets the all font styles of the rule: \'italic\', \'bold\', \'underline\' or \'strikethrough\' or a combination. All styles that are not listed are unset. The empty string unsets all styles.'
183
+ )),
184
+ pattern: fontStylePattern,
185
+ patternErrorMessage: ( localize(
186
+ 2302,
187
+ 'Font style must be \'italic\', \'bold\', \'underline\' or \'strikethrough\' or a combination. The empty string unsets all styles.'
188
+ )),
189
+ defaultSnippets: [
190
+ { label: ( localize(2303, 'None (clear inherited style)')), bodyText: '""' },
191
+ { body: 'italic' },
192
+ { body: 'bold' },
193
+ { body: 'underline' },
194
+ { body: 'strikethrough' },
195
+ { body: 'italic bold' },
196
+ { body: 'italic underline' },
197
+ { body: 'italic strikethrough' },
198
+ { body: 'bold underline' },
199
+ { body: 'bold strikethrough' },
200
+ { body: 'underline strikethrough' },
201
+ { body: 'italic bold underline' },
202
+ { body: 'italic bold strikethrough' },
203
+ { body: 'italic underline strikethrough' },
204
+ { body: 'bold underline strikethrough' },
205
+ { body: 'italic bold underline strikethrough' }
206
+ ]
207
+ },
208
+ bold: {
209
+ type: 'boolean',
210
+ description: ( localize(
211
+ 2304,
212
+ 'Sets or unsets the font style to bold. Note, the presence of \'fontStyle\' overrides this setting.'
213
+ )),
214
+ },
215
+ italic: {
216
+ type: 'boolean',
217
+ description: ( localize(
218
+ 2305,
219
+ 'Sets or unsets the font style to italic. Note, the presence of \'fontStyle\' overrides this setting.'
220
+ )),
221
+ },
222
+ underline: {
223
+ type: 'boolean',
224
+ description: ( localize(
225
+ 2306,
226
+ 'Sets or unsets the font style to underline. Note, the presence of \'fontStyle\' overrides this setting.'
227
+ )),
228
+ },
229
+ strikethrough: {
230
+ type: 'boolean',
231
+ description: ( localize(
232
+ 2307,
233
+ 'Sets or unsets the font style to strikethrough. Note, the presence of \'fontStyle\' overrides this setting.'
234
+ )),
235
+ }
236
+ },
237
+ defaultSnippets: [{ body: { foreground: '${1:#FF0000}', fontStyle: '${2:bold}' } }]
238
+ }
239
+ }
240
+ };
241
+ this.tokenTypeById = Object.create(null);
242
+ this.tokenModifierById = Object.create(null);
243
+ this.typeHierarchy = Object.create(null);
244
+ }
245
+ registerTokenType(id, description, superType, deprecationMessage) {
246
+ if (!id.match(typeAndModifierIdPattern)) {
247
+ throw ( new Error('Invalid token type id.'));
248
+ }
249
+ if (superType && !superType.match(typeAndModifierIdPattern)) {
250
+ throw ( new Error('Invalid token super type id.'));
251
+ }
252
+ const num = this.currentTypeNumber++;
253
+ const tokenStyleContribution = { num, id, superType, description, deprecationMessage };
254
+ this.tokenTypeById[id] = tokenStyleContribution;
255
+ const stylingSchemeEntry = getStylingSchemeEntry(description, deprecationMessage);
256
+ this.tokenStylingSchema.properties[id] = stylingSchemeEntry;
257
+ this.typeHierarchy = Object.create(null);
258
+ }
259
+ registerTokenModifier(id, description, deprecationMessage) {
260
+ if (!id.match(typeAndModifierIdPattern)) {
261
+ throw ( new Error('Invalid token modifier id.'));
262
+ }
263
+ const num = this.currentModifierBit;
264
+ this.currentModifierBit = this.currentModifierBit * 2;
265
+ const tokenStyleContribution = { num, id, description, deprecationMessage };
266
+ this.tokenModifierById[id] = tokenStyleContribution;
267
+ this.tokenStylingSchema.properties[`*.${id}`] = getStylingSchemeEntry(description, deprecationMessage);
268
+ }
269
+ parseTokenSelector(selectorString, language) {
270
+ const selector = parseClassifierString(selectorString, language);
271
+ if (!selector.type) {
272
+ return {
273
+ match: () => -1,
274
+ id: '$invalid'
275
+ };
276
+ }
277
+ return {
278
+ match: (type, modifiers, language) => {
279
+ let score = 0;
280
+ if (selector.language !== undefined) {
281
+ if (selector.language !== language) {
282
+ return -1;
283
+ }
284
+ score += 10;
285
+ }
286
+ if (selector.type !== TOKEN_TYPE_WILDCARD) {
287
+ const hierarchy = this.getTypeHierarchy(type);
288
+ const level = hierarchy.indexOf(selector.type);
289
+ if (level === -1) {
290
+ return -1;
291
+ }
292
+ score += (100 - level);
293
+ }
294
+ for (const selectorModifier of selector.modifiers) {
295
+ if (modifiers.indexOf(selectorModifier) === -1) {
296
+ return -1;
297
+ }
298
+ }
299
+ return score + selector.modifiers.length * 100;
300
+ },
301
+ id: `${[selector.type, ...selector.modifiers.sort()].join('.')}${selector.language !== undefined ? ':' + selector.language : ''}`
302
+ };
303
+ }
304
+ registerTokenStyleDefault(selector, defaults) {
305
+ this.tokenStylingDefaultRules.push({ selector, defaults });
306
+ }
307
+ deregisterTokenStyleDefault(selector) {
308
+ const selectorString = selector.id;
309
+ this.tokenStylingDefaultRules = this.tokenStylingDefaultRules.filter(r => r.selector.id !== selectorString);
310
+ }
311
+ deregisterTokenType(id) {
312
+ delete this.tokenTypeById[id];
313
+ delete this.tokenStylingSchema.properties[id];
314
+ this.typeHierarchy = Object.create(null);
315
+ }
316
+ deregisterTokenModifier(id) {
317
+ delete this.tokenModifierById[id];
318
+ delete this.tokenStylingSchema.properties[`*.${id}`];
319
+ }
320
+ getTokenTypes() {
321
+ return ( ( Object.keys(this.tokenTypeById)).map(id => this.tokenTypeById[id]));
322
+ }
323
+ getTokenModifiers() {
324
+ return ( ( Object.keys(this.tokenModifierById)).map(id => this.tokenModifierById[id]));
325
+ }
326
+ getTokenStylingSchema() {
327
+ return this.tokenStylingSchema;
328
+ }
329
+ getTokenStylingDefaultRules() {
330
+ return this.tokenStylingDefaultRules;
331
+ }
332
+ getTypeHierarchy(typeId) {
333
+ let hierarchy = this.typeHierarchy[typeId];
334
+ if (!hierarchy) {
335
+ this.typeHierarchy[typeId] = hierarchy = [typeId];
336
+ let type = this.tokenTypeById[typeId];
337
+ while (type && type.superType) {
338
+ hierarchy.push(type.superType);
339
+ type = this.tokenTypeById[type.superType];
340
+ }
341
+ }
342
+ return hierarchy;
343
+ }
344
+ toString() {
345
+ const sorter = (a, b) => {
346
+ const cat1 = a.indexOf('.') === -1 ? 0 : 1;
347
+ const cat2 = b.indexOf('.') === -1 ? 0 : 1;
348
+ if (cat1 !== cat2) {
349
+ return cat1 - cat2;
350
+ }
351
+ return a.localeCompare(b);
352
+ };
353
+ return ( ( Object.keys(this.tokenTypeById)).sort(sorter).map(k => `- \`${k}\`: ${this.tokenTypeById[k].description}`)).join('\n');
354
+ }
355
+ }
356
+ const CHAR_LANGUAGE = TOKEN_CLASSIFIER_LANGUAGE_SEPARATOR.charCodeAt(0);
357
+ const CHAR_MODIFIER = CLASSIFIER_MODIFIER_SEPARATOR.charCodeAt(0);
358
+ function parseClassifierString(s, defaultLanguage) {
359
+ let k = s.length;
360
+ let language = defaultLanguage;
361
+ const modifiers = [];
362
+ for (let i = k - 1; i >= 0; i--) {
363
+ const ch = s.charCodeAt(i);
364
+ if (ch === CHAR_LANGUAGE || ch === CHAR_MODIFIER) {
365
+ const segment = s.substring(i + 1, k);
366
+ k = i;
367
+ if (ch === CHAR_LANGUAGE) {
368
+ language = segment;
369
+ }
370
+ else {
371
+ modifiers.push(segment);
372
+ }
373
+ }
374
+ }
375
+ const type = s.substring(0, k);
376
+ return { type, modifiers, language };
377
+ }
378
+ const tokenClassificationRegistry = createDefaultTokenClassificationRegistry();
379
+ Registry.add(Extensions.TokenClassificationContribution, tokenClassificationRegistry);
380
+ function createDefaultTokenClassificationRegistry() {
381
+ const registry = ( new TokenClassificationRegistry());
382
+ function registerTokenType(id, description, scopesToProbe = [], superType, deprecationMessage) {
383
+ registry.registerTokenType(id, description, superType, deprecationMessage);
384
+ if (scopesToProbe) {
385
+ registerTokenStyleDefault(id, scopesToProbe);
386
+ }
387
+ return id;
388
+ }
389
+ function registerTokenStyleDefault(selectorString, scopesToProbe) {
390
+ try {
391
+ const selector = registry.parseTokenSelector(selectorString);
392
+ registry.registerTokenStyleDefault(selector, { scopesToProbe });
393
+ }
394
+ catch (e) {
395
+ console.log(e);
396
+ }
397
+ }
398
+ registerTokenType('comment', ( localize(2308, "Style for comments.")), [['comment']]);
399
+ registerTokenType('string', ( localize(2309, "Style for strings.")), [['string']]);
400
+ registerTokenType('keyword', ( localize(2310, "Style for keywords.")), [['keyword.control']]);
401
+ registerTokenType('number', ( localize(2311, "Style for numbers.")), [['constant.numeric']]);
402
+ registerTokenType('regexp', ( localize(2312, "Style for expressions.")), [['constant.regexp']]);
403
+ registerTokenType('operator', ( localize(2313, "Style for operators.")), [['keyword.operator']]);
404
+ registerTokenType('namespace', ( localize(2314, "Style for namespaces.")), [['entity.name.namespace']]);
405
+ registerTokenType('type', ( localize(2315, "Style for types.")), [['entity.name.type'], ['support.type']]);
406
+ registerTokenType('struct', ( localize(2316, "Style for structs.")), [['entity.name.type.struct']]);
407
+ registerTokenType('class', ( localize(2317, "Style for classes.")), [['entity.name.type.class'], ['support.class']]);
408
+ registerTokenType('interface', ( localize(2318, "Style for interfaces.")), [['entity.name.type.interface']]);
409
+ registerTokenType('enum', ( localize(2319, "Style for enums.")), [['entity.name.type.enum']]);
410
+ registerTokenType('typeParameter', ( localize(2320, "Style for type parameters.")), [['entity.name.type.parameter']]);
411
+ registerTokenType('function', ( localize(2321, "Style for functions")), [['entity.name.function'], ['support.function']]);
412
+ registerTokenType('member', ( localize(2322, "Style for member functions")), [], 'method', 'Deprecated use `method` instead');
413
+ registerTokenType('method', ( localize(2323, "Style for method (member functions)")), [['entity.name.function.member'], ['support.function']]);
414
+ registerTokenType('macro', ( localize(2324, "Style for macros.")), [['entity.name.function.preprocessor']]);
415
+ registerTokenType('variable', ( localize(2325, "Style for variables.")), [['variable.other.readwrite'], ['entity.name.variable']]);
416
+ registerTokenType('parameter', ( localize(2326, "Style for parameters.")), [['variable.parameter']]);
417
+ registerTokenType('property', ( localize(2327, "Style for properties.")), [['variable.other.property']]);
418
+ registerTokenType('enumMember', ( localize(2328, "Style for enum members.")), [['variable.other.enummember']]);
419
+ registerTokenType('event', ( localize(2329, "Style for events.")), [['variable.other.event']]);
420
+ registerTokenType('decorator', ( localize(2330, "Style for decorators & annotations.")), [['entity.name.decorator'], ['entity.name.function']]);
421
+ registerTokenType('label', ( localize(2331, "Style for labels. ")), undefined);
422
+ registry.registerTokenModifier('declaration', ( localize(2332, "Style for all symbol declarations.")), undefined);
423
+ registry.registerTokenModifier('documentation', ( localize(2333, "Style to use for references in documentation.")), undefined);
424
+ registry.registerTokenModifier('static', ( localize(2334, "Style to use for symbols that are static.")), undefined);
425
+ registry.registerTokenModifier('abstract', ( localize(2335, "Style to use for symbols that are abstract.")), undefined);
426
+ registry.registerTokenModifier('deprecated', ( localize(2336, "Style to use for symbols that are deprecated.")), undefined);
427
+ registry.registerTokenModifier('modification', ( localize(2337, "Style to use for write accesses.")), undefined);
428
+ registry.registerTokenModifier('async', ( localize(2338, "Style to use for symbols that are async.")), undefined);
429
+ registry.registerTokenModifier('readonly', ( localize(2339, "Style to use for symbols that are read-only.")), undefined);
430
+ registerTokenStyleDefault('variable.readonly', [['variable.other.constant']]);
431
+ registerTokenStyleDefault('property.readonly', [['variable.other.constant.property']]);
432
+ registerTokenStyleDefault('type.defaultLibrary', [['support.type']]);
433
+ registerTokenStyleDefault('class.defaultLibrary', [['support.class']]);
434
+ registerTokenStyleDefault('interface.defaultLibrary', [['support.class']]);
435
+ registerTokenStyleDefault('variable.defaultLibrary', [['support.variable'], ['support.other.variable']]);
436
+ registerTokenStyleDefault('variable.defaultLibrary.readonly', [['support.constant']]);
437
+ registerTokenStyleDefault('property.defaultLibrary', [['support.variable.property']]);
438
+ registerTokenStyleDefault('property.defaultLibrary.readonly', [['support.constant.property']]);
439
+ registerTokenStyleDefault('function.defaultLibrary', [['support.function']]);
440
+ registerTokenStyleDefault('member.defaultLibrary', [['support.function']]);
441
+ return registry;
442
+ }
443
+ function getTokenClassificationRegistry() {
444
+ return tokenClassificationRegistry;
445
+ }
446
+ function getStylingSchemeEntry(description, deprecationMessage) {
447
+ return {
448
+ description,
449
+ deprecationMessage,
450
+ defaultSnippets: [{ body: '${1:#ff0000}' }],
451
+ anyOf: [
452
+ {
453
+ type: 'string',
454
+ format: 'color-hex'
455
+ },
456
+ {
457
+ $ref: '#/definitions/style'
458
+ }
459
+ ]
460
+ };
461
+ }
462
+ const tokenStylingSchemaId = 'vscode://schemas/token-styling';
463
+ const schemaRegistry = Registry.as(Extensions$1.JSONContribution);
464
+ schemaRegistry.registerSchema(tokenStylingSchemaId, tokenClassificationRegistry.getTokenStylingSchema());
465
+ const delayer = ( new RunOnceScheduler(() => schemaRegistry.notifySchemaChanged(tokenStylingSchemaId), 200));
466
+ tokenClassificationRegistry.onDidChangeSchema(() => {
467
+ if (!delayer.isScheduled()) {
468
+ delayer.schedule();
469
+ }
470
+ });
471
+
472
+ export { SemanticTokenRule, TokenStyle, getTokenClassificationRegistry, parseClassifierString, tokenStylingSchemaId, typeAndModifierIdPattern };
@@ -0,0 +1,24 @@
1
+ export declare const extensionsViewIcon: import("@codingame/monaco-vscode-api/vscode/vs/base/common/themables").ThemeIcon;
2
+ export declare const manageExtensionIcon: import("@codingame/monaco-vscode-api/vscode/vs/base/common/themables").ThemeIcon;
3
+ export declare const clearSearchResultsIcon: import("@codingame/monaco-vscode-api/vscode/vs/base/common/themables").ThemeIcon;
4
+ export declare const refreshIcon: import("@codingame/monaco-vscode-api/vscode/vs/base/common/themables").ThemeIcon;
5
+ export declare const filterIcon: import("@codingame/monaco-vscode-api/vscode/vs/base/common/themables").ThemeIcon;
6
+ export declare const installLocalInRemoteIcon: import("@codingame/monaco-vscode-api/vscode/vs/base/common/themables").ThemeIcon;
7
+ export declare const installWorkspaceRecommendedIcon: import("@codingame/monaco-vscode-api/vscode/vs/base/common/themables").ThemeIcon;
8
+ export declare const configureRecommendedIcon: import("@codingame/monaco-vscode-api/vscode/vs/base/common/themables").ThemeIcon;
9
+ export declare const syncEnabledIcon: import("@codingame/monaco-vscode-api/vscode/vs/base/common/themables").ThemeIcon;
10
+ export declare const syncIgnoredIcon: import("@codingame/monaco-vscode-api/vscode/vs/base/common/themables").ThemeIcon;
11
+ export declare const remoteIcon: import("@codingame/monaco-vscode-api/vscode/vs/base/common/themables").ThemeIcon;
12
+ export declare const installCountIcon: import("@codingame/monaco-vscode-api/vscode/vs/base/common/themables").ThemeIcon;
13
+ export declare const privateExtensionIcon: import("@codingame/monaco-vscode-api/vscode/vs/base/common/themables").ThemeIcon;
14
+ export declare const ratingIcon: import("@codingame/monaco-vscode-api/vscode/vs/base/common/themables").ThemeIcon;
15
+ export declare const preReleaseIcon: import("@codingame/monaco-vscode-api/vscode/vs/base/common/themables").ThemeIcon;
16
+ export declare const sponsorIcon: import("@codingame/monaco-vscode-api/vscode/vs/base/common/themables").ThemeIcon;
17
+ export declare const starFullIcon: import("@codingame/monaco-vscode-api/vscode/vs/base/common/themables").ThemeIcon;
18
+ export declare const starHalfIcon: import("@codingame/monaco-vscode-api/vscode/vs/base/common/themables").ThemeIcon;
19
+ export declare const starEmptyIcon: import("@codingame/monaco-vscode-api/vscode/vs/base/common/themables").ThemeIcon;
20
+ export declare const errorIcon: import("@codingame/monaco-vscode-api/vscode/vs/base/common/themables").ThemeIcon;
21
+ export declare const warningIcon: import("@codingame/monaco-vscode-api/vscode/vs/base/common/themables").ThemeIcon;
22
+ export declare const infoIcon: import("@codingame/monaco-vscode-api/vscode/vs/base/common/themables").ThemeIcon;
23
+ export declare const trustIcon: import("@codingame/monaco-vscode-api/vscode/vs/base/common/themables").ThemeIcon;
24
+ export declare const activationTimeIcon: import("@codingame/monaco-vscode-api/vscode/vs/base/common/themables").ThemeIcon;
@@ -0,0 +1,61 @@
1
+
2
+ import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
3
+ import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
4
+ import { registerIcon } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/iconRegistry';
5
+
6
+ const extensionsViewIcon = registerIcon('extensions-view-icon', Codicon.extensions, ( localize(6730, 'View icon of the extensions view.')));
7
+ const manageExtensionIcon = registerIcon('extensions-manage', Codicon.gear, ( localize(6731, 'Icon for the \'Manage\' action in the extensions view.')));
8
+ const clearSearchResultsIcon = registerIcon('extensions-clear-search-results', Codicon.clearAll, ( localize(
9
+ 6732,
10
+ 'Icon for the \'Clear Search Result\' action in the extensions view.'
11
+ )));
12
+ const refreshIcon = registerIcon('extensions-refresh', Codicon.refresh, ( localize(6733, 'Icon for the \'Refresh\' action in the extensions view.')));
13
+ const filterIcon = registerIcon('extensions-filter', Codicon.filter, ( localize(6734, 'Icon for the \'Filter\' action in the extensions view.')));
14
+ const installLocalInRemoteIcon = registerIcon('extensions-install-local-in-remote', Codicon.cloudDownload, ( localize(
15
+ 6735,
16
+ 'Icon for the \'Install Local Extension in Remote\' action in the extensions view.'
17
+ )));
18
+ const installWorkspaceRecommendedIcon = registerIcon('extensions-install-workspace-recommended', Codicon.cloudDownload, ( localize(
19
+ 6736,
20
+ 'Icon for the \'Install Workspace Recommended Extensions\' action in the extensions view.'
21
+ )));
22
+ const configureRecommendedIcon = registerIcon('extensions-configure-recommended', Codicon.pencil, ( localize(
23
+ 6737,
24
+ 'Icon for the \'Configure Recommended Extensions\' action in the extensions view.'
25
+ )));
26
+ const syncEnabledIcon = registerIcon('extensions-sync-enabled', Codicon.sync, ( localize(6738, 'Icon to indicate that an extension is synced.')));
27
+ const syncIgnoredIcon = registerIcon('extensions-sync-ignored', Codicon.syncIgnored, ( localize(6739, 'Icon to indicate that an extension is ignored when syncing.')));
28
+ const remoteIcon = registerIcon('extensions-remote', Codicon.remote, ( localize(
29
+ 6740,
30
+ 'Icon to indicate that an extension is remote in the extensions view and editor.'
31
+ )));
32
+ const installCountIcon = registerIcon('extensions-install-count', Codicon.cloudDownload, ( localize(
33
+ 6741,
34
+ 'Icon shown along with the install count in the extensions view and editor.'
35
+ )));
36
+ const privateExtensionIcon = registerIcon('extensions-private', Codicon.lock, ( localize(
37
+ 6742,
38
+ 'Icon shown for private extensions in the extensions view and editor.'
39
+ )));
40
+ const ratingIcon = registerIcon('extensions-rating', Codicon.star, ( localize(
41
+ 6743,
42
+ 'Icon shown along with the rating in the extensions view and editor.'
43
+ )));
44
+ const preReleaseIcon = registerIcon('extensions-pre-release', Codicon.versions, ( localize(
45
+ 6744,
46
+ 'Icon shown for extensions having pre-release versions in extensions view and editor.'
47
+ )));
48
+ const sponsorIcon = registerIcon('extensions-sponsor', Codicon.heartFilled, ( localize(
49
+ 6745,
50
+ 'Icon used for sponsoring extensions in the extensions view and editor.'
51
+ )));
52
+ const starFullIcon = registerIcon('extensions-star-full', Codicon.starFull, ( localize(6746, 'Full star icon used for the rating in the extensions editor.')));
53
+ const starHalfIcon = registerIcon('extensions-star-half', Codicon.starHalf, ( localize(6747, 'Half star icon used for the rating in the extensions editor.')));
54
+ const starEmptyIcon = registerIcon('extensions-star-empty', Codicon.starEmpty, ( localize(6748, 'Empty star icon used for the rating in the extensions editor.')));
55
+ const errorIcon = registerIcon('extensions-error-message', Codicon.error, ( localize(6749, 'Icon shown with a error message in the extensions editor.')));
56
+ const warningIcon = registerIcon('extensions-warning-message', Codicon.warning, ( localize(6750, 'Icon shown with a warning message in the extensions editor.')));
57
+ const infoIcon = registerIcon('extensions-info-message', Codicon.info, ( localize(6751, 'Icon shown with an info message in the extensions editor.')));
58
+ const trustIcon = registerIcon('extension-workspace-trust', Codicon.shield, ( localize(6752, 'Icon shown with a workspace trust message in the extension editor.')));
59
+ const activationTimeIcon = registerIcon('extension-activation-time', Codicon.history, ( localize(6753, 'Icon shown with a activation time message in the extension editor.')));
60
+
61
+ export { activationTimeIcon, clearSearchResultsIcon, configureRecommendedIcon, errorIcon, extensionsViewIcon, filterIcon, infoIcon, installCountIcon, installLocalInRemoteIcon, installWorkspaceRecommendedIcon, manageExtensionIcon, preReleaseIcon, privateExtensionIcon, ratingIcon, refreshIcon, remoteIcon, sponsorIcon, starEmptyIcon, starFullIcon, starHalfIcon, syncEnabledIcon, syncIgnoredIcon, trustIcon, warningIcon };
@@ -0,0 +1,3 @@
1
+ export declare const extensionDefaultIcon: import("@codingame/monaco-vscode-api/vscode/vs/base/common/themables").ThemeIcon;
2
+ export declare const verifiedPublisherIcon: import("@codingame/monaco-vscode-api/vscode/vs/base/common/themables").ThemeIcon;
3
+ export declare const extensionVerifiedPublisherIconColor: string;
@@ -0,0 +1,27 @@
1
+
2
+ import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
3
+ import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
4
+ import { registerColor } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colorUtils';
5
+ import { textLinkForeground } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/baseColors';
6
+ import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/chartsColors';
7
+ import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/editorColors';
8
+ import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/inputColors';
9
+ import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/listColors';
10
+ import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/menuColors';
11
+ import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/minimapColors';
12
+ import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/miscColors';
13
+ import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/quickpickColors';
14
+ import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/searchColors';
15
+ import { registerIcon } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/iconRegistry';
16
+
17
+ const extensionDefaultIcon = registerIcon('extension-default-icon', Codicon.extensionsLarge, ( localize(
18
+ 12557,
19
+ 'Icon used for the default extension in the extensions view and editor.'
20
+ )));
21
+ const verifiedPublisherIcon = registerIcon('extensions-verified-publisher', Codicon.verifiedFilled, ( localize(
22
+ 12558,
23
+ 'Icon used for the verified extension publisher in the extensions view and editor.'
24
+ )));
25
+ const extensionVerifiedPublisherIconColor = registerColor('extensionIcon.verifiedForeground', textLinkForeground, ( localize(12559, "The icon color for extension verified publisher.")), false);
26
+
27
+ export { extensionDefaultIcon, extensionVerifiedPublisherIconColor, verifiedPublisherIcon };
@@ -0,0 +1,24 @@
1
+ import { Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event";
2
+ import { ColorScheme } from "@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/theme";
3
+ import { IThemeService } from "@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/themeService.service";
4
+ import { IWorkbenchColorTheme, ThemeSettingTarget, IWorkbenchFileIconTheme, IWorkbenchProductIconTheme } from "@codingame/monaco-vscode-9d0168a3-519b-57f3-9bcc-89efc41f951a-common/vscode/vs/workbench/services/themes/common/workbenchThemeService";
5
+ export declare const IWorkbenchThemeService: import("@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation").ServiceIdentifier<IWorkbenchThemeService>;
6
+ export interface IWorkbenchThemeService extends IThemeService {
7
+ readonly _serviceBrand: undefined;
8
+ setColorTheme(themeId: string | undefined | IWorkbenchColorTheme, settingsTarget: ThemeSettingTarget): Promise<IWorkbenchColorTheme | null>;
9
+ getColorTheme(): IWorkbenchColorTheme;
10
+ getColorThemes(): Promise<IWorkbenchColorTheme[]>;
11
+ getMarketplaceColorThemes(publisher: string, name: string, version: string): Promise<IWorkbenchColorTheme[]>;
12
+ onDidColorThemeChange: Event<IWorkbenchColorTheme>;
13
+ getPreferredColorScheme(): ColorScheme | undefined;
14
+ setFileIconTheme(iconThemeId: string | undefined | IWorkbenchFileIconTheme, settingsTarget: ThemeSettingTarget): Promise<IWorkbenchFileIconTheme>;
15
+ getFileIconTheme(): IWorkbenchFileIconTheme;
16
+ getFileIconThemes(): Promise<IWorkbenchFileIconTheme[]>;
17
+ getMarketplaceFileIconThemes(publisher: string, name: string, version: string): Promise<IWorkbenchFileIconTheme[]>;
18
+ onDidFileIconThemeChange: Event<IWorkbenchFileIconTheme>;
19
+ setProductIconTheme(iconThemeId: string | undefined | IWorkbenchProductIconTheme, settingsTarget: ThemeSettingTarget): Promise<IWorkbenchProductIconTheme>;
20
+ getProductIconTheme(): IWorkbenchProductIconTheme;
21
+ getProductIconThemes(): Promise<IWorkbenchProductIconTheme[]>;
22
+ getMarketplaceProductIconThemes(publisher: string, name: string, version: string): Promise<IWorkbenchProductIconTheme[]>;
23
+ onDidProductIconThemeChange: Event<IWorkbenchProductIconTheme>;
24
+ }
@@ -0,0 +1,7 @@
1
+
2
+ import { refineServiceDecorator } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
3
+ import { IThemeService } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/themeService.service';
4
+
5
+ const IWorkbenchThemeService = refineServiceDecorator(IThemeService);
6
+
7
+ export { IWorkbenchThemeService };