@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
|
@@ -0,0 +1,349 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2021-2023 Datalayer, Inc.
|
|
3
|
+
*
|
|
4
|
+
* MIT License
|
|
5
|
+
*/
|
|
6
|
+
class Languages {
|
|
7
|
+
/**
|
|
8
|
+
* Init and query script for supported languages.
|
|
9
|
+
*/
|
|
10
|
+
static py_script = `import json
|
|
11
|
+
import sys
|
|
12
|
+
from importlib import __import__
|
|
13
|
+
from IPython import get_ipython
|
|
14
|
+
from IPython.core.magics.namespace import NamespaceMagics
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
_jupyterlab_variableinspector_nms = NamespaceMagics()
|
|
18
|
+
_jupyterlab_variableinspector_Jupyter = get_ipython()
|
|
19
|
+
_jupyterlab_variableinspector_nms.shell = _jupyterlab_variableinspector_Jupyter.kernel.shell
|
|
20
|
+
|
|
21
|
+
__np = None
|
|
22
|
+
__pd = None
|
|
23
|
+
__pyspark = None
|
|
24
|
+
__tf = None
|
|
25
|
+
__K = None
|
|
26
|
+
__torch = None
|
|
27
|
+
__ipywidgets = None
|
|
28
|
+
__xr = None
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def _attempt_import(module):
|
|
32
|
+
try:
|
|
33
|
+
return __import__(module)
|
|
34
|
+
except ImportError:
|
|
35
|
+
return None
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
def _check_imported():
|
|
39
|
+
global __np, __pd, __pyspark, __tf, __K, __torch, __ipywidgets, __xr
|
|
40
|
+
|
|
41
|
+
__np = _attempt_import('numpy')
|
|
42
|
+
__pd = _attempt_import('pandas')
|
|
43
|
+
__pyspark = _attempt_import('pyspark')
|
|
44
|
+
__tf = _attempt_import('tensorflow')
|
|
45
|
+
__K = _attempt_import('keras.backend') or _attempt_import('tensorflow.keras.backend')
|
|
46
|
+
__torch = _attempt_import('torch')
|
|
47
|
+
__ipywidgets = _attempt_import('ipywidgets')
|
|
48
|
+
__xr = _attempt_import('xarray')
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
def _jupyterlab_variableinspector_getsizeof(x):
|
|
52
|
+
if type(x).__name__ in ['ndarray', 'Series']:
|
|
53
|
+
return x.nbytes
|
|
54
|
+
elif __pyspark and isinstance(x, __pyspark.sql.DataFrame):
|
|
55
|
+
return "?"
|
|
56
|
+
elif __tf and isinstance(x, __tf.Variable):
|
|
57
|
+
return "?"
|
|
58
|
+
elif __torch and isinstance(x, __torch.Tensor):
|
|
59
|
+
return x.element_size() * x.nelement()
|
|
60
|
+
elif __pd and type(x).__name__ == 'DataFrame':
|
|
61
|
+
return x.memory_usage().sum()
|
|
62
|
+
else:
|
|
63
|
+
return sys.getsizeof(x)
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
def _jupyterlab_variableinspector_getshapeof(x):
|
|
67
|
+
if __pd and isinstance(x, __pd.DataFrame):
|
|
68
|
+
return "%d rows x %d cols" % x.shape
|
|
69
|
+
if __pd and isinstance(x, __pd.Series):
|
|
70
|
+
return "%d rows" % x.shape
|
|
71
|
+
if __np and isinstance(x, __np.ndarray):
|
|
72
|
+
shape = " x ".join([str(i) for i in x.shape])
|
|
73
|
+
return "%s" % shape
|
|
74
|
+
if __pyspark and isinstance(x, __pyspark.sql.DataFrame):
|
|
75
|
+
return "? rows x %d cols" % len(x.columns)
|
|
76
|
+
if __tf and isinstance(x, __tf.Variable):
|
|
77
|
+
shape = " x ".join([str(int(i)) for i in x.shape])
|
|
78
|
+
return "%s" % shape
|
|
79
|
+
if __tf and isinstance(x, __tf.Tensor):
|
|
80
|
+
shape = " x ".join([str(int(i)) for i in x.shape])
|
|
81
|
+
return "%s" % shape
|
|
82
|
+
if __torch and isinstance(x, __torch.Tensor):
|
|
83
|
+
shape = " x ".join([str(int(i)) for i in x.shape])
|
|
84
|
+
return "%s" % shape
|
|
85
|
+
if __xr and isinstance(x, __xr.DataArray):
|
|
86
|
+
shape = " x ".join([str(int(i)) for i in x.shape])
|
|
87
|
+
return "%s" % shape
|
|
88
|
+
if isinstance(x, list):
|
|
89
|
+
return "%s" % len(x)
|
|
90
|
+
if isinstance(x, dict):
|
|
91
|
+
return "%s keys" % len(x)
|
|
92
|
+
return None
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
def _jupyterlab_variableinspector_getcontentof(x):
|
|
96
|
+
# returns content in a friendly way for python variables
|
|
97
|
+
# pandas and numpy
|
|
98
|
+
if __pd and isinstance(x, __pd.DataFrame):
|
|
99
|
+
colnames = ', '.join(x.columns.map(str))
|
|
100
|
+
content = "Columns: %s" % colnames
|
|
101
|
+
elif __pd and isinstance(x, __pd.Series):
|
|
102
|
+
content = str(x.values).replace(" ", ", ")[1:-1]
|
|
103
|
+
content = content.replace("\\n", "")
|
|
104
|
+
elif __np and isinstance(x, __np.ndarray):
|
|
105
|
+
content = x.__repr__()
|
|
106
|
+
elif __xr and isinstance(x, __xr.DataArray):
|
|
107
|
+
content = x.values.__repr__()
|
|
108
|
+
else:
|
|
109
|
+
content = str(x)
|
|
110
|
+
|
|
111
|
+
if len(content) > 150:
|
|
112
|
+
return content[:150] + " ..."
|
|
113
|
+
else:
|
|
114
|
+
return content
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
def _jupyterlab_variableinspector_is_matrix(x):
|
|
118
|
+
# True if type(x).__name__ in ["DataFrame", "ndarray", "Series"] else False
|
|
119
|
+
if __pd and isinstance(x, __pd.DataFrame):
|
|
120
|
+
return True
|
|
121
|
+
if __pd and isinstance(x, __pd.Series):
|
|
122
|
+
return True
|
|
123
|
+
if __np and isinstance(x, __np.ndarray) and len(x.shape) <= 2:
|
|
124
|
+
return True
|
|
125
|
+
if __pyspark and isinstance(x, __pyspark.sql.DataFrame):
|
|
126
|
+
return True
|
|
127
|
+
if __tf and isinstance(x, __tf.Variable) and len(x.shape) <= 2:
|
|
128
|
+
return True
|
|
129
|
+
if __tf and isinstance(x, __tf.Tensor) and len(x.shape) <= 2:
|
|
130
|
+
return True
|
|
131
|
+
if __torch and isinstance(x, __torch.Tensor) and len(x.shape) <= 2:
|
|
132
|
+
return True
|
|
133
|
+
if __xr and isinstance(x, __xr.DataArray) and len(x.shape) <= 2:
|
|
134
|
+
return True
|
|
135
|
+
if isinstance(x, list):
|
|
136
|
+
return True
|
|
137
|
+
return False
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
def _jupyterlab_variableinspector_is_widget(x):
|
|
141
|
+
return __ipywidgets and issubclass(x, __ipywidgets.DOMWidget)
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
def _jupyterlab_variableinspector_dict_list():
|
|
145
|
+
_check_imported()
|
|
146
|
+
def keep_cond(v):
|
|
147
|
+
try:
|
|
148
|
+
obj = eval(v)
|
|
149
|
+
if isinstance(obj, str):
|
|
150
|
+
return True
|
|
151
|
+
if __tf and isinstance(obj, __tf.Variable):
|
|
152
|
+
return True
|
|
153
|
+
if __pd and __pd is not None and (
|
|
154
|
+
isinstance(obj, __pd.core.frame.DataFrame)
|
|
155
|
+
or isinstance(obj, __pd.core.series.Series)):
|
|
156
|
+
return True
|
|
157
|
+
if __xr and __xr is not None and isinstance(obj, __xr.DataArray):
|
|
158
|
+
return True
|
|
159
|
+
if str(obj)[0] == "<":
|
|
160
|
+
return False
|
|
161
|
+
if v in ['__np', '__pd', '__pyspark', '__tf', '__K', '__torch', '__ipywidgets', '__xr']:
|
|
162
|
+
return obj is not None
|
|
163
|
+
if str(obj).startswith("_Feature"):
|
|
164
|
+
# removes tf/keras objects
|
|
165
|
+
return False
|
|
166
|
+
return True
|
|
167
|
+
except:
|
|
168
|
+
return False
|
|
169
|
+
values = _jupyterlab_variableinspector_nms.who_ls()
|
|
170
|
+
vardic = [
|
|
171
|
+
{
|
|
172
|
+
'varName': _v,
|
|
173
|
+
'varType': type(eval(_v)).__name__,
|
|
174
|
+
'varSize': str(_jupyterlab_variableinspector_getsizeof(eval(_v))),
|
|
175
|
+
'varShape': str(_jupyterlab_variableinspector_getshapeof(eval(_v))) if _jupyterlab_variableinspector_getshapeof(eval(_v)) else '',
|
|
176
|
+
'varContent': str(_jupyterlab_variableinspector_getcontentof(eval(_v))),
|
|
177
|
+
'isMatrix': _jupyterlab_variableinspector_is_matrix(eval(_v)),
|
|
178
|
+
'isWidget': _jupyterlab_variableinspector_is_widget(type(eval(_v)))
|
|
179
|
+
}
|
|
180
|
+
for _v in values if keep_cond(_v)
|
|
181
|
+
]
|
|
182
|
+
return json.dumps(vardic, ensure_ascii=False)
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
def _jupyterlab_variableinspector_getmatrixcontent(x, max_rows=10000):
|
|
186
|
+
# to do: add something to handle this in the future
|
|
187
|
+
threshold = max_rows
|
|
188
|
+
|
|
189
|
+
if __pd and __pyspark and isinstance(x, __pyspark.sql.DataFrame):
|
|
190
|
+
df = x.limit(threshold).toPandas()
|
|
191
|
+
return _jupyterlab_variableinspector_getmatrixcontent(df.copy())
|
|
192
|
+
elif __np and __pd and type(x).__name__ == "DataFrame":
|
|
193
|
+
if threshold is not None:
|
|
194
|
+
x = x.head(threshold)
|
|
195
|
+
x.columns = x.columns.map(str)
|
|
196
|
+
return x.to_json(orient="table", default_handler=_jupyterlab_variableinspector_default, force_ascii=False)
|
|
197
|
+
elif __np and __pd and type(x).__name__ == "Series":
|
|
198
|
+
if threshold is not None:
|
|
199
|
+
x = x.head(threshold)
|
|
200
|
+
return x.to_json(orient="table", default_handler=_jupyterlab_variableinspector_default, force_ascii=False)
|
|
201
|
+
elif __np and __pd and type(x).__name__ == "ndarray":
|
|
202
|
+
df = __pd.DataFrame(x)
|
|
203
|
+
return _jupyterlab_variableinspector_getmatrixcontent(df)
|
|
204
|
+
elif __tf and (isinstance(x, __tf.Variable) or isinstance(x, __tf.Tensor)):
|
|
205
|
+
df = __K.get_value(x)
|
|
206
|
+
return _jupyterlab_variableinspector_getmatrixcontent(df)
|
|
207
|
+
elif __torch and isinstance(x, __torch.Tensor):
|
|
208
|
+
df = x.cpu().numpy()
|
|
209
|
+
return _jupyterlab_variableinspector_getmatrixcontent(df)
|
|
210
|
+
elif __xr and isinstance(x, __xr.DataArray):
|
|
211
|
+
df = x.to_numpy()
|
|
212
|
+
return _jupyterlab_variableinspector_getmatrixcontent(df)
|
|
213
|
+
elif isinstance(x, list):
|
|
214
|
+
s = __pd.Series(x)
|
|
215
|
+
return _jupyterlab_variableinspector_getmatrixcontent(s)
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
def _jupyterlab_variableinspector_displaywidget(widget):
|
|
219
|
+
display(widget)
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
def _jupyterlab_variableinspector_default(o):
|
|
223
|
+
if isinstance(o, __np.number): return int(o)
|
|
224
|
+
raise TypeError
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
def _jupyterlab_variableinspector_deletevariable(x):
|
|
228
|
+
exec("del %s" % x, globals())
|
|
229
|
+
`;
|
|
230
|
+
static r_script = `library(repr)
|
|
231
|
+
|
|
232
|
+
.ls.objects = function (pos = 1, pattern, order.by, decreasing = FALSE, head = FALSE,
|
|
233
|
+
n = 5)
|
|
234
|
+
{
|
|
235
|
+
napply <- function(names, fn) sapply(names, function(x) fn(get(x,
|
|
236
|
+
pos = pos)))
|
|
237
|
+
names <- ls(pos = pos, pattern = pattern)
|
|
238
|
+
if (length(names) == 0) {
|
|
239
|
+
return(jsonlite::toJSON(data.frame()))
|
|
240
|
+
}
|
|
241
|
+
obj.class <- napply(names, function(x) as.character(class(x))[1])
|
|
242
|
+
obj.mode <- napply(names, mode)
|
|
243
|
+
obj.type <- ifelse(is.na(obj.class), obj.mode, obj.class)
|
|
244
|
+
obj.size <- napply(names, object.size)
|
|
245
|
+
obj.dim <- t(napply(names, function(x) as.numeric(dim(x))[1:2]))
|
|
246
|
+
obj.content <- rep("NA", length(names))
|
|
247
|
+
has_no_dim <- is.na(obj.dim)[1:length(names)]
|
|
248
|
+
obj.dim[has_no_dim, 1] <- napply(names, length)[has_no_dim]
|
|
249
|
+
vec <- (obj.type != "function")
|
|
250
|
+
obj.content[vec] <- napply(names[vec], function(x) toString(x, width = 154)[1])
|
|
251
|
+
|
|
252
|
+
obj.rownames <- napply(names, rownames)
|
|
253
|
+
has_rownames <- obj.rownames != "NULL"
|
|
254
|
+
obj.rownames <- sapply(obj.rownames[has_rownames], function(x) paste(x,
|
|
255
|
+
collapse=", "))
|
|
256
|
+
obj.rownames.short <- sapply(obj.rownames, function(x) paste(substr(x, 1, 150), "...."))
|
|
257
|
+
obj.rownames <- ifelse(nchar(obj.rownames) > 154, obj.rownames.short, obj.rownames)
|
|
258
|
+
obj.rownames <- sapply(obj.rownames, function(x) paste("Row names: ",x))
|
|
259
|
+
obj.content[has_rownames] <- obj.rownames
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
obj.colnames <- napply(names, colnames)
|
|
263
|
+
has_colnames <- obj.colnames != "NULL"
|
|
264
|
+
obj.colnames <- sapply(obj.colnames[has_colnames], function(x) paste(x,
|
|
265
|
+
collapse = ", "))
|
|
266
|
+
obj.colnames.short <- sapply(obj.colnames, function(x) paste(substr(x,
|
|
267
|
+
1, 150), "...."))
|
|
268
|
+
obj.colnames <- ifelse(nchar(obj.colnames) > 154, obj.colnames.short,
|
|
269
|
+
obj.colnames)
|
|
270
|
+
obj.colnames <- sapply(obj.colnames, function(x) paste("Column names: ",x))
|
|
271
|
+
|
|
272
|
+
obj.content[has_colnames] <- obj.colnames
|
|
273
|
+
|
|
274
|
+
is_function <- (obj.type == "function")
|
|
275
|
+
obj.content[is_function] <- napply(names[is_function], function(x) paste(strsplit(repr_text(x),")")[[1]][1],")",sep=""))
|
|
276
|
+
obj.content <- unlist(obj.content, use.names = FALSE)
|
|
277
|
+
|
|
278
|
+
|
|
279
|
+
out <- data.frame(obj.type, obj.size, obj.dim)
|
|
280
|
+
names(out) <- c("varType", "varSize", "Rows", "Columns")
|
|
281
|
+
out$varShape <- paste(out$Rows, " x ", out$Columns)
|
|
282
|
+
out$varContent <- obj.content
|
|
283
|
+
out$isMatrix <- FALSE
|
|
284
|
+
out$varName <- row.names(out)
|
|
285
|
+
out <- out[, !(names(out) %in% c("Rows", "Columns"))]
|
|
286
|
+
rownames(out) <- NULL
|
|
287
|
+
print(out)
|
|
288
|
+
if (!missing(order.by))
|
|
289
|
+
out <- out[order(out[[order.by]], decreasing = decreasing),
|
|
290
|
+
]
|
|
291
|
+
if (head)
|
|
292
|
+
out <- head(out, n)
|
|
293
|
+
jsonlite::toJSON(out)
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
.deleteVariable <- function(x) {
|
|
297
|
+
remove(list=c(x), envir=.GlobalEnv)
|
|
298
|
+
}
|
|
299
|
+
`;
|
|
300
|
+
static scripts = {
|
|
301
|
+
python3: {
|
|
302
|
+
initScript: Languages.py_script,
|
|
303
|
+
queryCommand: '_jupyterlab_variableinspector_dict_list()',
|
|
304
|
+
matrixQueryCommand: '_jupyterlab_variableinspector_getmatrixcontent',
|
|
305
|
+
widgetQueryCommand: '_jupyterlab_variableinspector_displaywidget',
|
|
306
|
+
deleteCommand: '_jupyterlab_variableinspector_deletevariable',
|
|
307
|
+
},
|
|
308
|
+
python2: {
|
|
309
|
+
initScript: Languages.py_script,
|
|
310
|
+
queryCommand: '_jupyterlab_variableinspector_dict_list()',
|
|
311
|
+
matrixQueryCommand: '_jupyterlab_variableinspector_getmatrixcontent',
|
|
312
|
+
widgetQueryCommand: '_jupyterlab_variableinspector_displaywidget',
|
|
313
|
+
deleteCommand: '_jupyterlab_variableinspector_deletevariable',
|
|
314
|
+
},
|
|
315
|
+
python: {
|
|
316
|
+
initScript: Languages.py_script,
|
|
317
|
+
queryCommand: '_jupyterlab_variableinspector_dict_list()',
|
|
318
|
+
matrixQueryCommand: '_jupyterlab_variableinspector_getmatrixcontent',
|
|
319
|
+
widgetQueryCommand: '_jupyterlab_variableinspector_displaywidget',
|
|
320
|
+
deleteCommand: '_jupyterlab_variableinspector_deletevariable',
|
|
321
|
+
},
|
|
322
|
+
R: {
|
|
323
|
+
initScript: Languages.r_script,
|
|
324
|
+
queryCommand: '.ls.objects()',
|
|
325
|
+
matrixQueryCommand: '.ls.objects',
|
|
326
|
+
widgetQueryCommand: 'TODO',
|
|
327
|
+
deleteCommand: '.deleteVariable',
|
|
328
|
+
},
|
|
329
|
+
scala: {
|
|
330
|
+
initScript: '_root_.almond.api.JupyterAPIHolder.value.VariableInspector.init()',
|
|
331
|
+
queryCommand: '_root_.almond.api.JupyterAPIHolder.value.VariableInspector.dictList()',
|
|
332
|
+
matrixQueryCommand: '',
|
|
333
|
+
widgetQueryCommand: '',
|
|
334
|
+
deleteCommand: '', // TODO
|
|
335
|
+
},
|
|
336
|
+
};
|
|
337
|
+
static getScript(lang) {
|
|
338
|
+
return new Promise((resolve, reject) => {
|
|
339
|
+
if (lang in Languages.scripts) {
|
|
340
|
+
resolve(Languages.scripts[lang]);
|
|
341
|
+
}
|
|
342
|
+
else {
|
|
343
|
+
reject('Language ' + lang + ' not supported yet!');
|
|
344
|
+
}
|
|
345
|
+
});
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
export { Languages };
|
|
349
|
+
//# sourceMappingURL=inspectorscripts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inspectorscripts.js","sourceRoot":"","sources":["../../../../src/components/kernel/variables/inspectorscripts.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAYH,MAAsB,SAAS;IAC7B;;OAEG;IAEH,MAAM,CAAC,SAAS,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2NpB,CAAC;IAEA,MAAM,CAAC,QAAQ,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAqEf,CAAC;IAEJ,MAAM,CAAC,OAAO,GAAiD;QAC7D,OAAO,EAAE;YACP,UAAU,EAAE,SAAS,CAAC,SAAS;YAC/B,YAAY,EAAE,2CAA2C;YACzD,kBAAkB,EAAE,gDAAgD;YACpE,kBAAkB,EAAE,6CAA6C;YACjE,aAAa,EAAE,8CAA8C;SAC9D;QACD,OAAO,EAAE;YACP,UAAU,EAAE,SAAS,CAAC,SAAS;YAC/B,YAAY,EAAE,2CAA2C;YACzD,kBAAkB,EAAE,gDAAgD;YACpE,kBAAkB,EAAE,6CAA6C;YACjE,aAAa,EAAE,8CAA8C;SAC9D;QACD,MAAM,EAAE;YACN,UAAU,EAAE,SAAS,CAAC,SAAS;YAC/B,YAAY,EAAE,2CAA2C;YACzD,kBAAkB,EAAE,gDAAgD;YACpE,kBAAkB,EAAE,6CAA6C;YACjE,aAAa,EAAE,8CAA8C;SAC9D;QACD,CAAC,EAAE;YACD,UAAU,EAAE,SAAS,CAAC,QAAQ;YAC9B,YAAY,EAAE,eAAe;YAC7B,kBAAkB,EAAE,aAAa;YACjC,kBAAkB,EAAE,MAAM;YAC1B,aAAa,EAAE,iBAAiB;SACjC;QACD,KAAK,EAAE;YACL,UAAU,EACR,mEAAmE;YACrE,YAAY,EACV,uEAAuE;YACzE,kBAAkB,EAAE,EAAE;YACtB,kBAAkB,EAAE,EAAE;YACtB,aAAa,EAAE,EAAE,EAAE,OAAO;SAC3B;KACF,CAAC;IAEF,MAAM,CAAC,SAAS,CAAC,IAAY;QAC3B,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACrC,IAAI,IAAI,IAAI,SAAS,CAAC,OAAO,EAAE;gBAC7B,OAAO,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;aAClC;iBAAM;gBACL,MAAM,CAAC,WAAW,GAAG,IAAI,GAAG,qBAAqB,CAAC,CAAC;aACpD;QACH,CAAC,CAAC,CAAC;IACL,CAAC;;SAzVmB,SAAS"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { KernelMessage } from '@jupyterlab/services';
|
|
2
|
+
import { IKernelConnection, IShellFuture } from '@jupyterlab/services/lib/kernel/kernel';
|
|
3
|
+
import { IExecuteReplyMsg, IExecuteRequestMsg } from '@jupyterlab/services/lib/kernel/messages';
|
|
4
|
+
import { ISignal } from '@lumino/signaling';
|
|
5
|
+
import Kernel from './../../../jupyter/kernel/Kernel';
|
|
6
|
+
/**
|
|
7
|
+
* Connector class that handles execute request to a kernel
|
|
8
|
+
*/
|
|
9
|
+
export declare class KernelConnector {
|
|
10
|
+
private _kernel;
|
|
11
|
+
private _kernelRestarted;
|
|
12
|
+
constructor(options: KernelConnector.IOptions);
|
|
13
|
+
get kernelRestarted(): ISignal<KernelConnector, Promise<void>>;
|
|
14
|
+
get kernelLanguage(): Promise<string>;
|
|
15
|
+
get kernelName(): string;
|
|
16
|
+
/**
|
|
17
|
+
* A Promise that is fulfilled when the session associated w/ the connector is ready.
|
|
18
|
+
*/
|
|
19
|
+
get ready(): Promise<void>;
|
|
20
|
+
/**
|
|
21
|
+
* A signal emitted for iopub messages of the kernel associated with the kernel.
|
|
22
|
+
*/
|
|
23
|
+
get iopubMessage(): ISignal<IKernelConnection, KernelMessage.IMessage>;
|
|
24
|
+
/**
|
|
25
|
+
* Executes the given request on the kernel associated with the connector.
|
|
26
|
+
* @param content: IExecuteRequestMsg to forward to the kernel.
|
|
27
|
+
* @param ioCallback: Callable to forward IOPub messages of the kernel to.
|
|
28
|
+
* @returns Promise<KernelMessage.IExecuteReplyMsg>
|
|
29
|
+
*/
|
|
30
|
+
fetch(content: KernelMessage.IExecuteRequestMsg['content'], ioCallback: (msg: KernelMessage.IIOPubMessage) => any): Promise<KernelMessage.IExecuteReplyMsg>;
|
|
31
|
+
execute(content: KernelMessage.IExecuteRequestMsg['content']): IShellFuture<IExecuteRequestMsg, IExecuteReplyMsg>;
|
|
32
|
+
}
|
|
33
|
+
export declare namespace KernelConnector {
|
|
34
|
+
interface IOptions {
|
|
35
|
+
kernel: Kernel;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2021-2023 Datalayer, Inc.
|
|
3
|
+
*
|
|
4
|
+
* MIT License
|
|
5
|
+
*/
|
|
6
|
+
import { Signal } from '@lumino/signaling';
|
|
7
|
+
/**
|
|
8
|
+
* Connector class that handles execute request to a kernel
|
|
9
|
+
*/
|
|
10
|
+
export class KernelConnector {
|
|
11
|
+
_kernel;
|
|
12
|
+
_kernelRestarted = new Signal(this);
|
|
13
|
+
constructor(options) {
|
|
14
|
+
this._kernel = options.kernel;
|
|
15
|
+
this._kernel.connection?.statusChanged.connect((_, newStatus) => {
|
|
16
|
+
switch (newStatus) {
|
|
17
|
+
case 'restarting':
|
|
18
|
+
case 'autorestarting':
|
|
19
|
+
this._kernelRestarted.emit(this._kernel.ready);
|
|
20
|
+
break;
|
|
21
|
+
default:
|
|
22
|
+
break;
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
get kernelRestarted() {
|
|
27
|
+
return this._kernelRestarted;
|
|
28
|
+
}
|
|
29
|
+
get kernelLanguage() {
|
|
30
|
+
if (!this._kernel) {
|
|
31
|
+
return Promise.resolve('');
|
|
32
|
+
}
|
|
33
|
+
return this._kernel.connection.info.then(infoReply => {
|
|
34
|
+
return infoReply.language_info.name;
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
get kernelName() {
|
|
38
|
+
return this._kernel.connection.name;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* A Promise that is fulfilled when the session associated w/ the connector is ready.
|
|
42
|
+
*/
|
|
43
|
+
get ready() {
|
|
44
|
+
return this._kernel.ready;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* A signal emitted for iopub messages of the kernel associated with the kernel.
|
|
48
|
+
*/
|
|
49
|
+
get iopubMessage() {
|
|
50
|
+
return this._kernel.connection.iopubMessage;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Executes the given request on the kernel associated with the connector.
|
|
54
|
+
* @param content: IExecuteRequestMsg to forward to the kernel.
|
|
55
|
+
* @param ioCallback: Callable to forward IOPub messages of the kernel to.
|
|
56
|
+
* @returns Promise<KernelMessage.IExecuteReplyMsg>
|
|
57
|
+
*/
|
|
58
|
+
fetch(content, ioCallback) {
|
|
59
|
+
const kernel = this._kernel.connection;
|
|
60
|
+
if (!kernel) {
|
|
61
|
+
return Promise.reject(new Error('Require kernel to perform variable inspection!'));
|
|
62
|
+
}
|
|
63
|
+
const future = kernel.requestExecute(content);
|
|
64
|
+
future.onIOPub = (msg) => {
|
|
65
|
+
ioCallback(msg);
|
|
66
|
+
};
|
|
67
|
+
return future.done;
|
|
68
|
+
}
|
|
69
|
+
execute(content) {
|
|
70
|
+
if (!this._kernel.connection) {
|
|
71
|
+
throw new Error('No session available.');
|
|
72
|
+
}
|
|
73
|
+
return this._kernel.connection.requestExecute(content);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=kernelconnector.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kernelconnector.js","sourceRoot":"","sources":["../../../../src/components/kernel/variables/kernelconnector.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAWH,OAAO,EAAW,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAGpD;;GAEG;AACH,MAAM,OAAO,eAAe;IAClB,OAAO,CAAS;IAChB,gBAAgB,GAAG,IAAI,MAAM,CAAsB,IAAI,CAAC,CAAC;IAEjE,YAAY,OAAiC;QAC3C,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC;QAC9B,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,aAAa,CAAC,OAAO,CAC5C,CAAC,CAAC,EAAE,SAA+B,EAAE,EAAE;YACrC,QAAQ,SAAS,EAAE;gBACjB,KAAK,YAAY,CAAC;gBAClB,KAAK,gBAAgB;oBACnB,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;oBAC/C,MAAM;gBACR;oBACE,MAAM;aACT;QACH,CAAC,CACF,CAAC;IACJ,CAAC;IAED,IAAI,eAAe;QACjB,OAAO,IAAI,CAAC,gBAAgB,CAAC;IAC/B,CAAC;IAED,IAAI,cAAc;QAChB,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE;YACjB,OAAO,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;SAC5B;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,UAAW,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE;YACpD,OAAO,SAAS,CAAC,aAAa,CAAC,IAAI,CAAC;QACtC,CAAC,CAAC,CAAC;IACL,CAAC;IAED,IAAI,UAAU;QACZ,OAAO,IAAI,CAAC,OAAO,CAAC,UAAW,CAAC,IAAI,CAAC;IACvC,CAAC;IAED;;OAEG;IACH,IAAI,KAAK;QACP,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC;IAC5B,CAAC;IAED;;OAEG;IACH,IAAI,YAAY;QACd,OAAO,IAAI,CAAC,OAAO,CAAC,UAAW,CAAC,YAAY,CAAC;IAC/C,CAAC;IAED;;;;;OAKG;IACH,KAAK,CACH,OAAoD,EACpD,UAAqD;QAErD,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC;QACvC,IAAI,CAAC,MAAM,EAAE;YACX,OAAO,OAAO,CAAC,MAAM,CACnB,IAAI,KAAK,CAAC,gDAAgD,CAAC,CAC5D,CAAC;SACH;QACD,MAAM,MAAM,GAAG,MAAM,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;QAC9C,MAAM,CAAC,OAAO,GAAG,CAAC,GAAgC,EAAQ,EAAE;YAC1D,UAAU,CAAC,GAAG,CAAC,CAAC;QAClB,CAAC,CAAC;QACF,OAAO,MAAM,CAAC,IAA+C,CAAC;IAChE,CAAC;IAED,OAAO,CACL,OAAoD;QAEpD,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE;YAC5B,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;SAC1C;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;IACzD,CAAC;CACF"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { VariableInspectionHandler } from './handler';
|
|
2
|
+
import { VariableInspectorPanel } from './widget';
|
|
3
|
+
import { IVariableInspector, IVariableInspectorManager } from './tokens';
|
|
4
|
+
/**
|
|
5
|
+
* A class that manages variable inspector widget instances and offers persistent
|
|
6
|
+
* `IVariableInspector` instance that other plugins can communicate with.
|
|
7
|
+
*/
|
|
8
|
+
export declare class VariableInspectorManager implements IVariableInspectorManager {
|
|
9
|
+
private _source;
|
|
10
|
+
private _panel?;
|
|
11
|
+
private _handlers;
|
|
12
|
+
hasHandler(id: string): boolean;
|
|
13
|
+
getHandler(id: string): VariableInspectionHandler;
|
|
14
|
+
addHandler(handler: VariableInspectionHandler): void;
|
|
15
|
+
/**
|
|
16
|
+
* The current inspector panel.
|
|
17
|
+
*/
|
|
18
|
+
get panel(): VariableInspectorPanel | undefined;
|
|
19
|
+
set panel(panel: VariableInspectorPanel | undefined);
|
|
20
|
+
/**
|
|
21
|
+
* The source of events the inspector panel listens for.
|
|
22
|
+
*/
|
|
23
|
+
get source(): IVariableInspector.IInspectable | null;
|
|
24
|
+
set source(source: IVariableInspector.IInspectable | null);
|
|
25
|
+
private _onSourceDisposed;
|
|
26
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2021-2023 Datalayer, Inc.
|
|
3
|
+
*
|
|
4
|
+
* MIT License
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* A class that manages variable inspector widget instances and offers persistent
|
|
8
|
+
* `IVariableInspector` instance that other plugins can communicate with.
|
|
9
|
+
*/
|
|
10
|
+
export class VariableInspectorManager {
|
|
11
|
+
_source = null;
|
|
12
|
+
_panel;
|
|
13
|
+
_handlers = {};
|
|
14
|
+
hasHandler(id) {
|
|
15
|
+
if (this._handlers[id]) {
|
|
16
|
+
return true;
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
return false;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
getHandler(id) {
|
|
23
|
+
return this._handlers[id];
|
|
24
|
+
}
|
|
25
|
+
addHandler(handler) {
|
|
26
|
+
this._handlers[handler.id] = handler;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* The current inspector panel.
|
|
30
|
+
*/
|
|
31
|
+
get panel() {
|
|
32
|
+
return this._panel;
|
|
33
|
+
}
|
|
34
|
+
set panel(panel) {
|
|
35
|
+
if (this.panel === panel) {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
this._panel = panel;
|
|
39
|
+
if (panel && !panel.source) {
|
|
40
|
+
panel.source = this._source;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* The source of events the inspector panel listens for.
|
|
45
|
+
*/
|
|
46
|
+
get source() {
|
|
47
|
+
return this._source;
|
|
48
|
+
}
|
|
49
|
+
set source(source) {
|
|
50
|
+
if (this._source === source) {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
// remove subscriptions
|
|
54
|
+
if (this._source) {
|
|
55
|
+
this._source.disposed.disconnect(this._onSourceDisposed, this);
|
|
56
|
+
}
|
|
57
|
+
this._source = source;
|
|
58
|
+
if (this._panel && !this._panel.isDisposed) {
|
|
59
|
+
this._panel.source = this._source;
|
|
60
|
+
}
|
|
61
|
+
// Subscribe to new source
|
|
62
|
+
if (this._source) {
|
|
63
|
+
this._source.disposed.connect(this._onSourceDisposed, this);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
_onSourceDisposed() {
|
|
67
|
+
this._source = null;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
//# sourceMappingURL=manager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manager.js","sourceRoot":"","sources":["../../../../src/components/kernel/variables/manager.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH;;;GAGG;AACH,MAAM,OAAO,wBAAwB;IAC3B,OAAO,GAA2C,IAAI,CAAC;IACvD,MAAM,CAA0B;IAChC,SAAS,GAAgD,EAAE,CAAC;IAEpE,UAAU,CAAC,EAAU;QACnB,IAAI,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,EAAE;YACtB,OAAO,IAAI,CAAC;SACb;aAAM;YACL,OAAO,KAAK,CAAC;SACd;IACH,CAAC;IAED,UAAU,CAAC,EAAU;QACnB,OAAO,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;IAC5B,CAAC;IAED,UAAU,CAAC,OAAkC;QAC3C,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC;IACvC,CAAC;IAED;;OAEG;IACH,IAAI,KAAK;QACP,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IAED,IAAI,KAAK,CAAC,KAAyC;QACjD,IAAI,IAAI,CAAC,KAAK,KAAK,KAAK,EAAE;YACxB,OAAO;SACR;QACD,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QAEpB,IAAI,KAAK,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE;YAC1B,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC;SAC7B;IACH,CAAC;IAED;;OAEG;IACH,IAAI,MAAM;QACR,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAED,IAAI,MAAM,CAAC,MAA8C;QACvD,IAAI,IAAI,CAAC,OAAO,KAAK,MAAM,EAAE;YAC3B,OAAO;SACR;QAED,uBAAuB;QACvB,IAAI,IAAI,CAAC,OAAO,EAAE;YAChB,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,iBAAiB,EAAE,IAAI,CAAC,CAAC;SAChE;QAED,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QAEtB,IAAI,IAAI,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE;YAC1C,IAAI,CAAC,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC;SACnC;QACD,0BAA0B;QAC1B,IAAI,IAAI,CAAC,OAAO,EAAE;YAChB,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,iBAAiB,EAAE,IAAI,CAAC,CAAC;SAC7D;IACH,CAAC;IAEO,iBAAiB;QACvB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;IACtB,CAAC;CACF"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { IRenderMimeRegistry } from '@jupyterlab/rendermime';
|
|
2
|
+
import { Kernel, KernelMessage } from '@jupyterlab/services';
|
|
3
|
+
import { DataModel } from '@lumino/datagrid';
|
|
4
|
+
import { IObservableDisposable } from '@lumino/disposable';
|
|
5
|
+
import { ISignal } from '@lumino/signaling';
|
|
6
|
+
import type { VariableInspectionHandler } from './handler';
|
|
7
|
+
export interface IVariableInspectorManager {
|
|
8
|
+
source: IVariableInspector.IInspectable | null;
|
|
9
|
+
hasHandler(id: string): boolean;
|
|
10
|
+
getHandler(id: string): VariableInspectionHandler;
|
|
11
|
+
addHandler(handler: VariableInspectionHandler): void;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* An interface for an inspector.
|
|
15
|
+
*/
|
|
16
|
+
export interface IVariableInspector {
|
|
17
|
+
source: IVariableInspector.IInspectable | null;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* A namespace for inspector interfaces.
|
|
21
|
+
*/
|
|
22
|
+
export declare namespace IVariableInspector {
|
|
23
|
+
interface IInspectable extends IObservableDisposable {
|
|
24
|
+
inspected: ISignal<IInspectable, IVariableInspectorUpdate>;
|
|
25
|
+
rendermime: IRenderMimeRegistry | null;
|
|
26
|
+
performInspection(): void;
|
|
27
|
+
performMatrixInspection(varName: string, maxRows?: number): Promise<DataModel>;
|
|
28
|
+
performWidgetInspection(varName: string): Kernel.IShellFuture<KernelMessage.IExecuteRequestMsg, KernelMessage.IExecuteReplyMsg>;
|
|
29
|
+
performDelete(varName: string): void;
|
|
30
|
+
}
|
|
31
|
+
interface IVariableInspectorUpdate {
|
|
32
|
+
title: IVariableTitle;
|
|
33
|
+
payload: Array<IVariable>;
|
|
34
|
+
}
|
|
35
|
+
interface IVariable {
|
|
36
|
+
varName: string;
|
|
37
|
+
varSize: string;
|
|
38
|
+
varShape: string;
|
|
39
|
+
varContent: string;
|
|
40
|
+
varType: string;
|
|
41
|
+
isMatrix: boolean;
|
|
42
|
+
isWidget: boolean;
|
|
43
|
+
}
|
|
44
|
+
interface IVariableTitle {
|
|
45
|
+
kernelName?: string;
|
|
46
|
+
contextName?: string;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens.js","sourceRoot":"","sources":["../../../../src/components/kernel/variables/tokens.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
|