@datalayer/core 1.1.59 → 1.1.66

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 (366) hide show
  1. package/README.md +2 -2
  2. package/lib/api/DatalayerApi.d.ts +42 -1
  3. package/lib/api/DatalayerApi.js +90 -3
  4. package/lib/api/constants.d.ts +18 -0
  5. package/lib/api/constants.js +18 -0
  6. package/lib/api/contents/attachments.d.ts +9 -0
  7. package/lib/api/contents/attachments.js +43 -0
  8. package/lib/api/contents/bridges.d.ts +22 -0
  9. package/lib/api/contents/bridges.js +79 -0
  10. package/lib/api/contents/capabilities.d.ts +11 -0
  11. package/lib/api/contents/capabilities.js +21 -0
  12. package/lib/api/contents/cloudStorage.d.ts +31 -0
  13. package/lib/api/contents/cloudStorage.js +89 -0
  14. package/lib/api/contents/dataservers.d.ts +37 -0
  15. package/lib/api/contents/dataservers.js +121 -0
  16. package/lib/api/contents/datasets.d.ts +15 -0
  17. package/lib/api/contents/datasets.js +45 -0
  18. package/lib/api/contents/datasources.d.ts +70 -0
  19. package/lib/api/contents/datasources.js +149 -0
  20. package/lib/api/contents/generated.d.ts +1070 -0
  21. package/lib/api/contents/index.d.ts +16 -0
  22. package/lib/api/contents/index.js +20 -0
  23. package/lib/api/contents/mcp.d.ts +46 -0
  24. package/lib/api/contents/mcp.js +157 -0
  25. package/lib/api/contents/objects.d.ts +31 -0
  26. package/lib/api/contents/objects.js +88 -0
  27. package/lib/api/contents/operations.d.ts +3 -0
  28. package/lib/api/contents/operations.js +19 -0
  29. package/lib/api/contents/runtimeMounts.d.ts +40 -0
  30. package/lib/api/contents/runtimeMounts.js +59 -0
  31. package/lib/api/contents/sandboxUid.d.ts +53 -0
  32. package/lib/api/contents/sandboxUid.js +78 -0
  33. package/lib/api/contents/sources.d.ts +19 -0
  34. package/lib/api/contents/sources.js +119 -0
  35. package/lib/api/contents/sync.d.ts +18 -0
  36. package/lib/api/contents/sync.js +69 -0
  37. package/lib/api/contents/transfers.d.ts +38 -0
  38. package/lib/api/contents/transfers.js +123 -0
  39. package/lib/api/iam/connectedAgents.d.ts +39 -0
  40. package/lib/api/iam/connectedAgents.js +52 -0
  41. package/lib/api/iam/index.d.ts +2 -1
  42. package/lib/api/iam/index.js +2 -1
  43. package/lib/api/iam/mcpAlertRules.d.ts +51 -0
  44. package/lib/api/iam/mcpAlertRules.js +198 -0
  45. package/lib/api/iam/mcpAuditSettings.d.ts +46 -0
  46. package/lib/api/iam/mcpAuditSettings.js +120 -0
  47. package/lib/api/iam/mcpPolicy.d.ts +80 -0
  48. package/lib/api/iam/mcpPolicy.js +132 -0
  49. package/lib/api/iam/organizationTeams.d.ts +13 -0
  50. package/lib/api/iam/organizationTeams.js +43 -0
  51. package/lib/api/iam/serviceAgents.d.ts +68 -0
  52. package/lib/api/iam/serviceAgents.js +119 -0
  53. package/lib/api/index.d.ts +4 -1
  54. package/lib/api/index.js +3 -1
  55. package/lib/api/mcp/activity.d.ts +37 -0
  56. package/lib/api/mcp/activity.js +26 -0
  57. package/lib/api/mcp/alerts.d.ts +25 -0
  58. package/lib/api/mcp/alerts.js +51 -0
  59. package/lib/api/mcp/audit.d.ts +29 -0
  60. package/lib/api/mcp/audit.js +55 -0
  61. package/lib/api/mcp/bindings.d.ts +18 -0
  62. package/lib/api/mcp/bindings.js +42 -0
  63. package/lib/api/mcp/forwarding.d.ts +25 -0
  64. package/lib/api/mcp/forwarding.js +46 -0
  65. package/lib/api/mcp/gateway.d.ts +16 -0
  66. package/lib/api/mcp/gateway.js +70 -0
  67. package/lib/api/mcp/generated.d.ts +22 -0
  68. package/lib/api/mcp/generated.js +213 -0
  69. package/lib/api/mcp/index.d.ts +17 -0
  70. package/lib/api/mcp/index.js +25 -0
  71. package/lib/api/mcp/observability.d.ts +125 -0
  72. package/lib/api/mcp/observability.js +254 -0
  73. package/lib/api/mcp/operations.d.ts +83 -0
  74. package/lib/api/mcp/operations.js +50 -0
  75. package/lib/api/mcp/organizations.d.ts +102 -0
  76. package/lib/api/mcp/organizations.js +46 -0
  77. package/lib/api/mcp/policy.d.ts +9 -0
  78. package/lib/api/mcp/policy.js +23 -0
  79. package/lib/api/mcp/tasks.d.ts +49 -0
  80. package/lib/api/mcp/tasks.js +147 -0
  81. package/lib/api/utils/validation.d.ts +1 -1
  82. package/lib/api/utils/validation.js +1 -1
  83. package/lib/client/auth/index.js +0 -5
  84. package/lib/client/auth/storage.js +0 -5
  85. package/lib/client/auth/strategies.js +0 -5
  86. package/lib/client/base.d.ts +6 -0
  87. package/lib/client/base.js +8 -0
  88. package/lib/client/index.d.ts +0 -10
  89. package/lib/client/index.js +2 -2
  90. package/lib/client/mixins/ContentsMixin.d.ts +71 -0
  91. package/lib/client/mixins/ContentsMixin.js +157 -0
  92. package/lib/client/mixins/IAMMixin.d.ts +0 -31
  93. package/lib/client/mixins/IAMMixin.js +0 -58
  94. package/lib/components/animation/AnimatedText.d.ts +1 -0
  95. package/lib/components/animation/AnimatedText.js +0 -4
  96. package/lib/components/auth/SigInAPIKey.d.ts +1 -0
  97. package/lib/components/auth/SigInAPIKey.js +0 -6
  98. package/lib/components/auth/SignIn.d.ts +1 -0
  99. package/lib/components/auth/SignIn.js +0 -4
  100. package/lib/components/auth/SignIn.stories.d.ts +2 -2
  101. package/lib/components/avatars/BoringAvatar.d.ts +1 -1
  102. package/lib/components/avatars/BoringAvatar.stories.d.ts +1 -1
  103. package/lib/components/avatars/DLAvatar.d.ts +1 -1
  104. package/lib/components/avatars/DLAvatar.js +0 -4
  105. package/lib/components/avatars/UserAvatar.d.ts +18 -1
  106. package/lib/components/avatars/UserAvatar.js +14 -14
  107. package/lib/components/avatars/UserProfileAvatar.d.ts +1 -1
  108. package/lib/components/banners/NoAutomationBanner.d.ts +1 -1
  109. package/lib/components/billing/BillingEntitySelect.d.ts +10 -0
  110. package/lib/components/billing/BillingEntitySelect.js +0 -17
  111. package/lib/components/billing/index.js +0 -4
  112. package/lib/components/buttons/DownloadCSVButton.d.ts +1 -1
  113. package/lib/components/buttons/DownloadJsonButton.d.ts +1 -1
  114. package/lib/components/buttons/LongActionButton.d.ts +1 -0
  115. package/lib/components/buttons/LongActionButton.js +0 -4
  116. package/lib/components/buttons/UploadButton.d.ts +1 -0
  117. package/lib/components/buttons/UploadButton.js +0 -4
  118. package/lib/components/checkout/StripeCheckout.d.ts +1 -1
  119. package/lib/components/collaboration/LiveEditorCollaborators.d.ts +31 -0
  120. package/lib/components/collaboration/LiveEditorCollaborators.js +98 -53
  121. package/lib/components/collaboration/index.js +0 -4
  122. package/lib/components/confetti/ConfettiSuccess.d.ts +1 -1
  123. package/lib/components/contents/ContentSourceCard.d.ts +8 -0
  124. package/lib/components/contents/ContentSourceCard.js +23 -0
  125. package/lib/components/contents/HomeFolderObjectsBrowser.d.ts +10 -0
  126. package/lib/components/contents/HomeFolderObjectsBrowser.js +148 -0
  127. package/lib/components/contents/index.d.ts +2 -0
  128. package/lib/components/contents/index.js +6 -0
  129. package/lib/components/context/OrganizationSelect.d.ts +1 -1
  130. package/lib/components/display/AvatarSkeleton.d.ts +1 -1
  131. package/lib/components/display/BusyDots.d.ts +1 -1
  132. package/lib/components/display/CenteredSpinner.d.ts +1 -1
  133. package/lib/components/display/CodePreview.d.ts +1 -1
  134. package/lib/components/display/DatalayerBox.d.ts +7 -2
  135. package/lib/components/display/DatalayerBox.js +6 -6
  136. package/lib/components/display/HorizontalCenter.d.ts +1 -1
  137. package/lib/components/display/JupyterDialog.d.ts +1 -0
  138. package/lib/components/display/JupyterDialog.js +1 -7
  139. package/lib/components/display/Markdown.d.ts +1 -0
  140. package/lib/components/display/NotebookSkeleton.d.ts +1 -1
  141. package/lib/components/display/Placeholder.d.ts +1 -1
  142. package/lib/components/display/ToTopBranded.d.ts +1 -1
  143. package/lib/components/echarts/EChartsReact.d.ts +1 -1
  144. package/lib/components/flashes/FlashClosable.d.ts +1 -0
  145. package/lib/components/flashes/FlashClosable.js +0 -4
  146. package/lib/components/flashes/FlashGuest.d.ts +1 -1
  147. package/lib/components/flashes/FlashSurveys.d.ts +1 -1
  148. package/lib/components/flashes/FlashUnauthorized.d.ts +1 -0
  149. package/lib/components/flashes/FlashUnauthorized.js +0 -6
  150. package/lib/components/flashes/surveys/Survey2025_1.d.ts +1 -1
  151. package/lib/components/iam/ExternalTokenSilentLogin.d.ts +1 -1
  152. package/lib/components/index.d.ts +2 -0
  153. package/lib/components/index.js +2 -0
  154. package/lib/components/labels/StatusLabels.d.ts +10 -0
  155. package/lib/components/labels/StatusLabels.js +30 -1
  156. package/lib/components/labels/VisibilityLabel.d.ts +1 -1
  157. package/lib/components/landings/StepBlock.d.ts +1 -1
  158. package/lib/components/mcp/ClientBadge.d.ts +41 -0
  159. package/lib/components/mcp/ClientBadge.js +33 -0
  160. package/lib/components/mcp/McpErrorBlankslate.d.ts +21 -0
  161. package/lib/components/mcp/McpErrorBlankslate.js +17 -0
  162. package/lib/components/mcp/ScopeList.d.ts +28 -0
  163. package/lib/components/mcp/ScopeList.js +14 -0
  164. package/lib/components/mcp/index.d.ts +10 -0
  165. package/lib/components/mcp/index.js +18 -0
  166. package/lib/components/navbar/NavigationVisbilityObserver.d.ts +2 -1
  167. package/lib/components/navbar/SubdomainNavBar.d.ts +10 -5
  168. package/lib/components/navbar/SubdomainNavBar.js +2 -1
  169. package/lib/components/notebooks/JupyterNotebook.d.ts +1 -1
  170. package/lib/components/notebooks/JupyterNotebookToolbar.d.ts +1 -1
  171. package/lib/components/principal/PrincipalAppearance.d.ts +1 -0
  172. package/lib/components/principal/PrincipalAppearance.js +0 -8
  173. package/lib/components/principal/PrincipalAvatar.d.ts +9 -1
  174. package/lib/components/principal/PrincipalAvatar.js +25 -10
  175. package/lib/components/principal/PrincipalBadge.d.ts +1 -1
  176. package/lib/components/principal/PrincipalBanner.d.ts +1 -1
  177. package/lib/components/principal/PrincipalDetailsOverlay.d.ts +31 -1
  178. package/lib/components/principal/PrincipalDetailsOverlay.js +64 -33
  179. package/lib/components/principal/PrincipalHoverCard.d.ts +31 -0
  180. package/lib/components/principal/PrincipalHoverCard.js +52 -0
  181. package/lib/components/principal/PrincipalSwitcherMenu.d.ts +1 -0
  182. package/lib/components/principal/PrincipalSwitcherMenu.js +7 -15
  183. package/lib/components/principal/index.d.ts +2 -1
  184. package/lib/components/principal/index.js +2 -1
  185. package/lib/components/progress/ConsumptionBar.d.ts +1 -0
  186. package/lib/components/progress/ConsumptionBar.js +0 -4
  187. package/lib/components/progress/ProgressRing.d.ts +1 -0
  188. package/lib/components/progress/SpinnerBar.d.ts +1 -1
  189. package/lib/components/progress/Timer.d.ts +1 -0
  190. package/lib/components/progress/Timer.js +0 -4
  191. package/lib/components/screencapture/ScreencaptureButton.d.ts +1 -1
  192. package/lib/components/sharing/ShareAccessComponent.d.ts +15 -1
  193. package/lib/components/sharing/ShareAccessComponent.js +36 -23
  194. package/lib/components/sharing/SharingEditor.d.ts +17 -0
  195. package/lib/components/sharing/SharingEditor.js +0 -24
  196. package/lib/components/sparklines/Sparklines.js +3 -4
  197. package/lib/components/sparklines/index.js +0 -4
  198. package/lib/components/storage/ContentsBrowser.d.ts +25 -1
  199. package/lib/components/storage/ContentsBrowser.js +145 -52
  200. package/lib/components/storage/ContentsBrowserMock.d.ts +3 -0
  201. package/lib/components/storage/ContentsBrowserMock.js +75 -0
  202. package/lib/components/storage/ContentsItems.d.ts +2 -1
  203. package/lib/components/storage/ContentsItems.js +0 -4
  204. package/lib/components/storage/ContentsTable.d.ts +50 -0
  205. package/lib/components/storage/ContentsTable.js +134 -0
  206. package/lib/components/storage/HomeFolderDrive.d.ts +71 -0
  207. package/lib/components/storage/HomeFolderDrive.js +248 -0
  208. package/lib/components/storage/index.d.ts +2 -0
  209. package/lib/components/storage/index.js +2 -0
  210. package/lib/components/students/StudentItemStatus.d.ts +1 -1
  211. package/lib/components/students/StudentResultCircle.d.ts +1 -1
  212. package/lib/components/subnav/SubNav.d.ts +5 -5
  213. package/lib/components/subnav/SubNav.js +11 -9
  214. package/lib/components/tables/DataTable.d.ts +1 -1
  215. package/lib/components/text-reveal/TextRevealAnimation.d.ts +2 -2
  216. package/lib/components/text-reveal/useTextRevealAnimationLines.d.ts +1 -1
  217. package/lib/components/time/LiveRelativeTime.d.ts +1 -0
  218. package/lib/components/time/LiveRelativeTime.js +0 -8
  219. package/lib/components/time/index.js +0 -4
  220. package/lib/components/timeline/Timeline.d.ts +1 -1
  221. package/lib/components/timeline/index.js +0 -4
  222. package/lib/components/users/PeerIndicator.d.ts +1 -0
  223. package/lib/components/users/PeerIndicator.js +0 -4
  224. package/lib/config/Configuration.d.ts +15 -17
  225. package/lib/config/Configuration.js +7 -0
  226. package/lib/hooks/index.d.ts +2 -0
  227. package/lib/hooks/index.js +2 -0
  228. package/lib/hooks/layouts/LayoutBackdrop.d.ts +1 -1
  229. package/lib/hooks/layouts/LayoutScreencapture.d.ts +1 -1
  230. package/lib/hooks/useBackdrop.d.ts +1 -1
  231. package/lib/hooks/useBackdropJupyterLab.d.ts +3 -2
  232. package/lib/hooks/useBackdropJupyterLab.js +0 -4
  233. package/lib/hooks/useCache.d.ts +310 -105
  234. package/lib/hooks/useCache.js +142 -355
  235. package/lib/hooks/useContainsFocus.d.ts +1 -1
  236. package/lib/hooks/useContents.d.ts +313 -0
  237. package/lib/hooks/useContents.js +964 -0
  238. package/lib/hooks/useFocusTrap.d.ts +4 -4
  239. package/lib/hooks/useFocusTrap.js +1 -1
  240. package/lib/hooks/useMcp.d.ts +229 -0
  241. package/lib/hooks/useMcp.js +656 -0
  242. package/lib/hooks/useMobile.js +0 -5
  243. package/lib/hooks/useProjectStore.d.ts +3 -3
  244. package/lib/hooks/useProjectStore.js +4 -4
  245. package/lib/hooks/useRef.d.ts +1 -1
  246. package/lib/hooks/useRef.js +3 -0
  247. package/lib/hooks/useScreencapture.d.ts +2 -1
  248. package/lib/hooks/useScreencapture.js +0 -4
  249. package/lib/hooks/useToast.js +0 -4
  250. package/lib/hooks/useUser.js +42 -0
  251. package/lib/hooks/useVisibilityObserver.d.ts +1 -1
  252. package/lib/index.d.ts +4 -1
  253. package/lib/index.js +3 -1
  254. package/lib/mocks/components/FlashMock.d.ts +1 -1
  255. package/lib/mocks/views/ActionMenuMock.d.ts +1 -1
  256. package/lib/mocks/views/ChartMock.d.ts +1 -1
  257. package/lib/mocks/views/DashboardMock.d.ts +1 -1
  258. package/lib/mocks/views/FormMock.d.ts +1 -1
  259. package/lib/mocks/views/TableMock.d.ts +1 -1
  260. package/lib/mocks/views/WipMock.d.ts +1 -1
  261. package/lib/models/Credits.d.ts +16 -0
  262. package/lib/models/Credits.js +22 -0
  263. package/lib/models/McpAuditEvent.d.ts +52 -0
  264. package/lib/models/McpAuditEvent.js +5 -0
  265. package/lib/models/McpBinding.d.ts +51 -0
  266. package/lib/models/McpBinding.js +5 -0
  267. package/lib/models/McpPolicy.d.ts +77 -0
  268. package/lib/models/McpPolicy.js +5 -0
  269. package/lib/models/McpTask.d.ts +94 -0
  270. package/lib/models/McpTask.js +7 -0
  271. package/lib/models/StartedBy.d.ts +57 -0
  272. package/lib/models/StartedBy.js +81 -0
  273. package/lib/models/UserDTO.js +4 -2
  274. package/lib/models/contents/__fixtures__/solr-codec.json +57 -0
  275. package/lib/models/contents/__fixtures__/v1-contracts.json +66 -0
  276. package/lib/models/contents/fieldCase.d.ts +8 -0
  277. package/lib/models/contents/fieldCase.js +37 -0
  278. package/lib/models/contents/index.d.ts +2 -0
  279. package/lib/models/contents/index.js +6 -0
  280. package/lib/models/contents/permissions.d.ts +16 -0
  281. package/lib/models/contents/permissions.js +34 -0
  282. package/lib/models/index.d.ts +5 -1
  283. package/lib/models/index.js +5 -1
  284. package/lib/state/substates/CoreState.d.ts +15 -7
  285. package/lib/state/substates/CoreState.js +18 -14
  286. package/lib/state/substates/IAMState.d.ts +1 -1
  287. package/lib/state/substates/IAMState.js +5 -5
  288. package/lib/state/substates/ProfileState.js +0 -4
  289. package/lib/state/substates/index.d.ts +0 -1
  290. package/lib/state/substates/index.js +0 -1
  291. package/lib/utils/Jwt.d.ts +26 -0
  292. package/lib/utils/Jwt.js +37 -0
  293. package/lib/utils/WithSuspense.d.ts +1 -1
  294. package/lib/views/api-keys/APIKeyEdit.d.ts +1 -1
  295. package/lib/views/api-keys/APIKeyNew.d.ts +1 -1
  296. package/lib/views/api-keys/APIKeys.d.ts +1 -1
  297. package/lib/views/api-keys/APIKeys.js +30 -4
  298. package/lib/views/api-keys/APIKeysStandalone.d.ts +5 -1
  299. package/lib/views/api-keys/APIKeysStandalone.js +2 -2
  300. package/lib/views/datasources/DatasourceDetail.d.ts +12 -5
  301. package/lib/views/datasources/DatasourceDetail.js +80 -110
  302. package/lib/views/datasources/DatasourceNew.d.ts +14 -8
  303. package/lib/views/datasources/DatasourceNew.js +129 -118
  304. package/lib/views/datasources/Datasources.d.ts +39 -7
  305. package/lib/views/datasources/Datasources.js +95 -40
  306. package/lib/views/datasources/DatasourcesMock.d.ts +3 -0
  307. package/lib/views/datasources/DatasourcesMock.js +57 -0
  308. package/lib/views/iam/SignInSimple.d.ts +12 -0
  309. package/lib/views/iam/SignInSimple.js +4 -4
  310. package/lib/views/index.d.ts +1 -0
  311. package/lib/views/index.js +1 -0
  312. package/lib/views/mcp/AlertDestinations.d.ts +34 -0
  313. package/lib/views/mcp/AlertDestinations.js +75 -0
  314. package/lib/views/mcp/AlertRules.d.ts +32 -0
  315. package/lib/views/mcp/AlertRules.js +245 -0
  316. package/lib/views/mcp/AuditLog.d.ts +42 -0
  317. package/lib/views/mcp/AuditLog.js +144 -0
  318. package/lib/views/mcp/ConnectedAgents.d.ts +34 -0
  319. package/lib/views/mcp/ConnectedAgents.js +100 -0
  320. package/lib/views/mcp/EnterpriseConsole.d.ts +74 -0
  321. package/lib/views/mcp/EnterpriseConsole.js +173 -0
  322. package/lib/views/mcp/McpDashboard.d.ts +50 -0
  323. package/lib/views/mcp/McpDashboard.js +347 -0
  324. package/lib/views/mcp/McpHome.d.ts +92 -0
  325. package/lib/views/mcp/McpHome.js +153 -0
  326. package/lib/views/mcp/McpObservability.d.ts +50 -0
  327. package/lib/views/mcp/McpObservability.js +150 -0
  328. package/lib/views/mcp/OrganizationPolicy.d.ts +45 -0
  329. package/lib/views/mcp/OrganizationPolicy.js +107 -0
  330. package/lib/views/mcp/OrganizationUsage.d.ts +69 -0
  331. package/lib/views/mcp/OrganizationUsage.js +113 -0
  332. package/lib/views/mcp/PersonalPolicy.d.ts +54 -0
  333. package/lib/views/mcp/PersonalPolicy.js +125 -0
  334. package/lib/views/mcp/Policies.d.ts +53 -0
  335. package/lib/views/mcp/Policies.js +210 -0
  336. package/lib/views/mcp/PolicyForm.d.ts +67 -0
  337. package/lib/views/mcp/PolicyForm.js +91 -0
  338. package/lib/views/mcp/PolicyHistory.d.ts +45 -0
  339. package/lib/views/mcp/PolicyHistory.js +62 -0
  340. package/lib/views/mcp/ServiceAgents.d.ts +46 -0
  341. package/lib/views/mcp/ServiceAgents.js +194 -0
  342. package/lib/views/mcp/TeamPolicies.d.ts +33 -0
  343. package/lib/views/mcp/TeamPolicies.js +98 -0
  344. package/lib/views/mcp/format.d.ts +25 -0
  345. package/lib/views/mcp/format.js +77 -0
  346. package/lib/views/mcp/index.d.ts +29 -0
  347. package/lib/views/mcp/index.js +37 -0
  348. package/lib/views/mcp/types.d.ts +66 -0
  349. package/lib/views/mcp/types.js +5 -0
  350. package/lib/views/secrets/SecretEdit.d.ts +5 -1
  351. package/lib/views/secrets/SecretEdit.js +2 -2
  352. package/lib/views/secrets/SecretNew.d.ts +11 -1
  353. package/lib/views/secrets/SecretNew.js +2 -2
  354. package/lib/views/secrets/Secrets.d.ts +12 -1
  355. package/lib/views/secrets/Secrets.js +2 -2
  356. package/package.json +28 -24
  357. package/scripts/generate-contents-types.py +169 -0
  358. package/scripts/generate-mcp-types.py +233 -0
  359. package/lib/api/iam/datasources.d.ts +0 -86
  360. package/lib/api/iam/datasources.js +0 -185
  361. package/lib/components/toolbars/index.d.ts +0 -1
  362. package/lib/models/Datasource.d.ts +0 -181
  363. package/lib/models/Datasource.js +0 -154
  364. package/lib/state/substates/DatasourceState.d.ts +0 -11
  365. package/lib/state/substates/DatasourceState.js +0 -16
  366. /package/lib/{components/toolbars/index.js → api/contents/generated.js} +0 -0
@@ -1,8 +1,4 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- /*
3
- * Copyright (c) 2023-2025 Datalayer, Inc.
4
- * Distributed under the terms of the Modified BSD License.
5
- */
6
2
  import { useCallback, useState } from 'react';
7
3
  import { IconButton, Spinner } from '@primer/react';
8
4
  /**
@@ -1,3 +1,4 @@
1
+ import type { JSX } from 'react';
1
2
  import type { VariantType } from './VariantType';
2
3
  interface IUploadBaseButtonProps {
3
4
  /**
@@ -1,8 +1,4 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
- /*
3
- * Copyright (c) 2023-2025 Datalayer, Inc.
4
- * Distributed under the terms of the Modified BSD License.
5
- */
6
2
  import { useCallback, useMemo, useRef } from 'react';
7
3
  import { Button, IconButton } from '@primer/react';
8
4
  import { UploadIcon } from '@primer/octicons-react';
@@ -50,4 +50,4 @@ export type StripeCheckoutProps = {
50
50
  /**
51
51
  * Stripe checkout.
52
52
  */
53
- export declare function StripeCheckout({ checkoutPortal, appearance, accountUid, showStatusUsageSummary, onCheckoutSuccess, }: StripeCheckoutProps): import("react/jsx-runtime").JSX.Element;
53
+ export declare function StripeCheckout({ checkoutPortal, appearance, accountUid, showStatusUsageSummary, onCheckoutSuccess, }: StripeCheckoutProps): import("react").JSX.Element;
@@ -1,3 +1,23 @@
1
+ /**
2
+ * The faces on a shared document: who is here now, and who belongs here.
3
+ *
4
+ * One avatar stack for every surface that names collaborators — the cards of
5
+ * the home page, the headers of the notebook and document editors, in the
6
+ * web application and in JupyterLab alike. Two sources feed it, both
7
+ * optional and freely combined:
8
+ *
9
+ * - `awareness`: the presence channel of a collaborative editor. The stack
10
+ * follows it live — people appear as they join and leave as they go.
11
+ * - `collaborators`: what is known without a room, the owner and the granted
12
+ * of an item. They fill the stack when there is no presence, and complete
13
+ * it when there is.
14
+ *
15
+ * Every face uses the shared principal avatar rules: a selected icon wins,
16
+ * then a connected-account picture, then the standard personal fallback.
17
+ *
18
+ * @module components/collaboration/LiveEditorCollaborators
19
+ */
20
+ import type { JSX } from 'react';
1
21
  export type LiveCollaborator = {
2
22
  /** Stable identity — a user uid, or the awareness client id. */
3
23
  id: string;
@@ -6,6 +26,10 @@ export type LiveCollaborator = {
6
26
  avatarIcon?: string;
7
27
  /** Cursor color of the presence, worn by the initials disc. */
8
28
  color?: string;
29
+ /** The platform uid, when the face is a real account — for its profile. */
30
+ uid?: string;
31
+ /** The account handle, when known — the address of the profile page. */
32
+ handle?: string;
9
33
  };
10
34
  /**
11
35
  * The slice of a Yjs-style awareness this component reads. Structural, so
@@ -26,6 +50,13 @@ export type LiveEditorCollaboratorsProps = {
26
50
  size?: number;
27
51
  /** How many faces at most; the stack keeps the first ones. */
28
52
  max?: number;
53
+ /**
54
+ * Show a face's profile some other way than through the router of this
55
+ * subtree — for the editors embedded under a router of their own, which hand
56
+ * the route to the view that has the routes. See
57
+ * {@link PrincipalDetailsOverlayProps.onNavigate}.
58
+ */
59
+ onNavigate?: (path: string) => void;
29
60
  };
30
61
  export declare function LiveEditorCollaborators(props: LiveEditorCollaboratorsProps): JSX.Element | null;
31
62
  export default LiveEditorCollaborators;
@@ -1,54 +1,68 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- /*
3
- * Copyright (c) 2023-2025 Datalayer, Inc.
4
- * Distributed under the terms of the Modified BSD License.
5
- */
6
- /*
7
- * Copyright (c) 2023-2026 Datalayer, Inc.
8
- * Distributed under the terms of the Modified BSD License.
9
- */
10
- /**
11
- * The faces on a shared document: who is here now, and who belongs here.
12
- *
13
- * One avatar stack for every surface that names collaborators — the cards of
14
- * the home page, the headers of the notebook and document editors, in the
15
- * web application and in JupyterLab alike. Two sources feed it, both
16
- * optional and freely combined:
17
- *
18
- * - `awareness`: the presence channel of a collaborative editor. The stack
19
- * follows it live — people appear as they join and leave as they go.
20
- * - `collaborators`: what is known without a room, the owner and the granted
21
- * of an item. They fill the stack when there is no presence, and complete
22
- * it when there is.
23
- *
24
- * Every face uses the shared principal avatar rules: a selected icon wins,
25
- * then a connected-account picture, then the standard personal fallback.
26
- *
27
- * @module components/collaboration/LiveEditorCollaborators
28
- */
29
2
  import { useEffect, useMemo, useState } from 'react';
30
3
  import { AvatarStack } from '@primer/react';
31
4
  import { PrincipalAvatar } from '../principal/PrincipalAvatar.js';
5
+ import { PrincipalHoverCard } from '../principal/PrincipalHoverCard.js';
32
6
  /** The `user` field of an awareness state, in its several spellings. */
33
7
  function collaboratorOfState(clientId, state) {
34
8
  const user = state?.user;
35
9
  if (!user) {
36
10
  return undefined;
37
11
  }
12
+ // Not a person: the presence of the collaboration service itself — the
13
+ // spacer joins its own rooms, wearing an `agent` field.
14
+ if (user.agent) {
15
+ return undefined;
16
+ }
38
17
  const name = user.display_name || user.displayName || user.name || user.username || '';
39
18
  if (!name) {
40
19
  return undefined;
41
20
  }
21
+ // Nobody either: the seed identity of a Jupyter Server that does not
22
+ // authenticate its users — "Anonymous Hegemone" and kin. A face for it
23
+ // would be one avatar too many, wearing the default fallback, next to the
24
+ // real identity written over it a moment later.
25
+ if (user.anonymous === true || /^anonymous(\s|$)/i.test(name)) {
26
+ return undefined;
27
+ }
28
+ const uid = user.uid ?? user.id ?? undefined;
29
+ // The room writes the uid into `username` as often as it writes a handle;
30
+ // only take it for the handle when it is not just the uid under another
31
+ // name, or the profile link would carry a uid where a handle belongs.
32
+ const username = user.username && String(user.username) !== String(uid ?? '')
33
+ ? user.username
34
+ : undefined;
42
35
  return {
43
- id: String(user.uid ?? user.id ?? user.username ?? clientId),
36
+ id: String(uid ?? user.username ?? clientId),
44
37
  name,
45
38
  avatarUrl: user.avatar_url || user.avatarUrl || undefined,
46
39
  avatarIcon: user.avatar_icon_s || user.avatarIcon || undefined,
47
- color: user.color || undefined
40
+ color: user.color || undefined,
41
+ uid: uid ? String(uid) : undefined,
42
+ handle: user.handle || username || undefined,
43
+ };
44
+ }
45
+ /**
46
+ * Fold a second sighting of a person into the first, keeping the fuller of
47
+ * the two. The name that wins is the one belonging to the record that also
48
+ * carries a uid — the identity a profile is named by, "Eric Charles" over
49
+ * the room's cursor label "eric" — and every other field is taken wherever it
50
+ * is present. The cursor color of the live presence, seen first, is kept.
51
+ */
52
+ function mergeCollaborators(known, incoming) {
53
+ const incomingNameWins = !!incoming.uid && !known.uid && incoming.name.trim().length > 0;
54
+ return {
55
+ id: known.id,
56
+ name: incomingNameWins ? incoming.name : known.name,
57
+ uid: known.uid || incoming.uid,
58
+ handle: known.handle || incoming.handle,
59
+ avatarUrl: known.avatarUrl || incoming.avatarUrl,
60
+ avatarIcon: known.avatarIcon || incoming.avatarIcon,
61
+ color: known.color || incoming.color,
48
62
  };
49
63
  }
50
64
  export function LiveEditorCollaborators(props) {
51
- const { awareness, collaborators = [], max = 5, size = 24 } = props;
65
+ const { awareness, collaborators = [], max = 5, size = 24, onNavigate, } = props;
52
66
  const [present, setPresent] = useState([]);
53
67
  useEffect(() => {
54
68
  if (!awareness) {
@@ -73,31 +87,57 @@ export function LiveEditorCollaborators(props) {
73
87
  };
74
88
  }, [awareness]);
75
89
  const faces = useMemo(() => {
76
- // Who is here leads; who merely belongs completes. Folded by id and
77
- // then by name: the same person often arrives twice — once under their
78
- // platform uid, once under the identity the room gave them.
79
- const merged = new Map();
80
- const byName = new Map();
81
- for (const collaborator of [...present, ...collaborators]) {
82
- const nameKey = collaborator.name.trim().toLowerCase();
83
- const key = merged.has(collaborator.id)
84
- ? collaborator.id
85
- : (byName.get(nameKey) ?? collaborator.id);
86
- const known = merged.get(key);
87
- if (!known) {
88
- merged.set(key, collaborator);
89
- byName.set(nameKey, key);
90
+ // Who is here leads; who merely belongs completes. One person, though,
91
+ // arrives more than once and never quite the same: the room knows them by
92
+ // their handle and a cursor name ("eric"), the grants by their uid and
93
+ // their full name ("Eric Charles"). Neither their id nor their name is
94
+ // shared, so a fold on either alone leaves two faces of one person — and
95
+ // two faces means two hover cards over the one avatar. So they are folded
96
+ // on ANY identity they have in common — uid, handle, name, or id — and the
97
+ // fuller of the two records is the one that survives.
98
+ const list = [];
99
+ const indexByToken = new Map();
100
+ const tokensOf = (person) => {
101
+ const tokens = [];
102
+ if (person.uid) {
103
+ tokens.push(`uid:${person.uid}`);
104
+ }
105
+ if (person.handle) {
106
+ tokens.push(`handle:${person.handle.trim().toLowerCase()}`);
107
+ }
108
+ const nameKey = person.name.trim().toLowerCase();
109
+ if (nameKey) {
110
+ tokens.push(`name:${nameKey}`);
111
+ }
112
+ tokens.push(`id:${person.id}`);
113
+ return tokens;
114
+ };
115
+ for (const person of [...present, ...collaborators]) {
116
+ const tokens = tokensOf(person);
117
+ let index = -1;
118
+ for (const token of tokens) {
119
+ const found = indexByToken.get(token);
120
+ if (found !== undefined) {
121
+ index = found;
122
+ break;
123
+ }
124
+ }
125
+ if (index === -1) {
126
+ index = list.length;
127
+ list.push({ ...person });
90
128
  }
91
- else if ((!known.avatarIcon && collaborator.avatarIcon) ||
92
- (!known.avatarUrl && collaborator.avatarUrl)) {
93
- merged.set(key, {
94
- ...known,
95
- avatarIcon: known.avatarIcon || collaborator.avatarIcon,
96
- avatarUrl: known.avatarUrl || collaborator.avatarUrl,
97
- });
129
+ else {
130
+ list[index] = mergeCollaborators(list[index], person);
131
+ }
132
+ // Every identity this person carries now points at their one face, so
133
+ // the next record that shares any of them folds in rather than doubling.
134
+ for (const token of [...tokens, ...tokensOf(list[index])]) {
135
+ if (!indexByToken.has(token)) {
136
+ indexByToken.set(token, index);
137
+ }
98
138
  }
99
139
  }
100
- return Array.from(merged.values()).slice(0, max);
140
+ return list.slice(0, max);
101
141
  }, [collaborators, max, present]);
102
142
  if (!faces.length) {
103
143
  return null;
@@ -112,6 +152,11 @@ export function LiveEditorCollaborators(props) {
112
152
  * opens back over the space it came from — empty by construction, since
113
153
  * the stack was collapsed there a moment before.
114
154
  */
115
- _jsx(AvatarStack, { alignRight: true, size: size, children: faces.map(face => (_jsx(PrincipalAvatar, { kind: "personal", size: size, alt: face.name, avatarUrl: face.avatarUrl, avatarIcon: face.avatarIcon, square: false }, face.id))) }));
155
+ _jsx(AvatarStack, { alignRight: true, size: size, children: faces.map(face => (_jsx(PrincipalHoverCard
156
+ // A key that does not flip as the room's awareness churns: the same
157
+ // person arrives now under their uid, now under a client id, and a
158
+ // key that followed that would unmount the hover card mid-open and
159
+ // leak its overlay. Their identity, not their arrival, names them.
160
+ , { kind: "personal", uid: face.uid, handle: face.handle, displayName: face.name, name: face.name, avatarUrl: face.avatarUrl, avatarIcon: face.avatarIcon, onNavigate: onNavigate, children: _jsx(PrincipalAvatar, { kind: "personal", size: size, alt: face.name, avatarUrl: face.avatarUrl, avatarIcon: face.avatarIcon, square: false }) }, face.uid || face.handle || face.name.trim().toLowerCase()))) }));
116
161
  }
117
162
  export default LiveEditorCollaborators;
@@ -2,8 +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) 2023-2026 Datalayer, Inc.
7
- * Distributed under the terms of the Modified BSD License.
8
- */
9
5
  export * from './LiveEditorCollaborators.js';
@@ -1,2 +1,2 @@
1
- export declare const ConfettiSuccess: () => import("react/jsx-runtime").JSX.Element;
1
+ export declare const ConfettiSuccess: () => import("react").JSX.Element;
2
2
  export default ConfettiSuccess;
@@ -0,0 +1,8 @@
1
+ import type { CatalogSource } from '../../api/contents';
2
+ export type ContentSourceCardProps = {
3
+ item: CatalogSource;
4
+ onOpen?: (sourceUid: string) => void;
5
+ };
6
+ /** Compact, host-neutral catalog row shared by Datalayer clients. */
7
+ export declare const ContentSourceCard: ({ item, onOpen }: ContentSourceCardProps) => import("react").JSX.Element;
8
+ export default ContentSourceCard;
@@ -0,0 +1,23 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /*
3
+ * Copyright (c) 2023-2025 Datalayer, Inc.
4
+ * Distributed under the terms of the Modified BSD License.
5
+ */
6
+ import { Label, Text } from '@primer/react';
7
+ import { Box } from '@datalayer/primer-addons';
8
+ import { contentSourceEffectiveRole, contentSourceLabel, } from '../../models/contents/index.js';
9
+ /** Compact, host-neutral catalog row shared by Datalayer clients. */
10
+ export const ContentSourceCard = ({ item, onOpen }) => (_jsx(Box, { as: "li", onClick: () => onOpen?.(item.source.uid), sx: {
11
+ p: 3,
12
+ borderBottom: '1px solid',
13
+ borderColor: 'border.muted',
14
+ cursor: onOpen ? 'pointer' : 'default',
15
+ ':last-child': { borderBottom: 0 },
16
+ ':hover': onOpen ? { bg: 'canvas.subtle' } : undefined,
17
+ }, children: _jsxs(Box, { sx: { display: 'flex', justifyContent: 'space-between', gap: 3 }, children: [_jsxs(Box, { sx: { minWidth: 0 }, children: [_jsx(Text, { sx: { fontWeight: 600 }, children: item.source.name }), _jsx(Text, { as: "p", sx: { color: 'fg.muted', fontSize: 0, m: 0, mt: 1 }, children: item.source.description || contentSourceLabel(item.source.kind) }), _jsx(Text, { as: "p", sx: { color: 'fg.subtle', fontSize: 0, m: 0, mt: 1 }, children: item.source.uid })] }), _jsxs(Box, { sx: {
18
+ display: 'flex',
19
+ alignItems: 'center',
20
+ gap: 2,
21
+ flexShrink: 0,
22
+ }, children: [_jsx(Label, { children: contentSourceLabel(item.source.kind) }), _jsx(Label, { variant: item.source.status === 'ready' ? 'success' : 'secondary', children: item.source.status }), _jsx(Label, { variant: "accent", children: contentSourceEffectiveRole(item) })] })] }) }));
23
+ export default ContentSourceCard;
@@ -0,0 +1,10 @@
1
+ import type { ContentObject } from '../../api/contents';
2
+ export type HomeFolderObjectsBrowserProps = {
3
+ prefix?: string;
4
+ selectedObjectUids?: readonly string[];
5
+ onSelectedObjectsChange?: (objects: ContentObject[]) => void;
6
+ selectionDisabled?: boolean;
7
+ };
8
+ /** Browser for the server-managed Home Folder metadata and version history. */
9
+ export declare const HomeFolderObjectsBrowser: ({ prefix, selectedObjectUids, onSelectedObjectsChange, selectionDisabled }: HomeFolderObjectsBrowserProps) => import("react").JSX.Element;
10
+ export default HomeFolderObjectsBrowser;
@@ -0,0 +1,148 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ /*
3
+ * Copyright (c) 2023-2025 Datalayer, Inc.
4
+ * Distributed under the terms of the Modified BSD License.
5
+ */
6
+ import { useRef, useState } from 'react';
7
+ import { Button, Checkbox, Heading, Label, ProgressBar, Spinner, Text, } from '@primer/react';
8
+ import { DownloadIcon, FileIcon, HistoryIcon, SyncIcon, TrashIcon, UploadIcon, } from '@primer/octicons-react';
9
+ import { Box } from '@datalayer/primer-addons';
10
+ import { useDeleteHomeFolderObject, useDownloadHomeFolderObject, useRestoreHomeFolderObject, useUploadHomeFolderFile, useHomeFolderObjects, useHomeFolderObjectVersions, } from '../../hooks/useContents.js';
11
+ const formatBytes = (bytes) => {
12
+ if (bytes < 1024)
13
+ return `${bytes} B`;
14
+ if (bytes < 1024 ** 2)
15
+ return `${(bytes / 1024).toFixed(1)} KB`;
16
+ if (bytes < 1024 ** 3)
17
+ return `${(bytes / 1024 ** 2).toFixed(1)} MB`;
18
+ return `${(bytes / 1024 ** 3).toFixed(1)} GB`;
19
+ };
20
+ const mutationKey = (action, uid) => {
21
+ const random = typeof crypto !== 'undefined' && typeof crypto.randomUUID === 'function'
22
+ ? crypto.randomUUID()
23
+ : `${Date.now()}-${Math.random().toString(36).slice(2)}`;
24
+ return `${action}:${uid}:${random}`;
25
+ };
26
+ /** Browser for the server-managed Home Folder metadata and version history. */
27
+ export const HomeFolderObjectsBrowser = ({ prefix, selectedObjectUids = [], onSelectedObjectsChange, selectionDisabled = false }) => {
28
+ const objects = useHomeFolderObjects({ prefix, limit: 100 });
29
+ const [selected, setSelected] = useState();
30
+ const [uploadProgress, setUploadProgress] = useState();
31
+ const [failedUpload, setFailedUpload] = useState();
32
+ const fileInput = useRef(null);
33
+ const versions = useHomeFolderObjectVersions(selected?.uid);
34
+ const deleteObject = useDeleteHomeFolderObject();
35
+ const restoreObject = useRestoreHomeFolderObject();
36
+ const uploadObject = useUploadHomeFolderFile();
37
+ const downloadObject = useDownloadHomeFolderObject();
38
+ const selectable = Boolean(onSelectedObjectsChange);
39
+ const toggleSelection = (object) => {
40
+ if (!onSelectedObjectsChange)
41
+ return;
42
+ const selectedUids = new Set(selectedObjectUids);
43
+ selectedUids.has(object.uid) ? selectedUids.delete(object.uid) : selectedUids.add(object.uid);
44
+ onSelectedObjectsChange((objects.data?.items ?? []).filter(item => selectedUids.has(item.uid)));
45
+ };
46
+ const onUpload = (file, overwrite = 'reject') => {
47
+ if (!file)
48
+ return;
49
+ setFailedUpload(undefined);
50
+ setUploadProgress({ uploaded: 0, total: file.size });
51
+ uploadObject.mutate({
52
+ path: prefix ? `${prefix.replace(/\/$/, '')}/${file.name}` : file.name,
53
+ content: file,
54
+ mediaType: file.type || 'application/octet-stream',
55
+ overwrite,
56
+ idempotencyKey: mutationKey('upload', file.name),
57
+ onProgress: progress => setUploadProgress({
58
+ uploaded: progress.uploadedBytes,
59
+ total: progress.totalBytes,
60
+ }),
61
+ }, {
62
+ onError: () => setFailedUpload(file),
63
+ onSettled: () => setUploadProgress(undefined),
64
+ });
65
+ };
66
+ const onDownload = (object) => {
67
+ downloadObject.mutate({ objectUid: object.uid }, {
68
+ onSuccess: response => {
69
+ const url = URL.createObjectURL(new Blob([response.data], { type: object.mediaType }));
70
+ const anchor = document.createElement('a');
71
+ anchor.href = url;
72
+ anchor.download = object.path.split('/').pop() || 'download';
73
+ anchor.click();
74
+ URL.revokeObjectURL(url);
75
+ },
76
+ });
77
+ };
78
+ const onDelete = (object) => {
79
+ if (typeof window !== 'undefined' &&
80
+ !window.confirm(`Delete ${object.path}? You can restore an earlier version.`)) {
81
+ return;
82
+ }
83
+ deleteObject.mutate({
84
+ objectUid: object.uid,
85
+ idempotencyKey: mutationKey('delete', object.uid),
86
+ });
87
+ };
88
+ if (objects.isPending) {
89
+ return (_jsx(Box, { sx: { p: 4, display: 'flex', justifyContent: 'center' }, children: _jsx(Spinner, {}) }));
90
+ }
91
+ if (objects.isError) {
92
+ return (_jsxs(Box, { sx: { p: 3, border: '1px solid', borderColor: 'danger.muted' }, children: [_jsx(Text, { sx: { color: 'danger.fg' }, children: objects.error instanceof Error
93
+ ? objects.error.message
94
+ : 'The Home Folder could not be loaded.' }), _jsx(Button, { sx: { ml: 2 }, onClick: () => objects.refetch(), children: "Retry" })] }));
95
+ }
96
+ return (_jsxs(Box, { children: [_jsxs(Box, { sx: {
97
+ mb: 3,
98
+ display: 'flex',
99
+ alignItems: 'center',
100
+ justifyContent: 'space-between',
101
+ gap: 3,
102
+ }, children: [_jsx(Text, { sx: { color: 'fg.muted' }, children: prefix ? `home-folder:///${prefix}` : 'home-folder:///' }), _jsxs(_Fragment, { children: [_jsx("input", { ref: fileInput, type: "file", hidden: true, onChange: event => {
103
+ onUpload(event.target.files?.[0]);
104
+ event.target.value = '';
105
+ } }), _jsx(Button, { leadingVisual: UploadIcon, disabled: uploadObject.isPending, onClick: () => fileInput.current?.click(), children: "Upload" })] })] }), uploadProgress && (_jsxs(Box, { sx: { mb: 3 }, children: [_jsx(ProgressBar, { progress: uploadProgress.total
106
+ ? (uploadProgress.uploaded / uploadProgress.total) * 100
107
+ : 100, "aria-label": "Upload progress" }), _jsxs(Text, { sx: { color: 'fg.muted', fontSize: 0 }, children: [formatBytes(uploadProgress.uploaded), " of", ' ', formatBytes(uploadProgress.total)] })] })), uploadObject.isError && (_jsxs(Box, { sx: { mb: 3 }, children: [_jsx(Text, { as: "p", sx: { color: 'danger.fg', mb: 2 }, children: uploadObject.error.message }), failedUpload && (_jsxs(Box, { sx: { display: 'flex', gap: 2 }, children: [_jsx(Button, { size: "small", onClick: () => onUpload(failedUpload), children: "Retry" }), _jsx(Button, { size: "small", variant: "primary", onClick: () => onUpload(failedUpload, 'new-version'), children: "Upload as new version" })] }))] })), (objects.data?.items.length ?? 0) === 0 ? (_jsxs(Box, { sx: {
108
+ p: 4,
109
+ textAlign: 'center',
110
+ border: '1px dashed',
111
+ borderColor: 'border.default',
112
+ borderRadius: 2,
113
+ }, children: [_jsx(FileIcon, { size: 24 }), _jsx(Heading, { as: "h3", sx: { fontSize: 2, mt: 2 }, children: "Your Home Folder is empty" }), _jsx(Text, { as: "p", sx: { color: 'fg.muted', mb: 0 }, children: "Uploaded and transferred files will appear here." })] })) : (_jsxs(Box, { as: "table", sx: {
114
+ width: '100%',
115
+ borderCollapse: 'collapse',
116
+ 'th, td': {
117
+ px: 3,
118
+ py: 2,
119
+ textAlign: 'left',
120
+ borderBottom: '1px solid',
121
+ borderColor: 'border.muted',
122
+ },
123
+ th: { color: 'fg.muted', fontSize: 0, fontWeight: 600 },
124
+ }, children: [_jsx("thead", { children: _jsxs("tr", { children: [selectable && _jsx("th", { "aria-label": "Select" }), _jsx("th", { children: "Path" }), _jsx("th", { children: "Size" }), _jsx("th", { children: "Updated" }), _jsx("th", { "aria-label": "Actions" })] }) }), _jsx("tbody", { children: objects.data?.items.map(object => (_jsxs("tr", { children: [selectable && (_jsx("td", { children: _jsx(Checkbox, { "aria-label": `Select ${object.path}`, checked: selectedObjectUids.includes(object.uid), disabled: selectionDisabled || !object.currentVersionUid, onChange: () => toggleSelection(object) }) })), _jsx("td", { children: _jsxs(Box, { sx: { display: 'flex', alignItems: 'center', gap: 2 }, children: [_jsx(FileIcon, {}), _jsx(Text, { sx: { fontFamily: 'mono' }, children: object.path })] }) }), _jsx("td", { children: formatBytes(object.size) }), _jsx("td", { children: new Date(object.updatedAt).toLocaleString() }), _jsx("td", { children: _jsxs(Box, { sx: { display: 'flex', justifyContent: 'flex-end', gap: 2 }, children: [_jsx(Button, { size: "small", leadingVisual: HistoryIcon, onClick: () => setSelected(object), children: "Versions" }), _jsx(Button, { size: "small", leadingVisual: DownloadIcon, disabled: downloadObject.isPending, onClick: () => onDownload(object), children: "Download" }), _jsx(Button, { size: "small", variant: "danger", leadingVisual: TrashIcon, disabled: deleteObject.isPending, onClick: () => onDelete(object), children: "Delete" })] }) })] }, object.uid))) })] })), selected && (_jsxs(Box, { sx: {
125
+ mt: 3,
126
+ p: 3,
127
+ border: '1px solid',
128
+ borderColor: 'border.default',
129
+ borderRadius: 2,
130
+ }, children: [_jsxs(Box, { sx: { display: 'flex', justifyContent: 'space-between', gap: 2 }, children: [_jsxs(Heading, { as: "h3", sx: { fontSize: 2 }, children: ["Versions of ", selected.path] }), _jsx(Button, { size: "small", onClick: () => setSelected(undefined), children: "Close" })] }), versions.isPending ? (_jsx(Spinner, { size: "small" })) : versions.isError ? (_jsx(Text, { sx: { color: 'danger.fg' }, children: "Version history could not be loaded." })) : (_jsx(Box, { as: "ul", sx: { listStyle: 'none', p: 0, mb: 0 }, children: versions.data?.items.map(version => {
131
+ const isCurrent = version.uid === selected.currentVersionUid;
132
+ return (_jsxs(Box, { as: "li", sx: {
133
+ py: 2,
134
+ display: 'flex',
135
+ alignItems: 'center',
136
+ justifyContent: 'space-between',
137
+ gap: 3,
138
+ borderBottom: '1px solid',
139
+ borderColor: 'border.muted',
140
+ ':last-child': { borderBottom: 0 },
141
+ }, children: [_jsxs(Box, { children: [_jsx(Text, { sx: { fontFamily: 'mono', fontSize: 0 }, children: version.uid }), _jsxs(Text, { as: "p", sx: { color: 'fg.muted', m: 0, fontSize: 0 }, children: [new Date(version.createdAt).toLocaleString(), " \u00B7", ' ', formatBytes(version.size)] })] }), isCurrent ? (_jsx(Label, { variant: "success", children: "Current" })) : version.deleted ? (_jsx(Label, { children: "Deletion marker" })) : (_jsx(Button, { size: "small", leadingVisual: SyncIcon, disabled: restoreObject.isPending, onClick: () => restoreObject.mutate({
142
+ objectUid: selected.uid,
143
+ versionUid: version.uid,
144
+ idempotencyKey: mutationKey('restore', version.uid),
145
+ }), children: "Restore" }))] }, version.uid));
146
+ }) }))] }))] }));
147
+ };
148
+ export default HomeFolderObjectsBrowser;
@@ -0,0 +1,2 @@
1
+ export * from './ContentSourceCard';
2
+ export * from './HomeFolderObjectsBrowser';
@@ -0,0 +1,6 @@
1
+ /*
2
+ * Copyright (c) 2023-2025 Datalayer, Inc.
3
+ * Distributed under the terms of the Modified BSD License.
4
+ */
5
+ export * from './ContentSourceCard.js';
6
+ export * from './HomeFolderObjectsBrowser.js';
@@ -1,2 +1,2 @@
1
- export declare const OrganizationSelect: () => import("react/jsx-runtime").JSX.Element;
1
+ export declare const OrganizationSelect: () => import("react").JSX.Element;
2
2
  export default OrganizationSelect;
@@ -1,5 +1,5 @@
1
1
  type IAvatarSkeletonProps = {
2
2
  size?: number;
3
3
  };
4
- export declare const AvatarSkeleton: (props: IAvatarSkeletonProps) => import("react/jsx-runtime").JSX.Element;
4
+ export declare const AvatarSkeleton: (props: IAvatarSkeletonProps) => import("react").JSX.Element;
5
5
  export default AvatarSkeleton;
@@ -5,5 +5,5 @@ type BusyDotsProps = {
5
5
  ariaLabel?: string;
6
6
  intervalMs?: number;
7
7
  };
8
- export declare function BusyDots({ color, fontSize, ml, ariaLabel, intervalMs, }: BusyDotsProps): import("react/jsx-runtime").JSX.Element;
8
+ export declare function BusyDots({ color, fontSize, ml, ariaLabel, intervalMs, }: BusyDotsProps): import("react").JSX.Element;
9
9
  export default BusyDots;
@@ -7,5 +7,5 @@ type ICenteredSpinnerProps = {
7
7
  message?: string;
8
8
  size?: keyof typeof sizeMap;
9
9
  };
10
- export declare const CenteredSpinner: ({ message, size, }: ICenteredSpinnerProps) => import("react/jsx-runtime").JSX.Element;
10
+ export declare const CenteredSpinner: ({ message, size, }: ICenteredSpinnerProps) => import("react").JSX.Element;
11
11
  export default CenteredSpinner;
@@ -1,4 +1,4 @@
1
1
  export declare const CodePreview: (props: {
2
2
  code: string;
3
- }) => import("react/jsx-runtime").JSX.Element;
3
+ }) => import("react").JSX.Element;
4
4
  export default CodePreview;
@@ -2,9 +2,14 @@ import type { PropsWithChildren, ReactNode } from 'react';
2
2
  type DatalayerBoxProps = {
3
3
  id?: string;
4
4
  title: string;
5
- titleAction?: ReactNode;
6
5
  linkLabel?: string;
7
6
  linkRoute?: string;
7
+ /**
8
+ * What sits next to the title, e.g. the mark that explains the box.
9
+ *
10
+ * The link on the trailing edge leads somewhere; this stays here.
11
+ */
12
+ titleAction?: ReactNode;
8
13
  };
9
- export declare const DatalayerBox: (props: PropsWithChildren<DatalayerBoxProps>) => import("react/jsx-runtime").JSX.Element;
14
+ export declare const DatalayerBox: (props: PropsWithChildren<DatalayerBoxProps>) => import("react").JSX.Element;
10
15
  export default DatalayerBox;
@@ -15,12 +15,12 @@ export const DatalayerBox = (props) => {
15
15
  alignItems: 'center',
16
16
  justifyContent: 'space-between',
17
17
  paddingRight: 4,
18
- }, children: [_jsx(Text, { as: "h2", sx: { borderLeft: '6px solid #28b899', paddingLeft: 2 }, children: title }), (titleAction || (linkRoute && linkLabel)) && (_jsxs(Box, { sx: { display: 'flex', alignItems: 'center', gap: 2 }, children: [titleAction, linkRoute && linkLabel && (_jsxs(Link, { href: "javascript: return false;", onClick: e => navigate(linkRoute), sx: {
19
- display: 'inline-flex',
20
- alignItems: 'center',
21
- gap: 1,
22
- whiteSpace: 'nowrap',
23
- }, children: [linkLabel, _jsx(ArrowRightIcon, {})] }))] }))] }), _jsx(Box, { sx: {
18
+ }, children: [_jsxs(Box, { sx: { display: 'flex', alignItems: 'center', gap: 1 }, children: [_jsx(Text, { as: "h2", sx: { borderLeft: '6px solid #28b899', paddingLeft: 2 }, children: title }), titleAction] }), linkRoute && linkLabel && (_jsxs(Link, { href: "javascript: return false;", onClick: e => navigate(linkRoute), sx: {
19
+ display: 'inline-flex',
20
+ alignItems: 'center',
21
+ gap: 1,
22
+ whiteSpace: 'nowrap',
23
+ }, children: [linkLabel, _jsx(ArrowRightIcon, {})] }))] }), _jsx(Box, { sx: {
24
24
  borderColor: 'border.default',
25
25
  borderStyle: 'solid',
26
26
  borderWidth: '1',
@@ -2,5 +2,5 @@ import { PropsWithChildren } from 'react';
2
2
  type IHorizontalCenterProps = {
3
3
  margin?: string;
4
4
  };
5
- export declare const HorizontalCenter: ({ children, margin, }: PropsWithChildren<IHorizontalCenterProps>) => import("react/jsx-runtime").JSX.Element;
5
+ export declare const HorizontalCenter: ({ children, margin, }: PropsWithChildren<IHorizontalCenterProps>) => import("react").JSX.Element;
6
6
  export default HorizontalCenter;
@@ -1,3 +1,4 @@
1
+ import type { JSX } from 'react';
1
2
  import { JSXElementConstructor, PropsWithChildren } from 'react';
2
3
  import { Dialog } from '@jupyterlab/apputils';
3
4
  import { ReactWidget } from '@jupyterlab/ui-components';
@@ -1,8 +1,4 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- /*
3
- * Copyright (c) 2023-2025 Datalayer, Inc.
4
- * Distributed under the terms of the Modified BSD License.
5
- */
6
2
  import { createElement, useState, } from 'react';
7
3
  import { Dialog } from '@jupyterlab/apputils';
8
4
  import { ReactWidget } from '@jupyterlab/ui-components';
@@ -58,9 +54,7 @@ export class JupyterDialog extends ReactWidget {
58
54
  }
59
55
  _renderBody = (props) => {
60
56
  const pending = this._pendingButtonIndex !== null;
61
- return (_jsx(PrimerDialog.Body, { children: _jsx("div", { "aria-busy": pending, ...(pending ? { inert: '' } : {}), style: pending
62
- ? { pointerEvents: 'none', opacity: 0.6 }
63
- : undefined, children: createElement(this.body, {
57
+ return (_jsx(PrimerDialog.Body, { children: _jsx("div", { "aria-busy": pending, ...(pending ? { inert: '' } : {}), style: pending ? { pointerEvents: 'none', opacity: 0.6 } : undefined, children: createElement(this.body, {
64
58
  ...props,
65
59
  setValue: this.setValue,
66
60
  pending,
@@ -1,3 +1,4 @@
1
+ import type { JSX } from 'react';
1
2
  import type { IMarkdownParser, IRenderMime } from '@jupyterlab/rendermime';
2
3
  /**
3
4
  * {@link Markdown} properties
@@ -1,2 +1,2 @@
1
- export declare const NotebookSkeleton: () => import("react/jsx-runtime").JSX.Element;
1
+ export declare const NotebookSkeleton: () => import("react").JSX.Element;
2
2
  export default NotebookSkeleton;
@@ -1,2 +1,2 @@
1
- export declare const Placeholder: () => import("react/jsx-runtime").JSX.Element;
1
+ export declare const Placeholder: () => import("react").JSX.Element;
2
2
  export default Placeholder;