@codingame/monaco-vscode-monarch-service-override 9.0.3 → 10.0.1

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-monarch-service-override",
3
- "version": "9.0.3",
3
+ "version": "10.0.1",
4
4
  "keywords": [],
5
5
  "author": {
6
6
  "name": "CodinGame",
@@ -26,6 +26,6 @@
26
26
  }
27
27
  },
28
28
  "dependencies": {
29
- "vscode": "npm:@codingame/monaco-vscode-api@9.0.3"
29
+ "vscode": "npm:@codingame/monaco-vscode-api@10.0.1"
30
30
  }
31
31
  }
@@ -1,14 +1,11 @@
1
1
  import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
2
2
  import './inspectTokens.css.js';
3
3
  import { reset, $, append } from 'vscode/vscode/vs/base/browser/dom';
4
- import { CharCode } from 'vscode/vscode/vs/base/common/charCode';
5
4
  import { Color } from 'vscode/vscode/vs/base/common/color';
6
- import { KeyCode } from 'vscode/vscode/vs/base/common/keyCodes';
7
5
  import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
8
- import { ContentWidgetPositionPreference } from 'vscode/vscode/vs/editor/browser/editorBrowser';
9
- import { EditorAction, registerEditorContribution, EditorContributionInstantiation, registerEditorAction } from 'vscode/vscode/vs/editor/browser/editorExtensions';
6
+ import { EditorAction, registerEditorContribution, registerEditorAction } from 'vscode/vscode/vs/editor/browser/editorExtensions';
10
7
  import { TokenizationRegistry } from 'vscode/vscode/vs/editor/common/languages';
11
- import { TokenMetadata, StandardTokenType, FontStyle } from 'vscode/vscode/vs/editor/common/encodedTokenAttributes';
8
+ import { TokenMetadata } from 'vscode/vscode/vs/editor/common/encodedTokenAttributes';
12
9
  import { NullState, nullTokenize, nullTokenizeEncoded } from 'vscode/vscode/vs/editor/common/languages/nullTokenize';
13
10
  import { ILanguageService } from 'vscode/vscode/vs/editor/common/languages/language';
14
11
  import { IStandaloneThemeService } from 'vscode/vscode/vs/editor/standalone/common/standaloneTheme';
@@ -29,7 +26,7 @@ let InspectTokensController = class InspectTokensController extends Disposable {
29
26
  this._register(this._editor.onDidChangeModel((e) => this.stop()));
30
27
  this._register(this._editor.onDidChangeModelLanguage((e) => this.stop()));
31
28
  this._register(TokenizationRegistry.onDidChange((e) => this.stop()));
32
- this._register(this._editor.onKeyUp((e) => e.keyCode === KeyCode.Escape && this.stop()));
29
+ this._register(this._editor.onKeyUp((e) => e.keyCode === 9 && this.stop()));
33
30
  }
34
31
  dispose() {
35
32
  this.stop();
@@ -74,10 +71,10 @@ function renderTokenText(tokenText) {
74
71
  for (let charIndex = 0, len = tokenText.length; charIndex < len; charIndex++) {
75
72
  const charCode = tokenText.charCodeAt(charIndex);
76
73
  switch (charCode) {
77
- case CharCode.Tab:
74
+ case 9 :
78
75
  result += '\u2192';
79
76
  break;
80
- case CharCode.Space:
77
+ case 32 :
81
78
  result += '\u00B7';
82
79
  break;
83
80
  default:
@@ -171,25 +168,25 @@ class InspectTokensWidget extends Disposable {
171
168
  }
172
169
  _tokenTypeToString(tokenType) {
173
170
  switch (tokenType) {
174
- case StandardTokenType.Other: return 'Other';
175
- case StandardTokenType.Comment: return 'Comment';
176
- case StandardTokenType.String: return 'String';
177
- case StandardTokenType.RegEx: return 'RegEx';
171
+ case 0 : return 'Other';
172
+ case 1 : return 'Comment';
173
+ case 2 : return 'String';
174
+ case 3 : return 'RegEx';
178
175
  default: return '??';
179
176
  }
180
177
  }
181
178
  _fontStyleToString(fontStyle) {
182
179
  let r = '';
183
- if (fontStyle & FontStyle.Italic) {
180
+ if (fontStyle & 1 ) {
184
181
  r += 'italic ';
185
182
  }
186
- if (fontStyle & FontStyle.Bold) {
183
+ if (fontStyle & 2 ) {
187
184
  r += 'bold ';
188
185
  }
189
- if (fontStyle & FontStyle.Underline) {
186
+ if (fontStyle & 4 ) {
190
187
  r += 'underline ';
191
188
  }
192
- if (fontStyle & FontStyle.Strikethrough) {
189
+ if (fontStyle & 8 ) {
193
190
  r += 'strikethrough ';
194
191
  }
195
192
  if (r.length === 0) {
@@ -222,9 +219,9 @@ class InspectTokensWidget extends Disposable {
222
219
  getPosition() {
223
220
  return {
224
221
  position: this._editor.getPosition(),
225
- preference: [ContentWidgetPositionPreference.BELOW, ContentWidgetPositionPreference.ABOVE]
222
+ preference: [2 , 1 ]
226
223
  };
227
224
  }
228
225
  }
229
- registerEditorContribution(InspectTokensController.ID, InspectTokensController, EditorContributionInstantiation.Lazy);
226
+ registerEditorContribution(InspectTokensController.ID, InspectTokensController, 4 );
230
227
  registerEditorAction(InspectTokens);