UNPKG

thebe-core

Version:

Typescript based core functionality for Thebe

44 lines (43 loc) 1.68 kB
import type { ICell, IOutput } from '@jupyterlab/nbformat'; import type { IRenderMimeRegistry } from '@jupyterlab/rendermime'; import PassiveCellRenderer from './passive'; import type ThebeSession from './session'; import type { CellKind, IThebeCell, IThebeCellExecuteReturn, JsonObject } from './types'; /** * A Thebe cell that is exepected to contain markdown (or raw) source. * * Currently this just separates content cells from code cells and thebe provides no * special handling for markdown cells. * */ export default class ThebeMarkdownCell extends PassiveCellRenderer implements IThebeCell { id: string; notebookId: string; kind: CellKind; source: string; busy: boolean; metadata: JsonObject; constructor(id: string, notebookId: string, source: string, metadata: JsonObject, rendermime: IRenderMimeRegistry); static fromICell(ic: ICell, notebookId: string, rendermime: IRenderMimeRegistry): ThebeMarkdownCell; get isAttachedToDOM(): boolean; get isBusy(): boolean; get isAttached(): boolean; get executionCount(): number | null; setAsBusy(): void; setAsIdle(): void; initOutputs(initialOutputs: IOutput[]): void; reset(): void; attachToDOM(el?: HTMLElement): void; attachSession(session: ThebeSession): void; detachSession(): void; setOutputText(text: string): void; clear(): void; clearOnError(error?: any): void; messageBusy(): void; messageCompleted(): void; messageError(message: string): void; render(outputs: IOutput[]): void; get tags(): string[]; get outputs(): IOutput[]; execute(source?: string): Promise<IThebeCellExecuteReturn | null>; }