@burdenoff/microfe-cosmicintersection 2026.1107.1 → 2026.1108.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/api/cosmicApi.d.ts +208 -1
- package/dist/cosmicintersection/api/cosmicApi.d.ts.map +1 -1
- package/dist/cosmicintersection/api/cosmicApi.js +291 -107
- package/dist/cosmicintersection/api/cosmicApi.js.map +1 -1
- package/dist/cosmicintersection/components/AiRunAttribution.d.ts +18 -0
- package/dist/cosmicintersection/components/AiRunAttribution.d.ts.map +1 -0
- package/dist/cosmicintersection/components/AiRunAttribution.js +39 -0
- package/dist/cosmicintersection/components/AiRunAttribution.js.map +1 -0
- package/dist/cosmicintersection/components/ReleaseDraftDialog.d.ts +15 -0
- package/dist/cosmicintersection/components/ReleaseDraftDialog.d.ts.map +1 -0
- package/dist/cosmicintersection/components/ReleaseDraftDialog.js +193 -0
- package/dist/cosmicintersection/components/ReleaseDraftDialog.js.map +1 -0
- package/dist/cosmicintersection/components/RunTriageCard.d.ts +15 -0
- package/dist/cosmicintersection/components/RunTriageCard.d.ts.map +1 -0
- package/dist/cosmicintersection/components/RunTriageCard.js +282 -0
- package/dist/cosmicintersection/components/RunTriageCard.js.map +1 -0
- package/dist/cosmicintersection/components/SchemaProposalPanel.d.ts +18 -0
- package/dist/cosmicintersection/components/SchemaProposalPanel.d.ts.map +1 -0
- package/dist/cosmicintersection/components/SchemaProposalPanel.js +277 -0
- package/dist/cosmicintersection/components/SchemaProposalPanel.js.map +1 -0
- package/dist/cosmicintersection/components/index.d.ts +4 -0
- package/dist/cosmicintersection/components/index.d.ts.map +1 -1
- package/dist/cosmicintersection/components/index.js +5 -1
- package/dist/cosmicintersection/pages/access/AccessPage.d.ts.map +1 -1
- package/dist/cosmicintersection/pages/access/AccessPage.js +348 -326
- package/dist/cosmicintersection/pages/access/AccessPage.js.map +1 -1
- package/dist/cosmicintersection/pages/datasets/DatasetDetailPage.d.ts.map +1 -1
- package/dist/cosmicintersection/pages/datasets/DatasetDetailPage.js +732 -543
- package/dist/cosmicintersection/pages/datasets/DatasetDetailPage.js.map +1 -1
- package/dist/cosmicintersection/pages/discovery/DiscoveryPage.d.ts.map +1 -1
- package/dist/cosmicintersection/pages/discovery/DiscoveryPage.js +268 -119
- package/dist/cosmicintersection/pages/discovery/DiscoveryPage.js.map +1 -1
- package/dist/cosmicintersection/pages/notebooks/NotebookDetailPage.d.ts.map +1 -1
- package/dist/cosmicintersection/pages/notebooks/NotebookDetailPage.js +322 -307
- package/dist/cosmicintersection/pages/notebooks/NotebookDetailPage.js.map +1 -1
- package/dist/cosmicintersection/pages/releases/ReleasesPage.d.ts.map +1 -1
- package/dist/cosmicintersection/pages/releases/ReleasesPage.js +5 -2
- package/dist/cosmicintersection/pages/releases/ReleasesPage.js.map +1 -1
- package/dist/cosmicintersection/pages/runs/RunDetailPage.d.ts.map +1 -1
- package/dist/cosmicintersection/pages/runs/RunDetailPage.js +190 -185
- package/dist/cosmicintersection/pages/runs/RunDetailPage.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
import { useCosmicIntersection as e } from "../../context/CosmicIntersectionContext.js";
|
|
2
|
-
import { useCosCollectionsQuery as t, useCosDatasetsQuery as n,
|
|
3
|
-
import { useTr as
|
|
4
|
-
import { EmptyState as
|
|
5
|
-
import { ErrorState as
|
|
6
|
-
import { LoadingState as
|
|
2
|
+
import { useCosCollectionsQuery as t, useCosDatasetsQuery as n, useCosSemanticSearchLazyQuery as r, useCosSourcesQuery as i } from "../../api/cosmicApi.js";
|
|
3
|
+
import { useTr as ee } from "../../../shared/hooks/useTr.js";
|
|
4
|
+
import { EmptyState as te } from "../../components/EmptyState.js";
|
|
5
|
+
import { ErrorState as a } from "../../components/ErrorState.js";
|
|
6
|
+
import { LoadingState as o } from "../../components/LoadingState.js";
|
|
7
7
|
import { cn as s } from "../../utils/cn.js";
|
|
8
|
-
import { PageLayout as
|
|
9
|
-
import { StatusBadge as
|
|
8
|
+
import { PageLayout as ne } from "../../components/PageLayout.js";
|
|
9
|
+
import { StatusBadge as c, formatEnumLabel as l } from "../../components/StatusBadge.js";
|
|
10
10
|
import "../../components/index.js";
|
|
11
|
-
import { FacetPanel as
|
|
12
|
-
import { useEffect as
|
|
11
|
+
import { FacetPanel as re } from "../../components/FacetPanel.js";
|
|
12
|
+
import { useEffect as u, useMemo as d, useState as f } from "react";
|
|
13
13
|
import { jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
14
|
-
import { ArrowUpDown as
|
|
15
|
-
import { Badge as
|
|
14
|
+
import { ArrowUpDown as ie, Database as ae, FileText as oe, Rows3 as se, Search as h, SlidersHorizontal as ce, Sparkles as g, Table as le, X as _ } from "lucide-react";
|
|
15
|
+
import { Badge as v, Button as y, Input as b, Select as ue, SelectContent as de, SelectItem as fe, SelectTrigger as pe, SelectValue as me } from "@burdenoff/fe-libs/ui";
|
|
16
16
|
//#region src/cosmicintersection/pages/discovery/DiscoveryPage.tsx
|
|
17
|
-
var
|
|
17
|
+
var x = 200, he = 300, ge = [
|
|
18
18
|
"PUBLIC",
|
|
19
19
|
"WORKSPACE",
|
|
20
20
|
"RESTRICTED",
|
|
21
21
|
"EMBARGOED"
|
|
22
|
-
],
|
|
22
|
+
], S = {
|
|
23
23
|
relevance: "Best match",
|
|
24
24
|
name: "Name A–Z",
|
|
25
25
|
updated: "Recently updated",
|
|
26
26
|
size: "Largest first"
|
|
27
27
|
};
|
|
28
|
-
function
|
|
28
|
+
function _e(e) {
|
|
29
29
|
if (!e) return "—";
|
|
30
30
|
let t = Number(e);
|
|
31
31
|
if (!Number.isFinite(t) || t <= 0) return "—";
|
|
@@ -40,60 +40,60 @@ function E(e) {
|
|
|
40
40
|
for (; r >= 1024 && i < n.length - 1;) r /= 1024, i += 1;
|
|
41
41
|
return `${r >= 10 || i === 0 ? Math.round(r) : r.toFixed(1)} ${n[i]}`;
|
|
42
42
|
}
|
|
43
|
-
function
|
|
43
|
+
function ve(e) {
|
|
44
44
|
let t = Number(e ?? 0);
|
|
45
45
|
return Number.isFinite(t) && t > 0 ? `${t.toLocaleString()} rows` : "no rows";
|
|
46
46
|
}
|
|
47
|
-
function
|
|
48
|
-
let { navigate:
|
|
49
|
-
|
|
50
|
-
let e = window.setTimeout(() =>
|
|
47
|
+
function C() {
|
|
48
|
+
let { navigate: C } = e(), w = ee(), [T, E] = f(""), [D, ye] = f(""), [O, k] = f({}), [A, j] = f("relevance"), [M, N] = f(!1), [P, F] = f(""), [I, L] = f(""), [be, R] = r();
|
|
49
|
+
u(() => {
|
|
50
|
+
let e = window.setTimeout(() => ye(T.trim()), he);
|
|
51
51
|
return () => window.clearTimeout(e);
|
|
52
|
-
}, [
|
|
53
|
-
let
|
|
54
|
-
q:
|
|
52
|
+
}, [T]);
|
|
53
|
+
let z = n({
|
|
54
|
+
q: D || void 0,
|
|
55
55
|
pagination: {
|
|
56
|
-
limit:
|
|
56
|
+
limit: x,
|
|
57
57
|
offset: 0
|
|
58
58
|
}
|
|
59
|
-
}),
|
|
60
|
-
limit:
|
|
59
|
+
}), B = i({ pagination: {
|
|
60
|
+
limit: x,
|
|
61
61
|
offset: 0
|
|
62
|
-
} }),
|
|
62
|
+
} }), V = t(), H = d(() => z.data?.cosListDatasets?.items ?? [], [z.data]), xe = !!z.data?.cosListDatasets?.pageInfo?.hasMore, U = d(() => B.data?.cosListSources?.items ?? [], [B.data]), W = d(() => V.data?.cosListCollections ?? [], [V.data]), G = d(() => {
|
|
63
63
|
let e = /* @__PURE__ */ new Map();
|
|
64
|
-
for (let t of
|
|
64
|
+
for (let t of U) e.set(t.id, t.type);
|
|
65
65
|
return e;
|
|
66
|
-
}, [
|
|
66
|
+
}, [U]), K = d(() => {
|
|
67
67
|
let e = /* @__PURE__ */ new Map();
|
|
68
|
-
for (let t of
|
|
68
|
+
for (let t of W) e.set(t.id, t.name);
|
|
69
69
|
return e;
|
|
70
|
-
}, [
|
|
71
|
-
let e =
|
|
70
|
+
}, [W]), q = d(() => {
|
|
71
|
+
let e = O.instrument ?? [], t = O.access ?? [], n = O.format ?? [], r = O.mission ?? [];
|
|
72
72
|
return {
|
|
73
73
|
instrument: (t) => {
|
|
74
74
|
if (e.length === 0) return !0;
|
|
75
|
-
let n = t.sourceId ?
|
|
75
|
+
let n = t.sourceId ? G.get(t.sourceId) : void 0;
|
|
76
76
|
return n ? e.includes(n) : !1;
|
|
77
77
|
},
|
|
78
78
|
access: (e) => t.length === 0 || t.includes(e.accessLevel),
|
|
79
79
|
format: (e) => n.length === 0 || (e.format ? n.includes(e.format) : !1),
|
|
80
80
|
mission: (e) => r.length === 0 || (e.collectionId ? r.includes(e.collectionId) : !1)
|
|
81
81
|
};
|
|
82
|
-
}, [
|
|
82
|
+
}, [O, G]), J = d(() => (e, t) => {
|
|
83
83
|
let n = 0;
|
|
84
|
-
for (let r of
|
|
84
|
+
for (let r of H) {
|
|
85
85
|
let i = !0;
|
|
86
|
-
for (let t of Object.keys(
|
|
86
|
+
for (let t of Object.keys(q)) if (t !== e && !q[t](r)) {
|
|
87
87
|
i = !1;
|
|
88
88
|
break;
|
|
89
89
|
}
|
|
90
90
|
i && t(r) && (n += 1);
|
|
91
91
|
}
|
|
92
92
|
return n;
|
|
93
|
-
}, [
|
|
93
|
+
}, [H, q]), Se = d(() => {
|
|
94
94
|
let e = /* @__PURE__ */ new Set(), t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set();
|
|
95
|
-
for (let r of
|
|
96
|
-
let i = r.sourceId ?
|
|
95
|
+
for (let r of H) {
|
|
96
|
+
let i = r.sourceId ? G.get(r.sourceId) : void 0;
|
|
97
97
|
i && e.add(i), r.format && t.add(r.format), r.collectionId && n.add(r.collectionId);
|
|
98
98
|
}
|
|
99
99
|
return [
|
|
@@ -102,17 +102,17 @@ function O() {
|
|
|
102
102
|
label: "Instrument",
|
|
103
103
|
options: [...e].map((e) => ({
|
|
104
104
|
value: e,
|
|
105
|
-
label:
|
|
106
|
-
count:
|
|
105
|
+
label: l(e),
|
|
106
|
+
count: J("instrument", (t) => t.sourceId ? G.get(t.sourceId) === e : !1)
|
|
107
107
|
})).sort((e, t) => t.count - e.count || e.label.localeCompare(t.label))
|
|
108
108
|
},
|
|
109
109
|
{
|
|
110
110
|
key: "access",
|
|
111
111
|
label: "Access",
|
|
112
|
-
options:
|
|
112
|
+
options: ge.map((e) => ({
|
|
113
113
|
value: e,
|
|
114
|
-
label:
|
|
115
|
-
count:
|
|
114
|
+
label: l(e),
|
|
115
|
+
count: J("access", (t) => t.accessLevel === e)
|
|
116
116
|
}))
|
|
117
117
|
},
|
|
118
118
|
{
|
|
@@ -121,7 +121,7 @@ function O() {
|
|
|
121
121
|
options: [...t].sort((e, t) => e.localeCompare(t)).map((e) => ({
|
|
122
122
|
value: e,
|
|
123
123
|
label: e,
|
|
124
|
-
count:
|
|
124
|
+
count: J("format", (t) => t.format === e)
|
|
125
125
|
}))
|
|
126
126
|
},
|
|
127
127
|
{
|
|
@@ -129,19 +129,19 @@ function O() {
|
|
|
129
129
|
label: "Mission / Survey",
|
|
130
130
|
options: [...n].map((e) => ({
|
|
131
131
|
value: e,
|
|
132
|
-
label:
|
|
133
|
-
count:
|
|
132
|
+
label: K.get(e) ?? "Unknown collection",
|
|
133
|
+
count: J("mission", (t) => t.collectionId === e)
|
|
134
134
|
})).sort((e, t) => t.count - e.count || e.label.localeCompare(t.label))
|
|
135
135
|
}
|
|
136
136
|
];
|
|
137
137
|
}, [
|
|
138
|
-
|
|
138
|
+
H,
|
|
139
|
+
G,
|
|
139
140
|
K,
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
switch (I) {
|
|
141
|
+
J
|
|
142
|
+
]), Y = d(() => {
|
|
143
|
+
let e = [...H.filter((e) => q.instrument(e) && q.access(e) && q.format(e) && q.mission(e))];
|
|
144
|
+
switch (A) {
|
|
145
145
|
case "name":
|
|
146
146
|
e.sort((e, t) => e.name.localeCompare(t.name));
|
|
147
147
|
break;
|
|
@@ -155,31 +155,47 @@ function O() {
|
|
|
155
155
|
}
|
|
156
156
|
return e;
|
|
157
157
|
}, [
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
]),
|
|
162
|
-
|
|
158
|
+
H,
|
|
159
|
+
q,
|
|
160
|
+
A
|
|
161
|
+
]), X = Object.values(O).reduce((e, t) => e + t.length, 0), Ce = (e, t) => {
|
|
162
|
+
k((n) => {
|
|
163
163
|
let r = n[e] ?? [], i = r.includes(t) ? r.filter((e) => e !== t) : [...r, t];
|
|
164
164
|
return {
|
|
165
165
|
...n,
|
|
166
166
|
[e]: i
|
|
167
167
|
};
|
|
168
168
|
});
|
|
169
|
-
},
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
169
|
+
}, Z = () => k({}), Q = () => {
|
|
170
|
+
let e = P.trim();
|
|
171
|
+
e && (L(e), be({ variables: { input: {
|
|
172
|
+
query: e,
|
|
173
|
+
limit: 20,
|
|
174
|
+
includeLineage: !0
|
|
175
|
+
} } }));
|
|
176
|
+
}, $ = () => {
|
|
177
|
+
F(""), L("");
|
|
178
|
+
}, we = (e) => {
|
|
179
|
+
switch (e.entityType) {
|
|
180
|
+
case "DATASET": return `datasets/${e.id}`;
|
|
181
|
+
case "COLLECTION": return `collections/${e.id}`;
|
|
182
|
+
case "NOTEBOOK": return `notebooks/${e.id}`;
|
|
183
|
+
default: return null;
|
|
184
|
+
}
|
|
185
|
+
}, Te = z.loading && H.length === 0, Ee = z.error, De = /* @__PURE__ */ p(re, {
|
|
186
|
+
groups: Se,
|
|
187
|
+
selected: O,
|
|
188
|
+
onToggle: Ce,
|
|
189
|
+
onClear: Z
|
|
174
190
|
});
|
|
175
|
-
return /* @__PURE__ */ p(
|
|
176
|
-
title:
|
|
177
|
-
description:
|
|
178
|
-
actions: /* @__PURE__ */ m(
|
|
191
|
+
return /* @__PURE__ */ p(ne, {
|
|
192
|
+
title: w("cosmicintersection.pages.discovery.title", "Discovery"),
|
|
193
|
+
description: w("cosmicintersection.pages.discovery.description", "Search and facet the federated science catalog — full-text across datasets, refined by instrument, access, format and mission."),
|
|
194
|
+
actions: /* @__PURE__ */ m(y, {
|
|
179
195
|
type: "button",
|
|
180
196
|
variant: "outline",
|
|
181
|
-
onClick: () =>
|
|
182
|
-
children: [/* @__PURE__ */ p(
|
|
197
|
+
onClick: () => C("datasets"),
|
|
198
|
+
children: [/* @__PURE__ */ p(le, { className: "size-4" }), w("cosmicintersection.pages.discovery.tableView", "Table view")]
|
|
183
199
|
}),
|
|
184
200
|
children: /* @__PURE__ */ m("div", {
|
|
185
201
|
className: "space-y-5",
|
|
@@ -187,44 +203,177 @@ function O() {
|
|
|
187
203
|
/* @__PURE__ */ m("div", {
|
|
188
204
|
className: "relative",
|
|
189
205
|
children: [
|
|
190
|
-
/* @__PURE__ */ p(
|
|
206
|
+
/* @__PURE__ */ p(h, {
|
|
191
207
|
className: "pointer-events-none absolute left-4 top-1/2 size-5 -translate-y-1/2 text-text-secondary",
|
|
192
208
|
"aria-hidden": "true"
|
|
193
209
|
}),
|
|
194
|
-
/* @__PURE__ */ p(
|
|
210
|
+
/* @__PURE__ */ p(b, {
|
|
195
211
|
type: "search",
|
|
196
|
-
value:
|
|
197
|
-
onChange: (e) =>
|
|
198
|
-
placeholder:
|
|
199
|
-
"aria-label":
|
|
212
|
+
value: T,
|
|
213
|
+
onChange: (e) => E(e.target.value),
|
|
214
|
+
placeholder: w("cosmicintersection.pages.discovery.searchPlaceholder", "Search datasets by name, description or tag…"),
|
|
215
|
+
"aria-label": w("cosmicintersection.pages.discovery.searchAriaLabel", "Search datasets"),
|
|
200
216
|
className: "h-12 rounded-card pl-12 pr-11 text-base"
|
|
201
217
|
}),
|
|
202
|
-
|
|
218
|
+
T ? /* @__PURE__ */ p("button", {
|
|
203
219
|
type: "button",
|
|
204
|
-
onClick: () =>
|
|
205
|
-
"aria-label":
|
|
220
|
+
onClick: () => E(""),
|
|
221
|
+
"aria-label": w("cosmicintersection.pages.discovery.clearSearch", "Clear search"),
|
|
206
222
|
className: "absolute right-3 top-1/2 flex size-7 -translate-y-1/2 items-center justify-center rounded-full text-text-secondary transition-colors hover:bg-bg-sunken hover:text-text-primary focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-border-focus",
|
|
207
|
-
children: /* @__PURE__ */ p(
|
|
223
|
+
children: /* @__PURE__ */ p(_, { className: "size-4" })
|
|
208
224
|
}) : null
|
|
209
225
|
]
|
|
210
226
|
}),
|
|
227
|
+
/* @__PURE__ */ m("div", {
|
|
228
|
+
className: "flex flex-col gap-2 sm:flex-row",
|
|
229
|
+
children: [
|
|
230
|
+
/* @__PURE__ */ m("div", {
|
|
231
|
+
className: "relative flex-1",
|
|
232
|
+
children: [/* @__PURE__ */ p(g, {
|
|
233
|
+
className: "pointer-events-none absolute left-3 top-1/2 size-4 -translate-y-1/2 text-text-secondary",
|
|
234
|
+
"aria-hidden": "true"
|
|
235
|
+
}), /* @__PURE__ */ p(b, {
|
|
236
|
+
type: "search",
|
|
237
|
+
value: P,
|
|
238
|
+
onChange: (e) => F(e.target.value),
|
|
239
|
+
onKeyDown: (e) => {
|
|
240
|
+
e.key === "Enter" && Q();
|
|
241
|
+
},
|
|
242
|
+
placeholder: w("cosmicintersection.pages.discovery.semanticPlaceholder", "Ask in plain language — e.g. calibrated flux columns covering M31 between 2019 and 2021"),
|
|
243
|
+
"aria-label": w("cosmicintersection.pages.discovery.semanticAriaLabel", "Semantic search the catalog"),
|
|
244
|
+
className: "rounded-card pl-9"
|
|
245
|
+
})]
|
|
246
|
+
}),
|
|
247
|
+
/* @__PURE__ */ m(y, {
|
|
248
|
+
type: "button",
|
|
249
|
+
variant: "outline",
|
|
250
|
+
onClick: Q,
|
|
251
|
+
disabled: R.loading,
|
|
252
|
+
children: [/* @__PURE__ */ p(g, { className: "size-4" }), R.loading ? w("cosmicintersection.pages.discovery.semanticSearching", "Searching…") : w("cosmicintersection.pages.discovery.semanticSearchAction", "Semantic search")]
|
|
253
|
+
}),
|
|
254
|
+
I ? /* @__PURE__ */ m(y, {
|
|
255
|
+
type: "button",
|
|
256
|
+
variant: "ghost",
|
|
257
|
+
onClick: $,
|
|
258
|
+
children: [/* @__PURE__ */ p(_, { className: "size-4" }), w("cosmicintersection.pages.discovery.clearSemantic", "Clear")]
|
|
259
|
+
}) : null
|
|
260
|
+
]
|
|
261
|
+
}),
|
|
262
|
+
R.error ? /* @__PURE__ */ p(a, {
|
|
263
|
+
message: w("cosmicintersection.pages.discovery.semanticError", "We could not run that semantic search. Please try again."),
|
|
264
|
+
onRetry: Q
|
|
265
|
+
}) : null,
|
|
266
|
+
R.data?.cosSemanticSearch && I ? /* @__PURE__ */ m("section", {
|
|
267
|
+
className: "space-y-3 rounded-card border border-border-default bg-bg-elevated p-4",
|
|
268
|
+
children: [
|
|
269
|
+
/* @__PURE__ */ m("div", {
|
|
270
|
+
className: "flex flex-wrap items-center justify-between gap-2",
|
|
271
|
+
children: [/* @__PURE__ */ p("h2", {
|
|
272
|
+
className: "text-sm font-semibold text-text-primary",
|
|
273
|
+
children: w("cosmicintersection.pages.discovery.semanticResultsTitle", "Semantic results for “{{query}}”", { query: I })
|
|
274
|
+
}), /* @__PURE__ */ m("span", {
|
|
275
|
+
className: "text-xs text-text-tertiary",
|
|
276
|
+
children: [
|
|
277
|
+
R.data.cosSemanticSearch.total,
|
|
278
|
+
" ",
|
|
279
|
+
w("cosmicintersection.pages.discovery.semanticHits", "hits"),
|
|
280
|
+
" ·",
|
|
281
|
+
" ",
|
|
282
|
+
w("cosmicintersection.pages.discovery.semanticInterpreted", "interpreted: {{terms}}", { terms: R.data.cosSemanticSearch.interpretedTerms.join(", ") })
|
|
283
|
+
]
|
|
284
|
+
})]
|
|
285
|
+
}),
|
|
286
|
+
R.data.cosSemanticSearch.expandedTerms.length > 0 ? /* @__PURE__ */ p("p", {
|
|
287
|
+
className: "text-xs text-text-tertiary",
|
|
288
|
+
children: w("cosmicintersection.pages.discovery.semanticExpanded", "Also searched: {{terms}}", { terms: R.data.cosSemanticSearch.expandedTerms.join(", ") })
|
|
289
|
+
}) : null,
|
|
290
|
+
R.data.cosSemanticSearch.hits.length === 0 ? /* @__PURE__ */ p("p", {
|
|
291
|
+
className: "text-sm text-text-secondary",
|
|
292
|
+
children: w("cosmicintersection.pages.discovery.semanticNoHits", "Nothing in the catalog matched that question. Embargoed datasets never appear without an active grant.")
|
|
293
|
+
}) : /* @__PURE__ */ p("ul", {
|
|
294
|
+
className: "space-y-2",
|
|
295
|
+
children: R.data.cosSemanticSearch.hits.map((e) => {
|
|
296
|
+
let t = we(e);
|
|
297
|
+
return /* @__PURE__ */ m("li", {
|
|
298
|
+
className: "rounded-card border border-border-default bg-bg-sunken p-3",
|
|
299
|
+
children: [
|
|
300
|
+
/* @__PURE__ */ m("div", {
|
|
301
|
+
className: "flex flex-wrap items-center gap-2",
|
|
302
|
+
children: [
|
|
303
|
+
/* @__PURE__ */ p(v, {
|
|
304
|
+
variant: "secondary",
|
|
305
|
+
className: "text-xs",
|
|
306
|
+
children: l(e.entityType)
|
|
307
|
+
}),
|
|
308
|
+
t ? /* @__PURE__ */ p("button", {
|
|
309
|
+
type: "button",
|
|
310
|
+
onClick: () => C(t),
|
|
311
|
+
className: "text-left text-sm font-medium text-text-link underline-offset-2 hover:underline focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-border-focus",
|
|
312
|
+
children: e.title
|
|
313
|
+
}) : /* @__PURE__ */ p("span", {
|
|
314
|
+
className: "text-sm font-medium text-text-primary",
|
|
315
|
+
children: e.title
|
|
316
|
+
}),
|
|
317
|
+
/* @__PURE__ */ p("span", {
|
|
318
|
+
className: "text-xs tabular-nums text-text-tertiary",
|
|
319
|
+
children: w("cosmicintersection.pages.discovery.semanticScore", "score {{score}}", { score: e.score.toFixed(2) })
|
|
320
|
+
})
|
|
321
|
+
]
|
|
322
|
+
}),
|
|
323
|
+
e.snippet ? /* @__PURE__ */ p("p", {
|
|
324
|
+
className: "mt-1 line-clamp-2 text-sm text-text-secondary",
|
|
325
|
+
children: e.snippet
|
|
326
|
+
}) : null,
|
|
327
|
+
e.evidence.length > 0 ? /* @__PURE__ */ p("ul", {
|
|
328
|
+
className: "mt-2 space-y-0.5",
|
|
329
|
+
children: e.evidence.slice(0, 3).map((e, t) => /* @__PURE__ */ m("li", {
|
|
330
|
+
className: "text-xs text-text-tertiary",
|
|
331
|
+
children: [
|
|
332
|
+
/* @__PURE__ */ m("span", {
|
|
333
|
+
className: "font-medium text-text-secondary",
|
|
334
|
+
children: [
|
|
335
|
+
l(e.kind),
|
|
336
|
+
e.label ? ` · ${e.label}` : "",
|
|
337
|
+
":"
|
|
338
|
+
]
|
|
339
|
+
}),
|
|
340
|
+
" ",
|
|
341
|
+
e.text
|
|
342
|
+
]
|
|
343
|
+
}, t))
|
|
344
|
+
}) : null,
|
|
345
|
+
e.lineage.length > 0 ? /* @__PURE__ */ m("p", {
|
|
346
|
+
className: "mt-1 text-xs text-text-tertiary",
|
|
347
|
+
children: [
|
|
348
|
+
w("cosmicintersection.pages.discovery.semanticLineage", "Lineage"),
|
|
349
|
+
":",
|
|
350
|
+
" ",
|
|
351
|
+
e.lineage.map((e) => e.label).join(" → ")
|
|
352
|
+
]
|
|
353
|
+
}) : null
|
|
354
|
+
]
|
|
355
|
+
}, `${e.entityType}-${e.id}`);
|
|
356
|
+
})
|
|
357
|
+
})
|
|
358
|
+
]
|
|
359
|
+
}) : null,
|
|
211
360
|
/* @__PURE__ */ p("div", {
|
|
212
361
|
className: "flex items-center justify-between gap-3 lg:hidden",
|
|
213
|
-
children: /* @__PURE__ */ m(
|
|
362
|
+
children: /* @__PURE__ */ m(y, {
|
|
214
363
|
type: "button",
|
|
215
364
|
variant: "outline",
|
|
216
|
-
onClick: () =>
|
|
217
|
-
"aria-expanded":
|
|
218
|
-
children: [/* @__PURE__ */ p(
|
|
365
|
+
onClick: () => N((e) => !e),
|
|
366
|
+
"aria-expanded": M,
|
|
367
|
+
children: [/* @__PURE__ */ p(ce, { className: "size-4" }), X > 0 ? w("cosmicintersection.pages.discovery.filtersWithCount", "Filters ({{count}})", { count: X }) : w("cosmicintersection.pages.discovery.filters", "Filters")]
|
|
219
368
|
})
|
|
220
369
|
}),
|
|
221
370
|
/* @__PURE__ */ m("div", {
|
|
222
371
|
className: "flex flex-col gap-6 lg:flex-row",
|
|
223
372
|
children: [/* @__PURE__ */ p("aside", {
|
|
224
|
-
className: s("shrink-0 lg:block lg:w-60 lg:border-r lg:border-border-seam lg:pr-6",
|
|
373
|
+
className: s("shrink-0 lg:block lg:w-60 lg:border-r lg:border-border-seam lg:pr-6", M ? "block" : "hidden"),
|
|
225
374
|
children: /* @__PURE__ */ p("div", {
|
|
226
375
|
className: "lg:sticky lg:top-0",
|
|
227
|
-
children:
|
|
376
|
+
children: De
|
|
228
377
|
})
|
|
229
378
|
}), /* @__PURE__ */ m("div", {
|
|
230
379
|
className: "min-w-0 flex-1 space-y-4",
|
|
@@ -235,56 +384,56 @@ function O() {
|
|
|
235
384
|
className: "flex items-baseline gap-2",
|
|
236
385
|
children: [/* @__PURE__ */ p("span", {
|
|
237
386
|
className: "text-lg font-semibold tabular-nums text-text-primary",
|
|
238
|
-
children:
|
|
387
|
+
children: Y.length
|
|
239
388
|
}), /* @__PURE__ */ m("span", {
|
|
240
389
|
className: "text-sm text-text-secondary",
|
|
241
|
-
children: [
|
|
390
|
+
children: [Y.length === 1 ? w("cosmicintersection.pages.discovery.resultCountSingular", "dataset") : w("cosmicintersection.pages.discovery.resultCountPlural", "datasets"), D ? ` ${w("cosmicintersection.pages.discovery.matching", "matching “{{q}}”", { q: D })}` : ""]
|
|
242
391
|
})]
|
|
243
392
|
}), /* @__PURE__ */ m("label", {
|
|
244
393
|
className: "flex items-center gap-2 text-sm",
|
|
245
|
-
children: [/* @__PURE__ */ p(
|
|
394
|
+
children: [/* @__PURE__ */ p(ie, {
|
|
246
395
|
className: "size-4 text-text-secondary",
|
|
247
396
|
"aria-hidden": "true"
|
|
248
|
-
}), /* @__PURE__ */ m(
|
|
249
|
-
value:
|
|
250
|
-
onValueChange: (e) =>
|
|
251
|
-
children: [/* @__PURE__ */ p(
|
|
252
|
-
"aria-label":
|
|
397
|
+
}), /* @__PURE__ */ m(ue, {
|
|
398
|
+
value: A,
|
|
399
|
+
onValueChange: (e) => j(e),
|
|
400
|
+
children: [/* @__PURE__ */ p(pe, {
|
|
401
|
+
"aria-label": w("cosmicintersection.pages.discovery.sortResults", "Sort results"),
|
|
253
402
|
className: "w-48",
|
|
254
|
-
children: /* @__PURE__ */ p(
|
|
255
|
-
}), /* @__PURE__ */ p(
|
|
403
|
+
children: /* @__PURE__ */ p(me, {})
|
|
404
|
+
}), /* @__PURE__ */ p(de, { children: Object.keys(S).map((e) => /* @__PURE__ */ p(fe, {
|
|
256
405
|
value: e,
|
|
257
|
-
children:
|
|
406
|
+
children: S[e]
|
|
258
407
|
}, e)) })]
|
|
259
408
|
})]
|
|
260
409
|
})]
|
|
261
410
|
}),
|
|
262
|
-
|
|
411
|
+
xe ? /* @__PURE__ */ p("p", {
|
|
263
412
|
className: "rounded-card border border-border-default bg-bg-sunken px-3 py-2 text-xs text-text-secondary",
|
|
264
|
-
children:
|
|
413
|
+
children: w("cosmicintersection.pages.discovery.poolLimitNotice", "Showing facets and results for the first {{limit}} matches. Refine your search to narrow the set.", { limit: x })
|
|
265
414
|
}) : null,
|
|
266
|
-
|
|
415
|
+
Te ? /* @__PURE__ */ p(o, {
|
|
267
416
|
variant: "rows",
|
|
268
417
|
rows: 6,
|
|
269
|
-
label:
|
|
270
|
-
}) :
|
|
271
|
-
message:
|
|
272
|
-
onRetry: () => void
|
|
273
|
-
}) :
|
|
274
|
-
icon:
|
|
275
|
-
title:
|
|
276
|
-
description:
|
|
277
|
-
action:
|
|
418
|
+
label: w("cosmicintersection.pages.discovery.loading", "Searching the catalog…")
|
|
419
|
+
}) : Ee ? /* @__PURE__ */ p(a, {
|
|
420
|
+
message: w("cosmicintersection.pages.discovery.error", "We could not run that search. Please try again."),
|
|
421
|
+
onRetry: () => void z.refetch()
|
|
422
|
+
}) : Y.length === 0 ? /* @__PURE__ */ p(te, {
|
|
423
|
+
icon: h,
|
|
424
|
+
title: D || X > 0 ? w("cosmicintersection.pages.discovery.noDatasetsMatch", "No datasets match") : w("cosmicintersection.pages.discovery.startExploring", "Start exploring"),
|
|
425
|
+
description: D || X > 0 ? w("cosmicintersection.pages.discovery.noDatasetsMatchDescription", "Try a broader search term or clear some facets.") : w("cosmicintersection.pages.discovery.startExploringDescription", "Search by name, description or tag, or pick a facet to browse the catalog."),
|
|
426
|
+
action: X > 0 ? /* @__PURE__ */ p(y, {
|
|
278
427
|
type: "button",
|
|
279
428
|
variant: "outline",
|
|
280
|
-
onClick:
|
|
281
|
-
children:
|
|
429
|
+
onClick: Z,
|
|
430
|
+
children: w("cosmicintersection.pages.discovery.clearFilters", "Clear filters")
|
|
282
431
|
}) : void 0
|
|
283
432
|
}) : /* @__PURE__ */ p("div", {
|
|
284
433
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-2 xl:grid-cols-3",
|
|
285
|
-
children:
|
|
434
|
+
children: Y.map((e) => /* @__PURE__ */ m("button", {
|
|
286
435
|
type: "button",
|
|
287
|
-
onClick: () =>
|
|
436
|
+
onClick: () => C(`datasets/${e.id}`),
|
|
288
437
|
className: "group flex flex-col overflow-hidden rounded-card border border-border-default bg-bg-elevated text-left outline-none transition-colors hover:border-border-strong hover:bg-bg-sunken focus-visible:ring-2 focus-visible:ring-border-focus",
|
|
289
438
|
children: [/* @__PURE__ */ p("div", { className: "h-1 w-full bg-gradient-to-r from-accent-blue via-accent-purple to-accent-teal" }), /* @__PURE__ */ m("div", {
|
|
290
439
|
className: "flex flex-1 flex-col gap-3 p-4",
|
|
@@ -298,34 +447,34 @@ function O() {
|
|
|
298
447
|
children: [
|
|
299
448
|
/* @__PURE__ */ m("span", {
|
|
300
449
|
className: "inline-flex items-center gap-1",
|
|
301
|
-
children: [/* @__PURE__ */ p(
|
|
450
|
+
children: [/* @__PURE__ */ p(oe, {
|
|
302
451
|
className: "size-3.5",
|
|
303
452
|
"aria-hidden": "true"
|
|
304
453
|
}), e.format || "No format"]
|
|
305
454
|
}),
|
|
306
455
|
/* @__PURE__ */ m("span", {
|
|
307
456
|
className: "inline-flex items-center gap-1",
|
|
308
|
-
children: [/* @__PURE__ */ p(
|
|
457
|
+
children: [/* @__PURE__ */ p(ae, {
|
|
309
458
|
className: "size-3.5",
|
|
310
459
|
"aria-hidden": "true"
|
|
311
|
-
}),
|
|
460
|
+
}), _e(e.sizeBytes)]
|
|
312
461
|
}),
|
|
313
462
|
/* @__PURE__ */ m("span", {
|
|
314
463
|
className: "inline-flex items-center gap-1",
|
|
315
|
-
children: [/* @__PURE__ */ p(
|
|
464
|
+
children: [/* @__PURE__ */ p(se, {
|
|
316
465
|
className: "size-3.5",
|
|
317
466
|
"aria-hidden": "true"
|
|
318
|
-
}),
|
|
467
|
+
}), ve(e.rowCount)]
|
|
319
468
|
})
|
|
320
469
|
]
|
|
321
470
|
}),
|
|
322
471
|
/* @__PURE__ */ m("div", {
|
|
323
472
|
className: "flex flex-wrap items-center gap-1.5",
|
|
324
|
-
children: [/* @__PURE__ */ p(
|
|
473
|
+
children: [/* @__PURE__ */ p(c, { status: e.status }), /* @__PURE__ */ p(c, { status: e.accessLevel })]
|
|
325
474
|
}),
|
|
326
475
|
e.tags.length > 0 ? /* @__PURE__ */ m("div", {
|
|
327
476
|
className: "mt-auto flex flex-wrap gap-1 pt-1",
|
|
328
|
-
children: [e.tags.slice(0, 3).map((e) => /* @__PURE__ */ p(
|
|
477
|
+
children: [e.tags.slice(0, 3).map((e) => /* @__PURE__ */ p(v, {
|
|
329
478
|
variant: "secondary",
|
|
330
479
|
className: "text-xs",
|
|
331
480
|
children: e
|
|
@@ -346,6 +495,6 @@ function O() {
|
|
|
346
495
|
});
|
|
347
496
|
}
|
|
348
497
|
//#endregion
|
|
349
|
-
export {
|
|
498
|
+
export { C as default };
|
|
350
499
|
|
|
351
500
|
//# sourceMappingURL=DiscoveryPage.js.map
|