@parallelworks/tandem-web 0.139.0 → 0.139.2

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