@parallelworks/tandem-web 0.138.2 → 0.139.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/components/AgentWork.js +35 -35
  2. package/components/AppRoot.js +8 -7
  3. package/components/AreaWork.js +1 -1
  4. package/components/BlockHandle.js +3 -3
  5. package/components/CommandPalette.js +27 -27
  6. package/components/DateChip.js +27 -27
  7. package/components/DocLinkPicker.js +17 -17
  8. package/components/Graph.js +6 -6
  9. package/components/HoverCards.js +30 -29
  10. package/components/IssueListBlock.js +83 -83
  11. package/components/LinkCard.js +20 -20
  12. package/components/MentionPicker.js +12 -12
  13. package/components/NewIssueDialog.js +116 -116
  14. package/components/NewProjectDialog.js +5 -4
  15. package/components/Planning.js +31 -43
  16. package/components/RouterLink.js +4 -4
  17. package/components/ShareDialog.js +12 -12
  18. package/components/SharedUI.js +19 -19
  19. package/components/SlashMenu.js +11 -11
  20. package/components/SubPages.js +10 -10
  21. package/components/UnlinkedMentions.js +10 -10
  22. package/components/WorkCounts.js +8 -8
  23. package/components/settings.js +31 -31
  24. package/hostedApp.js +41 -39
  25. package/hosting.d.ts +24 -11
  26. package/index.js +58 -27
  27. package/lib/base.js +1 -14
  28. package/lib/docs.js +6 -6
  29. package/lib/issueMenu.js +33 -33
  30. package/lib/knowledge.js +90 -101
  31. package/lib/knowledgeKinds.js +14 -0
  32. package/lib/pageTitle.js +22 -10
  33. package/lib/projectList.js +1 -1
  34. package/lib/projectStates.js +15 -0
  35. package/lib/router.js +20 -34
  36. package/package.json +2 -2
  37. package/pages/areas.js +223 -223
  38. package/pages/decisions.js +69 -69
  39. package/pages/issues.js +38 -38
  40. package/pages/projects.js +268 -267
  41. package/pages/triage.js +133 -133
  42. package/pages.js +21 -0
  43. package/routes/__root.js +6 -6
  44. package/routes/_workspace/agents/_slug2.js +21 -21
  45. package/routes/_workspace/agents/index2.js +16 -16
  46. package/routes/_workspace/areas/_area2.js +105 -105
  47. package/routes/_workspace/docs/_doc2.js +189 -189
  48. package/routes/_workspace/docs2.js +8 -8
  49. package/routes/_workspace/graph2.js +9 -9
  50. package/routes/_workspace/graph3.js +8 -8
  51. package/routes/_workspace/issues/_identifier2.js +249 -249
  52. package/routes/_workspace/issues/index.js +6 -6
  53. package/routes/_workspace/knowledge/_term2.js +119 -118
  54. package/routes/_workspace/knowledge/index.js +8 -8
  55. package/routes/_workspace/knowledge/index2.js +41 -40
  56. package/routes/_workspace/measures2.js +4 -4
  57. package/routes/_workspace/measures3.js +18 -18
  58. package/routes/_workspace/notifications2.js +112 -112
  59. package/routes/_workspace/people/_username.js +4 -4
  60. package/routes/_workspace/people/_username2.js +36 -36
  61. package/routes/_workspace/projects/_projectId3.js +369 -368
  62. package/routes/_workspace/projects/index.js +7 -7
  63. package/routes/_workspace/settings/account2.js +3 -3
  64. package/routes/_workspace/settings/audit-log2.js +4 -4
  65. package/routes/_workspace/settings/audit-log3.js +51 -51
  66. package/routes/_workspace/settings/labels2.js +14 -14
  67. package/routes/_workspace/settings/members2.js +9 -9
  68. package/routes/_workspace/settings/runners2.js +11 -11
  69. package/routes/_workspace/settings/teams2.js +15 -15
  70. package/routes/_workspace/settings/tokens2.js +5 -5
  71. package/routes/_workspace/settings/webhooks2.js +7 -7
  72. package/routes/_workspace/settings2.js +3 -3
  73. package/routes/_workspace/teams/_key/cycles/_number2.js +16 -16
  74. package/routes/_workspace/teams/_key/cycles/index2.js +40 -40
  75. package/routes/_workspace/teams/_key/issues.js +4 -4
  76. package/routes/_workspace/teams/_key/projects.js +4 -4
  77. package/routes/_workspace/teams/_key/settings2.js +133 -133
  78. package/routes/_workspace2.js +319 -319
  79. package/routes/docs/route2.js +19 -19
  80. package/routes/new2.js +8 -8
  81. package/routes/request2._token.js +4 -4
package/pages/areas.js CHANGED
@@ -1,9 +1,9 @@
1
- import { Link as e } from "../lib/router.js";
2
- import { areasQuery as t, countsQuery as n, docsQuery as r, inboxQuery as i, teamsQuery as a, unfiledQuery as o, workspaceQuery as s } from "../api/queries.js";
3
- import { AddIcon as c, AreaIcon as l, ChevronRightIcon as u, FileTextIcon as d, GridIcon as f, ListViewIcon as p } from "../components/icons.js";
4
- import { docRef as m } from "../lib/docs.js";
5
- import { usePeople as h } from "../lib/people.js";
6
- import { usePageTitle as g } from "../lib/pageTitle.js";
1
+ import { usePageTitle as e } from "../lib/pageTitle.js";
2
+ import { Link as t } from "../lib/router.js";
3
+ import { areasQuery as n, countsQuery as r, docsQuery as i, inboxQuery as a, teamsQuery as o, unfiledQuery as s, workspaceQuery as c } from "../api/queries.js";
4
+ import { AddIcon as l, AreaIcon as u, ChevronRightIcon as d, FileTextIcon as f, GridIcon as p, ListViewIcon as m } from "../components/icons.js";
5
+ import { docRef as h } from "../lib/docs.js";
6
+ import { usePeople as g } from "../lib/people.js";
7
7
  import { EntityIcon as _ } from "../components/EntityIcon.js";
8
8
  import { DocIcon as v } from "../components/DocIcon.js";
9
9
  import { actorAvatar as y } from "../lib/avatar.js";
@@ -11,26 +11,26 @@ import { FoldedAnswer as b, KnowledgeRow as x } from "../components/AreaWork.js"
11
11
  import { WorkCounts as S } from "../components/WorkCounts.js";
12
12
  import { useAreaActions as C } from "../lib/areas.js";
13
13
  import { AreaTile as w, AreaTiles as T, PlaceTile as E } from "../components/AreaTiles.js";
14
- import { Avatar as D, Breadcrumbs as O, Button as k, Combobox as A, EmptyState as j, ErrorText as M, IconButton as N, Input as P, Modal as F, ModalTitle as I, SegmentedControl as L, Select as R, Tooltip as z, buttonClasses as ee, menuDivider as B, useOpenMenu as V } from "@parallelworks/ui";
15
- import { Fragment as H, useMemo as U, useState as W } from "react";
16
- import { useErrorMessage as G } from "@parallelworks/problem/react";
17
- import { useTranslations as K } from "use-intl";
18
- import { Fragment as q, jsx as J, jsxs as Y } from "react/jsx-runtime";
19
- import { useParams as X, useSearch as te } from "@tanstack/react-router";
14
+ import { Avatar as D, Breadcrumbs as O, Button as k, Combobox as A, EmptyState as j, ErrorText as M, IconButton as N, Input as P, Modal as F, ModalTitle as I, SegmentedControl as ee, Select as L, Tooltip as R, buttonClasses as te, menuDivider as z, useOpenMenu as B } from "@parallelworks/ui";
15
+ import { useParams as V, useSearch as H } from "@tanstack/react-router";
16
+ import { Fragment as U, useMemo as W, useState as G } from "react";
17
+ import { useErrorMessage as K } from "@parallelworks/problem/react";
18
+ import { useTranslations as q } from "use-intl";
19
+ import { Fragment as J, jsx as Y, jsxs as X } from "react/jsx-runtime";
20
20
  import { useQuery as Z, useSuspenseQuery as Q } from "@tanstack/react-query";
21
21
  import { MoreButton as ne } from "@parallelworks/ui/list";
22
22
  // src/pages/areas.tsx
23
23
  var re = (...e) => e.filter(Boolean).join(" ");
24
24
  function ie() {
25
- let e = K("areas"), { workspace: r, key: i } = X({ strict: !1 }), { team: u = i } = te({ strict: !1 }), { data: d } = Q(t(r)), { data: m } = Q(a(r)), h = m.find((e) => e.key === u);
26
- g(e("title"), h?.name);
27
- let v = h ? d.filter((e) => e.teamId === h.id) : d, { data: y } = Q(s(r)), { data: C } = Q(n(r)), [w, T] = W(null), { data: E } = Z(o(r, h?.key)), D = (E?.proposed.length ?? 0) + (E?.notInDocs.length ?? 0), O = v.filter((e) => e.status === "proposed"), A = [...!h && d.some((e) => !e.teamId) ? [{
25
+ let t = q("areas"), { workspace: i, key: a } = V({ strict: !1 }), { team: d = a } = H({ strict: !1 }), { data: f } = Q(n(i)), { data: h } = Q(o(i)), g = h.find((e) => e.key === d);
26
+ e(t("title"), g?.name);
27
+ let v = g ? f.filter((e) => e.teamId === g.id) : f, { data: y } = Q(c(i)), { data: C } = Q(r(i)), [w, T] = G(null), { data: E } = Z(s(i, g?.key)), D = (E?.proposed.length ?? 0) + (E?.notInDocs.length ?? 0), O = v.filter((e) => e.status === "proposed"), A = [...!g && f.some((e) => !e.teamId) ? [{
28
28
  id: "",
29
29
  key: "workspace",
30
30
  name: y.name,
31
31
  icon: y.icon,
32
32
  color: y.color
33
- }] : [], ...m.filter((e) => !e.archivedAt && (!h || e.id === h.id)).map((e) => ({
33
+ }] : [], ...h.filter((e) => !e.archivedAt && (!g || e.id === g.id)).map((e) => ({
34
34
  id: e.id,
35
35
  key: e.key,
36
36
  name: e.name,
@@ -39,93 +39,93 @@ function ie() {
39
39
  team: e
40
40
  }))], M = (e) => A.find((t) => t.id === (e.teamId ?? "")), P = () => T({
41
41
  kind: "create",
42
- ...h && { space: h.key }
43
- }), F = de(r, (e) => T({
42
+ ...g && { space: g.key }
43
+ }), F = de(i, (e) => T({
44
44
  kind: "edit",
45
45
  area: e
46
46
  }), (e) => T({
47
47
  kind: "create",
48
48
  parent: e
49
- })), [I, R] = W(se), z = E && /* @__PURE__ */ Y(q, { children: [E.proposed.map((e) => /* @__PURE__ */ J(x, {
50
- workspace: r,
49
+ })), [I, L] = G(se), R = E && /* @__PURE__ */ X(J, { children: [E.proposed.map((e) => /* @__PURE__ */ Y(x, {
50
+ workspace: i,
51
51
  entry: e,
52
52
  isNew: !1
53
- }, e.id)), E.notInDocs.map((e) => /* @__PURE__ */ J(b, {
54
- workspace: r,
53
+ }, e.id)), E.notInDocs.map((e) => /* @__PURE__ */ Y(b, {
54
+ workspace: i,
55
55
  decision: e,
56
56
  isNew: !1,
57
57
  notInDocs: !0
58
58
  }, e.id))] });
59
- return /* @__PURE__ */ Y("div", {
59
+ return /* @__PURE__ */ X("div", {
60
60
  className: "flex h-full flex-col",
61
61
  children: [
62
- /* @__PURE__ */ Y("header", {
62
+ /* @__PURE__ */ X("header", {
63
63
  className: "flex h-12 shrink-0 items-center gap-3 border-b border-border px-4 md:px-5",
64
64
  children: [
65
- /* @__PURE__ */ J("h1", {
65
+ /* @__PURE__ */ Y("h1", {
66
66
  className: "text-sm font-semibold",
67
- children: h ? e("teamTitle", { team: h.name }) : e("title")
67
+ children: g ? t("teamTitle", { team: g.name }) : t("title")
68
68
  }),
69
- /* @__PURE__ */ J("span", {
69
+ /* @__PURE__ */ Y("span", {
70
70
  className: "text-xs text-muted-foreground tabular-nums",
71
- children: e("count", { count: v.length })
71
+ children: t("count", { count: v.length })
72
72
  }),
73
- /* @__PURE__ */ J(S, {
74
- counts: h ? C.teams[h.id] : C.workspace,
75
- teamId: h?.id,
73
+ /* @__PURE__ */ Y(S, {
74
+ counts: g ? C.teams[g.id] : C.workspace,
75
+ teamId: g?.id,
76
76
  className: "max-sm:hidden"
77
77
  }),
78
- /* @__PURE__ */ J("div", {
78
+ /* @__PURE__ */ Y("div", {
79
79
  className: "ml-auto",
80
- children: /* @__PURE__ */ J(L, {
81
- label: e("view"),
80
+ children: /* @__PURE__ */ Y(ee, {
81
+ label: t("view"),
82
82
  size: "sm",
83
83
  value: I,
84
84
  onValueChange: (e) => {
85
- R(e), ce(e);
85
+ L(e), ce(e);
86
86
  },
87
87
  options: [{
88
88
  value: "icons",
89
- label: e("icons"),
90
- icon: /* @__PURE__ */ J(f, {})
89
+ label: t("icons"),
90
+ icon: /* @__PURE__ */ Y(p, {})
91
91
  }, {
92
92
  value: "list",
93
- label: e("list"),
94
- icon: /* @__PURE__ */ J(p, {})
93
+ label: t("list"),
94
+ icon: /* @__PURE__ */ Y(m, {})
95
95
  }]
96
96
  })
97
97
  }),
98
- /* @__PURE__ */ J(k, {
98
+ /* @__PURE__ */ Y(k, {
99
99
  variant: "primary",
100
100
  size: "sm",
101
- icon: /* @__PURE__ */ J(c, { className: "size-3.5" }),
101
+ icon: /* @__PURE__ */ Y(l, { className: "size-3.5" }),
102
102
  onClick: P,
103
- children: e("new")
103
+ children: t("new")
104
104
  })
105
105
  ]
106
106
  }),
107
- /* @__PURE__ */ Y("div", {
107
+ /* @__PURE__ */ X("div", {
108
108
  className: "min-h-0 flex-1 overflow-y-auto",
109
109
  children: [
110
- v.length === 0 ? /* @__PURE__ */ J("div", {
110
+ v.length === 0 ? /* @__PURE__ */ Y("div", {
111
111
  className: "p-6",
112
- children: /* @__PURE__ */ J(j, {
113
- icon: /* @__PURE__ */ J(l, {}),
114
- title: e("none"),
115
- description: e("description"),
116
- action: /* @__PURE__ */ J(k, {
112
+ children: /* @__PURE__ */ Y(j, {
113
+ icon: /* @__PURE__ */ Y(u, {}),
114
+ title: t("none"),
115
+ description: t("description"),
116
+ action: /* @__PURE__ */ Y(k, {
117
117
  variant: "primary",
118
118
  size: "sm",
119
119
  onClick: P,
120
- children: e("new")
120
+ children: t("new")
121
121
  })
122
122
  })
123
- }) : /* @__PURE__ */ Y(q, { children: [O.length > 0 && /* @__PURE__ */ J($, {
124
- title: e("toReview"),
123
+ }) : /* @__PURE__ */ X(J, { children: [O.length > 0 && /* @__PURE__ */ Y($, {
124
+ title: t("toReview"),
125
125
  count: O.length,
126
- icon: /* @__PURE__ */ J(l, { className: "size-4 text-warning" }),
127
- children: O.map((e) => /* @__PURE__ */ J(pe, {
128
- workspace: r,
126
+ icon: /* @__PURE__ */ Y(u, { className: "size-4 text-warning" }),
127
+ children: O.map((e) => /* @__PURE__ */ Y(pe, {
128
+ workspace: i,
129
129
  area: e,
130
130
  counts: C.areas[e.id],
131
131
  siblings: v.filter((t) => (t.teamId ?? "") === (e.teamId ?? "")),
@@ -133,101 +133,101 @@ function ie() {
133
133
  review: M(e)?.name,
134
134
  areaMenu: F
135
135
  }, e.id))
136
- }), I === "icons" ? /* @__PURE__ */ J(ue, {
137
- workspace: r,
136
+ }), I === "icons" ? /* @__PURE__ */ Y(ue, {
137
+ workspace: i,
138
138
  spaces: A,
139
139
  areas: v,
140
140
  unfiledCount: D,
141
- unfiledRows: z,
141
+ unfiledRows: R,
142
142
  areaMenu: F,
143
143
  onCreate: T
144
- }, h?.id ?? "") : A.map((t) => {
145
- let n = v.filter((e) => (e.teamId ?? "") === t.id);
146
- return /* @__PURE__ */ J($, {
147
- title: t.name,
144
+ }, g?.id ?? "") : A.map((e) => {
145
+ let n = v.filter((t) => (t.teamId ?? "") === e.id);
146
+ return /* @__PURE__ */ Y($, {
147
+ title: e.name,
148
148
  count: n.length,
149
- icon: /* @__PURE__ */ J(_, {
150
- icon: t.icon,
151
- color: t.color,
152
- name: t.name
149
+ icon: /* @__PURE__ */ Y(_, {
150
+ icon: e.icon,
151
+ color: e.color,
152
+ name: e.name
153
153
  }),
154
- extra: t.team && /* @__PURE__ */ J(S, {
155
- counts: C.teams[t.team.id],
156
- teamId: t.team.id,
154
+ extra: e.team && /* @__PURE__ */ Y(S, {
155
+ counts: C.teams[e.team.id],
156
+ teamId: e.team.id,
157
157
  className: "max-sm:hidden"
158
158
  }),
159
- action: t.team && /* @__PURE__ */ J(N, {
159
+ action: e.team && /* @__PURE__ */ Y(N, {
160
160
  variant: "ghost",
161
161
  size: "xs",
162
- icon: /* @__PURE__ */ J(c, { className: "size-3.5" }),
163
- label: e("newIn", { space: t.name }),
162
+ icon: /* @__PURE__ */ Y(l, { className: "size-3.5" }),
163
+ label: t("newIn", { space: e.name }),
164
164
  onClick: () => T({
165
165
  kind: "create",
166
- space: t.key
166
+ space: e.key
167
167
  })
168
168
  }),
169
- children: /* @__PURE__ */ J(ae, {
170
- workspace: r,
169
+ children: /* @__PURE__ */ Y(ae, {
170
+ workspace: i,
171
171
  areas: n,
172
172
  counts: C.areas,
173
173
  parent: void 0,
174
174
  depth: 0,
175
175
  areaMenu: F
176
176
  })
177
- }, t.key);
177
+ }, e.key);
178
178
  })] }),
179
- I === "list" && D > 0 && /* @__PURE__ */ J($, {
180
- title: e("unfiled"),
179
+ I === "list" && D > 0 && /* @__PURE__ */ Y($, {
180
+ title: t("unfiled"),
181
181
  count: D,
182
- icon: /* @__PURE__ */ J(l, { className: "size-4 text-muted-foreground" }),
183
- children: z
182
+ icon: /* @__PURE__ */ Y(u, { className: "size-4 text-muted-foreground" }),
183
+ children: R
184
184
  }),
185
- /* @__PURE__ */ J(me, { workspace: r })
185
+ /* @__PURE__ */ Y(me, { workspace: i })
186
186
  ]
187
187
  }),
188
- w && /* @__PURE__ */ J(ge, {
189
- workspace: r,
188
+ w && /* @__PURE__ */ Y(ge, {
189
+ workspace: i,
190
190
  editing: w,
191
191
  spaces: A.filter((e) => e.team),
192
- areas: d,
192
+ areas: f,
193
193
  onClose: () => T(null)
194
194
  })
195
195
  ]
196
196
  });
197
197
  }
198
198
  function $({ title: e, count: t, icon: n, extra: r, action: i, bare: a = !1, children: o }) {
199
- return /* @__PURE__ */ Y("section", {
199
+ return /* @__PURE__ */ X("section", {
200
200
  "aria-label": e,
201
- children: [/* @__PURE__ */ Y("h2", {
201
+ children: [/* @__PURE__ */ X("h2", {
202
202
  className: "sticky top-0 z-10 flex h-9 items-center gap-2 border-b border-border bg-background px-4 text-xs font-medium md:px-5",
203
203
  children: [
204
204
  n,
205
- /* @__PURE__ */ J("span", {
205
+ /* @__PURE__ */ Y("span", {
206
206
  className: "truncate",
207
207
  children: e
208
208
  }),
209
- /* @__PURE__ */ J("span", {
209
+ /* @__PURE__ */ Y("span", {
210
210
  className: "text-muted-foreground tabular-nums",
211
211
  children: t
212
212
  }),
213
213
  r,
214
- i && /* @__PURE__ */ J("span", {
214
+ i && /* @__PURE__ */ Y("span", {
215
215
  className: "ml-auto flex",
216
216
  children: i
217
217
  })
218
218
  ]
219
- }), t > 0 && (a ? o : /* @__PURE__ */ J("ul", { children: o }))]
219
+ }), t > 0 && (a ? o : /* @__PURE__ */ Y("ul", { children: o }))]
220
220
  });
221
221
  }
222
222
  function ae({ workspace: e, areas: t, counts: n, parent: r, depth: i, areaMenu: a }) {
223
- return t.filter((e) => e.parentId === r).map((r) => /* @__PURE__ */ Y(H, { children: [/* @__PURE__ */ J(pe, {
223
+ return t.filter((e) => e.parentId === r).map((r) => /* @__PURE__ */ X(U, { children: [/* @__PURE__ */ Y(pe, {
224
224
  workspace: e,
225
225
  area: r,
226
226
  counts: n[r.id],
227
227
  siblings: t,
228
228
  depth: i,
229
229
  areaMenu: a
230
- }), /* @__PURE__ */ J(ae, {
230
+ }), /* @__PURE__ */ Y(ae, {
231
231
  workspace: e,
232
232
  areas: t,
233
233
  counts: n,
@@ -250,42 +250,42 @@ function ce(e) {
250
250
  } catch {}
251
251
  }
252
252
  var le = /* @__PURE__ */ new Map();
253
- function ue({ workspace: t, spaces: n, areas: r, unfiledCount: a, unfiledRows: o, areaMenu: s, onCreate: u }) {
254
- let d = K("areas"), { data: f = [] } = Z(i(t)), p = `${t}/${n.map((e) => e.id).join(",")}`, [m, h] = W(() => le.get(p) ?? null), g = (e) => {
253
+ function ue({ workspace: e, spaces: n, areas: r, unfiledCount: i, unfiledRows: o, areaMenu: s, onCreate: c }) {
254
+ let d = q("areas"), { data: f = [] } = Z(a(e)), p = `${e}/${n.map((e) => e.id).join(",")}`, [m, h] = G(() => le.get(p) ?? null), g = (e) => {
255
255
  le.set(p, e), h(e);
256
- }, v = U(() => {
256
+ }, v = W(() => {
257
257
  let e = /* @__PURE__ */ new Map();
258
258
  for (let t of f) t.area && e.set(t.area.id, (e.get(t.area.id) ?? 0) + 1);
259
259
  let t = (n) => (e.get(n) ?? 0) + r.filter((e) => e.parentId === n).reduce((e, n) => e + t(n.id), 0);
260
260
  return t;
261
- }, [f, r]), y = (e) => r.filter((t) => t.parentId === e), b = (e, n) => e.map((e) => /* @__PURE__ */ J(w, {
262
- workspace: t,
263
- area: e,
264
- inside: y(e.id).length,
265
- decisions: v(e.id),
266
- menu: () => s(e, n),
261
+ }, [f, r]), y = (e) => r.filter((t) => t.parentId === e), b = (t, n) => t.map((t) => /* @__PURE__ */ Y(w, {
262
+ workspace: e,
263
+ area: t,
264
+ inside: y(t.id).length,
265
+ decisions: v(t.id),
266
+ menu: () => s(t, n),
267
267
  onOpen: (e) => g({
268
268
  kind: "area",
269
269
  trail: [...m?.kind === "area" ? m.trail : [], e]
270
270
  })
271
- }, e.id)), x = a > 0 && /* @__PURE__ */ J(E, {
271
+ }, t.id)), x = i > 0 && /* @__PURE__ */ Y(E, {
272
272
  name: d("unfiled"),
273
- icon: /* @__PURE__ */ J(l, { className: "size-7 opacity-60" }),
274
- hint: a,
273
+ icon: /* @__PURE__ */ Y(u, { className: "size-7 opacity-60" }),
274
+ hint: i,
275
275
  onOpen: () => g({ kind: "unfiled" })
276
276
  });
277
277
  if (!m) return n.map((e, t) => {
278
278
  let i = r.filter((t) => (t.teamId ?? "") === e.id);
279
- return /* @__PURE__ */ J($, {
279
+ return /* @__PURE__ */ Y($, {
280
280
  title: e.name,
281
281
  count: i.length + (t === n.length - 1 && x ? 1 : 0),
282
- icon: /* @__PURE__ */ J(_, {
282
+ icon: /* @__PURE__ */ Y(_, {
283
283
  icon: e.icon,
284
284
  color: e.color,
285
285
  name: e.name
286
286
  }),
287
287
  bare: !0,
288
- children: /* @__PURE__ */ Y(T, {
288
+ children: /* @__PURE__ */ X(T, {
289
289
  label: e.name,
290
290
  children: [b(i.filter((e) => !e.parentId), i), t === n.length - 1 && x]
291
291
  })
@@ -293,13 +293,13 @@ function ue({ workspace: t, spaces: n, areas: r, unfiledCount: a, unfiledRows: o
293
293
  });
294
294
  let S = m.kind === "area" ? m.trail.at(-1) : void 0, C = S && r.find((e) => e.id === S.id), D = C ? y(C.id) : [], k = [{
295
295
  label: d("title"),
296
- icon: /* @__PURE__ */ J(l, { className: "size-4" })
296
+ icon: /* @__PURE__ */ Y(u, { className: "size-4" })
297
297
  }, ...m.kind === "area" ? m.trail.map((e) => ({ label: r.find((t) => t.id === e.id)?.title ?? e.title })) : [{ label: d("unfiled") }]];
298
- return /* @__PURE__ */ Y("section", {
298
+ return /* @__PURE__ */ X("section", {
299
299
  "aria-label": k.at(-1)?.label,
300
- children: [/* @__PURE__ */ Y("div", {
300
+ children: [/* @__PURE__ */ X("div", {
301
301
  className: "sticky top-0 z-10 flex h-10 items-center gap-2 border-b border-border bg-background px-4 md:px-5",
302
- children: [/* @__PURE__ */ J(O, {
302
+ children: [/* @__PURE__ */ Y(O, {
303
303
  crumbs: k,
304
304
  current: "location",
305
305
  onSelect: (e, t) => g(t === 0 || m.kind !== "area" ? null : {
@@ -307,41 +307,41 @@ function ue({ workspace: t, spaces: n, areas: r, unfiledCount: a, unfiledRows: o
307
307
  trail: m.trail.slice(0, t)
308
308
  }),
309
309
  className: "min-w-0 flex-1"
310
- }), C && /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(e, {
310
+ }), C && /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y(t, {
311
311
  to: "/$workspace/areas/$area",
312
312
  params: {
313
- workspace: t,
313
+ workspace: e,
314
314
  area: C.key
315
315
  },
316
- className: ee({
316
+ className: te({
317
317
  variant: "ghost",
318
318
  size: "xs"
319
319
  }),
320
320
  children: d("openArea")
321
- }), /* @__PURE__ */ J(N, {
321
+ }), /* @__PURE__ */ Y(N, {
322
322
  variant: "ghost",
323
323
  size: "xs",
324
- icon: /* @__PURE__ */ J(c, { className: "size-3.5" }),
324
+ icon: /* @__PURE__ */ Y(l, { className: "size-3.5" }),
325
325
  label: d("addInside"),
326
- onClick: () => u({
326
+ onClick: () => c({
327
327
  kind: "create",
328
328
  parent: C
329
329
  })
330
330
  })] })]
331
- }), m.kind === "unfiled" ? /* @__PURE__ */ J("ul", { children: o }) : D.length === 0 ? /* @__PURE__ */ J("div", {
331
+ }), m.kind === "unfiled" ? /* @__PURE__ */ Y("ul", { children: o }) : D.length === 0 ? /* @__PURE__ */ Y("div", {
332
332
  className: "p-6",
333
- children: /* @__PURE__ */ J(j, {
334
- icon: /* @__PURE__ */ J(l, {}),
333
+ children: /* @__PURE__ */ Y(j, {
334
+ icon: /* @__PURE__ */ Y(u, {}),
335
335
  title: d("emptyArea")
336
336
  })
337
- }) : /* @__PURE__ */ J(T, {
337
+ }) : /* @__PURE__ */ Y(T, {
338
338
  label: k.at(-1)?.label ?? "",
339
339
  children: b(D, D)
340
340
  })]
341
341
  });
342
342
  }
343
343
  function de(e, t, n) {
344
- let r = K("areas"), i = C(e);
344
+ let r = q("areas"), i = C(e);
345
345
  return (e, a) => {
346
346
  let o = a.filter((t) => t.id !== e.id);
347
347
  return [
@@ -367,7 +367,7 @@ function de(e, t, n) {
367
367
  })
368
368
  }))
369
369
  }] : [],
370
- B,
370
+ z,
371
371
  {
372
372
  label: r("archive"),
373
373
  destructive: !0,
@@ -377,132 +377,132 @@ function de(e, t, n) {
377
377
  };
378
378
  }
379
379
  var fe = 20;
380
- function pe({ workspace: t, area: n, counts: r, siblings: i, depth: a, review: o, areaMenu: s }) {
381
- let c = K("areas"), u = K("common"), f = V(), p = C(t), m = G(), { nameOf: g, avatarOf: _ } = h(t), b = n.status === "proposed", x = () => s(n, i), w = p.accept.error ?? p.merge.error ?? p.archive.error, T = n.creator;
382
- return /* @__PURE__ */ Y("li", {
380
+ function pe({ workspace: e, area: n, counts: r, siblings: i, depth: a, review: o, areaMenu: s }) {
381
+ let c = q("areas"), l = q("common"), d = B(), p = C(e), m = K(), { nameOf: h, avatarOf: _ } = g(e), b = n.status === "proposed", x = () => s(n, i), w = p.accept.error ?? p.merge.error ?? p.archive.error, T = n.creator;
382
+ return /* @__PURE__ */ X("li", {
383
383
  className: "group flex min-h-10 items-center gap-2 border-b border-border/60 pr-2 hover:bg-muted/60",
384
384
  children: [
385
- /* @__PURE__ */ Y(e, {
385
+ /* @__PURE__ */ X(t, {
386
386
  to: "/$workspace/areas/$area",
387
387
  params: {
388
- workspace: t,
388
+ workspace: e,
389
389
  area: n.key
390
390
  },
391
- onContextMenu: (e) => f(e, x()),
391
+ onContextMenu: (e) => d(e, x()),
392
392
  style: { paddingLeft: `calc(var(--row-start) + ${a * fe}px)` },
393
393
  className: "flex min-w-0 flex-1 items-center gap-2 self-stretch py-2 [--row-start:1rem] md:[--row-start:1.25rem]",
394
394
  children: [
395
- n.icon ? /* @__PURE__ */ J(v, { icon: n.icon }) : /* @__PURE__ */ J(l, { className: "size-4 shrink-0 text-muted-foreground" }),
396
- /* @__PURE__ */ J("span", {
395
+ n.icon ? /* @__PURE__ */ Y(v, { icon: n.icon }) : /* @__PURE__ */ Y(u, { className: "size-4 shrink-0 text-muted-foreground" }),
396
+ /* @__PURE__ */ Y("span", {
397
397
  className: "min-w-0 truncate text-sm font-medium",
398
398
  children: n.title
399
399
  }),
400
- n.homeDocId && /* @__PURE__ */ J(d, {
400
+ n.homeDocId && /* @__PURE__ */ Y(f, {
401
401
  className: "size-3.5 shrink-0 text-muted-foreground",
402
402
  "aria-label": c("hasHomeDoc")
403
403
  }),
404
- n.aliases.length > 0 && /* @__PURE__ */ J("span", {
404
+ n.aliases.length > 0 && /* @__PURE__ */ Y("span", {
405
405
  className: "min-w-0 truncate text-xs text-muted-foreground max-sm:hidden",
406
406
  children: c("alsoCalled", { names: n.aliases.join(", ") })
407
407
  }),
408
- o && /* @__PURE__ */ J("span", {
408
+ o && /* @__PURE__ */ Y("span", {
409
409
  className: "min-w-0 truncate text-xs text-muted-foreground max-sm:hidden",
410
410
  children: c("inSpace", { space: o })
411
411
  })
412
412
  ]
413
413
  }),
414
- w && /* @__PURE__ */ J(M, {
414
+ w && /* @__PURE__ */ Y(M, {
415
415
  inline: !0,
416
416
  className: "shrink-0 text-xs",
417
417
  children: m(w)
418
418
  }),
419
- /* @__PURE__ */ J(S, {
419
+ /* @__PURE__ */ Y(S, {
420
420
  counts: r,
421
421
  teamId: n.teamId,
422
422
  className: "max-sm:hidden"
423
423
  }),
424
- b && !o && /* @__PURE__ */ J("span", {
424
+ b && !o && /* @__PURE__ */ Y("span", {
425
425
  className: "shrink-0 rounded border border-warning/60 px-1.5 py-0.5 text-[11px] leading-none text-warning",
426
426
  children: c("proposed")
427
427
  }),
428
- o && T && /* @__PURE__ */ J(z, {
429
- content: c("proposedBy", { name: g(T.kind, T.handle) }),
428
+ o && T && /* @__PURE__ */ Y(R, {
429
+ content: c("proposedBy", { name: h(T.kind, T.handle) }),
430
430
  describesAnchor: !0,
431
- children: /* @__PURE__ */ Y("span", {
431
+ children: /* @__PURE__ */ X("span", {
432
432
  className: "flex shrink-0 items-center gap-1.5 text-xs text-muted-foreground max-sm:hidden",
433
- children: [/* @__PURE__ */ J(D, {
433
+ children: [/* @__PURE__ */ Y(D, {
434
434
  ...y(T.kind),
435
- name: g(T.kind, T.handle),
435
+ name: h(T.kind, T.handle),
436
436
  src: _(T.kind, T.handle),
437
437
  size: "xs",
438
438
  decorative: !0
439
- }), g(T.kind, T.handle)]
439
+ }), h(T.kind, T.handle)]
440
440
  })
441
441
  }),
442
- /* @__PURE__ */ J("span", {
442
+ /* @__PURE__ */ Y("span", {
443
443
  className: "w-28 shrink-0 truncate text-right font-mono text-xs text-muted-foreground max-md:hidden",
444
444
  children: n.key
445
445
  }),
446
- o && /* @__PURE__ */ J(k, {
446
+ o && /* @__PURE__ */ Y(k, {
447
447
  variant: "outline",
448
448
  size: "xs",
449
449
  loading: p.accept.isPending,
450
450
  onClick: () => p.accept.mutate(n.key),
451
451
  children: c("accept")
452
452
  }),
453
- /* @__PURE__ */ J(ne, {
453
+ /* @__PURE__ */ Y(ne, {
454
454
  items: x,
455
- label: u("moreActionsFor", { name: n.title })
455
+ label: l("moreActionsFor", { name: n.title })
456
456
  })
457
457
  ]
458
458
  });
459
459
  }
460
460
  function me({ workspace: e }) {
461
- let n = K("areas"), r = C(e), [i, a] = W(!1), { data: o = [], isPending: s } = Z({
462
- ...t(e, !0),
461
+ let t = q("areas"), r = C(e), [i, a] = G(!1), { data: o = [], isPending: s } = Z({
462
+ ...n(e, !0),
463
463
  enabled: i
464
464
  });
465
- return /* @__PURE__ */ Y("section", {
466
- "aria-label": n("archived"),
467
- children: [/* @__PURE__ */ J("h2", {
465
+ return /* @__PURE__ */ X("section", {
466
+ "aria-label": t("archived"),
467
+ children: [/* @__PURE__ */ Y("h2", {
468
468
  className: "border-b border-border",
469
- children: /* @__PURE__ */ Y("button", {
469
+ children: /* @__PURE__ */ X("button", {
470
470
  type: "button",
471
471
  onClick: () => a((e) => !e),
472
472
  "aria-expanded": i,
473
473
  className: "flex h-9 w-full items-center gap-2 px-4 text-xs font-medium text-muted-foreground hover:bg-muted/60 hover:text-foreground md:px-5",
474
474
  children: [
475
- /* @__PURE__ */ J(u, { className: re("size-3.5 transition-transform", i && "rotate-90") }),
476
- n("archived"),
477
- i && !s && /* @__PURE__ */ J("span", {
475
+ /* @__PURE__ */ Y(d, { className: re("size-3.5 transition-transform", i && "rotate-90") }),
476
+ t("archived"),
477
+ i && !s && /* @__PURE__ */ Y("span", {
478
478
  className: "tabular-nums",
479
479
  children: o.length
480
480
  })
481
481
  ]
482
482
  })
483
- }), i && !s && (o.length === 0 ? /* @__PURE__ */ J("p", {
483
+ }), i && !s && (o.length === 0 ? /* @__PURE__ */ Y("p", {
484
484
  className: "border-b border-border/60 px-4 py-2.5 pl-10 text-xs text-muted-foreground md:pl-11",
485
- children: n("noArchived")
486
- }) : /* @__PURE__ */ J("ul", { children: o.map((e) => /* @__PURE__ */ Y("li", {
485
+ children: t("noArchived")
486
+ }) : /* @__PURE__ */ Y("ul", { children: o.map((e) => /* @__PURE__ */ X("li", {
487
487
  className: "flex min-h-10 items-center gap-2 border-b border-border/60 py-1.5 pr-2 pl-4 text-muted-foreground md:pl-5",
488
488
  children: [
489
- /* @__PURE__ */ J(l, { className: "size-4 shrink-0" }),
490
- /* @__PURE__ */ J("span", {
489
+ /* @__PURE__ */ Y(u, { className: "size-4 shrink-0" }),
490
+ /* @__PURE__ */ Y("span", {
491
491
  className: "min-w-0 truncate text-sm",
492
492
  children: e.title
493
493
  }),
494
- /* @__PURE__ */ J("span", {
494
+ /* @__PURE__ */ Y("span", {
495
495
  className: "ml-auto w-28 shrink-0 truncate text-right font-mono text-xs max-md:hidden",
496
496
  children: e.key
497
497
  }),
498
- /* @__PURE__ */ J(k, {
498
+ /* @__PURE__ */ Y(k, {
499
499
  variant: "outline",
500
500
  size: "xs",
501
501
  loading: r.restore.isPending && r.restore.variables === e.key,
502
502
  onClick: () => r.restore.mutate(e.key),
503
- children: n("restore")
503
+ children: t("restore")
504
504
  }),
505
- /* @__PURE__ */ J("span", {
505
+ /* @__PURE__ */ Y("span", {
506
506
  "aria-hidden": !0,
507
507
  className: "size-7 shrink-0"
508
508
  })
@@ -511,33 +511,33 @@ function me({ workspace: e }) {
511
511
  });
512
512
  }
513
513
  var he = (e) => e.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 63);
514
- function ge({ workspace: t, editing: n, spaces: i, areas: a, onClose: o }) {
515
- let s = K("areas"), c = K("common"), l = G(), u = C(t), f = n.kind === "edit" ? n.area : void 0, p = n.kind === "create" ? n.parent : void 0, [h, g] = W(f?.title ?? ""), [_, v] = W(f?.key ?? ""), [y, b] = W(!!f), [x, S] = W((f?.aliases ?? []).join(", ")), w = n.kind === "create" && n.space || i.find((e) => e.id === (f?.teamId ?? p?.teamId ?? ""))?.key || i[0]?.key || "", [T, E] = W(w), D = i.find((e) => e.key === T)?.id ?? "", [O, j] = W(p?.key ?? a.find((e) => e.id === f?.parentId)?.key ?? ""), [N, L] = W(""), [z, ee] = W(!1), { data: B = [] } = Z({
516
- ...r(t),
517
- enabled: z || !!f?.homeDocId
518
- }), V = N ? B.find((e) => e.key === N) : B.find((e) => e.id === f?.homeDocId), H = !f || f.status === "proposed", q = u.create.isPending || u.update.isPending, X = u.create.error ?? u.update.error, te = U(() => a.filter((e) => (e.teamId ?? "") === D && e.id !== f?.id), [
514
+ function ge({ workspace: e, editing: n, spaces: r, areas: a, onClose: o }) {
515
+ let s = q("areas"), c = q("common"), l = K(), u = C(e), d = n.kind === "edit" ? n.area : void 0, p = n.kind === "create" ? n.parent : void 0, [m, g] = G(d?.title ?? ""), [_, v] = G(d?.key ?? ""), [y, b] = G(!!d), [x, S] = G((d?.aliases ?? []).join(", ")), w = n.kind === "create" && n.space || r.find((e) => e.id === (d?.teamId ?? p?.teamId ?? ""))?.key || r[0]?.key || "", [T, E] = G(w), D = r.find((e) => e.key === T)?.id ?? "", [O, j] = G(p?.key ?? a.find((e) => e.id === d?.parentId)?.key ?? ""), [N, ee] = G(""), [R, te] = G(!1), { data: z = [] } = Z({
516
+ ...i(e),
517
+ enabled: R || !!d?.homeDocId
518
+ }), B = N ? z.find((e) => e.key === N) : z.find((e) => e.id === d?.homeDocId), V = !d || d.status === "proposed", H = u.create.isPending || u.update.isPending, U = u.create.error ?? u.update.error, J = W(() => a.filter((e) => (e.teamId ?? "") === D && e.id !== d?.id), [
519
519
  a,
520
520
  D,
521
- f?.id
521
+ d?.id
522
522
  ]), Q = x.split(",").map((e) => e.trim()).filter(Boolean);
523
- return /* @__PURE__ */ J(F, {
523
+ return /* @__PURE__ */ Y(F, {
524
524
  open: !0,
525
525
  onClose: o,
526
526
  className: "max-h-[85vh] w-full max-w-md overflow-y-auto p-5",
527
- children: /* @__PURE__ */ Y("form", {
527
+ children: /* @__PURE__ */ X("form", {
528
528
  onSubmit: (e) => {
529
- e.preventDefault(), f ? u.update.mutate({
530
- area: f.key,
529
+ e.preventDefault(), d ? u.update.mutate({
530
+ area: d.key,
531
531
  body: {
532
- title: h,
532
+ title: m,
533
533
  aliases: Q,
534
- ...H && _ !== f.key && { key: _ },
535
- ...O !== (a.find((e) => e.id === f.parentId)?.key ?? "") && { parent: O },
534
+ ...V && _ !== d.key && { key: _ },
535
+ ...O !== (a.find((e) => e.id === d.parentId)?.key ?? "") && { parent: O },
536
536
  ...N && { homeDoc: N }
537
537
  }
538
538
  }, { onSuccess: o }) : u.create.mutate({
539
539
  key: _,
540
- title: h,
540
+ title: m,
541
541
  aliases: Q,
542
542
  space: T,
543
543
  ...O && { parent: O },
@@ -545,14 +545,14 @@ function ge({ workspace: t, editing: n, spaces: i, areas: a, onClose: o }) {
545
545
  }, { onSuccess: o });
546
546
  },
547
547
  children: [
548
- /* @__PURE__ */ J(I, {
548
+ /* @__PURE__ */ Y(I, {
549
549
  className: "text-sm font-semibold",
550
- children: s(f ? "editTitle" : "newTitle")
550
+ children: s(d ? "editTitle" : "newTitle")
551
551
  }),
552
- /* @__PURE__ */ Y("label", {
552
+ /* @__PURE__ */ X("label", {
553
553
  className: "mt-4 block text-xs font-medium text-muted-foreground",
554
- children: [s("fieldTitle"), /* @__PURE__ */ J(P, {
555
- value: h,
554
+ children: [s("fieldTitle"), /* @__PURE__ */ Y(P, {
555
+ value: m,
556
556
  onChange: (e) => {
557
557
  g(e.target.value), y || v(he(e.target.value));
558
558
  },
@@ -562,45 +562,45 @@ function ge({ workspace: t, editing: n, spaces: i, areas: a, onClose: o }) {
562
562
  className: "mt-1"
563
563
  })]
564
564
  }),
565
- /* @__PURE__ */ Y("label", {
565
+ /* @__PURE__ */ X("label", {
566
566
  className: "mt-3 block text-xs font-medium text-muted-foreground",
567
567
  children: [
568
568
  s("fieldKey"),
569
- /* @__PURE__ */ J(P, {
569
+ /* @__PURE__ */ Y(P, {
570
570
  value: _,
571
571
  onChange: (e) => {
572
572
  b(!0), v(e.target.value.toLowerCase());
573
573
  },
574
- disabled: !H,
574
+ disabled: !V,
575
575
  required: !0,
576
576
  pattern: "[a-z0-9][a-z0-9-]{0,62}",
577
577
  mono: !0,
578
578
  className: "mt-1"
579
579
  }),
580
- /* @__PURE__ */ J("span", {
580
+ /* @__PURE__ */ Y("span", {
581
581
  className: "mt-1 block font-normal",
582
- children: s(H ? "keyHint" : "keyFixed")
582
+ children: s(V ? "keyHint" : "keyFixed")
583
583
  })
584
584
  ]
585
585
  }),
586
- /* @__PURE__ */ Y("label", {
586
+ /* @__PURE__ */ X("label", {
587
587
  className: "mt-3 block text-xs font-medium text-muted-foreground",
588
- children: [s("fieldAliases"), /* @__PURE__ */ J(P, {
588
+ children: [s("fieldAliases"), /* @__PURE__ */ Y(P, {
589
589
  value: x,
590
590
  onChange: (e) => S(e.target.value),
591
591
  placeholder: s("aliasesPlaceholder"),
592
592
  className: "mt-1"
593
593
  })]
594
594
  }),
595
- /* @__PURE__ */ Y("div", {
595
+ /* @__PURE__ */ X("div", {
596
596
  className: "mt-3 flex flex-wrap gap-3",
597
- children: [!f && !p && /* @__PURE__ */ Y("div", {
597
+ children: [!d && !p && /* @__PURE__ */ X("div", {
598
598
  className: "text-xs font-medium text-muted-foreground",
599
- children: [s("fieldSpace"), /* @__PURE__ */ J("div", {
599
+ children: [s("fieldSpace"), /* @__PURE__ */ Y("div", {
600
600
  className: "mt-1",
601
- children: /* @__PURE__ */ J(R, {
601
+ children: /* @__PURE__ */ Y(L, {
602
602
  value: T,
603
- items: i.map((e) => ({
603
+ items: r.map((e) => ({
604
604
  value: e.key,
605
605
  label: e.name
606
606
  })),
@@ -611,16 +611,16 @@ function ge({ workspace: t, editing: n, spaces: i, areas: a, onClose: o }) {
611
611
  width: "content"
612
612
  })
613
613
  })]
614
- }), /* @__PURE__ */ Y("div", {
614
+ }), /* @__PURE__ */ X("div", {
615
615
  className: "text-xs font-medium text-muted-foreground",
616
- children: [s("fieldParent"), /* @__PURE__ */ J("div", {
616
+ children: [s("fieldParent"), /* @__PURE__ */ Y("div", {
617
617
  className: "mt-1",
618
- children: /* @__PURE__ */ J(R, {
618
+ children: /* @__PURE__ */ Y(L, {
619
619
  value: O,
620
620
  items: [{
621
621
  value: "",
622
622
  label: s("top")
623
- }, ...te.map((e) => ({
623
+ }, ...J.map((e) => ({
624
624
  value: e.key,
625
625
  label: e.title
626
626
  }))],
@@ -631,58 +631,58 @@ function ge({ workspace: t, editing: n, spaces: i, areas: a, onClose: o }) {
631
631
  })]
632
632
  })]
633
633
  }),
634
- /* @__PURE__ */ Y("div", {
634
+ /* @__PURE__ */ X("div", {
635
635
  className: "mt-3 text-xs font-medium text-muted-foreground",
636
- children: [s("fieldHomeDoc"), /* @__PURE__ */ Y("div", {
636
+ children: [s("fieldHomeDoc"), /* @__PURE__ */ X("div", {
637
637
  className: "mt-1",
638
- children: [/* @__PURE__ */ J(A, {
639
- open: z,
640
- onOpenChange: ee,
641
- items: B.map((e) => ({
638
+ children: [/* @__PURE__ */ Y(A, {
639
+ open: R,
640
+ onOpenChange: te,
641
+ items: z.map((e) => ({
642
642
  value: e.key,
643
643
  label: e.title,
644
- icon: /* @__PURE__ */ J(d, { className: "size-3.5" })
644
+ icon: /* @__PURE__ */ Y(f, { className: "size-3.5" })
645
645
  })),
646
- value: V?.key ?? null,
647
- onValueChange: (e) => e !== null && L(e),
646
+ value: B?.key ?? null,
647
+ onValueChange: (e) => e !== null && ee(e),
648
648
  placeholder: s("chooseDoc"),
649
649
  "aria-label": s("fieldHomeDoc"),
650
- trigger: /* @__PURE__ */ Y(k, {
650
+ trigger: /* @__PURE__ */ X(k, {
651
651
  type: "button",
652
652
  className: "max-w-full font-normal",
653
- children: [/* @__PURE__ */ J(d, { className: "size-3.5 text-muted-foreground" }), /* @__PURE__ */ J("span", {
653
+ children: [/* @__PURE__ */ Y(f, { className: "size-3.5 text-muted-foreground" }), /* @__PURE__ */ Y("span", {
654
654
  className: "truncate",
655
- children: V?.title ?? s("noDoc")
655
+ children: B?.title ?? s("noDoc")
656
656
  })]
657
657
  })
658
- }), V && /* @__PURE__ */ J(e, {
658
+ }), B && /* @__PURE__ */ Y(t, {
659
659
  to: "/$workspace/docs/$doc",
660
660
  params: {
661
- workspace: t,
662
- doc: m(V)
661
+ workspace: e,
662
+ doc: h(B)
663
663
  },
664
664
  className: "ml-2 text-xs font-normal text-primary hover:underline",
665
665
  children: s("openDoc")
666
666
  })]
667
667
  })]
668
668
  }),
669
- X && /* @__PURE__ */ J(M, {
669
+ U && /* @__PURE__ */ Y(M, {
670
670
  size: "md",
671
671
  className: "mt-3",
672
- children: l(X)
672
+ children: l(U)
673
673
  }),
674
- /* @__PURE__ */ Y("div", {
674
+ /* @__PURE__ */ X("div", {
675
675
  className: "mt-5 flex justify-end gap-2",
676
- children: [/* @__PURE__ */ J(k, {
676
+ children: [/* @__PURE__ */ Y(k, {
677
677
  type: "button",
678
678
  onClick: o,
679
679
  children: c("cancel")
680
- }), /* @__PURE__ */ J(k, {
680
+ }), /* @__PURE__ */ Y(k, {
681
681
  type: "submit",
682
682
  variant: "primary",
683
- disabled: !h.trim() || !_,
684
- loading: q,
685
- children: f ? c("save") : s("create")
683
+ disabled: !m.trim() || !_,
684
+ loading: H,
685
+ children: d ? c("save") : s("create")
686
686
  })]
687
687
  })
688
688
  ]