@datalayer/jupyter-react 0.8.2 → 0.8.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (251) hide show
  1. package/LICENSE +1 -1
  2. package/lib/app/App.js +1 -1
  3. package/lib/app/JupyterReact.js +1 -1
  4. package/lib/app/tabs/AboutTab.js +2 -2
  5. package/lib/app/tabs/AboutTab.js.map +1 -1
  6. package/lib/app/tabs/ComponentsTab.js +1 -1
  7. package/lib/app/tabs/components/CellComponent.js +1 -1
  8. package/lib/app/tabs/components/FileBrowserComponent.js +1 -1
  9. package/lib/app/tabs/components/IPyWidgetsComponent.js +1 -1
  10. package/lib/app/tabs/components/NotebookComponent.js +1 -1
  11. package/lib/app/tabs/components/ViewerComponent.js +1 -1
  12. package/lib/components/button/Button.js +1 -1
  13. package/lib/components/cell/Cell.js +24 -1
  14. package/lib/components/cell/Cell.js.map +1 -1
  15. package/lib/components/cell/CellAdapter.js +2 -2
  16. package/lib/components/cell/CellCommands.js +1 -1
  17. package/lib/components/cell/CellRedux.js +1 -1
  18. package/lib/components/cell/CellZustand.js +1 -1
  19. package/lib/components/codemirror/CodeMirrorEditor.js +1 -1
  20. package/lib/components/codemirror/CodeMirrorOutputToolbar.js +1 -1
  21. package/lib/components/codemirror/CodeMirrorTheme.js +1 -1
  22. package/lib/components/commands/Commands.js +1 -1
  23. package/lib/components/commands/CommandsAdapter.css +1 -1
  24. package/lib/components/commands/CommandsAdapter.js +1 -1
  25. package/lib/components/commands/CommandsState.js +1 -1
  26. package/lib/components/console/Console.css +1 -1
  27. package/lib/components/console/Console.js +1 -1
  28. package/lib/components/console/ConsoleAdapter.d.ts +1 -1
  29. package/lib/components/console/ConsoleAdapter.js +3 -3
  30. package/lib/components/console/ConsoleRedux.js +1 -1
  31. package/lib/components/console/ConsoleZustand.js +1 -1
  32. package/lib/components/dialog/Dialog.js +1 -1
  33. package/lib/components/dialog/DialogAdapter.js +1 -1
  34. package/lib/components/filebrowser/FileBrowser.js +1 -1
  35. package/lib/components/filemanager/FileManagerJupyterLab.js +1 -1
  36. package/lib/components/filemanager/FileManagerState.js +1 -1
  37. package/lib/components/filemanager/lab/FileManagerAdapter.css +1 -1
  38. package/lib/components/filemanager/lab/FileManagerAdapter.js +1 -1
  39. package/lib/components/jupyterlab/JupyterLabApp.d.ts +2 -2
  40. package/lib/components/jupyterlab/JupyterLabApp.js +1 -1
  41. package/lib/components/jupyterlab/JupyterLabAppAdapter.js +1 -1
  42. package/lib/components/jupyterlab/JupyterLabAppCss.d.ts +2 -2
  43. package/lib/components/jupyterlab/JupyterLabAppCss.js +1 -1
  44. package/lib/components/jupyterlab/JupyterLabAppPlugins.js +1 -1
  45. package/lib/components/notebook/Notebook.css +1 -1
  46. package/lib/components/notebook/Notebook.js +1 -1
  47. package/lib/components/notebook/NotebookAdapter.js +57 -30
  48. package/lib/components/notebook/NotebookAdapter.js.map +1 -1
  49. package/lib/components/notebook/NotebookCommands.js +1 -1
  50. package/lib/components/notebook/NotebookRedux.js +1 -1
  51. package/lib/components/notebook/NotebookZustand.js +1 -1
  52. package/lib/components/notebook/cell/metadata/CellMetadataEditor.js +1 -1
  53. package/lib/components/notebook/cell/metadata/NbGraderCells.js +1 -1
  54. package/lib/components/notebook/cell/prompt/Countdown.js +1 -1
  55. package/lib/components/notebook/cell/prompt/CountdownInputPrompt.js +1 -1
  56. package/lib/components/notebook/cell/prompt/CountdownOutputPrompt.js +1 -1
  57. package/lib/components/notebook/cell/sidebar/CellSidebar.js +1 -1
  58. package/lib/components/notebook/cell/sidebar/CellSidebarButton.js +1 -1
  59. package/lib/components/notebook/cell/sidebar/CellSidebarRun.js +1 -1
  60. package/lib/components/notebook/cell/sidebar/CellSidebarWidget.js +1 -1
  61. package/lib/components/notebook/content/JupyterReactContentFactory.js +1 -1
  62. package/lib/components/notebook/marked/marked.js +1 -1
  63. package/lib/components/notebook/model/JupyterReactNotebookModelFactory.js +1 -1
  64. package/lib/components/output/Output.css +1 -1
  65. package/lib/components/output/Output.d.ts +3 -1
  66. package/lib/components/output/Output.js +5 -5
  67. package/lib/components/output/Output.js.map +1 -1
  68. package/lib/components/output/OutputAdapter.d.ts +2 -2
  69. package/lib/components/output/OutputAdapter.js +7 -7
  70. package/lib/components/output/OutputAdapter.js.map +1 -1
  71. package/lib/components/output/OutputIPyWidgets.css +1 -1
  72. package/lib/components/output/OutputIPyWidgets.js +2 -2
  73. package/lib/components/output/OutputIPyWidgets.js.map +1 -1
  74. package/lib/components/output/OutputRedux.js +1 -1
  75. package/lib/components/output/OutputRenderer.js +22 -0
  76. package/lib/components/output/OutputRenderer.js.map +1 -1
  77. package/lib/components/output/OutputZustand.js +1 -1
  78. package/lib/{jupyter → components/output}/ipywidgets/IPyWidgetsAttached.js +1 -1
  79. package/lib/components/output/ipywidgets/IPyWidgetsAttached.js.map +1 -0
  80. package/lib/{jupyter → components/output}/ipywidgets/IPyWidgetsViewManager.js +1 -1
  81. package/lib/components/output/ipywidgets/IPyWidgetsViewManager.js.map +1 -0
  82. package/lib/components/settings/Settings.js +1 -1
  83. package/lib/components/settings/SettingsAdapter.css +1 -1
  84. package/lib/components/settings/SettingsAdapter.js +1 -1
  85. package/lib/components/settings/SettingsRedux.js +1 -1
  86. package/lib/components/settings/SettingsZustand.js +1 -1
  87. package/lib/components/terminal/Terminal.d.ts +1 -1
  88. package/lib/components/terminal/Terminal.js +2 -2
  89. package/lib/components/terminal/Terminal.js.map +1 -1
  90. package/lib/components/terminal/TerminalAdapter.js +3 -3
  91. package/lib/components/terminal/TerminalAdapter.js.map +1 -1
  92. package/lib/components/terminal/TerminalRedux.js +1 -1
  93. package/lib/components/terminal/TerminalZustand.js +1 -1
  94. package/lib/components/textinput/TextInput.js +1 -1
  95. package/lib/components/viewer/Viewer.js +1 -1
  96. package/lib/components/viewer/input/CodemirrorView.js +1 -1
  97. package/lib/components/viewer/input/CodemirrorViewer.js +1 -1
  98. package/lib/components/viewer/input/InputViewer.js +1 -1
  99. package/lib/components/viewer/output/OutputAdapter.js +1 -1
  100. package/lib/examples/All.js +1 -1
  101. package/lib/examples/Bokeh.js +1 -1
  102. package/lib/examples/Bqplot.js +1 -1
  103. package/lib/examples/Cell.js +1 -1
  104. package/lib/examples/Cells.js +1 -1
  105. package/lib/examples/Console.js +1 -1
  106. package/lib/examples/ConsoleLite.js +1 -1
  107. package/lib/examples/Dashboard.js +1 -1
  108. package/lib/examples/FileBrowser.js +1 -1
  109. package/lib/examples/GeoJson.js +1 -1
  110. package/lib/examples/IPyLeaflet.js +4 -2
  111. package/lib/examples/IPyLeaflet.js.map +1 -1
  112. package/lib/examples/IPyReact.js +1 -1
  113. package/lib/examples/IPyWidgets.js +1 -1
  114. package/lib/examples/IPyWidgetsWithState.js +1 -1
  115. package/lib/examples/JupyterLabApp.js +2 -2
  116. package/lib/examples/JupyterLabHeadlessApp.js +2 -2
  117. package/lib/examples/JupyterLabHeadlessApp.js.map +1 -1
  118. package/lib/examples/KernelExecutor.js +45 -0
  119. package/lib/examples/KernelExecutor.js.map +1 -0
  120. package/lib/examples/Lumino.js +1 -1
  121. package/lib/examples/Matplotlib.js +2 -2
  122. package/lib/examples/Matplotlib.js.map +1 -1
  123. package/lib/examples/Notebook.js +11 -6
  124. package/lib/examples/Notebook.js.map +1 -1
  125. package/lib/examples/NotebookCellSidebar.js +1 -1
  126. package/lib/examples/NotebookColorMode.js +41 -0
  127. package/lib/examples/NotebookColorMode.js.map +1 -0
  128. package/lib/examples/NotebookExternalContent.js +1 -1
  129. package/lib/examples/NotebookInit.js +1 -1
  130. package/lib/examples/NotebookInjectableReduxStore.js +1 -1
  131. package/lib/examples/NotebookKernelChange.js +1 -1
  132. package/lib/examples/NotebookModelChange.js +1 -1
  133. package/lib/examples/NotebookNbFormat.d.ts +1 -0
  134. package/lib/examples/{NotebookModel.js → NotebookNbFormat.js} +4 -4
  135. package/lib/examples/NotebookNbFormat.js.map +1 -0
  136. package/lib/examples/NotebookPath.js +1 -1
  137. package/lib/examples/NotebookPathChange.js +1 -1
  138. package/lib/examples/NotebookTheme.d.ts +1 -0
  139. package/lib/examples/NotebookTheme.js +41 -0
  140. package/lib/examples/NotebookTheme.js.map +1 -0
  141. package/lib/examples/NotebookUnmount.js +1 -1
  142. package/lib/examples/Output.js +4 -4
  143. package/lib/examples/Output.js.map +1 -1
  144. package/lib/examples/OutputIPyWidgets.js +1 -1
  145. package/lib/examples/Outputs.js +1 -1
  146. package/lib/examples/Panel.js +1 -1
  147. package/lib/examples/Plotly.js +1 -1
  148. package/lib/examples/RunningSessions.js +2 -2
  149. package/lib/examples/RunningSessions.js.map +1 -1
  150. package/lib/examples/Terminal.js +2 -2
  151. package/lib/examples/Terminal.js.map +1 -1
  152. package/lib/examples/Vega.js +1 -1
  153. package/lib/examples/Viewer.js +1 -1
  154. package/lib/examples/ViewerFile.js +1 -1
  155. package/lib/examples/lumino/LuminoWidget.d.ts +1 -1
  156. package/lib/examples/lumino/LuminoWidget.js +2 -2
  157. package/lib/examples/lumino/LuminoWidget.js.map +1 -1
  158. package/lib/examples/notebooks/OutputIPyWidgetsExample.js +1 -1
  159. package/lib/examples/sidebars/CellSidebarSource.js +1 -1
  160. package/lib/examples/state/ExampleReduxState.js +1 -1
  161. package/lib/examples/toolbars/NotebookToolbar.js +1 -1
  162. package/lib/examples/toolbars/NotebookToolbarAutoSave.js +1 -1
  163. package/lib/examples/toolbars/NotebookToolbarStatus.js +1 -1
  164. package/lib/index.css +1 -1
  165. package/lib/index.d.ts +4 -4
  166. package/lib/index.js +5 -5
  167. package/lib/index.js.map +1 -1
  168. package/lib/jupyter/Jupyter.d.ts +1068 -3
  169. package/lib/jupyter/Jupyter.js +7 -7
  170. package/lib/jupyter/Jupyter.js.map +1 -1
  171. package/lib/jupyter/JupyterAuthError.js +1 -1
  172. package/lib/jupyter/JupyterConfig.js +1 -1
  173. package/lib/jupyter/JupyterContext.d.ts +1 -3
  174. package/lib/jupyter/JupyterContext.js +8 -8
  175. package/lib/jupyter/JupyterContext.js.map +1 -1
  176. package/lib/jupyter/JupyterHandlers.js +1 -1
  177. package/lib/jupyter/ipywidgets/{lab → cache}/semvercache.js +3 -1
  178. package/lib/jupyter/ipywidgets/cache/semvercache.js.map +1 -0
  179. package/lib/jupyter/ipywidgets/{manager → classic}/IPyWidgetsClassicManager.d.ts +15 -2
  180. package/lib/jupyter/ipywidgets/classic/IPyWidgetsClassicManager.js +185 -0
  181. package/lib/jupyter/ipywidgets/classic/IPyWidgetsClassicManager.js.map +1 -0
  182. package/lib/jupyter/ipywidgets/lab/manager.d.ts +4 -4
  183. package/lib/jupyter/ipywidgets/lab/manager.js +22 -9
  184. package/lib/jupyter/ipywidgets/lab/manager.js.map +1 -1
  185. package/lib/jupyter/ipywidgets/lab/output.js +1 -1
  186. package/lib/jupyter/ipywidgets/lab/plugin.d.ts +6 -5
  187. package/lib/jupyter/ipywidgets/lab/plugin.js +44 -42
  188. package/lib/jupyter/ipywidgets/lab/plugin.js.map +1 -1
  189. package/lib/jupyter/ipywidgets/lab/renderer.js +1 -1
  190. package/lib/jupyter/ipywidgets/plotly/Figure.js +1 -1
  191. package/lib/jupyter/ipywidgets/plotly/JupyterlabPlugin.js +1 -1
  192. package/lib/jupyter/ipywidgets/plotly/Version.js +1 -1
  193. package/lib/jupyter/ipywidgets/plotly/index.js +1 -1
  194. package/lib/jupyter/kernel/Kernel.d.ts +2 -0
  195. package/lib/jupyter/kernel/Kernel.js +10 -2
  196. package/lib/jupyter/kernel/Kernel.js.map +1 -1
  197. package/lib/jupyter/kernel/KernelExecutor.d.ts +28 -0
  198. package/lib/jupyter/kernel/KernelExecutor.js +115 -0
  199. package/lib/jupyter/kernel/KernelExecutor.js.map +1 -0
  200. package/lib/jupyter/lab/JupyterLabCss.d.ts +2 -2
  201. package/lib/jupyter/lab/JupyterLabCss.js +19 -19
  202. package/lib/jupyter/lab/JupyterLabCss.js.map +1 -1
  203. package/lib/jupyter/lab/JupyterLabCssImports.d.ts +16 -16
  204. package/lib/jupyter/lab/JupyterLabCssImports.js +17 -17
  205. package/lib/jupyter/lab/JupyterLabCssImports.js.map +1 -1
  206. package/lib/jupyter/lab/JupyterLabTheme.d.ts +1 -1
  207. package/lib/jupyter/lab/JupyterLabTheme.js +1 -1
  208. package/lib/jupyter/lab/__tests__/datalayer.spec.js +1 -1
  209. package/lib/jupyter/lab/index.js +1 -1
  210. package/lib/jupyter/lab/notebook/content/CountdownContentFactory.js +1 -1
  211. package/lib/jupyter/lab/notebook/content/plugin.js +1 -1
  212. package/lib/jupyter/lab/notebook/index.js +1 -1
  213. package/lib/jupyter/lite/LiteServer.js +1 -1
  214. package/lib/jupyter/lumino/Lumino.js +1 -1
  215. package/lib/jupyter/lumino/LuminoBox.js +1 -1
  216. package/lib/jupyter/lumino/LuminoDetached.js +1 -1
  217. package/lib/jupyter/lumino/LuminoObservable.js +1 -1
  218. package/lib/jupyter/lumino/LuminoRedux.js +1 -1
  219. package/lib/jupyter/lumino/ReactPortalWidget.js +1 -1
  220. package/lib/jupyter/renderers/index.js +1 -1
  221. package/lib/jupyter/renderers/plotly/PlotlyRenderer.js +1 -1
  222. package/lib/jupyter/renderers/plotly/plotly.css +1 -1
  223. package/lib/jupyter/services/Services.js +1 -1
  224. package/lib/jupyter/theme.d.ts +2 -2
  225. package/lib/jupyter/theme.js +14 -14
  226. package/lib/jupyter/theme.js.map +1 -1
  227. package/lib/state/index.js +1 -1
  228. package/lib/state/redux/InitState.js +1 -1
  229. package/lib/state/redux/State.js +1 -1
  230. package/lib/state/redux/Store.js +1 -1
  231. package/lib/utils/Utils.js +1 -1
  232. package/package.json +1 -1
  233. package/style/base.css +1 -1
  234. package/style/index.css +1 -1
  235. package/style/index.js +1 -1
  236. package/lib/examples/NotebookModel.js.map +0 -1
  237. package/lib/examples/NotebookThemed.js +0 -52
  238. package/lib/examples/NotebookThemed.js.map +0 -1
  239. package/lib/jupyter/ipywidgets/IPyWidgetsAttached.js.map +0 -1
  240. package/lib/jupyter/ipywidgets/IPyWidgetsViewManager.js.map +0 -1
  241. package/lib/jupyter/ipywidgets/lab/semvercache.js.map +0 -1
  242. package/lib/jupyter/ipywidgets/manager/IPyWidgetsClassicManager.js +0 -85
  243. package/lib/jupyter/ipywidgets/manager/IPyWidgetsClassicManager.js.map +0 -1
  244. package/lib/jupyter/kernel/KernelModel.d.ts +0 -18
  245. package/lib/jupyter/kernel/KernelModel.js +0 -57
  246. package/lib/jupyter/kernel/KernelModel.js.map +0 -1
  247. /package/lib/{jupyter → components/output}/ipywidgets/IPyWidgetsAttached.d.ts +0 -0
  248. /package/lib/{jupyter → components/output}/ipywidgets/IPyWidgetsViewManager.d.ts +0 -0
  249. /package/lib/examples/{NotebookModel.d.ts → KernelExecutor.d.ts} +0 -0
  250. /package/lib/examples/{NotebookThemed.d.ts → NotebookColorMode.d.ts} +0 -0
  251. /package/lib/jupyter/ipywidgets/{lab → cache}/semvercache.d.ts +0 -0
package/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) Datalayer Inc. All rights reserved.
1
+ Copyright (c) 2021-2023 Datalayer, Inc.
2
2
 
3
3
  MIT License
4
4
 
package/lib/app/App.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  /*
3
- * Copyright (c) 2022-2023 Datalayer Inc. All rights reserved.
3
+ * Copyright (c) 2021-2023 Datalayer, Inc.
4
4
  *
5
5
  * MIT License
6
6
  */
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  /*
3
- * Copyright (c) 2022-2023 Datalayer Inc. All rights reserved.
3
+ * Copyright (c) 2021-2023 Datalayer, Inc.
4
4
  *
5
5
  * MIT License
6
6
  */
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  /*
3
- * Copyright (c) 2022-2023 Datalayer Inc. All rights reserved.
3
+ * Copyright (c) 2021-2023 Datalayer, Inc.
4
4
  *
5
5
  * MIT License
6
6
  */
@@ -10,7 +10,7 @@ import { ECharlesIcon } from '@datalayer/icons-react/eggs';
10
10
  const AboutTab = (props) => {
11
11
  const { version } = props;
12
12
  const [egg, setEgg] = useState(false);
13
- return (_jsxs(_Fragment, { children: [_jsxs(Pagehead, { as: "h2", children: ["\uD83E\uDE90 \u269B\uFE0F Jupyter React", _jsx(Label, { sx: { marginLeft: 1 }, children: version })] }), _jsx(Box, { children: _jsx(Text, { children: "React.js components \uD83D\uDCAF% compatible with Jupyter." }) }), _jsx(Box, { mt: 3, style: { width: 350 }, children: !egg ? (_jsx("img", { src: "https://assets.datalayer.tech/releases/datalayer-0.3.0-black-snake_1024.png", onClick: e => setEgg(true) })) : (_jsx(ECharlesIcon, { size: 300, onClick: e => setEgg(false) })) }), _jsx(Box, { children: _jsx(Link, { href: "https://datalayer.tech/docs/releases/0.3.0-black-snake", target: "_blank", children: _jsx(Text, { as: "h4", children: "Datalayer 0.3.0 Black Snake Release" }) }) }), _jsx(Box, { children: _jsx(Link, { href: "https://github.com/datalayer/jupyter-ui/tree/main/packages/react", target: "_blank", children: _jsx(Text, { as: "h4", children: "Source code" }) }) })] }));
13
+ return (_jsxs(_Fragment, { children: [_jsxs(Pagehead, { as: "h2", children: ["\uD83E\uDE90 \u269B\uFE0F Jupyter React", _jsx(Label, { sx: { marginLeft: 1 }, children: version })] }), _jsx(Box, { children: _jsx(Text, { children: "React.js components \uD83D\uDCAF% compatible with \uD83E\uDE90 Jupyter." }) }), _jsx(Box, { mt: 3, style: { width: 350 }, children: !egg ? (_jsx("img", { src: "https://assets.datalayer.tech/releases/datalayer-0.3.0-black-snake_1024.png", onClick: e => setEgg(true) })) : (_jsx(ECharlesIcon, { size: 300, onClick: e => setEgg(false) })) }), _jsx(Box, { children: _jsx(Link, { href: "https://datalayer.tech/docs/releases/0.3.0-black-snake", target: "_blank", children: _jsx(Text, { as: "h4", children: "Datalayer 0.3.0 Black Snake Release" }) }) }), _jsx(Box, { children: _jsx(Link, { href: "https://github.com/datalayer/jupyter-ui/tree/main/packages/react", target: "_blank", children: _jsx(Text, { as: "h4", children: "Source code" }) }) })] }));
14
14
  };
15
15
  export default AboutTab;
16
16
  //# sourceMappingURL=AboutTab.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AboutTab.js","sourceRoot":"","sources":["../../../src/app/tabs/AboutTab.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAM3D,MAAM,QAAQ,GAAG,CAAC,KAAY,EAAe,EAAE;IAC7C,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;IAC1B,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IACtC,OAAO,CACL,8BACE,MAAC,QAAQ,IAAC,EAAE,EAAC,IAAI,wDACI,KAAC,KAAK,IAAC,EAAE,EAAE,EAAE,UAAU,EAAE,CAAC,EAAE,YAAG,OAAO,GAAS,IACzD,EACX,KAAC,GAAG,cACF,KAAC,IAAI,6EAAwD,GACzD,EACN,KAAC,GAAG,IAAC,EAAE,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,YAC9B,CAAC,GAAG,CAAC,CAAC,CAAC,CACN,cACE,GAAG,EAAC,6EAA6E,EACjF,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,GAC1B,CACH,CAAC,CAAC,CAAC,CACF,KAAC,YAAY,IAAC,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,GAAI,C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,CAAC,MAAM,CAAC,IAAI,CAAC,GAC1B,CACH,CAAC,CAAC,CAAC,CACF,KAAC,YAAY,IAAC,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,GAAI,CACzD,GACG,EACN,KAAC,GAAG,cACF,KAAC,IAAI,IACH,IAAI,EAAC,wDAAwD,EAC7D,MAAM,EAAC,QAAQ,YAEf,KAAC,IAAI,IAAC,EAAE,EAAC,IAAI,oDAA2C,GACnD,GACH,EACN,KAAC,GAAG,cACF,KAAC,IAAI,IACH,IAAI,EAAC,kEAAkE,EACvE,MAAM,EAAC,QAAQ,YAEf,KAAC,IAAI,IAAC,EAAE,EAAC,IAAI,4BAAmB,GAC3B,GACH,IACL,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,QAAQ,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  /*
3
- * Copyright (c) 2022-2023 Datalayer Inc. All rights reserved.
3
+ * Copyright (c) 2021-2023 Datalayer, Inc.
4
4
  *
5
5
  * MIT License
6
6
  */
@@ -1,6 +1,6 @@
1
1
  import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
2
2
  /*
3
- * Copyright (c) 2022-2023 Datalayer Inc. All rights reserved.
3
+ * Copyright (c) 2021-2023 Datalayer, Inc.
4
4
  *
5
5
  * MIT License
6
6
  */
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  /*
3
- * Copyright (c) 2022-2023 Datalayer Inc. All rights reserved.
3
+ * Copyright (c) 2021-2023 Datalayer, Inc.
4
4
  *
5
5
  * MIT License
6
6
  */
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  /*
3
- * Copyright (c) 2022-2023 Datalayer Inc. All rights reserved.
3
+ * Copyright (c) 2021-2023 Datalayer, Inc.
4
4
  *
5
5
  * MIT License
6
6
  */
@@ -1,6 +1,6 @@
1
1
  import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
2
2
  /*
3
- * Copyright (c) 2022-2023 Datalayer Inc. All rights reserved.
3
+ * Copyright (c) 2021-2023 Datalayer, Inc.
4
4
  *
5
5
  * MIT License
6
6
  */
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  /*
3
- * Copyright (c) 2022-2023 Datalayer Inc. All rights reserved.
3
+ * Copyright (c) 2021-2023 Datalayer, Inc.
4
4
  *
5
5
  * MIT License
6
6
  */
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  /*
3
- * Copyright (c) 2022-2023 Datalayer Inc. All rights reserved.
3
+ * Copyright (c) 2021-2023 Datalayer, Inc.
4
4
  *
5
5
  * MIT License
6
6
  */
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  /*
3
- * Copyright (c) 2022-2023 Datalayer Inc. All rights reserved.
3
+ * Copyright (c) 2021-2023 Datalayer, Inc.
4
4
  *
5
5
  * MIT License
6
6
  */
@@ -12,10 +12,33 @@ import { cellActions, cellReducer } from './CellRedux';
12
12
  import CellAdapter from './CellAdapter';
13
13
  import Lumino from '../../jupyter/lumino/Lumino';
14
14
  import { useJupyter } from './../../jupyter/JupyterContext';
15
+ /*
15
16
  const DEFAULT_SOURCE = `from IPython.display import display
16
17
 
17
18
  for i in range(10):
18
19
  display('String {} added to the DOM in separated DIV.'.format(i))`;
20
+
21
+ const DEFAULT_SOURCE = `from ipywidgets import IntSlider
22
+ IntSlider()`;
23
+ */
24
+ const DEFAULT_SOURCE = `import ipyreact
25
+ class ConfettiWidget(ipyreact.ReactWidget):
26
+ _esm = """
27
+ import confetti from "canvas-confetti";
28
+ import * as React from "react";
29
+ export default function({value, set_value, debug}) {
30
+ return (
31
+ <>
32
+ <h1>Happy New Year 2024 🎉 from Datalayer</h1>
33
+ <button onClick={() => confetti() && set_value(value + 1)}>
34
+ CLICK here for some CONFETTIS
35
+ </button>
36
+ <h2>You have {value || 0} wishe{ (value > 1) && 's' } so far...</h2>
37
+ <quote>Powered by 🪐 Jupyter UI</quote>
38
+ </>
39
+ )
40
+ };"""
41
+ ConfettiWidget()`;
19
42
  export const Cell = (props) => {
20
43
  const { source, autoStart } = props;
21
44
  const { serverSettings, injectableStore, defaultKernel } = useJupyter();
@@ -1 +1 @@
1
- {"version":3,"file":"Cell.js","sourceRoot":"","sources":["../../../src/components/cell/Cell.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;AAEH,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,MAAM,MAAM,6BAA6B,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAE5D,MAAM,cAAc,GAAG;;;sEAG+C,CAAC;AAOvE,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,KAAiB,EAAE,EAAE;IACxC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,KAAK,CAAC;IACpC,MAAM,EAAE,cAAc,EAAE,eAAe,EAAE,aAAa,EAAE,GAAG,UAAU,EAAE,CAAC;IACxE,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAC;IAC/B,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,EAAe,CAAC;IACtD,OAAO,CAAC,GAAG,EAA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ACrB;YACD,gBAAgB,EAAE;gBAChB,MAAM,EAAE,iBAAiB;gBACzB,QAAQ,EAAE,UAAU;aACrB;YACD,uBAAuB,EAAE;gBACvB,aAAa,EAAE,MAAM;aACtB;YACD,wBAAwB,EAAE;gBACxB,MAAM,EAAE,iBAAiB;aAC1B;SACF,YAED,KAAC,MAAM,cAAE,OAAO,CAAC,KAAK,GAAU,GAC5B,CACP,CAAC,CAAC,CAAC,CACF,KAAC,GAAG,0CAA8B,CACnC,CAAC;AACJ,CAAC,CAAC;AAEF,IAAI,CAAC,YAAY,GAAG;IAClB,MAAM,EAAE,cAAc;IACtB,SAAS,EAAE,IAAI;CACO,CAAC;AAEzB,eAAe,IAAI,CAAC"}
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2022-2023 Datalayer Inc. All rights reserved.
2
+ * Copyright (c) 2021-2023 Datalayer, Inc.
3
3
  *
4
4
  * MIT License
5
5
  */
@@ -16,7 +16,7 @@ import { runIcon } from '@jupyterlab/ui-components';
16
16
  import { createStandaloneCell } from '@jupyter/ydoc';
17
17
  import { requireLoader as loader } from '@jupyter-widgets/html-manager';
18
18
  import { WIDGET_MIMETYPE, WidgetRenderer, } from '@jupyter-widgets/html-manager/lib/output_renderers';
19
- import IPyWidgetsClassicManager from '../../jupyter/ipywidgets/manager/IPyWidgetsClassicManager';
19
+ import IPyWidgetsClassicManager from '../../jupyter/ipywidgets/classic/IPyWidgetsClassicManager';
20
20
  import CellCommands from './CellCommands';
21
21
  export class CellAdapter {
22
22
  _codeCell;
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2022-2023 Datalayer Inc. All rights reserved.
2
+ * Copyright (c) 2021-2023 Datalayer, Inc.
3
3
  *
4
4
  * MIT License
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2022-2023 Datalayer Inc. All rights reserved.
2
+ * Copyright (c) 2021-2023 Datalayer, Inc.
3
3
  *
4
4
  * MIT License
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2022-2023 Datalayer Inc. All rights reserved.
2
+ * Copyright (c) 2021-2023 Datalayer, Inc.
3
3
  *
4
4
  * MIT License
5
5
  */
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  /*
3
- * Copyright (c) 2022-2023 Datalayer Inc. All rights reserved.
3
+ * Copyright (c) 2021-2023 Datalayer, Inc.
4
4
  *
5
5
  * MIT License
6
6
  */
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  /*
3
- * Copyright (c) 2022-2023 Datalayer Inc. All rights reserved.
3
+ * Copyright (c) 2021-2023 Datalayer, Inc.
4
4
  *
5
5
  * MIT License
6
6
  */
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2022-2023 Datalayer Inc. All rights reserved.
2
+ * Copyright (c) 2021-2023 Datalayer, Inc.
3
3
  *
4
4
  * MIT License
5
5
  */
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  /*
3
- * Copyright (c) 2022-2023 Datalayer Inc. All rights reserved.
3
+ * Copyright (c) 2021-2023 Datalayer, Inc.
4
4
  *
5
5
  * MIT License
6
6
  */
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2022-2023 Datalayer Inc. All rights reserved.
2
+ * Copyright (c) 2021-2023 Datalayer, Inc.
3
3
  *
4
4
  * MIT License
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2022-2023 Datalayer Inc. All rights reserved.
2
+ * Copyright (c) 2021-2023 Datalayer, Inc.
3
3
  *
4
4
  * MIT License
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2022-2023 Datalayer Inc. All rights reserved.
2
+ * Copyright (c) 2021-2023 Datalayer, Inc.
3
3
  *
4
4
  * MIT License
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2022-2023 Datalayer Inc. All rights reserved.
2
+ * Copyright (c) 2021-2023 Datalayer, Inc.
3
3
  *
4
4
  * MIT License
5
5
  */
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  /*
3
- * Copyright (c) 2022-2023 Datalayer Inc. All rights reserved.
3
+ * Copyright (c) 2021-2023 Datalayer, Inc.
4
4
  *
5
5
  * MIT License
6
6
  */
@@ -3,7 +3,7 @@ import { ServiceManager } from '@jupyterlab/services';
3
3
  declare class ConsoleAdapter {
4
4
  private _panel;
5
5
  constructor(serviceManager: ServiceManager);
6
- startConsole(path: string, serviceManager: ServiceManager.IManager, panel: BoxPanel): void;
6
+ setupConsole(path: string, serviceManager: ServiceManager.IManager, panel: BoxPanel): void;
7
7
  get panel(): BoxPanel;
8
8
  }
9
9
  export default ConsoleAdapter;
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2022-2023 Datalayer Inc. All rights reserved.
2
+ * Copyright (c) 2021-2023 Datalayer, Inc.
3
3
  *
4
4
  * MIT License
5
5
  */
@@ -16,10 +16,10 @@ class ConsoleAdapter {
16
16
  this._panel.spacing = 0;
17
17
  this._panel.addClass('dla-JupyterLab-Console');
18
18
  serviceManager.ready.then(() => {
19
- this.startConsole('console-path', serviceManager, this._panel);
19
+ this.setupConsole('console-path', serviceManager, this._panel);
20
20
  });
21
21
  }
22
- startConsole(path, serviceManager, panel) {
22
+ setupConsole(path, serviceManager, panel) {
23
23
  const commands = new CommandRegistry();
24
24
  document.addEventListener('keydown', event => {
25
25
  commands.processKeydownEvent(event);
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2022-2023 Datalayer Inc. All rights reserved.
2
+ * Copyright (c) 2021-2023 Datalayer, Inc.
3
3
  *
4
4
  * MIT License
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2022-2023 Datalayer Inc. All rights reserved.
2
+ * Copyright (c) 2021-2023 Datalayer, Inc.
3
3
  *
4
4
  * MIT License
5
5
  */
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  /*
3
- * Copyright (c) 2022-2023 Datalayer Inc. All rights reserved.
3
+ * Copyright (c) 2021-2023 Datalayer, Inc.
4
4
  *
5
5
  * MIT License
6
6
  */
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2022-2023 Datalayer Inc. All rights reserved.
2
+ * Copyright (c) 2021-2023 Datalayer, Inc.
3
3
  *
4
4
  * MIT License
5
5
  */
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  /*
3
- * Copyright (c) 2022-2023 Datalayer Inc. All rights reserved.
3
+ * Copyright (c) 2021-2023 Datalayer, Inc.
4
4
  *
5
5
  * MIT License
6
6
  */
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  /*
3
- * Copyright (c) 2022-2023 Datalayer Inc. All rights reserved.
3
+ * Copyright (c) 2021-2023 Datalayer, Inc.
4
4
  *
5
5
  * MIT License
6
6
  */
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2022-2023 Datalayer Inc. All rights reserved.
2
+ * Copyright (c) 2021-2023 Datalayer, Inc.
3
3
  *
4
4
  * MIT License
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2022-2023 Datalayer Inc. All rights reserved.
2
+ * Copyright (c) 2021-2023 Datalayer, Inc.
3
3
  *
4
4
  * MIT License
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2022-2023 Datalayer Inc. All rights reserved.
2
+ * Copyright (c) 2021-2023 Datalayer, Inc.
3
3
  *
4
4
  * MIT License
5
5
  */
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { JupyterLab } from '@jupyterlab/application';
3
3
  import { IRenderMime } from '@jupyterlab/rendermime-interfaces';
4
- import { JupyterLabTheme } from './../../jupyter/lab/JupyterLabTheme';
4
+ import { ColorMode } from './../../jupyter/lab/JupyterLabTheme';
5
5
  import JupyterLabAppAdapter from './JupyterLabAppAdapter';
6
6
  export type JupyterLabAppProps = {
7
7
  devMode: boolean;
@@ -19,7 +19,7 @@ export type JupyterLabAppProps = {
19
19
  PluginType?: any;
20
20
  position: string;
21
21
  splash: boolean;
22
- theme: JupyterLabTheme;
22
+ theme: ColorMode;
23
23
  width: string | number;
24
24
  };
25
25
  export declare const JupyterLabApp: {
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  /*
3
- * Copyright (c) 2022-2023 Datalayer Inc. All rights reserved.
3
+ * Copyright (c) 2021-2023 Datalayer, Inc.
4
4
  *
5
5
  * MIT License
6
6
  */
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2022-2023 Datalayer Inc. All rights reserved.
2
+ * Copyright (c) 2021-2023 Datalayer, Inc.
3
3
  *
4
4
  * MIT License
5
5
  */
@@ -1,4 +1,4 @@
1
- import { JupyterLabTheme } from './../../jupyter/lab/JupyterLabTheme';
1
+ import { ColorMode } from './../../jupyter/lab/JupyterLabTheme';
2
2
  import '@jupyterlab/application-extension/style/index.js';
3
3
  import '@jupyterlab/apputils-extension/style/index.js';
4
4
  import '@jupyterlab/cell-toolbar-extension/style/index.js';
@@ -22,7 +22,7 @@ import '@jupyterlab/toc-extension/style/index.js';
22
22
  import '@jupyterlab/translation-extension/style/index.js';
23
23
  import '@jupyterlab/ui-components-extension/style/index.js';
24
24
  type Props = {
25
- theme?: JupyterLabTheme;
25
+ theme?: ColorMode;
26
26
  };
27
27
  export declare const JupyterLabAppCss: {
28
28
  (props: Props): import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  /*
3
- * Copyright (c) 2022-2023 Datalayer Inc. All rights reserved.
3
+ * Copyright (c) 2021-2023 Datalayer, Inc.
4
4
  *
5
5
  * MIT License
6
6
  */
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2022-2023 Datalayer Inc. All rights reserved.
2
+ * Copyright (c) 2021-2023 Datalayer, Inc.
3
3
  *
4
4
  * MIT License
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2022-2023 Datalayer Inc. All rights reserved.
2
+ * Copyright (c) 2021-2023 Datalayer, Inc.
3
3
  *
4
4
  * MIT License
5
5
  */
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  /*
3
- * Copyright (c) 2022-2023 Datalayer Inc. All rights reserved.
3
+ * Copyright (c) 2021-2023 Datalayer, Inc.
4
4
  *
5
5
  * MIT License
6
6
  */
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2022-2023 Datalayer Inc. All rights reserved.
2
+ * Copyright (c) 2021-2023 Datalayer, Inc.
3
3
  *
4
4
  * MIT License
5
5
  */
@@ -14,14 +14,14 @@ import { NotebookPanel, NotebookWidgetFactory, NotebookTracker, } from '@jupyter
14
14
  import { CodeMirrorEditorFactory, CodeMirrorMimeTypeService, EditorLanguageRegistry, EditorExtensionRegistry, EditorThemeRegistry, ybinding, } from '@jupyterlab/codemirror';
15
15
  import { Completer, CompleterModel, CompletionHandler, ProviderReconciliator, KernelCompleterProvider, } from '@jupyterlab/completer';
16
16
  import { MathJaxTypesetter } from '@jupyterlab/mathjax-extension';
17
- import { requireLoader } from '@jupyter-widgets/html-manager';
17
+ import { requireLoader as loader } from '@jupyter-widgets/html-manager';
18
18
  import { WIDGET_MIMETYPE, WidgetRenderer, } from '@jupyter-widgets/html-manager/lib/output_renderers';
19
19
  import JupyterReactContentFactory from './content/JupyterReactContentFactory';
20
20
  import JupyterReactNotebookModelFactory from './model/JupyterReactNotebookModelFactory';
21
21
  import { NotebookCommands } from './NotebookCommands';
22
- import { IPyWidgetsClassicManager } from '../../jupyter/ipywidgets/manager/IPyWidgetsClassicManager';
23
22
  import getMarked from './marked/marked';
24
- import { iPyWidgetsPlugin, baseWidgetsPlugin, controlWidgetsPlugin, outputWidgetPlugin, bundledIPyWidgetsPlugin, externalIPyWidgetsPlugin, } from '../../jupyter/ipywidgets/lab/plugin';
23
+ import { IPyWidgetsClassicManager } from '../../jupyter/ipywidgets/classic/IPyWidgetsClassicManager';
24
+ import { iPyWidgetsPlugin, baseWidgetsPlugin, controlWidgetsPlugin, outputWidgetPlugin, registerBundledIPyWidgets, registerExternalIPyWidgets, } from '../../jupyter/ipywidgets/lab/plugin';
25
25
  const FALLBACK_PATH = 'ping.ipynb';
26
26
  export class NotebookAdapter {
27
27
  _boxPanel;
@@ -156,10 +156,20 @@ export class NotebookAdapter {
156
156
  readOnly: this._readOnly,
157
157
  });
158
158
  documentRegistry.addModelFactory(notebookModelFactory);
159
+ this._context = new Context({
160
+ manager: this._serviceManager,
161
+ factory: notebookModelFactory,
162
+ path: this._path ?? FALLBACK_PATH,
163
+ kernelPreference: {
164
+ id: this._kernel.id,
165
+ shouldStart: false,
166
+ canStart: false,
167
+ autoStartDefault: false,
168
+ shutdownOnDispose: false,
169
+ },
170
+ });
159
171
  if (this._ipywidgets === 'classic') {
160
- this._iPyWidgetsClassicManager = new IPyWidgetsClassicManager({
161
- loader: requireLoader,
162
- });
172
+ this._iPyWidgetsClassicManager = new IPyWidgetsClassicManager({ loader });
163
173
  this._rendermime.addFactory({
164
174
  safe: false,
165
175
  mimeTypes: [WIDGET_MIMETYPE],
@@ -170,31 +180,13 @@ export class NotebookAdapter {
170
180
  .then(() => {
171
181
  this._iPyWidgetsClassicManager?.registerWithKernel(this._kernel.connection);
172
182
  });
173
- }
174
- if (this._ipywidgets === 'lab') {
175
- const jupyterWidgetRegistry = iPyWidgetsPlugin.activate(this._rendermime, this._tracker, this._kernel.connection);
176
- baseWidgetsPlugin.activate(jupyterWidgetRegistry);
177
- controlWidgetsPlugin.activate(jupyterWidgetRegistry);
178
- outputWidgetPlugin.activate(jupyterWidgetRegistry);
179
183
  if (this._bundledIPyWidgets) {
180
- bundledIPyWidgetsPlugin(this._context, this._tracker, this._bundledIPyWidgets, this._kernel.connection);
184
+ this._iPyWidgetsClassicManager.loadBundledIPyWidgets(this._bundledIPyWidgets);
181
185
  }
182
186
  if (this._externalIPyWidgets) {
183
- externalIPyWidgetsPlugin(this._context, this._tracker, this._externalIPyWidgets, this._kernel.connection);
187
+ this._iPyWidgetsClassicManager.loadExternalIPyWidgets(this._externalIPyWidgets);
184
188
  }
185
189
  }
186
- this._context = new Context({
187
- manager: this._serviceManager,
188
- factory: notebookModelFactory,
189
- path: this._path ?? FALLBACK_PATH,
190
- kernelPreference: {
191
- id: this._kernel.id,
192
- shouldStart: false,
193
- canStart: false,
194
- autoStartDefault: false,
195
- shutdownOnDispose: false,
196
- },
197
- });
198
190
  // These are fixes to have more control on the kernel launch.
199
191
  this._context.sessionContext._initialize = async () => {
200
192
  const manager = this._context.sessionContext
@@ -225,6 +217,18 @@ export class NotebookAdapter {
225
217
  }
226
218
  return await this._context.sessionContext._startIfNecessary();
227
219
  };
220
+ if (this._ipywidgets === 'lab') {
221
+ const jupyterWidgetRegistry = iPyWidgetsPlugin.activate(this._rendermime, this._tracker, this._kernel.connection);
222
+ baseWidgetsPlugin.activate(jupyterWidgetRegistry);
223
+ controlWidgetsPlugin.activate(jupyterWidgetRegistry);
224
+ outputWidgetPlugin.activate(jupyterWidgetRegistry);
225
+ if (this._bundledIPyWidgets) {
226
+ registerBundledIPyWidgets(this._context, this._tracker, this._bundledIPyWidgets, this._kernel.connection);
227
+ }
228
+ if (this._externalIPyWidgets) {
229
+ registerExternalIPyWidgets(this._context, this._tracker, this._externalIPyWidgets, this._kernel.connection);
230
+ }
231
+ }
228
232
  this._context.sessionContext.kernelChanged.connect((_, args) => {
229
233
  console.log('Previous Kernel Connection', args.oldValue);
230
234
  const kernelConnection = args.newValue;
@@ -267,9 +271,32 @@ export class NotebookAdapter {
267
271
  window.addEventListener('resize', () => {
268
272
  this._notebookPanel?.update();
269
273
  });
270
- const isNew = this._path !== undefined && this._path !== '' ? false : true;
271
- this._context.initialize(isNew).then(() => {
272
- // no-op
274
+ const isNbFormat = this._path !== undefined && this._path !== '' ? false : true;
275
+ if (isNbFormat) {
276
+ // Fixes if nbformat is provided and we don't want to interact with the content manager.
277
+ this._context.initialize = async (isNew) => {
278
+ this._context.model.dirty = false;
279
+ const now = new Date().toISOString();
280
+ const model = {
281
+ path: this._uid,
282
+ name: this._uid,
283
+ type: "notebook",
284
+ content: undefined,
285
+ writable: true,
286
+ created: now,
287
+ last_modified: now,
288
+ mimetype: "application/x-ipynb+json",
289
+ format: "json"
290
+ };
291
+ this._context._updateContentsModel(model);
292
+ await this._context._populate();
293
+ this._context.model.sharedModel.clearUndoHistory();
294
+ };
295
+ }
296
+ this._context.initialize(isNbFormat).then(() => {
297
+ if (isNbFormat) {
298
+ this._notebookPanel?.model?.fromJSON(this._nbformat);
299
+ }
273
300
  });
274
301
  }
275
302
  setupCompleter(notebookPanel) {