@parallelworks/tandem-web 0.171.1 → 0.171.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (164) hide show
  1. package/components/AccessGrants.js +6 -6
  2. package/components/ActivityTimeline.js +57 -57
  3. package/components/ActorAvatar.js +4 -4
  4. package/components/AgentWork.js +494 -494
  5. package/components/AppLauncher.js +7 -7
  6. package/components/AreaLink.js +13 -13
  7. package/components/AreaTiles.js +13 -13
  8. package/components/AreaWork.js +22 -22
  9. package/components/Attachments.js +29 -29
  10. package/components/BlockHandle.js +3 -3
  11. package/components/BugRotation.js +8 -8
  12. package/components/CodeHostSettings.js +38 -38
  13. package/components/CollabEditor.js +13 -13
  14. package/components/CommandPalette.js +206 -206
  15. package/components/CustomFields.js +95 -95
  16. package/components/CustomerRequests.js +11 -11
  17. package/components/DashboardPanel.js +23 -23
  18. package/components/DateChip.js +21 -21
  19. package/components/DocHistory.js +14 -14
  20. package/components/DocIcon.js +4 -4
  21. package/components/DocIconPicker.js +4 -4
  22. package/components/DocLinkPicker.js +22 -22
  23. package/components/DocLook.js +16 -16
  24. package/components/DocProperties.js +81 -81
  25. package/components/DocTable.js +53 -53
  26. package/components/DocsTree.js +179 -179
  27. package/components/Editor.js +69 -69
  28. package/components/FavoritesNav.js +78 -78
  29. package/components/GitHub.js +87 -87
  30. package/components/Graph.js +14 -14
  31. package/components/HostActions.js +21 -21
  32. package/components/HostPanel.js +6 -6
  33. package/components/HoverCards.js +74 -74
  34. package/components/IssueBoard.js +13 -10
  35. package/components/IssueBreakdown.js +31 -31
  36. package/components/IssueCode.js +19 -19
  37. package/components/IssueEvent.js +12 -12
  38. package/components/IssueFilters.js +39 -39
  39. package/components/IssueGroup.js +16 -16
  40. package/components/IssueImport.js +13 -13
  41. package/components/IssueInsights.js +20 -20
  42. package/components/IssueListBlock.js +81 -81
  43. package/components/IssueRelations.js +34 -34
  44. package/components/IssueRow.js +31 -31
  45. package/components/IssueSentry.js +4 -4
  46. package/components/IssueTemplates.js +23 -23
  47. package/components/IssueTypes.js +40 -40
  48. package/components/MarkdownTransfer.js +10 -10
  49. package/components/MentionPicker.js +19 -19
  50. package/components/NewIssueDialog.js +53 -53
  51. package/components/NewProjectDialog.js +82 -82
  52. package/components/PersonActivity.js +13 -13
  53. package/components/PersonHoverCard.js +44 -44
  54. package/components/Planning.js +16 -16
  55. package/components/Reports.js +8 -8
  56. package/components/SettingsNav.js +15 -15
  57. package/components/ShareDialog.js +8 -8
  58. package/components/SharedViewer.js +23 -23
  59. package/components/SlashMenu.js +26 -26
  60. package/components/SubPages.js +10 -10
  61. package/components/TeamForm.js +9 -9
  62. package/components/TeamRepositories.js +21 -21
  63. package/components/TeamWorkflow.js +6 -6
  64. package/components/UnlinkedMentions.js +29 -29
  65. package/components/Updates.js +8 -8
  66. package/components/Widgets.js +4 -4
  67. package/components/WorkCounts.js +12 -12
  68. package/components/cycleCrumb.js +8 -8
  69. package/components/editorPlugins.js +101 -101
  70. package/components/settings.js +6 -6
  71. package/components/video.js +7 -7
  72. package/hostedApp.js +24 -24
  73. package/index.js +18 -18
  74. package/lib/assignees.js +3 -3
  75. package/lib/attachments.js +12 -12
  76. package/lib/boardMove.js +27 -27
  77. package/lib/collab.js +1 -1
  78. package/lib/docs.js +115 -115
  79. package/lib/githubLink.js +7 -7
  80. package/lib/issueList.js +51 -51
  81. package/lib/issueMenu.js +117 -117
  82. package/lib/knowledge.js +134 -134
  83. package/lib/live.js +38 -38
  84. package/lib/notifications.js +47 -47
  85. package/lib/views.js +31 -31
  86. package/package.json +24 -24
  87. package/pages/area.js +64 -64
  88. package/pages/areas.js +199 -199
  89. package/pages/decisions.js +51 -51
  90. package/pages/issues.js +120 -120
  91. package/pages/projects.js +238 -238
  92. package/pages/triage.js +109 -109
  93. package/routes/_workspace/agents/_slug2.js +127 -127
  94. package/routes/_workspace/agents/index2.js +22 -22
  95. package/routes/_workspace/dashboards/_dashboardId2.js +84 -84
  96. package/routes/_workspace/dashboards/index2.js +34 -34
  97. package/routes/_workspace/docs/_doc2.js +267 -267
  98. package/routes/_workspace/docs/space2._space.js +31 -31
  99. package/routes/_workspace/docs2.js +4 -4
  100. package/routes/_workspace/graph2.js +11 -11
  101. package/routes/_workspace/graph3.js +11 -11
  102. package/routes/_workspace/issues/_identifier2.js +477 -477
  103. package/routes/_workspace/issues/index.js +13 -13
  104. package/routes/_workspace/knowledge/_term2.js +175 -175
  105. package/routes/_workspace/knowledge/_term3.js +4 -4
  106. package/routes/_workspace/knowledge/index.js +12 -12
  107. package/routes/_workspace/knowledge/index2.js +117 -117
  108. package/routes/_workspace/measures2.js +8 -8
  109. package/routes/_workspace/measures3.js +29 -29
  110. package/routes/_workspace/notifications2.js +263 -263
  111. package/routes/_workspace/people/_username.js +10 -10
  112. package/routes/_workspace/people/_username2.js +41 -41
  113. package/routes/_workspace/projects/_projectId3.js +303 -303
  114. package/routes/_workspace/projects/_projectId4.js +4 -4
  115. package/routes/_workspace/projects/_projectId_3.milestones._milestoneId.js +28 -28
  116. package/routes/_workspace/projects/_projectId_4.milestones._milestoneId.js +4 -4
  117. package/routes/_workspace/projects/index.js +8 -8
  118. package/routes/_workspace/settings/account2.js +8 -8
  119. package/routes/_workspace/settings/audit-log2.js +8 -8
  120. package/routes/_workspace/settings/audit-log3.js +155 -155
  121. package/routes/_workspace/settings/connections2.js +4 -4
  122. package/routes/_workspace/settings/fields2.js +5 -5
  123. package/routes/_workspace/settings/github2.js +11 -11
  124. package/routes/_workspace/settings/gitlab2.js +5 -5
  125. package/routes/_workspace/settings/groups2.js +52 -52
  126. package/routes/_workspace/settings/import2.js +39 -39
  127. package/routes/_workspace/settings/index2.js +5 -5
  128. package/routes/_workspace/settings/intercom2.js +11 -11
  129. package/routes/_workspace/settings/labels2.js +33 -33
  130. package/routes/_workspace/settings/members2.js +81 -81
  131. package/routes/_workspace/settings/notifications2.js +46 -46
  132. package/routes/_workspace/settings/parallelworks2.js +20 -20
  133. package/routes/_workspace/settings/roles2.js +41 -41
  134. package/routes/_workspace/settings/runners2.js +15 -15
  135. package/routes/_workspace/settings/sentry2.js +15 -15
  136. package/routes/_workspace/settings/sessions2.js +9 -9
  137. package/routes/_workspace/settings/sessions3.js +4 -4
  138. package/routes/_workspace/settings/slack2.js +12 -12
  139. package/routes/_workspace/settings/sso2.js +37 -37
  140. package/routes/_workspace/settings/sso3.js +7 -7
  141. package/routes/_workspace/settings/teams2.js +29 -29
  142. package/routes/_workspace/settings/tokens2.js +32 -32
  143. package/routes/_workspace/settings/tokens3.js +4 -4
  144. package/routes/_workspace/settings/webhooks2.js +41 -41
  145. package/routes/_workspace/settings/zendesk2.js +11 -11
  146. package/routes/_workspace/teams/_key/cycles/_number2.js +33 -33
  147. package/routes/_workspace/teams/_key/cycles/_number3.js +7 -7
  148. package/routes/_workspace/teams/_key/cycles/index2.js +37 -37
  149. package/routes/_workspace/teams/_key/issues.js +10 -10
  150. package/routes/_workspace/teams/_key/projects.js +6 -6
  151. package/routes/_workspace/teams/_key/settings2.js +396 -396
  152. package/routes/_workspace2.js +308 -308
  153. package/routes/_workspace3.js +8 -8
  154. package/routes/device2.js +4 -4
  155. package/routes/device3.js +4 -4
  156. package/routes/docs/_tag/_endpoint2.js +3 -3
  157. package/routes/docs/_tag/index2.js +3 -3
  158. package/routes/docs/route2.js +7 -7
  159. package/routes/index2.js +5 -5
  160. package/routes/login2.js +10 -10
  161. package/routes/new2.js +12 -12
  162. package/routes/new3.js +5 -5
  163. package/routes/request2._token.js +6 -6
  164. package/routes/share2._secret.js +4 -4
@@ -1,23 +1,23 @@
1
- import { GridIcon as e } from "./icons.js";
2
- import { appLink as t } from "../lib/appLink.js";
1
+ import { appLink as e } from "../lib/appLink.js";
2
+ import { GridIcon as t } from "./icons.js";
3
3
  import { IconButton as n, Popover as r, useClosePopover as i } from "@parallelworks/ui";
4
4
  import { useTranslations as a } from "use-intl";
5
5
  import { jsx as o, jsxs as s } from "react/jsx-runtime";
6
6
  // src/components/AppLauncher.tsx
7
7
  function c({ apps: i, className: s = "" }) {
8
- let c = a("workspace"), u = i.flatMap((e) => {
9
- let n = t(e.url);
8
+ let c = a("workspace"), u = i.flatMap((t) => {
9
+ let n = e(t.url);
10
10
  return n ? [{
11
- ...e,
11
+ ...t,
12
12
  href: n,
13
- icon: e.iconUrl ? t(e.iconUrl) : void 0
13
+ icon: t.iconUrl ? e(t.iconUrl) : void 0
14
14
  }] : [];
15
15
  });
16
16
  return u.length === 0 ? null : /* @__PURE__ */ o("div", {
17
17
  className: s,
18
18
  children: /* @__PURE__ */ o(r, {
19
19
  trigger: /* @__PURE__ */ o(n, {
20
- icon: /* @__PURE__ */ o(e, { className: "size-4" }),
20
+ icon: /* @__PURE__ */ o(t, { className: "size-4" }),
21
21
  label: c("apps"),
22
22
  size: "md"
23
23
  }),
@@ -1,30 +1,30 @@
1
- import { Link as e } from "../lib/router.js";
2
- import { areasQuery as t, teamsQuery as n } from "../api/queries.js";
1
+ import { areasQuery as e, teamsQuery as t } from "../api/queries.js";
2
+ import { Link as n } from "../lib/router.js";
3
3
  import { jsx as r } from "react/jsx-runtime";
4
4
  import { useQuery as i } from "@tanstack/react-query";
5
5
  // src/components/AreaLink.tsx
6
- function a(e, r) {
7
- let { data: a = [] } = i(n(e)), { data: o = [] } = i({
8
- ...t(e),
6
+ function a(n, r) {
7
+ let { data: a = [] } = i(t(n)), { data: o = [] } = i({
8
+ ...e(n),
9
9
  enabled: r.teamId === void 0
10
10
  }), s = r.teamId === void 0 ? o.find((e) => e.key === r.key)?.teamId : r.teamId;
11
11
  return s ? a.find((e) => e.id === s)?.key : void 0;
12
12
  }
13
- function o({ workspace: t, area: n, ...i }) {
14
- let o = a(t, n);
15
- return o ? /* @__PURE__ */ r(e, {
13
+ function o({ workspace: e, area: t, ...i }) {
14
+ let o = a(e, t);
15
+ return o ? /* @__PURE__ */ r(n, {
16
16
  to: "/$workspace/teams/$key/areas/$area",
17
17
  params: {
18
- workspace: t,
18
+ workspace: e,
19
19
  key: o,
20
- area: n.key
20
+ area: t.key
21
21
  },
22
22
  ...i
23
- }) : /* @__PURE__ */ r(e, {
23
+ }) : /* @__PURE__ */ r(n, {
24
24
  to: "/$workspace/areas/$area",
25
25
  params: {
26
- workspace: t,
27
- area: n.key
26
+ workspace: e,
27
+ area: t.key
28
28
  },
29
29
  ...i
30
30
  });
@@ -1,10 +1,10 @@
1
- import { AreaIcon as e, EditIcon as t } from "./icons.js";
1
+ import { useAreaActions as e } from "../lib/areas.js";
2
+ import { AreaLink as t } from "./AreaLink.js";
2
3
  import { DocIcon as n } from "./DocIcon.js";
3
- import { AreaLink as r } from "./AreaLink.js";
4
- import { useAreaActions as i } from "../lib/areas.js";
5
- import { DocIconPicker as a } from "./DocIconPicker.js";
6
- import { CropDialog as o } from "./ImageUpload.js";
7
- import { useIconUpload as s } from "./DocLook.js";
4
+ import { DocIconPicker as r } from "./DocIconPicker.js";
5
+ import { useIconUpload as i } from "./DocLook.js";
6
+ import { CropDialog as a } from "./ImageUpload.js";
7
+ import { AreaIcon as o, EditIcon as s } from "./icons.js";
8
8
  import { IconButton as c, Tooltip as l, cx as u, useOpenMenu as d } from "@parallelworks/ui";
9
9
  import { useTranslations as f } from "use-intl";
10
10
  import { Fragment as p, jsx as m, jsxs as h } from "react/jsx-runtime";
@@ -46,17 +46,17 @@ function y({ children: e, hint: t }) {
46
46
  });
47
47
  }
48
48
  function b({ workspace: l, area: u, inside: g, decisions: b, menu: x, onOpen: S }) {
49
- let C = f("areas"), w = d(), T = i(l), E = u.icon ?? "", D = (e) => T.update.mutate({
49
+ let C = f("areas"), w = d(), T = e(l), E = u.icon ?? "", D = (e) => T.update.mutate({
50
50
  area: u.key,
51
51
  body: { icon: e }
52
- }), O = s(l, D), k = /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m(v, {
52
+ }), O = i(l, D), k = /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m(v, {
53
53
  decisions: b,
54
54
  dashed: u.status === "proposed",
55
55
  children: E ? /* @__PURE__ */ m(n, {
56
56
  icon: E,
57
57
  className: "size-8",
58
58
  emojiClassName: "text-3xl"
59
- }) : /* @__PURE__ */ m(e, { className: "size-7" })
59
+ }) : /* @__PURE__ */ m(o, { className: "size-7" })
60
60
  }), /* @__PURE__ */ m(y, {
61
61
  hint: g > 0 ? C("count", { count: g }) : void 0,
62
62
  children: u.title
@@ -70,25 +70,25 @@ function b({ workspace: l, area: u, inside: g, decisions: b, menu: x, onOpen: S
70
70
  className: _,
71
71
  onClick: () => S(u),
72
72
  children: k
73
- }) : /* @__PURE__ */ m(r, {
73
+ }) : /* @__PURE__ */ m(t, {
74
74
  workspace: l,
75
75
  area: u,
76
76
  className: _,
77
77
  children: k
78
78
  }),
79
- /* @__PURE__ */ m(a, {
79
+ /* @__PURE__ */ m(r, {
80
80
  icon: E,
81
81
  onPick: D,
82
82
  onUploadFile: O.pick,
83
83
  trigger: /* @__PURE__ */ m(c, {
84
84
  variant: "ghost",
85
85
  size: "xs",
86
- icon: /* @__PURE__ */ m(t, {}),
86
+ icon: /* @__PURE__ */ m(s, {}),
87
87
  label: C(E ? "changeIcon" : "addIcon", { area: u.title }),
88
88
  className: "absolute top-1 right-1 opacity-0 group-hover/tile:opacity-100 focus-visible:opacity-100 aria-expanded:opacity-100 max-md:hidden"
89
89
  })
90
90
  }),
91
- O.picked && /* @__PURE__ */ m(o, {
91
+ O.picked && /* @__PURE__ */ m(a, {
92
92
  image: O.picked,
93
93
  name: u.title,
94
94
  onSave: O.save,
@@ -1,38 +1,38 @@
1
- import { Link as e } from "../lib/router.js";
2
- import { ChevronRightIcon as t } from "./icons.js";
3
- import { termRef as n } from "../lib/knowledgeKinds.js";
4
- import { AnsweredDecision as r } from "./AgentWork.js";
5
- import { KnowledgeStatus as i } from "./HoverCards.js";
1
+ import { termRef as e } from "../lib/knowledgeKinds.js";
2
+ import { Link as t } from "../lib/router.js";
3
+ import { AnsweredDecision as n } from "./AgentWork.js";
4
+ import { KnowledgeStatus as r } from "./HoverCards.js";
5
+ import { ChevronRightIcon as i } from "./icons.js";
6
6
  import { useState as a } from "react";
7
7
  import { useTranslations as o } from "use-intl";
8
8
  import { jsx as s, jsxs as c } from "react/jsx-runtime";
9
9
  // src/components/AreaWork.tsx
10
10
  var l = (...e) => e.filter(Boolean).join(" ");
11
- function u({ workspace: t, entry: r, isNew: a }) {
11
+ function u({ workspace: n, entry: i, isNew: a }) {
12
12
  let l = o("knowledge"), u = o("areaPage");
13
- return /* @__PURE__ */ s("li", { children: /* @__PURE__ */ c(e, {
13
+ return /* @__PURE__ */ s("li", { children: /* @__PURE__ */ c(t, {
14
14
  to: "/$workspace/knowledge/$term",
15
15
  params: {
16
- workspace: t,
17
- term: n(r)
16
+ workspace: n,
17
+ term: e(i)
18
18
  },
19
19
  className: "flex min-w-0 items-baseline gap-2 px-3 py-2 text-sm hover:bg-muted",
20
20
  children: [
21
21
  /* @__PURE__ */ s("span", {
22
22
  className: "shrink-0 font-medium",
23
- children: r.name
23
+ children: i.name
24
24
  }),
25
25
  /* @__PURE__ */ s("span", {
26
26
  className: "shrink-0 text-xs text-muted-foreground",
27
- children: l(`kind.${r.kind}`)
27
+ children: l(`kind.${i.kind}`)
28
28
  }),
29
- r.definition !== r.name && /* @__PURE__ */ s("span", {
29
+ i.definition !== i.name && /* @__PURE__ */ s("span", {
30
30
  className: "min-w-0 truncate text-muted-foreground",
31
- children: r.definition
31
+ children: i.definition
32
32
  }),
33
- r.status === "added" && /* @__PURE__ */ s("span", {
33
+ i.status === "added" && /* @__PURE__ */ s("span", {
34
34
  className: "ml-auto shrink-0",
35
- children: /* @__PURE__ */ s(i, { status: r.status })
35
+ children: /* @__PURE__ */ s(r, { status: i.status })
36
36
  }),
37
37
  a && /* @__PURE__ */ s("span", {
38
38
  className: "ml-auto shrink-0 text-[11px] font-medium text-primary",
@@ -42,18 +42,18 @@ function u({ workspace: t, entry: r, isNew: a }) {
42
42
  }) });
43
43
  }
44
44
  var d = (e) => e.replace(/[*_`#>[\]]/g, "").replace(/\s+/g, " ").trim();
45
- function f({ workspace: e, decision: n, isNew: i, notInDocs: u }) {
46
- let f = o("areaPage"), [p, m] = a(!1), h = [n.options.find((e) => e.id === n.answer?.optionId)?.label, n.answer?.text && d(n.answer.text)].filter(Boolean).join(". ");
45
+ function f({ workspace: e, decision: t, isNew: r, notInDocs: u }) {
46
+ let f = o("areaPage"), [p, m] = a(!1), h = [t.options.find((e) => e.id === t.answer?.optionId)?.label, t.answer?.text && d(t.answer.text)].filter(Boolean).join(". ");
47
47
  return /* @__PURE__ */ c("li", { children: [/* @__PURE__ */ c("button", {
48
48
  type: "button",
49
49
  "aria-expanded": p,
50
50
  onClick: () => m((e) => !e),
51
51
  className: "flex w-full min-w-0 items-baseline gap-2 px-3 py-2 text-left text-sm hover:bg-muted",
52
52
  children: [
53
- /* @__PURE__ */ s(t, { className: l("size-3 shrink-0 self-center text-muted-foreground", p && "rotate-90") }),
53
+ /* @__PURE__ */ s(i, { className: l("size-3 shrink-0 self-center text-muted-foreground", p && "rotate-90") }),
54
54
  /* @__PURE__ */ s("span", {
55
55
  className: "min-w-0 truncate text-muted-foreground",
56
- children: d(n.prompt)
56
+ children: d(t.prompt)
57
57
  }),
58
58
  /* @__PURE__ */ s("span", {
59
59
  className: "min-w-0 shrink-0 truncate font-medium max-sm:hidden",
@@ -64,7 +64,7 @@ function f({ workspace: e, decision: n, isNew: i, notInDocs: u }) {
64
64
  children: [u && /* @__PURE__ */ s("span", {
65
65
  className: "rounded border border-border px-1.5 text-[11px] text-muted-foreground",
66
66
  children: f("notInDocs")
67
- }), i && /* @__PURE__ */ s("span", {
67
+ }), r && /* @__PURE__ */ s("span", {
68
68
  className: "text-[11px] font-medium text-primary",
69
69
  children: f("new")
70
70
  })]
@@ -72,9 +72,9 @@ function f({ workspace: e, decision: n, isNew: i, notInDocs: u }) {
72
72
  ]
73
73
  }), p && /* @__PURE__ */ s("div", {
74
74
  className: "px-3 pb-3",
75
- children: /* @__PURE__ */ s(r, {
75
+ children: /* @__PURE__ */ s(n, {
76
76
  workspace: e,
77
- decision: n,
77
+ decision: t,
78
78
  showIssue: !0
79
79
  })
80
80
  })] });
@@ -1,7 +1,7 @@
1
1
  import { attachmentsQuery as e, meQuery as t } from "../api/queries.js";
2
- import { AttachmentIcon as n, CloseIcon as r, DownloadIcon as i } from "./icons.js";
3
- import { attachmentSizes as a, attachmentURL as o, insertAttachments as s, uploadAttachment as c } from "../lib/attachments.js";
4
- import { openImageEvent as l } from "./editorPlugins.js";
2
+ import { attachmentSizes as n, attachmentURL as r, insertAttachments as i, uploadAttachment as a } from "../lib/attachments.js";
3
+ import { openImageEvent as o } from "./editorPlugins.js";
4
+ import { AttachmentIcon as s, CloseIcon as c, DownloadIcon as l } from "./icons.js";
5
5
  import { ErrorText as u, IconButton as d, Modal as f, ModalTitle as p, buttonClasses as m } from "@parallelworks/ui";
6
6
  import { useEffect as h, useRef as g, useState as _ } from "react";
7
7
  import { useErrorMessage as v } from "@parallelworks/problem/react";
@@ -16,20 +16,20 @@ function D() {
16
16
  }
17
17
  function O(t, n) {
18
18
  let r = E();
19
- return k((e) => c(t, n, e), () => r.invalidateQueries({ queryKey: e(t, n).queryKey }));
19
+ return k((e) => a(t, n, e), () => r.invalidateQueries({ queryKey: e(t, n).queryKey }));
20
20
  }
21
21
  function k(e, t) {
22
- let n = b("issue.attachments"), r = v(), [i, a] = _(0), [o, c] = _(null), l = D();
22
+ let n = b("issue.attachments"), r = v(), [a, o] = _(0), [s, c] = _(null), l = D();
23
23
  return {
24
- upload: async (i, o, u) => {
25
- if (!i || o.length === 0) return;
24
+ upload: async (a, s, u) => {
25
+ if (!a || s.length === 0) return;
26
26
  if (!l) {
27
- c(n("off", { name: o[0]?.name ?? "" }));
27
+ c(n("off", { name: s[0]?.name ?? "" }));
28
28
  return;
29
29
  }
30
- c(null), a((e) => e + o.length);
30
+ c(null), o((e) => e + s.length);
31
31
  let d = [];
32
- for (let t of o) try {
32
+ for (let t of s) try {
33
33
  d.push(await e(t));
34
34
  } catch (e) {
35
35
  let i = e instanceof x ? e.status : 0;
@@ -38,24 +38,24 @@ function k(e, t) {
38
38
  reason: r(e)
39
39
  }));
40
40
  } finally {
41
- a((e) => e - 1);
41
+ o((e) => e - 1);
42
42
  }
43
- d.length > 0 && !i.isDestroyed && s(i, d, u), t?.();
43
+ d.length > 0 && !a.isDestroyed && i(a, d, u), t?.();
44
44
  },
45
- pending: i,
46
- error: o
45
+ pending: a,
46
+ error: s
47
47
  };
48
48
  }
49
49
  function A({ onFiles: e }) {
50
- let t = b("issue.attachments"), r = g(null);
50
+ let t = b("issue.attachments"), n = g(null);
51
51
  return D() ? /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ C(d, {
52
- icon: /* @__PURE__ */ C(n, {}),
52
+ icon: /* @__PURE__ */ C(s, {}),
53
53
  label: t("attach"),
54
54
  variant: "ghost",
55
55
  size: "sm",
56
- onClick: () => r.current?.click()
56
+ onClick: () => n.current?.click()
57
57
  }), /* @__PURE__ */ C("input", {
58
- ref: r,
58
+ ref: n,
59
59
  type: "file",
60
60
  multiple: !0,
61
61
  hidden: !0,
@@ -88,15 +88,15 @@ function M() {
88
88
  maximumFractionDigits: 1
89
89
  });
90
90
  }
91
- function N({ workspace: t, identifier: n }) {
92
- let s = b("issue.attachments"), c = b("common"), u = M(), { data: g } = T(e(t, n)), [v, y] = _(null);
91
+ function N({ workspace: t, identifier: i }) {
92
+ let a = b("issue.attachments"), s = b("common"), u = M(), { data: g } = T(e(t, i)), [v, y] = _(null);
93
93
  h(() => {
94
- a.set(new Map((g ?? []).map((e) => [e.id, u(e.size)])), new Set((g ?? []).filter((e) => e.video).map((e) => e.id)));
95
- }, [g]), h(() => () => a.set(/* @__PURE__ */ new Map()), []), h(() => {
94
+ n.set(new Map((g ?? []).map((e) => [e.id, u(e.size)])), new Set((g ?? []).filter((e) => e.video).map((e) => e.id)));
95
+ }, [g]), h(() => () => n.set(/* @__PURE__ */ new Map()), []), h(() => {
96
96
  let e = (e) => y(e.detail);
97
- return document.addEventListener(l, e), () => document.removeEventListener(l, e);
97
+ return document.addEventListener(o, e), () => document.removeEventListener(o, e);
98
98
  }, []);
99
- let x = v ? o(v.src) : "";
99
+ let x = v ? r(v.src) : "";
100
100
  return /* @__PURE__ */ w(f, {
101
101
  open: v !== null,
102
102
  onClose: () => y(null),
@@ -107,17 +107,17 @@ function N({ workspace: t, identifier: n }) {
107
107
  children: [
108
108
  /* @__PURE__ */ C(p, {
109
109
  className: "min-w-0 flex-1 truncate text-sm font-medium",
110
- children: v?.name || s("image")
110
+ children: v?.name || a("image")
111
111
  }),
112
112
  /* @__PURE__ */ w("a", {
113
113
  href: x,
114
114
  download: v?.name ?? "",
115
115
  className: m({ size: "sm" }),
116
- children: [/* @__PURE__ */ C(i, { className: "size-3.5" }), s("download")]
116
+ children: [/* @__PURE__ */ C(l, { className: "size-3.5" }), a("download")]
117
117
  }),
118
118
  /* @__PURE__ */ C(d, {
119
- icon: /* @__PURE__ */ C(r, {}),
120
- label: c("close"),
119
+ icon: /* @__PURE__ */ C(c, {}),
120
+ label: s("close"),
121
121
  variant: "ghost",
122
122
  size: "sm",
123
123
  onClick: () => y(null)
@@ -127,7 +127,7 @@ function N({ workspace: t, identifier: n }) {
127
127
  className: "flex min-h-0 flex-1 items-center justify-center overflow-auto bg-muted p-4",
128
128
  children: v && /* @__PURE__ */ C("img", {
129
129
  src: x,
130
- alt: v.name || s("image"),
130
+ alt: v.name || a("image"),
131
131
  className: "max-h-[calc(90vh-5rem)] max-w-full object-contain"
132
132
  })
133
133
  })]
@@ -1,5 +1,5 @@
1
- import { copyItem as e } from "../lib/menus.js";
2
- import { headingAnchor as t } from "../lib/glossary.js";
1
+ import { headingAnchor as e } from "../lib/glossary.js";
2
+ import { copyItem as t } from "../lib/menus.js";
3
3
  import { commands as n } from "./SlashMenu.js";
4
4
  import { menuDivider as r, useOpenMenu as i } from "@parallelworks/ui";
5
5
  import { useState as a } from "react";
@@ -76,7 +76,7 @@ function m({ editor: m }) {
76
76
  label: h("duplicate"),
77
77
  onClick: () => m.chain().focus().insertContentAt(_.pos + _.node.nodeSize, _.node.toJSON()).run()
78
78
  },
79
- ..._.node.type.name === "heading" ? [e(h("copyLink"), `${window.location.href.split("#")[0]}#${t(_.node.textContent)}`)] : [],
79
+ ..._.node.type.name === "heading" ? [t(h("copyLink"), `${window.location.href.split("#")[0]}#${e(_.node.textContent)}`)] : [],
80
80
  r,
81
81
  {
82
82
  label: h("delete"),
@@ -1,8 +1,8 @@
1
1
  import { api as e, unwrap as t } from "../api/client.js";
2
2
  import { labelsQuery as n, teamMembersQuery as r, teamRotationQuery as i } from "../api/queries.js";
3
- import { AddIcon as a, ChevronDownIcon as o, CloseIcon as s } from "./icons.js";
4
- import { usePeople as c } from "../lib/people.js";
5
- import { useTime as l } from "../lib/time.js";
3
+ import { usePeople as a } from "../lib/people.js";
4
+ import { useTime as o } from "../lib/time.js";
5
+ import { AddIcon as s, ChevronDownIcon as c, CloseIcon as l } from "./icons.js";
6
6
  import { PersonHoverCard as u } from "./PersonHoverCard.js";
7
7
  import { Avatar as d, Button as f, Card as p, Combobox as m, IconButton as h, Select as g, SettingRow as _, SettingsCard as v, StatusBadge as y, Switch as b } from "@parallelworks/ui";
8
8
  import { useErrorMessage as x } from "@parallelworks/problem/react";
@@ -11,7 +11,7 @@ import { jsx as C, jsxs as w } from "react/jsx-runtime";
11
11
  import { useMutation as T, useQueryClient as E, useSuspenseQuery as D } from "@tanstack/react-query";
12
12
  // src/components/BugRotation.tsx
13
13
  function O({ workspace: O, teamKey: k, isAdmin: A }) {
14
- let j = S("rotation"), M = x(), N = l(), P = E(), F = i(O, k), { data: I } = D(F), { data: L } = D(n(O)), { data: R } = D(r(O, k)), { person: z } = c(O), B = { params: { path: {
14
+ let j = S("rotation"), M = x(), N = o(), P = E(), F = i(O, k), { data: I } = D(F), { data: L } = D(n(O)), { data: R } = D(r(O, k)), { person: z } = a(O), B = { params: { path: {
15
15
  workspace: O,
16
16
  key: k
17
17
  } } }, V = T({
@@ -139,7 +139,7 @@ function O({ workspace: O, teamKey: k, isAdmin: A }) {
139
139
  size: "sm",
140
140
  disabled: V.isPending,
141
141
  children: [
142
- /* @__PURE__ */ C(a, { className: "size-3.5" }),
142
+ /* @__PURE__ */ C(s, { className: "size-3.5" }),
143
143
  " ",
144
144
  j("add")
145
145
  ]
@@ -186,7 +186,7 @@ function O({ workspace: O, teamKey: k, isAdmin: A }) {
186
186
  variant: "ghost",
187
187
  size: "xs",
188
188
  label: j("moveUp", { name: z(e).name }),
189
- icon: /* @__PURE__ */ C(o, { className: "rotate-180" }),
189
+ icon: /* @__PURE__ */ C(c, { className: "rotate-180" }),
190
190
  disabled: V.isPending || t === 0,
191
191
  onClick: () => q(t, -1)
192
192
  }),
@@ -194,7 +194,7 @@ function O({ workspace: O, teamKey: k, isAdmin: A }) {
194
194
  variant: "ghost",
195
195
  size: "xs",
196
196
  label: j("moveDown", { name: z(e).name }),
197
- icon: /* @__PURE__ */ C(o, {}),
197
+ icon: /* @__PURE__ */ C(c, {}),
198
198
  disabled: V.isPending || t === G.length - 1,
199
199
  onClick: () => q(t, 1)
200
200
  }),
@@ -202,7 +202,7 @@ function O({ workspace: O, teamKey: k, isAdmin: A }) {
202
202
  variant: "ghost",
203
203
  size: "xs",
204
204
  label: j("remove", { name: z(e).name }),
205
- icon: /* @__PURE__ */ C(s, {}),
205
+ icon: /* @__PURE__ */ C(l, {}),
206
206
  disabled: V.isPending,
207
207
  onClick: () => V.mutate({ members: G.filter((t) => t !== e) })
208
208
  })
@@ -1,11 +1,11 @@
1
1
  import { api as e, unwrap as t } from "../api/client.js";
2
2
  import { codeHostAccountsQuery as n, codeHostQuery as r, meQuery as i } from "../api/queries.js";
3
- import { externalUrl as a } from "../lib/externalUrl.js";
4
- import { CodeHostIcon as o } from "./icons.js";
3
+ import { useConfirm as a } from "../lib/confirm.js";
4
+ import { externalUrl as o } from "../lib/externalUrl.js";
5
5
  import { usePeople as s } from "../lib/people.js";
6
- import { useConfirm as c } from "../lib/confirm.js";
7
- import { useFormError as l } from "./settings.js";
8
- import { ConnectionCard as u, ConnectionPanel as d } from "./ConnectionCard.js";
6
+ import { ConnectionCard as c, ConnectionPanel as l } from "./ConnectionCard.js";
7
+ import { CodeHostIcon as u } from "./icons.js";
8
+ import { useFormError as d } from "./settings.js";
9
9
  import { Avatar as f, Button as p, Card as m, ErrorText as h, Section as g, Select as _, SettingsCard as v, StatusLabel as y } from "@parallelworks/ui";
10
10
  import { useState as b } from "react";
11
11
  import { useTranslations as x } from "use-intl";
@@ -13,25 +13,25 @@ import { Fragment as S, jsx as C, jsxs as w } from "react/jsx-runtime";
13
13
  import { useMutation as T, useQueryClient as E, useSuspenseQuery as D } from "@tanstack/react-query";
14
14
  // src/components/CodeHostSettings.tsx
15
15
  function O({ workspace: n }) {
16
- let a = x("code"), { data: o } = D(i), { data: s } = D(r(n)), u = E(), d = l(), { confirm: f, dialog: m } = c(), v = T({
16
+ let o = x("code"), { data: s } = D(i), { data: c } = D(r(n)), l = E(), u = d(), { confirm: f, dialog: m } = a(), v = T({
17
17
  mutationFn: async (r) => t(await e.DELETE("/api/v1/workspaces/{workspace}/code-host/connections/{account}", { params: { path: {
18
18
  workspace: n,
19
19
  account: r
20
20
  } } })),
21
- onMutate: d.clear,
21
+ onMutate: u.clear,
22
22
  onSettled: () => {
23
- u.invalidateQueries({ queryKey: r(n).queryKey }), u.invalidateQueries({ queryKey: [
23
+ l.invalidateQueries({ queryKey: r(n).queryKey }), l.invalidateQueries({ queryKey: [
24
24
  "workspace",
25
25
  n,
26
26
  "teams"
27
27
  ] });
28
28
  }
29
29
  }), y = (e) => f({
30
- title: a("disconnectConfirm", { account: e }),
31
- description: a("disconnectDetail"),
32
- confirmLabel: a("disconnect"),
30
+ title: o("disconnectConfirm", { account: e }),
31
+ description: o("disconnectDetail"),
32
+ confirmLabel: o("disconnect"),
33
33
  onConfirm: () => v.mutateAsync(e)
34
- }), [S, O] = b(""), k = s.connections.filter((e) => e.connectedBy === o?.user.username), A = k[0];
34
+ }), [S, O] = b(""), k = c.connections.filter((e) => e.connectedBy === s?.user.username), A = k[0];
35
35
  if (!A) return null;
36
36
  let j = k.some((e) => e.account === S) ? S : A.account;
37
37
  return /* @__PURE__ */ w(g, {
@@ -39,8 +39,8 @@ function O({ workspace: n }) {
39
39
  tone: "error",
40
40
  collapsible: !1,
41
41
  headingLevel: 2,
42
- title: a("dangerZone"),
43
- description: a("disconnectDetail"),
42
+ title: o("dangerZone"),
43
+ description: o("disconnectDetail"),
44
44
  className: "mt-10",
45
45
  children: [
46
46
  /* @__PURE__ */ w("div", {
@@ -48,7 +48,7 @@ function O({ workspace: n }) {
48
48
  children: [/* @__PURE__ */ C("div", {
49
49
  className: "w-56 max-w-full",
50
50
  children: /* @__PURE__ */ C(_, {
51
- "aria-label": a("disconnectWhich"),
51
+ "aria-label": o("disconnectWhich"),
52
52
  value: j,
53
53
  onValueChange: (e) => e && O(e),
54
54
  items: k.map((e) => ({
@@ -60,24 +60,24 @@ function O({ workspace: n }) {
60
60
  variant: "danger",
61
61
  onClick: () => y(j),
62
62
  loading: v.isPending,
63
- children: a("disconnectAccount", { account: j })
63
+ children: o("disconnectAccount", { account: j })
64
64
  })]
65
65
  }),
66
66
  /* @__PURE__ */ C(h, {
67
67
  size: "md",
68
68
  className: "mt-3",
69
- children: d.error
69
+ children: u.error
70
70
  }),
71
71
  m
72
72
  ]
73
73
  });
74
74
  }
75
- function k({ workspace: n, isAdmin: i, result: c }) {
76
- let m = x("code"), { data: h } = D(r(n)), { person: g } = s(n), _ = l(), b = T({
75
+ function k({ workspace: n, isAdmin: i, result: a }) {
76
+ let m = x("code"), { data: h } = D(r(n)), { person: g } = s(n), _ = d(), b = T({
77
77
  mutationFn: async () => t(await e.POST("/api/v1/workspaces/{workspace}/code-host/connect", { params: { path: { workspace: n } } })),
78
78
  onMutate: _.clear,
79
79
  onSuccess: ({ url: e }) => {
80
- let t = a(e);
80
+ let t = o(e);
81
81
  t && window.location.assign(t);
82
82
  },
83
83
  onError: _.set
@@ -86,13 +86,13 @@ function k({ workspace: n, isAdmin: i, result: c }) {
86
86
  className: "px-3 py-2 text-sm text-muted-foreground",
87
87
  children: m("notConfigured")
88
88
  }) }) : /* @__PURE__ */ w(S, { children: [
89
- c && c !== "choose" && /* @__PURE__ */ C("p", {
89
+ a && a !== "choose" && /* @__PURE__ */ C("p", {
90
90
  role: "status",
91
- className: `mb-3 rounded-md bg-muted px-3 py-2 text-sm ${c === "failed" ? "text-danger" : ""}`,
92
- children: m(`result.${c}`)
91
+ className: `mb-3 rounded-md bg-muted px-3 py-2 text-sm ${a === "failed" ? "text-danger" : ""}`,
92
+ children: m(`result.${a}`)
93
93
  }),
94
- /* @__PURE__ */ C(u, {
95
- icon: /* @__PURE__ */ C(o, {
94
+ /* @__PURE__ */ C(c, {
95
+ icon: /* @__PURE__ */ C(u, {
96
96
  provider: h.provider,
97
97
  className: "size-7"
98
98
  }),
@@ -109,7 +109,7 @@ function k({ workspace: n, isAdmin: i, result: c }) {
109
109
  loading: b.isPending,
110
110
  children: m("connect")
111
111
  })] }),
112
- children: h.connections.length > 0 && /* @__PURE__ */ C(d, {
112
+ children: h.connections.length > 0 && /* @__PURE__ */ C(l, {
113
113
  title: m("connections"),
114
114
  children: h.connections.map((e) => /* @__PURE__ */ w("li", {
115
115
  className: "flex items-center gap-3 px-4 py-3 text-sm",
@@ -132,20 +132,20 @@ function k({ workspace: n, isAdmin: i, result: c }) {
132
132
  }),
133
133
  i && /* @__PURE__ */ C(A, {
134
134
  workspace: n,
135
- chosen: c === "choose"
135
+ chosen: a === "choose"
136
136
  })
137
137
  ] });
138
138
  }
139
- function A({ workspace: i, chosen: o }) {
140
- let s = x("code"), { data: c } = D(n(i)), u = E(), d = l(), f = T({
139
+ function A({ workspace: i, chosen: a }) {
140
+ let s = x("code"), { data: c } = D(n(i)), l = E(), u = d(), f = T({
141
141
  mutationFn: async (n) => t(await e.POST("/api/v1/workspaces/{workspace}/code-host/connections", {
142
142
  params: { path: { workspace: i } },
143
143
  body: { id: n }
144
144
  })),
145
- onMutate: d.clear,
146
- onError: d.set,
145
+ onMutate: u.clear,
146
+ onError: u.set,
147
147
  onSettled: () => {
148
- u.invalidateQueries({ queryKey: r(i).queryKey }), u.invalidateQueries({ queryKey: [
148
+ l.invalidateQueries({ queryKey: r(i).queryKey }), l.invalidateQueries({ queryKey: [
149
149
  "workspace",
150
150
  i,
151
151
  "teams"
@@ -156,10 +156,10 @@ function A({ workspace: i, chosen: o }) {
156
156
  params: { path: { workspace: i } },
157
157
  body: { install: !0 }
158
158
  })),
159
- onMutate: d.clear,
160
- onError: d.set
159
+ onMutate: u.clear,
160
+ onError: u.set
161
161
  });
162
- return !o && c.length === 0 ? null : /* @__PURE__ */ w(m, {
162
+ return !a && c.length === 0 ? null : /* @__PURE__ */ w(m, {
163
163
  size: "fill",
164
164
  padding: "sm",
165
165
  className: "mt-4",
@@ -192,7 +192,7 @@ function A({ workspace: i, chosen: o }) {
192
192
  }), /* @__PURE__ */ C(h, {
193
193
  size: "md",
194
194
  className: "mt-2",
195
- children: f.isError && f.variables === e.id ? d.error : null
195
+ children: f.isError && f.variables === e.id ? u.error : null
196
196
  })]
197
197
  }, e.id))
198
198
  }),
@@ -205,7 +205,7 @@ function A({ workspace: i, chosen: o }) {
205
205
  let e = window.open("about:blank", "_blank");
206
206
  g.mutate(void 0, {
207
207
  onSuccess: ({ url: t }) => {
208
- let n = a(t);
208
+ let n = o(t);
209
209
  if (!n) return e?.close();
210
210
  if (!e) return window.location.assign(n);
211
211
  e.opener = null, e.location.href = n;
@@ -223,7 +223,7 @@ function A({ workspace: i, chosen: o }) {
223
223
  /* @__PURE__ */ C(h, {
224
224
  size: "md",
225
225
  className: "mt-2",
226
- children: g.isError ? d.error : null
226
+ children: g.isError ? u.error : null
227
227
  })
228
228
  ]
229
229
  });