@codingame/monaco-vscode-view-common-service-override 4.5.2 → 5.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.
Files changed (29) hide show
  1. package/package.json +3 -3
  2. package/viewCommon.js +3 -6
  3. package/vscode/src/vs/workbench/api/browser/viewsExtensionPoint.js +50 -36
  4. package/vscode/src/vs/workbench/browser/actions/listCommands.js +6 -1
  5. package/vscode/src/vs/workbench/browser/media/style.css.js +1 -1
  6. package/vscode/src/vs/workbench/browser/parts/auxiliarybar/auxiliaryBarPart.js +12 -10
  7. package/vscode/src/vs/workbench/browser/parts/auxiliarybar/media/auxiliaryBarPart.css.js +1 -1
  8. package/vscode/src/vs/workbench/browser/parts/compositePart.js +3 -3
  9. package/vscode/src/vs/workbench/browser/parts/editor/auxiliaryEditorPart.js +7 -4
  10. package/vscode/src/vs/workbench/browser/parts/editor/editor.contribution.js +1 -1
  11. package/vscode/src/vs/workbench/browser/parts/editor/editorPart.js +51 -16
  12. package/vscode/src/vs/workbench/browser/parts/editor/editorParts.js +92 -40
  13. package/vscode/src/vs/workbench/browser/parts/paneCompositePart.js +15 -12
  14. package/vscode/src/vs/workbench/browser/parts/panel/panelPart.js +11 -9
  15. package/vscode/src/vs/workbench/browser/parts/sidebar/media/sidebarpart.css.js +1 -1
  16. package/vscode/src/vs/workbench/browser/parts/sidebar/sidebarPart.js +12 -9
  17. package/vscode/src/vs/workbench/contrib/languageStatus/browser/languageStatus.contribution.js +8 -5
  18. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/conflictActions.js +1 -0
  19. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editorGutter.js +1 -0
  20. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/baseCodeEditorView.js +1 -0
  21. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/codeEditorView.js +1 -0
  22. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/inputCodeEditorView.js +1 -0
  23. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/mergeEditor.js +1 -0
  24. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/scrollSynchronizer.js +6 -5
  25. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/viewModel.js +1 -0
  26. package/vscode/src/vs/workbench/contrib/webview/browser/webviewFindWidget.js +5 -3
  27. package/vscode/src/vs/workbench/contrib/webviewView/browser/webviewViewPane.js +13 -11
  28. package/vscode/src/vs/workbench/services/auxiliaryWindow/browser/auxiliaryWindowService.js +34 -3
  29. package/vscode/src/vs/workbench/services/driver/browser/driver.js +1 -1
@@ -1,10 +1,11 @@
1
1
  import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
2
+ import 'vscode/vscode/vs/base/common/arrays';
2
3
  import 'vscode/vscode/vs/base/common/observableInternal/derived';
3
4
  import { autorunWithStore } from 'vscode/vscode/vs/base/common/observableInternal/autorun';
4
5
  import 'vscode/vscode/vs/base/common/observableInternal/utils';
5
6
  import 'vscode/vscode/vs/base/common/cancellation';
6
7
  import { DocumentLineRangeMap } from 'vscode/vscode/vs/workbench/contrib/mergeEditor/browser/model/mapping';
7
- import { ReentrancyBarrier } from 'vscode/vscode/vs/workbench/contrib/mergeEditor/browser/utils';
8
+ import { ReentrancyBarrier } from 'vscode/vscode/vs/base/common/controlFlow';
8
9
 
9
10
  class ScrollSynchronizer extends Disposable {
10
11
  get model() { return this.viewModel.get()?.model; }
@@ -42,7 +43,7 @@ class ScrollSynchronizer extends Disposable {
42
43
  }
43
44
  }
44
45
  };
45
- this._store.add(this.input1View.editor.onDidScrollChange(this.reentrancyBarrier.makeExclusive((c) => {
46
+ this._store.add(this.input1View.editor.onDidScrollChange(this.reentrancyBarrier.makeExclusiveOrSkip((c) => {
46
47
  if (c.scrollTopChanged) {
47
48
  handleInput1OnScroll();
48
49
  }
@@ -52,7 +53,7 @@ class ScrollSynchronizer extends Disposable {
52
53
  this.inputResultView.editor.setScrollLeft(c.scrollLeft, 1 );
53
54
  }
54
55
  })));
55
- this._store.add(this.input2View.editor.onDidScrollChange(this.reentrancyBarrier.makeExclusive((c) => {
56
+ this._store.add(this.input2View.editor.onDidScrollChange(this.reentrancyBarrier.makeExclusiveOrSkip((c) => {
56
57
  if (!this.model) {
57
58
  return;
58
59
  }
@@ -82,7 +83,7 @@ class ScrollSynchronizer extends Disposable {
82
83
  this.inputResultView.editor.setScrollLeft(c.scrollLeft, 1 );
83
84
  }
84
85
  })));
85
- this._store.add(this.inputResultView.editor.onDidScrollChange(this.reentrancyBarrier.makeExclusive((c) => {
86
+ this._store.add(this.inputResultView.editor.onDidScrollChange(this.reentrancyBarrier.makeExclusiveOrSkip((c) => {
86
87
  if (c.scrollTopChanged) {
87
88
  if (this.shouldAlignResult) {
88
89
  this.input1View.editor.setScrollTop(c.scrollTop, 1 );
@@ -109,7 +110,7 @@ class ScrollSynchronizer extends Disposable {
109
110
  this._store.add(autorunWithStore((reader, store) => {
110
111
  const baseView = this.baseView.read(reader);
111
112
  if (baseView) {
112
- store.add(baseView.editor.onDidScrollChange(this.reentrancyBarrier.makeExclusive((c) => {
113
+ store.add(baseView.editor.onDidScrollChange(this.reentrancyBarrier.makeExclusiveOrSkip((c) => {
113
114
  if (c.scrollTopChanged) {
114
115
  if (!this.model) {
115
116
  return;
@@ -6,6 +6,7 @@ import { derived } from 'vscode/vscode/vs/base/common/observableInternal/derived
6
6
  import 'vscode/vscode/vs/base/common/observableInternal/autorun';
7
7
  import { derivedObservableWithWritableCache } from 'vscode/vscode/vs/base/common/observableInternal/utils';
8
8
  import 'vscode/vscode/vs/base/common/cancellation';
9
+ import 'vscode/vscode/vs/base/common/arrays';
9
10
  import { Range } from 'vscode/vscode/vs/editor/common/core/range';
10
11
  import { localizeWithPath } from 'vscode/vscode/vs/nls';
11
12
  import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
@@ -1,6 +1,7 @@
1
1
  import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
2
2
  import { IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/contextkey.service';
3
3
  import { IContextViewService } from 'vscode/vscode/vs/platform/contextview/browser/contextView.service';
4
+ import { IHoverService } from 'vscode/vscode/vs/platform/hover/browser/hover.service';
4
5
  import { IKeybindingService } from 'vscode/vscode/vs/platform/keybinding/common/keybinding.service';
5
6
  import { SimpleFindWidget } from 'vscode/vscode/vs/workbench/contrib/codeEditor/browser/find/simpleFindWidget';
6
7
  import { KEYBINDING_CONTEXT_WEBVIEW_FIND_WIDGET_FOCUSED } from 'vscode/vscode/vs/workbench/contrib/webview/browser/webview';
@@ -9,12 +10,12 @@ let WebviewFindWidget = class WebviewFindWidget extends SimpleFindWidget {
9
10
  async _getResultCount(dataChanged) {
10
11
  return undefined;
11
12
  }
12
- constructor(_delegate, contextViewService, contextKeyService, keybindingService) {
13
+ constructor(_delegate, contextViewService, contextKeyService, hoverService, keybindingService) {
13
14
  super({
14
15
  showCommonFindToggles: false,
15
16
  checkImeCompletionState: _delegate.checkImeCompletionState,
16
17
  enableSash: true,
17
- }, contextViewService, contextKeyService, keybindingService);
18
+ }, contextViewService, contextKeyService, hoverService, keybindingService);
18
19
  this._delegate = _delegate;
19
20
  this._findWidgetFocused = KEYBINDING_CONTEXT_WEBVIEW_FIND_WIDGET_FOCUSED.bindTo(contextKeyService);
20
21
  this._register(_delegate.hasFindResult(hasResult => {
@@ -59,7 +60,8 @@ let WebviewFindWidget = class WebviewFindWidget extends SimpleFindWidget {
59
60
  WebviewFindWidget = ( __decorate([
60
61
  ( __param(1, IContextViewService)),
61
62
  ( __param(2, IContextKeyService)),
62
- ( __param(3, IKeybindingService))
63
+ ( __param(3, IHoverService)),
64
+ ( __param(4, IKeybindingService))
63
65
  ], WebviewFindWidget));
64
66
 
65
67
  export { WebviewFindWidget };
@@ -25,6 +25,7 @@ import { IWebviewViewService } from 'vscode/vscode/vs/workbench/contrib/webviewV
25
25
  import { NumberBadge } from 'vscode/vscode/vs/workbench/services/activity/common/activity';
26
26
  import { IActivityService } from 'vscode/vscode/vs/workbench/services/activity/common/activity.service';
27
27
  import { IExtensionService } from 'vscode/vscode/vs/workbench/services/extensions/common/extensions.service';
28
+ import { IHoverService } from 'vscode/vscode/vs/platform/hover/browser/hover.service';
28
29
 
29
30
  var WebviewViewPane_1;
30
31
  const storageKeys = {
@@ -36,8 +37,8 @@ let WebviewViewPane = class WebviewViewPane extends ViewPane {
36
37
  this._originStore ??= ( new ExtensionKeyedWebviewOriginStore('webviewViews.origins', storageService));
37
38
  return this._originStore;
38
39
  }
39
- constructor(options, configurationService, contextKeyService, contextMenuService, instantiationService, keybindingService, openerService, telemetryService, themeService, viewDescriptorService, activityService, extensionService, progressService, storageService, viewService, webviewService, webviewViewService) {
40
- super({ ...options, titleMenuId: MenuId.ViewTitle, showActions: ViewPaneShowActions.WhenExpanded }, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService);
40
+ constructor(options, configurationService, contextKeyService, contextMenuService, instantiationService, keybindingService, openerService, telemetryService, hoverService, themeService, viewDescriptorService, activityService, extensionService, progressService, storageService, viewService, webviewService, webviewViewService) {
41
+ super({ ...options, titleMenuId: MenuId.ViewTitle, showActions: ViewPaneShowActions.WhenExpanded }, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService, hoverService);
41
42
  this.activityService = activityService;
42
43
  this.extensionService = extensionService;
43
44
  this.progressService = progressService;
@@ -220,15 +221,16 @@ WebviewViewPane = WebviewViewPane_1 = ( __decorate([
220
221
  ( __param(5, IKeybindingService)),
221
222
  ( __param(6, IOpenerService)),
222
223
  ( __param(7, ITelemetryService)),
223
- ( __param(8, IThemeService)),
224
- ( __param(9, IViewDescriptorService)),
225
- ( __param(10, IActivityService)),
226
- ( __param(11, IExtensionService)),
227
- ( __param(12, IProgressService)),
228
- ( __param(13, IStorageService)),
229
- ( __param(14, IViewsService)),
230
- ( __param(15, IWebviewService)),
231
- ( __param(16, IWebviewViewService))
224
+ ( __param(8, IHoverService)),
225
+ ( __param(9, IThemeService)),
226
+ ( __param(10, IViewDescriptorService)),
227
+ ( __param(11, IActivityService)),
228
+ ( __param(12, IExtensionService)),
229
+ ( __param(13, IProgressService)),
230
+ ( __param(14, IStorageService)),
231
+ ( __param(15, IViewsService)),
232
+ ( __param(16, IWebviewService)),
233
+ ( __param(17, IWebviewViewService))
232
234
  ], WebviewViewPane));
233
235
 
234
236
  export { WebviewViewPane };
@@ -17,10 +17,18 @@ import { ITelemetryService } from 'vscode/vscode/vs/platform/telemetry/common/te
17
17
  import { Barrier } from 'vscode/vscode/vs/base/common/async';
18
18
  import { IHostService } from 'vscode/vscode/vs/workbench/services/host/browser/host.service';
19
19
  import { IWorkbenchEnvironmentService } from 'vscode/vscode/vs/workbench/services/environment/common/environmentService.service';
20
+ import { coalesce } from 'vscode/vscode/vs/base/common/arrays';
21
+ import { getZoomLevel } from 'vscode/vscode/vs/base/browser/browser';
20
22
  import 'vscode/vscode/vs/platform/instantiation/common/instantiation';
21
23
 
22
24
  var BrowserAuxiliaryWindowService_1;
23
25
  const _moduleId = "vs/workbench/services/auxiliaryWindow/browser/auxiliaryWindowService";
26
+ var AuxiliaryWindowMode;
27
+ ( ((function(AuxiliaryWindowMode) {
28
+ AuxiliaryWindowMode[AuxiliaryWindowMode["Maximized"] = 0] = "Maximized";
29
+ AuxiliaryWindowMode[AuxiliaryWindowMode["Normal"] = 1] = "Normal";
30
+ AuxiliaryWindowMode[AuxiliaryWindowMode["Fullscreen"] = 2] = "Fullscreen";
31
+ })(AuxiliaryWindowMode || (AuxiliaryWindowMode = {}))));
24
32
  let AuxiliaryWindow = class AuxiliaryWindow extends BaseWindow {
25
33
  constructor(window, container, stylesHaveLoaded, configurationService, hostService, environmentService) {
26
34
  super(window, undefined, hostService, environmentService);
@@ -100,6 +108,17 @@ let AuxiliaryWindow = class AuxiliaryWindow extends BaseWindow {
100
108
  this._onWillLayout.fire(dimension);
101
109
  this._onDidLayout.fire(dimension);
102
110
  }
111
+ createState() {
112
+ return {
113
+ bounds: {
114
+ x: this.window.screenX,
115
+ y: this.window.screenY,
116
+ width: this.window.outerWidth,
117
+ height: this.window.outerHeight
118
+ },
119
+ zoomLevel: getZoomLevel(this.window)
120
+ };
121
+ }
103
122
  dispose() {
104
123
  if (this._store.isDisposed) {
105
124
  return;
@@ -184,14 +203,23 @@ let BrowserAuxiliaryWindowService = class BrowserAuxiliaryWindowService extends
184
203
  width,
185
204
  height
186
205
  };
187
- if (newWindowBounds.x === activeWindowBounds.x && newWindowBounds.y === activeWindowBounds.y) {
206
+ if (!options?.bounds && newWindowBounds.x === activeWindowBounds.x && newWindowBounds.y === activeWindowBounds.y) {
188
207
  newWindowBounds = {
189
208
  ...newWindowBounds,
190
209
  x: newWindowBounds.x + 30,
191
210
  y: newWindowBounds.y + 30
192
211
  };
193
212
  }
194
- const auxiliaryWindow = mainWindow.open('about:blank', undefined, `popup=yes,left=${newWindowBounds.x},top=${newWindowBounds.y},width=${newWindowBounds.width},height=${newWindowBounds.height}`);
213
+ const features = coalesce([
214
+ 'popup=yes',
215
+ `left=${newWindowBounds.x}`,
216
+ `top=${newWindowBounds.y}`,
217
+ `width=${newWindowBounds.width}`,
218
+ `height=${newWindowBounds.height}`,
219
+ options?.mode === AuxiliaryWindowMode.Maximized ? 'window-maximized=yes' : undefined,
220
+ options?.mode === AuxiliaryWindowMode.Fullscreen ? 'window-fullscreen=yes' : undefined
221
+ ]);
222
+ const auxiliaryWindow = mainWindow.open('about:blank', undefined, features.join(','));
195
223
  if (!auxiliaryWindow && isWeb) {
196
224
  return (await this.dialogService.prompt({
197
225
  type: Severity$1.Warning,
@@ -327,6 +355,9 @@ let BrowserAuxiliaryWindowService = class BrowserAuxiliaryWindowService extends
327
355
  mark('code/auxiliaryWindow/didApplyHTML');
328
356
  return container;
329
357
  }
358
+ getWindow(windowId) {
359
+ return this.windows.get(windowId);
360
+ }
330
361
  };
331
362
  BrowserAuxiliaryWindowService = BrowserAuxiliaryWindowService_1 = ( (__decorate([
332
363
  ( (__param(0, IWorkbenchLayoutService))),
@@ -337,4 +368,4 @@ BrowserAuxiliaryWindowService = BrowserAuxiliaryWindowService_1 = ( (__decorate(
337
368
  ( (__param(5, IWorkbenchEnvironmentService)))
338
369
  ], BrowserAuxiliaryWindowService)));
339
370
 
340
- export { AuxiliaryWindow, BrowserAuxiliaryWindowService };
371
+ export { AuxiliaryWindow, AuxiliaryWindowMode, BrowserAuxiliaryWindowService };
@@ -137,7 +137,7 @@ let BrowserWindowDriver = class BrowserWindowDriver {
137
137
  if (!xterm) {
138
138
  throw ( new Error(`Xterm not found: ${selector}`));
139
139
  }
140
- xterm._core.coreService.triggerDataEvent(text);
140
+ xterm.input(text);
141
141
  }
142
142
  getLocaleInfo() {
143
143
  return Promise.resolve({