@parallelworks/tandem-web 0.150.3 → 0.151.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 (110) hide show
  1. package/_virtual/_virtual_i18n/en/common.js +32 -3
  2. package/_virtual/_virtual_i18n/es/common.js +32 -3
  3. package/_virtual/_virtual_i18n/ja/common.js +32 -3
  4. package/_virtual/_virtual_i18n/ko/common.js +32 -3
  5. package/_virtual/_virtual_i18n/zh/common.js +32 -3
  6. package/api/queries.js +88 -77
  7. package/components/AccessGrants.js +6 -6
  8. package/components/ActivityTimeline.js +4 -4
  9. package/components/AgentWork.js +111 -111
  10. package/components/AreaLink.js +32 -0
  11. package/components/AreaTiles.js +10 -13
  12. package/components/AreaWork.js +25 -1
  13. package/components/BugRotation.js +3 -3
  14. package/components/CodeHostSettings.js +30 -30
  15. package/components/CommandPalette.js +53 -53
  16. package/components/CustomFields.js +116 -116
  17. package/components/DateChip.js +11 -11
  18. package/components/DocButton.js +6 -6
  19. package/components/DocHistory.js +4 -4
  20. package/components/DocLinkPicker.js +8 -8
  21. package/components/DocProperties.js +15 -15
  22. package/components/DocTable.js +15 -15
  23. package/components/DocsTree.js +80 -80
  24. package/components/Editor.js +35 -35
  25. package/components/FavoritesNav.js +53 -53
  26. package/components/GitHub.js +18 -18
  27. package/components/Graph.js +15 -15
  28. package/components/HostActions.js +21 -21
  29. package/components/HostPanel.js +6 -6
  30. package/components/HoverCards.js +38 -38
  31. package/components/IssueBoard.js +4 -4
  32. package/components/IssueCode.js +14 -14
  33. package/components/IssueEvent.js +3 -3
  34. package/components/IssueFilters.js +71 -71
  35. package/components/IssueListBlock.js +32 -32
  36. package/components/IssueRow.js +21 -21
  37. package/components/IssueTemplates.js +118 -118
  38. package/components/IssueTypes.js +40 -40
  39. package/components/NewIssueDialog.js +76 -76
  40. package/components/NewProjectDialog.js +145 -145
  41. package/components/PersonActivity.js +4 -4
  42. package/components/SharedViewer.js +5 -5
  43. package/components/SlashMenu.js +29 -29
  44. package/components/TeamRepositories.js +51 -51
  45. package/components/TeamWorkflow.js +6 -6
  46. package/components/UnlinkedMentions.js +20 -20
  47. package/components/Updates.js +3 -3
  48. package/components/Widgets.js +20 -20
  49. package/components/columns.js +17 -17
  50. package/components/editorPlugins.js +80 -80
  51. package/components/mathDiagrams.js +17 -17
  52. package/lib/boardMove.js +5 -5
  53. package/lib/issueList.js +58 -58
  54. package/lib/issueMenu.js +27 -27
  55. package/lib/knowledge.js +106 -106
  56. package/lib/views.js +9 -9
  57. package/package.json +1 -1
  58. package/pages/area.js +291 -0
  59. package/pages/areas.js +258 -287
  60. package/pages/decisions.js +21 -21
  61. package/pages/issues.js +52 -52
  62. package/pages/projects.js +125 -125
  63. package/pages/triage.js +12 -12
  64. package/routeTree.gen.js +186 -180
  65. package/routes/_workspace/agents/_slug2.js +11 -11
  66. package/routes/_workspace/agents/index2.js +10 -10
  67. package/routes/_workspace/areas/_area.js +7 -8
  68. package/routes/_workspace/areas/_area2.js +3 -290
  69. package/routes/_workspace/areas/_area3.js +7 -8
  70. package/routes/_workspace/docs/_doc2.js +230 -230
  71. package/routes/_workspace/docs/space2._space.js +27 -27
  72. package/routes/_workspace/issues/_identifier2.js +222 -224
  73. package/routes/_workspace/knowledge/_term2.js +43 -43
  74. package/routes/_workspace/knowledge/index.js +6 -6
  75. package/routes/_workspace/knowledge/index2.js +15 -15
  76. package/routes/_workspace/measures3.js +70 -72
  77. package/routes/_workspace/notifications2.js +150 -150
  78. package/routes/_workspace/people/_username2.js +10 -10
  79. package/routes/_workspace/projects/_projectId3.js +276 -276
  80. package/routes/_workspace/settings/audit-log3.js +136 -138
  81. package/routes/_workspace/settings/fields2.js +11 -11
  82. package/routes/_workspace/settings/github2.js +6 -6
  83. package/routes/_workspace/settings/groups2.js +26 -26
  84. package/routes/_workspace/settings/import2.js +398 -147
  85. package/routes/_workspace/settings/import3.js +7 -3
  86. package/routes/_workspace/settings/index2.js +6 -6
  87. package/routes/_workspace/settings/labels2.js +21 -21
  88. package/routes/_workspace/settings/members2.js +27 -27
  89. package/routes/_workspace/settings/notifications2.js +8 -8
  90. package/routes/_workspace/settings/parallelworks2.js +32 -32
  91. package/routes/_workspace/settings/roles2.js +24 -24
  92. package/routes/_workspace/settings/runners2.js +15 -15
  93. package/routes/_workspace/settings/sessions2.js +17 -17
  94. package/routes/_workspace/settings/slack2.js +7 -7
  95. package/routes/_workspace/settings/sso2.js +31 -31
  96. package/routes/_workspace/settings/teams2.js +25 -25
  97. package/routes/_workspace/settings/tokens2.js +12 -12
  98. package/routes/_workspace/settings/webhooks2.js +13 -13
  99. package/routes/_workspace/teams/_key/areas/_area.js +8 -0
  100. package/routes/_workspace/teams/_key/areas/_area2.js +4 -0
  101. package/routes/_workspace/teams/_key/areas/_area3.js +9 -0
  102. package/routes/_workspace/teams/_key/areas/index.js +6 -0
  103. package/routes/_workspace/teams/_key/areas/index2.js +4 -0
  104. package/routes/_workspace/teams/_key/{areas3.js → areas/index3.js} +2 -2
  105. package/routes/_workspace/teams/_key/cycles/_number2.js +27 -27
  106. package/routes/_workspace/teams/_key/cycles/index2.js +24 -24
  107. package/routes/_workspace/teams/_key/settings2.js +29 -29
  108. package/routes/_workspace2.js +368 -368
  109. package/routes/_workspace/teams/_key/areas.js +0 -6
  110. package/routes/_workspace/teams/_key/areas2.js +0 -4
@@ -0,0 +1,32 @@
1
+ import { Link as e } from "../lib/router.js";
2
+ import { areasQuery as t, teamsQuery as n } from "../api/queries.js";
3
+ import { jsx as r } from "react/jsx-runtime";
4
+ import { useQuery as i } from "@tanstack/react-query";
5
+ // src/components/AreaLink.tsx
6
+ function a(e, r) {
7
+ let { data: a = [] } = i(n(e)), { data: o = [] } = i({
8
+ ...t(e),
9
+ enabled: r.teamId === void 0
10
+ }), s = r.teamId === void 0 ? o.find((e) => e.key === r.key)?.teamId : r.teamId;
11
+ return s ? a.find((e) => e.id === s)?.key : void 0;
12
+ }
13
+ function o({ workspace: t, area: n, ...i }) {
14
+ let o = a(t, n);
15
+ return o ? /* @__PURE__ */ r(e, {
16
+ to: "/$workspace/teams/$key/areas/$area",
17
+ params: {
18
+ workspace: t,
19
+ key: o,
20
+ area: n.key
21
+ },
22
+ ...i
23
+ }) : /* @__PURE__ */ r(e, {
24
+ to: "/$workspace/areas/$area",
25
+ params: {
26
+ workspace: t,
27
+ area: n.key
28
+ },
29
+ ...i
30
+ });
31
+ }
32
+ export { o as AreaLink, a as useAreaTeam };
@@ -1,6 +1,6 @@
1
- import { Link as e } from "../lib/router.js";
2
- import { AreaIcon as t, EditIcon as n } from "./icons.js";
3
- import { DocIcon as r } from "./DocIcon.js";
1
+ import { AreaIcon as e, EditIcon as t } from "./icons.js";
2
+ import { DocIcon as n } from "./DocIcon.js";
3
+ import { AreaLink as r } from "./AreaLink.js";
4
4
  import { useAreaActions as i } from "../lib/areas.js";
5
5
  import { DocIconPicker as a } from "./DocIconPicker.js";
6
6
  import { CropDialog as o } from "./ImageUpload.js";
@@ -52,30 +52,27 @@ function b({ workspace: l, area: u, inside: g, decisions: b, menu: x, onOpen: S
52
52
  }), O = s(l, D), k = /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m(v, {
53
53
  decisions: b,
54
54
  dashed: u.status === "proposed",
55
- children: E ? /* @__PURE__ */ m(r, {
55
+ children: E ? /* @__PURE__ */ m(n, {
56
56
  icon: E,
57
57
  className: "size-8",
58
58
  emojiClassName: "text-3xl"
59
- }) : /* @__PURE__ */ m(t, { className: "size-7" })
59
+ }) : /* @__PURE__ */ m(e, { className: "size-7" })
60
60
  }), /* @__PURE__ */ m(y, {
61
61
  hint: g > 0 ? C("count", { count: g }) : void 0,
62
62
  children: u.title
63
63
  })] });
64
64
  return /* @__PURE__ */ h("li", {
65
65
  className: "group/tile relative",
66
- onContextMenu: (e) => w(e, x()),
66
+ onContextMenu: x && ((e) => w(e, x())),
67
67
  children: [
68
68
  g > 0 ? /* @__PURE__ */ m("button", {
69
69
  type: "button",
70
70
  className: _,
71
71
  onClick: () => S(u),
72
72
  children: k
73
- }) : /* @__PURE__ */ m(e, {
74
- to: "/$workspace/areas/$area",
75
- params: {
76
- workspace: l,
77
- area: u.key
78
- },
73
+ }) : /* @__PURE__ */ m(r, {
74
+ workspace: l,
75
+ area: u,
79
76
  className: _,
80
77
  children: k
81
78
  }),
@@ -86,7 +83,7 @@ function b({ workspace: l, area: u, inside: g, decisions: b, menu: x, onOpen: S
86
83
  trigger: /* @__PURE__ */ m(c, {
87
84
  variant: "ghost",
88
85
  size: "xs",
89
- icon: /* @__PURE__ */ m(n, {}),
86
+ icon: /* @__PURE__ */ m(t, {}),
90
87
  label: C(E ? "changeIcon" : "addIcon", { area: u.title }),
91
88
  className: "absolute top-1 right-1 opacity-0 group-hover/tile:opacity-100 focus-visible:opacity-100 aria-expanded:opacity-100 max-md:hidden"
92
89
  })
@@ -78,4 +78,28 @@ function d({ workspace: e, decision: n, isNew: l, notInDocs: d }) {
78
78
  })
79
79
  })] });
80
80
  }
81
- export { d as FoldedAnswer, l as KnowledgeRow };
81
+ function f({ title: e, count: t, icon: n, extra: r, action: i, bare: a = !1, children: c }) {
82
+ return /* @__PURE__ */ s("section", {
83
+ "aria-label": e,
84
+ children: [/* @__PURE__ */ s("h2", {
85
+ className: "sticky top-0 z-10 flex h-9 items-center gap-2 border-b border-border bg-background px-4 text-xs font-medium md:px-5",
86
+ children: [
87
+ n,
88
+ /* @__PURE__ */ o("span", {
89
+ className: "truncate",
90
+ children: e
91
+ }),
92
+ /* @__PURE__ */ o("span", {
93
+ className: "text-muted-foreground tabular-nums",
94
+ children: t
95
+ }),
96
+ r,
97
+ i && /* @__PURE__ */ o("span", {
98
+ className: "ml-auto flex",
99
+ children: i
100
+ })
101
+ ]
102
+ }), t > 0 && (a ? c : /* @__PURE__ */ o("ul", { children: c }))]
103
+ });
104
+ }
105
+ export { f as AreaGroup, d as FoldedAnswer, l as KnowledgeRow };
@@ -1,8 +1,8 @@
1
1
  import { api as e, unwrap as t } from "../api/client.js";
2
2
  import { labelsQuery as n, teamMembersQuery as r, teamRotationQuery as i } from "../api/queries.js";
3
3
  import { AddIcon as a, ChevronDownIcon as o, CloseIcon as s } from "./icons.js";
4
- import { useTime as c } from "../lib/time.js";
5
- import { usePeople as l } from "../lib/people.js";
4
+ import { usePeople as c } from "../lib/people.js";
5
+ import { useTime as l } from "../lib/time.js";
6
6
  import { PersonHoverCard as u } from "./PersonHoverCard.js";
7
7
  import { Avatar as d, Button as f, Card as p, Combobox as m, IconButton as h, Select as g, SettingRow as _, SettingsCard as v, StatusBadge as y, Switch as b } from "@parallelworks/ui";
8
8
  import { useErrorMessage as x } from "@parallelworks/problem/react";
@@ -11,7 +11,7 @@ import { jsx as C, jsxs as w } from "react/jsx-runtime";
11
11
  import { useMutation as T, useQueryClient as E, useSuspenseQuery as D } from "@tanstack/react-query";
12
12
  // src/components/BugRotation.tsx
13
13
  function O({ workspace: O, teamKey: k, isAdmin: A }) {
14
- let j = S("rotation"), M = x(), N = c(), P = E(), F = i(O, k), { data: I } = D(F), { data: L } = D(n(O)), { data: R } = D(r(O, k)), { person: z } = l(O), B = { params: { path: {
14
+ let j = S("rotation"), M = x(), N = l(), P = E(), F = i(O, k), { data: I } = D(F), { data: L } = D(n(O)), { data: R } = D(r(O, k)), { person: z } = c(O), B = { params: { path: {
15
15
  workspace: O,
16
16
  key: k
17
17
  } } }, V = T({
@@ -1,10 +1,10 @@
1
1
  import { api as e, unwrap as t } from "../api/client.js";
2
2
  import { codeHostAccountsQuery as n, codeHostQuery as r, meQuery as i } from "../api/queries.js";
3
- import { useConfirm as a } from "../lib/confirm.js";
3
+ import { externalUrl as a } from "../lib/externalUrl.js";
4
4
  import { CodeHostIcon as o } from "./icons.js";
5
5
  import { usePeople as s } from "../lib/people.js";
6
- import { useFormError as c } from "./settings.js";
7
- import { externalUrl as l } from "../lib/externalUrl.js";
6
+ import { useConfirm as c } from "../lib/confirm.js";
7
+ import { useFormError as l } from "./settings.js";
8
8
  import { ConnectionCard as u, ConnectionPanel as d } from "./ConnectionCard.js";
9
9
  import { Avatar as f, Button as p, Card as m, ErrorText as h, Section as g, Select as _, SettingsCard as v, StatusLabel as y } from "@parallelworks/ui";
10
10
  import { useState as b } from "react";
@@ -13,7 +13,7 @@ import { Fragment as S, jsx as C, jsxs as w } from "react/jsx-runtime";
13
13
  import { useMutation as T, useQueryClient as E, useSuspenseQuery as D } from "@tanstack/react-query";
14
14
  // src/components/CodeHostSettings.tsx
15
15
  function O({ workspace: n }) {
16
- let o = x("code"), { data: s } = D(i), { data: l } = D(r(n)), u = E(), d = c(), { confirm: f, dialog: m } = a(), v = T({
16
+ let a = x("code"), { data: o } = D(i), { data: s } = D(r(n)), u = E(), d = l(), { confirm: f, dialog: m } = c(), v = T({
17
17
  mutationFn: async (r) => t(await e.DELETE("/api/v1/workspaces/{workspace}/code-host/connections/{account}", { params: { path: {
18
18
  workspace: n,
19
19
  account: r
@@ -27,11 +27,11 @@ function O({ workspace: n }) {
27
27
  ] });
28
28
  }
29
29
  }), y = (e) => f({
30
- title: o("disconnectConfirm", { account: e }),
31
- description: o("disconnectDetail"),
32
- confirmLabel: o("disconnect"),
30
+ title: a("disconnectConfirm", { account: e }),
31
+ description: a("disconnectDetail"),
32
+ confirmLabel: a("disconnect"),
33
33
  onConfirm: () => v.mutateAsync(e)
34
- }), [S, O] = b(""), k = l.connections.filter((e) => e.connectedBy === s?.user.username), A = k[0];
34
+ }), [S, O] = b(""), k = s.connections.filter((e) => e.connectedBy === o?.user.username), A = k[0];
35
35
  if (!A) return null;
36
36
  let j = k.some((e) => e.account === S) ? S : A.account;
37
37
  return /* @__PURE__ */ w(g, {
@@ -39,8 +39,8 @@ function O({ workspace: n }) {
39
39
  tone: "error",
40
40
  collapsible: !1,
41
41
  headingLevel: 2,
42
- title: o("dangerZone"),
43
- description: o("disconnectDetail"),
42
+ title: a("dangerZone"),
43
+ description: a("disconnectDetail"),
44
44
  className: "mt-10",
45
45
  children: [
46
46
  /* @__PURE__ */ w("div", {
@@ -48,7 +48,7 @@ function O({ workspace: n }) {
48
48
  children: [/* @__PURE__ */ C("div", {
49
49
  className: "w-56 max-w-full",
50
50
  children: /* @__PURE__ */ C(_, {
51
- "aria-label": o("disconnectWhich"),
51
+ "aria-label": a("disconnectWhich"),
52
52
  value: j,
53
53
  onValueChange: (e) => e && O(e),
54
54
  items: k.map((e) => ({
@@ -60,7 +60,7 @@ function O({ workspace: n }) {
60
60
  variant: "danger",
61
61
  onClick: () => y(j),
62
62
  loading: v.isPending,
63
- children: o("disconnectAccount", { account: j })
63
+ children: a("disconnectAccount", { account: j })
64
64
  })]
65
65
  }),
66
66
  /* @__PURE__ */ C(h, {
@@ -72,12 +72,12 @@ function O({ workspace: n }) {
72
72
  ]
73
73
  });
74
74
  }
75
- function k({ workspace: n, isAdmin: i, result: a }) {
76
- let m = x("code"), { data: h } = D(r(n)), { person: g } = s(n), _ = c(), b = T({
75
+ function k({ workspace: n, isAdmin: i, result: c }) {
76
+ let m = x("code"), { data: h } = D(r(n)), { person: g } = s(n), _ = l(), b = T({
77
77
  mutationFn: async () => t(await e.POST("/api/v1/workspaces/{workspace}/code-host/connect", { params: { path: { workspace: n } } })),
78
78
  onMutate: _.clear,
79
79
  onSuccess: ({ url: e }) => {
80
- let t = l(e);
80
+ let t = a(e);
81
81
  t && window.location.assign(t);
82
82
  },
83
83
  onError: _.set
@@ -86,10 +86,10 @@ function k({ workspace: n, isAdmin: i, result: a }) {
86
86
  className: "px-3 py-2 text-sm text-muted-foreground",
87
87
  children: m("notConfigured")
88
88
  }) }) : /* @__PURE__ */ w(S, { children: [
89
- a && a !== "choose" && /* @__PURE__ */ C("p", {
89
+ c && c !== "choose" && /* @__PURE__ */ C("p", {
90
90
  role: "status",
91
- className: `mb-3 rounded-md bg-muted px-3 py-2 text-sm ${a === "failed" ? "text-danger" : ""}`,
92
- children: m(`result.${a}`)
91
+ className: `mb-3 rounded-md bg-muted px-3 py-2 text-sm ${c === "failed" ? "text-danger" : ""}`,
92
+ children: m(`result.${c}`)
93
93
  }),
94
94
  /* @__PURE__ */ C(u, {
95
95
  icon: /* @__PURE__ */ C(o, { className: "size-7" }),
@@ -129,12 +129,12 @@ function k({ workspace: n, isAdmin: i, result: a }) {
129
129
  }),
130
130
  i && /* @__PURE__ */ C(A, {
131
131
  workspace: n,
132
- chosen: a === "choose"
132
+ chosen: c === "choose"
133
133
  })
134
134
  ] });
135
135
  }
136
- function A({ workspace: i, chosen: a }) {
137
- let o = x("code"), { data: s } = D(n(i)), u = E(), d = c(), f = T({
136
+ function A({ workspace: i, chosen: o }) {
137
+ let s = x("code"), { data: c } = D(n(i)), u = E(), d = l(), f = T({
138
138
  mutationFn: async (n) => t(await e.POST("/api/v1/workspaces/{workspace}/code-host/connections", {
139
139
  params: { path: { workspace: i } },
140
140
  body: { id: n }
@@ -156,22 +156,22 @@ function A({ workspace: i, chosen: a }) {
156
156
  onMutate: d.clear,
157
157
  onError: d.set
158
158
  });
159
- return !a && s.length === 0 ? null : /* @__PURE__ */ w(m, {
159
+ return !o && c.length === 0 ? null : /* @__PURE__ */ w(m, {
160
160
  size: "fill",
161
161
  padding: "sm",
162
162
  className: "mt-4",
163
163
  children: [
164
164
  /* @__PURE__ */ C("h3", {
165
165
  className: "text-sm font-medium",
166
- children: o("chooseTitle")
166
+ children: s("chooseTitle")
167
167
  }),
168
168
  /* @__PURE__ */ C("p", {
169
169
  className: "mt-0.5 text-sm text-muted-foreground",
170
- children: s.length > 0 ? o("chooseDescription") : o("noAccounts")
170
+ children: c.length > 0 ? s("chooseDescription") : s("noAccounts")
171
171
  }),
172
- s.length > 0 && /* @__PURE__ */ C("ul", {
172
+ c.length > 0 && /* @__PURE__ */ C("ul", {
173
173
  className: "mt-3 divide-y divide-border rounded-md border border-border",
174
- children: s.map((e) => /* @__PURE__ */ w("li", {
174
+ children: c.map((e) => /* @__PURE__ */ w("li", {
175
175
  className: "px-3 py-2 text-sm",
176
176
  children: [/* @__PURE__ */ w("div", {
177
177
  className: "flex items-center gap-3",
@@ -184,7 +184,7 @@ function A({ workspace: i, chosen: a }) {
184
184
  onClick: () => f.mutate(e.id),
185
185
  disabled: f.isPending,
186
186
  loading: f.isPending && f.variables === e.id,
187
- children: o("connectThis")
187
+ children: s("connectThis")
188
188
  })]
189
189
  }), /* @__PURE__ */ C(h, {
190
190
  size: "md",
@@ -202,7 +202,7 @@ function A({ workspace: i, chosen: a }) {
202
202
  let e = window.open("about:blank", "_blank");
203
203
  g.mutate(void 0, {
204
204
  onSuccess: ({ url: t }) => {
205
- let n = l(t);
205
+ let n = a(t);
206
206
  if (!n) return e?.close();
207
207
  if (!e) return window.location.assign(n);
208
208
  e.opener = null, e.location.href = n;
@@ -211,10 +211,10 @@ function A({ workspace: i, chosen: a }) {
211
211
  });
212
212
  },
213
213
  loading: g.isPending,
214
- children: o("installElsewhere")
214
+ children: s("installElsewhere")
215
215
  }), /* @__PURE__ */ C("span", {
216
216
  className: "text-xs text-muted-foreground",
217
- children: o("installHint")
217
+ children: s("installHint")
218
218
  })]
219
219
  }),
220
220
  /* @__PURE__ */ C(h, {
@@ -1,18 +1,18 @@
1
1
  import { useHost as e } from "../lib/host.js";
2
2
  import { useNavigate as t } from "../lib/router.js";
3
3
  import { docQuery as n, docsQuery as r, issueSearchQuery as i, knowledgeQuery as a, meQuery as o, teamsQuery as ee } from "../api/queries.js";
4
- import { AddIcon as s, AreaIcon as te, CheckIcon as ne, ChevronRightIcon as re, CloseIcon as ie, CycleIcon as ae, FileTextIcon as c, InboxIcon as l, LibraryIcon as u, ListViewIcon as d, NotificationIcon as oe, ProjectIcon as f, SearchIcon as se, SettingsIcon as ce, StatusIcon as le, TriageIcon as ue, UserIcon as p, UsersIcon as m } from "./icons.js";
5
- import { teamPath as de } from "../lib/teamPaths.js";
6
- import { docPath as h, useDocActions as fe } from "../lib/docs.js";
7
- import { headingAnchor as pe, headings as me } from "../lib/glossary.js";
4
+ import { docPath as s, useDocActions as te } from "../lib/docs.js";
5
+ import { AddIcon as c, AreaIcon as ne, CheckIcon as re, ChevronRightIcon as ie, CloseIcon as ae, CycleIcon as oe, FileTextIcon as l, InboxIcon as u, LibraryIcon as d, ListViewIcon as f, NotificationIcon as se, ProjectIcon as p, SearchIcon as ce, SettingsIcon as le, StatusIcon as ue, TriageIcon as de, UserIcon as m, UsersIcon as h } from "./icons.js";
6
+ import { headingAnchor as fe, headings as pe } from "../lib/glossary.js";
7
+ import { useNewIssue as me } from "../lib/newIssue.js";
8
8
  import { useIssueMenu as he } from "../lib/issueMenu.js";
9
- import { useNewIssue as ge } from "../lib/newIssue.js";
10
- import { fuzzyScore as g, namedFirst as _e } from "../lib/palette.js";
11
- import { recentPages as ve } from "../lib/recent.js";
12
- import { useSettingsPages as ye } from "./SettingsNav.js";
13
- import { useSavedViews as be, viewHref as xe } from "../lib/views.js";
14
- import { EntityIcon as Se } from "./EntityIcon.js";
15
- import { DocIcon as _ } from "./DocIcon.js";
9
+ import { EntityIcon as ge } from "./EntityIcon.js";
10
+ import { DocIcon as g } from "./DocIcon.js";
11
+ import { teamPath as _e } from "../lib/teamPaths.js";
12
+ import { useSettingsPages as ve } from "./SettingsNav.js";
13
+ import { useSavedViews as ye, viewHref as be } from "../lib/views.js";
14
+ import { fuzzyScore as _, namedFirst as xe } from "../lib/palette.js";
15
+ import { recentPages as Se } from "../lib/recent.js";
16
16
  import { EmptyState as Ce, IconButton as we, ListboxGroup as Te, ListboxOption as Ee, Modal as De, Tooltip as Oe, isMenuSubmenu as v, useListboxNavigation as ke } from "@parallelworks/ui";
17
17
  import { useEffect as y, useRef as Ae, useState as b } from "react";
18
18
  import { useTranslations as x } from "use-intl";
@@ -25,7 +25,7 @@ function Ne(e, t, n = 6) {
25
25
  ...e,
26
26
  items: e.items.map((e) => ({
27
27
  item: e,
28
- score: g(t, e.label)
28
+ score: _(t, e.label)
29
29
  })).filter((e) => e.score !== null).sort((e, t) => t.score - e.score).slice(0, e.limit ?? n).map((e) => e.item)
30
30
  })).filter((e) => e.items.length > 0) : e;
31
31
  }
@@ -57,10 +57,10 @@ function Pe(e, t) {
57
57
  return n;
58
58
  }
59
59
  function D({ workspace: v, open: D, onClose: O, selection: k }) {
60
- let A = x("palette"), j = x("common"), M = x("workspace"), N = e(), Fe = x("measures"), Ie = x("graphPage"), Le = t(), Re = ge(), { data: P } = Me(o), { data: ze = [] } = T(ee(v)), { data: Be = [] } = T({
60
+ let A = x("palette"), j = x("common"), M = x("workspace"), N = e(), Fe = x("measures"), Ie = x("graphPage"), Le = t(), Re = me(), { data: P } = Me(o), { data: ze = [] } = T(ee(v)), { data: Be = [] } = T({
61
61
  ...a(v),
62
62
  enabled: D
63
- }), Ve = fe(v), { views: He } = be(v), F = ye(), Ue = he(v), [I, L] = b(""), [R, z] = b(""), { data: B = [] } = T({
63
+ }), Ve = te(v), { views: He } = ye(v), F = ve(), Ue = he(v), [I, L] = b(""), [R, z] = b(""), { data: B = [] } = T({
64
64
  ...r(v, { title: R }),
65
65
  enabled: D && R !== "",
66
66
  placeholderData: w
@@ -82,10 +82,10 @@ function D({ workspace: v, open: D, onClose: O, selection: k }) {
82
82
  }), Ge = je({ queries: K.slice(0, 3).map((e) => ({
83
83
  ...n(v, e.key),
84
84
  enabled: W
85
- })) }), q = K.slice(0, 3).flatMap((e, t) => me(Ge[t]?.data?.body ?? "").filter((e) => g(R, e.text) !== null).slice(0, 3).map((t) => ({
85
+ })) }), q = K.slice(0, 3).flatMap((e, t) => pe(Ge[t]?.data?.body ?? "").filter((e) => _(R, e.text) !== null).slice(0, 3).map((t) => ({
86
86
  doc: e,
87
87
  heading: t.text
88
- }))), J = D ? ve(v) : [], Ke = P?.workspaces.find((e) => e.slug === v)?.name ?? v, Y = ze.filter((e) => !e.archivedAt), X = (e) => () => Le({ href: e }), qe = (() => {
88
+ }))), J = D ? Se(v) : [], Ke = P?.workspaces.find((e) => e.slug === v)?.name ?? v, Y = ze.filter((e) => !e.archivedAt), X = (e) => () => Le({ href: e }), qe = (() => {
89
89
  let e = I.trim(), t = [];
90
90
  if (k.length > 0) {
91
91
  let n = Pe(Ue(k), (e, t) => e === "S" ? A("setStatus") : e === "P" ? A("setPriority") : e === "A" ? A("setAssignee") : e === "L" ? A("setLabels") : t), r = e ? n.flatMap((e) => {
@@ -111,7 +111,7 @@ function D({ workspace: v, open: D, onClose: O, selection: k }) {
111
111
  items: J.map((e) => ({
112
112
  id: `recent-${e.href}`,
113
113
  label: e.label,
114
- icon: e.kind === "doc" ? /* @__PURE__ */ S(c, { className: E }) : /* @__PURE__ */ S(d, { className: E }),
114
+ icon: e.kind === "doc" ? /* @__PURE__ */ S(l, { className: E }) : /* @__PURE__ */ S(f, { className: E }),
115
115
  run: X(e.href)
116
116
  }))
117
117
  }), W && G && G.issues.length > 0 && t.push({
@@ -120,7 +120,7 @@ function D({ workspace: v, open: D, onClose: O, selection: k }) {
120
120
  items: G.issues.slice(0, 8).map((e) => ({
121
121
  id: e.id,
122
122
  label: `${e.identifier} ${e.title}`,
123
- icon: /* @__PURE__ */ S(le, { category: e.status.category }),
123
+ icon: /* @__PURE__ */ S(ue, { category: e.status.category }),
124
124
  run: X(`/${v}/issues/${e.identifier}`)
125
125
  }))
126
126
  }), t.push({
@@ -130,14 +130,14 @@ function D({ workspace: v, open: D, onClose: O, selection: k }) {
130
130
  {
131
131
  id: "new-issue",
132
132
  label: A("newIssue"),
133
- icon: /* @__PURE__ */ S(s, { className: E }),
133
+ icon: /* @__PURE__ */ S(c, { className: E }),
134
134
  hint: "C",
135
135
  run: () => Re()
136
136
  },
137
137
  {
138
138
  id: "new-doc",
139
139
  label: A("newDoc"),
140
- icon: /* @__PURE__ */ S(s, { className: E }),
140
+ icon: /* @__PURE__ */ S(c, { className: E }),
141
141
  page: () => ({
142
142
  title: A("newDoc"),
143
143
  groups: [{
@@ -160,64 +160,64 @@ function D({ workspace: v, open: D, onClose: O, selection: k }) {
160
160
  {
161
161
  id: "my-issues",
162
162
  label: A("goTo", { page: M("myIssues") }),
163
- icon: /* @__PURE__ */ S(p, { className: E }),
163
+ icon: /* @__PURE__ */ S(m, { className: E }),
164
164
  run: X(`/${v}/issues?assignee=${encodeURIComponent(P?.user.username ?? "")}`)
165
165
  },
166
166
  {
167
167
  id: "decisions",
168
168
  label: A("goToInbox"),
169
- icon: /* @__PURE__ */ S(l, { className: E }),
169
+ icon: /* @__PURE__ */ S(u, { className: E }),
170
170
  run: X(`/${v}/decisions`)
171
171
  },
172
172
  {
173
173
  id: "notifications",
174
174
  label: A("goTo", { page: M("notifications") }),
175
- icon: /* @__PURE__ */ S(oe, { className: E }),
175
+ icon: /* @__PURE__ */ S(se, { className: E }),
176
176
  run: X(`/${v}/notifications`)
177
177
  },
178
178
  {
179
179
  id: "knowledge",
180
180
  label: A("goTo", { page: M("knowledge") }),
181
- icon: /* @__PURE__ */ S(u, { className: E }),
181
+ icon: /* @__PURE__ */ S(d, { className: E }),
182
182
  run: X(`/${v}/knowledge`)
183
183
  },
184
184
  {
185
185
  id: "docs",
186
186
  label: A("goTo", { page: A("docs") }),
187
- icon: /* @__PURE__ */ S(c, { className: E }),
187
+ icon: /* @__PURE__ */ S(l, { className: E }),
188
188
  run: X(`/${v}/docs`)
189
189
  },
190
190
  {
191
191
  id: "agents",
192
192
  label: A("goTo", { page: M("agents") }),
193
- icon: /* @__PURE__ */ S(p, { className: E }),
193
+ icon: /* @__PURE__ */ S(m, { className: E }),
194
194
  run: X(`/${v}/agents`)
195
195
  },
196
196
  ...[
197
197
  [
198
198
  "projects",
199
199
  M("projects"),
200
- f
200
+ p
201
201
  ],
202
202
  ...Y.some((e) => e.triageEnabled) ? [[
203
203
  "triage",
204
204
  M("triage"),
205
- ue
205
+ de
206
206
  ]] : [],
207
207
  [
208
208
  "measures",
209
209
  Fe("title"),
210
- d
210
+ f
211
211
  ],
212
212
  [
213
213
  "graph",
214
214
  Ie("title"),
215
- u
215
+ d
216
216
  ],
217
217
  [
218
218
  "settings",
219
219
  M("settings"),
220
- ce
220
+ le
221
221
  ]
222
222
  ].map(([e, t, n]) => ({
223
223
  id: e,
@@ -228,7 +228,7 @@ function D({ workspace: v, open: D, onClose: O, selection: k }) {
228
228
  ...(P?.workspaces.length ?? 0) > 1 ? [{
229
229
  id: "switch-workspace",
230
230
  label: M("switchWorkspace"),
231
- icon: /* @__PURE__ */ S(m, { className: E }),
231
+ icon: /* @__PURE__ */ S(h, { className: E }),
232
232
  page: () => ({
233
233
  title: M("switchWorkspace"),
234
234
  groups: [{
@@ -250,8 +250,8 @@ function D({ workspace: v, open: D, onClose: O, selection: k }) {
250
250
  items: He.map((e) => ({
251
251
  id: e.id,
252
252
  label: e.name,
253
- icon: e.shared ? /* @__PURE__ */ S(m, { className: E }) : /* @__PURE__ */ S(d, { className: E }),
254
- run: X(xe(v, e))
253
+ icon: e.shared ? /* @__PURE__ */ S(h, { className: E }) : /* @__PURE__ */ S(f, { className: E }),
254
+ run: X(be(v, e))
255
255
  }))
256
256
  }), t.push({
257
257
  id: "teams",
@@ -260,12 +260,12 @@ function D({ workspace: v, open: D, onClose: O, selection: k }) {
260
260
  id: e.id,
261
261
  label: e.name,
262
262
  hint: e.key,
263
- icon: /* @__PURE__ */ S(Se, {
263
+ icon: /* @__PURE__ */ S(ge, {
264
264
  icon: e.icon,
265
265
  color: e.color,
266
266
  name: e.name
267
267
  }),
268
- run: X(de(v, e.key, "issues"))
268
+ run: X(_e(v, e.key, "issues"))
269
269
  }))
270
270
  }), N?.controls?.length && t.push({
271
271
  id: "host",
@@ -286,25 +286,25 @@ function D({ workspace: v, open: D, onClose: O, selection: k }) {
286
286
  [
287
287
  "projects",
288
288
  M("projects"),
289
- f,
289
+ p,
290
290
  `teams/${t}/projects`
291
291
  ],
292
292
  [
293
293
  "areas",
294
294
  M("areas"),
295
- te,
295
+ ne,
296
296
  `teams/${t}/areas`
297
297
  ],
298
298
  [
299
299
  "decisions",
300
300
  M("decisions"),
301
- l,
301
+ u,
302
302
  `teams/${t}/decisions`
303
303
  ],
304
304
  ...e.cyclesEnabled ? [[
305
305
  "cycles",
306
306
  M("cycles"),
307
- ae,
307
+ oe,
308
308
  `cycles/${t}`
309
309
  ]] : []
310
310
  ].map(([t, n, r, i]) => ({
@@ -324,25 +324,25 @@ function D({ workspace: v, open: D, onClose: O, selection: k }) {
324
324
  items: B.filter((e) => !e.archivedAt).map((e) => ({
325
325
  id: e.id,
326
326
  label: e.title,
327
- icon: /* @__PURE__ */ S(_, {
327
+ icon: /* @__PURE__ */ S(g, {
328
328
  icon: e.icon,
329
329
  className: E
330
330
  }),
331
- run: X(h(v, e))
331
+ run: X(s(v, e))
332
332
  }))
333
333
  });
334
- let n = new Set(B.filter((t) => g(e, t.title) !== null).map((e) => e.id)), r = K.filter((e) => !e.archivedAt && !n.has(e.id));
334
+ let n = new Set(B.filter((t) => _(e, t.title) !== null).map((e) => e.id)), r = K.filter((e) => !e.archivedAt && !n.has(e.id));
335
335
  W && r.length > 0 && t.push({
336
336
  id: "doc-text",
337
337
  label: A("docText"),
338
338
  items: r.slice(0, 6).map((e) => ({
339
339
  id: `text-${e.id}`,
340
340
  label: e.title,
341
- icon: /* @__PURE__ */ S(_, {
341
+ icon: /* @__PURE__ */ S(g, {
342
342
  icon: e.icon,
343
343
  className: E
344
344
  }),
345
- run: X(h(v, e))
345
+ run: X(s(v, e))
346
346
  }))
347
347
  }), q.length > 0 && t.push({
348
348
  id: "sections",
@@ -353,11 +353,11 @@ function D({ workspace: v, open: D, onClose: O, selection: k }) {
353
353
  doc: e.title,
354
354
  heading: t
355
355
  }),
356
- icon: /* @__PURE__ */ S(_, {
356
+ icon: /* @__PURE__ */ S(g, {
357
357
  icon: e.icon,
358
358
  className: E
359
359
  }),
360
- run: X(`${h(v, e)}#${pe(t)}`)
360
+ run: X(`${s(v, e)}#${fe(t)}`)
361
361
  }))
362
362
  }), t.push({
363
363
  id: "knowledge",
@@ -365,7 +365,7 @@ function D({ workspace: v, open: D, onClose: O, selection: k }) {
365
365
  items: Be.filter((e) => !e.archivedAt).map((e) => ({
366
366
  id: `knowledge-${e.id}`,
367
367
  label: e.name,
368
- icon: /* @__PURE__ */ S(u, { className: E }),
368
+ icon: /* @__PURE__ */ S(d, { className: E }),
369
369
  run: X(`/${v}/knowledge?entry=${encodeURIComponent(e.id)}`)
370
370
  }))
371
371
  }), t.push({
@@ -386,7 +386,7 @@ function D({ workspace: v, open: D, onClose: O, selection: k }) {
386
386
  }
387
387
  return t;
388
388
  })(), Z = (() => {
389
- let e = U ? U.groups : qe, t = (e) => e.id === "issues" || e.id === "doc-text" || e.id === "sections", n = Ne(e.filter((e) => !t(e)), I), r = e.find((e) => e.id === "issues"), i = e.filter((e) => t(e) && e.id !== "issues"), [a, o] = _e(n, I);
389
+ let e = U ? U.groups : qe, t = (e) => e.id === "issues" || e.id === "doc-text" || e.id === "sections", n = Ne(e.filter((e) => !t(e)), I), r = e.find((e) => e.id === "issues"), i = e.filter((e) => t(e) && e.id !== "issues"), [a, o] = xe(n, I);
390
390
  return [
391
391
  ...a,
392
392
  ...r ? [r] : [],
@@ -417,7 +417,7 @@ function D({ workspace: v, open: D, onClose: O, selection: k }) {
417
417
  /* @__PURE__ */ C("div", {
418
418
  className: "flex h-12 shrink-0 items-center gap-2 border-b border-border px-3",
419
419
  children: [
420
- /* @__PURE__ */ S(se, { className: "size-4 shrink-0 text-muted-foreground" }),
420
+ /* @__PURE__ */ S(ce, { className: "size-4 shrink-0 text-muted-foreground" }),
421
421
  U && /* @__PURE__ */ S(Oe, {
422
422
  content: A("back"),
423
423
  children: /* @__PURE__ */ S("button", {
@@ -445,7 +445,7 @@ function D({ workspace: v, open: D, onClose: O, selection: k }) {
445
445
  /* @__PURE__ */ S(we, {
446
446
  variant: "ghost",
447
447
  size: "sm",
448
- icon: /* @__PURE__ */ S(ie, {}),
448
+ icon: /* @__PURE__ */ S(ae, {}),
449
449
  label: j("close"),
450
450
  onClick: O,
451
451
  className: "md:hidden"
@@ -469,9 +469,9 @@ function D({ workspace: v, open: D, onClose: O, selection: k }) {
469
469
  hint: e.checked || e.hint || e.page ? /* @__PURE__ */ C("span", {
470
470
  className: "flex items-center gap-2",
471
471
  children: [
472
- e.checked && /* @__PURE__ */ S(ne, { className: "size-3.5" }),
472
+ e.checked && /* @__PURE__ */ S(re, { className: "size-3.5" }),
473
473
  e.hint,
474
- e.page && /* @__PURE__ */ S(re, { className: "size-3.5" })
474
+ e.page && /* @__PURE__ */ S(ie, { className: "size-3.5" })
475
475
  ]
476
476
  }) : void 0,
477
477
  className: "h-9 md:h-8"