@theia/plugin 1.45.0 → 1.46.0-next.72

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.
@@ -1,62 +1,62 @@
1
- // *****************************************************************************
2
- // Copyright (C) 2023 Typefox and others.
3
- //
4
- // This program and the accompanying materials are made available under the
5
- // terms of the Eclipse Public License v. 2.0 which is available at
6
- // http://www.eclipse.org/legal/epl-2.0.
7
- //
8
- // This Source Code may also be made available under the following Secondary
9
- // Licenses when the conditions for such availability set forth in the Eclipse
10
- // Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
- // with the GNU Classpath Exception which is available at
12
- // https://www.gnu.org/software/classpath/license.html.
13
- //
14
- // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
15
- // *****************************************************************************
16
-
17
- /*---------------------------------------------------------------------------------------------
18
- * Copyright (c) Microsoft Corporation. All rights reserved.
19
- * Licensed under the MIT License. See License.txt in the project root for license information.
20
- *--------------------------------------------------------------------------------------------*/
21
-
22
- declare module '@theia/plugin' {
23
- export interface NotebookControllerDetectionTask {
24
- /**
25
- * Dispose and remove the detection task.
26
- */
27
- dispose(): void;
28
- }
29
-
30
- export class NotebookKernelSourceAction {
31
- readonly label: string;
32
- readonly description?: string;
33
- readonly detail?: string;
34
- readonly command: string | Command;
35
- readonly documentation?: Uri;
36
-
37
- constructor(label: string);
38
- }
39
-
40
- export interface NotebookKernelSourceActionProvider {
41
- /**
42
- * An optional event to signal that the kernel source actions have changed.
43
- */
44
- onDidChangeNotebookKernelSourceActions?: Event<void>;
45
- /**
46
- * Provide kernel source actions
47
- */
48
- provideNotebookKernelSourceActions(token: CancellationToken): ProviderResult<NotebookKernelSourceAction[]>;
49
- }
50
-
51
- export namespace notebooks {
52
- /**
53
- * Create notebook controller detection task
54
- */
55
- export function createNotebookControllerDetectionTask(notebookType: string): NotebookControllerDetectionTask;
56
-
57
- /**
58
- * Register a notebook kernel source action provider
59
- */
60
- export function registerKernelSourceActionProvider(notebookType: string, provider: NotebookKernelSourceActionProvider): Disposable;
61
- }
62
- }
1
+ // *****************************************************************************
2
+ // Copyright (C) 2023 Typefox and others.
3
+ //
4
+ // This program and the accompanying materials are made available under the
5
+ // terms of the Eclipse Public License v. 2.0 which is available at
6
+ // http://www.eclipse.org/legal/epl-2.0.
7
+ //
8
+ // This Source Code may also be made available under the following Secondary
9
+ // Licenses when the conditions for such availability set forth in the Eclipse
10
+ // Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
+ // with the GNU Classpath Exception which is available at
12
+ // https://www.gnu.org/software/classpath/license.html.
13
+ //
14
+ // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
15
+ // *****************************************************************************
16
+
17
+ /*---------------------------------------------------------------------------------------------
18
+ * Copyright (c) Microsoft Corporation. All rights reserved.
19
+ * Licensed under the MIT License. See License.txt in the project root for license information.
20
+ *--------------------------------------------------------------------------------------------*/
21
+
22
+ declare module '@theia/plugin' {
23
+ export interface NotebookControllerDetectionTask {
24
+ /**
25
+ * Dispose and remove the detection task.
26
+ */
27
+ dispose(): void;
28
+ }
29
+
30
+ export class NotebookKernelSourceAction {
31
+ readonly label: string;
32
+ readonly description?: string;
33
+ readonly detail?: string;
34
+ readonly command: string | Command;
35
+ readonly documentation?: Uri;
36
+
37
+ constructor(label: string);
38
+ }
39
+
40
+ export interface NotebookKernelSourceActionProvider {
41
+ /**
42
+ * An optional event to signal that the kernel source actions have changed.
43
+ */
44
+ onDidChangeNotebookKernelSourceActions?: Event<void>;
45
+ /**
46
+ * Provide kernel source actions
47
+ */
48
+ provideNotebookKernelSourceActions(token: CancellationToken): ProviderResult<NotebookKernelSourceAction[]>;
49
+ }
50
+
51
+ export namespace notebooks {
52
+ /**
53
+ * Create notebook controller detection task
54
+ */
55
+ export function createNotebookControllerDetectionTask(notebookType: string): NotebookControllerDetectionTask;
56
+
57
+ /**
58
+ * Register a notebook kernel source action provider
59
+ */
60
+ export function registerKernelSourceActionProvider(notebookType: string, provider: NotebookKernelSourceActionProvider): Disposable;
61
+ }
62
+ }
@@ -1,84 +1,84 @@
1
- // *****************************************************************************
2
- // Copyright (C) 2023 Typefox and others.
3
- //
4
- // This program and the accompanying materials are made available under the
5
- // terms of the Eclipse Public License v. 2.0 which is available at
6
- // http://www.eclipse.org/legal/epl-2.0.
7
- //
8
- // This Source Code may also be made available under the following Secondary
9
- // Licenses when the conditions for such availability set forth in the Eclipse
10
- // Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
- // with the GNU Classpath Exception which is available at
12
- // https://www.gnu.org/software/classpath/license.html.
13
- //
14
- // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
15
- // *****************************************************************************
16
-
17
- /*---------------------------------------------------------------------------------------------
18
- * Copyright (c) Microsoft Corporation. All rights reserved.
19
- * Licensed under the MIT License. See License.txt in the project root for license information.
20
- *--------------------------------------------------------------------------------------------*/
21
-
22
- declare module '@theia/plugin' {
23
-
24
- // https://github.com/microsoft/vscode/issues/123601
25
-
26
- /**
27
- * Represents a script that is loaded into the notebook renderer before rendering output. This allows
28
- * to provide and share functionality for notebook markup and notebook output renderers.
29
- */
30
- export class NotebookRendererScript {
31
-
32
- /**
33
- * APIs that the preload provides to the renderer. These are matched
34
- * against the `dependencies` and `optionalDependencies` arrays in the
35
- * notebook renderer contribution point.
36
- */
37
- provides: readonly string[];
38
-
39
- /**
40
- * URI of the JavaScript module to preload.
41
- *
42
- * This module must export an `activate` function that takes a context object that contains the notebook API.
43
- */
44
- uri: Uri;
45
-
46
- /**
47
- * @param uri URI of the JavaScript module to preload
48
- * @param provides Value for the `provides` property
49
- */
50
- constructor(uri: Uri, provides?: string | readonly string[]);
51
- }
52
-
53
- export interface NotebookController {
54
-
55
- // todo@API allow add, not remove
56
- readonly rendererScripts: NotebookRendererScript[];
57
-
58
- /**
59
- * An event that fires when a {@link NotebookController.rendererScripts renderer script} has send a message to
60
- * the controller.
61
- */
62
- readonly onDidReceiveMessage: Event<{ readonly editor: NotebookEditor; readonly message: unknown }>;
63
-
64
- /**
65
- * Send a message to the renderer of notebook editors.
66
- *
67
- * Note that only editors showing documents that are bound to this controller
68
- * are receiving the message.
69
- *
70
- * @param message The message to send.
71
- * @param editor A specific editor to send the message to. When `undefined` all applicable editors are receiving the message.
72
- * @returns A promise that resolves to a boolean indicating if the message has been send or not.
73
- */
74
- postMessage(message: unknown, editor?: NotebookEditor): Thenable<boolean>;
75
-
76
- asWebviewUri(localResource: Uri): Uri;
77
- }
78
-
79
- export namespace notebooks {
80
-
81
- export function createNotebookController(id: string, viewType: string, label: string, handler?: (cells: NotebookCell[], notebook: NotebookDocument,
82
- controller: NotebookController) => void | Thenable<void>, rendererScripts?: NotebookRendererScript[]): NotebookController;
83
- }
84
- }
1
+ // *****************************************************************************
2
+ // Copyright (C) 2023 Typefox and others.
3
+ //
4
+ // This program and the accompanying materials are made available under the
5
+ // terms of the Eclipse Public License v. 2.0 which is available at
6
+ // http://www.eclipse.org/legal/epl-2.0.
7
+ //
8
+ // This Source Code may also be made available under the following Secondary
9
+ // Licenses when the conditions for such availability set forth in the Eclipse
10
+ // Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
+ // with the GNU Classpath Exception which is available at
12
+ // https://www.gnu.org/software/classpath/license.html.
13
+ //
14
+ // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
15
+ // *****************************************************************************
16
+
17
+ /*---------------------------------------------------------------------------------------------
18
+ * Copyright (c) Microsoft Corporation. All rights reserved.
19
+ * Licensed under the MIT License. See License.txt in the project root for license information.
20
+ *--------------------------------------------------------------------------------------------*/
21
+
22
+ declare module '@theia/plugin' {
23
+
24
+ // https://github.com/microsoft/vscode/issues/123601
25
+
26
+ /**
27
+ * Represents a script that is loaded into the notebook renderer before rendering output. This allows
28
+ * to provide and share functionality for notebook markup and notebook output renderers.
29
+ */
30
+ export class NotebookRendererScript {
31
+
32
+ /**
33
+ * APIs that the preload provides to the renderer. These are matched
34
+ * against the `dependencies` and `optionalDependencies` arrays in the
35
+ * notebook renderer contribution point.
36
+ */
37
+ provides: readonly string[];
38
+
39
+ /**
40
+ * URI of the JavaScript module to preload.
41
+ *
42
+ * This module must export an `activate` function that takes a context object that contains the notebook API.
43
+ */
44
+ uri: Uri;
45
+
46
+ /**
47
+ * @param uri URI of the JavaScript module to preload
48
+ * @param provides Value for the `provides` property
49
+ */
50
+ constructor(uri: Uri, provides?: string | readonly string[]);
51
+ }
52
+
53
+ export interface NotebookController {
54
+
55
+ // todo@API allow add, not remove
56
+ readonly rendererScripts: NotebookRendererScript[];
57
+
58
+ /**
59
+ * An event that fires when a {@link NotebookController.rendererScripts renderer script} has send a message to
60
+ * the controller.
61
+ */
62
+ readonly onDidReceiveMessage: Event<{ readonly editor: NotebookEditor; readonly message: unknown }>;
63
+
64
+ /**
65
+ * Send a message to the renderer of notebook editors.
66
+ *
67
+ * Note that only editors showing documents that are bound to this controller
68
+ * are receiving the message.
69
+ *
70
+ * @param message The message to send.
71
+ * @param editor A specific editor to send the message to. When `undefined` all applicable editors are receiving the message.
72
+ * @returns A promise that resolves to a boolean indicating if the message has been send or not.
73
+ */
74
+ postMessage(message: unknown, editor?: NotebookEditor): Thenable<boolean>;
75
+
76
+ asWebviewUri(localResource: Uri): Uri;
77
+ }
78
+
79
+ export namespace notebooks {
80
+
81
+ export function createNotebookController(id: string, viewType: string, label: string, handler?: (cells: NotebookCell[], notebook: NotebookDocument,
82
+ controller: NotebookController) => void | Thenable<void>, rendererScripts?: NotebookRendererScript[]): NotebookController;
83
+ }
84
+ }
@@ -1,35 +1,35 @@
1
- // *****************************************************************************
2
- // Copyright (C) 2023 Ericsson and others.
3
- //
4
- // This program and the accompanying materials are made available under the
5
- // terms of the Eclipse Public License v. 2.0 which is available at
6
- // http://www.eclipse.org/legal/epl-2.0.
7
- //
8
- // This Source Code may also be made available under the following Secondary
9
- // Licenses when the conditions for such availability set forth in the Eclipse
10
- // Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
- // with the GNU Classpath Exception which is available at
12
- // https://www.gnu.org/software/classpath/license.html.
13
- //
14
- // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
15
- // *****************************************************************************
16
-
17
- /*---------------------------------------------------------------------------------------------
18
- * Copyright (c) Microsoft Corporation. All rights reserved.
19
- * Licensed under the MIT License. See License.txt in the project root for license information.
20
- *--------------------------------------------------------------------------------------------*/
21
- // code copied and modified from https://github.com/microsoft/vscode/blob/1.77.0/src/vscode-dts/vscode.proposed.profileContentHandlers.d.ts
22
-
23
- export module '@theia/plugin' {
24
-
25
- export interface ProfileContentHandler {
26
- readonly name: string;
27
- saveProfile(name: string, content: string, token: CancellationToken): Thenable<Uri | null>;
28
- readProfile(uri: Uri, token: CancellationToken): Thenable<string | null>;
29
- }
30
-
31
- export namespace window {
32
- export function registerProfileContentHandler(id: string, profileContentHandler: ProfileContentHandler): Disposable;
33
- }
34
-
35
- }
1
+ // *****************************************************************************
2
+ // Copyright (C) 2023 Ericsson and others.
3
+ //
4
+ // This program and the accompanying materials are made available under the
5
+ // terms of the Eclipse Public License v. 2.0 which is available at
6
+ // http://www.eclipse.org/legal/epl-2.0.
7
+ //
8
+ // This Source Code may also be made available under the following Secondary
9
+ // Licenses when the conditions for such availability set forth in the Eclipse
10
+ // Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
+ // with the GNU Classpath Exception which is available at
12
+ // https://www.gnu.org/software/classpath/license.html.
13
+ //
14
+ // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
15
+ // *****************************************************************************
16
+
17
+ /*---------------------------------------------------------------------------------------------
18
+ * Copyright (c) Microsoft Corporation. All rights reserved.
19
+ * Licensed under the MIT License. See License.txt in the project root for license information.
20
+ *--------------------------------------------------------------------------------------------*/
21
+ // code copied and modified from https://github.com/microsoft/vscode/blob/1.77.0/src/vscode-dts/vscode.proposed.profileContentHandlers.d.ts
22
+
23
+ export module '@theia/plugin' {
24
+
25
+ export interface ProfileContentHandler {
26
+ readonly name: string;
27
+ saveProfile(name: string, content: string, token: CancellationToken): Thenable<Uri | null>;
28
+ readProfile(uri: Uri, token: CancellationToken): Thenable<string | null>;
29
+ }
30
+
31
+ export namespace window {
32
+ export function registerProfileContentHandler(id: string, profileContentHandler: ProfileContentHandler): Disposable;
33
+ }
34
+
35
+ }
@@ -1,44 +1,44 @@
1
- // *****************************************************************************
2
- // Copyright (C) 2023 Ericsson and others.
3
- //
4
- // This program and the accompanying materials are made available under the
5
- // terms of the Eclipse Public License v. 2.0 which is available at
6
- // http://www.eclipse.org/legal/epl-2.0.
7
- //
8
- // This Source Code may also be made available under the following Secondary
9
- // Licenses when the conditions for such availability set forth in the Eclipse
10
- // Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
- // with the GNU Classpath Exception which is available at
12
- // https://www.gnu.org/software/classpath/license.html.
13
- //
14
- // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
15
- // *****************************************************************************
16
-
17
- /*---------------------------------------------------------------------------------------------
18
- * Copyright (c) Microsoft Corporation. All rights reserved.
19
- * Licensed under the MIT License. See License.txt in the project root for license information.
20
- *--------------------------------------------------------------------------------------------*/
21
- // code copied and modified from https://github.com/microsoft/vscode/blob/1.77.0/src/vscode-dts/vscode.proposed.resolvers.d.ts
22
-
23
- export module '@theia/plugin' {
24
-
25
- export interface ResourceLabelFormatter {
26
- scheme: string;
27
- authority?: string;
28
- formatting: ResourceLabelFormatting;
29
- }
30
-
31
- export interface ResourceLabelFormatting {
32
- label: string; // myLabel:/${path}
33
- separator: '/' | '\\' | '';
34
- tildify?: boolean;
35
- normalizeDriveLetter?: boolean;
36
- workspaceSuffix?: string;
37
- authorityPrefix?: string;
38
- }
39
-
40
- export namespace workspace {
41
- export function registerResourceLabelFormatter(formatter: ResourceLabelFormatter): Disposable;
42
- }
43
-
44
- }
1
+ // *****************************************************************************
2
+ // Copyright (C) 2023 Ericsson and others.
3
+ //
4
+ // This program and the accompanying materials are made available under the
5
+ // terms of the Eclipse Public License v. 2.0 which is available at
6
+ // http://www.eclipse.org/legal/epl-2.0.
7
+ //
8
+ // This Source Code may also be made available under the following Secondary
9
+ // Licenses when the conditions for such availability set forth in the Eclipse
10
+ // Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
+ // with the GNU Classpath Exception which is available at
12
+ // https://www.gnu.org/software/classpath/license.html.
13
+ //
14
+ // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
15
+ // *****************************************************************************
16
+
17
+ /*---------------------------------------------------------------------------------------------
18
+ * Copyright (c) Microsoft Corporation. All rights reserved.
19
+ * Licensed under the MIT License. See License.txt in the project root for license information.
20
+ *--------------------------------------------------------------------------------------------*/
21
+ // code copied and modified from https://github.com/microsoft/vscode/blob/1.77.0/src/vscode-dts/vscode.proposed.resolvers.d.ts
22
+
23
+ export module '@theia/plugin' {
24
+
25
+ export interface ResourceLabelFormatter {
26
+ scheme: string;
27
+ authority?: string;
28
+ formatting: ResourceLabelFormatting;
29
+ }
30
+
31
+ export interface ResourceLabelFormatting {
32
+ label: string; // myLabel:/${path}
33
+ separator: '/' | '\\' | '';
34
+ tildify?: boolean;
35
+ normalizeDriveLetter?: boolean;
36
+ workspaceSuffix?: string;
37
+ authorityPrefix?: string;
38
+ }
39
+
40
+ export namespace workspace {
41
+ export function registerResourceLabelFormatter(formatter: ResourceLabelFormatter): Disposable;
42
+ }
43
+
44
+ }
@@ -1,70 +1,70 @@
1
- // *****************************************************************************
2
- // Copyright (C) 2023 Ericsson and others.
3
- //
4
- // This program and the accompanying materials are made available under the
5
- // terms of the Eclipse Public License v. 2.0 which is available at
6
- // http://www.eclipse.org/legal/epl-2.0.
7
- //
8
- // This Source Code may also be made available under the following Secondary
9
- // Licenses when the conditions for such availability set forth in the Eclipse
10
- // Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
- // with the GNU Classpath Exception which is available at
12
- // https://www.gnu.org/software/classpath/license.html.
13
- //
14
- // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
15
- // *****************************************************************************
16
-
17
- /*---------------------------------------------------------------------------------------------
18
- * Copyright (c) Microsoft Corporation. All rights reserved.
19
- * Licensed under the MIT License. See License.txt in the project root for license information.
20
- *--------------------------------------------------------------------------------------------*/
21
- // code copied and modified from https://github.com/microsoft/vscode/blob/1.77.0/src/vscode-dts/vscode.proposed.scmValidation.d.ts
22
-
23
- export module '@theia/plugin' {
24
-
25
- /**
26
- * Represents the validation type of the Source Control input.
27
- */
28
- export enum SourceControlInputBoxValidationType {
29
-
30
- /**
31
- * Something not allowed by the rules of a language or other means.
32
- */
33
- Error = 0,
34
-
35
- /**
36
- * Something suspicious but allowed.
37
- */
38
- Warning = 1,
39
-
40
- /**
41
- * Something to inform about but not a problem.
42
- */
43
- Information = 2
44
- }
45
-
46
- export interface SourceControlInputBoxValidation {
47
-
48
- /**
49
- * The validation message to display.
50
- */
51
- readonly message: string;
52
-
53
- /**
54
- * The validation type.
55
- */
56
- readonly type: SourceControlInputBoxValidationType;
57
- }
58
-
59
- /**
60
- * Represents the input box in the Source Control viewlet.
61
- */
62
- export interface SourceControlInputBox {
63
-
64
- /**
65
- * A validation function for the input box. It's possible to change
66
- * the validation provider simply by setting this property to a different function.
67
- */
68
- validateInput?(value: string, cursorPosition: number): ProviderResult<SourceControlInputBoxValidation | undefined | null>;
69
- }
70
- }
1
+ // *****************************************************************************
2
+ // Copyright (C) 2023 Ericsson and others.
3
+ //
4
+ // This program and the accompanying materials are made available under the
5
+ // terms of the Eclipse Public License v. 2.0 which is available at
6
+ // http://www.eclipse.org/legal/epl-2.0.
7
+ //
8
+ // This Source Code may also be made available under the following Secondary
9
+ // Licenses when the conditions for such availability set forth in the Eclipse
10
+ // Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
+ // with the GNU Classpath Exception which is available at
12
+ // https://www.gnu.org/software/classpath/license.html.
13
+ //
14
+ // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
15
+ // *****************************************************************************
16
+
17
+ /*---------------------------------------------------------------------------------------------
18
+ * Copyright (c) Microsoft Corporation. All rights reserved.
19
+ * Licensed under the MIT License. See License.txt in the project root for license information.
20
+ *--------------------------------------------------------------------------------------------*/
21
+ // code copied and modified from https://github.com/microsoft/vscode/blob/1.77.0/src/vscode-dts/vscode.proposed.scmValidation.d.ts
22
+
23
+ export module '@theia/plugin' {
24
+
25
+ /**
26
+ * Represents the validation type of the Source Control input.
27
+ */
28
+ export enum SourceControlInputBoxValidationType {
29
+
30
+ /**
31
+ * Something not allowed by the rules of a language or other means.
32
+ */
33
+ Error = 0,
34
+
35
+ /**
36
+ * Something suspicious but allowed.
37
+ */
38
+ Warning = 1,
39
+
40
+ /**
41
+ * Something to inform about but not a problem.
42
+ */
43
+ Information = 2
44
+ }
45
+
46
+ export interface SourceControlInputBoxValidation {
47
+
48
+ /**
49
+ * The validation message to display.
50
+ */
51
+ readonly message: string;
52
+
53
+ /**
54
+ * The validation type.
55
+ */
56
+ readonly type: SourceControlInputBoxValidationType;
57
+ }
58
+
59
+ /**
60
+ * Represents the input box in the Source Control viewlet.
61
+ */
62
+ export interface SourceControlInputBox {
63
+
64
+ /**
65
+ * A validation function for the input box. It's possible to change
66
+ * the validation provider simply by setting this property to a different function.
67
+ */
68
+ validateInput?(value: string, cursorPosition: number): ProviderResult<SourceControlInputBoxValidation | undefined | null>;
69
+ }
70
+ }