@datalayer/jupyter-react 0.0.1

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 (297) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +56 -0
  3. package/lib/examples/Example.d.ts +1 -0
  4. package/lib/examples/Example.js +8 -0
  5. package/lib/examples/Example.js.map +1 -0
  6. package/lib/examples/MuiSetup.d.ts +5 -0
  7. package/lib/examples/MuiSetup.js +13 -0
  8. package/lib/examples/MuiSetup.js.map +1 -0
  9. package/lib/examples/bootstrap/All.bootstrap.d.ts +1 -0
  10. package/lib/examples/bootstrap/All.bootstrap.js +84 -0
  11. package/lib/examples/bootstrap/All.bootstrap.js.map +1 -0
  12. package/lib/examples/bootstrap/Cell.bootstrap.d.ts +1 -0
  13. package/lib/examples/bootstrap/Cell.bootstrap.js +12 -0
  14. package/lib/examples/bootstrap/Cell.bootstrap.js.map +1 -0
  15. package/lib/examples/bootstrap/FileBrowser.bootstrap.d.ts +1 -0
  16. package/lib/examples/bootstrap/FileBrowser.bootstrap.js +10 -0
  17. package/lib/examples/bootstrap/FileBrowser.bootstrap.js.map +1 -0
  18. package/lib/examples/bootstrap/Gallery.bootstrap.d.ts +1 -0
  19. package/lib/examples/bootstrap/Gallery.bootstrap.js +18 -0
  20. package/lib/examples/bootstrap/Gallery.bootstrap.js.map +1 -0
  21. package/lib/examples/bootstrap/IPyWidgets.bootstrap.d.ts +1 -0
  22. package/lib/examples/bootstrap/IPyWidgets.bootstrap.js +12 -0
  23. package/lib/examples/bootstrap/IPyWidgets.bootstrap.js.map +1 -0
  24. package/lib/examples/bootstrap/Lumino.bootstrap.d.ts +1 -0
  25. package/lib/examples/bootstrap/Lumino.bootstrap.js +11 -0
  26. package/lib/examples/bootstrap/Lumino.bootstrap.js.map +1 -0
  27. package/lib/examples/bootstrap/Notebook.bootstrap.d.ts +1 -0
  28. package/lib/examples/bootstrap/Notebook.bootstrap.js +22 -0
  29. package/lib/examples/bootstrap/Notebook.bootstrap.js.map +1 -0
  30. package/lib/examples/bootstrap/NotebookCustom.bootstrap.d.ts +1 -0
  31. package/lib/examples/bootstrap/NotebookCustom.bootstrap.js +7 -0
  32. package/lib/examples/bootstrap/NotebookCustom.bootstrap.js.map +1 -0
  33. package/lib/examples/bootstrap/Outputs.bootstrap.d.ts +1 -0
  34. package/lib/examples/bootstrap/Outputs.bootstrap.js +154 -0
  35. package/lib/examples/bootstrap/Outputs.bootstrap.js.map +1 -0
  36. package/lib/examples/bootstrap/Terminal.bootstrap.d.ts +1 -0
  37. package/lib/examples/bootstrap/Terminal.bootstrap.js +13 -0
  38. package/lib/examples/bootstrap/Terminal.bootstrap.js.map +1 -0
  39. package/lib/examples/controls/CellControl.d.ts +3 -0
  40. package/lib/examples/controls/CellControl.js +15 -0
  41. package/lib/examples/controls/CellControl.js.map +1 -0
  42. package/lib/examples/controls/CommandsControl.d.ts +3 -0
  43. package/lib/examples/controls/CommandsControl.js +12 -0
  44. package/lib/examples/controls/CommandsControl.js.map +1 -0
  45. package/lib/examples/controls/ConsoleControl.d.ts +3 -0
  46. package/lib/examples/controls/ConsoleControl.js +12 -0
  47. package/lib/examples/controls/ConsoleControl.js.map +1 -0
  48. package/lib/examples/controls/DialogControl.d.ts +2 -0
  49. package/lib/examples/controls/DialogControl.js +7 -0
  50. package/lib/examples/controls/DialogControl.js.map +1 -0
  51. package/lib/examples/controls/FileBrowserControl.d.ts +3 -0
  52. package/lib/examples/controls/FileBrowserControl.js +12 -0
  53. package/lib/examples/controls/FileBrowserControl.js.map +1 -0
  54. package/lib/examples/controls/InitControl.d.ts +2 -0
  55. package/lib/examples/controls/InitControl.js +7 -0
  56. package/lib/examples/controls/InitControl.js.map +1 -0
  57. package/lib/examples/controls/NotebookControl.d.ts +3 -0
  58. package/lib/examples/controls/NotebookControl.js +16 -0
  59. package/lib/examples/controls/NotebookControl.js.map +1 -0
  60. package/lib/examples/controls/OutputControl.d.ts +3 -0
  61. package/lib/examples/controls/OutputControl.js +7 -0
  62. package/lib/examples/controls/OutputControl.js.map +1 -0
  63. package/lib/examples/controls/SettingsControl.d.ts +3 -0
  64. package/lib/examples/controls/SettingsControl.js +12 -0
  65. package/lib/examples/controls/SettingsControl.js.map +1 -0
  66. package/lib/examples/controls/SimpleControl.d.ts +2 -0
  67. package/lib/examples/controls/SimpleControl.js +7 -0
  68. package/lib/examples/controls/SimpleControl.js.map +1 -0
  69. package/lib/examples/controls/TerminalControl.d.ts +3 -0
  70. package/lib/examples/controls/TerminalControl.js +22 -0
  71. package/lib/examples/controls/TerminalControl.js.map +1 -0
  72. package/lib/examples/examples/cell/CellExample.d.ts +2 -0
  73. package/lib/examples/examples/cell/CellExample.js +42 -0
  74. package/lib/examples/examples/cell/CellExample.js.map +1 -0
  75. package/lib/examples/examples/gallery/GalleryExample.d.ts +2 -0
  76. package/lib/examples/examples/gallery/GalleryExample.js +154 -0
  77. package/lib/examples/examples/gallery/GalleryExample.js.map +1 -0
  78. package/lib/examples/examples/ipywidgets/IpyWidgetsExample.d.ts +4 -0
  79. package/lib/examples/examples/ipywidgets/IpyWidgetsExample.js +156 -0
  80. package/lib/examples/examples/ipywidgets/IpyWidgetsExample.js.map +1 -0
  81. package/lib/examples/examples/lumino/LuminoAdapter.css +34 -0
  82. package/lib/examples/examples/lumino/LuminoAdapter.d.ts +9 -0
  83. package/lib/examples/examples/lumino/LuminoAdapter.js +70 -0
  84. package/lib/examples/examples/lumino/LuminoAdapter.js.map +1 -0
  85. package/lib/examples/examples/lumino/LuminoExample.d.ts +2 -0
  86. package/lib/examples/examples/lumino/LuminoExample.js +10 -0
  87. package/lib/examples/examples/lumino/LuminoExample.js.map +1 -0
  88. package/lib/examples/examples/notebook/NotebookCustomHeader.d.ts +2 -0
  89. package/lib/examples/examples/notebook/NotebookCustomHeader.js +39 -0
  90. package/lib/examples/examples/notebook/NotebookCustomHeader.js.map +1 -0
  91. package/lib/examples/examples/notebook/NotebookExample.d.ts +1 -0
  92. package/lib/examples/examples/notebook/NotebookExample.js +24 -0
  93. package/lib/examples/examples/notebook/NotebookExample.js.map +1 -0
  94. package/lib/examples/theme/Layers.d.ts +2 -0
  95. package/lib/examples/theme/Layers.js +15 -0
  96. package/lib/examples/theme/Layers.js.map +1 -0
  97. package/lib/examples/theme/Layers.svg +14 -0
  98. package/lib/examples/theme/muiLightTheme.d.ts +8 -0
  99. package/lib/examples/theme/muiLightTheme.js +169 -0
  100. package/lib/examples/theme/muiLightTheme.js.map +1 -0
  101. package/lib/examples/theme/vintage.project.json +172 -0
  102. package/lib/examples/theme/westeros.project.json +168 -0
  103. package/lib/examples/theme/wonderland.project.json +168 -0
  104. package/lib/index.d.ts +31 -0
  105. package/lib/index.js +45 -0
  106. package/lib/index.js.map +1 -0
  107. package/lib/ipywidgets/IPyWidgetsAttached.d.ts +8 -0
  108. package/lib/ipywidgets/IPyWidgetsAttached.js +15 -0
  109. package/lib/ipywidgets/IPyWidgetsAttached.js.map +1 -0
  110. package/lib/ipywidgets/IPyWidgetsClassicManager.d.ts +18 -0
  111. package/lib/ipywidgets/IPyWidgetsClassicManager.js +76 -0
  112. package/lib/ipywidgets/IPyWidgetsClassicManager.js.map +1 -0
  113. package/lib/ipywidgets/IPyWidgetsJupyterLabPlugin.d.ts +15 -0
  114. package/lib/ipywidgets/IPyWidgetsJupyterLabPlugin.js +178 -0
  115. package/lib/ipywidgets/IPyWidgetsJupyterLabPlugin.js.map +1 -0
  116. package/lib/ipywidgets/IpyWidgetsComponent.d.ts +4 -0
  117. package/lib/ipywidgets/IpyWidgetsComponent.js +9 -0
  118. package/lib/ipywidgets/IpyWidgetsComponent.js.map +1 -0
  119. package/lib/ipywidgets/IpyWidgetsManager.d.ts +11 -0
  120. package/lib/ipywidgets/IpyWidgetsManager.js +71 -0
  121. package/lib/ipywidgets/IpyWidgetsManager.js.map +1 -0
  122. package/lib/ipywidgets/plotly/Figure.d.ts +587 -0
  123. package/lib/ipywidgets/plotly/Figure.js +1697 -0
  124. package/lib/ipywidgets/plotly/Figure.js.map +1 -0
  125. package/lib/ipywidgets/plotly/index.d.ts +2 -0
  126. package/lib/ipywidgets/plotly/index.js +4 -0
  127. package/lib/ipywidgets/plotly/index.js.map +1 -0
  128. package/lib/ipywidgets/plotly/jupyterlab-plugin.d.ts +5 -0
  129. package/lib/ipywidgets/plotly/jupyterlab-plugin.js +12 -0
  130. package/lib/ipywidgets/plotly/jupyterlab-plugin.js.map +1 -0
  131. package/lib/ipywidgets/plotly/version.d.ts +8 -0
  132. package/lib/ipywidgets/plotly/version.js +16 -0
  133. package/lib/ipywidgets/plotly/version.js.map +1 -0
  134. package/lib/jupyter/AuthError.d.ts +7 -0
  135. package/lib/jupyter/AuthError.js +8 -0
  136. package/lib/jupyter/AuthError.js.map +1 -0
  137. package/lib/jupyter/Handlers.d.ts +8 -0
  138. package/lib/jupyter/Handlers.js +50 -0
  139. package/lib/jupyter/Handlers.js.map +1 -0
  140. package/lib/jupyter/Jupyter.d.ts +23 -0
  141. package/lib/jupyter/Jupyter.js +35 -0
  142. package/lib/jupyter/Jupyter.js.map +1 -0
  143. package/lib/jupyter/JupyterConfig.d.ts +37 -0
  144. package/lib/jupyter/JupyterConfig.js +59 -0
  145. package/lib/jupyter/JupyterConfig.js.map +1 -0
  146. package/lib/jupyter/JupyterContext.d.ts +35 -0
  147. package/lib/jupyter/JupyterContext.js +64 -0
  148. package/lib/jupyter/JupyterContext.js.map +1 -0
  149. package/lib/lumino/LuminoAttached.d.ts +9 -0
  150. package/lib/lumino/LuminoAttached.js +23 -0
  151. package/lib/lumino/LuminoAttached.js.map +1 -0
  152. package/lib/lumino/LuminoDetached.d.ts +9 -0
  153. package/lib/lumino/LuminoDetached.js +13 -0
  154. package/lib/lumino/LuminoDetached.js.map +1 -0
  155. package/lib/lumino/LuminoObservable.d.ts +6 -0
  156. package/lib/lumino/LuminoObservable.js +16 -0
  157. package/lib/lumino/LuminoObservable.js.map +1 -0
  158. package/lib/lumino/LuminoReactPortal.d.ts +180 -0
  159. package/lib/lumino/LuminoReactPortal.js +195 -0
  160. package/lib/lumino/LuminoReactPortal.js.map +1 -0
  161. package/lib/lumino/LuminoRedux.d.ts +8 -0
  162. package/lib/lumino/LuminoRedux.js +2 -0
  163. package/lib/lumino/LuminoRedux.js.map +1 -0
  164. package/lib/services/Services.d.ts +17 -0
  165. package/lib/services/Services.js +41 -0
  166. package/lib/services/Services.js.map +1 -0
  167. package/lib/services/kernel/Kernel.d.ts +18 -0
  168. package/lib/services/kernel/Kernel.js +95 -0
  169. package/lib/services/kernel/Kernel.js.map +1 -0
  170. package/lib/services/kernel/KernelModel.d.ts +18 -0
  171. package/lib/services/kernel/KernelModel.js +52 -0
  172. package/lib/services/kernel/KernelModel.js.map +1 -0
  173. package/lib/state/AllState.d.ts +8 -0
  174. package/lib/state/AllState.js +24 -0
  175. package/lib/state/AllState.js.map +1 -0
  176. package/lib/state/InjectableStore.d.ts +9 -0
  177. package/lib/state/InjectableStore.js +27 -0
  178. package/lib/state/InjectableStore.js.map +1 -0
  179. package/lib/state/init/Init.d.ts +3 -0
  180. package/lib/state/init/Init.js +12 -0
  181. package/lib/state/init/Init.js.map +1 -0
  182. package/lib/state/init/InitRedux.d.ts +21 -0
  183. package/lib/state/init/InitRedux.js +50 -0
  184. package/lib/state/init/InitRedux.js.map +1 -0
  185. package/lib/widgets/cell/CellAdapter.css +16 -0
  186. package/lib/widgets/cell/CellAdapter.d.ts +18 -0
  187. package/lib/widgets/cell/CellAdapter.js +160 -0
  188. package/lib/widgets/cell/CellAdapter.js.map +1 -0
  189. package/lib/widgets/cell/CellLumino.d.ts +9 -0
  190. package/lib/widgets/cell/CellLumino.js +48 -0
  191. package/lib/widgets/cell/CellLumino.js.map +1 -0
  192. package/lib/widgets/cell/CellState.d.ts +22 -0
  193. package/lib/widgets/cell/CellState.js +79 -0
  194. package/lib/widgets/cell/CellState.js.map +1 -0
  195. package/lib/widgets/commands/CommandsAdapter.css +3 -0
  196. package/lib/widgets/commands/CommandsAdapter.d.ts +9 -0
  197. package/lib/widgets/commands/CommandsAdapter.js +36 -0
  198. package/lib/widgets/commands/CommandsAdapter.js.map +1 -0
  199. package/lib/widgets/commands/CommandsLumino.d.ts +2 -0
  200. package/lib/widgets/commands/CommandsLumino.js +9 -0
  201. package/lib/widgets/commands/CommandsLumino.js.map +1 -0
  202. package/lib/widgets/commands/CommandsState.d.ts +19 -0
  203. package/lib/widgets/commands/CommandsState.js +50 -0
  204. package/lib/widgets/commands/CommandsState.js.map +1 -0
  205. package/lib/widgets/console/ConsoleAdapter.css +4 -0
  206. package/lib/widgets/console/ConsoleAdapter.d.ts +11 -0
  207. package/lib/widgets/console/ConsoleAdapter.js +82 -0
  208. package/lib/widgets/console/ConsoleAdapter.js.map +1 -0
  209. package/lib/widgets/console/ConsoleLumino.d.ts +2 -0
  210. package/lib/widgets/console/ConsoleLumino.js +9 -0
  211. package/lib/widgets/console/ConsoleLumino.js.map +1 -0
  212. package/lib/widgets/console/ConsoleState.d.ts +19 -0
  213. package/lib/widgets/console/ConsoleState.js +50 -0
  214. package/lib/widgets/console/ConsoleState.js.map +1 -0
  215. package/lib/widgets/dialog/DialogAdapter.css +0 -0
  216. package/lib/widgets/dialog/DialogAdapter.d.ts +10 -0
  217. package/lib/widgets/dialog/DialogAdapter.js +19 -0
  218. package/lib/widgets/dialog/DialogAdapter.js.map +1 -0
  219. package/lib/widgets/dialog/DialogLumino.d.ts +2 -0
  220. package/lib/widgets/dialog/DialogLumino.js +13 -0
  221. package/lib/widgets/dialog/DialogLumino.js.map +1 -0
  222. package/lib/widgets/editor/CodeMirrorEditor.d.ts +7 -0
  223. package/lib/widgets/editor/CodeMirrorEditor.js +62 -0
  224. package/lib/widgets/editor/CodeMirrorEditor.js.map +1 -0
  225. package/lib/widgets/filebrowser/FileBrowser.d.ts +2 -0
  226. package/lib/widgets/filebrowser/FileBrowser.js +60 -0
  227. package/lib/widgets/filebrowser/FileBrowser.js.map +1 -0
  228. package/lib/widgets/filebrowser/FileBrowserAdapter.css +8 -0
  229. package/lib/widgets/filebrowser/FileBrowserAdapter.d.ts +13 -0
  230. package/lib/widgets/filebrowser/FileBrowserAdapter.js +267 -0
  231. package/lib/widgets/filebrowser/FileBrowserAdapter.js.map +1 -0
  232. package/lib/widgets/filebrowser/FileBrowserLumino.d.ts +2 -0
  233. package/lib/widgets/filebrowser/FileBrowserLumino.js +9 -0
  234. package/lib/widgets/filebrowser/FileBrowserLumino.js.map +1 -0
  235. package/lib/widgets/filebrowser/FileBrowserState.d.ts +19 -0
  236. package/lib/widgets/filebrowser/FileBrowserState.js +50 -0
  237. package/lib/widgets/filebrowser/FileBrowserState.js.map +1 -0
  238. package/lib/widgets/notebook/NotebookAdapter.css +27 -0
  239. package/lib/widgets/notebook/NotebookAdapter.d.ts +26 -0
  240. package/lib/widgets/notebook/NotebookAdapter.js +187 -0
  241. package/lib/widgets/notebook/NotebookAdapter.js.map +1 -0
  242. package/lib/widgets/notebook/NotebookCommands.d.ts +7 -0
  243. package/lib/widgets/notebook/NotebookCommands.js +349 -0
  244. package/lib/widgets/notebook/NotebookCommands.js.map +1 -0
  245. package/lib/widgets/notebook/NotebookLumino.d.ts +19 -0
  246. package/lib/widgets/notebook/NotebookLumino.js +75 -0
  247. package/lib/widgets/notebook/NotebookLumino.js.map +1 -0
  248. package/lib/widgets/notebook/NotebookState.d.ts +43 -0
  249. package/lib/widgets/notebook/NotebookState.js +114 -0
  250. package/lib/widgets/notebook/NotebookState.js.map +1 -0
  251. package/lib/widgets/notebook/NotebookToolbar.d.ts +2 -0
  252. package/lib/widgets/notebook/NotebookToolbar.js +24 -0
  253. package/lib/widgets/notebook/NotebookToolbar.js.map +1 -0
  254. package/lib/widgets/notebook/extension/CellSidebar.d.ts +7 -0
  255. package/lib/widgets/notebook/extension/CellSidebar.js +23 -0
  256. package/lib/widgets/notebook/extension/CellSidebar.js.map +1 -0
  257. package/lib/widgets/notebook/extension/CellSidebarDefault.d.ts +2 -0
  258. package/lib/widgets/notebook/extension/CellSidebarDefault.js +47 -0
  259. package/lib/widgets/notebook/extension/CellSidebarDefault.js.map +1 -0
  260. package/lib/widgets/notebook/extension/ContentFactoryWithSidebar.d.ts +14 -0
  261. package/lib/widgets/notebook/extension/ContentFactoryWithSidebar.js +20 -0
  262. package/lib/widgets/notebook/extension/ContentFactoryWithSidebar.js.map +1 -0
  263. package/lib/widgets/notebook/extension/NotebookInputPrompt.d.ts +21 -0
  264. package/lib/widgets/notebook/extension/NotebookInputPrompt.js +67 -0
  265. package/lib/widgets/notebook/extension/NotebookInputPrompt.js.map +1 -0
  266. package/lib/widgets/outputs/OutputAdapter.css +0 -0
  267. package/lib/widgets/outputs/OutputAdapter.d.ts +21 -0
  268. package/lib/widgets/outputs/OutputAdapter.js +75 -0
  269. package/lib/widgets/outputs/OutputAdapter.js.map +1 -0
  270. package/lib/widgets/outputs/OutputLumino.d.ts +16 -0
  271. package/lib/widgets/outputs/OutputLumino.js +56 -0
  272. package/lib/widgets/outputs/OutputLumino.js.map +1 -0
  273. package/lib/widgets/outputs/OutputState.d.ts +19 -0
  274. package/lib/widgets/outputs/OutputState.js +50 -0
  275. package/lib/widgets/outputs/OutputState.js.map +1 -0
  276. package/lib/widgets/settings/SettingsAdapter.css +0 -0
  277. package/lib/widgets/settings/SettingsAdapter.d.ts +10 -0
  278. package/lib/widgets/settings/SettingsAdapter.js +16 -0
  279. package/lib/widgets/settings/SettingsAdapter.js.map +1 -0
  280. package/lib/widgets/settings/SettingsLumino.d.ts +2 -0
  281. package/lib/widgets/settings/SettingsLumino.js +11 -0
  282. package/lib/widgets/settings/SettingsLumino.js.map +1 -0
  283. package/lib/widgets/settings/SettingsState.d.ts +19 -0
  284. package/lib/widgets/settings/SettingsState.js +50 -0
  285. package/lib/widgets/settings/SettingsState.js.map +1 -0
  286. package/lib/widgets/terminal/TerminalAdapter.css +3 -0
  287. package/lib/widgets/terminal/TerminalAdapter.d.ts +13 -0
  288. package/lib/widgets/terminal/TerminalAdapter.js +28 -0
  289. package/lib/widgets/terminal/TerminalAdapter.js.map +1 -0
  290. package/lib/widgets/terminal/TerminalLumino.d.ts +2 -0
  291. package/lib/widgets/terminal/TerminalLumino.js +17 -0
  292. package/lib/widgets/terminal/TerminalLumino.js.map +1 -0
  293. package/lib/widgets/terminal/TerminalState.d.ts +17 -0
  294. package/lib/widgets/terminal/TerminalState.js +45 -0
  295. package/lib/widgets/terminal/TerminalState.js.map +1 -0
  296. package/package.json +163 -0
  297. package/style/index.css +3 -0
@@ -0,0 +1,587 @@
1
+ import { DOMWidgetModel, DOMWidgetView, ISerializers } from "@jupyter-widgets/base";
2
+ declare type InputDeviceState = {
3
+ alt: any;
4
+ ctrl: any;
5
+ meta: any;
6
+ shift: any;
7
+ button: any;
8
+ buttons: any;
9
+ };
10
+ declare type Points = {
11
+ trace_indexes: number[];
12
+ point_indexes: number[];
13
+ xs: number[];
14
+ ys: number[];
15
+ zs?: number[];
16
+ };
17
+ declare type Selector = {
18
+ type: "box" | "lasso";
19
+ selector_state: {
20
+ xrange: number[];
21
+ yrange: number[];
22
+ } | {
23
+ xs: number[];
24
+ ys: number[];
25
+ };
26
+ };
27
+ /**
28
+ * A FigureModel holds a mirror copy of the state of a FigureWidget on
29
+ * the Python side. There is a one-to-one relationship between JavaScript
30
+ * FigureModels and Python FigureWidgets. The JavaScript FigureModel is
31
+ * initialized as soon as a Python FigureWidget initialized, this happens
32
+ * even before the widget is first displayed in the Notebook
33
+ * @type {widgets.DOMWidgetModel}
34
+ */
35
+ export declare class FigureModel extends DOMWidgetModel {
36
+ defaults(): {
37
+ _model_name: string;
38
+ _model_module: any;
39
+ _model_module_version: string;
40
+ _view_name: string;
41
+ _view_module: any;
42
+ _view_module_version: string;
43
+ _data: never[];
44
+ _layout: {};
45
+ _config: {};
46
+ /**
47
+ * @typedef {null|Object} Py2JsAddTracesMsg
48
+ * @property {Array.<Object>} trace_data
49
+ * Array of traces to append to the end of the figure's current traces
50
+ * @property {Number} trace_edit_id
51
+ * Edit ID to use when returning trace deltas using
52
+ * the _js2py_traceDeltas message.
53
+ * @property {Number} layout_edit_id
54
+ * Edit ID to use when returning layout deltas using
55
+ * the _js2py_layoutDelta message.
56
+ */
57
+ _py2js_addTraces: null;
58
+ /**
59
+ * @typedef {null|Object} Py2JsDeleteTracesMsg
60
+ * @property {Array.<Number>} delete_inds
61
+ * Array of indexes of traces to be deleted, in ascending order
62
+ * @property {Number} trace_edit_id
63
+ * Edit ID to use when returning trace deltas using
64
+ * the _js2py_traceDeltas message.
65
+ * @property {Number} layout_edit_id
66
+ * Edit ID to use when returning layout deltas using
67
+ * the _js2py_layoutDelta message.
68
+ */
69
+ _py2js_deleteTraces: null;
70
+ /**
71
+ * @typedef {null|Object} Py2JsMoveTracesMsg
72
+ * @property {Array.<Number>} current_trace_inds
73
+ * Array of the current indexes of traces to be moved
74
+ * @property {Array.<Number>} new_trace_inds
75
+ * Array of the new indexes that traces should be moved to.
76
+ */
77
+ _py2js_moveTraces: null;
78
+ /**
79
+ * @typedef {null|Object} Py2JsRestyleMsg
80
+ * @property {Object} restyle_data
81
+ * Restyle data as accepted by Plotly.restyle
82
+ * @property {null|Array.<Number>} restyle_traces
83
+ * Array of indexes of the traces that the resytle operation applies
84
+ * to, or null to apply the operation to all traces
85
+ * @property {Number} trace_edit_id
86
+ * Edit ID to use when returning trace deltas using
87
+ * the _js2py_traceDeltas message
88
+ * @property {Number} layout_edit_id
89
+ * Edit ID to use when returning layout deltas using
90
+ * the _js2py_layoutDelta message
91
+ * @property {null|String} source_view_id
92
+ * view_id of the FigureView that triggered the original restyle
93
+ * event (e.g. by clicking the legend), or null if the restyle was
94
+ * triggered from Python
95
+ */
96
+ _py2js_restyle: null;
97
+ /**
98
+ * @typedef {null|Object} Py2JsRelayoutMsg
99
+ * @property {Object} relayout_data
100
+ * Relayout data as accepted by Plotly.relayout
101
+ * @property {Number} layout_edit_id
102
+ * Edit ID to use when returning layout deltas using
103
+ * the _js2py_layoutDelta message
104
+ * @property {null|String} source_view_id
105
+ * view_id of the FigureView that triggered the original relayout
106
+ * event (e.g. by clicking the zoom button), or null if the
107
+ * relayout was triggered from Python
108
+ */
109
+ _py2js_relayout: null;
110
+ /**
111
+ * @typedef {null|Object} Py2JsUpdateMsg
112
+ * @property {Object} style_data
113
+ * Style data as accepted by Plotly.update
114
+ * @property {Object} layout_data
115
+ * Layout data as accepted by Plotly.update
116
+ * @property {Array.<Number>} style_traces
117
+ * Array of indexes of the traces that the update operation applies
118
+ * to, or null to apply the operation to all traces
119
+ * @property {Number} trace_edit_id
120
+ * Edit ID to use when returning trace deltas using
121
+ * the _js2py_traceDeltas message
122
+ * @property {Number} layout_edit_id
123
+ * Edit ID to use when returning layout deltas using
124
+ * the _js2py_layoutDelta message
125
+ * @property {null|String} source_view_id
126
+ * view_id of the FigureView that triggered the original update
127
+ * event (e.g. by clicking a button), or null if the update was
128
+ * triggered from Python
129
+ */
130
+ _py2js_update: null;
131
+ /**
132
+ * @typedef {null|Object} Py2JsAnimateMsg
133
+ * @property {Object} style_data
134
+ * Style data as accepted by Plotly.animate
135
+ * @property {Object} layout_data
136
+ * Layout data as accepted by Plotly.animate
137
+ * @property {Array.<Number>} style_traces
138
+ * Array of indexes of the traces that the animate operation applies
139
+ * to, or null to apply the operation to all traces
140
+ * @property {Object} animation_opts
141
+ * Animation options as accepted by Plotly.animate
142
+ * @property {Number} trace_edit_id
143
+ * Edit ID to use when returning trace deltas using
144
+ * the _js2py_traceDeltas message
145
+ * @property {Number} layout_edit_id
146
+ * Edit ID to use when returning layout deltas using
147
+ * the _js2py_layoutDelta message
148
+ * @property {null|String} source_view_id
149
+ * view_id of the FigureView that triggered the original animate
150
+ * event (e.g. by clicking a button), or null if the update was
151
+ * triggered from Python
152
+ */
153
+ _py2js_animate: null;
154
+ /**
155
+ * @typedef {null|Object} Py2JsRemoveLayoutPropsMsg
156
+ * @property {Array.<Array.<String|Number>>} remove_props
157
+ * Array of property paths to remove. Each propery path is an
158
+ * array of property names or array indexes that locate a property
159
+ * inside the _layout object
160
+ */
161
+ _py2js_removeLayoutProps: null;
162
+ /**
163
+ * @typedef {null|Object} Py2JsRemoveTracePropsMsg
164
+ * @property {Number} remove_trace
165
+ * The index of the trace from which to remove properties
166
+ * @property {Array.<Array.<String|Number>>} remove_props
167
+ * Array of property paths to remove. Each propery path is an
168
+ * array of property names or array indexes that locate a property
169
+ * inside the _data[remove_trace] object
170
+ */
171
+ _py2js_removeTraceProps: null;
172
+ /**
173
+ * @typedef {null|Object} Js2PyRestyleMsg
174
+ * @property {Object} style_data
175
+ * Style data that was passed to Plotly.restyle
176
+ * @property {Array.<Number>} style_traces
177
+ * Array of indexes of the traces that the restyle operation
178
+ * was applied to, or null if applied to all traces
179
+ * @property {String} source_view_id
180
+ * view_id of the FigureView that triggered the original restyle
181
+ * event (e.g. by clicking the legend)
182
+ */
183
+ _js2py_restyle: null;
184
+ /**
185
+ * @typedef {null|Object} Js2PyRelayoutMsg
186
+ * @property {Object} relayout_data
187
+ * Relayout data that was passed to Plotly.relayout
188
+ * @property {String} source_view_id
189
+ * view_id of the FigureView that triggered the original relayout
190
+ * event (e.g. by clicking the zoom button)
191
+ */
192
+ _js2py_relayout: null;
193
+ /**
194
+ * @typedef {null|Object} Js2PyUpdateMsg
195
+ * @property {Object} style_data
196
+ * Style data that was passed to Plotly.update
197
+ * @property {Object} layout_data
198
+ * Layout data that was passed to Plotly.update
199
+ * @property {Array.<Number>} style_traces
200
+ * Array of indexes of the traces that the update operation applied
201
+ * to, or null if applied to all traces
202
+ * @property {String} source_view_id
203
+ * view_id of the FigureView that triggered the original relayout
204
+ * event (e.g. by clicking the zoom button)
205
+ */
206
+ _js2py_update: null;
207
+ /**
208
+ * @typedef {null|Object} Js2PyLayoutDeltaMsg
209
+ * @property {Object} layout_delta
210
+ * The layout delta object that contains all of the properties of
211
+ * _fullLayout that are not identical to those in the
212
+ * FigureModel's _layout property
213
+ * @property {Number} layout_edit_id
214
+ * Edit ID of message that triggered the creation of layout delta
215
+ */
216
+ _js2py_layoutDelta: null;
217
+ /**
218
+ * @typedef {null|Object} Js2PyTraceDeltasMsg
219
+ * @property {Array.<Object>} trace_deltas
220
+ * Array of trace delta objects. Each trace delta contains the
221
+ * trace's uid along with all of the properties of _fullData that
222
+ * are not identical to those in the FigureModel's _data property
223
+ * @property {Number} trace_edit_id
224
+ * Edit ID of message that triggered the creation of trace deltas
225
+ */
226
+ _js2py_traceDeltas: null;
227
+ /**
228
+ * Object representing a collection of points for use in click, hover,
229
+ * and selection events
230
+ * @typedef {Object} Points
231
+ * @property {Array.<Number>} trace_indexes
232
+ * Array of the trace index for each point
233
+ * @property {Array.<Number>} point_indexes
234
+ * Array of the index of each point in its own trace
235
+ * @property {null|Array.<Number>} xs
236
+ * Array of the x coordinate of each point (for cartesian trace types)
237
+ * or null (for non-cartesian trace types)
238
+ * @property {null|Array.<Number>} ys
239
+ * Array of the y coordinate of each point (for cartesian trace types)
240
+ * or null (for non-cartesian trace types
241
+ * @property {null|Array.<Number>} zs
242
+ * Array of the z coordinate of each point (for 3D cartesian
243
+ * trace types)
244
+ * or null (for non-3D-cartesian trace types)
245
+ */
246
+ /**
247
+ * Object representing the state of the input devices during a
248
+ * plotly event
249
+ * @typedef {Object} InputDeviceState
250
+ * @property {boolean} alt - true if alt key pressed,
251
+ * false otherwise
252
+ * @property {boolean} ctrl - true if ctrl key pressed,
253
+ * false otherwise
254
+ * @property {boolean} meta - true if meta key pressed,
255
+ * false otherwise
256
+ * @property {boolean} shift - true if shift key pressed,
257
+ * false otherwise
258
+ *
259
+ * @property {boolean} button
260
+ * Indicates which button was pressed on the mouse to trigger the
261
+ * event.
262
+ * 0: Main button pressed, usually the left button or the
263
+ * un-initialized state
264
+ * 1: Auxiliary button pressed, usually the wheel button or
265
+ * the middle button (if present)
266
+ * 2: Secondary button pressed, usually the right button
267
+ * 3: Fourth button, typically the Browser Back button
268
+ * 4: Fifth button, typically the Browser Forward button
269
+ *
270
+ * @property {boolean} buttons
271
+ * Indicates which buttons were pressed on the mouse when the event
272
+ * is triggered.
273
+ * 0 : No button or un-initialized
274
+ * 1 : Primary button (usually left)
275
+ * 2 : Secondary button (usually right)
276
+ * 4 : Auxilary button (usually middle or mouse wheel button)
277
+ * 8 : 4th button (typically the "Browser Back" button)
278
+ * 16 : 5th button (typically the "Browser Forward" button)
279
+ *
280
+ * Combinations of buttons are represented by the sum of the codes
281
+ * above. e.g. a value of 7 indicates buttons 1 (primary),
282
+ * 2 (secondary), and 4 (auxilary) were pressed during the event
283
+ */
284
+ /**
285
+ * @typedef {Object} BoxSelectorState
286
+ * @property {Array.<Number>} xrange
287
+ * Two element array containing the x-range of the box selection
288
+ * @property {Array.<Number>} yrange
289
+ * Two element array containing the y-range of the box selection
290
+ */
291
+ /**
292
+ * @typedef {Object} LassoSelectorState
293
+ * @property {Array.<Number>} xs
294
+ * Array of the x-coordinates of the lasso selection region
295
+ * @property {Array.<Number>} ys
296
+ * Array of the y-coordinates of the lasso selection region
297
+ */
298
+ /**
299
+ * Object representing the state of the selection tool during a
300
+ * plotly_select event
301
+ * @typedef {Object} Selector
302
+ * @property {String} type
303
+ * Selection type. One of: 'box', or 'lasso'
304
+ * @property {BoxSelectorState|LassoSelectorState} selector_state
305
+ */
306
+ /**
307
+ * @typedef {null|Object} Js2PyPointsCallbackMsg
308
+ * @property {string} event_type
309
+ * Name of the triggering event. One of 'plotly_click',
310
+ * 'plotly_hover', 'plotly_unhover', or 'plotly_selected'
311
+ * @property {null|Points} points
312
+ * Points object for event
313
+ * @property {null|InputDeviceState} device_state
314
+ * InputDeviceState object for event
315
+ * @property {null|Selector} selector
316
+ * State of the selection tool for 'plotly_selected' events, null
317
+ * for other event types
318
+ */
319
+ _js2py_pointsCallback: null;
320
+ /**
321
+ * @type {Number}
322
+ * layout_edit_id of the last layout modification operation
323
+ * requested by the Python side
324
+ */
325
+ _last_layout_edit_id: number;
326
+ /**
327
+ * @type {Number}
328
+ * trace_edit_id of the last trace modification operation
329
+ * requested by the Python side
330
+ */
331
+ _last_trace_edit_id: number;
332
+ };
333
+ /**
334
+ * Initialize FigureModel. Called when the Python FigureWidget is first
335
+ * constructed
336
+ */
337
+ initialize(): void;
338
+ /**
339
+ * Input a trace index specification and return an Array of trace
340
+ * indexes where:
341
+ *
342
+ * - null|undefined -> Array of all traces
343
+ * - Trace index as Number -> Single element array of input index
344
+ * - Array of trace indexes -> Input array unchanged
345
+ *
346
+ * @param {undefined|null|Number|Array.<Number>} trace_indexes
347
+ * @returns {Array.<Number>}
348
+ * Array of trace indexes
349
+ * @private
350
+ */
351
+ _normalize_trace_indexes(trace_indexes?: null | number | number[]): number[];
352
+ /**
353
+ * Log changes to the _data trait
354
+ *
355
+ * This should only happed on FigureModel initialization
356
+ */
357
+ do_data(): void;
358
+ /**
359
+ * Log changes to the _layout trait
360
+ *
361
+ * This should only happed on FigureModel initialization
362
+ */
363
+ do_layout(): void;
364
+ /**
365
+ * Handle addTraces message
366
+ */
367
+ do_addTraces(): void;
368
+ /**
369
+ * Handle deleteTraces message
370
+ */
371
+ do_deleteTraces(): void;
372
+ /**
373
+ * Handle moveTraces message
374
+ */
375
+ do_moveTraces(): void;
376
+ /**
377
+ * Handle restyle message
378
+ */
379
+ do_restyle(): void;
380
+ /**
381
+ * Handle relayout message
382
+ */
383
+ do_relayout(): void;
384
+ /**
385
+ * Handle update message
386
+ */
387
+ do_update(): void;
388
+ /**
389
+ * Handle animate message
390
+ */
391
+ do_animate(): void;
392
+ /**
393
+ * Handle removeLayoutProps message
394
+ */
395
+ do_removeLayoutProps(): void;
396
+ /**
397
+ * Handle removeTraceProps message
398
+ */
399
+ do_removeTraceProps(): void;
400
+ static serializers: ISerializers;
401
+ static model_name: string;
402
+ static model_module: any;
403
+ static model_module_version: string;
404
+ static view_name: string;
405
+ static view_module: any;
406
+ static view_module_version: string;
407
+ }
408
+ /**
409
+ * A FigureView manages the visual presentation of a single Plotly.js
410
+ * figure for a single notebook output cell. Each FigureView has a
411
+ * reference to FigureModel. Multiple views may share a single model
412
+ * instance, as is the case when a Python FigureWidget is displayed in
413
+ * multiple notebook output cells.
414
+ *
415
+ * @type {widgets.DOMWidgetView}
416
+ */
417
+ export declare class FigureView extends DOMWidgetView {
418
+ viewID: string;
419
+ /**
420
+ * The perform_render method is called by processLuminoMessage
421
+ * after the widget's DOM element has been attached to the notebook
422
+ * output cell. This happens after the initialize of the
423
+ * FigureModel, and it won't happen at all if the Python FigureWidget
424
+ * is never displayed in a notebook output cell
425
+ */
426
+ perform_render(): void;
427
+ /**
428
+ * Respond to phosphorjs events
429
+ */
430
+ processLuminoMessage(msg: any): void;
431
+ autosizeFigure(): void;
432
+ /**
433
+ * Purge Plotly.js data structures from the notebook output display
434
+ * element when the view is destroyed
435
+ */
436
+ destroy(): void;
437
+ /**
438
+ * Return the figure's _fullData array merged with its data array
439
+ *
440
+ * The merge ensures that for any properties that el._fullData and
441
+ * el.data have in common, we return the version from el.data
442
+ *
443
+ * Named colorscales are one example of why this is needed. The el.data
444
+ * array will hold named colorscale strings (e.g. 'Viridis'), while the
445
+ * el._fullData array will hold the actual colorscale array. e.g.
446
+ *
447
+ * el.data[0].marker.colorscale == 'Viridis' but
448
+ * el._fullData[0].marker.colorscale = [[..., ...], ...]
449
+ *
450
+ * Performing the merge allows our FigureModel to retain the 'Viridis'
451
+ * string, rather than having it overridded by the colorscale array.
452
+ *
453
+ */
454
+ getFullData(): any;
455
+ /**
456
+ * Return the figure's _fullLayout object merged with its layout object
457
+ *
458
+ * See getFullData documentation for discussion of why the merge is
459
+ * necessary
460
+ */
461
+ getFullLayout(): any;
462
+ /**
463
+ * Build Points data structure from data supplied by the plotly_click,
464
+ * plotly_hover, or plotly_select events
465
+ * @param {Object} data
466
+ * @returns {null|Points}
467
+ */
468
+ buildPointsObject(data: any): null | Points;
469
+ /**
470
+ * Build InputDeviceState data structure from data supplied by the
471
+ * plotly_click, plotly_hover, or plotly_select events
472
+ * @param {Object} data
473
+ * @returns {null|InputDeviceState}
474
+ */
475
+ buildInputDeviceStateObject(data: any): null | InputDeviceState;
476
+ /**
477
+ * Build Selector data structure from data supplied by the
478
+ * plotly_select event
479
+ * @param data
480
+ * @returns {null|Selector}
481
+ */
482
+ buildSelectorObject(data: any): null | Selector;
483
+ /**
484
+ * Handle ploty_restyle events emitted by the Plotly.js library
485
+ * @param data
486
+ */
487
+ handle_plotly_restyle(data: any): void;
488
+ /**
489
+ * Handle plotly_relayout events emitted by the Plotly.js library
490
+ * @param data
491
+ */
492
+ handle_plotly_relayout(data: any): void;
493
+ /**
494
+ * Handle plotly_update events emitted by the Plotly.js library
495
+ * @param data
496
+ */
497
+ handle_plotly_update(data: any): void;
498
+ /**
499
+ * Handle plotly_click events emitted by the Plotly.js library
500
+ * @param data
501
+ */
502
+ handle_plotly_click(data: any): void;
503
+ /**
504
+ * Handle plotly_hover events emitted by the Plotly.js library
505
+ * @param data
506
+ */
507
+ handle_plotly_hover(data: any): void;
508
+ /**
509
+ * Handle plotly_unhover events emitted by the Plotly.js library
510
+ * @param data
511
+ */
512
+ handle_plotly_unhover(data: any): void;
513
+ /**
514
+ * Handle plotly_selected events emitted by the Plotly.js library
515
+ * @param data
516
+ */
517
+ handle_plotly_selected(data: any): void;
518
+ /**
519
+ * Handle plotly_deselect events emitted by the Plotly.js library
520
+ * @param data
521
+ */
522
+ handle_plotly_deselect(data: any): void;
523
+ /**
524
+ * Build and send a points callback message to the Python side
525
+ *
526
+ * @param {Object} data
527
+ * data object as provided by the plotly_click, plotly_hover,
528
+ * plotly_unhover, or plotly_selected events
529
+ * @param {String} event_type
530
+ * Name of the triggering event. One of 'plotly_click',
531
+ * 'plotly_hover', 'plotly_unhover', or 'plotly_selected'
532
+ * @private
533
+ */
534
+ _send_points_callback_message(data: any, event_type: string): void;
535
+ /**
536
+ * Stub for future handling of plotly_doubleclick
537
+ * @param data
538
+ */
539
+ handle_plotly_doubleclick(data: any): void;
540
+ /**
541
+ * Handle Plotly.addTraces request
542
+ */
543
+ do_addTraces(): void;
544
+ /**
545
+ * Handle Plotly.deleteTraces request
546
+ */
547
+ do_deleteTraces(): void;
548
+ /**
549
+ * Handle Plotly.moveTraces request
550
+ */
551
+ do_moveTraces(): void;
552
+ /**
553
+ * Handle Plotly.restyle request
554
+ */
555
+ do_restyle(): void;
556
+ /**
557
+ * Handle Plotly.relayout request
558
+ */
559
+ do_relayout(): void;
560
+ /**
561
+ * Handle Plotly.update request
562
+ */
563
+ do_update(): void;
564
+ /**
565
+ * Handle Plotly.animate request
566
+ */
567
+ do_animate(): void;
568
+ /**
569
+ * Construct layout delta object and send layoutDelta message to the
570
+ * Python side
571
+ *
572
+ * @param layout_edit_id
573
+ * Edit ID of message that triggered the creation of the layout delta
574
+ * @private
575
+ */
576
+ _sendLayoutDelta(layout_edit_id: any): void;
577
+ /**
578
+ * Construct trace deltas array for the requested trace indexes and
579
+ * send traceDeltas message to the Python side
580
+ * Array of indexes of traces for which to compute deltas
581
+ * @param trace_edit_id
582
+ * Edit ID of message that triggered the creation of trace deltas
583
+ * @private
584
+ */
585
+ _sendTraceDeltas(trace_edit_id: any): void;
586
+ }
587
+ export {};