@theia/plugin 1.34.0-next.19 → 1.34.0-next.31

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 +113 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theia/plugin",
3
- "version": "1.34.0-next.19+911c0ca21",
3
+ "version": "1.34.0-next.31+255450b22",
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": "911c0ca21ad2e591d4d7497708b365894bec4d7a"
35
+ "gitHead": "255450b224eae499d1b130eaf7318ac9659baaa4"
36
36
  }
package/src/theia.d.ts CHANGED
@@ -3016,6 +3016,19 @@ export module '@theia/plugin' {
3016
3016
  * Terminal attributes. Can be useful to apply some implementation specific information.
3017
3017
  */
3018
3018
  attributes?: { [key: string]: string | null };
3019
+
3020
+ /**
3021
+ * The icon path or {@link ThemeIcon} for the terminal.
3022
+ */
3023
+ iconPath?: ThemeIcon;
3024
+
3025
+ /**
3026
+ * The icon {@link ThemeColor} for the terminal.
3027
+ * The `terminal.ansi*` theme keys are
3028
+ * recommended for the best contrast and consistency across themes.
3029
+ * @stubbed
3030
+ */
3031
+ color?: ThemeColor;
3019
3032
  }
3020
3033
 
3021
3034
  /**
@@ -3089,6 +3102,19 @@ export module '@theia/plugin' {
3089
3102
  * This will only take effect when `terminal.integrated.enablePersistentSessions` is enabled.
3090
3103
  */
3091
3104
  isTransient?: boolean;
3105
+
3106
+ /**
3107
+ * The icon path or {@link ThemeIcon} for the terminal.
3108
+ */
3109
+ iconPath?: ThemeIcon;
3110
+
3111
+ /**
3112
+ * The icon {@link ThemeColor} for the terminal.
3113
+ * The standard `terminal.ansi*` theme keys are
3114
+ * recommended for the best contrast and consistency across themes.
3115
+ * @stubbed
3116
+ */
3117
+ color?: ThemeColor;
3092
3118
  }
3093
3119
 
3094
3120
  /**
@@ -5389,6 +5415,17 @@ export module '@theia/plugin' {
5389
5415
  */
5390
5416
  password: boolean;
5391
5417
 
5418
+ /**
5419
+ * Selection range in the input value. Defined as tuple of two number where the
5420
+ * first is the inclusive start index and the second the exclusive end index. When `undefined` the whole
5421
+ * pre-filled value will be selected, when empty (start equals end) only the cursor will be set,
5422
+ * otherwise the defined range will be selected.
5423
+ *
5424
+ * This property does not get updated when the user types or makes a selection,
5425
+ * but it can be updated by the extension.
5426
+ */
5427
+ valueSelection: readonly [number, number] | undefined;
5428
+
5392
5429
  /**
5393
5430
  * An event signaling when the value has changed.
5394
5431
  */
@@ -8835,11 +8872,21 @@ export module '@theia/plugin' {
8835
8872
  source?: string;
8836
8873
 
8837
8874
  /**
8838
- * A code or identifier for this diagnostics. Will not be surfaced
8839
- * to the user, but should be used for later processing, e.g. when
8840
- * providing {@link CodeActionContext code actions}.
8875
+ * A code or identifier for this diagnostic.
8876
+ * Should be used for later processing, e.g. when providing {@link CodeActionContext code actions}.
8841
8877
  */
8842
- code?: string | number;
8878
+ code?: string | number | {
8879
+ /**
8880
+ * A code or identifier for this diagnostic.
8881
+ * Should be used for later processing, e.g. when providing {@link CodeActionContext code actions}.
8882
+ */
8883
+ value: string | number;
8884
+
8885
+ /**
8886
+ * A target URI to open with more information about the diagnostic error.
8887
+ */
8888
+ target: Uri;
8889
+ };
8843
8890
 
8844
8891
  /**
8845
8892
  * An array of related diagnostic information, e.g. when symbol-names within
@@ -9454,7 +9501,15 @@ export module '@theia/plugin' {
9454
9501
  * @param uri A resource identifier.
9455
9502
  * @param edits An array of text edits.
9456
9503
  */
9457
- set(uri: Uri, edits: TextEdit[]): void;
9504
+ set(uri: Uri, edits: ReadonlyArray<TextEdit | SnippetTextEdit>): void;
9505
+
9506
+ /**
9507
+ * Set (and replace) text edits or snippet edits with metadata for a resource.
9508
+ *
9509
+ * @param uri A resource identifier.
9510
+ * @param edits An array of edits.
9511
+ */
9512
+ set(uri: Uri, edits: ReadonlyArray<[TextEdit | SnippetTextEdit, WorkspaceEditEntryMetadata]>): void;
9458
9513
 
9459
9514
  /**
9460
9515
  * Get the text edits for a resource.
@@ -10776,6 +10831,11 @@ export module '@theia/plugin' {
10776
10831
  * Controls whether the input box is visible (default is true).
10777
10832
  */
10778
10833
  visible: boolean;
10834
+
10835
+ /**
10836
+ * Controls whether the input box is enabled (default is `true`).
10837
+ */
10838
+ enabled: boolean;
10779
10839
  }
10780
10840
 
10781
10841
  interface QuickDiffProvider {
@@ -14262,6 +14322,54 @@ export module '@theia/plugin' {
14262
14322
  readonly selections?: readonly NotebookRange[];
14263
14323
  }
14264
14324
 
14325
+ /**
14326
+ * A snippet edit represents an interactive edit that is performed by
14327
+ * the editor.
14328
+ *
14329
+ * *Note* that a snippet edit can always be performed as a normal {@link TextEdit text edit}.
14330
+ * This will happen when no matching editor is open or when a {@link WorkspaceEdit workspace edit}
14331
+ * contains snippet edits for multiple files. In that case only those that match the active editor
14332
+ * will be performed as snippet edits and the others as normal text edits.
14333
+ */
14334
+ export class SnippetTextEdit {
14335
+
14336
+ /**
14337
+ * Utility to create a replace snippet edit.
14338
+ *
14339
+ * @param range A range.
14340
+ * @param snippet A snippet string.
14341
+ * @return A new snippet edit object.
14342
+ */
14343
+ static replace(range: Range, snippet: SnippetString): SnippetTextEdit;
14344
+
14345
+ /**
14346
+ * Utility to create an insert snippet edit.
14347
+ *
14348
+ * @param position A position, will become an empty range.
14349
+ * @param snippet A snippet string.
14350
+ * @return A new snippet edit object.
14351
+ */
14352
+ static insert(position: Position, snippet: SnippetString): SnippetTextEdit;
14353
+
14354
+ /**
14355
+ * The range this edit applies to.
14356
+ */
14357
+ range: Range;
14358
+
14359
+ /**
14360
+ * The {@link SnippetString snippet} this edit will perform.
14361
+ */
14362
+ snippet: SnippetString;
14363
+
14364
+ /**
14365
+ * Create a new snippet edit.
14366
+ *
14367
+ * @param range A range.
14368
+ * @param snippet A snippet string.
14369
+ */
14370
+ constructor(range: Range, snippet: SnippetString);
14371
+ }
14372
+
14265
14373
  /**
14266
14374
  * A notebook edit represents edits that should be applied to the contents of a notebook.
14267
14375
  */