import { IMouseWheelEvent } from "@codingame/monaco-vscode-api/vscode/vs/base/browser/mouseEvent"; import { CodeWindow } from "@codingame/monaco-vscode-api/vscode/vs/base/browser/window"; import { Emitter, Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event"; import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle"; import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri"; import { IAccessibilityService } from "@codingame/monaco-vscode-api/vscode/vs/platform/accessibility/common/accessibility.service"; import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service"; import { IContextKeyService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service"; import { IContextMenuService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextview/browser/contextView.service"; import { ExtensionIdentifier } from "@codingame/monaco-vscode-api/vscode/vs/platform/extensions/common/extensions"; import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation"; import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service"; import { INotificationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/notification/common/notification.service"; import { IRemoteAuthorityResolverService } from "@codingame/monaco-vscode-api/vscode/vs/platform/remote/common/remoteAuthorityResolver.service"; import { ITunnelService } from "@codingame/monaco-vscode-api/vscode/vs/platform/tunnel/common/tunnel.service"; import { IWorkbenchEnvironmentService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/environment/common/environmentService.service"; import { WebviewThemeDataProvider } from "./themeing.js"; import { IWebviewElement, WebviewContentOptions, WebviewExtensionDescription, WebviewInitInfo, WebviewMessageReceivedEvent } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/webview/browser/webview"; import { WebviewFindDelegate, WebviewFindWidget } from "./webviewFindWidget.js"; export declare class WebviewElement extends Disposable implements IWebviewElement, WebviewFindDelegate { protected readonly webviewThemeDataProvider: WebviewThemeDataProvider; private readonly _environmentService; private readonly _logService; private readonly _remoteAuthorityResolverService; private readonly _tunnelService; private readonly _accessibilityService; private readonly _instantiationService; protected readonly id: string; /** * The provided identifier of this webview. */ readonly providedViewType?: string; /** * The origin this webview itself is loaded from. May not be unique */ readonly origin: string; private _windowId; private get window(); private _encodedWebviewOriginPromise?; private _encodedWebviewOrigin; protected get platform(): string; private static readonly _supportsTransferableStreams; private readonly _expectedServiceWorkerVersion; private _element; protected get element(): HTMLIFrameElement | undefined; private _focused; get isFocused(): boolean; private _state; private _content; private readonly _portMappingManager; private readonly _resourceLoadingCts; private readonly _activeStreamControllers; private _contextKeyService; private _confirmBeforeClose; private readonly _focusDelayer; private readonly _onDidHtmlChange; protected readonly onDidHtmlChange: Event; private _messagePort?; private readonly _messageHandlers; protected readonly _webviewFindWidget: WebviewFindWidget | undefined; readonly checkImeCompletionState = true; readonly intrinsicContentSize: import("@codingame/monaco-vscode-api/vscode/vs/base/common/observable").ISettableObservable<{ readonly width: number; readonly height: number; } | undefined, void>; private _disposed; extension: WebviewExtensionDescription | undefined; private readonly _options; constructor(initInfo: WebviewInitInfo, webviewThemeDataProvider: WebviewThemeDataProvider, configurationService: IConfigurationService, contextMenuService: IContextMenuService, notificationService: INotificationService, _environmentService: IWorkbenchEnvironmentService, _logService: ILogService, _remoteAuthorityResolverService: IRemoteAuthorityResolverService, _tunnelService: ITunnelService, _accessibilityService: IAccessibilityService, _instantiationService: IInstantiationService); dispose(): void; setContextKeyService(contextKeyService: IContextKeyService): void; private readonly _onMissingCsp; readonly onMissingCsp: Event; private readonly _onDidClickLink; readonly onDidClickLink: Event; private readonly _onMessage; readonly onMessage: Event; private readonly _onDidScroll; readonly onDidScroll: Event<{ readonly scrollYPercentage: number; }>; private readonly _onDidWheel; readonly onDidWheel: Event; private readonly _onDidUpdateState; readonly onDidUpdateState: Event; private readonly _onDidFocus; readonly onDidFocus: Event; private readonly _onDidBlur; readonly onDidBlur: Event; private readonly _onFatalError; readonly onFatalError: Event<{ readonly message: string; }>; private readonly _onDidDispose; readonly onDidDispose: Event; postMessage(message: any, transfer?: ArrayBuffer[]): Promise; private _send; private _createElement; private _initElement; mountTo(element: HTMLElement, targetWindow: CodeWindow): void; private _registerMessageHandler; private perfMark; private _startBlockingIframeDragEvents; private _stopBlockingIframeDragEvents; protected webviewContentEndpoint(encodedWebviewOrigin: string): string; private doPostMessage; private on; private _hasAlertedAboutMissingCsp; private handleNoCspFound; reload(): void; reinitializeAfterDismount(): void; setHtml(html: string): void; setTitle(title: string): void; set contentOptions(options: WebviewContentOptions); set localResourcesRoot(resources: readonly URI[]); set state(state: string | undefined); set initialScrollProgress(value: number); private doUpdateContent; protected style(): void; protected handleFocusChange(isFocused: boolean): void; private handleKeyEvent; private handleDragEvent; windowDidDragStart(): void; windowDidDragEnd(): void; selectAll(): void; copy(): void; paste(): void; cut(): void; undo(): void; redo(): void; private execCommand; private loadResource; private localLocalhost; focus(): void; private _doFocus; protected readonly _hasFindResult: Emitter; readonly hasFindResult: Event; protected readonly _onDidStopFind: Emitter; readonly onDidStopFind: Event; /** * Webviews expose a stateful find API. * Successive calls to find will move forward or backward through onFindResults * depending on the supplied options. * * @param value The string to search for. Empty strings are ignored. */ find(value: string, previous: boolean): void; updateFind(value: string): void; stopFind(keepSelection?: boolean): void; showFind(animated?: boolean): void; hideFind(animated?: boolean): void; runFindAction(previous: boolean): void; }