@codingame/monaco-vscode-api 6.0.0 → 6.0.2

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/api.js CHANGED
@@ -29,7 +29,7 @@ function createProxy(key) {
29
29
  });
30
30
  }
31
31
  const api = {
32
- version: "1.90.0",
32
+ version: "1.90.1",
33
33
  tasks: createProxy('tasks'),
34
34
  notebooks: createProxy('notebooks'),
35
35
  scm: createProxy('scm'),
@@ -580,8 +580,8 @@ registerSingleton(IPathService, class PathService {
580
580
  registerSingleton(IProductService, class ProductService {
581
581
  constructor() {
582
582
  this._serviceBrand = undefined;
583
- this.version = "1.90.0";
584
- this.commit = "df33c94d9816c7c14a48f62b484951dbbd816c02";
583
+ this.version = "1.90.1";
584
+ this.commit = "611f9bfce64f25108829dd295f54a6894e87339d";
585
585
  this.quality = 'oss';
586
586
  this.nameShort = 'Code - OSS Dev';
587
587
  this.nameLong = 'Code - OSS Dev';
@@ -1614,6 +1614,7 @@ registerSingleton(ITerminalService, class TerminalService {
1614
1614
  this.createDetachedTerminal = unsupported;
1615
1615
  this.onDidChangeSelection = Event.None;
1616
1616
  this.detachedXterms = [];
1617
+ this.whenConnected = Promise.resolve();
1617
1618
  this.restoredGroupCount = 0;
1618
1619
  this.createDetachedXterm = unsupported;
1619
1620
  this.instances = [];
@@ -1638,7 +1639,7 @@ registerSingleton(ITerminalService, class TerminalService {
1638
1639
  this.createTerminal = unsupported;
1639
1640
  this.getInstanceFromId = unsupported;
1640
1641
  this.getInstanceFromIndex = unsupported;
1641
- this.getReconnectedTerminals = unsupported;
1642
+ this.getReconnectedTerminals = () => undefined;
1642
1643
  this.getActiveOrCreateInstance = unsupported;
1643
1644
  this.moveToEditor = unsupported;
1644
1645
  this.moveToTerminalView = unsupported;
@@ -1679,11 +1680,6 @@ registerSingleton(ITerminalService, class TerminalService {
1679
1680
  createOnInstanceEvent(getEvent) {
1680
1681
  return new DynamicListEventMultiplexer(this.instances, this.onDidCreateInstance, this.onDidDisposeInstance, getEvent);
1681
1682
  }
1682
- get whenConnected() {
1683
- return (async () => {
1684
- unsupported();
1685
- })();
1686
- }
1687
1683
  get configHelper() {
1688
1684
  return unsupported();
1689
1685
  }
@@ -2565,7 +2561,7 @@ registerSingleton(ITimelineService, class TimelineService {
2565
2561
  }, 1 );
2566
2562
  registerSingleton(ITestService, class TestService {
2567
2563
  constructor() {
2568
- this.registerExtHost = unsupported;
2564
+ this.registerExtHost = () => Disposable.None;
2569
2565
  this.provideTestFollowups = unsupported;
2570
2566
  this.onDidCancelTestRun = Event.None;
2571
2567
  this.onWillProcessDiff = Event.None;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codingame/monaco-vscode-api",
3
- "version": "6.0.0",
3
+ "version": "6.0.2",
4
4
  "description": "VSCode public API plugged on the monaco editor",
5
5
  "keywords": [],
6
6
  "author": {
@@ -99,12 +99,12 @@
99
99
  "dependencies": {
100
100
  "@vscode/iconv-lite-umd": "0.7.0",
101
101
  "jschardet": "3.0.0",
102
- "@codingame/monaco-vscode-extensions-service-override": "6.0.0",
103
- "@codingame/monaco-vscode-files-service-override": "6.0.0",
104
- "@codingame/monaco-vscode-quickaccess-service-override": "6.0.0",
105
- "@codingame/monaco-vscode-environment-service-override": "6.0.0",
106
- "@codingame/monaco-vscode-layout-service-override": "6.0.0",
107
- "@codingame/monaco-vscode-host-service-override": "6.0.0",
108
- "@codingame/monaco-vscode-base-service-override": "6.0.0"
102
+ "@codingame/monaco-vscode-files-service-override": "6.0.2",
103
+ "@codingame/monaco-vscode-extensions-service-override": "6.0.2",
104
+ "@codingame/monaco-vscode-quickaccess-service-override": "6.0.2",
105
+ "@codingame/monaco-vscode-environment-service-override": "6.0.2",
106
+ "@codingame/monaco-vscode-layout-service-override": "6.0.2",
107
+ "@codingame/monaco-vscode-host-service-override": "6.0.2",
108
+ "@codingame/monaco-vscode-base-service-override": "6.0.2"
109
109
  }
110
110
  }
@@ -125,7 +125,6 @@ declare class OverlayFileSystemProvider implements IFileSystemProviderWithFileRe
125
125
  onDidChangeOverlays: Event<void>;
126
126
  capabilities: number;
127
127
  private readFromDelegates;
128
- private readFromDelegatesSync;
129
128
  private writeToDelegates;
130
129
  stat(resource: URI): Promise<IStat>;
131
130
  readFile(resource: URI): Promise<Uint8Array>;
package/services.d.ts CHANGED
@@ -43,7 +43,7 @@ import { IEditorOverrideServices } from './vscode/src/vs/editor/standalone/brows
43
43
  export { StandaloneServices } from './vscode/src/vs/editor/standalone/browser/standaloneServices.js';
44
44
  import { IWorkbenchConstructionOptions } from './vscode/src/vs/workbench/browser/web.api.js';
45
45
  export { IProductService } from './vscode/src/vs/platform/product/common/productService.service.js';
46
- export { IConfigurationChangeEvent } from './vscode/src/vs/platform/configuration/common/configuration.js';
46
+ export { ConfigurationTarget, IConfigurationChangeEvent } from './vscode/src/vs/platform/configuration/common/configuration.js';
47
47
  import { EnvironmentOverride } from './workbench.js';
48
48
  export { SyncDescriptor } from './vscode/src/vs/platform/instantiation/common/descriptors.js';
49
49
  export { IBulkEditService } from './vscode/src/vs/editor/browser/services/bulkEditService.js';
package/services.js CHANGED
@@ -178,14 +178,15 @@ export { IBannerService } from './vscode/src/vs/workbench/services/banner/browse
178
178
  export { IWorkspaceTrustEnablementService, IWorkspaceTrustManagementService, IWorkspaceTrustRequestService } from './vscode/src/vs/platform/workspace/common/workspaceTrust.service.js';
179
179
  export { IKeybindingService } from './vscode/src/vs/platform/keybinding/common/keybinding.service.js';
180
180
  export { ISecretStorageService } from './vscode/src/vs/platform/secrets/common/secrets.service.js';
181
+ export { ConfigurationTarget } from './vscode/src/vs/platform/configuration/common/configuration.js';
181
182
  async function initialize(overrides, container = document.body, configuration = {}, env) {
182
183
  checkServicesNotInitialized();
183
184
  initialize$1(container, configuration, env);
184
185
  const instantiationService = StandaloneServices.initialize({
185
186
  [( IProductService.toString())]: mixin({
186
- version: "1.90.0",
187
+ version: "1.90.1",
187
188
  quality: 'stable',
188
- commit: "df33c94d9816c7c14a48f62b484951dbbd816c02",
189
+ commit: "611f9bfce64f25108829dd295f54a6894e87339d",
189
190
  nameShort: 'Code - OSS',
190
191
  nameLong: 'Code - OSS',
191
192
  applicationName: 'code-oss',
@@ -20,6 +20,12 @@ let MoveLinesCommand = class MoveLinesCommand {
20
20
  this._moveEndLineSelectionShrink = false;
21
21
  }
22
22
  getEditOperations(model, builder) {
23
+ const getLanguageId = () => {
24
+ return model.getLanguageId();
25
+ };
26
+ const getLanguageIdAtPosition = (lineNumber, column) => {
27
+ return model.getLanguageIdAtPosition(lineNumber, column);
28
+ };
23
29
  const modelLineCount = model.getLineCount();
24
30
  if (this._isMovingDown && this._selection.endLineNumber === modelLineCount) {
25
31
  this._selectionId = builder.trackSelection(this._selection);
@@ -37,20 +43,6 @@ let MoveLinesCommand = class MoveLinesCommand {
37
43
  }
38
44
  const { tabSize, indentSize, insertSpaces } = model.getOptions();
39
45
  const indentConverter = this.buildIndentConverter(tabSize, indentSize, insertSpaces);
40
- const virtualModel = {
41
- tokenization: {
42
- getLineTokens: (lineNumber) => {
43
- return model.tokenization.getLineTokens(lineNumber);
44
- },
45
- getLanguageId: () => {
46
- return model.getLanguageId();
47
- },
48
- getLanguageIdAtPosition: (lineNumber, column) => {
49
- return model.getLanguageIdAtPosition(lineNumber, column);
50
- },
51
- },
52
- getLineContent: null,
53
- };
54
46
  if (s.startLineNumber === s.endLineNumber && model.getLineMaxColumn(s.startLineNumber) === 1) {
55
47
  const lineNumber = s.startLineNumber;
56
48
  const otherLineNumber = (this._isMovingDown ? lineNumber + 1 : lineNumber - 1);
@@ -90,13 +82,27 @@ let MoveLinesCommand = class MoveLinesCommand {
90
82
  insertingText = newIndentation + this.trimStart(movingLineText);
91
83
  }
92
84
  else {
93
- virtualModel.getLineContent = (lineNumber) => {
94
- if (lineNumber === s.startLineNumber) {
95
- return model.getLineContent(movingLineNumber);
96
- }
97
- else {
98
- return model.getLineContent(lineNumber);
99
- }
85
+ const virtualModel = {
86
+ tokenization: {
87
+ getLineTokens: (lineNumber) => {
88
+ if (lineNumber === s.startLineNumber) {
89
+ return model.tokenization.getLineTokens(movingLineNumber);
90
+ }
91
+ else {
92
+ return model.tokenization.getLineTokens(lineNumber);
93
+ }
94
+ },
95
+ getLanguageId,
96
+ getLanguageIdAtPosition,
97
+ },
98
+ getLineContent: (lineNumber) => {
99
+ if (lineNumber === s.startLineNumber) {
100
+ return model.getLineContent(movingLineNumber);
101
+ }
102
+ else {
103
+ return model.getLineContent(lineNumber);
104
+ }
105
+ },
100
106
  };
101
107
  const indentOfMovingLine = getGoodIndentForLine(this._autoIndent, virtualModel, model.getLanguageIdAtPosition(movingLineNumber, 1), s.startLineNumber, indentConverter, this._languageConfigurationService);
102
108
  if (indentOfMovingLine !== null) {
@@ -117,16 +123,33 @@ let MoveLinesCommand = class MoveLinesCommand {
117
123
  }
118
124
  }
119
125
  else {
120
- virtualModel.getLineContent = (lineNumber) => {
121
- if (lineNumber === s.startLineNumber) {
122
- return insertingText;
123
- }
124
- else if (lineNumber >= s.startLineNumber + 1 && lineNumber <= s.endLineNumber + 1) {
125
- return model.getLineContent(lineNumber - 1);
126
- }
127
- else {
128
- return model.getLineContent(lineNumber);
129
- }
126
+ const virtualModel = {
127
+ tokenization: {
128
+ getLineTokens: (lineNumber) => {
129
+ if (lineNumber === s.startLineNumber) {
130
+ return model.tokenization.getLineTokens(movingLineNumber);
131
+ }
132
+ else if (lineNumber >= s.startLineNumber + 1 && lineNumber <= s.endLineNumber + 1) {
133
+ return model.tokenization.getLineTokens(lineNumber - 1);
134
+ }
135
+ else {
136
+ return model.tokenization.getLineTokens(lineNumber);
137
+ }
138
+ },
139
+ getLanguageId,
140
+ getLanguageIdAtPosition,
141
+ },
142
+ getLineContent: (lineNumber) => {
143
+ if (lineNumber === s.startLineNumber) {
144
+ return insertingText;
145
+ }
146
+ else if (lineNumber >= s.startLineNumber + 1 && lineNumber <= s.endLineNumber + 1) {
147
+ return model.getLineContent(lineNumber - 1);
148
+ }
149
+ else {
150
+ return model.getLineContent(lineNumber);
151
+ }
152
+ },
130
153
  };
131
154
  const newIndentatOfMovingBlock = getGoodIndentForLine(this._autoIndent, virtualModel, model.getLanguageIdAtPosition(movingLineNumber, 1), s.startLineNumber + 1, indentConverter, this._languageConfigurationService);
132
155
  if (newIndentatOfMovingBlock !== null) {
@@ -155,13 +178,27 @@ let MoveLinesCommand = class MoveLinesCommand {
155
178
  model.getLineMaxColumn(s.endLineNumber)
156
179
  )), '\n' + movingLineText);
157
180
  if (this.shouldAutoIndent(model, s)) {
158
- virtualModel.getLineContent = (lineNumber) => {
159
- if (lineNumber === movingLineNumber) {
160
- return model.getLineContent(s.startLineNumber);
161
- }
162
- else {
163
- return model.getLineContent(lineNumber);
164
- }
181
+ const virtualModel = {
182
+ tokenization: {
183
+ getLineTokens: (lineNumber) => {
184
+ if (lineNumber === movingLineNumber) {
185
+ return model.tokenization.getLineTokens(s.startLineNumber);
186
+ }
187
+ else {
188
+ return model.tokenization.getLineTokens(lineNumber);
189
+ }
190
+ },
191
+ getLanguageId,
192
+ getLanguageIdAtPosition,
193
+ },
194
+ getLineContent: (lineNumber) => {
195
+ if (lineNumber === movingLineNumber) {
196
+ return model.getLineContent(s.startLineNumber);
197
+ }
198
+ else {
199
+ return model.getLineContent(lineNumber);
200
+ }
201
+ },
165
202
  };
166
203
  const ret = this.matchEnterRule(model, indentConverter, tabSize, s.startLineNumber, s.startLineNumber - 2);
167
204
  if (ret !== null) {
@@ -150,10 +150,22 @@ let AccessibilitySignalService = class AccessibilitySignalService extends Dispos
150
150
  onSoundEnabledChanged(signal) {
151
151
  return this.getEnabledState(signal, false).onDidChange;
152
152
  }
153
- getDelayMs(signal, modality) {
154
- const delaySettingsKey = signal.delaySettingsKey ?? 'accessibility.signalOptions.delays.general';
155
- const delaySettingsValue = this.configurationService.getValue(delaySettingsKey);
156
- return modality === 'sound' ? delaySettingsValue.sound : delaySettingsValue.announcement;
153
+ getDelayMs(signal, modality, mode) {
154
+ const options = this.configurationService.getValue('accessibility.signalOptions');
155
+ if (!options || !options.debouncePositionChanges) {
156
+ return 0;
157
+ }
158
+ let value;
159
+ if (signal.name === AccessibilitySignal.errorAtPosition.name && mode === 'positional') {
160
+ value = options['experimental.delays'].errorAtPosition;
161
+ }
162
+ else if (signal.name === AccessibilitySignal.warningAtPosition.name && mode === 'positional') {
163
+ value = options['experimental.delays'].warningAtPosition;
164
+ }
165
+ else {
166
+ value = options['experimental.delays'].general;
167
+ }
168
+ return modality === 'sound' ? value.sound : value.announcement;
157
169
  }
158
170
  };
159
171
  AccessibilitySignalService = ( (__decorate([
@@ -13,7 +13,7 @@ interface IAccessibilitySignalService {
13
13
  })[]): Promise<void>;
14
14
  playSignalLoop(signal: AccessibilitySignal, milliseconds: number): IDisposable;
15
15
  getEnabledState(signal: AccessibilitySignal, userGesture: boolean, modality?: AccessibilityModality | undefined): IValueWithChangeEvent<boolean>;
16
- getDelayMs(signal: AccessibilitySignal, modality: AccessibilityModality): number;
16
+ getDelayMs(signal: AccessibilitySignal, modality: AccessibilityModality, mode: 'line' | 'positional'): number;
17
17
  /**
18
18
  * Avoid this method and prefer `.playSignal`!
19
19
  * Only use it when you want to play the sound regardless of enablement, e.g. in the settings quick pick.
@@ -1,3 +1,4 @@
1
+ import { Emitter } from '../../../base/common/event.js';
1
2
  import '../../contextkey/common/contextkey.js';
2
3
  import { Registry } from '../../registry/common/platform.js';
3
4
  var TerminalSettingPrefix;
@@ -173,26 +174,37 @@ var TerminalExitReason;
173
174
  const TerminalExtensions = {
174
175
  Backend: 'workbench.contributions.terminal.processBackend'
175
176
  };
177
+ function sanitizeRemoteAuthority(remoteAuthority) {
178
+ return remoteAuthority?.toLowerCase() ?? '';
179
+ }
180
+ class TerminalBackendChangeEvent {
181
+ constructor(remoteAuthority) {
182
+ this.remoteAuthority = remoteAuthority;
183
+ }
184
+ affects(remoteAuthority) {
185
+ return sanitizeRemoteAuthority(remoteAuthority) === this.remoteAuthority;
186
+ }
187
+ }
176
188
  class TerminalBackendRegistry {
177
189
  constructor() {
178
190
  this._backends = ( new Map());
191
+ this._onDidChangeBackends = ( new Emitter());
192
+ this.onDidChangeBackends = this._onDidChangeBackends.event;
179
193
  }
180
194
  get backends() { return this._backends; }
181
195
  registerTerminalBackend(backend) {
182
- const key = this._sanitizeRemoteAuthority(backend.remoteAuthority);
196
+ const key = sanitizeRemoteAuthority(backend.remoteAuthority);
183
197
  if (( this._backends.has(key))) {
184
198
  throw ( new Error(
185
199
  `A terminal backend with remote authority '${key}' was already registered.`
186
200
  ));
187
201
  }
188
202
  this._backends.set(key, backend);
203
+ this._onDidChangeBackends.fire(( new TerminalBackendChangeEvent(key)));
189
204
  }
190
205
  getTerminalBackend(remoteAuthority) {
191
- return this._backends.get(this._sanitizeRemoteAuthority(remoteAuthority));
192
- }
193
- _sanitizeRemoteAuthority(remoteAuthority) {
194
- return remoteAuthority?.toLowerCase() ?? '';
206
+ return this._backends.get(sanitizeRemoteAuthority(remoteAuthority));
195
207
  }
196
208
  }
197
209
  Registry.add(TerminalExtensions.Backend, ( new TerminalBackendRegistry()));
198
- export { FlowControlConstants, PosixShellType, ProcessPropertyType, ShellIntegrationStatus, TerminalExitReason, TerminalExtensions, TerminalLocation, TerminalLocationString, TerminalSettingId, TerminalSettingPrefix, TitleEventSource, WindowsShellType };
210
+ export { FlowControlConstants, PosixShellType, ProcessPropertyType, ShellIntegrationStatus, TerminalBackendChangeEvent, TerminalExitReason, TerminalExtensions, TerminalLocation, TerminalLocationString, TerminalSettingId, TerminalSettingPrefix, TitleEventSource, WindowsShellType };
@@ -50,7 +50,7 @@ const textLinkActiveForeground = registerColor('textLink.activeForeground', { li
50
50
  "Foreground color for links in text when clicked on and on mouse hover."
51
51
  )));
52
52
  registerColor('textSeparator.foreground', { light: '#0000002e', dark: '#ffffff2e', hcDark: Color.black, hcLight: '#292929' }, ( localizeWithPath(_moduleId, 11, "Color for text separators.")));
53
- registerColor('textPreformat.foreground', { light: '#A31515', dark: '#D7BA7D', hcDark: '#FFFFFF', hcLight: '#000000' }, ( localizeWithPath(_moduleId, 12, "Foreground color for preformatted text segments.")));
53
+ registerColor('textPreformat.foreground', { light: '#A31515', dark: '#D7BA7D', hcDark: '#000000', hcLight: '#FFFFFF' }, ( localizeWithPath(_moduleId, 12, "Foreground color for preformatted text segments.")));
54
54
  registerColor('textPreformat.background', { light: '#0000001A', dark: '#FFFFFF1A', hcDark: '#FFFFFF', hcLight: '#09345f' }, ( localizeWithPath(_moduleId, 13, "Background color for preformatted text segments.")));
55
55
  const textBlockQuoteBackground = registerColor('textBlockQuote.background', { light: '#f2f2f2', dark: '#222222', hcDark: null, hcLight: '#F2F2F2' }, ( localizeWithPath(_moduleId, 14, "Background color for block quotes in text.")));
56
56
  const textBlockQuoteBorder = registerColor('textBlockQuote.border', { light: '#007acc80', dark: '#007acc80', hcDark: Color.white, hcLight: '#292929' }, ( localizeWithPath(_moduleId, 15, "Border color for block quotes in text.")));
@@ -12,7 +12,7 @@ import '../../../../base/common/observableInternal/derived.js';
12
12
  import { autorun } from '../../../../base/common/observableInternal/autorun.js';
13
13
  import '../../../../base/common/observableInternal/utils.js';
14
14
  import { basenameOrAuthority } from '../../../../base/common/resources.js';
15
- import { isUndefinedOrNull, isString } from '../../../../base/common/types.js';
15
+ import { isString, isUndefinedOrNull } from '../../../../base/common/types.js';
16
16
  import { URI } from '../../../../base/common/uri.js';
17
17
  import { generateUuid } from '../../../../base/common/uuid.js';
18
18
  import { Range } from '../../../../editor/common/core/range.js';
@@ -463,6 +463,7 @@ class StackFrame {
463
463
  return (this.name === other.name) && (other.thread === this.thread) && (this.frameId === other.frameId) && (other.source === this.source) && (Range.equalsRange(this.range, other.range));
464
464
  }
465
465
  }
466
+ const KEEP_SUBTLE_FRAME_AT_TOP_REASONS = ['breakpoint', 'step', 'function breakpoint'];
466
467
  class Thread {
467
468
  constructor(session, name, threadId) {
468
469
  this.session = session;
@@ -493,8 +494,9 @@ class Thread {
493
494
  }
494
495
  getTopStackFrame() {
495
496
  const callStack = this.getCallStack();
496
- const firstAvailableStackFrame = callStack.find(sf => !!(((this.stoppedDetails?.reason === 'instruction breakpoint' || (this.stoppedDetails?.reason === 'step' && this.lastSteppingGranularity === 'instruction')) && sf.instructionPointerReference) ||
497
- (sf.source && sf.source.available && !isFrameDeemphasized(sf))));
497
+ const stopReason = this.stoppedDetails?.reason;
498
+ const firstAvailableStackFrame = callStack.find(sf => !!(((stopReason === 'instruction breakpoint' || (stopReason === 'step' && this.lastSteppingGranularity === 'instruction')) && sf.instructionPointerReference) ||
499
+ (sf.source && sf.source.available && (KEEP_SUBTLE_FRAME_AT_TOP_REASONS.includes(stopReason) || !isFrameDeemphasized(sf)))));
498
500
  return firstAvailableStackFrame;
499
501
  }
500
502
  get stateLabel() {