@codingame/monaco-editor-wrapper 3.1.1 → 3.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.
package/dist/main.js CHANGED
@@ -3791,13 +3791,15 @@ function updateThemes() {
3791
3791
 
3792
3792
  updateThemes();
3793
3793
 
3794
- function defineVSCodeTheme(id, load) {
3795
- const theme = {
3796
- id,
3797
- path: "/".concat(id, ".json"),
3794
+ function defineVSCodeTheme(idOrTheme, load) {
3795
+ const theme = _objectSpread2(_objectSpread2({}, typeof idOrTheme === 'string' ? {
3796
+ id: idOrTheme,
3797
+ path: "/".concat(idOrTheme, ".json")
3798
+ } : idOrTheme), {}, {
3798
3799
  load,
3799
3800
  _watch: false
3800
- };
3801
+ });
3802
+
3801
3803
  themes = [...themes, theme];
3802
3804
  updateThemes();
3803
3805
  return {
@@ -1,3 +1,4 @@
1
+ import { IThemeExtensionPoint } from 'vscode/service-override/theme';
1
2
  import { Disposable } from 'vscode';
2
- declare function defineVSCodeTheme(id: string, load: () => Promise<string>): Disposable;
3
+ declare function defineVSCodeTheme(idOrTheme: string | Pick<IThemeExtensionPoint, 'id' | 'label' | 'description' | 'uiTheme' | 'path'>, load: () => Promise<string>): Disposable;
3
4
  export { defineVSCodeTheme };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codingame/monaco-editor-wrapper",
3
- "version": "3.1.1",
3
+ "version": "3.2.0",
4
4
  "private": false,
5
5
  "description": "Enhanced Monaco editor with TextMate grammars and more",
6
6
  "scripts": {