@theia/plugin 1.33.0 → 1.34.0-next.7

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 +350 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theia/plugin",
3
- "version": "1.33.0",
3
+ "version": "1.34.0-next.7+a73305748",
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": "d66562f95639027021574e130d20bb9459d89534"
35
+ "gitHead": "a73305748c89f9608c5f94ecc6d15924b49aaa0c"
36
36
  }
package/src/theia.d.ts CHANGED
@@ -4554,6 +4554,11 @@ export module '@theia/plugin' {
4554
4554
  */
4555
4555
  export namespace window {
4556
4556
 
4557
+ /**
4558
+ * Represents the grid widget within the main editor area
4559
+ */
4560
+ export const tabGroups: TabGroups;
4561
+
4557
4562
  /**
4558
4563
  * The currently active terminal or undefined. The active terminal is the one
4559
4564
  * that currently has focus or most recently had focus.
@@ -9179,6 +9184,17 @@ export module '@theia/plugin' {
9179
9184
  */
9180
9185
  static readonly RefactorInline: CodeActionKind;
9181
9186
 
9187
+ /**
9188
+ * Base kind for refactoring inline actions: `refactor.move`
9189
+ *
9190
+ * Example move actions:
9191
+ *
9192
+ * - Move a function to a new file
9193
+ * - Move a property between classes
9194
+ * - Move method to base class
9195
+ */
9196
+ static readonly RefactorMove: CodeActionKind;
9197
+
9182
9198
  /**
9183
9199
  * Base kind for refactoring rewrite actions: `refactor.rewrite`
9184
9200
  *
@@ -12415,6 +12431,11 @@ export module '@theia/plugin' {
12415
12431
  * Label will be rendered next to authorName if exists.
12416
12432
  */
12417
12433
  label?: string;
12434
+
12435
+ /**
12436
+ * Optional timestamp.
12437
+ */
12438
+ timestamp?: Date;
12418
12439
  }
12419
12440
 
12420
12441
  /**
@@ -13114,6 +13135,335 @@ export module '@theia/plugin' {
13114
13135
  export function registerAuthenticationProvider(id: string, label: string, provider: AuthenticationProvider, options?: AuthenticationProviderOptions): Disposable;
13115
13136
  }
13116
13137
 
13138
+ /**
13139
+ * The tab represents a single text based resource.
13140
+ */
13141
+ export class TabInputText {
13142
+ /**
13143
+ * The uri represented by the tab.
13144
+ * @stubbed
13145
+ */
13146
+ readonly uri: Uri;
13147
+ /**
13148
+ * Constructs a text tab input with the given URI.
13149
+ * @param uri The URI of the tab.
13150
+ * @stubbed
13151
+ */
13152
+ constructor(uri: Uri);
13153
+ }
13154
+
13155
+ /**
13156
+ * The tab represents two text based resources
13157
+ * being rendered as a diff.
13158
+ */
13159
+ export class TabInputTextDiff {
13160
+ /**
13161
+ * The uri of the original text resource.
13162
+ * @stubbed
13163
+ */
13164
+ readonly original: Uri;
13165
+ /**
13166
+ * The uri of the modified text resource.
13167
+ * @stubbed
13168
+ */
13169
+ readonly modified: Uri;
13170
+ /**
13171
+ * Constructs a new text diff tab input with the given URIs.
13172
+ * @param original The uri of the original text resource.
13173
+ * @param modified The uri of the modified text resource.
13174
+ * @stubbed
13175
+ */
13176
+ constructor(original: Uri, modified: Uri);
13177
+ }
13178
+
13179
+ /**
13180
+ * The tab represents a custom editor.
13181
+ */
13182
+ export class TabInputCustom {
13183
+ /**
13184
+ * The uri that the tab is representing.
13185
+ * @stubbed
13186
+ */
13187
+ readonly uri: Uri;
13188
+ /**
13189
+ * The type of custom editor.
13190
+ * @stubbed
13191
+ */
13192
+ readonly viewType: string;
13193
+ /**
13194
+ * Constructs a custom editor tab input.
13195
+ * @param uri The uri of the tab.
13196
+ * @param viewType The viewtype of the custom editor.
13197
+ * @stubbed
13198
+ */
13199
+ constructor(uri: Uri, viewType: string);
13200
+ }
13201
+
13202
+ /**
13203
+ * The tab represents a webview.
13204
+ */
13205
+ export class TabInputWebview {
13206
+ /**
13207
+ * The type of webview. Maps to WebviewPanel's viewType
13208
+ * @stubbed
13209
+ */
13210
+ readonly viewType: string;
13211
+ /**
13212
+ * Constructs a webview tab input with the given view type.
13213
+ * @param viewType The type of webview. Maps to WebviewPanel's viewType
13214
+ * @stubbed
13215
+ */
13216
+ constructor(viewType: string);
13217
+ }
13218
+
13219
+ /**
13220
+ * The tab represents a notebook.
13221
+ */
13222
+ export class TabInputNotebook {
13223
+ /**
13224
+ * The uri that the tab is representing.
13225
+ * @stubbed
13226
+ */
13227
+ readonly uri: Uri;
13228
+ /**
13229
+ * The type of notebook. Maps to NotebookDocuments's notebookType
13230
+ * @stubbed
13231
+ */
13232
+ readonly notebookType: string;
13233
+ /**
13234
+ * Constructs a new tab input for a notebook.
13235
+ * @param uri The uri of the notebook.
13236
+ * @param notebookType The type of notebook. Maps to NotebookDocuments's notebookType
13237
+ * @stubbed
13238
+ */
13239
+ constructor(uri: Uri, notebookType: string);
13240
+ }
13241
+
13242
+ /**
13243
+ * The tabs represents two notebooks in a diff configuration.
13244
+ */
13245
+ export class TabInputNotebookDiff {
13246
+ /**
13247
+ * The uri of the original notebook.
13248
+ * @stubbed
13249
+ */
13250
+ readonly original: Uri;
13251
+ /**
13252
+ * The uri of the modified notebook.
13253
+ * @stubbed
13254
+ */
13255
+ readonly modified: Uri;
13256
+ /**
13257
+ * The type of notebook. Maps to NotebookDocuments's notebookType
13258
+ * @stubbed
13259
+ */
13260
+ readonly notebookType: string;
13261
+ /**
13262
+ * Constructs a notebook diff tab input.
13263
+ * @param original The uri of the original unmodified notebook.
13264
+ * @param modified The uri of the modified notebook.
13265
+ * @param notebookType The type of notebook. Maps to NotebookDocuments's notebookType
13266
+ * @stubbed
13267
+ */
13268
+ constructor(original: Uri, modified: Uri, notebookType: string);
13269
+ }
13270
+
13271
+ /**
13272
+ * The tab represents a terminal in the editor area.
13273
+ */
13274
+ export class TabInputTerminal {
13275
+ /**
13276
+ * Constructs a terminal tab input.
13277
+ * @stubbed
13278
+ */
13279
+ constructor();
13280
+ }
13281
+
13282
+ /**
13283
+ * Represents a tab within a {@link TabGroup group of tabs}.
13284
+ * Tabs are merely the graphical representation within the editor area.
13285
+ * A backing editor is not a guarantee.
13286
+ */
13287
+ export interface Tab {
13288
+
13289
+ /**
13290
+ * The text displayed on the tab.
13291
+ * @stubbed
13292
+ */
13293
+ readonly label: string;
13294
+
13295
+ /**
13296
+ * The group which the tab belongs to.
13297
+ * @stubbed
13298
+ */
13299
+ readonly group: TabGroup;
13300
+
13301
+ /**
13302
+ * Defines the structure of the tab i.e. text, notebook, custom, etc.
13303
+ * Resource and other useful properties are defined on the tab kind.
13304
+ * @stubbed
13305
+ */
13306
+ readonly input: TabInputText | TabInputTextDiff | TabInputCustom | TabInputWebview | TabInputNotebook | TabInputNotebookDiff | TabInputTerminal | unknown;
13307
+
13308
+ /**
13309
+ * Whether or not the tab is currently active.
13310
+ * This is dictated by being the selected tab in the group.
13311
+ * @stubbed
13312
+ */
13313
+ readonly isActive: boolean;
13314
+
13315
+ /**
13316
+ * Whether or not the dirty indicator is present on the tab.
13317
+ * @stubbed
13318
+ */
13319
+ readonly isDirty: boolean;
13320
+
13321
+ /**
13322
+ * Whether or not the tab is pinned (pin icon is present).
13323
+ * @stubbed
13324
+ */
13325
+ readonly isPinned: boolean;
13326
+
13327
+ /**
13328
+ * Whether or not the tab is in preview mode.
13329
+ * @stubbed
13330
+ */
13331
+ readonly isPreview: boolean;
13332
+ }
13333
+
13334
+ /**
13335
+ * An event describing change to tabs.
13336
+ */
13337
+ export interface TabChangeEvent {
13338
+ /**
13339
+ * The tabs that have been opened.
13340
+ * @stubbed
13341
+ */
13342
+ readonly opened: readonly Tab[];
13343
+ /**
13344
+ * The tabs that have been closed.
13345
+ * @stubbed
13346
+ */
13347
+ readonly closed: readonly Tab[];
13348
+ /**
13349
+ * Tabs that have changed, e.g have changed
13350
+ * their {@link Tab.isActive active} state.
13351
+ * @stubbed
13352
+ */
13353
+ readonly changed: readonly Tab[];
13354
+ }
13355
+
13356
+ /**
13357
+ * An event describing changes to tab groups.
13358
+ */
13359
+ export interface TabGroupChangeEvent {
13360
+ /**
13361
+ * Tab groups that have been opened.
13362
+ * @stubbed
13363
+ */
13364
+ readonly opened: readonly TabGroup[];
13365
+ /**
13366
+ * Tab groups that have been closed.
13367
+ * @stubbed
13368
+ */
13369
+ readonly closed: readonly TabGroup[];
13370
+ /**
13371
+ * Tab groups that have changed, e.g have changed
13372
+ * their {@link TabGroup.isActive active} state.
13373
+ * @stubbed
13374
+ */
13375
+ readonly changed: readonly TabGroup[];
13376
+ }
13377
+
13378
+ /**
13379
+ * Represents a group of tabs. A tab group itself consists of multiple tabs.
13380
+ */
13381
+ export interface TabGroup {
13382
+ /**
13383
+ * Whether or not the group is currently active.
13384
+ *
13385
+ * *Note* that only one tab group is active at a time, but that multiple tab
13386
+ * groups can have an {@link TabGroup.aciveTab active tab}.
13387
+ *
13388
+ * @see {@link Tab.isActive}
13389
+ * @stubbed
13390
+ */
13391
+ readonly isActive: boolean;
13392
+
13393
+ /**
13394
+ * The view column of the group.
13395
+ * @stubbed
13396
+ */
13397
+ readonly viewColumn: ViewColumn;
13398
+
13399
+ /**
13400
+ * The active {@link Tab tab} in the group. This is the tab whose contents are currently
13401
+ * being rendered.
13402
+ *
13403
+ * *Note* that there can be one active tab per group but there can only be one {@link TabGroups.activeTabGroup active group}.
13404
+ * @stubbed
13405
+ */
13406
+ readonly activeTab: Tab | undefined;
13407
+
13408
+ /**
13409
+ * The list of tabs contained within the group.
13410
+ * This can be empty if the group has no tabs open.
13411
+ * @stubbed
13412
+ */
13413
+ readonly tabs: readonly Tab[];
13414
+ }
13415
+
13416
+ /**
13417
+ * Represents the main editor area which consists of multple groups which contain tabs.
13418
+ */
13419
+ export interface TabGroups {
13420
+ /**
13421
+ * All the groups within the group container.
13422
+ * @stubbed
13423
+ */
13424
+ readonly all: readonly TabGroup[];
13425
+
13426
+ /**
13427
+ * The currently active group.
13428
+ * @stubbed
13429
+ */
13430
+ readonly activeTabGroup: TabGroup;
13431
+
13432
+ /**
13433
+ * An {@link Event event} which fires when {@link TabGroup tab groups} have changed.
13434
+ * @stubbed
13435
+ */
13436
+ readonly onDidChangeTabGroups: Event<TabGroupChangeEvent>;
13437
+
13438
+ /**
13439
+ * An {@link Event event} which fires when {@link Tab tabs} have changed.
13440
+ * @stubbed
13441
+ */
13442
+ readonly onDidChangeTabs: Event<TabChangeEvent>;
13443
+
13444
+ /**
13445
+ * Closes the tab. This makes the tab object invalid and the tab
13446
+ * should no longer be used for further actions.
13447
+ * Note: In the case of a dirty tab, a confirmation dialog will be shown which may be cancelled. If cancelled the tab is still valid
13448
+ *
13449
+ * @param tab The tab to close.
13450
+ * @param preserveFocus When `true` focus will remain in its current position. If `false` it will jump to the next tab.
13451
+ * @returns A promise that resolves to `true` when all tabs have been closed.
13452
+ * @stubbed
13453
+ */
13454
+ close(tab: Tab | readonly Tab[], preserveFocus?: boolean): Thenable<boolean>;
13455
+
13456
+ /**
13457
+ * Closes the tab group. This makes the tab group object invalid and the tab group
13458
+ * should no longer be used for further actions.
13459
+ * @param tabGroup The tab group to close.
13460
+ * @param preserveFocus When `true` focus will remain in its current position.
13461
+ * @returns A promise that resolves to `true` when all tab groups have been closed.
13462
+ * @stubbed
13463
+ */
13464
+ close(tabGroup: TabGroup | readonly TabGroup[], preserveFocus?: boolean): Thenable<boolean>;
13465
+ }
13466
+
13117
13467
  /**
13118
13468
  * Represents a notebook editor that is attached to a {@link NotebookDocument notebook}.
13119
13469
  */