@parallelworks/tandem-web 0.189.8 → 0.189.10

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.
@@ -49,18 +49,18 @@ import { FieldNote as ct, Viewers as lt } from "./Presence.js";
49
49
  import { Reactions as ut } from "./Reactions.js";
50
50
  import { TimeInStatus as dt } from "./Reports.js";
51
51
  import { SubscribeButton as ft } from "./SubscribeButton.js";
52
- import { TriageActions as pt, TriageBanner as mt } from "./TriageBanner.js";
53
- import { Widgets as ht } from "./Widgets.js";
54
- import { Avatar as gt, Button as z, Callout as _t, Card as vt, Combobox as B, CopyButton as yt, DatePicker as bt, ErrorText as xt, IconButton as St, Kbd as Ct, RelativeTime as wt, Select as V, TitleInput as Tt, Tooltip as Et, buttonClasses as Dt, menuDivider as Ot, toast as kt, useOpenMenu as H } from "@parallelworks/ui";
55
- import { createContext as At, useCallback as jt, useContext as U, useEffect as Mt, useMemo as Nt, useRef as W, useState as G } from "react";
56
- import { useErrorMessage as Pt } from "@parallelworks/problem/react";
57
- import { useFormatter as Ft, useTranslations as K } from "use-intl";
52
+ import { TriageBanner as pt } from "./TriageBanner.js";
53
+ import { Widgets as mt } from "./Widgets.js";
54
+ import { Avatar as ht, Button as z, Callout as gt, Card as _t, Combobox as B, CopyButton as vt, DatePicker as yt, ErrorText as bt, IconButton as xt, Kbd as St, RelativeTime as Ct, Select as V, TitleInput as wt, Tooltip as Tt, buttonClasses as Et, menuDivider as Dt, toast as Ot, useOpenMenu as H } from "@parallelworks/ui";
55
+ import { createContext as kt, useCallback as At, useContext as U, useEffect as jt, useMemo as Mt, useRef as W, useState as G } from "react";
56
+ import { useErrorMessage as Nt } from "@parallelworks/problem/react";
57
+ import { useFormatter as Pt, useTranslations as K } from "use-intl";
58
58
  import { Fragment as q, jsx as J, jsxs as Y } from "react/jsx-runtime";
59
- import { useMutation as X, useQuery as Z, useQueryClient as It, useSuspenseQuery as Q } from "@tanstack/react-query";
60
- import { MoreButton as Lt } from "@parallelworks/ui/list";
61
- import { ArchiveIcon as Rt } from "@parallelworks/ui/icons";
59
+ import { useMutation as X, useQuery as Z, useQueryClient as Ft, useSuspenseQuery as Q } from "@tanstack/react-query";
60
+ import { MoreButton as It } from "@parallelworks/ui/list";
61
+ import { ArchiveIcon as Lt } from "@parallelworks/ui/icons";
62
62
  // src/components/IssueView.tsx
63
- async function zt(e, t, n) {
63
+ async function Rt(e, t, n) {
64
64
  let r = await e.ensureQueryData(p(t, n)), i = (await e.ensureQueryData(x(t))).find((e) => e.id === r.teamId)?.key;
65
65
  await Promise.all([
66
66
  e.ensureQueryData(s(t, n)),
@@ -75,14 +75,14 @@ async function zt(e, t, n) {
75
75
  i && e.ensureQueryData(b(t, i))
76
76
  ]);
77
77
  }
78
- function Bt({ workspace: i, identifier: a, inPane: o = !1, onTriaged: s }) {
79
- let c = K("issue"), l = ge(), u = Pt(), d = K("common"), { data: m } = Q(p(i, a)), { data: g } = Q(x(i)), { data: _ } = Q(h), { data: v = [] } = Z(f(i, a)), [y, b] = G();
78
+ function zt({ workspace: i, identifier: a, inPane: o = !1, onTriaged: s }) {
79
+ let c = K("issue"), l = ge(), u = Nt(), d = K("common"), { data: m } = Q(p(i, a)), { data: g } = Q(x(i)), { data: _ } = Q(h), { data: v = [] } = Z(f(i, a)), [y, b] = G();
80
80
  oe({
81
81
  identifier: m.identifier,
82
82
  ...y && { field: y }
83
83
  }), se(i, m.identifier);
84
84
  let S = me(), C = T(m.identifier, m.title);
85
- Mt(() => {
85
+ jt(() => {
86
86
  !o && !window.location.pathname.endsWith(`/issues/${C}`) && S({
87
87
  to: "/$workspace/issues/$identifier",
88
88
  params: {
@@ -100,7 +100,7 @@ function Bt({ workspace: i, identifier: a, inPane: o = !1, onTriaged: s }) {
100
100
  i,
101
101
  m.identifier
102
102
  ]);
103
- let ee = pe(i, "delete_issues", fe(m)), w = It(), { confirm: te, dialog: E } = D(), O = X({
103
+ let ee = pe(i, "delete_issues", fe(m)), w = Ft(), { confirm: te, dialog: E } = D(), O = X({
104
104
  mutationFn: async () => t(await e.POST("/api/v1/workspaces/{workspace}/issues/{identifier}/restore", { params: { path: {
105
105
  workspace: i,
106
106
  identifier: m.identifier
@@ -114,7 +114,7 @@ function Bt({ workspace: i, identifier: a, inPane: o = !1, onTriaged: s }) {
114
114
  identifier: m.identifier
115
115
  } } })),
116
116
  onSuccess: () => {
117
- kt.success(c("deleted", { identifier: m.identifier })), n(w, i);
117
+ Ot.success(c("deleted", { identifier: m.identifier })), n(w, i);
118
118
  let e = g.find((e) => e.id === m.teamId)?.key;
119
119
  S(e ? {
120
120
  to: "/$workspace/teams/$key/issues",
@@ -127,14 +127,14 @@ function Bt({ workspace: i, identifier: a, inPane: o = !1, onTriaged: s }) {
127
127
  params: { workspace: i }
128
128
  });
129
129
  }
130
- }), ne = jt((e) => S({
130
+ }), ne = At((e) => S({
131
131
  to: "/$workspace/issues/$identifier",
132
132
  params: {
133
133
  workspace: i,
134
134
  identifier: e
135
135
  }
136
136
  }), [S, i]);
137
- ie(i, m.body, ne), Mt(() => {
137
+ ie(i, m.body, ne), jt(() => {
138
138
  de(i, {
139
139
  kind: "issue",
140
140
  href: `/${i}/issues/${m.identifier}`,
@@ -146,9 +146,9 @@ function Bt({ workspace: i, identifier: a, inPane: o = !1, onTriaged: s }) {
146
146
  m.title
147
147
  ]);
148
148
  let A = ae({ issue: m.identifier }, _?.user.username), j = W(m.triage);
149
- Mt(() => {
150
- j.current && !m.triage && s?.(), j.current = m.triage;
151
- }, [m.triage, s]);
149
+ jt(() => {
150
+ j.current && !m.triage && s?.(m), j.current = m.triage;
151
+ }, [m, s]);
152
152
  let M = g.find((e) => e.id === m.teamId), N = r(i, a), [P, F] = G(null), ce = H(), I = re(i);
153
153
  return he({
154
154
  s: () => F("status"),
@@ -201,7 +201,7 @@ function Bt({ workspace: i, identifier: a, inPane: o = !1, onTriaged: s }) {
201
201
  workspace: i,
202
202
  identifier: m.identifier
203
203
  }),
204
- !o && /* @__PURE__ */ J(yt, {
204
+ !o && /* @__PURE__ */ J(vt, {
205
205
  text: T(m.identifier, m.title),
206
206
  label: c("branchName"),
207
207
  icon: /* @__PURE__ */ J(Ge, {}),
@@ -215,11 +215,6 @@ function Bt({ workspace: i, identifier: a, inPane: o = !1, onTriaged: s }) {
215
215
  /* @__PURE__ */ Y("span", {
216
216
  className: "ml-auto flex items-center gap-3",
217
217
  children: [
218
- o && m.triage && /* @__PURE__ */ J(pt, {
219
- workspace: i,
220
- issue: m,
221
- compact: !0
222
- }),
223
218
  N.isPending && /* @__PURE__ */ J("span", {
224
219
  className: "text-xs text-muted-foreground",
225
220
  children: d("saving")
@@ -228,7 +223,7 @@ function Bt({ workspace: i, identifier: a, inPane: o = !1, onTriaged: s }) {
228
223
  workspace: i,
229
224
  others: A
230
225
  }),
231
- /* @__PURE__ */ J(Lt, {
226
+ /* @__PURE__ */ J(It, {
232
227
  items: () => [...I([m]), ...ee ? [{
233
228
  label: c("deleteIssue"),
234
229
  destructive: !0,
@@ -244,7 +239,7 @@ function Bt({ workspace: i, identifier: a, inPane: o = !1, onTriaged: s }) {
244
239
  })
245
240
  ]
246
241
  }),
247
- N.isError && /* @__PURE__ */ J(xt, {
242
+ N.isError && /* @__PURE__ */ J(bt, {
248
243
  inline: !0,
249
244
  className: "ml-auto text-xs",
250
245
  children: u(N.error)
@@ -259,16 +254,18 @@ function Bt({ workspace: i, identifier: a, inPane: o = !1, onTriaged: s }) {
259
254
  children: /* @__PURE__ */ Y("article", {
260
255
  className: "mx-auto w-full max-w-reading pt-6 pb-24 md:pt-8",
261
256
  children: [
262
- /* @__PURE__ */ Y(on.Provider, {
257
+ /* @__PURE__ */ Y(an.Provider, {
263
258
  value: b,
264
259
  children: [
265
- o ? /* @__PURE__ */ J(Pe, { links: v }) : m.triage && /* @__PURE__ */ J(mt, {
260
+ m.triage && /* @__PURE__ */ J(pt, {
266
261
  workspace: i,
267
- issue: m
262
+ issue: m,
263
+ shortcuts: o
268
264
  }),
269
- m.archivedAt && /* @__PURE__ */ J(_t, {
265
+ o && /* @__PURE__ */ J(Pe, { links: v }),
266
+ m.archivedAt && /* @__PURE__ */ J(gt, {
270
267
  tone: "muted",
271
- icon: /* @__PURE__ */ J(Rt, {}),
268
+ icon: /* @__PURE__ */ J(Lt, {}),
272
269
  className: "mb-5",
273
270
  children: /* @__PURE__ */ Y("span", {
274
271
  className: "flex flex-wrap items-center gap-x-3 gap-y-1",
@@ -281,7 +278,7 @@ function Bt({ workspace: i, identifier: a, inPane: o = !1, onTriaged: s }) {
281
278
  })]
282
279
  })
283
280
  }),
284
- /* @__PURE__ */ J(Vt, {
281
+ /* @__PURE__ */ J(Bt, {
285
282
  issue: m,
286
283
  onSave: (e) => N.mutate({ title: e })
287
284
  }),
@@ -290,7 +287,7 @@ function Bt({ workspace: i, identifier: a, inPane: o = !1, onTriaged: s }) {
290
287
  others: A,
291
288
  field: "title"
292
289
  }),
293
- /* @__PURE__ */ J(Ht, {
290
+ /* @__PURE__ */ J(Vt, {
294
291
  workspace: i,
295
292
  issue: m
296
293
  }),
@@ -308,7 +305,7 @@ function Bt({ workspace: i, identifier: a, inPane: o = !1, onTriaged: s }) {
308
305
  identifier: m.identifier,
309
306
  enabled: !!M?.customerRequestsEnabled
310
307
  }),
311
- /* @__PURE__ */ J(Ut, {
308
+ /* @__PURE__ */ J(Ht, {
312
309
  workspace: i,
313
310
  identifier: a
314
311
  }),
@@ -337,14 +334,14 @@ function Bt({ workspace: i, identifier: a, inPane: o = !1, onTriaged: s }) {
337
334
  workspace: i,
338
335
  identifier: a
339
336
  }),
340
- /* @__PURE__ */ J($t, {
337
+ /* @__PURE__ */ J(Qt, {
341
338
  workspace: i,
342
339
  identifier: a,
343
340
  others: A
344
341
  })
345
342
  ]
346
343
  }),
347
- /* @__PURE__ */ J(Qt, {
344
+ /* @__PURE__ */ J(Zt, {
348
345
  workspace: i,
349
346
  identifier: a
350
347
  }),
@@ -354,7 +351,7 @@ function Bt({ workspace: i, identifier: a, inPane: o = !1, onTriaged: s }) {
354
351
  })
355
352
  ]
356
353
  })
357
- }), /* @__PURE__ */ J(Wt, {
354
+ }), /* @__PURE__ */ J(Ut, {
358
355
  workspace: i,
359
356
  issue: m,
360
357
  team: M,
@@ -367,12 +364,12 @@ function Bt({ workspace: i, identifier: a, inPane: o = !1, onTriaged: s }) {
367
364
  ]
368
365
  });
369
366
  }
370
- function Vt({ issue: e, onSave: t }) {
371
- let n = K("issue"), r = U(on);
367
+ function Bt({ issue: e, onSave: t }) {
368
+ let n = K("issue"), r = U(an);
372
369
  return /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J("h1", {
373
370
  className: "sr-only",
374
371
  children: e.title
375
- }), /* @__PURE__ */ J(Tt, {
372
+ }), /* @__PURE__ */ J(wt, {
376
373
  value: e.title,
377
374
  onCommit: t,
378
375
  onFocus: () => r("title"),
@@ -380,8 +377,8 @@ function Vt({ issue: e, onSave: t }) {
380
377
  "aria-label": n("title")
381
378
  })] });
382
379
  }
383
- function Ht({ workspace: e, issue: t }) {
384
- let n = K("issue"), r = K("common"), i = U(on), { data: a } = Q(h), o = W(null), s = Nt(() => ({
380
+ function Vt({ workspace: e, issue: t }) {
381
+ let n = K("issue"), r = K("common"), i = U(an), { data: a } = Q(h), o = W(null), s = Mt(() => ({
385
382
  name: a?.user.name ?? n("someone"),
386
383
  color: te(a?.user.username ?? "")
387
384
  }), [
@@ -415,7 +412,7 @@ function Ht({ workspace: e, issue: t }) {
415
412
  editable: !1,
416
413
  className: "min-h-32"
417
414
  }),
418
- /* @__PURE__ */ J(xt, {
415
+ /* @__PURE__ */ J(bt, {
419
416
  className: "mt-1",
420
417
  children: l
421
418
  }),
@@ -436,7 +433,7 @@ function Ht({ workspace: e, issue: t }) {
436
433
  ]
437
434
  });
438
435
  }
439
- function Ut({ workspace: e, identifier: t }) {
436
+ function Ht({ workspace: e, identifier: t }) {
440
437
  let n = K("issue"), { data: r } = Q(d(e, t)), i = H(), a = A(e);
441
438
  return r.length === 0 ? null : /* @__PURE__ */ Y("section", {
442
439
  className: "mt-6",
@@ -453,7 +450,7 @@ function Ut({ workspace: e, identifier: t }) {
453
450
  doc: ne(t)
454
451
  },
455
452
  onContextMenu: (e) => i(e, a(t)),
456
- className: `${Dt({ size: "sm" })} max-w-72`,
453
+ className: `${Et({ size: "sm" })} max-w-72`,
457
454
  children: [/* @__PURE__ */ J(Xe, { className: "size-3.5 text-muted-foreground" }), /* @__PURE__ */ J("span", {
458
455
  className: "truncate",
459
456
  children: t.title
@@ -462,16 +459,16 @@ function Ut({ workspace: e, identifier: t }) {
462
459
  })]
463
460
  });
464
461
  }
465
- function Wt({ workspace: n, issue: r, team: i, open: a, setOpen: o, update: s, compact: c = !1 }) {
462
+ function Ut({ workspace: n, issue: r, team: i, open: a, setOpen: o, update: s, compact: c = !1 }) {
466
463
  let l = K("relations"), u = i?.key, d = K("issue.properties"), p = K("common"), h = tt(), { data: g = [] } = Z({
467
464
  ...b(n, u ?? ""),
468
465
  enabled: !!u
469
- }), { data: _ = [] } = Z(m(n)), { data: v = [] } = Z(f(n, r.identifier)), { nameOf: y, actorName: x, avatarOf: T } = I(n), te = It(), E = X({
466
+ }), { data: _ = [] } = Z(m(n)), { data: v = [] } = Z(f(n, r.identifier)), { nameOf: y, actorName: x, avatarOf: T } = I(n), te = Ft(), E = X({
470
467
  mutationFn: async (r) => t(await e.POST("/api/v1/workspaces/{workspace}/labels", {
471
468
  params: { path: { workspace: n } },
472
469
  body: {
473
470
  name: r,
474
- color: Gt[_.length % Gt.length] ?? "#d73a4a"
471
+ color: Wt[_.length % Wt.length] ?? "#d73a4a"
475
472
  }
476
473
  })),
477
474
  onSuccess: (e) => {
@@ -484,7 +481,7 @@ function Wt({ workspace: n, issue: r, team: i, open: a, setOpen: o, update: s, c
484
481
  className: c ? "order-first flex shrink-0 flex-col gap-0.5 border-b border-border px-3 py-4 md:order-none md:w-64 md:overflow-y-auto md:border-b-0 md:border-l" : "order-first grid shrink-0 grid-cols-2 gap-4 border-b border-border px-4 py-4 md:order-none md:block md:w-72 md:space-y-5 md:overflow-y-auto md:border-b-0 md:border-l md:py-6",
485
482
  "aria-label": d("title"),
486
483
  onContextMenu: (e) => M(e, N([r])),
487
- children: /* @__PURE__ */ Y(Yt.Provider, {
484
+ children: /* @__PURE__ */ Y(Jt.Provider, {
488
485
  value: c,
489
486
  children: [
490
487
  c && i && /* @__PURE__ */ J($, {
@@ -533,7 +530,7 @@ function Wt({ workspace: n, issue: r, team: i, open: a, setOpen: o, update: s, c
533
530
  })
534
531
  })
535
532
  }),
536
- /* @__PURE__ */ J(Jt, {
533
+ /* @__PURE__ */ J(qt, {
537
534
  workspace: n,
538
535
  issue: r,
539
536
  update: s,
@@ -619,7 +616,7 @@ function Wt({ workspace: n, issue: r, team: i, open: a, setOpen: o, update: s, c
619
616
  kind: e.kind,
620
617
  handle: e.handle,
621
618
  className: "flex items-center gap-1.5",
622
- children: [/* @__PURE__ */ J(gt, {
619
+ children: [/* @__PURE__ */ J(ht, {
623
620
  ...w(e.kind),
624
621
  name: t,
625
622
  src: T(e.kind, e.handle),
@@ -702,7 +699,7 @@ function Wt({ workspace: n, issue: r, team: i, open: a, setOpen: o, update: s, c
702
699
  row: j
703
700
  })
704
701
  }),
705
- /* @__PURE__ */ J(qt, {
702
+ /* @__PURE__ */ J(Kt, {
706
703
  workspace: n,
707
704
  issue: r,
708
705
  team: i,
@@ -717,14 +714,14 @@ function Wt({ workspace: n, issue: r, team: i, open: a, setOpen: o, update: s, c
717
714
  workspace: n,
718
715
  kind: r.creator.kind,
719
716
  handle: r.creator.handle,
720
- children: /* @__PURE__ */ J(gt, {
717
+ children: /* @__PURE__ */ J(ht, {
721
718
  ...w(r.creator.kind),
722
719
  name: x(r.creator),
723
720
  src: T(r.creator.kind, r.creator.handle),
724
721
  size: "xs",
725
722
  tooltip: r.creator.kind !== "user"
726
723
  })
727
- }), /* @__PURE__ */ J(wt, {
724
+ }), /* @__PURE__ */ J(Ct, {
728
725
  value: r.createdAt,
729
726
  exact: "medium"
730
727
  })]
@@ -753,7 +750,7 @@ function Wt({ workspace: n, issue: r, team: i, open: a, setOpen: o, update: s, c
753
750
  })
754
751
  });
755
752
  }
756
- var Gt = [
753
+ var Wt = [
757
754
  "#d73a4a",
758
755
  "#2f8a57",
759
756
  "#8250df",
@@ -762,7 +759,7 @@ var Gt = [
762
759
  "#57606a",
763
760
  "#1a7f37"
764
761
  ];
765
- function Kt({ workspace: e, origin: t, className: n }) {
762
+ function Gt({ workspace: e, origin: t, className: n }) {
766
763
  let r = "size-3.5 shrink-0 text-muted-foreground", i = t.title.replace(/[*_`#>[\]]/g, "").replace(/\s+/g, " ").trim();
767
764
  switch (t.kind) {
768
765
  case "decision": return /* @__PURE__ */ Y(L, {
@@ -772,7 +769,7 @@ function Kt({ workspace: e, origin: t, className: n }) {
772
769
  identifier: t.key
773
770
  },
774
771
  className: n,
775
- children: [/* @__PURE__ */ J(Ze, { className: r }), /* @__PURE__ */ J(Et, {
772
+ children: [/* @__PURE__ */ J(Ze, { className: r }), /* @__PURE__ */ J(Tt, {
776
773
  content: i,
777
774
  overflowOnly: !0,
778
775
  children: /* @__PURE__ */ J("span", {
@@ -804,7 +801,7 @@ function Kt({ workspace: e, origin: t, className: n }) {
804
801
  });
805
802
  }
806
803
  }
807
- function qt({ workspace: e, issue: t, team: n, update: r, row: a }) {
804
+ function Kt({ workspace: e, issue: t, team: n, update: r, row: a }) {
808
805
  let o = K("planning"), s = K("flow"), l = ge(), u = st(), { data: d = [] } = Z(g(e)), f = d.find((e) => e.id === t.project?.id), { data: p = [] } = Z({
809
806
  ...c(e, n?.key ?? ""),
810
807
  enabled: !!n?.cyclesEnabled
@@ -868,7 +865,7 @@ function qt({ workspace: e, issue: t, team: n, update: r, row: a }) {
868
865
  }),
869
866
  t.origin && /* @__PURE__ */ J($, {
870
867
  label: o("startedFrom"),
871
- children: /* @__PURE__ */ J(Kt, {
868
+ children: /* @__PURE__ */ J(Gt, {
872
869
  workspace: e,
873
870
  origin: t.origin,
874
871
  className: a
@@ -988,7 +985,7 @@ function qt({ workspace: e, issue: t, team: n, update: r, row: a }) {
988
985
  label: o("dueDate"),
989
986
  children: /* @__PURE__ */ Y("div", {
990
987
  className: "flex items-center",
991
- children: [/* @__PURE__ */ J(bt, {
988
+ children: [/* @__PURE__ */ J(yt, {
992
989
  value: t.dueDate ?? "",
993
990
  onValueChange: (e) => r({ dueDate: e }),
994
991
  "aria-label": o("dueDate"),
@@ -1004,7 +1001,7 @@ function qt({ workspace: e, issue: t, team: n, update: r, row: a }) {
1004
1001
  children: o("noDueDate")
1005
1002
  })] })
1006
1003
  })
1007
- }), t.dueDate && /* @__PURE__ */ J(St, {
1004
+ }), t.dueDate && /* @__PURE__ */ J(xt, {
1008
1005
  variant: "ghost",
1009
1006
  icon: /* @__PURE__ */ J(qe, { className: "size-3.5" }),
1010
1007
  label: o("clearDueDate"),
@@ -1024,8 +1021,8 @@ function qt({ workspace: e, issue: t, team: n, update: r, row: a }) {
1024
1021
  })
1025
1022
  ] });
1026
1023
  }
1027
- function Jt({ workspace: e, issue: t, update: n, row: r }) {
1028
- let i = K("issueTypes"), a = Ft(), { data: o } = Z(M(e)), { data: s } = Z(O(e)), { confirm: c, dialog: l } = D(), [u, d] = G(!1), f = P(o, t.teamId);
1024
+ function qt({ workspace: e, issue: t, update: n, row: r }) {
1025
+ let i = K("issueTypes"), a = Pt(), { data: o } = Z(M(e)), { data: s } = Z(O(e)), { confirm: c, dialog: l } = D(), [u, d] = G(!1), f = P(o, t.teamId);
1029
1026
  if (f.length === 0 && !t.type) return null;
1030
1027
  let p = (e) => {
1031
1028
  let r = f.find((t) => t.id === e), o = (s ?? []).filter((e) => k(t.fields[e.id]) && !N(r, e.id));
@@ -1069,7 +1066,7 @@ function Jt({ workspace: e, issue: t, update: n, row: r }) {
1069
1066
  }), l]
1070
1067
  });
1071
1068
  }
1072
- var Yt = At(!1), Xt = {
1069
+ var Jt = kt(!1), Yt = {
1073
1070
  status: 1,
1074
1071
  team: 2,
1075
1072
  priority: 3,
@@ -1078,12 +1075,12 @@ var Yt = At(!1), Xt = {
1078
1075
  cycle: 6,
1079
1076
  labels: 7,
1080
1077
  project: 8
1081
- }, Zt = /* @__PURE__ */ new Set(["labels", "project"]);
1078
+ }, Xt = /* @__PURE__ */ new Set(["labels", "project"]);
1082
1079
  function $({ label: e, shortcut: t, slot: n, children: r }) {
1083
- if (U(Yt)) {
1084
- let t = !n || Zt.has(n);
1080
+ if (U(Jt)) {
1081
+ let t = !n || Xt.has(n);
1085
1082
  return /* @__PURE__ */ Y("div", {
1086
- style: { order: (n && Xt[n]) ?? 20 },
1083
+ style: { order: (n && Yt[n]) ?? 20 },
1087
1084
  className: t ? "mt-3" : "",
1088
1085
  children: [/* @__PURE__ */ J("p", {
1089
1086
  className: t ? "mb-1 px-2 text-xs text-muted-foreground" : "sr-only",
@@ -1093,15 +1090,15 @@ function $({ label: e, shortcut: t, slot: n, children: r }) {
1093
1090
  }
1094
1091
  return /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ Y("p", {
1095
1092
  className: "mb-1 flex items-center justify-between px-2 text-xs text-muted-foreground",
1096
- children: [e, t && /* @__PURE__ */ J(Ct, {
1093
+ children: [e, t && /* @__PURE__ */ J(St, {
1097
1094
  keys: t,
1098
1095
  size: "xs",
1099
1096
  className: "hidden md:inline-flex"
1100
1097
  })]
1101
1098
  }), r] });
1102
1099
  }
1103
- function Qt({ workspace: e, identifier: t }) {
1104
- let n = K("issue.activity"), { data: r } = Q(l(e, t)), [i, a] = G(!1), o = Nt(() => {
1100
+ function Zt({ workspace: e, identifier: t }) {
1101
+ let n = K("issue.activity"), { data: r } = Q(l(e, t)), [i, a] = G(!1), o = Mt(() => {
1105
1102
  let e = [];
1106
1103
  for (let t of r) {
1107
1104
  if (t.type.startsWith("comment.") || t.type.startsWith("issue.reaction_") || t.type === "issue.triage_accepted" && t.data.pullRequest) continue;
@@ -1134,14 +1131,14 @@ function Qt({ workspace: e, identifier: t }) {
1134
1131
  ]
1135
1132
  });
1136
1133
  }
1137
- function $t({ workspace: e, identifier: t, others: n }) {
1138
- let r = K("issue.comments"), { data: i } = Q(s(e, t)), { data: a = [] } = Z(f(e, t)), o = Nt(() => {
1134
+ function Qt({ workspace: e, identifier: t, others: n }) {
1135
+ let r = K("issue.comments"), { data: i } = Q(s(e, t)), { data: a = [] } = Z(f(e, t)), o = Mt(() => {
1139
1136
  let e = i.filter((e) => !e.parentId);
1140
- return e.sort((e, t) => Number(en(t)) - Number(en(e))), e.map((e) => ({
1137
+ return e.sort((e, t) => Number($t(t)) - Number($t(e))), e.map((e) => ({
1141
1138
  root: e,
1142
1139
  replies: i.filter((t) => t.parentId === e.id)
1143
1140
  }));
1144
- }, [i]), [c, l] = G(null), u = i.filter((e) => !e.deletedAt && !en(e)).length;
1141
+ }, [i]), [c, l] = G(null), u = i.filter((e) => !e.deletedAt && !$t(e)).length;
1145
1142
  return /* @__PURE__ */ Y("section", {
1146
1143
  className: "mt-12 border-t border-border pt-6",
1147
1144
  "aria-label": r("title"),
@@ -1160,8 +1157,8 @@ function $t({ workspace: e, identifier: t, others: n }) {
1160
1157
  /* @__PURE__ */ J("div", {
1161
1158
  className: "mt-4 space-y-3",
1162
1159
  children: o.map(({ root: n, replies: i }) => {
1163
- let o = en(n) ? n.sharedWith : void 0, s = o ? ce(o).source : void 0;
1164
- return /* @__PURE__ */ Y(vt, {
1160
+ let o = $t(n) ? n.sharedWith : void 0, s = o ? ce(o).source : void 0;
1161
+ return /* @__PURE__ */ Y(_t, {
1165
1162
  size: "fill",
1166
1163
  padding: "none",
1167
1164
  highlight: !!o,
@@ -1173,7 +1170,7 @@ function $t({ workspace: e, identifier: t, others: n }) {
1173
1170
  o && s ? /* @__PURE__ */ J(Fe, {
1174
1171
  source: s,
1175
1172
  link: a.find((e) => e.connector === o)
1176
- }) : /* @__PURE__ */ J(nn, {
1173
+ }) : /* @__PURE__ */ J(tn, {
1177
1174
  workspace: e,
1178
1175
  identifier: t,
1179
1176
  comment: n,
@@ -1184,7 +1181,7 @@ function $t({ workspace: e, identifier: t, others: n }) {
1184
1181
  children: i.map((r) => /* @__PURE__ */ J("li", {
1185
1182
  id: `comment-${r.id}`,
1186
1183
  className: "border-b border-border/50 last:border-b-0",
1187
- children: /* @__PURE__ */ J(nn, {
1184
+ children: /* @__PURE__ */ J(tn, {
1188
1185
  workspace: e,
1189
1186
  identifier: t,
1190
1187
  comment: r,
@@ -1194,7 +1191,7 @@ function $t({ workspace: e, identifier: t, others: n }) {
1194
1191
  }),
1195
1192
  /* @__PURE__ */ J("div", {
1196
1193
  className: "border-t border-border/70 px-3 py-2",
1197
- children: c === n.id ? /* @__PURE__ */ J(an, {
1194
+ children: c === n.id ? /* @__PURE__ */ J(rn, {
1198
1195
  workspace: e,
1199
1196
  identifier: t,
1200
1197
  parentId: n.id,
@@ -1212,12 +1209,12 @@ function $t({ workspace: e, identifier: t, others: n }) {
1212
1209
  }, n.id);
1213
1210
  })
1214
1211
  }),
1215
- /* @__PURE__ */ J(vt, {
1212
+ /* @__PURE__ */ J(_t, {
1216
1213
  size: "fill",
1217
1214
  padding: "sm",
1218
1215
  focusWithin: !0,
1219
1216
  className: "mt-4",
1220
- children: /* @__PURE__ */ J(an, {
1217
+ children: /* @__PURE__ */ J(rn, {
1221
1218
  workspace: e,
1222
1219
  identifier: t
1223
1220
  })
@@ -1233,16 +1230,16 @@ function $t({ workspace: e, identifier: t, others: n }) {
1233
1230
  ]
1234
1231
  });
1235
1232
  }
1236
- var en = (e) => !!e.sharedWith && !e.parentId;
1237
- function tn({ comment: e }) {
1233
+ var $t = (e) => !!e.sharedWith && !e.parentId;
1234
+ function en({ comment: e }) {
1238
1235
  let t = K("issue.comments");
1239
1236
  return e.author.kind === "connector" ? /* @__PURE__ */ J("span", {
1240
1237
  className: "rounded border border-border px-1.5 py-px text-[10px] text-muted-foreground",
1241
1238
  children: t("via", { source: ce(e.author.handle).source })
1242
1239
  }) : null;
1243
1240
  }
1244
- function nn({ workspace: r, identifier: i, comment: a, onReply: o }) {
1245
- let s = K("issue.comments"), c = K("common"), { actorName: l, avatarOf: u } = I(r), { data: d } = Q(h), { data: f = [] } = Z(v(r, i)), p = pe(r, "comment", { team: i.slice(0, i.lastIndexOf("-")) }), m = It(), g = H(), [_, y] = G(!1), [b, x] = G(a.body), [S, C] = G(!1), ee = W(null), T = Te(r, i), te = a.author.kind === "user" && a.author.handle === d?.user.username, E = { path: {
1241
+ function tn({ workspace: r, identifier: i, comment: a, onReply: o }) {
1242
+ let s = K("issue.comments"), c = K("common"), { actorName: l, avatarOf: u } = I(r), { data: d } = Q(h), { data: f = [] } = Z(v(r, i)), p = pe(r, "comment", { team: i.slice(0, i.lastIndexOf("-")) }), m = Ft(), g = H(), [_, y] = G(!1), [b, x] = G(a.body), [S, C] = G(!1), ee = W(null), T = Te(r, i), te = a.author.kind === "user" && a.author.handle === d?.user.username, E = { path: {
1246
1243
  workspace: r,
1247
1244
  identifier: i,
1248
1245
  commentId: a.id
@@ -1270,7 +1267,7 @@ function nn({ workspace: r, identifier: i, comment: a, onReply: o }) {
1270
1267
  F(c("copyLink"), ne),
1271
1268
  F(s("copyText"), a.body),
1272
1269
  ...te ? [
1273
- Ot,
1270
+ Dt,
1274
1271
  {
1275
1272
  label: s("edit"),
1276
1273
  onClick: () => {
@@ -1294,7 +1291,7 @@ function nn({ workspace: r, identifier: i, comment: a, onReply: o }) {
1294
1291
  workspace: r,
1295
1292
  actor: a.author,
1296
1293
  className: "flex items-center gap-2 font-medium hover:underline",
1297
- children: [/* @__PURE__ */ J(gt, {
1294
+ children: [/* @__PURE__ */ J(ht, {
1298
1295
  ...w(a.author.kind),
1299
1296
  name: l(a.author),
1300
1297
  src: u(a.author.kind, a.author.handle),
@@ -1302,15 +1299,15 @@ function nn({ workspace: r, identifier: i, comment: a, onReply: o }) {
1302
1299
  decorative: !0
1303
1300
  }), l(a.author)]
1304
1301
  }),
1305
- /* @__PURE__ */ J(tn, { comment: a }),
1302
+ /* @__PURE__ */ J(en, { comment: a }),
1306
1303
  /* @__PURE__ */ Y("span", {
1307
1304
  className: "text-muted-foreground",
1308
- children: [/* @__PURE__ */ J(wt, {
1305
+ children: [/* @__PURE__ */ J(Ct, {
1309
1306
  value: a.createdAt,
1310
1307
  exact: "medium"
1311
1308
  }), a.updatedAt !== a.createdAt && /* @__PURE__ */ Y(q, { children: [" ", s("edited")] })]
1312
1309
  }),
1313
- !S && !_ && /* @__PURE__ */ J(Lt, {
1310
+ !S && !_ && /* @__PURE__ */ J(It, {
1314
1311
  items: A,
1315
1312
  className: "ml-auto"
1316
1313
  }),
@@ -1373,11 +1370,11 @@ function nn({ workspace: r, identifier: i, comment: a, onReply: o }) {
1373
1370
  value: a.body,
1374
1371
  editable: !1
1375
1372
  }),
1376
- /* @__PURE__ */ J(ht, {
1373
+ /* @__PURE__ */ J(mt, {
1377
1374
  workspace: r,
1378
1375
  widgets: a.widgets
1379
1376
  }),
1380
- /* @__PURE__ */ J(rn, {
1377
+ /* @__PURE__ */ J(nn, {
1381
1378
  workspace: r,
1382
1379
  identifier: i,
1383
1380
  comment: a
@@ -1394,7 +1391,7 @@ function nn({ workspace: r, identifier: i, comment: a, onReply: o }) {
1394
1391
  })]
1395
1392
  });
1396
1393
  }
1397
- function rn({ workspace: e, identifier: t, comment: n }) {
1394
+ function nn({ workspace: e, identifier: t, comment: n }) {
1398
1395
  let { data: r = [] } = Z(a(e, t)), { actorName: i } = I(e), o = r.filter((e) => e.page && e.commentId === n.id);
1399
1396
  return o.length === 0 ? null : /* @__PURE__ */ J("div", {
1400
1397
  className: "mt-2 space-y-2",
@@ -1405,8 +1402,8 @@ function rn({ workspace: e, identifier: t, comment: n }) {
1405
1402
  }, e.id))
1406
1403
  });
1407
1404
  }
1408
- function an({ workspace: r, identifier: i, parentId: a, publicOn: o, autofocus: s = !1, onDone: c }) {
1409
- let l = K("issue.comments"), u = Pt(), d = K("common"), f = U(on), p = It(), [m, h] = G(""), [g, _] = G(0), v = W(null), y = Te(r, i), b = X({
1405
+ function rn({ workspace: r, identifier: i, parentId: a, publicOn: o, autofocus: s = !1, onDone: c }) {
1406
+ let l = K("issue.comments"), u = Nt(), d = K("common"), f = U(an), p = Ft(), [m, h] = G(""), [g, _] = G(0), v = W(null), y = Te(r, i), b = X({
1410
1407
  mutationFn: async () => t(await e.POST("/api/v1/workspaces/{workspace}/issues/{identifier}/comments", {
1411
1408
  params: { path: {
1412
1409
  workspace: r,
@@ -1445,7 +1442,7 @@ function an({ workspace: r, identifier: i, parentId: a, publicOn: o, autofocus:
1445
1442
  error: y.error
1446
1443
  })]
1447
1444
  }),
1448
- b.isError && /* @__PURE__ */ J(xt, {
1445
+ b.isError && /* @__PURE__ */ J(bt, {
1449
1446
  inline: !0,
1450
1447
  className: "text-xs",
1451
1448
  children: u(b.error)
@@ -1469,5 +1466,5 @@ function an({ workspace: r, identifier: i, parentId: a, publicOn: o, autofocus:
1469
1466
  ]
1470
1467
  })] });
1471
1468
  }
1472
- var on = At(() => {});
1473
- export { Bt as IssueView, zt as loadIssue };
1469
+ var an = kt(() => {});
1470
+ export { zt as IssueView, Rt as loadIssue };