@parallelworks/tandem-web 0.171.1 → 0.171.2
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.
- package/components/AccessGrants.js +6 -6
- package/components/ActivityTimeline.js +57 -57
- package/components/ActorAvatar.js +4 -4
- package/components/AgentWork.js +494 -494
- package/components/AppLauncher.js +7 -7
- package/components/AreaLink.js +13 -13
- package/components/AreaTiles.js +13 -13
- package/components/AreaWork.js +22 -22
- package/components/Attachments.js +29 -29
- package/components/BlockHandle.js +3 -3
- package/components/BugRotation.js +8 -8
- package/components/CodeHostSettings.js +38 -38
- package/components/CollabEditor.js +13 -13
- package/components/CommandPalette.js +206 -206
- package/components/CustomFields.js +95 -95
- package/components/CustomerRequests.js +11 -11
- package/components/DashboardPanel.js +23 -23
- package/components/DateChip.js +21 -21
- package/components/DocHistory.js +14 -14
- package/components/DocIcon.js +4 -4
- package/components/DocIconPicker.js +4 -4
- package/components/DocLinkPicker.js +22 -22
- package/components/DocLook.js +16 -16
- package/components/DocProperties.js +81 -81
- package/components/DocTable.js +53 -53
- package/components/DocsTree.js +179 -179
- package/components/Editor.js +69 -69
- package/components/FavoritesNav.js +78 -78
- package/components/GitHub.js +87 -87
- package/components/Graph.js +14 -14
- package/components/HostActions.js +21 -21
- package/components/HostPanel.js +6 -6
- package/components/HoverCards.js +74 -74
- package/components/IssueBoard.js +13 -10
- package/components/IssueBreakdown.js +31 -31
- package/components/IssueCode.js +19 -19
- package/components/IssueEvent.js +12 -12
- package/components/IssueFilters.js +39 -39
- package/components/IssueGroup.js +16 -16
- package/components/IssueImport.js +13 -13
- package/components/IssueInsights.js +20 -20
- package/components/IssueListBlock.js +81 -81
- package/components/IssueRelations.js +34 -34
- package/components/IssueRow.js +31 -31
- package/components/IssueSentry.js +4 -4
- package/components/IssueTemplates.js +23 -23
- package/components/IssueTypes.js +40 -40
- package/components/MarkdownTransfer.js +10 -10
- package/components/MentionPicker.js +19 -19
- package/components/NewIssueDialog.js +53 -53
- package/components/NewProjectDialog.js +82 -82
- package/components/PersonActivity.js +13 -13
- package/components/PersonHoverCard.js +44 -44
- package/components/Planning.js +16 -16
- package/components/Reports.js +8 -8
- package/components/SettingsNav.js +15 -15
- package/components/ShareDialog.js +8 -8
- package/components/SharedViewer.js +23 -23
- package/components/SlashMenu.js +26 -26
- package/components/SubPages.js +10 -10
- package/components/TeamForm.js +9 -9
- package/components/TeamRepositories.js +21 -21
- package/components/TeamWorkflow.js +6 -6
- package/components/UnlinkedMentions.js +29 -29
- package/components/Updates.js +8 -8
- package/components/Widgets.js +4 -4
- package/components/WorkCounts.js +12 -12
- package/components/cycleCrumb.js +8 -8
- package/components/editorPlugins.js +101 -101
- package/components/settings.js +6 -6
- package/components/video.js +7 -7
- package/hostedApp.js +24 -24
- package/index.js +18 -18
- package/lib/assignees.js +3 -3
- package/lib/attachments.js +12 -12
- package/lib/boardMove.js +27 -27
- package/lib/collab.js +1 -1
- package/lib/docs.js +115 -115
- package/lib/githubLink.js +7 -7
- package/lib/issueList.js +51 -51
- package/lib/issueMenu.js +117 -117
- package/lib/knowledge.js +134 -134
- package/lib/live.js +38 -38
- package/lib/notifications.js +47 -47
- package/lib/views.js +31 -31
- package/package.json +24 -24
- package/pages/area.js +64 -64
- package/pages/areas.js +199 -199
- package/pages/decisions.js +51 -51
- package/pages/issues.js +120 -120
- package/pages/projects.js +238 -238
- package/pages/triage.js +109 -109
- package/routes/_workspace/agents/_slug2.js +127 -127
- package/routes/_workspace/agents/index2.js +22 -22
- package/routes/_workspace/dashboards/_dashboardId2.js +84 -84
- package/routes/_workspace/dashboards/index2.js +34 -34
- package/routes/_workspace/docs/_doc2.js +267 -267
- package/routes/_workspace/docs/space2._space.js +31 -31
- package/routes/_workspace/docs2.js +4 -4
- package/routes/_workspace/graph2.js +11 -11
- package/routes/_workspace/graph3.js +11 -11
- package/routes/_workspace/issues/_identifier2.js +477 -477
- package/routes/_workspace/issues/index.js +13 -13
- package/routes/_workspace/knowledge/_term2.js +175 -175
- package/routes/_workspace/knowledge/_term3.js +4 -4
- package/routes/_workspace/knowledge/index.js +12 -12
- package/routes/_workspace/knowledge/index2.js +117 -117
- package/routes/_workspace/measures2.js +8 -8
- package/routes/_workspace/measures3.js +29 -29
- package/routes/_workspace/notifications2.js +263 -263
- package/routes/_workspace/people/_username.js +10 -10
- package/routes/_workspace/people/_username2.js +41 -41
- package/routes/_workspace/projects/_projectId3.js +303 -303
- package/routes/_workspace/projects/_projectId4.js +4 -4
- package/routes/_workspace/projects/_projectId_3.milestones._milestoneId.js +28 -28
- package/routes/_workspace/projects/_projectId_4.milestones._milestoneId.js +4 -4
- package/routes/_workspace/projects/index.js +8 -8
- package/routes/_workspace/settings/account2.js +8 -8
- package/routes/_workspace/settings/audit-log2.js +8 -8
- package/routes/_workspace/settings/audit-log3.js +155 -155
- package/routes/_workspace/settings/connections2.js +4 -4
- package/routes/_workspace/settings/fields2.js +5 -5
- package/routes/_workspace/settings/github2.js +11 -11
- package/routes/_workspace/settings/gitlab2.js +5 -5
- package/routes/_workspace/settings/groups2.js +52 -52
- package/routes/_workspace/settings/import2.js +39 -39
- package/routes/_workspace/settings/index2.js +5 -5
- package/routes/_workspace/settings/intercom2.js +11 -11
- package/routes/_workspace/settings/labels2.js +33 -33
- package/routes/_workspace/settings/members2.js +81 -81
- package/routes/_workspace/settings/notifications2.js +46 -46
- package/routes/_workspace/settings/parallelworks2.js +20 -20
- package/routes/_workspace/settings/roles2.js +41 -41
- package/routes/_workspace/settings/runners2.js +15 -15
- package/routes/_workspace/settings/sentry2.js +15 -15
- package/routes/_workspace/settings/sessions2.js +9 -9
- package/routes/_workspace/settings/sessions3.js +4 -4
- package/routes/_workspace/settings/slack2.js +12 -12
- package/routes/_workspace/settings/sso2.js +37 -37
- package/routes/_workspace/settings/sso3.js +7 -7
- package/routes/_workspace/settings/teams2.js +29 -29
- package/routes/_workspace/settings/tokens2.js +32 -32
- package/routes/_workspace/settings/tokens3.js +4 -4
- package/routes/_workspace/settings/webhooks2.js +41 -41
- package/routes/_workspace/settings/zendesk2.js +11 -11
- package/routes/_workspace/teams/_key/cycles/_number2.js +33 -33
- package/routes/_workspace/teams/_key/cycles/_number3.js +7 -7
- package/routes/_workspace/teams/_key/cycles/index2.js +37 -37
- package/routes/_workspace/teams/_key/issues.js +10 -10
- package/routes/_workspace/teams/_key/projects.js +6 -6
- package/routes/_workspace/teams/_key/settings2.js +396 -396
- package/routes/_workspace2.js +308 -308
- package/routes/_workspace3.js +8 -8
- package/routes/device2.js +4 -4
- package/routes/device3.js +4 -4
- package/routes/docs/_tag/_endpoint2.js +3 -3
- package/routes/docs/_tag/index2.js +3 -3
- package/routes/docs/route2.js +7 -7
- package/routes/index2.js +5 -5
- package/routes/login2.js +10 -10
- package/routes/new2.js +12 -12
- package/routes/new3.js +5 -5
- package/routes/request2._token.js +6 -6
- package/routes/share2._secret.js +4 -4
package/components/DocsTree.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
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 {
|
|
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:
|
|
58
|
-
let T = j("docs"), { data: E } = ce(
|
|
59
|
-
...
|
|
60
|
-
enabled: !!
|
|
61
|
-
}), L = I?.key ??
|
|
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(() =>
|
|
68
|
-
let Q = E.filter((e) => !e.archivedAt), xe = I ?
|
|
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) =>
|
|
70
|
+
xe && X((e) => l(e, xe, Se ? Se.split(" ") : []));
|
|
71
71
|
}, [xe, Se]);
|
|
72
|
-
let $ = !
|
|
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 :
|
|
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:
|
|
112
|
+
workspace: t,
|
|
113
113
|
open: new Set(Y.open),
|
|
114
114
|
current: L,
|
|
115
115
|
sidebar: !!y,
|
|
116
|
-
toggle: (e) => X((t) =>
|
|
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:
|
|
121
|
-
doc:
|
|
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(
|
|
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:
|
|
134
|
+
className: m ? "" : B
|
|
135
135
|
}), Q.length === 0 ? /* @__PURE__ */ M(w, {
|
|
136
136
|
variant: "ghost",
|
|
137
137
|
size: "xs",
|
|
138
|
-
icon: /* @__PURE__ */ M(
|
|
138
|
+
icon: /* @__PURE__ */ M(ee, {}),
|
|
139
139
|
label: T("new"),
|
|
140
140
|
onClick: () => z.create.mutate({}),
|
|
141
141
|
disabled: z.create.isPending,
|
|
142
|
-
className:
|
|
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
|
-
}), !
|
|
167
|
-
children: /* @__PURE__ */ M(
|
|
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(
|
|
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) =>
|
|
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(
|
|
185
|
+
className: R(m && "flex min-h-0 flex-1 flex-col"),
|
|
186
186
|
children: [
|
|
187
|
-
|
|
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(
|
|
196
|
+
/* @__PURE__ */ N(h, {
|
|
197
197
|
to: "/$workspace/docs",
|
|
198
|
-
params: { workspace:
|
|
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(
|
|
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(
|
|
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",
|
|
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:
|
|
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(
|
|
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) =>
|
|
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(
|
|
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) =>
|
|
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(
|
|
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:
|
|
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:
|
|
288
|
-
let
|
|
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:
|
|
291
|
-
onClick: () =>
|
|
290
|
+
label: d("newInSpace"),
|
|
291
|
+
onClick: () => h.create.mutate({ team: r?.key })
|
|
292
292
|
},
|
|
293
293
|
{
|
|
294
294
|
label: ne("openTable"),
|
|
295
|
-
onClick: () =>
|
|
295
|
+
onClick: () => b({
|
|
296
296
|
to: "/$workspace/docs/space/$space",
|
|
297
297
|
params: {
|
|
298
|
-
workspace:
|
|
299
|
-
space:
|
|
298
|
+
workspace: S,
|
|
299
|
+
space: r?.key ?? "workspace"
|
|
300
300
|
}
|
|
301
301
|
})
|
|
302
302
|
},
|
|
303
303
|
{
|
|
304
|
-
label:
|
|
305
|
-
items:
|
|
304
|
+
label: d("newFromTemplate"),
|
|
305
|
+
items: te.map((e) => ({
|
|
306
306
|
label: e.title,
|
|
307
|
-
onClick: () =>
|
|
308
|
-
team:
|
|
307
|
+
onClick: () => h.create.mutate({
|
|
308
|
+
team: r?.key,
|
|
309
309
|
template: e.id
|
|
310
310
|
})
|
|
311
311
|
}))
|
|
312
312
|
},
|
|
313
313
|
{
|
|
314
|
-
label:
|
|
315
|
-
onClick: () => e.transfer.pick({ space:
|
|
314
|
+
label: d("importFiles"),
|
|
315
|
+
onClick: () => e.transfer.pick({ space: r?.key ?? "workspace" })
|
|
316
316
|
},
|
|
317
317
|
{
|
|
318
|
-
label:
|
|
319
|
-
onClick: () => e.transfer.pick({ space:
|
|
318
|
+
label: d("importFolder"),
|
|
319
|
+
onClick: () => e.transfer.pick({ space: r?.key ?? "workspace" }, !0)
|
|
320
320
|
},
|
|
321
321
|
{
|
|
322
|
-
label:
|
|
323
|
-
onClick: () => e.transfer.download({ space:
|
|
322
|
+
label: d("exportMarkdown"),
|
|
323
|
+
onClick: () => e.transfer.download({ space: r?.key ?? "workspace" })
|
|
324
324
|
},
|
|
325
325
|
{
|
|
326
|
-
label:
|
|
327
|
-
onClick: () =>
|
|
328
|
-
space:
|
|
329
|
-
title:
|
|
326
|
+
label: d("shareSpace"),
|
|
327
|
+
onClick: () => _({
|
|
328
|
+
space: r?.key ?? "workspace",
|
|
329
|
+
title: i
|
|
330
330
|
})
|
|
331
331
|
},
|
|
332
|
-
...
|
|
332
|
+
...r ? [
|
|
333
333
|
{
|
|
334
|
-
label:
|
|
335
|
-
onClick: () =>
|
|
334
|
+
label: d("teamIssues"),
|
|
335
|
+
onClick: () => b({
|
|
336
336
|
to: "/$workspace/teams/$key/issues",
|
|
337
337
|
params: {
|
|
338
|
-
workspace:
|
|
339
|
-
key:
|
|
338
|
+
workspace: S,
|
|
339
|
+
key: r.key
|
|
340
340
|
}
|
|
341
341
|
})
|
|
342
342
|
},
|
|
343
343
|
D,
|
|
344
|
-
...
|
|
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",
|
|
350
|
-
}, k =
|
|
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:
|
|
353
|
+
docs: s,
|
|
354
354
|
depth: 0,
|
|
355
|
-
trail:
|
|
355
|
+
trail: i,
|
|
356
356
|
above: [],
|
|
357
|
-
label:
|
|
357
|
+
label: i
|
|
358
358
|
}) : /* @__PURE__ */ M("p", {
|
|
359
359
|
id: C,
|
|
360
|
-
className: R("py-1 text-xs text-muted-foreground",
|
|
361
|
-
children:
|
|
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(
|
|
366
|
-
label:
|
|
367
|
-
onClick: () =>
|
|
368
|
-
className:
|
|
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:
|
|
371
|
+
label: f("moreActionsFor", { name: r?.name ?? i })
|
|
372
372
|
});
|
|
373
|
-
return
|
|
374
|
-
label:
|
|
375
|
-
icon:
|
|
376
|
-
open: !
|
|
377
|
-
onOpenChange: (e) => e ===
|
|
378
|
-
onContextMenu: (e) =>
|
|
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) =>
|
|
388
|
+
onContextMenu: (e) => p(e, T()),
|
|
389
389
|
onDragOver: re,
|
|
390
390
|
onDrop: ie,
|
|
391
391
|
children: [
|
|
392
392
|
/* @__PURE__ */ M(E, {
|
|
393
|
-
content:
|
|
393
|
+
content: d(c ? "expand" : "collapse"),
|
|
394
394
|
children: /* @__PURE__ */ N("button", {
|
|
395
395
|
type: "button",
|
|
396
|
-
onClick:
|
|
397
|
-
"aria-expanded": !
|
|
398
|
-
"aria-controls":
|
|
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(
|
|
403
|
+
children: /* @__PURE__ */ M(x, { className: R("size-3", !c && "rotate-90") })
|
|
404
404
|
}),
|
|
405
|
-
|
|
405
|
+
a,
|
|
406
406
|
/* @__PURE__ */ M("span", {
|
|
407
407
|
className: "truncate",
|
|
408
|
-
children:
|
|
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
|
-
}), !
|
|
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:
|
|
435
|
-
let
|
|
436
|
-
...
|
|
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
|
-
}),
|
|
438
|
+
}), m = e.current === t.key, g = ae(null);
|
|
439
439
|
k(() => {
|
|
440
|
-
|
|
441
|
-
}, [
|
|
442
|
-
let
|
|
443
|
-
path:
|
|
444
|
-
title:
|
|
445
|
-
}),
|
|
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[
|
|
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: (
|
|
450
|
-
|
|
449
|
+
onDragStart: (n) => {
|
|
450
|
+
n.dataTransfer.effectAllowed = "move", n.dataTransfer.setData(le, t.key), e.drag.start(t);
|
|
451
451
|
},
|
|
452
|
-
onDragEnd:
|
|
453
|
-
onDragOver: (
|
|
454
|
-
|
|
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: (
|
|
457
|
-
|
|
456
|
+
onDrop: (n) => {
|
|
457
|
+
n.preventDefault(), e.drag.drop(t, G(n), o);
|
|
458
458
|
},
|
|
459
459
|
children: [
|
|
460
|
-
|
|
461
|
-
content:
|
|
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: () =>
|
|
464
|
+
onClick: () => e.toggle(t.id),
|
|
465
465
|
"aria-expanded": f,
|
|
466
|
-
"aria-controls": f ?
|
|
467
|
-
"aria-label":
|
|
466
|
+
"aria-controls": f ? v : void 0,
|
|
467
|
+
"aria-label": l("inside", { title: t.title }),
|
|
468
468
|
className: V,
|
|
469
|
-
children: /* @__PURE__ */ M(
|
|
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:
|
|
474
|
-
children: /* @__PURE__ */ N(
|
|
473
|
+
content: _,
|
|
474
|
+
children: /* @__PURE__ */ N(h, {
|
|
475
475
|
to: "/$workspace/docs/$doc",
|
|
476
476
|
params: {
|
|
477
|
-
workspace:
|
|
478
|
-
doc:
|
|
477
|
+
workspace: e.workspace,
|
|
478
|
+
doc: a(t)
|
|
479
479
|
},
|
|
480
480
|
ref: g,
|
|
481
|
-
"aria-current":
|
|
482
|
-
onContextMenu: (
|
|
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:
|
|
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
|
-
|
|
491
|
-
|
|
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:
|
|
493
|
+
children: l("templateTag")
|
|
494
494
|
})
|
|
495
495
|
]
|
|
496
496
|
})
|
|
497
497
|
}),
|
|
498
498
|
/* @__PURE__ */ M(I, {
|
|
499
|
-
items: () =>
|
|
500
|
-
label: u("moreActionsFor", { name:
|
|
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 &&
|
|
505
|
-
ctx:
|
|
506
|
-
id:
|
|
507
|
-
docs:
|
|
504
|
+
}), f && p.length > 0 && /* @__PURE__ */ M(me, {
|
|
505
|
+
ctx: e,
|
|
506
|
+
id: v,
|
|
507
|
+
docs: p,
|
|
508
508
|
depth: r + 1,
|
|
509
|
-
trail:
|
|
510
|
-
parent:
|
|
511
|
-
above: [...s,
|
|
512
|
-
label:
|
|
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:
|
|
516
|
-
let o = j("docs"),
|
|
517
|
-
...
|
|
518
|
-
q:
|
|
519
|
-
limit:
|
|
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
|
|
523
|
+
return m ? /* @__PURE__ */ M("p", {
|
|
524
524
|
className: "px-2 text-sm text-muted-foreground",
|
|
525
525
|
children: o("searching")
|
|
526
|
-
}) :
|
|
526
|
+
}) : p?.length ? /* @__PURE__ */ N("ul", {
|
|
527
527
|
className: "space-y-1",
|
|
528
528
|
"aria-label": o("results"),
|
|
529
|
-
children: [
|
|
529
|
+
children: [p.map((t) => /* @__PURE__ */ M("li", { children: /* @__PURE__ */ N(h, {
|
|
530
530
|
to: "/$workspace/docs/$doc",
|
|
531
531
|
params: {
|
|
532
|
-
workspace:
|
|
533
|
-
doc:
|
|
532
|
+
workspace: e,
|
|
533
|
+
doc: a(t)
|
|
534
534
|
},
|
|
535
|
-
onContextMenu: (e) =>
|
|
536
|
-
"aria-current":
|
|
537
|
-
className: R("block rounded-md px-2 py-1.5 text-sm hover: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:
|
|
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:
|
|
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 ===
|
|
552
|
+
children: u.find((e) => e.id === t.teamId)?.key ?? o("workspaceShort")
|
|
553
553
|
})
|
|
554
554
|
]
|
|
555
|
-
}),
|
|
556
|
-
}) },
|
|
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: () =>
|
|
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:
|
|
578
|
-
let r = j("docs"),
|
|
579
|
-
return
|
|
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:
|
|
582
|
+
children: c.map((n) => /* @__PURE__ */ M("li", { children: /* @__PURE__ */ N(h, {
|
|
583
583
|
to: "/$workspace/docs/$doc",
|
|
584
584
|
params: {
|
|
585
|
-
workspace:
|
|
586
|
-
doc:
|
|
585
|
+
workspace: e,
|
|
586
|
+
doc: a(n)
|
|
587
587
|
},
|
|
588
|
-
onContextMenu: (e) =>
|
|
589
|
-
"aria-current":
|
|
590
|
-
className: R(ue, "items-center gap-1.5 py-1 pr-1 pl-2",
|
|
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:
|
|
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:
|
|
599
|
+
children: n.title
|
|
600
600
|
}),
|
|
601
|
-
|
|
602
|
-
value:
|
|
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
|
-
}) },
|
|
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")
|