@codingame/monaco-vscode-rollup-vsix-plugin 1.83.13 → 1.83.15-next.0

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 (96) hide show
  1. package/package.json +2 -2
  2. package/vscode-dts/vscode.proposed.aiRelatedInformation.d.ts +49 -0
  3. package/vscode-dts/vscode.proposed.authGetSessions.d.ts +62 -0
  4. package/vscode-dts/vscode.proposed.authSession.d.ts +13 -0
  5. package/vscode-dts/vscode.proposed.canonicalUriProvider.d.ts +47 -0
  6. package/vscode-dts/vscode.proposed.chat.d.ts +25 -0
  7. package/vscode-dts/vscode.proposed.chatAgents.d.ts +39 -0
  8. package/vscode-dts/vscode.proposed.chatProvider.d.ts +38 -0
  9. package/vscode-dts/vscode.proposed.chatRequestAccess.d.ts +47 -0
  10. package/vscode-dts/vscode.proposed.chatSlashCommands.d.ts +47 -0
  11. package/vscode-dts/vscode.proposed.chatVariables.d.ts +35 -0
  12. package/vscode-dts/vscode.proposed.codiconDecoration.d.ts +48 -0
  13. package/vscode-dts/vscode.proposed.commentsDraftState.d.ts +18 -0
  14. package/vscode-dts/vscode.proposed.contribCommentEditorActionsMenu.d.ts +6 -0
  15. package/vscode-dts/vscode.proposed.contribCommentPeekContext.d.ts +10 -0
  16. package/vscode-dts/vscode.proposed.contribCommentThreadAdditionalMenu.d.ts +8 -0
  17. package/vscode-dts/vscode.proposed.contribEditSessions.d.ts +8 -0
  18. package/vscode-dts/vscode.proposed.contribEditorContentMenu.d.ts +6 -0
  19. package/vscode-dts/vscode.proposed.contribLabelFormatterWorkspaceTooltip.d.ts +6 -0
  20. package/vscode-dts/vscode.proposed.contribMenuBarHome.d.ts +6 -0
  21. package/vscode-dts/vscode.proposed.contribMergeEditorMenus.d.ts +6 -0
  22. package/vscode-dts/vscode.proposed.contribNotebookStaticPreloads.d.ts +6 -0
  23. package/vscode-dts/vscode.proposed.contribRemoteHelp.d.ts +6 -0
  24. package/vscode-dts/vscode.proposed.contribShareMenu.d.ts +7 -0
  25. package/vscode-dts/vscode.proposed.contribStatusBarItems.d.ts +8 -0
  26. package/vscode-dts/vscode.proposed.contribViewsRemote.d.ts +6 -0
  27. package/vscode-dts/vscode.proposed.contribViewsWelcome.d.ts +6 -0
  28. package/vscode-dts/vscode.proposed.customEditorMove.d.ts +29 -0
  29. package/vscode-dts/vscode.proposed.debugFocus.d.ts +74 -0
  30. package/vscode-dts/vscode.proposed.diffCommand.d.ts +38 -0
  31. package/vscode-dts/vscode.proposed.diffContentOptions.d.ts +16 -0
  32. package/vscode-dts/vscode.proposed.documentFiltersExclusive.d.ts +13 -0
  33. package/vscode-dts/vscode.proposed.documentPaste.d.ts +111 -0
  34. package/vscode-dts/vscode.proposed.dropMetadata.d.ts +60 -0
  35. package/vscode-dts/vscode.proposed.editSessionIdentityProvider.d.ts +71 -0
  36. package/vscode-dts/vscode.proposed.editorInsets.d.ts +22 -0
  37. package/vscode-dts/vscode.proposed.extensionRuntime.d.ts +24 -0
  38. package/vscode-dts/vscode.proposed.extensionsAny.d.ts +40 -0
  39. package/vscode-dts/vscode.proposed.externalUriOpener.d.ts +163 -0
  40. package/vscode-dts/vscode.proposed.fileComments.d.ts +85 -0
  41. package/vscode-dts/vscode.proposed.fileSearchProvider.d.ts +67 -0
  42. package/vscode-dts/vscode.proposed.findTextInFiles.d.ts +104 -0
  43. package/vscode-dts/vscode.proposed.fsChunks.d.ts +16 -0
  44. package/vscode-dts/vscode.proposed.handleIssueUri.d.ts +31 -0
  45. package/vscode-dts/vscode.proposed.idToken.d.ts +16 -0
  46. package/vscode-dts/vscode.proposed.inlineCompletionsAdditions.d.ts +71 -0
  47. package/vscode-dts/vscode.proposed.interactive.d.ts +227 -0
  48. package/vscode-dts/vscode.proposed.interactiveUserActions.d.ts +70 -0
  49. package/vscode-dts/vscode.proposed.interactiveWindow.d.ts +25 -0
  50. package/vscode-dts/vscode.proposed.ipc.d.ts +37 -0
  51. package/vscode-dts/vscode.proposed.mappedEditsProvider.d.ts +42 -0
  52. package/vscode-dts/vscode.proposed.notebookCellExecutionState.d.ts +52 -0
  53. package/vscode-dts/vscode.proposed.notebookControllerAffinityHidden.d.ts +17 -0
  54. package/vscode-dts/vscode.proposed.notebookDeprecated.d.ts +16 -0
  55. package/vscode-dts/vscode.proposed.notebookExecution.d.ts +39 -0
  56. package/vscode-dts/vscode.proposed.notebookKernelSource.d.ts +46 -0
  57. package/vscode-dts/vscode.proposed.notebookLiveShare.d.ts +21 -0
  58. package/vscode-dts/vscode.proposed.notebookMessaging.d.ts +68 -0
  59. package/vscode-dts/vscode.proposed.notebookMime.d.ts +33 -0
  60. package/vscode-dts/vscode.proposed.portsAttributes.d.ts +100 -0
  61. package/vscode-dts/vscode.proposed.profileContentHandlers.d.ts +19 -0
  62. package/vscode-dts/vscode.proposed.quickDiffProvider.d.ts +17 -0
  63. package/vscode-dts/vscode.proposed.quickPickItemTooltip.d.ts +16 -0
  64. package/vscode-dts/vscode.proposed.quickPickSortByLabel.d.ts +16 -0
  65. package/vscode-dts/vscode.proposed.readonlyMessage.d.ts +14 -0
  66. package/vscode-dts/vscode.proposed.resolvers.d.ts +371 -0
  67. package/vscode-dts/vscode.proposed.saveEditor.d.ts +35 -0
  68. package/vscode-dts/vscode.proposed.scmActionButton.d.ts +19 -0
  69. package/vscode-dts/vscode.proposed.scmHistoryProvider.d.ts +77 -0
  70. package/vscode-dts/vscode.proposed.scmSelectedProvider.d.ts +22 -0
  71. package/vscode-dts/vscode.proposed.scmTextDocument.d.ts +19 -0
  72. package/vscode-dts/vscode.proposed.scmValidation.d.ts +60 -0
  73. package/vscode-dts/vscode.proposed.shareProvider.d.ts +74 -0
  74. package/vscode-dts/vscode.proposed.showLocal.d.ts +19 -0
  75. package/vscode-dts/vscode.proposed.tabInputTextMerge.d.ts +25 -0
  76. package/vscode-dts/vscode.proposed.taskPresentationGroup.d.ts +16 -0
  77. package/vscode-dts/vscode.proposed.telemetry.d.ts +36 -0
  78. package/vscode-dts/vscode.proposed.terminalDataWriteEvent.d.ts +32 -0
  79. package/vscode-dts/vscode.proposed.terminalDimensions.d.ts +39 -0
  80. package/vscode-dts/vscode.proposed.terminalExecuteCommandEvent.d.ts +46 -0
  81. package/vscode-dts/vscode.proposed.terminalQuickFixProvider.d.ts +83 -0
  82. package/vscode-dts/vscode.proposed.terminalSelection.d.ts +16 -0
  83. package/vscode-dts/vscode.proposed.testCoverage.d.ts +198 -0
  84. package/vscode-dts/vscode.proposed.testMessageContextValue.d.ts +45 -0
  85. package/vscode-dts/vscode.proposed.testObserver.d.ts +184 -0
  86. package/vscode-dts/vscode.proposed.textSearchProvider.d.ts +281 -0
  87. package/vscode-dts/vscode.proposed.timeline.d.ts +163 -0
  88. package/vscode-dts/vscode.proposed.tokenInformation.d.ts +26 -0
  89. package/vscode-dts/vscode.proposed.treeViewActiveItem.d.ts +30 -0
  90. package/vscode-dts/vscode.proposed.treeViewMarkdownMessage.d.ts +28 -0
  91. package/vscode-dts/vscode.proposed.treeViewReveal.d.ts +13 -0
  92. package/vscode-dts/vscode.proposed.tunnelFactory.d.ts +44 -0
  93. package/vscode-dts/vscode.proposed.tunnels.d.ts +64 -0
  94. package/vscode-dts/vscode.proposed.windowActivity.d.ts +17 -0
  95. package/vscode-dts/vscode.proposed.workspaceTrust.d.ts +30 -0
  96. package/vscode.proposed.d.ts +0 -4787
@@ -0,0 +1,74 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License. See License.txt in the project root for license information.
4
+ *--------------------------------------------------------------------------------------------*/
5
+
6
+ declare module 'vscode' {
7
+
8
+ // See https://github.com/microsoft/vscode/issues/63943
9
+
10
+ export class ThreadFocus {
11
+ /**
12
+ * Create a ThreadFocus
13
+ * @param session
14
+ * @param threadId
15
+ * @param frameId
16
+ */
17
+ constructor(
18
+ session: DebugSession,
19
+ threadId?: number);
20
+
21
+
22
+ /**
23
+ * Debug session for thread.
24
+ */
25
+ readonly session: DebugSession;
26
+
27
+ /**
28
+ * Id of the associated thread (DAP id). May be undefined if thread has become unselected.
29
+ */
30
+ readonly threadId: number | undefined;
31
+ }
32
+
33
+ export class StackFrameFocus {
34
+ /**
35
+ * Create a StackFrameFocus
36
+ * @param session
37
+ * @param threadId
38
+ * @param frameId
39
+ */
40
+ constructor(
41
+ session: DebugSession,
42
+ threadId?: number,
43
+ frameId?: number);
44
+
45
+
46
+ /**
47
+ * Debug session for thread.
48
+ */
49
+ readonly session: DebugSession;
50
+
51
+ /**
52
+ * Id of the associated thread (DAP id). May be undefined if a frame is unselected.
53
+ */
54
+ readonly threadId: number | undefined;
55
+ /**
56
+ * Id of the stack frame (DAP id). May be undefined if a frame is unselected.
57
+ */
58
+ readonly frameId: number | undefined;
59
+ }
60
+
61
+
62
+ export namespace debug {
63
+ /**
64
+ * The currently focused thread or stack frame id, or `undefined` if this has not been set. (e.g. not in debug mode).
65
+ */
66
+ export let stackFrameFocus: ThreadFocus | StackFrameFocus | undefined;
67
+
68
+ /**
69
+ * An {@link Event} which fires when the {@link debug.stackFrameFocus} changes. Provides a sessionId. threadId is not undefined
70
+ * when a thread of frame has gained focus. frameId is defined when a stackFrame has gained focus.
71
+ */
72
+ export const onDidChangeStackFrameFocus: Event<ThreadFocus | StackFrameFocus | undefined>;
73
+ }
74
+ }
@@ -0,0 +1,38 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License. See License.txt in the project root for license information.
4
+ *--------------------------------------------------------------------------------------------*/
5
+
6
+ declare module 'vscode' {
7
+
8
+ // https://github.com/microsoft/vscode/issues/84899
9
+
10
+ /**
11
+ * The contiguous set of modified lines in a diff.
12
+ */
13
+ export interface LineChange {
14
+ readonly originalStartLineNumber: number;
15
+ readonly originalEndLineNumber: number;
16
+ readonly modifiedStartLineNumber: number;
17
+ readonly modifiedEndLineNumber: number;
18
+ }
19
+
20
+ export namespace commands {
21
+
22
+ /**
23
+ * Registers a diff information command that can be invoked via a keyboard shortcut,
24
+ * a menu item, an action, or directly.
25
+ *
26
+ * Diff information commands are different from ordinary {@link commands.registerCommand commands} as
27
+ * they only execute when there is an active diff editor when the command is called, and the diff
28
+ * information has been computed. Also, the command handler of an editor command has access to
29
+ * the diff information.
30
+ *
31
+ * @param command A unique identifier for the command.
32
+ * @param callback A command handler function with access to the {@link LineChange diff information}.
33
+ * @param thisArg The `this` context used when invoking the handler function.
34
+ * @return Disposable which unregisters this command on disposal.
35
+ */
36
+ export function registerDiffInformationCommand(command: string, callback: (diff: LineChange[], ...args: any[]) => any, thisArg?: any): Disposable;
37
+ }
38
+ }
@@ -0,0 +1,16 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License. See License.txt in the project root for license information.
4
+ *--------------------------------------------------------------------------------------------*/
5
+
6
+ declare module 'vscode' {
7
+ // TODO@rebornix: add github issue link
8
+
9
+ export interface NotebookDocumentContentOptions {
10
+ /**
11
+ * Controls if a cell metadata property should be reverted when the cell content
12
+ * is reverted in notebook diff editor.
13
+ */
14
+ cellContentMetadata?: { [key: string]: boolean | undefined };
15
+ }
16
+ }
@@ -0,0 +1,13 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License. See License.txt in the project root for license information.
4
+ *--------------------------------------------------------------------------------------------*/
5
+
6
+ declare module 'vscode' {
7
+
8
+ // todo@jrieken add issue reference
9
+
10
+ export interface DocumentFilter {
11
+ readonly exclusive?: boolean;
12
+ }
13
+ }
@@ -0,0 +1,111 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License. See License.txt in the project root for license information.
4
+ *--------------------------------------------------------------------------------------------*/
5
+
6
+ declare module 'vscode' {
7
+
8
+ // https://github.com/microsoft/vscode/issues/30066/
9
+
10
+ /**
11
+ * Provider invoked when the user copies and pastes code.
12
+ */
13
+ interface DocumentPasteEditProvider {
14
+
15
+ /**
16
+ * Optional method invoked after the user copies text in a file.
17
+ *
18
+ * During {@link prepareDocumentPaste}, an extension can compute metadata that is attached to
19
+ * a {@link DataTransfer} and is passed back to the provider in {@link provideDocumentPasteEdits}.
20
+ *
21
+ * @param document Document where the copy took place.
22
+ * @param ranges Ranges being copied in the `document`.
23
+ * @param dataTransfer The data transfer associated with the copy. You can store additional values on this for later use in {@link provideDocumentPasteEdits}.
24
+ * @param token A cancellation token.
25
+ */
26
+ prepareDocumentPaste?(document: TextDocument, ranges: readonly Range[], dataTransfer: DataTransfer, token: CancellationToken): void | Thenable<void>;
27
+
28
+ /**
29
+ * Invoked before the user pastes into a document.
30
+ *
31
+ * In this method, extensions can return a workspace edit that replaces the standard pasting behavior.
32
+ *
33
+ * @param document Document being pasted into
34
+ * @param ranges Currently selected ranges in the document.
35
+ * @param dataTransfer The data transfer associated with the paste.
36
+ * @param token A cancellation token.
37
+ *
38
+ * @return Optional workspace edit that applies the paste. Return undefined to use standard pasting.
39
+ */
40
+ provideDocumentPasteEdits?(document: TextDocument, ranges: readonly Range[], dataTransfer: DataTransfer, token: CancellationToken): ProviderResult<DocumentPasteEdit>;
41
+ }
42
+
43
+ /**
44
+ * An operation applied on paste
45
+ */
46
+ class DocumentPasteEdit {
47
+
48
+ /**
49
+ * Human readable label that describes the edit.
50
+ */
51
+ label: string;
52
+
53
+ /**
54
+ * Controls the ordering or multiple paste edits. If this provider yield to edits, it will be shown lower in the list.
55
+ */
56
+ yieldTo?: ReadonlyArray<
57
+ | { readonly extensionId: string; readonly providerId: string }
58
+ | { readonly mimeType: string }
59
+ >;
60
+
61
+ /**
62
+ * The text or snippet to insert at the pasted locations.
63
+ */
64
+ insertText: string | SnippetString;
65
+
66
+ /**
67
+ * An optional additional edit to apply on paste.
68
+ */
69
+ additionalEdit?: WorkspaceEdit;
70
+
71
+ /**
72
+ * @param insertText The text or snippet to insert at the pasted locations.
73
+ *
74
+ * TODO: Reverse args, but this will break existing consumers :(
75
+ */
76
+ constructor(insertText: string | SnippetString, label: string);
77
+ }
78
+
79
+ interface DocumentPasteProviderMetadata {
80
+ /**
81
+ * Identifies the provider.
82
+ *
83
+ * This id is used when users configure the default provider for paste.
84
+ *
85
+ * This id should be unique within the extension but does not need to be unique across extensions.
86
+ */
87
+ readonly id: string;
88
+
89
+ /**
90
+ * Mime types that {@link DocumentPasteEditProvider.prepareDocumentPaste provideDocumentPasteEdits} may add on copy.
91
+ */
92
+ readonly copyMimeTypes?: readonly string[];
93
+
94
+ /**
95
+ * Mime types that {@link DocumentPasteEditProvider.provideDocumentPasteEdits provideDocumentPasteEdits} should be invoked for.
96
+ *
97
+ * This can either be an exact mime type such as `image/png`, or a wildcard pattern such as `image/*`.
98
+ *
99
+ * Use `text/uri-list` for resources dropped from the explorer or other tree views in the workbench.
100
+ *
101
+ * Use `files` to indicate that the provider should be invoked if any {@link DataTransferFile files} are present in the {@link DataTransfer}.
102
+ * Note that {@link DataTransferFile} entries are only created when dropping content from outside the editor, such as
103
+ * from the operating system.
104
+ */
105
+ readonly pasteMimeTypes?: readonly string[];
106
+ }
107
+
108
+ namespace languages {
109
+ export function registerDocumentPasteEditProvider(selector: DocumentSelector, provider: DocumentPasteEditProvider, metadata: DocumentPasteProviderMetadata): Disposable;
110
+ }
111
+ }
@@ -0,0 +1,60 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License. See License.txt in the project root for license information.
4
+ *--------------------------------------------------------------------------------------------*/
5
+
6
+ declare module 'vscode' {
7
+
8
+ // https://github.com/microsoft/vscode/issues/179430
9
+
10
+ export interface DocumentDropEdit {
11
+ /**
12
+ * Human readable label that describes the edit.
13
+ */
14
+ label?: string;
15
+
16
+ /**
17
+ * The mime type from the {@link DataTransfer} that this edit applies.
18
+ *
19
+ * TODO: Should this be taken from `dropMimeTypes` instead?
20
+ */
21
+ handledMimeType?: string;
22
+
23
+ /**
24
+ * Controls the ordering or multiple paste edits. If this provider yield to edits, it will be shown lower in the list.
25
+ */
26
+ yieldTo?: ReadonlyArray<
27
+ // TODO: what about built-in providers?
28
+ | { readonly extensionId: string; readonly providerId: string }
29
+ | { readonly mimeType: string }
30
+ >;
31
+ }
32
+
33
+ export interface DocumentDropEditProviderMetadata {
34
+ /**
35
+ * Identifies the provider.
36
+ *
37
+ * This id is used when users configure the default provider for drop.
38
+ *
39
+ * This id should be unique within the extension but does not need to be unique across extensions.
40
+ */
41
+ readonly id: string;
42
+
43
+ /**
44
+ * List of {@link DataTransfer} mime types that the provider can handle.
45
+ *
46
+ * This can either be an exact mime type such as `image/png`, or a wildcard pattern such as `image/*`.
47
+ *
48
+ * Use `text/uri-list` for resources dropped from the explorer or other tree views in the workbench.
49
+ *
50
+ * Use `files` to indicate that the provider should be invoked if any {@link DataTransferFile files} are present in the {@link DataTransfer}.
51
+ * Note that {@link DataTransferFile} entries are only created when dropping content from outside the editor, such as
52
+ * from the operating system.
53
+ */
54
+ readonly dropMimeTypes: readonly string[];
55
+ }
56
+
57
+ export namespace languages {
58
+ export function registerDocumentDropEditProvider(selector: DocumentSelector, provider: DocumentDropEditProvider, metadata?: DocumentDropEditProviderMetadata): Disposable;
59
+ }
60
+ }
@@ -0,0 +1,71 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License. See License.txt in the project root for license information.
4
+ *--------------------------------------------------------------------------------------------*/
5
+
6
+ declare module 'vscode' {
7
+
8
+ // https://github.com/microsoft/vscode/issues/157734
9
+
10
+ export namespace workspace {
11
+ /**
12
+ * An event that is emitted when an edit session identity is about to be requested.
13
+ */
14
+ export const onWillCreateEditSessionIdentity: Event<EditSessionIdentityWillCreateEvent>;
15
+
16
+ /**
17
+ *
18
+ * @param scheme The URI scheme that this provider can provide edit session identities for.
19
+ * @param provider A provider which can convert URIs for workspace folders of scheme @param scheme to
20
+ * an edit session identifier which is stable across machines. This enables edit sessions to be resolved.
21
+ */
22
+ export function registerEditSessionIdentityProvider(scheme: string, provider: EditSessionIdentityProvider): Disposable;
23
+ }
24
+
25
+ export interface EditSessionIdentityProvider {
26
+ /**
27
+ *
28
+ * @param workspaceFolder The workspace folder to provide an edit session identity for.
29
+ * @param token A cancellation token for the request.
30
+ * @returns A string representing the edit session identity for the requested workspace folder.
31
+ */
32
+ provideEditSessionIdentity(workspaceFolder: WorkspaceFolder, token: CancellationToken): ProviderResult<string>;
33
+
34
+ /**
35
+ *
36
+ * @param identity1 An edit session identity.
37
+ * @param identity2 A second edit session identity to compare to @param identity1.
38
+ * @param token A cancellation token for the request.
39
+ * @returns An {@link EditSessionIdentityMatch} representing the edit session identity match confidence for the provided identities.
40
+ */
41
+ provideEditSessionIdentityMatch(identity1: string, identity2: string, token: CancellationToken): ProviderResult<EditSessionIdentityMatch>;
42
+ }
43
+
44
+ export enum EditSessionIdentityMatch {
45
+ Complete = 100,
46
+ Partial = 50,
47
+ None = 0
48
+ }
49
+
50
+ export interface EditSessionIdentityWillCreateEvent {
51
+
52
+ /**
53
+ * A cancellation token.
54
+ */
55
+ readonly token: CancellationToken;
56
+
57
+ /**
58
+ * The workspace folder to create an edit session identity for.
59
+ */
60
+ readonly workspaceFolder: WorkspaceFolder;
61
+
62
+ /**
63
+ * Allows to pause the event until the provided thenable resolves.
64
+ *
65
+ * *Note:* This function can only be called during event dispatch.
66
+ *
67
+ * @param thenable A thenable that delays saving.
68
+ */
69
+ waitUntil(thenable: Thenable<any>): void;
70
+ }
71
+ }
@@ -0,0 +1,22 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License. See License.txt in the project root for license information.
4
+ *--------------------------------------------------------------------------------------------*/
5
+
6
+ // https://github.com/microsoft/vscode/issues/85682
7
+
8
+ declare module 'vscode' {
9
+
10
+ export interface WebviewEditorInset {
11
+ readonly editor: TextEditor;
12
+ readonly line: number;
13
+ readonly height: number;
14
+ readonly webview: Webview;
15
+ readonly onDidDispose: Event<void>;
16
+ dispose(): void;
17
+ }
18
+
19
+ export namespace window {
20
+ export function createWebviewTextEditorInset(editor: TextEditor, line: number, height: number, options?: WebviewOptions): WebviewEditorInset;
21
+ }
22
+ }
@@ -0,0 +1,24 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License. See License.txt in the project root for license information.
4
+ *--------------------------------------------------------------------------------------------*/
5
+
6
+ declare module 'vscode' {
7
+
8
+ // https://github.com/microsoft/vscode/issues/104436
9
+
10
+ export enum ExtensionRuntime {
11
+ /**
12
+ * The extension is running in a NodeJS extension host. Runtime access to NodeJS APIs is available.
13
+ */
14
+ Node = 1,
15
+ /**
16
+ * The extension is running in a Webworker extension host. Runtime access is limited to Webworker APIs.
17
+ */
18
+ Webworker = 2
19
+ }
20
+
21
+ export interface ExtensionContext {
22
+ readonly extensionRuntime: ExtensionRuntime;
23
+ }
24
+ }
@@ -0,0 +1,40 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License. See License.txt in the project root for license information.
4
+ *--------------------------------------------------------------------------------------------*/
5
+
6
+ declare module 'vscode' {
7
+
8
+ // https://github.com/microsoft/vscode/issues/145307 @alexdima
9
+
10
+ export interface Extension<T> {
11
+
12
+ /**
13
+ * `true` when the extension is associated to another extension host.
14
+ *
15
+ * *Note* that an extension from another extension host cannot export
16
+ * API, e.g {@link Extension.exports its exports} are always `undefined`.
17
+ */
18
+ readonly isFromDifferentExtensionHost: boolean;
19
+ }
20
+
21
+ export namespace extensions {
22
+
23
+ /**
24
+ * Get an extension by its full identifier in the form of: `publisher.name`.
25
+ *
26
+ * @param extensionId An extension identifier.
27
+ * @param includeDifferentExtensionHosts Include extensions from different extension host
28
+ * @return An extension or `undefined`.
29
+ */
30
+ export function getExtension<T = any>(extensionId: string, includeDifferentExtensionHosts: boolean): Extension<T> | undefined;
31
+
32
+ /**
33
+ * All extensions across all extension hosts.
34
+ *
35
+ * @see {@link Extension.isFromDifferentExtensionHost}
36
+ */
37
+ export const allAcrossExtensionHosts: readonly Extension<void>[];
38
+
39
+ }
40
+ }
@@ -0,0 +1,163 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License. See License.txt in the project root for license information.
4
+ *--------------------------------------------------------------------------------------------*/
5
+
6
+ declare module 'vscode' {
7
+
8
+ // https://github.com/microsoft/vscode/issues/109277
9
+
10
+ /**
11
+ * Details if an `ExternalUriOpener` can open a uri.
12
+ *
13
+ * The priority is also used to rank multiple openers against each other and determine
14
+ * if an opener should be selected automatically or if the user should be prompted to
15
+ * select an opener.
16
+ *
17
+ * The editor will try to use the best available opener, as sorted by `ExternalUriOpenerPriority`.
18
+ * If there are multiple potential "best" openers for a URI, then the user will be prompted
19
+ * to select an opener.
20
+ */
21
+ export enum ExternalUriOpenerPriority {
22
+ /**
23
+ * The opener is disabled and will never be shown to users.
24
+ *
25
+ * Note that the opener can still be used if the user specifically
26
+ * configures it in their settings.
27
+ */
28
+ None = 0,
29
+
30
+ /**
31
+ * The opener can open the uri but will not cause a prompt on its own
32
+ * since the editor always contributes a built-in `Default` opener.
33
+ */
34
+ Option = 1,
35
+
36
+ /**
37
+ * The opener can open the uri.
38
+ *
39
+ * The editor's built-in opener has `Default` priority. This means that any additional `Default`
40
+ * openers will cause the user to be prompted to select from a list of all potential openers.
41
+ */
42
+ Default = 2,
43
+
44
+ /**
45
+ * The opener can open the uri and should be automatically selected over any
46
+ * default openers, include the built-in one from the editor.
47
+ *
48
+ * A preferred opener will be automatically selected if no other preferred openers
49
+ * are available. If multiple preferred openers are available, then the user
50
+ * is shown a prompt with all potential openers (not just preferred openers).
51
+ */
52
+ Preferred = 3,
53
+ }
54
+
55
+ /**
56
+ * Handles opening uris to external resources, such as http(s) links.
57
+ *
58
+ * Extensions can implement an `ExternalUriOpener` to open `http` links to a webserver
59
+ * inside of the editor instead of having the link be opened by the web browser.
60
+ *
61
+ * Currently openers may only be registered for `http` and `https` uris.
62
+ */
63
+ export interface ExternalUriOpener {
64
+
65
+ /**
66
+ * Check if the opener can open a uri.
67
+ *
68
+ * @param uri The uri being opened. This is the uri that the user clicked on. It has
69
+ * not yet gone through port forwarding.
70
+ * @param token Cancellation token indicating that the result is no longer needed.
71
+ *
72
+ * @return Priority indicating if the opener can open the external uri.
73
+ */
74
+ canOpenExternalUri(uri: Uri, token: CancellationToken): ExternalUriOpenerPriority | Thenable<ExternalUriOpenerPriority>;
75
+
76
+ /**
77
+ * Open a uri.
78
+ *
79
+ * This is invoked when:
80
+ *
81
+ * - The user clicks a link which does not have an assigned opener. In this case, first `canOpenExternalUri`
82
+ * is called and if the user selects this opener, then `openExternalUri` is called.
83
+ * - The user sets the default opener for a link in their settings and then visits a link.
84
+ *
85
+ * @param resolvedUri The uri to open. This uri may have been transformed by port forwarding, so it
86
+ * may not match the original uri passed to `canOpenExternalUri`. Use `ctx.originalUri` to check the
87
+ * original uri.
88
+ * @param ctx Additional information about the uri being opened.
89
+ * @param token Cancellation token indicating that opening has been canceled.
90
+ *
91
+ * @return Thenable indicating that the opening has completed.
92
+ */
93
+ openExternalUri(resolvedUri: Uri, ctx: OpenExternalUriContext, token: CancellationToken): Thenable<void> | void;
94
+ }
95
+
96
+ /**
97
+ * Additional information about the uri being opened.
98
+ */
99
+ interface OpenExternalUriContext {
100
+ /**
101
+ * The uri that triggered the open.
102
+ *
103
+ * This is the original uri that the user clicked on or that was passed to `openExternal.`
104
+ * Due to port forwarding, this may not match the `resolvedUri` passed to `openExternalUri`.
105
+ */
106
+ readonly sourceUri: Uri;
107
+ }
108
+
109
+ /**
110
+ * Additional metadata about a registered `ExternalUriOpener`.
111
+ */
112
+ interface ExternalUriOpenerMetadata {
113
+
114
+ /**
115
+ * List of uri schemes the opener is triggered for.
116
+ *
117
+ * Currently only `http` and `https` are supported.
118
+ */
119
+ readonly schemes: readonly string[];
120
+
121
+ /**
122
+ * Text displayed to the user that explains what the opener does.
123
+ *
124
+ * For example, 'Open in browser preview'
125
+ */
126
+ readonly label: string;
127
+ }
128
+
129
+ namespace window {
130
+ /**
131
+ * Register a new `ExternalUriOpener`.
132
+ *
133
+ * When a uri is about to be opened, an `onOpenExternalUri:SCHEME` activation event is fired.
134
+ *
135
+ * @param id Unique id of the opener, such as `myExtension.browserPreview`. This is used in settings
136
+ * and commands to identify the opener.
137
+ * @param opener Opener to register.
138
+ * @param metadata Additional information about the opener.
139
+ *
140
+ * @returns Disposable that unregisters the opener.
141
+ */
142
+ export function registerExternalUriOpener(id: string, opener: ExternalUriOpener, metadata: ExternalUriOpenerMetadata): Disposable;
143
+ }
144
+
145
+ interface OpenExternalOptions {
146
+ /**
147
+ * Allows using openers contributed by extensions through `registerExternalUriOpener`
148
+ * when opening the resource.
149
+ *
150
+ * If `true`, the editor will check if any contributed openers can handle the
151
+ * uri, and fallback to the default opener behavior.
152
+ *
153
+ * If it is string, this specifies the id of the `ExternalUriOpener`
154
+ * that should be used if it is available. Use `'default'` to force the editor's
155
+ * standard external opener to be used.
156
+ */
157
+ readonly allowContributedOpeners?: boolean | string;
158
+ }
159
+
160
+ namespace env {
161
+ export function openExternal(target: Uri, options?: OpenExternalOptions): Thenable<boolean>;
162
+ }
163
+ }