浏览代码

prepare for 0.24.0

Alex Dima 4 年之前
父节点
当前提交
882c65e325
共有 5 个文件被更改,包括 388 次插入276 次删除
  1. 36 0
      CHANGELOG.md
  2. 18 18
      package-lock.json
  3. 6 6
      package.json
  4. 164 126
      typedoc/monaco.d.ts
  5. 164 126
      website/playground/monaco.d.ts.txt

+ 36 - 0
CHANGELOG.md

@@ -1,5 +1,40 @@
 # Monaco Editor Changelog
 
+## [0.24.0] (12.05.2021)
+
+* added a setting `domReadOnly` which controls if the `<textarea>` used for editor input should have the DOM `readonly` attribute
+* added a setting `useShadowDOM` which can be set to `false` to prevent the editor from using shadow DOM in its implementation (e.g. for the contextmenus).
+* added a settings `autoClosingDelete` that controls how backspace works inside auto-closing pairs.
+* added `DiagnosticsOptions.onlyVisible` for TypeScript which limits the computation of diagnostics to only visible text models.
+* fixed issue where the editor would not load in Safari 13.
+
+### Breaking changes
+* `EditorAutoClosingOvertypeStrategy` has been renamed to `EditorAutoClosingEditStrategy`
+
+### Thank you
+
+Contributions to `monaco-editor`:
+
+* [@AmyQianqianwang (王倩倩)](https://github.com/AmyQianqianwang): add version compare link for version greater than V0.14.3 [PR #2433](https://github.com/microsoft/monaco-editor/pull/2433)
+
+Contributions to `monaco-editor-webpack-plugin`:
+
+* [@k15a (Konstantin Pschera)](https://github.com/k15a): Use compiler.webpack if available [PR #147](https://github.com/microsoft/monaco-editor-webpack-plugin/pull/147)
+* [@sangmokh (Sangmok Han)](https://github.com/sangmokh): Add globalAPI option to expose the editor API through a global monaco object [PR #145](https://github.com/microsoft/monaco-editor-webpack-plugin/pull/145)
+
+Contributions to `monaco-languages`:
+
+* [@anthony-c-martin (Anthony Martin)](https://github.com/anthony-c-martin): Add support for Bicep language [PR #132](https://github.com/microsoft/monaco-languages/pull/132)
+* [@jonatanklosko (Jonatan Kłosko)](https://github.com/jonatanklosko): Add Elixir language definition and tokenizer [PR #130](https://github.com/microsoft/monaco-languages/pull/130)
+* [@mattgodbolt (Matt Godbolt)](https://github.com/mattgodbolt): Handle whitespace within C++ preprocessor comments [PR #127](https://github.com/microsoft/monaco-languages/pull/127)
+* [@mattvague (Matt Vague)](https://github.com/mattvague): Add basic language support for Liquid  [PR #128](https://github.com/microsoft/monaco-languages/pull/128)
+* [@NullVoxPopuli](https://github.com/NullVoxPopuli): Add hbs alias to handlebars [PR #134](https://github.com/microsoft/monaco-languages/pull/134)
+
+Contributions to `monaco-typescript`:
+
+* [@spahnke (Sebastian Pahnke)](https://github.com/spahnke): Deep clone diagnostic objects [PR #76](https://github.com/microsoft/monaco-typescript/pull/76)
+
+
 ## [0.23.0] (05.03.2021)
 
 * improves input on Android (using Gboard)
@@ -949,6 +984,7 @@ Contributions to `monaco-languages`:
 - The editor functions now correctly when hosted inside a `position:fixed` element.
 - Cross-origin configuration is now picked up (as advertised in documentation from MonacoEnvironment)
 
+[0.24.0]: https://github.com/Microsoft/monaco-editor/compare/v0.23.0...v0.24.0
 [0.23.0]: https://github.com/Microsoft/monaco-editor/compare/v0.22.3...v0.23.0
 [0.22.3]: https://github.com/Microsoft/monaco-editor/compare/v0.22.2...v0.22.3
 [0.22.2]: https://github.com/Microsoft/monaco-editor/compare/v0.22.1...v0.22.2

+ 18 - 18
package-lock.json

@@ -2362,39 +2362,39 @@
       }
     },
     "monaco-css": {
-      "version": "3.3.0",
-      "resolved": "https://registry.npmjs.org/monaco-css/-/monaco-css-3.3.0.tgz",
-      "integrity": "sha512-wq/7SbRAIkKoJ/w6WBnAgByZywMgeB06rRy6ooKjUT+vZB6Hmlv04qqrl3swqnCVmE/B0GCJa8Cho1D1UbuiBQ==",
+      "version": "3.4.0",
+      "resolved": "https://registry.npmjs.org/monaco-css/-/monaco-css-3.4.0.tgz",
+      "integrity": "sha512-1OM81/MjKxfSIzVtPenpE1NtueTxOy02EVoa43mx/3g0rggIeXIOJxHrLwL7X8POsatiFsbSgBAGk2NMyKaawQ==",
       "dev": true
     },
     "monaco-editor-core": {
-      "version": "0.23.0",
-      "resolved": "https://registry.npmjs.org/monaco-editor-core/-/monaco-editor-core-0.23.0.tgz",
-      "integrity": "sha512-1LHVpCHp+FErFdUjwzal1muTe+hUkR5CfXAxzua//eHB31bHdWVe15OJPEPS3/rxmfQtl9wZqJdHi4FcGz2zog==",
+      "version": "0.24.0",
+      "resolved": "https://registry.npmjs.org/monaco-editor-core/-/monaco-editor-core-0.24.0.tgz",
+      "integrity": "sha512-WJAzpNYEaJp8Z7crIAiLCVln1zZdo4cFXCRuhTDN4A3tz6IK2NOXAtTOZ9iLKBTtd6eitZJ2Q1Fx8JN8rN3fWw==",
       "dev": true
     },
     "monaco-html": {
-      "version": "3.3.0",
-      "resolved": "https://registry.npmjs.org/monaco-html/-/monaco-html-3.3.0.tgz",
-      "integrity": "sha512-bLVfZFHAMMg+0KsEPXMybj3hK8Kb4ZUNRqlHTXQou18kRUP1Eas+7JKXaUQissJYKCc4+g7tHnlZCnyFIkZ60A==",
+      "version": "3.4.0",
+      "resolved": "https://registry.npmjs.org/monaco-html/-/monaco-html-3.4.0.tgz",
+      "integrity": "sha512-I6LRXYaPOWk1RAG35NrIep0PBnmOUkF5/BWqnSoxU4Hb0bdFUDX33mJdSW7+HL9HmPmBxjsWFsMwc+/L3IBJIw==",
       "dev": true
     },
     "monaco-json": {
-      "version": "3.4.0",
-      "resolved": "https://registry.npmjs.org/monaco-json/-/monaco-json-3.4.0.tgz",
-      "integrity": "sha512-B2Zv5pRRNtE6EWr/RIbGj4v4RA78DkMIDRXmXPGDzDmeNBPPye7qoU4jZJiKEuOXR2T6fRv0puTuWCarfd9Afg==",
+      "version": "3.5.1",
+      "resolved": "https://registry.npmjs.org/monaco-json/-/monaco-json-3.5.1.tgz",
+      "integrity": "sha512-kGuzmro6lAOLw++1A0iUifrbaEGATCBFMGFIE6ihPQxAdsSI6NNd5IjjrHLc/jfTm+xa82X/6NszMQ0P+uHT7Q==",
       "dev": true
     },
     "monaco-languages": {
-      "version": "2.3.0",
-      "resolved": "https://registry.npmjs.org/monaco-languages/-/monaco-languages-2.3.0.tgz",
-      "integrity": "sha512-gER/vKpIUH2kKhWEWRDojMuI6cm4S7Dl9jSYNFUfToOB8uIxoWSZUJCm2FH+ECnUZmnLs6O2fNONKQQ6JCoa/g==",
+      "version": "2.4.0",
+      "resolved": "https://registry.npmjs.org/monaco-languages/-/monaco-languages-2.4.0.tgz",
+      "integrity": "sha512-63ZMAPgqBylS0kyC22QSKJWJmCRcwM7dWql1xtt9R7mCfzszfIIViSTiJ5vDSnzj0lH0aZh8OJggh/uZY6Vgnw==",
       "dev": true
     },
     "monaco-typescript": {
-      "version": "4.3.1",
-      "resolved": "https://registry.npmjs.org/monaco-typescript/-/monaco-typescript-4.3.1.tgz",
-      "integrity": "sha512-4720k9LoaiRZjvKG1ZCsmYVahwhWVn05c9S+LmXwgg9bYqroBmuGd+5LpzOi/JAg7Hf9D3/OwTAeljM5BSozqA==",
+      "version": "4.4.0",
+      "resolved": "https://registry.npmjs.org/monaco-typescript/-/monaco-typescript-4.4.0.tgz",
+      "integrity": "sha512-XdO/Du1IY2HajdmYvk6D0uP+WUS4+0T2/VbByNIkDoGA+3KKa8rKdJa3tjQ9r3gmZN2c8eCfyoCqpzlV7YqjQg==",
       "dev": true
     },
     "ms": {

+ 6 - 6
package.json

@@ -22,12 +22,12 @@
     "clean-css": "^5.1.1",
     "event-stream": "4.0.1",
     "gulp": "^4.0.2",
-    "monaco-css": "3.3.0",
-    "monaco-editor-core": "0.23.0",
-    "monaco-html": "3.3.0",
-    "monaco-json": "3.4.0",
-    "monaco-languages": "2.3.0",
-    "monaco-typescript": "4.3.1",
+    "monaco-css": "3.4.0",
+    "monaco-editor-core": "0.24.0",
+    "monaco-html": "3.4.0",
+    "monaco-json": "3.5.1",
+    "monaco-languages": "2.4.0",
+    "monaco-typescript": "4.4.0",
     "rimraf": "^3.0.2",
     "typedoc": "^0.20.29",
     "typescript": "4.2.3",

+ 164 - 126
typedoc/monaco.d.ts

@@ -223,6 +223,7 @@ declare namespace monaco {
      * But these are "more general", as they should work across browsers & OS`s.
      */
     export enum KeyCode {
+        DependsOnKbLayout = -1,
         /**
          * Placed first to cover the 0 value of the enum.
          */
@@ -1987,6 +1988,11 @@ declare namespace monaco.editor {
          * @event
          */
         onDidChangeLanguageConfiguration(listener: (e: IModelLanguageConfigurationChangedEvent) => void): IDisposable;
+        /**
+         * An event emitted when the model has been attached to the first editor or detached from the last editor.
+         * @event
+         */
+        onDidChangeAttached(listener: () => void): IDisposable;
         /**
          * An event emitted right before disposing the model.
          * @event
@@ -1997,6 +2003,10 @@ declare namespace monaco.editor {
          * and make all necessary clean-up to release this object to the GC.
          */
         dispose(): void;
+        /**
+         * Returns if this model is attached to an editor or not.
+         */
+        isAttachedToEditor(): boolean;
     }
 
     /**
@@ -2614,7 +2624,7 @@ declare namespace monaco.editor {
     /**
      * Configuration options for typing over closing quotes or brackets
      */
-    export type EditorAutoClosingOvertypeStrategy = 'always' | 'auto' | 'never';
+    export type EditorAutoClosingEditStrategy = 'always' | 'auto' | 'never';
 
     /**
      * Configuration options for auto indentation in the editor
@@ -2725,10 +2735,15 @@ declare namespace monaco.editor {
          */
         extraEditorClassName?: string;
         /**
-         * Should the editor be read only.
+         * Should the editor be read only. See also `domReadOnly`.
          * Defaults to false.
          */
         readOnly?: boolean;
+        /**
+         * Should the textarea used for input use the DOM `readonly` attribute.
+         * Defaults to false.
+         */
+        domReadOnly?: boolean;
         /**
          * Enable linked editing.
          * Defaults to false.
@@ -2964,7 +2979,7 @@ declare namespace monaco.editor {
          */
         suggest?: ISuggestOptions;
         /**
-         * Smart select opptions;
+         * Smart select options.
          */
         smartSelect?: ISmartSelectOptions;
         /**
@@ -2999,10 +3014,14 @@ declare namespace monaco.editor {
          * Defaults to language defined behavior.
          */
         autoClosingQuotes?: EditorAutoClosingStrategy;
+        /**
+         * Options for pressing backspace near quotes or bracket pairs.
+         */
+        autoClosingDelete?: EditorAutoClosingEditStrategy;
         /**
          * Options for typing over closing quotes or brackets.
          */
-        autoClosingOvertype?: EditorAutoClosingOvertypeStrategy;
+        autoClosingOvertype?: EditorAutoClosingEditStrategy;
         /**
          * Options for auto surrounding.
          * Defaults to always allowing auto surrounding.
@@ -3215,6 +3234,10 @@ declare namespace monaco.editor {
          * Control the behavior and rendering of the inline hints.
          */
         inlineHints?: IEditorInlineHintsOptions;
+        /**
+         * Control if the editor should use shadow DOM.
+         */
+        useShadowDOM?: boolean;
     }
 
     /**
@@ -3811,7 +3834,7 @@ declare namespace monaco.editor {
          */
         snippetsPreventQuickSuggestions?: boolean;
         /**
-         * Favours words that appear close to the cursor.
+         * Favors words that appear close to the cursor.
          */
         localityBonus?: boolean;
         /**
@@ -3984,126 +4007,129 @@ declare namespace monaco.editor {
         accessibilityPageSize = 3,
         ariaLabel = 4,
         autoClosingBrackets = 5,
-        autoClosingOvertype = 6,
-        autoClosingQuotes = 7,
-        autoIndent = 8,
-        automaticLayout = 9,
-        autoSurround = 10,
-        codeLens = 11,
-        codeLensFontFamily = 12,
-        codeLensFontSize = 13,
-        colorDecorators = 14,
-        columnSelection = 15,
-        comments = 16,
-        contextmenu = 17,
-        copyWithSyntaxHighlighting = 18,
-        cursorBlinking = 19,
-        cursorSmoothCaretAnimation = 20,
-        cursorStyle = 21,
-        cursorSurroundingLines = 22,
-        cursorSurroundingLinesStyle = 23,
-        cursorWidth = 24,
-        disableLayerHinting = 25,
-        disableMonospaceOptimizations = 26,
-        dragAndDrop = 27,
-        emptySelectionClipboard = 28,
-        extraEditorClassName = 29,
-        fastScrollSensitivity = 30,
-        find = 31,
-        fixedOverflowWidgets = 32,
-        folding = 33,
-        foldingStrategy = 34,
-        foldingHighlight = 35,
-        unfoldOnClickAfterEndOfLine = 36,
-        fontFamily = 37,
-        fontInfo = 38,
-        fontLigatures = 39,
-        fontSize = 40,
-        fontWeight = 41,
-        formatOnPaste = 42,
-        formatOnType = 43,
-        glyphMargin = 44,
-        gotoLocation = 45,
-        hideCursorInOverviewRuler = 46,
-        highlightActiveIndentGuide = 47,
-        hover = 48,
-        inDiffEditor = 49,
-        letterSpacing = 50,
-        lightbulb = 51,
-        lineDecorationsWidth = 52,
-        lineHeight = 53,
-        lineNumbers = 54,
-        lineNumbersMinChars = 55,
-        linkedEditing = 56,
-        links = 57,
-        matchBrackets = 58,
-        minimap = 59,
-        mouseStyle = 60,
-        mouseWheelScrollSensitivity = 61,
-        mouseWheelZoom = 62,
-        multiCursorMergeOverlapping = 63,
-        multiCursorModifier = 64,
-        multiCursorPaste = 65,
-        occurrencesHighlight = 66,
-        overviewRulerBorder = 67,
-        overviewRulerLanes = 68,
-        padding = 69,
-        parameterHints = 70,
-        peekWidgetDefaultFocus = 71,
-        definitionLinkOpensInPeek = 72,
-        quickSuggestions = 73,
-        quickSuggestionsDelay = 74,
-        readOnly = 75,
-        renameOnType = 76,
-        renderControlCharacters = 77,
-        renderIndentGuides = 78,
-        renderFinalNewline = 79,
-        renderLineHighlight = 80,
-        renderLineHighlightOnlyWhenFocus = 81,
-        renderValidationDecorations = 82,
-        renderWhitespace = 83,
-        revealHorizontalRightPadding = 84,
-        roundedSelection = 85,
-        rulers = 86,
-        scrollbar = 87,
-        scrollBeyondLastColumn = 88,
-        scrollBeyondLastLine = 89,
-        scrollPredominantAxis = 90,
-        selectionClipboard = 91,
-        selectionHighlight = 92,
-        selectOnLineNumbers = 93,
-        showFoldingControls = 94,
-        showUnused = 95,
-        snippetSuggestions = 96,
-        smartSelect = 97,
-        smoothScrolling = 98,
-        stickyTabStops = 99,
-        stopRenderingLineAfter = 100,
-        suggest = 101,
-        suggestFontSize = 102,
-        suggestLineHeight = 103,
-        suggestOnTriggerCharacters = 104,
-        suggestSelection = 105,
-        tabCompletion = 106,
-        tabIndex = 107,
-        unusualLineTerminators = 108,
-        useTabStops = 109,
-        wordSeparators = 110,
-        wordWrap = 111,
-        wordWrapBreakAfterCharacters = 112,
-        wordWrapBreakBeforeCharacters = 113,
-        wordWrapColumn = 114,
-        wordWrapOverride1 = 115,
-        wordWrapOverride2 = 116,
-        wrappingIndent = 117,
-        wrappingStrategy = 118,
-        showDeprecated = 119,
-        inlineHints = 120,
-        editorClassName = 121,
-        pixelRatio = 122,
-        tabFocusMode = 123,
-        layoutInfo = 124,
-        wrappingInfo = 125
+        autoClosingDelete = 6,
+        autoClosingOvertype = 7,
+        autoClosingQuotes = 8,
+        autoIndent = 9,
+        automaticLayout = 10,
+        autoSurround = 11,
+        codeLens = 12,
+        codeLensFontFamily = 13,
+        codeLensFontSize = 14,
+        colorDecorators = 15,
+        columnSelection = 16,
+        comments = 17,
+        contextmenu = 18,
+        copyWithSyntaxHighlighting = 19,
+        cursorBlinking = 20,
+        cursorSmoothCaretAnimation = 21,
+        cursorStyle = 22,
+        cursorSurroundingLines = 23,
+        cursorSurroundingLinesStyle = 24,
+        cursorWidth = 25,
+        disableLayerHinting = 26,
+        disableMonospaceOptimizations = 27,
+        domReadOnly = 28,
+        dragAndDrop = 29,
+        emptySelectionClipboard = 30,
+        extraEditorClassName = 31,
+        fastScrollSensitivity = 32,
+        find = 33,
+        fixedOverflowWidgets = 34,
+        folding = 35,
+        foldingStrategy = 36,
+        foldingHighlight = 37,
+        unfoldOnClickAfterEndOfLine = 38,
+        fontFamily = 39,
+        fontInfo = 40,
+        fontLigatures = 41,
+        fontSize = 42,
+        fontWeight = 43,
+        formatOnPaste = 44,
+        formatOnType = 45,
+        glyphMargin = 46,
+        gotoLocation = 47,
+        hideCursorInOverviewRuler = 48,
+        highlightActiveIndentGuide = 49,
+        hover = 50,
+        inDiffEditor = 51,
+        letterSpacing = 52,
+        lightbulb = 53,
+        lineDecorationsWidth = 54,
+        lineHeight = 55,
+        lineNumbers = 56,
+        lineNumbersMinChars = 57,
+        linkedEditing = 58,
+        links = 59,
+        matchBrackets = 60,
+        minimap = 61,
+        mouseStyle = 62,
+        mouseWheelScrollSensitivity = 63,
+        mouseWheelZoom = 64,
+        multiCursorMergeOverlapping = 65,
+        multiCursorModifier = 66,
+        multiCursorPaste = 67,
+        occurrencesHighlight = 68,
+        overviewRulerBorder = 69,
+        overviewRulerLanes = 70,
+        padding = 71,
+        parameterHints = 72,
+        peekWidgetDefaultFocus = 73,
+        definitionLinkOpensInPeek = 74,
+        quickSuggestions = 75,
+        quickSuggestionsDelay = 76,
+        readOnly = 77,
+        renameOnType = 78,
+        renderControlCharacters = 79,
+        renderIndentGuides = 80,
+        renderFinalNewline = 81,
+        renderLineHighlight = 82,
+        renderLineHighlightOnlyWhenFocus = 83,
+        renderValidationDecorations = 84,
+        renderWhitespace = 85,
+        revealHorizontalRightPadding = 86,
+        roundedSelection = 87,
+        rulers = 88,
+        scrollbar = 89,
+        scrollBeyondLastColumn = 90,
+        scrollBeyondLastLine = 91,
+        scrollPredominantAxis = 92,
+        selectionClipboard = 93,
+        selectionHighlight = 94,
+        selectOnLineNumbers = 95,
+        showFoldingControls = 96,
+        showUnused = 97,
+        snippetSuggestions = 98,
+        smartSelect = 99,
+        smoothScrolling = 100,
+        stickyTabStops = 101,
+        stopRenderingLineAfter = 102,
+        suggest = 103,
+        suggestFontSize = 104,
+        suggestLineHeight = 105,
+        suggestOnTriggerCharacters = 106,
+        suggestSelection = 107,
+        tabCompletion = 108,
+        tabIndex = 109,
+        unusualLineTerminators = 110,
+        useShadowDOM = 111,
+        useTabStops = 112,
+        wordSeparators = 113,
+        wordWrap = 114,
+        wordWrapBreakAfterCharacters = 115,
+        wordWrapBreakBeforeCharacters = 116,
+        wordWrapColumn = 117,
+        wordWrapOverride1 = 118,
+        wordWrapOverride2 = 119,
+        wrappingIndent = 120,
+        wrappingStrategy = 121,
+        showDeprecated = 122,
+        inlineHints = 123,
+        editorClassName = 124,
+        pixelRatio = 125,
+        tabFocusMode = 126,
+        layoutInfo = 127,
+        wrappingInfo = 128
     }
     export const EditorOptions: {
         acceptSuggestionOnCommitCharacter: IEditorOption<EditorOption.acceptSuggestionOnCommitCharacter, boolean>;
@@ -4112,6 +4138,7 @@ declare namespace monaco.editor {
         accessibilityPageSize: IEditorOption<EditorOption.accessibilityPageSize, number>;
         ariaLabel: IEditorOption<EditorOption.ariaLabel, string>;
         autoClosingBrackets: IEditorOption<EditorOption.autoClosingBrackets, 'always' | 'languageDefined' | 'beforeWhitespace' | 'never'>;
+        autoClosingDelete: IEditorOption<EditorOption.autoClosingDelete, 'always' | 'never' | 'auto'>;
         autoClosingOvertype: IEditorOption<EditorOption.autoClosingOvertype, 'always' | 'never' | 'auto'>;
         autoClosingQuotes: IEditorOption<EditorOption.autoClosingQuotes, 'always' | 'languageDefined' | 'beforeWhitespace' | 'never'>;
         autoIndent: IEditorOption<EditorOption.autoIndent, EditorAutoIndentStrategy>;
@@ -4134,6 +4161,7 @@ declare namespace monaco.editor {
         cursorWidth: IEditorOption<EditorOption.cursorWidth, number>;
         disableLayerHinting: IEditorOption<EditorOption.disableLayerHinting, boolean>;
         disableMonospaceOptimizations: IEditorOption<EditorOption.disableMonospaceOptimizations, boolean>;
+        domReadOnly: IEditorOption<EditorOption.domReadOnly, boolean>;
         dragAndDrop: IEditorOption<EditorOption.dragAndDrop, boolean>;
         emptySelectionClipboard: IEditorOption<EditorOption.emptySelectionClipboard, boolean>;
         extraEditorClassName: IEditorOption<EditorOption.extraEditorClassName, string>;
@@ -4217,6 +4245,7 @@ declare namespace monaco.editor {
         tabCompletion: IEditorOption<EditorOption.tabCompletion, 'on' | 'off' | 'onlySnippets'>;
         tabIndex: IEditorOption<EditorOption.tabIndex, number>;
         unusualLineTerminators: IEditorOption<EditorOption.unusualLineTerminators, 'auto' | 'off' | 'prompt'>;
+        useShadowDOM: IEditorOption<EditorOption.useShadowDOM, boolean>;
         useTabStops: IEditorOption<EditorOption.useTabStops, boolean>;
         wordSeparators: IEditorOption<EditorOption.wordSeparators, string>;
         wordWrap: IEditorOption<EditorOption.wordWrap, 'on' | 'off' | 'wordWrapColumn' | 'bounded'>;
@@ -6646,7 +6675,11 @@ declare namespace monaco.languages {
 declare namespace monaco.worker {
 
 
-    export interface IMirrorModel {
+    export interface IMirrorTextModel {
+        readonly version: number;
+    }
+
+    export interface IMirrorModel extends IMirrorTextModel {
         readonly uri: Uri;
         readonly version: number;
         getValue(): string;
@@ -6811,6 +6844,11 @@ declare namespace monaco.languages.typescript {
         noSemanticValidation?: boolean;
         noSyntaxValidation?: boolean;
         noSuggestionDiagnostics?: boolean;
+        /**
+         * Limit diagnostic computation to only visible files.
+         * Defaults to false.
+         */
+        onlyVisible?: boolean;
         diagnosticCodesToIgnore?: number[];
     }
     export interface WorkerOptions {

+ 164 - 126
website/playground/monaco.d.ts.txt

@@ -223,6 +223,7 @@ declare namespace monaco {
      * But these are "more general", as they should work across browsers & OS`s.
      */
     export enum KeyCode {
+        DependsOnKbLayout = -1,
         /**
          * Placed first to cover the 0 value of the enum.
          */
@@ -1987,6 +1988,11 @@ declare namespace monaco.editor {
          * @event
          */
         onDidChangeLanguageConfiguration(listener: (e: IModelLanguageConfigurationChangedEvent) => void): IDisposable;
+        /**
+         * An event emitted when the model has been attached to the first editor or detached from the last editor.
+         * @event
+         */
+        onDidChangeAttached(listener: () => void): IDisposable;
         /**
          * An event emitted right before disposing the model.
          * @event
@@ -1997,6 +2003,10 @@ declare namespace monaco.editor {
          * and make all necessary clean-up to release this object to the GC.
          */
         dispose(): void;
+        /**
+         * Returns if this model is attached to an editor or not.
+         */
+        isAttachedToEditor(): boolean;
     }
 
     /**
@@ -2614,7 +2624,7 @@ declare namespace monaco.editor {
     /**
      * Configuration options for typing over closing quotes or brackets
      */
-    export type EditorAutoClosingOvertypeStrategy = 'always' | 'auto' | 'never';
+    export type EditorAutoClosingEditStrategy = 'always' | 'auto' | 'never';
 
     /**
      * Configuration options for auto indentation in the editor
@@ -2725,10 +2735,15 @@ declare namespace monaco.editor {
          */
         extraEditorClassName?: string;
         /**
-         * Should the editor be read only.
+         * Should the editor be read only. See also `domReadOnly`.
          * Defaults to false.
          */
         readOnly?: boolean;
+        /**
+         * Should the textarea used for input use the DOM `readonly` attribute.
+         * Defaults to false.
+         */
+        domReadOnly?: boolean;
         /**
          * Enable linked editing.
          * Defaults to false.
@@ -2964,7 +2979,7 @@ declare namespace monaco.editor {
          */
         suggest?: ISuggestOptions;
         /**
-         * Smart select opptions;
+         * Smart select options.
          */
         smartSelect?: ISmartSelectOptions;
         /**
@@ -2999,10 +3014,14 @@ declare namespace monaco.editor {
          * Defaults to language defined behavior.
          */
         autoClosingQuotes?: EditorAutoClosingStrategy;
+        /**
+         * Options for pressing backspace near quotes or bracket pairs.
+         */
+        autoClosingDelete?: EditorAutoClosingEditStrategy;
         /**
          * Options for typing over closing quotes or brackets.
          */
-        autoClosingOvertype?: EditorAutoClosingOvertypeStrategy;
+        autoClosingOvertype?: EditorAutoClosingEditStrategy;
         /**
          * Options for auto surrounding.
          * Defaults to always allowing auto surrounding.
@@ -3215,6 +3234,10 @@ declare namespace monaco.editor {
          * Control the behavior and rendering of the inline hints.
          */
         inlineHints?: IEditorInlineHintsOptions;
+        /**
+         * Control if the editor should use shadow DOM.
+         */
+        useShadowDOM?: boolean;
     }
 
     /**
@@ -3811,7 +3834,7 @@ declare namespace monaco.editor {
          */
         snippetsPreventQuickSuggestions?: boolean;
         /**
-         * Favours words that appear close to the cursor.
+         * Favors words that appear close to the cursor.
          */
         localityBonus?: boolean;
         /**
@@ -3984,126 +4007,129 @@ declare namespace monaco.editor {
         accessibilityPageSize = 3,
         ariaLabel = 4,
         autoClosingBrackets = 5,
-        autoClosingOvertype = 6,
-        autoClosingQuotes = 7,
-        autoIndent = 8,
-        automaticLayout = 9,
-        autoSurround = 10,
-        codeLens = 11,
-        codeLensFontFamily = 12,
-        codeLensFontSize = 13,
-        colorDecorators = 14,
-        columnSelection = 15,
-        comments = 16,
-        contextmenu = 17,
-        copyWithSyntaxHighlighting = 18,
-        cursorBlinking = 19,
-        cursorSmoothCaretAnimation = 20,
-        cursorStyle = 21,
-        cursorSurroundingLines = 22,
-        cursorSurroundingLinesStyle = 23,
-        cursorWidth = 24,
-        disableLayerHinting = 25,
-        disableMonospaceOptimizations = 26,
-        dragAndDrop = 27,
-        emptySelectionClipboard = 28,
-        extraEditorClassName = 29,
-        fastScrollSensitivity = 30,
-        find = 31,
-        fixedOverflowWidgets = 32,
-        folding = 33,
-        foldingStrategy = 34,
-        foldingHighlight = 35,
-        unfoldOnClickAfterEndOfLine = 36,
-        fontFamily = 37,
-        fontInfo = 38,
-        fontLigatures = 39,
-        fontSize = 40,
-        fontWeight = 41,
-        formatOnPaste = 42,
-        formatOnType = 43,
-        glyphMargin = 44,
-        gotoLocation = 45,
-        hideCursorInOverviewRuler = 46,
-        highlightActiveIndentGuide = 47,
-        hover = 48,
-        inDiffEditor = 49,
-        letterSpacing = 50,
-        lightbulb = 51,
-        lineDecorationsWidth = 52,
-        lineHeight = 53,
-        lineNumbers = 54,
-        lineNumbersMinChars = 55,
-        linkedEditing = 56,
-        links = 57,
-        matchBrackets = 58,
-        minimap = 59,
-        mouseStyle = 60,
-        mouseWheelScrollSensitivity = 61,
-        mouseWheelZoom = 62,
-        multiCursorMergeOverlapping = 63,
-        multiCursorModifier = 64,
-        multiCursorPaste = 65,
-        occurrencesHighlight = 66,
-        overviewRulerBorder = 67,
-        overviewRulerLanes = 68,
-        padding = 69,
-        parameterHints = 70,
-        peekWidgetDefaultFocus = 71,
-        definitionLinkOpensInPeek = 72,
-        quickSuggestions = 73,
-        quickSuggestionsDelay = 74,
-        readOnly = 75,
-        renameOnType = 76,
-        renderControlCharacters = 77,
-        renderIndentGuides = 78,
-        renderFinalNewline = 79,
-        renderLineHighlight = 80,
-        renderLineHighlightOnlyWhenFocus = 81,
-        renderValidationDecorations = 82,
-        renderWhitespace = 83,
-        revealHorizontalRightPadding = 84,
-        roundedSelection = 85,
-        rulers = 86,
-        scrollbar = 87,
-        scrollBeyondLastColumn = 88,
-        scrollBeyondLastLine = 89,
-        scrollPredominantAxis = 90,
-        selectionClipboard = 91,
-        selectionHighlight = 92,
-        selectOnLineNumbers = 93,
-        showFoldingControls = 94,
-        showUnused = 95,
-        snippetSuggestions = 96,
-        smartSelect = 97,
-        smoothScrolling = 98,
-        stickyTabStops = 99,
-        stopRenderingLineAfter = 100,
-        suggest = 101,
-        suggestFontSize = 102,
-        suggestLineHeight = 103,
-        suggestOnTriggerCharacters = 104,
-        suggestSelection = 105,
-        tabCompletion = 106,
-        tabIndex = 107,
-        unusualLineTerminators = 108,
-        useTabStops = 109,
-        wordSeparators = 110,
-        wordWrap = 111,
-        wordWrapBreakAfterCharacters = 112,
-        wordWrapBreakBeforeCharacters = 113,
-        wordWrapColumn = 114,
-        wordWrapOverride1 = 115,
-        wordWrapOverride2 = 116,
-        wrappingIndent = 117,
-        wrappingStrategy = 118,
-        showDeprecated = 119,
-        inlineHints = 120,
-        editorClassName = 121,
-        pixelRatio = 122,
-        tabFocusMode = 123,
-        layoutInfo = 124,
-        wrappingInfo = 125
+        autoClosingDelete = 6,
+        autoClosingOvertype = 7,
+        autoClosingQuotes = 8,
+        autoIndent = 9,
+        automaticLayout = 10,
+        autoSurround = 11,
+        codeLens = 12,
+        codeLensFontFamily = 13,
+        codeLensFontSize = 14,
+        colorDecorators = 15,
+        columnSelection = 16,
+        comments = 17,
+        contextmenu = 18,
+        copyWithSyntaxHighlighting = 19,
+        cursorBlinking = 20,
+        cursorSmoothCaretAnimation = 21,
+        cursorStyle = 22,
+        cursorSurroundingLines = 23,
+        cursorSurroundingLinesStyle = 24,
+        cursorWidth = 25,
+        disableLayerHinting = 26,
+        disableMonospaceOptimizations = 27,
+        domReadOnly = 28,
+        dragAndDrop = 29,
+        emptySelectionClipboard = 30,
+        extraEditorClassName = 31,
+        fastScrollSensitivity = 32,
+        find = 33,
+        fixedOverflowWidgets = 34,
+        folding = 35,
+        foldingStrategy = 36,
+        foldingHighlight = 37,
+        unfoldOnClickAfterEndOfLine = 38,
+        fontFamily = 39,
+        fontInfo = 40,
+        fontLigatures = 41,
+        fontSize = 42,
+        fontWeight = 43,
+        formatOnPaste = 44,
+        formatOnType = 45,
+        glyphMargin = 46,
+        gotoLocation = 47,
+        hideCursorInOverviewRuler = 48,
+        highlightActiveIndentGuide = 49,
+        hover = 50,
+        inDiffEditor = 51,
+        letterSpacing = 52,
+        lightbulb = 53,
+        lineDecorationsWidth = 54,
+        lineHeight = 55,
+        lineNumbers = 56,
+        lineNumbersMinChars = 57,
+        linkedEditing = 58,
+        links = 59,
+        matchBrackets = 60,
+        minimap = 61,
+        mouseStyle = 62,
+        mouseWheelScrollSensitivity = 63,
+        mouseWheelZoom = 64,
+        multiCursorMergeOverlapping = 65,
+        multiCursorModifier = 66,
+        multiCursorPaste = 67,
+        occurrencesHighlight = 68,
+        overviewRulerBorder = 69,
+        overviewRulerLanes = 70,
+        padding = 71,
+        parameterHints = 72,
+        peekWidgetDefaultFocus = 73,
+        definitionLinkOpensInPeek = 74,
+        quickSuggestions = 75,
+        quickSuggestionsDelay = 76,
+        readOnly = 77,
+        renameOnType = 78,
+        renderControlCharacters = 79,
+        renderIndentGuides = 80,
+        renderFinalNewline = 81,
+        renderLineHighlight = 82,
+        renderLineHighlightOnlyWhenFocus = 83,
+        renderValidationDecorations = 84,
+        renderWhitespace = 85,
+        revealHorizontalRightPadding = 86,
+        roundedSelection = 87,
+        rulers = 88,
+        scrollbar = 89,
+        scrollBeyondLastColumn = 90,
+        scrollBeyondLastLine = 91,
+        scrollPredominantAxis = 92,
+        selectionClipboard = 93,
+        selectionHighlight = 94,
+        selectOnLineNumbers = 95,
+        showFoldingControls = 96,
+        showUnused = 97,
+        snippetSuggestions = 98,
+        smartSelect = 99,
+        smoothScrolling = 100,
+        stickyTabStops = 101,
+        stopRenderingLineAfter = 102,
+        suggest = 103,
+        suggestFontSize = 104,
+        suggestLineHeight = 105,
+        suggestOnTriggerCharacters = 106,
+        suggestSelection = 107,
+        tabCompletion = 108,
+        tabIndex = 109,
+        unusualLineTerminators = 110,
+        useShadowDOM = 111,
+        useTabStops = 112,
+        wordSeparators = 113,
+        wordWrap = 114,
+        wordWrapBreakAfterCharacters = 115,
+        wordWrapBreakBeforeCharacters = 116,
+        wordWrapColumn = 117,
+        wordWrapOverride1 = 118,
+        wordWrapOverride2 = 119,
+        wrappingIndent = 120,
+        wrappingStrategy = 121,
+        showDeprecated = 122,
+        inlineHints = 123,
+        editorClassName = 124,
+        pixelRatio = 125,
+        tabFocusMode = 126,
+        layoutInfo = 127,
+        wrappingInfo = 128
     }
     export const EditorOptions: {
         acceptSuggestionOnCommitCharacter: IEditorOption<EditorOption.acceptSuggestionOnCommitCharacter, boolean>;
@@ -4112,6 +4138,7 @@ declare namespace monaco.editor {
         accessibilityPageSize: IEditorOption<EditorOption.accessibilityPageSize, number>;
         ariaLabel: IEditorOption<EditorOption.ariaLabel, string>;
         autoClosingBrackets: IEditorOption<EditorOption.autoClosingBrackets, 'always' | 'languageDefined' | 'beforeWhitespace' | 'never'>;
+        autoClosingDelete: IEditorOption<EditorOption.autoClosingDelete, 'always' | 'never' | 'auto'>;
         autoClosingOvertype: IEditorOption<EditorOption.autoClosingOvertype, 'always' | 'never' | 'auto'>;
         autoClosingQuotes: IEditorOption<EditorOption.autoClosingQuotes, 'always' | 'languageDefined' | 'beforeWhitespace' | 'never'>;
         autoIndent: IEditorOption<EditorOption.autoIndent, EditorAutoIndentStrategy>;
@@ -4134,6 +4161,7 @@ declare namespace monaco.editor {
         cursorWidth: IEditorOption<EditorOption.cursorWidth, number>;
         disableLayerHinting: IEditorOption<EditorOption.disableLayerHinting, boolean>;
         disableMonospaceOptimizations: IEditorOption<EditorOption.disableMonospaceOptimizations, boolean>;
+        domReadOnly: IEditorOption<EditorOption.domReadOnly, boolean>;
         dragAndDrop: IEditorOption<EditorOption.dragAndDrop, boolean>;
         emptySelectionClipboard: IEditorOption<EditorOption.emptySelectionClipboard, boolean>;
         extraEditorClassName: IEditorOption<EditorOption.extraEditorClassName, string>;
@@ -4217,6 +4245,7 @@ declare namespace monaco.editor {
         tabCompletion: IEditorOption<EditorOption.tabCompletion, 'on' | 'off' | 'onlySnippets'>;
         tabIndex: IEditorOption<EditorOption.tabIndex, number>;
         unusualLineTerminators: IEditorOption<EditorOption.unusualLineTerminators, 'auto' | 'off' | 'prompt'>;
+        useShadowDOM: IEditorOption<EditorOption.useShadowDOM, boolean>;
         useTabStops: IEditorOption<EditorOption.useTabStops, boolean>;
         wordSeparators: IEditorOption<EditorOption.wordSeparators, string>;
         wordWrap: IEditorOption<EditorOption.wordWrap, 'on' | 'off' | 'wordWrapColumn' | 'bounded'>;
@@ -6646,7 +6675,11 @@ declare namespace monaco.languages {
 declare namespace monaco.worker {
 
 
-    export interface IMirrorModel {
+    export interface IMirrorTextModel {
+        readonly version: number;
+    }
+
+    export interface IMirrorModel extends IMirrorTextModel {
         readonly uri: Uri;
         readonly version: number;
         getValue(): string;
@@ -6811,6 +6844,11 @@ declare namespace monaco.languages.typescript {
         noSemanticValidation?: boolean;
         noSyntaxValidation?: boolean;
         noSuggestionDiagnostics?: boolean;
+        /**
+         * Limit diagnostic computation to only visible files.
+         * Defaults to false.
+         */
+        onlyVisible?: boolean;
         diagnosticCodesToIgnore?: number[];
     }
     export interface WorkerOptions {