@parallelworks/tandem-web 0.139.0 → 0.139.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,13 +1,13 @@
1
- import { Link as e, useNavigate as t } from "../../lib/router.js";
2
- import { Route as n } from "./notifications.js";
3
- import { eventsQuery as r, issueDecisionsQuery as i, issueQuery as a, notificationsQuery as o, teamsQuery as s } from "../../api/queries.js";
4
- import { ArchiveIcon as c, CheckIcon as l, FileTextIcon as u, InboxIcon as d, PriorityIcon as f, ProjectIcon as p, StatusIcon as m, usePriorityNames as h } from "../../components/icons.js";
5
- import { copyItem as g, useLinkItems as _ } from "../../lib/menus.js";
6
- import { usePeople as v } from "../../lib/people.js";
7
- import { usePageTitle as ee } from "../../lib/pageTitle.js";
8
- import { PersonHoverCard as y } from "../../components/PersonHoverCard.js";
9
- import { Editor as b } from "../../components/Editor.js";
10
- import { useArchiveNotifications as te, useReadNotifications as x, useUnreadNotifications as S } from "../../lib/notifications.js";
1
+ import { usePageTitle as e } from "../../lib/pageTitle.js";
2
+ import { Link as t, useNavigate as n } from "../../lib/router.js";
3
+ import { Route as r } from "./notifications.js";
4
+ import { eventsQuery as i, issueDecisionsQuery as a, issueQuery as o, notificationsQuery as s, teamsQuery as c } from "../../api/queries.js";
5
+ import { ArchiveIcon as l, CheckIcon as u, FileTextIcon as d, InboxIcon as f, PriorityIcon as p, ProjectIcon as m, StatusIcon as h, usePriorityNames as g } from "../../components/icons.js";
6
+ import { copyItem as _, useLinkItems as v } from "../../lib/menus.js";
7
+ import { usePeople as y } from "../../lib/people.js";
8
+ import { PersonHoverCard as b } from "../../components/PersonHoverCard.js";
9
+ import { Editor as x } from "../../components/Editor.js";
10
+ import { useArchiveNotifications as ee, useReadNotifications as S, useUnreadNotifications as te } from "../../lib/notifications.js";
11
11
  import { useShortcuts as ne } from "../../lib/shortcuts.js";
12
12
  import { parseApproval as C } from "../../lib/approval.js";
13
13
  import { DecisionCard as w } from "../../components/AgentWork.js";
@@ -88,34 +88,34 @@ function le(e, t) {
88
88
  });
89
89
  }
90
90
  function J() {
91
- let { workspace: e } = n.useParams(), { issue: r } = n.useSearch(), i = R("notifications"), a = t(), { data: { notifications: u, unread: f } } = oe(o(e));
92
- ee(f > 0 ? `${i("title")} (${f})` : i("title"));
93
- let p = x(e), m = S(e), h = te(e), { data: g = [] } = H(s(e)), _ = le(e, g), v = _.activeFilterCount > 0, y = (_.filters.state ?? []).includes("unread"), b = _.filters.kind ?? [], C = _.filters.team ?? [], w = L(() => {
94
- let t = u.filter((e) => (b.length === 0 || b.some((t) => G[t]?.includes(e.reason))) && (C.length === 0 || !!e.identifier && C.includes(q(e.identifier))));
95
- return ce(e, t).filter((e) => !y || e.unread.length > 0 || e.key === r);
91
+ let { workspace: t } = r.useParams(), { issue: i } = r.useSearch(), a = R("notifications"), o = n(), { data: { notifications: d, unread: p } } = oe(s(t));
92
+ e(p > 0 ? `${a("title")} (${p})` : a("title"));
93
+ let m = S(t), h = te(t), g = ee(t), { data: _ = [] } = H(c(t)), v = le(t, _), y = v.activeFilterCount > 0, b = (v.filters.state ?? []).includes("unread"), x = v.filters.kind ?? [], C = v.filters.team ?? [], w = L(() => {
94
+ let e = d.filter((e) => (x.length === 0 || x.some((t) => G[t]?.includes(e.reason))) && (C.length === 0 || !!e.identifier && C.includes(q(e.identifier))));
95
+ return ce(t, e).filter((e) => !b || e.unread.length > 0 || e.key === i);
96
96
  }, [
97
- e,
98
- u,
99
- y,
97
+ t,
98
+ d,
100
99
  b,
100
+ x,
101
101
  C,
102
- r
103
- ]), T = w.findIndex((e) => e.key === r), E = T >= 0 ? w[T] : void 0, [D, O] = ae(/* @__PURE__ */ new Set()), A = ie(null), N = L(() => w.filter((e) => D.has(e.key)), [w, D]), P = (t) => {
104
- a({
102
+ i
103
+ ]), T = w.findIndex((e) => e.key === i), E = T >= 0 ? w[T] : void 0, [D, O] = ae(/* @__PURE__ */ new Set()), A = ie(null), N = L(() => w.filter((e) => D.has(e.key)), [w, D]), P = (e) => {
104
+ o({
105
105
  to: "/$workspace/notifications",
106
- params: { workspace: e },
107
- search: t ? { issue: t.key } : {},
106
+ params: { workspace: t },
107
+ search: e ? { issue: e.key } : {},
108
108
  replace: !0
109
- }), t && t.unread.length > 0 && p.mutate(t.unread);
109
+ }), e && e.unread.length > 0 && m.mutate(e.unread);
110
110
  }, F = (e) => {
111
111
  let t = e.flatMap((e) => e.unread);
112
- t.length > 0 ? p.mutate(t) : m.mutate(e.flatMap((e) => e.items.map((e) => e.id)));
112
+ t.length > 0 ? m.mutate(t) : h.mutate(e.flatMap((e) => e.items.map((e) => e.id)));
113
113
  }, I = (e) => {
114
- if (h.mutate(e.flatMap((e) => e.items.map((e) => e.id))), O(/* @__PURE__ */ new Set()), E && e.includes(E)) {
114
+ if (g.mutate(e.flatMap((e) => e.items.map((e) => e.id))), O(/* @__PURE__ */ new Set()), E && e.includes(E)) {
115
115
  let t = w.filter((t) => !e.includes(t));
116
116
  P(t[t.findIndex((e) => w.indexOf(e) > T)] ?? t.at(-1));
117
117
  }
118
- }, U = (e) => a({ to: e.href }), K = N.length > 0 ? N : E ? [E] : [], J = (e) => O((t) => {
118
+ }, U = (e) => o({ to: e.href }), K = N.length > 0 ? N : E ? [E] : [], J = (e) => O((t) => {
119
119
  let n = new Set(t);
120
120
  return n.has(e.key) ? n.delete(e.key) : n.add(e.key), n;
121
121
  }), Y = (e, t) => {
@@ -161,41 +161,41 @@ function J() {
161
161
  children: [
162
162
  /* @__PURE__ */ B("h1", {
163
163
  className: "text-sm font-semibold",
164
- children: i("title")
164
+ children: a("title")
165
165
  }),
166
166
  /* @__PURE__ */ B("span", {
167
167
  className: "min-w-0 flex-1 truncate text-xs text-muted-foreground",
168
- children: i("unreadCount", { count: f })
168
+ children: a("unreadCount", { count: p })
169
169
  }),
170
- /* @__PURE__ */ B(se, { view: _ }),
171
- f > 0 && /* @__PURE__ */ V(z, { children: [/* @__PURE__ */ B(k, {
170
+ /* @__PURE__ */ B(se, { view: v }),
171
+ p > 0 && /* @__PURE__ */ V(z, { children: [/* @__PURE__ */ B(k, {
172
172
  type: "button",
173
173
  size: "sm",
174
- loading: p.isPending,
175
- onClick: () => p.mutate(void 0),
174
+ loading: m.isPending,
175
+ onClick: () => m.mutate(void 0),
176
176
  className: "@max-3xl:hidden",
177
- children: i("markAllRead")
177
+ children: a("markAllRead")
178
178
  }), /* @__PURE__ */ B(M, {
179
- icon: /* @__PURE__ */ B(l, {}),
180
- label: i("markAllRead"),
179
+ icon: /* @__PURE__ */ B(u, {}),
180
+ label: a("markAllRead"),
181
181
  size: "sm",
182
- disabled: p.isPending,
183
- onClick: () => p.mutate(void 0),
182
+ disabled: m.isPending,
183
+ onClick: () => m.mutate(void 0),
184
184
  className: "@3xl:hidden"
185
185
  })] }),
186
186
  w.some((e) => e.unread.length === 0) && /* @__PURE__ */ V(z, { children: [/* @__PURE__ */ B(k, {
187
187
  type: "button",
188
188
  size: "sm",
189
- loading: h.isPending,
190
- onClick: () => h.mutate(void 0),
189
+ loading: g.isPending,
190
+ onClick: () => g.mutate(void 0),
191
191
  className: "@max-3xl:hidden",
192
- children: i("archiveRead")
192
+ children: a("archiveRead")
193
193
  }), /* @__PURE__ */ B(M, {
194
- icon: /* @__PURE__ */ B(c, {}),
195
- label: i("archiveRead"),
194
+ icon: /* @__PURE__ */ B(l, {}),
195
+ label: a("archiveRead"),
196
196
  size: "sm",
197
- disabled: h.isPending,
198
- onClick: () => h.mutate(void 0),
197
+ disabled: g.isPending,
198
+ onClick: () => g.mutate(void 0),
199
199
  className: "@3xl:hidden"
200
200
  })] })
201
201
  ]
@@ -205,13 +205,13 @@ function J() {
205
205
  children: [
206
206
  /* @__PURE__ */ B("span", {
207
207
  className: "font-medium text-human",
208
- children: i("selected", { count: N.length })
208
+ children: a("selected", { count: N.length })
209
209
  }),
210
210
  N.length < w.length && /* @__PURE__ */ B("button", {
211
211
  type: "button",
212
212
  onClick: () => O(new Set(w.map((e) => e.key))),
213
213
  className: "hover:underline",
214
- children: i("selectAll", { count: w.length })
214
+ children: a("selectAll", { count: w.length })
215
215
  }),
216
216
  /* @__PURE__ */ V("div", {
217
217
  className: "ml-auto flex items-center gap-1.5",
@@ -219,27 +219,27 @@ function J() {
219
219
  /* @__PURE__ */ B(k, {
220
220
  type: "button",
221
221
  size: "sm",
222
- onClick: () => p.mutate(N.flatMap((e) => e.unread)),
222
+ onClick: () => m.mutate(N.flatMap((e) => e.unread)),
223
223
  disabled: N.every((e) => e.unread.length === 0),
224
- children: i("markRead")
224
+ children: a("markRead")
225
225
  }),
226
226
  /* @__PURE__ */ B(k, {
227
227
  type: "button",
228
228
  size: "sm",
229
- onClick: () => m.mutate(N.flatMap((e) => e.items.map((e) => e.id))),
230
- children: i("markUnread")
229
+ onClick: () => h.mutate(N.flatMap((e) => e.items.map((e) => e.id))),
230
+ children: a("markUnread")
231
231
  }),
232
232
  /* @__PURE__ */ B(k, {
233
233
  type: "button",
234
234
  size: "sm",
235
235
  onClick: () => I(N),
236
- children: i("archive")
236
+ children: a("archive")
237
237
  }),
238
238
  /* @__PURE__ */ B("button", {
239
239
  type: "button",
240
240
  onClick: () => O(/* @__PURE__ */ new Set()),
241
241
  className: "shrink-0 px-1 hover:underline",
242
- children: i("clear")
242
+ children: a("clear")
243
243
  })
244
244
  ]
245
245
  })
@@ -247,43 +247,43 @@ function J() {
247
247
  }),
248
248
  w.length === 0 ? /* @__PURE__ */ B("div", {
249
249
  className: "min-h-0 flex-1 overflow-y-auto p-6",
250
- children: v ? /* @__PURE__ */ B(j, {
251
- icon: /* @__PURE__ */ B(d, {}),
252
- title: i("noneMatch"),
250
+ children: y ? /* @__PURE__ */ B(j, {
251
+ icon: /* @__PURE__ */ B(f, {}),
252
+ title: a("noneMatch"),
253
253
  action: /* @__PURE__ */ B(k, {
254
254
  type: "button",
255
255
  size: "sm",
256
- onClick: _.clearFilters,
257
- children: i("showEverything")
256
+ onClick: v.clearFilters,
257
+ children: a("showEverything")
258
258
  })
259
259
  }) : /* @__PURE__ */ B(j, {
260
- icon: /* @__PURE__ */ B(d, {}),
261
- title: i("emptyTitle"),
262
- description: i("emptyDescription")
260
+ icon: /* @__PURE__ */ B(f, {}),
261
+ title: a("emptyTitle"),
262
+ description: a("emptyDescription")
263
263
  })
264
264
  }) : /* @__PURE__ */ V("div", {
265
265
  className: "flex min-h-0 flex-1",
266
266
  children: [/* @__PURE__ */ B("ul", {
267
- "aria-label": i("title"),
267
+ "aria-label": a("title"),
268
268
  className: W("min-h-0 min-w-0 flex-1 flex-col overflow-y-auto px-2 py-2 md:flex md:max-w-md md:border-r md:border-border", E ? "hidden" : "flex"),
269
- children: w.map((t) => /* @__PURE__ */ B(ue, {
270
- workspace: e,
271
- group: t,
272
- selected: t === E,
273
- picked: D.has(t.key),
269
+ children: w.map((e) => /* @__PURE__ */ B(ue, {
270
+ workspace: t,
271
+ group: e,
272
+ selected: e === E,
273
+ picked: D.has(e.key),
274
274
  actions: Q
275
- }, t.key))
275
+ }, e.key))
276
276
  }), /* @__PURE__ */ B("div", {
277
277
  className: W("min-w-0 flex-1 overflow-y-auto md:block", E ? "block" : "hidden"),
278
278
  children: E ? /* @__PURE__ */ B(de, {
279
- workspace: e,
279
+ workspace: t,
280
280
  group: E,
281
281
  actions: Q
282
282
  }) : /* @__PURE__ */ B("div", {
283
283
  className: "px-6 py-24",
284
284
  children: /* @__PURE__ */ B(j, {
285
- title: i("noneSelected"),
286
- description: i("shortcuts")
285
+ title: a("noneSelected"),
286
+ description: a("shortcuts")
287
287
  })
288
288
  })
289
289
  })]
@@ -292,7 +292,7 @@ function J() {
292
292
  });
293
293
  }
294
294
  function Y(e) {
295
- let t = R("notifications"), n = _();
295
+ let t = R("notifications"), n = v();
296
296
  return (r) => {
297
297
  let [i] = r;
298
298
  return [
@@ -309,22 +309,22 @@ function Y(e) {
309
309
  ...r.length === 1 && i ? [
310
310
  F,
311
311
  ...n(i.href),
312
- ...i.identifier ? [g(t("copyId"), i.identifier)] : []
312
+ ...i.identifier ? [_(t("copyId"), i.identifier)] : []
313
313
  ] : []
314
314
  ];
315
315
  };
316
316
  }
317
317
  function X(e) {
318
- let { actorName: t } = v(e);
318
+ let { actorName: t } = y(e);
319
319
  return (e) => e.actor.kind === "agent" && e.agentName ? e.agentName : t(e.actor);
320
320
  }
321
- function ue({ workspace: t, group: n, selected: r, picked: i, actions: a }) {
322
- let o = R("notifications"), { avatarOf: s } = v(t), c = X(t), l = I(), u = Y(a), d = n.items[0], f = c(d), p = n.unread.length > 0;
321
+ function ue({ workspace: e, group: n, selected: r, picked: i, actions: a }) {
322
+ let o = R("notifications"), { avatarOf: s } = y(e), c = X(e), l = I(), u = Y(a), d = n.items[0], f = c(d), p = n.unread.length > 0;
323
323
  return /* @__PURE__ */ B("li", {
324
324
  id: `inbox-${n.key}`,
325
- children: /* @__PURE__ */ V(e, {
325
+ children: /* @__PURE__ */ V(t, {
326
326
  to: "/$workspace/notifications",
327
- params: { workspace: t },
327
+ params: { workspace: e },
328
328
  search: { issue: n.key },
329
329
  replace: !0,
330
330
  onClick: (e) => {
@@ -395,7 +395,7 @@ function ue({ workspace: t, group: n, selected: r, picked: i, actions: a }) {
395
395
  });
396
396
  }
397
397
  function Z({ workspace: e, identifier: t }) {
398
- let { data: n } = H(a(e, t)), r = h(), { nameOf: i, avatarOf: o } = v(e);
398
+ let { data: n } = H(o(e, t)), r = g(), { nameOf: i, avatarOf: a } = y(e);
399
399
  return n ? /* @__PURE__ */ V("section", {
400
400
  className: "mt-5 rounded-lg border border-border px-4 py-3",
401
401
  children: [/* @__PURE__ */ V("div", {
@@ -403,17 +403,17 @@ function Z({ workspace: e, identifier: t }) {
403
403
  children: [
404
404
  /* @__PURE__ */ V("span", {
405
405
  className: "inline-flex items-center gap-1.5",
406
- children: [/* @__PURE__ */ B(m, { category: n.status.category }), n.status.name]
406
+ children: [/* @__PURE__ */ B(h, { category: n.status.category }), n.status.name]
407
407
  }),
408
408
  n.priority > 0 && /* @__PURE__ */ V("span", {
409
409
  className: "inline-flex items-center gap-1.5",
410
- children: [/* @__PURE__ */ B(f, { priority: n.priority }), r[n.priority]]
410
+ children: [/* @__PURE__ */ B(p, { priority: n.priority }), r[n.priority]]
411
411
  }),
412
412
  n.assignees.map((e) => /* @__PURE__ */ V("span", {
413
413
  className: "inline-flex items-center gap-1.5",
414
414
  children: [/* @__PURE__ */ B(O, {
415
415
  name: i(e.kind, e.handle),
416
- src: o(e.kind, e.handle),
416
+ src: a(e.kind, e.handle),
417
417
  size: "xs",
418
418
  decorative: !0
419
419
  }), i(e.kind, e.handle)]
@@ -421,15 +421,15 @@ function Z({ workspace: e, identifier: t }) {
421
421
  ]
422
422
  }), n.body.trim() && /* @__PURE__ */ B("div", {
423
423
  className: "mt-3 max-h-72 overflow-y-auto text-sm",
424
- children: /* @__PURE__ */ B(b, {
424
+ children: /* @__PURE__ */ B(x, {
425
425
  value: n.body,
426
426
  editable: !1
427
427
  })
428
428
  })]
429
429
  }) : null;
430
430
  }
431
- function de({ workspace: t, group: n, actions: r }) {
432
- let i = R("notifications"), { avatarOf: a } = v(t), o = X(t), s = I(), c = Y(r);
431
+ function de({ workspace: e, group: n, actions: r }) {
432
+ let i = R("notifications"), { avatarOf: a } = y(e), o = X(e), s = I(), c = Y(r);
433
433
  return /* @__PURE__ */ V("article", {
434
434
  className: "w-full px-4 py-5 md:px-8",
435
435
  onContextMenu: (e) => s(e, c([n])),
@@ -446,7 +446,7 @@ function de({ workspace: t, group: n, actions: r }) {
446
446
  }),
447
447
  /* @__PURE__ */ B("h2", {
448
448
  className: "mt-0.5 text-sm font-semibold",
449
- children: /* @__PURE__ */ B(e, {
449
+ children: /* @__PURE__ */ B(t, {
450
450
  to: n.href,
451
451
  className: "hover:underline",
452
452
  children: n.issueTitle
@@ -455,7 +455,7 @@ function de({ workspace: t, group: n, actions: r }) {
455
455
  /* @__PURE__ */ V("div", {
456
456
  className: "mt-3 flex flex-wrap gap-2",
457
457
  children: [
458
- /* @__PURE__ */ B(e, {
458
+ /* @__PURE__ */ B(t, {
459
459
  to: n.href,
460
460
  className: P({
461
461
  variant: "primary",
@@ -478,10 +478,10 @@ function de({ workspace: t, group: n, actions: r }) {
478
478
  ]
479
479
  }),
480
480
  n.identifier && /* @__PURE__ */ V(z, { children: [/* @__PURE__ */ B(Z, {
481
- workspace: t,
481
+ workspace: e,
482
482
  identifier: n.identifier
483
483
  }), /* @__PURE__ */ B(he, {
484
- workspace: t,
484
+ workspace: e,
485
485
  identifier: n.identifier
486
486
  })] }),
487
487
  /* @__PURE__ */ B(A, {
@@ -491,18 +491,18 @@ function de({ workspace: t, group: n, actions: r }) {
491
491
  interactive: !1,
492
492
  render: /* @__PURE__ */ B("ol", {}),
493
493
  className: "mt-5 overflow-hidden",
494
- children: n.items.map((e) => {
495
- let n = o(e);
494
+ children: n.items.map((t) => {
495
+ let n = o(t);
496
496
  return /* @__PURE__ */ V("li", {
497
497
  className: "flex gap-3 px-3 py-3",
498
- children: [/* @__PURE__ */ B(y, {
499
- workspace: t,
500
- kind: e.actor.kind,
501
- handle: e.actor.handle,
498
+ children: [/* @__PURE__ */ B(b, {
499
+ workspace: e,
500
+ kind: t.actor.kind,
501
+ handle: t.actor.handle,
502
502
  className: "inline-flex shrink-0 self-start",
503
503
  children: /* @__PURE__ */ B(O, {
504
504
  name: n,
505
- src: a(e.actor.kind, e.actor.handle),
505
+ src: a(t.actor.kind, t.actor.handle),
506
506
  size: "sm"
507
507
  })
508
508
  }), /* @__PURE__ */ V("div", {
@@ -510,25 +510,25 @@ function de({ workspace: t, group: n, actions: r }) {
510
510
  children: [/* @__PURE__ */ V("p", {
511
511
  className: "flex items-baseline gap-2 text-sm",
512
512
  children: [/* @__PURE__ */ B("span", {
513
- className: W("flex-1", !e.readAt && "font-medium"),
514
- children: i(e.reason, {
513
+ className: W("flex-1", !t.readAt && "font-medium"),
514
+ children: i(t.reason, {
515
515
  actor: n,
516
- agent: e.agentName ?? n,
517
- date: K(e)
516
+ agent: t.agentName ?? n,
517
+ date: K(t)
518
518
  })
519
519
  }), /* @__PURE__ */ B(N, {
520
- value: e.createdAt,
520
+ value: t.createdAt,
521
521
  format: "compact",
522
522
  exact: "medium",
523
523
  className: "text-xs text-muted-foreground"
524
524
  })]
525
- }), e.excerpt && e.reason !== "reminder" && /* @__PURE__ */ B(pe, { text: e.excerpt })]
525
+ }), t.excerpt && t.reason !== "reminder" && /* @__PURE__ */ B(pe, { text: t.excerpt })]
526
526
  })]
527
- }, e.id);
527
+ }, t.id);
528
528
  })
529
529
  }),
530
530
  n.identifier && /* @__PURE__ */ B(fe, {
531
- workspace: t,
531
+ workspace: e,
532
532
  identifier: n.identifier,
533
533
  since: n.items.at(-1)?.createdAt ?? ""
534
534
  })
@@ -541,13 +541,13 @@ var Q = /* @__PURE__ */ new Set([
541
541
  "decision.requested"
542
542
  ]);
543
543
  function fe({ workspace: e, identifier: t, since: n }) {
544
- let i = R("notifications"), { data: a = [] } = H(r(e, t)), o = a.filter((e) => e.createdAt >= n && !Q.has(e.type) && !e.type.startsWith("comment.") && !e.type.startsWith("issue.reaction_") && e.type !== "issue.body_changed");
544
+ let r = R("notifications"), { data: a = [] } = H(i(e, t)), o = a.filter((e) => e.createdAt >= n && !Q.has(e.type) && !e.type.startsWith("comment.") && !e.type.startsWith("issue.reaction_") && e.type !== "issue.body_changed");
545
545
  return o.length === 0 ? null : /* @__PURE__ */ V("section", {
546
546
  className: "mt-6",
547
- "aria-label": i("alsoHappened"),
547
+ "aria-label": r("alsoHappened"),
548
548
  children: [/* @__PURE__ */ B("h3", {
549
549
  className: "text-xs font-medium text-muted-foreground",
550
- children: i("alsoHappened")
550
+ children: r("alsoHappened")
551
551
  }), /* @__PURE__ */ B(T, {
552
552
  className: "mt-2",
553
553
  children: o.map((t) => /* @__PURE__ */ B(E, {
@@ -574,7 +574,7 @@ function pe({ text: e }) {
574
574
  ]
575
575
  }) : /* @__PURE__ */ B("div", {
576
576
  className: "mt-1 min-w-0 text-sm text-muted-foreground",
577
- children: /* @__PURE__ */ B(b, {
577
+ children: /* @__PURE__ */ B(x, {
578
578
  value: e.replace(/<!--[\s\S]*?(-->|$)/g, "").trim(),
579
579
  editable: !1
580
580
  })
@@ -588,14 +588,14 @@ function me({ text: e }) {
588
588
  }) : D(e);
589
589
  }
590
590
  function he({ workspace: e, identifier: t }) {
591
- let n = R("notifications"), { data: r = [] } = H(i(e, t)), a = r.filter((e) => !e.answer && !e.canceled);
592
- return a.length === 0 ? null : /* @__PURE__ */ V("section", {
591
+ let n = R("notifications"), { data: r = [] } = H(a(e, t)), i = r.filter((e) => !e.answer && !e.canceled);
592
+ return i.length === 0 ? null : /* @__PURE__ */ V("section", {
593
593
  "aria-label": n("waitingOnYou"),
594
594
  className: "mt-5 space-y-3",
595
595
  children: [/* @__PURE__ */ B("h3", {
596
596
  className: "text-xs font-medium text-muted-foreground",
597
597
  children: n("waitingOnYou")
598
- }), a.map((t) => /* @__PURE__ */ B(w, {
598
+ }), i.map((t) => /* @__PURE__ */ B(w, {
599
599
  workspace: e,
600
600
  decision: t
601
601
  }, t.id))]
@@ -608,7 +608,7 @@ function $({ group: e }) {
608
608
  children: e.identifier
609
609
  }) : /* @__PURE__ */ V("span", {
610
610
  className: "inline-flex shrink-0 items-center gap-1 text-xs text-muted-foreground",
611
- children: [e.kind === "doc" ? /* @__PURE__ */ B(u, { className: "size-3" }) : /* @__PURE__ */ B(p, { className: "size-3" }), t(e.kind === "doc" ? "aboutDoc" : "aboutProject")]
611
+ children: [e.kind === "doc" ? /* @__PURE__ */ B(d, { className: "size-3" }) : /* @__PURE__ */ B(m, { className: "size-3" }), t(e.kind === "doc" ? "aboutDoc" : "aboutProject")]
612
612
  });
613
613
  }
614
614
  export { J as component };
@@ -1,8 +1,8 @@
1
- import { Link as e } from "../../../lib/router.js";
2
- import { membersQuery as t, projectsQuery as n, teamMembersQuery as r, teamsQuery as i } from "../../../api/queries.js";
3
- import { MailIcon as a, UserIcon as o } from "../../../components/icons.js";
4
- import { Route as s } from "./_username.js";
5
- import { usePageTitle as c } from "../../../lib/pageTitle.js";
1
+ import { usePageTitle as e } from "../../../lib/pageTitle.js";
2
+ import { Link as t } from "../../../lib/router.js";
3
+ import { membersQuery as n, projectsQuery as r, teamMembersQuery as i, teamsQuery as a } from "../../../api/queries.js";
4
+ import { MailIcon as o, UserIcon as s } from "../../../components/icons.js";
5
+ import { Route as c } from "./_username.js";
6
6
  import { useRoleName as l } from "../../../lib/roles.js";
7
7
  import { EntityIcon as u } from "../../../components/EntityIcon.js";
8
8
  import { projectRef as d } from "../../../lib/projects.js";
@@ -14,20 +14,20 @@ import { jsx as y, jsxs as b } from "react/jsx-runtime";
14
14
  import { useQueries as x, useQuery as S, useSuspenseQuery as C } from "@tanstack/react-query";
15
15
  // src/routes/$workspace/people/$username.tsx?tsr-split=component
16
16
  function w() {
17
- let { workspace: e, username: n } = s.useParams(), { tab: r } = s.useSearch(), i = v("person"), u = l(e), { data: d } = C(t(e)), x = d.find((e) => e.user.username === n);
18
- if (c(x?.user.name ?? n), !x) return /* @__PURE__ */ y("div", {
17
+ let { workspace: t, username: r } = c.useParams(), { tab: i } = c.useSearch(), a = v("person"), u = l(t), { data: d } = C(n(t)), x = d.find((e) => e.user.username === r);
18
+ if (e(x?.user.name ?? r), !x) return /* @__PURE__ */ y("div", {
19
19
  className: "flex h-full items-center justify-center p-6",
20
20
  children: /* @__PURE__ */ y(h, {
21
- icon: /* @__PURE__ */ y(o, {}),
22
- title: i("notFound"),
23
- description: i("notFoundDetail")
21
+ icon: /* @__PURE__ */ y(s, {}),
22
+ title: a("notFound"),
23
+ description: a("notFoundDetail")
24
24
  })
25
25
  });
26
26
  let { user: S } = x;
27
27
  return /* @__PURE__ */ b("div", {
28
28
  className: "flex h-full min-h-0 flex-col",
29
29
  children: [/* @__PURE__ */ b("section", {
30
- "aria-label": i("profile"),
30
+ "aria-label": a("profile"),
31
31
  className: "flex shrink-0 flex-wrap items-start gap-4 border-b border-border px-4 py-5 md:px-6",
32
32
  children: [/* @__PURE__ */ y(m, {
33
33
  name: S.name,
@@ -51,45 +51,45 @@ function w() {
51
51
  children: [/* @__PURE__ */ y("span", { children: `@${S.username}` }), S.email && /* @__PURE__ */ b("a", {
52
52
  href: `mailto:${S.email}`,
53
53
  className: "inline-flex items-center gap-1.5 hover:text-foreground",
54
- children: [/* @__PURE__ */ y(a, { className: "size-3.5" }), S.email]
54
+ children: [/* @__PURE__ */ y(o, { className: "size-3.5" }), S.email]
55
55
  })]
56
56
  }),
57
57
  /* @__PURE__ */ y(T, {
58
- workspace: e,
59
- username: n
58
+ workspace: t,
59
+ username: r
60
60
  }),
61
61
  /* @__PURE__ */ y(_, {
62
62
  variant: "segmented",
63
63
  size: "sm",
64
- label: i("sections"),
65
- items: ["issues", "activity"].map((t) => ({
66
- value: t,
67
- label: i(`section.${t}`),
68
- href: `/${e}/people/${encodeURIComponent(n)}${t === "activity" ? "?tab=activity" : ""}`
64
+ label: a("sections"),
65
+ items: ["issues", "activity"].map((e) => ({
66
+ value: e,
67
+ label: a(`section.${e}`),
68
+ href: `/${t}/people/${encodeURIComponent(r)}${e === "activity" ? "?tab=activity" : ""}`
69
69
  })),
70
- value: r === "activity" ? "activity" : "issues"
70
+ value: i === "activity" ? "activity" : "issues"
71
71
  })
72
72
  ]
73
73
  })]
74
74
  }), /* @__PURE__ */ y("div", {
75
75
  className: "min-h-0 flex-1 overflow-y-auto",
76
- children: r === "activity" ? /* @__PURE__ */ y(p, {
77
- workspace: e,
78
- username: n
79
- }) : /* @__PURE__ */ y(f, { person: n })
76
+ children: i === "activity" ? /* @__PURE__ */ y(p, {
77
+ workspace: t,
78
+ username: r
79
+ }) : /* @__PURE__ */ y(f, { person: r })
80
80
  })]
81
81
  });
82
82
  }
83
- function T({ workspace: t, username: a }) {
84
- let o = v("person"), { data: s = [] } = S(i(t)), { data: c = [] } = S(n(t)), l = s.filter((e) => !e.archivedAt), f = x({ queries: l.map((e) => r(t, e.key)) }), p = l.filter((e, t) => f[t]?.data?.includes(a)), m = (e) => e !== "completed" && e !== "canceled", h = c.filter((e) => m(e.status) && (e.lead === a || e.members.includes(a))), g = "inline-flex max-w-56 items-center gap-1.5 rounded-md border border-border px-2 py-0.5 text-xs hover:bg-muted";
83
+ function T({ workspace: e, username: n }) {
84
+ let o = v("person"), { data: s = [] } = S(a(e)), { data: c = [] } = S(r(e)), l = s.filter((e) => !e.archivedAt), f = x({ queries: l.map((t) => i(e, t.key)) }), p = l.filter((e, t) => f[t]?.data?.includes(n)), m = (e) => e !== "completed" && e !== "canceled", h = c.filter((e) => m(e.status) && (e.lead === n || e.members.includes(n))), g = "inline-flex max-w-56 items-center gap-1.5 rounded-md border border-border px-2 py-0.5 text-xs hover:bg-muted";
85
85
  return /* @__PURE__ */ b("dl", {
86
86
  className: "space-y-1.5 text-xs",
87
87
  children: [p.length > 0 && /* @__PURE__ */ y(E, {
88
88
  label: o("teams"),
89
- children: p.map((n) => /* @__PURE__ */ b(e, {
89
+ children: p.map((n) => /* @__PURE__ */ b(t, {
90
90
  to: "/$workspace/teams/$key/issues",
91
91
  params: {
92
- workspace: t,
92
+ workspace: e,
93
93
  key: n.key
94
94
  },
95
95
  className: g,
@@ -104,29 +104,29 @@ function T({ workspace: t, username: a }) {
104
104
  }, n.id))
105
105
  }), h.length > 0 && /* @__PURE__ */ y(E, {
106
106
  label: o("projects"),
107
- children: h.map((n) => /* @__PURE__ */ b(e, {
107
+ children: h.map((r) => /* @__PURE__ */ b(t, {
108
108
  to: "/$workspace/projects/$projectId",
109
109
  params: {
110
- workspace: t,
111
- projectId: d(n)
110
+ workspace: e,
111
+ projectId: d(r)
112
112
  },
113
113
  className: g,
114
114
  children: [
115
115
  /* @__PURE__ */ y(u, {
116
- icon: n.icon ?? "",
117
- name: n.name,
116
+ icon: r.icon ?? "",
117
+ name: r.name,
118
118
  className: "size-3.5"
119
119
  }),
120
120
  /* @__PURE__ */ y("span", {
121
121
  className: "truncate",
122
- children: n.name
122
+ children: r.name
123
123
  }),
124
- n.lead === a && /* @__PURE__ */ y("span", {
124
+ r.lead === n && /* @__PURE__ */ y("span", {
125
125
  className: "text-muted-foreground",
126
126
  children: o("lead")
127
127
  })
128
128
  ]
129
- }, n.id))
129
+ }, r.id))
130
130
  })]
131
131
  });
132
132
  }