@parallelworks/tandem-web 0.171.0 → 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 (170) hide show
  1. package/_virtual/_virtual_i18n/en/common.js +1 -0
  2. package/_virtual/_virtual_i18n/es/common.js +1 -0
  3. package/_virtual/_virtual_i18n/ja/common.js +1 -0
  4. package/_virtual/_virtual_i18n/ko/common.js +1 -0
  5. package/_virtual/_virtual_i18n/zh/common.js +1 -0
  6. package/components/AccessGrants.js +6 -6
  7. package/components/ActivityTimeline.js +57 -57
  8. package/components/ActorAvatar.js +4 -4
  9. package/components/AgentWork.js +494 -494
  10. package/components/AppLauncher.js +7 -7
  11. package/components/AreaLink.js +13 -13
  12. package/components/AreaTiles.js +13 -13
  13. package/components/AreaWork.js +22 -22
  14. package/components/Attachments.js +29 -29
  15. package/components/BlockHandle.js +3 -3
  16. package/components/BugRotation.js +8 -8
  17. package/components/CodeHostSettings.js +38 -38
  18. package/components/CollabEditor.js +13 -13
  19. package/components/CommandPalette.js +206 -206
  20. package/components/CustomFields.js +95 -95
  21. package/components/CustomerRequests.js +11 -11
  22. package/components/DashboardPanel.js +23 -23
  23. package/components/DateChip.js +21 -21
  24. package/components/DocHistory.js +14 -14
  25. package/components/DocIcon.js +4 -4
  26. package/components/DocIconPicker.js +4 -4
  27. package/components/DocLinkPicker.js +22 -22
  28. package/components/DocLook.js +16 -16
  29. package/components/DocProperties.js +81 -81
  30. package/components/DocTable.js +53 -53
  31. package/components/DocsTree.js +179 -179
  32. package/components/Editor.js +69 -69
  33. package/components/FavoritesNav.js +78 -78
  34. package/components/GitHub.js +87 -87
  35. package/components/Graph.js +14 -14
  36. package/components/HostActions.js +21 -21
  37. package/components/HostPanel.js +6 -6
  38. package/components/HoverCards.js +74 -74
  39. package/components/IssueBoard.js +13 -10
  40. package/components/IssueBreakdown.js +31 -31
  41. package/components/IssueCode.js +19 -19
  42. package/components/IssueEvent.js +12 -12
  43. package/components/IssueFilters.js +103 -99
  44. package/components/IssueGroup.js +16 -16
  45. package/components/IssueImport.js +13 -13
  46. package/components/IssueInsights.js +20 -20
  47. package/components/IssueListBlock.js +81 -81
  48. package/components/IssueRelations.js +34 -34
  49. package/components/IssueRow.js +31 -31
  50. package/components/IssueSentry.js +4 -4
  51. package/components/IssueTemplates.js +23 -23
  52. package/components/IssueTypes.js +40 -40
  53. package/components/MarkdownTransfer.js +10 -10
  54. package/components/MentionPicker.js +19 -19
  55. package/components/NewIssueDialog.js +53 -53
  56. package/components/NewProjectDialog.js +82 -82
  57. package/components/PersonActivity.js +13 -13
  58. package/components/PersonHoverCard.js +44 -44
  59. package/components/Planning.js +16 -16
  60. package/components/Reports.js +8 -8
  61. package/components/SettingsNav.js +15 -15
  62. package/components/ShareDialog.js +8 -8
  63. package/components/SharedViewer.js +23 -23
  64. package/components/SlashMenu.js +26 -26
  65. package/components/SubPages.js +10 -10
  66. package/components/TeamForm.js +9 -9
  67. package/components/TeamRepositories.js +21 -21
  68. package/components/TeamWorkflow.js +6 -6
  69. package/components/UnlinkedMentions.js +29 -29
  70. package/components/Updates.js +8 -8
  71. package/components/Widgets.js +4 -4
  72. package/components/WorkCounts.js +12 -12
  73. package/components/cycleCrumb.js +8 -8
  74. package/components/editorPlugins.js +101 -101
  75. package/components/settings.js +6 -6
  76. package/components/video.js +7 -7
  77. package/hostedApp.js +24 -24
  78. package/index.js +18 -18
  79. package/lib/assigneeOrder.js +6 -0
  80. package/lib/assignees.js +24 -20
  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/views.js +31 -31
  92. package/package.json +24 -24
  93. package/pages/area.js +64 -64
  94. package/pages/areas.js +199 -199
  95. package/pages/decisions.js +51 -51
  96. package/pages/issues.js +120 -120
  97. package/pages/projects.js +238 -238
  98. package/pages/triage.js +109 -109
  99. package/routes/_workspace/agents/_slug2.js +127 -127
  100. package/routes/_workspace/agents/index2.js +22 -22
  101. package/routes/_workspace/dashboards/_dashboardId2.js +84 -84
  102. package/routes/_workspace/dashboards/index2.js +34 -34
  103. package/routes/_workspace/docs/_doc2.js +267 -267
  104. package/routes/_workspace/docs/space2._space.js +31 -31
  105. package/routes/_workspace/docs2.js +4 -4
  106. package/routes/_workspace/graph2.js +11 -11
  107. package/routes/_workspace/graph3.js +11 -11
  108. package/routes/_workspace/issues/_identifier2.js +477 -477
  109. package/routes/_workspace/issues/index.js +13 -13
  110. package/routes/_workspace/knowledge/_term2.js +175 -175
  111. package/routes/_workspace/knowledge/_term3.js +4 -4
  112. package/routes/_workspace/knowledge/index.js +12 -12
  113. package/routes/_workspace/knowledge/index2.js +117 -117
  114. package/routes/_workspace/measures2.js +8 -8
  115. package/routes/_workspace/measures3.js +29 -29
  116. package/routes/_workspace/notifications2.js +263 -263
  117. package/routes/_workspace/people/_username.js +10 -10
  118. package/routes/_workspace/people/_username2.js +41 -41
  119. package/routes/_workspace/projects/_projectId3.js +303 -303
  120. package/routes/_workspace/projects/_projectId4.js +4 -4
  121. package/routes/_workspace/projects/_projectId_3.milestones._milestoneId.js +28 -28
  122. package/routes/_workspace/projects/_projectId_4.milestones._milestoneId.js +4 -4
  123. package/routes/_workspace/projects/index.js +8 -8
  124. package/routes/_workspace/settings/account2.js +8 -8
  125. package/routes/_workspace/settings/audit-log2.js +8 -8
  126. package/routes/_workspace/settings/audit-log3.js +155 -155
  127. package/routes/_workspace/settings/connections2.js +4 -4
  128. package/routes/_workspace/settings/fields2.js +5 -5
  129. package/routes/_workspace/settings/github2.js +11 -11
  130. package/routes/_workspace/settings/gitlab2.js +5 -5
  131. package/routes/_workspace/settings/groups2.js +52 -52
  132. package/routes/_workspace/settings/import2.js +39 -39
  133. package/routes/_workspace/settings/index2.js +5 -5
  134. package/routes/_workspace/settings/intercom2.js +11 -11
  135. package/routes/_workspace/settings/labels2.js +33 -33
  136. package/routes/_workspace/settings/members2.js +81 -81
  137. package/routes/_workspace/settings/notifications2.js +46 -46
  138. package/routes/_workspace/settings/parallelworks2.js +20 -20
  139. package/routes/_workspace/settings/roles2.js +41 -41
  140. package/routes/_workspace/settings/runners2.js +15 -15
  141. package/routes/_workspace/settings/sentry2.js +15 -15
  142. package/routes/_workspace/settings/sessions2.js +9 -9
  143. package/routes/_workspace/settings/sessions3.js +4 -4
  144. package/routes/_workspace/settings/slack2.js +12 -12
  145. package/routes/_workspace/settings/sso2.js +37 -37
  146. package/routes/_workspace/settings/sso3.js +7 -7
  147. package/routes/_workspace/settings/teams2.js +29 -29
  148. package/routes/_workspace/settings/tokens2.js +32 -32
  149. package/routes/_workspace/settings/tokens3.js +4 -4
  150. package/routes/_workspace/settings/webhooks2.js +41 -41
  151. package/routes/_workspace/settings/zendesk2.js +11 -11
  152. package/routes/_workspace/teams/_key/cycles/_number2.js +33 -33
  153. package/routes/_workspace/teams/_key/cycles/_number3.js +7 -7
  154. package/routes/_workspace/teams/_key/cycles/index2.js +37 -37
  155. package/routes/_workspace/teams/_key/issues.js +10 -10
  156. package/routes/_workspace/teams/_key/projects.js +6 -6
  157. package/routes/_workspace/teams/_key/settings2.js +396 -396
  158. package/routes/_workspace2.js +308 -308
  159. package/routes/_workspace3.js +8 -8
  160. package/routes/device2.js +4 -4
  161. package/routes/device3.js +4 -4
  162. package/routes/docs/_tag/_endpoint2.js +3 -3
  163. package/routes/docs/_tag/index2.js +3 -3
  164. package/routes/docs/route2.js +7 -7
  165. package/routes/index2.js +5 -5
  166. package/routes/login2.js +10 -10
  167. package/routes/new2.js +12 -12
  168. package/routes/new3.js +5 -5
  169. package/routes/request2._token.js +6 -6
  170. package/routes/share2._secret.js +4 -4
@@ -1,12 +1,12 @@
1
1
  import { api as e, unwrap as t } from "../api/client.js";
2
2
  import { issueTemplatesQuery as n, labelsQuery as r, teamsQuery as i } from "../api/queries.js";
3
- import { AddIcon as a, PriorityIcon as o, usePriorityNames as s } from "./icons.js";
4
- import { PropertyField as c } from "./DocProperties.js";
5
- import { customFieldsQuery as l, fieldsFor as u } from "../lib/customFields.js";
6
- import { useConfirm as d } from "../lib/confirm.js";
7
- import { issueTypesQuery as f, typesFor as p } from "../lib/issueTypes.js";
8
- import { TypeIcon as m } from "./IssueTypes.js";
9
- import { Editor as h } from "./Editor.js";
3
+ import { useConfirm as a } from "../lib/confirm.js";
4
+ import { customFieldsQuery as o, fieldsFor as s } from "../lib/customFields.js";
5
+ import { issueTypesQuery as c, typesFor as l } from "../lib/issueTypes.js";
6
+ import { PropertyField as u } from "./DocProperties.js";
7
+ import { Editor as d } from "./Editor.js";
8
+ import { TypeIcon as f } from "./IssueTypes.js";
9
+ import { AddIcon as p, PriorityIcon as m, usePriorityNames as h } from "./icons.js";
10
10
  import { Button as g, Combobox as _, DatePicker as v, Input as y, Modal as ee, Select as b, SettingsCard as x, menuDivider as S } from "@parallelworks/ui";
11
11
  import { useId as C, useState as w } from "react";
12
12
  import { useErrorMessage as te } from "@parallelworks/problem/react";
@@ -16,7 +16,7 @@ import { useMutation as k, useQuery as A, useQueryClient as j } from "@tanstack/
16
16
  import { MoreButton as M } from "@parallelworks/ui/list";
17
17
  // src/components/IssueTemplates.tsx
18
18
  function N({ workspace: r, teamKey: i, isAdmin: o }) {
19
- let s = E("issueTemplates"), c = T(), l = E("common"), u = j(), { data: f = [] } = A(n(r, i)), [p, m] = w(null), { confirm: h, dialog: _ } = d(), v = k({
19
+ let s = E("issueTemplates"), c = T(), l = E("common"), u = j(), { data: d = [] } = A(n(r, i)), [f, m] = w(null), { confirm: h, dialog: _ } = a(), v = k({
20
20
  mutationFn: async (n) => t(await e.DELETE("/api/v1/workspaces/{workspace}/teams/{key}/issue-templates/{templateId}", { params: { path: {
21
21
  workspace: r,
22
22
  key: i,
@@ -30,15 +30,15 @@ function N({ workspace: r, teamKey: i, isAdmin: o }) {
30
30
  action: o && /* @__PURE__ */ D(g, {
31
31
  variant: "outline",
32
32
  size: "sm",
33
- icon: /* @__PURE__ */ D(a, { className: "size-3.5" }),
33
+ icon: /* @__PURE__ */ D(p, { className: "size-3.5" }),
34
34
  onClick: () => m("new"),
35
35
  children: s("new")
36
36
  }),
37
37
  children: [
38
- f.length === 0 ? /* @__PURE__ */ D("p", {
38
+ d.length === 0 ? /* @__PURE__ */ D("p", {
39
39
  className: "px-4 py-3 text-sm text-muted-foreground",
40
40
  children: s("none")
41
- }) : /* @__PURE__ */ D("ul", { children: f.map((e) => /* @__PURE__ */ O("li", {
41
+ }) : /* @__PURE__ */ D("ul", { children: d.map((e) => /* @__PURE__ */ O("li", {
42
42
  className: "flex items-center gap-3 border-b border-border/60 px-4 py-2.5 last:border-b-0",
43
43
  children: [/* @__PURE__ */ O("span", {
44
44
  className: "min-w-0 flex-1",
@@ -80,18 +80,18 @@ function N({ workspace: r, teamKey: i, isAdmin: o }) {
80
80
  ]
81
81
  })]
82
82
  }, e.id)) }),
83
- p && /* @__PURE__ */ D(P, {
83
+ f && /* @__PURE__ */ D(P, {
84
84
  workspace: r,
85
85
  teamKey: i,
86
- template: p === "new" ? void 0 : p,
86
+ template: f === "new" ? void 0 : f,
87
87
  onClose: () => m(null)
88
88
  }),
89
89
  _
90
90
  ]
91
91
  });
92
92
  }
93
- function P({ workspace: a, teamKey: d, template: x, onClose: S }) {
94
- let M = E("issueTemplates"), N = T(), P = E("common"), R = te(), z = s(), B = j(), { data: V = [] } = A(r(a)), [H, U] = w({
93
+ function P({ workspace: a, teamKey: p, template: x, onClose: S }) {
94
+ let M = E("issueTemplates"), N = T(), P = E("common"), R = te(), z = h(), B = j(), { data: V = [] } = A(r(a)), [H, U] = w({
95
95
  name: x?.name ?? "",
96
96
  title: x?.title ?? "",
97
97
  body: x?.body ?? "",
@@ -111,21 +111,21 @@ function P({ workspace: a, teamKey: d, template: x, onClose: S }) {
111
111
  mutationFn: async () => t(x ? await e.PUT("/api/v1/workspaces/{workspace}/teams/{key}/issue-templates/{templateId}", {
112
112
  params: { path: {
113
113
  workspace: a,
114
- key: d,
114
+ key: p,
115
115
  templateId: x.id
116
116
  } },
117
117
  body: H
118
118
  }) : await e.POST("/api/v1/workspaces/{workspace}/teams/{key}/issue-templates", {
119
119
  params: { path: {
120
120
  workspace: a,
121
- key: d
121
+ key: p
122
122
  } },
123
123
  body: H
124
124
  })),
125
125
  onSuccess: () => {
126
- B.invalidateQueries({ queryKey: n(a, d).queryKey }), S();
126
+ B.invalidateQueries({ queryKey: n(a, p).queryKey }), S();
127
127
  }
128
- }), Y = V.filter((e) => H.labelIds?.includes(e.id)), { data: X = [] } = A(i(a)), { data: ie } = A(l(a)), Z = u(ie, "issue", X.find((e) => e.key === d)?.id), ae = E("customFields"), Q = E("issueTypes"), { data: oe } = A(f(a)), $ = p(oe, X.find((e) => e.key === d)?.id);
128
+ }), Y = V.filter((e) => H.labelIds?.includes(e.id)), { data: X = [] } = A(i(a)), { data: ie } = A(o(a)), Z = s(ie, "issue", X.find((e) => e.key === p)?.id), ae = E("customFields"), Q = E("issueTypes"), { data: oe } = A(c(a)), $ = l(oe, X.find((e) => e.key === p)?.id);
129
129
  return /* @__PURE__ */ D(ee, {
130
130
  open: !0,
131
131
  onClose: S,
@@ -179,7 +179,7 @@ function P({ workspace: a, teamKey: d, template: x, onClose: S }) {
179
179
  className: "text-xs font-medium text-muted-foreground",
180
180
  children: [M("body"), /* @__PURE__ */ D("div", {
181
181
  className: "mt-1 min-h-32 rounded-md border border-border px-3 py-2 text-sm font-normal text-foreground",
182
- children: /* @__PURE__ */ D(h, {
182
+ children: /* @__PURE__ */ D(d, {
183
183
  value: H.body ?? "",
184
184
  onChange: (e) => q({ body: e }),
185
185
  label: M("body"),
@@ -198,7 +198,7 @@ function P({ workspace: a, teamKey: d, template: x, onClose: S }) {
198
198
  items: z.map((e, t) => ({
199
199
  value: String(t),
200
200
  label: e,
201
- icon: /* @__PURE__ */ D(o, { priority: t })
201
+ icon: /* @__PURE__ */ D(m, { priority: t })
202
202
  })),
203
203
  onValueChange: (e) => e !== null && q({ priority: Number(e) }),
204
204
  "aria-label": M("priority")
@@ -244,7 +244,7 @@ function P({ workspace: a, teamKey: d, template: x, onClose: S }) {
244
244
  }, ...$.map((e) => ({
245
245
  value: e.id,
246
246
  label: e.name,
247
- icon: /* @__PURE__ */ D(m, {
247
+ icon: /* @__PURE__ */ D(f, {
248
248
  type: e,
249
249
  className: "size-3.5"
250
250
  })
@@ -273,7 +273,7 @@ function P({ workspace: a, teamKey: d, template: x, onClose: S }) {
273
273
  children: e.name
274
274
  }), /* @__PURE__ */ D("div", {
275
275
  className: "min-w-0 flex-1",
276
- children: /* @__PURE__ */ D(c, {
276
+ children: /* @__PURE__ */ D(u, {
277
277
  workspace: a,
278
278
  property: e,
279
279
  value: H.fields?.[e.id],
@@ -1,8 +1,8 @@
1
1
  import { teamsQuery as e } from "../api/queries.js";
2
- import { AddIcon as t } from "./icons.js";
2
+ import { useConfirm as t } from "../lib/confirm.js";
3
3
  import { customFieldsQuery as n } from "../lib/customFields.js";
4
- import { useConfirm as r } from "../lib/confirm.js";
5
- import { issueTypesQuery as i, useIssueTypeActions as a } from "../lib/issueTypes.js";
4
+ import { issueTypesQuery as r, useIssueTypeActions as i } from "../lib/issueTypes.js";
5
+ import { AddIcon as a } from "./icons.js";
6
6
  import { Button as o, ColorInput as s, ErrorText as c, IconButton as l, Input as u, Select as d, SettingsCard as f, Textarea as p, menuDivider as m, useOpenMenu as h } from "@parallelworks/ui";
7
7
  import { useState as g } from "react";
8
8
  import { useErrorMessage as _ } from "@parallelworks/problem/react";
@@ -23,44 +23,44 @@ function S({ type: e, className: t = "size-4" }) {
23
23
  });
24
24
  }
25
25
  function C({ workspace: e }) {
26
- let n = v("issueTypes"), { data: r = [] } = x(i(e)), [a, s] = g(!1);
26
+ let t = v("issueTypes"), { data: n = [] } = x(r(e)), [i, s] = g(!1);
27
27
  return /* @__PURE__ */ b(f, {
28
- title: n("title"),
29
- description: n("description"),
28
+ title: t("title"),
29
+ description: t("description"),
30
30
  action: /* @__PURE__ */ y(o, {
31
31
  size: "sm",
32
- icon: /* @__PURE__ */ y(t, {}),
32
+ icon: /* @__PURE__ */ y(a, {}),
33
33
  onClick: () => s(!0),
34
- children: n("add")
34
+ children: t("add")
35
35
  }),
36
- children: [a && /* @__PURE__ */ y("div", {
36
+ children: [i && /* @__PURE__ */ y("div", {
37
37
  className: "p-2",
38
38
  children: /* @__PURE__ */ y(T, {
39
39
  workspace: e,
40
40
  onDone: () => s(!1)
41
41
  })
42
- }), r.length === 0 && !a ? /* @__PURE__ */ y("p", {
42
+ }), n.length === 0 && !i ? /* @__PURE__ */ y("p", {
43
43
  className: "px-3 py-3 text-sm text-muted-foreground",
44
- children: n("none")
44
+ children: t("none")
45
45
  }) : /* @__PURE__ */ y("ul", {
46
46
  className: "divide-y divide-border",
47
- children: r.map((t, n) => /* @__PURE__ */ y(w, {
47
+ children: n.map((t, r) => /* @__PURE__ */ y(w, {
48
48
  workspace: e,
49
49
  type: t,
50
- before: r[n - 1],
51
- after: r[n + 1]
50
+ before: n[r - 1],
51
+ after: n[r + 1]
52
52
  }, t.id))
53
53
  })]
54
54
  });
55
55
  }
56
- function w({ workspace: t, type: n, before: i, after: o }) {
57
- let s = v("issueTypes"), c = a(t), u = h(), { confirm: d, dialog: f } = r(), [p, _] = g(!1), { data: C = [] } = x(e(t)), w = (e) => {
56
+ function w({ workspace: n, type: r, before: a, after: o }) {
57
+ let s = v("issueTypes"), c = i(n), u = h(), { confirm: d, dialog: f } = t(), [p, _] = g(!1), { data: C = [] } = x(e(n)), w = (e) => {
58
58
  let t = {
59
- ...n,
59
+ ...r,
60
60
  ...e
61
61
  };
62
62
  return {
63
- id: n.id,
63
+ id: r.id,
64
64
  name: t.name,
65
65
  description: t.description ?? "",
66
66
  icon: t.icon ?? "",
@@ -75,11 +75,11 @@ function w({ workspace: t, type: n, before: i, after: o }) {
75
75
  label: s("edit"),
76
76
  onClick: () => _(!0)
77
77
  },
78
- ...i ? [{
78
+ ...a ? [{
79
79
  label: s("moveUp"),
80
80
  onClick: () => c.update.mutate({
81
81
  ...w({}),
82
- position: i.position - .5
82
+ position: a.position - .5
83
83
  })
84
84
  }] : [],
85
85
  ...o ? [{
@@ -90,10 +90,10 @@ function w({ workspace: t, type: n, before: i, after: o }) {
90
90
  })
91
91
  }] : [],
92
92
  {
93
- label: n.archivedAt ? s("restore") : s("archive"),
93
+ label: r.archivedAt ? s("restore") : s("archive"),
94
94
  onClick: () => c.update.mutate({
95
95
  ...w({}),
96
- archived: !n.archivedAt
96
+ archived: !r.archivedAt
97
97
  })
98
98
  },
99
99
  m,
@@ -101,38 +101,38 @@ function w({ workspace: t, type: n, before: i, after: o }) {
101
101
  label: s("delete"),
102
102
  destructive: !0,
103
103
  onClick: () => d({
104
- title: s("deleteTitle", { name: n.name }),
105
- description: s("deleteDescription", { count: n.issues }),
104
+ title: s("deleteTitle", { name: r.name }),
105
+ description: s("deleteDescription", { count: r.issues }),
106
106
  confirmLabel: s("delete"),
107
- onConfirm: () => c.remove.mutateAsync(n.id)
107
+ onConfirm: () => c.remove.mutateAsync(r.id)
108
108
  })
109
109
  }
110
110
  ];
111
111
  if (p) return /* @__PURE__ */ y("li", {
112
112
  className: "p-2",
113
113
  children: /* @__PURE__ */ y(T, {
114
- workspace: t,
115
- type: n,
114
+ workspace: n,
115
+ type: r,
116
116
  onDone: () => _(!1)
117
117
  })
118
118
  });
119
- let D = n.teamIds.map((e) => C.find((t) => t.id === e)?.name).filter(Boolean).join(", ");
119
+ let D = r.teamIds.map((e) => C.find((t) => t.id === e)?.name).filter(Boolean).join(", ");
120
120
  return /* @__PURE__ */ b("li", {
121
121
  className: "flex min-h-10 items-center gap-3 px-3 py-1.5",
122
122
  onContextMenu: (e) => u(e, E()),
123
123
  children: [
124
- /* @__PURE__ */ y(S, { type: n }),
124
+ /* @__PURE__ */ y(S, { type: r }),
125
125
  /* @__PURE__ */ b("div", {
126
126
  className: "min-w-0 flex-1",
127
127
  children: [/* @__PURE__ */ y("p", {
128
- className: `truncate text-sm ${n.archivedAt ? "text-muted-foreground" : ""}`,
129
- children: n.name
130
- }), n.description && /* @__PURE__ */ y("p", {
128
+ className: `truncate text-sm ${r.archivedAt ? "text-muted-foreground" : ""}`,
129
+ children: r.name
130
+ }), r.description && /* @__PURE__ */ y("p", {
131
131
  className: "truncate text-xs text-muted-foreground",
132
- children: n.description
132
+ children: r.description
133
133
  })]
134
134
  }),
135
- n.archivedAt && /* @__PURE__ */ y("span", {
135
+ r.archivedAt && /* @__PURE__ */ y("span", {
136
136
  className: "shrink-0 text-xs text-muted-foreground",
137
137
  children: s("archived")
138
138
  }),
@@ -142,12 +142,12 @@ function w({ workspace: t, type: n, before: i, after: o }) {
142
142
  }),
143
143
  /* @__PURE__ */ y("span", {
144
144
  className: "w-20 shrink-0 text-right text-xs tabular-nums text-muted-foreground",
145
- children: s("issues", { count: n.issues })
145
+ children: s("issues", { count: r.issues })
146
146
  }),
147
147
  /* @__PURE__ */ y(l, {
148
148
  variant: "ghost",
149
149
  size: "sm",
150
- label: s("actions", { name: n.name }),
150
+ label: s("actions", { name: r.name }),
151
151
  icon: /* @__PURE__ */ y("span", {
152
152
  "aria-hidden": !0,
153
153
  children: "⋯"
@@ -158,8 +158,8 @@ function w({ workspace: t, type: n, before: i, after: o }) {
158
158
  ]
159
159
  });
160
160
  }
161
- function T({ workspace: t, type: r, onDone: i }) {
162
- let l = v("issueTypes"), f = v("common"), m = _(), h = a(t), { data: S = [] } = x(e(t)), { data: C = [] } = x(n(t)), w = C.filter((e) => e.target === "issue" && !e.archivedAt), [T, E] = g(r?.name ?? ""), [D, O] = g(r?.description ?? ""), [k, A] = g(r?.icon ?? ""), [j, M] = g(r?.color || "#6e7781"), [N, P] = g(r?.teamIds ?? []), [F, I] = g(r?.fieldIds ?? []), [L, R] = g(r?.requiredFieldIds ?? []), [z, B] = g(r?.template ?? ""), V = r ? h.update : h.create, H = F.length > 0 ? w.filter((e) => F.includes(e.id)) : w, U = (e) => {
161
+ function T({ workspace: t, type: r, onDone: a }) {
162
+ let l = v("issueTypes"), f = v("common"), m = _(), h = i(t), { data: S = [] } = x(e(t)), { data: C = [] } = x(n(t)), w = C.filter((e) => e.target === "issue" && !e.archivedAt), [T, E] = g(r?.name ?? ""), [D, O] = g(r?.description ?? ""), [k, A] = g(r?.icon ?? ""), [j, M] = g(r?.color || "#6e7781"), [N, P] = g(r?.teamIds ?? []), [F, I] = g(r?.fieldIds ?? []), [L, R] = g(r?.requiredFieldIds ?? []), [z, B] = g(r?.template ?? ""), V = r ? h.update : h.create, H = F.length > 0 ? w.filter((e) => F.includes(e.id)) : w, U = (e) => {
163
163
  e.preventDefault();
164
164
  let t = {
165
165
  name: T,
@@ -174,7 +174,7 @@ function T({ workspace: t, type: r, onDone: i }) {
174
174
  r ? h.update.mutate({
175
175
  id: r.id,
176
176
  ...t
177
- }, { onSuccess: i }) : h.create.mutate(t, { onSuccess: i });
177
+ }, { onSuccess: a }) : h.create.mutate(t, { onSuccess: a });
178
178
  }, W = "block text-xs font-medium text-muted-foreground";
179
179
  return /* @__PURE__ */ b("form", {
180
180
  onSubmit: U,
@@ -301,7 +301,7 @@ function T({ workspace: t, type: r, onDone: i }) {
301
301
  children: [/* @__PURE__ */ y(o, {
302
302
  size: "sm",
303
303
  variant: "ghost",
304
- onClick: i,
304
+ onClick: a,
305
305
  children: f("cancel")
306
306
  }), /* @__PURE__ */ y(o, {
307
307
  type: "submit",
@@ -1,7 +1,7 @@
1
- import { appURL as e } from "../lib/base.js";
2
- import { api as t, unwrap as n } from "../api/client.js";
3
- import { useNavigate as r } from "../lib/router.js";
4
- import { docRef as i, downloadMarkdown as a } from "../lib/docs.js";
1
+ import { api as e, unwrap as t } from "../api/client.js";
2
+ import { appURL as n } from "../lib/base.js";
3
+ import { docRef as r, downloadMarkdown as i } from "../lib/docs.js";
4
+ import { useNavigate as a } from "../lib/router.js";
5
5
  import { Button as o, ErrorText as s, Modal as c, ModalTitle as l } from "@parallelworks/ui";
6
6
  import { useErrorMessage as u } from "@parallelworks/problem/react";
7
7
  import { useTranslations as d } from "use-intl";
@@ -10,10 +10,10 @@ import { useMutation as h, useQueryClient as g } from "@tanstack/react-query";
10
10
  // src/components/MarkdownTransfer.tsx
11
11
  var _ = (e) => /\.(md|markdown)$/i.test(e);
12
12
  function v(v) {
13
- let y = d("docs"), b = u(), x = g(), S = r(), C = h({
13
+ let y = d("docs"), b = u(), x = g(), S = a(), C = h({
14
14
  mutationFn: async ({ target: r, files: i }) => {
15
- let a = e(`/${v}/docs/`), [o] = i;
16
- if (i.length === 1 && o && /\.zip$/i.test(o.name)) return n(await t.POST("/api/v1/workspaces/{workspace}/docs/import/zip", {
15
+ let a = n(`/${v}/docs/`), [o] = i;
16
+ if (i.length === 1 && o && /\.zip$/i.test(o.name)) return t(await e.POST("/api/v1/workspaces/{workspace}/docs/import/zip", {
17
17
  params: {
18
18
  path: { workspace: v },
19
19
  query: {
@@ -29,7 +29,7 @@ function v(v) {
29
29
  path: e.webkitRelativePath || e.name,
30
30
  content: _(e.name) ? await e.text() : ""
31
31
  })));
32
- return n(await t.POST("/api/v1/workspaces/{workspace}/docs/import", {
32
+ return t(await e.POST("/api/v1/workspaces/{workspace}/docs/import", {
33
33
  params: { path: { workspace: v } },
34
34
  body: {
35
35
  ...r,
@@ -58,7 +58,7 @@ function v(v) {
58
58
  files: t
59
59
  });
60
60
  }, n.click();
61
- }, T = (e) => a(v, e), E = C.data, D = C.isPending || C.isError || !!E, O = () => C.reset();
61
+ }, T = (e) => i(v, e), E = C.data, D = C.isPending || C.isError || !!E, O = () => C.reset();
62
62
  return {
63
63
  pick: w,
64
64
  download: T,
@@ -112,7 +112,7 @@ function v(v) {
112
112
  to: "/$workspace/docs/$doc",
113
113
  params: {
114
114
  workspace: v,
115
- doc: i(e)
115
+ doc: r(e)
116
116
  }
117
117
  });
118
118
  },
@@ -1,7 +1,7 @@
1
- import { CalendarIcon as e } from "./icons.js";
2
- import { usePeople as t } from "../lib/people.js";
3
- import { datesFor as n, isoDate as r } from "../lib/datePhrases.js";
4
- import { useEditorListbox as i } from "./editorListbox.js";
1
+ import { datesFor as e, isoDate as t } from "../lib/datePhrases.js";
2
+ import { usePeople as n } from "../lib/people.js";
3
+ import { useEditorListbox as r } from "./editorListbox.js";
4
+ import { CalendarIcon as i } from "./icons.js";
5
5
  import { Avatar as a, ListboxOption as o, ListboxPanel as s, useListboxNavigation as c } from "@parallelworks/ui";
6
6
  import { useParams as l } from "@tanstack/react-router";
7
7
  import { useEffect as u, useMemo as d, useRef as f, useState as p } from "react";
@@ -25,19 +25,19 @@ function _(e) {
25
25
  };
26
26
  }
27
27
  function v({ editor: v }) {
28
- let { workspace: y } = l({ strict: !1 }), b = h("mentions"), x = h("dateChip"), { members: S } = t(y ?? ""), [C, w] = p(null), T = m(), E = d(() => {
29
- let e = (C?.query ?? "").toLowerCase(), t = n(e).map((e) => ({
28
+ let { workspace: y } = l({ strict: !1 }), b = h("mentions"), x = h("dateChip"), { members: S } = n(y ?? ""), [C, w] = p(null), T = m(), E = d(() => {
29
+ let t = (C?.query ?? "").toLowerCase(), n = e(t).map((e) => ({
30
30
  kind: "date",
31
31
  date: e
32
32
  })), r = S.map((e) => ({
33
33
  username: e.user.username,
34
34
  name: e.user.name,
35
35
  avatarUrl: e.user.avatarUrl
36
- })).filter((t) => !e || t.username.toLowerCase().includes(e) || t.name.toLowerCase().includes(e)).sort((t, n) => Number(!t.username.toLowerCase().startsWith(e)) - Number(!n.username.toLowerCase().startsWith(e)) || t.name.localeCompare(n.name)).slice(0, 8).map((e) => ({
36
+ })).filter((e) => !t || e.username.toLowerCase().includes(t) || e.name.toLowerCase().includes(t)).sort((e, n) => Number(!e.username.toLowerCase().startsWith(t)) - Number(!n.username.toLowerCase().startsWith(t)) || e.name.localeCompare(n.name)).slice(0, 8).map((e) => ({
37
37
  kind: "person",
38
38
  ...e
39
39
  }));
40
- return [...t, ...r];
40
+ return [...n, ...r];
41
41
  }, [S, C?.query]);
42
42
  u(() => {
43
43
  if (!v) return;
@@ -54,7 +54,7 @@ function v({ editor: v }) {
54
54
  to: C.to
55
55
  }, e.kind === "date" ? [{
56
56
  type: "dateChip",
57
- attrs: { date: r(e.date) }
57
+ attrs: { date: t(e.date) }
58
58
  }, {
59
59
  type: "text",
60
60
  text: " "
@@ -65,7 +65,7 @@ function v({ editor: v }) {
65
65
  onDismiss: () => w(null),
66
66
  open: O
67
67
  }), A = f(k.setActive);
68
- return A.current = k.setActive, i(v, k, O), !C || !O ? null : /* @__PURE__ */ g(s, {
68
+ return A.current = k.setActive, r(v, k, O), !C || !O ? null : /* @__PURE__ */ g(s, {
69
69
  at: {
70
70
  clientX: C.x,
71
71
  clientY: C.y
@@ -75,26 +75,26 @@ function v({ editor: v }) {
75
75
  "aria-label": b("label"),
76
76
  footer: b("hint"),
77
77
  className: "w-64 text-sm",
78
- children: E.map((t, n) => t.kind === "date" ? /* @__PURE__ */ g(o, {
78
+ children: E.map((e, n) => e.kind === "date" ? /* @__PURE__ */ g(o, {
79
79
  option: k.optionProps(n),
80
- icon: /* @__PURE__ */ g(e, { className: "size-4" }),
81
- label: T.dateTime(t.date, {
80
+ icon: /* @__PURE__ */ g(i, { className: "size-4" }),
81
+ label: T.dateTime(e.date, {
82
82
  weekday: "long",
83
83
  month: "long",
84
84
  day: "numeric"
85
85
  }),
86
86
  hint: x("suggest")
87
- }, `date:${r(t.date)}`) : /* @__PURE__ */ g(o, {
87
+ }, `date:${t(e.date)}`) : /* @__PURE__ */ g(o, {
88
88
  option: k.optionProps(n),
89
89
  icon: /* @__PURE__ */ g(a, {
90
- name: t.name,
91
- src: t.avatarUrl,
90
+ name: e.name,
91
+ src: e.avatarUrl,
92
92
  size: "xs",
93
93
  decorative: !0
94
94
  }),
95
- label: t.name,
96
- hint: `@${t.username}`
97
- }, t.username))
95
+ label: e.name,
96
+ hint: `@${e.username}`
97
+ }, e.username))
98
98
  });
99
99
  }
100
100
  export { v as MentionPicker };