@datalayer/jupyter-react 0.8.1 → 0.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -1
- package/lib/app/App.js.map +1 -1
- package/lib/app/JupyterReact.js +7 -1
- package/lib/app/JupyterReact.js.map +1 -1
- package/lib/app/tabs/AboutTab.js +1 -4
- package/lib/app/tabs/AboutTab.js.map +1 -1
- package/lib/app/tabs/ComponentsTab.js +3 -3
- package/lib/app/tabs/ComponentsTab.js.map +1 -1
- package/lib/app/tabs/components/CellComponent.js.map +1 -1
- package/lib/app/tabs/components/FileBrowserComponent.js.map +1 -1
- package/lib/app/tabs/components/IPyWidgetsComponent.js +1 -1
- package/lib/app/tabs/components/IPyWidgetsComponent.js.map +1 -1
- package/lib/app/tabs/components/NotebookComponent.js.map +1 -1
- package/lib/app/tabs/components/ViewerComponent.js +1 -1
- package/lib/app/tabs/components/ViewerComponent.js.map +1 -1
- package/lib/components/button/Button.d.ts +7 -0
- package/lib/components/button/Button.js +43 -0
- package/lib/components/button/Button.js.map +1 -0
- package/lib/components/cell/Cell.js +28 -32
- package/lib/components/cell/Cell.js.map +1 -1
- package/lib/components/cell/CellAdapter.d.ts +1 -0
- package/lib/components/cell/CellAdapter.js +56 -41
- package/lib/components/cell/CellAdapter.js.map +1 -1
- package/lib/components/cell/CellCommands.d.ts +2 -2
- package/lib/components/cell/CellCommands.js +9 -9
- package/lib/components/cell/CellCommands.js.map +1 -1
- package/lib/components/cell/CellRedux.d.ts +1 -1
- package/lib/components/cell/CellRedux.js +3 -3
- package/lib/components/cell/CellRedux.js.map +1 -1
- package/lib/components/codemirror/CodeMirrorEditor.js +7 -9
- package/lib/components/codemirror/CodeMirrorEditor.js.map +1 -1
- package/lib/components/codemirror/CodeMirrorOutputToolbar.js +19 -5
- package/lib/components/codemirror/CodeMirrorOutputToolbar.js.map +1 -1
- package/lib/components/codemirror/CodeMirrorTheme.d.ts +1 -1
- package/lib/components/codemirror/CodeMirrorTheme.js +11 -11
- package/lib/components/codemirror/CodeMirrorTheme.js.map +1 -1
- package/lib/components/commands/Commands.js.map +1 -1
- package/lib/components/commands/CommandsAdapter.js +1 -1
- package/lib/components/commands/CommandsAdapter.js.map +1 -1
- package/lib/components/commands/CommandsState.js +6 -7
- package/lib/components/commands/CommandsState.js.map +1 -1
- package/lib/components/console/Console.js +1 -5
- package/lib/components/console/Console.js.map +1 -1
- package/lib/components/console/ConsoleAdapter.js +12 -12
- package/lib/components/console/ConsoleAdapter.js.map +1 -1
- package/lib/components/console/ConsoleRedux.js +5 -6
- package/lib/components/console/ConsoleRedux.js.map +1 -1
- package/lib/components/dialog/Dialog.js.map +1 -1
- package/lib/components/dialog/DialogAdapter.js +1 -4
- package/lib/components/dialog/DialogAdapter.js.map +1 -1
- package/lib/components/filebrowser/FileBrowser.js +2 -2
- package/lib/components/filebrowser/FileBrowser.js.map +1 -1
- package/lib/components/filemanager/FileManagerJupyterLab.js +3 -5
- package/lib/components/filemanager/FileManagerJupyterLab.js.map +1 -1
- package/lib/components/filemanager/FileManagerState.js +5 -6
- package/lib/components/filemanager/FileManagerState.js.map +1 -1
- package/lib/components/filemanager/lab/FileManagerAdapter.js +28 -28
- package/lib/components/filemanager/lab/FileManagerAdapter.js.map +1 -1
- package/lib/components/jupyterlab/JupyterLabApp.d.ts +2 -2
- package/lib/components/jupyterlab/JupyterLabApp.js +18 -14
- package/lib/components/jupyterlab/JupyterLabApp.js.map +1 -1
- package/lib/components/jupyterlab/JupyterLabAppAdapter.d.ts +3 -3
- package/lib/components/jupyterlab/JupyterLabAppAdapter.js +4 -3
- package/lib/components/jupyterlab/JupyterLabAppAdapter.js.map +1 -1
- package/lib/components/jupyterlab/JupyterLabAppCss.d.ts +1 -1
- package/lib/components/jupyterlab/JupyterLabAppCss.js +1 -1
- package/lib/components/jupyterlab/JupyterLabAppCss.js.map +1 -1
- package/lib/components/jupyterlab/JupyterLabAppPlugins.js +1 -2
- package/lib/components/jupyterlab/JupyterLabAppPlugins.js.map +1 -1
- package/lib/components/notebook/Notebook.d.ts +1 -1
- package/lib/components/notebook/Notebook.js +18 -12
- package/lib/components/notebook/Notebook.js.map +1 -1
- package/lib/components/notebook/NotebookAdapter.d.ts +2 -2
- package/lib/components/notebook/NotebookAdapter.js +83 -87
- package/lib/components/notebook/NotebookAdapter.js.map +1 -1
- package/lib/components/notebook/NotebookCommands.d.ts +2 -3
- package/lib/components/notebook/NotebookCommands.js +122 -118
- package/lib/components/notebook/NotebookCommands.js.map +1 -1
- package/lib/components/notebook/NotebookRedux.d.ts +8 -8
- package/lib/components/notebook/NotebookRedux.js +43 -23
- package/lib/components/notebook/NotebookRedux.js.map +1 -1
- package/lib/components/notebook/cell/metadata/CellMetadataEditor.d.ts +1 -1
- package/lib/components/notebook/cell/metadata/CellMetadataEditor.js +45 -46
- package/lib/components/notebook/cell/metadata/CellMetadataEditor.js.map +1 -1
- package/lib/components/notebook/cell/metadata/NbGraderCells.d.ts +1 -1
- package/lib/components/notebook/cell/metadata/NbGraderCells.js +1 -1
- package/lib/components/notebook/cell/metadata/NbGraderCells.js.map +1 -1
- 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 +4 -4
- package/lib/components/notebook/cell/prompt/CountdownInputPrompt.js.map +1 -1
- package/lib/components/notebook/cell/prompt/CountdownOutputPrompt.js +3 -3
- package/lib/components/notebook/cell/prompt/CountdownOutputPrompt.js.map +1 -1
- package/lib/components/notebook/cell/sidebar/CellSidebar.js +50 -39
- package/lib/components/notebook/cell/sidebar/CellSidebar.js.map +1 -1
- package/lib/components/notebook/cell/sidebar/CellSidebarButton.js +15 -14
- package/lib/components/notebook/cell/sidebar/CellSidebarButton.js.map +1 -1
- package/lib/components/notebook/cell/sidebar/CellSidebarRun.js +12 -15
- package/lib/components/notebook/cell/sidebar/CellSidebarRun.js.map +1 -1
- package/lib/components/notebook/cell/sidebar/CellSidebarWidget.js +1 -1
- package/lib/components/notebook/cell/sidebar/CellSidebarWidget.js.map +1 -1
- package/lib/components/notebook/content/JupyterReactContentFactory.js +2 -3
- package/lib/components/notebook/content/JupyterReactContentFactory.js.map +1 -1
- package/lib/components/notebook/marked/marked.js +2 -2
- package/lib/components/notebook/marked/marked.js.map +1 -1
- package/lib/components/notebook/model/JupyterReactNotebookModelFactory.d.ts +1 -1
- package/lib/components/notebook/model/JupyterReactNotebookModelFactory.js +1 -1
- package/lib/components/notebook/model/JupyterReactNotebookModelFactory.js.map +1 -1
- package/lib/components/output/Output.js +46 -47
- package/lib/components/output/Output.js.map +1 -1
- package/lib/components/output/OutputAdapter.d.ts +1 -1
- package/lib/components/output/OutputAdapter.js +13 -10
- package/lib/components/output/OutputAdapter.js.map +1 -1
- package/lib/components/output/OutputIPyWidgets.js.map +1 -1
- package/lib/components/output/OutputRedux.js +3 -3
- package/lib/components/output/OutputRedux.js.map +1 -1
- package/lib/components/output/OutputRenderer.js +16 -19
- package/lib/components/output/OutputRenderer.js.map +1 -1
- package/lib/components/settings/Settings.js +1 -1
- package/lib/components/settings/Settings.js.map +1 -1
- package/lib/components/settings/SettingsAdapter.css +0 -1
- package/lib/components/settings/SettingsAdapter.js.map +1 -1
- package/lib/components/settings/SettingsRedux.js +5 -6
- package/lib/components/settings/SettingsRedux.js.map +1 -1
- package/lib/components/terminal/Terminal.js +8 -12
- package/lib/components/terminal/Terminal.js.map +1 -1
- package/lib/components/terminal/TerminalAdapter.js +2 -2
- package/lib/components/terminal/TerminalAdapter.js.map +1 -1
- package/lib/components/terminal/TerminalRedux.d.ts +1 -1
- package/lib/components/terminal/TerminalRedux.js +4 -5
- package/lib/components/terminal/TerminalRedux.js.map +1 -1
- package/lib/components/textinput/TextInput.d.ts +7 -0
- package/lib/components/textinput/TextInput.js +23 -0
- package/lib/components/textinput/TextInput.js.map +1 -0
- package/lib/components/viewer/Viewer.js.map +1 -1
- package/lib/components/viewer/input/CodemirrorView.d.ts +1 -1
- package/lib/components/viewer/input/CodemirrorView.js +9 -12
- package/lib/components/viewer/input/CodemirrorView.js.map +1 -1
- package/lib/components/viewer/input/CodemirrorViewer.js +5 -5
- package/lib/components/viewer/input/CodemirrorViewer.js.map +1 -1
- package/lib/components/viewer/input/InputViewer.js +20 -18
- package/lib/components/viewer/input/InputViewer.js.map +1 -1
- package/lib/components/viewer/output/OutputAdapter.js +3 -2
- package/lib/components/viewer/output/OutputAdapter.js.map +1 -1
- package/lib/components/viewer/output/OutputViewer.js.map +1 -1
- package/lib/examples/All.js +23 -22
- package/lib/examples/All.js.map +1 -1
- package/lib/examples/Bokeh.js +3 -3
- package/lib/examples/Bokeh.js.map +1 -1
- package/lib/examples/Bqplot.js +3 -5
- package/lib/examples/Bqplot.js.map +1 -1
- package/lib/examples/Cell.js.map +1 -1
- package/lib/examples/Cells.js.map +1 -1
- package/lib/examples/Console.js.map +1 -1
- package/lib/examples/ConsoleLite.js.map +1 -1
- package/lib/examples/Dashboard.js +4 -4
- package/lib/examples/Dashboard.js.map +1 -1
- package/lib/examples/FileBrowser.js +1 -1
- package/lib/examples/FileBrowser.js.map +1 -1
- package/lib/examples/GeoJson.js +3 -5
- package/lib/examples/GeoJson.js.map +1 -1
- package/lib/examples/IPyLeaflet.js +3 -5
- package/lib/examples/IPyLeaflet.js.map +1 -1
- package/lib/examples/IPyReact.js +4 -4
- package/lib/examples/IPyReact.js.map +1 -1
- package/lib/examples/IPyWidgets.js +4 -4
- package/lib/examples/IPyWidgets.js.map +1 -1
- package/lib/examples/IPyWidgetsWithState.d.ts +1 -0
- package/lib/examples/IPyWidgetsWithState.js +19 -0
- package/lib/examples/IPyWidgetsWithState.js.map +1 -0
- package/lib/examples/JupyterLabApp.js +5 -5
- package/lib/examples/JupyterLabApp.js.map +1 -1
- package/lib/examples/JupyterLabHeadlessApp.js +13 -19
- package/lib/examples/JupyterLabHeadlessApp.js.map +1 -1
- package/lib/examples/Lumino.js +1 -1
- package/lib/examples/Lumino.js.map +1 -1
- package/lib/examples/Matplotlib.js +9 -5
- package/lib/examples/Matplotlib.js.map +1 -1
- package/lib/examples/Notebook.js +7 -7
- package/lib/examples/Notebook.js.map +1 -1
- package/lib/examples/NotebookCellSidebar.js +7 -7
- package/lib/examples/NotebookCellSidebar.js.map +1 -1
- package/lib/examples/NotebookExternalContent.js +15 -18
- package/lib/examples/NotebookExternalContent.js.map +1 -1
- package/lib/examples/NotebookInit.js +10 -13
- package/lib/examples/NotebookInit.js.map +1 -1
- package/lib/examples/NotebookInjectableReduxStore.js +8 -8
- package/lib/examples/NotebookInjectableReduxStore.js.map +1 -1
- package/lib/examples/NotebookKernelChange.js +3 -3
- package/lib/examples/NotebookKernelChange.js.map +1 -1
- package/lib/examples/NotebookModel.js +7 -7
- package/lib/examples/NotebookModel.js.map +1 -1
- package/lib/examples/NotebookModelChange.js +8 -8
- package/lib/examples/NotebookModelChange.js.map +1 -1
- package/lib/examples/NotebookPath.js +6 -6
- package/lib/examples/NotebookPath.js.map +1 -1
- package/lib/examples/NotebookPathChange.js +6 -6
- package/lib/examples/NotebookPathChange.js.map +1 -1
- package/lib/examples/NotebookThemed.js +8 -8
- package/lib/examples/NotebookThemed.js.map +1 -1
- package/lib/examples/NotebookUnmount.js +8 -11
- package/lib/examples/NotebookUnmount.js.map +1 -1
- package/lib/examples/Output.js +7 -9
- package/lib/examples/Output.js.map +1 -1
- package/lib/examples/OutputIPyWidgets.js.map +1 -1
- package/lib/examples/Outputs.js +3 -4
- package/lib/examples/Outputs.js.map +1 -1
- package/lib/examples/Panel.js +3 -3
- package/lib/examples/Panel.js.map +1 -1
- package/lib/examples/Plotly.js +3 -3
- package/lib/examples/Plotly.js.map +1 -1
- package/lib/examples/RunningSessions.js +3 -4
- 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 +3 -5
- package/lib/examples/Vega.js.map +1 -1
- package/lib/examples/Viewer.js +19 -19
- package/lib/examples/Viewer.js.map +1 -1
- package/lib/examples/ViewerFile.js.map +1 -1
- package/lib/examples/lumino/LuminoWidget.js +1 -6
- package/lib/examples/lumino/LuminoWidget.js.map +1 -1
- package/lib/examples/notebooks/DashboardExample.exclude.json +96 -379
- package/lib/examples/notebooks/{IPyWidgetsExample1.ipynb.json → IPyWidgetsExample.ipynb.json} +8 -17
- package/lib/examples/notebooks/IPyWidgetsExampleWithState.ipynb.json +88 -0
- package/lib/examples/notebooks/IPyWidgetsOutputMatplotlib.exclude.d.ts +4 -4
- package/lib/examples/notebooks/IPyWidgetsOutputMatplotlib.exclude.js +53 -81
- package/lib/examples/notebooks/IPyWidgetsOutputMatplotlib.exclude.js.map +1 -1
- package/lib/examples/notebooks/Matplotlib.ipynb.json +20 -52
- package/lib/examples/notebooks/NotebookExample1.ipynb.json +4 -12
- package/lib/examples/notebooks/NotebookExample2.ipynb.json +2 -6
- package/lib/examples/notebooks/OutputIPyWidgetsExample.d.ts +7 -7
- package/lib/examples/notebooks/OutputIPyWidgetsExample.js +133 -133
- package/lib/examples/notebooks/OutputIPyWidgetsExample.js.map +1 -1
- package/lib/examples/sidebars/CellSidebarSource.js +53 -40
- package/lib/examples/sidebars/CellSidebarSource.js.map +1 -1
- package/lib/examples/state/ExampleReduxState.js +4 -5
- package/lib/examples/state/ExampleReduxState.js.map +1 -1
- package/lib/examples/toolbars/NotebookToolbar.js +15 -7
- package/lib/examples/toolbars/NotebookToolbar.js.map +1 -1
- package/lib/examples/toolbars/NotebookToolbarAutoSave.js +13 -13
- package/lib/examples/toolbars/NotebookToolbarAutoSave.js.map +1 -1
- package/lib/examples/toolbars/NotebookToolbarStatus.js +1 -1
- package/lib/examples/toolbars/NotebookToolbarStatus.js.map +1 -1
- package/lib/index.css +0 -1
- package/lib/index.d.ts +3 -0
- package/lib/index.js +5 -0
- package/lib/index.js.map +1 -1
- package/lib/jupyter/Jupyter.d.ts +1 -1
- package/lib/jupyter/Jupyter.js +7 -5
- package/lib/jupyter/Jupyter.js.map +1 -1
- package/lib/jupyter/JupyterConfig.js +26 -9
- package/lib/jupyter/JupyterConfig.js.map +1 -1
- package/lib/jupyter/JupyterContext.d.ts +2 -2
- package/lib/jupyter/JupyterContext.js +21 -17
- package/lib/jupyter/JupyterContext.js.map +1 -1
- package/lib/jupyter/JupyterHandlers.js.map +1 -1
- package/lib/jupyter/ipywidgets/IPyWidgetsAttached.js.map +1 -1
- package/lib/jupyter/ipywidgets/IPyWidgetsViewManager.js.map +1 -1
- package/lib/jupyter/ipywidgets/lab/manager.d.ts +9 -8
- package/lib/jupyter/ipywidgets/lab/manager.js +28 -24
- package/lib/jupyter/ipywidgets/lab/manager.js.map +1 -1
- package/lib/jupyter/ipywidgets/lab/output.d.ts +4 -4
- package/lib/jupyter/ipywidgets/lab/output.js +7 -7
- package/lib/jupyter/ipywidgets/lab/output.js.map +1 -1
- package/lib/jupyter/ipywidgets/lab/plugin.d.ts +8 -7
- package/lib/jupyter/ipywidgets/lab/plugin.js +42 -29
- package/lib/jupyter/ipywidgets/lab/plugin.js.map +1 -1
- package/lib/jupyter/ipywidgets/lab/renderer.d.ts +3 -3
- package/lib/jupyter/ipywidgets/lab/renderer.js.map +1 -1
- package/lib/jupyter/ipywidgets/lab/semvercache.js.map +1 -1
- package/lib/jupyter/ipywidgets/{IPyWidgetsManager.d.ts → manager/IPyWidgetsClassicManager.d.ts} +4 -4
- package/lib/jupyter/ipywidgets/{IPyWidgetsManager.js → manager/IPyWidgetsClassicManager.js} +24 -21
- package/lib/jupyter/ipywidgets/manager/IPyWidgetsClassicManager.js.map +1 -0
- package/lib/jupyter/ipywidgets/plotly/Figure.d.ts +2 -2
- package/lib/jupyter/ipywidgets/plotly/Figure.js +171 -168
- package/lib/jupyter/ipywidgets/plotly/Figure.js.map +1 -1
- package/lib/jupyter/ipywidgets/plotly/JupyterlabPlugin.d.ts +1 -1
- package/lib/jupyter/ipywidgets/plotly/JupyterlabPlugin.js +2 -2
- package/lib/jupyter/kernel/Kernel.js +10 -10
- package/lib/jupyter/kernel/Kernel.js.map +1 -1
- package/lib/jupyter/kernel/KernelModel.js +1 -1
- package/lib/jupyter/lab/JupyterLabCss.js.map +1 -1
- package/lib/jupyter/lab/index.js +7 -9
- package/lib/jupyter/lab/index.js.map +1 -1
- package/lib/jupyter/lab/notebook/content/CountdownContentFactory.js.map +1 -1
- package/lib/jupyter/lab/notebook/content/plugin.js +1 -1
- package/lib/jupyter/lab/notebook/content/plugin.js.map +1 -1
- package/lib/jupyter/lab/widget.js.map +1 -1
- package/lib/jupyter/lite/LiteServer.js +15 -15
- package/lib/jupyter/lite/LiteServer.js.map +1 -1
- package/lib/jupyter/lumino/Lumino.js +2 -2
- package/lib/jupyter/lumino/Lumino.js.map +1 -1
- package/lib/jupyter/lumino/LuminoBox.js +2 -2
- package/lib/jupyter/lumino/LuminoBox.js.map +1 -1
- package/lib/jupyter/lumino/LuminoObservable.d.ts +2 -2
- package/lib/jupyter/lumino/LuminoObservable.js +2 -2
- package/lib/jupyter/lumino/LuminoObservable.js.map +1 -1
- package/lib/jupyter/lumino/ReactPortalWidget.js.map +1 -1
- package/lib/jupyter/renderers/plotly/PlotlyRenderer.d.ts +4 -4
- package/lib/jupyter/renderers/plotly/PlotlyRenderer.js +37 -37
- package/lib/jupyter/renderers/plotly/PlotlyRenderer.js.map +1 -1
- package/lib/jupyter/services/Services.js.map +1 -1
- package/lib/jupyter/theme.d.ts +6 -1033
- package/lib/jupyter/theme.js +581 -33
- package/lib/jupyter/theme.js.map +1 -1
- package/lib/state/redux/InitState.js +4 -5
- package/lib/state/redux/InitState.js.map +1 -1
- package/lib/state/redux/State.d.ts +5 -5
- package/lib/state/redux/State.js +7 -7
- package/lib/state/redux/State.js.map +1 -1
- package/lib/state/redux/Store.d.ts +1 -1
- package/lib/state/redux/Store.js +3 -3
- package/lib/state/redux/Store.js.map +1 -1
- package/lib/utils/Utils.js +4 -4
- package/lib/utils/Utils.js.map +1 -1
- package/package.json +33 -18
- package/style/base.css +0 -1
- package/lib/jupyter/ipywidgets/IPyWidgetsManager.js.map +0 -1
|
@@ -7,10 +7,10 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
7
7
|
import { useState, useEffect } from 'react';
|
|
8
8
|
import { useDispatch, useSelector } from 'react-redux';
|
|
9
9
|
import { Box, Button, ButtonGroup, IconButton } from '@primer/react';
|
|
10
|
-
import { PlusIcon, ChevronRightIcon, StopIcon, ZapIcon, TrashIcon, SyncIcon } from '@primer/octicons-react';
|
|
10
|
+
import { PlusIcon, ChevronRightIcon, StopIcon, ZapIcon, TrashIcon, SyncIcon, } from '@primer/octicons-react';
|
|
11
11
|
import { FastForwardIcon } from '@datalayer/icons-react';
|
|
12
12
|
import { cmdIds } from '../../components/notebook/NotebookCommands';
|
|
13
|
-
import { notebookActions, selectNotebook, selectSaveRequest } from '../../components/notebook/NotebookRedux';
|
|
13
|
+
import { notebookActions, selectNotebook, selectSaveRequest, } from '../../components/notebook/NotebookRedux';
|
|
14
14
|
export const NotebookToolbarAutoSave = (props) => {
|
|
15
15
|
const { notebookId } = props;
|
|
16
16
|
const [autoSave, setAutoSave] = useState(false);
|
|
@@ -34,20 +34,20 @@ export const NotebookToolbarAutoSave = (props) => {
|
|
|
34
34
|
};
|
|
35
35
|
return (_jsxs(Box, { display: "flex", pt: 1, pb: 1, style: { width: '100%', position: 'relative', top: '0' }, children: [_jsxs(Box, { flexGrow: 1, style: { width: '50%', paddingLeft: '7vw', gap: '0.75vw' }, children: [_jsx(IconButton, { variant: "invisible", size: "small", color: "primary", "aria-label": "Save", title: "Save", onClick: e => {
|
|
36
36
|
e.preventDefault();
|
|
37
|
-
dispatch(notebookActions.save.started({
|
|
37
|
+
dispatch(notebookActions.save.started({
|
|
38
|
+
uid: notebookId,
|
|
39
|
+
date: new Date(),
|
|
40
|
+
}));
|
|
38
41
|
}, icon: ZapIcon }), _jsx(IconButton, { variant: "invisible", size: "small", color: "secondary", "aria-label": "Run cell", title: "Run cell", onClick: e => {
|
|
39
42
|
e.preventDefault();
|
|
40
43
|
dispatch(notebookActions.run.started(notebookId));
|
|
41
|
-
}, icon: ChevronRightIcon }), notebook?.kernelStatus === 'idle' ?
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
e.preventDefault();
|
|
49
|
-
dispatch(notebookActions.interrupt.started(notebookId));
|
|
50
|
-
}, icon: StopIcon }), _jsx(IconButton, { variant: "invisible", size: "small", color: "error", "aria-label": "Delete", title: "Delete", onClick: e => {
|
|
44
|
+
}, icon: ChevronRightIcon }), notebook?.kernelStatus === 'idle' ? (_jsx(IconButton, { variant: "invisible", size: "small", color: "secondary", "aria-label": "Run all cells", title: "Run all cells", onClick: e => {
|
|
45
|
+
e.preventDefault();
|
|
46
|
+
dispatch(notebookActions.runAll.started(notebookId));
|
|
47
|
+
}, icon: FastForwardIcon })) : (_jsx(IconButton, { variant: "invisible", size: "small", color: "error", "aria-label": "Interrupt", onClick: e => {
|
|
48
|
+
e.preventDefault();
|
|
49
|
+
dispatch(notebookActions.interrupt.started(notebookId));
|
|
50
|
+
}, icon: StopIcon })), _jsx(IconButton, { variant: "invisible", size: "small", color: "error", "aria-label": "Delete", title: "Delete", onClick: e => {
|
|
51
51
|
e.preventDefault();
|
|
52
52
|
dispatch(notebookActions.delete.started(notebookId));
|
|
53
53
|
}, icon: TrashIcon })] }), _jsxs(Box, { sx: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotebookToolbarAutoSave.js","sourceRoot":"","sources":["../../../src/examples/toolbars/NotebookToolbarAutoSave.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;AAEH,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,G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L,EACT,KAAC,MAAM,IACL,OAAO,EAAE,OAAO,IAAI,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,EACtD,OAAO,EAAE,GAAG,EAAE,CAAC,oBAAoB,CAAC,UAAU,CAAC,EAC/C,IAAI,EAAC,OAAO,yBAGL,EACT,KAAC,MAAM,IACL,OAAO,EAAE,OAAO,IAAI,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,WAAW,EACnD,OAAO,EAAE,GAAG,EAAE,CAAC,oBAAoB,CAAC,KAAK,CAAC,EAC1C,IAAI,EAAC,OAAO,oBAGL,IACG,IACV,IACF,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,uBAAuB,CAAC"}
|
|
@@ -8,7 +8,7 @@ import { selectKernelStatus } from '../../components/notebook/NotebookRedux';
|
|
|
8
8
|
const NotebookToolbarStatus = (props) => {
|
|
9
9
|
const { notebookId } = props;
|
|
10
10
|
const kernelStatus = selectKernelStatus(notebookId);
|
|
11
|
-
return
|
|
11
|
+
return _jsxs(_Fragment, { children: ["Kernel Status: ", kernelStatus] });
|
|
12
12
|
};
|
|
13
13
|
export default NotebookToolbarStatus;
|
|
14
14
|
//# sourceMappingURL=NotebookToolbarStatus.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotebookToolbarStatus.js","sourceRoot":"","sources":["../../../src/examples/toolbars/NotebookToolbarStatus.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAE7E,MAAM,qBAAqB,GAAG,CAAC,KAA6B,EAAE,EAAE;IAC9D,MAAM,EAAE,UAAU,EAAE,GAAG,KAAK,CAAC;IAC7B,MAAM,YAAY,GAAG,kBAAkB,CAAC,UAAU,CAAC,CAAC;IACpD,OAAO,
|
|
1
|
+
{"version":3,"file":"NotebookToolbarStatus.js","sourceRoot":"","sources":["../../../src/examples/toolbars/NotebookToolbarStatus.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAE7E,MAAM,qBAAqB,GAAG,CAAC,KAA6B,EAAE,EAAE;IAC9D,MAAM,EAAE,UAAU,EAAE,GAAG,KAAK,CAAC;IAC7B,MAAM,YAAY,GAAG,kBAAkB,CAAC,UAAU,CAAC,CAAC;IACpD,OAAO,iDAAkB,YAAY,IAAI,CAAC;AAC5C,CAAC,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
|
package/lib/index.css
CHANGED
package/lib/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export * from './jupyter/Jupyter';
|
|
2
|
+
export * from './jupyter/theme';
|
|
2
3
|
export * from './jupyter/JupyterContext';
|
|
3
4
|
export * from './jupyter/JupyterConfig';
|
|
4
5
|
export * from './jupyter/lab/JupyterLabCss';
|
|
@@ -14,6 +15,7 @@ export * from './state/redux/Store';
|
|
|
14
15
|
export * from './jupyter/services/Services';
|
|
15
16
|
export * from './jupyter/kernel/Kernel';
|
|
16
17
|
export * from './jupyter/kernel/KernelModel';
|
|
18
|
+
export * from './components/button/Button';
|
|
17
19
|
export * from './components/cell/Cell';
|
|
18
20
|
export * from './components/cell/CellAdapter';
|
|
19
21
|
export * from './components/cell/CellRedux';
|
|
@@ -52,6 +54,7 @@ export * from './components/settings/Settings';
|
|
|
52
54
|
export * from './components/settings/SettingsRedux';
|
|
53
55
|
export * from './components/terminal/Terminal';
|
|
54
56
|
export * from './components/terminal/TerminalRedux';
|
|
57
|
+
export * from './components/textinput/TextInput';
|
|
55
58
|
export * from './components/viewer/Viewer';
|
|
56
59
|
export * from './components/viewer/input/InputViewer';
|
|
57
60
|
export * from './components/viewer/output/OutputViewer';
|
package/lib/index.js
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
// Jupyter.
|
|
7
7
|
export * from './jupyter/Jupyter';
|
|
8
|
+
export * from './jupyter/theme';
|
|
8
9
|
export * from './jupyter/JupyterContext';
|
|
9
10
|
export * from './jupyter/JupyterConfig';
|
|
10
11
|
export * from './jupyter/lab/JupyterLabCss';
|
|
@@ -25,6 +26,8 @@ export * from './jupyter/services/Services';
|
|
|
25
26
|
// Kernel.
|
|
26
27
|
export * from './jupyter/kernel/Kernel';
|
|
27
28
|
export * from './jupyter/kernel/KernelModel';
|
|
29
|
+
// Button
|
|
30
|
+
export * from './components/button/Button';
|
|
28
31
|
// Cell.
|
|
29
32
|
export * from './components/cell/Cell';
|
|
30
33
|
export * from './components/cell/CellAdapter';
|
|
@@ -77,6 +80,8 @@ export * from './components/settings/SettingsRedux';
|
|
|
77
80
|
// Terminal.
|
|
78
81
|
export * from './components/terminal/Terminal';
|
|
79
82
|
export * from './components/terminal/TerminalRedux';
|
|
83
|
+
// TextInput
|
|
84
|
+
export * from './components/textinput/TextInput';
|
|
80
85
|
// Viewer.
|
|
81
86
|
export * from './components/viewer/Viewer';
|
|
82
87
|
export * from './components/viewer/input/InputViewer';
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,WAAW;AACX,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,6BAA6B,CAAC;AAE5C,OAAO;AACP,cAAc,2BAA2B,CAAC;AAE1C,SAAS;AACT,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,iCAAiC,CAAC;AAChD,cAAc,mCAAmC,CAAC;AAClD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,oCAAoC,CAAC;AAEnD,eAAe;AACf,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AAEpC,YAAY;AACZ,cAAc,6BAA6B,CAAC;AAE5C,UAAU;A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AAClE,cAAc,wDAAwD,CAAC;AACvE,cAAc,0DAA0D,CAAC;AACzE,cAAc,sDAAsD,CAAC;AACrE,cAAc,gDAAgD,CAAC;AAC/D,cAAc,mDAAmD,CAAC;AAElE,cAAc;AACd,cAAc,yCAAyC,CAAC;AACxD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,4CAA4C,CAAC;AAE3D,YAAY;AACZ,cAAc,gCAAgC,CAAC;AAC/C,cAAc,qCAAqC,CAAC;AAEpD,WAAW;AACX,cAAc,8BAA8B,CAAC;AAC7C,cAAc,mCAAmC,CAAC;AAElD,UAAU;AACV,cAAc,4BAA4B,CAAC;AAE3C,gBAAgB;AAChB,cAAc,sCAAsC,CAAC;AAErD,gBAAgB;AAChB,cAAc,2CAA2C,CAAC;AAE1D,qCAAqC;AACrC,cAAc,gDAAgD,CAAC;AAE/D,WAAW;AACX,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mCAAmC,CAAC;AAClD,cAAc,iCAAiC,CAAC;AAChD,cAAc,sCAAsC,CAAC;AAErD,YAAY;AACZ,cAAc,gCAAgC,CAAC;AAC/C,cAAc,qCAAqC,CAAC;AAEpD,YAAY;AACZ,cAAc,gCAAgC,CAAC;AAC/C,cAAc,qCAAqC,CAAC;AAEpD,YAAY;AACZ,cAAc,kCAAkC,CAAC;AAEjD,UAAU;AACV,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uCAAuC,CAAC;AACtD,cAAc,yCAAyC,CAAC;AAExD,QAAQ;AACR,cAAc,eAAe,CAAC"}
|
package/lib/jupyter/Jupyter.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { InjectableStore } from '../state/redux/Store';
|
|
3
|
-
import { JupyterLabTheme } from
|
|
3
|
+
import { JupyterLabTheme } from './lab/JupyterLabTheme';
|
|
4
4
|
/**
|
|
5
5
|
* Definition of the properties that can be passed
|
|
6
6
|
* when creating a Jupyter context.
|
package/lib/jupyter/Jupyter.js
CHANGED
|
@@ -5,18 +5,18 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
5
5
|
* MIT License
|
|
6
6
|
*/
|
|
7
7
|
import { useMemo } from 'react';
|
|
8
|
-
import { ThemeProvider, BaseStyles, Box } from
|
|
8
|
+
import { ThemeProvider, BaseStyles, Box } from '@primer/react';
|
|
9
9
|
import { ErrorBoundary } from 'react-error-boundary';
|
|
10
10
|
import { JupyterContextProvider } from './JupyterContext';
|
|
11
11
|
import JupyterLabCss from './lab/JupyterLabCss';
|
|
12
|
-
import { getJupyterServerHttpUrl, getJupyterServerWsUrl, loadJupyterConfig } from './JupyterConfig';
|
|
12
|
+
import { getJupyterServerHttpUrl, getJupyterServerWsUrl, loadJupyterConfig, } from './JupyterConfig';
|
|
13
13
|
import defaultInjectableStore from '../state/redux/Store';
|
|
14
|
-
import
|
|
14
|
+
import { jupyterTheme } from './theme';
|
|
15
15
|
/**
|
|
16
16
|
* The component to be used as fallback in case of error.
|
|
17
17
|
*/
|
|
18
18
|
const ErrorFallback = ({ error, resetErrorBoundary }) => {
|
|
19
|
-
return (_jsxs("div", { role: "alert", children: [_jsx("p", { children: "Oops, something went wrong." }), _jsx("pre", { children: error.message }), _jsx("div", { style: { visibility:
|
|
19
|
+
return (_jsxs("div", { role: "alert", children: [_jsx("p", { children: "Oops, something went wrong." }), _jsx("pre", { children: error.message }), _jsx("div", { style: { visibility: 'hidden' }, children: _jsx("button", { onClick: resetErrorBoundary, children: "Try again" }) })] }));
|
|
20
20
|
};
|
|
21
21
|
/**
|
|
22
22
|
* The Jupyter context. This handles the needed initialization
|
|
@@ -28,7 +28,9 @@ export const Jupyter = (props) => {
|
|
|
28
28
|
const config = useMemo(() => {
|
|
29
29
|
return loadJupyterConfig(props);
|
|
30
30
|
}, [props]);
|
|
31
|
-
return (_jsx(ErrorBoundary, { FallbackComponent: ErrorFallback, onReset: () => {
|
|
31
|
+
return (_jsx(ErrorBoundary, { FallbackComponent: ErrorFallback, onReset: () => {
|
|
32
|
+
console.log('Error Boundary reset has been invoked...');
|
|
33
|
+
}, children: _jsx(ThemeProvider, { theme: jupyterTheme, colorMode: theme === 'light' ? 'day' : 'night', dayScheme: "light", nightScheme: "dark", children: _jsx(BaseStyles, { children: _jsxs(Box, { color: "fg.default", bg: "canvas.default", children: [!config.insideJupyterLab && !disableCssLoading && (_jsx(JupyterLabCss, { theme: theme })), _jsx(JupyterContextProvider, { baseUrl: getJupyterServerHttpUrl(), collaborative: collaborative, defaultKernelName: defaultKernelName, disableCssLoading: disableCssLoading, injectableStore: injectableStore || defaultInjectableStore, lite: lite, startDefaultKernel: startDefaultKernel, theme: theme, useRunningKernelId: useRunningKernelId, useRunningKernelIndex: useRunningKernelIndex ?? -1, variant: "default", wsUrl: getJupyterServerWsUrl(), children: children })] }) }) }) }));
|
|
32
34
|
};
|
|
33
35
|
Jupyter.defaultProps = {
|
|
34
36
|
collaborative: false,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Jupyter.js","sourceRoot":"","sources":["../../src/jupyter/Jupyter.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;AAEH,OAAc,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,aAAa,
|
|
1
|
+
{"version":3,"file":"Jupyter.js","sourceRoot":"","sources":["../../src/jupyter/Jupyter.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;AAEH,OAAc,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,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AO,EAC9C,SAAS,EAAC,OAAO,EACjB,WAAW,EAAC,MAAM,YAElB,KAAC,UAAU,cACT,MAAC,GAAG,IAAC,KAAK,EAAC,YAAY,EAAC,EAAE,EAAC,gBAAgB,aACxC,CAAC,MAAM,CAAC,gBAAgB,IAAI,CAAC,iBAAiB,IAAI,CACjD,KAAC,aAAa,IAAC,KAAK,EAAE,KAAK,GAAI,CAChC,EACD,KAAC,sBAAsB,IACrB,OAAO,EAAE,uBAAuB,EAAE,EAClC,aAAa,EAAE,aAAa,EAC5B,iBAAiB,EAAE,iBAAiB,EACpC,iBAAiB,EAAE,iBAAiB,EACpC,eAAe,EAAE,eAAe,IAAI,sBAAsB,EAC1D,IAAI,EAAE,IAAI,EACV,kBAAkB,EAAE,kBAAkB,EACtC,KAAK,EAAE,KAAK,EACZ,kBAAkB,EAAE,kBAAkB,EACtC,qBAAqB,EAAE,qBAAqB,IAAI,CAAC,CAAC,EAClD,OAAO,EAAC,SAAS,EACjB,KAAK,EAAE,qBAAqB,EAAE,YAE7B,QAAQ,GACc,IACrB,GACK,GACC,GACF,CACjB,CAAC;AACJ,CAAC,CAAC;AAEF,OAAO,CAAC,YAAY,GAAG;IACrB,aAAa,EAAE,KAAK;IACpB,iBAAiB,EAAE,QAAQ;IAC3B,iBAAiB,EAAE,KAAK;IACxB,IAAI,EAAE,KAAK;IACX,kBAAkB,EAAE,IAAI;IACxB,SAAS,EAAE,KAAK;IAChB,KAAK,EAAE,OAAO;IACd,qBAAqB,EAAE,CAAC,CAAC;CAC1B,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
|
@@ -49,12 +49,19 @@ export const getJupyterToken = () => config.jupyterToken;
|
|
|
49
49
|
* host HTML page.
|
|
50
50
|
*/
|
|
51
51
|
export const loadJupyterConfig = (props) => {
|
|
52
|
-
const { lite, jupyterServerHttpUrl, jupyterServerWsUrl, collaborative, terminals, jupyterToken } = props;
|
|
52
|
+
const { lite, jupyterServerHttpUrl, jupyterServerWsUrl, collaborative, terminals, jupyterToken, } = props;
|
|
53
53
|
const datalayerConfigData = document.getElementById('datalayer-config-data');
|
|
54
54
|
if (datalayerConfigData) {
|
|
55
55
|
config = JSON.parse(datalayerConfigData.textContent || '');
|
|
56
|
-
setJupyterServerHttpUrl(jupyterServerHttpUrl ??
|
|
57
|
-
|
|
56
|
+
setJupyterServerHttpUrl(jupyterServerHttpUrl ??
|
|
57
|
+
config.jupyterServerHttpUrl ??
|
|
58
|
+
location.protocol + '//' + location.host + '/api/jupyter');
|
|
59
|
+
setJupyterServerWsUrl(jupyterServerWsUrl ??
|
|
60
|
+
config.jupyterServerWsUrl ??
|
|
61
|
+
location.protocol.replace('http', 'ws') +
|
|
62
|
+
'//' +
|
|
63
|
+
location.host +
|
|
64
|
+
'/api/jupyter');
|
|
58
65
|
setJupyterToken(jupyterToken ?? config.jupyterToken ?? '');
|
|
59
66
|
}
|
|
60
67
|
else {
|
|
@@ -62,21 +69,31 @@ export const loadJupyterConfig = (props) => {
|
|
|
62
69
|
const jupyterConfigData = document.getElementById('jupyter-config-data');
|
|
63
70
|
if (jupyterConfigData) {
|
|
64
71
|
const jupyterConfig = JSON.parse(jupyterConfigData.textContent || '');
|
|
65
|
-
setJupyterServerHttpUrl(jupyterServerHttpUrl ??
|
|
66
|
-
|
|
72
|
+
setJupyterServerHttpUrl(jupyterServerHttpUrl ??
|
|
73
|
+
location.protocol + '//' + location.host + jupyterConfig.baseUrl);
|
|
74
|
+
setJupyterServerWsUrl(jupyterServerWsUrl ?? location.protocol === 'https'
|
|
75
|
+
? 'wss://' + location.host
|
|
76
|
+
: 'ws://' + location.host + jupyterConfig.baseUrl);
|
|
67
77
|
setJupyterToken(jupyterToken ?? jupyterConfig.token);
|
|
68
78
|
config.insideJupyterLab = jupyterConfig.appName === 'JupyterLab';
|
|
69
79
|
}
|
|
70
80
|
else {
|
|
71
81
|
// No Datalayer and no JupyterLab Config.
|
|
72
|
-
setJupyterServerHttpUrl(jupyterServerHttpUrl ??
|
|
73
|
-
|
|
82
|
+
setJupyterServerHttpUrl(jupyterServerHttpUrl ??
|
|
83
|
+
location.protocol + '//' + location.host + '/api/jupyter');
|
|
84
|
+
setJupyterServerWsUrl(jupyterServerWsUrl ??
|
|
85
|
+
location.protocol.replace('http', 'ws') +
|
|
86
|
+
'//' +
|
|
87
|
+
location.host +
|
|
88
|
+
'/api/jupyter');
|
|
74
89
|
setJupyterToken(jupyterToken ?? '');
|
|
75
90
|
}
|
|
76
91
|
}
|
|
77
92
|
if (lite) {
|
|
78
93
|
setJupyterServerHttpUrl(location.protocol + '//' + location.host);
|
|
79
|
-
setJupyterServerWsUrl(location.protocol ===
|
|
94
|
+
setJupyterServerWsUrl(location.protocol === 'https'
|
|
95
|
+
? 'wss://' + location.host
|
|
96
|
+
: 'ws://' + location.host);
|
|
80
97
|
}
|
|
81
98
|
PageConfig.setOption('baseUrl', getJupyterServerHttpUrl());
|
|
82
99
|
PageConfig.setOption('wsUrl', getJupyterServerWsUrl());
|
|
@@ -90,7 +107,7 @@ export const loadJupyterConfig = (props) => {
|
|
|
90
107
|
// PageConfig.getOption('hubPrefix')
|
|
91
108
|
// PageConfig.getOption('hubUser')
|
|
92
109
|
// PageConfig.getOption('hubServerName')
|
|
93
|
-
config.insideJupyterHub = PageConfig.getOption('hubHost') !==
|
|
110
|
+
config.insideJupyterHub = PageConfig.getOption('hubHost') !== '';
|
|
94
111
|
return config;
|
|
95
112
|
};
|
|
96
113
|
//# sourceMappingURL=JupyterConfig.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JupyterConfig.js","sourceRoot":"","sources":["../../src/jupyter/JupyterConfig.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAcnD;;GAEG;AACH,IAAI,MAAM,GAAmB;IAC3B,oBAAoB,EAAE,EAAE;IACxB,kBAAkB,EAAE,EAAE;IACtB,YAAY,EAAE,EAAE;IAChB,gBAAgB,E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F,UAAU,CAAC,SAAS,CAAC,eAAe,EAAE,yBAAyB,CAAC,CAAC;IACjE,mCAAmC;IACnC,qCAAqC;IACrC,mCAAmC;IACnC,yCAAyC;IACzC,MAAM,CAAC,gBAAgB,GAAG,UAAU,CAAC,SAAS,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC;IACjE,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import React from
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { ServiceManager, ServerConnection, KernelManager } from '@jupyterlab/services';
|
|
3
3
|
import { InjectableStore } from '../state/redux/Store';
|
|
4
4
|
import Kernel from './kernel/Kernel';
|
|
5
|
-
import { JupyterLabTheme } from
|
|
5
|
+
import { JupyterLabTheme } from './lab/JupyterLabTheme';
|
|
6
6
|
/**
|
|
7
7
|
* The type for the Jupyter context.
|
|
8
8
|
*/
|
|
@@ -4,9 +4,9 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
4
4
|
*
|
|
5
5
|
* MIT License
|
|
6
6
|
*/
|
|
7
|
-
import { useState, useEffect, useContext, createContext } from
|
|
8
|
-
import { Provider as ReduxProvider } from
|
|
9
|
-
import { ServiceManager, ServerConnection } from '@jupyterlab/services';
|
|
7
|
+
import { useState, useEffect, useContext, createContext } from 'react';
|
|
8
|
+
import { Provider as ReduxProvider } from 'react-redux';
|
|
9
|
+
import { ServiceManager, ServerConnection, } from '@jupyterlab/services';
|
|
10
10
|
import { getJupyterServerHttpUrl, getJupyterToken } from './JupyterConfig';
|
|
11
11
|
import { requestAPI } from './JupyterHandlers';
|
|
12
12
|
import { startLiteServer } from './../jupyter/lite/LiteServer';
|
|
@@ -18,7 +18,7 @@ export const JupyterContext = createContext(undefined);
|
|
|
18
18
|
export const useJupyter = () => {
|
|
19
19
|
const context = useContext(JupyterContext);
|
|
20
20
|
if (!context)
|
|
21
|
-
throw new Error(
|
|
21
|
+
throw new Error('useContext must be inside a provider with a value.');
|
|
22
22
|
return context;
|
|
23
23
|
};
|
|
24
24
|
/**
|
|
@@ -34,7 +34,8 @@ const JupyterProvider = JupyterContext.Provider;
|
|
|
34
34
|
* with the Jupyter server.
|
|
35
35
|
*/
|
|
36
36
|
export const ensureJupyterAuth = (serverSettings) => {
|
|
37
|
-
return requestAPI(serverSettings, 'api', '')
|
|
37
|
+
return requestAPI(serverSettings, 'api', '')
|
|
38
|
+
.then(data => {
|
|
38
39
|
return true;
|
|
39
40
|
})
|
|
40
41
|
.catch(reason => {
|
|
@@ -61,13 +62,13 @@ export const createServerSettings = (baseUrl, wsUrl) => {
|
|
|
61
62
|
credentials: 'include',
|
|
62
63
|
cache: 'no-cache',
|
|
63
64
|
// headers,
|
|
64
|
-
}
|
|
65
|
+
},
|
|
65
66
|
});
|
|
66
67
|
};
|
|
67
68
|
/**
|
|
68
69
|
* The Jupyter context provider.
|
|
69
70
|
*/
|
|
70
|
-
export const JupyterContextProvider =
|
|
71
|
+
export const JupyterContextProvider = props => {
|
|
71
72
|
const { children, lite, collaborative, startDefaultKernel, defaultKernelName, disableCssLoading, useRunningKernelId, useRunningKernelIndex, variant, baseUrl, wsUrl, injectableStore, theme, } = props;
|
|
72
73
|
const [_, setVariant] = useState('default');
|
|
73
74
|
const [serverSettings] = useState(createServerSettings(baseUrl ?? '', wsUrl ?? ''));
|
|
@@ -78,7 +79,8 @@ export const JupyterContextProvider = (props) => {
|
|
|
78
79
|
if (lite) {
|
|
79
80
|
startLiteServer().then((serviceManager) => {
|
|
80
81
|
setServiceManager(serviceManager);
|
|
81
|
-
const kernelManager = serviceManager.sessions
|
|
82
|
+
const kernelManager = serviceManager.sessions
|
|
83
|
+
._kernelManager;
|
|
82
84
|
setKernelManager(kernelManager);
|
|
83
85
|
kernelManager.ready.then(() => {
|
|
84
86
|
console.log('Kernel Manager is ready', kernelManager);
|
|
@@ -87,7 +89,7 @@ export const JupyterContextProvider = (props) => {
|
|
|
87
89
|
kernelManager,
|
|
88
90
|
kernelName: defaultKernelName,
|
|
89
91
|
kernelSpecName: defaultKernelName,
|
|
90
|
-
kernelType:
|
|
92
|
+
kernelType: 'notebook',
|
|
91
93
|
serverSettings,
|
|
92
94
|
});
|
|
93
95
|
kernel.ready.then(() => {
|
|
@@ -106,17 +108,19 @@ export const JupyterContextProvider = (props) => {
|
|
|
106
108
|
window.location.replace(loginUrl);
|
|
107
109
|
}
|
|
108
110
|
if (useRunningKernelId && useRunningKernelIndex > -1) {
|
|
109
|
-
throw new Error(
|
|
111
|
+
throw new Error('You can not ask for useRunningKernelId and useRunningKernelIndex at the same time.');
|
|
110
112
|
}
|
|
111
|
-
if (startDefaultKernel &&
|
|
112
|
-
|
|
113
|
+
if (startDefaultKernel &&
|
|
114
|
+
(useRunningKernelId || useRunningKernelIndex > -1)) {
|
|
115
|
+
throw new Error('You can not ask for startDefaultKernel and (useRunningKernelId or useRunningKernelIndex) at the same time.');
|
|
113
116
|
}
|
|
114
117
|
const serviceManager = new ServiceManager({ serverSettings });
|
|
115
118
|
setServiceManager(serviceManager);
|
|
116
|
-
const kernelManager = serviceManager.sessions
|
|
119
|
+
const kernelManager = serviceManager.sessions
|
|
120
|
+
._kernelManager;
|
|
117
121
|
setKernelManager(kernelManager);
|
|
118
122
|
kernelManager.ready.then(() => {
|
|
119
|
-
console.log('
|
|
123
|
+
console.log('Kernel Manager is ready.');
|
|
120
124
|
/*
|
|
121
125
|
const running = kernelManager.running();
|
|
122
126
|
let kernel = running.next();
|
|
@@ -138,7 +142,7 @@ export const JupyterContextProvider = (props) => {
|
|
|
138
142
|
kernelName: defaultKernelName,
|
|
139
143
|
kernelSpecName: defaultKernelName,
|
|
140
144
|
kernelModel: kernel.value,
|
|
141
|
-
kernelType:
|
|
145
|
+
kernelType: 'notebook',
|
|
142
146
|
serverSettings,
|
|
143
147
|
}));
|
|
144
148
|
break;
|
|
@@ -153,11 +157,11 @@ export const JupyterContextProvider = (props) => {
|
|
|
153
157
|
kernelManager,
|
|
154
158
|
kernelName: defaultKernelName,
|
|
155
159
|
kernelSpecName: defaultKernelName,
|
|
156
|
-
kernelType:
|
|
160
|
+
kernelType: 'notebook',
|
|
157
161
|
serverSettings,
|
|
158
162
|
});
|
|
159
163
|
defaultKernel.ready.then(() => {
|
|
160
|
-
console.log(
|
|
164
|
+
console.log('Kernel is ready', defaultKernel);
|
|
161
165
|
setKernel(defaultKernel);
|
|
162
166
|
});
|
|
163
167
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JupyterContext.js","sourceRoot":"","sources":["../../src/jupyter/JupyterContext.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;AAEH,OAAc,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC9E,OAAO,EAAE,QAAQ,IAAI,aAAa,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,
|
|
1
|
+
{"version":3,"file":"JupyterContext.js","sourceRoot":"","sources":["../../src/jupyter/JupyterContext.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;AAEH,OAAc,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC9E,OAAO,EAAE,QAAQ,IAAI,aAAa,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EACL,cAAc,EACd,gBAAgB,GAEjB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,uBAAuB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAC3E,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAE/D,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAsBrC;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,aAAa,CACzC,SAAS,CACV,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG,GAAuB,EAAE;IACjD,MAAM,OAAO,GAA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AK;aACN,YAEA,QAAQ,GACO,GACJ,CACjB,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JupyterHandlers.js","sourceRoot":"","sources":["../../src/jupyter/JupyterHandlers.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,gBAAgB,MAAM,oBAAoB,CAAC;AAElD;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,UAAU,CAC9B,cAA0C,EAC1C,SAAS,GAAG,KAAK,EACjB,QAAQ,GAAG,EAAE,EACb,OAAoB,EAAE;IAEtB,mCAAmC;IACnC,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,
|
|
1
|
+
{"version":3,"file":"JupyterHandlers.js","sourceRoot":"","sources":["../../src/jupyter/JupyterHandlers.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,gBAAgB,MAAM,oBAAoB,CAAC;AAElD;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,UAAU,CAC9B,cAA0C,EAC1C,SAAS,GAAG,KAAK,EACjB,QAAQ,GAAG,EAAE,EACb,OAAoB,EAAE;IAEtB,mCAAmC;IACnC,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC;IAC5E,IAAI,QAAkB,CAAC;IACvB,IAAI;QACF,QAAQ,GAAG,MAAM,gBAAgB,CAAC,WAAW,CAC3C,UAAU,EACV,IAAI,EACJ,cAAc,CACf,CAAC;QACF,IAAI,QAAQ,CAAC,MAAM,KAAK,GAAG,EAAE;YAC3B,MAAM,IAAI,gBAAgB,EAAE,CAAC;SAC9B;KACF;IAAC,OAAO,KAAK,EAAE;QACd,MAAM,IAAI,gBAAgB,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;KAChD;IACD,IAAI,IAAI,GAAQ,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;IACtC,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE;QACnB,IAAI;YACF,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;SACzB;QAAC,OAAO,KAAK,EAAE;YACd,OAAO,CAAC,IAAI,CAAC,2BAA2B,EAAE,QAAQ,CAAC,CAAC;SACrD;KACF;IACD,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE;QAChB,MAAM,IAAI,gBAAgB,CAAC,aAAa,CAAC,QAAQ,EAAE,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,CAAC;KAC1E;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IPyWidgetsAttached.js","sourceRoot":"","sources":["../../../src/jupyter/ipywidgets/IPyWidgetsAttached.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;AAEH,OAAO,qBAAqB,MAAM,yBAAyB,CAAC;AAO5D;;;GAGG;AACH,MAAM,kBAAkB,GAAG,CAAC,KAAY,EAAE,EAAE;IAC1C,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC;IAC9B,OAAO,CACL,
|
|
1
|
+
{"version":3,"file":"IPyWidgetsAttached.js","sourceRoot":"","sources":["../../../src/jupyter/ipywidgets/IPyWidgetsAttached.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;AAEH,OAAO,qBAAqB,MAAM,yBAAyB,CAAC;AAO5D;;;GAGG;AACH,MAAM,kBAAkB,GAAG,CAAC,KAAY,EAAE,EAAE;IAC1C,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC;IAC9B,OAAO,CACL,cACE,GAAG,EAAE,GAAG,CAAC,EAAE;YACT,IAAI,GAAG,EAAE;gBACP,IAAI,OAAO,GAAG,IAAI,qBAAqB,CAAC,GAAG,CAAC,CAAC;gBAC7C,OAAO;qBACJ,SAAS,CAAC,KAAK,CAAC;qBAChB,IAAI,CAAC,CAAC,MAAW,EAAE,EAAE,CACpB,OAAO,CAAC,WAAW,CACjB,MAAM,CAAC,IAAI,CACT,CAAC,OAAY,EAAE,EAAE,CAAC,OAAO,CAAC,QAAQ,KAAK,IAAI,CAAC,QAAQ,CACrD,CACF,CACF;qBACA,IAAI,CAAC,CAAC,IAAS,EAAE,EAAE,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC;aACpD;QACH,CAAC,GACD,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IPyWidgetsViewManager.js","sourceRoot":"","sources":["../../../src/jupyter/ipywidgets/IPyWidgetsViewManager.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,WAAW,
|
|
1
|
+
{"version":3,"file":"IPyWidgetsViewManager.js","sourceRoot":"","sources":["../../../src/jupyter/ipywidgets/IPyWidgetsViewManager.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,KAAK,IAAI,MAAM,uBAAuB,CAAC;AAC9C,OAAO,KAAK,QAAQ,MAAM,2BAA2B,CAAC;AAEtD,MAAM,OAAO,qBAAsB,SAAQ,WAAW;IAC5C,EAAE,CAAC;IACX,YAAY,EAAO;QACjB,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC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UAAU,IAAI;YAC9C,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC;YAC1C,OAAO,IAAI,CAAC;QACd,CAAC,CAAC,CAAC;IACL,CAAC;IACD,cAAc;QACZ,OAAO,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IAC7B,CAAC;IACD,YAAY;QACV,OAAO,OAAO,CAAC,MAAM,CAAC,oBAAoB,CAAC,CAAC;IAC9C,CAAC;CACF;AAED,eAAe,qBAAqB,CAAC"}
|
|
@@ -18,7 +18,7 @@ export declare const WIDGET_STATE_MIMETYPE = "application/vnd.jupyter.widget-sta
|
|
|
18
18
|
/**
|
|
19
19
|
* A widget manager that returns Lumino widgets.
|
|
20
20
|
*/
|
|
21
|
-
export declare abstract class
|
|
21
|
+
export declare abstract class BaseWidgetManager extends ManagerBase implements IDisposable {
|
|
22
22
|
constructor(rendermime: IRenderMimeRegistry);
|
|
23
23
|
/**
|
|
24
24
|
* Default callback handler to emit unhandled kernel messages.
|
|
@@ -27,7 +27,7 @@ export declare abstract class LabWidgetManager extends ManagerBase implements ID
|
|
|
27
27
|
/**
|
|
28
28
|
* Register a new kernel
|
|
29
29
|
*/
|
|
30
|
-
protected _handleKernelChanged({ oldValue, newValue, }: Session.ISessionConnection.IKernelChangedArgs): void;
|
|
30
|
+
protected _handleKernelChanged({ oldValue: oldKernel, newValue: newKernel, }: Session.ISessionConnection.IKernelChangedArgs): void;
|
|
31
31
|
/**
|
|
32
32
|
* Disconnect the widget manager from the kernel, setting each model's comm
|
|
33
33
|
* as dead.
|
|
@@ -98,7 +98,7 @@ export declare abstract class LabWidgetManager extends ManagerBase implements ID
|
|
|
98
98
|
* @returns A state dictionary
|
|
99
99
|
*/
|
|
100
100
|
get_state_sync(options?: IStateOptions): ReadonlyPartialJSONValue;
|
|
101
|
-
protected _handleCommOpen: (comm: Kernel.IComm,
|
|
101
|
+
protected _handleCommOpen: (comm: Kernel.IComm, message: KernelMessage.ICommOpenMsg) => Promise<void>;
|
|
102
102
|
protected _restored: Signal<this, void>;
|
|
103
103
|
protected _restoredStatus: boolean;
|
|
104
104
|
protected _kernelRestoreInProgress: boolean;
|
|
@@ -112,7 +112,7 @@ export declare abstract class LabWidgetManager extends ManagerBase implements ID
|
|
|
112
112
|
/**
|
|
113
113
|
* A widget manager that returns Lumino widgets.
|
|
114
114
|
*/
|
|
115
|
-
export declare class KernelWidgetManager extends
|
|
115
|
+
export declare class KernelWidgetManager extends BaseWidgetManager {
|
|
116
116
|
constructor(kernel: Kernel.IKernelConnection, rendermime: IRenderMimeRegistry);
|
|
117
117
|
_handleKernelConnectionStatusChange(status: Kernel.ConnectionStatus): void;
|
|
118
118
|
_handleKernelStatusChange(status: Kernel.Status): void;
|
|
@@ -128,10 +128,10 @@ export declare class KernelWidgetManager extends LabWidgetManager {
|
|
|
128
128
|
private _kernel;
|
|
129
129
|
}
|
|
130
130
|
/**
|
|
131
|
-
* A widget manager that returns
|
|
131
|
+
* A widget manager that returns Lumino widgets.
|
|
132
132
|
*/
|
|
133
|
-
export declare class
|
|
134
|
-
constructor(context: DocumentRegistry.IContext<INotebookModel>, rendermime: IRenderMimeRegistry, settings:
|
|
133
|
+
export declare class NotebookWidgetManager extends BaseWidgetManager {
|
|
134
|
+
constructor(context: DocumentRegistry.IContext<INotebookModel>, rendermime: IRenderMimeRegistry, settings: NotebookWidgetManager.Settings, kernelConnection: Kernel.IKernelConnection | null);
|
|
135
135
|
/**
|
|
136
136
|
* Save the widget state to the context model.
|
|
137
137
|
*/
|
|
@@ -165,6 +165,7 @@ export declare class WidgetManager extends LabWidgetManager {
|
|
|
165
165
|
register_model(model_id: string, modelPromise: Promise<WidgetModel>): void;
|
|
166
166
|
/**
|
|
167
167
|
* Close all widgets and empty the widget state.
|
|
168
|
+
*
|
|
168
169
|
* @return Promise that resolves when the widget state is cleared.
|
|
169
170
|
*/
|
|
170
171
|
clear_state(): Promise<void>;
|
|
@@ -177,7 +178,7 @@ export declare class WidgetManager extends LabWidgetManager {
|
|
|
177
178
|
private _context;
|
|
178
179
|
private _settings;
|
|
179
180
|
}
|
|
180
|
-
export declare namespace
|
|
181
|
+
export declare namespace NotebookWidgetManager {
|
|
181
182
|
type Settings = {
|
|
182
183
|
saveState: boolean;
|
|
183
184
|
};
|