@parallelworks/tandem-web 0.171.1 → 0.171.3

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 (171) hide show
  1. package/_virtual/_virtual_i18n/en/common.js +5 -2
  2. package/_virtual/_virtual_i18n/es/common.js +5 -2
  3. package/_virtual/_virtual_i18n/ja/common.js +5 -2
  4. package/_virtual/_virtual_i18n/ko/common.js +5 -2
  5. package/_virtual/_virtual_i18n/zh/common.js +5 -2
  6. package/components/AccessGrants.js +6 -6
  7. package/components/ActivityTimeline.js +60 -60
  8. package/components/ActorAvatar.js +4 -4
  9. package/components/ActorLink.js +34 -0
  10. package/components/AgentWork.js +494 -494
  11. package/components/AppLauncher.js +7 -7
  12. package/components/AreaLink.js +13 -13
  13. package/components/AreaTiles.js +13 -13
  14. package/components/AreaWork.js +22 -22
  15. package/components/Attachments.js +73 -69
  16. package/components/BlockHandle.js +3 -3
  17. package/components/BugRotation.js +8 -8
  18. package/components/CodeHostSettings.js +121 -87
  19. package/components/CollabEditor.js +13 -13
  20. package/components/CommandPalette.js +206 -206
  21. package/components/CustomFields.js +95 -95
  22. package/components/CustomerRequests.js +11 -11
  23. package/components/DashboardPanel.js +201 -164
  24. package/components/DateChip.js +21 -21
  25. package/components/DocHistory.js +14 -14
  26. package/components/DocIcon.js +4 -4
  27. package/components/DocIconPicker.js +4 -4
  28. package/components/DocLinkPicker.js +22 -22
  29. package/components/DocLook.js +16 -16
  30. package/components/DocProperties.js +81 -81
  31. package/components/DocTable.js +53 -53
  32. package/components/DocsTree.js +179 -179
  33. package/components/Editor.js +69 -69
  34. package/components/FavoritesNav.js +78 -78
  35. package/components/GitHub.js +87 -87
  36. package/components/Graph.js +14 -14
  37. package/components/HostActions.js +21 -21
  38. package/components/HostPanel.js +6 -6
  39. package/components/HoverCards.js +74 -74
  40. package/components/IssueBoard.js +13 -10
  41. package/components/IssueBreakdown.js +31 -31
  42. package/components/IssueCode.js +19 -19
  43. package/components/IssueEvent.js +97 -92
  44. package/components/IssueFilters.js +39 -39
  45. package/components/IssueGroup.js +16 -16
  46. package/components/IssueImport.js +13 -13
  47. package/components/IssueInsights.js +20 -20
  48. package/components/IssueListBlock.js +81 -81
  49. package/components/IssueRelations.js +34 -34
  50. package/components/IssueRow.js +31 -31
  51. package/components/IssueSentry.js +36 -34
  52. package/components/IssueTemplates.js +23 -23
  53. package/components/IssueTypes.js +40 -40
  54. package/components/MarkdownTransfer.js +10 -10
  55. package/components/MentionPicker.js +19 -19
  56. package/components/NewIssueDialog.js +53 -53
  57. package/components/NewProjectDialog.js +82 -82
  58. package/components/PersonActivity.js +13 -13
  59. package/components/PersonHoverCard.js +44 -44
  60. package/components/Planning.js +16 -16
  61. package/components/Reports.js +8 -8
  62. package/components/SettingsNav.js +15 -15
  63. package/components/ShareDialog.js +8 -8
  64. package/components/SharedViewer.js +23 -23
  65. package/components/SlashMenu.js +26 -26
  66. package/components/SubPages.js +10 -10
  67. package/components/TeamForm.js +9 -9
  68. package/components/TeamRepositories.js +21 -21
  69. package/components/TeamWorkflow.js +6 -6
  70. package/components/UnlinkedMentions.js +29 -29
  71. package/components/Updates.js +8 -8
  72. package/components/Widgets.js +99 -97
  73. package/components/WorkCounts.js +12 -12
  74. package/components/cycleCrumb.js +8 -8
  75. package/components/editorPlugins.js +101 -101
  76. package/components/settings.js +6 -6
  77. package/components/video.js +7 -7
  78. package/hostedApp.js +24 -24
  79. package/index.js +18 -18
  80. package/lib/assignees.js +3 -3
  81. package/lib/attachments.js +12 -12
  82. package/lib/boardMove.js +27 -27
  83. package/lib/collab.js +1 -1
  84. package/lib/docs.js +115 -115
  85. package/lib/githubLink.js +7 -7
  86. package/lib/issueList.js +51 -51
  87. package/lib/issueMenu.js +117 -117
  88. package/lib/knowledge.js +134 -134
  89. package/lib/live.js +38 -38
  90. package/lib/notifications.js +47 -47
  91. package/lib/triageSeen.js +2 -2
  92. package/lib/views.js +31 -31
  93. package/package.json +24 -24
  94. package/pages/area.js +64 -64
  95. package/pages/areas.js +199 -199
  96. package/pages/decisions.js +51 -51
  97. package/pages/issues.js +120 -120
  98. package/pages/projects.js +238 -238
  99. package/pages/triage.js +202 -212
  100. package/routes/_workspace/agents/_slug2.js +127 -127
  101. package/routes/_workspace/agents/index2.js +22 -22
  102. package/routes/_workspace/dashboards/_dashboardId2.js +84 -84
  103. package/routes/_workspace/dashboards/index2.js +34 -34
  104. package/routes/_workspace/docs/_doc2.js +267 -267
  105. package/routes/_workspace/docs/space2._space.js +31 -31
  106. package/routes/_workspace/docs2.js +4 -4
  107. package/routes/_workspace/graph2.js +11 -11
  108. package/routes/_workspace/graph3.js +11 -11
  109. package/routes/_workspace/issues/_identifier2.js +519 -522
  110. package/routes/_workspace/issues/index.js +13 -13
  111. package/routes/_workspace/knowledge/_term2.js +148 -146
  112. package/routes/_workspace/knowledge/_term3.js +4 -4
  113. package/routes/_workspace/knowledge/index.js +12 -12
  114. package/routes/_workspace/knowledge/index2.js +117 -115
  115. package/routes/_workspace/measures2.js +8 -8
  116. package/routes/_workspace/measures3.js +29 -29
  117. package/routes/_workspace/notifications2.js +263 -263
  118. package/routes/_workspace/people/_username.js +10 -10
  119. package/routes/_workspace/people/_username2.js +41 -41
  120. package/routes/_workspace/projects/_projectId3.js +303 -303
  121. package/routes/_workspace/projects/_projectId4.js +4 -4
  122. package/routes/_workspace/projects/_projectId_3.milestones._milestoneId.js +28 -28
  123. package/routes/_workspace/projects/_projectId_4.milestones._milestoneId.js +4 -4
  124. package/routes/_workspace/projects/index.js +8 -8
  125. package/routes/_workspace/settings/account2.js +8 -8
  126. package/routes/_workspace/settings/audit-log2.js +8 -8
  127. package/routes/_workspace/settings/audit-log3.js +155 -155
  128. package/routes/_workspace/settings/connections2.js +4 -4
  129. package/routes/_workspace/settings/fields2.js +5 -5
  130. package/routes/_workspace/settings/github2.js +11 -11
  131. package/routes/_workspace/settings/gitlab2.js +5 -5
  132. package/routes/_workspace/settings/groups2.js +52 -52
  133. package/routes/_workspace/settings/import2.js +39 -39
  134. package/routes/_workspace/settings/index2.js +5 -5
  135. package/routes/_workspace/settings/intercom2.js +11 -11
  136. package/routes/_workspace/settings/labels2.js +33 -33
  137. package/routes/_workspace/settings/members2.js +81 -81
  138. package/routes/_workspace/settings/notifications2.js +46 -46
  139. package/routes/_workspace/settings/parallelworks2.js +20 -20
  140. package/routes/_workspace/settings/roles2.js +41 -41
  141. package/routes/_workspace/settings/runners2.js +15 -15
  142. package/routes/_workspace/settings/sentry2.js +15 -15
  143. package/routes/_workspace/settings/sessions2.js +9 -9
  144. package/routes/_workspace/settings/sessions3.js +4 -4
  145. package/routes/_workspace/settings/slack2.js +12 -12
  146. package/routes/_workspace/settings/sso2.js +37 -37
  147. package/routes/_workspace/settings/sso3.js +7 -7
  148. package/routes/_workspace/settings/teams2.js +29 -29
  149. package/routes/_workspace/settings/tokens2.js +32 -32
  150. package/routes/_workspace/settings/tokens3.js +4 -4
  151. package/routes/_workspace/settings/webhooks2.js +41 -41
  152. package/routes/_workspace/settings/zendesk2.js +11 -11
  153. package/routes/_workspace/teams/_key/cycles/_number2.js +33 -33
  154. package/routes/_workspace/teams/_key/cycles/_number3.js +7 -7
  155. package/routes/_workspace/teams/_key/cycles/index2.js +37 -37
  156. package/routes/_workspace/teams/_key/issues.js +10 -10
  157. package/routes/_workspace/teams/_key/projects.js +6 -6
  158. package/routes/_workspace/teams/_key/settings2.js +396 -396
  159. package/routes/_workspace2.js +308 -308
  160. package/routes/_workspace3.js +8 -8
  161. package/routes/device2.js +4 -4
  162. package/routes/device3.js +4 -4
  163. package/routes/docs/_tag/_endpoint2.js +3 -3
  164. package/routes/docs/_tag/index2.js +3 -3
  165. package/routes/docs/route2.js +7 -7
  166. package/routes/index2.js +5 -5
  167. package/routes/login2.js +10 -10
  168. package/routes/new2.js +12 -12
  169. package/routes/new3.js +5 -5
  170. package/routes/request2._token.js +6 -6
  171. 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,61 +1,65 @@
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";
5
- import { ErrorText as u, IconButton as d, Modal as f, ModalTitle as p, buttonClasses as m } from "@parallelworks/ui";
6
- import { useEffect as h, useRef as g, useState as _ } from "react";
7
- import { useErrorMessage as v } from "@parallelworks/problem/react";
8
- import { useFormatter as y, useTranslations as b } from "use-intl";
9
- import { ApiError as x } from "@parallelworks/problem";
10
- import { Fragment as S, jsx as C, jsxs as w } from "react/jsx-runtime";
11
- import { useQuery as T, useQueryClient as E } from "@tanstack/react-query";
1
+ import { attachmentsQuery as e, meQuery as t, workspaceQuery as n } from "../api/queries.js";
2
+ import { attachmentSizes as r, attachmentURL as i, insertAttachments as a, uploadAttachment as o } from "../lib/attachments.js";
3
+ import { openImageEvent as s } from "./editorPlugins.js";
4
+ import { AttachmentIcon as c, CloseIcon as l, DownloadIcon as u } from "./icons.js";
5
+ import { ErrorText as d, IconButton as f, Modal as p, ModalTitle as m, buttonClasses as h } from "@parallelworks/ui";
6
+ import { useParams as g } from "@tanstack/react-router";
7
+ import { useEffect as _, useRef as v, useState as y } from "react";
8
+ import { useErrorMessage as b } from "@parallelworks/problem/react";
9
+ import { useFormatter as x, useTranslations as S } from "use-intl";
10
+ import { ApiError as C } from "@parallelworks/problem";
11
+ import { Fragment as w, jsx as T, jsxs as E } from "react/jsx-runtime";
12
+ import { useQuery as D, useQueryClient as O } from "@tanstack/react-query";
12
13
  // src/components/Attachments.tsx
13
- function D() {
14
- let { data: e } = T(t);
15
- return e?.attachments !== !1;
14
+ function k() {
15
+ let { workspace: e = "" } = g({ strict: !1 }), { data: r } = D(t), { data: i } = D({
16
+ ...n(e),
17
+ enabled: e !== ""
18
+ });
19
+ return r?.attachments !== !1 && i?.attachments !== !1;
16
20
  }
17
- function O(t, n) {
18
- let r = E();
19
- return k((e) => c(t, n, e), () => r.invalidateQueries({ queryKey: e(t, n).queryKey }));
21
+ function A(t, n) {
22
+ let r = O();
23
+ return j((e) => o(t, n, e), () => r.invalidateQueries({ queryKey: e(t, n).queryKey }));
20
24
  }
21
- function k(e, t) {
22
- let n = b("issue.attachments"), r = v(), [i, a] = _(0), [o, c] = _(null), l = D();
25
+ function j(e, t) {
26
+ let n = S("issue.attachments"), r = b(), [i, o] = y(0), [s, c] = y(null), l = k();
23
27
  return {
24
- upload: async (i, o, u) => {
25
- if (!i || o.length === 0) return;
28
+ upload: async (i, s, u) => {
29
+ if (!i || s.length === 0) return;
26
30
  if (!l) {
27
- c(n("off", { name: o[0]?.name ?? "" }));
31
+ c(n("off", { name: s[0]?.name ?? "" }));
28
32
  return;
29
33
  }
30
- c(null), a((e) => e + o.length);
34
+ c(null), o((e) => e + s.length);
31
35
  let d = [];
32
- for (let t of o) try {
36
+ for (let t of s) try {
33
37
  d.push(await e(t));
34
38
  } catch (e) {
35
- let i = e instanceof x ? e.status : 0;
39
+ let i = e instanceof C ? e.status : 0;
36
40
  c(i === 413 ? n("tooLarge", { name: t.name }) : n("failed", {
37
41
  name: t.name,
38
42
  reason: r(e)
39
43
  }));
40
44
  } finally {
41
- a((e) => e - 1);
45
+ o((e) => e - 1);
42
46
  }
43
- d.length > 0 && !i.isDestroyed && s(i, d, u), t?.();
47
+ d.length > 0 && !i.isDestroyed && a(i, d, u), t?.();
44
48
  },
45
49
  pending: i,
46
- error: o
50
+ error: s
47
51
  };
48
52
  }
49
- function A({ onFiles: e }) {
50
- let t = b("issue.attachments"), r = g(null);
51
- return D() ? /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ C(d, {
52
- icon: /* @__PURE__ */ C(n, {}),
53
+ function M({ onFiles: e }) {
54
+ let t = S("issue.attachments"), n = v(null);
55
+ return k() ? /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T(f, {
56
+ icon: /* @__PURE__ */ T(c, {}),
53
57
  label: t("attach"),
54
58
  variant: "ghost",
55
59
  size: "sm",
56
- onClick: () => r.current?.click()
57
- }), /* @__PURE__ */ C("input", {
58
- ref: r,
60
+ onClick: () => n.current?.click()
61
+ }), /* @__PURE__ */ T("input", {
62
+ ref: n,
59
63
  type: "file",
60
64
  multiple: !0,
61
65
  hidden: !0,
@@ -64,19 +68,19 @@ function A({ onFiles: e }) {
64
68
  }
65
69
  })] }) : null;
66
70
  }
67
- function j({ pending: e, error: t }) {
68
- let n = b("issue.attachments");
69
- return e > 0 ? /* @__PURE__ */ C("span", {
71
+ function N({ pending: e, error: t }) {
72
+ let n = S("issue.attachments");
73
+ return e > 0 ? /* @__PURE__ */ T("span", {
70
74
  className: "text-xs text-muted-foreground",
71
75
  role: "status",
72
76
  children: n("uploading", { count: e })
73
- }) : /* @__PURE__ */ C(u, {
77
+ }) : /* @__PURE__ */ T(d, {
74
78
  inline: !0,
75
79
  children: t
76
80
  });
77
81
  }
78
- function M() {
79
- let e = y();
82
+ function P() {
83
+ let e = x();
80
84
  return (t) => t < 1 << 20 ? e.number(Math.max(1, Math.round(t / 1024)), {
81
85
  style: "unit",
82
86
  unit: "kilobyte",
@@ -88,49 +92,49 @@ function M() {
88
92
  maximumFractionDigits: 1
89
93
  });
90
94
  }
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);
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(() => {
96
- let e = (e) => y(e.detail);
97
- return document.addEventListener(l, e), () => document.removeEventListener(l, e);
95
+ function F({ workspace: t, identifier: n }) {
96
+ let a = S("issue.attachments"), o = S("common"), c = P(), { data: d } = D(e(t, n)), [g, v] = y(null);
97
+ _(() => {
98
+ r.set(new Map((d ?? []).map((e) => [e.id, c(e.size)])), new Set((d ?? []).filter((e) => e.video).map((e) => e.id)));
99
+ }, [d]), _(() => () => r.set(/* @__PURE__ */ new Map()), []), _(() => {
100
+ let e = (e) => v(e.detail);
101
+ return document.addEventListener(s, e), () => document.removeEventListener(s, e);
98
102
  }, []);
99
- let x = v ? o(v.src) : "";
100
- return /* @__PURE__ */ w(f, {
101
- open: v !== null,
102
- onClose: () => y(null),
103
+ let b = g ? i(g.src) : "";
104
+ return /* @__PURE__ */ E(p, {
105
+ open: g !== null,
106
+ onClose: () => v(null),
103
107
  align: "center",
104
108
  className: "flex max-h-[90vh] w-[min(92vw,1200px)] flex-col overflow-hidden",
105
- children: [/* @__PURE__ */ w("div", {
109
+ children: [/* @__PURE__ */ E("div", {
106
110
  className: "flex h-12 shrink-0 items-center gap-2 border-b border-border px-4",
107
111
  children: [
108
- /* @__PURE__ */ C(p, {
112
+ /* @__PURE__ */ T(m, {
109
113
  className: "min-w-0 flex-1 truncate text-sm font-medium",
110
- children: v?.name || s("image")
114
+ children: g?.name || a("image")
111
115
  }),
112
- /* @__PURE__ */ w("a", {
113
- href: x,
114
- download: v?.name ?? "",
115
- className: m({ size: "sm" }),
116
- children: [/* @__PURE__ */ C(i, { className: "size-3.5" }), s("download")]
116
+ /* @__PURE__ */ E("a", {
117
+ href: b,
118
+ download: g?.name ?? "",
119
+ className: h({ size: "sm" }),
120
+ children: [/* @__PURE__ */ T(u, { className: "size-3.5" }), a("download")]
117
121
  }),
118
- /* @__PURE__ */ C(d, {
119
- icon: /* @__PURE__ */ C(r, {}),
120
- label: c("close"),
122
+ /* @__PURE__ */ T(f, {
123
+ icon: /* @__PURE__ */ T(l, {}),
124
+ label: o("close"),
121
125
  variant: "ghost",
122
126
  size: "sm",
123
- onClick: () => y(null)
127
+ onClick: () => v(null)
124
128
  })
125
129
  ]
126
- }), /* @__PURE__ */ C("div", {
130
+ }), /* @__PURE__ */ T("div", {
127
131
  className: "flex min-h-0 flex-1 items-center justify-center overflow-auto bg-muted p-4",
128
- children: v && /* @__PURE__ */ C("img", {
129
- src: x,
130
- alt: v.name || s("image"),
132
+ children: g && /* @__PURE__ */ T("img", {
133
+ src: b,
134
+ alt: g.name || a("image"),
131
135
  className: "max-h-[calc(90vh-5rem)] max-w-full object-contain"
132
136
  })
133
137
  })]
134
138
  });
135
139
  }
136
- export { A as AttachButton, N as IssueAttachments, j as UploadStatus, O as useAttachmentUpload, D as useAttachmentsOn, k as useFileUpload };
140
+ export { M as AttachButton, F as IssueAttachments, N as UploadStatus, A as useAttachmentUpload, k as useAttachmentsOn, j as useFileUpload };
@@ -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
  })