From 12024252f95f9557e0bb60bebf767ced4211b2fa Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Wed, 1 Mar 2017 13:19:15 +0100 Subject: [PATCH] 0.8.2 prep --- CHANGELOG.md | 6 ++++++ monaco.d.ts | 22 +++++++++++++++++++++- package.json | 2 +- website/playground/monaco.d.ts.txt | 22 +++++++++++++++++++++- 4 files changed, 49 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 96fcae87..1496c932 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Monaco Editor Change log +## [0.8.2] + - Fixes the following regressions: + - [issue #385](https://github.com/Microsoft/monaco-editor/issues/385): Cannot add action to the left-hand-side of the diff editor + - [issue #386](https://github.com/Microsoft/monaco-editor/issues/386): Shortcuts for actions added via editor.addAction don't show up in the Command Palette + - [issue #387](https://github.com/Microsoft/monaco-editor/issues/387): Cannot change diff editor to a custom theme based on high contrast + ## [0.8.1] - CSS/JSON/HTML language supports updated: - CSS: Support for @apply diff --git a/monaco.d.ts b/monaco.d.ts index 4f4f0fbc..0c49aa2d 100644 --- a/monaco.d.ts +++ b/monaco.d.ts @@ -1,6 +1,6 @@ /*!----------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. - * Type definitions for monaco-editor v0.8.0 + * Type definitions for monaco-editor v0.8.2 * Released under the MIT license *-----------------------------------------------------------*/ declare module monaco { @@ -796,6 +796,7 @@ declare module monaco.editor { export function createDiffEditor(domElement: HTMLElement, options?: IDiffEditorConstructionOptions, override?: IEditorOverrideServices): IStandaloneDiffEditor; export interface IDiffNavigator { + revealFirst: boolean; canNavigate(): boolean; next(): void; previous(): void; @@ -970,6 +971,8 @@ declare module monaco.editor { addCommand(keybinding: number, handler: ICommandHandler, context: string): string; createContextKey(key: string, defaultValue: T): IContextKey; addAction(descriptor: IActionDescriptor): IDisposable; + getOriginalEditor(): IStandaloneCodeEditor; + getModifiedEditor(): IStandaloneCodeEditor; } export interface ICommandHandler { (...args: any[]): void; @@ -2790,6 +2793,13 @@ declare module monaco.editor { readonly charChanges: ICharChange[]; } + /** + * Information about a line in the diff editor + */ + export interface IDiffLineInformation { + readonly equivalentLineNumber: number; + } + export interface INewScrollPosition { scrollLeft?: number; scrollTop?: number; @@ -3231,6 +3241,16 @@ declare module monaco.editor { * Get the computed diff information. */ getLineChanges(): ILineChange[]; + /** + * Get information based on computed diff about a line number from the original model. + * If the diff computation is not finished or the model is missing, will return null. + */ + getDiffLineInformationForOriginal(lineNumber: number): IDiffLineInformation; + /** + * Get information based on computed diff about a line number from the modified model. + * If the diff computation is not finished or the model is missing, will return null. + */ + getDiffLineInformationForModified(lineNumber: number): IDiffLineInformation; /** * @see ICodeEditor.getValue */ diff --git a/package.json b/package.json index 2cc985fe..fc9e3f62 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "gulp-typedoc": "^2.0.0", "http-server": "^0.9.0", "monaco-css": "1.3.1", - "monaco-editor-core": "0.8.1", + "monaco-editor-core": "0.8.2", "monaco-html": "1.2.1", "monaco-json": "1.2.2", "monaco-languages": "0.7.0", diff --git a/website/playground/monaco.d.ts.txt b/website/playground/monaco.d.ts.txt index 4f4f0fbc..0c49aa2d 100644 --- a/website/playground/monaco.d.ts.txt +++ b/website/playground/monaco.d.ts.txt @@ -1,6 +1,6 @@ /*!----------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. - * Type definitions for monaco-editor v0.8.0 + * Type definitions for monaco-editor v0.8.2 * Released under the MIT license *-----------------------------------------------------------*/ declare module monaco { @@ -796,6 +796,7 @@ declare module monaco.editor { export function createDiffEditor(domElement: HTMLElement, options?: IDiffEditorConstructionOptions, override?: IEditorOverrideServices): IStandaloneDiffEditor; export interface IDiffNavigator { + revealFirst: boolean; canNavigate(): boolean; next(): void; previous(): void; @@ -970,6 +971,8 @@ declare module monaco.editor { addCommand(keybinding: number, handler: ICommandHandler, context: string): string; createContextKey(key: string, defaultValue: T): IContextKey; addAction(descriptor: IActionDescriptor): IDisposable; + getOriginalEditor(): IStandaloneCodeEditor; + getModifiedEditor(): IStandaloneCodeEditor; } export interface ICommandHandler { (...args: any[]): void; @@ -2790,6 +2793,13 @@ declare module monaco.editor { readonly charChanges: ICharChange[]; } + /** + * Information about a line in the diff editor + */ + export interface IDiffLineInformation { + readonly equivalentLineNumber: number; + } + export interface INewScrollPosition { scrollLeft?: number; scrollTop?: number; @@ -3231,6 +3241,16 @@ declare module monaco.editor { * Get the computed diff information. */ getLineChanges(): ILineChange[]; + /** + * Get information based on computed diff about a line number from the original model. + * If the diff computation is not finished or the model is missing, will return null. + */ + getDiffLineInformationForOriginal(lineNumber: number): IDiffLineInformation; + /** + * Get information based on computed diff about a line number from the modified model. + * If the diff computation is not finished or the model is missing, will return null. + */ + getDiffLineInformationForModified(lineNumber: number): IDiffLineInformation; /** * @see ICodeEditor.getValue */