@codingame/monaco-vscode-view-common-service-override 5.3.0 → 6.0.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.
Files changed (72) hide show
  1. package/package.json +3 -3
  2. package/viewCommon.js +1 -1
  3. package/vscode/src/vs/base/browser/ui/centered/centeredViewLayout.js +2 -1
  4. package/vscode/src/vs/base/browser/ui/grid/grid.js +34 -24
  5. package/vscode/src/vs/base/browser/ui/grid/gridview.js +35 -34
  6. package/vscode/src/vs/workbench/api/browser/viewsExtensionPoint.js +9 -60
  7. package/vscode/src/vs/workbench/browser/actions/listCommands.js +119 -79
  8. package/vscode/src/vs/workbench/browser/actions/navigationActions.js +76 -64
  9. package/vscode/src/vs/workbench/browser/media/style.css.js +1 -1
  10. package/vscode/src/vs/workbench/browser/parts/activitybar/activitybarPart.js +51 -71
  11. package/vscode/src/vs/workbench/browser/parts/activitybar/media/activityaction.css.js +1 -1
  12. package/vscode/src/vs/workbench/browser/parts/auxiliarybar/auxiliaryBarPart.js +21 -18
  13. package/vscode/src/vs/workbench/browser/parts/compositeBar.js +6 -6
  14. package/vscode/src/vs/workbench/browser/parts/compositePart.js +11 -8
  15. package/vscode/src/vs/workbench/browser/parts/editor/auxiliaryEditorPart.js +8 -7
  16. package/vscode/src/vs/workbench/browser/parts/editor/editor.contribution.js +112 -107
  17. package/vscode/src/vs/workbench/browser/parts/editor/editorConfiguration.js +2 -2
  18. package/vscode/src/vs/workbench/browser/parts/editor/editorDropTarget.js +36 -30
  19. package/vscode/src/vs/workbench/browser/parts/editor/editorPart.js +75 -69
  20. package/vscode/src/vs/workbench/browser/parts/editor/editorParts.js +143 -25
  21. package/vscode/src/vs/workbench/browser/parts/paneCompositeBar.js +20 -16
  22. package/vscode/src/vs/workbench/browser/parts/paneCompositePart.js +13 -11
  23. package/vscode/src/vs/workbench/browser/parts/paneCompositePartService.js +5 -4
  24. package/vscode/src/vs/workbench/browser/parts/panel/panelPart.js +8 -5
  25. package/vscode/src/vs/workbench/browser/parts/sidebar/sidebarActions.js +9 -6
  26. package/vscode/src/vs/workbench/browser/parts/sidebar/sidebarPart.js +51 -37
  27. package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchy.contribution.js +28 -25
  28. package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyPeek.js +23 -13
  29. package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyTree.js +5 -5
  30. package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditor.contribution.js +3 -2
  31. package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditorInputFactory.js +2 -1
  32. package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditors.js +34 -23
  33. package/vscode/src/vs/workbench/contrib/customEditor/common/contributedCustomEditors.js +3 -2
  34. package/vscode/src/vs/workbench/contrib/customEditor/common/customEditor.js +7 -1
  35. package/vscode/src/vs/workbench/contrib/customEditor/common/extensionPoint.js +3 -2
  36. package/vscode/src/vs/workbench/contrib/externalUriOpener/common/externalUriOpener.contribution.js +1 -0
  37. package/vscode/src/vs/workbench/contrib/languageStatus/browser/languageStatus.contribution.js +17 -15
  38. package/vscode/src/vs/workbench/contrib/limitIndicator/browser/limitIndicator.contribution.js +2 -1
  39. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/commands/commands.js +2 -1
  40. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditor.contribution.js +4 -3
  41. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/conflictActions.js +7 -7
  42. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/baseCodeEditorView.js +2 -2
  43. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/codeEditorView.js +2 -1
  44. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/inputCodeEditorView.js +9 -8
  45. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/resultCodeEditorView.js +2 -2
  46. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/mergeEditor.js +11 -6
  47. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/scrollSynchronizer.js +24 -23
  48. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/viewModel.js +3 -2
  49. package/vscode/src/vs/workbench/contrib/preferences/browser/keyboardLayoutPicker.js +5 -4
  50. package/vscode/src/vs/workbench/contrib/sash/browser/sash.contribution.js +2 -1
  51. package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchy.contribution.js +26 -23
  52. package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyPeek.js +23 -13
  53. package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyTree.js +5 -5
  54. package/vscode/src/vs/workbench/contrib/webview/browser/resourceLoading.js +2 -2
  55. package/vscode/src/vs/workbench/contrib/webview/browser/webviewElement.js +7 -6
  56. package/vscode/src/vs/workbench/contrib/webview/browser/webviewService.js +8 -6
  57. package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewCommands.js +10 -8
  58. package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewPanel.contribution.js +3 -2
  59. package/vscode/src/vs/workbench/contrib/webviewView/browser/webviewViewPane.js +4 -3
  60. package/vscode/src/vs/workbench/services/activity/browser/activityService.js +1 -0
  61. package/vscode/src/vs/workbench/services/editor/browser/editorPaneService.js +1 -0
  62. package/vscode/src/vs/workbench/services/editor/browser/editorResolverService.js +21 -19
  63. package/vscode/src/vs/workbench/services/history/browser/historyService.js +73 -63
  64. package/vscode/src/vs/workbench/services/progress/browser/progressService.js +19 -15
  65. package/vscode/src/vs/workbench/services/untitled/common/untitledTextEditorService.js +1 -0
  66. package/vscode/src/vs/workbench/services/views/browser/viewDescriptorService.js +23 -18
  67. package/vscode/src/vs/workbench/services/views/common/viewContainerModel.js +20 -14
  68. package/vscode/src/vs/base/browser/deviceAccess.js +0 -61
  69. package/vscode/src/vs/platform/languagePacks/common/localizedStrings.js +0 -13
  70. package/vscode/src/vs/workbench/browser/window.js +0 -330
  71. package/vscode/src/vs/workbench/services/auxiliaryWindow/browser/auxiliaryWindowService.js +0 -371
  72. package/vscode/src/vs/workbench/services/driver/browser/driver.js +0 -188
@@ -2,7 +2,7 @@ import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
2
2
  import { localizeWithPath } from 'vscode/vscode/vs/nls';
3
3
  import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
4
4
  import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
5
- import { Extensions } from 'vscode/vscode/vs/platform/configuration/common/configurationRegistry';
5
+ import { Extensions, ConfigurationScope } from 'vscode/vscode/vs/platform/configuration/common/configurationRegistry';
6
6
  import { workbenchConfigurationNodeBase } from 'vscode/vscode/vs/workbench/common/configuration';
7
7
  import { RegisteredEditorPriority } from 'vscode/vscode/vs/workbench/services/editor/common/editorResolverService';
8
8
  import { IEditorResolverService } from 'vscode/vscode/vs/workbench/services/editor/common/editorResolverService.service';
@@ -139,7 +139,7 @@ let DynamicEditorConfigurations = class DynamicEditorConfigurations extends Disp
139
139
  type: 'number',
140
140
  default: getLargeFileConfirmationLimit(this.environmentService.remoteAuthority) / ByteSize.MB,
141
141
  minimum: 1,
142
- scope: 4 ,
142
+ scope: ConfigurationScope.RESOURCE,
143
143
  markdownDescription: ( localizeWithPath(
144
144
  _moduleId,
145
145
  7,
@@ -29,7 +29,9 @@ import { IWorkspaceContextService } from 'vscode/vscode/vs/platform/workspace/co
29
29
  import { LocalSelectionTransfer, Extensions, containsDragType, CodeDataTransfers } from 'vscode/vscode/vs/platform/dnd/browser/dnd';
30
30
  import { DraggedEditorGroupIdentifier, DraggedEditorIdentifier, extractTreeDropData, ResourcesDropHandler } from 'vscode/vscode/vs/workbench/browser/dnd';
31
31
  import { fillActiveEditorViewState } from 'vscode/vscode/vs/workbench/browser/parts/editor/editor';
32
+ import { EditorInputCapabilities } from 'vscode/vscode/vs/workbench/common/editor';
32
33
  import { EDITOR_DRAG_AND_DROP_BACKGROUND, EDITOR_DROP_INTO_PROMPT_BACKGROUND, EDITOR_DROP_INTO_PROMPT_FOREGROUND, EDITOR_DROP_INTO_PROMPT_BORDER } from 'vscode/vscode/vs/workbench/common/theme';
34
+ import { MergeGroupMode, GroupDirection } from 'vscode/vscode/vs/workbench/services/editor/common/editorGroupsService';
33
35
  import { IEditorGroupsService } from 'vscode/vscode/vs/workbench/services/editor/common/editorGroupsService.service';
34
36
  import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService.service';
35
37
  import { ITreeViewsDnDService } from 'vscode/vscode/vs/editor/common/services/treeViewsDndService';
@@ -130,7 +132,7 @@ let DropOverlay = class DropOverlay extends Themable {
130
132
  }
131
133
  else if (isDraggingEditor) {
132
134
  const data = this.editorTransfer.getData(DraggedEditorIdentifier.prototype);
133
- if (Array.isArray(data)) {
135
+ if (Array.isArray(data) && data.length > 0) {
134
136
  isCopy = this.isCopyOperation(e, data[0].identifier);
135
137
  }
136
138
  }
@@ -169,18 +171,18 @@ let DropOverlay = class DropOverlay extends Themable {
169
171
  }));
170
172
  }
171
173
  isDropIntoActiveEditorEnabled() {
172
- return !!this.groupView.activeEditor?.hasCapability(128 );
174
+ return !!this.groupView.activeEditor?.hasCapability(EditorInputCapabilities.CanDropIntoEditor);
173
175
  }
174
176
  findSourceGroupView() {
175
177
  if (this.groupTransfer.hasData(DraggedEditorGroupIdentifier.prototype)) {
176
178
  const data = this.groupTransfer.getData(DraggedEditorGroupIdentifier.prototype);
177
- if (Array.isArray(data)) {
179
+ if (Array.isArray(data) && data.length > 0) {
178
180
  return this.editorGroupService.getGroup(data[0].identifier);
179
181
  }
180
182
  }
181
183
  else if (this.editorTransfer.hasData(DraggedEditorIdentifier.prototype)) {
182
184
  const data = this.editorTransfer.getData(DraggedEditorIdentifier.prototype);
183
- if (Array.isArray(data)) {
185
+ if (Array.isArray(data) && data.length > 0) {
184
186
  return this.editorGroupService.getGroup(data[0].identifier.groupId);
185
187
  }
186
188
  }
@@ -199,7 +201,7 @@ let DropOverlay = class DropOverlay extends Themable {
199
201
  };
200
202
  if (this.groupTransfer.hasData(DraggedEditorGroupIdentifier.prototype)) {
201
203
  const data = this.groupTransfer.getData(DraggedEditorGroupIdentifier.prototype);
202
- if (Array.isArray(data)) {
204
+ if (Array.isArray(data) && data.length > 0) {
203
205
  const sourceGroup = this.editorGroupService.getGroup(data[0].identifier);
204
206
  if (sourceGroup) {
205
207
  if (typeof splitDirection !== 'number' && sourceGroup === this.groupView) {
@@ -217,7 +219,7 @@ let DropOverlay = class DropOverlay extends Themable {
217
219
  else {
218
220
  let mergeGroupOptions = undefined;
219
221
  if (this.isCopyOperation(event)) {
220
- mergeGroupOptions = { mode: 0 };
222
+ mergeGroupOptions = { mode: MergeGroupMode.COPY_EDITORS };
221
223
  }
222
224
  this.editorGroupService.mergeGroup(sourceGroup, this.groupView, mergeGroupOptions);
223
225
  }
@@ -230,11 +232,12 @@ let DropOverlay = class DropOverlay extends Themable {
230
232
  }
231
233
  else if (this.editorTransfer.hasData(DraggedEditorIdentifier.prototype)) {
232
234
  const data = this.editorTransfer.getData(DraggedEditorIdentifier.prototype);
233
- if (Array.isArray(data)) {
234
- const draggedEditor = data[0].identifier;
235
- const sourceGroup = this.editorGroupService.getGroup(draggedEditor.groupId);
235
+ if (Array.isArray(data) && data.length > 0) {
236
+ const draggedEditors = data;
237
+ const firstDraggedEditor = data[0].identifier;
238
+ const sourceGroup = this.editorGroupService.getGroup(firstDraggedEditor.groupId);
236
239
  if (sourceGroup) {
237
- const copyEditor = this.isCopyOperation(event, draggedEditor);
240
+ const copyEditor = this.isCopyOperation(event, firstDraggedEditor);
238
241
  let targetGroup = undefined;
239
242
  if (this.editorGroupService.partOptions.closeEmptyGroups && sourceGroup.count === 1 && typeof splitDirection === 'number' && !copyEditor) {
240
243
  targetGroup = this.editorGroupService.moveGroup(sourceGroup, this.groupView, splitDirection);
@@ -244,15 +247,18 @@ let DropOverlay = class DropOverlay extends Themable {
244
247
  if (sourceGroup === targetGroup) {
245
248
  return;
246
249
  }
247
- const options = fillActiveEditorViewState(sourceGroup, draggedEditor.editor, {
248
- pinned: true,
249
- sticky: sourceGroup.isSticky(draggedEditor.editor),
250
- });
250
+ const editors = ( (draggedEditors.map(draggedEditor => ({
251
+ editor: draggedEditor.identifier.editor,
252
+ options: fillActiveEditorViewState(sourceGroup, draggedEditor.identifier.editor, {
253
+ pinned: true,
254
+ sticky: sourceGroup.isSticky(draggedEditor.identifier.editor)
255
+ })
256
+ }))));
251
257
  if (!copyEditor) {
252
- sourceGroup.moveEditor(draggedEditor.editor, targetGroup, options);
258
+ sourceGroup.moveEditors(editors, targetGroup);
253
259
  }
254
260
  else {
255
- sourceGroup.copyEditor(draggedEditor.editor, targetGroup, options);
261
+ sourceGroup.copyEditors(editors, targetGroup);
256
262
  }
257
263
  }
258
264
  targetGroup.focus();
@@ -262,7 +268,7 @@ let DropOverlay = class DropOverlay extends Themable {
262
268
  }
263
269
  else if (this.treeItemsTransfer.hasData(DraggedTreeItemsIdentifier.prototype)) {
264
270
  const data = this.treeItemsTransfer.getData(DraggedTreeItemsIdentifier.prototype);
265
- if (Array.isArray(data)) {
271
+ if (Array.isArray(data) && data.length > 0) {
266
272
  const editors = [];
267
273
  for (const id of data) {
268
274
  const dataTransferItem = await this.treeViewsDragAndDropService.removeDragOperationTransfer(id.identifier);
@@ -283,7 +289,7 @@ let DropOverlay = class DropOverlay extends Themable {
283
289
  }
284
290
  }
285
291
  isCopyOperation(e, draggedEditor) {
286
- if (draggedEditor?.editor.hasCapability(8 )) {
292
+ if (draggedEditor?.editor.hasCapability(EditorInputCapabilities.Singleton)) {
287
293
  return false;
288
294
  }
289
295
  return (e.ctrlKey && !isMacintosh) || (e.altKey && isMacintosh);
@@ -327,47 +333,47 @@ let DropOverlay = class DropOverlay extends Themable {
327
333
  else {
328
334
  if (preferSplitVertically) {
329
335
  if (mousePosX < splitWidthThreshold) {
330
- splitDirection = 2 ;
336
+ splitDirection = GroupDirection.LEFT;
331
337
  }
332
338
  else if (mousePosX > splitWidthThreshold * 2) {
333
- splitDirection = 3 ;
339
+ splitDirection = GroupDirection.RIGHT;
334
340
  }
335
341
  else if (mousePosY < editorControlHeight / 2) {
336
- splitDirection = 0 ;
342
+ splitDirection = GroupDirection.UP;
337
343
  }
338
344
  else {
339
- splitDirection = 1 ;
345
+ splitDirection = GroupDirection.DOWN;
340
346
  }
341
347
  }
342
348
  else {
343
349
  if (mousePosY < splitHeightThreshold) {
344
- splitDirection = 0 ;
350
+ splitDirection = GroupDirection.UP;
345
351
  }
346
352
  else if (mousePosY > splitHeightThreshold * 2) {
347
- splitDirection = 1 ;
353
+ splitDirection = GroupDirection.DOWN;
348
354
  }
349
355
  else if (mousePosX < editorControlWidth / 2) {
350
- splitDirection = 2 ;
356
+ splitDirection = GroupDirection.LEFT;
351
357
  }
352
358
  else {
353
- splitDirection = 3 ;
359
+ splitDirection = GroupDirection.RIGHT;
354
360
  }
355
361
  }
356
362
  }
357
363
  switch (splitDirection) {
358
- case 0 :
364
+ case GroupDirection.UP:
359
365
  this.doPositionOverlay({ top: '0', left: '0', width: '100%', height: '50%' });
360
366
  this.toggleDropIntoPrompt(false);
361
367
  break;
362
- case 1 :
368
+ case GroupDirection.DOWN:
363
369
  this.doPositionOverlay({ top: '50%', left: '0', width: '100%', height: '50%' });
364
370
  this.toggleDropIntoPrompt(false);
365
371
  break;
366
- case 2 :
372
+ case GroupDirection.LEFT:
367
373
  this.doPositionOverlay({ top: '0', left: '0', width: '50%', height: '100%' });
368
374
  this.toggleDropIntoPrompt(false);
369
375
  break;
370
- case 3 :
376
+ case GroupDirection.RIGHT:
371
377
  this.doPositionOverlay({ top: '0', left: '50%', width: '50%', height: '100%' });
372
378
  this.toggleDropIntoPrompt(false);
373
379
  break;