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