mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 22:02:55 +01:00
deploy: ff3621a3fa
This commit is contained in:
parent
09ae9d1ee6
commit
4b2ad6cef2
1868 changed files with 41542 additions and 29565 deletions
483
node_modules/monaco-editor-core/monaco.d.ts
generated
vendored
483
node_modules/monaco-editor-core/monaco.d.ts
generated
vendored
|
|
@ -14,10 +14,45 @@ declare namespace monaco {
|
|||
export type Thenable<T> = PromiseLike<T>;
|
||||
|
||||
export interface Environment {
|
||||
/**
|
||||
* Define a global `monaco` symbol.
|
||||
* This is true by default in AMD and false by default in ESM.
|
||||
*/
|
||||
globalAPI?: boolean;
|
||||
/**
|
||||
* The base url where the editor sources are found (which contains the vs folder)
|
||||
*/
|
||||
baseUrl?: string;
|
||||
/**
|
||||
* A web worker factory.
|
||||
* NOTE: If `getWorker` is defined, `getWorkerUrl` is not invoked.
|
||||
*/
|
||||
getWorker?(workerId: string, label: string): Promise<Worker> | Worker;
|
||||
/**
|
||||
* Return the location for web worker scripts.
|
||||
* NOTE: If `getWorker` is defined, `getWorkerUrl` is not invoked.
|
||||
*/
|
||||
getWorkerUrl?(workerId: string, label: string): string;
|
||||
/**
|
||||
* Create a trusted types policy (same API as window.trustedTypes.createPolicy)
|
||||
*/
|
||||
createTrustedTypesPolicy(
|
||||
policyName: string,
|
||||
policyOptions?: ITrustedTypePolicyOptions,
|
||||
): undefined | ITrustedTypePolicy;
|
||||
}
|
||||
|
||||
export interface ITrustedTypePolicyOptions {
|
||||
createHTML?: (input: string, ...arguments: any[]) => string;
|
||||
createScript?: (input: string, ...arguments: any[]) => string;
|
||||
createScriptURL?: (input: string, ...arguments: any[]) => string;
|
||||
}
|
||||
|
||||
export interface ITrustedTypePolicy {
|
||||
readonly name: string;
|
||||
createHTML?(input: string): any;
|
||||
createScript?(input: string): any;
|
||||
createScriptURL?(input: string): any;
|
||||
}
|
||||
|
||||
export interface IDisposable {
|
||||
|
|
@ -174,13 +209,14 @@ declare namespace monaco {
|
|||
* @param path A file system path (see `Uri#fsPath`)
|
||||
*/
|
||||
static file(path: string): Uri;
|
||||
static from(components: {
|
||||
scheme: string;
|
||||
authority?: string;
|
||||
path?: string;
|
||||
query?: string;
|
||||
fragment?: string;
|
||||
}): Uri;
|
||||
/**
|
||||
* Creates new Uri from uri components.
|
||||
*
|
||||
* Unless `strict` is `true` the scheme is defaults to be `file`. This function performs
|
||||
* validation and should be used for untrusted uri components retrieved from storage,
|
||||
* user input, command arguments etc
|
||||
*/
|
||||
static from(components: UriComponents, strict?: boolean): Uri;
|
||||
/**
|
||||
* Join a Uri path with path fragments and normalizes the resulting path.
|
||||
*
|
||||
|
|
@ -202,6 +238,16 @@ declare namespace monaco {
|
|||
*/
|
||||
toString(skipEncoding?: boolean): string;
|
||||
toJSON(): UriComponents;
|
||||
/**
|
||||
* A helper function to revive URIs.
|
||||
*
|
||||
* **Note** that this function should only be used when receiving Uri#toJSON generated data
|
||||
* and that it doesn't do any validation. Use {@link Uri.from} when received "untrusted"
|
||||
* uri components such as command arguments or data from storage.
|
||||
*
|
||||
* @param data The Uri components or Uri to revive.
|
||||
* @returns The revived Uri or undefined or null.
|
||||
*/
|
||||
static revive(data: UriComponents | Uri): Uri;
|
||||
static revive(data: UriComponents | Uri | undefined): Uri | undefined;
|
||||
static revive(data: UriComponents | Uri | null): Uri | null;
|
||||
|
|
@ -210,10 +256,10 @@ declare namespace monaco {
|
|||
|
||||
export interface UriComponents {
|
||||
scheme: string;
|
||||
authority: string;
|
||||
path: string;
|
||||
query: string;
|
||||
fragment: string;
|
||||
authority?: string;
|
||||
path?: string;
|
||||
query?: string;
|
||||
fragment?: string;
|
||||
}
|
||||
/**
|
||||
* Virtual Key Codes, the value does not hold any inherent meaning.
|
||||
|
|
@ -303,116 +349,121 @@ declare namespace monaco {
|
|||
F17 = 75,
|
||||
F18 = 76,
|
||||
F19 = 77,
|
||||
NumLock = 78,
|
||||
ScrollLock = 79,
|
||||
F20 = 78,
|
||||
F21 = 79,
|
||||
F22 = 80,
|
||||
F23 = 81,
|
||||
F24 = 82,
|
||||
NumLock = 83,
|
||||
ScrollLock = 84,
|
||||
/**
|
||||
* Used for miscellaneous characters; it can vary by keyboard.
|
||||
* For the US standard keyboard, the ';:' key
|
||||
*/
|
||||
Semicolon = 80,
|
||||
Semicolon = 85,
|
||||
/**
|
||||
* For any country/region, the '+' key
|
||||
* For the US standard keyboard, the '=+' key
|
||||
*/
|
||||
Equal = 81,
|
||||
Equal = 86,
|
||||
/**
|
||||
* For any country/region, the ',' key
|
||||
* For the US standard keyboard, the ',<' key
|
||||
*/
|
||||
Comma = 82,
|
||||
Comma = 87,
|
||||
/**
|
||||
* For any country/region, the '-' key
|
||||
* For the US standard keyboard, the '-_' key
|
||||
*/
|
||||
Minus = 83,
|
||||
Minus = 88,
|
||||
/**
|
||||
* For any country/region, the '.' key
|
||||
* For the US standard keyboard, the '.>' key
|
||||
*/
|
||||
Period = 84,
|
||||
Period = 89,
|
||||
/**
|
||||
* Used for miscellaneous characters; it can vary by keyboard.
|
||||
* For the US standard keyboard, the '/?' key
|
||||
*/
|
||||
Slash = 85,
|
||||
Slash = 90,
|
||||
/**
|
||||
* Used for miscellaneous characters; it can vary by keyboard.
|
||||
* For the US standard keyboard, the '`~' key
|
||||
*/
|
||||
Backquote = 86,
|
||||
Backquote = 91,
|
||||
/**
|
||||
* Used for miscellaneous characters; it can vary by keyboard.
|
||||
* For the US standard keyboard, the '[{' key
|
||||
*/
|
||||
BracketLeft = 87,
|
||||
BracketLeft = 92,
|
||||
/**
|
||||
* Used for miscellaneous characters; it can vary by keyboard.
|
||||
* For the US standard keyboard, the '\|' key
|
||||
*/
|
||||
Backslash = 88,
|
||||
Backslash = 93,
|
||||
/**
|
||||
* Used for miscellaneous characters; it can vary by keyboard.
|
||||
* For the US standard keyboard, the ']}' key
|
||||
*/
|
||||
BracketRight = 89,
|
||||
BracketRight = 94,
|
||||
/**
|
||||
* Used for miscellaneous characters; it can vary by keyboard.
|
||||
* For the US standard keyboard, the ''"' key
|
||||
*/
|
||||
Quote = 90,
|
||||
Quote = 95,
|
||||
/**
|
||||
* Used for miscellaneous characters; it can vary by keyboard.
|
||||
*/
|
||||
OEM_8 = 91,
|
||||
OEM_8 = 96,
|
||||
/**
|
||||
* Either the angle bracket key or the backslash key on the RT 102-key keyboard.
|
||||
*/
|
||||
IntlBackslash = 92,
|
||||
Numpad0 = 93,
|
||||
Numpad1 = 94,
|
||||
Numpad2 = 95,
|
||||
Numpad3 = 96,
|
||||
Numpad4 = 97,
|
||||
Numpad5 = 98,
|
||||
Numpad6 = 99,
|
||||
Numpad7 = 100,
|
||||
Numpad8 = 101,
|
||||
Numpad9 = 102,
|
||||
NumpadMultiply = 103,
|
||||
NumpadAdd = 104,
|
||||
NUMPAD_SEPARATOR = 105,
|
||||
NumpadSubtract = 106,
|
||||
NumpadDecimal = 107,
|
||||
NumpadDivide = 108,
|
||||
IntlBackslash = 97,
|
||||
Numpad0 = 98,
|
||||
Numpad1 = 99,
|
||||
Numpad2 = 100,
|
||||
Numpad3 = 101,
|
||||
Numpad4 = 102,
|
||||
Numpad5 = 103,
|
||||
Numpad6 = 104,
|
||||
Numpad7 = 105,
|
||||
Numpad8 = 106,
|
||||
Numpad9 = 107,
|
||||
NumpadMultiply = 108,
|
||||
NumpadAdd = 109,
|
||||
NUMPAD_SEPARATOR = 110,
|
||||
NumpadSubtract = 111,
|
||||
NumpadDecimal = 112,
|
||||
NumpadDivide = 113,
|
||||
/**
|
||||
* Cover all key codes when IME is processing input.
|
||||
*/
|
||||
KEY_IN_COMPOSITION = 109,
|
||||
ABNT_C1 = 110,
|
||||
ABNT_C2 = 111,
|
||||
AudioVolumeMute = 112,
|
||||
AudioVolumeUp = 113,
|
||||
AudioVolumeDown = 114,
|
||||
BrowserSearch = 115,
|
||||
BrowserHome = 116,
|
||||
BrowserBack = 117,
|
||||
BrowserForward = 118,
|
||||
MediaTrackNext = 119,
|
||||
MediaTrackPrevious = 120,
|
||||
MediaStop = 121,
|
||||
MediaPlayPause = 122,
|
||||
LaunchMediaPlayer = 123,
|
||||
LaunchMail = 124,
|
||||
LaunchApp2 = 125,
|
||||
KEY_IN_COMPOSITION = 114,
|
||||
ABNT_C1 = 115,
|
||||
ABNT_C2 = 116,
|
||||
AudioVolumeMute = 117,
|
||||
AudioVolumeUp = 118,
|
||||
AudioVolumeDown = 119,
|
||||
BrowserSearch = 120,
|
||||
BrowserHome = 121,
|
||||
BrowserBack = 122,
|
||||
BrowserForward = 123,
|
||||
MediaTrackNext = 124,
|
||||
MediaTrackPrevious = 125,
|
||||
MediaStop = 126,
|
||||
MediaPlayPause = 127,
|
||||
LaunchMediaPlayer = 128,
|
||||
LaunchMail = 129,
|
||||
LaunchApp2 = 130,
|
||||
/**
|
||||
* VK_CLEAR, 0x0C, CLEAR key
|
||||
*/
|
||||
Clear = 126,
|
||||
Clear = 131,
|
||||
/**
|
||||
* Placed last to cover the length of the enum.
|
||||
* Please do not depend on this value!
|
||||
*/
|
||||
MAX_VALUE = 127
|
||||
MAX_VALUE = 132
|
||||
}
|
||||
export class KeyMod {
|
||||
static readonly CtrlCmd: number;
|
||||
|
|
@ -1109,6 +1160,31 @@ declare namespace monaco.editor {
|
|||
*/
|
||||
export function registerLinkOpener(opener: ILinkOpener): IDisposable;
|
||||
|
||||
/**
|
||||
* Represents an object that can handle editor open operations (e.g. when "go to definition" is called
|
||||
* with a resource other than the current model).
|
||||
*/
|
||||
export interface ICodeEditorOpener {
|
||||
/**
|
||||
* Callback that is invoked when a resource other than the current model should be opened (e.g. when "go to definition" is called).
|
||||
* The callback should return `true` if the request was handled and `false` otherwise.
|
||||
* @param source The code editor instance that initiated the request.
|
||||
* @param resource The Uri of the resource that should be opened.
|
||||
* @param selectionOrPosition An optional position or selection inside the model corresponding to `resource` that can be used to set the cursor.
|
||||
*/
|
||||
openCodeEditor(source: ICodeEditor, resource: Uri, selectionOrPosition?: IRange | IPosition): boolean | Promise<boolean>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers a handler that is called when a resource other than the current model should be opened in the editor (e.g. "go to definition").
|
||||
* The handler callback should return `true` if the request was handled and `false` otherwise.
|
||||
*
|
||||
* Returns a disposable that can unregister the opener again.
|
||||
*
|
||||
* If no handler is registered the default behavior is to do nothing for models other than the currently attached one.
|
||||
*/
|
||||
export function registerEditorOpener(opener: ICodeEditorOpener): IDisposable;
|
||||
|
||||
export type BuiltinTheme = 'vs' | 'vs-dark' | 'hc-black' | 'hc-light';
|
||||
|
||||
export interface IStandaloneThemeData {
|
||||
|
|
@ -1504,6 +1580,14 @@ declare namespace monaco.editor {
|
|||
Full = 7
|
||||
}
|
||||
|
||||
/**
|
||||
* Vertical Lane in the glyph margin of the editor.
|
||||
*/
|
||||
export enum GlyphMarginLane {
|
||||
Left = 1,
|
||||
Right = 2
|
||||
}
|
||||
|
||||
/**
|
||||
* Position in the minimap to render the decoration.
|
||||
*/
|
||||
|
|
@ -1525,6 +1609,13 @@ declare namespace monaco.editor {
|
|||
darkColor?: string | ThemeColor;
|
||||
}
|
||||
|
||||
export interface IModelDecorationGlyphMarginOptions {
|
||||
/**
|
||||
* The position in the glyph margin.
|
||||
*/
|
||||
position: GlyphMarginLane;
|
||||
}
|
||||
|
||||
/**
|
||||
* Options for rendering a model decoration in the overview ruler.
|
||||
*/
|
||||
|
|
@ -1536,11 +1627,11 @@ declare namespace monaco.editor {
|
|||
}
|
||||
|
||||
/**
|
||||
* Options for rendering a model decoration in the overview ruler.
|
||||
* Options for rendering a model decoration in the minimap.
|
||||
*/
|
||||
export interface IModelDecorationMinimapOptions extends IDecorationOptions {
|
||||
/**
|
||||
* The position in the overview ruler.
|
||||
* The position in the minimap.
|
||||
*/
|
||||
position: MinimapPosition;
|
||||
}
|
||||
|
|
@ -1600,6 +1691,11 @@ declare namespace monaco.editor {
|
|||
* If set, the decoration will be rendered in the glyph margin with this CSS class name.
|
||||
*/
|
||||
glyphMarginClassName?: string | null;
|
||||
/**
|
||||
* If set and the decoration has {@link glyphMarginClassName} set, render this decoration
|
||||
* with the specified {@link IModelDecorationGlyphMarginOptions} in the glyph margin.
|
||||
*/
|
||||
glyphMargin?: IModelDecorationGlyphMarginOptions | null;
|
||||
/**
|
||||
* If set, the decoration will be rendered in the lines decorations with this CSS class name.
|
||||
*/
|
||||
|
|
@ -2095,15 +2191,22 @@ declare namespace monaco.editor {
|
|||
* @param range The range to search in
|
||||
* @param ownerId If set, it will ignore decorations belonging to other owners.
|
||||
* @param filterOutValidation If set, it will ignore decorations specific to validation (i.e. warnings, errors).
|
||||
* @param onlyMinimapDecorations If set, it will return only decorations that render in the minimap.
|
||||
* @param onlyMarginDecorations If set, it will return only decorations that render in the glyph margin.
|
||||
* @return An array with the decorations
|
||||
*/
|
||||
getDecorationsInRange(range: IRange, ownerId?: number, filterOutValidation?: boolean, onlyMinimapDecorations?: boolean): IModelDecoration[];
|
||||
getDecorationsInRange(range: IRange, ownerId?: number, filterOutValidation?: boolean, onlyMinimapDecorations?: boolean, onlyMarginDecorations?: boolean): IModelDecoration[];
|
||||
/**
|
||||
* Gets all the decorations as an array.
|
||||
* @param ownerId If set, it will ignore decorations belonging to other owners.
|
||||
* @param filterOutValidation If set, it will ignore decorations specific to validation (i.e. warnings, errors).
|
||||
*/
|
||||
getAllDecorations(ownerId?: number, filterOutValidation?: boolean): IModelDecoration[];
|
||||
/**
|
||||
* Gets all decorations that render in the glyph margin as an array.
|
||||
* @param ownerId If set, it will ignore decorations belonging to other owners.
|
||||
*/
|
||||
getAllMarginDecorations(ownerId?: number): IModelDecoration[];
|
||||
/**
|
||||
* Gets all the decorations that should be rendered in the overview ruler as an array.
|
||||
* @param ownerId If set, it will ignore decorations belonging to other owners.
|
||||
|
|
@ -2280,7 +2383,7 @@ declare namespace monaco.editor {
|
|||
*/
|
||||
export interface IDocumentDiffProviderOptions {
|
||||
/**
|
||||
* When set to true, the diff should ignore whitespace changes.i
|
||||
* When set to true, the diff should ignore whitespace changes.
|
||||
*/
|
||||
ignoreTrimWhitespace: boolean;
|
||||
/**
|
||||
|
|
@ -2306,10 +2409,22 @@ declare namespace monaco.editor {
|
|||
*/
|
||||
readonly changes: LineRangeMapping[];
|
||||
}
|
||||
|
||||
/**
|
||||
* A range of lines (1-based).
|
||||
*/
|
||||
export class LineRange {
|
||||
static fromRange(range: Range): LineRange;
|
||||
/**
|
||||
* @param lineRanges An array of sorted line ranges.
|
||||
*/
|
||||
static joinMany(lineRanges: readonly (readonly LineRange[])[]): readonly LineRange[];
|
||||
/**
|
||||
* @param lineRanges1 Must be sorted.
|
||||
* @param lineRanges2 Must be sorted.
|
||||
*/
|
||||
static join(lineRanges1: readonly LineRange[], lineRanges2: readonly LineRange[]): readonly LineRange[];
|
||||
static ofLength(startLineNumber: number, length: number): LineRange;
|
||||
/**
|
||||
* The start line number.
|
||||
*/
|
||||
|
|
@ -2345,13 +2460,18 @@ declare namespace monaco.editor {
|
|||
* If the ranges don't even touch, the result is undefined.
|
||||
*/
|
||||
intersect(other: LineRange): LineRange | undefined;
|
||||
intersectsStrict(other: LineRange): boolean;
|
||||
overlapOrTouch(other: LineRange): boolean;
|
||||
equals(b: LineRange): boolean;
|
||||
toInclusiveRange(): Range | null;
|
||||
toExclusiveRange(): Range;
|
||||
}
|
||||
|
||||
/**
|
||||
* Maps a line range in the original text model to a line range in the modified text model.
|
||||
*/
|
||||
export class LineRangeMapping {
|
||||
static inverse(mapping: LineRangeMapping[], originalLineCount: number, modifiedLineCount: number): LineRangeMapping[];
|
||||
/**
|
||||
* The line range in the original text model.
|
||||
*/
|
||||
|
|
@ -2369,6 +2489,7 @@ declare namespace monaco.editor {
|
|||
readonly innerChanges: RangeMapping[] | undefined;
|
||||
constructor(originalRange: LineRange, modifiedRange: LineRange, innerChanges: RangeMapping[] | undefined);
|
||||
toString(): string;
|
||||
get changedLineCount(): any;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -2795,7 +2916,7 @@ declare namespace monaco.editor {
|
|||
/**
|
||||
* Replace all previous decorations with `newDecorations`.
|
||||
*/
|
||||
set(newDecorations: IModelDeltaDecoration[]): void;
|
||||
set(newDecorations: readonly IModelDeltaDecoration[]): string[];
|
||||
/**
|
||||
* Remove all previous decorations.
|
||||
*/
|
||||
|
|
@ -2909,6 +3030,7 @@ declare namespace monaco.editor {
|
|||
export interface IModelDecorationsChangedEvent {
|
||||
readonly affectsMinimap: boolean;
|
||||
readonly affectsOverviewRuler: boolean;
|
||||
readonly affectsGlyphMargin: boolean;
|
||||
}
|
||||
|
||||
export interface IModelOptionsChangedEvent {
|
||||
|
|
@ -3238,6 +3360,10 @@ declare namespace monaco.editor {
|
|||
* Defaults to false.
|
||||
*/
|
||||
fontVariations?: boolean | string;
|
||||
/**
|
||||
* Controls whether to use default color decorations or not using the default document color provider
|
||||
*/
|
||||
defaultColorDecorators?: boolean;
|
||||
/**
|
||||
* Disable the use of `transform: translate3d(0px, 0px, 0px)` for the editor margin and lines layers.
|
||||
* The usage of `transform: translate3d(0px, 0px, 0px)` acts as a hint for browsers to create an extra layer.
|
||||
|
|
@ -3697,6 +3823,10 @@ declare namespace monaco.editor {
|
|||
* When enabled, this shows a preview of the drop location and triggers an `onDropIntoEditor` event.
|
||||
*/
|
||||
dropIntoEditor?: IDropIntoEditorOptions;
|
||||
/**
|
||||
* Controls support for changing how content is pasted into the editor.
|
||||
*/
|
||||
pasteAs?: IPasteAsOptions;
|
||||
/**
|
||||
* Controls whether the editor receives tabs or defers them to the workbench for navigation.
|
||||
*/
|
||||
|
|
@ -3709,6 +3839,12 @@ declare namespace monaco.editor {
|
|||
* Defaults to true.
|
||||
*/
|
||||
enableSplitViewResizing?: boolean;
|
||||
/**
|
||||
* The default ratio when rendering side-by-side editors.
|
||||
* Must be a number between 0 and 1, min sizes apply.
|
||||
* Defaults to 0.5
|
||||
*/
|
||||
splitViewDefaultRatio?: number;
|
||||
/**
|
||||
* Render the differences in two side-by-side editors.
|
||||
* Defaults to true.
|
||||
|
|
@ -3761,13 +3897,28 @@ declare namespace monaco.editor {
|
|||
/**
|
||||
* Diff Algorithm
|
||||
*/
|
||||
diffAlgorithm?: 'smart' | 'experimental' | IDocumentDiffProvider;
|
||||
diffAlgorithm?: 'legacy' | 'advanced' | IDocumentDiffProvider;
|
||||
/**
|
||||
* Whether the diff editor aria label should be verbose.
|
||||
*/
|
||||
accessibilityVerbose?: boolean;
|
||||
experimental?: {
|
||||
/**
|
||||
* Defaults to false.
|
||||
*/
|
||||
collapseUnchangedRegions?: boolean;
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Configuration options for the diff editor.
|
||||
*/
|
||||
export interface IDiffEditorOptions extends IEditorOptions, IDiffEditorBaseOptions {
|
||||
/**
|
||||
* Is the diff editor inside another editor
|
||||
* Defaults to false
|
||||
*/
|
||||
isInEmbeddedEditor?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -3992,6 +4143,10 @@ declare namespace monaco.editor {
|
|||
* The width of the glyph margin.
|
||||
*/
|
||||
readonly glyphMarginWidth: number;
|
||||
/**
|
||||
* The number of decoration lanes to render in the glyph margin.
|
||||
*/
|
||||
readonly glyphMarginDecorationLaneCount: number;
|
||||
/**
|
||||
* Left position for the line numbers.
|
||||
*/
|
||||
|
|
@ -4366,6 +4521,10 @@ declare namespace monaco.editor {
|
|||
mode?: 'prefix' | 'subword' | 'subwordSmart';
|
||||
showToolbar?: 'always' | 'onHover';
|
||||
suppressSuggestions?: boolean;
|
||||
/**
|
||||
* Does not clear active inline suggestions when the editor loses focus.
|
||||
*/
|
||||
keepOnBlur?: boolean;
|
||||
}
|
||||
|
||||
export interface IBracketPairColorizationOptions {
|
||||
|
|
@ -4611,10 +4770,31 @@ declare namespace monaco.editor {
|
|||
*/
|
||||
export interface IDropIntoEditorOptions {
|
||||
/**
|
||||
* Enable the dropping into editor.
|
||||
* Enable dropping into editor.
|
||||
* Defaults to true.
|
||||
*/
|
||||
enabled?: boolean;
|
||||
/**
|
||||
* Controls if a widget is shown after a drop.
|
||||
* Defaults to 'afterDrop'.
|
||||
*/
|
||||
showDropSelector?: 'afterDrop' | 'never';
|
||||
}
|
||||
|
||||
/**
|
||||
* Configuration options for editor pasting as into behavior
|
||||
*/
|
||||
export interface IPasteAsOptions {
|
||||
/**
|
||||
* Enable paste as functionality in editors.
|
||||
* Defaults to true.
|
||||
*/
|
||||
enabled?: boolean;
|
||||
/**
|
||||
* Controls if a widget is shown after a drop.
|
||||
* Defaults to 'afterPaste'.
|
||||
*/
|
||||
showPasteSelector?: 'afterPaste' | 'never';
|
||||
}
|
||||
|
||||
export enum EditorOption {
|
||||
|
|
@ -4700,65 +4880,67 @@ declare namespace monaco.editor {
|
|||
overviewRulerBorder = 79,
|
||||
overviewRulerLanes = 80,
|
||||
padding = 81,
|
||||
parameterHints = 82,
|
||||
peekWidgetDefaultFocus = 83,
|
||||
definitionLinkOpensInPeek = 84,
|
||||
quickSuggestions = 85,
|
||||
quickSuggestionsDelay = 86,
|
||||
readOnly = 87,
|
||||
renameOnType = 88,
|
||||
renderControlCharacters = 89,
|
||||
renderFinalNewline = 90,
|
||||
renderLineHighlight = 91,
|
||||
renderLineHighlightOnlyWhenFocus = 92,
|
||||
renderValidationDecorations = 93,
|
||||
renderWhitespace = 94,
|
||||
revealHorizontalRightPadding = 95,
|
||||
roundedSelection = 96,
|
||||
rulers = 97,
|
||||
scrollbar = 98,
|
||||
scrollBeyondLastColumn = 99,
|
||||
scrollBeyondLastLine = 100,
|
||||
scrollPredominantAxis = 101,
|
||||
selectionClipboard = 102,
|
||||
selectionHighlight = 103,
|
||||
selectOnLineNumbers = 104,
|
||||
showFoldingControls = 105,
|
||||
showUnused = 106,
|
||||
snippetSuggestions = 107,
|
||||
smartSelect = 108,
|
||||
smoothScrolling = 109,
|
||||
stickyScroll = 110,
|
||||
stickyTabStops = 111,
|
||||
stopRenderingLineAfter = 112,
|
||||
suggest = 113,
|
||||
suggestFontSize = 114,
|
||||
suggestLineHeight = 115,
|
||||
suggestOnTriggerCharacters = 116,
|
||||
suggestSelection = 117,
|
||||
tabCompletion = 118,
|
||||
tabIndex = 119,
|
||||
unicodeHighlighting = 120,
|
||||
unusualLineTerminators = 121,
|
||||
useShadowDOM = 122,
|
||||
useTabStops = 123,
|
||||
wordBreak = 124,
|
||||
wordSeparators = 125,
|
||||
wordWrap = 126,
|
||||
wordWrapBreakAfterCharacters = 127,
|
||||
wordWrapBreakBeforeCharacters = 128,
|
||||
wordWrapColumn = 129,
|
||||
wordWrapOverride1 = 130,
|
||||
wordWrapOverride2 = 131,
|
||||
wrappingIndent = 132,
|
||||
wrappingStrategy = 133,
|
||||
showDeprecated = 134,
|
||||
inlayHints = 135,
|
||||
editorClassName = 136,
|
||||
pixelRatio = 137,
|
||||
tabFocusMode = 138,
|
||||
layoutInfo = 139,
|
||||
wrappingInfo = 140
|
||||
pasteAs = 82,
|
||||
parameterHints = 83,
|
||||
peekWidgetDefaultFocus = 84,
|
||||
definitionLinkOpensInPeek = 85,
|
||||
quickSuggestions = 86,
|
||||
quickSuggestionsDelay = 87,
|
||||
readOnly = 88,
|
||||
renameOnType = 89,
|
||||
renderControlCharacters = 90,
|
||||
renderFinalNewline = 91,
|
||||
renderLineHighlight = 92,
|
||||
renderLineHighlightOnlyWhenFocus = 93,
|
||||
renderValidationDecorations = 94,
|
||||
renderWhitespace = 95,
|
||||
revealHorizontalRightPadding = 96,
|
||||
roundedSelection = 97,
|
||||
rulers = 98,
|
||||
scrollbar = 99,
|
||||
scrollBeyondLastColumn = 100,
|
||||
scrollBeyondLastLine = 101,
|
||||
scrollPredominantAxis = 102,
|
||||
selectionClipboard = 103,
|
||||
selectionHighlight = 104,
|
||||
selectOnLineNumbers = 105,
|
||||
showFoldingControls = 106,
|
||||
showUnused = 107,
|
||||
snippetSuggestions = 108,
|
||||
smartSelect = 109,
|
||||
smoothScrolling = 110,
|
||||
stickyScroll = 111,
|
||||
stickyTabStops = 112,
|
||||
stopRenderingLineAfter = 113,
|
||||
suggest = 114,
|
||||
suggestFontSize = 115,
|
||||
suggestLineHeight = 116,
|
||||
suggestOnTriggerCharacters = 117,
|
||||
suggestSelection = 118,
|
||||
tabCompletion = 119,
|
||||
tabIndex = 120,
|
||||
unicodeHighlighting = 121,
|
||||
unusualLineTerminators = 122,
|
||||
useShadowDOM = 123,
|
||||
useTabStops = 124,
|
||||
wordBreak = 125,
|
||||
wordSeparators = 126,
|
||||
wordWrap = 127,
|
||||
wordWrapBreakAfterCharacters = 128,
|
||||
wordWrapBreakBeforeCharacters = 129,
|
||||
wordWrapColumn = 130,
|
||||
wordWrapOverride1 = 131,
|
||||
wordWrapOverride2 = 132,
|
||||
wrappingIndent = 133,
|
||||
wrappingStrategy = 134,
|
||||
showDeprecated = 135,
|
||||
inlayHints = 136,
|
||||
editorClassName = 137,
|
||||
pixelRatio = 138,
|
||||
tabFocusMode = 139,
|
||||
layoutInfo = 140,
|
||||
wrappingInfo = 141,
|
||||
defaultColorDecorators = 142
|
||||
}
|
||||
|
||||
export const EditorOptions: {
|
||||
|
|
@ -4845,6 +5027,7 @@ declare namespace monaco.editor {
|
|||
overviewRulerBorder: IEditorOption<EditorOption.overviewRulerBorder, boolean>;
|
||||
overviewRulerLanes: IEditorOption<EditorOption.overviewRulerLanes, number>;
|
||||
padding: IEditorOption<EditorOption.padding, Readonly<Required<IEditorPaddingOptions>>>;
|
||||
pasteAs: IEditorOption<EditorOption.pasteAs, Readonly<Required<IPasteAsOptions>>>;
|
||||
parameterHints: IEditorOption<EditorOption.parameterHints, Readonly<Required<IEditorParameterHintOptions>>>;
|
||||
peekWidgetDefaultFocus: IEditorOption<EditorOption.peekWidgetDefaultFocus, 'tree' | 'editor'>;
|
||||
definitionLinkOpensInPeek: IEditorOption<EditorOption.definitionLinkOpensInPeek, boolean>;
|
||||
|
|
@ -4897,6 +5080,7 @@ declare namespace monaco.editor {
|
|||
wordWrapOverride1: IEditorOption<EditorOption.wordWrapOverride1, 'on' | 'off' | 'inherit'>;
|
||||
wordWrapOverride2: IEditorOption<EditorOption.wordWrapOverride2, 'on' | 'off' | 'inherit'>;
|
||||
editorClassName: IEditorOption<EditorOption.editorClassName, string>;
|
||||
defaultColorDecorators: IEditorOption<EditorOption.defaultColorDecorators, boolean>;
|
||||
pixelRatio: IEditorOption<EditorOption.pixelRatio, number>;
|
||||
tabFocusMode: IEditorOption<EditorOption.tabFocusMode, boolean>;
|
||||
layoutInfo: IEditorOption<EditorOption.layoutInfo, EditorLayoutInfo>;
|
||||
|
|
@ -4947,6 +5131,15 @@ declare namespace monaco.editor {
|
|||
* If the `afterColumn` has multiple view columns, the affinity specifies which one to use. Defaults to `none`.
|
||||
*/
|
||||
afterColumnAffinity?: PositionAffinity;
|
||||
/**
|
||||
* Render the zone even when its line is hidden.
|
||||
*/
|
||||
showInHiddenAreas?: boolean;
|
||||
/**
|
||||
* Tiebreaker that is used when multiple view zones want to be after the same line.
|
||||
* Defaults to `afterColumn` otherwise 10000;
|
||||
*/
|
||||
ordinal?: number;
|
||||
/**
|
||||
* Suppress mouse down events.
|
||||
* If set, the editor will attach a mouse down listener to the view zone and .preventDefault on it.
|
||||
|
|
@ -5366,11 +5559,6 @@ declare namespace monaco.editor {
|
|||
* Aria label for modified editor.
|
||||
*/
|
||||
modifiedAriaLabel?: string;
|
||||
/**
|
||||
* Is the diff editor inside another editor
|
||||
* Defaults to false
|
||||
*/
|
||||
isInEmbeddedEditor?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -5609,6 +5797,10 @@ declare namespace monaco.editor {
|
|||
* Change the scroll position of the editor's viewport.
|
||||
*/
|
||||
setScrollPosition(position: INewScrollPosition, scrollType?: ScrollType): void;
|
||||
/**
|
||||
* Check if the editor is currently scrolling towards a different scroll position.
|
||||
*/
|
||||
hasPendingScrollAnimation(): boolean;
|
||||
/**
|
||||
* Get an action that is a contribution to this editor.
|
||||
* @id Unique identifier of the contribution.
|
||||
|
|
@ -5903,6 +6095,10 @@ declare namespace monaco.languages {
|
|||
*/
|
||||
readonly hasAccessToAllModels?: boolean;
|
||||
readonly exclusive?: boolean;
|
||||
/**
|
||||
* This provider comes from a builtin extension.
|
||||
*/
|
||||
readonly isBuiltin?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -6742,11 +6938,13 @@ declare namespace monaco.languages {
|
|||
readonly selectedSuggestionInfo: SelectedSuggestionInfo | undefined;
|
||||
}
|
||||
|
||||
export interface SelectedSuggestionInfo {
|
||||
range: IRange;
|
||||
text: string;
|
||||
isSnippetText: boolean;
|
||||
completionKind: CompletionItemKind;
|
||||
export class SelectedSuggestionInfo {
|
||||
readonly range: IRange;
|
||||
readonly text: string;
|
||||
readonly completionKind: CompletionItemKind;
|
||||
readonly isSnippetText: boolean;
|
||||
constructor(range: IRange, text: string, completionKind: CompletionItemKind, isSnippetText: boolean);
|
||||
equals(other: SelectedSuggestionInfo): boolean;
|
||||
}
|
||||
|
||||
export interface InlineCompletion {
|
||||
|
|
@ -6791,14 +6989,20 @@ declare namespace monaco.languages {
|
|||
* A list of commands associated with the inline completions of this list.
|
||||
*/
|
||||
readonly commands?: Command[];
|
||||
readonly suppressSuggestions?: boolean | undefined;
|
||||
/**
|
||||
* When set and the user types a suggestion without derivating from it, the inline suggestion is not updated.
|
||||
*/
|
||||
readonly enableForwardStability?: boolean | undefined;
|
||||
}
|
||||
|
||||
export interface InlineCompletionsProvider<T extends InlineCompletions = InlineCompletions> {
|
||||
provideInlineCompletions(model: editor.ITextModel, position: Position, context: InlineCompletionContext, token: CancellationToken): ProviderResult<T>;
|
||||
/**
|
||||
* Will be called when an item is shown.
|
||||
* @param updatedInsertText Is useful to understand bracket completion.
|
||||
*/
|
||||
handleItemDidShow?(completions: T, item: T['items'][number]): void;
|
||||
handleItemDidShow?(completions: T, item: T['items'][number], updatedInsertText: string): void;
|
||||
/**
|
||||
* Will be called when an item is partially accepted.
|
||||
*/
|
||||
|
|
@ -7202,7 +7406,6 @@ declare namespace monaco.languages {
|
|||
*/
|
||||
export interface DocumentRangeFormattingEditProvider {
|
||||
readonly displayName?: string;
|
||||
readonly canFormatMultipleRanges: boolean;
|
||||
/**
|
||||
* Provide formatting edits for a range in a document.
|
||||
*
|
||||
|
|
@ -7211,6 +7414,7 @@ declare namespace monaco.languages {
|
|||
* of the range to full syntax nodes.
|
||||
*/
|
||||
provideDocumentRangeFormattingEdits(model: editor.ITextModel, range: Range, options: FormattingOptions, token: CancellationToken): ProviderResult<TextEdit[]>;
|
||||
provideDocumentRangesFormattingEdits?(model: editor.ITextModel, ranges: Range[], options: FormattingOptions, token: CancellationToken): ProviderResult<TextEdit[]>;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -7413,7 +7617,6 @@ declare namespace monaco.languages {
|
|||
folder?: boolean;
|
||||
skipTrashBin?: boolean;
|
||||
maxSize?: number;
|
||||
contentsBase64?: string;
|
||||
}
|
||||
|
||||
export interface IWorkspaceFileEdit {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue