@datalayer/jupyter-react 0.8.3 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (309) hide show
  1. package/lib/app/tabs/ComponentsTab.js +1 -1
  2. package/lib/app/tabs/ComponentsTab.js.map +1 -1
  3. package/lib/app/tabs/components/CellComponent.js +3 -3
  4. package/lib/app/tabs/components/CellComponent.js.map +1 -1
  5. package/lib/app/tabs/components/NotebookComponent.js +2 -2
  6. package/lib/app/tabs/components/NotebookComponent.js.map +1 -1
  7. package/lib/app/tabs/components/ViewerComponent.js +2 -2
  8. package/lib/app/tabs/components/ViewerComponent.js.map +1 -1
  9. package/lib/components/cell/Cell.d.ts +6 -0
  10. package/lib/components/cell/Cell.js +4 -31
  11. package/lib/components/cell/Cell.js.map +1 -1
  12. package/lib/components/cell/CellAdapter.js +1 -1
  13. package/lib/components/cell/CellAdapter.js.map +1 -1
  14. package/lib/components/cell/CellCommands.js +1 -1
  15. package/lib/components/codemirror/CodeMirrorEditor.js +1 -2
  16. package/lib/components/codemirror/CodeMirrorEditor.js.map +1 -1
  17. package/lib/components/codemirror/CodeMirrorOutputToolbar.js +1 -1
  18. package/lib/components/codemirror/CodeMirrorOutputToolbar.js.map +1 -1
  19. package/lib/components/commands/Commands.js +1 -1
  20. package/lib/components/commands/Commands.js.map +1 -1
  21. package/lib/components/console/Console.d.ts +12 -1
  22. package/lib/components/console/Console.js +11 -7
  23. package/lib/components/console/Console.js.map +1 -1
  24. package/lib/components/console/ConsoleAdapter.d.ts +23 -2
  25. package/lib/components/console/ConsoleAdapter.js +27 -13
  26. package/lib/components/console/ConsoleAdapter.js.map +1 -1
  27. package/lib/components/dialog/Dialog.js +1 -1
  28. package/lib/components/dialog/Dialog.js.map +1 -1
  29. package/lib/components/filemanager/FileManagerJupyterLab.js +1 -1
  30. package/lib/components/filemanager/FileManagerJupyterLab.js.map +1 -1
  31. package/lib/components/jupyterlab/JupyterLabApp.d.ts +1 -1
  32. package/lib/components/jupyterlab/JupyterLabAppCss.d.ts +1 -1
  33. package/lib/components/kernel/KernelActionMenu.d.ts +8 -0
  34. package/lib/components/kernel/KernelActionMenu.js +21 -0
  35. package/lib/components/kernel/KernelActionMenu.js.map +1 -0
  36. package/lib/components/kernel/KernelInspector.d.ts +6 -0
  37. package/lib/components/kernel/KernelInspector.js +31 -0
  38. package/lib/components/kernel/KernelInspector.js.map +1 -0
  39. package/lib/components/kernel/KernelLauncher.d.ts +2 -0
  40. package/lib/components/kernel/KernelLauncher.js +11 -0
  41. package/lib/components/kernel/KernelLauncher.js.map +1 -0
  42. package/lib/components/kernel/KernelLogs.d.ts +2 -0
  43. package/lib/components/kernel/KernelLogs.js +11 -0
  44. package/lib/components/kernel/KernelLogs.js.map +1 -0
  45. package/lib/components/kernel/KernelProgressBar.d.ts +2 -0
  46. package/lib/components/kernel/KernelProgressBar.js +26 -0
  47. package/lib/components/kernel/KernelProgressBar.js.map +1 -0
  48. package/lib/components/kernel/KernelSelector.d.ts +8 -0
  49. package/lib/components/kernel/KernelSelector.js +40 -0
  50. package/lib/components/kernel/KernelSelector.js.map +1 -0
  51. package/lib/components/kernel/KernelStatus.d.ts +27 -0
  52. package/lib/components/kernel/KernelStatus.js +67 -0
  53. package/lib/components/kernel/KernelStatus.js.map +1 -0
  54. package/lib/components/kernel/KernelUsage.d.ts +6 -0
  55. package/lib/components/kernel/KernelUsage.js +100 -0
  56. package/lib/components/kernel/KernelUsage.js.map +1 -0
  57. package/lib/components/kernel/KernelVariables.d.ts +6 -0
  58. package/lib/components/kernel/KernelVariables.js +23 -0
  59. package/lib/components/kernel/KernelVariables.js.map +1 -0
  60. package/lib/components/kernel/Kernels.d.ts +2 -0
  61. package/lib/components/kernel/Kernels.js +88 -0
  62. package/lib/components/kernel/Kernels.js.map +1 -0
  63. package/lib/components/kernel/index.d.ts +10 -0
  64. package/lib/components/kernel/index.js +16 -0
  65. package/lib/components/kernel/index.js.map +1 -0
  66. package/lib/components/kernel/inspector/kernelinspector.css +68 -0
  67. package/lib/components/kernel/inspector/model.d.ts +56 -0
  68. package/lib/components/kernel/inspector/model.js +201 -0
  69. package/lib/components/kernel/inspector/model.js.map +1 -0
  70. package/lib/components/kernel/inspector/widget.d.ts +40 -0
  71. package/lib/components/kernel/inspector/widget.js +190 -0
  72. package/lib/components/kernel/inspector/widget.js.map +1 -0
  73. package/lib/components/kernel/variables/handler.d.ts +86 -0
  74. package/lib/components/kernel/variables/handler.js +262 -0
  75. package/lib/components/kernel/variables/handler.js.map +1 -0
  76. package/lib/components/kernel/variables/inspectorscripts.d.ts +20 -0
  77. package/lib/components/kernel/variables/inspectorscripts.js +349 -0
  78. package/lib/components/kernel/variables/inspectorscripts.js.map +1 -0
  79. package/lib/components/kernel/variables/kernelconnector.d.ts +37 -0
  80. package/lib/components/kernel/variables/kernelconnector.js +76 -0
  81. package/lib/components/kernel/variables/kernelconnector.js.map +1 -0
  82. package/lib/components/kernel/variables/manager.d.ts +26 -0
  83. package/lib/components/kernel/variables/manager.js +70 -0
  84. package/lib/components/kernel/variables/manager.js.map +1 -0
  85. package/lib/components/kernel/variables/tokens.d.ts +48 -0
  86. package/lib/{jupyter/lab/JupyterLabTheme.js → components/kernel/variables/tokens.js} +1 -1
  87. package/lib/components/kernel/variables/tokens.js.map +1 -0
  88. package/lib/components/kernel/variables/variablesinspector.css +110 -0
  89. package/lib/components/kernel/variables/variablesinspector.d.ts +5 -0
  90. package/lib/components/kernel/variables/variablesinspector.js +85 -0
  91. package/lib/components/kernel/variables/variablesinspector.js.map +1 -0
  92. package/lib/components/kernel/variables/widget.d.ts +33 -0
  93. package/lib/components/kernel/variables/widget.js +391 -0
  94. package/lib/components/kernel/variables/widget.js.map +1 -0
  95. package/lib/components/lumino/Lumino.js.map +1 -0
  96. package/lib/components/lumino/LuminoBox.js.map +1 -0
  97. package/lib/components/lumino/LuminoDetached.js.map +1 -0
  98. package/lib/components/lumino/LuminoObservable.js.map +1 -0
  99. package/lib/components/lumino/LuminoRedux.js.map +1 -0
  100. package/lib/components/lumino/ReactPortalWidget.js.map +1 -0
  101. package/lib/components/notebook/Notebook.js +11 -7
  102. package/lib/components/notebook/Notebook.js.map +1 -1
  103. package/lib/components/notebook/NotebookAdapter.d.ts +3 -1
  104. package/lib/components/notebook/NotebookAdapter.js +43 -39
  105. package/lib/components/notebook/NotebookAdapter.js.map +1 -1
  106. package/lib/components/notebook/NotebookCommands.d.ts +23 -21
  107. package/lib/components/notebook/NotebookCommands.js +51 -26
  108. package/lib/components/notebook/NotebookCommands.js.map +1 -1
  109. package/lib/components/notebook/cell/metadata/CellMetadataEditor.js +1 -1
  110. package/lib/components/notebook/cell/metadata/CellMetadataEditor.js.map +1 -1
  111. package/lib/components/notebook/cell/metadata/NbGraderCells.js +10 -10
  112. package/lib/components/notebook/cell/prompt/Countdown.js +1 -1
  113. package/lib/components/notebook/cell/prompt/Countdown.js.map +1 -1
  114. package/lib/components/notebook/cell/prompt/CountdownOutputPrompt.js.map +1 -1
  115. package/lib/components/notebook/cell/sidebar/CellSidebarWidget.d.ts +1 -1
  116. package/lib/components/notebook/cell/sidebar/CellSidebarWidget.js +1 -1
  117. package/lib/components/notebook/cell/sidebar/CellSidebarWidget.js.map +1 -1
  118. package/lib/components/notebook/marked/marked.js +1 -1
  119. package/lib/components/output/Output.d.ts +11 -10
  120. package/lib/components/output/Output.js +32 -57
  121. package/lib/components/output/Output.js.map +1 -1
  122. package/lib/components/output/OutputAdapter.d.ts +1 -1
  123. package/lib/components/output/OutputAdapter.js +14 -12
  124. package/lib/components/output/OutputAdapter.js.map +1 -1
  125. package/lib/components/output/OutputRenderer.js +4 -2
  126. package/lib/components/output/OutputRenderer.js.map +1 -1
  127. package/lib/components/output/OutputZustand.d.ts +5 -0
  128. package/lib/components/output/OutputZustand.js +5 -0
  129. package/lib/components/output/OutputZustand.js.map +1 -1
  130. package/lib/components/output/ipywidgets/IPyWidgetsAttached.js +1 -1
  131. package/lib/components/output/ipywidgets/IPyWidgetsAttached.js.map +1 -1
  132. package/lib/components/output/ipywidgets/IPyWidgetsViewManager.js +7 -6
  133. package/lib/components/output/ipywidgets/IPyWidgetsViewManager.js.map +1 -1
  134. package/lib/components/settings/Settings.js +1 -1
  135. package/lib/components/settings/Settings.js.map +1 -1
  136. package/lib/components/terminal/Terminal.d.ts +4 -0
  137. package/lib/components/terminal/Terminal.js +1 -1
  138. package/lib/components/terminal/Terminal.js.map +1 -1
  139. package/lib/components/terminal/TerminalAdapter.js +12 -3
  140. package/lib/components/terminal/TerminalAdapter.js.map +1 -1
  141. package/lib/components/viewer/Viewer.d.ts +2 -1
  142. package/lib/components/viewer/Viewer.js +16 -3
  143. package/lib/components/viewer/Viewer.js.map +1 -1
  144. package/lib/components/viewer/input/CodemirrorViewer.js +2 -2
  145. package/lib/components/viewer/input/CodemirrorViewer.js.map +1 -1
  146. package/lib/components/viewer/input/InputViewer.js +1 -4
  147. package/lib/components/viewer/input/InputViewer.js.map +1 -1
  148. package/lib/components/viewer/output/OutputAdapter.js +2 -2
  149. package/lib/components/viewer/output/OutputAdapter.js.map +1 -1
  150. package/lib/components/viewer/output/OutputViewer.js +1 -1
  151. package/lib/components/viewer/output/OutputViewer.js.map +1 -1
  152. package/lib/examples/All.js +5 -4
  153. package/lib/examples/All.js.map +1 -1
  154. package/lib/examples/Bqplot.js +7 -1
  155. package/lib/examples/Bqplot.js.map +1 -1
  156. package/lib/examples/CellLite.js +16 -0
  157. package/lib/examples/CellLite.js.map +1 -0
  158. package/lib/examples/Console.js +1 -1
  159. package/lib/examples/Console.js.map +1 -1
  160. package/lib/examples/ConsoleLite.js +3 -1
  161. package/lib/examples/ConsoleLite.js.map +1 -1
  162. package/lib/examples/Deno.js +18 -0
  163. package/lib/examples/Deno.js.map +1 -0
  164. package/lib/examples/IPyLeaflet.js +7 -3
  165. package/lib/examples/IPyLeaflet.js.map +1 -1
  166. package/lib/examples/IPyReact.js +7 -3
  167. package/lib/examples/IPyReact.js.map +1 -1
  168. package/lib/examples/JupyterLabHeadlessApp.js +1 -1
  169. package/lib/examples/JupyterLabHeadlessApp.js.map +1 -1
  170. package/lib/examples/KernelExecResult.d.ts +1 -0
  171. package/lib/examples/KernelExecResult.js +40 -0
  172. package/lib/examples/KernelExecResult.js.map +1 -0
  173. package/lib/examples/KernelExecutor.js +20 -10
  174. package/lib/examples/KernelExecutor.js.map +1 -1
  175. package/lib/examples/Kernels.d.ts +1 -0
  176. package/lib/examples/Kernels.js +78 -0
  177. package/lib/examples/Kernels.js.map +1 -0
  178. package/lib/examples/Lumino.js +1 -1
  179. package/lib/examples/Lumino.js.map +1 -1
  180. package/lib/examples/Matplotlib.js +11 -7
  181. package/lib/examples/Matplotlib.js.map +1 -1
  182. package/lib/examples/NotebookCellSidebar.js +9 -5
  183. package/lib/examples/NotebookCellSidebar.js.map +1 -1
  184. package/lib/examples/NotebookColorMode.js +18 -12
  185. package/lib/examples/NotebookColorMode.js.map +1 -1
  186. package/lib/examples/NotebookExternalContent.js +9 -5
  187. package/lib/examples/NotebookExternalContent.js.map +1 -1
  188. package/lib/examples/NotebookInit.js +8 -4
  189. package/lib/examples/NotebookInit.js.map +1 -1
  190. package/lib/examples/NotebookKernelChange.js +4 -3
  191. package/lib/examples/NotebookKernelChange.js.map +1 -1
  192. package/lib/examples/NotebookLite.d.ts +1 -0
  193. package/lib/examples/NotebookLite.js +20 -0
  194. package/lib/examples/NotebookLite.js.map +1 -0
  195. package/lib/examples/NotebookNbFormat.js +9 -5
  196. package/lib/examples/NotebookNbFormat.js.map +1 -1
  197. package/lib/examples/NotebookNbFormatChange.d.ts +1 -0
  198. package/lib/examples/{NotebookModelChange.js → NotebookNbFormatChange.js} +12 -8
  199. package/lib/examples/NotebookNbFormatChange.js.map +1 -0
  200. package/lib/examples/NotebookPath.js +9 -5
  201. package/lib/examples/NotebookPath.js.map +1 -1
  202. package/lib/examples/NotebookPathChange.js +9 -5
  203. package/lib/examples/NotebookPathChange.js.map +1 -1
  204. package/lib/examples/NotebookSkeleton.d.ts +1 -0
  205. package/lib/examples/NotebookSkeleton.js +28 -0
  206. package/lib/examples/NotebookSkeleton.js.map +1 -0
  207. package/lib/examples/NotebookTheme.js +20 -13
  208. package/lib/examples/NotebookTheme.js.map +1 -1
  209. package/lib/examples/NotebookUnmount.js +5 -4
  210. package/lib/examples/NotebookUnmount.js.map +1 -1
  211. package/lib/examples/ObservableHQ.d.ts +1 -0
  212. package/lib/examples/ObservableHQ.js +18 -0
  213. package/lib/examples/ObservableHQ.js.map +1 -0
  214. package/lib/examples/Outputs.js +2 -2
  215. package/lib/examples/Outputs.js.map +1 -1
  216. package/lib/examples/RunningSessions.js +1 -1
  217. package/lib/examples/RunningSessions.js.map +1 -1
  218. package/lib/examples/Viewer.js +6 -68
  219. package/lib/examples/Viewer.js.map +1 -1
  220. package/lib/examples/lumino/LuminoWidget.js +3 -3
  221. package/lib/examples/lumino/LuminoWidget.js.map +1 -1
  222. package/lib/examples/toolbars/NotebookToolbar.js +7 -4
  223. package/lib/examples/toolbars/NotebookToolbar.js.map +1 -1
  224. package/lib/examples/toolbars/NotebookToolbarAutoSave.js +1 -1
  225. package/lib/examples/toolbars/NotebookToolbarAutoSave.js.map +1 -1
  226. package/lib/index.d.ts +33 -24
  227. package/lib/index.js +53 -36
  228. package/lib/index.js.map +1 -1
  229. package/lib/jupyter/Jupyter.d.ts +6 -1090
  230. package/lib/jupyter/Jupyter.js +23 -18
  231. package/lib/jupyter/Jupyter.js.map +1 -1
  232. package/lib/jupyter/JupyterConfig.js +1 -1
  233. package/lib/jupyter/JupyterConfig.js.map +1 -1
  234. package/lib/jupyter/JupyterContext.d.ts +118 -23
  235. package/lib/jupyter/JupyterContext.js +115 -100
  236. package/lib/jupyter/JupyterContext.js.map +1 -1
  237. package/lib/jupyter/ipywidgets/cache/semvercache.d.ts +3 -1
  238. package/lib/jupyter/ipywidgets/cache/semvercache.js.map +1 -1
  239. package/lib/jupyter/ipywidgets/classic/IPyWidgetsClassicManager.d.ts +5 -3
  240. package/lib/jupyter/ipywidgets/classic/IPyWidgetsClassicManager.js +14 -14
  241. package/lib/jupyter/ipywidgets/classic/IPyWidgetsClassicManager.js.map +1 -1
  242. package/lib/jupyter/ipywidgets/lab/manager.js +4 -5
  243. package/lib/jupyter/ipywidgets/lab/manager.js.map +1 -1
  244. package/lib/jupyter/ipywidgets/lab/plugin.js +2 -2
  245. package/lib/jupyter/ipywidgets/lab/plugin.js.map +1 -1
  246. package/lib/jupyter/ipywidgets/lab/renderer.js.map +1 -1
  247. package/lib/jupyter/ipywidgets/plotly/Figure.js +180 -169
  248. package/lib/jupyter/ipywidgets/plotly/Figure.js.map +1 -1
  249. package/lib/jupyter/kernel/Kernel.d.ts +69 -19
  250. package/lib/jupyter/kernel/Kernel.js +62 -44
  251. package/lib/jupyter/kernel/Kernel.js.map +1 -1
  252. package/lib/jupyter/kernel/KernelExecutor.d.ts +16 -6
  253. package/lib/jupyter/kernel/KernelExecutor.js +61 -27
  254. package/lib/jupyter/kernel/KernelExecutor.js.map +1 -1
  255. package/lib/jupyter/kernel/index.d.ts +2 -0
  256. package/lib/jupyter/kernel/index.js +8 -0
  257. package/lib/jupyter/kernel/index.js.map +1 -0
  258. package/lib/jupyter/lab/JupyterLabColorMode.js +7 -0
  259. package/lib/jupyter/lab/JupyterLabColorMode.js.map +1 -0
  260. package/lib/jupyter/lab/JupyterLabCss.d.ts +5 -2
  261. package/lib/jupyter/lab/JupyterLabCss.js +35 -7
  262. package/lib/jupyter/lab/JupyterLabCss.js.map +1 -1
  263. package/lib/jupyter/lab/index.d.ts +2 -2
  264. package/lib/jupyter/lab/index.js +1 -2
  265. package/lib/jupyter/lab/index.js.map +1 -1
  266. package/lib/jupyter/lab/notebook/content/CountdownContentFactory.d.ts +3 -8
  267. package/lib/jupyter/lab/notebook/content/CountdownContentFactory.js +6 -12
  268. package/lib/jupyter/lab/notebook/content/CountdownContentFactory.js.map +1 -1
  269. package/lib/jupyter/lab/notebook/content/plugin.js +2 -2
  270. package/lib/jupyter/lab/notebook/content/plugin.js.map +1 -1
  271. package/lib/jupyter/lite/LiteServer.d.ts +11 -2
  272. package/lib/jupyter/lite/LiteServer.js +41 -66
  273. package/lib/jupyter/lite/LiteServer.js.map +1 -1
  274. package/lib/jupyter/renderers/plotly/PlotlyRenderer.js +4 -4
  275. package/lib/jupyter/renderers/plotly/PlotlyRenderer.js.map +1 -1
  276. package/lib/jupyter/theme.js +3 -2
  277. package/lib/jupyter/theme.js.map +1 -1
  278. package/lib/utils/Utils.d.ts +3 -2
  279. package/lib/utils/Utils.js +45 -1
  280. package/lib/utils/Utils.js.map +1 -1
  281. package/lib/utils/index.d.ts +1 -0
  282. package/lib/utils/index.js +2 -0
  283. package/lib/utils/index.js.map +1 -0
  284. package/package.json +170 -86
  285. package/lib/examples/NotebookModelChange.js.map +0 -1
  286. package/lib/examples/ViewerFile.js +0 -19
  287. package/lib/examples/ViewerFile.js.map +0 -1
  288. package/lib/jupyter/lab/JupyterLabTheme.js.map +0 -1
  289. package/lib/jupyter/lumino/Lumino.js.map +0 -1
  290. package/lib/jupyter/lumino/LuminoBox.js.map +0 -1
  291. package/lib/jupyter/lumino/LuminoDetached.js.map +0 -1
  292. package/lib/jupyter/lumino/LuminoObservable.js.map +0 -1
  293. package/lib/jupyter/lumino/LuminoRedux.js.map +0 -1
  294. package/lib/jupyter/lumino/ReactPortalWidget.js.map +0 -1
  295. /package/lib/{jupyter → components}/lumino/Lumino.d.ts +0 -0
  296. /package/lib/{jupyter → components}/lumino/Lumino.js +0 -0
  297. /package/lib/{jupyter → components}/lumino/LuminoBox.d.ts +0 -0
  298. /package/lib/{jupyter → components}/lumino/LuminoBox.js +0 -0
  299. /package/lib/{jupyter → components}/lumino/LuminoDetached.d.ts +0 -0
  300. /package/lib/{jupyter → components}/lumino/LuminoDetached.js +0 -0
  301. /package/lib/{jupyter → components}/lumino/LuminoObservable.d.ts +0 -0
  302. /package/lib/{jupyter → components}/lumino/LuminoObservable.js +0 -0
  303. /package/lib/{jupyter → components}/lumino/LuminoRedux.d.ts +0 -0
  304. /package/lib/{jupyter → components}/lumino/LuminoRedux.js +0 -0
  305. /package/lib/{jupyter → components}/lumino/ReactPortalWidget.d.ts +0 -0
  306. /package/lib/{jupyter → components}/lumino/ReactPortalWidget.js +0 -0
  307. /package/lib/examples/{NotebookModelChange.d.ts → CellLite.d.ts} +0 -0
  308. /package/lib/examples/{ViewerFile.d.ts → Deno.d.ts} +0 -0
  309. /package/lib/jupyter/lab/{JupyterLabTheme.d.ts → JupyterLabColorMode.d.ts} +0 -0
@@ -0,0 +1,76 @@
1
+ /*
2
+ * Copyright (c) 2021-2023 Datalayer, Inc.
3
+ *
4
+ * MIT License
5
+ */
6
+ import { Signal } from '@lumino/signaling';
7
+ /**
8
+ * Connector class that handles execute request to a kernel
9
+ */
10
+ export class KernelConnector {
11
+ _kernel;
12
+ _kernelRestarted = new Signal(this);
13
+ constructor(options) {
14
+ this._kernel = options.kernel;
15
+ this._kernel.connection?.statusChanged.connect((_, newStatus) => {
16
+ switch (newStatus) {
17
+ case 'restarting':
18
+ case 'autorestarting':
19
+ this._kernelRestarted.emit(this._kernel.ready);
20
+ break;
21
+ default:
22
+ break;
23
+ }
24
+ });
25
+ }
26
+ get kernelRestarted() {
27
+ return this._kernelRestarted;
28
+ }
29
+ get kernelLanguage() {
30
+ if (!this._kernel) {
31
+ return Promise.resolve('');
32
+ }
33
+ return this._kernel.connection.info.then(infoReply => {
34
+ return infoReply.language_info.name;
35
+ });
36
+ }
37
+ get kernelName() {
38
+ return this._kernel.connection.name;
39
+ }
40
+ /**
41
+ * A Promise that is fulfilled when the session associated w/ the connector is ready.
42
+ */
43
+ get ready() {
44
+ return this._kernel.ready;
45
+ }
46
+ /**
47
+ * A signal emitted for iopub messages of the kernel associated with the kernel.
48
+ */
49
+ get iopubMessage() {
50
+ return this._kernel.connection.iopubMessage;
51
+ }
52
+ /**
53
+ * Executes the given request on the kernel associated with the connector.
54
+ * @param content: IExecuteRequestMsg to forward to the kernel.
55
+ * @param ioCallback: Callable to forward IOPub messages of the kernel to.
56
+ * @returns Promise<KernelMessage.IExecuteReplyMsg>
57
+ */
58
+ fetch(content, ioCallback) {
59
+ const kernel = this._kernel.connection;
60
+ if (!kernel) {
61
+ return Promise.reject(new Error('Require kernel to perform variable inspection!'));
62
+ }
63
+ const future = kernel.requestExecute(content);
64
+ future.onIOPub = (msg) => {
65
+ ioCallback(msg);
66
+ };
67
+ return future.done;
68
+ }
69
+ execute(content) {
70
+ if (!this._kernel.connection) {
71
+ throw new Error('No session available.');
72
+ }
73
+ return this._kernel.connection.requestExecute(content);
74
+ }
75
+ }
76
+ //# sourceMappingURL=kernelconnector.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kernelconnector.js","sourceRoot":"","sources":["../../../../src/components/kernel/variables/kernelconnector.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAWH,OAAO,EAAW,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAGpD;;GAEG;AACH,MAAM,OAAO,eAAe;IAClB,OAAO,CAAS;IAChB,gBAAgB,GAAG,IAAI,MAAM,CAAsB,IAAI,CAAC,CAAC;IAEjE,YAAY,OAAiC;QAC3C,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC;QAC9B,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,aAAa,CAAC,OAAO,CAC5C,CAAC,CAAC,EAAE,SAA+B,EAAE,EAAE;YACrC,QAAQ,SAAS,EAAE;gBACjB,KAAK,YAAY,CAAC;gBAClB,KAAK,gBAAgB;oBACnB,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;oBAC/C,MAAM;gBACR;oBACE,MAAM;aACT;QACH,CAAC,CACF,CAAC;IACJ,CAAC;IAED,IAAI,eAAe;QACjB,OAAO,IAAI,CAAC,gBAAgB,CAAC;IAC/B,CAAC;IAED,IAAI,cAAc;QAChB,IAAI,CAA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,0 +1,26 @@
1
+ import { VariableInspectionHandler } from './handler';
2
+ import { VariableInspectorPanel } from './widget';
3
+ import { IVariableInspector, IVariableInspectorManager } from './tokens';
4
+ /**
5
+ * A class that manages variable inspector widget instances and offers persistent
6
+ * `IVariableInspector` instance that other plugins can communicate with.
7
+ */
8
+ export declare class VariableInspectorManager implements IVariableInspectorManager {
9
+ private _source;
10
+ private _panel?;
11
+ private _handlers;
12
+ hasHandler(id: string): boolean;
13
+ getHandler(id: string): VariableInspectionHandler;
14
+ addHandler(handler: VariableInspectionHandler): void;
15
+ /**
16
+ * The current inspector panel.
17
+ */
18
+ get panel(): VariableInspectorPanel | undefined;
19
+ set panel(panel: VariableInspectorPanel | undefined);
20
+ /**
21
+ * The source of events the inspector panel listens for.
22
+ */
23
+ get source(): IVariableInspector.IInspectable | null;
24
+ set source(source: IVariableInspector.IInspectable | null);
25
+ private _onSourceDisposed;
26
+ }
@@ -0,0 +1,70 @@
1
+ /*
2
+ * Copyright (c) 2021-2023 Datalayer, Inc.
3
+ *
4
+ * MIT License
5
+ */
6
+ /**
7
+ * A class that manages variable inspector widget instances and offers persistent
8
+ * `IVariableInspector` instance that other plugins can communicate with.
9
+ */
10
+ export class VariableInspectorManager {
11
+ _source = null;
12
+ _panel;
13
+ _handlers = {};
14
+ hasHandler(id) {
15
+ if (this._handlers[id]) {
16
+ return true;
17
+ }
18
+ else {
19
+ return false;
20
+ }
21
+ }
22
+ getHandler(id) {
23
+ return this._handlers[id];
24
+ }
25
+ addHandler(handler) {
26
+ this._handlers[handler.id] = handler;
27
+ }
28
+ /**
29
+ * The current inspector panel.
30
+ */
31
+ get panel() {
32
+ return this._panel;
33
+ }
34
+ set panel(panel) {
35
+ if (this.panel === panel) {
36
+ return;
37
+ }
38
+ this._panel = panel;
39
+ if (panel && !panel.source) {
40
+ panel.source = this._source;
41
+ }
42
+ }
43
+ /**
44
+ * The source of events the inspector panel listens for.
45
+ */
46
+ get source() {
47
+ return this._source;
48
+ }
49
+ set source(source) {
50
+ if (this._source === source) {
51
+ return;
52
+ }
53
+ // remove subscriptions
54
+ if (this._source) {
55
+ this._source.disposed.disconnect(this._onSourceDisposed, this);
56
+ }
57
+ this._source = source;
58
+ if (this._panel && !this._panel.isDisposed) {
59
+ this._panel.source = this._source;
60
+ }
61
+ // Subscribe to new source
62
+ if (this._source) {
63
+ this._source.disposed.connect(this._onSourceDisposed, this);
64
+ }
65
+ }
66
+ _onSourceDisposed() {
67
+ this._source = null;
68
+ }
69
+ }
70
+ //# sourceMappingURL=manager.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"manager.js","sourceRoot":"","sources":["../../../../src/components/kernel/variables/manager.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH;;;GAGG;AACH,MAAM,OAAO,wBAAwB;IAC3B,OAAO,GAA2C,IAAI,CAAC;IACvD,MAAM,CAA0B;IAChC,SAAS,GAAgD,EAAE,CAAC;IAEpE,UAAU,CAAC,EAAU;QACnB,IAAI,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,EAAE;YACtB,OAAO,IAAI,CAAC;SACb;aAAM;YACL,OAAO,KAAK,CAAC;SACd;IACH,CAAC;IAED,UAAU,CAAC,EAAU;QACnB,OAAO,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;IAC5B,CAAC;IAED,UAAU,CAAC,OAAkC;QAC3C,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC;IACvC,CAAC;IAED;;OAEG;IACH,IAAI,KAAK;QACP,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IAED,IAAI,KAAK,CAAC,KAAyC;QACjD,IAAI,IAAI,CAAC,KAAK,KAAK,KAAK,EAAE;YACxB,OAAO;SACR;QACD,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QAEpB,IAAI,KAAK,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE;YAC1B,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC;SAC7B;IACH,CAAC;IAED;;OAEG;IACH,IAAI,MAAM;QACR,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAED,IAAI,MAAM,CAAC,MAA8C;QACvD,IAAI,IAAI,CAAC,OAAO,KAAK,MAAM,EAAE;YAC3B,OAAO;SACR;QAED,uBAAuB;QACvB,IAAI,IAAI,CAAC,OAAO,EAAE;YAChB,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,iBAAiB,EAAE,IAAI,CAAC,CAAC;SAChE;QAED,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QAEtB,IAAI,IAAI,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE;YAC1C,IAAI,CAAC,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC;SACnC;QACD,0BAA0B;QAC1B,IAAI,IAAI,CAAC,OAAO,EAAE;YAChB,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,iBAAiB,EAAE,IAAI,CAAC,CAAC;SAC7D;IACH,CAAC;IAEO,iBAAiB;QACvB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;IACtB,CAAC;CACF"}
@@ -0,0 +1,48 @@
1
+ import { IRenderMimeRegistry } from '@jupyterlab/rendermime';
2
+ import { Kernel, KernelMessage } from '@jupyterlab/services';
3
+ import { DataModel } from '@lumino/datagrid';
4
+ import { IObservableDisposable } from '@lumino/disposable';
5
+ import { ISignal } from '@lumino/signaling';
6
+ import type { VariableInspectionHandler } from './handler';
7
+ export interface IVariableInspectorManager {
8
+ source: IVariableInspector.IInspectable | null;
9
+ hasHandler(id: string): boolean;
10
+ getHandler(id: string): VariableInspectionHandler;
11
+ addHandler(handler: VariableInspectionHandler): void;
12
+ }
13
+ /**
14
+ * An interface for an inspector.
15
+ */
16
+ export interface IVariableInspector {
17
+ source: IVariableInspector.IInspectable | null;
18
+ }
19
+ /**
20
+ * A namespace for inspector interfaces.
21
+ */
22
+ export declare namespace IVariableInspector {
23
+ interface IInspectable extends IObservableDisposable {
24
+ inspected: ISignal<IInspectable, IVariableInspectorUpdate>;
25
+ rendermime: IRenderMimeRegistry | null;
26
+ performInspection(): void;
27
+ performMatrixInspection(varName: string, maxRows?: number): Promise<DataModel>;
28
+ performWidgetInspection(varName: string): Kernel.IShellFuture<KernelMessage.IExecuteRequestMsg, KernelMessage.IExecuteReplyMsg>;
29
+ performDelete(varName: string): void;
30
+ }
31
+ interface IVariableInspectorUpdate {
32
+ title: IVariableTitle;
33
+ payload: Array<IVariable>;
34
+ }
35
+ interface IVariable {
36
+ varName: string;
37
+ varSize: string;
38
+ varShape: string;
39
+ varContent: string;
40
+ varType: string;
41
+ isMatrix: boolean;
42
+ isWidget: boolean;
43
+ }
44
+ interface IVariableTitle {
45
+ kernelName?: string;
46
+ contextName?: string;
47
+ }
48
+ }
@@ -4,4 +4,4 @@
4
4
  * MIT License
5
5
  */
6
6
  export {};
7
- //# sourceMappingURL=JupyterLabTheme.js.map
7
+ //# sourceMappingURL=tokens.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tokens.js","sourceRoot":"","sources":["../../../../src/components/kernel/variables/tokens.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
@@ -0,0 +1,110 @@
1
+ /*
2
+ * Copyright (c) 2021-2023 Datalayer, Inc.
3
+ *
4
+ * MIT License
5
+ */
6
+
7
+ .jp-VarInspector {
8
+ flex-direction: column;
9
+ overflow: auto;
10
+ font-size: var(--jp-ui-font-size1);
11
+ }
12
+
13
+ .jp-VarInspector-table {
14
+ font-family: monospace;
15
+ border-collapse: collapse;
16
+ margin: auto;
17
+ width: 100%;
18
+ color: var(--jp-content-font-color1);
19
+ }
20
+
21
+ .jp-VarInspector-table td,
22
+ .jp-VarInspector-table thead {
23
+ border: 1px solid;
24
+ border-color: var(--jp-layout-color2);
25
+ padding: 8px;
26
+ }
27
+
28
+ .jp-VarInspector-table tr:nth-child(even) {
29
+ background-color: var(--jp-layout-color1);
30
+ }
31
+
32
+ .jp-VarInspector-content tr:hover {
33
+ background-color: var(--jp-layout-color2);
34
+ }
35
+
36
+ .jp-VarInspector-table thead {
37
+ font-size: var(--jp-ui-font-size0);
38
+ text-align: center;
39
+ background-color: var(--jp-layout-color2);
40
+ color: var(--jp-ui-font-color1);
41
+ font-family: sans-serif;
42
+ font-weight: 600;
43
+ letter-spacing: 1px;
44
+ text-transform: uppercase;
45
+ }
46
+
47
+ .jp-VarInspector-title {
48
+ font-size: var(--jp-ui-font-size1);
49
+ color: var(--jp-content-font-color1);
50
+ text-align: left;
51
+ padding-left: 10px;
52
+ }
53
+
54
+ .filter-container {
55
+ display: flex;
56
+ flex-direction: column;
57
+ }
58
+
59
+ .filter-search-container {
60
+ display: flex;
61
+ align-items: center;
62
+ padding: 0 1rem;
63
+ }
64
+
65
+ .filter-input {
66
+ width: 20rem !important;
67
+ margin-left: 1rem;
68
+ }
69
+
70
+ .type-button {
71
+ color: var(--jp-ui-font-color0);
72
+ }
73
+
74
+ .name-button {
75
+ color: var(--jp-ui-font-color1);
76
+ }
77
+
78
+ .filter-list {
79
+ display: flex;
80
+ }
81
+
82
+ .jp-VarInspector-table-row-hidden {
83
+ display: none;
84
+ }
85
+
86
+ .jp-VarInspector-deleteButton {
87
+ display: flex;
88
+ justify-content: space-around;
89
+ width: 1em;
90
+ }
91
+
92
+ .jp-VarInspector-inspectButton {
93
+ display: flex;
94
+ justify-content: space-around;
95
+ width: 1em;
96
+ }
97
+
98
+ .jp-VarInspector-varName {
99
+ font-weight: 600;
100
+ }
101
+
102
+ .filter-button-content {
103
+ display: flex;
104
+ align-items: center;
105
+ gap: 0.5rem;
106
+ }
107
+
108
+ .icon-button {
109
+ cursor: pointer;
110
+ }
@@ -0,0 +1,5 @@
1
+ import { VariableInspectorManager } from './manager';
2
+ import Kernel from './../../../jupyter/kernel/Kernel';
3
+ import './variablesinspector.css';
4
+ export declare const createVariablesInspectorManager: () => VariableInspectorManager;
5
+ export declare const registerKernel: (manager: VariableInspectorManager, kernel: Kernel) => void;
@@ -0,0 +1,85 @@
1
+ /*
2
+ * Copyright (c) 2021-2023 Datalayer, Inc.
3
+ *
4
+ * MIT License
5
+ */
6
+ import { listIcon } from '@jupyterlab/ui-components';
7
+ import { addJupyterLabThemeChangeListener } from '@jupyter/web-components';
8
+ import { VariableInspectionHandler } from './handler';
9
+ import { Languages } from './inspectorscripts';
10
+ import { KernelConnector } from './kernelconnector';
11
+ import { VariableInspectorManager } from './manager';
12
+ import { VariableInspectorPanel } from './widget';
13
+ import './variablesinspector.css';
14
+ addJupyterLabThemeChangeListener();
15
+ export const createVariablesInspectorManager = () => {
16
+ const manager = new VariableInspectorManager();
17
+ function createVariableInspectorPanel() {
18
+ const panel = new VariableInspectorPanel();
19
+ panel.id = 'jp-variableinspector';
20
+ panel.title.label = 'Variable Inspector';
21
+ panel.title.icon = listIcon;
22
+ panel.title.closable = true;
23
+ panel.disposed.connect(() => {
24
+ if (manager.panel === panel) {
25
+ manager.panel = undefined;
26
+ }
27
+ });
28
+ return panel;
29
+ }
30
+ manager.panel = createVariableInspectorPanel();
31
+ manager.source?.performInspection();
32
+ return manager;
33
+ };
34
+ export const registerKernel = (manager, kernel) => {
35
+ const handlers = {};
36
+ /**
37
+ * Subscribes to the creation of new notebooks. If a new notebook is created, build a new handler for the notebook.
38
+ * Adds a promise for a instanced handler to the 'handlers' collection.
39
+ */
40
+ // A promise that resolves after the initialization of the handler is done.
41
+ handlers[kernel.id] = new Promise((resolve, reject) => {
42
+ const connector = new KernelConnector({ kernel });
43
+ const scripts = connector.ready.then(async () => {
44
+ const lang = await connector.kernelLanguage;
45
+ return Languages.getScript(lang);
46
+ });
47
+ scripts
48
+ .then((result) => {
49
+ const initScript = result.initScript;
50
+ const queryCommand = result.queryCommand;
51
+ const matrixQueryCommand = result.matrixQueryCommand;
52
+ const widgetQueryCommand = result.widgetQueryCommand;
53
+ const deleteCommand = result.deleteCommand;
54
+ const options = {
55
+ queryCommand: queryCommand,
56
+ matrixQueryCommand: matrixQueryCommand,
57
+ widgetQueryCommand,
58
+ deleteCommand: deleteCommand,
59
+ connector: connector,
60
+ initScript: initScript,
61
+ id: kernel.path, //Using the sessions path as an identifier for now.
62
+ };
63
+ const handler = new VariableInspectionHandler(options);
64
+ manager.addHandler(handler);
65
+ kernel.connection?.disposed.connect(() => {
66
+ delete handlers[kernel.id];
67
+ handler.dispose();
68
+ });
69
+ handler.ready.then(() => {
70
+ const future = handlers[kernel.id];
71
+ future?.then((source) => {
72
+ if (source) {
73
+ manager.source = source;
74
+ manager.source.performInspection();
75
+ }
76
+ });
77
+ resolve(handler);
78
+ });
79
+ })
80
+ .catch((result) => {
81
+ reject(result);
82
+ });
83
+ });
84
+ };
85
+ //# sourceMappingURL=variablesinspector.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"variablesinspector.js","sourceRoot":"","sources":["../../../../src/components/kernel/variables/variablesinspector.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACrD,OAAO,EAAE,gCAAgC,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,EAAE,yBAAyB,EAAE,MAAM,WAAW,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AACrD,OAAO,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAGlD,OAAO,0BAA0B,CAAC;AAElC,gCAAgC,EAAE,CAAC;AAEnC,MAAM,CAAC,MAAM,+BAA+B,GAAG,GAAG,EAAE;IAClD,MAAM,OAAO,GAAG,IAAI,wBAAwB,EAAE,CAAC;IAC/C,SAAS,4BAA4B;QACnC,MAAM,KAAK,GAAG,IAAI,s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CAAC;IACP,CAAC,CAAC,CAAC;AACL,CAAC,CAAC"}
@@ -0,0 +1,33 @@
1
+ import { Widget } from '@lumino/widgets';
2
+ import { IVariableInspector } from './tokens';
3
+ type FILTER_TYPES = 'type' | 'name';
4
+ /**
5
+ * A panel that renders the variables
6
+ */
7
+ export declare class VariableInspectorPanel extends Widget implements IVariableInspector {
8
+ private _source;
9
+ private _table;
10
+ private _filteredTable;
11
+ private _title;
12
+ private _filtered;
13
+ constructor();
14
+ protected intializeFilteredTable(): void;
15
+ protected stringInFilter(string: string, filterType: FILTER_TYPES): boolean;
16
+ protected onFilterChange(filterType: FILTER_TYPES, varName: string, isAdding: boolean): void;
17
+ protected addFilteredOutRows(): void;
18
+ protected filterOutTable(): void;
19
+ protected removeRow(name: string): void;
20
+ get source(): IVariableInspector.IInspectable | null;
21
+ set source(source: IVariableInspector.IInspectable | null);
22
+ /**
23
+ * Dispose resources
24
+ */
25
+ dispose(): void;
26
+ protected onInspectorUpdate(sender: any, allArgs: IVariableInspector.IVariableInspectorUpdate): void;
27
+ /**
28
+ * Handle source disposed signals.
29
+ */
30
+ protected onSourceDisposed(sender: any, args: void): void;
31
+ private _showMatrix;
32
+ }
33
+ export {};