@opensumi/ide-editor 3.6.5-next-1734949468.0 → 3.6.5-next-1735177632.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.
- package/lib/browser/diff/compare.d.ts.map +1 -1
- package/lib/browser/diff/compare.js +1 -1
- package/lib/browser/diff/compare.js.map +1 -1
- package/lib/browser/doc-model/editor-document-model.d.ts.map +1 -1
- package/lib/browser/doc-model/editor-document-model.js +10 -1
- package/lib/browser/doc-model/editor-document-model.js.map +1 -1
- package/lib/browser/doc-model/saveParticipants.js +19 -19
- package/lib/browser/doc-model/saveParticipants.js.map +1 -1
- package/lib/browser/editor.contribution.d.ts.map +1 -1
- package/lib/browser/editor.contribution.js +6 -0
- package/lib/browser/editor.contribution.js.map +1 -1
- package/lib/browser/monaco-contrib/command/command.service.d.ts +1 -1
- package/lib/browser/monaco-contrib/command/command.service.d.ts.map +1 -1
- package/lib/browser/monaco-contrib/command/command.service.js +4 -4
- package/lib/browser/monaco-contrib/command/command.service.js.map +1 -1
- package/lib/browser/preference/converter.d.ts.map +1 -1
- package/lib/browser/preference/converter.js +5 -0
- package/lib/browser/preference/converter.js.map +1 -1
- package/lib/browser/preference/schema.d.ts +1 -0
- package/lib/browser/preference/schema.d.ts.map +1 -1
- package/lib/browser/preference/schema.js +16 -0
- package/lib/browser/preference/schema.js.map +1 -1
- package/lib/common/doc-cache.d.ts +0 -2
- package/lib/common/doc-cache.d.ts.map +1 -1
- package/lib/common/doc-cache.js +0 -11
- package/lib/common/doc-cache.js.map +1 -1
- package/lib/common/editor.d.ts +1 -2
- package/lib/common/editor.d.ts.map +1 -1
- package/lib/common/language.d.ts +1 -2
- package/lib/common/language.d.ts.map +1 -1
- package/lib/common/language.js +1 -2
- package/lib/common/language.js.map +1 -1
- package/package.json +14 -14
- package/src/browser/diff/compare.ts +2 -1
- package/src/browser/doc-model/editor-document-model.ts +12 -1
- package/src/browser/doc-model/saveParticipants.ts +5 -5
- package/src/browser/editor.contribution.ts +7 -0
- package/src/browser/monaco-contrib/command/command.service.ts +4 -4
- package/src/browser/preference/converter.ts +6 -0
- package/src/browser/preference/schema.ts +16 -0
- package/src/common/doc-cache.ts +0 -12
- package/src/common/editor.ts +1 -1
- package/src/common/language.ts +1 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opensumi/ide-editor",
|
|
3
|
-
"version": "3.6.5-next-
|
|
3
|
+
"version": "3.6.5-next-1735177632.0",
|
|
4
4
|
"files": [
|
|
5
5
|
"lib",
|
|
6
6
|
"src"
|
|
@@ -17,21 +17,21 @@
|
|
|
17
17
|
"url": "git@github.com:opensumi/core.git"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@opensumi/ide-core-common": "3.6.5-next-
|
|
21
|
-
"@opensumi/ide-core-node": "3.6.5-next-
|
|
22
|
-
"@opensumi/ide-file-service": "3.6.5-next-
|
|
23
|
-
"@opensumi/ide-monaco": "3.6.5-next-
|
|
24
|
-
"@opensumi/ide-utils": "3.6.5-next-
|
|
20
|
+
"@opensumi/ide-core-common": "3.6.5-next-1735177632.0",
|
|
21
|
+
"@opensumi/ide-core-node": "3.6.5-next-1735177632.0",
|
|
22
|
+
"@opensumi/ide-file-service": "3.6.5-next-1735177632.0",
|
|
23
|
+
"@opensumi/ide-monaco": "3.6.5-next-1735177632.0",
|
|
24
|
+
"@opensumi/ide-utils": "3.6.5-next-1735177632.0",
|
|
25
25
|
"vscode-oniguruma": "1.5.1"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@opensumi/ide-components": "3.6.5-next-
|
|
29
|
-
"@opensumi/ide-core-browser": "3.6.5-next-
|
|
30
|
-
"@opensumi/ide-dev-tool": "3.6.5-next-
|
|
31
|
-
"@opensumi/ide-overlay": "3.6.5-next-
|
|
32
|
-
"@opensumi/ide-quick-open": "3.6.5-next-
|
|
33
|
-
"@opensumi/ide-theme": "3.6.5-next-
|
|
34
|
-
"@opensumi/ide-workspace": "3.6.5-next-
|
|
28
|
+
"@opensumi/ide-components": "3.6.5-next-1735177632.0",
|
|
29
|
+
"@opensumi/ide-core-browser": "3.6.5-next-1735177632.0",
|
|
30
|
+
"@opensumi/ide-dev-tool": "3.6.5-next-1735177632.0",
|
|
31
|
+
"@opensumi/ide-overlay": "3.6.5-next-1735177632.0",
|
|
32
|
+
"@opensumi/ide-quick-open": "3.6.5-next-1735177632.0",
|
|
33
|
+
"@opensumi/ide-theme": "3.6.5-next-1735177632.0",
|
|
34
|
+
"@opensumi/ide-workspace": "3.6.5-next-1735177632.0"
|
|
35
35
|
},
|
|
36
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "1a08936dc3c58fd350fb292b91adedbcf4bb3061"
|
|
37
37
|
}
|
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
Deferred,
|
|
8
8
|
Domain,
|
|
9
9
|
EDITOR_COMMANDS,
|
|
10
|
+
PreferenceScope,
|
|
10
11
|
PreferenceService,
|
|
11
12
|
URI,
|
|
12
13
|
getIcon,
|
|
@@ -109,7 +110,7 @@ export class CompareEditorContribution implements MenuContribution, CommandContr
|
|
|
109
110
|
commands.registerCommand(DIFF_EDITOR_COMMANDS.TOGGLE_COLLAPSE_UNCHANGED_REGIONS, {
|
|
110
111
|
execute: () => {
|
|
111
112
|
const enabled = this.preferenceService.get('diffEditor.hideUnchangedRegions.enabled');
|
|
112
|
-
this.preferenceService.set('diffEditor.hideUnchangedRegions.enabled', !enabled);
|
|
113
|
+
this.preferenceService.set('diffEditor.hideUnchangedRegions.enabled', !enabled, PreferenceScope.User);
|
|
113
114
|
},
|
|
114
115
|
});
|
|
115
116
|
}
|
|
@@ -39,11 +39,11 @@ import { createTextBuffer } from '@opensumi/monaco-editor-core/esm/vs/editor/com
|
|
|
39
39
|
|
|
40
40
|
import {
|
|
41
41
|
IDocCache,
|
|
42
|
+
IDocCacheValue,
|
|
42
43
|
IDocPersistentCacheProvider,
|
|
43
44
|
IEditorDocumentModelContentChange,
|
|
44
45
|
SaveReason,
|
|
45
46
|
isDocContentCache,
|
|
46
|
-
parseRangeFrom,
|
|
47
47
|
} from '../../common';
|
|
48
48
|
import { AUTO_SAVE_MODE, IEditorDocumentModel } from '../../common/editor';
|
|
49
49
|
import { EditorPreferences } from '../preference/schema';
|
|
@@ -265,6 +265,17 @@ export class EditorDocumentModel extends Disposable implements IEditorDocumentMo
|
|
|
265
265
|
return;
|
|
266
266
|
}
|
|
267
267
|
|
|
268
|
+
const parseRangeFrom = (cacheValue: IDocCacheValue): Range => {
|
|
269
|
+
const [_text, startLineNumber, startColumn, endLineNumber, endColumn] = cacheValue;
|
|
270
|
+
|
|
271
|
+
return Range.lift({
|
|
272
|
+
startLineNumber,
|
|
273
|
+
startColumn,
|
|
274
|
+
endLineNumber,
|
|
275
|
+
endColumn,
|
|
276
|
+
});
|
|
277
|
+
};
|
|
278
|
+
|
|
268
279
|
if (isDocContentCache(cache)) {
|
|
269
280
|
this.monacoModel.setValue(cache.content);
|
|
270
281
|
} else {
|
|
@@ -16,6 +16,11 @@ import {
|
|
|
16
16
|
} from '@opensumi/ide-core-browser';
|
|
17
17
|
import { IProgressService } from '@opensumi/ide-core-browser/lib/progress';
|
|
18
18
|
import * as monaco from '@opensumi/ide-monaco';
|
|
19
|
+
import {
|
|
20
|
+
CodeActionItem,
|
|
21
|
+
CodeActionKind,
|
|
22
|
+
CodeActionTriggerSource,
|
|
23
|
+
} from '@opensumi/ide-monaco/lib/browser/contrib/codeAction';
|
|
19
24
|
import { ResourceEdit } from '@opensumi/ide-monaco/lib/browser/monaco-api';
|
|
20
25
|
import { languageFeaturesService } from '@opensumi/ide-monaco/lib/browser/monaco-api/languages';
|
|
21
26
|
import { ITextModel } from '@opensumi/ide-monaco/lib/browser/monaco-api/types';
|
|
@@ -27,11 +32,6 @@ import { Range } from '@opensumi/monaco-editor-core/esm/vs/editor/common/core/ra
|
|
|
27
32
|
import * as languages from '@opensumi/monaco-editor-core/esm/vs/editor/common/languages';
|
|
28
33
|
import { CodeActionProvider } from '@opensumi/monaco-editor-core/esm/vs/editor/common/languages';
|
|
29
34
|
import { getCodeActions } from '@opensumi/monaco-editor-core/esm/vs/editor/contrib/codeAction/browser/codeAction';
|
|
30
|
-
import {
|
|
31
|
-
CodeActionItem,
|
|
32
|
-
CodeActionKind,
|
|
33
|
-
CodeActionTriggerSource,
|
|
34
|
-
} from '@opensumi/monaco-editor-core/esm/vs/editor/contrib/codeAction/common/types';
|
|
35
35
|
|
|
36
36
|
import { MonacoCodeService } from '../editor.override';
|
|
37
37
|
import { SaveReason } from '../types';
|
|
@@ -1197,6 +1197,13 @@ export class EditorContribution
|
|
|
1197
1197
|
execute: () => this.prefixQuickOpenService.open(':'),
|
|
1198
1198
|
});
|
|
1199
1199
|
|
|
1200
|
+
commands.registerCommand(EDITOR_COMMANDS.TOGGLE_COLUMN_SELECTION, {
|
|
1201
|
+
execute: () => {
|
|
1202
|
+
const isColumnSelection = this.preferenceService.get<boolean>('editor.columnSelection');
|
|
1203
|
+
this.preferenceService.set('editor.columnSelection', !isColumnSelection, PreferenceScope.User);
|
|
1204
|
+
},
|
|
1205
|
+
});
|
|
1206
|
+
|
|
1200
1207
|
commands.registerCommand(EDITOR_COMMANDS.TOGGLE_WORD_WRAP, {
|
|
1201
1208
|
execute: () => {
|
|
1202
1209
|
const wordWrap = this.preferenceService.get<string>('editor.wordWrap');
|
|
@@ -408,10 +408,10 @@ export class MonacoActionRegistry implements IMonacoActionRegistry {
|
|
|
408
408
|
*/
|
|
409
409
|
protected newActionHandler(id: string): MonacoEditorCommandHandler {
|
|
410
410
|
return {
|
|
411
|
-
execute: (editor) => {
|
|
411
|
+
execute: (editor, ...args) => {
|
|
412
412
|
const action = editor.getAction(id);
|
|
413
413
|
if (action && action.isSupported()) {
|
|
414
|
-
return this.runAction(id, editor);
|
|
414
|
+
return this.runAction(id, editor, ...args);
|
|
415
415
|
}
|
|
416
416
|
},
|
|
417
417
|
};
|
|
@@ -422,11 +422,11 @@ export class MonacoActionRegistry implements IMonacoActionRegistry {
|
|
|
422
422
|
* @param id 要执行的 action
|
|
423
423
|
* @param editor 执行 action 的 editor,默认为当前 editor
|
|
424
424
|
*/
|
|
425
|
-
protected runAction(id: string, editor: ICodeEditor): Promise<void> {
|
|
425
|
+
protected runAction(id: string, editor: ICodeEditor, ...args: any[]): Promise<void> {
|
|
426
426
|
if (editor) {
|
|
427
427
|
const action = editor.getAction(id);
|
|
428
428
|
if (action) {
|
|
429
|
-
return action.run();
|
|
429
|
+
return action.run(...args);
|
|
430
430
|
}
|
|
431
431
|
}
|
|
432
432
|
|
|
@@ -194,6 +194,12 @@ export const editorOptionsConverters: Map<KaitianPreferenceKey, NoConverter | IM
|
|
|
194
194
|
*/
|
|
195
195
|
['editor.fontLigatures', { monaco: 'fontLigatures' }],
|
|
196
196
|
|
|
197
|
+
/**
|
|
198
|
+
* Enable that the selection with the mouse and keys is doing column selection.
|
|
199
|
+
* Defaults to false.
|
|
200
|
+
*/
|
|
201
|
+
['editor.columnSelection', { monaco: 'columnSelection' }],
|
|
202
|
+
|
|
197
203
|
/**
|
|
198
204
|
* Disable the use of `will-change` for the editor margin and lines layers.
|
|
199
205
|
* The usage of `will-change` acts as a hint for browsers to create an extra layer.
|
|
@@ -110,6 +110,7 @@ export const EDITOR_DEFAULTS = {
|
|
|
110
110
|
lineNumbersMinChars: 3,
|
|
111
111
|
lineDecorationsWidth: 10,
|
|
112
112
|
readOnly: false,
|
|
113
|
+
columnSelection: false,
|
|
113
114
|
mouseStyle: 'text',
|
|
114
115
|
disableLayerHinting: false,
|
|
115
116
|
automaticLayout: true,
|
|
@@ -1179,6 +1180,11 @@ const monacoEditorSchema: PreferenceSchemaProperties = {
|
|
|
1179
1180
|
default: EDITOR_DEFAULTS.contribInfo.selectionHighlight,
|
|
1180
1181
|
description: '%editor.configuration.selectionHighlight%',
|
|
1181
1182
|
},
|
|
1183
|
+
'editor.columnSelection': {
|
|
1184
|
+
type: 'boolean',
|
|
1185
|
+
default: EDITOR_DEFAULTS.columnSelection,
|
|
1186
|
+
description: '%editor.configuration.columnSelection%',
|
|
1187
|
+
},
|
|
1182
1188
|
'editor.occurrencesHighlight': {
|
|
1183
1189
|
type: 'boolean',
|
|
1184
1190
|
default: EDITOR_DEFAULTS.contribInfo.occurrencesHighlight,
|
|
@@ -1446,6 +1452,16 @@ const monacoEditorSchema: PreferenceSchemaProperties = {
|
|
|
1446
1452
|
default: true,
|
|
1447
1453
|
description: '%editor.configuration.unicodeHighlight.ambiguousCharacters%',
|
|
1448
1454
|
},
|
|
1455
|
+
'editor.unicodeHighlight.allowedCharacters': {
|
|
1456
|
+
type: 'object',
|
|
1457
|
+
default: {},
|
|
1458
|
+
description: '%editor.configuration.unicodeHighlight.allowedCharacters%',
|
|
1459
|
+
},
|
|
1460
|
+
'editor.unicodeHighlight.allowedLocales': {
|
|
1461
|
+
type: 'object',
|
|
1462
|
+
default: {},
|
|
1463
|
+
description: '%editor.configuration.unicodeHighlight.allowedLocales%',
|
|
1464
|
+
},
|
|
1449
1465
|
'diffEditor.renderIndicators': {
|
|
1450
1466
|
type: 'boolean',
|
|
1451
1467
|
default: DIFF_EDITOR_DEFAULTS.renderIndicators,
|
package/src/common/doc-cache.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { MaybePromise, URI } from '@opensumi/ide-core-common';
|
|
2
|
-
import { Range } from '@opensumi/monaco-editor-core/esm/vs/editor/common/core/range';
|
|
3
2
|
|
|
4
3
|
import type { IModelContentChange } from '@opensumi/monaco-editor-core/esm/vs/editor/common/textModelEvents';
|
|
5
4
|
|
|
@@ -105,14 +104,3 @@ export function parseCacheValueFrom(change: IModelContentChange): IDocCacheValue
|
|
|
105
104
|
|
|
106
105
|
return [text, startLineNumber, startColumn, endLineNumber, endColumn];
|
|
107
106
|
}
|
|
108
|
-
|
|
109
|
-
export function parseRangeFrom(cacheValue: IDocCacheValue): Range {
|
|
110
|
-
const [_text, startLineNumber, startColumn, endLineNumber, endColumn] = cacheValue;
|
|
111
|
-
|
|
112
|
-
return Range.lift({
|
|
113
|
-
startLineNumber,
|
|
114
|
-
startColumn,
|
|
115
|
-
endLineNumber,
|
|
116
|
-
endColumn,
|
|
117
|
-
});
|
|
118
|
-
}
|
package/src/common/editor.ts
CHANGED
|
@@ -15,7 +15,6 @@ import {
|
|
|
15
15
|
MaybeNull,
|
|
16
16
|
URI,
|
|
17
17
|
} from '@opensumi/ide-core-common';
|
|
18
|
-
import { IDimension } from '@opensumi/ide-monaco';
|
|
19
18
|
|
|
20
19
|
import { IResource } from './resource';
|
|
21
20
|
import { IDocModelUpdateOptions } from './types';
|
|
@@ -24,6 +23,7 @@ import type {
|
|
|
24
23
|
EOL,
|
|
25
24
|
ICodeEditorViewState,
|
|
26
25
|
IDiffEditorViewState,
|
|
26
|
+
IDimension,
|
|
27
27
|
IEditorOptions,
|
|
28
28
|
ICodeEditor as IMonacoCodeEditor,
|
|
29
29
|
ITextModel,
|
package/src/common/language.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import LSTypes from 'vscode-languageserver-types';
|
|
2
2
|
|
|
3
|
-
import { CancellationToken, IDisposable, IRelativePattern, MarkerSeverity } from '@opensumi/ide-core-common';
|
|
3
|
+
import { CancellationToken, IDisposable, IRelativePattern, MarkerSeverity, Uri } from '@opensumi/ide-core-common';
|
|
4
4
|
import { editor } from '@opensumi/ide-monaco';
|
|
5
|
-
import { URI as Uri } from '@opensumi/monaco-editor-core/esm/vs/base/common/uri';
|
|
6
5
|
|
|
7
6
|
import type { IRelatedInformation } from '@opensumi/monaco-editor-core/esm/vs/platform/markers/common/markers';
|
|
8
7
|
|