@parallelworks/tandem-web 0.150.2 → 0.151.0

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 (110) hide show
  1. package/_virtual/_virtual_i18n/en/common.js +32 -3
  2. package/_virtual/_virtual_i18n/es/common.js +32 -3
  3. package/_virtual/_virtual_i18n/ja/common.js +32 -3
  4. package/_virtual/_virtual_i18n/ko/common.js +32 -3
  5. package/_virtual/_virtual_i18n/zh/common.js +32 -3
  6. package/api/queries.js +88 -77
  7. package/components/AccessGrants.js +6 -6
  8. package/components/ActivityTimeline.js +4 -4
  9. package/components/AgentWork.js +111 -111
  10. package/components/AreaLink.js +32 -0
  11. package/components/AreaTiles.js +10 -13
  12. package/components/AreaWork.js +25 -1
  13. package/components/BugRotation.js +3 -3
  14. package/components/CodeHostSettings.js +30 -30
  15. package/components/CommandPalette.js +53 -53
  16. package/components/CustomFields.js +116 -116
  17. package/components/DateChip.js +11 -11
  18. package/components/DocButton.js +6 -6
  19. package/components/DocHistory.js +4 -4
  20. package/components/DocLinkPicker.js +8 -8
  21. package/components/DocProperties.js +15 -15
  22. package/components/DocTable.js +15 -15
  23. package/components/DocsTree.js +80 -80
  24. package/components/Editor.js +35 -35
  25. package/components/FavoritesNav.js +53 -53
  26. package/components/GitHub.js +18 -18
  27. package/components/Graph.js +15 -15
  28. package/components/HostActions.js +21 -21
  29. package/components/HostPanel.js +6 -6
  30. package/components/HoverCards.js +38 -38
  31. package/components/IssueBoard.js +4 -4
  32. package/components/IssueCode.js +14 -14
  33. package/components/IssueEvent.js +3 -3
  34. package/components/IssueFilters.js +71 -71
  35. package/components/IssueListBlock.js +32 -32
  36. package/components/IssueRow.js +21 -21
  37. package/components/IssueTemplates.js +118 -118
  38. package/components/IssueTypes.js +40 -40
  39. package/components/NewIssueDialog.js +76 -76
  40. package/components/NewProjectDialog.js +145 -145
  41. package/components/PersonActivity.js +4 -4
  42. package/components/SharedViewer.js +5 -5
  43. package/components/SlashMenu.js +29 -29
  44. package/components/TeamRepositories.js +51 -51
  45. package/components/TeamWorkflow.js +6 -6
  46. package/components/UnlinkedMentions.js +20 -20
  47. package/components/Updates.js +3 -3
  48. package/components/Widgets.js +20 -20
  49. package/components/columns.js +17 -17
  50. package/components/editorPlugins.js +80 -80
  51. package/components/mathDiagrams.js +17 -17
  52. package/lib/boardMove.js +5 -5
  53. package/lib/issueList.js +58 -58
  54. package/lib/issueMenu.js +27 -27
  55. package/lib/knowledge.js +106 -106
  56. package/lib/views.js +9 -9
  57. package/package.json +2 -2
  58. package/pages/area.js +291 -0
  59. package/pages/areas.js +258 -287
  60. package/pages/decisions.js +21 -21
  61. package/pages/issues.js +52 -52
  62. package/pages/projects.js +125 -125
  63. package/pages/triage.js +12 -12
  64. package/routeTree.gen.js +186 -180
  65. package/routes/_workspace/agents/_slug2.js +11 -11
  66. package/routes/_workspace/agents/index2.js +10 -10
  67. package/routes/_workspace/areas/_area.js +7 -8
  68. package/routes/_workspace/areas/_area2.js +3 -290
  69. package/routes/_workspace/areas/_area3.js +7 -8
  70. package/routes/_workspace/docs/_doc2.js +230 -230
  71. package/routes/_workspace/docs/space2._space.js +27 -27
  72. package/routes/_workspace/issues/_identifier2.js +222 -224
  73. package/routes/_workspace/knowledge/_term2.js +43 -43
  74. package/routes/_workspace/knowledge/index.js +6 -6
  75. package/routes/_workspace/knowledge/index2.js +15 -15
  76. package/routes/_workspace/measures3.js +70 -72
  77. package/routes/_workspace/notifications2.js +150 -150
  78. package/routes/_workspace/people/_username2.js +10 -10
  79. package/routes/_workspace/projects/_projectId3.js +276 -276
  80. package/routes/_workspace/settings/audit-log3.js +136 -138
  81. package/routes/_workspace/settings/fields2.js +11 -11
  82. package/routes/_workspace/settings/github2.js +6 -6
  83. package/routes/_workspace/settings/groups2.js +26 -26
  84. package/routes/_workspace/settings/import2.js +398 -147
  85. package/routes/_workspace/settings/import3.js +7 -3
  86. package/routes/_workspace/settings/index2.js +6 -6
  87. package/routes/_workspace/settings/labels2.js +21 -21
  88. package/routes/_workspace/settings/members2.js +27 -27
  89. package/routes/_workspace/settings/notifications2.js +8 -8
  90. package/routes/_workspace/settings/parallelworks2.js +32 -32
  91. package/routes/_workspace/settings/roles2.js +24 -24
  92. package/routes/_workspace/settings/runners2.js +15 -15
  93. package/routes/_workspace/settings/sessions2.js +17 -17
  94. package/routes/_workspace/settings/slack2.js +7 -7
  95. package/routes/_workspace/settings/sso2.js +31 -31
  96. package/routes/_workspace/settings/teams2.js +25 -25
  97. package/routes/_workspace/settings/tokens2.js +12 -12
  98. package/routes/_workspace/settings/webhooks2.js +13 -13
  99. package/routes/_workspace/teams/_key/areas/_area.js +8 -0
  100. package/routes/_workspace/teams/_key/areas/_area2.js +4 -0
  101. package/routes/_workspace/teams/_key/areas/_area3.js +9 -0
  102. package/routes/_workspace/teams/_key/areas/index.js +6 -0
  103. package/routes/_workspace/teams/_key/areas/index2.js +4 -0
  104. package/routes/_workspace/teams/_key/{areas3.js → areas/index3.js} +2 -2
  105. package/routes/_workspace/teams/_key/cycles/_number2.js +27 -27
  106. package/routes/_workspace/teams/_key/cycles/index2.js +24 -24
  107. package/routes/_workspace/teams/_key/settings2.js +29 -29
  108. package/routes/_workspace2.js +368 -368
  109. package/routes/_workspace/teams/_key/areas.js +0 -6
  110. package/routes/_workspace/teams/_key/areas2.js +0 -4
@@ -1,19 +1,19 @@
1
1
  import { usePageTitle as e } from "../../../lib/pageTitle.js";
2
2
  import { Link as t, useNavigate as n } from "../../../lib/router.js";
3
3
  import { areasQuery as r, knowledgeEntryQuery as i, knowledgeEventsQuery as a, knowledgeMentionsQuery as o, knowledgeQuery as s } from "../../../api/queries.js";
4
- import { FileTextIcon as c, LibraryIcon as l, StatusIcon as u } from "../../../components/icons.js";
5
- import { termRef as d } from "../../../lib/knowledgeKinds.js";
6
- import { Route as f } from "./_term.js";
7
- import { docRef as p } from "../../../lib/docs.js";
8
- import { headingAnchor as m } from "../../../lib/glossary.js";
9
- import { useTime as h } from "../../../lib/time.js";
10
- import { usePeople as g } from "../../../lib/people.js";
11
- import { useCan as ee } from "../../../lib/roles.js";
12
- import { EntryDialog as te, useKnowledgeActions as _, useKnowledgeMenu as v } from "../../../lib/knowledge.js";
13
- import { uploadKnowledgeAttachment as y } from "../../../lib/attachments.js";
14
- import { KnowledgeStatus as b } from "../../../components/HoverCards.js";
15
- import { AttachButton as x, UploadStatus as S, useFileUpload as C } from "../../../components/Attachments.js";
16
- import { Editor as w } from "../../../components/Editor.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 { Route as C } from "./_term.js";
16
+ import { KnowledgeStatus as w } from "../../../components/HoverCards.js";
17
17
  import { Timeline as T, TimelineItem as E, activityIcon as D } from "../../../components/ActivityTimeline.js";
18
18
  import { Button as O, ErrorText as k, PageHeader as A, Section as j, TitleInput 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";
@@ -24,9 +24,9 @@ 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 } = f.useParams(), o = B("knowledge"), c = B("common"), u = n(), p = N(), m = z(), { data: h } = G(i(r, a)), { data: g } = G(s(r)), b = _(r), T = ee(r, "edit_docs"), E = T && !h.archivedAt, [D, j] = R(null), W = F((e) => j(e), []), q = v(r, W), X = L(null), Z = C((e) => y(r, h.id, e));
27
+ let { workspace: r, term: a } = C.useParams(), o = B("knowledge"), c = B("common"), l = n(), d = N(), f = z(), { data: h } = G(i(r, a)), { data: g } = G(s(r)), w = 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
28
  e(h.name);
29
- let Q = I(() => g.filter((e) => e.supersededBy === h.id), [g, h.id]), $ = (e) => b.update.mutate({
29
+ let Q = I(() => g.filter((e) => e.supersededBy === h.id), [g, h.id]), $ = (e) => w.update.mutate({
30
30
  id: h.id,
31
31
  ...e,
32
32
  ifVersion: h.version
@@ -41,14 +41,14 @@ function q() {
41
41
  href: `/${r}/knowledge`
42
42
  }, {
43
43
  label: h.name,
44
- icon: /* @__PURE__ */ H(l, { className: "size-4 text-muted-foreground" })
44
+ icon: /* @__PURE__ */ H(u, { className: "size-4 text-muted-foreground" })
45
45
  }],
46
46
  titleActions: /* @__PURE__ */ H(K, {
47
47
  items: () => q(h),
48
48
  label: c("moreActionsFor", { name: h.name }),
49
49
  visible: !0
50
50
  }),
51
- actions: /* @__PURE__ */ U(V, { children: [b.update.isPending && /* @__PURE__ */ H("span", {
51
+ actions: /* @__PURE__ */ U(V, { children: [w.update.isPending && /* @__PURE__ */ H("span", {
52
52
  className: "text-xs text-muted-foreground",
53
53
  role: "status",
54
54
  children: c("saving")
@@ -67,7 +67,7 @@ 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") || p(e, q(h));
70
+ e.target instanceof Element && e.target.closest("textarea, .ProseMirror") || d(e, q(h));
71
71
  },
72
72
  children: [
73
73
  h.archivedAt && /* @__PURE__ */ U("div", {
@@ -78,7 +78,7 @@ function q() {
78
78
  }), T && /* @__PURE__ */ H(O, {
79
79
  type: "button",
80
80
  size: "sm",
81
- onClick: () => b.restore.mutate(h.id),
81
+ onClick: () => w.restore.mutate(h.id),
82
82
  children: o("restore")
83
83
  })]
84
84
  }),
@@ -118,7 +118,7 @@ function q() {
118
118
  to: "/$workspace/knowledge/$term",
119
119
  params: {
120
120
  workspace: r,
121
- term: d(g.find((e) => e.id === h.supersededBy) ?? { id: h.supersededBy })
121
+ term: p(g.find((e) => e.id === h.supersededBy) ?? { id: h.supersededBy })
122
122
  },
123
123
  className: "block text-primary hover:underline",
124
124
  children: o("supersededBy", { name: h.supersededByName ?? "" })
@@ -126,7 +126,7 @@ function q() {
126
126
  to: "/$workspace/knowledge/$term",
127
127
  params: {
128
128
  workspace: r,
129
- term: d(e)
129
+ term: p(e)
130
130
  },
131
131
  className: "block text-muted-foreground hover:text-foreground",
132
132
  children: o("replaces", { name: e.name })
@@ -136,7 +136,7 @@ function q() {
136
136
  "aria-label": o("page"),
137
137
  className: "mt-8 border-t border-border pt-6",
138
138
  children: [
139
- E || h.body ? /* @__PURE__ */ H(w, {
139
+ E || h.body ? /* @__PURE__ */ H(S, {
140
140
  value: h.body ?? "",
141
141
  editable: E,
142
142
  placeholder: o("pagePlaceholder"),
@@ -154,23 +154,23 @@ function q() {
154
154
  E && /* @__PURE__ */ U("div", {
155
155
  className: "mt-3 flex items-center gap-2",
156
156
  children: [
157
- /* @__PURE__ */ H(x, { onFiles: (e) => Z.upload(X.current, e) }),
157
+ /* @__PURE__ */ H(y, { onFiles: (e) => Z.upload(X.current, e) }),
158
158
  /* @__PURE__ */ H("span", {
159
159
  className: "text-xs text-muted-foreground",
160
160
  children: o("attachHint")
161
161
  }),
162
162
  /* @__PURE__ */ H("span", {
163
163
  className: "ml-auto",
164
- children: /* @__PURE__ */ H(S, {
164
+ children: /* @__PURE__ */ H(b, {
165
165
  pending: Z.pending,
166
166
  error: Z.error
167
167
  })
168
168
  })
169
169
  ]
170
170
  }),
171
- b.update.isError && /* @__PURE__ */ H(k, {
171
+ w.update.isError && /* @__PURE__ */ H(k, {
172
172
  className: "mt-2",
173
- children: m(b.update.error)
173
+ children: f(w.update.error)
174
174
  })
175
175
  ]
176
176
  }),
@@ -185,15 +185,15 @@ function q() {
185
185
  ]
186
186
  })
187
187
  }),
188
- D && /* @__PURE__ */ H(P, { children: /* @__PURE__ */ H(te, {
188
+ D && /* @__PURE__ */ H(P, { children: /* @__PURE__ */ H(ee, {
189
189
  workspace: r,
190
190
  mode: D,
191
191
  onClose: () => j(null),
192
- onSaved: (e) => u({
192
+ onSaved: (e) => l({
193
193
  to: "/$workspace/knowledge/$term",
194
194
  params: {
195
195
  workspace: r,
196
- term: d(e)
196
+ term: p(e)
197
197
  },
198
198
  replace: e.id === h.id
199
199
  })
@@ -202,9 +202,9 @@ function q() {
202
202
  });
203
203
  }
204
204
  function J({ workspace: e, entry: n }) {
205
- let i = B("knowledge"), { actorName: a } = g(e), o = h(), { data: s = [] } = W(r(e)), l = s.find((e) => e.id === n.areaId), u = n.source.doc, d = [
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
206
  ...n.kind === "term" ? [] : [i(`kind.${n.kind}`)],
207
- ...l ? [l.title] : [],
207
+ ...u ? [u.title] : [],
208
208
  i("writtenBy", { name: a(n.creator) }),
209
209
  /* @__PURE__ */ H("time", {
210
210
  dateTime: n.updatedAt,
@@ -216,28 +216,28 @@ function J({ workspace: e, entry: n }) {
216
216
  className: "space-y-1 text-xs text-muted-foreground",
217
217
  children: [/* @__PURE__ */ U("p", {
218
218
  className: "flex flex-wrap items-center gap-x-1.5 gap-y-1",
219
- children: [(n.kind !== "term" || n.status === "superseded") && /* @__PURE__ */ H(b, { status: n.status }), d.map((e, t) => /* @__PURE__ */ U("span", {
219
+ children: [(n.kind !== "term" || n.status === "superseded") && /* @__PURE__ */ H(w, { status: n.status }), p.map((e, t) => /* @__PURE__ */ U("span", {
220
220
  className: "inline-flex items-center gap-1.5",
221
221
  children: [t > 0 && /* @__PURE__ */ H("span", {
222
222
  "aria-hidden": "true",
223
223
  children: "·"
224
224
  }), e]
225
225
  }, t))]
226
- }), (u || n.source.identifier) && /* @__PURE__ */ U("p", {
226
+ }), (d || n.source.identifier) && /* @__PURE__ */ U("p", {
227
227
  className: "flex flex-wrap items-center gap-x-3 gap-y-1",
228
228
  children: [
229
- u && /* @__PURE__ */ U(t, {
229
+ d && /* @__PURE__ */ U(t, {
230
230
  to: "/$workspace/docs/$doc",
231
231
  params: {
232
232
  workspace: e,
233
- doc: p(u)
233
+ doc: c(d)
234
234
  },
235
- ...n.source.section && { hash: m(n.source.section) },
235
+ ...n.source.section && { hash: f(n.source.section) },
236
236
  className: "inline-flex items-center gap-1 hover:text-foreground",
237
- children: [/* @__PURE__ */ H(c, { className: "size-3" }), n.source.section ? i("sourceSection", {
238
- doc: u.title,
237
+ children: [/* @__PURE__ */ H(l, { className: "size-3" }), n.source.section ? i("sourceSection", {
238
+ doc: d.title,
239
239
  section: n.source.section
240
- }) : u.title]
240
+ }) : d.title]
241
241
  }),
242
242
  n.source.missing && /* @__PURE__ */ H("span", {
243
243
  className: "text-warning",
@@ -286,7 +286,7 @@ function Y({ workspace: e, entryId: n }) {
286
286
  },
287
287
  className: s,
288
288
  children: [
289
- /* @__PURE__ */ H(u, {
289
+ /* @__PURE__ */ H(d, {
290
290
  category: n.statusCategory,
291
291
  className: "size-3.5 shrink-0"
292
292
  }),
@@ -303,11 +303,11 @@ function Y({ workspace: e, entryId: n }) {
303
303
  to: "/$workspace/docs/$doc",
304
304
  params: {
305
305
  workspace: e,
306
- doc: p(n)
306
+ doc: c(n)
307
307
  },
308
308
  className: s,
309
309
  children: [
310
- /* @__PURE__ */ H(c, { className: "size-3.5 shrink-0 text-muted-foreground" }),
310
+ /* @__PURE__ */ H(l, { className: "size-3.5 shrink-0 text-muted-foreground" }),
311
311
  /* @__PURE__ */ H("span", {
312
312
  className: "w-16 shrink-0 text-xs text-muted-foreground",
313
313
  children: r("doc")
@@ -322,7 +322,7 @@ function Y({ workspace: e, entryId: n }) {
322
322
  });
323
323
  }
324
324
  function ne({ workspace: e, entryId: t }) {
325
- let n = B("knowledge.history"), { data: r = [] } = W(a(e, t)), { actorName: i } = g(e);
325
+ let n = B("knowledge.history"), { data: r = [] } = W(a(e, t)), { actorName: i } = h(e);
326
326
  return r.length === 0 ? null : /* @__PURE__ */ H(j, {
327
327
  title: n("title"),
328
328
  variant: "bare",
@@ -1,23 +1,23 @@
1
1
  import { rememberSearch as e } from "../../../lib/listSearch.js";
2
2
  import { redirect as t } from "../../../lib/router.js";
3
3
  import { knowledgeQuery as n } from "../../../api/queries.js";
4
- import { isEntryAt as r } from "../../../lib/refs.js";
5
- import { kinds as i, termRef as a } from "../../../lib/knowledgeKinds.js";
4
+ import { kinds as r, termRef as i } from "../../../lib/knowledgeKinds.js";
5
+ import { isEntryAt as a } from "../../../lib/refs.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
- ...i.includes(e.kind) && { kind: e.kind }
11
+ ...r.includes(e.kind) && { kind: e.kind }
12
12
  }),
13
- beforeLoad: async ({ context: { queryClient: i }, params: o, search: { entry: s, ...c }, location: l, preload: u }) => {
13
+ beforeLoad: async ({ context: { queryClient: r }, params: o, search: { entry: s, ...c }, location: l, preload: u }) => {
14
14
  if (s) {
15
- let e = (await i.ensureQueryData(n(o.workspace))).find((e) => r(e, s));
15
+ let e = (await r.ensureQueryData(n(o.workspace))).find((e) => a(e, s));
16
16
  throw t({
17
17
  to: "/$workspace/knowledge/$term",
18
18
  params: {
19
19
  workspace: o.workspace,
20
- term: e ? a(e) : s
20
+ term: e ? i(e) : s
21
21
  },
22
22
  replace: !0
23
23
  });
@@ -3,9 +3,9 @@ import { Link as t, useNavigate as n } from "../../../lib/router.js";
3
3
  import { areasQuery as r, knowledgeQuery as i } from "../../../api/queries.js";
4
4
  import { AddIcon as a, LibraryIcon as o } from "../../../components/icons.js";
5
5
  import { kinds as s, termRef as c } from "../../../lib/knowledgeKinds.js";
6
- import { Route as l } from "./index.js";
7
- import { useTime as u } from "../../../lib/time.js";
8
- import { EntryDialog as d, useKnowledgeMenu as f } from "../../../lib/knowledge.js";
6
+ import { EntryDialog as l, useKnowledgeMenu as u } from "../../../lib/knowledge.js";
7
+ import { useTime as d } from "../../../lib/time.js";
8
+ import { Route as f } from "./index.js";
9
9
  import { KnowledgeStatus as p } from "../../../components/HoverCards.js";
10
10
  import { FavoriteStar as m } from "../../../components/FavoriteStar.js";
11
11
  import { Button as h, EmptyState as g, SearchInput as _, SegmentedControl as v, buttonClasses as y, useOpenMenu as b } from "@parallelworks/ui";
@@ -16,7 +16,7 @@ import { useQuery as j, useSuspenseQuery as M } from "@tanstack/react-query";
16
16
  // src/routes/$workspace/knowledge/index.tsx?tsr-split=component
17
17
  var N = 5, P = 8;
18
18
  function F() {
19
- let { workspace: u } = l.useParams(), { archived: f, kind: p = "all" } = l.useSearch(), b = D("knowledge"), F = E();
19
+ let { workspace: u } = f.useParams(), { archived: d, kind: p = "all" } = f.useSearch(), b = D("knowledge"), F = E();
20
20
  e(b("title"));
21
21
  let L = n(), [R, z] = T(""), [B, V] = T(""), [H, U] = T(null);
22
22
  C(() => {
@@ -25,11 +25,11 @@ function F() {
25
25
  }, [R]);
26
26
  let { data: W } = M(i(u)), { data: G = [] } = j(r(u)), K = {
27
27
  ...B && { q: B },
28
- ...f && { archived: !0 }
28
+ ...d && { archived: !0 }
29
29
  }, { data: q } = j({
30
30
  ...i(u, K),
31
- enabled: !!B || !!f
32
- }), J = !!B || !!f, Y = J ? q ?? [] : W, X = p === "all" ? Y : Y.filter((e) => e.kind === p), Z = S((e) => U(e), []), Q = w(() => {
31
+ enabled: !!B || !!d
32
+ }), J = !!B || !!d, Y = J ? q ?? [] : W, X = p === "all" ? Y : Y.filter((e) => e.kind === p), Z = S((e) => U(e), []), Q = w(() => {
33
33
  let e = /* @__PURE__ */ new Map();
34
34
  for (let t of Y) e.set(t.kind, (e.get(t.kind) ?? 0) + 1);
35
35
  return e;
@@ -53,7 +53,7 @@ function F() {
53
53
  to: "/$workspace/knowledge",
54
54
  params: { workspace: u },
55
55
  search: {
56
- ...f && { archived: f },
56
+ ...d && { archived: d },
57
57
  ...e !== "all" && { kind: e }
58
58
  },
59
59
  replace: !0
@@ -127,13 +127,13 @@ function F() {
127
127
  to: "/$workspace/knowledge",
128
128
  params: { workspace: u },
129
129
  search: {
130
- ...!f && { archived: !0 },
130
+ ...!d && { archived: !0 },
131
131
  ...p !== "all" && { kind: p }
132
132
  },
133
- "aria-current": f || void 0,
133
+ "aria-current": d || void 0,
134
134
  className: `${y({
135
135
  size: "sm",
136
- variant: f ? "secondary" : "ghost"
136
+ variant: d ? "secondary" : "ghost"
137
137
  })} ml-auto`,
138
138
  children: b("archived")
139
139
  })]
@@ -169,7 +169,7 @@ function F() {
169
169
  ]
170
170
  })
171
171
  }),
172
- H && /* @__PURE__ */ k(x, { children: /* @__PURE__ */ k(d, {
172
+ H && /* @__PURE__ */ k(x, { children: /* @__PURE__ */ k(l, {
173
173
  workspace: u,
174
174
  mode: H,
175
175
  onClose: () => U(null),
@@ -185,7 +185,7 @@ function F() {
185
185
  });
186
186
  }
187
187
  function I({ workspace: e, title: n, entries: r, onOpen: i, showTime: a = !1 }) {
188
- let o = D("knowledge"), s = b(), l = f(e, i), d = u();
188
+ let o = D("knowledge"), s = b(), l = u(e, i), f = d();
189
189
  return /* @__PURE__ */ A("section", {
190
190
  "aria-label": n,
191
191
  className: "mt-10",
@@ -221,9 +221,9 @@ function I({ workspace: e, title: n, entries: r, onOpen: i, showTime: a = !1 })
221
221
  n.kind !== "term" && n.status === "proposed" && /* @__PURE__ */ k(p, { status: n.status }),
222
222
  a && /* @__PURE__ */ k("time", {
223
223
  dateTime: n.updatedAt,
224
- title: d.full(n.updatedAt),
224
+ title: f.full(n.updatedAt),
225
225
  className: "tabular-nums",
226
- children: d.relative(n.updatedAt)
226
+ children: f.relative(n.updatedAt)
227
227
  })
228
228
  ]
229
229
  })]
@@ -4,30 +4,31 @@ import { windows as n } from "./measures.js";
4
4
  import { Route as r } from "./measures2.js";
5
5
  import { measuresQuery as i } from "../../api/queries.js";
6
6
  import { useMoney as a } from "../../components/AgentWork.js";
7
- import { SegmentedControl as o } from "@parallelworks/ui";
8
- import { useFormatter as s, useTranslations as c } from "use-intl";
9
- import { jsx as l, jsxs as u } from "react/jsx-runtime";
10
- import { useSuspenseQuery as d } from "@tanstack/react-query";
7
+ import { AreaLink as o } from "../../components/AreaLink.js";
8
+ import { SegmentedControl as s } from "@parallelworks/ui";
9
+ import { useFormatter as c, useTranslations as l } from "use-intl";
10
+ import { jsx as u, jsxs as d } from "react/jsx-runtime";
11
+ import { useSuspenseQuery as f } from "@tanstack/react-query";
11
12
  // src/routes/$workspace/measures.tsx?tsr-split=component
12
- function f() {
13
- let a = c("measures");
13
+ function p() {
14
+ let a = l("measures");
14
15
  e(a("title"));
15
- let { workspace: s } = r.useParams(), { days: f = "30" } = r.useSearch(), m = r.useNavigate(), { data: _ } = d(i(s, Number(f)));
16
- return /* @__PURE__ */ u("div", {
16
+ let { workspace: c } = r.useParams(), { days: p = "30" } = r.useSearch(), h = r.useNavigate(), { data: v } = f(i(c, Number(p)));
17
+ return /* @__PURE__ */ d("div", {
17
18
  className: "w-full space-y-10 px-4 py-6 md:px-8 md:py-8",
18
19
  children: [
19
- /* @__PURE__ */ u("div", {
20
+ /* @__PURE__ */ d("div", {
20
21
  className: "flex flex-wrap items-end justify-between gap-4",
21
- children: [/* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("h1", {
22
+ children: [/* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("h1", {
22
23
  className: "text-xl font-semibold tracking-tight",
23
24
  children: a("title")
24
- }), /* @__PURE__ */ l("p", {
25
+ }), /* @__PURE__ */ u("p", {
25
26
  className: "mt-1 text-sm text-muted-foreground",
26
27
  children: a("description")
27
- })] }), /* @__PURE__ */ l(o, {
28
+ })] }), /* @__PURE__ */ u(s, {
28
29
  label: a("window"),
29
- value: f,
30
- onValueChange: (e) => m({
30
+ value: p,
31
+ onValueChange: (e) => h({
31
32
  search: { days: e },
32
33
  replace: !0
33
34
  }),
@@ -37,28 +38,28 @@ function f() {
37
38
  }))
38
39
  })]
39
40
  }),
40
- /* @__PURE__ */ l(p, { queue: _.queue }),
41
- /* @__PURE__ */ l(h, { states: _.states }),
42
- /* @__PURE__ */ u("section", {
41
+ /* @__PURE__ */ u(m, { queue: v.queue }),
42
+ /* @__PURE__ */ u(g, { states: v.states }),
43
+ /* @__PURE__ */ d("section", {
43
44
  "aria-label": a("cost"),
44
- children: [/* @__PURE__ */ l("h2", {
45
+ children: [/* @__PURE__ */ u("h2", {
45
46
  className: "text-sm font-semibold",
46
47
  children: a("cost")
47
- }), /* @__PURE__ */ u("div", {
48
+ }), /* @__PURE__ */ d("div", {
48
49
  className: "mt-3 grid gap-6 lg:grid-cols-3",
49
50
  children: [
50
- /* @__PURE__ */ l(g, {
51
+ /* @__PURE__ */ u(_, {
51
52
  title: a("byIssue"),
52
- rows: _.issues,
53
- link: (e) => /* @__PURE__ */ u(t, {
53
+ rows: v.issues,
54
+ link: (e) => /* @__PURE__ */ d(t, {
54
55
  to: "/$workspace/issues/$identifier",
55
56
  params: {
56
- workspace: s,
57
+ workspace: c,
57
58
  identifier: e.key
58
59
  },
59
60
  className: "hover:underline",
60
61
  children: [
61
- /* @__PURE__ */ l("span", {
62
+ /* @__PURE__ */ u("span", {
62
63
  className: "text-muted-foreground",
63
64
  children: e.key
64
65
  }),
@@ -67,26 +68,23 @@ function f() {
67
68
  ]
68
69
  })
69
70
  }),
70
- /* @__PURE__ */ l(g, {
71
+ /* @__PURE__ */ u(_, {
71
72
  title: a("byArea"),
72
- rows: _.areas,
73
- link: (e) => /* @__PURE__ */ l(t, {
74
- to: "/$workspace/areas/$area",
75
- params: {
76
- workspace: s,
77
- area: e.key
78
- },
73
+ rows: v.areas,
74
+ link: (e) => /* @__PURE__ */ u(o, {
75
+ workspace: c,
76
+ area: e,
79
77
  className: "hover:underline",
80
78
  children: e.title
81
79
  })
82
80
  }),
83
- /* @__PURE__ */ l(g, {
81
+ /* @__PURE__ */ u(_, {
84
82
  title: a("byTeam"),
85
- rows: _.teams,
86
- link: (e) => /* @__PURE__ */ l(t, {
83
+ rows: v.teams,
84
+ link: (e) => /* @__PURE__ */ u(t, {
87
85
  to: "/$workspace/teams/$key/settings",
88
86
  params: {
89
- workspace: s,
87
+ workspace: c,
90
88
  key: e.key
91
89
  },
92
90
  className: "hover:underline",
@@ -99,32 +97,32 @@ function f() {
99
97
  ]
100
98
  });
101
99
  }
102
- function p({ queue: e }) {
103
- let t = c("measures"), n = s();
104
- return /* @__PURE__ */ u("section", {
100
+ function m({ queue: e }) {
101
+ let t = l("measures"), n = c();
102
+ return /* @__PURE__ */ d("section", {
105
103
  "aria-label": t("queue"),
106
104
  children: [
107
- /* @__PURE__ */ l("h2", {
105
+ /* @__PURE__ */ u("h2", {
108
106
  className: "text-sm font-semibold",
109
107
  children: t("queue")
110
108
  }),
111
- /* @__PURE__ */ l("p", {
109
+ /* @__PURE__ */ u("p", {
112
110
  className: "mt-0.5 text-xs text-muted-foreground",
113
111
  children: t("queueHelp")
114
112
  }),
115
- e.length === 0 ? /* @__PURE__ */ l("p", {
113
+ e.length === 0 ? /* @__PURE__ */ u("p", {
116
114
  className: "mt-3 text-sm text-muted-foreground",
117
115
  children: t("noQueue")
118
- }) : /* @__PURE__ */ l("ul", {
116
+ }) : /* @__PURE__ */ u("ul", {
119
117
  className: "mt-3 flex flex-wrap gap-2",
120
- children: e.map((e) => /* @__PURE__ */ u("li", {
118
+ children: e.map((e) => /* @__PURE__ */ d("li", {
121
119
  className: "flex items-baseline gap-2 rounded-md border border-border px-3 py-2",
122
- children: [/* @__PURE__ */ l("span", {
120
+ children: [/* @__PURE__ */ u("span", {
123
121
  className: "text-lg font-semibold tabular-nums",
124
122
  children: n.number(e.queued)
125
- }), /* @__PURE__ */ l("span", {
123
+ }), /* @__PURE__ */ u("span", {
126
124
  className: "text-sm text-muted-foreground",
127
- children: e.label ? /* @__PURE__ */ l("code", {
125
+ children: e.label ? /* @__PURE__ */ u("code", {
128
126
  className: "font-mono text-xs",
129
127
  children: e.label
130
128
  }) : t("anyRunner")
@@ -134,8 +132,8 @@ function p({ queue: e }) {
134
132
  ]
135
133
  });
136
134
  }
137
- function m() {
138
- let e = s();
135
+ function h() {
136
+ let e = c();
139
137
  return (t) => {
140
138
  for (let [n, r] of [
141
139
  ["day", 86400],
@@ -154,30 +152,30 @@ function m() {
154
152
  });
155
153
  };
156
154
  }
157
- function h({ states: e }) {
158
- let t = c("measures"), n = c("agentWork.state"), r = m(), i = Math.max(1, ...e.map((e) => e.totalSeconds));
159
- return /* @__PURE__ */ u("section", {
155
+ function g({ states: e }) {
156
+ let t = l("measures"), n = l("agentWork.state"), r = h(), i = Math.max(1, ...e.map((e) => e.totalSeconds));
157
+ return /* @__PURE__ */ d("section", {
160
158
  "aria-label": t("states"),
161
159
  children: [
162
- /* @__PURE__ */ l("h2", {
160
+ /* @__PURE__ */ u("h2", {
163
161
  className: "text-sm font-semibold",
164
162
  children: t("states")
165
163
  }),
166
- /* @__PURE__ */ l("p", {
164
+ /* @__PURE__ */ u("p", {
167
165
  className: "mt-0.5 text-xs text-muted-foreground",
168
166
  children: t("statesHelp")
169
167
  }),
170
- e.length === 0 ? /* @__PURE__ */ l("p", {
168
+ e.length === 0 ? /* @__PURE__ */ u("p", {
171
169
  className: "mt-3 text-sm text-muted-foreground",
172
170
  children: t("noRuns")
173
- }) : /* @__PURE__ */ l("ul", {
171
+ }) : /* @__PURE__ */ u("ul", {
174
172
  className: "mt-3 max-w-3xl space-y-3",
175
- children: e.map((e) => /* @__PURE__ */ u("li", { children: [/* @__PURE__ */ u("div", {
173
+ children: e.map((e) => /* @__PURE__ */ d("li", { children: [/* @__PURE__ */ d("div", {
176
174
  className: "flex items-baseline justify-between gap-3 text-sm",
177
- children: [/* @__PURE__ */ l("span", {
175
+ children: [/* @__PURE__ */ u("span", {
178
176
  className: "font-medium",
179
177
  children: n(e.state)
180
- }), /* @__PURE__ */ u("span", {
178
+ }), /* @__PURE__ */ d("span", {
181
179
  className: "text-xs text-muted-foreground tabular-nums",
182
180
  children: [
183
181
  r(e.totalSeconds),
@@ -189,9 +187,9 @@ function h({ states: e }) {
189
187
  })
190
188
  ]
191
189
  })]
192
- }), /* @__PURE__ */ l("div", {
190
+ }), /* @__PURE__ */ u("div", {
193
191
  className: "mt-1 h-2 overflow-hidden rounded-full bg-muted",
194
- children: /* @__PURE__ */ l("div", {
192
+ children: /* @__PURE__ */ u("div", {
195
193
  className: "h-full rounded-full bg-agent",
196
194
  style: { width: `${e.totalSeconds / i * 100}%` }
197
195
  })
@@ -200,30 +198,30 @@ function h({ states: e }) {
200
198
  ]
201
199
  });
202
200
  }
203
- function g({ title: e, rows: t, link: n }) {
204
- let r = c("measures"), i = a();
205
- return /* @__PURE__ */ u("div", {
201
+ function _({ title: e, rows: t, link: n }) {
202
+ let r = l("measures"), i = a();
203
+ return /* @__PURE__ */ d("div", {
206
204
  className: "min-w-0",
207
- children: [/* @__PURE__ */ l("h3", {
205
+ children: [/* @__PURE__ */ u("h3", {
208
206
  className: "mb-2 text-xs font-medium text-muted-foreground",
209
207
  children: e
210
- }), t.length === 0 ? /* @__PURE__ */ l("p", {
208
+ }), t.length === 0 ? /* @__PURE__ */ u("p", {
211
209
  className: "text-sm text-muted-foreground",
212
210
  children: r("noCost")
213
- }) : /* @__PURE__ */ l("ol", {
211
+ }) : /* @__PURE__ */ u("ol", {
214
212
  className: "divide-y divide-border rounded-md border border-border text-sm",
215
- children: t.map((e) => /* @__PURE__ */ u("li", {
213
+ children: t.map((e) => /* @__PURE__ */ d("li", {
216
214
  className: "flex items-baseline gap-3 px-3 py-2",
217
215
  children: [
218
- /* @__PURE__ */ l("span", {
216
+ /* @__PURE__ */ u("span", {
219
217
  className: "min-w-0 flex-1 truncate",
220
218
  children: n(e)
221
219
  }),
222
- /* @__PURE__ */ l("span", {
220
+ /* @__PURE__ */ u("span", {
223
221
  className: "shrink-0 text-xs text-muted-foreground tabular-nums",
224
222
  children: r("runCount", { count: e.runs })
225
223
  }),
226
- /* @__PURE__ */ l("span", {
224
+ /* @__PURE__ */ u("span", {
227
225
  className: "w-20 shrink-0 text-right tabular-nums",
228
226
  children: i(e.costMicros)
229
227
  })
@@ -232,4 +230,4 @@ function g({ title: e, rows: t, link: n }) {
232
230
  })]
233
231
  });
234
232
  }
235
- export { f as component };
233
+ export { p as component };