@ng-util/monaco-editor 16.0.0 → 17.0.0-rc.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/esm2022/monaco-editor-base.component.mjs +19 -28
- package/esm2022/monaco-editor-diff.component.mjs +7 -7
- package/esm2022/monaco-editor.component.mjs +20 -14
- package/esm2022/monaco-editor.config.mjs +1 -1
- package/esm2022/monaco-editor.module.mjs +6 -7
- package/esm2022/monaco-editor.types.mjs +1 -1
- package/fesm2022/ng-util-monaco-editor.mjs +44 -45
- package/fesm2022/ng-util-monaco-editor.mjs.map +1 -1
- package/monaco-editor-base.component.d.ts +5 -7
- package/monaco-editor-diff.component.d.ts +1 -1
- package/monaco-editor.component.d.ts +1 -1
- package/monaco-editor.config.d.ts +4 -0
- package/monaco-editor.types.d.ts +1 -1
- package/monaco.d.ts +432 -357
- package/package.json +1 -1
package/monaco.d.ts
CHANGED
|
@@ -19,10 +19,45 @@ declare namespace monaco {
|
|
|
19
19
|
export type Thenable<T> = PromiseLike<T>;
|
|
20
20
|
|
|
21
21
|
export interface Environment {
|
|
22
|
+
/**
|
|
23
|
+
* Define a global `monaco` symbol.
|
|
24
|
+
* This is true by default in AMD and false by default in ESM.
|
|
25
|
+
*/
|
|
22
26
|
globalAPI?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* The base url where the editor sources are found (which contains the vs folder)
|
|
29
|
+
*/
|
|
23
30
|
baseUrl?: string;
|
|
31
|
+
/**
|
|
32
|
+
* A web worker factory.
|
|
33
|
+
* NOTE: If `getWorker` is defined, `getWorkerUrl` is not invoked.
|
|
34
|
+
*/
|
|
24
35
|
getWorker?(workerId: string, label: string): Promise<Worker> | Worker;
|
|
36
|
+
/**
|
|
37
|
+
* Return the location for web worker scripts.
|
|
38
|
+
* NOTE: If `getWorker` is defined, `getWorkerUrl` is not invoked.
|
|
39
|
+
*/
|
|
25
40
|
getWorkerUrl?(workerId: string, label: string): string;
|
|
41
|
+
/**
|
|
42
|
+
* Create a trusted types policy (same API as window.trustedTypes.createPolicy)
|
|
43
|
+
*/
|
|
44
|
+
createTrustedTypesPolicy?(
|
|
45
|
+
policyName: string,
|
|
46
|
+
policyOptions?: ITrustedTypePolicyOptions,
|
|
47
|
+
): undefined | ITrustedTypePolicy;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export interface ITrustedTypePolicyOptions {
|
|
51
|
+
createHTML?: (input: string, ...arguments: any[]) => string;
|
|
52
|
+
createScript?: (input: string, ...arguments: any[]) => string;
|
|
53
|
+
createScriptURL?: (input: string, ...arguments: any[]) => string;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export interface ITrustedTypePolicy {
|
|
57
|
+
readonly name: string;
|
|
58
|
+
createHTML?(input: string): any;
|
|
59
|
+
createScript?(input: string): any;
|
|
60
|
+
createScriptURL?(input: string): any;
|
|
26
61
|
}
|
|
27
62
|
|
|
28
63
|
export interface IDisposable {
|
|
@@ -179,13 +214,14 @@ declare namespace monaco {
|
|
|
179
214
|
* @param path A file system path (see `Uri#fsPath`)
|
|
180
215
|
*/
|
|
181
216
|
static file(path: string): Uri;
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
217
|
+
/**
|
|
218
|
+
* Creates new Uri from uri components.
|
|
219
|
+
*
|
|
220
|
+
* Unless `strict` is `true` the scheme is defaults to be `file`. This function performs
|
|
221
|
+
* validation and should be used for untrusted uri components retrieved from storage,
|
|
222
|
+
* user input, command arguments etc
|
|
223
|
+
*/
|
|
224
|
+
static from(components: UriComponents, strict?: boolean): Uri;
|
|
189
225
|
/**
|
|
190
226
|
* Join a Uri path with path fragments and normalizes the resulting path.
|
|
191
227
|
*
|
|
@@ -207,6 +243,16 @@ declare namespace monaco {
|
|
|
207
243
|
*/
|
|
208
244
|
toString(skipEncoding?: boolean): string;
|
|
209
245
|
toJSON(): UriComponents;
|
|
246
|
+
/**
|
|
247
|
+
* A helper function to revive URIs.
|
|
248
|
+
*
|
|
249
|
+
* **Note** that this function should only be used when receiving Uri#toJSON generated data
|
|
250
|
+
* and that it doesn't do any validation. Use {@link Uri.from} when received "untrusted"
|
|
251
|
+
* uri components such as command arguments or data from storage.
|
|
252
|
+
*
|
|
253
|
+
* @param data The Uri components or Uri to revive.
|
|
254
|
+
* @returns The revived Uri or undefined or null.
|
|
255
|
+
*/
|
|
210
256
|
static revive(data: UriComponents | Uri): Uri;
|
|
211
257
|
static revive(data: UriComponents | Uri | undefined): Uri | undefined;
|
|
212
258
|
static revive(data: UriComponents | Uri | null): Uri | null;
|
|
@@ -215,10 +261,10 @@ declare namespace monaco {
|
|
|
215
261
|
|
|
216
262
|
export interface UriComponents {
|
|
217
263
|
scheme: string;
|
|
218
|
-
authority
|
|
219
|
-
path
|
|
220
|
-
query
|
|
221
|
-
fragment
|
|
264
|
+
authority?: string;
|
|
265
|
+
path?: string;
|
|
266
|
+
query?: string;
|
|
267
|
+
fragment?: string;
|
|
222
268
|
}
|
|
223
269
|
/**
|
|
224
270
|
* Virtual Key Codes, the value does not hold any inherent meaning.
|
|
@@ -378,28 +424,28 @@ declare namespace monaco {
|
|
|
378
424
|
* Either the angle bracket key or the backslash key on the RT 102-key keyboard.
|
|
379
425
|
*/
|
|
380
426
|
IntlBackslash = 97,
|
|
381
|
-
Numpad0 = 98,
|
|
382
|
-
Numpad1 = 99,
|
|
383
|
-
Numpad2 = 100,
|
|
384
|
-
Numpad3 = 101,
|
|
385
|
-
Numpad4 = 102,
|
|
386
|
-
Numpad5 = 103,
|
|
387
|
-
Numpad6 = 104,
|
|
388
|
-
Numpad7 = 105,
|
|
389
|
-
Numpad8 = 106,
|
|
390
|
-
Numpad9 = 107,
|
|
391
|
-
NumpadMultiply = 108,
|
|
392
|
-
NumpadAdd = 109,
|
|
393
|
-
NUMPAD_SEPARATOR = 110,
|
|
394
|
-
NumpadSubtract = 111,
|
|
395
|
-
NumpadDecimal = 112,
|
|
396
|
-
NumpadDivide = 113,
|
|
427
|
+
Numpad0 = 98,// VK_NUMPAD0, 0x60, Numeric keypad 0 key
|
|
428
|
+
Numpad1 = 99,// VK_NUMPAD1, 0x61, Numeric keypad 1 key
|
|
429
|
+
Numpad2 = 100,// VK_NUMPAD2, 0x62, Numeric keypad 2 key
|
|
430
|
+
Numpad3 = 101,// VK_NUMPAD3, 0x63, Numeric keypad 3 key
|
|
431
|
+
Numpad4 = 102,// VK_NUMPAD4, 0x64, Numeric keypad 4 key
|
|
432
|
+
Numpad5 = 103,// VK_NUMPAD5, 0x65, Numeric keypad 5 key
|
|
433
|
+
Numpad6 = 104,// VK_NUMPAD6, 0x66, Numeric keypad 6 key
|
|
434
|
+
Numpad7 = 105,// VK_NUMPAD7, 0x67, Numeric keypad 7 key
|
|
435
|
+
Numpad8 = 106,// VK_NUMPAD8, 0x68, Numeric keypad 8 key
|
|
436
|
+
Numpad9 = 107,// VK_NUMPAD9, 0x69, Numeric keypad 9 key
|
|
437
|
+
NumpadMultiply = 108,// VK_MULTIPLY, 0x6A, Multiply key
|
|
438
|
+
NumpadAdd = 109,// VK_ADD, 0x6B, Add key
|
|
439
|
+
NUMPAD_SEPARATOR = 110,// VK_SEPARATOR, 0x6C, Separator key
|
|
440
|
+
NumpadSubtract = 111,// VK_SUBTRACT, 0x6D, Subtract key
|
|
441
|
+
NumpadDecimal = 112,// VK_DECIMAL, 0x6E, Decimal key
|
|
442
|
+
NumpadDivide = 113,// VK_DIVIDE, 0x6F,
|
|
397
443
|
/**
|
|
398
444
|
* Cover all key codes when IME is processing input.
|
|
399
445
|
*/
|
|
400
446
|
KEY_IN_COMPOSITION = 114,
|
|
401
|
-
ABNT_C1 = 115
|
|
402
|
-
ABNT_C2 = 116
|
|
447
|
+
ABNT_C1 = 115,// Brazilian (ABNT) Keyboard
|
|
448
|
+
ABNT_C2 = 116,// Brazilian (ABNT) Keyboard
|
|
403
449
|
AudioVolumeMute = 117,
|
|
404
450
|
AudioVolumeUp = 118,
|
|
405
451
|
AudioVolumeDown = 119,
|
|
@@ -896,13 +942,6 @@ declare namespace monaco {
|
|
|
896
942
|
|
|
897
943
|
declare namespace monaco.editor {
|
|
898
944
|
|
|
899
|
-
export interface IDiffNavigator {
|
|
900
|
-
canNavigate(): boolean;
|
|
901
|
-
next(): void;
|
|
902
|
-
previous(): void;
|
|
903
|
-
dispose(): void;
|
|
904
|
-
}
|
|
905
|
-
|
|
906
945
|
/**
|
|
907
946
|
* Create a new editor under `domElement`.
|
|
908
947
|
* `domElement` should be empty (not contain other dom nodes).
|
|
@@ -940,14 +979,6 @@ declare namespace monaco.editor {
|
|
|
940
979
|
*/
|
|
941
980
|
export function createDiffEditor(domElement: HTMLElement, options?: IStandaloneDiffEditorConstructionOptions, override?: IEditorOverrideServices): IStandaloneDiffEditor;
|
|
942
981
|
|
|
943
|
-
export interface IDiffNavigatorOptions {
|
|
944
|
-
readonly followsCaret?: boolean;
|
|
945
|
-
readonly ignoreCharChanges?: boolean;
|
|
946
|
-
readonly alwaysRevealFirst?: boolean;
|
|
947
|
-
}
|
|
948
|
-
|
|
949
|
-
export function createDiffNavigator(diffEditor: IStandaloneDiffEditor, opts?: IDiffNavigatorOptions): IDiffNavigator;
|
|
950
|
-
|
|
951
982
|
/**
|
|
952
983
|
* Description of a command contribution
|
|
953
984
|
*/
|
|
@@ -1608,6 +1639,10 @@ declare namespace monaco.editor {
|
|
|
1608
1639
|
* CSS class name describing the decoration.
|
|
1609
1640
|
*/
|
|
1610
1641
|
className?: string | null;
|
|
1642
|
+
/**
|
|
1643
|
+
* Indicates whether the decoration should span across the entire line when it continues onto the next line.
|
|
1644
|
+
*/
|
|
1645
|
+
shouldFillLineOnLineBreak?: boolean | null;
|
|
1611
1646
|
blockClassName?: string | null;
|
|
1612
1647
|
/**
|
|
1613
1648
|
* Indicates if this block should be rendered after the last line.
|
|
@@ -2321,144 +2356,6 @@ declare namespace monaco.editor {
|
|
|
2321
2356
|
export interface ILineChange extends IChange {
|
|
2322
2357
|
readonly charChanges: ICharChange[] | undefined;
|
|
2323
2358
|
}
|
|
2324
|
-
|
|
2325
|
-
/**
|
|
2326
|
-
* A document diff provider computes the diff between two text models.
|
|
2327
|
-
*/
|
|
2328
|
-
export interface IDocumentDiffProvider {
|
|
2329
|
-
/**
|
|
2330
|
-
* Computes the diff between the text models `original` and `modified`.
|
|
2331
|
-
*/
|
|
2332
|
-
computeDiff(original: ITextModel, modified: ITextModel, options: IDocumentDiffProviderOptions): Promise<IDocumentDiff>;
|
|
2333
|
-
/**
|
|
2334
|
-
* Is fired when settings of the diff algorithm change that could alter the result of the diffing computation.
|
|
2335
|
-
* Any user of this provider should recompute the diff when this event is fired.
|
|
2336
|
-
*/
|
|
2337
|
-
onDidChange: IEvent<void>;
|
|
2338
|
-
}
|
|
2339
|
-
|
|
2340
|
-
/**
|
|
2341
|
-
* Options for the diff computation.
|
|
2342
|
-
*/
|
|
2343
|
-
export interface IDocumentDiffProviderOptions {
|
|
2344
|
-
/**
|
|
2345
|
-
* When set to true, the diff should ignore whitespace changes.i
|
|
2346
|
-
*/
|
|
2347
|
-
ignoreTrimWhitespace: boolean;
|
|
2348
|
-
/**
|
|
2349
|
-
* A diff computation should throw if it takes longer than this value.
|
|
2350
|
-
*/
|
|
2351
|
-
maxComputationTimeMs: number;
|
|
2352
|
-
}
|
|
2353
|
-
|
|
2354
|
-
/**
|
|
2355
|
-
* Represents a diff between two text models.
|
|
2356
|
-
*/
|
|
2357
|
-
export interface IDocumentDiff {
|
|
2358
|
-
/**
|
|
2359
|
-
* If true, both text models are identical (byte-wise).
|
|
2360
|
-
*/
|
|
2361
|
-
readonly identical: boolean;
|
|
2362
|
-
/**
|
|
2363
|
-
* If true, the diff computation timed out and the diff might not be accurate.
|
|
2364
|
-
*/
|
|
2365
|
-
readonly quitEarly: boolean;
|
|
2366
|
-
/**
|
|
2367
|
-
* Maps all modified line ranges in the original to the corresponding line ranges in the modified text model.
|
|
2368
|
-
*/
|
|
2369
|
-
readonly changes: LineRangeMapping[];
|
|
2370
|
-
}
|
|
2371
|
-
/**
|
|
2372
|
-
* A range of lines (1-based).
|
|
2373
|
-
*/
|
|
2374
|
-
export class LineRange {
|
|
2375
|
-
/**
|
|
2376
|
-
* @param lineRanges An array of sorted line ranges.
|
|
2377
|
-
*/
|
|
2378
|
-
static joinMany(lineRanges: readonly (readonly LineRange[])[]): readonly LineRange[];
|
|
2379
|
-
/**
|
|
2380
|
-
* @param lineRanges1 Must be sorted.
|
|
2381
|
-
* @param lineRanges2 Must be sorted.
|
|
2382
|
-
*/
|
|
2383
|
-
static join(lineRanges1: readonly LineRange[], lineRanges2: readonly LineRange[]): readonly LineRange[];
|
|
2384
|
-
/**
|
|
2385
|
-
* The start line number.
|
|
2386
|
-
*/
|
|
2387
|
-
readonly startLineNumber: number;
|
|
2388
|
-
/**
|
|
2389
|
-
* The end line number (exclusive).
|
|
2390
|
-
*/
|
|
2391
|
-
readonly endLineNumberExclusive: number;
|
|
2392
|
-
constructor(startLineNumber: number, endLineNumberExclusive: number);
|
|
2393
|
-
/**
|
|
2394
|
-
* Indicates if this line range contains the given line number.
|
|
2395
|
-
*/
|
|
2396
|
-
contains(lineNumber: number): boolean;
|
|
2397
|
-
/**
|
|
2398
|
-
* Indicates if this line range is empty.
|
|
2399
|
-
*/
|
|
2400
|
-
get isEmpty(): boolean;
|
|
2401
|
-
/**
|
|
2402
|
-
* Moves this line range by the given offset of line numbers.
|
|
2403
|
-
*/
|
|
2404
|
-
delta(offset: number): LineRange;
|
|
2405
|
-
/**
|
|
2406
|
-
* The number of lines this line range spans.
|
|
2407
|
-
*/
|
|
2408
|
-
get length(): number;
|
|
2409
|
-
/**
|
|
2410
|
-
* Creates a line range that combines this and the given line range.
|
|
2411
|
-
*/
|
|
2412
|
-
join(other: LineRange): LineRange;
|
|
2413
|
-
toString(): string;
|
|
2414
|
-
/**
|
|
2415
|
-
* The resulting range is empty if the ranges do not intersect, but touch.
|
|
2416
|
-
* If the ranges don't even touch, the result is undefined.
|
|
2417
|
-
*/
|
|
2418
|
-
intersect(other: LineRange): LineRange | undefined;
|
|
2419
|
-
overlapOrTouch(other: LineRange): boolean;
|
|
2420
|
-
equals(b: LineRange): boolean;
|
|
2421
|
-
}
|
|
2422
|
-
|
|
2423
|
-
/**
|
|
2424
|
-
* Maps a line range in the original text model to a line range in the modified text model.
|
|
2425
|
-
*/
|
|
2426
|
-
export class LineRangeMapping {
|
|
2427
|
-
/**
|
|
2428
|
-
* The line range in the original text model.
|
|
2429
|
-
*/
|
|
2430
|
-
readonly originalRange: LineRange;
|
|
2431
|
-
/**
|
|
2432
|
-
* The line range in the modified text model.
|
|
2433
|
-
*/
|
|
2434
|
-
readonly modifiedRange: LineRange;
|
|
2435
|
-
/**
|
|
2436
|
-
* If inner changes have not been computed, this is set to undefined.
|
|
2437
|
-
* Otherwise, it represents the character-level diff in this line range.
|
|
2438
|
-
* The original range of each range mapping should be contained in the original line range (same for modified), exceptions are new-lines.
|
|
2439
|
-
* Must not be an empty array.
|
|
2440
|
-
*/
|
|
2441
|
-
readonly innerChanges: RangeMapping[] | undefined;
|
|
2442
|
-
constructor(originalRange: LineRange, modifiedRange: LineRange, innerChanges: RangeMapping[] | undefined);
|
|
2443
|
-
toString(): string;
|
|
2444
|
-
get changedLineCount(): any;
|
|
2445
|
-
}
|
|
2446
|
-
|
|
2447
|
-
/**
|
|
2448
|
-
* Maps a range in the original text model to a range in the modified text model.
|
|
2449
|
-
*/
|
|
2450
|
-
export class RangeMapping {
|
|
2451
|
-
/**
|
|
2452
|
-
* The original range.
|
|
2453
|
-
*/
|
|
2454
|
-
readonly originalRange: Range;
|
|
2455
|
-
/**
|
|
2456
|
-
* The modified range.
|
|
2457
|
-
*/
|
|
2458
|
-
readonly modifiedRange: Range;
|
|
2459
|
-
constructor(originalRange: Range, modifiedRange: Range);
|
|
2460
|
-
toString(): string;
|
|
2461
|
-
}
|
|
2462
2359
|
export interface IDimension {
|
|
2463
2360
|
width: number;
|
|
2464
2361
|
height: number;
|
|
@@ -2542,6 +2439,11 @@ declare namespace monaco.editor {
|
|
|
2542
2439
|
modified: ITextModel;
|
|
2543
2440
|
}
|
|
2544
2441
|
|
|
2442
|
+
export interface IDiffEditorViewModel {
|
|
2443
|
+
readonly model: IDiffEditorModel;
|
|
2444
|
+
waitForDiff(): Promise<void>;
|
|
2445
|
+
}
|
|
2446
|
+
|
|
2545
2447
|
/**
|
|
2546
2448
|
* An event describing that an editor has had its model reset (i.e. `editor.setModel()`).
|
|
2547
2449
|
*/
|
|
@@ -2576,7 +2478,7 @@ declare namespace monaco.editor {
|
|
|
2576
2478
|
run(args?: unknown): Promise<void>;
|
|
2577
2479
|
}
|
|
2578
2480
|
|
|
2579
|
-
export type IEditorModel = ITextModel | IDiffEditorModel;
|
|
2481
|
+
export type IEditorModel = ITextModel | IDiffEditorModel | IDiffEditorViewModel;
|
|
2580
2482
|
|
|
2581
2483
|
/**
|
|
2582
2484
|
* A (serializable) state of the cursors.
|
|
@@ -2617,6 +2519,7 @@ declare namespace monaco.editor {
|
|
|
2617
2519
|
export interface IDiffEditorViewState {
|
|
2618
2520
|
original: ICodeEditorViewState | null;
|
|
2619
2521
|
modified: ICodeEditorViewState | null;
|
|
2522
|
+
modelState?: unknown;
|
|
2620
2523
|
}
|
|
2621
2524
|
|
|
2622
2525
|
/**
|
|
@@ -3129,6 +3032,10 @@ declare namespace monaco.editor {
|
|
|
3129
3032
|
* The aria label for the editor's textarea (when it is focused).
|
|
3130
3033
|
*/
|
|
3131
3034
|
ariaLabel?: string;
|
|
3035
|
+
/**
|
|
3036
|
+
* Whether the aria-required attribute should be set on the editors textarea.
|
|
3037
|
+
*/
|
|
3038
|
+
ariaRequired?: boolean;
|
|
3132
3039
|
/**
|
|
3133
3040
|
* Control whether a screen reader announces inline suggestion content immediately.
|
|
3134
3041
|
*/
|
|
@@ -3223,6 +3130,10 @@ declare namespace monaco.editor {
|
|
|
3223
3130
|
* Defaults to false.
|
|
3224
3131
|
*/
|
|
3225
3132
|
readOnly?: boolean;
|
|
3133
|
+
/**
|
|
3134
|
+
* The message to display when the editor is readonly.
|
|
3135
|
+
*/
|
|
3136
|
+
readOnlyMessage?: IMarkdownString;
|
|
3226
3137
|
/**
|
|
3227
3138
|
* Should the textarea used for input use the DOM `readonly` attribute.
|
|
3228
3139
|
* Defaults to false.
|
|
@@ -3421,6 +3332,10 @@ declare namespace monaco.editor {
|
|
|
3421
3332
|
* Enable inline color decorators and color picker rendering.
|
|
3422
3333
|
*/
|
|
3423
3334
|
colorDecorators?: boolean;
|
|
3335
|
+
/**
|
|
3336
|
+
* Controls what is the condition to spawn a color picker from a color dectorator
|
|
3337
|
+
*/
|
|
3338
|
+
colorDecoratorsActivatedOn?: 'clickAndHover' | 'click' | 'hover';
|
|
3424
3339
|
/**
|
|
3425
3340
|
* Controls the max number of color decorators that can be rendered in an editor at once.
|
|
3426
3341
|
*/
|
|
@@ -3518,6 +3433,11 @@ declare namespace monaco.editor {
|
|
|
3518
3433
|
* Defaults to language defined behavior.
|
|
3519
3434
|
*/
|
|
3520
3435
|
autoClosingBrackets?: EditorAutoClosingStrategy;
|
|
3436
|
+
/**
|
|
3437
|
+
* Options for auto closing comments.
|
|
3438
|
+
* Defaults to language defined behavior.
|
|
3439
|
+
*/
|
|
3440
|
+
autoClosingComments?: EditorAutoClosingStrategy;
|
|
3521
3441
|
/**
|
|
3522
3442
|
* Options for auto closing quotes.
|
|
3523
3443
|
* Defaults to language defined behavior.
|
|
@@ -3776,9 +3696,17 @@ declare namespace monaco.editor {
|
|
|
3776
3696
|
*/
|
|
3777
3697
|
dropIntoEditor?: IDropIntoEditorOptions;
|
|
3778
3698
|
/**
|
|
3779
|
-
* Controls
|
|
3699
|
+
* Controls support for changing how content is pasted into the editor.
|
|
3700
|
+
*/
|
|
3701
|
+
pasteAs?: IPasteAsOptions;
|
|
3702
|
+
/**
|
|
3703
|
+
* Controls whether the editor / terminal receives tabs or defers them to the workbench for navigation.
|
|
3780
3704
|
*/
|
|
3781
3705
|
tabFocusMode?: boolean;
|
|
3706
|
+
/**
|
|
3707
|
+
* Controls whether the accessibility hint should be provided to screen reader users when an inline completion is shown.
|
|
3708
|
+
*/
|
|
3709
|
+
inlineCompletionsAccessibilityVerbose?: boolean;
|
|
3782
3710
|
}
|
|
3783
3711
|
|
|
3784
3712
|
export interface IDiffEditorBaseOptions {
|
|
@@ -3798,6 +3726,16 @@ declare namespace monaco.editor {
|
|
|
3798
3726
|
* Defaults to true.
|
|
3799
3727
|
*/
|
|
3800
3728
|
renderSideBySide?: boolean;
|
|
3729
|
+
/**
|
|
3730
|
+
* When `renderSideBySide` is enabled, `useInlineViewWhenSpaceIsLimited` is set,
|
|
3731
|
+
* and the diff editor has a width less than `renderSideBySideInlineBreakpoint`, the inline view is used.
|
|
3732
|
+
*/
|
|
3733
|
+
renderSideBySideInlineBreakpoint?: number | undefined;
|
|
3734
|
+
/**
|
|
3735
|
+
* When `renderSideBySide` is enabled, `useInlineViewWhenSpaceIsLimited` is set,
|
|
3736
|
+
* and the diff editor has a width less than `renderSideBySideInlineBreakpoint`, the inline view is used.
|
|
3737
|
+
*/
|
|
3738
|
+
useInlineViewWhenSpaceIsLimited?: boolean;
|
|
3801
3739
|
/**
|
|
3802
3740
|
* Timeout in milliseconds after which diff computation is cancelled.
|
|
3803
3741
|
* Defaults to 5000.
|
|
@@ -3845,11 +3783,33 @@ declare namespace monaco.editor {
|
|
|
3845
3783
|
/**
|
|
3846
3784
|
* Diff Algorithm
|
|
3847
3785
|
*/
|
|
3848
|
-
diffAlgorithm?: 'legacy' | 'advanced'
|
|
3786
|
+
diffAlgorithm?: 'legacy' | 'advanced';
|
|
3849
3787
|
/**
|
|
3850
3788
|
* Whether the diff editor aria label should be verbose.
|
|
3851
3789
|
*/
|
|
3852
3790
|
accessibilityVerbose?: boolean;
|
|
3791
|
+
experimental?: {
|
|
3792
|
+
/**
|
|
3793
|
+
* Defaults to false.
|
|
3794
|
+
*/
|
|
3795
|
+
showMoves?: boolean;
|
|
3796
|
+
showEmptyDecorations?: boolean;
|
|
3797
|
+
};
|
|
3798
|
+
/**
|
|
3799
|
+
* Is the diff editor inside another editor
|
|
3800
|
+
* Defaults to false
|
|
3801
|
+
*/
|
|
3802
|
+
isInEmbeddedEditor?: boolean;
|
|
3803
|
+
/**
|
|
3804
|
+
* If the diff editor should only show the difference review mode.
|
|
3805
|
+
*/
|
|
3806
|
+
onlyShowAccessibleDiffViewer?: boolean;
|
|
3807
|
+
hideUnchangedRegions?: {
|
|
3808
|
+
enabled?: boolean;
|
|
3809
|
+
revealLineCount?: number;
|
|
3810
|
+
minimumLineCount?: number;
|
|
3811
|
+
contextLineCount?: number;
|
|
3812
|
+
};
|
|
3853
3813
|
}
|
|
3854
3814
|
|
|
3855
3815
|
/**
|
|
@@ -4025,6 +3985,11 @@ declare namespace monaco.editor {
|
|
|
4025
3985
|
* Defaults to true.
|
|
4026
3986
|
*/
|
|
4027
3987
|
sticky?: boolean;
|
|
3988
|
+
/**
|
|
3989
|
+
* Controls how long the hover is visible after you hovered out of it.
|
|
3990
|
+
* Require sticky setting to be true.
|
|
3991
|
+
*/
|
|
3992
|
+
hidingDelay?: number;
|
|
4028
3993
|
/**
|
|
4029
3994
|
* Should the hover be shown above the line if possible?
|
|
4030
3995
|
* Defaults to false.
|
|
@@ -4174,6 +4139,10 @@ declare namespace monaco.editor {
|
|
|
4174
4139
|
* Model to choose for sticky scroll by default
|
|
4175
4140
|
*/
|
|
4176
4141
|
defaultModel?: 'outlineModel' | 'foldingProviderModel' | 'indentationModel';
|
|
4142
|
+
/**
|
|
4143
|
+
* Define whether to scroll sticky scroll with editor horizontal scrollbae
|
|
4144
|
+
*/
|
|
4145
|
+
scrollWithEditor?: boolean;
|
|
4177
4146
|
}
|
|
4178
4147
|
|
|
4179
4148
|
/**
|
|
@@ -4671,6 +4640,7 @@ declare namespace monaco.editor {
|
|
|
4671
4640
|
|
|
4672
4641
|
export interface ISmartSelectOptions {
|
|
4673
4642
|
selectLeadingAndTrailingWhitespace?: boolean;
|
|
4643
|
+
selectSubwords?: boolean;
|
|
4674
4644
|
}
|
|
4675
4645
|
|
|
4676
4646
|
/**
|
|
@@ -4718,149 +4688,171 @@ declare namespace monaco.editor {
|
|
|
4718
4688
|
showDropSelector?: 'afterDrop' | 'never';
|
|
4719
4689
|
}
|
|
4720
4690
|
|
|
4691
|
+
/**
|
|
4692
|
+
* Configuration options for editor pasting as into behavior
|
|
4693
|
+
*/
|
|
4694
|
+
export interface IPasteAsOptions {
|
|
4695
|
+
/**
|
|
4696
|
+
* Enable paste as functionality in editors.
|
|
4697
|
+
* Defaults to true.
|
|
4698
|
+
*/
|
|
4699
|
+
enabled?: boolean;
|
|
4700
|
+
/**
|
|
4701
|
+
* Controls if a widget is shown after a drop.
|
|
4702
|
+
* Defaults to 'afterPaste'.
|
|
4703
|
+
*/
|
|
4704
|
+
showPasteSelector?: 'afterPaste' | 'never';
|
|
4705
|
+
}
|
|
4706
|
+
|
|
4721
4707
|
export enum EditorOption {
|
|
4722
4708
|
acceptSuggestionOnCommitCharacter = 0,
|
|
4723
4709
|
acceptSuggestionOnEnter = 1,
|
|
4724
4710
|
accessibilitySupport = 2,
|
|
4725
4711
|
accessibilityPageSize = 3,
|
|
4726
4712
|
ariaLabel = 4,
|
|
4727
|
-
|
|
4728
|
-
|
|
4729
|
-
|
|
4730
|
-
|
|
4731
|
-
|
|
4732
|
-
|
|
4733
|
-
|
|
4734
|
-
|
|
4735
|
-
|
|
4736
|
-
|
|
4737
|
-
|
|
4738
|
-
|
|
4739
|
-
|
|
4740
|
-
|
|
4741
|
-
|
|
4742
|
-
|
|
4743
|
-
|
|
4744
|
-
|
|
4745
|
-
|
|
4746
|
-
|
|
4747
|
-
|
|
4748
|
-
|
|
4749
|
-
|
|
4750
|
-
|
|
4751
|
-
|
|
4752
|
-
|
|
4753
|
-
|
|
4754
|
-
|
|
4755
|
-
|
|
4756
|
-
|
|
4757
|
-
|
|
4758
|
-
|
|
4759
|
-
|
|
4760
|
-
|
|
4761
|
-
|
|
4762
|
-
|
|
4763
|
-
|
|
4764
|
-
|
|
4765
|
-
|
|
4766
|
-
|
|
4767
|
-
|
|
4768
|
-
|
|
4769
|
-
|
|
4770
|
-
|
|
4771
|
-
|
|
4772
|
-
|
|
4773
|
-
|
|
4774
|
-
|
|
4775
|
-
|
|
4776
|
-
|
|
4777
|
-
|
|
4778
|
-
|
|
4779
|
-
|
|
4780
|
-
|
|
4781
|
-
|
|
4782
|
-
|
|
4783
|
-
|
|
4784
|
-
|
|
4785
|
-
|
|
4786
|
-
|
|
4787
|
-
|
|
4788
|
-
|
|
4789
|
-
|
|
4790
|
-
|
|
4791
|
-
|
|
4792
|
-
|
|
4793
|
-
|
|
4794
|
-
|
|
4795
|
-
|
|
4796
|
-
|
|
4797
|
-
|
|
4798
|
-
|
|
4799
|
-
|
|
4800
|
-
|
|
4801
|
-
|
|
4802
|
-
|
|
4803
|
-
|
|
4804
|
-
|
|
4805
|
-
|
|
4806
|
-
|
|
4807
|
-
|
|
4808
|
-
|
|
4809
|
-
|
|
4810
|
-
|
|
4811
|
-
|
|
4812
|
-
|
|
4813
|
-
|
|
4814
|
-
|
|
4815
|
-
|
|
4816
|
-
|
|
4817
|
-
|
|
4818
|
-
|
|
4819
|
-
|
|
4820
|
-
|
|
4821
|
-
|
|
4822
|
-
|
|
4823
|
-
|
|
4824
|
-
|
|
4825
|
-
|
|
4826
|
-
|
|
4827
|
-
|
|
4828
|
-
|
|
4829
|
-
|
|
4830
|
-
|
|
4831
|
-
|
|
4832
|
-
|
|
4833
|
-
|
|
4834
|
-
|
|
4835
|
-
|
|
4836
|
-
|
|
4837
|
-
|
|
4838
|
-
|
|
4839
|
-
|
|
4840
|
-
|
|
4841
|
-
|
|
4842
|
-
|
|
4843
|
-
|
|
4844
|
-
|
|
4845
|
-
|
|
4846
|
-
|
|
4847
|
-
|
|
4848
|
-
|
|
4849
|
-
|
|
4850
|
-
|
|
4851
|
-
|
|
4852
|
-
|
|
4853
|
-
|
|
4854
|
-
|
|
4855
|
-
|
|
4856
|
-
|
|
4857
|
-
|
|
4858
|
-
|
|
4859
|
-
|
|
4860
|
-
|
|
4861
|
-
|
|
4862
|
-
|
|
4863
|
-
|
|
4713
|
+
ariaRequired = 5,
|
|
4714
|
+
autoClosingBrackets = 6,
|
|
4715
|
+
autoClosingComments = 7,
|
|
4716
|
+
screenReaderAnnounceInlineSuggestion = 8,
|
|
4717
|
+
autoClosingDelete = 9,
|
|
4718
|
+
autoClosingOvertype = 10,
|
|
4719
|
+
autoClosingQuotes = 11,
|
|
4720
|
+
autoIndent = 12,
|
|
4721
|
+
automaticLayout = 13,
|
|
4722
|
+
autoSurround = 14,
|
|
4723
|
+
bracketPairColorization = 15,
|
|
4724
|
+
guides = 16,
|
|
4725
|
+
codeLens = 17,
|
|
4726
|
+
codeLensFontFamily = 18,
|
|
4727
|
+
codeLensFontSize = 19,
|
|
4728
|
+
colorDecorators = 20,
|
|
4729
|
+
colorDecoratorsLimit = 21,
|
|
4730
|
+
columnSelection = 22,
|
|
4731
|
+
comments = 23,
|
|
4732
|
+
contextmenu = 24,
|
|
4733
|
+
copyWithSyntaxHighlighting = 25,
|
|
4734
|
+
cursorBlinking = 26,
|
|
4735
|
+
cursorSmoothCaretAnimation = 27,
|
|
4736
|
+
cursorStyle = 28,
|
|
4737
|
+
cursorSurroundingLines = 29,
|
|
4738
|
+
cursorSurroundingLinesStyle = 30,
|
|
4739
|
+
cursorWidth = 31,
|
|
4740
|
+
disableLayerHinting = 32,
|
|
4741
|
+
disableMonospaceOptimizations = 33,
|
|
4742
|
+
domReadOnly = 34,
|
|
4743
|
+
dragAndDrop = 35,
|
|
4744
|
+
dropIntoEditor = 36,
|
|
4745
|
+
emptySelectionClipboard = 37,
|
|
4746
|
+
experimentalWhitespaceRendering = 38,
|
|
4747
|
+
extraEditorClassName = 39,
|
|
4748
|
+
fastScrollSensitivity = 40,
|
|
4749
|
+
find = 41,
|
|
4750
|
+
fixedOverflowWidgets = 42,
|
|
4751
|
+
folding = 43,
|
|
4752
|
+
foldingStrategy = 44,
|
|
4753
|
+
foldingHighlight = 45,
|
|
4754
|
+
foldingImportsByDefault = 46,
|
|
4755
|
+
foldingMaximumRegions = 47,
|
|
4756
|
+
unfoldOnClickAfterEndOfLine = 48,
|
|
4757
|
+
fontFamily = 49,
|
|
4758
|
+
fontInfo = 50,
|
|
4759
|
+
fontLigatures = 51,
|
|
4760
|
+
fontSize = 52,
|
|
4761
|
+
fontWeight = 53,
|
|
4762
|
+
fontVariations = 54,
|
|
4763
|
+
formatOnPaste = 55,
|
|
4764
|
+
formatOnType = 56,
|
|
4765
|
+
glyphMargin = 57,
|
|
4766
|
+
gotoLocation = 58,
|
|
4767
|
+
hideCursorInOverviewRuler = 59,
|
|
4768
|
+
hover = 60,
|
|
4769
|
+
inDiffEditor = 61,
|
|
4770
|
+
inlineSuggest = 62,
|
|
4771
|
+
letterSpacing = 63,
|
|
4772
|
+
lightbulb = 64,
|
|
4773
|
+
lineDecorationsWidth = 65,
|
|
4774
|
+
lineHeight = 66,
|
|
4775
|
+
lineNumbers = 67,
|
|
4776
|
+
lineNumbersMinChars = 68,
|
|
4777
|
+
linkedEditing = 69,
|
|
4778
|
+
links = 70,
|
|
4779
|
+
matchBrackets = 71,
|
|
4780
|
+
minimap = 72,
|
|
4781
|
+
mouseStyle = 73,
|
|
4782
|
+
mouseWheelScrollSensitivity = 74,
|
|
4783
|
+
mouseWheelZoom = 75,
|
|
4784
|
+
multiCursorMergeOverlapping = 76,
|
|
4785
|
+
multiCursorModifier = 77,
|
|
4786
|
+
multiCursorPaste = 78,
|
|
4787
|
+
multiCursorLimit = 79,
|
|
4788
|
+
occurrencesHighlight = 80,
|
|
4789
|
+
overviewRulerBorder = 81,
|
|
4790
|
+
overviewRulerLanes = 82,
|
|
4791
|
+
padding = 83,
|
|
4792
|
+
pasteAs = 84,
|
|
4793
|
+
parameterHints = 85,
|
|
4794
|
+
peekWidgetDefaultFocus = 86,
|
|
4795
|
+
definitionLinkOpensInPeek = 87,
|
|
4796
|
+
quickSuggestions = 88,
|
|
4797
|
+
quickSuggestionsDelay = 89,
|
|
4798
|
+
readOnly = 90,
|
|
4799
|
+
readOnlyMessage = 91,
|
|
4800
|
+
renameOnType = 92,
|
|
4801
|
+
renderControlCharacters = 93,
|
|
4802
|
+
renderFinalNewline = 94,
|
|
4803
|
+
renderLineHighlight = 95,
|
|
4804
|
+
renderLineHighlightOnlyWhenFocus = 96,
|
|
4805
|
+
renderValidationDecorations = 97,
|
|
4806
|
+
renderWhitespace = 98,
|
|
4807
|
+
revealHorizontalRightPadding = 99,
|
|
4808
|
+
roundedSelection = 100,
|
|
4809
|
+
rulers = 101,
|
|
4810
|
+
scrollbar = 102,
|
|
4811
|
+
scrollBeyondLastColumn = 103,
|
|
4812
|
+
scrollBeyondLastLine = 104,
|
|
4813
|
+
scrollPredominantAxis = 105,
|
|
4814
|
+
selectionClipboard = 106,
|
|
4815
|
+
selectionHighlight = 107,
|
|
4816
|
+
selectOnLineNumbers = 108,
|
|
4817
|
+
showFoldingControls = 109,
|
|
4818
|
+
showUnused = 110,
|
|
4819
|
+
snippetSuggestions = 111,
|
|
4820
|
+
smartSelect = 112,
|
|
4821
|
+
smoothScrolling = 113,
|
|
4822
|
+
stickyScroll = 114,
|
|
4823
|
+
stickyTabStops = 115,
|
|
4824
|
+
stopRenderingLineAfter = 116,
|
|
4825
|
+
suggest = 117,
|
|
4826
|
+
suggestFontSize = 118,
|
|
4827
|
+
suggestLineHeight = 119,
|
|
4828
|
+
suggestOnTriggerCharacters = 120,
|
|
4829
|
+
suggestSelection = 121,
|
|
4830
|
+
tabCompletion = 122,
|
|
4831
|
+
tabIndex = 123,
|
|
4832
|
+
unicodeHighlighting = 124,
|
|
4833
|
+
unusualLineTerminators = 125,
|
|
4834
|
+
useShadowDOM = 126,
|
|
4835
|
+
useTabStops = 127,
|
|
4836
|
+
wordBreak = 128,
|
|
4837
|
+
wordSeparators = 129,
|
|
4838
|
+
wordWrap = 130,
|
|
4839
|
+
wordWrapBreakAfterCharacters = 131,
|
|
4840
|
+
wordWrapBreakBeforeCharacters = 132,
|
|
4841
|
+
wordWrapColumn = 133,
|
|
4842
|
+
wordWrapOverride1 = 134,
|
|
4843
|
+
wordWrapOverride2 = 135,
|
|
4844
|
+
wrappingIndent = 136,
|
|
4845
|
+
wrappingStrategy = 137,
|
|
4846
|
+
showDeprecated = 138,
|
|
4847
|
+
inlayHints = 139,
|
|
4848
|
+
editorClassName = 140,
|
|
4849
|
+
pixelRatio = 141,
|
|
4850
|
+
tabFocusMode = 142,
|
|
4851
|
+
layoutInfo = 143,
|
|
4852
|
+
wrappingInfo = 144,
|
|
4853
|
+
defaultColorDecorators = 145,
|
|
4854
|
+
colorDecoratorsActivatedOn = 146,
|
|
4855
|
+
inlineCompletionsAccessibilityVerbose = 147
|
|
4864
4856
|
}
|
|
4865
4857
|
|
|
4866
4858
|
export const EditorOptions: {
|
|
@@ -4869,8 +4861,10 @@ declare namespace monaco.editor {
|
|
|
4869
4861
|
accessibilitySupport: IEditorOption<EditorOption.accessibilitySupport, AccessibilitySupport>;
|
|
4870
4862
|
accessibilityPageSize: IEditorOption<EditorOption.accessibilityPageSize, number>;
|
|
4871
4863
|
ariaLabel: IEditorOption<EditorOption.ariaLabel, string>;
|
|
4864
|
+
ariaRequired: IEditorOption<EditorOption.ariaRequired, boolean>;
|
|
4872
4865
|
screenReaderAnnounceInlineSuggestion: IEditorOption<EditorOption.screenReaderAnnounceInlineSuggestion, boolean>;
|
|
4873
4866
|
autoClosingBrackets: IEditorOption<EditorOption.autoClosingBrackets, 'always' | 'languageDefined' | 'beforeWhitespace' | 'never'>;
|
|
4867
|
+
autoClosingComments: IEditorOption<EditorOption.autoClosingComments, 'always' | 'languageDefined' | 'beforeWhitespace' | 'never'>;
|
|
4874
4868
|
autoClosingDelete: IEditorOption<EditorOption.autoClosingDelete, 'always' | 'never' | 'auto'>;
|
|
4875
4869
|
autoClosingOvertype: IEditorOption<EditorOption.autoClosingOvertype, 'always' | 'never' | 'auto'>;
|
|
4876
4870
|
autoClosingQuotes: IEditorOption<EditorOption.autoClosingQuotes, 'always' | 'languageDefined' | 'beforeWhitespace' | 'never'>;
|
|
@@ -4884,6 +4878,7 @@ declare namespace monaco.editor {
|
|
|
4884
4878
|
codeLensFontFamily: IEditorOption<EditorOption.codeLensFontFamily, string>;
|
|
4885
4879
|
codeLensFontSize: IEditorOption<EditorOption.codeLensFontSize, number>;
|
|
4886
4880
|
colorDecorators: IEditorOption<EditorOption.colorDecorators, boolean>;
|
|
4881
|
+
colorDecoratorActivatedOn: IEditorOption<EditorOption.colorDecoratorsActivatedOn, 'clickAndHover' | 'click' | 'hover'>;
|
|
4887
4882
|
colorDecoratorsLimit: IEditorOption<EditorOption.colorDecoratorsLimit, number>;
|
|
4888
4883
|
columnSelection: IEditorOption<EditorOption.columnSelection, boolean>;
|
|
4889
4884
|
comments: IEditorOption<EditorOption.comments, Readonly<Required<IEditorCommentsOptions>>>;
|
|
@@ -4947,12 +4942,14 @@ declare namespace monaco.editor {
|
|
|
4947
4942
|
overviewRulerBorder: IEditorOption<EditorOption.overviewRulerBorder, boolean>;
|
|
4948
4943
|
overviewRulerLanes: IEditorOption<EditorOption.overviewRulerLanes, number>;
|
|
4949
4944
|
padding: IEditorOption<EditorOption.padding, Readonly<Required<IEditorPaddingOptions>>>;
|
|
4945
|
+
pasteAs: IEditorOption<EditorOption.pasteAs, Readonly<Required<IPasteAsOptions>>>;
|
|
4950
4946
|
parameterHints: IEditorOption<EditorOption.parameterHints, Readonly<Required<IEditorParameterHintOptions>>>;
|
|
4951
4947
|
peekWidgetDefaultFocus: IEditorOption<EditorOption.peekWidgetDefaultFocus, 'tree' | 'editor'>;
|
|
4952
4948
|
definitionLinkOpensInPeek: IEditorOption<EditorOption.definitionLinkOpensInPeek, boolean>;
|
|
4953
4949
|
quickSuggestions: IEditorOption<EditorOption.quickSuggestions, InternalQuickSuggestionsOptions>;
|
|
4954
4950
|
quickSuggestionsDelay: IEditorOption<EditorOption.quickSuggestionsDelay, number>;
|
|
4955
4951
|
readOnly: IEditorOption<EditorOption.readOnly, boolean>;
|
|
4952
|
+
readOnlyMessage: IEditorOption<EditorOption.readOnlyMessage, any>;
|
|
4956
4953
|
renameOnType: IEditorOption<EditorOption.renameOnType, boolean>;
|
|
4957
4954
|
renderControlCharacters: IEditorOption<EditorOption.renderControlCharacters, boolean>;
|
|
4958
4955
|
renderFinalNewline: IEditorOption<EditorOption.renderFinalNewline, 'on' | 'off' | 'dimmed'>;
|
|
@@ -4980,6 +4977,7 @@ declare namespace monaco.editor {
|
|
|
4980
4977
|
stopRenderingLineAfter: IEditorOption<EditorOption.stopRenderingLineAfter, number>;
|
|
4981
4978
|
suggest: IEditorOption<EditorOption.suggest, Readonly<Required<ISuggestOptions>>>;
|
|
4982
4979
|
inlineSuggest: IEditorOption<EditorOption.inlineSuggest, Readonly<Required<IInlineSuggestOptions>>>;
|
|
4980
|
+
inlineCompletionsAccessibilityVerbose: IEditorOption<EditorOption.inlineCompletionsAccessibilityVerbose, boolean>;
|
|
4983
4981
|
suggestFontSize: IEditorOption<EditorOption.suggestFontSize, number>;
|
|
4984
4982
|
suggestLineHeight: IEditorOption<EditorOption.suggestLineHeight, number>;
|
|
4985
4983
|
suggestOnTriggerCharacters: IEditorOption<EditorOption.suggestOnTriggerCharacters, boolean>;
|
|
@@ -5258,6 +5256,47 @@ declare namespace monaco.editor {
|
|
|
5258
5256
|
* If null is returned, the overlay widget is responsible to place itself.
|
|
5259
5257
|
*/
|
|
5260
5258
|
getPosition(): IOverlayWidgetPosition | null;
|
|
5259
|
+
/**
|
|
5260
|
+
* The editor will ensure that the scroll width is >= than this value.
|
|
5261
|
+
*/
|
|
5262
|
+
getMinContentWidthInPx?(): number;
|
|
5263
|
+
}
|
|
5264
|
+
|
|
5265
|
+
/**
|
|
5266
|
+
* A glyph margin widget renders in the editor glyph margin.
|
|
5267
|
+
*/
|
|
5268
|
+
export interface IGlyphMarginWidget {
|
|
5269
|
+
/**
|
|
5270
|
+
* Get a unique identifier of the glyph widget.
|
|
5271
|
+
*/
|
|
5272
|
+
getId(): string;
|
|
5273
|
+
/**
|
|
5274
|
+
* Get the dom node of the glyph widget.
|
|
5275
|
+
*/
|
|
5276
|
+
getDomNode(): HTMLElement;
|
|
5277
|
+
/**
|
|
5278
|
+
* Get the placement of the glyph widget.
|
|
5279
|
+
*/
|
|
5280
|
+
getPosition(): IGlyphMarginWidgetPosition;
|
|
5281
|
+
}
|
|
5282
|
+
|
|
5283
|
+
/**
|
|
5284
|
+
* A position for rendering glyph margin widgets.
|
|
5285
|
+
*/
|
|
5286
|
+
export interface IGlyphMarginWidgetPosition {
|
|
5287
|
+
/**
|
|
5288
|
+
* The glyph margin lane where the widget should be shown.
|
|
5289
|
+
*/
|
|
5290
|
+
lane: GlyphMarginLane;
|
|
5291
|
+
/**
|
|
5292
|
+
* The priority order of the widget, used for determining which widget
|
|
5293
|
+
* to render when there are multiple.
|
|
5294
|
+
*/
|
|
5295
|
+
zIndex: number;
|
|
5296
|
+
/**
|
|
5297
|
+
* The editor range that this widget applies to.
|
|
5298
|
+
*/
|
|
5299
|
+
range: IRange;
|
|
5261
5300
|
}
|
|
5262
5301
|
|
|
5263
5302
|
/**
|
|
@@ -5326,7 +5365,7 @@ declare namespace monaco.editor {
|
|
|
5326
5365
|
/**
|
|
5327
5366
|
* The target element
|
|
5328
5367
|
*/
|
|
5329
|
-
readonly element:
|
|
5368
|
+
readonly element: HTMLElement | null;
|
|
5330
5369
|
/**
|
|
5331
5370
|
* The 'approximate' editor position
|
|
5332
5371
|
*/
|
|
@@ -5460,11 +5499,7 @@ declare namespace monaco.editor {
|
|
|
5460
5499
|
readonly languageId: string | null;
|
|
5461
5500
|
}
|
|
5462
5501
|
|
|
5463
|
-
export interface IDiffEditorConstructionOptions extends IDiffEditorOptions {
|
|
5464
|
-
/**
|
|
5465
|
-
* The initial editor dimension (to avoid measuring the container).
|
|
5466
|
-
*/
|
|
5467
|
-
dimension?: IDimension;
|
|
5502
|
+
export interface IDiffEditorConstructionOptions extends IDiffEditorOptions, IEditorConstructionOptions {
|
|
5468
5503
|
/**
|
|
5469
5504
|
* Place overflow widgets inside an external DOM node.
|
|
5470
5505
|
* Defaults to an internal DOM node.
|
|
@@ -5478,11 +5513,6 @@ declare namespace monaco.editor {
|
|
|
5478
5513
|
* Aria label for modified editor.
|
|
5479
5514
|
*/
|
|
5480
5515
|
modifiedAriaLabel?: string;
|
|
5481
|
-
/**
|
|
5482
|
-
* Is the diff editor inside another editor
|
|
5483
|
-
* Defaults to false
|
|
5484
|
-
*/
|
|
5485
|
-
isInEmbeddedEditor?: boolean;
|
|
5486
5516
|
}
|
|
5487
5517
|
|
|
5488
5518
|
/**
|
|
@@ -5790,7 +5820,7 @@ declare namespace monaco.editor {
|
|
|
5790
5820
|
/**
|
|
5791
5821
|
* Get the vertical position (top offset) for the line's top w.r.t. to the first line.
|
|
5792
5822
|
*/
|
|
5793
|
-
getTopForLineNumber(lineNumber: number): number;
|
|
5823
|
+
getTopForLineNumber(lineNumber: number, includeViewZones?: boolean): number;
|
|
5794
5824
|
/**
|
|
5795
5825
|
* Get the vertical position (top offset) for the line's bottom w.r.t. to the first line.
|
|
5796
5826
|
*/
|
|
@@ -5837,6 +5867,19 @@ declare namespace monaco.editor {
|
|
|
5837
5867
|
* Remove an overlay widget.
|
|
5838
5868
|
*/
|
|
5839
5869
|
removeOverlayWidget(widget: IOverlayWidget): void;
|
|
5870
|
+
/**
|
|
5871
|
+
* Add a glyph margin widget. Widgets must have unique ids, otherwise they will be overwritten.
|
|
5872
|
+
*/
|
|
5873
|
+
addGlyphMarginWidget(widget: IGlyphMarginWidget): void;
|
|
5874
|
+
/**
|
|
5875
|
+
* Layout/Reposition a glyph margin widget. This is a ping to the editor to call widget.getPosition()
|
|
5876
|
+
* and update appropriately.
|
|
5877
|
+
*/
|
|
5878
|
+
layoutGlyphMarginWidget(widget: IGlyphMarginWidget): void;
|
|
5879
|
+
/**
|
|
5880
|
+
* Remove a glyph margin widget.
|
|
5881
|
+
*/
|
|
5882
|
+
removeGlyphMarginWidget(widget: IGlyphMarginWidget): void;
|
|
5840
5883
|
/**
|
|
5841
5884
|
* Change the view zones. View zones are lost when a new model is attached to the editor.
|
|
5842
5885
|
*/
|
|
@@ -5875,13 +5918,11 @@ declare namespace monaco.editor {
|
|
|
5875
5918
|
*/
|
|
5876
5919
|
applyFontInfo(target: HTMLElement): void;
|
|
5877
5920
|
setBanner(bannerDomNode: HTMLElement | null, height: number): void;
|
|
5878
|
-
|
|
5879
|
-
|
|
5880
|
-
|
|
5881
|
-
|
|
5882
|
-
|
|
5883
|
-
export interface IDiffLineInformation {
|
|
5884
|
-
readonly equivalentLineNumber: number;
|
|
5921
|
+
/**
|
|
5922
|
+
* Is called when the model has been set, view state was restored and options are updated.
|
|
5923
|
+
* This is the best place to compute data for the viewport (such as tokens).
|
|
5924
|
+
*/
|
|
5925
|
+
handleInitialized?(): void;
|
|
5885
5926
|
}
|
|
5886
5927
|
|
|
5887
5928
|
/**
|
|
@@ -5914,6 +5955,7 @@ declare namespace monaco.editor {
|
|
|
5914
5955
|
* Type the getModel() of IEditor.
|
|
5915
5956
|
*/
|
|
5916
5957
|
getModel(): IDiffEditorModel | null;
|
|
5958
|
+
createViewModel(model: IDiffEditorModel): IDiffEditorViewModel;
|
|
5917
5959
|
/**
|
|
5918
5960
|
* Sets the current model attached to this editor.
|
|
5919
5961
|
* If the previous model was created by the editor via the value key in the options
|
|
@@ -5922,7 +5964,7 @@ declare namespace monaco.editor {
|
|
|
5922
5964
|
* will not be destroyed.
|
|
5923
5965
|
* It is safe to call setModel(null) to simply detach the current model from the editor.
|
|
5924
5966
|
*/
|
|
5925
|
-
setModel(model: IDiffEditorModel | null): void;
|
|
5967
|
+
setModel(model: IDiffEditorModel | IDiffEditorViewModel | null): void;
|
|
5926
5968
|
/**
|
|
5927
5969
|
* Get the `original` editor.
|
|
5928
5970
|
*/
|
|
@@ -5935,20 +5977,12 @@ declare namespace monaco.editor {
|
|
|
5935
5977
|
* Get the computed diff information.
|
|
5936
5978
|
*/
|
|
5937
5979
|
getLineChanges(): ILineChange[] | null;
|
|
5938
|
-
/**
|
|
5939
|
-
* Get information based on computed diff about a line number from the original model.
|
|
5940
|
-
* If the diff computation is not finished or the model is missing, will return null.
|
|
5941
|
-
*/
|
|
5942
|
-
getDiffLineInformationForOriginal(lineNumber: number): IDiffLineInformation | null;
|
|
5943
|
-
/**
|
|
5944
|
-
* Get information based on computed diff about a line number from the modified model.
|
|
5945
|
-
* If the diff computation is not finished or the model is missing, will return null.
|
|
5946
|
-
*/
|
|
5947
|
-
getDiffLineInformationForModified(lineNumber: number): IDiffLineInformation | null;
|
|
5948
5980
|
/**
|
|
5949
5981
|
* Update the editor's options after the editor has been created.
|
|
5950
5982
|
*/
|
|
5951
5983
|
updateOptions(newOptions: IDiffEditorOptions): void;
|
|
5984
|
+
accessibleDiffViewerNext(): void;
|
|
5985
|
+
accessibleDiffViewerPrev(): void;
|
|
5952
5986
|
}
|
|
5953
5987
|
|
|
5954
5988
|
export class FontInfo extends BareFontInfo {
|
|
@@ -6045,7 +6079,7 @@ declare namespace monaco.languages {
|
|
|
6045
6079
|
|
|
6046
6080
|
/**
|
|
6047
6081
|
* An event emitted when a language is associated for the first time with a text model or
|
|
6048
|
-
*
|
|
6082
|
+
* when a language is encountered during the tokenization of another language.
|
|
6049
6083
|
* @event
|
|
6050
6084
|
*/
|
|
6051
6085
|
export function onLanguageEncountered(languageId: string, callback: () => void): IDisposable;
|
|
@@ -6920,6 +6954,8 @@ declare namespace monaco.languages {
|
|
|
6920
6954
|
readonly enableForwardStability?: boolean | undefined;
|
|
6921
6955
|
}
|
|
6922
6956
|
|
|
6957
|
+
export type InlineCompletionProviderGroupId = string;
|
|
6958
|
+
|
|
6923
6959
|
export interface InlineCompletionsProvider<T extends InlineCompletions = InlineCompletions> {
|
|
6924
6960
|
provideInlineCompletions(model: editor.ITextModel, position: Position, context: InlineCompletionContext, token: CancellationToken): ProviderResult<T>;
|
|
6925
6961
|
/**
|
|
@@ -6935,6 +6971,17 @@ declare namespace monaco.languages {
|
|
|
6935
6971
|
* Will be called when a completions list is no longer in use and can be garbage-collected.
|
|
6936
6972
|
*/
|
|
6937
6973
|
freeInlineCompletions(completions: T): void;
|
|
6974
|
+
/**
|
|
6975
|
+
* Only used for {@link yieldsToGroupIds}.
|
|
6976
|
+
* Multiple providers can have the same group id.
|
|
6977
|
+
*/
|
|
6978
|
+
groupId?: InlineCompletionProviderGroupId;
|
|
6979
|
+
/**
|
|
6980
|
+
* Returns a list of preferred provider {@link groupId}s.
|
|
6981
|
+
* The current provider is only requested for completions if no provider with a preferred group id returned a result.
|
|
6982
|
+
*/
|
|
6983
|
+
yieldsToGroupIds?: InlineCompletionProviderGroupId[];
|
|
6984
|
+
toString?(): string;
|
|
6938
6985
|
}
|
|
6939
6986
|
|
|
6940
6987
|
export interface CodeAction {
|
|
@@ -7306,10 +7353,6 @@ declare namespace monaco.languages {
|
|
|
7306
7353
|
* Prefer spaces over tabs.
|
|
7307
7354
|
*/
|
|
7308
7355
|
insertSpaces: boolean;
|
|
7309
|
-
/**
|
|
7310
|
-
* The list of multiple ranges to format at once, if the provider supports it.
|
|
7311
|
-
*/
|
|
7312
|
-
ranges?: Range[];
|
|
7313
7356
|
}
|
|
7314
7357
|
|
|
7315
7358
|
/**
|
|
@@ -7584,6 +7627,13 @@ declare namespace monaco.languages {
|
|
|
7584
7627
|
arguments?: any[];
|
|
7585
7628
|
}
|
|
7586
7629
|
|
|
7630
|
+
export interface PendingCommentThread {
|
|
7631
|
+
body: string;
|
|
7632
|
+
range: IRange;
|
|
7633
|
+
uri: Uri;
|
|
7634
|
+
owner: string;
|
|
7635
|
+
}
|
|
7636
|
+
|
|
7587
7637
|
export interface CodeLens {
|
|
7588
7638
|
range: IRange;
|
|
7589
7639
|
id?: string;
|
|
@@ -7668,6 +7718,31 @@ declare namespace monaco.languages {
|
|
|
7668
7718
|
provideDocumentRangeSemanticTokens(model: editor.ITextModel, range: Range, token: CancellationToken): ProviderResult<SemanticTokens>;
|
|
7669
7719
|
}
|
|
7670
7720
|
|
|
7721
|
+
export interface DocumentContextItem {
|
|
7722
|
+
readonly uri: Uri;
|
|
7723
|
+
readonly version: number;
|
|
7724
|
+
readonly ranges: IRange[];
|
|
7725
|
+
}
|
|
7726
|
+
|
|
7727
|
+
export interface MappedEditsContext {
|
|
7728
|
+
/** The outer array is sorted by priority - from highest to lowest. The inner arrays contain elements of the same priority. */
|
|
7729
|
+
documents: DocumentContextItem[][];
|
|
7730
|
+
}
|
|
7731
|
+
|
|
7732
|
+
export interface MappedEditsProvider {
|
|
7733
|
+
/**
|
|
7734
|
+
* Provider maps code blocks from the chat into a workspace edit.
|
|
7735
|
+
*
|
|
7736
|
+
* @param document The document to provide mapped edits for.
|
|
7737
|
+
* @param codeBlocks Code blocks that come from an LLM's reply.
|
|
7738
|
+
* "Insert at cursor" in the panel chat only sends one edit that the user clicks on, but inline chat can send multiple blocks and let the lang server decide what to do with them.
|
|
7739
|
+
* @param context The context for providing mapped edits.
|
|
7740
|
+
* @param token A cancellation token.
|
|
7741
|
+
* @returns A provider result of text edits.
|
|
7742
|
+
*/
|
|
7743
|
+
provideMappedEdits(document: editor.ITextModel, codeBlocks: string[], context: MappedEditsContext, token: CancellationToken): Promise<WorkspaceEdit | null>;
|
|
7744
|
+
}
|
|
7745
|
+
|
|
7671
7746
|
export interface ILanguageExtensionPoint {
|
|
7672
7747
|
id: string;
|
|
7673
7748
|
extensions?: string[];
|