@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,9 +1,9 @@
1
1
  import { api as e, unwrap as t } from "../api/client.js";
2
2
  import { meQuery as n } from "../api/queries.js";
3
- import { docKey as r } from "../lib/docs.js";
4
- import { CalendarIcon as i, NotificationIcon as a } from "./icons.js";
3
+ import { fromIsoDate as r, isoDate as i } from "../lib/datePhrases.js";
4
+ import { docKey as a } from "../lib/docs.js";
5
5
  import { usePeople as o } from "../lib/people.js";
6
- import { fromIsoDate as s, isoDate as c } from "../lib/datePhrases.js";
6
+ import { CalendarIcon as s, NotificationIcon as c } from "./icons.js";
7
7
  import { Button as l, ErrorText as u, Input as d, Popover as f, Select as p } from "@parallelworks/ui";
8
8
  import { useParams as m } from "@tanstack/react-router";
9
9
  import { useState as h } from "react";
@@ -42,7 +42,7 @@ var O = w.create({
42
42
  start: (e) => e.search(/@\d{4}-\d{2}-\d{2}/),
43
43
  tokenize: (e) => {
44
44
  let t = /^@(\d{4}-\d{2}-\d{2})(?![\w-])/.exec(e);
45
- if (t && s(t[1] ?? "")) return {
45
+ if (t && r(t[1] ?? "")) return {
46
46
  type: "dateChip",
47
47
  raw: t[0],
48
48
  text: t[1] ?? ""
@@ -53,20 +53,20 @@ var O = w.create({
53
53
  renderMarkdown: (e) => `@${String(e.attrs?.date ?? "")}`
54
54
  });
55
55
  function k({ node: e, editor: t, updateAttributes: n }) {
56
- let r = _(), o = v("dateChip"), c = s(String(e.attrs.date ?? "")), l = e.attrs.remindAt, u = /* @__PURE__ */ new Date(), d = c ? r.dateTime(c, {
56
+ let i = _(), a = v("dateChip"), o = r(String(e.attrs.date ?? "")), l = e.attrs.remindAt, u = /* @__PURE__ */ new Date(), d = o ? i.dateTime(o, {
57
57
  weekday: "short",
58
58
  month: "short",
59
59
  day: "numeric",
60
- ...c.getFullYear() !== u.getFullYear() && { year: "numeric" }
60
+ ...o.getFullYear() !== u.getFullYear() && { year: "numeric" }
61
61
  }) : String(e.attrs.date), p = /* @__PURE__ */ x("span", {
62
62
  className: "date-chip",
63
63
  "data-reminder": l ? "" : void 0,
64
64
  children: [
65
- /* @__PURE__ */ b(i, { className: "size-3.5" }),
65
+ /* @__PURE__ */ b(s, { className: "size-3.5" }),
66
66
  d,
67
- l && /* @__PURE__ */ b(a, {
67
+ l && /* @__PURE__ */ b(c, {
68
68
  className: "size-3",
69
- "aria-label": o("reminderSet")
69
+ "aria-label": a("reminderSet")
70
70
  })
71
71
  ]
72
72
  });
@@ -77,13 +77,13 @@ function k({ node: e, editor: t, updateAttributes: n }) {
77
77
  trigger: /* @__PURE__ */ b("button", {
78
78
  type: "button",
79
79
  className: "date-chip-button",
80
- "aria-label": o("change", { date: d }),
80
+ "aria-label": a("change", { date: d }),
81
81
  children: p
82
82
  }),
83
83
  align: "start",
84
84
  className: "w-72",
85
85
  initialFocus: "first-control",
86
- "aria-label": o("title"),
86
+ "aria-label": a("title"),
87
87
  children: /* @__PURE__ */ b(A, {
88
88
  node: e,
89
89
  updateAttributes: n
@@ -91,25 +91,25 @@ function k({ node: e, editor: t, updateAttributes: n }) {
91
91
  }) : p
92
92
  });
93
93
  }
94
- function A({ node: i, updateAttributes: a }) {
95
- let f = v("dateChip"), w = _(), T = g(), { workspace: E = "", doc: D } = m({ strict: !1 }), { members: O } = o(E), { data: k } = C(n), A = String(i.attrs.date ?? ""), j = i.attrs.reminderId, M = i.attrs.remindAt, N = i.attrs.remindFor ?? "", [P, F] = h(""), [I, L] = h("09:00"), R = {
94
+ function A({ node: s, updateAttributes: c }) {
95
+ let f = v("dateChip"), w = _(), T = g(), { workspace: E = "", doc: D } = m({ strict: !1 }), { members: O } = o(E), { data: k } = C(n), A = String(s.attrs.date ?? ""), j = s.attrs.reminderId, M = s.attrs.remindAt, N = s.attrs.remindFor ?? "", [P, F] = h(""), [I, L] = h("09:00"), R = {
96
96
  workspace: E,
97
- doc: D ? r(D) : ""
97
+ doc: D ? a(D) : ""
98
98
  }, z = S({
99
99
  mutationFn: async () => {
100
- let n = s(A);
100
+ let n = r(A);
101
101
  if (!n) throw Error(f("noDate"));
102
- let [r, i] = I.split(":").map(Number), a = new Date(n.getFullYear(), n.getMonth(), n.getDate(), r ?? 9, i ?? 0);
102
+ let [i, a] = I.split(":").map(Number), o = new Date(n.getFullYear(), n.getMonth(), n.getDate(), i ?? 9, a ?? 0);
103
103
  return t(await e.POST("/api/v1/workspaces/{workspace}/docs/{doc}/reminders", {
104
104
  params: { path: R },
105
105
  body: {
106
106
  date: A,
107
- remindAt: a.toISOString(),
107
+ remindAt: o.toISOString(),
108
108
  ...P && { for: P }
109
109
  }
110
110
  }));
111
111
  },
112
- onSuccess: (e) => a({
112
+ onSuccess: (e) => c({
113
113
  reminderId: e.id,
114
114
  remindAt: e.remindAt,
115
115
  remindFor: P || null
@@ -121,7 +121,7 @@ function A({ node: i, updateAttributes: a }) {
121
121
  reminderId: j
122
122
  } } });
123
123
  },
124
- onSuccess: () => a({
124
+ onSuccess: () => c({
125
125
  reminderId: null,
126
126
  remindAt: null,
127
127
  remindFor: null
@@ -135,8 +135,8 @@ function A({ node: i, updateAttributes: a }) {
135
135
  type: "date",
136
136
  value: A,
137
137
  onChange: (e) => {
138
- let t = s(e.target.value);
139
- t && a({ date: c(t) });
138
+ let t = r(e.target.value);
139
+ t && c({ date: i(t) });
140
140
  },
141
141
  className: "mt-1"
142
142
  })]
@@ -1,9 +1,9 @@
1
1
  import { api as e, unwrap as t } from "../api/client.js";
2
2
  import { docVersionQuery as n, docVersionsQuery as r } from "../api/queries.js";
3
- import { usePeople as i } from "../lib/people.js";
4
- import { useTime as a } from "../lib/time.js";
5
- import { Editor as o } from "./Editor.js";
6
- import { lineDiff as s } from "../lib/diff.js";
3
+ import { lineDiff as i } from "../lib/diff.js";
4
+ import { usePeople as a } from "../lib/people.js";
5
+ import { useTime as o } from "../lib/time.js";
6
+ import { Editor as s } from "./Editor.js";
7
7
  import { Avatar as c, Button as l, ErrorText as u, Loader as d, Tooltip as f } from "@parallelworks/ui";
8
8
  import { useState as p } from "react";
9
9
  import { useErrorMessage as m } from "@parallelworks/problem/react";
@@ -11,8 +11,8 @@ import { useTranslations as h } from "use-intl";
11
11
  import { jsx as g, jsxs as _ } from "react/jsx-runtime";
12
12
  import { useMutation as v, useQuery as y, useQueryClient as b } from "@tanstack/react-query";
13
13
  // src/components/DocHistory.tsx
14
- function x({ workspace: e, doc: t, selected: n, onSelect: o }) {
15
- let s = h("docs"), l = a(), { actorName: u, avatarOf: p } = i(e), { data: m = [], isPending: v } = y(r(e, t.key));
14
+ function x({ workspace: e, doc: t, selected: n, onSelect: i }) {
15
+ let s = h("docs"), l = o(), { actorName: u, avatarOf: p } = a(e), { data: m = [], isPending: v } = y(r(e, t.key));
16
16
  return /* @__PURE__ */ _("aside", {
17
17
  "aria-label": s("history"),
18
18
  className: "w-72 shrink-0 overflow-y-auto border-l border-border px-3 py-4 max-md:hidden",
@@ -32,7 +32,7 @@ function x({ workspace: e, doc: t, selected: n, onSelect: o }) {
32
32
  return /* @__PURE__ */ g("li", { children: /* @__PURE__ */ _("button", {
33
33
  type: "button",
34
34
  "aria-current": r ? "true" : void 0,
35
- onClick: () => o(t === 0 ? void 0 : e.id),
35
+ onClick: () => i(t === 0 ? void 0 : e.id),
36
36
  className: `flex w-full items-start gap-2 rounded-md px-2 py-1.5 text-left text-sm hover:bg-muted ${r ? "bg-muted" : ""}`,
37
37
  children: [/* @__PURE__ */ g(c, {
38
38
  kind: e.editor.kind === "agent" ? "agent" : "person",
@@ -61,11 +61,11 @@ function x({ workspace: e, doc: t, selected: n, onSelect: o }) {
61
61
  ]
62
62
  });
63
63
  }
64
- function S({ workspace: r, doc: s, versionId: c, onDone: d }) {
65
- let f = h("docs"), x = a(), S = m(), w = b(), { actorName: T } = i(r), [E, D] = p(!1), { data: O } = y(n(r, s.key, c)), k = v({
64
+ function S({ workspace: r, doc: i, versionId: c, onDone: d }) {
65
+ let f = h("docs"), x = o(), S = m(), w = b(), { actorName: T } = a(r), [E, D] = p(!1), { data: O } = y(n(r, i.key, c)), k = v({
66
66
  mutationFn: async () => t(await e.POST("/api/v1/workspaces/{workspace}/docs/{doc}/versions/{versionId}/restore", { params: { path: {
67
67
  workspace: r,
68
- doc: s.key,
68
+ doc: i.key,
69
69
  versionId: c
70
70
  } } })),
71
71
  onSuccess: () => {
@@ -109,16 +109,16 @@ function S({ workspace: r, doc: s, versionId: c, onDone: d }) {
109
109
  className: "mt-2",
110
110
  children: S(k.error)
111
111
  }),
112
- O.title !== s.title && /* @__PURE__ */ g("p", {
112
+ O.title !== i.title && /* @__PURE__ */ g("p", {
113
113
  className: "mt-3 text-xs text-muted-foreground",
114
114
  children: f("versionTitle", { title: O.title })
115
115
  }),
116
116
  E ? /* @__PURE__ */ g(C, {
117
117
  before: O.body ?? "",
118
- after: s.body ?? ""
118
+ after: i.body ?? ""
119
119
  }) : /* @__PURE__ */ g("div", {
120
120
  className: "mt-4",
121
- children: /* @__PURE__ */ g(o, {
121
+ children: /* @__PURE__ */ g(s, {
122
122
  value: O.body ?? "",
123
123
  editable: !1,
124
124
  className: "min-h-32"
@@ -128,7 +128,7 @@ function S({ workspace: r, doc: s, versionId: c, onDone: d }) {
128
128
  }) : null;
129
129
  }
130
130
  function C({ before: e, after: t }) {
131
- let n = h("docs"), r = s(e, t);
131
+ let n = h("docs"), r = i(e, t);
132
132
  return r.some((e) => e.kind !== "same") ? /* @__PURE__ */ g("ol", {
133
133
  "aria-label": n("changes"),
134
134
  className: "mt-4 overflow-x-auto rounded-md border border-border font-mono text-xs leading-5",
@@ -1,5 +1,5 @@
1
- import { FileTextIcon as ee } from "./icons.js";
2
- import { iconImageURL as e } from "./EntityIcon.js";
1
+ import { iconImageURL as ee } from "./EntityIcon.js";
2
+ import { FileTextIcon as e } from "./icons.js";
3
3
  import { jsx as t } from "react/jsx-runtime";
4
4
  import { ArticleIcon as n, BillingIcon as r, BriefcaseIcon as i, CalendarIcon as a, CelebrateIcon as o, ChartIcon as te, ChatIcon as ne, ClipboardCheckIcon as s, CloudIcon as c, ClusterIcon as l, CodeIcon as u, ComputeIcon as d, ContractIcon as f, DiskIcon as p, EducationIcon as m, FavoriteIcon as h, FeaturedIcon as g, FileIcon as _, FilesIcon as v, FlaggedIcon as y, FlaskIcon as b, FolderIcon as x, FolderOpenIcon as S, GearsIcon as C, GlobeIcon as w, GraphIcon as T, HelpIcon as E, HomeIcon as D, ImageIcon as O, InfoIcon as k, IssueIcon as A, KeyIcon as j, LegalIcon as M, LibraryIcon as N, LockIcon as re, MailIcon as P, MapPinIcon as F, MegaphoneIcon as I, MoonIcon as L, NotebookIcon as R, OrganizationIcon as z, PieChartIcon as B, ProjectIcon as V, ReleaseIcon as H, ReportIcon as U, ScriptIcon as W, SettingsIcon as G, ShieldIcon as K, SparklesIcon as q, SpreadsheetIcon as J, StorageIcon as Y, SummaryIcon as X, SunIcon as ie, SupportIcon as ae, TerminalIcon as oe, TodoIcon as se, ToolsIcon as ce, UsersIcon as Z, VideoIcon as le, WarningIcon as ue, WorkflowIcon as de, ZapIcon as fe } from "@parallelworks/ui/icons";
5
5
  // src/components/DocIcon.tsx
@@ -68,7 +68,7 @@ var Q = {
68
68
  moon: L
69
69
  }, $ = "icon:";
70
70
  function pe({ icon: n, className: r = "size-4", emojiClassName: i = "text-sm" }) {
71
- let a = n && e(n);
71
+ let a = n && ee(n);
72
72
  if (a) return /* @__PURE__ */ t("img", {
73
73
  src: a,
74
74
  alt: "",
@@ -80,6 +80,6 @@ function pe({ icon: n, className: r = "size-4", emojiClassName: i = "text-sm" })
80
80
  "aria-hidden": "true",
81
81
  className: `inline-flex shrink-0 items-center justify-center leading-none ${r} ${i}`,
82
82
  children: n
83
- }) : /* @__PURE__ */ t(ee, { className: `shrink-0 text-muted-foreground ${r}` });
83
+ }) : /* @__PURE__ */ t(e, { className: `shrink-0 text-muted-foreground ${r}` });
84
84
  }
85
85
  export { pe as DocIcon, Q as docIcons };
@@ -1,6 +1,6 @@
1
- import { iconImageURL as e } from "./EntityIcon.js";
1
+ import { emoji as e } from "../lib/emoji.js";
2
2
  import { docIcons as t } from "./DocIcon.js";
3
- import { emoji as n } from "../lib/emoji.js";
3
+ import { iconImageURL as n } from "./EntityIcon.js";
4
4
  import { Button as r, FileButton as i, Popover as a, SearchInput as o, SegmentedControl as s, useClosePopover as c } from "@parallelworks/ui";
5
5
  import { useState as l } from "react";
6
6
  import { useTranslations as u } from "use-intl";
@@ -20,7 +20,7 @@ function m({ trigger: e, icon: t, onPick: n, onUploadFile: r }) {
20
20
  });
21
21
  }
22
22
  function h({ icon: a, onPick: m, onUploadFile: h }) {
23
- let g = u("docs.look"), _ = c(), [v, y] = l(e(a) ? "upload" : a.startsWith("icon:") ? "icons" : "emoji"), [b, x] = l(""), S = b.trim().toLowerCase(), C = (e) => {
23
+ let g = u("docs.look"), _ = c(), [v, y] = l(n(a) ? "upload" : a.startsWith("icon:") ? "icons" : "emoji"), [b, x] = l(""), S = b.trim().toLowerCase(), C = (e) => {
24
24
  m(e), _();
25
25
  }, w = "flex size-8 items-center justify-center rounded-md hover:bg-muted aria-pressed:bg-muted focus-visible:outline-2 focus-visible:outline-primary";
26
26
  return /* @__PURE__ */ p("div", {
@@ -76,7 +76,7 @@ function h({ icon: a, onPick: m, onUploadFile: h }) {
76
76
  }), /* @__PURE__ */ f("fieldset", {
77
77
  className: "grid max-h-56 grid-cols-8 gap-0.5 overflow-y-auto",
78
78
  "aria-label": g(v),
79
- children: v === "emoji" ? n.filter(([, e]) => !S || e.includes(S)).map(([e, t]) => /* @__PURE__ */ f("button", {
79
+ children: v === "emoji" ? e.filter(([, e]) => !S || e.includes(S)).map(([e, t]) => /* @__PURE__ */ f("button", {
80
80
  type: "button",
81
81
  title: t.split(" ")[0],
82
82
  "aria-label": t.split(" ")[0],
@@ -1,12 +1,12 @@
1
- import { appURL as e } from "../lib/base.js";
2
- import { docQuery as t, docsQuery as n, issueSearchQuery as r, projectsQuery as i } from "../api/queries.js";
1
+ import { docQuery as e, docsQuery as t, issueSearchQuery as n, projectsQuery as r } from "../api/queries.js";
2
+ import { appURL as i } from "../lib/base.js";
3
3
  import { docURL as a } from "../lib/docs.js";
4
- import { ProjectIcon as o, StatusIcon as s } from "./icons.js";
5
- import { headingAnchor as c, headings as l } from "../lib/glossary.js";
6
- import { issueURL as u } from "../lib/issueMenu.js";
7
- import { projectRef as d } from "../lib/projects.js";
8
- import { DocIcon as f } from "./DocIcon.js";
9
- import { useEditorListbox as p } from "./editorListbox.js";
4
+ import { headingAnchor as o, headings as s } from "../lib/glossary.js";
5
+ import { issueURL as c } from "../lib/issueMenu.js";
6
+ import { projectRef as l } from "../lib/projects.js";
7
+ import { DocIcon as u } from "./DocIcon.js";
8
+ import { useEditorListbox as d } from "./editorListbox.js";
9
+ import { ProjectIcon as f, StatusIcon as p } from "./icons.js";
10
10
  import { ListboxOption as m, ListboxPanel as h, useListboxNavigation as g } from "@parallelworks/ui";
11
11
  import { useParams as _ } from "@tanstack/react-router";
12
12
  import { useEffect as v, useMemo as y, useRef as b, useState as x } from "react";
@@ -33,7 +33,7 @@ function E(e) {
33
33
  var D = 4;
34
34
  function O({ editor: O }) {
35
35
  let { workspace: k } = _({ strict: !1 }), A = S("docLinks"), [j, M] = x(null), [N, P] = (j?.query ?? "").split("#", 2), F = N.trim(), { data: I = [] } = T({
36
- ...n(k ?? "", F ? {
36
+ ...t(k ?? "", F ? {
37
37
  title: F,
38
38
  limit: 8
39
39
  } : {
@@ -43,14 +43,14 @@ function O({ editor: O }) {
43
43
  enabled: !!j && !!k,
44
44
  placeholderData: w
45
45
  }), L = P === void 0 ? void 0 : I[0], { data: R } = T({
46
- ...t(k ?? "", L?.key ?? ""),
46
+ ...e(k ?? "", L?.key ?? ""),
47
47
  enabled: !!L && !!k
48
48
  }), z = !!j && !!k && P === void 0 && !!F, { data: B } = T({
49
- ...r(k ?? "", { q: F }),
49
+ ...n(k ?? "", { q: F }),
50
50
  enabled: z,
51
51
  placeholderData: w
52
52
  }), { data: V = [] } = T({
53
- ...i(k ?? ""),
53
+ ...r(k ?? ""),
54
54
  enabled: z
55
55
  }), H = y(() => {
56
56
  if (P === void 0 || !L) {
@@ -73,7 +73,7 @@ function O({ editor: O }) {
73
73
  ];
74
74
  }
75
75
  let e = P.trim().toLowerCase();
76
- return l(R?.body ?? "").filter((t) => t.text.toLowerCase().includes(e)).slice(0, 8).map((e) => ({
76
+ return s(R?.body ?? "").filter((t) => t.text.toLowerCase().includes(e)).slice(0, 8).map((e) => ({
77
77
  kind: "doc",
78
78
  doc: L,
79
79
  heading: e.text
@@ -96,18 +96,18 @@ function O({ editor: O }) {
96
96
  O.off("selectionUpdate", e), O.off("update", e), O.off("blur", e);
97
97
  };
98
98
  }, [O]);
99
- let U = (t) => {
100
- if (!O || !j || !t || !k) return;
101
- let [n, r] = t.kind === "doc" ? [t.heading ? `${t.doc.title} › ${t.heading}` : t.doc.title, a(k, t.doc) + (t.heading ? `#${c(t.heading)}` : "")] : t.kind === "issue" ? [t.issue.identifier, u(k, t.issue.identifier)] : [t.project.name, e(`/${k}/projects/${d(t.project)}`)];
99
+ let U = (e) => {
100
+ if (!O || !j || !e || !k) return;
101
+ let [t, n] = e.kind === "doc" ? [e.heading ? `${e.doc.title} › ${e.heading}` : e.doc.title, a(k, e.doc) + (e.heading ? `#${o(e.heading)}` : "")] : e.kind === "issue" ? [e.issue.identifier, c(k, e.issue.identifier)] : [e.project.name, i(`/${k}/projects/${l(e.project)}`)];
102
102
  O.chain().focus().insertContentAt({
103
103
  from: j.from,
104
104
  to: j.to
105
105
  }, [{
106
106
  type: "text",
107
- text: n,
107
+ text: t,
108
108
  marks: [{
109
109
  type: "link",
110
- attrs: { href: r }
110
+ attrs: { href: n }
111
111
  }]
112
112
  }, {
113
113
  type: "text",
@@ -119,7 +119,7 @@ function O({ editor: O }) {
119
119
  onDismiss: () => M(null),
120
120
  open: !!j && !!k
121
121
  }), G = b(W.setActive);
122
- return G.current = W.setActive, p(O, W, !!j && !!k, (e) => !j || e.key !== "Escape" || H.length > 0 ? !1 : (e.preventDefault(), M(null), !0)), !j || !k ? null : /* @__PURE__ */ C(h, {
122
+ return G.current = W.setActive, d(O, W, !!j && !!k, (e) => !j || e.key !== "Escape" || H.length > 0 ? !1 : (e.preventDefault(), M(null), !0)), !j || !k ? null : /* @__PURE__ */ C(h, {
123
123
  at: {
124
124
  clientX: j.x,
125
125
  clientY: j.y
@@ -133,7 +133,7 @@ function O({ editor: O }) {
133
133
  children: H.map((e, t) => {
134
134
  let n = e.kind === "doc" ? {
135
135
  key: `doc:${e.doc.id}:${e.heading ?? ""}`,
136
- icon: /* @__PURE__ */ C(f, {
136
+ icon: /* @__PURE__ */ C(u, {
137
137
  icon: e.doc.icon,
138
138
  className: "size-3.5"
139
139
  }),
@@ -141,7 +141,7 @@ function O({ editor: O }) {
141
141
  hint: e.heading ? e.doc.title : void 0
142
142
  } : e.kind === "issue" ? {
143
143
  key: `issue:${e.issue.id}`,
144
- icon: /* @__PURE__ */ C(s, {
144
+ icon: /* @__PURE__ */ C(p, {
145
145
  category: e.issue.status.category,
146
146
  step: e.issue.status.step
147
147
  }),
@@ -149,7 +149,7 @@ function O({ editor: O }) {
149
149
  hint: e.issue.identifier
150
150
  } : {
151
151
  key: `project:${e.project.id}`,
152
- icon: /* @__PURE__ */ C(o, {}),
152
+ icon: /* @__PURE__ */ C(f, {}),
153
153
  label: e.project.name,
154
154
  hint: A("project")
155
155
  };
@@ -1,8 +1,8 @@
1
1
  import { api as e, unwrap as t } from "../api/client.js";
2
2
  import { useDocActions as n } from "../lib/docs.js";
3
- import { iconImageURL as r } from "./EntityIcon.js";
4
- import { DocIcon as i } from "./DocIcon.js";
5
- import { DocIconPicker as a } from "./DocIconPicker.js";
3
+ import { DocIcon as r } from "./DocIcon.js";
4
+ import { DocIconPicker as i } from "./DocIconPicker.js";
5
+ import { iconImageURL as a } from "./EntityIcon.js";
6
6
  import { CropDialog as o } from "./ImageUpload.js";
7
7
  import { Button as s, ErrorText as c, FileButton as l } from "@parallelworks/ui";
8
8
  import { useRef as u, useState as d } from "react";
@@ -71,8 +71,8 @@ function b(n, r) {
71
71
  clear: () => o(null)
72
72
  };
73
73
  }
74
- function x({ workspace: e, doc: t, editable: i }) {
75
- let a = p("docs.look"), o = p("common"), f = n(e), _ = y(e, t), v = u(null), b = u(null), [x, S] = d(!1), [C, w] = d(t.coverPosition), T = r(t.cover ?? "");
74
+ function x({ workspace: e, doc: t, editable: r }) {
75
+ let i = p("docs.look"), o = p("common"), f = n(e), _ = y(e, t), v = u(null), b = u(null), [x, S] = d(!1), [C, w] = d(t.coverPosition), T = a(t.cover ?? "");
76
76
  if (!T) return null;
77
77
  let E = x ? C : t.coverPosition;
78
78
  return /* @__PURE__ */ g("div", {
@@ -106,10 +106,10 @@ function x({ workspace: e, doc: t, editable: i }) {
106
106
  className: "pointer-events-none absolute inset-x-0 top-1/2 -translate-y-1/2 text-center",
107
107
  children: /* @__PURE__ */ h("span", {
108
108
  className: "rounded-md bg-background/85 px-2 py-1 text-xs",
109
- children: a("dragToReposition")
109
+ children: i("dragToReposition")
110
110
  })
111
111
  }),
112
- i && /* @__PURE__ */ h("div", {
112
+ r && /* @__PURE__ */ h("div", {
113
113
  className: `absolute right-4 bottom-3 flex gap-1.5 transition-opacity duration-150 md:right-8 ${x || _.busy ? "" : "opacity-0 group-focus-within/cover:opacity-100 group-hover/cover:opacity-100"}`,
114
114
  children: x ? /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h(s, {
115
115
  type: "button",
@@ -126,14 +126,14 @@ function x({ workspace: e, doc: t, editable: i }) {
126
126
  coverPosition: C
127
127
  }), S(!1);
128
128
  },
129
- children: a("savePosition")
129
+ children: i("savePosition")
130
130
  })] }) : /* @__PURE__ */ g(m, { children: [
131
131
  /* @__PURE__ */ h(l, {
132
132
  size: "sm",
133
133
  accept: "image/png,image/jpeg",
134
134
  onFiles: _.upload,
135
135
  loading: _.busy,
136
- children: a("changeCover")
136
+ children: i("changeCover")
137
137
  }),
138
138
  /* @__PURE__ */ h(s, {
139
139
  type: "button",
@@ -141,7 +141,7 @@ function x({ workspace: e, doc: t, editable: i }) {
141
141
  onClick: () => {
142
142
  w(t.coverPosition), S(!0);
143
143
  },
144
- children: a("reposition")
144
+ children: i("reposition")
145
145
  }),
146
146
  /* @__PURE__ */ h(s, {
147
147
  type: "button",
@@ -150,7 +150,7 @@ function x({ workspace: e, doc: t, editable: i }) {
150
150
  doc: t,
151
151
  cover: ""
152
152
  }),
153
- children: a("removeCover")
153
+ children: i("removeCover")
154
154
  })
155
155
  ] })
156
156
  }),
@@ -161,11 +161,11 @@ function x({ workspace: e, doc: t, editable: i }) {
161
161
  ]
162
162
  });
163
163
  }
164
- function S({ workspace: e, doc: t, editable: r }) {
164
+ function S({ workspace: e, doc: t, editable: a }) {
165
165
  let u = p("docs.look"), d = n(e), f = y(e, t), m = t.icon ?? "", _ = (e) => d.setLook.mutate({
166
166
  doc: t,
167
167
  icon: e
168
- }), v = b(e, _), x = /* @__PURE__ */ h(i, {
168
+ }), v = b(e, _), x = /* @__PURE__ */ h(r, {
169
169
  icon: m,
170
170
  className: "size-14",
171
171
  emojiClassName: "text-5xl"
@@ -173,7 +173,7 @@ function S({ workspace: e, doc: t, editable: r }) {
173
173
  return /* @__PURE__ */ g("div", {
174
174
  className: t.cover ? "-mt-10 md:-mt-12" : "",
175
175
  children: [
176
- m && (r ? /* @__PURE__ */ h(a, {
176
+ m && (a ? /* @__PURE__ */ h(i, {
177
177
  icon: m,
178
178
  onPick: _,
179
179
  onUploadFile: v.pick,
@@ -187,10 +187,10 @@ function S({ workspace: e, doc: t, editable: r }) {
187
187
  className: "relative inline-block p-1",
188
188
  children: x
189
189
  })),
190
- r && (!m || !t.cover) && /* @__PURE__ */ g("div", {
190
+ a && (!m || !t.cover) && /* @__PURE__ */ g("div", {
191
191
  className: "flex h-8 items-center gap-1 opacity-0 transition-opacity duration-150 group-hover/doc:opacity-100 focus-within:opacity-100 has-[[aria-expanded=true]]:opacity-100 max-md:opacity-100",
192
192
  children: [
193
- !m && /* @__PURE__ */ h(a, {
193
+ !m && /* @__PURE__ */ h(i, {
194
194
  icon: "",
195
195
  onPick: _,
196
196
  onUploadFile: v.pick,