@datalayer/jupyter-react 0.8.2 → 0.9.0
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.
- package/LICENSE +1 -1
- package/lib/app/App.js +1 -1
- package/lib/app/JupyterReact.js +1 -1
- package/lib/app/tabs/AboutTab.js +2 -2
- package/lib/app/tabs/AboutTab.js.map +1 -1
- package/lib/app/tabs/ComponentsTab.js +2 -2
- package/lib/app/tabs/ComponentsTab.js.map +1 -1
- package/lib/app/tabs/components/CellComponent.js +4 -4
- package/lib/app/tabs/components/CellComponent.js.map +1 -1
- package/lib/app/tabs/components/FileBrowserComponent.js +1 -1
- package/lib/app/tabs/components/IPyWidgetsComponent.js +1 -1
- package/lib/app/tabs/components/NotebookComponent.js +3 -3
- package/lib/app/tabs/components/NotebookComponent.js.map +1 -1
- package/lib/app/tabs/components/ViewerComponent.js +3 -3
- package/lib/app/tabs/components/ViewerComponent.js.map +1 -1
- package/lib/components/button/Button.js +1 -1
- package/lib/components/cell/Cell.d.ts +6 -0
- package/lib/components/cell/Cell.js +5 -9
- package/lib/components/cell/Cell.js.map +1 -1
- package/lib/components/cell/CellAdapter.js +3 -3
- package/lib/components/cell/CellAdapter.js.map +1 -1
- package/lib/components/cell/CellCommands.js +2 -2
- package/lib/components/cell/CellRedux.js +1 -1
- package/lib/components/cell/CellZustand.js +1 -1
- package/lib/components/codemirror/CodeMirrorEditor.js +2 -3
- package/lib/components/codemirror/CodeMirrorEditor.js.map +1 -1
- package/lib/components/codemirror/CodeMirrorOutputToolbar.js +2 -2
- package/lib/components/codemirror/CodeMirrorOutputToolbar.js.map +1 -1
- package/lib/components/codemirror/CodeMirrorTheme.js +1 -1
- package/lib/components/commands/Commands.js +2 -2
- package/lib/components/commands/Commands.js.map +1 -1
- package/lib/components/commands/CommandsAdapter.css +1 -1
- package/lib/components/commands/CommandsAdapter.js +1 -1
- package/lib/components/commands/CommandsState.js +1 -1
- package/lib/components/console/Console.css +1 -1
- package/lib/components/console/Console.d.ts +12 -1
- package/lib/components/console/Console.js +12 -8
- package/lib/components/console/Console.js.map +1 -1
- package/lib/components/console/ConsoleAdapter.d.ts +23 -2
- package/lib/components/console/ConsoleAdapter.js +28 -14
- package/lib/components/console/ConsoleAdapter.js.map +1 -1
- package/lib/components/console/ConsoleRedux.js +1 -1
- package/lib/components/console/ConsoleZustand.js +1 -1
- package/lib/components/dialog/Dialog.js +2 -2
- package/lib/components/dialog/Dialog.js.map +1 -1
- package/lib/components/dialog/DialogAdapter.js +1 -1
- package/lib/components/filebrowser/FileBrowser.js +1 -1
- package/lib/components/filemanager/FileManagerJupyterLab.js +2 -2
- package/lib/components/filemanager/FileManagerJupyterLab.js.map +1 -1
- package/lib/components/filemanager/FileManagerState.js +1 -1
- package/lib/components/filemanager/lab/FileManagerAdapter.css +1 -1
- package/lib/components/filemanager/lab/FileManagerAdapter.js +1 -1
- package/lib/components/jupyterlab/JupyterLabApp.d.ts +2 -2
- package/lib/components/jupyterlab/JupyterLabApp.js +1 -1
- package/lib/components/jupyterlab/JupyterLabAppAdapter.js +1 -1
- package/lib/components/jupyterlab/JupyterLabAppCss.d.ts +2 -2
- package/lib/components/jupyterlab/JupyterLabAppCss.js +1 -1
- package/lib/components/jupyterlab/JupyterLabAppPlugins.js +1 -1
- package/lib/components/kernel/KernelActionMenu.d.ts +8 -0
- package/lib/components/kernel/KernelActionMenu.js +21 -0
- package/lib/components/kernel/KernelActionMenu.js.map +1 -0
- package/lib/components/kernel/KernelInspector.d.ts +6 -0
- package/lib/components/kernel/KernelInspector.js +31 -0
- package/lib/components/kernel/KernelInspector.js.map +1 -0
- package/lib/components/kernel/KernelLauncher.d.ts +2 -0
- package/lib/components/kernel/KernelLauncher.js +11 -0
- package/lib/components/kernel/KernelLauncher.js.map +1 -0
- package/lib/components/kernel/KernelLogs.d.ts +2 -0
- package/lib/components/kernel/KernelLogs.js +11 -0
- package/lib/components/kernel/KernelLogs.js.map +1 -0
- package/lib/components/kernel/KernelProgressBar.d.ts +2 -0
- package/lib/components/kernel/KernelProgressBar.js +26 -0
- package/lib/components/kernel/KernelProgressBar.js.map +1 -0
- package/lib/components/kernel/KernelSelector.d.ts +8 -0
- package/lib/components/kernel/KernelSelector.js +40 -0
- package/lib/components/kernel/KernelSelector.js.map +1 -0
- package/lib/components/kernel/KernelStatus.d.ts +27 -0
- package/lib/components/kernel/KernelStatus.js +67 -0
- package/lib/components/kernel/KernelStatus.js.map +1 -0
- package/lib/components/kernel/KernelUsage.d.ts +6 -0
- package/lib/components/kernel/KernelUsage.js +100 -0
- package/lib/components/kernel/KernelUsage.js.map +1 -0
- package/lib/components/kernel/KernelVariables.d.ts +6 -0
- package/lib/components/kernel/KernelVariables.js +23 -0
- package/lib/components/kernel/KernelVariables.js.map +1 -0
- package/lib/components/kernel/Kernels.d.ts +2 -0
- package/lib/components/kernel/Kernels.js +88 -0
- package/lib/components/kernel/Kernels.js.map +1 -0
- package/lib/components/kernel/index.d.ts +10 -0
- package/lib/components/kernel/index.js +16 -0
- package/lib/components/kernel/index.js.map +1 -0
- package/lib/components/kernel/inspector/kernelinspector.css +68 -0
- package/lib/components/kernel/inspector/model.d.ts +56 -0
- package/lib/components/kernel/inspector/model.js +201 -0
- package/lib/components/kernel/inspector/model.js.map +1 -0
- package/lib/components/kernel/inspector/widget.d.ts +40 -0
- package/lib/components/kernel/inspector/widget.js +190 -0
- package/lib/components/kernel/inspector/widget.js.map +1 -0
- package/lib/components/kernel/variables/handler.d.ts +86 -0
- package/lib/components/kernel/variables/handler.js +262 -0
- package/lib/components/kernel/variables/handler.js.map +1 -0
- package/lib/components/kernel/variables/inspectorscripts.d.ts +20 -0
- package/lib/components/kernel/variables/inspectorscripts.js +349 -0
- package/lib/components/kernel/variables/inspectorscripts.js.map +1 -0
- package/lib/components/kernel/variables/kernelconnector.d.ts +37 -0
- package/lib/components/kernel/variables/kernelconnector.js +76 -0
- package/lib/components/kernel/variables/kernelconnector.js.map +1 -0
- package/lib/components/kernel/variables/manager.d.ts +26 -0
- package/lib/components/kernel/variables/manager.js +70 -0
- package/lib/components/kernel/variables/manager.js.map +1 -0
- package/lib/components/kernel/variables/tokens.d.ts +48 -0
- package/lib/components/kernel/variables/tokens.js +7 -0
- package/lib/components/kernel/variables/tokens.js.map +1 -0
- package/lib/components/kernel/variables/variablesinspector.css +110 -0
- package/lib/components/kernel/variables/variablesinspector.d.ts +5 -0
- package/lib/components/kernel/variables/variablesinspector.js +85 -0
- package/lib/components/kernel/variables/variablesinspector.js.map +1 -0
- package/lib/components/kernel/variables/widget.d.ts +33 -0
- package/lib/components/kernel/variables/widget.js +391 -0
- package/lib/components/kernel/variables/widget.js.map +1 -0
- package/lib/{jupyter → components}/lumino/Lumino.js +1 -1
- package/lib/components/lumino/Lumino.js.map +1 -0
- package/lib/{jupyter → components}/lumino/LuminoBox.js +1 -1
- package/lib/components/lumino/LuminoBox.js.map +1 -0
- package/lib/{jupyter → components}/lumino/LuminoDetached.js +1 -1
- package/lib/components/lumino/LuminoDetached.js.map +1 -0
- package/lib/{jupyter → components}/lumino/LuminoObservable.js +1 -1
- package/lib/components/lumino/LuminoObservable.js.map +1 -0
- package/lib/components/lumino/LuminoRedux.js +7 -0
- package/lib/components/lumino/LuminoRedux.js.map +1 -0
- package/lib/{jupyter → components}/lumino/ReactPortalWidget.js +1 -1
- package/lib/components/lumino/ReactPortalWidget.js.map +1 -0
- package/lib/components/notebook/Notebook.css +1 -1
- package/lib/components/notebook/Notebook.js +12 -8
- package/lib/components/notebook/Notebook.js.map +1 -1
- package/lib/components/notebook/NotebookAdapter.d.ts +3 -1
- package/lib/components/notebook/NotebookAdapter.js +92 -61
- package/lib/components/notebook/NotebookAdapter.js.map +1 -1
- package/lib/components/notebook/NotebookCommands.d.ts +23 -21
- package/lib/components/notebook/NotebookCommands.js +52 -27
- package/lib/components/notebook/NotebookCommands.js.map +1 -1
- package/lib/components/notebook/NotebookRedux.js +1 -1
- package/lib/components/notebook/NotebookZustand.js +1 -1
- package/lib/components/notebook/cell/metadata/CellMetadataEditor.js +2 -2
- package/lib/components/notebook/cell/metadata/CellMetadataEditor.js.map +1 -1
- package/lib/components/notebook/cell/metadata/NbGraderCells.js +11 -11
- package/lib/components/notebook/cell/prompt/Countdown.js +2 -2
- package/lib/components/notebook/cell/prompt/Countdown.js.map +1 -1
- package/lib/components/notebook/cell/prompt/CountdownInputPrompt.js +1 -1
- package/lib/components/notebook/cell/prompt/CountdownOutputPrompt.js +1 -1
- package/lib/components/notebook/cell/prompt/CountdownOutputPrompt.js.map +1 -1
- package/lib/components/notebook/cell/sidebar/CellSidebar.js +1 -1
- package/lib/components/notebook/cell/sidebar/CellSidebarButton.js +1 -1
- package/lib/components/notebook/cell/sidebar/CellSidebarRun.js +1 -1
- package/lib/components/notebook/cell/sidebar/CellSidebarWidget.d.ts +1 -1
- package/lib/components/notebook/cell/sidebar/CellSidebarWidget.js +2 -2
- package/lib/components/notebook/cell/sidebar/CellSidebarWidget.js.map +1 -1
- package/lib/components/notebook/content/JupyterReactContentFactory.js +1 -1
- package/lib/components/notebook/marked/marked.js +2 -2
- package/lib/components/notebook/model/JupyterReactNotebookModelFactory.js +1 -1
- package/lib/components/output/Output.css +1 -1
- package/lib/components/output/Output.d.ts +13 -10
- package/lib/components/output/Output.js +34 -59
- package/lib/components/output/Output.js.map +1 -1
- package/lib/components/output/OutputAdapter.d.ts +3 -3
- package/lib/components/output/OutputAdapter.js +19 -17
- package/lib/components/output/OutputAdapter.js.map +1 -1
- package/lib/components/output/OutputIPyWidgets.css +1 -1
- package/lib/components/output/OutputIPyWidgets.js +2 -2
- package/lib/components/output/OutputIPyWidgets.js.map +1 -1
- package/lib/components/output/OutputRedux.js +1 -1
- package/lib/components/output/OutputRenderer.js +26 -2
- package/lib/components/output/OutputRenderer.js.map +1 -1
- package/lib/components/output/OutputZustand.d.ts +5 -0
- package/lib/components/output/OutputZustand.js +6 -1
- package/lib/components/output/OutputZustand.js.map +1 -1
- package/lib/{jupyter → components/output}/ipywidgets/IPyWidgetsAttached.js +2 -2
- package/lib/components/output/ipywidgets/IPyWidgetsAttached.js.map +1 -0
- package/lib/{jupyter → components/output}/ipywidgets/IPyWidgetsViewManager.js +8 -7
- package/lib/components/output/ipywidgets/IPyWidgetsViewManager.js.map +1 -0
- package/lib/components/settings/Settings.js +2 -2
- package/lib/components/settings/Settings.js.map +1 -1
- package/lib/components/settings/SettingsAdapter.css +1 -1
- package/lib/components/settings/SettingsAdapter.js +1 -1
- package/lib/components/settings/SettingsRedux.js +1 -1
- package/lib/components/settings/SettingsZustand.js +1 -1
- package/lib/components/terminal/Terminal.d.ts +5 -1
- package/lib/components/terminal/Terminal.js +3 -3
- package/lib/components/terminal/Terminal.js.map +1 -1
- package/lib/components/terminal/TerminalAdapter.js +13 -4
- package/lib/components/terminal/TerminalAdapter.js.map +1 -1
- package/lib/components/terminal/TerminalRedux.js +1 -1
- package/lib/components/terminal/TerminalZustand.js +1 -1
- package/lib/components/textinput/TextInput.js +1 -1
- package/lib/components/viewer/Viewer.d.ts +2 -1
- package/lib/components/viewer/Viewer.js +17 -4
- package/lib/components/viewer/Viewer.js.map +1 -1
- package/lib/components/viewer/input/CodemirrorView.js +1 -1
- package/lib/components/viewer/input/CodemirrorViewer.js +3 -3
- package/lib/components/viewer/input/CodemirrorViewer.js.map +1 -1
- package/lib/components/viewer/input/InputViewer.js +2 -5
- package/lib/components/viewer/input/InputViewer.js.map +1 -1
- package/lib/components/viewer/output/OutputAdapter.js +3 -3
- package/lib/components/viewer/output/OutputAdapter.js.map +1 -1
- package/lib/components/viewer/output/OutputViewer.js +1 -1
- package/lib/components/viewer/output/OutputViewer.js.map +1 -1
- package/lib/examples/All.js +6 -5
- package/lib/examples/All.js.map +1 -1
- package/lib/examples/Bokeh.js +1 -1
- package/lib/examples/Bqplot.js +8 -2
- package/lib/examples/Bqplot.js.map +1 -1
- package/lib/examples/Cell.js +1 -1
- package/lib/examples/CellLite.js +16 -0
- package/lib/examples/CellLite.js.map +1 -0
- package/lib/examples/Cells.js +1 -1
- package/lib/examples/Console.js +2 -2
- package/lib/examples/Console.js.map +1 -1
- package/lib/examples/ConsoleLite.js +4 -2
- package/lib/examples/ConsoleLite.js.map +1 -1
- package/lib/examples/Dashboard.js +1 -1
- package/lib/examples/Deno.js +18 -0
- package/lib/examples/Deno.js.map +1 -0
- package/lib/examples/FileBrowser.js +1 -1
- package/lib/examples/GeoJson.js +1 -1
- package/lib/examples/IPyLeaflet.js +8 -2
- package/lib/examples/IPyLeaflet.js.map +1 -1
- package/lib/examples/IPyReact.js +8 -4
- package/lib/examples/IPyReact.js.map +1 -1
- package/lib/examples/IPyWidgets.js +1 -1
- package/lib/examples/IPyWidgetsWithState.js +1 -1
- package/lib/examples/JupyterLabApp.js +2 -2
- package/lib/examples/JupyterLabHeadlessApp.js +3 -3
- package/lib/examples/JupyterLabHeadlessApp.js.map +1 -1
- package/lib/examples/KernelExecResult.d.ts +1 -0
- package/lib/examples/KernelExecResult.js +40 -0
- package/lib/examples/KernelExecResult.js.map +1 -0
- package/lib/examples/KernelExecutor.js +55 -0
- package/lib/examples/KernelExecutor.js.map +1 -0
- package/lib/examples/Kernels.d.ts +1 -0
- package/lib/examples/Kernels.js +78 -0
- package/lib/examples/Kernels.js.map +1 -0
- package/lib/examples/Lumino.js +2 -2
- package/lib/examples/Lumino.js.map +1 -1
- package/lib/examples/Matplotlib.js +12 -8
- package/lib/examples/Matplotlib.js.map +1 -1
- package/lib/examples/Notebook.js +11 -6
- package/lib/examples/Notebook.js.map +1 -1
- package/lib/examples/NotebookCellSidebar.js +10 -6
- package/lib/examples/NotebookCellSidebar.js.map +1 -1
- package/lib/examples/NotebookColorMode.js +47 -0
- package/lib/examples/NotebookColorMode.js.map +1 -0
- package/lib/examples/NotebookExternalContent.js +10 -6
- package/lib/examples/NotebookExternalContent.js.map +1 -1
- package/lib/examples/NotebookInit.js +9 -5
- package/lib/examples/NotebookInit.js.map +1 -1
- package/lib/examples/NotebookInjectableReduxStore.js +1 -1
- package/lib/examples/NotebookKernelChange.js +5 -4
- package/lib/examples/NotebookKernelChange.js.map +1 -1
- package/lib/examples/NotebookLite.d.ts +1 -0
- package/lib/examples/NotebookLite.js +20 -0
- package/lib/examples/NotebookLite.js.map +1 -0
- package/lib/examples/NotebookNbFormat.d.ts +1 -0
- package/lib/examples/{NotebookModel.js → NotebookNbFormat.js} +12 -8
- package/lib/examples/NotebookNbFormat.js.map +1 -0
- package/lib/examples/NotebookNbFormatChange.d.ts +1 -0
- package/lib/examples/{NotebookModelChange.js → NotebookNbFormatChange.js} +13 -9
- package/lib/examples/NotebookNbFormatChange.js.map +1 -0
- package/lib/examples/NotebookPath.js +10 -6
- package/lib/examples/NotebookPath.js.map +1 -1
- package/lib/examples/NotebookPathChange.js +10 -6
- package/lib/examples/NotebookPathChange.js.map +1 -1
- package/lib/examples/NotebookSkeleton.d.ts +1 -0
- package/lib/examples/NotebookSkeleton.js +28 -0
- package/lib/examples/NotebookSkeleton.js.map +1 -0
- package/lib/examples/NotebookTheme.d.ts +1 -0
- package/lib/examples/NotebookTheme.js +48 -0
- package/lib/examples/NotebookTheme.js.map +1 -0
- package/lib/examples/NotebookUnmount.js +6 -5
- package/lib/examples/NotebookUnmount.js.map +1 -1
- package/lib/examples/ObservableHQ.d.ts +1 -0
- package/lib/examples/ObservableHQ.js +18 -0
- package/lib/examples/ObservableHQ.js.map +1 -0
- package/lib/examples/Output.js +4 -4
- package/lib/examples/Output.js.map +1 -1
- package/lib/examples/OutputIPyWidgets.js +1 -1
- package/lib/examples/Outputs.js +3 -3
- package/lib/examples/Outputs.js.map +1 -1
- package/lib/examples/Panel.js +1 -1
- package/lib/examples/Plotly.js +1 -1
- package/lib/examples/RunningSessions.js +3 -3
- package/lib/examples/RunningSessions.js.map +1 -1
- package/lib/examples/Terminal.js +2 -2
- package/lib/examples/Terminal.js.map +1 -1
- package/lib/examples/Vega.js +1 -1
- package/lib/examples/Viewer.js +7 -69
- package/lib/examples/Viewer.js.map +1 -1
- package/lib/examples/lumino/LuminoWidget.d.ts +1 -1
- package/lib/examples/lumino/LuminoWidget.js +5 -5
- package/lib/examples/lumino/LuminoWidget.js.map +1 -1
- package/lib/examples/notebooks/OutputIPyWidgetsExample.js +1 -1
- package/lib/examples/sidebars/CellSidebarSource.js +1 -1
- package/lib/examples/state/ExampleReduxState.js +1 -1
- package/lib/examples/toolbars/NotebookToolbar.js +8 -5
- package/lib/examples/toolbars/NotebookToolbar.js.map +1 -1
- package/lib/examples/toolbars/NotebookToolbarAutoSave.js +2 -2
- package/lib/examples/toolbars/NotebookToolbarAutoSave.js.map +1 -1
- package/lib/examples/toolbars/NotebookToolbarStatus.js +1 -1
- package/lib/index.css +1 -1
- package/lib/index.d.ts +33 -24
- package/lib/index.js +54 -37
- package/lib/index.js.map +1 -1
- package/lib/jupyter/Jupyter.d.ts +7 -26
- package/lib/jupyter/Jupyter.js +24 -19
- package/lib/jupyter/Jupyter.js.map +1 -1
- package/lib/jupyter/JupyterAuthError.js +1 -1
- package/lib/jupyter/JupyterConfig.js +2 -2
- package/lib/jupyter/JupyterConfig.js.map +1 -1
- package/lib/jupyter/JupyterContext.d.ts +117 -24
- package/lib/jupyter/JupyterContext.js +116 -101
- package/lib/jupyter/JupyterContext.js.map +1 -1
- package/lib/jupyter/JupyterHandlers.js +1 -1
- package/lib/jupyter/ipywidgets/{lab → cache}/semvercache.d.ts +3 -1
- package/lib/jupyter/ipywidgets/{lab → cache}/semvercache.js +3 -1
- package/lib/jupyter/ipywidgets/cache/semvercache.js.map +1 -0
- package/lib/jupyter/ipywidgets/classic/IPyWidgetsClassicManager.d.ts +34 -0
- package/lib/jupyter/ipywidgets/classic/IPyWidgetsClassicManager.js +185 -0
- package/lib/jupyter/ipywidgets/classic/IPyWidgetsClassicManager.js.map +1 -0
- package/lib/jupyter/ipywidgets/lab/manager.d.ts +4 -4
- package/lib/jupyter/ipywidgets/lab/manager.js +21 -9
- package/lib/jupyter/ipywidgets/lab/manager.js.map +1 -1
- package/lib/jupyter/ipywidgets/lab/output.js +1 -1
- package/lib/jupyter/ipywidgets/lab/plugin.d.ts +6 -5
- package/lib/jupyter/ipywidgets/lab/plugin.js +44 -42
- package/lib/jupyter/ipywidgets/lab/plugin.js.map +1 -1
- package/lib/jupyter/ipywidgets/lab/renderer.js +1 -1
- package/lib/jupyter/ipywidgets/lab/renderer.js.map +1 -1
- package/lib/jupyter/ipywidgets/plotly/Figure.js +181 -170
- package/lib/jupyter/ipywidgets/plotly/Figure.js.map +1 -1
- package/lib/jupyter/ipywidgets/plotly/JupyterlabPlugin.js +1 -1
- package/lib/jupyter/ipywidgets/plotly/Version.js +1 -1
- package/lib/jupyter/ipywidgets/plotly/index.js +1 -1
- package/lib/jupyter/kernel/Kernel.d.ts +69 -17
- package/lib/jupyter/kernel/Kernel.js +68 -42
- package/lib/jupyter/kernel/Kernel.js.map +1 -1
- package/lib/jupyter/kernel/KernelExecutor.d.ts +38 -0
- package/lib/jupyter/kernel/KernelExecutor.js +149 -0
- package/lib/jupyter/kernel/KernelExecutor.js.map +1 -0
- package/lib/jupyter/kernel/index.d.ts +2 -0
- package/lib/jupyter/kernel/index.js +8 -0
- package/lib/jupyter/kernel/index.js.map +1 -0
- package/lib/jupyter/lab/JupyterLabColorMode.d.ts +1 -0
- package/lib/jupyter/lab/JupyterLabColorMode.js +7 -0
- package/lib/jupyter/lab/JupyterLabColorMode.js.map +1 -0
- package/lib/jupyter/lab/JupyterLabCss.d.ts +6 -3
- package/lib/jupyter/lab/JupyterLabCss.js +53 -25
- package/lib/jupyter/lab/JupyterLabCss.js.map +1 -1
- package/lib/jupyter/lab/JupyterLabCssImports.d.ts +16 -16
- package/lib/jupyter/lab/JupyterLabCssImports.js +17 -17
- package/lib/jupyter/lab/JupyterLabCssImports.js.map +1 -1
- package/lib/jupyter/lab/__tests__/datalayer.spec.js +1 -1
- package/lib/jupyter/lab/index.d.ts +2 -2
- package/lib/jupyter/lab/index.js +2 -3
- package/lib/jupyter/lab/index.js.map +1 -1
- package/lib/jupyter/lab/notebook/content/CountdownContentFactory.d.ts +3 -8
- package/lib/jupyter/lab/notebook/content/CountdownContentFactory.js +7 -13
- package/lib/jupyter/lab/notebook/content/CountdownContentFactory.js.map +1 -1
- package/lib/jupyter/lab/notebook/content/plugin.js +3 -3
- package/lib/jupyter/lab/notebook/content/plugin.js.map +1 -1
- package/lib/jupyter/lab/notebook/index.js +1 -1
- package/lib/jupyter/lite/LiteServer.d.ts +11 -2
- package/lib/jupyter/lite/LiteServer.js +42 -67
- package/lib/jupyter/lite/LiteServer.js.map +1 -1
- package/lib/jupyter/renderers/index.js +1 -1
- package/lib/jupyter/renderers/plotly/PlotlyRenderer.js +5 -5
- package/lib/jupyter/renderers/plotly/PlotlyRenderer.js.map +1 -1
- package/lib/jupyter/renderers/plotly/plotly.css +1 -1
- package/lib/jupyter/services/Services.js +1 -1
- package/lib/jupyter/theme.d.ts +2 -2
- package/lib/jupyter/theme.js +16 -15
- package/lib/jupyter/theme.js.map +1 -1
- package/lib/state/index.js +1 -1
- package/lib/state/redux/InitState.js +1 -1
- package/lib/state/redux/State.js +1 -1
- package/lib/state/redux/Store.js +1 -1
- package/lib/utils/Utils.d.ts +3 -2
- package/lib/utils/Utils.js +46 -2
- package/lib/utils/Utils.js.map +1 -1
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/index.js +2 -0
- package/lib/utils/index.js.map +1 -0
- package/package.json +170 -86
- package/style/base.css +1 -1
- package/style/index.css +1 -1
- package/style/index.js +1 -1
- package/lib/examples/NotebookModel.js.map +0 -1
- package/lib/examples/NotebookModelChange.js.map +0 -1
- package/lib/examples/NotebookThemed.js +0 -52
- package/lib/examples/NotebookThemed.js.map +0 -1
- package/lib/examples/ViewerFile.js +0 -19
- package/lib/examples/ViewerFile.js.map +0 -1
- package/lib/jupyter/ipywidgets/IPyWidgetsAttached.js.map +0 -1
- package/lib/jupyter/ipywidgets/IPyWidgetsViewManager.js.map +0 -1
- package/lib/jupyter/ipywidgets/lab/semvercache.js.map +0 -1
- package/lib/jupyter/ipywidgets/manager/IPyWidgetsClassicManager.d.ts +0 -19
- package/lib/jupyter/ipywidgets/manager/IPyWidgetsClassicManager.js +0 -85
- package/lib/jupyter/ipywidgets/manager/IPyWidgetsClassicManager.js.map +0 -1
- package/lib/jupyter/kernel/KernelModel.d.ts +0 -18
- package/lib/jupyter/kernel/KernelModel.js +0 -57
- package/lib/jupyter/kernel/KernelModel.js.map +0 -1
- package/lib/jupyter/lab/JupyterLabTheme.d.ts +0 -1
- package/lib/jupyter/lab/JupyterLabTheme.js +0 -7
- package/lib/jupyter/lab/JupyterLabTheme.js.map +0 -1
- package/lib/jupyter/lumino/Lumino.js.map +0 -1
- package/lib/jupyter/lumino/LuminoBox.js.map +0 -1
- package/lib/jupyter/lumino/LuminoDetached.js.map +0 -1
- package/lib/jupyter/lumino/LuminoObservable.js.map +0 -1
- package/lib/jupyter/lumino/LuminoRedux.js +0 -7
- package/lib/jupyter/lumino/LuminoRedux.js.map +0 -1
- package/lib/jupyter/lumino/ReactPortalWidget.js.map +0 -1
- /package/lib/{jupyter → components}/lumino/Lumino.d.ts +0 -0
- /package/lib/{jupyter → components}/lumino/LuminoBox.d.ts +0 -0
- /package/lib/{jupyter → components}/lumino/LuminoDetached.d.ts +0 -0
- /package/lib/{jupyter → components}/lumino/LuminoObservable.d.ts +0 -0
- /package/lib/{jupyter → components}/lumino/LuminoRedux.d.ts +0 -0
- /package/lib/{jupyter → components}/lumino/ReactPortalWidget.d.ts +0 -0
- /package/lib/{jupyter → components/output}/ipywidgets/IPyWidgetsAttached.d.ts +0 -0
- /package/lib/{jupyter → components/output}/ipywidgets/IPyWidgetsViewManager.d.ts +0 -0
- /package/lib/examples/{NotebookModel.d.ts → CellLite.d.ts} +0 -0
- /package/lib/examples/{NotebookModelChange.d.ts → Deno.d.ts} +0 -0
- /package/lib/examples/{NotebookThemed.d.ts → KernelExecutor.d.ts} +0 -0
- /package/lib/examples/{ViewerFile.d.ts → NotebookColorMode.d.ts} +0 -0
|
@@ -1,29 +1,35 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) 2021-2023 Datalayer, Inc.
|
|
3
3
|
*
|
|
4
4
|
* MIT License
|
|
5
5
|
*/
|
|
6
|
-
import { RenderMimeRegistry, standardRendererFactories as initialFactories, } from '@jupyterlab/rendermime';
|
|
7
6
|
import { CommandRegistry } from '@lumino/commands';
|
|
8
|
-
import { ybinding, CodeMirrorEditorFactory, CodeMirrorMimeTypeService, EditorLanguageRegistry, EditorExtensionRegistry, EditorThemeRegistry, } from '@jupyterlab/codemirror';
|
|
9
7
|
import { BoxPanel } from '@lumino/widgets';
|
|
8
|
+
import { RenderMimeRegistry, standardRendererFactories as initialFactories, } from '@jupyterlab/rendermime';
|
|
9
|
+
import { ybinding, CodeMirrorEditorFactory, CodeMirrorMimeTypeService, EditorLanguageRegistry, EditorExtensionRegistry, EditorThemeRegistry, } from '@jupyterlab/codemirror';
|
|
10
10
|
import { ConsolePanel } from '@jupyterlab/console';
|
|
11
|
+
const DEFAULT_CONSOLE_PATH = 'console-path';
|
|
11
12
|
class ConsoleAdapter {
|
|
12
13
|
_panel;
|
|
13
|
-
|
|
14
|
+
_code;
|
|
15
|
+
constructor(options) {
|
|
16
|
+
const { kernel, serviceManager, code } = options;
|
|
17
|
+
this._code = code;
|
|
14
18
|
this._panel = new BoxPanel();
|
|
15
19
|
this._panel.direction = 'top-to-bottom';
|
|
16
20
|
this._panel.spacing = 0;
|
|
17
21
|
this._panel.addClass('dla-JupyterLab-Console');
|
|
18
|
-
serviceManager.ready.then(() => {
|
|
19
|
-
this.
|
|
22
|
+
Promise.all([serviceManager.ready, kernel?.ready]).then(() => {
|
|
23
|
+
this.setupConsole(serviceManager, kernel);
|
|
20
24
|
});
|
|
21
25
|
}
|
|
22
|
-
|
|
26
|
+
setupConsole(serviceManager, kernel) {
|
|
27
|
+
// Set up a command registry.
|
|
23
28
|
const commands = new CommandRegistry();
|
|
24
|
-
|
|
29
|
+
this._panel.node.addEventListener('keydown', event => {
|
|
25
30
|
commands.processKeydownEvent(event);
|
|
26
31
|
});
|
|
32
|
+
// Set up the text editor
|
|
27
33
|
const themes = new EditorThemeRegistry();
|
|
28
34
|
for (const theme of EditorThemeRegistry.getDefaultThemes()) {
|
|
29
35
|
themes.addTheme(theme);
|
|
@@ -55,7 +61,7 @@ class ConsoleAdapter {
|
|
|
55
61
|
name: 'ipythongfm',
|
|
56
62
|
mime: 'text/x-ipythongfm',
|
|
57
63
|
load: async () => {
|
|
58
|
-
// TODO: add support for LaTeX
|
|
64
|
+
// TODO: add support for LaTeX.
|
|
59
65
|
const m = await import('@codemirror/lang-markdown');
|
|
60
66
|
return m.markdown({
|
|
61
67
|
codeLanguages: (info) => languages.findBest(info),
|
|
@@ -71,24 +77,27 @@ class ConsoleAdapter {
|
|
|
71
77
|
const editorFactory = factoryService.newInlineEditor;
|
|
72
78
|
const contentFactory = new ConsolePanel.ContentFactory({ editorFactory });
|
|
73
79
|
const consolePanel = new ConsolePanel({
|
|
80
|
+
name: kernel?.session.name,
|
|
74
81
|
manager: serviceManager,
|
|
75
82
|
rendermime,
|
|
76
|
-
path,
|
|
83
|
+
path: kernel?.session.path ?? DEFAULT_CONSOLE_PATH,
|
|
77
84
|
contentFactory,
|
|
78
85
|
mimeTypeService,
|
|
79
86
|
kernelPreference: {
|
|
80
87
|
shouldStart: true,
|
|
81
|
-
name: 'python',
|
|
82
|
-
|
|
88
|
+
name: kernel?.connection?.name ?? 'python',
|
|
89
|
+
id: kernel?.id,
|
|
90
|
+
language: kernel?.info?.language_info.name,
|
|
83
91
|
},
|
|
84
92
|
});
|
|
85
93
|
consolePanel.title.label = 'Console';
|
|
86
94
|
BoxPanel.setStretch(consolePanel, 1);
|
|
87
|
-
|
|
95
|
+
this._panel.addWidget(consolePanel);
|
|
88
96
|
window.addEventListener('resize', () => {
|
|
89
|
-
|
|
97
|
+
this._panel.update();
|
|
90
98
|
});
|
|
91
99
|
const selector = '.jp-ConsolePanel';
|
|
100
|
+
// Add Console commands.
|
|
92
101
|
let command;
|
|
93
102
|
command = 'console:clear';
|
|
94
103
|
commands.addCommand(command, {
|
|
@@ -121,6 +130,11 @@ class ConsoleAdapter {
|
|
|
121
130
|
},
|
|
122
131
|
});
|
|
123
132
|
commands.addKeyBinding({ command, selector, keys: ['Ctrl Enter'] });
|
|
133
|
+
if (this._code) {
|
|
134
|
+
consolePanel.console.sessionContext.ready.then(() => {
|
|
135
|
+
consolePanel.console.inject(this._code ?? '');
|
|
136
|
+
});
|
|
137
|
+
}
|
|
124
138
|
}
|
|
125
139
|
get panel() {
|
|
126
140
|
return this._panel;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConsoleAdapter.js","sourceRoot":"","sources":["../../../src/components/console/ConsoleAdapter.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"ConsoleAdapter.js","sourceRoot":"","sources":["../../../src/components/console/ConsoleAdapter.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EACL,kBAAkB,EAClB,yBAAyB,IAAI,gBAAgB,GAC9C,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,QAAQ,EACR,uBAAuB,EACvB,yBAAyB,EACzB,sBAAsB,EACtB,uBAAuB,EACvB,mBAAmB,GACpB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAInD,MAAM,oBAAoB,GAAG,cAAc,CAAC;AAE5C,MAAM,cAAc;IACV,MAAM,CAAW;IACjB,KAAK,CAAU;IAEvB,YAAY,OAA8C;QACxD,MAAM,EAAE,MAAM,EAAE,cAAc,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC;QACj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{ jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
/*
|
|
3
|
-
* Copyright (c)
|
|
3
|
+
* Copyright (c) 2021-2023 Datalayer, Inc.
|
|
4
4
|
*
|
|
5
5
|
* MIT License
|
|
6
6
|
*/
|
|
7
7
|
import { useState, useEffect } from 'react';
|
|
8
|
-
import LuminoDetached from '
|
|
8
|
+
import LuminoDetached from '../lumino/LuminoDetached';
|
|
9
9
|
import DialogAdapter from './DialogAdapter';
|
|
10
10
|
export const Dialog = () => {
|
|
11
11
|
const [dialogAdapter, _] = useState(new DialogAdapter());
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dialog.js","sourceRoot":"","sources":["../../../src/components/dialog/Dialog.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;AAEH,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,cAAc,MAAM,
|
|
1
|
+
{"version":3,"file":"Dialog.js","sourceRoot":"","sources":["../../../src/components/dialog/Dialog.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;AAEH,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,cAAc,MAAM,0BAA0B,CAAC;AACtD,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAE5C,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,EAAE;IACzB,MAAM,CAAC,aAAa,EAAE,CAAC,CAAC,GAAG,QAAQ,CAAC,IAAI,aAAa,EAAE,CAAC,CAAC;IACzD,SAAS,CAAC,GAAG,EAAE;QACb,aAAa,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC;IACzD,CAAC,EAAE,EAAE,CAAC,CAAC;IACP,OAAO,KAAC,cAAc,cAAE,aAAa,CAAC,MAAM,GAAkB,CAAC;AACjE,CAAC,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
/*
|
|
3
|
-
* Copyright (c)
|
|
3
|
+
* Copyright (c) 2021-2023 Datalayer, Inc.
|
|
4
4
|
*
|
|
5
5
|
* MIT License
|
|
6
6
|
*/
|
|
7
7
|
import { useState, useEffect } from 'react';
|
|
8
8
|
import { useJupyter } from '../../jupyter/JupyterContext';
|
|
9
9
|
import FileManagerAdapter from './lab/FileManagerAdapter';
|
|
10
|
-
import Lumino from '
|
|
10
|
+
import Lumino from '../lumino/Lumino';
|
|
11
11
|
export const FileManagerJupyterLab = () => {
|
|
12
12
|
const { serviceManager } = useJupyter();
|
|
13
13
|
const [fileManagerAdapter, setFileManagerAdapter] = useState();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileManagerJupyterLab.js","sourceRoot":"","sources":["../../../src/components/filemanager/FileManagerJupyterLab.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;AAEH,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,kBAAkB,MAAM,0BAA0B,CAAC;AAC1D,OAAO,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"FileManagerJupyterLab.js","sourceRoot":"","sources":["../../../src/components/filemanager/FileManagerJupyterLab.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;AAEH,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,kBAAkB,MAAM,0BAA0B,CAAC;AAC1D,OAAO,MAAM,MAAM,kBAAkB,CAAC;AAEtC,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAG,EAAE;IACxC,MAAM,EAAE,cAAc,EAAE,GAAG,UAAU,EAAE,CAAC;IACxC,MAAM,CAAC,kBAAkB,EAAE,qBAAqB,CAAC,GAC/C,QAAQ,EAAsB,CAAC;IACjC,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,cAAc,EAAE;YAClB,MAAM,kBAAkB,GAAG,IAAI,kBAAkB,CAAC,cAAc,CAAC,CAAC;YAClE,qBAAqB,CAAC,kBAAkB,CAAC,CAAC;SAC3C;IACH,CAAC,EAAE,CAAC,cAAc,CAAC,CAAC,CAAC;IACrB,OAAO,kBAAkB,CAAC,CAAC,CAAC,CAC1B,KAAC,MAAM,cAAE,kBAAkB,CAAC,KAAK,GAAU,CAC5C,CAAC,CAAC,CAAC,CACF,mBAAK,CACN,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
|
|
@@ -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 {
|
|
4
|
+
import { ColorMode } from '../../jupyter/lab/JupyterLabColorMode';
|
|
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:
|
|
22
|
+
theme: ColorMode;
|
|
23
23
|
width: string | number;
|
|
24
24
|
};
|
|
25
25
|
export declare const JupyterLabApp: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ColorMode } from '../../jupyter/lab/JupyterLabColorMode';
|
|
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?:
|
|
25
|
+
theme?: ColorMode;
|
|
26
26
|
};
|
|
27
27
|
export declare const JupyterLabAppCss: {
|
|
28
28
|
(props: Props): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import OutputAdapter from '../output/OutputAdapter';
|
|
2
|
+
import Kernel from '../../jupyter/kernel/Kernel';
|
|
3
|
+
type Props = {
|
|
4
|
+
kernel?: Kernel;
|
|
5
|
+
outputAdapter?: OutputAdapter;
|
|
6
|
+
};
|
|
7
|
+
export declare const KernelActionMenu: (props: Props) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default KernelActionMenu;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 2021-2023 Datalayer, Inc.
|
|
4
|
+
*
|
|
5
|
+
* MIT License
|
|
6
|
+
*/
|
|
7
|
+
import { ActionMenu, ActionList, IconButton } from '@primer/react';
|
|
8
|
+
import { KebabHorizontalIcon, StopIcon, PaintbrushIcon, } from '@primer/octicons-react';
|
|
9
|
+
import { RestartIcon } from '@datalayer/icons-react';
|
|
10
|
+
export const KernelActionMenu = (props) => {
|
|
11
|
+
const { kernel, outputAdapter } = props;
|
|
12
|
+
return (_jsxs(ActionMenu, { children: [_jsx(ActionMenu.Anchor, { children: _jsx(IconButton, { "aria-labelledby": "", icon: KebabHorizontalIcon, variant: "invisible" }) }), _jsx(ActionMenu.Overlay, { children: _jsxs(ActionList, { children: [kernel && (_jsxs(ActionList.Item, { onSelect: e => {
|
|
13
|
+
kernel.interrupt();
|
|
14
|
+
}, children: [_jsx(ActionList.LeadingVisual, { children: _jsx(StopIcon, {}) }), "Interrupt kernel"] })), kernel && (_jsxs(ActionList.Item, { onSelect: e => {
|
|
15
|
+
kernel.restart();
|
|
16
|
+
}, children: [_jsx(ActionList.LeadingVisual, { children: _jsx(RestartIcon, {}) }), "Restart kernel"] })), outputAdapter && (_jsxs(ActionList.Item, { variant: "danger", onSelect: e => {
|
|
17
|
+
outputAdapter.clear();
|
|
18
|
+
}, children: [_jsx(ActionList.LeadingVisual, { children: _jsx(PaintbrushIcon, {}) }), "Clear outputs"] }))] }) })] }));
|
|
19
|
+
};
|
|
20
|
+
export default KernelActionMenu;
|
|
21
|
+
//# sourceMappingURL=KernelActionMenu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KernelActionMenu.js","sourceRoot":"","sources":["../../../src/components/kernel/KernelActionMenu.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;AAEH,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AACnE,OAAO,EACL,mBAAmB,EACnB,QAAQ,EACR,cAAc,GACf,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AASrD,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,KAAY,EAAE,EAAE;IAC/C,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,GAAG,KAAK,CAAC;IACxC,OAAO,CACL,MAAC,UAAU,eACT,KAAC,UAAU,CAAC,MAAM,cAChB,KAAC,UAAU,uBACO,EAAE,EAClB,IAAI,EAAE,mBAAmB,EACzB,OAAO,EAAC,WAAW,GACnB,GACgB,EACpB,KAAC,UAAU,CAAC,OAAO,cACjB,MAAC,UAAU,eACR,MAAM,IAAI,CACT,MAAC,UAAU,CAAC,IAAI,IACd,QAAQ,EAAE,CAAC,CAAC,EAAE;gCACZ,MAAM,CAAC,SAAS,EAAE,CAAC;4BACrB,CAAC,aAED,KAAC,UAAU,CAAC,aAAa,cACvB,KAAC,QAAQ,KAAG,GACa,wBAEX,CACnB,EACA,MAAM,IAAI,CACT,MAAC,UAAU,CAAC,IAAI,IACd,QAAQ,EAAE,CAAC,CAAC,EAAE;gCACZ,MAAM,CAAC,OAAO,EAAE,CAAC;4BACnB,CAAC,aAED,KAAC,UAAU,CAAC,aAAa,cACvB,KAAC,WAAW,KAAG,GACU,sBAEX,CACnB,EACA,aAAa,IAAI,CAChB,MAAC,UAAU,CAAC,IAAI,IACd,OAAO,EAAC,QAAQ,EAChB,QAAQ,EAAE,CAAC,CAAC,EAAE;gCACZ,aAAa,CAAC,KAAK,EAAE,CAAC;4BACxB,CAAC,aAED,KAAC,UAAU,CAAC,aAAa,cACvB,KAAC,cAAc,KAAG,GACO,qBAEX,CACnB,IACU,GACM,IACV,CACd,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 2021-2023 Datalayer, Inc.
|
|
4
|
+
*
|
|
5
|
+
* MIT License
|
|
6
|
+
*/
|
|
7
|
+
import { useState, useEffect } from 'react';
|
|
8
|
+
import Lumino from '../lumino/Lumino';
|
|
9
|
+
import { KernelSpyView } from './inspector/widget';
|
|
10
|
+
import { Box } from '@primer/react';
|
|
11
|
+
export const KernelInspector = (props) => {
|
|
12
|
+
const { kernel } = props;
|
|
13
|
+
const [kernelSpyView, setKernelSpyView] = useState();
|
|
14
|
+
useEffect(() => {
|
|
15
|
+
kernel?.ready.then(() => {
|
|
16
|
+
const kernelSpyView = new KernelSpyView(kernel?.connection);
|
|
17
|
+
setKernelSpyView(kernelSpyView);
|
|
18
|
+
});
|
|
19
|
+
}, [kernel]);
|
|
20
|
+
return kernelSpyView ? (_jsx(Box, { sx: {
|
|
21
|
+
'& dla-KernelInspector-view': {
|
|
22
|
+
height: '1000px',
|
|
23
|
+
},
|
|
24
|
+
'& .dla-KernelInspector-messagelog': {
|
|
25
|
+
height: '100px',
|
|
26
|
+
minHeight: '100px',
|
|
27
|
+
},
|
|
28
|
+
}, children: _jsx(Lumino, { children: kernelSpyView }) })) : (_jsx(_Fragment, {}));
|
|
29
|
+
};
|
|
30
|
+
export default KernelInspector;
|
|
31
|
+
//# sourceMappingURL=KernelInspector.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KernelInspector.js","sourceRoot":"","sources":["../../../src/components/kernel/KernelInspector.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;AAEH,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,MAAM,MAAM,kBAAkB,CAAC;AAEtC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AAMpC,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,KAAY,EAAE,EAAE;IAC9C,MAAM,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;IACzB,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,QAAQ,EAAiB,CAAC;IACpE,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,EAAE,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE;YACtB,MAAM,aAAa,GAAG,IAAI,aAAa,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;YAC5D,gBAAgB,CAAC,aAAa,CAAC,CAAC;QAClC,CAAC,CAAC,CAAC;IACL,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;IACb,OAAO,aAAa,CAAC,CAAC,CAAC,CACrB,KAAC,GAAG,IACF,EAAE,EAAE;YACF,4BAA4B,EAAE;gBAC5B,MAAM,EAAE,QAAQ;aACjB;YACD,mCAAmC,EAAE;gBACnC,MAAM,EAAE,OAAO;gBACf,SAAS,EAAE,OAAO;aACnB;SACF,YAED,KAAC,MAAM,cAAE,aAAa,GAAU,GAC5B,CACP,CAAC,CAAC,CAAC,CACF,mBAAK,CACN,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 2021-2023 Datalayer, Inc.
|
|
4
|
+
*
|
|
5
|
+
* MIT License
|
|
6
|
+
*/
|
|
7
|
+
export const KernelLauncher = () => {
|
|
8
|
+
return _jsx(_Fragment, {});
|
|
9
|
+
};
|
|
10
|
+
export default KernelLauncher;
|
|
11
|
+
//# sourceMappingURL=KernelLauncher.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KernelLauncher.js","sourceRoot":"","sources":["../../../src/components/kernel/KernelLauncher.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;AAEH,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,EAAE;IACjC,OAAO,mBAAK,CAAC;AACf,CAAC,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 2021-2023 Datalayer, Inc.
|
|
4
|
+
*
|
|
5
|
+
* MIT License
|
|
6
|
+
*/
|
|
7
|
+
export const KernelLogs = () => {
|
|
8
|
+
return _jsx(_Fragment, {});
|
|
9
|
+
};
|
|
10
|
+
export default KernelLogs;
|
|
11
|
+
//# sourceMappingURL=KernelLogs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KernelLogs.js","sourceRoot":"","sources":["../../../src/components/kernel/KernelLogs.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;AAEH,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,EAAE;IAC7B,OAAO,mBAAK,CAAC;AACf,CAAC,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 2021-2023 Datalayer, Inc.
|
|
4
|
+
*
|
|
5
|
+
* MIT License
|
|
6
|
+
*/
|
|
7
|
+
import { useState, useEffect } from 'react';
|
|
8
|
+
import { ProgressBar } from '@primer/react';
|
|
9
|
+
export const KernelProgressBar = () => {
|
|
10
|
+
const [progress, setProgress] = useState(0);
|
|
11
|
+
useEffect(() => {
|
|
12
|
+
const interval = setInterval(() => {
|
|
13
|
+
setProgress((oldValue) => {
|
|
14
|
+
let newValue = oldValue + 1;
|
|
15
|
+
if (newValue > 100) {
|
|
16
|
+
newValue = 0;
|
|
17
|
+
}
|
|
18
|
+
return newValue;
|
|
19
|
+
});
|
|
20
|
+
}, 100);
|
|
21
|
+
return () => clearInterval(interval);
|
|
22
|
+
}, []);
|
|
23
|
+
return _jsx(ProgressBar, { progress: progress, barSize: "small" });
|
|
24
|
+
};
|
|
25
|
+
export default KernelProgressBar;
|
|
26
|
+
//# sourceMappingURL=KernelProgressBar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KernelProgressBar.js","sourceRoot":"","sources":["../../../src/components/kernel/KernelProgressBar.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;AAEH,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,EAAE;IACpC,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IAC5C,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,QAAQ,GAAG,WAAW,CAAC,GAAG,EAAE;YAChC,WAAW,CAAC,CAAC,QAAgB,EAAE,EAAE;gBAC/B,IAAI,QAAQ,GAAG,QAAQ,GAAG,CAAC,CAAC;gBAC5B,IAAI,QAAQ,GAAG,GAAG,EAAE;oBAClB,QAAQ,GAAG,CAAC,CAAC;iBACd;gBACD,OAAO,QAAQ,CAAC;YAClB,CAAC,CAAC,CAAC;QACL,CAAC,EAAE,GAAG,CAAC,CAAC;QACR,OAAO,GAAG,EAAE,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;IACvC,CAAC,EAAE,EAAE,CAAC,CAAC;IACP,OAAO,KAAC,WAAW,IAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAC,OAAO,GAAG,CAAC;AAC7D,CAAC,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IModel } from '@jupyterlab/services/lib/kernel/kernel';
|
|
2
|
+
import { ISpecModel } from '@jupyterlab/services/lib/kernelspec/kernelspec';
|
|
3
|
+
type Props = {
|
|
4
|
+
selectKernel: (kernelModel: IModel) => void;
|
|
5
|
+
selectKernelSpec: (kernelSpecModel: ISpecModel) => void;
|
|
6
|
+
};
|
|
7
|
+
export declare const KernelSelector: (props: Props) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default KernelSelector;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 2021-2023 Datalayer, Inc.
|
|
4
|
+
*
|
|
5
|
+
* MIT License
|
|
6
|
+
*/
|
|
7
|
+
import { useState, useEffect } from 'react';
|
|
8
|
+
import { ActionMenu, ActionList, IconButton } from '@primer/react';
|
|
9
|
+
import { JupyterKernelIcon, JupyterKernelGalileoIcon, } from '@datalayer/icons-react';
|
|
10
|
+
import { useJupyter } from '../../jupyter/JupyterContext';
|
|
11
|
+
export const KernelSelector = (props) => {
|
|
12
|
+
const { selectKernel, selectKernelSpec } = props;
|
|
13
|
+
const { serviceManager } = useJupyter();
|
|
14
|
+
const [kernels, setKernels] = useState();
|
|
15
|
+
const [kernelSpecs, setKernelSpecs] = useState();
|
|
16
|
+
useEffect(() => {
|
|
17
|
+
serviceManager?.ready.then(() => {
|
|
18
|
+
serviceManager.kernelspecs.refreshSpecs().then(() => {
|
|
19
|
+
const kernelSpecs = serviceManager.kernelspecs.specs?.kernelspecs;
|
|
20
|
+
setKernelSpecs(kernelSpecs);
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
serviceManager?.kernels.refreshRunning().then(() => {
|
|
24
|
+
const kernels = Array.from(serviceManager.kernels.running());
|
|
25
|
+
setKernels(kernels);
|
|
26
|
+
});
|
|
27
|
+
}, [serviceManager]);
|
|
28
|
+
return (_jsx(_Fragment, { children: _jsxs(ActionMenu, { children: [_jsx(ActionMenu.Anchor, { children: _jsx(IconButton, { "aria-labelledby": "", icon: JupyterKernelGalileoIcon, variant: "invisible" }) }), _jsx(ActionMenu.Overlay, { width: "large", children: _jsxs(ActionList, { showDividers: true, children: [kernels && (_jsx(ActionList.Group, { title: "Connect to a running Kernel", children: kernels.map(kernel => {
|
|
29
|
+
return (_jsxs(ActionList.Item, { onSelect: e => {
|
|
30
|
+
selectKernel(kernel);
|
|
31
|
+
}, children: [_jsx(ActionList.LeadingVisual, { children: _jsx(JupyterKernelIcon, {}) }), kernel.name, _jsx(ActionList.Description, { variant: "block", children: kernel.id })] }));
|
|
32
|
+
}) })), _jsx(ActionList.Group, { title: "Launch a new Kernel", children: kernelSpecs &&
|
|
33
|
+
Object.values(kernelSpecs).map(specModel => {
|
|
34
|
+
return (_jsxs(ActionList.Item, { onSelect: e => {
|
|
35
|
+
selectKernelSpec(specModel);
|
|
36
|
+
}, children: [_jsx(ActionList.LeadingVisual, { children: _jsx(JupyterKernelGalileoIcon, {}) }), specModel?.name, _jsx(ActionList.Description, { variant: "block", children: specModel?.display_name })] }));
|
|
37
|
+
}) })] }) })] }) }));
|
|
38
|
+
};
|
|
39
|
+
export default KernelSelector;
|
|
40
|
+
//# sourceMappingURL=KernelSelector.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KernelSelector.js","sourceRoot":"","sources":["../../../src/components/kernel/KernelSelector.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;AAEH,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AACnE,OAAO,EACL,iBAAiB,EACjB,wBAAwB,GACzB,MAAM,wBAAwB,CAAC;AAGhC,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAa1D,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,KAAY,EAAE,EAAE;IAC7C,MAAM,EAAE,YAAY,EAAE,gBAAgB,EAAE,GAAG,KAAK,CAAC;IACjD,MAAM,EAAE,cAAc,EAAE,GAAG,UAAU,EAAE,CAAC;IACxC,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,EAAY,CAAC;IACnD,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,EAAe,CAAC;IAC9D,SAAS,CAAC,GAAG,EAAE;QACb,cAAc,EAAE,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE;YAC9B,cAAc,CAAC,WAAW,CAAC,YAAY,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE;gBAClD,MAAM,WAAW,GAAG,cAAc,CAAC,WAAW,CAAC,KAAK,EAAE,WAAW,CAAC;gBAClE,cAAc,CAAC,WAAW,CAAC,CAAC;YAC9B,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;QACH,cAAc,EAAE,OAAO,CAAC,cAAc,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE;YACjD,MAAM,OAAO,GAAG,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,OAAO,EAAE,CA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O,EAAC,OAAO,YACpC,SAAS,EAAE,YAAY,GACD,IACT,CACnB,CAAC;oCACJ,CAAC,CAAC,GACa,IACR,GACM,IACV,GACZ,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import Kernel from '../../jupyter/kernel/Kernel';
|
|
3
|
+
type KernelState = string;
|
|
4
|
+
/**
|
|
5
|
+
* The valid kernel connection states.
|
|
6
|
+
*
|
|
7
|
+
* #### Notes
|
|
8
|
+
* The status states are:
|
|
9
|
+
* * `connected`: The kernel connection is live.
|
|
10
|
+
* * `connecting`: The kernel connection is not live, but we are attempting
|
|
11
|
+
* to reconnect to the kernel.
|
|
12
|
+
* * `disconnected`: The kernel connection is permanently down, we will not
|
|
13
|
+
* try to reconnect.
|
|
14
|
+
*
|
|
15
|
+
* When a kernel connection is `connected`, the kernel status should be
|
|
16
|
+
* valid. When a kernel connection is either `connecting` or `disconnected`,
|
|
17
|
+
* the kernel status will be `unknown` unless the kernel status was `dead`,
|
|
18
|
+
* in which case it stays `dead`.
|
|
19
|
+
*
|
|
20
|
+
* Status = 'unknown' | 'starting' | 'idle' | 'busy' | 'terminating' | 'restarting' | 'autorestarting' | 'dead';
|
|
21
|
+
*/
|
|
22
|
+
export declare const KERNEL_STATES: Map<KernelState, ReactElement>;
|
|
23
|
+
type Props = {
|
|
24
|
+
kernel?: Kernel;
|
|
25
|
+
};
|
|
26
|
+
export declare const KernelStatus: (props: Props) => import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
export default KernelStatus;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 2021-2023 Datalayer, Inc.
|
|
4
|
+
*
|
|
5
|
+
* MIT License
|
|
6
|
+
*/
|
|
7
|
+
import { useState, useEffect } from 'react';
|
|
8
|
+
import { Tooltip } from '@primer/react';
|
|
9
|
+
import { CircleYellowIcon, CircleGreenIcon, CircleBlackIcon, CircleBrownIcon, CircleHollowRedIcon, CircleOrangeIcon, CirclePurpleIcon, CircleRedIcon, CircleWhiteIcon, CircledMIcon, SquareWhiteLargeIcon, } from '@datalayer/icons-react';
|
|
10
|
+
/**
|
|
11
|
+
* The valid kernel connection states.
|
|
12
|
+
*
|
|
13
|
+
* #### Notes
|
|
14
|
+
* The status states are:
|
|
15
|
+
* * `connected`: The kernel connection is live.
|
|
16
|
+
* * `connecting`: The kernel connection is not live, but we are attempting
|
|
17
|
+
* to reconnect to the kernel.
|
|
18
|
+
* * `disconnected`: The kernel connection is permanently down, we will not
|
|
19
|
+
* try to reconnect.
|
|
20
|
+
*
|
|
21
|
+
* When a kernel connection is `connected`, the kernel status should be
|
|
22
|
+
* valid. When a kernel connection is either `connecting` or `disconnected`,
|
|
23
|
+
* the kernel status will be `unknown` unless the kernel status was `dead`,
|
|
24
|
+
* in which case it stays `dead`.
|
|
25
|
+
*
|
|
26
|
+
* Status = 'unknown' | 'starting' | 'idle' | 'busy' | 'terminating' | 'restarting' | 'autorestarting' | 'dead';
|
|
27
|
+
*/
|
|
28
|
+
export const KERNEL_STATES = new Map([
|
|
29
|
+
['connecting', _jsx(CircleBlackIcon, {})],
|
|
30
|
+
['connected-unknown', _jsx(CircledMIcon, {})],
|
|
31
|
+
['connected-starting', _jsx(CircleYellowIcon, {})],
|
|
32
|
+
['connected-idle', _jsx(CircleGreenIcon, {})],
|
|
33
|
+
['connected-busy', _jsx(CircleOrangeIcon, {})],
|
|
34
|
+
['connected-terminating', _jsx(CircleWhiteIcon, {})],
|
|
35
|
+
['connected-restarting', _jsx(CirclePurpleIcon, {})],
|
|
36
|
+
['connected-autorestarting', _jsx(CircleHollowRedIcon, {})],
|
|
37
|
+
['connected-dead', _jsx(CircleRedIcon, {})],
|
|
38
|
+
['disconnecting', _jsx(CircleBrownIcon, {})],
|
|
39
|
+
['undefined', _jsx(SquareWhiteLargeIcon, {})],
|
|
40
|
+
]);
|
|
41
|
+
export const KernelStatus = (props) => {
|
|
42
|
+
const { kernel } = props;
|
|
43
|
+
const [connectionStatus, setConnectionStatus] = useState();
|
|
44
|
+
const [status, setStatus] = useState();
|
|
45
|
+
const toState = (connectionStatus, status) => {
|
|
46
|
+
if (connectionStatus === 'connecting' ||
|
|
47
|
+
connectionStatus === 'disconnected') {
|
|
48
|
+
return connectionStatus;
|
|
49
|
+
}
|
|
50
|
+
return connectionStatus + '-' + status;
|
|
51
|
+
};
|
|
52
|
+
useEffect(() => {
|
|
53
|
+
if (kernel && kernel.connection) {
|
|
54
|
+
setConnectionStatus(kernel.connection?.connectionStatus);
|
|
55
|
+
setStatus(kernel.connection?.status);
|
|
56
|
+
kernel.connection.connectionStatusChanged.connect((_, connectionStatus) => {
|
|
57
|
+
setConnectionStatus(connectionStatus);
|
|
58
|
+
});
|
|
59
|
+
kernel.connection.statusChanged.connect((_, status) => {
|
|
60
|
+
setStatus(status);
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
}, [kernel, kernel?.connection]);
|
|
64
|
+
return connectionStatus && status ? (_jsx(Tooltip, { "aria-label": `${connectionStatus} - ${status}`, children: KERNEL_STATES.get(toState(connectionStatus, status)) })) : (_jsx(Tooltip, { "aria-label": "Undefined state", children: KERNEL_STATES.get('undefined') }));
|
|
65
|
+
};
|
|
66
|
+
export default KernelStatus;
|
|
67
|
+
//# sourceMappingURL=KernelStatus.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KernelStatus.js","sourceRoot":"","sources":["../../../src/components/kernel/KernelStatus.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;AAEH,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAgB,MAAM,OAAO,CAAC;AAC1D,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EACL,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,eAAe,E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