@burdenoff/microfe-cosmicintersection 2026.1012.1 → 2026.1030.2

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