@parallelworks/tandem-web 0.141.2 → 0.142.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_virtual/_virtual_i18n/en/common.js +58 -0
- package/_virtual/_virtual_i18n/es/common.js +58 -0
- package/_virtual/_virtual_i18n/ja/common.js +58 -0
- package/_virtual/_virtual_i18n/ko/common.js +58 -0
- package/_virtual/_virtual_i18n/zh/common.js +58 -0
- package/components/DocProperties.js +314 -0
- package/components/DocTable.js +176 -0
- package/components/DocViewBlock.js +104 -0
- package/components/DocsTree.js +16 -6
- package/components/Editor.js +30 -28
- package/components/SlashMenu.js +2 -0
- package/lib/docProperties.js +135 -0
- package/package.json +1 -1
- package/routeTree.gen.js +176 -170
- package/routes/_workspace/docs/_doc2.js +147 -140
- package/routes/_workspace/docs/space._space.js +6 -0
- package/routes/_workspace/docs/space2._space.js +256 -0
- package/routes/_workspace/docs2.js +3 -3
- package/routes/_workspace2.js +2 -2
- package/styles.css +39 -0
|
@@ -3,61 +3,62 @@ import { Link as t, useNavigate as n } from "../../../lib/router.js";
|
|
|
3
3
|
import { docBacklinksQuery as r, docDecisionsQuery as i, docIssuesQuery as a, docQuery as o, lostSectionsQuery as s, meQuery as c, teamsQuery as l, workspaceQuery as u } from "../../../api/queries.js";
|
|
4
4
|
import { Route as d } from "./_doc.js";
|
|
5
5
|
import { CommentIcon as f, StatusIcon as p } from "../../../components/icons.js";
|
|
6
|
-
import { termRef as
|
|
7
|
-
import { copyItem as
|
|
8
|
-
import { docKey as
|
|
9
|
-
import { headingAnchor as
|
|
10
|
-
import { useTime as
|
|
11
|
-
import { usePeople as
|
|
12
|
-
import { issueURL as
|
|
13
|
-
import { useNewIssue as
|
|
14
|
-
import { rememberPage as
|
|
15
|
-
import { DocIcon as
|
|
16
|
-
import { PersonHoverCard as
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
6
|
+
import { termRef as m } from "../../../lib/knowledgeKinds.js";
|
|
7
|
+
import { copyItem as ee } from "../../../lib/menus.js";
|
|
8
|
+
import { docKey as te, docPath as ne, docRef as h, docURL as re, useDocActions as ie, useDocMenu as ae } from "../../../lib/docs.js";
|
|
9
|
+
import { headingAnchor as oe } from "../../../lib/glossary.js";
|
|
10
|
+
import { useTime as se } from "../../../lib/time.js";
|
|
11
|
+
import { usePeople as ce } from "../../../lib/people.js";
|
|
12
|
+
import { issueURL as le, useIssueMenu as g } from "../../../lib/issueMenu.js";
|
|
13
|
+
import { useNewIssue as ue } from "../../../lib/newIssue.js";
|
|
14
|
+
import { rememberPage as de } from "../../../lib/recent.js";
|
|
15
|
+
import { DocIcon as _ } from "../../../components/DocIcon.js";
|
|
16
|
+
import { PersonHoverCard as v } from "../../../components/PersonHoverCard.js";
|
|
17
|
+
import { DocProperties as fe } from "../../../components/DocProperties.js";
|
|
18
|
+
import { Editor as pe } from "../../../components/Editor.js";
|
|
19
|
+
import { useOthersOn as me, useReportLocation as he } from "../../../lib/live.js";
|
|
20
|
+
import { AnsweredDecision as y, DecisionCard as b } from "../../../components/AgentWork.js";
|
|
21
|
+
import { DocCover as ge, DocLookControls as _e } from "../../../components/DocLook.js";
|
|
22
|
+
import { FavoriteStar as ve } from "../../../components/FavoriteStar.js";
|
|
23
|
+
import { AreaSelect as ye } from "../../../components/AreaSelect.js";
|
|
24
|
+
import { caretColor as x, useCollabSession as S } from "../../../lib/collab.js";
|
|
25
|
+
import { CollabEditor as C } from "../../../components/CollabEditor.js";
|
|
26
|
+
import { DocComments as be, useOpenThreads as xe } from "../../../components/DocComments.js";
|
|
27
|
+
import { DocHistory as Se, DocVersion as Ce } from "../../../components/DocHistory.js";
|
|
28
|
+
import { DocOutline as we } from "../../../components/DocOutline.js";
|
|
29
|
+
import { Connections as Te } from "../../../components/Graph.js";
|
|
30
|
+
import { FieldNote as Ee, Viewers as De } from "../../../components/Presence.js";
|
|
31
|
+
import { UnlinkedMentions as Oe, useUnlinkedMentions as ke } from "../../../components/UnlinkedMentions.js";
|
|
32
|
+
import { Avatar as w, Breadcrumbs as T, Button as E, ErrorText as D, TitleInput as O, Tooltip as k, useOpenMenu as A } from "@parallelworks/ui";
|
|
33
|
+
import { useCallback as Ae, useEffect as j, useMemo as je, useRef as M, useState as N } from "react";
|
|
34
|
+
import { useErrorMessage as Me } from "@parallelworks/problem/react";
|
|
34
35
|
import { useTranslations as P } from "use-intl";
|
|
35
36
|
import { Fragment as F, jsx as I, jsxs as L } from "react/jsx-runtime";
|
|
36
37
|
import { useQuery as R, useSuspenseQuery as z } from "@tanstack/react-query";
|
|
37
|
-
import { MoreButton as
|
|
38
|
+
import { MoreButton as Ne } from "@parallelworks/ui/list";
|
|
38
39
|
// src/routes/$workspace/docs/$doc.tsx?tsr-split=component
|
|
39
|
-
var
|
|
40
|
+
var Pe = 120;
|
|
40
41
|
function B() {
|
|
41
|
-
let t = P("docs"), r = P("common"), i =
|
|
42
|
-
|
|
42
|
+
let t = P("docs"), r = P("common"), i = Me(), { workspace: a, doc: s } = d.useParams(), { rename: f } = d.useSearch(), { data: p } = z(o(a, te(s))), m = p.key, { data: se } = z(l(a)), { data: ce } = z(c), g = se.find((e) => e.id === p.teamId), { data: _ } = z(u(a)), [v, y] = N();
|
|
43
|
+
he({
|
|
43
44
|
doc: p.key,
|
|
44
|
-
...
|
|
45
|
-
}), e(p.title || t("untitled"),
|
|
46
|
-
let
|
|
45
|
+
...v && { field: v }
|
|
46
|
+
}), e(p.title || t("untitled"), g?.name);
|
|
47
|
+
let b = me({ doc: p.key }, ce?.user.username);
|
|
47
48
|
j(() => {
|
|
48
|
-
|
|
49
|
+
de(a, {
|
|
49
50
|
kind: "doc",
|
|
50
|
-
href:
|
|
51
|
+
href: ne(a, p),
|
|
51
52
|
label: p.title
|
|
52
53
|
});
|
|
53
54
|
}, [a, p]);
|
|
54
|
-
let
|
|
55
|
+
let x = n(), S = A(), C = ae(a), w = ie(a), T = ue(), O = M(null), [k, je] = N(null), F = M(null), R = ke(a, p, k), [B, We] = N(""), V = M(null), [H, U] = N(!1), [Ge, W] = N(), G = xe(a, m), [K, q] = N(!1), [Ke, J] = N(!1), [qe, Y] = N(!1), [X, Z] = N();
|
|
55
56
|
j(() => {
|
|
56
|
-
(s !==
|
|
57
|
+
(s !== h(p) || f) && x({
|
|
57
58
|
to: "/$workspace/docs/$doc",
|
|
58
59
|
params: {
|
|
59
60
|
workspace: a,
|
|
60
|
-
doc:
|
|
61
|
+
doc: h(p)
|
|
61
62
|
},
|
|
62
63
|
search: {},
|
|
63
64
|
replace: !0
|
|
@@ -67,20 +68,20 @@ function B() {
|
|
|
67
68
|
p,
|
|
68
69
|
a,
|
|
69
70
|
f,
|
|
70
|
-
|
|
71
|
+
x
|
|
71
72
|
]);
|
|
72
|
-
let
|
|
73
|
-
if (O.current = e,
|
|
73
|
+
let Je = Ae((e) => {
|
|
74
|
+
if (O.current = e, je(e), !e) return;
|
|
74
75
|
let t = decodeURIComponent(location.hash.slice(1));
|
|
75
76
|
if (t) {
|
|
76
|
-
for (let n of e.view.dom.querySelectorAll("h1, h2, h3, h4, h5, h6")) if (
|
|
77
|
+
for (let n of e.view.dom.querySelectorAll("h1, h2, h3, h4, h5, h6")) if (oe(n.textContent ?? "") === t) {
|
|
77
78
|
n.scrollIntoView({ block: "start" });
|
|
78
79
|
break;
|
|
79
80
|
}
|
|
80
81
|
}
|
|
81
82
|
e.on("selectionUpdate", () => {
|
|
82
83
|
let { from: t, to: n } = e.state.selection;
|
|
83
|
-
|
|
84
|
+
We(t === n ? "" : e.state.doc.textBetween(t, n, "\n\n").trim());
|
|
84
85
|
});
|
|
85
86
|
}, []);
|
|
86
87
|
j(() => {
|
|
@@ -93,7 +94,7 @@ function B() {
|
|
|
93
94
|
quoteSuffix: r.textBetween(n, Math.min(r.content.size, n + 64), "\n")
|
|
94
95
|
});
|
|
95
96
|
}, [H, B]);
|
|
96
|
-
let
|
|
97
|
+
let Ye = (e) => {
|
|
97
98
|
let t = O.current;
|
|
98
99
|
if (!t || !e.quote) return;
|
|
99
100
|
let n = t.state.doc, r = n.textBetween(0, n.content.size, "\n"), i = -1, a = -1;
|
|
@@ -124,15 +125,15 @@ function B() {
|
|
|
124
125
|
}).scrollIntoView().run();
|
|
125
126
|
}, Q = () => {
|
|
126
127
|
let e = B;
|
|
127
|
-
if (!e || !
|
|
128
|
+
if (!e || !g) return;
|
|
128
129
|
let n = e.split("\n").map((e) => e ? `> ${e}` : ">").join("\n");
|
|
129
|
-
|
|
130
|
-
team:
|
|
131
|
-
title: (e.split("\n")[0] ?? "").slice(0,
|
|
130
|
+
T({
|
|
131
|
+
team: g.key,
|
|
132
|
+
title: (e.split("\n")[0] ?? "").slice(0, Pe),
|
|
132
133
|
body: t("fromDoc", {
|
|
133
134
|
quote: n,
|
|
134
135
|
title: p.title,
|
|
135
|
-
url:
|
|
136
|
+
url: re(a, p)
|
|
136
137
|
}),
|
|
137
138
|
origin: { doc: p.key },
|
|
138
139
|
onCreated: (e) => {
|
|
@@ -145,25 +146,25 @@ function B() {
|
|
|
145
146
|
text: e.identifier,
|
|
146
147
|
marks: [{
|
|
147
148
|
type: "link",
|
|
148
|
-
attrs: { href:
|
|
149
|
+
attrs: { href: le(a, e.identifier) }
|
|
149
150
|
}]
|
|
150
151
|
}]).run();
|
|
151
152
|
}
|
|
152
153
|
});
|
|
153
|
-
},
|
|
154
|
+
}, Xe = p.ancestors ?? [], $ = !!p.archivedAt;
|
|
154
155
|
return /* @__PURE__ */ L("div", {
|
|
155
156
|
className: "flex h-full flex-col",
|
|
156
157
|
children: [/* @__PURE__ */ L("header", {
|
|
157
158
|
className: "flex h-12 shrink-0 items-center gap-2 border-b border-border px-4 text-sm md:px-5",
|
|
158
|
-
onContextMenu: (e) =>
|
|
159
|
+
onContextMenu: (e) => S(e, C(p, { onRename: () => V.current?.focus() })),
|
|
159
160
|
children: [
|
|
160
|
-
/* @__PURE__ */ I(
|
|
161
|
+
/* @__PURE__ */ I(He, {
|
|
161
162
|
workspace: a,
|
|
162
163
|
doc: p,
|
|
163
|
-
path:
|
|
164
|
-
space:
|
|
164
|
+
path: Xe,
|
|
165
|
+
space: g?.name ?? _.name
|
|
165
166
|
}),
|
|
166
|
-
/* @__PURE__ */ I(
|
|
167
|
+
/* @__PURE__ */ I(ve, {
|
|
167
168
|
workspace: a,
|
|
168
169
|
kind: "doc",
|
|
169
170
|
target: p.id
|
|
@@ -171,65 +172,65 @@ function B() {
|
|
|
171
172
|
/* @__PURE__ */ L("span", {
|
|
172
173
|
className: "ml-auto flex shrink-0 items-center gap-3",
|
|
173
174
|
children: [
|
|
174
|
-
B && !$ && /* @__PURE__ */ I(
|
|
175
|
+
B && !$ && /* @__PURE__ */ I(E, {
|
|
175
176
|
type: "button",
|
|
176
177
|
size: "sm",
|
|
177
178
|
onMouseDown: (e) => e.preventDefault(),
|
|
178
179
|
onClick: Q,
|
|
179
180
|
children: t("createIssue")
|
|
180
181
|
}),
|
|
181
|
-
|
|
182
|
+
w.rename.isPending && /* @__PURE__ */ I("span", {
|
|
182
183
|
className: "text-xs text-muted-foreground",
|
|
183
184
|
children: r("saving")
|
|
184
185
|
}),
|
|
185
|
-
/* @__PURE__ */ I(
|
|
186
|
+
/* @__PURE__ */ I(De, {
|
|
186
187
|
workspace: a,
|
|
187
|
-
others:
|
|
188
|
+
others: b
|
|
188
189
|
}),
|
|
189
|
-
/* @__PURE__ */ L(
|
|
190
|
+
/* @__PURE__ */ L(E, {
|
|
190
191
|
type: "button",
|
|
191
192
|
size: "sm",
|
|
192
193
|
"aria-pressed": H,
|
|
193
194
|
onClick: () => {
|
|
194
|
-
U((e) => !e), W(void 0),
|
|
195
|
+
U((e) => !e), W(void 0), q(!1), J(!1), Y(!1);
|
|
195
196
|
},
|
|
196
197
|
...G > 0 && { "aria-label": t("commentsCount", { count: G }) },
|
|
197
198
|
className: "relative aria-pressed:bg-muted max-md:hidden",
|
|
198
|
-
children: [t("comments"), /* @__PURE__ */ I(
|
|
199
|
+
children: [t("comments"), /* @__PURE__ */ I(Ue, { count: G })]
|
|
199
200
|
}),
|
|
200
|
-
/* @__PURE__ */ I(
|
|
201
|
+
/* @__PURE__ */ I(E, {
|
|
201
202
|
type: "button",
|
|
202
203
|
size: "sm",
|
|
203
|
-
"aria-pressed":
|
|
204
|
+
"aria-pressed": K,
|
|
204
205
|
onClick: () => {
|
|
205
|
-
|
|
206
|
+
q((e) => !e), Z(void 0), U(!1), J(!1), Y(!1);
|
|
206
207
|
},
|
|
207
208
|
className: "aria-pressed:bg-muted max-md:hidden",
|
|
208
209
|
children: t("history")
|
|
209
210
|
}),
|
|
210
|
-
!$ && /* @__PURE__ */ L(
|
|
211
|
+
!$ && /* @__PURE__ */ L(E, {
|
|
211
212
|
type: "button",
|
|
212
213
|
size: "sm",
|
|
213
214
|
"aria-pressed": Ke,
|
|
214
215
|
onClick: () => {
|
|
215
|
-
|
|
216
|
+
J((e) => !e), U(!1), q(!1), Z(void 0), Y(!1);
|
|
216
217
|
},
|
|
217
218
|
...R.length > 0 && { "aria-label": t("unlinkedCount", { count: R.length }) },
|
|
218
219
|
className: "relative aria-pressed:bg-muted max-md:hidden",
|
|
219
|
-
children: [t("links"), /* @__PURE__ */ I(
|
|
220
|
+
children: [t("links"), /* @__PURE__ */ I(Ue, { count: R.length })]
|
|
220
221
|
}),
|
|
221
|
-
!$ && /* @__PURE__ */ I(
|
|
222
|
+
!$ && /* @__PURE__ */ I(E, {
|
|
222
223
|
type: "button",
|
|
223
224
|
size: "sm",
|
|
224
|
-
"aria-pressed":
|
|
225
|
+
"aria-pressed": qe,
|
|
225
226
|
onClick: () => {
|
|
226
|
-
Y((e) => !e), U(!1),
|
|
227
|
+
Y((e) => !e), U(!1), q(!1), Z(void 0), J(!1);
|
|
227
228
|
},
|
|
228
229
|
className: "aria-pressed:bg-muted max-md:hidden",
|
|
229
230
|
children: t("graph")
|
|
230
231
|
}),
|
|
231
|
-
/* @__PURE__ */ I(
|
|
232
|
-
items: () =>
|
|
232
|
+
/* @__PURE__ */ I(Ne, {
|
|
233
|
+
items: () => C(p, { onRename: () => V.current?.focus() }),
|
|
233
234
|
label: r("moreActionsFor", { name: p.title }),
|
|
234
235
|
visible: !0
|
|
235
236
|
})
|
|
@@ -242,7 +243,7 @@ function B() {
|
|
|
242
243
|
/* @__PURE__ */ L("div", {
|
|
243
244
|
ref: F,
|
|
244
245
|
className: "min-h-0 flex-1 overflow-y-auto",
|
|
245
|
-
children: [!X && /* @__PURE__ */ I(
|
|
246
|
+
children: [!X && /* @__PURE__ */ I(ge, {
|
|
246
247
|
workspace: a,
|
|
247
248
|
doc: p,
|
|
248
249
|
editable: !$
|
|
@@ -256,50 +257,50 @@ function B() {
|
|
|
256
257
|
children: [/* @__PURE__ */ I("span", {
|
|
257
258
|
className: "flex-1",
|
|
258
259
|
children: t("archivedNotice")
|
|
259
|
-
}), /* @__PURE__ */ I(
|
|
260
|
+
}), /* @__PURE__ */ I(E, {
|
|
260
261
|
type: "button",
|
|
261
262
|
variant: "primary",
|
|
262
263
|
size: "sm",
|
|
263
|
-
onClick: () =>
|
|
264
|
+
onClick: () => w.restore.mutate(p),
|
|
264
265
|
children: t("restore")
|
|
265
266
|
})]
|
|
266
267
|
}),
|
|
267
|
-
/* @__PURE__ */ I(
|
|
268
|
+
/* @__PURE__ */ I(_e, {
|
|
268
269
|
workspace: a,
|
|
269
270
|
doc: p,
|
|
270
271
|
editable: !$ && !X
|
|
271
272
|
}),
|
|
272
|
-
/* @__PURE__ */ I(
|
|
273
|
+
/* @__PURE__ */ I(Fe, {
|
|
273
274
|
doc: p,
|
|
274
275
|
input: V,
|
|
275
276
|
autoFocus: !!f,
|
|
276
277
|
readOnly: $,
|
|
277
|
-
onFocus: () =>
|
|
278
|
-
onBlur: () =>
|
|
279
|
-
onSave: (e) =>
|
|
278
|
+
onFocus: () => y("title"),
|
|
279
|
+
onBlur: () => y(void 0),
|
|
280
|
+
onSave: (e) => w.rename.mutate({
|
|
280
281
|
doc: p,
|
|
281
282
|
title: e
|
|
282
283
|
})
|
|
283
284
|
}, p.id),
|
|
284
|
-
/* @__PURE__ */ I(
|
|
285
|
+
/* @__PURE__ */ I(Ee, {
|
|
285
286
|
workspace: a,
|
|
286
|
-
others:
|
|
287
|
+
others: b,
|
|
287
288
|
field: "title"
|
|
288
289
|
}),
|
|
289
|
-
|
|
290
|
+
w.rename.isError && /* @__PURE__ */ I(D, {
|
|
290
291
|
className: "mt-1",
|
|
291
|
-
children: i(
|
|
292
|
+
children: i(w.rename.error)
|
|
292
293
|
}),
|
|
293
294
|
/* @__PURE__ */ L("div", {
|
|
294
295
|
className: "mt-2 flex flex-wrap items-center gap-x-3 gap-y-1",
|
|
295
|
-
children: [/* @__PURE__ */ I(
|
|
296
|
+
children: [/* @__PURE__ */ I(Ie, {
|
|
296
297
|
workspace: a,
|
|
297
298
|
doc: p
|
|
298
|
-
}), /* @__PURE__ */ I(
|
|
299
|
+
}), /* @__PURE__ */ I(ye, {
|
|
299
300
|
workspace: a,
|
|
300
301
|
teamId: p.teamId,
|
|
301
302
|
value: p.areaId,
|
|
302
|
-
onChange: (e) =>
|
|
303
|
+
onChange: (e) => w.fileUnder.mutate({
|
|
303
304
|
doc: p,
|
|
304
305
|
area: e
|
|
305
306
|
}),
|
|
@@ -307,75 +308,81 @@ function B() {
|
|
|
307
308
|
className: "flex h-6 items-center gap-1.5 rounded-md px-1.5 text-xs hover:bg-muted"
|
|
308
309
|
})]
|
|
309
310
|
}),
|
|
311
|
+
!X && /* @__PURE__ */ I(fe, {
|
|
312
|
+
workspace: a,
|
|
313
|
+
doc: p,
|
|
314
|
+
space: g?.key ?? "workspace",
|
|
315
|
+
editable: !$
|
|
316
|
+
}),
|
|
310
317
|
/* @__PURE__ */ I("div", {
|
|
311
|
-
onContextMenu: (e) => B && !$ &&
|
|
318
|
+
onContextMenu: (e) => B && !$ && S(e, [{
|
|
312
319
|
label: t("createIssue"),
|
|
313
320
|
onClick: Q
|
|
314
|
-
},
|
|
315
|
-
children: X ? /* @__PURE__ */ I(
|
|
321
|
+
}, ee(t("copySelection"), B)]),
|
|
322
|
+
children: X ? /* @__PURE__ */ I(Ce, {
|
|
316
323
|
workspace: a,
|
|
317
324
|
doc: p,
|
|
318
325
|
versionId: X,
|
|
319
326
|
onDone: () => Z(void 0)
|
|
320
327
|
}) : $ ? /* @__PURE__ */ I("div", {
|
|
321
328
|
className: "mt-4",
|
|
322
|
-
children: /* @__PURE__ */ I(
|
|
329
|
+
children: /* @__PURE__ */ I(pe, {
|
|
323
330
|
value: p.body ?? "",
|
|
324
331
|
editable: !1,
|
|
325
332
|
className: "min-h-32"
|
|
326
333
|
})
|
|
327
|
-
}) : /* @__PURE__ */ I(
|
|
334
|
+
}) : /* @__PURE__ */ I(Le, {
|
|
328
335
|
workspace: a,
|
|
329
336
|
doc: p,
|
|
330
|
-
onEditor:
|
|
331
|
-
onFocus: () =>
|
|
332
|
-
onBlur: () =>
|
|
337
|
+
onEditor: Je,
|
|
338
|
+
onFocus: () => y("body"),
|
|
339
|
+
onBlur: () => y(void 0)
|
|
333
340
|
})
|
|
334
341
|
}),
|
|
335
|
-
/* @__PURE__ */ I(
|
|
342
|
+
/* @__PURE__ */ I(ze, {
|
|
336
343
|
workspace: a,
|
|
337
344
|
docKey: p.key
|
|
338
345
|
}),
|
|
339
|
-
/* @__PURE__ */ I(
|
|
346
|
+
/* @__PURE__ */ I(Be, {
|
|
340
347
|
workspace: a,
|
|
341
348
|
docKey: p.key
|
|
342
349
|
}),
|
|
343
|
-
/* @__PURE__ */ I(
|
|
350
|
+
/* @__PURE__ */ I(Re, {
|
|
344
351
|
workspace: a,
|
|
345
352
|
docKey: p.key
|
|
346
353
|
}),
|
|
347
|
-
/* @__PURE__ */ I(
|
|
354
|
+
/* @__PURE__ */ I(Ve, {
|
|
348
355
|
workspace: a,
|
|
349
356
|
docKey: p.key
|
|
350
357
|
})
|
|
351
358
|
]
|
|
352
|
-
}), !$ && !X && /* @__PURE__ */ I(
|
|
359
|
+
}), !$ && !X && /* @__PURE__ */ I(we, {
|
|
353
360
|
editor: k,
|
|
354
361
|
scroller: F
|
|
355
362
|
})]
|
|
356
363
|
})]
|
|
357
364
|
}),
|
|
358
|
-
H && /* @__PURE__ */ I(
|
|
365
|
+
H && /* @__PURE__ */ I(be, {
|
|
359
366
|
workspace: a,
|
|
360
367
|
doc: p,
|
|
361
|
-
draft:
|
|
368
|
+
draft: Ge,
|
|
362
369
|
onDraftDone: () => W(void 0),
|
|
363
|
-
onShowQuote:
|
|
370
|
+
onShowQuote: Ye
|
|
364
371
|
}),
|
|
365
|
-
|
|
372
|
+
K && /* @__PURE__ */ I(Se, {
|
|
366
373
|
workspace: a,
|
|
367
374
|
doc: p,
|
|
368
375
|
selected: X,
|
|
369
376
|
onSelect: Z
|
|
370
377
|
}),
|
|
371
|
-
Ke && !$ && /* @__PURE__ */ I(
|
|
378
|
+
Ke && !$ && /* @__PURE__ */ I(Oe, {
|
|
372
379
|
editor: k,
|
|
373
380
|
suggestions: R
|
|
374
381
|
}),
|
|
375
|
-
|
|
382
|
+
qe && !$ && /* @__PURE__ */ I("aside", {
|
|
376
383
|
"aria-label": t("graph"),
|
|
377
384
|
className: "w-96 shrink-0 overflow-y-auto border-l border-border px-3 py-4 max-md:hidden",
|
|
378
|
-
children: /* @__PURE__ */ I(
|
|
385
|
+
children: /* @__PURE__ */ I(Te, {
|
|
379
386
|
workspace: a,
|
|
380
387
|
of: { doc: p.key },
|
|
381
388
|
width: 352
|
|
@@ -385,7 +392,7 @@ function B() {
|
|
|
385
392
|
})]
|
|
386
393
|
});
|
|
387
394
|
}
|
|
388
|
-
function
|
|
395
|
+
function Fe({ doc: e, input: t, autoFocus: n, readOnly: r, onSave: i, onFocus: a, onBlur: o }) {
|
|
389
396
|
let s = P("docs");
|
|
390
397
|
return /* @__PURE__ */ L(F, { children: [/* @__PURE__ */ I("h1", {
|
|
391
398
|
className: "sr-only",
|
|
@@ -401,15 +408,15 @@ function Pe({ doc: e, input: t, autoFocus: n, readOnly: r, onSave: i, onFocus: a
|
|
|
401
408
|
"aria-label": s("docTitle")
|
|
402
409
|
})] });
|
|
403
410
|
}
|
|
404
|
-
function
|
|
405
|
-
let n = P("docs"), r =
|
|
411
|
+
function Ie({ workspace: e, doc: t }) {
|
|
412
|
+
let n = P("docs"), r = se(), { actorName: i, person: a, avatarOf: o } = ce(e), s = i(t.editor);
|
|
406
413
|
return /* @__PURE__ */ L("p", {
|
|
407
414
|
className: "flex items-center gap-1.5 text-xs text-muted-foreground",
|
|
408
|
-
children: [/* @__PURE__ */ I(
|
|
415
|
+
children: [/* @__PURE__ */ I(v, {
|
|
409
416
|
workspace: e,
|
|
410
417
|
kind: t.editor.kind,
|
|
411
418
|
handle: t.editor.handle,
|
|
412
|
-
children: /* @__PURE__ */ I(
|
|
419
|
+
children: /* @__PURE__ */ I(w, {
|
|
413
420
|
kind: t.editor.kind === "agent" ? "agent" : "person",
|
|
414
421
|
name: s,
|
|
415
422
|
src: o(t.editor.kind, t.editor.handle),
|
|
@@ -429,15 +436,15 @@ function Fe({ workspace: e, doc: t }) {
|
|
|
429
436
|
})]
|
|
430
437
|
});
|
|
431
438
|
}
|
|
432
|
-
function
|
|
433
|
-
let a = P("docs"), { data: o } = z(c), s = M(null), l =
|
|
439
|
+
function Le({ workspace: e, doc: t, onEditor: n, onFocus: r, onBlur: i }) {
|
|
440
|
+
let a = P("docs"), { data: o } = z(c), s = M(null), l = je(() => ({
|
|
434
441
|
name: o?.user.name ?? a("someone"),
|
|
435
|
-
color:
|
|
442
|
+
color: x(o?.user.username ?? "")
|
|
436
443
|
}), [
|
|
437
444
|
o?.user.name,
|
|
438
445
|
o?.user.username,
|
|
439
446
|
a
|
|
440
|
-
]), { session: u, error: d } =
|
|
447
|
+
]), { session: u, error: d } = S({
|
|
441
448
|
workspace: e,
|
|
442
449
|
target: { doc: t.key },
|
|
443
450
|
user: l,
|
|
@@ -445,7 +452,7 @@ function Ie({ workspace: e, doc: t, onEditor: n, onFocus: r, onBlur: i }) {
|
|
|
445
452
|
});
|
|
446
453
|
return /* @__PURE__ */ L("div", {
|
|
447
454
|
className: "mt-6 min-h-48",
|
|
448
|
-
children: [u ? /* @__PURE__ */ I(
|
|
455
|
+
children: [u ? /* @__PURE__ */ I(C, {
|
|
449
456
|
session: u,
|
|
450
457
|
user: l,
|
|
451
458
|
getMarkdown: s,
|
|
@@ -455,18 +462,18 @@ function Ie({ workspace: e, doc: t, onEditor: n, onFocus: r, onBlur: i }) {
|
|
|
455
462
|
placeholder: a("bodyPlaceholder"),
|
|
456
463
|
label: a("body"),
|
|
457
464
|
className: "min-h-48"
|
|
458
|
-
}, `${u.generation}:${u.doc.guid}`) : /* @__PURE__ */ I(
|
|
465
|
+
}, `${u.generation}:${u.doc.guid}`) : /* @__PURE__ */ I(pe, {
|
|
459
466
|
value: t.body ?? "",
|
|
460
467
|
editable: !1,
|
|
461
468
|
className: "min-h-48"
|
|
462
|
-
}), /* @__PURE__ */ I(
|
|
469
|
+
}), /* @__PURE__ */ I(D, {
|
|
463
470
|
className: "mt-1",
|
|
464
471
|
children: d
|
|
465
472
|
})]
|
|
466
473
|
});
|
|
467
474
|
}
|
|
468
|
-
function
|
|
469
|
-
let r = P("docs"), { data: i } = z(a(e, n)), o = A(), s =
|
|
475
|
+
function Re({ workspace: e, docKey: n }) {
|
|
476
|
+
let r = P("docs"), { data: i } = z(a(e, n)), o = A(), s = g(e);
|
|
470
477
|
return i.length === 0 ? null : /* @__PURE__ */ L("section", {
|
|
471
478
|
className: "mt-10",
|
|
472
479
|
"aria-label": r("linkedIssues"),
|
|
@@ -498,7 +505,7 @@ function Le({ workspace: e, docKey: n }) {
|
|
|
498
505
|
})]
|
|
499
506
|
});
|
|
500
507
|
}
|
|
501
|
-
function
|
|
508
|
+
function ze({ workspace: e, docKey: n }) {
|
|
502
509
|
let r = P("docs"), { data: i = [] } = R(s(e, n));
|
|
503
510
|
return i.length === 0 ? null : /* @__PURE__ */ L("section", {
|
|
504
511
|
className: "mt-10 rounded-lg border border-warning/60 px-4 py-3",
|
|
@@ -518,7 +525,7 @@ function Re({ workspace: e, docKey: n }) {
|
|
|
518
525
|
to: "/$workspace/knowledge/$term",
|
|
519
526
|
params: {
|
|
520
527
|
workspace: e,
|
|
521
|
-
term:
|
|
528
|
+
term: m(n)
|
|
522
529
|
},
|
|
523
530
|
className: "hover:underline",
|
|
524
531
|
children: r("lostSection", {
|
|
@@ -530,7 +537,7 @@ function Re({ workspace: e, docKey: n }) {
|
|
|
530
537
|
]
|
|
531
538
|
});
|
|
532
539
|
}
|
|
533
|
-
function
|
|
540
|
+
function Be({ workspace: e, docKey: t }) {
|
|
534
541
|
let n = P("docs"), { data: r } = z(i(e, t)), a = r.filter((e) => !e.canceled);
|
|
535
542
|
return a.length === 0 ? null : /* @__PURE__ */ L("section", {
|
|
536
543
|
className: "mt-10 space-y-3",
|
|
@@ -538,19 +545,19 @@ function ze({ workspace: e, docKey: t }) {
|
|
|
538
545
|
children: [/* @__PURE__ */ I("h2", {
|
|
539
546
|
className: "text-sm font-semibold",
|
|
540
547
|
children: n("questions")
|
|
541
|
-
}), a.map((t) => t.answer ? /* @__PURE__ */ I(
|
|
548
|
+
}), a.map((t) => t.answer ? /* @__PURE__ */ I(y, {
|
|
542
549
|
workspace: e,
|
|
543
550
|
decision: t,
|
|
544
551
|
showIssue: !0
|
|
545
|
-
}, t.id) : /* @__PURE__ */ I(
|
|
552
|
+
}, t.id) : /* @__PURE__ */ I(b, {
|
|
546
553
|
workspace: e,
|
|
547
554
|
decision: t,
|
|
548
555
|
showIssue: !0
|
|
549
556
|
}, t.id))]
|
|
550
557
|
});
|
|
551
558
|
}
|
|
552
|
-
function
|
|
553
|
-
let i = P("docs"), { data: a } = z(r(e, n)), o = A(), s =
|
|
559
|
+
function Ve({ workspace: e, docKey: n }) {
|
|
560
|
+
let i = P("docs"), { data: a } = z(r(e, n)), o = A(), s = ae(e), c = g(e), l = "flex h-8 items-center gap-2 rounded-md px-2 text-sm hover:bg-muted";
|
|
554
561
|
return a.docs.length + a.issues.length + a.comments.length === 0 ? null : /* @__PURE__ */ L("section", {
|
|
555
562
|
className: "mt-10",
|
|
556
563
|
"aria-label": i("linkedFrom"),
|
|
@@ -564,11 +571,11 @@ function Be({ workspace: e, docKey: n }) {
|
|
|
564
571
|
to: "/$workspace/docs/$doc",
|
|
565
572
|
params: {
|
|
566
573
|
workspace: e,
|
|
567
|
-
doc:
|
|
574
|
+
doc: h(n)
|
|
568
575
|
},
|
|
569
576
|
onContextMenu: (e) => o(e, s(n)),
|
|
570
577
|
className: l,
|
|
571
|
-
children: [/* @__PURE__ */ I(
|
|
578
|
+
children: [/* @__PURE__ */ I(_, {
|
|
572
579
|
icon: n.icon,
|
|
573
580
|
className: "size-3.5",
|
|
574
581
|
emojiClassName: "text-xs"
|
|
@@ -621,9 +628,9 @@ function Be({ workspace: e, docKey: n }) {
|
|
|
621
628
|
})]
|
|
622
629
|
});
|
|
623
630
|
}
|
|
624
|
-
function
|
|
631
|
+
function He({ workspace: e, doc: t, path: n, space: r }) {
|
|
625
632
|
let i = P("docs");
|
|
626
|
-
return /* @__PURE__ */ I(
|
|
633
|
+
return /* @__PURE__ */ I(T, {
|
|
627
634
|
label: i("breadcrumbs"),
|
|
628
635
|
className: "min-w-0",
|
|
629
636
|
crumbs: [
|
|
@@ -634,8 +641,8 @@ function Ve({ workspace: e, doc: t, path: n, space: r }) {
|
|
|
634
641
|
{ label: r },
|
|
635
642
|
...n.map((t) => ({
|
|
636
643
|
label: t.title,
|
|
637
|
-
href: `/${e}/docs/${
|
|
638
|
-
icon: t.icon && /* @__PURE__ */ I(
|
|
644
|
+
href: `/${e}/docs/${h(t)}`,
|
|
645
|
+
icon: t.icon && /* @__PURE__ */ I(_, {
|
|
639
646
|
icon: t.icon,
|
|
640
647
|
className: "size-3.5",
|
|
641
648
|
emojiClassName: "text-xs"
|
|
@@ -643,7 +650,7 @@ function Ve({ workspace: e, doc: t, path: n, space: r }) {
|
|
|
643
650
|
})),
|
|
644
651
|
{
|
|
645
652
|
label: t.title,
|
|
646
|
-
icon: t.icon && /* @__PURE__ */ I(
|
|
653
|
+
icon: t.icon && /* @__PURE__ */ I(_, {
|
|
647
654
|
icon: t.icon,
|
|
648
655
|
className: "size-3.5",
|
|
649
656
|
emojiClassName: "text-xs"
|
|
@@ -652,7 +659,7 @@ function Ve({ workspace: e, doc: t, path: n, space: r }) {
|
|
|
652
659
|
]
|
|
653
660
|
});
|
|
654
661
|
}
|
|
655
|
-
function
|
|
662
|
+
function Ue({ count: e }) {
|
|
656
663
|
return e <= 0 ? null : /* @__PURE__ */ I("span", {
|
|
657
664
|
"aria-hidden": !0,
|
|
658
665
|
className: "pointer-events-none absolute -top-1.5 -right-1.5 flex h-4 min-w-4 items-center justify-center rounded-full bg-primary px-1 text-[10px] font-semibold text-primary-foreground tabular-nums",
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { createFileRoute as e, lazyRouteComponent as t } from "@tanstack/react-router";
|
|
2
|
+
var n = e("/$workspace/docs/space/$space")({
|
|
3
|
+
validateSearch: (e) => typeof e.view == "string" && e.view ? { view: e.view } : {},
|
|
4
|
+
component: t(() => import("./space2._space.js"), "component")
|
|
5
|
+
});
|
|
6
|
+
export { n as Route };
|