Initial share provider API and UI (#182999)

* Formalize share provider API

* i18n.resources.json

* Don't introduce a generic Success dialog severity
This commit is contained in:
Joyce Er
2023-05-22 15:32:43 -07:00
committed by GitHub
parent d470f53f49
commit bc1090cc10
21 changed files with 529 additions and 4 deletions

View File

@@ -0,0 +1,29 @@
/*---------------------------------------------------------------------------------------------
* 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/176316
declare module 'vscode' {
export interface TreeItem {
shareableItem?: ShareableItem;
}
export interface ShareableItem {
resourceUri: Uri;
selection?: Range;
}
export interface ShareProvider {
readonly id: string;
readonly label: string;
readonly priority: number;
provideShare(item: ShareableItem, token: CancellationToken): ProviderResult<Uri>;
}
export namespace window {
export function registerShareProvider(selector: DocumentSelector, provider: ShareProvider): Disposable;
}
}