@theia/monaco 1.24.0-next.46 → 1.24.0-next.49

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.
Files changed (220) hide show
  1. package/lib/browser/monaco-bulk-edit-service.d.ts +6 -4
  2. package/lib/browser/monaco-bulk-edit-service.d.ts.map +1 -1
  3. package/lib/browser/monaco-bulk-edit-service.js.map +1 -1
  4. package/lib/browser/monaco-color-registry.d.ts +6 -3
  5. package/lib/browser/monaco-color-registry.d.ts.map +1 -1
  6. package/lib/browser/monaco-color-registry.js +17 -13
  7. package/lib/browser/monaco-color-registry.js.map +1 -1
  8. package/lib/browser/monaco-command-service.d.ts +6 -5
  9. package/lib/browser/monaco-command-service.d.ts.map +1 -1
  10. package/lib/browser/monaco-command-service.js +2 -2
  11. package/lib/browser/monaco-command-service.js.map +1 -1
  12. package/lib/browser/monaco-command.d.ts +2 -1
  13. package/lib/browser/monaco-command.d.ts.map +1 -1
  14. package/lib/browser/monaco-command.js +17 -16
  15. package/lib/browser/monaco-command.js.map +1 -1
  16. package/lib/browser/monaco-context-key-service.d.ts +10 -8
  17. package/lib/browser/monaco-context-key-service.d.ts.map +1 -1
  18. package/lib/browser/monaco-context-key-service.js +18 -9
  19. package/lib/browser/monaco-context-key-service.js.map +1 -1
  20. package/lib/browser/monaco-context-menu.d.ts +8 -2
  21. package/lib/browser/monaco-context-menu.d.ts.map +1 -1
  22. package/lib/browser/monaco-context-menu.js +22 -4
  23. package/lib/browser/monaco-context-menu.js.map +1 -1
  24. package/lib/browser/monaco-diagnostic-collection.d.ts +4 -6
  25. package/lib/browser/monaco-diagnostic-collection.d.ts.map +1 -1
  26. package/lib/browser/monaco-diagnostic-collection.js +1 -0
  27. package/lib/browser/monaco-diagnostic-collection.js.map +1 -1
  28. package/lib/browser/monaco-diff-editor.d.ts +8 -10
  29. package/lib/browser/monaco-diff-editor.d.ts.map +1 -1
  30. package/lib/browser/monaco-diff-editor.js +4 -1
  31. package/lib/browser/monaco-diff-editor.js.map +1 -1
  32. package/lib/browser/monaco-diff-navigator-factory.d.ts +3 -4
  33. package/lib/browser/monaco-diff-navigator-factory.d.ts.map +1 -1
  34. package/lib/browser/monaco-diff-navigator-factory.js +14 -9
  35. package/lib/browser/monaco-diff-navigator-factory.js.map +1 -1
  36. package/lib/browser/monaco-editor-model.d.ts +20 -13
  37. package/lib/browser/monaco-editor-model.d.ts.map +1 -1
  38. package/lib/browser/monaco-editor-model.js +39 -14
  39. package/lib/browser/monaco-editor-model.js.map +1 -1
  40. package/lib/browser/monaco-editor-provider.d.ts +13 -19
  41. package/lib/browser/monaco-editor-provider.d.ts.map +1 -1
  42. package/lib/browser/monaco-editor-provider.js +39 -96
  43. package/lib/browser/monaco-editor-provider.js.map +1 -1
  44. package/lib/browser/monaco-editor-service.d.ts +9 -8
  45. package/lib/browser/monaco-editor-service.d.ts.map +1 -1
  46. package/lib/browser/monaco-editor-service.js +19 -8
  47. package/lib/browser/monaco-editor-service.js.map +1 -1
  48. package/lib/browser/monaco-editor-zone-widget.d.ts +3 -3
  49. package/lib/browser/monaco-editor-zone-widget.d.ts.map +1 -1
  50. package/lib/browser/monaco-editor-zone-widget.js +3 -2
  51. package/lib/browser/monaco-editor-zone-widget.js.map +1 -1
  52. package/lib/browser/monaco-editor.d.ts +20 -18
  53. package/lib/browser/monaco-editor.d.ts.map +1 -1
  54. package/lib/browser/monaco-editor.js +53 -19
  55. package/lib/browser/monaco-editor.js.map +1 -1
  56. package/lib/browser/monaco-formatting-conflicts.d.ts +1 -1
  57. package/lib/browser/monaco-formatting-conflicts.d.ts.map +1 -1
  58. package/lib/browser/monaco-formatting-conflicts.js +2 -1
  59. package/lib/browser/monaco-formatting-conflicts.js.map +1 -1
  60. package/lib/browser/monaco-frontend-application-contribution.d.ts +10 -1
  61. package/lib/browser/monaco-frontend-application-contribution.d.ts.map +1 -1
  62. package/lib/browser/monaco-frontend-application-contribution.js +42 -1
  63. package/lib/browser/monaco-frontend-application-contribution.js.map +1 -1
  64. package/lib/browser/monaco-frontend-module.d.ts +2 -1
  65. package/lib/browser/monaco-frontend-module.d.ts.map +1 -1
  66. package/lib/browser/monaco-frontend-module.js +8 -5
  67. package/lib/browser/monaco-frontend-module.js.map +1 -1
  68. package/lib/browser/monaco-gotoline-quick-access.d.ts +4 -2
  69. package/lib/browser/monaco-gotoline-quick-access.d.ts.map +1 -1
  70. package/lib/browser/monaco-gotoline-quick-access.js +9 -4
  71. package/lib/browser/monaco-gotoline-quick-access.js.map +1 -1
  72. package/lib/browser/monaco-gotosymbol-quick-access.d.ts +10 -3
  73. package/lib/browser/monaco-gotosymbol-quick-access.d.ts.map +1 -1
  74. package/lib/browser/monaco-gotosymbol-quick-access.js +19 -8
  75. package/lib/browser/monaco-gotosymbol-quick-access.js.map +1 -1
  76. package/lib/browser/monaco-indexed-db.d.ts +1 -1
  77. package/lib/browser/monaco-indexed-db.d.ts.map +1 -1
  78. package/lib/browser/monaco-indexed-db.js.map +1 -1
  79. package/lib/browser/monaco-keybinding.d.ts.map +1 -1
  80. package/lib/browser/monaco-keybinding.js +4 -2
  81. package/lib/browser/monaco-keybinding.js.map +1 -1
  82. package/lib/browser/monaco-keycode-map.d.ts +2 -2
  83. package/lib/browser/monaco-keycode-map.d.ts.map +1 -1
  84. package/lib/browser/monaco-keycode-map.js +122 -122
  85. package/lib/browser/monaco-keycode-map.js.map +1 -1
  86. package/lib/browser/monaco-languages.d.ts +1 -1
  87. package/lib/browser/monaco-languages.d.ts.map +1 -1
  88. package/lib/browser/monaco-languages.js +1 -0
  89. package/lib/browser/monaco-languages.js.map +1 -1
  90. package/lib/browser/monaco-menu.js +7 -7
  91. package/lib/browser/monaco-menu.js.map +1 -1
  92. package/lib/browser/monaco-mime-service.d.ts.map +1 -1
  93. package/lib/browser/monaco-mime-service.js +8 -4
  94. package/lib/browser/monaco-mime-service.js.map +1 -1
  95. package/lib/browser/monaco-outline-contribution.d.ts +15 -16
  96. package/lib/browser/monaco-outline-contribution.d.ts.map +1 -1
  97. package/lib/browser/monaco-outline-contribution.js +21 -19
  98. package/lib/browser/monaco-outline-contribution.js.map +1 -1
  99. package/lib/browser/monaco-quick-access-registry.d.ts.map +1 -1
  100. package/lib/browser/monaco-quick-access-registry.js +11 -13
  101. package/lib/browser/monaco-quick-access-registry.js.map +1 -1
  102. package/lib/browser/monaco-quick-input-service.d.ts +46 -25
  103. package/lib/browser/monaco-quick-input-service.d.ts.map +1 -1
  104. package/lib/browser/monaco-quick-input-service.js +40 -29
  105. package/lib/browser/monaco-quick-input-service.js.map +1 -1
  106. package/lib/browser/monaco-resolved-keybinding.d.ts +9 -7
  107. package/lib/browser/monaco-resolved-keybinding.d.ts.map +1 -1
  108. package/lib/browser/monaco-resolved-keybinding.js +35 -14
  109. package/lib/browser/monaco-resolved-keybinding.js.map +1 -1
  110. package/lib/browser/monaco-snippet-suggest-provider.d.ts +1 -1
  111. package/lib/browser/monaco-snippet-suggest-provider.d.ts.map +1 -1
  112. package/lib/browser/monaco-snippet-suggest-provider.js +5 -3
  113. package/lib/browser/monaco-snippet-suggest-provider.js.map +1 -1
  114. package/lib/browser/monaco-status-bar-contribution.d.ts +2 -2
  115. package/lib/browser/monaco-status-bar-contribution.d.ts.map +1 -1
  116. package/lib/browser/monaco-status-bar-contribution.js.map +1 -1
  117. package/lib/browser/monaco-text-model-service.d.ts +14 -8
  118. package/lib/browser/monaco-text-model-service.d.ts.map +1 -1
  119. package/lib/browser/monaco-text-model-service.js +35 -17
  120. package/lib/browser/monaco-text-model-service.js.map +1 -1
  121. package/lib/browser/monaco-theming-service.d.ts +1 -1
  122. package/lib/browser/monaco-theming-service.d.ts.map +1 -1
  123. package/lib/browser/monaco-theming-service.js.map +1 -1
  124. package/lib/browser/monaco-to-protocol-converter.d.ts +1 -1
  125. package/lib/browser/monaco-to-protocol-converter.d.ts.map +1 -1
  126. package/lib/browser/monaco-to-protocol-converter.js.map +1 -1
  127. package/lib/browser/monaco-workspace.d.ts +7 -6
  128. package/lib/browser/monaco-workspace.d.ts.map +1 -1
  129. package/lib/browser/monaco-workspace.js +13 -7
  130. package/lib/browser/monaco-workspace.js.map +1 -1
  131. package/lib/browser/protocol-to-monaco-converter.d.ts +1 -1
  132. package/lib/browser/protocol-to-monaco-converter.d.ts.map +1 -1
  133. package/lib/browser/protocol-to-monaco-converter.js +1 -0
  134. package/lib/browser/protocol-to-monaco-converter.js.map +1 -1
  135. package/lib/browser/textmate/monaco-textmate-service.d.ts.map +1 -1
  136. package/lib/browser/textmate/monaco-textmate-service.js +14 -11
  137. package/lib/browser/textmate/monaco-textmate-service.js.map +1 -1
  138. package/lib/browser/textmate/monaco-theme-registry.d.ts +5 -3
  139. package/lib/browser/textmate/monaco-theme-registry.d.ts.map +1 -1
  140. package/lib/browser/textmate/monaco-theme-registry.js +6 -3
  141. package/lib/browser/textmate/monaco-theme-registry.js.map +1 -1
  142. package/lib/browser/textmate/monaco-theme-types.d.ts +5 -4
  143. package/lib/browser/textmate/monaco-theme-types.d.ts.map +1 -1
  144. package/lib/browser/textmate/monaco-theme-types.js +1 -0
  145. package/lib/browser/textmate/monaco-theme-types.js.map +1 -1
  146. package/lib/browser/textmate/textmate-contribution.d.ts.map +1 -1
  147. package/lib/browser/textmate/textmate-contribution.js +1 -0
  148. package/lib/browser/textmate/textmate-contribution.js.map +1 -1
  149. package/lib/browser/textmate/textmate-snippet-completion-provider.d.ts +1 -1
  150. package/lib/browser/textmate/textmate-snippet-completion-provider.d.ts.map +1 -1
  151. package/lib/browser/textmate/textmate-snippet-completion-provider.js +3 -1
  152. package/lib/browser/textmate/textmate-snippet-completion-provider.js.map +1 -1
  153. package/lib/browser/textmate/textmate-tokenizer.d.ts +1 -1
  154. package/lib/browser/textmate/textmate-tokenizer.d.ts.map +1 -1
  155. package/lib/browser/textmate/textmate-tokenizer.js +2 -2
  156. package/lib/browser/textmate/textmate-tokenizer.js.map +1 -1
  157. package/package.json +9 -10
  158. package/src/browser/monaco-bulk-edit-service.ts +9 -4
  159. package/src/browser/monaco-color-registry.ts +17 -14
  160. package/src/browser/monaco-command-service.ts +8 -7
  161. package/src/browser/monaco-command.ts +18 -16
  162. package/src/browser/monaco-context-key-service.ts +25 -16
  163. package/src/browser/monaco-context-menu.ts +23 -6
  164. package/src/browser/monaco-diagnostic-collection.ts +4 -5
  165. package/src/browser/monaco-diff-editor.ts +12 -14
  166. package/src/browser/monaco-diff-navigator-factory.ts +18 -14
  167. package/src/browser/monaco-editor-model.ts +56 -24
  168. package/src/browser/monaco-editor-provider.ts +48 -114
  169. package/src/browser/monaco-editor-service.ts +27 -16
  170. package/src/browser/monaco-editor-zone-widget.ts +6 -2
  171. package/src/browser/monaco-editor.ts +85 -44
  172. package/src/browser/monaco-formatting-conflicts.ts +10 -5
  173. package/src/browser/monaco-frontend-application-contribution.ts +40 -2
  174. package/src/browser/monaco-frontend-module.ts +18 -14
  175. package/src/browser/monaco-gotoline-quick-access.ts +10 -5
  176. package/src/browser/monaco-gotosymbol-quick-access.ts +17 -6
  177. package/src/browser/monaco-indexed-db.ts +1 -0
  178. package/src/browser/monaco-keybinding.ts +3 -2
  179. package/src/browser/monaco-keycode-map.ts +72 -71
  180. package/src/browser/monaco-languages.ts +1 -0
  181. package/src/browser/monaco-menu.ts +7 -7
  182. package/src/browser/monaco-mime-service.ts +9 -5
  183. package/src/browser/monaco-outline-contribution.ts +36 -32
  184. package/src/browser/monaco-quick-access-registry.ts +29 -19
  185. package/src/browser/monaco-quick-input-service.ts +102 -59
  186. package/src/browser/monaco-resolved-keybinding.ts +52 -28
  187. package/src/browser/monaco-snippet-suggest-provider.ts +5 -3
  188. package/src/browser/monaco-status-bar-contribution.ts +2 -1
  189. package/src/browser/monaco-text-model-service.ts +49 -26
  190. package/src/browser/monaco-theming-service.ts +1 -0
  191. package/src/browser/monaco-to-protocol-converter.ts +1 -0
  192. package/src/browser/monaco-workspace.ts +28 -19
  193. package/src/browser/protocol-to-monaco-converter.ts +1 -0
  194. package/src/browser/textmate/monaco-textmate-service.ts +15 -12
  195. package/src/browser/textmate/monaco-theme-registry.ts +10 -5
  196. package/src/browser/textmate/monaco-theme-types.ts +5 -4
  197. package/src/browser/textmate/textmate-contribution.ts +1 -0
  198. package/src/browser/textmate/textmate-snippet-completion-provider.ts +4 -1
  199. package/src/browser/textmate/textmate-tokenizer.ts +3 -2
  200. package/lib/browser/monaco-browser-module.d.ts +0 -5
  201. package/lib/browser/monaco-browser-module.d.ts.map +0 -1
  202. package/lib/browser/monaco-browser-module.js +0 -27
  203. package/lib/browser/monaco-browser-module.js.map +0 -1
  204. package/lib/browser/monaco-comparers.d.ts +0 -10
  205. package/lib/browser/monaco-comparers.d.ts.map +0 -1
  206. package/lib/browser/monaco-comparers.js +0 -109
  207. package/lib/browser/monaco-comparers.js.map +0 -1
  208. package/lib/browser/monaco-loader.d.ts +0 -4
  209. package/lib/browser/monaco-loader.d.ts.map +0 -1
  210. package/lib/browser/monaco-loader.js +0 -177
  211. package/lib/browser/monaco-loader.js.map +0 -1
  212. package/lib/electron-browser/monaco-electron-module.d.ts +0 -5
  213. package/lib/electron-browser/monaco-electron-module.d.ts.map +0 -1
  214. package/lib/electron-browser/monaco-electron-module.js +0 -50
  215. package/lib/electron-browser/monaco-electron-module.js.map +0 -1
  216. package/src/browser/monaco-browser-module.ts +0 -26
  217. package/src/browser/monaco-comparers.ts +0 -125
  218. package/src/browser/monaco-loader.ts +0 -193
  219. package/src/electron-browser/monaco-electron-module.ts +0 -52
  220. package/src/typings/monaco/index.d.ts +0 -2471
@@ -1,2471 +0,0 @@
1
- // *****************************************************************************
2
- // Copyright (C) 2018 TypeFox and others.
3
- //
4
- // This program and the accompanying materials are made available under the
5
- // terms of the Eclipse Public License v. 2.0 which is available at
6
- // http://www.eclipse.org/legal/epl-2.0.
7
- //
8
- // This Source Code may also be made available under the following Secondary
9
- // Licenses when the conditions for such availability set forth in the Eclipse
10
- // Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
- // with the GNU Classpath Exception which is available at
12
- // https://www.gnu.org/software/classpath/license.html.
13
- //
14
- // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
- // *****************************************************************************
16
- /* eslint-disable @typescript-eslint/no-explicit-any */
17
- /* eslint-disable max-len */
18
-
19
- // eslint-disable-next-line spaced-comment
20
- /// <reference types='@theia/monaco-editor-core/monaco'/>
21
-
22
- declare module monaco.languages {
23
-
24
- export class ExtensionIdentifier {
25
- public readonly value: string;
26
- }
27
-
28
- /**
29
- * The document formatting provider interface defines the contract between extensions and
30
- * the formatting-feature.
31
- */
32
- export interface DocumentFormattingEditProvider {
33
- readonly extensionId?: ExtensionIdentifier;
34
- }
35
-
36
- /**
37
- * The document formatting provider interface defines the contract between extensions and
38
- * the formatting-feature.
39
- */
40
- export interface DocumentRangeFormattingEditProvider {
41
- readonly extensionId?: ExtensionIdentifier;
42
- }
43
-
44
- }
45
-
46
- declare module monaco.format {
47
-
48
- export const enum FormattingMode {
49
- Explicit = 1,
50
- Silent = 2
51
- }
52
-
53
- export interface IFormattingEditProviderSelector {
54
- <T extends (monaco.languages.DocumentFormattingEditProvider | monaco.languages.DocumentRangeFormattingEditProvider)>(formatter: T[], document: monaco.editor.ITextModel, mode: FormattingMode): Promise<T | undefined>;
55
- }
56
-
57
- export abstract class FormattingConflicts {
58
- static setFormatterSelector(selector: IFormattingEditProviderSelector): monaco.IDisposable;
59
- }
60
-
61
- }
62
-
63
- declare module monaco.instantiation {
64
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/platform/instantiation/common/instantiation.ts#L86
65
- export interface IInstantiationService {
66
- invokeFunction: (fn: any, ...args: any) => any
67
- }
68
- }
69
-
70
- declare module monaco.textModel {
71
- interface ITextStream {
72
- on(event: 'data', callback: (data: string) => void): void;
73
- on(event: 'error', callback: (err: Error) => void): void;
74
- on(event: 'end', callback: () => void): void;
75
- on(event: string, callback: any): void;
76
- }
77
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/editor/common/model/textModel.ts#L62
78
- export function createTextBufferFactoryFromStream(stream: ITextStream, filter?: (chunk: any) => string, validator?: (chunk: any) => Error | undefined): Promise<monaco.editor.ITextBufferFactory>;
79
- }
80
-
81
- declare module monaco.editor {
82
-
83
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/editor/common/model.ts#L1264
84
- export interface ITextBufferFactory {
85
- getFirstLineText(lengthLimit: number): string;
86
- }
87
-
88
- export class ResourceEdit {
89
- protected constructor(readonly metadata?: WorkspaceEditMetadata) { }
90
- static convert(workspaceEdit: WorkspaceEdit): ResourceEdit[];
91
- }
92
-
93
- export class ResourceTextEdit extends ResourceEdit {
94
- constructor(
95
- readonly resource: monaco.Uri,
96
- readonly textEdit: monaco.languages.TextEdit,
97
- readonly versionId?: number,
98
- readonly metadata?: monaco.languages.WorkspaceEditMetadata
99
- ) {
100
- super(metadata);
101
- }
102
- }
103
-
104
- export class ResourceFileEdit extends ResourceEdit {
105
- constructor(
106
- readonly oldResource: monaco.Uri | undefined,
107
- readonly newResource: monaco.Uri | undefined,
108
- readonly options?: monaco.languages.WorkspaceFileEditOptions,
109
- readonly metadata?: monaco.languages.WorkspaceEditMetadata
110
- ) {
111
- super(metadata);
112
- }
113
- }
114
-
115
- export interface ICodeEditor {
116
- protected readonly _instantiationService: monaco.instantiation.IInstantiationService;
117
-
118
- /**
119
- * @internal
120
- */
121
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/editor/browser/editorBrowser.ts#L736
122
- setDecorations(decorationTypeKey: string, ranges: editorCommon.IDecorationOptions[]): void;
123
-
124
- /**
125
- * @internal
126
- */
127
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/editor/browser/editorBrowser.ts#L746
128
- removeDecorations(decorationTypeKey: string): void;
129
- }
130
-
131
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/platform/undoRedo/common/undoRedo.ts#L92-L111
132
- export class UndoRedoSource { }
133
-
134
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/editor/browser/services/bulkEditService.ts#L67
135
- export interface IBulkEditOptions {
136
- editor?: ICodeEditor;
137
- progress?: IProgress<IProgressStep>;
138
- token?: CancellationToken;
139
- showPreview?: boolean;
140
- label?: string;
141
- quotableLabel?: string;
142
- undoRedoSource?: UndoRedoSource;
143
- undoRedoGroupId?: number;
144
- confirmBeforeUndo?: boolean;
145
- }
146
-
147
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/editor/browser/services/bulkEditService.ts#L79
148
- export interface IBulkEditResult {
149
- ariaSummary: string;
150
- }
151
-
152
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/editor/browser/services/bulkEditService.ts#L83
153
- export type IBulkEditPreviewHandler = (edit: ResourceEdit[], options?: IBulkEditOptions) => Promise<ResourceEdit[]>;
154
-
155
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/editor/browser/services/bulkEditService.ts#L85
156
- export interface IBulkEditService {
157
- apply(edit: ResourceEdit[], options?: IBulkEditOptions): Promise<IBulkEditResult>;
158
- hasPreviewHandler(): boolean;
159
- setPreviewHandler(handler: IBulkEditPreviewHandler): monaco.IDisposable;
160
- }
161
-
162
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/editor/browser/widget/diffNavigator.ts#L43
163
- export interface IDiffNavigator {
164
- readonly ranges: IDiffRange[];
165
- readonly nextIdx: number;
166
- readonly revealFirst: boolean;
167
- _initIdx(fwd: boolean): void;
168
- }
169
-
170
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/editor/browser/widget/diffNavigator.ts#L16
171
- export interface IDiffRange {
172
- readonly range: Range;
173
- }
174
-
175
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/editor/standalone/browser/standaloneCodeEditor.ts#L245
176
- export interface IStandaloneCodeEditor extends CommonCodeEditor {
177
- setDecorations(decorationTypeKey: string, ranges: IDecorationOptions[]): void;
178
- setDecorationsFast(decorationTypeKey: string, ranges: IRange[]): void;
179
- trigger(source: string, handlerId: string, payload: any): void
180
- _standaloneKeybindingService: {
181
- _store: {
182
- _toDispose: monaco.IDisposable[]
183
- }
184
- resolveKeybinding(keybinding: monaco.keybindings.ChordKeybinding): monaco.keybindings.ResolvedKeybinding[];
185
- resolveKeyboardEvent(keyboardEvent: monaco.IKeyboardEvent): monaco.keybindings.ResolvedKeybinding;
186
- }
187
- }
188
-
189
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/editor/browser/widget/codeEditorWidget.ts#L107
190
- export interface CommonCodeEditor {
191
- readonly _commandService: monaco.commands.ICommandService;
192
- readonly _instantiationService: monaco.instantiation.IInstantiationService;
193
- readonly _contributions: {
194
- 'editor.contrib.referencesController': monaco.referenceSearch.ReferencesController
195
- 'editor.contrib.hover': ModesHoverController
196
- 'css.editor.codeLens': CodeLensContribution
197
- 'editor.contrib.quickFixController': QuickFixController,
198
- 'editor.contrib.suggestController': monaco.suggest.SuggestController
199
- }
200
- readonly _modelData: {
201
- cursor: ICursor
202
- } | null;
203
- }
204
-
205
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/editor/contrib/codeAction/codeActionCommands.ts#L68
206
- export interface QuickFixController {
207
- readonly _ui: {
208
- rawValue?: CodeActionUi
209
- }
210
- }
211
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/editor/contrib/codeAction/codeActionUi.ts#L21
212
- export interface CodeActionUi {
213
- readonly _lightBulbWidget: {
214
- rawValue?: LightBulbWidget
215
- }
216
- }
217
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/editor/contrib/codeAction/lightBulbWidget.ts#L48
218
- export interface LightBulbWidget {
219
- readonly _domNode: HTMLDivElement;
220
- }
221
-
222
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/editor/contrib/codelens/codelensController.ts#L28
223
- export interface CodeLensContribution {
224
- readonly _lenses: CodeLensWidget[];
225
- }
226
-
227
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/editor/contrib/codelens/codelensWidget.ts#L178
228
- export interface CodeLensWidget {
229
- readonly _contentWidget?: CodeLensContentWidget;
230
- }
231
-
232
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/editor/contrib/codelens/codelensWidget.ts#L49
233
- export interface CodeLensContentWidget {
234
- readonly _domNode: HTMLElement;
235
- }
236
-
237
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/editor/contrib/hover/hover.ts#L30
238
- export interface ModesHoverController {
239
- readonly _contentWidget: ModesContentHoverWidget | null;
240
- }
241
-
242
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/base/browser/ui/hover/hoverWidget.ts#L13-L39
243
- export class HoverWidget extends Disposable {
244
- readonly contentsDomNode: HTMLElement;
245
- }
246
-
247
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/editor/contrib/hover/modesContentHover.ts#L177
248
- export interface ModesContentHoverWidget {
249
- readonly _isVisible: boolean;
250
- readonly _hover: HoverWidget;
251
- }
252
-
253
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/editor/common/controller/cursor.ts#L122
254
- export interface ICursor {
255
- trigger(source: string, handlerId: string, payload: any): void;
256
- }
257
-
258
- export interface IEditorOverrideServices {
259
- codeEditorService?: ICodeEditorService;
260
- textModelService?: ITextModelService;
261
- contextMenuService?: IContextMenuService;
262
- commandService?: monaco.commands.ICommandService;
263
- IWorkspaceEditService?: IBulkEditService;
264
- contextKeyService?: monaco.contextKeyService.IContextKeyService;
265
- quickInputService?: monaco.quickInput.IQuickInputService;
266
- }
267
-
268
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/platform/editor/common/editor.ts#L68
269
- export interface IResourceEditorInput {
270
- resource: monaco.Uri;
271
- options?: IResourceInputOptions;
272
- }
273
-
274
- export interface IResourceInputOptions {
275
- /**
276
- * Tells the editor to not receive keyboard focus when the editor is being opened. By default,
277
- * the editor will receive keyboard focus on open.
278
- */
279
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/platform/editor/common/editor.ts#L150
280
- readonly preserveFocus?: boolean;
281
-
282
- /**
283
- * Will reveal the editor if it is already opened and visible in any of the opened editor groups.
284
- */
285
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/platform/editor/common/editor.ts#L175
286
- readonly revealIfVisible?: boolean;
287
-
288
- /**
289
- * Text editor selection.
290
- */
291
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/platform/editor/common/editor.ts#L270
292
- readonly selection?: Partial<monaco.IRange>;
293
- }
294
-
295
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/editor/browser/services/codeEditorService.ts#L16
296
- export interface ICodeEditorService {
297
- getFocusedCodeEditor(): monaco.editor.ICodeEditor | undefined;
298
- getActiveCodeEditor(): monaco.editor.ICodeEditor | undefined;
299
- openCodeEditor(input: monaco.editor.IResourceEditorInput, source?: monaco.editor.ICodeEditor, sideBySide?: boolean): Promise<monaco.editor.CommonCodeEditor | undefined>;
300
- registerDecorationType(key: string, options: IDecorationRenderOptions, parentTypeKey?: string, editor?: monaco.editor.ICodeEditor): void;
301
- removeDecorationType(key: string): void;
302
- resolveDecorationOptions(typeKey: string, writable: boolean): IModelDecorationOptions;
303
- }
304
-
305
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/base/common/lifecycle.ts#L253
306
- export interface IReference<T> extends monaco.IDisposable {
307
- readonly object: T;
308
- }
309
-
310
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/editor/common/services/resolverService.ts#L14
311
- export interface ITextModelService {
312
- /**
313
- * Provided a resource URI, it will return a model reference
314
- * which should be disposed once not needed anymore.
315
- */
316
- createModelReference(resource: monaco.Uri): Promise<IReference<ITextEditorModel>>;
317
-
318
- /**
319
- * Registers a specific `scheme` content provider.
320
- */
321
- registerTextModelContentProvider(scheme: string, provider: ITextModelContentProvider): monaco.IDisposable;
322
- }
323
-
324
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/editor/common/services/resolverService.ts#L34
325
- export interface ITextModelContentProvider {
326
- /**
327
- * Given a resource, return the content of the resource as IModel.
328
- */
329
- provideTextContent(resource: monaco.Uri): Promise<monaco.editor.IModel | null> | null;
330
- }
331
-
332
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/editor/common/services/resolverService.ts#L42 &&
333
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/platform/editor/common/editor.ts#L9
334
- export interface ITextEditorModel {
335
- readonly onDispose: monaco.IEvent<void>;
336
- /**
337
- * Loads the model.
338
- */
339
- load(): Promise<ITextEditorModel>;
340
-
341
- /**
342
- * Dispose associated resources
343
- */
344
- dispose(): void;
345
- /**
346
- * Provides access to the underlying IModel.
347
- */
348
- textEditorModel: monaco.editor.IModel;
349
- }
350
-
351
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/base/browser/contextmenu.ts#L18
352
- export interface IContextMenuDelegate {
353
- /**
354
- * Returns with an HTML element or the client coordinates as the anchor of the context menu to open.
355
- */
356
- getAnchor(): HTMLElement | { x: number; y: number; width?: number; height?: number };
357
-
358
- /**
359
- * Returns the actions for the menu
360
- */
361
- getActions(): ReadonlyArray<IAction>;
362
-
363
- /**
364
- * Needs to be called with the context menu closes again.
365
- */
366
- onHide(wasCancelled: boolean): void
367
- }
368
-
369
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/base/common/actions.ts#L26
370
- export interface IAction extends IDisposable {
371
- readonly id: string;
372
- label: string;
373
- tooltip: string;
374
- class: string | undefined;
375
- enabled: boolean;
376
- checked: boolean;
377
- run(event?: any): Promise<any>;
378
- }
379
-
380
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/platform/contextview/browser/contextView.ts#L39
381
- export interface IContextMenuService {
382
- /**
383
- * Shows the native Monaco context menu in the editor.
384
- */
385
- showContextMenu(delegate: IContextMenuDelegate): void;
386
- }
387
-
388
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/editor/common/editorCommon.ts#L680
389
- export interface IDecorationOptions {
390
- range: IRange;
391
- hoverMessage?: IMarkdownString | IMarkdownString[];
392
- renderOptions?: IDecorationInstanceRenderOptions;
393
- }
394
-
395
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/editor/common/editorCommon.ts#L664
396
- export interface IThemeDecorationInstanceRenderOptions {
397
- before?: IContentDecorationRenderOptions;
398
- after?: IContentDecorationRenderOptions;
399
- }
400
-
401
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/editor/common/editorCommon.ts#L672
402
- export interface IDecorationInstanceRenderOptions extends IThemeDecorationInstanceRenderOptions {
403
- light?: IThemeDecorationInstanceRenderOptions;
404
- dark?: IThemeDecorationInstanceRenderOptions;
405
- }
406
-
407
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/editor/common/editorCommon.ts#L628
408
- export interface IContentDecorationRenderOptions {
409
- contentText?: string;
410
- contentIconPath?: UriComponents;
411
-
412
- border?: string;
413
- borderColor?: string | ThemeColor;
414
- fontStyle?: string;
415
- fontWeight?: string;
416
- textDecoration?: string;
417
- color?: string | ThemeColor;
418
- opacity?: string; // does not exist in vs code
419
- backgroundColor?: string | ThemeColor;
420
-
421
- margin?: string;
422
- width?: string;
423
- height?: string;
424
- }
425
-
426
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/editor/common/editorCommon.ts#L652
427
- export interface IDecorationRenderOptions extends IThemeDecorationRenderOptions {
428
- isWholeLine?: boolean;
429
- rangeBehavior?: TrackedRangeStickiness;
430
- overviewRulerLane?: OverviewRulerLane;
431
-
432
- light?: IThemeDecorationRenderOptions;
433
- dark?: IThemeDecorationRenderOptions;
434
- }
435
-
436
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/editor/common/editorCommon.ts#L592
437
- export interface IThemeDecorationRenderOptions {
438
- backgroundColor?: string | ThemeColor;
439
-
440
- outline?: string;
441
- outlineColor?: string | ThemeColor;
442
- outlineStyle?: string;
443
- outlineWidth?: string;
444
-
445
- border?: string;
446
- borderColor?: string | ThemeColor;
447
- borderRadius?: string;
448
- borderSpacing?: string;
449
- borderStyle?: string;
450
- borderWidth?: string;
451
-
452
- fontStyle?: string;
453
- fontWeight?: string;
454
- fontSize?: string;
455
- textDecoration?: string;
456
- cursor?: string;
457
- color?: string | ThemeColor;
458
- opacity?: string;
459
- letterSpacing?: string;
460
-
461
- gutterIconPath?: UriComponents;
462
- gutterIconSize?: string;
463
-
464
- overviewRulerColor?: string | ThemeColor;
465
-
466
- before?: IContentDecorationRenderOptions;
467
- after?: IContentDecorationRenderOptions;
468
- }
469
-
470
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/editor/common/model.ts#L522
471
- export interface ITextSnapshot {
472
- read(): string | null;
473
- }
474
-
475
- export interface ITextModel {
476
- /**
477
- * Get the tokens for the line `lineNumber`.
478
- * The tokens might be inaccurate. Use `forceTokenization` to ensure accurate tokens.
479
- * @internal
480
- */
481
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/editor/common/model.ts#L890
482
- getLineTokens(lineNumber: number): LineTokens;
483
-
484
- /**
485
- * Force tokenization information for `lineNumber` to be accurate.
486
- * @internal
487
- */
488
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/editor/common/model.ts#L869
489
- forceTokenization(lineNumber: number): void;
490
-
491
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/editor/common/model.ts#L617
492
- createSnapshot(): ITextSnapshot | null;
493
-
494
- /**
495
- * Get the language associated with this model.
496
- * @internal
497
- */
498
- // https://github.com/theia-ide/vscode/blob/standalone/0.19.x/src/vs/editor/common/model.ts#L833-L837
499
- getLanguageIdentifier(): monaco.services.LanguageIdentifier;
500
-
501
- }
502
-
503
- }
504
-
505
- declare module monaco.commands {
506
-
507
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/platform/commands/common/commands.ts#L60
508
- export const CommandsRegistry: {
509
- getCommands(): Map<string, { id: string, handler: (...args: any) => any }>;
510
- };
511
-
512
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/platform/commands/common/commands.ts#L16
513
- export interface ICommandEvent {
514
- commandId: string;
515
- args: any[];
516
- }
517
-
518
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/platform/commands/common/commands.ts#L21
519
- export interface ICommandService {
520
- onWillExecuteCommand: monaco.Event<ICommandEvent>;
521
- onDidExecuteCommand: monaco.Event<ICommandEvent>;
522
- executeCommand<T = any>(commandId: string, ...args: any[]): Promise<T | undefined>;
523
- }
524
-
525
- }
526
-
527
- declare module monaco.actions {
528
-
529
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/platform/actions/common/actions.ts#L21
530
- export interface ILocalizedString {
531
- value: string;
532
- original: string;
533
- }
534
-
535
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/platform/actions/common/actions.ts#L41
536
- export interface ICommandAction {
537
- id: string;
538
- title: string | ILocalizedString;
539
- category?: string | ILocalizedString;
540
- icon?: { dark?: monaco.Uri; light?: monaco.Uri; } | monaco.theme.ThemeIcon;
541
- precondition?: monaco.contextkey.ContextKeyExpression;
542
- toggled?: monaco.contextkey.ContextKeyExpression;
543
- }
544
-
545
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/platform/actions/common/actions.ts#L53
546
- export interface IMenuItem {
547
- command: ICommandAction;
548
- when?: monaco.contextkey.ContextKeyExpression;
549
- group?: 'navigation' | string;
550
- order?: number;
551
- alt?: ICommandAction;
552
- }
553
-
554
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/platform/actions/common/actions.ts#L61
555
- export interface ISubmenuItem {
556
- title: string | ILocalizedString;
557
- submenu: number; // enum MenuId
558
- when?: monaco.contextkey.ContextKeyExpression;
559
- group?: 'navigation' | string;
560
- order?: number;
561
- }
562
-
563
- export class MenuId {
564
-
565
- private static _idPool = 0;
566
-
567
- static readonly CommandPalette = new MenuId('CommandPalette');
568
- static readonly DebugBreakpointsContext = new MenuId('DebugBreakpointsContext');
569
- static readonly DebugCallStackContext = new MenuId('DebugCallStackContext');
570
- static readonly DebugConsoleContext = new MenuId('DebugConsoleContext');
571
- static readonly DebugVariablesContext = new MenuId('DebugVariablesContext');
572
- static readonly DebugWatchContext = new MenuId('DebugWatchContext');
573
- static readonly DebugToolBar = new MenuId('DebugToolBar');
574
- static readonly EditorContext = new MenuId('EditorContext');
575
- static readonly EditorContextPeek = new MenuId('EditorContextPeek');
576
- static readonly EditorTitle = new MenuId('EditorTitle');
577
- static readonly EditorTitleRun = new MenuId('EditorTitleRun');
578
- static readonly EditorTitleContext = new MenuId('EditorTitleContext');
579
- static readonly EmptyEditorGroupContext = new MenuId('EmptyEditorGroupContext');
580
- static readonly ExplorerContext = new MenuId('ExplorerContext');
581
- static readonly ExtensionContext = new MenuId('ExtensionContext');
582
- static readonly GlobalActivity = new MenuId('GlobalActivity');
583
- static readonly MenubarAppearanceMenu = new MenuId('MenubarAppearanceMenu');
584
- static readonly MenubarDebugMenu = new MenuId('MenubarDebugMenu');
585
- static readonly MenubarEditMenu = new MenuId('MenubarEditMenu');
586
- static readonly MenubarFileMenu = new MenuId('MenubarFileMenu');
587
- static readonly MenubarGoMenu = new MenuId('MenubarGoMenu');
588
- static readonly MenubarHelpMenu = new MenuId('MenubarHelpMenu');
589
- static readonly MenubarLayoutMenu = new MenuId('MenubarLayoutMenu');
590
- static readonly MenubarNewBreakpointMenu = new MenuId('MenubarNewBreakpointMenu');
591
- static readonly MenubarPreferencesMenu = new MenuId('MenubarPreferencesMenu');
592
- static readonly MenubarRecentMenu = new MenuId('MenubarRecentMenu');
593
- static readonly MenubarSelectionMenu = new MenuId('MenubarSelectionMenu');
594
- static readonly MenubarSwitchEditorMenu = new MenuId('MenubarSwitchEditorMenu');
595
- static readonly MenubarSwitchGroupMenu = new MenuId('MenubarSwitchGroupMenu');
596
- static readonly MenubarTerminalMenu = new MenuId('MenubarTerminalMenu');
597
- static readonly MenubarViewMenu = new MenuId('MenubarViewMenu');
598
- static readonly MenubarHomeMenu = new MenuId('MenubarHomeMenu');
599
- static readonly OpenEditorsContext = new MenuId('OpenEditorsContext');
600
- static readonly ProblemsPanelContext = new MenuId('ProblemsPanelContext');
601
- static readonly SCMChangeContext = new MenuId('SCMChangeContext');
602
- static readonly SCMResourceContext = new MenuId('SCMResourceContext');
603
- static readonly SCMResourceFolderContext = new MenuId('SCMResourceFolderContext');
604
- static readonly SCMResourceGroupContext = new MenuId('SCMResourceGroupContext');
605
- static readonly SCMSourceControl = new MenuId('SCMSourceControl');
606
- static readonly SCMTitle = new MenuId('SCMTitle');
607
- static readonly SearchContext = new MenuId('SearchContext');
608
- static readonly StatusBarWindowIndicatorMenu = new MenuId('StatusBarWindowIndicatorMenu');
609
- static readonly TestItem = new MenuId('TestItem');
610
- static readonly TouchBarContext = new MenuId('TouchBarContext');
611
- static readonly TitleBarContext = new MenuId('TitleBarContext');
612
- static readonly TunnelContext = new MenuId('TunnelContext');
613
- static readonly TunnelPortInline = new MenuId('TunnelInline');
614
- static readonly TunnelTitle = new MenuId('TunnelTitle');
615
- static readonly TunnelLocalAddressInline = new MenuId('TunnelLocalAddressInline');
616
- static readonly TunnelOriginInline = new MenuId('TunnelOriginInline');
617
- static readonly ViewItemContext = new MenuId('ViewItemContext');
618
- static readonly ViewContainerTitle = new MenuId('ViewContainerTitle');
619
- static readonly ViewContainerTitleContext = new MenuId('ViewContainerTitleContext');
620
- static readonly ViewTitle = new MenuId('ViewTitle');
621
- static readonly ViewTitleContext = new MenuId('ViewTitleContext');
622
- static readonly CommentThreadTitle = new MenuId('CommentThreadTitle');
623
- static readonly CommentThreadActions = new MenuId('CommentThreadActions');
624
- static readonly CommentTitle = new MenuId('CommentTitle');
625
- static readonly CommentActions = new MenuId('CommentActions');
626
- static readonly NotebookCellTitle = new MenuId('NotebookCellTitle');
627
- static readonly NotebookCellInsert = new MenuId('NotebookCellInsert');
628
- static readonly NotebookCellBetween = new MenuId('NotebookCellBetween');
629
- static readonly NotebookCellListTop = new MenuId('NotebookCellTop');
630
- static readonly NotebookDiffCellInputTitle = new MenuId('NotebookDiffCellInputTitle');
631
- static readonly NotebookDiffCellMetadataTitle = new MenuId('NotebookDiffCellMetadataTitle');
632
- static readonly NotebookDiffCellOutputsTitle = new MenuId('NotebookDiffCellOutputsTitle');
633
- static readonly BulkEditTitle = new MenuId('BulkEditTitle');
634
- static readonly BulkEditContext = new MenuId('BulkEditContext');
635
- static readonly TimelineItemContext = new MenuId('TimelineItemContext');
636
- static readonly TimelineTitle = new MenuId('TimelineTitle');
637
- static readonly TimelineTitleContext = new MenuId('TimelineTitleContext');
638
- static readonly AccountsContext = new MenuId('AccountsContext');
639
- static readonly PanelTitle = new MenuId('PanelTitle');
640
- static readonly TerminalContext = new MenuId('TerminalContext');
641
-
642
- readonly id: number;
643
- readonly _debugName: string;
644
-
645
- constructor(debugName: string) {
646
- this.id = MenuId._idPool++;
647
- this._debugName = debugName;
648
- }
649
- }
650
-
651
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/platform/actions/common/actions.ts#L191
652
- export interface IMenuRegistry {
653
- /**
654
- * Retrieves all the registered menu items for the given menu.
655
- * @param menuId - see https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/platform/actions/common/actions.ts#L89
656
- */
657
- getMenuItems(menuId: MenuId): Array<IMenuItem | ISubmenuItem>;
658
- }
659
-
660
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/platform/actions/common/actions.ts#L70
661
- export function isIMenuItem(item: IMenuItem | ISubmenuItem): item is IMenuItem;
662
-
663
- /**
664
- * The shared menu registry singleton.
665
- */
666
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/platform/actions/common/actions.ts#L202
667
- export const MenuRegistry: IMenuRegistry;
668
-
669
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/platform/actions/common/actions.ts#L356
670
- export class MenuItemAction { }
671
- }
672
-
673
- declare module monaco.platform {
674
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/base/common/platform.ts#L245
675
- export const enum OperatingSystem {
676
- Windows = 1,
677
- Macintosh = 2,
678
- Linux = 3
679
- }
680
- export const OS: OperatingSystem;
681
-
682
- export class Registry {
683
- static add(id: string, data: any): void;
684
-
685
- /**
686
- * Returns true iff there is an extension with the provided id.
687
- * @param id an extension identifier
688
- */
689
- static knows(id: string): boolean;
690
-
691
- /**
692
- * Returns the extension functions and properties defined by the specified key or null.
693
- * @param id an extension identifier
694
- */
695
- static as<T>(id: string): T;
696
- }
697
- }
698
-
699
- declare module monaco.keybindings {
700
-
701
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/platform/keybinding/common/keybindingResolver.ts#L19
702
- export class KeybindingResolver {
703
- static contextMatchesRules(context: monaco.contextKeyService.IContext, rules: monaco.contextkey.ContextKeyExpression | null | undefined): boolean;
704
- }
705
-
706
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/base/common/keyCodes.ts#L443
707
- export class SimpleKeybinding {
708
- public readonly ctrlKey: boolean;
709
- public readonly shiftKey: boolean;
710
- public readonly altKey: boolean;
711
- public readonly metaKey: boolean;
712
- public readonly keyCode: KeyCode;
713
-
714
- constructor(ctrlKey: boolean, shiftKey: boolean, altKey: boolean, metaKey: boolean, keyCode: KeyCode);
715
- toChord(): ChordKeybinding;
716
- }
717
-
718
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/base/common/keyCodes.ts#L503
719
- export class ChordKeybinding {
720
- readonly parts: SimpleKeybinding[];
721
- }
722
-
723
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/base/common/keyCodes.ts#L540
724
- export type Keybinding = ChordKeybinding;
725
-
726
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/platform/keybinding/common/keybindingsRegistry.ts#L12
727
- export interface IKeybindingItem {
728
- keybinding: Keybinding;
729
- command: string;
730
- when?: monaco.contextkey.ContextKeyExpression;
731
- }
732
-
733
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/platform/keybinding/common/keybindingsRegistry.ts#L73
734
- export interface IKeybindingsRegistry {
735
- /**
736
- * Returns with all the default, static keybindings.
737
- */
738
- getDefaultKeybindings(): IKeybindingItem[];
739
- }
740
-
741
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/platform/keybinding/common/keybindingsRegistry.ts#L243
742
- export const KeybindingsRegistry: IKeybindingsRegistry;
743
-
744
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/base/common/keyCodes.ts#L542
745
- export class ResolvedKeybindingPart {
746
- readonly ctrlKey: boolean;
747
- readonly shiftKey: boolean;
748
- readonly altKey: boolean;
749
- readonly metaKey: boolean;
750
-
751
- readonly keyLabel: string | null;
752
- readonly keyAriaLabel: string | null;
753
-
754
- constructor(ctrlKey: boolean, shiftKey: boolean, altKey: boolean, metaKey: boolean, kbLabel: string | null, kbAriaLabel: string | null);
755
- }
756
-
757
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/base/common/keyCodes.ts#L564
758
- export abstract class ResolvedKeybinding {
759
- public abstract getLabel(): string | null;
760
- public abstract getAriaLabel(): string | null;
761
- public abstract getElectronAccelerator(): string | null;
762
- public abstract getUserSettingsLabel(): string | null;
763
- public abstract isWYSIWYG(): boolean;
764
- public abstract isChord(): boolean;
765
- public abstract getParts(): ResolvedKeybindingPart[];
766
- public abstract getDispatchParts(): (string | null)[];
767
- public abstract getSingleModifierDispatchParts(): (string | null)[];
768
- }
769
-
770
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/platform/keybinding/common/usLayoutResolvedKeybinding.ts#L13
771
- export class USLayoutResolvedKeybinding {
772
- public static getDispatchStr(keybinding: SimpleKeybinding): string | null;
773
- }
774
-
775
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/base/common/keybindingLabels.ts#L17
776
- export interface Modifiers {
777
- readonly ctrlKey: boolean;
778
- readonly shiftKey: boolean;
779
- readonly altKey: boolean;
780
- readonly metaKey: boolean;
781
- }
782
-
783
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/base/common/keybindingLabels.ts#L24
784
- export interface KeyLabelProvider<T extends Modifiers> {
785
- (keybinding: T): string | null;
786
- }
787
-
788
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/base/common/keybindingLabels.ts#L28
789
- export interface ModifierLabelProvider {
790
- toLabel<T extends Modifiers>(OS: monaco.platform.OperatingSystem, parts: T[], keyLabelProvider: KeyLabelProvider<T>): string | null;
791
- }
792
-
793
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/base/common/keybindingLabels.ts#L61
794
- export const UILabelProvider: ModifierLabelProvider;
795
-
796
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/base/common/keybindingLabels.ts#L88
797
- export const AriaLabelProvider: ModifierLabelProvider;
798
-
799
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/base/common/keybindingLabels.ts#L116
800
- export const ElectronAcceleratorLabelProvider: ModifierLabelProvider;
801
-
802
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/base/common/keybindingLabels.ts#L136
803
- export const UserSettingsLabelProvider: ModifierLabelProvider;
804
-
805
- }
806
-
807
- declare module monaco.services {
808
-
809
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/editor/standalone/browser/standaloneLanguages.ts#L107
810
- export class TokenizationSupport2Adapter implements monaco.modes.ITokenizationSupport {
811
- constructor(standaloneThemeService: IStandaloneThemeService, languageIdentifier: LanguageIdentifier, actual: monaco.languages.TokensProvider)
812
- tokenize(line: string, state: monaco.languages.IState, offsetDelta: number): any;
813
- }
814
-
815
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/editor/common/services/resolverService.ts#L12
816
- export const ITextModelService: any;
817
-
818
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/platform/opener/common/opener.ts#L15
819
- export interface OpenInternalOptions {
820
- readonly openToSide?: boolean;
821
- }
822
-
823
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/platform/opener/common/opener.ts#L35
824
- export interface OpenExternalOptions {
825
- readonly openExternal?: boolean
826
- }
827
-
828
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/platform/opener/common/opener.ts#L49
829
- export interface IOpener {
830
- open(resource: monaco.Uri | string, options?: OpenInternalOptions | OpenExternalOptions): Promise<boolean>;
831
- }
832
-
833
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/editor/browser/services/openerService.ts#L94
834
- export class OpenerService {
835
- constructor(editorService: monaco.editor.ICodeEditorService, commandService: monaco.commands.ICommandService);
836
- registerOpener(opener: IOpener): monaco.IDisposable;
837
- open(resource: monaco.Uri | string, options?: OpenInternalOptions & OpenExternalOptions): Promise<boolean>;
838
- }
839
-
840
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/editor/browser/services/codeEditorService.ts#L14
841
- export const ICodeEditorService: any;
842
-
843
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/platform/configuration/common/configuration.ts#L16
844
- export const IConfigurationService: any;
845
-
846
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/platform/configuration/common/configurationModels.ts#L377
847
- export interface Configuration {
848
- getValue(section: string | undefined, overrides: any, workspace: any | undefined): any;
849
- toData(): any;
850
- }
851
-
852
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/platform/configuration/common/configuration.ts#L30-L38
853
- export const enum ConfigurationTarget {
854
- USER = 1,
855
- USER_LOCAL,
856
- USER_REMOTE,
857
- WORKSPACE,
858
- WORKSPACE_FOLDER,
859
- DEFAULT,
860
- MEMORY
861
- }
862
-
863
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/platform/configuration/common/configuration.ts#L51
864
- export interface IConfigurationChange {
865
- keys: string[];
866
- overrides: [string, string[]][];
867
- }
868
-
869
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/platform/configuration/common/configuration.ts#L56
870
- export class IConfigurationChangeEvent {
871
-
872
- readonly source: ConfigurationTarget;
873
- readonly affectedKeys: string[];
874
- readonly change: IConfigurationChange;
875
-
876
- affectsConfiguration(configuration: string, overrides?: IConfigurationOverrides): boolean;
877
- }
878
-
879
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/platform/configuration/common/configuration.ts#L25
880
- export interface IConfigurationOverrides {
881
- overrideIdentifier?: string | null;
882
- resource?: monaco.Uri | null;
883
- }
884
-
885
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/editor/standalone/browser/simpleServices.ts#L445
886
- export interface IConfigurationService {
887
- _onDidChangeConfiguration: monaco.Emitter<IConfigurationChangeEvent>;
888
- _configuration: Configuration;
889
- }
890
-
891
- // https://github.com/microsoft/vscode/blob/standalone/0.23.x/src/vs/editor/common/services/textResourceConfigurationService.ts#L71
892
- export interface ITextResourcePropertiesService {
893
- getEOL(resource: monaco.Uri | undefined, language?: string): string;
894
- }
895
-
896
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/editor/browser/services/codeEditorServiceImpl.ts#L84
897
- export class CodeEditorServiceImpl implements monaco.editor.ICodeEditorService {
898
- constructor(styleSheet: any, themeService: IStandaloneThemeService);
899
-
900
- getActiveCodeEditor(): monaco.editor.ICodeEditor | undefined;
901
- openCodeEditor(input: monaco.editor.IResourceEditorInput, source?: monaco.editor.ICodeEditor,
902
- sideBySide?: boolean): Promise<monaco.editor.CommonCodeEditor | undefined>;
903
- registerDecorationType: monaco.editor.ICodeEditorService['registerDecorationType'];
904
- removeDecorationType: monaco.editor.ICodeEditorService['removeDecorationType'];
905
- resolveDecorationOptions: monaco.editor.ICodeEditorService['resolveDecorationOptions'];
906
- /**
907
- * It respects inline and embedded editors in comparison to `getActiveCodeEditor`
908
- * which only respect standalone and diff modified editors.
909
- */
910
- getFocusedCodeEditor(): monaco.editor.ICodeEditor | undefined;
911
- }
912
-
913
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/editor/standalone/browser/simpleServices.ts#L264
914
- export class StandaloneCommandService implements monaco.commands.ICommandService {
915
- constructor(instantiationService: monaco.instantiation.IInstantiationService);
916
- private readonly _onWillExecuteCommand: monaco.Emitter<monaco.commands.ICommandEvent>;
917
- private readonly _onDidExecuteCommand: monaco.Emitter<monaco.commands.ICommandEvent>;
918
-
919
- executeCommand<T>(commandId: string, ...args: any[]): Promise<T>;
920
- executeCommand(commandId: string, ...args: any[]): Promise<any>;
921
- }
922
-
923
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/editor/standalone/browser/standaloneServices.ts#L66
924
- export class LazyStaticService<T> {
925
- get(overrides?: monaco.editor.IEditorOverrideServices): T;
926
- }
927
-
928
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/platform/theme/common/themeService.ts#L86
929
- export interface ITokenStyle {
930
- readonly foreground?: number;
931
- readonly bold?: boolean;
932
- readonly underline?: boolean;
933
- readonly italic?: boolean;
934
- }
935
-
936
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/editor/standalone/common/standaloneThemeService.ts#L29
937
- export interface IStandaloneThemeService extends monaco.theme.IThemeService {
938
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/editor/standalone/browser/standaloneThemeServiceImpl.ts#L200
939
- readonly _knownThemes: Map<string, IStandaloneTheme>;
940
- setTheme(themeName: string): void;
941
- setAutoDetectHighContrast(autoDetectHighContrast: boolean): void;
942
- defineTheme(themeName: string, themeData: monaco.editor.IStandaloneThemeData): void;
943
- getColorTheme(): IStandaloneTheme;
944
- setColorMapOverride(colorMapOverride: monaco.color.Color[] | null): void;
945
- }
946
-
947
- export class StandaloneThemeServiceImpl implements IStandaloneThemeService {
948
- readonly _knownThemes: Map<string, IStandaloneTheme>;
949
- setTheme(themeName: string): void { }
950
- setAutoDetectHighContrast(autoDetectHighContrast: boolean): void { }
951
- defineTheme(themeName: string, themeData: monaco.editor.IStandaloneThemeData): void { }
952
- getColorTheme(): IStandaloneTheme { }
953
- setColorMapOverride(colorMapOverride: monaco.color.Color[] | null): void { }
954
- }
955
-
956
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/editor/standalone/common/standaloneThemeService.ts#L24
957
- export interface IStandaloneTheme extends monaco.theme.IColorTheme {
958
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/editor/standalone/browser/standaloneThemeServiceImpl.ts#L33
959
- themeData: monaco.editor.IStandaloneThemeData
960
-
961
- tokenTheme: TokenTheme;
962
-
963
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/platform/theme/common/themeService.ts#L105
964
- getColor(color: string, useDefault?: boolean): monaco.color.Color | undefined;
965
-
966
- getTokenStyleMetadata(type: string, modifiers: string[], modelLanguage: string): ITokenStyle | undefined;
967
- }
968
-
969
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/editor/common/modes/supports/tokenization.ts#L188
970
- export interface TokenTheme {
971
- match(languageId: LanguageId, scope: string): number;
972
- _match(token: string): any;
973
- getColorMap(): monaco.color.Color[];
974
- }
975
-
976
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/editor/common/modes.ts#L27
977
- export const enum LanguageId {
978
- Null = 0,
979
- PlainText = 1
980
- }
981
-
982
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/editor/common/modes.ts#L35
983
- export class LanguageIdentifier {
984
- public readonly id: LanguageId;
985
- readonly language: string;
986
- }
987
-
988
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/editor/common/modes.ts#L58
989
- export interface IMode {
990
- getId(): string;
991
- getLanguageIdentifier(): LanguageIdentifier;
992
- }
993
-
994
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/editor/common/services/modeService.ts#L30
995
- export interface IModeService {
996
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/editor/common/services/modeServiceImpl.ts#L46
997
- private readonly _instantiatedModes: { [modeId: string]: IMode; };
998
- private readonly _onLanguagesMaybeChanged: Emitter<void>;
999
- readonly onDidCreateMode: monaco.IEvent<IMode>;
1000
- createByFilepathOrFirstLine(resource: monaco.Uri | null, firstLine?: string): ILanguageSelection;
1001
- getLanguageIdentifier(modeId: string | LanguageId): LanguageIdentifier | null;
1002
- }
1003
-
1004
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/editor/common/services/modeService.ts#L25
1005
- export interface ILanguageSelection {
1006
- readonly languageIdentifier: LanguageIdentifier;
1007
- }
1008
-
1009
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/platform/instantiation/common/serviceCollection.ts#L9
1010
- export interface ServiceCollection {
1011
- set<T>(id: any, instanceOrDescriptor: T): T;
1012
- }
1013
-
1014
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/platform/markers/common/markers.ts#L12
1015
- export interface IMarkerService {
1016
- read(filter?: { owner?: string; resource?: monaco.Uri; severities?: number, take?: number; }): editor.IMarker[];
1017
- }
1018
-
1019
- // https://github.com/microsoft/vscode/blob/e683ace9e5acadba0e8bde72d793cb2cb83e58a7/src/vs/editor/common/services/modelService.ts#L18
1020
- export interface IModelService {
1021
- createModel(value: string | monaco.editor.ITextBufferFactory, languageSelection: ILanguageSelection | null, resource?: monaco.URI, isForSimpleWidget?: boolean): monaco.editor.ITextModel;
1022
- updateModel(model: monaco.editor.ITextModel, value: string | monaco.editor.ITextBufferFactory): void;
1023
- }
1024
-
1025
- // https://github.com/microsoft/vscode/blob/standalone/0.23.x/src/vs/editor/common/services/editorWorkerService.ts#L21
1026
- export interface IEditorWorkerService {
1027
- computeMoreMinimalEdits(resource: monaco.Uri, edits: monaco.languages.TextEdit[] | null | undefined): Promise<monaco.languages.TextEdit[] | undefined>;
1028
- }
1029
-
1030
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/editor/standalone/browser/standaloneServices.ts#L62
1031
- export module StaticServices {
1032
- export function init(overrides: monaco.editor.IEditorOverrideServices): [ServiceCollection, monaco.instantiation.IInstantiationService];
1033
- export const standaloneThemeService: LazyStaticService<IStandaloneThemeService>;
1034
- export const modeService: LazyStaticService<IModeService>;
1035
- export const codeEditorService: LazyStaticService<monaco.editor.ICodeEditorService>;
1036
- export const configurationService: LazyStaticService<IConfigurationService>;
1037
- export const resourcePropertiesService: LazyStaticService<ITextResourcePropertiesService>;
1038
- export const instantiationService: LazyStaticService<monaco.instantiation.IInstantiationService>;
1039
- export const markerService: LazyStaticService<IMarkerService>;
1040
- export const modelService: LazyStaticService<IModelService>;
1041
- export const editorWorkerService: LazyStaticService<IEditorWorkerService>;
1042
- }
1043
- }
1044
-
1045
- declare module monaco.theme {
1046
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/platform/theme/common/themeService.ts#L93
1047
-
1048
- export type ColorIdentifier = string;
1049
-
1050
- export interface IColorTheme {
1051
- readonly type: ColorScheme;
1052
-
1053
- readonly label: string;
1054
-
1055
- /**
1056
- * Resolves the color of the given color identifier. If the theme does not
1057
- * specify the color, the default color is returned unless <code>useDefault</code> is set to false.
1058
- * @param color the id of the color
1059
- * @param useDefault specifies if the default color should be used. If not set, the default is used.
1060
- */
1061
- getColor(color: ColorIdentifier, useDefault?: boolean): monaco.color.Color | undefined;
1062
-
1063
- /**
1064
- * Returns whether the theme defines a value for the color. If not, that means the
1065
- * default color will be used.
1066
- */
1067
- defines(color: ColorIdentifier): boolean;
1068
-
1069
- /**
1070
- * Returns the token style for a given classification. The result uses the <code>MetadataConsts</code> format
1071
- */
1072
- getTokenStyleMetadata(type: string, modifiers: string[], modelLanguage: string): monaco.services.ITokenStyle | undefined;
1073
-
1074
- /**
1075
- * List of all colors used with tokens. <code>getTokenStyleMetadata</code> references the colors by index into this list.
1076
- */
1077
- readonly tokenColorMap: string[];
1078
-
1079
- /**
1080
- * Defines whether semantic highlighting should be enabled for the theme.
1081
- */
1082
- readonly semanticHighlighting: boolean;
1083
- }
1084
-
1085
- export interface IFileIconTheme {
1086
- readonly hasFileIcons: boolean;
1087
- readonly hasFolderIcons: boolean;
1088
- readonly hidesExplorerArrows: boolean;
1089
- }
1090
-
1091
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/platform/theme/common/themeService.ts#L143
1092
- export interface IThemeService {
1093
- getColorTheme(): IColorTheme;
1094
- getFileIconTheme(): IFileIconTheme;
1095
- readonly onDidColorThemeChange: monaco.IEvent<IColorTheme>;
1096
- readonly onDidFileIconThemeChange: monaco.IEvent<IFileIconTheme>;
1097
- }
1098
-
1099
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/base/common/styler.ts#L10
1100
- export interface IThemable { }
1101
-
1102
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/platform/theme/common/styler.ts#L171
1103
- export function attachQuickOpenStyler(widget: IThemable, themeService: IThemeService): monaco.IDisposable;
1104
-
1105
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/platform/theme/common/themeService.ts#L38
1106
- export interface ThemeIcon {
1107
- readonly id: string;
1108
- }
1109
- export namespace ThemeIcon {
1110
- export function fromString(value: string): ThemeIcon | undefined;
1111
- export function asClassName(icon: ThemeIcon): string | undefined;
1112
- }
1113
- }
1114
-
1115
- declare module monaco.color {
1116
-
1117
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/base/common/color.ts#L13
1118
- export class RGBA {
1119
- readonly r: number;
1120
- readonly g: number;
1121
- readonly b: number;
1122
- readonly a: number;
1123
-
1124
- constructor(r: number, g: number, b: number, a?: number);
1125
- }
1126
-
1127
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/base/common/color.ts#L48
1128
- export class HSLA {
1129
- readonly h: number;
1130
- readonly s: number;
1131
- readonly l: number;
1132
- readonly a: number;
1133
-
1134
- constructor(h: number, s: number, l: number, a: number);
1135
- }
1136
-
1137
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/base/common/color.ts#L256
1138
- export class Color {
1139
- readonly rgba: RGBA;
1140
-
1141
- constructor(arg: RGBA | HSLA);
1142
- }
1143
-
1144
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/platform/theme/common/colorRegistry.ts#L19
1145
- export interface ColorContribution {
1146
- readonly id: string;
1147
- }
1148
-
1149
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/platform/theme/common/colorRegistry.ts#L28
1150
- export type ColorFunction = (theme: monaco.theme.IColorTheme) => Color | undefined;
1151
-
1152
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/platform/theme/common/colorRegistry.ts#L41
1153
- export type ColorValue = string | Color | ColorFunction;
1154
-
1155
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/platform/theme/common/colorRegistry.ts#L32
1156
- export interface ColorDefaults {
1157
- light?: ColorValue;
1158
- dark?: ColorValue;
1159
- hc?: ColorValue;
1160
- }
1161
-
1162
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/platform/theme/common/colorRegistry.ts#L48
1163
- export interface IColorRegistry {
1164
- getColors(): ColorContribution[];
1165
- registerColor(id: string, defaults: ColorDefaults | undefined, description: string): string;
1166
- deregisterColor(id: string): void;
1167
- }
1168
-
1169
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/platform/theme/common/colorRegistry.ts#L170
1170
- export function getColorRegistry(): IColorRegistry;
1171
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/platform/theme/common/colorRegistry.ts#L475
1172
- export function darken(colorValue: ColorValue, factor: number): ColorFunction;
1173
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/platform/theme/common/colorRegistry.ts#L485
1174
- export function lighten(colorValue: ColorValue, factor: number): ColorFunction;
1175
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/platform/theme/common/colorRegistry.ts#L495
1176
- export function transparent(colorValue: ColorValue, factor: number): ColorFunction;
1177
- }
1178
-
1179
- declare module monaco.referenceSearch {
1180
-
1181
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/editor/common/modes.ts#L943
1182
- export interface Location {
1183
- uri: Uri,
1184
- range: IRange
1185
- }
1186
-
1187
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/editor/contrib/gotoSymbol/referencesModel.ts#L22
1188
- export interface OneReference { }
1189
-
1190
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/editor/contrib/gotoSymbol/referencesModel.ts#L142
1191
- export interface ReferencesModel implements IDisposable {
1192
- readonly references: OneReference[]
1193
- }
1194
-
1195
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/editor/contrib/gotoSymbol/peek/referencesWidget.ts#L193
1196
- export interface ReferenceWidget {
1197
- show(range: IRange): void;
1198
- hide(): void;
1199
- focusOnReferenceTree(): void;
1200
- focusOnPreviewEditor(): void;
1201
- isPreviewEditorFocused(): boolean;
1202
- _tree: ReferenceTree;
1203
- _preview: ICodeEditor;
1204
- }
1205
-
1206
- // it's used as return value for referenceWidget._tree
1207
- // see https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/editor/contrib/gotoSymbol/peek/referencesWidget.ts#L204
1208
- export interface ReferenceTree {
1209
- getFocus(): ReferenceTreeElement[]
1210
- }
1211
- export interface ReferenceTreeElement { }
1212
-
1213
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/editor/contrib/gotoSymbol/peek/referencesController.ts#L32
1214
- export interface ReferencesController extends IDisposable {
1215
- static readonly ID: string;
1216
- _widget?: ReferenceWidget;
1217
- _model?: ReferencesModel;
1218
- _ignoreModelChangeEvent: boolean;
1219
- _editorService: monaco.editor.ICodeEditorService;
1220
- closeWidget(focusEditor?: boolean): void;
1221
- _gotoReference(ref: Location): Promise<any>;
1222
- toggleWidget(range: IRange, modelPromise: Promise<ReferencesModel> & { cancel: () => void }, peekMode: boolean): void;
1223
- }
1224
- }
1225
-
1226
- declare module monaco.quickInput {
1227
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/platform/quickinput/common/quickInput.ts#L18
1228
- export interface IQuickInputService {
1229
- readonly _serviceBrand?: undefined;
1230
- /**
1231
- * Provides access to the back button in quick input.
1232
- */
1233
- readonly backButton?: IQuickInputButton;
1234
- /**
1235
- * Provides access to the quick access providers.
1236
- */
1237
- readonly quickAccess: IQuickAccessController;
1238
- /**
1239
- * Allows to register on the event that quick input is showing.
1240
- */
1241
- readonly onShow?: Event<void>;
1242
- /**
1243
- * Allows to register on the event that quick input is hiding.
1244
- */
1245
- readonly onHide?: Event<void>;
1246
- /**
1247
- * Opens the quick input box for selecting items and returns a promise
1248
- * with the user selected item(s) if any.
1249
- */
1250
- pick?<T extends IQuickPickItem>(picks: Promise<QuickPickItem[]> | QuickPickItem[], options?: IPickOptions<T> & { canPickMany: true }, token?: CancellationToken): Promise<T[] | undefined>;
1251
- pick?<T extends IQuickPickItem>(picks: Promise<QuickPickItem[]> | QuickPickItem[], options?: IPickOptions<T> & { canPickMany: false }, token?: CancellationToken): Promise<T | undefined>;
1252
- pick?<T extends IQuickPickItem>(picks: Promise<QuickPickItem[]> | QuickPickItem[], options?: Omit<IPickOptions<T>, 'canPickMany'>, token?: CancellationToken): Promise<T | undefined>;
1253
- /**
1254
- * Opens the quick input box for text input and returns a promise with the user typed value if any.
1255
- */
1256
- input?(options?: IInputOptions, token?: CancellationToken): Promise<string | undefined>;
1257
- /**
1258
- * Provides raw access to the quick pick controller.
1259
- */
1260
- createQuickPick<T extends IQuickPickItem>(): IQuickPick<T>;
1261
- /**
1262
- * Provides raw access to the quick input controller.
1263
- */
1264
- createInputBox(): IInputBox;
1265
- /**
1266
- * Moves focus into quick input.
1267
- */
1268
- focus?(): void;
1269
- /**
1270
- * Toggle the checked state of the selected item.
1271
- */
1272
- toggle?(): void;
1273
- /**
1274
- * Navigate inside the opened quick input list.
1275
- */
1276
- navigate?(next: boolean, quickNavigate?: IQuickNavigateConfiguration): void;
1277
- /**
1278
- * Navigate back in a multi-step quick input.
1279
- */
1280
- back?(): Promise<void>;
1281
- /**
1282
- * Accept the selected item.
1283
- *
1284
- * @param keyMods allows to override the state of key
1285
- * modifiers that should be present when invoking.
1286
- */
1287
- accept?(keyMods?: IKeyMods): Promise<void>;
1288
- /**
1289
- * Cancels quick input and closes it.
1290
- */
1291
- cancel?(): Promise<void>;
1292
- }
1293
-
1294
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/base/parts/quickinput/common/quickInput.ts#L55
1295
- export interface IQuickNavigateConfiguration {
1296
- keybindings: monaco.keybindings.ResolvedKeybinding[];
1297
- }
1298
-
1299
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/base/parts/quickinput/common/quickInput.ts#L186
1300
- export enum ItemActivation {
1301
- NONE,
1302
- FIRST,
1303
- SECOND,
1304
- LAST
1305
- }
1306
-
1307
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/base/parts/quickinput/common/quickInput.ts#L151
1308
- export interface IQuickInput extends Disposable {
1309
- readonly onDidHide: Event<void>;
1310
- readonly onDispose: Event<void>;
1311
- title: string | undefined;
1312
- description: string | undefined;
1313
- step: number | undefined;
1314
- totalSteps: number | undefined;
1315
- enabled: boolean;
1316
- contextKey: string | undefined;
1317
- busy: boolean;
1318
- ignoreFocusOut: boolean;
1319
- show(): void;
1320
- hide(): void;
1321
- dispose(): void;
1322
- }
1323
-
1324
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/editor/standalone/browser/quickAccess/standaloneGotoLineQuickAccess.ts
1325
- export class StandaloneGotoLineQuickAccessProvider {
1326
- constructor(private readonly editorService: ICodeEditorService);
1327
- provide(picker: monaco.quickInput.IQuickPick<monaco.quickInput.IQuickPickItem>, token: CancellationToken): IDisposable;
1328
- protected get activeTextEditorControl(): IEditor | undefined;
1329
- }
1330
-
1331
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/editor/standalone/browser/quickAccess/standaloneGotoSymbolQuickAccess.ts
1332
- export class StandaloneGotoSymbolQuickAccessProvider {
1333
- constructor(private readonly editorService: ICodeEditorService);
1334
- provide(picker: monaco.quickInput.IQuickPick<monaco.quickInput.IQuickPickItem>, token: CancellationToken): IDisposable;
1335
- protected get activeTextEditorControl(): IEditor | undefined;
1336
- }
1337
-
1338
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/base/parts/quickinput/browser/quickInput.ts#L1112
1339
- export class QuickInputController implements IDisposable {
1340
- constructor(private options: IQuickInputOptions);
1341
- readonly backButton: IQuickInputButton;
1342
- readonly onShow: Event<void>;
1343
- readonly onHide: Event<void>;
1344
- pick<T extends IQuickPickItem, O extends IPickOptions<T>>(picks: Promise<QuickPickValue<T>[]> | QuickPickValue<T>[],
1345
- options: O = <O>{},
1346
- token: CancellationToken = CancellationToken.None): Promise<(O extends { canPickMany: true } ? T[] : T) | undefined>;
1347
- input(options: IInputOptions = {}, token: CancellationToken = CancellationToken.None): Promise<string | undefined>;
1348
-
1349
- createQuickPick<T extends IQuickPickItem>(): IQuickPick<T>;
1350
- createInputBox(): IInputBox;
1351
-
1352
- hide(): void;
1353
- focus(): void;
1354
- toggle(): void;
1355
- navigate(next: boolean, quickNavigate?: IQuickNavigateConfiguration): void;
1356
- async accept(keyMods: IKeyMods = { alt: false, ctrlCmd: false }): Promise<void>;
1357
- async back(): Promise<void>;
1358
- async cancel(): Promise<void>;
1359
- layout(dimension: monaco.editor.IDimension, titleBarOffset: number): void;
1360
- applyStyles(styles: IQuickInputStyles): void;
1361
- dispose(): void;
1362
- }
1363
-
1364
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/base/parts/quickinput/browser/quickInput.ts#L35
1365
- export interface IQuickInputOptions {
1366
- idPrefix: string;
1367
- container: HTMLElement;
1368
- ignoreFocusOut?(): boolean;
1369
- isScreenReaderOptimized?(): boolean;
1370
- backKeybindingLabel?(): string | undefined;
1371
- setContextKey?(id?: string): void;
1372
- returnFocus?(): void;
1373
- createList?<T>(
1374
- user: string,
1375
- container: HTMLElement,
1376
- delegate: monaco.list.IListVirtualDelegate<T>,
1377
- renderers: monaco.list.IListRenderer<T, any>[],
1378
- options: monaco.list.IListOptions<T>,
1379
- ): QuickInputItemList<T>;
1380
- styles?: IQuickInputStyles;
1381
- }
1382
-
1383
- export class QuickInputOptions implements monaco.quickInput.IQuickInputOptions {
1384
- idPrefix: string;
1385
- container: HTMLElement;
1386
- styles?: IQuickInputStyles;
1387
- ignoreFocusOut: monaco.quickInput.IQuickInputOptions['ignoreFocusOut'];
1388
- isScreenReaderOptimized: monaco.quickInput.IQuickInputOptions['isScreenReaderOptimized'];
1389
- backKeybindingLabel: monaco.quickInput.IQuickInputOptions['backKeybindingLabel'];
1390
- setContextKey: monaco.quickInput.IQuickInputOptions['setContextKey'];
1391
- returnFocus: monaco.quickInput.IQuickInputOptions['returnFocus'];
1392
- createList: monaco.quickInput.IQuickInputOptions['createList'];
1393
- }
1394
-
1395
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/base/parts/quickinput/browser/quickInput.ts#L53
1396
- export interface IQuickInputStyles {
1397
- widget: IQuickInputWidgetStyles;
1398
- inputBox: IInputBoxStyles;
1399
- countBadge: ICountBadgeStyles;
1400
- button: IButtonStyles;
1401
- progressBar: IProgressBarStyles;
1402
- list: monaco.list.IListStyles & { pickerGroupBorder?: monaco.color.Color; pickerGroupForeground?: monaco.color.Color; };
1403
- }
1404
-
1405
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/base/parts/quickinput/browser/quickInput.ts#L62
1406
- export interface IQuickInputWidgetStyles {
1407
- quickInputBackground?: monaco.color.Color;
1408
- quickInputForeground?: monaco.color.Color;
1409
- quickInputTitleBackground?: monaco.color.Color;
1410
- contrastBorder?: monaco.color.Color;
1411
- widgetShadow?: monaco.color.Color;
1412
- }
1413
-
1414
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/base/parts/quickinput/common/quickInput.ts#L14
1415
- export interface IQuickPickItemHighlights {
1416
- label?: monaco.filters.IMatch[];
1417
- description?: monaco.filters.IMatch[];
1418
- detail?: monaco.filters.IMatch[];
1419
- }
1420
-
1421
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/platform/quickinput/browser/helpQuickAccess.ts#L12
1422
- interface IHelpQuickAccessPickItem extends monaco.quickInput.IAnythingQuickPickItem {
1423
- prefix: string;
1424
- }
1425
-
1426
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/base/parts/quickinput/common/quickInput.ts#L333
1427
- export type IQuickPickItemWithResource = IQuickPickItem & { resource?: URI };
1428
-
1429
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/workbench/contrib/search/browser/anythingQuickAccess.ts#L55
1430
- export interface IAnythingQuickPickItem extends IPickerQuickAccessItem, IQuickPickItemWithResource { }
1431
-
1432
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/base/parts/quickinput/common/quickInput.ts#L20
1433
- export interface IQuickPickItem {
1434
- type?: 'item' | 'separator';
1435
- id?: string;
1436
- label: string;
1437
- meta?: string;
1438
- ariaLabel?: string;
1439
- description?: string;
1440
- detail?: string;
1441
- /**
1442
- * Allows to show a keybinding next to the item to indicate
1443
- * how the item can be triggered outside of the picker using
1444
- * keyboard shortcut.
1445
- */
1446
- keybinding?: monaco.keybindings.ResolvedKeybinding;
1447
- iconClasses?: string[];
1448
- italic?: boolean;
1449
- strikethrough?: boolean;
1450
- highlights?: IQuickPickItemHighlights;
1451
- buttons?: IQuickInputButton[];
1452
- picked?: boolean;
1453
- alwaysShow?: boolean;
1454
- }
1455
-
1456
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/base/parts/quickinput/common/quickInput.ts#L306
1457
- export interface IQuickInputButton {
1458
- /** iconPath or iconClass required */
1459
- iconPath?: URI | { light: URI; dark: URI } | { id: string }; // { dark: URI; light: URI; };
1460
- /** iconPath or iconClass required */
1461
- iconClass?: string;
1462
- tooltip?: string;
1463
- /**
1464
- * Whether to always show the button. By default buttons
1465
- * are only visible when hovering over them with the mouse
1466
- */
1467
- alwaysVisible?: boolean;
1468
- }
1469
-
1470
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/base/parts/quickinput/common/quickInput.ts#L43
1471
- export interface IQuickPickSeparator {
1472
- type: 'separator';
1473
- label?: string;
1474
- }
1475
-
1476
- export type QuickPickValue<T = IQuickPickItem> = T | IQuickPickSeparator;
1477
-
1478
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/base/parts/quickinput/common/quickInput.ts#L48
1479
- export interface IKeyMods {
1480
- readonly ctrlCmd: boolean;
1481
- readonly alt: boolean;
1482
- }
1483
-
1484
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/base/parts/quickinput/common/quickInput.ts#L55
1485
- export interface IQuickNavigateConfiguration {
1486
- keybindings: monaco.keybindings.ResolvedKeybinding[];
1487
- }
1488
-
1489
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/base/parts/quickinput/common/quickInput.ts#L193
1490
- export interface IQuickPick<T extends IQuickPickItem> extends IQuickInput {
1491
- value: string;
1492
- /**
1493
- * A method that allows to massage the value used
1494
- * for filtering, e.g, to remove certain parts.
1495
- */
1496
- filterValue: (value: string) => string;
1497
- ariaLabel: string | undefined;
1498
- placeholder: string | undefined;
1499
- readonly onDidChangeValue: Event<string>;
1500
- readonly onDidAccept: Event<IQuickPickAcceptEvent>;
1501
- /**
1502
- * If enabled, will fire the `onDidAccept` event when
1503
- * pressing the arrow-right key with the idea of accepting
1504
- * the selected item without closing the picker.
1505
- */
1506
- canAcceptInBackground: boolean;
1507
- ok: boolean | 'default';
1508
- readonly onDidCustom: Event<void>;
1509
- customButton: boolean;
1510
- customLabel: string | undefined;
1511
- customHover: string | undefined;
1512
- buttons: ReadonlyArray<IQuickInputButton>;
1513
- readonly onDidTriggerButton: Event<IQuickInputButton>;
1514
- readonly onDidTriggerItemButton: Event<IQuickPickItemButtonEvent<T>>;
1515
- items: ReadonlyArray<T | IQuickPickSeparator>;
1516
- canSelectMany: boolean;
1517
- matchOnDescription: boolean;
1518
- matchOnDetail: boolean;
1519
- matchOnLabel: boolean;
1520
- sortByLabel: boolean;
1521
- autoFocusOnList: boolean;
1522
- quickNavigate: IQuickNavigateConfiguration | undefined;
1523
- activeItems: ReadonlyArray<T>;
1524
- readonly onDidChangeActive: Event<T[]>;
1525
- /**
1526
- * Allows to control which entry should be activated by default.
1527
- */
1528
- itemActivation: ItemActivation;
1529
- selectedItems: ReadonlyArray<T>;
1530
- readonly onDidChangeSelection: Event<T[]>;
1531
- readonly keyMods: IKeyMods;
1532
- valueSelection: Readonly<[number, number]> | undefined;
1533
- validationMessage: string | undefined;
1534
- inputHasFocus(): boolean;
1535
- focusOnInput(): void;
1536
- /**
1537
- * Hides the input box from the picker UI. This is typically used
1538
- * in combination with quick-navigation where no search UI should
1539
- * be presented.
1540
- */
1541
- hideInput: boolean;
1542
- hideCheckAll: boolean;
1543
- }
1544
-
1545
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/base/parts/quickinput/common/quickInput.ts#L283
1546
- export interface IInputBox extends IQuickInput {
1547
- value: string;
1548
- valueSelection: Readonly<[number, number]> | undefined;
1549
- placeholder: string | undefined;
1550
- password: boolean;
1551
- readonly onDidChangeValue: Event<string>;
1552
- readonly onDidAccept: Event<void>;
1553
- buttons: ReadonlyArray<IQuickInputButton>;
1554
- readonly onDidTriggerButton: Event<IQuickInputButton>;
1555
- prompt: string | undefined;
1556
- validationMessage: string | undefined;
1557
- }
1558
-
1559
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/base/parts/quickinput/common/quickInput.ts#L116
1560
- export interface IInputOptions {
1561
- /**
1562
- * the value to prefill in the input box
1563
- */
1564
- value?: string;
1565
- /**
1566
- * the selection of value, default to the whole word
1567
- */
1568
- valueSelection?: [number, number];
1569
- /**
1570
- * the text to display underneath the input box
1571
- */
1572
- prompt?: string;
1573
- /**
1574
- * an optional string to show as placeholder in the input box to guide the user what to type
1575
- */
1576
- placeHolder?: string;
1577
- /**
1578
- * Controls if a password input is shown. Password input hides the typed text.
1579
- */
1580
- password?: boolean;
1581
-
1582
- ignoreFocusLost?: boolean;
1583
- /**
1584
- * an optional function that is used to validate user input.
1585
- */
1586
- validateInput?: (input: string) => Promise<string | null | undefined>;
1587
- }
1588
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/base/browser/ui/inputbox/inputBox.ts#L39
1589
- export interface IInputBoxStyles {
1590
- readonly inputBackground?: monaco.color.Color;
1591
- readonly inputForeground?: monaco.color.Color;
1592
- readonly inputBorder?: monaco.color.Color;
1593
- readonly inputValidationInfoBorder?: monaco.color.Color;
1594
- readonly inputValidationInfoBackground?: monaco.color.Color;
1595
- readonly inputValidationInfoForeground?: monaco.color.Color;
1596
- readonly inputValidationWarningBorder?: monaco.color.Color;
1597
- readonly inputValidationWarningBackground?: monaco.color.Color;
1598
- readonly inputValidationWarningForeground?: monaco.color.Color;
1599
- readonly inputValidationErrorBorder?: monaco.color.Color;
1600
- readonly inputValidationErrorBackground?: monaco.color.Color;
1601
- readonly inputValidationErrorForeground?: monaco.color.Color;
1602
- }
1603
-
1604
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/base/browser/ui/countBadge/countBadge.ts#L19
1605
- export interface ICountBadgeStyles {
1606
- badgeBackground?: monaco.color.Color;
1607
- badgeForeground?: monaco.color.Color;
1608
- badgeBorder?: monaco.color.Color;
1609
- }
1610
-
1611
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/base/browser/ui/button/button.ts#L26
1612
- export interface IButtonStyles {
1613
- buttonBackground?: monaco.color.Color;
1614
- buttonHoverBackground?: monaco.color.Color;
1615
- buttonForeground?: monaco.color.Color;
1616
- buttonSecondaryBackground?: monaco.color.Color;
1617
- buttonSecondaryHoverBackground?: monaco.color.Color;
1618
- buttonSecondaryForeground?: monaco.color.Color;
1619
- buttonBorder?: monaco.color.Color;
1620
- }
1621
-
1622
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/base/browser/ui/progressbar/progressbar.ts#L22
1623
- export interface IProgressBarStyles {
1624
- progressBarBackground?: monaco.color.Color;
1625
- }
1626
-
1627
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/base/parts/quickinput/common/quickInput.ts#L59
1628
- export interface IPickOptions<T extends IQuickPickItem> {
1629
- /**
1630
- * an optional string to show as placeholder in the input box to guide the user what she picks on
1631
- */
1632
- placeHolder?: string;
1633
- /**
1634
- * an optional flag to include the description when filtering the picks
1635
- */
1636
- matchOnDescription?: boolean;
1637
- /**
1638
- * an optional flag to include the detail when filtering the picks
1639
- */
1640
- matchOnDetail?: boolean;
1641
- /**
1642
- * an optional flag to filter the picks based on label. Defaults to true.
1643
- */
1644
- matchOnLabel?: boolean;
1645
- /**
1646
- * an option flag to control whether focus is always automatically brought to a list item. Defaults to true.
1647
- */
1648
- autoFocusOnList?: boolean;
1649
- /**
1650
- * an optional flag to not close the picker on focus lost
1651
- */
1652
- ignoreFocusLost?: boolean;
1653
- /**
1654
- * an optional flag to make this picker multi-select
1655
- */
1656
- canPickMany?: boolean;
1657
- /**
1658
- * enables quick navigate in the picker to open an element without typing
1659
- */
1660
- quickNavigate?: IQuickNavigateConfiguration;
1661
- /**
1662
- * a context key to set when this picker is active
1663
- */
1664
- contextKey?: string;
1665
- /**
1666
- * an optional property for the item to focus initially.
1667
- */
1668
- activeItem?: Promise<T> | T;
1669
- onKeyMods?: (keyMods: IKeyMods) => void;
1670
- onDidFocus?: (entry: T) => void;
1671
- onDidTriggerItemButton?: (context: IQuickPickItemButtonContext<T>) => void;
1672
- }
1673
-
1674
- export type Pick<T> = T | IQuickPickSeparator;
1675
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions
1676
- export type PicksWithActive<T> = { items: Array<Pick<T>>, active?: T };
1677
- export type Picks<T> = Array<Pick<T>> | PicksWithActive<T>;
1678
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions
1679
- export type FastAndSlowPicks<T> = { picks: Picks<T>, additionalPicks: Promise<Picks<T>> };
1680
-
1681
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/platform/quickinput/browser/pickerQuickAccess.ts#L92
1682
- export class PickerQuickAccessProvider<T extends IPickerQuickAccessItem> extends Disposable implements IQuickAccessProvider {
1683
- constructor(prefix: string, options?: IPickerQuickAccessProviderOptions<T>);
1684
-
1685
- provide(picker: IQuickPick<T>, token: CancellationToken): IDisposable;
1686
- protected getPicks(filter: string, disposables: any, token: CancellationToken): Picks<T> | Promise<Picks<T>> | FastAndSlowPicks<T> | null;
1687
- }
1688
-
1689
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/platform/quickinput/browser/pickerQuickAccess.ts#L62
1690
- export interface IPickerQuickAccessProviderOptions<T extends IPickerQuickAccessItem> {
1691
- /**
1692
- * Enables support for opening picks in the background via gesture.
1693
- */
1694
- canAcceptInBackground?: boolean;
1695
-
1696
- /**
1697
- * Enables to show a pick entry when no results are returned from a search.
1698
- */
1699
- noResultsPick?: T;
1700
- }
1701
-
1702
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/platform/quickinput/browser/pickerQuickAccess.ts#L36
1703
- export interface IPickerQuickAccessItem extends IQuickPickItem {
1704
- /**
1705
- * A method that will be executed when the pick item is accepted from
1706
- * the picker. The picker will close automatically before running this.
1707
- *
1708
- * @param keyMods the state of modifier keys when the item was accepted.
1709
- * @param event the underlying event that caused the accept to trigger.
1710
- */
1711
- accept?(keyMods?: IKeyMods, event?: IQuickPickAcceptEvent): void;
1712
-
1713
- /**
1714
- * A method that will be executed when a button of the pick item was
1715
- * clicked on.
1716
- *
1717
- * @param buttonIndex index of the button of the item that
1718
- * was clicked.
1719
- *
1720
- * @param keyMods the state of modifier keys when the button was triggered.
1721
- *
1722
- * @returns a value that indicates what should happen after the trigger
1723
- * which can be a `Promise` for long running operations.
1724
- */
1725
- trigger?(buttonIndex: number, keyMods: IKeyMods): TriggerAction | Promise<TriggerAction>;
1726
- }
1727
-
1728
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/base/parts/quickinput/common/quickInput.ts#L177
1729
- export interface IQuickPickAcceptEvent {
1730
- /**
1731
- * Signals if the picker item is to be accepted
1732
- * in the background while keeping the picker open.
1733
- */
1734
- inBackground: boolean;
1735
- }
1736
-
1737
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/platform/quickinput/common/quickAccess.ts#L41
1738
- export enum DefaultQuickAccessFilterValue {
1739
- /**
1740
- * Keep the value as it is given to quick access.
1741
- */
1742
- PRESERVE = 0,
1743
-
1744
- /**
1745
- * Use the value that was used last time something was accepted from the picker.
1746
- */
1747
- LAST = 1
1748
- }
1749
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/platform/quickinput/browser/pickerQuickAccess.ts#L13
1750
- export enum TriggerAction {
1751
- /**
1752
- * Do nothing after the button was clicked.
1753
- */
1754
- NO_ACTION,
1755
-
1756
- /**
1757
- * Close the picker.
1758
- */
1759
- CLOSE_PICKER,
1760
-
1761
- /**
1762
- * Update the results of the picker.
1763
- */
1764
- REFRESH_PICKER,
1765
-
1766
- /**
1767
- * Remove the item from the picker.
1768
- */
1769
- REMOVE_ITEM
1770
- }
1771
-
1772
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/platform/quickinput/common/quickAccess.ts#L54
1773
- export interface IQuickAccessProvider {
1774
- /**
1775
- * Allows to set a default filter value when the provider opens. This can be:
1776
- * - `undefined` to not specify any default value
1777
- * - `DefaultFilterValues.PRESERVE` to use the value that was last typed
1778
- * - `string` for the actual value to use
1779
- *
1780
- * Note: the default filter will only be used if quick access was opened with
1781
- * the exact prefix of the provider. Otherwise the filter value is preserved.
1782
- */
1783
- readonly defaultFilterValue?: string | DefaultQuickAccessFilterValue;
1784
-
1785
- /**
1786
- * Called whenever a prefix was typed into quick pick that matches the provider.
1787
- *
1788
- * @param picker the picker to use for showing provider results. The picker is
1789
- * automatically shown after the method returns, no need to call `show()`.
1790
- * @param token providers have to check the cancellation token everytime after
1791
- * a long running operation or from event handlers because it could be that the
1792
- * picker has been closed or changed meanwhile. The token can be used to find out
1793
- * that the picker was closed without picking an entry (e.g. was canceled by the user).
1794
- * @return a disposable that will automatically be disposed when the picker
1795
- * closes or is replaced by another picker.
1796
- */
1797
- provide(picker: monaco.quickInput.IQuickPick<monaco.quickInput.IQuickPickItem>, token: CancellationToken): IDisposable;
1798
- }
1799
-
1800
- export interface IQuickAccessProviderHelp {
1801
-
1802
- /**
1803
- * The prefix to show for the help entry. If not provided,
1804
- * the prefix used for registration will be taken.
1805
- */
1806
- prefix?: string;
1807
-
1808
- /**
1809
- * A description text to help understand the intent of the provider.
1810
- */
1811
- description: string;
1812
-
1813
- /**
1814
- * Separation between provider for editors and global ones.
1815
- */
1816
- needsEditor: boolean;
1817
- }
1818
- export interface IQuickAccessProviderDescriptor {
1819
- /**
1820
- * The actual provider that will be instantiated as needed.
1821
- */
1822
- readonly ctor: { new(...services: any /* TS BrandedService but no clue how to type this properly */[]): IQuickAccessProvider };
1823
-
1824
- /**
1825
- * The prefix for quick access picker to use the provider for.
1826
- */
1827
- readonly prefix: string;
1828
-
1829
- /**
1830
- * A placeholder to use for the input field when the provider is active.
1831
- * This will also be read out by screen readers and thus helps for
1832
- * accessibility.
1833
- */
1834
- readonly placeholder?: string;
1835
-
1836
- /**
1837
- * Documentation for the provider in the quick access help.
1838
- */
1839
- readonly helpEntries: IQuickAccessProviderHelp[];
1840
-
1841
- /**
1842
- * A context key that will be set automatically when the
1843
- * picker for the provider is showing.
1844
- */
1845
- readonly contextKey?: string;
1846
- }
1847
-
1848
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/platform/quickinput/common/quickAccess.ts#L136
1849
- export interface IQuickAccessRegistry {
1850
- /**
1851
- * Registers a quick access provider to the platform.
1852
- */
1853
- registerQuickAccessProvider(provider: IQuickAccessProviderDescriptor): IDisposable;
1854
-
1855
- /**
1856
- * Get all registered quick access providers.
1857
- */
1858
- getQuickAccessProviders(): IQuickAccessProviderDescriptor[];
1859
-
1860
- /**
1861
- * Get a specific quick access provider for a given prefix.
1862
- */
1863
- getQuickAccessProvider(prefix: string): IQuickAccessProviderDescriptor | undefined;
1864
-
1865
- /**
1866
- * Clear all existing quick access providers
1867
- */
1868
- clear(): void;
1869
- }
1870
-
1871
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/platform/quickinput/common/quickAccess.ts#L154
1872
- export class QuickAccessRegistry implements IQuickAccessRegistry {
1873
- registerQuickAccessProvider(provider: IQuickAccessProviderDescriptor): IDisposable;
1874
- getQuickAccessProviders(): IQuickAccessProviderDescriptor[];
1875
- getQuickAccessProvider(prefix: string): IQuickAccessProviderDescriptor | undefined;
1876
- }
1877
-
1878
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/platform/quickinput/common/quickAccess.ts#L33
1879
- export interface IQuickAccessController {
1880
- /**
1881
- * Open the quick access picker with the optional value prefilled.
1882
- */
1883
- show(value?: string, options?: IQuickAccessOptions): void;
1884
- }
1885
-
1886
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/platform/quickinput/common/quickAccess.ts#L13
1887
- export interface IQuickAccessOptions {
1888
- /**
1889
- * Allows to enable quick navigate support in quick input.
1890
- */
1891
- quickNavigateConfiguration?: IQuickNavigateConfiguration;
1892
-
1893
- /**
1894
- * Allows to configure a different item activation strategy.
1895
- * By default the first item in the list will get activated.
1896
- */
1897
- itemActivation?: ItemActivation;
1898
-
1899
- /**
1900
- * Whether to take the input value as is and not restore it
1901
- * from any existing value if quick access is visible.
1902
- */
1903
- preserveValue?: boolean;
1904
- }
1905
-
1906
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/platform/quickinput/browser/quickAccess.ts#L14
1907
- export class QuickAccessController extends Disposable implements IQuickAccessController {
1908
- constructor(quickInputService: monaco.quickInput.IQuickInputService,
1909
- instantiationService: monaco.instantiation.IInstantiationService
1910
- ) {
1911
- }
1912
- show(value?: string, options?: IQuickAccessOptions): void { }
1913
- }
1914
-
1915
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/base/parts/quickinput/common/quickInput.ts#L319
1916
- export interface IQuickPickItemButtonEvent<T extends IQuickPickItem> {
1917
- button: IQuickInputButton;
1918
- item: T;
1919
- }
1920
-
1921
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/base/parts/quickinput/common/quickInput.ts#L324
1922
- export interface IQuickPickItemButtonContext<T extends IQuickPickItem> extends IQuickPickItemButtonEvent<T> {
1923
- removeItem(): void;
1924
- }
1925
- }
1926
-
1927
- declare module monaco.quickOpen {
1928
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/base/browser/ui/inputbox/inputBox.ts#L58
1929
- export interface IMessage {
1930
- content: string;
1931
- formatContent?: boolean; // defaults to false
1932
- type?: 1 /* INFO */ | 2 /* WARNING */ | 3 /* ERROR */;
1933
- }
1934
-
1935
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/base/browser/ui/inputbox/inputBox.ts#L90
1936
- export class InputBox {
1937
- inputElement: HTMLInputElement;
1938
- setPlaceHolder(placeHolder: string): void;
1939
- showMessage(message: IMessage, force?: boolean): void;
1940
- hideMessage(): void;
1941
- }
1942
-
1943
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/base/browser/ui/iconLabel/iconLabel.ts#L34
1944
- export interface IIconLabelValueOptions {
1945
- title?: string;
1946
- descriptionTitle?: string;
1947
- hideIcon?: boolean;
1948
- extraClasses?: string[];
1949
- italic?: boolean;
1950
- matches?: monaco.filters.IMatch[];
1951
- labelEscapeNewLines?: boolean;
1952
- descriptionMatches?: monaco.filters.IMatch[];
1953
- readonly separator?: string;
1954
- readonly domId?: string;
1955
- }
1956
- }
1957
-
1958
- declare module monaco.filters {
1959
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/base/common/filters.ts#L15
1960
- export interface IMatch {
1961
- start: number;
1962
- end: number;
1963
- }
1964
-
1965
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/base/common/filters.ts#L337
1966
- export function matchesFuzzy(word: string, wordToMatchAgainst: string, enableSeparateSubstringMatching?: boolean): IMatch[] | undefined;
1967
- }
1968
-
1969
- declare module monaco.editorExtensions {
1970
-
1971
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/editor/browser/editorExtensions.ts#L215
1972
- export abstract class EditorCommand {
1973
- }
1974
-
1975
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/editor/browser/editorExtensions.ts#L279
1976
- export abstract class EditorAction extends EditorCommand {
1977
- id: string;
1978
- label: string;
1979
- }
1980
-
1981
- export module EditorExtensionsRegistry {
1982
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/editor/browser/editorExtensions.ts#L497
1983
- export function getEditorActions(): EditorAction[];
1984
-
1985
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/editor/browser/editorExtensions.ts#L493
1986
- export function getEditorCommand(commandId: string): EditorCommand | undefined;
1987
- }
1988
- }
1989
- declare module monaco.modes {
1990
-
1991
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/editor/common/modes.ts#L209
1992
- export interface ITokenizationSupport {
1993
- tokenize(line: string, state: monaco.languages.IState, offsetDelta: number): any;
1994
- }
1995
-
1996
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/editor/common/modes.ts#L1927
1997
- export interface TokenizationRegistry {
1998
- get(language: string): ITokenizationSupport | null;
1999
- getColorMap(): monaco.color.Color[] | null;
2000
- readonly onDidChange: monaco.IEvent<any>;
2001
- }
2002
- export const TokenizationRegistry: TokenizationRegistry;
2003
-
2004
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/editor/common/modes.ts#L70
2005
- export const enum FontStyle {
2006
- NotSet = -1,
2007
- None = 0,
2008
- Italic = 1,
2009
- Bold = 2,
2010
- Underline = 4
2011
- }
2012
-
2013
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/editor/common/modes.ts#L148
2014
- export class TokenMetadata {
2015
-
2016
- public static getLanguageId(metadata: number): number;
2017
-
2018
- public static getFontStyle(metadata: number): number;
2019
-
2020
- public static getForeground(metadata: number): number;
2021
-
2022
- public static getBackground(metadata: number): number;
2023
-
2024
- public static getClassNameFromMetadata(metadata: number): string;
2025
-
2026
- public static getInlineStyleFromMetadata(metadata: number, colorMap: string[]): string;
2027
- }
2028
-
2029
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/base/common/glob.ts#L17
2030
- export interface IRelativePattern {
2031
- base: string;
2032
- pattern: string;
2033
- }
2034
-
2035
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/editor/common/modes/languageSelector.ts#L10
2036
- export interface LanguageFilter {
2037
- language?: string;
2038
- scheme?: string;
2039
- pattern?: string | IRelativePattern;
2040
- /**
2041
- * This provider is implemented in the UI thread.
2042
- */
2043
- hasAccessToAllModels?: boolean;
2044
- exclusive?: boolean;
2045
- }
2046
-
2047
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/editor/common/modes/languageSelector.ts#L21
2048
- export type LanguageSelector = string | LanguageFilter | Array<string | LanguageFilter>;
2049
-
2050
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/editor/common/modes/languageFeatureRegistry.ts#L32
2051
- export interface LanguageFeatureRegistry<T> {
2052
- has(model: monaco.editor.ITextModel): boolean;
2053
- all(model: monaco.editor.ITextModel): T[];
2054
- register(selector: LanguageSelector, provider: T): IDisposable;
2055
- readonly onDidChange: monaco.IEvent<number>;
2056
- }
2057
-
2058
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/editor/common/modes.ts#L1824
2059
- export const DocumentSymbolProviderRegistry: LanguageFeatureRegistry<monaco.languages.DocumentSymbolProvider>;
2060
-
2061
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/editor/common/modes.ts#L1799
2062
- export const CompletionProviderRegistry: LanguageFeatureRegistry<monaco.languages.CompletionItemProvider>;
2063
-
2064
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/editor/common/modes.ts#L1869
2065
- export const CodeActionProviderRegistry: LanguageFeatureRegistry<monaco.languages.CodeActionProvider & { providedCodeActionKinds?: string[] }>;
2066
- }
2067
-
2068
- declare module monaco.suggest {
2069
-
2070
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/editor/contrib/suggest/suggest.ts#L145
2071
- export const enum SnippetSortOrder {
2072
- Top, Inline, Bottom
2073
- }
2074
-
2075
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/editor/contrib/suggest/suggestController.ts#L99
2076
- export interface SuggestController {
2077
- readonly widget: monaco.async.IdleValue<SuggestWidget>;
2078
- }
2079
-
2080
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/editor/contrib/suggest/suggestWidget.ts#L635
2081
- export interface SuggestWidget {
2082
- getFocusedItem(): ISelectedSuggestion | undefined;
2083
- }
2084
-
2085
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/editor/contrib/suggest/suggestWidget.ts#L55
2086
- export interface ISelectedSuggestion {
2087
- item: CompletionItem;
2088
- }
2089
-
2090
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/editor/contrib/suggest/suggest.ts#L38
2091
- export interface CompletionItem {
2092
- completion: monaco.languages.CompletionItem;
2093
- }
2094
-
2095
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/editor/contrib/suggest/suggest.ts#L149
2096
- export class CompletionOptions {
2097
-
2098
- constructor(
2099
- snippetSortOrder?: SnippetSortOrder,
2100
- kindFilter?: Set<languages.CompletionItemKind>,
2101
- providerFilter?: Set<languages.CompletionItemProvider>,
2102
- );
2103
-
2104
- }
2105
-
2106
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/editor/contrib/suggest/suggest.ts#L192
2107
- export function provideSuggestionItems(
2108
- model: monaco.editor.ITextModel,
2109
- position: Position,
2110
- options?: CompletionOptions,
2111
- context?: monaco.languages.CompletionContext,
2112
- token?: monaco.CancellationToken
2113
- ): Promise<CompletionItem[]>;
2114
-
2115
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/editor/contrib/suggest/suggest.ts#L166
2116
- export function setSnippetSuggestSupport(support: monaco.languages.CompletionItemProvider): monaco.languages.CompletionItemProvider;
2117
- }
2118
-
2119
- declare module monaco.snippetParser {
2120
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/editor/contrib/snippet/snippetParser.ts#L583
2121
- export class SnippetParser {
2122
- parse(value: string): TextmateSnippet;
2123
- }
2124
- export class TextmateSnippet {
2125
- }
2126
- }
2127
-
2128
- declare module monaco.contextKeyService {
2129
-
2130
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/platform/contextkey/common/contextkey.ts#L1313
2131
- export interface IContextKey<T> {
2132
- set(value: T): void;
2133
- reset(): void;
2134
- get(): T | undefined;
2135
- }
2136
-
2137
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/platform/contextkey/common/contextkey.ts#L1337
2138
- export interface IContextKeyService {
2139
- // vs code has another object as argument https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/platform/contextkey/common/contextkey.ts#L1348
2140
- // which contains restricted number of HTMLElement methods
2141
- onDidChangeContext: monaco.IEvent<IContextKeyChangeEvent>;
2142
- bufferChangeEvents(callback: Function): void;
2143
-
2144
- createKey<T>(key: string, defaultValue: T | undefined): IContextKey<T>;
2145
- contextMatchesRules(rules: monaco.contextkey.ContextKeyExpression | undefined): boolean;
2146
- getContextKeyValue<T>(key: string): T | undefined;
2147
-
2148
- createScoped(target?: HTMLElement): IContextKeyService;
2149
- createOverlay(overlay: Iterable<[string, any]>): IContextKeyService;
2150
- getContext(target: HTMLElement | null): IContext;
2151
-
2152
- updateParent(parentContextKeyService: IContextKeyService): void;
2153
- }
2154
-
2155
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/platform/contextkey/common/contextkey.ts#L1309
2156
- export interface IContext {
2157
- getValue<T>(key: string): T | undefined;
2158
- }
2159
-
2160
- // https://github.com/theia-ide/vscode/blob/e930e4240ee604757efbd7fd621b77b75568f95d/src/vs/platform/contextkey/browser/contextKeyService.ts#L19
2161
- export class Context implements IContext {
2162
- constructor(id: number, parent: Context | null);
2163
- setValue(key: string, value: any): boolean;
2164
- removeValue(key: string): boolean;
2165
- getValue<T>(key: string): T | undefined;
2166
- updateParent(parent: Context): void;
2167
- collectAllValues(): Record<string, any>;
2168
- }
2169
-
2170
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/platform/contextkey/common/contextkey.ts#L1333
2171
- export interface IContextKeyChangeEvent {
2172
- affectsSome(keys: Set<string>): boolean;
2173
- }
2174
-
2175
- // https://github.com/theia-ide/vscode/blob/e930e4240ee604757efbd7fd621b77b75568f95d/src/vs/platform/contextkey/browser/contextKeyService.ts#L247
2176
- export abstract class AbstractContextKeyService implements IContextKeyService {
2177
- constructor(myContextId: number);
2178
- get contextId(): number;
2179
- onDidChangeContext: monaco.IEvent<IContextKeyChangeEvent>;
2180
- createKey<T>(key: string, defaultValue: T | undefined): IContextKey<T>;
2181
- bufferChangeEvents(callback: Function): void;
2182
- createScoped(target?: HTMLElement): AbstractContextKeyService;
2183
- createOverlay(overlay: Iterable<[string, any]>): IContextKeyService;
2184
- contextMatchesRules(rules: monaco.contextkey.ContextKeyExpression | undefined): boolean;
2185
- getContextKeyValue<T>(key: string): T | undefined;
2186
- setContext(key: string, value: any): void;
2187
- removeContext(key: string): void;
2188
- getContext(target: HTMLElement | null): IContext;
2189
-
2190
- abstract dispose(): void;
2191
- abstract getContextValuesContainer(contextId: number): Context;
2192
- abstract createChildContext(parentContextId?: number): number;
2193
- abstract disposeContext(contextId: number): void;
2194
- abstract updateParent(): void;
2195
- }
2196
-
2197
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/platform/contextkey/browser/contextKeyService.ts#L352
2198
- export class ContextKeyService extends AbstractContextKeyService {
2199
- constructor(configurationService: monaco.services.IConfigurationService);
2200
- dispose(): void;
2201
- getContextValuesContainer(contextId: number): Context;
2202
- createChildContext(parentContextId?: number): number;
2203
- disposeContext(contextId: number): void;
2204
- updateParent(): void;
2205
- }
2206
- }
2207
-
2208
- declare module monaco.contextkey {
2209
- export const enum ContextKeyExprType {
2210
- False = 0,
2211
- True = 1,
2212
- Defined = 2,
2213
- Not = 3,
2214
- Equals = 4,
2215
- NotEquals = 5,
2216
- And = 6,
2217
- Regex = 7,
2218
- NotRegex = 8,
2219
- Or = 9,
2220
- In = 10,
2221
- NotIn = 11,
2222
- Greater = 12,
2223
- GreaterEquals = 13,
2224
- Smaller = 14,
2225
- SmallerEquals = 15,
2226
- }
2227
-
2228
- export class ContextKeyFalseExpr extends ContextKeyExpr { }
2229
- export class ContextKeyTrueExpr extends ContextKeyExpr { }
2230
- export class ContextKeyDefinedExpr extends ContextKeyExpr {
2231
- static create(key: string): ContextKeyExpression;
2232
- }
2233
- export class ContextKeyNotExpr extends ContextKeyExpr {
2234
- static create(key: string): ContextKeyExpression;
2235
- }
2236
- export class ContextKeyEqualsExpr extends ContextKeyExpr {
2237
- static create(key: string, value: any): ContextKeyExpression;
2238
- }
2239
- export class ContextKeyNotEqualsExpr extends ContextKeyExpr {
2240
- static create(key: string, value: any): ContextKeyExpression
2241
- }
2242
- export class ContextKeyRegexExpr extends ContextKeyExpr {
2243
- static create(key: string, regexp: RegExp | null): ContextKeyRegexExpr;
2244
- }
2245
- export class ContextKeyNotRegexExpr extends ContextKeyExpr {
2246
- static create(actual: ContextKeyRegexExpr): ContextKeyExpression;
2247
- }
2248
- export class ContextKeyAndExpr extends ContextKeyExpr {
2249
- static create(_expr: ReadonlyArray<ContextKeyExpression | null | undefined>): ContextKeyExpression | undefined;
2250
- }
2251
- export class ContextKeyOrExpr extends ContextKeyExpr {
2252
- static create(_expr: ReadonlyArray<ContextKeyExpression | null | undefined>): ContextKeyExpression | undefined;
2253
- }
2254
- export class ContextKeyInExpr extends ContextKeyExpr {
2255
- static create(key: string, valueKey: string): ContextKeyInExpr
2256
- }
2257
- export class ContextKeyNotInExpr extends ContextKeyExpr {
2258
- static create(actual: ContextKeyInExpr): ContextKeyNotInExpr;
2259
- }
2260
- export class ContextKeyGreaterExpr extends ContextKeyExpr {
2261
- static create(key: string, value: any): ContextKeyExpression;
2262
- }
2263
- export class ContextKeyGreaterEqualsExpr extends ContextKeyExpr {
2264
- static create(key: string, value: any): ContextKeyExpression
2265
- }
2266
- export class ContextKeySmallerExpr extends ContextKeyExpr {
2267
- static create(key: string, value: any): ContextKeyExpression
2268
- }
2269
- export class ContextKeySmallerEqualsExpr extends ContextKeyExpr {
2270
- static create(key: string, value: any): ContextKeyExpression
2271
- }
2272
-
2273
- export type ContextKeyExpression = (
2274
- ContextKeyFalseExpr | ContextKeyTrueExpr | ContextKeyDefinedExpr | ContextKeyNotExpr
2275
- | ContextKeyEqualsExpr | ContextKeyNotEqualsExpr | ContextKeyRegexExpr
2276
- | ContextKeyNotRegexExpr | ContextKeyAndExpr | ContextKeyOrExpr | ContextKeyInExpr
2277
- | ContextKeyNotInExpr | ContextKeyGreaterExpr | ContextKeyGreaterEqualsExpr
2278
- | ContextKeySmallerExpr | ContextKeySmallerEqualsExpr
2279
- );
2280
-
2281
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/platform/contextkey/common/contextkey.ts#L1327
2282
- export const IContextKeyService: any;
2283
-
2284
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/platform/contextkey/common/contextkey.ts#L79
2285
- export class ContextKeyExpr {
2286
- keys(): string[];
2287
- static deserialize(serialized: string | null | undefined, strict: boolean = false): ContextKeyExpression | undefined;
2288
- serialize(): string;
2289
- }
2290
- }
2291
-
2292
- declare module monaco.mime {
2293
-
2294
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/base/common/mime.ts#L17
2295
- export interface ITextMimeAssociation {
2296
- readonly id: string;
2297
- readonly mime: string;
2298
- readonly filename?: string;
2299
- readonly extension?: string;
2300
- readonly filepattern?: string;
2301
- readonly firstline?: RegExp;
2302
- readonly userConfigured?: boolean;
2303
- }
2304
-
2305
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/base/common/mime.ts#L41
2306
- export function registerTextMime(association: monaco.mime.ITextMimeAssociation, warnOnOverwrite: boolean): void;
2307
-
2308
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/base/common/mime.ts#L97
2309
- export function clearTextMimes(onlyUserConfigured?: boolean): void;
2310
- }
2311
-
2312
- declare module monaco.error {
2313
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/base/common/errors.ts#L79
2314
- export function onUnexpectedError(e: any): undefined;
2315
- }
2316
-
2317
- declare module monaco.path {
2318
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/base/common/path.ts#L1494
2319
- export function normalize(uriPath: string): string;
2320
- }
2321
-
2322
- declare module monaco.wordHelper {
2323
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/editor/common/model/wordHelper.ts#L30
2324
- export const DEFAULT_WORD_REGEXP: RegExp;
2325
- }
2326
-
2327
- declare module monaco.strings {
2328
- // https://github.com/theia-ide/vscode/blob/standalone/0.19.x/src/vs/base/common/strings.ts#L384
2329
- export function startsWith(haystack: string, needle: string): boolean;
2330
-
2331
- // https://github.com/theia-ide/vscode/blob/standalone/0.19.x/src/vs/base/common/strings.ts#L171
2332
- export function endsWith(haystack: string, needle: string): boolean;
2333
- }
2334
-
2335
- declare module monaco.async {
2336
- // https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/base/common/async.ts#L842-L878
2337
- export class IdleValue<T> {
2338
- constructor(executor: () => T) { }
2339
- get value(): T;
2340
- }
2341
- }
2342
-
2343
- /**
2344
- * overloading languages register functions to accept LanguageSelector,
2345
- * check that all register functions passing a selector to registries:
2346
- * https://github.com/theia-ide/vscode/blob/standalone/0.23.x/src/vs/editor/standalone/browser/standaloneLanguages.ts#L368-L546
2347
- */
2348
- declare module monaco.languages {
2349
- export function registerReferenceProvider(selector: monaco.modes.LanguageSelector, provider: ReferenceProvider): IDisposable;
2350
- export function registerRenameProvider(selector: monaco.modes.LanguageSelector, provider: RenameProvider): IDisposable;
2351
- export function registerSignatureHelpProvider(selector: monaco.modes.LanguageSelector, provider: SignatureHelpProvider): IDisposable;
2352
- export function registerHoverProvider(selector: monaco.modes.LanguageSelector, provider: HoverProvider): IDisposable;
2353
- export function registerDocumentSymbolProvider(selector: monaco.modes.LanguageSelector, provider: DocumentSymbolProvider,
2354
- metadata?: DocumentSymbolProviderMetadata): IDisposable;
2355
- export function registerDocumentHighlightProvider(selector: monaco.modes.LanguageSelector, provider: DocumentHighlightProvider): IDisposable;
2356
- export function registerDefinitionProvider(selector: monaco.modes.LanguageSelector, provider: DefinitionProvider): IDisposable;
2357
- export function registerImplementationProvider(selector: monaco.modes.LanguageSelector, provider: ImplementationProvider): IDisposable;
2358
- export function registerTypeDefinitionProvider(selector: monaco.modes.LanguageSelector, provider: TypeDefinitionProvider): IDisposable;
2359
- export function registerCodeLensProvider(selector: monaco.modes.LanguageSelector, provider: CodeLensProvider): IDisposable;
2360
- export function registerCodeActionProvider(selector: monaco.modes.LanguageSelector, provider: CodeActionProvider): IDisposable;
2361
- export function registerDocumentFormattingEditProvider(selector: monaco.modes.LanguageSelector, provider: DocumentFormattingEditProvider): IDisposable;
2362
- export function registerDocumentRangeFormattingEditProvider(selector: monaco.modes.LanguageSelector, provider: DocumentRangeFormattingEditProvider): IDisposable;
2363
- export function registerOnTypeFormattingEditProvider(selector: monaco.modes.LanguageSelector, provider: OnTypeFormattingEditProvider): IDisposable;
2364
- export function registerLinkProvider(selector: monaco.modes.LanguageSelector, provider: LinkProvider): IDisposable;
2365
- export function registerCompletionItemProvider(selector: monaco.modes.LanguageSelector, provider: CompletionItemProvider): IDisposable;
2366
- export function registerColorProvider(selector: monaco.modes.LanguageSelector, provider: DocumentColorProvider): IDisposable;
2367
- export function registerFoldingRangeProvider(selector: monaco.modes.LanguageSelector, provider: FoldingRangeProvider): IDisposable;
2368
- export function registerDeclarationProvider(selector: monaco.modes.LanguageSelector, provider: DeclarationProvider): IDisposable;
2369
- export function registerSelectionRangeProvider(selector: monaco.modes.LanguageSelector, provider: SelectionRangeProvider): IDisposable;
2370
- export function registerDocumentSemanticTokensProvider(selector: monaco.modes.LanguageSelector, provider: DocumentSemanticTokensProvider): IDisposable;
2371
- export function registerDocumentRangeSemanticTokensProvider(selector: monaco.modes.LanguageSelector, provider: DocumentRangeSemanticTokensProvider): IDisposable;
2372
- }
2373
-
2374
- declare module monaco.list {
2375
- export class List<T> extends Disposable {
2376
- constructor(
2377
- private user: string,
2378
- container: HTMLElement,
2379
- virtualDelegate: IListVirtualDelegate<T>,
2380
- renderers: IListRenderer<any, any>[],
2381
- private _options: IListOptions<T> = DefaultOptions
2382
- )
2383
-
2384
- focusNth(n: number, browserEvent?: UIEvent, filter?: (element: T) => boolean): void;
2385
- }
2386
-
2387
- export interface IListStyles {
2388
- listBackground?: monaco.color.Color;
2389
- listFocusBackground?: monaco.color.Color;
2390
- listFocusForeground?: monaco.color.Color;
2391
- listActiveSelectionBackground?: monaco.color.Color;
2392
- listActiveSelectionForeground?: monaco.color.Color;
2393
- listFocusAndSelectionBackground?: monaco.color.Color;
2394
- listFocusAndSelectionForeground?: monaco.color.Color;
2395
- listInactiveSelectionBackground?: monaco.color.Color;
2396
- listInactiveSelectionForeground?: monaco.color.Color;
2397
- listInactiveFocusForeground?: monaco.color.Color;
2398
- listInactiveFocusBackground?: monaco.color.Color;
2399
- listHoverBackground?: monaco.color.Color;
2400
- listHoverForeground?: monaco.color.Color;
2401
- listDropBackground?: monaco.color.Color;
2402
- listFocusOutline?: monaco.color.Color;
2403
- listInactiveFocusOutline?: monaco.color.Color;
2404
- listSelectionOutline?: monaco.color.Color;
2405
- listHoverOutline?: monaco.color.Color;
2406
- listFilterWidgetBackground?: monaco.color.Color;
2407
- listFilterWidgetOutline?: monaco.color.Color;
2408
- listFilterWidgetNoMatchesOutline?: monaco.color.Color;
2409
- listMatchesShadow?: monaco.color.Color;
2410
- treeIndentGuidesStroke?: monaco.color.Color;
2411
- tableColumnsBorder?: monaco.color.Color;
2412
- }
2413
-
2414
- export interface IListOptions<T> {
2415
- readonly identityProvider?: IIdentityProvider<T>;
2416
- readonly dnd?: IListDragAndDrop<T>;
2417
- readonly enableKeyboardNavigation?: boolean;
2418
- readonly automaticKeyboardNavigation?: boolean;
2419
- readonly keyboardNavigationLabelProvider?: IKeyboardNavigationLabelProvider<T>;
2420
- readonly keyboardNavigationDelegate?: IKeyboardNavigationDelegate;
2421
- readonly keyboardSupport?: boolean;
2422
- readonly multipleSelectionSupport?: boolean;
2423
- readonly multipleSelectionController?: IMultipleSelectionController<T>;
2424
- readonly styleController?: (suffix: string) => IStyleController;
2425
- readonly accessibilityProvider?: IListAccessibilityProvider<T>;
2426
-
2427
- // list view options
2428
- readonly useShadows?: boolean;
2429
- readonly verticalScrollMode?: ScrollbarVisibility;
2430
- readonly setRowLineHeight?: boolean;
2431
- readonly setRowHeight?: boolean;
2432
- readonly supportDynamicHeights?: boolean;
2433
- readonly mouseSupport?: boolean;
2434
- readonly horizontalScrolling?: boolean;
2435
- readonly additionalScrollHeight?: number;
2436
- readonly transformOptimization?: boolean;
2437
- readonly smoothScrolling?: boolean;
2438
- readonly alwaysConsumeMouseWheel?: boolean;
2439
- }
2440
-
2441
- export interface IListRenderer<T, TTemplateData> {
2442
- readonly templateId: string;
2443
- renderTemplate(container: HTMLElement): TTemplateData;
2444
- renderElement(element: T, index: number, templateData: TTemplateData, height: number | undefined): void;
2445
- disposeElement?(element: T, index: number, templateData: TTemplateData, height: number | undefined): void;
2446
- disposeTemplate(templateData: TTemplateData): void;
2447
- }
2448
-
2449
- export interface IListVirtualDelegate<T> {
2450
- getHeight(element: T): number;
2451
- getTemplateId(element: T): string;
2452
- hasDynamicHeight?(element: T): boolean;
2453
- setDynamicHeight?(element: T, height: number): void;
2454
- }
2455
-
2456
- export interface IListElement {
2457
- readonly index: number;
2458
- readonly item: monaco.quickInput.IQuickPickItem;
2459
- readonly saneLabel: string;
2460
- readonly saneMeta?: string;
2461
- readonly saneAriaLabel: string;
2462
- readonly saneDescription?: string;
2463
- readonly saneDetail?: string;
2464
- readonly labelHighlights?: monaco.filters.IMatch[];
2465
- readonly descriptionHighlights?: monaco.filters.IMatch[];
2466
- readonly detailHighlights?: monaco.filters.IMatch[];
2467
- readonly checked: boolean;
2468
- readonly separator?: monaco.quickInput.IQuickPickSeparator;
2469
- readonly fireButtonTriggered: (event: monaco.quickInput.IQuickPickItemButtonEvent<IQuickPickItem>) => void;
2470
- }
2471
- }