@theia/plugin 1.30.0-next.33 → 1.30.0-next.36

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 +72 -8
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theia/plugin",
3
- "version": "1.30.0-next.33+b75b6144b",
3
+ "version": "1.30.0-next.36+cd2f08124",
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": "b75b6144b0ffea06a549294903c374fa642135e4"
35
+ "gitHead": "cd2f0812424d91561be7cc53aa303488113ed59d"
36
36
  }
package/src/theia.d.ts CHANGED
@@ -1727,6 +1727,11 @@ export module '@theia/plugin' {
1727
1727
  */
1728
1728
  export interface FileWillCreateEvent {
1729
1729
 
1730
+ /**
1731
+ * A cancellation token.
1732
+ */
1733
+ readonly token: CancellationToken;
1734
+
1730
1735
  /**
1731
1736
  * The files that are going to be created.
1732
1737
  */
@@ -1782,6 +1787,11 @@ export module '@theia/plugin' {
1782
1787
  */
1783
1788
  export interface FileWillDeleteEvent {
1784
1789
 
1790
+ /**
1791
+ * A cancellation token.
1792
+ */
1793
+ readonly token: CancellationToken;
1794
+
1785
1795
  /**
1786
1796
  * The files that are going to be deleted.
1787
1797
  */
@@ -1837,6 +1847,11 @@ export module '@theia/plugin' {
1837
1847
  */
1838
1848
  export interface FileWillRenameEvent {
1839
1849
 
1850
+ /**
1851
+ * A cancellation token.
1852
+ */
1853
+ readonly token: CancellationToken;
1854
+
1840
1855
  /**
1841
1856
  * The files that are going to be renamed.
1842
1857
  */
@@ -2201,35 +2216,63 @@ export module '@theia/plugin' {
2201
2216
  * Represents an item that can be selected from a list of items.
2202
2217
  */
2203
2218
  export interface QuickPickItem {
2219
+
2220
+ /**
2221
+ * A human-readable string which is rendered prominent. Supports rendering of {@link ThemeIcon theme icons} via
2222
+ * the `$(<name>)`-syntax.
2223
+ */
2224
+ label: string;
2225
+
2204
2226
  /**
2205
2227
  * 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,
2206
2228
  * and all fields other than {@link QuickPickItem.label label} will be ignored.
2207
2229
  */
2208
2230
  kind?: QuickPickItemKind;
2209
- /**
2210
- * The item label
2211
- */
2212
- label: string;
2213
2231
 
2214
2232
  /**
2215
- * The item description
2233
+ * A human-readable string which is rendered less prominent in the same line. Supports rendering of
2234
+ * {@link ThemeIcon theme icons} via the `$(<name>)`-syntax.
2235
+ *
2236
+ * Note: this property is ignored when {@link QuickPickItem.kind kind} is set to {@link QuickPickItemKind.Separator}
2216
2237
  */
2217
2238
  description?: string;
2218
2239
 
2219
2240
  /**
2220
- * The item detail
2241
+ * A human-readable string which is rendered less prominent in a separate line. Supports rendering of
2242
+ * {@link ThemeIcon theme icons} via the `$(<name>)`-syntax.
2243
+ *
2244
+ * Note: this property is ignored when {@link QuickPickItem.kind kind} is set to {@link QuickPickItemKind.Separator}
2221
2245
  */
2222
2246
  detail?: string;
2223
2247
 
2224
2248
  /**
2225
- * Used for [QuickPickOptions.canPickMany](#QuickPickOptions.canPickMany)
2226
- * not implemented yet
2249
+ * Optional flag indicating if this item is picked initially. This is only honored when using
2250
+ * the {@link window.showQuickPick()} API. To do the same thing with the {@link window.createQuickPick()} API,
2251
+ * simply set the {@link QuickPick.selectedItems} to the items you want picked initially.
2252
+ * (*Note:* This is only honored when the picker allows multiple selections.)
2253
+ *
2254
+ * @see {@link QuickPickOptions.canPickMany}
2255
+ *
2256
+ * Note: this property is ignored when {@link QuickPickItem.kind kind} is set to {@link QuickPickItemKind.Separator}
2227
2257
  */
2228
2258
  picked?: boolean;
2259
+
2229
2260
  /**
2230
2261
  * Always show this item.
2262
+ *
2263
+ * Note: this property is ignored when {@link QuickPickItem.kind kind} is set to {@link QuickPickItemKind.Separator}
2231
2264
  */
2232
2265
  alwaysShow?: boolean;
2266
+
2267
+ /**
2268
+ * Optional buttons that will be rendered on this particular item. These buttons will trigger
2269
+ * an {@link QuickPickItemButtonEvent} when clicked. Buttons are only rendered when using a quickpick
2270
+ * created by the {@link window.createQuickPick()} API. Buttons are not rendered when using
2271
+ * the {@link window.showQuickPick()} API.
2272
+ *
2273
+ * Note: this property is ignored when {@link QuickPickItem.kind kind} is set to {@link QuickPickItemKind.Separator}
2274
+ */
2275
+ buttons?: readonly QuickInputButton[];
2233
2276
  }
2234
2277
 
2235
2278
  /**
@@ -2282,6 +2325,12 @@ export module '@theia/plugin' {
2282
2325
  */
2283
2326
  readonly onDidTriggerButton: Event<QuickInputButton>;
2284
2327
 
2328
+ /**
2329
+ * An event signaling when a button in a particular {@link QuickPickItem} was triggered.
2330
+ * This event does not fire for buttons in the title bar.
2331
+ */
2332
+ readonly onDidTriggerItemButton: Event<QuickPickItemButtonEvent<T>>;
2333
+
2285
2334
  /**
2286
2335
  * Items to pick from.
2287
2336
  */
@@ -5118,6 +5167,21 @@ export module '@theia/plugin' {
5118
5167
  private constructor();
5119
5168
  }
5120
5169
 
5170
+ /**
5171
+ * An event signaling when a button in a particular {@link QuickPickItem} was triggered.
5172
+ * This event does not fire for buttons in the title bar.
5173
+ */
5174
+ export interface QuickPickItemButtonEvent<T extends QuickPickItem> {
5175
+ /**
5176
+ * The button that was clicked.
5177
+ */
5178
+ readonly button: QuickInputButton;
5179
+ /**
5180
+ * The item that the button belongs to.
5181
+ */
5182
+ readonly item: T;
5183
+ }
5184
+
5121
5185
  /**
5122
5186
  * A concrete {@link QuickInput QuickInput} to let the user input a text value.
5123
5187
  *