@parallelworks/tandem-web 0.141.2 → 0.143.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.
Files changed (64) hide show
  1. package/_virtual/_virtual_i18n/en/common.js +162 -5
  2. package/_virtual/_virtual_i18n/es/common.js +162 -5
  3. package/_virtual/_virtual_i18n/ja/common.js +162 -5
  4. package/_virtual/_virtual_i18n/ko/common.js +162 -5
  5. package/_virtual/_virtual_i18n/zh/common.js +162 -5
  6. package/components/AccessGrants.js +6 -6
  7. package/components/ActivityTimeline.js +2 -0
  8. package/components/CodeHostSettings.js +25 -25
  9. package/components/CustomFields.js +349 -0
  10. package/components/DocProperties.js +320 -0
  11. package/components/DocTable.js +176 -0
  12. package/components/DocViewBlock.js +104 -0
  13. package/components/DocsTree.js +16 -6
  14. package/components/Editor.js +30 -28
  15. package/components/GitHub.js +22 -22
  16. package/components/IssueBoard.js +48 -43
  17. package/components/IssueEvent.js +2 -0
  18. package/components/IssueFilters.js +210 -122
  19. package/components/IssueImport.js +1 -1
  20. package/components/IssueRow.js +96 -79
  21. package/components/IssueTemplates.js +216 -156
  22. package/components/IssueTypes.js +318 -0
  23. package/components/NewIssueDialog.js +254 -216
  24. package/components/SettingsNav.js +40 -35
  25. package/components/SlashMenu.js +2 -0
  26. package/components/TeamForm.js +49 -35
  27. package/components/TeamRepositories.js +51 -51
  28. package/components/TeamWorkflow.js +8 -8
  29. package/components/Updates.js +8 -8
  30. package/lib/boardMove.js +69 -47
  31. package/lib/customFields.js +113 -0
  32. package/lib/docProperties.js +135 -0
  33. package/lib/issueDisplay.js +27 -12
  34. package/lib/issueList.js +166 -62
  35. package/lib/issueTypes.js +50 -0
  36. package/lib/teamTree.js +24 -0
  37. package/lib/views.js +13 -11
  38. package/package.json +1 -1
  39. package/pages/issues.js +331 -291
  40. package/routeTree.gen.js +174 -162
  41. package/routes/_workspace/agents/index2.js +9 -9
  42. package/routes/_workspace/docs/_doc2.js +147 -140
  43. package/routes/_workspace/docs/space._space.js +6 -0
  44. package/routes/_workspace/docs/space2._space.js +256 -0
  45. package/routes/_workspace/docs2.js +3 -3
  46. package/routes/_workspace/issues/_identifier2.js +433 -370
  47. package/routes/_workspace/projects/_projectId3.js +213 -201
  48. package/routes/_workspace/settings/audit-log3.js +2 -0
  49. package/routes/_workspace/settings/fields.js +6 -0
  50. package/routes/_workspace/settings/fields2.js +30 -0
  51. package/routes/_workspace/settings/fields3.js +5 -0
  52. package/routes/_workspace/settings/groups2.js +74 -74
  53. package/routes/_workspace/settings/labels2.js +33 -33
  54. package/routes/_workspace/settings/members2.js +35 -35
  55. package/routes/_workspace/settings/roles2.js +24 -24
  56. package/routes/_workspace/settings/runners2.js +18 -18
  57. package/routes/_workspace/settings/sessions2.js +9 -9
  58. package/routes/_workspace/settings/slack2.js +8 -8
  59. package/routes/_workspace/settings/sso2.js +50 -50
  60. package/routes/_workspace/settings/tokens2.js +15 -15
  61. package/routes/_workspace/settings/webhooks2.js +42 -42
  62. package/routes/_workspace/teams/_key/settings2.js +138 -76
  63. package/routes/_workspace2.js +321 -319
  64. package/styles.css +39 -0
@@ -3,61 +3,62 @@ import { Link as t, useNavigate as n } from "../../../lib/router.js";
3
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
4
  import { Route as d } from "./_doc.js";
5
5
  import { CommentIcon as f, StatusIcon as p } from "../../../components/icons.js";
6
- import { termRef as ee } from "../../../lib/knowledgeKinds.js";
7
- import { copyItem as te } from "../../../lib/menus.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";
9
- import { headingAnchor as se } from "../../../lib/glossary.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";
13
- import { useNewIssue as le } from "../../../lib/newIssue.js";
14
- import { rememberPage as ue } from "../../../lib/recent.js";
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
- import { useCallback as ke, useEffect as j, useMemo as Ae, useRef as M, useState as N } from "react";
33
- import { useErrorMessage as je } from "@parallelworks/problem/react";
6
+ import { termRef as m } from "../../../lib/knowledgeKinds.js";
7
+ import { copyItem as ee } from "../../../lib/menus.js";
8
+ import { docKey as te, docPath as ne, docRef as h, docURL as re, useDocActions as ie, useDocMenu as ae } from "../../../lib/docs.js";
9
+ import { headingAnchor as oe } from "../../../lib/glossary.js";
10
+ import { useTime as se } from "../../../lib/time.js";
11
+ import { usePeople as ce } from "../../../lib/people.js";
12
+ import { issueURL as le, useIssueMenu as g } from "../../../lib/issueMenu.js";
13
+ import { useNewIssue as ue } from "../../../lib/newIssue.js";
14
+ import { rememberPage as de } from "../../../lib/recent.js";
15
+ import { DocIcon as _ } from "../../../components/DocIcon.js";
16
+ import { PersonHoverCard as v } from "../../../components/PersonHoverCard.js";
17
+ import { DocProperties as fe } from "../../../components/DocProperties.js";
18
+ import { Editor as pe } from "../../../components/Editor.js";
19
+ import { useOthersOn as me, useReportLocation as he } from "../../../lib/live.js";
20
+ import { AnsweredDecision as y, DecisionCard as b } from "../../../components/AgentWork.js";
21
+ import { DocCover as ge, DocLookControls as _e } from "../../../components/DocLook.js";
22
+ import { FavoriteStar as ve } from "../../../components/FavoriteStar.js";
23
+ import { AreaSelect as ye } from "../../../components/AreaSelect.js";
24
+ import { caretColor as x, useCollabSession as S } from "../../../lib/collab.js";
25
+ import { CollabEditor as C } from "../../../components/CollabEditor.js";
26
+ import { DocComments as be, useOpenThreads as xe } from "../../../components/DocComments.js";
27
+ import { DocHistory as Se, DocVersion as Ce } from "../../../components/DocHistory.js";
28
+ import { DocOutline as we } from "../../../components/DocOutline.js";
29
+ import { Connections as Te } from "../../../components/Graph.js";
30
+ import { FieldNote as Ee, Viewers as De } from "../../../components/Presence.js";
31
+ import { UnlinkedMentions as Oe, useUnlinkedMentions as ke } from "../../../components/UnlinkedMentions.js";
32
+ 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";
33
+ import { useCallback as Ae, useEffect as j, useMemo as je, useRef as M, useState as N } from "react";
34
+ import { useErrorMessage as Me } from "@parallelworks/problem/react";
34
35
  import { useTranslations as P } from "use-intl";
35
36
  import { Fragment as F, jsx as I, jsxs as L } from "react/jsx-runtime";
36
37
  import { useQuery as R, useSuspenseQuery as z } from "@tanstack/react-query";
37
- import { MoreButton as Me } from "@parallelworks/ui/list";
38
+ import { MoreButton as Ne } from "@parallelworks/ui/list";
38
39
  // src/routes/$workspace/docs/$doc.tsx?tsr-split=component
39
- var Ne = 120;
40
+ var Pe = 120;
40
41
  function B() {
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({
42
+ let t = P("docs"), r = P("common"), i = Me(), { workspace: a, doc: s } = d.useParams(), { rename: f } = d.useSearch(), { data: p } = z(o(a, te(s))), m = p.key, { data: se } = z(l(a)), { data: ce } = z(c), g = se.find((e) => e.id === p.teamId), { data: _ } = z(u(a)), [v, y] = N();
43
+ he({
43
44
  doc: p.key,
44
- ...y && { field: y }
45
- }), e(p.title || t("untitled"), _?.name);
46
- let x = fe({ doc: p.key }, g?.user.username);
45
+ ...v && { field: v }
46
+ }), e(p.title || t("untitled"), g?.name);
47
+ let b = me({ doc: p.key }, ce?.user.username);
47
48
  j(() => {
48
- ue(a, {
49
+ de(a, {
49
50
  kind: "doc",
50
- href: re(a, p),
51
+ href: ne(a, p),
51
52
  label: p.title
52
53
  });
53
54
  }, [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
+ let x = n(), S = A(), C = ae(a), w = ie(a), T = ue(), O = M(null), [k, je] = N(null), F = M(null), R = ke(a, p, k), [B, We] = N(""), V = M(null), [H, U] = N(!1), [Ge, W] = N(), G = xe(a, m), [K, q] = N(!1), [Ke, J] = N(!1), [qe, Y] = N(!1), [X, Z] = N();
55
56
  j(() => {
56
- (s !== m(p) || f) && S({
57
+ (s !== h(p) || f) && x({
57
58
  to: "/$workspace/docs/$doc",
58
59
  params: {
59
60
  workspace: a,
60
- doc: m(p)
61
+ doc: h(p)
61
62
  },
62
63
  search: {},
63
64
  replace: !0
@@ -67,20 +68,20 @@ function B() {
67
68
  p,
68
69
  a,
69
70
  f,
70
- S
71
+ x
71
72
  ]);
72
- let qe = ke((e) => {
73
- if (O.current = e, Ae(e), !e) return;
73
+ let Je = Ae((e) => {
74
+ if (O.current = e, je(e), !e) return;
74
75
  let t = decodeURIComponent(location.hash.slice(1));
75
76
  if (t) {
76
- for (let n of e.view.dom.querySelectorAll("h1, h2, h3, h4, h5, h6")) if (se(n.textContent ?? "") === t) {
77
+ for (let n of e.view.dom.querySelectorAll("h1, h2, h3, h4, h5, h6")) if (oe(n.textContent ?? "") === t) {
77
78
  n.scrollIntoView({ block: "start" });
78
79
  break;
79
80
  }
80
81
  }
81
82
  e.on("selectionUpdate", () => {
82
83
  let { from: t, to: n } = e.state.selection;
83
- Ue(t === n ? "" : e.state.doc.textBetween(t, n, "\n\n").trim());
84
+ We(t === n ? "" : e.state.doc.textBetween(t, n, "\n\n").trim());
84
85
  });
85
86
  }, []);
86
87
  j(() => {
@@ -93,7 +94,7 @@ function B() {
93
94
  quoteSuffix: r.textBetween(n, Math.min(r.content.size, n + 64), "\n")
94
95
  });
95
96
  }, [H, B]);
96
- let Je = (e) => {
97
+ let Ye = (e) => {
97
98
  let t = O.current;
98
99
  if (!t || !e.quote) return;
99
100
  let n = t.state.doc, r = n.textBetween(0, n.content.size, "\n"), i = -1, a = -1;
@@ -124,15 +125,15 @@ function B() {
124
125
  }).scrollIntoView().run();
125
126
  }, Q = () => {
126
127
  let e = B;
127
- if (!e || !_) return;
128
+ if (!e || !g) return;
128
129
  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),
130
+ T({
131
+ team: g.key,
132
+ title: (e.split("\n")[0] ?? "").slice(0, Pe),
132
133
  body: t("fromDoc", {
133
134
  quote: n,
134
135
  title: p.title,
135
- url: ie(a, p)
136
+ url: re(a, p)
136
137
  }),
137
138
  origin: { doc: p.key },
138
139
  onCreated: (e) => {
@@ -145,25 +146,25 @@ function B() {
145
146
  text: e.identifier,
146
147
  marks: [{
147
148
  type: "link",
148
- attrs: { href: ce(a, e.identifier) }
149
+ attrs: { href: le(a, e.identifier) }
149
150
  }]
150
151
  }]).run();
151
152
  }
152
153
  });
153
- }, Ye = p.ancestors ?? [], $ = !!p.archivedAt;
154
+ }, Xe = p.ancestors ?? [], $ = !!p.archivedAt;
154
155
  return /* @__PURE__ */ L("div", {
155
156
  className: "flex h-full flex-col",
156
157
  children: [/* @__PURE__ */ L("header", {
157
158
  className: "flex h-12 shrink-0 items-center gap-2 border-b border-border px-4 text-sm md:px-5",
158
- onContextMenu: (e) => C(e, w(p, { onRename: () => V.current?.focus() })),
159
+ onContextMenu: (e) => S(e, C(p, { onRename: () => V.current?.focus() })),
159
160
  children: [
160
- /* @__PURE__ */ I(Ve, {
161
+ /* @__PURE__ */ I(He, {
161
162
  workspace: a,
162
163
  doc: p,
163
- path: Ye,
164
- space: _?.name ?? v.name
164
+ path: Xe,
165
+ space: g?.name ?? _.name
165
166
  }),
166
- /* @__PURE__ */ I(ge, {
167
+ /* @__PURE__ */ I(ve, {
167
168
  workspace: a,
168
169
  kind: "doc",
169
170
  target: p.id
@@ -171,65 +172,65 @@ function B() {
171
172
  /* @__PURE__ */ L("span", {
172
173
  className: "ml-auto flex shrink-0 items-center gap-3",
173
174
  children: [
174
- B && !$ && /* @__PURE__ */ I(D, {
175
+ B && !$ && /* @__PURE__ */ I(E, {
175
176
  type: "button",
176
177
  size: "sm",
177
178
  onMouseDown: (e) => e.preventDefault(),
178
179
  onClick: Q,
179
180
  children: t("createIssue")
180
181
  }),
181
- T.rename.isPending && /* @__PURE__ */ I("span", {
182
+ w.rename.isPending && /* @__PURE__ */ I("span", {
182
183
  className: "text-xs text-muted-foreground",
183
184
  children: r("saving")
184
185
  }),
185
- /* @__PURE__ */ I(Te, {
186
+ /* @__PURE__ */ I(De, {
186
187
  workspace: a,
187
- others: x
188
+ others: b
188
189
  }),
189
- /* @__PURE__ */ L(D, {
190
+ /* @__PURE__ */ L(E, {
190
191
  type: "button",
191
192
  size: "sm",
192
193
  "aria-pressed": H,
193
194
  onClick: () => {
194
- U((e) => !e), W(void 0), K(!1), q(!1), Y(!1);
195
+ U((e) => !e), W(void 0), q(!1), J(!1), Y(!1);
195
196
  },
196
197
  ...G > 0 && { "aria-label": t("commentsCount", { count: G }) },
197
198
  className: "relative aria-pressed:bg-muted max-md:hidden",
198
- children: [t("comments"), /* @__PURE__ */ I(He, { count: G })]
199
+ children: [t("comments"), /* @__PURE__ */ I(Ue, { count: G })]
199
200
  }),
200
- /* @__PURE__ */ I(D, {
201
+ /* @__PURE__ */ I(E, {
201
202
  type: "button",
202
203
  size: "sm",
203
- "aria-pressed": Ge,
204
+ "aria-pressed": K,
204
205
  onClick: () => {
205
- K((e) => !e), Z(void 0), U(!1), q(!1), Y(!1);
206
+ q((e) => !e), Z(void 0), U(!1), J(!1), Y(!1);
206
207
  },
207
208
  className: "aria-pressed:bg-muted max-md:hidden",
208
209
  children: t("history")
209
210
  }),
210
- !$ && /* @__PURE__ */ L(D, {
211
+ !$ && /* @__PURE__ */ L(E, {
211
212
  type: "button",
212
213
  size: "sm",
213
214
  "aria-pressed": Ke,
214
215
  onClick: () => {
215
- q((e) => !e), U(!1), K(!1), Z(void 0), Y(!1);
216
+ J((e) => !e), U(!1), q(!1), Z(void 0), Y(!1);
216
217
  },
217
218
  ...R.length > 0 && { "aria-label": t("unlinkedCount", { count: R.length }) },
218
219
  className: "relative aria-pressed:bg-muted max-md:hidden",
219
- children: [t("links"), /* @__PURE__ */ I(He, { count: R.length })]
220
+ children: [t("links"), /* @__PURE__ */ I(Ue, { count: R.length })]
220
221
  }),
221
- !$ && /* @__PURE__ */ I(D, {
222
+ !$ && /* @__PURE__ */ I(E, {
222
223
  type: "button",
223
224
  size: "sm",
224
- "aria-pressed": J,
225
+ "aria-pressed": qe,
225
226
  onClick: () => {
226
- Y((e) => !e), U(!1), K(!1), Z(void 0), q(!1);
227
+ Y((e) => !e), U(!1), q(!1), Z(void 0), J(!1);
227
228
  },
228
229
  className: "aria-pressed:bg-muted max-md:hidden",
229
230
  children: t("graph")
230
231
  }),
231
- /* @__PURE__ */ I(Me, {
232
- items: () => w(p, { onRename: () => V.current?.focus() }),
232
+ /* @__PURE__ */ I(Ne, {
233
+ items: () => C(p, { onRename: () => V.current?.focus() }),
233
234
  label: r("moreActionsFor", { name: p.title }),
234
235
  visible: !0
235
236
  })
@@ -242,7 +243,7 @@ function B() {
242
243
  /* @__PURE__ */ L("div", {
243
244
  ref: F,
244
245
  className: "min-h-0 flex-1 overflow-y-auto",
245
- children: [!X && /* @__PURE__ */ I(me, {
246
+ children: [!X && /* @__PURE__ */ I(ge, {
246
247
  workspace: a,
247
248
  doc: p,
248
249
  editable: !$
@@ -256,50 +257,50 @@ function B() {
256
257
  children: [/* @__PURE__ */ I("span", {
257
258
  className: "flex-1",
258
259
  children: t("archivedNotice")
259
- }), /* @__PURE__ */ I(D, {
260
+ }), /* @__PURE__ */ I(E, {
260
261
  type: "button",
261
262
  variant: "primary",
262
263
  size: "sm",
263
- onClick: () => T.restore.mutate(p),
264
+ onClick: () => w.restore.mutate(p),
264
265
  children: t("restore")
265
266
  })]
266
267
  }),
267
- /* @__PURE__ */ I(he, {
268
+ /* @__PURE__ */ I(_e, {
268
269
  workspace: a,
269
270
  doc: p,
270
271
  editable: !$ && !X
271
272
  }),
272
- /* @__PURE__ */ I(Pe, {
273
+ /* @__PURE__ */ I(Fe, {
273
274
  doc: p,
274
275
  input: V,
275
276
  autoFocus: !!f,
276
277
  readOnly: $,
277
- onFocus: () => b("title"),
278
- onBlur: () => b(void 0),
279
- onSave: (e) => T.rename.mutate({
278
+ onFocus: () => y("title"),
279
+ onBlur: () => y(void 0),
280
+ onSave: (e) => w.rename.mutate({
280
281
  doc: p,
281
282
  title: e
282
283
  })
283
284
  }, p.id),
284
- /* @__PURE__ */ I(we, {
285
+ /* @__PURE__ */ I(Ee, {
285
286
  workspace: a,
286
- others: x,
287
+ others: b,
287
288
  field: "title"
288
289
  }),
289
- T.rename.isError && /* @__PURE__ */ I(Oe, {
290
+ w.rename.isError && /* @__PURE__ */ I(D, {
290
291
  className: "mt-1",
291
- children: i(T.rename.error)
292
+ children: i(w.rename.error)
292
293
  }),
293
294
  /* @__PURE__ */ L("div", {
294
295
  className: "mt-2 flex flex-wrap items-center gap-x-3 gap-y-1",
295
- children: [/* @__PURE__ */ I(Fe, {
296
+ children: [/* @__PURE__ */ I(Ie, {
296
297
  workspace: a,
297
298
  doc: p
298
- }), /* @__PURE__ */ I(_e, {
299
+ }), /* @__PURE__ */ I(ye, {
299
300
  workspace: a,
300
301
  teamId: p.teamId,
301
302
  value: p.areaId,
302
- onChange: (e) => T.fileUnder.mutate({
303
+ onChange: (e) => w.fileUnder.mutate({
303
304
  doc: p,
304
305
  area: e
305
306
  }),
@@ -307,75 +308,81 @@ function B() {
307
308
  className: "flex h-6 items-center gap-1.5 rounded-md px-1.5 text-xs hover:bg-muted"
308
309
  })]
309
310
  }),
311
+ !X && /* @__PURE__ */ I(fe, {
312
+ workspace: a,
313
+ doc: p,
314
+ space: g?.key ?? "workspace",
315
+ editable: !$
316
+ }),
310
317
  /* @__PURE__ */ I("div", {
311
- onContextMenu: (e) => B && !$ && C(e, [{
318
+ onContextMenu: (e) => B && !$ && S(e, [{
312
319
  label: t("createIssue"),
313
320
  onClick: Q
314
- }, te(t("copySelection"), B)]),
315
- children: X ? /* @__PURE__ */ I(xe, {
321
+ }, ee(t("copySelection"), B)]),
322
+ children: X ? /* @__PURE__ */ I(Ce, {
316
323
  workspace: a,
317
324
  doc: p,
318
325
  versionId: X,
319
326
  onDone: () => Z(void 0)
320
327
  }) : $ ? /* @__PURE__ */ I("div", {
321
328
  className: "mt-4",
322
- children: /* @__PURE__ */ I(de, {
329
+ children: /* @__PURE__ */ I(pe, {
323
330
  value: p.body ?? "",
324
331
  editable: !1,
325
332
  className: "min-h-32"
326
333
  })
327
- }) : /* @__PURE__ */ I(Ie, {
334
+ }) : /* @__PURE__ */ I(Le, {
328
335
  workspace: a,
329
336
  doc: p,
330
- onEditor: qe,
331
- onFocus: () => b("body"),
332
- onBlur: () => b(void 0)
337
+ onEditor: Je,
338
+ onFocus: () => y("body"),
339
+ onBlur: () => y(void 0)
333
340
  })
334
341
  }),
335
- /* @__PURE__ */ I(Re, {
342
+ /* @__PURE__ */ I(ze, {
336
343
  workspace: a,
337
344
  docKey: p.key
338
345
  }),
339
- /* @__PURE__ */ I(ze, {
346
+ /* @__PURE__ */ I(Be, {
340
347
  workspace: a,
341
348
  docKey: p.key
342
349
  }),
343
- /* @__PURE__ */ I(Le, {
350
+ /* @__PURE__ */ I(Re, {
344
351
  workspace: a,
345
352
  docKey: p.key
346
353
  }),
347
- /* @__PURE__ */ I(Be, {
354
+ /* @__PURE__ */ I(Ve, {
348
355
  workspace: a,
349
356
  docKey: p.key
350
357
  })
351
358
  ]
352
- }), !$ && !X && /* @__PURE__ */ I(Se, {
359
+ }), !$ && !X && /* @__PURE__ */ I(we, {
353
360
  editor: k,
354
361
  scroller: F
355
362
  })]
356
363
  })]
357
364
  }),
358
- H && /* @__PURE__ */ I(ve, {
365
+ H && /* @__PURE__ */ I(be, {
359
366
  workspace: a,
360
367
  doc: p,
361
- draft: We,
368
+ draft: Ge,
362
369
  onDraftDone: () => W(void 0),
363
- onShowQuote: Je
370
+ onShowQuote: Ye
364
371
  }),
365
- Ge && /* @__PURE__ */ I(be, {
372
+ K && /* @__PURE__ */ I(Se, {
366
373
  workspace: a,
367
374
  doc: p,
368
375
  selected: X,
369
376
  onSelect: Z
370
377
  }),
371
- Ke && !$ && /* @__PURE__ */ I(Ee, {
378
+ Ke && !$ && /* @__PURE__ */ I(Oe, {
372
379
  editor: k,
373
380
  suggestions: R
374
381
  }),
375
- J && !$ && /* @__PURE__ */ I("aside", {
382
+ qe && !$ && /* @__PURE__ */ I("aside", {
376
383
  "aria-label": t("graph"),
377
384
  className: "w-96 shrink-0 overflow-y-auto border-l border-border px-3 py-4 max-md:hidden",
378
- children: /* @__PURE__ */ I(Ce, {
385
+ children: /* @__PURE__ */ I(Te, {
379
386
  workspace: a,
380
387
  of: { doc: p.key },
381
388
  width: 352
@@ -385,7 +392,7 @@ function B() {
385
392
  })]
386
393
  });
387
394
  }
388
- function Pe({ doc: e, input: t, autoFocus: n, readOnly: r, onSave: i, onFocus: a, onBlur: o }) {
395
+ function Fe({ doc: e, input: t, autoFocus: n, readOnly: r, onSave: i, onFocus: a, onBlur: o }) {
389
396
  let s = P("docs");
390
397
  return /* @__PURE__ */ L(F, { children: [/* @__PURE__ */ I("h1", {
391
398
  className: "sr-only",
@@ -401,15 +408,15 @@ function Pe({ doc: e, input: t, autoFocus: n, readOnly: r, onSave: i, onFocus: a
401
408
  "aria-label": s("docTitle")
402
409
  })] });
403
410
  }
404
- function Fe({ workspace: e, doc: t }) {
405
- let n = P("docs"), r = h(), { actorName: i, person: a, avatarOf: o } = g(e), s = i(t.editor);
411
+ function Ie({ workspace: e, doc: t }) {
412
+ let n = P("docs"), r = se(), { actorName: i, person: a, avatarOf: o } = ce(e), s = i(t.editor);
406
413
  return /* @__PURE__ */ L("p", {
407
414
  className: "flex items-center gap-1.5 text-xs text-muted-foreground",
408
- children: [/* @__PURE__ */ I(y, {
415
+ children: [/* @__PURE__ */ I(v, {
409
416
  workspace: e,
410
417
  kind: t.editor.kind,
411
418
  handle: t.editor.handle,
412
- children: /* @__PURE__ */ I(T, {
419
+ children: /* @__PURE__ */ I(w, {
413
420
  kind: t.editor.kind === "agent" ? "agent" : "person",
414
421
  name: s,
415
422
  src: o(t.editor.kind, t.editor.handle),
@@ -429,15 +436,15 @@ function Fe({ workspace: e, doc: t }) {
429
436
  })]
430
437
  });
431
438
  }
432
- function Ie({ workspace: e, doc: t, onEditor: n, onFocus: r, onBlur: i }) {
433
- let a = P("docs"), { data: o } = z(c), s = M(null), l = Ae(() => ({
439
+ function Le({ workspace: e, doc: t, onEditor: n, onFocus: r, onBlur: i }) {
440
+ let a = P("docs"), { data: o } = z(c), s = M(null), l = je(() => ({
434
441
  name: o?.user.name ?? a("someone"),
435
- color: S(o?.user.username ?? "")
442
+ color: x(o?.user.username ?? "")
436
443
  }), [
437
444
  o?.user.name,
438
445
  o?.user.username,
439
446
  a
440
- ]), { session: u, error: d } = C({
447
+ ]), { session: u, error: d } = S({
441
448
  workspace: e,
442
449
  target: { doc: t.key },
443
450
  user: l,
@@ -445,7 +452,7 @@ function Ie({ workspace: e, doc: t, onEditor: n, onFocus: r, onBlur: i }) {
445
452
  });
446
453
  return /* @__PURE__ */ L("div", {
447
454
  className: "mt-6 min-h-48",
448
- children: [u ? /* @__PURE__ */ I(w, {
455
+ children: [u ? /* @__PURE__ */ I(C, {
449
456
  session: u,
450
457
  user: l,
451
458
  getMarkdown: s,
@@ -455,18 +462,18 @@ function Ie({ workspace: e, doc: t, onEditor: n, onFocus: r, onBlur: i }) {
455
462
  placeholder: a("bodyPlaceholder"),
456
463
  label: a("body"),
457
464
  className: "min-h-48"
458
- }, `${u.generation}:${u.doc.guid}`) : /* @__PURE__ */ I(de, {
465
+ }, `${u.generation}:${u.doc.guid}`) : /* @__PURE__ */ I(pe, {
459
466
  value: t.body ?? "",
460
467
  editable: !1,
461
468
  className: "min-h-48"
462
- }), /* @__PURE__ */ I(Oe, {
469
+ }), /* @__PURE__ */ I(D, {
463
470
  className: "mt-1",
464
471
  children: d
465
472
  })]
466
473
  });
467
474
  }
468
- function Le({ workspace: e, docKey: n }) {
469
- let r = P("docs"), { data: i } = z(a(e, n)), o = A(), s = _(e);
475
+ function Re({ workspace: e, docKey: n }) {
476
+ let r = P("docs"), { data: i } = z(a(e, n)), o = A(), s = g(e);
470
477
  return i.length === 0 ? null : /* @__PURE__ */ L("section", {
471
478
  className: "mt-10",
472
479
  "aria-label": r("linkedIssues"),
@@ -498,7 +505,7 @@ function Le({ workspace: e, docKey: n }) {
498
505
  })]
499
506
  });
500
507
  }
501
- function Re({ workspace: e, docKey: n }) {
508
+ function ze({ workspace: e, docKey: n }) {
502
509
  let r = P("docs"), { data: i = [] } = R(s(e, n));
503
510
  return i.length === 0 ? null : /* @__PURE__ */ L("section", {
504
511
  className: "mt-10 rounded-lg border border-warning/60 px-4 py-3",
@@ -518,7 +525,7 @@ function Re({ workspace: e, docKey: n }) {
518
525
  to: "/$workspace/knowledge/$term",
519
526
  params: {
520
527
  workspace: e,
521
- term: ee(n)
528
+ term: m(n)
522
529
  },
523
530
  className: "hover:underline",
524
531
  children: r("lostSection", {
@@ -530,7 +537,7 @@ function Re({ workspace: e, docKey: n }) {
530
537
  ]
531
538
  });
532
539
  }
533
- function ze({ workspace: e, docKey: t }) {
540
+ function Be({ workspace: e, docKey: t }) {
534
541
  let n = P("docs"), { data: r } = z(i(e, t)), a = r.filter((e) => !e.canceled);
535
542
  return a.length === 0 ? null : /* @__PURE__ */ L("section", {
536
543
  className: "mt-10 space-y-3",
@@ -538,19 +545,19 @@ function ze({ workspace: e, docKey: t }) {
538
545
  children: [/* @__PURE__ */ I("h2", {
539
546
  className: "text-sm font-semibold",
540
547
  children: n("questions")
541
- }), a.map((t) => t.answer ? /* @__PURE__ */ I(b, {
548
+ }), a.map((t) => t.answer ? /* @__PURE__ */ I(y, {
542
549
  workspace: e,
543
550
  decision: t,
544
551
  showIssue: !0
545
- }, t.id) : /* @__PURE__ */ I(x, {
552
+ }, t.id) : /* @__PURE__ */ I(b, {
546
553
  workspace: e,
547
554
  decision: t,
548
555
  showIssue: !0
549
556
  }, t.id))]
550
557
  });
551
558
  }
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";
559
+ function Ve({ workspace: e, docKey: n }) {
560
+ let i = P("docs"), { data: a } = z(r(e, n)), o = A(), s = ae(e), c = g(e), l = "flex h-8 items-center gap-2 rounded-md px-2 text-sm hover:bg-muted";
554
561
  return a.docs.length + a.issues.length + a.comments.length === 0 ? null : /* @__PURE__ */ L("section", {
555
562
  className: "mt-10",
556
563
  "aria-label": i("linkedFrom"),
@@ -564,11 +571,11 @@ function Be({ workspace: e, docKey: n }) {
564
571
  to: "/$workspace/docs/$doc",
565
572
  params: {
566
573
  workspace: e,
567
- doc: m(n)
574
+ doc: h(n)
568
575
  },
569
576
  onContextMenu: (e) => o(e, s(n)),
570
577
  className: l,
571
- children: [/* @__PURE__ */ I(v, {
578
+ children: [/* @__PURE__ */ I(_, {
572
579
  icon: n.icon,
573
580
  className: "size-3.5",
574
581
  emojiClassName: "text-xs"
@@ -621,9 +628,9 @@ function Be({ workspace: e, docKey: n }) {
621
628
  })]
622
629
  });
623
630
  }
624
- function Ve({ workspace: e, doc: t, path: n, space: r }) {
631
+ function He({ workspace: e, doc: t, path: n, space: r }) {
625
632
  let i = P("docs");
626
- return /* @__PURE__ */ I(E, {
633
+ return /* @__PURE__ */ I(T, {
627
634
  label: i("breadcrumbs"),
628
635
  className: "min-w-0",
629
636
  crumbs: [
@@ -634,8 +641,8 @@ function Ve({ workspace: e, doc: t, path: n, space: r }) {
634
641
  { label: r },
635
642
  ...n.map((t) => ({
636
643
  label: t.title,
637
- href: `/${e}/docs/${m(t)}`,
638
- icon: t.icon && /* @__PURE__ */ I(v, {
644
+ href: `/${e}/docs/${h(t)}`,
645
+ icon: t.icon && /* @__PURE__ */ I(_, {
639
646
  icon: t.icon,
640
647
  className: "size-3.5",
641
648
  emojiClassName: "text-xs"
@@ -643,7 +650,7 @@ function Ve({ workspace: e, doc: t, path: n, space: r }) {
643
650
  })),
644
651
  {
645
652
  label: t.title,
646
- icon: t.icon && /* @__PURE__ */ I(v, {
653
+ icon: t.icon && /* @__PURE__ */ I(_, {
647
654
  icon: t.icon,
648
655
  className: "size-3.5",
649
656
  emojiClassName: "text-xs"
@@ -652,7 +659,7 @@ function Ve({ workspace: e, doc: t, path: n, space: r }) {
652
659
  ]
653
660
  });
654
661
  }
655
- function He({ count: e }) {
662
+ function Ue({ count: e }) {
656
663
  return e <= 0 ? null : /* @__PURE__ */ I("span", {
657
664
  "aria-hidden": !0,
658
665
  className: "pointer-events-none absolute -top-1.5 -right-1.5 flex h-4 min-w-4 items-center justify-center rounded-full bg-primary px-1 text-[10px] font-semibold text-primary-foreground tabular-nums",
@@ -0,0 +1,6 @@
1
+ import { createFileRoute as e, lazyRouteComponent as t } from "@tanstack/react-router";
2
+ var n = e("/$workspace/docs/space/$space")({
3
+ validateSearch: (e) => typeof e.view == "string" && e.view ? { view: e.view } : {},
4
+ component: t(() => import("./space2._space.js"), "component")
5
+ });
6
+ export { n as Route };