@parallelworks/tandem-web 0.189.3 → 0.189.5
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/SubpageViews.js +264 -224
- package/package.json +1 -1
- package/routes/_workspace/docs/_doc2.js +220 -219
|
@@ -9,38 +9,39 @@ import { DocCover as ae, DocLookControls as oe } from "../../../components/DocLo
|
|
|
9
9
|
import { DocOutline as se } from "../../../components/DocOutline.js";
|
|
10
10
|
import { DocProperties as ce } from "../../../components/DocProperties.js";
|
|
11
11
|
import { DocRuns as le, DocStart as ue } from "../../../components/DocStart.js";
|
|
12
|
-
import { Editor as
|
|
13
|
-
import { FavoriteStar as
|
|
14
|
-
import { Connections as
|
|
15
|
-
import { CommentIcon as
|
|
16
|
-
import { PersonHoverCard as
|
|
17
|
-
import { FieldNote as
|
|
18
|
-
import { SubpageViews as
|
|
19
|
-
import { UnlinkedMentions as
|
|
20
|
-
import { caretColor as
|
|
21
|
-
import { docKey as
|
|
22
|
-
import { headingAnchor as
|
|
23
|
-
import { issueURL as
|
|
24
|
-
import { termRef as
|
|
25
|
-
import { useOthersOn as
|
|
26
|
-
import { copyItem as
|
|
27
|
-
import { useNewIssue as
|
|
28
|
-
import { usePageTitle as
|
|
29
|
-
import { usePeople as
|
|
30
|
-
import { rememberPage as
|
|
31
|
-
import { Link as
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
12
|
+
import { Editor as de } from "../../../components/Editor.js";
|
|
13
|
+
import { FavoriteStar as fe } from "../../../components/FavoriteStar.js";
|
|
14
|
+
import { Connections as pe } from "../../../components/Graph.js";
|
|
15
|
+
import { CommentIcon as me, StatusIcon as p } from "../../../components/icons.js";
|
|
16
|
+
import { PersonHoverCard as he } from "../../../components/PersonHoverCard.js";
|
|
17
|
+
import { FieldNote as ge, Viewers as _e } from "../../../components/Presence.js";
|
|
18
|
+
import { SubpageViews as ve } from "../../../components/SubpageViews.js";
|
|
19
|
+
import { UnlinkedMentions as ye, useUnlinkedMentions as be } from "../../../components/UnlinkedMentions.js";
|
|
20
|
+
import { caretColor as m, useCollabSession as h } from "../../../lib/collab.js";
|
|
21
|
+
import { docKey as xe, docPath as Se, docRef as g, docURL as Ce, useDocActions as we, useDocMenu as _ } from "../../../lib/docs.js";
|
|
22
|
+
import { headingAnchor as Te } from "../../../lib/glossary.js";
|
|
23
|
+
import { issueURL as Ee, useIssueMenu as v } from "../../../lib/issueMenu.js";
|
|
24
|
+
import { termRef as y } from "../../../lib/knowledgeKinds.js";
|
|
25
|
+
import { useOthersOn as De, useReportLocation as Oe } from "../../../lib/live.js";
|
|
26
|
+
import { copyItem as ke } from "../../../lib/menus.js";
|
|
27
|
+
import { useNewIssue as Ae } from "../../../lib/newIssue.js";
|
|
28
|
+
import { usePageTitle as je } from "../../../lib/pageTitle.js";
|
|
29
|
+
import { usePeople as b } from "../../../lib/people.js";
|
|
30
|
+
import { rememberPage as Me } from "../../../lib/recent.js";
|
|
31
|
+
import { Link as x, useNavigate as Ne } from "../../../lib/router.js";
|
|
32
|
+
import { subpageViewsQuery as S } from "../../../lib/subpageViews.js";
|
|
33
|
+
import { useTime as Pe } from "../../../lib/time.js";
|
|
34
|
+
import { Route as Fe } from "./_doc.js";
|
|
35
|
+
import { Avatar as C, Breadcrumbs as w, Button as T, ErrorText as Ie, TitleInput as Le, Tooltip as E, useOpenMenu as D } from "@parallelworks/ui";
|
|
36
|
+
import { useCallback as Re, useEffect as O, useMemo as k, useRef as A, useState as j } from "react";
|
|
37
|
+
import { useErrorMessage as ze } from "@parallelworks/problem/react";
|
|
38
|
+
import { useTranslations as M } from "use-intl";
|
|
39
|
+
import { Fragment as N, jsx as P, jsxs as F } from "react/jsx-runtime";
|
|
40
|
+
import { useQuery as I, useSuspenseQuery as L } from "@tanstack/react-query";
|
|
41
|
+
import { MoreButton as Be } from "@parallelworks/ui/list";
|
|
41
42
|
// src/routes/$workspace/docs/$doc.tsx?tsr-split=component
|
|
42
|
-
var
|
|
43
|
-
function
|
|
43
|
+
var Ve = 120;
|
|
44
|
+
function R(e) {
|
|
44
45
|
let { $from: t, empty: n } = e.state.selection;
|
|
45
46
|
if (n) for (let e = t.depth; e > 0; e--) {
|
|
46
47
|
let n = t.node(e);
|
|
@@ -52,27 +53,27 @@ function Re(e) {
|
|
|
52
53
|
} : void 0;
|
|
53
54
|
}
|
|
54
55
|
}
|
|
55
|
-
function
|
|
56
|
-
let e =
|
|
57
|
-
|
|
56
|
+
function z() {
|
|
57
|
+
let e = M("docs"), t = M("common"), n = ze(), { workspace: i, doc: a } = Fe.useParams(), { rename: l } = Fe.useSearch(), { data: u } = L(r(i, xe(a))), ee = u.key, { data: f } = L(s(i)), { data: me } = L(o), p = f.find((e) => e.id === u.teamId), { data: he } = L(c(i)), [m, h] = j();
|
|
58
|
+
Oe({
|
|
58
59
|
doc: u.key,
|
|
59
|
-
...
|
|
60
|
-
}),
|
|
61
|
-
let
|
|
62
|
-
|
|
63
|
-
|
|
60
|
+
...m && { field: m }
|
|
61
|
+
}), je(u.title || e("untitled"), p?.name);
|
|
62
|
+
let v = De({ doc: u.key }, me?.user.username);
|
|
63
|
+
O(() => {
|
|
64
|
+
Me(i, {
|
|
64
65
|
kind: "doc",
|
|
65
|
-
href:
|
|
66
|
+
href: Se(i, u),
|
|
66
67
|
label: u.title
|
|
67
68
|
});
|
|
68
69
|
}, [i, u]);
|
|
69
|
-
let
|
|
70
|
-
|
|
71
|
-
(a !==
|
|
70
|
+
let y = Ne(), b = D(), x = _(i), S = we(i), Pe = Ae(), C = A(null), [w, Le] = j(null), E = A(null), k = be(i, u, w), [I, z] = j(""), [V, Ze] = j(""), H = A(null), [U, W] = j(!1), [Qe, G] = j(), K = ne(i, ee), [$e, q] = j(!1), [et, J] = j(!1), [tt, Y] = j(!1), [X, Z] = j();
|
|
71
|
+
O(() => {
|
|
72
|
+
(a !== g(u) || l) && y({
|
|
72
73
|
to: "/$workspace/docs/$doc",
|
|
73
74
|
params: {
|
|
74
75
|
workspace: i,
|
|
75
|
-
doc:
|
|
76
|
+
doc: g(u)
|
|
76
77
|
},
|
|
77
78
|
search: {},
|
|
78
79
|
replace: !0
|
|
@@ -82,34 +83,34 @@ function V() {
|
|
|
82
83
|
u,
|
|
83
84
|
i,
|
|
84
85
|
l,
|
|
85
|
-
|
|
86
|
+
y
|
|
86
87
|
]);
|
|
87
|
-
let nt =
|
|
88
|
-
if (
|
|
88
|
+
let nt = Re((e) => {
|
|
89
|
+
if (C.current = e, Le(e), !e) return;
|
|
89
90
|
let t = decodeURIComponent(location.hash.slice(1));
|
|
90
91
|
if (t) {
|
|
91
|
-
for (let n of e.view.dom.querySelectorAll("h1, h2, h3, h4, h5, h6")) if (
|
|
92
|
+
for (let n of e.view.dom.querySelectorAll("h1, h2, h3, h4, h5, h6")) if (Te(n.textContent ?? "") === t) {
|
|
92
93
|
n.scrollIntoView({ block: "start" });
|
|
93
94
|
break;
|
|
94
95
|
}
|
|
95
96
|
}
|
|
96
97
|
e.on("selectionUpdate", () => {
|
|
97
98
|
let { from: t, to: n } = e.state.selection;
|
|
98
|
-
|
|
99
|
+
z(t === n ? "" : e.state.doc.textBetween(t, n, "\n\n").trim()), Ze(R(e)?.text ?? "");
|
|
99
100
|
});
|
|
100
101
|
}, []);
|
|
101
|
-
|
|
102
|
-
let e =
|
|
103
|
-
if (!U || !
|
|
102
|
+
O(() => {
|
|
103
|
+
let e = C.current;
|
|
104
|
+
if (!U || !I || !e) return;
|
|
104
105
|
let { from: t, to: n } = e.state.selection, r = e.state.doc;
|
|
105
106
|
G({
|
|
106
107
|
quote: r.textBetween(t, n, "\n").trim(),
|
|
107
108
|
quotePrefix: r.textBetween(Math.max(0, t - 64), t, "\n"),
|
|
108
109
|
quoteSuffix: r.textBetween(n, Math.min(r.content.size, n + 64), "\n")
|
|
109
110
|
});
|
|
110
|
-
}, [U,
|
|
111
|
+
}, [U, I]);
|
|
111
112
|
let rt = (e) => {
|
|
112
|
-
let t =
|
|
113
|
+
let t = C.current;
|
|
113
114
|
if (!t || !e.quote) return;
|
|
114
115
|
let n = t.state.doc, r = n.textBetween(0, n.content.size, "\n"), i = -1, a = -1;
|
|
115
116
|
for (let t = r.indexOf(e.quote); t >= 0; t = r.indexOf(e.quote, t + 1)) {
|
|
@@ -138,20 +139,20 @@ function V() {
|
|
|
138
139
|
to: d
|
|
139
140
|
}).scrollIntoView().run();
|
|
140
141
|
}, Q = () => {
|
|
141
|
-
let t =
|
|
142
|
-
if (!n || !
|
|
142
|
+
let t = I ? void 0 : C.current && R(C.current), n = I || t?.text;
|
|
143
|
+
if (!n || !p) return;
|
|
143
144
|
let r = n.split("\n").map((e) => e ? `> ${e}` : ">").join("\n");
|
|
144
|
-
|
|
145
|
-
team:
|
|
146
|
-
title: (n.split("\n")[0] ?? "").slice(0,
|
|
145
|
+
Pe({
|
|
146
|
+
team: p.key,
|
|
147
|
+
title: (n.split("\n")[0] ?? "").slice(0, Ve),
|
|
147
148
|
body: e("fromDoc", {
|
|
148
149
|
quote: r,
|
|
149
150
|
title: u.title,
|
|
150
|
-
url:
|
|
151
|
+
url: Ce(i, u)
|
|
151
152
|
}),
|
|
152
153
|
origin: { doc: u.key },
|
|
153
154
|
onCreated: (e) => {
|
|
154
|
-
let n =
|
|
155
|
+
let n = C.current;
|
|
155
156
|
n && n.chain().insertContentAt(t ? t.end : n.state.selection.to, [{
|
|
156
157
|
type: "text",
|
|
157
158
|
text: " "
|
|
@@ -160,48 +161,48 @@ function V() {
|
|
|
160
161
|
text: e.identifier,
|
|
161
162
|
marks: [{
|
|
162
163
|
type: "link",
|
|
163
|
-
attrs: { href:
|
|
164
|
+
attrs: { href: Ee(i, e.identifier) }
|
|
164
165
|
}]
|
|
165
166
|
}]).run();
|
|
166
167
|
}
|
|
167
168
|
});
|
|
168
169
|
}, it = u.ancestors ?? [], $ = !!u.archivedAt;
|
|
169
|
-
return /* @__PURE__ */
|
|
170
|
+
return /* @__PURE__ */ F("div", {
|
|
170
171
|
className: "flex h-full flex-col",
|
|
171
|
-
children: [/* @__PURE__ */
|
|
172
|
+
children: [/* @__PURE__ */ F("header", {
|
|
172
173
|
className: "flex h-12 shrink-0 items-center gap-2 border-b border-border px-4 text-sm md:px-5",
|
|
173
|
-
onContextMenu: (e) =>
|
|
174
|
+
onContextMenu: (e) => b(e, x(u, { onRename: () => H.current?.focus() })),
|
|
174
175
|
children: [
|
|
175
|
-
/* @__PURE__ */
|
|
176
|
+
/* @__PURE__ */ P(Xe, {
|
|
176
177
|
workspace: i,
|
|
177
178
|
doc: u,
|
|
178
179
|
path: it,
|
|
179
|
-
space:
|
|
180
|
+
space: p?.name ?? he.name
|
|
180
181
|
}),
|
|
181
|
-
/* @__PURE__ */
|
|
182
|
+
/* @__PURE__ */ P(fe, {
|
|
182
183
|
workspace: i,
|
|
183
184
|
kind: "doc",
|
|
184
185
|
target: u.id
|
|
185
186
|
}),
|
|
186
|
-
/* @__PURE__ */
|
|
187
|
+
/* @__PURE__ */ F("span", {
|
|
187
188
|
className: "ml-auto flex shrink-0 items-center gap-3",
|
|
188
189
|
children: [
|
|
189
|
-
(
|
|
190
|
+
(I || V) && p && !$ && /* @__PURE__ */ P(T, {
|
|
190
191
|
type: "button",
|
|
191
192
|
size: "sm",
|
|
192
193
|
onMouseDown: (e) => e.preventDefault(),
|
|
193
194
|
onClick: Q,
|
|
194
|
-
children: e(
|
|
195
|
+
children: e(I ? "createIssue" : "createIssueFromActionItem")
|
|
195
196
|
}),
|
|
196
|
-
|
|
197
|
+
S.rename.isPending && /* @__PURE__ */ P("span", {
|
|
197
198
|
className: "text-xs text-muted-foreground",
|
|
198
199
|
children: t("saving")
|
|
199
200
|
}),
|
|
200
|
-
/* @__PURE__ */
|
|
201
|
+
/* @__PURE__ */ P(_e, {
|
|
201
202
|
workspace: i,
|
|
202
|
-
others:
|
|
203
|
+
others: v
|
|
203
204
|
}),
|
|
204
|
-
/* @__PURE__ */
|
|
205
|
+
/* @__PURE__ */ F(T, {
|
|
205
206
|
type: "button",
|
|
206
207
|
size: "sm",
|
|
207
208
|
"aria-pressed": U,
|
|
@@ -210,9 +211,9 @@ function V() {
|
|
|
210
211
|
},
|
|
211
212
|
...K > 0 && { "aria-label": e("commentsCount", { count: K }) },
|
|
212
213
|
className: "relative aria-pressed:bg-muted max-md:hidden",
|
|
213
|
-
children: [e("comments"), /* @__PURE__ */
|
|
214
|
+
children: [e("comments"), /* @__PURE__ */ P(B, { count: K })]
|
|
214
215
|
}),
|
|
215
|
-
/* @__PURE__ */
|
|
216
|
+
/* @__PURE__ */ P(T, {
|
|
216
217
|
type: "button",
|
|
217
218
|
size: "sm",
|
|
218
219
|
"aria-pressed": $e,
|
|
@@ -222,18 +223,18 @@ function V() {
|
|
|
222
223
|
className: "aria-pressed:bg-muted max-md:hidden",
|
|
223
224
|
children: e("history")
|
|
224
225
|
}),
|
|
225
|
-
!$ && /* @__PURE__ */
|
|
226
|
+
!$ && /* @__PURE__ */ F(T, {
|
|
226
227
|
type: "button",
|
|
227
228
|
size: "sm",
|
|
228
229
|
"aria-pressed": et,
|
|
229
230
|
onClick: () => {
|
|
230
231
|
J((e) => !e), W(!1), q(!1), Z(void 0), Y(!1);
|
|
231
232
|
},
|
|
232
|
-
...
|
|
233
|
+
...k.length > 0 && { "aria-label": e("unlinkedCount", { count: k.length }) },
|
|
233
234
|
className: "relative aria-pressed:bg-muted max-md:hidden",
|
|
234
|
-
children: [e("links"), /* @__PURE__ */
|
|
235
|
+
children: [e("links"), /* @__PURE__ */ P(B, { count: k.length })]
|
|
235
236
|
}),
|
|
236
|
-
!$ && /* @__PURE__ */
|
|
237
|
+
!$ && /* @__PURE__ */ P(T, {
|
|
237
238
|
type: "button",
|
|
238
239
|
size: "sm",
|
|
239
240
|
"aria-pressed": tt,
|
|
@@ -243,78 +244,78 @@ function V() {
|
|
|
243
244
|
className: "aria-pressed:bg-muted max-md:hidden",
|
|
244
245
|
children: e("graph")
|
|
245
246
|
}),
|
|
246
|
-
/* @__PURE__ */
|
|
247
|
-
items: () =>
|
|
247
|
+
/* @__PURE__ */ P(Be, {
|
|
248
|
+
items: () => x(u, { onRename: () => H.current?.focus() }),
|
|
248
249
|
label: t("moreActionsFor", { name: u.title }),
|
|
249
250
|
visible: !0
|
|
250
251
|
})
|
|
251
252
|
]
|
|
252
253
|
})
|
|
253
254
|
]
|
|
254
|
-
}), /* @__PURE__ */
|
|
255
|
+
}), /* @__PURE__ */ F("div", {
|
|
255
256
|
className: "flex min-h-0 flex-1",
|
|
256
257
|
children: [
|
|
257
|
-
/* @__PURE__ */
|
|
258
|
-
ref:
|
|
258
|
+
/* @__PURE__ */ F("div", {
|
|
259
|
+
ref: E,
|
|
259
260
|
className: "min-h-0 flex-1 overflow-y-auto",
|
|
260
|
-
children: [!X && /* @__PURE__ */
|
|
261
|
+
children: [!X && /* @__PURE__ */ P(ae, {
|
|
261
262
|
workspace: i,
|
|
262
263
|
doc: u,
|
|
263
264
|
editable: !$
|
|
264
|
-
}), /* @__PURE__ */
|
|
265
|
+
}), /* @__PURE__ */ F("div", {
|
|
265
266
|
className: "flex w-full gap-10 px-4 pt-6 md:px-8 md:pt-8",
|
|
266
|
-
children: [/* @__PURE__ */
|
|
267
|
+
children: [/* @__PURE__ */ F("article", {
|
|
267
268
|
className: `group/doc min-w-0 flex-1 pb-24 ${u.fullWidth ? "" : "mx-auto max-w-reading"}`,
|
|
268
269
|
children: [
|
|
269
|
-
$ && /* @__PURE__ */
|
|
270
|
+
$ && /* @__PURE__ */ F("div", {
|
|
270
271
|
className: "mb-6 flex items-center gap-3 rounded-md border border-border bg-muted px-3 py-2 text-sm",
|
|
271
|
-
children: [/* @__PURE__ */
|
|
272
|
+
children: [/* @__PURE__ */ P("span", {
|
|
272
273
|
className: "flex-1",
|
|
273
274
|
children: e("archivedNotice")
|
|
274
|
-
}), /* @__PURE__ */
|
|
275
|
+
}), /* @__PURE__ */ P(T, {
|
|
275
276
|
type: "button",
|
|
276
277
|
variant: "primary",
|
|
277
278
|
size: "sm",
|
|
278
|
-
onClick: () =>
|
|
279
|
+
onClick: () => S.restore.mutate(u),
|
|
279
280
|
children: e("restore")
|
|
280
281
|
})]
|
|
281
282
|
}),
|
|
282
|
-
/* @__PURE__ */
|
|
283
|
+
/* @__PURE__ */ P(oe, {
|
|
283
284
|
workspace: i,
|
|
284
285
|
doc: u,
|
|
285
286
|
editable: !$ && !X
|
|
286
287
|
}),
|
|
287
|
-
/* @__PURE__ */
|
|
288
|
+
/* @__PURE__ */ P(He, {
|
|
288
289
|
doc: u,
|
|
289
290
|
input: H,
|
|
290
291
|
autoFocus: !!l,
|
|
291
292
|
readOnly: $,
|
|
292
|
-
onFocus: () =>
|
|
293
|
-
onBlur: () =>
|
|
294
|
-
onSave: (e) =>
|
|
293
|
+
onFocus: () => h("title"),
|
|
294
|
+
onBlur: () => h(void 0),
|
|
295
|
+
onSave: (e) => S.rename.mutate({
|
|
295
296
|
doc: u,
|
|
296
297
|
title: e
|
|
297
298
|
})
|
|
298
299
|
}, u.id),
|
|
299
|
-
/* @__PURE__ */
|
|
300
|
+
/* @__PURE__ */ P(ge, {
|
|
300
301
|
workspace: i,
|
|
301
|
-
others:
|
|
302
|
+
others: v,
|
|
302
303
|
field: "title"
|
|
303
304
|
}),
|
|
304
|
-
|
|
305
|
+
S.rename.isError && /* @__PURE__ */ P(Ie, {
|
|
305
306
|
className: "mt-1",
|
|
306
|
-
children: n(
|
|
307
|
+
children: n(S.rename.error)
|
|
307
308
|
}),
|
|
308
|
-
/* @__PURE__ */
|
|
309
|
+
/* @__PURE__ */ F("div", {
|
|
309
310
|
className: "mt-2 flex flex-wrap items-center gap-x-3 gap-y-1",
|
|
310
|
-
children: [/* @__PURE__ */
|
|
311
|
+
children: [/* @__PURE__ */ P(Ue, {
|
|
311
312
|
workspace: i,
|
|
312
313
|
doc: u
|
|
313
|
-
}), /* @__PURE__ */
|
|
314
|
+
}), /* @__PURE__ */ P(d, {
|
|
314
315
|
workspace: i,
|
|
315
316
|
teamId: u.teamId,
|
|
316
317
|
value: u.areaId,
|
|
317
|
-
onChange: (e) =>
|
|
318
|
+
onChange: (e) => S.fileUnder.mutate({
|
|
318
319
|
doc: u,
|
|
319
320
|
area: e
|
|
320
321
|
}),
|
|
@@ -322,106 +323,106 @@ function V() {
|
|
|
322
323
|
className: "flex h-6 items-center gap-1.5 rounded-md px-1.5 text-xs hover:bg-muted"
|
|
323
324
|
})]
|
|
324
325
|
}),
|
|
325
|
-
!X && /* @__PURE__ */
|
|
326
|
+
!X && /* @__PURE__ */ P(ce, {
|
|
326
327
|
workspace: i,
|
|
327
328
|
doc: u,
|
|
328
|
-
space:
|
|
329
|
+
space: p?.key ?? "workspace",
|
|
329
330
|
editable: !$
|
|
330
331
|
}),
|
|
331
|
-
!X && /* @__PURE__ */
|
|
332
|
+
!X && /* @__PURE__ */ P(ve, {
|
|
332
333
|
workspace: i,
|
|
333
334
|
doc: u,
|
|
334
|
-
space:
|
|
335
|
+
space: p?.key ?? "workspace"
|
|
335
336
|
}),
|
|
336
|
-
/* @__PURE__ */
|
|
337
|
-
onContextMenu: (t) => !$ && (
|
|
337
|
+
/* @__PURE__ */ P("div", {
|
|
338
|
+
onContextMenu: (t) => !$ && (I ? b(t, [{
|
|
338
339
|
label: e("createIssue"),
|
|
339
340
|
onClick: Q
|
|
340
|
-
},
|
|
341
|
+
}, ke(e("copySelection"), I)]) : V && p && b(t, [{
|
|
341
342
|
label: e("createIssueFromActionItem"),
|
|
342
343
|
onClick: Q
|
|
343
344
|
}])),
|
|
344
|
-
children: X ? /* @__PURE__ */
|
|
345
|
+
children: X ? /* @__PURE__ */ P(ie, {
|
|
345
346
|
workspace: i,
|
|
346
347
|
doc: u,
|
|
347
348
|
versionId: X,
|
|
348
349
|
onDone: () => Z(void 0)
|
|
349
|
-
}) : $ ? /* @__PURE__ */
|
|
350
|
+
}) : $ ? /* @__PURE__ */ P("div", {
|
|
350
351
|
className: "mt-4",
|
|
351
|
-
children: /* @__PURE__ */
|
|
352
|
+
children: /* @__PURE__ */ P(de, {
|
|
352
353
|
value: u.body ?? "",
|
|
353
354
|
editable: !1,
|
|
354
355
|
className: "min-h-32"
|
|
355
356
|
})
|
|
356
|
-
}) : /* @__PURE__ */
|
|
357
|
+
}) : /* @__PURE__ */ P(We, {
|
|
357
358
|
workspace: i,
|
|
358
359
|
doc: u,
|
|
359
360
|
onEditor: nt,
|
|
360
|
-
onFocus: () =>
|
|
361
|
-
onBlur: () =>
|
|
361
|
+
onFocus: () => h("body"),
|
|
362
|
+
onBlur: () => h(void 0)
|
|
362
363
|
})
|
|
363
364
|
}),
|
|
364
|
-
!$ && !X && /* @__PURE__ */
|
|
365
|
-
/* @__PURE__ */
|
|
365
|
+
!$ && !X && /* @__PURE__ */ F(N, { children: [
|
|
366
|
+
/* @__PURE__ */ P(Je, {
|
|
366
367
|
workspace: i,
|
|
367
368
|
doc: u
|
|
368
369
|
}),
|
|
369
|
-
/* @__PURE__ */
|
|
370
|
+
/* @__PURE__ */ P(le, {
|
|
370
371
|
workspace: i,
|
|
371
372
|
doc: u
|
|
372
373
|
}),
|
|
373
|
-
/* @__PURE__ */
|
|
374
|
+
/* @__PURE__ */ P(ue, {
|
|
374
375
|
workspace: i,
|
|
375
376
|
doc: u,
|
|
376
|
-
team:
|
|
377
|
-
editor:
|
|
377
|
+
team: p,
|
|
378
|
+
editor: w
|
|
378
379
|
})
|
|
379
380
|
] }),
|
|
380
|
-
/* @__PURE__ */
|
|
381
|
+
/* @__PURE__ */ P(Ke, {
|
|
381
382
|
workspace: i,
|
|
382
383
|
docKey: u.key
|
|
383
384
|
}),
|
|
384
|
-
/* @__PURE__ */
|
|
385
|
+
/* @__PURE__ */ P(qe, {
|
|
385
386
|
workspace: i,
|
|
386
387
|
docKey: u.key
|
|
387
388
|
}),
|
|
388
|
-
/* @__PURE__ */
|
|
389
|
+
/* @__PURE__ */ P(Ge, {
|
|
389
390
|
workspace: i,
|
|
390
391
|
docKey: u.key
|
|
391
392
|
}),
|
|
392
|
-
/* @__PURE__ */
|
|
393
|
+
/* @__PURE__ */ P(Ye, {
|
|
393
394
|
workspace: i,
|
|
394
395
|
docKey: u.key
|
|
395
396
|
})
|
|
396
397
|
]
|
|
397
|
-
}), !$ && !X && /* @__PURE__ */
|
|
398
|
+
}), !$ && !X && /* @__PURE__ */ P(se, {
|
|
398
399
|
body: u.body ?? "",
|
|
399
|
-
editor:
|
|
400
|
-
scroller:
|
|
400
|
+
editor: w,
|
|
401
|
+
scroller: E
|
|
401
402
|
})]
|
|
402
403
|
})]
|
|
403
404
|
}),
|
|
404
|
-
U && /* @__PURE__ */
|
|
405
|
+
U && /* @__PURE__ */ P(te, {
|
|
405
406
|
workspace: i,
|
|
406
407
|
doc: u,
|
|
407
408
|
draft: Qe,
|
|
408
409
|
onDraftDone: () => G(void 0),
|
|
409
410
|
onShowQuote: rt
|
|
410
411
|
}),
|
|
411
|
-
$e && /* @__PURE__ */
|
|
412
|
+
$e && /* @__PURE__ */ P(re, {
|
|
412
413
|
workspace: i,
|
|
413
414
|
doc: u,
|
|
414
415
|
selected: X,
|
|
415
416
|
onSelect: Z
|
|
416
417
|
}),
|
|
417
|
-
et && !$ && /* @__PURE__ */
|
|
418
|
-
editor:
|
|
419
|
-
suggestions:
|
|
418
|
+
et && !$ && /* @__PURE__ */ P(ye, {
|
|
419
|
+
editor: w,
|
|
420
|
+
suggestions: k
|
|
420
421
|
}),
|
|
421
|
-
tt && !$ && /* @__PURE__ */
|
|
422
|
+
tt && !$ && /* @__PURE__ */ P("aside", {
|
|
422
423
|
"aria-label": e("graph"),
|
|
423
424
|
className: "w-96 shrink-0 overflow-y-auto border-l border-border px-3 py-4 max-md:hidden",
|
|
424
|
-
children: /* @__PURE__ */
|
|
425
|
+
children: /* @__PURE__ */ P(pe, {
|
|
425
426
|
workspace: i,
|
|
426
427
|
of: { doc: u.key },
|
|
427
428
|
width: 352
|
|
@@ -431,12 +432,12 @@ function V() {
|
|
|
431
432
|
})]
|
|
432
433
|
});
|
|
433
434
|
}
|
|
434
|
-
function
|
|
435
|
-
let s =
|
|
436
|
-
return /* @__PURE__ */
|
|
435
|
+
function He({ doc: e, input: t, autoFocus: n, readOnly: r, onSave: i, onFocus: a, onBlur: o }) {
|
|
436
|
+
let s = M("docs");
|
|
437
|
+
return /* @__PURE__ */ F(N, { children: [/* @__PURE__ */ P("h1", {
|
|
437
438
|
className: "sr-only",
|
|
438
439
|
children: e.title
|
|
439
|
-
}), /* @__PURE__ */
|
|
440
|
+
}), /* @__PURE__ */ P(Le, {
|
|
440
441
|
ref: t,
|
|
441
442
|
value: e.title,
|
|
442
443
|
onCommit: i,
|
|
@@ -447,15 +448,15 @@ function ze({ doc: e, input: t, autoFocus: n, readOnly: r, onSave: i, onFocus: a
|
|
|
447
448
|
"aria-label": s("docTitle")
|
|
448
449
|
})] });
|
|
449
450
|
}
|
|
450
|
-
function
|
|
451
|
-
let n =
|
|
452
|
-
return /* @__PURE__ */
|
|
451
|
+
function Ue({ workspace: e, doc: t }) {
|
|
452
|
+
let n = M("docs"), r = Pe(), { actorName: i, person: a, avatarOf: o } = b(e), s = i(t.editor);
|
|
453
|
+
return /* @__PURE__ */ F("p", {
|
|
453
454
|
className: "flex items-center gap-1.5 text-xs text-muted-foreground",
|
|
454
|
-
children: [/* @__PURE__ */
|
|
455
|
+
children: [/* @__PURE__ */ P(he, {
|
|
455
456
|
workspace: e,
|
|
456
457
|
kind: t.editor.kind,
|
|
457
458
|
handle: t.editor.handle,
|
|
458
|
-
children: /* @__PURE__ */
|
|
459
|
+
children: /* @__PURE__ */ P(C, {
|
|
459
460
|
kind: t.editor.kind === "agent" ? "agent" : "person",
|
|
460
461
|
name: s,
|
|
461
462
|
src: o(t.editor.kind, t.editor.handle),
|
|
@@ -465,9 +466,9 @@ function Be({ workspace: e, doc: t }) {
|
|
|
465
466
|
name: s,
|
|
466
467
|
person: a(t.editor.onBehalfOf ?? "").name,
|
|
467
468
|
time: r.relative(t.updatedAt),
|
|
468
|
-
when: (e) => /* @__PURE__ */
|
|
469
|
+
when: (e) => /* @__PURE__ */ P(E, {
|
|
469
470
|
content: r.full(t.updatedAt),
|
|
470
|
-
children: /* @__PURE__ */
|
|
471
|
+
children: /* @__PURE__ */ P("time", {
|
|
471
472
|
dateTime: t.updatedAt,
|
|
472
473
|
children: e
|
|
473
474
|
})
|
|
@@ -475,23 +476,23 @@ function Be({ workspace: e, doc: t }) {
|
|
|
475
476
|
})]
|
|
476
477
|
});
|
|
477
478
|
}
|
|
478
|
-
function
|
|
479
|
-
let a =
|
|
479
|
+
function We({ workspace: e, doc: t, onEditor: n, onFocus: r, onBlur: i }) {
|
|
480
|
+
let a = M("docs"), { data: s } = L(o), c = A(null), l = k(() => ({
|
|
480
481
|
name: s?.user.name ?? a("someone"),
|
|
481
|
-
color:
|
|
482
|
+
color: m(s?.user.username ?? "")
|
|
482
483
|
}), [
|
|
483
484
|
s?.user.name,
|
|
484
485
|
s?.user.username,
|
|
485
486
|
a
|
|
486
|
-
]), { session: u, error: d } =
|
|
487
|
+
]), { session: u, error: d } = h({
|
|
487
488
|
workspace: e,
|
|
488
489
|
target: { doc: t.key },
|
|
489
490
|
user: l,
|
|
490
491
|
getMarkdown: c
|
|
491
492
|
});
|
|
492
|
-
return /* @__PURE__ */
|
|
493
|
+
return /* @__PURE__ */ F("div", {
|
|
493
494
|
className: "mt-6 min-h-48",
|
|
494
|
-
children: [u ? /* @__PURE__ */
|
|
495
|
+
children: [u ? /* @__PURE__ */ P(ee, {
|
|
495
496
|
session: u,
|
|
496
497
|
user: l,
|
|
497
498
|
getMarkdown: c,
|
|
@@ -501,27 +502,27 @@ function Ve({ workspace: e, doc: t, onEditor: n, onFocus: r, onBlur: i }) {
|
|
|
501
502
|
placeholder: a("bodyPlaceholder"),
|
|
502
503
|
label: a("body"),
|
|
503
504
|
className: "min-h-48"
|
|
504
|
-
}, `${u.generation}:${u.doc.guid}`) : /* @__PURE__ */
|
|
505
|
+
}, `${u.generation}:${u.doc.guid}`) : /* @__PURE__ */ P(de, {
|
|
505
506
|
value: t.body ?? "",
|
|
506
507
|
editable: !1,
|
|
507
508
|
className: "min-h-48"
|
|
508
|
-
}), /* @__PURE__ */
|
|
509
|
+
}), /* @__PURE__ */ P(Ie, {
|
|
509
510
|
className: "mt-1",
|
|
510
511
|
children: d
|
|
511
512
|
})]
|
|
512
513
|
});
|
|
513
514
|
}
|
|
514
|
-
function
|
|
515
|
-
let r =
|
|
516
|
-
return i.length === 0 ? null : /* @__PURE__ */
|
|
515
|
+
function Ge({ workspace: e, docKey: t }) {
|
|
516
|
+
let r = M("docs"), { data: i } = L(n(e, t)), a = D(), o = v(e);
|
|
517
|
+
return i.length === 0 ? null : /* @__PURE__ */ F("section", {
|
|
517
518
|
className: "mt-10",
|
|
518
519
|
"aria-label": r("linkedIssues"),
|
|
519
|
-
children: [/* @__PURE__ */
|
|
520
|
+
children: [/* @__PURE__ */ P("h2", {
|
|
520
521
|
className: "text-base font-semibold",
|
|
521
522
|
children: r("linkedIssues")
|
|
522
|
-
}), /* @__PURE__ */
|
|
523
|
+
}), /* @__PURE__ */ P("ul", {
|
|
523
524
|
className: "mt-2 space-y-0.5",
|
|
524
|
-
children: i.map((t) => /* @__PURE__ */
|
|
525
|
+
children: i.map((t) => /* @__PURE__ */ P("li", { children: /* @__PURE__ */ F(x, {
|
|
525
526
|
to: "/$workspace/issues/$identifier",
|
|
526
527
|
params: {
|
|
527
528
|
workspace: e,
|
|
@@ -530,16 +531,16 @@ function He({ workspace: e, docKey: t }) {
|
|
|
530
531
|
onContextMenu: (e) => a(e, o([t])),
|
|
531
532
|
className: "flex h-8 items-center gap-2 rounded-md px-2 text-sm hover:bg-muted",
|
|
532
533
|
children: [
|
|
533
|
-
/* @__PURE__ */
|
|
534
|
+
/* @__PURE__ */ P(p, {
|
|
534
535
|
category: t.status.category,
|
|
535
536
|
review: t.status.review,
|
|
536
537
|
step: t.status.step
|
|
537
538
|
}),
|
|
538
|
-
/* @__PURE__ */
|
|
539
|
+
/* @__PURE__ */ P("span", {
|
|
539
540
|
className: "shrink-0 text-muted-foreground",
|
|
540
541
|
children: t.identifier
|
|
541
542
|
}),
|
|
542
|
-
/* @__PURE__ */
|
|
543
|
+
/* @__PURE__ */ P("span", {
|
|
543
544
|
className: "truncate",
|
|
544
545
|
children: t.title
|
|
545
546
|
})
|
|
@@ -548,27 +549,27 @@ function He({ workspace: e, docKey: t }) {
|
|
|
548
549
|
})]
|
|
549
550
|
});
|
|
550
551
|
}
|
|
551
|
-
function
|
|
552
|
-
let n =
|
|
553
|
-
return r.length === 0 ? null : /* @__PURE__ */
|
|
552
|
+
function Ke({ workspace: e, docKey: t }) {
|
|
553
|
+
let n = M("docs"), { data: r = [] } = I(a(e, t));
|
|
554
|
+
return r.length === 0 ? null : /* @__PURE__ */ F("section", {
|
|
554
555
|
className: "mt-10 rounded-lg border border-warning/60 px-4 py-3",
|
|
555
556
|
"aria-label": n("lostSections"),
|
|
556
557
|
children: [
|
|
557
|
-
/* @__PURE__ */
|
|
558
|
+
/* @__PURE__ */ P("h2", {
|
|
558
559
|
className: "text-sm font-semibold",
|
|
559
560
|
children: n("lostSections")
|
|
560
561
|
}),
|
|
561
|
-
/* @__PURE__ */
|
|
562
|
+
/* @__PURE__ */ P("p", {
|
|
562
563
|
className: "mt-1 text-xs text-muted-foreground",
|
|
563
564
|
children: n("lostSectionsHelp")
|
|
564
565
|
}),
|
|
565
|
-
/* @__PURE__ */
|
|
566
|
+
/* @__PURE__ */ P("ul", {
|
|
566
567
|
className: "mt-2 space-y-1 text-sm",
|
|
567
|
-
children: r.map((t) => /* @__PURE__ */
|
|
568
|
+
children: r.map((t) => /* @__PURE__ */ P("li", { children: /* @__PURE__ */ P(x, {
|
|
568
569
|
to: "/$workspace/knowledge/$term",
|
|
569
570
|
params: {
|
|
570
571
|
workspace: e,
|
|
571
|
-
term:
|
|
572
|
+
term: y(t)
|
|
572
573
|
},
|
|
573
574
|
className: "hover:underline",
|
|
574
575
|
children: n("lostSection", {
|
|
@@ -580,51 +581,51 @@ function Ue({ workspace: e, docKey: t }) {
|
|
|
580
581
|
]
|
|
581
582
|
});
|
|
582
583
|
}
|
|
583
|
-
function
|
|
584
|
-
let r =
|
|
585
|
-
return a.length === 0 ? null : /* @__PURE__ */
|
|
584
|
+
function qe({ workspace: e, docKey: n }) {
|
|
585
|
+
let r = M("docs"), { data: i } = L(t(e, n)), a = i.filter((e) => !e.canceled);
|
|
586
|
+
return a.length === 0 ? null : /* @__PURE__ */ F("section", {
|
|
586
587
|
className: "mt-10 space-y-3",
|
|
587
588
|
"aria-label": r("questions"),
|
|
588
|
-
children: [/* @__PURE__ */
|
|
589
|
+
children: [/* @__PURE__ */ P("h2", {
|
|
589
590
|
className: "text-sm font-semibold",
|
|
590
591
|
children: r("questions")
|
|
591
|
-
}), a.map((t) => t.answer ? /* @__PURE__ */
|
|
592
|
+
}), a.map((t) => t.answer ? /* @__PURE__ */ P(l, {
|
|
592
593
|
workspace: e,
|
|
593
594
|
decision: t,
|
|
594
595
|
showIssue: !0
|
|
595
|
-
}, t.id) : /* @__PURE__ */
|
|
596
|
+
}, t.id) : /* @__PURE__ */ P(u, {
|
|
596
597
|
workspace: e,
|
|
597
598
|
decision: t,
|
|
598
599
|
showIssue: !0
|
|
599
600
|
}, t.id))]
|
|
600
601
|
});
|
|
601
602
|
}
|
|
602
|
-
function
|
|
603
|
-
let n =
|
|
604
|
-
if (
|
|
605
|
-
let
|
|
606
|
-
|
|
603
|
+
function Je({ workspace: e, doc: t }) {
|
|
604
|
+
let n = M("docs"), r = D(), a = _(e), { data: o = [] } = I(i(e, { parent: t.key })), { data: s = [] } = I(S(e, t.key)), c = t.body ?? "";
|
|
605
|
+
if (c.includes(":::subpages") || s.length > 0) return null;
|
|
606
|
+
let l = (e) => [
|
|
607
|
+
g(e),
|
|
607
608
|
e.slug,
|
|
608
609
|
e.key
|
|
609
|
-
].some((e) => e &&
|
|
610
|
-
return
|
|
610
|
+
].some((e) => e && c.includes(`/docs/${e}`)), u = o.filter((e) => !e.template && !l(e));
|
|
611
|
+
return u.length === 0 ? null : /* @__PURE__ */ P("section", {
|
|
611
612
|
className: "mt-6",
|
|
612
613
|
"aria-label": n("childPages"),
|
|
613
|
-
children: /* @__PURE__ */
|
|
614
|
+
children: /* @__PURE__ */ P("ul", {
|
|
614
615
|
className: "space-y-0.5",
|
|
615
|
-
children:
|
|
616
|
+
children: u.map((t) => /* @__PURE__ */ P("li", { children: /* @__PURE__ */ F(x, {
|
|
616
617
|
to: "/$workspace/docs/$doc",
|
|
617
618
|
params: {
|
|
618
619
|
workspace: e,
|
|
619
|
-
doc:
|
|
620
|
+
doc: g(t)
|
|
620
621
|
},
|
|
621
622
|
onContextMenu: (e) => r(e, a(t)),
|
|
622
623
|
className: "flex h-8 items-center gap-2 rounded-md px-2 text-sm font-medium hover:bg-muted",
|
|
623
|
-
children: [/* @__PURE__ */
|
|
624
|
+
children: [/* @__PURE__ */ P(f, {
|
|
624
625
|
icon: t.icon,
|
|
625
626
|
className: "size-3.5",
|
|
626
627
|
emojiClassName: "text-xs"
|
|
627
|
-
}), /* @__PURE__ */
|
|
628
|
+
}), /* @__PURE__ */ P("span", {
|
|
628
629
|
className: "truncate underline decoration-border underline-offset-4",
|
|
629
630
|
children: t.title
|
|
630
631
|
})]
|
|
@@ -632,35 +633,35 @@ function Ge({ workspace: e, doc: t }) {
|
|
|
632
633
|
})
|
|
633
634
|
});
|
|
634
635
|
}
|
|
635
|
-
function
|
|
636
|
-
let r =
|
|
637
|
-
return i.docs.length + i.issues.length + i.comments.length === 0 ? null : /* @__PURE__ */
|
|
636
|
+
function Ye({ workspace: t, docKey: n }) {
|
|
637
|
+
let r = M("docs"), { data: i } = L(e(t, n)), a = D(), o = _(t), s = v(t), c = "flex h-8 items-center gap-2 rounded-md px-2 text-sm hover:bg-muted";
|
|
638
|
+
return i.docs.length + i.issues.length + i.comments.length === 0 ? null : /* @__PURE__ */ F("section", {
|
|
638
639
|
className: "mt-10",
|
|
639
640
|
"aria-label": r("linkedFrom"),
|
|
640
|
-
children: [/* @__PURE__ */
|
|
641
|
+
children: [/* @__PURE__ */ P("h2", {
|
|
641
642
|
className: "text-base font-semibold",
|
|
642
643
|
children: r("linkedFrom")
|
|
643
|
-
}), /* @__PURE__ */
|
|
644
|
+
}), /* @__PURE__ */ F("ul", {
|
|
644
645
|
className: "mt-2 space-y-0.5",
|
|
645
646
|
children: [
|
|
646
|
-
i.docs.map((e) => /* @__PURE__ */
|
|
647
|
+
i.docs.map((e) => /* @__PURE__ */ P("li", { children: /* @__PURE__ */ F(x, {
|
|
647
648
|
to: "/$workspace/docs/$doc",
|
|
648
649
|
params: {
|
|
649
650
|
workspace: t,
|
|
650
|
-
doc:
|
|
651
|
+
doc: g(e)
|
|
651
652
|
},
|
|
652
653
|
onContextMenu: (t) => a(t, o(e)),
|
|
653
654
|
className: c,
|
|
654
|
-
children: [/* @__PURE__ */
|
|
655
|
+
children: [/* @__PURE__ */ P(f, {
|
|
655
656
|
icon: e.icon,
|
|
656
657
|
className: "size-3.5",
|
|
657
658
|
emojiClassName: "text-xs"
|
|
658
|
-
}), /* @__PURE__ */
|
|
659
|
+
}), /* @__PURE__ */ P("span", {
|
|
659
660
|
className: "truncate",
|
|
660
661
|
children: e.title
|
|
661
662
|
})]
|
|
662
663
|
}) }, e.id)),
|
|
663
|
-
i.issues.map((e) => /* @__PURE__ */
|
|
664
|
+
i.issues.map((e) => /* @__PURE__ */ P("li", { children: /* @__PURE__ */ F(x, {
|
|
664
665
|
to: "/$workspace/issues/$identifier",
|
|
665
666
|
params: {
|
|
666
667
|
workspace: t,
|
|
@@ -669,22 +670,22 @@ function Ke({ workspace: t, docKey: n }) {
|
|
|
669
670
|
onContextMenu: (t) => a(t, s([e])),
|
|
670
671
|
className: c,
|
|
671
672
|
children: [
|
|
672
|
-
/* @__PURE__ */
|
|
673
|
+
/* @__PURE__ */ P(p, {
|
|
673
674
|
category: e.status.category,
|
|
674
675
|
review: e.status.review,
|
|
675
676
|
step: e.status.step
|
|
676
677
|
}),
|
|
677
|
-
/* @__PURE__ */
|
|
678
|
+
/* @__PURE__ */ P("span", {
|
|
678
679
|
className: "shrink-0 text-muted-foreground",
|
|
679
680
|
children: e.identifier
|
|
680
681
|
}),
|
|
681
|
-
/* @__PURE__ */
|
|
682
|
+
/* @__PURE__ */ P("span", {
|
|
682
683
|
className: "truncate",
|
|
683
684
|
children: e.title
|
|
684
685
|
})
|
|
685
686
|
]
|
|
686
687
|
}) }, e.id)),
|
|
687
|
-
i.comments.map((e) => /* @__PURE__ */
|
|
688
|
+
i.comments.map((e) => /* @__PURE__ */ P("li", { children: /* @__PURE__ */ F(x, {
|
|
688
689
|
to: "/$workspace/issues/$identifier",
|
|
689
690
|
params: {
|
|
690
691
|
workspace: t,
|
|
@@ -693,12 +694,12 @@ function Ke({ workspace: t, docKey: n }) {
|
|
|
693
694
|
hash: `comment-${e.comment.id}`,
|
|
694
695
|
className: c,
|
|
695
696
|
children: [
|
|
696
|
-
/* @__PURE__ */
|
|
697
|
-
/* @__PURE__ */
|
|
697
|
+
/* @__PURE__ */ P(me, { className: "size-3.5 text-muted-foreground" }),
|
|
698
|
+
/* @__PURE__ */ P("span", {
|
|
698
699
|
className: "shrink-0 text-muted-foreground",
|
|
699
700
|
children: r("commentOn", { identifier: e.identifier })
|
|
700
701
|
}),
|
|
701
|
-
/* @__PURE__ */
|
|
702
|
+
/* @__PURE__ */ P("span", {
|
|
702
703
|
className: "truncate",
|
|
703
704
|
children: e.issueTitle
|
|
704
705
|
})
|
|
@@ -708,9 +709,9 @@ function Ke({ workspace: t, docKey: n }) {
|
|
|
708
709
|
})]
|
|
709
710
|
});
|
|
710
711
|
}
|
|
711
|
-
function
|
|
712
|
-
let i =
|
|
713
|
-
return /* @__PURE__ */
|
|
712
|
+
function Xe({ workspace: e, doc: t, path: n, space: r }) {
|
|
713
|
+
let i = M("docs");
|
|
714
|
+
return /* @__PURE__ */ P(w, {
|
|
714
715
|
label: i("breadcrumbs"),
|
|
715
716
|
className: "min-w-0",
|
|
716
717
|
crumbs: [
|
|
@@ -721,8 +722,8 @@ function qe({ workspace: e, doc: t, path: n, space: r }) {
|
|
|
721
722
|
{ label: r },
|
|
722
723
|
...n.map((t) => ({
|
|
723
724
|
label: t.title,
|
|
724
|
-
href: `/${e}/docs/${
|
|
725
|
-
icon: t.icon && /* @__PURE__ */
|
|
725
|
+
href: `/${e}/docs/${g(t)}`,
|
|
726
|
+
icon: t.icon && /* @__PURE__ */ P(f, {
|
|
726
727
|
icon: t.icon,
|
|
727
728
|
className: "size-3.5",
|
|
728
729
|
emojiClassName: "text-xs"
|
|
@@ -730,7 +731,7 @@ function qe({ workspace: e, doc: t, path: n, space: r }) {
|
|
|
730
731
|
})),
|
|
731
732
|
{
|
|
732
733
|
label: t.title,
|
|
733
|
-
icon: t.icon && /* @__PURE__ */
|
|
734
|
+
icon: t.icon && /* @__PURE__ */ P(f, {
|
|
734
735
|
icon: t.icon,
|
|
735
736
|
className: "size-3.5",
|
|
736
737
|
emojiClassName: "text-xs"
|
|
@@ -739,11 +740,11 @@ function qe({ workspace: e, doc: t, path: n, space: r }) {
|
|
|
739
740
|
]
|
|
740
741
|
});
|
|
741
742
|
}
|
|
742
|
-
function
|
|
743
|
-
return e <= 0 ? null : /* @__PURE__ */
|
|
743
|
+
function B({ count: e }) {
|
|
744
|
+
return e <= 0 ? null : /* @__PURE__ */ P("span", {
|
|
744
745
|
"aria-hidden": !0,
|
|
745
746
|
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",
|
|
746
747
|
children: e > 99 ? "99+" : e
|
|
747
748
|
});
|
|
748
749
|
}
|
|
749
|
-
export {
|
|
750
|
+
export { z as component };
|