@parallelworks/tandem-web 0.190.1 → 0.191.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parallelworks/tandem-web",
3
- "version": "0.190.1",
3
+ "version": "0.191.0",
4
4
  "description": "Tandem's pages, for a host app to render in its own",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
package/pages/projects.js CHANGED
@@ -9,14 +9,14 @@ import { useFavorites as g } from "../lib/favorites.js";
9
9
  import { copyItem as _, useLinkItems as v } from "../lib/menus.js";
10
10
  import { usePageTitle as y } from "../lib/pageTitle.js";
11
11
  import { usePeople as b } from "../lib/people.js";
12
- import { storeExpanded as x, storeLayout as S, storedExpanded as C, storedLayout as ee } from "../lib/projectList.js";
13
- import { healthStates as w, projectStatuses as te, shownStatus as ne } from "../lib/projectStates.js";
14
- import { projectLevel as re, projectRef as T, projectsUnder as E } from "../lib/projects.js";
15
- import { useCan as ie } from "../lib/roles.js";
16
- import { Link as D, useNavigate as ae } from "../lib/router.js";
17
- import { teamPath as oe } from "../lib/teamPaths.js";
18
- import { useTime as O } from "../lib/time.js";
19
- import { Avatar as k, Button as A, Combobox as se, EmptyState as ce, PageHeaderAddButton as j, Switch as le, Tabs as M, ToggleGroup as ue, Tooltip as N, menuDivider as de, useOpenMenu as fe } from "@parallelworks/ui";
12
+ import { storeExpanded as x, storeLayout as ee, storedExpanded as S, storedLayout as C } from "../lib/projectList.js";
13
+ import { healthStates as w, projectStatuses as T, shownStatus as E } from "../lib/projectStates.js";
14
+ import { projectLevel as te, projectRef as D, projectsUnder as ne } from "../lib/projects.js";
15
+ import { useCan as re } from "../lib/roles.js";
16
+ import { Link as O, useNavigate as ie } from "../lib/router.js";
17
+ import { teamPath as ae } from "../lib/teamPaths.js";
18
+ import { useTime as k } from "../lib/time.js";
19
+ import { Avatar as A, Button as j, Combobox as oe, EmptyState as se, PageHeaderAddButton as ce, Switch as le, Tabs as M, ToggleGroup as ue, Tooltip as N, menuDivider as de, useOpenMenu as fe } from "@parallelworks/ui";
20
20
  import { useParams as pe, useSearch as me } from "@tanstack/react-router";
21
21
  import { useEffect as P, useId as he, useRef as F, useState as I } from "react";
22
22
  import { useFormatter as L, useTranslations as R } from "use-intl";
@@ -30,7 +30,7 @@ function U() {
30
30
  team: a
31
31
  } : s, f = R("planning"), p = R("common"), { data: m } = V(e(r)), { data: b } = V(t(r)), x = b.find((e) => e.key === u.team);
32
32
  y(x ? f("teamProjects", { team: x.name }) : f("projects"));
33
- let C = a ? "list" : "timeline", w = u.view ?? ee(!!a) ?? C, D = m.filter((e) => (!x || e.teamIds.includes(x.id)) && !!e.template == (w === "templates")), O = ie(r, "manage_projects"), [k, M] = I(null), N = he(), P = ae(), F = fe(), L = v(), H = u.parent ? m.find((e) => e.id === u.parent) : void 0, U = H && new Set(E(m, H.id).map((e) => e.id)), W = ne(u.status, w === "templates"), G = D.filter((e) => (!W || e.status === W) && (!u.health || h(e) === u.health) && (!U || U.has(e.id))), K = D.length > 0 && (!!W || !!u.health), q = (e) => {
33
+ let S = a ? "list" : "timeline", w = u.view ?? C(!!a) ?? S, O = m.filter((e) => (!x || e.teamIds.includes(x.id)) && !!e.template == (w === "templates")), k = re(r, "manage_projects"), [A, M] = I(null), N = he(), P = ie(), F = fe(), L = v(), H = u.parent ? m.find((e) => e.id === u.parent) : void 0, U = H && new Set(ne(m, H.id).map((e) => e.id)), W = E(u.status, w === "templates"), G = O.filter((e) => (!W || e.status === W) && (!u.health || h(e) === u.health) && (!U || U.has(e.id))), K = O.length > 0 && (!!W || !!u.health), q = (e) => {
34
34
  let { team: t, ...n } = Object.fromEntries(Object.entries({
35
35
  ...u,
36
36
  ...e
@@ -56,7 +56,7 @@ function U() {
56
56
  to: "/$workspace/projects/$projectId",
57
57
  params: {
58
58
  workspace: r,
59
- projectId: T(e)
59
+ projectId: D(e)
60
60
  }
61
61
  })
62
62
  },
@@ -66,7 +66,7 @@ function U() {
66
66
  to: "/$workspace/projects/$projectId",
67
67
  params: {
68
68
  workspace: r,
69
- projectId: T(e)
69
+ projectId: D(e)
70
70
  },
71
71
  search: { tab: "issues" }
72
72
  })
@@ -75,12 +75,12 @@ function U() {
75
75
  label: J.find("project", e.id) ? Y("remove") : Y("add"),
76
76
  onClick: () => J.toggle("project", e.id)
77
77
  },
78
- ...O && !e.template && re(m, e.id) < 5 ? [{
78
+ ...k && !e.template && te(m, e.id) < 5 ? [{
79
79
  label: f("newSubProject"),
80
80
  onClick: () => M(e.id)
81
81
  }] : [],
82
82
  de,
83
- ...L(`/${r}/projects/${T(e)}`),
83
+ ...L(`/${r}/projects/${D(e)}`),
84
84
  _(p("copyName"), e.name)
85
85
  ], Z = (e) => ({
86
86
  workspace: r,
@@ -102,7 +102,7 @@ function U() {
102
102
  workspace: r,
103
103
  page: "projects",
104
104
  team: x && {
105
- href: oe(r, x.key, "projects"),
105
+ href: ae(r, x.key, "projects"),
106
106
  label: f("teamProjects", { team: x.name })
107
107
  }
108
108
  }),
@@ -121,10 +121,10 @@ function U() {
121
121
  }],
122
122
  layout: w,
123
123
  onLayoutChange: (e) => {
124
- S(!!a, e), q({ view: e });
124
+ ee(!!a, e), q({ view: e });
125
125
  }
126
126
  },
127
- changed: w !== C,
127
+ changed: w !== S,
128
128
  children: /* @__PURE__ */ B("div", {
129
129
  className: "flex items-center justify-between gap-3",
130
130
  children: [/* @__PURE__ */ z("span", {
@@ -140,7 +140,7 @@ function U() {
140
140
  })
141
141
  })
142
142
  }),
143
- O && /* @__PURE__ */ z(j, {
143
+ k && /* @__PURE__ */ z(ce, {
144
144
  label: f("newProject"),
145
145
  onClick: () => M("")
146
146
  })
@@ -152,23 +152,23 @@ function U() {
152
152
  /* @__PURE__ */ z(ue, {
153
153
  label: f("filterStatus"),
154
154
  multiple: !1,
155
- all: { count: D.length },
156
- options: te.map((e) => ({
155
+ all: { count: O.length },
156
+ options: T.map((e) => ({
157
157
  value: e,
158
158
  label: f(`status.${e}`),
159
- count: D.filter((t) => t.status === e).length
159
+ count: O.filter((t) => t.status === e).length
160
160
  })),
161
161
  value: W ? [W] : [],
162
162
  onValueChange: ([e]) => q({ status: e ?? "all" })
163
163
  }),
164
- u.health && /* @__PURE__ */ z(A, {
164
+ u.health && /* @__PURE__ */ z(j, {
165
165
  variant: "outline",
166
166
  size: "sm",
167
167
  "aria-pressed": !0,
168
168
  onClick: () => q({ health: void 0 }),
169
169
  children: f("healthFilter", { health: f(`health.${u.health}`) })
170
170
  }),
171
- D.some((e) => e.parentId) && /* @__PURE__ */ z(se, {
171
+ O.some((e) => e.parentId) && /* @__PURE__ */ z(oe, {
172
172
  items: [{
173
173
  value: "",
174
174
  label: f("anyParent")
@@ -180,7 +180,7 @@ function U() {
180
180
  onValueChange: (e) => q({ parent: e || void 0 }),
181
181
  placeholder: f("parentProject"),
182
182
  "aria-label": f("parentProject"),
183
- trigger: /* @__PURE__ */ z(A, {
183
+ trigger: /* @__PURE__ */ z(j, {
184
184
  variant: "outline",
185
185
  size: "sm",
186
186
  className: H ? "border-(--theme-link) text-(--theme-app)" : void 0,
@@ -195,18 +195,18 @@ function U() {
195
195
  className: "min-h-0 min-w-0 flex-1 overflow-auto",
196
196
  children: G.length === 0 ? /* @__PURE__ */ z("div", {
197
197
  className: "p-6",
198
- children: /* @__PURE__ */ z(ce, {
198
+ children: /* @__PURE__ */ z(se, {
199
199
  icon: /* @__PURE__ */ z(c, {}),
200
200
  title: f(K ? "noProjectsWithStatus" : w === "templates" ? "noTemplates" : "noProjects"),
201
201
  ...!K && { description: f(w === "templates" ? "noTemplatesDescription" : "noProjectsDescription") },
202
- ...O && !K && w !== "templates" && { action: /* @__PURE__ */ z(A, {
202
+ ...k && !K && w !== "templates" && { action: /* @__PURE__ */ z(j, {
203
203
  type: "button",
204
204
  variant: "primary",
205
205
  onClick: () => M(""),
206
206
  children: f("newProject")
207
207
  }) }
208
208
  })
209
- }) : w === "timeline" ? /* @__PURE__ */ z(ye, {
209
+ }) : w === "timeline" ? /* @__PURE__ */ z(be, {
210
210
  workspace: r,
211
211
  projects: G,
212
212
  rowProps: Z
@@ -215,25 +215,25 @@ function U() {
215
215
  pool: m.filter((e) => !!e.template == (w === "templates")),
216
216
  rowProps: Z
217
217
  })
218
- }), /* @__PURE__ */ z(xe, {
218
+ }), /* @__PURE__ */ z(Se, {
219
219
  workspace: r,
220
- projects: D,
220
+ projects: O,
221
221
  health: u.health,
222
222
  onHealth: (e) => q({ health: e === u.health ? void 0 : e })
223
223
  })]
224
224
  }),
225
- k !== null && /* @__PURE__ */ z(d, {
225
+ A !== null && /* @__PURE__ */ z(d, {
226
226
  workspace: r,
227
227
  teamId: x?.id,
228
- parentId: k || void 0,
228
+ parentId: A || void 0,
229
229
  onClose: () => M(null)
230
230
  })
231
231
  ]
232
232
  });
233
233
  }
234
- var W = "@4xl:grid @4xl:grid-cols-[minmax(0,1fr)_10rem_2rem_2rem_6rem_8rem_2rem]";
234
+ var W = "@4xl:grid @4xl:grid-cols-[minmax(0,1fr)_8rem_2rem_2rem_9.5rem_8.5rem_2rem] @7xl:grid-cols-[minmax(0,1fr)_8rem_2rem_2rem_7rem_9.5rem_6rem_8.5rem_5rem_2rem]", G = "hidden @7xl:block";
235
235
  function ge({ projects: e, pool: t, rowProps: n }) {
236
- let r = R("planning"), [i, a] = I(C), o = (e) => a((t) => {
236
+ let r = R("planning"), [i, a] = I(S), o = (e) => a((t) => {
237
237
  let n = new Set(t);
238
238
  return n.delete(e) || n.add(e), x(n), n;
239
239
  }), s = new Set(e.map((e) => e.id)), c = [], l = (e, n) => {
@@ -267,11 +267,23 @@ function ge({ projects: e, pool: t, rowProps: n }) {
267
267
  children: r("lead")
268
268
  }) })
269
269
  }),
270
- /* @__PURE__ */ z("span", { children: r("targetDate") }),
270
+ /* @__PURE__ */ z("span", {
271
+ className: G,
272
+ children: r("teams")
273
+ }),
274
+ /* @__PURE__ */ z("span", { children: r("dates") }),
275
+ /* @__PURE__ */ z("span", {
276
+ className: G,
277
+ children: r("milestones")
278
+ }),
271
279
  /* @__PURE__ */ z("span", { children: r("progressTitle") }),
280
+ /* @__PURE__ */ z("span", {
281
+ className: G,
282
+ children: r("updated")
283
+ }),
272
284
  /* @__PURE__ */ z("span", {})
273
285
  ]
274
- }), /* @__PURE__ */ z("ul", { children: c.map((e) => /* @__PURE__ */ z(K, {
286
+ }), /* @__PURE__ */ z("ul", { children: c.map((e) => /* @__PURE__ */ z(q, {
275
287
  ...n(e.project),
276
288
  depth: e.depth,
277
289
  childCount: e.children,
@@ -281,70 +293,70 @@ function ge({ projects: e, pool: t, rowProps: n }) {
281
293
  }, e.project.id)) })]
282
294
  });
283
295
  }
284
- function G({ project: e }) {
296
+ function K({ project: e }) {
285
297
  return e.icon || e.color ? /* @__PURE__ */ z(r, {
286
298
  icon: e.icon ?? "",
287
299
  color: e.color ?? "",
288
300
  name: e.name
289
301
  }) : /* @__PURE__ */ z(c, { className: "size-4 text-muted-foreground" });
290
302
  }
291
- function K({ workspace: e, project: t, onContextMenu: n, menu: r, depth: i = 0, childCount: o = 0, folded: c = !1, muted: l = !1, onFold: d }) {
292
- let g = R("planning"), _ = R("common"), v = O(), y = u(), { person: x } = b(e), S = t.lead ? x(t.lead) : void 0, C = h(t);
303
+ function q({ workspace: e, project: n, onContextMenu: r, menu: i, depth: o = 0, childCount: c = 0, folded: l = !1, muted: d = !1, onFold: g }) {
304
+ let _ = R("planning"), v = R("common"), y = k(), x = u(), { person: ee } = b(e), S = n.lead ? ee(n.lead) : void 0, C = h(n), { data: w } = V(t(e)), T = w.filter((e) => n.teamIds.includes(e.id)).map((e) => e.name), E = c > 0 ? n.treeProgress : n.progress;
293
305
  return /* @__PURE__ */ B("li", {
294
306
  className: "group flex items-center border-b border-border pr-2 hover:bg-muted/60",
295
307
  children: [
296
308
  /* @__PURE__ */ z("span", {
297
309
  className: "flex shrink-0 justify-end pl-2 md:pl-3",
298
- style: { width: `${i * 1.25 + 2}rem` },
299
- children: o > 0 && /* @__PURE__ */ z("button", {
310
+ style: { width: `${o * 1.25 + 2}rem` },
311
+ children: c > 0 && /* @__PURE__ */ z("button", {
300
312
  type: "button",
301
- onClick: d,
302
- "aria-expanded": !c,
303
- "aria-label": g(c ? "showSubProjects" : "hideSubProjects", { name: t.name }),
313
+ onClick: g,
314
+ "aria-expanded": !l,
315
+ "aria-label": _(l ? "showSubProjects" : "hideSubProjects", { name: n.name }),
304
316
  className: "rounded p-1 text-muted-foreground hover:bg-muted hover:text-foreground",
305
- children: /* @__PURE__ */ z(a, { className: `size-3.5 transition-transform ${c ? "-rotate-90" : ""}` })
317
+ children: /* @__PURE__ */ z(a, { className: `size-3.5 transition-transform ${l ? "-rotate-90" : ""}` })
306
318
  })
307
319
  }),
308
- /* @__PURE__ */ B(D, {
320
+ /* @__PURE__ */ B(O, {
309
321
  to: "/$workspace/projects/$projectId",
310
322
  params: {
311
323
  workspace: e,
312
- projectId: T(t)
324
+ projectId: D(n)
313
325
  },
314
- onContextMenu: n,
315
- className: `flex min-w-0 flex-1 flex-wrap items-center gap-x-3 gap-y-1 py-2.5 pl-1 ${W} ${l ? "opacity-60" : ""}`,
326
+ onContextMenu: r,
327
+ className: `flex min-w-0 flex-1 flex-wrap items-center gap-x-3 gap-y-1 py-2.5 pl-1 ${W} ${d ? "opacity-60" : ""}`,
316
328
  children: [
317
329
  /* @__PURE__ */ B("span", {
318
330
  className: "flex min-w-0 basis-full items-center gap-2.5 @4xl:basis-auto",
319
- children: [/* @__PURE__ */ z(G, { project: t }), /* @__PURE__ */ B("span", {
331
+ children: [/* @__PURE__ */ z(K, { project: n }), /* @__PURE__ */ B("span", {
320
332
  className: "min-w-0",
321
333
  children: [/* @__PURE__ */ z("span", {
322
334
  className: "block truncate text-sm font-medium",
323
- children: t.name
324
- }), t.summary && /* @__PURE__ */ z("span", {
335
+ children: n.name
336
+ }), n.summary && /* @__PURE__ */ z("span", {
325
337
  className: "block truncate text-xs text-muted-foreground",
326
- children: t.summary
338
+ children: n.summary
327
339
  })]
328
340
  })]
329
341
  }),
330
342
  /* @__PURE__ */ B("span", {
331
343
  className: "flex items-center gap-1.5 whitespace-nowrap text-xs text-muted-foreground",
332
- children: [/* @__PURE__ */ z(f, { state: C }), g(`health.${C}`)]
344
+ children: [/* @__PURE__ */ z(f, { state: C }), _(`health.${C}`)]
333
345
  }),
334
346
  /* @__PURE__ */ z(N, {
335
- content: y[t.priority],
347
+ content: x[n.priority],
336
348
  children: /* @__PURE__ */ z("span", {
337
349
  role: "img",
338
- "aria-label": y[t.priority],
350
+ "aria-label": x[n.priority],
339
351
  className: "flex",
340
- children: /* @__PURE__ */ z(s, { priority: t.priority })
352
+ children: /* @__PURE__ */ z(s, { priority: n.priority })
341
353
  })
342
354
  }),
343
355
  /* @__PURE__ */ z("span", {
344
356
  className: "flex",
345
357
  children: S && /* @__PURE__ */ z(N, {
346
- content: g("leadIs", { name: S.name }),
347
- children: /* @__PURE__ */ z("span", { children: /* @__PURE__ */ z(k, {
358
+ content: _("leadIs", { name: S.name }),
359
+ children: /* @__PURE__ */ z("span", { children: /* @__PURE__ */ z(A, {
348
360
  name: S.name,
349
361
  src: S.avatarUrl,
350
362
  size: "sm"
@@ -352,53 +364,78 @@ function K({ workspace: e, project: t, onContextMenu: n, menu: r, depth: i = 0,
352
364
  })
353
365
  }),
354
366
  /* @__PURE__ */ z("span", {
355
- className: "text-xs text-muted-foreground tabular-nums",
356
- children: t.targetDate ? v.day(t.targetDate) : ""
367
+ className: `${G} truncate text-xs text-muted-foreground`,
368
+ title: T.join(", "),
369
+ children: T.join(", ")
370
+ }),
371
+ /* @__PURE__ */ z("span", {
372
+ className: "text-xs whitespace-nowrap text-muted-foreground tabular-nums",
373
+ children: (n.startDate || n.targetDate) && _("dateRange", {
374
+ start: n.startDate ? y.day(n.startDate) : "…",
375
+ end: n.targetDate ? y.day(n.targetDate) : "…"
376
+ })
377
+ }),
378
+ /* @__PURE__ */ z("span", {
379
+ className: `${G} text-xs whitespace-nowrap text-muted-foreground tabular-nums`,
380
+ children: n.milestones.length > 0 && _("milestoneCount", { count: n.milestones.length })
381
+ }),
382
+ /* @__PURE__ */ B("span", {
383
+ className: "flex items-center gap-2",
384
+ children: [/* @__PURE__ */ z(p, {
385
+ progress: E,
386
+ compact: !0
387
+ }), /* @__PURE__ */ z("span", {
388
+ className: "text-xs whitespace-nowrap text-muted-foreground tabular-nums",
389
+ children: _("doneOfTotal", {
390
+ done: E.completed,
391
+ total: E.total
392
+ })
393
+ })]
394
+ }),
395
+ /* @__PURE__ */ z("span", {
396
+ className: `${G} text-xs whitespace-nowrap text-muted-foreground`,
397
+ children: y.relative(n.updatedAt)
357
398
  }),
358
- /* @__PURE__ */ z("span", { children: /* @__PURE__ */ z(p, {
359
- progress: o > 0 ? t.treeProgress : t.progress,
360
- compact: !0
361
- }) }),
362
399
  /* @__PURE__ */ z(N, {
363
- content: g(`status.${t.status}`),
400
+ content: _(`status.${n.status}`),
364
401
  children: /* @__PURE__ */ z("span", {
365
402
  role: "img",
366
- "aria-label": g(`status.${t.status}`),
403
+ "aria-label": _(`status.${n.status}`),
367
404
  className: "flex",
368
- children: /* @__PURE__ */ z(m, { status: t.status })
405
+ children: /* @__PURE__ */ z(m, { status: n.status })
369
406
  })
370
407
  })
371
408
  ]
372
409
  }),
373
410
  /* @__PURE__ */ z(H, {
374
- items: r,
375
- label: _("moreActionsFor", { name: t.name })
411
+ items: i,
412
+ label: v("moreActionsFor", { name: n.name })
376
413
  })
377
414
  ]
378
415
  });
379
416
  }
380
- var q = 864e5, J = 5, Y = 64, X = 256, Z = 56, Q = (e) => Date.parse(`${e}T00:00:00Z`), $ = (e) => {
417
+ var J = 864e5, Y = 5, X = 64, Z = 256, Q = 56, _e = (e) => Date.parse(`${e}T00:00:00Z`), $ = (e) => {
381
418
  let t = new Date(e);
382
419
  return Date.UTC(t.getUTCFullYear(), t.getUTCMonth(), 1);
383
- }, _e = () => {
420
+ }, ve = () => {
384
421
  let e = /* @__PURE__ */ new Date();
385
422
  return Date.UTC(e.getFullYear(), e.getMonth(), e.getDate());
386
- }, ve = (e) => e - (new Date(e).getUTCDay() + 6) % 7 * q;
387
- function ye({ workspace: e, projects: t, rowProps: n }) {
423
+ }, ye = (e) => e - (new Date(e).getUTCDay() + 6) % 7 * J;
424
+ function be({ workspace: e, projects: t, rowProps: n }) {
388
425
  let r = R("planning"), i = L(), a = F(null), [o, s] = I({
389
426
  left: 0,
390
427
  width: 0
391
- }), c = _e(), l = t.map((e) => {
392
- let t = e.targetDate ? Q(e.targetDate) : void 0;
428
+ }), c = ve(), l = t.map((e) => {
429
+ let t = e.targetDate ? _e(e.targetDate) : void 0;
393
430
  return {
394
431
  p: e,
395
- start: e.startDate ? Q(e.startDate) : t === void 0 ? void 0 : Math.min(Date.parse(e.createdAt), t),
432
+ start: e.startDate ? _e(e.startDate) : t === void 0 ? void 0 : Math.min(Date.parse(e.createdAt), t),
396
433
  end: t
397
434
  };
398
- }), 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 = [];
399
- for (let e = d; e < f; e = $(e + 32 * q)) h.push(e);
435
+ }), u = l.flatMap((e) => [e.start, e.end].filter((e) => e !== void 0)), d = $(Math.min(c - 90 * J, ...u)), f = $(Math.max(c + 300 * J, ...u) + 40 * J), p = (e) => (e - d) / J * Y, m = p(f), h = [];
436
+ for (let e = d; e < f; e = $(e + 32 * J)) h.push(e);
400
437
  let g = [];
401
- for (let e = ve(d) + 7 * q; e < f; e += 7 * q) g.push(e);
438
+ for (let e = ye(d) + 7 * J; e < f; e += 7 * J) g.push(e);
402
439
  let _ = (e, t) => i.dateTime(new Date(e), {
403
440
  ...t,
404
441
  timeZone: "UTC"
@@ -412,12 +449,12 @@ function ye({ workspace: e, projects: t, rowProps: n }) {
412
449
  let e = a.current;
413
450
  e && s({
414
451
  left: e.scrollLeft,
415
- width: e.clientWidth - X
452
+ width: e.clientWidth - Z
416
453
  });
417
454
  }, b = (e = "smooth") => {
418
455
  let t = a.current;
419
456
  t && t.scrollTo({
420
- left: p(c) - (t.clientWidth - X) / 2,
457
+ left: p(c) - (t.clientWidth - Z) / 2,
421
458
  behavior: e
422
459
  });
423
460
  };
@@ -428,22 +465,22 @@ function ye({ workspace: e, projects: t, rowProps: n }) {
428
465
  children: /* @__PURE__ */ B("div", {
429
466
  className: "relative",
430
467
  style: {
431
- width: m + X,
468
+ width: m + Z,
432
469
  minHeight: "100%"
433
470
  },
434
471
  children: [
435
472
  /* @__PURE__ */ z("div", {
436
473
  "aria-hidden": "true",
437
474
  className: "pointer-events-none sticky left-0 z-[2] float-left -mb-[100vh] h-full min-h-[100vh] border-r border-border bg-background",
438
- style: { width: X }
475
+ style: { width: Z }
439
476
  }),
440
477
  /* @__PURE__ */ B("div", {
441
478
  className: "sticky top-0 z-[3] flex border-b border-border bg-background",
442
- style: { height: Z },
479
+ style: { height: Q },
443
480
  children: [/* @__PURE__ */ z("div", {
444
481
  className: "sticky left-0 z-[3] flex shrink-0 items-end border-r border-border bg-background px-4 pb-2",
445
- style: { width: X },
446
- children: /* @__PURE__ */ z(A, {
482
+ style: { width: Z },
483
+ children: /* @__PURE__ */ z(j, {
447
484
  type: "button",
448
485
  size: "xs",
449
486
  onClick: () => b(),
@@ -481,43 +518,43 @@ function ye({ workspace: e, projects: t, rowProps: n }) {
481
518
  "aria-hidden": "true",
482
519
  className: "pointer-events-none absolute bottom-0 border-l border-dashed border-border/40",
483
520
  style: {
484
- left: X + p(e),
485
- top: Z
521
+ left: Z + p(e),
522
+ top: Q
486
523
  }
487
524
  }, e)),
488
525
  h.map((e) => /* @__PURE__ */ z("div", {
489
526
  "aria-hidden": "true",
490
527
  className: "pointer-events-none absolute bottom-0 w-px bg-border/70",
491
528
  style: {
492
- left: X + p(e),
493
- top: Z
529
+ left: Z + p(e),
530
+ top: Q
494
531
  }
495
532
  }, e)),
496
533
  /* @__PURE__ */ z("div", {
497
534
  "aria-hidden": "true",
498
535
  className: "pointer-events-none absolute bottom-0 z-[1] w-px bg-primary",
499
536
  style: {
500
- left: X + p(c),
501
- top: Z
537
+ left: Z + p(c),
538
+ top: Q
502
539
  }
503
540
  }),
504
541
  /* @__PURE__ */ z("ul", {
505
542
  className: "relative",
506
543
  children: l.map(({ p: t, start: r, end: i }) => {
507
- let a = r !== void 0 && i !== void 0, s = a ? p(r) : 0, l = a ? Math.max(p(i + q), s + 24) : 0, u = a && l < o.left, d = a && s > o.left + o.width, f = a ? Math.min(Math.max(p(c) - s, 0), l - s) : 0, h = Math.min(Math.max(o.left + 8 - s, 0), Math.max(l - s - 80, 0));
544
+ let a = r !== void 0 && i !== void 0, s = a ? p(r) : 0, l = a ? Math.max(p(i + J), s + 24) : 0, u = a && l < o.left, d = a && s > o.left + o.width, f = a ? Math.min(Math.max(p(c) - s, 0), l - s) : 0, h = Math.min(Math.max(o.left + 8 - s, 0), Math.max(l - s - 80, 0));
508
545
  return /* @__PURE__ */ B("li", {
509
546
  className: "group flex hover:bg-muted/40",
510
- style: { height: Y },
511
- children: [/* @__PURE__ */ z(be, { ...n(t) }), /* @__PURE__ */ B("div", {
547
+ style: { height: X },
548
+ children: [/* @__PURE__ */ z(xe, { ...n(t) }), /* @__PURE__ */ B("div", {
512
549
  className: "relative",
513
550
  style: { width: m },
514
551
  children: [a && !u && !d && /* @__PURE__ */ z(N, {
515
552
  content: `${t.name}, ${v(r, i)}`,
516
- children: /* @__PURE__ */ B(D, {
553
+ children: /* @__PURE__ */ B(O, {
517
554
  to: "/$workspace/projects/$projectId",
518
555
  params: {
519
556
  workspace: e,
520
- projectId: T(t)
557
+ projectId: D(t)
521
558
  },
522
559
  className: "absolute top-2 bottom-2 flex flex-col justify-end gap-1",
523
560
  style: {
@@ -542,11 +579,11 @@ function ye({ workspace: e, projects: t, rowProps: n }) {
542
579
  })]
543
580
  })]
544
581
  })
545
- }), (u || d) && /* @__PURE__ */ B(D, {
582
+ }), (u || d) && /* @__PURE__ */ B(O, {
546
583
  to: "/$workspace/projects/$projectId",
547
584
  params: {
548
585
  workspace: e,
549
- projectId: T(t)
586
+ projectId: D(t)
550
587
  },
551
588
  className: "absolute top-1/2 flex -translate-y-1/2 items-center gap-1.5 whitespace-nowrap text-xs text-muted-foreground hover:text-foreground",
552
589
  style: u ? { left: o.left + 12 } : {
@@ -573,19 +610,19 @@ function ye({ workspace: e, projects: t, rowProps: n }) {
573
610
  })
574
611
  });
575
612
  }
576
- function be({ workspace: e, project: t, onContextMenu: n }) {
613
+ function xe({ workspace: e, project: t, onContextMenu: n }) {
577
614
  let r = R("planning"), { person: i } = b(e), a = t.lead ? i(t.lead) : void 0, o = h(t);
578
- return /* @__PURE__ */ B(D, {
615
+ return /* @__PURE__ */ B(O, {
579
616
  to: "/$workspace/projects/$projectId",
580
617
  params: {
581
618
  workspace: e,
582
- projectId: T(t)
619
+ projectId: D(t)
583
620
  },
584
621
  onContextMenu: n,
585
622
  className: "sticky left-0 z-[2] flex shrink-0 items-center gap-2 border-r border-border bg-background px-4 group-hover:bg-muted",
586
- style: { width: X },
623
+ style: { width: Z },
587
624
  children: [
588
- /* @__PURE__ */ z(G, { project: t }),
625
+ /* @__PURE__ */ z(K, { project: t }),
589
626
  /* @__PURE__ */ z("span", {
590
627
  className: "min-w-0 flex-1 truncate text-sm",
591
628
  children: t.name
@@ -607,7 +644,7 @@ function be({ workspace: e, project: t, onContextMenu: n }) {
607
644
  children: /* @__PURE__ */ z(f, { state: o })
608
645
  })
609
646
  }),
610
- a && /* @__PURE__ */ z(k, {
647
+ a && /* @__PURE__ */ z(A, {
611
648
  name: a.name,
612
649
  src: a.avatarUrl,
613
650
  size: "xs",
@@ -616,7 +653,7 @@ function be({ workspace: e, project: t, onContextMenu: n }) {
616
653
  ]
617
654
  });
618
655
  }
619
- function xe({ workspace: e, projects: n, health: i, onHealth: a }) {
656
+ function Se({ workspace: e, projects: n, health: i, onHealth: a }) {
620
657
  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 ?? ""))];
621
658
  return /* @__PURE__ */ B("aside", {
622
659
  "aria-label": o("breakdown"),
@@ -684,7 +721,7 @@ function xe({ workspace: e, projects: n, health: i, onHealth: a }) {
684
721
  return /* @__PURE__ */ B("li", {
685
722
  className: p,
686
723
  children: [
687
- t ? /* @__PURE__ */ z(k, {
724
+ t ? /* @__PURE__ */ z(A, {
688
725
  name: t.name,
689
726
  src: t.avatarUrl,
690
727
  size: "xs",
@@ -5,6 +5,7 @@ var e = (e, t = !1) => ({
5
5
  ...!t && { subProjects: !0 }
6
6
  }), t = [
7
7
  "overview",
8
+ "gantt",
8
9
  "updates",
9
10
  "issues"
10
11
  ];