From fce1d2eed86e3b18ad98101d726faa007adb5981 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Tue, 11 Feb 2020 00:18:08 +0100 Subject: [PATCH] Prepare for 0.20.0 --- CHANGELOG.md | 31 ++ gulpfile.js | 7 +- monaco.d.ts | 697 ++++++++++++++++++++--------- package-lock.json | 440 +++++++++--------- package.json | 24 +- website/playground/monaco.d.ts.txt | 697 ++++++++++++++++++++--------- 6 files changed, 1243 insertions(+), 653 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c03925a0..8d16fabb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,36 @@ # Monaco Editor Changelog +## [0.20.0] (11.02.2020) + +### New & Noteworthy +* There is new API to read the editor's content width and height. +* New editor options: + * `renderValidationDecorations` - render validation decorations even in read only editors + * `wrappingStrategy` - delegate wrapping points computation to the browser + * `comments.insertSpace` - insert a space around comments when running commenting commands + * `foldingHighlight` - highlight folded regions + * `peekWidgetDefaultFocus` - focus the inline editor or the tree when opening peek view + +### Breaking changes +* Renamed `onCompositionStart`, `onCompositionEnd` to `onDidCompositionStart`, `onDidCompositionEnd` +* Changed the argument passed in to `onDidPaste` +* `WorkspaceEdit.edits` has now changed its shape such that edits must no longer be grouped by resource. + +### Thank you + +Contributions to `monaco-editor`: + +* [Josh Goldberg (@JoshuaKGoldberg)](https://github.com/JoshuaKGoldberg): Added section in Monarch docs for Inspect Tokens development helper [PR #1807](https://github.com/microsoft/monaco-editor/pull/1807) + +Contributions to `monaco-typescript`: + +* [Elizabeth Craig (@ecraig12345)](https://github.com/ecraig12345): Add types for TypeScriptWorker and missing LanguageServiceDefaults methods [PR #54](https://github.com/microsoft/monaco-typescript/pull/54) + +Contributions to `monaco-languages`: + +* [alan.invents (@ALANVF)](https://github.com/ALANVF): Highlight function definitions better [PR #79](https://github.com/microsoft/monaco-languages/pull/79) +* [@nrayburn-tech](https://github.com/nrayburn-tech): Add support for multiline comments in Swift [PR #80](https://github.com/microsoft/monaco-languages/pull/80) + ## [0.19.3] (14.01.2020) * brings back a way to get resolved editor options - [#1734](https://github.com/microsoft/monaco-editor/issues/1734) diff --git a/gulpfile.js b/gulpfile.js index e7e7c09c..45e8d096 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -506,8 +506,13 @@ function toExternalDTS(contents) { if (line.indexOf('declare namespace monaco.') === 0) { lines[i] = line.replace('declare namespace monaco.', 'export namespace '); } + + if (line.indexOf('declare let MonacoEnvironment') === 0) { + lines[i] = `declare global {\n let MonacoEnvironment: Environment | undefined;\n}`; + // lines[i] = line.replace('declare namespace monaco.', 'export namespace '); + } } - return lines.join('\n'); + return lines.join('\n').replace(/\n\n\n+/g, '\n\n'); } /** diff --git a/monaco.d.ts b/monaco.d.ts index 37789bcf..1047328e 100644 --- a/monaco.d.ts +++ b/monaco.d.ts @@ -8,12 +8,18 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ +declare let MonacoEnvironment: monaco.Environment | undefined; + declare namespace monaco { - // THIS IS A GENERATED FILE. DO NOT EDIT DIRECTLY. - export type Thenable = PromiseLike; + export interface Environment { + baseUrl?: string; + getWorker?(workerId: string, label: string): Worker; + getWorkerUrl?(workerId: string, label: string): string; + } + export interface IDisposable { dispose(): void; } @@ -385,6 +391,7 @@ declare namespace monaco { export interface IMarkdownString { readonly value: string; readonly isTrusted?: boolean; + readonly supportThemeIcons?: boolean; uris?: { [href: string]: UriComponents; }; @@ -409,6 +416,7 @@ declare namespace monaco { readonly leftButton: boolean; readonly middleButton: boolean; readonly rightButton: boolean; + readonly buttons: number; readonly target: HTMLElement; readonly detail: number; readonly posx: number; @@ -1049,7 +1057,7 @@ declare namespace monaco.editor { * Method that will be executed when the action is triggered. * @param editor The editor instance is passed in as a convenience */ - run(editor: ICodeEditor): void | Promise; + run(editor: ICodeEditor, ...args: any[]): void | Promise; } /** @@ -1064,7 +1072,7 @@ declare namespace monaco.editor { tabSize?: number; /** * Insert spaces when pressing `Tab`. - * This setting is overridden based on the file contents when detectIndentation` is on. + * This setting is overridden based on the file contents when `detectIndentation` is on. * Defaults to true. */ insertSpaces?: boolean; @@ -1179,7 +1187,10 @@ declare namespace monaco.editor { owner: string; resource: Uri; severity: MarkerSeverity; - code?: string; + code?: string | { + value: string; + link: Uri; + }; message: string; source?: string; startLineNumber: number; @@ -1194,7 +1205,10 @@ declare namespace monaco.editor { * A structure defining a problem/warning/etc. */ export interface IMarkerData { - code?: string; + code?: string | { + value: string; + link: Uri; + }; severity: MarkerSeverity; message: string; source?: string; @@ -1458,20 +1472,6 @@ declare namespace monaco.editor { CRLF = 1 } - /** - * An identifier for a single edit operation. - */ - export interface ISingleEditOperationIdentifier { - /** - * Identifier major - */ - major: number; - /** - * Identifier minor - */ - minor: number; - } - /** * A single edit operation, that acts as a simple replace. * i.e. Replace text at `range` with `text` in model. @@ -1910,14 +1910,14 @@ declare namespace monaco.editor { * @param range The range to replace (delete). May be empty to represent a simple insert. * @param text The text to replace with. May be null to represent a simple delete. */ - addEditOperation(range: Range, text: string | null): void; + addEditOperation(range: Range, text: string | null, forceMoveMarkers?: boolean): void; /** * Add a new edit operation (a replace operation). * The inverse edits will be accessible in `ICursorStateComputerData.getInverseEditOperations()` * @param range The range to replace (delete). May be empty to represent a simple insert. * @param text The text to replace with. May be null to represent a simple delete. */ - addTrackedEditOperation(range: Range, text: string | null): void; + addTrackedEditOperation(range: Range, text: string | null, forceMoveMarkers?: boolean): void; /** * Track `selection` when applying edit operations. * A best effort will be made to not grow/expand the selection. @@ -2025,6 +2025,13 @@ declare namespace monaco.editor { readonly charChanges: ICharChange[] | undefined; } + export interface IContentSizeChangedEvent { + readonly contentWidth: number; + readonly contentHeight: number; + readonly contentWidthChanged: boolean; + readonly contentHeightChanged: boolean; + } + export interface INewScrollPosition { scrollLeft?: number; scrollTop?: number; @@ -2363,23 +2370,6 @@ declare namespace monaco.editor { export interface IModelDecorationsChangedEvent { } - /** - * An event describing that some ranges of lines have been tokenized (their tokens have changed). - */ - export interface IModelTokensChangedEvent { - readonly tokenizationSupportChanged: boolean; - readonly ranges: { - /** - * The start of the range (inclusive) - */ - readonly fromLineNumber: number; - /** - * The end of the range (inclusive) - */ - readonly toLineNumber: number; - }[]; - } - export interface IModelOptionsChangedEvent { readonly tabSize: boolean; readonly indentSize: boolean; @@ -2544,7 +2534,7 @@ declare namespace monaco.editor { * If it is a function, it will be invoked when rendering a line number and the return value will be rendered. * Otherwise, if it is a truey, line numbers will be rendered normally (equivalent of using an identity function). * Otherwise, line numbers will not be rendered. - * Defaults to true. + * Defaults to `on`. */ lineNumbers?: LineNumbersType; /** @@ -2605,6 +2595,11 @@ declare namespace monaco.editor { * Defaults to false. */ readOnly?: boolean; + /** + * Should the editor render validation decorations. + * Defaults to editable. + */ + renderValidationDecorations?: 'editable' | 'on' | 'off'; /** * Control the behavior and rendering of the scrollbars. */ @@ -2731,21 +2726,21 @@ declare namespace monaco.editor { * Defaults to 'same' in vscode and to 'none' in monaco-editor. */ wrappingIndent?: 'none' | 'same' | 'indent' | 'deepIndent'; + /** + * Controls the wrapping strategy to use. + * Defaults to 'simple'. + */ + wrappingStrategy?: 'simple' | 'advanced'; /** * Configure word wrapping characters. A break will be introduced before these characters. - * Defaults to '{([+'. + * Defaults to '([{‘“〈《「『【〔([{「£¥$£¥++'. */ wordWrapBreakBeforeCharacters?: string; /** * Configure word wrapping characters. A break will be introduced after these characters. - * Defaults to ' \t})]?|&,;'. + * Defaults to ' \t})]?|/&.,;¢°′″‰℃、。。、¢,.:;?!%・・ゝゞヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻ァィゥェォャュョッー”〉》」』】〕)]}」'. */ wordWrapBreakAfterCharacters?: string; - /** - * Configure word wrapping characters. A break will be introduced after these characters only if no `wordWrapBreakBeforeCharacters` or `wordWrapBreakAfterCharacters` were found. - * Defaults to '.'. - */ - wordWrapBreakObtrusiveCharacters?: string; /** * Performance guard: Stop rendering a line after x characters. * Defaults to 10000. @@ -2765,6 +2760,10 @@ declare namespace monaco.editor { * Enable inline color decorators and color picker rendering. */ colorDecorators?: boolean; + /** + * Control the behaviour of comments in the editor. + */ + comments?: IEditorCommentsOptions; /** * Enable custom contextmenu. * Defaults to true. @@ -2846,8 +2845,8 @@ declare namespace monaco.editor { */ autoSurround?: EditorAutoSurroundStrategy; /** - * Enable auto indentation adjustment. - * Defaults to false. + * Controls whether the editor should automatically adjust the indentation when users type, paste, move or indent lines. + * Defaults to advanced. */ autoIndent?: 'none' | 'keep' | 'brackets' | 'advanced' | 'full'; /** @@ -2934,7 +2933,7 @@ declare namespace monaco.editor { */ codeActionsOnSaveTimeout?: number; /** - * Enable code folding + * Enable code folding. * Defaults to true. */ folding?: boolean; @@ -2943,6 +2942,11 @@ declare namespace monaco.editor { * Defaults to 'auto'. */ foldingStrategy?: 'auto' | 'indentation'; + /** + * Enable highlight for folded regions. + * Defaults to true. + */ + foldingHighlight?: boolean; /** * Controls whether the fold actions in the gutter stay always visible or hide unless the mouse is over the gutter. * Defaults to 'mouseover'. @@ -3006,6 +3010,11 @@ declare namespace monaco.editor { * Controls fading out of unused variables. */ showUnused?: boolean; + /** + * Controls whether to focus the inline editor in the peek widget by default. + * Defaults to false. + */ + peekWidgetDefaultFocus?: 'tree' | 'editor'; } export interface IEditorConstructionOptions extends IEditorOptions { @@ -3055,6 +3064,7 @@ declare namespace monaco.editor { * An event describing that the configuration of the editor has changed. */ export class ConfigurationChangedEvent { + hasChanged(id: EditorOption): boolean; } /** @@ -3070,6 +3080,19 @@ declare namespace monaco.editor { defaultValue: V; } + /** + * Configuration options for editor comments + */ + export interface IEditorCommentsOptions { + /** + * Insert a space after the line comment token and inside the block comments tokens. + * Defaults to true. + */ + insertSpace?: boolean; + } + + export type EditorCommentsOptions = Readonly>; + /** * The kind of animation in which the editor's cursor should be rendered. */ @@ -3239,10 +3262,6 @@ declare namespace monaco.editor { * The width of the glyph margin. */ readonly glyphMarginWidth: number; - /** - * The height of the glyph margin. - */ - readonly glyphMarginHeight: number; /** * Left position for the line numbers. */ @@ -3251,10 +3270,6 @@ declare namespace monaco.editor { * The width of the line numbers. */ readonly lineNumbersWidth: number; - /** - * The height of the line numbers. - */ - readonly lineNumbersHeight: number; /** * Left position for the line decorations. */ @@ -3263,10 +3278,6 @@ declare namespace monaco.editor { * The width of the line decorations. */ readonly decorationsWidth: number; - /** - * The height of the line decorations. - */ - readonly decorationsHeight: number; /** * Left position for the content (actual text) */ @@ -3275,10 +3286,6 @@ declare namespace monaco.editor { * The width of the content (actual text) */ readonly contentWidth: number; - /** - * The height of the content (actual height) - */ - readonly contentHeight: number; /** * The position for the minimap */ @@ -3620,6 +3627,10 @@ declare namespace monaco.editor { * Show snippet-suggestions. */ showSnippets?: boolean; + /** + * Controls the visibility of the status bar at the bottom of the suggest widget. + */ + hideStatusBar?: boolean; } export type InternalSuggestOptions = Readonly>; @@ -3667,102 +3678,106 @@ declare namespace monaco.editor { autoSurround = 10, codeLens = 11, colorDecorators = 12, - contextmenu = 13, - copyWithSyntaxHighlighting = 14, - cursorBlinking = 15, - cursorSmoothCaretAnimation = 16, - cursorStyle = 17, - cursorSurroundingLines = 18, - cursorSurroundingLinesStyle = 19, - cursorWidth = 20, - disableLayerHinting = 21, - disableMonospaceOptimizations = 22, - dragAndDrop = 23, - emptySelectionClipboard = 24, - extraEditorClassName = 25, - fastScrollSensitivity = 26, - find = 27, - fixedOverflowWidgets = 28, - folding = 29, - foldingStrategy = 30, - fontFamily = 31, - fontInfo = 32, - fontLigatures = 33, - fontSize = 34, - fontWeight = 35, - formatOnPaste = 36, - formatOnType = 37, - glyphMargin = 38, - gotoLocation = 39, - hideCursorInOverviewRuler = 40, - highlightActiveIndentGuide = 41, - hover = 42, - inDiffEditor = 43, - letterSpacing = 44, - lightbulb = 45, - lineDecorationsWidth = 46, - lineHeight = 47, - lineNumbers = 48, - lineNumbersMinChars = 49, - links = 50, - matchBrackets = 51, - minimap = 52, - mouseStyle = 53, - mouseWheelScrollSensitivity = 54, - mouseWheelZoom = 55, - multiCursorMergeOverlapping = 56, - multiCursorModifier = 57, - multiCursorPaste = 58, - occurrencesHighlight = 59, - overviewRulerBorder = 60, - overviewRulerLanes = 61, - parameterHints = 62, - quickSuggestions = 63, - quickSuggestionsDelay = 64, - readOnly = 65, - renderControlCharacters = 66, - renderIndentGuides = 67, - renderFinalNewline = 68, - renderLineHighlight = 69, - renderWhitespace = 70, - revealHorizontalRightPadding = 71, - roundedSelection = 72, - rulers = 73, - scrollbar = 74, - scrollBeyondLastColumn = 75, - scrollBeyondLastLine = 76, - selectionClipboard = 77, - selectionHighlight = 78, - selectOnLineNumbers = 79, - showFoldingControls = 80, - showUnused = 81, - snippetSuggestions = 82, - smoothScrolling = 83, - stopRenderingLineAfter = 84, - suggest = 85, - suggestFontSize = 86, - suggestLineHeight = 87, - suggestOnTriggerCharacters = 88, - suggestSelection = 89, - tabCompletion = 90, - useTabStops = 91, - wordSeparators = 92, - wordWrap = 93, - wordWrapBreakAfterCharacters = 94, - wordWrapBreakBeforeCharacters = 95, - wordWrapBreakObtrusiveCharacters = 96, - wordWrapColumn = 97, - wordWrapMinified = 98, - wrappingIndent = 99, - editorClassName = 100, - pixelRatio = 101, - tabFocusMode = 102, - layoutInfo = 103, - wrappingInfo = 104 + comments = 13, + contextmenu = 14, + copyWithSyntaxHighlighting = 15, + cursorBlinking = 16, + cursorSmoothCaretAnimation = 17, + cursorStyle = 18, + cursorSurroundingLines = 19, + cursorSurroundingLinesStyle = 20, + cursorWidth = 21, + disableLayerHinting = 22, + disableMonospaceOptimizations = 23, + dragAndDrop = 24, + emptySelectionClipboard = 25, + extraEditorClassName = 26, + fastScrollSensitivity = 27, + find = 28, + fixedOverflowWidgets = 29, + folding = 30, + foldingStrategy = 31, + foldingHighlight = 32, + fontFamily = 33, + fontInfo = 34, + fontLigatures = 35, + fontSize = 36, + fontWeight = 37, + formatOnPaste = 38, + formatOnType = 39, + glyphMargin = 40, + gotoLocation = 41, + hideCursorInOverviewRuler = 42, + highlightActiveIndentGuide = 43, + hover = 44, + inDiffEditor = 45, + letterSpacing = 46, + lightbulb = 47, + lineDecorationsWidth = 48, + lineHeight = 49, + lineNumbers = 50, + lineNumbersMinChars = 51, + links = 52, + matchBrackets = 53, + minimap = 54, + mouseStyle = 55, + mouseWheelScrollSensitivity = 56, + mouseWheelZoom = 57, + multiCursorMergeOverlapping = 58, + multiCursorModifier = 59, + multiCursorPaste = 60, + occurrencesHighlight = 61, + overviewRulerBorder = 62, + overviewRulerLanes = 63, + parameterHints = 64, + peekWidgetDefaultFocus = 65, + quickSuggestions = 66, + quickSuggestionsDelay = 67, + readOnly = 68, + renderControlCharacters = 69, + renderIndentGuides = 70, + renderFinalNewline = 71, + renderLineHighlight = 72, + renderValidationDecorations = 73, + renderWhitespace = 74, + revealHorizontalRightPadding = 75, + roundedSelection = 76, + rulers = 77, + scrollbar = 78, + scrollBeyondLastColumn = 79, + scrollBeyondLastLine = 80, + selectionClipboard = 81, + selectionHighlight = 82, + selectOnLineNumbers = 83, + showFoldingControls = 84, + showUnused = 85, + snippetSuggestions = 86, + smoothScrolling = 87, + stopRenderingLineAfter = 88, + suggest = 89, + suggestFontSize = 90, + suggestLineHeight = 91, + suggestOnTriggerCharacters = 92, + suggestSelection = 93, + tabCompletion = 94, + useTabStops = 95, + wordSeparators = 96, + wordWrap = 97, + wordWrapBreakAfterCharacters = 98, + wordWrapBreakBeforeCharacters = 99, + wordWrapColumn = 100, + wordWrapMinified = 101, + wrappingIndent = 102, + wrappingStrategy = 103, + editorClassName = 104, + pixelRatio = 105, + tabFocusMode = 106, + layoutInfo = 107, + wrappingInfo = 108 } export const EditorOptions: { acceptSuggestionOnCommitCharacter: IEditorOption; - acceptSuggestionOnEnter: IEditorOption; + acceptSuggestionOnEnter: IEditorOption; accessibilitySupport: IEditorOption; accessibilityPageSize: IEditorOption; ariaLabel: IEditorOption; @@ -3774,13 +3789,14 @@ declare namespace monaco.editor { autoSurround: IEditorOption; codeLens: IEditorOption; colorDecorators: IEditorOption; + comments: IEditorOption; contextmenu: IEditorOption; copyWithSyntaxHighlighting: IEditorOption; cursorBlinking: IEditorOption; cursorSmoothCaretAnimation: IEditorOption; cursorStyle: IEditorOption; cursorSurroundingLines: IEditorOption; - cursorSurroundingLinesStyle: IEditorOption; + cursorSurroundingLinesStyle: IEditorOption; cursorWidth: IEditorOption; disableLayerHinting: IEditorOption; disableMonospaceOptimizations: IEditorOption; @@ -3791,7 +3807,8 @@ declare namespace monaco.editor { find: IEditorOption; fixedOverflowWidgets: IEditorOption; folding: IEditorOption; - foldingStrategy: IEditorOption; + foldingStrategy: IEditorOption; + foldingHighlight: IEditorOption; fontFamily: IEditorOption; fontInfo: IEditorOption; fontLigatures2: IEditorOption; @@ -3812,26 +3829,28 @@ declare namespace monaco.editor { lineNumbers: IEditorOption; lineNumbersMinChars: IEditorOption; links: IEditorOption; - matchBrackets: IEditorOption; + matchBrackets: IEditorOption; minimap: IEditorOption; - mouseStyle: IEditorOption; + mouseStyle: IEditorOption; mouseWheelScrollSensitivity: IEditorOption; mouseWheelZoom: IEditorOption; multiCursorMergeOverlapping: IEditorOption; - multiCursorModifier: IEditorOption; - multiCursorPaste: IEditorOption; + multiCursorModifier: IEditorOption; + multiCursorPaste: IEditorOption; occurrencesHighlight: IEditorOption; overviewRulerBorder: IEditorOption; overviewRulerLanes: IEditorOption; parameterHints: IEditorOption; + peekWidgetDefaultFocus: IEditorOption; quickSuggestions: IEditorOption; quickSuggestionsDelay: IEditorOption; readOnly: IEditorOption; renderControlCharacters: IEditorOption; renderIndentGuides: IEditorOption; renderFinalNewline: IEditorOption; - renderLineHighlight: IEditorOption; - renderWhitespace: IEditorOption; + renderLineHighlight: IEditorOption; + renderValidationDecorations: IEditorOption; + renderWhitespace: IEditorOption; revealHorizontalRightPadding: IEditorOption; roundedSelection: IEditorOption; rulers: IEditorOption; @@ -3841,26 +3860,26 @@ declare namespace monaco.editor { selectionClipboard: IEditorOption; selectionHighlight: IEditorOption; selectOnLineNumbers: IEditorOption; - showFoldingControls: IEditorOption; + showFoldingControls: IEditorOption; showUnused: IEditorOption; - snippetSuggestions: IEditorOption; + snippetSuggestions: IEditorOption; smoothScrolling: IEditorOption; stopRenderingLineAfter: IEditorOption; suggest: IEditorOption; suggestFontSize: IEditorOption; suggestLineHeight: IEditorOption; suggestOnTriggerCharacters: IEditorOption; - suggestSelection: IEditorOption; - tabCompletion: IEditorOption; + suggestSelection: IEditorOption; + tabCompletion: IEditorOption; useTabStops: IEditorOption; wordSeparators: IEditorOption; - wordWrap: IEditorOption; + wordWrap: IEditorOption; wordWrapBreakAfterCharacters: IEditorOption; wordWrapBreakBeforeCharacters: IEditorOption; - wordWrapBreakObtrusiveCharacters: IEditorOption; wordWrapColumn: IEditorOption; wordWrapMinified: IEditorOption; wrappingIndent: IEditorOption; + wrappingStrategy: IEditorOption; editorClassName: IEditorOption; pixelRatio: IEditorOption; tabFocusMode: IEditorOption; @@ -4170,6 +4189,14 @@ declare namespace monaco.editor { readonly target: IMouseTarget | null; } + /** + * A paste event originating from the editor. + */ + export interface IPasteEvent { + readonly range: Range; + readonly mode: string | null; + } + /** * A rich code editor. */ @@ -4242,16 +4269,16 @@ declare namespace monaco.editor { /** * An event emitted after composition has started. */ - onCompositionStart(listener: () => void): IDisposable; + onDidCompositionStart(listener: () => void): IDisposable; /** * An event emitted after composition has ended. */ - onCompositionEnd(listener: () => void): IDisposable; + onDidCompositionEnd(listener: () => void): IDisposable; /** * An event emitted when users paste text in the editor. * @event */ - onDidPaste(listener: (range: Range) => void): IDisposable; + onDidPaste(listener: (e: IPasteEvent) => void): IDisposable; /** * An event emitted on a "mouseup". * @event @@ -4292,6 +4319,11 @@ declare namespace monaco.editor { * @event */ onDidLayoutChange(listener: (e: EditorLayoutInfo) => void): IDisposable; + /** + * An event emitted when the content width or content height in the editor has changed. + * @event + */ + onDidContentSizeChange(listener: (e: IContentSizeChangedEvent) => void): IDisposable; /** * An event emitted when the scroll in the editor has changed. * @event @@ -4353,6 +4385,11 @@ declare namespace monaco.editor { * @see `ITextModel.setValue` */ setValue(newValue: string): void; + /** + * Get the width of the editor's content. + * This is information that is "erased" when computing `scrollWidth = Math.max(contentWidth, width)` + */ + getContentWidth(): number; /** * Get the scrollWidth of the editor's viewport. */ @@ -4361,6 +4398,11 @@ declare namespace monaco.editor { * Get the scrollLeft of the editor's viewport. */ getScrollLeft(): number; + /** + * Get the height of the editor's content. + * This is information that is "erased" when computing `scrollHeight = Math.max(contentHeight, height)` + */ + getContentHeight(): number; /** * Get the scrollHeight of the editor's viewport. */ @@ -4438,6 +4480,10 @@ declare namespace monaco.editor { * Get the vertical position (top offset) for the position w.r.t. to the first line. */ getTopForPosition(lineNumber: number, column: number): number; + /** + * Returns the editor's container dom node + */ + getContainerDomNode(): HTMLElement; /** * Returns the editor's dom node */ @@ -4584,6 +4630,7 @@ declare namespace monaco.editor { readonly typicalFullwidthCharacterWidth: number; readonly canUseHalfwidthRightwardsArrow: boolean; readonly spaceWidth: number; + readonly middotWidth: number; readonly maxDigitWidth: number; } @@ -4822,6 +4869,16 @@ declare namespace monaco.languages { */ export function registerSelectionRangeProvider(languageId: string, provider: SelectionRangeProvider): IDisposable; + /** + * Register a document semantic tokens provider + */ + export function registerDocumentSemanticTokensProvider(languageId: string, provider: DocumentSemanticTokensProvider): IDisposable; + + /** + * Register a document range semantic tokens provider + */ + export function registerDocumentRangeSemanticTokensProvider(languageId: string, provider: DocumentRangeSemanticTokensProvider): IDisposable; + /** * Contains additional diagnostic information about the context in which * a [code action](#CodeActionProvider.provideCodeActions) is run. @@ -5143,6 +5200,25 @@ declare namespace monaco.languages { Snippet = 25 } + export interface CompletionItemLabel { + /** + * The function or variable. Rendered leftmost. + */ + name: string; + /** + * The signature without the return type. Render after `name`. + */ + signature?: string; + /** + * The fully qualified name, like package name or file path. Rendered after `signature`. + */ + qualifier?: string; + /** + * The return-type of a function or type of a property/variable. Rendered rightmost. + */ + type?: string; + } + export enum CompletionItemTag { Deprecated = 1 } @@ -5169,7 +5245,7 @@ declare namespace monaco.languages { * this is also the text that is inserted when selecting * this completion. */ - label: string; + label: string | CompletionItemLabel; /** * The kind of this completion item. Based on the kind * an icon is chosen by the editor. @@ -5209,7 +5285,7 @@ declare namespace monaco.languages { preselect?: boolean; /** * A string or snippet that should be inserted in a document when selecting - * this completion. + * this completion. When `falsy` the [label](#CompletionItem.label) * is used. */ insertText: string; @@ -5843,25 +5919,41 @@ declare namespace monaco.languages { constructor(value: string); } - export interface ResourceFileEdit { - oldUri?: Uri; - newUri?: Uri; - options?: { - overwrite?: boolean; - ignoreIfNotExists?: boolean; - ignoreIfExists?: boolean; - recursive?: boolean; + export interface WorkspaceEditMetadata { + needsConfirmation: boolean; + label: string; + description?: string; + iconPath?: { + id: string; + } | { + light: Uri; + dark: Uri; }; } - export interface ResourceTextEdit { + export interface WorkspaceFileEditOptions { + overwrite?: boolean; + ignoreIfNotExists?: boolean; + ignoreIfExists?: boolean; + recursive?: boolean; + } + + export interface WorkspaceFileEdit { + oldUri?: Uri; + newUri?: Uri; + options?: WorkspaceFileEditOptions; + metadata?: WorkspaceEditMetadata; + } + + export interface WorkspaceTextEdit { resource: Uri; + edit: TextEdit; modelVersionId?: number; - edits: TextEdit[]; + metadata?: WorkspaceEditMetadata; } export interface WorkspaceEdit { - edits: Array; + edits: Array; } export interface Rejection { @@ -5923,10 +6015,15 @@ declare namespace monaco.languages { readonly edits: SemanticTokensEdit[]; } - export interface SemanticTokensProvider { + export interface DocumentSemanticTokensProvider { getLegend(): SemanticTokensLegend; - provideSemanticTokens(model: editor.ITextModel, lastResultId: string | null, ranges: Range[] | null, token: CancellationToken): ProviderResult; - releaseSemanticTokens(resultId: string | undefined): void; + provideDocumentSemanticTokens(model: editor.ITextModel, lastResultId: string | null, token: CancellationToken): ProviderResult; + releaseDocumentSemanticTokens(resultId: string | undefined): void; + } + + export interface DocumentRangeSemanticTokensProvider { + getLegend(): SemanticTokensLegend; + provideDocumentRangeSemanticTokens(model: editor.ITextModel, range: Range, token: CancellationToken): ProviderResult; } export interface ILanguageExtensionPoint { @@ -6140,6 +6237,7 @@ declare namespace monaco.languages.typescript { interface CompilerOptions { allowJs?: boolean; allowSyntheticDefaultImports?: boolean; + allowUmdGlobalAccess?: boolean; allowUnreachableCode?: boolean; allowUnusedLabels?: boolean; alwaysStrict?: boolean; @@ -6151,6 +6249,7 @@ declare namespace monaco.languages.typescript { emitDeclarationOnly?: boolean; declarationDir?: string; disableSizeLimit?: boolean; + disableSourceOfProjectReferenceRedirect?: boolean; downlevelIteration?: boolean; emitBOM?: boolean; emitDecoratorMetadata?: boolean; @@ -6202,8 +6301,10 @@ declare namespace monaco.languages.typescript { sourceRoot?: string; strict?: boolean; strictFunctionTypes?: boolean; + strictBindCallApply?: boolean; strictNullChecks?: boolean; strictPropertyInitialization?: boolean; + stripInternal?: boolean; suppressExcessPropertyErrors?: boolean; suppressImplicitAnyIndexErrors?: boolean; target?: ScriptTarget; @@ -6213,6 +6314,7 @@ declare namespace monaco.languages.typescript { /** Paths used to compute primary types search locations */ typeRoots?: string[]; esModuleInterop?: boolean; + useDefineForClassFields?: boolean; [option: string]: CompilerOptionsValue | undefined; } @@ -6223,7 +6325,69 @@ declare namespace monaco.languages.typescript { diagnosticCodesToIgnore?: number[]; } + interface IExtraLib { + content: string; + version: number; + } + + interface IExtraLibs { + [path: string]: IExtraLib; + } + + /** + * A linked list of formatted diagnostic messages to be used as part of a multiline message. + * It is built from the bottom up, leaving the head to be the "main" diagnostic. + */ + interface DiagnosticMessageChain { + messageText: string; + /** Diagnostic category: warning = 0, error = 1, suggestion = 2, message = 3 */ + category: 0 | 1 | 2 | 3; + code: number; + next?: DiagnosticMessageChain[]; + } + interface Diagnostic extends DiagnosticRelatedInformation { + /** May store more in future. For now, this will simply be `true` to indicate when a diagnostic is an unused-identifier diagnostic. */ + reportsUnnecessary?: {}; + source?: string; + relatedInformation?: DiagnosticRelatedInformation[]; + } + interface DiagnosticRelatedInformation { + /** Diagnostic category: warning = 0, error = 1, suggestion = 2, message = 3 */ + category: 0 | 1 | 2 | 3; + code: number; + /** TypeScriptWorker removes this to avoid serializing circular JSON structures. */ + file: undefined; + start: number | undefined; + length: number | undefined; + messageText: string | DiagnosticMessageChain; + } + + interface EmitOutput { + outputFiles: OutputFile[]; + emitSkipped: boolean; + } + interface OutputFile { + name: string; + writeByteOrderMark: boolean; + text: string; + } + export interface LanguageServiceDefaults { + /** + * Event fired when compiler options or diagnostics options are changed. + */ + readonly onDidChange: IEvent; + + /** + * Event fired when extra libraries registered with the language service change. + */ + readonly onDidExtraLibsChange: IEvent; + + /** + * Get the current extra libs registered with the language service. + */ + getExtraLibs(): IExtraLibs; + /** * Add an additional source file to the language service. Use this * for typescript (definition) files that won't be loaded as editor @@ -6244,11 +6408,21 @@ declare namespace monaco.languages.typescript { */ setExtraLibs(libs: { content: string; filePath?: string }[]): void; + /** + * Get current TypeScript compiler options for the language service. + */ + getCompilerOptions(): CompilerOptions; + /** * Set TypeScript compiler options. */ setCompilerOptions(options: CompilerOptions): void; + /** + * Get the current diagnostics options for the language service. + */ + getDiagnosticsOptions(): DiagnosticsOptions; + /** * Configure whether syntactic and/or semantic validation should * be performed @@ -6256,10 +6430,7 @@ declare namespace monaco.languages.typescript { setDiagnosticsOptions(options: DiagnosticsOptions): void; /** - * Configure when the worker shuts down. By default that is 2mins. - * - * @param value The maximum idle time in milliseconds. Values less than one - * mean never shut down. + * No-op. */ setMaximumWorkerIdleTime(value: number): void; @@ -6268,15 +6439,139 @@ declare namespace monaco.languages.typescript { * to the worker on start or restart. */ setEagerModelSync(value: boolean): void; + + /** + * Get the current setting for whether all existing models should be eagerly sync'd + * to the worker on start or restart. + */ + getEagerModelSync(): boolean; } - export var typescriptVersion: string; + export interface TypeScriptWorker { + /** + * Get diagnostic messages for any syntax issues in the given file. + */ + getSyntacticDiagnostics(fileName: string): Promise; - export var typescriptDefaults: LanguageServiceDefaults; - export var javascriptDefaults: LanguageServiceDefaults; + /** + * Get diagnostic messages for any semantic issues in the given file. + */ + getSemanticDiagnostics(fileName: string): Promise; - export var getTypeScriptWorker: () => Promise; - export var getJavaScriptWorker: () => Promise; + /** + * Get diagnostic messages for any suggestions related to the given file. + */ + getSuggestionDiagnostics(fileName: string): Promise; + + /** + * Get diagnostic messages related to the current compiler options. + * @param fileName Not used + */ + getCompilerOptionsDiagnostics(fileName: string): Promise; + + /** + * Get code completions for the given file and position. + * @returns `Promise` + */ + getCompletionsAtPosition(fileName: string, position: number): Promise; + + /** + * Get code completion details for the given file, position, and entry. + * @returns `Promise` + */ + getCompletionEntryDetails(fileName: string, position: number, entry: string): Promise; + + /** + * Get signature help items for the item at the given file and position. + * @returns `Promise` + */ + getSignatureHelpItems(fileName: string, position: number): Promise; + + /** + * Get quick info for the item at the given position in the file. + * @returns `Promise` + */ + getQuickInfoAtPosition(fileName: string, position: number): Promise; + + /** + * Get other ranges which are related to the item at the given position in the file (often used for highlighting). + * @returns `Promise | undefined>` + */ + getOccurrencesAtPosition(fileName: string, position: number): Promise | undefined>; + + /** + * Get the definition of the item at the given position in the file. + * @returns `Promise | undefined>` + */ + getDefinitionAtPosition(fileName: string, position: number): Promise | undefined>; + + /** + * Get references to the item at the given position in the file. + * @returns `Promise` + */ + getReferencesAtPosition(fileName: string, position: number): Promise; + + /** + * Get outline entries for the item at the given position in the file. + * @returns `Promise` + */ + getNavigationBarItems(fileName: string): Promise; + + /** + * Get changes which should be applied to format the given file. + * @param options `typescript.FormatCodeOptions` + * @returns `Promise` + */ + getFormattingEditsForDocument(fileName: string, options: any): Promise; + + /** + * Get changes which should be applied to format the given range in the file. + * @param options `typescript.FormatCodeOptions` + * @returns `Promise` + */ + getFormattingEditsForRange(fileName: string, start: number, end: number, options: any): Promise; + + /** + * Get formatting changes which should be applied after the given keystroke. + * @param options `typescript.FormatCodeOptions` + * @returns `Promise` + */ + getFormattingEditsAfterKeystroke(fileName: string, postion: number, ch: string, options: any): Promise; + + /** + * Get other occurrences which should be updated when renaming the item at the given file and position. + * @returns `Promise` + */ + findRenameLocations(fileName: string, positon: number, findInStrings: boolean, findInComments: boolean, providePrefixAndSuffixTextForRename: boolean): Promise; + + /** + * Get edits which should be applied to rename the item at the given file and position (or a failure reason). + * @param options `typescript.RenameInfoOptions` + * @returns `Promise` + */ + getRenameInfo(fileName: string, positon: number, options: any): Promise; + + /** + * Get transpiled output for the given file. + * @returns `typescript.EmitOutput` + */ + getEmitOutput(fileName: string): Promise; + + /** + * Get possible code fixes at the given position in the file. + * @param formatOptions `typescript.FormatCodeOptions` + * @returns `Promise>` + */ + getCodeFixesAtPosition(fileName: string, start: number, end: number, errorCodes: number[], formatOptions: any): Promise>; + } + + export const typescriptVersion: string; + + export const typescriptDefaults: LanguageServiceDefaults; + export const javascriptDefaults: LanguageServiceDefaults; + + export const getTypeScriptWorker: () => Promise<(...uris: Uri[]) => Promise>; + export const getJavaScriptWorker: () => Promise<(...uris: Uri[]) => Promise>; } /*--------------------------------------------------------------------------------------------- diff --git a/package-lock.json b/package-lock.json index d4173ec7..e41c2a9d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -232,9 +232,9 @@ "dev": true }, "acorn": { - "version": "5.7.3", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.3.tgz", - "integrity": "sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw==", + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.0.tgz", + "integrity": "sha512-gac8OEcQ2Li1dxIEWGZzsp2BitJxwkwcOm0zHAJLcPJaVvm58FRnk6RkuLRpU1EujipU2ZFODv2P9DLMfnV8mw==", "dev": true }, "acorn-globals": { @@ -245,14 +245,6 @@ "requires": { "acorn": "^6.0.1", "acorn-walk": "^6.0.1" - }, - "dependencies": { - "acorn": { - "version": "6.4.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.0.tgz", - "integrity": "sha512-gac8OEcQ2Li1dxIEWGZzsp2BitJxwkwcOm0zHAJLcPJaVvm58FRnk6RkuLRpU1EujipU2ZFODv2P9DLMfnV8mw==", - "dev": true - } } }, "acorn-walk": { @@ -615,9 +607,9 @@ "dev": true }, "aws4": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.9.0.tgz", - "integrity": "sha512-Uvq6hVe90D0B2WEnUqtdgY1bATGz3mw33nH9Y+dmA+w5DHvUmBgkr5rM/KCHpCsiFNRUfokW/szpPPgMK2hm4A==", + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.9.1.tgz", + "integrity": "sha512-wMHVg2EOHaMRxbzgFJ9gtjOOCrI80OHLG14rxi28XwOW8ux6IiEbRCGGGqCtdAIg4FQCbW20k9RsT4y3gJlFug==", "dev": true }, "bach": { @@ -932,6 +924,15 @@ "y18n": "^4.0.0" }, "dependencies": { + "rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, "y18n": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", @@ -1080,9 +1081,9 @@ } }, "clean-css": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.1.tgz", - "integrity": "sha512-4ZxI6dy4lrY6FHzfiy1aEOXgu4LIsW2MhwG0VBKdcoGoH/XLFgaHSdLTGr4O8Be6A8r3MOphEiI8Gc1n0ecf3g==", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.3.tgz", + "integrity": "sha512-VcMWDN54ZN/DS+g58HYL5/n4Zrqe8vHJpGA8KdgUXFU4fuP/aHNw8eld9SyEIyabIMJX/0RaY/fplOo5hYLSFA==", "dev": true, "requires": { "source-map": "~0.6.0" @@ -1254,6 +1255,17 @@ "mkdirp": "^0.5.1", "rimraf": "^2.5.4", "run-queue": "^1.0.0" + }, + "dependencies": { + "rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + } } }, "copy-descriptor": { @@ -1422,19 +1434,6 @@ "abab": "^2.0.0", "whatwg-mimetype": "^2.2.0", "whatwg-url": "^7.0.0" - }, - "dependencies": { - "whatwg-url": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-7.1.0.tgz", - "integrity": "sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==", - "dev": true, - "requires": { - "lodash.sortby": "^4.7.0", - "tr46": "^1.0.1", - "webidl-conversions": "^4.0.2" - } - } } }, "debug": { @@ -1600,15 +1599,6 @@ "webidl-conversions": "^4.0.2" } }, - "dot-prop": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.0.tgz", - "integrity": "sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ==", - "dev": true, - "requires": { - "is-obj": "^1.0.0" - } - }, "duplexer": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz", @@ -1819,24 +1809,16 @@ "dev": true }, "escodegen": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.12.0.tgz", - "integrity": "sha512-TuA+EhsanGcme5T3R0L80u4t8CpbXQjegRmf7+FPTJrtCTErXFeelblRgHQa1FofEzqYYJmJ/OqjTwREp9qgmg==", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.14.1.tgz", + "integrity": "sha512-Bmt7NcRySdIfNPfU2ZoXDrrXsG9ZjvDxcAlMfDUgRBjLOWTuIACXPBFJH7Z+cLb40JeQco5toikyc9t9P8E9SQ==", "dev": true, "requires": { - "esprima": "^3.1.3", + "esprima": "^4.0.1", "estraverse": "^4.2.0", "esutils": "^2.0.2", "optionator": "^0.8.1", "source-map": "~0.6.1" - }, - "dependencies": { - "esprima": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz", - "integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=", - "dev": true - } } }, "eslint-scope": { @@ -1877,18 +1859,18 @@ "dev": true }, "event-stream": { - "version": "3.3.4", - "resolved": "https://registry.npmjs.org/event-stream/-/event-stream-3.3.4.tgz", - "integrity": "sha1-SrTJoPWlTbkzi0w02Gv86PSzVXE=", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/event-stream/-/event-stream-4.0.1.tgz", + "integrity": "sha512-qACXdu/9VHPBzcyhdOWR5/IahhGMf0roTeZJfzz077GwylcDd90yOHLouhmv7GJ5XzPi6ekaQWd8AvPP2nOvpA==", "dev": true, "requires": { - "duplexer": "~0.1.1", - "from": "~0", - "map-stream": "~0.1.0", - "pause-stream": "0.0.11", - "split": "0.3", - "stream-combiner": "~0.0.4", - "through": "~2.3.1" + "duplexer": "^0.1.1", + "from": "^0.1.7", + "map-stream": "0.0.7", + "pause-stream": "^0.0.11", + "split": "^1.0.1", + "stream-combiner": "^0.2.2", + "through": "^2.3.8" } }, "events": { @@ -3170,9 +3152,9 @@ } }, "handlebars": { - "version": "4.5.3", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.5.3.tgz", - "integrity": "sha512-3yPecJoJHK/4c6aZhSvxOyG4vJKDshV36VHp0iVCDVh7o9w2vwi3NSnL2MMPj3YdduqaBcu7cGbggJQM0br9xA==", + "version": "4.7.3", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.3.tgz", + "integrity": "sha512-SRGwSYuNfx8DwHD/6InAPzD6RgeruWLT+B8e8a7gGs8FWgHzlExpTFMEq2IA6QpAfOClpKHy6+8IqTjeBCu6Kg==", "dev": true, "requires": { "neo-async": "^2.6.0", @@ -3277,13 +3259,10 @@ "dev": true }, "highlight.js": { - "version": "9.17.0", - "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-9.17.0.tgz", - "integrity": "sha512-PyO7FK7z8ZC7FqBlmAxm4d+1DYaoS6+uaxt9KGkyP1AnmGRLnWmNod1yp9BFjUyHoDF00k+V57gF6X9ifY7f/A==", - "dev": true, - "requires": { - "handlebars": "^4.5.3" - } + "version": "9.18.1", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-9.18.1.tgz", + "integrity": "sha512-OrVKYz70LHsnCgmbXctv/bfuvntIKDz177h0Co37DQ5jamGZLVmoCVMtjMtNZY3X9DrCcKfklHPNeA0uPZhSJg==", + "dev": true }, "hmac-drbg": { "version": "1.0.1", @@ -3473,9 +3452,9 @@ } }, "is-absolute-url": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-absolute-url/-/is-absolute-url-2.1.0.tgz", - "integrity": "sha1-UFMN+4T8yap9vnhS6Do3uTufKqY=", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-absolute-url/-/is-absolute-url-3.0.3.tgz", + "integrity": "sha512-opmNIX7uFnS96NtPmhWQgQx6/NYFgsUXYMllcfzwWKUMwfo8kku1TvE6hkNcH+Q1ts5cMVrsY7j0bxXQDciu9Q==", "dev": true }, "is-accessor-descriptor": { @@ -3635,12 +3614,6 @@ } } }, - "is-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", - "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=", - "dev": true - }, "is-plain-object": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", @@ -3769,48 +3742,37 @@ "dev": true }, "jsdom": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-11.12.0.tgz", - "integrity": "sha512-y8Px43oyiBM13Zc1z780FrfNLJCXTL40EWlty/LXUtcjykRBNgLlCjWXpfSPBl2iv+N7koQN+dvqszHZgT/Fjw==", + "version": "14.1.0", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-14.1.0.tgz", + "integrity": "sha512-O901mfJSuTdwU2w3Sn+74T+RnDVP+FuV5fH8tcPWyqrseRAb0s5xOtPgCFiPOtLcyK7CLIJwPyD83ZqQWvA5ng==", "dev": true, "requires": { "abab": "^2.0.0", - "acorn": "^5.5.3", - "acorn-globals": "^4.1.0", + "acorn": "^6.0.4", + "acorn-globals": "^4.3.0", "array-equal": "^1.0.0", - "cssom": ">= 0.3.2 < 0.4.0", - "cssstyle": "^1.0.0", - "data-urls": "^1.0.0", + "cssom": "^0.3.4", + "cssstyle": "^1.1.1", + "data-urls": "^1.1.0", "domexception": "^1.0.1", - "escodegen": "^1.9.1", + "escodegen": "^1.11.0", "html-encoding-sniffer": "^1.0.2", - "left-pad": "^1.3.0", - "nwsapi": "^2.0.7", - "parse5": "4.0.0", + "nwsapi": "^2.1.3", + "parse5": "5.1.0", "pn": "^1.1.0", - "request": "^2.87.0", + "request": "^2.88.0", "request-promise-native": "^1.0.5", - "sax": "^1.2.4", + "saxes": "^3.1.9", "symbol-tree": "^3.2.2", - "tough-cookie": "^2.3.4", + "tough-cookie": "^2.5.0", "w3c-hr-time": "^1.0.1", + "w3c-xmlserializer": "^1.1.2", "webidl-conversions": "^4.0.2", - "whatwg-encoding": "^1.0.3", - "whatwg-mimetype": "^2.1.0", - "whatwg-url": "^6.4.1", - "ws": "^5.2.0", + "whatwg-encoding": "^1.0.5", + "whatwg-mimetype": "^2.3.0", + "whatwg-url": "^7.0.0", + "ws": "^6.1.2", "xml-name-validator": "^3.0.0" - }, - "dependencies": { - "ws": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/ws/-/ws-5.2.2.tgz", - "integrity": "sha512-jaHFD6PFv6UgoIVda6qZllptQsMlDEJkTQcybzzXDYM1XO9Y8em691FGMPmM46WGyLU4z9KMgQN+qrux/nhlHA==", - "dev": true, - "requires": { - "async-limiter": "~1.0.0" - } - } } }, "json-parse-better-errors": { @@ -3922,12 +3884,6 @@ "flush-write-stream": "^1.0.2" } }, - "left-pad": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/left-pad/-/left-pad-1.3.0.tgz", - "integrity": "sha512-XI5MPzVNApjAyhQzphX8BkmKsKUxD4LdyK24iZeQGinBN9yTQT3bFlCBy/aVx2HrNcqQGsdot8ghrjyrvMCoEA==", - "dev": true - }, "levn": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", @@ -4087,9 +4043,9 @@ "dev": true }, "map-stream": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/map-stream/-/map-stream-0.1.0.tgz", - "integrity": "sha1-5WqpTEyAVaFkBKBnS3jyFffI4ZQ=", + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/map-stream/-/map-stream-0.0.7.tgz", + "integrity": "sha1-ih8HiW2CsQkmvTdEokIACfiJdKg=", "dev": true }, "map-visit": { @@ -4102,9 +4058,9 @@ } }, "marked": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/marked/-/marked-0.7.0.tgz", - "integrity": "sha512-c+yYdCZJQrsRjTPhUx7VKkApw9bwDkNbHUKo1ovgcfDjb2kc8rLuRbIFyXL5WOEUwzSSKo3IXpph2K6DqB/KZg==", + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/marked/-/marked-0.8.0.tgz", + "integrity": "sha512-MyUe+T/Pw4TZufHkzAfDj6HarCBWia2y27/bhuYkTaiUnfDYFnCP3KUN+9oM7Wi6JA2rymtVYbQu3spE0GCmxQ==", "dev": true }, "matchdep": { @@ -4212,18 +4168,18 @@ "dev": true }, "mime-db": { - "version": "1.42.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.42.0.tgz", - "integrity": "sha512-UbfJCR4UAVRNgMpfImz05smAXK7+c+ZntjaA26ANtkXLlOe947Aag5zdIcKQULAiF9Cq4WxBi9jUs5zkA84bYQ==", + "version": "1.43.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.43.0.tgz", + "integrity": "sha512-+5dsGEEovYbT8UY9yD7eE4XTc4UwJ1jBYlgaQQF38ENsKR3wj/8q8RFZrF9WIZpB2V1ArTVFUva8sAul1NzRzQ==", "dev": true }, "mime-types": { - "version": "2.1.25", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.25.tgz", - "integrity": "sha512-5KhStqB5xpTAeGqKBAMgwaYMnQik7teQN4IAzC7npDv6kzeU6prfkR67bc87J1kWMPGkoaZSq1npmexMgkmEVg==", + "version": "2.1.26", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.26.tgz", + "integrity": "sha512-01paPWYgLrkqAyrlDorC1uDwl2p3qZT7yl806vW7DvDoxwXi46jsjFbg+WdwotBIk6/MbEhO/dh5aZ5sNj/dWQ==", "dev": true, "requires": { - "mime-db": "1.42.0" + "mime-db": "1.43.0" } }, "mimic-fn": { @@ -4520,39 +4476,39 @@ } }, "monaco-css": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/monaco-css/-/monaco-css-2.6.0.tgz", - "integrity": "sha512-p+qZxteFlSkWx2pXnK9k11FKvC8q3qt1gL2yH4F3bLjKs1ngD65XncVxC5fuKdMhH23im9dv/ZF6rKP93+04tg==", + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/monaco-css/-/monaco-css-2.7.0.tgz", + "integrity": "sha512-gxijecAzpTvA81R/pQWRcb2pTgAjeXYU8px9WWnihwJG5QMgSiRXLEocIXRKdVzGoBRTE463BNcRZ1Jsl05azQ==", "dev": true }, "monaco-editor-core": { - "version": "0.19.3", - "resolved": "https://registry.npmjs.org/monaco-editor-core/-/monaco-editor-core-0.19.3.tgz", - "integrity": "sha512-Fd6bTTaAxDAulh3q9Hordj80DSFZFGhjKX/Z3K/kElA9xkPyNwyaOjphYp8254nhUEKCk56TKP7qfRkUjjZF3w==", + "version": "0.20.0", + "resolved": "https://registry.npmjs.org/monaco-editor-core/-/monaco-editor-core-0.20.0.tgz", + "integrity": "sha512-4mdmfEejTvRZzrEIn70jqqNl3g15vnkRdTkJ8uMK4jiljntlwhiSc5vknZOLt1QM8za16C3tDrSl2mTL9ma2Sg==", "dev": true }, "monaco-html": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/monaco-html/-/monaco-html-2.6.0.tgz", - "integrity": "sha512-UVvgqFFuzCjwsfINKmc2nm4qvQhBsu1luw4lUz+YF3CxAcVQBmscWiz5fb6/MFRG77K0h+7uADseNmc9APzEgA==", + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/monaco-html/-/monaco-html-2.7.0.tgz", + "integrity": "sha512-gn/1zgQwl0BVmoMimw4FdU4B4w+gpw2H87EFIDdPmluYGa/PiLetqCxICkMerfR/BjLsAvWWb7Ih/J7nlPqwAQ==", "dev": true }, "monaco-json": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/monaco-json/-/monaco-json-2.8.0.tgz", - "integrity": "sha512-Qnu4zt6yQ68nq6OP5f9Nt+Kt+kf8uJK2tw+4JE8BpmBkA3Gy+H2QHYtikp2K6k7x3yrDfr4cw1xRAPxmS1hatA==", + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/monaco-json/-/monaco-json-2.9.0.tgz", + "integrity": "sha512-cpFu3qn3lyEk4B5KjD2kfzEf75QZPrOgoTs2VOyydeXdQ+9IjsnR617lYbLldOI6PGkfZMMp771TBkAvWntiMg==", "dev": true }, "monaco-languages": { - "version": "1.9.2", - "resolved": "https://registry.npmjs.org/monaco-languages/-/monaco-languages-1.9.2.tgz", - "integrity": "sha512-IoFYFsDd6zL6SJZ3QELXuTNYtg9VwielYaN174VZLy4zBicESlhnRWXYIltVb6vH/GvPTYdP3kgl8I6E+UfwCQ==", + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/monaco-languages/-/monaco-languages-1.10.0.tgz", + "integrity": "sha512-ARAws17Xh0K4WsZYkJY6CqHn9EYdYN8CjzK6w/jgXIwU0owzCdUWxzu+FNJ/LeDLcKxL/YK3phcwGFj9IqX2yw==", "dev": true }, "monaco-typescript": { - "version": "3.6.1", - "resolved": "https://registry.npmjs.org/monaco-typescript/-/monaco-typescript-3.6.1.tgz", - "integrity": "sha512-VXzS/s/YoQlolf7zRsM7PGVhY+HUTTHcLzFCx1QxuyOpoY1uFlUaMeTIV/AMYzMjSqHIiJ58kNiWjoP1YNsaAQ==", + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/monaco-typescript/-/monaco-typescript-3.7.0.tgz", + "integrity": "sha512-xo+nHP7AOdFvHtMqg7hZquQziBuHsaG7hXGXiUuOHj9unJmIyi1uhGuvuQqIJWv+jHd19xGNWTF+KOdaXhksIw==", "dev": true }, "move-concurrently": { @@ -4567,6 +4523,17 @@ "mkdirp": "^0.5.1", "rimraf": "^2.5.4", "run-queue": "^1.0.3" + }, + "dependencies": { + "rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + } } }, "ms": { @@ -5020,9 +4987,9 @@ "dev": true }, "parse5": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-4.0.0.tgz", - "integrity": "sha512-VrZ7eOd3T1Fk4XWNXMgiGBK/z0MG48BWG2uQNU4I72fkQuKUTZpl+u9k+CxEG0twMVzSmXEEz12z5Fnw1jIQFA==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-5.1.0.tgz", + "integrity": "sha512-fxNG2sQjHvlVAYmzBZS9YlDp6PTSSDwa98vkD4QgVDDCAo84z5X1t5XyJQ62ImdLXx5NdIIfihey6xpum9/gRQ==", "dev": true }, "pascalcase": { @@ -5319,9 +5286,9 @@ "dev": true }, "psl": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.6.0.tgz", - "integrity": "sha512-SYKKmVel98NCOYXpkwUqZqh0ahZeeKfmisiLIcEZdsb+WbLv02g/dI5BUmZnIyOe7RzZtLax81nnb2HbvC2tzA==", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.7.0.tgz", + "integrity": "sha512-5NsSEDv8zY70ScRnOTn7bK7eanl2MvFrOrS/R6x+dBt5g1ghnj9Zv90kO8GwT8gxcu2ANyFprnFYB85IogIJOQ==", "dev": true }, "public-encrypt": { @@ -5395,6 +5362,15 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true + }, + "rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } } } }, @@ -5691,9 +5667,9 @@ "dev": true }, "rimraf": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", - "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", "dev": true, "requires": { "glob": "^7.1.3" @@ -5739,11 +5715,14 @@ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", "dev": true }, - "sax": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", - "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", - "dev": true + "saxes": { + "version": "3.1.11", + "resolved": "https://registry.npmjs.org/saxes/-/saxes-3.1.11.tgz", + "integrity": "sha512-Ydydq3zC+WYDJK1+gRxRapLIED9PWeSuuS41wqyoRmzvhhh9nc+QQrVMKJYzJFULazeGhzSV0QleN2wD3boh2g==", + "dev": true, + "requires": { + "xmlchars": "^2.1.1" + } }, "schema-utils": { "version": "2.6.1", @@ -6046,9 +6025,9 @@ "dev": true }, "split": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/split/-/split-0.3.3.tgz", - "integrity": "sha1-zQ7qXmOiEd//frDwkcQTPi0N0o8=", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/split/-/split-1.0.1.tgz", + "integrity": "sha512-mTyOoPbrivtXnwnIxZRFYRrPNtEFKlpB2fvjSnCQUiAA6qAZzqwna5envK4uk6OIeP17CsdF3rSBGYVBsU0Tkg==", "dev": true, "requires": { "through": "2" @@ -6139,12 +6118,13 @@ } }, "stream-combiner": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/stream-combiner/-/stream-combiner-0.0.4.tgz", - "integrity": "sha1-TV5DPBhSYd3mI8o/RMWGvPXErRQ=", + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/stream-combiner/-/stream-combiner-0.2.2.tgz", + "integrity": "sha1-rsjLrBd7Vrb0+kec7YwZEs7lKFg=", "dev": true, "requires": { - "duplexer": "~0.1.1" + "duplexer": "~0.1.1", + "through": "~2.3.4" } }, "stream-each": { @@ -6516,28 +6496,28 @@ "dev": true }, "typedoc": { - "version": "0.15.4", - "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.15.4.tgz", - "integrity": "sha512-XzrV8sM44j4nXGSKt99VOkFCPGLUH9DHGGvcgZJbvqdSG7/iR3HztNjpsLyTu1nybZLLjcClLRuWJDO3icXzYA==", + "version": "0.16.9", + "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.16.9.tgz", + "integrity": "sha512-UvOGoy76yqwCXwxPgatwgXWfsQ3FczyZ6ZNLjhCPK+TsDir6LiU3YB6N9XZmPv36E+7LA860mnc8a0v6YADKFw==", "dev": true, "requires": { "@types/minimatch": "3.0.3", "fs-extra": "^8.1.0", - "handlebars": "^4.5.3", - "highlight.js": "^9.16.2", + "handlebars": "^4.7.2", + "highlight.js": "^9.17.1", "lodash": "^4.17.15", - "marked": "^0.7.0", + "marked": "^0.8.0", "minimatch": "^3.0.0", "progress": "^2.0.3", "shelljs": "^0.8.3", - "typedoc-default-themes": "^0.6.1", + "typedoc-default-themes": "^0.7.2", "typescript": "3.7.x" } }, "typedoc-default-themes": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/typedoc-default-themes/-/typedoc-default-themes-0.6.1.tgz", - "integrity": "sha512-z5AWKqQDz7igl9WkUuafx8cEm4MPVQGMpbWE+3lwVOaq+U4UoLKBMnpFQWh/4fqQ3bGysXpOstMxy2OOzHezyw==", + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/typedoc-default-themes/-/typedoc-default-themes-0.7.2.tgz", + "integrity": "sha512-fiFKlFO6VTqjcno8w6WpTsbCgXmfPHVjnLfYkmByZE7moaz+E2DSpAT+oHtDHv7E0BM5kAhPrHJELP2J2Y2T9A==", "dev": true, "requires": { "backbone": "^1.4.0", @@ -6547,15 +6527,15 @@ } }, "typescript": { - "version": "3.7.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.7.3.tgz", - "integrity": "sha512-Mcr/Qk7hXqFBXMN7p7Lusj1ktCBydylfQM/FZCk5glCNQJrCUKPkMHdo9R0MTFWsC/4kPFvDS0fDPvukfCkFsw==", + "version": "3.7.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.7.5.tgz", + "integrity": "sha512-/P5lkRXkWHNAbcJIiHPfRoKqyd7bsyCma1hZNUGfn20qm64T6ZBlrzprymeu918H+mB/0rIg2gGK/BXkhhYgBw==", "dev": true }, "uglify-js": { - "version": "3.7.2", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.7.2.tgz", - "integrity": "sha512-uhRwZcANNWVLrxLfNFEdltoPNhECUR3lc+UdJoG9CBpMcSnKyWA94tc3eAujB1GcMY5Uwq8ZMp4qWpxWYDQmaA==", + "version": "3.7.7", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.7.7.tgz", + "integrity": "sha512-FeSU+hi7ULYy6mn8PKio/tXsdSXN35lm4KgV2asx00kzrLU9Pi3oAslcJT70Jdj7PHX29gGUPOT6+lXGBbemhA==", "dev": true, "optional": true, "requires": { @@ -6570,59 +6550,26 @@ "dev": true }, "uncss": { - "version": "0.16.2", - "resolved": "https://registry.npmjs.org/uncss/-/uncss-0.16.2.tgz", - "integrity": "sha1-OyJpxZAS2nxmy+mPvt3e75TwZJw=", + "version": "0.17.2", + "resolved": "https://registry.npmjs.org/uncss/-/uncss-0.17.2.tgz", + "integrity": "sha512-hu2HquwDItuGDem4YsJROdAD8SknmWtM24zwhQax6J1se8tPjV1cnwPKhtjodzBaUhaL8Zb3hlGdZ2WAUpbAOg==", "dev": true, "requires": { - "commander": "^2.9.0", - "glob": "^7.0.3", - "is-absolute-url": "^2.0.0", - "is-html": "^1.0.0", - "jsdom": "^11.3.0", - "lodash": "^4.13.1", - "postcss": "^6.0.14", - "postcss-selector-parser": "3.1.1", - "request": "^2.72.0" - }, - "dependencies": { - "postcss": { - "version": "6.0.23", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz", - "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", - "dev": true, - "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.4.0" - } - }, - "postcss-selector-parser": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-3.1.1.tgz", - "integrity": "sha1-T4dfSvsMllc9XPTXQBGu4lCn6GU=", - "dev": true, - "requires": { - "dot-prop": "^4.1.1", - "indexes-of": "^1.0.1", - "uniq": "^1.0.1" - } - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } + "commander": "^2.20.0", + "glob": "^7.1.4", + "is-absolute-url": "^3.0.1", + "is-html": "^1.1.0", + "jsdom": "^14.1.0", + "lodash": "^4.17.15", + "postcss": "^7.0.17", + "postcss-selector-parser": "6.0.2", + "request": "^2.88.0" } }, "underscore": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.9.1.tgz", - "integrity": "sha512-5/4etnCkd9c8gwgowi5/om/mYO5ajCaOgdzj/oW+0eQV9WxKBDZw5+ycmKmeaTXjInS/W0BzpGLo2xR2aBwZdg==", + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.9.2.tgz", + "integrity": "sha512-D39qtimx0c1fI3ya1Lnhk3E9nONswSKhnffBI0gME9C99fYOkNi04xs8K6pePLhvl1frbDemkaBQ5ikWllR2HQ==", "dev": true }, "undertaker": { @@ -6809,9 +6756,9 @@ "dev": true }, "uuid": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.3.tgz", - "integrity": "sha512-pW0No1RGHgzlpHJO1nsVrHKpOEIxkGg1xB+v0ZmdNH5OAeAwzAVrCnI2/6Mtx+Uys6iaylxa+D3g4j63IKKjSQ==", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", "dev": true }, "v8-compile-cache": { @@ -6936,6 +6883,17 @@ "browser-process-hrtime": "^0.1.2" } }, + "w3c-xmlserializer": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-1.1.2.tgz", + "integrity": "sha512-p10l/ayESzrBMYWRID6xbuCKh2Fp77+sA0doRuGn4tTIMrrZVeqfpKjXHY+oDh3K4nLdPgNwMTVP6Vp4pvqbNg==", + "dev": true, + "requires": { + "domexception": "^1.0.1", + "webidl-conversions": "^4.0.2", + "xml-name-validator": "^3.0.0" + } + }, "watchpack": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.6.0.tgz", @@ -7223,9 +7181,9 @@ "dev": true }, "whatwg-url": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-6.5.0.tgz", - "integrity": "sha512-rhRZRqx/TLJQWUpQ6bmrt2UV4f0HCQ463yQuONJqC6fO2VoEb1pTYddbe59SkYq87aoM5A3bdhMZiUiVws+fzQ==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-7.1.0.tgz", + "integrity": "sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==", "dev": true, "requires": { "lodash.sortby": "^4.7.0", @@ -7309,6 +7267,12 @@ "integrity": "sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw==", "dev": true }, + "xmlchars": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", + "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==", + "dev": true + }, "xtend": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", diff --git a/package.json b/package.json index 5f84a1c5..1ab5932b 100644 --- a/package.json +++ b/package.json @@ -26,25 +26,25 @@ "@types/mocha": "^2.2.33", "@types/puppeteer": "^1.12.4", "chai": "^4.2.0", - "clean-css": "^4.2.1", + "clean-css": "^4.2.3", "css-loader": "^3.2.0", - "event-stream": "3.3.4", + "event-stream": "4.0.1", "file-loader": "^4.2.0", "gulp": "^4.0.0", "gulp-typedoc": "^2.2.2", "mocha": "^6.2.2", - "monaco-css": "2.6.0", - "monaco-editor-core": "0.19.3", - "monaco-html": "2.6.0", - "monaco-json": "2.8.0", - "monaco-languages": "1.9.2", - "monaco-typescript": "3.6.1", + "monaco-css": "2.7.0", + "monaco-editor-core": "0.20.0", + "monaco-html": "2.7.0", + "monaco-json": "2.9.0", + "monaco-languages": "1.10.0", + "monaco-typescript": "3.7.0", "puppeteer": "^1.15.0", - "rimraf": "^2.6.3", + "rimraf": "^3.0.2", "style-loader": "^1.0.1", - "typedoc": "^0.15.4", - "typescript": "^3.3.3", - "uncss": "^0.16.2", + "typedoc": "^0.16.9", + "typescript": "^3.7.5", + "uncss": "^0.17.2", "vinyl": "^2.2.0", "webpack": "^4.41.2", "webpack-cli": "^3.3.10", diff --git a/website/playground/monaco.d.ts.txt b/website/playground/monaco.d.ts.txt index 37789bcf..1047328e 100644 --- a/website/playground/monaco.d.ts.txt +++ b/website/playground/monaco.d.ts.txt @@ -8,12 +8,18 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ +declare let MonacoEnvironment: monaco.Environment | undefined; + declare namespace monaco { - // THIS IS A GENERATED FILE. DO NOT EDIT DIRECTLY. - export type Thenable = PromiseLike; + export interface Environment { + baseUrl?: string; + getWorker?(workerId: string, label: string): Worker; + getWorkerUrl?(workerId: string, label: string): string; + } + export interface IDisposable { dispose(): void; } @@ -385,6 +391,7 @@ declare namespace monaco { export interface IMarkdownString { readonly value: string; readonly isTrusted?: boolean; + readonly supportThemeIcons?: boolean; uris?: { [href: string]: UriComponents; }; @@ -409,6 +416,7 @@ declare namespace monaco { readonly leftButton: boolean; readonly middleButton: boolean; readonly rightButton: boolean; + readonly buttons: number; readonly target: HTMLElement; readonly detail: number; readonly posx: number; @@ -1049,7 +1057,7 @@ declare namespace monaco.editor { * Method that will be executed when the action is triggered. * @param editor The editor instance is passed in as a convenience */ - run(editor: ICodeEditor): void | Promise; + run(editor: ICodeEditor, ...args: any[]): void | Promise; } /** @@ -1064,7 +1072,7 @@ declare namespace monaco.editor { tabSize?: number; /** * Insert spaces when pressing `Tab`. - * This setting is overridden based on the file contents when detectIndentation` is on. + * This setting is overridden based on the file contents when `detectIndentation` is on. * Defaults to true. */ insertSpaces?: boolean; @@ -1179,7 +1187,10 @@ declare namespace monaco.editor { owner: string; resource: Uri; severity: MarkerSeverity; - code?: string; + code?: string | { + value: string; + link: Uri; + }; message: string; source?: string; startLineNumber: number; @@ -1194,7 +1205,10 @@ declare namespace monaco.editor { * A structure defining a problem/warning/etc. */ export interface IMarkerData { - code?: string; + code?: string | { + value: string; + link: Uri; + }; severity: MarkerSeverity; message: string; source?: string; @@ -1458,20 +1472,6 @@ declare namespace monaco.editor { CRLF = 1 } - /** - * An identifier for a single edit operation. - */ - export interface ISingleEditOperationIdentifier { - /** - * Identifier major - */ - major: number; - /** - * Identifier minor - */ - minor: number; - } - /** * A single edit operation, that acts as a simple replace. * i.e. Replace text at `range` with `text` in model. @@ -1910,14 +1910,14 @@ declare namespace monaco.editor { * @param range The range to replace (delete). May be empty to represent a simple insert. * @param text The text to replace with. May be null to represent a simple delete. */ - addEditOperation(range: Range, text: string | null): void; + addEditOperation(range: Range, text: string | null, forceMoveMarkers?: boolean): void; /** * Add a new edit operation (a replace operation). * The inverse edits will be accessible in `ICursorStateComputerData.getInverseEditOperations()` * @param range The range to replace (delete). May be empty to represent a simple insert. * @param text The text to replace with. May be null to represent a simple delete. */ - addTrackedEditOperation(range: Range, text: string | null): void; + addTrackedEditOperation(range: Range, text: string | null, forceMoveMarkers?: boolean): void; /** * Track `selection` when applying edit operations. * A best effort will be made to not grow/expand the selection. @@ -2025,6 +2025,13 @@ declare namespace monaco.editor { readonly charChanges: ICharChange[] | undefined; } + export interface IContentSizeChangedEvent { + readonly contentWidth: number; + readonly contentHeight: number; + readonly contentWidthChanged: boolean; + readonly contentHeightChanged: boolean; + } + export interface INewScrollPosition { scrollLeft?: number; scrollTop?: number; @@ -2363,23 +2370,6 @@ declare namespace monaco.editor { export interface IModelDecorationsChangedEvent { } - /** - * An event describing that some ranges of lines have been tokenized (their tokens have changed). - */ - export interface IModelTokensChangedEvent { - readonly tokenizationSupportChanged: boolean; - readonly ranges: { - /** - * The start of the range (inclusive) - */ - readonly fromLineNumber: number; - /** - * The end of the range (inclusive) - */ - readonly toLineNumber: number; - }[]; - } - export interface IModelOptionsChangedEvent { readonly tabSize: boolean; readonly indentSize: boolean; @@ -2544,7 +2534,7 @@ declare namespace monaco.editor { * If it is a function, it will be invoked when rendering a line number and the return value will be rendered. * Otherwise, if it is a truey, line numbers will be rendered normally (equivalent of using an identity function). * Otherwise, line numbers will not be rendered. - * Defaults to true. + * Defaults to `on`. */ lineNumbers?: LineNumbersType; /** @@ -2605,6 +2595,11 @@ declare namespace monaco.editor { * Defaults to false. */ readOnly?: boolean; + /** + * Should the editor render validation decorations. + * Defaults to editable. + */ + renderValidationDecorations?: 'editable' | 'on' | 'off'; /** * Control the behavior and rendering of the scrollbars. */ @@ -2731,21 +2726,21 @@ declare namespace monaco.editor { * Defaults to 'same' in vscode and to 'none' in monaco-editor. */ wrappingIndent?: 'none' | 'same' | 'indent' | 'deepIndent'; + /** + * Controls the wrapping strategy to use. + * Defaults to 'simple'. + */ + wrappingStrategy?: 'simple' | 'advanced'; /** * Configure word wrapping characters. A break will be introduced before these characters. - * Defaults to '{([+'. + * Defaults to '([{‘“〈《「『【〔([{「£¥$£¥++'. */ wordWrapBreakBeforeCharacters?: string; /** * Configure word wrapping characters. A break will be introduced after these characters. - * Defaults to ' \t})]?|&,;'. + * Defaults to ' \t})]?|/&.,;¢°′″‰℃、。。、¢,.:;?!%・・ゝゞヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻ァィゥェォャュョッー”〉》」』】〕)]}」'. */ wordWrapBreakAfterCharacters?: string; - /** - * Configure word wrapping characters. A break will be introduced after these characters only if no `wordWrapBreakBeforeCharacters` or `wordWrapBreakAfterCharacters` were found. - * Defaults to '.'. - */ - wordWrapBreakObtrusiveCharacters?: string; /** * Performance guard: Stop rendering a line after x characters. * Defaults to 10000. @@ -2765,6 +2760,10 @@ declare namespace monaco.editor { * Enable inline color decorators and color picker rendering. */ colorDecorators?: boolean; + /** + * Control the behaviour of comments in the editor. + */ + comments?: IEditorCommentsOptions; /** * Enable custom contextmenu. * Defaults to true. @@ -2846,8 +2845,8 @@ declare namespace monaco.editor { */ autoSurround?: EditorAutoSurroundStrategy; /** - * Enable auto indentation adjustment. - * Defaults to false. + * Controls whether the editor should automatically adjust the indentation when users type, paste, move or indent lines. + * Defaults to advanced. */ autoIndent?: 'none' | 'keep' | 'brackets' | 'advanced' | 'full'; /** @@ -2934,7 +2933,7 @@ declare namespace monaco.editor { */ codeActionsOnSaveTimeout?: number; /** - * Enable code folding + * Enable code folding. * Defaults to true. */ folding?: boolean; @@ -2943,6 +2942,11 @@ declare namespace monaco.editor { * Defaults to 'auto'. */ foldingStrategy?: 'auto' | 'indentation'; + /** + * Enable highlight for folded regions. + * Defaults to true. + */ + foldingHighlight?: boolean; /** * Controls whether the fold actions in the gutter stay always visible or hide unless the mouse is over the gutter. * Defaults to 'mouseover'. @@ -3006,6 +3010,11 @@ declare namespace monaco.editor { * Controls fading out of unused variables. */ showUnused?: boolean; + /** + * Controls whether to focus the inline editor in the peek widget by default. + * Defaults to false. + */ + peekWidgetDefaultFocus?: 'tree' | 'editor'; } export interface IEditorConstructionOptions extends IEditorOptions { @@ -3055,6 +3064,7 @@ declare namespace monaco.editor { * An event describing that the configuration of the editor has changed. */ export class ConfigurationChangedEvent { + hasChanged(id: EditorOption): boolean; } /** @@ -3070,6 +3080,19 @@ declare namespace monaco.editor { defaultValue: V; } + /** + * Configuration options for editor comments + */ + export interface IEditorCommentsOptions { + /** + * Insert a space after the line comment token and inside the block comments tokens. + * Defaults to true. + */ + insertSpace?: boolean; + } + + export type EditorCommentsOptions = Readonly>; + /** * The kind of animation in which the editor's cursor should be rendered. */ @@ -3239,10 +3262,6 @@ declare namespace monaco.editor { * The width of the glyph margin. */ readonly glyphMarginWidth: number; - /** - * The height of the glyph margin. - */ - readonly glyphMarginHeight: number; /** * Left position for the line numbers. */ @@ -3251,10 +3270,6 @@ declare namespace monaco.editor { * The width of the line numbers. */ readonly lineNumbersWidth: number; - /** - * The height of the line numbers. - */ - readonly lineNumbersHeight: number; /** * Left position for the line decorations. */ @@ -3263,10 +3278,6 @@ declare namespace monaco.editor { * The width of the line decorations. */ readonly decorationsWidth: number; - /** - * The height of the line decorations. - */ - readonly decorationsHeight: number; /** * Left position for the content (actual text) */ @@ -3275,10 +3286,6 @@ declare namespace monaco.editor { * The width of the content (actual text) */ readonly contentWidth: number; - /** - * The height of the content (actual height) - */ - readonly contentHeight: number; /** * The position for the minimap */ @@ -3620,6 +3627,10 @@ declare namespace monaco.editor { * Show snippet-suggestions. */ showSnippets?: boolean; + /** + * Controls the visibility of the status bar at the bottom of the suggest widget. + */ + hideStatusBar?: boolean; } export type InternalSuggestOptions = Readonly>; @@ -3667,102 +3678,106 @@ declare namespace monaco.editor { autoSurround = 10, codeLens = 11, colorDecorators = 12, - contextmenu = 13, - copyWithSyntaxHighlighting = 14, - cursorBlinking = 15, - cursorSmoothCaretAnimation = 16, - cursorStyle = 17, - cursorSurroundingLines = 18, - cursorSurroundingLinesStyle = 19, - cursorWidth = 20, - disableLayerHinting = 21, - disableMonospaceOptimizations = 22, - dragAndDrop = 23, - emptySelectionClipboard = 24, - extraEditorClassName = 25, - fastScrollSensitivity = 26, - find = 27, - fixedOverflowWidgets = 28, - folding = 29, - foldingStrategy = 30, - fontFamily = 31, - fontInfo = 32, - fontLigatures = 33, - fontSize = 34, - fontWeight = 35, - formatOnPaste = 36, - formatOnType = 37, - glyphMargin = 38, - gotoLocation = 39, - hideCursorInOverviewRuler = 40, - highlightActiveIndentGuide = 41, - hover = 42, - inDiffEditor = 43, - letterSpacing = 44, - lightbulb = 45, - lineDecorationsWidth = 46, - lineHeight = 47, - lineNumbers = 48, - lineNumbersMinChars = 49, - links = 50, - matchBrackets = 51, - minimap = 52, - mouseStyle = 53, - mouseWheelScrollSensitivity = 54, - mouseWheelZoom = 55, - multiCursorMergeOverlapping = 56, - multiCursorModifier = 57, - multiCursorPaste = 58, - occurrencesHighlight = 59, - overviewRulerBorder = 60, - overviewRulerLanes = 61, - parameterHints = 62, - quickSuggestions = 63, - quickSuggestionsDelay = 64, - readOnly = 65, - renderControlCharacters = 66, - renderIndentGuides = 67, - renderFinalNewline = 68, - renderLineHighlight = 69, - renderWhitespace = 70, - revealHorizontalRightPadding = 71, - roundedSelection = 72, - rulers = 73, - scrollbar = 74, - scrollBeyondLastColumn = 75, - scrollBeyondLastLine = 76, - selectionClipboard = 77, - selectionHighlight = 78, - selectOnLineNumbers = 79, - showFoldingControls = 80, - showUnused = 81, - snippetSuggestions = 82, - smoothScrolling = 83, - stopRenderingLineAfter = 84, - suggest = 85, - suggestFontSize = 86, - suggestLineHeight = 87, - suggestOnTriggerCharacters = 88, - suggestSelection = 89, - tabCompletion = 90, - useTabStops = 91, - wordSeparators = 92, - wordWrap = 93, - wordWrapBreakAfterCharacters = 94, - wordWrapBreakBeforeCharacters = 95, - wordWrapBreakObtrusiveCharacters = 96, - wordWrapColumn = 97, - wordWrapMinified = 98, - wrappingIndent = 99, - editorClassName = 100, - pixelRatio = 101, - tabFocusMode = 102, - layoutInfo = 103, - wrappingInfo = 104 + comments = 13, + contextmenu = 14, + copyWithSyntaxHighlighting = 15, + cursorBlinking = 16, + cursorSmoothCaretAnimation = 17, + cursorStyle = 18, + cursorSurroundingLines = 19, + cursorSurroundingLinesStyle = 20, + cursorWidth = 21, + disableLayerHinting = 22, + disableMonospaceOptimizations = 23, + dragAndDrop = 24, + emptySelectionClipboard = 25, + extraEditorClassName = 26, + fastScrollSensitivity = 27, + find = 28, + fixedOverflowWidgets = 29, + folding = 30, + foldingStrategy = 31, + foldingHighlight = 32, + fontFamily = 33, + fontInfo = 34, + fontLigatures = 35, + fontSize = 36, + fontWeight = 37, + formatOnPaste = 38, + formatOnType = 39, + glyphMargin = 40, + gotoLocation = 41, + hideCursorInOverviewRuler = 42, + highlightActiveIndentGuide = 43, + hover = 44, + inDiffEditor = 45, + letterSpacing = 46, + lightbulb = 47, + lineDecorationsWidth = 48, + lineHeight = 49, + lineNumbers = 50, + lineNumbersMinChars = 51, + links = 52, + matchBrackets = 53, + minimap = 54, + mouseStyle = 55, + mouseWheelScrollSensitivity = 56, + mouseWheelZoom = 57, + multiCursorMergeOverlapping = 58, + multiCursorModifier = 59, + multiCursorPaste = 60, + occurrencesHighlight = 61, + overviewRulerBorder = 62, + overviewRulerLanes = 63, + parameterHints = 64, + peekWidgetDefaultFocus = 65, + quickSuggestions = 66, + quickSuggestionsDelay = 67, + readOnly = 68, + renderControlCharacters = 69, + renderIndentGuides = 70, + renderFinalNewline = 71, + renderLineHighlight = 72, + renderValidationDecorations = 73, + renderWhitespace = 74, + revealHorizontalRightPadding = 75, + roundedSelection = 76, + rulers = 77, + scrollbar = 78, + scrollBeyondLastColumn = 79, + scrollBeyondLastLine = 80, + selectionClipboard = 81, + selectionHighlight = 82, + selectOnLineNumbers = 83, + showFoldingControls = 84, + showUnused = 85, + snippetSuggestions = 86, + smoothScrolling = 87, + stopRenderingLineAfter = 88, + suggest = 89, + suggestFontSize = 90, + suggestLineHeight = 91, + suggestOnTriggerCharacters = 92, + suggestSelection = 93, + tabCompletion = 94, + useTabStops = 95, + wordSeparators = 96, + wordWrap = 97, + wordWrapBreakAfterCharacters = 98, + wordWrapBreakBeforeCharacters = 99, + wordWrapColumn = 100, + wordWrapMinified = 101, + wrappingIndent = 102, + wrappingStrategy = 103, + editorClassName = 104, + pixelRatio = 105, + tabFocusMode = 106, + layoutInfo = 107, + wrappingInfo = 108 } export const EditorOptions: { acceptSuggestionOnCommitCharacter: IEditorOption; - acceptSuggestionOnEnter: IEditorOption; + acceptSuggestionOnEnter: IEditorOption; accessibilitySupport: IEditorOption; accessibilityPageSize: IEditorOption; ariaLabel: IEditorOption; @@ -3774,13 +3789,14 @@ declare namespace monaco.editor { autoSurround: IEditorOption; codeLens: IEditorOption; colorDecorators: IEditorOption; + comments: IEditorOption; contextmenu: IEditorOption; copyWithSyntaxHighlighting: IEditorOption; cursorBlinking: IEditorOption; cursorSmoothCaretAnimation: IEditorOption; cursorStyle: IEditorOption; cursorSurroundingLines: IEditorOption; - cursorSurroundingLinesStyle: IEditorOption; + cursorSurroundingLinesStyle: IEditorOption; cursorWidth: IEditorOption; disableLayerHinting: IEditorOption; disableMonospaceOptimizations: IEditorOption; @@ -3791,7 +3807,8 @@ declare namespace monaco.editor { find: IEditorOption; fixedOverflowWidgets: IEditorOption; folding: IEditorOption; - foldingStrategy: IEditorOption; + foldingStrategy: IEditorOption; + foldingHighlight: IEditorOption; fontFamily: IEditorOption; fontInfo: IEditorOption; fontLigatures2: IEditorOption; @@ -3812,26 +3829,28 @@ declare namespace monaco.editor { lineNumbers: IEditorOption; lineNumbersMinChars: IEditorOption; links: IEditorOption; - matchBrackets: IEditorOption; + matchBrackets: IEditorOption; minimap: IEditorOption; - mouseStyle: IEditorOption; + mouseStyle: IEditorOption; mouseWheelScrollSensitivity: IEditorOption; mouseWheelZoom: IEditorOption; multiCursorMergeOverlapping: IEditorOption; - multiCursorModifier: IEditorOption; - multiCursorPaste: IEditorOption; + multiCursorModifier: IEditorOption; + multiCursorPaste: IEditorOption; occurrencesHighlight: IEditorOption; overviewRulerBorder: IEditorOption; overviewRulerLanes: IEditorOption; parameterHints: IEditorOption; + peekWidgetDefaultFocus: IEditorOption; quickSuggestions: IEditorOption; quickSuggestionsDelay: IEditorOption; readOnly: IEditorOption; renderControlCharacters: IEditorOption; renderIndentGuides: IEditorOption; renderFinalNewline: IEditorOption; - renderLineHighlight: IEditorOption; - renderWhitespace: IEditorOption; + renderLineHighlight: IEditorOption; + renderValidationDecorations: IEditorOption; + renderWhitespace: IEditorOption; revealHorizontalRightPadding: IEditorOption; roundedSelection: IEditorOption; rulers: IEditorOption; @@ -3841,26 +3860,26 @@ declare namespace monaco.editor { selectionClipboard: IEditorOption; selectionHighlight: IEditorOption; selectOnLineNumbers: IEditorOption; - showFoldingControls: IEditorOption; + showFoldingControls: IEditorOption; showUnused: IEditorOption; - snippetSuggestions: IEditorOption; + snippetSuggestions: IEditorOption; smoothScrolling: IEditorOption; stopRenderingLineAfter: IEditorOption; suggest: IEditorOption; suggestFontSize: IEditorOption; suggestLineHeight: IEditorOption; suggestOnTriggerCharacters: IEditorOption; - suggestSelection: IEditorOption; - tabCompletion: IEditorOption; + suggestSelection: IEditorOption; + tabCompletion: IEditorOption; useTabStops: IEditorOption; wordSeparators: IEditorOption; - wordWrap: IEditorOption; + wordWrap: IEditorOption; wordWrapBreakAfterCharacters: IEditorOption; wordWrapBreakBeforeCharacters: IEditorOption; - wordWrapBreakObtrusiveCharacters: IEditorOption; wordWrapColumn: IEditorOption; wordWrapMinified: IEditorOption; wrappingIndent: IEditorOption; + wrappingStrategy: IEditorOption; editorClassName: IEditorOption; pixelRatio: IEditorOption; tabFocusMode: IEditorOption; @@ -4170,6 +4189,14 @@ declare namespace monaco.editor { readonly target: IMouseTarget | null; } + /** + * A paste event originating from the editor. + */ + export interface IPasteEvent { + readonly range: Range; + readonly mode: string | null; + } + /** * A rich code editor. */ @@ -4242,16 +4269,16 @@ declare namespace monaco.editor { /** * An event emitted after composition has started. */ - onCompositionStart(listener: () => void): IDisposable; + onDidCompositionStart(listener: () => void): IDisposable; /** * An event emitted after composition has ended. */ - onCompositionEnd(listener: () => void): IDisposable; + onDidCompositionEnd(listener: () => void): IDisposable; /** * An event emitted when users paste text in the editor. * @event */ - onDidPaste(listener: (range: Range) => void): IDisposable; + onDidPaste(listener: (e: IPasteEvent) => void): IDisposable; /** * An event emitted on a "mouseup". * @event @@ -4292,6 +4319,11 @@ declare namespace monaco.editor { * @event */ onDidLayoutChange(listener: (e: EditorLayoutInfo) => void): IDisposable; + /** + * An event emitted when the content width or content height in the editor has changed. + * @event + */ + onDidContentSizeChange(listener: (e: IContentSizeChangedEvent) => void): IDisposable; /** * An event emitted when the scroll in the editor has changed. * @event @@ -4353,6 +4385,11 @@ declare namespace monaco.editor { * @see `ITextModel.setValue` */ setValue(newValue: string): void; + /** + * Get the width of the editor's content. + * This is information that is "erased" when computing `scrollWidth = Math.max(contentWidth, width)` + */ + getContentWidth(): number; /** * Get the scrollWidth of the editor's viewport. */ @@ -4361,6 +4398,11 @@ declare namespace monaco.editor { * Get the scrollLeft of the editor's viewport. */ getScrollLeft(): number; + /** + * Get the height of the editor's content. + * This is information that is "erased" when computing `scrollHeight = Math.max(contentHeight, height)` + */ + getContentHeight(): number; /** * Get the scrollHeight of the editor's viewport. */ @@ -4438,6 +4480,10 @@ declare namespace monaco.editor { * Get the vertical position (top offset) for the position w.r.t. to the first line. */ getTopForPosition(lineNumber: number, column: number): number; + /** + * Returns the editor's container dom node + */ + getContainerDomNode(): HTMLElement; /** * Returns the editor's dom node */ @@ -4584,6 +4630,7 @@ declare namespace monaco.editor { readonly typicalFullwidthCharacterWidth: number; readonly canUseHalfwidthRightwardsArrow: boolean; readonly spaceWidth: number; + readonly middotWidth: number; readonly maxDigitWidth: number; } @@ -4822,6 +4869,16 @@ declare namespace monaco.languages { */ export function registerSelectionRangeProvider(languageId: string, provider: SelectionRangeProvider): IDisposable; + /** + * Register a document semantic tokens provider + */ + export function registerDocumentSemanticTokensProvider(languageId: string, provider: DocumentSemanticTokensProvider): IDisposable; + + /** + * Register a document range semantic tokens provider + */ + export function registerDocumentRangeSemanticTokensProvider(languageId: string, provider: DocumentRangeSemanticTokensProvider): IDisposable; + /** * Contains additional diagnostic information about the context in which * a [code action](#CodeActionProvider.provideCodeActions) is run. @@ -5143,6 +5200,25 @@ declare namespace monaco.languages { Snippet = 25 } + export interface CompletionItemLabel { + /** + * The function or variable. Rendered leftmost. + */ + name: string; + /** + * The signature without the return type. Render after `name`. + */ + signature?: string; + /** + * The fully qualified name, like package name or file path. Rendered after `signature`. + */ + qualifier?: string; + /** + * The return-type of a function or type of a property/variable. Rendered rightmost. + */ + type?: string; + } + export enum CompletionItemTag { Deprecated = 1 } @@ -5169,7 +5245,7 @@ declare namespace monaco.languages { * this is also the text that is inserted when selecting * this completion. */ - label: string; + label: string | CompletionItemLabel; /** * The kind of this completion item. Based on the kind * an icon is chosen by the editor. @@ -5209,7 +5285,7 @@ declare namespace monaco.languages { preselect?: boolean; /** * A string or snippet that should be inserted in a document when selecting - * this completion. + * this completion. When `falsy` the [label](#CompletionItem.label) * is used. */ insertText: string; @@ -5843,25 +5919,41 @@ declare namespace monaco.languages { constructor(value: string); } - export interface ResourceFileEdit { - oldUri?: Uri; - newUri?: Uri; - options?: { - overwrite?: boolean; - ignoreIfNotExists?: boolean; - ignoreIfExists?: boolean; - recursive?: boolean; + export interface WorkspaceEditMetadata { + needsConfirmation: boolean; + label: string; + description?: string; + iconPath?: { + id: string; + } | { + light: Uri; + dark: Uri; }; } - export interface ResourceTextEdit { + export interface WorkspaceFileEditOptions { + overwrite?: boolean; + ignoreIfNotExists?: boolean; + ignoreIfExists?: boolean; + recursive?: boolean; + } + + export interface WorkspaceFileEdit { + oldUri?: Uri; + newUri?: Uri; + options?: WorkspaceFileEditOptions; + metadata?: WorkspaceEditMetadata; + } + + export interface WorkspaceTextEdit { resource: Uri; + edit: TextEdit; modelVersionId?: number; - edits: TextEdit[]; + metadata?: WorkspaceEditMetadata; } export interface WorkspaceEdit { - edits: Array; + edits: Array; } export interface Rejection { @@ -5923,10 +6015,15 @@ declare namespace monaco.languages { readonly edits: SemanticTokensEdit[]; } - export interface SemanticTokensProvider { + export interface DocumentSemanticTokensProvider { getLegend(): SemanticTokensLegend; - provideSemanticTokens(model: editor.ITextModel, lastResultId: string | null, ranges: Range[] | null, token: CancellationToken): ProviderResult; - releaseSemanticTokens(resultId: string | undefined): void; + provideDocumentSemanticTokens(model: editor.ITextModel, lastResultId: string | null, token: CancellationToken): ProviderResult; + releaseDocumentSemanticTokens(resultId: string | undefined): void; + } + + export interface DocumentRangeSemanticTokensProvider { + getLegend(): SemanticTokensLegend; + provideDocumentRangeSemanticTokens(model: editor.ITextModel, range: Range, token: CancellationToken): ProviderResult; } export interface ILanguageExtensionPoint { @@ -6140,6 +6237,7 @@ declare namespace monaco.languages.typescript { interface CompilerOptions { allowJs?: boolean; allowSyntheticDefaultImports?: boolean; + allowUmdGlobalAccess?: boolean; allowUnreachableCode?: boolean; allowUnusedLabels?: boolean; alwaysStrict?: boolean; @@ -6151,6 +6249,7 @@ declare namespace monaco.languages.typescript { emitDeclarationOnly?: boolean; declarationDir?: string; disableSizeLimit?: boolean; + disableSourceOfProjectReferenceRedirect?: boolean; downlevelIteration?: boolean; emitBOM?: boolean; emitDecoratorMetadata?: boolean; @@ -6202,8 +6301,10 @@ declare namespace monaco.languages.typescript { sourceRoot?: string; strict?: boolean; strictFunctionTypes?: boolean; + strictBindCallApply?: boolean; strictNullChecks?: boolean; strictPropertyInitialization?: boolean; + stripInternal?: boolean; suppressExcessPropertyErrors?: boolean; suppressImplicitAnyIndexErrors?: boolean; target?: ScriptTarget; @@ -6213,6 +6314,7 @@ declare namespace monaco.languages.typescript { /** Paths used to compute primary types search locations */ typeRoots?: string[]; esModuleInterop?: boolean; + useDefineForClassFields?: boolean; [option: string]: CompilerOptionsValue | undefined; } @@ -6223,7 +6325,69 @@ declare namespace monaco.languages.typescript { diagnosticCodesToIgnore?: number[]; } + interface IExtraLib { + content: string; + version: number; + } + + interface IExtraLibs { + [path: string]: IExtraLib; + } + + /** + * A linked list of formatted diagnostic messages to be used as part of a multiline message. + * It is built from the bottom up, leaving the head to be the "main" diagnostic. + */ + interface DiagnosticMessageChain { + messageText: string; + /** Diagnostic category: warning = 0, error = 1, suggestion = 2, message = 3 */ + category: 0 | 1 | 2 | 3; + code: number; + next?: DiagnosticMessageChain[]; + } + interface Diagnostic extends DiagnosticRelatedInformation { + /** May store more in future. For now, this will simply be `true` to indicate when a diagnostic is an unused-identifier diagnostic. */ + reportsUnnecessary?: {}; + source?: string; + relatedInformation?: DiagnosticRelatedInformation[]; + } + interface DiagnosticRelatedInformation { + /** Diagnostic category: warning = 0, error = 1, suggestion = 2, message = 3 */ + category: 0 | 1 | 2 | 3; + code: number; + /** TypeScriptWorker removes this to avoid serializing circular JSON structures. */ + file: undefined; + start: number | undefined; + length: number | undefined; + messageText: string | DiagnosticMessageChain; + } + + interface EmitOutput { + outputFiles: OutputFile[]; + emitSkipped: boolean; + } + interface OutputFile { + name: string; + writeByteOrderMark: boolean; + text: string; + } + export interface LanguageServiceDefaults { + /** + * Event fired when compiler options or diagnostics options are changed. + */ + readonly onDidChange: IEvent; + + /** + * Event fired when extra libraries registered with the language service change. + */ + readonly onDidExtraLibsChange: IEvent; + + /** + * Get the current extra libs registered with the language service. + */ + getExtraLibs(): IExtraLibs; + /** * Add an additional source file to the language service. Use this * for typescript (definition) files that won't be loaded as editor @@ -6244,11 +6408,21 @@ declare namespace monaco.languages.typescript { */ setExtraLibs(libs: { content: string; filePath?: string }[]): void; + /** + * Get current TypeScript compiler options for the language service. + */ + getCompilerOptions(): CompilerOptions; + /** * Set TypeScript compiler options. */ setCompilerOptions(options: CompilerOptions): void; + /** + * Get the current diagnostics options for the language service. + */ + getDiagnosticsOptions(): DiagnosticsOptions; + /** * Configure whether syntactic and/or semantic validation should * be performed @@ -6256,10 +6430,7 @@ declare namespace monaco.languages.typescript { setDiagnosticsOptions(options: DiagnosticsOptions): void; /** - * Configure when the worker shuts down. By default that is 2mins. - * - * @param value The maximum idle time in milliseconds. Values less than one - * mean never shut down. + * No-op. */ setMaximumWorkerIdleTime(value: number): void; @@ -6268,15 +6439,139 @@ declare namespace monaco.languages.typescript { * to the worker on start or restart. */ setEagerModelSync(value: boolean): void; + + /** + * Get the current setting for whether all existing models should be eagerly sync'd + * to the worker on start or restart. + */ + getEagerModelSync(): boolean; } - export var typescriptVersion: string; + export interface TypeScriptWorker { + /** + * Get diagnostic messages for any syntax issues in the given file. + */ + getSyntacticDiagnostics(fileName: string): Promise; - export var typescriptDefaults: LanguageServiceDefaults; - export var javascriptDefaults: LanguageServiceDefaults; + /** + * Get diagnostic messages for any semantic issues in the given file. + */ + getSemanticDiagnostics(fileName: string): Promise; - export var getTypeScriptWorker: () => Promise; - export var getJavaScriptWorker: () => Promise; + /** + * Get diagnostic messages for any suggestions related to the given file. + */ + getSuggestionDiagnostics(fileName: string): Promise; + + /** + * Get diagnostic messages related to the current compiler options. + * @param fileName Not used + */ + getCompilerOptionsDiagnostics(fileName: string): Promise; + + /** + * Get code completions for the given file and position. + * @returns `Promise` + */ + getCompletionsAtPosition(fileName: string, position: number): Promise; + + /** + * Get code completion details for the given file, position, and entry. + * @returns `Promise` + */ + getCompletionEntryDetails(fileName: string, position: number, entry: string): Promise; + + /** + * Get signature help items for the item at the given file and position. + * @returns `Promise` + */ + getSignatureHelpItems(fileName: string, position: number): Promise; + + /** + * Get quick info for the item at the given position in the file. + * @returns `Promise` + */ + getQuickInfoAtPosition(fileName: string, position: number): Promise; + + /** + * Get other ranges which are related to the item at the given position in the file (often used for highlighting). + * @returns `Promise | undefined>` + */ + getOccurrencesAtPosition(fileName: string, position: number): Promise | undefined>; + + /** + * Get the definition of the item at the given position in the file. + * @returns `Promise | undefined>` + */ + getDefinitionAtPosition(fileName: string, position: number): Promise | undefined>; + + /** + * Get references to the item at the given position in the file. + * @returns `Promise` + */ + getReferencesAtPosition(fileName: string, position: number): Promise; + + /** + * Get outline entries for the item at the given position in the file. + * @returns `Promise` + */ + getNavigationBarItems(fileName: string): Promise; + + /** + * Get changes which should be applied to format the given file. + * @param options `typescript.FormatCodeOptions` + * @returns `Promise` + */ + getFormattingEditsForDocument(fileName: string, options: any): Promise; + + /** + * Get changes which should be applied to format the given range in the file. + * @param options `typescript.FormatCodeOptions` + * @returns `Promise` + */ + getFormattingEditsForRange(fileName: string, start: number, end: number, options: any): Promise; + + /** + * Get formatting changes which should be applied after the given keystroke. + * @param options `typescript.FormatCodeOptions` + * @returns `Promise` + */ + getFormattingEditsAfterKeystroke(fileName: string, postion: number, ch: string, options: any): Promise; + + /** + * Get other occurrences which should be updated when renaming the item at the given file and position. + * @returns `Promise` + */ + findRenameLocations(fileName: string, positon: number, findInStrings: boolean, findInComments: boolean, providePrefixAndSuffixTextForRename: boolean): Promise; + + /** + * Get edits which should be applied to rename the item at the given file and position (or a failure reason). + * @param options `typescript.RenameInfoOptions` + * @returns `Promise` + */ + getRenameInfo(fileName: string, positon: number, options: any): Promise; + + /** + * Get transpiled output for the given file. + * @returns `typescript.EmitOutput` + */ + getEmitOutput(fileName: string): Promise; + + /** + * Get possible code fixes at the given position in the file. + * @param formatOptions `typescript.FormatCodeOptions` + * @returns `Promise>` + */ + getCodeFixesAtPosition(fileName: string, start: number, end: number, errorCodes: number[], formatOptions: any): Promise>; + } + + export const typescriptVersion: string; + + export const typescriptDefaults: LanguageServiceDefaults; + export const javascriptDefaults: LanguageServiceDefaults; + + export const getTypeScriptWorker: () => Promise<(...uris: Uri[]) => Promise>; + export const getJavaScriptWorker: () => Promise<(...uris: Uri[]) => Promise>; } /*---------------------------------------------------------------------------------------------