@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,18 +1,18 @@
1
- import { appURL as e } from "../lib/base.js";
2
- import { docsQuery as t, knowledgeQuery as n } from "../api/queries.js";
1
+ import { docsQuery as e, knowledgeQuery as t } from "../api/queries.js";
2
+ import { appURL as n } from "../lib/base.js";
3
3
  import { docKey as r, docURL as i } from "../lib/docs.js";
4
- import { FileTextIcon as a, LibraryIcon as o } from "./icons.js";
5
- import { docForms as s, formsOf as c } from "../lib/glossary.js";
6
- import { entryPath as l, termRef as u } from "../lib/knowledgeKinds.js";
7
- import { linksIn as d, unlinkedMentions as f } from "./editorPlugins.js";
4
+ import { docForms as a, formsOf as o } from "../lib/glossary.js";
5
+ import { entryPath as s, termRef as c } from "../lib/knowledgeKinds.js";
6
+ import { linksIn as l, unlinkedMentions as u } from "./editorPlugins.js";
7
+ import { FileTextIcon as d, LibraryIcon as f } from "./icons.js";
8
8
  import { Button as p } from "@parallelworks/ui";
9
9
  import { useEffect as m, useMemo as h, useState as g } from "react";
10
10
  import { useTranslations as _ } from "use-intl";
11
11
  import { jsx as v, jsxs as y } from "react/jsx-runtime";
12
12
  import { useQuery as b } from "@tanstack/react-query";
13
13
  // src/components/UnlinkedMentions.tsx
14
- function x(a, o, p) {
15
- let { data: _ = [] } = b(n(a)), { data: v = [] } = b(t(a)), [y, x] = g(0);
14
+ function x(d, f, p) {
15
+ let { data: _ = [] } = b(t(d)), { data: v = [] } = b(e(d)), [y, x] = g(0);
16
16
  m(() => {
17
17
  if (!p) return;
18
18
  let e = () => x((e) => e + 1);
@@ -20,36 +20,36 @@ function x(a, o, p) {
20
20
  p.off("update", e);
21
21
  };
22
22
  }, [p]);
23
- let S = h(() => _.filter((e) => e.status !== "superseded"), [_]), C = h(() => [...c(S), ...s(v, o.key)].sort((e, t) => t.text.length - e.text.length), [
23
+ let S = h(() => _.filter((e) => e.status !== "superseded"), [_]), C = h(() => [...o(S), ...a(v, f.key)].sort((e, t) => t.text.length - e.text.length), [
24
24
  S,
25
25
  v,
26
- o.key
26
+ f.key
27
27
  ]);
28
28
  return h(() => {
29
29
  if (!p || p.isDestroyed) return [];
30
- let t = [...d(p.state.doc)], n = new Map(v.map((e) => [e.key, e])), o = new Map(S.map((e) => [e.id, e]));
31
- return f(p.state.doc, C, (e) => e.startsWith("doc:") ? t.some((t) => {
32
- let n = t.split(/[?#]/)[0] ?? "";
33
- return n.includes("/docs/") && r(n.split("/").pop() ?? "") === e.slice(4);
34
- }) : t.some((t) => {
35
- let n = o.get(e), r = (t.split(/[?#]/)[0] ?? "").split("/knowledge/")[1];
36
- return t.includes(`entry=${e}`) || !!r && (r === e || r === n?.slug);
37
- })).flatMap((t) => {
38
- if (t.id.startsWith("doc:")) {
39
- let e = n.get(t.id.slice(4));
40
- return e ? [{
41
- ...t,
42
- target: e.title,
30
+ let e = [...l(p.state.doc)], t = new Map(v.map((e) => [e.key, e])), a = new Map(S.map((e) => [e.id, e]));
31
+ return u(p.state.doc, C, (t) => t.startsWith("doc:") ? e.some((e) => {
32
+ let n = e.split(/[?#]/)[0] ?? "";
33
+ return n.includes("/docs/") && r(n.split("/").pop() ?? "") === t.slice(4);
34
+ }) : e.some((e) => {
35
+ let n = a.get(t), r = (e.split(/[?#]/)[0] ?? "").split("/knowledge/")[1];
36
+ return e.includes(`entry=${t}`) || !!r && (r === t || r === n?.slug);
37
+ })).flatMap((e) => {
38
+ if (e.id.startsWith("doc:")) {
39
+ let n = t.get(e.id.slice(4));
40
+ return n ? [{
41
+ ...e,
42
+ target: n.title,
43
43
  kind: "doc",
44
- href: i(a, e)
44
+ href: i(d, n)
45
45
  }] : [];
46
46
  }
47
- let r = o.get(t.id);
47
+ let r = a.get(e.id);
48
48
  return r ? [{
49
- ...t,
49
+ ...e,
50
50
  target: r.name,
51
51
  kind: "term",
52
- href: e(l(a, u(r)))
52
+ href: n(s(d, c(r)))
53
53
  }] : [];
54
54
  });
55
55
  }, [
@@ -57,7 +57,7 @@ function x(a, o, p) {
57
57
  C,
58
58
  v,
59
59
  S,
60
- a,
60
+ d,
61
61
  y
62
62
  ]);
63
63
  }
@@ -99,7 +99,7 @@ function C({ editor: e, suggestions: t }) {
99
99
  children: [
100
100
  /* @__PURE__ */ v("span", {
101
101
  className: "mt-0.5 text-muted-foreground",
102
- children: t.kind === "doc" ? /* @__PURE__ */ v(a, { className: "size-3.5" }) : /* @__PURE__ */ v(o, { className: "size-3.5" })
102
+ children: t.kind === "doc" ? /* @__PURE__ */ v(d, { className: "size-3.5" }) : /* @__PURE__ */ v(f, { className: "size-3.5" })
103
103
  }),
104
104
  /* @__PURE__ */ y("button", {
105
105
  type: "button",
@@ -1,7 +1,7 @@
1
1
  import { meQuery as e } from "../api/queries.js";
2
- import { usePeople as t } from "../lib/people.js";
3
- import { HealthIcon as n } from "./Planning.js";
4
- import { useConfirm as r } from "../lib/confirm.js";
2
+ import { useConfirm as t } from "../lib/confirm.js";
3
+ import { usePeople as n } from "../lib/people.js";
4
+ import { HealthIcon as r } from "./Planning.js";
5
5
  import { ActionMenu as i, Avatar as a, Button as o, Card as s, ErrorText as c, RelativeTime as l, Select as u, Textarea as d, buttonClasses as f, cx as p, fieldBox as m } from "@parallelworks/ui";
6
6
  import { useState as h } from "react";
7
7
  import { useErrorMessage as g } from "@parallelworks/problem/react";
@@ -16,13 +16,13 @@ var S = [
16
16
  "off_track"
17
17
  ];
18
18
  function C({ workspace: C, state: w, health: T, updates: E, canWrite: D, placeholder: O, post: k, remove: A }) {
19
- let j = _("planning"), M = _("common"), { data: N } = b(e), { confirm: P, dialog: F } = r(), I = g(), { actorName: L, avatarOf: R } = t(C), [z, B] = h(T ?? "on_track"), [V, H] = h("");
19
+ let j = _("planning"), M = _("common"), { data: N } = b(e), { confirm: P, dialog: F } = t(), I = g(), { actorName: L, avatarOf: R } = n(C), [z, B] = h(T ?? "on_track"), [V, H] = h("");
20
20
  return /* @__PURE__ */ y("section", { children: [
21
21
  /* @__PURE__ */ y("h2", {
22
22
  className: "flex items-center gap-2 text-base font-semibold",
23
23
  children: [j("updates"), /* @__PURE__ */ y("span", {
24
24
  className: "flex items-center gap-1 text-xs font-normal text-muted-foreground",
25
- children: [/* @__PURE__ */ v(n, { state: w }), j(`health.${w}`)]
25
+ children: [/* @__PURE__ */ v(r, { state: w }), j(`health.${w}`)]
26
26
  })]
27
27
  }),
28
28
  D && /* @__PURE__ */ y("form", {
@@ -54,12 +54,12 @@ function C({ workspace: C, state: w, health: T, updates: E, canWrite: D, placeho
54
54
  items: S.map((e) => ({
55
55
  value: e,
56
56
  label: j(`health.${e}`),
57
- icon: /* @__PURE__ */ v(n, { state: e })
57
+ icon: /* @__PURE__ */ v(r, { state: e })
58
58
  })),
59
59
  trigger: /* @__PURE__ */ y("button", {
60
60
  type: "button",
61
61
  className: f({ size: "sm" }),
62
- children: [/* @__PURE__ */ v(n, { state: z }), j(`health.${z}`)]
62
+ children: [/* @__PURE__ */ v(r, { state: z }), j(`health.${z}`)]
63
63
  })
64
64
  }),
65
65
  k.isError && /* @__PURE__ */ v(c, {
@@ -90,7 +90,7 @@ function C({ workspace: C, state: w, health: T, updates: E, canWrite: D, placeho
90
90
  children: [/* @__PURE__ */ y("div", {
91
91
  className: "flex items-center gap-2 text-xs",
92
92
  children: [
93
- /* @__PURE__ */ v(n, { state: e.health }),
93
+ /* @__PURE__ */ v(r, { state: e.health }),
94
94
  /* @__PURE__ */ v("span", {
95
95
  className: "font-medium",
96
96
  children: j(`health.${e.health}`)
@@ -1,70 +1,70 @@
1
- import { Link as e } from "../lib/router.js";
2
- import { externalUrl as t } from "../lib/externalUrl.js";
1
+ import { externalUrl as e } from "../lib/externalUrl.js";
2
+ import { Link as t } from "../lib/router.js";
3
3
  import { CheckIcon as n, FileTextIcon as r, PullRequestIcon as i } from "./icons.js";
4
- import { ProgressBar as a, Table as o } from "@parallelworks/ui";
5
- import { useFormatter as s, useLocale as c, useTranslations as l } from "use-intl";
6
- import { jsx as u, jsxs as d } from "react/jsx-runtime";
4
+ import { ProgressBar as a, Table as o, Tooltip as s } from "@parallelworks/ui";
5
+ import { useFormatter as c, useLocale as l, useTranslations as u } from "use-intl";
6
+ import { jsx as d, jsxs as f } from "react/jsx-runtime";
7
7
  // src/components/Widgets.tsx
8
- var f = (...e) => e.filter(Boolean).join(" ");
9
- function p({ workspace: e, widgets: t }) {
10
- return t.length === 0 ? null : /* @__PURE__ */ u("div", {
8
+ var p = (...e) => e.filter(Boolean).join(" ");
9
+ function m({ workspace: e, widgets: t }) {
10
+ return t.length === 0 ? null : /* @__PURE__ */ d("div", {
11
11
  className: "mt-2 space-y-3",
12
- children: t.map((t, n) => /* @__PURE__ */ d("figure", {
12
+ children: t.map((t, n) => /* @__PURE__ */ f("figure", {
13
13
  className: "min-w-0",
14
- children: [t.title && /* @__PURE__ */ u("figcaption", {
14
+ children: [t.title && /* @__PURE__ */ d("figcaption", {
15
15
  className: "mb-1 text-xs font-medium text-muted-foreground",
16
16
  children: t.title
17
- }), /* @__PURE__ */ u(m, {
17
+ }), /* @__PURE__ */ d(h, {
18
18
  workspace: e,
19
19
  widget: t
20
20
  })]
21
21
  }, n))
22
22
  });
23
23
  }
24
- function m({ workspace: e, widget: t }) {
24
+ function h({ workspace: e, widget: t }) {
25
25
  switch (t.type) {
26
- case "table": return /* @__PURE__ */ u(h, {
26
+ case "table": return /* @__PURE__ */ d(g, {
27
27
  columns: t.columns ?? [],
28
28
  rows: (t.rows ?? []).map((e) => e ?? [])
29
29
  });
30
- case "chart": return /* @__PURE__ */ u(_, {
30
+ case "chart": return /* @__PURE__ */ d(v, {
31
31
  kind: t.chart === "line" ? "line" : "bar",
32
32
  labels: t.labels ?? [],
33
33
  series: t.series ?? []
34
34
  });
35
- case "diff": return /* @__PURE__ */ u(v, {
35
+ case "diff": return /* @__PURE__ */ d(y, {
36
36
  path: t.path ?? "",
37
37
  patch: t.patch ?? ""
38
38
  });
39
- case "files": return /* @__PURE__ */ u(y, { files: t.files ?? [] });
40
- case "tests": return /* @__PURE__ */ u(b, { widget: t });
41
- case "checklist": return /* @__PURE__ */ u(x, { checks: t.checks ?? [] });
42
- case "progress": return /* @__PURE__ */ u(S, {
39
+ case "files": return /* @__PURE__ */ d(b, { files: t.files ?? [] });
40
+ case "tests": return /* @__PURE__ */ d(x, { widget: t });
41
+ case "checklist": return /* @__PURE__ */ d(S, { checks: t.checks ?? [] });
42
+ case "progress": return /* @__PURE__ */ d(C, {
43
43
  value: t.value ?? 0,
44
44
  max: t.max ?? 1,
45
45
  title: t.title
46
46
  });
47
- case "links": return /* @__PURE__ */ u(C, {
47
+ case "links": return /* @__PURE__ */ d(w, {
48
48
  workspace: e,
49
49
  links: t.links ?? []
50
50
  });
51
51
  default: return null;
52
52
  }
53
53
  }
54
- function h({ columns: e, rows: t }) {
55
- return /* @__PURE__ */ d(o, {
54
+ function g({ columns: e, rows: t }) {
55
+ return /* @__PURE__ */ f(o, {
56
56
  density: "compact",
57
57
  borderless: !0,
58
58
  panel: !1,
59
59
  tbodyClassName: "divide-y divide-border",
60
60
  wrapperClassName: "rounded-md border border-border",
61
- children: [e.map((e, t) => /* @__PURE__ */ u(o.Header, {
61
+ children: [e.map((e, t) => /* @__PURE__ */ d(o.Header, {
62
62
  caps: !1,
63
63
  children: e
64
- }, t)), t.map((e, t) => /* @__PURE__ */ u("tr", { children: e.map((e, t) => /* @__PURE__ */ u(o.Item, { children: e }, t)) }, t))]
64
+ }, t)), t.map((e, t) => /* @__PURE__ */ d("tr", { children: e.map((e, t) => /* @__PURE__ */ d(o.Item, { children: e }, t)) }, t))]
65
65
  });
66
66
  }
67
- var g = [
67
+ var _ = [
68
68
  "text-primary",
69
69
  "text-agent",
70
70
  "text-success",
@@ -72,107 +72,109 @@ var g = [
72
72
  "text-danger",
73
73
  "text-muted-foreground"
74
74
  ];
75
- function _({ kind: e, labels: t, series: n }) {
76
- let r = s(), i = l("widgets"), a = n.flatMap((e) => e.values ?? []), o = Math.max(0, ...a), c = Math.min(0, ...a), p = o - c || 1, m = 600 / t.length, h = (e) => 160 - (e - c) / p * 160, _ = m * .7 / n.length;
77
- return /* @__PURE__ */ d("div", {
75
+ function v({ kind: e, labels: t, series: n }) {
76
+ let r = c(), i = u("widgets"), a = n.flatMap((e) => e.values ?? []), o = Math.max(0, ...a), l = Math.min(0, ...a), m = o - l || 1, h = 600 / t.length, g = (e) => 160 - (e - l) / m * 160, v = h * .7 / n.length;
77
+ return /* @__PURE__ */ f("div", {
78
78
  className: "rounded-md border border-border p-3",
79
79
  children: [
80
- /* @__PURE__ */ d("svg", {
80
+ /* @__PURE__ */ f("svg", {
81
81
  viewBox: "0 0 600 160",
82
82
  className: "h-40 w-full",
83
83
  preserveAspectRatio: "none",
84
84
  role: "img",
85
85
  "aria-label": i("chart", { series: n.map((e) => e.name).join(", ") }),
86
- children: [/* @__PURE__ */ u("line", {
86
+ children: [/* @__PURE__ */ d("line", {
87
87
  x1: 0,
88
88
  x2: 600,
89
- y1: h(0),
90
- y2: h(0),
89
+ y1: g(0),
90
+ y2: g(0),
91
91
  className: "stroke-border",
92
92
  strokeWidth: 1
93
- }), n.map((n, i) => /* @__PURE__ */ u("g", {
94
- className: g[i % g.length],
95
- children: e === "bar" ? (n.values ?? []).map((e, a) => /* @__PURE__ */ u("rect", {
96
- x: a * m + m * .15 + i * _,
97
- y: Math.min(h(e), h(0)),
98
- width: _,
99
- height: Math.abs(h(e) - h(0)),
100
- fill: "currentColor",
101
- children: /* @__PURE__ */ u("title", { children: `${n.name}, ${t[a]}: ${r.number(e)}` })
102
- }, a)) : /* @__PURE__ */ u("polyline", {
93
+ }), n.map((n, i) => /* @__PURE__ */ d("g", {
94
+ className: _[i % _.length],
95
+ children: e === "bar" ? (n.values ?? []).map((e, a) => /* @__PURE__ */ d(s, {
96
+ content: `${n.name}, ${t[a]}: ${r.number(e)}`,
97
+ children: /* @__PURE__ */ d("rect", {
98
+ x: a * h + h * .15 + i * v,
99
+ y: Math.min(g(e), g(0)),
100
+ width: v,
101
+ height: Math.abs(g(e) - g(0)),
102
+ fill: "currentColor"
103
+ })
104
+ }, a)) : /* @__PURE__ */ d("polyline", {
103
105
  fill: "none",
104
106
  stroke: "currentColor",
105
107
  strokeWidth: 2,
106
108
  vectorEffect: "non-scaling-stroke",
107
- points: (n.values ?? []).map((e, t) => `${t * m + m / 2},${h(e)}`).join(" ")
109
+ points: (n.values ?? []).map((e, t) => `${t * h + h / 2},${g(e)}`).join(" ")
108
110
  })
109
111
  }, n.name))]
110
112
  }),
111
- /* @__PURE__ */ u("div", {
113
+ /* @__PURE__ */ d("div", {
112
114
  className: "mt-1 flex justify-between gap-1 text-[11px] text-muted-foreground",
113
- children: t.map((e, t) => /* @__PURE__ */ u("span", {
115
+ children: t.map((e, t) => /* @__PURE__ */ d("span", {
114
116
  className: "min-w-0 flex-1 truncate text-center",
115
117
  children: e
116
118
  }, t))
117
119
  }),
118
- n.length > 1 && /* @__PURE__ */ u("ul", {
120
+ n.length > 1 && /* @__PURE__ */ d("ul", {
119
121
  className: "mt-2 flex flex-wrap gap-3 text-xs",
120
- children: n.map((e, t) => /* @__PURE__ */ d("li", {
122
+ children: n.map((e, t) => /* @__PURE__ */ f("li", {
121
123
  className: "flex items-center gap-1.5",
122
- children: [/* @__PURE__ */ u("span", { className: f("size-2 rounded-sm bg-current", g[t % g.length]) }), e.name]
124
+ children: [/* @__PURE__ */ d("span", { className: p("size-2 rounded-sm bg-current", _[t % _.length]) }), e.name]
123
125
  }, e.name))
124
126
  })
125
127
  ]
126
128
  });
127
129
  }
128
- function v({ path: e, patch: t }) {
130
+ function y({ path: e, patch: t }) {
129
131
  let n = t.replace(/\n$/, "").split("\n");
130
- return /* @__PURE__ */ d("div", {
132
+ return /* @__PURE__ */ f("div", {
131
133
  className: "overflow-hidden rounded-md border border-border",
132
- children: [e && /* @__PURE__ */ d("div", {
134
+ children: [e && /* @__PURE__ */ f("div", {
133
135
  className: "flex items-center gap-1.5 border-b border-border bg-muted px-3 py-1.5 font-mono text-xs",
134
- children: [/* @__PURE__ */ u(r, { className: "size-3.5 text-muted-foreground" }), e]
135
- }), /* @__PURE__ */ u("pre", {
136
+ children: [/* @__PURE__ */ d(r, { className: "size-3.5 text-muted-foreground" }), e]
137
+ }), /* @__PURE__ */ d("pre", {
136
138
  className: "max-h-96 overflow-auto py-1 font-mono text-xs leading-5",
137
- children: n.map((e, t) => /* @__PURE__ */ u("div", {
138
- className: f("px-3 whitespace-pre", e.startsWith("+") && "bg-success/10 text-success", e.startsWith("-") && "bg-danger/10 text-danger", e.startsWith("@@") && "text-muted-foreground"),
139
+ children: n.map((e, t) => /* @__PURE__ */ d("div", {
140
+ className: p("px-3 whitespace-pre", e.startsWith("+") && "bg-success/10 text-success", e.startsWith("-") && "bg-danger/10 text-danger", e.startsWith("@@") && "text-muted-foreground"),
139
141
  children: e || " "
140
142
  }, t))
141
143
  })]
142
144
  });
143
145
  }
144
- function y({ files: e }) {
145
- let t = l("widgets"), n = [...e].sort((e, t) => e.path.localeCompare(t.path));
146
- return /* @__PURE__ */ u("ul", {
146
+ function b({ files: e }) {
147
+ let t = u("widgets"), n = [...e].sort((e, t) => e.path.localeCompare(t.path));
148
+ return /* @__PURE__ */ d("ul", {
147
149
  className: "rounded-md border border-border py-1 font-mono text-xs",
148
150
  children: n.map((e) => {
149
151
  let n = e.path.split("/");
150
- return /* @__PURE__ */ d("li", {
152
+ return /* @__PURE__ */ f("li", {
151
153
  className: "flex items-center gap-2 px-3 py-0.5",
152
- children: [/* @__PURE__ */ d("span", {
154
+ children: [/* @__PURE__ */ f("span", {
153
155
  style: { paddingLeft: `${(n.length - 1) * 12}px` },
154
156
  className: "min-w-0 truncate",
155
157
  children: [
156
- /* @__PURE__ */ u("span", {
158
+ /* @__PURE__ */ d("span", {
157
159
  className: "text-muted-foreground",
158
160
  children: n.slice(0, -1).join("/")
159
161
  }),
160
- n.length > 1 && /* @__PURE__ */ u("span", {
162
+ n.length > 1 && /* @__PURE__ */ d("span", {
161
163
  className: "text-muted-foreground",
162
164
  children: "/"
163
165
  }),
164
166
  n.at(-1)
165
167
  ]
166
- }), e.change && /* @__PURE__ */ u("span", {
167
- className: f("ml-auto shrink-0 font-sans text-[11px]", e.change === "added" && "text-success", e.change === "removed" && "text-danger", e.change === "changed" && "text-warning"),
168
+ }), e.change && /* @__PURE__ */ d("span", {
169
+ className: p("ml-auto shrink-0 font-sans text-[11px]", e.change === "added" && "text-success", e.change === "removed" && "text-danger", e.change === "changed" && "text-warning"),
168
170
  children: t(`change.${e.change}`)
169
171
  })]
170
172
  }, e.path);
171
173
  })
172
174
  });
173
175
  }
174
- function b({ widget: e }) {
175
- let t = l("widgets"), n = [
176
+ function x({ widget: e }) {
177
+ let t = u("widgets"), n = [
176
178
  {
177
179
  key: "passed",
178
180
  n: e.passed,
@@ -189,51 +191,51 @@ function b({ widget: e }) {
189
191
  tone: "text-muted-foreground"
190
192
  }
191
193
  ];
192
- return /* @__PURE__ */ d("div", {
194
+ return /* @__PURE__ */ f("div", {
193
195
  className: "rounded-md border border-border px-3 py-2",
194
- children: [/* @__PURE__ */ u("p", {
196
+ children: [/* @__PURE__ */ d("p", {
195
197
  className: "flex flex-wrap gap-4 text-sm",
196
- children: n.map((e) => e.n !== void 0 && /* @__PURE__ */ u("span", {
198
+ children: n.map((e) => e.n !== void 0 && /* @__PURE__ */ d("span", {
197
199
  className: e.tone,
198
200
  children: t(`tests.${e.key}`, { count: e.n })
199
201
  }, e.key))
200
- }), (e.failures ?? []).length > 0 && /* @__PURE__ */ u("ul", {
202
+ }), (e.failures ?? []).length > 0 && /* @__PURE__ */ d("ul", {
201
203
  className: "mt-2 space-y-1 text-xs",
202
- children: (e.failures ?? []).map((e) => /* @__PURE__ */ d("li", { children: [/* @__PURE__ */ u("span", {
204
+ children: (e.failures ?? []).map((e) => /* @__PURE__ */ f("li", { children: [/* @__PURE__ */ d("span", {
203
205
  className: "font-mono text-danger",
204
206
  children: e.name
205
- }), e.output && /* @__PURE__ */ u("pre", {
207
+ }), e.output && /* @__PURE__ */ d("pre", {
206
208
  className: "mt-0.5 whitespace-pre-wrap text-muted-foreground",
207
209
  children: e.output
208
210
  })] }, e.name))
209
211
  })]
210
212
  });
211
213
  }
212
- function x({ checks: e }) {
213
- let t = l("widgets"), r = e.filter((e) => e.done).length;
214
- return /* @__PURE__ */ d("div", {
214
+ function S({ checks: e }) {
215
+ let t = u("widgets"), r = e.filter((e) => e.done).length;
216
+ return /* @__PURE__ */ f("div", {
215
217
  className: "rounded-md border border-border px-3 py-2",
216
- children: [/* @__PURE__ */ u("p", {
218
+ children: [/* @__PURE__ */ d("p", {
217
219
  className: "mb-1 text-xs text-muted-foreground",
218
220
  children: t("checked", {
219
221
  done: r,
220
222
  count: e.length
221
223
  })
222
- }), /* @__PURE__ */ u("ul", {
224
+ }), /* @__PURE__ */ d("ul", {
223
225
  className: "space-y-1 text-sm",
224
- children: e.map((e, r) => /* @__PURE__ */ d("li", {
226
+ children: e.map((e, r) => /* @__PURE__ */ f("li", {
225
227
  className: "flex items-start gap-2",
226
228
  children: [
227
- /* @__PURE__ */ u("span", {
228
- className: f("mt-0.5 flex size-4 shrink-0 items-center justify-center rounded border", e.done ? "border-success bg-success text-background" : "border-border"),
229
+ /* @__PURE__ */ d("span", {
230
+ className: p("mt-0.5 flex size-4 shrink-0 items-center justify-center rounded border", e.done ? "border-success bg-success text-background" : "border-border"),
229
231
  "aria-hidden": "true",
230
- children: e.done && /* @__PURE__ */ u(n, { className: "size-3" })
232
+ children: e.done && /* @__PURE__ */ d(n, { className: "size-3" })
231
233
  }),
232
- /* @__PURE__ */ u("span", {
233
- className: f(e.done && "text-muted-foreground line-through"),
234
+ /* @__PURE__ */ d("span", {
235
+ className: p(e.done && "text-muted-foreground line-through"),
234
236
  children: e.text
235
237
  }),
236
- /* @__PURE__ */ u("span", {
238
+ /* @__PURE__ */ d("span", {
237
239
  className: "sr-only",
238
240
  children: e.done ? t("done") : t("notDone")
239
241
  })
@@ -242,9 +244,9 @@ function x({ checks: e }) {
242
244
  })]
243
245
  });
244
246
  }
245
- function S({ value: e, max: t, title: n }) {
246
- let r = l("widgets"), i = c();
247
- return /* @__PURE__ */ u(a, {
247
+ function C({ value: e, max: t, title: n }) {
248
+ let r = u("widgets"), i = l();
249
+ return /* @__PURE__ */ d(a, {
248
250
  value: Math.min(Math.max(e, 0), t),
249
251
  max: t,
250
252
  size: "lg",
@@ -253,31 +255,31 @@ function S({ value: e, max: t, title: n }) {
253
255
  "aria-label": n || r("progress")
254
256
  });
255
257
  }
256
- function C({ workspace: n, links: r }) {
257
- let a = l("widgets"), o = "inline-flex items-center gap-1.5 rounded-md border border-border px-2 py-1 text-xs hover:bg-muted";
258
- return /* @__PURE__ */ u("ul", {
258
+ function w({ workspace: n, links: r }) {
259
+ let a = u("widgets"), o = "inline-flex items-center gap-1.5 rounded-md border border-border px-2 py-1 text-xs hover:bg-muted";
260
+ return /* @__PURE__ */ d("ul", {
259
261
  className: "flex flex-wrap gap-1.5",
260
- children: r.map((r) => /* @__PURE__ */ u("li", { children: r.kind === "issue" ? /* @__PURE__ */ d(e, {
262
+ children: r.map((r) => /* @__PURE__ */ d("li", { children: r.kind === "issue" ? /* @__PURE__ */ f(t, {
261
263
  to: "/$workspace/issues/$identifier",
262
264
  params: {
263
265
  workspace: n,
264
266
  identifier: r.ref
265
267
  },
266
268
  className: o,
267
- children: [/* @__PURE__ */ u("span", {
269
+ children: [/* @__PURE__ */ d("span", {
268
270
  className: "text-muted-foreground",
269
271
  children: r.ref
270
272
  }), r.label]
271
- }) : r.kind === "pullRequest" ? /* @__PURE__ */ d("a", {
272
- href: t(r.ref),
273
+ }) : r.kind === "pullRequest" ? /* @__PURE__ */ f("a", {
274
+ href: e(r.ref),
273
275
  target: "_blank",
274
276
  rel: "noopener noreferrer",
275
277
  className: o,
276
- children: [/* @__PURE__ */ u(i, { className: "size-3.5 text-muted-foreground" }), r.label || a("pullRequest")]
277
- }) : /* @__PURE__ */ u("span", {
278
+ children: [/* @__PURE__ */ d(i, { className: "size-3.5 text-muted-foreground" }), r.label || a("pullRequest")]
279
+ }) : /* @__PURE__ */ d("span", {
278
280
  className: o,
279
281
  children: r.label || a("run")
280
282
  }) }, `${r.kind}:${r.ref}`))
281
283
  });
282
284
  }
283
- export { p as Widgets };
285
+ export { m as Widgets };
@@ -1,5 +1,5 @@
1
- import { Link as e } from "../lib/router.js";
2
- import { teamsQuery as t } from "../api/queries.js";
1
+ import { teamsQuery as e } from "../api/queries.js";
2
+ import { Link as t } from "../lib/router.js";
3
3
  import { Tooltip as n } from "@parallelworks/ui";
4
4
  import { useParams as r } from "@tanstack/react-router";
5
5
  import { useTranslations as i } from "use-intl";
@@ -8,7 +8,7 @@ import { useQuery as o } from "@tanstack/react-query";
8
8
  // src/components/WorkCounts.tsx
9
9
  function s({ counts: s, teamId: c, className: l = "" }) {
10
10
  let u = i("workCounts"), { workspace: d = "" } = r({ strict: !1 }), { data: f = [] } = o({
11
- ...t(d),
11
+ ...e(d),
12
12
  enabled: !!d
13
13
  });
14
14
  if (!s) return null;
@@ -46,20 +46,20 @@ function s({ counts: s, teamId: c, className: l = "" }) {
46
46
  let g = "rounded border px-1.5 py-0.5 text-[11px] leading-none";
47
47
  return /* @__PURE__ */ a("span", {
48
48
  className: `flex shrink-0 items-center gap-1 ${l}`,
49
- children: h.map((t) => /* @__PURE__ */ a(n, {
50
- content: t.hint,
49
+ children: h.map((e) => /* @__PURE__ */ a(n, {
50
+ content: e.hint,
51
51
  describesAnchor: !0,
52
- children: "to" in t && t.to && d ? /* @__PURE__ */ a(e, {
53
- to: t.to,
52
+ children: "to" in e && e.to && d ? /* @__PURE__ */ a(t, {
53
+ to: e.to,
54
54
  params: { workspace: d },
55
55
  search: p ? { team: p } : {},
56
- className: `${g} ${t.tone} hover:border-primary hover:text-foreground`,
57
- children: t.label
56
+ className: `${g} ${e.tone} hover:border-primary hover:text-foreground`,
57
+ children: e.label
58
58
  }) : /* @__PURE__ */ a("span", {
59
- className: `${g} ${t.tone}`,
60
- children: t.label
59
+ className: `${g} ${e.tone}`,
60
+ children: e.label
61
61
  })
62
- }, t.key))
62
+ }, e.key))
63
63
  });
64
64
  }
65
65
  export { s as WorkCounts };
@@ -1,12 +1,12 @@
1
- import { useNavigate as e } from "../lib/router.js";
2
- import { useTime as t } from "../lib/time.js";
3
- import { cycleParam as n } from "../lib/cycleLinks.js";
4
- import { byStart as r } from "../lib/cycleOrder.js";
5
- import { cycleChoices as i } from "../lib/cycleSwitcher.js";
1
+ import { cycleParam as e } from "../lib/cycleLinks.js";
2
+ import { byStart as t } from "../lib/cycleOrder.js";
3
+ import { cycleChoices as n } from "../lib/cycleSwitcher.js";
4
+ import { useNavigate as r } from "../lib/router.js";
5
+ import { useTime as i } from "../lib/time.js";
6
6
  import { useTranslations as a } from "use-intl";
7
7
  // src/components/cycleCrumb.ts
8
8
  function o(o, s, c, l) {
9
- let u = a("planning"), d = t(), f = e(), p = (e) => e.name ? u("cycleNamed", {
9
+ let u = a("planning"), d = i(), f = r(), p = (e) => e.name ? u("cycleNamed", {
10
10
  number: e.number,
11
11
  name: e.name
12
12
  }) : u("cycle", { number: e.number });
@@ -15,8 +15,8 @@ function o(o, s, c, l) {
15
15
  switcher: {
16
16
  label: u("switchCycle"),
17
17
  placeholder: u("findCycle"),
18
- items: i([...c].sort(r), n, p, (e) => d.dayRange(e.startsOn, e.endsOn), (e) => u(`states.${e}`)),
19
- value: n(l),
18
+ items: n([...c].sort(t), e, p, (e) => d.dayRange(e.startsOn, e.endsOn), (e) => u(`states.${e}`)),
19
+ value: e(l),
20
20
  onValueChange: (e) => {
21
21
  f({
22
22
  to: "/$workspace/teams/$key/cycles/$number",