1 | import { ISessionContext, Printing } from '@jupyterlab/apputils';
|
2 | import { DocumentRegistry, DocumentWidget } from '@jupyterlab/docregistry';
|
3 | import { ITranslator } from '@jupyterlab/translation';
|
4 | import { Token } from '@lumino/coreutils';
|
5 | import { INotebookModel } from './model';
|
6 | import { Notebook, StaticNotebook } from './widget';
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 | export declare class NotebookPanel extends DocumentWidget<Notebook, INotebookModel> {
|
15 | |
16 |
|
17 |
|
18 | constructor(options: DocumentWidget.IOptions<Notebook, INotebookModel>);
|
19 | _onSave(sender: DocumentRegistry.Context, state: DocumentRegistry.SaveState): void;
|
20 | /**
|
21 | * The session context used by the panel.
|
22 | */
|
23 | get sessionContext(): ISessionContext;
|
24 | /**
|
25 | * The model for the widget.
|
26 | */
|
27 | get model(): INotebookModel | null;
|
28 | /**
|
29 | * Update the options for the current notebook panel.
|
30 | *
|
31 | * @param config new options to set
|
32 | */
|
33 | setConfig(config: NotebookPanel.IConfig): void;
|
34 | /**
|
35 | * Set URI fragment identifier.
|
36 | */
|
37 | setFragment(fragment: string): void;
|
38 | /**
|
39 | * Dispose of the resources used by the widget.
|
40 | */
|
41 | dispose(): void;
|
42 | /**
|
43 | * Prints the notebook by converting to HTML with nbconvert.
|
44 | */
|
45 | [Printing.symbol](): () => Promise<void>;
|
46 | /**
|
47 | * Handle a fully rendered signal notebook.
|
48 | */
|
49 | private _onFullyRendered;
|
50 | /**
|
51 | * Handle a change in the kernel by updating the document metadata.
|
52 | */
|
53 | private _onKernelChanged;
|
54 | private _onSessionStatusChanged;
|
55 | /**
|
56 | * Update the kernel language.
|
57 | */
|
58 | private _updateLanguage;
|
59 | /**
|
60 | * Update the kernel spec.
|
61 | */
|
62 | private _updateSpec;
|
63 | translator: ITranslator;
|
64 | private _trans;
|
65 | /**
|
66 | * Whether we are currently in a series of autorestarts we have already
|
67 | * notified the user about.
|
68 | */
|
69 | private _autorestarting;
|
70 | }
|
71 | /**
|
72 | * A namespace for `NotebookPanel` statics.
|
73 | */
|
74 | export declare namespace NotebookPanel {
|
75 | |
76 |
|
77 |
|
78 | interface IConfig {
|
79 | |
80 |
|
81 |
|
82 | editorConfig: StaticNotebook.IEditorConfig;
|
83 | |
84 |
|
85 |
|
86 | notebookConfig: StaticNotebook.INotebookConfig;
|
87 | |
88 |
|
89 |
|
90 | kernelShutdown: boolean;
|
91 | }
|
92 | |
93 |
|
94 |
|
95 | interface IContentFactory extends Notebook.IContentFactory {
|
96 | |
97 |
|
98 |
|
99 | createNotebook(options: Notebook.IOptions): Notebook;
|
100 | }
|
101 | |
102 |
|
103 |
|
104 | class ContentFactory extends Notebook.ContentFactory implements IContentFactory {
|
105 | |
106 |
|
107 |
|
108 | createNotebook(options: Notebook.IOptions): Notebook;
|
109 | }
|
110 | |
111 |
|
112 |
|
113 | const defaultContentFactory: ContentFactory;
|
114 | |
115 |
|
116 |
|
117 | const IContentFactory: Token<IContentFactory>;
|
118 | }
|