22// Distributed under the terms of the Modified BSD License.
33
44import {
5+ ILabShell ,
56 ILabStatus ,
67 ILayoutRestorer ,
78 IRouter ,
89 ITreePathUpdater ,
910 JupyterFrontEnd ,
1011 JupyterFrontEndPlugin ,
1112 JupyterLab ,
13+ LayoutRestorer ,
1214} from '@jupyterlab/application' ;
1315
1416import {
@@ -54,7 +56,7 @@ import {
5456 SidePanelPalette ,
5557 INotebookPathOpener ,
5658 defaultNotebookPathOpener ,
57- NotebookLayoutRestorer ,
59+ NotebookStateDB ,
5860} from '@jupyter-notebook/application' ;
5961
6062import { jupyterIcon } from '@jupyter-notebook/ui-components' ;
@@ -216,7 +218,7 @@ const layoutRestorer: JupyterFrontEndPlugin<ILayoutRestorer | null> = {
216218 const first = app . started ;
217219 const registry = app . commands ;
218220
219- const restorer = new NotebookLayoutRestorer ( {
221+ const restorer = new LayoutRestorer ( {
220222 connector : state ,
221223 first,
222224 registry,
@@ -228,7 +230,7 @@ const layoutRestorer: JupyterFrontEndPlugin<ILayoutRestorer | null> = {
228230 // promise.
229231 void notebookShell . restoreLayout ( restorer ) . then ( ( ) => {
230232 notebookShell . layoutModified . connect ( ( ) => {
231- void restorer . save ( notebookShell . saveLayout ( ) ) ;
233+ void restorer . save ( notebookShell . saveLayout ( ) as ILabShell . ILayout ) ;
232234 } ) ;
233235 } ) ;
234236 } ) ;
@@ -623,7 +625,7 @@ const state: JupyterFrontEndPlugin<IStateDB> = {
623625 const { workspaces } = serviceManager ;
624626 const workspace = PageConfig . getOption ( 'notebookPage' ) ;
625627 const transform = new PromiseDelegate < StateDB . DataTransform > ( ) ;
626- const db = new StateDB ( { transform : transform . promise } ) ;
628+ const db = new NotebookStateDB ( { transform : transform . promise } ) ;
627629 const save = new Debouncer ( async ( ) => {
628630 const id = workspace ;
629631 const metadata = { id } ;
0 commit comments