prepare for 0.24.0

This commit is contained in:
Alex Dima 2021-05-12 18:37:02 +02:00
parent d2adc1dcd9
commit 882c65e325
No known key found for this signature in database
GPG key ID: 6E58D7B045760DA0
5 changed files with 388 additions and 276 deletions

View file

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

36
package-lock.json generated
View file

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

View file

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

290
typedoc/monaco.d.ts vendored
View file

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

View file

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