Skip to content

Commit

Permalink
update dependencies, changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
rebornix committed May 11, 2018
1 parent 8f32044 commit 6dc4fba
Show file tree
Hide file tree
Showing 5 changed files with 251 additions and 37 deletions.
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# Monaco Editor Change log

## [0.13.0] (11.05.2018)
### New & Noteworthy
* New folding provider `registerFoldingRangeProvider`.
* You can now specifies the stack order of a decoration by setting `IModelDecorationOptions.zIndex`. A decoration with greater stack order is always in front of a decoration with a lower stack order.
* You can now tell Monaco if there is an `inlineClassName` which affects letter spacing. the stack order of a decoration by setting `IModelDecorationOptions.inlineClassNameAffectsLetterSpacing`.
* Get the text length for a certain line on text model (`ITextModel.getLineLength(lineNumber: number)`)
* New option `codeActionsOnSave`, controls whether code action kinds will be run on save.
* New option `codeActionsOnSaveTimeout`, controls timeout for running code actions on save.
* New option `multiCursorMergeOverlapping`, controls if overlapping selections should be merged. Default to `true`.

### Breaking Change
* Removed `ICodeEditor.getCenteredRangeInViewport`.
* `RenameProvider.resolveRenameLocation` now returns `RenameLocation` instead of `IRange`.

### Thank you
* [Sergey Romanov @Serhioromano](https://github.com/Serhioromano): Add new language Structured Text support [PR monaco-languages#32](https://github.com/Microsoft/monaco-languages/pull/32)
* [Yukai Huang @Yukaii](https://github.com/Yukaii): Fix backspace in IME composition on iOS Safari [PR vscode#40546](https://github.com/Microsoft/vscode/pull/40546)

## [0.12.0] (11.04.2018)
* Special thanks to [Tim Kendrick](https://github.com/timkendrick) for contributing a webpack plugin - `monaco-editor-webpack-plugin` - now available on [npm](https://www.npmjs.com/package/monaco-editor-webpack-plugin).

Expand Down
114 changes: 106 additions & 8 deletions monaco.d.ts
Original file line number Diff line number Diff line change
@@ -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
*-----------------------------------------------------------*/
/*---------------------------------------------------------------------------------------------
Expand Down Expand Up @@ -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.
*/
Expand All @@ -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.
*/
Expand Down Expand Up @@ -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.
*/
Expand Down Expand Up @@ -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.
*/
Expand Down Expand Up @@ -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.
*/
Expand Down Expand Up @@ -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'.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -3101,6 +3138,8 @@ declare namespace monaco.editor {
readonly find: InternalEditorFindOptions;
readonly colorDecorators: boolean;
readonly lightbulbEnabled: boolean;
readonly codeActionsOnSave: ICodeActionsOnSaveOptions;
readonly codeActionsOnSaveTimeout: number;
}

/**
Expand All @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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;
}

/**
Expand Down Expand Up @@ -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;
Expand All @@ -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 {
Expand Down
32 changes: 16 additions & 16 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
"gulp": "^3.9.1",
"gulp-typedoc": "^2.0.0",
"http-server": "^0.11.1",
"monaco-css": "2.1.0",
"monaco-editor-core": "0.12.0",
"monaco-html": "2.1.0",
"monaco-json": "2.1.0",
"monaco-languages": "1.2.0",
"monaco-css": "2.1.1",
"monaco-editor-core": "0.13.1",
"monaco-html": "2.1.1",
"monaco-json": "2.1.1",
"monaco-languages": "1.3.1",
"monaco-typescript": "3.1.0",
"rimraf": "^2.6.2",
"typedoc": "^0.11.1",
Expand Down
Loading

0 comments on commit 6dc4fba

Please sign in to comment.