@parallelworks/tandem-web 0.138.2 → 0.139.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/AgentWork.js +35 -35
- package/components/AppRoot.js +8 -7
- package/components/AreaWork.js +1 -1
- package/components/BlockHandle.js +3 -3
- package/components/CommandPalette.js +27 -27
- package/components/DateChip.js +27 -27
- package/components/DocLinkPicker.js +17 -17
- package/components/Graph.js +6 -6
- package/components/HoverCards.js +30 -29
- package/components/IssueListBlock.js +83 -83
- package/components/LinkCard.js +20 -20
- package/components/MentionPicker.js +12 -12
- package/components/NewIssueDialog.js +116 -116
- package/components/NewProjectDialog.js +5 -4
- package/components/Planning.js +31 -43
- package/components/RouterLink.js +4 -4
- package/components/ShareDialog.js +12 -12
- package/components/SharedUI.js +19 -19
- package/components/SlashMenu.js +11 -11
- package/components/SubPages.js +10 -10
- package/components/UnlinkedMentions.js +10 -10
- package/components/WorkCounts.js +8 -8
- package/components/settings.js +31 -31
- package/hostedApp.js +41 -39
- package/hosting.d.ts +24 -11
- package/index.js +58 -27
- package/lib/base.js +1 -14
- package/lib/docs.js +6 -6
- package/lib/issueMenu.js +33 -33
- package/lib/knowledge.js +90 -101
- package/lib/knowledgeKinds.js +14 -0
- package/lib/pageTitle.js +22 -10
- package/lib/projectList.js +1 -1
- package/lib/projectStates.js +15 -0
- package/lib/router.js +20 -34
- package/package.json +2 -2
- package/pages/areas.js +223 -223
- package/pages/decisions.js +69 -69
- package/pages/issues.js +38 -38
- package/pages/projects.js +268 -267
- package/pages/triage.js +133 -133
- package/pages.js +21 -0
- package/routes/__root.js +6 -6
- package/routes/_workspace/agents/_slug2.js +21 -21
- package/routes/_workspace/agents/index2.js +16 -16
- package/routes/_workspace/areas/_area2.js +105 -105
- package/routes/_workspace/docs/_doc2.js +189 -189
- package/routes/_workspace/docs2.js +8 -8
- package/routes/_workspace/graph2.js +9 -9
- package/routes/_workspace/graph3.js +8 -8
- package/routes/_workspace/issues/_identifier2.js +249 -249
- package/routes/_workspace/issues/index.js +6 -6
- package/routes/_workspace/knowledge/_term2.js +119 -118
- package/routes/_workspace/knowledge/index.js +8 -8
- package/routes/_workspace/knowledge/index2.js +41 -40
- package/routes/_workspace/measures2.js +4 -4
- package/routes/_workspace/measures3.js +18 -18
- package/routes/_workspace/notifications2.js +112 -112
- package/routes/_workspace/people/_username.js +4 -4
- package/routes/_workspace/people/_username2.js +36 -36
- package/routes/_workspace/projects/_projectId3.js +369 -368
- package/routes/_workspace/projects/index.js +7 -7
- package/routes/_workspace/settings/account2.js +3 -3
- package/routes/_workspace/settings/audit-log2.js +4 -4
- package/routes/_workspace/settings/audit-log3.js +51 -51
- package/routes/_workspace/settings/labels2.js +14 -14
- package/routes/_workspace/settings/members2.js +9 -9
- package/routes/_workspace/settings/runners2.js +11 -11
- package/routes/_workspace/settings/teams2.js +15 -15
- package/routes/_workspace/settings/tokens2.js +5 -5
- package/routes/_workspace/settings/webhooks2.js +7 -7
- package/routes/_workspace/settings2.js +3 -3
- package/routes/_workspace/teams/_key/cycles/_number2.js +16 -16
- package/routes/_workspace/teams/_key/cycles/index2.js +40 -40
- package/routes/_workspace/teams/_key/issues.js +4 -4
- package/routes/_workspace/teams/_key/projects.js +4 -4
- package/routes/_workspace/teams/_key/settings2.js +133 -133
- package/routes/_workspace2.js +319 -319
- package/routes/docs/route2.js +19 -19
- package/routes/new2.js +8 -8
- package/routes/request2._token.js +4 -4
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { usePageTitle as e } from "../../../lib/pageTitle.js";
|
|
2
|
+
import { Link as t, useNavigate as n } from "../../../lib/router.js";
|
|
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
|
+
import { Route as d } from "./_doc.js";
|
|
5
|
+
import { CommentIcon as f, StatusIcon as p } from "../../../components/icons.js";
|
|
6
|
+
import { termRef as ee } from "../../../lib/knowledgeKinds.js";
|
|
6
7
|
import { copyItem as te } from "../../../lib/menus.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { usePeople as
|
|
11
|
-
import { issueURL as ce, useIssueMenu as
|
|
8
|
+
import { docKey as ne, docPath as re, docRef as m, docURL as ie, useDocActions as ae, useDocMenu as oe } from "../../../lib/docs.js";
|
|
9
|
+
import { headingAnchor as se } from "../../../lib/glossary.js";
|
|
10
|
+
import { useTime as h } from "../../../lib/time.js";
|
|
11
|
+
import { usePeople as g } from "../../../lib/people.js";
|
|
12
|
+
import { issueURL as ce, useIssueMenu as _ } from "../../../lib/issueMenu.js";
|
|
12
13
|
import { useNewIssue as le } from "../../../lib/newIssue.js";
|
|
13
14
|
import { rememberPage as ue } from "../../../lib/recent.js";
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
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 { Avatar as w, Breadcrumbs as T, Button as E, ErrorText as D, TitleInput as O, Tooltip as k, useOpenMenu as A } from "@parallelworks/ui";
|
|
15
|
+
import { DocIcon as v } from "../../../components/DocIcon.js";
|
|
16
|
+
import { PersonHoverCard as y } from "../../../components/PersonHoverCard.js";
|
|
17
|
+
import { Editor as de } from "../../../components/Editor.js";
|
|
18
|
+
import { useOthersOn as fe, useReportLocation as pe } from "../../../lib/live.js";
|
|
19
|
+
import { AnsweredDecision as b, DecisionCard as x } from "../../../components/AgentWork.js";
|
|
20
|
+
import { DocCover as me, DocLookControls as he } from "../../../components/DocLook.js";
|
|
21
|
+
import { FavoriteStar as ge } from "../../../components/FavoriteStar.js";
|
|
22
|
+
import { AreaSelect as _e } from "../../../components/AreaSelect.js";
|
|
23
|
+
import { caretColor as S, useCollabSession as C } from "../../../lib/collab.js";
|
|
24
|
+
import { CollabEditor as w } from "../../../components/CollabEditor.js";
|
|
25
|
+
import { DocComments as ve, useOpenThreads as ye } from "../../../components/DocComments.js";
|
|
26
|
+
import { DocHistory as be, DocVersion as xe } from "../../../components/DocHistory.js";
|
|
27
|
+
import { DocOutline as Se } from "../../../components/DocOutline.js";
|
|
28
|
+
import { Connections as Ce } from "../../../components/Graph.js";
|
|
29
|
+
import { FieldNote as we, Viewers as Te } from "../../../components/Presence.js";
|
|
30
|
+
import { UnlinkedMentions as Ee, useUnlinkedMentions as De } from "../../../components/UnlinkedMentions.js";
|
|
31
|
+
import { Avatar as T, Breadcrumbs as E, Button as D, ErrorText as Oe, TitleInput as O, Tooltip as k, useOpenMenu as A } from "@parallelworks/ui";
|
|
32
32
|
import { useCallback as ke, useEffect as j, useMemo as Ae, useRef as M, useState as N } from "react";
|
|
33
33
|
import { useErrorMessage as je } from "@parallelworks/problem/react";
|
|
34
34
|
import { useTranslations as P } from "use-intl";
|
|
@@ -38,42 +38,42 @@ import { MoreButton as Me } from "@parallelworks/ui/list";
|
|
|
38
38
|
// src/routes/$workspace/docs/$doc.tsx?tsr-split=component
|
|
39
39
|
var Ne = 120;
|
|
40
40
|
function B() {
|
|
41
|
-
let
|
|
42
|
-
|
|
43
|
-
doc:
|
|
44
|
-
...
|
|
45
|
-
}),
|
|
46
|
-
let
|
|
41
|
+
let t = P("docs"), r = P("common"), i = je(), { workspace: a, doc: s } = d.useParams(), { rename: f } = d.useSearch(), { data: p } = z(o(a, ne(s))), ee = p.key, { data: h } = z(l(a)), { data: g } = z(c), _ = h.find((e) => e.id === p.teamId), { data: v } = z(u(a)), [y, b] = N();
|
|
42
|
+
pe({
|
|
43
|
+
doc: p.key,
|
|
44
|
+
...y && { field: y }
|
|
45
|
+
}), e(p.title || t("untitled"), _?.name);
|
|
46
|
+
let x = fe({ doc: p.key }, g?.user.username);
|
|
47
47
|
j(() => {
|
|
48
|
-
ue(
|
|
48
|
+
ue(a, {
|
|
49
49
|
kind: "doc",
|
|
50
|
-
href:
|
|
51
|
-
label:
|
|
50
|
+
href: re(a, p),
|
|
51
|
+
label: p.title
|
|
52
52
|
});
|
|
53
|
-
}, [
|
|
54
|
-
let
|
|
53
|
+
}, [a, p]);
|
|
54
|
+
let S = n(), C = A(), w = oe(a), T = ae(a), E = le(), O = M(null), [k, Ae] = N(null), F = M(null), R = De(a, p, k), [B, Ue] = N(""), V = M(null), [H, U] = N(!1), [We, W] = N(), G = ye(a, ee), [Ge, K] = N(!1), [Ke, q] = N(!1), [J, Y] = N(!1), [X, Z] = N();
|
|
55
55
|
j(() => {
|
|
56
|
-
(
|
|
56
|
+
(s !== m(p) || f) && S({
|
|
57
57
|
to: "/$workspace/docs/$doc",
|
|
58
58
|
params: {
|
|
59
|
-
workspace:
|
|
60
|
-
doc: p
|
|
59
|
+
workspace: a,
|
|
60
|
+
doc: m(p)
|
|
61
61
|
},
|
|
62
62
|
search: {},
|
|
63
63
|
replace: !0
|
|
64
64
|
});
|
|
65
65
|
}, [
|
|
66
|
-
|
|
66
|
+
s,
|
|
67
|
+
p,
|
|
68
|
+
a,
|
|
67
69
|
f,
|
|
68
|
-
|
|
69
|
-
d,
|
|
70
|
-
x
|
|
70
|
+
S
|
|
71
71
|
]);
|
|
72
72
|
let qe = ke((e) => {
|
|
73
73
|
if (O.current = e, Ae(e), !e) return;
|
|
74
74
|
let t = decodeURIComponent(location.hash.slice(1));
|
|
75
75
|
if (t) {
|
|
76
|
-
for (let n of e.view.dom.querySelectorAll("h1, h2, h3, h4, h5, h6")) if (
|
|
76
|
+
for (let n of e.view.dom.querySelectorAll("h1, h2, h3, h4, h5, h6")) if (se(n.textContent ?? "") === t) {
|
|
77
77
|
n.scrollIntoView({ block: "start" });
|
|
78
78
|
break;
|
|
79
79
|
}
|
|
@@ -123,18 +123,18 @@ function B() {
|
|
|
123
123
|
to: d
|
|
124
124
|
}).scrollIntoView().run();
|
|
125
125
|
}, Q = () => {
|
|
126
|
-
let
|
|
127
|
-
if (!
|
|
128
|
-
let n =
|
|
129
|
-
|
|
130
|
-
team:
|
|
131
|
-
title: (
|
|
132
|
-
body:
|
|
126
|
+
let e = B;
|
|
127
|
+
if (!e || !_) return;
|
|
128
|
+
let n = e.split("\n").map((e) => e ? `> ${e}` : ">").join("\n");
|
|
129
|
+
E({
|
|
130
|
+
team: _.key,
|
|
131
|
+
title: (e.split("\n")[0] ?? "").slice(0, Ne),
|
|
132
|
+
body: t("fromDoc", {
|
|
133
133
|
quote: n,
|
|
134
|
-
title:
|
|
135
|
-
url:
|
|
134
|
+
title: p.title,
|
|
135
|
+
url: ie(a, p)
|
|
136
136
|
}),
|
|
137
|
-
origin: { doc:
|
|
137
|
+
origin: { doc: p.key },
|
|
138
138
|
onCreated: (e) => {
|
|
139
139
|
let t = O.current;
|
|
140
140
|
t && t.chain().insertContentAt(t.state.selection.to, [{
|
|
@@ -145,59 +145,59 @@ function B() {
|
|
|
145
145
|
text: e.identifier,
|
|
146
146
|
marks: [{
|
|
147
147
|
type: "link",
|
|
148
|
-
attrs: { href: ce(
|
|
148
|
+
attrs: { href: ce(a, e.identifier) }
|
|
149
149
|
}]
|
|
150
150
|
}]).run();
|
|
151
151
|
}
|
|
152
152
|
});
|
|
153
|
-
}, Ye =
|
|
153
|
+
}, Ye = p.ancestors ?? [], $ = !!p.archivedAt;
|
|
154
154
|
return /* @__PURE__ */ L("div", {
|
|
155
155
|
className: "flex h-full flex-col",
|
|
156
156
|
children: [/* @__PURE__ */ L("header", {
|
|
157
157
|
className: "flex h-12 shrink-0 items-center gap-2 border-b border-border px-4 text-sm md:px-5",
|
|
158
|
-
onContextMenu: (e) =>
|
|
158
|
+
onContextMenu: (e) => C(e, w(p, { onRename: () => V.current?.focus() })),
|
|
159
159
|
children: [
|
|
160
160
|
/* @__PURE__ */ I(Ve, {
|
|
161
|
-
workspace:
|
|
162
|
-
doc:
|
|
161
|
+
workspace: a,
|
|
162
|
+
doc: p,
|
|
163
163
|
path: Ye,
|
|
164
|
-
space:
|
|
164
|
+
space: _?.name ?? v.name
|
|
165
165
|
}),
|
|
166
|
-
/* @__PURE__ */ I(
|
|
167
|
-
workspace:
|
|
166
|
+
/* @__PURE__ */ I(ge, {
|
|
167
|
+
workspace: a,
|
|
168
168
|
kind: "doc",
|
|
169
|
-
target:
|
|
169
|
+
target: p.id
|
|
170
170
|
}),
|
|
171
171
|
/* @__PURE__ */ L("span", {
|
|
172
172
|
className: "ml-auto flex shrink-0 items-center gap-3",
|
|
173
173
|
children: [
|
|
174
|
-
B && !$ && /* @__PURE__ */ I(
|
|
174
|
+
B && !$ && /* @__PURE__ */ I(D, {
|
|
175
175
|
type: "button",
|
|
176
176
|
size: "sm",
|
|
177
177
|
onMouseDown: (e) => e.preventDefault(),
|
|
178
178
|
onClick: Q,
|
|
179
|
-
children:
|
|
179
|
+
children: t("createIssue")
|
|
180
180
|
}),
|
|
181
|
-
|
|
181
|
+
T.rename.isPending && /* @__PURE__ */ I("span", {
|
|
182
182
|
className: "text-xs text-muted-foreground",
|
|
183
|
-
children:
|
|
183
|
+
children: r("saving")
|
|
184
184
|
}),
|
|
185
|
-
/* @__PURE__ */ I(
|
|
186
|
-
workspace:
|
|
187
|
-
others:
|
|
185
|
+
/* @__PURE__ */ I(Te, {
|
|
186
|
+
workspace: a,
|
|
187
|
+
others: x
|
|
188
188
|
}),
|
|
189
|
-
/* @__PURE__ */ L(
|
|
189
|
+
/* @__PURE__ */ L(D, {
|
|
190
190
|
type: "button",
|
|
191
191
|
size: "sm",
|
|
192
192
|
"aria-pressed": H,
|
|
193
193
|
onClick: () => {
|
|
194
194
|
U((e) => !e), W(void 0), K(!1), q(!1), Y(!1);
|
|
195
195
|
},
|
|
196
|
-
...G > 0 && { "aria-label":
|
|
196
|
+
...G > 0 && { "aria-label": t("commentsCount", { count: G }) },
|
|
197
197
|
className: "relative aria-pressed:bg-muted max-md:hidden",
|
|
198
|
-
children: [
|
|
198
|
+
children: [t("comments"), /* @__PURE__ */ I(He, { count: G })]
|
|
199
199
|
}),
|
|
200
|
-
/* @__PURE__ */ I(
|
|
200
|
+
/* @__PURE__ */ I(D, {
|
|
201
201
|
type: "button",
|
|
202
202
|
size: "sm",
|
|
203
203
|
"aria-pressed": Ge,
|
|
@@ -205,20 +205,20 @@ function B() {
|
|
|
205
205
|
K((e) => !e), Z(void 0), U(!1), q(!1), Y(!1);
|
|
206
206
|
},
|
|
207
207
|
className: "aria-pressed:bg-muted max-md:hidden",
|
|
208
|
-
children:
|
|
208
|
+
children: t("history")
|
|
209
209
|
}),
|
|
210
|
-
!$ && /* @__PURE__ */ L(
|
|
210
|
+
!$ && /* @__PURE__ */ L(D, {
|
|
211
211
|
type: "button",
|
|
212
212
|
size: "sm",
|
|
213
213
|
"aria-pressed": Ke,
|
|
214
214
|
onClick: () => {
|
|
215
215
|
q((e) => !e), U(!1), K(!1), Z(void 0), Y(!1);
|
|
216
216
|
},
|
|
217
|
-
...R.length > 0 && { "aria-label":
|
|
217
|
+
...R.length > 0 && { "aria-label": t("unlinkedCount", { count: R.length }) },
|
|
218
218
|
className: "relative aria-pressed:bg-muted max-md:hidden",
|
|
219
|
-
children: [
|
|
219
|
+
children: [t("links"), /* @__PURE__ */ I(He, { count: R.length })]
|
|
220
220
|
}),
|
|
221
|
-
!$ && /* @__PURE__ */ I(
|
|
221
|
+
!$ && /* @__PURE__ */ I(D, {
|
|
222
222
|
type: "button",
|
|
223
223
|
size: "sm",
|
|
224
224
|
"aria-pressed": J,
|
|
@@ -226,11 +226,11 @@ function B() {
|
|
|
226
226
|
Y((e) => !e), U(!1), K(!1), Z(void 0), q(!1);
|
|
227
227
|
},
|
|
228
228
|
className: "aria-pressed:bg-muted max-md:hidden",
|
|
229
|
-
children:
|
|
229
|
+
children: t("graph")
|
|
230
230
|
}),
|
|
231
231
|
/* @__PURE__ */ I(Me, {
|
|
232
|
-
items: () =>
|
|
233
|
-
label:
|
|
232
|
+
items: () => w(p, { onRename: () => V.current?.focus() }),
|
|
233
|
+
label: r("moreActionsFor", { name: p.title }),
|
|
234
234
|
visible: !0
|
|
235
235
|
})
|
|
236
236
|
]
|
|
@@ -242,65 +242,65 @@ function B() {
|
|
|
242
242
|
/* @__PURE__ */ L("div", {
|
|
243
243
|
ref: F,
|
|
244
244
|
className: "min-h-0 flex-1 overflow-y-auto",
|
|
245
|
-
children: [!X && /* @__PURE__ */ I(
|
|
246
|
-
workspace:
|
|
247
|
-
doc:
|
|
245
|
+
children: [!X && /* @__PURE__ */ I(me, {
|
|
246
|
+
workspace: a,
|
|
247
|
+
doc: p,
|
|
248
248
|
editable: !$
|
|
249
249
|
}), /* @__PURE__ */ L("div", {
|
|
250
250
|
className: "flex w-full gap-10 px-4 pt-6 md:px-8 md:pt-8",
|
|
251
251
|
children: [/* @__PURE__ */ L("article", {
|
|
252
|
-
className: `group/doc min-w-0 flex-1 pb-24 ${
|
|
252
|
+
className: `group/doc min-w-0 flex-1 pb-24 ${p.fullWidth ? "" : "mx-auto max-w-3xl"}`,
|
|
253
253
|
children: [
|
|
254
254
|
$ && /* @__PURE__ */ L("div", {
|
|
255
255
|
className: "mb-6 flex items-center gap-3 rounded-md border border-border bg-muted px-3 py-2 text-sm",
|
|
256
256
|
children: [/* @__PURE__ */ I("span", {
|
|
257
257
|
className: "flex-1",
|
|
258
|
-
children:
|
|
259
|
-
}), /* @__PURE__ */ I(
|
|
258
|
+
children: t("archivedNotice")
|
|
259
|
+
}), /* @__PURE__ */ I(D, {
|
|
260
260
|
type: "button",
|
|
261
261
|
variant: "primary",
|
|
262
262
|
size: "sm",
|
|
263
|
-
onClick: () =>
|
|
264
|
-
children:
|
|
263
|
+
onClick: () => T.restore.mutate(p),
|
|
264
|
+
children: t("restore")
|
|
265
265
|
})]
|
|
266
266
|
}),
|
|
267
|
-
/* @__PURE__ */ I(
|
|
268
|
-
workspace:
|
|
269
|
-
doc:
|
|
267
|
+
/* @__PURE__ */ I(he, {
|
|
268
|
+
workspace: a,
|
|
269
|
+
doc: p,
|
|
270
270
|
editable: !$ && !X
|
|
271
271
|
}),
|
|
272
272
|
/* @__PURE__ */ I(Pe, {
|
|
273
|
-
doc:
|
|
273
|
+
doc: p,
|
|
274
274
|
input: V,
|
|
275
|
-
autoFocus: !!
|
|
275
|
+
autoFocus: !!f,
|
|
276
276
|
readOnly: $,
|
|
277
|
-
onFocus: () =>
|
|
278
|
-
onBlur: () =>
|
|
279
|
-
onSave: (e) =>
|
|
280
|
-
doc:
|
|
277
|
+
onFocus: () => b("title"),
|
|
278
|
+
onBlur: () => b(void 0),
|
|
279
|
+
onSave: (e) => T.rename.mutate({
|
|
280
|
+
doc: p,
|
|
281
281
|
title: e
|
|
282
282
|
})
|
|
283
|
-
},
|
|
284
|
-
/* @__PURE__ */ I(
|
|
285
|
-
workspace:
|
|
286
|
-
others:
|
|
283
|
+
}, p.id),
|
|
284
|
+
/* @__PURE__ */ I(we, {
|
|
285
|
+
workspace: a,
|
|
286
|
+
others: x,
|
|
287
287
|
field: "title"
|
|
288
288
|
}),
|
|
289
|
-
|
|
289
|
+
T.rename.isError && /* @__PURE__ */ I(Oe, {
|
|
290
290
|
className: "mt-1",
|
|
291
|
-
children:
|
|
291
|
+
children: i(T.rename.error)
|
|
292
292
|
}),
|
|
293
293
|
/* @__PURE__ */ L("div", {
|
|
294
294
|
className: "mt-2 flex flex-wrap items-center gap-x-3 gap-y-1",
|
|
295
295
|
children: [/* @__PURE__ */ I(Fe, {
|
|
296
|
-
workspace:
|
|
297
|
-
doc:
|
|
298
|
-
}), /* @__PURE__ */ I(
|
|
299
|
-
workspace:
|
|
300
|
-
teamId:
|
|
301
|
-
value:
|
|
302
|
-
onChange: (e) =>
|
|
303
|
-
doc:
|
|
296
|
+
workspace: a,
|
|
297
|
+
doc: p
|
|
298
|
+
}), /* @__PURE__ */ I(_e, {
|
|
299
|
+
workspace: a,
|
|
300
|
+
teamId: p.teamId,
|
|
301
|
+
value: p.areaId,
|
|
302
|
+
onChange: (e) => T.fileUnder.mutate({
|
|
303
|
+
doc: p,
|
|
304
304
|
area: e
|
|
305
305
|
}),
|
|
306
306
|
disabled: $,
|
|
@@ -308,76 +308,76 @@ function B() {
|
|
|
308
308
|
})]
|
|
309
309
|
}),
|
|
310
310
|
/* @__PURE__ */ I("div", {
|
|
311
|
-
onContextMenu: (
|
|
312
|
-
label:
|
|
311
|
+
onContextMenu: (e) => B && !$ && C(e, [{
|
|
312
|
+
label: t("createIssue"),
|
|
313
313
|
onClick: Q
|
|
314
|
-
}, te(
|
|
315
|
-
children: X ? /* @__PURE__ */ I(
|
|
316
|
-
workspace:
|
|
317
|
-
doc:
|
|
314
|
+
}, te(t("copySelection"), B)]),
|
|
315
|
+
children: X ? /* @__PURE__ */ I(xe, {
|
|
316
|
+
workspace: a,
|
|
317
|
+
doc: p,
|
|
318
318
|
versionId: X,
|
|
319
319
|
onDone: () => Z(void 0)
|
|
320
320
|
}) : $ ? /* @__PURE__ */ I("div", {
|
|
321
321
|
className: "mt-4",
|
|
322
|
-
children: /* @__PURE__ */ I(
|
|
323
|
-
value:
|
|
322
|
+
children: /* @__PURE__ */ I(de, {
|
|
323
|
+
value: p.body ?? "",
|
|
324
324
|
editable: !1,
|
|
325
325
|
className: "min-h-32"
|
|
326
326
|
})
|
|
327
327
|
}) : /* @__PURE__ */ I(Ie, {
|
|
328
|
-
workspace:
|
|
329
|
-
doc:
|
|
328
|
+
workspace: a,
|
|
329
|
+
doc: p,
|
|
330
330
|
onEditor: qe,
|
|
331
|
-
onFocus: () =>
|
|
332
|
-
onBlur: () =>
|
|
331
|
+
onFocus: () => b("body"),
|
|
332
|
+
onBlur: () => b(void 0)
|
|
333
333
|
})
|
|
334
334
|
}),
|
|
335
335
|
/* @__PURE__ */ I(Re, {
|
|
336
|
-
workspace:
|
|
337
|
-
docKey:
|
|
336
|
+
workspace: a,
|
|
337
|
+
docKey: p.key
|
|
338
338
|
}),
|
|
339
339
|
/* @__PURE__ */ I(ze, {
|
|
340
|
-
workspace:
|
|
341
|
-
docKey:
|
|
340
|
+
workspace: a,
|
|
341
|
+
docKey: p.key
|
|
342
342
|
}),
|
|
343
343
|
/* @__PURE__ */ I(Le, {
|
|
344
|
-
workspace:
|
|
345
|
-
docKey:
|
|
344
|
+
workspace: a,
|
|
345
|
+
docKey: p.key
|
|
346
346
|
}),
|
|
347
347
|
/* @__PURE__ */ I(Be, {
|
|
348
|
-
workspace:
|
|
349
|
-
docKey:
|
|
348
|
+
workspace: a,
|
|
349
|
+
docKey: p.key
|
|
350
350
|
})
|
|
351
351
|
]
|
|
352
|
-
}), !$ && !X && /* @__PURE__ */ I(
|
|
352
|
+
}), !$ && !X && /* @__PURE__ */ I(Se, {
|
|
353
353
|
editor: k,
|
|
354
354
|
scroller: F
|
|
355
355
|
})]
|
|
356
356
|
})]
|
|
357
357
|
}),
|
|
358
|
-
H && /* @__PURE__ */ I(
|
|
359
|
-
workspace:
|
|
360
|
-
doc:
|
|
358
|
+
H && /* @__PURE__ */ I(ve, {
|
|
359
|
+
workspace: a,
|
|
360
|
+
doc: p,
|
|
361
361
|
draft: We,
|
|
362
362
|
onDraftDone: () => W(void 0),
|
|
363
363
|
onShowQuote: Je
|
|
364
364
|
}),
|
|
365
|
-
Ge && /* @__PURE__ */ I(
|
|
366
|
-
workspace:
|
|
367
|
-
doc:
|
|
365
|
+
Ge && /* @__PURE__ */ I(be, {
|
|
366
|
+
workspace: a,
|
|
367
|
+
doc: p,
|
|
368
368
|
selected: X,
|
|
369
369
|
onSelect: Z
|
|
370
370
|
}),
|
|
371
|
-
Ke && !$ && /* @__PURE__ */ I(
|
|
371
|
+
Ke && !$ && /* @__PURE__ */ I(Ee, {
|
|
372
372
|
editor: k,
|
|
373
373
|
suggestions: R
|
|
374
374
|
}),
|
|
375
375
|
J && !$ && /* @__PURE__ */ I("aside", {
|
|
376
|
-
"aria-label":
|
|
376
|
+
"aria-label": t("graph"),
|
|
377
377
|
className: "w-96 shrink-0 overflow-y-auto border-l border-border px-3 py-4 max-md:hidden",
|
|
378
|
-
children: /* @__PURE__ */ I(
|
|
379
|
-
workspace:
|
|
380
|
-
of: { doc:
|
|
378
|
+
children: /* @__PURE__ */ I(Ce, {
|
|
379
|
+
workspace: a,
|
|
380
|
+
of: { doc: p.key },
|
|
381
381
|
width: 352
|
|
382
382
|
})
|
|
383
383
|
})
|
|
@@ -402,14 +402,14 @@ function Pe({ doc: e, input: t, autoFocus: n, readOnly: r, onSave: i, onFocus: a
|
|
|
402
402
|
})] });
|
|
403
403
|
}
|
|
404
404
|
function Fe({ workspace: e, doc: t }) {
|
|
405
|
-
let n = P("docs"), r =
|
|
405
|
+
let n = P("docs"), r = h(), { actorName: i, person: a, avatarOf: o } = g(e), s = i(t.editor);
|
|
406
406
|
return /* @__PURE__ */ L("p", {
|
|
407
407
|
className: "flex items-center gap-1.5 text-xs text-muted-foreground",
|
|
408
|
-
children: [/* @__PURE__ */ I(
|
|
408
|
+
children: [/* @__PURE__ */ I(y, {
|
|
409
409
|
workspace: e,
|
|
410
410
|
kind: t.editor.kind,
|
|
411
411
|
handle: t.editor.handle,
|
|
412
|
-
children: /* @__PURE__ */ I(
|
|
412
|
+
children: /* @__PURE__ */ I(T, {
|
|
413
413
|
kind: t.editor.kind === "agent" ? "agent" : "person",
|
|
414
414
|
name: s,
|
|
415
415
|
src: o(t.editor.kind, t.editor.handle),
|
|
@@ -430,44 +430,44 @@ function Fe({ workspace: e, doc: t }) {
|
|
|
430
430
|
});
|
|
431
431
|
}
|
|
432
432
|
function Ie({ workspace: e, doc: t, onEditor: n, onFocus: r, onBlur: i }) {
|
|
433
|
-
let a = P("docs"), { data: o } = z(
|
|
433
|
+
let a = P("docs"), { data: o } = z(c), s = M(null), l = Ae(() => ({
|
|
434
434
|
name: o?.user.name ?? a("someone"),
|
|
435
|
-
color:
|
|
435
|
+
color: S(o?.user.username ?? "")
|
|
436
436
|
}), [
|
|
437
437
|
o?.user.name,
|
|
438
438
|
o?.user.username,
|
|
439
439
|
a
|
|
440
|
-
]), { session: u, error: d } =
|
|
440
|
+
]), { session: u, error: d } = C({
|
|
441
441
|
workspace: e,
|
|
442
442
|
target: { doc: t.key },
|
|
443
443
|
user: l,
|
|
444
|
-
getMarkdown:
|
|
444
|
+
getMarkdown: s
|
|
445
445
|
});
|
|
446
446
|
return /* @__PURE__ */ L("div", {
|
|
447
447
|
className: "mt-6 min-h-48",
|
|
448
|
-
children: [u ? /* @__PURE__ */ I(
|
|
448
|
+
children: [u ? /* @__PURE__ */ I(w, {
|
|
449
449
|
session: u,
|
|
450
450
|
user: l,
|
|
451
|
-
getMarkdown:
|
|
451
|
+
getMarkdown: s,
|
|
452
452
|
onEditor: n,
|
|
453
453
|
onFocus: r,
|
|
454
454
|
onBlur: i,
|
|
455
455
|
placeholder: a("bodyPlaceholder"),
|
|
456
456
|
label: a("body"),
|
|
457
457
|
className: "min-h-48"
|
|
458
|
-
}, `${u.generation}:${u.doc.guid}`) : /* @__PURE__ */ I(
|
|
458
|
+
}, `${u.generation}:${u.doc.guid}`) : /* @__PURE__ */ I(de, {
|
|
459
459
|
value: t.body ?? "",
|
|
460
460
|
editable: !1,
|
|
461
461
|
className: "min-h-48"
|
|
462
|
-
}), /* @__PURE__ */ I(
|
|
462
|
+
}), /* @__PURE__ */ I(Oe, {
|
|
463
463
|
className: "mt-1",
|
|
464
464
|
children: d
|
|
465
465
|
})]
|
|
466
466
|
});
|
|
467
467
|
}
|
|
468
|
-
function Le({ workspace:
|
|
469
|
-
let r = P("docs"), { data:
|
|
470
|
-
return
|
|
468
|
+
function Le({ workspace: e, docKey: n }) {
|
|
469
|
+
let r = P("docs"), { data: i } = z(a(e, n)), o = A(), s = _(e);
|
|
470
|
+
return i.length === 0 ? null : /* @__PURE__ */ L("section", {
|
|
471
471
|
className: "mt-10",
|
|
472
472
|
"aria-label": r("linkedIssues"),
|
|
473
473
|
children: [/* @__PURE__ */ I("h2", {
|
|
@@ -475,16 +475,16 @@ function Le({ workspace: t, docKey: n }) {
|
|
|
475
475
|
children: r("linkedIssues")
|
|
476
476
|
}), /* @__PURE__ */ I("ul", {
|
|
477
477
|
className: "mt-2 space-y-0.5",
|
|
478
|
-
children:
|
|
478
|
+
children: i.map((n) => /* @__PURE__ */ I("li", { children: /* @__PURE__ */ L(t, {
|
|
479
479
|
to: "/$workspace/issues/$identifier",
|
|
480
480
|
params: {
|
|
481
|
-
workspace:
|
|
481
|
+
workspace: e,
|
|
482
482
|
identifier: n.identifier
|
|
483
483
|
},
|
|
484
484
|
onContextMenu: (e) => o(e, s([n])),
|
|
485
485
|
className: "flex h-8 items-center gap-2 rounded-md px-2 text-sm hover:bg-muted",
|
|
486
486
|
children: [
|
|
487
|
-
/* @__PURE__ */ I(
|
|
487
|
+
/* @__PURE__ */ I(p, { category: n.status.category }),
|
|
488
488
|
/* @__PURE__ */ I("span", {
|
|
489
489
|
className: "shrink-0 text-muted-foreground",
|
|
490
490
|
children: n.identifier
|
|
@@ -498,8 +498,8 @@ function Le({ workspace: t, docKey: n }) {
|
|
|
498
498
|
})]
|
|
499
499
|
});
|
|
500
500
|
}
|
|
501
|
-
function Re({ workspace:
|
|
502
|
-
let r = P("docs"), { data: i = [] } = R(
|
|
501
|
+
function Re({ workspace: e, docKey: n }) {
|
|
502
|
+
let r = P("docs"), { data: i = [] } = R(s(e, n));
|
|
503
503
|
return i.length === 0 ? null : /* @__PURE__ */ L("section", {
|
|
504
504
|
className: "mt-10 rounded-lg border border-warning/60 px-4 py-3",
|
|
505
505
|
"aria-label": r("lostSections"),
|
|
@@ -514,11 +514,11 @@ function Re({ workspace: t, docKey: n }) {
|
|
|
514
514
|
}),
|
|
515
515
|
/* @__PURE__ */ I("ul", {
|
|
516
516
|
className: "mt-2 space-y-1 text-sm",
|
|
517
|
-
children: i.map((n) => /* @__PURE__ */ I("li", { children: /* @__PURE__ */ I(
|
|
517
|
+
children: i.map((n) => /* @__PURE__ */ I("li", { children: /* @__PURE__ */ I(t, {
|
|
518
518
|
to: "/$workspace/knowledge/$term",
|
|
519
519
|
params: {
|
|
520
|
-
workspace:
|
|
521
|
-
term:
|
|
520
|
+
workspace: e,
|
|
521
|
+
term: ee(n)
|
|
522
522
|
},
|
|
523
523
|
className: "hover:underline",
|
|
524
524
|
children: r("lostSection", {
|
|
@@ -531,26 +531,26 @@ function Re({ workspace: t, docKey: n }) {
|
|
|
531
531
|
});
|
|
532
532
|
}
|
|
533
533
|
function ze({ workspace: e, docKey: t }) {
|
|
534
|
-
let n = P("docs"), { data:
|
|
534
|
+
let n = P("docs"), { data: r } = z(i(e, t)), a = r.filter((e) => !e.canceled);
|
|
535
535
|
return a.length === 0 ? null : /* @__PURE__ */ L("section", {
|
|
536
536
|
className: "mt-10 space-y-3",
|
|
537
537
|
"aria-label": n("questions"),
|
|
538
538
|
children: [/* @__PURE__ */ I("h2", {
|
|
539
539
|
className: "text-sm font-semibold",
|
|
540
540
|
children: n("questions")
|
|
541
|
-
}), a.map((t) => t.answer ? /* @__PURE__ */ I(
|
|
541
|
+
}), a.map((t) => t.answer ? /* @__PURE__ */ I(b, {
|
|
542
542
|
workspace: e,
|
|
543
543
|
decision: t,
|
|
544
544
|
showIssue: !0
|
|
545
|
-
}, t.id) : /* @__PURE__ */ I(
|
|
545
|
+
}, t.id) : /* @__PURE__ */ I(x, {
|
|
546
546
|
workspace: e,
|
|
547
547
|
decision: t,
|
|
548
548
|
showIssue: !0
|
|
549
549
|
}, t.id))]
|
|
550
550
|
});
|
|
551
551
|
}
|
|
552
|
-
function Be({ workspace:
|
|
553
|
-
let i = P("docs"), { data: a } = z(
|
|
552
|
+
function Be({ workspace: e, docKey: n }) {
|
|
553
|
+
let i = P("docs"), { data: a } = z(r(e, n)), o = A(), s = oe(e), c = _(e), l = "flex h-8 items-center gap-2 rounded-md px-2 text-sm hover:bg-muted";
|
|
554
554
|
return a.docs.length + a.issues.length + a.comments.length === 0 ? null : /* @__PURE__ */ L("section", {
|
|
555
555
|
className: "mt-10",
|
|
556
556
|
"aria-label": i("linkedFrom"),
|
|
@@ -560,15 +560,15 @@ function Be({ workspace: t, docKey: r }) {
|
|
|
560
560
|
}), /* @__PURE__ */ L("ul", {
|
|
561
561
|
className: "mt-2 space-y-0.5",
|
|
562
562
|
children: [
|
|
563
|
-
a.docs.map((n) => /* @__PURE__ */ I("li", { children: /* @__PURE__ */ L(
|
|
563
|
+
a.docs.map((n) => /* @__PURE__ */ I("li", { children: /* @__PURE__ */ L(t, {
|
|
564
564
|
to: "/$workspace/docs/$doc",
|
|
565
565
|
params: {
|
|
566
|
-
workspace:
|
|
567
|
-
doc:
|
|
566
|
+
workspace: e,
|
|
567
|
+
doc: m(n)
|
|
568
568
|
},
|
|
569
569
|
onContextMenu: (e) => o(e, s(n)),
|
|
570
570
|
className: l,
|
|
571
|
-
children: [/* @__PURE__ */ I(
|
|
571
|
+
children: [/* @__PURE__ */ I(v, {
|
|
572
572
|
icon: n.icon,
|
|
573
573
|
className: "size-3.5",
|
|
574
574
|
emojiClassName: "text-xs"
|
|
@@ -577,16 +577,16 @@ function Be({ workspace: t, docKey: r }) {
|
|
|
577
577
|
children: n.title
|
|
578
578
|
})]
|
|
579
579
|
}) }, n.id)),
|
|
580
|
-
a.issues.map((n) => /* @__PURE__ */ I("li", { children: /* @__PURE__ */ L(
|
|
580
|
+
a.issues.map((n) => /* @__PURE__ */ I("li", { children: /* @__PURE__ */ L(t, {
|
|
581
581
|
to: "/$workspace/issues/$identifier",
|
|
582
582
|
params: {
|
|
583
|
-
workspace:
|
|
583
|
+
workspace: e,
|
|
584
584
|
identifier: n.identifier
|
|
585
585
|
},
|
|
586
586
|
onContextMenu: (e) => o(e, c([n])),
|
|
587
587
|
className: l,
|
|
588
588
|
children: [
|
|
589
|
-
/* @__PURE__ */ I(
|
|
589
|
+
/* @__PURE__ */ I(p, { category: n.status.category }),
|
|
590
590
|
/* @__PURE__ */ I("span", {
|
|
591
591
|
className: "shrink-0 text-muted-foreground",
|
|
592
592
|
children: n.identifier
|
|
@@ -597,16 +597,16 @@ function Be({ workspace: t, docKey: r }) {
|
|
|
597
597
|
})
|
|
598
598
|
]
|
|
599
599
|
}) }, n.id)),
|
|
600
|
-
a.comments.map((n) => /* @__PURE__ */ I("li", { children: /* @__PURE__ */ L(
|
|
600
|
+
a.comments.map((n) => /* @__PURE__ */ I("li", { children: /* @__PURE__ */ L(t, {
|
|
601
601
|
to: "/$workspace/issues/$identifier",
|
|
602
602
|
params: {
|
|
603
|
-
workspace:
|
|
603
|
+
workspace: e,
|
|
604
604
|
identifier: n.identifier
|
|
605
605
|
},
|
|
606
606
|
hash: `comment-${n.comment.id}`,
|
|
607
607
|
className: l,
|
|
608
608
|
children: [
|
|
609
|
-
/* @__PURE__ */ I(
|
|
609
|
+
/* @__PURE__ */ I(f, { className: "size-3.5 text-muted-foreground" }),
|
|
610
610
|
/* @__PURE__ */ I("span", {
|
|
611
611
|
className: "shrink-0 text-muted-foreground",
|
|
612
612
|
children: i("commentOn", { identifier: n.identifier })
|
|
@@ -623,7 +623,7 @@ function Be({ workspace: t, docKey: r }) {
|
|
|
623
623
|
}
|
|
624
624
|
function Ve({ workspace: e, doc: t, path: n, space: r }) {
|
|
625
625
|
let i = P("docs");
|
|
626
|
-
return /* @__PURE__ */ I(
|
|
626
|
+
return /* @__PURE__ */ I(E, {
|
|
627
627
|
label: i("breadcrumbs"),
|
|
628
628
|
className: "min-w-0",
|
|
629
629
|
crumbs: [
|
|
@@ -634,8 +634,8 @@ function Ve({ workspace: e, doc: t, path: n, space: r }) {
|
|
|
634
634
|
{ label: r },
|
|
635
635
|
...n.map((t) => ({
|
|
636
636
|
label: t.title,
|
|
637
|
-
href: `/${e}/docs/${
|
|
638
|
-
icon: t.icon && /* @__PURE__ */ I(
|
|
637
|
+
href: `/${e}/docs/${m(t)}`,
|
|
638
|
+
icon: t.icon && /* @__PURE__ */ I(v, {
|
|
639
639
|
icon: t.icon,
|
|
640
640
|
className: "size-3.5",
|
|
641
641
|
emojiClassName: "text-xs"
|
|
@@ -643,7 +643,7 @@ function Ve({ workspace: e, doc: t, path: n, space: r }) {
|
|
|
643
643
|
})),
|
|
644
644
|
{
|
|
645
645
|
label: t.title,
|
|
646
|
-
icon: t.icon && /* @__PURE__ */ I(
|
|
646
|
+
icon: t.icon && /* @__PURE__ */ I(v, {
|
|
647
647
|
icon: t.icon,
|
|
648
648
|
className: "size-3.5",
|
|
649
649
|
emojiClassName: "text-xs"
|