@burdenoff/microfe-cosmicintersection 2026.1110.1 → 2026.1111.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (350) hide show
  1. package/dist/cosmicintersection/CosmicIntersectionRoot.d.ts +0 -1
  2. package/dist/cosmicintersection/CosmicIntersectionRoot.js +1 -2
  3. package/dist/cosmicintersection/CosmicIntersectionRoot.js.map +1 -1
  4. package/dist/cosmicintersection/CosmicIntersectionRoutes.d.ts +0 -1
  5. package/dist/cosmicintersection/CosmicIntersectionRoutes.js +1 -2
  6. package/dist/cosmicintersection/CosmicIntersectionRoutes.js.map +1 -1
  7. package/dist/cosmicintersection/api/cosmicApi.d.ts +0 -1
  8. package/dist/cosmicintersection/api/cosmicApi.js +1 -2
  9. package/dist/cosmicintersection/api/cosmicApi.js.map +1 -1
  10. package/dist/cosmicintersection/api/databricksTransport.d.ts +0 -1
  11. package/dist/cosmicintersection/api/databricksTransport.js +1 -2
  12. package/dist/cosmicintersection/api/databricksTransport.js.map +1 -1
  13. package/dist/cosmicintersection/api/tagsApi.d.ts +0 -1
  14. package/dist/cosmicintersection/api/tagsApi.js +1 -2
  15. package/dist/cosmicintersection/api/tagsApi.js.map +1 -1
  16. package/dist/cosmicintersection/components/ActionMenu.d.ts +0 -1
  17. package/dist/cosmicintersection/components/ActionMenu.js +1 -2
  18. package/dist/cosmicintersection/components/ActionMenu.js.map +1 -1
  19. package/dist/cosmicintersection/components/ActivityFeedPanel.d.ts +0 -1
  20. package/dist/cosmicintersection/components/ActivityFeedPanel.js +27 -25
  21. package/dist/cosmicintersection/components/ActivityFeedPanel.js.map +1 -1
  22. package/dist/cosmicintersection/components/AiRunAttribution.d.ts +0 -1
  23. package/dist/cosmicintersection/components/AiRunAttribution.js +1 -2
  24. package/dist/cosmicintersection/components/AiRunAttribution.js.map +1 -1
  25. package/dist/cosmicintersection/components/DatabricksQueueForm.d.ts +0 -1
  26. package/dist/cosmicintersection/components/DatabricksQueueForm.js +1 -2
  27. package/dist/cosmicintersection/components/DatabricksQueueForm.js.map +1 -1
  28. package/dist/cosmicintersection/components/DatabricksRunPanel.d.ts +0 -1
  29. package/dist/cosmicintersection/components/DatabricksRunPanel.js +1 -2
  30. package/dist/cosmicintersection/components/DatabricksRunPanel.js.map +1 -1
  31. package/dist/cosmicintersection/components/DiscussionPanel.d.ts +0 -1
  32. package/dist/cosmicintersection/components/DiscussionPanel.js +4 -4
  33. package/dist/cosmicintersection/components/DiscussionPanel.js.map +1 -1
  34. package/dist/cosmicintersection/components/EmptyState.d.ts +0 -1
  35. package/dist/cosmicintersection/components/EmptyState.js +1 -2
  36. package/dist/cosmicintersection/components/EmptyState.js.map +1 -1
  37. package/dist/cosmicintersection/components/EntityFormShell.d.ts +0 -1
  38. package/dist/cosmicintersection/components/EntityFormShell.js +1 -2
  39. package/dist/cosmicintersection/components/EntityFormShell.js.map +1 -1
  40. package/dist/cosmicintersection/components/EntityTagsField.d.ts +0 -1
  41. package/dist/cosmicintersection/components/EntityTagsField.js +1 -2
  42. package/dist/cosmicintersection/components/EntityTagsField.js.map +1 -1
  43. package/dist/cosmicintersection/components/ErrorState.d.ts +0 -1
  44. package/dist/cosmicintersection/components/ErrorState.js +1 -2
  45. package/dist/cosmicintersection/components/ErrorState.js.map +1 -1
  46. package/dist/cosmicintersection/components/FacetPanel.d.ts +0 -1
  47. package/dist/cosmicintersection/components/FacetPanel.js +1 -2
  48. package/dist/cosmicintersection/components/FacetPanel.js.map +1 -1
  49. package/dist/cosmicintersection/components/FileUploadField.d.ts +5 -2
  50. package/dist/cosmicintersection/components/FileUploadField.js +80 -76
  51. package/dist/cosmicintersection/components/FileUploadField.js.map +1 -1
  52. package/dist/cosmicintersection/components/LineageGraph.d.ts +0 -1
  53. package/dist/cosmicintersection/components/LineageGraph.js +7 -12
  54. package/dist/cosmicintersection/components/LineageGraph.js.map +1 -1
  55. package/dist/cosmicintersection/components/LoadingState.d.ts +0 -1
  56. package/dist/cosmicintersection/components/LoadingState.js +1 -2
  57. package/dist/cosmicintersection/components/LoadingState.js.map +1 -1
  58. package/dist/cosmicintersection/components/PageLayout.d.ts +0 -1
  59. package/dist/cosmicintersection/components/PageLayout.js +1 -2
  60. package/dist/cosmicintersection/components/PageLayout.js.map +1 -1
  61. package/dist/cosmicintersection/components/Pagination.d.ts +0 -1
  62. package/dist/cosmicintersection/components/Pagination.js +1 -2
  63. package/dist/cosmicintersection/components/Pagination.js.map +1 -1
  64. package/dist/cosmicintersection/components/ReleaseDraftDialog.d.ts +0 -1
  65. package/dist/cosmicintersection/components/ReleaseDraftDialog.js +7 -12
  66. package/dist/cosmicintersection/components/ReleaseDraftDialog.js.map +1 -1
  67. package/dist/cosmicintersection/components/ResultsChart.d.ts +0 -1
  68. package/dist/cosmicintersection/components/ResultsChart.js +4 -8
  69. package/dist/cosmicintersection/components/ResultsChart.js.map +1 -1
  70. package/dist/cosmicintersection/components/RunTriageCard.d.ts +0 -1
  71. package/dist/cosmicintersection/components/RunTriageCard.js +18 -19
  72. package/dist/cosmicintersection/components/RunTriageCard.js.map +1 -1
  73. package/dist/cosmicintersection/components/SafeLink.d.ts +0 -1
  74. package/dist/cosmicintersection/components/SafeLink.js +8 -7
  75. package/dist/cosmicintersection/components/SafeLink.js.map +1 -1
  76. package/dist/cosmicintersection/components/SchemaProposalPanel.d.ts +0 -1
  77. package/dist/cosmicintersection/components/SchemaProposalPanel.js +17 -18
  78. package/dist/cosmicintersection/components/SchemaProposalPanel.js.map +1 -1
  79. package/dist/cosmicintersection/components/ScienceCanvas.d.ts +0 -1
  80. package/dist/cosmicintersection/components/ScienceCanvas.js +226 -233
  81. package/dist/cosmicintersection/components/ScienceCanvas.js.map +1 -1
  82. package/dist/cosmicintersection/components/StatusBadge.d.ts +0 -1
  83. package/dist/cosmicintersection/components/StatusBadge.js +1 -2
  84. package/dist/cosmicintersection/components/StatusBadge.js.map +1 -1
  85. package/dist/cosmicintersection/components/StepDAG.d.ts +0 -1
  86. package/dist/cosmicintersection/components/StepDAG.js +1 -2
  87. package/dist/cosmicintersection/components/StepDAG.js.map +1 -1
  88. package/dist/cosmicintersection/components/WorkspaceTagsPicker.d.ts +0 -1
  89. package/dist/cosmicintersection/components/WorkspaceTagsPicker.js +1 -2
  90. package/dist/cosmicintersection/components/WorkspaceTagsPicker.js.map +1 -1
  91. package/dist/cosmicintersection/components/index.d.ts +0 -1
  92. package/dist/cosmicintersection/components/index.js +14 -14
  93. package/dist/cosmicintersection/context/CosmicIntersectionContext.d.ts +0 -1
  94. package/dist/cosmicintersection/context/CosmicIntersectionContext.js +2 -7
  95. package/dist/cosmicintersection/context/CosmicIntersectionContext.js.map +1 -1
  96. package/dist/cosmicintersection/hooks/useDatabricksExecutions.d.ts +0 -1
  97. package/dist/cosmicintersection/hooks/useDatabricksExecutions.js +18 -19
  98. package/dist/cosmicintersection/hooks/useDatabricksExecutions.js.map +1 -1
  99. package/dist/cosmicintersection/hooks/useDatabricksQueueForm.d.ts +0 -1
  100. package/dist/cosmicintersection/hooks/useDatabricksQueueForm.js +1 -2
  101. package/dist/cosmicintersection/hooks/useDatabricksQueueForm.js.map +1 -1
  102. package/dist/cosmicintersection/hooks/useEntityTagSync.d.ts +0 -1
  103. package/dist/cosmicintersection/hooks/useEntityTagSync.js +29 -25
  104. package/dist/cosmicintersection/hooks/useEntityTagSync.js.map +1 -1
  105. package/dist/cosmicintersection/index.d.ts +0 -1
  106. package/dist/cosmicintersection/lib/assistantAwareDialog.d.ts +0 -1
  107. package/dist/cosmicintersection/lib/assistantAwareDialog.js +1 -2
  108. package/dist/cosmicintersection/lib/assistantAwareDialog.js.map +1 -1
  109. package/dist/cosmicintersection/lib/databricksForm.d.ts +0 -1
  110. package/dist/cosmicintersection/lib/databricksForm.js +1 -2
  111. package/dist/cosmicintersection/lib/databricksForm.js.map +1 -1
  112. package/dist/cosmicintersection/lib/databricksIntent.d.ts +0 -1
  113. package/dist/cosmicintersection/lib/databricksIntent.js +1 -2
  114. package/dist/cosmicintersection/lib/databricksIntent.js.map +1 -1
  115. package/dist/cosmicintersection/lib/databricksPresentation.d.ts +0 -1
  116. package/dist/cosmicintersection/lib/databricksPresentation.js +1 -2
  117. package/dist/cosmicintersection/lib/databricksPresentation.js.map +1 -1
  118. package/dist/cosmicintersection/lib/mutationResult.d.ts +0 -1
  119. package/dist/cosmicintersection/lib/mutationResult.js +1 -2
  120. package/dist/cosmicintersection/lib/mutationResult.js.map +1 -1
  121. package/dist/cosmicintersection/lib/toast.d.ts +0 -1
  122. package/dist/cosmicintersection/lib/toast.js +1 -2
  123. package/dist/cosmicintersection/lib/toast.js.map +1 -1
  124. package/dist/cosmicintersection/lib/uploadAudience.d.ts +4 -0
  125. package/dist/cosmicintersection/lib/uploadAudience.js +17 -0
  126. package/dist/cosmicintersection/lib/uploadAudience.js.map +1 -0
  127. package/dist/cosmicintersection/lib/useSelectedRecord.d.ts +0 -1
  128. package/dist/cosmicintersection/lib/useSelectedRecord.js +1 -2
  129. package/dist/cosmicintersection/lib/useSelectedRecord.js.map +1 -1
  130. package/dist/cosmicintersection/lib/useTrackRecentItem.d.ts +0 -1
  131. package/dist/cosmicintersection/lib/useTrackRecentItem.js +7 -8
  132. package/dist/cosmicintersection/lib/useTrackRecentItem.js.map +1 -1
  133. package/dist/cosmicintersection/lib/visualization.d.ts +0 -1
  134. package/dist/cosmicintersection/lib/visualization.js +2 -3
  135. package/dist/cosmicintersection/lib/visualization.js.map +1 -1
  136. package/dist/cosmicintersection/lib/visualizationSamples.d.ts +0 -1
  137. package/dist/cosmicintersection/pages/access/AccessPage.d.ts +0 -1
  138. package/dist/cosmicintersection/pages/access/AccessPage.js +225 -226
  139. package/dist/cosmicintersection/pages/access/AccessPage.js.map +1 -1
  140. package/dist/cosmicintersection/pages/analyses/AnalysesPage.d.ts +0 -1
  141. package/dist/cosmicintersection/pages/analyses/AnalysesPage.js +260 -260
  142. package/dist/cosmicintersection/pages/analyses/AnalysesPage.js.map +1 -1
  143. package/dist/cosmicintersection/pages/archive/ArchivePage.d.ts +0 -1
  144. package/dist/cosmicintersection/pages/archive/ArchivePage.js +23 -48
  145. package/dist/cosmicintersection/pages/archive/ArchivePage.js.map +1 -1
  146. package/dist/cosmicintersection/pages/collections/CollectionDetailPage.d.ts +0 -1
  147. package/dist/cosmicintersection/pages/collections/CollectionDetailPage.js +32 -33
  148. package/dist/cosmicintersection/pages/collections/CollectionDetailPage.js.map +1 -1
  149. package/dist/cosmicintersection/pages/collections/CollectionFormPage.d.ts +0 -1
  150. package/dist/cosmicintersection/pages/collections/CollectionFormPage.js +17 -18
  151. package/dist/cosmicintersection/pages/collections/CollectionFormPage.js.map +1 -1
  152. package/dist/cosmicintersection/pages/collections/CollectionsPage.d.ts +0 -1
  153. package/dist/cosmicintersection/pages/collections/CollectionsPage.js +20 -21
  154. package/dist/cosmicintersection/pages/collections/CollectionsPage.js.map +1 -1
  155. package/dist/cosmicintersection/pages/dashboard/DashboardPage.d.ts +0 -1
  156. package/dist/cosmicintersection/pages/dashboard/DashboardPage.js +19 -20
  157. package/dist/cosmicintersection/pages/dashboard/DashboardPage.js.map +1 -1
  158. package/dist/cosmicintersection/pages/datasets/DatasetDetailPage.d.ts +0 -1
  159. package/dist/cosmicintersection/pages/datasets/DatasetDetailPage.js +64 -75
  160. package/dist/cosmicintersection/pages/datasets/DatasetDetailPage.js.map +1 -1
  161. package/dist/cosmicintersection/pages/datasets/DatasetFormPage.d.ts +0 -1
  162. package/dist/cosmicintersection/pages/datasets/DatasetFormPage.js +131 -119
  163. package/dist/cosmicintersection/pages/datasets/DatasetFormPage.js.map +1 -1
  164. package/dist/cosmicintersection/pages/datasets/DatasetsPage.d.ts +0 -1
  165. package/dist/cosmicintersection/pages/datasets/DatasetsPage.js +207 -208
  166. package/dist/cosmicintersection/pages/datasets/DatasetsPage.js.map +1 -1
  167. package/dist/cosmicintersection/pages/discovery/DiscoveryPage.d.ts +0 -1
  168. package/dist/cosmicintersection/pages/discovery/DiscoveryPage.js +20 -24
  169. package/dist/cosmicintersection/pages/discovery/DiscoveryPage.js.map +1 -1
  170. package/dist/cosmicintersection/pages/lineage/LineagePage.d.ts +0 -1
  171. package/dist/cosmicintersection/pages/lineage/LineagePage.js +53 -54
  172. package/dist/cosmicintersection/pages/lineage/LineagePage.js.map +1 -1
  173. package/dist/cosmicintersection/pages/notebooks/NotebookDetailPage.d.ts +0 -1
  174. package/dist/cosmicintersection/pages/notebooks/NotebookDetailPage.js +61 -62
  175. package/dist/cosmicintersection/pages/notebooks/NotebookDetailPage.js.map +1 -1
  176. package/dist/cosmicintersection/pages/notebooks/NotebookFormPage.d.ts +0 -1
  177. package/dist/cosmicintersection/pages/notebooks/NotebookFormPage.js +154 -149
  178. package/dist/cosmicintersection/pages/notebooks/NotebookFormPage.js.map +1 -1
  179. package/dist/cosmicintersection/pages/notebooks/NotebooksPage.d.ts +0 -1
  180. package/dist/cosmicintersection/pages/notebooks/NotebooksPage.js +28 -29
  181. package/dist/cosmicintersection/pages/notebooks/NotebooksPage.js.map +1 -1
  182. package/dist/cosmicintersection/pages/pipelines/PipelineDetailPage.d.ts +0 -1
  183. package/dist/cosmicintersection/pages/pipelines/PipelineDetailPage.js +119 -120
  184. package/dist/cosmicintersection/pages/pipelines/PipelineDetailPage.js.map +1 -1
  185. package/dist/cosmicintersection/pages/pipelines/PipelineFormPage.d.ts +0 -1
  186. package/dist/cosmicintersection/pages/pipelines/PipelineFormPage.js +41 -42
  187. package/dist/cosmicintersection/pages/pipelines/PipelineFormPage.js.map +1 -1
  188. package/dist/cosmicintersection/pages/pipelines/PipelinesPage.d.ts +0 -1
  189. package/dist/cosmicintersection/pages/pipelines/PipelinesPage.js +30 -31
  190. package/dist/cosmicintersection/pages/pipelines/PipelinesPage.js.map +1 -1
  191. package/dist/cosmicintersection/pages/releases/ReleaseFormPage.d.ts +0 -1
  192. package/dist/cosmicintersection/pages/releases/ReleaseFormPage.js +16 -17
  193. package/dist/cosmicintersection/pages/releases/ReleaseFormPage.js.map +1 -1
  194. package/dist/cosmicintersection/pages/releases/ReleasesPage.d.ts +0 -1
  195. package/dist/cosmicintersection/pages/releases/ReleasesPage.js +268 -269
  196. package/dist/cosmicintersection/pages/releases/ReleasesPage.js.map +1 -1
  197. package/dist/cosmicintersection/pages/runs/RunDetailPage.d.ts +0 -1
  198. package/dist/cosmicintersection/pages/runs/RunDetailPage.js +194 -195
  199. package/dist/cosmicintersection/pages/runs/RunDetailPage.js.map +1 -1
  200. package/dist/cosmicintersection/pages/runs/RunsPage.d.ts +0 -1
  201. package/dist/cosmicintersection/pages/runs/RunsPage.js +20 -21
  202. package/dist/cosmicintersection/pages/runs/RunsPage.js.map +1 -1
  203. package/dist/cosmicintersection/pages/sources/SourceDetailPage.d.ts +0 -1
  204. package/dist/cosmicintersection/pages/sources/SourceDetailPage.js +31 -32
  205. package/dist/cosmicintersection/pages/sources/SourceDetailPage.js.map +1 -1
  206. package/dist/cosmicintersection/pages/sources/SourceFormPage.d.ts +0 -1
  207. package/dist/cosmicintersection/pages/sources/SourceFormPage.js +23 -24
  208. package/dist/cosmicintersection/pages/sources/SourceFormPage.js.map +1 -1
  209. package/dist/cosmicintersection/pages/sources/SourcesPage.d.ts +0 -1
  210. package/dist/cosmicintersection/pages/sources/SourcesPage.js +184 -182
  211. package/dist/cosmicintersection/pages/sources/SourcesPage.js.map +1 -1
  212. package/dist/cosmicintersection/types/index.d.ts +0 -1
  213. package/dist/cosmicintersection/utils/cn.d.ts +0 -1
  214. package/dist/cosmicintersection/utils/cn.js +1 -2
  215. package/dist/cosmicintersection/utils/cn.js.map +1 -1
  216. package/dist/cosmicintersection/utils/i18n.d.ts +0 -1
  217. package/dist/cosmicintersection/utils/navigation.d.ts +0 -1
  218. package/dist/dev/main.d.ts +0 -1
  219. package/dist/generated/global-types.d.ts +0 -1
  220. package/dist/generated/wspace-operations.d.ts +0 -1
  221. package/dist/generated/wspace-operations.js +1 -2
  222. package/dist/generated/wspace-operations.js.map +1 -1
  223. package/dist/generated/wspace-types.d.ts +0 -1
  224. package/dist/index.d.ts +0 -1
  225. package/dist/index.js +3 -3
  226. package/dist/node_modules/clsx/dist/clsx.js +7 -6
  227. package/dist/node_modules/clsx/dist/clsx.js.map +1 -1
  228. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +4 -21
  229. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js.map +1 -1
  230. package/dist/services/createSandboxAssistantTransport.d.ts +0 -1
  231. package/dist/services/createSandboxAssistantTransport.js +1 -2
  232. package/dist/services/createSandboxAssistantTransport.js.map +1 -1
  233. package/dist/services/recentItems.d.ts +0 -1
  234. package/dist/services/recentItems.js +5 -6
  235. package/dist/services/recentItems.js.map +1 -1
  236. package/dist/shared/hooks/useTr.d.ts +0 -1
  237. package/dist/shared/hooks/useTr.js +1 -2
  238. package/dist/shared/hooks/useTr.js.map +1 -1
  239. package/dist/stories/EmptyState.stories.d.ts +0 -1
  240. package/dist/stories/LoadingState.stories.d.ts +0 -1
  241. package/dist/stories/ScienceCanvas.stories.d.ts +0 -1
  242. package/dist/stories/StatusBadge.stories.d.ts +0 -1
  243. package/dist/stories/WorkspaceTagsPicker.stories.d.ts +0 -1
  244. package/dist/test/fakeGateway.d.ts +0 -1
  245. package/dist/test/fixtures.d.ts +0 -1
  246. package/dist/test/happydom.d.ts +1 -0
  247. package/dist/test/i18nMock.d.ts +13 -1
  248. package/dist/test/renderWithProviders.d.ts +1 -2
  249. package/dist/test/storage.d.ts +13 -0
  250. package/dist/types/assistant.d.ts +0 -1
  251. package/dist/utils/pageContext.d.ts +0 -1
  252. package/dist/utils/pageContext.js +1 -2
  253. package/dist/utils/pageContext.js.map +1 -1
  254. package/package.json +64 -38
  255. package/dist/cosmicintersection/CosmicIntersectionRoot.d.ts.map +0 -1
  256. package/dist/cosmicintersection/CosmicIntersectionRoutes.d.ts.map +0 -1
  257. package/dist/cosmicintersection/api/cosmicApi.d.ts.map +0 -1
  258. package/dist/cosmicintersection/api/databricksTransport.d.ts.map +0 -1
  259. package/dist/cosmicintersection/api/tagsApi.d.ts.map +0 -1
  260. package/dist/cosmicintersection/components/ActionMenu.d.ts.map +0 -1
  261. package/dist/cosmicintersection/components/ActivityFeedPanel.d.ts.map +0 -1
  262. package/dist/cosmicintersection/components/AiRunAttribution.d.ts.map +0 -1
  263. package/dist/cosmicintersection/components/DatabricksQueueForm.d.ts.map +0 -1
  264. package/dist/cosmicintersection/components/DatabricksRunPanel.d.ts.map +0 -1
  265. package/dist/cosmicintersection/components/DiscussionPanel.d.ts.map +0 -1
  266. package/dist/cosmicintersection/components/EmptyState.d.ts.map +0 -1
  267. package/dist/cosmicintersection/components/EntityFormShell.d.ts.map +0 -1
  268. package/dist/cosmicintersection/components/EntityTagsField.d.ts.map +0 -1
  269. package/dist/cosmicintersection/components/ErrorState.d.ts.map +0 -1
  270. package/dist/cosmicintersection/components/FacetPanel.d.ts.map +0 -1
  271. package/dist/cosmicintersection/components/FileUploadField.d.ts.map +0 -1
  272. package/dist/cosmicintersection/components/LineageGraph.d.ts.map +0 -1
  273. package/dist/cosmicintersection/components/LoadingState.d.ts.map +0 -1
  274. package/dist/cosmicintersection/components/PageLayout.d.ts.map +0 -1
  275. package/dist/cosmicintersection/components/Pagination.d.ts.map +0 -1
  276. package/dist/cosmicintersection/components/ReleaseDraftDialog.d.ts.map +0 -1
  277. package/dist/cosmicintersection/components/ResultsChart.d.ts.map +0 -1
  278. package/dist/cosmicintersection/components/RunTriageCard.d.ts.map +0 -1
  279. package/dist/cosmicintersection/components/SafeLink.d.ts.map +0 -1
  280. package/dist/cosmicintersection/components/SchemaProposalPanel.d.ts.map +0 -1
  281. package/dist/cosmicintersection/components/ScienceCanvas.d.ts.map +0 -1
  282. package/dist/cosmicintersection/components/StatusBadge.d.ts.map +0 -1
  283. package/dist/cosmicintersection/components/StepDAG.d.ts.map +0 -1
  284. package/dist/cosmicintersection/components/WorkspaceTagsPicker.d.ts.map +0 -1
  285. package/dist/cosmicintersection/components/index.d.ts.map +0 -1
  286. package/dist/cosmicintersection/context/CosmicIntersectionContext.d.ts.map +0 -1
  287. package/dist/cosmicintersection/hooks/useDatabricksExecutions.d.ts.map +0 -1
  288. package/dist/cosmicintersection/hooks/useDatabricksQueueForm.d.ts.map +0 -1
  289. package/dist/cosmicintersection/hooks/useEntityTagSync.d.ts.map +0 -1
  290. package/dist/cosmicintersection/index.d.ts.map +0 -1
  291. package/dist/cosmicintersection/lib/assistantAwareDialog.d.ts.map +0 -1
  292. package/dist/cosmicintersection/lib/databricksForm.d.ts.map +0 -1
  293. package/dist/cosmicintersection/lib/databricksIntent.d.ts.map +0 -1
  294. package/dist/cosmicintersection/lib/databricksPresentation.d.ts.map +0 -1
  295. package/dist/cosmicintersection/lib/mutationResult.d.ts.map +0 -1
  296. package/dist/cosmicintersection/lib/toast.d.ts.map +0 -1
  297. package/dist/cosmicintersection/lib/useSelectedRecord.d.ts.map +0 -1
  298. package/dist/cosmicintersection/lib/useTrackRecentItem.d.ts.map +0 -1
  299. package/dist/cosmicintersection/lib/visualization.d.ts.map +0 -1
  300. package/dist/cosmicintersection/lib/visualizationSamples.d.ts.map +0 -1
  301. package/dist/cosmicintersection/pages/access/AccessPage.d.ts.map +0 -1
  302. package/dist/cosmicintersection/pages/analyses/AnalysesPage.d.ts.map +0 -1
  303. package/dist/cosmicintersection/pages/archive/ArchivePage.d.ts.map +0 -1
  304. package/dist/cosmicintersection/pages/collections/CollectionDetailPage.d.ts.map +0 -1
  305. package/dist/cosmicintersection/pages/collections/CollectionFormPage.d.ts.map +0 -1
  306. package/dist/cosmicintersection/pages/collections/CollectionsPage.d.ts.map +0 -1
  307. package/dist/cosmicintersection/pages/dashboard/DashboardPage.d.ts.map +0 -1
  308. package/dist/cosmicintersection/pages/datasets/DatasetDetailPage.d.ts.map +0 -1
  309. package/dist/cosmicintersection/pages/datasets/DatasetFormPage.d.ts.map +0 -1
  310. package/dist/cosmicintersection/pages/datasets/DatasetsPage.d.ts.map +0 -1
  311. package/dist/cosmicintersection/pages/discovery/DiscoveryPage.d.ts.map +0 -1
  312. package/dist/cosmicintersection/pages/lineage/LineagePage.d.ts.map +0 -1
  313. package/dist/cosmicintersection/pages/notebooks/NotebookDetailPage.d.ts.map +0 -1
  314. package/dist/cosmicintersection/pages/notebooks/NotebookFormPage.d.ts.map +0 -1
  315. package/dist/cosmicintersection/pages/notebooks/NotebooksPage.d.ts.map +0 -1
  316. package/dist/cosmicintersection/pages/pipelines/PipelineDetailPage.d.ts.map +0 -1
  317. package/dist/cosmicintersection/pages/pipelines/PipelineFormPage.d.ts.map +0 -1
  318. package/dist/cosmicintersection/pages/pipelines/PipelinesPage.d.ts.map +0 -1
  319. package/dist/cosmicintersection/pages/releases/ReleaseFormPage.d.ts.map +0 -1
  320. package/dist/cosmicintersection/pages/releases/ReleasesPage.d.ts.map +0 -1
  321. package/dist/cosmicintersection/pages/runs/RunDetailPage.d.ts.map +0 -1
  322. package/dist/cosmicintersection/pages/runs/RunsPage.d.ts.map +0 -1
  323. package/dist/cosmicintersection/pages/sources/SourceDetailPage.d.ts.map +0 -1
  324. package/dist/cosmicintersection/pages/sources/SourceFormPage.d.ts.map +0 -1
  325. package/dist/cosmicintersection/pages/sources/SourcesPage.d.ts.map +0 -1
  326. package/dist/cosmicintersection/types/index.d.ts.map +0 -1
  327. package/dist/cosmicintersection/utils/cn.d.ts.map +0 -1
  328. package/dist/cosmicintersection/utils/i18n.d.ts.map +0 -1
  329. package/dist/cosmicintersection/utils/navigation.d.ts.map +0 -1
  330. package/dist/dev/main.d.ts.map +0 -1
  331. package/dist/generated/global-types.d.ts.map +0 -1
  332. package/dist/generated/wspace-operations.d.ts.map +0 -1
  333. package/dist/generated/wspace-types.d.ts.map +0 -1
  334. package/dist/index.d.ts.map +0 -1
  335. package/dist/services/createSandboxAssistantTransport.d.ts.map +0 -1
  336. package/dist/services/recentItems.d.ts.map +0 -1
  337. package/dist/shared/hooks/useTr.d.ts.map +0 -1
  338. package/dist/stories/EmptyState.stories.d.ts.map +0 -1
  339. package/dist/stories/LoadingState.stories.d.ts.map +0 -1
  340. package/dist/stories/ScienceCanvas.stories.d.ts.map +0 -1
  341. package/dist/stories/StatusBadge.stories.d.ts.map +0 -1
  342. package/dist/stories/WorkspaceTagsPicker.stories.d.ts.map +0 -1
  343. package/dist/test/fakeGateway.d.ts.map +0 -1
  344. package/dist/test/fixtures.d.ts.map +0 -1
  345. package/dist/test/i18nMock.d.ts.map +0 -1
  346. package/dist/test/renderWithProviders.d.ts.map +0 -1
  347. package/dist/test/setup.d.ts +0 -1
  348. package/dist/test/setup.d.ts.map +0 -1
  349. package/dist/types/assistant.d.ts.map +0 -1
  350. package/dist/utils/pageContext.d.ts.map +0 -1
@@ -1,4 +1,4 @@
1
- //#region src/cosmicintersection/lib/databricksPresentation.ts
1
+ // src/cosmicintersection/lib/databricksPresentation.ts
2
2
  function e(e, t) {
3
3
  let n = new URL(e.apiGatewayUrl);
4
4
  if (!["http:", "https:"].includes(n.protocol) || n.username || n.password || n.search || n.hash) throw Error("Databricks requires a gateway URL without embedded credentials or query parameters.");
@@ -21,7 +21,6 @@ function t(e) {
21
21
  return null;
22
22
  }
23
23
  }
24
- //#endregion
25
24
  export { e as databricksIntentKey, t as safeLogsUrl };
26
25
 
27
26
  //# sourceMappingURL=databricksPresentation.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"databricksPresentation.js","names":[],"sources":["../../../src/cosmicintersection/lib/databricksPresentation.ts"],"sourcesContent":["import type { DatabricksRequestScope } from '../api/databricksTransport';\n\n/** No bearer or job parameters enter the durable product-intent key. */\nexport function databricksIntentKey(scope: DatabricksRequestScope, runId: string): string {\n const gateway = new URL(scope.apiGatewayUrl);\n if (\n !['http:', 'https:'].includes(gateway.protocol) ||\n gateway.username ||\n gateway.password ||\n gateway.search ||\n gateway.hash\n ) {\n throw new Error(\n 'Databricks requires a gateway URL without embedded credentials or query parameters.'\n );\n }\n return (\n 'cosmic.databricks.intent.v1:' +\n JSON.stringify([\n gateway.origin + gateway.pathname,\n scope.actorId,\n scope.tenantId ?? null,\n scope.organizationId ?? null,\n scope.workspaceId,\n scope.projectId ?? null,\n runId,\n ])\n );\n}\n\n// Match the backend AWS-only attested origin contract; Azure/GCP are not supported.\nexport function safeLogsUrl(value: string | null | undefined): string | null {\n if (!value) return null;\n try {\n const url = new URL(value);\n return url.protocol === 'https:' &&\n !url.username &&\n !url.password &&\n url.hostname.endsWith('.cloud.databricks.com')\n ? url.href\n : null;\n } catch {\n return null;\n }\n}\n"],"mappings":";AAGA,SAAgB,EAAoB,GAA+B,GAAuB;CACxF,IAAM,IAAU,IAAI,IAAI,EAAM,aAAa;CAC3C,IACE,CAAC,CAAC,SAAS,QAAQ,CAAC,CAAC,SAAS,EAAQ,QAAQ,KAC9C,EAAQ,YACR,EAAQ,YACR,EAAQ,UACR,EAAQ,MAER,MAAU,MACR,qFACF;CAEF,OACE,iCACA,KAAK,UAAU;EACb,EAAQ,SAAS,EAAQ;EACzB,EAAM;EACN,EAAM,YAAY;EAClB,EAAM,kBAAkB;EACxB,EAAM;EACN,EAAM,aAAa;EACnB;CACF,CAAC;AAEL;AAGA,SAAgB,EAAY,GAAiD;CAC3E,IAAI,CAAC,GAAO,OAAO;CACnB,IAAI;EACF,IAAM,IAAM,IAAI,IAAI,CAAK;EACzB,OAAO,EAAI,aAAa,YACtB,CAAC,EAAI,YACL,CAAC,EAAI,YACL,EAAI,SAAS,SAAS,uBAAuB,IAC3C,EAAI,OACJ;CACN,QAAQ;EACN,OAAO;CACT;AACF"}
1
+ {"version":3,"file":"databricksPresentation.js","names":["databricksIntentKey","gateway","scope","runId","safeLogsUrl","value","url"],"sources":["../../../src/cosmicintersection/lib/databricksPresentation.ts"],"sourcesContent":["import type { DatabricksRequestScope } from '../api/databricksTransport';\n\n/** No bearer or job parameters enter the durable product-intent key. */\nexport function databricksIntentKey(scope: DatabricksRequestScope, runId: string): string {\n const gateway = new URL(scope.apiGatewayUrl);\n if (\n !['http:', 'https:'].includes(gateway.protocol) ||\n gateway.username ||\n gateway.password ||\n gateway.search ||\n gateway.hash\n ) {\n throw new Error(\n 'Databricks requires a gateway URL without embedded credentials or query parameters.'\n );\n }\n return (\n 'cosmic.databricks.intent.v1:' +\n JSON.stringify([\n gateway.origin + gateway.pathname,\n scope.actorId,\n scope.tenantId ?? null,\n scope.organizationId ?? null,\n scope.workspaceId,\n scope.projectId ?? null,\n runId,\n ])\n );\n}\n\n// Match the backend AWS-only attested origin contract; Azure/GCP are not supported.\nexport function safeLogsUrl(value: string | null | undefined): string | null {\n if (!value) return null;\n try {\n const url = new URL(value);\n return url.protocol === 'https:' &&\n !url.username &&\n !url.password &&\n url.hostname.endsWith('.cloud.databricks.com')\n ? url.href\n : null;\n } catch {\n return null;\n }\n}\n"],"mappings":";AAGA,SAAgBA,EAAoB,GAA+B,GAAuB;CACxF,IAAMC,IAAU,IAAI,IAAIC,EAAM,aAAa;CAC3C,IACE,CAAC,CAAC,SAAS,QAAQ,CAAC,CAAC,SAASD,EAAQ,QAAQ,KAC9CA,EAAQ,YACRA,EAAQ,YACRA,EAAQ,UACRA,EAAQ,MAER,MAAU,MACR,qFACF;CAEF,OACE,iCACA,KAAK,UAAU;EACbA,EAAQ,SAASA,EAAQ;EACzBC,EAAM;EACNA,EAAM,YAAY;EAClBA,EAAM,kBAAkB;EACxBA,EAAM;EACNA,EAAM,aAAa;EACnBC;CACF,CAAC;AAEL;AAGA,SAAgBC,EAAY,GAAiD;CAC3E,IAAI,CAACC,GAAO,OAAO;CACnB,IAAI;EACF,IAAMC,IAAM,IAAI,IAAID,CAAK;EACzB,OAAOC,EAAI,aAAa,YACtB,CAACA,EAAI,YACL,CAACA,EAAI,YACLA,EAAI,SAAS,SAAS,uBAAuB,IAC3CA,EAAI,OACJ;CACN,QAAQ;EACN,OAAO;CACT;AACF"}
@@ -19,4 +19,3 @@ export declare function mutationSucceeded(result: {
19
19
  * `errorPolicy: 'none'`) into a human-readable description for the toast.
20
20
  */
21
21
  export declare function describeError(error: unknown): string | undefined;
22
- //# sourceMappingURL=mutationResult.d.ts.map
@@ -1,12 +1,11 @@
1
1
  import { notify as e } from "./toast.js";
2
- //#region src/cosmicintersection/lib/mutationResult.ts
2
+ // src/cosmicintersection/lib/mutationResult.ts
3
3
  function t(t, n, r) {
4
4
  return t?.error ? (e.error(r, t.error.message), !1) : n == null || n === "" || n === !1 ? (e.error(r, "The server did not confirm the change. Please try again."), !1) : !0;
5
5
  }
6
6
  function n(e) {
7
7
  if (e instanceof Error && e.message.length > 0) return e.message;
8
8
  }
9
- //#endregion
10
9
  export { n as describeError, t as mutationSucceeded };
11
10
 
12
11
  //# sourceMappingURL=mutationResult.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"mutationResult.js","names":[],"sources":["../../../src/cosmicintersection/lib/mutationResult.ts"],"sourcesContent":["import type { ErrorLike } from '@apollo/client';\n\nimport { notify } from './toast';\n\n/**\n * The shared gateway Apollo client runs mutations with `errorPolicy: 'all'`, so a\n * server-side failure is returned IN-BAND on `result.error` rather than thrown —\n * awaiting the mutation resolves successfully even when nothing was persisted.\n * Write forms must therefore inspect the resolved result before treating a call\n * as a success, or they silently report a fake success and drop the user's data.\n *\n * `mutationSucceeded` centralises that check: it returns `true` only when there is\n * no in-band error AND the expected success payload id is present. Otherwise it\n * surfaces the real reason via the platform toast and returns `false` so the\n * caller keeps the form inputs intact and does not navigate away.\n */\nexport function mutationSucceeded(\n result: { error?: ErrorLike } | null | undefined,\n successId: string | null | undefined | boolean,\n failureMessage: string\n): boolean {\n if (result?.error) {\n notify.error(failureMessage, result.error.message);\n return false;\n }\n // Boolean mutations (archive/delete) confirm with `true`; entity mutations\n // confirm with a returned id. Treat a missing/false confirmation as failure.\n if (successId === undefined || successId === null || successId === '' || successId === false) {\n notify.error(failureMessage, 'The server did not confirm the change. Please try again.');\n return false;\n }\n return true;\n}\n\n/**\n * Normalises a thrown error (network failure, or a client configured with\n * `errorPolicy: 'none'`) into a human-readable description for the toast.\n */\nexport function describeError(error: unknown): string | undefined {\n if (error instanceof Error && error.message.length > 0) {\n return error.message;\n }\n return undefined;\n}\n"],"mappings":";;AAgBA,SAAgB,EACd,GACA,GACA,GACS;CAWT,OAVI,GAAQ,SACV,EAAO,MAAM,GAAgB,EAAO,MAAM,OAAO,GAC1C,MAIL,KAAyC,QAAQ,MAAc,MAAM,MAAc,MACrF,EAAO,MAAM,GAAgB,0DAA0D,GAChF,MAEF;AACT;AAMA,SAAgB,EAAc,GAAoC;CAChE,IAAI,aAAiB,SAAS,EAAM,QAAQ,SAAS,GACnD,OAAO,EAAM;AAGjB"}
1
+ {"version":3,"file":"mutationResult.js","names":["mutationSucceeded","result","notify","failureMessage","successId","describeError","error"],"sources":["../../../src/cosmicintersection/lib/mutationResult.ts"],"sourcesContent":["import type { ErrorLike } from '@apollo/client';\n\nimport { notify } from './toast';\n\n/**\n * The shared gateway Apollo client runs mutations with `errorPolicy: 'all'`, so a\n * server-side failure is returned IN-BAND on `result.error` rather than thrown —\n * awaiting the mutation resolves successfully even when nothing was persisted.\n * Write forms must therefore inspect the resolved result before treating a call\n * as a success, or they silently report a fake success and drop the user's data.\n *\n * `mutationSucceeded` centralises that check: it returns `true` only when there is\n * no in-band error AND the expected success payload id is present. Otherwise it\n * surfaces the real reason via the platform toast and returns `false` so the\n * caller keeps the form inputs intact and does not navigate away.\n */\nexport function mutationSucceeded(\n result: { error?: ErrorLike } | null | undefined,\n successId: string | null | undefined | boolean,\n failureMessage: string\n): boolean {\n if (result?.error) {\n notify.error(failureMessage, result.error.message);\n return false;\n }\n // Boolean mutations (archive/delete) confirm with `true`; entity mutations\n // confirm with a returned id. Treat a missing/false confirmation as failure.\n if (successId === undefined || successId === null || successId === '' || successId === false) {\n notify.error(failureMessage, 'The server did not confirm the change. Please try again.');\n return false;\n }\n return true;\n}\n\n/**\n * Normalises a thrown error (network failure, or a client configured with\n * `errorPolicy: 'none'`) into a human-readable description for the toast.\n */\nexport function describeError(error: unknown): string | undefined {\n if (error instanceof Error && error.message.length > 0) {\n return error.message;\n }\n return undefined;\n}\n"],"mappings":";;AAgBA,SAAgBA,EACd,GACA,GACA,GACS;CAWT,OAVIC,GAAQ,SACVC,EAAO,MAAMC,GAAgBF,EAAO,MAAM,OAAO,GAC1C,MAILG,KAAyC,QAAQA,MAAc,MAAMA,MAAc,MACrFF,EAAO,MAAMC,GAAgB,0DAA0D,GAChF,MAEF;AACT;AAMA,SAAgBE,EAAc,GAAoC;CAChE,IAAIC,aAAiB,SAASA,EAAM,QAAQ,SAAS,GACnD,OAAOA,EAAM;AAGjB"}
@@ -18,4 +18,3 @@ export declare const notify: {
18
18
  dismiss(id?: string | number): void;
19
19
  };
20
20
  export { toast };
21
- //# sourceMappingURL=toast.d.ts.map
@@ -1,5 +1,5 @@
1
1
  import { toast as e } from "sonner";
2
- //#region src/cosmicintersection/lib/toast.ts
2
+ // src/cosmicintersection/lib/toast.ts
3
3
  var t = {
4
4
  success(t, n) {
5
5
  e.success(t, {
@@ -30,7 +30,6 @@ var t = {
30
30
  e.dismiss(t);
31
31
  }
32
32
  };
33
- //#endregion
34
33
  export { t as notify, e as toast };
35
34
 
36
35
  //# sourceMappingURL=toast.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"toast.js","names":[],"sources":["../../../src/cosmicintersection/lib/toast.ts"],"sourcesContent":["import { toast } from 'sonner';\n\n/**\n * Module-wide toast API. sonner is a global singleton; the matching <Toaster>\n * is owned by the HOST app shell (mounted once via AppShellProvider). Every\n * page/component surfaces feedback through these helpers instead of hand-rolling\n * fixed-position toast markup, so success/error notifications stay consistent\n * with the rest of the platform.\n *\n * Durations follow the notification spec: success/info auto-dismiss, errors stay\n * until the user dismisses them (sonner renders a close button and announces via\n * aria-live).\n */\nexport const notify = {\n success(message: string, description?: string): void {\n toast.success(message, { description, duration: 4000 });\n },\n info(message: string, description?: string): void {\n toast.info(message, { description, duration: 4000 });\n },\n warning(message: string, description?: string): void {\n toast.warning(message, { description, duration: 8000 });\n },\n error(message: string, description?: string): void {\n toast.error(message, { description, duration: Infinity, closeButton: true });\n },\n dismiss(id?: string | number): void {\n toast.dismiss(id);\n },\n};\n\nexport { toast };\n"],"mappings":";;AAaA,IAAa,IAAS;CACpB,QAAQ,GAAiB,GAA4B;EACnD,EAAM,QAAQ,GAAS;GAAE;GAAa,UAAU;EAAK,CAAC;CACxD;CACA,KAAK,GAAiB,GAA4B;EAChD,EAAM,KAAK,GAAS;GAAE;GAAa,UAAU;EAAK,CAAC;CACrD;CACA,QAAQ,GAAiB,GAA4B;EACnD,EAAM,QAAQ,GAAS;GAAE;GAAa,UAAU;EAAK,CAAC;CACxD;CACA,MAAM,GAAiB,GAA4B;EACjD,EAAM,MAAM,GAAS;GAAE;GAAa,UAAU;GAAU,aAAa;EAAK,CAAC;CAC7E;CACA,QAAQ,GAA4B;EAClC,EAAM,QAAQ,CAAE;CAClB;AACF"}
1
+ {"version":3,"file":"toast.js","names":["notify","message","id","toast"],"sources":["../../../src/cosmicintersection/lib/toast.ts"],"sourcesContent":["import { toast } from 'sonner';\n\n/**\n * Module-wide toast API. sonner is a global singleton; the matching <Toaster>\n * is owned by the HOST app shell (mounted once via AppShellProvider). Every\n * page/component surfaces feedback through these helpers instead of hand-rolling\n * fixed-position toast markup, so success/error notifications stay consistent\n * with the rest of the platform.\n *\n * Durations follow the notification spec: success/info auto-dismiss, errors stay\n * until the user dismisses them (sonner renders a close button and announces via\n * aria-live).\n */\nexport const notify = {\n success(message: string, description?: string): void {\n toast.success(message, { description, duration: 4000 });\n },\n info(message: string, description?: string): void {\n toast.info(message, { description, duration: 4000 });\n },\n warning(message: string, description?: string): void {\n toast.warning(message, { description, duration: 8000 });\n },\n error(message: string, description?: string): void {\n toast.error(message, { description, duration: Infinity, closeButton: true });\n },\n dismiss(id?: string | number): void {\n toast.dismiss(id);\n },\n};\n\nexport { toast };\n"],"mappings":";;AAaA,IAAaA,IAAS;CACpB,QAAQ,GAAiB,GAA4B;EACnD,EAAM,QAAQC,GAAS;GAAE;GAAa,UAAU;EAAK,CAAC;CACxD;CACA,KAAK,GAAiB,GAA4B;EAChD,EAAM,KAAKA,GAAS;GAAE;GAAa,UAAU;EAAK,CAAC;CACrD;CACA,QAAQ,GAAiB,GAA4B;EACnD,EAAM,QAAQA,GAAS;GAAE;GAAa,UAAU;EAAK,CAAC;CACxD;CACA,MAAM,GAAiB,GAA4B;EACjD,EAAM,MAAMA,GAAS;GAAE;GAAa,UAAU;GAAU,aAAa;EAAK,CAAC;CAC7E;CACA,QAAQ,GAA4B;EAClC,EAAM,QAAQC,CAAE;CAClB;AACF"}
@@ -0,0 +1,4 @@
1
+ export type ArtifactVisibility = 'PRIVATE' | 'WORKSPACE';
2
+ /** Public science metadata does not authorize publishing its underlying bytes. */
3
+ export declare function artifactVisibility(value?: unknown): ArtifactVisibility;
4
+ export declare function datasetArtifactVisibility(accessLevel: unknown): ArtifactVisibility;
@@ -0,0 +1,17 @@
1
+ // src/cosmicintersection/lib/uploadAudience.ts
2
+ function e(e = "PRIVATE") {
3
+ if (e !== "PRIVATE" && e !== "WORKSPACE") throw Error("Upload visibility must be PRIVATE or WORKSPACE");
4
+ return e;
5
+ }
6
+ function t(e) {
7
+ switch (e) {
8
+ case "WORKSPACE": return "WORKSPACE";
9
+ case "PUBLIC":
10
+ case "RESTRICTED":
11
+ case "EMBARGOED": return "PRIVATE";
12
+ default: throw Error("Unknown dataset access level");
13
+ }
14
+ }
15
+ export { e as artifactVisibility, t as datasetArtifactVisibility };
16
+
17
+ //# sourceMappingURL=uploadAudience.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uploadAudience.js","names":["artifactVisibility","value","datasetArtifactVisibility","accessLevel"],"sources":["../../../src/cosmicintersection/lib/uploadAudience.ts"],"sourcesContent":["export type ArtifactVisibility = 'PRIVATE' | 'WORKSPACE';\n\n/** Public science metadata does not authorize publishing its underlying bytes. */\nexport function artifactVisibility(value: unknown = 'PRIVATE'): ArtifactVisibility {\n if (value !== 'PRIVATE' && value !== 'WORKSPACE') {\n throw new Error('Upload visibility must be PRIVATE or WORKSPACE');\n }\n return value;\n}\n\nexport function datasetArtifactVisibility(accessLevel: unknown): ArtifactVisibility {\n switch (accessLevel) {\n case 'WORKSPACE':\n return 'WORKSPACE';\n case 'PUBLIC':\n case 'RESTRICTED':\n case 'EMBARGOED':\n return 'PRIVATE';\n default:\n throw new Error('Unknown dataset access level');\n }\n}\n"],"mappings":";AAGA,SAAgBA,EAAmB,IAAiB,WAA+B;CACjF,IAAIC,MAAU,aAAaA,MAAU,aACnC,MAAU,MAAM,gDAAgD;CAElE,OAAOA;AACT;AAEA,SAAgBC,EAA0B,GAA0C;CAClF,QAAQC,GAAR;EACE,KAAK,aACH,OAAO;EACT,KAAK;EACL,KAAK;EACL,KAAK,aACH,OAAO;EACT,SACE,MAAU,MAAM,8BAA8B;CAClD;AACF"}
@@ -17,4 +17,3 @@ export declare function useSelectedRecord(param?: string): {
17
17
  selectedId: string | null;
18
18
  select: (id: string | null) => void;
19
19
  };
20
- //# sourceMappingURL=useSelectedRecord.d.ts.map
@@ -1,6 +1,6 @@
1
1
  import { useCallback as e } from "react";
2
2
  import { useSearchParams as t } from "react-router";
3
- //#region src/cosmicintersection/lib/useSelectedRecord.ts
3
+ // src/cosmicintersection/lib/useSelectedRecord.ts
4
4
  function n(n = "id") {
5
5
  let [r, i] = t();
6
6
  return {
@@ -13,7 +13,6 @@ function n(n = "id") {
13
13
  }, [n, i])
14
14
  };
15
15
  }
16
- //#endregion
17
16
  export { n as useSelectedRecord };
18
17
 
19
18
  //# sourceMappingURL=useSelectedRecord.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useSelectedRecord.js","names":[],"sources":["../../../src/cosmicintersection/lib/useSelectedRecord.ts"],"sourcesContent":["import { useCallback } from 'react';\nimport { useSearchParams } from 'react-router';\n\n/**\n * Keeps the record a list page has focused (a release, an analysis, an access\n * grant, a dataset's schema field) in the URL search parameters instead of\n * component state.\n *\n * The URL is what the AI assistant's page context reads\n * (`src/utils/pageContext.ts`): `?id=<id>` on the releases, analyses and access\n * pages, and `?field=<id>` on a dataset page, become `entityType` + `entityId`,\n * so \"publish this release\", \"revoke this grant\" or \"describe this column\"\n * resolve without a follow-up question. It also makes the focused record\n * linkable and survives a reload.\n *\n * The update replaces the current history entry: focusing records one after\n * another must not fill the back stack.\n */\nexport function useSelectedRecord(param = 'id'): {\n selectedId: string | null;\n select: (id: string | null) => void;\n} {\n const [searchParams, setSearchParams] = useSearchParams();\n const raw = searchParams.get(param)?.trim();\n const selectedId = raw ? raw : null;\n\n const select = useCallback(\n (id: string | null) => {\n setSearchParams(\n (previous) => {\n const next = new URLSearchParams(previous);\n if (id) {\n next.set(param, id);\n } else {\n next.delete(param);\n }\n return next;\n },\n { replace: true }\n );\n },\n [param, setSearchParams]\n );\n\n return { selectedId, select };\n}\n"],"mappings":";;;AAkBA,SAAgB,EAAkB,IAAQ,MAGxC;CACA,IAAM,CAAC,GAAc,KAAmB,EAAgB;CAsBxD,OAAO;EAAE,YArBG,EAAa,IAAI,CAAK,CAAC,EAAE,KAAK,KACX;EAoBV,QAlBN,GACZ,MAAsB;GACrB,GACG,MAAa;IACZ,IAAM,IAAO,IAAI,gBAAgB,CAAQ;IAMzC,OALI,IACF,EAAK,IAAI,GAAO,CAAE,IAElB,EAAK,OAAO,CAAK,GAEZ;GACT,GACA,EAAE,SAAS,GAAK,CAClB;EACF,GACA,CAAC,GAAO,CAAe,CAGJ;CAAO;AAC9B"}
1
+ {"version":3,"file":"useSelectedRecord.js","names":["useSelectedRecord","searchParams","setSearchParams","useSearchParams","param","useCallback","next","previous","id"],"sources":["../../../src/cosmicintersection/lib/useSelectedRecord.ts"],"sourcesContent":["import { useCallback } from 'react';\nimport { useSearchParams } from 'react-router';\n\n/**\n * Keeps the record a list page has focused (a release, an analysis, an access\n * grant, a dataset's schema field) in the URL search parameters instead of\n * component state.\n *\n * The URL is what the AI assistant's page context reads\n * (`src/utils/pageContext.ts`): `?id=<id>` on the releases, analyses and access\n * pages, and `?field=<id>` on a dataset page, become `entityType` + `entityId`,\n * so \"publish this release\", \"revoke this grant\" or \"describe this column\"\n * resolve without a follow-up question. It also makes the focused record\n * linkable and survives a reload.\n *\n * The update replaces the current history entry: focusing records one after\n * another must not fill the back stack.\n */\nexport function useSelectedRecord(param = 'id'): {\n selectedId: string | null;\n select: (id: string | null) => void;\n} {\n const [searchParams, setSearchParams] = useSearchParams();\n const raw = searchParams.get(param)?.trim();\n const selectedId = raw ? raw : null;\n\n const select = useCallback(\n (id: string | null) => {\n setSearchParams(\n (previous) => {\n const next = new URLSearchParams(previous);\n if (id) {\n next.set(param, id);\n } else {\n next.delete(param);\n }\n return next;\n },\n { replace: true }\n );\n },\n [param, setSearchParams]\n );\n\n return { selectedId, select };\n}\n"],"mappings":";;;AAkBA,SAAgBA,EAAkB,IAAQ,MAGxC;CACA,IAAM,CAACC,GAAcC,KAAmBC,EAAgB;CAsBxD,OAAO;EAAE,YArBGF,EAAa,IAAIG,CAAK,CAAC,EAAE,KAAK,KACX;EAoBV,QAlBNC,GACZ,MAAsB;GACrB,GACG,MAAa;IACZ,IAAMC,IAAO,IAAI,gBAAgBC,CAAQ;IAMzC,OALIC,IACFF,EAAK,IAAIF,GAAOI,CAAE,IAElBF,EAAK,OAAOF,CAAK,GAEZE;GACT,GACA,EAAE,SAAS,GAAK,CAClB;EACF,GACA,CAACF,GAAOF,CAAe,CAGJ;CAAO;AAC9B"}
@@ -19,4 +19,3 @@ export interface TrackedRecentEntity {
19
19
  * changes, never on every render.
20
20
  */
21
21
  export declare function useTrackRecentItem(entity: TrackedRecentEntity | null): void;
22
- //# sourceMappingURL=useTrackRecentItem.d.ts.map
@@ -1,17 +1,17 @@
1
- import { useCosmicIntersection as e } from "../context/CosmicIntersectionContext.js";
2
- import { recordRecentItem as t } from "../../services/recentItems.js";
1
+ import { recordRecentItem as e } from "../../services/recentItems.js";
2
+ import { useCosmicIntersection as t } from "../context/CosmicIntersectionContext.js";
3
3
  import { useEffect as n } from "react";
4
- //#region src/cosmicintersection/lib/useTrackRecentItem.ts
4
+ // src/cosmicintersection/lib/useTrackRecentItem.ts
5
5
  function r(r) {
6
- let { basePath: i, workspaceId: a } = e(), o = r?.type, s = r?.id, c = r?.name, l = r?.path;
6
+ let { basePath: i, workspaceId: a } = t(), o = r?.type, s = r?.id, c = r?.name, l = r?.path;
7
7
  n(() => {
8
8
  if (!a?.trim() || !o || !s || !c || !l) return;
9
- let e = l.startsWith("/") ? l.slice(1) : l;
10
- t(a, {
9
+ let t = l.startsWith("/") ? l.slice(1) : l;
10
+ e(a, {
11
11
  type: o,
12
12
  id: s,
13
13
  name: c,
14
- href: `${i}/${e}`
14
+ href: `${i}/${t}`
15
15
  });
16
16
  }, [
17
17
  i,
@@ -22,7 +22,6 @@ function r(r) {
22
22
  l
23
23
  ]);
24
24
  }
25
- //#endregion
26
25
  export { r as useTrackRecentItem };
27
26
 
28
27
  //# sourceMappingURL=useTrackRecentItem.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useTrackRecentItem.js","names":[],"sources":["../../../src/cosmicintersection/lib/useTrackRecentItem.ts"],"sourcesContent":["import { useEffect } from 'react';\n\nimport { recordRecentItem, type CosRecentEntityType } from '../../services/recentItems';\nimport { useCosmicIntersection } from '../context/CosmicIntersectionContext';\n\n/** The entity a detail view is showing, once it has loaded. */\nexport interface TrackedRecentEntity {\n readonly type: CosRecentEntityType;\n readonly id: string;\n readonly name: string;\n /** Path relative to the module base path, e.g. `datasets/ds-1` or `releases?id=rel-1`. */\n readonly path: string;\n}\n\n/**\n * Records the entity a detail view is showing in the workspace's recent list,\n * which feeds the \"Recent\" section of the app shell's command palette.\n *\n * Pass `null` while the entity is loading or missing: nothing is recorded for\n * a not-found id. Nothing is recorded either until the active workspace is\n * known, because the shell reads the list back per workspace and an entry\n * written before the id arrives would land in a bucket nothing displays. The\n * entry is written again only when the entity, its name or the workspace\n * changes, never on every render.\n */\nexport function useTrackRecentItem(entity: TrackedRecentEntity | null): void {\n const { basePath, workspaceId } = useCosmicIntersection();\n const type = entity?.type;\n const id = entity?.id;\n const name = entity?.name;\n const path = entity?.path;\n\n useEffect(() => {\n if (!workspaceId?.trim() || !type || !id || !name || !path) return;\n const relative = path.startsWith('/') ? path.slice(1) : path;\n recordRecentItem(workspaceId, { type, id, name, href: `${basePath}/${relative}` });\n }, [basePath, workspaceId, type, id, name, path]);\n}\n"],"mappings":";;;;AAyBA,SAAgB,EAAmB,GAA0C;CAC3E,IAAM,EAAE,aAAU,mBAAgB,EAAsB,GAClD,IAAO,GAAQ,MACf,IAAK,GAAQ,IACb,IAAO,GAAQ,MACf,IAAO,GAAQ;CAErB,QAAgB;EACd,IAAI,CAAC,GAAa,KAAK,KAAK,CAAC,KAAQ,CAAC,KAAM,CAAC,KAAQ,CAAC,GAAM;EAC5D,IAAM,IAAW,EAAK,WAAW,GAAG,IAAI,EAAK,MAAM,CAAC,IAAI;EACxD,EAAiB,GAAa;GAAE;GAAM;GAAI;GAAM,MAAM,GAAG,EAAS,GAAG;EAAW,CAAC;CACnF,GAAG;EAAC;EAAU;EAAa;EAAM;EAAI;EAAM;CAAI,CAAC;AAClD"}
1
+ {"version":3,"file":"useTrackRecentItem.js","names":["useTrackRecentItem","useCosmicIntersection","type","entity","id","name","path","workspaceId","relative","basePath"],"sources":["../../../src/cosmicintersection/lib/useTrackRecentItem.ts"],"sourcesContent":["import { useEffect } from 'react';\n\nimport { recordRecentItem, type CosRecentEntityType } from '../../services/recentItems';\nimport { useCosmicIntersection } from '../context/CosmicIntersectionContext';\n\n/** The entity a detail view is showing, once it has loaded. */\nexport interface TrackedRecentEntity {\n readonly type: CosRecentEntityType;\n readonly id: string;\n readonly name: string;\n /** Path relative to the module base path, e.g. `datasets/ds-1` or `releases?id=rel-1`. */\n readonly path: string;\n}\n\n/**\n * Records the entity a detail view is showing in the workspace's recent list,\n * which feeds the \"Recent\" section of the app shell's command palette.\n *\n * Pass `null` while the entity is loading or missing: nothing is recorded for\n * a not-found id. Nothing is recorded either until the active workspace is\n * known, because the shell reads the list back per workspace and an entry\n * written before the id arrives would land in a bucket nothing displays. The\n * entry is written again only when the entity, its name or the workspace\n * changes, never on every render.\n */\nexport function useTrackRecentItem(entity: TrackedRecentEntity | null): void {\n const { basePath, workspaceId } = useCosmicIntersection();\n const type = entity?.type;\n const id = entity?.id;\n const name = entity?.name;\n const path = entity?.path;\n\n useEffect(() => {\n if (!workspaceId?.trim() || !type || !id || !name || !path) return;\n const relative = path.startsWith('/') ? path.slice(1) : path;\n recordRecentItem(workspaceId, { type, id, name, href: `${basePath}/${relative}` });\n }, [basePath, workspaceId, type, id, name, path]);\n}\n"],"mappings":";;;;AAyBA,SAAgBA,EAAmB,GAA0C;CAC3E,IAAM,EAAE,aAAU,mBAAgBC,EAAsB,GAClDC,IAAOC,GAAQ,MACfC,IAAKD,GAAQ,IACbE,IAAOF,GAAQ,MACfG,IAAOH,GAAQ;CAErB,QAAgB;EACd,IAAI,CAACI,GAAa,KAAK,KAAK,CAACL,KAAQ,CAACE,KAAM,CAACC,KAAQ,CAACC,GAAM;EAC5D,IAAME,IAAWF,EAAK,WAAW,GAAG,IAAIA,EAAK,MAAM,CAAC,IAAIA;EACxD,EAAiBC,GAAa;GAAE;GAAM;GAAI;GAAM,MAAM,GAAGE,EAAS,GAAGD;EAAW,CAAC;CACnF,GAAG;EAACC;EAAUF;EAAaL;EAAME;EAAIC;EAAMC;CAAI,CAAC;AAClD"}
@@ -186,4 +186,3 @@ export declare function nearestPoint(points: Array<{
186
186
  */
187
187
  export declare function formatValue(value: number): string;
188
188
  export {};
189
- //# sourceMappingURL=visualization.d.ts.map
@@ -1,4 +1,4 @@
1
- //#region src/cosmicintersection/lib/visualization.ts
1
+ // src/cosmicintersection/lib/visualization.ts
2
2
  var e = [
3
3
  "mollweide",
4
4
  "aitoff",
@@ -103,7 +103,7 @@ function d(e, t) {
103
103
  });
104
104
  }), c.length === 0) return null;
105
105
  let u = [];
106
- for (let t of l(e.lines)) !n(t) || !r(t.x) || u.push({
106
+ for (let t of l(e.lines)) n(t) && r(t.x) && u.push({
107
107
  x: t.x,
108
108
  label: i(t.label)
109
109
  });
@@ -292,7 +292,6 @@ function A(e, t, n, r) {
292
292
  function j(e) {
293
293
  return Object.is(e, -0) ? "0" : String(e);
294
294
  }
295
- //#endregion
296
295
  export { v as DEFAULT_CAMERA, t as MAX_ELEMENTS_PER_VIEW, e as SKY_PROJECTIONS, o as axisTitle, y as clampPitch, O as decimateSeries, D as downsample, m as extractVisualizations, E as formatTick, j as formatValue, A as nearestPoint, w as niceTicks, b as projectPoint, _ as projectSky, x as sceneNormalizer, k as tabLabels, T as tickStep, h as viewKindLabel };
297
296
 
298
297
  //# sourceMappingURL=visualization.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"visualization.js","names":[],"sources":["../../../src/cosmicintersection/lib/visualization.ts"],"sourcesContent":["/**\n * Canonical scientific-visualization payloads for analysis results (BOFF-3984).\n *\n * `cosCompleteAnalysis` persists free-form `results` JSON. A producer opts in to\n * a domain view by adding `results.visualization` (one view) or\n * `results.visualizations` (a list of up to 8). The backend validates these\n * shapes at write time (wspace-cosmicintersection-svc `visualization.ts`); this\n * module normalises them for rendering and is deliberately lenient, so a row\n * written before validation existed degrades to \"fewer elements\", never a crash.\n *\n * skymap { sources: [{ ra, dec, label?, value? }], projection?, frame?, valueLabel? }\n * spectrum { series: [{ name?, style?, points }], lines?: [{ x, label? }], x/y labels+units }\n * lightcurve { series: [...], magnitude?: boolean, x/y labels+units }\n * scene3d { points?: [{ x, y, z, label?, value? }], paths?: [{ name?, points }], axes? }\n *\n * 2-D points are `[x, y]`, `[x, y, err]` or `{ x, y, err? }`; 3-D points are\n * `[x, y, z]` or `{ x, y, z }`. Angles are degrees.\n */\n\nexport type SkyProjection = 'mollweide' | 'aitoff' | 'equirectangular';\nexport type SkyFrame = 'icrs' | 'galactic' | 'ecliptic';\nexport type SeriesStyle = 'line' | 'scatter' | 'step';\n\nexport const SKY_PROJECTIONS: readonly SkyProjection[] = ['mollweide', 'aitoff', 'equirectangular'];\n\nexport interface SkySource {\n ra: number;\n dec: number;\n label?: string;\n value?: number;\n}\n\nexport interface Point2D {\n x: number;\n y: number;\n err?: number;\n}\n\nexport interface Series2D {\n name: string;\n style: SeriesStyle;\n points: Point2D[];\n}\n\nexport interface MarkerLine {\n x: number;\n label?: string;\n}\n\nexport interface Point3D {\n x: number;\n y: number;\n z: number;\n label?: string;\n value?: number;\n}\n\nexport interface Path3D {\n name: string;\n points: Point3D[];\n}\n\ninterface ViewBase {\n title?: string;\n description?: string;\n}\n\nexport interface SkyMapView extends ViewBase {\n kind: 'skymap';\n projection: SkyProjection;\n frame: SkyFrame;\n valueLabel?: string;\n sources: SkySource[];\n}\n\nexport interface PlotView extends ViewBase {\n kind: 'spectrum' | 'lightcurve';\n xLabel: string;\n yLabel: string;\n /** Light curves in magnitudes plot brighter (smaller) values higher. */\n invertY: boolean;\n series: Series2D[];\n lines: MarkerLine[];\n}\n\nexport interface Scene3DView extends ViewBase {\n kind: 'scene3d';\n axes: { x: string; y: string; z: string };\n points: Point3D[];\n paths: Path3D[];\n}\n\nexport type VisualizationView = SkyMapView | PlotView | Scene3DView;\n\nexport const MAX_VISUALIZATIONS = 8;\n/** Matches the backend cap; extra elements are dropped rather than rendered. */\nexport const MAX_ELEMENTS_PER_VIEW = 20_000;\n\ntype Obj = Record<string, unknown>;\n\nfunction isObject(value: unknown): value is Obj {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\nfunction isFiniteNumber(value: unknown): value is number {\n return typeof value === 'number' && Number.isFinite(value);\n}\n\nfunction text(value: unknown): string | undefined {\n return typeof value === 'string' && value.trim() ? value.trim() : undefined;\n}\n\nfunction oneOf<T extends string>(value: unknown, allowed: readonly T[], fallback: T): T {\n return typeof value === 'string' && (allowed as readonly string[]).includes(value)\n ? (value as T)\n : fallback;\n}\n\n/** \"Wavelength\" + \"nm\" -> \"Wavelength (nm)\". */\nexport function axisTitle(label: string | undefined, unit: string | undefined, fallback: string) {\n const base = label ?? fallback;\n return unit ? `${base} (${unit})` : base;\n}\n\nfunction toPoint2D(raw: unknown): Point2D | null {\n if (Array.isArray(raw)) {\n const [x, y, err] = raw;\n if (!isFiniteNumber(x) || !isFiniteNumber(y)) return null;\n return isFiniteNumber(err) ? { x, y, err: Math.abs(err) } : { x, y };\n }\n if (isObject(raw) && isFiniteNumber(raw.x) && isFiniteNumber(raw.y)) {\n return isFiniteNumber(raw.err)\n ? { x: raw.x, y: raw.y, err: Math.abs(raw.err) }\n : { x: raw.x, y: raw.y };\n }\n return null;\n}\n\nfunction toPoint3D(raw: unknown): Point3D | null {\n if (Array.isArray(raw)) {\n const [x, y, z] = raw;\n return isFiniteNumber(x) && isFiniteNumber(y) && isFiniteNumber(z) ? { x, y, z } : null;\n }\n if (isObject(raw) && isFiniteNumber(raw.x) && isFiniteNumber(raw.y) && isFiniteNumber(raw.z)) {\n const point: Point3D = { x: raw.x, y: raw.y, z: raw.z };\n const label = text(raw.label);\n if (label) point.label = label;\n if (isFiniteNumber(raw.value)) point.value = raw.value;\n return point;\n }\n return null;\n}\n\nfunction arrayOf(value: unknown): unknown[] {\n return Array.isArray(value) ? value.slice(0, MAX_ELEMENTS_PER_VIEW) : [];\n}\n\nfunction parseSkyMap(view: Obj): SkyMapView | null {\n const sources: SkySource[] = [];\n for (const raw of arrayOf(view.sources)) {\n if (!isObject(raw) || !isFiniteNumber(raw.ra) || !isFiniteNumber(raw.dec)) continue;\n if (raw.ra < 0 || raw.ra > 360 || raw.dec < -90 || raw.dec > 90) continue;\n const source: SkySource = { ra: raw.ra, dec: raw.dec };\n const label = text(raw.label);\n if (label) source.label = label;\n if (isFiniteNumber(raw.value)) source.value = raw.value;\n sources.push(source);\n }\n if (sources.length === 0) return null;\n return {\n kind: 'skymap',\n title: text(view.title),\n description: text(view.description),\n projection: oneOf(view.projection, SKY_PROJECTIONS, 'mollweide'),\n frame: oneOf(view.frame, ['icrs', 'galactic', 'ecliptic'] as const, 'icrs'),\n valueLabel: text(view.valueLabel),\n sources,\n };\n}\n\nfunction parsePlot(view: Obj, kind: 'spectrum' | 'lightcurve'): PlotView | null {\n const series: Series2D[] = [];\n arrayOf(view.series).forEach((raw, i) => {\n if (!isObject(raw)) return;\n const points = arrayOf(raw.points)\n .map(toPoint2D)\n .filter((p): p is Point2D => p !== null);\n if (points.length < 2) return;\n series.push({\n name: text(raw.name) ?? `Series ${i + 1}`,\n style: oneOf(raw.style, ['line', 'scatter', 'step'] as const, 'line'),\n points,\n });\n });\n if (series.length === 0) return null;\n const lines: MarkerLine[] = [];\n for (const raw of arrayOf(view.lines)) {\n if (!isObject(raw) || !isFiniteNumber(raw.x)) continue;\n lines.push({ x: raw.x, label: text(raw.label) });\n }\n const magnitude = kind === 'lightcurve' && view.magnitude === true;\n const isSpectrum = kind === 'spectrum';\n return {\n kind,\n title: text(view.title),\n description: text(view.description),\n xLabel: axisTitle(text(view.xLabel), text(view.xUnit), isSpectrum ? 'Wavelength' : 'Time'),\n yLabel: axisTitle(\n text(view.yLabel),\n text(view.yUnit),\n isSpectrum ? 'Flux' : magnitude ? 'Magnitude' : 'Flux'\n ),\n invertY: magnitude,\n series,\n lines,\n };\n}\n\nfunction parseScene(view: Obj): Scene3DView | null {\n const points = arrayOf(view.points)\n .map(toPoint3D)\n .filter((p): p is Point3D => p !== null);\n const paths: Path3D[] = [];\n arrayOf(view.paths).forEach((raw, i) => {\n if (!isObject(raw)) return;\n const vertices = arrayOf(raw.points)\n .map(toPoint3D)\n .filter((p): p is Point3D => p !== null);\n if (vertices.length >= 2)\n paths.push({ name: text(raw.name) ?? `Path ${i + 1}`, points: vertices });\n });\n if (points.length === 0 && paths.length === 0) return null;\n const axes = isObject(view.axes) ? view.axes : {};\n return {\n kind: 'scene3d',\n title: text(view.title),\n description: text(view.description),\n axes: { x: text(axes.x) ?? 'x', y: text(axes.y) ?? 'y', z: text(axes.z) ?? 'z' },\n points,\n paths,\n };\n}\n\nfunction parseView(raw: unknown): VisualizationView | null {\n if (!isObject(raw)) return null;\n switch (raw.kind) {\n case 'skymap':\n return parseSkyMap(raw);\n case 'spectrum':\n return parsePlot(raw, 'spectrum');\n case 'lightcurve':\n return parsePlot(raw, 'lightcurve');\n case 'scene3d':\n return parseScene(raw);\n default:\n return null;\n }\n}\n\n/** Every renderable canonical view in an analysis `results` payload (may be empty). */\nexport function extractVisualizations(results: unknown): VisualizationView[] {\n if (!isObject(results)) return [];\n const raw: unknown[] = [];\n if (results.visualization !== undefined) raw.push(results.visualization);\n if (Array.isArray(results.visualizations)) raw.push(...results.visualizations);\n return raw\n .slice(0, MAX_VISUALIZATIONS)\n .map(parseView)\n .filter((v): v is VisualizationView => v !== null);\n}\n\n/** The view kind's display name, used for tabs and fallback titles. */\nexport function viewKindLabel(kind: VisualizationView['kind']): string {\n switch (kind) {\n case 'skymap':\n return 'Sky map';\n case 'spectrum':\n return 'Spectrum';\n case 'lightcurve':\n return 'Light curve';\n case 'scene3d':\n return '3-D scene';\n }\n}\n\n// ---------------------------------------------------------------------------\n// Sky projections\n// ---------------------------------------------------------------------------\n\nconst DEG = Math.PI / 180;\n\n/**\n * Project equatorial (or galactic) coordinates to normalised plane coordinates\n * in [-1, 1] x [-0.5, 0.5] (a 2:1 frame). Astronomical convention: longitude\n * increases to the LEFT (east is left when looking at the sky), centred on 180°.\n */\nexport function projectSky(\n lonDeg: number,\n latDeg: number,\n projection: SkyProjection\n): { x: number; y: number } {\n // Longitude relative to the centre, wrapped to [-180, 180], flipped east-left.\n let l = ((((lonDeg - 180) % 360) + 540) % 360) - 180;\n l = -l;\n const lambda = l * DEG;\n const phi = latDeg * DEG;\n\n if (projection === 'equirectangular') {\n return { x: l / 180, y: latDeg / 180 };\n }\n\n if (projection === 'aitoff') {\n // Clamp: rounding can push the product a hair above 1, and acos would return NaN.\n const alpha = Math.acos(Math.min(1, Math.cos(phi) * Math.cos(lambda / 2)));\n const sinc = alpha === 0 ? 1 : Math.sin(alpha) / alpha;\n const x = (2 * Math.cos(phi) * Math.sin(lambda / 2)) / sinc;\n const y = Math.sin(phi) / sinc;\n // Aitoff spans x in [-pi, pi], y in [-pi/2, pi/2].\n return { x: x / Math.PI, y: y / Math.PI };\n }\n\n // Mollweide: solve 2θ + sin 2θ = π sin φ by Newton iteration.\n let theta = phi;\n if (Math.abs(Math.abs(phi) - Math.PI / 2) < 1e-9) {\n theta = phi;\n } else {\n for (let i = 0; i < 50; i += 1) {\n const delta =\n -(2 * theta + Math.sin(2 * theta) - Math.PI * Math.sin(phi)) /\n (2 + 2 * Math.cos(2 * theta));\n theta += delta;\n if (Math.abs(delta) < 1e-10) break;\n }\n }\n const x = ((2 * Math.SQRT2) / Math.PI) * lambda * Math.cos(theta);\n const y = Math.SQRT2 * Math.sin(theta);\n // Mollweide spans x in [-2√2, 2√2], y in [-√2, √2].\n return { x: x / (2 * Math.SQRT2), y: y / (2 * Math.SQRT2) };\n}\n\n// ---------------------------------------------------------------------------\n// 3-D projection\n// ---------------------------------------------------------------------------\n\nexport interface Camera {\n /** Rotation about the vertical axis, degrees. */\n yaw: number;\n /** Rotation about the horizontal axis, degrees (clamped to ±89). */\n pitch: number;\n}\n\nexport const DEFAULT_CAMERA: Camera = { yaw: 35, pitch: 25 };\n\nexport function clampPitch(pitch: number): number {\n return Math.max(-89, Math.min(89, pitch));\n}\n\n/**\n * Orthographic projection of a point (already centred and scaled to roughly\n * unit size) for the given camera. Returns screen-plane x/y (y up) and a depth\n * where larger means nearer the viewer.\n */\nexport function projectPoint(\n p: { x: number; y: number; z: number },\n camera: Camera\n): { x: number; y: number; depth: number } {\n const yaw = camera.yaw * DEG;\n const pitch = camera.pitch * DEG;\n // Data convention: z is \"up\". Rotate about z (yaw), then tilt about x (pitch).\n const x1 = p.x * Math.cos(yaw) - p.y * Math.sin(yaw);\n const y1 = p.x * Math.sin(yaw) + p.y * Math.cos(yaw);\n const z1 = p.z;\n const screenY = z1 * Math.cos(pitch) - y1 * Math.sin(pitch);\n const depth = -(z1 * Math.sin(pitch) + y1 * Math.cos(pitch));\n return { x: x1, y: screenY, depth };\n}\n\n/**\n * Centre + uniform scale that fits every point inside a unit sphere.\n *\n * The scale is the bounding radius (the farthest point from the box centre),\n * not the largest half-extent: a unit cube's corners sit at sqrt(3), so a\n * half-extent scale would let rotation carry valid points outside the canvas.\n */\nexport function sceneNormalizer(points: Point3D[]): (p: Point3D) => Point3D {\n if (points.length === 0) return (p) => p;\n let minX = Infinity;\n let minY = Infinity;\n let minZ = Infinity;\n let maxX = -Infinity;\n let maxY = -Infinity;\n let maxZ = -Infinity;\n for (const p of points) {\n minX = Math.min(minX, p.x);\n minY = Math.min(minY, p.y);\n minZ = Math.min(minZ, p.z);\n maxX = Math.max(maxX, p.x);\n maxY = Math.max(maxY, p.y);\n maxZ = Math.max(maxZ, p.z);\n }\n const cx = (minX + maxX) / 2;\n const cy = (minY + maxY) / 2;\n const cz = (minZ + maxZ) / 2;\n let radius = 0;\n for (const p of points) {\n radius = Math.max(radius, Math.hypot(p.x - cx, p.y - cy, p.z - cz));\n }\n const scale = radius || 1;\n return (p) => ({ ...p, x: (p.x - cx) / scale, y: (p.y - cy) / scale, z: (p.z - cz) / scale });\n}\n\n// ---------------------------------------------------------------------------\n// Axis helpers shared by the 2-D plots\n// ---------------------------------------------------------------------------\n\n/** Upper bound on generated ticks, whatever the requested count. */\nconst MAX_TICKS = 50;\n\n/** Decimal places needed to tell ticks `step` apart (0 for whole steps). */\nfunction stepDecimals(step: number): number {\n if (!Number.isFinite(step) || step <= 0) return 0;\n return Math.min(100, Math.max(0, Math.ceil(-Math.log10(step) - 1e-9)));\n}\n\n/**\n * Rounded, human-friendly tick values across [min, max].\n *\n * Each tick is computed from its index (never by repeated addition) and the\n * loop is bounded, so a step below the floating-point spacing of the range\n * cannot spin forever; rounding uses the step's own precision so very small\n * scientific values (e.g. fluxes of 1e-15) keep distinct ticks. Ticks that\n * collapse to the same representable value are emitted once.\n */\nexport function niceTicks(min: number, max: number, count: number): number[] {\n if (!Number.isFinite(min) || !Number.isFinite(max) || min === max) return [min];\n const rawStep = (max - min) / Math.max(1, count);\n const mag = Math.pow(10, Math.floor(Math.log10(rawStep)));\n const norm = rawStep / mag;\n const step = (norm < 1.5 ? 1 : norm < 3 ? 2 : norm < 7 ? 5 : 10) * mag;\n // Number#toFixed accepts at most 100 digits.\n const decimals = Math.min(100, stepDecimals(step) + 1);\n const start = Math.ceil(min / step) * step;\n const ticks: number[] = [];\n for (let i = 0; i < MAX_TICKS; i += 1) {\n const raw = start + i * step;\n if (raw > max + step * 1e-6) break;\n const value = Number(raw.toFixed(decimals));\n if (ticks.length === 0 || ticks[ticks.length - 1] !== value) ticks.push(value);\n }\n return ticks.length > 0 ? ticks : [min];\n}\n\n/** Spacing between adjacent ticks, or undefined when there is only one. */\nexport function tickStep(ticks: number[]): number | undefined {\n return ticks.length > 1 ? Math.abs(ticks[1] - ticks[0]) : undefined;\n}\n\n/**\n * Compact tick label. When the tick spacing is known, the label keeps enough\n * precision to tell adjacent ticks apart (MJD 60200 vs 60201, or 1.0e-15 vs\n * 1.5e-15) instead of a fixed number of significant digits.\n */\nexport function formatTick(value: number, step?: number): string {\n if (value === 0) return '0';\n const abs = Math.abs(value);\n const hasStep = step !== undefined && Number.isFinite(step) && step > 0;\n if (abs < 1e-3 || abs >= 1e6) {\n if (!hasStep) return value.toExponential(1);\n const digits = Math.floor(Math.log10(abs)) - Math.floor(Math.log10(step)) + 1;\n return value.toExponential(Math.min(15, Math.max(1, digits - 1)));\n }\n if (!hasStep) {\n return Number(value.toPrecision(4)).toLocaleString(undefined, { maximumFractionDigits: 4 });\n }\n return value.toLocaleString(undefined, {\n maximumFractionDigits: Math.min(20, stepDecimals(step)),\n });\n}\n\n/**\n * Evenly downsample a long series so the SVG stays light on huge payloads.\n * The first and last items are always kept, so a thinned path still ends\n * where the data ends.\n */\nexport function downsample<T>(items: T[], max: number): T[] {\n if (items.length <= max) return items;\n if (max <= 1) return items.slice(0, Math.max(0, max));\n const stride = (items.length - 1) / (max - 1);\n const out: T[] = [];\n for (let i = 0; i < max; i += 1) out.push(items[Math.floor(i * stride)]);\n return out;\n}\n\n/**\n * Thin an x-sorted 2-D series to at most `max` points without losing the\n * features a scientist looks for. The series is split into `max / 2` buckets\n * and each bucket keeps its lowest and highest point (by y − err and y + err,\n * so the largest error bars survive too), in x order. Absorption and emission\n * peaks, flare maxima and eclipse minima therefore always remain visible,\n * which an even stride cannot guarantee. A thinned `step` series is redrawn\n * from these extremes, so its steps show each bucket's range rather than every\n * original bin; the view's thinning note says so.\n */\nexport function decimateSeries(points: Point2D[], max: number): Point2D[] {\n if (points.length <= max) return points;\n const buckets = Math.max(1, Math.floor(max / 2));\n const size = points.length / buckets;\n const out: Point2D[] = [];\n for (let b = 0; b < buckets; b += 1) {\n const start = Math.floor(b * size);\n const end = Math.min(points.length, Math.floor((b + 1) * size));\n let lo = start;\n let hi = start;\n for (let i = start; i < end; i += 1) {\n const p = points[i];\n const err = p.err ?? 0;\n if (p.y - err < points[lo].y - (points[lo].err ?? 0)) lo = i;\n if (p.y + err > points[hi].y + (points[hi].err ?? 0)) hi = i;\n }\n if (lo === hi) out.push(points[lo]);\n else if (lo < hi) out.push(points[lo], points[hi]);\n else out.push(points[hi], points[lo]);\n }\n return out;\n}\n\n/**\n * Number repeated tab labels (\"Spectrum 1\", \"Spectrum 2\") so untitled views of\n * the same kind stay distinguishable; unique labels are left as they are.\n */\nexport function tabLabels(\n labels: string[],\n numbered: (label: string, n: number) => string\n): string[] {\n const totals = new Map<string, number>();\n for (const label of labels) totals.set(label, (totals.get(label) ?? 0) + 1);\n const seen = new Map<string, number>();\n return labels.map((label) => {\n if ((totals.get(label) ?? 0) < 2) return label;\n const n = (seen.get(label) ?? 0) + 1;\n seen.set(label, n);\n return numbered(label, n);\n });\n}\n\n/**\n * Index of the point nearest to (`x`, `y`) in screen space, or -1 when no\n * point lies within `maxDistance`. Plots use it to turn a tap anywhere near a\n * line, step or scatter series into a readout of the closest measurement.\n */\nexport function nearestPoint(\n points: Array<{ x: number; y: number }>,\n x: number,\n y: number,\n maxDistance: number\n): number {\n let best = -1;\n let bestDistance = maxDistance;\n for (let i = 0; i < points.length; i += 1) {\n const d = Math.hypot(points[i].x - x, points[i].y - y);\n if (d <= bestDistance) {\n best = i;\n bestDistance = d;\n }\n }\n return best;\n}\n\n/**\n * A measured value at full precision, for readouts and data tables: unlike\n * {@link formatTick} it never rounds, so 1.23456e-15 or MJD 60200.123456\n * read back exactly as recorded.\n */\nexport function formatValue(value: number): string {\n return Object.is(value, -0) ? '0' : String(value);\n}\n"],"mappings":";AAuBA,IAAa,IAA4C;CAAC;CAAa;CAAU;AAAiB,GAyErF,IAAwB;AAIrC,SAAS,EAAS,GAA8B;CAC9C,OAAO,OAAO,KAAU,cAAY,KAAkB,CAAC,MAAM,QAAQ,CAAK;AAC5E;AAEA,SAAS,EAAe,GAAiC;CACvD,OAAO,OAAO,KAAU,YAAY,OAAO,SAAS,CAAK;AAC3D;AAEA,SAAS,EAAK,GAAoC;CAChD,OAAO,OAAO,KAAU,YAAY,EAAM,KAAK,IAAI,EAAM,KAAK,IAAI,KAAA;AACpE;AAEA,SAAS,EAAwB,GAAgB,GAAuB,GAAgB;CACtF,OAAO,OAAO,KAAU,YAAa,EAA8B,SAAS,CAAK,IAC5E,IACD;AACN;AAGA,SAAgB,EAAU,GAA2B,GAA0B,GAAkB;CAC/F,IAAM,IAAO,KAAS;CACtB,OAAO,IAAO,GAAG,EAAK,IAAI,EAAK,KAAK;AACtC;AAEA,SAAS,EAAU,GAA8B;CAC/C,IAAI,MAAM,QAAQ,CAAG,GAAG;EACtB,IAAM,CAAC,GAAG,GAAG,KAAO;EAEpB,OADI,CAAC,EAAe,CAAC,KAAK,CAAC,EAAe,CAAC,IAAU,OAC9C,EAAe,CAAG,IAAI;GAAE;GAAG;GAAG,KAAK,KAAK,IAAI,CAAG;EAAE,IAAI;GAAE;GAAG;EAAE;CACrE;CAMA,OALI,EAAS,CAAG,KAAK,EAAe,E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AI,CAAK,KAAK,KAAK,GAAG,OAAO;EACzC,IAAM,KAAK,EAAK,IAAI,CAAK,KAAK,KAAK;EAEnC,OADA,EAAK,IAAI,GAAO,CAAC,GACV,EAAS,GAAO,CAAC;CAC1B,CAAC;AACH;AAOA,SAAgB,EACd,GACA,GACA,GACA,GACQ;CACR,IAAI,IAAO,IACP,IAAe;CACnB,KAAK,IAAI,IAAI,GAAG,IAAI,EAAO,QAAQ,KAAK,GAAG;EACzC,IAAM,IAAI,KAAK,MAAM,EAAO,EAAE,CAAC,IAAI,GAAG,EAAO,EAAE,CAAC,IAAI,CAAC;EACrD,AAAI,KAAK,MACP,IAAO,GACP,IAAe;CAEnB;CACA,OAAO;AACT;AAOA,SAAgB,EAAY,GAAuB;CACjD,OAAO,OAAO,GAAG,GAAO,EAAE,IAAI,MAAM,OAAO,CAAK;AAClD"}
1
+ {"version":3,"file":"visualization.js","names":["SKY_PROJECTIONS","MAX_ELEMENTS_PER_VIEW","isObject","value","isFiniteNumber","text","oneOf","allowed","fallback","axisTitle","base","label","unit","toPoint2D","raw","x","y","err","toPoint3D","z","point","arrayOf","parseSkyMap","sources","view","source","parsePlot","series","points","p","i","lines","magnitude","kind","isSpectrum","parseScene","paths","vertices","axes","parseView","extractVisualizations","results","v","viewKindLabel","DEG","projectSky","l","lonDeg","lambda","phi","latDeg","projection","alpha","sinc","theta","delta","DEFAULT_CAMERA","clampPitch","pitch","projectPoint","yaw","camera","x1","y1","z1","sceneNormalizer","minX","minY","minZ","maxX","maxY","maxZ","cx","cy","cz","radius","scale","MAX_TICKS","stepDecimals","step","niceTicks","min","max","rawStep","count","mag","norm","decimals","start","ticks","tickStep","formatTick","abs","hasStep","digits","downsample","items","stride","out","decimateSeries","buckets","size","b","end","lo","hi","tabLabels","totals","labels","seen","n","numbered","nearestPoint","best","bestDistance","maxDistance","d","formatValue"],"sources":["../../../src/cosmicintersection/lib/visualization.ts"],"sourcesContent":["/**\n * Canonical scientific-visualization payloads for analysis results (BOFF-3984).\n *\n * `cosCompleteAnalysis` persists free-form `results` JSON. A producer opts in to\n * a domain view by adding `results.visualization` (one view) or\n * `results.visualizations` (a list of up to 8). The backend validates these\n * shapes at write time (wspace-cosmicintersection-svc `visualization.ts`); this\n * module normalises them for rendering and is deliberately lenient, so a row\n * written before validation existed degrades to \"fewer elements\", never a crash.\n *\n * skymap { sources: [{ ra, dec, label?, value? }], projection?, frame?, valueLabel? }\n * spectrum { series: [{ name?, style?, points }], lines?: [{ x, label? }], x/y labels+units }\n * lightcurve { series: [...], magnitude?: boolean, x/y labels+units }\n * scene3d { points?: [{ x, y, z, label?, value? }], paths?: [{ name?, points }], axes? }\n *\n * 2-D points are `[x, y]`, `[x, y, err]` or `{ x, y, err? }`; 3-D points are\n * `[x, y, z]` or `{ x, y, z }`. Angles are degrees.\n */\n\nexport type SkyProjection = 'mollweide' | 'aitoff' | 'equirectangular';\nexport type SkyFrame = 'icrs' | 'galactic' | 'ecliptic';\nexport type SeriesStyle = 'line' | 'scatter' | 'step';\n\nexport const SKY_PROJECTIONS: readonly SkyProjection[] = ['mollweide', 'aitoff', 'equirectangular'];\n\nexport interface SkySource {\n ra: number;\n dec: number;\n label?: string;\n value?: number;\n}\n\nexport interface Point2D {\n x: number;\n y: number;\n err?: number;\n}\n\nexport interface Series2D {\n name: string;\n style: SeriesStyle;\n points: Point2D[];\n}\n\nexport interface MarkerLine {\n x: number;\n label?: string;\n}\n\nexport interface Point3D {\n x: number;\n y: number;\n z: number;\n label?: string;\n value?: number;\n}\n\nexport interface Path3D {\n name: string;\n points: Point3D[];\n}\n\ninterface ViewBase {\n title?: string;\n description?: string;\n}\n\nexport interface SkyMapView extends ViewBase {\n kind: 'skymap';\n projection: SkyProjection;\n frame: SkyFrame;\n valueLabel?: string;\n sources: SkySource[];\n}\n\nexport interface PlotView extends ViewBase {\n kind: 'spectrum' | 'lightcurve';\n xLabel: string;\n yLabel: string;\n /** Light curves in magnitudes plot brighter (smaller) values higher. */\n invertY: boolean;\n series: Series2D[];\n lines: MarkerLine[];\n}\n\nexport interface Scene3DView extends ViewBase {\n kind: 'scene3d';\n axes: { x: string; y: string; z: string };\n points: Point3D[];\n paths: Path3D[];\n}\n\nexport type VisualizationView = SkyMapView | PlotView | Scene3DView;\n\nexport const MAX_VISUALIZATIONS = 8;\n/** Matches the backend cap; extra elements are dropped rather than rendered. */\nexport const MAX_ELEMENTS_PER_VIEW = 20_000;\n\ntype Obj = Record<string, unknown>;\n\nfunction isObject(value: unknown): value is Obj {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\nfunction isFiniteNumber(value: unknown): value is number {\n return typeof value === 'number' && Number.isFinite(value);\n}\n\nfunction text(value: unknown): string | undefined {\n return typeof value === 'string' && value.trim() ? value.trim() : undefined;\n}\n\nfunction oneOf<T extends string>(value: unknown, allowed: readonly T[], fallback: T): T {\n return typeof value === 'string' && (allowed as readonly string[]).includes(value)\n ? (value as T)\n : fallback;\n}\n\n/** \"Wavelength\" + \"nm\" -> \"Wavelength (nm)\". */\nexport function axisTitle(label: string | undefined, unit: string | undefined, fallback: string) {\n const base = label ?? fallback;\n return unit ? `${base} (${unit})` : base;\n}\n\nfunction toPoint2D(raw: unknown): Point2D | null {\n if (Array.isArray(raw)) {\n const [x, y, err] = raw;\n if (!isFiniteNumber(x) || !isFiniteNumber(y)) return null;\n return isFiniteNumber(err) ? { x, y, err: Math.abs(err) } : { x, y };\n }\n if (isObject(raw) && isFiniteNumber(raw.x) && isFiniteNumber(raw.y)) {\n return isFiniteNumber(raw.err)\n ? { x: raw.x, y: raw.y, err: Math.abs(raw.err) }\n : { x: raw.x, y: raw.y };\n }\n return null;\n}\n\nfunction toPoint3D(raw: unknown): Point3D | null {\n if (Array.isArray(raw)) {\n const [x, y, z] = raw;\n return isFiniteNumber(x) && isFiniteNumber(y) && isFiniteNumber(z) ? { x, y, z } : null;\n }\n if (isObject(raw) && isFiniteNumber(raw.x) && isFiniteNumber(raw.y) && isFiniteNumber(raw.z)) {\n const point: Point3D = { x: raw.x, y: raw.y, z: raw.z };\n const label = text(raw.label);\n if (label) point.label = label;\n if (isFiniteNumber(raw.value)) point.value = raw.value;\n return point;\n }\n return null;\n}\n\nfunction arrayOf(value: unknown): unknown[] {\n return Array.isArray(value) ? value.slice(0, MAX_ELEMENTS_PER_VIEW) : [];\n}\n\nfunction parseSkyMap(view: Obj): SkyMapView | null {\n const sources: SkySource[] = [];\n for (const raw of arrayOf(view.sources)) {\n if (!isObject(raw) || !isFiniteNumber(raw.ra) || !isFiniteNumber(raw.dec)) continue;\n if (raw.ra < 0 || raw.ra > 360 || raw.dec < -90 || raw.dec > 90) continue;\n const source: SkySource = { ra: raw.ra, dec: raw.dec };\n const label = text(raw.label);\n if (label) source.label = label;\n if (isFiniteNumber(raw.value)) source.value = raw.value;\n sources.push(source);\n }\n if (sources.length === 0) return null;\n return {\n kind: 'skymap',\n title: text(view.title),\n description: text(view.description),\n projection: oneOf(view.projection, SKY_PROJECTIONS, 'mollweide'),\n frame: oneOf(view.frame, ['icrs', 'galactic', 'ecliptic'] as const, 'icrs'),\n valueLabel: text(view.valueLabel),\n sources,\n };\n}\n\nfunction parsePlot(view: Obj, kind: 'spectrum' | 'lightcurve'): PlotView | null {\n const series: Series2D[] = [];\n arrayOf(view.series).forEach((raw, i) => {\n if (!isObject(raw)) return;\n const points = arrayOf(raw.points)\n .map(toPoint2D)\n .filter((p): p is Point2D => p !== null);\n if (points.length < 2) return;\n series.push({\n name: text(raw.name) ?? `Series ${i + 1}`,\n style: oneOf(raw.style, ['line', 'scatter', 'step'] as const, 'line'),\n points,\n });\n });\n if (series.length === 0) return null;\n const lines: MarkerLine[] = [];\n for (const raw of arrayOf(view.lines)) {\n if (!isObject(raw) || !isFiniteNumber(raw.x)) continue;\n lines.push({ x: raw.x, label: text(raw.label) });\n }\n const magnitude = kind === 'lightcurve' && view.magnitude === true;\n const isSpectrum = kind === 'spectrum';\n return {\n kind,\n title: text(view.title),\n description: text(view.description),\n xLabel: axisTitle(text(view.xLabel), text(view.xUnit), isSpectrum ? 'Wavelength' : 'Time'),\n yLabel: axisTitle(\n text(view.yLabel),\n text(view.yUnit),\n isSpectrum ? 'Flux' : magnitude ? 'Magnitude' : 'Flux'\n ),\n invertY: magnitude,\n series,\n lines,\n };\n}\n\nfunction parseScene(view: Obj): Scene3DView | null {\n const points = arrayOf(view.points)\n .map(toPoint3D)\n .filter((p): p is Point3D => p !== null);\n const paths: Path3D[] = [];\n arrayOf(view.paths).forEach((raw, i) => {\n if (!isObject(raw)) return;\n const vertices = arrayOf(raw.points)\n .map(toPoint3D)\n .filter((p): p is Point3D => p !== null);\n if (vertices.length >= 2)\n paths.push({ name: text(raw.name) ?? `Path ${i + 1}`, points: vertices });\n });\n if (points.length === 0 && paths.length === 0) return null;\n const axes = isObject(view.axes) ? view.axes : {};\n return {\n kind: 'scene3d',\n title: text(view.title),\n description: text(view.description),\n axes: { x: text(axes.x) ?? 'x', y: text(axes.y) ?? 'y', z: text(axes.z) ?? 'z' },\n points,\n paths,\n };\n}\n\nfunction parseView(raw: unknown): VisualizationView | null {\n if (!isObject(raw)) return null;\n switch (raw.kind) {\n case 'skymap':\n return parseSkyMap(raw);\n case 'spectrum':\n return parsePlot(raw, 'spectrum');\n case 'lightcurve':\n return parsePlot(raw, 'lightcurve');\n case 'scene3d':\n return parseScene(raw);\n default:\n return null;\n }\n}\n\n/** Every renderable canonical view in an analysis `results` payload (may be empty). */\nexport function extractVisualizations(results: unknown): VisualizationView[] {\n if (!isObject(results)) return [];\n const raw: unknown[] = [];\n if (results.visualization !== undefined) raw.push(results.visualization);\n if (Array.isArray(results.visualizations)) raw.push(...results.visualizations);\n return raw\n .slice(0, MAX_VISUALIZATIONS)\n .map(parseView)\n .filter((v): v is VisualizationView => v !== null);\n}\n\n/** The view kind's display name, used for tabs and fallback titles. */\nexport function viewKindLabel(kind: VisualizationView['kind']): string {\n switch (kind) {\n case 'skymap':\n return 'Sky map';\n case 'spectrum':\n return 'Spectrum';\n case 'lightcurve':\n return 'Light curve';\n case 'scene3d':\n return '3-D scene';\n }\n}\n\n// ---------------------------------------------------------------------------\n// Sky projections\n// ---------------------------------------------------------------------------\n\nconst DEG = Math.PI / 180;\n\n/**\n * Project equatorial (or galactic) coordinates to normalised plane coordinates\n * in [-1, 1] x [-0.5, 0.5] (a 2:1 frame). Astronomical convention: longitude\n * increases to the LEFT (east is left when looking at the sky), centred on 180°.\n */\nexport function projectSky(\n lonDeg: number,\n latDeg: number,\n projection: SkyProjection\n): { x: number; y: number } {\n // Longitude relative to the centre, wrapped to [-180, 180], flipped east-left.\n let l = ((((lonDeg - 180) % 360) + 540) % 360) - 180;\n l = -l;\n const lambda = l * DEG;\n const phi = latDeg * DEG;\n\n if (projection === 'equirectangular') {\n return { x: l / 180, y: latDeg / 180 };\n }\n\n if (projection === 'aitoff') {\n // Clamp: rounding can push the product a hair above 1, and acos would return NaN.\n const alpha = Math.acos(Math.min(1, Math.cos(phi) * Math.cos(lambda / 2)));\n const sinc = alpha === 0 ? 1 : Math.sin(alpha) / alpha;\n const x = (2 * Math.cos(phi) * Math.sin(lambda / 2)) / sinc;\n const y = Math.sin(phi) / sinc;\n // Aitoff spans x in [-pi, pi], y in [-pi/2, pi/2].\n return { x: x / Math.PI, y: y / Math.PI };\n }\n\n // Mollweide: solve 2θ + sin 2θ = π sin φ by Newton iteration.\n let theta = phi;\n if (Math.abs(Math.abs(phi) - Math.PI / 2) < 1e-9) {\n theta = phi;\n } else {\n for (let i = 0; i < 50; i += 1) {\n const delta =\n -(2 * theta + Math.sin(2 * theta) - Math.PI * Math.sin(phi)) /\n (2 + 2 * Math.cos(2 * theta));\n theta += delta;\n if (Math.abs(delta) < 1e-10) break;\n }\n }\n const x = ((2 * Math.SQRT2) / Math.PI) * lambda * Math.cos(theta);\n const y = Math.SQRT2 * Math.sin(theta);\n // Mollweide spans x in [-2√2, 2√2], y in [-√2, √2].\n return { x: x / (2 * Math.SQRT2), y: y / (2 * Math.SQRT2) };\n}\n\n// ---------------------------------------------------------------------------\n// 3-D projection\n// ---------------------------------------------------------------------------\n\nexport interface Camera {\n /** Rotation about the vertical axis, degrees. */\n yaw: number;\n /** Rotation about the horizontal axis, degrees (clamped to ±89). */\n pitch: number;\n}\n\nexport const DEFAULT_CAMERA: Camera = { yaw: 35, pitch: 25 };\n\nexport function clampPitch(pitch: number): number {\n return Math.max(-89, Math.min(89, pitch));\n}\n\n/**\n * Orthographic projection of a point (already centred and scaled to roughly\n * unit size) for the given camera. Returns screen-plane x/y (y up) and a depth\n * where larger means nearer the viewer.\n */\nexport function projectPoint(\n p: { x: number; y: number; z: number },\n camera: Camera\n): { x: number; y: number; depth: number } {\n const yaw = camera.yaw * DEG;\n const pitch = camera.pitch * DEG;\n // Data convention: z is \"up\". Rotate about z (yaw), then tilt about x (pitch).\n const x1 = p.x * Math.cos(yaw) - p.y * Math.sin(yaw);\n const y1 = p.x * Math.sin(yaw) + p.y * Math.cos(yaw);\n const z1 = p.z;\n const screenY = z1 * Math.cos(pitch) - y1 * Math.sin(pitch);\n const depth = -(z1 * Math.sin(pitch) + y1 * Math.cos(pitch));\n return { x: x1, y: screenY, depth };\n}\n\n/**\n * Centre + uniform scale that fits every point inside a unit sphere.\n *\n * The scale is the bounding radius (the farthest point from the box centre),\n * not the largest half-extent: a unit cube's corners sit at sqrt(3), so a\n * half-extent scale would let rotation carry valid points outside the canvas.\n */\nexport function sceneNormalizer(points: Point3D[]): (p: Point3D) => Point3D {\n if (points.length === 0) return (p) => p;\n let minX = Infinity;\n let minY = Infinity;\n let minZ = Infinity;\n let maxX = -Infinity;\n let maxY = -Infinity;\n let maxZ = -Infinity;\n for (const p of points) {\n minX = Math.min(minX, p.x);\n minY = Math.min(minY, p.y);\n minZ = Math.min(minZ, p.z);\n maxX = Math.max(maxX, p.x);\n maxY = Math.max(maxY, p.y);\n maxZ = Math.max(maxZ, p.z);\n }\n const cx = (minX + maxX) / 2;\n const cy = (minY + maxY) / 2;\n const cz = (minZ + maxZ) / 2;\n let radius = 0;\n for (const p of points) {\n radius = Math.max(radius, Math.hypot(p.x - cx, p.y - cy, p.z - cz));\n }\n const scale = radius || 1;\n return (p) => ({ ...p, x: (p.x - cx) / scale, y: (p.y - cy) / scale, z: (p.z - cz) / scale });\n}\n\n// ---------------------------------------------------------------------------\n// Axis helpers shared by the 2-D plots\n// ---------------------------------------------------------------------------\n\n/** Upper bound on generated ticks, whatever the requested count. */\nconst MAX_TICKS = 50;\n\n/** Decimal places needed to tell ticks `step` apart (0 for whole steps). */\nfunction stepDecimals(step: number): number {\n if (!Number.isFinite(step) || step <= 0) return 0;\n return Math.min(100, Math.max(0, Math.ceil(-Math.log10(step) - 1e-9)));\n}\n\n/**\n * Rounded, human-friendly tick values across [min, max].\n *\n * Each tick is computed from its index (never by repeated addition) and the\n * loop is bounded, so a step below the floating-point spacing of the range\n * cannot spin forever; rounding uses the step's own precision so very small\n * scientific values (e.g. fluxes of 1e-15) keep distinct ticks. Ticks that\n * collapse to the same representable value are emitted once.\n */\nexport function niceTicks(min: number, max: number, count: number): number[] {\n if (!Number.isFinite(min) || !Number.isFinite(max) || min === max) return [min];\n const rawStep = (max - min) / Math.max(1, count);\n const mag = Math.pow(10, Math.floor(Math.log10(rawStep)));\n const norm = rawStep / mag;\n const step = (norm < 1.5 ? 1 : norm < 3 ? 2 : norm < 7 ? 5 : 10) * mag;\n // Number#toFixed accepts at most 100 digits.\n const decimals = Math.min(100, stepDecimals(step) + 1);\n const start = Math.ceil(min / step) * step;\n const ticks: number[] = [];\n for (let i = 0; i < MAX_TICKS; i += 1) {\n const raw = start + i * step;\n if (raw > max + step * 1e-6) break;\n const value = Number(raw.toFixed(decimals));\n if (ticks.length === 0 || ticks[ticks.length - 1] !== value) ticks.push(value);\n }\n return ticks.length > 0 ? ticks : [min];\n}\n\n/** Spacing between adjacent ticks, or undefined when there is only one. */\nexport function tickStep(ticks: number[]): number | undefined {\n return ticks.length > 1 ? Math.abs(ticks[1] - ticks[0]) : undefined;\n}\n\n/**\n * Compact tick label. When the tick spacing is known, the label keeps enough\n * precision to tell adjacent ticks apart (MJD 60200 vs 60201, or 1.0e-15 vs\n * 1.5e-15) instead of a fixed number of significant digits.\n */\nexport function formatTick(value: number, step?: number): string {\n if (value === 0) return '0';\n const abs = Math.abs(value);\n const hasStep = step !== undefined && Number.isFinite(step) && step > 0;\n if (abs < 1e-3 || abs >= 1e6) {\n if (!hasStep) return value.toExponential(1);\n const digits = Math.floor(Math.log10(abs)) - Math.floor(Math.log10(step)) + 1;\n return value.toExponential(Math.min(15, Math.max(1, digits - 1)));\n }\n if (!hasStep) {\n return Number(value.toPrecision(4)).toLocaleString(undefined, { maximumFractionDigits: 4 });\n }\n return value.toLocaleString(undefined, {\n maximumFractionDigits: Math.min(20, stepDecimals(step)),\n });\n}\n\n/**\n * Evenly downsample a long series so the SVG stays light on huge payloads.\n * The first and last items are always kept, so a thinned path still ends\n * where the data ends.\n */\nexport function downsample<T>(items: T[], max: number): T[] {\n if (items.length <= max) return items;\n if (max <= 1) return items.slice(0, Math.max(0, max));\n const stride = (items.length - 1) / (max - 1);\n const out: T[] = [];\n for (let i = 0; i < max; i += 1) out.push(items[Math.floor(i * stride)]);\n return out;\n}\n\n/**\n * Thin an x-sorted 2-D series to at most `max` points without losing the\n * features a scientist looks for. The series is split into `max / 2` buckets\n * and each bucket keeps its lowest and highest point (by y − err and y + err,\n * so the largest error bars survive too), in x order. Absorption and emission\n * peaks, flare maxima and eclipse minima therefore always remain visible,\n * which an even stride cannot guarantee. A thinned `step` series is redrawn\n * from these extremes, so its steps show each bucket's range rather than every\n * original bin; the view's thinning note says so.\n */\nexport function decimateSeries(points: Point2D[], max: number): Point2D[] {\n if (points.length <= max) return points;\n const buckets = Math.max(1, Math.floor(max / 2));\n const size = points.length / buckets;\n const out: Point2D[] = [];\n for (let b = 0; b < buckets; b += 1) {\n const start = Math.floor(b * size);\n const end = Math.min(points.length, Math.floor((b + 1) * size));\n let lo = start;\n let hi = start;\n for (let i = start; i < end; i += 1) {\n const p = points[i];\n const err = p.err ?? 0;\n if (p.y - err < points[lo].y - (points[lo].err ?? 0)) lo = i;\n if (p.y + err > points[hi].y + (points[hi].err ?? 0)) hi = i;\n }\n if (lo === hi) out.push(points[lo]);\n else if (lo < hi) out.push(points[lo], points[hi]);\n else out.push(points[hi], points[lo]);\n }\n return out;\n}\n\n/**\n * Number repeated tab labels (\"Spectrum 1\", \"Spectrum 2\") so untitled views of\n * the same kind stay distinguishable; unique labels are left as they are.\n */\nexport function tabLabels(\n labels: string[],\n numbered: (label: string, n: number) => string\n): string[] {\n const totals = new Map<string, number>();\n for (const label of labels) totals.set(label, (totals.get(label) ?? 0) + 1);\n const seen = new Map<string, number>();\n return labels.map((label) => {\n if ((totals.get(label) ?? 0) < 2) return label;\n const n = (seen.get(label) ?? 0) + 1;\n seen.set(label, n);\n return numbered(label, n);\n });\n}\n\n/**\n * Index of the point nearest to (`x`, `y`) in screen space, or -1 when no\n * point lies within `maxDistance`. Plots use it to turn a tap anywhere near a\n * line, step or scatter series into a readout of the closest measurement.\n */\nexport function nearestPoint(\n points: Array<{ x: number; y: number }>,\n x: number,\n y: number,\n maxDistance: number\n): number {\n let best = -1;\n let bestDistance = maxDistance;\n for (let i = 0; i < points.length; i += 1) {\n const d = Math.hypot(points[i].x - x, points[i].y - y);\n if (d <= bestDistance) {\n best = i;\n bestDistance = d;\n }\n }\n return best;\n}\n\n/**\n * A measured value at full precision, for readouts and data tables: unlike\n * {@link formatTick} it never rounds, so 1.23456e-15 or MJD 60200.123456\n * read back exactly as recorded.\n */\nexport function formatValue(value: number): string {\n return Object.is(value, -0) ? '0' : String(value);\n}\n"],"mappings":";AAuBA,IAAaA,IAA4C;CAAC;CAAa;CAAU;AAAiB,GAyErFC,IAAwB;AAIrC,SAASC,EAAS,GAA8B;CAC9C,OAAO,OAAOC,KAAU,cAAYA,KAAkB,CAAC,MAAM,QAAQA,CAAK;AAC5E;AAEA,SAASC,EAAe,GAAiC;CACvD,OAAO,OA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;CACV,IAAMC,oBAAS,IAAI,IAAoB;CACvC,KAAK,IAAMhG,KAASiG,GAAQ,EAAO,IAAIjG,IAAQgG,EAAO,IAAIhG,CAAK,KAAK,KAAK,CAAC;CAC1E,IAAMkG,oBAAO,IAAI,IAAoB;CACrC,OAAOD,EAAO,KAAK,MAAU;EAC3B,KAAKD,EAAO,IAAIhG,CAAK,KAAK,KAAK,GAAG,OAAOA;EACzC,IAAMmG,KAAKD,EAAK,IAAIlG,CAAK,KAAK,KAAK;EAEnC,OADAkG,EAAK,IAAIlG,GAAOmG,CAAC,GACVC,EAASpG,GAAOmG,CAAC;CAC1B,CAAC;AACH;AAOA,SAAgBE,EACd,GACA,GACA,GACA,GACQ;CACR,IAAIC,IAAO,IACPC,IAAeC;CACnB,KAAK,IAAIrF,IAAI,GAAGA,IAAIF,EAAO,QAAQ,KAAK,GAAG;EACzC,IAAMwF,IAAI,KAAK,MAAMxF,EAAOE,EAAE,CAAC,IAAIf,GAAGa,EAAOE,EAAE,CAAC,IAAId,CAAC;EACrD,AAAIoG,KAAKF,MACP,IAAOpF,GACP,IAAesF;CAEnB;CACA,OAAOH;AACT;AAOA,SAAgBI,EAAY,GAAuB;CACjD,OAAO,OAAO,GAAGlH,GAAO,EAAE,IAAI,MAAM,OAAOA,CAAK;AAClD"}
@@ -77,4 +77,3 @@ export declare const SAMPLE_SCENE3D: {
77
77
  points: number[][];
78
78
  }[];
79
79
  };
80
- //# sourceMappingURL=visualizationSamples.d.ts.map
@@ -1,2 +1 @@
1
1
  export default function AccessPage(): import('react').JSX.Element;
2
- //# sourceMappingURL=AccessPage.d.ts.map