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