extract editorInsets proposal into its own file, https://github.com/microsoft/vscode/issues/131165

This commit is contained in:
Johannes Rieken 2021-11-11 17:25:49 +01:00
parent 788d959222
commit d967d9ca67
No known key found for this signature in database
GPG key ID: 96634B5AF12F8798
4 changed files with 24 additions and 16 deletions

View file

@ -649,7 +649,7 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
return extHostWebviewPanels.createWebviewPanel(extension, viewType, title, showOptions, options);
},
createWebviewTextEditorInset(editor: vscode.TextEditor, line: number, height: number, options?: vscode.WebviewOptions): vscode.WebviewEditorInset {
checkProposedApiEnabled(extension);
checkProposedApiEnabled(extension, 'editorInsets');
return extHostEditorInsets.createWebviewEditorInset(editor, line, height, options, extension);
},
createTerminal(nameOrOptions?: vscode.TerminalOptions | vscode.ExtensionTerminalOptions | string, shellPath?: string, shellArgs?: string[] | string): vscode.Terminal {

View file

@ -6,6 +6,7 @@
// THIS IS A GENERATED FILE. DO NOT EDIT DIRECTLY.
export const allApiProposals = Object.freeze({
editorInsets: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.editorInsets.d.ts',
languageStatus: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.languageStatus.d.ts'
});
export type ApiProposalName = keyof typeof allApiProposals;

View file

@ -267,22 +267,7 @@ declare module 'vscode' {
//#endregion
//#region editorInsets: https://github.com/microsoft/vscode/issues/85682
export interface WebviewEditorInset {
readonly editor: TextEditor;
readonly line: number;
readonly height: number;
readonly webview: Webview;
readonly onDidDispose: Event<void>;
dispose(): void;
}
export namespace window {
export function createWebviewTextEditorInset(editor: TextEditor, line: number, height: number, options?: WebviewOptions): WebviewEditorInset;
}
//#endregion
//#region fsChunks: https://github.com/microsoft/vscode/issues/84515

View file

@ -0,0 +1,22 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
// https://github.com/microsoft/vscode/issues/85682
declare module 'vscode' {
export interface WebviewEditorInset {
readonly editor: TextEditor;
readonly line: number;
readonly height: number;
readonly webview: Webview;
readonly onDidDispose: Event<void>;
dispose(): void;
}
export namespace window {
export function createWebviewTextEditorInset(editor: TextEditor, line: number, height: number, options?: WebviewOptions): WebviewEditorInset;
}
}