mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 15:05:39 +01:00
update dependencies, changelog
This commit is contained in:
parent
8f3204478a
commit
6dc4fba5de
5 changed files with 251 additions and 37 deletions
114
monaco.d.ts
vendored
114
monaco.d.ts
vendored
|
|
@ -1,6 +1,6 @@
|
|||
/*!-----------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Type definitions for monaco-editor v0.12.0
|
||||
* Type definitions for monaco-editor v0.13.0
|
||||
* Released under the MIT license
|
||||
*-----------------------------------------------------------*/
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
|
|
@ -1198,6 +1198,11 @@ declare namespace monaco.editor {
|
|||
* Should the decoration expand to encompass a whole line.
|
||||
*/
|
||||
isWholeLine?: boolean;
|
||||
/**
|
||||
* Specifies the stack order of a decoration.
|
||||
* A decoration with greater stack order is always in front of a decoration with a lower stack order.
|
||||
*/
|
||||
zIndex?: number;
|
||||
/**
|
||||
* If set, render this decoration in the overview ruler.
|
||||
*/
|
||||
|
|
@ -1220,6 +1225,10 @@ declare namespace monaco.editor {
|
|||
* to have a background color decoration.
|
||||
*/
|
||||
inlineClassName?: string;
|
||||
/**
|
||||
* If there is an `inlineClassName` which affects letter spacing.
|
||||
*/
|
||||
inlineClassNameAffectsLetterSpacing?: boolean;
|
||||
/**
|
||||
* If set, the decoration will be rendered before the text with this CSS class name.
|
||||
*/
|
||||
|
|
@ -1488,6 +1497,10 @@ declare namespace monaco.editor {
|
|||
* Get the text for a certain line.
|
||||
*/
|
||||
getLineContent(lineNumber: number): string;
|
||||
/**
|
||||
* Get the text length for a certain line.
|
||||
*/
|
||||
getLineLength(lineNumber: number): number;
|
||||
/**
|
||||
* Get the text for all lines.
|
||||
*/
|
||||
|
|
@ -2196,6 +2209,10 @@ declare namespace monaco.editor {
|
|||
* The range that got replaced.
|
||||
*/
|
||||
readonly range: IRange;
|
||||
/**
|
||||
* The offset of the range that got replaced.
|
||||
*/
|
||||
readonly rangeOffset: number;
|
||||
/**
|
||||
* The length of the range that got replaced.
|
||||
*/
|
||||
|
|
@ -2459,6 +2476,13 @@ declare namespace monaco.editor {
|
|||
enabled?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* Configuration map for codeActionsOnSave
|
||||
*/
|
||||
export interface ICodeActionsOnSaveOptions {
|
||||
[kind: string]: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* Configuration options for the editor.
|
||||
*/
|
||||
|
|
@ -2693,6 +2717,11 @@ declare namespace monaco.editor {
|
|||
* Defaults to 'alt'
|
||||
*/
|
||||
multiCursorModifier?: 'ctrlCmd' | 'alt';
|
||||
/**
|
||||
* Merge overlapping selections.
|
||||
* Defaults to true
|
||||
*/
|
||||
multiCursorMergeOverlapping?: boolean;
|
||||
/**
|
||||
* Configure the editor's accessibility support.
|
||||
* Defaults to 'auto'. It is best to leave this to 'auto'.
|
||||
|
|
@ -2806,6 +2835,14 @@ declare namespace monaco.editor {
|
|||
* Control the behavior and rendering of the code action lightbulb.
|
||||
*/
|
||||
lightbulb?: IEditorLightbulbOptions;
|
||||
/**
|
||||
* Code action kinds to be run on save.
|
||||
*/
|
||||
codeActionsOnSave?: ICodeActionsOnSaveOptions;
|
||||
/**
|
||||
* Timeout for running code actions on save.
|
||||
*/
|
||||
codeActionsOnSaveTimeout?: number;
|
||||
/**
|
||||
* Enable code folding
|
||||
* Defaults to true.
|
||||
|
|
@ -3101,6 +3138,8 @@ declare namespace monaco.editor {
|
|||
readonly find: InternalEditorFindOptions;
|
||||
readonly colorDecorators: boolean;
|
||||
readonly lightbulbEnabled: boolean;
|
||||
readonly codeActionsOnSave: ICodeActionsOnSaveOptions;
|
||||
readonly codeActionsOnSaveTimeout: number;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -3114,6 +3153,7 @@ declare namespace monaco.editor {
|
|||
readonly lineHeight: number;
|
||||
readonly readOnly: boolean;
|
||||
readonly multiCursorModifier: 'altKey' | 'ctrlKey' | 'metaKey';
|
||||
readonly multiCursorMergeOverlapping: boolean;
|
||||
readonly wordSeparators: string;
|
||||
readonly autoClosingBrackets: boolean;
|
||||
readonly autoIndent: boolean;
|
||||
|
|
@ -3251,6 +3291,7 @@ declare namespace monaco.editor {
|
|||
readonly readOnly: boolean;
|
||||
readonly accessibilitySupport: boolean;
|
||||
readonly multiCursorModifier: boolean;
|
||||
readonly multiCursorMergeOverlapping: boolean;
|
||||
readonly wordSeparators: boolean;
|
||||
readonly autoClosingBrackets: boolean;
|
||||
readonly autoIndent: boolean;
|
||||
|
|
@ -3767,10 +3808,6 @@ declare namespace monaco.editor {
|
|||
* Get the layout info for the editor.
|
||||
*/
|
||||
getLayoutInfo(): EditorLayoutInfo;
|
||||
/**
|
||||
* Returns the range that is currently centered in the view port.
|
||||
*/
|
||||
getCenteredRangeInViewport(): Range;
|
||||
/**
|
||||
* Returns the ranges that are currently visible.
|
||||
* Does not account for horizontal scrolling.
|
||||
|
|
@ -4090,8 +4127,10 @@ declare namespace monaco.languages {
|
|||
export function registerColorProvider(languageId: string, provider: DocumentColorProvider): IDisposable;
|
||||
|
||||
/**
|
||||
* Register a folding provider
|
||||
* Register a folding range provider
|
||||
*/
|
||||
export function registerFoldingRangeProvider(languageId: string, provider: FoldingRangeProvider): IDisposable;
|
||||
|
||||
/**
|
||||
* Contains additional diagnostic information about the context in which
|
||||
* a [code action](#CodeActionProvider.provideCodeActions) is run.
|
||||
|
|
@ -4541,7 +4580,7 @@ declare namespace monaco.languages {
|
|||
* editor will use the range at the current position or the
|
||||
* current position itself.
|
||||
*/
|
||||
range: IRange;
|
||||
range?: IRange;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -4985,6 +5024,60 @@ declare namespace monaco.languages {
|
|||
provideColorPresentations(model: editor.ITextModel, colorInfo: IColorInformation, token: CancellationToken): IColorPresentation[] | Thenable<IColorPresentation[]>;
|
||||
}
|
||||
|
||||
export interface FoldingContext {
|
||||
}
|
||||
|
||||
/**
|
||||
* A provider of colors for editor models.
|
||||
*/
|
||||
export interface FoldingRangeProvider {
|
||||
/**
|
||||
* Provides the color ranges for a specific model.
|
||||
*/
|
||||
provideFoldingRanges(model: editor.ITextModel, context: FoldingContext, token: CancellationToken): FoldingRange[] | Thenable<FoldingRange[]>;
|
||||
}
|
||||
|
||||
export interface FoldingRange {
|
||||
/**
|
||||
* The zero-based start line of the range to fold. The folded area starts after the line's last character.
|
||||
*/
|
||||
start: number;
|
||||
/**
|
||||
* The zero-based end line of the range to fold. The folded area ends with the line's last character.
|
||||
*/
|
||||
end: number;
|
||||
/**
|
||||
* Describes the [Kind](#FoldingRangeKind) of the folding range such as [Comment](#FoldingRangeKind.Comment) or
|
||||
* [Region](#FoldingRangeKind.Region). The kind is used to categorize folding ranges and used by commands
|
||||
* like 'Fold all comments'. See
|
||||
* [FoldingRangeKind](#FoldingRangeKind) for an enumeration of standardized kinds.
|
||||
*/
|
||||
kind?: FoldingRangeKind;
|
||||
}
|
||||
|
||||
export class FoldingRangeKind {
|
||||
value: string;
|
||||
/**
|
||||
* Kind for folding range representing a comment. The value of the kind is 'comment'.
|
||||
*/
|
||||
static readonly Comment: FoldingRangeKind;
|
||||
/**
|
||||
* Kind for folding range representing a import. The value of the kind is 'imports'.
|
||||
*/
|
||||
static readonly Imports: FoldingRangeKind;
|
||||
/**
|
||||
* Kind for folding range representing regions (for example marked by `#region`, `#endregion`).
|
||||
* The value of the kind is 'region'.
|
||||
*/
|
||||
static readonly Region: FoldingRangeKind;
|
||||
/**
|
||||
* Creates a new [FoldingRangeKind](#FoldingRangeKind).
|
||||
*
|
||||
* @param value of the kind.
|
||||
*/
|
||||
constructor(value: string);
|
||||
}
|
||||
|
||||
export interface ResourceFileEdit {
|
||||
oldUri: Uri;
|
||||
newUri: Uri;
|
||||
|
|
@ -5001,9 +5094,14 @@ declare namespace monaco.languages {
|
|||
rejectReason?: string;
|
||||
}
|
||||
|
||||
export interface RenameLocation {
|
||||
range: IRange;
|
||||
text: string;
|
||||
}
|
||||
|
||||
export interface RenameProvider {
|
||||
provideRenameEdits(model: editor.ITextModel, position: Position, newName: string, token: CancellationToken): WorkspaceEdit | Thenable<WorkspaceEdit>;
|
||||
resolveRenameLocation?(model: editor.ITextModel, position: Position, token: CancellationToken): IRange | Thenable<IRange>;
|
||||
resolveRenameLocation?(model: editor.ITextModel, position: Position, token: CancellationToken): RenameLocation | Thenable<RenameLocation>;
|
||||
}
|
||||
|
||||
export interface Command {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue