@opensumi/sumi 2.12.1-next-079c1930 → 2.13.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/manifest.json +114 -106
- package/package.json +4 -3
- package/sumi-browser.d.ts +131 -25
- package/sumi-worker/sumi-worker.d.ts +186 -206
- package/sumi-worker/worker.command.d.ts +18 -14
- package/sumi-worker/worker.comments.d.ts +1 -1
- package/sumi-worker/worker.doc.d.ts +6 -9
- package/sumi-worker/worker.editor.d.ts +5 -16
- package/sumi-worker/worker.extensions.d.ts +0 -1
- package/sumi-worker/worker.language.d.ts +222 -138
- package/sumi-worker/worker.window.d.ts +185 -180
- package/sumi.d.ts +112 -108
- package/vscode/typings/vscode.d.ts +21 -33
- package/vscode/typings/vscode.debug.d.ts +35 -22
- package/vscode/typings/vscode.env.d.ts +13 -2
- package/vscode/typings/vscode.tasks.d.ts +11 -0
- package/vscode/typings/vscode.tests.d.ts +899 -0
- package/vscode/typings-pending/vscode.d.ts +2 -4
- package/vscode/typings-pending/vscode.proposed.d.ts +1 -3
- package/vscode.d.ts +1 -0
|
@@ -19,300 +19,305 @@ declare module 'sumi-worker' {
|
|
|
19
19
|
openLabel?: string;
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
* Allow to select files, defaults to `true`.
|
|
23
|
+
*/
|
|
24
24
|
canSelectFiles?: boolean;
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
* Allow to select folders, defaults to `false`.
|
|
28
|
+
*/
|
|
29
29
|
canSelectFolders?: boolean;
|
|
30
30
|
|
|
31
31
|
/**
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
* Allow to select many files or folders.
|
|
33
|
+
*/
|
|
34
34
|
canSelectMany?: boolean;
|
|
35
35
|
|
|
36
36
|
/**
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
37
|
+
* A set of file filters that are used by the dialog. Each entry is a human readable label,
|
|
38
|
+
* like "TypeScript", and an array of extensions, e.g.
|
|
39
|
+
* ```ts
|
|
40
|
+
* {
|
|
41
|
+
* 'Images': ['png', 'jpg']
|
|
42
|
+
* 'TypeScript': ['ts', 'tsx']
|
|
43
|
+
* }
|
|
44
|
+
* ```
|
|
45
|
+
*/
|
|
46
46
|
filters?: { [name: string]: string[] };
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
/**
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
* Options to configure the behaviour of a file save dialog.
|
|
51
|
+
*/
|
|
52
52
|
export interface SaveDialogOptions {
|
|
53
53
|
/**
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
* The resource the dialog shows when opened.
|
|
55
|
+
*/
|
|
56
56
|
defaultUri?: Uri;
|
|
57
57
|
|
|
58
58
|
/**
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
* A human-readable string for the save button.
|
|
60
|
+
*/
|
|
61
61
|
saveLabel?: string;
|
|
62
62
|
|
|
63
63
|
/**
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
64
|
+
* A set of file filters that are used by the dialog. Each entry is a human readable label,
|
|
65
|
+
* like "TypeScript", and an array of extensions, e.g.
|
|
66
|
+
* ```ts
|
|
67
|
+
* {
|
|
68
|
+
* 'Images': ['png', 'jpg']
|
|
69
|
+
* 'TypeScript': ['ts', 'tsx']
|
|
70
|
+
* }
|
|
71
|
+
* ```
|
|
72
|
+
*/
|
|
73
73
|
filters?: { [name: string]: string[] };
|
|
74
74
|
}
|
|
75
75
|
export namespace window {
|
|
76
|
-
|
|
77
76
|
/**
|
|
78
|
-
|
|
79
|
-
|
|
77
|
+
* The currently opened terminals or an empty array.
|
|
78
|
+
*/
|
|
80
79
|
export const terminals: ReadonlyArray<Terminal>;
|
|
81
80
|
|
|
82
81
|
/**
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
82
|
+
* The currently active terminal or `undefined`. The active terminal is the one that
|
|
83
|
+
* currently has focus or most recently had focus.
|
|
84
|
+
*/
|
|
86
85
|
export const activeTerminal: Terminal | undefined;
|
|
87
86
|
|
|
88
87
|
/**
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
88
|
+
* An [event](#Event) which fires when the [active terminal](#window.activeTerminal)
|
|
89
|
+
* has changed. *Note* that the event also fires when the active terminal changes
|
|
90
|
+
* to `undefined`.
|
|
91
|
+
*/
|
|
93
92
|
export const onDidChangeActiveTerminal: Event<Terminal | undefined>;
|
|
94
93
|
|
|
95
94
|
/**
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
95
|
+
* An [event](#Event) which fires when a terminal has been created, either through the
|
|
96
|
+
* [createTerminal](#window.createTerminal) API or commands.
|
|
97
|
+
*/
|
|
99
98
|
export const onDidOpenTerminal: Event<Terminal>;
|
|
100
99
|
|
|
101
100
|
/**
|
|
102
|
-
|
|
103
|
-
|
|
101
|
+
* An [event](#Event) which fires when a terminal is disposed.
|
|
102
|
+
*/
|
|
104
103
|
export const onDidCloseTerminal: Event<Terminal>;
|
|
105
104
|
|
|
106
105
|
/**
|
|
107
|
-
|
|
108
|
-
|
|
106
|
+
* Represents the current window's state.
|
|
107
|
+
*/
|
|
109
108
|
export const state: WindowState;
|
|
110
109
|
|
|
111
110
|
/**
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
111
|
+
* An [event](#Event) which fires when the focus state of the current window
|
|
112
|
+
* changes. The value of the event represents whether the window is focused.
|
|
113
|
+
*/
|
|
115
114
|
export const onDidChangeWindowState: Event<WindowState>;
|
|
116
115
|
|
|
117
116
|
/**
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
117
|
+
* Creates a [Terminal](#Terminal). The cwd of the terminal will be the workspace directory
|
|
118
|
+
* if it exists, regardless of whether an explicit customStartPath setting exists.
|
|
119
|
+
*
|
|
120
|
+
* @param name Optional human-readable string which will be used to represent the terminal in the UI.
|
|
121
|
+
* @param shellPath Optional path to a custom shell executable to be used in the terminal.
|
|
122
|
+
* @param shellArgs Optional args for the custom shell executable. A string can be used on Windows only which
|
|
123
|
+
* allows specifying shell args in [command-line format](https://msdn.microsoft.com/en-au/08dfcab2-eb6e-49a4-80eb-87d4076c98c6).
|
|
124
|
+
* @return A new Terminal.
|
|
125
|
+
*/
|
|
127
126
|
export function createTerminal(name?: string, shellPath?: string, shellArgs?: string[] | string): Terminal;
|
|
128
127
|
|
|
129
128
|
/**
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
export function createWebviewPanel(
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
129
|
+
* Create and show a new webview panel.
|
|
130
|
+
*
|
|
131
|
+
* @param viewType Identifies the type of the webview panel.
|
|
132
|
+
* @param title Title of the panel.
|
|
133
|
+
* @param showOptions Where to show the webview in the editor. If preserveFocus is set, the new webview will not take focus.
|
|
134
|
+
* @param options Settings for the new panel.
|
|
135
|
+
*
|
|
136
|
+
* @return New webview panel.
|
|
137
|
+
*/
|
|
138
|
+
export function createWebviewPanel(
|
|
139
|
+
viewType: string,
|
|
140
|
+
title: string,
|
|
141
|
+
showOptions: ViewColumn | { viewColumn: ViewColumn; preserveFocus?: boolean },
|
|
142
|
+
options?: WebviewPanelOptions & WebviewOptions,
|
|
143
|
+
): WebviewPanel;
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* ~~Show progress in the Source Control viewlet while running the given callback and while
|
|
147
|
+
* its returned promise isn't resolve or rejected.~~
|
|
148
|
+
*
|
|
149
|
+
* @deprecated Use `withProgress` instead.
|
|
150
|
+
*
|
|
151
|
+
* @param task A callback returning a promise. Progress increments can be reported with
|
|
152
|
+
* the provided [progress](#Progress)-object.
|
|
153
|
+
* @return The thenable the task did return.
|
|
154
|
+
*/
|
|
151
155
|
export function withScmProgress<R>(task: (progress: Progress<number>) => Thenable<R>): Thenable<R>;
|
|
152
156
|
|
|
153
157
|
/**
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
export function withProgress<R>(
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
158
|
+
* Show progress in the editor. Progress is shown while running the given callback
|
|
159
|
+
* and while the promise it returned isn't resolved nor rejected. The location at which
|
|
160
|
+
* progress should show (and other details) is defined via the passed [`ProgressOptions`](#ProgressOptions).
|
|
161
|
+
*
|
|
162
|
+
* @param task A callback returning a promise. Progress state can be reported with
|
|
163
|
+
* the provided [progress](#Progress)-object.
|
|
164
|
+
*
|
|
165
|
+
* To report discrete progress, use `increment` to indicate how much work has been completed. Each call with
|
|
166
|
+
* a `increment` value will be summed up and reflected as overall progress until 100% is reached (a value of
|
|
167
|
+
* e.g. `10` accounts for `10%` of work done).
|
|
168
|
+
* Note that currently only `ProgressLocation.Notification` is capable of showing discrete progress.
|
|
169
|
+
*
|
|
170
|
+
* To monitor if the operation has been cancelled by the user, use the provided [`CancellationToken`](#CancellationToken).
|
|
171
|
+
* Note that currently only `ProgressLocation.Notification` is supporting to show a cancel button to cancel the
|
|
172
|
+
* long running operation.
|
|
173
|
+
*
|
|
174
|
+
* @return The thenable the task-callback returned.
|
|
175
|
+
*/
|
|
176
|
+
export function withProgress<R>(
|
|
177
|
+
options: ProgressOptions,
|
|
178
|
+
task: (progress: Progress<{ message?: string; increment?: number }>, token: CancellationToken) => Thenable<R>,
|
|
179
|
+
): Thenable<R>;
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* Register a [TreeDataProvider](#TreeDataProvider) for the view contributed using the extension point `views`.
|
|
183
|
+
* This will allow you to contribute data to the [TreeView](#TreeView) and update if the data changes.
|
|
184
|
+
*
|
|
185
|
+
* **Note:** To get access to the [TreeView](#TreeView) and perform operations on it, use [createTreeView](#window.createTreeView).
|
|
186
|
+
*
|
|
187
|
+
* @param viewId Id of the view contributed using the extension point `views`.
|
|
188
|
+
* @param treeDataProvider A [TreeDataProvider](#TreeDataProvider) that provides tree data for the view
|
|
189
|
+
*/
|
|
183
190
|
export function registerTreeDataProvider<T>(viewId: string, treeDataProvider: TreeDataProvider<T>): Disposable;
|
|
184
191
|
|
|
185
192
|
/**
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
193
|
+
* Create a [TreeView](#TreeView) for the view contributed using the extension point `views`.
|
|
194
|
+
* @param viewId Id of the view contributed using the extension point `views`.
|
|
195
|
+
* @param options Options for creating the [TreeView](#TreeView)
|
|
196
|
+
* @returns a [TreeView](#TreeView).
|
|
197
|
+
*/
|
|
191
198
|
export function createTreeView<T>(viewId: string, options: TreeViewOptions<T>): TreeView<T>;
|
|
192
199
|
|
|
193
200
|
/**
|
|
194
|
-
|
|
195
|
-
|
|
201
|
+
* Options for creating a [TreeView](#TreeView)
|
|
202
|
+
*/
|
|
196
203
|
export interface TreeViewOptions<T> {
|
|
197
|
-
|
|
198
204
|
/**
|
|
199
|
-
|
|
200
|
-
|
|
205
|
+
* A data provider that provides tree data.
|
|
206
|
+
*/
|
|
201
207
|
treeDataProvider: TreeDataProvider<T>;
|
|
202
208
|
|
|
203
209
|
/**
|
|
204
|
-
|
|
205
|
-
|
|
210
|
+
* Whether to show collapse all action or not.
|
|
211
|
+
*/
|
|
206
212
|
showCollapseAll?: boolean;
|
|
207
213
|
}
|
|
208
214
|
/**
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
+
* Shows a file open dialog to the user which allows to select a file
|
|
216
|
+
* for opening-purposes.
|
|
217
|
+
*
|
|
218
|
+
* @param options Options that control the dialog.
|
|
219
|
+
* @returns A promise that resolves to the selected resources or `undefined`.
|
|
220
|
+
*/
|
|
215
221
|
export function showOpenDialog(options: OpenDialogOptions): Thenable<Uri[] | undefined>;
|
|
216
222
|
|
|
217
223
|
/**
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
+
* Shows a file save dialog to the user which allows to select a file
|
|
225
|
+
* for saving-purposes.
|
|
226
|
+
*
|
|
227
|
+
* @param options Options that control the dialog.
|
|
228
|
+
* @returns A promise that resolves to the selected resource or `undefined`.
|
|
229
|
+
*/
|
|
224
230
|
export function showSaveDialog(options: SaveDialogOptions): Thenable<Uri | undefined>;
|
|
225
231
|
}
|
|
226
232
|
|
|
227
233
|
/**
|
|
228
|
-
|
|
229
|
-
|
|
234
|
+
* A panel that contains a webview.
|
|
235
|
+
*/
|
|
230
236
|
interface WebviewPanel {
|
|
231
237
|
/**
|
|
232
|
-
|
|
233
|
-
|
|
238
|
+
* Identifies the type of the webview panel, such as `'markdown.preview'`.
|
|
239
|
+
*/
|
|
234
240
|
readonly viewType: string;
|
|
235
241
|
|
|
236
242
|
/**
|
|
237
|
-
|
|
238
|
-
|
|
243
|
+
* Title of the panel shown in UI.
|
|
244
|
+
*/
|
|
239
245
|
title: string;
|
|
240
246
|
|
|
241
247
|
/**
|
|
242
|
-
|
|
243
|
-
|
|
248
|
+
* Icon for the panel shown in UI.
|
|
249
|
+
*/
|
|
244
250
|
iconPath?: Uri | { light: Uri; dark: Uri };
|
|
245
251
|
|
|
246
252
|
/**
|
|
247
|
-
|
|
248
|
-
|
|
253
|
+
* Webview belonging to the panel.
|
|
254
|
+
*/
|
|
249
255
|
readonly webview: Webview;
|
|
250
256
|
|
|
251
257
|
/**
|
|
252
|
-
|
|
253
|
-
|
|
258
|
+
* Content settings for the webview panel.
|
|
259
|
+
*/
|
|
254
260
|
readonly options: WebviewPanelOptions;
|
|
255
261
|
|
|
256
262
|
/**
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
263
|
+
* Editor position of the panel. This property is only set if the webview is in
|
|
264
|
+
* one of the editor view columns.
|
|
265
|
+
*/
|
|
260
266
|
readonly viewColumn?: ViewColumn;
|
|
261
267
|
|
|
262
268
|
/**
|
|
263
|
-
|
|
264
|
-
|
|
269
|
+
* Whether the panel is active (focused by the user).
|
|
270
|
+
*/
|
|
265
271
|
readonly active: boolean;
|
|
266
272
|
|
|
267
273
|
/**
|
|
268
|
-
|
|
269
|
-
|
|
274
|
+
* Whether the panel is visible.
|
|
275
|
+
*/
|
|
270
276
|
readonly visible: boolean;
|
|
271
277
|
|
|
272
278
|
/**
|
|
273
|
-
|
|
274
|
-
|
|
279
|
+
* Fired when the panel's view state changes.
|
|
280
|
+
*/
|
|
275
281
|
readonly onDidChangeViewState: Event<WebviewPanelOnDidChangeViewStateEvent>;
|
|
276
282
|
|
|
277
283
|
/**
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
284
|
+
* Fired when the panel is disposed.
|
|
285
|
+
*
|
|
286
|
+
* This may be because the user closed the panel or because `.dispose()` was
|
|
287
|
+
* called on it.
|
|
288
|
+
*
|
|
289
|
+
* Trying to use the panel after it has been disposed throws an exception.
|
|
290
|
+
*/
|
|
285
291
|
readonly onDidDispose: Event<void>;
|
|
286
292
|
|
|
287
293
|
/**
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
294
|
+
* Show the webview panel in a given column.
|
|
295
|
+
*
|
|
296
|
+
* A webview panel may only show in a single column at a time. If it is already showing, this
|
|
297
|
+
* method moves it to a new column.
|
|
298
|
+
*
|
|
299
|
+
* @param viewColumn View column to show the panel in. Shows in the current `viewColumn` if undefined.
|
|
300
|
+
* @param preserveFocus When `true`, the webview will not take focus.
|
|
301
|
+
*/
|
|
296
302
|
reveal(viewColumn?: ViewColumn, preserveFocus?: boolean): void;
|
|
297
303
|
|
|
298
304
|
/**
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
+
* Dispose of the webview panel.
|
|
306
|
+
*
|
|
307
|
+
* This closes the panel if it showing and disposes of the resources owned by the webview.
|
|
308
|
+
* Webview panels are also disposed when the user closes the webview panel. Both cases
|
|
309
|
+
* fire the `onDispose` event.
|
|
310
|
+
*/
|
|
305
311
|
dispose(): any;
|
|
306
312
|
}
|
|
307
313
|
|
|
308
314
|
/**
|
|
309
|
-
|
|
310
|
-
|
|
315
|
+
* Event fired when a webview panel's view state changes.
|
|
316
|
+
*/
|
|
311
317
|
export interface WebviewPanelOnDidChangeViewStateEvent {
|
|
312
318
|
/**
|
|
313
|
-
|
|
314
|
-
|
|
319
|
+
* Webview panel whose view state changed.
|
|
320
|
+
*/
|
|
315
321
|
readonly webviewPanel: WebviewPanel;
|
|
316
322
|
}
|
|
317
|
-
|
|
318
323
|
}
|