@theia/plugin 1.27.0-next.3 → 1.27.0-next.30
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.d.ts +59 -40
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.30+b3adc5ae1b4",
|
|
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": "b3adc5ae1b46641c5429d171a03f6e9169307340"
|
|
36
36
|
}
|
package/src/theia.d.ts
CHANGED
|
@@ -2652,7 +2652,22 @@ export module '@theia/plugin' {
|
|
|
2652
2652
|
*/
|
|
2653
2653
|
static readonly Folder: ThemeIcon;
|
|
2654
2654
|
|
|
2655
|
-
|
|
2655
|
+
/**
|
|
2656
|
+
* The id of the icon. The available icons are listed in https://code.visualstudio.com/api/references/icons-in-labels#icon-listing.
|
|
2657
|
+
*/
|
|
2658
|
+
readonly id: string;
|
|
2659
|
+
|
|
2660
|
+
/**
|
|
2661
|
+
* The optional ThemeColor of the icon. The color is currently only used in {@link TreeItem}.
|
|
2662
|
+
*/
|
|
2663
|
+
readonly color?: ThemeColor | undefined;
|
|
2664
|
+
|
|
2665
|
+
/**
|
|
2666
|
+
* Creates a reference to a theme icon.
|
|
2667
|
+
* @param id id of the icon. The available icons are listed in https://code.visualstudio.com/api/references/icons-in-labels#icon-listing.
|
|
2668
|
+
* @param color optional `ThemeColor` for the icon. The color is currently only used in {@link TreeItem}.
|
|
2669
|
+
*/
|
|
2670
|
+
private constructor(public id: string, public color?: ThemeColor);
|
|
2656
2671
|
}
|
|
2657
2672
|
|
|
2658
2673
|
/**
|
|
@@ -4268,6 +4283,44 @@ export module '@theia/plugin' {
|
|
|
4268
4283
|
resolveWebviewView(webviewView: WebviewView, context: WebviewViewResolveContext, token: CancellationToken): Thenable<void> | void;
|
|
4269
4284
|
}
|
|
4270
4285
|
|
|
4286
|
+
/**
|
|
4287
|
+
* Additional information the webview view being resolved.
|
|
4288
|
+
*
|
|
4289
|
+
* @param T Type of the webview's state.
|
|
4290
|
+
*/
|
|
4291
|
+
interface WebviewViewResolveContext<T = unknown> {
|
|
4292
|
+
/**
|
|
4293
|
+
* Persisted state from the webview content.
|
|
4294
|
+
*
|
|
4295
|
+
* To save resources, VS Code normally deallocates webview documents (the iframe content) that are not visible.
|
|
4296
|
+
* For example, when the user collapse a view or switches to another top level activity in the sidebar, the
|
|
4297
|
+
* `WebviewView` itself is kept alive but the webview's underlying document is deallocated. It is recreated when
|
|
4298
|
+
* the view becomes visible again.
|
|
4299
|
+
*
|
|
4300
|
+
* You can prevent this behavior by setting `retainContextWhenHidden` in the `WebviewOptions`. However this
|
|
4301
|
+
* increases resource usage and should be avoided wherever possible. Instead, you can use persisted state to
|
|
4302
|
+
* save off a webview's state so that it can be quickly recreated as needed.
|
|
4303
|
+
*
|
|
4304
|
+
* To save off a persisted state, inside the webview call `acquireVsCodeApi().setState()` with
|
|
4305
|
+
* any json serializable object. To restore the state again, call `getState()`. For example:
|
|
4306
|
+
*
|
|
4307
|
+
* ```js
|
|
4308
|
+
* // Within the webview
|
|
4309
|
+
* const vscode = acquireVsCodeApi();
|
|
4310
|
+
*
|
|
4311
|
+
* // Get existing state
|
|
4312
|
+
* const oldState = vscode.getState() || { value: 0 };
|
|
4313
|
+
*
|
|
4314
|
+
* // Update state
|
|
4315
|
+
* setState({ value: oldState.value + 1 })
|
|
4316
|
+
* ```
|
|
4317
|
+
*
|
|
4318
|
+
* VS Code ensures that the persisted state is saved correctly when a webview is hidden and across
|
|
4319
|
+
* editor restarts.
|
|
4320
|
+
*/
|
|
4321
|
+
readonly state: T | undefined;
|
|
4322
|
+
}
|
|
4323
|
+
|
|
4271
4324
|
/**
|
|
4272
4325
|
* Common namespace for dealing with window and editor, showing messages and user input.
|
|
4273
4326
|
*/
|
|
@@ -4609,44 +4662,6 @@ export module '@theia/plugin' {
|
|
|
4609
4662
|
* @param serializer Webview serializer.
|
|
4610
4663
|
*/
|
|
4611
4664
|
|
|
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
4665
|
export function registerWebviewViewProvider(viewId: string, provider: WebviewViewProvider, options?: {
|
|
4651
4666
|
/**
|
|
4652
4667
|
* Content settings for the webview created for this view.
|
|
@@ -6535,7 +6550,7 @@ export module '@theia/plugin' {
|
|
|
6535
6550
|
* the port forwarding tunnel is managed by VS Code and the tunnel can be closed by the user.
|
|
6536
6551
|
*
|
|
6537
6552
|
* Extensions should not cache the result of `asExternalUri` as the resolved uri may become invalid due to
|
|
6538
|
-
* a system or user action —
|
|
6553
|
+
* a system or user action — for example, in remote cases, a user may close a port forwarding tunnel
|
|
6539
6554
|
* that was opened by `asExternalUri`.
|
|
6540
6555
|
*
|
|
6541
6556
|
* *Note* that uris passed through `openExternal` are automatically resolved and you should not call `asExternalUri`
|
|
@@ -6709,6 +6724,10 @@ export module '@theia/plugin' {
|
|
|
6709
6724
|
* This rule will only execute if the text after the cursor matches this regular expression.
|
|
6710
6725
|
*/
|
|
6711
6726
|
afterText?: RegExp;
|
|
6727
|
+
/**
|
|
6728
|
+
* This rule will only execute if the text above the current line matches this regular expression.
|
|
6729
|
+
*/
|
|
6730
|
+
previousLineText?: RegExp;
|
|
6712
6731
|
/**
|
|
6713
6732
|
* The action to execute.
|
|
6714
6733
|
*/
|