@codingame/monaco-vscode-editor-service-override 1.85.0-next.0 → 1.85.0-next.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 (2) hide show
  1. package/editor.js +53 -10
  2. package/package.json +2 -2
package/editor.js CHANGED
@@ -12,6 +12,7 @@ import { FILE_EDITOR_INPUT_ID } from 'vscode/vscode/vs/workbench/contrib/files/c
12
12
  import { IEditorGroupsService } from 'vscode/vscode/vs/workbench/services/editor/common/editorGroupsService';
13
13
  import { IInstantiationService } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
14
14
  import { IContextKeyService } from 'monaco-editor/esm/vs/platform/contextkey/common/contextkey.js';
15
+ import { DEFAULT_EDITOR_PART_OPTIONS } from 'vscode/vscode/vs/workbench/browser/parts/editor/editor';
15
16
  import { MonacoEditorService, MonacoDelegateEditorGroupsService } from './tools/editor.js';
16
17
  import { unsupported } from './tools.js';
17
18
  import 'vscode/vscode/vs/workbench/browser/parts/editor/editor.contribution';
@@ -93,15 +94,66 @@ class EmptyEditorGroup {
93
94
  }
94
95
  }
95
96
  const fakeActiveGroup = new EmptyEditorGroup();
97
+ class EmptyEditorPart {
98
+ constructor() {
99
+ this.onDidLayout = Event.None;
100
+ this.onDidScroll = Event.None;
101
+ this.isReady = true;
102
+ this.whenReady = Promise.resolve();
103
+ this.whenRestored = Promise.resolve();
104
+ this.hasRestorableState = false;
105
+ this.centerLayout = unsupported;
106
+ this.isLayoutCentered = unsupported;
107
+ this.enforcePartOptions = unsupported;
108
+ this.onDidChangeActiveGroup = Event.None;
109
+ this.onDidAddGroup = Event.None;
110
+ this.onDidRemoveGroup = Event.None;
111
+ this.onDidMoveGroup = Event.None;
112
+ this.onDidActivateGroup = Event.None;
113
+ this.onDidChangeGroupIndex = Event.None;
114
+ this.onDidChangeGroupLocked = Event.None;
115
+ this.onDidChangeGroupMaximized = Event.None;
116
+ this.activeGroup = fakeActiveGroup;
117
+ this.groups = [fakeActiveGroup];
118
+ this.count = 0;
119
+ this.orientation = 0 ;
120
+ this.getGroups = () => [];
121
+ this.getGroup = () => undefined;
122
+ this.activateGroup = unsupported;
123
+ this.getSize = unsupported;
124
+ this.setSize = unsupported;
125
+ this.arrangeGroups = unsupported;
126
+ this.toggleMaximizeGroup = unsupported;
127
+ this.toggleExpandGroup = unsupported;
128
+ this.applyLayout = unsupported;
129
+ this.getLayout = unsupported;
130
+ this.setGroupOrientation = unsupported;
131
+ this.findGroup = () => undefined;
132
+ this.addGroup = unsupported;
133
+ this.removeGroup = unsupported;
134
+ this.moveGroup = unsupported;
135
+ this.mergeGroup = unsupported;
136
+ this.mergeAllGroups = unsupported;
137
+ this.copyGroup = unsupported;
138
+ this.partOptions = DEFAULT_EDITOR_PART_OPTIONS;
139
+ this.onDidChangeEditorPartOptions = Event.None;
140
+ this.createEditorDropTarget = unsupported;
141
+ }
142
+ get contentDimension() { return unsupported(); }
143
+ get sideGroup() { return unsupported(); }
144
+ }
96
145
  class EmptyEditorGroupsService {
97
146
  constructor() {
98
147
  this.onDidCreateAuxiliaryEditorPart = Event.None;
99
- this.parts = [];
148
+ this.mainPart = new EmptyEditorPart();
149
+ this.activePart = this.mainPart;
150
+ this.parts = [this.mainPart];
100
151
  this.getPart = unsupported;
101
152
  this.createAuxiliaryEditorPart = unsupported;
102
153
  this.onDidChangeGroupMaximized = Event.None;
103
154
  this.toggleMaximizeGroup = unsupported;
104
155
  this.toggleExpandGroup = unsupported;
156
+ this.partOptions = DEFAULT_EDITOR_PART_OPTIONS;
105
157
  this.createEditorDropTarget = unsupported;
106
158
  this._serviceBrand = undefined;
107
159
  this.getLayout = unsupported;
@@ -142,15 +194,6 @@ class EmptyEditorGroupsService {
142
194
  this.onDidChangeEditorPartOptions = Event.None;
143
195
  this.enforcePartOptions = unsupported;
144
196
  }
145
- get activePart() {
146
- return unsupported();
147
- }
148
- get mainPart() {
149
- return unsupported();
150
- }
151
- get partOptions() {
152
- return unsupported();
153
- }
154
197
  get contentDimension() { return unsupported(); }
155
198
  get sideGroup() { return unsupported(); }
156
199
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codingame/monaco-vscode-editor-service-override",
3
- "version": "1.85.0-next.0",
3
+ "version": "1.85.0-next.1",
4
4
  "keywords": [],
5
5
  "author": {
6
6
  "name": "CodinGame",
@@ -18,7 +18,7 @@
18
18
  "module": "index.js",
19
19
  "types": "index.d.ts",
20
20
  "dependencies": {
21
- "vscode": "npm:@codingame/monaco-vscode-api@1.85.0-next.0",
21
+ "vscode": "npm:@codingame/monaco-vscode-api@1.85.0-next.1",
22
22
  "monaco-editor": "0.45.0"
23
23
  }
24
24
  }