@burdenoff/microfe-cosmicintersection 2026.1012.1 → 2026.1030.2

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 (25) hide show
  1. package/dist/cosmicintersection/lib/assistantAwareDialog.d.ts +42 -0
  2. package/dist/cosmicintersection/lib/assistantAwareDialog.d.ts.map +1 -0
  3. package/dist/cosmicintersection/lib/assistantAwareDialog.js +12 -0
  4. package/dist/cosmicintersection/lib/assistantAwareDialog.js.map +1 -0
  5. package/dist/cosmicintersection/lib/useSelectedRecord.d.ts +20 -0
  6. package/dist/cosmicintersection/lib/useSelectedRecord.d.ts.map +1 -0
  7. package/dist/cosmicintersection/lib/useSelectedRecord.js +19 -0
  8. package/dist/cosmicintersection/lib/useSelectedRecord.js.map +1 -0
  9. package/dist/cosmicintersection/pages/access/AccessPage.d.ts.map +1 -1
  10. package/dist/cosmicintersection/pages/access/AccessPage.js +239 -226
  11. package/dist/cosmicintersection/pages/access/AccessPage.js.map +1 -1
  12. package/dist/cosmicintersection/pages/analyses/AnalysesPage.d.ts.map +1 -1
  13. package/dist/cosmicintersection/pages/analyses/AnalysesPage.js +200 -196
  14. package/dist/cosmicintersection/pages/analyses/AnalysesPage.js.map +1 -1
  15. package/dist/cosmicintersection/pages/datasets/DatasetDetailPage.d.ts.map +1 -1
  16. package/dist/cosmicintersection/pages/datasets/DatasetDetailPage.js +188 -175
  17. package/dist/cosmicintersection/pages/datasets/DatasetDetailPage.js.map +1 -1
  18. package/dist/cosmicintersection/pages/releases/ReleasesPage.d.ts.map +1 -1
  19. package/dist/cosmicintersection/pages/releases/ReleasesPage.js +205 -201
  20. package/dist/cosmicintersection/pages/releases/ReleasesPage.js.map +1 -1
  21. package/dist/utils/pageContext.d.ts +33 -7
  22. package/dist/utils/pageContext.d.ts.map +1 -1
  23. package/dist/utils/pageContext.js +75 -33
  24. package/dist/utils/pageContext.js.map +1 -1
  25. package/package.json +1 -1
@@ -10,16 +10,18 @@ import f, { useFileDownloadUrl as p } from "../../components/FileUploadField.js"
10
10
  import m from "../../components/PageLayout.js";
11
11
  import h from "../../components/StatusBadge.js";
12
12
  import "../../components/index.js";
13
- import g from "../../components/ResultsChart.js";
14
- import { useMemo as _, useState as v } from "react";
15
- import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
16
- import { BarChart3 as S, Beaker as C, Download as w, ExternalLink as T, Play as E, Sparkles as D } from "lucide-react";
17
- import { Badge as O, Button as k, Dialog as A, DialogClose as j, DialogContent as M, DialogDescription as N, DialogFooter as P, DialogHeader as F, DialogTitle as I, Input as L, Label as R, Select as z, SelectContent as B, SelectItem as V, SelectTrigger as H, SelectValue as U, Switch as W, Table as G, TableBody as ee, TableCell as K, TableHead as q, TableHeader as te, TableRow as J, Textarea as Y } from "@burdenoff/fe-libs/ui";
13
+ import { useSelectedRecord as g } from "../../lib/useSelectedRecord.js";
14
+ import _ from "../../components/ResultsChart.js";
15
+ import { ASSISTANT_AWARE_DIALOG_CONTENT_PROPS as v, ASSISTANT_AWARE_DIALOG_ROOT_PROPS as y } from "../../lib/assistantAwareDialog.js";
16
+ import { useMemo as b, useState as x } from "react";
17
+ import { Fragment as S, jsx as C, jsxs as w } from "react/jsx-runtime";
18
+ import { BarChart3 as T, Beaker as E, Download as D, ExternalLink as O, Play as k, Sparkles as A } from "lucide-react";
19
+ import { Badge as j, Button as M, Dialog as N, DialogClose as P, DialogContent as F, DialogDescription as I, DialogFooter as L, DialogHeader as R, DialogTitle as z, Input as B, Label as V, Select as H, SelectContent as U, SelectItem as W, SelectTrigger as G, SelectValue as K, Switch as q, Table as ee, TableBody as te, TableCell as J, TableHead as Y, TableHeader as ne, TableRow as re, Textarea as ie } from "@burdenoff/fe-libs/ui";
18
20
  //#region src/cosmicintersection/pages/analyses/AnalysesPage.tsx
19
21
  function X(e) {
20
22
  return !!e.outputFile?.id || !!(e.results && Object.keys(e.results).length > 0);
21
23
  }
22
- var ne = [
24
+ var ae = [
23
25
  {
24
26
  value: "PENDING",
25
27
  label: "Pending"
@@ -48,68 +50,70 @@ function Q(e) {
48
50
  minute: "2-digit"
49
51
  });
50
52
  }
51
- function re({ fileId: e }) {
52
- let { data: t, loading: n } = p(e), [r, i] = v(!1), a = t?.getFileDownloadUrl ?? null;
53
- return n ? /* @__PURE__ */ b("span", {
53
+ function oe({ fileId: e }) {
54
+ let { data: t, loading: n } = p(e), [r, i] = x(!1), a = t?.getFileDownloadUrl ?? null;
55
+ return n ? /* @__PURE__ */ C("span", {
54
56
  className: "text-xs text-text-secondary",
55
57
  children: "Resolving link…"
56
- }) : a ? /* @__PURE__ */ x("div", {
58
+ }) : a ? /* @__PURE__ */ w("div", {
57
59
  className: "space-y-2",
58
- children: [r ? null : /* @__PURE__ */ b("img", {
60
+ children: [r ? null : /* @__PURE__ */ C("img", {
59
61
  src: a,
60
62
  alt: "Analysis output preview",
61
63
  onError: () => i(!0),
62
64
  className: "max-h-72 w-full rounded-card border border-border-default bg-bg-sunken object-contain"
63
- }), /* @__PURE__ */ x("a", {
65
+ }), /* @__PURE__ */ w("a", {
64
66
  href: a,
65
67
  target: "_blank",
66
68
  rel: "noopener noreferrer",
67
69
  className: "inline-flex items-center gap-1 text-sm text-text-primary underline-offset-2 hover:underline",
68
- children: [/* @__PURE__ */ b(w, {
70
+ children: [/* @__PURE__ */ C(D, {
69
71
  className: "size-3.5",
70
72
  "aria-hidden": "true"
71
73
  }), "Download output"]
72
74
  })]
73
- }) : /* @__PURE__ */ x("span", {
75
+ }) : /* @__PURE__ */ w("span", {
74
76
  className: "text-xs text-text-secondary",
75
77
  children: ["File ", e]
76
78
  });
77
79
  }
78
- function ie({ analysis: e, onOpenChange: t }) {
80
+ function se({ analysis: e, onOpenChange: t }) {
79
81
  let n = e?.results ?? null, r = !!(n && Object.keys(n).length > 0), i = !!e?.outputFile?.id;
80
- return /* @__PURE__ */ b(A, {
82
+ return /* @__PURE__ */ C(N, {
83
+ ...y,
81
84
  open: !!e,
82
85
  onOpenChange: t,
83
- children: /* @__PURE__ */ b(M, {
86
+ children: /* @__PURE__ */ C(F, {
87
+ ...v,
84
88
  className: "max-h-[85vh] max-w-2xl overflow-y-auto",
85
- children: e ? /* @__PURE__ */ x(y, { children: [
86
- /* @__PURE__ */ x(F, { children: [/* @__PURE__ */ x(I, {
89
+ children: e ? /* @__PURE__ */ w(S, { children: [
90
+ /* @__PURE__ */ w(R, { children: [/* @__PURE__ */ w(z, {
87
91
  className: "flex items-center gap-2",
88
- children: [/* @__PURE__ */ b(S, {
92
+ children: [/* @__PURE__ */ C(T, {
89
93
  className: "size-5 text-text-secondary",
90
94
  "aria-hidden": "true"
91
95
  }), "Analysis results"]
92
- }), /* @__PURE__ */ x(N, { children: [e.title, e.method ? ` · ${e.method}` : ""] })] }),
93
- /* @__PURE__ */ x("div", {
96
+ }), /* @__PURE__ */ w(I, { children: [e.title, e.method ? ` · ${e.method}` : ""] })] }),
97
+ /* @__PURE__ */ w("div", {
94
98
  className: "space-y-5",
95
99
  children: [
96
- r && n ? /* @__PURE__ */ b(g, { results: n }) : null,
97
- i && e.outputFile ? /* @__PURE__ */ x("div", {
100
+ r && n ? /* @__PURE__ */ C(_, { results: n }) : null,
101
+ i && e.outputFile ? /* @__PURE__ */ w("div", {
98
102
  className: "space-y-2",
99
- children: [/* @__PURE__ */ b("p", {
103
+ children: [/* @__PURE__ */ C("p", {
100
104
  className: "text-xs font-medium uppercase tracking-wide text-text-secondary",
101
105
  children: "Output artifact"
102
- }), /* @__PURE__ */ b(re, { fileId: e.outputFile.id })]
106
+ }), /* @__PURE__ */ C(oe, { fileId: e.outputFile.id })]
103
107
  }) : null,
104
- !r && !i ? /* @__PURE__ */ b("p", {
108
+ !r && !i ? /* @__PURE__ */ C("p", {
105
109
  className: "rounded-card border border-border-default bg-bg-sunken px-4 py-6 text-center text-sm text-text-secondary",
106
110
  children: "No results or output artifact has been recorded for this analysis yet."
107
111
  }) : null
108
112
  ]
109
113
  }),
110
- /* @__PURE__ */ b(P, { children: /* @__PURE__ */ b(j, {
114
+ /* @__PURE__ */ C(L, { children: /* @__PURE__ */ C(P, {
111
115
  asChild: !0,
112
- children: /* @__PURE__ */ b(k, {
116
+ children: /* @__PURE__ */ C(M, {
113
117
  type: "button",
114
118
  variant: "outline",
115
119
  children: "Close"
@@ -141,22 +145,22 @@ function $(e, t) {
141
145
  };
142
146
  }
143
147
  }
144
- function ae({ open: e, onOpenChange: n, onCompleted: r }) {
145
- let c = s(), [l, u] = v(""), [d, f] = v(""), [p, m] = v(!1), [h, g] = v("NOTEBOOK"), [_, y] = v(""), { data: S, loading: C } = a({ pagination: {
148
+ function ce({ open: e, onOpenChange: n, onCompleted: r }) {
149
+ let c = s(), [l, u] = x(""), [d, f] = x(""), [p, m] = x(!1), [h, g] = x("NOTEBOOK"), [_, v] = x(""), { data: y, loading: b } = a({ pagination: {
146
150
  limit: 100,
147
151
  offset: 0
148
- } }), { data: w, loading: T } = i({ pagination: {
152
+ } }), { data: S, loading: T } = i({ pagination: {
149
153
  limit: 100,
150
154
  offset: 0
151
- } }), [D, { loading: O }] = o(), j = S?.cosListNotebooks.items ?? [], G = w?.cosListDatasets.items ?? [], ee = () => {
152
- u(""), f(""), m(!1), g("NOTEBOOK"), y("");
155
+ } }), [E, { loading: D }] = o(), O = y?.cosListNotebooks.items ?? [], A = S?.cosListDatasets.items ?? [], j = () => {
156
+ u(""), f(""), m(!1), g("NOTEBOOK"), v("");
153
157
  };
154
- return /* @__PURE__ */ b(A, {
158
+ return /* @__PURE__ */ C(N, {
155
159
  open: e,
156
160
  onOpenChange: (e) => {
157
- O || n(e);
161
+ D || n(e);
158
162
  },
159
- children: /* @__PURE__ */ b(M, { children: /* @__PURE__ */ x("form", {
163
+ children: /* @__PURE__ */ C(F, { children: /* @__PURE__ */ w("form", {
160
164
  onSubmit: async (e) => {
161
165
  e.preventDefault();
162
166
  let i = l.trim();
@@ -168,23 +172,23 @@ function ae({ open: e, onOpenChange: n, onCompleted: r }) {
168
172
  t.error(c("cosmicintersection.pages.analyses.selectSource", "Select a source"), c("cosmicintersection.pages.analyses.selectSourceDescription", "Choose a {{kind}} to analyse.", { kind: h === "NOTEBOOK" ? c("nav.notebooks", "notebook").toLowerCase() : c("nav.datasets", "dataset").toLowerCase() }));
169
173
  return;
170
174
  }
171
- let a = await D({ variables: { input: {
175
+ let a = await E({ variables: { input: {
172
176
  title: i,
173
177
  method: d.trim() || void 0,
174
178
  aiAssisted: p,
175
179
  ...h === "NOTEBOOK" ? { notebookId: _ } : { datasetId: _ }
176
180
  } } });
177
- a.error || !a.data?.cosRunAnalysis?.id || (t.success(c("cosmicintersection.pages.analyses.analysisStarted", "Analysis started"), c("cosmicintersection.pages.analyses.analysisStartedDescription", "“{{name}}” is now running.", { name: i })), ee(), n(!1), r());
181
+ a.error || !a.data?.cosRunAnalysis?.id || (t.success(c("cosmicintersection.pages.analyses.analysisStarted", "Analysis started"), c("cosmicintersection.pages.analyses.analysisStartedDescription", "“{{name}}” is now running.", { name: i })), j(), n(!1), r());
178
182
  },
179
183
  className: "space-y-4",
180
184
  children: [
181
- /* @__PURE__ */ x(F, { children: [/* @__PURE__ */ b(I, { children: "Run analysis" }), /* @__PURE__ */ b(N, { children: "Launch a new analysis against a notebook or a dataset. Exactly one source is required." })] }),
182
- /* @__PURE__ */ x("div", {
185
+ /* @__PURE__ */ w(R, { children: [/* @__PURE__ */ C(z, { children: "Run analysis" }), /* @__PURE__ */ C(I, { children: "Launch a new analysis against a notebook or a dataset. Exactly one source is required." })] }),
186
+ /* @__PURE__ */ w("div", {
183
187
  className: "space-y-1.5",
184
- children: [/* @__PURE__ */ b(R, {
188
+ children: [/* @__PURE__ */ C(V, {
185
189
  htmlFor: "run-title",
186
190
  children: "Title"
187
- }), /* @__PURE__ */ b(L, {
191
+ }), /* @__PURE__ */ C(B, {
188
192
  id: "run-title",
189
193
  value: l,
190
194
  onChange: (e) => u(e.target.value),
@@ -192,99 +196,99 @@ function ae({ open: e, onOpenChange: n, onCompleted: r }) {
192
196
  required: !0
193
197
  })]
194
198
  }),
195
- /* @__PURE__ */ x("div", {
199
+ /* @__PURE__ */ w("div", {
196
200
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
197
- children: [/* @__PURE__ */ x("div", {
201
+ children: [/* @__PURE__ */ w("div", {
198
202
  className: "space-y-1.5",
199
- children: [/* @__PURE__ */ b(R, {
203
+ children: [/* @__PURE__ */ C(V, {
200
204
  htmlFor: "run-source-kind",
201
205
  children: "Source type"
202
- }), /* @__PURE__ */ x(z, {
206
+ }), /* @__PURE__ */ w(H, {
203
207
  value: h,
204
208
  onValueChange: (e) => {
205
- g(e), y("");
209
+ g(e), v("");
206
210
  },
207
- children: [/* @__PURE__ */ b(H, {
211
+ children: [/* @__PURE__ */ C(G, {
208
212
  id: "run-source-kind",
209
213
  "aria-label": "Source type",
210
- children: /* @__PURE__ */ b(U, {})
211
- }), /* @__PURE__ */ x(B, { children: [/* @__PURE__ */ b(V, {
214
+ children: /* @__PURE__ */ C(K, {})
215
+ }), /* @__PURE__ */ w(U, { children: [/* @__PURE__ */ C(W, {
212
216
  value: "NOTEBOOK",
213
217
  children: "Notebook"
214
- }), /* @__PURE__ */ b(V, {
218
+ }), /* @__PURE__ */ C(W, {
215
219
  value: "DATASET",
216
220
  children: "Dataset"
217
221
  })] })]
218
222
  })]
219
- }), /* @__PURE__ */ x("div", {
223
+ }), /* @__PURE__ */ w("div", {
220
224
  className: "space-y-1.5",
221
- children: [/* @__PURE__ */ b(R, {
225
+ children: [/* @__PURE__ */ C(V, {
222
226
  htmlFor: "run-source-id",
223
227
  children: h === "NOTEBOOK" ? "Notebook" : "Dataset"
224
- }), /* @__PURE__ */ x(z, {
228
+ }), /* @__PURE__ */ w(H, {
225
229
  value: _,
226
- onValueChange: (e) => y(e),
227
- children: [/* @__PURE__ */ b(H, {
230
+ onValueChange: (e) => v(e),
231
+ children: [/* @__PURE__ */ C(G, {
228
232
  id: "run-source-id",
229
233
  "aria-label": "Analysis source",
230
- children: /* @__PURE__ */ b(U, { placeholder: (h === "NOTEBOOK" ? C : T) ? "Loading…" : `Select a ${h === "NOTEBOOK" ? "notebook" : "dataset"}` })
231
- }), /* @__PURE__ */ b(B, { children: h === "NOTEBOOK" ? j.map((e) => /* @__PURE__ */ b(V, {
234
+ children: /* @__PURE__ */ C(K, { placeholder: (h === "NOTEBOOK" ? b : T) ? "Loading…" : `Select a ${h === "NOTEBOOK" ? "notebook" : "dataset"}` })
235
+ }), /* @__PURE__ */ C(U, { children: h === "NOTEBOOK" ? O.map((e) => /* @__PURE__ */ C(W, {
232
236
  value: e.id,
233
237
  children: e.title
234
- }, e.id)) : G.map((e) => /* @__PURE__ */ b(V, {
238
+ }, e.id)) : A.map((e) => /* @__PURE__ */ C(W, {
235
239
  value: e.id,
236
240
  children: e.name
237
241
  }, e.id)) })]
238
242
  })]
239
243
  })]
240
244
  }),
241
- /* @__PURE__ */ x("div", {
245
+ /* @__PURE__ */ w("div", {
242
246
  className: "space-y-1.5",
243
- children: [/* @__PURE__ */ b(R, {
247
+ children: [/* @__PURE__ */ C(V, {
244
248
  htmlFor: "run-method",
245
249
  children: "Method"
246
- }), /* @__PURE__ */ b(L, {
250
+ }), /* @__PURE__ */ C(B, {
247
251
  id: "run-method",
248
252
  value: d,
249
253
  onChange: (e) => f(e.target.value),
250
254
  placeholder: "e.g. gaussian-fit"
251
255
  })]
252
256
  }),
253
- /* @__PURE__ */ x("div", {
257
+ /* @__PURE__ */ w("div", {
254
258
  className: "flex items-center gap-3",
255
- children: [/* @__PURE__ */ b(W, {
259
+ children: [/* @__PURE__ */ C(q, {
256
260
  id: "run-ai",
257
261
  checked: p,
258
262
  onCheckedChange: (e) => m(e)
259
- }), /* @__PURE__ */ b(R, {
263
+ }), /* @__PURE__ */ C(V, {
260
264
  htmlFor: "run-ai",
261
265
  className: "cursor-pointer",
262
266
  children: "AI-assisted analysis"
263
267
  })]
264
268
  }),
265
- /* @__PURE__ */ x(P, { children: [/* @__PURE__ */ b(k, {
269
+ /* @__PURE__ */ w(L, { children: [/* @__PURE__ */ C(M, {
266
270
  type: "button",
267
271
  variant: "outline",
268
272
  onClick: () => n(!1),
269
- disabled: O,
273
+ disabled: D,
270
274
  children: "Cancel"
271
- }), /* @__PURE__ */ x(k, {
275
+ }), /* @__PURE__ */ w(M, {
272
276
  type: "submit",
273
- disabled: O,
274
- children: [/* @__PURE__ */ b(E, { className: "size-4" }), O ? "Starting…" : "Run analysis"]
277
+ disabled: D,
278
+ children: [/* @__PURE__ */ C(k, { className: "size-4" }), D ? "Starting…" : "Run analysis"]
275
279
  })] })
276
280
  ]
277
281
  }) })
278
282
  });
279
283
  }
280
- function oe({ analysis: e, onOpenChange: n, onCompleted: i }) {
281
- let [a, o] = v("COMPLETED"), [c, l] = v(""), [u, d] = v(""), [p, { loading: m }] = r(), h = s();
282
- return /* @__PURE__ */ b(A, {
284
+ function le({ analysis: e, onOpenChange: n, onCompleted: i }) {
285
+ let [a, o] = x("COMPLETED"), [c, l] = x(""), [u, d] = x(""), [p, { loading: m }] = r(), h = s();
286
+ return /* @__PURE__ */ C(N, {
283
287
  open: !!e,
284
288
  onOpenChange: (e) => {
285
289
  m || n(e);
286
290
  },
287
- children: /* @__PURE__ */ b(M, { children: /* @__PURE__ */ x("form", {
291
+ children: /* @__PURE__ */ C(F, { children: /* @__PURE__ */ w("form", {
288
292
  onSubmit: async (r) => {
289
293
  if (r.preventDefault(), !e) return;
290
294
  let o = $(c, h);
@@ -302,40 +306,40 @@ function oe({ analysis: e, onOpenChange: n, onCompleted: i }) {
302
306
  },
303
307
  className: "space-y-4",
304
308
  children: [
305
- /* @__PURE__ */ x(F, { children: [/* @__PURE__ */ b(I, { children: "Complete analysis" }), /* @__PURE__ */ x(N, { children: [
309
+ /* @__PURE__ */ w(R, { children: [/* @__PURE__ */ C(z, { children: "Complete analysis" }), /* @__PURE__ */ w(I, { children: [
306
310
  "Record the outcome for ",
307
311
  e ? `“${e.title}”` : "this analysis",
308
312
  ". Attach results or an output artifact if you have them."
309
313
  ] })] }),
310
- /* @__PURE__ */ x("div", {
314
+ /* @__PURE__ */ w("div", {
311
315
  className: "space-y-1.5",
312
- children: [/* @__PURE__ */ b(R, {
316
+ children: [/* @__PURE__ */ C(V, {
313
317
  htmlFor: "complete-status",
314
318
  children: "Outcome"
315
- }), /* @__PURE__ */ x(z, {
319
+ }), /* @__PURE__ */ w(H, {
316
320
  value: a,
317
321
  onValueChange: (e) => o(e),
318
- children: [/* @__PURE__ */ b(H, {
322
+ children: [/* @__PURE__ */ C(G, {
319
323
  id: "complete-status",
320
324
  "aria-label": "Outcome",
321
- children: /* @__PURE__ */ b(U, {})
322
- }), /* @__PURE__ */ x(B, { children: [/* @__PURE__ */ b(V, {
325
+ children: /* @__PURE__ */ C(K, {})
326
+ }), /* @__PURE__ */ w(U, { children: [/* @__PURE__ */ C(W, {
323
327
  value: "COMPLETED",
324
328
  children: "Completed"
325
- }), /* @__PURE__ */ b(V, {
329
+ }), /* @__PURE__ */ C(W, {
326
330
  value: "FAILED",
327
331
  children: "Failed"
328
332
  })] })]
329
333
  })]
330
334
  }),
331
- /* @__PURE__ */ x("div", {
335
+ /* @__PURE__ */ w("div", {
332
336
  className: "space-y-1.5",
333
337
  children: [
334
- /* @__PURE__ */ b(R, {
338
+ /* @__PURE__ */ C(V, {
335
339
  htmlFor: "complete-results",
336
340
  children: "Results (JSON)"
337
341
  }),
338
- /* @__PURE__ */ b(Y, {
342
+ /* @__PURE__ */ C(ie, {
339
343
  id: "complete-results",
340
344
  value: c,
341
345
  onChange: (e) => l(e.target.value),
@@ -343,25 +347,25 @@ function oe({ analysis: e, onOpenChange: n, onCompleted: i }) {
343
347
  className: "font-mono text-xs",
344
348
  placeholder: "{ \"snr\": 12.4, \"detections\": 3 }"
345
349
  }),
346
- /* @__PURE__ */ b("p", {
350
+ /* @__PURE__ */ C("p", {
347
351
  className: "text-xs text-text-secondary",
348
352
  children: "Optional structured results as a JSON object."
349
353
  })
350
354
  ]
351
355
  }),
352
- /* @__PURE__ */ b(f, {
356
+ /* @__PURE__ */ C(f, {
353
357
  value: u,
354
358
  onChange: (e) => d(e),
355
359
  label: "Attach output file",
356
360
  hint: "Optional output artifact (plots, tables, exports). Stored in workspace files."
357
361
  }),
358
- /* @__PURE__ */ x(P, { children: [/* @__PURE__ */ b(k, {
362
+ /* @__PURE__ */ w(L, { children: [/* @__PURE__ */ C(M, {
359
363
  type: "button",
360
364
  variant: "outline",
361
365
  onClick: () => n(!1),
362
366
  disabled: m,
363
367
  children: "Cancel"
364
- }), /* @__PURE__ */ b(k, {
368
+ }), /* @__PURE__ */ C(M, {
365
369
  type: "submit",
366
370
  disabled: m,
367
371
  children: m ? "Saving…" : "Save outcome"
@@ -370,247 +374,247 @@ function oe({ analysis: e, onOpenChange: n, onCompleted: i }) {
370
374
  }) })
371
375
  });
372
376
  }
373
- function se() {
374
- let { navigate: t } = e(), r = s(), [o, f] = v(void 0), [p, g] = v(!1), [w, A] = v(null), [j, M] = v(null), { data: N, loading: P, error: F, refetch: I } = n({ status: o }), { data: L } = a({ pagination: {
377
+ function ue() {
378
+ let { navigate: t } = e(), r = s(), [o, f] = x(void 0), [p, _] = x(!1), [v, y] = x(null), { data: D, loading: N, error: P, refetch: F } = n({ status: o }), { data: I } = a({ pagination: {
375
379
  limit: 100,
376
380
  offset: 0
377
- } }), { data: R } = i({ pagination: {
381
+ } }), { data: L } = i({ pagination: {
378
382
  limit: 100,
379
383
  offset: 0
380
- } }), W = N?.cosListAnalyses ?? [], Y = _(() => {
384
+ } }), R = D?.cosListAnalyses ?? [], { selectedId: z, select: B } = g(), V = z ? R.find((e) => e.id === z) ?? null : null, q = (e) => B(e ? e.id : null), ie = b(() => {
381
385
  let e = /* @__PURE__ */ new Map();
382
- for (let t of L?.cosListNotebooks.items ?? []) e.set(t.id, t.title);
386
+ for (let t of I?.cosListNotebooks.items ?? []) e.set(t.id, t.title);
383
387
  return e;
384
- }, [L]), re = _(() => {
388
+ }, [I]), oe = b(() => {
385
389
  let e = /* @__PURE__ */ new Map();
386
- for (let t of R?.cosListDatasets.items ?? []) e.set(t.id, t.name);
390
+ for (let t of L?.cosListDatasets.items ?? []) e.set(t.id, t.name);
387
391
  return e;
388
- }, [R]), $ = (e) => e.notebookId ? {
389
- label: Y.get(e.notebookId) ?? "Notebook",
392
+ }, [L]), $ = (e) => e.notebookId ? {
393
+ label: ie.get(e.notebookId) ?? "Notebook",
390
394
  path: `notebooks/${e.notebookId}`
391
395
  } : e.datasetId ? {
392
- label: re.get(e.datasetId) ?? "Dataset",
396
+ label: oe.get(e.datasetId) ?? "Dataset",
393
397
  path: `datasets/${e.datasetId}`
394
- } : null, se = (e) => {
398
+ } : null, ue = (e) => {
395
399
  let t = e.status === "PENDING" || e.status === "RUNNING";
396
400
  return [...X(e) ? [{
397
401
  key: "view-results",
398
402
  label: "View results",
399
- icon: S,
400
- onSelect: () => M(e)
403
+ icon: T,
404
+ onSelect: () => q(e)
401
405
  }] : [], ...t ? [{
402
406
  key: "complete",
403
407
  label: "Complete…",
404
- icon: C,
405
- onSelect: () => A(e)
408
+ icon: E,
409
+ onSelect: () => y(e)
406
410
  }] : []];
407
- }, ce = /* @__PURE__ */ x(k, {
411
+ }, de = /* @__PURE__ */ w(M, {
408
412
  type: "button",
409
- onClick: () => g(!0),
410
- children: [/* @__PURE__ */ b(E, { className: "size-4" }), r("cosmicintersection.pages.analyses.create", "Run analysis")]
413
+ onClick: () => _(!0),
414
+ children: [/* @__PURE__ */ C(k, { className: "size-4" }), r("cosmicintersection.pages.analyses.create", "Run analysis")]
411
415
  });
412
- return /* @__PURE__ */ x(m, {
416
+ return /* @__PURE__ */ w(m, {
413
417
  title: r("cosmicintersection.pages.analyses.title", "Analyses"),
414
418
  description: r("cosmicintersection.pages.analyses.description", "Analysis runs executed over notebooks and federated datasets."),
415
- actions: ce,
419
+ actions: de,
416
420
  children: [
417
- /* @__PURE__ */ x("div", {
421
+ /* @__PURE__ */ w("div", {
418
422
  className: "space-y-4",
419
- children: [/* @__PURE__ */ x("div", {
423
+ children: [/* @__PURE__ */ w("div", {
420
424
  className: "flex flex-wrap items-center gap-3",
421
- children: [/* @__PURE__ */ b("label", {
425
+ children: [/* @__PURE__ */ C("label", {
422
426
  className: "text-sm text-text-secondary",
423
427
  htmlFor: "analysis-status-filter",
424
428
  children: "Status"
425
- }), /* @__PURE__ */ x(z, {
429
+ }), /* @__PURE__ */ w(H, {
426
430
  value: o ?? Z,
427
431
  onValueChange: (e) => f(e === Z ? void 0 : e),
428
- children: [/* @__PURE__ */ b(H, {
432
+ children: [/* @__PURE__ */ C(G, {
429
433
  id: "analysis-status-filter",
430
434
  className: "w-48",
431
435
  "aria-label": "Filter by status",
432
- children: /* @__PURE__ */ b(U, {})
433
- }), /* @__PURE__ */ x(B, { children: [/* @__PURE__ */ b(V, {
436
+ children: /* @__PURE__ */ C(K, {})
437
+ }), /* @__PURE__ */ w(U, { children: [/* @__PURE__ */ C(W, {
434
438
  value: Z,
435
439
  children: "All statuses"
436
- }), ne.map((e) => /* @__PURE__ */ b(V, {
440
+ }), ae.map((e) => /* @__PURE__ */ C(W, {
437
441
  value: e.value,
438
442
  children: e.label
439
443
  }, e.value))] })]
440
444
  })]
441
- }), P ? /* @__PURE__ */ b(d, {
445
+ }), N ? /* @__PURE__ */ C(d, {
442
446
  variant: "rows",
443
447
  rows: 6,
444
448
  label: r("cosmicintersection.pages.analyses.loading", "Loading analyses…")
445
- }) : F ? /* @__PURE__ */ b(u, {
449
+ }) : P ? /* @__PURE__ */ C(u, {
446
450
  message: r("cosmicintersection.pages.analyses.error", "We could not load analyses. Please try again."),
447
- onRetry: () => void I()
448
- }) : W.length === 0 ? /* @__PURE__ */ b(l, {
449
- icon: C,
451
+ onRetry: () => void F()
452
+ }) : R.length === 0 ? /* @__PURE__ */ C(l, {
453
+ icon: E,
450
454
  title: o ? r("cosmicintersection.pages.analyses.emptyFilterTitle", "No analyses match this filter.") : r("cosmicintersection.pages.analyses.emptyTitle", "No analyses yet."),
451
455
  description: o ? r("cosmicintersection.pages.analyses.emptyFilterDescription", "Try a different status filter.") : r("cosmicintersection.pages.analyses.emptyDescription", "Run an analysis against a notebook or dataset to see results here."),
452
- action: o ? void 0 : /* @__PURE__ */ x(k, {
456
+ action: o ? void 0 : /* @__PURE__ */ w(M, {
453
457
  type: "button",
454
- onClick: () => g(!0),
455
- children: [/* @__PURE__ */ b(E, { className: "size-4" }), r("cosmicintersection.pages.analyses.create", "Run analysis")]
458
+ onClick: () => _(!0),
459
+ children: [/* @__PURE__ */ C(k, { className: "size-4" }), r("cosmicintersection.pages.analyses.create", "Run analysis")]
456
460
  })
457
- }) : /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b("div", {
461
+ }) : /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ C("div", {
458
462
  className: "hidden rounded-card border border-border-default bg-bg-elevated md:block",
459
- children: /* @__PURE__ */ x(G, { children: [/* @__PURE__ */ b(te, { children: /* @__PURE__ */ x(J, { children: [
460
- /* @__PURE__ */ b(q, { children: "Title" }),
461
- /* @__PURE__ */ b(q, { children: "Method" }),
462
- /* @__PURE__ */ b(q, { children: "AI" }),
463
- /* @__PURE__ */ b(q, { children: "Status" }),
464
- /* @__PURE__ */ b(q, { children: "Source" }),
465
- /* @__PURE__ */ b(q, { children: "Started" }),
466
- /* @__PURE__ */ b(q, { children: "Finished" }),
467
- /* @__PURE__ */ b(q, { children: "Output" }),
468
- /* @__PURE__ */ b(q, {
463
+ children: /* @__PURE__ */ w(ee, { children: [/* @__PURE__ */ C(ne, { children: /* @__PURE__ */ w(re, { children: [
464
+ /* @__PURE__ */ C(Y, { children: "Title" }),
465
+ /* @__PURE__ */ C(Y, { children: "Method" }),
466
+ /* @__PURE__ */ C(Y, { children: "AI" }),
467
+ /* @__PURE__ */ C(Y, { children: "Status" }),
468
+ /* @__PURE__ */ C(Y, { children: "Source" }),
469
+ /* @__PURE__ */ C(Y, { children: "Started" }),
470
+ /* @__PURE__ */ C(Y, { children: "Finished" }),
471
+ /* @__PURE__ */ C(Y, { children: "Output" }),
472
+ /* @__PURE__ */ C(Y, {
469
473
  className: "w-12 text-right",
470
474
  children: "Actions"
471
475
  })
472
- ] }) }), /* @__PURE__ */ b(ee, { children: W.map((e) => {
476
+ ] }) }), /* @__PURE__ */ C(te, { children: R.map((e) => {
473
477
  let n = $(e);
474
- return /* @__PURE__ */ x(J, { children: [
475
- /* @__PURE__ */ b(K, {
478
+ return /* @__PURE__ */ w(re, { children: [
479
+ /* @__PURE__ */ C(J, {
476
480
  className: "font-medium text-text-primary",
477
481
  children: e.title
478
482
  }),
479
- /* @__PURE__ */ b(K, {
483
+ /* @__PURE__ */ C(J, {
480
484
  className: "text-text-secondary",
481
485
  children: e.method ?? "—"
482
486
  }),
483
- /* @__PURE__ */ b(K, { children: e.aiAssisted ? /* @__PURE__ */ x(O, {
487
+ /* @__PURE__ */ C(J, { children: e.aiAssisted ? /* @__PURE__ */ w(j, {
484
488
  variant: "secondary",
485
489
  className: "gap-1",
486
- children: [/* @__PURE__ */ b(D, {
490
+ children: [/* @__PURE__ */ C(A, {
487
491
  className: "size-3",
488
492
  "aria-hidden": "true"
489
493
  }), "AI"]
490
- }) : /* @__PURE__ */ b("span", {
494
+ }) : /* @__PURE__ */ C("span", {
491
495
  className: "text-text-secondary",
492
496
  children: "—"
493
497
  }) }),
494
- /* @__PURE__ */ b(K, { children: /* @__PURE__ */ b(h, { status: e.status }) }),
495
- /* @__PURE__ */ b(K, { children: n ? /* @__PURE__ */ x("button", {
498
+ /* @__PURE__ */ C(J, { children: /* @__PURE__ */ C(h, { status: e.status }) }),
499
+ /* @__PURE__ */ C(J, { children: n ? /* @__PURE__ */ w("button", {
496
500
  type: "button",
497
501
  onClick: () => t(n.path),
498
502
  className: "inline-flex max-w-[12rem] items-center gap-1 truncate text-sm text-text-primary underline-offset-2 hover:underline",
499
- children: [/* @__PURE__ */ b(T, {
503
+ children: [/* @__PURE__ */ C(O, {
500
504
  className: "size-3.5 shrink-0",
501
505
  "aria-hidden": "true"
502
- }), /* @__PURE__ */ b("span", {
506
+ }), /* @__PURE__ */ C("span", {
503
507
  className: "truncate",
504
508
  children: n.label
505
509
  })]
506
- }) : /* @__PURE__ */ b("span", {
510
+ }) : /* @__PURE__ */ C("span", {
507
511
  className: "text-text-secondary",
508
512
  children: "—"
509
513
  }) }),
510
- /* @__PURE__ */ b(K, {
514
+ /* @__PURE__ */ C(J, {
511
515
  className: "whitespace-nowrap text-text-secondary",
512
516
  children: Q(e.startedAt)
513
517
  }),
514
- /* @__PURE__ */ b(K, {
518
+ /* @__PURE__ */ C(J, {
515
519
  className: "whitespace-nowrap text-text-secondary",
516
520
  children: Q(e.finishedAt)
517
521
  }),
518
- /* @__PURE__ */ b(K, { children: X(e) ? /* @__PURE__ */ x(k, {
522
+ /* @__PURE__ */ C(J, { children: X(e) ? /* @__PURE__ */ w(M, {
519
523
  type: "button",
520
524
  variant: "outline",
521
525
  size: "sm",
522
526
  className: "h-auto gap-1 px-2 py-1",
523
- onClick: () => M(e),
524
- children: [/* @__PURE__ */ b(S, {
527
+ onClick: () => q(e),
528
+ children: [/* @__PURE__ */ C(T, {
525
529
  className: "size-3.5",
526
530
  "aria-hidden": "true"
527
531
  }), "View"]
528
- }) : /* @__PURE__ */ b("span", {
532
+ }) : /* @__PURE__ */ C("span", {
529
533
  className: "text-text-secondary",
530
534
  children: "—"
531
535
  }) }),
532
- /* @__PURE__ */ b(K, {
536
+ /* @__PURE__ */ C(J, {
533
537
  className: "text-right",
534
- children: /* @__PURE__ */ b(c, {
538
+ children: /* @__PURE__ */ C(c, {
535
539
  ariaLabel: `Actions for ${e.title}`,
536
540
  onView: n ? () => t(n.path) : void 0,
537
- extraItems: se(e)
541
+ extraItems: ue(e)
538
542
  })
539
543
  })
540
544
  ] }, e.id);
541
545
  }) })] })
542
- }), /* @__PURE__ */ b("ul", {
546
+ }), /* @__PURE__ */ C("ul", {
543
547
  className: "space-y-3 md:hidden",
544
- children: W.map((e) => {
548
+ children: R.map((e) => {
545
549
  let n = $(e), r = e.status === "PENDING" || e.status === "RUNNING";
546
- return /* @__PURE__ */ x("li", {
550
+ return /* @__PURE__ */ w("li", {
547
551
  className: "space-y-3 rounded-card border border-border-default bg-bg-elevated p-4",
548
552
  children: [
549
- /* @__PURE__ */ x("div", {
553
+ /* @__PURE__ */ w("div", {
550
554
  className: "flex items-start justify-between gap-3",
551
- children: [/* @__PURE__ */ x("div", {
555
+ children: [/* @__PURE__ */ w("div", {
552
556
  className: "min-w-0",
553
- children: [/* @__PURE__ */ b("p", {
557
+ children: [/* @__PURE__ */ C("p", {
554
558
  className: "truncate font-medium text-text-primary",
555
559
  children: e.title
556
- }), e.method ? /* @__PURE__ */ b("p", {
560
+ }), e.method ? /* @__PURE__ */ C("p", {
557
561
  className: "truncate text-xs text-text-secondary",
558
562
  children: e.method
559
563
  }) : null]
560
- }), /* @__PURE__ */ b(h, { status: e.status })]
564
+ }), /* @__PURE__ */ C(h, { status: e.status })]
561
565
  }),
562
- /* @__PURE__ */ x("div", {
566
+ /* @__PURE__ */ w("div", {
563
567
  className: "flex flex-wrap items-center gap-2",
564
- children: [e.aiAssisted ? /* @__PURE__ */ x(O, {
568
+ children: [e.aiAssisted ? /* @__PURE__ */ w(j, {
565
569
  variant: "secondary",
566
570
  className: "gap-1",
567
- children: [/* @__PURE__ */ b(D, {
571
+ children: [/* @__PURE__ */ C(A, {
568
572
  className: "size-3",
569
573
  "aria-hidden": "true"
570
574
  }), "AI"]
571
- }) : null, n ? /* @__PURE__ */ x("button", {
575
+ }) : null, n ? /* @__PURE__ */ w("button", {
572
576
  type: "button",
573
577
  onClick: () => t(n.path),
574
578
  className: "inline-flex max-w-full items-center gap-1 truncate text-sm text-text-primary underline-offset-2 hover:underline",
575
- children: [/* @__PURE__ */ b(T, {
579
+ children: [/* @__PURE__ */ C(O, {
576
580
  className: "size-3.5 shrink-0",
577
581
  "aria-hidden": "true"
578
- }), /* @__PURE__ */ b("span", {
582
+ }), /* @__PURE__ */ C("span", {
579
583
  className: "truncate",
580
584
  children: n.label
581
585
  })]
582
586
  }) : null]
583
587
  }),
584
- /* @__PURE__ */ x("dl", {
588
+ /* @__PURE__ */ w("dl", {
585
589
  className: "grid grid-cols-2 gap-2 text-xs",
586
- children: [/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("dt", {
590
+ children: [/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("dt", {
587
591
  className: "text-text-secondary",
588
592
  children: "Started"
589
- }), /* @__PURE__ */ b("dd", {
593
+ }), /* @__PURE__ */ C("dd", {
590
594
  className: "text-text-primary",
591
595
  children: Q(e.startedAt)
592
- })] }), /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("dt", {
596
+ })] }), /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("dt", {
593
597
  className: "text-text-secondary",
594
598
  children: "Finished"
595
- }), /* @__PURE__ */ b("dd", {
599
+ }), /* @__PURE__ */ C("dd", {
596
600
  className: "text-text-primary",
597
601
  children: Q(e.finishedAt)
598
602
  })] })]
599
603
  }),
600
- X(e) || r ? /* @__PURE__ */ x("div", {
604
+ X(e) || r ? /* @__PURE__ */ w("div", {
601
605
  className: "flex flex-wrap gap-2",
602
- children: [X(e) ? /* @__PURE__ */ x(k, {
606
+ children: [X(e) ? /* @__PURE__ */ w(M, {
603
607
  type: "button",
604
608
  variant: "outline",
605
609
  size: "sm",
606
- onClick: () => M(e),
607
- children: [/* @__PURE__ */ b(S, { className: "size-4" }), "View results"]
608
- }) : null, r ? /* @__PURE__ */ x(k, {
610
+ onClick: () => q(e),
611
+ children: [/* @__PURE__ */ C(T, { className: "size-4" }), "View results"]
612
+ }) : null, r ? /* @__PURE__ */ w(M, {
609
613
  type: "button",
610
614
  variant: "outline",
611
615
  size: "sm",
612
- onClick: () => A(e),
613
- children: [/* @__PURE__ */ b(C, { className: "size-4" }), "Complete"]
616
+ onClick: () => y(e),
617
+ children: [/* @__PURE__ */ C(E, { className: "size-4" }), "Complete"]
614
618
  }) : null]
615
619
  }) : null
616
620
  ]
@@ -618,28 +622,28 @@ function se() {
618
622
  })
619
623
  })] })]
620
624
  }),
621
- /* @__PURE__ */ b(ae, {
625
+ /* @__PURE__ */ C(ce, {
622
626
  open: p,
623
- onOpenChange: g,
624
- onCompleted: () => void I()
627
+ onOpenChange: _,
628
+ onCompleted: () => void F()
625
629
  }),
626
- /* @__PURE__ */ b(oe, {
627
- analysis: w,
630
+ /* @__PURE__ */ C(le, {
631
+ analysis: v,
628
632
  onOpenChange: (e) => {
629
- e || A(null);
633
+ e || y(null);
630
634
  },
631
- onCompleted: () => void I()
632
- }, w?.id ?? "none"),
633
- /* @__PURE__ */ b(ie, {
634
- analysis: j,
635
+ onCompleted: () => void F()
636
+ }, v?.id ?? "none"),
637
+ /* @__PURE__ */ C(se, {
638
+ analysis: V,
635
639
  onOpenChange: (e) => {
636
- e || M(null);
640
+ e || q(null);
637
641
  }
638
642
  })
639
643
  ]
640
644
  });
641
645
  }
642
646
  //#endregion
643
- export { se as default };
647
+ export { ue as default };
644
648
 
645
649
  //# sourceMappingURL=AnalysesPage.js.map