@codingame/monaco-vscode-theme-service-override 36.2.7 → 37.2.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.
Files changed (30) hide show
  1. package/index.js +1 -0
  2. package/package.json +3 -3
  3. package/vscode/src/vs/workbench/contrib/modernUI/browser/media/activityBar.css +301 -0
  4. package/vscode/src/vs/workbench/contrib/modernUI/browser/media/commandCenter.css +47 -0
  5. package/vscode/src/vs/workbench/contrib/modernUI/browser/media/editorBorder.css +96 -0
  6. package/vscode/src/vs/workbench/contrib/modernUI/browser/media/fontRamp.css +206 -0
  7. package/vscode/src/vs/workbench/contrib/modernUI/browser/media/keyboardFocusOnly.css +44 -0
  8. package/vscode/src/vs/workbench/contrib/modernUI/browser/media/notificationsDialogs.css +146 -0
  9. package/vscode/src/vs/workbench/contrib/modernUI/browser/media/padding.css +377 -0
  10. package/vscode/src/vs/workbench/contrib/modernUI/browser/media/paneHeaders.css +123 -0
  11. package/vscode/src/vs/workbench/contrib/modernUI/browser/media/roundedCorners.css +287 -0
  12. package/vscode/src/vs/workbench/contrib/modernUI/browser/media/sashHandles.css +94 -0
  13. package/vscode/src/vs/workbench/contrib/modernUI/browser/media/shadows.css +52 -0
  14. package/vscode/src/vs/workbench/contrib/modernUI/browser/media/statusBar.css +97 -0
  15. package/vscode/src/vs/workbench/contrib/modernUI/browser/media/tabs.css +1044 -0
  16. package/vscode/src/vs/workbench/contrib/modernUI/browser/media/titlebar.css +19 -0
  17. package/vscode/src/vs/workbench/contrib/modernUI/browser/modernUI.contribution.d.ts +28 -0
  18. package/vscode/src/vs/workbench/contrib/modernUI/browser/modernUI.contribution.js +219 -0
  19. package/vscode/src/vs/workbench/contrib/themes/browser/themes.contribution.js +45 -45
  20. package/vscode/src/vs/workbench/services/themes/browser/fileIconThemeData.js +7 -5
  21. package/vscode/src/vs/workbench/services/themes/browser/modernTabColorCustomizations.d.ts +1 -0
  22. package/vscode/src/vs/workbench/services/themes/browser/modernTabColorCustomizations.js +255 -0
  23. package/vscode/src/vs/workbench/services/themes/browser/productIconThemeData.js +12 -12
  24. package/vscode/src/vs/workbench/services/themes/browser/workbenchThemeService.js +14 -5
  25. package/vscode/src/vs/workbench/services/themes/common/colorThemeSchema.js +16 -16
  26. package/vscode/src/vs/workbench/services/themes/common/fileIconThemeSchema.js +45 -38
  27. package/vscode/src/vs/workbench/services/themes/common/productIconThemeSchema.js +7 -7
  28. package/vscode/src/vs/workbench/services/themes/common/themeConfiguration.d.ts +2 -0
  29. package/vscode/src/vs/workbench/services/themes/common/themeConfiguration.js +46 -36
  30. package/vscode/src/vs/workbench/services/themes/common/themeExtensionPoints.js +21 -21
@@ -0,0 +1,255 @@
1
+
2
+ import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colorUtils';
3
+ import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/baseColors';
4
+ import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/chartsColors';
5
+ import { editorBackground } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/editorColors';
6
+ import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/inputColors';
7
+ import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/listColors';
8
+ import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/menuColors';
9
+ import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/minimapColors';
10
+ import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/miscColors';
11
+ import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/quickpickColors';
12
+ import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/searchColors';
13
+ import { registerThemingParticipant } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/themeService';
14
+ import { TAB_ACTIVE_BACKGROUND, MODERN_EDITOR_TAB_ACTIVE_BACKGROUND, MODERN_TAB_ACTIVE_BACKGROUND, TAB_UNFOCUSED_ACTIVE_BACKGROUND, TAB_INACTIVE_BACKGROUND, MODERN_EDITOR_TAB_INACTIVE_BACKGROUND, TAB_UNFOCUSED_INACTIVE_BACKGROUND, TAB_HOVER_BACKGROUND, MODERN_EDITOR_TAB_HOVER_BACKGROUND, MODERN_TAB_HOVER_BACKGROUND, TAB_UNFOCUSED_HOVER_BACKGROUND, MODERN_EDITOR_TAB_ACTIVE_HOVER_BACKGROUND, MODERN_EDITOR_TAB_ACTIVE_ACTION_BACKGROUND, MODERN_EDITOR_TAB_HOVER_ACTION_BACKGROUND, MODERN_EDITOR_TAB_ACTIVE_HOVER_ACTION_BACKGROUND, TAB_ACTIVE_FOREGROUND, MODERN_EDITOR_TAB_ACTIVE_FOREGROUND, MODERN_TAB_ACTIVE_FOREGROUND, TAB_UNFOCUSED_ACTIVE_FOREGROUND, TAB_INACTIVE_FOREGROUND, TAB_UNFOCUSED_INACTIVE_FOREGROUND, TAB_HOVER_FOREGROUND, MODERN_EDITOR_TAB_HOVER_FOREGROUND, MODERN_TAB_HOVER_FOREGROUND, TAB_UNFOCUSED_HOVER_FOREGROUND, TAB_BORDER, TAB_LAST_PINNED_BORDER, TAB_ACTIVE_BORDER, TAB_UNFOCUSED_ACTIVE_BORDER, TAB_ACTIVE_BORDER_TOP, TAB_UNFOCUSED_ACTIVE_BORDER_TOP, TAB_HOVER_BORDER, TAB_UNFOCUSED_HOVER_BORDER } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/theme';
15
+ import { ColorThemeData } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/themes/common/colorThemeData';
16
+
17
+ function resolveLegacyTabColor(theme, legacyColorId, modernColorIds, ...relatedLegacyColorIds) {
18
+ if (( modernColorIds.some(id => theme.getColorCustomization(id)))) {
19
+ return undefined;
20
+ }
21
+ if (!theme.getColorCustomization(legacyColorId) && !( relatedLegacyColorIds.some(id => theme.getColorCustomization(id)))) {
22
+ return undefined;
23
+ }
24
+ return theme.getColor(legacyColorId);
25
+ }
26
+ function addColorVariable(declarations, name, color) {
27
+ if (color) {
28
+ declarations.push(`${name}: ${color};`);
29
+ }
30
+ }
31
+ function flattenActionBackground(color, editorBackgroundColor) {
32
+ return editorBackgroundColor ? color.makeOpaque(editorBackgroundColor) : color;
33
+ }
34
+ registerThemingParticipant((theme, collector) => {
35
+ if (!(theme instanceof ColorThemeData)) {
36
+ return;
37
+ }
38
+ const declarations = [];
39
+ const activeBackground = resolveLegacyTabColor(
40
+ theme,
41
+ TAB_ACTIVE_BACKGROUND,
42
+ [MODERN_EDITOR_TAB_ACTIVE_BACKGROUND, MODERN_TAB_ACTIVE_BACKGROUND]
43
+ );
44
+ const unfocusedActiveBackground = resolveLegacyTabColor(
45
+ theme,
46
+ TAB_UNFOCUSED_ACTIVE_BACKGROUND,
47
+ [MODERN_EDITOR_TAB_ACTIVE_BACKGROUND, MODERN_TAB_ACTIVE_BACKGROUND],
48
+ TAB_ACTIVE_BACKGROUND
49
+ );
50
+ const inactiveBackground = resolveLegacyTabColor(theme, TAB_INACTIVE_BACKGROUND, [MODERN_EDITOR_TAB_INACTIVE_BACKGROUND]);
51
+ const unfocusedInactiveBackground = resolveLegacyTabColor(
52
+ theme,
53
+ TAB_UNFOCUSED_INACTIVE_BACKGROUND,
54
+ [MODERN_EDITOR_TAB_INACTIVE_BACKGROUND],
55
+ TAB_INACTIVE_BACKGROUND
56
+ );
57
+ const hoverBackground = resolveLegacyTabColor(
58
+ theme,
59
+ TAB_HOVER_BACKGROUND,
60
+ [MODERN_EDITOR_TAB_HOVER_BACKGROUND, MODERN_TAB_HOVER_BACKGROUND]
61
+ );
62
+ const unfocusedHoverBackground = resolveLegacyTabColor(
63
+ theme,
64
+ TAB_UNFOCUSED_HOVER_BACKGROUND,
65
+ [MODERN_EDITOR_TAB_HOVER_BACKGROUND, MODERN_TAB_HOVER_BACKGROUND],
66
+ TAB_HOVER_BACKGROUND
67
+ );
68
+ const activeHoverBackground = resolveLegacyTabColor(theme, TAB_HOVER_BACKGROUND, [
69
+ MODERN_EDITOR_TAB_ACTIVE_HOVER_BACKGROUND,
70
+ MODERN_EDITOR_TAB_HOVER_BACKGROUND,
71
+ MODERN_TAB_HOVER_BACKGROUND
72
+ ]);
73
+ const unfocusedActiveHoverBackground = resolveLegacyTabColor(theme, TAB_UNFOCUSED_HOVER_BACKGROUND, [
74
+ MODERN_EDITOR_TAB_ACTIVE_HOVER_BACKGROUND,
75
+ MODERN_EDITOR_TAB_HOVER_BACKGROUND,
76
+ MODERN_TAB_HOVER_BACKGROUND
77
+ ], TAB_HOVER_BACKGROUND);
78
+ const editorBackgroundColor = theme.getColor(editorBackground);
79
+ const hasModernActiveActionBackground = !!theme.getColorCustomization(MODERN_EDITOR_TAB_ACTIVE_ACTION_BACKGROUND);
80
+ const hasModernHoverActionBackground = !!theme.getColorCustomization(MODERN_EDITOR_TAB_HOVER_ACTION_BACKGROUND);
81
+ const hasModernActiveHoverActionBackground = !!theme.getColorCustomization(MODERN_EDITOR_TAB_ACTIVE_HOVER_ACTION_BACKGROUND);
82
+ addColorVariable(declarations, "--modern-ui-editor-tab-active-background", activeBackground);
83
+ addColorVariable(
84
+ declarations,
85
+ "--modern-ui-editor-tab-unfocused-active-background",
86
+ unfocusedActiveBackground
87
+ );
88
+ addColorVariable(
89
+ declarations,
90
+ "--modern-ui-editor-tab-inactive-background",
91
+ inactiveBackground
92
+ );
93
+ addColorVariable(
94
+ declarations,
95
+ "--modern-ui-editor-tab-unfocused-inactive-background",
96
+ unfocusedInactiveBackground
97
+ );
98
+ addColorVariable(declarations, "--modern-ui-editor-tab-hover-background", hoverBackground);
99
+ addColorVariable(
100
+ declarations,
101
+ "--modern-ui-editor-tab-unfocused-hover-background",
102
+ unfocusedHoverBackground
103
+ );
104
+ addColorVariable(
105
+ declarations,
106
+ "--modern-ui-editor-tab-active-hover-background",
107
+ activeHoverBackground
108
+ );
109
+ addColorVariable(
110
+ declarations,
111
+ "--modern-ui-editor-tab-unfocused-active-hover-background",
112
+ unfocusedActiveHoverBackground
113
+ );
114
+ addColorVariable(
115
+ declarations,
116
+ "--modern-ui-editor-tab-active-foreground",
117
+ resolveLegacyTabColor(
118
+ theme,
119
+ TAB_ACTIVE_FOREGROUND,
120
+ [MODERN_EDITOR_TAB_ACTIVE_FOREGROUND, MODERN_TAB_ACTIVE_FOREGROUND]
121
+ )
122
+ );
123
+ addColorVariable(
124
+ declarations,
125
+ "--modern-ui-editor-tab-unfocused-active-foreground",
126
+ resolveLegacyTabColor(
127
+ theme,
128
+ TAB_UNFOCUSED_ACTIVE_FOREGROUND,
129
+ [MODERN_EDITOR_TAB_ACTIVE_FOREGROUND, MODERN_TAB_ACTIVE_FOREGROUND],
130
+ TAB_ACTIVE_FOREGROUND
131
+ )
132
+ );
133
+ addColorVariable(
134
+ declarations,
135
+ "--modern-ui-editor-tab-inactive-foreground",
136
+ resolveLegacyTabColor(theme, TAB_INACTIVE_FOREGROUND, [], TAB_ACTIVE_FOREGROUND)
137
+ );
138
+ addColorVariable(
139
+ declarations,
140
+ "--modern-ui-editor-tab-unfocused-inactive-foreground",
141
+ resolveLegacyTabColor(
142
+ theme,
143
+ TAB_UNFOCUSED_INACTIVE_FOREGROUND,
144
+ [],
145
+ TAB_INACTIVE_FOREGROUND,
146
+ TAB_ACTIVE_FOREGROUND
147
+ )
148
+ );
149
+ addColorVariable(
150
+ declarations,
151
+ "--modern-ui-editor-tab-hover-foreground",
152
+ resolveLegacyTabColor(
153
+ theme,
154
+ TAB_HOVER_FOREGROUND,
155
+ [MODERN_EDITOR_TAB_HOVER_FOREGROUND, MODERN_TAB_HOVER_FOREGROUND]
156
+ )
157
+ );
158
+ addColorVariable(
159
+ declarations,
160
+ "--modern-ui-editor-tab-unfocused-hover-foreground",
161
+ resolveLegacyTabColor(
162
+ theme,
163
+ TAB_UNFOCUSED_HOVER_FOREGROUND,
164
+ [MODERN_EDITOR_TAB_HOVER_FOREGROUND, MODERN_TAB_HOVER_FOREGROUND],
165
+ TAB_HOVER_FOREGROUND
166
+ )
167
+ );
168
+ addColorVariable(
169
+ declarations,
170
+ "--modern-ui-editor-tab-border",
171
+ resolveLegacyTabColor(theme, TAB_BORDER, [])
172
+ );
173
+ addColorVariable(
174
+ declarations,
175
+ "--modern-ui-editor-tab-last-pinned-border",
176
+ resolveLegacyTabColor(theme, TAB_LAST_PINNED_BORDER, [])
177
+ );
178
+ addColorVariable(
179
+ declarations,
180
+ "--modern-ui-editor-tab-active-border",
181
+ resolveLegacyTabColor(theme, TAB_ACTIVE_BORDER, [])
182
+ );
183
+ addColorVariable(
184
+ declarations,
185
+ "--modern-ui-editor-tab-unfocused-active-border",
186
+ resolveLegacyTabColor(theme, TAB_UNFOCUSED_ACTIVE_BORDER, [], TAB_ACTIVE_BORDER)
187
+ );
188
+ addColorVariable(
189
+ declarations,
190
+ "--modern-ui-editor-tab-active-border-top",
191
+ resolveLegacyTabColor(theme, TAB_ACTIVE_BORDER_TOP, [])
192
+ );
193
+ addColorVariable(
194
+ declarations,
195
+ "--modern-ui-editor-tab-unfocused-active-border-top",
196
+ resolveLegacyTabColor(theme, TAB_UNFOCUSED_ACTIVE_BORDER_TOP, [], TAB_ACTIVE_BORDER_TOP)
197
+ );
198
+ addColorVariable(
199
+ declarations,
200
+ "--modern-ui-editor-tab-hover-border",
201
+ resolveLegacyTabColor(theme, TAB_HOVER_BORDER, [])
202
+ );
203
+ addColorVariable(
204
+ declarations,
205
+ "--modern-ui-editor-tab-unfocused-hover-border",
206
+ resolveLegacyTabColor(theme, TAB_UNFOCUSED_HOVER_BORDER, [], TAB_HOVER_BORDER)
207
+ );
208
+ if (activeBackground && !hasModernActiveActionBackground) {
209
+ addColorVariable(
210
+ declarations,
211
+ "--modern-ui-editor-tab-action-active-background",
212
+ flattenActionBackground(activeBackground, editorBackgroundColor)
213
+ );
214
+ }
215
+ if (unfocusedActiveBackground && !hasModernActiveActionBackground) {
216
+ addColorVariable(
217
+ declarations,
218
+ "--modern-ui-editor-tab-action-unfocused-active-background",
219
+ flattenActionBackground(unfocusedActiveBackground, editorBackgroundColor)
220
+ );
221
+ }
222
+ if (hoverBackground && !hasModernHoverActionBackground) {
223
+ addColorVariable(
224
+ declarations,
225
+ "--modern-ui-editor-tab-action-hover-background",
226
+ flattenActionBackground(hoverBackground, editorBackgroundColor)
227
+ );
228
+ }
229
+ if (unfocusedHoverBackground && !hasModernHoverActionBackground) {
230
+ addColorVariable(
231
+ declarations,
232
+ "--modern-ui-editor-tab-action-unfocused-hover-background",
233
+ flattenActionBackground(unfocusedHoverBackground, editorBackgroundColor)
234
+ );
235
+ }
236
+ if (activeHoverBackground && !hasModernActiveHoverActionBackground) {
237
+ addColorVariable(
238
+ declarations,
239
+ "--modern-ui-editor-tab-action-active-hover-background",
240
+ flattenActionBackground(activeHoverBackground, editorBackgroundColor)
241
+ );
242
+ }
243
+ if (unfocusedActiveHoverBackground && !hasModernActiveHoverActionBackground) {
244
+ addColorVariable(
245
+ declarations,
246
+ "--modern-ui-editor-tab-action-unfocused-active-hover-background",
247
+ flattenActionBackground(unfocusedActiveHoverBackground, editorBackgroundColor)
248
+ );
249
+ }
250
+ if (declarations.length > 0) {
251
+ collector.addRule(
252
+ `.modern-ui-tabs.monaco-workbench.monaco-workbench { ${declarations.join("\n")} }`
253
+ );
254
+ }
255
+ });
@@ -43,7 +43,7 @@ class ProductIconThemeData {
43
43
  this.isLoaded = true;
44
44
  if (warnings.length) {
45
45
  logService.error(( localize(
46
- 17976,
46
+ 20077,
47
47
  "Problems processing product icons definitions in {0}:\n{1}",
48
48
  (location.toString()),
49
49
  warnings.join("\n")
@@ -76,7 +76,7 @@ class ProductIconThemeData {
76
76
  static get defaultTheme() {
77
77
  let themeData = ProductIconThemeData._defaultProductIconTheme;
78
78
  if (!themeData) {
79
- themeData = ProductIconThemeData._defaultProductIconTheme = ( new ProductIconThemeData(DEFAULT_PRODUCT_ICON_THEME_ID, ( localize(17977, "Default")), ThemeSettingDefaults.PRODUCT_ICON_THEME));
79
+ themeData = ProductIconThemeData._defaultProductIconTheme = ( new ProductIconThemeData(DEFAULT_PRODUCT_ICON_THEME_ID, ( localize(20078, "Default")), ThemeSettingDefaults.PRODUCT_ICON_THEME));
80
80
  themeData.isLoaded = true;
81
81
  themeData.extensionData = undefined;
82
82
  themeData.watch = false;
@@ -187,15 +187,15 @@ function _loadProductIconThemeDocument(fileService, location, warnings) {
187
187
  const contentValue = parse(content, parseErrors);
188
188
  if (parseErrors.length > 0) {
189
189
  return Promise.reject(( new Error(( localize(
190
- 17978,
190
+ 20079,
191
191
  "Problems parsing product icons file: {0}",
192
192
  ( parseErrors.map(e => getParseErrorMessage(e.error))).join(", ")
193
193
  )))));
194
194
  } else if (getNodeType(contentValue) !== "object") {
195
- return Promise.reject(( new Error(( localize(17979, "Invalid format for product icons theme file: Object expected.")))));
195
+ return Promise.reject(( new Error(( localize(20080, "Invalid format for product icons theme file: Object expected.")))));
196
196
  } else if (!contentValue.iconDefinitions || !Array.isArray(contentValue.fonts) || !contentValue.fonts.length) {
197
197
  return Promise.reject(( new Error(( localize(
198
- 17980,
198
+ 20081,
199
199
  "Invalid format for product icons theme file: Must contain iconDefinitions and fonts."
200
200
  )))));
201
201
  }
@@ -208,13 +208,13 @@ function _loadProductIconThemeDocument(fileService, location, warnings) {
208
208
  if (isString(font.weight) && font.weight.match(fontWeightRegex)) {
209
209
  fontWeight = font.weight;
210
210
  } else {
211
- warnings.push(( localize(17981, "Invalid font weight in font '{0}'. Ignoring setting.", font.id)));
211
+ warnings.push(( localize(20082, "Invalid font weight in font '{0}'. Ignoring setting.", font.id)));
212
212
  }
213
213
  let fontStyle = undefined;
214
214
  if (isString(font.style) && font.style.match(fontStyleRegex)) {
215
215
  fontStyle = font.style;
216
216
  } else {
217
- warnings.push(( localize(17982, "Invalid font style in font '{0}'. Ignoring setting.", font.id)));
217
+ warnings.push(( localize(20083, "Invalid font style in font '{0}'. Ignoring setting.", font.id)));
218
218
  }
219
219
  const sanitizedSrc = [];
220
220
  if (Array.isArray(font.src)) {
@@ -226,7 +226,7 @@ function _loadProductIconThemeDocument(fileService, location, warnings) {
226
226
  format: s.format
227
227
  });
228
228
  } else {
229
- warnings.push(( localize(17983, "Invalid font source in font '{0}'. Ignoring source.", font.id)));
229
+ warnings.push(( localize(20084, "Invalid font source in font '{0}'. Ignoring source.", font.id)));
230
230
  }
231
231
  }
232
232
  }
@@ -238,14 +238,14 @@ function _loadProductIconThemeDocument(fileService, location, warnings) {
238
238
  });
239
239
  } else {
240
240
  warnings.push(( localize(
241
- 17984,
241
+ 20085,
242
242
  "No valid font source in font '{0}'. Ignoring font definition.",
243
243
  font.id
244
244
  )));
245
245
  }
246
246
  } else {
247
247
  warnings.push(( localize(
248
- 17985,
248
+ 20086,
249
249
  "Missing or invalid font id '{0}'. Skipping font definition.",
250
250
  font.id
251
251
  )));
@@ -268,10 +268,10 @@ function _loadProductIconThemeDocument(fileService, location, warnings) {
268
268
  font
269
269
  });
270
270
  } else {
271
- warnings.push(( localize(17986, "Skipping icon definition '{0}'. Unknown font.", iconId)));
271
+ warnings.push(( localize(20087, "Skipping icon definition '{0}'. Unknown font.", iconId)));
272
272
  }
273
273
  } else {
274
- warnings.push(( localize(17987, "Skipping icon definition '{0}': Needs to be defined", iconId)));
274
+ warnings.push(( localize(20088, "Skipping icon definition '{0}': Needs to be defined", iconId)));
275
275
  }
276
276
  }
277
277
  return {
@@ -291,16 +291,16 @@ let WorkbenchThemeService = class WorkbenchThemeService extends Disposable {
291
291
  }
292
292
  const keepTheme = await ( new Promise(resolve => {
293
293
  this.notificationService.prompt(Severity.Info, ( localize(
294
- 17988,
294
+ 20089,
295
295
  "VS Code has a new default theme: '{0}'.",
296
296
  this.getColorTheme().label
297
297
  )), [toAction({
298
298
  id: "themeUpdated.tryItOut",
299
- label: ( localize(17989, "Keep It")),
299
+ label: ( localize(20090, "Keep It")),
300
300
  run: () => resolve(true)
301
301
  }), toAction({
302
302
  id: "themeUpdated.noThanks",
303
- label: ( localize(17990, "No Thanks")),
303
+ label: ( localize(20091, "No Thanks")),
304
304
  run: () => resolve(false)
305
305
  })], {
306
306
  onCancel: () => resolve(false)
@@ -428,8 +428,17 @@ let WorkbenchThemeService = class WorkbenchThemeService extends Disposable {
428
428
  });
429
429
  }
430
430
  installPreferredSchemeListener() {
431
+ let previous = {
432
+ dark: this.hostColorService.dark,
433
+ highContrast: this.hostColorService.highContrast
434
+ };
431
435
  this._register(this.hostColorService.onDidChangeColorScheme(() => {
432
- if (this.settings.isDetectingColorScheme() || this.settings.isDetectingHighContrast()) {
436
+ const restoreColorTheme = this.settings.isPreferredColorSchemeChange(previous);
437
+ previous = {
438
+ dark: this.hostColorService.dark,
439
+ highContrast: this.hostColorService.highContrast
440
+ };
441
+ if (restoreColorTheme) {
433
442
  this.restoreColorTheme();
434
443
  }
435
444
  }));
@@ -496,7 +505,7 @@ let WorkbenchThemeService = class WorkbenchThemeService extends Disposable {
496
505
  return this.applyTheme(themeData, settingsTarget);
497
506
  } catch (error) {
498
507
  throw ( new Error(( localize(
499
- 17991,
508
+ 20092,
500
509
  "Unable to load {0}: {1}",
501
510
  themeData.location?.toString(),
502
511
  error.message
@@ -133,31 +133,31 @@ const textmateColorSchema = {
133
133
  },
134
134
  settings: {
135
135
  type: "object",
136
- description: ( localize(18022, "Colors and styles for the token.")),
136
+ description: ( localize(20123, "Colors and styles for the token.")),
137
137
  properties: {
138
138
  foreground: {
139
139
  type: "string",
140
- description: ( localize(18023, "Foreground color for the token.")),
140
+ description: ( localize(20124, "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(18024, "Token background colors are currently not supported."))
146
+ deprecationMessage: ( localize(20125, "Token background colors are currently not supported."))
147
147
  },
148
148
  fontStyle: {
149
149
  type: "string",
150
150
  description: ( localize(
151
- 18025,
151
+ 20126,
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
- 18026,
156
+ 20127,
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(18027, "None (clear inherited style)")),
160
+ label: ( localize(20128, "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
- 18028,
197
+ 20129,
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
- 18029,
204
+ 20130,
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
- 18030,
211
+ 20131,
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(18031, "Description of the rule."))
238
+ description: ( localize(20132, "Description of the rule."))
239
239
  },
240
240
  scope: {
241
- description: ( localize(18032, "Scope selector against which this rule matches.")),
241
+ description: ( localize(20133, "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(18033, "Colors in the workbench")),
273
+ description: ( localize(20134, "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(18034, "Path to a tmTheme file (relative to the current file)."))
280
+ description: ( localize(20135, "Path to a tmTheme file (relative to the current file)."))
281
281
  }, {
282
- description: ( localize(18035, "Colors for syntax highlighting")),
282
+ description: ( localize(20136, "Colors for syntax highlighting")),
283
283
  $ref: textmateColorsSchemaId
284
284
  }]
285
285
  },
286
286
  semanticHighlighting: {
287
287
  type: "boolean",
288
- description: ( localize(18036, "Whether semantic highlighting should be enabled for this theme."))
288
+ description: ( localize(20137, "Whether semantic highlighting should be enabled for this theme."))
289
289
  },
290
290
  semanticTokenColors: {
291
291
  type: "object",
292
- description: ( localize(18037, "Colors for semantic tokens")),
292
+ description: ( localize(20138, "Colors for semantic tokens")),
293
293
  $ref: tokenStylingSchemaId
294
294
  }
295
295
  }