@burdenoff/microfe-cosmicintersection 2026.704.1 → 2026.704.3

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 (59) hide show
  1. package/dist/cosmicintersection/CosmicIntersectionRoutes.js +45 -25
  2. package/dist/cosmicintersection/CosmicIntersectionRoutes.js.map +1 -1
  3. package/dist/cosmicintersection/api/cosmicApi.js +137 -66
  4. package/dist/cosmicintersection/api/cosmicApi.js.map +1 -1
  5. package/dist/cosmicintersection/components/ActivityFeedPanel.js +68 -0
  6. package/dist/cosmicintersection/components/ActivityFeedPanel.js.map +1 -0
  7. package/dist/cosmicintersection/components/DiscussionPanel.js +57 -0
  8. package/dist/cosmicintersection/components/DiscussionPanel.js.map +1 -0
  9. package/dist/cosmicintersection/components/FacetPanel.js +66 -0
  10. package/dist/cosmicintersection/components/FacetPanel.js.map +1 -0
  11. package/dist/cosmicintersection/components/LineageGraph.js +388 -0
  12. package/dist/cosmicintersection/components/LineageGraph.js.map +1 -0
  13. package/dist/cosmicintersection/components/ResultsChart.js +329 -0
  14. package/dist/cosmicintersection/components/ResultsChart.js.map +1 -0
  15. package/dist/cosmicintersection/components/StepDAG.js +104 -0
  16. package/dist/cosmicintersection/components/StepDAG.js.map +1 -0
  17. package/dist/cosmicintersection/components/index.js +5 -3
  18. package/dist/cosmicintersection/pages/access/AccessPage.js +220 -161
  19. package/dist/cosmicintersection/pages/access/AccessPage.js.map +1 -1
  20. package/dist/cosmicintersection/pages/analyses/AnalysesPage.js +332 -172
  21. package/dist/cosmicintersection/pages/analyses/AnalysesPage.js.map +1 -1
  22. package/dist/cosmicintersection/pages/collections/CollectionDetailPage.js +167 -109
  23. package/dist/cosmicintersection/pages/collections/CollectionDetailPage.js.map +1 -1
  24. package/dist/cosmicintersection/pages/collections/CollectionFormPage.js +87 -61
  25. package/dist/cosmicintersection/pages/collections/CollectionFormPage.js.map +1 -1
  26. package/dist/cosmicintersection/pages/collections/CollectionsPage.js +51 -42
  27. package/dist/cosmicintersection/pages/collections/CollectionsPage.js.map +1 -1
  28. package/dist/cosmicintersection/pages/dashboard/DashboardPage.js +31 -18
  29. package/dist/cosmicintersection/pages/dashboard/DashboardPage.js.map +1 -1
  30. package/dist/cosmicintersection/pages/datasets/DatasetDetailPage.js +330 -184
  31. package/dist/cosmicintersection/pages/datasets/DatasetDetailPage.js.map +1 -1
  32. package/dist/cosmicintersection/pages/datasets/DatasetFormPage.js +7 -7
  33. package/dist/cosmicintersection/pages/datasets/DatasetsPage.js +321 -163
  34. package/dist/cosmicintersection/pages/datasets/DatasetsPage.js.map +1 -1
  35. package/dist/cosmicintersection/pages/discovery/DiscoveryPage.js +358 -0
  36. package/dist/cosmicintersection/pages/discovery/DiscoveryPage.js.map +1 -0
  37. package/dist/cosmicintersection/pages/lineage/LineagePage.js +171 -0
  38. package/dist/cosmicintersection/pages/lineage/LineagePage.js.map +1 -0
  39. package/dist/cosmicintersection/pages/notebooks/NotebookDetailPage.js +339 -260
  40. package/dist/cosmicintersection/pages/notebooks/NotebookDetailPage.js.map +1 -1
  41. package/dist/cosmicintersection/pages/notebooks/NotebooksPage.js +143 -82
  42. package/dist/cosmicintersection/pages/notebooks/NotebooksPage.js.map +1 -1
  43. package/dist/cosmicintersection/pages/pipelines/PipelineDetailPage.js +286 -142
  44. package/dist/cosmicintersection/pages/pipelines/PipelineDetailPage.js.map +1 -1
  45. package/dist/cosmicintersection/pages/pipelines/PipelineFormPage.js +305 -103
  46. package/dist/cosmicintersection/pages/pipelines/PipelineFormPage.js.map +1 -1
  47. package/dist/cosmicintersection/pages/pipelines/PipelinesPage.js +183 -79
  48. package/dist/cosmicintersection/pages/pipelines/PipelinesPage.js.map +1 -1
  49. package/dist/cosmicintersection/pages/releases/ReleasesPage.js +346 -204
  50. package/dist/cosmicintersection/pages/releases/ReleasesPage.js.map +1 -1
  51. package/dist/cosmicintersection/pages/runs/RunDetailPage.js +184 -136
  52. package/dist/cosmicintersection/pages/runs/RunDetailPage.js.map +1 -1
  53. package/dist/cosmicintersection/pages/runs/RunsPage.js +182 -120
  54. package/dist/cosmicintersection/pages/runs/RunsPage.js.map +1 -1
  55. package/dist/cosmicintersection/pages/sources/SourceDetailPage.js +234 -0
  56. package/dist/cosmicintersection/pages/sources/SourceDetailPage.js.map +1 -0
  57. package/dist/cosmicintersection/pages/sources/SourcesPage.js +250 -133
  58. package/dist/cosmicintersection/pages/sources/SourcesPage.js.map +1 -1
  59. package/package.json +1 -1
@@ -1,22 +1,22 @@
1
1
  import { useCosmicIntersection as e } from "../../context/CosmicIntersectionContext.js";
2
2
  import { notify as t } from "../../lib/toast.js";
3
- import { useCosAnalysesQuery as n, useCosArchiveNotebookMutation as r, useCosNotebookQuery as i, useCosRunAnalysisMutation as a } from "../../api/cosmicApi.js";
4
- import o from "../../components/ActionMenu.js";
5
- import s from "../../components/EmptyState.js";
6
- import c from "../../components/ErrorState.js";
7
- import { useFileDownloadUrl as l } from "../../components/FileUploadField.js";
3
+ import { useCosAnalysesQuery as n, useCosArchiveNotebookMutation as r, useCosDatasetsQuery as i, useCosNotebookQuery as a, useCosRunAnalysisMutation as o } from "../../api/cosmicApi.js";
4
+ import s from "../../components/ActionMenu.js";
5
+ import c from "../../components/EmptyState.js";
6
+ import l from "../../components/ErrorState.js";
8
7
  import u from "../../components/LoadingState.js";
9
- import d from "../../components/PageLayout.js";
10
- import f from "../../components/SafeLink.js";
11
- import p from "../../components/StatusBadge.js";
8
+ import d from "../../components/DiscussionPanel.js";
9
+ import { useFileDownloadUrl as f } from "../../components/FileUploadField.js";
10
+ import p from "../../components/PageLayout.js";
11
+ import m from "../../components/StatusBadge.js";
12
12
  import "../../components/index.js";
13
- import { useState as m } from "react";
14
- import { jsx as h, jsxs as g } from "react/jsx-runtime";
15
- import { useParams as _ } from "react-router-dom";
16
- import { Beaker as v, Download as y, FileCode2 as b, MessageSquare as x, Pencil as S, Play as C, Share2 as w, Sparkles as T } from "lucide-react";
17
- import { Badge as E, Button as D, Dialog as O, DialogContent as k, DialogDescription as A, DialogFooter as j, DialogHeader as M, DialogTitle as N, Input as P, Label as F, Switch as I, Table as L, TableBody as R, TableCell as z, TableHead as B, TableHeader as V, TableRow as H } from "@burdenoff/fe-libs/ui";
13
+ import { useMemo as h, useState as g } from "react";
14
+ import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
15
+ import { useParams as b } from "react-router-dom";
16
+ import { Beaker as x, Database as S, Download as C, FileCode2 as w, MessageSquare as T, Pencil as E, Play as D, Share2 as O, Sparkles as k } from "lucide-react";
17
+ import { Badge as A, Button as j, Dialog as M, DialogContent as N, DialogDescription as P, DialogFooter as F, DialogHeader as I, DialogTitle as L, Input as R, Label as z, Switch as B, Table as ee, TableBody as V, TableCell as H, TableHead as U, TableHeader as W, TableRow as G } from "@burdenoff/fe-libs/ui";
18
18
  //#region src/cosmicintersection/pages/notebooks/NotebookDetailPage.tsx
19
- function U(e) {
19
+ function K(e) {
20
20
  if (!e) return "—";
21
21
  let t = new Date(e);
22
22
  return Number.isNaN(t.getTime()) ? "—" : t.toLocaleString(void 0, {
@@ -27,367 +27,446 @@ function U(e) {
27
27
  minute: "2-digit"
28
28
  });
29
29
  }
30
- function W({ fileId: e, label: t }) {
31
- let { data: n, loading: r } = l(e), i = n?.getFileDownloadUrl ?? null;
32
- return r ? /* @__PURE__ */ h("span", {
30
+ function q({ fileId: e, label: t }) {
31
+ let { data: n, loading: r } = f(e), i = n?.getFileDownloadUrl ?? null;
32
+ return r ? /* @__PURE__ */ v("span", {
33
33
  className: "text-xs text-text-secondary",
34
34
  children: "Resolving link…"
35
- }) : i ? /* @__PURE__ */ g("a", {
35
+ }) : i ? /* @__PURE__ */ y("a", {
36
36
  href: i,
37
37
  target: "_blank",
38
38
  rel: "noopener noreferrer",
39
39
  className: "inline-flex items-center gap-1 text-sm text-text-primary underline-offset-2 hover:underline",
40
- children: [/* @__PURE__ */ h(y, {
40
+ children: [/* @__PURE__ */ v(C, {
41
41
  className: "size-3.5",
42
42
  "aria-hidden": "true"
43
43
  }), t]
44
- }) : /* @__PURE__ */ g("span", {
44
+ }) : /* @__PURE__ */ y("span", {
45
45
  className: "text-xs text-text-secondary",
46
46
  children: ["File ", e]
47
47
  });
48
48
  }
49
- function G({ notebookId: e, open: n, onOpenChange: r, onCompleted: i }) {
50
- let [o, s] = m(""), [c, l] = m(""), [u, d] = m(!1), [f, { loading: p }] = a(), _ = () => {
49
+ function J({ notebookId: e, open: n, onOpenChange: r, onCompleted: i }) {
50
+ let [a, s] = g(""), [c, l] = g(""), [u, d] = g(!1), [f, { loading: p }] = o(), m = () => {
51
51
  s(""), l(""), d(!1);
52
52
  };
53
- return /* @__PURE__ */ h(O, {
53
+ return /* @__PURE__ */ v(M, {
54
54
  open: n,
55
55
  onOpenChange: (e) => {
56
56
  p || r(e);
57
57
  },
58
- children: /* @__PURE__ */ h(k, { children: /* @__PURE__ */ g("form", {
58
+ children: /* @__PURE__ */ v(N, { children: /* @__PURE__ */ y("form", {
59
59
  onSubmit: async (n) => {
60
60
  n.preventDefault();
61
- let a = o.trim();
62
- if (!a) {
61
+ let o = a.trim();
62
+ if (!o) {
63
63
  t.error("Title is required", "Give the analysis a descriptive title.");
64
64
  return;
65
65
  }
66
66
  let s = await f({ variables: { input: {
67
67
  notebookId: e,
68
- title: a,
68
+ title: o,
69
69
  method: c.trim() || void 0,
70
70
  aiAssisted: u
71
71
  } } });
72
- s.error || !s.data?.cosRunAnalysis?.id || (t.success("Analysis started", `“${a}” is now running.`), _(), r(!1), i());
72
+ s.error || !s.data?.cosRunAnalysis?.id || (t.success("Analysis started", `“${o}” is now running.`), m(), r(!1), i());
73
73
  },
74
74
  className: "space-y-4",
75
75
  children: [
76
- /* @__PURE__ */ g(M, { children: [/* @__PURE__ */ h(N, { children: "Run analysis" }), /* @__PURE__ */ h(A, { children: "Launch a new analysis run against this notebook. It starts in the running state and can be completed later with results." })] }),
77
- /* @__PURE__ */ g("div", {
76
+ /* @__PURE__ */ y(I, { children: [/* @__PURE__ */ v(L, { children: "Run analysis" }), /* @__PURE__ */ v(P, { children: "Launch a new analysis run against this notebook. It starts in the running state and can be completed later with results." })] }),
77
+ /* @__PURE__ */ y("div", {
78
78
  className: "space-y-1.5",
79
- children: [/* @__PURE__ */ h(F, {
79
+ children: [/* @__PURE__ */ v(z, {
80
80
  htmlFor: "run-analysis-title",
81
81
  children: "Title"
82
- }), /* @__PURE__ */ h(P, {
82
+ }), /* @__PURE__ */ v(R, {
83
83
  id: "run-analysis-title",
84
- value: o,
84
+ value: a,
85
85
  onChange: (e) => s(e.target.value),
86
86
  placeholder: "e.g. Period-folding search",
87
87
  required: !0
88
88
  })]
89
89
  }),
90
- /* @__PURE__ */ g("div", {
90
+ /* @__PURE__ */ y("div", {
91
91
  className: "space-y-1.5",
92
- children: [/* @__PURE__ */ h(F, {
92
+ children: [/* @__PURE__ */ v(z, {
93
93
  htmlFor: "run-analysis-method",
94
94
  children: "Method"
95
- }), /* @__PURE__ */ h(P, {
95
+ }), /* @__PURE__ */ v(R, {
96
96
  id: "run-analysis-method",
97
97
  value: c,
98
98
  onChange: (e) => l(e.target.value),
99
99
  placeholder: "e.g. box-least-squares"
100
100
  })]
101
101
  }),
102
- /* @__PURE__ */ g("div", {
102
+ /* @__PURE__ */ y("div", {
103
103
  className: "flex items-center gap-3",
104
- children: [/* @__PURE__ */ h(I, {
104
+ children: [/* @__PURE__ */ v(B, {
105
105
  id: "run-analysis-ai",
106
106
  checked: u,
107
107
  onCheckedChange: (e) => d(e)
108
- }), /* @__PURE__ */ h(F, {
108
+ }), /* @__PURE__ */ v(z, {
109
109
  htmlFor: "run-analysis-ai",
110
110
  className: "cursor-pointer",
111
111
  children: "AI-assisted analysis"
112
112
  })]
113
113
  }),
114
- /* @__PURE__ */ g(j, { children: [/* @__PURE__ */ h(D, {
114
+ /* @__PURE__ */ y(F, { children: [/* @__PURE__ */ v(j, {
115
115
  type: "button",
116
116
  variant: "outline",
117
117
  onClick: () => r(!1),
118
118
  disabled: p,
119
119
  children: "Cancel"
120
- }), /* @__PURE__ */ g(D, {
120
+ }), /* @__PURE__ */ y(j, {
121
121
  type: "submit",
122
122
  disabled: p,
123
- children: [/* @__PURE__ */ h(C, { className: "size-4" }), p ? "Starting…" : "Run analysis"]
123
+ children: [/* @__PURE__ */ v(D, { className: "size-4" }), p ? "Starting…" : "Run analysis"]
124
124
  })] })
125
125
  ]
126
126
  }) })
127
127
  });
128
128
  }
129
- function K() {
130
- let { id: a = "" } = _(), { navigate: l } = e(), [y, O] = m(!1), { data: k, loading: A, error: j, refetch: M } = i(a), { data: N, loading: P, error: F, refetch: I } = n({ notebookId: a }), [K] = r(), q = k?.cosNotebook ?? null, J = N?.cosListAnalyses ?? [], Y = async () => {
131
- if (!q) return;
132
- let e = await K({ variables: { id: q.id } });
129
+ function Y() {
130
+ let { id: o = "" } = b(), { navigate: f } = e(), [C, M] = g(!1), { data: N, loading: P, error: F, refetch: I } = a(o), { data: L, loading: R, error: z, refetch: B } = n({ notebookId: o }), { data: Y } = i({ pagination: {
131
+ limit: 100,
132
+ offset: 0
133
+ } }), [X] = r(), Z = N?.cosNotebook ?? null, Q = L?.cosListAnalyses ?? [], te = h(() => {
134
+ let e = /* @__PURE__ */ new Map();
135
+ for (let t of Y?.cosListDatasets.items ?? []) e.set(t.id, t.name);
136
+ return e;
137
+ }, [Y]), ne = async () => {
138
+ if (!Z) return;
139
+ let e = await X({ variables: { id: Z.id } });
133
140
  if (e.error) throw Error(e.error.message);
134
141
  if (!e.data?.cosArchiveNotebook) throw t.error("Could not archive notebook", "The server did not confirm the change."), Error("Archive not confirmed");
135
- await M(), t.success("Notebook archived", `“${q.title}” was archived.`);
142
+ await I(), t.success("Notebook archived", `“${Z.title}” was archived.`);
136
143
  };
137
- if (A) return /* @__PURE__ */ h(d, {
144
+ if (P) return /* @__PURE__ */ v(p, {
138
145
  title: "Notebook",
139
146
  backPath: "notebooks",
140
- children: /* @__PURE__ */ h(u, { label: "Loading notebook…" })
147
+ children: /* @__PURE__ */ v(u, { label: "Loading notebook…" })
141
148
  });
142
- if (j) return /* @__PURE__ */ h(d, {
149
+ if (F) return /* @__PURE__ */ v(p, {
143
150
  title: "Notebook",
144
151
  backPath: "notebooks",
145
- children: /* @__PURE__ */ h(c, {
152
+ children: /* @__PURE__ */ v(l, {
146
153
  message: "We could not load this notebook. Please try again.",
147
- onRetry: () => void M()
154
+ onRetry: () => void I()
148
155
  })
149
156
  });
150
- if (!q) return /* @__PURE__ */ h(d, {
157
+ if (!Z) return /* @__PURE__ */ v(p, {
151
158
  title: "Notebook",
152
159
  backPath: "notebooks",
153
- children: /* @__PURE__ */ h(s, {
154
- icon: b,
160
+ children: /* @__PURE__ */ v(c, {
161
+ icon: w,
155
162
  title: "Notebook not found.",
156
163
  description: "This notebook may have been removed or is outside your current scope.",
157
- action: /* @__PURE__ */ h(D, {
164
+ action: /* @__PURE__ */ v(j, {
158
165
  type: "button",
159
- onClick: () => l("notebooks"),
166
+ onClick: () => f("notebooks"),
160
167
  children: "Back to notebooks"
161
168
  })
162
169
  })
163
170
  });
164
- let X = q.environment && Object.keys(q.environment).length > 0 ? JSON.stringify(q.environment, null, 2) : null, Z = /* @__PURE__ */ g("div", {
171
+ let $ = Z.environment && Object.keys(Z.environment).length > 0 ? JSON.stringify(Z.environment, null, 2) : null, re = /* @__PURE__ */ y("div", {
165
172
  className: "flex items-center gap-2",
166
173
  children: [
167
- /* @__PURE__ */ g(D, {
174
+ /* @__PURE__ */ y(j, {
168
175
  type: "button",
169
- onClick: () => O(!0),
170
- children: [/* @__PURE__ */ h(C, { className: "size-4" }), "Run analysis"]
176
+ onClick: () => M(!0),
177
+ children: [/* @__PURE__ */ v(D, { className: "size-4" }), "Run analysis"]
171
178
  }),
172
- /* @__PURE__ */ g(D, {
179
+ /* @__PURE__ */ y(j, {
173
180
  type: "button",
174
181
  variant: "outline",
175
- onClick: () => l(`notebooks/${q.id}/edit`),
176
- children: [/* @__PURE__ */ h(S, { className: "size-4" }), "Edit"]
182
+ onClick: () => f(`notebooks/${Z.id}/edit`),
183
+ children: [/* @__PURE__ */ v(E, { className: "size-4" }), "Edit"]
177
184
  }),
178
- /* @__PURE__ */ h(o, {
179
- ariaLabel: `Actions for ${q.title}`,
180
- entityName: q.title,
181
- onEdit: () => l(`notebooks/${q.id}/edit`),
182
- onDelete: q.status === "ARCHIVED" ? void 0 : Y,
185
+ /* @__PURE__ */ v(s, {
186
+ ariaLabel: `Actions for ${Z.title}`,
187
+ entityName: Z.title,
188
+ onDelete: Z.status === "ARCHIVED" ? void 0 : ne,
183
189
  deleteLabel: "Archive notebook"
184
190
  })
185
191
  ]
186
192
  });
187
- return /* @__PURE__ */ g(d, {
188
- title: q.title,
193
+ return /* @__PURE__ */ y(p, {
194
+ title: Z.title,
189
195
  description: "Notebook detail",
190
196
  backPath: "notebooks",
191
- actions: Z,
192
- children: [/* @__PURE__ */ g("div", {
197
+ actions: re,
198
+ children: [/* @__PURE__ */ y("div", {
193
199
  className: "space-y-6",
194
- children: [/* @__PURE__ */ g("section", {
195
- className: "rounded-card border border-border-default bg-bg-elevated p-6",
196
- children: [
197
- /* @__PURE__ */ g("div", {
198
- className: "flex flex-wrap items-center gap-3",
199
- children: [
200
- /* @__PURE__ */ h(p, { status: q.status }),
201
- q.runtime ? /* @__PURE__ */ g(E, {
202
- variant: "outline",
203
- children: ["Runtime: ", q.runtime]
204
- }) : null,
205
- q.isShared ? /* @__PURE__ */ g(E, {
206
- variant: "secondary",
207
- className: "gap-1",
208
- children: [
209
- /* @__PURE__ */ h(w, {
210
- className: "size-3",
211
- "aria-hidden": "true"
212
- }),
213
- "Shared",
214
- q.shareSlug ? `: ${q.shareSlug}` : ""
215
- ]
216
- }) : /* @__PURE__ */ h(E, {
217
- variant: "outline",
218
- children: "Private"
219
- })
220
- ]
221
- }),
222
- q.description ? /* @__PURE__ */ h("p", {
223
- className: "mt-4 text-sm text-text-secondary",
224
- children: q.description
225
- }) : /* @__PURE__ */ h("p", {
226
- className: "mt-4 text-sm text-text-secondary",
227
- children: "No description provided."
228
- }),
229
- /* @__PURE__ */ g("dl", {
230
- className: "mt-6 grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",
231
- children: [
232
- /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("dt", {
200
+ children: [
201
+ /* @__PURE__ */ y("section", {
202
+ className: "rounded-card border border-border-default bg-bg-elevated p-6",
203
+ children: [
204
+ /* @__PURE__ */ y("div", {
205
+ className: "flex flex-wrap items-center gap-3",
206
+ children: [
207
+ /* @__PURE__ */ v(m, { status: Z.status }),
208
+ Z.runtime ? /* @__PURE__ */ y(A, {
209
+ variant: "outline",
210
+ children: ["Runtime: ", Z.runtime]
211
+ }) : null,
212
+ Z.isShared ? /* @__PURE__ */ y(A, {
213
+ variant: "secondary",
214
+ className: "gap-1",
215
+ children: [
216
+ /* @__PURE__ */ v(O, {
217
+ className: "size-3",
218
+ "aria-hidden": "true"
219
+ }),
220
+ "Shared",
221
+ Z.shareSlug ? `: ${Z.shareSlug}` : ""
222
+ ]
223
+ }) : /* @__PURE__ */ v(A, {
224
+ variant: "outline",
225
+ children: "Private"
226
+ })
227
+ ]
228
+ }),
229
+ Z.description ? /* @__PURE__ */ v("p", {
230
+ className: "mt-4 text-sm text-text-secondary",
231
+ children: Z.description
232
+ }) : /* @__PURE__ */ v("p", {
233
+ className: "mt-4 text-sm text-text-secondary",
234
+ children: "No description provided."
235
+ }),
236
+ /* @__PURE__ */ y("div", {
237
+ className: "mt-6",
238
+ children: [/* @__PURE__ */ v("p", {
233
239
  className: "text-xs uppercase tracking-wide text-text-secondary",
234
240
  children: "Linked datasets"
235
- }), /* @__PURE__ */ h("dd", {
236
- className: "mt-1 text-sm tabular-nums text-text-primary",
237
- children: q.datasetIds.length
238
- })] }),
239
- /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("dt", {
240
- className: "text-xs uppercase tracking-wide text-text-secondary",
241
- children: "Created"
242
- }), /* @__PURE__ */ h("dd", {
243
- className: "mt-1 text-sm text-text-primary",
244
- children: U(q.createdAt)
245
- })] }),
246
- /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("dt", {
241
+ }), Z.datasetIds.length === 0 ? /* @__PURE__ */ v("p", {
242
+ className: "mt-2 text-sm text-text-secondary",
243
+ children: "No datasets linked."
244
+ }) : /* @__PURE__ */ v("div", {
245
+ className: "mt-2 flex flex-wrap gap-2",
246
+ children: Z.datasetIds.map((e) => {
247
+ let t = te.get(e);
248
+ return /* @__PURE__ */ y(j, {
249
+ type: "button",
250
+ variant: "outline",
251
+ size: "sm",
252
+ className: "h-auto gap-1.5 px-2.5 py-1",
253
+ onClick: () => f(`datasets/${e}`),
254
+ children: [/* @__PURE__ */ v(S, {
255
+ className: "size-3.5 shrink-0",
256
+ "aria-hidden": "true"
257
+ }), /* @__PURE__ */ v("span", {
258
+ className: t ? "max-w-[16rem] truncate" : "font-mono text-xs",
259
+ children: t ?? e
260
+ })]
261
+ }, e);
262
+ })
263
+ })]
264
+ }),
265
+ /* @__PURE__ */ y("dl", {
266
+ className: "mt-6 grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",
267
+ children: [
268
+ /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("dt", {
269
+ className: "text-xs uppercase tracking-wide text-text-secondary",
270
+ children: "Created"
271
+ }), /* @__PURE__ */ v("dd", {
272
+ className: "mt-1 text-sm text-text-primary",
273
+ children: K(Z.createdAt)
274
+ })] }),
275
+ /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("dt", {
276
+ className: "text-xs uppercase tracking-wide text-text-secondary",
277
+ children: "Updated"
278
+ }), /* @__PURE__ */ v("dd", {
279
+ className: "mt-1 text-sm text-text-primary",
280
+ children: K(Z.updatedAt)
281
+ })] }),
282
+ /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("dt", {
283
+ className: "text-xs uppercase tracking-wide text-text-secondary",
284
+ children: "Notebook file"
285
+ }), /* @__PURE__ */ v("dd", {
286
+ className: "mt-1 text-sm text-text-primary",
287
+ children: Z.file?.id ? /* @__PURE__ */ v(q, {
288
+ fileId: Z.file.id,
289
+ label: "Download notebook"
290
+ }) : /* @__PURE__ */ v("span", {
291
+ className: "text-text-secondary",
292
+ children: "No file attached"
293
+ })
294
+ })] })
295
+ ]
296
+ }),
297
+ Z.tags.length > 0 ? /* @__PURE__ */ y("div", {
298
+ className: "mt-6",
299
+ children: [/* @__PURE__ */ v("p", {
247
300
  className: "text-xs uppercase tracking-wide text-text-secondary",
248
- children: "Updated"
249
- }), /* @__PURE__ */ h("dd", {
250
- className: "mt-1 text-sm text-text-primary",
251
- children: U(q.updatedAt)
252
- })] }),
253
- /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("dt", {
301
+ children: "Tags"
302
+ }), /* @__PURE__ */ v("div", {
303
+ className: "mt-2 flex flex-wrap gap-2",
304
+ children: Z.tags.map((e) => /* @__PURE__ */ v(A, {
305
+ variant: "outline",
306
+ children: e
307
+ }, e))
308
+ })]
309
+ }) : null,
310
+ $ ? /* @__PURE__ */ y("div", {
311
+ className: "mt-6",
312
+ children: [/* @__PURE__ */ v("p", {
254
313
  className: "text-xs uppercase tracking-wide text-text-secondary",
255
- children: "Notebook file"
256
- }), /* @__PURE__ */ h("dd", {
257
- className: "mt-1 text-sm text-text-primary",
258
- children: q.file?.id ? /* @__PURE__ */ h(W, {
259
- fileId: q.file.id,
260
- label: "Download notebook"
261
- }) : /* @__PURE__ */ h("span", {
262
- className: "text-text-secondary",
263
- children: "No file attached"
264
- })
265
- })] })
266
- ]
267
- }),
268
- q.tags.length > 0 ? /* @__PURE__ */ g("div", {
269
- className: "mt-6",
270
- children: [/* @__PURE__ */ h("p", {
271
- className: "text-xs uppercase tracking-wide text-text-secondary",
272
- children: "Tags"
273
- }), /* @__PURE__ */ h("div", {
274
- className: "mt-2 flex flex-wrap gap-2",
275
- children: q.tags.map((e) => /* @__PURE__ */ h(E, {
276
- variant: "outline",
277
- children: e
278
- }, e))
314
+ children: "Environment"
315
+ }), /* @__PURE__ */ v("pre", {
316
+ className: "mt-2 max-h-64 overflow-auto rounded-card border border-border-default bg-bg-sunken p-4 font-mono text-xs text-text-primary",
317
+ children: $
318
+ })]
319
+ }) : null
320
+ ]
321
+ }),
322
+ /* @__PURE__ */ y("section", {
323
+ className: "space-y-4",
324
+ children: [/* @__PURE__ */ y("div", {
325
+ className: "flex items-center gap-2",
326
+ children: [/* @__PURE__ */ v(T, {
327
+ className: "size-5 text-text-secondary",
328
+ "aria-hidden": "true"
329
+ }), /* @__PURE__ */ v("h2", {
330
+ className: "text-lg font-semibold text-text-primary",
331
+ children: "Discussion"
279
332
  })]
280
- }) : null,
281
- X ? /* @__PURE__ */ g("div", {
282
- className: "mt-6",
283
- children: [/* @__PURE__ */ h("p", {
284
- className: "text-xs uppercase tracking-wide text-text-secondary",
285
- children: "Environment"
286
- }), /* @__PURE__ */ h("pre", {
287
- className: "mt-2 max-h-64 overflow-auto rounded-card border border-border-default bg-bg-sunken p-4 font-mono text-xs text-text-primary",
288
- children: X
333
+ }), /* @__PURE__ */ v(d, {
334
+ entityType: "cosmicintersection-notebook",
335
+ entityId: Z.id,
336
+ title: Z.title,
337
+ widgetKey: "notebook-discussion"
338
+ })]
339
+ }),
340
+ /* @__PURE__ */ y("section", {
341
+ className: "space-y-4",
342
+ children: [/* @__PURE__ */ y("div", {
343
+ className: "flex flex-wrap items-center justify-between gap-3",
344
+ children: [/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("h2", {
345
+ className: "text-lg font-semibold text-text-primary",
346
+ children: "Analyses"
347
+ }), /* @__PURE__ */ v("p", {
348
+ className: "text-sm text-text-secondary",
349
+ children: "Analysis runs executed against this notebook."
350
+ })] }), /* @__PURE__ */ y(j, {
351
+ type: "button",
352
+ variant: "outline",
353
+ onClick: () => M(!0),
354
+ children: [/* @__PURE__ */ v(D, { className: "size-4" }), "Run analysis"]
289
355
  })]
290
- }) : null,
291
- /* @__PURE__ */ h("div", {
292
- className: "mt-6 flex flex-wrap items-center gap-2",
293
- children: /* @__PURE__ */ g(f, {
294
- href: "/conversations",
295
- className: "inline-flex items-center gap-1.5 rounded-button border border-border-default px-3 py-1.5 text-sm text-text-secondary transition-colors hover:bg-bg-sunken hover:text-text-primary",
296
- children: [/* @__PURE__ */ h(x, {
297
- className: "size-4",
298
- "aria-hidden": "true"
299
- }), "Discuss in conversations"]
356
+ }), R ? /* @__PURE__ */ v(u, {
357
+ variant: "rows",
358
+ rows: 3,
359
+ label: "Loading analyses…"
360
+ }) : z ? /* @__PURE__ */ v(l, {
361
+ message: "We could not load analyses for this notebook.",
362
+ onRetry: () => void B()
363
+ }) : Q.length === 0 ? /* @__PURE__ */ v(c, {
364
+ icon: x,
365
+ title: "No analyses yet.",
366
+ description: "Run an analysis to generate results and artifacts from this notebook.",
367
+ action: /* @__PURE__ */ y(j, {
368
+ type: "button",
369
+ onClick: () => M(!0),
370
+ children: [/* @__PURE__ */ v(D, { className: "size-4" }), "Run analysis"]
300
371
  })
301
- })
302
- ]
303
- }), /* @__PURE__ */ g("section", {
304
- className: "space-y-4",
305
- children: [/* @__PURE__ */ g("div", {
306
- className: "flex flex-wrap items-center justify-between gap-3",
307
- children: [/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("h2", {
308
- className: "text-lg font-semibold text-text-primary",
309
- children: "Analyses"
310
- }), /* @__PURE__ */ h("p", {
311
- className: "text-sm text-text-secondary",
312
- children: "Analysis runs executed against this notebook."
313
- })] }), /* @__PURE__ */ g(D, {
314
- type: "button",
315
- variant: "outline",
316
- onClick: () => O(!0),
317
- children: [/* @__PURE__ */ h(C, { className: "size-4" }), "Run analysis"]
318
- })]
319
- }), P ? /* @__PURE__ */ h(u, {
320
- variant: "rows",
321
- rows: 3,
322
- label: "Loading analyses…"
323
- }) : F ? /* @__PURE__ */ h(c, {
324
- message: "We could not load analyses for this notebook.",
325
- onRetry: () => void I()
326
- }) : J.length === 0 ? /* @__PURE__ */ h(s, {
327
- icon: v,
328
- title: "No analyses yet.",
329
- description: "Run an analysis to generate results and artifacts from this notebook.",
330
- action: /* @__PURE__ */ g(D, {
331
- type: "button",
332
- onClick: () => O(!0),
333
- children: [/* @__PURE__ */ h(C, { className: "size-4" }), "Run analysis"]
334
- })
335
- }) : /* @__PURE__ */ h("div", {
336
- className: "rounded-card border border-border-default bg-bg-elevated",
337
- children: /* @__PURE__ */ g(L, { children: [/* @__PURE__ */ h(V, { children: /* @__PURE__ */ g(H, { children: [
338
- /* @__PURE__ */ h(B, { children: "Title" }),
339
- /* @__PURE__ */ h(B, { children: "Method" }),
340
- /* @__PURE__ */ h(B, { children: "AI" }),
341
- /* @__PURE__ */ h(B, { children: "Status" }),
342
- /* @__PURE__ */ h(B, { children: "Started" }),
343
- /* @__PURE__ */ h(B, { children: "Output" })
344
- ] }) }), /* @__PURE__ */ h(R, { children: J.map((e) => /* @__PURE__ */ g(H, { children: [
345
- /* @__PURE__ */ h(z, {
346
- className: "font-medium text-text-primary",
347
- children: e.title
348
- }),
349
- /* @__PURE__ */ h(z, {
350
- className: "text-text-secondary",
351
- children: e.method ?? "—"
352
- }),
353
- /* @__PURE__ */ h(z, { children: e.aiAssisted ? /* @__PURE__ */ g(E, {
354
- variant: "secondary",
355
- className: "gap-1",
356
- children: [/* @__PURE__ */ h(T, {
357
- className: "size-3",
358
- "aria-hidden": "true"
359
- }), "AI"]
360
- }) : /* @__PURE__ */ h("span", {
361
- className: "text-text-secondary",
362
- children: "—"
363
- }) }),
364
- /* @__PURE__ */ h(z, { children: /* @__PURE__ */ h(p, { status: e.status }) }),
365
- /* @__PURE__ */ h(z, {
366
- className: "whitespace-nowrap text-text-secondary",
367
- children: U(e.startedAt)
368
- }),
369
- /* @__PURE__ */ h(z, { children: e.outputFile?.id ? /* @__PURE__ */ h(W, {
370
- fileId: e.outputFile.id,
371
- label: "Download"
372
- }) : e.results && Object.keys(e.results).length > 0 ? /* @__PURE__ */ h("span", {
373
- className: "text-xs text-text-secondary",
374
- children: "Results recorded"
375
- }) : /* @__PURE__ */ h("span", {
376
- className: "text-text-secondary",
377
- children: "—"
378
- }) })
379
- ] }, e.id)) })] })
380
- })]
381
- })]
382
- }), /* @__PURE__ */ h(G, {
383
- notebookId: q.id,
384
- open: y,
385
- onOpenChange: O,
386
- onCompleted: () => void I()
372
+ }) : /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v("div", {
373
+ className: "hidden rounded-card border border-border-default bg-bg-elevated md:block",
374
+ children: /* @__PURE__ */ y(ee, { children: [/* @__PURE__ */ v(W, { children: /* @__PURE__ */ y(G, { children: [
375
+ /* @__PURE__ */ v(U, { children: "Title" }),
376
+ /* @__PURE__ */ v(U, { children: "Method" }),
377
+ /* @__PURE__ */ v(U, { children: "AI" }),
378
+ /* @__PURE__ */ v(U, { children: "Status" }),
379
+ /* @__PURE__ */ v(U, { children: "Started" }),
380
+ /* @__PURE__ */ v(U, { children: "Output" })
381
+ ] }) }), /* @__PURE__ */ v(V, { children: Q.map((e) => /* @__PURE__ */ y(G, { children: [
382
+ /* @__PURE__ */ v(H, {
383
+ className: "font-medium text-text-primary",
384
+ children: e.title
385
+ }),
386
+ /* @__PURE__ */ v(H, {
387
+ className: "text-text-secondary",
388
+ children: e.method ?? "—"
389
+ }),
390
+ /* @__PURE__ */ v(H, { children: e.aiAssisted ? /* @__PURE__ */ y(A, {
391
+ variant: "secondary",
392
+ className: "gap-1",
393
+ children: [/* @__PURE__ */ v(k, {
394
+ className: "size-3",
395
+ "aria-hidden": "true"
396
+ }), "AI"]
397
+ }) : /* @__PURE__ */ v("span", {
398
+ className: "text-text-secondary",
399
+ children: "—"
400
+ }) }),
401
+ /* @__PURE__ */ v(H, { children: /* @__PURE__ */ v(m, { status: e.status }) }),
402
+ /* @__PURE__ */ v(H, {
403
+ className: "whitespace-nowrap text-text-secondary",
404
+ children: K(e.startedAt)
405
+ }),
406
+ /* @__PURE__ */ v(H, { children: e.outputFile?.id ? /* @__PURE__ */ v(q, {
407
+ fileId: e.outputFile.id,
408
+ label: "Download"
409
+ }) : e.results && Object.keys(e.results).length > 0 ? /* @__PURE__ */ v("span", {
410
+ className: "text-xs text-text-secondary",
411
+ children: "Results recorded"
412
+ }) : /* @__PURE__ */ v("span", {
413
+ className: "text-text-secondary",
414
+ children: "—"
415
+ }) })
416
+ ] }, e.id)) })] })
417
+ }), /* @__PURE__ */ v("ul", {
418
+ className: "space-y-3 md:hidden",
419
+ children: Q.map((e) => /* @__PURE__ */ y("li", {
420
+ className: "space-y-2 rounded-card border border-border-default bg-bg-elevated p-4",
421
+ children: [
422
+ /* @__PURE__ */ y("div", {
423
+ className: "flex items-start justify-between gap-3",
424
+ children: [/* @__PURE__ */ y("div", {
425
+ className: "min-w-0",
426
+ children: [/* @__PURE__ */ v("p", {
427
+ className: "truncate font-medium text-text-primary",
428
+ children: e.title
429
+ }), e.method ? /* @__PURE__ */ v("p", {
430
+ className: "truncate text-xs text-text-secondary",
431
+ children: e.method
432
+ }) : null]
433
+ }), /* @__PURE__ */ v(m, { status: e.status })]
434
+ }),
435
+ /* @__PURE__ */ y("div", {
436
+ className: "flex flex-wrap items-center gap-2 text-xs text-text-secondary",
437
+ children: [e.aiAssisted ? /* @__PURE__ */ y(A, {
438
+ variant: "secondary",
439
+ className: "gap-1",
440
+ children: [/* @__PURE__ */ v(k, {
441
+ className: "size-3",
442
+ "aria-hidden": "true"
443
+ }), "AI"]
444
+ }) : null, /* @__PURE__ */ y("span", { children: ["Started ", K(e.startedAt)] })]
445
+ }),
446
+ /* @__PURE__ */ v("div", { children: e.outputFile?.id ? /* @__PURE__ */ v(q, {
447
+ fileId: e.outputFile.id,
448
+ label: "Download"
449
+ }) : e.results && Object.keys(e.results).length > 0 ? /* @__PURE__ */ v("span", {
450
+ className: "text-xs text-text-secondary",
451
+ children: "Results recorded"
452
+ }) : /* @__PURE__ */ v("span", {
453
+ className: "text-xs text-text-secondary",
454
+ children: "No output"
455
+ }) })
456
+ ]
457
+ }, e.id))
458
+ })] })]
459
+ })
460
+ ]
461
+ }), /* @__PURE__ */ v(J, {
462
+ notebookId: Z.id,
463
+ open: C,
464
+ onOpenChange: M,
465
+ onCompleted: () => void B()
387
466
  })]
388
467
  });
389
468
  }
390
469
  //#endregion
391
- export { K as default };
470
+ export { Y as default };
392
471
 
393
472
  //# sourceMappingURL=NotebookDetailPage.js.map