@parallelworks/tandem-web 0.138.2 → 0.139.1

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 (81) hide show
  1. package/components/AgentWork.js +35 -35
  2. package/components/AppRoot.js +8 -7
  3. package/components/AreaWork.js +1 -1
  4. package/components/BlockHandle.js +3 -3
  5. package/components/CommandPalette.js +27 -27
  6. package/components/DateChip.js +27 -27
  7. package/components/DocLinkPicker.js +17 -17
  8. package/components/Graph.js +6 -6
  9. package/components/HoverCards.js +30 -29
  10. package/components/IssueListBlock.js +83 -83
  11. package/components/LinkCard.js +20 -20
  12. package/components/MentionPicker.js +12 -12
  13. package/components/NewIssueDialog.js +116 -116
  14. package/components/NewProjectDialog.js +5 -4
  15. package/components/Planning.js +31 -43
  16. package/components/RouterLink.js +4 -4
  17. package/components/ShareDialog.js +12 -12
  18. package/components/SharedUI.js +19 -19
  19. package/components/SlashMenu.js +11 -11
  20. package/components/SubPages.js +10 -10
  21. package/components/UnlinkedMentions.js +10 -10
  22. package/components/WorkCounts.js +8 -8
  23. package/components/settings.js +31 -31
  24. package/hostedApp.js +41 -39
  25. package/hosting.d.ts +24 -11
  26. package/index.js +58 -27
  27. package/lib/base.js +1 -14
  28. package/lib/docs.js +6 -6
  29. package/lib/issueMenu.js +33 -33
  30. package/lib/knowledge.js +90 -101
  31. package/lib/knowledgeKinds.js +14 -0
  32. package/lib/pageTitle.js +22 -10
  33. package/lib/projectList.js +1 -1
  34. package/lib/projectStates.js +15 -0
  35. package/lib/router.js +20 -34
  36. package/package.json +2 -2
  37. package/pages/areas.js +223 -223
  38. package/pages/decisions.js +69 -69
  39. package/pages/issues.js +38 -38
  40. package/pages/projects.js +268 -267
  41. package/pages/triage.js +133 -133
  42. package/pages.js +21 -0
  43. package/routes/__root.js +6 -6
  44. package/routes/_workspace/agents/_slug2.js +21 -21
  45. package/routes/_workspace/agents/index2.js +16 -16
  46. package/routes/_workspace/areas/_area2.js +105 -105
  47. package/routes/_workspace/docs/_doc2.js +189 -189
  48. package/routes/_workspace/docs2.js +8 -8
  49. package/routes/_workspace/graph2.js +9 -9
  50. package/routes/_workspace/graph3.js +8 -8
  51. package/routes/_workspace/issues/_identifier2.js +249 -249
  52. package/routes/_workspace/issues/index.js +6 -6
  53. package/routes/_workspace/knowledge/_term2.js +119 -118
  54. package/routes/_workspace/knowledge/index.js +8 -8
  55. package/routes/_workspace/knowledge/index2.js +41 -40
  56. package/routes/_workspace/measures2.js +4 -4
  57. package/routes/_workspace/measures3.js +18 -18
  58. package/routes/_workspace/notifications2.js +112 -112
  59. package/routes/_workspace/people/_username.js +4 -4
  60. package/routes/_workspace/people/_username2.js +36 -36
  61. package/routes/_workspace/projects/_projectId3.js +369 -368
  62. package/routes/_workspace/projects/index.js +7 -7
  63. package/routes/_workspace/settings/account2.js +3 -3
  64. package/routes/_workspace/settings/audit-log2.js +4 -4
  65. package/routes/_workspace/settings/audit-log3.js +51 -51
  66. package/routes/_workspace/settings/labels2.js +14 -14
  67. package/routes/_workspace/settings/members2.js +9 -9
  68. package/routes/_workspace/settings/runners2.js +11 -11
  69. package/routes/_workspace/settings/teams2.js +15 -15
  70. package/routes/_workspace/settings/tokens2.js +5 -5
  71. package/routes/_workspace/settings/webhooks2.js +7 -7
  72. package/routes/_workspace/settings2.js +3 -3
  73. package/routes/_workspace/teams/_key/cycles/_number2.js +16 -16
  74. package/routes/_workspace/teams/_key/cycles/index2.js +40 -40
  75. package/routes/_workspace/teams/_key/issues.js +4 -4
  76. package/routes/_workspace/teams/_key/projects.js +4 -4
  77. package/routes/_workspace/teams/_key/settings2.js +133 -133
  78. package/routes/_workspace2.js +319 -319
  79. package/routes/docs/route2.js +19 -19
  80. package/routes/new2.js +8 -8
  81. package/routes/request2._token.js +4 -4
@@ -2,8 +2,9 @@ import { api as e, unwrap as t } from "../api/client.js";
2
2
  import { useNavigate as n } from "../lib/router.js";
3
3
  import { projectsQuery as r, teamsQuery as ee, workspaceQuery as te } from "../api/queries.js";
4
4
  import { AddIcon as ne, CalendarIcon as re, ChevronRightIcon as ie, CloseIcon as i, PriorityIcon as a, ProjectIcon as ae, UserIcon as o, UsersIcon as s, usePriorityNames as oe } from "./icons.js";
5
- import { useTime as se } from "../lib/time.js";
6
- import { ProjectStatusIcon as c, projectStatuses as ce } from "./Planning.js";
5
+ import { projectStatuses as se } from "../lib/projectStates.js";
6
+ import { useTime as ce } from "../lib/time.js";
7
+ import { ProjectStatusIcon as c } from "./Planning.js";
7
8
  import { usePeople as le } from "../lib/people.js";
8
9
  import { EntityIcon as l } from "./EntityIcon.js";
9
10
  import { projectRef as ue } from "../lib/projects.js";
@@ -18,7 +19,7 @@ import { useQuery as x, useQueryClient as ye } from "@tanstack/react-query";
18
19
  // src/components/NewProjectDialog.tsx
19
20
  var S = h({ size: "sm" });
20
21
  function C({ workspace: h, teamId: C, onClose: w }) {
21
- let T = _("planning"), E = _("common"), be = ve(), xe = se(), D = oe(), Se = ye(), O = n(), { members: k, person: Ce } = le(h), { data: A } = x(te(h)), { data: we = [] } = x(ee(h)), { data: Te = [] } = x(r(h)), j = Te.filter((e) => e.template), [M, Ee] = g(""), [N, De] = g(""), [P, Oe] = g(""), [F, ke] = g(""), [I, Ae] = g(""), [L, je] = g("planned"), [R, Me] = g(0), [z, Ne] = g(""), [B, Pe] = g([]), [V, Fe] = g(C ? [C] : []), [H, Ie] = g(""), [U, Le] = g(""), [W, G] = g([]), [K, q] = g(null), [J, Y] = g(!1), [Re, X] = g(null), Z = we.filter((e) => !e.archivedAt), Q = (e, t, n) => /* @__PURE__ */ y(me, {
22
+ let T = _("planning"), E = _("common"), be = ve(), xe = ce(), D = oe(), Se = ye(), O = n(), { members: k, person: Ce } = le(h), { data: A } = x(te(h)), { data: we = [] } = x(ee(h)), { data: Te = [] } = x(r(h)), j = Te.filter((e) => e.template), [M, Ee] = g(""), [N, De] = g(""), [P, Oe] = g(""), [F, ke] = g(""), [I, Ae] = g(""), [L, je] = g("planned"), [R, Me] = g(0), [z, Ne] = g(""), [B, Pe] = g([]), [V, Fe] = g(C ? [C] : []), [H, Ie] = g(""), [U, Le] = g(""), [W, G] = g([]), [K, q] = g(null), [J, Y] = g(!1), [Re, X] = g(null), Z = we.filter((e) => !e.archivedAt), Q = (e, t, n) => /* @__PURE__ */ y(me, {
22
23
  value: t,
23
24
  onValueChange: n,
24
25
  "aria-label": e,
@@ -161,7 +162,7 @@ function C({ workspace: h, teamId: C, onClose: w }) {
161
162
  "aria-label": T("statusLabel"),
162
163
  value: L,
163
164
  onValueChange: (e) => e && je(e),
164
- items: ce.map((e) => ({
165
+ items: se.map((e) => ({
165
166
  value: e,
166
167
  label: T(`status.${e}`),
167
168
  icon: /* @__PURE__ */ y(c, { status: e })
@@ -4,23 +4,17 @@ import { ProgressBar as o, Tooltip as s } from "@parallelworks/ui";
4
4
  import { useLocale as c, useTranslations as l } from "use-intl";
5
5
  import { jsx as u, jsxs as d } from "react/jsx-runtime";
6
6
  // src/components/Planning.tsx
7
- var f = [
8
- "planned",
9
- "in_progress",
10
- "paused",
11
- "completed",
12
- "canceled"
13
- ], p = {
7
+ var f = {
14
8
  planned: "unstarted",
15
9
  in_progress: "started",
16
10
  paused: "backlog",
17
11
  completed: "completed",
18
12
  canceled: "canceled"
19
13
  };
20
- function m({ status: e }) {
21
- return /* @__PURE__ */ u(n, { category: p[e] });
14
+ function p({ status: e }) {
15
+ return /* @__PURE__ */ u(n, { category: f[e] });
22
16
  }
23
- function h({ progress: e, compact: t = !1 }) {
17
+ function m({ progress: e, compact: t = !1 }) {
24
18
  let n = l("planning"), r = c(), i = e.total;
25
19
  return /* @__PURE__ */ d("div", {
26
20
  className: `flex min-w-0 items-center gap-2 ${t ? "" : "w-full"}`,
@@ -55,14 +49,14 @@ function h({ progress: e, compact: t = !1 }) {
55
49
  })]
56
50
  });
57
51
  }
58
- var g = {
52
+ var h = {
59
53
  1: "XS",
60
54
  2: "S",
61
55
  3: "M",
62
56
  5: "L",
63
57
  8: "XL"
64
58
  };
65
- function _(e) {
59
+ function g(e) {
66
60
  switch (e) {
67
61
  case "fibonacci":
68
62
  case "tshirt": return [
@@ -82,88 +76,82 @@ function _(e) {
82
76
  default: return [];
83
77
  }
84
78
  }
85
- function v() {
79
+ function _() {
86
80
  let e = l("planning");
87
- return (t, n) => n === "tshirt" && g[t] ? g[t] : e("pointCount", { count: t });
81
+ return (t, n) => n === "tshirt" && h[t] ? h[t] : e("pointCount", { count: t });
88
82
  }
89
- function y(e, t) {
90
- return t === "tshirt" && g[e] ? g[e] : String(e);
83
+ function v(e, t) {
84
+ return t === "tshirt" && h[e] ? h[e] : String(e);
91
85
  }
92
- function b(e, t) {
86
+ function y(e, t) {
93
87
  if (t) return "later";
94
88
  let n = i();
95
89
  return e < n ? "overdue" : e <= r(n, 3) ? "soon" : "later";
96
90
  }
97
- var x = {
91
+ var b = {
98
92
  overdue: "text-danger",
99
93
  soon: "text-warning",
100
94
  later: "text-muted-foreground"
101
95
  };
102
- function S({ date: t, closed: n }) {
103
- let r = l("planning"), i = a(), o = b(t, n);
96
+ function x({ date: t, closed: n }) {
97
+ let r = l("planning"), i = a(), o = y(t, n);
104
98
  return /* @__PURE__ */ u(s, {
105
99
  content: r(`due.${o}`, { date: i.day(t) }),
106
100
  describesAnchor: !0,
107
101
  children: /* @__PURE__ */ d("span", {
108
- className: `inline-flex shrink-0 items-center gap-1 text-xs tabular-nums ${x[o]}`,
102
+ className: `inline-flex shrink-0 items-center gap-1 text-xs tabular-nums ${b[o]}`,
109
103
  children: [/* @__PURE__ */ u(e, { className: "size-3" }), o === "later" ? i.day(t) : r(`dueShort.${o}`, { date: i.day(t) })]
110
104
  })
111
105
  });
112
106
  }
113
- var C = 36e5;
114
- function w(e, t, n = Date.now()) {
107
+ var S = 36e5;
108
+ function C(e, t, n = Date.now()) {
115
109
  let r = Date.parse(e) - n;
116
- return r <= 0 ? "breached" : r <= Math.min((t || 24) * C, 96 * C) / 4 ? "risk" : "running";
110
+ return r <= 0 ? "breached" : r <= Math.min((t || 24) * S, 96 * S) / 4 ? "risk" : "running";
117
111
  }
118
- var T = {
112
+ var w = {
119
113
  breached: "text-danger",
120
114
  risk: "text-warning",
121
115
  running: "text-muted-foreground"
122
- }, E = [
116
+ }, T = [
123
117
  "urgent",
124
118
  "high",
125
119
  "medium",
126
120
  "low"
127
121
  ];
128
- function D(e, t) {
129
- let n = E[t - 1];
122
+ function E(e, t) {
123
+ let n = T[t - 1];
130
124
  return n && e ? e.slaHours[n] : 0;
131
125
  }
132
- function O({ issue: e, team: n }) {
126
+ function D({ issue: e, team: n }) {
133
127
  let r = l("planning.sla"), i = a();
134
128
  if (!e.slaDueAt || e.status.category === "completed" || e.status.category === "canceled") return null;
135
- let o = w(e.slaDueAt, D(n, e.priority)), c = (Date.parse(e.slaDueAt) - Date.now()) / 1e3;
129
+ let o = C(e.slaDueAt, E(n, e.priority)), c = (Date.parse(e.slaDueAt) - Date.now()) / 1e3;
136
130
  return /* @__PURE__ */ u(s, {
137
131
  content: r(o === "breached" ? "breachedTip" : "dueTip", { when: i.full(e.slaDueAt) }),
138
132
  describesAnchor: !0,
139
133
  children: /* @__PURE__ */ d("span", {
140
- className: `inline-flex shrink-0 items-center gap-1 text-xs tabular-nums ${T[o]}`,
134
+ className: `inline-flex shrink-0 items-center gap-1 text-xs tabular-nums ${w[o]}`,
141
135
  children: [/* @__PURE__ */ u(t, { className: "size-3" }), o === "breached" ? r("breached", { time: i.duration(-c) }) : r("left", { time: i.duration(c) })]
142
136
  })
143
137
  });
144
138
  }
145
- var k = 6048e5;
146
- function A(e, t = Date.now()) {
139
+ var O = 6048e5;
140
+ function k(e, t = Date.now()) {
147
141
  return e.status === "in_progress" && (!e.healthAt || t - Date.parse(e.healthAt) > 6048e5) ? "missing" : e.status !== "in_progress" && e.status !== "paused" ? "none" : e.health ?? "none";
148
142
  }
149
- var j = [
150
- "on_track",
151
- "at_risk",
152
- "off_track",
153
- "missing",
154
- "none"
155
- ], M = {
143
+ var A = {
156
144
  on_track: "text-success",
157
145
  at_risk: "text-warning",
158
146
  off_track: "text-danger",
159
147
  missing: "text-warning",
160
148
  none: "text-muted-foreground"
161
149
  };
162
- function N({ state: e, className: t = "" }) {
150
+ function j({ state: e, className: t = "" }) {
163
151
  let n = e === "missing" || e === "none";
164
152
  return /* @__PURE__ */ d("svg", {
165
153
  viewBox: "0 0 14 14",
166
- className: `size-3.5 shrink-0 ${M[e]} ${t}`,
154
+ className: `size-3.5 shrink-0 ${A[e]} ${t}`,
167
155
  "aria-hidden": "true",
168
156
  fill: "none",
169
157
  stroke: "currentColor",
@@ -191,4 +179,4 @@ function N({ state: e, className: t = "" }) {
191
179
  ]
192
180
  });
193
181
  }
194
- export { S as DueDate, N as HealthIcon, h as ProgressBar, m as ProjectStatusIcon, O as SlaBadge, b as dueState, y as estimateShort, A as healthOf, j as healthStates, f as projectStatuses, _ as scalePoints, w as slaState, D as slaTarget, k as updateInterval, v as useEstimateLabel };
182
+ export { x as DueDate, j as HealthIcon, m as ProgressBar, p as ProjectStatusIcon, D as SlaBadge, y as dueState, v as estimateShort, k as healthOf, g as scalePoints, C as slaState, E as slaTarget, O as updateInterval, _ as useEstimateLabel };
@@ -1,13 +1,13 @@
1
1
  import { routerPath as e } from "../lib/base.js";
2
2
  import { routesClick as t } from "../lib/routerNav.js";
3
- import { jsx as n } from "react/jsx-runtime";
4
- import { useRouter as r } from "@tanstack/react-router";
3
+ import { useRouter as n } from "@tanstack/react-router";
4
+ import { jsx as r } from "react/jsx-runtime";
5
5
  // src/components/RouterLink.tsx
6
6
  var i = (t) => ({ href: e(t) }), a = ({ href: a, onClick: o, onMouseEnter: s, onFocus: c, ...l }) => {
7
- let u = r(), d = () => {
7
+ let u = n(), d = () => {
8
8
  u.preloadRoute(i(a)).catch(() => {});
9
9
  };
10
- return /* @__PURE__ */ n("a", {
10
+ return /* @__PURE__ */ r("a", {
11
11
  ...l,
12
12
  href: u.buildLocation(i(a)).publicHref,
13
13
  onClick: (n) => {
@@ -1,8 +1,8 @@
1
1
  import { appURL as e } from "../lib/base.js";
2
2
  import { api as t, unwrap as n } from "../api/client.js";
3
3
  import { shareLinksQuery as r } from "../api/queries.js";
4
- import { useTime as i } from "../lib/time.js";
5
- import { openShare as a, useShareTarget as o } from "../lib/share.js";
4
+ import { openShare as i, useShareTarget as a } from "../lib/share.js";
5
+ import { useTime as o } from "../lib/time.js";
6
6
  import { Button as s, CopyButton as c, EmptyState as l, ErrorText as u, Input as d, Modal as f, ModalTitle as p, Select as m, Tooltip as h, useCopy as g } from "@parallelworks/ui";
7
7
  import { useState as _ } from "react";
8
8
  import { useErrorMessage as v } from "@parallelworks/problem/react";
@@ -11,17 +11,17 @@ import { jsx as b, jsxs as x } from "react/jsx-runtime";
11
11
  import { useMutation as S, useQuery as C, useQueryClient as w } from "@tanstack/react-query";
12
12
  // src/components/ShareDialog.tsx
13
13
  function T({ workspace: e }) {
14
- let t = o();
14
+ let t = a();
15
15
  return t ? /* @__PURE__ */ b(E, {
16
16
  workspace: e,
17
17
  target: t,
18
- onClose: () => a(null)
18
+ onClose: () => i(null)
19
19
  }, JSON.stringify(t)) : null;
20
20
  }
21
- function E({ workspace: a, target: o, onClose: T }) {
22
- let E = y("share"), D = v(), O = i(), k = w(), A = "doc" in o ? { doc: o.doc } : { space: o.space }, j = C(r(a, A)), [M, N] = _("organization"), [P, F] = _(""), I = (t) => e(`/sites/${a}/${t}`), [L, R] = _(), { copy: z } = g(), B = () => k.invalidateQueries({ queryKey: r(a, A).queryKey }), V = S({
21
+ function E({ workspace: i, target: a, onClose: T }) {
22
+ let E = y("share"), D = v(), O = o(), k = w(), A = "doc" in a ? { doc: a.doc } : { space: a.space }, j = C(r(i, A)), [M, N] = _("organization"), [P, F] = _(""), I = (t) => e(`/sites/${i}/${t}`), [L, R] = _(), { copy: z } = g(), B = () => k.invalidateQueries({ queryKey: r(i, A).queryKey }), V = S({
23
23
  mutationFn: async () => n(await t.POST("/api/v1/workspaces/{workspace}/share-links", {
24
- params: { path: { workspace: a } },
24
+ params: { path: { workspace: i } },
25
25
  body: {
26
26
  ...A,
27
27
  audience: M,
@@ -34,7 +34,7 @@ function E({ workspace: a, target: o, onClose: T }) {
34
34
  onSettled: B
35
35
  }), H = S({
36
36
  mutationFn: async (e) => n(await t.DELETE("/api/v1/workspaces/{workspace}/share-links/{link}", { params: { path: {
37
- workspace: a,
37
+ workspace: i,
38
38
  link: e
39
39
  } } })),
40
40
  onSettled: B
@@ -54,11 +54,11 @@ function E({ workspace: a, target: o, onClose: T }) {
54
54
  children: [
55
55
  /* @__PURE__ */ b(p, {
56
56
  className: "text-sm font-semibold",
57
- children: E("doc" in o ? "titleDoc" : "titleSpace", { title: o.title })
57
+ children: E("doc" in a ? "titleDoc" : "titleSpace", { title: a.title })
58
58
  }),
59
59
  /* @__PURE__ */ b("p", {
60
60
  className: "mt-1 text-sm text-muted-foreground",
61
- children: E("doc" in o ? "descriptionDoc" : "descriptionSpace")
61
+ children: E("doc" in a ? "descriptionDoc" : "descriptionSpace")
62
62
  }),
63
63
  /* @__PURE__ */ x("div", {
64
64
  className: "mt-4 flex items-center gap-2",
@@ -88,7 +88,7 @@ function E({ workspace: a, target: o, onClose: T }) {
88
88
  className: "mt-1 flex items-center gap-2",
89
89
  children: [/* @__PURE__ */ b("span", {
90
90
  className: "shrink-0 font-mono text-xs text-muted-foreground",
91
- children: `/sites/${a}/`
91
+ children: `/sites/${i}/`
92
92
  }), /* @__PURE__ */ b("input", {
93
93
  value: P,
94
94
  onChange: (e) => F(e.target.value.toLowerCase()),
@@ -157,7 +157,7 @@ function E({ workspace: a, target: o, onClose: T }) {
157
157
  type: "button",
158
158
  onClick: () => z(I(e.site ?? ""), { label: E("linkNoun") }),
159
159
  className: "block max-w-full truncate font-mono text-xs text-primary hover:underline",
160
- children: `/sites/${a}/${e.site}`
160
+ children: `/sites/${i}/${e.site}`
161
161
  })
162
162
  }),
163
163
  /* @__PURE__ */ b("span", {
@@ -3,10 +3,10 @@ import { datePresetText as n } from "../lib/datePreset.js";
3
3
  import { goTo as r } from "../lib/routerNav.js";
4
4
  import { RouterLink as i } from "./RouterLink.js";
5
5
  import { UIProvider as a } from "@parallelworks/ui";
6
- import { useMemo as o } from "react";
7
- import { useFormatter as s, useLocale as c, useTranslations as l } from "use-intl";
8
- import { jsx as u } from "react/jsx-runtime";
9
- import { useRouter as d } from "@tanstack/react-router";
6
+ import { useRouter as o } from "@tanstack/react-router";
7
+ import { useMemo as s } from "react";
8
+ import { useFormatter as c, useLocale as l, useTranslations as u } from "use-intl";
9
+ import { jsx as d } from "react/jsx-runtime";
10
10
  // src/components/SharedUI.tsx
11
11
  var f = { link: i }, p = Object.keys({
12
12
  notFound: !0,
@@ -17,7 +17,7 @@ var f = { link: i }, p = Object.keys({
17
17
  network: !0
18
18
  });
19
19
  function m({ children: n }) {
20
- let i = d(), s = o(() => ({
20
+ let i = o(), c = s(() => ({
21
21
  goTo: (n) => r({
22
22
  navigate: ({ href: e }) => i.navigate({ href: t(e) }),
23
23
  assign: (e) => window.location.assign(e),
@@ -26,10 +26,10 @@ function m({ children: n }) {
26
26
  }, n),
27
27
  goBack: () => i.history.back(),
28
28
  canGoBack: () => i.history.canGoBack()
29
- }), [i]), l = h(), p = c();
30
- return /* @__PURE__ */ u(a, {
31
- strings: l,
32
- navigation: s,
29
+ }), [i]), u = h(), p = l();
30
+ return /* @__PURE__ */ d(a, {
31
+ strings: u,
32
+ navigation: c,
33
33
  slots: f,
34
34
  locale: p,
35
35
  avatarColoring: "kind",
@@ -37,9 +37,9 @@ function m({ children: n }) {
37
37
  });
38
38
  }
39
39
  function h() {
40
- let e = c(), t = l("common"), r = l("uiStrings"), i = l("errors"), a = s(), u = g();
41
- return o(() => {
42
- let o = (e) => a.dateTime(e, e.getFullYear() === (/* @__PURE__ */ new Date()).getFullYear() ? {
40
+ let e = l(), t = u("common"), r = u("uiStrings"), i = u("errors"), a = c(), o = g();
41
+ return s(() => {
42
+ let s = (e) => a.dateTime(e, e.getFullYear() === (/* @__PURE__ */ new Date()).getFullYear() ? {
43
43
  month: "short",
44
44
  day: "numeric"
45
45
  } : { dateStyle: "medium" });
@@ -209,7 +209,7 @@ function h() {
209
209
  days: (e) => r("time.days", { n: e }),
210
210
  years: (e) => r("time.years", { n: e }),
211
211
  inFuture: (e) => r("time.inFuture", { label: e }),
212
- date: o
212
+ date: s
213
213
  },
214
214
  keys: {
215
215
  ctrl: r("keys.ctrl"),
@@ -324,7 +324,7 @@ function h() {
324
324
  from: e,
325
325
  to: t
326
326
  }),
327
- formatDate: o,
327
+ formatDate: s,
328
328
  textPlaceholder: r("filters.textPlaceholder"),
329
329
  yes: r("filters.yes"),
330
330
  no: r("filters.no")
@@ -337,7 +337,7 @@ function h() {
337
337
  titles: Object.fromEntries(p.map((e) => [e, i(`${e}.title`)])),
338
338
  descriptions: Object.fromEntries(p.map((e) => [e, i(`${e}.description`)]))
339
339
  },
340
- access: u
340
+ access: o
341
341
  };
342
342
  }, [
343
343
  e,
@@ -345,12 +345,12 @@ function h() {
345
345
  r,
346
346
  i,
347
347
  a,
348
- u
348
+ o
349
349
  ]);
350
350
  }
351
351
  function g() {
352
- let e = l("uiStrings.access"), t = s();
353
- return o(() => {
352
+ let e = u("uiStrings.access"), t = c();
353
+ return s(() => {
354
354
  let n = (e) => t.list(e, { type: "conjunction" }), r = (e) => t.list(e, {
355
355
  type: "unit",
356
356
  style: "short"
@@ -495,7 +495,7 @@ function g() {
495
495
  grantSummary: (t, r) => e.rich("grantSummary", {
496
496
  roles: n(r),
497
497
  principals: n(t),
498
- strong: (e) => /* @__PURE__ */ u("strong", {
498
+ strong: (e) => /* @__PURE__ */ d("strong", {
499
499
  className: "font-medium text-foreground",
500
500
  children: e
501
501
  })
@@ -9,10 +9,10 @@ import { isoDate as l } from "../lib/datePhrases.js";
9
9
  import { useEditorListbox as u } from "./editorListbox.js";
10
10
  import { insertLinkCard as d } from "./LinkCard.js";
11
11
  import { ListboxOption as f, ListboxPanel as p, useListboxNavigation as m } from "@parallelworks/ui";
12
- import { useEffect as h, useMemo as g, useRef as _, useState as v } from "react";
13
- import { useTranslations as y } from "use-intl";
14
- import { jsx as b } from "react/jsx-runtime";
15
- import { useParams as x } from "@tanstack/react-router";
12
+ import { useParams as h } from "@tanstack/react-router";
13
+ import { useEffect as g, useMemo as _, useRef as v, useState as y } from "react";
14
+ import { useTranslations as b } from "use-intl";
15
+ import { jsx as x } from "react/jsx-runtime";
16
16
  import { useQueryClient as S } from "@tanstack/react-query";
17
17
  // src/components/SlashMenu.tsx
18
18
  function C(e) {
@@ -133,7 +133,7 @@ function O(e) {
133
133
  }), t.click();
134
134
  }
135
135
  function k({ editor: c, onFiles: l }) {
136
- let k = y("slashMenu"), [A, j] = v(null), M = o(), N = !!l?.current && M, { workspace: P, doc: F } = x({ strict: !1 }), I = !!P && !!F, L = S(), R = n(), z = y("docs"), B = async (n) => {
136
+ let k = b("slashMenu"), [A, j] = y(null), M = o(), N = !!l?.current && M, { workspace: P, doc: F } = h({ strict: !1 }), I = !!P && !!F, L = S(), R = n(), z = b("docs"), B = async (n) => {
137
137
  if (!c || !P || !F) return;
138
138
  let o = await L.fetchQuery(r(P, F)), s = t(await e.POST("/api/v1/workspaces/{workspace}/docs", {
139
139
  params: { path: { workspace: P } },
@@ -164,7 +164,7 @@ function k({ editor: c, onFiles: l }) {
164
164
  },
165
165
  search: { rename: !0 }
166
166
  });
167
- }, V = g(() => {
167
+ }, V = _(() => {
168
168
  let e = (A?.query ?? "").trim().toLowerCase(), t = A?.inTable ? [...E, ...D.filter((e) => e !== "table")] : D, n = (t) => k(`${t}.label`).toLowerCase().includes(e), r = t.filter((e) => e !== "file" || N).filter((e) => e !== "page" && e !== "subPages" || I).filter((t) => !e || n(t) || k(`${t}.keywords`).toLowerCase().includes(e));
169
169
  return e ? [...r.filter(n), ...r.filter((e) => !n(e))] : r;
170
170
  }, [
@@ -174,7 +174,7 @@ function k({ editor: c, onFiles: l }) {
174
174
  N,
175
175
  I
176
176
  ]);
177
- h(() => {
177
+ g(() => {
178
178
  if (!c) return;
179
179
  let e = () => {
180
180
  j(c.isEditable && c.isFocused ? C(c) : null), W.current(0);
@@ -198,8 +198,8 @@ function k({ editor: c, onFiles: l }) {
198
198
  onChoose: (e) => H(e),
199
199
  onDismiss: () => j(null),
200
200
  open: !!A
201
- }), W = _(U.setActive);
202
- return W.current = U.setActive, u(c, U, !!A && V.length > 0), !A || V.length === 0 ? null : /* @__PURE__ */ b(p, {
201
+ }), W = v(U.setActive);
202
+ return W.current = U.setActive, u(c, U, !!A && V.length > 0), !A || V.length === 0 ? null : /* @__PURE__ */ x(p, {
203
203
  at: {
204
204
  clientX: A.x,
205
205
  clientY: A.y
@@ -209,9 +209,9 @@ function k({ editor: c, onFiles: l }) {
209
209
  "aria-label": k("label"),
210
210
  footer: k("footer"),
211
211
  className: "w-64 text-sm",
212
- children: V.map((e, t) => /* @__PURE__ */ b(f, {
212
+ children: V.map((e, t) => /* @__PURE__ */ x(f, {
213
213
  option: U.optionProps(t),
214
- icon: /* @__PURE__ */ b("span", {
214
+ icon: /* @__PURE__ */ x("span", {
215
215
  "aria-hidden": !0,
216
216
  className: "flex size-7 shrink-0 items-center justify-center rounded-md border border-border bg-background font-mono text-[11px] text-muted-foreground",
217
217
  children: w[e]
@@ -2,9 +2,9 @@ import { Link as e } from "../lib/router.js";
2
2
  import { docQuery as t, docsQuery as n } from "../api/queries.js";
3
3
  import { docRef as r } from "../lib/docs.js";
4
4
  import { DocIcon as i } from "./DocIcon.js";
5
- import { useTranslations as a } from "use-intl";
6
- import { jsx as o, jsxs as s } from "react/jsx-runtime";
7
- import { useParams as c } from "@tanstack/react-router";
5
+ import { useParams as a } from "@tanstack/react-router";
6
+ import { useTranslations as o } from "use-intl";
7
+ import { jsx as s, jsxs as c } from "react/jsx-runtime";
8
8
  import { useQuery as l } from "@tanstack/react-query";
9
9
  import { Node as u, NodeViewWrapper as d, ReactNodeViewRenderer as f, mergeAttributes as p } from "@tiptap/react";
10
10
  // src/components/SubPages.tsx
@@ -34,34 +34,34 @@ var m = /^:::subpages[ \t]*\n[ \t]*:::[ \t]*(?:\n|$)/, h = u.create({
34
34
  renderMarkdown: () => ":::subpages\n:::"
35
35
  });
36
36
  function g() {
37
- let u = a("docs"), { workspace: f = "", doc: p = "" } = c({ strict: !1 }), { data: m } = l({
37
+ let u = o("docs"), { workspace: f = "", doc: p = "" } = a({ strict: !1 }), { data: m } = l({
38
38
  ...t(f, p),
39
39
  enabled: !!f && !!p
40
40
  }), { data: h = [] } = l({
41
41
  ...n(f, { parent: m?.key ?? "" }),
42
42
  enabled: !!f && !!m
43
43
  });
44
- return /* @__PURE__ */ s(d, {
44
+ return /* @__PURE__ */ c(d, {
45
45
  className: "sub-pages",
46
46
  contentEditable: !1,
47
47
  "data-drag-handle": !0,
48
- children: [/* @__PURE__ */ o("p", {
48
+ children: [/* @__PURE__ */ s("p", {
49
49
  className: "sub-pages-title",
50
50
  children: u("subPages")
51
- }), h.length === 0 ? /* @__PURE__ */ o("p", {
51
+ }), h.length === 0 ? /* @__PURE__ */ s("p", {
52
52
  className: "sub-pages-empty",
53
53
  children: u("noSubPages")
54
- }) : /* @__PURE__ */ o("ul", { children: h.map((t) => /* @__PURE__ */ o("li", { children: /* @__PURE__ */ s(e, {
54
+ }) : /* @__PURE__ */ s("ul", { children: h.map((t) => /* @__PURE__ */ s("li", { children: /* @__PURE__ */ c(e, {
55
55
  to: "/$workspace/docs/$doc",
56
56
  params: {
57
57
  workspace: f,
58
58
  doc: r(t)
59
59
  },
60
60
  className: "sub-pages-link",
61
- children: [/* @__PURE__ */ o(i, {
61
+ children: [/* @__PURE__ */ s(i, {
62
62
  icon: t.icon,
63
63
  className: "size-4"
64
- }), /* @__PURE__ */ o("span", {
64
+ }), /* @__PURE__ */ s("span", {
65
65
  className: "truncate",
66
66
  children: t.title
67
67
  })]
@@ -1,9 +1,9 @@
1
1
  import { appURL as e } from "../lib/base.js";
2
2
  import { docsQuery as t, knowledgeQuery as n } from "../api/queries.js";
3
3
  import { FileTextIcon as r, LibraryIcon as i } from "./icons.js";
4
- import { docForms as a, formsOf as o } from "../lib/glossary.js";
5
- import { entryPath as s, termRef as c } from "../lib/knowledge.js";
6
- import { docKey as l, docURL as u } from "../lib/docs.js";
4
+ import { entryPath as a, termRef as o } from "../lib/knowledgeKinds.js";
5
+ import { docKey as s, docURL as c } from "../lib/docs.js";
6
+ import { docForms as l, formsOf as u } from "../lib/glossary.js";
7
7
  import { linksIn as d, unlinkedMentions as f } from "./editorPlugins.js";
8
8
  import { Button as p } from "@parallelworks/ui";
9
9
  import { useEffect as m, useMemo as h, useState as g } from "react";
@@ -20,7 +20,7 @@ function x(r, i, p) {
20
20
  p.off("update", e);
21
21
  };
22
22
  }, [p]);
23
- let S = h(() => _.filter((e) => e.status !== "superseded"), [_]), C = h(() => [...o(S), ...a(v, i.key)].sort((e, t) => t.text.length - e.text.length), [
23
+ let S = h(() => _.filter((e) => e.status !== "superseded"), [_]), C = h(() => [...u(S), ...l(v, i.key)].sort((e, t) => t.text.length - e.text.length), [
24
24
  S,
25
25
  v,
26
26
  i.key
@@ -30,7 +30,7 @@ function x(r, i, p) {
30
30
  let t = [...d(p.state.doc)], n = new Map(v.map((e) => [e.key, e])), i = new Map(S.map((e) => [e.id, e]));
31
31
  return f(p.state.doc, C, (e) => e.startsWith("doc:") ? t.some((t) => {
32
32
  let n = t.split(/[?#]/)[0] ?? "";
33
- return n.includes("/docs/") && l(n.split("/").pop() ?? "") === e.slice(4);
33
+ return n.includes("/docs/") && s(n.split("/").pop() ?? "") === e.slice(4);
34
34
  }) : t.some((t) => {
35
35
  let n = i.get(e), r = (t.split(/[?#]/)[0] ?? "").split("/knowledge/")[1];
36
36
  return t.includes(`entry=${e}`) || !!r && (r === e || r === n?.slug);
@@ -41,15 +41,15 @@ function x(r, i, p) {
41
41
  ...t,
42
42
  target: e.title,
43
43
  kind: "doc",
44
- href: u(r, e)
44
+ href: c(r, e)
45
45
  }] : [];
46
46
  }
47
- let a = i.get(t.id);
48
- return a ? [{
47
+ let s = i.get(t.id);
48
+ return s ? [{
49
49
  ...t,
50
- target: a.name,
50
+ target: s.name,
51
51
  kind: "term",
52
- href: e(s(r, c(a)))
52
+ href: e(a(r, o(s)))
53
53
  }] : [];
54
54
  });
55
55
  }, [
@@ -1,13 +1,13 @@
1
1
  import { Link as e } from "../lib/router.js";
2
2
  import { teamsQuery as t } from "../api/queries.js";
3
3
  import { Tooltip as n } from "@parallelworks/ui";
4
- import { useTranslations as r } from "use-intl";
5
- import { jsx as i } from "react/jsx-runtime";
6
- import { useParams as a } from "@tanstack/react-router";
4
+ import { useParams as r } from "@tanstack/react-router";
5
+ import { useTranslations as i } from "use-intl";
6
+ import { jsx as a } from "react/jsx-runtime";
7
7
  import { useQuery as o } from "@tanstack/react-query";
8
8
  // src/components/WorkCounts.tsx
9
9
  function s({ counts: s, teamId: c, className: l = "" }) {
10
- let u = r("workCounts"), { workspace: d = "" } = a({ strict: !1 }), { data: f = [] } = o({
10
+ let u = i("workCounts"), { workspace: d = "" } = r({ strict: !1 }), { data: f = [] } = o({
11
11
  ...t(d),
12
12
  enabled: !!d
13
13
  });
@@ -44,18 +44,18 @@ function s({ counts: s, teamId: c, className: l = "" }) {
44
44
  ].filter((e) => e !== !1);
45
45
  if (h.length === 0) return null;
46
46
  let g = "rounded border px-1.5 py-0.5 text-[11px] leading-none";
47
- return /* @__PURE__ */ i("span", {
47
+ return /* @__PURE__ */ a("span", {
48
48
  className: `flex shrink-0 items-center gap-1 ${l}`,
49
- children: h.map((t) => /* @__PURE__ */ i(n, {
49
+ children: h.map((t) => /* @__PURE__ */ a(n, {
50
50
  content: t.hint,
51
51
  describesAnchor: !0,
52
- children: "to" in t && t.to && d ? /* @__PURE__ */ i(e, {
52
+ children: "to" in t && t.to && d ? /* @__PURE__ */ a(e, {
53
53
  to: t.to,
54
54
  params: { workspace: d },
55
55
  search: p ? { team: p } : {},
56
56
  className: `${g} ${t.tone} hover:border-primary hover:text-foreground`,
57
57
  children: t.label
58
- }) : /* @__PURE__ */ i("span", {
58
+ }) : /* @__PURE__ */ a("span", {
59
59
  className: `${g} ${t.tone}`,
60
60
  children: t.label
61
61
  })