@parallelworks/tandem-web 0.185.0 → 0.186.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.
@@ -1,108 +1,112 @@
1
1
  import { allDecisionsQuery as e, inboxQuery as t, myAllDecisionsQuery as n, myDecisionsQuery as r, teamsQuery as i, workspaceRunsQuery as a } from "../api/queries.js";
2
2
  import { AnsweredDecision as o, DecisionCard as s } from "../components/AgentWork.js";
3
- import { FavoriteStar as c } from "../components/FavoriteStar.js";
3
+ import { ListFavoriteStar as c } from "../components/FavoriteStar.js";
4
4
  import { InboxIcon as l } from "../components/icons.js";
5
5
  import { recentlyAnswered as u, saveScope as d, savedScope as f } from "../lib/decisionScope.js";
6
6
  import { usePageTitle as p } from "../lib/pageTitle.js";
7
- import { EmptyState as m, SegmentedControl as h, useOpenMenu as g } from "@parallelworks/ui";
8
- import { useParams as _, useSearch as v } from "@tanstack/react-router";
9
- import { useState as y } from "react";
10
- import { useTranslations as b } from "use-intl";
11
- import { jsx as x, jsxs as S } from "react/jsx-runtime";
12
- import { useQuery as C, useSuspenseQuery as w } from "@tanstack/react-query";
7
+ import { teamPath as m } from "../lib/teamPaths.js";
8
+ import { EmptyState as h, SegmentedControl as g, useOpenMenu as _ } from "@parallelworks/ui";
9
+ import { useParams as v, useSearch as y } from "@tanstack/react-router";
10
+ import { useState as b } from "react";
11
+ import { useTranslations as x } from "use-intl";
12
+ import { jsx as S, jsxs as C } from "react/jsx-runtime";
13
+ import { useQuery as w, useSuspenseQuery as T } from "@tanstack/react-query";
13
14
  // src/pages/decisions.tsx
14
- var T = ["workspace", "all"];
15
- function E() {
16
- let { workspace: E, key: D } = _({ strict: !1 }), O = b("decisions"), k = g(), { team: A = D } = v({ strict: !1 }), { data: j } = w(i(E)), M = j.find((e) => e.key === A);
17
- p(O("title"), M?.name);
18
- let [N, P] = y(f), F = M ? "workspace" : N, I = F === "all", L = (e) => M ? e.filter((e) => e.identifier.startsWith(`${M.key}-`)) : e, R = (e) => {
19
- P(e), d(e);
20
- }, { data: z } = w(I ? r : t(E)), { data: B } = w(I ? n : e(E)), V = L(z), H = u(L(B)), { data: U = [] } = C(a(E, {
15
+ var E = ["workspace", "all"];
16
+ function D() {
17
+ let { workspace: D, key: O } = v({ strict: !1 }), k = x("decisions"), A = _(), { team: j = O } = y({ strict: !1 }), { data: M } = T(i(D)), N = M.find((e) => e.key === j);
18
+ p(k("title"), N?.name);
19
+ let [P, F] = b(f), I = N ? "workspace" : P, L = I === "all", R = (e) => N ? e.filter((e) => e.identifier.startsWith(`${N.key}-`)) : e, z = (e) => {
20
+ F(e), d(e);
21
+ }, { data: B } = T(L ? r : t(D)), { data: V } = T(L ? n : e(D)), H = R(B), U = u(R(V)), { data: W = [] } = w(a(D, {
21
22
  live: !0,
22
23
  limit: 200
23
- })), W = new Map(U.map((e) => [e.id, e])), G = () => T.map((e) => ({
24
- label: O(`scopes.${e}`),
25
- checked: e === F,
26
- onClick: () => R(e)
24
+ })), G = new Map(W.map((e) => [e.id, e])), K = () => E.map((e) => ({
25
+ label: k(`scopes.${e}`),
26
+ checked: e === I,
27
+ onClick: () => z(e)
27
28
  }));
28
- return /* @__PURE__ */ S("div", {
29
+ return /* @__PURE__ */ C("div", {
29
30
  className: "flex h-full flex-col",
30
- children: [/* @__PURE__ */ S("header", {
31
+ children: [/* @__PURE__ */ C("header", {
31
32
  className: "flex min-h-12 shrink-0 flex-wrap items-center gap-x-3 gap-y-2 border-b border-border px-4 py-2 md:px-5",
32
33
  children: [
33
- /* @__PURE__ */ x("h1", {
34
+ /* @__PURE__ */ S("h1", {
34
35
  className: "text-sm font-semibold",
35
- children: M ? O("teamTitle", { team: M.name }) : O("title")
36
+ children: N ? k("teamTitle", { team: N.name }) : k("title")
36
37
  }),
37
- !M && /* @__PURE__ */ x(c, {
38
- workspace: E,
39
- kind: "page",
40
- target: "decisions"
38
+ /* @__PURE__ */ S(c, {
39
+ workspace: D,
40
+ page: "decisions",
41
+ team: N && {
42
+ href: m(D, N.key, "decisions"),
43
+ label: k("teamTitle", { team: N.name })
44
+ }
41
45
  }),
42
- /* @__PURE__ */ x("span", {
46
+ /* @__PURE__ */ S("span", {
43
47
  className: "text-xs text-muted-foreground",
44
- children: O("openCount", { count: V.length })
48
+ children: k("openCount", { count: H.length })
45
49
  }),
46
- !M && /* @__PURE__ */ x("div", {
50
+ !N && /* @__PURE__ */ S("div", {
47
51
  className: "ml-auto",
48
- children: /* @__PURE__ */ x(h, {
52
+ children: /* @__PURE__ */ S(g, {
49
53
  size: "sm",
50
- label: O("scope"),
51
- options: T.map((e) => ({
54
+ label: k("scope"),
55
+ options: E.map((e) => ({
52
56
  value: e,
53
- label: O(`scopes.${e}`)
57
+ label: k(`scopes.${e}`)
54
58
  })),
55
- value: F,
56
- onValueChange: R,
57
- onContextMenu: (e) => k(e, G())
59
+ value: I,
60
+ onValueChange: z,
61
+ onContextMenu: (e) => A(e, K())
58
62
  })
59
63
  })
60
64
  ]
61
- }), /* @__PURE__ */ x("div", {
65
+ }), /* @__PURE__ */ S("div", {
62
66
  className: "min-h-0 flex-1 overflow-y-auto",
63
- children: /* @__PURE__ */ S("div", {
67
+ children: /* @__PURE__ */ C("div", {
64
68
  className: "mx-auto w-full max-w-reading space-y-10 px-4 py-6 md:px-8",
65
- children: [V.length === 0 ? /* @__PURE__ */ x(m, {
66
- icon: /* @__PURE__ */ x(l, {}),
67
- title: O("emptyTitle"),
68
- description: O(I ? "emptyDescriptionAll" : "emptyDescription"),
69
+ children: [H.length === 0 ? /* @__PURE__ */ S(h, {
70
+ icon: /* @__PURE__ */ S(l, {}),
71
+ title: k("emptyTitle"),
72
+ description: k(L ? "emptyDescriptionAll" : "emptyDescription"),
69
73
  variant: "plain"
70
- }) : /* @__PURE__ */ S("section", {
74
+ }) : /* @__PURE__ */ C("section", {
71
75
  "aria-labelledby": "decisions-open",
72
76
  className: "space-y-3",
73
- children: [/* @__PURE__ */ x("h2", {
77
+ children: [/* @__PURE__ */ S("h2", {
74
78
  id: "decisions-open",
75
79
  className: "text-sm font-semibold",
76
- children: O("waitingOnYou")
77
- }), V.map((e) => {
78
- let t = e.workspace === E ? W.get(e.runId) : void 0;
79
- return /* @__PURE__ */ x(s, {
80
+ children: k("waitingOnYou")
81
+ }), H.map((e) => {
82
+ let t = e.workspace === D ? G.get(e.runId) : void 0;
83
+ return /* @__PURE__ */ S(s, {
80
84
  workspace: e.workspace,
81
85
  decision: e,
82
86
  showIssue: !0,
83
- showWorkspace: I,
87
+ showWorkspace: L,
84
88
  runner: t?.lastRunnerName ? {
85
89
  name: t.lastRunnerName,
86
90
  kind: t.runnerKind
87
91
  } : void 0
88
92
  }, e.id);
89
93
  })]
90
- }), H.length > 0 && /* @__PURE__ */ S("section", {
94
+ }), U.length > 0 && /* @__PURE__ */ C("section", {
91
95
  "aria-labelledby": "decisions-answered",
92
96
  className: "space-y-3",
93
- children: [/* @__PURE__ */ x("h2", {
97
+ children: [/* @__PURE__ */ S("h2", {
94
98
  id: "decisions-answered",
95
99
  className: "text-sm font-semibold",
96
- children: O("recentlyAnswered")
97
- }), /* @__PURE__ */ x("ul", {
100
+ children: k("recentlyAnswered")
101
+ }), /* @__PURE__ */ S("ul", {
98
102
  className: "divide-y divide-border rounded-xl border border-border bg-card",
99
- children: H.map((e) => /* @__PURE__ */ x("li", {
103
+ children: U.map((e) => /* @__PURE__ */ S("li", {
100
104
  className: "px-3 py-2.5",
101
- children: /* @__PURE__ */ x(o, {
105
+ children: /* @__PURE__ */ S(o, {
102
106
  workspace: e.workspace,
103
107
  decision: e,
104
108
  showIssue: !0,
105
- showWorkspace: I,
109
+ showWorkspace: L,
106
110
  bare: !0
107
111
  })
108
112
  }, e.id))
@@ -112,4 +116,4 @@ function E() {
112
116
  })]
113
117
  });
114
118
  }
115
- export { E as Inbox };
119
+ export { D as Inbox };
package/pages/projects.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { projectsQuery as e, teamsQuery as t } from "../api/queries.js";
2
2
  import { DisplayMenu as n } from "../components/DisplayMenu.js";
3
3
  import { EntityIcon as r } from "../components/EntityIcon.js";
4
- import { FavoriteStar as i } from "../components/FavoriteStar.js";
4
+ import { ListFavoriteStar as i } from "../components/FavoriteStar.js";
5
5
  import { ChevronDownIcon as a, ListViewIcon as o, PriorityIcon as s, ProjectIcon as c, TimelineIcon as l, usePriorityNames as u } from "../components/icons.js";
6
6
  import { NewProjectDialog as d } from "../components/NewProjectDialog.js";
7
7
  import { HealthIcon as f, ProgressBar as p, ProjectStatusIcon as m, healthOf as h } from "../components/Planning.js";
@@ -12,24 +12,25 @@ import { usePeople as b } from "../lib/people.js";
12
12
  import { storeLayout as x, storedLayout as S } from "../lib/projectList.js";
13
13
  import { healthStates as C, projectStatuses as ee, shownStatus as te } from "../lib/projectStates.js";
14
14
  import { projectLevel as ne, projectRef as w, projectTree as T, projectsUnder as E } from "../lib/projects.js";
15
- import { useCan as D } from "../lib/roles.js";
16
- import { Link as O, useNavigate as re } from "../lib/router.js";
17
- import { useTime as k } from "../lib/time.js";
18
- import { Avatar as A, Button as j, Combobox as ie, EmptyState as ae, PageHeaderAddButton as oe, Switch as se, Tabs as M, ToggleGroup as ce, Tooltip as N, menuDivider as le, useOpenMenu as ue } from "@parallelworks/ui";
19
- import { useParams as de, useSearch as fe } from "@tanstack/react-router";
20
- import { useEffect as P, useId as pe, useRef as F, useState as I } from "react";
15
+ import { useCan as re } from "../lib/roles.js";
16
+ import { Link as D, useNavigate as ie } from "../lib/router.js";
17
+ import { teamPath as ae } from "../lib/teamPaths.js";
18
+ import { useTime as O } from "../lib/time.js";
19
+ import { Avatar as k, Button as A, Combobox as oe, EmptyState as se, PageHeaderAddButton as ce, Switch as le, Tabs as j, ToggleGroup as ue, Tooltip as M, menuDivider as N, useOpenMenu as de } from "@parallelworks/ui";
20
+ import { useParams as fe, useSearch as pe } from "@tanstack/react-router";
21
+ import { useEffect as P, useId as me, useRef as F, useState as I } from "react";
21
22
  import { useFormatter as L, useTranslations as R } from "use-intl";
22
23
  import { jsx as z, jsxs as B } from "react/jsx-runtime";
23
24
  import { useSuspenseQuery as V } from "@tanstack/react-query";
24
25
  import { MoreButton as H } from "@parallelworks/ui/list";
25
26
  // src/pages/projects.tsx
26
27
  function U() {
27
- let { workspace: r, key: a } = de({ strict: !1 }), s = fe({ strict: !1 }), u = a ? {
28
+ let { workspace: r, key: a } = fe({ strict: !1 }), s = pe({ strict: !1 }), u = a ? {
28
29
  ...s,
29
30
  team: a
30
31
  } : s, f = R("planning"), p = R("common"), { data: m } = V(e(r)), { data: b } = V(t(r)), C = b.find((e) => e.key === u.team);
31
32
  y(C ? f("teamProjects", { team: C.name }) : f("projects"));
32
- let T = a ? "list" : "timeline", O = u.view ?? S(!!a) ?? T, k = m.filter((e) => (!C || e.teamIds.includes(C.id)) && !!e.template == (O === "templates")), A = D(r, "manage_projects"), [M, N] = I(null), P = pe(), F = re(), L = ue(), H = v(), U = u.parent ? m.find((e) => e.id === u.parent) : void 0, W = U && new Set(E(m, U.id).map((e) => e.id)), G = te(u.status, O === "templates"), K = k.filter((e) => (!G || e.status === G) && (!u.health || h(e) === u.health) && (!W || W.has(e.id))), q = k.length > 0 && (!!G || !!u.health), J = (e) => {
33
+ let T = a ? "list" : "timeline", D = u.view ?? S(!!a) ?? T, O = m.filter((e) => (!C || e.teamIds.includes(C.id)) && !!e.template == (D === "templates")), k = re(r, "manage_projects"), [j, M] = I(null), P = me(), F = ie(), L = de(), H = v(), U = u.parent ? m.find((e) => e.id === u.parent) : void 0, W = U && new Set(E(m, U.id).map((e) => e.id)), G = te(u.status, D === "templates"), K = O.filter((e) => (!G || e.status === G) && (!u.health || h(e) === u.health) && (!W || W.has(e.id))), q = O.length > 0 && (!!G || !!u.health), J = (e) => {
33
34
  let { team: t, ...n } = Object.fromEntries(Object.entries({
34
35
  ...u,
35
36
  ...e
@@ -74,11 +75,11 @@ function U() {
74
75
  label: Y.find("project", e.id) ? X("remove") : X("add"),
75
76
  onClick: () => Y.toggle("project", e.id)
76
77
  },
77
- ...A && !e.template && ne(m, e.id) < 5 ? [{
78
+ ...k && !e.template && ne(m, e.id) < 5 ? [{
78
79
  label: f("newSubProject"),
79
- onClick: () => N(e.id)
80
+ onClick: () => M(e.id)
80
81
  }] : [],
81
- le,
82
+ N,
82
83
  ...H(`/${r}/projects/${w(e)}`),
83
84
  _(p("copyName"), e.name)
84
85
  ], Q = (e) => ({
@@ -97,15 +98,18 @@ function U() {
97
98
  className: "min-w-0 truncate text-sm font-semibold",
98
99
  children: C ? f("teamProjects", { team: C.name }) : f("projects")
99
100
  }),
100
- !C && /* @__PURE__ */ z(i, {
101
+ /* @__PURE__ */ z(i, {
101
102
  workspace: r,
102
- kind: "page",
103
- target: "projects"
103
+ page: "projects",
104
+ team: C && {
105
+ href: ae(r, C.key, "projects"),
106
+ label: f("teamProjects", { team: C.name })
107
+ }
104
108
  }),
105
109
  /* @__PURE__ */ z("span", {
106
110
  className: "ml-auto flex items-center gap-1",
107
111
  children: /* @__PURE__ */ z(n, {
108
- ...O !== "templates" && {
112
+ ...D !== "templates" && {
109
113
  layouts: [{
110
114
  value: "list",
111
115
  label: f("views.list"),
@@ -115,56 +119,56 @@ function U() {
115
119
  label: f("views.timeline"),
116
120
  icon: /* @__PURE__ */ z(l, {})
117
121
  }],
118
- layout: O,
122
+ layout: D,
119
123
  onLayoutChange: (e) => {
120
124
  x(!!a, e), J({ view: e });
121
125
  }
122
126
  },
123
- changed: O !== T,
127
+ changed: D !== T,
124
128
  children: /* @__PURE__ */ B("div", {
125
129
  className: "flex items-center justify-between gap-3",
126
130
  children: [/* @__PURE__ */ z("span", {
127
131
  id: P,
128
132
  className: "text-sm",
129
133
  children: f("showTemplates")
130
- }), /* @__PURE__ */ z(se, {
134
+ }), /* @__PURE__ */ z(le, {
131
135
  size: "sm",
132
- checked: O === "templates",
136
+ checked: D === "templates",
133
137
  onCheckedChange: (e) => J({ view: e ? "templates" : void 0 }),
134
138
  "aria-labelledby": P
135
139
  })]
136
140
  })
137
141
  })
138
142
  }),
139
- A && /* @__PURE__ */ z(oe, {
143
+ k && /* @__PURE__ */ z(ce, {
140
144
  label: f("newProject"),
141
- onClick: () => N("")
145
+ onClick: () => M("")
142
146
  })
143
147
  ]
144
148
  }),
145
149
  /* @__PURE__ */ B("div", {
146
150
  className: "flex shrink-0 flex-wrap items-center gap-1 border-b border-border px-4 py-2 md:px-5",
147
151
  children: [
148
- /* @__PURE__ */ z(ce, {
152
+ /* @__PURE__ */ z(ue, {
149
153
  label: f("filterStatus"),
150
154
  multiple: !1,
151
- all: { count: k.length },
155
+ all: { count: O.length },
152
156
  options: ee.map((e) => ({
153
157
  value: e,
154
158
  label: f(`status.${e}`),
155
- count: k.filter((t) => t.status === e).length
159
+ count: O.filter((t) => t.status === e).length
156
160
  })),
157
161
  value: G ? [G] : [],
158
162
  onValueChange: ([e]) => J({ status: e ?? "all" })
159
163
  }),
160
- u.health && /* @__PURE__ */ z(j, {
164
+ u.health && /* @__PURE__ */ z(A, {
161
165
  variant: "outline",
162
166
  size: "sm",
163
167
  "aria-pressed": !0,
164
168
  onClick: () => J({ health: void 0 }),
165
169
  children: f("healthFilter", { health: f(`health.${u.health}`) })
166
170
  }),
167
- k.some((e) => e.parentId) && /* @__PURE__ */ z(ie, {
171
+ O.some((e) => e.parentId) && /* @__PURE__ */ z(oe, {
168
172
  items: [{
169
173
  value: "",
170
174
  label: f("anyParent")
@@ -176,7 +180,7 @@ function U() {
176
180
  onValueChange: (e) => J({ parent: e || void 0 }),
177
181
  placeholder: f("parentProject"),
178
182
  "aria-label": f("parentProject"),
179
- trigger: /* @__PURE__ */ z(j, {
183
+ trigger: /* @__PURE__ */ z(A, {
180
184
  variant: "outline",
181
185
  size: "sm",
182
186
  className: U ? "border-(--theme-link) text-(--theme-app)" : void 0,
@@ -191,43 +195,43 @@ function U() {
191
195
  className: "min-h-0 min-w-0 flex-1 overflow-auto",
192
196
  children: K.length === 0 ? /* @__PURE__ */ z("div", {
193
197
  className: "p-6",
194
- children: /* @__PURE__ */ z(ae, {
198
+ children: /* @__PURE__ */ z(se, {
195
199
  icon: /* @__PURE__ */ z(c, {}),
196
- title: f(q ? "noProjectsWithStatus" : O === "templates" ? "noTemplates" : "noProjects"),
197
- ...!q && { description: f(O === "templates" ? "noTemplatesDescription" : "noProjectsDescription") },
198
- ...A && !q && O !== "templates" && { action: /* @__PURE__ */ z(j, {
200
+ title: f(q ? "noProjectsWithStatus" : D === "templates" ? "noTemplates" : "noProjects"),
201
+ ...!q && { description: f(D === "templates" ? "noTemplatesDescription" : "noProjectsDescription") },
202
+ ...k && !q && D !== "templates" && { action: /* @__PURE__ */ z(A, {
199
203
  type: "button",
200
204
  variant: "primary",
201
- onClick: () => N(""),
205
+ onClick: () => M(""),
202
206
  children: f("newProject")
203
207
  }) }
204
208
  })
205
- }) : O === "timeline" ? /* @__PURE__ */ z(_e, {
209
+ }) : D === "timeline" ? /* @__PURE__ */ z(ve, {
206
210
  workspace: r,
207
211
  projects: K,
208
212
  rowProps: Q
209
- }) : /* @__PURE__ */ z(me, {
213
+ }) : /* @__PURE__ */ z(he, {
210
214
  projects: K,
211
215
  rowProps: Q
212
216
  })
213
- }), /* @__PURE__ */ z(ye, {
217
+ }), /* @__PURE__ */ z(be, {
214
218
  workspace: r,
215
- projects: k,
219
+ projects: O,
216
220
  health: u.health,
217
221
  onHealth: (e) => J({ health: e === u.health ? void 0 : e })
218
222
  })]
219
223
  }),
220
- M !== null && /* @__PURE__ */ z(d, {
224
+ j !== null && /* @__PURE__ */ z(d, {
221
225
  workspace: r,
222
226
  teamId: C?.id,
223
- parentId: M || void 0,
224
- onClose: () => N(null)
227
+ parentId: j || void 0,
228
+ onClose: () => M(null)
225
229
  })
226
230
  ]
227
231
  });
228
232
  }
229
233
  var W = "@4xl:grid @4xl:grid-cols-[minmax(0,1fr)_10rem_2rem_2rem_6rem_8rem_2rem]";
230
- function me({ projects: e, rowProps: t }) {
234
+ function he({ projects: e, rowProps: t }) {
231
235
  let n = R("planning"), [r, i] = I(/* @__PURE__ */ new Set()), a = new Set([...r].flatMap((t) => E(e, t).map((e) => e.id))), o = (e) => i((t) => {
232
236
  let n = new Set(t);
233
237
  return n.delete(e) || n.add(e), n;
@@ -239,14 +243,14 @@ function me({ projects: e, rowProps: t }) {
239
243
  children: [
240
244
  /* @__PURE__ */ z("span", { children: n("name") }),
241
245
  /* @__PURE__ */ z("span", { children: n("healthLabel") }),
242
- /* @__PURE__ */ z(N, {
246
+ /* @__PURE__ */ z(M, {
243
247
  content: n("priority"),
244
248
  children: /* @__PURE__ */ z("span", { children: /* @__PURE__ */ z("span", {
245
249
  className: "sr-only",
246
250
  children: n("priority")
247
251
  }) })
248
252
  }),
249
- /* @__PURE__ */ z(N, {
253
+ /* @__PURE__ */ z(M, {
250
254
  content: n("lead"),
251
255
  children: /* @__PURE__ */ z("span", { children: /* @__PURE__ */ z("span", {
252
256
  className: "sr-only",
@@ -274,7 +278,7 @@ function G({ project: e }) {
274
278
  }) : /* @__PURE__ */ z(c, { className: "size-4 text-muted-foreground" });
275
279
  }
276
280
  function K({ workspace: e, project: t, onContextMenu: n, menu: r, depth: i = 0, childCount: o = 0, folded: c = !1, onFold: l }) {
277
- let d = R("planning"), g = R("common"), _ = k(), v = u(), { person: y } = b(e), x = t.lead ? y(t.lead) : void 0, S = h(t);
281
+ let d = R("planning"), g = R("common"), _ = O(), v = u(), { person: y } = b(e), x = t.lead ? y(t.lead) : void 0, S = h(t);
278
282
  return /* @__PURE__ */ B("li", {
279
283
  className: "group flex items-center border-b border-border pr-2 hover:bg-muted/60",
280
284
  children: [
@@ -290,7 +294,7 @@ function K({ workspace: e, project: t, onContextMenu: n, menu: r, depth: i = 0,
290
294
  children: /* @__PURE__ */ z(a, { className: `size-3.5 transition-transform ${c ? "-rotate-90" : ""}` })
291
295
  })
292
296
  }),
293
- /* @__PURE__ */ B(O, {
297
+ /* @__PURE__ */ B(D, {
294
298
  to: "/$workspace/projects/$projectId",
295
299
  params: {
296
300
  workspace: e,
@@ -316,7 +320,7 @@ function K({ workspace: e, project: t, onContextMenu: n, menu: r, depth: i = 0,
316
320
  className: "flex items-center gap-1.5 whitespace-nowrap text-xs text-muted-foreground",
317
321
  children: [/* @__PURE__ */ z(f, { state: S }), d(`health.${S}`)]
318
322
  }),
319
- /* @__PURE__ */ z(N, {
323
+ /* @__PURE__ */ z(M, {
320
324
  content: v[t.priority],
321
325
  children: /* @__PURE__ */ z("span", {
322
326
  role: "img",
@@ -327,9 +331,9 @@ function K({ workspace: e, project: t, onContextMenu: n, menu: r, depth: i = 0,
327
331
  }),
328
332
  /* @__PURE__ */ z("span", {
329
333
  className: "flex",
330
- children: x && /* @__PURE__ */ z(N, {
334
+ children: x && /* @__PURE__ */ z(M, {
331
335
  content: d("leadIs", { name: x.name }),
332
- children: /* @__PURE__ */ z("span", { children: /* @__PURE__ */ z(A, {
336
+ children: /* @__PURE__ */ z("span", { children: /* @__PURE__ */ z(k, {
333
337
  name: x.name,
334
338
  src: x.avatarUrl,
335
339
  size: "sm"
@@ -344,7 +348,7 @@ function K({ workspace: e, project: t, onContextMenu: n, menu: r, depth: i = 0,
344
348
  progress: o > 0 ? t.treeProgress : t.progress,
345
349
  compact: !0
346
350
  }) }),
347
- /* @__PURE__ */ z(N, {
351
+ /* @__PURE__ */ z(M, {
348
352
  content: d(`status.${t.status}`),
349
353
  children: /* @__PURE__ */ z("span", {
350
354
  role: "img",
@@ -365,15 +369,15 @@ function K({ workspace: e, project: t, onContextMenu: n, menu: r, depth: i = 0,
365
369
  var q = 864e5, J = 5, Y = 64, X = 256, Z = 56, Q = (e) => Date.parse(`${e}T00:00:00Z`), $ = (e) => {
366
370
  let t = new Date(e);
367
371
  return Date.UTC(t.getUTCFullYear(), t.getUTCMonth(), 1);
368
- }, he = () => {
372
+ }, ge = () => {
369
373
  let e = /* @__PURE__ */ new Date();
370
374
  return Date.UTC(e.getFullYear(), e.getMonth(), e.getDate());
371
- }, ge = (e) => e - (new Date(e).getUTCDay() + 6) % 7 * q;
372
- function _e({ workspace: e, projects: t, rowProps: n }) {
375
+ }, _e = (e) => e - (new Date(e).getUTCDay() + 6) % 7 * q;
376
+ function ve({ workspace: e, projects: t, rowProps: n }) {
373
377
  let r = R("planning"), i = L(), a = F(null), [o, s] = I({
374
378
  left: 0,
375
379
  width: 0
376
- }), c = he(), l = t.map((e) => {
380
+ }), c = ge(), l = t.map((e) => {
377
381
  let t = e.targetDate ? Q(e.targetDate) : void 0;
378
382
  return {
379
383
  p: e,
@@ -383,7 +387,7 @@ function _e({ workspace: e, projects: t, rowProps: n }) {
383
387
  }), u = l.flatMap((e) => [e.start, e.end].filter((e) => e !== void 0)), d = $(Math.min(c - 90 * q, ...u)), f = $(Math.max(c + 300 * q, ...u) + 40 * q), p = (e) => (e - d) / q * J, m = p(f), h = [];
384
388
  for (let e = d; e < f; e = $(e + 32 * q)) h.push(e);
385
389
  let g = [];
386
- for (let e = ge(d) + 7 * q; e < f; e += 7 * q) g.push(e);
390
+ for (let e = _e(d) + 7 * q; e < f; e += 7 * q) g.push(e);
387
391
  let _ = (e, t) => i.dateTime(new Date(e), {
388
392
  ...t,
389
393
  timeZone: "UTC"
@@ -428,7 +432,7 @@ function _e({ workspace: e, projects: t, rowProps: n }) {
428
432
  children: [/* @__PURE__ */ z("div", {
429
433
  className: "sticky left-0 z-[3] flex shrink-0 items-end border-r border-border bg-background px-4 pb-2",
430
434
  style: { width: X },
431
- children: /* @__PURE__ */ z(j, {
435
+ children: /* @__PURE__ */ z(A, {
432
436
  type: "button",
433
437
  size: "xs",
434
438
  onClick: () => b(),
@@ -493,12 +497,12 @@ function _e({ workspace: e, projects: t, rowProps: n }) {
493
497
  return /* @__PURE__ */ B("li", {
494
498
  className: "group flex hover:bg-muted/40",
495
499
  style: { height: Y },
496
- children: [/* @__PURE__ */ z(ve, { ...n(t) }), /* @__PURE__ */ B("div", {
500
+ children: [/* @__PURE__ */ z(ye, { ...n(t) }), /* @__PURE__ */ B("div", {
497
501
  className: "relative",
498
502
  style: { width: m },
499
- children: [a && !u && !d && /* @__PURE__ */ z(N, {
503
+ children: [a && !u && !d && /* @__PURE__ */ z(M, {
500
504
  content: `${t.name}, ${v(r, i)}`,
501
- children: /* @__PURE__ */ B(O, {
505
+ children: /* @__PURE__ */ B(D, {
502
506
  to: "/$workspace/projects/$projectId",
503
507
  params: {
504
508
  workspace: e,
@@ -527,7 +531,7 @@ function _e({ workspace: e, projects: t, rowProps: n }) {
527
531
  })]
528
532
  })]
529
533
  })
530
- }), (u || d) && /* @__PURE__ */ B(O, {
534
+ }), (u || d) && /* @__PURE__ */ B(D, {
531
535
  to: "/$workspace/projects/$projectId",
532
536
  params: {
533
537
  workspace: e,
@@ -558,9 +562,9 @@ function _e({ workspace: e, projects: t, rowProps: n }) {
558
562
  })
559
563
  });
560
564
  }
561
- function ve({ workspace: e, project: t, onContextMenu: n }) {
565
+ function ye({ workspace: e, project: t, onContextMenu: n }) {
562
566
  let r = R("planning"), { person: i } = b(e), a = t.lead ? i(t.lead) : void 0, o = h(t);
563
- return /* @__PURE__ */ B(O, {
567
+ return /* @__PURE__ */ B(D, {
564
568
  to: "/$workspace/projects/$projectId",
565
569
  params: {
566
570
  workspace: e,
@@ -575,7 +579,7 @@ function ve({ workspace: e, project: t, onContextMenu: n }) {
575
579
  className: "min-w-0 flex-1 truncate text-sm",
576
580
  children: t.name
577
581
  }),
578
- /* @__PURE__ */ z(N, {
582
+ /* @__PURE__ */ z(M, {
579
583
  content: r(`status.${t.status}`),
580
584
  children: /* @__PURE__ */ z("span", {
581
585
  role: "img",
@@ -584,7 +588,7 @@ function ve({ workspace: e, project: t, onContextMenu: n }) {
584
588
  children: /* @__PURE__ */ z(m, { status: t.status })
585
589
  })
586
590
  }),
587
- /* @__PURE__ */ z(N, {
591
+ /* @__PURE__ */ z(M, {
588
592
  content: r(`health.${o}`),
589
593
  children: /* @__PURE__ */ z("span", {
590
594
  role: "img",
@@ -592,7 +596,7 @@ function ve({ workspace: e, project: t, onContextMenu: n }) {
592
596
  children: /* @__PURE__ */ z(f, { state: o })
593
597
  })
594
598
  }),
595
- a && /* @__PURE__ */ z(A, {
599
+ a && /* @__PURE__ */ z(k, {
596
600
  name: a.name,
597
601
  src: a.avatarUrl,
598
602
  size: "xs",
@@ -601,12 +605,12 @@ function ve({ workspace: e, project: t, onContextMenu: n }) {
601
605
  ]
602
606
  });
603
607
  }
604
- function ye({ workspace: e, projects: n, health: i, onHealth: a }) {
608
+ function be({ workspace: e, projects: n, health: i, onHealth: a }) {
605
609
  let o = R("planning"), { data: s } = V(t(e)), { person: c } = b(e), [l, u] = I("health"), d = (e) => n.filter(e).length, p = "flex h-9 w-full items-center gap-2.5 rounded-md px-2 text-sm", m = [...new Set(n.map((e) => e.lead ?? ""))];
606
610
  return /* @__PURE__ */ B("aside", {
607
611
  "aria-label": o("breakdown"),
608
612
  className: "hidden w-72 shrink-0 overflow-y-auto border-l border-border p-3 xl:block",
609
- children: [/* @__PURE__ */ z(M, {
613
+ children: [/* @__PURE__ */ z(j, {
610
614
  variant: "segmented",
611
615
  size: "sm",
612
616
  label: o("breakdown"),
@@ -669,7 +673,7 @@ function ye({ workspace: e, projects: n, health: i, onHealth: a }) {
669
673
  return /* @__PURE__ */ B("li", {
670
674
  className: p,
671
675
  children: [
672
- t ? /* @__PURE__ */ z(A, {
676
+ t ? /* @__PURE__ */ z(k, {
673
677
  name: t.name,
674
678
  src: t.avatarUrl,
675
679
  size: "xs",