import { IRPCProtocol } from '@opensumi/ide-connection'; import { CancellationToken, Emitter, Event, IExtensionInfo } from '@opensumi/ide-core-common'; import { IExtHostWebview, IExtHostWebviewView, IExtensionDescription, IMainThreadWebview, IWebviewOptions, IWebviewPanelOptions, IWebviewPanelViewState, ViewColumn, Webview, WebviewPanel, WebviewPanelOnDidChangeViewStateEvent, WebviewPanelSerializer, WebviewViewProvider } from '../../../common/vscode'; import { Disposable, Uri } from '../../../common/vscode/ext-types'; type IconPath = Uri | { light: Uri; dark: Uri; }; export declare class ExtHostWebview implements Webview { private cspResourceRoots; private extensionLocation?; private readonly _handle; private readonly _proxy; private _html; private _options; private _isDisposed; readonly _onMessageEmitter: Emitter; readonly onDidReceiveMessage: Event; constructor(handle: string, proxy: IMainThreadWebview, options: IWebviewOptions, cspResourceRoots: string[], extensionLocation?: Uri | undefined); dispose(): void; get html(): string; set html(value: string); get options(): IWebviewOptions; set options(newOptions: IWebviewOptions); postMessage(message: any): Thenable; private assertNotDisposed; get resourceRoot(): string; get cspSource(): string; toWebviewResource(resource: Uri): Uri; asWebviewUri(localResource: Uri): Uri; } export declare class ExtHostWebviewPanel implements WebviewPanel { private readonly _handle; private readonly _proxy; private readonly _viewType; private _title; private _iconPath; private readonly _options; private readonly _webview; private _isDisposed; private _viewColumn; private _visible; private _active; readonly _onDisposeEmitter: Emitter; readonly onDidDispose: Event; readonly _onDidChangeViewStateEmitter: Emitter; readonly onDidChangeViewState: Event; constructor(handle: string, proxy: IMainThreadWebview, viewType: string, title: string, viewColumn: ViewColumn, editorOptions: IWebviewPanelOptions, webview: ExtHostWebview); dispose(): void; get webview(): ExtHostWebview; get viewType(): string; get title(): string; set title(value: string); get iconPath(): IconPath | undefined; set iconPath(value: IconPath | undefined); get options(): IWebviewPanelOptions; get viewColumn(): ViewColumn; _setViewColumn(value: ViewColumn): void; get active(): boolean; _setActive(value: boolean): void; get visible(): boolean; _setVisible(value: boolean): void; postMessage(message: any): Thenable; reveal(viewColumn?: ViewColumn, preserveFocus?: boolean): void; private assertNotDisposed; } export declare class ExtHostWebviewService implements IExtHostWebview { private rpcProtocol; private webviewHandlePool; private readonly _proxy; private readonly _webviewPanels; private readonly _localWebviews; private readonly _serializers; private resourceRoots; constructor(rpcProtocol: IRPCProtocol); $init(): Promise; init(): Promise; private getNextHandle; createWebview(extensionLocation: Uri | undefined, viewType: string, title: string, showOptions: ViewColumn | { viewColumn: ViewColumn; preserveFocus?: boolean; }, options: (IWebviewPanelOptions & IWebviewOptions) | undefined, extension: IExtensionInfo): ExtHostWebviewPanel; $pipeBrowserHostedWebviewPanel(handle: string, viewType: string): void; createLocalWebview(handle: string): ExtHostWebview; registerWebviewPanelSerializer(viewType: string, serializer: WebviewPanelSerializer): Disposable; private getExtHostWebview; $onMessage(handle: string, message: any): void; $onDidChangeWebviewPanelViewState(handle: string, newState: IWebviewPanelViewState): void; $onDidDisposeWebviewPanel(handle: string): Promise; $deserializeWebviewPanel(webviewHandle: string, viewType: string, title: string, state: any, position: ViewColumn, options: IWebviewOptions & IWebviewPanelOptions): Promise; getWebviewPanel(handle: string): ExtHostWebviewPanel | undefined; } export declare class ExtHostWebviewViews implements IExtHostWebviewView { private readonly _extHostWebview; private readonly _proxy; private readonly _viewProviders; private readonly _webviewViews; constructor(rpcProtocol: IRPCProtocol, _extHostWebview: ExtHostWebviewService); registerWebviewViewProvider(extension: IExtensionDescription, viewType: string, provider: WebviewViewProvider, webviewOptions?: { retainContextWhenHidden?: boolean; }): Disposable; $resolveWebviewView(webviewHandle: string, viewType: string, title: string | undefined, state: any, cancellation: CancellationToken): Promise; $onDidChangeWebviewViewVisibility(webviewHandle: string, visible: boolean): Promise; $disposeWebviewView(webviewHandle: string): Promise; private getWebviewView; } export {}; //# sourceMappingURL=ext.host.api.webview.d.ts.map