From f377e9e7acc2c583154dd0ff98624f33e996040b Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Fri, 8 Oct 2021 18:41:27 +0200 Subject: [PATCH] Prepare for 0.29.0 --- CHANGELOG.md | 41 +++ package-lock.json | 18 +- package.json | 6 +- ...omizing-the-appearence-exposed-colors.html | 2 + typedoc/monaco.d.ts | 295 ++++++++++-------- website/playground/monaco.d.ts.txt | 295 ++++++++++-------- 6 files changed, 379 insertions(+), 278 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 38dfa686..8e845356 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,46 @@ # Monaco Editor Changelog +## [0.29.0] (08.10.2021) + +* adds an `ariaContainerElement` option for editors +* adds `guides.bracketPairs` to enable guides driven by bracket pairs +* adds `maxFileSize` to control the maximum file size for which to compute diffs +* adds `CodeActionProvider.resolveCodeAction` + +### Breaking Change + +* consolidated the options `renderIndentGuides`, `highlightActiveIndentGuide` to `guides` + +### Thank you + +Contributions to `monaco-editor`: + +* [@crackalak (Dan Hughes)](https://github.com/crackalak): Added `ariaContainerElement` to shadow dom test [PR #2644](https://github.com/microsoft/monaco-editor/pull/2644) +* [@HKalbasi](https://github.com/HKalbasi): Add example for inlay hints [PR #2640](https://github.com/microsoft/monaco-editor/pull/2640) +* [@silverwind](https://github.com/silverwind): Fix letter case in repo URL [PR #2674](https://github.com/microsoft/monaco-editor/pull/2674) +* [@Un-index](https://github.com/Un-index): chore: Align run button text in playground.css [PR #2658](https://github.com/microsoft/monaco-editor/pull/2658) + +Contributions to `monaco-editor-samples`: + +* [@koto (Krzysztof Kotowicz)](https://github.com/koto): Added an example of loading Monaco with Trusted Types [PR #92](https://github.com/microsoft/monaco-editor-samples/pull/92) + +Contributions to `monaco-editor-webpack-plugin`: + +* [@six-ponies (马騳骉)](https://github.com/six-ponies): fix: Failed to execute 'importScripts' on 'WorkerGlobalScope': The URL xxx is invalid. [PR #160](https://github.com/microsoft/monaco-editor-webpack-plugin/pull/160) + +Contributions to `monaco-languages`: + +* [@aaaaaa2493 (Vladimir Turov)](https://github.com/aaaaaa2493): Support Java 12-17 syntax [PR #159](https://github.com/microsoft/monaco-languages/pull/159) +* [@mbtools (Marc Bernard)](https://github.com/mbtools): Update ABAP syntax [PR #160](https://github.com/microsoft/monaco-languages/pull/160) +* [@scarolan (Sean Carolan)](https://github.com/scarolan): Replace // with # for line comments [PR #158](https://github.com/microsoft/monaco-languages/pull/158) +* [@valeriia-melnychuk (Valeriia Melnychuk)](https://github.com/valeriia-melnychuk): Implement syntax highlighting for Flow9 [PR #154](https://github.com/microsoft/monaco-languages/pull/154) + +Contributions to `monaco-typescript`: + +* [@paranoidjk (paranoidjk)](https://github.com/paranoidjk): feat: support find reference to extraLib [PR #84](https://github.com/microsoft/monaco-typescript/pull/84) +* [@troy351](https://github.com/troy351): Add type definition of `setInlayHintsOptions` [PR #83](https://github.com/microsoft/monaco-typescript/pull/83) + + ## [0.28.0] (22.09.2021) * adds [support for typescript inlay hints](https://github.com/microsoft/monaco-typescript/pull/82). Inlay hints can be enabled like this: diff --git a/package-lock.json b/package-lock.json index ad39ad25..27636a79 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2368,9 +2368,9 @@ "dev": true }, "monaco-editor-core": { - "version": "0.28.1", - "resolved": "https://registry.npmjs.org/monaco-editor-core/-/monaco-editor-core-0.28.1.tgz", - "integrity": "sha512-ikNy6KXmgKhV66W7xLkdECJLAAzDycUe6rhXbdmUaa6L23X70Y0jOaCj/W9gqAo4wUT3MpRmeKEgujNKKH9p8A==", + "version": "0.29.1", + "resolved": "https://registry.npmjs.org/monaco-editor-core/-/monaco-editor-core-0.29.1.tgz", + "integrity": "sha512-A2+iNWf2Jhy/yAJ8HaDIszEhAlS1xjLvQfbk41yAyGwC4wDwbcTymUud1g0I9nV31S1x7QlXNC0BABc2uZN1Qg==", "dev": true }, "monaco-html": { @@ -2386,15 +2386,15 @@ "dev": true }, "monaco-languages": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/monaco-languages/-/monaco-languages-2.8.1.tgz", - "integrity": "sha512-hzUZFhuhUtTicdfhbj1xUQt2aXI/7ef5Ava4NG1Qd1HHSPPG8vFWyeKOlA+QX+EiFkiq21NWXynx4smQ/Qp61A==", + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/monaco-languages/-/monaco-languages-2.9.0.tgz", + "integrity": "sha512-6a3eXBXP9kphkOb4SRA+WmhsXnV4EATIW+e0kQXiYPzdgD3CQE9M670njk9hGwKCRbyR/KK1WvlMAPKidlle3g==", "dev": true }, "monaco-typescript": { - "version": "4.8.1", - "resolved": "https://registry.npmjs.org/monaco-typescript/-/monaco-typescript-4.8.1.tgz", - "integrity": "sha512-H4spoQ8hTctMBd6vH/bBusF61slGCJF6BXsDkvurCcb8c8mrUhv3EiM6L09s4w/F9NJBbJ0xHezy3EvOEukEig==", + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/monaco-typescript/-/monaco-typescript-4.9.1.tgz", + "integrity": "sha512-ZxvQFK40fnNg6hhkIofwyH6XzaHSmxVsI41cwSLi4eNFaP/Z58tigUJ/g9evS6Evbm67SdhxvxB4jct/tq3oXw==", "dev": true }, "ms": { diff --git a/package.json b/package.json index ff805345..47afef86 100644 --- a/package.json +++ b/package.json @@ -23,11 +23,11 @@ "event-stream": "4.0.1", "gulp": "^4.0.2", "monaco-css": "3.8.1", - "monaco-editor-core": "0.28.1", + "monaco-editor-core": "0.29.1", "monaco-html": "3.8.1", "monaco-json": "3.8.1", - "monaco-languages": "2.8.1", - "monaco-typescript": "4.8.1", + "monaco-languages": "2.9.0", + "monaco-typescript": "4.9.1", "rimraf": "^3.0.2", "typedoc": "^0.20.29", "typescript": "4.2.3", diff --git a/test/playground.generated/customizing-the-appearence-exposed-colors.html b/test/playground.generated/customizing-the-appearence-exposed-colors.html index 873455ba..ccf7a538 100644 --- a/test/playground.generated/customizing-the-appearence-exposed-colors.html +++ b/test/playground.generated/customizing-the-appearence-exposed-colors.html @@ -144,6 +144,8 @@ monaco.editor.create(document.getElementById("container"), { 'editorLineNumber.activeForeground' // Color of editor active line number. 'editorRuler.foreground' // Color of the editor rulers. 'editorCodeLens.foreground' // Foreground color of editor code lenses +'editorInlayHint.foreground' // Foreground color of editor inlay hints +'editorInlayHint.background' // Background color of editor inlay hints 'editorBracketMatch.background' // Background color behind matching brackets 'editorBracketMatch.border' // Color for matching brackets boxes 'editorOverviewRuler.border' // Color of the overview ruler border. diff --git a/typedoc/monaco.d.ts b/typedoc/monaco.d.ts index bc8a371d..fd80825c 100644 --- a/typedoc/monaco.d.ts +++ b/typedoc/monaco.d.ts @@ -414,6 +414,7 @@ declare namespace monaco { readonly value: string; readonly isTrusted?: boolean; readonly supportThemeIcons?: boolean; + readonly supportHtml?: boolean; uris?: { [href: string]: UriComponents; }; @@ -871,7 +872,7 @@ declare namespace monaco.editor { * `domElement` should be empty (not contain other dom nodes). * The editor will read the size of `domElement`. */ - export function createDiffEditor(domElement: HTMLElement, options?: IDiffEditorConstructionOptions, override?: IEditorOverrideServices): IStandaloneDiffEditor; + export function createDiffEditor(domElement: HTMLElement, options?: IStandaloneDiffEditorConstructionOptions, override?: IEditorOverrideServices): IStandaloneDiffEditor; export interface IDiffNavigatorOptions { readonly followsCaret?: boolean; @@ -1184,12 +1185,12 @@ declare namespace monaco.editor { model?: ITextModel | null; /** * The initial value of the auto created model in the editor. - * To not create automatically a model, use `model: null`. + * To not automatically create a model, use `model: null`. */ value?: string; /** * The initial language of the auto created model in the editor. - * To not create automatically a model, use `model: null`. + * To not automatically create a model, use `model: null`. */ language?: string; /** @@ -1212,12 +1213,17 @@ declare namespace monaco.editor { * Defaults to "https://go.microsoft.com/fwlink/?linkid=852450" */ accessibilityHelpUrl?: string; + /** + * Container element to use for ARIA messages. + * Defaults to document.body. + */ + ariaContainerElement?: HTMLElement; } /** * The options to create a diff editor. */ - export interface IDiffEditorConstructionOptions extends IDiffEditorOptions { + export interface IStandaloneDiffEditorConstructionOptions extends IDiffEditorConstructionOptions { /** * Initial theme to be used for rendering. * The current out-of-the-box available themes are: 'vs' (default), 'vs-dark', 'hc-black'. @@ -3216,16 +3222,6 @@ declare namespace monaco.editor { * Defaults to false. */ renderControlCharacters?: boolean; - /** - * Enable rendering of indent guides. - * Defaults to true. - */ - renderIndentGuides?: boolean; - /** - * Enable highlighting of the active indent guide. - * Defaults to true. - */ - highlightActiveIndentGuide?: boolean; /** * Enable rendering of current line highlight. * Defaults to all. @@ -3286,12 +3282,13 @@ declare namespace monaco.editor { * Control if the editor should use shadow DOM. */ useShadowDOM?: boolean; + /** + * Controls the behavior of editor guides. + */ + guides?: IGuidesOptions; } - /** - * Configuration options for the diff editor. - */ - export interface IDiffEditorOptions extends IEditorOptions { + export interface IDiffEditorBaseOptions { /** * Allow the user to resize the diff editor split view. * Defaults to true. @@ -3307,6 +3304,11 @@ declare namespace monaco.editor { * Defaults to 5000. */ maxComputationTime?: number; + /** + * Maximum supported file size in MB. + * Defaults to 50. + */ + maxFileSize?: number; /** * Compute the diff by ignoring leading/trailing whitespace * Defaults to true. @@ -3327,11 +3329,6 @@ declare namespace monaco.editor { * Defaults to false. */ diffCodeLens?: boolean; - /** - * Is the diff editor inside another editor - * Defaults to false - */ - isInEmbeddedEditor?: boolean; /** * Is the diff editor should render overview ruler * Defaults to true @@ -3341,14 +3338,12 @@ declare namespace monaco.editor { * Control the wrapping of the diff editor. */ diffWordWrap?: 'off' | 'on' | 'inherit'; - /** - * Aria label for original editor. - */ - originalAriaLabel?: string; - /** - * Aria label for modified editor. - */ - modifiedAriaLabel?: string; + } + + /** + * Configuration options for the diff editor. + */ + export interface IDiffEditorOptions extends IEditorOptions, IDiffEditorBaseOptions { } /** @@ -3898,6 +3893,25 @@ declare namespace monaco.editor { export type InternalBracketPairColorizationOptions = Readonly>; + export interface IGuidesOptions { + /** + * Enable rendering of bracket pair guides. + */ + bracketPairs?: boolean; + /** + * Enable rendering of indent guides. + * Defaults to true. + */ + indentation?: boolean; + /** + * Enable highlighting of the active indent guide. + * Defaults to true. + */ + highlightActiveIndentation?: boolean; + } + + export type InternalGuidesOptions = Readonly>; + /** * Configuration options for editor suggest widget */ @@ -4107,45 +4121,45 @@ declare namespace monaco.editor { automaticLayout = 10, autoSurround = 11, bracketPairColorization = 12, - codeLens = 13, - codeLensFontFamily = 14, - codeLensFontSize = 15, - colorDecorators = 16, - columnSelection = 17, - comments = 18, - contextmenu = 19, - copyWithSyntaxHighlighting = 20, - cursorBlinking = 21, - cursorSmoothCaretAnimation = 22, - cursorStyle = 23, - cursorSurroundingLines = 24, - cursorSurroundingLinesStyle = 25, - cursorWidth = 26, - disableLayerHinting = 27, - disableMonospaceOptimizations = 28, - domReadOnly = 29, - dragAndDrop = 30, - emptySelectionClipboard = 31, - extraEditorClassName = 32, - fastScrollSensitivity = 33, - find = 34, - fixedOverflowWidgets = 35, - folding = 36, - foldingStrategy = 37, - foldingHighlight = 38, - foldingImportsByDefault = 39, - unfoldOnClickAfterEndOfLine = 40, - fontFamily = 41, - fontInfo = 42, - fontLigatures = 43, - fontSize = 44, - fontWeight = 45, - formatOnPaste = 46, - formatOnType = 47, - glyphMargin = 48, - gotoLocation = 49, - hideCursorInOverviewRuler = 50, - highlightActiveIndentGuide = 51, + guides = 13, + codeLens = 14, + codeLensFontFamily = 15, + codeLensFontSize = 16, + colorDecorators = 17, + columnSelection = 18, + comments = 19, + contextmenu = 20, + copyWithSyntaxHighlighting = 21, + cursorBlinking = 22, + cursorSmoothCaretAnimation = 23, + cursorStyle = 24, + cursorSurroundingLines = 25, + cursorSurroundingLinesStyle = 26, + cursorWidth = 27, + disableLayerHinting = 28, + disableMonospaceOptimizations = 29, + domReadOnly = 30, + dragAndDrop = 31, + emptySelectionClipboard = 32, + extraEditorClassName = 33, + fastScrollSensitivity = 34, + find = 35, + fixedOverflowWidgets = 36, + folding = 37, + foldingStrategy = 38, + foldingHighlight = 39, + foldingImportsByDefault = 40, + unfoldOnClickAfterEndOfLine = 41, + fontFamily = 42, + fontInfo = 43, + fontLigatures = 44, + fontSize = 45, + fontWeight = 46, + formatOnPaste = 47, + formatOnType = 48, + glyphMargin = 49, + gotoLocation = 50, + hideCursorInOverviewRuler = 51, hover = 52, inDiffEditor = 53, inlineSuggest = 54, @@ -4177,55 +4191,54 @@ declare namespace monaco.editor { readOnly = 80, renameOnType = 81, renderControlCharacters = 82, - renderIndentGuides = 83, - renderFinalNewline = 84, - renderLineHighlight = 85, - renderLineHighlightOnlyWhenFocus = 86, - renderValidationDecorations = 87, - renderWhitespace = 88, - revealHorizontalRightPadding = 89, - roundedSelection = 90, - rulers = 91, - scrollbar = 92, - scrollBeyondLastColumn = 93, - scrollBeyondLastLine = 94, - scrollPredominantAxis = 95, - selectionClipboard = 96, - selectionHighlight = 97, - selectOnLineNumbers = 98, - showFoldingControls = 99, - showUnused = 100, - snippetSuggestions = 101, - smartSelect = 102, - smoothScrolling = 103, - stickyTabStops = 104, - stopRenderingLineAfter = 105, - suggest = 106, - suggestFontSize = 107, - suggestLineHeight = 108, - suggestOnTriggerCharacters = 109, - suggestSelection = 110, - tabCompletion = 111, - tabIndex = 112, - unusualLineTerminators = 113, - useShadowDOM = 114, - useTabStops = 115, - wordSeparators = 116, - wordWrap = 117, - wordWrapBreakAfterCharacters = 118, - wordWrapBreakBeforeCharacters = 119, - wordWrapColumn = 120, - wordWrapOverride1 = 121, - wordWrapOverride2 = 122, - wrappingIndent = 123, - wrappingStrategy = 124, - showDeprecated = 125, - inlayHints = 126, - editorClassName = 127, - pixelRatio = 128, - tabFocusMode = 129, - layoutInfo = 130, - wrappingInfo = 131 + renderFinalNewline = 83, + renderLineHighlight = 84, + renderLineHighlightOnlyWhenFocus = 85, + renderValidationDecorations = 86, + renderWhitespace = 87, + revealHorizontalRightPadding = 88, + roundedSelection = 89, + rulers = 90, + scrollbar = 91, + scrollBeyondLastColumn = 92, + scrollBeyondLastLine = 93, + scrollPredominantAxis = 94, + selectionClipboard = 95, + selectionHighlight = 96, + selectOnLineNumbers = 97, + showFoldingControls = 98, + showUnused = 99, + snippetSuggestions = 100, + smartSelect = 101, + smoothScrolling = 102, + stickyTabStops = 103, + stopRenderingLineAfter = 104, + suggest = 105, + suggestFontSize = 106, + suggestLineHeight = 107, + suggestOnTriggerCharacters = 108, + suggestSelection = 109, + tabCompletion = 110, + tabIndex = 111, + unusualLineTerminators = 112, + useShadowDOM = 113, + useTabStops = 114, + wordSeparators = 115, + wordWrap = 116, + wordWrapBreakAfterCharacters = 117, + wordWrapBreakBeforeCharacters = 118, + wordWrapColumn = 119, + wordWrapOverride1 = 120, + wordWrapOverride2 = 121, + wrappingIndent = 122, + wrappingStrategy = 123, + showDeprecated = 124, + inlayHints = 125, + editorClassName = 126, + pixelRatio = 127, + tabFocusMode = 128, + layoutInfo = 129, + wrappingInfo = 130 } export const EditorOptions: { acceptSuggestionOnCommitCharacter: IEditorOption; @@ -4240,14 +4253,15 @@ declare namespace monaco.editor { autoIndent: IEditorOption; automaticLayout: IEditorOption; autoSurround: IEditorOption; - bracketPairColorization: IEditorOption; + bracketPairColorization: IEditorOption>>; + bracketPairGuides: IEditorOption>>; stickyTabStops: IEditorOption; codeLens: IEditorOption; codeLensFontFamily: IEditorOption; codeLensFontSize: IEditorOption; colorDecorators: IEditorOption; columnSelection: IEditorOption; - comments: IEditorOption; + comments: IEditorOption>>; contextmenu: IEditorOption; copyWithSyntaxHighlighting: IEditorOption; cursorBlinking: IEditorOption; @@ -4263,7 +4277,7 @@ declare namespace monaco.editor { emptySelectionClipboard: IEditorOption; extraEditorClassName: IEditorOption; fastScrollSensitivity: IEditorOption; - find: IEditorOption; + find: IEditorOption>>; fixedOverflowWidgets: IEditorOption; folding: IEditorOption; foldingStrategy: IEditorOption; @@ -4278,13 +4292,12 @@ declare namespace monaco.editor { formatOnPaste: IEditorOption; formatOnType: IEditorOption; glyphMargin: IEditorOption; - gotoLocation: IEditorOption; + gotoLocation: IEditorOption>>; hideCursorInOverviewRuler: IEditorOption; - highlightActiveIndentGuide: IEditorOption; - hover: IEditorOption; + hover: IEditorOption>>; inDiffEditor: IEditorOption; letterSpacing: IEditorOption; - lightbulb: IEditorOption; + lightbulb: IEditorOption>>; lineDecorationsWidth: IEditorOption; lineHeight: IEditorOption; lineNumbers: IEditorOption; @@ -4292,7 +4305,7 @@ declare namespace monaco.editor { linkedEditing: IEditorOption; links: IEditorOption; matchBrackets: IEditorOption; - minimap: IEditorOption; + minimap: IEditorOption>>; mouseStyle: IEditorOption; mouseWheelScrollSensitivity: IEditorOption; mouseWheelZoom: IEditorOption; @@ -4303,7 +4316,7 @@ declare namespace monaco.editor { overviewRulerBorder: IEditorOption; overviewRulerLanes: IEditorOption; padding: IEditorOption; - parameterHints: IEditorOption; + parameterHints: IEditorOption>>; peekWidgetDefaultFocus: IEditorOption; definitionLinkOpensInPeek: IEditorOption; quickSuggestions: IEditorOption; @@ -4311,7 +4324,6 @@ declare namespace monaco.editor { readOnly: IEditorOption; renameOnType: IEditorOption; renderControlCharacters: IEditorOption; - renderIndentGuides: IEditorOption; renderFinalNewline: IEditorOption; renderLineHighlight: IEditorOption; renderLineHighlightOnlyWhenFocus: IEditorOption; @@ -4330,13 +4342,13 @@ declare namespace monaco.editor { showFoldingControls: IEditorOption; showUnused: IEditorOption; showDeprecated: IEditorOption; - inlayHints: IEditorOption; + inlayHints: IEditorOption>>; snippetSuggestions: IEditorOption; - smartSelect: IEditorOption; + smartSelect: IEditorOption>>; smoothScrolling: IEditorOption; stopRenderingLineAfter: IEditorOption; - suggest: IEditorOption; - inlineSuggest: IEditorOption; + suggest: IEditorOption>>; + inlineSuggest: IEditorOption>>; suggestFontSize: IEditorOption; suggestLineHeight: IEditorOption; suggestOnTriggerCharacters: IEditorOption; @@ -4706,6 +4718,19 @@ declare namespace monaco.editor { * Defaults to an internal DOM node. */ overflowWidgetsDomNode?: HTMLElement; + /** + * Aria label for original editor. + */ + originalAriaLabel?: string; + /** + * Aria label for modified editor. + */ + modifiedAriaLabel?: string; + /** + * Is the diff editor inside another editor + * Defaults to false + */ + isInEmbeddedEditor?: boolean; } /** @@ -5451,6 +5476,10 @@ declare namespace monaco.languages { * Provide commands for the given document and range. */ provideCodeActions(model: editor.ITextModel, range: Range, context: CodeActionContext, token: CancellationToken): ProviderResult; + /** + * Given a code action fill in the edit. Will only invoked when missing. + */ + resolveCodeAction?(codeAction: CodeAction, token: CancellationToken): ProviderResult; } /** diff --git a/website/playground/monaco.d.ts.txt b/website/playground/monaco.d.ts.txt index bc8a371d..fd80825c 100644 --- a/website/playground/monaco.d.ts.txt +++ b/website/playground/monaco.d.ts.txt @@ -414,6 +414,7 @@ declare namespace monaco { readonly value: string; readonly isTrusted?: boolean; readonly supportThemeIcons?: boolean; + readonly supportHtml?: boolean; uris?: { [href: string]: UriComponents; }; @@ -871,7 +872,7 @@ declare namespace monaco.editor { * `domElement` should be empty (not contain other dom nodes). * The editor will read the size of `domElement`. */ - export function createDiffEditor(domElement: HTMLElement, options?: IDiffEditorConstructionOptions, override?: IEditorOverrideServices): IStandaloneDiffEditor; + export function createDiffEditor(domElement: HTMLElement, options?: IStandaloneDiffEditorConstructionOptions, override?: IEditorOverrideServices): IStandaloneDiffEditor; export interface IDiffNavigatorOptions { readonly followsCaret?: boolean; @@ -1184,12 +1185,12 @@ declare namespace monaco.editor { model?: ITextModel | null; /** * The initial value of the auto created model in the editor. - * To not create automatically a model, use `model: null`. + * To not automatically create a model, use `model: null`. */ value?: string; /** * The initial language of the auto created model in the editor. - * To not create automatically a model, use `model: null`. + * To not automatically create a model, use `model: null`. */ language?: string; /** @@ -1212,12 +1213,17 @@ declare namespace monaco.editor { * Defaults to "https://go.microsoft.com/fwlink/?linkid=852450" */ accessibilityHelpUrl?: string; + /** + * Container element to use for ARIA messages. + * Defaults to document.body. + */ + ariaContainerElement?: HTMLElement; } /** * The options to create a diff editor. */ - export interface IDiffEditorConstructionOptions extends IDiffEditorOptions { + export interface IStandaloneDiffEditorConstructionOptions extends IDiffEditorConstructionOptions { /** * Initial theme to be used for rendering. * The current out-of-the-box available themes are: 'vs' (default), 'vs-dark', 'hc-black'. @@ -3216,16 +3222,6 @@ declare namespace monaco.editor { * Defaults to false. */ renderControlCharacters?: boolean; - /** - * Enable rendering of indent guides. - * Defaults to true. - */ - renderIndentGuides?: boolean; - /** - * Enable highlighting of the active indent guide. - * Defaults to true. - */ - highlightActiveIndentGuide?: boolean; /** * Enable rendering of current line highlight. * Defaults to all. @@ -3286,12 +3282,13 @@ declare namespace monaco.editor { * Control if the editor should use shadow DOM. */ useShadowDOM?: boolean; + /** + * Controls the behavior of editor guides. + */ + guides?: IGuidesOptions; } - /** - * Configuration options for the diff editor. - */ - export interface IDiffEditorOptions extends IEditorOptions { + export interface IDiffEditorBaseOptions { /** * Allow the user to resize the diff editor split view. * Defaults to true. @@ -3307,6 +3304,11 @@ declare namespace monaco.editor { * Defaults to 5000. */ maxComputationTime?: number; + /** + * Maximum supported file size in MB. + * Defaults to 50. + */ + maxFileSize?: number; /** * Compute the diff by ignoring leading/trailing whitespace * Defaults to true. @@ -3327,11 +3329,6 @@ declare namespace monaco.editor { * Defaults to false. */ diffCodeLens?: boolean; - /** - * Is the diff editor inside another editor - * Defaults to false - */ - isInEmbeddedEditor?: boolean; /** * Is the diff editor should render overview ruler * Defaults to true @@ -3341,14 +3338,12 @@ declare namespace monaco.editor { * Control the wrapping of the diff editor. */ diffWordWrap?: 'off' | 'on' | 'inherit'; - /** - * Aria label for original editor. - */ - originalAriaLabel?: string; - /** - * Aria label for modified editor. - */ - modifiedAriaLabel?: string; + } + + /** + * Configuration options for the diff editor. + */ + export interface IDiffEditorOptions extends IEditorOptions, IDiffEditorBaseOptions { } /** @@ -3898,6 +3893,25 @@ declare namespace monaco.editor { export type InternalBracketPairColorizationOptions = Readonly>; + export interface IGuidesOptions { + /** + * Enable rendering of bracket pair guides. + */ + bracketPairs?: boolean; + /** + * Enable rendering of indent guides. + * Defaults to true. + */ + indentation?: boolean; + /** + * Enable highlighting of the active indent guide. + * Defaults to true. + */ + highlightActiveIndentation?: boolean; + } + + export type InternalGuidesOptions = Readonly>; + /** * Configuration options for editor suggest widget */ @@ -4107,45 +4121,45 @@ declare namespace monaco.editor { automaticLayout = 10, autoSurround = 11, bracketPairColorization = 12, - codeLens = 13, - codeLensFontFamily = 14, - codeLensFontSize = 15, - colorDecorators = 16, - columnSelection = 17, - comments = 18, - contextmenu = 19, - copyWithSyntaxHighlighting = 20, - cursorBlinking = 21, - cursorSmoothCaretAnimation = 22, - cursorStyle = 23, - cursorSurroundingLines = 24, - cursorSurroundingLinesStyle = 25, - cursorWidth = 26, - disableLayerHinting = 27, - disableMonospaceOptimizations = 28, - domReadOnly = 29, - dragAndDrop = 30, - emptySelectionClipboard = 31, - extraEditorClassName = 32, - fastScrollSensitivity = 33, - find = 34, - fixedOverflowWidgets = 35, - folding = 36, - foldingStrategy = 37, - foldingHighlight = 38, - foldingImportsByDefault = 39, - unfoldOnClickAfterEndOfLine = 40, - fontFamily = 41, - fontInfo = 42, - fontLigatures = 43, - fontSize = 44, - fontWeight = 45, - formatOnPaste = 46, - formatOnType = 47, - glyphMargin = 48, - gotoLocation = 49, - hideCursorInOverviewRuler = 50, - highlightActiveIndentGuide = 51, + guides = 13, + codeLens = 14, + codeLensFontFamily = 15, + codeLensFontSize = 16, + colorDecorators = 17, + columnSelection = 18, + comments = 19, + contextmenu = 20, + copyWithSyntaxHighlighting = 21, + cursorBlinking = 22, + cursorSmoothCaretAnimation = 23, + cursorStyle = 24, + cursorSurroundingLines = 25, + cursorSurroundingLinesStyle = 26, + cursorWidth = 27, + disableLayerHinting = 28, + disableMonospaceOptimizations = 29, + domReadOnly = 30, + dragAndDrop = 31, + emptySelectionClipboard = 32, + extraEditorClassName = 33, + fastScrollSensitivity = 34, + find = 35, + fixedOverflowWidgets = 36, + folding = 37, + foldingStrategy = 38, + foldingHighlight = 39, + foldingImportsByDefault = 40, + unfoldOnClickAfterEndOfLine = 41, + fontFamily = 42, + fontInfo = 43, + fontLigatures = 44, + fontSize = 45, + fontWeight = 46, + formatOnPaste = 47, + formatOnType = 48, + glyphMargin = 49, + gotoLocation = 50, + hideCursorInOverviewRuler = 51, hover = 52, inDiffEditor = 53, inlineSuggest = 54, @@ -4177,55 +4191,54 @@ declare namespace monaco.editor { readOnly = 80, renameOnType = 81, renderControlCharacters = 82, - renderIndentGuides = 83, - renderFinalNewline = 84, - renderLineHighlight = 85, - renderLineHighlightOnlyWhenFocus = 86, - renderValidationDecorations = 87, - renderWhitespace = 88, - revealHorizontalRightPadding = 89, - roundedSelection = 90, - rulers = 91, - scrollbar = 92, - scrollBeyondLastColumn = 93, - scrollBeyondLastLine = 94, - scrollPredominantAxis = 95, - selectionClipboard = 96, - selectionHighlight = 97, - selectOnLineNumbers = 98, - showFoldingControls = 99, - showUnused = 100, - snippetSuggestions = 101, - smartSelect = 102, - smoothScrolling = 103, - stickyTabStops = 104, - stopRenderingLineAfter = 105, - suggest = 106, - suggestFontSize = 107, - suggestLineHeight = 108, - suggestOnTriggerCharacters = 109, - suggestSelection = 110, - tabCompletion = 111, - tabIndex = 112, - unusualLineTerminators = 113, - useShadowDOM = 114, - useTabStops = 115, - wordSeparators = 116, - wordWrap = 117, - wordWrapBreakAfterCharacters = 118, - wordWrapBreakBeforeCharacters = 119, - wordWrapColumn = 120, - wordWrapOverride1 = 121, - wordWrapOverride2 = 122, - wrappingIndent = 123, - wrappingStrategy = 124, - showDeprecated = 125, - inlayHints = 126, - editorClassName = 127, - pixelRatio = 128, - tabFocusMode = 129, - layoutInfo = 130, - wrappingInfo = 131 + renderFinalNewline = 83, + renderLineHighlight = 84, + renderLineHighlightOnlyWhenFocus = 85, + renderValidationDecorations = 86, + renderWhitespace = 87, + revealHorizontalRightPadding = 88, + roundedSelection = 89, + rulers = 90, + scrollbar = 91, + scrollBeyondLastColumn = 92, + scrollBeyondLastLine = 93, + scrollPredominantAxis = 94, + selectionClipboard = 95, + selectionHighlight = 96, + selectOnLineNumbers = 97, + showFoldingControls = 98, + showUnused = 99, + snippetSuggestions = 100, + smartSelect = 101, + smoothScrolling = 102, + stickyTabStops = 103, + stopRenderingLineAfter = 104, + suggest = 105, + suggestFontSize = 106, + suggestLineHeight = 107, + suggestOnTriggerCharacters = 108, + suggestSelection = 109, + tabCompletion = 110, + tabIndex = 111, + unusualLineTerminators = 112, + useShadowDOM = 113, + useTabStops = 114, + wordSeparators = 115, + wordWrap = 116, + wordWrapBreakAfterCharacters = 117, + wordWrapBreakBeforeCharacters = 118, + wordWrapColumn = 119, + wordWrapOverride1 = 120, + wordWrapOverride2 = 121, + wrappingIndent = 122, + wrappingStrategy = 123, + showDeprecated = 124, + inlayHints = 125, + editorClassName = 126, + pixelRatio = 127, + tabFocusMode = 128, + layoutInfo = 129, + wrappingInfo = 130 } export const EditorOptions: { acceptSuggestionOnCommitCharacter: IEditorOption; @@ -4240,14 +4253,15 @@ declare namespace monaco.editor { autoIndent: IEditorOption; automaticLayout: IEditorOption; autoSurround: IEditorOption; - bracketPairColorization: IEditorOption; + bracketPairColorization: IEditorOption>>; + bracketPairGuides: IEditorOption>>; stickyTabStops: IEditorOption; codeLens: IEditorOption; codeLensFontFamily: IEditorOption; codeLensFontSize: IEditorOption; colorDecorators: IEditorOption; columnSelection: IEditorOption; - comments: IEditorOption; + comments: IEditorOption>>; contextmenu: IEditorOption; copyWithSyntaxHighlighting: IEditorOption; cursorBlinking: IEditorOption; @@ -4263,7 +4277,7 @@ declare namespace monaco.editor { emptySelectionClipboard: IEditorOption; extraEditorClassName: IEditorOption; fastScrollSensitivity: IEditorOption; - find: IEditorOption; + find: IEditorOption>>; fixedOverflowWidgets: IEditorOption; folding: IEditorOption; foldingStrategy: IEditorOption; @@ -4278,13 +4292,12 @@ declare namespace monaco.editor { formatOnPaste: IEditorOption; formatOnType: IEditorOption; glyphMargin: IEditorOption; - gotoLocation: IEditorOption; + gotoLocation: IEditorOption>>; hideCursorInOverviewRuler: IEditorOption; - highlightActiveIndentGuide: IEditorOption; - hover: IEditorOption; + hover: IEditorOption>>; inDiffEditor: IEditorOption; letterSpacing: IEditorOption; - lightbulb: IEditorOption; + lightbulb: IEditorOption>>; lineDecorationsWidth: IEditorOption; lineHeight: IEditorOption; lineNumbers: IEditorOption; @@ -4292,7 +4305,7 @@ declare namespace monaco.editor { linkedEditing: IEditorOption; links: IEditorOption; matchBrackets: IEditorOption; - minimap: IEditorOption; + minimap: IEditorOption>>; mouseStyle: IEditorOption; mouseWheelScrollSensitivity: IEditorOption; mouseWheelZoom: IEditorOption; @@ -4303,7 +4316,7 @@ declare namespace monaco.editor { overviewRulerBorder: IEditorOption; overviewRulerLanes: IEditorOption; padding: IEditorOption; - parameterHints: IEditorOption; + parameterHints: IEditorOption>>; peekWidgetDefaultFocus: IEditorOption; definitionLinkOpensInPeek: IEditorOption; quickSuggestions: IEditorOption; @@ -4311,7 +4324,6 @@ declare namespace monaco.editor { readOnly: IEditorOption; renameOnType: IEditorOption; renderControlCharacters: IEditorOption; - renderIndentGuides: IEditorOption; renderFinalNewline: IEditorOption; renderLineHighlight: IEditorOption; renderLineHighlightOnlyWhenFocus: IEditorOption; @@ -4330,13 +4342,13 @@ declare namespace monaco.editor { showFoldingControls: IEditorOption; showUnused: IEditorOption; showDeprecated: IEditorOption; - inlayHints: IEditorOption; + inlayHints: IEditorOption>>; snippetSuggestions: IEditorOption; - smartSelect: IEditorOption; + smartSelect: IEditorOption>>; smoothScrolling: IEditorOption; stopRenderingLineAfter: IEditorOption; - suggest: IEditorOption; - inlineSuggest: IEditorOption; + suggest: IEditorOption>>; + inlineSuggest: IEditorOption>>; suggestFontSize: IEditorOption; suggestLineHeight: IEditorOption; suggestOnTriggerCharacters: IEditorOption; @@ -4706,6 +4718,19 @@ declare namespace monaco.editor { * Defaults to an internal DOM node. */ overflowWidgetsDomNode?: HTMLElement; + /** + * Aria label for original editor. + */ + originalAriaLabel?: string; + /** + * Aria label for modified editor. + */ + modifiedAriaLabel?: string; + /** + * Is the diff editor inside another editor + * Defaults to false + */ + isInEmbeddedEditor?: boolean; } /** @@ -5451,6 +5476,10 @@ declare namespace monaco.languages { * Provide commands for the given document and range. */ provideCodeActions(model: editor.ITextModel, range: Range, context: CodeActionContext, token: CancellationToken): ProviderResult; + /** + * Given a code action fill in the edit. Will only invoked when missing. + */ + resolveCodeAction?(codeAction: CodeAction, token: CancellationToken): ProviderResult; } /**