@opensumi/sumi 2.12.1-next-079c1930

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