UNPKG

thebe-core

Version:

Typescript based core functionality for Thebe

40 lines (39 loc) 1.28 kB
import type * as nbformat from '@jupyterlab/nbformat'; import { OutputArea, OutputAreaModel } from '@jupyterlab/outputarea'; import type { IRenderMimeRegistry } from '@jupyterlab/rendermime'; import type { IPassiveCell, MathjaxOptions } from './types'; declare class PassiveCellRenderer implements IPassiveCell { readonly id: string; readonly rendermime: IRenderMimeRegistry; protected model: OutputAreaModel; protected area: OutputArea; constructor(id: string, rendermime?: IRenderMimeRegistry, mathjax?: MathjaxOptions); /** * Serialize the model state to JSON */ get outputs(): nbformat.IOutput[]; get isAttachedToDOM(): boolean; attachToDOM(el?: HTMLElement, strict?: boolean): void; setOutputText(text: string): void; /** * Clears the output area model * * @returns */ clear(): void; /** * Will trigger the output to render an error with text taken from the optional argument * * @param error * @returns */ clearOnError(error?: any): void; /** * Render output data directly from json * * @param outputs - serialised jupyter outputs * @returns */ render(outputs: nbformat.IOutput[]): void; } export default PassiveCellRenderer;