@datalayer/core 0.0.2 → 0.0.4

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 (474) hide show
  1. package/README.md +124 -2
  2. package/lib/App.css +47 -0
  3. package/lib/App.js +14 -2
  4. package/lib/__tests__/index.test.js +7 -6
  5. package/lib/api/{RunApi.d.ts → DatalayerApi.d.ts} +4 -4
  6. package/lib/api/{RunApi.js → DatalayerApi.js} +6 -11
  7. package/lib/api/index.d.ts +3 -2
  8. package/lib/api/index.js +3 -7
  9. package/lib/api/{runtimes → jupyter}/exec/Python.js +0 -5
  10. package/lib/api/{runtimes → jupyter}/exec/Snippets.js +0 -5
  11. package/lib/api/{runtimes → jupyter}/exec/index.js +0 -5
  12. package/lib/api/jupyter/index.d.ts +2 -0
  13. package/lib/api/jupyter/index.js +6 -0
  14. package/lib/api/{runtimes → jupyter}/kernelsHandler.d.ts +1 -1
  15. package/lib/api/{runtimes → jupyter}/kernelsHandler.js +1 -6
  16. package/lib/api/runtimes/actions.d.ts +102 -0
  17. package/lib/api/runtimes/{runtimesApi.js → actions.js} +47 -53
  18. package/lib/api/runtimes/{runtimesApi.d.ts → apis.d.ts} +8 -105
  19. package/lib/api/runtimes/apis.js +5 -0
  20. package/lib/api/runtimes/index.d.ts +2 -4
  21. package/lib/api/runtimes/index.js +2 -9
  22. package/lib/api/runtimes/settings.js +3 -8
  23. package/lib/api/runtimes/snapshots.d.ts +1 -1
  24. package/lib/api/runtimes/snapshots.js +8 -13
  25. package/lib/api/runtimes/utils.js +1 -9
  26. package/lib/assets/react.svg +1 -0
  27. package/lib/collaboration/DatalayerCollaboration.d.ts +9 -0
  28. package/lib/collaboration/DatalayerCollaboration.js +28 -0
  29. package/lib/collaboration/DatalayerCollaborationProvider.d.ts +54 -0
  30. package/lib/collaboration/DatalayerCollaborationProvider.js +162 -0
  31. package/lib/collaboration/index.d.ts +2 -0
  32. package/lib/collaboration/index.js +6 -0
  33. package/lib/components/avatars/BoringAvatar.d.ts +2 -3
  34. package/lib/components/avatars/BoringAvatar.js +14 -9
  35. package/lib/components/avatars/BoringAvatar.stories.d.ts +27 -0
  36. package/lib/components/avatars/BoringAvatar.stories.js +23 -0
  37. package/lib/components/avatars/UserProfileAvatar.js +2 -14
  38. package/lib/components/avatars/index.js +0 -5
  39. package/lib/components/banners/NoAutomationBanner.js +4 -9
  40. package/lib/components/banners/index.js +0 -5
  41. package/lib/components/buttons/DownloadCSVButton.d.ts +1 -1
  42. package/lib/components/buttons/DownloadCSVButton.js +1 -6
  43. package/lib/components/buttons/DownloadJsonButton.d.ts +1 -1
  44. package/lib/components/buttons/DownloadJsonButton.js +0 -5
  45. package/lib/components/buttons/LongActionButton.js +0 -5
  46. package/lib/components/buttons/UploadButton.js +1 -6
  47. package/lib/components/buttons/index.js +0 -5
  48. package/lib/components/checkout/StripeCheckout.d.ts +1 -1
  49. package/lib/components/checkout/StripeCheckout.js +6 -11
  50. package/lib/components/checkout/index.js +0 -5
  51. package/lib/components/confetti/ConfettiSuccess.js +1 -6
  52. package/lib/components/confetti/index.js +0 -5
  53. package/lib/components/context/OrganizationSelect.js +5 -10
  54. package/lib/components/context/SpaceSelect.js +7 -12
  55. package/lib/components/context/index.js +0 -5
  56. package/lib/components/display/AvatarSkeleton.js +1 -6
  57. package/lib/components/display/CenteredSpinner.js +4 -9
  58. package/lib/components/display/CodePreview.js +4 -9
  59. package/lib/components/display/DatalayerBox.js +13 -19
  60. package/lib/components/display/HorizontalCenter.d.ts +1 -1
  61. package/lib/components/display/HorizontalCenter.js +1 -1
  62. package/lib/components/display/JupyterDialog.js +17 -20
  63. package/lib/components/display/NavLink.d.ts +4 -2
  64. package/lib/components/display/NavLink.js +6 -9
  65. package/lib/components/display/NotebookSkeleton.js +2 -7
  66. package/lib/components/display/Placeholder.js +1 -6
  67. package/lib/components/display/ToTopBranded.js +1 -6
  68. package/lib/components/display/VisuallyHidden.js +0 -5
  69. package/lib/components/display/index.js +0 -5
  70. package/lib/components/echarts/EChartsReact.d.ts +1 -1
  71. package/lib/components/echarts/EChartsReact.js +7 -7
  72. package/lib/components/echarts/index.js +0 -5
  73. package/lib/components/flashes/FlashClosable.js +11 -16
  74. package/lib/components/flashes/FlashDisclaimer.js +2 -8
  75. package/lib/components/flashes/FlashGuest.js +3 -9
  76. package/lib/components/flashes/FlashSurveys.js +3 -9
  77. package/lib/components/flashes/FlashUnauthorized.js +2 -7
  78. package/lib/components/flashes/index.js +0 -5
  79. package/lib/components/flashes/surveys/Survey2025_1.d.ts +1 -1
  80. package/lib/components/flashes/surveys/Survey2025_1.js +62 -90
  81. package/lib/components/flashes/surveys/index.js +0 -5
  82. package/lib/components/iam/ExternalTokenSilentLogin.js +6 -9
  83. package/lib/components/iam/index.js +0 -5
  84. package/lib/components/icons/ArtifactIcon.d.ts +2 -2
  85. package/lib/components/icons/ArtifactIcon.js +39 -44
  86. package/lib/components/icons/index.js +0 -5
  87. package/lib/components/index.js +1 -6
  88. package/lib/components/labels/VisibilityLabel.js +2 -10
  89. package/lib/components/labels/index.js +0 -5
  90. package/lib/components/landings/StepBlock.d.ts +1 -1
  91. package/lib/components/landings/StepBlock.js +1 -6
  92. package/lib/components/landings/index.js +0 -5
  93. package/lib/components/navbar/NavigationVisbilityObserver.js +2 -7
  94. package/lib/components/navbar/SubdomainNavBar.js +46 -29
  95. package/lib/components/navbar/SubdomainNavBar.module.css +737 -0
  96. package/lib/components/navbar/index.js +0 -5
  97. package/lib/components/nbgrader/NbGradesDetails.d.ts +1 -1
  98. package/lib/components/nbgrader/NbGradesDetails.js +5 -13
  99. package/lib/components/nbgrader/index.js +0 -5
  100. package/lib/components/notebooks/JupyterNotebook.js +5 -10
  101. package/lib/components/notebooks/JupyterNotebookToolbar.js +3 -8
  102. package/lib/components/notebooks/index.js +0 -5
  103. package/lib/components/primer/Helper.d.ts +1 -1
  104. package/lib/components/primer/Helper.js +5 -3
  105. package/lib/components/primer/Portals.d.ts +1 -1
  106. package/lib/components/primer/Portals.js +2 -7
  107. package/lib/components/primer/Styles.js +1 -6
  108. package/lib/components/primer/index.js +0 -5
  109. package/lib/components/progress/ConsumptionBar.js +2 -7
  110. package/lib/components/progress/CreditsIndicator.d.ts +1 -1
  111. package/lib/components/progress/CreditsIndicator.js +4 -13
  112. package/lib/components/progress/ProgressBar.js +0 -5
  113. package/lib/components/progress/ProgressRing.js +2 -2
  114. package/lib/components/progress/Timer.js +0 -5
  115. package/lib/components/progress/index.js +0 -5
  116. package/lib/components/runtimes/RuntimeCellVariables.js +9 -14
  117. package/lib/components/runtimes/RuntimeCellVariablesDialog.js +7 -12
  118. package/lib/components/runtimes/RuntimeLauncherDialog.d.ts +1 -2
  119. package/lib/components/runtimes/RuntimeLauncherDialog.js +32 -40
  120. package/lib/components/runtimes/RuntimePickerBase.d.ts +1 -1
  121. package/lib/components/runtimes/RuntimePickerBase.js +42 -36
  122. package/lib/components/runtimes/RuntimePickerCell.js +9 -17
  123. package/lib/components/runtimes/RuntimePickerNotebook.d.ts +1 -2
  124. package/lib/components/runtimes/RuntimePickerNotebook.js +45 -50
  125. package/lib/components/runtimes/RuntimeReservationControl.js +10 -20
  126. package/lib/components/runtimes/RuntimeSimplePicker.d.ts +1 -1
  127. package/lib/components/runtimes/RuntimeSimplePicker.js +44 -52
  128. package/lib/components/runtimes/RuntimeUtils.d.ts +1 -1
  129. package/lib/components/runtimes/RuntimeUtils.js +22 -17
  130. package/lib/components/runtimes/RuntimeVariables.js +7 -12
  131. package/lib/components/runtimes/index.js +0 -5
  132. package/lib/components/screenshot/ScreenCapture.js +10 -19
  133. package/lib/components/screenshot/ScreenCaptureButton.d.ts +1 -1
  134. package/lib/components/screenshot/ScreenCaptureButton.js +14 -8
  135. package/lib/components/screenshot/index.js +0 -5
  136. package/lib/components/snapshots/RuntimeSnapshotMenu.js +19 -22
  137. package/lib/components/snapshots/index.js +0 -5
  138. package/lib/components/snippets/SnippetDialog.js +5 -10
  139. package/lib/components/snippets/index.js +0 -5
  140. package/lib/components/storage/ContentsBrowser.js +75 -63
  141. package/lib/components/storage/ContentsItems.js +10 -13
  142. package/lib/components/storage/index.js +0 -5
  143. package/lib/components/students/StudentItemStatus.d.ts +1 -1
  144. package/lib/components/students/StudentItemStatus.js +38 -21
  145. package/lib/components/students/index.js +0 -5
  146. package/lib/components/subnav/SubNav.d.ts +3 -3
  147. package/lib/components/subnav/SubNav.js +34 -24
  148. package/lib/components/subnav/SubNav.module.css +717 -0
  149. package/lib/components/subnav/index.js +0 -5
  150. package/lib/components/tables/DataTable.js +1 -9
  151. package/lib/components/tables/index.js +0 -5
  152. package/lib/components/text-reveal/TextRevealAnimation.js +7 -8
  153. package/lib/components/text-reveal/TextRevealAnimation.module.css +45 -0
  154. package/lib/components/text-reveal/index.js +0 -5
  155. package/lib/components/text-reveal/useTextRevealAnimationLines.js +0 -5
  156. package/lib/components/tokens/SpaceVariantToken.d.ts +1 -1
  157. package/lib/components/tokens/SpaceVariantToken.js +5 -10
  158. package/lib/components/tokens/index.js +0 -5
  159. package/lib/components/toolbars/AssignmentEditorToolbar.js +1 -8
  160. package/lib/components/toolbars/DocumentEditorToolbar.js +0 -5
  161. package/lib/components/toolbars/NotebookEditorToolbar.d.ts +1 -1
  162. package/lib/components/toolbars/NotebookEditorToolbar.js +0 -5
  163. package/lib/components/toolbars/index.js +0 -5
  164. package/lib/components/users/PeerIndicator.d.ts +1 -1
  165. package/lib/components/users/PeerIndicator.js +5 -10
  166. package/lib/components/users/index.js +0 -5
  167. package/lib/config/Configuration.d.ts +48 -0
  168. package/lib/config/Configuration.js +42 -5
  169. package/lib/config/index.js +0 -5
  170. package/lib/config/integrations/Loom.js +3 -8
  171. package/lib/config/integrations/index.js +0 -5
  172. package/lib/examples/CellExample.d.ts +6 -0
  173. package/lib/examples/CellExample.js +55 -0
  174. package/lib/examples/DatalayerNotebookExample.d.ts +16 -0
  175. package/lib/examples/DatalayerNotebookExample.js +75 -0
  176. package/lib/examples/NativeNavigationExample.d.ts +8 -0
  177. package/lib/examples/NativeNavigationExample.js +97 -0
  178. package/lib/examples/NotebookExample.d.ts +6 -0
  179. package/lib/examples/NotebookExample.js +24 -0
  180. package/lib/examples/NotebookMutationsKernel.d.ts +2 -0
  181. package/lib/examples/NotebookMutationsKernel.js +115 -0
  182. package/lib/examples/NotebookMutationsServiceManager.d.ts +2 -0
  183. package/lib/examples/NotebookMutationsServiceManager.js +107 -0
  184. package/lib/examples/ReactRouterExample.d.ts +6 -0
  185. package/lib/examples/ReactRouterExample.js +175 -0
  186. package/lib/examples/example-selector.d.ts +22 -0
  187. package/lib/examples/example-selector.js +45 -0
  188. package/lib/examples/index.d.ts +2 -0
  189. package/lib/examples/index.js +6 -0
  190. package/lib/examples/main.js +153 -0
  191. package/lib/examples/notebooks/IPyWidgetsExample.ipynb.json +101 -0
  192. package/lib/examples/notebooks/IPyWidgetsExampleWithState.ipynb.json +112 -0
  193. package/lib/examples/notebooks/Lite.ipynb.json +128 -0
  194. package/lib/examples/notebooks/Matplotlib.ipynb.json +137 -0
  195. package/lib/examples/notebooks/NotebookExample1.ipynb.json +126 -0
  196. package/lib/examples/notebooks/NotebookExample2.ipynb.json +48 -0
  197. package/lib/examples/notebooks/NotebookOutputs.ipynb.json +49 -0
  198. package/lib/examples/notebooks/NotebookToCExample.ipynb.json +102 -0
  199. package/lib/examples/notebooks/OutputIPyWidgetsExample.d.ts +145 -0
  200. package/lib/examples/notebooks/OutputIPyWidgetsExample.js +153 -0
  201. package/lib/examples/notebooks/PyGWalker.ipynb.json +55 -0
  202. package/lib/hooks/assets/OutputshotPlaceholders.d.ts +10 -10
  203. package/lib/hooks/assets/OutputshotPlaceholders.js +9 -14
  204. package/lib/hooks/assets/index.js +0 -5
  205. package/lib/hooks/index.d.ts +29 -28
  206. package/lib/hooks/index.js +29 -33
  207. package/lib/hooks/layouts/LayoutBackdrop.js +3 -11
  208. package/lib/hooks/layouts/LayoutScreenshot.css +58 -0
  209. package/lib/hooks/layouts/LayoutScreenshot.d.ts +1 -0
  210. package/lib/hooks/layouts/LayoutScreenshot.js +7 -11
  211. package/lib/hooks/layouts/index.js +0 -5
  212. package/lib/hooks/useAIAgents.d.ts +1 -1
  213. package/lib/hooks/useAIAgents.js +13 -18
  214. package/lib/hooks/useAuthorization.js +4 -10
  215. package/lib/hooks/useBackdrop.js +7 -12
  216. package/lib/hooks/useBackdropJupyterLab.d.ts +1 -1
  217. package/lib/hooks/useBackdropJupyterLab.js +4 -9
  218. package/lib/hooks/useCache.d.ts +8 -4
  219. package/lib/hooks/useCache.js +410 -361
  220. package/lib/hooks/useCellOutputshot.js +3 -11
  221. package/lib/hooks/useContainsFocus.js +2 -6
  222. package/lib/hooks/useDatalayer.d.ts +21 -0
  223. package/lib/hooks/{useRun.js → useDatalayer.js} +16 -18
  224. package/lib/hooks/useError.d.ts +1 -1
  225. package/lib/hooks/useError.js +2 -7
  226. package/lib/hooks/useExternalScript.js +4 -9
  227. package/lib/hooks/useFocusTrap.d.ts +1 -1
  228. package/lib/hooks/useFocusTrap.js +3 -7
  229. package/lib/hooks/useIAM.js +6 -12
  230. package/lib/hooks/useId.js +6 -11
  231. package/lib/hooks/useIsomorphicLayoutEffect.js +0 -5
  232. package/lib/hooks/useJupyterLabTheme.js +3 -6
  233. package/lib/hooks/useKeyboardEscape.js +0 -5
  234. package/lib/hooks/useLocation.d.ts +22 -0
  235. package/lib/hooks/useLocation.js +149 -0
  236. package/lib/hooks/useLocationHandles.d.ts +2 -2
  237. package/lib/hooks/useLocationHandles.js +6 -9
  238. package/lib/hooks/useNavigate.d.ts +5 -1
  239. package/lib/hooks/useNavigate.js +62 -12
  240. package/lib/hooks/useNotebookAIAgent.js +3 -6
  241. package/lib/hooks/useOnClickOutside.js +0 -5
  242. package/lib/hooks/useParams.d.ts +5 -0
  243. package/lib/hooks/useParams.js +152 -0
  244. package/lib/hooks/useRef.js +0 -5
  245. package/lib/hooks/useRuntimes.js +2 -7
  246. package/lib/hooks/useScreenshot.js +5 -10
  247. package/lib/hooks/useToast.js +21 -21
  248. package/lib/hooks/useUpload.js +9 -14
  249. package/lib/hooks/useUser.js +1 -1
  250. package/lib/hooks/useVisibilityObserver.js +0 -5
  251. package/lib/hooks/useWindowSize.js +0 -6
  252. package/lib/i18n/Labels.js +0 -5
  253. package/lib/i18n/index.js +0 -5
  254. package/lib/index.css +73 -0
  255. package/lib/index.d.ts +6 -3
  256. package/lib/index.js +7 -3
  257. package/lib/main.js +1 -2
  258. package/lib/mocks/components/FlashMock.js +4 -9
  259. package/lib/mocks/components/index.js +0 -5
  260. package/lib/mocks/hooks/index.d.ts +1 -1
  261. package/lib/mocks/hooks/index.js +1 -6
  262. package/lib/mocks/hooks/rests/index.js +0 -5
  263. package/lib/mocks/hooks/rests/rests.js +15 -23
  264. package/lib/mocks/hooks/useDatalayerMock.d.ts +6 -0
  265. package/lib/mocks/hooks/{useRunMock.js → useDatalayerMock.js} +9 -14
  266. package/lib/mocks/index.js +0 -5
  267. package/lib/mocks/jupyter/index.js +1 -6
  268. package/lib/mocks/models/CodeBlockMock.js +1 -6
  269. package/lib/mocks/models/CodelineMock.js +1 -6
  270. package/lib/mocks/models/CourseMock.d.ts +1 -1
  271. package/lib/mocks/models/CourseMock.js +10 -15
  272. package/lib/mocks/models/InviteMock.d.ts +1 -1
  273. package/lib/mocks/models/InviteMock.js +21 -11
  274. package/lib/mocks/models/JupyterLabUserMock.js +2 -2
  275. package/lib/mocks/models/OrganisationMock.d.ts +1 -1
  276. package/lib/mocks/models/OrganisationMock.js +11 -7
  277. package/lib/mocks/models/SchoolMock.d.ts +1 -1
  278. package/lib/mocks/models/SchoolMock.js +6 -6
  279. package/lib/mocks/models/SpaceMock.d.ts +1 -1
  280. package/lib/mocks/models/SpaceMock.js +9 -14
  281. package/lib/mocks/models/TeamMock.d.ts +1 -1
  282. package/lib/mocks/models/TeamMock.js +6 -6
  283. package/lib/mocks/models/UserMock.d.ts +1 -1
  284. package/lib/mocks/models/UserMock.js +4 -11
  285. package/lib/mocks/models/index.js +0 -5
  286. package/lib/mocks/views/ActionMenuMock.js +1 -6
  287. package/lib/mocks/views/ChartMock.js +3 -8
  288. package/lib/mocks/views/ChartMockOptions.js +24 -29
  289. package/lib/mocks/views/DashboardMock.js +74 -79
  290. package/lib/mocks/views/FormMock.js +1 -6
  291. package/lib/mocks/views/TableMock.js +1 -6
  292. package/lib/mocks/views/WipMock.js +0 -5
  293. package/lib/mocks/views/index.js +0 -5
  294. package/lib/models/Account.d.ts +2 -2
  295. package/lib/models/Assignment.d.ts +2 -2
  296. package/lib/models/Cell.d.ts +1 -1
  297. package/lib/models/CodeBlock.d.ts +1 -1
  298. package/lib/models/CodefeedBlocks.d.ts +2 -2
  299. package/lib/models/Contact.d.ts +1 -1
  300. package/lib/models/Contact.js +14 -19
  301. package/lib/models/ContactEvent.js +0 -5
  302. package/lib/models/ContactIAMProvider.js +2 -2
  303. package/lib/models/Course.d.ts +7 -7
  304. package/lib/models/Credits.js +0 -5
  305. package/lib/models/Dataset.d.ts +2 -2
  306. package/lib/models/Datasource.js +0 -5
  307. package/lib/models/Dean.d.ts +1 -1
  308. package/lib/models/Document.d.ts +1 -1
  309. package/lib/models/Environment.d.ts +2 -2
  310. package/lib/models/Errors.js +0 -5
  311. package/lib/models/Exercise.d.ts +1 -1
  312. package/lib/models/GrowthKPI.js +0 -5
  313. package/lib/models/IAMProviderLinked.js +1 -1
  314. package/lib/models/IAMProviderUsers.js +0 -5
  315. package/lib/models/IAMToken.js +0 -5
  316. package/lib/models/Inbound.js +0 -5
  317. package/lib/models/Instructor.d.ts +1 -1
  318. package/lib/models/Invite.d.ts +2 -2
  319. package/lib/models/Invite.js +1 -1
  320. package/lib/models/Item.d.ts +5 -5
  321. package/lib/models/LandingRoles.js +18 -23
  322. package/lib/models/Lesson.d.ts +1 -1
  323. package/lib/models/Member.d.ts +1 -1
  324. package/lib/models/Notebook.d.ts +1 -1
  325. package/lib/models/Organization.d.ts +4 -4
  326. package/lib/models/Organization.js +2 -7
  327. package/lib/models/OrganizationMember.d.ts +2 -2
  328. package/lib/models/Outbound.js +7 -12
  329. package/lib/models/Page.js +4 -2
  330. package/lib/models/PageTag.d.ts +2 -2
  331. package/lib/models/PageTag.js +56 -9
  332. package/lib/models/Profile.d.ts +1 -1
  333. package/lib/models/RolesOrganization.d.ts +1 -1
  334. package/lib/models/RolesOrganization.js +4 -17
  335. package/lib/models/RolesPlatform.d.ts +1 -1
  336. package/lib/models/RolesPlatform.js +12 -39
  337. package/lib/models/RolesTeam.d.ts +1 -1
  338. package/lib/models/RolesTeam.js +3 -15
  339. package/lib/models/Runtime.d.ts +59 -1
  340. package/lib/models/Runtime.js +11 -9
  341. package/lib/models/RuntimeSnapshot.js +1 -1
  342. package/lib/models/School.d.ts +4 -4
  343. package/lib/models/Secret.js +0 -5
  344. package/lib/models/Space.d.ts +5 -5
  345. package/lib/models/Space.js +3 -3
  346. package/lib/models/SpaceItem.d.ts +8 -8
  347. package/lib/models/SpaceMember.d.ts +2 -2
  348. package/lib/models/Student.d.ts +2 -2
  349. package/lib/models/StudentItem.d.ts +3 -3
  350. package/lib/models/Survey.js +0 -5
  351. package/lib/models/Team.d.ts +3 -3
  352. package/lib/models/Team.js +2 -7
  353. package/lib/models/TeamMember.d.ts +2 -2
  354. package/lib/models/URN.js +1 -6
  355. package/lib/models/User.d.ts +2 -2
  356. package/lib/models/User.js +7 -10
  357. package/lib/models/UserEvent.js +0 -5
  358. package/lib/models/UserOnboarding.d.ts +1 -1
  359. package/lib/models/UserOnboarding.js +7 -12
  360. package/lib/models/UserSettings.js +2 -7
  361. package/lib/models/index.d.ts +2 -2
  362. package/lib/models/index.js +2 -7
  363. package/lib/navigation/adapters/native.d.ts +11 -0
  364. package/lib/navigation/adapters/native.js +48 -0
  365. package/lib/navigation/adapters/nextjs.d.ts +9 -0
  366. package/lib/navigation/adapters/nextjs.js +35 -0
  367. package/lib/navigation/adapters/react-router.d.ts +4 -0
  368. package/lib/navigation/adapters/react-router.js +12 -0
  369. package/lib/navigation/components.d.ts +20 -0
  370. package/lib/navigation/components.js +36 -0
  371. package/lib/navigation/index.d.ts +4 -0
  372. package/lib/navigation/index.js +12 -0
  373. package/lib/routes/Routes.js +0 -5
  374. package/lib/routes/index.d.ts +1 -1
  375. package/lib/routes/index.js +1 -6
  376. package/lib/services/DatalayerServiceManager.d.ts +22 -0
  377. package/lib/services/DatalayerServiceManager.js +79 -0
  378. package/lib/services/index.d.ts +4 -0
  379. package/lib/services/index.js +7 -0
  380. package/lib/services/reconnectToRuntime.d.ts +32 -0
  381. package/lib/services/reconnectToRuntime.js +59 -0
  382. package/lib/state/State.d.ts +1 -1
  383. package/lib/state/State.js +1 -6
  384. package/lib/state/index.d.ts +1 -1
  385. package/lib/state/index.js +1 -6
  386. package/lib/state/storage/IAMStorage.js +14 -7
  387. package/lib/state/storage/index.d.ts +1 -1
  388. package/lib/state/storage/index.js +1 -6
  389. package/lib/state/substates/AIAgentState.js +4 -7
  390. package/lib/state/substates/CellState.js +6 -10
  391. package/lib/state/substates/CoreState.d.ts +1 -1
  392. package/lib/state/substates/CoreState.js +23 -20
  393. package/lib/state/substates/DatasourceState.js +1 -6
  394. package/lib/state/substates/DocumentState.js +0 -5
  395. package/lib/state/substates/GradeState.js +0 -5
  396. package/lib/state/substates/IAMState.d.ts +5 -1
  397. package/lib/state/substates/IAMState.js +88 -72
  398. package/lib/state/substates/JupyterLabState.js +1 -6
  399. package/lib/state/substates/LayoutState.d.ts +2 -2
  400. package/lib/state/substates/LayoutState.js +41 -28
  401. package/lib/state/substates/NbformatState.js +0 -5
  402. package/lib/state/substates/OrganizationState.js +1 -6
  403. package/lib/state/substates/RuntimesState.d.ts +2 -2
  404. package/lib/state/substates/RuntimesState.js +6 -10
  405. package/lib/state/substates/SpaceState.js +1 -6
  406. package/lib/state/substates/SurveysState.js +7 -12
  407. package/lib/state/substates/TeamState.js +1 -6
  408. package/lib/state/substates/index.js +0 -5
  409. package/lib/stories/assets/accessibility.png +0 -0
  410. package/lib/stories/assets/accessibility.svg +1 -0
  411. package/lib/stories/assets/addon-library.png +0 -0
  412. package/lib/stories/assets/assets.png +0 -0
  413. package/lib/stories/assets/context.png +0 -0
  414. package/lib/stories/assets/discord.svg +1 -0
  415. package/lib/stories/assets/docs.png +0 -0
  416. package/lib/stories/assets/figma-plugin.png +0 -0
  417. package/lib/stories/assets/github.svg +1 -0
  418. package/lib/stories/assets/share.png +0 -0
  419. package/lib/stories/assets/styling.png +0 -0
  420. package/lib/stories/assets/testing.png +0 -0
  421. package/lib/stories/assets/theming.png +0 -0
  422. package/lib/stories/assets/tutorials.svg +1 -0
  423. package/lib/stories/assets/youtube.svg +1 -0
  424. package/lib/stories/button.css +35 -0
  425. package/lib/stories/header.css +37 -0
  426. package/lib/stories/page.css +73 -0
  427. package/lib/test-setup.js +73 -1
  428. package/lib/theme/DatalayerTheme.js +1 -6
  429. package/lib/theme/DatalayerThemeProvider.js +17 -19
  430. package/lib/theme/Palette.js +1 -6
  431. package/lib/theme/index.js +0 -5
  432. package/lib/utils/Array.js +0 -5
  433. package/lib/utils/Avatar.js +2 -7
  434. package/lib/utils/Browser.js +6 -11
  435. package/lib/utils/Cells.d.ts +1 -1
  436. package/lib/utils/Cookie.js +1 -6
  437. package/lib/utils/Date.js +5 -10
  438. package/lib/utils/Download.js +5 -8
  439. package/lib/utils/DownloadFile.js +4 -7
  440. package/lib/utils/Env.js +2 -6
  441. package/lib/utils/File.js +0 -5
  442. package/lib/utils/Ids.js +0 -5
  443. package/lib/utils/Jupyter.js +0 -5
  444. package/lib/utils/Lazy.d.ts +1 -1
  445. package/lib/utils/Lazy.js +2 -8
  446. package/lib/utils/Name.js +10 -13
  447. package/lib/utils/Notebook.d.ts +1 -1
  448. package/lib/utils/Notebook.js +3 -3
  449. package/lib/utils/Number.js +13 -14
  450. package/lib/utils/Plots.d.ts +1 -1
  451. package/lib/utils/Plots.js +5 -5
  452. package/lib/utils/Random.js +0 -5
  453. package/lib/utils/Screenshot.js +1 -6
  454. package/lib/utils/Scroll.js +3 -7
  455. package/lib/utils/Sleep.js +1 -6
  456. package/lib/utils/Snapshot.js +2 -7
  457. package/lib/utils/String.js +2 -7
  458. package/lib/utils/Uri.js +2 -7
  459. package/lib/utils/Validator.js +0 -5
  460. package/lib/utils/WithSuspense.js +3 -11
  461. package/lib/utils/index.js +0 -5
  462. package/package.json +96 -30
  463. package/style/animation/Animation.module.css +174 -0
  464. package/style/base.css +64 -0
  465. package/style/index.css +6 -0
  466. package/lib/__tests__/App.test.js +0 -17
  467. package/lib/api/runtimes/models.d.ts +0 -59
  468. package/lib/api/runtimes/models.js +0 -11
  469. package/lib/hooks/useRun.d.ts +0 -21
  470. package/lib/mocks/hooks/useRunMock.d.ts +0 -6
  471. /package/lib/api/{runtimes → jupyter}/exec/Python.d.ts +0 -0
  472. /package/lib/api/{runtimes → jupyter}/exec/Snippets.d.ts +0 -0
  473. /package/lib/api/{runtimes → jupyter}/exec/index.d.ts +0 -0
  474. /package/lib/{__tests__/App.test.d.ts → examples/main.d.ts} +0 -0
package/lib/index.js CHANGED
@@ -2,6 +2,10 @@
2
2
  * Copyright (c) 2023-2025 Datalayer, Inc.
3
3
  * Distributed under the terms of the Modified BSD License.
4
4
  */
5
- export * from "./hooks";
6
- export * from "./utils";
7
- export * from "./App";
5
+ export * from './utils';
6
+ export * from './state';
7
+ export * from './collaboration';
8
+ export * from './services';
9
+ // Export navigation before hooks to avoid conflicts
10
+ export * from './navigation';
11
+ export * from './hooks';
package/lib/main.js CHANGED
@@ -3,8 +3,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
3
3
  * Copyright (c) 2023-2025 Datalayer, Inc.
4
4
  * Distributed under the terms of the Modified BSD License.
5
5
  */
6
- import { StrictMode } from 'react';
7
6
  import { createRoot } from 'react-dom/client';
8
7
  import App from './App';
9
8
  import './index.css';
10
- createRoot(document.getElementById('root')).render(_jsx(StrictMode, { children: _jsx(App, {}) }));
9
+ createRoot(document.getElementById('root')).render(_jsx(App, {}));
@@ -3,16 +3,11 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  * Copyright (c) 2023-2025 Datalayer, Inc.
4
4
  * Distributed under the terms of the Modified BSD License.
5
5
  */
6
- /*
7
- * Copyright (c) 2021-2024 Datalayer, Inc.
8
- *
9
- * Datalayer License
10
- */
11
- import { AlertIcon } from "@primer/octicons-react";
12
- import { Flash, Link } from "@primer/react";
13
- import { useNavigate } from "../../hooks";
6
+ import { AlertIcon } from '@primer/octicons-react';
7
+ import { Flash, Link } from '@primer/react';
8
+ import { useNavigate } from '../../hooks';
14
9
  export const FlashMock = () => {
15
10
  const navigate = useNavigate();
16
- return (_jsxs(Flash, { variant: "warning", style: { marginBottom: 10 }, children: [_jsx(AlertIcon, {}), " This is a mock content. ", _jsx(Link, { href: "#", onClick: e => navigate('/contact', e), children: "Contact us" }), " if you'd like to know more about this feature."] }));
11
+ return (_jsxs(Flash, { variant: "warning", style: { marginBottom: 10 }, children: [_jsx(AlertIcon, {}), " This is a mock content.", ' ', _jsx(Link, { href: "#", onClick: e => navigate('/contact', e), children: "Contact us" }), ' ', "if you'd like to know more about this feature."] }));
17
12
  };
18
13
  export default FlashMock;
@@ -2,9 +2,4 @@
2
2
  * Copyright (c) 2023-2025 Datalayer, Inc.
3
3
  * Distributed under the terms of the Modified BSD License.
4
4
  */
5
- /*
6
- * Copyright (c) 2021-2024 Datalayer, Inc.
7
- *
8
- * Datalayer License
9
- */
10
5
  export * from './FlashMock';
@@ -1 +1 @@
1
- export * from './useRunMock';
1
+ export * from './useDatalayerMock';
@@ -2,9 +2,4 @@
2
2
  * Copyright (c) 2023-2025 Datalayer, Inc.
3
3
  * Distributed under the terms of the Modified BSD License.
4
4
  */
5
- /*
6
- * Copyright (c) 2021-2024 Datalayer, Inc.
7
- *
8
- * Datalayer License
9
- */
10
- export * from './useRunMock';
5
+ export * from './useDatalayerMock';
@@ -2,9 +2,4 @@
2
2
  * Copyright (c) 2023-2025 Datalayer, Inc.
3
3
  * Distributed under the terms of the Modified BSD License.
4
4
  */
5
- /*
6
- * Copyright (c) 2021-2024 Datalayer, Inc.
7
- *
8
- * Datalayer License
9
- */
10
5
  export * from './rests';
@@ -2,36 +2,28 @@
2
2
  * Copyright (c) 2023-2025 Datalayer, Inc.
3
3
  * Distributed under the terms of the Modified BSD License.
4
4
  */
5
- /*
6
- * Copyright (c) 2021-2024 Datalayer, Inc.
7
- *
8
- * Datalayer License
9
- */
10
- const TOKEN = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL2Rldi5kYXRhbGF5ZXIuaW8iLCJpYXQiOjE3MTc1MDE1MjYsImV4cCI6MTcxNzU4NzkyNiwic3ViIjp7InVpZCI6IjRkODk2ZjI0LWM1MzEtNDljMS1iMjcyLTRlNTM2NjJjZDNkZSIsImhhbmRsZSI6ImVyaWMiLCJlbWFpbCI6ImVyaWNAZGF0YWxheWVyLmlvIiwiZmlyc3RfbmFtZSI6IkVyaWMiLCJsYXN0X25hbWUiOiJDaGFybGVzIiwicm9sZXMiOlsic3lzdGVtX2FkbWluIiwidXNlciJdfSwianRpIjoiZTAxYjIzMTYtYWJlMi00OTkyLWJjMmUtY2UyODIzZGJiOTdmIiwicm9sZXMiOlsic3lzdGVtX2FkbWluIiwidXNlciJdfQ.-cnEfJAUhet_nBLmxzx96zuv3PMEsGWLNCN6HV8PEso";
5
+ const TOKEN = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL2Rldi5kYXRhbGF5ZXIuaW8iLCJpYXQiOjE3MTc1MDE1MjYsImV4cCI6MTcxNzU4NzkyNiwic3ViIjp7InVpZCI6IjRkODk2ZjI0LWM1MzEtNDljMS1iMjcyLTRlNTM2NjJjZDNkZSIsImhhbmRsZSI6ImVyaWMiLCJlbWFpbCI6ImVyaWNAZGF0YWxheWVyLmlvIiwiZmlyc3RfbmFtZSI6IkVyaWMiLCJsYXN0X25hbWUiOiJDaGFybGVzIiwicm9sZXMiOlsic3lzdGVtX2FkbWluIiwidXNlciJdfSwianRpIjoiZTAxYjIzMTYtYWJlMi00OTkyLWJjMmUtY2UyODIzZGJiOTdmIiwicm9sZXMiOlsic3lzdGVtX2FkbWluIiwidXNlciJdfQ.-cnEfJAUhet_nBLmxzx96zuv3PMEsGWLNCN6HV8PEso';
11
6
  export const systemAdminLogin = (handle = 'hello') => {
12
7
  return {
13
- success: "true",
14
- message: "User is logged in.",
8
+ success: 'true',
9
+ message: 'User is logged in.',
15
10
  token: TOKEN,
16
11
  user: {
17
- avatar_url_s: "https://www.gravatar.com/avatar/f78b756a5c0eb7dd186b6622c0afed82",
18
- creation_ts_dt: "2024-06-01T08:55:45.676Z",
19
- id: "b1db2810-9d2b-48fb-93d9-151c577e8b8e",
12
+ avatar_url_s: 'https://www.gravatar.com/avatar/f78b756a5c0eb7dd186b6622c0afed82',
13
+ creation_ts_dt: '2024-06-01T08:55:45.676Z',
14
+ id: 'b1db2810-9d2b-48fb-93d9-151c577e8b8e',
20
15
  join_request_ts_dt: null,
21
- join_ts_dt: "2024-06-01T08:55:45.139Z",
22
- last_update_ts_dt: "2024-06-01T08:56:40.595Z",
16
+ join_ts_dt: '2024-06-01T08:55:45.139Z',
17
+ last_update_ts_dt: '2024-06-01T08:56:40.595Z',
23
18
  new_password_confirmation_ts_dt: null,
24
19
  new_password_request_ts_dt: null,
25
- origin_s: "cli",
26
- roles_ss: [
27
- "platform_admin",
28
- "user"
29
- ],
30
- type_s: "user",
31
- email_s: "hello@datalayer.io",
32
- first_name_t: "Hello",
20
+ origin_s: 'cli',
21
+ roles_ss: ['platform_admin', 'user'],
22
+ type_s: 'user',
23
+ email_s: 'hello@datalayer.io',
24
+ first_name_t: 'Hello',
33
25
  handle_s: handle,
34
- last_name_t: "Datalayer"
35
- }
26
+ last_name_t: 'Datalayer',
27
+ },
36
28
  };
37
29
  };
@@ -0,0 +1,6 @@
1
+ import { IAMStateProps } from './../../hooks';
2
+ import { DatalayerRequest } from './../../hooks';
3
+ export declare const useDatalayerMock: (props?: IAMStateProps) => {
4
+ requestRun: <T = any>(request: DatalayerRequest) => Promise<T>;
5
+ };
6
+ export default useDatalayerMock;
@@ -2,23 +2,18 @@
2
2
  * Copyright (c) 2023-2025 Datalayer, Inc.
3
3
  * Distributed under the terms of the Modified BSD License.
4
4
  */
5
- /*
6
- * Copyright (c) 2021-2024 Datalayer, Inc.
7
- *
8
- * Datalayer License
9
- */
10
- import { useLocation } from 'react-router-dom';
5
+ import { useLocation } from './../../hooks';
11
6
  import { useNavigate } from './../../hooks';
12
7
  import { useToast } from './../../hooks';
13
8
  import { useIAMStore } from '../../state';
14
- import { systemAdminLogin, } from './rests';
9
+ import { systemAdminLogin } from './rests';
15
10
  const getMockResponse = (request) => {
16
11
  const { url, method, body } = request;
17
- if (url.match('/api/iam/v1/login$') && method === "POST") {
12
+ if (url.match('/api/iam/v1/login$') && method === 'POST') {
18
13
  return systemAdminLogin(body.handle);
19
14
  }
20
15
  };
21
- export const useRunMock = (props = { user: undefined, token: undefined }) => {
16
+ export const useDatalayerMock = (props = { user: undefined, token: undefined }) => {
22
17
  const location = useLocation();
23
18
  const navigate = useNavigate();
24
19
  const iamStore = useIAMStore();
@@ -34,7 +29,7 @@ export const useRunMock = (props = { user: undefined, token: undefined }) => {
34
29
  const token_ = request.token ?? iamStore.token;
35
30
  const headers = {
36
31
  Accept: 'application/json',
37
- 'Content-Type': 'application/json'
32
+ 'Content-Type': 'application/json',
38
33
  };
39
34
  if (token_) {
40
35
  headers['Authorization'] = `Bearer ${token_}`;
@@ -43,8 +38,8 @@ export const useRunMock = (props = { user: undefined, token: undefined }) => {
43
38
  method: request.method,
44
39
  headers,
45
40
  body: request.body ? JSON.stringify(request.body) : undefined,
46
- credentials: token_ ? 'include' : 'omit'
47
- }).then((resp) => {
41
+ credentials: token_ ? 'include' : 'omit',
42
+ }).then(resp => {
48
43
  if (resp.status < 200 || resp.status >= 300) {
49
44
  if (resp.status === 401) {
50
45
  console.log('Datalayer RUN sent a 401 return code.');
@@ -54,7 +49,7 @@ export const useRunMock = (props = { user: undefined, token: undefined }) => {
54
49
  }
55
50
  }
56
51
  else {
57
- resp.json().then((r) => {
52
+ resp.json().then(r => {
58
53
  const message = r.message;
59
54
  const errors = r.errors;
60
55
  if (errors) {
@@ -80,4 +75,4 @@ export const useRunMock = (props = { user: undefined, token: undefined }) => {
80
75
  requestRun,
81
76
  };
82
77
  };
83
- export default useRunMock;
78
+ export default useDatalayerMock;
@@ -2,11 +2,6 @@
2
2
  * Copyright (c) 2023-2025 Datalayer, Inc.
3
3
  * Distributed under the terms of the Modified BSD License.
4
4
  */
5
- /*
6
- * Copyright (c) 2021-2024 Datalayer, Inc.
7
- *
8
- * Datalayer License
9
- */
10
5
  export * from './components';
11
6
  export * from './hooks';
12
7
  // export * from './jupyter';
@@ -1,10 +1,5 @@
1
+ export {};
1
2
  /*
2
3
  * Copyright (c) 2023-2025 Datalayer, Inc.
3
4
  * Distributed under the terms of the Modified BSD License.
4
5
  */
5
- export {};
6
- /*
7
- * Copyright (c) 2021-2024 Datalayer, Inc.
8
- *
9
- * Datalayer License
10
- */
@@ -2,9 +2,4 @@
2
2
  * Copyright (c) 2023-2025 Datalayer, Inc.
3
3
  * Distributed under the terms of the Modified BSD License.
4
4
  */
5
- /*
6
- * Copyright (c) 2021-2024 Datalayer, Inc.
7
- *
8
- * Datalayer License
9
- */
10
- export const CodeBlockMock = "";
5
+ export const CodeBlockMock = '';
@@ -2,9 +2,4 @@
2
2
  * Copyright (c) 2023-2025 Datalayer, Inc.
3
3
  * Distributed under the terms of the Modified BSD License.
4
4
  */
5
- /*
6
- * Copyright (c) 2021-2024 Datalayer, Inc.
7
- *
8
- * Datalayer License
9
- */
10
- export const CodelineMock = "";
5
+ export const CodelineMock = '';
@@ -1,4 +1,4 @@
1
- import { ICourse } from "../../models/Course";
1
+ import { ICourse } from '../../models/Course';
2
2
  export declare const newCourseMock: (name: string) => ICourse;
3
3
  export declare const COURSE_1_MOCK: ICourse;
4
4
  export declare const COURSE_2_MOCK: ICourse;
@@ -2,33 +2,28 @@
2
2
  * Copyright (c) 2023-2025 Datalayer, Inc.
3
3
  * Distributed under the terms of the Modified BSD License.
4
4
  */
5
- /*
6
- * Copyright (c) 2021-2024 Datalayer, Inc.
7
- *
8
- * Datalayer License
9
- */
10
- import { uniqueNamesGenerator, names } from "unique-names-generator";
11
- import { newUlid } from "../../utils";
12
- import { newSpaceMock } from "./SpaceMock";
13
- import { newUserMock } from "./UserMock";
5
+ import { uniqueNamesGenerator, names } from 'unique-names-generator';
6
+ import { newUlid } from '../../utils';
7
+ import { newSpaceMock } from './SpaceMock';
8
+ import { newUserMock } from './UserMock';
14
9
  export const newCourseMock = (name) => {
15
10
  const course = {
16
11
  id: newUlid(),
17
12
  owner: newUserMock(uniqueNamesGenerator({ dictionaries: [names] }), uniqueNamesGenerator({ dictionaries: [names] })),
18
13
  handle: newUlid(),
19
14
  type: 'space',
20
- variant: "course",
15
+ variant: 'course',
21
16
  name: name,
22
- description: name + " description.",
17
+ description: name + ' description.',
23
18
  public: false,
24
19
  creationDate: new Date(),
25
20
  items: [],
26
21
  itemIds: [],
27
- seedSpace: newSpaceMock("space content"),
22
+ seedSpace: newSpaceMock('space content'),
28
23
  };
29
24
  return course;
30
25
  };
31
- export const COURSE_1_MOCK = newCourseMock("Course 1");
32
- export const COURSE_2_MOCK = newCourseMock("Course 2");
33
- export const COURSE_3_MOCK = newCourseMock("Course 3");
26
+ export const COURSE_1_MOCK = newCourseMock('Course 1');
27
+ export const COURSE_2_MOCK = newCourseMock('Course 2');
28
+ export const COURSE_3_MOCK = newCourseMock('Course 3');
34
29
  export const COURSES_MOCK = [COURSE_1_MOCK, COURSE_2_MOCK, COURSE_3_MOCK];
@@ -1,4 +1,4 @@
1
- import { IInvite } from "../../models/Invite";
1
+ import { IInvite } from '../../models/Invite';
2
2
  export declare const newInviteMock: (message: string) => IInvite;
3
3
  export declare const INVITE_1_MOCK: IInvite;
4
4
  export declare const INVITE_2_MOCK: IInvite;
@@ -2,14 +2,9 @@
2
2
  * Copyright (c) 2023-2025 Datalayer, Inc.
3
3
  * Distributed under the terms of the Modified BSD License.
4
4
  */
5
- /*
6
- * Copyright (c) 2021-2024 Datalayer, Inc.
7
- *
8
- * Datalayer License
9
- */
10
- import { uniqueNamesGenerator, names, colors, adjectives, animals } from "unique-names-generator";
11
- import { newUlid } from "../../utils";
12
- import { newUserMock } from "./UserMock";
5
+ import { uniqueNamesGenerator, names, colors, adjectives, animals, } from 'unique-names-generator';
6
+ import { newUlid } from '../../utils';
7
+ import { newUserMock } from './UserMock';
13
8
  export const newInviteMock = (message) => {
14
9
  const invite = {
15
10
  id: newUlid(),
@@ -21,7 +16,22 @@ export const newInviteMock = (message) => {
21
16
  };
22
17
  return invite;
23
18
  };
24
- export const INVITE_1_MOCK = newInviteMock('A ' + uniqueNamesGenerator({ dictionaries: [colors, adjectives, animals], separator: ' ' }) + '.');
25
- export const INVITE_2_MOCK = newInviteMock('A ' + uniqueNamesGenerator({ dictionaries: [colors, adjectives, animals], separator: ' ' }) + '.');
26
- export const INVITE_3_MOCK = newInviteMock('A ' + uniqueNamesGenerator({ dictionaries: [colors, adjectives, animals], separator: ' ' }) + '.');
19
+ export const INVITE_1_MOCK = newInviteMock('A ' +
20
+ uniqueNamesGenerator({
21
+ dictionaries: [colors, adjectives, animals],
22
+ separator: ' ',
23
+ }) +
24
+ '.');
25
+ export const INVITE_2_MOCK = newInviteMock('A ' +
26
+ uniqueNamesGenerator({
27
+ dictionaries: [colors, adjectives, animals],
28
+ separator: ' ',
29
+ }) +
30
+ '.');
31
+ export const INVITE_3_MOCK = newInviteMock('A ' +
32
+ uniqueNamesGenerator({
33
+ dictionaries: [colors, adjectives, animals],
34
+ separator: ' ',
35
+ }) +
36
+ '.');
27
37
  export const INVITES_MOCK = [INVITE_1_MOCK, INVITE_2_MOCK, INVITE_3_MOCK];
@@ -9,9 +9,9 @@ export const newJupyterLabUserMock = (name) => {
9
9
  name: name,
10
10
  display_name: name,
11
11
  initials: name,
12
- color: "yellow",
12
+ color: 'yellow',
13
13
  },
14
- permissions: {}
14
+ permissions: {},
15
15
  };
16
16
  return user;
17
17
  };
@@ -1,4 +1,4 @@
1
- import { IOrganization } from "../../models/Organization";
1
+ import { IOrganization } from '../../models/Organization';
2
2
  export declare const ORGANISATION_1_MOCK: IOrganization;
3
3
  export declare const ORGANISATION_2_MOCK: IOrganization;
4
4
  export declare const ORGANISATION_3_MOCK: IOrganization;
@@ -2,14 +2,14 @@
2
2
  * Copyright (c) 2023-2025 Datalayer, Inc.
3
3
  * Distributed under the terms of the Modified BSD License.
4
4
  */
5
- import { newUlid } from "../../utils";
5
+ import { newUlid } from '../../utils';
6
6
  const newOrganizationMock = (name) => {
7
7
  const organization = {
8
8
  id: newUlid(),
9
9
  handle: newUlid(),
10
- type: "organization",
10
+ type: 'organization',
11
11
  name: name,
12
- description: name + " description.",
12
+ description: name + ' description.',
13
13
  public: false,
14
14
  members: [],
15
15
  teams: [],
@@ -18,7 +18,11 @@ const newOrganizationMock = (name) => {
18
18
  };
19
19
  return organization;
20
20
  };
21
- export const ORGANISATION_1_MOCK = newOrganizationMock("Organization 1");
22
- export const ORGANISATION_2_MOCK = newOrganizationMock("Organization 2");
23
- export const ORGANISATION_3_MOCK = newOrganizationMock("Organization 3");
24
- export const ORGANISATIONS_MOCK = [ORGANISATION_1_MOCK, ORGANISATION_2_MOCK, ORGANISATION_3_MOCK];
21
+ export const ORGANISATION_1_MOCK = newOrganizationMock('Organization 1');
22
+ export const ORGANISATION_2_MOCK = newOrganizationMock('Organization 2');
23
+ export const ORGANISATION_3_MOCK = newOrganizationMock('Organization 3');
24
+ export const ORGANISATIONS_MOCK = [
25
+ ORGANISATION_1_MOCK,
26
+ ORGANISATION_2_MOCK,
27
+ ORGANISATION_3_MOCK,
28
+ ];
@@ -1,4 +1,4 @@
1
- import { ISchool } from "./../../models";
1
+ import { ISchool } from './../../models';
2
2
  export declare const newSchoolMock: (name: string) => ISchool;
3
3
  export declare const SCHOOL_1_MOCK: ISchool;
4
4
  export declare const SCHOOL_2_MOCK: ISchool;
@@ -2,14 +2,14 @@
2
2
  * Copyright (c) 2023-2025 Datalayer, Inc.
3
3
  * Distributed under the terms of the Modified BSD License.
4
4
  */
5
- import { newUlid } from "../../utils";
5
+ import { newUlid } from '../../utils';
6
6
  export const newSchoolMock = (name) => {
7
7
  const school = {
8
8
  id: newUlid(),
9
9
  handle: newUlid(),
10
- type: "school",
10
+ type: 'school',
11
11
  name: name,
12
- description: name + " description.",
12
+ description: name + ' description.',
13
13
  public: false,
14
14
  members: [],
15
15
  students: [],
@@ -19,7 +19,7 @@ export const newSchoolMock = (name) => {
19
19
  };
20
20
  return school;
21
21
  };
22
- export const SCHOOL_1_MOCK = newSchoolMock("School 1");
23
- export const SCHOOL_2_MOCK = newSchoolMock("School 2");
24
- export const SCHOOL_3_MOCK = newSchoolMock("School 3");
22
+ export const SCHOOL_1_MOCK = newSchoolMock('School 1');
23
+ export const SCHOOL_2_MOCK = newSchoolMock('School 2');
24
+ export const SCHOOL_3_MOCK = newSchoolMock('School 3');
25
25
  export const SCHOOLS_MOCK = [SCHOOL_1_MOCK, SCHOOL_2_MOCK, SCHOOL_3_MOCK];
@@ -1,4 +1,4 @@
1
- import { ISpace } from "../../models/Space";
1
+ import { ISpace } from '../../models/Space';
2
2
  export declare const newSpaceMock: (name: string) => ISpace;
3
3
  export declare const SPACE_1_MOCK: ISpace;
4
4
  export declare const SPACE_2_MOCK: ISpace;
@@ -2,29 +2,24 @@
2
2
  * Copyright (c) 2023-2025 Datalayer, Inc.
3
3
  * Distributed under the terms of the Modified BSD License.
4
4
  */
5
- /*
6
- * Copyright (c) 2021-2024 Datalayer, Inc.
7
- *
8
- * Datalayer License
9
- */
10
- import { uniqueNamesGenerator, names } from "unique-names-generator";
11
- import { newUlid } from "../../utils";
12
- import { newUserMock } from "./UserMock";
5
+ import { uniqueNamesGenerator, names } from 'unique-names-generator';
6
+ import { newUlid } from '../../utils';
7
+ import { newUserMock } from './UserMock';
13
8
  export const newSpaceMock = (name) => {
14
9
  const space = {
15
10
  id: newUlid(),
16
11
  owner: newUserMock(uniqueNamesGenerator({ dictionaries: [names] }), uniqueNamesGenerator({ dictionaries: [names] })),
17
12
  handle: newUlid(),
18
- type: "space",
19
- variant: "default",
13
+ type: 'space',
14
+ variant: 'default',
20
15
  name: name,
21
- description: name + " description.",
16
+ description: name + ' description.',
22
17
  public: false,
23
18
  creationDate: new Date(),
24
19
  };
25
20
  return space;
26
21
  };
27
- export const SPACE_1_MOCK = newSpaceMock("Space 1");
28
- export const SPACE_2_MOCK = newSpaceMock("Space 2");
29
- export const SPACE_3 = newSpaceMock("Space 3");
22
+ export const SPACE_1_MOCK = newSpaceMock('Space 1');
23
+ export const SPACE_2_MOCK = newSpaceMock('Space 2');
24
+ export const SPACE_3 = newSpaceMock('Space 3');
30
25
  export const SPACES_MOCK = [SPACE_1_MOCK, SPACE_2_MOCK, SPACE_3];
@@ -1,4 +1,4 @@
1
- import { ITeam } from "../../models";
1
+ import { ITeam } from '../../models';
2
2
  export declare const TEAM_1_MOCK: ITeam;
3
3
  export declare const TEAM_2_MOCK: ITeam;
4
4
  export declare const TEAM_3_MOCK: ITeam;
@@ -2,14 +2,14 @@
2
2
  * Copyright (c) 2023-2025 Datalayer, Inc.
3
3
  * Distributed under the terms of the Modified BSD License.
4
4
  */
5
- import { newUlid } from "../../utils";
5
+ import { newUlid } from '../../utils';
6
6
  const newTeamMock = (name) => {
7
7
  const team = {
8
8
  id: newUlid(),
9
- type: "team",
9
+ type: 'team',
10
10
  handle: name,
11
11
  name: name,
12
- description: name + " description.",
12
+ description: name + ' description.',
13
13
  public: false,
14
14
  members: [],
15
15
  creationDate: new Date(),
@@ -20,7 +20,7 @@ const newTeamMock = (name) => {
20
20
  };
21
21
  return team;
22
22
  };
23
- export const TEAM_1_MOCK = newTeamMock("Team 1");
24
- export const TEAM_2_MOCK = newTeamMock("Team 2");
25
- export const TEAM_3_MOCK = newTeamMock("Team 3");
23
+ export const TEAM_1_MOCK = newTeamMock('Team 1');
24
+ export const TEAM_2_MOCK = newTeamMock('Team 2');
25
+ export const TEAM_3_MOCK = newTeamMock('Team 3');
26
26
  export const TEAMS_MOCK = [TEAM_1_MOCK, TEAM_2_MOCK, TEAM_3_MOCK];
@@ -1,2 +1,2 @@
1
- import { IUser } from "../../models/User";
1
+ import { IUser } from '../../models/User';
2
2
  export declare const newUserMock: (firstName?: string, lastName?: string) => IUser;
@@ -2,27 +2,20 @@
2
2
  * Copyright (c) 2023-2025 Datalayer, Inc.
3
3
  * Distributed under the terms of the Modified BSD License.
4
4
  */
5
- /*
6
- * Copyright (c) 2021-2024 Datalayer, Inc.
7
- *
8
- * Datalayer License
9
- */
10
- import { uniqueNamesGenerator, animals, names } from "unique-names-generator";
11
- import { newUlid, asDisplayName, namesAsInitials } from "../../utils";
5
+ import { uniqueNamesGenerator, animals, names } from 'unique-names-generator';
6
+ import { newUlid, asDisplayName, namesAsInitials } from '../../utils';
12
7
  export const newUserMock = (firstName, lastName) => {
13
8
  const mockFistName = firstName ?? uniqueNamesGenerator({ dictionaries: [names] });
14
9
  const mockLastName = lastName ?? uniqueNamesGenerator({ dictionaries: [names] });
15
10
  const user = {
16
11
  id: newUlid(),
17
12
  handle: uniqueNamesGenerator({ dictionaries: [animals] }).toLowerCase(),
18
- email: mockFistName + "@datalayer.test",
13
+ email: mockFistName + '@datalayer.test',
19
14
  firstName: mockFistName,
20
15
  lastName: mockLastName,
21
16
  initials: namesAsInitials(mockFistName, mockLastName),
22
17
  displayName: asDisplayName(mockFistName, mockLastName),
23
- roles: [
24
- 'mock_role',
25
- ],
18
+ roles: ['mock_role'],
26
19
  iamProviders: [],
27
20
  setRoles: (roles) => { },
28
21
  unsubscribedFromOutbounds: false,
@@ -2,11 +2,6 @@
2
2
  * Copyright (c) 2023-2025 Datalayer, Inc.
3
3
  * Distributed under the terms of the Modified BSD License.
4
4
  */
5
- /*
6
- * Copyright (c) 2021-2024 Datalayer, Inc.
7
- *
8
- * Datalayer License
9
- */
10
5
  export * from './CodeBlockMock';
11
6
  export * from './CodelineMock';
12
7
  export * from './InviteMock';
@@ -3,13 +3,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  * Copyright (c) 2023-2025 Datalayer, Inc.
4
4
  * Distributed under the terms of the Modified BSD License.
5
5
  */
6
- /*
7
- * Copyright (c) 2021-2024 Datalayer, Inc.
8
- *
9
- * Datalayer License
10
- */
11
6
  import { ActionMenu, ActionList } from '@primer/react';
12
- import { WorkflowIcon, ArchiveIcon, GearIcon, RocketIcon, CopyIcon, CommentIcon, BookIcon } from '@primer/octicons-react';
7
+ import { WorkflowIcon, ArchiveIcon, GearIcon, RocketIcon, CopyIcon, CommentIcon, BookIcon, } from '@primer/octicons-react';
13
8
  export const ActionMenuMock = (props) => {
14
9
  const { title } = props;
15
10
  return (_jsxs(ActionMenu, { children: [_jsx(ActionMenu.Button, { children: title }), _jsx(ActionMenu.Overlay, { width: "auto", children: _jsxs(ActionList, { children: [_jsxs(ActionList.Item, { onSelect: () => alert('Workflows clicked'), children: ["Workflows", _jsx(ActionList.LeadingVisual, { children: _jsx(WorkflowIcon, {}) })] }), _jsxs(ActionList.Item, { onSelect: () => alert('Archived items clicked'), children: ["Archived items", _jsx(ActionList.LeadingVisual, { children: _jsx(ArchiveIcon, {}) })] }), _jsxs(ActionList.LinkItem, { href: "/", children: ["Settings", _jsx(ActionList.LeadingVisual, { children: _jsx(GearIcon, {}) })] }), _jsxs(ActionList.Item, { onSelect: () => alert('Make a copy clicked'), children: ["Make a copy", _jsx(ActionList.LeadingVisual, { children: _jsx(CopyIcon, {}) })] }), _jsx(ActionList.Divider, {}), _jsxs(ActionList.Group, { children: [_jsx(ActionList.GroupHeading, { children: "GitHub projects" }), _jsxs(ActionList.LinkItem, { href: "/", children: ["What's new", _jsx(ActionList.LeadingVisual, { children: _jsx(RocketIcon, {}) })] }), _jsxs(ActionList.LinkItem, { href: "/", children: ["Give feedback", _jsx(ActionList.LeadingVisual, { children: _jsx(CommentIcon, {}) })] }), _jsxs(ActionList.LinkItem, { href: "/", children: ["GitHub Docs", _jsx(ActionList.LeadingVisual, { children: _jsx(BookIcon, {}) })] })] })] }) })] }));
@@ -3,18 +3,13 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  * Copyright (c) 2023-2025 Datalayer, Inc.
4
4
  * Distributed under the terms of the Modified BSD License.
5
5
  */
6
- /*
7
- * Copyright (c) 2021-2024 Datalayer, Inc.
8
- *
9
- * Datalayer License
10
- */
11
6
  import { Heading } from '@primer/react-brand';
12
- import { lazyWithPreload, WithSuspense } from "../../utils";
7
+ import { lazyWithPreload, WithSuspense } from '../../utils';
13
8
  import { HorizontalCenter } from '../../components/display';
14
9
  import { CHART_4 } from './ChartMockOptions';
15
- const ReactEcharts = WithSuspense(lazyWithPreload(() => import("echarts-for-react")), true);
10
+ const ReactEcharts = WithSuspense(lazyWithPreload(() => import('echarts-for-react')), true);
16
11
  export const ChartMock = (props) => {
17
12
  const { title } = props;
18
- return (_jsxs(HorizontalCenter, { children: [_jsx(Heading, { size: "3", children: title }), _jsx(ReactEcharts, { option: CHART_4, style: { width: "600px", height: "300px" } })] }));
13
+ return (_jsxs(HorizontalCenter, { children: [_jsx(Heading, { size: "3", children: title }), _jsx(ReactEcharts, { option: CHART_4, style: { width: '600px', height: '300px' } })] }));
19
14
  };
20
15
  export default ChartMock;