@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,491 @@
1
+ /**
2
+ * API OWENR: 蛋总
3
+ */
4
+
5
+ declare module 'vscode' {
6
+
7
+ /**
8
+ * Represents an item that can be selected from
9
+ * a list of items.
10
+ */
11
+ export interface QuickPickItem {
12
+
13
+ /**
14
+ * A human readable string which is rendered prominent.
15
+ */
16
+ label: string;
17
+
18
+ /**
19
+ * A human readable string which is rendered less prominent.
20
+ */
21
+ description?: string;
22
+
23
+ /**
24
+ * A human readable string which is rendered less prominent.
25
+ */
26
+ detail?: string;
27
+
28
+ /**
29
+ * Optional flag indicating if this item is picked initially.
30
+ * (Only honored when the picker allows multiple selections.)
31
+ *
32
+ * @see [QuickPickOptions.canPickMany](#QuickPickOptions.canPickMany)
33
+ * not implemented yet
34
+ */
35
+ picked?: boolean;
36
+
37
+ /**
38
+ * Always show this item.
39
+ * not implemented yet
40
+ */
41
+ alwaysShow?: boolean;
42
+ }
43
+
44
+
45
+ /**
46
+ * A concrete [QuickInput](#QuickInput) to let the user pick an item from a
47
+ * list of items of type T. The items can be filtered through a filter text field and
48
+ * there is an option [canSelectMany](#QuickPick.canSelectMany) to allow for
49
+ * selecting multiple items.
50
+ *
51
+ * Note that in many cases the more convenient [window.showQuickPick](#window.showQuickPick)
52
+ * is easier to use. [window.createQuickPick](#window.createQuickPick) should be used
53
+ * when [window.showQuickPick](#window.showQuickPick) does not offer the required flexibility.
54
+ */
55
+ export interface QuickPick<T extends QuickPickItem> extends QuickInput {
56
+
57
+ /**
58
+ * Current value of the filter text.
59
+ */
60
+ value: string;
61
+
62
+ /**
63
+ * Optional placeholder in the filter text.
64
+ */
65
+ placeholder: string | undefined;
66
+
67
+ /**
68
+ * An event signaling when the value of the filter text has changed.
69
+ */
70
+ readonly onDidChangeValue: Event<string>;
71
+
72
+ /**
73
+ * An event signaling when the user indicated acceptance of the selected item(s).
74
+ */
75
+ readonly onDidAccept: Event<void>;
76
+
77
+ /**
78
+ * Buttons for actions in the UI.
79
+ * not implemented yet
80
+ */
81
+ buttons: ReadonlyArray<QuickInputButton>;
82
+
83
+ /**
84
+ * An event signaling when a button was triggered.
85
+ */
86
+ readonly onDidTriggerButton: Event<QuickInputButton>;
87
+
88
+ /**
89
+ * Items to pick from.
90
+ */
91
+ items: ReadonlyArray<T>;
92
+
93
+ /**
94
+ * If multiple items can be selected at the same time. Defaults to false.
95
+ * not implemented yet
96
+ */
97
+ canSelectMany: boolean;
98
+
99
+ /**
100
+ * If the filter text should also be matched against the description of the items. Defaults to false.
101
+ */
102
+ matchOnDescription: boolean;
103
+
104
+ /**
105
+ * If the filter text should also be matched against the detail of the items. Defaults to false.
106
+ */
107
+ matchOnDetail: boolean;
108
+
109
+ /**
110
+ * Active items. This can be read and updated by the extension.
111
+ * not implemented yet
112
+ */
113
+ activeItems: ReadonlyArray<T>;
114
+
115
+ /**
116
+ * An event signaling when the active items have changed.
117
+ */
118
+ readonly onDidChangeActive: Event<T[]>;
119
+
120
+ /**
121
+ * Selected items. This can be read and updated by the extension.
122
+ * not implemented yet
123
+ */
124
+ selectedItems: ReadonlyArray<T>;
125
+
126
+ /**
127
+ * An event signaling when the selected items have changed.
128
+ */
129
+ readonly onDidChangeSelection: Event<T[]>;
130
+ }
131
+
132
+ /**
133
+ * Options to configure the behavior of the quick pick UI.
134
+ */
135
+ export interface QuickPickOptions {
136
+
137
+ /**
138
+ * An optional string that represents the title of the quick pick.
139
+ */
140
+ title?: string;
141
+
142
+ /**
143
+ * An optional flag to include the description when filtering the picks.
144
+ */
145
+ matchOnDescription?: boolean;
146
+
147
+ /**
148
+ * An optional flag to include the detail when filtering the picks.
149
+ */
150
+ matchOnDetail?: boolean;
151
+
152
+ /**
153
+ * An optional string to show as place holder in the input box to guide the user what to pick on.
154
+ */
155
+ placeHolder?: string;
156
+
157
+ /**
158
+ * Set to `true` to keep the picker open when focus moves to another part of the editor or to another window.
159
+ */
160
+ ignoreFocusOut?: boolean;
161
+
162
+ /**
163
+ * An optional flag to make the picker accept multiple selections, if true the result is an array of picks.
164
+ * not implemented yet
165
+ */
166
+ canPickMany?: boolean;
167
+
168
+ /**
169
+ * An optional function that is invoked whenever an item is selected.
170
+ */
171
+ onDidSelectItem?(item: QuickPickItem | string): any;
172
+ }
173
+
174
+
175
+ /**
176
+ * A light-weight user input UI that is initially not visible. After
177
+ * configuring it through its properties the extension can make it
178
+ * visible by calling [QuickInput.show](#QuickInput.show).
179
+ *
180
+ * There are several reasons why this UI might have to be hidden and
181
+ * the extension will be notified through [QuickInput.onDidHide](#QuickInput.onDidHide).
182
+ * (Examples include: an explicit call to [QuickInput.hide](#QuickInput.hide),
183
+ * the user pressing Esc, some other input UI opening, etc.)
184
+ *
185
+ * A user pressing Enter or some other gesture implying acceptance
186
+ * of the current state does not automatically hide this UI component.
187
+ * It is up to the extension to decide whether to accept the user's input
188
+ * and if the UI should indeed be hidden through a call to [QuickInput.hide](#QuickInput.hide).
189
+ *
190
+ * When the extension no longer needs this input UI, it should
191
+ * [QuickInput.dispose](#QuickInput.dispose) it to allow for freeing up
192
+ * any resources associated with it.
193
+ *
194
+ * See [QuickPick](#QuickPick) and [InputBox](#InputBox) for concrete UIs.
195
+ */
196
+ export interface QuickInput {
197
+
198
+ /**
199
+ * An optional title.
200
+ */
201
+ title: string | undefined;
202
+
203
+ /**
204
+ * An optional current step count.
205
+ */
206
+ step: number | undefined;
207
+
208
+ /**
209
+ * An optional total step count.
210
+ */
211
+ totalSteps: number | undefined;
212
+
213
+ /**
214
+ * If the UI should allow for user input. Defaults to true.
215
+ *
216
+ * Change this to false, e.g., while validating user input or
217
+ * loading data for the next step in user input.
218
+ */
219
+ enabled: boolean;
220
+
221
+ /**
222
+ * If the UI should show a progress indicator. Defaults to false.
223
+ *
224
+ * Change this to true, e.g., while loading more data or validating
225
+ * user input.
226
+ */
227
+ busy: boolean;
228
+
229
+ /**
230
+ * If the UI should stay open even when loosing UI focus. Defaults to false.
231
+ */
232
+ ignoreFocusOut: boolean;
233
+
234
+ /**
235
+ * Makes the input UI visible in its current configuration. Any other input
236
+ * UI will first fire an [QuickInput.onDidHide](#QuickInput.onDidHide) event.
237
+ */
238
+ show(): void;
239
+
240
+ /**
241
+ * Hides this input UI. This will also fire an [QuickInput.onDidHide](#QuickInput.onDidHide)
242
+ * event.
243
+ */
244
+ hide(): void;
245
+
246
+ /**
247
+ * An event signaling when this input UI is hidden.
248
+ *
249
+ * There are several reasons why this UI might have to be hidden and
250
+ * the extension will be notified through [QuickInput.onDidHide](#QuickInput.onDidHide).
251
+ * (Examples include: an explicit call to [QuickInput.hide](#QuickInput.hide),
252
+ * the user pressing Esc, some other input UI opening, etc.)
253
+ */
254
+ onDidHide: Event<void>;
255
+
256
+ /**
257
+ * Dispose of this input UI and any associated resources. If it is still
258
+ * visible, it is first hidden. After this call the input UI is no longer
259
+ * functional and no additional methods or properties on it should be
260
+ * accessed. Instead a new input UI should be created.
261
+ */
262
+ dispose(): void;
263
+ }
264
+
265
+
266
+ /**
267
+ * Options to configure the behavior of the input box UI.
268
+ */
269
+ export interface InputBoxOptions {
270
+
271
+ /**
272
+ * An optional string that represents the title of the input box.
273
+ */
274
+ title?: string;
275
+
276
+ /**
277
+ * The value to prefill in the input box.
278
+ */
279
+ value?: string;
280
+
281
+ /**
282
+ * Selection of the prefilled [`value`](#InputBoxOptions.value). Defined as tuple of two number where the
283
+ * first is the inclusive start index and the second the exclusive end index. When `undefined` the whole
284
+ * word will be selected, when empty (start equals end) only the cursor will be set,
285
+ * otherwise the defined range will be selected.
286
+ */
287
+ valueSelection?: [number, number];
288
+
289
+ /**
290
+ * The text to display underneath the input box.
291
+ */
292
+ prompt?: string;
293
+
294
+ /**
295
+ * An optional string to show as place holder in the input box to guide the user what to type.
296
+ */
297
+ placeHolder?: string;
298
+
299
+ /**
300
+ * Set to `true` to show a password prompt that will not show the typed value.
301
+ */
302
+ password?: boolean;
303
+
304
+ /**
305
+ * Set to `true` to keep the input box open when focus moves to another part of the editor or to another window.
306
+ */
307
+ ignoreFocusOut?: boolean;
308
+
309
+ /**
310
+ * An optional function that will be called to validate input and to give a hint
311
+ * to the user.
312
+ *
313
+ * @param value The current value of the input box.
314
+ * @return A human readable string which is presented as diagnostic message.
315
+ * Return `undefined`, `null`, or the empty string when 'value' is valid.
316
+ */
317
+ validateInput?(value: string): string | undefined | null | Thenable<string | undefined | null>;
318
+ }
319
+
320
+ /**
321
+ * A concrete [QuickInput](#QuickInput) to let the user input a text value.
322
+ *
323
+ * Note that in many cases the more convenient [window.showInputBox](#window.showInputBox)
324
+ * is easier to use. [window.createInputBox](#window.createInputBox) should be used
325
+ * when [window.showInputBox](#window.showInputBox) does not offer the required flexibility.
326
+ */
327
+ export interface InputBox extends QuickInput {
328
+
329
+ /**
330
+ * Current input value.
331
+ */
332
+ value: string;
333
+
334
+ /**
335
+ * Optional placeholder in the filter text.
336
+ */
337
+ placeholder: string | undefined;
338
+
339
+ /**
340
+ * If the input value should be hidden. Defaults to false.
341
+ */
342
+ password: boolean;
343
+
344
+ /**
345
+ * An event signaling when the value has changed.
346
+ */
347
+ readonly onDidChangeValue: Event<string>;
348
+
349
+ /**
350
+ * An event signaling when the user indicated acceptance of the input value.
351
+ */
352
+ readonly onDidAccept: Event<void>;
353
+
354
+ /**
355
+ * Buttons for actions in the UI.
356
+ */
357
+ buttons: ReadonlyArray<QuickInputButton>;
358
+
359
+ /**
360
+ * An event signaling when a button was triggered.
361
+ */
362
+ readonly onDidTriggerButton: Event<QuickInputButton>;
363
+
364
+ /**
365
+ * An optional prompt text providing some ask or explanation to the user.
366
+ */
367
+ prompt: string | undefined;
368
+
369
+ /**
370
+ * An optional validation message indicating a problem with the current input value.
371
+ */
372
+ validationMessage: string | undefined;
373
+ }
374
+
375
+
376
+ export namespace window {
377
+ /**
378
+ * Creates a [QuickPick](#QuickPick) to let the user pick an item from a list
379
+ * of items of type T.
380
+ *
381
+ * Note that in many cases the more convenient [window.showQuickPick](#window.showQuickPick)
382
+ * is easier to use. [window.createQuickPick](#window.createQuickPick) should be used
383
+ * when [window.showQuickPick](#window.showQuickPick) does not offer the required flexibility.
384
+ *
385
+ * @return A new [QuickPick](#QuickPick).
386
+ */
387
+ export function createQuickPick<T extends QuickPickItem>(): QuickPick<T>;
388
+ /**
389
+ * Shows a selection list allowing multiple selections.
390
+ *
391
+ * @param items An array of strings, or a promise that resolves to an array of strings.
392
+ * @param options Configures the behavior of the selection list.
393
+ * @param token A token that can be used to signal cancellation.
394
+ * @return A promise that resolves to the selected items or `undefined`.
395
+ */
396
+ export function showQuickPick(items: string[] | Thenable<string[]>, options: QuickPickOptions & { canPickMany: true; }, token?: CancellationToken): Thenable<string[] | undefined>;
397
+
398
+ /**
399
+ * Shows a selection list.
400
+ *
401
+ * @param items An array of strings, or a promise that resolves to an array of strings.
402
+ * @param options Configures the behavior of the selection list.
403
+ * @param token A token that can be used to signal cancellation.
404
+ * @return A promise that resolves to the selection or `undefined`.
405
+ */
406
+ export function showQuickPick(items: string[] | Thenable<string[]>, options?: QuickPickOptions, token?: CancellationToken): Thenable<string | undefined>;
407
+
408
+ /**
409
+ * Shows a selection list allowing multiple selections.
410
+ *
411
+ * @param items An array of items, or a promise that resolves to an array of items.
412
+ * @param options Configures the behavior of the selection list.
413
+ * @param token A token that can be used to signal cancellation.
414
+ * @return A promise that resolves to the selected items or `undefined`.
415
+ */
416
+ export function showQuickPick<T extends QuickPickItem>(items: T[] | Thenable<T[]>, options: QuickPickOptions & { canPickMany: true; }, token?: CancellationToken): Thenable<T[] | undefined>;
417
+
418
+ /**
419
+ * Shows a selection list.
420
+ *
421
+ * @param items An array of items, or a promise that resolves to an array of items.
422
+ * @param options Configures the behavior of the selection list.
423
+ * @param token A token that can be used to signal cancellation.
424
+ * @return A promise that resolves to the selected item or `undefined`.
425
+ */
426
+ export function showQuickPick<T extends QuickPickItem>(items: T[] | Thenable<T[]>, options?: QuickPickOptions, token?: CancellationToken): Thenable<T | undefined>;
427
+
428
+ /**
429
+ * Opens an input box to ask the user for input.
430
+ *
431
+ * The returned value will be `undefined` if the input box was canceled (e.g. pressing ESC). Otherwise the
432
+ * returned value will be the string typed by the user or an empty string if the user did not type
433
+ * anything but dismissed the input box with OK.
434
+ *
435
+ * @param options Configures the behavior of the input box.
436
+ * @param token A token that can be used to signal cancellation.
437
+ * @return A promise that resolves to a string the user provided or to `undefined` in case of dismissal.
438
+ */
439
+ export function showInputBox(options?: InputBoxOptions, token?: CancellationToken): Thenable<string | undefined>;
440
+
441
+
442
+
443
+ /**
444
+ * Creates a [InputBox](#InputBox) to let the user enter some text input.
445
+ *
446
+ * Note that in many cases the more convenient [window.showInputBox](#window.showInputBox)
447
+ * is easier to use. [window.createInputBox](#window.createInputBox) should be used
448
+ * when [window.showInputBox](#window.showInputBox) does not offer the required flexibility.
449
+ *
450
+ * @return A new [InputBox](#InputBox).
451
+ */
452
+ export function createInputBox(): InputBox;
453
+ }
454
+
455
+
456
+ /**
457
+ * Button for an action in a [QuickPick](#QuickPick) or [InputBox](#InputBox).
458
+ */
459
+ export interface QuickInputButton {
460
+
461
+ /**
462
+ * Icon for the button.
463
+ */
464
+ readonly iconPath: Uri | { light: Uri; dark: Uri } | ThemeIcon;
465
+
466
+ /**
467
+ * An optional tooltip.
468
+ */
469
+ readonly tooltip?: string | undefined;
470
+ }
471
+
472
+ /**
473
+ * Predefined buttons for [QuickPick](#QuickPick) and [InputBox](#InputBox).
474
+ */
475
+ export class QuickInputButtons {
476
+
477
+ /**
478
+ * A back button for [QuickPick](#QuickPick) and [InputBox](#InputBox).
479
+ *
480
+ * When a navigation 'back' button is needed this one should be used for consistency.
481
+ * It comes with a predefined icon, tooltip and location.
482
+ */
483
+ static readonly Back: QuickInputButton;
484
+
485
+ /**
486
+ * @hidden
487
+ */
488
+ private constructor();
489
+ }
490
+
491
+ }