@parallelworks/tandem-web 0.178.0 → 0.179.0

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.
@@ -2,127 +2,126 @@ import { areasQuery as e, knowledgeEntryQuery as t, knowledgeEventsQuery as n, k
2
2
  import { Timeline as a, TimelineItem as o, activityIcon as s } from "../../../components/ActivityTimeline.js";
3
3
  import { AttachButton as c, UploadStatus as l, useFileUpload as u } from "../../../components/Attachments.js";
4
4
  import { Editor as d } from "../../../components/Editor.js";
5
- import { KnowledgeStatus as f } from "../../../components/HoverCards.js";
6
- import { FileTextIcon as p, LibraryIcon as m, StatusIcon as h } from "../../../components/icons.js";
7
- import { uploadKnowledgeAttachment as g } from "../../../lib/attachments.js";
8
- import { docRef as _ } from "../../../lib/docs.js";
9
- import { headingAnchor as v } from "../../../lib/glossary.js";
10
- import { EntryDialog as y, useKnowledgeActions as ee, useKnowledgeMenu as b } from "../../../lib/knowledge.js";
5
+ import { FileTextIcon as f, LibraryIcon as p, StatusIcon as m } from "../../../components/icons.js";
6
+ import { uploadKnowledgeAttachment as h } from "../../../lib/attachments.js";
7
+ import { docRef as g } from "../../../lib/docs.js";
8
+ import { headingAnchor as _ } from "../../../lib/glossary.js";
9
+ import { EntryDialog as v, useKnowledgeActions as y, useKnowledgeMenu as b } from "../../../lib/knowledge.js";
11
10
  import { termRef as x } from "../../../lib/knowledgeKinds.js";
12
- import { usePageTitle as te } from "../../../lib/pageTitle.js";
13
- import { usePeople as S } from "../../../lib/people.js";
14
- import { useCan as C } from "../../../lib/roles.js";
15
- import { Link as w, useNavigate as T } from "../../../lib/router.js";
16
- import { useTime as E } from "../../../lib/time.js";
17
- import { Route as D } from "./_term.js";
18
- import { Button as O, ErrorText as k, PageHeader as ne, Section as A, TitleInput as j, Tooltip as M, useOpenMenu as N } from "@parallelworks/ui";
19
- import { Suspense as P, useCallback as F, useMemo as I, useRef as L, useState as R } from "react";
20
- import { useErrorMessage as z } from "@parallelworks/problem/react";
21
- import { useTranslations as B } from "use-intl";
22
- import { Fragment as V, jsx as H, jsxs as U } from "react/jsx-runtime";
23
- import { useQuery as W, useSuspenseQuery as G } from "@tanstack/react-query";
24
- import { MoreButton as K } from "@parallelworks/ui/list";
11
+ import { usePageTitle as S } from "../../../lib/pageTitle.js";
12
+ import { usePeople as C } from "../../../lib/people.js";
13
+ import { useCan as ee } from "../../../lib/roles.js";
14
+ import { Link as w, useNavigate as te } from "../../../lib/router.js";
15
+ import { useTime as T } from "../../../lib/time.js";
16
+ import { Route as E } from "./_term.js";
17
+ import { Button as D, ErrorText as O, PageHeader as ne, Section as k, TitleInput as A, Tooltip as j, useOpenMenu as M } from "@parallelworks/ui";
18
+ import { Suspense as N, useCallback as P, useMemo as F, useRef as I, useState as L } from "react";
19
+ import { useErrorMessage as R } from "@parallelworks/problem/react";
20
+ import { useTranslations as z } from "use-intl";
21
+ import { Fragment as B, jsx as V, jsxs as H } from "react/jsx-runtime";
22
+ import { useQuery as U, useSuspenseQuery as W } from "@tanstack/react-query";
23
+ import { MoreButton as G } from "@parallelworks/ui/list";
25
24
  // src/routes/$workspace/knowledge/$term.tsx?tsr-split=component
26
- function q() {
27
- let { workspace: e, term: n } = D.useParams(), r = B("knowledge"), a = B("common"), o = T(), s = N(), f = z(), { data: p } = G(t(e, n)), { data: h } = G(i(e)), _ = ee(e), v = C(e, "edit_docs"), S = v && !p.archivedAt, [E, A] = R(null), M = F((e) => A(e), []), W = b(e, M), q = L(null), Z = u((t) => g(e, p.id, t));
28
- te(p.name);
29
- let Q = I(() => h.filter((e) => e.supersededBy === p.id), [h, p.id]), $ = (e) => _.update.mutate({
30
- id: p.id,
25
+ function K() {
26
+ let { workspace: e, term: n } = E.useParams(), r = z("knowledge"), a = z("common"), o = te(), s = M(), f = R(), { data: m } = W(t(e, n)), { data: g } = W(i(e)), _ = y(e), C = ee(e, "edit_docs"), T = C && !m.archivedAt, [k, j] = L(null), U = P((e) => j(e), []), K = b(e, U), X = I(null), Z = u((t) => h(e, m.id, t));
27
+ S(m.name);
28
+ let Q = F(() => g.filter((e) => e.supersededBy === m.id), [g, m.id]), $ = (e) => _.update.mutate({
29
+ id: m.id,
31
30
  ...e,
32
- ifVersion: p.version
33
- }), re = p.status === "superseded";
34
- return /* @__PURE__ */ U("div", {
31
+ ifVersion: m.version
32
+ }), re = m.status === "superseded";
33
+ return /* @__PURE__ */ H("div", {
35
34
  className: "flex h-full min-h-0 flex-col",
36
35
  children: [
37
- /* @__PURE__ */ H(ne, {
36
+ /* @__PURE__ */ V(ne, {
38
37
  heading: !1,
39
38
  breadcrumbs: [{
40
39
  label: r("title"),
41
40
  href: `/${e}/knowledge`
42
41
  }, {
43
- label: p.name,
44
- icon: /* @__PURE__ */ H(m, { className: "size-4 text-muted-foreground" })
42
+ label: m.name,
43
+ icon: /* @__PURE__ */ V(p, { className: "size-4 text-muted-foreground" })
45
44
  }],
46
- titleActions: /* @__PURE__ */ H(K, {
47
- items: () => W(p),
48
- label: a("moreActionsFor", { name: p.name }),
45
+ titleActions: /* @__PURE__ */ V(G, {
46
+ items: () => K(m),
47
+ label: a("moreActionsFor", { name: m.name }),
49
48
  visible: !0
50
49
  }),
51
- actions: /* @__PURE__ */ U(V, { children: [_.update.isPending && /* @__PURE__ */ H("span", {
50
+ actions: /* @__PURE__ */ H(B, { children: [_.update.isPending && /* @__PURE__ */ V("span", {
52
51
  className: "text-xs text-muted-foreground",
53
52
  role: "status",
54
53
  children: a("saving")
55
- }), S && /* @__PURE__ */ H(O, {
54
+ }), T && /* @__PURE__ */ V(D, {
56
55
  type: "button",
57
56
  size: "sm",
58
- onClick: () => M({
57
+ onClick: () => U({
59
58
  kind: "edit",
60
- entry: p
59
+ entry: m
61
60
  }),
62
61
  children: r("editDetails")
63
62
  })] })
64
63
  }),
65
- /* @__PURE__ */ H("div", {
64
+ /* @__PURE__ */ V("div", {
66
65
  className: "min-h-0 flex-1 overflow-y-auto",
67
- children: /* @__PURE__ */ U("article", {
66
+ children: /* @__PURE__ */ H("article", {
68
67
  className: "mx-auto w-full max-w-3xl px-4 pt-6 pb-20 md:px-8 md:pt-10",
69
68
  onContextMenu: (e) => {
70
- e.target instanceof Element && e.target.closest("textarea, .ProseMirror") || s(e, W(p));
69
+ e.target instanceof Element && e.target.closest("textarea, .ProseMirror") || s(e, K(m));
71
70
  },
72
71
  children: [
73
- p.archivedAt && /* @__PURE__ */ U("div", {
72
+ m.archivedAt && /* @__PURE__ */ H("div", {
74
73
  className: "mb-6 flex items-center gap-3 rounded-xl border border-border bg-muted px-3 py-2 text-sm",
75
- children: [/* @__PURE__ */ H("span", {
74
+ children: [/* @__PURE__ */ V("span", {
76
75
  className: "min-w-0 flex-1",
77
76
  children: r("archivedNotice")
78
- }), v && /* @__PURE__ */ H(O, {
77
+ }), C && /* @__PURE__ */ V(D, {
79
78
  type: "button",
80
79
  size: "sm",
81
- onClick: () => _.restore.mutate(p.id),
80
+ onClick: () => _.restore.mutate(m.id),
82
81
  children: r("restore")
83
82
  })]
84
83
  }),
85
- /* @__PURE__ */ H(J, {
84
+ /* @__PURE__ */ V(q, {
86
85
  workspace: e,
87
- entry: p
86
+ entry: m
88
87
  }),
89
- /* @__PURE__ */ H("h1", {
88
+ /* @__PURE__ */ V("h1", {
90
89
  className: "sr-only",
91
- children: p.name
90
+ children: m.name
92
91
  }),
93
- /* @__PURE__ */ H(j, {
94
- value: p.name,
92
+ /* @__PURE__ */ V(A, {
93
+ value: m.name,
95
94
  onCommit: (e) => $({ name: e }),
96
- readOnly: !S,
95
+ readOnly: !T,
97
96
  "aria-label": r("name"),
98
97
  maxLength: 100,
99
98
  className: re ? "mt-2 text-muted-foreground line-through" : "mt-2"
100
99
  }),
101
- p.aliases.length > 0 && /* @__PURE__ */ H("p", {
100
+ m.aliases.length > 0 && /* @__PURE__ */ V("p", {
102
101
  className: "mt-1 text-sm text-muted-foreground",
103
- children: r("alsoCalled", { names: p.aliases.join(", ") })
102
+ children: r("alsoCalled", { names: m.aliases.join(", ") })
104
103
  }),
105
- /* @__PURE__ */ H(j, {
106
- value: p.definition,
104
+ /* @__PURE__ */ V(A, {
105
+ value: m.definition,
107
106
  onCommit: (e) => $({ definition: e }),
108
- readOnly: !S,
107
+ readOnly: !T,
109
108
  "aria-label": r("definition"),
110
109
  placeholder: r("definitionPlaceholder"),
111
110
  maxLength: 1e3,
112
111
  size: "lg",
113
112
  className: "mt-3 text-base leading-relaxed font-normal tracking-normal text-muted-foreground"
114
113
  }),
115
- (p.supersededBy || Q.length > 0) && /* @__PURE__ */ U("div", {
114
+ (m.supersededBy || Q.length > 0) && /* @__PURE__ */ H("div", {
116
115
  className: "mt-3 space-y-1 text-sm",
117
- children: [p.supersededBy && /* @__PURE__ */ H(w, {
116
+ children: [m.supersededBy && /* @__PURE__ */ V(w, {
118
117
  to: "/$workspace/knowledge/$term",
119
118
  params: {
120
119
  workspace: e,
121
- term: x(h.find((e) => e.id === p.supersededBy) ?? { id: p.supersededBy })
120
+ term: x(g.find((e) => e.id === m.supersededBy) ?? { id: m.supersededBy })
122
121
  },
123
122
  className: "block text-primary hover:underline",
124
- children: r("supersededBy", { name: p.supersededByName ?? "" })
125
- }), Q.map((t) => /* @__PURE__ */ H(w, {
123
+ children: r("supersededBy", { name: m.supersededByName ?? "" })
124
+ }), Q.map((t) => /* @__PURE__ */ V(w, {
126
125
  to: "/$workspace/knowledge/$term",
127
126
  params: {
128
127
  workspace: e,
@@ -132,120 +131,120 @@ function q() {
132
131
  children: r("replaces", { name: t.name })
133
132
  }, t.id))]
134
133
  }),
135
- /* @__PURE__ */ U("section", {
134
+ /* @__PURE__ */ H("section", {
136
135
  "aria-label": r("page"),
137
136
  className: "mt-8 border-t border-border pt-6",
138
137
  children: [
139
- S || p.body ? /* @__PURE__ */ H(d, {
140
- value: p.body ?? "",
141
- editable: S,
138
+ T || m.body ? /* @__PURE__ */ V(d, {
139
+ value: m.body ?? "",
140
+ editable: T,
142
141
  placeholder: r("pagePlaceholder"),
143
142
  label: r("page"),
144
- onBlur: (e) => e !== (p.body ?? "") && $({ body: e }),
145
- onFiles: (e, t) => Z.upload(q.current, e, t),
143
+ onBlur: (e) => e !== (m.body ?? "") && $({ body: e }),
144
+ onFiles: (e, t) => Z.upload(X.current, e, t),
146
145
  onEditor: (e) => {
147
- q.current = e;
146
+ X.current = e;
148
147
  },
149
148
  className: "min-h-32 [&>:first-child]:mt-0"
150
- }) : /* @__PURE__ */ H("p", {
149
+ }) : /* @__PURE__ */ V("p", {
151
150
  className: "text-sm text-muted-foreground",
152
151
  children: r("noPage")
153
152
  }),
154
- S && /* @__PURE__ */ U("div", {
153
+ T && /* @__PURE__ */ H("div", {
155
154
  className: "mt-3 flex items-center gap-2",
156
155
  children: [
157
- /* @__PURE__ */ H(c, { onFiles: (e) => Z.upload(q.current, e) }),
158
- /* @__PURE__ */ H("span", {
156
+ /* @__PURE__ */ V(c, { onFiles: (e) => Z.upload(X.current, e) }),
157
+ /* @__PURE__ */ V("span", {
159
158
  className: "text-xs text-muted-foreground",
160
159
  children: r("attachHint")
161
160
  }),
162
- /* @__PURE__ */ H("span", {
161
+ /* @__PURE__ */ V("span", {
163
162
  className: "ml-auto",
164
- children: /* @__PURE__ */ H(l, {
163
+ children: /* @__PURE__ */ V(l, {
165
164
  pending: Z.pending,
166
165
  error: Z.error
167
166
  })
168
167
  })
169
168
  ]
170
169
  }),
171
- _.update.isError && /* @__PURE__ */ H(k, {
170
+ _.update.isError && /* @__PURE__ */ V(O, {
172
171
  className: "mt-2",
173
172
  children: f(_.update.error)
174
173
  })
175
174
  ]
176
175
  }),
177
- /* @__PURE__ */ H(P, { children: /* @__PURE__ */ H(Y, {
176
+ /* @__PURE__ */ V(N, { children: /* @__PURE__ */ V(J, {
178
177
  workspace: e,
179
- entryId: p.id
178
+ entryId: m.id
180
179
  }) }),
181
- /* @__PURE__ */ H(P, { children: /* @__PURE__ */ H(X, {
180
+ /* @__PURE__ */ V(N, { children: /* @__PURE__ */ V(Y, {
182
181
  workspace: e,
183
- entryId: p.id
182
+ entryId: m.id
184
183
  }) })
185
184
  ]
186
185
  })
187
186
  }),
188
- E && /* @__PURE__ */ H(P, { children: /* @__PURE__ */ H(y, {
187
+ k && /* @__PURE__ */ V(N, { children: /* @__PURE__ */ V(v, {
189
188
  workspace: e,
190
- mode: E,
191
- onClose: () => A(null),
189
+ mode: k,
190
+ onClose: () => j(null),
192
191
  onSaved: (t) => o({
193
192
  to: "/$workspace/knowledge/$term",
194
193
  params: {
195
194
  workspace: e,
196
195
  term: x(t)
197
196
  },
198
- replace: t.id === p.id
197
+ replace: t.id === m.id
199
198
  })
200
199
  }) })
201
200
  ]
202
201
  });
203
202
  }
204
- function J({ workspace: t, entry: n }) {
205
- let r = B("knowledge"), { actorName: i } = S(t), a = E(), { data: o = [] } = W(e(t)), s = o.find((e) => e.id === n.areaId), c = n.source.doc, l = [
203
+ function q({ workspace: t, entry: n }) {
204
+ let r = z("knowledge"), { actorName: i } = C(t), a = T(), { data: o = [] } = U(e(t)), s = o.find((e) => e.id === n.areaId), c = n.source.doc, l = [
206
205
  ...n.kind === "term" ? [] : [r(`kind.${n.kind}`)],
207
206
  ...s ? [s.title] : [],
208
207
  r("writtenBy", { name: i(n.creator) }),
209
- /* @__PURE__ */ H(M, {
208
+ /* @__PURE__ */ V(j, {
210
209
  content: a.full(n.updatedAt),
211
- children: /* @__PURE__ */ H("time", {
210
+ children: /* @__PURE__ */ V("time", {
212
211
  dateTime: n.updatedAt,
213
212
  children: r("updated", { when: a.relative(n.updatedAt) })
214
213
  })
215
214
  }, "updated")
216
215
  ];
217
- return /* @__PURE__ */ U("div", {
216
+ return /* @__PURE__ */ H("div", {
218
217
  className: "space-y-1 text-xs text-muted-foreground",
219
- children: [/* @__PURE__ */ U("p", {
218
+ children: [/* @__PURE__ */ V("p", {
220
219
  className: "flex flex-wrap items-center gap-x-1.5 gap-y-1",
221
- children: [(n.kind !== "term" || n.status !== "decided") && /* @__PURE__ */ H(f, { status: n.status }), l.map((e, t) => /* @__PURE__ */ U("span", {
220
+ children: l.map((e, t) => /* @__PURE__ */ H("span", {
222
221
  className: "inline-flex items-center gap-1.5",
223
- children: [t > 0 && /* @__PURE__ */ H("span", {
222
+ children: [t > 0 && /* @__PURE__ */ V("span", {
224
223
  "aria-hidden": "true",
225
224
  children: "·"
226
225
  }), e]
227
- }, t))]
228
- }), (c || n.source.identifier) && /* @__PURE__ */ U("p", {
226
+ }, t))
227
+ }), (c || n.source.identifier) && /* @__PURE__ */ H("p", {
229
228
  className: "flex flex-wrap items-center gap-x-3 gap-y-1",
230
229
  children: [
231
- c && /* @__PURE__ */ U(w, {
230
+ c && /* @__PURE__ */ H(w, {
232
231
  to: "/$workspace/docs/$doc",
233
232
  params: {
234
233
  workspace: t,
235
- doc: _(c)
234
+ doc: g(c)
236
235
  },
237
- ...n.source.section && { hash: v(n.source.section) },
236
+ ...n.source.section && { hash: _(n.source.section) },
238
237
  className: "inline-flex items-center gap-1 hover:text-foreground",
239
- children: [/* @__PURE__ */ H(p, { className: "size-3" }), n.source.section ? r("sourceSection", {
238
+ children: [/* @__PURE__ */ V(f, { className: "size-3" }), n.source.section ? r("sourceSection", {
240
239
  doc: c.title,
241
240
  section: n.source.section
242
241
  }) : c.title]
243
242
  }),
244
- n.source.missing && /* @__PURE__ */ H("span", {
243
+ n.source.missing && /* @__PURE__ */ V("span", {
245
244
  className: "text-warning",
246
245
  children: r("sourceMissing", { section: n.source.section ?? "" })
247
246
  }),
248
- n.source.identifier && /* @__PURE__ */ U(w, {
247
+ n.source.identifier && /* @__PURE__ */ H(w, {
249
248
  to: "/$workspace/issues/$identifier",
250
249
  params: {
251
250
  workspace: t,
@@ -262,25 +261,25 @@ function J({ workspace: t, entry: n }) {
262
261
  })]
263
262
  });
264
263
  }
265
- function Y({ workspace: e, entryId: t }) {
266
- let n = B("knowledge"), { data: i } = W(r(e, t));
264
+ function J({ workspace: e, entryId: t }) {
265
+ let n = z("knowledge"), { data: i } = U(r(e, t));
267
266
  if (!i) return null;
268
267
  let a = i.issues.length + i.docs.length, o = "flex min-h-10 items-center gap-2.5 px-3 py-2 text-sm hover:bg-muted focus-visible:outline-offset-[-2px]";
269
- return /* @__PURE__ */ U("section", {
268
+ return /* @__PURE__ */ H("section", {
270
269
  "aria-label": n("mentionedIn"),
271
270
  className: "mt-12",
272
- children: [/* @__PURE__ */ U("h2", {
271
+ children: [/* @__PURE__ */ H("h2", {
273
272
  className: "mb-3 flex items-baseline gap-2 text-base font-semibold",
274
- children: [n("mentionedIn"), a > 0 && /* @__PURE__ */ H("span", {
273
+ children: [n("mentionedIn"), a > 0 && /* @__PURE__ */ V("span", {
275
274
  className: "text-xs font-normal text-muted-foreground tabular-nums",
276
275
  children: a
277
276
  })]
278
- }), a === 0 ? /* @__PURE__ */ H("p", {
277
+ }), a === 0 ? /* @__PURE__ */ V("p", {
279
278
  className: "text-sm text-muted-foreground",
280
279
  children: n("mentionedNone")
281
- }) : /* @__PURE__ */ U("ul", {
280
+ }) : /* @__PURE__ */ H("ul", {
282
281
  className: "divide-y divide-border overflow-hidden rounded-xl border border-border bg-card",
283
- children: [i.issues.map((t) => /* @__PURE__ */ H("li", { children: /* @__PURE__ */ U(w, {
282
+ children: [i.issues.map((t) => /* @__PURE__ */ V("li", { children: /* @__PURE__ */ H(w, {
284
283
  to: "/$workspace/issues/$identifier",
285
284
  params: {
286
285
  workspace: e,
@@ -288,33 +287,33 @@ function Y({ workspace: e, entryId: t }) {
288
287
  },
289
288
  className: o,
290
289
  children: [
291
- /* @__PURE__ */ H(h, {
290
+ /* @__PURE__ */ V(m, {
292
291
  category: t.statusCategory,
293
292
  className: "size-3.5 shrink-0"
294
293
  }),
295
- /* @__PURE__ */ H("span", {
294
+ /* @__PURE__ */ V("span", {
296
295
  className: "min-w-24 shrink-0 text-xs whitespace-nowrap text-muted-foreground tabular-nums",
297
296
  children: t.identifier
298
297
  }),
299
- /* @__PURE__ */ H("span", {
298
+ /* @__PURE__ */ V("span", {
300
299
  className: "min-w-0 truncate",
301
300
  children: t.title
302
301
  })
303
302
  ]
304
- }) }, t.identifier)), i.docs.map((t) => /* @__PURE__ */ H("li", { children: /* @__PURE__ */ U(w, {
303
+ }) }, t.identifier)), i.docs.map((t) => /* @__PURE__ */ V("li", { children: /* @__PURE__ */ H(w, {
305
304
  to: "/$workspace/docs/$doc",
306
305
  params: {
307
306
  workspace: e,
308
- doc: _(t)
307
+ doc: g(t)
309
308
  },
310
309
  className: o,
311
310
  children: [
312
- /* @__PURE__ */ H(p, { className: "size-3.5 shrink-0 text-muted-foreground" }),
313
- /* @__PURE__ */ H("span", {
311
+ /* @__PURE__ */ V(f, { className: "size-3.5 shrink-0 text-muted-foreground" }),
312
+ /* @__PURE__ */ V("span", {
314
313
  className: "w-16 shrink-0 text-xs text-muted-foreground",
315
314
  children: n("doc")
316
315
  }),
317
- /* @__PURE__ */ H("span", {
316
+ /* @__PURE__ */ V("span", {
318
317
  className: "min-w-0 truncate",
319
318
  children: t.title
320
319
  })
@@ -323,27 +322,27 @@ function Y({ workspace: e, entryId: t }) {
323
322
  })]
324
323
  });
325
324
  }
326
- function X({ workspace: e, entryId: t }) {
327
- let r = B("knowledge.history"), { data: i = [] } = W(n(e, t)), { actorName: c } = S(e);
328
- return i.length === 0 ? null : /* @__PURE__ */ H(A, {
325
+ function Y({ workspace: e, entryId: t }) {
326
+ let r = z("knowledge.history"), { data: i = [] } = U(n(e, t)), { actorName: c } = C(e);
327
+ return i.length === 0 ? null : /* @__PURE__ */ V(k, {
329
328
  title: r("title"),
330
329
  variant: "bare",
331
330
  defaultOpen: !1,
332
331
  headingLevel: 2,
333
332
  className: "mt-10",
334
- children: /* @__PURE__ */ H(a, { children: i.map((t) => /* @__PURE__ */ H(o, {
333
+ children: /* @__PURE__ */ V(a, { children: i.map((t) => /* @__PURE__ */ V(o, {
335
334
  workspace: e,
336
335
  icon: s(t.type, t.data),
337
336
  actor: t.actor,
338
337
  at: t.createdAt,
339
- children: Z(r, t, c(t.actor))
338
+ children: X(r, t, c(t.actor))
340
339
  }, t.id)) })
341
340
  });
342
341
  }
343
- function Z(e, t, n) {
342
+ function X(e, t, n) {
344
343
  let r = t.data ?? {}, i = {
345
344
  name: n,
346
- actor: (e) => /* @__PURE__ */ H("span", {
345
+ actor: (e) => /* @__PURE__ */ V("span", {
347
346
  className: "font-medium text-foreground",
348
347
  children: e
349
348
  })
@@ -356,13 +355,10 @@ function Z(e, t, n) {
356
355
  });
357
356
  case "knowledge.archived": return e.rich("archived", i);
358
357
  case "knowledge.restored": return e.rich("restored", i);
359
- default: {
360
- let t = r.status;
361
- return t?.to === "decided" ? e.rich("decided", i) : t?.to === "proposed" ? e.rich("proposed", i) : e.rich("revised", {
362
- ...i,
363
- fields: Object.keys(r).length
364
- });
365
- }
358
+ default: return e.rich("revised", {
359
+ ...i,
360
+ fields: Object.keys(r).length
361
+ });
366
362
  }
367
363
  }
368
- export { q as component };
364
+ export { K as component };