@codingame/monaco-vscode-api 1.81.1 → 1.81.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/dist/default-extensions/npm/npmBrowserMain.js.map +1 -1
- package/dist/default-extensions/typescript-language-features/tsserver.web.js.map +1 -1
- package/dist/service-override/editor.d.ts +2 -2
- package/dist/vscode/vs/editor/common/editorCommon.d.ts +5 -290
- package/dist/vscode/vs/editor/common/model.d.ts +1 -22
- package/dist/vscode/vs/editor/common/textModelEvents.d.ts +1 -9
- package/monaco-editor-treemending.patch +545 -545
- package/package.json +1 -1
|
@@ -9,7 +9,7 @@ import { IEditorOptions, IResourceEditorInput, ITextResourceEditorInput, IResour
|
|
|
9
9
|
import { IEditor } from '../vscode/vs/editor/common/editorCommon.js';
|
|
10
10
|
import { Disposable } from '../vscode/vs/base/common/lifecycle.js';
|
|
11
11
|
export { IReference } from '../vscode/vs/base/common/lifecycle.js';
|
|
12
|
-
import {
|
|
12
|
+
import { IDiffEditor } from '../vscode/vs/editor/browser/editorBrowser.js';
|
|
13
13
|
import { IEditorReplacement, IEditorGroup, ICloseEditorOptions } from '../vscode/vs/workbench/services/editor/common/editorGroupsService.js';
|
|
14
14
|
import { URI } from '../vscode/vs/base/common/uri.js';
|
|
15
15
|
import { OpenEditor } from '../dist/types/src/service-override/tools/editor.js';
|
|
@@ -28,7 +28,7 @@ declare class SimpleEditorService extends Disposable implements IEditorService {
|
|
|
28
28
|
activeTextEditorLanguageId: string | undefined;
|
|
29
29
|
visibleEditorPanes: IVisibleEditorPane[];
|
|
30
30
|
visibleEditors: EditorInput[];
|
|
31
|
-
visibleTextEditorControls: Array<
|
|
31
|
+
visibleTextEditorControls: Array<IEditor | IDiffEditor>;
|
|
32
32
|
editors: EditorInput[];
|
|
33
33
|
count: number;
|
|
34
34
|
getEditors: (order: EditorsOrder, options?: {
|
|
@@ -1,14 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as monaco from 'monaco-editor';
|
|
2
2
|
import { UriComponents } from '../../base/common/uri.js';
|
|
3
|
-
import { IDisposable } from '../../base/common/lifecycle.js';
|
|
4
3
|
import { ThemeColor } from '../../base/common/themables.js';
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { IPosition, Position } from './core/position.js';
|
|
8
|
-
import { IRange, Range } from './core/range.js';
|
|
9
|
-
import { Selection, ISelection } from './core/selection.js';
|
|
10
|
-
import { IModelDeltaDecoration, IModelDecorationsChangeAccessor, IModelDecoration, TrackedRangeStickiness, OverviewRulerLane, ITextModel } from './model.js';
|
|
11
|
-
import { IModelDecorationsChangedEvent } from './textModelEvents.js';
|
|
4
|
+
import { IPosition } from './core/position.js';
|
|
5
|
+
import { TrackedRangeStickiness, OverviewRulerLane, ITextModel } from './model.js';
|
|
12
6
|
|
|
13
7
|
/**
|
|
14
8
|
* A model for the diff editor.
|
|
@@ -27,14 +21,6 @@ interface IDiffEditorViewModel {
|
|
|
27
21
|
readonly model: IDiffEditorModel;
|
|
28
22
|
waitForDiff(): Promise<void>;
|
|
29
23
|
}
|
|
30
|
-
interface IEditorAction {
|
|
31
|
-
readonly id: string;
|
|
32
|
-
readonly label: string;
|
|
33
|
-
readonly alias: string;
|
|
34
|
-
isSupported(): boolean;
|
|
35
|
-
run(args?: unknown): Promise<void>;
|
|
36
|
-
}
|
|
37
|
-
type IEditorModel = ITextModel | IDiffEditorModel | IDiffEditorViewModel;
|
|
38
24
|
/**
|
|
39
25
|
* A (serializable) state of the cursors.
|
|
40
26
|
*/
|
|
@@ -73,247 +59,10 @@ interface IDiffEditorViewState {
|
|
|
73
59
|
modified: ICodeEditorViewState | null;
|
|
74
60
|
modelState?: unknown;
|
|
75
61
|
}
|
|
76
|
-
/**
|
|
77
|
-
* An editor view state.
|
|
78
|
-
*/
|
|
79
|
-
type IEditorViewState = ICodeEditorViewState | IDiffEditorViewState;
|
|
80
|
-
declare const enum ScrollType {
|
|
81
|
-
Smooth = 0,
|
|
82
|
-
Immediate = 1
|
|
83
|
-
}
|
|
84
62
|
/**
|
|
85
63
|
* An editor.
|
|
86
64
|
*/
|
|
87
|
-
|
|
88
|
-
/**
|
|
89
|
-
* An event emitted when the editor has been disposed.
|
|
90
|
-
* @event
|
|
91
|
-
*/
|
|
92
|
-
onDidDispose(listener: () => void): IDisposable;
|
|
93
|
-
/**
|
|
94
|
-
* Dispose the editor.
|
|
95
|
-
*/
|
|
96
|
-
dispose(): void;
|
|
97
|
-
/**
|
|
98
|
-
* Get a unique id for this editor instance.
|
|
99
|
-
*/
|
|
100
|
-
getId(): string;
|
|
101
|
-
/**
|
|
102
|
-
* Get the editor type. Please see `EditorType`.
|
|
103
|
-
* This is to avoid an instanceof check
|
|
104
|
-
*/
|
|
105
|
-
getEditorType(): string;
|
|
106
|
-
/**
|
|
107
|
-
* Update the editor's options after the editor has been created.
|
|
108
|
-
*/
|
|
109
|
-
updateOptions(newOptions: IEditorOptions): void;
|
|
110
|
-
/**
|
|
111
|
-
* Indicates that the editor becomes visible.
|
|
112
|
-
* @internal
|
|
113
|
-
*/
|
|
114
|
-
onVisible(): void;
|
|
115
|
-
/**
|
|
116
|
-
* Indicates that the editor becomes hidden.
|
|
117
|
-
* @internal
|
|
118
|
-
*/
|
|
119
|
-
onHide(): void;
|
|
120
|
-
/**
|
|
121
|
-
* Instructs the editor to remeasure its container. This method should
|
|
122
|
-
* be called when the container of the editor gets resized.
|
|
123
|
-
*
|
|
124
|
-
* If a dimension is passed in, the passed in value will be used.
|
|
125
|
-
*/
|
|
126
|
-
layout(dimension?: IDimension): void;
|
|
127
|
-
/**
|
|
128
|
-
* Brings browser focus to the editor text
|
|
129
|
-
*/
|
|
130
|
-
focus(): void;
|
|
131
|
-
/**
|
|
132
|
-
* Returns true if the text inside this editor is focused (i.e. cursor is blinking).
|
|
133
|
-
*/
|
|
134
|
-
hasTextFocus(): boolean;
|
|
135
|
-
/**
|
|
136
|
-
* Returns all actions associated with this editor.
|
|
137
|
-
*/
|
|
138
|
-
getSupportedActions(): IEditorAction[];
|
|
139
|
-
/**
|
|
140
|
-
* Saves current view state of the editor in a serializable object.
|
|
141
|
-
*/
|
|
142
|
-
saveViewState(): IEditorViewState | null;
|
|
143
|
-
/**
|
|
144
|
-
* Restores the view state of the editor from a serializable object generated by `saveViewState`.
|
|
145
|
-
*/
|
|
146
|
-
restoreViewState(state: IEditorViewState | null): void;
|
|
147
|
-
/**
|
|
148
|
-
* Given a position, returns a column number that takes tab-widths into account.
|
|
149
|
-
*/
|
|
150
|
-
getVisibleColumnFromPosition(position: IPosition): number;
|
|
151
|
-
/**
|
|
152
|
-
* Given a position, returns a column number that takes tab-widths into account.
|
|
153
|
-
* @internal
|
|
154
|
-
*/
|
|
155
|
-
getStatusbarColumn(position: IPosition): number;
|
|
156
|
-
/**
|
|
157
|
-
* Returns the primary position of the cursor.
|
|
158
|
-
*/
|
|
159
|
-
getPosition(): Position | null;
|
|
160
|
-
/**
|
|
161
|
-
* Set the primary position of the cursor. This will remove any secondary cursors.
|
|
162
|
-
* @param position New primary cursor's position
|
|
163
|
-
* @param source Source of the call that caused the position
|
|
164
|
-
*/
|
|
165
|
-
setPosition(position: IPosition, source?: string): void;
|
|
166
|
-
/**
|
|
167
|
-
* Scroll vertically as necessary and reveal a line.
|
|
168
|
-
*/
|
|
169
|
-
revealLine(lineNumber: number, scrollType?: ScrollType): void;
|
|
170
|
-
/**
|
|
171
|
-
* Scroll vertically as necessary and reveal a line centered vertically.
|
|
172
|
-
*/
|
|
173
|
-
revealLineInCenter(lineNumber: number, scrollType?: ScrollType): void;
|
|
174
|
-
/**
|
|
175
|
-
* Scroll vertically as necessary and reveal a line centered vertically only if it lies outside the viewport.
|
|
176
|
-
*/
|
|
177
|
-
revealLineInCenterIfOutsideViewport(lineNumber: number, scrollType?: ScrollType): void;
|
|
178
|
-
/**
|
|
179
|
-
* Scroll vertically as necessary and reveal a line close to the top of the viewport,
|
|
180
|
-
* optimized for viewing a code definition.
|
|
181
|
-
*/
|
|
182
|
-
revealLineNearTop(lineNumber: number, scrollType?: ScrollType): void;
|
|
183
|
-
/**
|
|
184
|
-
* Scroll vertically or horizontally as necessary and reveal a position.
|
|
185
|
-
*/
|
|
186
|
-
revealPosition(position: IPosition, scrollType?: ScrollType): void;
|
|
187
|
-
/**
|
|
188
|
-
* Scroll vertically or horizontally as necessary and reveal a position centered vertically.
|
|
189
|
-
*/
|
|
190
|
-
revealPositionInCenter(position: IPosition, scrollType?: ScrollType): void;
|
|
191
|
-
/**
|
|
192
|
-
* Scroll vertically or horizontally as necessary and reveal a position centered vertically only if it lies outside the viewport.
|
|
193
|
-
*/
|
|
194
|
-
revealPositionInCenterIfOutsideViewport(position: IPosition, scrollType?: ScrollType): void;
|
|
195
|
-
/**
|
|
196
|
-
* Scroll vertically or horizontally as necessary and reveal a position close to the top of the viewport,
|
|
197
|
-
* optimized for viewing a code definition.
|
|
198
|
-
*/
|
|
199
|
-
revealPositionNearTop(position: IPosition, scrollType?: ScrollType): void;
|
|
200
|
-
/**
|
|
201
|
-
* Returns the primary selection of the editor.
|
|
202
|
-
*/
|
|
203
|
-
getSelection(): Selection | null;
|
|
204
|
-
/**
|
|
205
|
-
* Returns all the selections of the editor.
|
|
206
|
-
*/
|
|
207
|
-
getSelections(): Selection[] | null;
|
|
208
|
-
/**
|
|
209
|
-
* Set the primary selection of the editor. This will remove any secondary cursors.
|
|
210
|
-
* @param selection The new selection
|
|
211
|
-
* @param source Source of the call that caused the selection
|
|
212
|
-
*/
|
|
213
|
-
setSelection(selection: IRange, source?: string): void;
|
|
214
|
-
/**
|
|
215
|
-
* Set the primary selection of the editor. This will remove any secondary cursors.
|
|
216
|
-
* @param selection The new selection
|
|
217
|
-
* @param source Source of the call that caused the selection
|
|
218
|
-
*/
|
|
219
|
-
setSelection(selection: Range, source?: string): void;
|
|
220
|
-
/**
|
|
221
|
-
* Set the primary selection of the editor. This will remove any secondary cursors.
|
|
222
|
-
* @param selection The new selection
|
|
223
|
-
* @param source Source of the call that caused the selection
|
|
224
|
-
*/
|
|
225
|
-
setSelection(selection: ISelection, source?: string): void;
|
|
226
|
-
/**
|
|
227
|
-
* Set the primary selection of the editor. This will remove any secondary cursors.
|
|
228
|
-
* @param selection The new selection
|
|
229
|
-
* @param source Source of the call that caused the selection
|
|
230
|
-
*/
|
|
231
|
-
setSelection(selection: Selection, source?: string): void;
|
|
232
|
-
/**
|
|
233
|
-
* Set the selections for all the cursors of the editor.
|
|
234
|
-
* Cursors will be removed or added, as necessary.
|
|
235
|
-
* @param selections The new selection
|
|
236
|
-
* @param source Source of the call that caused the selection
|
|
237
|
-
*/
|
|
238
|
-
setSelections(selections: readonly ISelection[], source?: string): void;
|
|
239
|
-
/**
|
|
240
|
-
* Scroll vertically as necessary and reveal lines.
|
|
241
|
-
*/
|
|
242
|
-
revealLines(startLineNumber: number, endLineNumber: number, scrollType?: ScrollType): void;
|
|
243
|
-
/**
|
|
244
|
-
* Scroll vertically as necessary and reveal lines centered vertically.
|
|
245
|
-
*/
|
|
246
|
-
revealLinesInCenter(lineNumber: number, endLineNumber: number, scrollType?: ScrollType): void;
|
|
247
|
-
/**
|
|
248
|
-
* Scroll vertically as necessary and reveal lines centered vertically only if it lies outside the viewport.
|
|
249
|
-
*/
|
|
250
|
-
revealLinesInCenterIfOutsideViewport(lineNumber: number, endLineNumber: number, scrollType?: ScrollType): void;
|
|
251
|
-
/**
|
|
252
|
-
* Scroll vertically as necessary and reveal lines close to the top of the viewport,
|
|
253
|
-
* optimized for viewing a code definition.
|
|
254
|
-
*/
|
|
255
|
-
revealLinesNearTop(lineNumber: number, endLineNumber: number, scrollType?: ScrollType): void;
|
|
256
|
-
/**
|
|
257
|
-
* Scroll vertically or horizontally as necessary and reveal a range.
|
|
258
|
-
*/
|
|
259
|
-
revealRange(range: IRange, scrollType?: ScrollType): void;
|
|
260
|
-
/**
|
|
261
|
-
* Scroll vertically or horizontally as necessary and reveal a range centered vertically.
|
|
262
|
-
*/
|
|
263
|
-
revealRangeInCenter(range: IRange, scrollType?: ScrollType): void;
|
|
264
|
-
/**
|
|
265
|
-
* Scroll vertically or horizontally as necessary and reveal a range at the top of the viewport.
|
|
266
|
-
*/
|
|
267
|
-
revealRangeAtTop(range: IRange, scrollType?: ScrollType): void;
|
|
268
|
-
/**
|
|
269
|
-
* Scroll vertically or horizontally as necessary and reveal a range centered vertically only if it lies outside the viewport.
|
|
270
|
-
*/
|
|
271
|
-
revealRangeInCenterIfOutsideViewport(range: IRange, scrollType?: ScrollType): void;
|
|
272
|
-
/**
|
|
273
|
-
* Scroll vertically or horizontally as necessary and reveal a range close to the top of the viewport,
|
|
274
|
-
* optimized for viewing a code definition.
|
|
275
|
-
*/
|
|
276
|
-
revealRangeNearTop(range: IRange, scrollType?: ScrollType): void;
|
|
277
|
-
/**
|
|
278
|
-
* Scroll vertically or horizontally as necessary and reveal a range close to the top of the viewport,
|
|
279
|
-
* optimized for viewing a code definition. Only if it lies outside the viewport.
|
|
280
|
-
*/
|
|
281
|
-
revealRangeNearTopIfOutsideViewport(range: IRange, scrollType?: ScrollType): void;
|
|
282
|
-
/**
|
|
283
|
-
* Directly trigger a handler or an editor action.
|
|
284
|
-
* @param source The source of the call.
|
|
285
|
-
* @param handlerId The id of the handler or the id of a contribution.
|
|
286
|
-
* @param payload Extra data to be sent to the handler.
|
|
287
|
-
*/
|
|
288
|
-
trigger(source: string | null | undefined, handlerId: string, payload: any): void;
|
|
289
|
-
/**
|
|
290
|
-
* Gets the current model attached to this editor.
|
|
291
|
-
*/
|
|
292
|
-
getModel(): IEditorModel | null;
|
|
293
|
-
/**
|
|
294
|
-
* Sets the current model attached to this editor.
|
|
295
|
-
* If the previous model was created by the editor via the value key in the options
|
|
296
|
-
* literal object, it will be destroyed. Otherwise, if the previous model was set
|
|
297
|
-
* via setModel, or the model key in the options literal object, the previous model
|
|
298
|
-
* will not be destroyed.
|
|
299
|
-
* It is safe to call setModel(null) to simply detach the current model from the editor.
|
|
300
|
-
*/
|
|
301
|
-
setModel(model: IEditorModel | null): void;
|
|
302
|
-
/**
|
|
303
|
-
* Create a collection of decorations. All decorations added through this collection
|
|
304
|
-
* will get the ownerId of the editor (meaning they will not show up in other editors).
|
|
305
|
-
* These decorations will be automatically cleared when the editor's model changes.
|
|
306
|
-
*/
|
|
307
|
-
createDecorationsCollection(decorations?: IModelDeltaDecoration[]): IEditorDecorationsCollection;
|
|
308
|
-
/**
|
|
309
|
-
* Change the decorations. All decorations added through this changeAccessor
|
|
310
|
-
* will get the ownerId of the editor (meaning they will not show up in other
|
|
311
|
-
* editors).
|
|
312
|
-
* @see {@link ITextModel.changeDecorations}
|
|
313
|
-
* @internal
|
|
314
|
-
*/
|
|
315
|
-
changeDecorations(callback: (changeAccessor: IModelDecorationsChangeAccessor) => any): any;
|
|
316
|
-
}
|
|
65
|
+
type IEditor = monaco.editor.IEditor
|
|
317
66
|
/**
|
|
318
67
|
* A diff editor.
|
|
319
68
|
*
|
|
@@ -333,40 +82,6 @@ interface IDiffEditor extends IEditor {
|
|
|
333
82
|
*/
|
|
334
83
|
getModifiedEditor(): IEditor;
|
|
335
84
|
}
|
|
336
|
-
/**
|
|
337
|
-
* A collection of decorations
|
|
338
|
-
*/
|
|
339
|
-
interface IEditorDecorationsCollection {
|
|
340
|
-
/**
|
|
341
|
-
* An event emitted when decorations change in the editor,
|
|
342
|
-
* but the change is not caused by us setting or clearing the collection.
|
|
343
|
-
*/
|
|
344
|
-
onDidChange: Event<IModelDecorationsChangedEvent>;
|
|
345
|
-
/**
|
|
346
|
-
* Get the decorations count.
|
|
347
|
-
*/
|
|
348
|
-
length: number;
|
|
349
|
-
/**
|
|
350
|
-
* Get the range for a decoration.
|
|
351
|
-
*/
|
|
352
|
-
getRange(index: number): Range | null;
|
|
353
|
-
/**
|
|
354
|
-
* Get all ranges for decorations.
|
|
355
|
-
*/
|
|
356
|
-
getRanges(): Range[];
|
|
357
|
-
/**
|
|
358
|
-
* Determine if a decoration is in this collection.
|
|
359
|
-
*/
|
|
360
|
-
has(decoration: IModelDecoration): boolean;
|
|
361
|
-
/**
|
|
362
|
-
* Replace all previous decorations with `newDecorations`.
|
|
363
|
-
*/
|
|
364
|
-
set(newDecorations: readonly IModelDeltaDecoration[]): string[];
|
|
365
|
-
/**
|
|
366
|
-
* Remove all previous decorations.
|
|
367
|
-
*/
|
|
368
|
-
clear(): void;
|
|
369
|
-
}
|
|
370
85
|
/**
|
|
371
86
|
* An editor contribution that gets created every time a new editor gets created and gets disposed when the editor gets disposed.
|
|
372
87
|
*/
|
|
@@ -465,4 +180,4 @@ interface IDecorationRenderOptions extends IThemeDecorationRenderOptions {
|
|
|
465
180
|
dark?: IThemeDecorationRenderOptions;
|
|
466
181
|
}
|
|
467
182
|
|
|
468
|
-
export { ICodeEditorViewState, IContentDecorationRenderOptions, ICursorState, IDecorationRenderOptions, IDiffEditor, IDiffEditorModel, IDiffEditorViewModel, IDiffEditorViewState, IEditor,
|
|
183
|
+
export { ICodeEditorViewState, IContentDecorationRenderOptions, ICursorState, IDecorationRenderOptions, IDiffEditor, IDiffEditorModel, IDiffEditorViewModel, IDiffEditorViewState, IEditor, IEditorContribution, IThemeDecorationRenderOptions, IViewState };
|
|
@@ -238,27 +238,6 @@ interface IModelDeltaDecoration {
|
|
|
238
238
|
*/
|
|
239
239
|
options: IModelDecorationOptions;
|
|
240
240
|
}
|
|
241
|
-
/**
|
|
242
|
-
* A decoration in the model.
|
|
243
|
-
*/
|
|
244
|
-
interface IModelDecoration {
|
|
245
|
-
/**
|
|
246
|
-
* Identifier for a decoration.
|
|
247
|
-
*/
|
|
248
|
-
readonly id: string;
|
|
249
|
-
/**
|
|
250
|
-
* Identifier for a decoration's owner.
|
|
251
|
-
*/
|
|
252
|
-
readonly ownerId: number;
|
|
253
|
-
/**
|
|
254
|
-
* Range that this decoration covers.
|
|
255
|
-
*/
|
|
256
|
-
readonly range: Range;
|
|
257
|
-
/**
|
|
258
|
-
* Options associated with this decoration.
|
|
259
|
-
*/
|
|
260
|
-
readonly options: IModelDecorationOptions;
|
|
261
|
-
}
|
|
262
241
|
/**
|
|
263
242
|
* An accessor that can add, change or remove model decorations.
|
|
264
243
|
* @internal
|
|
@@ -541,4 +520,4 @@ interface IInternalModelContentChange extends IModelContentChange {
|
|
|
541
520
|
forceMoveMarkers: boolean;
|
|
542
521
|
}
|
|
543
522
|
|
|
544
|
-
export { ApplyEditsResult, BracketPairColorizationOptions, DefaultEndOfLine, EndOfLinePreference, EndOfLineSequence, FindMatch, GlyphMarginLane, IDecorationOptions, IIdentifiedSingleEditOperation, IInternalModelContentChange,
|
|
523
|
+
export { ApplyEditsResult, BracketPairColorizationOptions, DefaultEndOfLine, EndOfLinePreference, EndOfLineSequence, FindMatch, GlyphMarginLane, IDecorationOptions, IIdentifiedSingleEditOperation, IInternalModelContentChange, IModelDecorationGlyphMarginOptions, IModelDecorationMinimapOptions, IModelDecorationOptions, IModelDecorationOverviewRulerOptions, IModelDecorationsChangeAccessor, IModelDeltaDecoration, IReadonlyTextBuffer, ISingleEditOperationIdentifier, ITextBuffer, ITextBufferFactory, ITextModel, ITextModelCreationOptions, ITextSnapshot, IValidEditOperation, InjectedTextCursorStops, InjectedTextOptions, MinimapPosition, OverviewRulerLane, SearchData, TrackedRangeStickiness, ValidAnnotatedEditOperation };
|
|
@@ -18,13 +18,5 @@ interface IModelContentChange {
|
|
|
18
18
|
*/
|
|
19
19
|
readonly text: string;
|
|
20
20
|
}
|
|
21
|
-
/**
|
|
22
|
-
* An event describing that model decorations have changed.
|
|
23
|
-
*/
|
|
24
|
-
interface IModelDecorationsChangedEvent {
|
|
25
|
-
readonly affectsMinimap: boolean;
|
|
26
|
-
readonly affectsOverviewRuler: boolean;
|
|
27
|
-
readonly affectsGlyphMargin: boolean;
|
|
28
|
-
}
|
|
29
21
|
|
|
30
|
-
export { IModelContentChange
|
|
22
|
+
export { IModelContentChange };
|