@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,14 +1,14 @@
1
1
  import { cycleReportQuery as e, statusHistoryQuery as t } from "../api/queries.js";
2
- import { StatusIcon as n } from "./icons.js";
3
- import { addDays as r, useTime as i } from "../lib/time.js";
2
+ import { addDays as n, useTime as r } from "../lib/time.js";
3
+ import { StatusIcon as i } from "./icons.js";
4
4
  import { ChartTooltipFrame as a, OTHER_SERIES_COLOR as o, SeriesSwatch as s, seriesSlotColor as c } from "@parallelworks/ui";
5
5
  import { useState as l } from "react";
6
6
  import { useFormatter as u, useTranslations as d } from "use-intl";
7
7
  import { jsx as f, jsxs as p } from "react/jsx-runtime";
8
8
  import { useQuery as m } from "@tanstack/react-query";
9
9
  // src/components/Reports.tsx
10
- function h({ workspace: e, identifier: r }) {
11
- let a = d("issue.properties"), o = i(), { data: s = [] } = m(t(e, r)), c = /* @__PURE__ */ new Map();
10
+ function h({ workspace: e, identifier: n }) {
11
+ let a = d("issue.properties"), o = r(), { data: s = [] } = m(t(e, n)), c = /* @__PURE__ */ new Map();
12
12
  for (let e of s) {
13
13
  let t = c.get(e.status.id);
14
14
  t ? t.seconds += e.seconds : c.set(e.status.id, {
@@ -22,7 +22,7 @@ function h({ workspace: e, identifier: r }) {
22
22
  children: [...c.values()].map(({ span: e, seconds: t }) => /* @__PURE__ */ p("li", {
23
23
  className: "flex h-7 items-center gap-2 px-2 text-sm",
24
24
  children: [
25
- /* @__PURE__ */ f(n, {
25
+ /* @__PURE__ */ f(i, {
26
26
  category: e.status.category,
27
27
  step: e.status.step
28
28
  }),
@@ -72,11 +72,11 @@ function b(e) {
72
72
  n * 2
73
73
  ];
74
74
  }
75
- function x({ workspace: t, teamKey: n, cycle: h }) {
76
- let x = d("planning"), S = u(), C = i(), { data: w = [] } = m(e(t, n, h.number)), [T, E] = l(null), D = w[0], O = w.at(-1);
75
+ function x({ workspace: t, teamKey: i, cycle: h }) {
76
+ let x = d("planning"), S = u(), C = r(), { data: w = [] } = m(e(t, i, h.number)), [T, E] = l(null), D = w[0], O = w.at(-1);
77
77
  if (!D || !O) return null;
78
78
  let k = [];
79
- for (let e = h.startsOn; e <= h.endsOn; e = r(e, 1)) k.push(e);
79
+ for (let e = h.startsOn; e <= h.endsOn; e = n(e, 1)) k.push(e);
80
80
  let A = k.length, j = b(Math.max(...w.map((e) => e.scope))), M = j.at(-1) ?? 1, N = (e) => v(e, A), P = (e) => _ - e / M * _, F = (e) => N(e) / g * 100, I = (e) => e.started + e.completed, L = (e) => y(w.map((t, n) => [N(n), P(e(t))])), R = {
81
81
  scope: o,
82
82
  started: c(2),
@@ -1,5 +1,5 @@
1
- import { usePathname as e } from "../lib/router.js";
2
- import { githubAccountQuery as t, gitlabQuery as n, meQuery as r } from "../api/queries.js";
1
+ import { githubAccountQuery as e, gitlabQuery as t, meQuery as n } from "../api/queries.js";
2
+ import { usePathname as r } from "../lib/router.js";
3
3
  import { AlertIcon as i, ChevronDownIcon as a, CloudIcon as o, CommentIcon as s, FolderIcon as c, HistoryIcon as l, InboxIcon as u, KeyIcon as d, LinkIcon as f, ListViewIcon as p, MigrationIcon as m, NotificationIcon as h, RepositoryIcon as g, SettingsIcon as _, ShieldIcon as v, TagIcon as y, UserIcon as b, UsersIcon as x, WebhookIcon as S, WorkerIcon as C } from "./icons.js";
4
4
  import { useParams as w } from "@tanstack/react-router";
5
5
  import { useTranslations as T } from "use-intl";
@@ -8,8 +8,8 @@ import { useQuery as k, useSuspenseQuery as A } from "@tanstack/react-query";
8
8
  import { AppFrameNavGroup as j, AppFrameNavItem as M } from "@parallelworks/ui/app-frame";
9
9
  // src/components/SettingsNav.tsx
10
10
  function N() {
11
- let { data: e } = A(r), a = T("settingsNav"), E = e?.mode === "platform", { data: D } = k(t), { workspace: O } = w({ strict: !1 }), { data: j } = k({
12
- ...n(O ?? ""),
11
+ let { data: r } = A(n), a = T("settingsNav"), E = r?.mode === "platform", { data: D } = k(e), { workspace: O } = w({ strict: !1 }), { data: j } = k({
12
+ ...t(O ?? ""),
13
13
  enabled: !!O
14
14
  });
15
15
  return [
@@ -149,29 +149,29 @@ function N() {
149
149
  }
150
150
  ];
151
151
  }
152
- function P({ workspace: t }) {
153
- let n = T("settingsNav"), r = N(), i = e();
152
+ function P({ workspace: e }) {
153
+ let t = T("settingsNav"), n = N(), i = r();
154
154
  return /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ D(M, {
155
- label: n("label"),
155
+ label: t("label"),
156
156
  icon: /* @__PURE__ */ D(a, { className: "size-4 rotate-90" }),
157
- href: `/${t}/issues`,
157
+ href: `/${e}/issues`,
158
158
  className: "font-semibold"
159
159
  }), /* @__PURE__ */ D("nav", {
160
- "aria-label": n("label"),
160
+ "aria-label": t("label"),
161
161
  className: "-mx-3 mt-2 min-h-0 flex-1 overflow-y-auto px-3",
162
- children: r.map((e) => /* @__PURE__ */ D(j, {
163
- label: e.label,
162
+ children: n.map((t) => /* @__PURE__ */ D(j, {
163
+ label: t.label,
164
164
  collapsible: !1,
165
- children: e.items.map(({ to: e, label: n, Icon: r }) => {
166
- let a = e.replace("$workspace", t);
165
+ children: t.items.map(({ to: t, label: n, Icon: r }) => {
166
+ let a = t.replace("$workspace", e);
167
167
  return /* @__PURE__ */ D(M, {
168
168
  label: n,
169
169
  icon: /* @__PURE__ */ D(r, { className: "size-4" }),
170
170
  href: a,
171
171
  selected: i === a
172
- }, e);
172
+ }, t);
173
173
  })
174
- }, e.label))
174
+ }, t.label))
175
175
  })] });
176
176
  }
177
177
  export { P as SettingsNav, N as useSettingsPages };
@@ -1,6 +1,6 @@
1
- import { appURL as e } from "../lib/base.js";
2
- import { api as t, unwrap as n } from "../api/client.js";
3
- import { shareLinksQuery as r } from "../api/queries.js";
1
+ import { api as e, unwrap as t } from "../api/client.js";
2
+ import { shareLinksQuery as n } from "../api/queries.js";
3
+ import { appURL as r } from "../lib/base.js";
4
4
  import { openShare as i, useShareTarget as a } from "../lib/share.js";
5
5
  import { useTime as o } from "../lib/time.js";
6
6
  import { Button as s, CopyButton as c, EmptyState as l, ErrorText as u, Input as d, Modal as f, ModalTitle as p } from "@parallelworks/ui";
@@ -19,20 +19,20 @@ function S({ workspace: e }) {
19
19
  }, JSON.stringify(t)) : null;
20
20
  }
21
21
  function C({ workspace: i, target: a, onClose: S }) {
22
- let C = g("share"), w = h(), T = o(), E = x(), D = "doc" in a ? { doc: a.doc } : { space: a.space }, O = b(r(i, D)), [k, A] = m(), j = () => E.invalidateQueries({ queryKey: r(i, D).queryKey }), M = y({
23
- mutationFn: async () => n(await t.POST("/api/v1/workspaces/{workspace}/share-links", {
22
+ let C = g("share"), w = h(), T = o(), E = x(), D = "doc" in a ? { doc: a.doc } : { space: a.space }, O = b(n(i, D)), [k, A] = m(), j = () => E.invalidateQueries({ queryKey: n(i, D).queryKey }), M = y({
23
+ mutationFn: async () => t(await e.POST("/api/v1/workspaces/{workspace}/share-links", {
24
24
  params: { path: { workspace: i } },
25
25
  body: {
26
26
  ...D,
27
27
  audience: "organization"
28
28
  }
29
29
  })),
30
- onSuccess: (t) => A(e(`/share/${t.secret}`)),
30
+ onSuccess: (e) => A(r(`/share/${e.secret}`)),
31
31
  onSettled: j
32
32
  }), N = y({
33
- mutationFn: async (e) => n(await t.DELETE("/api/v1/workspaces/{workspace}/share-links/{link}", { params: { path: {
33
+ mutationFn: async (n) => t(await e.DELETE("/api/v1/workspaces/{workspace}/share-links/{link}", { params: { path: {
34
34
  workspace: i,
35
- link: e
35
+ link: n
36
36
  } } })),
37
37
  onSettled: j
38
38
  });
@@ -1,11 +1,11 @@
1
1
  import { ApiError as e } from "../api/client.js";
2
- import { Link as t, useNavigate as n } from "../lib/router.js";
3
- import { sharedDocQuery as r, sharedQuery as i } from "../api/queries.js";
4
- import { docKey as a } from "../lib/docs.js";
2
+ import { sharedDocQuery as t, sharedQuery as n } from "../api/queries.js";
3
+ import { docKey as r } from "../lib/docs.js";
4
+ import { Link as i, useNavigate as a } from "../lib/router.js";
5
5
  import { DocIcon as o } from "./DocIcon.js";
6
- import { Editor as s } from "./Editor.js";
7
- import { Logo as c } from "./Logo.js";
8
- import { DocOutline as l } from "./DocOutline.js";
6
+ import { DocOutline as s } from "./DocOutline.js";
7
+ import { Editor as c } from "./Editor.js";
8
+ import { Logo as l } from "./Logo.js";
9
9
  import { Disclosure as u, buttonClasses as d, cx as f } from "@parallelworks/ui";
10
10
  import { useEffect as p, useMemo as m, useRef as h, useState as g } from "react";
11
11
  import { useTranslations as _ } from "use-intl";
@@ -13,8 +13,8 @@ import { jsx as v, jsxs as y } from "react/jsx-runtime";
13
13
  import { useQuery as b } from "@tanstack/react-query";
14
14
  // src/components/SharedViewer.tsx
15
15
  function x({ source: x, doc: S }) {
16
- let w = _("shared"), T = n(), E = b(i(x.secret)), D = E.data?.docs ?? [], O = S ?? E.data?.root ?? D[0]?.key, k = b({
17
- ...r(x.secret, O ?? ""),
16
+ let w = _("shared"), T = a(), E = b(n(x.secret)), D = E.data?.docs ?? [], O = S ?? E.data?.root ?? D[0]?.key, k = b({
17
+ ...t(x.secret, O ?? ""),
18
18
  enabled: !!O
19
19
  }), A = m(() => new Set(D.map((e) => e.key)), [D]), [j, M] = g(null), N = h(null);
20
20
  p(() => {
@@ -26,22 +26,22 @@ function x({ source: x, doc: S }) {
26
26
  search: { doc: e }
27
27
  });
28
28
  if (E.error) {
29
- let n = E.error instanceof e && E.error.status === 401;
29
+ let t = E.error instanceof e && E.error.status === 401;
30
30
  return /* @__PURE__ */ v("main", {
31
31
  className: "flex min-h-screen items-center justify-center px-4",
32
32
  children: /* @__PURE__ */ y("div", {
33
33
  className: "w-full max-w-sm",
34
34
  children: [
35
- /* @__PURE__ */ v(c, { className: "mb-10" }),
35
+ /* @__PURE__ */ v(l, { className: "mb-10" }),
36
36
  /* @__PURE__ */ v("h1", {
37
37
  className: "text-2xl font-semibold tracking-tight",
38
- children: w(n ? "signInTitle" : "goneTitle")
38
+ children: w(t ? "signInTitle" : "goneTitle")
39
39
  }),
40
40
  /* @__PURE__ */ v("p", {
41
41
  className: "mt-1 text-sm text-muted-foreground",
42
- children: w(n ? "signInDetail" : "goneDetail")
42
+ children: w(t ? "signInDetail" : "goneDetail")
43
43
  }),
44
- n && /* @__PURE__ */ v(t, {
44
+ t && /* @__PURE__ */ v(i, {
45
45
  to: "/login",
46
46
  search: { next: window.location.href },
47
47
  className: f(d({
@@ -60,7 +60,7 @@ function x({ source: x, doc: S }) {
60
60
  /* @__PURE__ */ y("header", {
61
61
  className: "flex h-12 shrink-0 items-center gap-3 border-b border-border px-4 md:px-5",
62
62
  children: [
63
- /* @__PURE__ */ v(c, { className: "h-5 max-sm:hidden" }),
63
+ /* @__PURE__ */ v(l, { className: "h-5 max-sm:hidden" }),
64
64
  /* @__PURE__ */ v("span", {
65
65
  className: "truncate text-sm font-semibold",
66
66
  children: E.data?.title
@@ -106,8 +106,8 @@ function x({ source: x, doc: S }) {
106
106
  className: "flex w-full gap-10 px-4 py-6 md:px-8",
107
107
  children: [/* @__PURE__ */ y("article", {
108
108
  onClickCapture: (e) => {
109
- let t = e.target.closest("a")?.getAttribute("href") ?? "", n = /\/docs\/([A-Za-z0-9-]+)/.exec(t)?.[1], r = n && a(n);
110
- r && A.has(r) && (e.preventDefault(), P(r));
109
+ let t = e.target.closest("a")?.getAttribute("href") ?? "", n = /\/docs\/([A-Za-z0-9-]+)/.exec(t)?.[1], i = n && r(n);
110
+ i && A.has(i) && (e.preventDefault(), P(i));
111
111
  },
112
112
  className: "mx-auto min-w-0 max-w-3xl flex-1 pb-24",
113
113
  children: [
@@ -120,14 +120,14 @@ function x({ source: x, doc: S }) {
120
120
  className: "text-2xl font-semibold tracking-tight",
121
121
  children: k.data?.title
122
122
  }),
123
- k.data && /* @__PURE__ */ v(s, {
123
+ k.data && /* @__PURE__ */ v(c, {
124
124
  value: k.data.body ?? "",
125
125
  editable: !1,
126
126
  onEditor: M,
127
127
  className: "mt-4"
128
128
  }, k.data.key)
129
129
  ]
130
- }), /* @__PURE__ */ v(l, {
130
+ }), /* @__PURE__ */ v(s, {
131
131
  editor: j,
132
132
  scroller: N
133
133
  })]
@@ -137,15 +137,15 @@ function x({ source: x, doc: S }) {
137
137
  ]
138
138
  });
139
139
  }
140
- function S({ source: e, doc: n, current: r, children: i }) {
141
- let a = r ? "page" : void 0;
142
- return /* @__PURE__ */ v(t, {
140
+ function S({ source: e, doc: t, current: n, children: r }) {
141
+ let a = n ? "page" : void 0;
142
+ return /* @__PURE__ */ v(i, {
143
143
  to: "/share/$secret",
144
144
  params: { secret: e.secret },
145
- search: { doc: n },
145
+ search: { doc: t },
146
146
  "aria-current": a,
147
147
  className: "flex items-center gap-2 rounded-md py-1 pr-2 text-sm text-muted-foreground hover:bg-muted hover:text-foreground aria-[current=page]:bg-muted aria-[current=page]:font-medium aria-[current=page]:text-foreground",
148
- children: i
148
+ children: r
149
149
  });
150
150
  }
151
151
  function C({ docs: e, parent: t, depth: n, current: r, source: i }) {
@@ -1,13 +1,13 @@
1
1
  import { api as e, unwrap as t } from "../api/client.js";
2
- import { useNavigate as n } from "../lib/router.js";
3
- import { docQuery as r } from "../api/queries.js";
2
+ import { docQuery as n } from "../api/queries.js";
3
+ import { isoDate as r } from "../lib/datePhrases.js";
4
4
  import { docRef as i, docURL as a } from "../lib/docs.js";
5
- import { openToggleAtCaret as o } from "./toggle.js";
6
- import { insertColumns as s } from "./columns.js";
7
- import { isoDate as c } from "../lib/datePhrases.js";
5
+ import { useNavigate as o } from "../lib/router.js";
6
+ import { useAttachmentsOn as s } from "./Attachments.js";
7
+ import { insertColumns as c } from "./columns.js";
8
8
  import { useEditorListbox as l } from "./editorListbox.js";
9
9
  import { insertLinkCard as u } from "./LinkCard.js";
10
- import { useAttachmentsOn as d } from "./Attachments.js";
10
+ import { openToggleAtCaret as d } from "./toggle.js";
11
11
  import { ListboxOption as f, ListboxPanel as p, useListboxNavigation as m } from "@parallelworks/ui";
12
12
  import { useParams as h } from "@tanstack/react-router";
13
13
  import { useEffect as g, useMemo as _, useRef as v, useState as y } from "react";
@@ -97,9 +97,9 @@ var w = {
97
97
  figma: (e) => e.insertContent({ type: "figmaEmbed" }),
98
98
  toggle: (e) => e.setDetails(),
99
99
  divider: (e) => e.setHorizontalRule(),
100
- columns2: (e) => s(e, 2),
101
- columns3: (e) => s(e, 3),
102
- columns4: (e) => s(e, 4),
100
+ columns2: (e) => c(e, 2),
101
+ columns3: (e) => c(e, 3),
102
+ columns4: (e) => c(e, 4),
103
103
  file: (e) => e,
104
104
  table: (e) => e.insertTable({
105
105
  rows: 3,
@@ -112,7 +112,7 @@ var w = {
112
112
  issueList: (e) => e.insertContent({ type: "issueList" }),
113
113
  date: (e) => e.insertContent([{
114
114
  type: "dateChip",
115
- attrs: { date: c(/* @__PURE__ */ new Date()) }
115
+ attrs: { date: r(/* @__PURE__ */ new Date()) }
116
116
  }, {
117
117
  type: "text",
118
118
  text: " "
@@ -138,17 +138,17 @@ function O(e) {
138
138
  n.length > 0 && e(n);
139
139
  }), t.click();
140
140
  }
141
- function k({ editor: s, onFiles: c }) {
142
- let k = b("slashMenu"), [A, j] = y(null), M = d(), N = !!c?.current && M, { workspace: P, doc: F } = h({ strict: !1 }), I = !!P && !!F, L = S(), R = n(), z = b("docs"), B = async (n) => {
143
- if (!s || !P || !F) return;
144
- let o = await L.fetchQuery(r(P, F)), c = t(await e.POST("/api/v1/workspaces/{workspace}/docs", {
141
+ function k({ editor: r, onFiles: c }) {
142
+ let k = b("slashMenu"), [A, j] = y(null), M = s(), N = !!c?.current && M, { workspace: P, doc: F } = h({ strict: !1 }), I = !!P && !!F, L = S(), R = o(), z = b("docs"), B = async (o) => {
143
+ if (!r || !P || !F) return;
144
+ let s = await L.fetchQuery(n(P, F)), c = t(await e.POST("/api/v1/workspaces/{workspace}/docs", {
145
145
  params: { path: { workspace: P } },
146
146
  body: {
147
147
  title: z("untitled"),
148
- parent: o.key
148
+ parent: s.key
149
149
  }
150
150
  }));
151
- s.chain().insertContentAt(n, [{
151
+ r.chain().insertContentAt(o, [{
152
152
  type: "text",
153
153
  text: c.title,
154
154
  marks: [{
@@ -181,22 +181,22 @@ function k({ editor: s, onFiles: c }) {
181
181
  I
182
182
  ]);
183
183
  g(() => {
184
- if (!s) return;
184
+ if (!r) return;
185
185
  let e = () => {
186
- j(s.isEditable && s.isFocused ? C(s) : null), W.current(0);
186
+ j(r.isEditable && r.isFocused ? C(r) : null), W.current(0);
187
187
  };
188
- return s.on("selectionUpdate", e), s.on("update", e), s.on("blur", e), () => {
189
- s.off("selectionUpdate", e), s.off("update", e), s.off("blur", e);
188
+ return r.on("selectionUpdate", e), r.on("update", e), r.on("blur", e), () => {
189
+ r.off("selectionUpdate", e), r.off("update", e), r.off("blur", e);
190
190
  };
191
- }, [s]);
191
+ }, [r]);
192
192
  let H = (e) => {
193
- if (!s || !A || !e) return;
194
- let t = s.chain().focus().deleteRange({
193
+ if (!r || !A || !e) return;
194
+ let t = r.chain().focus().deleteRange({
195
195
  from: A.from,
196
196
  to: A.to
197
197
  });
198
- if (E.includes(e) ? (t.run(), T[e](s.chain().focus()).run()) : T[e](t).run(), e === "toggle" && o(s), e === "linkCard" && u(s), j(null), e === "page" && B(s.state.selection.from), e === "file") {
199
- let e = s.state.selection.from;
198
+ if (E.includes(e) ? (t.run(), T[e](r.chain().focus()).run()) : T[e](t).run(), e === "toggle" && d(r), e === "linkCard" && u(r), j(null), e === "page" && B(r.state.selection.from), e === "file") {
199
+ let e = r.state.selection.from;
200
200
  O((t) => c?.current?.(t, e));
201
201
  }
202
202
  }, U = m({
@@ -205,7 +205,7 @@ function k({ editor: s, onFiles: c }) {
205
205
  onDismiss: () => j(null),
206
206
  open: !!A
207
207
  }), W = v(U.setActive);
208
- return W.current = U.setActive, l(s, U, !!A && V.length > 0), !A || V.length === 0 ? null : /* @__PURE__ */ x(p, {
208
+ return W.current = U.setActive, l(r, U, !!A && V.length > 0), !A || V.length === 0 ? null : /* @__PURE__ */ x(p, {
209
209
  at: {
210
210
  clientX: A.x,
211
211
  clientY: A.y
@@ -1,6 +1,6 @@
1
- import { Link as e } from "../lib/router.js";
2
- import { docQuery as t, docsQuery as n } from "../api/queries.js";
3
- import { docRef as r } from "../lib/docs.js";
1
+ import { docQuery as e, docsQuery as t } from "../api/queries.js";
2
+ import { docRef as n } from "../lib/docs.js";
3
+ import { Link as r } from "../lib/router.js";
4
4
  import { DocIcon as i } from "./DocIcon.js";
5
5
  import { useParams as a } from "@tanstack/react-router";
6
6
  import { useTranslations as o } from "use-intl";
@@ -35,10 +35,10 @@ var m = /^:::subpages[ \t]*\n[ \t]*:::[ \t]*(?:\n|$)/, h = u.create({
35
35
  });
36
36
  function g() {
37
37
  let u = o("docs"), { workspace: f = "", doc: p = "" } = a({ strict: !1 }), { data: m } = l({
38
- ...t(f, p),
38
+ ...e(f, p),
39
39
  enabled: !!f && !!p
40
40
  }), { data: h = [] } = l({
41
- ...n(f, { parent: m?.key ?? "" }),
41
+ ...t(f, { parent: m?.key ?? "" }),
42
42
  enabled: !!f && !!m
43
43
  });
44
44
  return /* @__PURE__ */ c(d, {
@@ -51,21 +51,21 @@ function g() {
51
51
  }), h.length === 0 ? /* @__PURE__ */ s("p", {
52
52
  className: "sub-pages-empty",
53
53
  children: u("noSubPages")
54
- }) : /* @__PURE__ */ s("ul", { children: h.map((t) => /* @__PURE__ */ s("li", { children: /* @__PURE__ */ c(e, {
54
+ }) : /* @__PURE__ */ s("ul", { children: h.map((e) => /* @__PURE__ */ s("li", { children: /* @__PURE__ */ c(r, {
55
55
  to: "/$workspace/docs/$doc",
56
56
  params: {
57
57
  workspace: f,
58
- doc: r(t)
58
+ doc: n(e)
59
59
  },
60
60
  className: "sub-pages-link",
61
61
  children: [/* @__PURE__ */ s(i, {
62
- icon: t.icon,
62
+ icon: e.icon,
63
63
  className: "size-4"
64
64
  }), /* @__PURE__ */ s("span", {
65
65
  className: "truncate",
66
- children: t.title
66
+ children: e.title
67
67
  })]
68
- }) }, t.key)) })]
68
+ }) }, e.key)) })]
69
69
  });
70
70
  }
71
71
  export { h as SubPages };
@@ -1,6 +1,6 @@
1
1
  import { api as e, unwrap as t } from "../api/client.js";
2
- import { useNavigate as n } from "../lib/router.js";
3
- import { teamsQuery as r } from "../api/queries.js";
2
+ import { teamsQuery as n } from "../api/queries.js";
3
+ import { useNavigate as r } from "../lib/router.js";
4
4
  import { useFormError as i } from "./settings.js";
5
5
  import { Button as a, ErrorText as o, Input as s, Modal as c, Select as l } from "@parallelworks/ui";
6
6
  import { useEffect as u, useState as d } from "react";
@@ -8,10 +8,10 @@ import { useTranslations as f } from "use-intl";
8
8
  import { Fragment as p, jsx as m, jsxs as h } from "react/jsx-runtime";
9
9
  import { useMutation as g, useQuery as _, useQueryClient as v } from "@tanstack/react-query";
10
10
  // src/components/TeamForm.tsx
11
- function y({ workspace: n, onCreated: c, onPendingChange: y, autoFocus: b }) {
12
- let x = v(), [S, C] = d(""), [w, T] = d(""), [E, D] = d(""), { data: O = [] } = _(r(n)), k = f("settings"), A = f("teamParent"), j = i(), M = S.replace(/[^A-Za-z0-9]/g, "").toUpperCase().slice(0, 3), N = g({
11
+ function y({ workspace: r, onCreated: c, onPendingChange: y, autoFocus: b }) {
12
+ let x = v(), [S, C] = d(""), [w, T] = d(""), [E, D] = d(""), { data: O = [] } = _(n(r)), k = f("settings"), A = f("teamParent"), j = i(), M = S.replace(/[^A-Za-z0-9]/g, "").toUpperCase().slice(0, 3), N = g({
13
13
  mutationFn: async () => t(await e.POST("/api/v1/workspaces/{workspace}/teams", {
14
- params: { path: { workspace: n } },
14
+ params: { path: { workspace: r } },
15
15
  body: {
16
16
  name: S,
17
17
  key: w || M,
@@ -20,7 +20,7 @@ function y({ workspace: n, onCreated: c, onPendingChange: y, autoFocus: b }) {
20
20
  })),
21
21
  onMutate: j.clear,
22
22
  onSuccess: async (e) => {
23
- C(""), T(""), await x.invalidateQueries({ queryKey: r(n).queryKey }), c?.(e);
23
+ C(""), T(""), await x.invalidateQueries({ queryKey: n(r).queryKey }), c?.(e);
24
24
  },
25
25
  onError: j.set
26
26
  });
@@ -74,14 +74,14 @@ function y({ workspace: n, onCreated: c, onPendingChange: y, autoFocus: b }) {
74
74
  })] });
75
75
  }
76
76
  function b({ workspace: e, onClose: t }) {
77
- let r = f("teamForm"), i = n(), [a, o] = d(!1);
77
+ let n = f("teamForm"), i = r(), [a, o] = d(!1);
78
78
  return /* @__PURE__ */ m(c, {
79
79
  open: !0,
80
80
  onClose: t,
81
81
  dismissible: !a,
82
82
  size: "lg",
83
- title: r("title"),
84
- description: r("description"),
83
+ title: n("title"),
84
+ description: n("description"),
85
85
  children: /* @__PURE__ */ m(y, {
86
86
  workspace: e,
87
87
  autoFocus: !0,
@@ -1,12 +1,12 @@
1
1
  import { api as e, unwrap as t } from "../api/client.js";
2
- import { Link as n } from "../lib/router.js";
3
- import { availableRepositoriesQuery as r, codeHostQuery as i, githubSettingsQuery as a, repositoriesQuery as o, teamsQuery as s } from "../api/queries.js";
4
- import { copyItem as c } from "../lib/menus.js";
5
- import { externalUrl as l } from "../lib/externalUrl.js";
6
- import { AddIcon as ee, CodeHostIcon as te, RepositoryIcon as u } from "./icons.js";
7
- import { useConfirm as d } from "../lib/confirm.js";
8
- import { useFormError as f } from "./settings.js";
9
- import { RepositoryIssueSync as p } from "./GitHub.js";
2
+ import { availableRepositoriesQuery as n, codeHostQuery as r, githubSettingsQuery as i, repositoriesQuery as a, teamsQuery as o } from "../api/queries.js";
3
+ import { useConfirm as s } from "../lib/confirm.js";
4
+ import { externalUrl as c } from "../lib/externalUrl.js";
5
+ import { copyItem as l } from "../lib/menus.js";
6
+ import { Link as ee } from "../lib/router.js";
7
+ import { RepositoryIssueSync as te } from "./GitHub.js";
8
+ import { AddIcon as u, CodeHostIcon as d, RepositoryIcon as f } from "./icons.js";
9
+ import { useFormError as p } from "./settings.js";
10
10
  import { Button as m, Card as h, Checkbox as g, Combobox as ne, ErrorText as _, InfoTip as v, Section as y, Tooltip as b, menuDivider as x, useOpenMenu as re } from "@parallelworks/ui";
11
11
  import { useState as ie } from "react";
12
12
  import { useTranslations as S } from "use-intl";
@@ -15,13 +15,13 @@ import { useMutation as T, useQuery as E, useQueryClient as D, useSuspenseQuery
15
15
  // src/components/TeamRepositories.tsx
16
16
  var k = "cursor-help underline decoration-dotted underline-offset-2";
17
17
  function A({ workspace: A, team: j, isAdmin: M }) {
18
- let N = S("code"), P = S("common"), { data: F } = O(i(A)), { data: I } = O(o(A, j.key)), { data: L } = E({
19
- ...a(A),
18
+ let N = S("code"), P = S("common"), { data: F } = O(r(A)), { data: I } = O(a(A, j.key)), { data: L } = E({
19
+ ...i(A),
20
20
  enabled: M
21
21
  }), R = S("github"), [z, B] = ie(!1), V = F.connections.some((e) => !e.removed), H = E({
22
- ...r(A, j.key),
22
+ ...n(A, j.key),
23
23
  enabled: z && M && V
24
- }), U = D(), W = re(), G = f(), { confirm: K, dialog: q } = d(), J = () => U.invalidateQueries({ queryKey: o(A, j.key).queryKey }), Y = (e) => {
24
+ }), U = D(), W = re(), G = p(), { confirm: K, dialog: q } = s(), J = () => U.invalidateQueries({ queryKey: a(A, j.key).queryKey }), Y = (e) => {
25
25
  let [t = "", n = ""] = e.split("/");
26
26
  return { path: {
27
27
  workspace: A,
@@ -51,7 +51,7 @@ function A({ workspace: A, team: j, isAdmin: M }) {
51
51
  })),
52
52
  onMutate: G.clear,
53
53
  onError: G.set,
54
- onSettled: () => U.invalidateQueries({ queryKey: s(A).queryKey })
54
+ onSettled: () => U.invalidateQueries({ queryKey: o(A).queryKey })
55
55
  }), Q = T({
56
56
  mutationFn: async (n) => t(await e.PATCH("/api/v1/workspaces/{workspace}/teams/{key}", {
57
57
  params: { path: {
@@ -62,7 +62,7 @@ function A({ workspace: A, team: j, isAdmin: M }) {
62
62
  })),
63
63
  onMutate: G.clear,
64
64
  onError: G.set,
65
- onSettled: () => U.invalidateQueries({ queryKey: s(A).queryKey })
65
+ onSettled: () => U.invalidateQueries({ queryKey: o(A).queryKey })
66
66
  }), $ = (e) => K({
67
67
  title: N("unlinkConfirm", { repository: e }),
68
68
  description: N("unlinkDetail"),
@@ -94,7 +94,7 @@ function A({ workspace: A, team: j, isAdmin: M }) {
94
94
  interactive: !1,
95
95
  render: /* @__PURE__ */ C("ul", {}),
96
96
  children: [I.map((e) => {
97
- let t = `${e.owner}/${e.name}`, n = l(e.url), r = L?.enabled && L.repositories.find((e) => e.team === j.key && e.fullName.toLowerCase() === t.toLowerCase());
97
+ let t = `${e.owner}/${e.name}`, n = c(e.url), r = L?.enabled && L.repositories.find((e) => e.team === j.key && e.fullName.toLowerCase() === t.toLowerCase());
98
98
  return /* @__PURE__ */ w("li", {
99
99
  onContextMenu: (r) => W(r, [
100
100
  n ? {
@@ -106,7 +106,7 @@ function A({ workspace: A, team: j, isAdmin: M }) {
106
106
  disabled: !0,
107
107
  onClick: () => {}
108
108
  },
109
- c(P("copyName"), t),
109
+ l(P("copyName"), t),
110
110
  ...M ? [
111
111
  x,
112
112
  {
@@ -128,7 +128,7 @@ function A({ workspace: A, team: j, isAdmin: M }) {
128
128
  children: [/* @__PURE__ */ w("div", {
129
129
  className: "flex items-center gap-3",
130
130
  children: [
131
- /* @__PURE__ */ C(te, {
131
+ /* @__PURE__ */ C(d, {
132
132
  provider: e.provider,
133
133
  className: "size-4 text-muted-foreground"
134
134
  }),
@@ -169,7 +169,7 @@ function A({ workspace: A, team: j, isAdmin: M }) {
169
169
  ]
170
170
  }), r && /* @__PURE__ */ C("div", {
171
171
  className: "mt-2 pl-7",
172
- children: /* @__PURE__ */ C(p, {
172
+ children: /* @__PURE__ */ C(te, {
173
173
  workspace: A,
174
174
  repository: r,
175
175
  teamName: j.name,
@@ -191,7 +191,7 @@ function A({ workspace: A, team: j, isAdmin: M }) {
191
191
  }),
192
192
  M && !V && /* @__PURE__ */ C("p", {
193
193
  className: "mt-3 text-sm text-muted-foreground",
194
- children: N.rich("connectFirst", { settings: (e) => /* @__PURE__ */ C(n, {
194
+ children: N.rich("connectFirst", { settings: (e) => /* @__PURE__ */ C(ee, {
195
195
  to: "/$workspace/settings/github",
196
196
  params: { workspace: A },
197
197
  className: "underline",
@@ -207,7 +207,7 @@ function A({ workspace: A, team: j, isAdmin: M }) {
207
207
  value: `${e.owner}/${e.name}`,
208
208
  label: `${e.owner}/${e.name}`,
209
209
  ...e.private && { hint: N("private") },
210
- icon: /* @__PURE__ */ C(u, { className: "size-3.5 text-muted-foreground" })
210
+ icon: /* @__PURE__ */ C(f, { className: "size-3.5 text-muted-foreground" })
211
211
  })),
212
212
  value: null,
213
213
  onValueChange: (e) => e !== null && X.mutate({
@@ -220,7 +220,7 @@ function A({ workspace: A, team: j, isAdmin: M }) {
220
220
  trigger: /* @__PURE__ */ w(m, {
221
221
  type: "button",
222
222
  children: [
223
- /* @__PURE__ */ C(ee, { className: "size-3.5" }),
223
+ /* @__PURE__ */ C(u, { className: "size-3.5" }),
224
224
  " ",
225
225
  N("linkRepository")
226
226
  ]
@@ -1,7 +1,7 @@
1
1
  import { api as e, unwrap as t } from "../api/client.js";
2
2
  import { statusesQuery as n } from "../api/queries.js";
3
- import { ChevronDownIcon as r, StatusIcon as i } from "./icons.js";
4
- import { useConfirm as a } from "../lib/confirm.js";
3
+ import { useConfirm as r } from "../lib/confirm.js";
4
+ import { ChevronDownIcon as i, StatusIcon as a } from "./icons.js";
5
5
  import { useFormError as o } from "./settings.js";
6
6
  import { Button as s, Card as c, ErrorText as l, IconButton as u, Input as d, Section as f, Select as p } from "@parallelworks/ui";
7
7
  import { useState as m } from "react";
@@ -58,7 +58,7 @@ function C({ workspace: C, teamKey: w, isAdmin: T }) {
58
58
  mutationFn: async (n) => t(await e.DELETE("/api/v1/workspaces/{workspace}/teams/{key}/statuses/{statusId}", { params: B(n) })),
59
59
  onMutate: j.clear,
60
60
  onSettled: V
61
- }), { confirm: G, dialog: K } = a(), q = (e) => {
61
+ }), { confirm: G, dialog: K } = r(), q = (e) => {
62
62
  let t = E.filter((t) => t.id !== e.id);
63
63
  return t.find((t) => t.category === e.category) ?? t.find((t) => S(t.category) === S(e.category));
64
64
  }, J = (e) => G({
@@ -90,7 +90,7 @@ function C({ workspace: C, teamKey: w, isAdmin: T }) {
90
90
  children: t.map((e, n) => /* @__PURE__ */ _("li", {
91
91
  className: "flex items-center gap-3 px-3 py-2 text-sm",
92
92
  children: [
93
- /* @__PURE__ */ g(i, {
93
+ /* @__PURE__ */ g(a, {
94
94
  category: e.category,
95
95
  step: e.step
96
96
  }),
@@ -135,7 +135,7 @@ function C({ workspace: C, teamKey: w, isAdmin: T }) {
135
135
  /* @__PURE__ */ g(u, {
136
136
  variant: "ghost",
137
137
  size: "sm",
138
- icon: /* @__PURE__ */ g(r, { className: "rotate-180" }),
138
+ icon: /* @__PURE__ */ g(i, { className: "rotate-180" }),
139
139
  label: D("moveUp", { name: e.name }),
140
140
  disabled: n === 0 || U.isPending,
141
141
  onClick: () => U.mutate({
@@ -146,7 +146,7 @@ function C({ workspace: C, teamKey: w, isAdmin: T }) {
146
146
  /* @__PURE__ */ g(u, {
147
147
  variant: "ghost",
148
148
  size: "sm",
149
- icon: /* @__PURE__ */ g(r, {}),
149
+ icon: /* @__PURE__ */ g(i, {}),
150
150
  label: D("moveDown", { name: e.name }),
151
151
  disabled: n === t.length - 1 || U.isPending,
152
152
  onClick: () => U.mutate({