@codingame/monaco-vscode-api 1.85.0-next.1 → 1.85.0-next.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/monaco.js CHANGED
@@ -2,7 +2,7 @@ import { __decorate, __param } from './external/tslib/tslib.es6.js';
2
2
  import { StandaloneServices, StandaloneKeybindingService } from 'monaco-editor/esm/vs/editor/standalone/browser/standaloneServices.js';
3
3
  import { ITextResourceConfigurationService } from 'monaco-editor/esm/vs/editor/common/services/textResourceConfiguration.js';
4
4
  import { IInstantiationService } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
5
- import { StandaloneEditor, StandaloneDiffEditor2 } from 'monaco-editor/esm/vs/editor/standalone/browser/standaloneCodeEditor.js';
5
+ import { StandaloneCodeEditor, StandaloneEditor, StandaloneDiffEditor2 } from 'monaco-editor/esm/vs/editor/standalone/browser/standaloneCodeEditor.js';
6
6
  import { isObject } from 'monaco-editor/esm/vs/base/common/types.js';
7
7
  import { distinct, deepClone } from 'monaco-editor/esm/vs/base/common/objects.js';
8
8
  export { errorHandler } from 'monaco-editor/esm/vs/base/common/errors.js';
@@ -53,57 +53,62 @@ function computeDiffConfiguration(configuration, overrides) {
53
53
  Object.assign(editorConfiguration, deepClone(overrides));
54
54
  return editorConfiguration;
55
55
  }
56
- let ConfiguredStandaloneEditor = class ConfiguredStandaloneEditor extends createInjectedClass(StandaloneEditor) {
57
- constructor(domElement, _options = {}, instantiationService, textResourceConfigurationService) {
58
- const { theme, autoDetectHighContrast, model, value, language, accessibilityHelpUrl, ariaContainerElement, overflowWidgetsDomNode, dimension, ...options } = _options;
59
- const computedOptions = computeConfiguration(textResourceConfigurationService.getValue(_options.model?.uri), options);
60
- super(instantiationService, domElement, { ...computedOptions, overflowWidgetsDomNode, dimension, theme, autoDetectHighContrast, model, value, language, accessibilityHelpUrl, ariaContainerElement });
61
- this.textResourceConfigurationService = textResourceConfigurationService;
62
- this.optionsOverrides = {};
63
- this.lastAppliedEditorOptions = computedOptions;
64
- this.optionsOverrides = options;
65
- this._register(textResourceConfigurationService.onDidChangeConfiguration((e) => {
66
- const resource = this.getModel()?.uri;
67
- if (resource != null && e.affectsConfiguration(resource, 'editor')) {
68
- this.updateEditorConfiguration();
69
- }
70
- }));
71
- this._register(this.onDidChangeModelLanguage(() => this.updateEditorConfiguration()));
72
- this._register(this.onDidChangeModel(() => this.updateEditorConfiguration()));
73
- this.updateEditorConfiguration();
74
- }
75
- updateEditorConfiguration() {
76
- if (!this.hasModel() || this.textResourceConfigurationService == null) {
77
- return;
78
- }
79
- const resource = this.getModel().uri;
80
- const configuration = this.textResourceConfigurationService.getValue(resource);
81
- if (configuration == null) {
82
- return;
83
- }
84
- const editorConfiguration = computeConfiguration(configuration, this.optionsOverrides);
85
- let editorSettingsToApply = editorConfiguration;
86
- if (this.lastAppliedEditorOptions != null) {
87
- editorSettingsToApply = distinct(this.lastAppliedEditorOptions, editorSettingsToApply);
56
+ function createConfiguredEditorClass(impl) {
57
+ let ConfiguredStandaloneEditor = class ConfiguredStandaloneEditor extends impl {
58
+ constructor(domElement, _options = {}, instantiationService, textResourceConfigurationService) {
59
+ const { theme, autoDetectHighContrast, model, value, language, accessibilityHelpUrl, ariaContainerElement, overflowWidgetsDomNode, dimension, ...options } = _options;
60
+ const computedOptions = computeConfiguration(textResourceConfigurationService.getValue(_options.model?.uri), options);
61
+ super(instantiationService, domElement, { ...computedOptions, overflowWidgetsDomNode, dimension, theme, autoDetectHighContrast, model, value, language, accessibilityHelpUrl, ariaContainerElement });
62
+ this.textResourceConfigurationService = textResourceConfigurationService;
63
+ this.optionsOverrides = {};
64
+ this.lastAppliedEditorOptions = computedOptions;
65
+ this.optionsOverrides = options;
66
+ this._register(textResourceConfigurationService.onDidChangeConfiguration((e) => {
67
+ const resource = this.getModel()?.uri;
68
+ if (resource != null && e.affectsConfiguration(resource, 'editor')) {
69
+ this.updateEditorConfiguration();
70
+ }
71
+ }));
72
+ this._register(this.onDidChangeModelLanguage(() => this.updateEditorConfiguration()));
73
+ this._register(this.onDidChangeModel(() => this.updateEditorConfiguration()));
74
+ this.updateEditorConfiguration();
88
75
  }
89
- if (( Object.keys(editorSettingsToApply)).length > 0) {
90
- this.lastAppliedEditorOptions = editorConfiguration;
91
- super.updateOptions(editorSettingsToApply);
76
+ updateEditorConfiguration() {
77
+ if (!this.hasModel() || this.textResourceConfigurationService == null) {
78
+ return;
79
+ }
80
+ const resource = this.getModel().uri;
81
+ const configuration = this.textResourceConfigurationService.getValue(resource);
82
+ if (configuration == null) {
83
+ return;
84
+ }
85
+ const editorConfiguration = computeConfiguration(configuration, this.optionsOverrides);
86
+ let editorSettingsToApply = editorConfiguration;
87
+ if (this.lastAppliedEditorOptions != null) {
88
+ editorSettingsToApply = distinct(this.lastAppliedEditorOptions, editorSettingsToApply);
89
+ }
90
+ if (( Object.keys(editorSettingsToApply)).length > 0) {
91
+ this.lastAppliedEditorOptions = editorConfiguration;
92
+ super.updateOptions(editorSettingsToApply);
93
+ }
92
94
  }
93
- }
94
- updateOptions(newOptions) {
95
- this.optionsOverrides ?? (this.optionsOverrides = {});
96
- const didChange = EditorOptionsUtil.applyUpdate(this.optionsOverrides, newOptions);
97
- if (!didChange) {
98
- return;
95
+ updateOptions(newOptions) {
96
+ this.optionsOverrides ?? (this.optionsOverrides = {});
97
+ const didChange = EditorOptionsUtil.applyUpdate(this.optionsOverrides, newOptions);
98
+ if (!didChange) {
99
+ return;
100
+ }
101
+ this.updateEditorConfiguration();
99
102
  }
100
- this.updateEditorConfiguration();
101
- }
102
- };
103
- ConfiguredStandaloneEditor = __decorate([
104
- ( __param(2, IInstantiationService)),
105
- ( __param(3, ITextResourceConfigurationService))
106
- ], ConfiguredStandaloneEditor);
103
+ };
104
+ ConfiguredStandaloneEditor = __decorate([
105
+ ( __param(2, IInstantiationService)),
106
+ ( __param(3, ITextResourceConfigurationService))
107
+ ], ConfiguredStandaloneEditor);
108
+ return ConfiguredStandaloneEditor;
109
+ }
110
+ const ConfiguredStandaloneCodeEditor = createConfiguredEditorClass(createInjectedClass(StandaloneCodeEditor));
111
+ const ConfiguredStandaloneEditor = createConfiguredEditorClass(createInjectedClass(StandaloneEditor));
107
112
  let ConfiguredStandaloneDiffEditor = class ConfiguredStandaloneDiffEditor extends createInjectedClass(StandaloneDiffEditor2) {
108
113
  constructor(domElement, _options = {}, instantiationService, textResourceConfigurationService) {
109
114
  const { theme, autoDetectHighContrast, modifiedAriaLabel, originalAriaLabel, overflowWidgetsDomNode, dimension, ...options } = _options;
@@ -151,7 +156,7 @@ let ConfiguredStandaloneDiffEditor = class ConfiguredStandaloneDiffEditor extend
151
156
  this.updateEditorConfiguration();
152
157
  }
153
158
  _createInnerEditor(instantiationService, container, options) {
154
- return instantiationService.createInstance(ConfiguredStandaloneEditor, container, options);
159
+ return instantiationService.createInstance(ConfiguredStandaloneCodeEditor, container, options);
155
160
  }
156
161
  };
157
162
  ConfiguredStandaloneDiffEditor = __decorate([
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codingame/monaco-vscode-api",
3
- "version": "1.85.0-next.1",
3
+ "version": "1.85.0-next.2",
4
4
  "description": "VSCode public API plugged on the monaco editor",
5
5
  "keywords": [],
6
6
  "author": {
@@ -100,10 +100,10 @@
100
100
  "dependencies": {
101
101
  "monaco-editor": "0.45.0",
102
102
  "vscode-semver": "npm:semver@=5.5.0",
103
- "@codingame/monaco-vscode-layout-service-override": "1.85.0-next.1",
104
- "@codingame/monaco-vscode-environment-service-override": "1.85.0-next.1",
105
- "@codingame/monaco-vscode-extensions-service-override": "1.85.0-next.1",
106
- "@codingame/monaco-vscode-files-service-override": "1.85.0-next.1",
107
- "@codingame/monaco-vscode-quickaccess-service-override": "1.85.0-next.1"
103
+ "@codingame/monaco-vscode-layout-service-override": "1.85.0-next.2",
104
+ "@codingame/monaco-vscode-environment-service-override": "1.85.0-next.2",
105
+ "@codingame/monaco-vscode-extensions-service-override": "1.85.0-next.2",
106
+ "@codingame/monaco-vscode-files-service-override": "1.85.0-next.2",
107
+ "@codingame/monaco-vscode-quickaccess-service-override": "1.85.0-next.2"
108
108
  }
109
109
  }
@@ -1,10 +1,10 @@
1
1
  import { ServiceIdentifier } from '../../../../platform/instantiation/common/instantiation.js';
2
2
  import { Event } from '../../../../base/common/event.js';
3
- import { IDisposable } from '../../../../base/common/lifecycle.js';
4
- import { URI } from '../../../../base/common/uri.js';
5
3
  import { RemoteTunnel, TunnelProtocol } from '../../../../platform/tunnel/common/tunnel.js';
4
+ import { IDisposable } from '../../../../base/common/lifecycle.js';
6
5
  import { IEditableData } from '../../../common/views.js';
7
6
  import { TunnelInformation, TunnelPrivacy } from '../../../../platform/remote/common/remoteAuthorityResolver.js';
7
+ import { URI } from '../../../../base/common/uri.js';
8
8
  import { TunnelModel, TunnelProperties, Attributes, TunnelCloseReason, CandidatePort, TunnelSource } from './tunnelModel.js';
9
9
  import { IExtensionPointUser } from '../../extensions/common/extensionsRegistry.js';
10
10
  import { IExtensionDescription } from '../../../../platform/extensions/common/extensions.js';