@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/lib/knowledge.js CHANGED
@@ -3,36 +3,25 @@ import { api as e, unwrap as t } from "../api/client.js";
3
3
  import { useNavigate as n } from "./router.js";
4
4
  import { areasQuery as r, docQuery as i, docsQuery as a, knowledgeQuery as o, teamsQuery as s, workspaceQuery as c } from "../api/queries.js";
5
5
  import { AreaIcon as l, FileTextIcon as u } from "../components/icons.js";
6
- import { headings as ee } from "./glossary.js";
7
- import { copyItem as d, useLinkItems as f } from "./menus.js";
8
- import { Button as p, Combobox as m, ErrorText as te, Input as h, Modal as ne, Select as g, Textarea as re, menuDivider as _ } from "@parallelworks/ui";
9
- import { useCallback as v, useState as y } from "react";
6
+ import { entryPath as d, kinds as ee, termRef as f } from "./knowledgeKinds.js";
7
+ import { copyItem as p, useLinkItems as m } from "./menus.js";
8
+ import { headings as te } from "./glossary.js";
9
+ import { Button as h, Combobox as g, ErrorText as _, Input as v, Modal as ne, Select as y, Textarea as re, menuDivider as b } from "@parallelworks/ui";
10
+ import { useCallback as x, useState as S } from "react";
10
11
  import { useErrorMessage as ie } from "@parallelworks/problem/react";
11
- import { useTranslations as b } from "use-intl";
12
- import { Fragment as ae, jsx as x, jsxs as S } from "react/jsx-runtime";
13
- import { keepPreviousData as oe, useMutation as C, useQuery as w, useQueryClient as T, useSuspenseQuery as E } from "@tanstack/react-query";
12
+ import { useTranslations as C } from "use-intl";
13
+ import { Fragment as ae, jsx as w, jsxs as T } from "react/jsx-runtime";
14
+ import { keepPreviousData as oe, useMutation as E, useQuery as D, useQueryClient as O, useSuspenseQuery as k } from "@tanstack/react-query";
14
15
  // src/lib/knowledge.tsx
15
- var D = [
16
- "term",
17
- "decision",
18
- "system",
19
- "role"
20
- ];
21
- function O(e, t) {
22
- return `/${e}/knowledge/${encodeURIComponent(t)}`;
23
- }
24
- function k(e) {
25
- return e.slug || e.id;
26
- }
27
16
  function A(e) {
28
- let { data: t } = w(o(e));
29
- return v((e) => {
17
+ let { data: t } = D(o(e));
18
+ return x((e) => {
30
19
  let n = t?.find((t) => t.id === e);
31
- return n ? k(n) : e;
20
+ return n ? f(n) : e;
32
21
  }, [t]);
33
22
  }
34
23
  function j(n) {
35
- let r = T(), i = () => {
24
+ let r = O(), i = () => {
36
25
  r.invalidateQueries({ queryKey: [
37
26
  "workspace",
38
27
  n,
@@ -51,47 +40,47 @@ function j(n) {
51
40
  entry: e
52
41
  } });
53
42
  return {
54
- create: C({
43
+ create: E({
55
44
  mutationFn: async (r) => t(await e.POST("/api/v1/workspaces/{workspace}/knowledge", {
56
45
  params: { path: { workspace: n } },
57
46
  body: r
58
47
  })),
59
48
  onSettled: i
60
49
  }),
61
- update: C({
50
+ update: E({
62
51
  mutationFn: async ({ id: n, ...r }) => t(await e.PATCH("/api/v1/workspaces/{workspace}/knowledge/{entry}", {
63
52
  params: a(n),
64
53
  body: r
65
54
  })),
66
55
  onSettled: i
67
56
  }),
68
- supersede: C({
57
+ supersede: E({
69
58
  mutationFn: async ({ id: n, by: r }) => t(await e.POST("/api/v1/workspaces/{workspace}/knowledge/{entry}/supersede", {
70
59
  params: a(n),
71
60
  body: { by: r }
72
61
  })),
73
62
  onSettled: i
74
63
  }),
75
- archive: C({
64
+ archive: E({
76
65
  mutationFn: async (n) => t(await e.POST("/api/v1/workspaces/{workspace}/knowledge/{entry}/archive", { params: a(n) })),
77
66
  onSettled: i
78
67
  }),
79
- restore: C({
68
+ restore: E({
80
69
  mutationFn: async (n) => t(await e.POST("/api/v1/workspaces/{workspace}/knowledge/{entry}/restore", { params: a(n) })),
81
70
  onSettled: i
82
71
  })
83
72
  };
84
73
  }
85
74
  function M(e, t) {
86
- let r = b("knowledge"), i = b("common"), a = j(e), o = f(), s = n();
87
- return v((n) => {
88
- let c = [...o(O(e, k(n))), d(i("copyName"), n.name)], l = {
75
+ let r = C("knowledge"), i = C("common"), a = j(e), o = m(), s = n();
76
+ return x((n) => {
77
+ let c = [...o(d(e, f(n))), p(i("copyName"), n.name)], l = {
89
78
  label: i("open"),
90
79
  onClick: () => s({
91
80
  to: "/$workspace/knowledge/$term",
92
81
  params: {
93
82
  workspace: e,
94
- term: k(n)
83
+ term: f(n)
95
84
  }
96
85
  })
97
86
  };
@@ -101,7 +90,7 @@ function M(e, t) {
101
90
  label: r("restore"),
102
91
  onClick: () => a.restore.mutate(n.id)
103
92
  },
104
- _,
93
+ b,
105
94
  ...c
106
95
  ] : [
107
96
  l,
@@ -143,9 +132,9 @@ function M(e, t) {
143
132
  }
144
133
  })
145
134
  }],
146
- _,
135
+ b,
147
136
  ...c,
148
- _,
137
+ b,
149
138
  {
150
139
  label: r("archive"),
151
140
  destructive: !0,
@@ -163,53 +152,53 @@ function M(e, t) {
163
152
  ]);
164
153
  }
165
154
  function N({ workspace: e, mode: t, onClose: n, onSaved: o }) {
166
- let d = b("planning"), f = b("knowledge"), _ = b("common"), v = ie(), { data: C } = E(s(e)), { data: T } = E(c(e)), O = j(e), k = t.kind === "edit" ? t.entry : void 0, A = t.kind === "create" ? t.defaults ?? {} : {}, M = t.kind === "create" ? t.supersedes : void 0, [N, se] = y(k?.name ?? A.name ?? ""), [P, ce] = y((k?.aliases ?? A.aliases ?? []).join(", ")), [F, le] = y(k?.kind ?? A.kind ?? "term"), [I, ue] = y(A.status ?? "proposed"), [L, de] = y(k?.definition ?? A.definition ?? ""), [R, fe] = y(A.team ?? C.find((e) => e.id === M?.teamId)?.key ?? ""), [z, B] = y(k?.areaId ?? ""), { data: V = [] } = w(r(e)), pe = k ? k.teamId : C.find((e) => e.key === R)?.id, H = V.find((e) => e.id === z)?.key ?? "", [U, me] = y(k?.source.doc?.key ?? A.source?.doc ?? ""), [W, G] = y(k?.source.section ?? A.source?.section ?? ""), [K, he] = y(k?.source.identifier ?? A.source?.issue ?? ""), [q, ge] = y(!1), [J, _e] = y(""), { data: Y = [] } = w({
167
- ...a(e, J ? { title: J } : {
155
+ let d = C("planning"), f = C("knowledge"), p = C("common"), m = ie(), { data: b } = k(s(e)), { data: x } = k(c(e)), E = j(e), O = t.kind === "edit" ? t.entry : void 0, A = t.kind === "create" ? t.defaults ?? {} : {}, M = t.kind === "create" ? t.supersedes : void 0, [N, se] = S(O?.name ?? A.name ?? ""), [P, ce] = S((O?.aliases ?? A.aliases ?? []).join(", ")), [F, le] = S(O?.kind ?? A.kind ?? "term"), [I, ue] = S(A.status ?? "proposed"), [L, de] = S(O?.definition ?? A.definition ?? ""), [R, fe] = S(A.team ?? b.find((e) => e.id === M?.teamId)?.key ?? ""), [z, B] = S(O?.areaId ?? ""), { data: V = [] } = D(r(e)), H = O ? O.teamId : b.find((e) => e.key === R)?.id, U = V.find((e) => e.id === z)?.key ?? "", [W, pe] = S(O?.source.doc?.key ?? A.source?.doc ?? ""), [G, K] = S(O?.source.section ?? A.source?.section ?? ""), [q, me] = S(O?.source.identifier ?? A.source?.issue ?? ""), [J, he] = S(!1), [Y, ge] = S(""), { data: _e = [] } = D({
156
+ ...a(e, Y ? { title: Y } : {
168
157
  top: !0,
169
158
  limit: 20
170
159
  }),
171
- enabled: q,
160
+ enabled: J,
172
161
  placeholderData: oe
173
- }), [ve, X] = y(null), { data: Z } = w({
174
- ...i(e, U),
175
- enabled: !!U
176
- }), ye = Z ?? (k?.source.doc?.key === U ? k.source.doc : void 0), Q = ee(Z?.body ?? ""), $ = O.create.isPending || O.update.isPending || O.supersede.isPending, be = async () => {
162
+ }), [ve, X] = S(null), { data: Z } = D({
163
+ ...i(e, W),
164
+ enabled: !!W
165
+ }), ye = Z ?? (O?.source.doc?.key === W ? O.source.doc : void 0), Q = te(Z?.body ?? ""), $ = E.create.isPending || E.update.isPending || E.supersede.isPending, be = async () => {
177
166
  X(null);
178
167
  let e = {
179
- ...U && { doc: U },
180
- ...U && W && { section: W },
181
- ...K.trim() && { issue: K.trim() },
168
+ ...W && { doc: W },
169
+ ...W && G && { section: G },
170
+ ...q.trim() && { issue: q.trim() },
182
171
  ...A.source?.decision && { decision: A.source.decision }
183
172
  }, t = P.split(",").map((e) => e.trim()).filter(Boolean);
184
173
  try {
185
174
  let r;
186
- k ? r = await O.update.mutateAsync({
187
- id: k.id,
175
+ O ? r = await E.update.mutateAsync({
176
+ id: O.id,
188
177
  name: N,
189
178
  aliases: t,
190
179
  kind: F,
191
180
  definition: L,
192
- ...(!z || H) && { area: H },
181
+ ...(!z || U) && { area: U },
193
182
  source: e,
194
- ifVersion: k.version
195
- }) : (r = await O.create.mutateAsync({
183
+ ifVersion: O.version
184
+ }) : (r = await E.create.mutateAsync({
196
185
  name: N,
197
186
  aliases: t,
198
187
  kind: F,
199
188
  status: I,
200
189
  definition: L,
201
190
  ...R && { team: R },
202
- ...H && { area: H },
191
+ ...U && { area: U },
203
192
  source: e
204
- }), M && await O.supersede.mutateAsync({
193
+ }), M && await E.supersede.mutateAsync({
205
194
  id: M.id,
206
195
  by: r.id
207
196
  })), o?.(r), n();
208
197
  } catch (e) {
209
- X(v(e));
198
+ X(m(e));
210
199
  }
211
- }, xe = k ? f("editTitle", { name: k.name }) : M ? f("supersedeTitle", { name: M.name }) : f("newTitle");
212
- return /* @__PURE__ */ x(ne, {
200
+ }, xe = O ? f("editTitle", { name: O.name }) : M ? f("supersedeTitle", { name: M.name }) : f("newTitle");
201
+ return /* @__PURE__ */ w(ne, {
213
202
  open: !0,
214
203
  onClose: n,
215
204
  dismissible: !$,
@@ -217,24 +206,24 @@ function N({ workspace: e, mode: t, onClose: n, onSaved: o }) {
217
206
  title: xe,
218
207
  description: M ? f("supersedeHint") : void 0,
219
208
  onSubmit: () => be(),
220
- footer: /* @__PURE__ */ S(ae, { children: [/* @__PURE__ */ x(p, {
209
+ footer: /* @__PURE__ */ T(ae, { children: [/* @__PURE__ */ w(h, {
221
210
  type: "button",
222
211
  variant: "ghost",
223
212
  onClick: n,
224
- children: _("cancel")
225
- }), /* @__PURE__ */ x(p, {
213
+ children: p("cancel")
214
+ }), /* @__PURE__ */ w(h, {
226
215
  type: "submit",
227
216
  variant: "primary",
228
217
  disabled: !N.trim() || !L.trim(),
229
218
  loading: $,
230
- children: M ? f("saveAndSupersede") : _("save")
219
+ children: M ? f("saveAndSupersede") : p("save")
231
220
  })] }),
232
- children: /* @__PURE__ */ S("div", {
221
+ children: /* @__PURE__ */ T("div", {
233
222
  className: "space-y-3",
234
223
  children: [
235
- /* @__PURE__ */ S("label", {
224
+ /* @__PURE__ */ T("label", {
236
225
  className: "block text-xs font-medium text-muted-foreground",
237
- children: [f("name"), /* @__PURE__ */ x(h, {
226
+ children: [f("name"), /* @__PURE__ */ w(v, {
238
227
  value: N,
239
228
  onChange: (e) => se(e.target.value),
240
229
  maxLength: 100,
@@ -242,29 +231,29 @@ function N({ workspace: e, mode: t, onClose: n, onSaved: o }) {
242
231
  className: "mt-1"
243
232
  })]
244
233
  }),
245
- /* @__PURE__ */ S("label", {
234
+ /* @__PURE__ */ T("label", {
246
235
  className: "block text-xs font-medium text-muted-foreground",
247
- children: [f("aliases"), /* @__PURE__ */ x(h, {
236
+ children: [f("aliases"), /* @__PURE__ */ w(v, {
248
237
  value: P,
249
238
  onChange: (e) => ce(e.target.value),
250
239
  placeholder: f("aliasesPlaceholder"),
251
240
  className: "mt-1"
252
241
  })]
253
242
  }),
254
- /* @__PURE__ */ S("div", {
243
+ /* @__PURE__ */ T("div", {
255
244
  className: "flex flex-wrap gap-2",
256
245
  children: [
257
- /* @__PURE__ */ x(g, {
246
+ /* @__PURE__ */ w(y, {
258
247
  "aria-label": f("kindLabel"),
259
248
  width: "content",
260
249
  value: F,
261
250
  onValueChange: le,
262
- items: D.map((e) => ({
251
+ items: ee.map((e) => ({
263
252
  value: e,
264
253
  label: f(`kind.${e}`)
265
254
  }))
266
255
  }),
267
- !k && F !== "term" && /* @__PURE__ */ x(g, {
256
+ !O && F !== "term" && /* @__PURE__ */ w(y, {
268
257
  "aria-label": f("statusLabel"),
269
258
  width: "content",
270
259
  value: I,
@@ -277,7 +266,7 @@ function N({ workspace: e, mode: t, onClose: n, onSaved: o }) {
277
266
  label: f("status.decided")
278
267
  }]
279
268
  }),
280
- !k && /* @__PURE__ */ x(g, {
269
+ !O && /* @__PURE__ */ w(y, {
281
270
  "aria-label": f("spaceLabel"),
282
271
  width: "content",
283
272
  value: R,
@@ -286,27 +275,27 @@ function N({ workspace: e, mode: t, onClose: n, onSaved: o }) {
286
275
  },
287
276
  items: [{
288
277
  value: "",
289
- label: T.name
290
- }, ...C.filter((e) => !e.archivedAt).map((e) => ({
278
+ label: x.name
279
+ }, ...b.filter((e) => !e.archivedAt).map((e) => ({
291
280
  value: e.key,
292
281
  label: e.name
293
282
  }))]
294
283
  }),
295
- /* @__PURE__ */ x(m, {
284
+ /* @__PURE__ */ w(g, {
296
285
  items: [{
297
286
  value: "",
298
287
  label: d("noArea")
299
- }, ...V.filter((e) => !e.teamId || e.teamId === pe).map((e) => ({
288
+ }, ...V.filter((e) => !e.teamId || e.teamId === H).map((e) => ({
300
289
  value: e.id,
301
290
  label: e.title
302
291
  }))],
303
292
  value: z,
304
293
  onValueChange: (e) => e !== null && B(e),
305
294
  placeholder: d("area"),
306
- trigger: /* @__PURE__ */ S(p, {
295
+ trigger: /* @__PURE__ */ T(h, {
307
296
  type: "button",
308
297
  "aria-label": d("area"),
309
- children: [/* @__PURE__ */ x(l, { className: "size-3.5 shrink-0 text-muted-foreground" }), V.find((e) => e.id === z)?.title ?? /* @__PURE__ */ x("span", {
298
+ children: [/* @__PURE__ */ w(l, { className: "size-3.5 shrink-0 text-muted-foreground" }), V.find((e) => e.id === z)?.title ?? /* @__PURE__ */ w("span", {
310
299
  className: "text-muted-foreground",
311
300
  children: d("noArea")
312
301
  })]
@@ -314,9 +303,9 @@ function N({ workspace: e, mode: t, onClose: n, onSaved: o }) {
314
303
  })
315
304
  ]
316
305
  }),
317
- /* @__PURE__ */ S("label", {
306
+ /* @__PURE__ */ T("label", {
318
307
  className: "block text-xs font-medium text-muted-foreground",
319
- children: [f("definition"), /* @__PURE__ */ x(re, {
308
+ children: [f("definition"), /* @__PURE__ */ w(re, {
320
309
  value: L,
321
310
  onChange: (e) => de(e.target.value),
322
311
  maxLength: 1e3,
@@ -326,45 +315,45 @@ function N({ workspace: e, mode: t, onClose: n, onSaved: o }) {
326
315
  className: "mt-1"
327
316
  })]
328
317
  }),
329
- /* @__PURE__ */ S("fieldset", {
318
+ /* @__PURE__ */ T("fieldset", {
330
319
  className: "space-y-2",
331
320
  children: [
332
- /* @__PURE__ */ x("legend", {
321
+ /* @__PURE__ */ w("legend", {
333
322
  className: "text-xs font-medium text-muted-foreground",
334
323
  children: f("source")
335
324
  }),
336
- /* @__PURE__ */ S("div", {
325
+ /* @__PURE__ */ T("div", {
337
326
  className: "flex flex-wrap items-center gap-2",
338
- children: [/* @__PURE__ */ x(m, {
339
- open: q,
340
- onOpenChange: ge,
327
+ children: [/* @__PURE__ */ w(g, {
328
+ open: J,
329
+ onOpenChange: he,
341
330
  items: [{
342
331
  value: "",
343
332
  label: f("noDoc")
344
- }, ...Y.map((e) => ({
333
+ }, ..._e.map((e) => ({
345
334
  value: e.key,
346
335
  label: e.title,
347
- icon: /* @__PURE__ */ x(u, { className: "size-3.5" })
336
+ icon: /* @__PURE__ */ w(u, { className: "size-3.5" })
348
337
  }))],
349
- value: U,
338
+ value: W,
350
339
  onValueChange: (e) => {
351
- e !== null && (me(e), G(""));
340
+ e !== null && (pe(e), K(""));
352
341
  },
353
- onQueryChange: _e,
342
+ onQueryChange: ge,
354
343
  placeholder: f("chooseDoc"),
355
- trigger: /* @__PURE__ */ S(p, {
344
+ trigger: /* @__PURE__ */ T(h, {
356
345
  type: "button",
357
346
  className: "max-w-56",
358
- children: [/* @__PURE__ */ x(u, { className: "size-3.5 text-muted-foreground" }), /* @__PURE__ */ x("span", {
347
+ children: [/* @__PURE__ */ w(u, { className: "size-3.5 text-muted-foreground" }), /* @__PURE__ */ w("span", {
359
348
  className: "truncate",
360
349
  children: ye?.title ?? f("chooseDoc")
361
350
  })]
362
351
  })
363
- }), U && /* @__PURE__ */ x(g, {
352
+ }), W && /* @__PURE__ */ w(y, {
364
353
  "aria-label": f("section"),
365
354
  width: "content",
366
- value: W,
367
- onValueChange: G,
355
+ value: G,
356
+ onValueChange: K,
368
357
  items: [
369
358
  {
370
359
  value: "",
@@ -374,25 +363,25 @@ function N({ workspace: e, mode: t, onClose: n, onSaved: o }) {
374
363
  value: e.text,
375
364
  label: e.text
376
365
  })),
377
- ...W && !Q.some((e) => e.text === W) ? [{
378
- value: W,
379
- label: W
366
+ ...G && !Q.some((e) => e.text === G) ? [{
367
+ value: G,
368
+ label: G
380
369
  }] : []
381
370
  ]
382
371
  })]
383
372
  }),
384
- /* @__PURE__ */ x(h, {
385
- value: K,
386
- onChange: (e) => he(e.target.value),
373
+ /* @__PURE__ */ w(v, {
374
+ value: q,
375
+ onChange: (e) => me(e.target.value),
387
376
  placeholder: f("issuePlaceholder"),
388
377
  "aria-label": f("issue"),
389
378
  className: "max-w-40"
390
379
  })
391
380
  ]
392
381
  }),
393
- /* @__PURE__ */ x(te, { children: ve })
382
+ /* @__PURE__ */ w(_, { children: ve })
394
383
  ]
395
384
  })
396
385
  });
397
386
  }
398
- export { N as EntryDialog, O as entryPath, D as kinds, k as termRef, j as useKnowledgeActions, M as useKnowledgeMenu, A as useTermRefs };
387
+ export { N as EntryDialog, j as useKnowledgeActions, M as useKnowledgeMenu, A as useTermRefs };
@@ -0,0 +1,14 @@
1
+ // src/lib/knowledgeKinds.ts
2
+ var e = [
3
+ "term",
4
+ "decision",
5
+ "system",
6
+ "role"
7
+ ];
8
+ function t(e, t) {
9
+ return `/${e}/knowledge/${encodeURIComponent(t)}`;
10
+ }
11
+ function n(e) {
12
+ return e.slug || e.id;
13
+ }
14
+ export { t as entryPath, e as kinds, n as termRef };
@@ -1,4 +1,4 @@
1
- import { healthStates as e, projectStatuses as t } from "../components/Planning.js";
1
+ import { healthStates as e, projectStatuses as t } from "./projectStates.js";
2
2
  // src/lib/projectList.ts
3
3
  var n = (e) => e ? "tandem-team-projects-layout" : "tandem-projects-layout";
4
4
  function r(e) {
@@ -0,0 +1,15 @@
1
+ // src/lib/projectStates.ts
2
+ var e = [
3
+ "planned",
4
+ "in_progress",
5
+ "paused",
6
+ "completed",
7
+ "canceled"
8
+ ], t = [
9
+ "on_track",
10
+ "at_risk",
11
+ "off_track",
12
+ "missing",
13
+ "none"
14
+ ];
15
+ export { t as healthStates, e as projectStatuses };
package/lib/router.js CHANGED
@@ -1,51 +1,37 @@
1
- import { appPath as e, basePath as t, routerPath as n, servedByTandem as r } from "./base.js";
2
- import { useCallback as i } from "react";
3
- import { jsx as a } from "react/jsx-runtime";
4
- import * as o from "@tanstack/react-router";
1
+ import { appPath as e, routerPath as t } from "./base.js";
2
+ import * as n from "@tanstack/react-router";
3
+ import { useCallback as r } from "react";
4
+ import { jsx as i } from "react/jsx-runtime";
5
5
  // src/lib/router.tsx
6
- function s(e) {
7
- return typeof e == "string" && e.startsWith("/") ? n(e) : e;
6
+ function a(e) {
7
+ return typeof e == "string" && e.startsWith("/") ? t(e) : e;
8
8
  }
9
- var c = ((e) => /* @__PURE__ */ a(o.Link, {
9
+ var o = ((e) => /* @__PURE__ */ i(n.Link, {
10
10
  preload: "intent",
11
11
  ...e,
12
- ...e.to !== void 0 && { to: s(e.to) },
13
- ...typeof e.to == "string" && r(e.to) && { reloadDocument: !0 }
12
+ ...e.to !== void 0 && { to: a(e.to) }
14
13
  }));
15
- function l(e) {
16
- let { to: i, href: a } = e;
17
- if (typeof i == "string" && r(i)) {
18
- let n = new URLSearchParams(Object.entries(e.search ?? {}).flatMap(([e, t]) => t === void 0 ? [] : [[e, String(t)]])).toString();
19
- return {
20
- ...e,
21
- to: void 0,
22
- href: t + i + (n ? `?${n}` : ""),
23
- reloadDocument: !0
24
- };
25
- }
26
- return typeof a == "string" && a.startsWith("/") ? r(a) ? {
27
- ...e,
28
- href: t + a,
29
- reloadDocument: !0
30
- } : {
14
+ function s(e) {
15
+ let { to: n, href: r } = e;
16
+ return typeof r == "string" && r.startsWith("/") ? {
31
17
  ...e,
32
- href: n(a)
18
+ href: t(r)
33
19
  } : {
34
20
  ...e,
35
- to: s(i)
21
+ to: a(n)
36
22
  };
37
23
  }
38
- var u = (e) => {
39
- let t = o.useNavigate(e);
40
- return i((e) => t(l(e)), [t]);
41
- }, d = (e) => o.redirect(l(e)), f = (t) => o.useLocation({ select: (n) => {
24
+ var c = (e) => {
25
+ let t = n.useNavigate(e);
26
+ return r((e) => t(s(e)), [t]);
27
+ }, l = (e) => n.redirect(s(e)), u = (t) => n.useLocation({ select: (n) => {
42
28
  let r = {
43
29
  ...n,
44
30
  pathname: e(n.pathname)
45
31
  };
46
32
  return t?.select ? t.select(r) : r;
47
33
  } });
48
- function p() {
49
- return o.useRouterState({ select: (t) => e(t.location.pathname) });
34
+ function d() {
35
+ return n.useRouterState({ select: (t) => e(t.location.pathname) });
50
36
  }
51
- export { c as Link, d as redirect, f as useLocation, u as useNavigate, p as usePathname };
37
+ export { o as Link, l as redirect, u as useLocation, c as useNavigate, d as usePathname };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parallelworks/tandem-web",
3
- "version": "0.138.2",
3
+ "version": "0.139.0",
4
4
  "description": "Tandem's pages, for a host app to render in its own",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
@@ -48,7 +48,7 @@
48
48
  "yjs": "^13.6.33"
49
49
  },
50
50
  "peerDependencies": {
51
- "@parallelworks/ui": ">=0.102.0 <1",
51
+ "@parallelworks/ui": ">=0.105.0 <1",
52
52
  "@tanstack/react-router": "^1.170.0",
53
53
  "react": "^19.3.0",
54
54
  "react-dom": "^19.3.0",