@parallelworks/tandem-web 0.139.0 → 0.139.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,34 +1,34 @@
1
- import { Link as e, useNavigate as t } from "../../../lib/router.js";
2
- import { docBacklinksQuery as n, docDecisionsQuery as r, docIssuesQuery as i, docQuery as a, lostSectionsQuery as o, meQuery as s, teamsQuery as c, workspaceQuery as l } from "../../../api/queries.js";
3
- import { Route as u } from "./_doc.js";
4
- import { CommentIcon as d, StatusIcon as f } from "../../../components/icons.js";
1
+ import { usePageTitle as e } from "../../../lib/pageTitle.js";
2
+ import { Link as t, useNavigate as n } from "../../../lib/router.js";
3
+ import { docBacklinksQuery as r, docDecisionsQuery as i, docIssuesQuery as a, docQuery as o, lostSectionsQuery as s, meQuery as c, teamsQuery as l, workspaceQuery as u } from "../../../api/queries.js";
4
+ import { Route as d } from "./_doc.js";
5
+ import { CommentIcon as f, StatusIcon as p } from "../../../components/icons.js";
5
6
  import { termRef as ee } from "../../../lib/knowledgeKinds.js";
6
7
  import { copyItem as te } from "../../../lib/menus.js";
7
- import { docKey as ne, docPath as re, docRef as p, docURL as ie, useDocActions as ae, useDocMenu as oe } from "../../../lib/docs.js";
8
+ import { docKey as ne, docPath as re, docRef as m, docURL as ie, useDocActions as ae, useDocMenu as oe } from "../../../lib/docs.js";
8
9
  import { headingAnchor as se } from "../../../lib/glossary.js";
9
- import { useTime as m } from "../../../lib/time.js";
10
- import { usePeople as h } from "../../../lib/people.js";
11
- import { issueURL as ce, useIssueMenu as g } from "../../../lib/issueMenu.js";
10
+ import { useTime as h } from "../../../lib/time.js";
11
+ import { usePeople as g } from "../../../lib/people.js";
12
+ import { issueURL as ce, useIssueMenu as _ } from "../../../lib/issueMenu.js";
12
13
  import { useNewIssue as le } from "../../../lib/newIssue.js";
13
14
  import { rememberPage as ue } from "../../../lib/recent.js";
14
- import { usePageTitle as de } from "../../../lib/pageTitle.js";
15
- import { DocIcon as _ } from "../../../components/DocIcon.js";
16
- import { PersonHoverCard as v } from "../../../components/PersonHoverCard.js";
17
- import { Editor as fe } from "../../../components/Editor.js";
18
- import { useOthersOn as pe, useReportLocation as me } from "../../../lib/live.js";
19
- import { AnsweredDecision as y, DecisionCard as b } from "../../../components/AgentWork.js";
20
- import { DocCover as he, DocLookControls as ge } from "../../../components/DocLook.js";
21
- import { FavoriteStar as _e } from "../../../components/FavoriteStar.js";
22
- import { AreaSelect as ve } from "../../../components/AreaSelect.js";
23
- import { caretColor as x, useCollabSession as S } from "../../../lib/collab.js";
24
- import { CollabEditor as C } from "../../../components/CollabEditor.js";
25
- import { DocComments as ye, useOpenThreads as be } from "../../../components/DocComments.js";
26
- import { DocHistory as xe, DocVersion as Se } from "../../../components/DocHistory.js";
27
- import { DocOutline as Ce } from "../../../components/DocOutline.js";
28
- import { Connections as we } from "../../../components/Graph.js";
29
- import { FieldNote as Te, Viewers as Ee } from "../../../components/Presence.js";
30
- import { UnlinkedMentions as De, useUnlinkedMentions as Oe } from "../../../components/UnlinkedMentions.js";
31
- import { Avatar as w, Breadcrumbs as T, Button as E, ErrorText as D, TitleInput as O, Tooltip as k, useOpenMenu as A } from "@parallelworks/ui";
15
+ import { DocIcon as v } from "../../../components/DocIcon.js";
16
+ import { PersonHoverCard as y } from "../../../components/PersonHoverCard.js";
17
+ import { Editor as de } from "../../../components/Editor.js";
18
+ import { useOthersOn as fe, useReportLocation as pe } from "../../../lib/live.js";
19
+ import { AnsweredDecision as b, DecisionCard as x } from "../../../components/AgentWork.js";
20
+ import { DocCover as me, DocLookControls as he } from "../../../components/DocLook.js";
21
+ import { FavoriteStar as ge } from "../../../components/FavoriteStar.js";
22
+ import { AreaSelect as _e } from "../../../components/AreaSelect.js";
23
+ import { caretColor as S, useCollabSession as C } from "../../../lib/collab.js";
24
+ import { CollabEditor as w } from "../../../components/CollabEditor.js";
25
+ import { DocComments as ve, useOpenThreads as ye } from "../../../components/DocComments.js";
26
+ import { DocHistory as be, DocVersion as xe } from "../../../components/DocHistory.js";
27
+ import { DocOutline as Se } from "../../../components/DocOutline.js";
28
+ import { Connections as Ce } from "../../../components/Graph.js";
29
+ import { FieldNote as we, Viewers as Te } from "../../../components/Presence.js";
30
+ import { UnlinkedMentions as Ee, useUnlinkedMentions as De } from "../../../components/UnlinkedMentions.js";
31
+ import { Avatar as T, Breadcrumbs as E, Button as D, ErrorText as Oe, TitleInput as O, Tooltip as k, useOpenMenu as A } from "@parallelworks/ui";
32
32
  import { useCallback as ke, useEffect as j, useMemo as Ae, useRef as M, useState as N } from "react";
33
33
  import { useErrorMessage as je } from "@parallelworks/problem/react";
34
34
  import { useTranslations as P } from "use-intl";
@@ -38,36 +38,36 @@ import { MoreButton as Me } from "@parallelworks/ui/list";
38
38
  // src/routes/$workspace/docs/$doc.tsx?tsr-split=component
39
39
  var Ne = 120;
40
40
  function B() {
41
- let e = P("docs"), n = P("common"), r = je(), { workspace: i, doc: o } = u.useParams(), { rename: d } = u.useSearch(), { data: f } = z(a(i, ne(o))), ee = f.key, { data: m } = z(c(i)), { data: h } = z(s), g = m.find((e) => e.id === f.teamId), { data: _ } = z(l(i)), [v, y] = N();
42
- me({
43
- doc: f.key,
44
- ...v && { field: v }
45
- }), de(f.title || e("untitled"), g?.name);
46
- let b = pe({ doc: f.key }, h?.user.username);
41
+ let t = P("docs"), r = P("common"), i = je(), { workspace: a, doc: s } = d.useParams(), { rename: f } = d.useSearch(), { data: p } = z(o(a, ne(s))), ee = p.key, { data: h } = z(l(a)), { data: g } = z(c), _ = h.find((e) => e.id === p.teamId), { data: v } = z(u(a)), [y, b] = N();
42
+ pe({
43
+ doc: p.key,
44
+ ...y && { field: y }
45
+ }), e(p.title || t("untitled"), _?.name);
46
+ let x = fe({ doc: p.key }, g?.user.username);
47
47
  j(() => {
48
- ue(i, {
48
+ ue(a, {
49
49
  kind: "doc",
50
- href: re(i, f),
51
- label: f.title
50
+ href: re(a, p),
51
+ label: p.title
52
52
  });
53
- }, [i, f]);
54
- let x = t(), S = A(), C = oe(i), w = ae(i), T = le(), O = M(null), [k, Ae] = N(null), F = M(null), R = Oe(i, f, k), [B, Ue] = N(""), V = M(null), [H, U] = N(!1), [We, W] = N(), G = be(i, ee), [Ge, K] = N(!1), [Ke, q] = N(!1), [J, Y] = N(!1), [X, Z] = N();
53
+ }, [a, p]);
54
+ let S = n(), C = A(), w = oe(a), T = ae(a), E = le(), O = M(null), [k, Ae] = N(null), F = M(null), R = De(a, p, k), [B, Ue] = N(""), V = M(null), [H, U] = N(!1), [We, W] = N(), G = ye(a, ee), [Ge, K] = N(!1), [Ke, q] = N(!1), [J, Y] = N(!1), [X, Z] = N();
55
55
  j(() => {
56
- (o !== p(f) || d) && x({
56
+ (s !== m(p) || f) && S({
57
57
  to: "/$workspace/docs/$doc",
58
58
  params: {
59
- workspace: i,
60
- doc: p(f)
59
+ workspace: a,
60
+ doc: m(p)
61
61
  },
62
62
  search: {},
63
63
  replace: !0
64
64
  });
65
65
  }, [
66
- o,
66
+ s,
67
+ p,
68
+ a,
67
69
  f,
68
- i,
69
- d,
70
- x
70
+ S
71
71
  ]);
72
72
  let qe = ke((e) => {
73
73
  if (O.current = e, Ae(e), !e) return;
@@ -123,18 +123,18 @@ function B() {
123
123
  to: d
124
124
  }).scrollIntoView().run();
125
125
  }, Q = () => {
126
- let t = B;
127
- if (!t || !g) return;
128
- let n = t.split("\n").map((e) => e ? `> ${e}` : ">").join("\n");
129
- T({
130
- team: g.key,
131
- title: (t.split("\n")[0] ?? "").slice(0, Ne),
132
- body: e("fromDoc", {
126
+ let e = B;
127
+ if (!e || !_) return;
128
+ let n = e.split("\n").map((e) => e ? `> ${e}` : ">").join("\n");
129
+ E({
130
+ team: _.key,
131
+ title: (e.split("\n")[0] ?? "").slice(0, Ne),
132
+ body: t("fromDoc", {
133
133
  quote: n,
134
- title: f.title,
135
- url: ie(i, f)
134
+ title: p.title,
135
+ url: ie(a, p)
136
136
  }),
137
- origin: { doc: f.key },
137
+ origin: { doc: p.key },
138
138
  onCreated: (e) => {
139
139
  let t = O.current;
140
140
  t && t.chain().insertContentAt(t.state.selection.to, [{
@@ -145,59 +145,59 @@ function B() {
145
145
  text: e.identifier,
146
146
  marks: [{
147
147
  type: "link",
148
- attrs: { href: ce(i, e.identifier) }
148
+ attrs: { href: ce(a, e.identifier) }
149
149
  }]
150
150
  }]).run();
151
151
  }
152
152
  });
153
- }, Ye = f.ancestors ?? [], $ = !!f.archivedAt;
153
+ }, Ye = p.ancestors ?? [], $ = !!p.archivedAt;
154
154
  return /* @__PURE__ */ L("div", {
155
155
  className: "flex h-full flex-col",
156
156
  children: [/* @__PURE__ */ L("header", {
157
157
  className: "flex h-12 shrink-0 items-center gap-2 border-b border-border px-4 text-sm md:px-5",
158
- onContextMenu: (e) => S(e, C(f, { onRename: () => V.current?.focus() })),
158
+ onContextMenu: (e) => C(e, w(p, { onRename: () => V.current?.focus() })),
159
159
  children: [
160
160
  /* @__PURE__ */ I(Ve, {
161
- workspace: i,
162
- doc: f,
161
+ workspace: a,
162
+ doc: p,
163
163
  path: Ye,
164
- space: g?.name ?? _.name
164
+ space: _?.name ?? v.name
165
165
  }),
166
- /* @__PURE__ */ I(_e, {
167
- workspace: i,
166
+ /* @__PURE__ */ I(ge, {
167
+ workspace: a,
168
168
  kind: "doc",
169
- target: f.id
169
+ target: p.id
170
170
  }),
171
171
  /* @__PURE__ */ L("span", {
172
172
  className: "ml-auto flex shrink-0 items-center gap-3",
173
173
  children: [
174
- B && !$ && /* @__PURE__ */ I(E, {
174
+ B && !$ && /* @__PURE__ */ I(D, {
175
175
  type: "button",
176
176
  size: "sm",
177
177
  onMouseDown: (e) => e.preventDefault(),
178
178
  onClick: Q,
179
- children: e("createIssue")
179
+ children: t("createIssue")
180
180
  }),
181
- w.rename.isPending && /* @__PURE__ */ I("span", {
181
+ T.rename.isPending && /* @__PURE__ */ I("span", {
182
182
  className: "text-xs text-muted-foreground",
183
- children: n("saving")
183
+ children: r("saving")
184
184
  }),
185
- /* @__PURE__ */ I(Ee, {
186
- workspace: i,
187
- others: b
185
+ /* @__PURE__ */ I(Te, {
186
+ workspace: a,
187
+ others: x
188
188
  }),
189
- /* @__PURE__ */ L(E, {
189
+ /* @__PURE__ */ L(D, {
190
190
  type: "button",
191
191
  size: "sm",
192
192
  "aria-pressed": H,
193
193
  onClick: () => {
194
194
  U((e) => !e), W(void 0), K(!1), q(!1), Y(!1);
195
195
  },
196
- ...G > 0 && { "aria-label": e("commentsCount", { count: G }) },
196
+ ...G > 0 && { "aria-label": t("commentsCount", { count: G }) },
197
197
  className: "relative aria-pressed:bg-muted max-md:hidden",
198
- children: [e("comments"), /* @__PURE__ */ I(He, { count: G })]
198
+ children: [t("comments"), /* @__PURE__ */ I(He, { count: G })]
199
199
  }),
200
- /* @__PURE__ */ I(E, {
200
+ /* @__PURE__ */ I(D, {
201
201
  type: "button",
202
202
  size: "sm",
203
203
  "aria-pressed": Ge,
@@ -205,20 +205,20 @@ function B() {
205
205
  K((e) => !e), Z(void 0), U(!1), q(!1), Y(!1);
206
206
  },
207
207
  className: "aria-pressed:bg-muted max-md:hidden",
208
- children: e("history")
208
+ children: t("history")
209
209
  }),
210
- !$ && /* @__PURE__ */ L(E, {
210
+ !$ && /* @__PURE__ */ L(D, {
211
211
  type: "button",
212
212
  size: "sm",
213
213
  "aria-pressed": Ke,
214
214
  onClick: () => {
215
215
  q((e) => !e), U(!1), K(!1), Z(void 0), Y(!1);
216
216
  },
217
- ...R.length > 0 && { "aria-label": e("unlinkedCount", { count: R.length }) },
217
+ ...R.length > 0 && { "aria-label": t("unlinkedCount", { count: R.length }) },
218
218
  className: "relative aria-pressed:bg-muted max-md:hidden",
219
- children: [e("links"), /* @__PURE__ */ I(He, { count: R.length })]
219
+ children: [t("links"), /* @__PURE__ */ I(He, { count: R.length })]
220
220
  }),
221
- !$ && /* @__PURE__ */ I(E, {
221
+ !$ && /* @__PURE__ */ I(D, {
222
222
  type: "button",
223
223
  size: "sm",
224
224
  "aria-pressed": J,
@@ -226,11 +226,11 @@ function B() {
226
226
  Y((e) => !e), U(!1), K(!1), Z(void 0), q(!1);
227
227
  },
228
228
  className: "aria-pressed:bg-muted max-md:hidden",
229
- children: e("graph")
229
+ children: t("graph")
230
230
  }),
231
231
  /* @__PURE__ */ I(Me, {
232
- items: () => C(f, { onRename: () => V.current?.focus() }),
233
- label: n("moreActionsFor", { name: f.title }),
232
+ items: () => w(p, { onRename: () => V.current?.focus() }),
233
+ label: r("moreActionsFor", { name: p.title }),
234
234
  visible: !0
235
235
  })
236
236
  ]
@@ -242,65 +242,65 @@ function B() {
242
242
  /* @__PURE__ */ L("div", {
243
243
  ref: F,
244
244
  className: "min-h-0 flex-1 overflow-y-auto",
245
- children: [!X && /* @__PURE__ */ I(he, {
246
- workspace: i,
247
- doc: f,
245
+ children: [!X && /* @__PURE__ */ I(me, {
246
+ workspace: a,
247
+ doc: p,
248
248
  editable: !$
249
249
  }), /* @__PURE__ */ L("div", {
250
250
  className: "flex w-full gap-10 px-4 pt-6 md:px-8 md:pt-8",
251
251
  children: [/* @__PURE__ */ L("article", {
252
- className: `group/doc min-w-0 flex-1 pb-24 ${f.fullWidth ? "" : "mx-auto max-w-3xl"}`,
252
+ className: `group/doc min-w-0 flex-1 pb-24 ${p.fullWidth ? "" : "mx-auto max-w-3xl"}`,
253
253
  children: [
254
254
  $ && /* @__PURE__ */ L("div", {
255
255
  className: "mb-6 flex items-center gap-3 rounded-md border border-border bg-muted px-3 py-2 text-sm",
256
256
  children: [/* @__PURE__ */ I("span", {
257
257
  className: "flex-1",
258
- children: e("archivedNotice")
259
- }), /* @__PURE__ */ I(E, {
258
+ children: t("archivedNotice")
259
+ }), /* @__PURE__ */ I(D, {
260
260
  type: "button",
261
261
  variant: "primary",
262
262
  size: "sm",
263
- onClick: () => w.restore.mutate(f),
264
- children: e("restore")
263
+ onClick: () => T.restore.mutate(p),
264
+ children: t("restore")
265
265
  })]
266
266
  }),
267
- /* @__PURE__ */ I(ge, {
268
- workspace: i,
269
- doc: f,
267
+ /* @__PURE__ */ I(he, {
268
+ workspace: a,
269
+ doc: p,
270
270
  editable: !$ && !X
271
271
  }),
272
272
  /* @__PURE__ */ I(Pe, {
273
- doc: f,
273
+ doc: p,
274
274
  input: V,
275
- autoFocus: !!d,
275
+ autoFocus: !!f,
276
276
  readOnly: $,
277
- onFocus: () => y("title"),
278
- onBlur: () => y(void 0),
279
- onSave: (e) => w.rename.mutate({
280
- doc: f,
277
+ onFocus: () => b("title"),
278
+ onBlur: () => b(void 0),
279
+ onSave: (e) => T.rename.mutate({
280
+ doc: p,
281
281
  title: e
282
282
  })
283
- }, f.id),
284
- /* @__PURE__ */ I(Te, {
285
- workspace: i,
286
- others: b,
283
+ }, p.id),
284
+ /* @__PURE__ */ I(we, {
285
+ workspace: a,
286
+ others: x,
287
287
  field: "title"
288
288
  }),
289
- w.rename.isError && /* @__PURE__ */ I(D, {
289
+ T.rename.isError && /* @__PURE__ */ I(Oe, {
290
290
  className: "mt-1",
291
- children: r(w.rename.error)
291
+ children: i(T.rename.error)
292
292
  }),
293
293
  /* @__PURE__ */ L("div", {
294
294
  className: "mt-2 flex flex-wrap items-center gap-x-3 gap-y-1",
295
295
  children: [/* @__PURE__ */ I(Fe, {
296
- workspace: i,
297
- doc: f
298
- }), /* @__PURE__ */ I(ve, {
299
- workspace: i,
300
- teamId: f.teamId,
301
- value: f.areaId,
302
- onChange: (e) => w.fileUnder.mutate({
303
- doc: f,
296
+ workspace: a,
297
+ doc: p
298
+ }), /* @__PURE__ */ I(_e, {
299
+ workspace: a,
300
+ teamId: p.teamId,
301
+ value: p.areaId,
302
+ onChange: (e) => T.fileUnder.mutate({
303
+ doc: p,
304
304
  area: e
305
305
  }),
306
306
  disabled: $,
@@ -308,76 +308,76 @@ function B() {
308
308
  })]
309
309
  }),
310
310
  /* @__PURE__ */ I("div", {
311
- onContextMenu: (t) => B && !$ && S(t, [{
312
- label: e("createIssue"),
311
+ onContextMenu: (e) => B && !$ && C(e, [{
312
+ label: t("createIssue"),
313
313
  onClick: Q
314
- }, te(e("copySelection"), B)]),
315
- children: X ? /* @__PURE__ */ I(Se, {
316
- workspace: i,
317
- doc: f,
314
+ }, te(t("copySelection"), B)]),
315
+ children: X ? /* @__PURE__ */ I(xe, {
316
+ workspace: a,
317
+ doc: p,
318
318
  versionId: X,
319
319
  onDone: () => Z(void 0)
320
320
  }) : $ ? /* @__PURE__ */ I("div", {
321
321
  className: "mt-4",
322
- children: /* @__PURE__ */ I(fe, {
323
- value: f.body ?? "",
322
+ children: /* @__PURE__ */ I(de, {
323
+ value: p.body ?? "",
324
324
  editable: !1,
325
325
  className: "min-h-32"
326
326
  })
327
327
  }) : /* @__PURE__ */ I(Ie, {
328
- workspace: i,
329
- doc: f,
328
+ workspace: a,
329
+ doc: p,
330
330
  onEditor: qe,
331
- onFocus: () => y("body"),
332
- onBlur: () => y(void 0)
331
+ onFocus: () => b("body"),
332
+ onBlur: () => b(void 0)
333
333
  })
334
334
  }),
335
335
  /* @__PURE__ */ I(Re, {
336
- workspace: i,
337
- docKey: f.key
336
+ workspace: a,
337
+ docKey: p.key
338
338
  }),
339
339
  /* @__PURE__ */ I(ze, {
340
- workspace: i,
341
- docKey: f.key
340
+ workspace: a,
341
+ docKey: p.key
342
342
  }),
343
343
  /* @__PURE__ */ I(Le, {
344
- workspace: i,
345
- docKey: f.key
344
+ workspace: a,
345
+ docKey: p.key
346
346
  }),
347
347
  /* @__PURE__ */ I(Be, {
348
- workspace: i,
349
- docKey: f.key
348
+ workspace: a,
349
+ docKey: p.key
350
350
  })
351
351
  ]
352
- }), !$ && !X && /* @__PURE__ */ I(Ce, {
352
+ }), !$ && !X && /* @__PURE__ */ I(Se, {
353
353
  editor: k,
354
354
  scroller: F
355
355
  })]
356
356
  })]
357
357
  }),
358
- H && /* @__PURE__ */ I(ye, {
359
- workspace: i,
360
- doc: f,
358
+ H && /* @__PURE__ */ I(ve, {
359
+ workspace: a,
360
+ doc: p,
361
361
  draft: We,
362
362
  onDraftDone: () => W(void 0),
363
363
  onShowQuote: Je
364
364
  }),
365
- Ge && /* @__PURE__ */ I(xe, {
366
- workspace: i,
367
- doc: f,
365
+ Ge && /* @__PURE__ */ I(be, {
366
+ workspace: a,
367
+ doc: p,
368
368
  selected: X,
369
369
  onSelect: Z
370
370
  }),
371
- Ke && !$ && /* @__PURE__ */ I(De, {
371
+ Ke && !$ && /* @__PURE__ */ I(Ee, {
372
372
  editor: k,
373
373
  suggestions: R
374
374
  }),
375
375
  J && !$ && /* @__PURE__ */ I("aside", {
376
- "aria-label": e("graph"),
376
+ "aria-label": t("graph"),
377
377
  className: "w-96 shrink-0 overflow-y-auto border-l border-border px-3 py-4 max-md:hidden",
378
- children: /* @__PURE__ */ I(we, {
379
- workspace: i,
380
- of: { doc: f.key },
378
+ children: /* @__PURE__ */ I(Ce, {
379
+ workspace: a,
380
+ of: { doc: p.key },
381
381
  width: 352
382
382
  })
383
383
  })
@@ -402,14 +402,14 @@ function Pe({ doc: e, input: t, autoFocus: n, readOnly: r, onSave: i, onFocus: a
402
402
  })] });
403
403
  }
404
404
  function Fe({ workspace: e, doc: t }) {
405
- let n = P("docs"), r = m(), { actorName: i, person: a, avatarOf: o } = h(e), s = i(t.editor);
405
+ let n = P("docs"), r = h(), { actorName: i, person: a, avatarOf: o } = g(e), s = i(t.editor);
406
406
  return /* @__PURE__ */ L("p", {
407
407
  className: "flex items-center gap-1.5 text-xs text-muted-foreground",
408
- children: [/* @__PURE__ */ I(v, {
408
+ children: [/* @__PURE__ */ I(y, {
409
409
  workspace: e,
410
410
  kind: t.editor.kind,
411
411
  handle: t.editor.handle,
412
- children: /* @__PURE__ */ I(w, {
412
+ children: /* @__PURE__ */ I(T, {
413
413
  kind: t.editor.kind === "agent" ? "agent" : "person",
414
414
  name: s,
415
415
  src: o(t.editor.kind, t.editor.handle),
@@ -430,44 +430,44 @@ function Fe({ workspace: e, doc: t }) {
430
430
  });
431
431
  }
432
432
  function Ie({ workspace: e, doc: t, onEditor: n, onFocus: r, onBlur: i }) {
433
- let a = P("docs"), { data: o } = z(s), c = M(null), l = Ae(() => ({
433
+ let a = P("docs"), { data: o } = z(c), s = M(null), l = Ae(() => ({
434
434
  name: o?.user.name ?? a("someone"),
435
- color: x(o?.user.username ?? "")
435
+ color: S(o?.user.username ?? "")
436
436
  }), [
437
437
  o?.user.name,
438
438
  o?.user.username,
439
439
  a
440
- ]), { session: u, error: d } = S({
440
+ ]), { session: u, error: d } = C({
441
441
  workspace: e,
442
442
  target: { doc: t.key },
443
443
  user: l,
444
- getMarkdown: c
444
+ getMarkdown: s
445
445
  });
446
446
  return /* @__PURE__ */ L("div", {
447
447
  className: "mt-6 min-h-48",
448
- children: [u ? /* @__PURE__ */ I(C, {
448
+ children: [u ? /* @__PURE__ */ I(w, {
449
449
  session: u,
450
450
  user: l,
451
- getMarkdown: c,
451
+ getMarkdown: s,
452
452
  onEditor: n,
453
453
  onFocus: r,
454
454
  onBlur: i,
455
455
  placeholder: a("bodyPlaceholder"),
456
456
  label: a("body"),
457
457
  className: "min-h-48"
458
- }, `${u.generation}:${u.doc.guid}`) : /* @__PURE__ */ I(fe, {
458
+ }, `${u.generation}:${u.doc.guid}`) : /* @__PURE__ */ I(de, {
459
459
  value: t.body ?? "",
460
460
  editable: !1,
461
461
  className: "min-h-48"
462
- }), /* @__PURE__ */ I(D, {
462
+ }), /* @__PURE__ */ I(Oe, {
463
463
  className: "mt-1",
464
464
  children: d
465
465
  })]
466
466
  });
467
467
  }
468
- function Le({ workspace: t, docKey: n }) {
469
- let r = P("docs"), { data: a } = z(i(t, n)), o = A(), s = g(t);
470
- return a.length === 0 ? null : /* @__PURE__ */ L("section", {
468
+ function Le({ workspace: e, docKey: n }) {
469
+ let r = P("docs"), { data: i } = z(a(e, n)), o = A(), s = _(e);
470
+ return i.length === 0 ? null : /* @__PURE__ */ L("section", {
471
471
  className: "mt-10",
472
472
  "aria-label": r("linkedIssues"),
473
473
  children: [/* @__PURE__ */ I("h2", {
@@ -475,16 +475,16 @@ function Le({ workspace: t, docKey: n }) {
475
475
  children: r("linkedIssues")
476
476
  }), /* @__PURE__ */ I("ul", {
477
477
  className: "mt-2 space-y-0.5",
478
- children: a.map((n) => /* @__PURE__ */ I("li", { children: /* @__PURE__ */ L(e, {
478
+ children: i.map((n) => /* @__PURE__ */ I("li", { children: /* @__PURE__ */ L(t, {
479
479
  to: "/$workspace/issues/$identifier",
480
480
  params: {
481
- workspace: t,
481
+ workspace: e,
482
482
  identifier: n.identifier
483
483
  },
484
484
  onContextMenu: (e) => o(e, s([n])),
485
485
  className: "flex h-8 items-center gap-2 rounded-md px-2 text-sm hover:bg-muted",
486
486
  children: [
487
- /* @__PURE__ */ I(f, { category: n.status.category }),
487
+ /* @__PURE__ */ I(p, { category: n.status.category }),
488
488
  /* @__PURE__ */ I("span", {
489
489
  className: "shrink-0 text-muted-foreground",
490
490
  children: n.identifier
@@ -498,8 +498,8 @@ function Le({ workspace: t, docKey: n }) {
498
498
  })]
499
499
  });
500
500
  }
501
- function Re({ workspace: t, docKey: n }) {
502
- let r = P("docs"), { data: i = [] } = R(o(t, n));
501
+ function Re({ workspace: e, docKey: n }) {
502
+ let r = P("docs"), { data: i = [] } = R(s(e, n));
503
503
  return i.length === 0 ? null : /* @__PURE__ */ L("section", {
504
504
  className: "mt-10 rounded-lg border border-warning/60 px-4 py-3",
505
505
  "aria-label": r("lostSections"),
@@ -514,10 +514,10 @@ function Re({ workspace: t, docKey: n }) {
514
514
  }),
515
515
  /* @__PURE__ */ I("ul", {
516
516
  className: "mt-2 space-y-1 text-sm",
517
- children: i.map((n) => /* @__PURE__ */ I("li", { children: /* @__PURE__ */ I(e, {
517
+ children: i.map((n) => /* @__PURE__ */ I("li", { children: /* @__PURE__ */ I(t, {
518
518
  to: "/$workspace/knowledge/$term",
519
519
  params: {
520
- workspace: t,
520
+ workspace: e,
521
521
  term: ee(n)
522
522
  },
523
523
  className: "hover:underline",
@@ -531,26 +531,26 @@ function Re({ workspace: t, docKey: n }) {
531
531
  });
532
532
  }
533
533
  function ze({ workspace: e, docKey: t }) {
534
- let n = P("docs"), { data: i } = z(r(e, t)), a = i.filter((e) => !e.canceled);
534
+ let n = P("docs"), { data: r } = z(i(e, t)), a = r.filter((e) => !e.canceled);
535
535
  return a.length === 0 ? null : /* @__PURE__ */ L("section", {
536
536
  className: "mt-10 space-y-3",
537
537
  "aria-label": n("questions"),
538
538
  children: [/* @__PURE__ */ I("h2", {
539
539
  className: "text-sm font-semibold",
540
540
  children: n("questions")
541
- }), a.map((t) => t.answer ? /* @__PURE__ */ I(y, {
541
+ }), a.map((t) => t.answer ? /* @__PURE__ */ I(b, {
542
542
  workspace: e,
543
543
  decision: t,
544
544
  showIssue: !0
545
- }, t.id) : /* @__PURE__ */ I(b, {
545
+ }, t.id) : /* @__PURE__ */ I(x, {
546
546
  workspace: e,
547
547
  decision: t,
548
548
  showIssue: !0
549
549
  }, t.id))]
550
550
  });
551
551
  }
552
- function Be({ workspace: t, docKey: r }) {
553
- let i = P("docs"), { data: a } = z(n(t, r)), o = A(), s = oe(t), c = g(t), l = "flex h-8 items-center gap-2 rounded-md px-2 text-sm hover:bg-muted";
552
+ function Be({ workspace: e, docKey: n }) {
553
+ let i = P("docs"), { data: a } = z(r(e, n)), o = A(), s = oe(e), c = _(e), l = "flex h-8 items-center gap-2 rounded-md px-2 text-sm hover:bg-muted";
554
554
  return a.docs.length + a.issues.length + a.comments.length === 0 ? null : /* @__PURE__ */ L("section", {
555
555
  className: "mt-10",
556
556
  "aria-label": i("linkedFrom"),
@@ -560,15 +560,15 @@ function Be({ workspace: t, docKey: r }) {
560
560
  }), /* @__PURE__ */ L("ul", {
561
561
  className: "mt-2 space-y-0.5",
562
562
  children: [
563
- a.docs.map((n) => /* @__PURE__ */ I("li", { children: /* @__PURE__ */ L(e, {
563
+ a.docs.map((n) => /* @__PURE__ */ I("li", { children: /* @__PURE__ */ L(t, {
564
564
  to: "/$workspace/docs/$doc",
565
565
  params: {
566
- workspace: t,
567
- doc: p(n)
566
+ workspace: e,
567
+ doc: m(n)
568
568
  },
569
569
  onContextMenu: (e) => o(e, s(n)),
570
570
  className: l,
571
- children: [/* @__PURE__ */ I(_, {
571
+ children: [/* @__PURE__ */ I(v, {
572
572
  icon: n.icon,
573
573
  className: "size-3.5",
574
574
  emojiClassName: "text-xs"
@@ -577,16 +577,16 @@ function Be({ workspace: t, docKey: r }) {
577
577
  children: n.title
578
578
  })]
579
579
  }) }, n.id)),
580
- a.issues.map((n) => /* @__PURE__ */ I("li", { children: /* @__PURE__ */ L(e, {
580
+ a.issues.map((n) => /* @__PURE__ */ I("li", { children: /* @__PURE__ */ L(t, {
581
581
  to: "/$workspace/issues/$identifier",
582
582
  params: {
583
- workspace: t,
583
+ workspace: e,
584
584
  identifier: n.identifier
585
585
  },
586
586
  onContextMenu: (e) => o(e, c([n])),
587
587
  className: l,
588
588
  children: [
589
- /* @__PURE__ */ I(f, { category: n.status.category }),
589
+ /* @__PURE__ */ I(p, { category: n.status.category }),
590
590
  /* @__PURE__ */ I("span", {
591
591
  className: "shrink-0 text-muted-foreground",
592
592
  children: n.identifier
@@ -597,16 +597,16 @@ function Be({ workspace: t, docKey: r }) {
597
597
  })
598
598
  ]
599
599
  }) }, n.id)),
600
- a.comments.map((n) => /* @__PURE__ */ I("li", { children: /* @__PURE__ */ L(e, {
600
+ a.comments.map((n) => /* @__PURE__ */ I("li", { children: /* @__PURE__ */ L(t, {
601
601
  to: "/$workspace/issues/$identifier",
602
602
  params: {
603
- workspace: t,
603
+ workspace: e,
604
604
  identifier: n.identifier
605
605
  },
606
606
  hash: `comment-${n.comment.id}`,
607
607
  className: l,
608
608
  children: [
609
- /* @__PURE__ */ I(d, { className: "size-3.5 text-muted-foreground" }),
609
+ /* @__PURE__ */ I(f, { className: "size-3.5 text-muted-foreground" }),
610
610
  /* @__PURE__ */ I("span", {
611
611
  className: "shrink-0 text-muted-foreground",
612
612
  children: i("commentOn", { identifier: n.identifier })
@@ -623,7 +623,7 @@ function Be({ workspace: t, docKey: r }) {
623
623
  }
624
624
  function Ve({ workspace: e, doc: t, path: n, space: r }) {
625
625
  let i = P("docs");
626
- return /* @__PURE__ */ I(T, {
626
+ return /* @__PURE__ */ I(E, {
627
627
  label: i("breadcrumbs"),
628
628
  className: "min-w-0",
629
629
  crumbs: [
@@ -634,8 +634,8 @@ function Ve({ workspace: e, doc: t, path: n, space: r }) {
634
634
  { label: r },
635
635
  ...n.map((t) => ({
636
636
  label: t.title,
637
- href: `/${e}/docs/${p(t)}`,
638
- icon: t.icon && /* @__PURE__ */ I(_, {
637
+ href: `/${e}/docs/${m(t)}`,
638
+ icon: t.icon && /* @__PURE__ */ I(v, {
639
639
  icon: t.icon,
640
640
  className: "size-3.5",
641
641
  emojiClassName: "text-xs"
@@ -643,7 +643,7 @@ function Ve({ workspace: e, doc: t, path: n, space: r }) {
643
643
  })),
644
644
  {
645
645
  label: t.title,
646
- icon: t.icon && /* @__PURE__ */ I(_, {
646
+ icon: t.icon && /* @__PURE__ */ I(v, {
647
647
  icon: t.icon,
648
648
  className: "size-3.5",
649
649
  emojiClassName: "text-xs"