@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
@@ -0,0 +1,71 @@
1
+ /**
2
+ * The caller's Home Folders as a JupyterLab drive.
3
+ *
4
+ * One implementation of `Contents.IDrive`, so JupyterLab's file browser, the
5
+ * shared `ContentsBrowser` and VS Code's file system provider all read the
6
+ * same listing and write through the same transfer — `uploadHomeFolderFile`,
7
+ * verified, resumable — rather than each carrying an upload of its own.
8
+ *
9
+ * The tree is two levels of one address space: the root names the folders the
10
+ * caller reaches — their own, and one per organization and team — and
11
+ * everything below is a path inside one of them.
12
+ *
13
+ * @module components/storage/HomeFolderDrive
14
+ */
15
+ import type { Contents, ServerConnection } from '@jupyterlab/services';
16
+ import { ISignal } from '@lumino/signaling';
17
+ export type HomeFolderDriveOptions = {
18
+ /** Where the Contents service is reached. */
19
+ contentsUrl: string;
20
+ /** The caller's token; the reachable folders are resolved from it. */
21
+ token: string;
22
+ /** The drive's name in JupyterLab, the prefix before `:` in a path. */
23
+ name?: string;
24
+ };
25
+ /**
26
+ * The Home Folders, as one JupyterLab drive.
27
+ *
28
+ * Reads come from the shared filesystem — what a sandbox wrote as well as what
29
+ * was uploaded. Writes go through the transfer contract: a file the browser
30
+ * hands over in chunks is gathered and sent whole, created, its parts
31
+ * checksummed, then completed; an interrupted upload resumes from the parts
32
+ * the service verified. Checkpoints are the immutable versions the catalog
33
+ * keeps of every object, so there is nothing to create here.
34
+ */
35
+ export declare class HomeFolderDrive implements Contents.IDrive {
36
+ readonly name: string;
37
+ readonly serverSettings: ServerConnection.ISettings;
38
+ private readonly _token;
39
+ private readonly _base;
40
+ private readonly _fileChanged;
41
+ private readonly _pending;
42
+ private _isDisposed;
43
+ constructor(options: HomeFolderDriveOptions);
44
+ get fileChanged(): ISignal<Contents.IDrive, Contents.IChangedArgs>;
45
+ get isDisposed(): boolean;
46
+ dispose(): void;
47
+ get(localPath: string, options?: Contents.IFetchOptions): Promise<Contents.IModel>;
48
+ getDownloadUrl(localPath: string): Promise<string>;
49
+ newUntitled(options?: Contents.ICreateOptions): Promise<Contents.IModel>;
50
+ delete(localPath: string): Promise<void>;
51
+ rename(oldLocalPath: string, newLocalPath: string): Promise<Contents.IModel>;
52
+ /**
53
+ * Upload, through the same transfer the CLI and the objects view use.
54
+ *
55
+ * A file is chunked by the browser — Jupyter's protocol numbers the chunks
56
+ * and marks the last one `-1` — and whole by the transfer contract, so the
57
+ * chunks are gathered and sent when the last one arrives. One idempotency
58
+ * key per file and size, so the retry of an interrupted upload resumes the
59
+ * transfer it started rather than opening a second.
60
+ */
61
+ save(localPath: string, model?: Partial<Contents.IModel>): Promise<Contents.IModel>;
62
+ copy(localPath: string, toLocalDir: string): Promise<Contents.IModel>;
63
+ /** Every version the catalog keeps is a checkpoint already; nothing to create. */
64
+ createCheckpoint(localPath: string): Promise<Contents.ICheckpointModel>;
65
+ listCheckpoints(): Promise<Contents.ICheckpointModel[]>;
66
+ restoreCheckpoint(): Promise<void>;
67
+ deleteCheckpoint(): Promise<void>;
68
+ private _directory;
69
+ private _bytes;
70
+ }
71
+ export default HomeFolderDrive;
@@ -0,0 +1,248 @@
1
+ /*
2
+ * Copyright (c) 2023-2025 Datalayer, Inc.
3
+ * Distributed under the terms of the Modified BSD License.
4
+ */
5
+ import { Signal } from '@lumino/signaling';
6
+ import { deleteHomeFolderObject, listHomeFolderFiles, readHomeFolderFile, statHomeFolderObject, uploadHomeFolderFile, } from '../../api/contents/index.js';
7
+ import { API_BASE_PATHS } from '../../api/constants.js';
8
+ /**
9
+ * A folder that has never been written to has no timestamp: it is created the
10
+ * first time a sandbox mounts it. Jupyter's model wants a date, and an
11
+ * unparseable one throws where it is rendered.
12
+ */
13
+ const EPOCH = new Date(0).toISOString();
14
+ const TEXT_EXTENSIONS = new Set([
15
+ 'txt', 'md', 'py', 'js', 'ts', 'tsx', 'jsx', 'json', 'csv', 'tsv', 'yaml', 'yml',
16
+ 'toml', 'html', 'css', 'xml', 'sh', 'sql', 'r', 'jl', 'rst', 'cfg', 'ini', 'log',
17
+ ]);
18
+ const extension = (path) => (path.split('/').pop() ?? '').split('.').pop()?.toLowerCase() ?? '';
19
+ const basename = (path) => path.split('/').filter(Boolean).pop() ?? '';
20
+ const dirname = (path) => {
21
+ const parts = path.split('/').filter(Boolean);
22
+ parts.pop();
23
+ return parts.join('/');
24
+ };
25
+ const decodeBase64 = (value) => {
26
+ const binary = atob(value);
27
+ const bytes = new Uint8Array(binary.length);
28
+ for (let index = 0; index < binary.length; index += 1) {
29
+ bytes[index] = binary.charCodeAt(index);
30
+ }
31
+ return bytes;
32
+ };
33
+ const encodeBase64 = (bytes) => {
34
+ let binary = '';
35
+ for (let index = 0; index < bytes.byteLength; index += 1) {
36
+ binary += String.fromCharCode(bytes[index]);
37
+ }
38
+ return btoa(binary);
39
+ };
40
+ const joinChunks = (chunks) => {
41
+ const total = chunks.reduce((size, chunk) => size + chunk.byteLength, 0);
42
+ const joined = new Uint8Array(total);
43
+ let offset = 0;
44
+ for (const chunk of chunks) {
45
+ joined.set(chunk, offset);
46
+ offset += chunk.byteLength;
47
+ }
48
+ return joined;
49
+ };
50
+ const fileModel = (entry) => ({
51
+ name: entry.name,
52
+ path: entry.path,
53
+ type: entry.isDirectory ? 'directory' : extension(entry.path) === 'ipynb' ? 'notebook' : 'file',
54
+ writable: true,
55
+ created: entry.modifiedAt || EPOCH,
56
+ last_modified: entry.modifiedAt || EPOCH,
57
+ mimetype: '',
58
+ content: null,
59
+ format: null,
60
+ size: entry.size,
61
+ });
62
+ /**
63
+ * The Home Folders, as one JupyterLab drive.
64
+ *
65
+ * Reads come from the shared filesystem — what a sandbox wrote as well as what
66
+ * was uploaded. Writes go through the transfer contract: a file the browser
67
+ * hands over in chunks is gathered and sent whole, created, its parts
68
+ * checksummed, then completed; an interrupted upload resumes from the parts
69
+ * the service verified. Checkpoints are the immutable versions the catalog
70
+ * keeps of every object, so there is nothing to create here.
71
+ */
72
+ export class HomeFolderDrive {
73
+ name;
74
+ serverSettings;
75
+ _token;
76
+ _base;
77
+ _fileChanged = new Signal(this);
78
+ _pending = new Map();
79
+ _isDisposed = false;
80
+ constructor(options) {
81
+ this.name = options.name ?? 'home-folder';
82
+ this._token = options.token;
83
+ this._base = String(options.contentsUrl).replace(/\/$/, '');
84
+ // The browser reads `appUrl` in one error message and nothing else; the
85
+ // requests themselves carry the token explicitly.
86
+ this.serverSettings = {
87
+ baseUrl: this._base,
88
+ appUrl: `${this._base}${API_BASE_PATHS.CONTENTS}/sources/home-folder/`,
89
+ wsUrl: '',
90
+ token: '',
91
+ appendToken: false,
92
+ init: {},
93
+ };
94
+ }
95
+ get fileChanged() {
96
+ return this._fileChanged;
97
+ }
98
+ get isDisposed() {
99
+ return this._isDisposed;
100
+ }
101
+ dispose() {
102
+ if (this._isDisposed) {
103
+ return;
104
+ }
105
+ this._isDisposed = true;
106
+ Signal.clearData(this);
107
+ }
108
+ async get(localPath, options) {
109
+ const path = localPath.replace(/^\/+/, '');
110
+ if (path === '') {
111
+ return this._directory('');
112
+ }
113
+ // A folder answers the listing; a file does not, and is found in its parent.
114
+ try {
115
+ return await this._directory(path);
116
+ }
117
+ catch {
118
+ // Not a folder: fall through.
119
+ }
120
+ const parent = await listHomeFolderFiles(this._token, dirname(path), this._base);
121
+ const entry = parent.items.find(item => basename(item.path) === basename(path));
122
+ if (!entry || entry.isDirectory) {
123
+ throw new Error(`No file at ${path} in the Home Folder`);
124
+ }
125
+ const model = fileModel(entry);
126
+ if (options?.content === false) {
127
+ return model;
128
+ }
129
+ const { body } = await readHomeFolderFile(this._token, path, {}, this._base);
130
+ const bytes = new Uint8Array(body);
131
+ if (model.type === 'notebook') {
132
+ return { ...model, content: JSON.parse(new TextDecoder().decode(bytes)), format: 'json', mimetype: 'application/x-ipynb+json' };
133
+ }
134
+ if (options?.format === 'base64' || !TEXT_EXTENSIONS.has(extension(path))) {
135
+ return { ...model, content: encodeBase64(bytes), format: 'base64', mimetype: 'application/octet-stream' };
136
+ }
137
+ return { ...model, content: new TextDecoder().decode(bytes), format: 'text', mimetype: 'text/plain' };
138
+ }
139
+ getDownloadUrl(localPath) {
140
+ return Promise.resolve(`${this._base}${API_BASE_PATHS.CONTENTS}/sources/home-folder/files/content?path=${encodeURIComponent(localPath.replace(/^\/+/, ''))}`);
141
+ }
142
+ async newUntitled(options = {}) {
143
+ const type = options.type ?? 'file';
144
+ if (type === 'directory') {
145
+ throw new Error('A folder appears in the Home Folder when a file is saved into it.');
146
+ }
147
+ const parent = (options.path ?? '').replace(/^\/+|\/+$/g, '');
148
+ const name = type === 'notebook' ? 'Untitled.ipynb' : `untitled${options.ext ?? '.txt'}`;
149
+ const path = parent ? `${parent}/${name}` : name;
150
+ const content = type === 'notebook'
151
+ ? JSON.stringify({ cells: [], metadata: {}, nbformat: 4, nbformat_minor: 5 })
152
+ : '';
153
+ return this.save(path, { type, format: 'text', content });
154
+ }
155
+ async delete(localPath) {
156
+ const path = localPath.replace(/^\/+/, '');
157
+ const object = await statHomeFolderObject(this._token, path, this._base);
158
+ await deleteHomeFolderObject(this._token, object.uid, this._base);
159
+ this._fileChanged.emit({ type: 'delete', oldValue: { path }, newValue: null });
160
+ }
161
+ async rename(oldLocalPath, newLocalPath) {
162
+ const current = await this.get(oldLocalPath, { content: true, format: 'base64' });
163
+ const moved = await this.save(newLocalPath, { type: current.type, format: current.format, content: current.content });
164
+ await this.delete(oldLocalPath);
165
+ this._fileChanged.emit({ type: 'rename', oldValue: current, newValue: moved });
166
+ return moved;
167
+ }
168
+ /**
169
+ * Upload, through the same transfer the CLI and the objects view use.
170
+ *
171
+ * A file is chunked by the browser — Jupyter's protocol numbers the chunks
172
+ * and marks the last one `-1` — and whole by the transfer contract, so the
173
+ * chunks are gathered and sent when the last one arrives. One idempotency
174
+ * key per file and size, so the retry of an interrupted upload resumes the
175
+ * transfer it started rather than opening a second.
176
+ */
177
+ async save(localPath, model = {}) {
178
+ const path = localPath.replace(/^\/+/, '');
179
+ if (model.type === 'directory') {
180
+ throw new Error('A folder appears in the Home Folder when a file is saved into it.');
181
+ }
182
+ const bytes = this._bytes(model);
183
+ const chunk = model.chunk;
184
+ if (chunk !== undefined && chunk !== -1) {
185
+ this._pending.set(path, [...(this._pending.get(path) ?? []), bytes]);
186
+ return { ...fileModel({ name: basename(path), path, isDirectory: false, size: 0, modifiedAt: null }), chunk };
187
+ }
188
+ const content = joinChunks([...(this._pending.get(path) ?? []), bytes]);
189
+ this._pending.delete(path);
190
+ const transfer = await uploadHomeFolderFile(this._token, path, content, {
191
+ idempotencyKey: `home-folder-drive:${path}:${content.byteLength}`,
192
+ mediaType: model.mimetype || 'application/octet-stream',
193
+ overwrite: 'new-version',
194
+ }, this._base);
195
+ const saved = fileModel({
196
+ name: basename(path),
197
+ path,
198
+ isDirectory: false,
199
+ size: transfer.expectedSize ?? content.byteLength,
200
+ modifiedAt: transfer.completedAt ?? null,
201
+ });
202
+ this._fileChanged.emit({ type: 'save', oldValue: null, newValue: saved });
203
+ return saved;
204
+ }
205
+ async copy(localPath, toLocalDir) {
206
+ const current = await this.get(localPath, { content: true, format: 'base64' });
207
+ const target = `${toLocalDir.replace(/^\/+|\/+$/g, '')}/${basename(localPath)}`.replace(/^\//, '');
208
+ return this.save(target, { type: current.type, format: current.format, content: current.content });
209
+ }
210
+ /** Every version the catalog keeps is a checkpoint already; nothing to create. */
211
+ createCheckpoint(localPath) {
212
+ return Promise.resolve({ id: `latest:${localPath}`, last_modified: new Date().toISOString() });
213
+ }
214
+ listCheckpoints() {
215
+ return Promise.resolve([]);
216
+ }
217
+ restoreCheckpoint() {
218
+ return Promise.resolve();
219
+ }
220
+ deleteCheckpoint() {
221
+ return Promise.resolve();
222
+ }
223
+ async _directory(path) {
224
+ const listing = await listHomeFolderFiles(this._token, path, this._base);
225
+ return {
226
+ name: basename(path),
227
+ path,
228
+ type: 'directory',
229
+ writable: true,
230
+ created: EPOCH,
231
+ last_modified: EPOCH,
232
+ mimetype: '',
233
+ content: listing.items.map(fileModel),
234
+ format: 'json',
235
+ size: undefined,
236
+ };
237
+ }
238
+ _bytes(model) {
239
+ if (model.content === null || model.content === undefined) {
240
+ return new Uint8Array(0);
241
+ }
242
+ if (typeof model.content !== 'string') {
243
+ return new TextEncoder().encode(JSON.stringify(model.content, null, 1));
244
+ }
245
+ return model.format === 'base64' ? decodeBase64(model.content) : new TextEncoder().encode(model.content);
246
+ }
247
+ }
248
+ export default HomeFolderDrive;
@@ -1,2 +1,4 @@
1
1
  export * from './ContentsBrowser';
2
2
  export * from './ContentsItems';
3
+ export * from './ContentsTable';
4
+ export * from './HomeFolderDrive';
@@ -4,3 +4,5 @@
4
4
  */
5
5
  export * from './ContentsBrowser.js';
6
6
  export * from './ContentsItems.js';
7
+ export * from './ContentsTable.js';
8
+ export * from './HomeFolderDrive.js';
@@ -29,5 +29,5 @@ type Props = {
29
29
  student?: IStudent;
30
30
  studentItem?: IStudentItemStatusData;
31
31
  };
32
- export declare const StudentItemStatus: (props: Props) => import("react/jsx-runtime").JSX.Element;
32
+ export declare const StudentItemStatus: (props: Props) => import("react").JSX.Element;
33
33
  export default StudentItemStatus;
@@ -17,5 +17,5 @@ type Props = {
17
17
  * the meaning of the green (success) / red (failure) / empty (no result yet)
18
18
  * status is discoverable on hover and focus.
19
19
  */
20
- export declare const StudentResultCircle: (props: Props) => import("react/jsx-runtime").JSX.Element;
20
+ export declare const StudentResultCircle: (props: Props) => import("react").JSX.Element;
21
21
  export default StudentResultCircle;
@@ -9,7 +9,7 @@ import '@primer/brand-primitives/lib/design-tokens/css/tokens/functional/compone
9
9
  export declare const SubNavSubMenuVariants: readonly ["dropdown", "anchor"];
10
10
  type SubMenuVariants = (typeof SubNavSubMenuVariants)[number];
11
11
  type SubNavContextType = {
12
- portalRef: RefObject<HTMLDivElement>;
12
+ portalRef: RefObject<HTMLDivElement | null>;
13
13
  };
14
14
  export declare const useSubNavContext: () => SubNavContextType;
15
15
  export type SubNavProps = {
@@ -34,7 +34,7 @@ type SubNavLinkProps = {
34
34
  type SubMenuProps = {
35
35
  variant?: SubMenuVariants;
36
36
  } & React.HTMLAttributes<HTMLUListElement> & BaseProps<HTMLUListElement>;
37
- declare function SubMenu({ children, className, variant, ...props }: SubMenuProps): import("react/jsx-runtime").JSX.Element;
37
+ declare function SubMenu({ children, className, variant, ...props }: SubMenuProps): React.JSX.Element;
38
38
  type SubNavActionProps = {
39
39
  /**
40
40
  * Required path or location for the action button to link to.
@@ -49,7 +49,7 @@ type SubNavActionProps = {
49
49
  */
50
50
  variant?: (typeof ButtonVariants)[number];
51
51
  } & Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, 'href'>;
52
- declare function _SubNavAction({ children, href, variant, size, ...rest }: SubNavActionProps): import("react/jsx-runtime").JSX.Element;
52
+ declare function _SubNavAction({ children, href, variant, size, ...rest }: SubNavActionProps): React.JSX.Element;
53
53
  /**
54
54
  * Use SubNav to display a secondary navigation beneath a primary header.
55
55
  * @see https://primer.style/brand/components/SubNav
@@ -65,9 +65,9 @@ export declare const SubNav: React.NamedExoticComponent<{
65
65
  } & BaseProps<HTMLElement> & {
66
66
  children?: ReactNode | undefined;
67
67
  }> & {
68
- readonly type: ({ id, children, className, "data-testid": testId, fullWidth, hasShadow, }: SubNavProps) => import("react/jsx-runtime").JSX.Element;
68
+ readonly type: ({ id, children, className, "data-testid": testId, fullWidth, hasShadow, }: SubNavProps) => React.JSX.Element;
69
69
  } & {
70
- Heading: ({ href, children, className, "data-testid": testID, ...props }: SubNavHeadingProps) => import("react/jsx-runtime").JSX.Element;
70
+ Heading: ({ href, children, className, "data-testid": testID, ...props }: SubNavHeadingProps) => React.JSX.Element;
71
71
  Link: React.ForwardRefExoticComponent<Omit<SubNavLinkProps, "ref"> & React.RefAttributes<HTMLAnchorElement | HTMLDivElement>>;
72
72
  Action: typeof _SubNavAction;
73
73
  SubMenu: typeof SubMenu;
@@ -106,7 +106,8 @@ const _SubNavRoot = memo(({ id, children, className, 'data-testid': testId, full
106
106
  useEffect(() => {
107
107
  // check if there is an anchored nav in the SubNav.SubMenu child
108
108
  const hasAnchorVariant = childrenArr.some(child => {
109
- if (isValidElement(child) && child.type === SubNavLink) {
109
+ if (isValidElement(child) &&
110
+ child.type === SubNavLink) {
110
111
  const [, subMenu] = child.props.children;
111
112
  if (subMenu?.props?.variant === 'anchor') {
112
113
  return true;
@@ -144,12 +145,15 @@ const _SubNavRoot = memo(({ id, children, className, 'data-testid': testId, full
144
145
  }
145
146
  return acc;
146
147
  }, { heading: undefined, links: [], action: undefined });
147
- const activeLinklabel = typeof activeLink?.props.children === 'string'
148
- ? activeLink.props.children
149
- : activeLink?.props.children[0];
148
+ const activeLinkChildren = activeLink?.props.children;
149
+ const activeLinklabel = typeof activeLinkChildren === 'string'
150
+ ? activeLinkChildren
151
+ : activeLinkChildren?.[0];
150
152
  // needed to prevent rendering of anchor subnav inside the narrow <Button variant="invisible"> element
151
- const MaybeSubNav = activeLink?.props.children?.[1]?.props?.variant === 'anchor' &&
152
- activeLink.props.children?.[1];
153
+ const activeLinkSubMenu = typeof activeLinkChildren === 'string'
154
+ ? undefined
155
+ : activeLinkChildren?.[1];
156
+ const MaybeSubNav = activeLinkSubMenu?.props?.variant === 'anchor' && activeLinkSubMenu;
153
157
  return (_jsx("div", { className: clsx(styles['SubNav__container'], hasAnchoredNav && styles['SubNav__container--with-anchor-nav']), children: _jsx(SubNavProvider, { children: _jsx("nav", { ref: navRef, id: id, className: clsx(styles.SubNav, isOpenAtNarrow && styles['SubNav--open'], hasShadow && styles['SubNav--has-shadow'], fullWidth && styles['SubNav--full-width'], className), "data-testid": testId || testIds.root, children: _jsxs("div", { ref: rootRef, className: styles['SubNav--header-container-outer'], children: [_jsxs("div", { className: styles['SubNav__header-container'], children: [HeadingChild && (_jsx("div", { className: styles['SubNav__heading-container'], children: HeadingChild })), !isLarge && (_jsxs("button", { className: clsx(styles['SubNav__overlay-toggle'], isOpenAtNarrow && styles['SubNav__overlay-toggle--open']), "data-testid": testIds.button, onClick: isOpenAtNarrow ? closeMenuCallback : handleMenuToggle, "aria-expanded": isOpenAtNarrow ? 'true' : 'false', "aria-controls": idForLinkContainer, children: [activeLinklabel && (_jsxs("span", { className: "visually-hidden", children: ["Navigation menu. Current page:", ' '] })), _jsxs("span", { className: clsx(styles['SubNav__overlay-toggle-content'], !activeLinklabel &&
154
158
  styles['SubNav__overlay-toggle-content--end']), children: [activeLinklabel && (_jsx(Text, { as: "span", size: "200", children: activeLinklabel })), isOpenAtNarrow ? (_jsx(ChevronUpIcon, { className: styles['SubNav__overlay-toggle-icon'], size: 24 })) : (_jsx(ChevronDownIcon, { className: styles['SubNav__overlay-toggle-icon'], size: 24 }))] })] })), MaybeSubNav && MaybeSubNav] }), LinkChildren.length && (_jsxs("ul", { ref: overlayRef, id: idForLinkContainer, className: clsx(styles['SubNav__links-overlay'], isOpenAtNarrow && styles['SubNav__links-overlay--open']), "data-testid": testIds.overlay, children: [ActionChild ? (_jsx("li", { className: styles['SubNav__action-container'], children: ActionChild })) : (_jsx("li", { className: styles['SubNav__action-container'] })), LinkChildren, _jsx(ButtonGroup, { buttonSize: "small", children: _jsx(Button, { href: "#", onClick: e => {
155
159
  window.location.assign('https://datalayer.ai');
@@ -251,9 +255,7 @@ function SubMenu({ children, className, variant = 'dropdown', ...props }) {
251
255
  if (isValidElement(child)) {
252
256
  return React.cloneElement(child, {
253
257
  onClick: e => {
254
- if (child.props.onClick) {
255
- child.props.onClick(e);
256
- }
258
+ child.props.onClick?.(e);
257
259
  },
258
260
  });
259
261
  }
@@ -1,5 +1,5 @@
1
1
  type IDataTableProps = {
2
2
  data: Array<any>;
3
3
  };
4
- export declare const DataTable: (props: IDataTableProps) => import("react/jsx-runtime").JSX.Element;
4
+ export declare const DataTable: (props: IDataTableProps) => import("react").JSX.Element;
5
5
  export default DataTable;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { BaseProps } from '@datalayer/primer-addons';
3
3
  export type TextRevealAnimationProps = BaseProps<HTMLSpanElement> & Omit<React.HTMLAttributes<HTMLSpanElement>, 'children'> & {
4
- children: React.ReactChild;
4
+ children: React.ReactElement | string | number;
5
5
  };
6
- export declare function TextRevealAnimation({ children, ...rest }: TextRevealAnimationProps): import("react/jsx-runtime").JSX.Element | null;
6
+ export declare function TextRevealAnimation({ children, ...rest }: TextRevealAnimationProps): React.JSX.Element | null;
@@ -1,4 +1,4 @@
1
1
  export declare const useTextRevealAnimationLines: (text?: string) => {
2
- ref: import("react").RefObject<HTMLElement>;
2
+ ref: import("react").RefObject<HTMLElement | null>;
3
3
  lines: string[] | undefined;
4
4
  };
@@ -1,3 +1,4 @@
1
+ import type { JSX } from 'react';
1
2
  type ILiveRelativeTimeProps = {
2
3
  value?: Date | string | number;
3
4
  refreshIntervalMs?: number;
@@ -1,12 +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
- /*
7
- * Copyright (c) 2023-2026 Datalayer, Inc.
8
- * Distributed under the terms of the Modified BSD License.
9
- */
10
2
  import { useEffect, useMemo, useState } from 'react';
11
3
  import { Tooltip } from '@primer/react';
12
4
  import { formatDateTimeDetails, formatRelativeTime } from '../../utils/index.js';
@@ -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 './LiveRelativeTime.js';
@@ -17,4 +17,4 @@ export type TimelineProps = {
17
17
  * The first item is rendered on the left. Pass items in the desired order
18
18
  * (for example: newest to oldest).
19
19
  */
20
- export declare const Timeline: ({ items, renderTimestamp }: TimelineProps) => import("react/jsx-runtime").JSX.Element | null;
20
+ export declare const Timeline: ({ items, renderTimestamp }: TimelineProps) => import("react").JSX.Element | null;
@@ -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 './Timeline.js';
@@ -1,3 +1,4 @@
1
+ import type { JSX } from 'react';
1
2
  import type { Awareness } from 'y-protocols/awareness';
2
3
  /**
3
4
  * PeersIndicator properties
@@ -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 { useEffect, useState } from 'react';
7
3
  import { AvatarStack } from '@primer/react';
8
4
  import { getRelativeTime } from '../../utils/index.js';
@@ -41,6 +41,10 @@ export type IDatalayerCoreConfig = {
41
41
  * IAM API URL.
42
42
  */
43
43
  iamUrl: string;
44
+ /**
45
+ * Contents API URL.
46
+ */
47
+ contentsUrl: string;
44
48
  /**
45
49
  * Manager API URL.
46
50
  */
@@ -76,25 +80,13 @@ export type IDatalayerCoreConfig = {
76
80
  /**
77
81
  * OTEL (OpenTelemetry) API URL.
78
82
  *
79
- * This is the endpoint runtimes/agents export telemetry to. In the browser
80
- * it is also the default endpoint used to *consume* (query) telemetry, unless
81
- * {@link otelInUrl} is provided.
83
+ * Both directions: the endpoint runtimes and agents export telemetry to, and
84
+ * the endpoint the browser reads it back from. A separate consume URL existed
85
+ * so a local UI could read from a remote service while exporting elsewhere;
86
+ * pointing this at that service does the same thing without two fields that
87
+ * can disagree.
82
88
  */
83
89
  otelUrl: string;
84
- /**
85
- * OTEL (OpenTelemetry) *consume* (read/query) API URL override.
86
- *
87
- * When set, the UI reads telemetry (metrics, traces, logs) from this URL
88
- * instead of {@link otelUrl}. When empty/undefined, {@link otelUrl} is used.
89
- *
90
- * Primary use case: local development. When runtimes run in the cloud and
91
- * export their telemetry to the production OTEL service, a local UI must fetch
92
- * telemetry from production rather than from the local OTEL endpoint. Set this
93
- * to e.g. `https://prod1.datalayer.run` while `otelUrl` stays local.
94
- *
95
- * Fed by the `DATALAYER_OTEL_IN_URL` environment variable at build/deploy time.
96
- */
97
- otelInUrl?: string;
98
90
  /**
99
91
  * Growth API URL.
100
92
  */
@@ -184,6 +176,12 @@ export declare class DatalayerConfiguration {
184
176
  * what each of them falls back to.
185
177
  */
186
178
  export declare const DEFAULT_DATALAYER_SERVICE_URL = "https://prod1.datalayer.run";
179
+ /**
180
+ * Where the Contents service lives when nothing says otherwise.
181
+ *
182
+ * Not the generic default: Contents runs on the runtimes plane, where the NFS that backs the Home Folder and Volumes lives.
183
+ */
184
+ export declare const DEFAULT_DATALAYER_CONTENTS_URL = "https://r1.datalayer.run";
187
185
  export declare const DEFAULT_DATALAYER_CONFIG: Partial<IDatalayerCoreConfig>;
188
186
  /**
189
187
  * Type guard to check if a config object is a valid IDatalayerConfig
@@ -32,8 +32,15 @@ export class DatalayerConfiguration {
32
32
  * what each of them falls back to.
33
33
  */
34
34
  export const DEFAULT_DATALAYER_SERVICE_URL = 'https://prod1.datalayer.run';
35
+ /**
36
+ * Where the Contents service lives when nothing says otherwise.
37
+ *
38
+ * Not the generic default: Contents runs on the runtimes plane, where the NFS that backs the Home Folder and Volumes lives.
39
+ */
40
+ export const DEFAULT_DATALAYER_CONTENTS_URL = 'https://r1.datalayer.run';
35
41
  export const DEFAULT_DATALAYER_CONFIG = {
36
42
  iamUrl: DEFAULT_DATALAYER_SERVICE_URL,
43
+ contentsUrl: DEFAULT_DATALAYER_CONTENTS_URL,
37
44
  credits: 100,
38
45
  cpuEnvironment: 'ai-agents-env',
39
46
  gpuEnvironment: 'ai-env',
@@ -3,6 +3,7 @@ export * from './useBackdrop';
3
3
  export * from './useBackdropJupyterLab';
4
4
  export * from './useCache';
5
5
  export * from './useContainsFocus';
6
+ export * from './useContents';
6
7
  export * from './useDatalayer';
7
8
  export * from './useError';
8
9
  export * from './useExternalScript';
@@ -16,6 +17,7 @@ export * from './useKeyboardShortcuts';
16
17
  export * from './useKeyboardEscape';
17
18
  export * from './useLocation';
18
19
  export * from './useLocationHandles';
20
+ export * from './useMcp';
19
21
  export * from './useNavigate';
20
22
  export * from './useParams';
21
23
  export * from './useOnClickOutside';
@@ -7,6 +7,7 @@ export * from './useBackdrop.js';
7
7
  export * from './useBackdropJupyterLab.js';
8
8
  export * from './useCache.js';
9
9
  export * from './useContainsFocus.js';
10
+ export * from './useContents.js';
10
11
  export * from './useDatalayer.js';
11
12
  // export * from "./useCellOutputshot.js"; // Do not export html2canvas
12
13
  export * from './useError.js';
@@ -21,6 +22,7 @@ export * from './useKeyboardShortcuts.js';
21
22
  export * from './useKeyboardEscape.js';
22
23
  export * from './useLocation.js';
23
24
  export * from './useLocationHandles.js';
25
+ export * from './useMcp.js';
24
26
  export * from './useNavigate.js';
25
27
  export * from './useParams.js';
26
28
  export * from './useOnClickOutside.js';
@@ -1,2 +1,2 @@
1
- export declare const LayoutBackdrop: () => import("react/jsx-runtime").JSX.Element;
1
+ export declare const LayoutBackdrop: () => import("react").JSX.Element;
2
2
  export default LayoutBackdrop;
@@ -1,3 +1,3 @@
1
1
  import '../../../style/screencapture/index.css';
2
- export declare const LayoutScreencapture: () => import("react/jsx-runtime").JSX.Element;
2
+ export declare const LayoutScreencapture: () => import("react").JSX.Element;
3
3
  export default LayoutScreencapture;
@@ -16,7 +16,7 @@ export type IBackdropProviderProps = {
16
16
  disableDarken?: boolean;
17
17
  backdropSurface?: any;
18
18
  };
19
- export declare function BackdropProvider({ children, zIndex, disableDarken, backdropSurface, }: IBackdropProviderProps): import("react/jsx-runtime").JSX.Element;
19
+ export declare function BackdropProvider({ children, zIndex, disableDarken, backdropSurface, }: IBackdropProviderProps): import("react").JSX.Element;
20
20
  export declare namespace BackdropProvider {
21
21
  var propTypes: {
22
22
  children: PropTypes.Requireable<NonNullable<PropTypes.ReactNodeLike>>;