1 | import { IRenderMime } from '@jupyterlab/rendermime-interfaces';
|
2 | import { Token } from '@lumino/coreutils';
|
3 | import { JupyterFrontEnd, JupyterFrontEndPlugin } from './frontend';
|
4 | import { ILabShell } from './shell';
|
5 | import { LabStatus } from './status';
|
6 |
|
7 |
|
8 |
|
9 | export declare class JupyterLab extends JupyterFrontEnd<ILabShell> {
|
10 | |
11 |
|
12 |
|
13 | constructor(options?: JupyterLab.IOptions);
|
14 | /**
|
15 | * The name of the JupyterLab application.
|
16 | */
|
17 | readonly name: string;
|
18 | /**
|
19 | * A namespace/prefix plugins may use to denote their provenance.
|
20 | */
|
21 | readonly namespace: string;
|
22 | /**
|
23 | * A list of all errors encountered when registering plugins.
|
24 | */
|
25 | readonly registerPluginErrors: Array<Error>;
|
26 | /**
|
27 | * Promise that resolves when state is first restored, returning layout
|
28 | * description.
|
29 | */
|
30 | readonly restored: Promise<void>;
|
31 | /**
|
32 | * The application busy and dirty status signals and flags.
|
33 | */
|
34 | readonly status: LabStatus;
|
35 | /**
|
36 | * The version of the JupyterLab application.
|
37 | */
|
38 | readonly version: string;
|
39 | /**
|
40 | * The JupyterLab application information dictionary.
|
41 | */
|
42 | get info(): JupyterLab.IInfo;
|
43 | /**
|
44 | * The JupyterLab application paths dictionary.
|
45 | */
|
46 | get paths(): JupyterFrontEnd.IPaths;
|
47 | /**
|
48 | * Promise that resolves when all the plugins are activated, including the deferred.
|
49 | */
|
50 | get allPluginsActivated(): Promise<void>;
|
51 | /**
|
52 | * Register plugins from a plugin module.
|
53 | *
|
54 | * @param mod - The plugin module to register.
|
55 | */
|
56 | registerPluginModule(mod: JupyterLab.IPluginModule): void;
|
57 | /**
|
58 | * Register the plugins from multiple plugin modules.
|
59 | *
|
60 | * @param mods - The plugin modules to register.
|
61 | */
|
62 | registerPluginModules(mods: JupyterLab.IPluginModule[]): void;
|
63 | private _info;
|
64 | private _paths;
|
65 | private _allPluginsActivated;
|
66 | }
|
67 | /**
|
68 | * The namespace for `JupyterLab` class statics.
|
69 | */
|
70 | export declare namespace JupyterLab {
|
71 | |
72 |
|
73 |
|
74 | export interface IOptions extends Partial<JupyterFrontEnd.IOptions<ILabShell>>, Partial<IInfo> {
|
75 | paths?: Partial<JupyterFrontEnd.IPaths>;
|
76 | }
|
77 | |
78 |
|
79 |
|
80 | export const IInfo: Token<IInfo>;
|
81 | |
82 |
|
83 |
|
84 | export interface IInfo {
|
85 | |
86 |
|
87 |
|
88 | readonly devMode: boolean;
|
89 | |
90 |
|
91 |
|
92 | readonly deferred: {
|
93 | patterns: string[];
|
94 | matches: string[];
|
95 | };
|
96 | |
97 |
|
98 |
|
99 | readonly disabled: {
|
100 | patterns: string[];
|
101 | matches: string[];
|
102 | };
|
103 | |
104 |
|
105 |
|
106 | readonly mimeExtensions: IRenderMime.IExtensionModule[];
|
107 | |
108 |
|
109 |
|
110 | readonly availablePlugins: IPluginInfo[];
|
111 | |
112 |
|
113 |
|
114 | readonly filesCached: boolean;
|
115 | |
116 |
|
117 |
|
118 |
|
119 |
|
120 |
|
121 |
|
122 |
|
123 |
|
124 |
|
125 | isConnected: boolean;
|
126 | }
|
127 | interface IToken extends Readonly<Pick<Token<any>, 'name' | 'description'>> {
|
128 | }
|
129 | |
130 |
|
131 |
|
132 |
|
133 | interface ILuminoPluginData extends Readonly<Pick<JupyterFrontEndPlugin<void>, 'id' | 'description' | 'autoStart'>> {
|
134 | |
135 |
|
136 |
|
137 | readonly requires: IToken[];
|
138 | |
139 |
|
140 |
|
141 | readonly optional: IToken[];
|
142 | |
143 |
|
144 |
|
145 | readonly provides: IToken | null;
|
146 | }
|
147 | |
148 |
|
149 |
|
150 | export interface IPluginInfo extends ILuminoPluginData {
|
151 | |
152 |
|
153 |
|
154 | extension: string;
|
155 | |
156 |
|
157 |
|
158 | enabled: boolean;
|
159 | }
|
160 | |
161 |
|
162 |
|
163 | export const defaultInfo: IInfo;
|
164 | |
165 |
|
166 |
|
167 | export const defaultPaths: JupyterFrontEnd.IPaths;
|
168 | |
169 |
|
170 |
|
171 |
|
172 | export interface IPluginModule {
|
173 | |
174 |
|
175 |
|
176 | default: JupyterFrontEndPlugin<any, any, any> | JupyterFrontEndPlugin<any, any, any>[];
|
177 | }
|
178 | export {};
|
179 | }
|