@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.
Files changed (42) hide show
  1. package/dist/cosmicintersection/api/cosmicApi.d.ts +208 -1
  2. package/dist/cosmicintersection/api/cosmicApi.d.ts.map +1 -1
  3. package/dist/cosmicintersection/api/cosmicApi.js +291 -107
  4. package/dist/cosmicintersection/api/cosmicApi.js.map +1 -1
  5. package/dist/cosmicintersection/components/AiRunAttribution.d.ts +18 -0
  6. package/dist/cosmicintersection/components/AiRunAttribution.d.ts.map +1 -0
  7. package/dist/cosmicintersection/components/AiRunAttribution.js +39 -0
  8. package/dist/cosmicintersection/components/AiRunAttribution.js.map +1 -0
  9. package/dist/cosmicintersection/components/ReleaseDraftDialog.d.ts +15 -0
  10. package/dist/cosmicintersection/components/ReleaseDraftDialog.d.ts.map +1 -0
  11. package/dist/cosmicintersection/components/ReleaseDraftDialog.js +193 -0
  12. package/dist/cosmicintersection/components/ReleaseDraftDialog.js.map +1 -0
  13. package/dist/cosmicintersection/components/RunTriageCard.d.ts +15 -0
  14. package/dist/cosmicintersection/components/RunTriageCard.d.ts.map +1 -0
  15. package/dist/cosmicintersection/components/RunTriageCard.js +282 -0
  16. package/dist/cosmicintersection/components/RunTriageCard.js.map +1 -0
  17. package/dist/cosmicintersection/components/SchemaProposalPanel.d.ts +18 -0
  18. package/dist/cosmicintersection/components/SchemaProposalPanel.d.ts.map +1 -0
  19. package/dist/cosmicintersection/components/SchemaProposalPanel.js +277 -0
  20. package/dist/cosmicintersection/components/SchemaProposalPanel.js.map +1 -0
  21. package/dist/cosmicintersection/components/index.d.ts +4 -0
  22. package/dist/cosmicintersection/components/index.d.ts.map +1 -1
  23. package/dist/cosmicintersection/components/index.js +5 -1
  24. package/dist/cosmicintersection/pages/access/AccessPage.d.ts.map +1 -1
  25. package/dist/cosmicintersection/pages/access/AccessPage.js +348 -326
  26. package/dist/cosmicintersection/pages/access/AccessPage.js.map +1 -1
  27. package/dist/cosmicintersection/pages/datasets/DatasetDetailPage.d.ts.map +1 -1
  28. package/dist/cosmicintersection/pages/datasets/DatasetDetailPage.js +732 -543
  29. package/dist/cosmicintersection/pages/datasets/DatasetDetailPage.js.map +1 -1
  30. package/dist/cosmicintersection/pages/discovery/DiscoveryPage.d.ts.map +1 -1
  31. package/dist/cosmicintersection/pages/discovery/DiscoveryPage.js +268 -119
  32. package/dist/cosmicintersection/pages/discovery/DiscoveryPage.js.map +1 -1
  33. package/dist/cosmicintersection/pages/notebooks/NotebookDetailPage.d.ts.map +1 -1
  34. package/dist/cosmicintersection/pages/notebooks/NotebookDetailPage.js +322 -307
  35. package/dist/cosmicintersection/pages/notebooks/NotebookDetailPage.js.map +1 -1
  36. package/dist/cosmicintersection/pages/releases/ReleasesPage.d.ts.map +1 -1
  37. package/dist/cosmicintersection/pages/releases/ReleasesPage.js +5 -2
  38. package/dist/cosmicintersection/pages/releases/ReleasesPage.js.map +1 -1
  39. package/dist/cosmicintersection/pages/runs/RunDetailPage.d.ts.map +1 -1
  40. package/dist/cosmicintersection/pages/runs/RunDetailPage.js +190 -185
  41. package/dist/cosmicintersection/pages/runs/RunDetailPage.js.map +1 -1
  42. package/package.json +1 -1
@@ -13,18 +13,18 @@ import { useSelectedRecord as a } from "../../lib/useSelectedRecord.js";
13
13
  import { useMemo as o, useState as s } from "react";
14
14
  import { Fragment as le, jsx as c, jsxs as l } from "react/jsx-runtime";
15
15
  import { KeyRound as u, ShieldCheck as ue } from "lucide-react";
16
- import { Badge as d, Button as f, Dialog as de, DialogContent as fe, DialogDescription as p, DialogFooter as m, DialogHeader as h, DialogTitle as pe, Input as g, Label as _, Select as v, SelectContent as y, SelectItem as b, SelectTrigger as x, SelectValue as S, Table as me, TableBody as he, TableCell as C, TableHead as w, TableHeader as ge, TableRow as T, Textarea as _e } from "@burdenoff/fe-libs/ui";
16
+ import { Badge as d, Button as f, Dialog as p, DialogContent as de, DialogDescription as m, DialogFooter as h, DialogHeader as g, DialogTitle as _, Input as v, Label as y, Select as b, SelectContent as x, SelectItem as S, SelectTrigger as C, SelectValue as w, Table as fe, TableBody as pe, TableCell as T, TableHead as E, TableHeader as me, TableRow as D, Textarea as he } from "@burdenoff/fe-libs/ui";
17
17
  //#region src/cosmicintersection/pages/access/AccessPage.tsx
18
- var E = "ALL", ve = [
18
+ var O = "ALL", ge = [
19
19
  "PENDING",
20
20
  "ACTIVE",
21
21
  "EXPIRED",
22
22
  "REVOKED"
23
23
  ];
24
- function D(e) {
24
+ function k(e) {
25
25
  return e === "ACTIVE" || e === "PENDING";
26
26
  }
27
- function O(e) {
27
+ function A(e) {
28
28
  if (!e) return "—";
29
29
  let t = new Date(e);
30
30
  return Number.isNaN(t.getTime()) ? "—" : t.toLocaleDateString(void 0, {
@@ -33,48 +33,48 @@ function O(e) {
33
33
  day: "numeric"
34
34
  });
35
35
  }
36
- var k = {
36
+ var j = {
37
37
  datasetId: "",
38
38
  granteeId: "",
39
39
  scopes: [],
40
40
  reason: "",
41
41
  expiresAt: ""
42
42
  };
43
- function A() {
44
- let A = ne(), { selectedId: j, select: M } = a("datasetId"), N = j ?? E, P = (e) => M(e === E ? null : e), { selectedId: F, select: ye } = a("id"), I = (e) => ye(F === e.id ? null : e.id), [L, be] = s(E), R = n({ pagination: {
43
+ function M() {
44
+ let M = ne(), { selectedId: _e, select: ve } = a("datasetId"), N = _e ?? O, ye = (e) => ve(e === O ? null : e), { selectedId: P, select: be } = a("id"), F = (e) => be(P === e.id ? null : e.id), [I, xe] = s(O), L = n({ pagination: {
45
45
  limit: 50,
46
46
  offset: 0
47
- } }), z = o(() => R.data?.cosListDatasets.items ?? [], [R.data]), B = o(() => {
47
+ } }), R = o(() => L.data?.cosListDatasets.items ?? [], [L.data]), z = o(() => {
48
48
  let e = /* @__PURE__ */ new Map();
49
- for (let t of z) e.set(t.id, t.name);
49
+ for (let t of R) e.set(t.id, t.name);
50
50
  return e;
51
- }, [z]), { data: V, loading: xe, error: H, refetch: U } = t({
52
- datasetId: N === E ? void 0 : N,
53
- status: L === E ? void 0 : L
54
- }), W = o(() => V?.cosListAccessGrants ?? [], [V]), [Se, { loading: G }] = ee(), [Ce] = te(), [we, K] = s(!1), [q, J] = s(k), Y = () => {
51
+ }, [R]), { data: B, loading: Se, error: V, refetch: H } = t({
52
+ datasetId: N === O ? void 0 : N,
53
+ status: I === O ? void 0 : I
54
+ }), U = o(() => B?.cosListAccessGrants ?? [], [B]), [Ce, { loading: W }] = ee(), [we, { loading: G }] = te(), [Te, K] = s(!1), [q, J] = s(j), [Y, X] = s(null), Ee = () => {
55
55
  J({
56
- ...k,
57
- datasetId: N === E ? "" : N
56
+ ...j,
57
+ datasetId: N === O ? "" : N
58
58
  }), K(!0);
59
- }, X = (e, t) => {
59
+ }, Z = (e, t) => {
60
60
  J((n) => ({
61
61
  ...n,
62
62
  [e]: t
63
63
  }));
64
- }, Te = async () => {
64
+ }, De = async () => {
65
65
  if (!q.datasetId) {
66
- e.error(A("cosmicintersection.pages.access.datasetRequired", "Dataset is required"), A("cosmicintersection.pages.access.datasetRequiredDescription", "Choose which dataset this grant applies to."));
66
+ e.error(M("cosmicintersection.pages.access.datasetRequired", "Dataset is required"), M("cosmicintersection.pages.access.datasetRequiredDescription", "Choose which dataset this grant applies to."));
67
67
  return;
68
68
  }
69
69
  if (!q.granteeId.trim()) {
70
- e.error(A("cosmicintersection.pages.access.granteeRequired", "Grantee is required"), A("cosmicintersection.pages.access.granteeRequiredDescription", "Enter the workspace User ID to grant access to."));
70
+ e.error(M("cosmicintersection.pages.access.granteeRequired", "Grantee is required"), M("cosmicintersection.pages.access.granteeRequiredDescription", "Enter the workspace User ID to grant access to."));
71
71
  return;
72
72
  }
73
73
  let t;
74
74
  if (q.expiresAt) {
75
75
  let n = new Date(q.expiresAt);
76
76
  if (Number.isNaN(n.getTime())) {
77
- e.error(A("cosmicintersection.pages.access.invalidExpiry", "Invalid expiry"), A("cosmicintersection.pages.access.invalidExpiryDescription", "Enter a valid expiry date or leave it blank."));
77
+ e.error(M("cosmicintersection.pages.access.invalidExpiry", "Invalid expiry"), M("cosmicintersection.pages.access.invalidExpiryDescription", "Enter a valid expiry date or leave it blank."));
78
78
  return;
79
79
  }
80
80
  t = n.toISOString();
@@ -86,329 +86,351 @@ function A() {
86
86
  reason: q.reason.trim() || void 0,
87
87
  expiresAt: t
88
88
  };
89
- (await Se({ variables: { input: n } })).data?.cosGrantAccess?.id && (e.success(A("cosmicintersection.pages.access.accessGranted", "Access granted")), K(!1), J(k), await U());
90
- }, Z = async (t) => {
91
- let n = await Ce({ variables: { id: t.id } });
89
+ (await Ce({ variables: { input: n } })).data?.cosGrantAccess?.id && (e.success(M("cosmicintersection.pages.access.accessGranted", "Access granted")), K(!1), J(j), await H());
90
+ }, Oe = async (t) => {
91
+ let n = await we({ variables: { id: t.id } });
92
92
  if (n.error) throw Error(n.error.message);
93
- if (!n.data?.cosRevokeAccess?.id) throw e.error(A("cosmicintersection.pages.access.revokeError", "Could not revoke grant"), A("cosmicintersection.pages.access.revokeErrorDescription", "The server did not confirm the change.")), Error("Revoke not confirmed");
94
- e.success(A("cosmicintersection.pages.access.accessRevoked", "Access revoked")), await U();
95
- }, Q = /* @__PURE__ */ l(f, {
93
+ if (!n.data?.cosRevokeAccess?.id) throw e.error(M("cosmicintersection.pages.access.revokeError", "Could not revoke grant"), M("cosmicintersection.pages.access.revokeErrorDescription", "The server did not confirm the change.")), Error("Revoke not confirmed");
94
+ e.success(M("cosmicintersection.pages.access.accessRevoked", "Access revoked")), X(null), await H();
95
+ }, Q = (e) => {
96
+ X(e);
97
+ }, ke = /* @__PURE__ */ l(f, {
96
98
  type: "button",
97
- onClick: Y,
98
- children: [/* @__PURE__ */ c(u, { className: "size-4" }), A("cosmicintersection.pages.access.grantAccess", "Grant access")]
99
- }), $ = N === E;
99
+ onClick: Ee,
100
+ children: [/* @__PURE__ */ c(u, { className: "size-4" }), M("cosmicintersection.pages.access.grantAccess", "Grant access")]
101
+ }), $ = N === O;
100
102
  return /* @__PURE__ */ l(se, {
101
- title: A("cosmicintersection.pages.access.title", "Data access"),
102
- description: A("cosmicintersection.pages.access.description", "Govern who can reach restricted and embargoed datasets, with scoped, expiring grants."),
103
- actions: Q,
104
- children: [/* @__PURE__ */ l("div", {
105
- className: "space-y-4",
106
- children: [/* @__PURE__ */ l("div", {
107
- className: "flex flex-wrap items-center gap-3",
108
- children: [/* @__PURE__ */ c("div", {
109
- className: "w-full max-w-[18rem]",
110
- children: /* @__PURE__ */ l(v, {
111
- value: N,
112
- onValueChange: P,
113
- children: [/* @__PURE__ */ c(x, {
114
- "aria-label": "Filter by dataset",
115
- children: /* @__PURE__ */ c(S, { placeholder: "All datasets" })
116
- }), /* @__PURE__ */ l(y, { children: [/* @__PURE__ */ c(b, {
117
- value: E,
118
- children: "All datasets"
119
- }), z.map((e) => /* @__PURE__ */ c(b, {
120
- value: e.id,
121
- children: e.name
122
- }, e.id))] })]
123
- })
124
- }), /* @__PURE__ */ c("div", {
125
- className: "w-full max-w-[14rem]",
126
- children: /* @__PURE__ */ l(v, {
127
- value: L,
128
- onValueChange: be,
129
- children: [/* @__PURE__ */ c(x, {
130
- "aria-label": "Filter by status",
131
- children: /* @__PURE__ */ c(S, { placeholder: "All statuses" })
132
- }), /* @__PURE__ */ l(y, { children: [/* @__PURE__ */ c(b, {
133
- value: E,
134
- children: "All statuses"
135
- }), ve.map((e) => /* @__PURE__ */ c(b, {
136
- value: e,
137
- children: ce(e)
138
- }, e))] })]
139
- })
140
- })]
141
- }), (() => {
142
- if (xe) return /* @__PURE__ */ c(ae, {
143
- variant: "rows",
144
- rows: 6,
145
- label: A("cosmicintersection.pages.access.loading", "Loading access grants…")
146
- });
147
- if (H) return /* @__PURE__ */ c(ie, {
148
- message: H.message,
149
- onRetry: () => void U()
150
- });
151
- if (W.length === 0) {
152
- let e = N !== E || L !== E;
153
- return /* @__PURE__ */ c(re, {
154
- icon: ue,
155
- title: e ? A("cosmicintersection.pages.access.emptyFilterTitle", "No grants match these filters") : A("cosmicintersection.pages.access.emptyTitle", "No access grants yet"),
156
- description: e ? A("cosmicintersection.pages.access.emptyFilterDescription", "Try clearing the dataset or status filter to see more grants.") : A("cosmicintersection.pages.access.emptyDescription", "Grant a workspace member scoped access to a restricted or embargoed dataset."),
157
- action: e ? void 0 : Q
158
- });
159
- }
160
- return /* @__PURE__ */ l(le, { children: [/* @__PURE__ */ c("div", {
161
- className: "hidden rounded-card border border-border-default bg-bg-elevated md:block",
162
- children: /* @__PURE__ */ l(me, { children: [/* @__PURE__ */ c(ge, { children: /* @__PURE__ */ l(T, { children: [
163
- $ ? /* @__PURE__ */ c(w, { children: "Dataset" }) : null,
164
- /* @__PURE__ */ c(w, { children: "Grantee" }),
165
- /* @__PURE__ */ c(w, { children: "Status" }),
166
- /* @__PURE__ */ c(w, { children: "Scopes" }),
167
- /* @__PURE__ */ c(w, { children: "Reason" }),
168
- /* @__PURE__ */ c(w, { children: "Granted" }),
169
- /* @__PURE__ */ c(w, { children: "Expires" }),
170
- /* @__PURE__ */ c(w, { children: "Revoked" }),
171
- /* @__PURE__ */ c(w, {
172
- className: "text-right",
173
- children: "Actions"
103
+ title: M("cosmicintersection.pages.access.title", "Data access"),
104
+ description: M("cosmicintersection.pages.access.description", "Govern who can reach restricted and embargoed datasets, with scoped, expiring grants."),
105
+ actions: ke,
106
+ children: [
107
+ /* @__PURE__ */ l("div", {
108
+ className: "space-y-4",
109
+ children: [/* @__PURE__ */ l("div", {
110
+ className: "flex flex-wrap items-center gap-3",
111
+ children: [/* @__PURE__ */ c("div", {
112
+ className: "w-full max-w-[18rem]",
113
+ children: /* @__PURE__ */ l(b, {
114
+ value: N,
115
+ onValueChange: ye,
116
+ children: [/* @__PURE__ */ c(C, {
117
+ "aria-label": "Filter by dataset",
118
+ children: /* @__PURE__ */ c(w, { placeholder: "All datasets" })
119
+ }), /* @__PURE__ */ l(x, { children: [/* @__PURE__ */ c(S, {
120
+ value: O,
121
+ children: "All datasets"
122
+ }), R.map((e) => /* @__PURE__ */ c(S, {
123
+ value: e.id,
124
+ children: e.name
125
+ }, e.id))] })]
174
126
  })
175
- ] }) }), /* @__PURE__ */ c(he, { children: W.map((e) => /* @__PURE__ */ l(T, {
176
- "aria-selected": F === e.id,
177
- "data-state": F === e.id ? "selected" : void 0,
178
- className: F === e.id ? "bg-bg-sunken" : void 0,
179
- children: [
180
- $ ? /* @__PURE__ */ c(C, {
181
- className: "max-w-[12rem]",
182
- children: /* @__PURE__ */ c("span", {
183
- className: "line-clamp-1 text-sm text-text-primary",
184
- children: B.get(e.datasetId) ?? /* @__PURE__ */ c("span", {
185
- className: "font-mono text-xs text-text-secondary",
186
- children: e.datasetId
187
- })
188
- })
189
- }) : null,
190
- /* @__PURE__ */ c(C, {
191
- className: "max-w-[12rem]",
192
- children: /* @__PURE__ */ c("button", {
193
- type: "button",
194
- onClick: () => I(e),
195
- "aria-pressed": F === e.id,
196
- className: "block max-w-full truncate text-left font-mono text-xs text-text-primary underline-offset-2 hover:underline focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-border-focus",
197
- children: e.granteeId
198
- })
199
- }),
200
- /* @__PURE__ */ c(C, { children: /* @__PURE__ */ c(i, { status: e.status }) }),
201
- /* @__PURE__ */ c(C, { children: /* @__PURE__ */ c("div", {
202
- className: "flex max-w-[12rem] flex-wrap gap-1",
203
- children: e.scopes.length === 0 ? /* @__PURE__ */ c("span", {
204
- className: "text-xs text-text-secondary",
205
- children: "—"
206
- }) : e.scopes.map((e) => /* @__PURE__ */ c(d, {
207
- variant: "outline",
208
- className: "text-xs",
209
- children: e
210
- }, e))
211
- }) }),
212
- /* @__PURE__ */ c(C, {
213
- className: "max-w-[14rem]",
214
- children: e.reason ? /* @__PURE__ */ c("span", {
215
- className: "line-clamp-1 text-sm text-text-secondary",
216
- children: e.reason
217
- }) : /* @__PURE__ */ c("span", {
218
- className: "text-sm text-text-secondary",
219
- children: "—"
220
- })
221
- }),
222
- /* @__PURE__ */ c(C, {
223
- className: "whitespace-nowrap text-sm text-text-secondary",
224
- children: O(e.grantedAt)
225
- }),
226
- /* @__PURE__ */ c(C, {
227
- className: "whitespace-nowrap text-sm text-text-secondary",
228
- children: O(e.expiresAt)
229
- }),
230
- /* @__PURE__ */ c(C, {
231
- className: "whitespace-nowrap text-sm text-text-secondary",
232
- children: O(e.revokedAt)
233
- }),
234
- /* @__PURE__ */ c(C, {
127
+ }), /* @__PURE__ */ c("div", {
128
+ className: "w-full max-w-[14rem]",
129
+ children: /* @__PURE__ */ l(b, {
130
+ value: I,
131
+ onValueChange: xe,
132
+ children: [/* @__PURE__ */ c(C, {
133
+ "aria-label": "Filter by status",
134
+ children: /* @__PURE__ */ c(w, { placeholder: "All statuses" })
135
+ }), /* @__PURE__ */ l(x, { children: [/* @__PURE__ */ c(S, {
136
+ value: O,
137
+ children: "All statuses"
138
+ }), ge.map((e) => /* @__PURE__ */ c(S, {
139
+ value: e,
140
+ children: ce(e)
141
+ }, e))] })]
142
+ })
143
+ })]
144
+ }), (() => {
145
+ if (Se) return /* @__PURE__ */ c(ae, {
146
+ variant: "rows",
147
+ rows: 6,
148
+ label: M("cosmicintersection.pages.access.loading", "Loading access grants…")
149
+ });
150
+ if (V) return /* @__PURE__ */ c(ie, {
151
+ message: V.message,
152
+ onRetry: () => void H()
153
+ });
154
+ if (U.length === 0) {
155
+ let e = N !== O || I !== O;
156
+ return /* @__PURE__ */ c(re, {
157
+ icon: ue,
158
+ title: e ? M("cosmicintersection.pages.access.emptyFilterTitle", "No grants match these filters") : M("cosmicintersection.pages.access.emptyTitle", "No access grants yet"),
159
+ description: e ? M("cosmicintersection.pages.access.emptyFilterDescription", "Try clearing the dataset or status filter to see more grants.") : M("cosmicintersection.pages.access.emptyDescription", "Grant a workspace member scoped access to a restricted or embargoed dataset."),
160
+ action: e ? void 0 : ke
161
+ });
162
+ }
163
+ return /* @__PURE__ */ l(le, { children: [/* @__PURE__ */ c("div", {
164
+ className: "hidden rounded-card border border-border-default bg-bg-elevated md:block",
165
+ children: /* @__PURE__ */ l(fe, { children: [/* @__PURE__ */ c(me, { children: /* @__PURE__ */ l(D, { children: [
166
+ $ ? /* @__PURE__ */ c(E, { children: "Dataset" }) : null,
167
+ /* @__PURE__ */ c(E, { children: "Grantee" }),
168
+ /* @__PURE__ */ c(E, { children: "Status" }),
169
+ /* @__PURE__ */ c(E, { children: "Scopes" }),
170
+ /* @__PURE__ */ c(E, { children: "Reason" }),
171
+ /* @__PURE__ */ c(E, { children: "Granted" }),
172
+ /* @__PURE__ */ c(E, { children: "Expires" }),
173
+ /* @__PURE__ */ c(E, { children: "Revoked" }),
174
+ /* @__PURE__ */ c(E, {
235
175
  className: "text-right",
236
- children: D(e.status) ? /* @__PURE__ */ c(r, {
237
- ariaLabel: `Actions for grant to ${e.granteeId}`,
238
- entityName: e.granteeId,
239
- onDelete: () => Z(e),
240
- deleteLabel: "Revoke grant"
241
- }) : /* @__PURE__ */ c("span", {
242
- className: "text-xs text-text-secondary",
243
- children: "—"
244
- })
176
+ children: "Actions"
245
177
  })
246
- ]
247
- }, e.id)) })] })
248
- }), /* @__PURE__ */ c("ul", {
249
- className: "space-y-3 md:hidden",
250
- children: W.map((e) => /* @__PURE__ */ c("li", {
251
- "aria-current": F === e.id ? "true" : void 0,
252
- className: F === e.id ? "rounded-card border border-border-focus bg-bg-sunken" : "rounded-card border border-border-default bg-bg-elevated",
253
- children: /* @__PURE__ */ l("div", {
254
- className: "flex items-start justify-between gap-2 p-4",
255
- children: [/* @__PURE__ */ l("div", {
256
- className: "min-w-0 flex-1 space-y-2",
257
- children: [
258
- /* @__PURE__ */ l("div", {
259
- className: "flex flex-wrap items-center gap-2",
260
- children: [$ ? /* @__PURE__ */ c("span", {
261
- className: "truncate text-sm font-medium text-text-primary",
262
- children: B.get(e.datasetId) ?? "Dataset"
263
- }) : null, /* @__PURE__ */ c(i, { status: e.status })]
264
- }),
265
- /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("p", {
266
- className: "text-xs text-text-secondary",
267
- children: "Grantee (User ID)"
268
- }), /* @__PURE__ */ c("button", {
178
+ ] }) }), /* @__PURE__ */ c(pe, { children: U.map((e) => /* @__PURE__ */ l(D, {
179
+ "aria-selected": P === e.id,
180
+ "data-state": P === e.id ? "selected" : void 0,
181
+ className: P === e.id ? "bg-bg-sunken" : void 0,
182
+ children: [
183
+ $ ? /* @__PURE__ */ c(T, {
184
+ className: "max-w-[12rem]",
185
+ children: /* @__PURE__ */ c("span", {
186
+ className: "line-clamp-1 text-sm text-text-primary",
187
+ children: z.get(e.datasetId) ?? /* @__PURE__ */ c("span", {
188
+ className: "font-mono text-xs text-text-secondary",
189
+ children: e.datasetId
190
+ })
191
+ })
192
+ }) : null,
193
+ /* @__PURE__ */ c(T, {
194
+ className: "max-w-[12rem]",
195
+ children: /* @__PURE__ */ c("button", {
269
196
  type: "button",
270
- onClick: () => I(e),
271
- "aria-pressed": F === e.id,
272
- className: "block max-w-full truncate text-left font-mono text-xs text-text-primary underline-offset-2 hover:underline",
197
+ onClick: () => F(e),
198
+ "aria-pressed": P === e.id,
199
+ className: "block max-w-full truncate text-left font-mono text-xs text-text-primary underline-offset-2 hover:underline focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-border-focus",
273
200
  children: e.granteeId
274
- })] }),
275
- e.scopes.length > 0 ? /* @__PURE__ */ c("div", {
276
- className: "flex flex-wrap gap-1",
277
- children: e.scopes.map((e) => /* @__PURE__ */ c(d, {
278
- variant: "outline",
279
- className: "text-xs",
280
- children: e
281
- }, e))
282
- }) : null,
283
- e.reason ? /* @__PURE__ */ c("p", {
284
- className: "line-clamp-2 text-xs text-text-secondary",
285
- children: e.reason
286
- }) : null,
287
- /* @__PURE__ */ l("div", {
288
- className: "flex flex-wrap gap-x-3 gap-y-1 text-xs text-text-secondary",
289
- children: [
290
- /* @__PURE__ */ l("span", { children: ["Granted ", O(e.grantedAt)] }),
291
- /* @__PURE__ */ l("span", { children: ["Expires ", O(e.expiresAt)] }),
292
- e.revokedAt ? /* @__PURE__ */ l("span", { children: ["Revoked ", O(e.revokedAt)] }) : null
293
- ]
294
201
  })
295
- ]
296
- }), D(e.status) ? /* @__PURE__ */ c(r, {
297
- ariaLabel: `Actions for grant to ${e.granteeId}`,
298
- entityName: e.granteeId,
299
- onDelete: () => Z(e),
300
- deleteLabel: "Revoke grant"
301
- }) : null]
302
- })
303
- }, e.id))
304
- })] });
305
- })()]
306
- }), /* @__PURE__ */ c(de, {
307
- open: we,
308
- onOpenChange: (e) => K(e || G ? e : !1),
309
- children: /* @__PURE__ */ l(fe, {
310
- className: "max-h-[85vh] max-w-md overflow-y-auto",
311
- children: [
312
- /* @__PURE__ */ l(h, { children: [/* @__PURE__ */ c(pe, { children: A("cosmicintersection.pages.access.grantDataAccess", "Grant data access") }), /* @__PURE__ */ c(p, { children: A("cosmicintersection.pages.access.grantDataAccessDescription", "Give a workspace member scoped access to a dataset. Access is identified by the member's User ID.") })] }),
313
- /* @__PURE__ */ l("div", {
314
- className: "space-y-4",
315
- children: [
316
- /* @__PURE__ */ l("div", {
317
- className: "space-y-1.5",
318
- children: [/* @__PURE__ */ c(_, {
319
- htmlFor: "grant-dataset",
320
- children: A("cosmicintersection.pages.access.dataset", "Dataset")
321
- }), /* @__PURE__ */ l(v, {
322
- value: q.datasetId || void 0,
323
- onValueChange: (e) => X("datasetId", e),
324
- children: [/* @__PURE__ */ c(x, {
325
- id: "grant-dataset",
326
- "aria-label": A("cosmicintersection.pages.access.dataset", "Dataset"),
327
- children: /* @__PURE__ */ c(S, { placeholder: A("cosmicintersection.pages.access.selectDataset", "Select a dataset") })
328
- }), /* @__PURE__ */ c(y, { children: z.map((e) => /* @__PURE__ */ c(b, {
329
- value: e.id,
330
- children: e.name
331
- }, e.id)) })]
332
- })]
333
- }),
334
- /* @__PURE__ */ l("div", {
335
- className: "space-y-1.5",
336
- children: [
337
- /* @__PURE__ */ c(_, {
338
- htmlFor: "grant-grantee",
339
- children: A("cosmicintersection.pages.access.grantee", "Grantee (User ID)")
340
- }),
341
- /* @__PURE__ */ c(g, {
342
- id: "grant-grantee",
343
- value: q.granteeId,
344
- onChange: (e) => X("granteeId", e.target.value),
345
- placeholder: "e.g. 4fe35990-…",
346
- className: "font-mono"
347
- }),
348
- /* @__PURE__ */ c("p", {
202
+ }),
203
+ /* @__PURE__ */ c(T, { children: /* @__PURE__ */ c(i, { status: e.status }) }),
204
+ /* @__PURE__ */ c(T, { children: /* @__PURE__ */ c("div", {
205
+ className: "flex max-w-[12rem] flex-wrap gap-1",
206
+ children: e.scopes.length === 0 ? /* @__PURE__ */ c("span", {
349
207
  className: "text-xs text-text-secondary",
350
- children: A("cosmicintersection.pages.access.granteeHint", "Paste the workspace member's User ID. You can copy it from the member's profile (\"Get ID\") or the workspace member directory.")
208
+ children: "—"
209
+ }) : e.scopes.map((e) => /* @__PURE__ */ c(d, {
210
+ variant: "outline",
211
+ className: "text-xs",
212
+ children: e
213
+ }, e))
214
+ }) }),
215
+ /* @__PURE__ */ c(T, {
216
+ className: "max-w-[14rem]",
217
+ children: e.reason ? /* @__PURE__ */ c("span", {
218
+ className: "line-clamp-1 text-sm text-text-secondary",
219
+ children: e.reason
220
+ }) : /* @__PURE__ */ c("span", {
221
+ className: "text-sm text-text-secondary",
222
+ children: "—"
351
223
  })
352
- ]
353
- }),
354
- /* @__PURE__ */ c(oe, {
355
- value: q.scopes,
356
- onChange: (e) => X("scopes", e),
357
- label: A("cosmicintersection.pages.access.scopes", "Scopes"),
358
- placeholder: "e.g. read, download"
359
- }),
360
- /* @__PURE__ */ l("div", {
361
- className: "space-y-1.5",
362
- children: [/* @__PURE__ */ c(_, {
363
- htmlFor: "grant-reason",
364
- children: A("cosmicintersection.pages.access.reason", "Reason")
365
- }), /* @__PURE__ */ c(_e, {
366
- id: "grant-reason",
367
- value: q.reason,
368
- onChange: (e) => X("reason", e.target.value),
369
- rows: 2,
370
- placeholder: A("cosmicintersection.pages.access.reasonPlaceholder", "Why this member needs access.")
371
- })]
372
- }),
373
- /* @__PURE__ */ l("div", {
374
- className: "space-y-1.5",
375
- children: [
376
- /* @__PURE__ */ c(_, {
377
- htmlFor: "grant-expires",
378
- children: A("cosmicintersection.pages.access.expiresOptional", "Expires (optional)")
379
- }),
380
- /* @__PURE__ */ c(g, {
381
- id: "grant-expires",
382
- type: "datetime-local",
383
- value: q.expiresAt,
384
- onChange: (e) => X("expiresAt", e.target.value)
385
- }),
386
- /* @__PURE__ */ c("p", {
224
+ }),
225
+ /* @__PURE__ */ c(T, {
226
+ className: "whitespace-nowrap text-sm text-text-secondary",
227
+ children: A(e.grantedAt)
228
+ }),
229
+ /* @__PURE__ */ c(T, {
230
+ className: "whitespace-nowrap text-sm text-text-secondary",
231
+ children: A(e.expiresAt)
232
+ }),
233
+ /* @__PURE__ */ c(T, {
234
+ className: "whitespace-nowrap text-sm text-text-secondary",
235
+ children: A(e.revokedAt)
236
+ }),
237
+ /* @__PURE__ */ c(T, {
238
+ className: "text-right",
239
+ children: k(e.status) ? /* @__PURE__ */ c(r, {
240
+ ariaLabel: `Actions for grant to ${e.granteeId}`,
241
+ entityName: e.granteeId,
242
+ onDelete: () => Q(e),
243
+ deleteLabel: "Revoke grant"
244
+ }) : /* @__PURE__ */ c("span", {
387
245
  className: "text-xs text-text-secondary",
388
- children: A("cosmicintersection.pages.access.expiresHint", "Leave blank for an open-ended grant.")
246
+ children: "—"
389
247
  })
390
- ]
248
+ })
249
+ ]
250
+ }, e.id)) })] })
251
+ }), /* @__PURE__ */ c("ul", {
252
+ className: "space-y-3 md:hidden",
253
+ children: U.map((e) => /* @__PURE__ */ c("li", {
254
+ "aria-current": P === e.id ? "true" : void 0,
255
+ className: P === e.id ? "rounded-card border border-border-focus bg-bg-sunken" : "rounded-card border border-border-default bg-bg-elevated",
256
+ children: /* @__PURE__ */ l("div", {
257
+ className: "flex items-start justify-between gap-2 p-4",
258
+ children: [/* @__PURE__ */ l("div", {
259
+ className: "min-w-0 flex-1 space-y-2",
260
+ children: [
261
+ /* @__PURE__ */ l("div", {
262
+ className: "flex flex-wrap items-center gap-2",
263
+ children: [$ ? /* @__PURE__ */ c("span", {
264
+ className: "truncate text-sm font-medium text-text-primary",
265
+ children: z.get(e.datasetId) ?? "Dataset"
266
+ }) : null, /* @__PURE__ */ c(i, { status: e.status })]
267
+ }),
268
+ /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("p", {
269
+ className: "text-xs text-text-secondary",
270
+ children: "Grantee (User ID)"
271
+ }), /* @__PURE__ */ c("button", {
272
+ type: "button",
273
+ onClick: () => F(e),
274
+ "aria-pressed": P === e.id,
275
+ className: "block max-w-full truncate text-left font-mono text-xs text-text-primary underline-offset-2 hover:underline",
276
+ children: e.granteeId
277
+ })] }),
278
+ e.scopes.length > 0 ? /* @__PURE__ */ c("div", {
279
+ className: "flex flex-wrap gap-1",
280
+ children: e.scopes.map((e) => /* @__PURE__ */ c(d, {
281
+ variant: "outline",
282
+ className: "text-xs",
283
+ children: e
284
+ }, e))
285
+ }) : null,
286
+ e.reason ? /* @__PURE__ */ c("p", {
287
+ className: "line-clamp-2 text-xs text-text-secondary",
288
+ children: e.reason
289
+ }) : null,
290
+ /* @__PURE__ */ l("div", {
291
+ className: "flex flex-wrap gap-x-3 gap-y-1 text-xs text-text-secondary",
292
+ children: [
293
+ /* @__PURE__ */ l("span", { children: ["Granted ", A(e.grantedAt)] }),
294
+ /* @__PURE__ */ l("span", { children: ["Expires ", A(e.expiresAt)] }),
295
+ e.revokedAt ? /* @__PURE__ */ l("span", { children: ["Revoked ", A(e.revokedAt)] }) : null
296
+ ]
297
+ })
298
+ ]
299
+ }), k(e.status) ? /* @__PURE__ */ c(r, {
300
+ ariaLabel: `Actions for grant to ${e.granteeId}`,
301
+ entityName: e.granteeId,
302
+ onDelete: () => Q(e),
303
+ deleteLabel: "Revoke grant"
304
+ }) : null]
391
305
  })
392
- ]
393
- }),
394
- /* @__PURE__ */ l(m, { children: [/* @__PURE__ */ c(f, {
395
- type: "button",
396
- variant: "outline",
397
- onClick: () => K(!1),
398
- disabled: G,
399
- children: A("cosmicintersection.common.cancel", "Cancel")
400
- }), /* @__PURE__ */ l(f, {
401
- type: "button",
402
- onClick: () => void Te(),
403
- disabled: G,
404
- children: [/* @__PURE__ */ c(u, { className: "size-4" }), G ? A("cosmicintersection.pages.access.granting", "Granting…") : A("cosmicintersection.pages.access.grantAccess", "Grant access")]
405
- })] })
406
- ]
306
+ }, e.id))
307
+ })] });
308
+ })()]
309
+ }),
310
+ /* @__PURE__ */ c(p, {
311
+ open: Te,
312
+ onOpenChange: (e) => K(e || W ? e : !1),
313
+ children: /* @__PURE__ */ l(de, {
314
+ className: "max-h-[85vh] max-w-md overflow-y-auto",
315
+ children: [
316
+ /* @__PURE__ */ l(g, { children: [/* @__PURE__ */ c(_, { children: M("cosmicintersection.pages.access.grantDataAccess", "Grant data access") }), /* @__PURE__ */ c(m, { children: M("cosmicintersection.pages.access.grantDataAccessDescription", "Give a workspace member scoped access to a dataset. Access is identified by the member's User ID.") })] }),
317
+ /* @__PURE__ */ l("div", {
318
+ className: "space-y-4",
319
+ children: [
320
+ /* @__PURE__ */ l("div", {
321
+ className: "space-y-1.5",
322
+ children: [/* @__PURE__ */ c(y, {
323
+ htmlFor: "grant-dataset",
324
+ children: M("cosmicintersection.pages.access.dataset", "Dataset")
325
+ }), /* @__PURE__ */ l(b, {
326
+ value: q.datasetId || void 0,
327
+ onValueChange: (e) => Z("datasetId", e),
328
+ children: [/* @__PURE__ */ c(C, {
329
+ id: "grant-dataset",
330
+ "aria-label": M("cosmicintersection.pages.access.dataset", "Dataset"),
331
+ children: /* @__PURE__ */ c(w, { placeholder: M("cosmicintersection.pages.access.selectDataset", "Select a dataset") })
332
+ }), /* @__PURE__ */ c(x, { children: R.map((e) => /* @__PURE__ */ c(S, {
333
+ value: e.id,
334
+ children: e.name
335
+ }, e.id)) })]
336
+ })]
337
+ }),
338
+ /* @__PURE__ */ l("div", {
339
+ className: "space-y-1.5",
340
+ children: [
341
+ /* @__PURE__ */ c(y, {
342
+ htmlFor: "grant-grantee",
343
+ children: M("cosmicintersection.pages.access.grantee", "Grantee (User ID)")
344
+ }),
345
+ /* @__PURE__ */ c(v, {
346
+ id: "grant-grantee",
347
+ value: q.granteeId,
348
+ onChange: (e) => Z("granteeId", e.target.value),
349
+ placeholder: "e.g. 4fe35990-…",
350
+ className: "font-mono"
351
+ }),
352
+ /* @__PURE__ */ c("p", {
353
+ className: "text-xs text-text-secondary",
354
+ children: M("cosmicintersection.pages.access.granteeHint", "Paste the workspace member's User ID. You can copy it from the member's profile (\"Get ID\") or the workspace member directory.")
355
+ })
356
+ ]
357
+ }),
358
+ /* @__PURE__ */ c(oe, {
359
+ value: q.scopes,
360
+ onChange: (e) => Z("scopes", e),
361
+ label: M("cosmicintersection.pages.access.scopes", "Scopes"),
362
+ placeholder: "e.g. read, download"
363
+ }),
364
+ /* @__PURE__ */ l("div", {
365
+ className: "space-y-1.5",
366
+ children: [/* @__PURE__ */ c(y, {
367
+ htmlFor: "grant-reason",
368
+ children: M("cosmicintersection.pages.access.reason", "Reason")
369
+ }), /* @__PURE__ */ c(he, {
370
+ id: "grant-reason",
371
+ value: q.reason,
372
+ onChange: (e) => Z("reason", e.target.value),
373
+ rows: 2,
374
+ placeholder: M("cosmicintersection.pages.access.reasonPlaceholder", "Why this member needs access.")
375
+ })]
376
+ }),
377
+ /* @__PURE__ */ l("div", {
378
+ className: "space-y-1.5",
379
+ children: [
380
+ /* @__PURE__ */ c(y, {
381
+ htmlFor: "grant-expires",
382
+ children: M("cosmicintersection.pages.access.expiresOptional", "Expires (optional)")
383
+ }),
384
+ /* @__PURE__ */ c(v, {
385
+ id: "grant-expires",
386
+ type: "datetime-local",
387
+ value: q.expiresAt,
388
+ onChange: (e) => Z("expiresAt", e.target.value)
389
+ }),
390
+ /* @__PURE__ */ c("p", {
391
+ className: "text-xs text-text-secondary",
392
+ children: M("cosmicintersection.pages.access.expiresHint", "Leave blank for an open-ended grant.")
393
+ })
394
+ ]
395
+ })
396
+ ]
397
+ }),
398
+ /* @__PURE__ */ l(h, { children: [/* @__PURE__ */ c(f, {
399
+ type: "button",
400
+ variant: "outline",
401
+ onClick: () => K(!1),
402
+ disabled: W,
403
+ children: M("cosmicintersection.common.cancel", "Cancel")
404
+ }), /* @__PURE__ */ l(f, {
405
+ type: "button",
406
+ onClick: () => void De(),
407
+ disabled: W,
408
+ children: [/* @__PURE__ */ c(u, { className: "size-4" }), W ? M("cosmicintersection.pages.access.granting", "Granting…") : M("cosmicintersection.pages.access.grantAccess", "Grant access")]
409
+ })] })
410
+ ]
411
+ })
412
+ }),
413
+ /* @__PURE__ */ c(p, {
414
+ open: Y != null,
415
+ onOpenChange: (e) => !e && X(null),
416
+ children: /* @__PURE__ */ l(de, { children: [/* @__PURE__ */ l(g, { children: [/* @__PURE__ */ c(_, { children: M("cosmicintersection.pages.access.revokeConfirmTitle", "Revoke access?") }), /* @__PURE__ */ c(m, { children: M("cosmicintersection.pages.access.revokeConfirmDescription", "The grantee immediately loses access to this dataset. To restore access later, a new grant must be created and approved.") })] }), /* @__PURE__ */ l(h, { children: [/* @__PURE__ */ c(f, {
417
+ type: "button",
418
+ variant: "outline",
419
+ onClick: () => X(null),
420
+ disabled: G,
421
+ children: M("cosmicintersection.pages.access.cancel", "Cancel")
422
+ }), /* @__PURE__ */ c(f, {
423
+ type: "button",
424
+ variant: "destructive",
425
+ onClick: () => Y && void Oe(Y),
426
+ disabled: G,
427
+ children: G ? M("cosmicintersection.pages.access.revoking", "Revoking…") : M("cosmicintersection.pages.access.revokeConfirmAction", "Revoke access")
428
+ })] })] })
407
429
  })
408
- })]
430
+ ]
409
431
  });
410
432
  }
411
433
  //#endregion
412
- export { A as default };
434
+ export { M as default };
413
435
 
414
436
  //# sourceMappingURL=AccessPage.js.map