@opensumi/ide-editor 3.9.1-next-1749538805.0 → 3.9.1-next-1749540423.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/base-editor-wrapper.d.ts +63 -0
- package/lib/browser/base-editor-wrapper.d.ts.map +1 -0
- package/lib/browser/base-editor-wrapper.js +224 -0
- package/lib/browser/base-editor-wrapper.js.map +1 -0
- package/lib/browser/decoration-applier.d.ts +1 -1
- package/lib/browser/decoration-applier.d.ts.map +1 -1
- package/lib/browser/decoration-applier.js +4 -4
- package/lib/browser/decoration-applier.js.map +1 -1
- package/lib/browser/editor-collection.service.d.ts +21 -57
- package/lib/browser/editor-collection.service.d.ts.map +1 -1
- package/lib/browser/editor-collection.service.js +56 -207
- package/lib/browser/editor-collection.service.js.map +1 -1
- package/lib/browser/editor.contribution.d.ts.map +1 -1
- package/lib/browser/editor.contribution.js +1 -0
- package/lib/browser/editor.contribution.js.map +1 -1
- package/lib/browser/editor.less +31 -0
- package/lib/browser/editor.view.js +1 -1
- package/lib/browser/editor.view.js.map +1 -1
- package/lib/browser/multi-diff/multi-diff-editor.d.ts +10 -7
- package/lib/browser/multi-diff/multi-diff-editor.d.ts.map +1 -1
- package/lib/browser/multi-diff/multi-diff-editor.js +62 -7
- package/lib/browser/multi-diff/multi-diff-editor.js.map +1 -1
- package/lib/browser/multi-diff/multi-diff-resource.d.ts.map +1 -1
- package/lib/browser/multi-diff/multi-diff-resource.js.map +1 -1
- package/lib/browser/workbench-editor.service.js +1 -1
- package/lib/browser/workbench-editor.service.js.map +1 -1
- package/lib/common/editor.d.ts +11 -0
- package/lib/common/editor.d.ts.map +1 -1
- package/lib/common/editor.js.map +1 -1
- package/lib/common/multi-diff.d.ts +6 -1
- package/lib/common/multi-diff.d.ts.map +1 -1
- package/lib/common/multi-diff.js.map +1 -1
- package/package.json +14 -14
- package/src/browser/base-editor-wrapper.ts +279 -0
- package/src/browser/decoration-applier.ts +12 -8
- package/src/browser/editor-collection.service.ts +65 -264
- package/src/browser/editor.contribution.ts +2 -0
- package/src/browser/editor.less +31 -0
- package/src/browser/editor.view.tsx +1 -1
- package/src/browser/multi-diff/multi-diff-editor.ts +97 -10
- package/src/browser/multi-diff/multi-diff-resource.ts +0 -1
- package/src/browser/workbench-editor.service.ts +1 -1
- package/src/common/editor.ts +14 -0
- package/src/common/multi-diff.ts +8 -1
|
@@ -40,7 +40,6 @@ export class MultiDiffResourceProvider extends WithEventBus implements IResource
|
|
|
40
40
|
// Get icon from the first modified file
|
|
41
41
|
const firstModifiedUri = parsedSources.length > 0 ? new URI(parsedSources[0].modifiedUri) : undefined;
|
|
42
42
|
const icon = firstModifiedUri ? this.labelService.getIcon(firstModifiedUri) : undefined;
|
|
43
|
-
|
|
44
43
|
return {
|
|
45
44
|
name: `Multi-Diff: ${name || parsedSources.length + ' files'}`,
|
|
46
45
|
icon: icon || getIcon('diff'),
|
|
@@ -2498,7 +2498,7 @@ export class EditorGroup extends WithEventBus implements IGridEditorGroup {
|
|
|
2498
2498
|
});
|
|
2499
2499
|
}
|
|
2500
2500
|
|
|
2501
|
-
await this.multiDiffEditor.compareMultiple(resource, options);
|
|
2501
|
+
await this.multiDiffEditor.compareMultiple(this.multiDiffEditor, resource, options);
|
|
2502
2502
|
}
|
|
2503
2503
|
}
|
|
2504
2504
|
|
package/src/common/editor.ts
CHANGED
|
@@ -209,6 +209,11 @@ export enum EditorType {
|
|
|
209
209
|
MERGE_EDITOR_DIFF = 'MERGE_EDITOR_DIFF',
|
|
210
210
|
}
|
|
211
211
|
|
|
212
|
+
export interface IEditorDecorationApplier {
|
|
213
|
+
clearDecorations(): void;
|
|
214
|
+
applyDecorationFromProvider(): void;
|
|
215
|
+
}
|
|
216
|
+
|
|
212
217
|
/**
|
|
213
218
|
* 一个 IEditor 代表了一个最小的编辑器单元,可以是 CodeEditor 中的一个,也可以是 DiffEditor 中的两个
|
|
214
219
|
*/
|
|
@@ -234,6 +239,11 @@ export interface IEditor {
|
|
|
234
239
|
*/
|
|
235
240
|
currentUri: URI | null;
|
|
236
241
|
|
|
242
|
+
/**
|
|
243
|
+
* 装饰器应用器
|
|
244
|
+
*/
|
|
245
|
+
decorationApplier: IEditorDecorationApplier;
|
|
246
|
+
|
|
237
247
|
/**
|
|
238
248
|
* 插入代码片段
|
|
239
249
|
* @param template
|
|
@@ -275,6 +285,8 @@ export interface IEditor {
|
|
|
275
285
|
onFocus: Event<void>;
|
|
276
286
|
|
|
277
287
|
onBlur: Event<void>;
|
|
288
|
+
|
|
289
|
+
updateDocumentModel?: (uri: URI) => void;
|
|
278
290
|
}
|
|
279
291
|
|
|
280
292
|
export interface IUndoStopOptions {
|
|
@@ -367,9 +379,11 @@ export abstract class EditorCollectionService {
|
|
|
367
379
|
public abstract getEditorByUri(uri: URI): IEditor | undefined;
|
|
368
380
|
|
|
369
381
|
public abstract listDiffEditors(): IDiffEditor[];
|
|
382
|
+
public abstract listMultiDiffEditors(): IMultiDiffEditor[];
|
|
370
383
|
|
|
371
384
|
public abstract onCodeEditorCreate: Event<ICodeEditor>;
|
|
372
385
|
public abstract onDiffEditorCreate: Event<IDiffEditor>;
|
|
386
|
+
public abstract onMultiDiffEditorCreate: Event<IMultiDiffEditor>;
|
|
373
387
|
}
|
|
374
388
|
|
|
375
389
|
export type IOpenResourceResult = { group: IEditorGroup; resource: IResource } | false;
|
package/src/common/multi-diff.ts
CHANGED
|
@@ -10,6 +10,8 @@ import {
|
|
|
10
10
|
import { IResourceOpenOptions } from './editor';
|
|
11
11
|
import { IResource } from './resource';
|
|
12
12
|
|
|
13
|
+
import type { MultiDiffEditorWidget } from '@opensumi/monaco-editor-core/esm/vs/editor/browser/widget/multiDiffEditor/multiDiffEditorWidget';
|
|
14
|
+
|
|
13
15
|
export const MULTI_DIFF_SCHEME = 'multi-diff-editor';
|
|
14
16
|
|
|
15
17
|
export const IMultiDiffSourceResolverService = Symbol('IMultiDiffSourceResolverService');
|
|
@@ -58,7 +60,7 @@ export interface IMultiDiffEditor extends IDisposable {
|
|
|
58
60
|
/**
|
|
59
61
|
* Compare multiple file pairs
|
|
60
62
|
*/
|
|
61
|
-
compareMultiple(resource: IResource, options?: IResourceOpenOptions): Promise<void>;
|
|
63
|
+
compareMultiple(editor: IMultiDiffEditor, resource: IResource, options?: IResourceOpenOptions): Promise<void>;
|
|
62
64
|
|
|
63
65
|
/**
|
|
64
66
|
* Get all file pairs currently being compared
|
|
@@ -94,4 +96,9 @@ export interface IMultiDiffEditor extends IDisposable {
|
|
|
94
96
|
* Expand all files
|
|
95
97
|
*/
|
|
96
98
|
expandAll(): void;
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Get the multi-diff editor widget
|
|
102
|
+
*/
|
|
103
|
+
multiDiffWidget: MultiDiffEditorWidget;
|
|
97
104
|
}
|