@parallelworks/tandem-web 0.150.3 → 0.152.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 +36 -4
  2. package/_virtual/_virtual_i18n/es/common.js +36 -4
  3. package/_virtual/_virtual_i18n/ja/common.js +36 -4
  4. package/_virtual/_virtual_i18n/ko/common.js +36 -4
  5. package/_virtual/_virtual_i18n/zh/common.js +36 -4
  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 +1 -1
  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 +414 -151
  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,10 +1,10 @@
1
1
  import { issueQuery as e } from "../api/queries.js";
2
- import { useConfirm as t } from "../lib/confirm.js";
3
- import { customFieldsQuery as n, fieldKinds as r, fieldsFor as i, hasValue as a, setIssueFields as o, setProjectFields as s, useCustomFieldActions as c } from "../lib/customFields.js";
4
- import { issueTypesQuery as l, typeShows as u } from "../lib/issueTypes.js";
5
- import { AddIcon as d } from "./icons.js";
6
- import { invalidateIssueViews as f } from "../api/mutations.js";
7
- import { PropertyField as p, usePropertyText as m } from "./DocProperties.js";
2
+ import { invalidateIssueViews as t } from "../api/mutations.js";
3
+ import { AddIcon as n } from "./icons.js";
4
+ import { PropertyField as r, usePropertyText as i } from "./DocProperties.js";
5
+ import { customFieldsQuery as a, fieldKinds as o, fieldsFor as s, hasValue as c, setIssueFields as l, setProjectFields as u, useCustomFieldActions as d } from "../lib/customFields.js";
6
+ import { useConfirm as f } from "../lib/confirm.js";
7
+ import { issueTypesQuery as p, typeShows as m } from "../lib/issueTypes.js";
8
8
  import { Button as h, Checkbox as g, ErrorText as _, IconButton as v, Input as y, Select as b, SettingsCard as x, Textarea as S, menuDivider as C, useOpenMenu as w } from "@parallelworks/ui";
9
9
  import { useId as T, useState as E } from "react";
10
10
  import { useErrorMessage as D } from "@parallelworks/problem/react";
@@ -13,16 +13,16 @@ import { Fragment as k, jsx as A, jsxs as j } from "react/jsx-runtime";
13
13
  import { useMutation as M, useQuery as N, useQueryClient as P } from "@tanstack/react-query";
14
14
  // src/components/CustomFields.tsx
15
15
  function F(e) {
16
- let t = m(e);
16
+ let t = i(e);
17
17
  return (e, n) => t(e, n);
18
18
  }
19
- function I({ workspace: t, issue: r, label: a }) {
20
- let s = D(), c = P(), { data: d } = N(n(t)), { data: m } = N(l(t)), h = m?.find((e) => e.id === r.type?.id), g = i(d, "issue", r.teamId).filter((e) => u(h, e.id)), v = e(t, r.identifier).queryKey, y = M({
21
- mutationFn: (e) => o(t, r.identifier, e),
19
+ function I({ workspace: n, issue: i, label: o }) {
20
+ let c = D(), u = P(), { data: d } = N(a(n)), { data: f } = N(p(n)), h = f?.find((e) => e.id === i.type?.id), g = s(d, "issue", i.teamId).filter((e) => m(h, e.id)), v = e(n, i.identifier).queryKey, y = M({
21
+ mutationFn: (e) => l(n, i.identifier, e),
22
22
  onMutate: async (e) => {
23
- await c.cancelQueries({ queryKey: v });
24
- let t = c.getQueryData(v);
25
- return t && c.setQueryData(v, {
23
+ await u.cancelQueries({ queryKey: v });
24
+ let t = u.getQueryData(v);
25
+ return t && u.setQueryData(v, {
26
26
  ...t,
27
27
  fields: {
28
28
  ...t.fields,
@@ -31,61 +31,61 @@ function I({ workspace: t, issue: r, label: a }) {
31
31
  }), { previous: t };
32
32
  },
33
33
  onError: (e, t, n) => {
34
- n?.previous && c.setQueryData(v, n.previous);
34
+ n?.previous && u.setQueryData(v, n.previous);
35
35
  },
36
- onSuccess: (e) => c.setQueryData(v, e),
37
- onSettled: () => f(c, t, r.identifier)
36
+ onSuccess: (e) => u.setQueryData(v, e),
37
+ onSettled: () => t(u, n, i.identifier)
38
38
  });
39
- return g.length === 0 ? null : /* @__PURE__ */ j(k, { children: [g.map((e) => a(e.name, /* @__PURE__ */ A("div", {
39
+ return g.length === 0 ? null : /* @__PURE__ */ j(k, { children: [g.map((e) => o(e.name, /* @__PURE__ */ A("div", {
40
40
  className: "px-2",
41
- children: /* @__PURE__ */ A(p, {
42
- workspace: t,
41
+ children: /* @__PURE__ */ A(r, {
42
+ workspace: n,
43
43
  property: e,
44
- value: r.fields[e.id],
44
+ value: i.fields[e.id],
45
45
  editable: !0,
46
46
  onChange: (t) => y.mutate({ [e.id]: t })
47
47
  })
48
48
  }), e.id)), y.error && /* @__PURE__ */ A(_, {
49
49
  className: "px-2",
50
- children: s(y.error)
50
+ children: c(y.error)
51
51
  })] });
52
52
  }
53
- function L({ workspace: e, project: t, editable: r, onChange: a }) {
54
- let o = O("customFields"), c = D(), { data: l } = N(n(e)), u = i(l, "project"), d = M({
55
- mutationFn: (n) => s(e, t.id, n),
56
- onSuccess: a
53
+ function L({ workspace: e, project: t, editable: n, onChange: i }) {
54
+ let o = O("customFields"), c = D(), { data: l } = N(a(e)), d = s(l, "project"), f = M({
55
+ mutationFn: (n) => u(e, t.id, n),
56
+ onSuccess: i
57
57
  });
58
- return u.length === 0 ? null : /* @__PURE__ */ j("section", {
58
+ return d.length === 0 ? null : /* @__PURE__ */ j("section", {
59
59
  "aria-label": o("title"),
60
60
  className: "max-w-xl space-y-0.5 text-sm",
61
- children: [u.map((n) => /* @__PURE__ */ j("div", {
61
+ children: [d.map((i) => /* @__PURE__ */ j("div", {
62
62
  className: "flex min-h-8 items-center gap-2",
63
63
  children: [/* @__PURE__ */ A("span", {
64
64
  className: "w-36 shrink-0 truncate text-muted-foreground",
65
- children: n.name
65
+ children: i.name
66
66
  }), /* @__PURE__ */ A("div", {
67
67
  className: "min-w-0 flex-1",
68
- children: /* @__PURE__ */ A(p, {
68
+ children: /* @__PURE__ */ A(r, {
69
69
  workspace: e,
70
- property: n,
71
- value: t.fields[n.id],
72
- editable: r,
73
- onChange: (e) => d.mutate({ [n.id]: e })
70
+ property: i,
71
+ value: t.fields[i.id],
72
+ editable: n,
73
+ onChange: (e) => f.mutate({ [i.id]: e })
74
74
  })
75
75
  })]
76
- }, n.id)), d.error && /* @__PURE__ */ A(_, { children: c(d.error) })]
76
+ }, i.id)), f.error && /* @__PURE__ */ A(_, { children: c(f.error) })]
77
77
  });
78
78
  }
79
- function R({ workspace: e, teamId: t, typeId: r, values: o, onChange: s }) {
80
- let c = O("customFields"), { data: d } = N(n(e)), { data: f } = N(l(e)), m = f?.find((e) => e.id === r), h = i(d, "issue", t).filter((e) => u(m, e.id)).map((e) => m?.requiredFieldIds.includes(e.id) ? {
79
+ function R({ workspace: e, teamId: t, typeId: n, values: i, onChange: o }) {
80
+ let l = O("customFields"), { data: u } = N(a(e)), { data: d } = N(p(e)), f = d?.find((e) => e.id === n), h = s(u, "issue", t).filter((e) => m(f, e.id)).map((e) => f?.requiredFieldIds.includes(e.id) ? {
81
81
  ...e,
82
82
  required: !0
83
- } : e).filter((e) => e.required || a(o[e.id]));
83
+ } : e).filter((e) => e.required || c(i[e.id]));
84
84
  return h.length === 0 ? null : /* @__PURE__ */ j("fieldset", {
85
85
  className: "space-y-0.5 text-sm",
86
86
  children: [/* @__PURE__ */ A("legend", {
87
87
  className: "sr-only",
88
- children: c("title")
88
+ children: l("title")
89
89
  }), h.map((t) => /* @__PURE__ */ j("div", {
90
90
  className: "flex min-h-8 items-center gap-2",
91
91
  children: [/* @__PURE__ */ j("span", {
@@ -96,17 +96,17 @@ function R({ workspace: e, teamId: t, typeId: r, values: o, onChange: s }) {
96
96
  children: [" ", "*"]
97
97
  }), /* @__PURE__ */ A("span", {
98
98
  className: "sr-only",
99
- children: c("required")
99
+ children: l("required")
100
100
  })] })]
101
101
  }), /* @__PURE__ */ A("div", {
102
102
  className: "min-w-0 flex-1",
103
- children: /* @__PURE__ */ A(p, {
103
+ children: /* @__PURE__ */ A(r, {
104
104
  workspace: e,
105
105
  property: t,
106
- value: o[t.id],
106
+ value: i[t.id],
107
107
  editable: !0,
108
- onChange: (e) => s({
109
- ...o,
108
+ onChange: (e) => o({
109
+ ...i,
110
110
  [t.id]: e
111
111
  })
112
112
  })
@@ -115,148 +115,148 @@ function R({ workspace: e, teamId: t, typeId: r, values: o, onChange: s }) {
115
115
  });
116
116
  }
117
117
  function z({ workspace: e, target: t, team: r }) {
118
- let i = O("customFields"), { data: a } = N(n(e)), o = (a ?? []).filter((e) => e.target === t && (r ? e.teamId === r.id : !e.teamId)).sort((e, t) => e.position - t.position), [s, c] = E(!1);
118
+ let i = O("customFields"), { data: o } = N(a(e)), s = (o ?? []).filter((e) => e.target === t && (r ? e.teamId === r.id : !e.teamId)).sort((e, t) => e.position - t.position), [c, l] = E(!1);
119
119
  return /* @__PURE__ */ j(x, {
120
120
  title: i(t === "issue" ? "issueFields" : "projectFields"),
121
121
  description: i(r ? "teamFieldsHelp" : t === "issue" ? "issueFieldsHelp" : "projectFieldsHelp"),
122
122
  action: /* @__PURE__ */ A(h, {
123
123
  size: "sm",
124
- icon: /* @__PURE__ */ A(d, {}),
125
- onClick: () => c(!0),
124
+ icon: /* @__PURE__ */ A(n, {}),
125
+ onClick: () => l(!0),
126
126
  children: i("add")
127
127
  }),
128
- children: [s && /* @__PURE__ */ A(V, {
128
+ children: [c && /* @__PURE__ */ A(V, {
129
129
  workspace: e,
130
130
  target: t,
131
131
  team: r?.key,
132
- onDone: () => c(!1)
133
- }), o.length === 0 && !s ? /* @__PURE__ */ A("p", {
132
+ onDone: () => l(!1)
133
+ }), s.length === 0 && !c ? /* @__PURE__ */ A("p", {
134
134
  className: "px-3 py-3 text-sm text-muted-foreground",
135
135
  children: i("none")
136
136
  }) : /* @__PURE__ */ A("ul", {
137
137
  className: "divide-y divide-border",
138
- children: o.map((t, n) => /* @__PURE__ */ A(B, {
138
+ children: s.map((t, n) => /* @__PURE__ */ A(B, {
139
139
  workspace: e,
140
140
  field: t,
141
- before: o[n - 1],
142
- after: o[n + 1]
141
+ before: s[n - 1],
142
+ after: s[n + 1]
143
143
  }, t.id))
144
144
  })]
145
145
  });
146
146
  }
147
- function B({ workspace: e, field: n, before: r, after: i }) {
148
- let a = O("customFields"), o = c(e), s = w(), { confirm: l, dialog: u } = t(), [d, f] = E(!1), p = (e, t) => e && o.update.mutate({
149
- id: n.id,
150
- position: t ? (e.position + t.position) / 2 : e.position + (e === i ? 1 : -1)
151
- }), m = () => l({
152
- title: a("deleteTitle", { name: n.name }),
153
- description: a("deleteDescription", { count: n.values }),
154
- confirmLabel: a("delete"),
147
+ function B({ workspace: e, field: t, before: n, after: r }) {
148
+ let i = O("customFields"), a = d(e), o = w(), { confirm: s, dialog: c } = f(), [l, u] = E(!1), p = (e, n) => e && a.update.mutate({
149
+ id: t.id,
150
+ position: n ? (e.position + n.position) / 2 : e.position + (e === r ? 1 : -1)
151
+ }), m = () => s({
152
+ title: i("deleteTitle", { name: t.name }),
153
+ description: i("deleteDescription", { count: t.values }),
154
+ confirmLabel: i("delete"),
155
155
  destructive: !0,
156
- onConfirm: () => o.remove.mutateAsync(n.id)
156
+ onConfirm: () => a.remove.mutateAsync(t.id)
157
157
  }), h = () => [
158
158
  {
159
- label: a("edit"),
160
- onClick: () => f(!0)
159
+ label: i("edit"),
160
+ onClick: () => u(!0)
161
161
  },
162
+ ...n ? [{
163
+ label: i("moveUp"),
164
+ onClick: () => p(n, void 0)
165
+ }] : [],
162
166
  ...r ? [{
163
- label: a("moveUp"),
167
+ label: i("moveDown"),
164
168
  onClick: () => p(r, void 0)
165
169
  }] : [],
166
- ...i ? [{
167
- label: a("moveDown"),
168
- onClick: () => p(i, void 0)
169
- }] : [],
170
170
  {
171
- label: n.archivedAt ? a("restore") : a("archive"),
172
- onClick: () => o.update.mutate({
173
- id: n.id,
174
- archived: !n.archivedAt
171
+ label: t.archivedAt ? i("restore") : i("archive"),
172
+ onClick: () => a.update.mutate({
173
+ id: t.id,
174
+ archived: !t.archivedAt
175
175
  })
176
176
  },
177
177
  C,
178
178
  {
179
- label: a("delete"),
179
+ label: i("delete"),
180
180
  destructive: !0,
181
181
  onClick: m
182
182
  }
183
183
  ];
184
- return d ? /* @__PURE__ */ A("li", {
184
+ return l ? /* @__PURE__ */ A("li", {
185
185
  className: "p-2",
186
186
  children: /* @__PURE__ */ A(V, {
187
187
  workspace: e,
188
- target: n.target,
189
- field: n,
190
- onDone: () => f(!1)
188
+ target: t.target,
189
+ field: t,
190
+ onDone: () => u(!1)
191
191
  })
192
192
  }) : /* @__PURE__ */ j("li", {
193
193
  className: "flex min-h-10 items-center gap-3 px-3 py-1.5",
194
- onContextMenu: (e) => s(e, h()),
194
+ onContextMenu: (e) => o(e, h()),
195
195
  children: [
196
196
  /* @__PURE__ */ j("div", {
197
197
  className: "min-w-0 flex-1",
198
198
  children: [/* @__PURE__ */ j("p", {
199
- className: `truncate text-sm ${n.archivedAt ? "text-muted-foreground" : ""}`,
200
- children: [n.name, n.required && /* @__PURE__ */ A("span", {
199
+ className: `truncate text-sm ${t.archivedAt ? "text-muted-foreground" : ""}`,
200
+ children: [t.name, t.required && /* @__PURE__ */ A("span", {
201
201
  className: "ml-2 text-xs text-muted-foreground",
202
- children: a("required")
202
+ children: i("required")
203
203
  })]
204
- }), n.description && /* @__PURE__ */ A("p", {
204
+ }), t.description && /* @__PURE__ */ A("p", {
205
205
  className: "truncate text-xs text-muted-foreground",
206
- children: n.description
206
+ children: t.description
207
207
  })]
208
208
  }),
209
- n.archivedAt && /* @__PURE__ */ A("span", {
209
+ t.archivedAt && /* @__PURE__ */ A("span", {
210
210
  className: "shrink-0 text-xs text-muted-foreground",
211
- children: a("archived")
211
+ children: i("archived")
212
212
  }),
213
213
  /* @__PURE__ */ A("span", {
214
214
  className: "shrink-0 text-xs text-muted-foreground",
215
- children: a(`kinds.${n.kind}`)
215
+ children: i(`kinds.${t.kind}`)
216
216
  }),
217
217
  /* @__PURE__ */ A("span", {
218
218
  className: "w-20 shrink-0 text-right text-xs tabular-nums text-muted-foreground",
219
- children: a("values", { count: n.values })
219
+ children: i("values", { count: t.values })
220
220
  }),
221
221
  /* @__PURE__ */ A(v, {
222
222
  variant: "ghost",
223
223
  size: "sm",
224
- label: a("actions", { name: n.name }),
224
+ label: i("actions", { name: t.name }),
225
225
  icon: /* @__PURE__ */ A("span", {
226
226
  "aria-hidden": !0,
227
227
  children: "⋯"
228
228
  }),
229
- onClick: (e) => s(e, h())
229
+ onClick: (e) => o(e, h())
230
230
  }),
231
- u
231
+ c
232
232
  ]
233
233
  });
234
234
  }
235
- function V({ workspace: e, target: t, team: n, field: i, onDone: a }) {
236
- let o = O("customFields"), s = D(), l = c(e), [u, d] = E(i?.name ?? ""), [f, p] = E(i?.description ?? ""), [m, v] = E(i?.kind ?? "text"), [x, C] = E(i?.required ?? !1), w = T(), [k, M] = E((i?.options ?? []).map((e) => e.name).join("\n")), N = m === "select" || m === "multi_select", P = () => k.split("\n").map((e) => e.trim()).filter(Boolean).map((e) => {
237
- let t = i?.options.find((t) => t.name === e)?.id;
235
+ function V({ workspace: e, target: t, team: n, field: r, onDone: i }) {
236
+ let a = O("customFields"), s = D(), c = d(e), [l, u] = E(r?.name ?? ""), [f, p] = E(r?.description ?? ""), [m, v] = E(r?.kind ?? "text"), [x, C] = E(r?.required ?? !1), w = T(), [k, M] = E((r?.options ?? []).map((e) => e.name).join("\n")), N = m === "select" || m === "multi_select", P = () => k.split("\n").map((e) => e.trim()).filter(Boolean).map((e) => {
237
+ let t = r?.options.find((t) => t.name === e)?.id;
238
238
  return {
239
239
  name: e,
240
240
  ...t && { id: t }
241
241
  };
242
- }), F = i ? l.update : l.create;
242
+ }), F = r ? c.update : c.create;
243
243
  return /* @__PURE__ */ j("form", {
244
244
  onSubmit: (e) => {
245
- e.preventDefault(), i ? l.update.mutate({
246
- id: i.id,
247
- name: u,
245
+ e.preventDefault(), r ? c.update.mutate({
246
+ id: r.id,
247
+ name: l,
248
248
  description: f,
249
249
  ...t === "issue" && { required: x },
250
250
  ...N && { options: P() }
251
- }, { onSuccess: a }) : l.create.mutate({
251
+ }, { onSuccess: i }) : c.create.mutate({
252
252
  target: t,
253
253
  ...n && { team: n },
254
- name: u,
254
+ name: l,
255
255
  description: f,
256
256
  kind: m,
257
257
  ...t === "issue" && { required: x },
258
258
  ...N && { options: P() }
259
- }, { onSuccess: a });
259
+ }, { onSuccess: i });
260
260
  },
261
261
  className: "space-y-3 rounded-md border border-border p-3 text-sm",
262
262
  children: [
@@ -264,9 +264,9 @@ function V({ workspace: e, target: t, team: n, field: i, onDone: a }) {
264
264
  className: "grid gap-3 sm:grid-cols-2",
265
265
  children: [/* @__PURE__ */ j("label", {
266
266
  className: "block text-xs font-medium text-muted-foreground",
267
- children: [o("name"), /* @__PURE__ */ A(y, {
268
- value: u,
269
- onChange: (e) => d(e.target.value),
267
+ children: [a("name"), /* @__PURE__ */ A(y, {
268
+ value: l,
269
+ onChange: (e) => u(e.target.value),
270
270
  required: !0,
271
271
  maxLength: 60,
272
272
  className: "mt-1",
@@ -274,25 +274,25 @@ function V({ workspace: e, target: t, team: n, field: i, onDone: a }) {
274
274
  })]
275
275
  }), /* @__PURE__ */ j("div", {
276
276
  className: "text-xs font-medium text-muted-foreground",
277
- children: [o("kind"), /* @__PURE__ */ A("div", {
277
+ children: [a("kind"), /* @__PURE__ */ A("div", {
278
278
  className: "mt-1",
279
279
  children: /* @__PURE__ */ A(b, {
280
280
  value: m,
281
- items: r.map((e) => ({
281
+ items: o.map((e) => ({
282
282
  value: e,
283
- label: o(`kinds.${e}`)
283
+ label: a(`kinds.${e}`)
284
284
  })),
285
285
  onValueChange: v,
286
- "aria-label": o("kind"),
286
+ "aria-label": a("kind"),
287
287
  width: "fill",
288
- disabled: !!i
288
+ disabled: !!r
289
289
  })
290
290
  })]
291
291
  })]
292
292
  }),
293
293
  /* @__PURE__ */ j("label", {
294
294
  className: "block text-xs font-medium text-muted-foreground",
295
- children: [o("description"), /* @__PURE__ */ A(y, {
295
+ children: [a("description"), /* @__PURE__ */ A(y, {
296
296
  value: f,
297
297
  onChange: (e) => p(e.target.value),
298
298
  maxLength: 500,
@@ -302,7 +302,7 @@ function V({ workspace: e, target: t, team: n, field: i, onDone: a }) {
302
302
  N && /* @__PURE__ */ j("label", {
303
303
  className: "block text-xs font-medium text-muted-foreground",
304
304
  children: [
305
- o("options"),
305
+ a("options"),
306
306
  /* @__PURE__ */ A(S, {
307
307
  value: k,
308
308
  onChange: (e) => M(e.target.value),
@@ -311,7 +311,7 @@ function V({ workspace: e, target: t, team: n, field: i, onDone: a }) {
311
311
  }),
312
312
  /* @__PURE__ */ A("span", {
313
313
  className: "mt-1 block font-normal",
314
- children: o("optionsHint")
314
+ children: a("optionsHint")
315
315
  })
316
316
  ]
317
317
  }),
@@ -323,7 +323,7 @@ function V({ workspace: e, target: t, team: n, field: i, onDone: a }) {
323
323
  onCheckedChange: (e) => C(e === !0)
324
324
  }), /* @__PURE__ */ A("label", {
325
325
  htmlFor: w,
326
- children: o("requiredLabel")
326
+ children: a("requiredLabel")
327
327
  })]
328
328
  }),
329
329
  F.error && /* @__PURE__ */ A(_, { children: s(F.error) }),
@@ -332,15 +332,15 @@ function V({ workspace: e, target: t, team: n, field: i, onDone: a }) {
332
332
  children: [/* @__PURE__ */ A(h, {
333
333
  size: "sm",
334
334
  variant: "ghost",
335
- onClick: a,
336
- children: o("cancel")
335
+ onClick: i,
336
+ children: a("cancel")
337
337
  }), /* @__PURE__ */ A(h, {
338
338
  type: "submit",
339
339
  size: "sm",
340
340
  variant: "primary",
341
341
  loading: F.isPending,
342
- disabled: !u.trim(),
343
- children: o(i ? "save" : "add")
342
+ disabled: !l.trim(),
343
+ children: a(r ? "save" : "add")
344
344
  })]
345
345
  })
346
346
  ]
@@ -1,7 +1,7 @@
1
1
  import { api as e, unwrap as t } from "../api/client.js";
2
2
  import { meQuery as n } from "../api/queries.js";
3
- import { CalendarIcon as r, NotificationIcon as i } from "./icons.js";
4
- import { docKey as a } from "../lib/docs.js";
3
+ import { docKey as r } from "../lib/docs.js";
4
+ import { CalendarIcon as i, NotificationIcon as a } from "./icons.js";
5
5
  import { usePeople as o } from "../lib/people.js";
6
6
  import { fromIsoDate as s, isoDate as c } from "../lib/datePhrases.js";
7
7
  import { Button as l, ErrorText as u, Input as d, Popover as f, Select as p } from "@parallelworks/ui";
@@ -53,7 +53,7 @@ var O = w.create({
53
53
  renderMarkdown: (e) => `@${String(e.attrs?.date ?? "")}`
54
54
  });
55
55
  function k({ node: e, editor: t, updateAttributes: n }) {
56
- let a = _(), o = v("dateChip"), c = s(String(e.attrs.date ?? "")), l = e.attrs.remindAt, u = /* @__PURE__ */ new Date(), d = c ? a.dateTime(c, {
56
+ let r = _(), o = v("dateChip"), c = s(String(e.attrs.date ?? "")), l = e.attrs.remindAt, u = /* @__PURE__ */ new Date(), d = c ? r.dateTime(c, {
57
57
  weekday: "short",
58
58
  month: "short",
59
59
  day: "numeric",
@@ -62,9 +62,9 @@ function k({ node: e, editor: t, updateAttributes: n }) {
62
62
  className: "date-chip",
63
63
  "data-reminder": l ? "" : void 0,
64
64
  children: [
65
- /* @__PURE__ */ b(r, { className: "size-3.5" }),
65
+ /* @__PURE__ */ b(i, { className: "size-3.5" }),
66
66
  d,
67
- l && /* @__PURE__ */ b(i, {
67
+ l && /* @__PURE__ */ b(a, {
68
68
  className: "size-3",
69
69
  "aria-label": o("reminderSet")
70
70
  })
@@ -91,10 +91,10 @@ function k({ node: e, editor: t, updateAttributes: n }) {
91
91
  }) : p
92
92
  });
93
93
  }
94
- function A({ node: r, updateAttributes: i }) {
95
- let f = v("dateChip"), w = _(), T = g(), { workspace: E = "", doc: D } = m({ strict: !1 }), { members: O } = o(E), { data: k } = C(n), A = String(r.attrs.date ?? ""), j = r.attrs.reminderId, M = r.attrs.remindAt, N = r.attrs.remindFor ?? "", [P, F] = h(""), [I, L] = h("09:00"), R = {
94
+ function A({ node: i, updateAttributes: a }) {
95
+ let f = v("dateChip"), w = _(), T = g(), { workspace: E = "", doc: D } = m({ strict: !1 }), { members: O } = o(E), { data: k } = C(n), A = String(i.attrs.date ?? ""), j = i.attrs.reminderId, M = i.attrs.remindAt, N = i.attrs.remindFor ?? "", [P, F] = h(""), [I, L] = h("09:00"), R = {
96
96
  workspace: E,
97
- doc: D ? a(D) : ""
97
+ doc: D ? r(D) : ""
98
98
  }, z = S({
99
99
  mutationFn: async () => {
100
100
  let n = s(A);
@@ -109,7 +109,7 @@ function A({ node: r, updateAttributes: i }) {
109
109
  }
110
110
  }));
111
111
  },
112
- onSuccess: (e) => i({
112
+ onSuccess: (e) => a({
113
113
  reminderId: e.id,
114
114
  remindAt: e.remindAt,
115
115
  remindFor: P || null
@@ -121,7 +121,7 @@ function A({ node: r, updateAttributes: i }) {
121
121
  reminderId: j
122
122
  } } });
123
123
  },
124
- onSuccess: () => i({
124
+ onSuccess: () => a({
125
125
  reminderId: null,
126
126
  remindAt: null,
127
127
  remindFor: null
@@ -136,7 +136,7 @@ function A({ node: r, updateAttributes: i }) {
136
136
  value: A,
137
137
  onChange: (e) => {
138
138
  let t = s(e.target.value);
139
- t && i({ date: c(t) });
139
+ t && a({ date: c(t) });
140
140
  },
141
141
  className: "mt-1"
142
142
  })]
@@ -1,7 +1,7 @@
1
1
  import { api as e, unwrap as t } from "../api/client.js";
2
2
  import { docQuery as n, docTemplatesQuery as r, docsQuery as i } from "../api/queries.js";
3
- import { EditIcon as a } from "./icons.js";
4
- import { docKey as o, docRef as s, useTemplateValues as c } from "../lib/docs.js";
3
+ import { docKey as a, docRef as o, useTemplateValues as s } from "../lib/docs.js";
4
+ import { EditIcon as c } from "./icons.js";
5
5
  import { closingFence as l } from "./toggle.js";
6
6
  import { Button as u, Combobox as d, IconButton as f, Input as p, Popover as m, SegmentedControl as h, Select as g, Textarea as _ } from "@parallelworks/ui";
7
7
  import { useNavigate as v, useParams as y } from "@tanstack/react-router";
@@ -68,7 +68,7 @@ var k = /^:::button[ \t]*([^\n]*)\n/, A = /\s+(template|parent)=([\w-]+)/g, j =
68
68
  }
69
69
  });
70
70
  function M({ node: r, editor: i, getPos: l, updateAttributes: d }) {
71
- let p = x("docButton"), h = v(), g = c(), { workspace: _ = "", doc: T = "" } = y({ strict: !1 }), { data: D } = w({
71
+ let p = x("docButton"), h = v(), g = s(), { workspace: _ = "", doc: T = "" } = y({ strict: !1 }), { data: D } = w({
72
72
  ...n(_, T),
73
73
  enabled: !!_ && !!T
74
74
  }), [O, k] = b(!1), A = String(r.attrs.label ?? "") || p("untitled"), j = r.attrs.action, M = j === "doc" ? !!r.attrs.template : !!String(r.attrs.blocks ?? "").trim(), P = async () => {
@@ -91,7 +91,7 @@ function M({ node: r, editor: i, getPos: l, updateAttributes: d }) {
91
91
  to: "/$workspace/docs/$doc",
92
92
  params: {
93
93
  workspace: _,
94
- doc: s(i)
94
+ doc: o(i)
95
95
  }
96
96
  });
97
97
  } finally {
@@ -115,7 +115,7 @@ function M({ node: r, editor: i, getPos: l, updateAttributes: d }) {
115
115
  trigger: /* @__PURE__ */ S(f, {
116
116
  variant: "ghost",
117
117
  size: "xs",
118
- icon: /* @__PURE__ */ S(a, {}),
118
+ icon: /* @__PURE__ */ S(c, {}),
119
119
  label: p("edit")
120
120
  }),
121
121
  align: "start",
@@ -125,7 +125,7 @@ function M({ node: r, editor: i, getPos: l, updateAttributes: d }) {
125
125
  children: /* @__PURE__ */ S(N, {
126
126
  workspace: _,
127
127
  attrs: r.attrs,
128
- thisDoc: D?.key ?? (T ? o(T) : ""),
128
+ thisDoc: D?.key ?? (T ? a(T) : ""),
129
129
  onChange: d
130
130
  })
131
131
  })]
@@ -1,7 +1,7 @@
1
1
  import { api as e, unwrap as t } from "../api/client.js";
2
2
  import { docVersionQuery as n, docVersionsQuery as r } from "../api/queries.js";
3
- import { useTime as i } from "../lib/time.js";
4
- import { usePeople as a } from "../lib/people.js";
3
+ import { usePeople as i } from "../lib/people.js";
4
+ import { useTime as a } from "../lib/time.js";
5
5
  import { Editor as o } from "./Editor.js";
6
6
  import { lineDiff as s } from "../lib/diff.js";
7
7
  import { Avatar as c, Button as l, ErrorText as u, Loader as d, Tooltip as f } from "@parallelworks/ui";
@@ -12,7 +12,7 @@ import { jsx as g, jsxs as _ } from "react/jsx-runtime";
12
12
  import { useMutation as v, useQuery as y, useQueryClient as b } from "@tanstack/react-query";
13
13
  // src/components/DocHistory.tsx
14
14
  function x({ workspace: e, doc: t, selected: n, onSelect: o }) {
15
- let s = h("docs"), l = i(), { actorName: u, avatarOf: p } = a(e), { data: m = [], isPending: v } = y(r(e, t.key));
15
+ let s = h("docs"), l = a(), { actorName: u, avatarOf: p } = i(e), { data: m = [], isPending: v } = y(r(e, t.key));
16
16
  return /* @__PURE__ */ _("aside", {
17
17
  "aria-label": s("history"),
18
18
  className: "w-72 shrink-0 overflow-y-auto border-l border-border px-3 py-4 max-md:hidden",
@@ -62,7 +62,7 @@ function x({ workspace: e, doc: t, selected: n, onSelect: o }) {
62
62
  });
63
63
  }
64
64
  function S({ workspace: r, doc: s, versionId: c, onDone: d }) {
65
- let f = h("docs"), x = i(), S = m(), w = b(), { actorName: T } = a(r), [E, D] = p(!1), { data: O } = y(n(r, s.key, c)), k = v({
65
+ let f = h("docs"), x = a(), S = m(), w = b(), { actorName: T } = i(r), [E, D] = p(!1), { data: O } = y(n(r, s.key, c)), k = v({
66
66
  mutationFn: async () => t(await e.POST("/api/v1/workspaces/{workspace}/docs/{doc}/versions/{versionId}/restore", { params: { path: {
67
67
  workspace: r,
68
68
  doc: s.key,
@@ -1,11 +1,11 @@
1
1
  import { appURL as e } from "../lib/base.js";
2
2
  import { docQuery as t, docsQuery as n, issueSearchQuery as r, projectsQuery as i } from "../api/queries.js";
3
- import { ProjectIcon as a, StatusIcon as o } from "./icons.js";
4
- import { docURL as s } from "../lib/docs.js";
3
+ import { docURL as a } from "../lib/docs.js";
4
+ import { ProjectIcon as o, StatusIcon as s } from "./icons.js";
5
5
  import { headingAnchor as c, headings as l } from "../lib/glossary.js";
6
6
  import { issueURL as u } from "../lib/issueMenu.js";
7
- import { DocIcon as d } from "./DocIcon.js";
8
- import { projectRef as f } from "../lib/projects.js";
7
+ import { projectRef as d } from "../lib/projects.js";
8
+ import { DocIcon as f } from "./DocIcon.js";
9
9
  import { useEditorListbox as p } from "./editorListbox.js";
10
10
  import { ListboxOption as m, ListboxPanel as h, useListboxNavigation as g } from "@parallelworks/ui";
11
11
  import { useParams as _ } from "@tanstack/react-router";
@@ -98,7 +98,7 @@ function O({ editor: O }) {
98
98
  }, [O]);
99
99
  let U = (t) => {
100
100
  if (!O || !j || !t || !k) return;
101
- let [n, r] = t.kind === "doc" ? [t.heading ? `${t.doc.title} › ${t.heading}` : t.doc.title, s(k, t.doc) + (t.heading ? `#${c(t.heading)}` : "")] : t.kind === "issue" ? [t.issue.identifier, u(k, t.issue.identifier)] : [t.project.name, e(`/${k}/projects/${f(t.project)}`)];
101
+ let [n, r] = t.kind === "doc" ? [t.heading ? `${t.doc.title} › ${t.heading}` : t.doc.title, a(k, t.doc) + (t.heading ? `#${c(t.heading)}` : "")] : t.kind === "issue" ? [t.issue.identifier, u(k, t.issue.identifier)] : [t.project.name, e(`/${k}/projects/${d(t.project)}`)];
102
102
  O.chain().focus().insertContentAt({
103
103
  from: j.from,
104
104
  to: j.to
@@ -133,7 +133,7 @@ function O({ editor: O }) {
133
133
  children: H.map((e, t) => {
134
134
  let n = e.kind === "doc" ? {
135
135
  key: `doc:${e.doc.id}:${e.heading ?? ""}`,
136
- icon: /* @__PURE__ */ C(d, {
136
+ icon: /* @__PURE__ */ C(f, {
137
137
  icon: e.doc.icon,
138
138
  className: "size-3.5"
139
139
  }),
@@ -141,12 +141,12 @@ function O({ editor: O }) {
141
141
  hint: e.heading ? e.doc.title : void 0
142
142
  } : e.kind === "issue" ? {
143
143
  key: `issue:${e.issue.id}`,
144
- icon: /* @__PURE__ */ C(o, { category: e.issue.status.category }),
144
+ icon: /* @__PURE__ */ C(s, { category: e.issue.status.category }),
145
145
  label: e.issue.title,
146
146
  hint: e.issue.identifier
147
147
  } : {
148
148
  key: `project:${e.project.id}`,
149
- icon: /* @__PURE__ */ C(a, {}),
149
+ icon: /* @__PURE__ */ C(o, {}),
150
150
  label: e.project.name,
151
151
  hint: A("project")
152
152
  };