@theia/plugin 1.25.0-next.3 → 1.25.0-next.32

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theia/plugin",
3
- "version": "1.25.0-next.3+3893fdec2fc",
3
+ "version": "1.25.0-next.32+edd747a3e60",
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": "3893fdec2fc07766da986e12b62457a897b3b64e"
35
+ "gitHead": "edd747a3e60c38ff1b3cb75c487a38a05203425a"
36
36
  }
@@ -642,6 +642,11 @@ export module '@theia/plugin' {
642
642
  */
643
643
  contextValue?: string;
644
644
 
645
+ /**
646
+ * Accessibility information used when screen reader interacts with this timeline item.
647
+ */
648
+ accessibilityInformation?: AccessibilityInformation;
649
+
645
650
  /**
646
651
  * @param label A human-readable string describing the timeline item
647
652
  * @param timestamp A timestamp (in milliseconds since 1 January 1970 00:00:00) for when the timeline item occurred
package/src/theia.d.ts CHANGED
@@ -2191,6 +2191,11 @@ export module '@theia/plugin' {
2191
2191
  */
2192
2192
  matchOnDetail: boolean;
2193
2193
 
2194
+ /*
2195
+ * An optional flag to maintain the scroll position of the quick pick when the quick pick items are updated. Defaults to false.
2196
+ */
2197
+ keepScrollPosition?: boolean;
2198
+
2194
2199
  /**
2195
2200
  * Active items. This can be read and updated by the extension.
2196
2201
  */
@@ -2399,6 +2404,24 @@ export module '@theia/plugin' {
2399
2404
  export function getCommands(filterInternal?: boolean): PromiseLike<string[]>;
2400
2405
  }
2401
2406
 
2407
+ /**
2408
+ * Accessibility information which controls screen reader behavior.
2409
+ */
2410
+ export interface AccessibilityInformation {
2411
+ /**
2412
+ * Label to be read out by a screen reader once the item has focus.
2413
+ */
2414
+ readonly label: string;
2415
+
2416
+ /**
2417
+ * Role of the widget which defines how a screen reader interacts with it.
2418
+ * The role should be set in special cases when for example a tree-like element behaves like a checkbox.
2419
+ * If role is not specified the editor will pick the appropriate role automatically.
2420
+ * More about aria roles can be found here https://w3c.github.io/aria/#widget_roles
2421
+ */
2422
+ readonly role?: string;
2423
+ }
2424
+
2402
2425
  /**
2403
2426
  * Represents an action that is shown with a message.
2404
2427
  */
@@ -2458,6 +2481,14 @@ export module '@theia/plugin' {
2458
2481
  */
2459
2482
  export interface StatusBarItem {
2460
2483
 
2484
+ /**
2485
+ * The identifier of this item.
2486
+ *
2487
+ * *Note*: if no identifier was provided by the {@linkcode window.createStatusBarItem}
2488
+ * method, the identifier will match the {@link Extension.id extension identifier}.
2489
+ */
2490
+ readonly id: string;
2491
+
2461
2492
  /**
2462
2493
  * The alignment of this item.
2463
2494
  */
@@ -2469,6 +2500,13 @@ export module '@theia/plugin' {
2469
2500
  */
2470
2501
  readonly priority: number;
2471
2502
 
2503
+ /**
2504
+ * The name of the entry, like 'Python Language Indicator', 'Git Status' etc.
2505
+ * Try to keep the length of the name short, yet descriptive enough that
2506
+ * users can understand what the status bar item is about.
2507
+ */
2508
+ name: string | undefined;
2509
+
2472
2510
  /**
2473
2511
  * The text to show for the entry. To set a text with icon use the following pattern in text string:
2474
2512
  * $(fontawesomeClassName)
@@ -2485,11 +2523,30 @@ export module '@theia/plugin' {
2485
2523
  */
2486
2524
  color: string | ThemeColor | undefined;
2487
2525
 
2526
+ /**
2527
+ * The background color for this entry.
2528
+ *
2529
+ * *Note*: only the following colors are supported:
2530
+ * * `new ThemeColor('statusBarItem.errorBackground')`
2531
+ * * `new ThemeColor('statusBarItem.warningBackground')`
2532
+ *
2533
+ * More background colors may be supported in the future.
2534
+ *
2535
+ * *Note*: when a background color is set, the statusbar may override
2536
+ * the `color` choice to ensure the entry is readable in all themes.
2537
+ */
2538
+ backgroundColor: ThemeColor | undefined;
2539
+
2488
2540
  /**
2489
2541
  * The identifier of a command to run on click.
2490
2542
  */
2491
2543
  command: string | Command | undefined;
2492
2544
 
2545
+ /**
2546
+ * Accessibility information used when a screen reader interacts with this StatusBar item.
2547
+ */
2548
+ accessibilityInformation: AccessibilityInformation | undefined;
2549
+
2493
2550
  /**
2494
2551
  * Shows the entry in the status bar.
2495
2552
  */
@@ -5250,6 +5307,13 @@ export module '@theia/plugin' {
5250
5307
  */
5251
5308
  contextValue?: string;
5252
5309
 
5310
+ /**
5311
+ * Accessibility information used when screen reader interacts with this tree item.
5312
+ * Generally, a TreeItem has no need to set the `role` of the accessibilityInformation;
5313
+ * however, there are cases where a TreeItem is not displayed in a tree-like way where setting the `role` may make sense.
5314
+ */
5315
+ accessibilityInformation?: AccessibilityInformation;
5316
+
5253
5317
  /**
5254
5318
  * @param label A human-readable string describing this item
5255
5319
  * @param collapsibleState [TreeItemCollapsibleState](#TreeItemCollapsibleState) of the tree item. Default is [TreeItemCollapsibleState.None](#TreeItemCollapsibleState.None)
@@ -6844,8 +6908,7 @@ export module '@theia/plugin' {
6844
6908
  * thenable.
6845
6909
  *
6846
6910
  */
6847
- export type ProviderResult<T> = T | undefined | PromiseLike<T | undefined>;
6848
-
6911
+ export type ProviderResult<T> = T | undefined | null | Thenable<T | undefined | null>;
6849
6912
  /**
6850
6913
  * A symbol kind.
6851
6914
  */
@@ -7920,7 +7983,7 @@ export module '@theia/plugin' {
7920
7983
  *
7921
7984
  * A code action can be any command that is [known](#commands.getCommands) to the system.
7922
7985
  */
7923
- export interface CodeActionProvider {
7986
+ export interface CodeActionProvider<T extends CodeAction = CodeAction> {
7924
7987
  /**
7925
7988
  * Provide commands for the given document and range.
7926
7989
  *
@@ -7932,12 +7995,7 @@ export module '@theia/plugin' {
7932
7995
  * @return An array of commands, quick fixes, or refactorings or a thenable of such. The lack of a result can be
7933
7996
  * signaled by returning `undefined`, `null`, or an empty array.
7934
7997
  */
7935
- provideCodeActions(
7936
- document: TextDocument,
7937
- range: Range | Selection,
7938
- context: CodeActionContext,
7939
- token: CancellationToken | undefined
7940
- ): ProviderResult<(Command | CodeAction)[]>;
7998
+ provideCodeActions(document: TextDocument, range: Range | Selection, context: CodeActionContext, token: CancellationToken | undefined): ProviderResult<(Command | T)[]>;
7941
7999
 
7942
8000
  /**
7943
8001
  * Given a code action fill in its `edit`-property. Changes to
@@ -7953,7 +8011,7 @@ export module '@theia/plugin' {
7953
8011
  * @return The resolved code action or a thenable that resolves to such. It is OK to return the given
7954
8012
  * `item`. When no result is returned, the given `item` will be used.
7955
8013
  */
7956
- resolveCodeAction?(codeAction: CodeAction, token: CancellationToken | undefined): ProviderResult<CodeAction>;
8014
+ resolveCodeAction?(codeAction: T, token: CancellationToken | undefined): ProviderResult<T>;
7957
8015
  }
7958
8016
 
7959
8017
  /**