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 | /**
|
64 | * Override keydown handling to prevent command shortcuts from preventing user input.
|
65 | *
|
66 | * This introduces a slight delay to the command invocation, but no delay to user input.
|
67 | */
|
68 | protected evtKeydown(keyDownEvent: KeyboardEvent): void;
|
69 | private _info;
|
70 | private _paths;
|
71 | private _allPluginsActivated;
|
72 | }
|
73 | /**
|
74 | * The namespace for `JupyterLab` class statics.
|
75 | */
|
76 | export declare namespace JupyterLab {
|
77 | |
78 |
|
79 |
|
80 | export interface IOptions extends Partial<JupyterFrontEnd.IOptions<ILabShell>>, Partial<IInfo> {
|
81 | paths?: Partial<JupyterFrontEnd.IPaths>;
|
82 | }
|
83 | |
84 |
|
85 |
|
86 | export const IInfo: Token<IInfo>;
|
87 | |
88 |
|
89 |
|
90 | export interface IInfo {
|
91 | |
92 |
|
93 |
|
94 | readonly devMode: boolean;
|
95 | |
96 |
|
97 |
|
98 | readonly deferred: {
|
99 | patterns: string[];
|
100 | matches: string[];
|
101 | };
|
102 | |
103 |
|
104 |
|
105 | readonly disabled: {
|
106 | patterns: string[];
|
107 | matches: string[];
|
108 | };
|
109 | |
110 |
|
111 |
|
112 | readonly mimeExtensions: IRenderMime.IExtensionModule[];
|
113 | |
114 |
|
115 |
|
116 | readonly availablePlugins: IPluginInfo[];
|
117 | |
118 |
|
119 |
|
120 | readonly filesCached: boolean;
|
121 | |
122 |
|
123 |
|
124 |
|
125 |
|
126 |
|
127 |
|
128 |
|
129 |
|
130 |
|
131 | isConnected: boolean;
|
132 | }
|
133 | export interface IToken extends Readonly<Pick<Token<any>, 'name' | 'description'>> {
|
134 | }
|
135 | |
136 |
|
137 |
|
138 |
|
139 | interface ILuminoPluginData extends Readonly<Pick<JupyterFrontEndPlugin<void>, 'id' | 'description' | 'autoStart'>> {
|
140 | |
141 |
|
142 |
|
143 | readonly requires: IToken[];
|
144 | |
145 |
|
146 |
|
147 | readonly optional: IToken[];
|
148 | |
149 |
|
150 |
|
151 | readonly provides: IToken | null;
|
152 | }
|
153 | |
154 |
|
155 |
|
156 | export interface IPluginInfo extends ILuminoPluginData {
|
157 | |
158 |
|
159 |
|
160 | extension: string;
|
161 | |
162 |
|
163 |
|
164 | enabled: boolean;
|
165 | }
|
166 | |
167 |
|
168 |
|
169 | export const defaultInfo: IInfo;
|
170 | |
171 |
|
172 |
|
173 | export const defaultPaths: JupyterFrontEnd.IPaths;
|
174 | |
175 |
|
176 |
|
177 |
|
178 | export interface IPluginModule {
|
179 | |
180 |
|
181 |
|
182 | default: JupyterFrontEndPlugin<any, any, any> | JupyterFrontEndPlugin<any, any, any>[];
|
183 | }
|
184 | export {};
|
185 | }
|