1 | import { IEditorMimeTypeService } from '@jupyterlab/codeeditor';
|
2 | import { ABCWidgetFactory, DocumentRegistry } from '@jupyterlab/docregistry';
|
3 | import { IRenderMimeRegistry } from '@jupyterlab/rendermime';
|
4 | import { ITranslator } from '@jupyterlab/translation';
|
5 | import { INotebookModel } from './model';
|
6 | import { NotebookPanel } from './panel';
|
7 | import { StaticNotebook } from './widget';
|
8 |
|
9 |
|
10 |
|
11 | export declare class NotebookWidgetFactory extends ABCWidgetFactory<NotebookPanel, INotebookModel> {
|
12 | |
13 |
|
14 |
|
15 |
|
16 |
|
17 | constructor(options: NotebookWidgetFactory.IOptions<NotebookPanel>);
|
18 | readonly rendermime: IRenderMimeRegistry;
|
19 | /**
|
20 | * The content factory used by the widget factory.
|
21 | */
|
22 | readonly contentFactory: NotebookPanel.IContentFactory;
|
23 | /**
|
24 | * The service used to look up mime types.
|
25 | */
|
26 | readonly mimeTypeService: IEditorMimeTypeService;
|
27 | /**
|
28 | * A configuration object for cell editor settings.
|
29 | */
|
30 | get editorConfig(): StaticNotebook.IEditorConfig;
|
31 | set editorConfig(value: StaticNotebook.IEditorConfig);
|
32 | /**
|
33 | * A configuration object for notebook settings.
|
34 | */
|
35 | get notebookConfig(): StaticNotebook.INotebookConfig;
|
36 | set notebookConfig(value: StaticNotebook.INotebookConfig);
|
37 | /**
|
38 | * Create a new widget.
|
39 | *
|
40 | * #### Notes
|
41 | * The factory will start the appropriate kernel.
|
42 | */
|
43 | protected createNewWidget(context: DocumentRegistry.IContext<INotebookModel>, source?: NotebookPanel): NotebookPanel;
|
44 | private _editorConfig;
|
45 | private _notebookConfig;
|
46 | }
|
47 | /**
|
48 | * The namespace for `NotebookWidgetFactory` statics.
|
49 | */
|
50 | export declare namespace NotebookWidgetFactory {
|
51 | |
52 |
|
53 |
|
54 | interface IOptions<T extends NotebookPanel> extends DocumentRegistry.IWidgetFactoryOptions<T> {
|
55 | rendermime: IRenderMimeRegistry;
|
56 | |
57 |
|
58 |
|
59 | contentFactory: NotebookPanel.IContentFactory;
|
60 | |
61 |
|
62 |
|
63 | mimeTypeService: IEditorMimeTypeService;
|
64 | |
65 |
|
66 |
|
67 | editorConfig?: StaticNotebook.IEditorConfig;
|
68 | |
69 |
|
70 |
|
71 | notebookConfig?: StaticNotebook.INotebookConfig;
|
72 | |
73 |
|
74 |
|
75 | translator?: ITranslator;
|
76 | }
|
77 | |
78 |
|
79 |
|
80 | interface IFactory extends DocumentRegistry.IWidgetFactory<NotebookPanel, INotebookModel> {
|
81 | |
82 |
|
83 |
|
84 | autoStartDefault: boolean;
|
85 | |
86 |
|
87 |
|
88 | editorConfig: StaticNotebook.IEditorConfig;
|
89 | |
90 |
|
91 |
|
92 | notebookConfig: StaticNotebook.INotebookConfig;
|
93 | |
94 |
|
95 |
|
96 | shutdownOnClose: boolean;
|
97 | }
|
98 | }
|