@theia/plugin 1.48.1 → 1.48.2

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,64 +1,64 @@
1
- // *****************************************************************************
2
- // Copyright (C) 2023 STMicroelectronics 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
- * Copyright (c) Microsoft Corporation. All rights reserved.
18
- * Licensed under the MIT License. See License.txt in the project root for license information.
19
- *--------------------------------------------------------------------------------------------*/
20
-
21
- // code copied and modified from https://github.com/microsoft/vscode/blob/1.79.0/src/vscode-dts/vscode.proposed.canonicalUriProvider.d.ts
22
-
23
- export module '@theia/plugin' {
24
-
25
- // https://github.com/microsoft/vscode/issues/180582
26
-
27
- export namespace workspace {
28
- /**
29
- *
30
- * @param scheme The URI scheme that this provider can provide canonical URIs for.
31
- * A canonical URI represents the conversion of a resource's alias into a source of truth URI.
32
- * Multiple aliases may convert to the same source of truth URI.
33
- * @param provider A provider which can convert URIs of scheme @param scheme to
34
- * a canonical URI which is stable across machines.
35
- */
36
- export function registerCanonicalUriProvider(scheme: string, provider: CanonicalUriProvider): Disposable;
37
-
38
- /**
39
- *
40
- * @param uri The URI to provide a canonical URI for.
41
- * @param token A cancellation token for the request.
42
- */
43
- export function getCanonicalUri(uri: Uri, options: CanonicalUriRequestOptions, token: CancellationToken): ProviderResult<Uri>;
44
- }
45
-
46
- export interface CanonicalUriProvider {
47
- /**
48
- *
49
- * @param uri The URI to provide a canonical URI for.
50
- * @param options Options that the provider should honor in the URI it returns.
51
- * @param token A cancellation token for the request.
52
- * @returns The canonical URI for the requested URI or undefined if no canonical URI can be provided.
53
- */
54
- provideCanonicalUri(uri: Uri, options: CanonicalUriRequestOptions, token: CancellationToken): ProviderResult<Uri>;
55
- }
56
-
57
- export interface CanonicalUriRequestOptions {
58
- /**
59
- *
60
- * The desired scheme of the canonical URI.
61
- */
62
- targetScheme: string;
63
- }
64
- }
1
+ // *****************************************************************************
2
+ // Copyright (C) 2023 STMicroelectronics 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
+ * Copyright (c) Microsoft Corporation. All rights reserved.
18
+ * Licensed under the MIT License. See License.txt in the project root for license information.
19
+ *--------------------------------------------------------------------------------------------*/
20
+
21
+ // code copied and modified from https://github.com/microsoft/vscode/blob/1.79.0/src/vscode-dts/vscode.proposed.canonicalUriProvider.d.ts
22
+
23
+ export module '@theia/plugin' {
24
+
25
+ // https://github.com/microsoft/vscode/issues/180582
26
+
27
+ export namespace workspace {
28
+ /**
29
+ *
30
+ * @param scheme The URI scheme that this provider can provide canonical URIs for.
31
+ * A canonical URI represents the conversion of a resource's alias into a source of truth URI.
32
+ * Multiple aliases may convert to the same source of truth URI.
33
+ * @param provider A provider which can convert URIs of scheme @param scheme to
34
+ * a canonical URI which is stable across machines.
35
+ */
36
+ export function registerCanonicalUriProvider(scheme: string, provider: CanonicalUriProvider): Disposable;
37
+
38
+ /**
39
+ *
40
+ * @param uri The URI to provide a canonical URI for.
41
+ * @param token A cancellation token for the request.
42
+ */
43
+ export function getCanonicalUri(uri: Uri, options: CanonicalUriRequestOptions, token: CancellationToken): ProviderResult<Uri>;
44
+ }
45
+
46
+ export interface CanonicalUriProvider {
47
+ /**
48
+ *
49
+ * @param uri The URI to provide a canonical URI for.
50
+ * @param options Options that the provider should honor in the URI it returns.
51
+ * @param token A cancellation token for the request.
52
+ * @returns The canonical URI for the requested URI or undefined if no canonical URI can be provided.
53
+ */
54
+ provideCanonicalUri(uri: Uri, options: CanonicalUriRequestOptions, token: CancellationToken): ProviderResult<Uri>;
55
+ }
56
+
57
+ export interface CanonicalUriRequestOptions {
58
+ /**
59
+ *
60
+ * The desired scheme of the canonical URI.
61
+ */
62
+ targetScheme: string;
63
+ }
64
+ }
@@ -1,41 +1,41 @@
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.customEditorMove.d.ts
22
-
23
- export module '@theia/plugin' {
24
-
25
- export interface CustomTextEditorProvider {
26
-
27
- /**
28
- * Handle when the underlying resource for a custom editor is renamed.
29
- *
30
- * This allows the webview for the editor be preserved throughout the rename. If this method is not implemented,
31
- * the editor will destroy the previous custom editor and create a replacement one.
32
- *
33
- * @param newDocument New text document to use for the custom editor.
34
- * @param existingWebviewPanel Webview panel for the custom editor.
35
- * @param token A cancellation token that indicates the result is no longer needed.
36
- *
37
- * @return Thenable indicating that the webview editor has been moved.
38
- */
39
- moveCustomTextEditor?(newDocument: TextDocument, existingWebviewPanel: WebviewPanel, token: CancellationToken): Thenable<void>;
40
- }
41
- }
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.customEditorMove.d.ts
22
+
23
+ export module '@theia/plugin' {
24
+
25
+ export interface CustomTextEditorProvider {
26
+
27
+ /**
28
+ * Handle when the underlying resource for a custom editor is renamed.
29
+ *
30
+ * This allows the webview for the editor be preserved throughout the rename. If this method is not implemented,
31
+ * the editor will destroy the previous custom editor and create a replacement one.
32
+ *
33
+ * @param newDocument New text document to use for the custom editor.
34
+ * @param existingWebviewPanel Webview panel for the custom editor.
35
+ * @param token A cancellation token that indicates the result is no longer needed.
36
+ *
37
+ * @return Thenable indicating that the webview editor has been moved.
38
+ */
39
+ moveCustomTextEditor?(newDocument: TextDocument, existingWebviewPanel: WebviewPanel, token: CancellationToken): Thenable<void>;
40
+ }
41
+ }
@@ -1,55 +1,55 @@
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.diffCommand.d.ts
22
-
23
- export module '@theia/plugin' {
24
-
25
- /**
26
- * The contiguous set of modified lines in a diff.
27
- */
28
- export interface LineChange {
29
- readonly originalStartLineNumber: number;
30
- readonly originalEndLineNumber: number;
31
- readonly modifiedStartLineNumber: number;
32
- readonly modifiedEndLineNumber: number;
33
- }
34
-
35
- export namespace commands {
36
-
37
- /**
38
- * Registers a diff information command that can be invoked via a keyboard shortcut,
39
- * a menu item, an action, or directly.
40
- *
41
- * Diff information commands are different from ordinary {@link commands.registerCommand commands} as
42
- * they only execute when there is an active diff editor when the command is called, and the diff
43
- * information has been computed. Also, the command handler of an editor command has access to
44
- * the diff information.
45
- *
46
- * @param command A unique identifier for the command.
47
- * @param callback A command handler function with access to the {@link LineChange diff information}.
48
- * @param thisArg The `this` context used when invoking the handler function.
49
- * @return Disposable which unregisters this command on disposal.
50
- */
51
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
52
- export function registerDiffInformationCommand(command: string, callback: (diff: LineChange[], ...args: any[]) => any, thisArg?: any): Disposable;
53
- }
54
-
55
- }
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.diffCommand.d.ts
22
+
23
+ export module '@theia/plugin' {
24
+
25
+ /**
26
+ * The contiguous set of modified lines in a diff.
27
+ */
28
+ export interface LineChange {
29
+ readonly originalStartLineNumber: number;
30
+ readonly originalEndLineNumber: number;
31
+ readonly modifiedStartLineNumber: number;
32
+ readonly modifiedEndLineNumber: number;
33
+ }
34
+
35
+ export namespace commands {
36
+
37
+ /**
38
+ * Registers a diff information command that can be invoked via a keyboard shortcut,
39
+ * a menu item, an action, or directly.
40
+ *
41
+ * Diff information commands are different from ordinary {@link commands.registerCommand commands} as
42
+ * they only execute when there is an active diff editor when the command is called, and the diff
43
+ * information has been computed. Also, the command handler of an editor command has access to
44
+ * the diff information.
45
+ *
46
+ * @param command A unique identifier for the command.
47
+ * @param callback A command handler function with access to the {@link LineChange diff information}.
48
+ * @param thisArg The `this` context used when invoking the handler function.
49
+ * @return Disposable which unregisters this command on disposal.
50
+ */
51
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
52
+ export function registerDiffInformationCommand(command: string, callback: (diff: LineChange[], ...args: any[]) => any, thisArg?: any): Disposable;
53
+ }
54
+
55
+ }
@@ -1,125 +1,125 @@
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.79.0/src/vscode-dts/vscode.proposed.documentPaste.d.ts
22
-
23
- export module '@theia/plugin' {
24
-
25
- /**
26
- * Provider invoked when the user copies and pastes code.
27
- */
28
- export interface DocumentPasteEditProvider {
29
-
30
- /**
31
- * Optional method invoked after the user copies text in a file.
32
- *
33
- * During {@link prepareDocumentPaste}, an extension can compute metadata that is attached to
34
- * a {@link DataTransfer} and is passed back to the provider in {@link provideDocumentPasteEdits}.
35
- *
36
- * @param document Document where the copy took place.
37
- * @param ranges Ranges being copied in the `document`.
38
- * @param dataTransfer The data transfer associated with the copy. You can store additional values on this for later use in {@link provideDocumentPasteEdits}.
39
- * @param token A cancellation token.
40
- */
41
- prepareDocumentPaste?(document: TextDocument, ranges: readonly Range[], dataTransfer: DataTransfer, token: CancellationToken): void | Thenable<void>;
42
-
43
- /**
44
- * Invoked before the user pastes into a document.
45
- *
46
- * In this method, extensions can return a workspace edit that replaces the standard pasting behavior.
47
- *
48
- * @param document Document being pasted into
49
- * @param ranges Currently selected ranges in the document.
50
- * @param dataTransfer The data transfer associated with the paste.
51
- * @param token A cancellation token.
52
- *
53
- * @return Optional workspace edit that applies the paste. Return undefined to use standard pasting.
54
- */
55
- provideDocumentPasteEdits?(document: TextDocument, ranges: readonly Range[], dataTransfer: DataTransfer, token: CancellationToken): ProviderResult<DocumentPasteEdit>;
56
- }
57
-
58
- /**
59
- * An operation applied on paste
60
- */
61
- class DocumentPasteEdit {
62
- /**
63
- * Human readable label that describes the edit.
64
- */
65
- label: string;
66
-
67
- /**
68
- * Controls the ordering or multiple paste edits. If this provider yield to edits, it will be shown lower in the list.
69
- */
70
- yieldTo?: ReadonlyArray<
71
- | { readonly extensionId: string; readonly providerId: string }
72
- | { readonly mimeType: string }
73
- >;
74
-
75
- /**
76
- * The text or snippet to insert at the pasted locations.
77
- */
78
- insertText: string | SnippetString;
79
-
80
- /**
81
- * An optional additional edit to apply on paste.
82
- */
83
- additionalEdit?: WorkspaceEdit;
84
-
85
- /**
86
- * @param insertText The text or snippet to insert at the pasted locations.
87
- *
88
- * TODO: Reverse args, but this will break existing consumers :(
89
- */
90
- constructor(insertText: string | SnippetString, id: string, label: string);
91
- }
92
-
93
- interface DocumentPasteProviderMetadata {
94
- /**
95
- * Identifies the provider.
96
- *
97
- * This id is used when users configure the default provider for paste.
98
- *
99
- * This id should be unique within the extension but does not need to be unique across extensions.
100
- */
101
- readonly id: string;
102
-
103
- /**
104
- * Mime types that {@link DocumentPasteEditProvider.prepareDocumentPaste provideDocumentPasteEdits} may add on copy.
105
- */
106
- readonly copyMimeTypes?: readonly string[];
107
-
108
- /**
109
- * Mime types that {@link DocumentPasteEditProvider.provideDocumentPasteEdits provideDocumentPasteEdits} should be invoked for.
110
- *
111
- * This can either be an exact mime type such as `image/png`, or a wildcard pattern such as `image/*`.
112
- *
113
- * Use `text/uri-list` for resources dropped from the explorer or other tree views in the workbench.
114
- *
115
- * Use `files` to indicate that the provider should be invoked if any {@link DataTransferFile files} are present in the {@link DataTransfer}.
116
- * Note that {@link DataTransferFile} entries are only created when dropping content from outside the editor, such as
117
- * from the operating system.
118
- */
119
- readonly pasteMimeTypes?: readonly string[];
120
- }
121
-
122
- namespace languages {
123
- export function registerDocumentPasteEditProvider(selector: DocumentSelector, provider: DocumentPasteEditProvider, metadata: DocumentPasteProviderMetadata): Disposable;
124
- }
125
- }
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.79.0/src/vscode-dts/vscode.proposed.documentPaste.d.ts
22
+
23
+ export module '@theia/plugin' {
24
+
25
+ /**
26
+ * Provider invoked when the user copies and pastes code.
27
+ */
28
+ export interface DocumentPasteEditProvider {
29
+
30
+ /**
31
+ * Optional method invoked after the user copies text in a file.
32
+ *
33
+ * During {@link prepareDocumentPaste}, an extension can compute metadata that is attached to
34
+ * a {@link DataTransfer} and is passed back to the provider in {@link provideDocumentPasteEdits}.
35
+ *
36
+ * @param document Document where the copy took place.
37
+ * @param ranges Ranges being copied in the `document`.
38
+ * @param dataTransfer The data transfer associated with the copy. You can store additional values on this for later use in {@link provideDocumentPasteEdits}.
39
+ * @param token A cancellation token.
40
+ */
41
+ prepareDocumentPaste?(document: TextDocument, ranges: readonly Range[], dataTransfer: DataTransfer, token: CancellationToken): void | Thenable<void>;
42
+
43
+ /**
44
+ * Invoked before the user pastes into a document.
45
+ *
46
+ * In this method, extensions can return a workspace edit that replaces the standard pasting behavior.
47
+ *
48
+ * @param document Document being pasted into
49
+ * @param ranges Currently selected ranges in the document.
50
+ * @param dataTransfer The data transfer associated with the paste.
51
+ * @param token A cancellation token.
52
+ *
53
+ * @return Optional workspace edit that applies the paste. Return undefined to use standard pasting.
54
+ */
55
+ provideDocumentPasteEdits?(document: TextDocument, ranges: readonly Range[], dataTransfer: DataTransfer, token: CancellationToken): ProviderResult<DocumentPasteEdit>;
56
+ }
57
+
58
+ /**
59
+ * An operation applied on paste
60
+ */
61
+ class DocumentPasteEdit {
62
+ /**
63
+ * Human readable label that describes the edit.
64
+ */
65
+ label: string;
66
+
67
+ /**
68
+ * Controls the ordering or multiple paste edits. If this provider yield to edits, it will be shown lower in the list.
69
+ */
70
+ yieldTo?: ReadonlyArray<
71
+ | { readonly extensionId: string; readonly providerId: string }
72
+ | { readonly mimeType: string }
73
+ >;
74
+
75
+ /**
76
+ * The text or snippet to insert at the pasted locations.
77
+ */
78
+ insertText: string | SnippetString;
79
+
80
+ /**
81
+ * An optional additional edit to apply on paste.
82
+ */
83
+ additionalEdit?: WorkspaceEdit;
84
+
85
+ /**
86
+ * @param insertText The text or snippet to insert at the pasted locations.
87
+ *
88
+ * TODO: Reverse args, but this will break existing consumers :(
89
+ */
90
+ constructor(insertText: string | SnippetString, id: string, label: string);
91
+ }
92
+
93
+ interface DocumentPasteProviderMetadata {
94
+ /**
95
+ * Identifies the provider.
96
+ *
97
+ * This id is used when users configure the default provider for paste.
98
+ *
99
+ * This id should be unique within the extension but does not need to be unique across extensions.
100
+ */
101
+ readonly id: string;
102
+
103
+ /**
104
+ * Mime types that {@link DocumentPasteEditProvider.prepareDocumentPaste provideDocumentPasteEdits} may add on copy.
105
+ */
106
+ readonly copyMimeTypes?: readonly string[];
107
+
108
+ /**
109
+ * Mime types that {@link DocumentPasteEditProvider.provideDocumentPasteEdits provideDocumentPasteEdits} should be invoked for.
110
+ *
111
+ * This can either be an exact mime type such as `image/png`, or a wildcard pattern such as `image/*`.
112
+ *
113
+ * Use `text/uri-list` for resources dropped from the explorer or other tree views in the workbench.
114
+ *
115
+ * Use `files` to indicate that the provider should be invoked if any {@link DataTransferFile files} are present in the {@link DataTransfer}.
116
+ * Note that {@link DataTransferFile} entries are only created when dropping content from outside the editor, such as
117
+ * from the operating system.
118
+ */
119
+ readonly pasteMimeTypes?: readonly string[];
120
+ }
121
+
122
+ namespace languages {
123
+ export function registerDocumentPasteEditProvider(selector: DocumentSelector, provider: DocumentPasteEditProvider, metadata: DocumentPasteProviderMetadata): Disposable;
124
+ }
125
+ }