@parallelworks/tandem-web 0.138.0 → 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 +6 -6
  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
@@ -1,35 +1,36 @@
1
1
  import { api as e, unwrap as t } from "../../../api/client.js";
2
2
  import { Link as n, useNavigate as r } from "../../../lib/router.js";
3
3
  import { issuesQuery as i, meQuery as a, projectEventsQuery as o, projectOf as s, projectQuery as c, projectUpdatesQuery as l, projectsQuery as u, teamsQuery as d } from "../../../api/queries.js";
4
- import { AddIcon as f, AddUserIcon as p, CalendarIcon as m, LinkIcon as h, PriorityIcon as g, ProjectIcon as _, RemoveUserIcon as ee, RenameIcon as v, UsersIcon as y, usePriorityNames as b } from "../../../components/icons.js";
5
- import { copyItem as te, useLinkItems as x } from "../../../lib/menus.js";
6
- import { useTime as S } from "../../../lib/time.js";
7
- import { HealthIcon as C, ProgressBar as w, ProjectStatusIcon as T, healthOf as E, projectStatuses as D } from "../../../components/Planning.js";
8
- import { projectIssueFilter as O, tabs as ne } from "./_projectId.js";
9
- import { Route as k } from "./_projectId2.js";
10
- import { invalidateIssueViews as A } from "../../../api/mutations.js";
11
- import { usePeople as j } from "../../../lib/people.js";
12
- import { usePageTitle as re } from "../../../lib/pageTitle.js";
13
- import { useCan as ie } from "../../../lib/roles.js";
14
- import { useConfirm as ae } from "../../../lib/confirm.js";
15
- import { EntityIcon as oe } from "../../../components/EntityIcon.js";
16
- import { projectRef as M, projectsUnder as se } from "../../../lib/projects.js";
17
- import { Editor as ce } from "../../../components/Editor.js";
18
- import { FavoriteStar as le } from "../../../components/FavoriteStar.js";
19
- import { Timeline as N, TimelineItem as ue, activityIcon as P } from "../../../components/ActivityTimeline.js";
20
- import { useIssuePicker as F } from "../../../lib/issuePicker.js";
21
- import { IssueBreakdown as de } from "../../../components/IssueBreakdown.js";
22
- import { FollowButton as fe } from "../../../components/FollowButton.js";
23
- import { IconUpload as pe } from "../../../components/IconUpload.js";
24
- import { StatusGroups as I } from "../../../components/IssueGroup.js";
25
- import { ProjectAccessDialog as me } from "../../../components/ProjectAccess.js";
26
- import { Updates as he } from "../../../components/Updates.js";
27
- import { Avatar as L, AvatarGroup as R, Button as z, Card as ge, Combobox as B, DatePicker as _e, EmptyState as ve, ErrorText as V, Input as ye, PageHeader as be, Select as xe, Switch as Se, buttonClasses as H, menuDivider as U, useOpenMenu as Ce } from "@parallelworks/ui";
28
- import { useEffect as we, useState as W } from "react";
29
- import { useErrorMessage as G } from "@parallelworks/problem/react";
30
- import { useTranslations as K } from "use-intl";
31
- import { Fragment as q, jsx as J, jsxs as Y } from "react/jsx-runtime";
32
- import { useMutation as X, useQuery as Z, useQueryClient as Q, useSuspenseQuery as $ } from "@tanstack/react-query";
4
+ import { AddIcon as f, AddUserIcon as p, CalendarIcon as m, LinkIcon as h, PriorityIcon as g, ProjectIcon as _, RemoveUserIcon as v, RenameIcon as y, UsersIcon as b, usePriorityNames as x } from "../../../components/icons.js";
5
+ import { projectStatuses as S } from "../../../lib/projectStates.js";
6
+ import { projectIssueFilter as C, tabs as ee } from "./_projectId.js";
7
+ import { Route as w } from "./_projectId2.js";
8
+ import { copyItem as te, useLinkItems as T } from "../../../lib/menus.js";
9
+ import { invalidateIssueViews as E } from "../../../api/mutations.js";
10
+ import { useTime as D } from "../../../lib/time.js";
11
+ import { HealthIcon as O, ProgressBar as k, ProjectStatusIcon as A, healthOf as j } from "../../../components/Planning.js";
12
+ import { usePeople as M } from "../../../lib/people.js";
13
+ import { usePageTitle as ne } from "../../../lib/pageTitle.js";
14
+ import { useCan as re } from "../../../lib/roles.js";
15
+ import { useConfirm as ie } from "../../../lib/confirm.js";
16
+ import { EntityIcon as ae } from "../../../components/EntityIcon.js";
17
+ import { projectRef as N, projectsUnder as oe } from "../../../lib/projects.js";
18
+ import { Editor as se } from "../../../components/Editor.js";
19
+ import { FavoriteStar as ce } from "../../../components/FavoriteStar.js";
20
+ import { Timeline as P, TimelineItem as le, activityIcon as F } from "../../../components/ActivityTimeline.js";
21
+ import { useIssuePicker as I } from "../../../lib/issuePicker.js";
22
+ import { IssueBreakdown as ue } from "../../../components/IssueBreakdown.js";
23
+ import { FollowButton as de } from "../../../components/FollowButton.js";
24
+ import { IconUpload as fe } from "../../../components/IconUpload.js";
25
+ import { StatusGroups as L } from "../../../components/IssueGroup.js";
26
+ import { ProjectAccessDialog as pe } from "../../../components/ProjectAccess.js";
27
+ import { Updates as me } from "../../../components/Updates.js";
28
+ import { Avatar as R, AvatarGroup as z, Button as B, Card as he, Combobox as V, DatePicker as ge, EmptyState as _e, ErrorText as H, Input as ve, PageHeader as ye, Select as be, Switch as xe, buttonClasses as U, menuDivider as W, useOpenMenu as Se } from "@parallelworks/ui";
29
+ import { useEffect as Ce, useState as G } from "react";
30
+ import { useErrorMessage as K } from "@parallelworks/problem/react";
31
+ import { useTranslations as q } from "use-intl";
32
+ import { Fragment as J, jsx as Y, jsxs as X } from "react/jsx-runtime";
33
+ import { useMutation as Z, useQuery as Q, useQueryClient as $, useSuspenseQuery as we } from "@tanstack/react-query";
33
34
  import { MoreButton as Te } from "@parallelworks/ui/list";
34
35
  // src/routes/$workspace/projects/$projectId.tsx?tsr-split=component
35
36
  var Ee = [
@@ -38,9 +39,9 @@ var Ee = [
38
39
  "cycles"
39
40
  ];
40
41
  function De() {
41
- let { workspace: o, projectId: l } = k.useParams(), d = K("planning"), f = K("common"), p = G(), { data: m } = $(c(o, l)), h = M(m);
42
- re(m.name);
43
- let g = ie(o, "manage_projects", { project: m.id }), ee = ie(o, "delete_projects", { project: m.id }), v = Q(), y = r(), b = x(), { confirm: S, dialog: C } = ae(), [T, E] = W(!1), { data: D } = $(a), A = !!k.useSearch().own, { data: j } = Z(i(o, O(m.id, A))), { data: se = [] } = Z(u(o)), N = se.filter((e) => e.parentId === m.id), ue = A || N.length === 0 ? m.progress : m.treeProgress, [P, F] = W("assignees"), I = X({
42
+ let { workspace: o, projectId: l } = w.useParams(), d = q("planning"), f = q("common"), p = K(), { data: m } = we(c(o, l)), h = N(m);
43
+ ne(m.name);
44
+ let g = re(o, "manage_projects", { project: m.id }), v = re(o, "delete_projects", { project: m.id }), y = $(), b = r(), x = T(), { confirm: S, dialog: E } = ie(), [D, O] = G(!1), { data: A } = we(a), j = !!w.useSearch().own, { data: M } = Q(i(o, C(m.id, j))), { data: oe = [] } = Q(u(o)), P = oe.filter((e) => e.parentId === m.id), le = j || P.length === 0 ? m.progress : m.treeProgress, [F, I] = G("assignees"), L = Z({
44
45
  mutationFn: async (n) => t(await e.PATCH("/api/v1/workspaces/{workspace}/projects/{projectId}", {
45
46
  params: { path: {
46
47
  workspace: o,
@@ -48,25 +49,25 @@ function De() {
48
49
  } },
49
50
  body: n
50
51
  })),
51
- onSuccess: (e) => v.setQueryData(c(o, l).queryKey, s(e)),
52
+ onSuccess: (e) => y.setQueryData(c(o, l).queryKey, s(e)),
52
53
  onSettled: () => {
53
- v.invalidateQueries({ queryKey: u(o).queryKey });
54
+ y.invalidateQueries({ queryKey: u(o).queryKey });
54
55
  }
55
- }), he = X({
56
+ }), me = Z({
56
57
  mutationFn: async () => t(await e.DELETE("/api/v1/workspaces/{workspace}/projects/{projectId}", { params: { path: {
57
58
  workspace: o,
58
59
  projectId: l
59
60
  } } })),
60
61
  onSuccess: () => {
61
- v.invalidateQueries({ queryKey: ["workspace", o] }), y({
62
+ y.invalidateQueries({ queryKey: ["workspace", o] }), b({
62
63
  to: "/$workspace/projects",
63
64
  params: { workspace: o }
64
65
  });
65
66
  }
66
- }), L = () => [
67
+ }), R = () => [
67
68
  {
68
69
  label: d("viewIssues"),
69
- onClick: () => y({
70
+ onClick: () => b({
70
71
  to: "/$workspace/projects/$projectId",
71
72
  params: {
72
73
  workspace: o,
@@ -77,28 +78,28 @@ function De() {
77
78
  },
78
79
  ...g ? [{
79
80
  label: m.template ? d("stopTemplate") : d("useAsTemplate"),
80
- onClick: () => I.mutate({ template: !m.template })
81
+ onClick: () => L.mutate({ template: !m.template })
81
82
  }] : [],
82
- ...D?.mode === "platform" ? [] : [{
83
+ ...A?.mode === "platform" ? [] : [{
83
84
  label: d("manageAccess"),
84
- onClick: () => E(!0)
85
+ onClick: () => O(!0)
85
86
  }],
86
- U,
87
- ...b(`/${o}/projects/${h}`),
87
+ W,
88
+ ...x(`/${o}/projects/${h}`),
88
89
  te(f("copyName"), m.name),
89
- ...ee ? [U, {
90
+ ...v ? [W, {
90
91
  label: d("deleteProject"),
91
92
  destructive: !0,
92
93
  onClick: () => S({
93
94
  title: d("deleteProjectTitle", { name: m.name }),
94
95
  description: d("deleteProjectDescription"),
95
96
  confirmLabel: d("deleteProject"),
96
- onConfirm: () => he.mutateAsync()
97
+ onConfirm: () => me.mutateAsync()
97
98
  })
98
99
  }] : []
99
- ], R = k.useSearch().tab ?? "overview", z = j?.issues ?? [];
100
- return we(() => {
101
- l !== h && y({
100
+ ], z = w.useSearch().tab ?? "overview", B = M?.issues ?? [];
101
+ return Ce(() => {
102
+ l !== h && b({
102
103
  to: "/$workspace/projects/$projectId",
103
104
  params: {
104
105
  workspace: o,
@@ -108,120 +109,120 @@ function De() {
108
109
  replace: !0
109
110
  });
110
111
  }, [
111
- y,
112
+ b,
112
113
  o,
113
114
  l,
114
115
  h
115
- ]), /* @__PURE__ */ Y("div", {
116
+ ]), /* @__PURE__ */ X("div", {
116
117
  className: "flex h-full min-h-0 flex-col",
117
118
  children: [
118
- /* @__PURE__ */ J(be, {
119
+ /* @__PURE__ */ Y(ye, {
119
120
  heading: !1,
120
121
  breadcrumbs: [{
121
122
  label: d("projects"),
122
123
  href: `/${o}/projects`
123
124
  }, {
124
125
  label: m.name,
125
- icon: m.icon || m.color ? /* @__PURE__ */ J(oe, {
126
+ icon: m.icon || m.color ? /* @__PURE__ */ Y(ae, {
126
127
  icon: m.icon ?? "",
127
128
  color: m.color ?? "",
128
129
  name: m.name
129
- }) : /* @__PURE__ */ J(_, { className: "size-4 text-muted-foreground" })
130
+ }) : /* @__PURE__ */ Y(_, { className: "size-4 text-muted-foreground" })
130
131
  }],
131
- titleActions: /* @__PURE__ */ Y(q, { children: [
132
- /* @__PURE__ */ J(le, {
132
+ titleActions: /* @__PURE__ */ X(J, { children: [
133
+ /* @__PURE__ */ Y(ce, {
133
134
  workspace: o,
134
135
  kind: "project",
135
136
  target: m.id
136
137
  }),
137
- /* @__PURE__ */ J(fe, {
138
+ /* @__PURE__ */ Y(de, {
138
139
  workspace: o,
139
140
  project: m.id
140
141
  }),
141
- /* @__PURE__ */ J(Te, {
142
- items: L,
142
+ /* @__PURE__ */ Y(Te, {
143
+ items: R,
143
144
  label: f("moreActionsFor", { name: m.name }),
144
145
  visible: !0
145
146
  })
146
147
  ] }),
147
- actions: I.isPending && /* @__PURE__ */ J("span", {
148
+ actions: L.isPending && /* @__PURE__ */ Y("span", {
148
149
  className: "text-xs text-muted-foreground",
149
150
  children: f("saving")
150
151
  })
151
152
  }),
152
- /* @__PURE__ */ J("nav", {
153
+ /* @__PURE__ */ Y("nav", {
153
154
  "aria-label": d("projectSections"),
154
155
  className: "flex shrink-0 gap-1 border-b border-border px-4 py-2 md:px-5",
155
- children: ne.map((e) => /* @__PURE__ */ Y(n, {
156
+ children: ee.map((e) => /* @__PURE__ */ X(n, {
156
157
  to: "/$workspace/projects/$projectId",
157
158
  params: {
158
159
  workspace: o,
159
160
  projectId: l
160
161
  },
161
162
  search: e === "overview" ? {} : { tab: e },
162
- "aria-current": R === e ? "page" : void 0,
163
+ "aria-current": z === e ? "page" : void 0,
163
164
  activeOptions: { exact: !0 },
164
165
  className: "h-7 rounded-full px-3 text-xs leading-7 text-muted-foreground hover:bg-muted hover:text-foreground aria-[current=page]:bg-muted aria-[current=page]:text-foreground",
165
- children: [d(`projectTabs.${e}`), e === "issues" && z.length > 0 && /* @__PURE__ */ J("span", {
166
+ children: [d(`projectTabs.${e}`), e === "issues" && B.length > 0 && /* @__PURE__ */ Y("span", {
166
167
  className: "ml-1 tabular-nums",
167
- children: z.length
168
+ children: B.length
168
169
  })]
169
170
  }, e))
170
171
  }),
171
- /* @__PURE__ */ Y("div", {
172
+ /* @__PURE__ */ X("div", {
172
173
  className: "flex min-h-0 flex-1 flex-col overflow-y-auto xl:flex-row xl:overflow-hidden",
173
- children: [/* @__PURE__ */ Y("div", {
174
- className: R === "issues" ? "w-full min-w-0 pb-16 xl:flex-1 xl:overflow-y-auto" : "w-full min-w-0 px-4 pt-6 pb-16 md:px-8 md:pt-8 xl:flex-1 xl:overflow-y-auto",
174
+ children: [/* @__PURE__ */ X("div", {
175
+ className: z === "issues" ? "w-full min-w-0 pb-16 xl:flex-1 xl:overflow-y-auto" : "w-full min-w-0 px-4 pt-6 pb-16 md:px-8 md:pt-8 xl:flex-1 xl:overflow-y-auto",
175
176
  children: [
176
- R === "overview" && /* @__PURE__ */ Y(q, { children: [
177
- /* @__PURE__ */ Y("div", {
177
+ z === "overview" && /* @__PURE__ */ X(J, { children: [
178
+ /* @__PURE__ */ X("div", {
178
179
  className: "flex items-center gap-3",
179
- children: [/* @__PURE__ */ J(pe, {
180
+ children: [/* @__PURE__ */ Y(fe, {
180
181
  workspace: o,
181
182
  icon: m.icon ?? "",
182
183
  name: m.name,
183
- onChange: (e) => I.mutateAsync({
184
+ onChange: (e) => L.mutateAsync({
184
185
  icon: e,
185
186
  color: ""
186
187
  }),
187
188
  disabled: !g,
188
189
  size: 40
189
- }), /* @__PURE__ */ J(Oe, {
190
+ }), /* @__PURE__ */ Y(Oe, {
190
191
  project: m,
191
192
  canWrite: g,
192
- onSave: (e) => I.mutate({ name: e })
193
+ onSave: (e) => L.mutate({ name: e })
193
194
  })]
194
195
  }),
195
- /* @__PURE__ */ J(ke, {
196
+ /* @__PURE__ */ Y(ke, {
196
197
  project: m,
197
198
  canWrite: g,
198
- onSave: (e) => I.mutate({ summary: e })
199
+ onSave: (e) => L.mutate({ summary: e })
199
200
  }),
200
- /* @__PURE__ */ J(Ae, {
201
+ /* @__PURE__ */ Y(Ae, {
201
202
  workspace: o,
202
203
  project: m,
203
204
  canWrite: g,
204
- update: (e) => I.mutate(e)
205
+ update: (e) => L.mutate(e)
205
206
  }),
206
- /* @__PURE__ */ J(Me, {
207
+ /* @__PURE__ */ Y(Me, {
207
208
  workspace: o,
208
209
  project: m
209
210
  }),
210
- I.isError && /* @__PURE__ */ J(V, {
211
+ L.isError && /* @__PURE__ */ Y(H, {
211
212
  size: "md",
212
213
  className: "mt-2",
213
- children: p(I.error)
214
+ children: p(L.error)
214
215
  }),
215
- /* @__PURE__ */ Y("section", {
216
+ /* @__PURE__ */ X("section", {
216
217
  className: "mt-6",
217
218
  "aria-label": d("progressTitle"),
218
- children: [/* @__PURE__ */ J(w, { progress: ue }), N.length > 0 && /* @__PURE__ */ Y("div", {
219
+ children: [/* @__PURE__ */ Y(k, { progress: le }), P.length > 0 && /* @__PURE__ */ X("div", {
219
220
  className: "mt-2 flex items-center gap-2 text-xs text-muted-foreground",
220
- children: [/* @__PURE__ */ J(Se, {
221
+ children: [/* @__PURE__ */ Y(xe, {
221
222
  "aria-label": d("onlyOwnIssues"),
222
223
  size: "sm",
223
- checked: A,
224
- onCheckedChange: (e) => y({
224
+ checked: j,
225
+ onCheckedChange: (e) => b({
225
226
  to: "/$workspace/projects/$projectId",
226
227
  params: {
227
228
  workspace: o,
@@ -233,108 +234,108 @@ function De() {
233
234
  } : n,
234
235
  replace: !0
235
236
  })
236
- }), /* @__PURE__ */ J("span", {
237
+ }), /* @__PURE__ */ Y("span", {
237
238
  "aria-hidden": "true",
238
239
  children: d("onlyOwnIssues")
239
240
  })]
240
241
  })]
241
242
  }),
242
- /* @__PURE__ */ J(Pe, {
243
+ /* @__PURE__ */ Y(Pe, {
243
244
  workspace: o,
244
- projects: N
245
+ projects: P
245
246
  }),
246
- z.length > 0 && /* @__PURE__ */ J("section", {
247
+ B.length > 0 && /* @__PURE__ */ Y("section", {
247
248
  className: "mt-8 xl:hidden",
248
249
  "aria-label": d("issueBreakdown.label"),
249
- children: /* @__PURE__ */ J(de, {
250
+ children: /* @__PURE__ */ Y(ue, {
250
251
  workspace: o,
251
- issues: z,
252
+ issues: B,
252
253
  tabs: Ee,
253
- tab: P,
254
- onTabChange: F
254
+ tab: F,
255
+ onTabChange: I
255
256
  })
256
257
  }),
257
- /* @__PURE__ */ Y("section", {
258
+ /* @__PURE__ */ X("section", {
258
259
  className: "mt-8",
259
- children: [/* @__PURE__ */ J("h2", {
260
+ children: [/* @__PURE__ */ Y("h2", {
260
261
  className: "text-base font-semibold",
261
262
  children: f("description")
262
- }), /* @__PURE__ */ J(ge, {
263
+ }), /* @__PURE__ */ Y(he, {
263
264
  size: "fill",
264
265
  padding: "sm",
265
266
  className: "mt-2 min-h-16",
266
- children: /* @__PURE__ */ J(ce, {
267
+ children: /* @__PURE__ */ Y(se, {
267
268
  value: m.description,
268
269
  editable: g,
269
270
  placeholder: d("addDescription"),
270
271
  label: f("description"),
271
- onBlur: (e) => e !== m.description && I.mutate({ description: e }),
272
+ onBlur: (e) => e !== m.description && L.mutate({ description: e }),
272
273
  className: "min-h-12"
273
274
  }, m.updatedAt)
274
275
  })]
275
276
  }),
276
- /* @__PURE__ */ J(Fe, {
277
+ /* @__PURE__ */ Y(Fe, {
277
278
  workspace: o,
278
279
  project: m,
279
280
  canWrite: g
280
281
  }),
281
- /* @__PURE__ */ J(Re, {
282
+ /* @__PURE__ */ Y(Re, {
282
283
  workspace: o,
283
284
  projectId: m.id
284
285
  })
285
286
  ] }),
286
- R === "updates" && /* @__PURE__ */ J(Le, {
287
+ z === "updates" && /* @__PURE__ */ Y(Le, {
287
288
  workspace: o,
288
289
  project: m,
289
290
  canWrite: g
290
291
  }),
291
- R === "issues" && /* @__PURE__ */ J(Ie, {
292
+ z === "issues" && /* @__PURE__ */ Y(Ie, {
292
293
  workspace: o,
293
294
  project: m,
294
295
  canWrite: g
295
296
  })
296
297
  ]
297
- }), R !== "updates" && z.length > 0 && /* @__PURE__ */ J("aside", {
298
+ }), z !== "updates" && B.length > 0 && /* @__PURE__ */ Y("aside", {
298
299
  "aria-label": d("issueBreakdown.label"),
299
300
  className: "hidden w-80 shrink-0 overflow-y-auto border-l border-border px-4 py-6 xl:block",
300
- children: /* @__PURE__ */ J(de, {
301
+ children: /* @__PURE__ */ Y(ue, {
301
302
  workspace: o,
302
- issues: z,
303
+ issues: B,
303
304
  tabs: Ee,
304
- tab: P,
305
- onTabChange: F
305
+ tab: F,
306
+ onTabChange: I
306
307
  })
307
308
  })]
308
309
  }),
309
- C,
310
- T && /* @__PURE__ */ J(me, {
310
+ E,
311
+ D && /* @__PURE__ */ Y(pe, {
311
312
  workspace: o,
312
313
  project: m,
313
- onClose: () => E(!1)
314
+ onClose: () => O(!1)
314
315
  })
315
316
  ]
316
317
  });
317
318
  }
318
319
  function Oe({ project: e, canWrite: t, onSave: n }) {
319
- let r = K("planning"), [i, a] = W(e.name), [o, s] = W(e.name);
320
- return o !== e.name && (s(e.name), a(e.name)), t ? /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J("h1", {
320
+ let r = q("planning"), [i, a] = G(e.name), [o, s] = G(e.name);
321
+ return o !== e.name && (s(e.name), a(e.name)), t ? /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y("h1", {
321
322
  className: "sr-only",
322
323
  children: e.name
323
- }), /* @__PURE__ */ J("input", {
324
+ }), /* @__PURE__ */ Y("input", {
324
325
  value: i,
325
326
  onChange: (e) => a(e.target.value),
326
327
  onBlur: () => i.trim() && i !== e.name && n(i),
327
328
  onKeyDown: (e) => e.key === "Enter" && e.currentTarget.blur(),
328
329
  "aria-label": r("projectName"),
329
330
  className: "min-w-0 flex-1 rounded-md bg-transparent text-xl font-semibold tracking-tight outline-none focus-visible:outline-2 focus-visible:outline-primary"
330
- })] }) : /* @__PURE__ */ J("h1", {
331
+ })] }) : /* @__PURE__ */ Y("h1", {
331
332
  className: "text-xl font-semibold tracking-tight",
332
333
  children: e.name
333
334
  });
334
335
  }
335
336
  function ke({ project: e, canWrite: t, onSave: n }) {
336
- let r = K("planning"), [i, a] = W(e.summary ?? ""), [o, s] = W(e.summary ?? "");
337
- return o !== (e.summary ?? "") && (s(e.summary ?? ""), a(e.summary ?? "")), t ? /* @__PURE__ */ J("input", {
337
+ let r = q("planning"), [i, a] = G(e.summary ?? ""), [o, s] = G(e.summary ?? "");
338
+ return o !== (e.summary ?? "") && (s(e.summary ?? ""), a(e.summary ?? "")), t ? /* @__PURE__ */ Y("input", {
338
339
  value: i,
339
340
  onChange: (e) => a(e.target.value),
340
341
  onBlur: () => i !== (e.summary ?? "") && n(i),
@@ -343,55 +344,55 @@ function ke({ project: e, canWrite: t, onSave: n }) {
343
344
  "aria-label": r("summary"),
344
345
  placeholder: r("summaryPlaceholder"),
345
346
  className: "mt-1 w-full rounded-md bg-transparent text-sm text-muted-foreground outline-none placeholder:text-muted-foreground/60 focus-visible:text-foreground"
346
- }) : e.summary ? /* @__PURE__ */ J("p", {
347
+ }) : e.summary ? /* @__PURE__ */ Y("p", {
347
348
  className: "mt-1 text-sm text-muted-foreground",
348
349
  children: e.summary
349
350
  }) : null;
350
351
  }
351
352
  function Ae({ workspace: e, project: t, canWrite: n, update: r }) {
352
- let i = K("planning"), a = S(), { members: o, person: s } = j(e), { data: c = [] } = Z(d(e)), l = b(), [u, f] = W(null), p = t.lead ? s(t.lead) : void 0, h = (e, t, i) => {
353
- let o = /* @__PURE__ */ Y(q, { children: [
354
- /* @__PURE__ */ J(m, { className: "size-3.5 text-muted-foreground" }),
355
- /* @__PURE__ */ J("span", {
353
+ let i = q("planning"), a = D(), { members: o, person: s } = M(e), { data: c = [] } = Q(d(e)), l = x(), [u, f] = G(null), p = t.lead ? s(t.lead) : void 0, h = (e, t, i) => {
354
+ let o = /* @__PURE__ */ X(J, { children: [
355
+ /* @__PURE__ */ Y(m, { className: "size-3.5 text-muted-foreground" }),
356
+ /* @__PURE__ */ Y("span", {
356
357
  className: "text-muted-foreground",
357
358
  children: e
358
359
  }),
359
360
  t && a.day(t)
360
361
  ] });
361
- return n ? /* @__PURE__ */ J(_e, {
362
+ return n ? /* @__PURE__ */ Y(ge, {
362
363
  value: t ?? "",
363
364
  onValueChange: (e) => r({ [i]: e }),
364
365
  "aria-label": e,
365
- trigger: /* @__PURE__ */ J("button", {
366
+ trigger: /* @__PURE__ */ Y("button", {
366
367
  type: "button",
367
- className: H({ size: "sm" }),
368
+ className: U({ size: "sm" }),
368
369
  children: o
369
370
  })
370
- }) : /* @__PURE__ */ J("span", {
371
+ }) : /* @__PURE__ */ Y("span", {
371
372
  className: "inline-flex h-7 items-center gap-1.5 rounded-md border border-border bg-card px-2.5 text-xs font-medium",
372
373
  children: o
373
374
  });
374
375
  };
375
- return /* @__PURE__ */ Y("div", {
376
+ return /* @__PURE__ */ X("div", {
376
377
  className: "mt-3 flex flex-wrap items-center gap-1.5",
377
378
  children: [
378
- /* @__PURE__ */ J(xe, {
379
+ /* @__PURE__ */ Y(be, {
379
380
  "aria-label": i("statusLabel"),
380
381
  value: t.status,
381
382
  disabled: !n,
382
383
  onValueChange: (e) => e && r({ status: e }),
383
- items: D.map((e) => ({
384
+ items: S.map((e) => ({
384
385
  value: e,
385
386
  label: i(`status.${e}`),
386
- icon: /* @__PURE__ */ J(T, { status: e })
387
+ icon: /* @__PURE__ */ Y(A, { status: e })
387
388
  })),
388
- trigger: /* @__PURE__ */ Y("button", {
389
+ trigger: /* @__PURE__ */ X("button", {
389
390
  type: "button",
390
- className: H({ size: "sm" }),
391
- children: [/* @__PURE__ */ J(T, { status: t.status }), i(`status.${t.status}`)]
391
+ className: U({ size: "sm" }),
392
+ children: [/* @__PURE__ */ Y(A, { status: t.status }), i(`status.${t.status}`)]
392
393
  })
393
394
  }),
394
- /* @__PURE__ */ J(B, {
395
+ /* @__PURE__ */ Y(V, {
395
396
  "aria-label": i("lead"),
396
397
  value: t.lead ?? "",
397
398
  disabled: !n,
@@ -402,28 +403,28 @@ function Ae({ workspace: e, project: t, canWrite: n, update: r }) {
402
403
  }, ...o.map((e) => ({
403
404
  value: e.user.username,
404
405
  label: e.user.name,
405
- icon: /* @__PURE__ */ J(L, {
406
+ icon: /* @__PURE__ */ Y(R, {
406
407
  name: e.user.name,
407
408
  src: e.user.avatarUrl,
408
409
  size: "xs",
409
410
  decorative: !0
410
411
  })
411
412
  }))],
412
- trigger: /* @__PURE__ */ J("button", {
413
+ trigger: /* @__PURE__ */ Y("button", {
413
414
  type: "button",
414
- className: H({ size: "sm" }),
415
- children: p ? /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(L, {
415
+ className: U({ size: "sm" }),
416
+ children: p ? /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y(R, {
416
417
  name: p.name,
417
418
  src: p.avatarUrl,
418
419
  size: "xs",
419
420
  decorative: !0
420
- }), i("leadIs", { name: p.name })] }) : /* @__PURE__ */ J("span", {
421
+ }), i("leadIs", { name: p.name })] }) : /* @__PURE__ */ Y("span", {
421
422
  className: "text-muted-foreground",
422
423
  children: i("noLead")
423
424
  })
424
425
  })
425
426
  }),
426
- /* @__PURE__ */ J(xe, {
427
+ /* @__PURE__ */ Y(be, {
427
428
  "aria-label": i("priority"),
428
429
  value: String(t.priority),
429
430
  disabled: !n,
@@ -431,17 +432,17 @@ function Ae({ workspace: e, project: t, canWrite: n, update: r }) {
431
432
  items: l.map((e, t) => ({
432
433
  value: String(t),
433
434
  label: e,
434
- icon: /* @__PURE__ */ J(g, { priority: t })
435
+ icon: /* @__PURE__ */ Y(g, { priority: t })
435
436
  })),
436
- trigger: /* @__PURE__ */ Y("button", {
437
+ trigger: /* @__PURE__ */ X("button", {
437
438
  type: "button",
438
- className: H({ size: "sm" }),
439
- children: [/* @__PURE__ */ J(g, { priority: t.priority }), t.priority ? l[t.priority] : i("noPriority")]
439
+ className: U({ size: "sm" }),
440
+ children: [/* @__PURE__ */ Y(g, { priority: t.priority }), t.priority ? l[t.priority] : i("noPriority")]
440
441
  })
441
442
  }),
442
443
  h(i("startDate"), t.startDate, "startDate"),
443
444
  h(i("targetDate"), t.targetDate, "targetDate"),
444
- /* @__PURE__ */ J(B, {
445
+ /* @__PURE__ */ Y(V, {
445
446
  "aria-label": i("members"),
446
447
  open: u === "members",
447
448
  onOpenChange: (e) => f(e ? "members" : null),
@@ -450,7 +451,7 @@ function Ae({ workspace: e, project: t, canWrite: n, update: r }) {
450
451
  items: o.map((e) => ({
451
452
  value: e.user.username,
452
453
  label: e.user.name,
453
- icon: /* @__PURE__ */ J(L, {
454
+ icon: /* @__PURE__ */ Y(R, {
454
455
  name: e.user.name,
455
456
  src: e.user.avatarUrl,
456
457
  size: "xs",
@@ -460,29 +461,29 @@ function Ae({ workspace: e, project: t, canWrite: n, update: r }) {
460
461
  value: t.members,
461
462
  onValueChange: (e) => r({ members: e }),
462
463
  placeholder: i("members"),
463
- trigger: /* @__PURE__ */ Y("button", {
464
+ trigger: /* @__PURE__ */ X("button", {
464
465
  type: "button",
465
466
  disabled: !n,
466
- className: H({ size: "sm" }),
467
- children: [t.members.length > 0 ? /* @__PURE__ */ J(R, {
467
+ className: U({ size: "sm" }),
468
+ children: [t.members.length > 0 ? /* @__PURE__ */ Y(z, {
468
469
  size: "xs",
469
470
  max: 4,
470
471
  showOverflow: !1,
471
472
  children: t.members.map((e) => {
472
473
  let t = s(e);
473
- return /* @__PURE__ */ J(L, {
474
+ return /* @__PURE__ */ Y(R, {
474
475
  name: t.name,
475
476
  src: t.avatarUrl,
476
477
  decorative: !0
477
478
  }, e);
478
479
  })
479
- }) : /* @__PURE__ */ J(y, { className: "size-3.5 text-muted-foreground" }), /* @__PURE__ */ J("span", {
480
+ }) : /* @__PURE__ */ Y(b, { className: "size-3.5 text-muted-foreground" }), /* @__PURE__ */ Y("span", {
480
481
  className: t.members.length ? "" : "text-muted-foreground",
481
482
  children: t.members.length ? i("memberCount", { count: t.members.length }) : i("members")
482
483
  })]
483
484
  })
484
485
  }),
485
- /* @__PURE__ */ J(B, {
486
+ /* @__PURE__ */ Y(V, {
486
487
  "aria-label": i("teams"),
487
488
  open: u === "teams",
488
489
  onOpenChange: (e) => f(e ? "teams" : null),
@@ -492,7 +493,7 @@ function Ae({ workspace: e, project: t, canWrite: n, update: r }) {
492
493
  value: e.id,
493
494
  label: e.name,
494
495
  hint: e.key,
495
- icon: /* @__PURE__ */ J(oe, {
496
+ icon: /* @__PURE__ */ Y(ae, {
496
497
  icon: e.icon,
497
498
  color: e.color,
498
499
  name: e.name
@@ -501,23 +502,23 @@ function Ae({ workspace: e, project: t, canWrite: n, update: r }) {
501
502
  value: t.teamIds,
502
503
  onValueChange: (e) => r({ teamIds: e }),
503
504
  placeholder: i("teams"),
504
- trigger: /* @__PURE__ */ Y("button", {
505
+ trigger: /* @__PURE__ */ X("button", {
505
506
  type: "button",
506
507
  disabled: !n,
507
- className: H({ size: "sm" }),
508
- children: [/* @__PURE__ */ J(y, { className: "size-3.5 text-muted-foreground" }), /* @__PURE__ */ J("span", {
508
+ className: U({ size: "sm" }),
509
+ children: [/* @__PURE__ */ Y(b, { className: "size-3.5 text-muted-foreground" }), /* @__PURE__ */ Y("span", {
509
510
  className: t.teamIds.length ? "" : "text-muted-foreground",
510
511
  children: t.teamIds.length ? c.filter((e) => t.teamIds.includes(e.id)).map((e) => e.key).join(", ") : i("teams")
511
512
  })]
512
513
  })
513
514
  }),
514
- /* @__PURE__ */ J(Ne, {
515
+ /* @__PURE__ */ Y(Ne, {
515
516
  workspace: e,
516
517
  project: t,
517
518
  canWrite: n,
518
519
  onChange: (e) => r({ parentId: e })
519
520
  }),
520
- /* @__PURE__ */ J(je, {
521
+ /* @__PURE__ */ Y(je, {
521
522
  workspace: e,
522
523
  project: t,
523
524
  canWrite: n,
@@ -527,10 +528,10 @@ function Ae({ workspace: e, project: t, canWrite: n, update: r }) {
527
528
  });
528
529
  }
529
530
  function je({ workspace: e, project: t, canWrite: n, onChange: r }) {
530
- let i = K("planning"), { data: a = [] } = Z(u(e)), o = /* @__PURE__ */ new Set(), s = (e) => {
531
+ let i = q("planning"), { data: a = [] } = Q(u(e)), o = /* @__PURE__ */ new Set(), s = (e) => {
531
532
  for (let t of a) t.blockedBy.includes(e) && !o.has(t.id) && (o.add(t.id), s(t.id));
532
533
  };
533
- return s(t.id), /* @__PURE__ */ J(B, {
534
+ return s(t.id), /* @__PURE__ */ Y(V, {
534
535
  multiple: !0,
535
536
  disabled: !n,
536
537
  items: a.filter((e) => e.id !== t.id && !o.has(e.id) && !e.template).map((e) => ({
@@ -541,11 +542,11 @@ function je({ workspace: e, project: t, canWrite: n, onChange: r }) {
541
542
  onValueChange: r,
542
543
  placeholder: i("waitsOn"),
543
544
  "aria-label": i("waitsOn"),
544
- trigger: /* @__PURE__ */ Y("button", {
545
+ trigger: /* @__PURE__ */ X("button", {
545
546
  type: "button",
546
547
  disabled: !n,
547
- className: H({ size: "sm" }),
548
- children: [/* @__PURE__ */ J(h, { className: "size-3.5 text-muted-foreground" }), /* @__PURE__ */ J("span", {
548
+ className: U({ size: "sm" }),
549
+ children: [/* @__PURE__ */ Y(h, { className: "size-3.5 text-muted-foreground" }), /* @__PURE__ */ Y("span", {
549
550
  className: t.blockedBy.length ? "" : "text-muted-foreground",
550
551
  children: t.blockedBy.length ? i("waitsOnCount", { count: t.blockedBy.length }) : i("waitsOn")
551
552
  })]
@@ -553,31 +554,31 @@ function je({ workspace: e, project: t, canWrite: n, onChange: r }) {
553
554
  });
554
555
  }
555
556
  function Me({ workspace: e, project: t }) {
556
- let r = K("planning"), i = S(), { data: a = [] } = Z(u(e)), o = (e) => a.filter((t) => e.includes(t.id)), s = o(t.blockedBy), c = o(t.blocks);
557
+ let r = q("planning"), i = D(), { data: a = [] } = Q(u(e)), o = (e) => a.filter((t) => e.includes(t.id)), s = o(t.blockedBy), c = o(t.blocks);
557
558
  if (s.length === 0 && c.length === 0) return null;
558
- let l = t.targetDate ? s.filter((e) => e.targetDate && e.targetDate > (t.targetDate ?? "")) : [], d = (t) => /* @__PURE__ */ J(n, {
559
+ let l = t.targetDate ? s.filter((e) => e.targetDate && e.targetDate > (t.targetDate ?? "")) : [], d = (t) => /* @__PURE__ */ Y(n, {
559
560
  to: "/$workspace/projects/$projectId",
560
561
  params: {
561
562
  workspace: e,
562
- projectId: M(t)
563
+ projectId: N(t)
563
564
  },
564
565
  className: "font-medium hover:underline",
565
566
  children: t.name
566
- }, t.id), f = (e) => e.flatMap((e, t) => t === 0 ? [d(e)] : [/* @__PURE__ */ J("span", { children: ", " }, `${e.id},`), d(e)]);
567
- return /* @__PURE__ */ Y("div", {
567
+ }, t.id), f = (e) => e.flatMap((e, t) => t === 0 ? [d(e)] : [/* @__PURE__ */ Y("span", { children: ", " }, `${e.id},`), d(e)]);
568
+ return /* @__PURE__ */ X("div", {
568
569
  className: "mt-3 space-y-1 text-xs text-muted-foreground",
569
570
  children: [
570
- s.length > 0 && /* @__PURE__ */ Y("p", { children: [
571
+ s.length > 0 && /* @__PURE__ */ X("p", { children: [
571
572
  r("waitsOnLabel"),
572
573
  " ",
573
574
  f(s)
574
575
  ] }),
575
- c.length > 0 && /* @__PURE__ */ Y("p", { children: [
576
+ c.length > 0 && /* @__PURE__ */ X("p", { children: [
576
577
  r("blocksLabel"),
577
578
  " ",
578
579
  f(c)
579
580
  ] }),
580
- l.map((e) => /* @__PURE__ */ J("p", {
581
+ l.map((e) => /* @__PURE__ */ Y("p", {
581
582
  role: "status",
582
583
  className: "text-warning",
583
584
  children: r("dueBeforeBlocker", {
@@ -590,8 +591,8 @@ function Me({ workspace: e, project: t }) {
590
591
  });
591
592
  }
592
593
  function Ne({ workspace: e, project: t, canWrite: n, onChange: r }) {
593
- let i = K("planning"), { data: a = [] } = Z(u(e)), o = new Set(se(a, t.id).map((e) => e.id)), s = a.find((e) => e.id === t.parentId);
594
- return /* @__PURE__ */ J(B, {
594
+ let i = q("planning"), { data: a = [] } = Q(u(e)), o = new Set(oe(a, t.id).map((e) => e.id)), s = a.find((e) => e.id === t.parentId);
595
+ return /* @__PURE__ */ Y(V, {
595
596
  disabled: !n,
596
597
  items: [{
597
598
  value: "",
@@ -604,11 +605,11 @@ function Ne({ workspace: e, project: t, canWrite: n, onChange: r }) {
604
605
  onValueChange: (e) => r(e ?? ""),
605
606
  placeholder: i("parentProject"),
606
607
  "aria-label": i("parentProject"),
607
- trigger: /* @__PURE__ */ Y("button", {
608
+ trigger: /* @__PURE__ */ X("button", {
608
609
  type: "button",
609
610
  disabled: !n,
610
- className: H({ size: "sm" }),
611
- children: [/* @__PURE__ */ J(_, { className: "size-3.5 text-muted-foreground" }), /* @__PURE__ */ J("span", {
611
+ className: U({ size: "sm" }),
612
+ children: [/* @__PURE__ */ Y(_, { className: "size-3.5 text-muted-foreground" }), /* @__PURE__ */ Y("span", {
612
613
  className: s ? "" : "text-muted-foreground",
613
614
  children: s ? i("underProject", { name: s.name }) : i("parentProject")
614
615
  })]
@@ -616,45 +617,45 @@ function Ne({ workspace: e, project: t, canWrite: n, onChange: r }) {
616
617
  });
617
618
  }
618
619
  function Pe({ workspace: e, projects: t }) {
619
- let r = K("planning"), i = S(), { person: a } = j(e);
620
- return t.length === 0 ? null : /* @__PURE__ */ Y("section", {
620
+ let r = q("planning"), i = D(), { person: a } = M(e);
621
+ return t.length === 0 ? null : /* @__PURE__ */ X("section", {
621
622
  className: "mt-8",
622
- children: [/* @__PURE__ */ J("h2", {
623
+ children: [/* @__PURE__ */ Y("h2", {
623
624
  className: "text-base font-semibold",
624
625
  children: r("subProjects")
625
- }), /* @__PURE__ */ J("ul", {
626
+ }), /* @__PURE__ */ Y("ul", {
626
627
  className: "mt-2 divide-y divide-border rounded-lg border border-border",
627
628
  children: t.map((t) => {
628
- let o = E(t), s = t.lead ? a(t.lead) : void 0;
629
- return /* @__PURE__ */ J("li", { children: /* @__PURE__ */ Y(n, {
629
+ let o = j(t), s = t.lead ? a(t.lead) : void 0;
630
+ return /* @__PURE__ */ Y("li", { children: /* @__PURE__ */ X(n, {
630
631
  to: "/$workspace/projects/$projectId",
631
632
  params: {
632
633
  workspace: e,
633
- projectId: M(t)
634
+ projectId: N(t)
634
635
  },
635
636
  className: "flex flex-wrap items-center gap-x-3 gap-y-1 px-3 py-2.5 text-sm hover:bg-muted/60",
636
637
  children: [
637
- /* @__PURE__ */ J(T, { status: t.status }),
638
- /* @__PURE__ */ J("span", {
638
+ /* @__PURE__ */ Y(A, { status: t.status }),
639
+ /* @__PURE__ */ Y("span", {
639
640
  className: "min-w-0 flex-1 truncate font-medium",
640
641
  children: t.name
641
642
  }),
642
- /* @__PURE__ */ Y("span", {
643
+ /* @__PURE__ */ X("span", {
643
644
  className: "flex items-center gap-1.5 text-xs text-muted-foreground",
644
- children: [/* @__PURE__ */ J(C, { state: o }), r(`health.${o}`)]
645
+ children: [/* @__PURE__ */ Y(O, { state: o }), r(`health.${o}`)]
645
646
  }),
646
- s && /* @__PURE__ */ J(L, {
647
+ s && /* @__PURE__ */ Y(R, {
647
648
  name: s.name,
648
649
  src: s.avatarUrl,
649
650
  size: "xs"
650
651
  }),
651
- /* @__PURE__ */ J("span", {
652
+ /* @__PURE__ */ Y("span", {
652
653
  className: "w-20 text-xs text-muted-foreground tabular-nums",
653
654
  children: t.targetDate ? i.day(t.targetDate) : ""
654
655
  }),
655
- /* @__PURE__ */ J("span", {
656
+ /* @__PURE__ */ Y("span", {
656
657
  className: "w-28",
657
- children: /* @__PURE__ */ J(w, {
658
+ children: /* @__PURE__ */ Y(k, {
658
659
  progress: t.treeProgress,
659
660
  compact: !0
660
661
  })
@@ -666,18 +667,18 @@ function Pe({ workspace: e, projects: t }) {
666
667
  });
667
668
  }
668
669
  function Fe({ workspace: n, project: r, canWrite: i }) {
669
- let a = K("planning"), o = K("common"), s = G(), c = S(), l = Q(), u = Ce(), [d, p] = W(!1), [m, h] = W(""), [g, _] = W(""), [ee, v] = W(null), y = {
670
+ let a = q("planning"), o = q("common"), s = K(), c = D(), l = $(), u = Se(), [d, p] = G(!1), [m, h] = G(""), [g, _] = G(""), [v, y] = G(null), b = {
670
671
  workspace: n,
671
672
  projectId: r.id
672
- }, b = () => {
673
+ }, x = () => {
673
674
  l.invalidateQueries({ queryKey: [
674
675
  "workspace",
675
676
  n,
676
677
  "projects"
677
- ] }), A(l, n);
678
- }, x = X({
678
+ ] }), E(l, n);
679
+ }, S = Z({
679
680
  mutationFn: async () => t(await e.POST("/api/v1/workspaces/{workspace}/projects/{projectId}/milestones", {
680
- params: { path: y },
681
+ params: { path: b },
681
682
  body: {
682
683
  name: m,
683
684
  ...g && { targetDate: g }
@@ -686,26 +687,26 @@ function Fe({ workspace: n, project: r, canWrite: i }) {
686
687
  onSuccess: () => {
687
688
  h(""), _(""), p(!1);
688
689
  },
689
- onSettled: b
690
- }), C = X({
690
+ onSettled: x
691
+ }), C = Z({
691
692
  mutationFn: async ({ id: n, ...r }) => t(await e.PATCH("/api/v1/workspaces/{workspace}/projects/{projectId}/milestones/{milestoneId}", {
692
693
  params: { path: {
693
- ...y,
694
+ ...b,
694
695
  milestoneId: n
695
696
  } },
696
697
  body: r
697
698
  })),
698
- onSettled: b
699
- }), T = X({
699
+ onSettled: x
700
+ }), ee = Z({
700
701
  mutationFn: async (n) => t(await e.DELETE("/api/v1/workspaces/{workspace}/projects/{projectId}/milestones/{milestoneId}", { params: { path: {
701
- ...y,
702
+ ...b,
702
703
  milestoneId: n
703
704
  } } })),
704
- onSettled: b
705
- }), E = r.milestones, D = (e, t) => i ? [
705
+ onSettled: x
706
+ }), w = r.milestones, T = (e, t) => i ? [
706
707
  {
707
708
  label: a("rename"),
708
- onClick: () => v(e.id)
709
+ onClick: () => y(e.id)
709
710
  },
710
711
  {
711
712
  label: a("moveUp"),
@@ -717,48 +718,48 @@ function Fe({ workspace: n, project: r, canWrite: i }) {
717
718
  },
718
719
  {
719
720
  label: a("moveDown"),
720
- disabled: t === E.length - 1,
721
+ disabled: t === w.length - 1,
721
722
  onClick: () => C.mutate({
722
723
  id: e.id,
723
724
  position: t + 1
724
725
  })
725
726
  },
726
- U,
727
+ W,
727
728
  {
728
729
  label: o("delete"),
729
730
  destructive: !0,
730
- onClick: () => T.mutate(e.id)
731
+ onClick: () => ee.mutate(e.id)
731
732
  }
732
- ] : [te(o("copyName"), e.name)], O = x.error ?? C.error ?? T.error;
733
- return /* @__PURE__ */ Y("section", {
733
+ ] : [te(o("copyName"), e.name)], O = S.error ?? C.error ?? ee.error;
734
+ return /* @__PURE__ */ X("section", {
734
735
  className: "mt-10",
735
736
  children: [
736
- /* @__PURE__ */ Y("div", {
737
+ /* @__PURE__ */ X("div", {
737
738
  className: "flex items-center gap-2",
738
- children: [/* @__PURE__ */ J("h2", {
739
+ children: [/* @__PURE__ */ Y("h2", {
739
740
  className: "text-base font-semibold",
740
741
  children: a("milestones")
741
- }), i && !d && /* @__PURE__ */ Y(z, {
742
+ }), i && !d && /* @__PURE__ */ X(B, {
742
743
  type: "button",
743
744
  size: "sm",
744
745
  onClick: () => p(!0),
745
746
  className: "ml-auto",
746
- children: [/* @__PURE__ */ J(f, { className: "size-3.5" }), a("addMilestone")]
747
+ children: [/* @__PURE__ */ Y(f, { className: "size-3.5" }), a("addMilestone")]
747
748
  })]
748
749
  }),
749
- /* @__PURE__ */ Y(ge, {
750
+ /* @__PURE__ */ X(he, {
750
751
  size: "fill",
751
752
  padding: "none",
752
753
  divided: !0,
753
754
  interactive: !1,
754
- render: /* @__PURE__ */ J("ul", {}),
755
+ render: /* @__PURE__ */ Y("ul", {}),
755
756
  className: "mt-3",
756
757
  children: [
757
- E.map((e, t) => /* @__PURE__ */ Y("li", {
758
- onContextMenu: (n) => u(n, D(e, t)),
758
+ w.map((e, t) => /* @__PURE__ */ X("li", {
759
+ onContextMenu: (n) => u(n, T(e, t)),
759
760
  className: "flex flex-wrap items-center gap-x-4 gap-y-1 py-2 pr-2 pl-3 md:flex-nowrap",
760
761
  children: [
761
- ee === e.id ? /* @__PURE__ */ J(ye, {
762
+ v === e.id ? /* @__PURE__ */ Y(ve, {
762
763
  autoFocus: !0,
763
764
  defaultValue: e.name,
764
765
  "aria-label": a("milestoneName"),
@@ -767,45 +768,45 @@ function Fe({ workspace: n, project: r, canWrite: i }) {
767
768
  n && n !== e.name && C.mutate({
768
769
  id: e.id,
769
770
  name: n
770
- }), v(null);
771
+ }), y(null);
771
772
  },
772
773
  onKeyDown: (e) => {
773
- e.key === "Enter" && e.currentTarget.blur(), e.key === "Escape" && v(null);
774
+ e.key === "Enter" && e.currentTarget.blur(), e.key === "Escape" && y(null);
774
775
  },
775
776
  size: "sm",
776
777
  className: "min-w-0 flex-1"
777
- }) : /* @__PURE__ */ J("span", {
778
+ }) : /* @__PURE__ */ Y("span", {
778
779
  className: "min-w-0 flex-1 basis-full truncate text-sm font-medium md:basis-auto",
779
780
  children: e.name
780
781
  }),
781
- /* @__PURE__ */ J("span", {
782
+ /* @__PURE__ */ Y("span", {
782
783
  className: "w-24 shrink-0 text-xs text-muted-foreground",
783
784
  children: e.targetDate && c.day(e.targetDate)
784
785
  }),
785
- /* @__PURE__ */ J("span", {
786
+ /* @__PURE__ */ Y("span", {
786
787
  className: "w-44 shrink-0",
787
- children: /* @__PURE__ */ J(w, {
788
+ children: /* @__PURE__ */ Y(k, {
788
789
  progress: e.progress,
789
790
  compact: !0
790
791
  })
791
792
  }),
792
- /* @__PURE__ */ J(Te, {
793
- items: () => D(e, t),
793
+ /* @__PURE__ */ Y(Te, {
794
+ items: () => T(e, t),
794
795
  label: o("moreActionsFor", { name: e.name })
795
796
  })
796
797
  ]
797
798
  }, e.id)),
798
- E.length === 0 && !d && /* @__PURE__ */ J("li", { children: /* @__PURE__ */ J(ve, {
799
+ w.length === 0 && !d && /* @__PURE__ */ Y("li", { children: /* @__PURE__ */ Y(_e, {
799
800
  variant: "bare",
800
801
  title: a("noMilestones")
801
802
  }) }),
802
- d && /* @__PURE__ */ J("li", { children: /* @__PURE__ */ Y("form", {
803
+ d && /* @__PURE__ */ Y("li", { children: /* @__PURE__ */ X("form", {
803
804
  className: "flex flex-wrap items-center gap-2 px-3 py-2",
804
805
  onSubmit: (e) => {
805
- e.preventDefault(), m.trim() && x.mutate();
806
+ e.preventDefault(), m.trim() && S.mutate();
806
807
  },
807
808
  children: [
808
- /* @__PURE__ */ J(ye, {
809
+ /* @__PURE__ */ Y(ve, {
809
810
  autoFocus: !0,
810
811
  value: m,
811
812
  onChange: (e) => h(e.target.value),
@@ -813,20 +814,20 @@ function Fe({ workspace: n, project: r, canWrite: i }) {
813
814
  "aria-label": a("milestoneName"),
814
815
  className: "min-w-0 flex-1"
815
816
  }),
816
- /* @__PURE__ */ J(_e, {
817
+ /* @__PURE__ */ Y(ge, {
817
818
  value: g,
818
819
  onValueChange: _,
819
820
  "aria-label": a("targetDate"),
820
821
  className: "w-auto"
821
822
  }),
822
- /* @__PURE__ */ J(z, {
823
+ /* @__PURE__ */ Y(B, {
823
824
  type: "submit",
824
825
  variant: "primary",
825
826
  disabled: !m.trim(),
826
- loading: x.isPending,
827
+ loading: S.isPending,
827
828
  children: a("addMilestone")
828
829
  }),
829
- /* @__PURE__ */ J(z, {
830
+ /* @__PURE__ */ Y(B, {
830
831
  type: "button",
831
832
  variant: "ghost",
832
833
  onClick: () => p(!1),
@@ -836,7 +837,7 @@ function Fe({ workspace: n, project: r, canWrite: i }) {
836
837
  }) })
837
838
  ]
838
839
  }),
839
- O && /* @__PURE__ */ J(V, {
840
+ O && /* @__PURE__ */ Y(H, {
840
841
  size: "md",
841
842
  className: "mt-2",
842
843
  children: s(O)
@@ -845,7 +846,7 @@ function Fe({ workspace: n, project: r, canWrite: i }) {
845
846
  });
846
847
  }
847
848
  function Ie({ workspace: n, project: r, canWrite: a }) {
848
- let o = K("planning"), s = G(), c = Q(), l = !!k.useSearch().own, { data: u } = $(i(n, O(r.id, l))), d = F(n, (e) => e.project?.id !== r.id), p = u.issues, m = X({
849
+ let o = q("planning"), s = K(), c = $(), l = !!w.useSearch().own, { data: u } = we(i(n, C(r.id, l))), d = I(n, (e) => e.project?.id !== r.id), p = u.issues, m = Z({
849
850
  mutationFn: async (i) => t(await e.PATCH("/api/v1/workspaces/{workspace}/issues/{identifier}", {
850
851
  params: { path: {
851
852
  workspace: n,
@@ -853,36 +854,36 @@ function Ie({ workspace: n, project: r, canWrite: a }) {
853
854
  } },
854
855
  body: { projectId: r.id }
855
856
  })),
856
- onSettled: (e, t, r) => A(c, n, r)
857
+ onSettled: (e, t, r) => E(c, n, r)
857
858
  });
858
- return /* @__PURE__ */ Y("section", {
859
+ return /* @__PURE__ */ X("section", {
859
860
  "aria-label": o("issues"),
860
861
  children: [
861
- a && /* @__PURE__ */ J("div", {
862
+ a && /* @__PURE__ */ Y("div", {
862
863
  className: "flex min-h-11 items-center justify-end border-b border-border px-4 py-2 md:px-5",
863
- children: /* @__PURE__ */ J(B, {
864
+ children: /* @__PURE__ */ Y(V, {
864
865
  "aria-label": o("addIssues"),
865
866
  align: "end",
866
867
  ...d,
867
868
  value: null,
868
869
  onValueChange: (e) => e !== null && m.mutate(e),
869
870
  placeholder: o("findIssue"),
870
- trigger: /* @__PURE__ */ Y(z, {
871
+ trigger: /* @__PURE__ */ X(B, {
871
872
  type: "button",
872
873
  size: "sm",
873
- children: [/* @__PURE__ */ J(f, { className: "size-3.5" }), o("addIssues")]
874
+ children: [/* @__PURE__ */ Y(f, { className: "size-3.5" }), o("addIssues")]
874
875
  })
875
876
  })
876
877
  }),
877
- m.isError && /* @__PURE__ */ J(V, {
878
+ m.isError && /* @__PURE__ */ Y(H, {
878
879
  size: "md",
879
880
  className: "px-4 pt-2 md:px-5",
880
881
  children: s(m.error)
881
882
  }),
882
- p.length === 0 ? /* @__PURE__ */ J(ve, {
883
+ p.length === 0 ? /* @__PURE__ */ Y(_e, {
883
884
  title: o("noIssuesInProject"),
884
885
  className: "mt-6"
885
- }) : /* @__PURE__ */ J(I, {
886
+ }) : /* @__PURE__ */ Y(L, {
886
887
  workspace: n,
887
888
  issues: p
888
889
  })
@@ -890,7 +891,7 @@ function Ie({ workspace: n, project: r, canWrite: a }) {
890
891
  });
891
892
  }
892
893
  function Le({ workspace: n, project: r, canWrite: i }) {
893
- let a = K("planning"), o = Q(), { data: s = [] } = Z(l(n, r.id)), c = X({
894
+ let a = q("planning"), o = $(), { data: s = [] } = Q(l(n, r.id)), c = Z({
894
895
  mutationFn: async ({ health: i, body: a }) => t(await e.POST("/api/v1/workspaces/{workspace}/projects/{projectId}/updates", {
895
896
  params: { path: {
896
897
  workspace: n,
@@ -906,7 +907,7 @@ function Le({ workspace: n, project: r, canWrite: i }) {
906
907
  n,
907
908
  "projects"
908
909
  ] })
909
- }), u = X({
910
+ }), u = Z({
910
911
  mutationFn: async (i) => t(await e.DELETE("/api/v1/workspaces/{workspace}/projects/{projectId}/updates/{updateId}", { params: { path: {
911
912
  workspace: n,
912
913
  projectId: r.id,
@@ -918,9 +919,9 @@ function Le({ workspace: n, project: r, canWrite: i }) {
918
919
  "projects"
919
920
  ] })
920
921
  });
921
- return /* @__PURE__ */ J(he, {
922
+ return /* @__PURE__ */ Y(me, {
922
923
  workspace: n,
923
- state: E(r),
924
+ state: j(r),
924
925
  health: r.health,
925
926
  updates: s,
926
927
  canWrite: i,
@@ -930,16 +931,16 @@ function Le({ workspace: n, project: r, canWrite: i }) {
930
931
  });
931
932
  }
932
933
  function Re({ workspace: e, projectId: t }) {
933
- let n = K("planning.activity"), r = K("planning"), i = K("planning.health"), a = S(), s = b(), { data: c = [] } = Z(o(e, t)), { actorName: l, person: u } = j(e);
934
+ let n = q("planning.activity"), r = q("planning"), i = q("planning.health"), a = D(), s = x(), { data: c = [] } = Q(o(e, t)), { actorName: l, person: u } = M(e);
934
935
  if (c.length === 0) return null;
935
936
  let d = (e) => {
936
937
  let t = {
937
938
  actor: l(e.actor),
938
- b: (e) => /* @__PURE__ */ J("span", {
939
+ b: (e) => /* @__PURE__ */ Y("span", {
939
940
  className: "font-medium text-foreground",
940
941
  children: e
941
942
  })
942
- }, o = e.data, c = P(e.type, e.data);
943
+ }, o = e.data, c = F(e.type, e.data);
943
944
  switch (e.type) {
944
945
  case "project.created": return [{
945
946
  icon: c,
@@ -985,40 +986,40 @@ function Re({ workspace: e, projectId: t }) {
985
986
  }];
986
987
  let f = [], h = (e) => e ? a.day(String(e)) : "";
987
988
  return d.name && f.push({
988
- icon: /* @__PURE__ */ J(v, {}),
989
+ icon: /* @__PURE__ */ Y(y, {}),
989
990
  text: n.rich("renamed", {
990
991
  ...t,
991
992
  from: String(d.name.from)
992
993
  })
993
994
  }), d.status && f.push({
994
- icon: /* @__PURE__ */ J(T, { status: d.status.to }),
995
+ icon: /* @__PURE__ */ Y(A, { status: d.status.to }),
995
996
  text: n.rich("status", {
996
997
  ...t,
997
998
  status: r(`status.${d.status.to}`)
998
999
  })
999
1000
  }), d.priority && f.push({
1000
- icon: /* @__PURE__ */ J(g, { priority: Number(d.priority.to) }),
1001
+ icon: /* @__PURE__ */ Y(g, { priority: Number(d.priority.to) }),
1001
1002
  text: n.rich("priority", {
1002
1003
  ...t,
1003
1004
  priority: s[Number(d.priority.to)] ?? ""
1004
1005
  })
1005
1006
  }), d.lead && f.push(d.lead.to ? {
1006
- icon: /* @__PURE__ */ J(p, {}),
1007
+ icon: /* @__PURE__ */ Y(p, {}),
1007
1008
  text: n.rich("lead", {
1008
1009
  ...t,
1009
1010
  lead: u(String(d.lead.to)).name
1010
1011
  })
1011
1012
  } : {
1012
- icon: /* @__PURE__ */ J(ee, {}),
1013
+ icon: /* @__PURE__ */ Y(v, {}),
1013
1014
  text: n.rich("leadRemoved", t)
1014
1015
  }), d.startDate && f.push({
1015
- icon: /* @__PURE__ */ J(m, {}),
1016
+ icon: /* @__PURE__ */ Y(m, {}),
1016
1017
  text: d.startDate.to ? n.rich("startDate", {
1017
1018
  ...t,
1018
1019
  date: h(d.startDate.to)
1019
1020
  }) : n.rich("startDateRemoved", t)
1020
1021
  }), d.targetDate && f.push({
1021
- icon: /* @__PURE__ */ J(m, {}),
1022
+ icon: /* @__PURE__ */ Y(m, {}),
1022
1023
  text: d.targetDate.to ? n.rich("targetDate", {
1023
1024
  ...t,
1024
1025
  date: h(d.targetDate.to)
@@ -1028,15 +1029,15 @@ function Re({ workspace: e, projectId: t }) {
1028
1029
  text: n.rich("updated", t)
1029
1030
  }];
1030
1031
  };
1031
- return /* @__PURE__ */ Y("section", {
1032
+ return /* @__PURE__ */ X("section", {
1032
1033
  className: "mt-8",
1033
1034
  "aria-label": n("title"),
1034
- children: [/* @__PURE__ */ J("h2", {
1035
+ children: [/* @__PURE__ */ Y("h2", {
1035
1036
  className: "text-base font-semibold",
1036
1037
  children: n("title")
1037
- }), /* @__PURE__ */ J(N, {
1038
+ }), /* @__PURE__ */ Y(P, {
1038
1039
  className: "mt-3",
1039
- children: [...c].reverse().flatMap((t) => d(t).map(({ icon: n, text: r }, i) => /* @__PURE__ */ J(ue, {
1040
+ children: [...c].reverse().flatMap((t) => d(t).map(({ icon: n, text: r }, i) => /* @__PURE__ */ Y(le, {
1040
1041
  workspace: e,
1041
1042
  icon: n,
1042
1043
  actor: t.actor,