@parallelworks/tandem-web 0.171.1 → 0.171.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (171) hide show
  1. package/_virtual/_virtual_i18n/en/common.js +5 -2
  2. package/_virtual/_virtual_i18n/es/common.js +5 -2
  3. package/_virtual/_virtual_i18n/ja/common.js +5 -2
  4. package/_virtual/_virtual_i18n/ko/common.js +5 -2
  5. package/_virtual/_virtual_i18n/zh/common.js +5 -2
  6. package/components/AccessGrants.js +6 -6
  7. package/components/ActivityTimeline.js +60 -60
  8. package/components/ActorAvatar.js +4 -4
  9. package/components/ActorLink.js +34 -0
  10. package/components/AgentWork.js +494 -494
  11. package/components/AppLauncher.js +7 -7
  12. package/components/AreaLink.js +13 -13
  13. package/components/AreaTiles.js +13 -13
  14. package/components/AreaWork.js +22 -22
  15. package/components/Attachments.js +73 -69
  16. package/components/BlockHandle.js +3 -3
  17. package/components/BugRotation.js +8 -8
  18. package/components/CodeHostSettings.js +121 -87
  19. package/components/CollabEditor.js +13 -13
  20. package/components/CommandPalette.js +206 -206
  21. package/components/CustomFields.js +95 -95
  22. package/components/CustomerRequests.js +11 -11
  23. package/components/DashboardPanel.js +201 -164
  24. package/components/DateChip.js +21 -21
  25. package/components/DocHistory.js +14 -14
  26. package/components/DocIcon.js +4 -4
  27. package/components/DocIconPicker.js +4 -4
  28. package/components/DocLinkPicker.js +22 -22
  29. package/components/DocLook.js +16 -16
  30. package/components/DocProperties.js +81 -81
  31. package/components/DocTable.js +53 -53
  32. package/components/DocsTree.js +179 -179
  33. package/components/Editor.js +69 -69
  34. package/components/FavoritesNav.js +78 -78
  35. package/components/GitHub.js +87 -87
  36. package/components/Graph.js +14 -14
  37. package/components/HostActions.js +21 -21
  38. package/components/HostPanel.js +6 -6
  39. package/components/HoverCards.js +74 -74
  40. package/components/IssueBoard.js +13 -10
  41. package/components/IssueBreakdown.js +31 -31
  42. package/components/IssueCode.js +19 -19
  43. package/components/IssueEvent.js +97 -92
  44. package/components/IssueFilters.js +39 -39
  45. package/components/IssueGroup.js +16 -16
  46. package/components/IssueImport.js +13 -13
  47. package/components/IssueInsights.js +20 -20
  48. package/components/IssueListBlock.js +81 -81
  49. package/components/IssueRelations.js +34 -34
  50. package/components/IssueRow.js +31 -31
  51. package/components/IssueSentry.js +36 -34
  52. package/components/IssueTemplates.js +23 -23
  53. package/components/IssueTypes.js +40 -40
  54. package/components/MarkdownTransfer.js +10 -10
  55. package/components/MentionPicker.js +19 -19
  56. package/components/NewIssueDialog.js +53 -53
  57. package/components/NewProjectDialog.js +82 -82
  58. package/components/PersonActivity.js +13 -13
  59. package/components/PersonHoverCard.js +44 -44
  60. package/components/Planning.js +16 -16
  61. package/components/Reports.js +8 -8
  62. package/components/SettingsNav.js +15 -15
  63. package/components/ShareDialog.js +8 -8
  64. package/components/SharedViewer.js +23 -23
  65. package/components/SlashMenu.js +26 -26
  66. package/components/SubPages.js +10 -10
  67. package/components/TeamForm.js +9 -9
  68. package/components/TeamRepositories.js +21 -21
  69. package/components/TeamWorkflow.js +6 -6
  70. package/components/UnlinkedMentions.js +29 -29
  71. package/components/Updates.js +8 -8
  72. package/components/Widgets.js +99 -97
  73. package/components/WorkCounts.js +12 -12
  74. package/components/cycleCrumb.js +8 -8
  75. package/components/editorPlugins.js +101 -101
  76. package/components/settings.js +6 -6
  77. package/components/video.js +7 -7
  78. package/hostedApp.js +24 -24
  79. package/index.js +18 -18
  80. package/lib/assignees.js +3 -3
  81. package/lib/attachments.js +12 -12
  82. package/lib/boardMove.js +27 -27
  83. package/lib/collab.js +1 -1
  84. package/lib/docs.js +115 -115
  85. package/lib/githubLink.js +7 -7
  86. package/lib/issueList.js +51 -51
  87. package/lib/issueMenu.js +117 -117
  88. package/lib/knowledge.js +134 -134
  89. package/lib/live.js +38 -38
  90. package/lib/notifications.js +47 -47
  91. package/lib/triageSeen.js +2 -2
  92. package/lib/views.js +31 -31
  93. package/package.json +24 -24
  94. package/pages/area.js +64 -64
  95. package/pages/areas.js +199 -199
  96. package/pages/decisions.js +51 -51
  97. package/pages/issues.js +120 -120
  98. package/pages/projects.js +238 -238
  99. package/pages/triage.js +202 -212
  100. package/routes/_workspace/agents/_slug2.js +127 -127
  101. package/routes/_workspace/agents/index2.js +22 -22
  102. package/routes/_workspace/dashboards/_dashboardId2.js +84 -84
  103. package/routes/_workspace/dashboards/index2.js +34 -34
  104. package/routes/_workspace/docs/_doc2.js +267 -267
  105. package/routes/_workspace/docs/space2._space.js +31 -31
  106. package/routes/_workspace/docs2.js +4 -4
  107. package/routes/_workspace/graph2.js +11 -11
  108. package/routes/_workspace/graph3.js +11 -11
  109. package/routes/_workspace/issues/_identifier2.js +519 -522
  110. package/routes/_workspace/issues/index.js +13 -13
  111. package/routes/_workspace/knowledge/_term2.js +148 -146
  112. package/routes/_workspace/knowledge/_term3.js +4 -4
  113. package/routes/_workspace/knowledge/index.js +12 -12
  114. package/routes/_workspace/knowledge/index2.js +117 -115
  115. package/routes/_workspace/measures2.js +8 -8
  116. package/routes/_workspace/measures3.js +29 -29
  117. package/routes/_workspace/notifications2.js +263 -263
  118. package/routes/_workspace/people/_username.js +10 -10
  119. package/routes/_workspace/people/_username2.js +41 -41
  120. package/routes/_workspace/projects/_projectId3.js +303 -303
  121. package/routes/_workspace/projects/_projectId4.js +4 -4
  122. package/routes/_workspace/projects/_projectId_3.milestones._milestoneId.js +28 -28
  123. package/routes/_workspace/projects/_projectId_4.milestones._milestoneId.js +4 -4
  124. package/routes/_workspace/projects/index.js +8 -8
  125. package/routes/_workspace/settings/account2.js +8 -8
  126. package/routes/_workspace/settings/audit-log2.js +8 -8
  127. package/routes/_workspace/settings/audit-log3.js +155 -155
  128. package/routes/_workspace/settings/connections2.js +4 -4
  129. package/routes/_workspace/settings/fields2.js +5 -5
  130. package/routes/_workspace/settings/github2.js +11 -11
  131. package/routes/_workspace/settings/gitlab2.js +5 -5
  132. package/routes/_workspace/settings/groups2.js +52 -52
  133. package/routes/_workspace/settings/import2.js +39 -39
  134. package/routes/_workspace/settings/index2.js +5 -5
  135. package/routes/_workspace/settings/intercom2.js +11 -11
  136. package/routes/_workspace/settings/labels2.js +33 -33
  137. package/routes/_workspace/settings/members2.js +81 -81
  138. package/routes/_workspace/settings/notifications2.js +46 -46
  139. package/routes/_workspace/settings/parallelworks2.js +20 -20
  140. package/routes/_workspace/settings/roles2.js +41 -41
  141. package/routes/_workspace/settings/runners2.js +15 -15
  142. package/routes/_workspace/settings/sentry2.js +15 -15
  143. package/routes/_workspace/settings/sessions2.js +9 -9
  144. package/routes/_workspace/settings/sessions3.js +4 -4
  145. package/routes/_workspace/settings/slack2.js +12 -12
  146. package/routes/_workspace/settings/sso2.js +37 -37
  147. package/routes/_workspace/settings/sso3.js +7 -7
  148. package/routes/_workspace/settings/teams2.js +29 -29
  149. package/routes/_workspace/settings/tokens2.js +32 -32
  150. package/routes/_workspace/settings/tokens3.js +4 -4
  151. package/routes/_workspace/settings/webhooks2.js +41 -41
  152. package/routes/_workspace/settings/zendesk2.js +11 -11
  153. package/routes/_workspace/teams/_key/cycles/_number2.js +33 -33
  154. package/routes/_workspace/teams/_key/cycles/_number3.js +7 -7
  155. package/routes/_workspace/teams/_key/cycles/index2.js +37 -37
  156. package/routes/_workspace/teams/_key/issues.js +10 -10
  157. package/routes/_workspace/teams/_key/projects.js +6 -6
  158. package/routes/_workspace/teams/_key/settings2.js +396 -396
  159. package/routes/_workspace2.js +308 -308
  160. package/routes/_workspace3.js +8 -8
  161. package/routes/device2.js +4 -4
  162. package/routes/device3.js +4 -4
  163. package/routes/docs/_tag/_endpoint2.js +3 -3
  164. package/routes/docs/_tag/index2.js +3 -3
  165. package/routes/docs/route2.js +7 -7
  166. package/routes/index2.js +5 -5
  167. package/routes/login2.js +10 -10
  168. package/routes/new2.js +12 -12
  169. package/routes/new3.js +5 -5
  170. package/routes/request2._token.js +6 -6
  171. package/routes/share2._secret.js +4 -4
@@ -1,31 +1,31 @@
1
- import { rememberSearch as e } from "../../../lib/listSearch.js";
2
- import { redirect as t } from "../../../lib/router.js";
3
- import { myTeamsQuery as n } from "../../../api/queries.js";
4
- import { issueSearch as r } from "../../../lib/issueList.js";
1
+ import { myTeamsQuery as e } from "../../../api/queries.js";
2
+ import { issueSearch as t } from "../../../lib/issueList.js";
3
+ import { rememberSearch as n } from "../../../lib/listSearch.js";
4
+ import { redirect as r } from "../../../lib/router.js";
5
5
  import { lastTeam as i } from "../../../lib/teamPaths.js";
6
6
  import { createFileRoute as a, lazyFn as o, lazyRouteComponent as s } from "@tanstack/react-router";
7
7
  var c = a("/$workspace/issues/")({
8
- validateSearch: r,
9
- beforeLoad: async ({ context: { queryClient: r }, params: a, search: o, location: s, preload: c }) => {
8
+ validateSearch: t,
9
+ beforeLoad: async ({ context: { queryClient: t }, params: a, search: o, location: s, preload: c }) => {
10
10
  let l = o.team;
11
11
  if (!l && !o.assignee && !o.creator && !o.saved && !o.scope) {
12
- let e = (await r.ensureQueryData(n(a.workspace))).filter((e) => !e.archivedAt), t = i(a.workspace);
13
- l = (e.find((e) => e.key === t) ?? e[0])?.key;
12
+ let n = (await t.ensureQueryData(e(a.workspace))).filter((e) => !e.archivedAt), r = i(a.workspace);
13
+ l = (n.find((e) => e.key === r) ?? n[0])?.key;
14
14
  }
15
15
  if (l) {
16
- let { team: e, ...n } = o;
17
- throw t({
16
+ let { team: e, ...t } = o;
17
+ throw r({
18
18
  to: "/$workspace/teams/$key/issues",
19
19
  params: {
20
20
  ...a,
21
21
  key: l
22
22
  },
23
- search: n,
23
+ search: t,
24
24
  replace: !0
25
25
  });
26
26
  }
27
- let u = e(s.pathname, o, c);
28
- if (u) throw t({
27
+ let u = n(s.pathname, o, c);
28
+ if (u) throw r({
29
29
  to: "/$workspace/issues",
30
30
  params: a,
31
31
  search: u,
@@ -1,21 +1,21 @@
1
- import { usePageTitle as e } from "../../../lib/pageTitle.js";
2
- import { Link as t, useNavigate as n } from "../../../lib/router.js";
3
- import { areasQuery as r, knowledgeEntryQuery as i, knowledgeEventsQuery as a, knowledgeMentionsQuery as o, knowledgeQuery as s } from "../../../api/queries.js";
4
- import { docRef as c } from "../../../lib/docs.js";
5
- import { FileTextIcon as l, LibraryIcon as u, StatusIcon as d } from "../../../components/icons.js";
6
- import { headingAnchor as f } from "../../../lib/glossary.js";
7
- import { termRef as p } from "../../../lib/knowledgeKinds.js";
8
- import { EntryDialog as ee, useKnowledgeActions as m, useKnowledgeMenu as te } from "../../../lib/knowledge.js";
9
- import { usePeople as h } from "../../../lib/people.js";
10
- import { useTime as g } from "../../../lib/time.js";
11
- import { uploadKnowledgeAttachment as _ } from "../../../lib/attachments.js";
12
- import { useCan as v } from "../../../lib/roles.js";
13
- import { AttachButton as y, UploadStatus as b, useFileUpload as x } from "../../../components/Attachments.js";
14
- import { Editor as S } from "../../../components/Editor.js";
15
- import { KnowledgeStatus as C } from "../../../components/HoverCards.js";
16
- import { Route as w } from "./_term.js";
17
- import { Timeline as T, TimelineItem as E, activityIcon as D } from "../../../components/ActivityTimeline.js";
18
- import { Button as O, ErrorText as k, PageHeader as A, Section as j, TitleInput as M, useOpenMenu as N } from "@parallelworks/ui";
1
+ import { areasQuery as e, knowledgeEntryQuery as t, knowledgeEventsQuery as n, knowledgeMentionsQuery as r, knowledgeQuery as i } from "../../../api/queries.js";
2
+ import { Timeline as a, TimelineItem as o, activityIcon as s } from "../../../components/ActivityTimeline.js";
3
+ import { AttachButton as c, UploadStatus as l, useFileUpload as u } from "../../../components/Attachments.js";
4
+ import { Editor as d } from "../../../components/Editor.js";
5
+ import { KnowledgeStatus as f } from "../../../components/HoverCards.js";
6
+ import { FileTextIcon as p, LibraryIcon as m, StatusIcon as h } from "../../../components/icons.js";
7
+ import { uploadKnowledgeAttachment as g } from "../../../lib/attachments.js";
8
+ import { docRef as _ } from "../../../lib/docs.js";
9
+ import { headingAnchor as v } from "../../../lib/glossary.js";
10
+ import { EntryDialog as y, useKnowledgeActions as ee, useKnowledgeMenu as b } from "../../../lib/knowledge.js";
11
+ import { termRef as x } from "../../../lib/knowledgeKinds.js";
12
+ import { usePageTitle as te } from "../../../lib/pageTitle.js";
13
+ import { usePeople as S } from "../../../lib/people.js";
14
+ import { useCan as C } from "../../../lib/roles.js";
15
+ import { Link as w, useNavigate as T } from "../../../lib/router.js";
16
+ import { useTime as E } from "../../../lib/time.js";
17
+ import { Route as D } from "./_term.js";
18
+ import { Button as O, ErrorText as k, PageHeader as ne, Section as A, TitleInput as j, Tooltip as M, useOpenMenu as N } from "@parallelworks/ui";
19
19
  import { Suspense as P, useCallback as F, useMemo as I, useRef as L, useState as R } from "react";
20
20
  import { useErrorMessage as z } from "@parallelworks/problem/react";
21
21
  import { useTranslations as B } from "use-intl";
@@ -24,42 +24,42 @@ import { useQuery as W, useSuspenseQuery as G } from "@tanstack/react-query";
24
24
  import { MoreButton as K } from "@parallelworks/ui/list";
25
25
  // src/routes/$workspace/knowledge/$term.tsx?tsr-split=component
26
26
  function q() {
27
- let { workspace: r, term: a } = w.useParams(), o = B("knowledge"), c = B("common"), l = n(), d = N(), f = z(), { data: h } = G(i(r, a)), { data: g } = G(s(r)), C = m(r), T = v(r, "edit_docs"), E = T && !h.archivedAt, [D, j] = R(null), W = F((e) => j(e), []), q = te(r, W), X = L(null), Z = x((e) => _(r, h.id, e));
28
- e(h.name);
29
- let Q = I(() => g.filter((e) => e.supersededBy === h.id), [g, h.id]), $ = (e) => C.update.mutate({
30
- id: h.id,
27
+ let { workspace: e, term: n } = D.useParams(), r = B("knowledge"), a = B("common"), o = T(), s = N(), f = z(), { data: p } = G(t(e, n)), { data: h } = G(i(e)), _ = ee(e), v = C(e, "edit_docs"), S = v && !p.archivedAt, [E, A] = R(null), M = F((e) => A(e), []), W = b(e, M), q = L(null), Z = u((t) => g(e, p.id, t));
28
+ te(p.name);
29
+ let Q = I(() => h.filter((e) => e.supersededBy === p.id), [h, p.id]), $ = (e) => _.update.mutate({
30
+ id: p.id,
31
31
  ...e,
32
- ifVersion: h.version
33
- }), re = h.status === "superseded";
32
+ ifVersion: p.version
33
+ }), re = p.status === "superseded";
34
34
  return /* @__PURE__ */ U("div", {
35
35
  className: "flex h-full min-h-0 flex-col",
36
36
  children: [
37
- /* @__PURE__ */ H(A, {
37
+ /* @__PURE__ */ H(ne, {
38
38
  heading: !1,
39
39
  breadcrumbs: [{
40
- label: o("title"),
41
- href: `/${r}/knowledge`
40
+ label: r("title"),
41
+ href: `/${e}/knowledge`
42
42
  }, {
43
- label: h.name,
44
- icon: /* @__PURE__ */ H(u, { className: "size-4 text-muted-foreground" })
43
+ label: p.name,
44
+ icon: /* @__PURE__ */ H(m, { className: "size-4 text-muted-foreground" })
45
45
  }],
46
46
  titleActions: /* @__PURE__ */ H(K, {
47
- items: () => q(h),
48
- label: c("moreActionsFor", { name: h.name }),
47
+ items: () => W(p),
48
+ label: a("moreActionsFor", { name: p.name }),
49
49
  visible: !0
50
50
  }),
51
- actions: /* @__PURE__ */ U(V, { children: [C.update.isPending && /* @__PURE__ */ H("span", {
51
+ actions: /* @__PURE__ */ U(V, { children: [_.update.isPending && /* @__PURE__ */ H("span", {
52
52
  className: "text-xs text-muted-foreground",
53
53
  role: "status",
54
- children: c("saving")
55
- }), E && /* @__PURE__ */ H(O, {
54
+ children: a("saving")
55
+ }), S && /* @__PURE__ */ H(O, {
56
56
  type: "button",
57
57
  size: "sm",
58
- onClick: () => W({
58
+ onClick: () => M({
59
59
  kind: "edit",
60
- entry: h
60
+ entry: p
61
61
  }),
62
- children: o("editDetails")
62
+ children: r("editDetails")
63
63
  })] })
64
64
  }),
65
65
  /* @__PURE__ */ H("div", {
@@ -67,186 +67,188 @@ function q() {
67
67
  children: /* @__PURE__ */ U("article", {
68
68
  className: "mx-auto w-full max-w-3xl px-4 pt-6 pb-20 md:px-8 md:pt-10",
69
69
  onContextMenu: (e) => {
70
- e.target instanceof Element && e.target.closest("textarea, .ProseMirror") || d(e, q(h));
70
+ e.target instanceof Element && e.target.closest("textarea, .ProseMirror") || s(e, W(p));
71
71
  },
72
72
  children: [
73
- h.archivedAt && /* @__PURE__ */ U("div", {
73
+ p.archivedAt && /* @__PURE__ */ U("div", {
74
74
  className: "mb-6 flex items-center gap-3 rounded-xl border border-border bg-muted px-3 py-2 text-sm",
75
75
  children: [/* @__PURE__ */ H("span", {
76
76
  className: "min-w-0 flex-1",
77
- children: o("archivedNotice")
78
- }), T && /* @__PURE__ */ H(O, {
77
+ children: r("archivedNotice")
78
+ }), v && /* @__PURE__ */ H(O, {
79
79
  type: "button",
80
80
  size: "sm",
81
- onClick: () => C.restore.mutate(h.id),
82
- children: o("restore")
81
+ onClick: () => _.restore.mutate(p.id),
82
+ children: r("restore")
83
83
  })]
84
84
  }),
85
85
  /* @__PURE__ */ H(J, {
86
- workspace: r,
87
- entry: h
86
+ workspace: e,
87
+ entry: p
88
88
  }),
89
89
  /* @__PURE__ */ H("h1", {
90
90
  className: "sr-only",
91
- children: h.name
91
+ children: p.name
92
92
  }),
93
- /* @__PURE__ */ H(M, {
94
- value: h.name,
93
+ /* @__PURE__ */ H(j, {
94
+ value: p.name,
95
95
  onCommit: (e) => $({ name: e }),
96
- readOnly: !E,
97
- "aria-label": o("name"),
96
+ readOnly: !S,
97
+ "aria-label": r("name"),
98
98
  maxLength: 100,
99
99
  className: re ? "mt-2 text-muted-foreground line-through" : "mt-2"
100
100
  }),
101
- h.aliases.length > 0 && /* @__PURE__ */ H("p", {
101
+ p.aliases.length > 0 && /* @__PURE__ */ H("p", {
102
102
  className: "mt-1 text-sm text-muted-foreground",
103
- children: o("alsoCalled", { names: h.aliases.join(", ") })
103
+ children: r("alsoCalled", { names: p.aliases.join(", ") })
104
104
  }),
105
- /* @__PURE__ */ H(M, {
106
- value: h.definition,
105
+ /* @__PURE__ */ H(j, {
106
+ value: p.definition,
107
107
  onCommit: (e) => $({ definition: e }),
108
- readOnly: !E,
109
- "aria-label": o("definition"),
110
- placeholder: o("definitionPlaceholder"),
108
+ readOnly: !S,
109
+ "aria-label": r("definition"),
110
+ placeholder: r("definitionPlaceholder"),
111
111
  maxLength: 1e3,
112
112
  size: "lg",
113
113
  className: "mt-3 text-base leading-relaxed font-normal tracking-normal text-muted-foreground"
114
114
  }),
115
- (h.supersededBy || Q.length > 0) && /* @__PURE__ */ U("div", {
115
+ (p.supersededBy || Q.length > 0) && /* @__PURE__ */ U("div", {
116
116
  className: "mt-3 space-y-1 text-sm",
117
- children: [h.supersededBy && /* @__PURE__ */ H(t, {
117
+ children: [p.supersededBy && /* @__PURE__ */ H(w, {
118
118
  to: "/$workspace/knowledge/$term",
119
119
  params: {
120
- workspace: r,
121
- term: p(g.find((e) => e.id === h.supersededBy) ?? { id: h.supersededBy })
120
+ workspace: e,
121
+ term: x(h.find((e) => e.id === p.supersededBy) ?? { id: p.supersededBy })
122
122
  },
123
123
  className: "block text-primary hover:underline",
124
- children: o("supersededBy", { name: h.supersededByName ?? "" })
125
- }), Q.map((e) => /* @__PURE__ */ H(t, {
124
+ children: r("supersededBy", { name: p.supersededByName ?? "" })
125
+ }), Q.map((t) => /* @__PURE__ */ H(w, {
126
126
  to: "/$workspace/knowledge/$term",
127
127
  params: {
128
- workspace: r,
129
- term: p(e)
128
+ workspace: e,
129
+ term: x(t)
130
130
  },
131
131
  className: "block text-muted-foreground hover:text-foreground",
132
- children: o("replaces", { name: e.name })
133
- }, e.id))]
132
+ children: r("replaces", { name: t.name })
133
+ }, t.id))]
134
134
  }),
135
135
  /* @__PURE__ */ U("section", {
136
- "aria-label": o("page"),
136
+ "aria-label": r("page"),
137
137
  className: "mt-8 border-t border-border pt-6",
138
138
  children: [
139
- E || h.body ? /* @__PURE__ */ H(S, {
140
- value: h.body ?? "",
141
- editable: E,
142
- placeholder: o("pagePlaceholder"),
143
- label: o("page"),
144
- onBlur: (e) => e !== (h.body ?? "") && $({ body: e }),
145
- onFiles: (e, t) => Z.upload(X.current, e, t),
139
+ S || p.body ? /* @__PURE__ */ H(d, {
140
+ value: p.body ?? "",
141
+ editable: S,
142
+ placeholder: r("pagePlaceholder"),
143
+ label: r("page"),
144
+ onBlur: (e) => e !== (p.body ?? "") && $({ body: e }),
145
+ onFiles: (e, t) => Z.upload(q.current, e, t),
146
146
  onEditor: (e) => {
147
- X.current = e;
147
+ q.current = e;
148
148
  },
149
149
  className: "min-h-32 [&>:first-child]:mt-0"
150
150
  }) : /* @__PURE__ */ H("p", {
151
151
  className: "text-sm text-muted-foreground",
152
- children: o("noPage")
152
+ children: r("noPage")
153
153
  }),
154
- E && /* @__PURE__ */ U("div", {
154
+ S && /* @__PURE__ */ U("div", {
155
155
  className: "mt-3 flex items-center gap-2",
156
156
  children: [
157
- /* @__PURE__ */ H(y, { onFiles: (e) => Z.upload(X.current, e) }),
157
+ /* @__PURE__ */ H(c, { onFiles: (e) => Z.upload(q.current, e) }),
158
158
  /* @__PURE__ */ H("span", {
159
159
  className: "text-xs text-muted-foreground",
160
- children: o("attachHint")
160
+ children: r("attachHint")
161
161
  }),
162
162
  /* @__PURE__ */ H("span", {
163
163
  className: "ml-auto",
164
- children: /* @__PURE__ */ H(b, {
164
+ children: /* @__PURE__ */ H(l, {
165
165
  pending: Z.pending,
166
166
  error: Z.error
167
167
  })
168
168
  })
169
169
  ]
170
170
  }),
171
- C.update.isError && /* @__PURE__ */ H(k, {
171
+ _.update.isError && /* @__PURE__ */ H(k, {
172
172
  className: "mt-2",
173
- children: f(C.update.error)
173
+ children: f(_.update.error)
174
174
  })
175
175
  ]
176
176
  }),
177
177
  /* @__PURE__ */ H(P, { children: /* @__PURE__ */ H(Y, {
178
- workspace: r,
179
- entryId: h.id
178
+ workspace: e,
179
+ entryId: p.id
180
180
  }) }),
181
- /* @__PURE__ */ H(P, { children: /* @__PURE__ */ H(ne, {
182
- workspace: r,
183
- entryId: h.id
181
+ /* @__PURE__ */ H(P, { children: /* @__PURE__ */ H(X, {
182
+ workspace: e,
183
+ entryId: p.id
184
184
  }) })
185
185
  ]
186
186
  })
187
187
  }),
188
- D && /* @__PURE__ */ H(P, { children: /* @__PURE__ */ H(ee, {
189
- workspace: r,
190
- mode: D,
191
- onClose: () => j(null),
192
- onSaved: (e) => l({
188
+ E && /* @__PURE__ */ H(P, { children: /* @__PURE__ */ H(y, {
189
+ workspace: e,
190
+ mode: E,
191
+ onClose: () => A(null),
192
+ onSaved: (t) => o({
193
193
  to: "/$workspace/knowledge/$term",
194
194
  params: {
195
- workspace: r,
196
- term: p(e)
195
+ workspace: e,
196
+ term: x(t)
197
197
  },
198
- replace: e.id === h.id
198
+ replace: t.id === p.id
199
199
  })
200
200
  }) })
201
201
  ]
202
202
  });
203
203
  }
204
- function J({ workspace: e, entry: n }) {
205
- let i = B("knowledge"), { actorName: a } = h(e), o = g(), { data: s = [] } = W(r(e)), u = s.find((e) => e.id === n.areaId), d = n.source.doc, p = [
206
- ...n.kind === "term" ? [] : [i(`kind.${n.kind}`)],
207
- ...u ? [u.title] : [],
208
- i("writtenBy", { name: a(n.creator) }),
209
- /* @__PURE__ */ H("time", {
210
- dateTime: n.updatedAt,
211
- title: o.full(n.updatedAt),
212
- children: i("updated", { when: o.relative(n.updatedAt) })
204
+ function J({ workspace: t, entry: n }) {
205
+ let r = B("knowledge"), { actorName: i } = S(t), a = E(), { data: o = [] } = W(e(t)), s = o.find((e) => e.id === n.areaId), c = n.source.doc, l = [
206
+ ...n.kind === "term" ? [] : [r(`kind.${n.kind}`)],
207
+ ...s ? [s.title] : [],
208
+ r("writtenBy", { name: i(n.creator) }),
209
+ /* @__PURE__ */ H(M, {
210
+ content: a.full(n.updatedAt),
211
+ children: /* @__PURE__ */ H("time", {
212
+ dateTime: n.updatedAt,
213
+ children: r("updated", { when: a.relative(n.updatedAt) })
214
+ })
213
215
  }, "updated")
214
216
  ];
215
217
  return /* @__PURE__ */ U("div", {
216
218
  className: "space-y-1 text-xs text-muted-foreground",
217
219
  children: [/* @__PURE__ */ U("p", {
218
220
  className: "flex flex-wrap items-center gap-x-1.5 gap-y-1",
219
- children: [(n.kind !== "term" || n.status !== "decided") && /* @__PURE__ */ H(C, { status: n.status }), p.map((e, t) => /* @__PURE__ */ U("span", {
221
+ children: [(n.kind !== "term" || n.status !== "decided") && /* @__PURE__ */ H(f, { status: n.status }), l.map((e, t) => /* @__PURE__ */ U("span", {
220
222
  className: "inline-flex items-center gap-1.5",
221
223
  children: [t > 0 && /* @__PURE__ */ H("span", {
222
224
  "aria-hidden": "true",
223
225
  children: "·"
224
226
  }), e]
225
227
  }, t))]
226
- }), (d || n.source.identifier) && /* @__PURE__ */ U("p", {
228
+ }), (c || n.source.identifier) && /* @__PURE__ */ U("p", {
227
229
  className: "flex flex-wrap items-center gap-x-3 gap-y-1",
228
230
  children: [
229
- d && /* @__PURE__ */ U(t, {
231
+ c && /* @__PURE__ */ U(w, {
230
232
  to: "/$workspace/docs/$doc",
231
233
  params: {
232
- workspace: e,
233
- doc: c(d)
234
+ workspace: t,
235
+ doc: _(c)
234
236
  },
235
- ...n.source.section && { hash: f(n.source.section) },
237
+ ...n.source.section && { hash: v(n.source.section) },
236
238
  className: "inline-flex items-center gap-1 hover:text-foreground",
237
- children: [/* @__PURE__ */ H(l, { className: "size-3" }), n.source.section ? i("sourceSection", {
238
- doc: d.title,
239
+ children: [/* @__PURE__ */ H(p, { className: "size-3" }), n.source.section ? r("sourceSection", {
240
+ doc: c.title,
239
241
  section: n.source.section
240
- }) : d.title]
242
+ }) : c.title]
241
243
  }),
242
244
  n.source.missing && /* @__PURE__ */ H("span", {
243
245
  className: "text-warning",
244
- children: i("sourceMissing", { section: n.source.section ?? "" })
246
+ children: r("sourceMissing", { section: n.source.section ?? "" })
245
247
  }),
246
- n.source.identifier && /* @__PURE__ */ U(t, {
248
+ n.source.identifier && /* @__PURE__ */ U(w, {
247
249
  to: "/$workspace/issues/$identifier",
248
250
  params: {
249
- workspace: e,
251
+ workspace: t,
250
252
  identifier: n.source.identifier
251
253
  },
252
254
  className: "hover:text-foreground",
@@ -260,85 +262,85 @@ function J({ workspace: e, entry: n }) {
260
262
  })]
261
263
  });
262
264
  }
263
- function Y({ workspace: e, entryId: n }) {
264
- let r = B("knowledge"), { data: i } = W(o(e, n));
265
+ function Y({ workspace: e, entryId: t }) {
266
+ let n = B("knowledge"), { data: i } = W(r(e, t));
265
267
  if (!i) return null;
266
- let a = i.issues.length + i.docs.length, s = "flex min-h-10 items-center gap-2.5 px-3 py-2 text-sm hover:bg-muted focus-visible:outline-offset-[-2px]";
268
+ let a = i.issues.length + i.docs.length, o = "flex min-h-10 items-center gap-2.5 px-3 py-2 text-sm hover:bg-muted focus-visible:outline-offset-[-2px]";
267
269
  return /* @__PURE__ */ U("section", {
268
- "aria-label": r("mentionedIn"),
270
+ "aria-label": n("mentionedIn"),
269
271
  className: "mt-12",
270
272
  children: [/* @__PURE__ */ U("h2", {
271
273
  className: "mb-3 flex items-baseline gap-2 text-base font-semibold",
272
- children: [r("mentionedIn"), a > 0 && /* @__PURE__ */ H("span", {
274
+ children: [n("mentionedIn"), a > 0 && /* @__PURE__ */ H("span", {
273
275
  className: "text-xs font-normal text-muted-foreground tabular-nums",
274
276
  children: a
275
277
  })]
276
278
  }), a === 0 ? /* @__PURE__ */ H("p", {
277
279
  className: "text-sm text-muted-foreground",
278
- children: r("mentionedNone")
280
+ children: n("mentionedNone")
279
281
  }) : /* @__PURE__ */ U("ul", {
280
282
  className: "divide-y divide-border overflow-hidden rounded-xl border border-border bg-card",
281
- children: [i.issues.map((n) => /* @__PURE__ */ H("li", { children: /* @__PURE__ */ U(t, {
283
+ children: [i.issues.map((t) => /* @__PURE__ */ H("li", { children: /* @__PURE__ */ U(w, {
282
284
  to: "/$workspace/issues/$identifier",
283
285
  params: {
284
286
  workspace: e,
285
- identifier: n.identifier
287
+ identifier: t.identifier
286
288
  },
287
- className: s,
289
+ className: o,
288
290
  children: [
289
- /* @__PURE__ */ H(d, {
290
- category: n.statusCategory,
291
+ /* @__PURE__ */ H(h, {
292
+ category: t.statusCategory,
291
293
  className: "size-3.5 shrink-0"
292
294
  }),
293
295
  /* @__PURE__ */ H("span", {
294
- className: "w-16 shrink-0 text-xs text-muted-foreground tabular-nums",
295
- children: n.identifier
296
+ className: "min-w-24 shrink-0 text-xs whitespace-nowrap text-muted-foreground tabular-nums",
297
+ children: t.identifier
296
298
  }),
297
299
  /* @__PURE__ */ H("span", {
298
300
  className: "min-w-0 truncate",
299
- children: n.title
301
+ children: t.title
300
302
  })
301
303
  ]
302
- }) }, n.identifier)), i.docs.map((n) => /* @__PURE__ */ H("li", { children: /* @__PURE__ */ U(t, {
304
+ }) }, t.identifier)), i.docs.map((t) => /* @__PURE__ */ H("li", { children: /* @__PURE__ */ U(w, {
303
305
  to: "/$workspace/docs/$doc",
304
306
  params: {
305
307
  workspace: e,
306
- doc: c(n)
308
+ doc: _(t)
307
309
  },
308
- className: s,
310
+ className: o,
309
311
  children: [
310
- /* @__PURE__ */ H(l, { className: "size-3.5 shrink-0 text-muted-foreground" }),
312
+ /* @__PURE__ */ H(p, { className: "size-3.5 shrink-0 text-muted-foreground" }),
311
313
  /* @__PURE__ */ H("span", {
312
314
  className: "w-16 shrink-0 text-xs text-muted-foreground",
313
- children: r("doc")
315
+ children: n("doc")
314
316
  }),
315
317
  /* @__PURE__ */ H("span", {
316
318
  className: "min-w-0 truncate",
317
- children: n.title
319
+ children: t.title
318
320
  })
319
321
  ]
320
- }) }, n.id))]
322
+ }) }, t.id))]
321
323
  })]
322
324
  });
323
325
  }
324
- function ne({ workspace: e, entryId: t }) {
325
- let n = B("knowledge.history"), { data: r = [] } = W(a(e, t)), { actorName: i } = h(e);
326
- return r.length === 0 ? null : /* @__PURE__ */ H(j, {
327
- title: n("title"),
326
+ function X({ workspace: e, entryId: t }) {
327
+ let r = B("knowledge.history"), { data: i = [] } = W(n(e, t)), { actorName: c } = S(e);
328
+ return i.length === 0 ? null : /* @__PURE__ */ H(A, {
329
+ title: r("title"),
328
330
  variant: "bare",
329
331
  defaultOpen: !1,
330
332
  headingLevel: 2,
331
333
  className: "mt-10",
332
- children: /* @__PURE__ */ H(T, { children: r.map((t) => /* @__PURE__ */ H(E, {
334
+ children: /* @__PURE__ */ H(a, { children: i.map((t) => /* @__PURE__ */ H(o, {
333
335
  workspace: e,
334
- icon: D(t.type, t.data),
336
+ icon: s(t.type, t.data),
335
337
  actor: t.actor,
336
338
  at: t.createdAt,
337
- children: X(n, t, i(t.actor))
339
+ children: Z(r, t, c(t.actor))
338
340
  }, t.id)) })
339
341
  });
340
342
  }
341
- function X(e, t, n) {
343
+ function Z(e, t, n) {
342
344
  let r = t.data ?? {}, i = {
343
345
  name: n,
344
346
  actor: (e) => /* @__PURE__ */ H("span", {
@@ -1,9 +1,9 @@
1
- import { redirect as e } from "../../../lib/router.js";
2
- import { knowledgeEntryQuery as t, knowledgeQuery as n } from "../../../api/queries.js";
1
+ import { knowledgeEntryQuery as e, knowledgeQuery as t } from "../../../api/queries.js";
2
+ import { redirect as n } from "../../../lib/router.js";
3
3
  // src/routes/$workspace/knowledge/$term.tsx?tsr-split=loader
4
4
  var r = async ({ context: { queryClient: r }, params: { workspace: i, term: a } }) => {
5
- let [o] = await Promise.all([r.ensureQueryData(t(i, a)), r.ensureQueryData(n(i))]);
6
- if (o.slug && o.slug !== a) throw e({
5
+ let [o] = await Promise.all([r.ensureQueryData(e(i, a)), r.ensureQueryData(t(i))]);
6
+ if (o.slug && o.slug !== a) throw n({
7
7
  to: "/$workspace/knowledge/$term",
8
8
  params: {
9
9
  workspace: i,
@@ -1,29 +1,29 @@
1
- import { rememberSearch as e } from "../../../lib/listSearch.js";
2
- import { redirect as t } from "../../../lib/router.js";
3
- import { knowledgeQuery as n } from "../../../api/queries.js";
4
- import { kinds as r, termRef as i } from "../../../lib/knowledgeKinds.js";
5
- import { isEntryAt as a } from "../../../lib/refs.js";
1
+ import { knowledgeQuery as e } from "../../../api/queries.js";
2
+ import { kinds as t, termRef as n } from "../../../lib/knowledgeKinds.js";
3
+ import { rememberSearch as r } from "../../../lib/listSearch.js";
4
+ import { isEntryAt as i } from "../../../lib/refs.js";
5
+ import { redirect as a } from "../../../lib/router.js";
6
6
  import { createFileRoute as o, lazyFn as s, lazyRouteComponent as c } from "@tanstack/react-router";
7
7
  var l = o("/$workspace/knowledge/")({
8
8
  validateSearch: (e) => ({
9
9
  ...typeof e.entry == "string" && { entry: e.entry },
10
10
  ...(e.archived === !0 || e.archived === "true") && { archived: !0 },
11
- ...r.includes(e.kind) && { kind: e.kind }
11
+ ...t.includes(e.kind) && { kind: e.kind }
12
12
  }),
13
- beforeLoad: async ({ context: { queryClient: r }, params: o, search: { entry: s, ...c }, location: l, preload: u }) => {
13
+ beforeLoad: async ({ context: { queryClient: t }, params: o, search: { entry: s, ...c }, location: l, preload: u }) => {
14
14
  if (s) {
15
- let e = (await r.ensureQueryData(n(o.workspace))).find((e) => a(e, s));
16
- throw t({
15
+ let r = (await t.ensureQueryData(e(o.workspace))).find((e) => i(e, s));
16
+ throw a({
17
17
  to: "/$workspace/knowledge/$term",
18
18
  params: {
19
19
  workspace: o.workspace,
20
- term: e ? i(e) : s
20
+ term: r ? n(r) : s
21
21
  },
22
22
  replace: !0
23
23
  });
24
24
  }
25
- let d = e(l.pathname, c, u);
26
- if (d) throw t({
25
+ let d = r(l.pathname, c, u);
26
+ if (d) throw a({
27
27
  to: "/$workspace/knowledge",
28
28
  params: o,
29
29
  search: d,