@codingame/monaco-vscode-theme-service-override 29.1.0 → 30.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.
@@ -3,7 +3,7 @@ import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib
3
3
  import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
4
4
  import { isUndefined, isString } from '@codingame/monaco-vscode-api/vscode/vs/base/common/types';
5
5
  import { IExtensionService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions.service';
6
- import { ThemeSettingDefaults, COLOR_THEME_LIGHT_INITIAL_COLORS, COLOR_THEME_DARK_INITIAL_COLORS, ThemeSettings, migrateThemeSettingsId, ExtensionData } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/themes/common/workbenchThemeService';
6
+ import { ThemeSettingDefaults, COLOR_THEME_LIGHT_INITIAL_COLORS, COLOR_THEME_DARK_INITIAL_COLORS, migrateThemeSettingsId, ThemeSettings, ExtensionData } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/themes/common/workbenchThemeService';
7
7
  import '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
8
8
  import { StorageScope, StorageTarget } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage';
9
9
  import { IStorageService } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service';
@@ -14,7 +14,7 @@ import { ConfigurationTarget } from '@codingame/monaco-vscode-api/vscode/vs/plat
14
14
  import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
15
15
  import { ColorThemeData } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/themes/common/colorThemeData';
16
16
  import { Extensions } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/themeService';
17
- import { Emitter, Event } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
17
+ import { Emitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
18
18
  import { registerFileIconThemeSchemas } from '../common/fileIconThemeSchema.js';
19
19
  import { Disposable, DisposableStore } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
20
20
  import { FileIconThemeData, FileIconThemeLoader } from './fileIconThemeData.js';
@@ -55,7 +55,8 @@ import { mainWindow } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/
55
55
  import { generateColorThemeCSS } from './colorThemeCss.js';
56
56
  import '@codingame/monaco-vscode-api/vscode/vs/platform/notification/common/notification';
57
57
  import { INotificationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/notification/common/notification.service';
58
- import { ICommandService } from '@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service';
58
+ import { IHostService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/host/browser/host.service';
59
+ import { toAction } from '@codingame/monaco-vscode-api/vscode/vs/base/common/actions';
59
60
  import Severity from '@codingame/monaco-vscode-api/vscode/vs/base/common/severity';
60
61
 
61
62
  var WorkbenchThemeService_1;
@@ -100,7 +101,7 @@ let WorkbenchThemeService = class WorkbenchThemeService extends Disposable {
100
101
  userDataInitializationService,
101
102
  languageService,
102
103
  notificationService,
103
- commandService
104
+ hostService
104
105
  ) {
105
106
  super();
106
107
  this.storageService = storageService;
@@ -113,11 +114,10 @@ let WorkbenchThemeService = class WorkbenchThemeService extends Disposable {
113
114
  this.userDataInitializationService = userDataInitializationService;
114
115
  this.languageService = languageService;
115
116
  this.notificationService = notificationService;
116
- this.commandService = commandService;
117
+ this.hostService = hostService;
117
118
  this.themeExtensionsActivated = ( new Map());
118
119
  this.container = layoutService.mainContainer;
119
- const isNewUser = this.storageService.isNew(StorageScope.APPLICATION);
120
- this.settings = ( new ThemeConfiguration(configurationService, hostColorService, isNewUser));
120
+ this.settings = ( new ThemeConfiguration(configurationService, hostColorService));
121
121
  this.colorThemeRegistry = this._register(( new ThemeRegistry(colorThemesExtPoint, ColorThemeData.fromExtensionTheme)));
122
122
  this.colorThemeWatcher = this._register(( new ThemeFileWatcher(fileService, environmentService, this.reloadCurrentColorTheme.bind(this))));
123
123
  this.onColorThemeChange = this._register(( new Emitter({
@@ -160,6 +160,7 @@ let WorkbenchThemeService = class WorkbenchThemeService extends Disposable {
160
160
  this.onDidColorThemeChange(theme => getColorRegistry().notifyThemeUpdate(theme))
161
161
  );
162
162
  let themeData = ColorThemeData.fromStorageData(this.storageService);
163
+ const previousColorThemeSetting = themeData?.settingsId;
163
164
  const colorThemeSetting = this.settings.colorTheme;
164
165
  if (themeData && colorThemeSetting !== themeData.settingsId) {
165
166
  themeData = undefined;
@@ -189,7 +190,7 @@ let WorkbenchThemeService = class WorkbenchThemeService extends Disposable {
189
190
  this.installConfigurationListener();
190
191
  this.installPreferredSchemeListener();
191
192
  this.installRegistryListeners();
192
- this.initialize().catch(onUnexpectedError);
193
+ this.initialize(previousColorThemeSetting).catch(onUnexpectedError);
193
194
  });
194
195
  const codiconStyleSheet = createStyleSheet();
195
196
  codiconStyleSheet.id = "codiconStyles";
@@ -201,7 +202,7 @@ let WorkbenchThemeService = class WorkbenchThemeService extends Disposable {
201
202
  this._register(iconsStyleSheet.onDidChange(() => delayer.schedule()));
202
203
  delayer.schedule();
203
204
  }
204
- async initialize() {
205
+ async initialize(themePreviousSettingsId) {
205
206
  const extDevLocs = this.environmentService.extensionDevelopmentLocationURI;
206
207
  const extDevLoc = extDevLocs && extDevLocs.length === 1 ? extDevLocs[0] : undefined;
207
208
  const initializeColorTheme = async () => {
@@ -243,44 +244,72 @@ let WorkbenchThemeService = class WorkbenchThemeService extends Disposable {
243
244
  return this.setProductIconTheme(theme ? theme.id : DEFAULT_PRODUCT_ICON_THEME_ID, undefined);
244
245
  };
245
246
  this.migrateColorThemeSettings();
246
- await this.migrateAutoDetectColorScheme();
247
247
  const result = await Promise.all([
248
248
  initializeColorTheme(),
249
249
  initializeFileIconTheme(),
250
250
  initializeProductIconTheme()
251
251
  ]);
252
- this.showNewDefaultThemeNotification();
252
+ await this.showNewDefaultThemeNotification(themePreviousSettingsId);
253
253
  return result;
254
254
  }
255
255
  static {
256
256
  this.NEW_THEME_NOTIFICATION_KEY = "workbench.newDefaultThemeNotification";
257
257
  }
258
- showNewDefaultThemeNotification() {
259
- const newDefaultThemes = ( new Set([
260
- ThemeSettingDefaults.COLOR_THEME_DARK,
261
- ThemeSettingDefaults.COLOR_THEME_LIGHT
262
- ]));
263
- if (( newDefaultThemes.has(this.currentColorTheme.settingsId))) {
264
- return;
265
- }
258
+ async showNewDefaultThemeNotification(previousSettingsId) {
266
259
  if (this.storageService.getBoolean(
267
260
  WorkbenchThemeService_1.NEW_THEME_NOTIFICATION_KEY,
268
261
  StorageScope.APPLICATION
269
262
  )) {
270
263
  return;
271
264
  }
272
- const handle = this.notificationService.prompt(Severity.Info, ( localize(16339, "New default themes are available for VS Code.")), [{
273
- label: ( localize(16340, "Try Them Out")),
274
- run: () => this.commandService.executeCommand("workbench.action.tryNewDefaultThemes")
275
- }]);
276
- this._register(Event.once(handle.onDidClose)(() => {
265
+ if (!(await this.hostService.hadLastFocus()) || this.environmentService.isSessionsWindow) {
266
+ return;
267
+ }
268
+ try {
269
+ if (!this.settings.isDefaultColorTheme() || !previousSettingsId) {
270
+ return;
271
+ }
272
+ previousSettingsId = migrateThemeSettingsId(previousSettingsId);
273
+ if (!["Dark Modern", "Light Modern"].includes(previousSettingsId)) {
274
+ return;
275
+ }
276
+ if (![
277
+ ThemeSettingDefaults.COLOR_THEME_DARK,
278
+ ThemeSettingDefaults.COLOR_THEME_LIGHT
279
+ ].includes(this.settings.colorTheme)) {
280
+ return;
281
+ }
282
+ } finally {
277
283
  this.storageService.store(
278
284
  WorkbenchThemeService_1.NEW_THEME_NOTIFICATION_KEY,
279
285
  true,
280
286
  StorageScope.APPLICATION,
281
287
  StorageTarget.USER
282
288
  );
289
+ }
290
+ const keepTheme = await ( new Promise(resolve => {
291
+ this.notificationService.prompt(Severity.Info, ( localize(
292
+ 16425,
293
+ "VS Code has a new default theme: '{0}'.",
294
+ this.getColorTheme().label
295
+ )), [toAction({
296
+ id: "themeUpdated.tryItOut",
297
+ label: ( localize(16426, "Keep It")),
298
+ run: () => resolve(true)
299
+ }), toAction({
300
+ id: "themeUpdated.noThanks",
301
+ label: ( localize(16427, "No Thanks")),
302
+ run: () => resolve(false)
303
+ })], {
304
+ onCancel: () => resolve(false)
305
+ });
283
306
  }));
307
+ if (!keepTheme) {
308
+ const previousTheme = this.colorThemeRegistry.findThemeBySettingsId(previousSettingsId);
309
+ if (previousTheme) {
310
+ this.setColorTheme(previousTheme.id, "auto");
311
+ }
312
+ }
284
313
  }
285
314
  migrateColorThemeSettings() {
286
315
  const themeSettings = [
@@ -306,16 +335,6 @@ let WorkbenchThemeService = class WorkbenchThemeService extends Disposable {
306
335
  }
307
336
  }
308
337
  }
309
- async migrateAutoDetectColorScheme() {
310
- if (!this.storageService.isNew(StorageScope.APPLICATION)) {
311
- return;
312
- }
313
- await this.userDataInitializationService.whenInitializationFinished();
314
- const inspection = this.configurationService.inspect(ThemeSettings.DETECT_COLOR_SCHEME);
315
- if (inspection.userValue === undefined && inspection.userLocalValue === undefined && inspection.userRemoteValue === undefined) {
316
- await this.configurationService.updateValue(ThemeSettings.DETECT_COLOR_SCHEME, true, ConfigurationTarget.USER);
317
- }
318
- }
319
338
  installConfigurationListener() {
320
339
  this._register(this.configurationService.onDidChangeConfiguration(e => {
321
340
  if (e.affectsConfiguration(ThemeSettings.COLOR_THEME) || e.affectsConfiguration(ThemeSettings.PREFERRED_DARK_THEME) || e.affectsConfiguration(ThemeSettings.PREFERRED_LIGHT_THEME) || e.affectsConfiguration(ThemeSettings.PREFERRED_HC_DARK_THEME) || e.affectsConfiguration(ThemeSettings.PREFERRED_HC_LIGHT_THEME) || e.affectsConfiguration(ThemeSettings.DETECT_COLOR_SCHEME) || e.affectsConfiguration(ThemeSettings.DETECT_HC) || e.affectsConfiguration(ThemeSettings.SYSTEM_COLOR_THEME)) {
@@ -475,7 +494,7 @@ let WorkbenchThemeService = class WorkbenchThemeService extends Disposable {
475
494
  return this.applyTheme(themeData, settingsTarget);
476
495
  } catch (error) {
477
496
  throw ( new Error(( localize(
478
- 16341,
497
+ 16428,
479
498
  "Unable to load {0}: {1}",
480
499
  themeData.location?.toString(),
481
500
  error.message
@@ -750,7 +769,7 @@ let WorkbenchThemeService = class WorkbenchThemeService extends Disposable {
750
769
  }
751
770
  }
752
771
  };
753
- WorkbenchThemeService = WorkbenchThemeService_1 = ( __decorate([( __param(0, IExtensionService)), ( __param(1, IStorageService)), ( __param(2, IConfigurationService)), ( __param(3, ITelemetryService)), ( __param(4, IBrowserWorkbenchEnvironmentService)), ( __param(5, IFileService)), ( __param(6, IExtensionResourceLoaderService)), ( __param(7, IWorkbenchLayoutService)), ( __param(8, ILogService)), ( __param(9, IHostColorSchemeService)), ( __param(10, IUserDataInitializationService)), ( __param(11, ILanguageService)), ( __param(12, INotificationService)), ( __param(13, ICommandService))], WorkbenchThemeService));
772
+ WorkbenchThemeService = WorkbenchThemeService_1 = ( __decorate([( __param(0, IExtensionService)), ( __param(1, IStorageService)), ( __param(2, IConfigurationService)), ( __param(3, ITelemetryService)), ( __param(4, IBrowserWorkbenchEnvironmentService)), ( __param(5, IFileService)), ( __param(6, IExtensionResourceLoaderService)), ( __param(7, IWorkbenchLayoutService)), ( __param(8, ILogService)), ( __param(9, IHostColorSchemeService)), ( __param(10, IUserDataInitializationService)), ( __param(11, ILanguageService)), ( __param(12, INotificationService)), ( __param(13, IHostService))], WorkbenchThemeService));
754
773
  class ThemeFileWatcher {
755
774
  constructor(fileService, environmentService, onUpdate) {
756
775
  this.fileService = fileService;
@@ -133,31 +133,31 @@ const textmateColorSchema = {
133
133
  },
134
134
  settings: {
135
135
  type: "object",
136
- description: ( localize(16372, "Colors and styles for the token.")),
136
+ description: ( localize(16459, "Colors and styles for the token.")),
137
137
  properties: {
138
138
  foreground: {
139
139
  type: "string",
140
- description: ( localize(16373, "Foreground color for the token.")),
140
+ description: ( localize(16460, "Foreground color for the token.")),
141
141
  format: "color-hex",
142
142
  default: "#ff0000"
143
143
  },
144
144
  background: {
145
145
  type: "string",
146
- deprecationMessage: ( localize(16374, "Token background colors are currently not supported."))
146
+ deprecationMessage: ( localize(16461, "Token background colors are currently not supported."))
147
147
  },
148
148
  fontStyle: {
149
149
  type: "string",
150
150
  description: ( localize(
151
- 16375,
151
+ 16462,
152
152
  "Font style of the rule: 'italic', 'bold', 'underline', 'strikethrough' or a combination. The empty string unsets inherited settings."
153
153
  )),
154
154
  pattern: "^(\\s*\\b(italic|bold|underline|strikethrough))*\\s*$",
155
155
  patternErrorMessage: ( localize(
156
- 16376,
156
+ 16463,
157
157
  "Font style must be 'italic', 'bold', 'underline', 'strikethrough' or a combination or the empty string."
158
158
  )),
159
159
  defaultSnippets: [{
160
- label: ( localize(16377, "None (clear inherited style)")),
160
+ label: ( localize(16464, "None (clear inherited style)")),
161
161
  bodyText: "\"\""
162
162
  }, {
163
163
  body: "italic"
@@ -194,21 +194,21 @@ const textmateColorSchema = {
194
194
  fontFamily: {
195
195
  type: "string",
196
196
  description: ( localize(
197
- 16378,
197
+ 16465,
198
198
  "Font family for the token (e.g., \"Fira Code\", \"JetBrains Mono\")."
199
199
  ))
200
200
  },
201
201
  fontSize: {
202
202
  type: "number",
203
203
  description: ( localize(
204
- 16379,
204
+ 16466,
205
205
  "Font size multiplier for the token (e.g., 1.2 will use 1.2 times the default font size)."
206
206
  ))
207
207
  },
208
208
  lineHeight: {
209
209
  type: "number",
210
210
  description: ( localize(
211
- 16380,
211
+ 16467,
212
212
  "Line height multiplier for the token (e.g., 1.2 will use 1.2 times the default height). If the font size is set and the line height is not explicitly set, the line height will be computed based on the font size."
213
213
  ))
214
214
  }
@@ -235,10 +235,10 @@ const textmateColorSchema = {
235
235
  properties: {
236
236
  name: {
237
237
  type: "string",
238
- description: ( localize(16381, "Description of the rule."))
238
+ description: ( localize(16468, "Description of the rule."))
239
239
  },
240
240
  scope: {
241
- description: ( localize(16382, "Scope selector against which this rule matches.")),
241
+ description: ( localize(16469, "Scope selector against which this rule matches.")),
242
242
  anyOf: [{
243
243
  enum: textMateScopes
244
244
  }, {
@@ -270,26 +270,26 @@ const colorThemeSchema = {
270
270
  allowTrailingCommas: true,
271
271
  properties: {
272
272
  colors: {
273
- description: ( localize(16383, "Colors in the workbench")),
273
+ description: ( localize(16470, "Colors in the workbench")),
274
274
  $ref: workbenchColorsSchemaId,
275
275
  additionalProperties: false
276
276
  },
277
277
  tokenColors: {
278
278
  anyOf: [{
279
279
  type: "string",
280
- description: ( localize(16384, "Path to a tmTheme file (relative to the current file)."))
280
+ description: ( localize(16471, "Path to a tmTheme file (relative to the current file)."))
281
281
  }, {
282
- description: ( localize(16385, "Colors for syntax highlighting")),
282
+ description: ( localize(16472, "Colors for syntax highlighting")),
283
283
  $ref: textmateColorsSchemaId
284
284
  }]
285
285
  },
286
286
  semanticHighlighting: {
287
287
  type: "boolean",
288
- description: ( localize(16386, "Whether semantic highlighting should be enabled for this theme."))
288
+ description: ( localize(16473, "Whether semantic highlighting should be enabled for this theme."))
289
289
  },
290
290
  semanticTokenColors: {
291
291
  type: "object",
292
- description: ( localize(16387, "Colors for semantic tokens")),
292
+ description: ( localize(16474, "Colors for semantic tokens")),
293
293
  $ref: tokenStylingSchemaId
294
294
  }
295
295
  }
@@ -13,113 +13,113 @@ const schema = {
13
13
  folderExpanded: {
14
14
  type: "string",
15
15
  description: ( localize(
16
- 16388,
16
+ 16475,
17
17
  "The folder icon for expanded folders. The expanded folder icon is optional. If not set, the icon defined for folder will be shown."
18
18
  ))
19
19
  },
20
20
  folder: {
21
21
  type: "string",
22
22
  description: ( localize(
23
- 16389,
23
+ 16476,
24
24
  "The folder icon for collapsed folders, and if folderExpanded is not set, also for expanded folders."
25
25
  ))
26
26
  },
27
27
  file: {
28
28
  type: "string",
29
29
  description: ( localize(
30
- 16390,
30
+ 16477,
31
31
  "The default file icon, shown for all files that don't match any extension, filename or language id."
32
32
  ))
33
33
  },
34
34
  rootFolder: {
35
35
  type: "string",
36
36
  description: ( localize(
37
- 16391,
37
+ 16478,
38
38
  "The folder icon for collapsed root folders, and if rootFolderExpanded is not set, also for expanded root folders."
39
39
  ))
40
40
  },
41
41
  rootFolderExpanded: {
42
42
  type: "string",
43
43
  description: ( localize(
44
- 16392,
44
+ 16479,
45
45
  "The folder icon for expanded root folders. The expanded root folder icon is optional. If not set, the icon defined for root folder will be shown."
46
46
  ))
47
47
  },
48
48
  rootFolderNames: {
49
49
  type: "object",
50
50
  description: ( localize(
51
- 16393,
51
+ 16480,
52
52
  "Associates root folder names to icons. The object key is the root folder name. No patterns or wildcards are allowed. Root folder name matching is case insensitive."
53
53
  )),
54
54
  additionalProperties: {
55
55
  type: "string",
56
- description: ( localize(16394, "The ID of the icon definition for the association."))
56
+ description: ( localize(16481, "The ID of the icon definition for the association."))
57
57
  }
58
58
  },
59
59
  rootFolderNamesExpanded: {
60
60
  type: "object",
61
61
  description: ( localize(
62
- 16395,
62
+ 16482,
63
63
  "Associates root folder names to icons for expanded root folders. The object key is the root folder name. No patterns or wildcards are allowed. Root folder name matching is case insensitive."
64
64
  )),
65
65
  additionalProperties: {
66
66
  type: "string",
67
- description: ( localize(16396, "The ID of the icon definition for the association."))
67
+ description: ( localize(16483, "The ID of the icon definition for the association."))
68
68
  }
69
69
  },
70
70
  folderNames: {
71
71
  type: "object",
72
72
  description: ( localize(
73
- 16397,
73
+ 16484,
74
74
  "Associates folder names to icons. The object key is the folder name, not including any path segments. No patterns or wildcards are allowed. Folder name matching is case insensitive."
75
75
  )),
76
76
  additionalProperties: {
77
77
  type: "string",
78
- description: ( localize(16394, "The ID of the icon definition for the association."))
78
+ description: ( localize(16481, "The ID of the icon definition for the association."))
79
79
  }
80
80
  },
81
81
  folderNamesExpanded: {
82
82
  type: "object",
83
83
  description: ( localize(
84
- 16398,
84
+ 16485,
85
85
  "Associates folder names to icons for expanded folders. The object key is the folder name, not including any path segments. No patterns or wildcards are allowed. Folder name matching is case insensitive."
86
86
  )),
87
87
  additionalProperties: {
88
88
  type: "string",
89
- description: ( localize(16399, "The ID of the icon definition for the association."))
89
+ description: ( localize(16486, "The ID of the icon definition for the association."))
90
90
  }
91
91
  },
92
92
  fileExtensions: {
93
93
  type: "object",
94
94
  description: ( localize(
95
- 16400,
95
+ 16487,
96
96
  "Associates file extensions to icons. The object key is the file extension name. The extension name is the last segment of a file name after the last dot (not including the dot). Extensions are compared case insensitive."
97
97
  )),
98
98
  additionalProperties: {
99
99
  type: "string",
100
- description: ( localize(16401, "The ID of the icon definition for the association."))
100
+ description: ( localize(16488, "The ID of the icon definition for the association."))
101
101
  }
102
102
  },
103
103
  fileNames: {
104
104
  type: "object",
105
105
  description: ( localize(
106
- 16402,
106
+ 16489,
107
107
  "Associates file names to icons. The object key is the full file name, but not including any path segments. File name can include dots and a possible file extension. No patterns or wildcards are allowed. File name matching is case insensitive."
108
108
  )),
109
109
  additionalProperties: {
110
110
  type: "string",
111
- description: ( localize(16403, "The ID of the icon definition for the association."))
111
+ description: ( localize(16490, "The ID of the icon definition for the association."))
112
112
  }
113
113
  },
114
114
  languageIds: {
115
115
  type: "object",
116
116
  description: ( localize(
117
- 16404,
117
+ 16491,
118
118
  "Associates languages to icons. The object key is the language id as defined in the language contribution point."
119
119
  )),
120
120
  additionalProperties: {
121
121
  type: "string",
122
- description: ( localize(16405, "The ID of the icon definition for the association."))
122
+ description: ( localize(16492, "The ID of the icon definition for the association."))
123
123
  }
124
124
  },
125
125
  associations: {
@@ -167,29 +167,29 @@ const schema = {
167
167
  properties: {
168
168
  fonts: {
169
169
  type: "array",
170
- description: ( localize(16406, "Fonts that are used in the icon definitions.")),
170
+ description: ( localize(16493, "Fonts that are used in the icon definitions.")),
171
171
  items: {
172
172
  type: "object",
173
173
  properties: {
174
174
  id: {
175
175
  type: "string",
176
- description: ( localize(16407, "The ID of the font.")),
176
+ description: ( localize(16494, "The ID of the font.")),
177
177
  pattern: fontIdRegex.source,
178
178
  patternErrorMessage: fontIdErrorMessage
179
179
  },
180
180
  src: {
181
181
  type: "array",
182
- description: ( localize(16408, "The location of the font.")),
182
+ description: ( localize(16495, "The location of the font.")),
183
183
  items: {
184
184
  type: "object",
185
185
  properties: {
186
186
  path: {
187
187
  type: "string",
188
- description: ( localize(16409, "The font path, relative to the current file icon theme file."))
188
+ description: ( localize(16496, "The font path, relative to the current file icon theme file."))
189
189
  },
190
190
  format: {
191
191
  type: "string",
192
- description: ( localize(16410, "The format of the font.")),
192
+ description: ( localize(16497, "The format of the font.")),
193
193
  enum: ["woff", "woff2", "truetype", "opentype", "embedded-opentype", "svg"]
194
194
  }
195
195
  },
@@ -199,7 +199,7 @@ const schema = {
199
199
  weight: {
200
200
  type: "string",
201
201
  description: ( localize(
202
- 16411,
202
+ 16498,
203
203
  "The weight of the font. See https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight for valid values."
204
204
  )),
205
205
  pattern: fontWeightRegex.source
@@ -207,7 +207,7 @@ const schema = {
207
207
  style: {
208
208
  type: "string",
209
209
  description: ( localize(
210
- 16412,
210
+ 16499,
211
211
  "The style of the font. See https://developer.mozilla.org/en-US/docs/Web/CSS/font-style for valid values."
212
212
  )),
213
213
  pattern: fontStyleRegex.source
@@ -215,7 +215,7 @@ const schema = {
215
215
  size: {
216
216
  type: "string",
217
217
  description: ( localize(
218
- 16413,
218
+ 16500,
219
219
  "The default size of the font. We strongly recommend using a percentage value, for example: 125%."
220
220
  )),
221
221
  pattern: fontSizeRegex.source
@@ -227,34 +227,34 @@ const schema = {
227
227
  iconDefinitions: {
228
228
  type: "object",
229
229
  description: ( localize(
230
- 16414,
230
+ 16501,
231
231
  "Description of all icons that can be used when associating files to icons."
232
232
  )),
233
233
  additionalProperties: {
234
234
  type: "object",
235
- description: ( localize(16415, "An icon definition. The object key is the ID of the definition.")),
235
+ description: ( localize(16502, "An icon definition. The object key is the ID of the definition.")),
236
236
  properties: {
237
237
  iconPath: {
238
238
  type: "string",
239
239
  description: ( localize(
240
- 16416,
240
+ 16503,
241
241
  "When using a SVG or PNG: The path to the image. The path is relative to the icon set file."
242
242
  ))
243
243
  },
244
244
  fontCharacter: {
245
245
  type: "string",
246
- description: ( localize(16417, "When using a glyph font: The character in the font to use."))
246
+ description: ( localize(16504, "When using a glyph font: The character in the font to use."))
247
247
  },
248
248
  fontColor: {
249
249
  type: "string",
250
250
  format: "color-hex",
251
- description: ( localize(16418, "When using a glyph font: The color to use.")),
251
+ description: ( localize(16505, "When using a glyph font: The color to use.")),
252
252
  pattern: fontColorRegex.source
253
253
  },
254
254
  fontSize: {
255
255
  type: "string",
256
256
  description: ( localize(
257
- 16419,
257
+ 16506,
258
258
  "When using a font: The font size in percentage to the text font. If not set, defaults to the size in the font definition."
259
259
  )),
260
260
  pattern: fontSizeRegex.source
@@ -262,7 +262,7 @@ const schema = {
262
262
  fontId: {
263
263
  type: "string",
264
264
  description: ( localize(
265
- 16420,
265
+ 16507,
266
266
  "When using a font: The id of the font. If not set, defaults to the first font definition."
267
267
  )),
268
268
  pattern: fontIdRegex.source,
@@ -309,26 +309,26 @@ const schema = {
309
309
  },
310
310
  light: {
311
311
  $ref: "#/definitions/associations",
312
- description: ( localize(16421, "Optional associations for file icons in light color themes."))
312
+ description: ( localize(16508, "Optional associations for file icons in light color themes."))
313
313
  },
314
314
  highContrast: {
315
315
  $ref: "#/definitions/associations",
316
316
  description: ( localize(
317
- 16422,
317
+ 16509,
318
318
  "Optional associations for file icons in high contrast color themes."
319
319
  ))
320
320
  },
321
321
  hidesExplorerArrows: {
322
322
  type: "boolean",
323
323
  description: ( localize(
324
- 16423,
324
+ 16510,
325
325
  "Configures whether the file explorer's arrows should be hidden when this theme is active."
326
326
  ))
327
327
  },
328
328
  showLanguageModeIcons: {
329
329
  type: "boolean",
330
330
  description: ( localize(
331
- 16424,
331
+ 16511,
332
332
  "Configures whether the default language icons should be used if the theme does not define an icon for a language."
333
333
  ))
334
334
  }
@@ -17,23 +17,23 @@ const schema = {
17
17
  properties: {
18
18
  id: {
19
19
  type: "string",
20
- description: ( localize(16438, "The ID of the font.")),
20
+ description: ( localize(16525, "The ID of the font.")),
21
21
  pattern: fontIdRegex.source,
22
22
  patternErrorMessage: fontIdErrorMessage
23
23
  },
24
24
  src: {
25
25
  type: "array",
26
- description: ( localize(16439, "The location of the font.")),
26
+ description: ( localize(16526, "The location of the font.")),
27
27
  items: {
28
28
  type: "object",
29
29
  properties: {
30
30
  path: {
31
31
  type: "string",
32
- description: ( localize(16440, "The font path, relative to the current product icon theme file."))
32
+ description: ( localize(16527, "The font path, relative to the current product icon theme file."))
33
33
  },
34
34
  format: {
35
35
  type: "string",
36
- description: ( localize(16441, "The format of the font.")),
36
+ description: ( localize(16528, "The format of the font.")),
37
37
  enum: ["woff", "woff2", "truetype", "opentype", "embedded-opentype", "svg"]
38
38
  }
39
39
  },
@@ -43,7 +43,7 @@ const schema = {
43
43
  weight: {
44
44
  type: "string",
45
45
  description: ( localize(
46
- 16442,
46
+ 16529,
47
47
  "The weight of the font. See https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight for valid values."
48
48
  )),
49
49
  anyOf: [{
@@ -56,7 +56,7 @@ const schema = {
56
56
  style: {
57
57
  type: "string",
58
58
  description: ( localize(
59
- 16443,
59
+ 16530,
60
60
  "The style of the font. See https://developer.mozilla.org/en-US/docs/Web/CSS/font-style for valid values."
61
61
  )),
62
62
  anyOf: [{
@@ -71,7 +71,7 @@ const schema = {
71
71
  }
72
72
  },
73
73
  iconDefinitions: {
74
- description: ( localize(16444, "Association of icon name to a font character.")),
74
+ description: ( localize(16531, "Association of icon name to a font character.")),
75
75
  $ref: iconsSchemaId
76
76
  }
77
77
  }
@@ -11,9 +11,7 @@ export declare function updateProductIconThemeConfigurationSchemas(themes: IWork
11
11
  export declare class ThemeConfiguration {
12
12
  private configurationService;
13
13
  private hostColorService;
14
- private readonly isNewUser;
15
- constructor(configurationService: IConfigurationService, hostColorService: IHostColorSchemeService, isNewUser?: boolean);
16
- private shouldAutoDetectColorScheme;
14
+ constructor(configurationService: IConfigurationService, hostColorService: IHostColorSchemeService);
17
15
  get colorTheme(): string;
18
16
  get fileIconTheme(): string | null;
19
17
  get productIconTheme(): string;