@datalayer/jupyter-react 2.0.0 → 2.0.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 +38 -5
- package/lib/app/App.js +1 -1
- package/lib/app/JupyterReact.js +4 -4
- package/lib/app/index.js +1 -1
- package/lib/app/tabs/ComponentsTab.js +5 -5
- package/lib/app/tabs/components/CellComponent.js +2 -2
- package/lib/app/tabs/components/FileBrowserComponent.js +2 -2
- package/lib/app/tabs/components/IPyWidgetsComponent.js +2 -2
- package/lib/app/tabs/components/NotebookComponent.js +4 -4
- package/lib/app/tabs/components/ViewerComponent.js +1 -1
- package/lib/cell.d.ts +7 -0
- package/lib/cell.js +13 -0
- package/lib/cell.js.map +1 -0
- package/lib/components/button/index.js +1 -1
- package/lib/components/cell/Cell.js +13 -8
- package/lib/components/cell/Cell.js.map +1 -1
- package/lib/components/cell/CellAdapter.js +6 -6
- package/lib/components/cell/index.js +4 -4
- package/lib/components/codemirror/CodeMirrorEditor.js +3 -3
- package/lib/components/codemirror/index.js +4 -4
- package/lib/components/commands/Commands.js +2 -2
- package/lib/components/commands/index.js +2 -2
- package/lib/components/console/Console.js +4 -4
- package/lib/components/console/index.js +3 -3
- package/lib/components/dialog/Dialog.js +2 -2
- package/lib/components/dialog/index.js +2 -2
- package/lib/components/environment/index.js +1 -1
- package/lib/components/filebrowser/FileBrowser.js +1 -1
- package/lib/components/filebrowser/index.js +1 -1
- package/lib/components/filemanager/FileManagerJupyterLab.js +3 -3
- package/lib/components/filemanager/index.js +2 -2
- package/lib/components/filemanager/lab/index.js +1 -1
- package/lib/components/index.js +19 -19
- package/lib/components/jupyterlab/JupyterLabApp.js +4 -4
- package/lib/components/jupyterlab/index.js +3 -3
- package/lib/components/kernel/KernelInspector.js +2 -2
- package/lib/components/kernel/KernelSelector.js +1 -1
- package/lib/components/kernel/KernelVariables.js +2 -2
- package/lib/components/kernel/Kernels.js +1 -1
- package/lib/components/kernel/index.js +13 -13
- package/lib/components/kernel/inspector/index.js +2 -2
- package/lib/components/kernel/inspector/widget.js +2 -2
- package/lib/components/kernel/variables/index.js +7 -7
- package/lib/components/kernel/variables/variablesinspector.js +5 -5
- package/lib/components/lumino/Lumino.js +0 -14
- package/lib/components/lumino/Lumino.js.map +1 -1
- package/lib/components/lumino/index.js +5 -5
- package/lib/components/notebook/Notebook.js +2 -13
- package/lib/components/notebook/Notebook.js.map +1 -1
- package/lib/components/notebook/NotebookAdapter.d.ts +32 -0
- package/lib/components/notebook/NotebookAdapter.js +59 -32
- package/lib/components/notebook/NotebookAdapter.js.map +1 -1
- package/lib/components/notebook/NotebookBase.d.ts +14 -12
- package/lib/components/notebook/NotebookBase.js +50 -100
- package/lib/components/notebook/NotebookBase.js.map +1 -1
- package/lib/components/notebook/NotebookState.d.ts +87 -0
- package/lib/components/notebook/NotebookState.js +147 -4
- package/lib/components/notebook/NotebookState.js.map +1 -1
- package/lib/components/notebook/cell/index.js +3 -3
- package/lib/components/notebook/cell/metadata/CellMetadataEditor.js +1 -1
- package/lib/components/notebook/cell/metadata/index.js +2 -2
- 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/index.js +3 -3
- package/lib/components/notebook/cell/sidebar/CellSidebar.js +2 -2
- package/lib/components/notebook/cell/sidebar/CellSidebarButton.js +2 -2
- package/lib/components/notebook/cell/sidebar/CellSidebarExtension.js +2 -2
- package/lib/components/notebook/cell/sidebar/CellSidebarRun.js +2 -2
- package/lib/components/notebook/cell/sidebar/index.js +4 -4
- package/lib/components/notebook/content/JupyterReactContentFactory.js +1 -1
- package/lib/components/notebook/content/index.js +1 -1
- package/lib/components/notebook/index.js +11 -11
- package/lib/components/notebook/marked/index.js +1 -1
- package/lib/components/notebook/model/index.js +1 -1
- package/lib/components/notebook/toolbar/NotebookToolbar.js +4 -8
- package/lib/components/notebook/toolbar/NotebookToolbar.js.map +1 -1
- package/lib/components/notebook/toolbar/index.js +1 -1
- package/lib/components/output/Output.js +8 -8
- package/lib/components/output/OutputAdapter.js +3 -3
- package/lib/components/output/OutputIPyWidgets.js +1 -1
- package/lib/components/output/index.js +6 -6
- package/lib/components/output/ipywidgets/IPyWidgetsAttached.js +1 -1
- package/lib/components/settings/Settings.js +2 -2
- package/lib/components/settings/index.js +2 -2
- package/lib/components/terminal/Terminal.js +4 -4
- package/lib/components/terminal/index.js +3 -3
- package/lib/components/textinput/index.js +1 -1
- package/lib/components/utils/index.js +2 -2
- package/lib/components/viewer/Viewer.js +3 -3
- package/lib/components/viewer/index.js +3 -3
- package/lib/components/viewer/input/CodemirrorViewer.js +2 -2
- package/lib/components/viewer/input/InputViewer.js +4 -4
- package/lib/components/viewer/input/index.js +2 -2
- package/lib/components/viewer/output/OutputViewer.js +2 -2
- package/lib/components/viewer/output/index.js +2 -2
- package/lib/console.d.ts +7 -0
- package/lib/console.js +13 -0
- package/lib/console.js.map +1 -0
- package/lib/core.d.ts +38 -0
- package/lib/core.js +48 -0
- package/lib/core.js.map +1 -0
- package/lib/examples/Bokeh.js +5 -5
- package/lib/examples/Bqplot.js +5 -5
- package/lib/examples/Cell.js +6 -6
- package/lib/examples/CellLite.js +3 -3
- package/lib/examples/Cells.js +3 -3
- package/lib/examples/CellsExecute.js +4 -4
- package/lib/examples/Console.js +2 -2
- package/lib/examples/ConsoleLite.js +2 -2
- package/lib/examples/Dashboard.js +5 -5
- package/lib/examples/Deno.js +5 -5
- package/lib/examples/Examples.js +1 -1
- package/lib/examples/Examples.js.map +1 -1
- package/lib/examples/FileBrowser.js +3 -3
- package/lib/examples/GeoJson.js +6 -6
- package/lib/examples/IPyLeaflet.js +5 -5
- package/lib/examples/IPyReact.js +5 -5
- package/lib/examples/IPyWidgets.js +5 -5
- package/lib/examples/IPyWidgetsState.js +5 -5
- package/lib/examples/JupyterContext.js +17 -17
- package/lib/examples/JupyterContext.js.map +1 -1
- package/lib/examples/JupyterLabApp.js +2 -2
- package/lib/examples/JupyterLabAppHeadless.js +3 -3
- package/lib/examples/JupyterLabAppHeadlessServerless.js +3 -3
- package/lib/examples/JupyterLabAppServerless.js +3 -3
- package/lib/examples/JupyterLabAppServiceManager.js +4 -4
- package/lib/examples/JupyterLabTheme.js +2 -2
- package/lib/examples/KernelExecute.js +3 -3
- package/lib/examples/KernelExecuteLite.js +4 -4
- package/lib/examples/KernelExecutor.js +3 -3
- package/lib/examples/KernelExecutorLite.js +4 -4
- package/lib/examples/Kernels.js +3 -3
- package/lib/examples/Lumino.js +2 -2
- package/lib/examples/Matplotlib.js +5 -5
- package/lib/examples/Notebook.js +4 -4
- package/lib/examples/Notebook.js.map +1 -1
- package/lib/examples/NotebookActions.js +6 -6
- package/lib/examples/NotebookActions.js.map +1 -1
- package/lib/examples/NotebookCellSidebar.js +6 -6
- package/lib/examples/NotebookCellToolbar.js +7 -7
- package/lib/examples/NotebookCollaborative.js +3 -3
- package/lib/examples/NotebookCollaborative.js.map +1 -1
- package/lib/examples/NotebookColormode.js +6 -6
- package/lib/examples/NotebookExtension.js +4 -4
- package/lib/examples/NotebookExternalContent.js +5 -5
- package/lib/examples/NotebookInit.js +13 -19
- package/lib/examples/NotebookInit.js.map +1 -1
- package/lib/examples/NotebookKernel.js +9 -9
- package/lib/examples/NotebookKernel.js.map +1 -1
- package/lib/examples/NotebookKernelChange.js +23 -17
- package/lib/examples/NotebookKernelChange.js.map +1 -1
- package/lib/examples/NotebookLess.js +5 -5
- package/lib/examples/NotebookLite.js +5 -5
- package/lib/examples/NotebookLite.js.map +1 -1
- package/lib/examples/NotebookLocalServer.js +6 -6
- package/lib/examples/NotebookNbformat.js +3 -3
- package/lib/examples/NotebookNbformatChange.js +8 -14
- package/lib/examples/NotebookNbformatChange.js.map +1 -1
- package/lib/examples/NotebookNoContext.js +6 -6
- package/lib/examples/NotebookNoPrimer.js +6 -6
- package/lib/examples/NotebookOnSessionConnection.js +3 -3
- package/lib/examples/NotebookPath.js +6 -6
- package/lib/examples/NotebookPathChange.js +4 -4
- package/lib/examples/NotebookReadonly.js +5 -5
- package/lib/examples/NotebookServiceManager.js +6 -6
- package/lib/examples/NotebookSkeleton.js +6 -6
- package/lib/examples/NotebookTOC.js +7 -7
- package/lib/examples/NotebookTheme.js +5 -5
- package/lib/examples/NotebookThemeColormode.js +4 -4
- package/lib/examples/NotebookURL.js +6 -6
- package/lib/examples/NotebookUnmount.js +5 -5
- package/lib/examples/ObservableHQ.js +5 -5
- package/lib/examples/OutputIPyWidgets.js +3 -3
- package/lib/examples/OutputWithMonitoring.js +5 -5
- package/lib/examples/Outputs.js +8 -8
- package/lib/examples/OutputsIpynb.js +3 -3
- package/lib/examples/Panel.js +6 -6
- package/lib/examples/Plotly.js +5 -5
- package/lib/examples/PyGWalker.js +5 -5
- package/lib/examples/RunningSessions.js +2 -2
- package/lib/examples/Terminal.js +2 -2
- package/lib/examples/Vega.js +6 -6
- package/lib/examples/Viewer.js +2 -2
- package/lib/examples/extensions/cellsidebars/CellSidebarSource.js +3 -3
- package/lib/examples/extensions/cellsidebars/index.js +1 -1
- package/lib/examples/extensions/celltoolbar/CellToolbar.js +1 -1
- package/lib/examples/extensions/celltoolbar/CellToolbarComponent.js +2 -3
- package/lib/examples/extensions/celltoolbar/CellToolbarComponent.js.map +1 -1
- package/lib/examples/extensions/celltoolbar/CellToolbarExtension.js +1 -1
- package/lib/examples/extensions/celltoolbar/CellToolbarWidget.js +1 -1
- package/lib/examples/extensions/celltoolbar/index.js +4 -4
- package/lib/examples/extensions/exectime/ExecTimeExtension.js +1 -1
- package/lib/examples/extensions/exectime/ExecTimeWidget.js +1 -1
- package/lib/examples/extensions/exectime/index.js +3 -3
- package/lib/examples/extensions/index.js +3 -3
- package/lib/examples/extensions/toc/ReactLayoutFactory.js +3 -3
- package/lib/examples/extensions/toc/ReactLayoutFactory.js.map +1 -1
- package/lib/examples/extensions/toc/TocComponent.d.ts +1 -2
- package/lib/examples/extensions/toc/TocComponent.js +29 -40
- package/lib/examples/extensions/toc/TocComponent.js.map +1 -1
- package/lib/examples/extensions/toc/TocExtension.js +1 -1
- package/lib/index.js +7 -7
- package/lib/jupyter/JupyterConfig.js +1 -1
- package/lib/jupyter/JupyterHandlers.js +1 -1
- package/lib/jupyter/JupyterUse.js +1 -1
- package/lib/jupyter/collaboration/CollaborationContext.js +1 -1
- package/lib/jupyter/collaboration/index.js +4 -4
- package/lib/jupyter/collaboration/providers/JupyterCollaborationProvider.js +2 -2
- package/lib/jupyter/collaboration/providers/NoOpCollaborationProvider.js +1 -1
- package/lib/jupyter/collaboration/providers/index.js +2 -2
- package/lib/jupyter/index.js +11 -11
- package/lib/jupyter/ipywidgets/classic/htmlmanager.js +1 -1
- package/lib/jupyter/ipywidgets/classic/index.js +3 -3
- package/lib/jupyter/ipywidgets/classic/manager.js +5 -5
- package/lib/jupyter/ipywidgets/index.js +5 -5
- package/lib/jupyter/ipywidgets/lab/index.js +2 -2
- package/lib/jupyter/ipywidgets/lab/manager.js +3 -3
- package/lib/jupyter/ipywidgets/libembed-amd.js +1 -1
- package/lib/jupyter/ipywidgets/libembed.js +1 -1
- package/lib/jupyter/kernel/Kernel.js +2 -7
- package/lib/jupyter/kernel/Kernel.js.map +1 -1
- package/lib/jupyter/kernel/KernelExecutor.js +3 -5
- package/lib/jupyter/kernel/KernelExecutor.js.map +1 -1
- package/lib/jupyter/kernel/index.js +3 -3
- package/lib/jupyter/lite/LiteServer.js +2 -2
- package/lib/jupyter/lite/contents/broadcast.js +2 -2
- package/lib/jupyter/lite/contents/contents.js +1 -1
- package/lib/jupyter/lite/contents/drivecontents.js +2 -2
- package/lib/jupyter/lite/contents/drivefs.js +1 -1
- package/lib/jupyter/lite/contents/index.js +6 -6
- package/lib/jupyter/lite/index.js +7 -7
- package/lib/jupyter/lite/javascript-kernel/comlink.worker.js +1 -1
- package/lib/jupyter/lite/javascript-kernel/index.js +2 -2
- package/lib/jupyter/lite/javascript-kernel/kernel.js +1 -1
- package/lib/jupyter/lite/javascript-kernel-extension/index.js +2 -2
- package/lib/jupyter/lite/kernel/index.js +4 -4
- package/lib/jupyter/lite/kernel/kernelspecs.js +1 -1
- package/lib/jupyter/lite/licenses/index.js +2 -2
- package/lib/jupyter/lite/licenses/licenses.js +1 -1
- package/lib/jupyter/lite/localforage/index.js +2 -2
- package/lib/jupyter/lite/pyodide-kernel/coincident.worker.js +2 -2
- package/lib/jupyter/lite/pyodide-kernel/comlink.worker.js +2 -2
- package/lib/jupyter/lite/pyodide-kernel/index.js +6 -6
- package/lib/jupyter/lite/pyodide-kernel/kernel.js +3 -3
- package/lib/jupyter/lite/pyodide-kernel-extension/index.js +3 -3
- package/lib/jupyter/lite/server/app.js +1 -1
- package/lib/jupyter/lite/server/index.js +4 -4
- package/lib/jupyter/lite/server-extension/index.js +8 -8
- package/lib/jupyter/lite/session/index.js +2 -2
- package/lib/jupyter/lite/settings/index.js +2 -2
- package/lib/jupyter/lite/translation/index.js +2 -2
- package/lib/jupyter/lite/types/index.js +1 -1
- package/lib/jupyter/renderers/index.js +1 -1
- package/lib/jupyter/renderers/plotly/index.js +1 -1
- package/lib/jupyter/services/ServiceManagerLite.js +1 -1
- package/lib/jupyter/services/index.d.ts +1 -0
- package/lib/jupyter/services/index.js +4 -3
- package/lib/jupyter/services/index.js.map +1 -1
- package/lib/jupyter/services/serviceManagerUtils.d.ts +73 -0
- package/lib/jupyter/services/serviceManagerUtils.js +132 -0
- package/lib/jupyter/services/serviceManagerUtils.js.map +1 -0
- package/lib/jupyter-context.d.ts +13 -0
- package/lib/jupyter-context.js +19 -0
- package/lib/jupyter-context.js.map +1 -0
- package/lib/lazy/JupyterSkeleton.d.ts +27 -0
- package/lib/lazy/JupyterSkeleton.js +32 -0
- package/lib/lazy/JupyterSkeleton.js.map +1 -0
- package/lib/lazy/LazyCell.d.ts +36 -0
- package/lib/lazy/LazyCell.js +46 -0
- package/lib/lazy/LazyCell.js.map +1 -0
- package/lib/lazy/LazyConsole.d.ts +26 -0
- package/lib/lazy/LazyConsole.js +32 -0
- package/lib/lazy/LazyConsole.js.map +1 -0
- package/lib/lazy/LazyNotebook.d.ts +30 -0
- package/lib/lazy/LazyNotebook.js +36 -0
- package/lib/lazy/LazyNotebook.js.map +1 -0
- package/lib/lazy/LazyOutput.d.ts +30 -0
- package/lib/lazy/LazyOutput.js +36 -0
- package/lib/lazy/LazyOutput.js.map +1 -0
- package/lib/lazy/LazyTerminal.d.ts +29 -0
- package/lib/lazy/LazyTerminal.js +35 -0
- package/lib/lazy/LazyTerminal.js.map +1 -0
- package/lib/lazy/LazyViewer.d.ts +29 -0
- package/lib/lazy/LazyViewer.js +35 -0
- package/lib/lazy/LazyViewer.js.map +1 -0
- package/lib/lazy/index.d.ts +21 -0
- package/lib/lazy/index.js +27 -0
- package/lib/lazy/index.js.map +1 -0
- package/lib/lazy-entry.d.ts +37 -0
- package/lib/lazy-entry.js +39 -0
- package/lib/lazy-entry.js.map +1 -0
- package/lib/lite-entry.d.ts +6 -0
- package/lib/lite-entry.js +14 -0
- package/lib/lite-entry.js.map +1 -0
- package/lib/notebook.d.ts +7 -0
- package/lib/notebook.js +13 -0
- package/lib/notebook.js.map +1 -0
- package/lib/output.d.ts +7 -0
- package/lib/output.js +13 -0
- package/lib/output.js.map +1 -0
- package/lib/state/JupyterReactState.js +15 -17
- package/lib/state/JupyterReactState.js.map +1 -1
- package/lib/state/index.js +1 -1
- package/lib/terminal.d.ts +7 -0
- package/lib/terminal.js +13 -0
- package/lib/terminal.js.map +1 -0
- package/lib/theme/JupyterReactTheme.js +3 -3
- package/lib/theme/index.js +6 -6
- package/lib/theme/themes/index.js +1 -1
- package/lib/theme-entry.d.ts +7 -0
- package/lib/theme-entry.js +13 -0
- package/lib/theme-entry.js.map +1 -0
- package/lib/tools/__tests__/operationRunner.test.js +8 -8
- package/lib/tools/core/executor.js +0 -6
- package/lib/tools/core/executor.js.map +1 -1
- package/lib/tools/core/index.d.ts +1 -0
- package/lib/tools/core/index.js +14 -13
- package/lib/tools/core/index.js.map +1 -1
- package/lib/tools/core/operationRunner.js +1 -1
- package/lib/tools/core/zodUtils.js +28 -0
- package/lib/tools/core/zodUtils.js.map +1 -1
- package/lib/tools/definitions/deleteCell.js +2 -2
- package/lib/tools/definitions/executeCode.js +2 -2
- package/lib/tools/definitions/index.js +7 -7
- package/lib/tools/definitions/insertCell.js +2 -2
- package/lib/tools/definitions/readAllCells.js +2 -2
- package/lib/tools/definitions/readCell.js +2 -2
- package/lib/tools/definitions/runCell.js +2 -2
- package/lib/tools/definitions/updateCell.js +2 -2
- package/lib/tools/index.js +16 -16
- package/lib/tools/operations/deleteCell.js +3 -3
- package/lib/tools/operations/executeCode.js +2 -2
- package/lib/tools/operations/insertCell.js +14 -5
- package/lib/tools/operations/insertCell.js.map +1 -1
- package/lib/tools/operations/readAllCells.js +2 -2
- package/lib/tools/operations/readCell.js +1 -1
- package/lib/tools/operations/runCell.js +3 -3
- package/lib/tools/operations/updateCell.js +2 -2
- package/lib/tools/schemas/index.js +7 -7
- package/lib/utils/Utils.js +1 -1
- package/lib/utils/index.js +2 -2
- package/lib/viewer.d.ts +7 -0
- package/lib/viewer.js +13 -0
- package/lib/viewer.js.map +1 -0
- package/package.json +129 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotebookKernelChange.js","sourceRoot":"","sources":["../../src/examples/NotebookKernelChange.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;AAEH,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"NotebookKernelChange.js","sourceRoot":"","sources":["../../src/examples/NotebookKernelChange.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;AAEH,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,KAAK,EAA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MAAC,GAAG,IAAC,EAAE,EAAE,CAAC,kCAAoB,cAAc,IAAO,IAC/C,EACL,OAAO,IAAI,CACV,KAAC,GAAG,cACF,KAAC,KAAK,cAAE,OAAO,GAAS,GACpB,CACP,EACA,cAAc,IAAI,aAAa,IAAI,CAClC,KAAC,QAAQ,IACP,EAAE,EAAE,WAAW,EACf,MAAM,EAAE,aAAa,EACrB,cAAc,EAAE,cAAc,EAC9B,IAAI,EAAC,YAAY,EACjB,MAAM,EAAC,OAAO,EACd,UAAU,EAAE,UAAU,GACtB,CACH,IACiB,CACrB,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,GAAG,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;AAC1C,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;AAC/B,MAAM,IAAI,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC;AAE7B,IAAI,CAAC,MAAM,CAAC,KAAC,2BAA2B,KAAG,CAAC,CAAC"}
|
|
@@ -7,11 +7,11 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
7
7
|
import { useMemo } from 'react';
|
|
8
8
|
import { createRoot } from 'react-dom/client';
|
|
9
9
|
import { Box } from '@datalayer/primer-addons';
|
|
10
|
-
import { ServiceManagerLess } from '../jupyter';
|
|
11
|
-
import { JupyterReactTheme } from '../theme';
|
|
12
|
-
import { Notebook } from '../components/notebook/Notebook';
|
|
13
|
-
import { NotebookToolbar } from './../components/notebook/toolbar/NotebookToolbar';
|
|
14
|
-
import { CellSidebarExtension } from '../components';
|
|
10
|
+
import { ServiceManagerLess } from '../jupyter/index.js';
|
|
11
|
+
import { JupyterReactTheme } from '../theme/index.js';
|
|
12
|
+
import { Notebook } from '../components/notebook/Notebook.js';
|
|
13
|
+
import { NotebookToolbar } from './../components/notebook/toolbar/NotebookToolbar.js';
|
|
14
|
+
import { CellSidebarExtension } from '../components/index.js';
|
|
15
15
|
import NBFORMAT from './notebooks/NotebookExample1.ipynb.json';
|
|
16
16
|
const NotebookLessExample = () => {
|
|
17
17
|
const serviceManager = useMemo(() => new ServiceManagerLess(), []);
|
|
@@ -6,10 +6,10 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
6
6
|
*/
|
|
7
7
|
import { useMemo, useState } from 'react';
|
|
8
8
|
import { createRoot } from 'react-dom/client';
|
|
9
|
-
import { JupyterReactTheme } from '../theme/JupyterReactTheme';
|
|
10
|
-
import { useJupyter } from '../jupyter/JupyterUse';
|
|
11
|
-
import { CellSidebarExtension, CellSidebarButton, KernelIndicator, Notebook, NotebookToolbar, } from '../components';
|
|
12
|
-
import { CellToolbarExtension } from './extensions';
|
|
9
|
+
import { JupyterReactTheme } from '../theme/JupyterReactTheme.js';
|
|
10
|
+
import { useJupyter } from '../jupyter/JupyterUse.js';
|
|
11
|
+
import { CellSidebarExtension, CellSidebarButton, KernelIndicator, Notebook, NotebookToolbar, } from '../components/index.js';
|
|
12
|
+
import { CellToolbarExtension } from './extensions/index.js';
|
|
13
13
|
import NBFORMAT from './notebooks/NotebookExample1.ipynb.json';
|
|
14
14
|
const NotebookLiteExample = () => {
|
|
15
15
|
const { serviceManager, defaultKernel } = useJupyter({
|
|
@@ -27,8 +27,8 @@ const NotebookLiteExample = () => {
|
|
|
27
27
|
};
|
|
28
28
|
return (_jsx(JupyterReactTheme, { children: serviceManager && defaultKernel && (_jsxs(_Fragment, { children: [_jsxs("div", { style: {
|
|
29
29
|
display: 'inline-flex',
|
|
30
|
-
gap: '12px',
|
|
31
30
|
alignItems: 'center',
|
|
31
|
+
// gap: '12px',
|
|
32
32
|
}, children: [_jsx(KernelIndicator, { kernel: defaultKernel.connection, label: "Kernel Connection Indicator" }), _jsx(KernelIndicator, { kernel: session?.kernel, label: "Kernel Session Indicator" })] }), _jsx(Notebook, { id: "notebook2-nbformat-id", kernel: defaultKernel, serviceManager: serviceManager, nbformat: NBFORMAT, height: "calc(100vh - 2.6rem)" // (Height - Toolbar Height).
|
|
33
33
|
, extensions: extensions, Toolbar: NotebookToolbar, onSessionConnection: onSessionConnection })] })) }));
|
|
34
34
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotebookLite.js","sourceRoot":"","sources":["../../src/examples/NotebookLite.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;AAEH,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAG9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,eAAe,EACf,QAAQ,EACR,eAAe,GAChB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAGpD,OAAO,QAAQ,MAAM,yCAAyC,CAAC;AAE/D,MAAM,mBAAmB,GAAG,GAAG,EAAE;IAC/B,MAAM,EAAE,cAAc,EAAE,aAAa,EAAE,GAAG,UAAU,CAAC;QACnD,IAAI,EAAE,IAAI;QACV,kBAAkB,EAAE,IAAI;KACzB,CAAC,CAAC;IACH,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,EAA8B,CAAC;IACrE,MAAM,UAAU,GAAG,OAAO,CACxB,GAAG,EAAE,CAAC;QACJ,IAAI,oBAAoB,EAAE;QAC1B,IAAI,oBAAoB,CAAC,EAAE,OAAO,EAAE,iBAAiB,EAAE,CAAC;KACzD,EACD,EAAE,CACH,CAAC;IACF,MAAM,mBAAmB,GAAwB,CAC/C,OAA+C,EAC/C,EAAE;QACF,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE,OAAO,EAAE,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC;QACjE,UA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,EAAE,CAAC,CAAC;QACjE,UAAU,CAAC,OAAO,CAAC,CAAC;IACtB,CAAC,CAAC;IACF,OAAO,CACL,KAAC,iBAAiB,cACf,cAAc,IAAI,aAAa,IAAI,CAClC,8BACE,eACE,KAAK,EAAE;wBACL,OAAO,EAAE,aAAa;wBACtB,UAAU,EAAE,QAAQ;wBACpB,4BAA4B;qBAC7B,aAED,KAAC,eAAe,IACd,MAAM,EAAE,aAAa,CAAC,UAAU,EAChC,KAAK,EAAC,6BAA6B,GACnC,EACF,KAAC,eAAe,IACd,MAAM,EAAE,OAAO,EAAE,MAAM,EACvB,KAAK,EAAC,0BAA0B,GAChC,IACE,EACN,KAAC,QAAQ,IACP,EAAE,EAAC,uBAAuB,EAC1B,MAAM,EAAE,aAAa,EACrB,cAAc,EAAE,cAAc,EAC9B,QAAQ,EAAE,QAA4B,EACtC,MAAM,EAAC,sBAAsB,CAAC,6BAA6B;sBAC3D,UAAU,EAAE,UAAU,EACtB,OAAO,EAAE,eAAe,EACxB,mBAAmB,EAAE,mBAAmB,GACxC,IACD,CACJ,GACiB,CACrB,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,GAAG,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;AAC1C,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;AAC/B,MAAM,IAAI,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC;AAE7B,IAAI,CAAC,MAAM,CAAC,KAAC,mBAAmB,KAAG,CAAC,CAAC"}
|
|
@@ -7,12 +7,12 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
|
|
|
7
7
|
import { Text } from '@primer/react';
|
|
8
8
|
import { useMemo } from 'react';
|
|
9
9
|
import { createRoot } from 'react-dom/client';
|
|
10
|
-
import { CellSidebarExtension } from '../components';
|
|
11
|
-
import { CellSidebarButton } from '../components/notebook/cell/sidebar/CellSidebarButton';
|
|
12
|
-
import { Notebook } from '../components/notebook/Notebook';
|
|
13
|
-
import { useJupyter } from '../jupyter';
|
|
14
|
-
import { JupyterReactTheme } from '../theme';
|
|
15
|
-
import { NotebookToolbar } from './../components/notebook/toolbar/NotebookToolbar';
|
|
10
|
+
import { CellSidebarExtension } from '../components/index.js';
|
|
11
|
+
import { CellSidebarButton } from '../components/notebook/cell/sidebar/CellSidebarButton.js';
|
|
12
|
+
import { Notebook } from '../components/notebook/Notebook.js';
|
|
13
|
+
import { useJupyter } from '../jupyter/index.js';
|
|
14
|
+
import { JupyterReactTheme } from '../theme/index.js';
|
|
15
|
+
import { NotebookToolbar } from './../components/notebook/toolbar/NotebookToolbar.js';
|
|
16
16
|
const NotebookJupyterExample = () => {
|
|
17
17
|
const { serviceManager, defaultKernel } = useJupyter({
|
|
18
18
|
startDefaultKernel: true,
|
|
@@ -6,9 +6,9 @@ import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
|
6
6
|
*/
|
|
7
7
|
import { useMemo } from 'react';
|
|
8
8
|
import { createRoot } from 'react-dom/client';
|
|
9
|
-
import { useJupyter } from '../jupyter';
|
|
10
|
-
import { Notebook, CellSidebarExtension, NotebookToolbar } from '../components';
|
|
11
|
-
import { JupyterReactTheme } from '../theme';
|
|
9
|
+
import { useJupyter } from '../jupyter/index.js';
|
|
10
|
+
import { Notebook, CellSidebarExtension, NotebookToolbar } from '../components/index.js';
|
|
11
|
+
import { JupyterReactTheme } from '../theme/index.js';
|
|
12
12
|
import NBFORMAT from './notebooks/NotebookExample1.ipynb.json';
|
|
13
13
|
const NotebookNbformatExample = () => {
|
|
14
14
|
const { serviceManager, defaultKernel } = useJupyter({
|
|
@@ -6,14 +6,13 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
6
6
|
*/
|
|
7
7
|
import { useMemo, useState } from 'react';
|
|
8
8
|
import { createRoot } from 'react-dom/client';
|
|
9
|
-
// import { INotebookContent } from '@jupyterlab/nbformat';
|
|
10
9
|
import { Button, ButtonGroup } from '@primer/react';
|
|
11
10
|
import { Box } from '@datalayer/primer-addons';
|
|
12
|
-
import { useJupyter } from '../jupyter';
|
|
13
|
-
import { JupyterReactTheme } from '../theme/JupyterReactTheme';
|
|
14
|
-
import { CellSidebarExtension } from '../components';
|
|
15
|
-
import { Notebook } from '../components/notebook/Notebook';
|
|
16
|
-
|
|
11
|
+
import { useJupyter } from '../jupyter/index.js';
|
|
12
|
+
import { JupyterReactTheme } from '../theme/JupyterReactTheme.js';
|
|
13
|
+
import { CellSidebarExtension } from '../components/index.js';
|
|
14
|
+
import { Notebook } from '../components/notebook/Notebook.js';
|
|
15
|
+
import { useNotebookStore } from '../components/notebook/NotebookState.js';
|
|
17
16
|
import NBFORMAT_1 from './notebooks/NotebookExample1.ipynb.json';
|
|
18
17
|
import NBFORMAT_2 from './notebooks/NotebookExample2.ipynb.json';
|
|
19
18
|
const NOTEBOOK_ID = 'notebook-model-change-id';
|
|
@@ -21,18 +20,13 @@ const NotebookNbformatChangeExample = () => {
|
|
|
21
20
|
const { serviceManager, defaultKernel } = useJupyter({
|
|
22
21
|
startDefaultKernel: true,
|
|
23
22
|
});
|
|
24
|
-
|
|
23
|
+
const notebookStore = useNotebookStore();
|
|
25
24
|
const [nbformat, setNbformat] = useState(NBFORMAT_1);
|
|
26
25
|
const extensions = useMemo(() => [new CellSidebarExtension()], []);
|
|
27
26
|
const changeNbformat = () => {
|
|
28
|
-
|
|
29
|
-
console.log(
|
|
30
|
-
'Notebook Nbformat from store',
|
|
31
|
-
notebookStore.notebooks
|
|
27
|
+
console.log('Notebook Nbformat from store', notebookStore.notebooks
|
|
32
28
|
.get(NOTEBOOK_ID)
|
|
33
|
-
?.model?.toJSON()
|
|
34
|
-
);
|
|
35
|
-
*/
|
|
29
|
+
?.model?.toJSON());
|
|
36
30
|
if (nbformat === NBFORMAT_1) {
|
|
37
31
|
setNbformat(NBFORMAT_2);
|
|
38
32
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotebookNbformatChange.js","sourceRoot":"","sources":["../../src/examples/NotebookNbformatChange.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;AAEH,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"NotebookNbformatChange.js","sourceRoot":"","sources":["../../src/examples/NotebookNbformatChange.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;AAEH,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAExE,OAAO,UAAU,MAAM,yCAAyC,CAAC;AAEjE,OAAO,UAAU,MAAM,yCAAyC,CAAC;AAEjE,MAAM,WAAW,GAAG,0BAA0B,CAAC;AAE/C,MAAM,6BAA6B,GAAG,GAAG,EAAE;IACzC,MAAM,EAAE,cAAc,EAAE,aAAa,EAAE,GAAG,UAAU,CAAC;QACnD,kBAAkB,EAAE,IAAI;KACzB,CAAC,CAAC;IACH,MAAM,aAAa,GAAG,gBAAgB,EAAE,CAAC;IACzC,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAC,UAAU,CAAC,CAAC;IACrD,MAAM,UAAU,GAAG,OAAO,C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ot } from 'react-dom/client';
|
|
9
|
-
import { useJupyter } from '../jupyter';
|
|
10
|
-
import { CellSidebarButton } from '../components/notebook/cell/sidebar/CellSidebarButton';
|
|
11
|
-
import { Notebook } from '../components/notebook/Notebook';
|
|
12
|
-
import { JupyterReactTheme } from '../theme/JupyterReactTheme';
|
|
13
|
-
import { NotebookToolbar } from './../components/notebook/toolbar/NotebookToolbar';
|
|
14
|
-
import { CellSidebarExtension } from '../components';
|
|
9
|
+
import { useJupyter } from '../jupyter/index.js';
|
|
10
|
+
import { CellSidebarButton } from '../components/notebook/cell/sidebar/CellSidebarButton.js';
|
|
11
|
+
import { Notebook } from '../components/notebook/Notebook.js';
|
|
12
|
+
import { JupyterReactTheme } from '../theme/JupyterReactTheme.js';
|
|
13
|
+
import { NotebookToolbar } from './../components/notebook/toolbar/NotebookToolbar.js';
|
|
14
|
+
import { CellSidebarExtension } from '../components/index.js';
|
|
15
15
|
const NOTEBOOK_ID = 'notebook-id';
|
|
16
16
|
const COLORMODE = 'dark';
|
|
17
17
|
const NotebookNoContextExample = () => {
|
|
@@ -5,12 +5,12 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
|
|
|
5
5
|
* MIT License
|
|
6
6
|
*/
|
|
7
7
|
import { createRoot } from 'react-dom/client';
|
|
8
|
-
import { useJupyter } from '../jupyter';
|
|
9
|
-
import { JupyterLabCss } from '../theme';
|
|
10
|
-
import { CellSidebarExtension } from '../components';
|
|
11
|
-
import { CellSidebarButton } from '../components/notebook/cell/sidebar/CellSidebarButton';
|
|
12
|
-
import { Notebook } from '../components/notebook/Notebook';
|
|
13
|
-
import { NotebookToolbar } from './../components/notebook/toolbar/NotebookToolbar';
|
|
8
|
+
import { useJupyter } from '../jupyter/index.js';
|
|
9
|
+
import { JupyterLabCss } from '../theme/index.js';
|
|
10
|
+
import { CellSidebarExtension } from '../components/index.js';
|
|
11
|
+
import { CellSidebarButton } from '../components/notebook/cell/sidebar/CellSidebarButton.js';
|
|
12
|
+
import { Notebook } from '../components/notebook/Notebook.js';
|
|
13
|
+
import { NotebookToolbar } from './../components/notebook/toolbar/NotebookToolbar.js';
|
|
14
14
|
const NOTEBOOK_ID = 'notebook-id';
|
|
15
15
|
const NotebookNoPrimerExample = () => {
|
|
16
16
|
const { serviceManager, defaultKernel } = useJupyter({
|
|
@@ -8,9 +8,9 @@ import { useMemo, useState } from 'react';
|
|
|
8
8
|
import { createRoot } from 'react-dom/client';
|
|
9
9
|
import { Label, Text } from '@primer/react';
|
|
10
10
|
import { Box } from '@datalayer/primer-addons';
|
|
11
|
-
import { useJupyter } from '../jupyter';
|
|
12
|
-
import { CellSidebarExtension, KernelDetective, Notebook, NotebookToolbar, } from '../components';
|
|
13
|
-
import { JupyterReactTheme } from '../theme';
|
|
11
|
+
import { useJupyter } from '../jupyter/index.js';
|
|
12
|
+
import { CellSidebarExtension, KernelDetective, Notebook, NotebookToolbar, } from '../components/index.js';
|
|
13
|
+
import { JupyterReactTheme } from '../theme/index.js';
|
|
14
14
|
import NBFORMAT from './notebooks/NotebookExample1.ipynb.json';
|
|
15
15
|
const NotebookOnSessionConnectionExample = () => {
|
|
16
16
|
const { serviceManager, defaultKernel } = useJupyter({
|
|
@@ -5,12 +5,12 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
5
5
|
* MIT License
|
|
6
6
|
*/
|
|
7
7
|
import { createRoot } from 'react-dom/client';
|
|
8
|
-
import { useJupyter } from '../jupyter';
|
|
9
|
-
import { JupyterReactTheme } from '../theme/JupyterReactTheme';
|
|
10
|
-
import { CellSidebarButton } from '../components/notebook/cell/sidebar/CellSidebarButton';
|
|
11
|
-
import { Notebook } from '../components/notebook/Notebook';
|
|
12
|
-
import { NotebookToolbar } from './../components/notebook/toolbar/NotebookToolbar';
|
|
13
|
-
import { CellSidebarExtension } from '../components';
|
|
8
|
+
import { useJupyter } from '../jupyter/index.js';
|
|
9
|
+
import { JupyterReactTheme } from '../theme/JupyterReactTheme.js';
|
|
10
|
+
import { CellSidebarButton } from '../components/notebook/cell/sidebar/CellSidebarButton.js';
|
|
11
|
+
import { Notebook } from '../components/notebook/Notebook.js';
|
|
12
|
+
import { NotebookToolbar } from './../components/notebook/toolbar/NotebookToolbar.js';
|
|
13
|
+
import { CellSidebarExtension } from '../components/index.js';
|
|
14
14
|
const NOTEBOOK_ID = 'notebook-id';
|
|
15
15
|
const NotebookPathExample = () => {
|
|
16
16
|
const { serviceManager, defaultKernel } = useJupyter({
|
|
@@ -8,10 +8,10 @@ import { useMemo, useState } from 'react';
|
|
|
8
8
|
import { createRoot } from 'react-dom/client';
|
|
9
9
|
import { Button, Text } from '@primer/react';
|
|
10
10
|
import { Box } from '@datalayer/primer-addons';
|
|
11
|
-
import { useJupyter } from '../jupyter';
|
|
12
|
-
import { JupyterReactTheme } from '../theme/JupyterReactTheme';
|
|
13
|
-
import { CellSidebarExtension } from '../components';
|
|
14
|
-
import { Notebook } from '../components/notebook/Notebook';
|
|
11
|
+
import { useJupyter } from '../jupyter/index.js';
|
|
12
|
+
import { JupyterReactTheme } from '../theme/JupyterReactTheme.js';
|
|
13
|
+
import { CellSidebarExtension } from '../components/index.js';
|
|
14
|
+
import { Notebook } from '../components/notebook/Notebook.js';
|
|
15
15
|
const PATH_1 = 'ipywidgets.ipynb';
|
|
16
16
|
const PATH_2 = 'matplotlib.ipynb';
|
|
17
17
|
const NotebookPathChangeExample = () => {
|
|
@@ -6,11 +6,11 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
6
6
|
*/
|
|
7
7
|
import { useMemo } from 'react';
|
|
8
8
|
import { createRoot } from 'react-dom/client';
|
|
9
|
-
import { useJupyter } from '../jupyter';
|
|
10
|
-
import { CellSidebarExtension } from '../components';
|
|
11
|
-
import { Notebook } from '../components/notebook/Notebook';
|
|
12
|
-
import { JupyterReactTheme } from '../theme/JupyterReactTheme';
|
|
13
|
-
import { NotebookToolbar } from './../components/notebook/toolbar/NotebookToolbar';
|
|
9
|
+
import { useJupyter } from '../jupyter/index.js';
|
|
10
|
+
import { CellSidebarExtension } from '../components/index.js';
|
|
11
|
+
import { Notebook } from '../components/notebook/Notebook.js';
|
|
12
|
+
import { JupyterReactTheme } from '../theme/JupyterReactTheme.js';
|
|
13
|
+
import { NotebookToolbar } from './../components/notebook/toolbar/NotebookToolbar.js';
|
|
14
14
|
import NBFORMAT from './notebooks/NotebookExample1.ipynb.json';
|
|
15
15
|
const NotebookReadonlyExample = () => {
|
|
16
16
|
const { serviceManager } = useJupyter({
|
|
@@ -9,12 +9,12 @@ import { createRoot } from 'react-dom/client';
|
|
|
9
9
|
import { ServiceManager } from '@jupyterlab/services';
|
|
10
10
|
import { Button } from '@primer/react';
|
|
11
11
|
import { Box } from '@datalayer/primer-addons';
|
|
12
|
-
import { getJupyterServerToken, getJupyterServerUrl, ServiceManagerLess, } from '../jupyter';
|
|
13
|
-
import { JupyterReactTheme } from '../theme';
|
|
14
|
-
import { createServerSettings } from '../utils';
|
|
15
|
-
import { NotebookToolbar } from './../components/notebook/toolbar/NotebookToolbar';
|
|
16
|
-
import { CellSidebarExtension } from '../components';
|
|
17
|
-
import { Notebook } from '../components/notebook/Notebook';
|
|
12
|
+
import { getJupyterServerToken, getJupyterServerUrl, ServiceManagerLess, } from '../jupyter/index.js';
|
|
13
|
+
import { JupyterReactTheme } from '../theme/index.js';
|
|
14
|
+
import { createServerSettings } from '../utils/index.js';
|
|
15
|
+
import { NotebookToolbar } from './../components/notebook/toolbar/NotebookToolbar.js';
|
|
16
|
+
import { CellSidebarExtension } from '../components/index.js';
|
|
17
|
+
import { Notebook } from '../components/notebook/Notebook.js';
|
|
18
18
|
import NBFORMAT from './notebooks/NotebookExample1.ipynb.json';
|
|
19
19
|
const NotebookServiceManagerExample = () => {
|
|
20
20
|
const [serverless, setServerless] = useState(true);
|
|
@@ -6,12 +6,12 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
6
6
|
*/
|
|
7
7
|
import { createRoot } from 'react-dom/client';
|
|
8
8
|
// import { ContentLoader } from '@datalayer/primer-addons';
|
|
9
|
-
import { useJupyter } from '../jupyter';
|
|
10
|
-
import { JupyterReactTheme } from '../theme/JupyterReactTheme';
|
|
11
|
-
import { CellSidebarExtension } from '../components';
|
|
12
|
-
import { CellSidebarButton } from '../components/notebook/cell/sidebar/CellSidebarButton';
|
|
13
|
-
import { Notebook } from '../components/notebook/Notebook';
|
|
14
|
-
import { NotebookToolbar } from './../components/notebook/toolbar/NotebookToolbar';
|
|
9
|
+
import { useJupyter } from '../jupyter/index.js';
|
|
10
|
+
import { JupyterReactTheme } from '../theme/JupyterReactTheme.js';
|
|
11
|
+
import { CellSidebarExtension } from '../components/index.js';
|
|
12
|
+
import { CellSidebarButton } from '../components/notebook/cell/sidebar/CellSidebarButton.js';
|
|
13
|
+
import { Notebook } from '../components/notebook/Notebook.js';
|
|
14
|
+
import { NotebookToolbar } from './../components/notebook/toolbar/NotebookToolbar.js';
|
|
15
15
|
const NOTEBOOK_ID = 'notebook-id';
|
|
16
16
|
const NotebookSkeletonExample = () => {
|
|
17
17
|
const { serviceManager, defaultKernel } = useJupyter({
|
|
@@ -8,13 +8,13 @@ import { useMemo, useState } from 'react';
|
|
|
8
8
|
import { createRoot } from 'react-dom/client';
|
|
9
9
|
import { Button } from '@primer/react';
|
|
10
10
|
import { Box } from '@datalayer/primer-addons';
|
|
11
|
-
import { useJupyter } from '../jupyter';
|
|
12
|
-
import { JupyterReactTheme } from '../theme/JupyterReactTheme';
|
|
13
|
-
import { Notebook } from '../components/notebook/Notebook';
|
|
14
|
-
import { NotebookToolbar } from '../components/notebook/toolbar/NotebookToolbar';
|
|
15
|
-
import { TocExtension } from './extensions/toc/TocExtension';
|
|
16
|
-
import { ReactLayoutFactory } from './extensions/toc/ReactLayoutFactory';
|
|
17
|
-
import { JupyterLayoutFactory } from './extensions/toc/JupyterLayoutFactory';
|
|
11
|
+
import { useJupyter } from '../jupyter/index.js';
|
|
12
|
+
import { JupyterReactTheme } from '../theme/JupyterReactTheme.js';
|
|
13
|
+
import { Notebook } from '../components/notebook/Notebook.js';
|
|
14
|
+
import { NotebookToolbar } from '../components/notebook/toolbar/NotebookToolbar.js';
|
|
15
|
+
import { TocExtension } from './extensions/toc/TocExtension.js';
|
|
16
|
+
import { ReactLayoutFactory } from './extensions/toc/ReactLayoutFactory.js';
|
|
17
|
+
import { JupyterLayoutFactory } from './extensions/toc/JupyterLayoutFactory.js';
|
|
18
18
|
import NBFORMAT from './notebooks/NotebookToCExample.ipynb.json';
|
|
19
19
|
const NotebookTOCExample = () => {
|
|
20
20
|
const { serviceManager, defaultKernel } = useJupyter({
|
|
@@ -6,12 +6,12 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
6
6
|
*/
|
|
7
7
|
import { useCallback, useEffect, useMemo, useState } from 'react';
|
|
8
8
|
import { createRoot } from 'react-dom/client';
|
|
9
|
-
import { useJupyter } from '../jupyter';
|
|
10
|
-
import { jupyterLabTheme, JupyterReactTheme } from '../theme';
|
|
9
|
+
import { useJupyter } from '../jupyter/index.js';
|
|
10
|
+
import { jupyterLabTheme, JupyterReactTheme } from '../theme/index.js';
|
|
11
11
|
import { Text, ToggleSwitch, theme as primerTheme } from '@primer/react';
|
|
12
|
-
import { CellSidebarExtension } from '../components';
|
|
13
|
-
import { Notebook } from '../components/notebook/Notebook';
|
|
14
|
-
import { NotebookToolbar } from './../components/notebook/toolbar/NotebookToolbar';
|
|
12
|
+
import { CellSidebarExtension } from '../components/index.js';
|
|
13
|
+
import { Notebook } from '../components/notebook/Notebook.js';
|
|
14
|
+
import { NotebookToolbar } from './../components/notebook/toolbar/NotebookToolbar.js';
|
|
15
15
|
import NBFORMAT from './notebooks/NotebookExample1.ipynb.json';
|
|
16
16
|
const NotebookThemeExample = () => {
|
|
17
17
|
const { serviceManager, defaultKernel } = useJupyter({
|
|
@@ -8,10 +8,10 @@ import { useCallback, useEffect, useMemo, useState } from 'react';
|
|
|
8
8
|
import { createRoot } from 'react-dom/client';
|
|
9
9
|
import { Text, ToggleSwitch, theme as primerTheme } from '@primer/react';
|
|
10
10
|
import { Box } from '@datalayer/primer-addons';
|
|
11
|
-
import { useJupyter } from '../jupyter';
|
|
12
|
-
import { CellSidebarExtension, Notebook, NotebookToolbar } from '../components';
|
|
13
|
-
import { useJupyterReactStore } from '../state';
|
|
14
|
-
import { jupyterLabTheme, JupyterReactTheme } from '../theme';
|
|
11
|
+
import { useJupyter } from '../jupyter/index.js';
|
|
12
|
+
import { CellSidebarExtension, Notebook, NotebookToolbar } from '../components/index.js';
|
|
13
|
+
import { useJupyterReactStore } from '../state/index.js';
|
|
14
|
+
import { jupyterLabTheme, JupyterReactTheme } from '../theme/index.js';
|
|
15
15
|
import NBFORMAT from './notebooks/NotebookExample1.ipynb.json';
|
|
16
16
|
const NotebookThemeColormodeExample = () => {
|
|
17
17
|
const { serviceManager } = useJupyter();
|
|
@@ -5,12 +5,12 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
5
5
|
* MIT License
|
|
6
6
|
*/
|
|
7
7
|
import { createRoot } from 'react-dom/client';
|
|
8
|
-
import { CellSidebarExtension } from '../components';
|
|
9
|
-
import { useJupyter } from '../jupyter';
|
|
10
|
-
import { JupyterReactTheme } from '../theme/JupyterReactTheme';
|
|
11
|
-
import { CellSidebarButton } from '../components/notebook/cell/sidebar/CellSidebarButton';
|
|
12
|
-
import { Notebook } from '../components/notebook/Notebook';
|
|
13
|
-
import { NotebookToolbar } from './../components/notebook/toolbar/NotebookToolbar';
|
|
8
|
+
import { CellSidebarExtension } from '../components/index.js';
|
|
9
|
+
import { useJupyter } from '../jupyter/index.js';
|
|
10
|
+
import { JupyterReactTheme } from '../theme/JupyterReactTheme.js';
|
|
11
|
+
import { CellSidebarButton } from '../components/notebook/cell/sidebar/CellSidebarButton.js';
|
|
12
|
+
import { Notebook } from '../components/notebook/Notebook.js';
|
|
13
|
+
import { NotebookToolbar } from './../components/notebook/toolbar/NotebookToolbar.js';
|
|
14
14
|
const NOTEBOOK_ID = 'notebook-id';
|
|
15
15
|
const NotebookURLExample = () => {
|
|
16
16
|
const { serviceManager, defaultKernel } = useJupyter({
|
|
@@ -8,11 +8,11 @@ import { useEffect, useMemo, useState } from 'react';
|
|
|
8
8
|
import { createRoot } from 'react-dom/client';
|
|
9
9
|
import { Button } from '@primer/react';
|
|
10
10
|
import { Box } from '@datalayer/primer-addons';
|
|
11
|
-
import { useJupyter } from '../jupyter';
|
|
12
|
-
import { Kernel } from '../jupyter/kernel/Kernel';
|
|
13
|
-
import { JupyterReactTheme } from '../theme/JupyterReactTheme';
|
|
14
|
-
import { CellSidebarExtension } from '../components';
|
|
15
|
-
import { Notebook } from '../components/notebook/Notebook';
|
|
11
|
+
import { useJupyter } from '../jupyter/index.js';
|
|
12
|
+
import { Kernel } from '../jupyter/kernel/Kernel.js';
|
|
13
|
+
import { JupyterReactTheme } from '../theme/JupyterReactTheme.js';
|
|
14
|
+
import { CellSidebarExtension } from '../components/index.js';
|
|
15
|
+
import { Notebook } from '../components/notebook/Notebook.js';
|
|
16
16
|
import NOTEBOOK from './notebooks/NotebookExample1.ipynb.json';
|
|
17
17
|
const NotebookUnmountExample = () => {
|
|
18
18
|
const { kernelManager, serviceManager } = useJupyter({
|
|
@@ -6,11 +6,11 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
6
6
|
*/
|
|
7
7
|
import { useMemo } from 'react';
|
|
8
8
|
import { createRoot } from 'react-dom/client';
|
|
9
|
-
import { useJupyter } from '../jupyter';
|
|
10
|
-
import { JupyterReactTheme } from '../theme/JupyterReactTheme';
|
|
11
|
-
import { CellSidebarExtension } from '../components';
|
|
12
|
-
import { Notebook } from '../components/notebook/Notebook';
|
|
13
|
-
import { NotebookToolbar } from './../components/notebook/toolbar/NotebookToolbar';
|
|
9
|
+
import { useJupyter } from '../jupyter/index.js';
|
|
10
|
+
import { JupyterReactTheme } from '../theme/JupyterReactTheme.js';
|
|
11
|
+
import { CellSidebarExtension } from '../components/index.js';
|
|
12
|
+
import { Notebook } from '../components/notebook/Notebook.js';
|
|
13
|
+
import { NotebookToolbar } from './../components/notebook/toolbar/NotebookToolbar.js';
|
|
14
14
|
const ObservableHQExample = () => {
|
|
15
15
|
const { serviceManager, defaultKernel } = useJupyter({
|
|
16
16
|
startDefaultKernel: true,
|
|
@@ -6,9 +6,9 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
6
6
|
*/
|
|
7
7
|
import { createRoot } from 'react-dom/client';
|
|
8
8
|
import { Text } from '@primer/react';
|
|
9
|
-
import { JupyterReactTheme } from '../theme/JupyterReactTheme';
|
|
10
|
-
import OutputIPyWidgets from '../components/output/OutputIPyWidgets';
|
|
11
|
-
import { view, state } from './notebooks/OutputIPyWidgetsExample';
|
|
9
|
+
import { JupyterReactTheme } from '../theme/JupyterReactTheme.js';
|
|
10
|
+
import OutputIPyWidgets from '../components/output/OutputIPyWidgets.js';
|
|
11
|
+
import { view, state } from './notebooks/OutputIPyWidgetsExample.js';
|
|
12
12
|
const OutputIPyWidgetsExample = () => {
|
|
13
13
|
return (_jsxs(JupyterReactTheme, { children: [_jsx(Text, { as: "h1", children: "Output IPyWidgets" }), _jsx(OutputIPyWidgets, { view: view, state: state })] }));
|
|
14
14
|
};
|
|
@@ -8,11 +8,11 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
8
8
|
import { useState } from 'react';
|
|
9
9
|
import { createRoot } from 'react-dom/client';
|
|
10
10
|
import { Button, Text } from '@primer/react';
|
|
11
|
-
import { JupyterReactTheme } from '../theme/JupyterReactTheme';
|
|
12
|
-
import { useJupyter } from '../jupyter';
|
|
13
|
-
import { ExecutionPhase } from '../jupyter/kernel/KernelState';
|
|
14
|
-
import { Output } from '../components/output/Output';
|
|
15
|
-
import { useOutputsStore } from '../components/output/OutputState';
|
|
11
|
+
import { JupyterReactTheme } from '../theme/JupyterReactTheme.js';
|
|
12
|
+
import { useJupyter } from '../jupyter/index.js';
|
|
13
|
+
import { ExecutionPhase } from '../jupyter/kernel/KernelState.js';
|
|
14
|
+
import { Output } from '../components/output/Output.js';
|
|
15
|
+
import { useOutputsStore } from '../components/output/OutputState.js';
|
|
16
16
|
const SOURCE_ID_1 = 'output-id-1';
|
|
17
17
|
const SOURCE_1 = 'fail';
|
|
18
18
|
const SOURCE_ID_2 = 'output-id-2';
|
package/lib/examples/Outputs.js
CHANGED
|
@@ -8,14 +8,14 @@ import { useEffect, useState } from 'react';
|
|
|
8
8
|
import { createRoot } from 'react-dom/client';
|
|
9
9
|
import { Text } from '@primer/react';
|
|
10
10
|
import { Box } from '@datalayer/primer-addons';
|
|
11
|
-
import { useJupyter } from '../jupyter';
|
|
12
|
-
import { Kernel } from '../jupyter/kernel/Kernel';
|
|
13
|
-
import { JupyterReactTheme } from '../theme/JupyterReactTheme';
|
|
14
|
-
import { useKernelsStore } from '../jupyter/kernel/KernelState';
|
|
15
|
-
import { KernelIndicator } from '../components/kernel/KernelIndicator';
|
|
16
|
-
import { Output } from '../components/output/Output';
|
|
17
|
-
import { useOutputsStore } from './../components/output/OutputState';
|
|
18
|
-
import { newUuid } from '../utils/Utils';
|
|
11
|
+
import { useJupyter } from '../jupyter/index.js';
|
|
12
|
+
import { Kernel } from '../jupyter/kernel/Kernel.js';
|
|
13
|
+
import { JupyterReactTheme } from '../theme/JupyterReactTheme.js';
|
|
14
|
+
import { useKernelsStore } from '../jupyter/kernel/KernelState.js';
|
|
15
|
+
import { KernelIndicator } from '../components/kernel/KernelIndicator.js';
|
|
16
|
+
import { Output } from '../components/output/Output.js';
|
|
17
|
+
import { useOutputsStore } from './../components/output/OutputState.js';
|
|
18
|
+
import { newUuid } from '../utils/Utils.js';
|
|
19
19
|
const SOURCE_ID_0 = 'output-id-0';
|
|
20
20
|
const CODE_O = `from ipywidgets import IntSlider
|
|
21
21
|
IntSlider(value=7, min=0, max=10, step=1,)
|
|
@@ -6,9 +6,9 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
|
|
|
6
6
|
*/
|
|
7
7
|
import { createRoot } from 'react-dom/client';
|
|
8
8
|
import { Text } from '@primer/react';
|
|
9
|
-
import { JupyterReactTheme } from '../theme/JupyterReactTheme';
|
|
10
|
-
import { Output } from '../components/output/Output';
|
|
11
|
-
import { cellSourceAsString } from './../utils/Utils';
|
|
9
|
+
import { JupyterReactTheme } from '../theme/JupyterReactTheme.js';
|
|
10
|
+
import { Output } from '../components/output/Output.js';
|
|
11
|
+
import { cellSourceAsString } from './../utils/Utils.js';
|
|
12
12
|
import NBFORMAT from './notebooks/NotebookOutputs.ipynb.json';
|
|
13
13
|
const OutputsIpynbExample = () => {
|
|
14
14
|
return (_jsxs(JupyterReactTheme, { children: [_jsx(Text, { as: "h1", children: "Outputs from IPYNB" }), NBFORMAT.cells.map((cell, index) => {
|
package/lib/examples/Panel.js
CHANGED
|
@@ -6,12 +6,12 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
6
6
|
*/
|
|
7
7
|
import { useMemo } from 'react';
|
|
8
8
|
import { createRoot } from 'react-dom/client';
|
|
9
|
-
import { useJupyter } from '../jupyter';
|
|
10
|
-
import { JupyterReactTheme } from '../theme/JupyterReactTheme';
|
|
11
|
-
import { CellSidebarExtension } from '../components';
|
|
12
|
-
import { CellSidebarButton } from '../components/notebook/cell/sidebar/CellSidebarButton';
|
|
13
|
-
import { Notebook } from '../components/notebook/Notebook';
|
|
14
|
-
import { NotebookToolbar } from './../components/notebook/toolbar/NotebookToolbar';
|
|
9
|
+
import { useJupyter } from '../jupyter/index.js';
|
|
10
|
+
import { JupyterReactTheme } from '../theme/JupyterReactTheme.js';
|
|
11
|
+
import { CellSidebarExtension } from '../components/index.js';
|
|
12
|
+
import { CellSidebarButton } from '../components/notebook/cell/sidebar/CellSidebarButton.js';
|
|
13
|
+
import { Notebook } from '../components/notebook/Notebook.js';
|
|
14
|
+
import { NotebookToolbar } from './../components/notebook/toolbar/NotebookToolbar.js';
|
|
15
15
|
const PanelExample = () => {
|
|
16
16
|
const { serviceManager, defaultKernel } = useJupyter({
|
|
17
17
|
startDefaultKernel: true,
|
package/lib/examples/Plotly.js
CHANGED
|
@@ -6,11 +6,11 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
6
6
|
*/
|
|
7
7
|
import { useMemo } from 'react';
|
|
8
8
|
import { createRoot } from 'react-dom/client';
|
|
9
|
-
import { useJupyter } from '../jupyter';
|
|
10
|
-
import { JupyterReactTheme } from '../theme/JupyterReactTheme';
|
|
11
|
-
import { CellSidebarExtension } from '../components';
|
|
12
|
-
import { Notebook } from '../components/notebook/Notebook';
|
|
13
|
-
import { NotebookToolbar } from './../components/notebook/toolbar/NotebookToolbar';
|
|
9
|
+
import { useJupyter } from '../jupyter/index.js';
|
|
10
|
+
import { JupyterReactTheme } from '../theme/JupyterReactTheme.js';
|
|
11
|
+
import { CellSidebarExtension } from '../components/index.js';
|
|
12
|
+
import { Notebook } from '../components/notebook/Notebook.js';
|
|
13
|
+
import { NotebookToolbar } from './../components/notebook/toolbar/NotebookToolbar.js';
|
|
14
14
|
const PlotlyExample = () => {
|
|
15
15
|
const { serviceManager, defaultKernel } = useJupyter({
|
|
16
16
|
startDefaultKernel: true,
|
|
@@ -6,11 +6,11 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
6
6
|
*/
|
|
7
7
|
import { useMemo } from 'react';
|
|
8
8
|
import { createRoot } from 'react-dom/client';
|
|
9
|
-
import { useJupyter } from '../jupyter';
|
|
10
|
-
import { JupyterReactTheme } from '../theme/JupyterReactTheme';
|
|
11
|
-
import { Notebook } from '../components/notebook/Notebook';
|
|
12
|
-
import { NotebookToolbar } from './../components/notebook/toolbar/NotebookToolbar';
|
|
13
|
-
import { CellSidebarExtension } from '../components';
|
|
9
|
+
import { useJupyter } from '../jupyter/index.js';
|
|
10
|
+
import { JupyterReactTheme } from '../theme/JupyterReactTheme.js';
|
|
11
|
+
import { Notebook } from '../components/notebook/Notebook.js';
|
|
12
|
+
import { NotebookToolbar } from './../components/notebook/toolbar/NotebookToolbar.js';
|
|
13
|
+
import { CellSidebarExtension } from '../components/index.js';
|
|
14
14
|
import NBFORMAT from './notebooks/PyGWalker.ipynb.json';
|
|
15
15
|
const PyGWalkerExample = () => {
|
|
16
16
|
const { serviceManager, defaultKernel } = useJupyter({
|
|
@@ -10,8 +10,8 @@ import { Text, ToggleSwitch, ThemeProvider, useTheme } from '@primer/react';
|
|
|
10
10
|
import { Box } from '@datalayer/primer-addons';
|
|
11
11
|
import { ThemeManager } from '@jupyterlab/apputils';
|
|
12
12
|
import { RunningSessions } from '@jupyterlab/running';
|
|
13
|
-
import { Lumino } from '../components/lumino/Lumino';
|
|
14
|
-
import { JupyterLabApp } from '../components/jupyterlab/JupyterLabApp';
|
|
13
|
+
import { Lumino } from '../components/lumino/Lumino.js';
|
|
14
|
+
import { JupyterLabApp } from '../components/jupyterlab/JupyterLabApp.js';
|
|
15
15
|
import * as lightThemePlugins from '@jupyterlab/theme-light-extension';
|
|
16
16
|
import * as darkThemePlugins from '@jupyterlab/theme-dark-extension';
|
|
17
17
|
import * as runningPlugins from '@jupyterlab/running-extension';
|
package/lib/examples/Terminal.js
CHANGED
|
@@ -5,8 +5,8 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
5
5
|
* MIT License
|
|
6
6
|
*/
|
|
7
7
|
import { createRoot } from 'react-dom/client';
|
|
8
|
-
import { JupyterReactTheme } from '../theme';
|
|
9
|
-
import { Terminal } from '../components/terminal/Terminal';
|
|
8
|
+
import { JupyterReactTheme } from '../theme/index.js';
|
|
9
|
+
import { Terminal } from '../components/terminal/Terminal.js';
|
|
10
10
|
const TerminalExample = () => (_jsx(JupyterReactTheme, { children: _jsx(Terminal, { colormode: "dark", height: "800px" }) }));
|
|
11
11
|
const div = document.createElement('div');
|
|
12
12
|
document.body.appendChild(div);
|
package/lib/examples/Vega.js
CHANGED
|
@@ -6,12 +6,12 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
6
6
|
*/
|
|
7
7
|
import { rendererFactory as vega3Renderer } from '@jupyterlab/vega3-extension';
|
|
8
8
|
import { createRoot } from 'react-dom/client';
|
|
9
|
-
import { useJupyter } from '../jupyter';
|
|
10
|
-
import { CellSidebarExtension } from '../components';
|
|
11
|
-
import { CellSidebarButton } from '../components/notebook/cell/sidebar/CellSidebarButton';
|
|
12
|
-
import { Notebook } from '../components/notebook/Notebook';
|
|
13
|
-
import { JupyterReactTheme } from '../theme/JupyterReactTheme';
|
|
14
|
-
import { NotebookToolbar } from './../components/notebook/toolbar/NotebookToolbar';
|
|
9
|
+
import { useJupyter } from '../jupyter/index.js';
|
|
10
|
+
import { CellSidebarExtension } from '../components/index.js';
|
|
11
|
+
import { CellSidebarButton } from '../components/notebook/cell/sidebar/CellSidebarButton.js';
|
|
12
|
+
import { Notebook } from '../components/notebook/Notebook.js';
|
|
13
|
+
import { JupyterReactTheme } from '../theme/JupyterReactTheme.js';
|
|
14
|
+
import { NotebookToolbar } from './../components/notebook/toolbar/NotebookToolbar.js';
|
|
15
15
|
const VegaExample = () => {
|
|
16
16
|
const { serviceManager, defaultKernel } = useJupyter({
|
|
17
17
|
startDefaultKernel: true,
|