@codingame/monaco-vscode-api 2.2.0-next.5 → 2.2.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-api",
3
- "version": "2.2.0-next.5",
3
+ "version": "2.2.1",
4
4
  "description": "VSCode public API plugged on the monaco editor",
5
5
  "keywords": [],
6
6
  "author": {
@@ -96,12 +96,12 @@
96
96
  "dependencies": {
97
97
  "vscode-marked": "npm:marked@=3.0.2",
98
98
  "vscode-semver": "npm:semver@=5.5.0",
99
- "@codingame/monaco-vscode-extensions-service-override": "2.2.0-next.5",
100
- "@codingame/monaco-vscode-files-service-override": "2.2.0-next.5",
101
- "@codingame/monaco-vscode-quickaccess-service-override": "2.2.0-next.5",
102
- "@codingame/monaco-vscode-environment-service-override": "2.2.0-next.5",
103
- "@codingame/monaco-vscode-layout-service-override": "2.2.0-next.5",
104
- "@codingame/monaco-vscode-host-service-override": "2.2.0-next.5",
105
- "@codingame/monaco-vscode-base-service-override": "2.2.0-next.5"
99
+ "@codingame/monaco-vscode-files-service-override": "2.2.1",
100
+ "@codingame/monaco-vscode-quickaccess-service-override": "2.2.1",
101
+ "@codingame/monaco-vscode-extensions-service-override": "2.2.1",
102
+ "@codingame/monaco-vscode-environment-service-override": "2.2.1",
103
+ "@codingame/monaco-vscode-layout-service-override": "2.2.1",
104
+ "@codingame/monaco-vscode-host-service-override": "2.2.1",
105
+ "@codingame/monaco-vscode-base-service-override": "2.2.1"
106
106
  }
107
107
  }
@@ -3,21 +3,21 @@ export { IViewContainerDescriptor, IViewDescriptor } from '../../vscode/src/vs/w
3
3
  import { BrandedService, ServicesAccessor } from '../../vscode/src/vs/platform/instantiation/common/instantiation.js';
4
4
  import { IDisposable } from '../../vscode/src/vs/base/common/lifecycle.js';
5
5
  import { Dimension } from '../../vscode/src/vs/base/browser/dom.js';
6
+ import { Event } from '../../vscode/src/vs/base/common/event.js';
7
+ import { CancellationToken } from '../../vscode/src/vs/base/common/cancellation.js';
6
8
  import { URI } from '../../vscode/src/vs/base/common/uri.js';
9
+ import { IStorageService } from '../../vscode/src/vs/platform/storage/common/storage.js';
10
+ import { ITelemetryService } from '../../vscode/src/vs/platform/telemetry/common/telemetry.js';
11
+ import { IThemeService } from '../../vscode/src/vs/platform/theme/common/themeService.js';
12
+ import { IEditorOptions } from '../../vscode/src/vs/platform/editor/common/editor.js';
13
+ import { Parts, Position } from '../../vscode/src/vs/workbench/services/layout/browser/layoutService.js';
7
14
  import { Codicon } from '../../vscode/src/vs/base/common/codicons.js';
8
15
  import { RegisteredEditorInfo, RegisteredEditorOptions, EditorInputFactoryObject } from '../../vscode/src/vs/workbench/services/editor/common/editorResolverService.js';
9
16
  export { RegisteredEditorPriority } from '../../vscode/src/vs/workbench/services/editor/common/editorResolverService.js';
10
17
  import { EditorInput, IEditorCloseHandler } from '../../vscode/src/vs/workbench/common/editor/editorInput.js';
11
18
  import { IEditorOpenContext, EditorInputCapabilities, Verbosity, IEditorSerializer } from '../../vscode/src/vs/workbench/common/editor.js';
12
- import { IEditorOptions } from '../../vscode/src/vs/platform/editor/common/editor.js';
13
19
  import { EditorPane } from '../../vscode/src/vs/workbench/browser/parts/editor/editorPane.js';
14
- import { ITelemetryService } from '../../vscode/src/vs/platform/telemetry/common/telemetry.js';
15
- import { IStorageService } from '../../vscode/src/vs/platform/storage/common/storage.js';
16
- import { IThemeService } from '../../vscode/src/vs/platform/theme/common/themeService.js';
17
- import { CancellationToken } from '../../vscode/src/vs/base/common/cancellation.js';
18
- import { Event } from '../../vscode/src/vs/base/common/event.js';
19
20
  import '../../vscode/src/vs/editor/editor.api.js';
20
- import { Parts, Position } from '../../vscode/src/vs/workbench/services/layout/browser/layoutService.js';
21
21
 
22
22
  type Label = string | {
23
23
  short: string;
@@ -3,7 +3,7 @@ import { SyncDescriptor } from '../../vscode/src/vs/platform/instantiation/commo
3
3
  import { Extensions } from '../../vscode/src/vs/workbench/common/views.js';
4
4
  export { ViewContainerLocation } from '../../vscode/src/vs/workbench/common/views.js';
5
5
  import { MutableDisposable, DisposableStore } from '../../vscode/src/vs/base/common/lifecycle.js';
6
- import { size, $, append } from '../../vscode/src/vs/base/browser/dom.js';
6
+ import { size, $ } from '../../vscode/src/vs/base/browser/dom.js';
7
7
  import { ViewPane } from '../../vscode/src/vs/workbench/browser/parts/views/viewPane.js';
8
8
  import { Registry } from '../../vscode/src/vs/platform/registry/common/platform.js';
9
9
  import { ViewPaneContainer } from '../../vscode/src/vs/workbench/browser/parts/views/viewPaneContainer.js';
@@ -178,11 +178,23 @@ function registerCustomView(options) {
178
178
  ctorDescriptor: new SyncDescriptor(class extends ViewPane {
179
179
  renderBody(container) {
180
180
  super.renderBody(container);
181
- this.content = $('.view-pane-content');
182
- this.content.style.display = 'flex';
183
- this.content.style.alignItems = 'stretch';
184
- append(container, this.content);
185
- this._register(options.renderBody(this.content));
181
+ this.container = $('.view-pane-content');
182
+ this.container.style.display = 'flex';
183
+ this.container.style.alignItems = 'stretch';
184
+ this._register(options.renderBody(this.container));
185
+ this.wrapper = document.createElement('div');
186
+ this.wrapper.append(this.container);
187
+ this.scrollbar = this._register(new DomScrollableElement(this.wrapper, { horizontal: 1 , vertical: 1 }));
188
+ container.appendChild(this.scrollbar.getDomNode());
189
+ const observer = new ResizeObserver(() => {
190
+ assertIsDefined(this.scrollbar).scanDomNode();
191
+ });
192
+ observer.observe(this.container);
193
+ this._register({
194
+ dispose() {
195
+ observer.disconnect();
196
+ }
197
+ });
186
198
  }
187
199
  getActionViewItem(action, actionOptions) {
188
200
  const customAction = (options.actions ?? []).find(customAction => customAction.id === action.id);
@@ -197,8 +209,9 @@ function registerCustomView(options) {
197
209
  return super.getActionViewItem(action, actionOptions);
198
210
  }
199
211
  layoutBody(height, width) {
200
- this.content.style.height = `${height}px`;
201
- this.content.style.width = `${width}px`;
212
+ const [wrapper, scrollbar] = assertAllDefined(this.wrapper, this.scrollbar);
213
+ size(wrapper, width, height);
214
+ scrollbar.scanDomNode();
202
215
  }
203
216
  }),
204
217
  canMoveView: options.canMoveView ?? true,
@@ -260,4 +273,4 @@ const onDidChangeSideBarPosition = (listener) => {
260
273
  function getSideBarPosition() {
261
274
  return StandaloneServices.get(IWorkbenchLayoutService).getSideBarPosition();
262
275
  }
263
- export { EditorInput, EditorPane, SimpleEditorInput, SimpleEditorPane, getPanelPosition, getSideBarPosition, isPartVisibile, onDidChangePanelPosition, onDidChangeSideBarPosition, registerCustomView, registerEditor, registerEditorPane, registerEditorSerializer, setPartVisibility, viewContainerRegistry, viewRegistry };
276
+ export { EditorInput, EditorPane, SimpleEditorInput, SimpleEditorPane, ViewPaneContainer, getPanelPosition, getSideBarPosition, isPartVisibile, onDidChangePanelPosition, onDidChangeSideBarPosition, registerCustomView, registerEditor, registerEditorPane, registerEditorSerializer, setPartVisibility, viewContainerRegistry, viewRegistry };
@@ -148,7 +148,10 @@ StandaloneCodeEditor = ( __decorate([
148
148
  ], StandaloneCodeEditor));
149
149
  let StandaloneEditor = class StandaloneEditor extends StandaloneCodeEditor {
150
150
  constructor(domElement, _options, instantiationService, codeEditorService, commandService, contextKeyService, keybindingService, themeService, notificationService, configurationService, accessibilityService, modelService, languageService, languageConfigurationService, languageFeaturesService) {
151
- const options = { ..._options };
151
+ const options = {
152
+ extraEditorClassName: 'standalone-monaco-editor',
153
+ ..._options
154
+ };
152
155
  updateConfigurationService(configurationService, options, false);
153
156
  const themeDomRegistration = themeService.registerEditorContainer(domElement);
154
157
  if (typeof options.theme === 'string') {