@parallelworks/tandem-web 0.138.2 → 0.139.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 (71) hide show
  1. package/components/AgentWork.js +35 -35
  2. package/components/AppRoot.js +4 -4
  3. package/components/AreaWork.js +1 -1
  4. package/components/BlockHandle.js +3 -3
  5. package/components/CommandPalette.js +27 -27
  6. package/components/DateChip.js +27 -27
  7. package/components/DocLinkPicker.js +17 -17
  8. package/components/Graph.js +6 -6
  9. package/components/HoverCards.js +30 -29
  10. package/components/IssueListBlock.js +83 -83
  11. package/components/LinkCard.js +20 -20
  12. package/components/MentionPicker.js +12 -12
  13. package/components/NewIssueDialog.js +116 -116
  14. package/components/NewProjectDialog.js +5 -4
  15. package/components/Planning.js +31 -43
  16. package/components/RouterLink.js +4 -4
  17. package/components/ShareDialog.js +12 -12
  18. package/components/SharedUI.js +19 -19
  19. package/components/SlashMenu.js +11 -11
  20. package/components/SubPages.js +10 -10
  21. package/components/UnlinkedMentions.js +10 -10
  22. package/components/WorkCounts.js +8 -8
  23. package/components/settings.js +26 -26
  24. package/hostedApp.js +36 -36
  25. package/hosting.d.ts +24 -11
  26. package/index.js +58 -27
  27. package/lib/base.js +1 -14
  28. package/lib/docs.js +6 -6
  29. package/lib/issueMenu.js +33 -33
  30. package/lib/knowledge.js +90 -101
  31. package/lib/knowledgeKinds.js +14 -0
  32. package/lib/projectList.js +1 -1
  33. package/lib/projectStates.js +15 -0
  34. package/lib/router.js +20 -34
  35. package/package.json +2 -2
  36. package/pages/areas.js +147 -147
  37. package/pages/decisions.js +40 -40
  38. package/pages/issues.js +4 -4
  39. package/pages/projects.js +232 -231
  40. package/pages/triage.js +86 -86
  41. package/pages.js +21 -0
  42. package/routes/__root.js +6 -6
  43. package/routes/_workspace/docs/_doc2.js +12 -12
  44. package/routes/_workspace/docs2.js +8 -8
  45. package/routes/_workspace/graph2.js +9 -9
  46. package/routes/_workspace/issues/_identifier2.js +327 -327
  47. package/routes/_workspace/issues/index.js +6 -6
  48. package/routes/_workspace/knowledge/_term2.js +125 -124
  49. package/routes/_workspace/knowledge/index.js +8 -8
  50. package/routes/_workspace/knowledge/index2.js +22 -21
  51. package/routes/_workspace/measures2.js +4 -4
  52. package/routes/_workspace/people/_username.js +4 -4
  53. package/routes/_workspace/projects/_projectId3.js +264 -263
  54. package/routes/_workspace/projects/index.js +7 -7
  55. package/routes/_workspace/settings/account2.js +3 -3
  56. package/routes/_workspace/settings/audit-log2.js +4 -4
  57. package/routes/_workspace/settings/audit-log3.js +51 -51
  58. package/routes/_workspace/settings/labels2.js +14 -14
  59. package/routes/_workspace/settings/members2.js +9 -9
  60. package/routes/_workspace/settings/runners2.js +11 -11
  61. package/routes/_workspace/settings/teams2.js +15 -15
  62. package/routes/_workspace/settings/tokens2.js +5 -5
  63. package/routes/_workspace/settings/webhooks2.js +7 -7
  64. package/routes/_workspace/settings2.js +3 -3
  65. package/routes/_workspace/teams/_key/cycles/_number2.js +8 -8
  66. package/routes/_workspace/teams/_key/cycles/index2.js +20 -20
  67. package/routes/_workspace/teams/_key/issues.js +4 -4
  68. package/routes/_workspace/teams/_key/projects.js +4 -4
  69. package/routes/_workspace/teams/_key/settings2.js +8 -8
  70. package/routes/_workspace2.js +319 -319
  71. package/routes/docs/route2.js +15 -15
package/pages/triage.js CHANGED
@@ -12,19 +12,19 @@ import { actorAvatar as g } from "../lib/avatar.js";
12
12
  import { Editor as _ } from "../components/Editor.js";
13
13
  import { useShortcuts as v } from "../lib/shortcuts.js";
14
14
  import { Avatar as y, Button as b, EmptyState as x, buttonClasses as S, toast as C } from "@parallelworks/ui";
15
- import { useCallback as w, useEffect as T, useRef as E, useState as D } from "react";
16
- import { useErrorMessage as O } from "@parallelworks/problem/react";
17
- import { useTranslations as k } from "use-intl";
18
- import { Fragment as A, jsx as j, jsxs as M } from "react/jsx-runtime";
19
- import { useParams as N, useSearch as P } from "@tanstack/react-router";
15
+ import { useParams as w, useSearch as T } from "@tanstack/react-router";
16
+ import { useCallback as E, useEffect as D, useRef as O, useState as k } from "react";
17
+ import { useErrorMessage as A } from "@parallelworks/problem/react";
18
+ import { useTranslations as j } from "use-intl";
19
+ import { Fragment as M, jsx as N, jsxs as P } from "react/jsx-runtime";
20
20
  import { useMutation as F, useQuery as I, useQueryClient as L, useSuspenseQuery as R } from "@tanstack/react-query";
21
21
  // src/pages/triage.tsx
22
22
  function z() {
23
- let n = k("triage"), { workspace: i, key: a } = N({ strict: !1 }), { issue: s } = P({ strict: !1 }), { data: c } = R(o(i, a));
23
+ let n = j("triage"), { workspace: i, key: a } = w({ strict: !1 }), { issue: s } = T({ strict: !1 }), { data: c } = R(o(i, a));
24
24
  p(n("title"));
25
- let u = c.issues, d = O(), f = L(), [m, h] = D(/* @__PURE__ */ new Set()), [g, _] = D(/* @__PURE__ */ new Set()), y = w((e, t) => {
25
+ let u = c.issues, d = A(), f = L(), [m, h] = k(/* @__PURE__ */ new Set()), [g, _] = k(/* @__PURE__ */ new Set()), y = E((e, t) => {
26
26
  h((n) => n.has(e) === t ? n : t ? new Set(n).add(e) : V(n, e));
27
- }, []), S = u.filter((e) => m.has(e.id)), A = S.filter((e) => g.has(e.id)), I = r(), z = u.findIndex((e) => e.identifier === s?.toUpperCase()), W = E(null), G = u[z], K = (e) => I({
27
+ }, []), S = u.filter((e) => m.has(e.id)), M = S.filter((e) => g.has(e.id)), I = r(), z = u.findIndex((e) => e.identifier === s?.toUpperCase()), W = O(null), G = u[z], K = (e) => I({
28
28
  to: ".",
29
29
  search: e ? { issue: e.identifier.toLowerCase() } : {},
30
30
  replace: !0
@@ -62,12 +62,12 @@ function z() {
62
62
  }
63
63
  }),
64
64
  Escape: () => g.size > 0 ? _(/* @__PURE__ */ new Set()) : K(void 0)
65
- }), T(() => {
65
+ }), D(() => {
66
66
  let e = G && document.getElementById(`triage-${G.id}`);
67
67
  e && (e.scrollIntoView({ block: "nearest" }), e.parentElement?.contains(document.activeElement) && e.querySelector("a")?.focus({ preventScroll: !0 }));
68
68
  }, [G]);
69
69
  let Q = F({
70
- mutationFn: async (n) => (await Promise.allSettled(A.map(async (r) => t(await e.POST("/api/v1/workspaces/{workspace}/issues/{identifier}/triage", {
70
+ mutationFn: async (n) => (await Promise.allSettled(M.map(async (r) => t(await e.POST("/api/v1/workspaces/{workspace}/issues/{identifier}/triage", {
71
71
  params: { path: {
72
72
  workspace: i,
73
73
  identifier: r.identifier
@@ -92,72 +92,72 @@ function z() {
92
92
  "issues"
93
93
  ] })
94
94
  });
95
- return /* @__PURE__ */ M("div", {
95
+ return /* @__PURE__ */ P("div", {
96
96
  className: "flex h-full flex-col",
97
- children: [/* @__PURE__ */ M("header", {
97
+ children: [/* @__PURE__ */ P("header", {
98
98
  className: "flex h-12 shrink-0 items-center gap-3 border-b border-border px-4 md:px-5",
99
99
  children: [
100
- /* @__PURE__ */ j("h1", {
100
+ /* @__PURE__ */ N("h1", {
101
101
  className: "text-sm font-semibold",
102
102
  children: n("title")
103
103
  }),
104
- /* @__PURE__ */ j("span", {
104
+ /* @__PURE__ */ N("span", {
105
105
  className: "text-xs text-muted-foreground tabular-nums",
106
106
  children: u.length
107
107
  }),
108
- A.length > 0 && /* @__PURE__ */ M("div", {
108
+ M.length > 0 && /* @__PURE__ */ P("div", {
109
109
  className: "ml-auto flex items-center gap-2",
110
110
  children: [
111
- /* @__PURE__ */ j("span", {
111
+ /* @__PURE__ */ N("span", {
112
112
  className: "text-xs font-medium text-human",
113
- children: n("selected", { count: A.length })
113
+ children: n("selected", { count: M.length })
114
114
  }),
115
- A.length < S.length && /* @__PURE__ */ j("button", {
115
+ M.length < S.length && /* @__PURE__ */ N("button", {
116
116
  type: "button",
117
117
  onClick: () => _(new Set(S.map((e) => e.id))),
118
118
  className: "text-xs hover:underline",
119
119
  children: n("selectAll")
120
120
  }),
121
- /* @__PURE__ */ j("button", {
121
+ /* @__PURE__ */ N("button", {
122
122
  type: "button",
123
123
  onClick: () => _(/* @__PURE__ */ new Set()),
124
124
  className: "text-xs hover:underline",
125
125
  children: n("clear")
126
126
  }),
127
- /* @__PURE__ */ j(b, {
127
+ /* @__PURE__ */ N(b, {
128
128
  variant: "outline",
129
129
  size: "sm",
130
130
  title: n("declineHelp"),
131
131
  loading: Q.isPending && Q.variables === "decline",
132
132
  disabled: Q.isPending,
133
133
  onClick: () => Q.mutate("decline"),
134
- children: n("declineCount", { count: A.length })
134
+ children: n("declineCount", { count: M.length })
135
135
  }),
136
- /* @__PURE__ */ j(b, {
136
+ /* @__PURE__ */ N(b, {
137
137
  variant: "primary",
138
138
  size: "sm",
139
139
  title: n("acceptHelp"),
140
140
  loading: Q.isPending && Q.variables === "accept",
141
141
  disabled: Q.isPending,
142
142
  onClick: () => Q.mutate("accept"),
143
- children: n("acceptCount", { count: A.length })
143
+ children: n("acceptCount", { count: M.length })
144
144
  })
145
145
  ]
146
146
  })
147
147
  ]
148
- }), u.length === 0 ? /* @__PURE__ */ j("div", {
148
+ }), u.length === 0 ? /* @__PURE__ */ N("div", {
149
149
  className: "min-h-0 flex-1 overflow-y-auto p-6",
150
- children: /* @__PURE__ */ j(x, {
151
- icon: /* @__PURE__ */ j(l, {}),
150
+ children: /* @__PURE__ */ N(x, {
151
+ icon: /* @__PURE__ */ N(l, {}),
152
152
  title: n("empty"),
153
153
  description: n("emptyDescription")
154
154
  })
155
- }) : /* @__PURE__ */ M("div", {
155
+ }) : /* @__PURE__ */ P("div", {
156
156
  className: "flex min-h-0 flex-1",
157
- children: [/* @__PURE__ */ j("ul", {
157
+ children: [/* @__PURE__ */ N("ul", {
158
158
  "aria-label": n("title"),
159
159
  className: B("min-h-0 min-w-0 flex-1 flex-col overflow-y-auto px-2 py-2 md:flex md:max-w-md md:border-r md:border-border", G ? "hidden" : "flex"),
160
- children: u.map((e, t) => /* @__PURE__ */ j(H, {
160
+ children: u.map((e, t) => /* @__PURE__ */ N(H, {
161
161
  workspace: i,
162
162
  issue: e,
163
163
  onEligible: y,
@@ -165,16 +165,16 @@ function z() {
165
165
  current: t === z,
166
166
  onClick: (e) => Y(e, t)
167
167
  }, e.id))
168
- }), /* @__PURE__ */ j("div", {
168
+ }), /* @__PURE__ */ N("div", {
169
169
  className: B("min-w-0 flex-1 overflow-y-auto md:block", G ? "block" : "hidden"),
170
- children: G ? /* @__PURE__ */ j(U, {
170
+ children: G ? /* @__PURE__ */ N(U, {
171
171
  workspace: i,
172
172
  issue: G,
173
173
  onBack: () => K(void 0),
174
174
  onDecided: Z
175
- }, G.id) : /* @__PURE__ */ j("div", {
175
+ }, G.id) : /* @__PURE__ */ N("div", {
176
176
  className: "px-6 py-24",
177
- children: /* @__PURE__ */ j(x, {
177
+ children: /* @__PURE__ */ N(x, {
178
178
  title: n("noneSelected"),
179
179
  description: n("shortcuts")
180
180
  })
@@ -189,49 +189,49 @@ function V(e, t) {
189
189
  return n.delete(t), n;
190
190
  }
191
191
  function H({ workspace: e, issue: t, onEligible: r, picked: i, current: a, onClick: o }) {
192
- let s = k("triage"), c = d(), { actorName: l, avatarOf: u } = f(e), p = m(e, t.teamId);
193
- T(() => r(t.id, p), [
192
+ let s = j("triage"), c = d(), { actorName: l, avatarOf: u } = f(e), p = m(e, t.teamId);
193
+ D(() => r(t.id, p), [
194
194
  r,
195
195
  t.id,
196
196
  p
197
197
  ]);
198
198
  let h = t.creator;
199
- return /* @__PURE__ */ j("li", {
199
+ return /* @__PURE__ */ N("li", {
200
200
  id: `triage-${t.id}`,
201
201
  "data-picked": i || void 0,
202
- children: /* @__PURE__ */ M(n, {
202
+ children: /* @__PURE__ */ P(n, {
203
203
  to: ".",
204
204
  search: { issue: t.identifier.toLowerCase() },
205
205
  replace: !0,
206
206
  onClick: o,
207
207
  "aria-current": a || void 0,
208
208
  className: B("flex flex-col gap-1 px-3 py-2.5 select-none", i ? "bg-human-soft" : B("rounded-md", a ? "bg-muted" : "hover:bg-muted")),
209
- children: [/* @__PURE__ */ M("span", {
209
+ children: [/* @__PURE__ */ P("span", {
210
210
  className: "flex items-baseline gap-3",
211
- children: [/* @__PURE__ */ j("span", {
211
+ children: [/* @__PURE__ */ N("span", {
212
212
  className: "min-w-0 flex-1 truncate text-sm font-medium",
213
213
  children: t.title
214
- }), /* @__PURE__ */ j("span", {
214
+ }), /* @__PURE__ */ N("span", {
215
215
  className: "shrink-0 text-xs text-muted-foreground tabular-nums",
216
216
  children: t.identifier
217
217
  })]
218
- }), /* @__PURE__ */ M("span", {
218
+ }), /* @__PURE__ */ P("span", {
219
219
  className: "flex items-center gap-1.5 text-xs text-muted-foreground",
220
220
  children: [
221
- /* @__PURE__ */ j("span", {
221
+ /* @__PURE__ */ N("span", {
222
222
  className: B("flex shrink-0 rounded-full", i && "ring-1 ring-human/40"),
223
- children: /* @__PURE__ */ j(y, {
223
+ children: /* @__PURE__ */ N(y, {
224
224
  ...g(h.kind),
225
225
  name: l(h),
226
226
  src: u(h.kind, h.handle),
227
227
  size: "xs"
228
228
  })
229
229
  }),
230
- /* @__PURE__ */ j("span", {
230
+ /* @__PURE__ */ N("span", {
231
231
  className: "min-w-0 flex-1 truncate",
232
232
  children: s("from", { name: l(h) })
233
233
  }),
234
- /* @__PURE__ */ j("time", {
234
+ /* @__PURE__ */ N("time", {
235
235
  dateTime: t.createdAt,
236
236
  title: c.full(t.createdAt),
237
237
  className: "shrink-0 tabular-nums",
@@ -243,11 +243,11 @@ function H({ workspace: e, issue: t, onEligible: r, picked: i, current: a, onCli
243
243
  });
244
244
  }
245
245
  function U({ workspace: r, issue: o, onBack: l, onDecided: p }) {
246
- let v = k("triage"), x = d(), C = O(), w = L(), T = u(), { data: E } = R(a(r)), { data: D } = I(i(r, o.identifier)), N = D ?? o, { actorName: P, avatarOf: z } = f(r), B = E.find((e) => e.id === N.teamId), V = m(r, N.teamId), H = F({
246
+ let v = j("triage"), x = d(), C = A(), w = L(), T = u(), { data: E } = R(a(r)), { data: D } = I(i(r, o.identifier)), O = D ?? o, { actorName: k, avatarOf: z } = f(r), B = E.find((e) => e.id === O.teamId), V = m(r, O.teamId), H = F({
247
247
  mutationFn: async (n) => t(await e.POST("/api/v1/workspaces/{workspace}/issues/{identifier}/triage", {
248
248
  params: { path: {
249
249
  workspace: r,
250
- identifier: N.identifier
250
+ identifier: O.identifier
251
251
  } },
252
252
  body: { decision: n }
253
253
  })),
@@ -258,68 +258,68 @@ function U({ workspace: r, issue: o, onBack: l, onDecided: p }) {
258
258
  "issues"
259
259
  ] });
260
260
  }
261
- }), U = N.creator;
262
- return /* @__PURE__ */ M("article", {
261
+ }), U = O.creator;
262
+ return /* @__PURE__ */ P("article", {
263
263
  className: "mx-auto w-full max-w-3xl px-4 py-5 md:px-8",
264
264
  children: [
265
- /* @__PURE__ */ j("button", {
265
+ /* @__PURE__ */ N("button", {
266
266
  type: "button",
267
267
  onClick: l,
268
268
  className: "mb-3 text-xs text-muted-foreground hover:text-foreground md:hidden",
269
269
  children: v("back")
270
270
  }),
271
- /* @__PURE__ */ M("p", {
271
+ /* @__PURE__ */ P("p", {
272
272
  className: "flex items-center gap-1.5 text-xs text-muted-foreground",
273
273
  children: [
274
- B && /* @__PURE__ */ j(h, {
274
+ B && /* @__PURE__ */ N(h, {
275
275
  icon: B.icon,
276
276
  name: B.name,
277
277
  className: "size-3.5"
278
278
  }),
279
- /* @__PURE__ */ j("span", {
279
+ /* @__PURE__ */ N("span", {
280
280
  className: "tabular-nums",
281
- children: N.identifier
281
+ children: O.identifier
282
282
  }),
283
- /* @__PURE__ */ j("span", {
283
+ /* @__PURE__ */ N("span", {
284
284
  "aria-hidden": "true",
285
285
  children: "·"
286
286
  }),
287
- /* @__PURE__ */ j(y, {
287
+ /* @__PURE__ */ N(y, {
288
288
  ...g(U.kind),
289
- name: P(U),
289
+ name: k(U),
290
290
  src: z(U.kind, U.handle),
291
291
  size: "xs"
292
292
  }),
293
- /* @__PURE__ */ j("span", {
293
+ /* @__PURE__ */ N("span", {
294
294
  className: "truncate",
295
- children: v("from", { name: P(U) })
295
+ children: v("from", { name: k(U) })
296
296
  }),
297
- /* @__PURE__ */ j("span", {
297
+ /* @__PURE__ */ N("span", {
298
298
  "aria-hidden": "true",
299
299
  children: "·"
300
300
  }),
301
- /* @__PURE__ */ j("time", {
302
- dateTime: N.createdAt,
303
- title: x.full(N.createdAt),
304
- children: x.relative(N.createdAt)
301
+ /* @__PURE__ */ N("time", {
302
+ dateTime: O.createdAt,
303
+ title: x.full(O.createdAt),
304
+ children: x.relative(O.createdAt)
305
305
  })
306
306
  ]
307
307
  }),
308
- /* @__PURE__ */ j("h2", {
308
+ /* @__PURE__ */ N("h2", {
309
309
  className: "mt-1 text-xl font-semibold text-balance",
310
- children: /* @__PURE__ */ j(n, {
310
+ children: /* @__PURE__ */ N(n, {
311
311
  to: "/$workspace/issues/$identifier",
312
312
  params: {
313
313
  workspace: r,
314
- identifier: N.identifier
314
+ identifier: O.identifier
315
315
  },
316
316
  className: "hover:underline",
317
- children: N.title
317
+ children: O.title
318
318
  })
319
319
  }),
320
- /* @__PURE__ */ M("div", {
320
+ /* @__PURE__ */ P("div", {
321
321
  className: "mt-4 flex flex-wrap items-center gap-2",
322
- children: [V && /* @__PURE__ */ M(A, { children: [/* @__PURE__ */ j(b, {
322
+ children: [V && /* @__PURE__ */ P(M, { children: [/* @__PURE__ */ N(b, {
323
323
  variant: "primary",
324
324
  size: "sm",
325
325
  title: v("acceptHelp"),
@@ -327,7 +327,7 @@ function U({ workspace: r, issue: o, onBack: l, onDecided: p }) {
327
327
  disabled: H.isPending,
328
328
  onClick: () => H.mutate("accept"),
329
329
  children: v("accept")
330
- }), /* @__PURE__ */ j(b, {
330
+ }), /* @__PURE__ */ N(b, {
331
331
  variant: "outline",
332
332
  size: "sm",
333
333
  title: v("declineHelp"),
@@ -335,11 +335,11 @@ function U({ workspace: r, issue: o, onBack: l, onDecided: p }) {
335
335
  disabled: H.isPending,
336
336
  onClick: () => H.mutate("decline"),
337
337
  children: v("decline")
338
- })] }), /* @__PURE__ */ j(n, {
338
+ })] }), /* @__PURE__ */ N(n, {
339
339
  to: "/$workspace/issues/$identifier",
340
340
  params: {
341
341
  workspace: r,
342
- identifier: N.identifier
342
+ identifier: O.identifier
343
343
  },
344
344
  className: S({
345
345
  size: "sm",
@@ -348,41 +348,41 @@ function U({ workspace: r, issue: o, onBack: l, onDecided: p }) {
348
348
  children: v("openIssue")
349
349
  })]
350
350
  }),
351
- H.error && /* @__PURE__ */ j("p", {
351
+ H.error && /* @__PURE__ */ N("p", {
352
352
  className: "mt-2 text-xs text-danger",
353
353
  children: C(H.error)
354
354
  }),
355
- /* @__PURE__ */ j("p", {
355
+ /* @__PURE__ */ N("p", {
356
356
  className: "mt-3 text-xs text-muted-foreground",
357
357
  children: v("duplicateHint")
358
358
  }),
359
- /* @__PURE__ */ M("div", {
359
+ /* @__PURE__ */ P("div", {
360
360
  className: "mt-5 flex flex-wrap items-center gap-x-4 gap-y-1 border-y border-border py-2.5 text-xs text-muted-foreground",
361
361
  children: [
362
- /* @__PURE__ */ M("span", {
362
+ /* @__PURE__ */ P("span", {
363
363
  className: "inline-flex items-center gap-1.5",
364
- children: [/* @__PURE__ */ j(c, { category: N.status.category }), N.status.name]
364
+ children: [/* @__PURE__ */ N(c, { category: O.status.category }), O.status.name]
365
365
  }),
366
- /* @__PURE__ */ M("span", {
366
+ /* @__PURE__ */ P("span", {
367
367
  className: "inline-flex items-center gap-1.5",
368
- children: [/* @__PURE__ */ j(s, { priority: N.priority }), T[N.priority]]
368
+ children: [/* @__PURE__ */ N(s, { priority: O.priority }), T[O.priority]]
369
369
  }),
370
- N.labels.map((e) => /* @__PURE__ */ M("span", {
370
+ O.labels.map((e) => /* @__PURE__ */ P("span", {
371
371
  className: "inline-flex items-center gap-1.5",
372
- children: [/* @__PURE__ */ j("span", {
372
+ children: [/* @__PURE__ */ N("span", {
373
373
  className: "size-2 rounded-full",
374
374
  style: { background: e.color }
375
375
  }), e.name]
376
376
  }, e.id))
377
377
  ]
378
378
  }),
379
- N.body.trim() ? /* @__PURE__ */ j("div", {
379
+ O.body.trim() ? /* @__PURE__ */ N("div", {
380
380
  className: "mt-5 text-sm",
381
- children: /* @__PURE__ */ j(_, {
382
- value: N.body,
381
+ children: /* @__PURE__ */ N(_, {
382
+ value: O.body,
383
383
  editable: !1
384
384
  })
385
- }) : /* @__PURE__ */ j("p", {
385
+ }) : /* @__PURE__ */ N("p", {
386
386
  className: "mt-5 text-sm text-muted-foreground",
387
387
  children: v("noDescription")
388
388
  })
package/pages.js ADDED
@@ -0,0 +1,21 @@
1
+ import { routeTree as e } from "./routeTree.gen.js";
2
+ // src/pages.ts
3
+ var t = /* @__PURE__ */ new Set([
4
+ "/",
5
+ "/$workspace",
6
+ "/new",
7
+ "/no-access"
8
+ ]);
9
+ function n() {
10
+ let n = e.children, i = n.filter((e) => t.has(r(e)));
11
+ for (let e of i) r(e) === "/$workspace" && (e.options.staticData = {
12
+ ...e.options.staticData,
13
+ ownsCommandPalette: !0
14
+ });
15
+ return {
16
+ framed: i,
17
+ frameless: n.filter((e) => !t.has(r(e)))
18
+ };
19
+ }
20
+ var r = (e) => e.options.path ?? "";
21
+ export { n as splitPages };
package/routes/__root.js CHANGED
@@ -1,15 +1,15 @@
1
1
  import { ErrorPage as e } from "@parallelworks/ui";
2
- import { jsx as t } from "react/jsx-runtime";
3
- import { createRootRouteWithContext as n, lazyRouteComponent as r } from "@tanstack/react-router";
2
+ import { createRootRouteWithContext as t, lazyRouteComponent as n } from "@tanstack/react-router";
3
+ import { jsx as r } from "react/jsx-runtime";
4
4
  // src/routes/__root.tsx
5
- var i = n()({
6
- component: r(() => import("../components/AppRoot.js")),
5
+ var i = t()({
6
+ component: n(() => import("../components/AppRoot.js")),
7
7
  notFoundComponent: a
8
8
  });
9
9
  function a() {
10
- return /* @__PURE__ */ t("div", {
10
+ return /* @__PURE__ */ r("div", {
11
11
  className: "flex h-dvh",
12
- children: /* @__PURE__ */ t(e, { status: 404 })
12
+ children: /* @__PURE__ */ r(e, { status: 404 })
13
13
  });
14
14
  }
15
15
  export { i as Route };
@@ -2,11 +2,11 @@ import { Link as e, useNavigate as t } from "../../../lib/router.js";
2
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
3
  import { Route as u } from "./_doc.js";
4
4
  import { CommentIcon as d, StatusIcon as f } from "../../../components/icons.js";
5
- import { headingAnchor as ee } from "../../../lib/glossary.js";
5
+ import { termRef as ee } from "../../../lib/knowledgeKinds.js";
6
6
  import { copyItem as te } from "../../../lib/menus.js";
7
- import { termRef as ne } from "../../../lib/knowledge.js";
8
- import { useTime as re } from "../../../lib/time.js";
9
- import { docKey as ie, docPath as ae, docRef as p, docURL as oe, useDocActions as se, useDocMenu as m } from "../../../lib/docs.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 { headingAnchor as se } from "../../../lib/glossary.js";
9
+ import { useTime as m } from "../../../lib/time.js";
10
10
  import { usePeople as h } from "../../../lib/people.js";
11
11
  import { issueURL as ce, useIssueMenu as g } from "../../../lib/issueMenu.js";
12
12
  import { useNewIssue as le } from "../../../lib/newIssue.js";
@@ -38,7 +38,7 @@ 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, ie(o))), ne = f.key, { data: re } = z(c(i)), { data: h } = z(s), g = re.find((e) => e.id === f.teamId), { data: _ } = z(l(i)), [v, y] = N();
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
42
  me({
43
43
  doc: f.key,
44
44
  ...v && { field: v }
@@ -47,11 +47,11 @@ function B() {
47
47
  j(() => {
48
48
  ue(i, {
49
49
  kind: "doc",
50
- href: ae(i, f),
50
+ href: re(i, f),
51
51
  label: f.title
52
52
  });
53
53
  }, [i, f]);
54
- let x = t(), S = A(), C = m(i), w = se(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, ne), [Ge, K] = N(!1), [Ke, q] = N(!1), [J, Y] = N(!1), [X, Z] = N();
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();
55
55
  j(() => {
56
56
  (o !== p(f) || d) && x({
57
57
  to: "/$workspace/docs/$doc",
@@ -73,7 +73,7 @@ function B() {
73
73
  if (O.current = e, Ae(e), !e) return;
74
74
  let t = decodeURIComponent(location.hash.slice(1));
75
75
  if (t) {
76
- for (let n of e.view.dom.querySelectorAll("h1, h2, h3, h4, h5, h6")) if (ee(n.textContent ?? "") === t) {
76
+ for (let n of e.view.dom.querySelectorAll("h1, h2, h3, h4, h5, h6")) if (se(n.textContent ?? "") === t) {
77
77
  n.scrollIntoView({ block: "start" });
78
78
  break;
79
79
  }
@@ -132,7 +132,7 @@ function B() {
132
132
  body: e("fromDoc", {
133
133
  quote: n,
134
134
  title: f.title,
135
- url: oe(i, f)
135
+ url: ie(i, f)
136
136
  }),
137
137
  origin: { doc: f.key },
138
138
  onCreated: (e) => {
@@ -402,7 +402,7 @@ 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 = re(), { actorName: i, person: a, avatarOf: o } = h(e), s = i(t.editor);
405
+ let n = P("docs"), r = m(), { actorName: i, person: a, avatarOf: o } = h(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
408
  children: [/* @__PURE__ */ I(v, {
@@ -518,7 +518,7 @@ function Re({ workspace: t, docKey: n }) {
518
518
  to: "/$workspace/knowledge/$term",
519
519
  params: {
520
520
  workspace: t,
521
- term: ne(n)
521
+ term: ee(n)
522
522
  },
523
523
  className: "hover:underline",
524
524
  children: r("lostSection", {
@@ -550,7 +550,7 @@ function ze({ workspace: e, docKey: t }) {
550
550
  });
551
551
  }
552
552
  function Be({ workspace: t, docKey: r }) {
553
- let i = P("docs"), { data: a } = z(n(t, r)), o = A(), s = m(t), c = g(t), l = "flex h-8 items-center gap-2 rounded-md px-2 text-sm hover:bg-muted";
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";
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"),
@@ -1,22 +1,22 @@
1
1
  import { Route as e } from "./docs.js";
2
2
  import { docKey as t } from "../../lib/docs.js";
3
3
  import { DocsTree as n } from "../../components/DocsTree.js";
4
- import { jsx as r, jsxs as i } from "react/jsx-runtime";
5
- import { Outlet as a, useParams as o } from "@tanstack/react-router";
4
+ import { Outlet as r, useParams as i } from "@tanstack/react-router";
5
+ import { jsx as a, jsxs as o } from "react/jsx-runtime";
6
6
  // src/routes/$workspace/docs.tsx?tsr-split=component
7
7
  function s() {
8
- let { workspace: s } = e.useParams(), { doc: c } = o({ strict: !1 }), l = c ? t(c) : void 0;
9
- return /* @__PURE__ */ i("div", {
8
+ let { workspace: s } = e.useParams(), { doc: c } = i({ strict: !1 }), l = c ? t(c) : void 0;
9
+ return /* @__PURE__ */ o("div", {
10
10
  className: "flex h-full",
11
- children: [!l && /* @__PURE__ */ r("div", {
11
+ children: [!l && /* @__PURE__ */ a("div", {
12
12
  className: "mx-auto flex w-full max-w-2xl flex-col px-3 py-3 md:py-6",
13
- children: /* @__PURE__ */ r(n, {
13
+ children: /* @__PURE__ */ a(n, {
14
14
  workspace: s,
15
15
  page: !0
16
16
  }, s)
17
- }), /* @__PURE__ */ r("div", {
17
+ }), /* @__PURE__ */ a("div", {
18
18
  className: `min-w-0 flex-1 ${l ? "block" : "hidden"}`,
19
- children: /* @__PURE__ */ r(a, {})
19
+ children: /* @__PURE__ */ a(r, {})
20
20
  })]
21
21
  });
22
22
  }
@@ -1,6 +1,6 @@
1
- import { redirect as e } from "../../lib/router.js";
2
- import { kinds as t, statuses as n } from "./graph.js";
3
- import { rememberSearch as r } from "../../lib/listSearch.js";
1
+ import { rememberSearch as e } from "../../lib/listSearch.js";
2
+ import { redirect as t } from "../../lib/router.js";
3
+ import { kinds as n, statuses as r } from "./graph.js";
4
4
  import { createFileRoute as i, lazyFn as a, lazyRouteComponent as o } from "@tanstack/react-router";
5
5
  // src/routes/$workspace/graph.tsx
6
6
  var s = () => import("./graph3.js"), c = () => import("./graph4.js"), l = (e, t) => {
@@ -8,18 +8,18 @@ var s = () => import("./graph3.js"), c = () => import("./graph4.js"), l = (e, t)
8
8
  return n.length ? n : void 0;
9
9
  }, u = i("/$workspace/graph")({
10
10
  validateSearch: (e) => {
11
- let r = l(e.kind, t), i = l(e.status, n);
11
+ let t = l(e.kind, n), i = l(e.status, r);
12
12
  return {
13
13
  ...typeof e.space == "string" && { space: e.space },
14
- ...r && { kind: r },
14
+ ...t && { kind: t },
15
15
  ...i && { status: i }
16
16
  };
17
17
  },
18
- beforeLoad: ({ params: t, search: n, location: i, preload: a }) => {
19
- let o = r(i.pathname, n, a);
20
- if (o) throw e({
18
+ beforeLoad: ({ params: n, search: r, location: i, preload: a }) => {
19
+ let o = e(i.pathname, r, a);
20
+ if (o) throw t({
21
21
  to: "/$workspace/graph",
22
- params: t,
22
+ params: n,
23
23
  search: o,
24
24
  replace: !0
25
25
  });