import * as React from '@theia/core/shared/react'; import { interfaces } from '@theia/core/shared/inversify'; import { NotebookRendererMessagingService, CellOutputWebview, NotebookRendererRegistry, NotebookEditorWidgetService, NotebookKernelService, NotebookEditorWidget, OutputRenderEvent, NotebookCellOutputsSplice, NotebookContentChangedEvent } from '@theia/notebook/lib/browser'; import { WebviewWidget } from '../../webview/webview'; import { WidgetManager } from '@theia/core/lib/browser'; import { WorkspaceTrustService } from '@theia/workspace/lib/browser'; import { FromWebviewMessage, Output } from './webview-communication'; import { Disposable, DisposableCollection, Emitter, QuickPickService } from '@theia/core'; import { NotebookModel } from '@theia/notebook/lib/browser/view-model/notebook-model'; import { NotebookOptionsService, NotebookOutputOptions } from '@theia/notebook/lib/browser/service/notebook-options'; import { NotebookCellModel } from '@theia/notebook/lib/browser/view-model/notebook-cell-model'; import { CellOutput } from '@theia/notebook/lib/common'; import { NotebookCellOutputModel } from '@theia/notebook/lib/browser/view-model/notebook-cell-output-model'; import { Deferred } from '@theia/core/lib/common/promise-util'; import { ContextKeyService } from '@theia/core/lib/browser/context-key-service'; export declare const AdditionalNotebookCellOutputCss: unique symbol; export declare function createCellOutputWebviewContainer(ctx: interfaces.Container): interfaces.Container; export declare const DEFAULT_NOTEBOOK_OUTPUT_CSS: string; interface CellOutputUpdate extends NotebookCellOutputsSplice { cellHandle: number; } export declare class CellOutputWebviewImpl implements CellOutputWebview, Disposable { protected readonly messagingService: NotebookRendererMessagingService; protected readonly widgetManager: WidgetManager; protected readonly workspaceTrustService: WorkspaceTrustService; protected readonly notebookRendererRegistry: NotebookRendererRegistry; protected readonly notebookEditorWidgetService: NotebookEditorWidgetService; protected readonly notebookKernelService: NotebookKernelService; protected readonly quickPickService: QuickPickService; protected readonly additionalOutputCss: string; protected readonly notebookOptionsService: NotebookOptionsService; protected readonly contextKeyService: ContextKeyService; protected readonly onDidRenderOutputEmitter: Emitter; readonly onDidRenderOutput: import("@theia/core").Event; protected notebook: NotebookModel; protected options: NotebookOutputOptions; readonly id: string; protected editor: NotebookEditorWidget | undefined; protected element?: HTMLDivElement; protected webviewWidget: WebviewWidget; protected webviewWidgetInitialized: Deferred; protected toDispose: DisposableCollection; protected isDisposed: boolean; init(notebook: NotebookModel, editor: NotebookEditorWidget): Promise; attachCellAndOutputListeners(cell: NotebookCellModel): void; render(): React.JSX.Element; protected attachWebview(): void; isAttached(): boolean; updateOutputs(updates: CellOutputUpdate[]): void; cellsChanged(cellEvents: NotebookContentChangedEvent[]): void; protected mapCellOutputsToWebviewOutput(outputs: CellOutput[]): Output[]; /** * Currently not used, but could be useful in a subclasses * * @param index cell index * @param cellHandle cell handle * @param visibleCells visible cells * @returns visible cell index or -1 if not found */ protected toVisibleCellIndex(index: number, cellHandle: number, visibleCells: Array): number; setCellHeight(cell: NotebookCellModel, height: number): void; requestOutputPresentationUpdate(cellHandle: number, output: NotebookCellOutputModel): Promise; protected handleWebviewMessage(message: FromWebviewMessage): void; getPreloads(): string[]; protected updateStyles(): void; protected generateStyles(): { [key: string]: string; }; private createWebviewContent; private preloadsScriptString; dispose(): void; } export {}; //# sourceMappingURL=cell-output-webview.d.ts.map