import { Token } from '@phosphor/application'; import { Session } from '@jupyterlab/services'; import { Message } from '@phosphor/messaging'; import { Panel } from '@phosphor/widgets'; import { IEditorMimeTypeService, CodeEditor } from '../codeeditor'; import { BaseCellWidget, CodeCellWidget } from '../cells'; import { OutputAreaWidget } from '../outputarea'; import { IRenderMime } from '../rendermime'; import { CodeConsole } from './widget'; /** * A panel which contains a console and the ability to add other children. */ export declare class ConsolePanel extends Panel { /** * Construct a console panel. */ constructor(options: ConsolePanel.IOptions); /** * The console widget used by the panel. */ readonly console: CodeConsole; /** * Dispose of the resources held by the widget. */ dispose(): void; /** * Handle `'activate-request'` messages. */ protected onActivateRequest(msg: Message): void; /** * Handle `'close-request'` messages. */ protected onCloseRequest(msg: Message): void; } /** * A namespace for ConsolePanel statics. */ export declare namespace ConsolePanel { /** * The initialization options for a console panel. */ interface IOptions { /** * The rendermime instance used by the panel. */ rendermime: IRenderMime; /** * The content factory for the panel. */ contentFactory: IContentFactory; /** * The session for the console widget. */ session: Session.ISession; /** * The model factory for the console widget. */ modelFactory?: CodeConsole.IModelFactory; /** * The service used to look up mime types. */ mimeTypeService: IEditorMimeTypeService; } /** * The console panel renderer. */ interface IContentFactory { /** * The editor factory used by the content factory. */ readonly editorFactory: CodeEditor.Factory; /** * The factory for code console content. */ readonly consoleContentFactory: CodeConsole.IContentFactory; /** * Create a new console panel. */ createConsole(options: CodeConsole.IOptions): CodeConsole; } /** * Default implementation of `IContentFactory`. */ class ContentFactory implements IContentFactory { /** * Create a new content factory. */ constructor(options: ContentFactory.IOptions); /** * The editor factory used by the content factory. */ readonly editorFactory: CodeEditor.Factory; /** * The factory for code console content. */ readonly consoleContentFactory: CodeConsole.IContentFactory; /** * Create a new console panel. */ createConsole(options: CodeConsole.IOptions): CodeConsole; } /** * The namespace for `ContentFactory`. */ namespace ContentFactory { /** * An initialization options for a console panel factory. */ interface IOptions { /** * The editor factory. This will be used to create a * consoleContentFactory if none is given. */ editorFactory: CodeEditor.Factory; /** * The factory for output area content. */ outputAreaContentFactory?: OutputAreaWidget.IContentFactory; /** * The factory for code cell widget content. If given, this will * take precedence over the `outputAreaContentFactory`. */ codeCellContentFactory?: CodeCellWidget.IContentFactory; /** * The factory for raw cell widget content. */ rawCellContentFactory?: BaseCellWidget.IContentFactory; /** * The factory for console widget content. If given, this will * take precedence over the output area and cell factories. */ consoleContentFactory?: CodeConsole.IContentFactory; } } /** * The console renderer token. */ const IContentFactory: Token; }