@parallelworks/tandem-web 0.171.1 → 0.171.3

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 (171) hide show
  1. package/_virtual/_virtual_i18n/en/common.js +5 -2
  2. package/_virtual/_virtual_i18n/es/common.js +5 -2
  3. package/_virtual/_virtual_i18n/ja/common.js +5 -2
  4. package/_virtual/_virtual_i18n/ko/common.js +5 -2
  5. package/_virtual/_virtual_i18n/zh/common.js +5 -2
  6. package/components/AccessGrants.js +6 -6
  7. package/components/ActivityTimeline.js +60 -60
  8. package/components/ActorAvatar.js +4 -4
  9. package/components/ActorLink.js +34 -0
  10. package/components/AgentWork.js +494 -494
  11. package/components/AppLauncher.js +7 -7
  12. package/components/AreaLink.js +13 -13
  13. package/components/AreaTiles.js +13 -13
  14. package/components/AreaWork.js +22 -22
  15. package/components/Attachments.js +73 -69
  16. package/components/BlockHandle.js +3 -3
  17. package/components/BugRotation.js +8 -8
  18. package/components/CodeHostSettings.js +121 -87
  19. package/components/CollabEditor.js +13 -13
  20. package/components/CommandPalette.js +206 -206
  21. package/components/CustomFields.js +95 -95
  22. package/components/CustomerRequests.js +11 -11
  23. package/components/DashboardPanel.js +201 -164
  24. package/components/DateChip.js +21 -21
  25. package/components/DocHistory.js +14 -14
  26. package/components/DocIcon.js +4 -4
  27. package/components/DocIconPicker.js +4 -4
  28. package/components/DocLinkPicker.js +22 -22
  29. package/components/DocLook.js +16 -16
  30. package/components/DocProperties.js +81 -81
  31. package/components/DocTable.js +53 -53
  32. package/components/DocsTree.js +179 -179
  33. package/components/Editor.js +69 -69
  34. package/components/FavoritesNav.js +78 -78
  35. package/components/GitHub.js +87 -87
  36. package/components/Graph.js +14 -14
  37. package/components/HostActions.js +21 -21
  38. package/components/HostPanel.js +6 -6
  39. package/components/HoverCards.js +74 -74
  40. package/components/IssueBoard.js +13 -10
  41. package/components/IssueBreakdown.js +31 -31
  42. package/components/IssueCode.js +19 -19
  43. package/components/IssueEvent.js +97 -92
  44. package/components/IssueFilters.js +39 -39
  45. package/components/IssueGroup.js +16 -16
  46. package/components/IssueImport.js +13 -13
  47. package/components/IssueInsights.js +20 -20
  48. package/components/IssueListBlock.js +81 -81
  49. package/components/IssueRelations.js +34 -34
  50. package/components/IssueRow.js +31 -31
  51. package/components/IssueSentry.js +36 -34
  52. package/components/IssueTemplates.js +23 -23
  53. package/components/IssueTypes.js +40 -40
  54. package/components/MarkdownTransfer.js +10 -10
  55. package/components/MentionPicker.js +19 -19
  56. package/components/NewIssueDialog.js +53 -53
  57. package/components/NewProjectDialog.js +82 -82
  58. package/components/PersonActivity.js +13 -13
  59. package/components/PersonHoverCard.js +44 -44
  60. package/components/Planning.js +16 -16
  61. package/components/Reports.js +8 -8
  62. package/components/SettingsNav.js +15 -15
  63. package/components/ShareDialog.js +8 -8
  64. package/components/SharedViewer.js +23 -23
  65. package/components/SlashMenu.js +26 -26
  66. package/components/SubPages.js +10 -10
  67. package/components/TeamForm.js +9 -9
  68. package/components/TeamRepositories.js +21 -21
  69. package/components/TeamWorkflow.js +6 -6
  70. package/components/UnlinkedMentions.js +29 -29
  71. package/components/Updates.js +8 -8
  72. package/components/Widgets.js +99 -97
  73. package/components/WorkCounts.js +12 -12
  74. package/components/cycleCrumb.js +8 -8
  75. package/components/editorPlugins.js +101 -101
  76. package/components/settings.js +6 -6
  77. package/components/video.js +7 -7
  78. package/hostedApp.js +24 -24
  79. package/index.js +18 -18
  80. package/lib/assignees.js +3 -3
  81. package/lib/attachments.js +12 -12
  82. package/lib/boardMove.js +27 -27
  83. package/lib/collab.js +1 -1
  84. package/lib/docs.js +115 -115
  85. package/lib/githubLink.js +7 -7
  86. package/lib/issueList.js +51 -51
  87. package/lib/issueMenu.js +117 -117
  88. package/lib/knowledge.js +134 -134
  89. package/lib/live.js +38 -38
  90. package/lib/notifications.js +47 -47
  91. package/lib/triageSeen.js +2 -2
  92. package/lib/views.js +31 -31
  93. package/package.json +24 -24
  94. package/pages/area.js +64 -64
  95. package/pages/areas.js +199 -199
  96. package/pages/decisions.js +51 -51
  97. package/pages/issues.js +120 -120
  98. package/pages/projects.js +238 -238
  99. package/pages/triage.js +202 -212
  100. package/routes/_workspace/agents/_slug2.js +127 -127
  101. package/routes/_workspace/agents/index2.js +22 -22
  102. package/routes/_workspace/dashboards/_dashboardId2.js +84 -84
  103. package/routes/_workspace/dashboards/index2.js +34 -34
  104. package/routes/_workspace/docs/_doc2.js +267 -267
  105. package/routes/_workspace/docs/space2._space.js +31 -31
  106. package/routes/_workspace/docs2.js +4 -4
  107. package/routes/_workspace/graph2.js +11 -11
  108. package/routes/_workspace/graph3.js +11 -11
  109. package/routes/_workspace/issues/_identifier2.js +519 -522
  110. package/routes/_workspace/issues/index.js +13 -13
  111. package/routes/_workspace/knowledge/_term2.js +148 -146
  112. package/routes/_workspace/knowledge/_term3.js +4 -4
  113. package/routes/_workspace/knowledge/index.js +12 -12
  114. package/routes/_workspace/knowledge/index2.js +117 -115
  115. package/routes/_workspace/measures2.js +8 -8
  116. package/routes/_workspace/measures3.js +29 -29
  117. package/routes/_workspace/notifications2.js +263 -263
  118. package/routes/_workspace/people/_username.js +10 -10
  119. package/routes/_workspace/people/_username2.js +41 -41
  120. package/routes/_workspace/projects/_projectId3.js +303 -303
  121. package/routes/_workspace/projects/_projectId4.js +4 -4
  122. package/routes/_workspace/projects/_projectId_3.milestones._milestoneId.js +28 -28
  123. package/routes/_workspace/projects/_projectId_4.milestones._milestoneId.js +4 -4
  124. package/routes/_workspace/projects/index.js +8 -8
  125. package/routes/_workspace/settings/account2.js +8 -8
  126. package/routes/_workspace/settings/audit-log2.js +8 -8
  127. package/routes/_workspace/settings/audit-log3.js +155 -155
  128. package/routes/_workspace/settings/connections2.js +4 -4
  129. package/routes/_workspace/settings/fields2.js +5 -5
  130. package/routes/_workspace/settings/github2.js +11 -11
  131. package/routes/_workspace/settings/gitlab2.js +5 -5
  132. package/routes/_workspace/settings/groups2.js +52 -52
  133. package/routes/_workspace/settings/import2.js +39 -39
  134. package/routes/_workspace/settings/index2.js +5 -5
  135. package/routes/_workspace/settings/intercom2.js +11 -11
  136. package/routes/_workspace/settings/labels2.js +33 -33
  137. package/routes/_workspace/settings/members2.js +81 -81
  138. package/routes/_workspace/settings/notifications2.js +46 -46
  139. package/routes/_workspace/settings/parallelworks2.js +20 -20
  140. package/routes/_workspace/settings/roles2.js +41 -41
  141. package/routes/_workspace/settings/runners2.js +15 -15
  142. package/routes/_workspace/settings/sentry2.js +15 -15
  143. package/routes/_workspace/settings/sessions2.js +9 -9
  144. package/routes/_workspace/settings/sessions3.js +4 -4
  145. package/routes/_workspace/settings/slack2.js +12 -12
  146. package/routes/_workspace/settings/sso2.js +37 -37
  147. package/routes/_workspace/settings/sso3.js +7 -7
  148. package/routes/_workspace/settings/teams2.js +29 -29
  149. package/routes/_workspace/settings/tokens2.js +32 -32
  150. package/routes/_workspace/settings/tokens3.js +4 -4
  151. package/routes/_workspace/settings/webhooks2.js +41 -41
  152. package/routes/_workspace/settings/zendesk2.js +11 -11
  153. package/routes/_workspace/teams/_key/cycles/_number2.js +33 -33
  154. package/routes/_workspace/teams/_key/cycles/_number3.js +7 -7
  155. package/routes/_workspace/teams/_key/cycles/index2.js +37 -37
  156. package/routes/_workspace/teams/_key/issues.js +10 -10
  157. package/routes/_workspace/teams/_key/projects.js +6 -6
  158. package/routes/_workspace/teams/_key/settings2.js +396 -396
  159. package/routes/_workspace2.js +308 -308
  160. package/routes/_workspace3.js +8 -8
  161. package/routes/device2.js +4 -4
  162. package/routes/device3.js +4 -4
  163. package/routes/docs/_tag/_endpoint2.js +3 -3
  164. package/routes/docs/_tag/index2.js +3 -3
  165. package/routes/docs/route2.js +7 -7
  166. package/routes/index2.js +5 -5
  167. package/routes/login2.js +10 -10
  168. package/routes/new2.js +12 -12
  169. package/routes/new3.js +5 -5
  170. package/routes/request2._token.js +6 -6
  171. package/routes/share2._secret.js +4 -4
@@ -1,13 +1,13 @@
1
- import { Link as e, useNavigate as t } from "../lib/router.js";
2
- import { docQuery as n, docTemplatesQuery as r, docsQuery as i, teamsQuery as a, workspaceQuery as o } from "../api/queries.js";
3
- import { useLinkItems as s } from "../lib/menus.js";
4
- import { openShare as c } from "../lib/share.js";
5
- import { docRef as l, useDocActions as u, useDocMenu as d } from "../lib/docs.js";
6
- import { AddIcon as f, ChevronRightIcon as p, FileTextIcon as m, SearchIcon as h } from "./icons.js";
7
- import { EntityIcon as g } from "./EntityIcon.js";
8
- import { DocIcon as _ } from "./DocIcon.js";
1
+ import { docQuery as e, docTemplatesQuery as t, docsQuery as n, teamsQuery as r, workspaceQuery as i } from "../api/queries.js";
2
+ import { docRef as a, useDocActions as o, useDocMenu as s } from "../lib/docs.js";
3
+ import { indentLevel as c, revealed as l, saveTree as u, savedTree as d, spaceOf as f, toggled as p } from "../lib/docTree.js";
4
+ import { useLinkItems as m } from "../lib/menus.js";
5
+ import { Link as h, useNavigate as g } from "../lib/router.js";
6
+ import { openShare as _ } from "../lib/share.js";
9
7
  import { teamPath as v } from "../lib/teamPaths.js";
10
- import { indentLevel as y, revealed as b, saveTree as ee, savedTree as te, spaceOf as x, toggled as S } from "../lib/docTree.js";
8
+ import { DocIcon as y } from "./DocIcon.js";
9
+ import { EntityIcon as b } from "./EntityIcon.js";
10
+ import { AddIcon as ee, ChevronRightIcon as x, FileTextIcon as S, SearchIcon as te } from "./icons.js";
11
11
  import { useMarkdownTransfer as C } from "./MarkdownTransfer.js";
12
12
  import { Combobox as ne, IconButton as w, RelativeTime as T, SearchInput as re, Tooltip as E, buttonClasses as ie, menuDivider as D, useOpenMenu as O } from "@parallelworks/ui";
13
13
  import { useEffect as k, useRef as ae, useState as A, useSyncExternalStore as oe } from "react";
@@ -54,22 +54,22 @@ var K = {
54
54
  after: "relative after:absolute after:inset-x-1 after:-bottom-px after:h-0.5 after:rounded after:bg-primary",
55
55
  inside: "ring-2 ring-primary ring-inset"
56
56
  };
57
- function q({ workspace: r, current: s, page: c = !1, onIndex: _ = !1, menu: v, team: y }) {
58
- let T = j("docs"), { data: E } = ce(a(r)), { data: D } = ce(o(r)), { data: P = [] } = F(i(r, { top: !0 })), { data: I } = F({
59
- ...n(r, s ?? ""),
60
- enabled: !!s
61
- }), L = I?.key ?? s, le = O(), ue = d(r), fe = t(), z = u(r), V = C(r), [H, U] = A(!1), [G, K] = A(""), [q, me] = A(""), [J, ge] = A(!1), ve = y ? `${r}/${y.id}` : r, [Y, X] = A(() => te(ve)), { doc: Z, over: ye } = oe(W.subscribe, W.get), be = ae(null);
57
+ function q({ workspace: t, current: c, page: m = !1, onIndex: _ = !1, menu: v, team: y }) {
58
+ let T = j("docs"), { data: E } = ce(r(t)), { data: D } = ce(i(t)), { data: P = [] } = F(n(t, { top: !0 })), { data: I } = F({
59
+ ...e(t, c ?? ""),
60
+ enabled: !!c
61
+ }), L = I?.key ?? c, le = O(), ue = s(t), fe = g(), z = o(t), V = C(t), [H, U] = A(!1), [G, K] = A(""), [q, me] = A(""), [J, ge] = A(!1), ve = y ? `${t}/${y.id}` : t, [Y, X] = A(() => d(ve)), { doc: Z, over: ye } = oe(W.subscribe, W.get), be = ae(null);
62
62
  k(() => {
63
63
  let e = setTimeout(() => me(G.trim()), 200);
64
64
  return () => clearTimeout(e);
65
65
  }, [G]), k(() => {
66
66
  H && be.current?.focus();
67
- }, [H]), k(() => ee(ve, Y), [ve, Y]);
68
- let Q = E.filter((e) => !e.archivedAt), xe = I ? x(I) : "", Se = (I ? (I.ancestors ?? []).map((e) => e.id) : []).join(" ");
67
+ }, [H]), k(() => u(ve, Y), [ve, Y]);
68
+ let Q = E.filter((e) => !e.archivedAt), xe = I ? f(I) : "", Se = (I ? (I.ancestors ?? []).map((e) => e.id) : []).join(" ");
69
69
  k(() => {
70
- xe && X((e) => b(e, xe, Se ? Se.split(" ") : []));
70
+ xe && X((e) => l(e, xe, Se ? Se.split(" ") : []));
71
71
  }, [xe, Se]);
72
- let $ = !c && Y.collapsed && !H, Ce = {
72
+ let $ = !m && Y.collapsed && !H, Ce = {
73
73
  over: ye,
74
74
  start: (e) => W.set({ doc: e }),
75
75
  end: () => W.set({
@@ -88,7 +88,7 @@ function q({ workspace: r, current: s, page: c = !1, onIndex: _ = !1, menu: v, t
88
88
  if (t === "inside") z.move.mutate({
89
89
  doc: Z,
90
90
  parent: e
91
- }), X((t) => t.open.includes(e.id) ? t : S(t, e.id));
91
+ }), X((t) => t.open.includes(e.id) ? t : p(t, e.id));
92
92
  else {
93
93
  let r = Q.find((t) => t.id === e.teamId);
94
94
  z.move.mutate({
@@ -109,37 +109,37 @@ function q({ workspace: r, current: s, page: c = !1, onIndex: _ = !1, menu: v, t
109
109
  }, we = {
110
110
  drag: Ce,
111
111
  transfer: V,
112
- workspace: r,
112
+ workspace: t,
113
113
  open: new Set(Y.open),
114
114
  current: L,
115
115
  sidebar: !!y,
116
- toggle: (e) => X((t) => S(t, e)),
116
+ toggle: (e) => X((t) => p(t, e)),
117
117
  menu: (e) => ue(e, { onRename: () => fe({
118
118
  to: "/$workspace/docs/$doc",
119
119
  params: {
120
- workspace: r,
121
- doc: l(e)
120
+ workspace: t,
121
+ doc: a(e)
122
122
  },
123
123
  search: { rename: !0 }
124
124
  }) })
125
125
  }, Te = /* @__PURE__ */ N(se, { children: [/* @__PURE__ */ M(w, {
126
126
  variant: "ghost",
127
127
  size: "xs",
128
- icon: /* @__PURE__ */ M(h, {}),
128
+ icon: /* @__PURE__ */ M(te, {}),
129
129
  label: T("search"),
130
130
  pressed: H,
131
131
  onClick: () => {
132
132
  U((e) => !e), K("");
133
133
  },
134
- className: c ? "" : B
134
+ className: m ? "" : B
135
135
  }), Q.length === 0 ? /* @__PURE__ */ M(w, {
136
136
  variant: "ghost",
137
137
  size: "xs",
138
- icon: /* @__PURE__ */ M(f, {}),
138
+ icon: /* @__PURE__ */ M(ee, {}),
139
139
  label: T("new"),
140
140
  onClick: () => z.create.mutate({}),
141
141
  disabled: z.create.isPending,
142
- className: c ? "" : B
142
+ className: m ? "" : B
143
143
  }) : /* @__PURE__ */ M(ne, {
144
144
  items: [{
145
145
  value: "",
@@ -163,8 +163,8 @@ function q({ workspace: r, current: s, page: c = !1, onIndex: _ = !1, menu: v, t
163
163
  variant: "ghost",
164
164
  size: "xs",
165
165
  iconOnly: !0
166
- }), !c && B),
167
- children: /* @__PURE__ */ M(f, {})
166
+ }), !m && B),
167
+ children: /* @__PURE__ */ M(ee, {})
168
168
  })
169
169
  })] });
170
170
  return y ? /* @__PURE__ */ N("section", {
@@ -175,16 +175,16 @@ function q({ workspace: r, current: s, page: c = !1, onIndex: _ = !1, menu: v, t
175
175
  team: y,
176
176
  name: T("title"),
177
177
  row: !0,
178
- icon: /* @__PURE__ */ M(m, { className: "size-4" }),
178
+ icon: /* @__PURE__ */ M(S, { className: "size-4" }),
179
179
  docs: P.filter((e) => e.teamId === y.id),
180
180
  closed: Y.closedSpaces.includes(y.id),
181
- onToggle: () => X((e) => S(e, y.id, !0))
181
+ onToggle: () => X((e) => p(e, y.id, !0))
182
182
  }), V.dialog]
183
183
  }) : /* @__PURE__ */ N("section", {
184
184
  "aria-label": T("title"),
185
- className: R(c && "flex min-h-0 flex-1 flex-col"),
185
+ className: R(m && "flex min-h-0 flex-1 flex-col"),
186
186
  children: [
187
- c ? /* @__PURE__ */ N("div", {
187
+ m ? /* @__PURE__ */ N("div", {
188
188
  className: "flex h-9 shrink-0 items-center gap-1 px-2",
189
189
  children: [/* @__PURE__ */ M("h1", {
190
190
  className: "flex-1 text-sm font-semibold",
@@ -193,13 +193,13 @@ function q({ workspace: r, current: s, page: c = !1, onIndex: _ = !1, menu: v, t
193
193
  }) : /* @__PURE__ */ N("div", {
194
194
  className: R("group flex h-8 items-center gap-0.5 rounded-md pr-1 text-sm text-muted-foreground hover:bg-muted hover:text-foreground", _ && de),
195
195
  children: [
196
- /* @__PURE__ */ N(e, {
196
+ /* @__PURE__ */ N(h, {
197
197
  to: "/$workspace/docs",
198
- params: { workspace: r },
198
+ params: { workspace: t },
199
199
  onContextMenu: v ? (e) => le(e, v) : void 0,
200
200
  activeOptions: { exact: !0 },
201
201
  className: "flex h-full min-w-0 flex-1 items-center gap-2.5 pl-2",
202
- children: [/* @__PURE__ */ M(m, { className: "size-4" }), /* @__PURE__ */ M("span", {
202
+ children: [/* @__PURE__ */ M(S, { className: "size-4" }), /* @__PURE__ */ M("span", {
203
203
  className: "truncate",
204
204
  children: T("title")
205
205
  })]
@@ -208,7 +208,7 @@ function q({ workspace: r, current: s, page: c = !1, onIndex: _ = !1, menu: v, t
208
208
  /* @__PURE__ */ M(w, {
209
209
  variant: "ghost",
210
210
  size: "xs",
211
- icon: /* @__PURE__ */ M(p, { className: R(!$ && "rotate-90") }),
211
+ icon: /* @__PURE__ */ M(x, { className: R(!$ && "rotate-90") }),
212
212
  label: T($ ? "expand" : "collapse"),
213
213
  "aria-expanded": !$,
214
214
  onClick: () => X((e) => ({
@@ -231,9 +231,9 @@ function q({ workspace: r, current: s, page: c = !1, onIndex: _ = !1, menu: v, t
231
231
  })
232
232
  }),
233
233
  !$ && /* @__PURE__ */ M("div", {
234
- className: R("pt-1", c && "min-h-0 flex-1 overflow-y-auto pb-3"),
234
+ className: R("pt-1", m && "min-h-0 flex-1 overflow-y-auto pb-3"),
235
235
  children: q ? /* @__PURE__ */ M(he, {
236
- workspace: r,
236
+ workspace: t,
237
237
  query: q,
238
238
  current: L
239
239
  }, q) : /* @__PURE__ */ N(se, { children: [
@@ -241,28 +241,28 @@ function q({ workspace: r, current: s, page: c = !1, onIndex: _ = !1, menu: v, t
241
241
  ctx: we,
242
242
  id: "workspace",
243
243
  name: D.name,
244
- icon: /* @__PURE__ */ M(g, {
244
+ icon: /* @__PURE__ */ M(b, {
245
245
  icon: D.icon,
246
246
  color: D.color,
247
247
  name: D.name
248
248
  }),
249
249
  docs: P.filter((e) => !e.teamId),
250
250
  closed: Y.closedSpaces.includes("workspace"),
251
- onToggle: () => X((e) => S(e, "workspace", !0))
251
+ onToggle: () => X((e) => p(e, "workspace", !0))
252
252
  }),
253
253
  Q.map((e) => /* @__PURE__ */ M(pe, {
254
254
  ctx: we,
255
255
  id: e.id,
256
256
  team: e,
257
257
  name: e.name,
258
- icon: /* @__PURE__ */ M(g, {
258
+ icon: /* @__PURE__ */ M(b, {
259
259
  icon: e.icon,
260
260
  color: e.color,
261
261
  name: e.name
262
262
  }),
263
263
  docs: P.filter((t) => t.teamId === e.id),
264
264
  closed: Y.closedSpaces.includes(e.id),
265
- onToggle: () => X((t) => S(t, e.id, !0))
265
+ onToggle: () => X((t) => p(t, e.id, !0))
266
266
  }, e.id)),
267
267
  /* @__PURE__ */ N("button", {
268
268
  type: "button",
@@ -271,11 +271,11 @@ function q({ workspace: r, current: s, page: c = !1, onIndex: _ = !1, menu: v, t
271
271
  className: "mt-1 flex h-7 w-full items-center gap-0.5 rounded-md pl-1 text-xs font-medium text-muted-foreground hover:bg-muted hover:text-foreground",
272
272
  children: [/* @__PURE__ */ M("span", {
273
273
  className: "flex size-5 items-center justify-center",
274
- children: /* @__PURE__ */ M(p, { className: R("size-3", J && "rotate-90") })
274
+ children: /* @__PURE__ */ M(x, { className: R("size-3", J && "rotate-90") })
275
275
  }), T("archived")]
276
276
  }),
277
277
  J && /* @__PURE__ */ M(_e, {
278
- workspace: r,
278
+ workspace: t,
279
279
  current: L
280
280
  })
281
281
  ] })
@@ -284,98 +284,98 @@ function q({ workspace: r, current: s, page: c = !1, onIndex: _ = !1, menu: v, t
284
284
  ]
285
285
  });
286
286
  }
287
- function pe({ ctx: e, id: n, team: i, name: a, icon: o, docs: l, closed: d, onToggle: m, row: h = !1 }) {
288
- let g = j("docs"), _ = j("common"), y = O(), b = u(e.workspace), ee = s(), te = t(), x = e.workspace, { data: S = [] } = F(r(x)), C = `docs-space-${n}`, ne = j("docViews"), T = () => [
287
+ function pe({ ctx: e, id: n, team: r, name: i, icon: a, docs: s, closed: c, onToggle: l, row: u = !1 }) {
288
+ let d = j("docs"), f = j("common"), p = O(), h = o(e.workspace), y = m(), b = g(), S = e.workspace, { data: te = [] } = F(t(S)), C = `docs-space-${n}`, ne = j("docViews"), T = () => [
289
289
  {
290
- label: g("newInSpace"),
291
- onClick: () => b.create.mutate({ team: i?.key })
290
+ label: d("newInSpace"),
291
+ onClick: () => h.create.mutate({ team: r?.key })
292
292
  },
293
293
  {
294
294
  label: ne("openTable"),
295
- onClick: () => te({
295
+ onClick: () => b({
296
296
  to: "/$workspace/docs/space/$space",
297
297
  params: {
298
- workspace: x,
299
- space: i?.key ?? "workspace"
298
+ workspace: S,
299
+ space: r?.key ?? "workspace"
300
300
  }
301
301
  })
302
302
  },
303
303
  {
304
- label: g("newFromTemplate"),
305
- items: S.map((e) => ({
304
+ label: d("newFromTemplate"),
305
+ items: te.map((e) => ({
306
306
  label: e.title,
307
- onClick: () => b.create.mutate({
308
- team: i?.key,
307
+ onClick: () => h.create.mutate({
308
+ team: r?.key,
309
309
  template: e.id
310
310
  })
311
311
  }))
312
312
  },
313
313
  {
314
- label: g("importFiles"),
315
- onClick: () => e.transfer.pick({ space: i?.key ?? "workspace" })
314
+ label: d("importFiles"),
315
+ onClick: () => e.transfer.pick({ space: r?.key ?? "workspace" })
316
316
  },
317
317
  {
318
- label: g("importFolder"),
319
- onClick: () => e.transfer.pick({ space: i?.key ?? "workspace" }, !0)
318
+ label: d("importFolder"),
319
+ onClick: () => e.transfer.pick({ space: r?.key ?? "workspace" }, !0)
320
320
  },
321
321
  {
322
- label: g("exportMarkdown"),
323
- onClick: () => e.transfer.download({ space: i?.key ?? "workspace" })
322
+ label: d("exportMarkdown"),
323
+ onClick: () => e.transfer.download({ space: r?.key ?? "workspace" })
324
324
  },
325
325
  {
326
- label: g("shareSpace"),
327
- onClick: () => c({
328
- space: i?.key ?? "workspace",
329
- title: a
326
+ label: d("shareSpace"),
327
+ onClick: () => _({
328
+ space: r?.key ?? "workspace",
329
+ title: i
330
330
  })
331
331
  },
332
- ...i ? [
332
+ ...r ? [
333
333
  {
334
- label: g("teamIssues"),
335
- onClick: () => te({
334
+ label: d("teamIssues"),
335
+ onClick: () => b({
336
336
  to: "/$workspace/teams/$key/issues",
337
337
  params: {
338
- workspace: x,
339
- key: i.key
338
+ workspace: S,
339
+ key: r.key
340
340
  }
341
341
  })
342
342
  },
343
343
  D,
344
- ...ee(v(x, i.key, "issues"))
344
+ ...y(v(S, r.key, "issues"))
345
345
  ] : []
346
346
  ], re = (t) => {
347
347
  t.dataTransfer.types.includes(le) && (t.preventDefault(), e.drag.hover(`space-${n}`, "inside"));
348
348
  }, ie = (t) => {
349
- t.preventDefault(), e.drag.dropInSpace("workspace", i);
350
- }, k = l.length > 0 ? /* @__PURE__ */ M(me, {
349
+ t.preventDefault(), e.drag.dropInSpace("workspace", r);
350
+ }, k = s.length > 0 ? /* @__PURE__ */ M(me, {
351
351
  ctx: e,
352
352
  id: C,
353
- docs: l,
353
+ docs: s,
354
354
  depth: 0,
355
- trail: a,
355
+ trail: i,
356
356
  above: [],
357
- label: a
357
+ label: i
358
358
  }) : /* @__PURE__ */ M("p", {
359
359
  id: C,
360
- className: R("py-1 text-xs text-muted-foreground", h ? "pl-2" : "pl-9"),
361
- children: g("emptyTeam")
360
+ className: R("py-1 text-xs text-muted-foreground", u ? "pl-2" : "pl-9"),
361
+ children: d("emptyTeam")
362
362
  }), ae = /* @__PURE__ */ M(w, {
363
363
  variant: "ghost",
364
364
  size: "xs",
365
- icon: /* @__PURE__ */ M(f, {}),
366
- label: g("newInTeamNamed", { team: i?.name ?? a }),
367
- onClick: () => b.create.mutate({ team: i?.key }),
368
- className: h ? void 0 : B
365
+ icon: /* @__PURE__ */ M(ee, {}),
366
+ label: d("newInTeamNamed", { team: r?.name ?? i }),
367
+ onClick: () => h.create.mutate({ team: r?.key }),
368
+ className: u ? void 0 : B
369
369
  }), A = /* @__PURE__ */ M(I, {
370
370
  items: T,
371
- label: _("moreActionsFor", { name: i?.name ?? a })
371
+ label: f("moreActionsFor", { name: r?.name ?? i })
372
372
  });
373
- return h ? /* @__PURE__ */ M(L, {
374
- label: a,
375
- icon: o,
376
- open: !d,
377
- onOpenChange: (e) => e === d && m(),
378
- onContextMenu: (e) => y(e, T()),
373
+ return u ? /* @__PURE__ */ M(L, {
374
+ label: i,
375
+ icon: a,
376
+ open: !c,
377
+ onOpenChange: (e) => e === c && l(),
378
+ onContextMenu: (e) => p(e, T()),
379
379
  onDragOver: re,
380
380
  onDrop: ie,
381
381
  className: R(e.drag.over?.id === `space-${n}` && K.inside),
@@ -385,27 +385,27 @@ function pe({ ctx: e, id: n, team: i, name: a, icon: o, docs: l, closed: d, onTo
385
385
  className: "mb-1",
386
386
  children: [/* @__PURE__ */ N("div", {
387
387
  className: R("group flex h-7 items-center gap-0.5 rounded-md pr-1 pl-1 hover:bg-muted", e.drag.over?.id === `space-${n}` && K.inside),
388
- onContextMenu: (e) => y(e, T()),
388
+ onContextMenu: (e) => p(e, T()),
389
389
  onDragOver: re,
390
390
  onDrop: ie,
391
391
  children: [
392
392
  /* @__PURE__ */ M(E, {
393
- content: g(d ? "expand" : "collapse"),
393
+ content: d(c ? "expand" : "collapse"),
394
394
  children: /* @__PURE__ */ N("button", {
395
395
  type: "button",
396
- onClick: m,
397
- "aria-expanded": !d,
398
- "aria-controls": d ? void 0 : C,
396
+ onClick: l,
397
+ "aria-expanded": !c,
398
+ "aria-controls": c ? void 0 : C,
399
399
  className: "flex h-full min-w-0 flex-1 items-center gap-1.5 text-left text-xs font-medium text-muted-foreground hover:text-foreground",
400
400
  children: [
401
401
  /* @__PURE__ */ M("span", {
402
402
  className: "flex size-5 shrink-0 items-center justify-center",
403
- children: /* @__PURE__ */ M(p, { className: R("size-3", !d && "rotate-90") })
403
+ children: /* @__PURE__ */ M(x, { className: R("size-3", !c && "rotate-90") })
404
404
  }),
405
- o,
405
+ a,
406
406
  /* @__PURE__ */ M("span", {
407
407
  className: "truncate",
408
- children: a
408
+ children: i
409
409
  })
410
410
  ]
411
411
  })
@@ -413,7 +413,7 @@ function pe({ ctx: e, id: n, team: i, name: a, icon: o, docs: l, closed: d, onTo
413
413
  A,
414
414
  ae
415
415
  ]
416
- }), !d && k]
416
+ }), !c && k]
417
417
  });
418
418
  }
419
419
  function me({ ctx: e, id: t, docs: n, depth: r, trail: i, parent: a, above: o, label: s }) {
@@ -431,131 +431,131 @@ function me({ ctx: e, id: t, docs: n, depth: r, trail: i, parent: a, above: o, l
431
431
  }, t.id))
432
432
  });
433
433
  }
434
- function J({ ctx: t, doc: n, depth: r, trail: a, parent: o, above: s }) {
435
- let c = j("docs"), u = j("common"), d = O(), f = n.children > 0 && t.open.has(n.id), { data: m = [] } = F({
436
- ...i(t.workspace, { parent: n.key }),
434
+ function J({ ctx: e, doc: t, depth: r, trail: i, parent: o, above: s }) {
435
+ let l = j("docs"), u = j("common"), d = O(), f = t.children > 0 && e.open.has(t.id), { data: p = [] } = F({
436
+ ...n(e.workspace, { parent: t.key }),
437
437
  enabled: f
438
- }), h = t.current === n.key, g = ae(null);
438
+ }), m = e.current === t.key, g = ae(null);
439
439
  k(() => {
440
- h && g.current?.scrollIntoView({ block: "nearest" });
441
- }, [h]);
442
- let v = c("pathStep", {
443
- path: a,
444
- title: n.title
445
- }), b = `docs-tree-${n.id}`;
440
+ m && g.current?.scrollIntoView({ block: "nearest" });
441
+ }, [m]);
442
+ let _ = l("pathStep", {
443
+ path: i,
444
+ title: t.title
445
+ }), v = `docs-tree-${t.id}`;
446
446
  return /* @__PURE__ */ N("li", { children: [/* @__PURE__ */ N("div", {
447
- className: R(ue, "group", z[y(r)], h && (t.sidebar ? fe : de), t.drag.over?.id === n.id && K[t.drag.over.spot]),
447
+ className: R(ue, "group", z[c(r)], m && (e.sidebar ? fe : de), e.drag.over?.id === t.id && K[e.drag.over.spot]),
448
448
  draggable: !0,
449
- onDragStart: (e) => {
450
- e.dataTransfer.effectAllowed = "move", e.dataTransfer.setData(le, n.key), t.drag.start(n);
449
+ onDragStart: (n) => {
450
+ n.dataTransfer.effectAllowed = "move", n.dataTransfer.setData(le, t.key), e.drag.start(t);
451
451
  },
452
- onDragEnd: t.drag.end,
453
- onDragOver: (e) => {
454
- t.drag.accepts(n, s) && (e.preventDefault(), e.dataTransfer.dropEffect = "move", t.drag.hover(n.id, G(e)));
452
+ onDragEnd: e.drag.end,
453
+ onDragOver: (n) => {
454
+ e.drag.accepts(t, s) && (n.preventDefault(), n.dataTransfer.dropEffect = "move", e.drag.hover(t.id, G(n)));
455
455
  },
456
- onDrop: (e) => {
457
- e.preventDefault(), t.drag.drop(n, G(e), o);
456
+ onDrop: (n) => {
457
+ n.preventDefault(), e.drag.drop(t, G(n), o);
458
458
  },
459
459
  children: [
460
- n.children > 0 ? /* @__PURE__ */ M(E, {
461
- content: c(f ? "collapse" : "expand"),
460
+ t.children > 0 ? /* @__PURE__ */ M(E, {
461
+ content: l(f ? "collapse" : "expand"),
462
462
  children: /* @__PURE__ */ M("button", {
463
463
  type: "button",
464
- onClick: () => t.toggle(n.id),
464
+ onClick: () => e.toggle(t.id),
465
465
  "aria-expanded": f,
466
- "aria-controls": f ? b : void 0,
467
- "aria-label": c("inside", { title: n.title }),
466
+ "aria-controls": f ? v : void 0,
467
+ "aria-label": l("inside", { title: t.title }),
468
468
  className: V,
469
- children: /* @__PURE__ */ M(p, { className: R("size-3", f && "rotate-90") })
469
+ children: /* @__PURE__ */ M(x, { className: R("size-3", f && "rotate-90") })
470
470
  })
471
471
  }) : /* @__PURE__ */ M("span", { className: "size-5 shrink-0" }),
472
472
  /* @__PURE__ */ M(E, {
473
- content: v,
474
- children: /* @__PURE__ */ N(e, {
473
+ content: _,
474
+ children: /* @__PURE__ */ N(h, {
475
475
  to: "/$workspace/docs/$doc",
476
476
  params: {
477
- workspace: t.workspace,
478
- doc: l(n)
477
+ workspace: e.workspace,
478
+ doc: a(t)
479
479
  },
480
480
  ref: g,
481
- "aria-current": h ? "page" : void 0,
482
- onContextMenu: (e) => d(e, t.menu(n)),
481
+ "aria-current": m ? "page" : void 0,
482
+ onContextMenu: (n) => d(n, e.menu(t)),
483
483
  className: "line-clamp-2 min-w-0 flex-1 break-words py-1 pr-1",
484
484
  children: [
485
- /* @__PURE__ */ M(_, {
486
- icon: n.icon,
485
+ /* @__PURE__ */ M(y, {
486
+ icon: t.icon,
487
487
  className: "mr-1.5 inline-flex size-3.5 align-[-2px]",
488
488
  emojiClassName: "text-xs"
489
489
  }),
490
- n.title,
491
- n.template && /* @__PURE__ */ M("span", {
490
+ t.title,
491
+ t.template && /* @__PURE__ */ M("span", {
492
492
  className: "ml-1.5 rounded border border-border px-1 align-middle text-[10px] font-medium text-muted-foreground",
493
- children: c("templateTag")
493
+ children: l("templateTag")
494
494
  })
495
495
  ]
496
496
  })
497
497
  }),
498
498
  /* @__PURE__ */ M(I, {
499
- items: () => t.menu(n),
500
- label: u("moreActionsFor", { name: n.title }),
499
+ items: () => e.menu(t),
500
+ label: u("moreActionsFor", { name: t.title }),
501
501
  className: "mt-0.5 mr-0.5"
502
502
  })
503
503
  ]
504
- }), f && m.length > 0 && /* @__PURE__ */ M(me, {
505
- ctx: t,
506
- id: b,
507
- docs: m,
504
+ }), f && p.length > 0 && /* @__PURE__ */ M(me, {
505
+ ctx: e,
506
+ id: v,
507
+ docs: p,
508
508
  depth: r + 1,
509
- trail: v,
510
- parent: n,
511
- above: [...s, n.id],
512
- label: c("inside", { title: n.title })
509
+ trail: _,
510
+ parent: t,
511
+ above: [...s, t.id],
512
+ label: l("inside", { title: t.title })
513
513
  })] });
514
514
  }
515
- function he({ workspace: t, query: n, current: r }) {
516
- let o = j("docs"), s = O(), c = d(t), { data: u = [] } = F(a(t)), [f, p] = A(H), { data: m, isPending: h } = F({
517
- ...i(t, {
518
- q: n,
519
- limit: f
515
+ function he({ workspace: e, query: t, current: i }) {
516
+ let o = j("docs"), c = O(), l = s(e), { data: u = [] } = F(r(e)), [d, f] = A(H), { data: p, isPending: m } = F({
517
+ ...n(e, {
518
+ q: t,
519
+ limit: d
520
520
  }),
521
521
  placeholderData: P
522
522
  });
523
- return h ? /* @__PURE__ */ M("p", {
523
+ return m ? /* @__PURE__ */ M("p", {
524
524
  className: "px-2 text-sm text-muted-foreground",
525
525
  children: o("searching")
526
- }) : m?.length ? /* @__PURE__ */ N("ul", {
526
+ }) : p?.length ? /* @__PURE__ */ N("ul", {
527
527
  className: "space-y-1",
528
528
  "aria-label": o("results"),
529
- children: [m.map((n) => /* @__PURE__ */ M("li", { children: /* @__PURE__ */ N(e, {
529
+ children: [p.map((t) => /* @__PURE__ */ M("li", { children: /* @__PURE__ */ N(h, {
530
530
  to: "/$workspace/docs/$doc",
531
531
  params: {
532
- workspace: t,
533
- doc: l(n)
532
+ workspace: e,
533
+ doc: a(t)
534
534
  },
535
- onContextMenu: (e) => s(e, c(n)),
536
- "aria-current": r === n.key ? "page" : void 0,
537
- className: R("block rounded-md px-2 py-1.5 text-sm hover:bg-muted", r === n.key && "bg-muted"),
535
+ onContextMenu: (e) => c(e, l(t)),
536
+ "aria-current": i === t.key ? "page" : void 0,
537
+ className: R("block rounded-md px-2 py-1.5 text-sm hover:bg-muted", i === t.key && "bg-muted"),
538
538
  children: [/* @__PURE__ */ N("span", {
539
539
  className: "flex items-center gap-2 font-medium",
540
540
  children: [
541
- /* @__PURE__ */ M(_, {
542
- icon: n.icon,
541
+ /* @__PURE__ */ M(y, {
542
+ icon: t.icon,
543
543
  className: "size-3.5",
544
544
  emojiClassName: "text-xs"
545
545
  }),
546
546
  /* @__PURE__ */ M("span", {
547
547
  className: "truncate",
548
- children: n.title
548
+ children: t.title
549
549
  }),
550
550
  /* @__PURE__ */ M("span", {
551
551
  className: "ml-auto shrink-0 text-xs font-normal text-muted-foreground",
552
- children: u.find((e) => e.id === n.teamId)?.key ?? o("workspaceShort")
552
+ children: u.find((e) => e.id === t.teamId)?.key ?? o("workspaceShort")
553
553
  })
554
554
  ]
555
- }), n.snippet && /* @__PURE__ */ M(ge, { text: n.snippet })]
556
- }) }, n.id)), m.length === f && f < U && /* @__PURE__ */ M("li", { children: /* @__PURE__ */ M("button", {
555
+ }), t.snippet && /* @__PURE__ */ M(ge, { text: t.snippet })]
556
+ }) }, t.id)), p.length === d && d < U && /* @__PURE__ */ M("li", { children: /* @__PURE__ */ M("button", {
557
557
  type: "button",
558
- onClick: () => p((e) => Math.min(e + H, U)),
558
+ onClick: () => f((e) => Math.min(e + H, U)),
559
559
  className: "w-full rounded-md px-2 py-1.5 text-left text-sm text-muted-foreground hover:bg-muted hover:text-foreground",
560
560
  children: o("moreResults")
561
561
  }) })]
@@ -574,38 +574,38 @@ function ge({ text: e }) {
574
574
  }, t) : /* @__PURE__ */ M("span", { children: e }, t))
575
575
  });
576
576
  }
577
- function _e({ workspace: t, current: n }) {
578
- let r = j("docs"), a = O(), o = d(t), { data: s, isPending: c } = F(i(t, { archived: !0 }));
579
- return c ? null : s?.length ? /* @__PURE__ */ M("ul", {
577
+ function _e({ workspace: e, current: t }) {
578
+ let r = j("docs"), i = O(), o = s(e), { data: c, isPending: l } = F(n(e, { archived: !0 }));
579
+ return l ? null : c?.length ? /* @__PURE__ */ M("ul", {
580
580
  className: "space-y-px",
581
581
  "aria-label": r("archived"),
582
- children: s.map((r) => /* @__PURE__ */ M("li", { children: /* @__PURE__ */ N(e, {
582
+ children: c.map((n) => /* @__PURE__ */ M("li", { children: /* @__PURE__ */ N(h, {
583
583
  to: "/$workspace/docs/$doc",
584
584
  params: {
585
- workspace: t,
586
- doc: l(r)
585
+ workspace: e,
586
+ doc: a(n)
587
587
  },
588
- onContextMenu: (e) => a(e, o(r)),
589
- "aria-current": n === r.key ? "page" : void 0,
590
- className: R(ue, "items-center gap-1.5 py-1 pr-1 pl-2", n === r.key && de),
588
+ onContextMenu: (e) => i(e, o(n)),
589
+ "aria-current": t === n.key ? "page" : void 0,
590
+ className: R(ue, "items-center gap-1.5 py-1 pr-1 pl-2", t === n.key && de),
591
591
  children: [
592
- /* @__PURE__ */ M(_, {
593
- icon: r.icon,
592
+ /* @__PURE__ */ M(y, {
593
+ icon: n.icon,
594
594
  className: "size-3.5",
595
595
  emojiClassName: "text-xs"
596
596
  }),
597
597
  /* @__PURE__ */ M("span", {
598
598
  className: "min-w-0 flex-1 truncate",
599
- children: r.title
599
+ children: n.title
600
600
  }),
601
- r.archivedAt && /* @__PURE__ */ M(T, {
602
- value: r.archivedAt,
601
+ n.archivedAt && /* @__PURE__ */ M(T, {
602
+ value: n.archivedAt,
603
603
  format: "compact",
604
604
  exact: "medium",
605
605
  className: "text-xs"
606
606
  })
607
607
  ]
608
- }) }, r.id))
608
+ }) }, n.id))
609
609
  }) : /* @__PURE__ */ M("p", {
610
610
  className: "py-1 pl-9 text-xs text-muted-foreground",
611
611
  children: r("noArchived")