@parallelworks/tandem-web 0.138.2 → 0.139.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/components/AgentWork.js +35 -35
- package/components/AppRoot.js +4 -4
- 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 +26 -26
- package/hostedApp.js +36 -36
- 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/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 +147 -147
- package/pages/decisions.js +40 -40
- package/pages/issues.js +4 -4
- package/pages/projects.js +232 -231
- package/pages/triage.js +86 -86
- package/pages.js +21 -0
- package/routes/__root.js +6 -6
- package/routes/_workspace/docs/_doc2.js +12 -12
- package/routes/_workspace/docs2.js +8 -8
- package/routes/_workspace/graph2.js +9 -9
- package/routes/_workspace/issues/_identifier2.js +327 -327
- package/routes/_workspace/issues/index.js +6 -6
- package/routes/_workspace/knowledge/_term2.js +125 -124
- package/routes/_workspace/knowledge/index.js +8 -8
- package/routes/_workspace/knowledge/index2.js +22 -21
- package/routes/_workspace/measures2.js +4 -4
- package/routes/_workspace/people/_username.js +4 -4
- package/routes/_workspace/projects/_projectId3.js +264 -263
- 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 +8 -8
- package/routes/_workspace/teams/_key/cycles/index2.js +20 -20
- 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 +8 -8
- package/routes/_workspace2.js +319 -319
- package/routes/docs/route2.js +15 -15
package/pages/triage.js
CHANGED
|
@@ -12,19 +12,19 @@ import { actorAvatar as g } from "../lib/avatar.js";
|
|
|
12
12
|
import { Editor as _ } from "../components/Editor.js";
|
|
13
13
|
import { useShortcuts as v } from "../lib/shortcuts.js";
|
|
14
14
|
import { Avatar as y, Button as b, EmptyState as x, buttonClasses as S, toast as C } from "@parallelworks/ui";
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
15
|
+
import { useParams as w, useSearch as T } from "@tanstack/react-router";
|
|
16
|
+
import { useCallback as E, useEffect as D, useRef as O, useState as k } from "react";
|
|
17
|
+
import { useErrorMessage as A } from "@parallelworks/problem/react";
|
|
18
|
+
import { useTranslations as j } from "use-intl";
|
|
19
|
+
import { Fragment as M, jsx as N, jsxs as P } from "react/jsx-runtime";
|
|
20
20
|
import { useMutation as F, useQuery as I, useQueryClient as L, useSuspenseQuery as R } from "@tanstack/react-query";
|
|
21
21
|
// src/pages/triage.tsx
|
|
22
22
|
function z() {
|
|
23
|
-
let n =
|
|
23
|
+
let n = j("triage"), { workspace: i, key: a } = w({ strict: !1 }), { issue: s } = T({ strict: !1 }), { data: c } = R(o(i, a));
|
|
24
24
|
p(n("title"));
|
|
25
|
-
let u = c.issues, d =
|
|
25
|
+
let u = c.issues, d = A(), f = L(), [m, h] = k(/* @__PURE__ */ new Set()), [g, _] = k(/* @__PURE__ */ new Set()), y = E((e, t) => {
|
|
26
26
|
h((n) => n.has(e) === t ? n : t ? new Set(n).add(e) : V(n, e));
|
|
27
|
-
}, []), S = u.filter((e) => m.has(e.id)),
|
|
27
|
+
}, []), S = u.filter((e) => m.has(e.id)), M = S.filter((e) => g.has(e.id)), I = r(), z = u.findIndex((e) => e.identifier === s?.toUpperCase()), W = O(null), G = u[z], K = (e) => I({
|
|
28
28
|
to: ".",
|
|
29
29
|
search: e ? { issue: e.identifier.toLowerCase() } : {},
|
|
30
30
|
replace: !0
|
|
@@ -62,12 +62,12 @@ function z() {
|
|
|
62
62
|
}
|
|
63
63
|
}),
|
|
64
64
|
Escape: () => g.size > 0 ? _(/* @__PURE__ */ new Set()) : K(void 0)
|
|
65
|
-
}),
|
|
65
|
+
}), D(() => {
|
|
66
66
|
let e = G && document.getElementById(`triage-${G.id}`);
|
|
67
67
|
e && (e.scrollIntoView({ block: "nearest" }), e.parentElement?.contains(document.activeElement) && e.querySelector("a")?.focus({ preventScroll: !0 }));
|
|
68
68
|
}, [G]);
|
|
69
69
|
let Q = F({
|
|
70
|
-
mutationFn: async (n) => (await Promise.allSettled(
|
|
70
|
+
mutationFn: async (n) => (await Promise.allSettled(M.map(async (r) => t(await e.POST("/api/v1/workspaces/{workspace}/issues/{identifier}/triage", {
|
|
71
71
|
params: { path: {
|
|
72
72
|
workspace: i,
|
|
73
73
|
identifier: r.identifier
|
|
@@ -92,72 +92,72 @@ function z() {
|
|
|
92
92
|
"issues"
|
|
93
93
|
] })
|
|
94
94
|
});
|
|
95
|
-
return /* @__PURE__ */
|
|
95
|
+
return /* @__PURE__ */ P("div", {
|
|
96
96
|
className: "flex h-full flex-col",
|
|
97
|
-
children: [/* @__PURE__ */
|
|
97
|
+
children: [/* @__PURE__ */ P("header", {
|
|
98
98
|
className: "flex h-12 shrink-0 items-center gap-3 border-b border-border px-4 md:px-5",
|
|
99
99
|
children: [
|
|
100
|
-
/* @__PURE__ */
|
|
100
|
+
/* @__PURE__ */ N("h1", {
|
|
101
101
|
className: "text-sm font-semibold",
|
|
102
102
|
children: n("title")
|
|
103
103
|
}),
|
|
104
|
-
/* @__PURE__ */
|
|
104
|
+
/* @__PURE__ */ N("span", {
|
|
105
105
|
className: "text-xs text-muted-foreground tabular-nums",
|
|
106
106
|
children: u.length
|
|
107
107
|
}),
|
|
108
|
-
|
|
108
|
+
M.length > 0 && /* @__PURE__ */ P("div", {
|
|
109
109
|
className: "ml-auto flex items-center gap-2",
|
|
110
110
|
children: [
|
|
111
|
-
/* @__PURE__ */
|
|
111
|
+
/* @__PURE__ */ N("span", {
|
|
112
112
|
className: "text-xs font-medium text-human",
|
|
113
|
-
children: n("selected", { count:
|
|
113
|
+
children: n("selected", { count: M.length })
|
|
114
114
|
}),
|
|
115
|
-
|
|
115
|
+
M.length < S.length && /* @__PURE__ */ N("button", {
|
|
116
116
|
type: "button",
|
|
117
117
|
onClick: () => _(new Set(S.map((e) => e.id))),
|
|
118
118
|
className: "text-xs hover:underline",
|
|
119
119
|
children: n("selectAll")
|
|
120
120
|
}),
|
|
121
|
-
/* @__PURE__ */
|
|
121
|
+
/* @__PURE__ */ N("button", {
|
|
122
122
|
type: "button",
|
|
123
123
|
onClick: () => _(/* @__PURE__ */ new Set()),
|
|
124
124
|
className: "text-xs hover:underline",
|
|
125
125
|
children: n("clear")
|
|
126
126
|
}),
|
|
127
|
-
/* @__PURE__ */
|
|
127
|
+
/* @__PURE__ */ N(b, {
|
|
128
128
|
variant: "outline",
|
|
129
129
|
size: "sm",
|
|
130
130
|
title: n("declineHelp"),
|
|
131
131
|
loading: Q.isPending && Q.variables === "decline",
|
|
132
132
|
disabled: Q.isPending,
|
|
133
133
|
onClick: () => Q.mutate("decline"),
|
|
134
|
-
children: n("declineCount", { count:
|
|
134
|
+
children: n("declineCount", { count: M.length })
|
|
135
135
|
}),
|
|
136
|
-
/* @__PURE__ */
|
|
136
|
+
/* @__PURE__ */ N(b, {
|
|
137
137
|
variant: "primary",
|
|
138
138
|
size: "sm",
|
|
139
139
|
title: n("acceptHelp"),
|
|
140
140
|
loading: Q.isPending && Q.variables === "accept",
|
|
141
141
|
disabled: Q.isPending,
|
|
142
142
|
onClick: () => Q.mutate("accept"),
|
|
143
|
-
children: n("acceptCount", { count:
|
|
143
|
+
children: n("acceptCount", { count: M.length })
|
|
144
144
|
})
|
|
145
145
|
]
|
|
146
146
|
})
|
|
147
147
|
]
|
|
148
|
-
}), u.length === 0 ? /* @__PURE__ */
|
|
148
|
+
}), u.length === 0 ? /* @__PURE__ */ N("div", {
|
|
149
149
|
className: "min-h-0 flex-1 overflow-y-auto p-6",
|
|
150
|
-
children: /* @__PURE__ */
|
|
151
|
-
icon: /* @__PURE__ */
|
|
150
|
+
children: /* @__PURE__ */ N(x, {
|
|
151
|
+
icon: /* @__PURE__ */ N(l, {}),
|
|
152
152
|
title: n("empty"),
|
|
153
153
|
description: n("emptyDescription")
|
|
154
154
|
})
|
|
155
|
-
}) : /* @__PURE__ */
|
|
155
|
+
}) : /* @__PURE__ */ P("div", {
|
|
156
156
|
className: "flex min-h-0 flex-1",
|
|
157
|
-
children: [/* @__PURE__ */
|
|
157
|
+
children: [/* @__PURE__ */ N("ul", {
|
|
158
158
|
"aria-label": n("title"),
|
|
159
159
|
className: B("min-h-0 min-w-0 flex-1 flex-col overflow-y-auto px-2 py-2 md:flex md:max-w-md md:border-r md:border-border", G ? "hidden" : "flex"),
|
|
160
|
-
children: u.map((e, t) => /* @__PURE__ */
|
|
160
|
+
children: u.map((e, t) => /* @__PURE__ */ N(H, {
|
|
161
161
|
workspace: i,
|
|
162
162
|
issue: e,
|
|
163
163
|
onEligible: y,
|
|
@@ -165,16 +165,16 @@ function z() {
|
|
|
165
165
|
current: t === z,
|
|
166
166
|
onClick: (e) => Y(e, t)
|
|
167
167
|
}, e.id))
|
|
168
|
-
}), /* @__PURE__ */
|
|
168
|
+
}), /* @__PURE__ */ N("div", {
|
|
169
169
|
className: B("min-w-0 flex-1 overflow-y-auto md:block", G ? "block" : "hidden"),
|
|
170
|
-
children: G ? /* @__PURE__ */
|
|
170
|
+
children: G ? /* @__PURE__ */ N(U, {
|
|
171
171
|
workspace: i,
|
|
172
172
|
issue: G,
|
|
173
173
|
onBack: () => K(void 0),
|
|
174
174
|
onDecided: Z
|
|
175
|
-
}, G.id) : /* @__PURE__ */
|
|
175
|
+
}, G.id) : /* @__PURE__ */ N("div", {
|
|
176
176
|
className: "px-6 py-24",
|
|
177
|
-
children: /* @__PURE__ */
|
|
177
|
+
children: /* @__PURE__ */ N(x, {
|
|
178
178
|
title: n("noneSelected"),
|
|
179
179
|
description: n("shortcuts")
|
|
180
180
|
})
|
|
@@ -189,49 +189,49 @@ function V(e, t) {
|
|
|
189
189
|
return n.delete(t), n;
|
|
190
190
|
}
|
|
191
191
|
function H({ workspace: e, issue: t, onEligible: r, picked: i, current: a, onClick: o }) {
|
|
192
|
-
let s =
|
|
193
|
-
|
|
192
|
+
let s = j("triage"), c = d(), { actorName: l, avatarOf: u } = f(e), p = m(e, t.teamId);
|
|
193
|
+
D(() => r(t.id, p), [
|
|
194
194
|
r,
|
|
195
195
|
t.id,
|
|
196
196
|
p
|
|
197
197
|
]);
|
|
198
198
|
let h = t.creator;
|
|
199
|
-
return /* @__PURE__ */
|
|
199
|
+
return /* @__PURE__ */ N("li", {
|
|
200
200
|
id: `triage-${t.id}`,
|
|
201
201
|
"data-picked": i || void 0,
|
|
202
|
-
children: /* @__PURE__ */
|
|
202
|
+
children: /* @__PURE__ */ P(n, {
|
|
203
203
|
to: ".",
|
|
204
204
|
search: { issue: t.identifier.toLowerCase() },
|
|
205
205
|
replace: !0,
|
|
206
206
|
onClick: o,
|
|
207
207
|
"aria-current": a || void 0,
|
|
208
208
|
className: B("flex flex-col gap-1 px-3 py-2.5 select-none", i ? "bg-human-soft" : B("rounded-md", a ? "bg-muted" : "hover:bg-muted")),
|
|
209
|
-
children: [/* @__PURE__ */
|
|
209
|
+
children: [/* @__PURE__ */ P("span", {
|
|
210
210
|
className: "flex items-baseline gap-3",
|
|
211
|
-
children: [/* @__PURE__ */
|
|
211
|
+
children: [/* @__PURE__ */ N("span", {
|
|
212
212
|
className: "min-w-0 flex-1 truncate text-sm font-medium",
|
|
213
213
|
children: t.title
|
|
214
|
-
}), /* @__PURE__ */
|
|
214
|
+
}), /* @__PURE__ */ N("span", {
|
|
215
215
|
className: "shrink-0 text-xs text-muted-foreground tabular-nums",
|
|
216
216
|
children: t.identifier
|
|
217
217
|
})]
|
|
218
|
-
}), /* @__PURE__ */
|
|
218
|
+
}), /* @__PURE__ */ P("span", {
|
|
219
219
|
className: "flex items-center gap-1.5 text-xs text-muted-foreground",
|
|
220
220
|
children: [
|
|
221
|
-
/* @__PURE__ */
|
|
221
|
+
/* @__PURE__ */ N("span", {
|
|
222
222
|
className: B("flex shrink-0 rounded-full", i && "ring-1 ring-human/40"),
|
|
223
|
-
children: /* @__PURE__ */
|
|
223
|
+
children: /* @__PURE__ */ N(y, {
|
|
224
224
|
...g(h.kind),
|
|
225
225
|
name: l(h),
|
|
226
226
|
src: u(h.kind, h.handle),
|
|
227
227
|
size: "xs"
|
|
228
228
|
})
|
|
229
229
|
}),
|
|
230
|
-
/* @__PURE__ */
|
|
230
|
+
/* @__PURE__ */ N("span", {
|
|
231
231
|
className: "min-w-0 flex-1 truncate",
|
|
232
232
|
children: s("from", { name: l(h) })
|
|
233
233
|
}),
|
|
234
|
-
/* @__PURE__ */
|
|
234
|
+
/* @__PURE__ */ N("time", {
|
|
235
235
|
dateTime: t.createdAt,
|
|
236
236
|
title: c.full(t.createdAt),
|
|
237
237
|
className: "shrink-0 tabular-nums",
|
|
@@ -243,11 +243,11 @@ function H({ workspace: e, issue: t, onEligible: r, picked: i, current: a, onCli
|
|
|
243
243
|
});
|
|
244
244
|
}
|
|
245
245
|
function U({ workspace: r, issue: o, onBack: l, onDecided: p }) {
|
|
246
|
-
let v =
|
|
246
|
+
let v = j("triage"), x = d(), C = A(), w = L(), T = u(), { data: E } = R(a(r)), { data: D } = I(i(r, o.identifier)), O = D ?? o, { actorName: k, avatarOf: z } = f(r), B = E.find((e) => e.id === O.teamId), V = m(r, O.teamId), H = F({
|
|
247
247
|
mutationFn: async (n) => t(await e.POST("/api/v1/workspaces/{workspace}/issues/{identifier}/triage", {
|
|
248
248
|
params: { path: {
|
|
249
249
|
workspace: r,
|
|
250
|
-
identifier:
|
|
250
|
+
identifier: O.identifier
|
|
251
251
|
} },
|
|
252
252
|
body: { decision: n }
|
|
253
253
|
})),
|
|
@@ -258,68 +258,68 @@ function U({ workspace: r, issue: o, onBack: l, onDecided: p }) {
|
|
|
258
258
|
"issues"
|
|
259
259
|
] });
|
|
260
260
|
}
|
|
261
|
-
}), U =
|
|
262
|
-
return /* @__PURE__ */
|
|
261
|
+
}), U = O.creator;
|
|
262
|
+
return /* @__PURE__ */ P("article", {
|
|
263
263
|
className: "mx-auto w-full max-w-3xl px-4 py-5 md:px-8",
|
|
264
264
|
children: [
|
|
265
|
-
/* @__PURE__ */
|
|
265
|
+
/* @__PURE__ */ N("button", {
|
|
266
266
|
type: "button",
|
|
267
267
|
onClick: l,
|
|
268
268
|
className: "mb-3 text-xs text-muted-foreground hover:text-foreground md:hidden",
|
|
269
269
|
children: v("back")
|
|
270
270
|
}),
|
|
271
|
-
/* @__PURE__ */
|
|
271
|
+
/* @__PURE__ */ P("p", {
|
|
272
272
|
className: "flex items-center gap-1.5 text-xs text-muted-foreground",
|
|
273
273
|
children: [
|
|
274
|
-
B && /* @__PURE__ */
|
|
274
|
+
B && /* @__PURE__ */ N(h, {
|
|
275
275
|
icon: B.icon,
|
|
276
276
|
name: B.name,
|
|
277
277
|
className: "size-3.5"
|
|
278
278
|
}),
|
|
279
|
-
/* @__PURE__ */
|
|
279
|
+
/* @__PURE__ */ N("span", {
|
|
280
280
|
className: "tabular-nums",
|
|
281
|
-
children:
|
|
281
|
+
children: O.identifier
|
|
282
282
|
}),
|
|
283
|
-
/* @__PURE__ */
|
|
283
|
+
/* @__PURE__ */ N("span", {
|
|
284
284
|
"aria-hidden": "true",
|
|
285
285
|
children: "·"
|
|
286
286
|
}),
|
|
287
|
-
/* @__PURE__ */
|
|
287
|
+
/* @__PURE__ */ N(y, {
|
|
288
288
|
...g(U.kind),
|
|
289
|
-
name:
|
|
289
|
+
name: k(U),
|
|
290
290
|
src: z(U.kind, U.handle),
|
|
291
291
|
size: "xs"
|
|
292
292
|
}),
|
|
293
|
-
/* @__PURE__ */
|
|
293
|
+
/* @__PURE__ */ N("span", {
|
|
294
294
|
className: "truncate",
|
|
295
|
-
children: v("from", { name:
|
|
295
|
+
children: v("from", { name: k(U) })
|
|
296
296
|
}),
|
|
297
|
-
/* @__PURE__ */
|
|
297
|
+
/* @__PURE__ */ N("span", {
|
|
298
298
|
"aria-hidden": "true",
|
|
299
299
|
children: "·"
|
|
300
300
|
}),
|
|
301
|
-
/* @__PURE__ */
|
|
302
|
-
dateTime:
|
|
303
|
-
title: x.full(
|
|
304
|
-
children: x.relative(
|
|
301
|
+
/* @__PURE__ */ N("time", {
|
|
302
|
+
dateTime: O.createdAt,
|
|
303
|
+
title: x.full(O.createdAt),
|
|
304
|
+
children: x.relative(O.createdAt)
|
|
305
305
|
})
|
|
306
306
|
]
|
|
307
307
|
}),
|
|
308
|
-
/* @__PURE__ */
|
|
308
|
+
/* @__PURE__ */ N("h2", {
|
|
309
309
|
className: "mt-1 text-xl font-semibold text-balance",
|
|
310
|
-
children: /* @__PURE__ */
|
|
310
|
+
children: /* @__PURE__ */ N(n, {
|
|
311
311
|
to: "/$workspace/issues/$identifier",
|
|
312
312
|
params: {
|
|
313
313
|
workspace: r,
|
|
314
|
-
identifier:
|
|
314
|
+
identifier: O.identifier
|
|
315
315
|
},
|
|
316
316
|
className: "hover:underline",
|
|
317
|
-
children:
|
|
317
|
+
children: O.title
|
|
318
318
|
})
|
|
319
319
|
}),
|
|
320
|
-
/* @__PURE__ */
|
|
320
|
+
/* @__PURE__ */ P("div", {
|
|
321
321
|
className: "mt-4 flex flex-wrap items-center gap-2",
|
|
322
|
-
children: [V && /* @__PURE__ */ M
|
|
322
|
+
children: [V && /* @__PURE__ */ P(M, { children: [/* @__PURE__ */ N(b, {
|
|
323
323
|
variant: "primary",
|
|
324
324
|
size: "sm",
|
|
325
325
|
title: v("acceptHelp"),
|
|
@@ -327,7 +327,7 @@ function U({ workspace: r, issue: o, onBack: l, onDecided: p }) {
|
|
|
327
327
|
disabled: H.isPending,
|
|
328
328
|
onClick: () => H.mutate("accept"),
|
|
329
329
|
children: v("accept")
|
|
330
|
-
}), /* @__PURE__ */
|
|
330
|
+
}), /* @__PURE__ */ N(b, {
|
|
331
331
|
variant: "outline",
|
|
332
332
|
size: "sm",
|
|
333
333
|
title: v("declineHelp"),
|
|
@@ -335,11 +335,11 @@ function U({ workspace: r, issue: o, onBack: l, onDecided: p }) {
|
|
|
335
335
|
disabled: H.isPending,
|
|
336
336
|
onClick: () => H.mutate("decline"),
|
|
337
337
|
children: v("decline")
|
|
338
|
-
})] }), /* @__PURE__ */
|
|
338
|
+
})] }), /* @__PURE__ */ N(n, {
|
|
339
339
|
to: "/$workspace/issues/$identifier",
|
|
340
340
|
params: {
|
|
341
341
|
workspace: r,
|
|
342
|
-
identifier:
|
|
342
|
+
identifier: O.identifier
|
|
343
343
|
},
|
|
344
344
|
className: S({
|
|
345
345
|
size: "sm",
|
|
@@ -348,41 +348,41 @@ function U({ workspace: r, issue: o, onBack: l, onDecided: p }) {
|
|
|
348
348
|
children: v("openIssue")
|
|
349
349
|
})]
|
|
350
350
|
}),
|
|
351
|
-
H.error && /* @__PURE__ */
|
|
351
|
+
H.error && /* @__PURE__ */ N("p", {
|
|
352
352
|
className: "mt-2 text-xs text-danger",
|
|
353
353
|
children: C(H.error)
|
|
354
354
|
}),
|
|
355
|
-
/* @__PURE__ */
|
|
355
|
+
/* @__PURE__ */ N("p", {
|
|
356
356
|
className: "mt-3 text-xs text-muted-foreground",
|
|
357
357
|
children: v("duplicateHint")
|
|
358
358
|
}),
|
|
359
|
-
/* @__PURE__ */
|
|
359
|
+
/* @__PURE__ */ P("div", {
|
|
360
360
|
className: "mt-5 flex flex-wrap items-center gap-x-4 gap-y-1 border-y border-border py-2.5 text-xs text-muted-foreground",
|
|
361
361
|
children: [
|
|
362
|
-
/* @__PURE__ */
|
|
362
|
+
/* @__PURE__ */ P("span", {
|
|
363
363
|
className: "inline-flex items-center gap-1.5",
|
|
364
|
-
children: [/* @__PURE__ */
|
|
364
|
+
children: [/* @__PURE__ */ N(c, { category: O.status.category }), O.status.name]
|
|
365
365
|
}),
|
|
366
|
-
/* @__PURE__ */
|
|
366
|
+
/* @__PURE__ */ P("span", {
|
|
367
367
|
className: "inline-flex items-center gap-1.5",
|
|
368
|
-
children: [/* @__PURE__ */
|
|
368
|
+
children: [/* @__PURE__ */ N(s, { priority: O.priority }), T[O.priority]]
|
|
369
369
|
}),
|
|
370
|
-
|
|
370
|
+
O.labels.map((e) => /* @__PURE__ */ P("span", {
|
|
371
371
|
className: "inline-flex items-center gap-1.5",
|
|
372
|
-
children: [/* @__PURE__ */
|
|
372
|
+
children: [/* @__PURE__ */ N("span", {
|
|
373
373
|
className: "size-2 rounded-full",
|
|
374
374
|
style: { background: e.color }
|
|
375
375
|
}), e.name]
|
|
376
376
|
}, e.id))
|
|
377
377
|
]
|
|
378
378
|
}),
|
|
379
|
-
|
|
379
|
+
O.body.trim() ? /* @__PURE__ */ N("div", {
|
|
380
380
|
className: "mt-5 text-sm",
|
|
381
|
-
children: /* @__PURE__ */
|
|
382
|
-
value:
|
|
381
|
+
children: /* @__PURE__ */ N(_, {
|
|
382
|
+
value: O.body,
|
|
383
383
|
editable: !1
|
|
384
384
|
})
|
|
385
|
-
}) : /* @__PURE__ */
|
|
385
|
+
}) : /* @__PURE__ */ N("p", {
|
|
386
386
|
className: "mt-5 text-sm text-muted-foreground",
|
|
387
387
|
children: v("noDescription")
|
|
388
388
|
})
|
package/pages.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { routeTree as e } from "./routeTree.gen.js";
|
|
2
|
+
// src/pages.ts
|
|
3
|
+
var t = /* @__PURE__ */ new Set([
|
|
4
|
+
"/",
|
|
5
|
+
"/$workspace",
|
|
6
|
+
"/new",
|
|
7
|
+
"/no-access"
|
|
8
|
+
]);
|
|
9
|
+
function n() {
|
|
10
|
+
let n = e.children, i = n.filter((e) => t.has(r(e)));
|
|
11
|
+
for (let e of i) r(e) === "/$workspace" && (e.options.staticData = {
|
|
12
|
+
...e.options.staticData,
|
|
13
|
+
ownsCommandPalette: !0
|
|
14
|
+
});
|
|
15
|
+
return {
|
|
16
|
+
framed: i,
|
|
17
|
+
frameless: n.filter((e) => !t.has(r(e)))
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
var r = (e) => e.options.path ?? "";
|
|
21
|
+
export { n as splitPages };
|
package/routes/__root.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { ErrorPage as e } from "@parallelworks/ui";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { createRootRouteWithContext as t, lazyRouteComponent as n } from "@tanstack/react-router";
|
|
3
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
4
4
|
// src/routes/__root.tsx
|
|
5
|
-
var i =
|
|
6
|
-
component:
|
|
5
|
+
var i = t()({
|
|
6
|
+
component: n(() => import("../components/AppRoot.js")),
|
|
7
7
|
notFoundComponent: a
|
|
8
8
|
});
|
|
9
9
|
function a() {
|
|
10
|
-
return /* @__PURE__ */
|
|
10
|
+
return /* @__PURE__ */ r("div", {
|
|
11
11
|
className: "flex h-dvh",
|
|
12
|
-
children: /* @__PURE__ */
|
|
12
|
+
children: /* @__PURE__ */ r(e, { status: 404 })
|
|
13
13
|
});
|
|
14
14
|
}
|
|
15
15
|
export { i as Route };
|
|
@@ -2,11 +2,11 @@ import { Link as e, useNavigate as t } from "../../../lib/router.js";
|
|
|
2
2
|
import { docBacklinksQuery as n, docDecisionsQuery as r, docIssuesQuery as i, docQuery as a, lostSectionsQuery as o, meQuery as s, teamsQuery as c, workspaceQuery as l } from "../../../api/queries.js";
|
|
3
3
|
import { Route as u } from "./_doc.js";
|
|
4
4
|
import { CommentIcon as d, StatusIcon as f } from "../../../components/icons.js";
|
|
5
|
-
import {
|
|
5
|
+
import { termRef as ee } from "../../../lib/knowledgeKinds.js";
|
|
6
6
|
import { copyItem as te } from "../../../lib/menus.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
7
|
+
import { docKey as ne, docPath as re, docRef as p, docURL as ie, useDocActions as ae, useDocMenu as oe } from "../../../lib/docs.js";
|
|
8
|
+
import { headingAnchor as se } from "../../../lib/glossary.js";
|
|
9
|
+
import { useTime as m } from "../../../lib/time.js";
|
|
10
10
|
import { usePeople as h } from "../../../lib/people.js";
|
|
11
11
|
import { issueURL as ce, useIssueMenu as g } from "../../../lib/issueMenu.js";
|
|
12
12
|
import { useNewIssue as le } from "../../../lib/newIssue.js";
|
|
@@ -38,7 +38,7 @@ 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 e = P("docs"), n = P("common"), r = je(), { workspace: i, doc: o } = u.useParams(), { rename: d } = u.useSearch(), { data: f } = z(a(i,
|
|
41
|
+
let e = P("docs"), n = P("common"), r = je(), { workspace: i, doc: o } = u.useParams(), { rename: d } = u.useSearch(), { data: f } = z(a(i, ne(o))), ee = f.key, { data: m } = z(c(i)), { data: h } = z(s), g = m.find((e) => e.id === f.teamId), { data: _ } = z(l(i)), [v, y] = N();
|
|
42
42
|
me({
|
|
43
43
|
doc: f.key,
|
|
44
44
|
...v && { field: v }
|
|
@@ -47,11 +47,11 @@ function B() {
|
|
|
47
47
|
j(() => {
|
|
48
48
|
ue(i, {
|
|
49
49
|
kind: "doc",
|
|
50
|
-
href:
|
|
50
|
+
href: re(i, f),
|
|
51
51
|
label: f.title
|
|
52
52
|
});
|
|
53
53
|
}, [i, f]);
|
|
54
|
-
let x = t(), S = A(), C =
|
|
54
|
+
let x = t(), S = A(), C = oe(i), w = ae(i), T = le(), O = M(null), [k, Ae] = N(null), F = M(null), R = Oe(i, f, k), [B, Ue] = N(""), V = M(null), [H, U] = N(!1), [We, W] = N(), G = be(i, ee), [Ge, K] = N(!1), [Ke, q] = N(!1), [J, Y] = N(!1), [X, Z] = N();
|
|
55
55
|
j(() => {
|
|
56
56
|
(o !== p(f) || d) && x({
|
|
57
57
|
to: "/$workspace/docs/$doc",
|
|
@@ -73,7 +73,7 @@ function B() {
|
|
|
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
|
}
|
|
@@ -132,7 +132,7 @@ function B() {
|
|
|
132
132
|
body: e("fromDoc", {
|
|
133
133
|
quote: n,
|
|
134
134
|
title: f.title,
|
|
135
|
-
url:
|
|
135
|
+
url: ie(i, f)
|
|
136
136
|
}),
|
|
137
137
|
origin: { doc: f.key },
|
|
138
138
|
onCreated: (e) => {
|
|
@@ -402,7 +402,7 @@ 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 = m(), { actorName: i, person: a, avatarOf: o } = h(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
408
|
children: [/* @__PURE__ */ I(v, {
|
|
@@ -518,7 +518,7 @@ function Re({ workspace: t, docKey: n }) {
|
|
|
518
518
|
to: "/$workspace/knowledge/$term",
|
|
519
519
|
params: {
|
|
520
520
|
workspace: t,
|
|
521
|
-
term:
|
|
521
|
+
term: ee(n)
|
|
522
522
|
},
|
|
523
523
|
className: "hover:underline",
|
|
524
524
|
children: r("lostSection", {
|
|
@@ -550,7 +550,7 @@ function ze({ workspace: e, docKey: t }) {
|
|
|
550
550
|
});
|
|
551
551
|
}
|
|
552
552
|
function Be({ workspace: t, docKey: r }) {
|
|
553
|
-
let i = P("docs"), { data: a } = z(n(t, r)), o = A(), s =
|
|
553
|
+
let i = P("docs"), { data: a } = z(n(t, r)), o = A(), s = oe(t), c = g(t), 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"),
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { Route as e } from "./docs.js";
|
|
2
2
|
import { docKey as t } from "../../lib/docs.js";
|
|
3
3
|
import { DocsTree as n } from "../../components/DocsTree.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { Outlet as r, useParams as i } from "@tanstack/react-router";
|
|
5
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
6
6
|
// src/routes/$workspace/docs.tsx?tsr-split=component
|
|
7
7
|
function s() {
|
|
8
|
-
let { workspace: s } = e.useParams(), { doc: c } =
|
|
9
|
-
return /* @__PURE__ */
|
|
8
|
+
let { workspace: s } = e.useParams(), { doc: c } = i({ strict: !1 }), l = c ? t(c) : void 0;
|
|
9
|
+
return /* @__PURE__ */ o("div", {
|
|
10
10
|
className: "flex h-full",
|
|
11
|
-
children: [!l && /* @__PURE__ */
|
|
11
|
+
children: [!l && /* @__PURE__ */ a("div", {
|
|
12
12
|
className: "mx-auto flex w-full max-w-2xl flex-col px-3 py-3 md:py-6",
|
|
13
|
-
children: /* @__PURE__ */
|
|
13
|
+
children: /* @__PURE__ */ a(n, {
|
|
14
14
|
workspace: s,
|
|
15
15
|
page: !0
|
|
16
16
|
}, s)
|
|
17
|
-
}), /* @__PURE__ */
|
|
17
|
+
}), /* @__PURE__ */ a("div", {
|
|
18
18
|
className: `min-w-0 flex-1 ${l ? "block" : "hidden"}`,
|
|
19
|
-
children: /* @__PURE__ */ r
|
|
19
|
+
children: /* @__PURE__ */ a(r, {})
|
|
20
20
|
})]
|
|
21
21
|
});
|
|
22
22
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { rememberSearch as e } from "../../lib/listSearch.js";
|
|
2
|
+
import { redirect as t } from "../../lib/router.js";
|
|
3
|
+
import { kinds as n, statuses as r } from "./graph.js";
|
|
4
4
|
import { createFileRoute as i, lazyFn as a, lazyRouteComponent as o } from "@tanstack/react-router";
|
|
5
5
|
// src/routes/$workspace/graph.tsx
|
|
6
6
|
var s = () => import("./graph3.js"), c = () => import("./graph4.js"), l = (e, t) => {
|
|
@@ -8,18 +8,18 @@ var s = () => import("./graph3.js"), c = () => import("./graph4.js"), l = (e, t)
|
|
|
8
8
|
return n.length ? n : void 0;
|
|
9
9
|
}, u = i("/$workspace/graph")({
|
|
10
10
|
validateSearch: (e) => {
|
|
11
|
-
let
|
|
11
|
+
let t = l(e.kind, n), i = l(e.status, r);
|
|
12
12
|
return {
|
|
13
13
|
...typeof e.space == "string" && { space: e.space },
|
|
14
|
-
...
|
|
14
|
+
...t && { kind: t },
|
|
15
15
|
...i && { status: i }
|
|
16
16
|
};
|
|
17
17
|
},
|
|
18
|
-
beforeLoad: ({ params:
|
|
19
|
-
let o =
|
|
20
|
-
if (o) throw
|
|
18
|
+
beforeLoad: ({ params: n, search: r, location: i, preload: a }) => {
|
|
19
|
+
let o = e(i.pathname, r, a);
|
|
20
|
+
if (o) throw t({
|
|
21
21
|
to: "/$workspace/graph",
|
|
22
|
-
params:
|
|
22
|
+
params: n,
|
|
23
23
|
search: o,
|
|
24
24
|
replace: !0
|
|
25
25
|
});
|