Alex Dima 8 tahun lalu
induk
melakukan
12024252f9
4 mengubah file dengan 49 tambahan dan 3 penghapusan
  1. 6 0
      CHANGELOG.md
  2. 21 1
      monaco.d.ts
  3. 1 1
      package.json
  4. 21 1
      website/playground/monaco.d.ts.txt

+ 6 - 0
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

+ 21 - 1
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<T>(key: string, defaultValue: T): IContextKey<T>;
         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
          */

+ 1 - 1
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",

+ 21 - 1
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<T>(key: string, defaultValue: T): IContextKey<T>;
         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
          */