@theia/plugin 1.24.0-next.6 → 1.24.0-next.60

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 +80 -11
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theia/plugin",
3
- "version": "1.24.0-next.6+7fd85c0991f",
3
+ "version": "1.24.0-next.60+06aa90cdf45",
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": "7fd85c0991f4adc4bb79dd749aa8495df2aff1a3"
35
+ "gitHead": "06aa90cdf455319ac6e24b8bcb7f8a731898b6b4"
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
@@ -2533,6 +2554,13 @@ export module '@theia/plugin' {
2533
2554
  */
2534
2555
  appendLine(value: string): void;
2535
2556
 
2557
+ /**
2558
+ * Replaces all output from the channel with the given value.
2559
+ *
2560
+ * @param value A string, falsy values will not be printed.
2561
+ */
2562
+ replace(value: string): void;
2563
+
2536
2564
  /**
2537
2565
  * Removes all output from the channel.
2538
2566
  */
@@ -6198,7 +6226,7 @@ export module '@theia/plugin' {
6198
6226
  * @return true if the operation was successfully started and false otherwise if arguments were used that would result
6199
6227
  * in invalid workspace folder state (e.g. 2 folders with the same URI).
6200
6228
  */
6201
- export function updateWorkspaceFolders(start: number, deleteCount: number | undefined | null, ...workspaceFoldersToAdd: { uri: Uri, name?: string }[]): boolean;
6229
+ export function updateWorkspaceFolders(start: number, deleteCount: number | undefined | null, ...workspaceFoldersToAdd: { readonly uri: Uri, readonly name?: string }[]): boolean;
6202
6230
 
6203
6231
  /**
6204
6232
  * ~~Register a task provider.~~
@@ -7310,6 +7338,31 @@ export module '@theia/plugin' {
7310
7338
  Deprecated = 1
7311
7339
  }
7312
7340
 
7341
+ /**
7342
+ * A structured label for a {@link CompletionItem completion item}.
7343
+ */
7344
+ export interface CompletionItemLabel {
7345
+
7346
+ /**
7347
+ * The label of this completion item.
7348
+ *
7349
+ * By default this is also the text that is inserted when this completion is selected.
7350
+ */
7351
+ label: string;
7352
+
7353
+ /**
7354
+ * An optional string which is rendered less prominently directly after {@link CompletionItemLabel.label label},
7355
+ * without any spacing. Should be used for function signatures or type annotations.
7356
+ */
7357
+ detail?: string;
7358
+
7359
+ /**
7360
+ * An optional string which is rendered less prominently after {@link CompletionItemLabel.detail}. Should be used
7361
+ * for fully qualified names or file path.
7362
+ */
7363
+ description?: string;
7364
+ }
7365
+
7313
7366
  /**
7314
7367
  * A completion item represents a text snippet that is proposed to complete text that is being typed.
7315
7368
  *
@@ -7332,7 +7385,7 @@ export module '@theia/plugin' {
7332
7385
  * this is also the text that is inserted when selecting
7333
7386
  * this completion.
7334
7387
  */
7335
- label: string;
7388
+ label: string | CompletionItemLabel;
7336
7389
 
7337
7390
  /**
7338
7391
  * The kind of this completion item. Based on the kind
@@ -7451,7 +7504,7 @@ export module '@theia/plugin' {
7451
7504
  * @param label The label of the completion.
7452
7505
  * @param kind The [kind](#CompletionItemKind) of the completion.
7453
7506
  */
7454
- constructor(label: string, kind?: CompletionItemKind);
7507
+ constructor(label: string | CompletionItemLabel, kind?: CompletionItemKind);
7455
7508
  }
7456
7509
 
7457
7510
  /**
@@ -8047,6 +8100,14 @@ export module '@theia/plugin' {
8047
8100
  */
8048
8101
  static readonly SourceOrganizeImports: CodeActionKind;
8049
8102
 
8103
+ /**
8104
+ * Base kind for auto-fix source actions: `source.fixAll`.
8105
+ *
8106
+ * Fix all actions automatically fix errors that have a clear fix that do not require user input.
8107
+ * They should not suppress errors or perform unsafe fixes such as generating new types or classes.
8108
+ */
8109
+ static readonly SourceFixAll: CodeActionKind;
8110
+
8050
8111
  private constructor(value: string);
8051
8112
 
8052
8113
  /**
@@ -10040,14 +10101,14 @@ export module '@theia/plugin' {
10040
10101
  * @param breakpoints The breakpoints to add.
10041
10102
  */
10042
10103
  // eslint-disable-next-line @typescript-eslint/no-shadow
10043
- export function addBreakpoints(breakpoints: Breakpoint[]): void;
10104
+ export function addBreakpoints(breakpoints: readonly Breakpoint[]): void;
10044
10105
 
10045
10106
  /**
10046
10107
  * Remove breakpoints.
10047
10108
  * @param breakpoints The breakpoints to remove.
10048
10109
  */
10049
10110
  // eslint-disable-next-line @typescript-eslint/no-shadow
10050
- export function removeBreakpoints(breakpoints: Breakpoint[]): void;
10111
+ export function removeBreakpoints(breakpoints: readonly Breakpoint[]): void;
10051
10112
  }
10052
10113
 
10053
10114
  /**
@@ -10444,6 +10505,13 @@ export module '@theia/plugin' {
10444
10505
  */
10445
10506
  source?: string;
10446
10507
 
10508
+ /**
10509
+ * A human-readable string which is rendered less prominently on a separate line in places
10510
+ * where the task's name is displayed. Supports rendering of {@link ThemeIcon theme icons}
10511
+ * via the `$(<name>)`-syntax.
10512
+ */
10513
+ detail?: string;
10514
+
10447
10515
  /**
10448
10516
  * The task group this tasks belongs to. See TaskGroup
10449
10517
  * for a predefined set of available groups.
@@ -10462,9 +10530,10 @@ export module '@theia/plugin' {
10462
10530
  problemMatchers?: string[];
10463
10531
  }
10464
10532
 
10465
- export class Task2 extends Task {
10466
- detail?: string;
10467
- }
10533
+ /**
10534
+ * Task2 is kept for compatibility reasons.
10535
+ */
10536
+ export class Task2 extends Task { }
10468
10537
 
10469
10538
  export interface TaskProvider<T extends Task = Task> {
10470
10539
  /**
@@ -11388,7 +11457,7 @@ export module '@theia/plugin' {
11388
11457
  * @param options The [getSessionOptions](#GetSessionOptions) to use
11389
11458
  * @returns A thenable that resolves to an authentication session
11390
11459
  */
11391
- export function getSession(providerId: string, scopes: string[], options: AuthenticationGetSessionOptions & { createIfNone: true }): Thenable<AuthenticationSession>;
11460
+ export function getSession(providerId: string, scopes: readonly string[], options: AuthenticationGetSessionOptions & { createIfNone: true }): Thenable<AuthenticationSession>;
11392
11461
 
11393
11462
  /**
11394
11463
  * Get an authentication session matching the desired scopes. Rejects if a provider with providerId is not
@@ -11416,7 +11485,7 @@ export module '@theia/plugin' {
11416
11485
  * @param options The [getSessionOptions](#GetSessionOptions) to use
11417
11486
  * @returns A thenable that resolves to an authentication session if available, or undefined if there are no sessions
11418
11487
  */
11419
- export function getSession(providerId: string, scopes: string[], options?: AuthenticationGetSessionOptions): Thenable<AuthenticationSession | undefined>;
11488
+ export function getSession(providerId: string, scopes: readonly string[], options?: AuthenticationGetSessionOptions): Thenable<AuthenticationSession | undefined>;
11420
11489
 
11421
11490
  /**
11422
11491
  * An [event](#Event) which fires when the authentication sessions of an authentication provider have