@burdenoff/microfe-cosmicintersection 2026.1101.3 → 2026.1102.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/dist/cosmicintersection/api/cosmicApi.d.ts +33 -0
  2. package/dist/cosmicintersection/api/cosmicApi.d.ts.map +1 -1
  3. package/dist/cosmicintersection/api/cosmicApi.js +118 -71
  4. package/dist/cosmicintersection/api/cosmicApi.js.map +1 -1
  5. package/dist/cosmicintersection/lib/useTrackRecentItem.d.ts +22 -0
  6. package/dist/cosmicintersection/lib/useTrackRecentItem.d.ts.map +1 -0
  7. package/dist/cosmicintersection/lib/useTrackRecentItem.js +28 -0
  8. package/dist/cosmicintersection/lib/useTrackRecentItem.js.map +1 -0
  9. package/dist/cosmicintersection/pages/analyses/AnalysesPage.d.ts.map +1 -1
  10. package/dist/cosmicintersection/pages/analyses/AnalysesPage.js +245 -237
  11. package/dist/cosmicintersection/pages/analyses/AnalysesPage.js.map +1 -1
  12. package/dist/cosmicintersection/pages/collections/CollectionDetailPage.d.ts.map +1 -1
  13. package/dist/cosmicintersection/pages/collections/CollectionDetailPage.js +101 -93
  14. package/dist/cosmicintersection/pages/collections/CollectionDetailPage.js.map +1 -1
  15. package/dist/cosmicintersection/pages/datasets/DatasetDetailPage.d.ts.map +1 -1
  16. package/dist/cosmicintersection/pages/datasets/DatasetDetailPage.js +82 -74
  17. package/dist/cosmicintersection/pages/datasets/DatasetDetailPage.js.map +1 -1
  18. package/dist/cosmicintersection/pages/notebooks/NotebookDetailPage.d.ts.map +1 -1
  19. package/dist/cosmicintersection/pages/notebooks/NotebookDetailPage.js +66 -58
  20. package/dist/cosmicintersection/pages/notebooks/NotebookDetailPage.js.map +1 -1
  21. package/dist/cosmicintersection/pages/pipelines/PipelineDetailPage.d.ts.map +1 -1
  22. package/dist/cosmicintersection/pages/pipelines/PipelineDetailPage.js +126 -118
  23. package/dist/cosmicintersection/pages/pipelines/PipelineDetailPage.js.map +1 -1
  24. package/dist/cosmicintersection/pages/releases/ReleasesPage.d.ts.map +1 -1
  25. package/dist/cosmicintersection/pages/releases/ReleasesPage.js +211 -203
  26. package/dist/cosmicintersection/pages/releases/ReleasesPage.js.map +1 -1
  27. package/dist/cosmicintersection/pages/runs/RunDetailPage.d.ts.map +1 -1
  28. package/dist/cosmicintersection/pages/runs/RunDetailPage.js +92 -84
  29. package/dist/cosmicintersection/pages/runs/RunDetailPage.js.map +1 -1
  30. package/dist/cosmicintersection/pages/sources/SourceDetailPage.d.ts.map +1 -1
  31. package/dist/cosmicintersection/pages/sources/SourceDetailPage.js +101 -93
  32. package/dist/cosmicintersection/pages/sources/SourceDetailPage.js.map +1 -1
  33. package/dist/index.d.ts +2 -0
  34. package/dist/index.d.ts.map +1 -1
  35. package/dist/index.js +2 -1
  36. package/dist/services/recentItems.d.ts +40 -0
  37. package/dist/services/recentItems.d.ts.map +1 -0
  38. package/dist/services/recentItems.js +128 -0
  39. package/dist/services/recentItems.js.map +1 -0
  40. package/package.json +5 -1
@@ -1,34 +1,35 @@
1
1
  import { useCosmicIntersection as e } from "../../context/CosmicIntersectionContext.js";
2
2
  import { notify as t } from "../../lib/toast.js";
3
- import { useCosDatasetsQuery as ee, useCosNotebooksQuery as te, useCosPublishReleaseMutation as n, useCosReleasesQuery as ne } from "../../api/cosmicApi.js";
4
- import { useTr as re } from "../../../shared/hooks/useTr.js";
3
+ import { useCosDatasetsQuery as ee, useCosNotebooksQuery as te, useCosPublishReleaseMutation as ne, useCosReleaseQuery as n, useCosReleasesQuery as re } from "../../api/cosmicApi.js";
4
+ import { useTr as ie } from "../../../shared/hooks/useTr.js";
5
5
  import { ActionMenu as r } from "../../components/ActionMenu.js";
6
- import { EmptyState as ie } from "../../components/EmptyState.js";
7
- import { ErrorState as ae } from "../../components/ErrorState.js";
8
- import { LoadingState as oe } from "../../components/LoadingState.js";
6
+ import { EmptyState as ae } from "../../components/EmptyState.js";
7
+ import { ErrorState as oe } from "../../components/ErrorState.js";
8
+ import { LoadingState as se } from "../../components/LoadingState.js";
9
9
  import { SafeLink as i } from "../../components/SafeLink.js";
10
- import { DiscussionPanel as se } from "../../components/DiscussionPanel.js";
11
- import { PageLayout as ce } from "../../components/PageLayout.js";
12
- import { Pagination as a, usePagination as le } from "../../components/Pagination.js";
13
- import { StatusBadge as o, formatEnumLabel as ue } from "../../components/StatusBadge.js";
10
+ import { DiscussionPanel as ce } from "../../components/DiscussionPanel.js";
11
+ import { PageLayout as le } from "../../components/PageLayout.js";
12
+ import { Pagination as ue, usePagination as de } from "../../components/Pagination.js";
13
+ import { StatusBadge as a, formatEnumLabel as fe } from "../../components/StatusBadge.js";
14
14
  import "../../components/index.js";
15
- import { useSelectedRecord as de } from "../../lib/useSelectedRecord.js";
16
- import { ASSISTANT_AWARE_DIALOG_CONTENT_PROPS as fe, ASSISTANT_AWARE_DIALOG_ROOT_PROPS as pe } from "../../lib/assistantAwareDialog.js";
17
- import { useMemo as s, useState as c } from "react";
18
- import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
19
- import { BookOpen as me, Database as he, ExternalLink as f, NotebookPen as ge, Plus as _e, Rocket as p } from "lucide-react";
20
- import { Button as m, Dialog as h, DialogClose as ve, DialogContent as g, DialogDescription as _, DialogFooter as v, DialogHeader as y, DialogTitle as b, Input as x, Label as ye, Select as be, SelectContent as xe, SelectItem as S, SelectTrigger as Se, SelectValue as Ce, Table as we, TableBody as Te, TableCell as C, TableHead as w, TableHeader as Ee, TableRow as T } from "@burdenoff/fe-libs/ui";
15
+ import { useSelectedRecord as pe } from "../../lib/useSelectedRecord.js";
16
+ import { ASSISTANT_AWARE_DIALOG_CONTENT_PROPS as me, ASSISTANT_AWARE_DIALOG_ROOT_PROPS as he } from "../../lib/assistantAwareDialog.js";
17
+ import { useTrackRecentItem as ge } from "../../lib/useTrackRecentItem.js";
18
+ import { useMemo as o, useState as s } from "react";
19
+ import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";
20
+ import { BookOpen as _e, Database as ve, ExternalLink as d, NotebookPen as ye, Plus as be, Rocket as f } from "lucide-react";
21
+ import { Button as p, Dialog as m, DialogClose as xe, DialogContent as h, DialogDescription as g, DialogFooter as _, DialogHeader as v, DialogTitle as y, Input as Se, Label as Ce, Select as we, SelectContent as Te, SelectItem as b, SelectTrigger as Ee, SelectValue as x, Table as De, TableBody as Oe, TableCell as S, TableHead as C, TableHeader as ke, TableRow as w } from "@burdenoff/fe-libs/ui";
21
22
  //#region src/cosmicintersection/pages/releases/ReleasesPage.tsx
22
- var E = "ALL", D = [
23
+ var T = "ALL", Ae = [
23
24
  "DRAFT",
24
25
  "UNDER_REVIEW",
25
26
  "PUBLISHED",
26
27
  "RETRACTED"
27
28
  ];
28
- function O(e) {
29
+ function E(e) {
29
30
  return e === "DRAFT" || e === "UNDER_REVIEW";
30
31
  }
31
- function k(e) {
32
+ function D(e) {
32
33
  if (!e) return "—";
33
34
  let t = new Date(e);
34
35
  return Number.isNaN(t.getTime()) ? "—" : t.toLocaleDateString(void 0, {
@@ -37,375 +38,382 @@ function k(e) {
37
38
  day: "numeric"
38
39
  });
39
40
  }
40
- function A(e) {
41
+ function O(e) {
41
42
  let t = e.trim();
42
43
  return /^https?:\/\//i.test(t) ? t : `https://doi.org/${t.replace(/^doi:/i, "")}`;
43
44
  }
44
- function j() {
45
- let { navigate: j } = e(), M = re(), [N, De] = c(E), P = le({
45
+ function k() {
46
+ let { navigate: k } = e(), A = ie(), [j, je] = s(T), M = de({
46
47
  pageSize: 20,
47
- resetKey: N
48
- }), { data: F, loading: I, error: L, refetch: R } = ne({
49
- status: N === E ? void 0 : N,
48
+ resetKey: j
49
+ }), { data: N, loading: P, error: F, refetch: I } = re({
50
+ status: j === T ? void 0 : j,
50
51
  pagination: {
51
- limit: P.limit,
52
- offset: P.offset
52
+ limit: M.limit,
53
+ offset: M.offset
53
54
  }
54
- }), [Oe, { loading: z }] = n(), B = s(() => F?.cosListReleases.items ?? [], [F]), ke = F?.cosListReleases.pageInfo, V = ee({ pagination: {
55
+ }), [Me, { loading: L }] = ne(), R = o(() => N?.cosListReleases.items ?? [], [N]), Ne = N?.cosListReleases.pageInfo, z = ee({ pagination: {
55
56
  limit: 100,
56
57
  offset: 0
57
- } }), H = te({ pagination: {
58
+ } }), B = te({ pagination: {
58
59
  limit: 100,
59
60
  offset: 0
60
- } }), Ae = s(() => {
61
+ } }), Pe = o(() => {
61
62
  let e = /* @__PURE__ */ new Map();
62
- for (let t of V.data?.cosListDatasets.items ?? []) e.set(t.id, t.name);
63
+ for (let t of z.data?.cosListDatasets.items ?? []) e.set(t.id, t.name);
63
64
  return e;
64
- }, [V.data]), U = s(() => {
65
+ }, [z.data]), V = o(() => {
65
66
  let e = /* @__PURE__ */ new Map();
66
- for (let t of H.data?.cosListNotebooks.items ?? []) e.set(t.id, t.title);
67
+ for (let t of B.data?.cosListNotebooks.items ?? []) e.set(t.id, t.title);
67
68
  return e;
68
- }, [H.data]), { selectedId: W, select: je } = de(), G = s(() => W ? B.find((e) => e.id === W) ?? null : null, [B, W]), K = (e) => je(e ? e.id : null), q = (e) => {
69
- K(null), j(e);
70
- }, [J, Y] = c(null), [X, Z] = c(""), Q = (e) => {
69
+ }, [B.data]), { selectedId: H, select: Fe } = pe(), U = o(() => H ? R.find((e) => e.id === H) ?? null : null, [R, H]), { data: Ie } = n(H, { skip: U !== null || P || !N }), W = Ie?.cosRelease ?? null, G = U ?? (W && W.id === H ? W : null), K = (e) => Fe(e ? e.id : null);
70
+ ge(G ? {
71
+ type: "release",
72
+ id: G.id,
73
+ name: G.title,
74
+ path: `releases?id=${encodeURIComponent(G.id)}`
75
+ } : null);
76
+ let q = (e) => {
77
+ K(null), k(e);
78
+ }, [J, Y] = s(null), [X, Z] = s(""), Q = (e) => {
71
79
  Z(e.doi ?? ""), Y(e);
72
- }, Me = async () => {
80
+ }, Le = async () => {
73
81
  if (!J) return;
74
82
  let e = X.trim();
75
- (await Oe({ variables: {
83
+ (await Me({ variables: {
76
84
  id: J.id,
77
85
  doi: e || void 0
78
- } })).data?.cosPublishRelease?.id && (t.success(M("cosmicintersection.pages.releases.publishSuccess", "Release published"), M("cosmicintersection.pages.releases.publishSuccessDescription", "“{{name}}” is now public.", { name: J.title })), Y(null), Z(""), await R());
79
- }, $ = /* @__PURE__ */ d(m, {
86
+ } })).data?.cosPublishRelease?.id && (t.success(A("cosmicintersection.pages.releases.publishSuccess", "Release published"), A("cosmicintersection.pages.releases.publishSuccessDescription", "“{{name}}” is now public.", { name: J.title })), Y(null), Z(""), await I());
87
+ }, $ = /* @__PURE__ */ u(p, {
80
88
  type: "button",
81
- onClick: () => j("releases/create"),
82
- children: [/* @__PURE__ */ u(_e, { className: "size-4" }), M("cosmicintersection.pages.releases.create", "New release")]
89
+ onClick: () => k("releases/create"),
90
+ children: [/* @__PURE__ */ l(be, { className: "size-4" }), A("cosmicintersection.pages.releases.create", "New release")]
83
91
  });
84
- return /* @__PURE__ */ d(ce, {
85
- title: M("cosmicintersection.pages.releases.title", "Releases"),
86
- description: M("cosmicintersection.pages.releases.description", "Citable, versioned publications that bundle datasets and notebooks for the community."),
92
+ return /* @__PURE__ */ u(le, {
93
+ title: A("cosmicintersection.pages.releases.title", "Releases"),
94
+ description: A("cosmicintersection.pages.releases.description", "Citable, versioned publications that bundle datasets and notebooks for the community."),
87
95
  actions: $,
88
96
  children: [
89
- /* @__PURE__ */ d("div", {
97
+ /* @__PURE__ */ u("div", {
90
98
  className: "space-y-4",
91
- children: [/* @__PURE__ */ u("div", {
99
+ children: [/* @__PURE__ */ l("div", {
92
100
  className: "flex flex-wrap items-center gap-3",
93
- children: /* @__PURE__ */ u("div", {
101
+ children: /* @__PURE__ */ l("div", {
94
102
  className: "w-full max-w-[14rem]",
95
- children: /* @__PURE__ */ d(be, {
96
- value: N,
97
- onValueChange: De,
98
- children: [/* @__PURE__ */ u(Se, {
103
+ children: /* @__PURE__ */ u(we, {
104
+ value: j,
105
+ onValueChange: je,
106
+ children: [/* @__PURE__ */ l(Ee, {
99
107
  "aria-label": "Filter by status",
100
- children: /* @__PURE__ */ u(Ce, { placeholder: "All statuses" })
101
- }), /* @__PURE__ */ d(xe, { children: [/* @__PURE__ */ u(S, {
102
- value: E,
108
+ children: /* @__PURE__ */ l(x, { placeholder: "All statuses" })
109
+ }), /* @__PURE__ */ u(Te, { children: [/* @__PURE__ */ l(b, {
110
+ value: T,
103
111
  children: "All statuses"
104
- }), D.map((e) => /* @__PURE__ */ u(S, {
112
+ }), Ae.map((e) => /* @__PURE__ */ l(b, {
105
113
  value: e,
106
- children: ue(e)
114
+ children: fe(e)
107
115
  }, e))] })]
108
116
  })
109
117
  })
110
118
  }), (() => {
111
- if (I) return /* @__PURE__ */ u(oe, {
119
+ if (P) return /* @__PURE__ */ l(se, {
112
120
  variant: "rows",
113
121
  rows: 6,
114
- label: M("cosmicintersection.pages.releases.loading", "Loading releases…")
122
+ label: A("cosmicintersection.pages.releases.loading", "Loading releases…")
115
123
  });
116
- if (L) return /* @__PURE__ */ u(ae, {
117
- message: L.message,
118
- onRetry: () => void R()
124
+ if (F) return /* @__PURE__ */ l(oe, {
125
+ message: F.message,
126
+ onRetry: () => void I()
119
127
  });
120
- if (B.length === 0) {
121
- let e = N !== E;
122
- return /* @__PURE__ */ u(ie, {
123
- icon: p,
124
- title: e ? M("cosmicintersection.pages.releases.emptyFilterTitle", "No releases match this filter") : M("cosmicintersection.pages.releases.emptyTitle", "No releases yet"),
125
- description: e ? M("cosmicintersection.pages.releases.emptyFilterDescription", "Try clearing the status filter to see more releases.") : M("cosmicintersection.pages.releases.emptyDescription", "Package datasets and notebooks into a citable, versioned release for publication."),
128
+ if (R.length === 0) {
129
+ let e = j !== T;
130
+ return /* @__PURE__ */ l(ae, {
131
+ icon: f,
132
+ title: e ? A("cosmicintersection.pages.releases.emptyFilterTitle", "No releases match this filter") : A("cosmicintersection.pages.releases.emptyTitle", "No releases yet"),
133
+ description: e ? A("cosmicintersection.pages.releases.emptyFilterDescription", "Try clearing the status filter to see more releases.") : A("cosmicintersection.pages.releases.emptyDescription", "Package datasets and notebooks into a citable, versioned release for publication."),
126
134
  action: e ? void 0 : $
127
135
  });
128
136
  }
129
- return /* @__PURE__ */ d(l, { children: [
130
- /* @__PURE__ */ u("div", {
137
+ return /* @__PURE__ */ u(c, { children: [
138
+ /* @__PURE__ */ l("div", {
131
139
  className: "hidden rounded-card border border-border-default bg-bg-elevated md:block",
132
- children: /* @__PURE__ */ d(we, { children: [/* @__PURE__ */ u(Ee, { children: /* @__PURE__ */ d(T, { children: [
133
- /* @__PURE__ */ u(w, { children: "Title" }),
134
- /* @__PURE__ */ u(w, { children: "Version" }),
135
- /* @__PURE__ */ u(w, { children: "Status" }),
136
- /* @__PURE__ */ u(w, { children: "DOI" }),
137
- /* @__PURE__ */ u(w, { children: "Authors" }),
138
- /* @__PURE__ */ u(w, { children: "Published" }),
139
- /* @__PURE__ */ u(w, { children: "License" }),
140
- /* @__PURE__ */ u(w, {
140
+ children: /* @__PURE__ */ u(De, { children: [/* @__PURE__ */ l(ke, { children: /* @__PURE__ */ u(w, { children: [
141
+ /* @__PURE__ */ l(C, { children: "Title" }),
142
+ /* @__PURE__ */ l(C, { children: "Version" }),
143
+ /* @__PURE__ */ l(C, { children: "Status" }),
144
+ /* @__PURE__ */ l(C, { children: "DOI" }),
145
+ /* @__PURE__ */ l(C, { children: "Authors" }),
146
+ /* @__PURE__ */ l(C, { children: "Published" }),
147
+ /* @__PURE__ */ l(C, { children: "License" }),
148
+ /* @__PURE__ */ l(C, {
141
149
  className: "text-right",
142
150
  children: "Actions"
143
151
  })
144
- ] }) }), /* @__PURE__ */ u(Te, { children: B.map((e) => /* @__PURE__ */ d(T, { children: [
145
- /* @__PURE__ */ u(C, { children: /* @__PURE__ */ u("button", {
152
+ ] }) }), /* @__PURE__ */ l(Oe, { children: R.map((e) => /* @__PURE__ */ u(w, { children: [
153
+ /* @__PURE__ */ l(S, { children: /* @__PURE__ */ l("button", {
146
154
  type: "button",
147
155
  onClick: () => K(e),
148
156
  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",
149
157
  children: e.title
150
158
  }) }),
151
- /* @__PURE__ */ u(C, {
159
+ /* @__PURE__ */ l(S, {
152
160
  className: "whitespace-nowrap text-sm text-text-secondary",
153
161
  children: e.version || "—"
154
162
  }),
155
- /* @__PURE__ */ u(C, { children: /* @__PURE__ */ u(o, { status: e.status }) }),
156
- /* @__PURE__ */ u(C, {
163
+ /* @__PURE__ */ l(S, { children: /* @__PURE__ */ l(a, { status: e.status }) }),
164
+ /* @__PURE__ */ l(S, {
157
165
  className: "max-w-[14rem]",
158
- children: e.doi ? /* @__PURE__ */ d(i, {
159
- href: A(e.doi),
166
+ children: e.doi ? /* @__PURE__ */ u(i, {
167
+ href: O(e.doi),
160
168
  className: "inline-flex items-center gap-1 truncate text-sm text-text-primary underline-offset-2 hover:underline",
161
169
  fallbackClassName: "block truncate text-sm text-text-secondary",
162
- children: [/* @__PURE__ */ u("span", {
170
+ children: [/* @__PURE__ */ l("span", {
163
171
  className: "truncate",
164
172
  children: e.doi
165
- }), /* @__PURE__ */ u(f, {
173
+ }), /* @__PURE__ */ l(d, {
166
174
  className: "size-3.5 shrink-0",
167
175
  "aria-hidden": "true"
168
176
  })]
169
- }) : /* @__PURE__ */ u("span", {
177
+ }) : /* @__PURE__ */ l("span", {
170
178
  className: "text-sm text-text-secondary",
171
179
  children: "—"
172
180
  })
173
181
  }),
174
- /* @__PURE__ */ u(C, {
182
+ /* @__PURE__ */ l(S, {
175
183
  className: "max-w-[14rem]",
176
- children: e.authors.length === 0 ? /* @__PURE__ */ u("span", {
184
+ children: e.authors.length === 0 ? /* @__PURE__ */ l("span", {
177
185
  className: "text-sm text-text-secondary",
178
186
  children: "—"
179
- }) : /* @__PURE__ */ u("span", {
187
+ }) : /* @__PURE__ */ l("span", {
180
188
  className: "line-clamp-1 text-sm text-text-secondary",
181
189
  children: e.authors.join(", ")
182
190
  })
183
191
  }),
184
- /* @__PURE__ */ u(C, {
192
+ /* @__PURE__ */ l(S, {
185
193
  className: "whitespace-nowrap text-sm text-text-secondary",
186
- children: k(e.publishedAt)
194
+ children: D(e.publishedAt)
187
195
  }),
188
- /* @__PURE__ */ u(C, {
196
+ /* @__PURE__ */ l(S, {
189
197
  className: "whitespace-nowrap text-sm text-text-secondary",
190
198
  children: e.license || "—"
191
199
  }),
192
- /* @__PURE__ */ u(C, {
200
+ /* @__PURE__ */ l(S, {
193
201
  className: "text-right",
194
- children: /* @__PURE__ */ u(r, {
202
+ children: /* @__PURE__ */ l(r, {
195
203
  ariaLabel: `Actions for ${e.title}`,
196
204
  onView: () => K(e),
197
- extraItems: O(e.status) ? [{
205
+ extraItems: E(e.status) ? [{
198
206
  key: "publish",
199
- label: M("cosmicintersection.pages.releases.publish", "Publish"),
200
- icon: p,
207
+ label: A("cosmicintersection.pages.releases.publish", "Publish"),
208
+ icon: f,
201
209
  onSelect: () => Q(e)
202
210
  }] : []
203
211
  })
204
212
  })
205
213
  ] }, e.id)) })] })
206
214
  }),
207
- /* @__PURE__ */ u("ul", {
215
+ /* @__PURE__ */ l("ul", {
208
216
  className: "space-y-3 md:hidden",
209
- children: B.map((e) => /* @__PURE__ */ u("li", {
217
+ children: R.map((e) => /* @__PURE__ */ l("li", {
210
218
  className: "rounded-card border border-border-default bg-bg-elevated",
211
- children: /* @__PURE__ */ d("div", {
219
+ children: /* @__PURE__ */ u("div", {
212
220
  className: "flex items-start justify-between gap-2 p-4",
213
- children: [/* @__PURE__ */ d("div", {
221
+ children: [/* @__PURE__ */ u("div", {
214
222
  className: "min-w-0 flex-1 space-y-2",
215
223
  children: [
216
- /* @__PURE__ */ d("div", {
224
+ /* @__PURE__ */ u("div", {
217
225
  className: "flex flex-wrap items-center gap-2",
218
- children: [/* @__PURE__ */ u("button", {
226
+ children: [/* @__PURE__ */ l("button", {
219
227
  type: "button",
220
228
  onClick: () => K(e),
221
229
  className: "truncate text-left font-medium text-text-primary underline-offset-2 hover:underline",
222
230
  children: e.title
223
- }), /* @__PURE__ */ u(o, { status: e.status })]
231
+ }), /* @__PURE__ */ l(a, { status: e.status })]
224
232
  }),
225
- /* @__PURE__ */ d("div", {
233
+ /* @__PURE__ */ u("div", {
226
234
  className: "flex flex-wrap items-center gap-x-3 gap-y-1 text-xs text-text-secondary",
227
235
  children: [
228
- /* @__PURE__ */ u("span", { children: e.version || "v—" }),
229
- e.license ? /* @__PURE__ */ u("span", { children: e.license }) : null,
230
- /* @__PURE__ */ u("span", { children: k(e.publishedAt) })
236
+ /* @__PURE__ */ l("span", { children: e.version || "v—" }),
237
+ e.license ? /* @__PURE__ */ l("span", { children: e.license }) : null,
238
+ /* @__PURE__ */ l("span", { children: D(e.publishedAt) })
231
239
  ]
232
240
  }),
233
- e.authors.length > 0 ? /* @__PURE__ */ u("p", {
241
+ e.authors.length > 0 ? /* @__PURE__ */ l("p", {
234
242
  className: "line-clamp-1 text-xs text-text-secondary",
235
243
  children: e.authors.join(", ")
236
244
  }) : null,
237
- e.doi ? /* @__PURE__ */ d(i, {
238
- href: A(e.doi),
245
+ e.doi ? /* @__PURE__ */ u(i, {
246
+ href: O(e.doi),
239
247
  className: "inline-flex items-center gap-1 text-xs text-text-primary underline-offset-2 hover:underline",
240
248
  fallbackClassName: "block truncate text-xs text-text-secondary",
241
- children: [/* @__PURE__ */ d("span", {
249
+ children: [/* @__PURE__ */ u("span", {
242
250
  className: "truncate",
243
251
  children: ["DOI: ", e.doi]
244
- }), /* @__PURE__ */ u(f, {
252
+ }), /* @__PURE__ */ l(d, {
245
253
  className: "size-3 shrink-0",
246
254
  "aria-hidden": "true"
247
255
  })]
248
256
  }) : null
249
257
  ]
250
- }), /* @__PURE__ */ u(r, {
258
+ }), /* @__PURE__ */ l(r, {
251
259
  ariaLabel: `Actions for ${e.title}`,
252
260
  onView: () => K(e),
253
- extraItems: O(e.status) ? [{
261
+ extraItems: E(e.status) ? [{
254
262
  key: "publish",
255
- label: M("cosmicintersection.pages.releases.publish", "Publish"),
256
- icon: p,
263
+ label: A("cosmicintersection.pages.releases.publish", "Publish"),
264
+ icon: f,
257
265
  onSelect: () => Q(e)
258
266
  }] : []
259
267
  })]
260
268
  })
261
269
  }, e.id))
262
270
  }),
263
- /* @__PURE__ */ u(a, {
264
- offset: P.offset,
265
- limit: P.limit,
266
- loadedCount: B.length,
267
- hasMore: ke?.hasMore ?? !1,
268
- onPrev: P.prevPage,
269
- onNext: P.nextPage,
270
- itemLabel: M("cosmicintersection.pages.releases.itemLabel", "releases"),
271
- loading: I
271
+ /* @__PURE__ */ l(ue, {
272
+ offset: M.offset,
273
+ limit: M.limit,
274
+ loadedCount: R.length,
275
+ hasMore: Ne?.hasMore ?? !1,
276
+ onPrev: M.prevPage,
277
+ onNext: M.nextPage,
278
+ itemLabel: A("cosmicintersection.pages.releases.itemLabel", "releases"),
279
+ loading: P
272
280
  })
273
281
  ] });
274
282
  })()]
275
283
  }),
276
- /* @__PURE__ */ u(h, {
277
- ...pe,
284
+ /* @__PURE__ */ l(m, {
285
+ ...he,
278
286
  open: G !== null,
279
287
  onOpenChange: (e) => e ? void 0 : K(null),
280
- children: /* @__PURE__ */ u(g, {
281
- ...fe,
288
+ children: /* @__PURE__ */ l(h, {
289
+ ...me,
282
290
  className: "max-h-[85vh] max-w-lg overflow-y-auto",
283
- children: G ? /* @__PURE__ */ d(l, { children: [
284
- /* @__PURE__ */ d(y, { children: [/* @__PURE__ */ d(b, {
291
+ children: G ? /* @__PURE__ */ u(c, { children: [
292
+ /* @__PURE__ */ u(v, { children: [/* @__PURE__ */ u(y, {
285
293
  className: "flex items-center gap-2",
286
- children: [/* @__PURE__ */ u(me, {
294
+ children: [/* @__PURE__ */ l(_e, {
287
295
  className: "size-5 text-text-secondary",
288
296
  "aria-hidden": "true"
289
297
  }), G.title]
290
- }), /* @__PURE__ */ d(_, { children: [
298
+ }), /* @__PURE__ */ u(g, { children: [
291
299
  "Version ",
292
300
  G.version || "—",
293
301
  " · ",
294
- /* @__PURE__ */ u(o, { status: G.status })
302
+ /* @__PURE__ */ l(a, { status: G.status })
295
303
  ] })] }),
296
- /* @__PURE__ */ d("div", {
304
+ /* @__PURE__ */ u("div", {
297
305
  className: "space-y-4 text-sm",
298
306
  children: [
299
- /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("p", {
307
+ /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("p", {
300
308
  className: "text-xs font-medium uppercase tracking-wide text-text-secondary",
301
309
  children: "Abstract"
302
- }), /* @__PURE__ */ u("p", {
310
+ }), /* @__PURE__ */ l("p", {
303
311
  className: "mt-1 whitespace-pre-wrap text-text-primary",
304
312
  children: G.abstract?.trim() || "No abstract provided."
305
313
  })] }),
306
- /* @__PURE__ */ d("div", {
314
+ /* @__PURE__ */ u("div", {
307
315
  className: "grid grid-cols-2 gap-4",
308
316
  children: [
309
- /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("p", {
317
+ /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("p", {
310
318
  className: "text-xs font-medium uppercase tracking-wide text-text-secondary",
311
319
  children: "Authors"
312
- }), /* @__PURE__ */ u("p", {
320
+ }), /* @__PURE__ */ l("p", {
313
321
  className: "mt-1 text-text-primary",
314
322
  children: G.authors.length ? G.authors.join(", ") : "—"
315
323
  })] }),
316
- /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("p", {
324
+ /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("p", {
317
325
  className: "text-xs font-medium uppercase tracking-wide text-text-secondary",
318
326
  children: "License"
319
- }), /* @__PURE__ */ u("p", {
327
+ }), /* @__PURE__ */ l("p", {
320
328
  className: "mt-1 text-text-primary",
321
329
  children: G.license || "—"
322
330
  })] }),
323
- /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("p", {
331
+ /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("p", {
324
332
  className: "text-xs font-medium uppercase tracking-wide text-text-secondary",
325
333
  children: "Published"
326
- }), /* @__PURE__ */ u("p", {
334
+ }), /* @__PURE__ */ l("p", {
327
335
  className: "mt-1 text-text-primary",
328
- children: k(G.publishedAt)
336
+ children: D(G.publishedAt)
329
337
  })] }),
330
- /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("p", {
338
+ /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("p", {
331
339
  className: "text-xs font-medium uppercase tracking-wide text-text-secondary",
332
340
  children: "DOI"
333
- }), /* @__PURE__ */ u("p", {
341
+ }), /* @__PURE__ */ l("p", {
334
342
  className: "mt-1",
335
- children: G.doi ? /* @__PURE__ */ d(i, {
336
- href: A(G.doi),
343
+ children: G.doi ? /* @__PURE__ */ u(i, {
344
+ href: O(G.doi),
337
345
  className: "inline-flex items-center gap-1 text-text-primary underline-offset-2 hover:underline",
338
346
  fallbackClassName: "text-text-secondary",
339
- children: [G.doi, /* @__PURE__ */ u(f, {
347
+ children: [G.doi, /* @__PURE__ */ l(d, {
340
348
  className: "size-3.5",
341
349
  "aria-hidden": "true"
342
350
  })]
343
- }) : /* @__PURE__ */ u("span", {
351
+ }) : /* @__PURE__ */ l("span", {
344
352
  className: "text-text-secondary",
345
353
  children: "Not assigned"
346
354
  })
347
355
  })] })
348
356
  ]
349
357
  }),
350
- /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ d("p", {
358
+ /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ u("p", {
351
359
  className: "text-xs font-medium uppercase tracking-wide text-text-secondary",
352
360
  children: [
353
361
  "Datasets (",
354
362
  G.datasetIds.length,
355
363
  ")"
356
364
  ]
357
- }), /* @__PURE__ */ u("div", {
365
+ }), /* @__PURE__ */ l("div", {
358
366
  className: "mt-1 flex flex-wrap gap-1.5",
359
- children: G.datasetIds.length === 0 ? /* @__PURE__ */ u("span", {
367
+ children: G.datasetIds.length === 0 ? /* @__PURE__ */ l("span", {
360
368
  className: "text-text-secondary",
361
369
  children: "None linked."
362
370
  }) : G.datasetIds.map((e) => {
363
- let t = Ae.get(e);
364
- return /* @__PURE__ */ d(m, {
371
+ let t = Pe.get(e);
372
+ return /* @__PURE__ */ u(p, {
365
373
  type: "button",
366
374
  variant: "outline",
367
375
  size: "sm",
368
376
  className: "h-auto gap-1 px-2 py-1",
369
377
  onClick: () => q(`datasets/${e}`),
370
- children: [/* @__PURE__ */ u(he, {
378
+ children: [/* @__PURE__ */ l(ve, {
371
379
  className: "size-3.5",
372
380
  "aria-hidden": "true"
373
- }), /* @__PURE__ */ u("span", {
381
+ }), /* @__PURE__ */ l("span", {
374
382
  className: t ? "" : "font-mono text-xs",
375
383
  children: t ?? e
376
384
  })]
377
385
  }, e);
378
386
  })
379
387
  })] }),
380
- /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("p", {
388
+ /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("p", {
381
389
  className: "text-xs font-medium uppercase tracking-wide text-text-secondary",
382
390
  children: "Notebook"
383
- }), /* @__PURE__ */ u("div", {
391
+ }), /* @__PURE__ */ l("div", {
384
392
  className: "mt-1",
385
- children: G.notebookId ? /* @__PURE__ */ d(m, {
393
+ children: G.notebookId ? /* @__PURE__ */ u(p, {
386
394
  type: "button",
387
395
  variant: "outline",
388
396
  size: "sm",
389
397
  className: "h-auto gap-1 px-2 py-1",
390
398
  onClick: () => q(`notebooks/${G.notebookId}`),
391
- children: [/* @__PURE__ */ u(ge, {
399
+ children: [/* @__PURE__ */ l(ye, {
392
400
  className: "size-3.5",
393
401
  "aria-hidden": "true"
394
- }), /* @__PURE__ */ u("span", {
395
- className: U.get(G.notebookId) ? "" : "font-mono text-xs",
396
- children: U.get(G.notebookId) ?? G.notebookId
402
+ }), /* @__PURE__ */ l("span", {
403
+ className: V.get(G.notebookId) ? "" : "font-mono text-xs",
404
+ children: V.get(G.notebookId) ?? G.notebookId
397
405
  })]
398
- }) : /* @__PURE__ */ u("span", {
406
+ }) : /* @__PURE__ */ l("span", {
399
407
  className: "text-text-secondary",
400
408
  children: "None linked."
401
409
  })
402
410
  })] }),
403
- /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("p", {
411
+ /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("p", {
404
412
  className: "text-xs font-medium uppercase tracking-wide text-text-secondary",
405
413
  children: "Discussion"
406
- }), /* @__PURE__ */ u("div", {
414
+ }), /* @__PURE__ */ l("div", {
407
415
  className: "mt-2",
408
- children: /* @__PURE__ */ u(se, {
416
+ children: /* @__PURE__ */ l(ce, {
409
417
  entityType: "cosmicintersection-release",
410
418
  entityId: G.id,
411
419
  title: G.title,
@@ -414,16 +422,16 @@ function j() {
414
422
  })] })
415
423
  ]
416
424
  }),
417
- /* @__PURE__ */ d(v, { children: [O(G.status) ? /* @__PURE__ */ d(m, {
425
+ /* @__PURE__ */ u(_, { children: [E(G.status) ? /* @__PURE__ */ u(p, {
418
426
  type: "button",
419
427
  onClick: () => {
420
428
  let e = G;
421
429
  K(null), Q(e);
422
430
  },
423
- children: [/* @__PURE__ */ u(p, { className: "size-4" }), "Publish"]
424
- }) : null, /* @__PURE__ */ u(ve, {
431
+ children: [/* @__PURE__ */ l(f, { className: "size-4" }), "Publish"]
432
+ }) : null, /* @__PURE__ */ l(xe, {
425
433
  asChild: !0,
426
- children: /* @__PURE__ */ u(m, {
434
+ children: /* @__PURE__ */ l(p, {
427
435
  type: "button",
428
436
  variant: "outline",
429
437
  children: "Close"
@@ -432,76 +440,76 @@ function j() {
432
440
  ] }) : null
433
441
  })
434
442
  }),
435
- /* @__PURE__ */ u(h, {
443
+ /* @__PURE__ */ l(m, {
436
444
  open: J !== null,
437
- onOpenChange: (e) => e || z ? void 0 : Y(null),
438
- children: /* @__PURE__ */ d(g, {
445
+ onOpenChange: (e) => e || L ? void 0 : Y(null),
446
+ children: /* @__PURE__ */ u(h, {
439
447
  className: "max-w-md",
440
448
  children: [
441
- /* @__PURE__ */ d(y, { children: [/* @__PURE__ */ u(b, { children: M("cosmicintersection.pages.releases.publishRelease", "Publish release") }), /* @__PURE__ */ u(_, { children: J ? M("cosmicintersection.pages.releases.publishDescription", "Publish “{{name}}” to make it publicly citable. You can attach a DOI now or later.", { name: J.title }) : "" })] }),
442
- J ? /* @__PURE__ */ d("dl", {
449
+ /* @__PURE__ */ u(v, { children: [/* @__PURE__ */ l(y, { children: A("cosmicintersection.pages.releases.publishRelease", "Publish release") }), /* @__PURE__ */ l(g, { children: J ? A("cosmicintersection.pages.releases.publishDescription", "Publish “{{name}}” to make it publicly citable. You can attach a DOI now or later.", { name: J.title }) : "" })] }),
450
+ J ? /* @__PURE__ */ u("dl", {
443
451
  className: "grid grid-cols-3 gap-x-4 gap-y-3 rounded-card border border-border-default bg-bg-sunken p-3",
444
452
  children: [
445
- /* @__PURE__ */ d("div", {
453
+ /* @__PURE__ */ u("div", {
446
454
  className: "col-span-2 min-w-0",
447
- children: [/* @__PURE__ */ u("dt", {
455
+ children: [/* @__PURE__ */ l("dt", {
448
456
  className: "text-xs font-medium uppercase tracking-wide text-text-secondary",
449
457
  children: "Authors"
450
- }), /* @__PURE__ */ u("dd", {
458
+ }), /* @__PURE__ */ l("dd", {
451
459
  className: "mt-0.5 truncate text-sm text-text-primary",
452
460
  title: J.authors.join(", "),
453
461
  children: J.authors.length ? J.authors.join(", ") : "—"
454
462
  })]
455
463
  }),
456
- /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("dt", {
464
+ /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("dt", {
457
465
  className: "text-xs font-medium uppercase tracking-wide text-text-secondary",
458
466
  children: "Datasets"
459
- }), /* @__PURE__ */ u("dd", {
467
+ }), /* @__PURE__ */ l("dd", {
460
468
  className: "mt-0.5 text-sm tabular-nums text-text-primary",
461
469
  children: J.datasetIds.length
462
470
  })] }),
463
- /* @__PURE__ */ d("div", {
471
+ /* @__PURE__ */ u("div", {
464
472
  className: "col-span-3 min-w-0",
465
- children: [/* @__PURE__ */ u("dt", {
473
+ children: [/* @__PURE__ */ l("dt", {
466
474
  className: "text-xs font-medium uppercase tracking-wide text-text-secondary",
467
475
  children: "License"
468
- }), /* @__PURE__ */ u("dd", {
476
+ }), /* @__PURE__ */ l("dd", {
469
477
  className: "mt-0.5 truncate text-sm text-text-primary",
470
478
  children: J.license || "—"
471
479
  })]
472
480
  })
473
481
  ]
474
482
  }) : null,
475
- /* @__PURE__ */ d("div", {
483
+ /* @__PURE__ */ u("div", {
476
484
  className: "space-y-2",
477
485
  children: [
478
- /* @__PURE__ */ u(ye, {
486
+ /* @__PURE__ */ l(Ce, {
479
487
  htmlFor: "release-doi",
480
- children: M("cosmicintersection.pages.releases.doiOptional", "DOI (optional)")
488
+ children: A("cosmicintersection.pages.releases.doiOptional", "DOI (optional)")
481
489
  }),
482
- /* @__PURE__ */ u(x, {
490
+ /* @__PURE__ */ l(Se, {
483
491
  id: "release-doi",
484
492
  value: X,
485
493
  onChange: (e) => Z(e.target.value),
486
494
  placeholder: "10.1234/cosmic.2026.0001"
487
495
  }),
488
- /* @__PURE__ */ u("p", {
496
+ /* @__PURE__ */ l("p", {
489
497
  className: "text-xs text-text-secondary",
490
- children: M("cosmicintersection.pages.releases.doiHint", "A Digital Object Identifier makes the release permanently referenceable.")
498
+ children: A("cosmicintersection.pages.releases.doiHint", "A Digital Object Identifier makes the release permanently referenceable.")
491
499
  })
492
500
  ]
493
501
  }),
494
- /* @__PURE__ */ d(v, { children: [/* @__PURE__ */ u(m, {
502
+ /* @__PURE__ */ u(_, { children: [/* @__PURE__ */ l(p, {
495
503
  type: "button",
496
504
  variant: "outline",
497
505
  onClick: () => Y(null),
498
- disabled: z,
499
- children: M("cosmicintersection.common.cancel", "Cancel")
500
- }), /* @__PURE__ */ d(m, {
506
+ disabled: L,
507
+ children: A("cosmicintersection.common.cancel", "Cancel")
508
+ }), /* @__PURE__ */ u(p, {
501
509
  type: "button",
502
- onClick: () => void Me(),
503
- disabled: z,
504
- children: [/* @__PURE__ */ u(p, { className: "size-4" }), z ? M("cosmicintersection.pages.releases.publishing", "Publishing…") : M("cosmicintersection.pages.releases.publishRelease", "Publish release")]
510
+ onClick: () => void Le(),
511
+ disabled: L,
512
+ children: [/* @__PURE__ */ l(f, { className: "size-4" }), L ? A("cosmicintersection.pages.releases.publishing", "Publishing…") : A("cosmicintersection.pages.releases.publishRelease", "Publish release")]
505
513
  })] })
506
514
  ]
507
515
  })
@@ -510,6 +518,6 @@ function j() {
510
518
  });
511
519
  }
512
520
  //#endregion
513
- export { j as default };
521
+ export { k as default };
514
522
 
515
523
  //# sourceMappingURL=ReleasesPage.js.map