@voila-dashboards/jupyterlab-gridstack
Version:
A gridstack-based template for [](https://github.com/voila-dashboards/voila).
76 lines (75 loc) • 2.8 kB
TypeScript
import { DocumentRegistry, ABCWidgetFactory } from '@jupyterlab/docregistry';
import { INotebookModel, NotebookPanel, StaticNotebook } from '@jupyterlab/notebook';
import { IEditorFactoryService, IEditorMimeTypeService } from '@jupyterlab/codeeditor';
import { IRenderMimeRegistry } from '@jupyterlab/rendermime';
import { VoilaGridStackWidget } from './widget';
/**
* A widget factory for `VoilaGridstack` Widget.
*/
export declare class VoilaGridStackWidgetFactory extends ABCWidgetFactory<VoilaGridStackWidget, INotebookModel> {
/**
* Construct a new `VoilaGridStackWidgetFactory`.
*
* @param options - The options used to construct the factory.
*/
constructor(options: VoilaGridStackWidgetFactory.IOptions<VoilaGridStackWidget>);
readonly rendermime: IRenderMimeRegistry;
/**
* The content factory used by the widget factory.
*/
readonly contentFactory: NotebookPanel.IContentFactory;
/**
* The service used to look up mime types.
*/
readonly mimeTypeService: IEditorMimeTypeService;
/**
* A configuration object for cell editor settings.
*/
get editorConfig(): StaticNotebook.IEditorConfig;
set editorConfig(value: StaticNotebook.IEditorConfig);
/**
* A configuration object for notebook settings.
*/
get notebookConfig(): StaticNotebook.INotebookConfig;
set notebookConfig(value: StaticNotebook.INotebookConfig);
/**
* Creates a new `VoilaGridstackWidget`.
*
* @param context - The Notebook context.
* @param source - An optional `VoilaGridstackWidget`.
*
* #### Notes
* The factory will start the appropriate kernel.
*/
protected createNewWidget(context: DocumentRegistry.IContext<INotebookModel>, source?: VoilaGridStackWidget): VoilaGridStackWidget;
private _editorConfig;
private _notebookConfig;
}
export declare namespace VoilaGridStackWidgetFactory {
/**
* The options used to construct a `VoilaGridstackWidgetFactory`.
*/
interface IOptions<T extends VoilaGridStackWidget> extends DocumentRegistry.IWidgetFactoryOptions<T> {
rendermime: IRenderMimeRegistry;
/**
* A notebook panel content factory.
*/
contentFactory: NotebookPanel.IContentFactory;
/**
* The service used to look up mime types.
*/
mimeTypeService: IEditorMimeTypeService;
/**
* The service used to create default panel.
*/
editorFactoryService: IEditorFactoryService;
/**
* The notebook cell editor configuration.
*/
editorConfig?: StaticNotebook.IEditorConfig;
/**
* The notebook configuration.
*/
notebookConfig?: StaticNotebook.INotebookConfig;
}
}