@datalayer/jupyter-react 0.8.0 → 0.8.2

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 (405) hide show
  1. package/README.md +3 -1
  2. package/lib/app/App.js +5 -0
  3. package/lib/app/App.js.map +1 -1
  4. package/lib/app/JupyterReact.js +12 -1
  5. package/lib/app/JupyterReact.js.map +1 -1
  6. package/lib/app/tabs/AboutTab.js +6 -4
  7. package/lib/app/tabs/AboutTab.js.map +1 -1
  8. package/lib/app/tabs/ComponentsTab.js +8 -3
  9. package/lib/app/tabs/ComponentsTab.js.map +1 -1
  10. package/lib/app/tabs/components/CellComponent.js +5 -0
  11. package/lib/app/tabs/components/CellComponent.js.map +1 -1
  12. package/lib/app/tabs/components/FileBrowserComponent.js +5 -0
  13. package/lib/app/tabs/components/FileBrowserComponent.js.map +1 -1
  14. package/lib/app/tabs/components/IPyWidgetsComponent.js +6 -1
  15. package/lib/app/tabs/components/IPyWidgetsComponent.js.map +1 -1
  16. package/lib/app/tabs/components/NotebookComponent.js +5 -0
  17. package/lib/app/tabs/components/NotebookComponent.js.map +1 -1
  18. package/lib/app/tabs/components/ViewerComponent.js +6 -1
  19. package/lib/app/tabs/components/ViewerComponent.js.map +1 -1
  20. package/lib/components/button/Button.d.ts +7 -0
  21. package/lib/components/button/Button.js +43 -0
  22. package/lib/components/button/Button.js.map +1 -0
  23. package/lib/components/cell/Cell.js +34 -33
  24. package/lib/components/cell/Cell.js.map +1 -1
  25. package/lib/components/cell/CellAdapter.d.ts +1 -0
  26. package/lib/components/cell/CellAdapter.js +61 -41
  27. package/lib/components/cell/CellAdapter.js.map +1 -1
  28. package/lib/components/cell/CellCommands.d.ts +2 -2
  29. package/lib/components/cell/CellCommands.js +14 -9
  30. package/lib/components/cell/CellCommands.js.map +1 -1
  31. package/lib/components/cell/{CellState.d.ts → CellRedux.d.ts} +1 -1
  32. package/lib/components/cell/{CellState.js → CellRedux.js} +9 -4
  33. package/lib/components/cell/CellRedux.js.map +1 -0
  34. package/lib/components/cell/CellZustand.d.ts +5 -0
  35. package/lib/components/cell/CellZustand.js +11 -0
  36. package/lib/components/cell/CellZustand.js.map +1 -0
  37. package/lib/components/codemirror/CodeMirrorEditor.js +12 -9
  38. package/lib/components/codemirror/CodeMirrorEditor.js.map +1 -1
  39. package/lib/components/codemirror/CodeMirrorOutputToolbar.js +24 -5
  40. package/lib/components/codemirror/CodeMirrorOutputToolbar.js.map +1 -1
  41. package/lib/components/codemirror/CodeMirrorTheme.d.ts +1 -1
  42. package/lib/components/codemirror/CodeMirrorTheme.js +16 -11
  43. package/lib/components/codemirror/CodeMirrorTheme.js.map +1 -1
  44. package/lib/components/commands/Commands.js +5 -0
  45. package/lib/components/commands/Commands.js.map +1 -1
  46. package/lib/components/commands/CommandsAdapter.css +6 -0
  47. package/lib/components/commands/CommandsAdapter.js +6 -1
  48. package/lib/components/commands/CommandsAdapter.js.map +1 -1
  49. package/lib/components/commands/CommandsState.js +11 -7
  50. package/lib/components/commands/CommandsState.js.map +1 -1
  51. package/lib/components/console/Console.css +6 -0
  52. package/lib/components/console/Console.js +6 -5
  53. package/lib/components/console/Console.js.map +1 -1
  54. package/lib/components/console/ConsoleAdapter.js +17 -12
  55. package/lib/components/console/ConsoleAdapter.js.map +1 -1
  56. package/lib/components/console/{ConsoleState.js → ConsoleRedux.js} +11 -7
  57. package/lib/components/console/ConsoleRedux.js.map +1 -0
  58. package/lib/components/console/ConsoleZustand.d.ts +0 -0
  59. package/lib/components/console/ConsoleZustand.js +6 -0
  60. package/lib/components/console/ConsoleZustand.js.map +1 -0
  61. package/lib/components/dialog/Dialog.js +5 -0
  62. package/lib/components/dialog/Dialog.js.map +1 -1
  63. package/lib/components/dialog/DialogAdapter.js +6 -4
  64. package/lib/components/dialog/DialogAdapter.js.map +1 -1
  65. package/lib/components/filebrowser/FileBrowser.js +7 -2
  66. package/lib/components/filebrowser/FileBrowser.js.map +1 -1
  67. package/lib/components/filemanager/FileManagerJupyterLab.js +8 -5
  68. package/lib/components/filemanager/FileManagerJupyterLab.js.map +1 -1
  69. package/lib/components/filemanager/FileManagerState.js +10 -6
  70. package/lib/components/filemanager/FileManagerState.js.map +1 -1
  71. package/lib/components/filemanager/lab/FileManagerAdapter.css +6 -0
  72. package/lib/components/filemanager/lab/FileManagerAdapter.js +33 -28
  73. package/lib/components/filemanager/lab/FileManagerAdapter.js.map +1 -1
  74. package/lib/components/jupyterlab/JupyterLabApp.d.ts +2 -2
  75. package/lib/components/jupyterlab/JupyterLabApp.js +34 -23
  76. package/lib/components/jupyterlab/JupyterLabApp.js.map +1 -1
  77. package/lib/components/jupyterlab/JupyterLabAppAdapter.d.ts +3 -3
  78. package/lib/components/jupyterlab/JupyterLabAppAdapter.js +12 -7
  79. package/lib/components/jupyterlab/JupyterLabAppAdapter.js.map +1 -1
  80. package/lib/components/jupyterlab/JupyterLabAppCss.d.ts +1 -1
  81. package/lib/components/jupyterlab/JupyterLabAppCss.js +6 -1
  82. package/lib/components/jupyterlab/JupyterLabAppCss.js.map +1 -1
  83. package/lib/components/jupyterlab/JupyterLabAppPlugins.js +6 -2
  84. package/lib/components/jupyterlab/JupyterLabAppPlugins.js.map +1 -1
  85. package/lib/components/notebook/Notebook.css +6 -0
  86. package/lib/components/notebook/Notebook.d.ts +1 -1
  87. package/lib/components/notebook/Notebook.js +23 -12
  88. package/lib/components/notebook/Notebook.js.map +1 -1
  89. package/lib/components/notebook/NotebookAdapter.d.ts +2 -2
  90. package/lib/components/notebook/NotebookAdapter.js +88 -87
  91. package/lib/components/notebook/NotebookAdapter.js.map +1 -1
  92. package/lib/components/notebook/NotebookCommands.d.ts +2 -3
  93. package/lib/components/notebook/NotebookCommands.js +127 -118
  94. package/lib/components/notebook/NotebookCommands.js.map +1 -1
  95. package/lib/components/notebook/{NotebookState.d.ts → NotebookRedux.d.ts} +8 -8
  96. package/lib/components/notebook/{NotebookState.js → NotebookRedux.js} +49 -24
  97. package/lib/components/notebook/NotebookRedux.js.map +1 -0
  98. package/lib/components/notebook/NotebookZustand.d.ts +0 -0
  99. package/lib/components/notebook/NotebookZustand.js +6 -0
  100. package/lib/components/notebook/NotebookZustand.js.map +1 -0
  101. package/lib/components/notebook/cell/metadata/CellMetadataEditor.d.ts +1 -1
  102. package/lib/components/notebook/cell/metadata/CellMetadataEditor.js +50 -46
  103. package/lib/components/notebook/cell/metadata/CellMetadataEditor.js.map +1 -1
  104. package/lib/components/notebook/cell/metadata/NbGraderCells.d.ts +1 -1
  105. package/lib/components/notebook/cell/metadata/NbGraderCells.js +6 -1
  106. package/lib/components/notebook/cell/metadata/NbGraderCells.js.map +1 -1
  107. package/lib/components/notebook/cell/prompt/Countdown.js +7 -2
  108. package/lib/components/notebook/cell/prompt/Countdown.js.map +1 -1
  109. package/lib/components/notebook/cell/prompt/CountdownInputPrompt.js +9 -4
  110. package/lib/components/notebook/cell/prompt/CountdownInputPrompt.js.map +1 -1
  111. package/lib/components/notebook/cell/prompt/CountdownOutputPrompt.js +8 -3
  112. package/lib/components/notebook/cell/prompt/CountdownOutputPrompt.js.map +1 -1
  113. package/lib/components/notebook/cell/sidebar/CellSidebar.js +56 -40
  114. package/lib/components/notebook/cell/sidebar/CellSidebar.js.map +1 -1
  115. package/lib/components/notebook/cell/sidebar/CellSidebarButton.js +21 -15
  116. package/lib/components/notebook/cell/sidebar/CellSidebarButton.js.map +1 -1
  117. package/lib/components/notebook/cell/sidebar/CellSidebarRun.js +18 -16
  118. package/lib/components/notebook/cell/sidebar/CellSidebarRun.js.map +1 -1
  119. package/lib/components/notebook/cell/sidebar/CellSidebarWidget.js +7 -2
  120. package/lib/components/notebook/cell/sidebar/CellSidebarWidget.js.map +1 -1
  121. package/lib/components/notebook/content/JupyterReactContentFactory.js +7 -3
  122. package/lib/components/notebook/content/JupyterReactContentFactory.js.map +1 -1
  123. package/lib/components/notebook/marked/marked.js +7 -2
  124. package/lib/components/notebook/marked/marked.js.map +1 -1
  125. package/lib/components/notebook/model/JupyterReactNotebookModelFactory.d.ts +1 -1
  126. package/lib/components/notebook/model/JupyterReactNotebookModelFactory.js +6 -1
  127. package/lib/components/notebook/model/JupyterReactNotebookModelFactory.js.map +1 -1
  128. package/lib/components/output/Output.css +6 -0
  129. package/lib/components/output/Output.js +52 -48
  130. package/lib/components/output/Output.js.map +1 -1
  131. package/lib/components/output/OutputAdapter.d.ts +1 -1
  132. package/lib/components/output/OutputAdapter.js +18 -10
  133. package/lib/components/output/OutputAdapter.js.map +1 -1
  134. package/lib/components/output/OutputIPyWidgets.css +6 -0
  135. package/lib/components/output/OutputIPyWidgets.js +5 -0
  136. package/lib/components/output/OutputIPyWidgets.js.map +1 -1
  137. package/lib/components/output/{OutputState.js → OutputRedux.js} +9 -4
  138. package/lib/components/output/OutputRedux.js.map +1 -0
  139. package/lib/components/output/OutputRenderer.js +16 -19
  140. package/lib/components/output/OutputRenderer.js.map +1 -1
  141. package/lib/components/output/OutputZustand.d.ts +0 -0
  142. package/lib/components/output/OutputZustand.js +6 -0
  143. package/lib/components/output/OutputZustand.js.map +1 -0
  144. package/lib/components/settings/Settings.js +6 -1
  145. package/lib/components/settings/Settings.js.map +1 -1
  146. package/lib/components/settings/SettingsAdapter.css +5 -0
  147. package/lib/components/settings/SettingsAdapter.js +5 -0
  148. package/lib/components/settings/SettingsAdapter.js.map +1 -1
  149. package/lib/components/settings/{SettingsState.js → SettingsRedux.js} +11 -7
  150. package/lib/components/settings/SettingsRedux.js.map +1 -0
  151. package/lib/components/settings/SettingsZustand.d.ts +0 -0
  152. package/lib/components/settings/SettingsZustand.js +6 -0
  153. package/lib/components/settings/SettingsZustand.js.map +1 -0
  154. package/lib/components/terminal/Terminal.js +14 -13
  155. package/lib/components/terminal/Terminal.js.map +1 -1
  156. package/lib/components/terminal/TerminalAdapter.js +7 -2
  157. package/lib/components/terminal/TerminalAdapter.js.map +1 -1
  158. package/lib/components/terminal/{TerminalState.d.ts → TerminalRedux.d.ts} +1 -1
  159. package/lib/components/terminal/{TerminalState.js → TerminalRedux.js} +10 -6
  160. package/lib/components/terminal/TerminalRedux.js.map +1 -0
  161. package/lib/components/terminal/TerminalZustand.d.ts +0 -0
  162. package/lib/components/terminal/TerminalZustand.js +6 -0
  163. package/lib/components/terminal/TerminalZustand.js.map +1 -0
  164. package/lib/components/textinput/TextInput.d.ts +7 -0
  165. package/lib/components/textinput/TextInput.js +23 -0
  166. package/lib/components/textinput/TextInput.js.map +1 -0
  167. package/lib/components/viewer/Viewer.js +5 -0
  168. package/lib/components/viewer/Viewer.js.map +1 -1
  169. package/lib/components/viewer/input/CodemirrorView.d.ts +1 -1
  170. package/lib/components/viewer/input/CodemirrorView.js +14 -12
  171. package/lib/components/viewer/input/CodemirrorView.js.map +1 -1
  172. package/lib/components/viewer/input/CodemirrorViewer.js +10 -5
  173. package/lib/components/viewer/input/CodemirrorViewer.js.map +1 -1
  174. package/lib/components/viewer/input/InputViewer.js +25 -18
  175. package/lib/components/viewer/input/InputViewer.js.map +1 -1
  176. package/lib/components/viewer/output/OutputAdapter.js +8 -2
  177. package/lib/components/viewer/output/OutputAdapter.js.map +1 -1
  178. package/lib/components/viewer/output/OutputViewer.js.map +1 -1
  179. package/lib/examples/All.js +30 -24
  180. package/lib/examples/All.js.map +1 -1
  181. package/lib/examples/Bokeh.js +8 -3
  182. package/lib/examples/Bokeh.js.map +1 -1
  183. package/lib/examples/Bqplot.js +8 -5
  184. package/lib/examples/Bqplot.js.map +1 -1
  185. package/lib/examples/Cell.js +5 -0
  186. package/lib/examples/Cell.js.map +1 -1
  187. package/lib/examples/Cells.js +5 -0
  188. package/lib/examples/Cells.js.map +1 -1
  189. package/lib/examples/Console.js +5 -0
  190. package/lib/examples/Console.js.map +1 -1
  191. package/lib/examples/ConsoleLite.js +5 -0
  192. package/lib/examples/ConsoleLite.js.map +1 -1
  193. package/lib/examples/Dashboard.js +9 -4
  194. package/lib/examples/Dashboard.js.map +1 -1
  195. package/lib/examples/FileBrowser.js +6 -1
  196. package/lib/examples/FileBrowser.js.map +1 -1
  197. package/lib/examples/GeoJson.js +8 -5
  198. package/lib/examples/GeoJson.js.map +1 -1
  199. package/lib/examples/IPyLeaflet.d.ts +1 -0
  200. package/lib/examples/IPyLeaflet.js +18 -0
  201. package/lib/examples/IPyLeaflet.js.map +1 -0
  202. package/lib/examples/IPyReact.js +9 -4
  203. package/lib/examples/IPyReact.js.map +1 -1
  204. package/lib/examples/IPyWidgets.js +9 -4
  205. package/lib/examples/IPyWidgets.js.map +1 -1
  206. package/lib/examples/IPyWidgetsWithState.d.ts +1 -0
  207. package/lib/examples/IPyWidgetsWithState.js +19 -0
  208. package/lib/examples/IPyWidgetsWithState.js.map +1 -0
  209. package/lib/examples/JupyterLabApp.js +10 -5
  210. package/lib/examples/JupyterLabApp.js.map +1 -1
  211. package/lib/examples/JupyterLabHeadlessApp.js +18 -27
  212. package/lib/examples/JupyterLabHeadlessApp.js.map +1 -1
  213. package/lib/examples/Lumino.js +6 -1
  214. package/lib/examples/Lumino.js.map +1 -1
  215. package/lib/examples/Matplotlib.js +14 -5
  216. package/lib/examples/Matplotlib.js.map +1 -1
  217. package/lib/examples/Notebook.js +12 -7
  218. package/lib/examples/Notebook.js.map +1 -1
  219. package/lib/examples/NotebookCellSidebar.js +12 -7
  220. package/lib/examples/NotebookCellSidebar.js.map +1 -1
  221. package/lib/examples/NotebookExternalContent.js +21 -19
  222. package/lib/examples/NotebookExternalContent.js.map +1 -1
  223. package/lib/examples/NotebookInit.js +15 -13
  224. package/lib/examples/NotebookInit.js.map +1 -1
  225. package/lib/examples/NotebookInjectableReduxStore.js +13 -8
  226. package/lib/examples/NotebookInjectableReduxStore.js.map +1 -1
  227. package/lib/examples/NotebookKernelChange.js +9 -4
  228. package/lib/examples/NotebookKernelChange.js.map +1 -1
  229. package/lib/examples/NotebookModel.js +12 -7
  230. package/lib/examples/NotebookModel.js.map +1 -1
  231. package/lib/examples/NotebookModelChange.js +13 -8
  232. package/lib/examples/NotebookModelChange.js.map +1 -1
  233. package/lib/examples/NotebookPath.js +11 -6
  234. package/lib/examples/NotebookPath.js.map +1 -1
  235. package/lib/examples/NotebookPathChange.js +11 -6
  236. package/lib/examples/NotebookPathChange.js.map +1 -1
  237. package/lib/examples/NotebookThemed.js +13 -8
  238. package/lib/examples/NotebookThemed.js.map +1 -1
  239. package/lib/examples/NotebookUnmount.js +13 -11
  240. package/lib/examples/NotebookUnmount.js.map +1 -1
  241. package/lib/examples/Output.js +12 -9
  242. package/lib/examples/Output.js.map +1 -1
  243. package/lib/examples/OutputIPyWidgets.js +5 -0
  244. package/lib/examples/OutputIPyWidgets.js.map +1 -1
  245. package/lib/examples/Outputs.js +8 -4
  246. package/lib/examples/Outputs.js.map +1 -1
  247. package/lib/examples/Panel.js +8 -3
  248. package/lib/examples/Panel.js.map +1 -1
  249. package/lib/examples/Plotly.js +8 -3
  250. package/lib/examples/Plotly.js.map +1 -1
  251. package/lib/examples/RunningSessions.d.ts +1 -0
  252. package/lib/examples/RunningSessions.js +56 -0
  253. package/lib/examples/RunningSessions.js.map +1 -0
  254. package/lib/examples/Terminal.js +7 -2
  255. package/lib/examples/Terminal.js.map +1 -1
  256. package/lib/examples/Vega.js +8 -5
  257. package/lib/examples/Vega.js.map +1 -1
  258. package/lib/examples/Viewer.js +24 -19
  259. package/lib/examples/Viewer.js.map +1 -1
  260. package/lib/examples/ViewerFile.js +5 -0
  261. package/lib/examples/ViewerFile.js.map +1 -1
  262. package/lib/examples/lumino/LuminoWidget.js +6 -6
  263. package/lib/examples/lumino/LuminoWidget.js.map +1 -1
  264. package/lib/examples/notebooks/DashboardExample.exclude.json +96 -379
  265. package/lib/examples/notebooks/{IPyWidgetsExample1.ipynb.json → IPyWidgetsExample.ipynb.json} +8 -17
  266. package/lib/examples/notebooks/IPyWidgetsExampleWithState.ipynb.json +88 -0
  267. package/lib/examples/notebooks/IPyWidgetsOutputMatplotlib.exclude.d.ts +4 -4
  268. package/lib/examples/notebooks/IPyWidgetsOutputMatplotlib.exclude.js +53 -81
  269. package/lib/examples/notebooks/IPyWidgetsOutputMatplotlib.exclude.js.map +1 -1
  270. package/lib/examples/notebooks/Matplotlib.ipynb.json +20 -52
  271. package/lib/examples/notebooks/NotebookExample1.ipynb.json +4 -12
  272. package/lib/examples/notebooks/NotebookExample2.ipynb.json +2 -6
  273. package/lib/examples/notebooks/OutputIPyWidgetsExample.d.ts +7 -7
  274. package/lib/examples/notebooks/OutputIPyWidgetsExample.js +138 -133
  275. package/lib/examples/notebooks/OutputIPyWidgetsExample.js.map +1 -1
  276. package/lib/examples/sidebars/CellSidebarSource.js +58 -40
  277. package/lib/examples/sidebars/CellSidebarSource.js.map +1 -1
  278. package/lib/examples/state/ExampleReduxState.js +9 -5
  279. package/lib/examples/state/ExampleReduxState.js.map +1 -1
  280. package/lib/examples/toolbars/NotebookToolbar.js +20 -7
  281. package/lib/examples/toolbars/NotebookToolbar.js.map +1 -1
  282. package/lib/examples/toolbars/NotebookToolbarAutoSave.js +18 -13
  283. package/lib/examples/toolbars/NotebookToolbarAutoSave.js.map +1 -1
  284. package/lib/examples/toolbars/NotebookToolbarStatus.js +7 -2
  285. package/lib/examples/toolbars/NotebookToolbarStatus.js.map +1 -1
  286. package/lib/index.css +5 -0
  287. package/lib/index.d.ts +10 -6
  288. package/lib/index.js +17 -6
  289. package/lib/index.js.map +1 -1
  290. package/lib/jupyter/Jupyter.d.ts +1 -1
  291. package/lib/jupyter/Jupyter.js +12 -4
  292. package/lib/jupyter/Jupyter.js.map +1 -1
  293. package/lib/jupyter/JupyterAuthError.js +5 -0
  294. package/lib/jupyter/JupyterAuthError.js.map +1 -1
  295. package/lib/jupyter/JupyterConfig.js +31 -9
  296. package/lib/jupyter/JupyterConfig.js.map +1 -1
  297. package/lib/jupyter/JupyterContext.d.ts +2 -2
  298. package/lib/jupyter/JupyterContext.js +26 -17
  299. package/lib/jupyter/JupyterContext.js.map +1 -1
  300. package/lib/jupyter/JupyterHandlers.js +5 -0
  301. package/lib/jupyter/JupyterHandlers.js.map +1 -1
  302. package/lib/jupyter/ipywidgets/IPyWidgetsAttached.js +5 -0
  303. package/lib/jupyter/ipywidgets/IPyWidgetsAttached.js.map +1 -1
  304. package/lib/jupyter/ipywidgets/IPyWidgetsViewManager.js +5 -0
  305. package/lib/jupyter/ipywidgets/IPyWidgetsViewManager.js.map +1 -1
  306. package/lib/jupyter/ipywidgets/lab/manager.d.ts +9 -8
  307. package/lib/jupyter/ipywidgets/lab/manager.js +33 -24
  308. package/lib/jupyter/ipywidgets/lab/manager.js.map +1 -1
  309. package/lib/jupyter/ipywidgets/lab/output.d.ts +4 -4
  310. package/lib/jupyter/ipywidgets/lab/output.js +12 -7
  311. package/lib/jupyter/ipywidgets/lab/output.js.map +1 -1
  312. package/lib/jupyter/ipywidgets/lab/plugin.d.ts +8 -7
  313. package/lib/jupyter/ipywidgets/lab/plugin.js +47 -29
  314. package/lib/jupyter/ipywidgets/lab/plugin.js.map +1 -1
  315. package/lib/jupyter/ipywidgets/lab/renderer.d.ts +3 -3
  316. package/lib/jupyter/ipywidgets/lab/renderer.js +5 -0
  317. package/lib/jupyter/ipywidgets/lab/renderer.js.map +1 -1
  318. package/lib/jupyter/ipywidgets/lab/semvercache.js +5 -0
  319. package/lib/jupyter/ipywidgets/lab/semvercache.js.map +1 -1
  320. package/lib/jupyter/ipywidgets/{IPyWidgetsManager.d.ts → manager/IPyWidgetsClassicManager.d.ts} +4 -4
  321. package/lib/jupyter/ipywidgets/{IPyWidgetsManager.js → manager/IPyWidgetsClassicManager.js} +29 -21
  322. package/lib/jupyter/ipywidgets/manager/IPyWidgetsClassicManager.js.map +1 -0
  323. package/lib/jupyter/ipywidgets/plotly/Figure.d.ts +2 -2
  324. package/lib/jupyter/ipywidgets/plotly/Figure.js +176 -168
  325. package/lib/jupyter/ipywidgets/plotly/Figure.js.map +1 -1
  326. package/lib/jupyter/ipywidgets/plotly/JupyterlabPlugin.d.ts +1 -1
  327. package/lib/jupyter/ipywidgets/plotly/JupyterlabPlugin.js +7 -2
  328. package/lib/jupyter/ipywidgets/plotly/JupyterlabPlugin.js.map +1 -1
  329. package/lib/jupyter/ipywidgets/plotly/Version.js +5 -0
  330. package/lib/jupyter/ipywidgets/plotly/Version.js.map +1 -1
  331. package/lib/jupyter/ipywidgets/plotly/index.js +5 -0
  332. package/lib/jupyter/ipywidgets/plotly/index.js.map +1 -1
  333. package/lib/jupyter/kernel/Kernel.js +15 -10
  334. package/lib/jupyter/kernel/Kernel.js.map +1 -1
  335. package/lib/jupyter/kernel/KernelModel.js +6 -1
  336. package/lib/jupyter/kernel/KernelModel.js.map +1 -1
  337. package/lib/jupyter/lab/JupyterLabCss.js +5 -0
  338. package/lib/jupyter/lab/JupyterLabCss.js.map +1 -1
  339. package/lib/jupyter/lab/JupyterLabCssImports.js +5 -0
  340. package/lib/jupyter/lab/JupyterLabCssImports.js.map +1 -1
  341. package/lib/jupyter/lab/JupyterLabTheme.js +5 -0
  342. package/lib/jupyter/lab/JupyterLabTheme.js.map +1 -1
  343. package/lib/jupyter/lab/__tests__/datalayer.spec.js +5 -0
  344. package/lib/jupyter/lab/__tests__/datalayer.spec.js.map +1 -1
  345. package/lib/jupyter/lab/index.js +13 -10
  346. package/lib/jupyter/lab/index.js.map +1 -1
  347. package/lib/jupyter/lab/notebook/content/CountdownContentFactory.js +5 -0
  348. package/lib/jupyter/lab/notebook/content/CountdownContentFactory.js.map +1 -1
  349. package/lib/jupyter/lab/notebook/content/plugin.js +6 -1
  350. package/lib/jupyter/lab/notebook/content/plugin.js.map +1 -1
  351. package/lib/jupyter/lab/notebook/index.js +5 -0
  352. package/lib/jupyter/lab/notebook/index.js.map +1 -1
  353. package/lib/jupyter/lab/widget.js.map +1 -1
  354. package/lib/jupyter/lite/LiteServer.js +20 -15
  355. package/lib/jupyter/lite/LiteServer.js.map +1 -1
  356. package/lib/jupyter/lumino/Lumino.js +7 -2
  357. package/lib/jupyter/lumino/Lumino.js.map +1 -1
  358. package/lib/jupyter/lumino/LuminoBox.js +7 -2
  359. package/lib/jupyter/lumino/LuminoBox.js.map +1 -1
  360. package/lib/jupyter/lumino/LuminoDetached.js +5 -0
  361. package/lib/jupyter/lumino/LuminoDetached.js.map +1 -1
  362. package/lib/jupyter/lumino/LuminoObservable.d.ts +2 -2
  363. package/lib/jupyter/lumino/LuminoObservable.js +7 -2
  364. package/lib/jupyter/lumino/LuminoObservable.js.map +1 -1
  365. package/lib/jupyter/lumino/LuminoRedux.js +5 -0
  366. package/lib/jupyter/lumino/LuminoRedux.js.map +1 -1
  367. package/lib/jupyter/lumino/ReactPortalWidget.js +5 -0
  368. package/lib/jupyter/lumino/ReactPortalWidget.js.map +1 -1
  369. package/lib/jupyter/renderers/index.js +5 -0
  370. package/lib/jupyter/renderers/index.js.map +1 -1
  371. package/lib/jupyter/renderers/plotly/PlotlyRenderer.d.ts +4 -4
  372. package/lib/jupyter/renderers/plotly/PlotlyRenderer.js +42 -37
  373. package/lib/jupyter/renderers/plotly/PlotlyRenderer.js.map +1 -1
  374. package/lib/jupyter/renderers/plotly/plotly.css +6 -0
  375. package/lib/jupyter/services/Services.js +5 -0
  376. package/lib/jupyter/services/Services.js.map +1 -1
  377. package/lib/jupyter/theme.d.ts +67 -0
  378. package/lib/jupyter/theme.js +1138 -0
  379. package/lib/jupyter/theme.js.map +1 -0
  380. package/lib/state/index.js +5 -0
  381. package/lib/state/index.js.map +1 -1
  382. package/lib/state/redux/InitState.js +9 -5
  383. package/lib/state/redux/InitState.js.map +1 -1
  384. package/lib/state/redux/State.d.ts +5 -5
  385. package/lib/state/redux/State.js +12 -7
  386. package/lib/state/redux/State.js.map +1 -1
  387. package/lib/state/redux/Store.d.ts +1 -1
  388. package/lib/state/redux/Store.js +8 -3
  389. package/lib/state/redux/Store.js.map +1 -1
  390. package/lib/utils/Utils.js +9 -4
  391. package/lib/utils/Utils.js.map +1 -1
  392. package/package.json +38 -21
  393. package/style/base.css +5 -0
  394. package/style/index.css +6 -0
  395. package/style/index.js +6 -0
  396. package/lib/components/cell/CellState.js.map +0 -1
  397. package/lib/components/console/ConsoleState.js.map +0 -1
  398. package/lib/components/notebook/NotebookState.js.map +0 -1
  399. package/lib/components/output/OutputState.js.map +0 -1
  400. package/lib/components/settings/SettingsState.js.map +0 -1
  401. package/lib/components/terminal/TerminalState.js.map +0 -1
  402. package/lib/jupyter/ipywidgets/IPyWidgetsManager.js.map +0 -1
  403. /package/lib/components/console/{ConsoleState.d.ts → ConsoleRedux.d.ts} +0 -0
  404. /package/lib/components/output/{OutputState.d.ts → OutputRedux.d.ts} +0 -0
  405. /package/lib/components/settings/{SettingsState.d.ts → SettingsRedux.d.ts} +0 -0
package/README.md CHANGED
@@ -12,6 +12,8 @@ The below image shows a gallery of the available React.js components ready to be
12
12
  <img alt="Jupyter React Gallery" src="https://datalayer-jupyter-examples.s3.amazonaws.com/jupyter-react-gallery.gif" />
13
13
  </div>
14
14
 
15
+ We host a Storybook on ✨ https://jupyter-ui-storybook.datalayer.tech that showcases various low-level as high-level React.js components useful to build a Data Product.
16
+
15
17
  The Jupyter(Lab) notebook is a tool that allows data scientist to analyse dataset. However, it is not easy to create a custom user interface integrated in an existing application. [Jupyter React](https://jupyter-react.datalayer.tech), an open-source library, fills that gap and provides components that a developer can easily integrate in any React.js application.
16
18
 
17
19
  In terms of technical stack, the Jupyter(Lab) user interface is built on top of Lumino, which is an imperative way to build user interface and **can not** be consumed by industry standard declarative frameworks like React.js. As a user interface developer, if you want to create a custom data product on top of Jupyter, you have to stick to Lumino and carry-on the full notebook interface not tailored to your specific needs. This is not what you want. You just want to expose what you need, you want to develop with your favorite toolkit (like React.js) and you also want to integrate on a per-component basis the Jupyter functionality in your application.
@@ -32,7 +34,7 @@ As a React.js developer, you just write a few lines of code get a live notebook
32
34
  <img alt="Jupyter React Slate" src="https://datalayer-jupyter-examples.s3.amazonaws.com/jupyter-react-snippet.png" />
33
35
  </div>
34
36
 
35
- The typedoc documentation is [available online](https://typedoc.datalayer.tech/datalayer/jupyter-react/0.7.3/index.html).
37
+ The typedoc documentation is [available online](https://typedoc.datalayer.tech/datalayer/jupyter-react/0.8.1/index.html).
36
38
 
37
39
  Jupyter React can be used in any React.js application. Install the latest `@datalayer/jupyter-react` npm package and get inspired by the [examples](https://github.com/datalayer/jupyter-ui/tree/main/examples) in this repository.
38
40
 
package/lib/app/App.js CHANGED
@@ -1,4 +1,9 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
+ /*
3
+ * Copyright (c) 2022-2023 Datalayer Inc. All rights reserved.
4
+ *
5
+ * MIT License
6
+ */
2
7
  import { createRoot } from 'react-dom/client';
3
8
  import JupyterReact from './JupyterReact';
4
9
  const div = document.createElement('div');
@@ -1 +1 @@
1
- {"version":3,"file":"App.js","sourceRoot":"","sources":["../../src/app/App.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAE1C,MAAM,GAAG,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;AAC1C,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;AAC/B,MAAM,IAAI,GAAG,UAAU,CAAC,GAAG,CAAC,CAAA;AAE5B,IAAI,CAAC,MAAM,CAAC,KAAC,YAAY,KAAG,CAAC,CAAC"}
1
+ {"version":3,"file":"App.js","sourceRoot":"","sources":["../../src/app/App.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAE1C,MAAM,GAAG,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;AAC1C,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;AAC/B,MAAM,IAAI,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC;AAE7B,IAAI,CAAC,MAAM,CAAC,KAAC,YAAY,KAAG,CAAC,CAAC"}
@@ -1,4 +1,9 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ /*
3
+ * Copyright (c) 2022-2023 Datalayer Inc. All rights reserved.
4
+ *
5
+ * MIT License
6
+ */
2
7
  import { useState, useEffect } from 'react';
3
8
  import { ThemeProvider, BaseStyles, Box } from '@primer/react';
4
9
  import { UnderlineNav } from '@primer/react/drafts';
@@ -20,7 +25,13 @@ const JupyterReact = (props) => {
20
25
  console.error(`Error while accessing the jupyter server jupyter_react extension.\n${reason}`);
21
26
  });
22
27
  });
23
- return (_jsx(_Fragment, { children: _jsx(ThemeProvider, { children: _jsx(BaseStyles, { children: _jsxs(Box, { style: { maxWidth: 700 }, children: [_jsx(Box, { mb: 3, children: _jsxs(UnderlineNav, { "aria-label": "jupyter-react", children: [_jsx(UnderlineNav.Item, { "aria-current": "page", icon: RingedPlanetIcon, onSelect: e => { e.preventDefault(); setTab(1); }, children: "Components" }), _jsx(UnderlineNav.Item, { icon: ReactJsIcon, onSelect: e => { e.preventDefault(); setTab(2); }, children: "About" })] }) }), _jsxs(Box, { m: 3, children: [(tab === 1) && _jsx(ComponentsTab, { app: app }), (tab === 2) && _jsx(AboutTab, { version: version })] })] }) }) }) }));
28
+ return (_jsx(_Fragment, { children: _jsx(ThemeProvider, { children: _jsx(BaseStyles, { children: _jsxs(Box, { style: { maxWidth: 700 }, children: [_jsx(Box, { mb: 3, children: _jsxs(UnderlineNav, { "aria-label": "jupyter-react", children: [_jsx(UnderlineNav.Item, { "aria-current": "page", icon: RingedPlanetIcon, onSelect: e => {
29
+ e.preventDefault();
30
+ setTab(1);
31
+ }, children: "Components" }), _jsx(UnderlineNav.Item, { icon: ReactJsIcon, onSelect: e => {
32
+ e.preventDefault();
33
+ setTab(2);
34
+ }, children: "About" })] }) }), _jsxs(Box, { m: 3, children: [tab === 1 && _jsx(ComponentsTab, { app: app }), tab === 2 && _jsx(AboutTab, { version: version })] })] }) }) }) }));
24
35
  };
25
36
  export default JupyterReact;
26
37
  //# sourceMappingURL=JupyterReact.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"JupyterReact.js","sourceRoot":"","sources":["../../src/app/JupyterReact.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AACvE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,QAAQ,MAAM,iBAAiB,CAAC;AACvC,OAAO,aAAa,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAMxD,MAAM,YAAY,GAAG,CAAC,KAA2B,EAAe,EAAE;IAChE,MAAM,EAAE,GAAG,EAAE,GAAG,KAAK,CAAC;IACtB,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IAClC,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;IAC3C,SAAS,CAAC,GAAG,EAAE;QACb,UAAU,CAAM,gBAAgB,CAAC,YAAY,EAAE,EAAE,eAAe,EAAE,QAAQ,CAAC;aAC1E,IAAI,CAAC,IAAI,CAAC,EAAE;YACX,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC3B,CAAC,CAAC;aACD,KAAK,CAAC,MAAM,CAAC,EAAE;YACd,OAAO,CAAC,KAAK,CACX,sEAAsE,MAAM,EAAE,CAC/E,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IACH,OAAO,CACL,4BACE,K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C,EAAE;4CACZ,CAAC,CAAC,cAAc,EAAE,CAAC;4CACnB,MAAM,CAAC,CAAC,CAAC,CAAC;wCACZ,CAAC,sBAGiB,IACP,GACX,EACN,MAAC,GAAG,IAAC,CAAC,EAAE,CAAC,aACN,GAAG,KAAK,CAAC,IAAI,KAAC,aAAa,IAAC,GAAG,EAAE,GAAG,GAAI,EACxC,GAAG,KAAK,CAAC,IAAI,KAAC,QAAQ,IAAC,OAAO,EAAE,OAAO,GAAI,IACxC,IACF,GACK,GACC,GACf,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -1,14 +1,16 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ /*
3
+ * Copyright (c) 2022-2023 Datalayer Inc. All rights reserved.
4
+ *
5
+ * MIT License
6
+ */
2
7
  import { useState } from 'react';
3
8
  import { Pagehead, Label, Text, Link, Box } from '@primer/react';
4
9
  import { ECharlesIcon } from '@datalayer/icons-react/eggs';
5
10
  const AboutTab = (props) => {
6
11
  const { version } = props;
7
12
  const [egg, setEgg] = useState(false);
8
- 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: { height: 350 }, children: !egg ?
9
- _jsx("img", { src: "https://assets.datalayer.tech/releases/datalayer-0.2.0-omalley.png", onClick: e => setEgg(true) })
10
- :
11
- _jsx(ECharlesIcon, { size: 300, onClick: e => setEgg(false) }) }), _jsx(Box, { children: _jsx(Link, { href: "https://datalayer.tech/docs/releases/0.2.0-omalley", target: "_blank", children: _jsx(Text, { as: "h4", children: "Datalayer 0.2.0 O'Malley 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 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" }) }) })] }));
12
14
  };
13
15
  export default AboutTab;
14
16
  //# sourceMappingURL=AboutTab.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AboutTab.js","sourceRoot":"","sources":["../../../src/app/tabs/AboutTab.tsx"],"names":[],"mappings":";AAAA,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,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AAO,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,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,4 +1,9 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ /*
3
+ * Copyright (c) 2022-2023 Datalayer Inc. All rights reserved.
4
+ *
5
+ * MIT License
6
+ */
2
7
  import { useState } from 'react';
3
8
  import { Box, NavList } from '@primer/react';
4
9
  import { Jupyter } from '../../jupyter/Jupyter';
@@ -11,9 +16,9 @@ const MainTab = (props) => {
11
16
  const [nav, setNav] = useState(1);
12
17
  return (_jsx(_Fragment, { children: _jsxs(Box, { sx: { display: 'flex' }, children: [_jsx(Box, { children: _jsxs(NavList, { sx: {
13
18
  '> *': {
14
- paddingTop: '0px'
15
- }
16
- }, children: [_jsx(NavList.Item, { "aria-current": nav === 1 ? 'page' : undefined, onClick: e => setNav(1), children: "File Browser" }), _jsx(NavList.Item, { "aria-current": nav === 2 ? 'page' : undefined, onClick: e => setNav(2), children: "Cell" }), _jsx(NavList.Item, { "aria-current": nav === 3 ? 'page' : undefined, onClick: e => setNav(3), children: "Notebook" }), _jsx(NavList.Item, { "aria-current": nav === 4 ? 'page' : undefined, onClick: e => setNav(4), children: "IPyWidgets" }), _jsx(NavList.Item, { "aria-current": nav === 5 ? 'page' : undefined, onClick: e => setNav(5), children: "Viewer" })] }) }), _jsx(Box, { ml: 3, sx: { width: '100%' }, children: _jsxs(Jupyter, { startDefaultKernel: false, children: [(nav === 1) && _jsx(FileBrowserComponent, {}), (nav === 2) && _jsx(CellComponent, {}), (nav === 3) && _jsx(NotebookComponent, {}), (nav === 4) && _jsx(IPyWidgetsComponent, {}), (nav === 5) && _jsx(ViewerComponent, {})] }) })] }) }));
19
+ paddingTop: '0px',
20
+ },
21
+ }, children: [_jsx(NavList.Item, { "aria-current": nav === 1 ? 'page' : undefined, onClick: e => setNav(1), children: "File Browser" }), _jsx(NavList.Item, { "aria-current": nav === 2 ? 'page' : undefined, onClick: e => setNav(2), children: "Cell" }), _jsx(NavList.Item, { "aria-current": nav === 3 ? 'page' : undefined, onClick: e => setNav(3), children: "Notebook" }), _jsx(NavList.Item, { "aria-current": nav === 4 ? 'page' : undefined, onClick: e => setNav(4), children: "IPyWidgets" }), _jsx(NavList.Item, { "aria-current": nav === 5 ? 'page' : undefined, onClick: e => setNav(5), children: "Viewer" })] }) }), _jsx(Box, { ml: 3, sx: { width: '100%' }, children: _jsxs(Jupyter, { startDefaultKernel: false, children: [nav === 1 && _jsx(FileBrowserComponent, {}), nav === 2 && _jsx(CellComponent, {}), nav === 3 && _jsx(NotebookComponent, {}), nav === 4 && _jsx(IPyWidgetsComponent, {}), nav === 5 && _jsx(ViewerComponent, {})] }) })] }) }));
17
22
  };
18
23
  export default MainTab;
19
24
  //# sourceMappingURL=ComponentsTab.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ComponentsTab.js","sourceRoot":"","sources":["../../../src/app/tabs/ComponentsTab.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD,OAAO,oBAAoB,MAAM,mCAAmC,CAAC;AACrE,OAAO,aAAa,MAAM,4BAA4B,CAAC;AACvD,OAAO,iBAAiB,MAAM,gCAAgC,CAAC;AAC/D,OAAO,mBAAmB,MAAM,kCAAkC,CAAC;AACnE,OAAO,eAAe,MAAM,8BAA8B,CAAC;AAE3D,MAAM,OAAO,GAAG,CAAC,KAA2B,EAAE,EAAE;IAC9C,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IAClC,OAAO,CACL,4BACE,MAAC,GAAG,IAAC,EAAE,EAAE,EAAC,OAAO,EAAE,MAAM,EAAC,aACxB,KAAC,GAAG,cACF,MAAC,OAAO,IAAC,EAAE,EAAE;4BACX,KAAK,EAAE;gCACL,UAAU,EAAE,KAAK;6BAClB;yBACF,aACC,KAAC,OAAO,CAAC,IAAI,oBAAe,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,EAAE,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,6BAEpE,EACf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CAAC,SAAS,EAC5C,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,yBAGV,EACf,KAAC,OAAO,CAAC,IAAI,oBACG,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,EAC5C,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,2BAGV,EACf,KAAC,OAAO,CAAC,IAAI,oBACG,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,EAC5C,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,uBAGV,IACP,GACN,EACN,KAAC,GAAG,IAAC,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,YAC/B,MAAC,OAAO,IAAC,kBAAkB,EAAE,KAAK,aAC/B,GAAG,KAAK,CAAC,IAAI,KAAC,oBAAoB,KAAG,EACrC,GAAG,KAAK,CAAC,IAAI,KAAC,aAAa,KAAG,EAC9B,GAAG,KAAK,CAAC,IAAI,KAAC,iBAAiB,KAAG,EAClC,GAAG,KAAK,CAAC,IAAI,KAAC,mBAAmB,KAAG,EACpC,GAAG,KAAK,CAAC,IAAI,KAAC,eAAe,KAAG,IACzB,GACN,IACF,GACL,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,OAAO,CAAC"}
@@ -1,4 +1,9 @@
1
1
  import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
2
+ /*
3
+ * Copyright (c) 2022-2023 Datalayer Inc. All rights reserved.
4
+ *
5
+ * MIT License
6
+ */
2
7
  // import Cell from '../../../components/cell/Cell';
3
8
  const CellComponent = () => {
4
9
  return (_jsx(_Fragment, {}));
@@ -1 +1 @@
1
- {"version":3,"file":"CellComponent.js","sourceRoot":"","sources":["../../../../src/app/tabs/components/CellComponent.tsx"],"names":[],"mappings":";AAAA,oDAAoD;AAEpD,MAAM,aAAa,GAAG,GAAG,EAAE;IACzB,OAAO,CACL,mBAIG,CACJ,CAAA;AACH,CAAC,CAAA;AAED,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"CellComponent.js","sourceRoot":"","sources":["../../../../src/app/tabs/components/CellComponent.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;AAEH,oDAAoD;AAEpD,MAAM,aAAa,GAAG,GAAG,EAAE;IACzB,OAAO,CACL,mBAEQ,CACT,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -1,4 +1,9 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
2
+ /*
3
+ * Copyright (c) 2022-2023 Datalayer Inc. All rights reserved.
4
+ *
5
+ * MIT License
6
+ */
2
7
  import { FileBrowser } from '../../../components/filebrowser/FileBrowser';
3
8
  const FileBrowserComponent = () => {
4
9
  return (_jsx(_Fragment, { children: _jsx(FileBrowser, {}) }));
@@ -1 +1 @@
1
- {"version":3,"file":"FileBrowserComponent.js","sourceRoot":"","sources":["../../../../src/app/tabs/components/FileBrowserComponent.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,6CAA6C,CAAC;AAE1E,MAAM,oBAAoB,GAAG,GAAG,EAAE;IAChC,OAAO,CACL,4BACE,KAAC,WAAW,KAAE,GACb,CACJ,CAAA;AACH,CAAC,CAAA;AAED,eAAe,oBAAoB,CAAC"}
1
+ {"version":3,"file":"FileBrowserComponent.js","sourceRoot":"","sources":["../../../../src/app/tabs/components/FileBrowserComponent.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,6CAA6C,CAAC;AAE1E,MAAM,oBAAoB,GAAG,GAAG,EAAE;IAChC,OAAO,CACL,4BACE,KAAC,WAAW,KAAG,GACd,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
@@ -1,6 +1,11 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
2
+ /*
3
+ * Copyright (c) 2022-2023 Datalayer Inc. All rights reserved.
4
+ *
5
+ * MIT License
6
+ */
2
7
  import OutputIPyWidgets from '../../../components/output/OutputIPyWidgets';
3
- import { view, state } from './../../../examples/notebooks/OutputIPyWidgetsExample';
8
+ import { view, state, } from './../../../examples/notebooks/OutputIPyWidgetsExample';
4
9
  const IPyWidgetsComponent = () => {
5
10
  return (_jsx(_Fragment, { children: _jsx(OutputIPyWidgets, { view: view, state: state }) }));
6
11
  };
@@ -1 +1 @@
1
- {"version":3,"file":"IPyWidgetsComponent.js","sourceRoot":"","sources":["../../../../src/app/tabs/components/IPyWidgetsComponent.tsx"],"names":[],"mappings":";AAAA,OAAO,gBAAgB,MAAM,6CAA6C,CAAC;AAE3E,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,uDAAuD,CAAC;AAEpF,MAAM,mBAAmB,GAAG,GAAG,EAAE;IAC/B,OAAO,CACL,4BACE,KAAC,gBAAgB,IAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,GAAG,GAC5C,CACJ,CAAA;AACH,CAAC,CAAA;AAED,eAAe,mBAAmB,CAAC"}
1
+ {"version":3,"file":"IPyWidgetsComponent.js","sourceRoot":"","sources":["../../../../src/app/tabs/components/IPyWidgetsComponent.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;AAEH,OAAO,gBAAgB,MAAM,6CAA6C,CAAC;AAE3E,OAAO,EACL,IAAI,EACJ,KAAK,GACN,MAAM,uDAAuD,CAAC;AAE/D,MAAM,mBAAmB,GAAG,GAAG,EAAE;IAC/B,OAAO,CACL,4BACE,KAAC,gBAAgB,IAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,GAAI,GAC7C,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
@@ -1,4 +1,9 @@
1
1
  import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
2
+ /*
3
+ * Copyright (c) 2022-2023 Datalayer Inc. All rights reserved.
4
+ *
5
+ * MIT License
6
+ */
2
7
  // import Notebook from '../../../components/notebook/Notebook';
3
8
  // import CellSidebarNew from "../../../components/notebook/cell/sidebar/CellSidebarNew";
4
9
  // import nbformat from "../../..//examples/notebooks/IPyWidgetsExample1.ipynb.json";
@@ -1 +1 @@
1
- {"version":3,"file":"NotebookComponent.js","sourceRoot":"","sources":["../../../../src/app/tabs/components/NotebookComponent.tsx"],"names":[],"mappings":";AAAA,gEAAgE;AAChE,yFAAyF;AAEzF,qFAAqF;AAErF,MAAM,iBAAiB,GAAG,GAAG,EAAE;IAC7B,OAAO,CACL,mBAeG,CACJ,CAAA;AACH,CAAC,CAAA;AAED,eAAe,iBAAiB,CAAC"}
1
+ {"version":3,"file":"NotebookComponent.js","sourceRoot":"","sources":["../../../../src/app/tabs/components/NotebookComponent.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;AAEH,gEAAgE;AAChE,yFAAyF;AAEzF,qFAAqF;AAErF,MAAM,iBAAiB,GAAG,GAAG,EAAE;IAC7B,OAAO,CACL,mBAeG,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
@@ -1,6 +1,11 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
2
+ /*
3
+ * Copyright (c) 2022-2023 Datalayer Inc. All rights reserved.
4
+ *
5
+ * MIT License
6
+ */
2
7
  import Viewer from '../../../components/viewer/Viewer';
3
- import nbformat from "../../..//examples/notebooks/IPyWidgetsExample1.ipynb.json";
8
+ import nbformat from '../../..//examples/notebooks/IPyWidgetsExample.ipynb.json';
4
9
  const ViewerComponent = () => {
5
10
  return (_jsx(_Fragment, { children: _jsx(Viewer, { nbformat: nbformat, outputs: true }) }));
6
11
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ViewerComponent.js","sourceRoot":"","sources":["../../../../src/app/tabs/components/ViewerComponent.tsx"],"names":[],"mappings":";AAAA,OAAO,MAAM,MAAM,mCAAmC,CAAC;AAEvD,OAAO,QAAQ,MAAM,4DAA4D,CAAC;AAElF,MAAM,eAAe,GAAG,GAAG,EAAE;IAC3B,OAAO,CACL,4BACE,KAAC,MAAM,IAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,GAAG,GAC3C,CACJ,CAAA;AACH,CAAC,CAAA;AAED,eAAe,eAAe,CAAC"}
1
+ {"version":3,"file":"ViewerComponent.js","sourceRoot":"","sources":["../../../../src/app/tabs/components/ViewerComponent.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;AAEH,OAAO,MAAM,MAAM,mCAAmC,CAAC;AAEvD,OAAO,QAAQ,MAAM,2DAA2D,CAAC;AAEjF,MAAM,eAAe,GAAG,GAAG,EAAE;IAC3B,OAAO,CACL,4BACE,KAAC,MAAM,IAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,GAAI,GAC5C,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { ButtonProps } from '@primer/react';
2
+ import type { FC } from 'react';
3
+ /**
4
+ * Primer button tuned to fit JupyterLab dialog button
5
+ */
6
+ export declare const Button: FC<ButtonProps>;
7
+ export default Button;
@@ -0,0 +1,43 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ /*
3
+ * Copyright (c) 2022-2023 Datalayer Inc. All rights reserved.
4
+ *
5
+ * MIT License
6
+ */
7
+ import { Button as BaseButton } from '@primer/react';
8
+ /**
9
+ * Primer button tuned to fit JupyterLab dialog button
10
+ */
11
+ export const Button = props => {
12
+ const sx = {};
13
+ switch (props.variant) {
14
+ case 'danger':
15
+ sx.backgroundColor = 'var(--jp-error-color1)';
16
+ sx.color = 'btn.primary.text';
17
+ sx.borderWidth = 0;
18
+ break;
19
+ case 'primary':
20
+ sx.borderWidth = 0;
21
+ break;
22
+ case 'invisible':
23
+ break;
24
+ default:
25
+ sx.backgroundColor = 'var(--jp-reject-color-normal)';
26
+ sx.color = 'btn.primary.text';
27
+ sx.borderWidth = 0;
28
+ // @ts-expect-error unknow index
29
+ sx[':active:not([disabled]):not([data-inactive])'] = {
30
+ backgroundColor: 'var(--jp-reject-color-active)',
31
+ color: 'btn.primary.text',
32
+ };
33
+ // @ts-expect-error unknow index
34
+ sx[':hover:not([disabled]):not([data-inactive])'] = {
35
+ backgroundColor: 'var(--jp-reject-color-hover)',
36
+ color: 'btn.primary.text',
37
+ };
38
+ break;
39
+ }
40
+ return _jsx(BaseButton, { sx: sx, ...props });
41
+ };
42
+ export default Button;
43
+ //# sourceMappingURL=Button.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Button.js","sourceRoot":"","sources":["../../../src/components/button/Button.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;AAEH,OAAO,EAAE,MAAM,IAAI,UAAU,EAAe,MAAM,eAAe,CAAC;AAIlE;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAoB,KAAK,CAAC,EAAE;IAC7C,MAAM,EAAE,GAAwB,EAAE,CAAC;IACnC,QAAQ,KAAK,CAAC,OAAO,EAAE;QACrB,KAAK,QAAQ;YACX,EAAE,CAAC,eAAe,GAAG,wBAAwB,CAAC;YAC9C,EAAE,CAAC,KAAK,GAAG,kBAAkB,CAAC;YAC9B,EAAE,CAAC,WAAW,GAAG,CAAC,CAAC;YACnB,MAAM;QACR,KAAK,SAAS;YACZ,EAAE,CAAC,WAAW,GAAG,CAAC,CAAC;YACnB,MAAM;QACR,KAAK,WAAW;YACd,MAAM;QACR;YACE,EAAE,CAAC,eAAe,GAAG,+BAA+B,CAAC;YACrD,EAAE,CAAC,KAAK,GAAG,kBAAkB,CAAC;YAC9B,EAAE,CAAC,WAAW,GAAG,CAAC,CAAC;YACnB,gCAAgC;YAChC,EAAE,CAAC,8CAA8C,CAAC,GAAG;gBACnD,eAAe,EAAE,+BAA+B;gBAChD,KAAK,EAAE,kBAAkB;aAC1B,CAAC;YACF,gCAAgC;YAChC,EAAE,CAAC,6CAA6C,CAAC,GAAG;gBAClD,eAAe,EAAE,8BAA8B;gBAC/C,KAAK,EAAE,kBAAkB;aAC1B,CAAC;YACF,MAAM;KACT;IACD,OAAO,KAAC,UAAU,IAAC,EAAE,EAAE,EAAE,KAAM,KAAK,GAAI,CAAC;AAC3C,CAAC,CAAC;AAEF,eAAe,MAAM,CAAC"}
@@ -1,9 +1,14 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
+ /*
3
+ * Copyright (c) 2022-2023 Datalayer Inc. All rights reserved.
4
+ *
5
+ * MIT License
6
+ */
2
7
  import { useState, useEffect, useMemo } from 'react';
3
- import { useDispatch } from "react-redux";
8
+ import { useDispatch } from 'react-redux';
4
9
  import { CodeCell } from '@jupyterlab/cells';
5
- import { Box } from "@primer/react";
6
- import { cellActions, cellReducer } from './CellState';
10
+ import { Box } from '@primer/react';
11
+ import { cellActions, cellReducer } from './CellRedux';
7
12
  import CellAdapter from './CellAdapter';
8
13
  import Lumino from '../../jupyter/lumino/Lumino';
9
14
  import { useJupyter } from './../../jupyter/JupyterContext';
@@ -49,36 +54,32 @@ export const Cell = (props) => {
49
54
  });
50
55
  }
51
56
  }, [source, defaultKernel]);
52
- return adapter
53
- ?
54
- _jsx(Box, { sx: {
55
- '& .dla-Jupyter-Cell': {
56
- position: 'relative !important',
57
- contain: 'content !important',
58
- },
59
- '& .jp-Toolbar': {
60
- height: 'auto !important',
61
- position: 'relative',
62
- },
63
- '& .lm-BoxPanel': {
64
- position: 'relative',
65
- },
66
- '& .jp-Cell': {
67
- position: 'relative',
68
- },
69
- '& .jp-CodeCell': {
70
- height: 'auto !important',
71
- position: 'relative',
72
- },
73
- '& .jp-Cell-outputArea': {
74
- paddingBottom: '30px',
75
- },
76
- '& .jp-CodeMirrorEditor': {
77
- cursor: 'text !important',
78
- },
79
- }, children: _jsx(Lumino, { children: adapter.panel }) })
80
- :
81
- _jsx(Box, { children: "Loading Jupyter Cell..." });
57
+ return adapter ? (_jsx(Box, { sx: {
58
+ '& .dla-Jupyter-Cell': {
59
+ position: 'relative !important',
60
+ contain: 'content !important',
61
+ },
62
+ '& .jp-Toolbar': {
63
+ height: 'auto !important',
64
+ position: 'relative',
65
+ },
66
+ '& .lm-BoxPanel': {
67
+ position: 'relative',
68
+ },
69
+ '& .jp-Cell': {
70
+ position: 'relative',
71
+ },
72
+ '& .jp-CodeCell': {
73
+ height: 'auto !important',
74
+ position: 'relative',
75
+ },
76
+ '& .jp-Cell-outputArea': {
77
+ paddingBottom: '30px',
78
+ },
79
+ '& .jp-CodeMirrorEditor': {
80
+ cursor: 'text !important',
81
+ },
82
+ }, children: _jsx(Lumino, { children: adapter.panel }) })) : (_jsx(Box, { children: "Loading Jupyter Cell..." }));
82
83
  };
83
84
  Cell.defaultProps = {
84
85
  source: DEFAULT_SOURCE,
@@ -1 +1 @@
1
- {"version":3,"file":"Cell.js","sourceRoot":"","sources":["../../../src/components/cell/Cell.tsx"],"names":[],"mappings":";AAAA,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,CAAA;AAOtE,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,KAAiB,EAAE,EAAE;IACxC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE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,EAAE,oBAA2B;aACrC;YACD,eAAe,EAAE;gBACf,MAAM,EAAE,iBAAiB;gBACzB,QAAQ,EAAE,UAAU;aACrB;YACD,gBAAgB,EAAE;gBAChB,QAAQ,EAAE,UAAU;aACrB;YACD,YAAY,EAAE;gBACZ,QAAQ,EAAE,UAAU;aACrB;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"}
@@ -9,6 +9,7 @@ export declare class CellAdapter {
9
9
  private _panel;
10
10
  private _sessionContext;
11
11
  constructor(options: CellAdapter.ICellAdapterOptions);
12
+ private setupCell;
12
13
  get panel(): BoxPanel;
13
14
  get codeCell(): CodeCell;
14
15
  get sessionContext(): SessionContext;
@@ -1,17 +1,22 @@
1
+ /*
2
+ * Copyright (c) 2022-2023 Datalayer Inc. All rights reserved.
3
+ *
4
+ * MIT License
5
+ */
1
6
  import { BoxPanel, Widget } from '@lumino/widgets';
2
7
  import { find } from '@lumino/algorithm';
3
8
  import { CommandRegistry } from '@lumino/commands';
4
- import { SessionContext, Toolbar, ToolbarButton } from '@jupyterlab/apputils';
9
+ import { SessionContext, Toolbar, ToolbarButton, } from '@jupyterlab/apputils';
5
10
  import { CodeCellModel, CodeCell, Cell } from '@jupyterlab/cells';
6
- import { ybinding, CodeMirrorMimeTypeService, EditorLanguageRegistry, CodeMirrorEditorFactory, EditorExtensionRegistry, EditorThemeRegistry } from '@jupyterlab/codemirror';
7
- import { Completer, CompleterModel, CompletionHandler, ProviderReconciliator, KernelCompleterProvider } from '@jupyterlab/completer';
8
- import { RenderMimeRegistry, standardRendererFactories as initialFactories } from '@jupyterlab/rendermime';
9
- import { SessionManager, KernelManager, KernelSpecManager } from '@jupyterlab/services';
11
+ import { ybinding, CodeMirrorMimeTypeService, EditorLanguageRegistry, CodeMirrorEditorFactory, EditorExtensionRegistry, EditorThemeRegistry, } from '@jupyterlab/codemirror';
12
+ import { Completer, CompleterModel, CompletionHandler, ProviderReconciliator, KernelCompleterProvider, } from '@jupyterlab/completer';
13
+ import { RenderMimeRegistry, standardRendererFactories as initialFactories, } from '@jupyterlab/rendermime';
14
+ import { SessionManager, KernelManager, KernelSpecManager, } from '@jupyterlab/services';
10
15
  import { runIcon } from '@jupyterlab/ui-components';
11
16
  import { createStandaloneCell } from '@jupyter/ydoc';
12
- import { requireLoader as loader } from "@jupyter-widgets/html-manager";
13
- import { WIDGET_MIMETYPE, WidgetRenderer } from "@jupyter-widgets/html-manager/lib/output_renderers";
14
- import IPyWidgetsManager from "../../jupyter/ipywidgets/IPyWidgetsManager";
17
+ import { requireLoader as loader } from '@jupyter-widgets/html-manager';
18
+ import { WIDGET_MIMETYPE, WidgetRenderer, } from '@jupyter-widgets/html-manager/lib/output_renderers';
19
+ import IPyWidgetsClassicManager from '../../jupyter/ipywidgets/manager/IPyWidgetsClassicManager';
15
20
  import CellCommands from './CellCommands';
16
21
  export class CellAdapter {
17
22
  _codeCell;
@@ -21,30 +26,35 @@ export class CellAdapter {
21
26
  constructor(options) {
22
27
  const { source, serverSettings, kernel } = options;
23
28
  this._kernel = kernel;
24
- const kernelManager = kernel?.kernelManager ?? new KernelManager({
25
- serverSettings
26
- });
27
- const sessionManager = kernel?.sessionManager ?? new SessionManager({
28
- serverSettings,
29
- kernelManager
30
- });
31
- const specsManager = kernel?.kernelSpecManager ?? new KernelSpecManager({
32
- serverSettings
33
- });
34
- const kernelPreference = kernel ?
35
- {
29
+ this.setupCell(source, serverSettings, kernel);
30
+ }
31
+ setupCell(source, serverSettings, kernel) {
32
+ const kernelManager = kernel.kernelManager ??
33
+ new KernelManager({
34
+ serverSettings,
35
+ });
36
+ const sessionManager = kernel.sessionManager ??
37
+ new SessionManager({
38
+ serverSettings,
39
+ kernelManager,
40
+ });
41
+ const specsManager = kernel.kernelSpecManager ??
42
+ new KernelSpecManager({
43
+ serverSettings,
44
+ });
45
+ const kernelPreference = kernel
46
+ ? {
36
47
  id: kernel.id,
37
48
  shouldStart: false,
38
49
  autoStartDefault: false,
39
50
  shutdownOnDispose: false,
40
51
  }
41
- :
42
- {
43
- name: 'python',
44
- shouldStart: true,
45
- autoStartDefault: true,
46
- shutdownOnDispose: true,
47
- };
52
+ : {
53
+ name: 'python',
54
+ shouldStart: true,
55
+ autoStartDefault: true,
56
+ shutdownOnDispose: true,
57
+ };
48
58
  this._sessionContext = new SessionContext({
49
59
  name: kernel?.path,
50
60
  path: kernel?.path,
@@ -55,7 +65,8 @@ export class CellAdapter {
55
65
  });
56
66
  // These are fixes to have more control on the kernel launch.
57
67
  this._sessionContext._initialize = async () => {
58
- const manager = this._sessionContext.sessionManager;
68
+ const manager = this._sessionContext
69
+ .sessionManager;
59
70
  await manager.ready;
60
71
  await manager.refreshRunning();
61
72
  const model = find(manager.running(), item => {
@@ -68,7 +79,7 @@ export class CellAdapter {
68
79
  model,
69
80
  kernelConnectionOptions: {
70
81
  handleComms: true,
71
- }
82
+ },
72
83
  });
73
84
  this._sessionContext._handleNewSession(session);
74
85
  }
@@ -96,7 +107,7 @@ export class CellAdapter {
96
107
  ytext: sharedModel.ysource,
97
108
  undoManager: sharedModel.undoManager ?? undefined,
98
109
  }));
99
- }
110
+ },
100
111
  });
101
112
  return registry;
102
113
  };
@@ -111,9 +122,9 @@ export class CellAdapter {
111
122
  // TODO: add support for LaTeX.
112
123
  const m = await import('@codemirror/lang-markdown');
113
124
  return m.markdown({
114
- codeLanguages: (info) => languages.findBest(info)
125
+ codeLanguages: (info) => languages.findBest(info),
115
126
  });
116
- }
127
+ },
117
128
  });
118
129
  const mimeService = new CodeMirrorMimeTypeService(languages);
119
130
  const commands = new CommandRegistry();
@@ -122,12 +133,13 @@ export class CellAdapter {
122
133
  commands.processKeydownEvent(event);
123
134
  }, useCapture);
124
135
  const rendermime = new RenderMimeRegistry({ initialFactories });
125
- const iPyWidgetsClassicManager = new IPyWidgetsManager({ loader });
136
+ const iPyWidgetsClassicManager = new IPyWidgetsClassicManager({ loader });
126
137
  rendermime.addFactory({
127
138
  safe: false,
128
139
  mimeTypes: [WIDGET_MIMETYPE],
129
- createRenderer: (options) => new WidgetRenderer(options, iPyWidgetsClassicManager),
140
+ createRenderer: options => new WidgetRenderer(options, iPyWidgetsClassicManager),
130
141
  }, 0);
142
+ iPyWidgetsClassicManager.registerWithKernel(kernel.connection);
131
143
  const factoryService = new CodeMirrorEditorFactory({
132
144
  extensions: editorExtensions(),
133
145
  languages,
@@ -138,8 +150,8 @@ export class CellAdapter {
138
150
  sharedModel: createStandaloneCell({
139
151
  cell_type: 'code',
140
152
  source: source,
141
- metadata: {}
142
- })
153
+ metadata: {},
154
+ }),
143
155
  }),
144
156
  contentFactory: new Cell.ContentFactory({
145
157
  editorFactory: factoryService.newInlineEditor.bind(factoryService),
@@ -151,9 +163,9 @@ export class CellAdapter {
151
163
  const kernelConnection = arg.newValue;
152
164
  console.log('Current Kernel Connection', kernelConnection);
153
165
  if (kernelConnection && !kernelConnection.handleComms) {
154
- console.warn('The Kernel Connection does not handle Comms', kernelConnection.id);
166
+ console.warn('Kernel Connection does not handle Comms', kernelConnection.id);
155
167
  kernelConnection.handleComms = true;
156
- console.log('The Kernel Connection is updated to enforce Comms support', kernelConnection.handleComms);
168
+ console.log('Kernel Connection is updated to enforce Comms support', kernelConnection.handleComms);
157
169
  }
158
170
  iPyWidgetsClassicManager.registerWithKernel(kernelConnection);
159
171
  });
@@ -170,7 +182,11 @@ export class CellAdapter {
170
182
  const timeout = 1000;
171
183
  const provider = new KernelCompleterProvider();
172
184
  const reconciliator = new ProviderReconciliator({
173
- context: { widget: this._codeCell, editor, session: this._sessionContext.session },
185
+ context: {
186
+ widget: this._codeCell,
187
+ editor,
188
+ session: this._sessionContext.session,
189
+ },
174
190
  providers: [provider],
175
191
  timeout,
176
192
  });
@@ -178,7 +194,11 @@ export class CellAdapter {
178
194
  void this._sessionContext.ready.then(() => {
179
195
  const provider = new KernelCompleterProvider();
180
196
  handler.reconciliator = new ProviderReconciliator({
181
- context: { widget: this._codeCell, editor, session: this._sessionContext.session },
197
+ context: {
198
+ widget: this._codeCell,
199
+ editor,
200
+ session: this._sessionContext.session,
201
+ },
182
202
  providers: [provider],
183
203
  timeout,
184
204
  });
@@ -195,7 +215,7 @@ export class CellAdapter {
195
215
  onClick: () => {
196
216
  CodeCell.execute(this._codeCell, this._sessionContext);
197
217
  },
198
- tooltip: 'Run'
218
+ tooltip: 'Run',
199
219
  });
200
220
  toolbar.addItem('run', runButton);
201
221
  toolbar.addItem('interrupt', Toolbar.createInterruptButton(this._sessionContext));