import { IFrame, IWidgetTracker } from '@jupyterlab/apputils'; import { ABCWidgetFactory, DocumentRegistry, DocumentWidget } from '@jupyterlab/docregistry'; import { INotebookModel } from '@jupyterlab/notebook'; import { Token } from '@lumino/coreutils'; /** * A class that tracks Voilà Preview widgets. */ export interface IVoilaPreviewTracker extends IWidgetTracker { } /** * The Voilà Preview tracker token. */ export declare const IVoilaPreviewTracker: Token; /** * A DocumentWidget that shows a Voilà preview in an IFrame. */ export declare class VoilaPreview extends DocumentWidget { /** * Instantiate a new VoilaPreview. * @param options The VoilaPreview instantiation options. */ constructor(options: VoilaPreview.IOptions); /** * Dispose the preview widget. */ dispose(): void; /** * Reload the preview. */ reload(): void; /** * Get whether the preview reloads when the context is saved. */ get renderOnSave(): boolean; /** * Set whether the preview reloads when the context is saved. */ set renderOnSave(renderOnSave: boolean); private _renderOnSave; } /** * A namespace for VoilaPreview statics. */ export declare namespace VoilaPreview { /** * Instantiation options for `VoilaPreview`. */ interface IOptions extends DocumentWidget.IOptionsOptionalContent { /** * The Voilà URL function. */ getVoilaUrl: (path: string) => string; /** * Whether to reload the preview on context saved. */ renderOnSave?: boolean; } } export declare class VoilaPreviewFactory extends ABCWidgetFactory { private getVoilaUrl; defaultRenderOnSave: boolean; constructor(getVoilaUrl: (path: string) => string, options: DocumentRegistry.IWidgetFactoryOptions); protected createNewWidget(context: DocumentRegistry.IContext): VoilaPreview; }