@parallelworks/tandem-web 0.178.1 → 0.179.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.
@@ -1,106 +1,101 @@
1
1
  import { termRef as e } from "../lib/knowledgeKinds.js";
2
2
  import { Link as t } from "../lib/router.js";
3
3
  import { AnsweredDecision as n } from "./AgentWork.js";
4
- import { KnowledgeStatus as r } from "./HoverCards.js";
5
- import { ChevronRightIcon as i } from "./icons.js";
6
- import { useState as a } from "react";
7
- import { useTranslations as o } from "use-intl";
8
- import { jsx as s, jsxs as c } from "react/jsx-runtime";
4
+ import { ChevronRightIcon as r } from "./icons.js";
5
+ import { useState as i } from "react";
6
+ import { useTranslations as a } from "use-intl";
7
+ import { jsx as o, jsxs as s } from "react/jsx-runtime";
9
8
  // src/components/AreaWork.tsx
10
- var l = (...e) => e.filter(Boolean).join(" ");
11
- function u({ workspace: n, entry: i, isNew: a }) {
12
- let l = o("knowledge"), u = o("areaPage");
13
- return /* @__PURE__ */ s("li", { children: /* @__PURE__ */ c(t, {
9
+ var c = (...e) => e.filter(Boolean).join(" ");
10
+ function l({ workspace: n, entry: r, isNew: i }) {
11
+ let c = a("knowledge"), l = a("areaPage");
12
+ return /* @__PURE__ */ o("li", { children: /* @__PURE__ */ s(t, {
14
13
  to: "/$workspace/knowledge/$term",
15
14
  params: {
16
15
  workspace: n,
17
- term: e(i)
16
+ term: e(r)
18
17
  },
19
18
  className: "flex min-w-0 items-baseline gap-2 px-3 py-2 text-sm hover:bg-muted",
20
19
  children: [
21
- /* @__PURE__ */ s("span", {
20
+ /* @__PURE__ */ o("span", {
22
21
  className: "shrink-0 font-medium",
23
- children: i.name
22
+ children: r.name
24
23
  }),
25
- /* @__PURE__ */ s("span", {
24
+ /* @__PURE__ */ o("span", {
26
25
  className: "shrink-0 text-xs text-muted-foreground",
27
- children: l(`kind.${i.kind}`)
26
+ children: c(`kind.${r.kind}`)
28
27
  }),
29
- i.definition !== i.name && /* @__PURE__ */ s("span", {
28
+ r.definition !== r.name && /* @__PURE__ */ o("span", {
30
29
  className: "min-w-0 truncate text-muted-foreground",
31
- children: i.definition
32
- }),
33
- i.status === "added" && /* @__PURE__ */ s("span", {
34
- className: "ml-auto shrink-0",
35
- children: /* @__PURE__ */ s(r, { status: i.status })
30
+ children: r.definition
36
31
  }),
37
- a && /* @__PURE__ */ s("span", {
32
+ i && /* @__PURE__ */ o("span", {
38
33
  className: "ml-auto shrink-0 text-[11px] font-medium text-primary",
39
- children: u("new")
34
+ children: l("new")
40
35
  })
41
36
  ]
42
37
  }) });
43
38
  }
44
- var d = (e) => e.replace(/[*_`#>[\]]/g, "").replace(/\s+/g, " ").trim();
45
- function f({ workspace: e, decision: t, isNew: r, notInDocs: u }) {
46
- let f = o("areaPage"), [p, m] = a(!1), h = [t.options.find((e) => e.id === t.answer?.optionId)?.label, t.answer?.text && d(t.answer.text)].filter(Boolean).join(". ");
47
- return /* @__PURE__ */ c("li", { children: [/* @__PURE__ */ c("button", {
39
+ var u = (e) => e.replace(/[*_`#>[\]]/g, "").replace(/\s+/g, " ").trim();
40
+ function d({ workspace: e, decision: t, isNew: l, notInDocs: d }) {
41
+ let f = a("areaPage"), [p, m] = i(!1), h = [t.options.find((e) => e.id === t.answer?.optionId)?.label, t.answer?.text && u(t.answer.text)].filter(Boolean).join(". ");
42
+ return /* @__PURE__ */ s("li", { children: [/* @__PURE__ */ s("button", {
48
43
  type: "button",
49
44
  "aria-expanded": p,
50
45
  onClick: () => m((e) => !e),
51
46
  className: "flex w-full min-w-0 items-baseline gap-2 px-3 py-2 text-left text-sm hover:bg-muted",
52
47
  children: [
53
- /* @__PURE__ */ s(i, { className: l("size-3 shrink-0 self-center text-muted-foreground", p && "rotate-90") }),
54
- /* @__PURE__ */ s("span", {
48
+ /* @__PURE__ */ o(r, { className: c("size-3 shrink-0 self-center text-muted-foreground", p && "rotate-90") }),
49
+ /* @__PURE__ */ o("span", {
55
50
  className: "min-w-0 truncate text-muted-foreground",
56
- children: d(t.prompt)
51
+ children: u(t.prompt)
57
52
  }),
58
- /* @__PURE__ */ s("span", {
53
+ /* @__PURE__ */ o("span", {
59
54
  className: "min-w-0 shrink-0 truncate font-medium max-sm:hidden",
60
55
  children: h
61
56
  }),
62
- /* @__PURE__ */ c("span", {
57
+ /* @__PURE__ */ s("span", {
63
58
  className: "ml-auto flex shrink-0 items-center gap-2",
64
- children: [u && /* @__PURE__ */ s("span", {
59
+ children: [d && /* @__PURE__ */ o("span", {
65
60
  className: "rounded border border-border px-1.5 text-[11px] text-muted-foreground",
66
61
  children: f("notInDocs")
67
- }), r && /* @__PURE__ */ s("span", {
62
+ }), l && /* @__PURE__ */ o("span", {
68
63
  className: "text-[11px] font-medium text-primary",
69
64
  children: f("new")
70
65
  })]
71
66
  })
72
67
  ]
73
- }), p && /* @__PURE__ */ s("div", {
68
+ }), p && /* @__PURE__ */ o("div", {
74
69
  className: "px-3 pb-3",
75
- children: /* @__PURE__ */ s(n, {
70
+ children: /* @__PURE__ */ o(n, {
76
71
  workspace: e,
77
72
  decision: t,
78
73
  showIssue: !0
79
74
  })
80
75
  })] });
81
76
  }
82
- function p({ title: e, count: t, icon: n, extra: r, action: i, bare: a = !1, children: o }) {
83
- return /* @__PURE__ */ c("section", {
77
+ function f({ title: e, count: t, icon: n, extra: r, action: i, bare: a = !1, children: c }) {
78
+ return /* @__PURE__ */ s("section", {
84
79
  "aria-label": e,
85
- children: [/* @__PURE__ */ c("h2", {
80
+ children: [/* @__PURE__ */ s("h2", {
86
81
  className: "sticky top-0 z-10 flex h-9 items-center gap-2 border-b border-border bg-background px-4 text-xs font-medium md:px-5",
87
82
  children: [
88
83
  n,
89
- /* @__PURE__ */ s("span", {
84
+ /* @__PURE__ */ o("span", {
90
85
  className: "truncate",
91
86
  children: e
92
87
  }),
93
- /* @__PURE__ */ s("span", {
88
+ /* @__PURE__ */ o("span", {
94
89
  className: "text-muted-foreground tabular-nums",
95
90
  children: t
96
91
  }),
97
92
  r,
98
- i && /* @__PURE__ */ s("span", {
93
+ i && /* @__PURE__ */ o("span", {
99
94
  className: "ml-auto flex",
100
95
  children: i
101
96
  })
102
97
  ]
103
- }), t > 0 && (a ? o : /* @__PURE__ */ s("ul", { children: o }))]
98
+ }), t > 0 && (a ? c : /* @__PURE__ */ o("ul", { children: c }))]
104
99
  });
105
100
  }
106
- export { p as AreaGroup, f as FoldedAnswer, u as KnowledgeRow };
101
+ export { f as AreaGroup, d as FoldedAnswer, l as KnowledgeRow };
@@ -13,7 +13,7 @@ import w from "@dagrejs/dagre";
13
13
  import { Handle as T, MarkerType as E, Position as D, ReactFlow as O, ReactFlowProvider as k, useReactFlow as A } from "@xyflow/react";
14
14
  import "@xyflow/react/dist/style.css";
15
15
  // src/components/Graph.tsx
16
- var j = 196, M = 48, N = 22, P = (e) => e.kind === "doc" ? "bg-primary" : e.kind === "issue" ? e.status === "completed" || e.status === "canceled" ? "bg-muted-foreground/50" : "bg-primary" : e.status === "decided" ? "bg-success" : e.status === "added" ? "bg-warning" : "bg-muted-foreground/50", F = {
16
+ var j = 196, M = 48, N = 22, P = (e) => e.kind === "doc" ? "bg-primary" : e.kind === "issue" ? e.status === "completed" || e.status === "canceled" ? "bg-muted-foreground/50" : "bg-primary" : e.status === "superseded" ? "bg-muted-foreground/50" : "bg-success", F = {
17
17
  doc: c,
18
18
  issue: u,
19
19
  entry: l
@@ -13,15 +13,15 @@ import { DocIcon as y } from "./DocIcon.js";
13
13
  import { termCaretEvent as b } from "./editorPlugins.js";
14
14
  import { FileTextIcon as x } from "./icons.js";
15
15
  import { PersonCard as S } from "./PersonHoverCard.js";
16
- import { HoverCard as C, Loader as w, StatusLabel as T } from "@parallelworks/ui";
17
- import { useEffect as E, useRef as D, useState as O } from "react";
18
- import { useTranslations as k } from "use-intl";
19
- import { Fragment as A, jsx as j, jsxs as M } from "react/jsx-runtime";
20
- import { useQuery as N, useQueryClient as P } from "@tanstack/react-query";
16
+ import { HoverCard as C, Loader as w } from "@parallelworks/ui";
17
+ import { useEffect as T, useRef as E, useState as D } from "react";
18
+ import { useTranslations as O } from "use-intl";
19
+ import { Fragment as k, jsx as A, jsxs as j } from "react/jsx-runtime";
20
+ import { useQuery as M, useQueryClient as N } from "@tanstack/react-query";
21
21
  // src/components/HoverCards.tsx
22
- var F = ".kb-term, .person-mention, .prose-issue a[href*=\"/docs/\"]", I = 300, L = 200;
23
- function R(e) {
24
- let t = e?.closest(F);
22
+ var P = ".kb-term, .person-mention, .prose-issue a[href*=\"/docs/\"]", F = 300, I = 200;
23
+ function L(e) {
24
+ let t = e?.closest(P);
25
25
  if (!t) return null;
26
26
  if (t.classList.contains("kb-term")) {
27
27
  let e = t.dataset.term;
@@ -46,8 +46,8 @@ function R(e) {
46
46
  key: c(r[1])
47
47
  } : null;
48
48
  }
49
- function z({ workspace: n }) {
50
- let [c, l] = O(null), d = D(null), p = D(void 0), { data: g } = N(i(n)), y = _(), x = D((e) => {});
49
+ function R({ workspace: n }) {
50
+ let [c, l] = D(null), d = E(null), p = E(void 0), { data: g } = M(i(n)), y = _(), x = E((e) => {});
51
51
  x.current = (e) => {
52
52
  let t = g?.find((t) => t.id === e);
53
53
  y({
@@ -57,23 +57,23 @@ function z({ workspace: n }) {
57
57
  term: t ? m(t) : e
58
58
  }
59
59
  });
60
- }, E(() => {
60
+ }, T(() => {
61
61
  u.set(g ?? []);
62
- }, [g]), E(() => () => u.set([]), []);
63
- let { data: w } = N(r(n));
64
- E(() => {
62
+ }, [g]), T(() => () => u.set([]), []);
63
+ let { data: w } = M(r(n));
64
+ T(() => {
65
65
  s.set(w ?? []);
66
- }, [w]), E(() => () => s.set([]), []);
67
- let { data: T } = N(a(n));
68
- E(() => {
69
- h.set((T ?? []).map((e) => e.user.username));
70
- }, [T]), E(() => () => h.set([]), []);
71
- let { data: k } = N(o(n));
72
- E(() => {
66
+ }, [w]), T(() => () => s.set([]), []);
67
+ let { data: O } = M(a(n));
68
+ T(() => {
69
+ h.set((O ?? []).map((e) => e.user.username));
70
+ }, [O]), T(() => () => h.set([]), []);
71
+ let { data: k } = M(o(n));
72
+ T(() => {
73
73
  v.set(k ?? []);
74
- }, [k]), E(() => () => v.set([]), []);
75
- let A = P();
76
- E(() => {
74
+ }, [k]), T(() => () => v.set([]), []);
75
+ let j = N();
76
+ T(() => {
77
77
  f.set(n, async (r) => {
78
78
  let { issues: i } = t(await e.POST("/api/v1/workspaces/{workspace}/issue-refs", {
79
79
  params: { path: { workspace: n } },
@@ -81,65 +81,75 @@ function z({ workspace: n }) {
81
81
  }));
82
82
  return new Map(i.map((e) => [e.identifier, e.issue]));
83
83
  });
84
- let r, i = A.getQueryCache().subscribe((e) => {
84
+ let r, i = j.getQueryCache().subscribe((e) => {
85
85
  e.type === "updated" && e.query.queryKey[2] === "issues" && (clearTimeout(r), r = setTimeout(() => f.refresh(), 1e3));
86
86
  });
87
87
  return () => {
88
88
  clearTimeout(r), i(), f.set("", void 0);
89
89
  };
90
- }, [n, A]);
91
- let M = D((e) => {});
92
- M.current = (e) => y({
90
+ }, [n, j]);
91
+ let P = E((e) => {});
92
+ P.current = (e) => y({
93
93
  to: "/$workspace/issues/$identifier",
94
94
  params: {
95
95
  workspace: n,
96
96
  identifier: e
97
97
  }
98
98
  });
99
- let F = D((e) => {});
100
- F.current = (e) => y({
99
+ let R = E((e) => {});
100
+ R.current = (e) => y({
101
101
  to: "/$workspace/teams/$key/issues",
102
102
  params: {
103
103
  workspace: n,
104
104
  key: e
105
105
  }
106
- }), E(() => {
106
+ }), T(() => {
107
107
  let e = (e, t) => {
108
108
  clearTimeout(p.current), p.current = setTimeout(e, t);
109
109
  }, t = (t) => {
110
110
  if (t.pointerType === "touch") return;
111
- let n = R(t.target);
112
- n && e(() => l(n), I);
111
+ let n = L(t.target);
112
+ n && e(() => l(n), F);
113
113
  }, n = (t) => {
114
114
  let n = t.relatedTarget;
115
- n && d.current?.contains(n) || R(t.target) && e(() => l(null), L);
115
+ n && d.current?.contains(n) || L(t.target) && e(() => l(null), I);
116
116
  }, r = (e) => {
117
- let t = R(e.target);
117
+ let t = L(e.target);
118
118
  t && (clearTimeout(p.current), l(t));
119
119
  }, i = (e) => {
120
120
  e.target.matches?.(".kb-term[tabindex], .prose-issue a[href*=\"/docs/\"]") && r(e);
121
121
  }, a = (e) => {
122
- let t = e.target.closest?.(".issue-mention"), n = t?.dataset.issue;
123
- if (t && n && !t.closest("a[href]") && (!t.closest("[contenteditable=\"true\"]") || e.metaKey || e.ctrlKey)) {
124
- e.preventDefault(), M.current(n);
125
- return;
122
+ let t = e.target.closest?.(".issue-mention"), n = t?.dataset.issue, i = t?.closest("a[href]");
123
+ if (t && n && (!i || i === t)) {
124
+ if ((e.metaKey || e.ctrlKey || e.shiftKey) && i) {
125
+ e.preventDefault(), window.open(i.href, "_blank", "noopener");
126
+ return;
127
+ }
128
+ if (!t.closest("[contenteditable=\"true\"]")) {
129
+ e.preventDefault(), P.current(n);
130
+ return;
131
+ }
126
132
  }
127
- let i = e.target.closest?.(".team-mention"), a = i?.dataset.team;
128
- if (i && a && (!i.closest("[contenteditable=\"true\"]") || e.metaKey || e.ctrlKey)) {
129
- e.preventDefault(), F.current(a);
133
+ let a = e.target.closest?.(".team-mention"), o = a?.dataset.team;
134
+ if (a && o && (!a.closest("[contenteditable=\"true\"]") || e.metaKey || e.ctrlKey)) {
135
+ e.preventDefault(), R.current(o);
130
136
  return;
131
137
  }
132
- let o = e.target.closest?.(".kb-term");
133
- if (!o) return;
134
- let s = o.dataset.term;
135
- s && (!o.closest("[contenteditable=\"true\"]") || e.metaKey || e.ctrlKey) ? (e.preventDefault(), l(null), x.current(s)) : r(e);
138
+ let s = e.target.closest?.(".kb-term");
139
+ if (!s) return;
140
+ let c = s.dataset.term;
141
+ c && (!s.closest("[contenteditable=\"true\"]") || e.metaKey || e.ctrlKey) ? (e.preventDefault(), l(null), x.current(c)) : r(e);
136
142
  }, o = (e) => {
143
+ if (e.button !== 1) return;
144
+ let t = e.target.closest?.("a.issue-mention[href]");
145
+ t?.closest("[contenteditable=\"true\"]") && (e.preventDefault(), window.open(t.href, "_blank", "noopener"));
146
+ }, s = (e) => {
137
147
  e.key === "Escape" && d.current?.isConnected && (e.stopPropagation(), e.preventDefault(), l((e) => (e?.el.tabIndex === 0 && e.el.focus(), null)));
138
148
  };
139
- return document.addEventListener("pointerover", t), document.addEventListener("pointerout", n), document.addEventListener("focusin", i), document.addEventListener("click", a), document.addEventListener(b, r), document.addEventListener("keydown", o, !0), () => {
140
- clearTimeout(p.current), document.removeEventListener("pointerover", t), document.removeEventListener("pointerout", n), document.removeEventListener("focusin", i), document.removeEventListener("click", a), document.removeEventListener(b, r), document.removeEventListener("keydown", o, !0);
149
+ return document.addEventListener("pointerover", t), document.addEventListener("pointerout", n), document.addEventListener("focusin", i), document.addEventListener("click", a), document.addEventListener("auxclick", o), document.addEventListener(b, r), document.addEventListener("keydown", s, !0), () => {
150
+ clearTimeout(p.current), document.removeEventListener("pointerover", t), document.removeEventListener("pointerout", n), document.removeEventListener("focusin", i), document.removeEventListener("click", a), document.removeEventListener("auxclick", o), document.removeEventListener(b, r), document.removeEventListener("keydown", s, !0);
141
151
  };
142
- }, []), E(() => {
152
+ }, []), T(() => {
143
153
  if (!c) return;
144
154
  let e = (e) => {
145
155
  let t = e.target;
@@ -147,88 +157,65 @@ function z({ workspace: n }) {
147
157
  };
148
158
  return document.addEventListener("pointerdown", e), () => document.removeEventListener("pointerdown", e);
149
159
  }, [c]);
150
- let z = c?.el.isConnected ? c : null;
151
- return /* @__PURE__ */ j(C, {
152
- at: z?.el ?? null,
153
- open: !!z,
160
+ let B = c?.el.isConnected ? c : null;
161
+ return /* @__PURE__ */ A(C, {
162
+ at: B?.el ?? null,
163
+ open: !!B,
154
164
  onOpenChange: (e) => {
155
165
  e || l(null);
156
166
  },
157
167
  onPointerEnter: () => clearTimeout(p.current),
158
168
  onPointerLeave: () => {
159
- clearTimeout(p.current), p.current = setTimeout(() => l(null), L);
169
+ clearTimeout(p.current), p.current = setTimeout(() => l(null), I);
160
170
  },
161
- card: z && /* @__PURE__ */ j("div", {
171
+ card: B && /* @__PURE__ */ A("div", {
162
172
  ref: d,
163
173
  role: "dialog",
164
- "aria-label": z.kind === "doc" ? z.key : z.kind === "person" ? z.username : void 0,
165
- className: z.kind === "person" ? "" : "w-80 max-w-[calc(100vw-16px)] p-3 text-sm",
166
- children: z.kind === "term" ? /* @__PURE__ */ j(H, {
174
+ "aria-label": B.kind === "doc" ? B.key : B.kind === "person" ? B.username : void 0,
175
+ className: B.kind === "person" ? "" : "w-80 max-w-[calc(100vw-16px)] p-3 text-sm",
176
+ children: B.kind === "term" ? /* @__PURE__ */ A(z, {
167
177
  workspace: n,
168
- entry: g?.find((e) => e.id === z.id)
169
- }) : z.kind === "person" ? /* @__PURE__ */ j(S, {
178
+ entry: g?.find((e) => e.id === B.id)
179
+ }) : B.kind === "person" ? /* @__PURE__ */ A(S, {
170
180
  workspace: n,
171
- handle: z.username
172
- }) : /* @__PURE__ */ j(W, {
181
+ handle: B.username
182
+ }) : /* @__PURE__ */ A(V, {
173
183
  workspace: n,
174
- docKey: z.key
184
+ docKey: B.key
175
185
  })
176
186
  })
177
187
  });
178
188
  }
179
- var B = {
180
- decided: "success",
181
- added: "info"
182
- };
183
- function V({ status: e }) {
184
- let t = k("knowledge.status");
185
- return e === "superseded" ? /* @__PURE__ */ j(T, {
186
- off: !0,
187
- className: "text-xs",
188
- children: t(e)
189
- }) : /* @__PURE__ */ j(T, {
190
- variant: B[e],
191
- className: "text-xs",
192
- children: t(e)
193
- });
194
- }
195
- function H({ workspace: e, entry: t }) {
196
- let n = k("knowledge"), r = p(e);
197
- if (!t) return /* @__PURE__ */ j("p", {
189
+ function z({ workspace: e, entry: t }) {
190
+ let n = O("knowledge"), r = p(e);
191
+ if (!t) return /* @__PURE__ */ A("p", {
198
192
  className: "text-muted-foreground",
199
193
  children: n("gone")
200
194
  });
201
195
  let i = t.source.doc;
202
- return /* @__PURE__ */ M(A, { children: [
203
- /* @__PURE__ */ M("p", {
196
+ return /* @__PURE__ */ j(k, { children: [
197
+ /* @__PURE__ */ j("p", {
204
198
  className: "flex items-center gap-2",
205
- children: [
206
- /* @__PURE__ */ j(g, {
207
- to: "/$workspace/knowledge/$term",
208
- params: {
209
- workspace: e,
210
- term: m(t)
211
- },
212
- className: "font-semibold hover:underline",
213
- children: t.name
214
- }),
215
- /* @__PURE__ */ j("span", {
216
- className: "text-xs text-muted-foreground",
217
- children: n(`kind.${t.kind}`)
218
- }),
219
- (t.kind !== "term" || t.status !== "decided") && /* @__PURE__ */ j("span", {
220
- className: "ml-auto",
221
- children: /* @__PURE__ */ j(V, { status: t.status })
222
- })
223
- ]
199
+ children: [/* @__PURE__ */ A(g, {
200
+ to: "/$workspace/knowledge/$term",
201
+ params: {
202
+ workspace: e,
203
+ term: m(t)
204
+ },
205
+ className: "font-semibold hover:underline",
206
+ children: t.name
207
+ }), /* @__PURE__ */ A("span", {
208
+ className: "text-xs text-muted-foreground",
209
+ children: n(`kind.${t.kind}`)
210
+ })]
224
211
  }),
225
- /* @__PURE__ */ j("p", {
212
+ /* @__PURE__ */ A("p", {
226
213
  className: "mt-1.5 text-foreground",
227
214
  children: t.definition
228
215
  }),
229
- t.supersededBy && /* @__PURE__ */ j("p", {
216
+ t.supersededBy && /* @__PURE__ */ A("p", {
230
217
  className: "mt-1.5 text-xs",
231
- children: /* @__PURE__ */ j(g, {
218
+ children: /* @__PURE__ */ A(g, {
232
219
  to: "/$workspace/knowledge/$term",
233
220
  params: {
234
221
  workspace: e,
@@ -238,9 +225,9 @@ function H({ workspace: e, entry: t }) {
238
225
  children: n("supersededBy", { name: t.supersededByName ?? "" })
239
226
  })
240
227
  }),
241
- (i || t.source.identifier) && /* @__PURE__ */ M("p", {
228
+ (i || t.source.identifier) && /* @__PURE__ */ j("p", {
242
229
  className: "mt-2 flex flex-wrap gap-x-3 gap-y-1 text-xs text-muted-foreground",
243
- children: [i && /* @__PURE__ */ M(g, {
230
+ children: [i && /* @__PURE__ */ j(g, {
244
231
  to: "/$workspace/docs/$doc",
245
232
  params: {
246
233
  workspace: e,
@@ -248,11 +235,11 @@ function H({ workspace: e, entry: t }) {
248
235
  },
249
236
  ...t.source.section && { hash: d(t.source.section) },
250
237
  className: "inline-flex items-center gap-1 hover:text-foreground",
251
- children: [/* @__PURE__ */ j(x, { className: "size-3" }), t.source.section ? n("sourceSection", {
238
+ children: [/* @__PURE__ */ A(x, { className: "size-3" }), t.source.section ? n("sourceSection", {
252
239
  doc: i.title,
253
240
  section: t.source.section
254
241
  }) : i.title]
255
- }), t.source.identifier && /* @__PURE__ */ j(g, {
242
+ }), t.source.identifier && /* @__PURE__ */ A(g, {
256
243
  to: "/$workspace/issues/$identifier",
257
244
  params: {
258
245
  workspace: e,
@@ -262,7 +249,7 @@ function H({ workspace: e, entry: t }) {
262
249
  children: t.source.identifier
263
250
  })]
264
251
  }),
265
- /* @__PURE__ */ j(g, {
252
+ /* @__PURE__ */ A(g, {
266
253
  to: "/$workspace/knowledge/$term",
267
254
  params: {
268
255
  workspace: e,
@@ -273,30 +260,30 @@ function H({ workspace: e, entry: t }) {
273
260
  })
274
261
  ] });
275
262
  }
276
- function U(e) {
263
+ function B(e) {
277
264
  return e.split("\n").map((e) => e.replace(/^#{1,6}\s+|^[-*>]\s+|^\d+\.\s+|\[[ x]\]\s*/g, "").replace(/[*_`]/g, "")).filter((e) => e.trim()).slice(0, 4).join(" ").slice(0, 280);
278
265
  }
279
- function W({ workspace: e, docKey: t }) {
280
- let r = k("docLinks"), { data: i, isError: a } = N({
266
+ function V({ workspace: e, docKey: t }) {
267
+ let r = O("docLinks"), { data: i, isError: a } = M({
281
268
  ...n(e, t),
282
269
  retry: !1
283
270
  });
284
- return a ? /* @__PURE__ */ j("p", {
271
+ return a ? /* @__PURE__ */ A("p", {
285
272
  className: "text-muted-foreground",
286
273
  children: r("unavailable")
287
- }) : i ? /* @__PURE__ */ M(A, { children: [/* @__PURE__ */ M("p", {
274
+ }) : i ? /* @__PURE__ */ j(k, { children: [/* @__PURE__ */ j("p", {
288
275
  className: "flex items-center gap-2 font-semibold",
289
- children: [/* @__PURE__ */ j(y, {
276
+ children: [/* @__PURE__ */ A(y, {
290
277
  icon: i.icon,
291
278
  className: "size-3.5",
292
279
  emojiClassName: "text-xs"
293
- }), /* @__PURE__ */ j("span", {
280
+ }), /* @__PURE__ */ A("span", {
294
281
  className: "truncate",
295
282
  children: i.title
296
283
  })]
297
- }), /* @__PURE__ */ j("p", {
284
+ }), /* @__PURE__ */ A("p", {
298
285
  className: "mt-1.5 line-clamp-4 text-muted-foreground",
299
- children: U(i.body ?? "") || r("empty")
300
- })] }) : /* @__PURE__ */ j(w, { size: 16 });
286
+ children: B(i.body ?? "") || r("empty")
287
+ })] }) : /* @__PURE__ */ A(w, { size: 16 });
301
288
  }
302
- export { z as HoverCards, V as KnowledgeStatus };
289
+ export { R as HoverCards };