@codingame/monaco-vscode-theme-service-override 19.0.1 → 19.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codingame/monaco-vscode-theme-service-override",
3
- "version": "19.0.1",
3
+ "version": "19.1.0",
4
4
  "private": false,
5
5
  "description": "VSCode public API plugged on the monaco editor - theme service-override",
6
6
  "keywords": [],
@@ -15,11 +15,11 @@
15
15
  },
16
16
  "type": "module",
17
17
  "dependencies": {
18
- "@codingame/monaco-vscode-34a0ffd3-b9f5-5699-b43b-38af5732f38a-common": "19.0.1",
19
- "@codingame/monaco-vscode-9c1add21-d437-5ee3-ae2b-ad115a9ef171-common": "19.0.1",
20
- "@codingame/monaco-vscode-9d0168a3-519b-57f3-9bcc-89efc41f951a-common": "19.0.1",
21
- "@codingame/monaco-vscode-api": "19.0.1",
22
- "@codingame/monaco-vscode-files-service-override": "19.0.1"
18
+ "@codingame/monaco-vscode-34a0ffd3-b9f5-5699-b43b-38af5732f38a-common": "19.1.0",
19
+ "@codingame/monaco-vscode-9c1add21-d437-5ee3-ae2b-ad115a9ef171-common": "19.1.0",
20
+ "@codingame/monaco-vscode-9d0168a3-519b-57f3-9bcc-89efc41f951a-common": "19.1.0",
21
+ "@codingame/monaco-vscode-api": "19.1.0",
22
+ "@codingame/monaco-vscode-files-service-override": "19.1.0"
23
23
  },
24
24
  "main": "index.js",
25
25
  "module": "index.js",
@@ -32,7 +32,7 @@ import { ThemeConfiguration, updateColorThemeConfigurationSchemas, updateFileIco
32
32
  import { ProductIconThemeData, DEFAULT_PRODUCT_ICON_THEME_ID } from './productIconThemeData.js';
33
33
  import { registerProductIconThemeSchemas } from '../common/productIconThemeSchema.js';
34
34
  import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
35
- import { isWeb } from '@codingame/monaco-vscode-api/vscode/vs/base/common/platform';
35
+ import { isWeb, isFirefox } from '@codingame/monaco-vscode-api/vscode/vs/base/common/platform';
36
36
  import { ThemeTypeSelector, ColorScheme } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/theme';
37
37
  import { IHostColorSchemeService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/themes/common/hostColorSchemeService.service';
38
38
  import { Sequencer, RunOnceScheduler } from '@codingame/monaco-vscode-api/vscode/vs/base/common/async';
@@ -685,14 +685,16 @@ class ThemeFileWatcher {
685
685
  }
686
686
  }
687
687
  function _applyRules(styleSheetContent, rulesClassName) {
688
- const themeStyles = mainWindow.document.head.querySelectorAll(`.${rulesClassName}`);
689
- if (themeStyles.length === 0) {
690
- const elStyle = createStyleSheet();
691
- elStyle.className = rulesClassName;
692
- elStyle.textContent = styleSheetContent;
693
- }
694
- else {
695
- themeStyles[0].textContent = styleSheetContent;
688
+ let themeStyle = mainWindow.document.head.querySelector(`.${rulesClassName}`);
689
+ if (!themeStyle) {
690
+ themeStyle = createStyleSheet();
691
+ themeStyle.className = rulesClassName;
692
+ }
693
+ if (themeStyle.textContent !== styleSheetContent) {
694
+ themeStyle.textContent = styleSheetContent;
695
+ if (isFirefox) {
696
+ themeStyle.setAttribute('data-version', crypto.randomUUID());
697
+ }
696
698
  }
697
699
  }
698
700
  registerColorThemeSchemas();