@parallelworks/tandem-web 0.138.2 → 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.
Files changed (81) hide show
  1. package/components/AgentWork.js +35 -35
  2. package/components/AppRoot.js +8 -7
  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 +31 -31
  24. package/hostedApp.js +41 -39
  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/pageTitle.js +22 -10
  33. package/lib/projectList.js +1 -1
  34. package/lib/projectStates.js +15 -0
  35. package/lib/router.js +20 -34
  36. package/package.json +2 -2
  37. package/pages/areas.js +223 -223
  38. package/pages/decisions.js +69 -69
  39. package/pages/issues.js +38 -38
  40. package/pages/projects.js +268 -267
  41. package/pages/triage.js +133 -133
  42. package/pages.js +21 -0
  43. package/routes/__root.js +6 -6
  44. package/routes/_workspace/agents/_slug2.js +21 -21
  45. package/routes/_workspace/agents/index2.js +16 -16
  46. package/routes/_workspace/areas/_area2.js +105 -105
  47. package/routes/_workspace/docs/_doc2.js +189 -189
  48. package/routes/_workspace/docs2.js +8 -8
  49. package/routes/_workspace/graph2.js +9 -9
  50. package/routes/_workspace/graph3.js +8 -8
  51. package/routes/_workspace/issues/_identifier2.js +249 -249
  52. package/routes/_workspace/issues/index.js +6 -6
  53. package/routes/_workspace/knowledge/_term2.js +119 -118
  54. package/routes/_workspace/knowledge/index.js +8 -8
  55. package/routes/_workspace/knowledge/index2.js +41 -40
  56. package/routes/_workspace/measures2.js +4 -4
  57. package/routes/_workspace/measures3.js +18 -18
  58. package/routes/_workspace/notifications2.js +112 -112
  59. package/routes/_workspace/people/_username.js +4 -4
  60. package/routes/_workspace/people/_username2.js +36 -36
  61. package/routes/_workspace/projects/_projectId3.js +369 -368
  62. package/routes/_workspace/projects/index.js +7 -7
  63. package/routes/_workspace/settings/account2.js +3 -3
  64. package/routes/_workspace/settings/audit-log2.js +4 -4
  65. package/routes/_workspace/settings/audit-log3.js +51 -51
  66. package/routes/_workspace/settings/labels2.js +14 -14
  67. package/routes/_workspace/settings/members2.js +9 -9
  68. package/routes/_workspace/settings/runners2.js +11 -11
  69. package/routes/_workspace/settings/teams2.js +15 -15
  70. package/routes/_workspace/settings/tokens2.js +5 -5
  71. package/routes/_workspace/settings/webhooks2.js +7 -7
  72. package/routes/_workspace/settings2.js +3 -3
  73. package/routes/_workspace/teams/_key/cycles/_number2.js +16 -16
  74. package/routes/_workspace/teams/_key/cycles/index2.js +40 -40
  75. package/routes/_workspace/teams/_key/issues.js +4 -4
  76. package/routes/_workspace/teams/_key/projects.js +4 -4
  77. package/routes/_workspace/teams/_key/settings2.js +133 -133
  78. package/routes/_workspace2.js +319 -319
  79. package/routes/docs/route2.js +19 -19
  80. package/routes/new2.js +8 -8
  81. package/routes/request2._token.js +4 -4
@@ -1,10 +1,11 @@
1
- import { Link as e, useNavigate as t } from "../../../lib/router.js";
2
- import { areasQuery as n, knowledgeQuery as r } from "../../../api/queries.js";
3
- import { AddIcon as i, LibraryIcon as a } from "../../../components/icons.js";
4
- import { EntryDialog as o, kinds as s, termRef as c, useKnowledgeMenu as l } from "../../../lib/knowledge.js";
5
- import { Route as u } from "./index.js";
6
- import { useTime as d } from "../../../lib/time.js";
7
- import { usePageTitle as f } from "../../../lib/pageTitle.js";
1
+ import { usePageTitle as e } from "../../../lib/pageTitle.js";
2
+ import { Link as t, useNavigate as n } from "../../../lib/router.js";
3
+ import { areasQuery as r, knowledgeQuery as i } from "../../../api/queries.js";
4
+ import { AddIcon as a, LibraryIcon as o } from "../../../components/icons.js";
5
+ import { kinds as s, termRef as c } from "../../../lib/knowledgeKinds.js";
6
+ import { Route as l } from "./index.js";
7
+ import { useTime as u } from "../../../lib/time.js";
8
+ import { EntryDialog as d, useKnowledgeMenu as f } from "../../../lib/knowledge.js";
8
9
  import { KnowledgeStatus as p } from "../../../components/HoverCards.js";
9
10
  import { FavoriteStar as m } from "../../../components/FavoriteStar.js";
10
11
  import { Button as h, EmptyState as g, SearchInput as _, SegmentedControl as v, buttonClasses as y, useOpenMenu as b } from "@parallelworks/ui";
@@ -15,20 +16,20 @@ import { useQuery as j, useSuspenseQuery as M } from "@tanstack/react-query";
15
16
  // src/routes/$workspace/knowledge/index.tsx?tsr-split=component
16
17
  var N = 5, P = 8;
17
18
  function F() {
18
- let { workspace: l } = u.useParams(), { archived: d, kind: p = "all" } = u.useSearch(), b = D("knowledge"), F = E();
19
- f(b("title"));
20
- let L = t(), [R, z] = T(""), [B, V] = T(""), [H, U] = T(null);
19
+ let { workspace: u } = l.useParams(), { archived: f, kind: p = "all" } = l.useSearch(), b = D("knowledge"), F = E();
20
+ e(b("title"));
21
+ let L = n(), [R, z] = T(""), [B, V] = T(""), [H, U] = T(null);
21
22
  C(() => {
22
23
  let e = setTimeout(() => V(R.trim()), 200);
23
24
  return () => clearTimeout(e);
24
25
  }, [R]);
25
- let { data: W } = M(r(l)), { data: G = [] } = j(n(l)), K = {
26
+ let { data: W } = M(i(u)), { data: G = [] } = j(r(u)), K = {
26
27
  ...B && { q: B },
27
- ...d && { archived: !0 }
28
+ ...f && { archived: !0 }
28
29
  }, { data: q } = j({
29
- ...r(l, K),
30
- enabled: !!B || !!d
31
- }), J = !!B || !!d, Y = J ? q ?? [] : W, X = p === "all" ? Y : Y.filter((e) => e.kind === p), Z = S((e) => U(e), []), Q = w(() => {
30
+ ...i(u, K),
31
+ enabled: !!B || !!f
32
+ }), J = !!B || !!f, Y = J ? q ?? [] : W, X = p === "all" ? Y : Y.filter((e) => e.kind === p), Z = S((e) => U(e), []), Q = w(() => {
32
33
  let e = /* @__PURE__ */ new Map();
33
34
  for (let t of Y) e.set(t.kind, (e.get(t.kind) ?? 0) + 1);
34
35
  return e;
@@ -50,9 +51,9 @@ function F() {
50
51
  b
51
52
  ]), ne = (e) => L({
52
53
  to: "/$workspace/knowledge",
53
- params: { workspace: l },
54
+ params: { workspace: u },
54
55
  search: {
55
- ...d && { archived: d },
56
+ ...f && { archived: f },
56
57
  ...e !== "all" && { kind: e }
57
58
  },
58
59
  replace: !0
@@ -68,7 +69,7 @@ function F() {
68
69
  children: b("title")
69
70
  }),
70
71
  /* @__PURE__ */ k(m, {
71
- workspace: l,
72
+ workspace: u,
72
73
  kind: "page",
73
74
  target: "knowledge"
74
75
  }),
@@ -76,9 +77,9 @@ function F() {
76
77
  className: "whitespace-nowrap text-xs text-muted-foreground tabular-nums",
77
78
  children: b("count", { count: W.length })
78
79
  }),
79
- /* @__PURE__ */ k(e, {
80
+ /* @__PURE__ */ k(t, {
80
81
  to: "/$workspace/graph",
81
- params: { workspace: l },
82
+ params: { workspace: u },
82
83
  className: `${y({ size: "sm" })} ml-auto`,
83
84
  children: b("graph")
84
85
  }),
@@ -87,7 +88,7 @@ function F() {
87
88
  variant: "primary",
88
89
  size: "sm",
89
90
  onClick: () => Z({ kind: "create" }),
90
- children: [/* @__PURE__ */ k(i, { className: "size-3.5" }), /* @__PURE__ */ k("span", {
91
+ children: [/* @__PURE__ */ k(a, { className: "size-3.5" }), /* @__PURE__ */ k("span", {
91
92
  className: "max-md:sr-only",
92
93
  children: b("new")
93
94
  })]
@@ -122,23 +123,23 @@ function F() {
122
123
  label: b(`kinds.${e}`),
123
124
  count: Q.get(e) ?? 0
124
125
  }))]
125
- }), /* @__PURE__ */ k(e, {
126
+ }), /* @__PURE__ */ k(t, {
126
127
  to: "/$workspace/knowledge",
127
- params: { workspace: l },
128
+ params: { workspace: u },
128
129
  search: {
129
- ...!d && { archived: !0 },
130
+ ...!f && { archived: !0 },
130
131
  ...p !== "all" && { kind: p }
131
132
  },
132
- "aria-current": d || void 0,
133
+ "aria-current": f || void 0,
133
134
  className: `${y({
134
135
  size: "sm",
135
- variant: d ? "secondary" : "ghost"
136
+ variant: f ? "secondary" : "ghost"
136
137
  })} ml-auto`,
137
138
  children: b("archived")
138
139
  })]
139
140
  }),
140
141
  X.length === 0 ? /* @__PURE__ */ k(g, {
141
- icon: /* @__PURE__ */ k(a, {}),
142
+ icon: /* @__PURE__ */ k(o, {}),
142
143
  title: b(J || p !== "all" ? "noMatches" : "emptyTitle"),
143
144
  description: J || p !== "all" ? void 0 : b("empty"),
144
145
  action: !J && p === "all" ? /* @__PURE__ */ k(h, {
@@ -149,18 +150,18 @@ function F() {
149
150
  }) : void 0,
150
151
  className: "mt-16"
151
152
  }) : J ? /* @__PURE__ */ k(I, {
152
- workspace: l,
153
+ workspace: u,
153
154
  title: b("results"),
154
155
  entries: X,
155
156
  onOpen: Z
156
157
  }) : /* @__PURE__ */ A(O, { children: [X.length >= P && /* @__PURE__ */ k(I, {
157
- workspace: l,
158
+ workspace: u,
158
159
  title: b("recent"),
159
160
  entries: ee,
160
161
  onOpen: Z,
161
162
  showTime: !0
162
163
  }), te.map((e) => /* @__PURE__ */ k(I, {
163
- workspace: l,
164
+ workspace: u,
164
165
  title: e.title,
165
166
  entries: e.entries,
166
167
  onOpen: Z
@@ -168,14 +169,14 @@ function F() {
168
169
  ]
169
170
  })
170
171
  }),
171
- H && /* @__PURE__ */ k(x, { children: /* @__PURE__ */ k(o, {
172
- workspace: l,
172
+ H && /* @__PURE__ */ k(x, { children: /* @__PURE__ */ k(d, {
173
+ workspace: u,
173
174
  mode: H,
174
175
  onClose: () => U(null),
175
176
  onSaved: (e) => L({
176
177
  to: "/$workspace/knowledge/$term",
177
178
  params: {
178
- workspace: l,
179
+ workspace: u,
179
180
  term: c(e)
180
181
  }
181
182
  })
@@ -183,8 +184,8 @@ function F() {
183
184
  ]
184
185
  });
185
186
  }
186
- function I({ workspace: t, title: n, entries: r, onOpen: i, showTime: a = !1 }) {
187
- let o = D("knowledge"), s = b(), u = l(t, i), f = d();
187
+ function I({ workspace: e, title: n, entries: r, onOpen: i, showTime: a = !1 }) {
188
+ let o = D("knowledge"), s = b(), l = f(e, i), d = u();
188
189
  return /* @__PURE__ */ A("section", {
189
190
  "aria-label": n,
190
191
  className: "mt-10",
@@ -196,13 +197,13 @@ function I({ workspace: t, title: n, entries: r, onOpen: i, showTime: a = !1 })
196
197
  })]
197
198
  }), /* @__PURE__ */ k("ul", {
198
199
  className: "mt-3 divide-y divide-border overflow-hidden rounded-xl border border-border bg-card",
199
- children: r.map((n) => /* @__PURE__ */ k("li", { children: /* @__PURE__ */ A(e, {
200
+ children: r.map((n) => /* @__PURE__ */ k("li", { children: /* @__PURE__ */ A(t, {
200
201
  to: "/$workspace/knowledge/$term",
201
202
  params: {
202
- workspace: t,
203
+ workspace: e,
203
204
  term: c(n)
204
205
  },
205
- onContextMenu: (e) => s(e, u(n)),
206
+ onContextMenu: (e) => s(e, l(n)),
206
207
  className: "group flex flex-col gap-1 px-4 py-3 sm:flex-row sm:items-start sm:gap-3 transition-colors duration-150 hover:bg-muted focus-visible:outline-offset-[-2px]",
207
208
  children: [/* @__PURE__ */ A("span", {
208
209
  className: "min-w-0 flex-1",
@@ -220,9 +221,9 @@ function I({ workspace: t, title: n, entries: r, onOpen: i, showTime: a = !1 })
220
221
  n.kind !== "term" && n.status === "proposed" && /* @__PURE__ */ k(p, { status: n.status }),
221
222
  a && /* @__PURE__ */ k("time", {
222
223
  dateTime: n.updatedAt,
223
- title: f.full(n.updatedAt),
224
+ title: d.full(n.updatedAt),
224
225
  className: "tabular-nums",
225
- children: f.relative(n.updatedAt)
226
+ children: d.relative(n.updatedAt)
226
227
  })
227
228
  ]
228
229
  })]
@@ -1,12 +1,12 @@
1
- import { redirect as e } from "../../lib/router.js";
2
- import { rememberSearch as t } from "../../lib/listSearch.js";
1
+ import { rememberSearch as e } from "../../lib/listSearch.js";
2
+ import { redirect as t } from "../../lib/router.js";
3
3
  import { windows as n } from "./measures.js";
4
4
  import { createFileRoute as r, lazyFn as i, lazyRouteComponent as a } from "@tanstack/react-router";
5
5
  var o = r("/$workspace/measures")({
6
6
  validateSearch: (e) => ({ ...n.includes(e.days) && { days: e.days } }),
7
7
  beforeLoad: ({ params: n, search: r, location: i, preload: a }) => {
8
- let o = t(i.pathname, r, a);
9
- if (o) throw e({
8
+ let o = e(i.pathname, r, a);
9
+ if (o) throw t({
10
10
  to: "/$workspace/measures",
11
11
  params: n,
12
12
  search: o,
@@ -1,8 +1,8 @@
1
- import { Link as e } from "../../lib/router.js";
2
- import { windows as t } from "./measures.js";
3
- import { Route as n } from "./measures2.js";
4
- import { measuresQuery as r } from "../../api/queries.js";
5
- import { usePageTitle as i } from "../../lib/pageTitle.js";
1
+ import { usePageTitle as e } from "../../lib/pageTitle.js";
2
+ import { Link as t } from "../../lib/router.js";
3
+ import { windows as n } from "./measures.js";
4
+ import { Route as r } from "./measures2.js";
5
+ import { measuresQuery as i } from "../../api/queries.js";
6
6
  import { useMoney as a } from "../../components/AgentWork.js";
7
7
  import { SegmentedControl as o } from "@parallelworks/ui";
8
8
  import { useFormatter as s, useTranslations as c } from "use-intl";
@@ -11,8 +11,8 @@ import { useSuspenseQuery as d } from "@tanstack/react-query";
11
11
  // src/routes/$workspace/measures.tsx?tsr-split=component
12
12
  function f() {
13
13
  let a = c("measures");
14
- i(a("title"));
15
- let { workspace: s } = n.useParams(), { days: f = "30" } = n.useSearch(), m = n.useNavigate(), { data: _ } = d(r(s, Number(f)));
14
+ e(a("title"));
15
+ let { workspace: s } = r.useParams(), { days: f = "30" } = r.useSearch(), m = r.useNavigate(), { data: _ } = d(i(s, Number(f)));
16
16
  return /* @__PURE__ */ u("div", {
17
17
  className: "w-full space-y-10 px-4 py-6 md:px-8 md:py-8",
18
18
  children: [
@@ -31,7 +31,7 @@ function f() {
31
31
  search: { days: e },
32
32
  replace: !0
33
33
  }),
34
- options: t.map((e) => ({
34
+ options: n.map((e) => ({
35
35
  value: e,
36
36
  label: a("days", { count: Number(e) })
37
37
  }))
@@ -50,47 +50,47 @@ function f() {
50
50
  /* @__PURE__ */ l(g, {
51
51
  title: a("byIssue"),
52
52
  rows: _.issues,
53
- link: (t) => /* @__PURE__ */ u(e, {
53
+ link: (e) => /* @__PURE__ */ u(t, {
54
54
  to: "/$workspace/issues/$identifier",
55
55
  params: {
56
56
  workspace: s,
57
- identifier: t.key
57
+ identifier: e.key
58
58
  },
59
59
  className: "hover:underline",
60
60
  children: [
61
61
  /* @__PURE__ */ l("span", {
62
62
  className: "text-muted-foreground",
63
- children: t.key
63
+ children: e.key
64
64
  }),
65
65
  " ",
66
- t.title
66
+ e.title
67
67
  ]
68
68
  })
69
69
  }),
70
70
  /* @__PURE__ */ l(g, {
71
71
  title: a("byArea"),
72
72
  rows: _.areas,
73
- link: (t) => /* @__PURE__ */ l(e, {
73
+ link: (e) => /* @__PURE__ */ l(t, {
74
74
  to: "/$workspace/areas/$area",
75
75
  params: {
76
76
  workspace: s,
77
- area: t.key
77
+ area: e.key
78
78
  },
79
79
  className: "hover:underline",
80
- children: t.title
80
+ children: e.title
81
81
  })
82
82
  }),
83
83
  /* @__PURE__ */ l(g, {
84
84
  title: a("byTeam"),
85
85
  rows: _.teams,
86
- link: (t) => /* @__PURE__ */ l(e, {
86
+ link: (e) => /* @__PURE__ */ l(t, {
87
87
  to: "/$workspace/teams/$key/settings",
88
88
  params: {
89
89
  workspace: s,
90
- key: t.key
90
+ key: e.key
91
91
  },
92
92
  className: "hover:underline",
93
- children: t.title
93
+ children: e.title
94
94
  })
95
95
  })
96
96
  ]