@theia/plugin 1.27.0-next.5 → 1.27.0-next.53
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 +2 -2
- package/src/theia-proposed.d.ts +0 -35
- package/src/theia.d.ts +97 -42
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theia/plugin",
|
|
3
|
-
"version": "1.27.0-next.
|
|
3
|
+
"version": "1.27.0-next.53+0e05d0ad8b9",
|
|
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": "
|
|
35
|
+
"gitHead": "0e05d0ad8b91e3abd1d4d153f6c5215f181afbf9"
|
|
36
36
|
}
|
package/src/theia-proposed.d.ts
CHANGED
|
@@ -321,41 +321,6 @@ export module '@theia/plugin' {
|
|
|
321
321
|
|
|
322
322
|
// #endregion
|
|
323
323
|
|
|
324
|
-
// #region Tree View
|
|
325
|
-
// copied from https://github.com/microsoft/vscode/blob/3ea5c9ddbebd8ec68e3b821f9c39c3ec785fde97/src/vs/vscode.proposed.d.ts#L1447-L1476
|
|
326
|
-
/**
|
|
327
|
-
* Label describing the [Tree item](#TreeItem)
|
|
328
|
-
*/
|
|
329
|
-
export interface TreeItemLabel {
|
|
330
|
-
|
|
331
|
-
/**
|
|
332
|
-
* A human-readable string describing the [Tree item](#TreeItem).
|
|
333
|
-
*/
|
|
334
|
-
label: string;
|
|
335
|
-
|
|
336
|
-
/**
|
|
337
|
-
* Ranges in the label to highlight. A range is defined as a tuple of two number where the
|
|
338
|
-
* first is the inclusive start index and the second the exclusive end index
|
|
339
|
-
*/
|
|
340
|
-
// TODO highlights?: [number, number][];
|
|
341
|
-
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
export class TreeItem2 extends TreeItem {
|
|
345
|
-
/**
|
|
346
|
-
* Label describing this item. When `falsy`, it is derived from [resourceUri](#TreeItem.resourceUri).
|
|
347
|
-
*/
|
|
348
|
-
label?: string | TreeItemLabel | /* for compilation */ any;
|
|
349
|
-
|
|
350
|
-
/**
|
|
351
|
-
* @param label Label describing this item
|
|
352
|
-
* @param collapsibleState [TreeItemCollapsibleState](#TreeItemCollapsibleState) of the tree item.
|
|
353
|
-
* Default is [TreeItemCollapsibleState.None](#TreeItemCollapsibleState.None)
|
|
354
|
-
*/
|
|
355
|
-
constructor(label: TreeItemLabel, collapsibleState?: TreeItemCollapsibleState);
|
|
356
|
-
}
|
|
357
|
-
// #endregion
|
|
358
|
-
|
|
359
324
|
// #region search in workspace
|
|
360
325
|
/**
|
|
361
326
|
* The parameters of a query for text search.
|
package/src/theia.d.ts
CHANGED
|
@@ -1215,6 +1215,22 @@ export module '@theia/plugin' {
|
|
|
1215
1215
|
* @param revealType The scrolling strategy for revealing `range`.
|
|
1216
1216
|
*/
|
|
1217
1217
|
revealRange(range: Range, revealType?: TextEditorRevealType): void;
|
|
1218
|
+
|
|
1219
|
+
/**
|
|
1220
|
+
* Shows this text editor. A [column](#ViewColumn) can be provided to control where the editor is being shown. Might change the [active editor](#window.activeTextEditor).
|
|
1221
|
+
*
|
|
1222
|
+
* @deprecated use [window.showTextDocument](#Window.showTextDocument) instead.
|
|
1223
|
+
*
|
|
1224
|
+
* @param column A [view column](#ViewColumn) in which this editor should be shown.
|
|
1225
|
+
*/
|
|
1226
|
+
show(column?: ViewColumn): void;
|
|
1227
|
+
|
|
1228
|
+
/**
|
|
1229
|
+
* Hides this text editor.
|
|
1230
|
+
*
|
|
1231
|
+
* @deprecated use 'workbench.action.closeActiveEditor' command instead.
|
|
1232
|
+
*/
|
|
1233
|
+
hide(): void;
|
|
1218
1234
|
}
|
|
1219
1235
|
|
|
1220
1236
|
/**
|
|
@@ -2652,7 +2668,22 @@ export module '@theia/plugin' {
|
|
|
2652
2668
|
*/
|
|
2653
2669
|
static readonly Folder: ThemeIcon;
|
|
2654
2670
|
|
|
2655
|
-
|
|
2671
|
+
/**
|
|
2672
|
+
* The id of the icon. The available icons are listed in https://code.visualstudio.com/api/references/icons-in-labels#icon-listing.
|
|
2673
|
+
*/
|
|
2674
|
+
readonly id: string;
|
|
2675
|
+
|
|
2676
|
+
/**
|
|
2677
|
+
* The optional ThemeColor of the icon. The color is currently only used in {@link TreeItem}.
|
|
2678
|
+
*/
|
|
2679
|
+
readonly color?: ThemeColor | undefined;
|
|
2680
|
+
|
|
2681
|
+
/**
|
|
2682
|
+
* Creates a reference to a theme icon.
|
|
2683
|
+
* @param id id of the icon. The available icons are listed in https://code.visualstudio.com/api/references/icons-in-labels#icon-listing.
|
|
2684
|
+
* @param color optional `ThemeColor` for the icon. The color is currently only used in {@link TreeItem}.
|
|
2685
|
+
*/
|
|
2686
|
+
private constructor(public id: string, public color?: ThemeColor);
|
|
2656
2687
|
}
|
|
2657
2688
|
|
|
2658
2689
|
/**
|
|
@@ -4268,6 +4299,44 @@ export module '@theia/plugin' {
|
|
|
4268
4299
|
resolveWebviewView(webviewView: WebviewView, context: WebviewViewResolveContext, token: CancellationToken): Thenable<void> | void;
|
|
4269
4300
|
}
|
|
4270
4301
|
|
|
4302
|
+
/**
|
|
4303
|
+
* Additional information the webview view being resolved.
|
|
4304
|
+
*
|
|
4305
|
+
* @param T Type of the webview's state.
|
|
4306
|
+
*/
|
|
4307
|
+
interface WebviewViewResolveContext<T = unknown> {
|
|
4308
|
+
/**
|
|
4309
|
+
* Persisted state from the webview content.
|
|
4310
|
+
*
|
|
4311
|
+
* To save resources, VS Code normally deallocates webview documents (the iframe content) that are not visible.
|
|
4312
|
+
* For example, when the user collapse a view or switches to another top level activity in the sidebar, the
|
|
4313
|
+
* `WebviewView` itself is kept alive but the webview's underlying document is deallocated. It is recreated when
|
|
4314
|
+
* the view becomes visible again.
|
|
4315
|
+
*
|
|
4316
|
+
* You can prevent this behavior by setting `retainContextWhenHidden` in the `WebviewOptions`. However this
|
|
4317
|
+
* increases resource usage and should be avoided wherever possible. Instead, you can use persisted state to
|
|
4318
|
+
* save off a webview's state so that it can be quickly recreated as needed.
|
|
4319
|
+
*
|
|
4320
|
+
* To save off a persisted state, inside the webview call `acquireVsCodeApi().setState()` with
|
|
4321
|
+
* any json serializable object. To restore the state again, call `getState()`. For example:
|
|
4322
|
+
*
|
|
4323
|
+
* ```js
|
|
4324
|
+
* // Within the webview
|
|
4325
|
+
* const vscode = acquireVsCodeApi();
|
|
4326
|
+
*
|
|
4327
|
+
* // Get existing state
|
|
4328
|
+
* const oldState = vscode.getState() || { value: 0 };
|
|
4329
|
+
*
|
|
4330
|
+
* // Update state
|
|
4331
|
+
* setState({ value: oldState.value + 1 })
|
|
4332
|
+
* ```
|
|
4333
|
+
*
|
|
4334
|
+
* VS Code ensures that the persisted state is saved correctly when a webview is hidden and across
|
|
4335
|
+
* editor restarts.
|
|
4336
|
+
*/
|
|
4337
|
+
readonly state: T | undefined;
|
|
4338
|
+
}
|
|
4339
|
+
|
|
4271
4340
|
/**
|
|
4272
4341
|
* Common namespace for dealing with window and editor, showing messages and user input.
|
|
4273
4342
|
*/
|
|
@@ -4609,44 +4678,6 @@ export module '@theia/plugin' {
|
|
|
4609
4678
|
* @param serializer Webview serializer.
|
|
4610
4679
|
*/
|
|
4611
4680
|
|
|
4612
|
-
/**
|
|
4613
|
-
* Additional information the webview view being resolved.
|
|
4614
|
-
*
|
|
4615
|
-
* @param T Type of the webview's state.
|
|
4616
|
-
*/
|
|
4617
|
-
interface WebviewViewResolveContext<T = unknown> {
|
|
4618
|
-
/**
|
|
4619
|
-
* Persisted state from the webview content.
|
|
4620
|
-
*
|
|
4621
|
-
* To save resources, VS Code normally deallocates webview documents (the iframe content) that are not visible.
|
|
4622
|
-
* For example, when the user collapse a view or switches to another top level activity in the sidebar, the
|
|
4623
|
-
* `WebviewView` itself is kept alive but the webview's underlying document is deallocated. It is recreated when
|
|
4624
|
-
* the view becomes visible again.
|
|
4625
|
-
*
|
|
4626
|
-
* You can prevent this behavior by setting `retainContextWhenHidden` in the `WebviewOptions`. However this
|
|
4627
|
-
* increases resource usage and should be avoided wherever possible. Instead, you can use persisted state to
|
|
4628
|
-
* save off a webview's state so that it can be quickly recreated as needed.
|
|
4629
|
-
*
|
|
4630
|
-
* To save off a persisted state, inside the webview call `acquireVsCodeApi().setState()` with
|
|
4631
|
-
* any json serializable object. To restore the state again, call `getState()`. For example:
|
|
4632
|
-
*
|
|
4633
|
-
* ```js
|
|
4634
|
-
* // Within the webview
|
|
4635
|
-
* const vscode = acquireVsCodeApi();
|
|
4636
|
-
*
|
|
4637
|
-
* // Get existing state
|
|
4638
|
-
* const oldState = vscode.getState() || { value: 0 };
|
|
4639
|
-
*
|
|
4640
|
-
* // Update state
|
|
4641
|
-
* setState({ value: oldState.value + 1 })
|
|
4642
|
-
* ```
|
|
4643
|
-
*
|
|
4644
|
-
* VS Code ensures that the persisted state is saved correctly when a webview is hidden and across
|
|
4645
|
-
* editor restarts.
|
|
4646
|
-
*/
|
|
4647
|
-
readonly state: T | undefined;
|
|
4648
|
-
}
|
|
4649
|
-
|
|
4650
4681
|
export function registerWebviewViewProvider(viewId: string, provider: WebviewViewProvider, options?: {
|
|
4651
4682
|
/**
|
|
4652
4683
|
* Content settings for the webview created for this view.
|
|
@@ -5334,7 +5365,7 @@ export module '@theia/plugin' {
|
|
|
5334
5365
|
/**
|
|
5335
5366
|
* A human-readable string describing this item. When `falsy`, it is derived from [resourceUri](#TreeItem.resourceUri).
|
|
5336
5367
|
*/
|
|
5337
|
-
label?: string;
|
|
5368
|
+
label?: string | TreeItemLabel;
|
|
5338
5369
|
|
|
5339
5370
|
/**
|
|
5340
5371
|
* Optional id for the tree item that has to be unique across tree. The id is used to preserve the selection and expansion state of the tree item.
|
|
@@ -5410,7 +5441,7 @@ export module '@theia/plugin' {
|
|
|
5410
5441
|
* @param label A human-readable string describing this item
|
|
5411
5442
|
* @param collapsibleState [TreeItemCollapsibleState](#TreeItemCollapsibleState) of the tree item. Default is [TreeItemCollapsibleState.None](#TreeItemCollapsibleState.None)
|
|
5412
5443
|
*/
|
|
5413
|
-
constructor(label: string, collapsibleState?: TreeItemCollapsibleState);
|
|
5444
|
+
constructor(label: string | TreeItemLabel, collapsibleState?: TreeItemCollapsibleState);
|
|
5414
5445
|
|
|
5415
5446
|
/**
|
|
5416
5447
|
* @param resourceUri The [uri](#Uri) of the resource representing this item.
|
|
@@ -5437,6 +5468,23 @@ export module '@theia/plugin' {
|
|
|
5437
5468
|
Expanded = 2
|
|
5438
5469
|
}
|
|
5439
5470
|
|
|
5471
|
+
/**
|
|
5472
|
+
* Label describing the {@link TreeItem Tree item}
|
|
5473
|
+
*/
|
|
5474
|
+
export interface TreeItemLabel {
|
|
5475
|
+
|
|
5476
|
+
/**
|
|
5477
|
+
* A human-readable string describing the {@link TreeItem Tree item}.
|
|
5478
|
+
*/
|
|
5479
|
+
label: string;
|
|
5480
|
+
|
|
5481
|
+
/**
|
|
5482
|
+
* Ranges in the label to highlight. A range is defined as a tuple of two numbers where the
|
|
5483
|
+
* first is the inclusive start index and the second the exclusive end index
|
|
5484
|
+
*/
|
|
5485
|
+
highlights?: [number, number][];
|
|
5486
|
+
}
|
|
5487
|
+
|
|
5440
5488
|
/**
|
|
5441
5489
|
* Represents the configuration. It is a merged view of
|
|
5442
5490
|
*
|
|
@@ -6535,7 +6583,7 @@ export module '@theia/plugin' {
|
|
|
6535
6583
|
* the port forwarding tunnel is managed by VS Code and the tunnel can be closed by the user.
|
|
6536
6584
|
*
|
|
6537
6585
|
* Extensions should not cache the result of `asExternalUri` as the resolved uri may become invalid due to
|
|
6538
|
-
* a system or user action —
|
|
6586
|
+
* a system or user action — for example, in remote cases, a user may close a port forwarding tunnel
|
|
6539
6587
|
* that was opened by `asExternalUri`.
|
|
6540
6588
|
*
|
|
6541
6589
|
* *Note* that uris passed through `openExternal` are automatically resolved and you should not call `asExternalUri`
|
|
@@ -6709,6 +6757,10 @@ export module '@theia/plugin' {
|
|
|
6709
6757
|
* This rule will only execute if the text after the cursor matches this regular expression.
|
|
6710
6758
|
*/
|
|
6711
6759
|
afterText?: RegExp;
|
|
6760
|
+
/**
|
|
6761
|
+
* This rule will only execute if the text above the current line matches this regular expression.
|
|
6762
|
+
*/
|
|
6763
|
+
previousLineText?: RegExp;
|
|
6712
6764
|
/**
|
|
6713
6765
|
* The action to execute.
|
|
6714
6766
|
*/
|
|
@@ -10715,6 +10767,9 @@ export module '@theia/plugin' {
|
|
|
10715
10767
|
|
|
10716
10768
|
/** Controls whether to show the "Terminal will be reused by tasks, press any key to close it" message. */
|
|
10717
10769
|
showReuseMessage?: boolean;
|
|
10770
|
+
|
|
10771
|
+
/** Controls whether the terminal is cleared before executing the task. */
|
|
10772
|
+
clear?: boolean;
|
|
10718
10773
|
}
|
|
10719
10774
|
|
|
10720
10775
|
export class Task {
|