@theia/plugin 1.24.0-next.7 → 1.24.0-next.71

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 +85 -11
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theia/plugin",
3
- "version": "1.24.0-next.7+481d2cf0edd",
3
+ "version": "1.24.0-next.71+b3d41033c29",
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": "481d2cf0edd33d8495662b9589b9232dcd6c8b34"
35
+ "gitHead": "b3d41033c29cb4f0ed8efbe969cfce41986c48e0"
36
36
  }
package/src/theia.d.ts CHANGED
@@ -1296,6 +1296,15 @@ export module '@theia/plugin' {
1296
1296
  */
1297
1297
  static parse(value: string): Uri;
1298
1298
 
1299
+ /**
1300
+ * Create an URI from its component parts
1301
+ *
1302
+ * @see {@link Uri.toString}
1303
+ * @param components The component parts of an Uri.
1304
+ * @return A new Uri instance.
1305
+ */
1306
+ static from(components: { readonly scheme: string; readonly authority?: string; readonly path?: string; readonly query?: string; readonly fragment?: string }): Uri;
1307
+
1299
1308
  /**
1300
1309
  * Use the `file` and `parse` factory functions to create new `Uri` objects.
1301
1310
  */
@@ -2070,7 +2079,11 @@ export module '@theia/plugin' {
2070
2079
  * Represents an item that can be selected from a list of items.
2071
2080
  */
2072
2081
  export interface QuickPickItem {
2073
- type?: 'item' | 'separator';
2082
+ /**
2083
+ * 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,
2084
+ * and all fields other than {@link QuickPickItem.label label} will be ignored.
2085
+ */
2086
+ kind?: QuickPickItemKind;
2074
2087
  /**
2075
2088
  * The item label
2076
2089
  */
@@ -2097,6 +2110,14 @@ export module '@theia/plugin' {
2097
2110
  alwaysShow?: boolean;
2098
2111
  }
2099
2112
 
2113
+ /**
2114
+ * The type of a {@link QuickPickItem quitk pick item}. If `Separator` is set, all fields other than {@link QuickPickItem.label label} will be ignored.
2115
+ */
2116
+ export enum QuickPickItemKind {
2117
+ Separator = -1,
2118
+ Default = 0,
2119
+ }
2120
+
2100
2121
  /**
2101
2122
  * A concrete [QuickInput](#QuickInput) to let the user pick an item from a
2102
2123
  * list of items of type T. The items can be filtered through a filter text field and
@@ -2237,6 +2258,11 @@ export module '@theia/plugin' {
2237
2258
  */
2238
2259
  export interface InputBoxOptions {
2239
2260
 
2261
+ /**
2262
+ * An optional string that represents the title of the input box.
2263
+ */
2264
+ title?: string;
2265
+
2240
2266
  /**
2241
2267
  * The value to prefill in the input box.
2242
2268
  */
@@ -2533,6 +2559,13 @@ export module '@theia/plugin' {
2533
2559
  */
2534
2560
  appendLine(value: string): void;
2535
2561
 
2562
+ /**
2563
+ * Replaces all output from the channel with the given value.
2564
+ *
2565
+ * @param value A string, falsy values will not be printed.
2566
+ */
2567
+ replace(value: string): void;
2568
+
2536
2569
  /**
2537
2570
  * Removes all output from the channel.
2538
2571
  */
@@ -6198,7 +6231,7 @@ export module '@theia/plugin' {
6198
6231
  * @return true if the operation was successfully started and false otherwise if arguments were used that would result
6199
6232
  * in invalid workspace folder state (e.g. 2 folders with the same URI).
6200
6233
  */
6201
- export function updateWorkspaceFolders(start: number, deleteCount: number | undefined | null, ...workspaceFoldersToAdd: { uri: Uri, name?: string }[]): boolean;
6234
+ export function updateWorkspaceFolders(start: number, deleteCount: number | undefined | null, ...workspaceFoldersToAdd: { readonly uri: Uri, readonly name?: string }[]): boolean;
6202
6235
 
6203
6236
  /**
6204
6237
  * ~~Register a task provider.~~
@@ -7310,6 +7343,31 @@ export module '@theia/plugin' {
7310
7343
  Deprecated = 1
7311
7344
  }
7312
7345
 
7346
+ /**
7347
+ * A structured label for a {@link CompletionItem completion item}.
7348
+ */
7349
+ export interface CompletionItemLabel {
7350
+
7351
+ /**
7352
+ * The label of this completion item.
7353
+ *
7354
+ * By default this is also the text that is inserted when this completion is selected.
7355
+ */
7356
+ label: string;
7357
+
7358
+ /**
7359
+ * An optional string which is rendered less prominently directly after {@link CompletionItemLabel.label label},
7360
+ * without any spacing. Should be used for function signatures or type annotations.
7361
+ */
7362
+ detail?: string;
7363
+
7364
+ /**
7365
+ * An optional string which is rendered less prominently after {@link CompletionItemLabel.detail}. Should be used
7366
+ * for fully qualified names or file path.
7367
+ */
7368
+ description?: string;
7369
+ }
7370
+
7313
7371
  /**
7314
7372
  * A completion item represents a text snippet that is proposed to complete text that is being typed.
7315
7373
  *
@@ -7332,7 +7390,7 @@ export module '@theia/plugin' {
7332
7390
  * this is also the text that is inserted when selecting
7333
7391
  * this completion.
7334
7392
  */
7335
- label: string;
7393
+ label: string | CompletionItemLabel;
7336
7394
 
7337
7395
  /**
7338
7396
  * The kind of this completion item. Based on the kind
@@ -7451,7 +7509,7 @@ export module '@theia/plugin' {
7451
7509
  * @param label The label of the completion.
7452
7510
  * @param kind The [kind](#CompletionItemKind) of the completion.
7453
7511
  */
7454
- constructor(label: string, kind?: CompletionItemKind);
7512
+ constructor(label: string | CompletionItemLabel, kind?: CompletionItemKind);
7455
7513
  }
7456
7514
 
7457
7515
  /**
@@ -8047,6 +8105,14 @@ export module '@theia/plugin' {
8047
8105
  */
8048
8106
  static readonly SourceOrganizeImports: CodeActionKind;
8049
8107
 
8108
+ /**
8109
+ * Base kind for auto-fix source actions: `source.fixAll`.
8110
+ *
8111
+ * Fix all actions automatically fix errors that have a clear fix that do not require user input.
8112
+ * They should not suppress errors or perform unsafe fixes such as generating new types or classes.
8113
+ */
8114
+ static readonly SourceFixAll: CodeActionKind;
8115
+
8050
8116
  private constructor(value: string);
8051
8117
 
8052
8118
  /**
@@ -10040,14 +10106,14 @@ export module '@theia/plugin' {
10040
10106
  * @param breakpoints The breakpoints to add.
10041
10107
  */
10042
10108
  // eslint-disable-next-line @typescript-eslint/no-shadow
10043
- export function addBreakpoints(breakpoints: Breakpoint[]): void;
10109
+ export function addBreakpoints(breakpoints: readonly Breakpoint[]): void;
10044
10110
 
10045
10111
  /**
10046
10112
  * Remove breakpoints.
10047
10113
  * @param breakpoints The breakpoints to remove.
10048
10114
  */
10049
10115
  // eslint-disable-next-line @typescript-eslint/no-shadow
10050
- export function removeBreakpoints(breakpoints: Breakpoint[]): void;
10116
+ export function removeBreakpoints(breakpoints: readonly Breakpoint[]): void;
10051
10117
  }
10052
10118
 
10053
10119
  /**
@@ -10444,6 +10510,13 @@ export module '@theia/plugin' {
10444
10510
  */
10445
10511
  source?: string;
10446
10512
 
10513
+ /**
10514
+ * A human-readable string which is rendered less prominently on a separate line in places
10515
+ * where the task's name is displayed. Supports rendering of {@link ThemeIcon theme icons}
10516
+ * via the `$(<name>)`-syntax.
10517
+ */
10518
+ detail?: string;
10519
+
10447
10520
  /**
10448
10521
  * The task group this tasks belongs to. See TaskGroup
10449
10522
  * for a predefined set of available groups.
@@ -10462,9 +10535,10 @@ export module '@theia/plugin' {
10462
10535
  problemMatchers?: string[];
10463
10536
  }
10464
10537
 
10465
- export class Task2 extends Task {
10466
- detail?: string;
10467
- }
10538
+ /**
10539
+ * Task2 is kept for compatibility reasons.
10540
+ */
10541
+ export class Task2 extends Task { }
10468
10542
 
10469
10543
  export interface TaskProvider<T extends Task = Task> {
10470
10544
  /**
@@ -11388,7 +11462,7 @@ export module '@theia/plugin' {
11388
11462
  * @param options The [getSessionOptions](#GetSessionOptions) to use
11389
11463
  * @returns A thenable that resolves to an authentication session
11390
11464
  */
11391
- export function getSession(providerId: string, scopes: string[], options: AuthenticationGetSessionOptions & { createIfNone: true }): Thenable<AuthenticationSession>;
11465
+ export function getSession(providerId: string, scopes: readonly string[], options: AuthenticationGetSessionOptions & { createIfNone: true }): Thenable<AuthenticationSession>;
11392
11466
 
11393
11467
  /**
11394
11468
  * Get an authentication session matching the desired scopes. Rejects if a provider with providerId is not
@@ -11416,7 +11490,7 @@ export module '@theia/plugin' {
11416
11490
  * @param options The [getSessionOptions](#GetSessionOptions) to use
11417
11491
  * @returns A thenable that resolves to an authentication session if available, or undefined if there are no sessions
11418
11492
  */
11419
- export function getSession(providerId: string, scopes: string[], options?: AuthenticationGetSessionOptions): Thenable<AuthenticationSession | undefined>;
11493
+ export function getSession(providerId: string, scopes: readonly string[], options?: AuthenticationGetSessionOptions): Thenable<AuthenticationSession | undefined>;
11420
11494
 
11421
11495
  /**
11422
11496
  * An [event](#Event) which fires when the authentication sessions of an authentication provider have