@theia/plugin 1.68.0-next.48 → 1.68.0-next.79

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 (2) hide show
  1. package/package.json +2 -2
  2. package/src/theia.d.ts +256 -160
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theia/plugin",
3
- "version": "1.68.0-next.48+c13611b3f",
3
+ "version": "1.68.0-next.79+c38f18ec72c",
4
4
  "description": "Theia - Plugin API",
5
5
  "types": "./src/theia.d.ts",
6
6
  "publishConfig": {
@@ -32,5 +32,5 @@
32
32
  "nyc": {
33
33
  "extends": "../../configs/nyc.json"
34
34
  },
35
- "gitHead": "c13611b3f07bfc3d2c7525d8488283ff3e575422"
35
+ "gitHead": "c38f18ec72c0cb454100658a01331bd9fb7bd8cc"
36
36
  }
package/src/theia.d.ts CHANGED
@@ -2186,98 +2186,144 @@ export module '@theia/plugin' {
2186
2186
  export interface QuickPickItem {
2187
2187
 
2188
2188
  /**
2189
- * A human-readable string which is rendered prominent. Supports rendering of {@link ThemeIcon theme icons} via
2190
- * the `$(<name>)`-syntax.
2189
+ * A human-readable string which is rendered prominently.
2190
+ *
2191
+ * Supports rendering of {@link ThemeIcon theme icons} via the `$(<name>)`-syntax.
2192
+ *
2193
+ * **Note:** When {@link QuickPickItem.kind kind} is set to {@link QuickPickItemKind.Default} (so a regular
2194
+ * item instead of a separator), it supports rendering of {@link ThemeIcon theme icons} via the
2195
+ * `$(<name>)`-syntax.
2191
2196
  */
2192
2197
  label: string;
2193
2198
 
2194
2199
  /**
2195
- * Defaults to {@link QuickPickItemKind.Default}. If set to {@link QUickPickItemKind.Separator}, the item will not be displayed as a row but only as a separator,
2196
- * and all fields other than {@link QuickPickItem.label label} will be ignored.
2200
+ * The kind of this item that determines how it is rendered in the quick pick.
2201
+ *
2202
+ * When not specified, the default is {@link QuickPickItemKind.Default}.
2197
2203
  */
2198
2204
  kind?: QuickPickItemKind;
2199
2205
 
2200
2206
  /**
2201
- * The icon path or {@link ThemeIcon} for the QuickPickItem.
2207
+ * The icon for the item.
2202
2208
  */
2203
2209
  iconPath?: IconPath;
2204
2210
 
2205
2211
  /**
2206
- * A human-readable string which is rendered less prominent in the same line. Supports rendering of
2207
- * {@link ThemeIcon theme icons} via the `$(<name>)`-syntax.
2212
+ * A human-readable string which is rendered less prominently in the same line.
2208
2213
  *
2209
- * Note: this property is ignored when {@link QuickPickItem.kind kind} is set to {@link QuickPickItemKind.Separator}
2214
+ * Supports rendering of {@link ThemeIcon theme icons} via the `$(<name>)`-syntax.
2215
+ *
2216
+ * **Note:** This property is ignored when {@link QuickPickItem.kind kind} is set to
2217
+ * {@link QuickPickItemKind.Separator}.
2210
2218
  */
2211
2219
  description?: string;
2212
2220
 
2213
2221
  /**
2214
- * A human-readable string which is rendered less prominent in a separate line. Supports rendering of
2215
- * {@link ThemeIcon theme icons} via the `$(<name>)`-syntax.
2222
+ * A human-readable string which is rendered less prominently in a separate line.
2223
+ *
2224
+ * Supports rendering of {@link ThemeIcon theme icons} via the `$(<name>)`-syntax.
2216
2225
  *
2217
- * Note: this property is ignored when {@link QuickPickItem.kind kind} is set to {@link QuickPickItemKind.Separator}
2226
+ * **Note:** This property is ignored when {@link QuickPickItem.kind kind} is set to
2227
+ * {@link QuickPickItemKind.Separator}.
2218
2228
  */
2219
2229
  detail?: string;
2220
2230
 
2221
2231
  /**
2222
- * Optional flag indicating if this item is picked initially. This is only honored when using
2223
- * the {@link window.showQuickPick()} API. To do the same thing with the {@link window.createQuickPick()} API,
2224
- * simply set the {@link QuickPick.selectedItems} to the items you want picked initially.
2225
- * (*Note:* This is only honored when the picker allows multiple selections.)
2232
+ * A {@link Uri} representing the resource associated with this item.
2233
+ *
2234
+ * When set, this property is used to automatically derive several item properties if they are not explicitly provided:
2235
+ * - **Label**: Derived from the resource's file name when {@link QuickPickItem.label label} is not provided or is empty.
2236
+ * - **Description**: Derived from the resource's path when {@link QuickPickItem.description description} is not provided or is empty.
2237
+ * - **Icon**: Derived from the current file icon theme when {@link QuickPickItem.iconPath iconPath} is set to
2238
+ * {@link ThemeIcon.File} or {@link ThemeIcon.Folder}.
2239
+ */
2240
+ resourceUri?: Uri;
2241
+
2242
+ /**
2243
+ * Optional flag indicating if this item is initially selected.
2244
+ *
2245
+ * This is only honored when using the {@link window.showQuickPick showQuickPick} API. To do the same
2246
+ * thing with the {@link window.createQuickPick createQuickPick} API, simply set the
2247
+ * {@link QuickPick.selectedItems selectedItems} to the items you want selected initially.
2248
+ *
2249
+ * **Note:** This is only honored when the picker allows multiple selections.
2226
2250
  *
2227
2251
  * @see {@link QuickPickOptions.canPickMany}
2228
2252
  *
2229
- * Note: this property is ignored when {@link QuickPickItem.kind kind} is set to {@link QuickPickItemKind.Separator}
2253
+ * **Note:** This property is ignored when {@link QuickPickItem.kind kind} is set to
2254
+ * {@link QuickPickItemKind.Separator}.
2230
2255
  */
2231
2256
  picked?: boolean;
2232
2257
 
2233
2258
  /**
2234
- * Always show this item.
2259
+ * Determines if this item is always shown, even when filtered out by the user's input.
2235
2260
  *
2236
- * Note: this property is ignored when {@link QuickPickItem.kind kind} is set to {@link QuickPickItemKind.Separator}
2261
+ * **Note:** This property is ignored when {@link QuickPickItem.kind kind} is set to
2262
+ * {@link QuickPickItemKind.Separator}.
2237
2263
  */
2238
2264
  alwaysShow?: boolean;
2239
2265
 
2240
2266
  /**
2241
- * Optional buttons that will be rendered on this particular item. These buttons will trigger
2242
- * an {@link QuickPickItemButtonEvent} when clicked. Buttons are only rendered when using a quickpick
2243
- * created by the {@link window.createQuickPick()} API. Buttons are not rendered when using
2244
- * the {@link window.showQuickPick()} API.
2267
+ * Optional buttons that will be rendered on this particular item.
2268
+ *
2269
+ * These buttons will trigger an {@link QuickPickItemButtonEvent} when pressed. Buttons are only rendered
2270
+ * when using a quick pick created by the {@link window.createQuickPick createQuickPick} API. Buttons are
2271
+ * not rendered when using the {@link window.showQuickPick showQuickPick} API.
2245
2272
  *
2246
- * Note: this property is ignored when {@link QuickPickItem.kind kind} is set to {@link QuickPickItemKind.Separator}
2273
+ * **Note:** This property is ignored when {@link QuickPickItem.kind kind} is set to
2274
+ * {@link QuickPickItemKind.Separator}.
2247
2275
  */
2248
2276
  buttons?: readonly QuickInputButton[];
2249
2277
  }
2250
2278
 
2251
2279
  /**
2252
- * The type of a {@link QuickPickItem quick pick item}. If `Separator` is set, all fields other than {@link QuickPickItem.label label} will be ignored.
2280
+ * Defines the kind of {@link QuickPickItem quick pick item}.
2253
2281
  */
2254
2282
  export enum QuickPickItemKind {
2283
+ /**
2284
+ * A separator item that provides a visual grouping.
2285
+ *
2286
+ * When a {@link QuickPickItem} has a kind of {@link Separator}, the item is just a visual separator
2287
+ * and does not represent a selectable item. The only property that applies is
2288
+ * {@link QuickPickItem.label label}. All other properties on {@link QuickPickItem} will be ignored
2289
+ * and have no effect.
2290
+ */
2255
2291
  Separator = -1,
2292
+ /**
2293
+ * The default kind for an item that can be selected in the quick pick.
2294
+ */
2256
2295
  Default = 0,
2257
2296
  }
2258
2297
 
2259
2298
  /**
2260
- * A concrete {@link QuickInput QuickInput} to let the user pick an item from a
2261
- * list of items of type T. The items can be filtered through a filter text field and
2262
- * there is an option {@link QuickPick.canSelectMany canSelectMany} to allow for
2263
- * selecting multiple items.
2299
+ * A concrete {@link QuickInput} to let the user pick an item from a list of items of type `T`.
2300
+ *
2301
+ * The items can be filtered through a filter text field and there is an option
2302
+ * {@link QuickPick.canSelectMany canSelectMany} to allow for selecting multiple items.
2264
2303
  *
2265
- * Note that in many cases the more convenient [window.showQuickPick](#window.showQuickPick)
2266
- * is easier to use. [window.createQuickPick](#window.createQuickPick) should be used
2267
- * when [window.showQuickPick](#window.showQuickPick) does not offer the required flexibility.
2304
+ * Note that in many cases the more convenient {@link window.showQuickPick} is easier to use.
2305
+ * {@link window.createQuickPick} should be used when {@link window.showQuickPick} does not offer
2306
+ * the required flexibility.
2268
2307
  */
2269
2308
  export interface QuickPick<T extends QuickPickItem> extends QuickInput {
2270
2309
 
2271
2310
  /**
2272
- * Current value of the filter text.
2311
+ * The current value of the filter text.
2273
2312
  */
2274
2313
  value: string;
2275
2314
 
2276
2315
  /**
2277
- * Optional placeholder in the filter text.
2316
+ * Optional placeholder text displayed in the filter text box when no value has been entered.
2278
2317
  */
2279
2318
  placeholder: string | undefined;
2280
2319
 
2320
+ /**
2321
+ * Optional text that provides instructions or context to the user.
2322
+ *
2323
+ * The prompt is displayed below the input box and above the list of items.
2324
+ */
2325
+ prompt: string | undefined;
2326
+
2281
2327
  /**
2282
2328
  * An event signaling when the value of the filter text has changed.
2283
2329
  */
@@ -2291,41 +2337,45 @@ export module '@theia/plugin' {
2291
2337
  /**
2292
2338
  * Buttons for actions in the UI.
2293
2339
  */
2294
- buttons: ReadonlyArray<QuickInputButton>;
2340
+ buttons: readonly QuickInputButton[];
2295
2341
 
2296
2342
  /**
2297
2343
  * An event signaling when a button was triggered.
2344
+ *
2345
+ * This event fires for buttons stored in the {@link QuickPick.buttons buttons} array. This event does
2346
+ * not fire for buttons on a {@link QuickPickItem}.
2298
2347
  */
2299
2348
  readonly onDidTriggerButton: Event<QuickInputButton>;
2300
2349
 
2301
2350
  /**
2302
2351
  * An event signaling when a button in a particular {@link QuickPickItem} was triggered.
2303
- * This event does not fire for buttons in the title bar.
2352
+ *
2353
+ * This event does not fire for buttons in the title bar which are part of {@link QuickPick.buttons buttons}.
2304
2354
  */
2305
2355
  readonly onDidTriggerItemButton: Event<QuickPickItemButtonEvent<T>>;
2306
2356
 
2307
2357
  /**
2308
- * Items to pick from.
2358
+ * Items to pick from. This can be read and updated by the extension.
2309
2359
  */
2310
2360
  items: readonly T[];
2311
2361
 
2312
2362
  /**
2313
- * If multiple items can be selected at the same time. Defaults to false.
2363
+ * Determines if multiple items can be selected at the same time. Defaults to `false`.
2314
2364
  */
2315
2365
  canSelectMany: boolean;
2316
2366
 
2317
2367
  /**
2318
- * If the filter text should also be matched against the description of the items. Defaults to false.
2368
+ * Determines if the filter text should also be matched against the {@link QuickPickItem.description description} of the items. Defaults to `false`.
2319
2369
  */
2320
2370
  matchOnDescription: boolean;
2321
2371
 
2322
2372
  /**
2323
- * If the filter text should also be matched against the detail of the items. Defaults to false.
2373
+ * Determines if the filter text should also be matched against the {@link QuickPickItem.detail detail} of the items. Defaults to `false`.
2324
2374
  */
2325
2375
  matchOnDetail: boolean;
2326
2376
 
2327
- /*
2328
- * An optional flag to maintain the scroll position of the quick pick when the quick pick items are updated. Defaults to false.
2377
+ /**
2378
+ * Determines if the scroll position is maintained when the quick pick items are updated. Defaults to `false`.
2329
2379
  */
2330
2380
  keepScrollPosition?: boolean;
2331
2381
 
@@ -2351,84 +2401,104 @@ export module '@theia/plugin' {
2351
2401
  }
2352
2402
 
2353
2403
  /**
2354
- * Options for configuration behavior of the quick pick
2404
+ * Options to configure the behavior of the quick pick UI.
2355
2405
  */
2356
2406
  export interface QuickPickOptions {
2407
+
2357
2408
  /**
2358
- * An optional string that represents the title of the quick pick.
2409
+ * An optional title for the quick pick.
2359
2410
  */
2360
2411
  title?: string;
2361
2412
 
2362
2413
  /**
2363
- * A flag to include the description when filtering
2414
+ * Determines if the {@link QuickPickItem.description description} should be included when filtering items. Defaults to `false`.
2364
2415
  */
2365
2416
  matchOnDescription?: boolean;
2366
2417
 
2367
2418
  /**
2368
- * A flag to include the detail when filtering
2419
+ * Determines if the {@link QuickPickItem.detail detail} should be included when filtering items. Defaults to `false`.
2369
2420
  */
2370
2421
  matchOnDetail?: boolean;
2371
2422
 
2372
2423
  /**
2373
- * The place holder in input box
2424
+ * An optional string to show as placeholder in the input box to guide the user.
2374
2425
  */
2375
2426
  placeHolder?: string;
2376
2427
 
2377
2428
  /**
2378
- * If `true` prevent picker closing when it's loses focus
2429
+ * Optional text that provides instructions or context to the user.
2430
+ *
2431
+ * The prompt is displayed below the input box and above the list of items.
2432
+ */
2433
+ prompt?: string;
2434
+
2435
+ /**
2436
+ * Set to `true` to keep the picker open when focus moves to another part of the editor or to another window.
2437
+ * This setting is ignored on iPad and is always `false`.
2379
2438
  */
2380
2439
  ignoreFocusOut?: boolean;
2381
2440
 
2382
2441
  /**
2383
- * If `true` make picker accept multiple selections.
2384
- * Not implemented yet
2442
+ * Determines if the picker allows multiple selections. When `true`, the result is an array of picks.
2385
2443
  */
2386
2444
  canPickMany?: boolean;
2387
2445
 
2388
2446
  /**
2389
- * Function that is invoked when item selected
2447
+ * An optional function that is invoked whenever an item is selected.
2390
2448
  */
2391
2449
  onDidSelectItem?(item: QuickPickItem | string): any;
2392
2450
  }
2393
2451
 
2394
2452
  /**
2395
- * Options to configure the behaviour of the {@link WorkspaceFolder workspace folder} pick UI.
2453
+ * Options to configure the behavior of the {@link WorkspaceFolder workspace folder} pick UI.
2396
2454
  */
2397
2455
  export interface WorkspaceFolderPickOptions {
2398
2456
 
2399
2457
  /**
2400
- * An optional string to show as place holder in the input box to guide the user what to pick on.
2458
+ * An optional string to show as placeholder in the input box to guide the user.
2401
2459
  */
2402
2460
  placeHolder?: string;
2403
2461
 
2404
2462
  /**
2405
2463
  * Set to `true` to keep the picker open when focus moves to another part of the editor or to another window.
2464
+ * This setting is ignored on iPad and is always `false`.
2406
2465
  */
2407
2466
  ignoreFocusOut?: boolean;
2408
2467
  }
2409
2468
 
2410
2469
  /**
2411
- * Impacts the behavior and appearance of the validation message.
2470
+ * Severity levels for input box validation messages.
2412
2471
  */
2413
2472
  export enum InputBoxValidationSeverity {
2473
+ /**
2474
+ * Indicates an informational message that does not prevent input acceptance.
2475
+ */
2414
2476
  Info = 1,
2477
+ /**
2478
+ * Indicates a warning message that does not prevent input acceptance.
2479
+ */
2415
2480
  Warning = 2,
2481
+ /**
2482
+ * Indicates an error message that prevents the user from accepting the input.
2483
+ */
2416
2484
  Error = 3
2417
2485
  }
2418
2486
 
2419
2487
  /**
2420
- * Object to configure the behavior of the validation message.
2488
+ * Represents a validation message for an {@link InputBox}.
2421
2489
  */
2422
2490
  export interface InputBoxValidationMessage {
2423
2491
  /**
2424
- * The validation message to display.
2492
+ * The validation message to display to the user.
2425
2493
  */
2426
2494
  readonly message: string;
2427
2495
 
2428
2496
  /**
2429
- * The severity of the validation message.
2430
- * NOTE: When using `InputBoxValidationSeverity.Error`, the user will not be allowed to accept (hit ENTER) the input.
2431
- * `Info` and `Warning` will still allow the InputBox to accept the input.
2497
+ * The severity level of the validation message.
2498
+ *
2499
+ * **Note:** When using {@link InputBoxValidationSeverity.Error}, the user will not be able to accept
2500
+ * the input (e.g., by pressing Enter). {@link InputBoxValidationSeverity.Info Info} and
2501
+ * {@link InputBoxValidationSeverity.Warning Warning} severities will still allow the input to be accepted.
2432
2502
  */
2433
2503
  readonly severity: InputBoxValidationSeverity;
2434
2504
  }
@@ -2977,7 +3047,7 @@ export module '@theia/plugin' {
2977
3047
  }
2978
3048
 
2979
3049
  /**
2980
- * Options to configure the behaviour of a file open dialog.
3050
+ * Options to configure the behavior of a file open dialog.
2981
3051
  *
2982
3052
  * * Note 1: A dialog can select files, folders, or both. This is not true for Windows
2983
3053
  * which enforces to open either files or folder, but *not both*.
@@ -3181,7 +3251,7 @@ export module '@theia/plugin' {
3181
3251
  *
3182
3252
  * Note that the possible values are currently defined as any of the following:
3183
3253
  * 'bash', 'cmd', 'csh', 'fish', 'gitbash', 'julia', 'ksh', 'node', 'nu', 'pwsh', 'python',
3184
- * 'sh', 'wsl', 'zsh'.
3254
+ * 'sh', 'wsl', 'xonsh', 'zsh'.
3185
3255
  */
3186
3256
  readonly shell: string | undefined;
3187
3257
  }
@@ -4759,7 +4829,7 @@ export module '@theia/plugin' {
4759
4829
  /**
4760
4830
  * A panel that contains a webview.
4761
4831
  */
4762
- interface WebviewPanel {
4832
+ export interface WebviewPanel {
4763
4833
  /**
4764
4834
  * Identifies the type of the webview panel, such as `'markdown.preview'`.
4765
4835
  */
@@ -4773,10 +4843,10 @@ export module '@theia/plugin' {
4773
4843
  /**
4774
4844
  * Icon for the panel shown in UI.
4775
4845
  */
4776
- iconPath?: Uri | { light: Uri; dark: Uri };
4846
+ iconPath?: IconPath;
4777
4847
 
4778
4848
  /**
4779
- * Webview belonging to the panel.
4849
+ * {@linkcode Webview} belonging to the panel.
4780
4850
  */
4781
4851
  readonly webview: Webview;
4782
4852
 
@@ -4785,15 +4855,11 @@ export module '@theia/plugin' {
4785
4855
  */
4786
4856
  readonly options: WebviewPanelOptions;
4787
4857
 
4788
- /**
4789
- * Settings to determine where webview panel will be reside
4790
- */
4791
- readonly showOptions?: WebviewPanelShowOptions;
4792
4858
  /**
4793
4859
  * Editor position of the panel. This property is only set if the webview is in
4794
4860
  * one of the editor view columns.
4795
4861
  */
4796
- readonly viewColumn?: ViewColumn;
4862
+ readonly viewColumn: ViewColumn | undefined;
4797
4863
 
4798
4864
  /**
4799
4865
  * Whether the panel is active (focused by the user).
@@ -5547,7 +5613,7 @@ export module '@theia/plugin' {
5547
5613
  * @param items An array of strings, or a promise that resolves to an array of strings.
5548
5614
  * @param options Configures the behavior of the selection list.
5549
5615
  * @param token A token that can be used to signal cancellation.
5550
- * @return A promise that resolves to the selection or `undefined`.
5616
+ * @returns A thenable that resolves to the selected items or `undefined`.
5551
5617
  */
5552
5618
  export function showQuickPick(items: readonly string[] | Thenable<readonly string[]>, options?: QuickPickOptions, token?: CancellationToken): Thenable<string | undefined>;
5553
5619
 
@@ -5557,7 +5623,7 @@ export module '@theia/plugin' {
5557
5623
  * @param items An array of strings, or a promise that resolves to an array of strings.
5558
5624
  * @param options Configures the behavior of the selection list.
5559
5625
  * @param token A token that can be used to signal cancellation.
5560
- * @return A promise that resolves to the selected items or `undefined`.
5626
+ * @returns A thenable that resolves to the selected string or `undefined`.
5561
5627
  */
5562
5628
  export function showQuickPick(items: readonly string[] | Thenable<readonly string[]>, options: QuickPickOptions & { canPickMany: true }, token?: CancellationToken): Thenable<string[] | undefined>;
5563
5629
 
@@ -5567,7 +5633,7 @@ export module '@theia/plugin' {
5567
5633
  * @param items An array of items, or a promise that resolves to an array of items.
5568
5634
  * @param options Configures the behavior of the selection list.
5569
5635
  * @param token A token that can be used to signal cancellation.
5570
- * @return A promise that resolves to the selected item or `undefined`.
5636
+ * @returns A thenable that resolves to the selected item or `undefined`.
5571
5637
  */
5572
5638
  export function showQuickPick<T extends QuickPickItem>(items: readonly T[] | Thenable<readonly T[]>, options?: QuickPickOptions, token?: CancellationToken): Thenable<T | undefined>;
5573
5639
 
@@ -5582,14 +5648,13 @@ export module '@theia/plugin' {
5582
5648
  export function showQuickPick<T extends QuickPickItem>(items: readonly T[] | Thenable<readonly T[]>, options: QuickPickOptions & { canPickMany: true }, token?: CancellationToken): Thenable<T[] | undefined>;
5583
5649
 
5584
5650
  /**
5585
- * Creates a {@link QuickPick QuickPick} to let the user pick an item from a list
5586
- * of items of type T.
5651
+ * Creates a {@link QuickPick} to let the user pick an item from a list of items of type `T`.
5587
5652
  *
5588
- * Note that in many cases the more convenient [window.showQuickPick](#window.showQuickPick)
5589
- * is easier to use. [window.createQuickPick](#window.createQuickPick) should be used
5590
- * when [window.showQuickPick](#window.showQuickPick) does not offer the required flexibility.
5653
+ * Note that in many cases the more convenient {@link window.showQuickPick} is easier to use.
5654
+ * {@link window.createQuickPick} should be used when {@link window.showQuickPick} does not offer
5655
+ * the required flexibility.
5591
5656
  *
5592
- * @return A new {@link QuickPick QuickPick}.
5657
+ * @returns A new {@link QuickPick}.
5593
5658
  */
5594
5659
  export function createQuickPick<T extends QuickPickItem>(): QuickPick<T>;
5595
5660
 
@@ -5719,13 +5784,13 @@ export module '@theia/plugin' {
5719
5784
  /**
5720
5785
  * Opens an input box to ask the user for input.
5721
5786
  *
5722
- * The returned value will be `undefined` if the input box was canceled (e.g. pressing ESC). Otherwise the
5787
+ * The returned value will be `undefined` if the input box was canceled (e.g., pressing ESC). Otherwise the
5723
5788
  * returned value will be the string typed by the user or an empty string if the user did not type
5724
5789
  * anything but dismissed the input box with OK.
5725
5790
  *
5726
5791
  * @param options Configures the behavior of the input box.
5727
5792
  * @param token A token that can be used to signal cancellation.
5728
- * @return A promise that resolves to a string the user provided or to `undefined` in case of dismissal.
5793
+ * @returns A thenable that resolves to a string the user provided or to `undefined` in case of dismissal.
5729
5794
  */
5730
5795
  export function showInputBox(options?: InputBoxOptions, token?: CancellationToken): Thenable<string | undefined>;
5731
5796
 
@@ -6070,13 +6135,13 @@ export module '@theia/plugin' {
6070
6135
  export function withProgress<R>(options: ProgressOptions, task: (progress: Progress<{ message?: string; increment?: number }>, token: CancellationToken) => Thenable<R>): Thenable<R>;
6071
6136
 
6072
6137
  /**
6073
- * Creates a {@link InputBox InputBox} to let the user enter some text input.
6138
+ * Creates a {@link InputBox} to let the user enter some text input.
6074
6139
  *
6075
- * Note that in many cases the more convenient [window.showInputBox](#window.showInputBox)
6076
- * is easier to use. [window.createInputBox](#window.createInputBox) should be used
6077
- * when [window.showInputBox](#window.showInputBox) does not offer the required flexibility.
6140
+ * Note that in many cases the more convenient {@link window.showInputBox} is easier to use.
6141
+ * {@link window.createInputBox} should be used when {@link window.showInputBox} does not offer
6142
+ * the required flexibility.
6078
6143
  *
6079
- * @return A new {@link InputBox InputBox}.
6144
+ * @returns A new {@link InputBox}.
6080
6145
  */
6081
6146
  export function createInputBox(): InputBox;
6082
6147
 
@@ -6134,15 +6199,14 @@ export module '@theia/plugin' {
6134
6199
  }
6135
6200
 
6136
6201
  /**
6137
- * Predefined buttons for {@link QuickPick QuickPick} and {@link InputBox InputBox}.
6202
+ * Predefined buttons for {@link QuickPick} and {@link InputBox}.
6138
6203
  */
6139
6204
  export class QuickInputButtons {
6140
-
6141
6205
  /**
6142
- * A back button for {@link QuickPick QuickPick} and {@link InputBox InputBox}.
6206
+ * A predefined back button for {@link QuickPick} and {@link InputBox}.
6143
6207
  *
6144
- * When a navigation 'back' button is needed this one should be used for consistency.
6145
- * It comes with a predefined icon, tooltip and location.
6208
+ * This button should be used for consistency when a navigation back button is needed. It comes
6209
+ * with a predefined icon, tooltip, and location.
6146
6210
  */
6147
6211
  static readonly Back: QuickInputButton;
6148
6212
 
@@ -6153,12 +6217,11 @@ export module '@theia/plugin' {
6153
6217
  }
6154
6218
 
6155
6219
  /**
6156
- * An event signaling when a button in a particular {@link QuickPickItem} was triggered.
6157
- * This event does not fire for buttons in the title bar.
6220
+ * An event describing a button that was pressed on a {@link QuickPickItem}.
6158
6221
  */
6159
6222
  export interface QuickPickItemButtonEvent<T extends QuickPickItem> {
6160
6223
  /**
6161
- * The button that was clicked.
6224
+ * The button that was pressed.
6162
6225
  */
6163
6226
  readonly button: QuickInputButton;
6164
6227
  /**
@@ -6168,39 +6231,40 @@ export module '@theia/plugin' {
6168
6231
  }
6169
6232
 
6170
6233
  /**
6171
- * A concrete {@link QuickInput QuickInput} to let the user input a text value.
6234
+ * A concrete {@link QuickInput} to let the user input a text value.
6172
6235
  *
6173
- * Note that in many cases the more convenient [window.showInputBox](#window.showInputBox)
6174
- * is easier to use. [window.createInputBox](#window.createInputBox) should be used
6175
- * when [window.showInputBox](#window.showInputBox) does not offer the required flexibility.
6236
+ * Note that in many cases the more convenient {@link window.showInputBox} is easier to use.
6237
+ * {@link window.createInputBox} should be used when {@link window.showInputBox} does not offer
6238
+ * the required flexibility.
6176
6239
  */
6177
6240
  export interface InputBox extends QuickInput {
6178
6241
 
6179
6242
  /**
6180
- * Current input value.
6243
+ * The current input value.
6181
6244
  */
6182
6245
  value: string;
6183
6246
 
6184
6247
  /**
6185
- * Optional placeholder in the filter text.
6248
+ * Selection range in the input value.
6249
+ *
6250
+ * Defined as tuple of two numbers where the first is the inclusive start index and the second the
6251
+ * exclusive end index. When `undefined` the whole pre-filled value will be selected, when empty
6252
+ * (start equals end) only the cursor will be set, otherwise the defined range will be selected.
6253
+ *
6254
+ * This property does not get updated when the user types or makes a selection, but it can be updated
6255
+ * by the extension.
6186
6256
  */
6187
- placeholder: string | undefined;
6257
+ valueSelection: readonly [number, number] | undefined;
6188
6258
 
6189
6259
  /**
6190
- * If the input value should be hidden. Defaults to false.
6260
+ * Optional placeholder text shown when no value has been input.
6191
6261
  */
6192
- password: boolean;
6262
+ placeholder: string | undefined;
6193
6263
 
6194
6264
  /**
6195
- * Selection range in the input value. Defined as tuple of two number where the
6196
- * first is the inclusive start index and the second the exclusive end index. When `undefined` the whole
6197
- * pre-filled value will be selected, when empty (start equals end) only the cursor will be set,
6198
- * otherwise the defined range will be selected.
6199
- *
6200
- * This property does not get updated when the user types or makes a selection,
6201
- * but it can be updated by the extension.
6265
+ * Determines if the input value should be hidden. Defaults to `false`.
6202
6266
  */
6203
- valueSelection: readonly [number, number] | undefined;
6267
+ password: boolean;
6204
6268
 
6205
6269
  /**
6206
6270
  * An event signaling when the value has changed.
@@ -6229,114 +6293,115 @@ export module '@theia/plugin' {
6229
6293
 
6230
6294
  /**
6231
6295
  * An optional validation message indicating a problem with the current input value.
6232
- * By returning a string, the InputBox will use a default {@link InputBoxValidationSeverity} of Error.
6233
- * Returning undefined clears the validation message.
6296
+ *
6297
+ * By setting a string, the InputBox will use a default {@link InputBoxValidationSeverity} of Error.
6298
+ * Returning `undefined` clears the validation message.
6234
6299
  */
6235
6300
  validationMessage: string | InputBoxValidationMessage | undefined;
6236
6301
  }
6237
6302
 
6238
6303
  /**
6239
- * A light-weight user input UI that is initially not visible. After
6240
- * configuring it through its properties the extension can make it
6241
- * visible by calling [QuickInput.show](#QuickInput.show).
6304
+ * The base interface for all quick input types.
6305
+ *
6306
+ * Quick input provides a unified way for extensions to interact with users through simple UI elements.
6307
+ * A quick input UI is initially not visible. After configuring it through its properties the extension
6308
+ * can make it visible by calling {@link QuickInput.show show}.
6242
6309
  *
6243
- * There are several reasons why this UI might have to be hidden and
6244
- * the extension will be notified through [QuickInput.onDidHide](#QuickInput.onDidHide).
6245
- * (Examples include: an explicit call to [QuickInput.hide](#QuickInput.hide),
6246
- * the user pressing Esc, some other input UI opening, etc.)
6310
+ * There are several reasons why this UI might have to be hidden and the extension will be notified
6311
+ * through {@link QuickInput.onDidHide onDidHide}. Examples include: an explicit call to
6312
+ * {@link QuickInput.hide hide}, the user pressing Esc, some other input UI opening, etc.
6247
6313
  *
6248
- * A user pressing Enter or some other gesture implying acceptance
6249
- * of the current state does not automatically hide this UI component.
6250
- * It is up to the extension to decide whether to accept the user's input
6251
- * and if the UI should indeed be hidden through a call to [QuickInput.hide](#QuickInput.hide).
6314
+ * A user pressing Enter or some other gesture implying acceptance of the current state does not
6315
+ * automatically hide this UI component. It is up to the extension to decide whether to accept the
6316
+ * user's input and if the UI should indeed be hidden through a call to {@link QuickInput.hide hide}.
6252
6317
  *
6253
- * When the extension no longer needs this input UI, it should
6254
- * [QuickInput.dispose](#QuickInput.dispose) it to allow for freeing up
6255
- * any resources associated with it.
6318
+ * When the extension no longer needs this input UI, it should {@link QuickInput.dispose dispose} it
6319
+ * to allow for freeing up any resources associated with it.
6256
6320
  *
6257
- * See {@link QuickPick QuickPick} and {@link InputBox InputBox} for concrete UIs.
6321
+ * See {@link QuickPick} and {@link InputBox} for concrete UIs.
6258
6322
  */
6259
6323
  export interface QuickInput {
6260
6324
 
6261
6325
  /**
6262
- * An optional title.
6326
+ * An optional title for the input UI.
6263
6327
  */
6264
6328
  title: string | undefined;
6265
6329
 
6266
6330
  /**
6267
- * An optional current step count.
6331
+ * An optional current step count for multi-step input flows.
6268
6332
  */
6269
6333
  step: number | undefined;
6270
6334
 
6271
6335
  /**
6272
- * An optional total step count.
6336
+ * An optional total step count for multi-step input flows.
6273
6337
  */
6274
6338
  totalSteps: number | undefined;
6275
6339
 
6276
6340
  /**
6277
- * If the UI should allow for user input. Defaults to true.
6341
+ * Determines if the UI should allow for user input. Defaults to `true`.
6278
6342
  *
6279
- * Change this to false, e.g., while validating user input or
6280
- * loading data for the next step in user input.
6343
+ * Change this to `false`, for example, while validating user input or loading data for the next
6344
+ * step in user input.
6281
6345
  */
6282
6346
  enabled: boolean;
6283
6347
 
6284
6348
  /**
6285
- * If the UI should show a progress indicator. Defaults to false.
6349
+ * Determines if the UI should show a progress indicator. Defaults to `false`.
6286
6350
  *
6287
- * Change this to true, e.g., while loading more data or validating
6288
- * user input.
6351
+ * Change this to `true`, for example, while loading more data or validating user input.
6289
6352
  */
6290
6353
  busy: boolean;
6291
6354
 
6292
6355
  /**
6293
- * If the UI should stay open even when loosing UI focus. Defaults to false.
6356
+ * Determines if the UI should stay open even when losing UI focus. Defaults to `false`.
6357
+ * This setting is ignored on iPad and is always `false`.
6294
6358
  */
6295
6359
  ignoreFocusOut: boolean;
6296
6360
 
6297
6361
  /**
6298
- * Makes the input UI visible in its current configuration. Any other input
6299
- * UI will first fire an [QuickInput.onDidHide](#QuickInput.onDidHide) event.
6362
+ * Makes the input UI visible in its current configuration.
6363
+ *
6364
+ * Any other input UI will first fire an {@link QuickInput.onDidHide onDidHide} event.
6300
6365
  */
6301
6366
  show(): void;
6302
6367
 
6303
6368
  /**
6304
- * Hides this input UI. This will also fire an [QuickInput.onDidHide](#QuickInput.onDidHide)
6305
- * event.
6369
+ * Hides this input UI.
6370
+ *
6371
+ * This will also fire an {@link QuickInput.onDidHide onDidHide} event.
6306
6372
  */
6307
6373
  hide(): void;
6308
6374
 
6309
6375
  /**
6310
6376
  * An event signaling when this input UI is hidden.
6311
6377
  *
6312
- * There are several reasons why this UI might have to be hidden and
6313
- * the extension will be notified through [QuickInput.onDidHide](#QuickInput.onDidHide).
6314
- * (Examples include: an explicit call to [QuickInput.hide](#QuickInput.hide),
6315
- * the user pressing Esc, some other input UI opening, etc.)
6378
+ * There are several reasons why this UI might have to be hidden and the extension will be notified
6379
+ * through {@link QuickInput.onDidHide onDidHide}. Examples include: an explicit call to
6380
+ * {@link QuickInput.hide hide}, the user pressing Esc, some other input UI opening, etc.
6316
6381
  */
6317
6382
  readonly onDidHide: Event<void>;
6318
6383
 
6319
6384
  /**
6320
- * Dispose of this input UI and any associated resources. If it is still
6321
- * visible, it is first hidden. After this call the input UI is no longer
6322
- * functional and no additional methods or properties on it should be
6323
- * accessed. Instead a new input UI should be created.
6385
+ * Dispose of this input UI and any associated resources.
6386
+ *
6387
+ * If it is still visible, it is first hidden. After this call the input UI is no longer functional
6388
+ * and no additional methods or properties on it should be accessed. Instead a new input UI should
6389
+ * be created.
6324
6390
  */
6325
6391
  dispose(): void;
6326
6392
  }
6327
6393
 
6328
6394
  /**
6329
- * Button for an action in a {@link QuickPick QuickPick} or {@link InputBox InputBox}.
6395
+ * A button for an action in a {@link QuickPick} or {@link InputBox}.
6330
6396
  */
6331
6397
  export interface QuickInputButton {
6332
-
6333
6398
  /**
6334
- * Icon for the button.
6399
+ * The icon for the button.
6335
6400
  */
6336
6401
  readonly iconPath: IconPath;
6337
6402
 
6338
6403
  /**
6339
- * An optional tooltip.
6404
+ * An optional tooltip displayed when hovering over the button.
6340
6405
  */
6341
6406
  readonly tooltip?: string | undefined;
6342
6407
  }
@@ -6956,10 +7021,13 @@ export module '@theia/plugin' {
6956
7021
  description?: string | boolean;
6957
7022
 
6958
7023
  /**
6959
- * The {@link Uri uri} of the resource representing this item.
7024
+ * A {@link Uri} representing the resource associated with this item.
6960
7025
  *
6961
- * Will be used to derive the {@link TreeItem.label label}, when it is not provided.
6962
- * Will be used to derive the icon from current icon theme, when {@link TreeItem.iconPath iconPath} has {@link ThemeIcon ThemeIcon} value.
7026
+ * When set, this property is used to automatically derive several item properties if they are not explicitly provided:
7027
+ * - **Label**: Derived from the resource's file name when {@link TreeItem.label label} is not provided.
7028
+ * - **Description**: Derived from the resource's path when {@link TreeItem.description description} is set to `true`.
7029
+ * - **Icon**: Derived from the current file icon theme when {@link TreeItem.iconPath iconPath} is set to
7030
+ * {@link ThemeIcon.File} or {@link ThemeIcon.Folder}.
6963
7031
  */
6964
7032
  resourceUri?: Uri;
6965
7033
 
@@ -12556,6 +12624,29 @@ export module '@theia/plugin' {
12556
12624
  dispose(): void;
12557
12625
  }
12558
12626
 
12627
+ export interface ScmActionButton {
12628
+ /**
12629
+ * The primary command for this action button.
12630
+ */
12631
+ readonly command: Command;
12632
+
12633
+ /**
12634
+ * Secondary commands that appear in a dropdown menu.
12635
+ * Each inner array represents a group of commands (separated by dividers).
12636
+ */
12637
+ readonly secondaryCommands?: Command[][];
12638
+
12639
+ /**
12640
+ * Whether this action button is enabled.
12641
+ */
12642
+ readonly enabled: boolean;
12643
+
12644
+ /**
12645
+ * Optional description shown next to the button.
12646
+ */
12647
+ readonly description?: string;
12648
+ }
12649
+
12559
12650
  /**
12560
12651
  * An source control is able to provide {@link SourceControlResourceState resource states}
12561
12652
  * to the editor and interact with the editor in several source control related ways.
@@ -12624,6 +12715,11 @@ export module '@theia/plugin' {
12624
12715
  */
12625
12716
  createResourceGroup(id: string, label: string): SourceControlResourceGroup;
12626
12717
 
12718
+ /**
12719
+ * Optional action button displayed under the source control's input box.
12720
+ */
12721
+ actionButton?: ScmActionButton;
12722
+
12627
12723
  /**
12628
12724
  * Dispose this source control.
12629
12725
  */
@@ -15416,7 +15512,7 @@ export module '@theia/plugin' {
15416
15512
  * @returns localized string with injected arguments.
15417
15513
  * @example `l10n.t('Hello {name}', { name: 'Erich' });`
15418
15514
  */
15419
- export function t(message: string, args: Record<string, any>): string;
15515
+ export function t(message: string, args: Record<string, string | number | boolean>): string;
15420
15516
  /**
15421
15517
  * Marks a string for localization. If a localized bundle is available for the language specified by
15422
15518
  * {@link env.language} and the bundle has a localized value for this message, then that localized
@@ -15426,18 +15522,18 @@ export module '@theia/plugin' {
15426
15522
  */
15427
15523
  export function t(options: {
15428
15524
  /**
15429
- * The message to localize. If {@link args} is an array, this message supports index templating where strings like
15430
- * `{0}` and `{1}` are replaced by the item at that index in the {@link args} array. If `args` is a `Record<string, any>`,
15525
+ * The message to localize. If {@link options.args args} is an array, this message supports index templating where strings like
15526
+ * `{0}` and `{1}` are replaced by the item at that index in the {@link options.args args} array. If `args` is a `Record`,
15431
15527
  * this supports named templating where strings like `{foo}` and `{bar}` are replaced by the value in
15432
15528
  * the Record for that key (foo, bar, etc).
15433
15529
  */
15434
15530
  message: string;
15435
15531
  /**
15436
15532
  * The arguments to be used in the localized string. As an array, the index of the argument is used to
15437
- * match the template placeholder in the localized string. As a Record, the key is used to match the template
15533
+ * match the template placeholder in the localized string. As a `Record`, the key is used to match the template
15438
15534
  * placeholder in the localized string.
15439
15535
  */
15440
- args?: Array<string | number | boolean> | Record<string, any>;
15536
+ args?: Array<string | number | boolean> | Record<string, string | number | boolean>;
15441
15537
  /**
15442
15538
  * A comment to help translators understand the context of the message.
15443
15539
  */