@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.
- package/dist/cosmicintersection/lib/useSelectedRecord.d.ts +20 -0
- package/dist/cosmicintersection/lib/useSelectedRecord.d.ts.map +1 -0
- package/dist/cosmicintersection/lib/useSelectedRecord.js +19 -0
- package/dist/cosmicintersection/lib/useSelectedRecord.js.map +1 -0
- package/dist/cosmicintersection/pages/access/AccessPage.d.ts.map +1 -1
- package/dist/cosmicintersection/pages/access/AccessPage.js +239 -226
- package/dist/cosmicintersection/pages/access/AccessPage.js.map +1 -1
- package/dist/cosmicintersection/pages/analyses/AnalysesPage.d.ts.map +1 -1
- package/dist/cosmicintersection/pages/analyses/AnalysesPage.js +196 -195
- package/dist/cosmicintersection/pages/analyses/AnalysesPage.js.map +1 -1
- package/dist/cosmicintersection/pages/datasets/DatasetDetailPage.d.ts.map +1 -1
- package/dist/cosmicintersection/pages/datasets/DatasetDetailPage.js +188 -175
- package/dist/cosmicintersection/pages/datasets/DatasetDetailPage.js.map +1 -1
- package/dist/cosmicintersection/pages/releases/ReleasesPage.d.ts.map +1 -1
- package/dist/cosmicintersection/pages/releases/ReleasesPage.js +202 -201
- package/dist/cosmicintersection/pages/releases/ReleasesPage.js.map +1 -1
- package/dist/utils/pageContext.d.ts +33 -7
- package/dist/utils/pageContext.d.ts.map +1 -1
- package/dist/utils/pageContext.js +75 -33
- package/dist/utils/pageContext.js.map +1 -1
- package/package.json +1 -1
|
@@ -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
|
|
4
|
-
import { useTr as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
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 {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
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
|
|
21
|
+
var E = "ALL", D = [
|
|
21
22
|
"DRAFT",
|
|
22
23
|
"UNDER_REVIEW",
|
|
23
24
|
"PUBLISHED",
|
|
24
25
|
"RETRACTED"
|
|
25
26
|
];
|
|
26
|
-
function
|
|
27
|
+
function O(e) {
|
|
27
28
|
return e === "DRAFT" || e === "UNDER_REVIEW";
|
|
28
29
|
}
|
|
29
|
-
function
|
|
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
|
|
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
|
|
43
|
-
let { navigate:
|
|
43
|
+
function j() {
|
|
44
|
+
let { navigate: j } = e(), M = re(), [N, Te] = l(E), P = a({
|
|
44
45
|
pageSize: 20,
|
|
45
|
-
resetKey:
|
|
46
|
-
}), { data:
|
|
47
|
-
status:
|
|
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:
|
|
50
|
-
offset:
|
|
50
|
+
limit: P.limit,
|
|
51
|
+
offset: P.offset
|
|
51
52
|
}
|
|
52
|
-
}), [
|
|
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
|
-
} }),
|
|
56
|
+
} }), H = te({ pagination: {
|
|
56
57
|
limit: 100,
|
|
57
58
|
offset: 0
|
|
58
|
-
} }),
|
|
59
|
+
} }), Oe = c(() => {
|
|
59
60
|
let e = /* @__PURE__ */ new Map();
|
|
60
|
-
for (let t of
|
|
61
|
+
for (let t of V.data?.cosListDatasets.items ?? []) e.set(t.id, t.name);
|
|
61
62
|
return e;
|
|
62
|
-
}, [
|
|
63
|
+
}, [V.data]), U = c(() => {
|
|
63
64
|
let e = /* @__PURE__ */ new Map();
|
|
64
|
-
for (let t of
|
|
65
|
+
for (let t of H.data?.cosListNotebooks.items ?? []) e.set(t.id, t.title);
|
|
65
66
|
return e;
|
|
66
|
-
}, [
|
|
67
|
-
K(null),
|
|
68
|
-
}, [J, Y] =
|
|
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
|
-
},
|
|
71
|
+
}, Ae = async () => {
|
|
71
72
|
if (!J) return;
|
|
72
73
|
let e = X.trim();
|
|
73
|
-
(await
|
|
74
|
+
(await Ee({ variables: {
|
|
74
75
|
id: J.id,
|
|
75
76
|
doi: e || void 0
|
|
76
|
-
} })).data?.cosPublishRelease?.id && (t.success(
|
|
77
|
-
}, $ = /* @__PURE__ */
|
|
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: () =>
|
|
80
|
-
children: [/* @__PURE__ */
|
|
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__ */
|
|
83
|
-
title:
|
|
84
|
-
description:
|
|
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__ */
|
|
88
|
+
/* @__PURE__ */ f("div", {
|
|
88
89
|
className: "space-y-4",
|
|
89
|
-
children: [/* @__PURE__ */
|
|
90
|
+
children: [/* @__PURE__ */ d("div", {
|
|
90
91
|
className: "flex flex-wrap items-center gap-3",
|
|
91
|
-
children: /* @__PURE__ */
|
|
92
|
+
children: /* @__PURE__ */ d("div", {
|
|
92
93
|
className: "w-full max-w-[14rem]",
|
|
93
|
-
children: /* @__PURE__ */
|
|
94
|
-
value:
|
|
95
|
-
onValueChange:
|
|
96
|
-
children: [/* @__PURE__ */
|
|
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__ */
|
|
99
|
-
}), /* @__PURE__ */
|
|
100
|
-
value:
|
|
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
|
-
}),
|
|
103
|
+
}), D.map((e) => /* @__PURE__ */ d(S, {
|
|
103
104
|
value: e,
|
|
104
|
-
children:
|
|
105
|
+
children: ue(e)
|
|
105
106
|
}, e))] })]
|
|
106
107
|
})
|
|
107
108
|
})
|
|
108
109
|
}), (() => {
|
|
109
|
-
if (
|
|
110
|
+
if (I) return /* @__PURE__ */ d(oe, {
|
|
110
111
|
variant: "rows",
|
|
111
112
|
rows: 6,
|
|
112
|
-
label:
|
|
113
|
+
label: M("cosmicintersection.pages.releases.loading", "Loading releases…")
|
|
113
114
|
});
|
|
114
|
-
if (
|
|
115
|
-
message:
|
|
116
|
-
onRetry: () => void
|
|
115
|
+
if (L) return /* @__PURE__ */ d(ae, {
|
|
116
|
+
message: L.message,
|
|
117
|
+
onRetry: () => void R()
|
|
117
118
|
});
|
|
118
|
-
if (
|
|
119
|
-
let e =
|
|
120
|
-
return /* @__PURE__ */
|
|
121
|
-
icon:
|
|
122
|
-
title: e ?
|
|
123
|
-
description: e ?
|
|
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__ */
|
|
128
|
-
/* @__PURE__ */
|
|
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__ */
|
|
131
|
-
/* @__PURE__ */
|
|
132
|
-
/* @__PURE__ */
|
|
133
|
-
/* @__PURE__ */
|
|
134
|
-
/* @__PURE__ */
|
|
135
|
-
/* @__PURE__ */
|
|
136
|
-
/* @__PURE__ */
|
|
137
|
-
/* @__PURE__ */
|
|
138
|
-
/* @__PURE__ */
|
|
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__ */
|
|
143
|
-
/* @__PURE__ */
|
|
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__ */
|
|
150
|
+
/* @__PURE__ */ d(C, {
|
|
150
151
|
className: "whitespace-nowrap text-sm text-text-secondary",
|
|
151
152
|
children: e.version || "—"
|
|
152
153
|
}),
|
|
153
|
-
/* @__PURE__ */
|
|
154
|
-
/* @__PURE__ */
|
|
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__ */
|
|
157
|
-
href:
|
|
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__ */
|
|
161
|
+
children: [/* @__PURE__ */ d("span", {
|
|
161
162
|
className: "truncate",
|
|
162
163
|
children: e.doi
|
|
163
|
-
}), /* @__PURE__ */
|
|
164
|
+
}), /* @__PURE__ */ d(p, {
|
|
164
165
|
className: "size-3.5 shrink-0",
|
|
165
166
|
"aria-hidden": "true"
|
|
166
167
|
})]
|
|
167
|
-
}) : /* @__PURE__ */
|
|
168
|
+
}) : /* @__PURE__ */ d("span", {
|
|
168
169
|
className: "text-sm text-text-secondary",
|
|
169
170
|
children: "—"
|
|
170
171
|
})
|
|
171
172
|
}),
|
|
172
|
-
/* @__PURE__ */
|
|
173
|
+
/* @__PURE__ */ d(C, {
|
|
173
174
|
className: "max-w-[14rem]",
|
|
174
|
-
children: e.authors.length === 0 ? /* @__PURE__ */
|
|
175
|
+
children: e.authors.length === 0 ? /* @__PURE__ */ d("span", {
|
|
175
176
|
className: "text-sm text-text-secondary",
|
|
176
177
|
children: "—"
|
|
177
|
-
}) : /* @__PURE__ */
|
|
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__ */
|
|
183
|
+
/* @__PURE__ */ d(C, {
|
|
183
184
|
className: "whitespace-nowrap text-sm text-text-secondary",
|
|
184
|
-
children:
|
|
185
|
+
children: k(e.publishedAt)
|
|
185
186
|
}),
|
|
186
|
-
/* @__PURE__ */
|
|
187
|
+
/* @__PURE__ */ d(C, {
|
|
187
188
|
className: "whitespace-nowrap text-sm text-text-secondary",
|
|
188
189
|
children: e.license || "—"
|
|
189
190
|
}),
|
|
190
|
-
/* @__PURE__ */
|
|
191
|
+
/* @__PURE__ */ d(C, {
|
|
191
192
|
className: "text-right",
|
|
192
|
-
children: /* @__PURE__ */
|
|
193
|
+
children: /* @__PURE__ */ d(r, {
|
|
193
194
|
ariaLabel: `Actions for ${e.title}`,
|
|
194
195
|
onView: () => K(e),
|
|
195
|
-
extraItems:
|
|
196
|
+
extraItems: O(e.status) ? [{
|
|
196
197
|
key: "publish",
|
|
197
|
-
label:
|
|
198
|
-
icon:
|
|
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__ */
|
|
206
|
+
/* @__PURE__ */ d("ul", {
|
|
206
207
|
className: "space-y-3 md:hidden",
|
|
207
|
-
children:
|
|
208
|
+
children: B.map((e) => /* @__PURE__ */ d("li", {
|
|
208
209
|
className: "rounded-card border border-border-default bg-bg-elevated",
|
|
209
|
-
children: /* @__PURE__ */
|
|
210
|
+
children: /* @__PURE__ */ f("div", {
|
|
210
211
|
className: "flex items-start justify-between gap-2 p-4",
|
|
211
|
-
children: [/* @__PURE__ */
|
|
212
|
+
children: [/* @__PURE__ */ f("div", {
|
|
212
213
|
className: "min-w-0 flex-1 space-y-2",
|
|
213
214
|
children: [
|
|
214
|
-
/* @__PURE__ */
|
|
215
|
+
/* @__PURE__ */ f("div", {
|
|
215
216
|
className: "flex flex-wrap items-center gap-2",
|
|
216
|
-
children: [/* @__PURE__ */
|
|
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__ */
|
|
222
|
+
}), /* @__PURE__ */ d(o, { status: e.status })]
|
|
222
223
|
}),
|
|
223
|
-
/* @__PURE__ */
|
|
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__ */
|
|
227
|
-
e.license ? /* @__PURE__ */
|
|
228
|
-
/* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
236
|
-
href:
|
|
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__ */
|
|
240
|
+
children: [/* @__PURE__ */ f("span", {
|
|
240
241
|
className: "truncate",
|
|
241
242
|
children: ["DOI: ", e.doi]
|
|
242
|
-
}), /* @__PURE__ */
|
|
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__ */
|
|
249
|
+
}), /* @__PURE__ */ d(r, {
|
|
249
250
|
ariaLabel: `Actions for ${e.title}`,
|
|
250
251
|
onView: () => K(e),
|
|
251
|
-
extraItems:
|
|
252
|
+
extraItems: O(e.status) ? [{
|
|
252
253
|
key: "publish",
|
|
253
|
-
label:
|
|
254
|
-
icon:
|
|
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__ */
|
|
262
|
-
offset:
|
|
263
|
-
limit:
|
|
264
|
-
loadedCount:
|
|
265
|
-
hasMore:
|
|
266
|
-
onPrev:
|
|
267
|
-
onNext:
|
|
268
|
-
itemLabel:
|
|
269
|
-
loading:
|
|
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__ */
|
|
275
|
+
/* @__PURE__ */ d(g, {
|
|
275
276
|
open: G !== null,
|
|
276
277
|
onOpenChange: (e) => e ? void 0 : K(null),
|
|
277
|
-
children: /* @__PURE__ */
|
|
278
|
+
children: /* @__PURE__ */ d(_, {
|
|
278
279
|
className: "max-h-[85vh] max-w-lg overflow-y-auto",
|
|
279
|
-
children: G ? /* @__PURE__ */
|
|
280
|
-
/* @__PURE__ */
|
|
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__ */
|
|
283
|
+
children: [/* @__PURE__ */ d(de, {
|
|
283
284
|
className: "size-5 text-text-secondary",
|
|
284
285
|
"aria-hidden": "true"
|
|
285
286
|
}), G.title]
|
|
286
|
-
}), /* @__PURE__ */
|
|
287
|
+
}), /* @__PURE__ */ f(v, { children: [
|
|
287
288
|
"Version ",
|
|
288
289
|
G.version || "—",
|
|
289
290
|
" · ",
|
|
290
|
-
/* @__PURE__ */
|
|
291
|
+
/* @__PURE__ */ d(o, { status: G.status })
|
|
291
292
|
] })] }),
|
|
292
|
-
/* @__PURE__ */
|
|
293
|
+
/* @__PURE__ */ f("div", {
|
|
293
294
|
className: "space-y-4 text-sm",
|
|
294
295
|
children: [
|
|
295
|
-
/* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
303
|
+
/* @__PURE__ */ f("div", {
|
|
303
304
|
className: "grid grid-cols-2 gap-4",
|
|
304
305
|
children: [
|
|
305
|
-
/* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
316
|
+
}), /* @__PURE__ */ d("p", {
|
|
316
317
|
className: "mt-1 text-text-primary",
|
|
317
318
|
children: G.license || "—"
|
|
318
319
|
})] }),
|
|
319
|
-
/* @__PURE__ */
|
|
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__ */
|
|
323
|
+
}), /* @__PURE__ */ d("p", {
|
|
323
324
|
className: "mt-1 text-text-primary",
|
|
324
|
-
children:
|
|
325
|
+
children: k(G.publishedAt)
|
|
325
326
|
})] }),
|
|
326
|
-
/* @__PURE__ */
|
|
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__ */
|
|
330
|
+
}), /* @__PURE__ */ d("p", {
|
|
330
331
|
className: "mt-1",
|
|
331
|
-
children: G.doi ? /* @__PURE__ */
|
|
332
|
-
href:
|
|
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__ */
|
|
336
|
+
children: [G.doi, /* @__PURE__ */ d(p, {
|
|
336
337
|
className: "size-3.5",
|
|
337
338
|
"aria-hidden": "true"
|
|
338
339
|
})]
|
|
339
|
-
}) : /* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
354
|
+
}), /* @__PURE__ */ d("div", {
|
|
354
355
|
className: "mt-1 flex flex-wrap gap-1.5",
|
|
355
|
-
children: G.datasetIds.length === 0 ? /* @__PURE__ */
|
|
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 =
|
|
360
|
-
return /* @__PURE__ */
|
|
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__ */
|
|
367
|
+
children: [/* @__PURE__ */ d(fe, {
|
|
367
368
|
className: "size-3.5",
|
|
368
369
|
"aria-hidden": "true"
|
|
369
|
-
}), /* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
380
|
+
}), /* @__PURE__ */ d("div", {
|
|
380
381
|
className: "mt-1",
|
|
381
|
-
children: G.notebookId ? /* @__PURE__ */
|
|
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__ */
|
|
388
|
+
children: [/* @__PURE__ */ d(pe, {
|
|
388
389
|
className: "size-3.5",
|
|
389
390
|
"aria-hidden": "true"
|
|
390
|
-
}), /* @__PURE__ */
|
|
391
|
-
className:
|
|
392
|
-
children:
|
|
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__ */
|
|
395
|
+
}) : /* @__PURE__ */ d("span", {
|
|
395
396
|
className: "text-text-secondary",
|
|
396
397
|
children: "None linked."
|
|
397
398
|
})
|
|
398
399
|
})] }),
|
|
399
|
-
/* @__PURE__ */
|
|
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__ */
|
|
403
|
+
}), /* @__PURE__ */ d("div", {
|
|
403
404
|
className: "mt-2",
|
|
404
|
-
children: /* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
420
|
-
}) : null, /* @__PURE__ */
|
|
420
|
+
children: [/* @__PURE__ */ d(m, { className: "size-4" }), "Publish"]
|
|
421
|
+
}) : null, /* @__PURE__ */ d(he, {
|
|
421
422
|
asChild: !0,
|
|
422
|
-
children: /* @__PURE__ */
|
|
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__ */
|
|
432
|
+
/* @__PURE__ */ d(g, {
|
|
432
433
|
open: J !== null,
|
|
433
|
-
onOpenChange: (e) => e ||
|
|
434
|
-
children: /* @__PURE__ */
|
|
434
|
+
onOpenChange: (e) => e || z ? void 0 : Y(null),
|
|
435
|
+
children: /* @__PURE__ */ f(_, {
|
|
435
436
|
className: "max-w-md",
|
|
436
437
|
children: [
|
|
437
|
-
/* @__PURE__ */
|
|
438
|
-
J ? /* @__PURE__ */
|
|
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__ */
|
|
442
|
+
/* @__PURE__ */ f("div", {
|
|
442
443
|
className: "col-span-2 min-w-0",
|
|
443
|
-
children: [/* @__PURE__ */
|
|
444
|
+
children: [/* @__PURE__ */ d("dt", {
|
|
444
445
|
className: "text-xs font-medium uppercase tracking-wide text-text-secondary",
|
|
445
446
|
children: "Authors"
|
|
446
|
-
}), /* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
460
|
+
/* @__PURE__ */ f("div", {
|
|
460
461
|
className: "col-span-3 min-w-0",
|
|
461
|
-
children: [/* @__PURE__ */
|
|
462
|
+
children: [/* @__PURE__ */ d("dt", {
|
|
462
463
|
className: "text-xs font-medium uppercase tracking-wide text-text-secondary",
|
|
463
464
|
children: "License"
|
|
464
|
-
}), /* @__PURE__ */
|
|
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__ */
|
|
472
|
+
/* @__PURE__ */ f("div", {
|
|
472
473
|
className: "space-y-2",
|
|
473
474
|
children: [
|
|
474
|
-
/* @__PURE__ */
|
|
475
|
+
/* @__PURE__ */ d(_e, {
|
|
475
476
|
htmlFor: "release-doi",
|
|
476
|
-
children:
|
|
477
|
+
children: M("cosmicintersection.pages.releases.doiOptional", "DOI (optional)")
|
|
477
478
|
}),
|
|
478
|
-
/* @__PURE__ */
|
|
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__ */
|
|
485
|
+
/* @__PURE__ */ d("p", {
|
|
485
486
|
className: "text-xs text-text-secondary",
|
|
486
|
-
children:
|
|
487
|
+
children: M("cosmicintersection.pages.releases.doiHint", "A Digital Object Identifier makes the release permanently referenceable.")
|
|
487
488
|
})
|
|
488
489
|
]
|
|
489
490
|
}),
|
|
490
|
-
/* @__PURE__ */
|
|
491
|
+
/* @__PURE__ */ f(y, { children: [/* @__PURE__ */ d(h, {
|
|
491
492
|
type: "button",
|
|
492
493
|
variant: "outline",
|
|
493
494
|
onClick: () => Y(null),
|
|
494
|
-
disabled:
|
|
495
|
-
children:
|
|
496
|
-
}), /* @__PURE__ */
|
|
495
|
+
disabled: z,
|
|
496
|
+
children: M("cosmicintersection.common.cancel", "Cancel")
|
|
497
|
+
}), /* @__PURE__ */ f(h, {
|
|
497
498
|
type: "button",
|
|
498
|
-
onClick: () => void
|
|
499
|
-
disabled:
|
|
500
|
-
children: [/* @__PURE__ */
|
|
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 {
|
|
510
|
+
export { j as default };
|
|
510
511
|
|
|
511
512
|
//# sourceMappingURL=ReleasesPage.js.map
|