@parallelworks/tandem-web 0.150.3 → 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 +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 +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
@@ -2,13 +2,13 @@ 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 { projectStatuses as se } from "../lib/projectStates.js";
5
+ import { usePeople as se } from "../lib/people.js";
6
6
  import { useTime as ce } from "../lib/time.js";
7
7
  import { ProjectStatusIcon as c } from "./Planning.js";
8
- import { usePeople as le } from "../lib/people.js";
8
+ import { projectRef as le } from "../lib/projects.js";
9
9
  import { EntityIcon as l } from "./EntityIcon.js";
10
- import { projectRef as ue } from "../lib/projects.js";
11
- import { Editor as de } from "./Editor.js";
10
+ import { Editor as ue } from "./Editor.js";
11
+ import { projectStatuses as de } from "../lib/projectStates.js";
12
12
  import { IconUpload as fe } from "./IconUpload.js";
13
13
  import { Avatar as u, Button as d, Card as pe, Combobox as f, DatePicker as me, ErrorText as he, IconButton as p, Modal as ge, ModalTitle as _e, Select as m, buttonClasses as h } from "@parallelworks/ui";
14
14
  import { useState as g } from "react";
@@ -19,7 +19,7 @@ import { useQuery as x, useQueryClient as ye } from "@tanstack/react-query";
19
19
  // src/components/NewProjectDialog.tsx
20
20
  var S = h({ size: "sm" });
21
21
  function C({ workspace: h, teamId: C, onClose: w }) {
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
+ let T = _("planning"), E = _("common"), be = ve(), xe = ce(), D = oe(), Se = ye(), O = n(), { members: k, person: Ce } = se(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, {
23
23
  value: t,
24
24
  onValueChange: n,
25
25
  "aria-label": e,
@@ -66,7 +66,7 @@ function C({ workspace: h, teamId: C, onClose: w }) {
66
66
  to: "/$workspace/projects/$projectId",
67
67
  params: {
68
68
  workspace: h,
69
- projectId: ue(n)
69
+ projectId: le(n)
70
70
  }
71
71
  });
72
72
  } catch (e) {
@@ -138,146 +138,9 @@ function C({ workspace: h, teamId: C, onClose: w }) {
138
138
  placeholder: T("summaryPlaceholder"),
139
139
  className: "mt-1 w-full bg-transparent text-sm outline-none placeholder:text-muted-foreground"
140
140
  }),
141
- /* @__PURE__ */ b("div", {
142
- className: "mt-4 flex flex-wrap items-center gap-1.5 border-b border-border pb-4",
143
- children: [
144
- j.length > 0 && /* @__PURE__ */ y(m, {
145
- "aria-label": T("startFrom"),
146
- value: M,
147
- onValueChange: (e) => Ee(e ?? ""),
148
- items: [{
149
- value: "",
150
- label: T("blankProject")
151
- }, ...j.map((e) => ({
152
- value: e.id,
153
- label: e.name
154
- }))],
155
- trigger: /* @__PURE__ */ b("button", {
156
- type: "button",
157
- className: S,
158
- children: [/* @__PURE__ */ y(ae, { className: "size-3.5 text-muted-foreground" }), M ? T("fromTemplate", { name: j.find((e) => e.id === M)?.name ?? "" }) : T("blankProject")]
159
- })
160
- }),
161
- /* @__PURE__ */ y(m, {
162
- "aria-label": T("statusLabel"),
163
- value: L,
164
- onValueChange: (e) => e && je(e),
165
- items: se.map((e) => ({
166
- value: e,
167
- label: T(`status.${e}`),
168
- icon: /* @__PURE__ */ y(c, { status: e })
169
- })),
170
- trigger: /* @__PURE__ */ b("button", {
171
- type: "button",
172
- className: S,
173
- children: [/* @__PURE__ */ y(c, { status: L }), T(`status.${L}`)]
174
- })
175
- }),
176
- /* @__PURE__ */ y(m, {
177
- "aria-label": T("priority"),
178
- value: String(R),
179
- onValueChange: (e) => e && Me(Number(e)),
180
- items: D.map((e, t) => ({
181
- value: String(t),
182
- label: e,
183
- icon: /* @__PURE__ */ y(a, { priority: t })
184
- })),
185
- trigger: /* @__PURE__ */ b("button", {
186
- type: "button",
187
- className: S,
188
- children: [/* @__PURE__ */ y(a, { priority: R }), R ? D[R] : T("noPriority")]
189
- })
190
- }),
191
- /* @__PURE__ */ y(f, {
192
- "aria-label": T("lead"),
193
- value: z,
194
- onValueChange: (e) => Ne(e ?? ""),
195
- items: [{
196
- value: "",
197
- label: T("noLead")
198
- }, ...k.map((e) => ({
199
- value: e.user.username,
200
- label: e.user.name,
201
- icon: /* @__PURE__ */ y(u, {
202
- name: e.user.name,
203
- src: e.user.avatarUrl,
204
- size: "xs",
205
- decorative: !0
206
- })
207
- }))],
208
- trigger: /* @__PURE__ */ y("button", {
209
- type: "button",
210
- className: S,
211
- children: $ ? /* @__PURE__ */ b(v, { children: [/* @__PURE__ */ y(u, {
212
- name: $.name,
213
- src: $.avatarUrl,
214
- size: "xs",
215
- decorative: !0
216
- }), $.name] }) : /* @__PURE__ */ b(v, { children: [/* @__PURE__ */ y(o, { className: "size-3.5 text-muted-foreground" }), /* @__PURE__ */ y("span", {
217
- className: "text-muted-foreground",
218
- children: T("lead")
219
- })] })
220
- })
221
- }),
222
- /* @__PURE__ */ y(f, {
223
- open: K === "members",
224
- onOpenChange: (e) => q(e ? "members" : null),
225
- multiple: !0,
226
- items: k.map((e) => ({
227
- value: e.user.username,
228
- label: e.user.name,
229
- icon: /* @__PURE__ */ y(u, {
230
- name: e.user.name,
231
- src: e.user.avatarUrl,
232
- size: "xs",
233
- decorative: !0
234
- })
235
- })),
236
- value: B,
237
- onValueChange: Pe,
238
- placeholder: T("members"),
239
- trigger: /* @__PURE__ */ b("button", {
240
- type: "button",
241
- className: S,
242
- children: [/* @__PURE__ */ y(s, { className: "size-3.5 text-muted-foreground" }), /* @__PURE__ */ y("span", {
243
- className: B.length ? "" : "text-muted-foreground",
244
- children: B.length ? T("memberCount", { count: B.length }) : T("members")
245
- })]
246
- })
247
- }),
248
- Q(T("startDate"), H, Ie),
249
- Q(T("targetDate"), U, Le),
250
- /* @__PURE__ */ y(f, {
251
- open: K === "teams",
252
- onOpenChange: (e) => q(e ? "teams" : null),
253
- multiple: !0,
254
- items: Z.map((e) => ({
255
- value: e.id,
256
- label: e.name,
257
- hint: e.key,
258
- icon: /* @__PURE__ */ y(l, {
259
- icon: e.icon,
260
- color: e.color,
261
- name: e.name
262
- })
263
- })),
264
- value: V,
265
- onValueChange: Fe,
266
- placeholder: T("teams"),
267
- trigger: /* @__PURE__ */ b("button", {
268
- type: "button",
269
- className: S,
270
- children: [/* @__PURE__ */ y(s, { className: "size-3.5 text-muted-foreground" }), /* @__PURE__ */ y("span", {
271
- className: V.length ? "" : "text-muted-foreground",
272
- children: V.length ? Z.filter((e) => V.includes(e.id)).map((e) => e.key).join(", ") : T("teams")
273
- })]
274
- })
275
- })
276
- ]
277
- }),
278
141
  /* @__PURE__ */ y("div", {
279
142
  className: "mt-4",
280
- children: /* @__PURE__ */ y(de, {
143
+ children: /* @__PURE__ */ y(ue, {
281
144
  value: "",
282
145
  onChange: Ae,
283
146
  placeholder: T("projectBrief"),
@@ -337,7 +200,144 @@ function C({ workspace: h, teamId: C, onClose: w }) {
337
200
  ]
338
201
  }),
339
202
  /* @__PURE__ */ b("div", {
340
- className: "flex items-center gap-2 border-t border-border px-5 py-3",
203
+ className: "flex flex-wrap items-center gap-1.5 border-t border-border px-5 pt-3",
204
+ children: [
205
+ j.length > 0 && /* @__PURE__ */ y(m, {
206
+ "aria-label": T("startFrom"),
207
+ value: M,
208
+ onValueChange: (e) => Ee(e ?? ""),
209
+ items: [{
210
+ value: "",
211
+ label: T("blankProject")
212
+ }, ...j.map((e) => ({
213
+ value: e.id,
214
+ label: e.name
215
+ }))],
216
+ trigger: /* @__PURE__ */ b("button", {
217
+ type: "button",
218
+ className: S,
219
+ children: [/* @__PURE__ */ y(ae, { className: "size-3.5 text-muted-foreground" }), M ? T("fromTemplate", { name: j.find((e) => e.id === M)?.name ?? "" }) : T("blankProject")]
220
+ })
221
+ }),
222
+ /* @__PURE__ */ y(m, {
223
+ "aria-label": T("statusLabel"),
224
+ value: L,
225
+ onValueChange: (e) => e && je(e),
226
+ items: de.map((e) => ({
227
+ value: e,
228
+ label: T(`status.${e}`),
229
+ icon: /* @__PURE__ */ y(c, { status: e })
230
+ })),
231
+ trigger: /* @__PURE__ */ b("button", {
232
+ type: "button",
233
+ className: S,
234
+ children: [/* @__PURE__ */ y(c, { status: L }), T(`status.${L}`)]
235
+ })
236
+ }),
237
+ /* @__PURE__ */ y(m, {
238
+ "aria-label": T("priority"),
239
+ value: String(R),
240
+ onValueChange: (e) => e && Me(Number(e)),
241
+ items: D.map((e, t) => ({
242
+ value: String(t),
243
+ label: e,
244
+ icon: /* @__PURE__ */ y(a, { priority: t })
245
+ })),
246
+ trigger: /* @__PURE__ */ b("button", {
247
+ type: "button",
248
+ className: S,
249
+ children: [/* @__PURE__ */ y(a, { priority: R }), R ? D[R] : T("noPriority")]
250
+ })
251
+ }),
252
+ /* @__PURE__ */ y(f, {
253
+ "aria-label": T("lead"),
254
+ value: z,
255
+ onValueChange: (e) => Ne(e ?? ""),
256
+ items: [{
257
+ value: "",
258
+ label: T("noLead")
259
+ }, ...k.map((e) => ({
260
+ value: e.user.username,
261
+ label: e.user.name,
262
+ icon: /* @__PURE__ */ y(u, {
263
+ name: e.user.name,
264
+ src: e.user.avatarUrl,
265
+ size: "xs",
266
+ decorative: !0
267
+ })
268
+ }))],
269
+ trigger: /* @__PURE__ */ y("button", {
270
+ type: "button",
271
+ className: S,
272
+ children: $ ? /* @__PURE__ */ b(v, { children: [/* @__PURE__ */ y(u, {
273
+ name: $.name,
274
+ src: $.avatarUrl,
275
+ size: "xs",
276
+ decorative: !0
277
+ }), $.name] }) : /* @__PURE__ */ b(v, { children: [/* @__PURE__ */ y(o, { className: "size-3.5 text-muted-foreground" }), /* @__PURE__ */ y("span", {
278
+ className: "text-muted-foreground",
279
+ children: T("lead")
280
+ })] })
281
+ })
282
+ }),
283
+ /* @__PURE__ */ y(f, {
284
+ open: K === "members",
285
+ onOpenChange: (e) => q(e ? "members" : null),
286
+ multiple: !0,
287
+ items: k.map((e) => ({
288
+ value: e.user.username,
289
+ label: e.user.name,
290
+ icon: /* @__PURE__ */ y(u, {
291
+ name: e.user.name,
292
+ src: e.user.avatarUrl,
293
+ size: "xs",
294
+ decorative: !0
295
+ })
296
+ })),
297
+ value: B,
298
+ onValueChange: Pe,
299
+ placeholder: T("members"),
300
+ trigger: /* @__PURE__ */ b("button", {
301
+ type: "button",
302
+ className: S,
303
+ children: [/* @__PURE__ */ y(s, { className: "size-3.5 text-muted-foreground" }), /* @__PURE__ */ y("span", {
304
+ className: B.length ? "" : "text-muted-foreground",
305
+ children: B.length ? T("memberCount", { count: B.length }) : T("members")
306
+ })]
307
+ })
308
+ }),
309
+ Q(T("startDate"), H, Ie),
310
+ Q(T("targetDate"), U, Le),
311
+ /* @__PURE__ */ y(f, {
312
+ open: K === "teams",
313
+ onOpenChange: (e) => q(e ? "teams" : null),
314
+ multiple: !0,
315
+ items: Z.map((e) => ({
316
+ value: e.id,
317
+ label: e.name,
318
+ hint: e.key,
319
+ icon: /* @__PURE__ */ y(l, {
320
+ icon: e.icon,
321
+ color: e.color,
322
+ name: e.name
323
+ })
324
+ })),
325
+ value: V,
326
+ onValueChange: Fe,
327
+ placeholder: T("teams"),
328
+ trigger: /* @__PURE__ */ b("button", {
329
+ type: "button",
330
+ className: S,
331
+ children: [/* @__PURE__ */ y(s, { className: "size-3.5 text-muted-foreground" }), /* @__PURE__ */ y("span", {
332
+ className: V.length ? "" : "text-muted-foreground",
333
+ children: V.length ? Z.filter((e) => V.includes(e.id)).map((e) => e.key).join(", ") : T("teams")
334
+ })]
335
+ })
336
+ })
337
+ ]
338
+ }),
339
+ /* @__PURE__ */ b("div", {
340
+ className: "flex items-center gap-2 px-5 py-3",
341
341
  children: [
342
342
  /* @__PURE__ */ y(he, {
343
343
  size: "md",
@@ -1,8 +1,8 @@
1
1
  import { ErrorMessage as e } from "./status.js";
2
2
  import { Link as t } from "../lib/router.js";
3
3
  import { personActivityQuery as n } from "../api/queries.js";
4
- import { addDays as r, today as i, useTime as a } from "../lib/time.js";
5
- import { usePeople as o } from "../lib/people.js";
4
+ import { usePeople as r } from "../lib/people.js";
5
+ import { addDays as i, today as a, useTime as o } from "../lib/time.js";
6
6
  import { Timeline as s, TimelineItem as c, activityIcon as l } from "./ActivityTimeline.js";
7
7
  import { Button as u, EmptyState as d } from "@parallelworks/ui";
8
8
  import { useLocale as f, useTranslations as p } from "use-intl";
@@ -25,7 +25,7 @@ var _ = /* @__PURE__ */ new Set([
25
25
  return `${t.getFullYear()}-${n(t.getMonth() + 1)}-${n(t.getDate())}`;
26
26
  };
27
27
  function y({ workspace: y, username: b }) {
28
- let x = p("person.activity"), S = f(), C = a(), { nameOf: w, actorName: T } = o(y), { data: E, error: D, fetchNextPage: O, hasNextPage: k, isFetchingNextPage: A, isPending: j } = g(n(y, b)), M = (E?.pages.flatMap((e) => e.items) ?? []).filter((e) => e.issue || e.doc || _.has(e.type) || e.data.name);
28
+ let x = p("person.activity"), S = f(), C = o(), { nameOf: w, actorName: T } = r(y), { data: E, error: D, fetchNextPage: O, hasNextPage: k, isFetchingNextPage: A, isPending: j } = g(n(y, b)), M = (E?.pages.flatMap((e) => e.items) ?? []).filter((e) => e.issue || e.doc || _.has(e.type) || e.data.name);
29
29
  if (j) return null;
30
30
  if (D && !E) return /* @__PURE__ */ m(e, { error: D });
31
31
  if (M.length === 0) return /* @__PURE__ */ m(d, {
@@ -89,7 +89,7 @@ function y({ workspace: y, username: b }) {
89
89
  rows: [e]
90
90
  });
91
91
  }
92
- let z = new Intl.RelativeTimeFormat(S, { numeric: "auto" }), B = i(), V = (e) => e === B ? z.format(0, "day") : e === r(B, -1) ? z.format(-1, "day") : C.day(e);
92
+ let z = new Intl.RelativeTimeFormat(S, { numeric: "auto" }), B = a(), V = (e) => e === B ? z.format(0, "day") : e === i(B, -1) ? z.format(-1, "day") : C.day(e);
93
93
  return /* @__PURE__ */ h("div", {
94
94
  className: "w-full max-w-3xl px-4 py-4 md:px-6",
95
95
  children: [R.map(({ day: e, rows: t }) => /* @__PURE__ */ h("section", {
@@ -3,8 +3,8 @@ import { Link as t, useNavigate as n } from "../lib/router.js";
3
3
  import { sharedDocQuery as r, sharedQuery as i, siteDocQuery as a, siteQuery as o, siteSearchQuery as s } from "../api/queries.js";
4
4
  import { docKey as c } from "../lib/docs.js";
5
5
  import { DocIcon as l } from "./DocIcon.js";
6
- import { Logo as u } from "./Logo.js";
7
- import { Editor as d } from "./Editor.js";
6
+ import { Editor as u } from "./Editor.js";
7
+ import { Logo as d } from "./Logo.js";
8
8
  import { DocOutline as f } from "./DocOutline.js";
9
9
  import { Disclosure as p, SearchInput as m, buttonClasses as h, cx as g } from "@parallelworks/ui";
10
10
  import { useEffect as _, useMemo as v, useRef as y, useState as b } from "react";
@@ -39,7 +39,7 @@ function E({ source: s, doc: m }) {
39
39
  children: /* @__PURE__ */ C("div", {
40
40
  className: "w-full max-w-sm",
41
41
  children: [
42
- /* @__PURE__ */ S(u, { className: "mb-10" }),
42
+ /* @__PURE__ */ S(d, { className: "mb-10" }),
43
43
  /* @__PURE__ */ S("h1", {
44
44
  className: "text-2xl font-semibold tracking-tight",
45
45
  children: w(n ? "signInTitle" : "site" in s ? "noSiteTitle" : "goneTitle")
@@ -67,7 +67,7 @@ function E({ source: s, doc: m }) {
67
67
  /* @__PURE__ */ C("header", {
68
68
  className: "flex h-12 shrink-0 items-center gap-3 border-b border-border px-4 md:px-5",
69
69
  children: [
70
- /* @__PURE__ */ S(u, { className: "h-5 max-sm:hidden" }),
70
+ /* @__PURE__ */ S(d, { className: "h-5 max-sm:hidden" }),
71
71
  /* @__PURE__ */ S("span", {
72
72
  className: "truncate text-sm font-semibold",
73
73
  children: D.data?.title
@@ -133,7 +133,7 @@ function E({ source: s, doc: m }) {
133
133
  className: "text-2xl font-semibold tracking-tight",
134
134
  children: M.data?.title
135
135
  }),
136
- M.data && /* @__PURE__ */ S(d, {
136
+ M.data && /* @__PURE__ */ S(u, {
137
137
  value: M.data.body ?? "",
138
138
  editable: !1,
139
139
  onEditor: F,
@@ -2,12 +2,12 @@ import { api as e, unwrap as t } from "../api/client.js";
2
2
  import { useNavigate as n } from "../lib/router.js";
3
3
  import { docQuery as r } from "../api/queries.js";
4
4
  import { docRef as i, docURL as a } from "../lib/docs.js";
5
- import { useAttachmentsOn as o } from "./Attachments.js";
6
- import { openToggleAtCaret as s } from "./toggle.js";
7
- import { insertColumns as c } from "./columns.js";
8
- import { isoDate as l } from "../lib/datePhrases.js";
9
- import { useEditorListbox as u } from "./editorListbox.js";
10
- import { insertLinkCard as d } from "./LinkCard.js";
5
+ import { openToggleAtCaret as o } from "./toggle.js";
6
+ import { insertColumns as s } from "./columns.js";
7
+ import { isoDate as c } from "../lib/datePhrases.js";
8
+ import { useEditorListbox as l } from "./editorListbox.js";
9
+ import { insertLinkCard as u } from "./LinkCard.js";
10
+ import { useAttachmentsOn as d } from "./Attachments.js";
11
11
  import { ListboxOption as f, ListboxPanel as p, useListboxNavigation as m } from "@parallelworks/ui";
12
12
  import { useParams as h } from "@tanstack/react-router";
13
13
  import { useEffect as g, useMemo as _, useRef as v, useState as y } from "react";
@@ -95,9 +95,9 @@ var w = {
95
95
  linkCard: (e) => e,
96
96
  toggle: (e) => e.setDetails(),
97
97
  divider: (e) => e.setHorizontalRule(),
98
- columns2: (e) => c(e, 2),
99
- columns3: (e) => c(e, 3),
100
- columns4: (e) => c(e, 4),
98
+ columns2: (e) => s(e, 2),
99
+ columns3: (e) => s(e, 3),
100
+ columns4: (e) => s(e, 4),
101
101
  file: (e) => e,
102
102
  table: (e) => e.insertTable({
103
103
  rows: 3,
@@ -110,7 +110,7 @@ var w = {
110
110
  issueList: (e) => e.insertContent({ type: "issueList" }),
111
111
  date: (e) => e.insertContent([{
112
112
  type: "dateChip",
113
- attrs: { date: l(/* @__PURE__ */ new Date()) }
113
+ attrs: { date: c(/* @__PURE__ */ new Date()) }
114
114
  }, {
115
115
  type: "text",
116
116
  text: " "
@@ -136,22 +136,22 @@ function O(e) {
136
136
  n.length > 0 && e(n);
137
137
  }), t.click();
138
138
  }
139
- function k({ editor: c, onFiles: l }) {
140
- 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) => {
141
- if (!c || !P || !F) return;
142
- let o = await L.fetchQuery(r(P, F)), s = t(await e.POST("/api/v1/workspaces/{workspace}/docs", {
139
+ function k({ editor: s, onFiles: c }) {
140
+ let k = b("slashMenu"), [A, j] = y(null), M = d(), N = !!c?.current && M, { workspace: P, doc: F } = h({ strict: !1 }), I = !!P && !!F, L = S(), R = n(), z = b("docs"), B = async (n) => {
141
+ if (!s || !P || !F) return;
142
+ let o = await L.fetchQuery(r(P, F)), c = t(await e.POST("/api/v1/workspaces/{workspace}/docs", {
143
143
  params: { path: { workspace: P } },
144
144
  body: {
145
145
  title: z("untitled"),
146
146
  parent: o.key
147
147
  }
148
148
  }));
149
- c.chain().insertContentAt(n, [{
149
+ s.chain().insertContentAt(n, [{
150
150
  type: "text",
151
- text: s.title,
151
+ text: c.title,
152
152
  marks: [{
153
153
  type: "link",
154
- attrs: { href: a(P, s) }
154
+ attrs: { href: a(P, c) }
155
155
  }]
156
156
  }, {
157
157
  type: "text",
@@ -164,7 +164,7 @@ function k({ editor: c, onFiles: l }) {
164
164
  to: "/$workspace/docs/$doc",
165
165
  params: {
166
166
  workspace: P,
167
- doc: i(s)
167
+ doc: i(c)
168
168
  },
169
169
  search: { rename: !0 }
170
170
  });
@@ -179,23 +179,23 @@ function k({ editor: c, onFiles: l }) {
179
179
  I
180
180
  ]);
181
181
  g(() => {
182
- if (!c) return;
182
+ if (!s) return;
183
183
  let e = () => {
184
- j(c.isEditable && c.isFocused ? C(c) : null), W.current(0);
184
+ j(s.isEditable && s.isFocused ? C(s) : null), W.current(0);
185
185
  };
186
- return c.on("selectionUpdate", e), c.on("update", e), c.on("blur", e), () => {
187
- c.off("selectionUpdate", e), c.off("update", e), c.off("blur", e);
186
+ return s.on("selectionUpdate", e), s.on("update", e), s.on("blur", e), () => {
187
+ s.off("selectionUpdate", e), s.off("update", e), s.off("blur", e);
188
188
  };
189
- }, [c]);
189
+ }, [s]);
190
190
  let H = (e) => {
191
- if (!c || !A || !e) return;
192
- let t = c.chain().focus().deleteRange({
191
+ if (!s || !A || !e) return;
192
+ let t = s.chain().focus().deleteRange({
193
193
  from: A.from,
194
194
  to: A.to
195
195
  });
196
- if (E.includes(e) ? (t.run(), T[e](c.chain().focus()).run()) : T[e](t).run(), e === "toggle" && s(c), e === "linkCard" && d(c), j(null), e === "page" && B(c.state.selection.from), e === "file") {
197
- let e = c.state.selection.from;
198
- O((t) => l?.current?.(t, e));
196
+ if (E.includes(e) ? (t.run(), T[e](s.chain().focus()).run()) : T[e](t).run(), e === "toggle" && o(s), e === "linkCard" && u(s), j(null), e === "page" && B(s.state.selection.from), e === "file") {
197
+ let e = s.state.selection.from;
198
+ O((t) => c?.current?.(t, e));
199
199
  }
200
200
  }, U = m({
201
201
  items: V,
@@ -203,7 +203,7 @@ function k({ editor: c, onFiles: l }) {
203
203
  onDismiss: () => j(null),
204
204
  open: !!A
205
205
  }), W = v(U.setActive);
206
- return W.current = U.setActive, u(c, U, !!A && V.length > 0), !A || V.length === 0 ? null : /* @__PURE__ */ x(p, {
206
+ return W.current = U.setActive, l(s, U, !!A && V.length > 0), !A || V.length === 0 ? null : /* @__PURE__ */ x(p, {
207
207
  at: {
208
208
  clientX: A.x,
209
209
  clientY: A.y