Skip to content

Commit a965bc6

Browse files
Disable @jupyterlab/apputils-extension:state and add a shim for @jupyterlab/coreutils:IStateDB (#216)
Co-authored-by: Michał Krassowski <[email protected]>
1 parent 30b0e76 commit a965bc6

File tree

4 files changed

+12
-0
lines changed

4 files changed

+12
-0
lines changed

lite/jupyter-lite.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
"disabledExtensions": [
5959
"@jupyterlab/extensionmanager-extension",
6060
"@jupyterlab/apputils-extension:announcements",
61+
"@jupyterlab/apputils-extension:state",
6162
"@jupyterlab/debugger-extension",
6263
"@jupyterlab/application-extension:property-inspector",
6364

src/index.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { INotebookTracker, NotebookPanel } from '@jupyterlab/notebook';
33
import { Dialog, showDialog, ReactWidget, Notification } from '@jupyterlab/apputils';
44
import { PageConfig } from '@jupyterlab/coreutils';
55
import { INotebookContent } from '@jupyterlab/nbformat';
6+
import { IStateDB, StateDB } from '@jupyterlab/statedb';
67

78
import { customSidebar } from './sidebar';
89
import { SharingService } from './sharing-service';
@@ -579,7 +580,17 @@ const plugin: JupyterFrontEndPlugin<void> = {
579580
}
580581
};
581582

583+
const stateDBShim: JupyterFrontEndPlugin<IStateDB> = {
584+
id: '@jupyter-everywhere/apputils-extension:state',
585+
autoStart: true,
586+
provides: IStateDB,
587+
activate: (app: JupyterFrontEnd) => {
588+
return new StateDB();
589+
}
590+
};
591+
582592
export default [
593+
stateDBShim,
583594
viewOnlyNotebookFactoryPlugin,
584595
notebookFactoryPlugin,
585596
plugin,
-7 Bytes
Loading
-96 Bytes
Loading

0 commit comments

Comments
 (0)