@burdenoff/microfe-theculturepost 2026.1122.1 → 2026.1124.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.
@@ -12,36 +12,37 @@ import { cn as p } from "../../utils/cn.js";
12
12
  import { nativeConfirm as m } from "../../utils/nativeBridge.js";
13
13
  import { resolveArchiveItemPermissions as h } from "../../utils/archivePermissions.js";
14
14
  import { formatDate as g, formatEnumLabel as _ } from "../../utils/formatters.js";
15
- import { describeError as v, notify as y } from "../../lib/toast.js";
16
- import { createElement as b, useEffect as x, useState as S } from "react";
17
- import { Archive as ee, ArrowLeft as C, CalendarClock as w, Clock as T, Download as E, Globe as D, Landmark as O, Languages as k, Library as A, Loader2 as j, Lock as M, Maximize2 as N, Minus as P, Pencil as F, Plus as I, Quote as L, Tag as R, Users as z, X as B } from "lucide-react";
18
- import { useParams as V } from "react-router";
19
- import { Fragment as H, jsx as U, jsxs as W } from "react/jsx-runtime";
20
- import { Button as G, GlassCard as K, Input as q, ResponsiveDialog as J, ResponsiveDialogContent as Y, ResponsiveDialogDescription as X, ResponsiveDialogFooter as Z, ResponsiveDialogHeader as te, ResponsiveDialogTitle as ne } from "@burdenoff/fe-libs/ui";
21
- import { useSafePermissions as re } from "@burdenoff/fe-libs/shared/providers/shell";
15
+ import { useLanguageMetadata as v } from "../../hooks/useLanguageMetadata.js";
16
+ import { describeError as y, notify as b } from "../../lib/toast.js";
17
+ import { createElement as x, useEffect as S, useState as C } from "react";
18
+ import { Archive as w, ArrowLeft as T, CalendarClock as E, Clock as D, Download as O, Globe as k, Landmark as A, Languages as j, Library as M, Loader2 as N, Lock as P, Maximize2 as F, Minus as I, Pencil as L, Plus as R, Quote as z, Tag as B, Users as V, X as H } from "lucide-react";
19
+ import { useParams as U } from "react-router";
20
+ import { Fragment as W, jsx as G, jsxs as K } from "react/jsx-runtime";
21
+ import { Button as q, GlassCard as J, Input as Y, ResponsiveDialog as X, ResponsiveDialogContent as Z, ResponsiveDialogDescription as ee, ResponsiveDialogFooter as te, ResponsiveDialogHeader as ne, ResponsiveDialogTitle as re } from "@burdenoff/fe-libs/ui";
22
+ import { useSafePermissions as ie } from "@burdenoff/fe-libs/shared/providers/shell";
22
23
  // src/theculturepost/pages/archive/ArchiveItemDetailPage.tsx
23
- var ie = {
24
- PUBLIC: D,
25
- COMMUNITY: z,
26
- RESTRICTED: M,
27
- EMBARGOED: T
24
+ var ae = {
25
+ PUBLIC: k,
26
+ COMMUNITY: V,
27
+ RESTRICTED: P,
28
+ EMBARGOED: D
28
29
  };
29
30
  function Q({ onBack: e, children: t }) {
30
- return /* @__PURE__ */ U("div", {
31
+ return /* @__PURE__ */ G("div", {
31
32
  className: "flex h-full flex-col",
32
- children: /* @__PURE__ */ U("div", {
33
+ children: /* @__PURE__ */ G("div", {
33
34
  className: "flex-1 overflow-auto",
34
- children: /* @__PURE__ */ W("div", {
35
+ children: /* @__PURE__ */ K("div", {
35
36
  className: "mx-auto w-full max-w-6xl p-4 sm:p-6",
36
- children: [/* @__PURE__ */ W("button", {
37
+ children: [/* @__PURE__ */ K("button", {
37
38
  type: "button",
38
39
  onClick: e,
39
40
  className: "inline-flex items-center gap-1.5 text-sm font-medium text-text-secondary hover:text-text-primary",
40
- children: [/* @__PURE__ */ U(C, {
41
+ children: [/* @__PURE__ */ G(T, {
41
42
  className: "h-4 w-4",
42
43
  "aria-hidden": "true"
43
44
  }), " Archive"]
44
- }), /* @__PURE__ */ U("div", {
45
+ }), /* @__PURE__ */ G("div", {
45
46
  className: "mt-4",
46
47
  children: t
47
48
  })]
@@ -49,91 +50,91 @@ function Q({ onBack: e, children: t }) {
49
50
  })
50
51
  });
51
52
  }
52
- function ae() {
53
- let { id: r } = V(), { navigateTo: a, workspaceId: l } = e(), { data: f, isLoading: p, isError: x, refetch: C } = d(r), [T, E] = S(!1), [M, N] = S(!1), P = u(), I = re(), { canEdit: z, canWithdraw: B } = h(I, l), H = () => a("archive"), K = async () => {
54
- if (f && B && await m({
53
+ function oe() {
54
+ let { id: r } = U(), { navigateTo: a, workspaceId: l } = e(), { data: f, isLoading: p, isError: _, refetch: S } = d(r), T = v(f?.languages), [D, O] = C(!1), [P, F] = C(!1), I = u(), R = ie(), { canEdit: V, canWithdraw: H } = h(R, l), W = () => a("archive"), J = async () => {
55
+ if (f && H && await m({
55
56
  title: "Withdraw artifact",
56
57
  message: `Withdraw “${f.title}” from the archive? It will no longer be listed, and stories that cite it keep their citation.`,
57
58
  okButtonTitle: "Withdraw",
58
59
  cancelButtonTitle: "Cancel"
59
60
  })) try {
60
- await P.mutateAsync({
61
+ await I.mutateAsync({
61
62
  id: f.id,
62
63
  collectionId: f.collectionId
63
- }), y.success("Artifact withdrawn", f.title), H();
64
+ }), b.success("Artifact withdrawn", f.title), W();
64
65
  } catch (e) {
65
- y.error("Could not withdraw the artifact", v(e));
66
+ b.error("Could not withdraw the artifact", y(e));
66
67
  }
67
68
  };
68
- if (p) return /* @__PURE__ */ U(Q, {
69
- onBack: H,
70
- children: /* @__PURE__ */ U(c, { label: "Loading artifact…" })
69
+ if (p) return /* @__PURE__ */ G(Q, {
70
+ onBack: W,
71
+ children: /* @__PURE__ */ G(c, { label: "Loading artifact…" })
71
72
  });
72
- if (x || !f) return /* @__PURE__ */ U(Q, {
73
- onBack: H,
74
- children: /* @__PURE__ */ U(s, {
73
+ if (_ || !f) return /* @__PURE__ */ G(Q, {
74
+ onBack: W,
75
+ children: /* @__PURE__ */ G(s, {
75
76
  title: "Artifact not found",
76
77
  message: "This artifact may have been archived, or you may not have access.",
77
- onRetry: () => C()
78
+ onRetry: () => S()
78
79
  })
79
80
  });
80
- let q = f.collection, J = ie[f.accessLevel], Y = o[f.kind];
81
- return /* @__PURE__ */ W(Q, {
82
- onBack: H,
81
+ let Y = f.collection, X = ae[f.accessLevel], Z = o[f.kind];
82
+ return /* @__PURE__ */ K(Q, {
83
+ onBack: W,
83
84
  children: [
84
- /* @__PURE__ */ W("div", {
85
+ /* @__PURE__ */ K("div", {
85
86
  className: "grid gap-6 lg:grid-cols-[1.3fr_1fr]",
86
- children: [/* @__PURE__ */ U(oe, { item: f }), /* @__PURE__ */ W("div", {
87
+ children: [/* @__PURE__ */ G(se, { item: f }), /* @__PURE__ */ K("div", {
87
88
  className: "flex min-w-0 flex-col gap-5",
88
89
  children: [
89
- /* @__PURE__ */ U("h1", {
90
+ /* @__PURE__ */ G("h1", {
90
91
  className: "font-display text-3xl font-semibold leading-tight text-text-primary",
91
92
  children: f.title
92
93
  }),
93
- /* @__PURE__ */ W("div", {
94
+ /* @__PURE__ */ K("div", {
94
95
  className: "flex flex-wrap items-center gap-1.5",
95
- children: [/* @__PURE__ */ U(n, {
96
+ children: [/* @__PURE__ */ G(n, {
96
97
  status: f.kind,
97
- icon: b(Y, { className: "h-3 w-3" })
98
- }), /* @__PURE__ */ U(n, {
98
+ icon: x(Z, { className: "h-3 w-3" })
99
+ }), /* @__PURE__ */ G(n, {
99
100
  status: f.accessLevel,
100
- icon: b(J, { className: "h-3 w-3" })
101
+ icon: x(X, { className: "h-3 w-3" })
101
102
  })]
102
103
  }),
103
- f.description && /* @__PURE__ */ U("p", {
104
+ f.description && /* @__PURE__ */ G("p", {
104
105
  className: "whitespace-pre-wrap text-sm leading-relaxed text-text-secondary",
105
106
  children: f.description
106
107
  }),
107
- /* @__PURE__ */ U(i, { className: "py-2" }),
108
- /* @__PURE__ */ W("dl", {
108
+ /* @__PURE__ */ G(i, { className: "py-2" }),
109
+ /* @__PURE__ */ K("dl", {
109
110
  className: "flex flex-col gap-4",
110
111
  children: [
111
- f.provenance && /* @__PURE__ */ U($, {
112
- icon: O,
112
+ f.provenance && /* @__PURE__ */ G($, {
113
+ icon: A,
113
114
  label: "Provenance",
114
115
  children: f.provenance
115
116
  }),
116
- f.origin && /* @__PURE__ */ U($, {
117
- icon: D,
117
+ f.origin && /* @__PURE__ */ G($, {
118
+ icon: k,
118
119
  label: "Origin",
119
120
  children: f.origin
120
121
  }),
121
- f.datedAt && /* @__PURE__ */ U($, {
122
- icon: w,
122
+ f.datedAt && /* @__PURE__ */ G($, {
123
+ icon: E,
123
124
  label: "Date",
124
125
  children: g(f.datedAt)
125
126
  }),
126
- f.languages.length > 0 && /* @__PURE__ */ U($, {
127
- icon: k,
127
+ T && /* @__PURE__ */ G($, {
128
+ icon: j,
128
129
  label: "Languages",
129
- children: f.languages.map(_).join(", ")
130
+ children: /* @__PURE__ */ G("bdi", { children: T })
130
131
  }),
131
- f.tags.length > 0 && /* @__PURE__ */ U($, {
132
- icon: R,
132
+ f.tags.length > 0 && /* @__PURE__ */ G($, {
133
+ icon: B,
133
134
  label: "Tags",
134
- children: /* @__PURE__ */ U("div", {
135
+ children: /* @__PURE__ */ G("div", {
135
136
  className: "flex flex-wrap gap-1.5",
136
- children: f.tags.map((e) => /* @__PURE__ */ U("span", {
137
+ children: f.tags.map((e) => /* @__PURE__ */ G("span", {
137
138
  className: "rounded-full bg-bg-sunken px-2.5 py-0.5 text-xs font-medium text-text-secondary",
138
139
  children: e
139
140
  }, e))
@@ -141,89 +142,89 @@ function ae() {
141
142
  })
142
143
  ]
143
144
  }),
144
- q && /* @__PURE__ */ W("button", {
145
+ Y && /* @__PURE__ */ K("button", {
145
146
  type: "button",
146
- onClick: () => a(`archive/collections/${q.id}`),
147
+ onClick: () => a(`archive/collections/${Y.id}`),
147
148
  className: "inline-flex items-center gap-2 self-start rounded-lg border border-border-seam bg-bg-surface px-3 py-2 text-sm font-medium text-text-primary transition-colors hover:bg-bg-sunken",
148
149
  children: [
149
- /* @__PURE__ */ U(A, {
150
+ /* @__PURE__ */ G(M, {
150
151
  className: "h-4 w-4 text-text-tertiary",
151
152
  "aria-hidden": "true"
152
153
  }),
153
154
  " ",
154
- q.name
155
+ Y.name
155
156
  ]
156
157
  }),
157
- /* @__PURE__ */ W(G, {
158
+ /* @__PURE__ */ K(q, {
158
159
  className: "w-full sm:w-auto",
159
- onClick: () => E(!0),
160
- children: [/* @__PURE__ */ U(L, { className: "mr-1.5 h-4 w-4" }), " Cite in a story"]
160
+ onClick: () => O(!0),
161
+ children: [/* @__PURE__ */ G(z, { className: "mr-1.5 h-4 w-4" }), " Cite in a story"]
161
162
  }),
162
- (z || B) && /* @__PURE__ */ W("div", {
163
+ (V || H) && /* @__PURE__ */ K("div", {
163
164
  className: "flex flex-wrap gap-2",
164
- children: [z && /* @__PURE__ */ W(G, {
165
+ children: [V && /* @__PURE__ */ K(q, {
165
166
  variant: "outline",
166
- onClick: () => N(!0),
167
- children: [/* @__PURE__ */ U(F, { className: "mr-1.5 h-4 w-4" }), " Edit"]
168
- }), B && /* @__PURE__ */ W(G, {
167
+ onClick: () => F(!0),
168
+ children: [/* @__PURE__ */ G(L, { className: "mr-1.5 h-4 w-4" }), " Edit"]
169
+ }), H && /* @__PURE__ */ K(q, {
169
170
  variant: "outline",
170
- onClick: K,
171
- disabled: P.isPending,
172
- children: [P.isPending ? /* @__PURE__ */ U(j, { className: "mr-1.5 h-4 w-4 animate-spin" }) : /* @__PURE__ */ U(ee, { className: "mr-1.5 h-4 w-4" }), "Withdraw"]
171
+ onClick: J,
172
+ disabled: I.isPending,
173
+ children: [I.isPending ? /* @__PURE__ */ G(N, { className: "mr-1.5 h-4 w-4 animate-spin" }) : /* @__PURE__ */ G(w, { className: "mr-1.5 h-4 w-4" }), "Withdraw"]
173
174
  })]
174
175
  })
175
176
  ]
176
177
  })]
177
178
  }),
178
- /* @__PURE__ */ U(se, {
179
- open: T,
180
- onOpenChange: E,
179
+ /* @__PURE__ */ G(ce, {
180
+ open: D,
181
+ onOpenChange: O,
181
182
  item: f
182
183
  }),
183
- z && M && /* @__PURE__ */ U(t, {
184
- open: M,
185
- onOpenChange: N,
184
+ V && P && /* @__PURE__ */ G(t, {
185
+ open: P,
186
+ onOpenChange: F,
186
187
  item: f
187
188
  })
188
189
  ]
189
190
  });
190
191
  }
191
192
  function $({ icon: e, label: t, children: n }) {
192
- return /* @__PURE__ */ W("div", {
193
+ return /* @__PURE__ */ K("div", {
193
194
  className: "flex items-start gap-3",
194
195
  children: [
195
- /* @__PURE__ */ U(e, {
196
+ /* @__PURE__ */ G(e, {
196
197
  className: "mt-0.5 h-4 w-4 shrink-0 text-accent",
197
198
  "aria-hidden": "true"
198
199
  }),
199
- /* @__PURE__ */ U("dt", {
200
+ /* @__PURE__ */ G("dt", {
200
201
  className: "w-24 shrink-0 text-sm text-text-tertiary",
201
202
  children: t
202
203
  }),
203
- /* @__PURE__ */ U("dd", {
204
+ /* @__PURE__ */ G("dd", {
204
205
  className: "min-w-0 flex-1 text-sm text-text-primary",
205
206
  children: n
206
207
  })
207
208
  ]
208
209
  });
209
210
  }
210
- function oe({ item: e }) {
211
- let { data: t } = r(e.file?.id), n = o[e.kind], [i, s] = S(1), [c, l] = S(!1), [u, d] = S(!1), f = a.has(e.kind) && !!t && !u;
212
- return x(() => {
211
+ function se({ item: e }) {
212
+ let { data: t } = r(e.file?.id), n = o[e.kind], [i, s] = C(1), [c, l] = C(!1), [u, d] = C(!1), f = a.has(e.kind) && !!t && !u;
213
+ return S(() => {
213
214
  if (!c) return;
214
215
  let e = (e) => {
215
216
  e.key === "Escape" && l(!1);
216
217
  };
217
218
  return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
218
- }, [c]), /* @__PURE__ */ W("div", {
219
+ }, [c]), /* @__PURE__ */ K("div", {
219
220
  className: "flex flex-col gap-4",
220
221
  children: [
221
- /* @__PURE__ */ U(K, {
222
+ /* @__PURE__ */ G(J, {
222
223
  treatment: "plain",
223
224
  className: "p-3 sm:p-4",
224
- children: /* @__PURE__ */ W("div", {
225
+ children: /* @__PURE__ */ K("div", {
225
226
  className: p("relative aspect-[4/3] w-full rounded-xl bg-bg-sunken", i > 1 ? "overflow-auto" : "overflow-hidden"),
226
- children: [f && t ? /* @__PURE__ */ U("img", {
227
+ children: [f && t ? /* @__PURE__ */ G("img", {
227
228
  src: t,
228
229
  alt: e.title,
229
230
  onError: () => d(!0),
@@ -232,72 +233,72 @@ function oe({ item: e }) {
232
233
  transformOrigin: "center center"
233
234
  },
234
235
  className: "h-full w-full object-contain transition-transform duration-200"
235
- }) : /* @__PURE__ */ W("div", {
236
+ }) : /* @__PURE__ */ K("div", {
236
237
  className: "flex h-full w-full flex-col items-center justify-center gap-3 text-text-tertiary",
237
- children: [/* @__PURE__ */ U(n, {
238
+ children: [/* @__PURE__ */ G(n, {
238
239
  className: "h-16 w-16",
239
240
  "aria-hidden": "true"
240
- }), /* @__PURE__ */ U("span", {
241
+ }), /* @__PURE__ */ G("span", {
241
242
  className: "text-sm font-medium",
242
243
  children: _(e.kind)
243
244
  })]
244
- }), f && t && /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U("button", {
245
+ }), f && t && /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G("button", {
245
246
  type: "button",
246
247
  onClick: () => l(!0),
247
248
  "aria-label": "View full screen",
248
249
  className: "absolute right-3 top-3 z-10 flex h-9 w-9 items-center justify-center rounded-lg bg-bg-canvas/85 text-text-primary shadow-sm backdrop-blur-sm hover:bg-bg-canvas",
249
- children: /* @__PURE__ */ U(N, { className: "h-4 w-4" })
250
- }), /* @__PURE__ */ W("div", {
250
+ children: /* @__PURE__ */ G(F, { className: "h-4 w-4" })
251
+ }), /* @__PURE__ */ K("div", {
251
252
  className: "absolute bottom-3 left-3 z-10 flex flex-col overflow-hidden rounded-lg border border-border-seam bg-bg-canvas/85 text-text-primary shadow-sm backdrop-blur-sm",
252
253
  children: [
253
- /* @__PURE__ */ U("button", {
254
+ /* @__PURE__ */ G("button", {
254
255
  type: "button",
255
256
  onClick: () => s((e) => Math.min(4, Math.round((e + .5) * 10) / 10)),
256
257
  disabled: i >= 4,
257
258
  "aria-label": "Zoom in",
258
259
  className: "flex h-8 w-9 items-center justify-center hover:bg-bg-sunken disabled:opacity-40",
259
- children: /* @__PURE__ */ U(I, { className: "h-4 w-4" })
260
+ children: /* @__PURE__ */ G(R, { className: "h-4 w-4" })
260
261
  }),
261
- /* @__PURE__ */ W("button", {
262
+ /* @__PURE__ */ K("button", {
262
263
  type: "button",
263
264
  onClick: () => s(1),
264
265
  "aria-label": "Reset zoom",
265
266
  className: "border-y border-border-seam px-1 py-1 text-[10px] font-medium tabular-nums hover:bg-bg-sunken",
266
267
  children: [Math.round(i * 100), "%"]
267
268
  }),
268
- /* @__PURE__ */ U("button", {
269
+ /* @__PURE__ */ G("button", {
269
270
  type: "button",
270
271
  onClick: () => s((e) => Math.max(1, Math.round((e - .5) * 10) / 10)),
271
272
  disabled: i <= 1,
272
273
  "aria-label": "Zoom out",
273
274
  className: "flex h-8 w-9 items-center justify-center hover:bg-bg-sunken disabled:opacity-40",
274
- children: /* @__PURE__ */ U(P, { className: "h-4 w-4" })
275
+ children: /* @__PURE__ */ G(I, { className: "h-4 w-4" })
275
276
  })
276
277
  ]
277
278
  })] })]
278
279
  })
279
280
  }),
280
- t && /* @__PURE__ */ W("a", {
281
+ t && /* @__PURE__ */ K("a", {
281
282
  href: t,
282
283
  target: "_blank",
283
284
  rel: "noreferrer noopener",
284
285
  download: !0,
285
286
  className: "inline-flex items-center justify-center gap-2 self-start rounded-lg border border-border-seam bg-bg-surface px-4 py-2 text-sm font-medium text-text-primary transition-colors hover:bg-bg-sunken",
286
- children: [/* @__PURE__ */ U(E, { className: "h-4 w-4" }), " Download"]
287
+ children: [/* @__PURE__ */ G(O, { className: "h-4 w-4" }), " Download"]
287
288
  }),
288
- c && t && /* @__PURE__ */ W("div", {
289
+ c && t && /* @__PURE__ */ K("div", {
289
290
  role: "dialog",
290
291
  "aria-modal": "true",
291
292
  "aria-label": `${e.title} — full view`,
292
293
  onClick: () => l(!1),
293
294
  className: "fixed inset-0 z-50 flex items-center justify-center bg-bg-canvas/95 p-4 backdrop-blur-sm",
294
- children: [/* @__PURE__ */ U("button", {
295
+ children: [/* @__PURE__ */ G("button", {
295
296
  type: "button",
296
297
  onClick: () => l(!1),
297
298
  "aria-label": "Close full view",
298
299
  className: "absolute right-4 top-4 flex h-10 w-10 items-center justify-center rounded-full bg-bg-surface text-text-primary shadow-sm hover:bg-bg-sunken",
299
- children: /* @__PURE__ */ U(B, { className: "h-5 w-5" })
300
- }), /* @__PURE__ */ U("img", {
300
+ children: /* @__PURE__ */ G(H, { className: "h-5 w-5" })
301
+ }), /* @__PURE__ */ G("img", {
301
302
  src: t,
302
303
  alt: e.title,
303
304
  onClick: (e) => e.stopPropagation(),
@@ -307,8 +308,8 @@ function oe({ item: e }) {
307
308
  ]
308
309
  });
309
310
  }
310
- function se({ open: e, onOpenChange: t, item: n }) {
311
- let r = f({ pagination: { limit: 50 } }), i = l(), [a, o] = S(""), [s, u] = S(null), [d, p] = S(null), m = r.data?.items ?? [], h = a.trim().toLowerCase(), g = h ? m.filter((e) => e.title.toLowerCase().includes(h)) : m, b = async (e) => {
311
+ function ce({ open: e, onOpenChange: t, item: n }) {
312
+ let r = f({ pagination: { limit: 50 } }), i = l(), [a, o] = C(""), [s, u] = C(null), [d, p] = C(null), m = r.data?.items ?? [], h = a.trim().toLowerCase(), g = h ? m.filter((e) => e.title.toLowerCase().includes(h)) : m, v = async (e) => {
312
313
  u(e.id), p(null);
313
314
  try {
314
315
  await i.mutateAsync({
@@ -318,68 +319,68 @@ function se({ open: e, onOpenChange: t, item: n }) {
318
319
  provenance: n.provenance ?? null,
319
320
  excerpt: n.description ?? null,
320
321
  sourceFileId: n.file?.id ?? null
321
- }), y.success("Cited in a story", e.title), t(!1);
322
+ }), b.success("Cited in a story", e.title), t(!1);
322
323
  } catch (e) {
323
- p(v(e));
324
+ p(y(e));
324
325
  } finally {
325
326
  u(null);
326
327
  }
327
328
  };
328
- return /* @__PURE__ */ U(J, {
329
+ return /* @__PURE__ */ G(X, {
329
330
  open: e,
330
331
  onOpenChange: t,
331
- children: /* @__PURE__ */ W(Y, {
332
+ children: /* @__PURE__ */ K(Z, {
332
333
  className: "sm:max-w-lg",
333
334
  children: [
334
- /* @__PURE__ */ W(te, { children: [/* @__PURE__ */ U(ne, { children: "Cite in a story" }), /* @__PURE__ */ W(X, { children: [
335
+ /* @__PURE__ */ K(ne, { children: [/* @__PURE__ */ G(re, { children: "Cite in a story" }), /* @__PURE__ */ K(ee, { children: [
335
336
  "Attach “",
336
337
  n.title,
337
338
  "” to a story as an archival-record citation."
338
339
  ] })] }),
339
- /* @__PURE__ */ W("div", {
340
+ /* @__PURE__ */ K("div", {
340
341
  className: "flex flex-col gap-3 py-2",
341
342
  children: [
342
- /* @__PURE__ */ U(q, {
343
+ /* @__PURE__ */ G(Y, {
343
344
  value: a,
344
345
  onChange: (e) => o(e.target.value),
345
346
  placeholder: "Search stories…",
346
347
  "aria-label": "Search stories"
347
348
  }),
348
- /* @__PURE__ */ U("div", {
349
+ /* @__PURE__ */ G("div", {
349
350
  className: "flex max-h-[50vh] flex-col gap-1.5 overflow-y-auto",
350
- children: r.isLoading ? /* @__PURE__ */ U(c, {
351
+ children: r.isLoading ? /* @__PURE__ */ G(c, {
351
352
  label: "Loading stories…",
352
353
  className: "min-h-[8rem]"
353
- }) : g.length === 0 ? /* @__PURE__ */ U("p", {
354
+ }) : g.length === 0 ? /* @__PURE__ */ G("p", {
354
355
  className: "py-8 text-center text-sm text-text-tertiary",
355
356
  children: m.length === 0 ? "No stories yet — draft a story first." : "No stories match your search."
356
- }) : g.map((e) => /* @__PURE__ */ W("button", {
357
+ }) : g.map((e) => /* @__PURE__ */ K("button", {
357
358
  type: "button",
358
- onClick: () => b(e),
359
+ onClick: () => v(e),
359
360
  disabled: i.isPending,
360
361
  className: "flex items-center justify-between gap-3 rounded-xl border border-border-seam bg-bg-surface px-3 py-2.5 text-left transition-colors hover:bg-bg-sunken disabled:opacity-60",
361
- children: [/* @__PURE__ */ W("span", {
362
+ children: [/* @__PURE__ */ K("span", {
362
363
  className: "min-w-0",
363
- children: [/* @__PURE__ */ U("span", {
364
+ children: [/* @__PURE__ */ G("span", {
364
365
  className: "block truncate text-sm font-medium text-text-primary",
365
366
  children: e.title
366
- }), /* @__PURE__ */ U("span", {
367
+ }), /* @__PURE__ */ G("span", {
367
368
  className: "mt-0.5 block truncate text-xs text-text-tertiary",
368
369
  children: e.topic?.name ?? _(e.status)
369
370
  })]
370
- }), s === e.id ? /* @__PURE__ */ U(j, { className: "h-4 w-4 shrink-0 animate-spin text-text-tertiary" }) : /* @__PURE__ */ U(L, {
371
+ }), s === e.id ? /* @__PURE__ */ G(N, { className: "h-4 w-4 shrink-0 animate-spin text-text-tertiary" }) : /* @__PURE__ */ G(z, {
371
372
  className: "h-4 w-4 shrink-0 text-text-tertiary",
372
373
  "aria-hidden": "true"
373
374
  })]
374
375
  }, e.id))
375
376
  }),
376
- d && /* @__PURE__ */ U("p", {
377
+ d && /* @__PURE__ */ G("p", {
377
378
  className: "text-sm text-status-error-text",
378
379
  children: d
379
380
  })
380
381
  ]
381
382
  }),
382
- /* @__PURE__ */ U(Z, { children: /* @__PURE__ */ U(G, {
383
+ /* @__PURE__ */ G(te, { children: /* @__PURE__ */ G(q, {
383
384
  variant: "outline",
384
385
  onClick: () => t(!1),
385
386
  children: "Close"
@@ -388,6 +389,6 @@ function se({ open: e, onOpenChange: t, item: n }) {
388
389
  })
389
390
  });
390
391
  }
391
- export { ae as ArchiveItemDetailPage };
392
+ export { oe as ArchiveItemDetailPage };
392
393
 
393
394
  //# sourceMappingURL=ArchiveItemDetailPage.js.map