@codingame/monaco-vscode-editor-api 21.6.0 → 22.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codingame/monaco-vscode-editor-api",
3
- "version": "21.6.0",
3
+ "version": "22.0.0",
4
4
  "private": false,
5
5
  "description": "VSCode public API plugged on the monaco editor - monaco-editor compatible api",
6
6
  "keywords": [],
@@ -15,8 +15,8 @@
15
15
  },
16
16
  "type": "module",
17
17
  "dependencies": {
18
- "@codingame/monaco-vscode-5452e2b7-9081-5f95-839b-4ab3544ce28f-common": "21.6.0",
19
- "@codingame/monaco-vscode-api": "21.6.0"
18
+ "@codingame/monaco-vscode-5452e2b7-9081-5f95-839b-4ab3544ce28f-common": "22.0.0",
19
+ "@codingame/monaco-vscode-api": "22.0.0"
20
20
  },
21
21
  "exports": {
22
22
  ".": "./esm/vs/editor/editor.api.js",
@@ -3457,6 +3457,10 @@ export namespace editor {
3457
3457
  * Controls the max number of text cursors that can be in an active editor at once.
3458
3458
  */
3459
3459
  multiCursorLimit?: number;
3460
+ /**
3461
+ * Enables middle mouse button to open links and Go To Definition
3462
+ */
3463
+ mouseMiddleClickAction?: MouseMiddleClickAction;
3460
3464
  /**
3461
3465
  * Configure the editor's accessibility support.
3462
3466
  * Defaults to 'auto'. It is best to leave this to 'auto'.
@@ -4579,6 +4583,7 @@ export namespace editor {
4579
4583
  syntaxHighlightingEnabled?: boolean;
4580
4584
  suppressSuggestions?: boolean;
4581
4585
  minShowDelay?: number;
4586
+ suppressInSnippetMode?: boolean;
4582
4587
  /**
4583
4588
  * Does not clear active inline suggestions when the editor loses focus.
4584
4589
  */
@@ -4942,91 +4947,92 @@ export namespace editor {
4942
4947
  mouseWheelZoom = 84,
4943
4948
  multiCursorMergeOverlapping = 85,
4944
4949
  multiCursorModifier = 86,
4945
- multiCursorPaste = 87,
4946
- multiCursorLimit = 88,
4947
- occurrencesHighlight = 89,
4948
- occurrencesHighlightDelay = 90,
4949
- overtypeCursorStyle = 91,
4950
- overtypeOnPaste = 92,
4951
- overviewRulerBorder = 93,
4952
- overviewRulerLanes = 94,
4953
- padding = 95,
4954
- pasteAs = 96,
4955
- parameterHints = 97,
4956
- peekWidgetDefaultFocus = 98,
4957
- placeholder = 99,
4958
- definitionLinkOpensInPeek = 100,
4959
- quickSuggestions = 101,
4960
- quickSuggestionsDelay = 102,
4961
- readOnly = 103,
4962
- readOnlyMessage = 104,
4963
- renameOnType = 105,
4964
- renderRichScreenReaderContent = 106,
4965
- renderControlCharacters = 107,
4966
- renderFinalNewline = 108,
4967
- renderLineHighlight = 109,
4968
- renderLineHighlightOnlyWhenFocus = 110,
4969
- renderValidationDecorations = 111,
4970
- renderWhitespace = 112,
4971
- revealHorizontalRightPadding = 113,
4972
- roundedSelection = 114,
4973
- rulers = 115,
4974
- scrollbar = 116,
4975
- scrollBeyondLastColumn = 117,
4976
- scrollBeyondLastLine = 118,
4977
- scrollPredominantAxis = 119,
4978
- selectionClipboard = 120,
4979
- selectionHighlight = 121,
4980
- selectionHighlightMaxLength = 122,
4981
- selectionHighlightMultiline = 123,
4982
- selectOnLineNumbers = 124,
4983
- showFoldingControls = 125,
4984
- showUnused = 126,
4985
- snippetSuggestions = 127,
4986
- smartSelect = 128,
4987
- smoothScrolling = 129,
4988
- stickyScroll = 130,
4989
- stickyTabStops = 131,
4990
- stopRenderingLineAfter = 132,
4991
- suggest = 133,
4992
- suggestFontSize = 134,
4993
- suggestLineHeight = 135,
4994
- suggestOnTriggerCharacters = 136,
4995
- suggestSelection = 137,
4996
- tabCompletion = 138,
4997
- tabIndex = 139,
4998
- trimWhitespaceOnDelete = 140,
4999
- unicodeHighlighting = 141,
5000
- unusualLineTerminators = 142,
5001
- useShadowDOM = 143,
5002
- useTabStops = 144,
5003
- wordBreak = 145,
5004
- wordSegmenterLocales = 146,
5005
- wordSeparators = 147,
5006
- wordWrap = 148,
5007
- wordWrapBreakAfterCharacters = 149,
5008
- wordWrapBreakBeforeCharacters = 150,
5009
- wordWrapColumn = 151,
5010
- wordWrapOverride1 = 152,
5011
- wordWrapOverride2 = 153,
5012
- wrappingIndent = 154,
5013
- wrappingStrategy = 155,
5014
- showDeprecated = 156,
5015
- inertialScroll = 157,
5016
- inlayHints = 158,
5017
- wrapOnEscapedLineFeeds = 159,
5018
- effectiveCursorStyle = 160,
5019
- editorClassName = 161,
5020
- pixelRatio = 162,
5021
- tabFocusMode = 163,
5022
- layoutInfo = 164,
5023
- wrappingInfo = 165,
5024
- defaultColorDecorators = 166,
5025
- colorDecoratorsActivatedOn = 167,
5026
- inlineCompletionsAccessibilityVerbose = 168,
5027
- effectiveEditContext = 169,
5028
- scrollOnMiddleClick = 170,
5029
- effectiveAllowVariableFonts = 171
4950
+ mouseMiddleClickAction = 87,
4951
+ multiCursorPaste = 88,
4952
+ multiCursorLimit = 89,
4953
+ occurrencesHighlight = 90,
4954
+ occurrencesHighlightDelay = 91,
4955
+ overtypeCursorStyle = 92,
4956
+ overtypeOnPaste = 93,
4957
+ overviewRulerBorder = 94,
4958
+ overviewRulerLanes = 95,
4959
+ padding = 96,
4960
+ pasteAs = 97,
4961
+ parameterHints = 98,
4962
+ peekWidgetDefaultFocus = 99,
4963
+ placeholder = 100,
4964
+ definitionLinkOpensInPeek = 101,
4965
+ quickSuggestions = 102,
4966
+ quickSuggestionsDelay = 103,
4967
+ readOnly = 104,
4968
+ readOnlyMessage = 105,
4969
+ renameOnType = 106,
4970
+ renderRichScreenReaderContent = 107,
4971
+ renderControlCharacters = 108,
4972
+ renderFinalNewline = 109,
4973
+ renderLineHighlight = 110,
4974
+ renderLineHighlightOnlyWhenFocus = 111,
4975
+ renderValidationDecorations = 112,
4976
+ renderWhitespace = 113,
4977
+ revealHorizontalRightPadding = 114,
4978
+ roundedSelection = 115,
4979
+ rulers = 116,
4980
+ scrollbar = 117,
4981
+ scrollBeyondLastColumn = 118,
4982
+ scrollBeyondLastLine = 119,
4983
+ scrollPredominantAxis = 120,
4984
+ selectionClipboard = 121,
4985
+ selectionHighlight = 122,
4986
+ selectionHighlightMaxLength = 123,
4987
+ selectionHighlightMultiline = 124,
4988
+ selectOnLineNumbers = 125,
4989
+ showFoldingControls = 126,
4990
+ showUnused = 127,
4991
+ snippetSuggestions = 128,
4992
+ smartSelect = 129,
4993
+ smoothScrolling = 130,
4994
+ stickyScroll = 131,
4995
+ stickyTabStops = 132,
4996
+ stopRenderingLineAfter = 133,
4997
+ suggest = 134,
4998
+ suggestFontSize = 135,
4999
+ suggestLineHeight = 136,
5000
+ suggestOnTriggerCharacters = 137,
5001
+ suggestSelection = 138,
5002
+ tabCompletion = 139,
5003
+ tabIndex = 140,
5004
+ trimWhitespaceOnDelete = 141,
5005
+ unicodeHighlighting = 142,
5006
+ unusualLineTerminators = 143,
5007
+ useShadowDOM = 144,
5008
+ useTabStops = 145,
5009
+ wordBreak = 146,
5010
+ wordSegmenterLocales = 147,
5011
+ wordSeparators = 148,
5012
+ wordWrap = 149,
5013
+ wordWrapBreakAfterCharacters = 150,
5014
+ wordWrapBreakBeforeCharacters = 151,
5015
+ wordWrapColumn = 152,
5016
+ wordWrapOverride1 = 153,
5017
+ wordWrapOverride2 = 154,
5018
+ wrappingIndent = 155,
5019
+ wrappingStrategy = 156,
5020
+ showDeprecated = 157,
5021
+ inertialScroll = 158,
5022
+ inlayHints = 159,
5023
+ wrapOnEscapedLineFeeds = 160,
5024
+ effectiveCursorStyle = 161,
5025
+ editorClassName = 162,
5026
+ pixelRatio = 163,
5027
+ tabFocusMode = 164,
5028
+ layoutInfo = 165,
5029
+ wrappingInfo = 166,
5030
+ defaultColorDecorators = 167,
5031
+ colorDecoratorsActivatedOn = 168,
5032
+ inlineCompletionsAccessibilityVerbose = 169,
5033
+ effectiveEditContext = 170,
5034
+ scrollOnMiddleClick = 171,
5035
+ effectiveAllowVariableFonts = 172
5030
5036
  }
5031
5037
  export const EditorOptions: {
5032
5038
  acceptSuggestionOnCommitCharacter: IEditorOption<EditorOption.acceptSuggestionOnCommitCharacter, boolean>;
@@ -5121,6 +5127,7 @@ export namespace editor {
5121
5127
  mouseWheelZoom: IEditorOption<EditorOption.mouseWheelZoom, boolean>;
5122
5128
  multiCursorMergeOverlapping: IEditorOption<EditorOption.multiCursorMergeOverlapping, boolean>;
5123
5129
  multiCursorModifier: IEditorOption<EditorOption.multiCursorModifier, "altKey" | "metaKey" | "ctrlKey">;
5130
+ mouseMiddleClickAction: IEditorOption<EditorOption.mouseMiddleClickAction, MouseMiddleClickAction>;
5124
5131
  multiCursorPaste: IEditorOption<EditorOption.multiCursorPaste, "spread" | "full">;
5125
5132
  multiCursorLimit: IEditorOption<EditorOption.multiCursorLimit, number>;
5126
5133
  occurrencesHighlight: IEditorOption<EditorOption.occurrencesHighlight, "off" | "singleFile" | "multiFile">;
@@ -5208,6 +5215,7 @@ export namespace editor {
5208
5215
  }[keyof EditorOptionsType];
5209
5216
  type ComputedEditorOptionValue<T extends IEditorOption<any, any>> = T extends IEditorOption<any, infer R> ? R : never;
5210
5217
  export type FindComputedEditorOptionValueById<T extends EditorOption> = NonNullable<ComputedEditorOptionValue<EditorOptionsType[FindEditorOptionsKeyById<T>]>>;
5218
+ export type MouseMiddleClickAction = "default" | "openLink" | "ctrlLeftClick";
5211
5219
  export interface IEditorConstructionOptions extends IEditorOptions {
5212
5220
  /**
5213
5221
  * The initial editor dimension (to avoid measuring the container).
@@ -6258,6 +6266,15 @@ export namespace editor {
6258
6266
  export type IModel = ITextModel;
6259
6267
  }
6260
6268
  export namespace languages {
6269
+ export class EditDeltaInfo {
6270
+ readonly linesAdded: number;
6271
+ readonly linesRemoved: number;
6272
+ readonly charsAdded: number;
6273
+ readonly charsRemoved: number;
6274
+ static fromText(text: string): EditDeltaInfo;
6275
+ static tryCreate(linesAdded: number | undefined, linesRemoved: number | undefined, charsAdded: number | undefined, charsRemoved: number | undefined): EditDeltaInfo | undefined;
6276
+ constructor(linesAdded: number, linesRemoved: number, charsAdded: number, charsRemoved: number);
6277
+ }
6261
6278
  export interface IRelativePattern {
6262
6279
  /**
6263
6280
  * A base file path to which this pattern will be matched against relatively.
@@ -7240,7 +7257,7 @@ export namespace languages {
7240
7257
  * Will be called when an item is shown.
7241
7258
  * @param updatedInsertText Is useful to understand bracket completion.
7242
7259
  */
7243
- handleItemDidShow?(completions: T, item: T["items"][number], updatedInsertText: string): void;
7260
+ handleItemDidShow?(completions: T, item: T["items"][number], updatedInsertText: string, editDeltaInfo: EditDeltaInfo): void;
7244
7261
  /**
7245
7262
  * Will be called when an item is partially accepted. TODO: also handle full acceptance here!
7246
7263
  * @param acceptedCharacters Deprecated. Use `info.acceptedCharacters` instead.
@@ -7305,6 +7322,7 @@ export namespace languages {
7305
7322
  timeUntilShown: number | undefined;
7306
7323
  timeUntilProviderRequest: number;
7307
7324
  timeUntilProviderResponse: number;
7325
+ notShownReason: string | undefined;
7308
7326
  editorType: string;
7309
7327
  viewKind: string | undefined;
7310
7328
  error: string | undefined;
@@ -7321,6 +7339,8 @@ export namespace languages {
7321
7339
  sameShapeReplacements?: boolean;
7322
7340
  typingInterval: number;
7323
7341
  typingIntervalCharacterCount: number;
7342
+ selectedSuggestionInfo: boolean;
7343
+ availableProviders: string;
7324
7344
  };
7325
7345
  export interface CodeAction {
7326
7346
  title: string;
@@ -14,6 +14,7 @@ import { MonarchTokenizer } from '../common/monarch/monarchLexer.js';
14
14
  import { IStandaloneThemeService } from '@codingame/monaco-vscode-api/vscode/vs/editor/standalone/common/standaloneTheme.service';
15
15
  import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
16
16
  import { IMarkerService } from '@codingame/monaco-vscode-api/vscode/vs/platform/markers/common/markers.service';
17
+ import { EditDeltaInfo } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/textModelEditSource';
17
18
 
18
19
  function register(language) {
19
20
  ModesRegistry.registerLanguage(language);
@@ -434,6 +435,7 @@ function createMonacoLanguagesAPI() {
434
435
  InlineCompletionDisplayLocationKind: InlineCompletionDisplayLocationKind,
435
436
  FoldingRangeKind: FoldingRangeKind,
436
437
  SelectedSuggestionInfo: SelectedSuggestionInfo,
438
+ EditDeltaInfo: EditDeltaInfo,
437
439
  };
438
440
  }
439
441