@burdenoff/microfe-cosmicintersection 2026.1107.1 → 2026.1108.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 (42) hide show
  1. package/dist/cosmicintersection/api/cosmicApi.d.ts +222 -1
  2. package/dist/cosmicintersection/api/cosmicApi.d.ts.map +1 -1
  3. package/dist/cosmicintersection/api/cosmicApi.js +332 -133
  4. package/dist/cosmicintersection/api/cosmicApi.js.map +1 -1
  5. package/dist/cosmicintersection/components/AiRunAttribution.d.ts +18 -0
  6. package/dist/cosmicintersection/components/AiRunAttribution.d.ts.map +1 -0
  7. package/dist/cosmicintersection/components/AiRunAttribution.js +39 -0
  8. package/dist/cosmicintersection/components/AiRunAttribution.js.map +1 -0
  9. package/dist/cosmicintersection/components/ReleaseDraftDialog.d.ts +15 -0
  10. package/dist/cosmicintersection/components/ReleaseDraftDialog.d.ts.map +1 -0
  11. package/dist/cosmicintersection/components/ReleaseDraftDialog.js +193 -0
  12. package/dist/cosmicintersection/components/ReleaseDraftDialog.js.map +1 -0
  13. package/dist/cosmicintersection/components/RunTriageCard.d.ts +15 -0
  14. package/dist/cosmicintersection/components/RunTriageCard.d.ts.map +1 -0
  15. package/dist/cosmicintersection/components/RunTriageCard.js +282 -0
  16. package/dist/cosmicintersection/components/RunTriageCard.js.map +1 -0
  17. package/dist/cosmicintersection/components/SchemaProposalPanel.d.ts +18 -0
  18. package/dist/cosmicintersection/components/SchemaProposalPanel.d.ts.map +1 -0
  19. package/dist/cosmicintersection/components/SchemaProposalPanel.js +277 -0
  20. package/dist/cosmicintersection/components/SchemaProposalPanel.js.map +1 -0
  21. package/dist/cosmicintersection/components/index.d.ts +4 -0
  22. package/dist/cosmicintersection/components/index.d.ts.map +1 -1
  23. package/dist/cosmicintersection/components/index.js +5 -1
  24. package/dist/cosmicintersection/pages/access/AccessPage.d.ts.map +1 -1
  25. package/dist/cosmicintersection/pages/access/AccessPage.js +348 -326
  26. package/dist/cosmicintersection/pages/access/AccessPage.js.map +1 -1
  27. package/dist/cosmicintersection/pages/datasets/DatasetDetailPage.d.ts.map +1 -1
  28. package/dist/cosmicintersection/pages/datasets/DatasetDetailPage.js +732 -543
  29. package/dist/cosmicintersection/pages/datasets/DatasetDetailPage.js.map +1 -1
  30. package/dist/cosmicintersection/pages/discovery/DiscoveryPage.d.ts.map +1 -1
  31. package/dist/cosmicintersection/pages/discovery/DiscoveryPage.js +268 -119
  32. package/dist/cosmicintersection/pages/discovery/DiscoveryPage.js.map +1 -1
  33. package/dist/cosmicintersection/pages/notebooks/NotebookDetailPage.d.ts.map +1 -1
  34. package/dist/cosmicintersection/pages/notebooks/NotebookDetailPage.js +322 -307
  35. package/dist/cosmicintersection/pages/notebooks/NotebookDetailPage.js.map +1 -1
  36. package/dist/cosmicintersection/pages/releases/ReleasesPage.d.ts.map +1 -1
  37. package/dist/cosmicintersection/pages/releases/ReleasesPage.js +276 -241
  38. package/dist/cosmicintersection/pages/releases/ReleasesPage.js.map +1 -1
  39. package/dist/cosmicintersection/pages/runs/RunDetailPage.d.ts.map +1 -1
  40. package/dist/cosmicintersection/pages/runs/RunDetailPage.js +190 -185
  41. package/dist/cosmicintersection/pages/runs/RunDetailPage.js.map +1 -1
  42. package/package.json +1 -1
@@ -1,28 +1,29 @@
1
1
  import { useCosmicIntersection as e } from "../../context/CosmicIntersectionContext.js";
2
2
  import { notify as t } from "../../lib/toast.js";
3
- import { useCosAddSchemaFieldMutation as n, useCosAnalysesQuery as r, useCosArchiveDatasetMutation as i, useCosDatasetQuery as ee, useCosNotebooksQuery as te, useCosPublishDatasetMutation as ne, useCosReleasesQuery as re, useCosRunsQuery as ie, useCosUpdateDatasetMutation as ae } from "../../api/cosmicApi.js";
4
- import { ActionMenu as oe } from "../../components/ActionMenu.js";
3
+ import { useCosAddSchemaFieldMutation as n, useCosAnalysesQuery as r, useCosArchiveDatasetMutation as i, useCosDatasetQuery as ee, useCosNotebooksQuery as te, useCosPublishDatasetMutation as ne, useCosReleasesQuery as re, useCosRemoveSchemaFieldMutation as ie, useCosRunsQuery as ae, useCosUpdateDatasetMutation as oe, useCosUpdateSchemaFieldMutation as se } from "../../api/cosmicApi.js";
4
+ import { ActionMenu as ce } from "../../components/ActionMenu.js";
5
5
  import { EmptyState as a } from "../../components/EmptyState.js";
6
- import { ErrorState as se } from "../../components/ErrorState.js";
7
- import { LoadingState as o } from "../../components/LoadingState.js";
8
- import { ActivityFeedPanel as ce } from "../../components/ActivityFeedPanel.js";
9
- import { DiscussionPanel as le } from "../../components/DiscussionPanel.js";
10
- import { WorkspaceTagsPicker as ue } from "../../components/WorkspaceTagsPicker.js";
11
- import { useFileDownloadUrl as de } from "../../components/FileUploadField.js";
12
- import { PageLayout as s } from "../../components/PageLayout.js";
13
- import { StatusBadge as c, formatEnumLabel as l } from "../../components/StatusBadge.js";
6
+ import { ErrorState as le } from "../../components/ErrorState.js";
7
+ import { LoadingState as ue } from "../../components/LoadingState.js";
8
+ import { ActivityFeedPanel as de } from "../../components/ActivityFeedPanel.js";
9
+ import { DiscussionPanel as fe } from "../../components/DiscussionPanel.js";
10
+ import { WorkspaceTagsPicker as pe } from "../../components/WorkspaceTagsPicker.js";
11
+ import { useFileDownloadUrl as me } from "../../components/FileUploadField.js";
12
+ import { PageLayout as o } from "../../components/PageLayout.js";
13
+ import { StatusBadge as he, formatEnumLabel as s } from "../../components/StatusBadge.js";
14
+ import { SchemaProposalPanel as ge } from "../../components/SchemaProposalPanel.js";
14
15
  import "../../components/index.js";
15
- import { useSelectedRecord as fe } from "../../lib/useSelectedRecord.js";
16
- import { useTrackRecentItem as pe } from "../../lib/useTrackRecentItem.js";
17
- import { useEntityTagSync as me } from "../../hooks/useEntityTagSync.js";
18
- import { LineageGraph as he, buildDatasetLineage as ge } from "../../components/LineageGraph.js";
19
- import { useMemo as _e, useState as u } from "react";
20
- import { Fragment as ve, jsx as d, jsxs as f } from "react/jsx-runtime";
21
- import { useParams as ye } from "react-router";
22
- import { ArrowRight as be, Boxes as xe, Columns3 as p, Database as Se, Download as Ce, GitBranch as we, History as Te, MessagesSquare as Ee, Pencil as De, Plus as Oe, Radar as ke, Share2 as Ae, TriangleAlert as m } from "lucide-react";
23
- import { Badge as h, Button as g, Checkbox as je, Dialog as Me, DialogContent as Ne, DialogDescription as Pe, DialogFooter as Fe, DialogHeader as Ie, DialogTitle as Le, Input as _, Label as v, Select as Re, SelectContent as ze, SelectItem as Be, SelectTrigger as Ve, SelectValue as He, Table as Ue, TableBody as We, TableCell as y, TableHead as b, TableHeader as Ge, TableRow as x, Textarea as Ke } from "@burdenoff/fe-libs/ui";
16
+ import { useSelectedRecord as _e } from "../../lib/useSelectedRecord.js";
17
+ import { useTrackRecentItem as ve } from "../../lib/useTrackRecentItem.js";
18
+ import { useEntityTagSync as ye } from "../../hooks/useEntityTagSync.js";
19
+ import { LineageGraph as be, buildDatasetLineage as xe } from "../../components/LineageGraph.js";
20
+ import { useMemo as Se, useState as c } from "react";
21
+ import { Fragment as Ce, jsx as l, jsxs as u } from "react/jsx-runtime";
22
+ import { useParams as we } from "react-router";
23
+ import { ArrowRight as Te, Boxes as Ee, Columns3 as De, Database as Oe, Download as ke, GitBranch as Ae, History as je, MessagesSquare as Me, Pencil as d, Plus as Ne, Radar as Pe, Share2 as Fe, Trash2 as Ie, TriangleAlert as f } from "lucide-react";
24
+ import { Badge as p, Button as m, Checkbox as Le, Dialog as h, DialogContent as g, DialogDescription as _, DialogFooter as v, DialogHeader as y, DialogTitle as b, Input as x, Label as S, Select as Re, SelectContent as ze, SelectItem as Be, SelectTrigger as Ve, SelectValue as He, Table as Ue, TableBody as We, TableCell as C, TableHead as w, TableHeader as Ge, TableRow as Ke, Textarea as qe } from "@burdenoff/fe-libs/ui";
24
25
  //#region src/cosmicintersection/pages/datasets/DatasetDetailPage.tsx
25
- var qe = [
26
+ var Je = [
26
27
  "STRING",
27
28
  "INTEGER",
28
29
  "FLOAT",
@@ -33,15 +34,15 @@ var qe = [
33
34
  "GEOMETRY",
34
35
  "IMAGE_REF",
35
36
  "JSON"
36
- ], S = /* @__PURE__ */ new Set([
37
+ ], T = /* @__PURE__ */ new Set([
37
38
  "FLOAT",
38
39
  "COORDINATE",
39
40
  "SPECTRUM"
40
41
  ]);
41
- function C(e) {
42
- return S.has(e.fieldType) && !e.unit;
42
+ function E(e) {
43
+ return T.has(e.fieldType) && !e.unit;
43
44
  }
44
- function Je(e) {
45
+ function Ye(e) {
45
46
  if (!e) return "—";
46
47
  let t = Number(e);
47
48
  if (!Number.isFinite(t) || t <= 0) return "—";
@@ -56,629 +57,817 @@ function Je(e) {
56
57
  for (; r >= 1024 && i < n.length - 1;) r /= 1024, i += 1;
57
58
  return `${r >= 10 || i === 0 ? Math.round(r) : r.toFixed(1)} ${n[i]}`;
58
59
  }
59
- function w(e) {
60
+ function D(e) {
60
61
  if (!e) return "—";
61
62
  let t = new Date(e);
62
63
  return Number.isNaN(t.getTime()) ? "—" : t.toLocaleString();
63
64
  }
64
- function T({ label: e, value: t }) {
65
- return /* @__PURE__ */ f("div", {
65
+ function O({ label: e, value: t }) {
66
+ return /* @__PURE__ */ u("div", {
66
67
  className: "rounded-card border border-border-default bg-bg-elevated p-4",
67
- children: [/* @__PURE__ */ d("p", {
68
+ children: [/* @__PURE__ */ l("p", {
68
69
  className: "text-xs font-medium uppercase tracking-wide text-text-secondary",
69
70
  children: e
70
- }), /* @__PURE__ */ d("div", {
71
+ }), /* @__PURE__ */ l("div", {
71
72
  className: "mt-1 text-sm text-text-primary",
72
73
  children: t
73
74
  })]
74
75
  });
75
76
  }
76
- function E() {
77
- let { id: S = "" } = ye(), { navigate: E } = e(), { selectedId: D, select: Ye } = fe("field"), O = (e) => Ye(D === e ? null : e), { data: k, loading: Xe, error: Ze, refetch: A } = ee(S), j = k?.cosDataset ?? null;
78
- pe(j ? {
77
+ function k() {
78
+ let { id: T = "" } = we(), { navigate: k } = e(), { selectedId: A, select: Xe } = _e("field"), Ze = (e) => Xe(A === e ? null : e), { data: Qe, loading: $e, error: et, refetch: j } = ee(T), M = Qe?.cosDataset ?? null;
79
+ ve(M ? {
79
80
  type: "dataset",
80
- id: j.id,
81
- name: j.name,
82
- path: `datasets/${encodeURIComponent(j.id)}`
81
+ id: M.id,
82
+ name: M.name,
83
+ path: `datasets/${encodeURIComponent(M.id)}`
83
84
  } : null);
84
- let M = de(j?.file?.id).data?.getFileDownloadUrl ?? null, [Qe, { loading: N }] = ne(), [$e] = i(), [et, { loading: P }] = ae(), { syncTags: tt } = me("COSMICINTERSECTION_DATASET"), [F, I] = u(!1), [nt, { loading: L }] = n(), R = r({ datasetId: S }), z = ie({ pagination: {
85
+ let tt = me(M?.file?.id).data?.getFileDownloadUrl ?? null, [nt, { loading: rt }] = ne(), [it] = i(), [at, { loading: N }] = oe(), { syncTags: ot } = ye("COSMICINTERSECTION_DATASET"), [P, st] = c(!1), [ct, { loading: F }] = n(), [lt, { loading: I }] = se(), [ut, { loading: L }] = ie(), [R, z] = c(null), [B, dt] = c(""), [ft, pt] = c("STRING"), [mt, ht] = c(""), [gt, _t] = c(""), [vt, yt] = c(""), [bt, xt] = c(!0), [V, H] = c(null), St = (e) => {
86
+ z(e), dt(e.name), pt(e.fieldType), ht(e.unit ?? ""), _t(e.description ?? ""), yt(e.provenance ?? ""), xt(e.nullable);
87
+ }, Ct = async () => {
88
+ if (R) {
89
+ if (!B.trim()) {
90
+ t.error("Field name is required");
91
+ return;
92
+ }
93
+ (await lt({ variables: {
94
+ id: R.id,
95
+ input: {
96
+ name: B.trim(),
97
+ fieldType: ft,
98
+ unit: mt.trim() || void 0,
99
+ description: gt.trim() || void 0,
100
+ provenance: vt.trim() || void 0,
101
+ nullable: bt
102
+ }
103
+ } })).data?.cosUpdateSchemaField && (t.success("Schema field updated"), z(null), await j());
104
+ }
105
+ }, wt = async () => {
106
+ V && (await ut({ variables: { id: V } })).data?.cosRemoveSchemaField && (t.success("Schema field removed"), H(null), await j());
107
+ }, U = r({ datasetId: T }), W = ae({ pagination: {
85
108
  limit: 100,
86
109
  offset: 0
87
- } }), B = te({ pagination: {
110
+ } }), G = te({ pagination: {
88
111
  limit: 100,
89
112
  offset: 0
90
- } }), V = re({ pagination: {
113
+ } }), K = re({ pagination: {
91
114
  limit: 100,
92
115
  offset: 0
93
- } }), H = k?.cosDataset ?? null, U = _e(() => {
94
- if (!H) return {
116
+ } }), q = Qe?.cosDataset ?? null, J = Se(() => {
117
+ if (!q) return {
95
118
  nodes: [],
96
119
  edges: []
97
120
  };
98
121
  let e = /* @__PURE__ */ new Map();
99
- H.source && e.set(H.source.id, H.source);
122
+ q.source && e.set(q.source.id, q.source);
100
123
  let t = /* @__PURE__ */ new Map();
101
- H.collection && t.set(H.collection.id, H.collection);
124
+ q.collection && t.set(q.collection.id, q.collection);
102
125
  let n = {
103
- datasetsById: /* @__PURE__ */ new Map([[H.id, H]]),
126
+ datasetsById: /* @__PURE__ */ new Map([[q.id, q]]),
104
127
  sourcesById: e,
105
128
  collectionsById: t,
106
- runs: (z.data?.cosListRuns?.items ?? []).filter((e) => e.datasetId === H.id),
107
- notebooks: (B.data?.cosListNotebooks?.items ?? []).filter((e) => e.datasetIds.includes(H.id)),
108
- analyses: R.data?.cosListAnalyses ?? [],
109
- releases: (V.data?.cosListReleases?.items ?? []).filter((e) => e.datasetIds.includes(H.id))
129
+ runs: (W.data?.cosListRuns?.items ?? []).filter((e) => e.datasetId === q.id),
130
+ notebooks: (G.data?.cosListNotebooks?.items ?? []).filter((e) => e.datasetIds.includes(q.id)),
131
+ analyses: U.data?.cosListAnalyses ?? [],
132
+ releases: (K.data?.cosListReleases?.items ?? []).filter((e) => e.datasetIds.includes(q.id))
110
133
  };
111
- return ge(H.id, n);
134
+ return xe(q.id, n);
112
135
  }, [
113
- H,
114
- z.data,
115
- B.data,
116
- R.data,
117
- V.data
118
- ]), rt = z.loading || B.loading || R.loading || V.loading, [W, G] = u([]), [it, at] = u(null), K = j ? `${j.id}:${j.updatedAt}` : null;
119
- K && K !== it && (at(K), G(j?.tags ?? []));
120
- let ot = j != null && (W.length !== j.tags.length || W.some((e, t) => e !== j.tags[t])), [st, ct] = u(!1), [q, J] = u(""), [Y, X] = u("STRING"), [lt, ut] = u(""), [dt, ft] = u(""), [pt, mt] = u(""), [ht, gt] = u(!0), _t = () => {
121
- J(""), X("STRING"), ut(""), ft(""), mt(""), gt(!0);
122
- }, Z = (e) => {
123
- ct(e), e || _t();
136
+ q,
137
+ W.data,
138
+ G.data,
139
+ U.data,
140
+ K.data
141
+ ]), Tt = W.loading || G.loading || U.loading || K.loading, [Y, Et] = c([]), [Dt, Ot] = c(null), X = M ? `${M.id}:${M.updatedAt}` : null;
142
+ X && X !== Dt && (Ot(X), Et(M?.tags ?? []));
143
+ let kt = M != null && (Y.length !== M.tags.length || Y.some((e, t) => e !== M.tags[t])), [At, jt] = c(!1), [Z, Mt] = c(""), [Nt, Pt] = c("STRING"), [Ft, It] = c(""), [Lt, Rt] = c(""), [zt, Bt] = c(""), [Vt, Ht] = c(!0), Ut = () => {
144
+ Mt(""), Pt("STRING"), It(""), Rt(""), Bt(""), Ht(!0);
145
+ }, Q = (e) => {
146
+ jt(e), e || Ut();
124
147
  };
125
- if (Xe) return /* @__PURE__ */ d(s, {
148
+ if ($e) return /* @__PURE__ */ l(o, {
126
149
  title: "Dataset",
127
150
  backPath: "datasets",
128
- children: /* @__PURE__ */ d(o, { label: "Loading dataset…" })
151
+ children: /* @__PURE__ */ l(ue, { label: "Loading dataset…" })
129
152
  });
130
- if (Ze) return /* @__PURE__ */ d(s, {
153
+ if (et) return /* @__PURE__ */ l(o, {
131
154
  title: "Dataset",
132
155
  backPath: "datasets",
133
- children: /* @__PURE__ */ d(se, {
156
+ children: /* @__PURE__ */ l(le, {
134
157
  message: "We could not load this dataset.",
135
- onRetry: () => void A()
158
+ onRetry: () => void j()
136
159
  })
137
160
  });
138
- if (!j) return /* @__PURE__ */ d(s, {
161
+ if (!M) return /* @__PURE__ */ l(o, {
139
162
  title: "Dataset",
140
163
  backPath: "datasets",
141
- children: /* @__PURE__ */ d(a, {
142
- icon: Se,
164
+ children: /* @__PURE__ */ l(a, {
165
+ icon: Oe,
143
166
  title: "Dataset not found.",
144
167
  description: "This dataset may have been removed or is outside your current scope.",
145
- action: /* @__PURE__ */ d(g, {
168
+ action: /* @__PURE__ */ l(m, {
146
169
  type: "button",
147
- onClick: () => E("datasets"),
170
+ onClick: () => k("datasets"),
148
171
  children: "Back to datasets"
149
172
  })
150
173
  })
151
174
  });
152
- let Q = [...j.schemaFields ?? []].sort((e, t) => e.position - t.position), $ = Q.filter(C).length, vt = j.status !== "AVAILABLE" && j.status !== "ARCHIVED", yt = async () => {
153
- (await Qe({ variables: { id: j.id } })).data?.cosPublishDataset && (t.success("Dataset published", `“${j.name}” is now available.`), await A());
154
- }, bt = async () => {
155
- let e = await $e({ variables: { id: j.id } });
175
+ let $ = [...M.schemaFields ?? []].sort((e, t) => e.position - t.position), Wt = $.filter(E).length, Gt = M.status !== "AVAILABLE" && M.status !== "ARCHIVED", Kt = async () => {
176
+ (await nt({ variables: { id: M.id } })).data?.cosPublishDataset && (t.success("Dataset published", `“${M.name}” is now available.`), await j());
177
+ }, qt = async () => {
178
+ let e = await it({ variables: { id: M.id } });
156
179
  if (e.error) throw Error(e.error.message);
157
180
  if (!e.data?.cosArchiveDataset) throw t.error("Could not archive dataset", "The server did not confirm the change."), Error("Archive not confirmed");
158
- t.success("Dataset archived"), E("datasets");
159
- }, xt = async () => {
160
- if (F) return;
161
- let e = j.tags;
162
- I(!0);
181
+ t.success("Dataset archived"), k("datasets");
182
+ }, Jt = async () => {
183
+ if (P) return;
184
+ let e = M.tags;
185
+ st(!0);
163
186
  try {
164
- (await et({ variables: {
165
- id: j.id,
166
- input: { tags: W }
167
- } })).data?.cosUpdateDataset && (await tt(j.id, W, e) && t.success("Tags updated"), await A());
187
+ (await at({ variables: {
188
+ id: M.id,
189
+ input: { tags: Y }
190
+ } })).data?.cosUpdateDataset && (await ot(M.id, Y, e) && t.success("Tags updated"), await j());
168
191
  } finally {
169
- I(!1);
192
+ st(!1);
170
193
  }
171
- }, St = async () => {
172
- if (!q.trim()) {
194
+ }, Yt = async () => {
195
+ if (!Z.trim()) {
173
196
  t.error("Field name is required");
174
197
  return;
175
198
  }
176
- (await nt({ variables: { input: {
177
- datasetId: j.id,
178
- name: q.trim(),
179
- fieldType: Y,
180
- unit: lt.trim() || void 0,
181
- description: dt.trim() || void 0,
182
- provenance: pt.trim() || void 0,
183
- nullable: ht
184
- } } })).data?.cosAddSchemaField && (t.success("Schema field added"), Z(!1), await A());
199
+ (await ct({ variables: { input: {
200
+ datasetId: M.id,
201
+ name: Z.trim(),
202
+ fieldType: Nt,
203
+ unit: Ft.trim() || void 0,
204
+ description: Lt.trim() || void 0,
205
+ provenance: zt.trim() || void 0,
206
+ nullable: Vt
207
+ } } })).data?.cosAddSchemaField && (t.success("Schema field added"), Q(!1), await j());
185
208
  };
186
- return /* @__PURE__ */ f(s, {
187
- title: j.name,
188
- description: j.description ?? void 0,
209
+ return /* @__PURE__ */ u(o, {
210
+ title: M.name,
211
+ description: M.description ?? void 0,
189
212
  backPath: "datasets",
190
- actions: /* @__PURE__ */ f("div", {
213
+ actions: /* @__PURE__ */ u("div", {
191
214
  className: "flex flex-wrap items-center justify-end gap-2",
192
215
  children: [
193
- /* @__PURE__ */ f(g, {
216
+ /* @__PURE__ */ u(m, {
194
217
  type: "button",
195
218
  variant: "outline",
196
- onClick: () => E(`datasets/${j.id}/edit`),
197
- children: [/* @__PURE__ */ d(De, { className: "size-4" }), "Edit"]
219
+ onClick: () => k(`datasets/${M.id}/edit`),
220
+ children: [/* @__PURE__ */ l(d, { className: "size-4" }), "Edit"]
198
221
  }),
199
- vt ? /* @__PURE__ */ d(g, {
222
+ Gt ? /* @__PURE__ */ l(m, {
200
223
  type: "button",
201
- onClick: () => void yt(),
202
- disabled: N,
203
- children: N ? "Publishing…" : "Publish"
224
+ onClick: () => void Kt(),
225
+ disabled: rt,
226
+ children: rt ? "Publishing…" : "Publish"
204
227
  }) : null,
205
- /* @__PURE__ */ d(oe, {
206
- ariaLabel: `Actions for ${j.name}`,
207
- entityName: j.name,
208
- onDelete: () => bt(),
228
+ /* @__PURE__ */ l(ce, {
229
+ ariaLabel: `Actions for ${M.name}`,
230
+ entityName: M.name,
231
+ onDelete: () => qt(),
209
232
  deleteLabel: "Archive dataset"
210
233
  })
211
234
  ]
212
235
  }),
213
- children: [/* @__PURE__ */ f("div", {
214
- className: "space-y-6",
215
- children: [
216
- /* @__PURE__ */ f("div", {
217
- className: "flex flex-wrap items-center gap-2",
218
- children: [
219
- /* @__PURE__ */ d(c, { status: j.status }),
220
- /* @__PURE__ */ d(c, {
221
- status: j.accessLevel,
222
- label: l(j.accessLevel)
223
- }),
224
- /* @__PURE__ */ f("span", {
225
- className: "inline-flex items-center gap-1.5 rounded-full border border-border-default bg-bg-elevated px-2.5 py-0.5 text-xs font-medium",
226
- title: "Current dataset version",
227
- children: [
228
- /* @__PURE__ */ d(we, {
229
- className: "size-3.5 text-text-tertiary",
230
- "aria-hidden": "true"
231
- }),
232
- /* @__PURE__ */ f("span", {
233
- className: "text-text-primary",
234
- children: ["v", j.version]
235
- }),
236
- /* @__PURE__ */ d("span", {
237
- className: "text-text-tertiary",
238
- children: "· current"
239
- })
240
- ]
241
- })
242
- ]
243
- }),
244
- /* @__PURE__ */ f("div", {
245
- className: "grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-4",
246
- children: [
247
- /* @__PURE__ */ d(T, {
248
- label: "Source",
249
- value: j.source ? /* @__PURE__ */ f("button", {
250
- type: "button",
251
- onClick: () => E(`sources/${j.source?.id}`),
252
- className: "inline-flex items-center gap-1.5 text-text-primary underline-offset-2 hover:underline",
253
- children: [/* @__PURE__ */ d(ke, {
254
- className: "size-4 text-text-secondary",
255
- "aria-hidden": "true"
256
- }), j.source.name]
257
- }) : /* @__PURE__ */ d("span", {
258
- className: "text-text-secondary",
259
- children: "Not linked"
260
- })
261
- }),
262
- /* @__PURE__ */ d(T, {
263
- label: "Collection",
264
- value: j.collection ? /* @__PURE__ */ f("button", {
265
- type: "button",
266
- onClick: () => E(`collections/${j.collection?.id}`),
267
- className: "inline-flex items-center gap-1.5 text-text-primary underline-offset-2 hover:underline",
268
- children: [/* @__PURE__ */ d(xe, {
269
- className: "size-4 text-text-secondary",
270
- "aria-hidden": "true"
271
- }), j.collection.name]
272
- }) : /* @__PURE__ */ d("span", {
273
- className: "text-text-secondary",
274
- children: "Not in a collection"
236
+ children: [
237
+ /* @__PURE__ */ u("div", {
238
+ className: "space-y-6",
239
+ children: [
240
+ /* @__PURE__ */ u("div", {
241
+ className: "flex flex-wrap items-center gap-2",
242
+ children: [
243
+ /* @__PURE__ */ l(he, { status: M.status }),
244
+ /* @__PURE__ */ l(he, {
245
+ status: M.accessLevel,
246
+ label: s(M.accessLevel)
247
+ }),
248
+ /* @__PURE__ */ u("span", {
249
+ className: "inline-flex items-center gap-1.5 rounded-full border border-border-default bg-bg-elevated px-2.5 py-0.5 text-xs font-medium",
250
+ title: "Current dataset version",
251
+ children: [
252
+ /* @__PURE__ */ l(Ae, {
253
+ className: "size-3.5 text-text-tertiary",
254
+ "aria-hidden": "true"
255
+ }),
256
+ /* @__PURE__ */ u("span", {
257
+ className: "text-text-primary",
258
+ children: ["v", M.version]
259
+ }),
260
+ /* @__PURE__ */ l("span", {
261
+ className: "text-text-tertiary",
262
+ children: "· current"
263
+ })
264
+ ]
275
265
  })
276
- }),
277
- /* @__PURE__ */ d(T, {
278
- label: "Format",
279
- value: /* @__PURE__ */ d("span", { children: j.format || "Not specified" })
280
- }),
281
- /* @__PURE__ */ d(T, {
282
- label: "Size",
283
- value: /* @__PURE__ */ f("span", {
284
- className: "tabular-nums",
285
- children: [Je(j.sizeBytes), Number(j.rowCount) > 0 ? /* @__PURE__ */ f("span", {
266
+ ]
267
+ }),
268
+ /* @__PURE__ */ u("div", {
269
+ className: "grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-4",
270
+ children: [
271
+ /* @__PURE__ */ l(O, {
272
+ label: "Source",
273
+ value: M.source ? /* @__PURE__ */ u("button", {
274
+ type: "button",
275
+ onClick: () => k(`sources/${M.source?.id}`),
276
+ className: "inline-flex items-center gap-1.5 text-text-primary underline-offset-2 hover:underline",
277
+ children: [/* @__PURE__ */ l(Pe, {
278
+ className: "size-4 text-text-secondary",
279
+ "aria-hidden": "true"
280
+ }), M.source.name]
281
+ }) : /* @__PURE__ */ l("span", {
286
282
  className: "text-text-secondary",
287
- children: [
288
- " ",
289
- "· ",
290
- Number(j.rowCount).toLocaleString(),
291
- " rows"
292
- ]
293
- }) : null]
283
+ children: "Not linked"
284
+ })
285
+ }),
286
+ /* @__PURE__ */ l(O, {
287
+ label: "Collection",
288
+ value: M.collection ? /* @__PURE__ */ u("button", {
289
+ type: "button",
290
+ onClick: () => k(`collections/${M.collection?.id}`),
291
+ className: "inline-flex items-center gap-1.5 text-text-primary underline-offset-2 hover:underline",
292
+ children: [/* @__PURE__ */ l(Ee, {
293
+ className: "size-4 text-text-secondary",
294
+ "aria-hidden": "true"
295
+ }), M.collection.name]
296
+ }) : /* @__PURE__ */ l("span", {
297
+ className: "text-text-secondary",
298
+ children: "Not in a collection"
299
+ })
300
+ }),
301
+ /* @__PURE__ */ l(O, {
302
+ label: "Format",
303
+ value: /* @__PURE__ */ l("span", { children: M.format || "Not specified" })
304
+ }),
305
+ /* @__PURE__ */ l(O, {
306
+ label: "Size",
307
+ value: /* @__PURE__ */ u("span", {
308
+ className: "tabular-nums",
309
+ children: [Ye(M.sizeBytes), Number(M.rowCount) > 0 ? /* @__PURE__ */ u("span", {
310
+ className: "text-text-secondary",
311
+ children: [
312
+ " ",
313
+ "· ",
314
+ Number(M.rowCount).toLocaleString(),
315
+ " rows"
316
+ ]
317
+ }) : null]
318
+ })
319
+ }),
320
+ /* @__PURE__ */ l(O, {
321
+ label: "Ingested",
322
+ value: /* @__PURE__ */ l("span", { children: D(M.ingestedAt) })
323
+ }),
324
+ /* @__PURE__ */ l(O, {
325
+ label: "Created",
326
+ value: /* @__PURE__ */ l("span", { children: D(M.createdAt) })
327
+ }),
328
+ /* @__PURE__ */ l(O, {
329
+ label: "Updated",
330
+ value: /* @__PURE__ */ l("span", { children: D(M.updatedAt) })
331
+ }),
332
+ /* @__PURE__ */ l(O, {
333
+ label: "Artifact",
334
+ value: M.file ? tt ? /* @__PURE__ */ u("a", {
335
+ href: tt,
336
+ target: "_blank",
337
+ rel: "noopener noreferrer",
338
+ className: "inline-flex items-center gap-1.5 text-text-primary underline-offset-2 hover:underline",
339
+ children: [/* @__PURE__ */ l(ke, {
340
+ className: "size-4",
341
+ "aria-hidden": "true"
342
+ }), "Download file"]
343
+ }) : /* @__PURE__ */ l("span", {
344
+ className: "text-text-secondary",
345
+ children: "Resolving link…"
346
+ }) : /* @__PURE__ */ l("span", {
347
+ className: "text-text-secondary",
348
+ children: "No file attached"
349
+ })
294
350
  })
295
- }),
296
- /* @__PURE__ */ d(T, {
297
- label: "Ingested",
298
- value: /* @__PURE__ */ d("span", { children: w(j.ingestedAt) })
299
- }),
300
- /* @__PURE__ */ d(T, {
301
- label: "Created",
302
- value: /* @__PURE__ */ d("span", { children: w(j.createdAt) })
303
- }),
304
- /* @__PURE__ */ d(T, {
305
- label: "Updated",
306
- value: /* @__PURE__ */ d("span", { children: w(j.updatedAt) })
307
- }),
308
- /* @__PURE__ */ d(T, {
309
- label: "Artifact",
310
- value: j.file ? M ? /* @__PURE__ */ f("a", {
311
- href: M,
312
- target: "_blank",
313
- rel: "noopener noreferrer",
314
- className: "inline-flex items-center gap-1.5 text-text-primary underline-offset-2 hover:underline",
315
- children: [/* @__PURE__ */ d(Ce, {
351
+ ]
352
+ }),
353
+ /* @__PURE__ */ u("section", {
354
+ className: "space-y-3",
355
+ children: [/* @__PURE__ */ u("div", {
356
+ className: "flex items-center justify-between gap-3",
357
+ children: [/* @__PURE__ */ u("div", {
358
+ className: "flex items-center gap-2",
359
+ children: [/* @__PURE__ */ l(Fe, {
360
+ className: "size-5 text-text-secondary",
361
+ "aria-hidden": "true"
362
+ }), /* @__PURE__ */ l("h2", {
363
+ className: "text-lg font-semibold text-text-primary",
364
+ children: "Lineage"
365
+ })]
366
+ }), /* @__PURE__ */ u("button", {
367
+ type: "button",
368
+ onClick: () => k(`lineage/${M.id}`),
369
+ className: "inline-flex items-center gap-1 rounded-button text-sm font-medium text-text-link underline-offset-2 hover:underline focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-border-focus",
370
+ children: ["View full lineage", /* @__PURE__ */ l(Te, {
316
371
  className: "size-4",
317
372
  "aria-hidden": "true"
318
- }), "Download file"]
319
- }) : /* @__PURE__ */ d("span", {
320
- className: "text-text-secondary",
321
- children: "Resolving link…"
322
- }) : /* @__PURE__ */ d("span", {
323
- className: "text-text-secondary",
324
- children: "No file attached"
325
- })
326
- })
327
- ]
328
- }),
329
- /* @__PURE__ */ f("section", {
330
- className: "space-y-3",
331
- children: [/* @__PURE__ */ f("div", {
332
- className: "flex items-center justify-between gap-3",
333
- children: [/* @__PURE__ */ f("div", {
334
- className: "flex items-center gap-2",
335
- children: [/* @__PURE__ */ d(Ae, {
336
- className: "size-5 text-text-secondary",
337
- "aria-hidden": "true"
338
- }), /* @__PURE__ */ d("h2", {
339
- className: "text-lg font-semibold text-text-primary",
340
- children: "Lineage"
341
- })]
342
- }), /* @__PURE__ */ f("button", {
343
- type: "button",
344
- onClick: () => E(`lineage/${j.id}`),
345
- className: "inline-flex items-center gap-1 rounded-button text-sm font-medium text-text-link underline-offset-2 hover:underline focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-border-focus",
346
- children: ["View full lineage", /* @__PURE__ */ d(be, {
347
- className: "size-4",
348
- "aria-hidden": "true"
373
+ })]
349
374
  })]
375
+ }), Tt && J.nodes.length <= 1 ? /* @__PURE__ */ l(ue, { label: "Building lineage…" }) : J.nodes.length <= 1 ? /* @__PURE__ */ l("div", {
376
+ className: "rounded-card border border-dashed border-border-default bg-bg-sunken p-6 text-sm text-text-secondary",
377
+ children: "No upstream or downstream provenance is linked to this dataset yet. Connect a source, run a pipeline, attach a notebook, or publish a release to build its lineage."
378
+ }) : /* @__PURE__ */ l(be, {
379
+ model: J,
380
+ mode: "compact",
381
+ onNavigate: k
350
382
  })]
351
- }), rt && U.nodes.length <= 1 ? /* @__PURE__ */ d(o, { label: "Building lineage…" }) : U.nodes.length <= 1 ? /* @__PURE__ */ d("div", {
352
- className: "rounded-card border border-dashed border-border-default bg-bg-sunken p-6 text-sm text-text-secondary",
353
- children: "No upstream or downstream provenance is linked to this dataset yet. Connect a source, run a pipeline, attach a notebook, or publish a release to build its lineage."
354
- }) : /* @__PURE__ */ d(he, {
355
- model: U,
356
- mode: "compact",
357
- onNavigate: E
358
- })]
359
- }),
360
- /* @__PURE__ */ f("section", {
361
- className: "space-y-3",
362
- children: [/* @__PURE__ */ f("div", {
363
- className: "flex items-center justify-between gap-3",
364
- children: [/* @__PURE__ */ f("div", {
365
- className: "flex flex-wrap items-center gap-2",
366
- children: [
367
- /* @__PURE__ */ d(p, {
368
- className: "size-5 text-text-secondary",
369
- "aria-hidden": "true"
370
- }),
371
- /* @__PURE__ */ d("h2", {
372
- className: "text-lg font-semibold text-text-primary",
373
- children: "Schema fields"
374
- }),
375
- Q.length > 0 ? /* @__PURE__ */ d(h, {
376
- variant: "secondary",
377
- className: "text-xs",
378
- children: Q.length
379
- }) : null,
380
- $ > 0 ? /* @__PURE__ */ f(h, {
381
- variant: "outline",
382
- className: "gap-1 border-status-warning-border bg-status-warning-bg-subtle text-xs text-status-warning-text",
383
+ }),
384
+ /* @__PURE__ */ u("section", {
385
+ className: "space-y-3",
386
+ children: [
387
+ /* @__PURE__ */ u("div", {
388
+ className: "flex items-center justify-between gap-3",
389
+ children: [/* @__PURE__ */ u("div", {
390
+ className: "flex flex-wrap items-center gap-2",
383
391
  children: [
384
- /* @__PURE__ */ d(m, {
385
- className: "size-3",
392
+ /* @__PURE__ */ l(De, {
393
+ className: "size-5 text-text-secondary",
386
394
  "aria-hidden": "true"
387
395
  }),
388
- $,
389
- " missing a unit"
396
+ /* @__PURE__ */ l("h2", {
397
+ className: "text-lg font-semibold text-text-primary",
398
+ children: "Schema fields"
399
+ }),
400
+ $.length > 0 ? /* @__PURE__ */ l(p, {
401
+ variant: "secondary",
402
+ className: "text-xs",
403
+ children: $.length
404
+ }) : null,
405
+ Wt > 0 ? /* @__PURE__ */ u(p, {
406
+ variant: "outline",
407
+ className: "gap-1 border-status-warning-border bg-status-warning-bg-subtle text-xs text-status-warning-text",
408
+ children: [
409
+ /* @__PURE__ */ l(f, {
410
+ className: "size-3",
411
+ "aria-hidden": "true"
412
+ }),
413
+ Wt,
414
+ " missing a unit"
415
+ ]
416
+ }) : null
390
417
  ]
391
- }) : null
392
- ]
393
- }), /* @__PURE__ */ f(g, {
394
- type: "button",
395
- variant: "outline",
396
- size: "sm",
397
- onClick: () => Z(!0),
398
- children: [/* @__PURE__ */ d(Oe, { className: "size-4" }), "Add field"]
399
- })]
400
- }), Q.length === 0 ? /* @__PURE__ */ d(a, {
401
- icon: p,
402
- title: "No schema fields yet.",
403
- description: "Describe the columns in this dataset so consumers know what each field means."
404
- }) : /* @__PURE__ */ f(ve, { children: [/* @__PURE__ */ d("div", {
405
- className: "hidden rounded-card border border-border-default bg-bg-elevated md:block",
406
- children: /* @__PURE__ */ f(Ue, { children: [/* @__PURE__ */ d(Ge, { children: /* @__PURE__ */ f(x, { children: [
407
- /* @__PURE__ */ d(b, {
408
- className: "w-10 text-right",
409
- children: "#"
410
- }),
411
- /* @__PURE__ */ d(b, { children: "Name" }),
412
- /* @__PURE__ */ d(b, { children: "Type" }),
413
- /* @__PURE__ */ d(b, { children: "Unit" }),
414
- /* @__PURE__ */ d(b, { children: "Nullable" }),
415
- /* @__PURE__ */ d(b, { children: "Provenance" })
416
- ] }) }), /* @__PURE__ */ d(We, { children: Q.map((e, t) => /* @__PURE__ */ f(x, {
417
- "aria-selected": D === e.id,
418
- "data-state": D === e.id ? "selected" : void 0,
419
- className: D === e.id ? "bg-bg-sunken" : void 0,
420
- children: [
421
- /* @__PURE__ */ d(y, {
422
- className: "text-right text-xs tabular-nums text-text-tertiary",
423
- children: t + 1
424
- }),
425
- /* @__PURE__ */ f(y, { children: [/* @__PURE__ */ d("button", {
418
+ }), /* @__PURE__ */ u(m, {
426
419
  type: "button",
427
- onClick: () => O(e.id),
428
- "aria-pressed": D === e.id,
429
- className: "text-left font-medium text-text-primary underline-offset-2 hover:underline focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-border-focus",
430
- children: e.name
431
- }), e.description ? /* @__PURE__ */ d("p", {
432
- className: "mt-0.5 line-clamp-1 max-w-xs text-xs text-text-secondary",
433
- children: e.description
434
- }) : null] }),
435
- /* @__PURE__ */ d(y, { children: /* @__PURE__ */ d(h, {
436
- variant: "secondary",
437
- children: l(e.fieldType)
438
- }) }),
439
- /* @__PURE__ */ d(y, {
440
- className: "text-sm text-text-secondary",
441
- children: e.unit ? e.unit : C(e) ? /* @__PURE__ */ f("span", {
442
- className: "inline-flex items-center gap-1 text-status-warning-text",
443
- title: `${l(e.fieldType)} fields carry a measured quantity — record the unit so consumers can interpret the values.`,
444
- children: [/* @__PURE__ */ d(m, {
445
- className: "size-3.5",
446
- "aria-hidden": "true"
447
- }), "Not set"]
448
- }) : "—"
449
- }),
450
- /* @__PURE__ */ d(y, {
451
- className: "text-sm text-text-secondary",
452
- children: e.nullable ? "Yes" : "No"
453
- }),
454
- /* @__PURE__ */ d(y, {
455
- className: "text-sm text-text-secondary",
456
- children: e.provenance || "—"
457
- })
458
- ]
459
- }, e.id)) })] })
460
- }), /* @__PURE__ */ d("div", {
461
- className: "space-y-2 md:hidden",
462
- children: Q.map((e) => /* @__PURE__ */ f("div", {
463
- "aria-current": D === e.id ? "true" : void 0,
464
- className: D === e.id ? "rounded-card border border-border-focus bg-bg-sunken p-3" : "rounded-card border border-border-default bg-bg-elevated p-3",
465
- children: [
466
- /* @__PURE__ */ f("div", {
467
- className: "flex items-start justify-between gap-2",
468
- children: [/* @__PURE__ */ d("button", {
469
- type: "button",
470
- onClick: () => O(e.id),
471
- "aria-pressed": D === e.id,
472
- className: "text-left font-medium text-text-primary underline-offset-2 hover:underline",
473
- children: e.name
474
- }), /* @__PURE__ */ d(h, {
475
- variant: "secondary",
476
- children: l(e.fieldType)
477
- })]
478
- }),
479
- e.description ? /* @__PURE__ */ d("p", {
480
- className: "mt-1 text-xs text-text-secondary",
481
- children: e.description
482
- }) : null,
483
- /* @__PURE__ */ f("dl", {
484
- className: "mt-2 grid grid-cols-2 gap-2 text-xs",
420
+ variant: "outline",
421
+ size: "sm",
422
+ onClick: () => Q(!0),
423
+ children: [/* @__PURE__ */ l(Ne, { className: "size-4" }), "Add field"]
424
+ })]
425
+ }),
426
+ $.length === 0 ? /* @__PURE__ */ l(a, {
427
+ icon: De,
428
+ title: "No schema fields yet.",
429
+ description: "Describe the columns in this dataset so consumers know what each field means."
430
+ }) : /* @__PURE__ */ u(Ce, { children: [/* @__PURE__ */ l("div", {
431
+ className: "hidden rounded-card border border-border-default bg-bg-elevated md:block",
432
+ children: /* @__PURE__ */ u(Ue, { children: [/* @__PURE__ */ l(Ge, { children: /* @__PURE__ */ u(Ke, { children: [
433
+ /* @__PURE__ */ l(w, {
434
+ className: "w-10 text-right",
435
+ children: "#"
436
+ }),
437
+ /* @__PURE__ */ l(w, { children: "Name" }),
438
+ /* @__PURE__ */ l(w, { children: "Type" }),
439
+ /* @__PURE__ */ l(w, { children: "Unit" }),
440
+ /* @__PURE__ */ l(w, { children: "Nullable" }),
441
+ /* @__PURE__ */ l(w, { children: "Provenance" }),
442
+ /* @__PURE__ */ l(w, {
443
+ className: "w-20 text-right",
444
+ children: "Actions"
445
+ })
446
+ ] }) }), /* @__PURE__ */ l(We, { children: $.map((e, t) => /* @__PURE__ */ u(Ke, {
447
+ "aria-selected": A === e.id,
448
+ "data-state": A === e.id ? "selected" : void 0,
449
+ className: A === e.id ? "bg-bg-sunken" : void 0,
485
450
  children: [
486
- /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("dt", {
487
- className: "text-text-tertiary",
488
- children: "Unit"
489
- }), /* @__PURE__ */ d("dd", {
490
- className: "text-text-secondary",
491
- children: e.unit ? e.unit : C(e) ? /* @__PURE__ */ f("span", {
451
+ /* @__PURE__ */ l(C, {
452
+ className: "text-right text-xs tabular-nums text-text-tertiary",
453
+ children: t + 1
454
+ }),
455
+ /* @__PURE__ */ u(C, { children: [/* @__PURE__ */ l("button", {
456
+ type: "button",
457
+ onClick: () => Ze(e.id),
458
+ "aria-pressed": A === e.id,
459
+ className: "text-left font-medium text-text-primary underline-offset-2 hover:underline focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-border-focus",
460
+ children: e.name
461
+ }), e.description ? /* @__PURE__ */ l("p", {
462
+ className: "mt-0.5 line-clamp-1 max-w-xs text-xs text-text-secondary",
463
+ children: e.description
464
+ }) : null] }),
465
+ /* @__PURE__ */ l(C, { children: /* @__PURE__ */ l(p, {
466
+ variant: "secondary",
467
+ children: s(e.fieldType)
468
+ }) }),
469
+ /* @__PURE__ */ l(C, {
470
+ className: "text-sm text-text-secondary",
471
+ children: e.unit ? e.unit : E(e) ? /* @__PURE__ */ u("span", {
492
472
  className: "inline-flex items-center gap-1 text-status-warning-text",
493
- children: [/* @__PURE__ */ d(m, {
494
- className: "size-3",
473
+ title: `${s(e.fieldType)} fields carry a measured quantity — record the unit so consumers can interpret the values.`,
474
+ children: [/* @__PURE__ */ l(f, {
475
+ className: "size-3.5",
495
476
  "aria-hidden": "true"
496
477
  }), "Not set"]
497
478
  }) : "—"
498
- })] }),
499
- /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("dt", {
500
- className: "text-text-tertiary",
501
- children: "Nullable"
502
- }), /* @__PURE__ */ d("dd", {
503
- className: "text-text-secondary",
479
+ }),
480
+ /* @__PURE__ */ l(C, {
481
+ className: "text-sm text-text-secondary",
504
482
  children: e.nullable ? "Yes" : "No"
505
- })] }),
506
- /* @__PURE__ */ f("div", {
507
- className: "col-span-2",
508
- children: [/* @__PURE__ */ d("dt", {
509
- className: "text-text-tertiary",
510
- children: "Provenance"
511
- }), /* @__PURE__ */ d("dd", {
512
- className: "text-text-secondary",
513
- children: e.provenance || "—"
483
+ }),
484
+ /* @__PURE__ */ l(C, {
485
+ className: "text-sm text-text-secondary",
486
+ children: e.provenance || "—"
487
+ }),
488
+ /* @__PURE__ */ l(C, { children: /* @__PURE__ */ u("div", {
489
+ className: "flex justify-end gap-1",
490
+ children: [/* @__PURE__ */ l(m, {
491
+ type: "button",
492
+ variant: "outline",
493
+ size: "sm",
494
+ "aria-label": `Edit field ${e.name}`,
495
+ onClick: () => St(e),
496
+ children: /* @__PURE__ */ l(d, { className: "size-4" })
497
+ }), /* @__PURE__ */ l(m, {
498
+ type: "button",
499
+ variant: "outline",
500
+ size: "sm",
501
+ "aria-label": `Remove field ${e.name}`,
502
+ onClick: () => H(e.id),
503
+ children: /* @__PURE__ */ l(Ie, { className: "size-4" })
504
+ })]
505
+ }) })
506
+ ]
507
+ }, e.id)) })] })
508
+ }), /* @__PURE__ */ l("div", {
509
+ className: "space-y-2 md:hidden",
510
+ children: $.map((e) => /* @__PURE__ */ u("div", {
511
+ "aria-current": A === e.id ? "true" : void 0,
512
+ className: A === e.id ? "rounded-card border border-border-focus bg-bg-sunken p-3" : "rounded-card border border-border-default bg-bg-elevated p-3",
513
+ children: [
514
+ /* @__PURE__ */ u("div", {
515
+ className: "flex items-start justify-between gap-2",
516
+ children: [/* @__PURE__ */ l("button", {
517
+ type: "button",
518
+ onClick: () => Ze(e.id),
519
+ "aria-pressed": A === e.id,
520
+ className: "text-left font-medium text-text-primary underline-offset-2 hover:underline",
521
+ children: e.name
522
+ }), /* @__PURE__ */ l(p, {
523
+ variant: "secondary",
524
+ children: s(e.fieldType)
525
+ })]
526
+ }),
527
+ e.description ? /* @__PURE__ */ l("p", {
528
+ className: "mt-1 text-xs text-text-secondary",
529
+ children: e.description
530
+ }) : null,
531
+ /* @__PURE__ */ u("dl", {
532
+ className: "mt-2 grid grid-cols-2 gap-2 text-xs",
533
+ children: [
534
+ /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("dt", {
535
+ className: "text-text-tertiary",
536
+ children: "Unit"
537
+ }), /* @__PURE__ */ l("dd", {
538
+ className: "text-text-secondary",
539
+ children: e.unit ? e.unit : E(e) ? /* @__PURE__ */ u("span", {
540
+ className: "inline-flex items-center gap-1 text-status-warning-text",
541
+ children: [/* @__PURE__ */ l(f, {
542
+ className: "size-3",
543
+ "aria-hidden": "true"
544
+ }), "Not set"]
545
+ }) : "—"
546
+ })] }),
547
+ /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("dt", {
548
+ className: "text-text-tertiary",
549
+ children: "Nullable"
550
+ }), /* @__PURE__ */ l("dd", {
551
+ className: "text-text-secondary",
552
+ children: e.nullable ? "Yes" : "No"
553
+ })] }),
554
+ /* @__PURE__ */ u("div", {
555
+ className: "col-span-2",
556
+ children: [/* @__PURE__ */ l("dt", {
557
+ className: "text-text-tertiary",
558
+ children: "Provenance"
559
+ }), /* @__PURE__ */ l("dd", {
560
+ className: "text-text-secondary",
561
+ children: e.provenance || "—"
562
+ })]
563
+ })
564
+ ]
565
+ }),
566
+ /* @__PURE__ */ u("div", {
567
+ className: "mt-2 flex gap-1",
568
+ children: [/* @__PURE__ */ l(m, {
569
+ type: "button",
570
+ variant: "outline",
571
+ size: "sm",
572
+ "aria-label": `Edit field ${e.name}`,
573
+ onClick: () => St(e),
574
+ children: /* @__PURE__ */ l(d, { className: "size-4" })
575
+ }), /* @__PURE__ */ l(m, {
576
+ type: "button",
577
+ variant: "outline",
578
+ size: "sm",
579
+ "aria-label": `Remove field ${e.name}`,
580
+ onClick: () => H(e.id),
581
+ children: /* @__PURE__ */ l(Ie, { className: "size-4" })
514
582
  })]
515
583
  })
516
584
  ]
517
- })
518
- ]
519
- }, e.id))
520
- })] })]
521
- }),
522
- /* @__PURE__ */ f("section", {
523
- className: "space-y-3 rounded-card border border-border-default bg-bg-elevated p-5",
524
- children: [/* @__PURE__ */ d(ue, {
525
- value: W,
526
- onChange: G,
527
- label: "Dataset tags",
528
- disabled: P || F
529
- }), ot ? /* @__PURE__ */ d("div", {
530
- className: "flex justify-end",
531
- children: /* @__PURE__ */ d(g, {
532
- type: "button",
533
- size: "sm",
534
- onClick: () => void xt(),
535
- disabled: P || F,
536
- children: P || F ? "Saving…" : "Save tags"
537
- })
538
- }) : null]
539
- }),
540
- /* @__PURE__ */ f("section", {
541
- className: "space-y-3",
542
- children: [/* @__PURE__ */ f("div", {
543
- className: "flex items-center gap-2",
544
- children: [/* @__PURE__ */ d(Te, {
545
- className: "size-5 text-text-secondary",
546
- "aria-hidden": "true"
547
- }), /* @__PURE__ */ d("h2", {
548
- className: "text-lg font-semibold text-text-primary",
549
- children: "Activity"
550
- })]
551
- }), /* @__PURE__ */ d(ce, {
552
- resourceId: j.id,
553
- resourceType: "cosmicintersection-dataset"
554
- })]
555
- }),
556
- /* @__PURE__ */ f("section", {
557
- className: "space-y-3",
558
- children: [/* @__PURE__ */ f("div", {
559
- className: "flex items-center gap-2",
560
- children: [/* @__PURE__ */ d(Ee, {
561
- className: "size-5 text-text-secondary",
562
- "aria-hidden": "true"
563
- }), /* @__PURE__ */ d("h2", {
564
- className: "text-lg font-semibold text-text-primary",
565
- children: "Discussion"
585
+ }, e.id))
586
+ })] }),
587
+ /* @__PURE__ */ l(ge, {
588
+ datasetId: M.id,
589
+ onAccepted: () => void j()
590
+ })
591
+ ]
592
+ }),
593
+ /* @__PURE__ */ u("section", {
594
+ className: "space-y-3 rounded-card border border-border-default bg-bg-elevated p-5",
595
+ children: [/* @__PURE__ */ l(pe, {
596
+ value: Y,
597
+ onChange: Et,
598
+ label: "Dataset tags",
599
+ disabled: N || P
600
+ }), kt ? /* @__PURE__ */ l("div", {
601
+ className: "flex justify-end",
602
+ children: /* @__PURE__ */ l(m, {
603
+ type: "button",
604
+ size: "sm",
605
+ onClick: () => void Jt(),
606
+ disabled: N || P,
607
+ children: N || P ? "Saving…" : "Save tags"
608
+ })
609
+ }) : null]
610
+ }),
611
+ /* @__PURE__ */ u("section", {
612
+ className: "space-y-3",
613
+ children: [/* @__PURE__ */ u("div", {
614
+ className: "flex items-center gap-2",
615
+ children: [/* @__PURE__ */ l(je, {
616
+ className: "size-5 text-text-secondary",
617
+ "aria-hidden": "true"
618
+ }), /* @__PURE__ */ l("h2", {
619
+ className: "text-lg font-semibold text-text-primary",
620
+ children: "Activity"
621
+ })]
622
+ }), /* @__PURE__ */ l(de, {
623
+ resourceId: M.id,
624
+ resourceType: "cosmicintersection-dataset"
566
625
  })]
567
- }), /* @__PURE__ */ d(le, {
568
- entityType: "cosmicintersection-dataset",
569
- entityId: j.id,
570
- title: j.name,
571
- widgetKey: "dataset-discussion"
572
- })]
573
- })
574
- ]
575
- }), /* @__PURE__ */ d(Me, {
576
- open: st,
577
- onOpenChange: Z,
578
- children: /* @__PURE__ */ f(Ne, { children: [
579
- /* @__PURE__ */ f(Ie, { children: [/* @__PURE__ */ d(Le, { children: "Add schema field" }), /* @__PURE__ */ f(Pe, { children: [
580
- "Document a column in “",
581
- j.name,
582
- "” — its type, unit and provenance."
583
- ] })] }),
584
- /* @__PURE__ */ f("div", {
585
- className: "space-y-4",
586
- children: [
587
- /* @__PURE__ */ f("div", {
588
- className: "space-y-1.5",
589
- children: [/* @__PURE__ */ d(v, {
590
- htmlFor: "cos-field-name",
591
- children: "Name"
592
- }), /* @__PURE__ */ d(_, {
593
- id: "cos-field-name",
594
- value: q,
595
- onChange: (e) => J(e.target.value),
596
- placeholder: "e.g. right_ascension",
597
- required: !0
626
+ }),
627
+ /* @__PURE__ */ u("section", {
628
+ className: "space-y-3",
629
+ children: [/* @__PURE__ */ u("div", {
630
+ className: "flex items-center gap-2",
631
+ children: [/* @__PURE__ */ l(Me, {
632
+ className: "size-5 text-text-secondary",
633
+ "aria-hidden": "true"
634
+ }), /* @__PURE__ */ l("h2", {
635
+ className: "text-lg font-semibold text-text-primary",
636
+ children: "Discussion"
598
637
  })]
599
- }),
600
- /* @__PURE__ */ f("div", {
601
- className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
602
- children: [/* @__PURE__ */ f("div", {
638
+ }), /* @__PURE__ */ l(fe, {
639
+ entityType: "cosmicintersection-dataset",
640
+ entityId: M.id,
641
+ title: M.name,
642
+ widgetKey: "dataset-discussion"
643
+ })]
644
+ })
645
+ ]
646
+ }),
647
+ /* @__PURE__ */ l(h, {
648
+ open: At,
649
+ onOpenChange: Q,
650
+ children: /* @__PURE__ */ u(g, { children: [
651
+ /* @__PURE__ */ u(y, { children: [/* @__PURE__ */ l(b, { children: "Add schema field" }), /* @__PURE__ */ u(_, { children: [
652
+ "Document a column in “",
653
+ M.name,
654
+ "” — its type, unit and provenance."
655
+ ] })] }),
656
+ /* @__PURE__ */ u("div", {
657
+ className: "space-y-4",
658
+ children: [
659
+ /* @__PURE__ */ u("div", {
603
660
  className: "space-y-1.5",
604
- children: [/* @__PURE__ */ d(v, {
605
- htmlFor: "cos-field-type",
606
- children: "Type"
607
- }), /* @__PURE__ */ f(Re, {
608
- value: Y,
609
- onValueChange: (e) => X(e),
610
- children: [/* @__PURE__ */ d(Ve, {
611
- id: "cos-field-type",
612
- "aria-label": "Field type",
613
- children: /* @__PURE__ */ d(He, {})
614
- }), /* @__PURE__ */ d(ze, { children: qe.map((e) => /* @__PURE__ */ d(Be, {
615
- value: e,
616
- children: l(e)
617
- }, e)) })]
661
+ children: [/* @__PURE__ */ l(S, {
662
+ htmlFor: "cos-field-name",
663
+ children: "Name"
664
+ }), /* @__PURE__ */ l(x, {
665
+ id: "cos-field-name",
666
+ value: Z,
667
+ onChange: (e) => Mt(e.target.value),
668
+ placeholder: "e.g. right_ascension",
669
+ required: !0
618
670
  })]
619
- }), /* @__PURE__ */ f("div", {
671
+ }),
672
+ /* @__PURE__ */ u("div", {
673
+ className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
674
+ children: [/* @__PURE__ */ u("div", {
675
+ className: "space-y-1.5",
676
+ children: [/* @__PURE__ */ l(S, {
677
+ htmlFor: "cos-field-type",
678
+ children: "Type"
679
+ }), /* @__PURE__ */ u(Re, {
680
+ value: Nt,
681
+ onValueChange: (e) => Pt(e),
682
+ children: [/* @__PURE__ */ l(Ve, {
683
+ id: "cos-field-type",
684
+ "aria-label": "Field type",
685
+ children: /* @__PURE__ */ l(He, {})
686
+ }), /* @__PURE__ */ l(ze, { children: Je.map((e) => /* @__PURE__ */ l(Be, {
687
+ value: e,
688
+ children: s(e)
689
+ }, e)) })]
690
+ })]
691
+ }), /* @__PURE__ */ u("div", {
692
+ className: "space-y-1.5",
693
+ children: [/* @__PURE__ */ l(S, {
694
+ htmlFor: "cos-field-unit",
695
+ children: "Unit"
696
+ }), /* @__PURE__ */ l(x, {
697
+ id: "cos-field-unit",
698
+ value: Ft,
699
+ onChange: (e) => It(e.target.value),
700
+ placeholder: "e.g. deg, mag, Jy"
701
+ })]
702
+ })]
703
+ }),
704
+ /* @__PURE__ */ u("div", {
620
705
  className: "space-y-1.5",
621
- children: [/* @__PURE__ */ d(v, {
622
- htmlFor: "cos-field-unit",
623
- children: "Unit"
624
- }), /* @__PURE__ */ d(_, {
625
- id: "cos-field-unit",
626
- value: lt,
627
- onChange: (e) => ut(e.target.value),
628
- placeholder: "e.g. deg, mag, Jy"
706
+ children: [/* @__PURE__ */ l(S, {
707
+ htmlFor: "cos-field-desc",
708
+ children: "Description"
709
+ }), /* @__PURE__ */ l(qe, {
710
+ id: "cos-field-desc",
711
+ value: Lt,
712
+ onChange: (e) => Rt(e.target.value),
713
+ rows: 2
629
714
  })]
630
- })]
631
- }),
632
- /* @__PURE__ */ f("div", {
633
- className: "space-y-1.5",
634
- children: [/* @__PURE__ */ d(v, {
635
- htmlFor: "cos-field-desc",
636
- children: "Description"
637
- }), /* @__PURE__ */ d(Ke, {
638
- id: "cos-field-desc",
639
- value: dt,
640
- onChange: (e) => ft(e.target.value),
641
- rows: 2
642
- })]
643
- }),
644
- /* @__PURE__ */ f("div", {
645
- className: "space-y-1.5",
646
- children: [/* @__PURE__ */ d(v, {
647
- htmlFor: "cos-field-prov",
648
- children: "Provenance"
649
- }), /* @__PURE__ */ d(_, {
650
- id: "cos-field-prov",
651
- value: pt,
652
- onChange: (e) => mt(e.target.value),
653
- placeholder: "Where this field comes from"
654
- })]
655
- }),
656
- /* @__PURE__ */ f("label", {
657
- className: "flex items-center gap-2 text-sm text-text-primary",
658
- children: [/* @__PURE__ */ d(je, {
659
- checked: ht,
660
- onCheckedChange: (e) => gt(e === !0)
661
- }), "Nullable (may contain empty values)"]
662
- })
663
- ]
664
- }),
665
- /* @__PURE__ */ f(Fe, { children: [/* @__PURE__ */ d(g, {
715
+ }),
716
+ /* @__PURE__ */ u("div", {
717
+ className: "space-y-1.5",
718
+ children: [/* @__PURE__ */ l(S, {
719
+ htmlFor: "cos-field-prov",
720
+ children: "Provenance"
721
+ }), /* @__PURE__ */ l(x, {
722
+ id: "cos-field-prov",
723
+ value: zt,
724
+ onChange: (e) => Bt(e.target.value),
725
+ placeholder: "Where this field comes from"
726
+ })]
727
+ }),
728
+ /* @__PURE__ */ u("label", {
729
+ className: "flex items-center gap-2 text-sm text-text-primary",
730
+ children: [/* @__PURE__ */ l(Le, {
731
+ checked: Vt,
732
+ onCheckedChange: (e) => Ht(e === !0)
733
+ }), "Nullable (may contain empty values)"]
734
+ })
735
+ ]
736
+ }),
737
+ /* @__PURE__ */ u(v, { children: [/* @__PURE__ */ l(m, {
738
+ type: "button",
739
+ variant: "outline",
740
+ onClick: () => Q(!1),
741
+ disabled: F,
742
+ children: "Cancel"
743
+ }), /* @__PURE__ */ l(m, {
744
+ type: "button",
745
+ onClick: () => void Yt(),
746
+ disabled: F,
747
+ children: F ? "Adding…" : "Add field"
748
+ })] })
749
+ ] })
750
+ }),
751
+ /* @__PURE__ */ l(h, {
752
+ open: R != null,
753
+ onOpenChange: (e) => !e && z(null),
754
+ children: /* @__PURE__ */ u(g, { children: [
755
+ /* @__PURE__ */ u(y, { children: [/* @__PURE__ */ l(b, { children: "Edit schema field" }), /* @__PURE__ */ l(_, { children: "Correct the column documentation. The change is recorded against the dataset’s schema immediately." })] }),
756
+ /* @__PURE__ */ u("div", {
757
+ className: "space-y-4",
758
+ children: [
759
+ /* @__PURE__ */ u("div", {
760
+ className: "space-y-1.5",
761
+ children: [/* @__PURE__ */ l(S, {
762
+ htmlFor: "cos-edit-field-name",
763
+ children: "Name"
764
+ }), /* @__PURE__ */ l(x, {
765
+ id: "cos-edit-field-name",
766
+ value: B,
767
+ onChange: (e) => dt(e.target.value),
768
+ required: !0
769
+ })]
770
+ }),
771
+ /* @__PURE__ */ u("div", {
772
+ className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
773
+ children: [/* @__PURE__ */ u("div", {
774
+ className: "space-y-1.5",
775
+ children: [/* @__PURE__ */ l(S, {
776
+ htmlFor: "cos-edit-field-type",
777
+ children: "Type"
778
+ }), /* @__PURE__ */ u(Re, {
779
+ value: ft,
780
+ onValueChange: (e) => pt(e),
781
+ children: [/* @__PURE__ */ l(Ve, {
782
+ id: "cos-edit-field-type",
783
+ "aria-label": "Field type",
784
+ children: /* @__PURE__ */ l(He, {})
785
+ }), /* @__PURE__ */ l(ze, { children: Je.map((e) => /* @__PURE__ */ l(Be, {
786
+ value: e,
787
+ children: s(e)
788
+ }, e)) })]
789
+ })]
790
+ }), /* @__PURE__ */ u("div", {
791
+ className: "space-y-1.5",
792
+ children: [/* @__PURE__ */ l(S, {
793
+ htmlFor: "cos-edit-field-unit",
794
+ children: "Unit"
795
+ }), /* @__PURE__ */ l(x, {
796
+ id: "cos-edit-field-unit",
797
+ value: mt,
798
+ onChange: (e) => ht(e.target.value),
799
+ placeholder: "e.g. deg, mag, Jy"
800
+ })]
801
+ })]
802
+ }),
803
+ /* @__PURE__ */ u("div", {
804
+ className: "space-y-1.5",
805
+ children: [/* @__PURE__ */ l(S, {
806
+ htmlFor: "cos-edit-field-desc",
807
+ children: "Description"
808
+ }), /* @__PURE__ */ l(qe, {
809
+ id: "cos-edit-field-desc",
810
+ value: gt,
811
+ onChange: (e) => _t(e.target.value),
812
+ rows: 2
813
+ })]
814
+ }),
815
+ /* @__PURE__ */ u("div", {
816
+ className: "space-y-1.5",
817
+ children: [/* @__PURE__ */ l(S, {
818
+ htmlFor: "cos-edit-field-prov",
819
+ children: "Provenance"
820
+ }), /* @__PURE__ */ l(x, {
821
+ id: "cos-edit-field-prov",
822
+ value: vt,
823
+ onChange: (e) => yt(e.target.value),
824
+ placeholder: "Where this field comes from"
825
+ })]
826
+ }),
827
+ /* @__PURE__ */ u("label", {
828
+ className: "flex items-center gap-2 text-sm text-text-primary",
829
+ children: [/* @__PURE__ */ l(Le, {
830
+ checked: bt,
831
+ onCheckedChange: (e) => xt(e === !0)
832
+ }), "Nullable (may contain empty values)"]
833
+ })
834
+ ]
835
+ }),
836
+ /* @__PURE__ */ u(v, { children: [/* @__PURE__ */ l(m, {
837
+ type: "button",
838
+ variant: "outline",
839
+ onClick: () => z(null),
840
+ disabled: I,
841
+ children: "Cancel"
842
+ }), /* @__PURE__ */ l(m, {
843
+ type: "button",
844
+ onClick: () => void Ct(),
845
+ disabled: I,
846
+ children: I ? "Saving…" : "Save changes"
847
+ })] })
848
+ ] })
849
+ }),
850
+ /* @__PURE__ */ l(h, {
851
+ open: V != null,
852
+ onOpenChange: (e) => !e && H(null),
853
+ children: /* @__PURE__ */ u(g, { children: [/* @__PURE__ */ u(y, { children: [/* @__PURE__ */ l(b, { children: "Remove schema field?" }), /* @__PURE__ */ l(_, { children: "The field is removed from this dataset’s schema. This is the revert half of the review loop — use it when a wrongly accepted proposal needs undoing." })] }), /* @__PURE__ */ u(v, { children: [/* @__PURE__ */ l(m, {
666
854
  type: "button",
667
855
  variant: "outline",
668
- onClick: () => Z(!1),
856
+ onClick: () => H(null),
669
857
  disabled: L,
670
858
  children: "Cancel"
671
- }), /* @__PURE__ */ d(g, {
859
+ }), /* @__PURE__ */ l(m, {
672
860
  type: "button",
673
- onClick: () => void St(),
861
+ variant: "destructive",
862
+ onClick: () => void wt(),
674
863
  disabled: L,
675
- children: L ? "Adding…" : "Add field"
676
- })] })
677
- ] })
678
- })]
864
+ children: L ? "Removing…" : "Remove field"
865
+ })] })] })
866
+ })
867
+ ]
679
868
  });
680
869
  }
681
870
  //#endregion
682
- export { E as default };
871
+ export { k as default };
683
872
 
684
873
  //# sourceMappingURL=DatasetDetailPage.js.map