@parallelworks/tandem-web 0.150.2 → 0.151.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_virtual/_virtual_i18n/en/common.js +32 -3
- package/_virtual/_virtual_i18n/es/common.js +32 -3
- package/_virtual/_virtual_i18n/ja/common.js +32 -3
- package/_virtual/_virtual_i18n/ko/common.js +32 -3
- package/_virtual/_virtual_i18n/zh/common.js +32 -3
- package/api/queries.js +88 -77
- package/components/AccessGrants.js +6 -6
- package/components/ActivityTimeline.js +4 -4
- package/components/AgentWork.js +111 -111
- package/components/AreaLink.js +32 -0
- package/components/AreaTiles.js +10 -13
- package/components/AreaWork.js +25 -1
- package/components/BugRotation.js +3 -3
- package/components/CodeHostSettings.js +30 -30
- package/components/CommandPalette.js +53 -53
- package/components/CustomFields.js +116 -116
- package/components/DateChip.js +11 -11
- package/components/DocButton.js +6 -6
- package/components/DocHistory.js +4 -4
- package/components/DocLinkPicker.js +8 -8
- package/components/DocProperties.js +15 -15
- package/components/DocTable.js +15 -15
- package/components/DocsTree.js +80 -80
- package/components/Editor.js +35 -35
- package/components/FavoritesNav.js +53 -53
- package/components/GitHub.js +18 -18
- package/components/Graph.js +15 -15
- package/components/HostActions.js +21 -21
- package/components/HostPanel.js +6 -6
- package/components/HoverCards.js +38 -38
- package/components/IssueBoard.js +4 -4
- package/components/IssueCode.js +14 -14
- package/components/IssueEvent.js +3 -3
- package/components/IssueFilters.js +71 -71
- package/components/IssueListBlock.js +32 -32
- package/components/IssueRow.js +21 -21
- package/components/IssueTemplates.js +118 -118
- package/components/IssueTypes.js +40 -40
- package/components/NewIssueDialog.js +76 -76
- package/components/NewProjectDialog.js +145 -145
- package/components/PersonActivity.js +4 -4
- package/components/SharedViewer.js +5 -5
- package/components/SlashMenu.js +29 -29
- package/components/TeamRepositories.js +51 -51
- package/components/TeamWorkflow.js +6 -6
- package/components/UnlinkedMentions.js +20 -20
- package/components/Updates.js +3 -3
- package/components/Widgets.js +20 -20
- package/components/columns.js +17 -17
- package/components/editorPlugins.js +80 -80
- package/components/mathDiagrams.js +17 -17
- package/lib/boardMove.js +5 -5
- package/lib/issueList.js +58 -58
- package/lib/issueMenu.js +27 -27
- package/lib/knowledge.js +106 -106
- package/lib/views.js +9 -9
- package/package.json +2 -2
- package/pages/area.js +291 -0
- package/pages/areas.js +258 -287
- package/pages/decisions.js +21 -21
- package/pages/issues.js +52 -52
- package/pages/projects.js +125 -125
- package/pages/triage.js +12 -12
- package/routeTree.gen.js +186 -180
- package/routes/_workspace/agents/_slug2.js +11 -11
- package/routes/_workspace/agents/index2.js +10 -10
- package/routes/_workspace/areas/_area.js +7 -8
- package/routes/_workspace/areas/_area2.js +3 -290
- package/routes/_workspace/areas/_area3.js +7 -8
- package/routes/_workspace/docs/_doc2.js +230 -230
- package/routes/_workspace/docs/space2._space.js +27 -27
- package/routes/_workspace/issues/_identifier2.js +222 -224
- package/routes/_workspace/knowledge/_term2.js +43 -43
- package/routes/_workspace/knowledge/index.js +6 -6
- package/routes/_workspace/knowledge/index2.js +15 -15
- package/routes/_workspace/measures3.js +70 -72
- package/routes/_workspace/notifications2.js +150 -150
- package/routes/_workspace/people/_username2.js +10 -10
- package/routes/_workspace/projects/_projectId3.js +276 -276
- package/routes/_workspace/settings/audit-log3.js +136 -138
- package/routes/_workspace/settings/fields2.js +11 -11
- package/routes/_workspace/settings/github2.js +6 -6
- package/routes/_workspace/settings/groups2.js +26 -26
- package/routes/_workspace/settings/import2.js +398 -147
- package/routes/_workspace/settings/import3.js +7 -3
- package/routes/_workspace/settings/index2.js +6 -6
- package/routes/_workspace/settings/labels2.js +21 -21
- package/routes/_workspace/settings/members2.js +27 -27
- package/routes/_workspace/settings/notifications2.js +8 -8
- package/routes/_workspace/settings/parallelworks2.js +32 -32
- package/routes/_workspace/settings/roles2.js +24 -24
- package/routes/_workspace/settings/runners2.js +15 -15
- package/routes/_workspace/settings/sessions2.js +17 -17
- package/routes/_workspace/settings/slack2.js +7 -7
- package/routes/_workspace/settings/sso2.js +31 -31
- package/routes/_workspace/settings/teams2.js +25 -25
- package/routes/_workspace/settings/tokens2.js +12 -12
- package/routes/_workspace/settings/webhooks2.js +13 -13
- package/routes/_workspace/teams/_key/areas/_area.js +8 -0
- package/routes/_workspace/teams/_key/areas/_area2.js +4 -0
- package/routes/_workspace/teams/_key/areas/_area3.js +9 -0
- package/routes/_workspace/teams/_key/areas/index.js +6 -0
- package/routes/_workspace/teams/_key/areas/index2.js +4 -0
- package/routes/_workspace/teams/_key/{areas3.js → areas/index3.js} +2 -2
- package/routes/_workspace/teams/_key/cycles/_number2.js +27 -27
- package/routes/_workspace/teams/_key/cycles/index2.js +24 -24
- package/routes/_workspace/teams/_key/settings2.js +29 -29
- package/routes/_workspace2.js +368 -368
- package/routes/_workspace/teams/_key/areas.js +0 -6
- package/routes/_workspace/teams/_key/areas2.js +0 -4
package/components/Editor.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import { Callout as e } from "./callout.js";
|
|
2
|
+
import { DetailsContent as t, DetailsSummary as n, Toggle as r } from "./toggle.js";
|
|
3
|
+
import { Columns as i } from "./columns.js";
|
|
4
|
+
import { DateChip as a } from "./DateChip.js";
|
|
5
|
+
import { DocButton as o } from "./DocButton.js";
|
|
6
|
+
import { AttachmentFiles as s, AttachmentImage as c, DocLinkIcons as l, DocLinks as u, IssueMentions as d, KnowledgeTerms as f, LinkedIssues as p, PeopleMentions as m, TeamNames as h } from "./editorPlugins.js";
|
|
7
7
|
import { DocLinkPicker as g } from "./DocLinkPicker.js";
|
|
8
8
|
import { DocViewBlock as _ } from "./DocViewBlock.js";
|
|
9
9
|
import { IssueListBlock as ee } from "./IssueListBlock.js";
|
|
@@ -15,12 +15,12 @@ import { SubPages as S } from "./SubPages.js";
|
|
|
15
15
|
import { MarkdownTable as C } from "./table.js";
|
|
16
16
|
import { useEffect as w, useRef as T } from "react";
|
|
17
17
|
import { Fragment as E, jsx as D, jsxs as O } from "react/jsx-runtime";
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
18
|
+
import { CodeBlockLowlight as k } from "@tiptap/extension-code-block-lowlight";
|
|
19
|
+
import { TaskItem as A, TaskList as j } from "@tiptap/extension-list";
|
|
20
|
+
import { TableKit as M } from "@tiptap/extension-table";
|
|
21
|
+
import { Placeholder as N } from "@tiptap/extensions";
|
|
22
|
+
import { Markdown as P } from "@tiptap/markdown";
|
|
23
|
+
import { EditorContent as F, useEditor as I } from "@tiptap/react";
|
|
24
24
|
import L from "@tiptap/starter-kit";
|
|
25
25
|
import re from "highlight.js/lib/languages/bash";
|
|
26
26
|
import R from "highlight.js/lib/languages/css";
|
|
@@ -70,39 +70,39 @@ function Q({ editable: g = !0, placeholder: y = "", collaborative: x = !1 } = {}
|
|
|
70
70
|
...g && !x ? {} : { trailingNode: !1 },
|
|
71
71
|
...x ? { undoRedo: !1 } : {}
|
|
72
72
|
}),
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
73
|
+
k.configure({ lowlight: oe }),
|
|
74
|
+
e,
|
|
75
|
+
j,
|
|
76
|
+
A.configure({ nested: !0 }),
|
|
77
|
+
r,
|
|
78
78
|
S,
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
79
|
+
n,
|
|
80
|
+
t,
|
|
81
|
+
i,
|
|
82
|
+
M.configure({ table: !1 }),
|
|
83
83
|
C.configure({
|
|
84
84
|
resizable: !1,
|
|
85
85
|
allowTableNodeSelection: !1
|
|
86
86
|
}),
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
t,
|
|
93
|
-
e,
|
|
94
|
-
o,
|
|
95
|
-
s,
|
|
87
|
+
N.configure({ placeholder: y }),
|
|
88
|
+
P,
|
|
89
|
+
f,
|
|
90
|
+
u,
|
|
91
|
+
l,
|
|
96
92
|
c,
|
|
97
|
-
|
|
98
|
-
|
|
93
|
+
s,
|
|
94
|
+
p,
|
|
95
|
+
m,
|
|
99
96
|
h,
|
|
97
|
+
d,
|
|
98
|
+
_,
|
|
99
|
+
o,
|
|
100
100
|
v,
|
|
101
101
|
ne,
|
|
102
102
|
te,
|
|
103
103
|
b,
|
|
104
104
|
ee,
|
|
105
|
-
|
|
105
|
+
a
|
|
106
106
|
];
|
|
107
107
|
}
|
|
108
108
|
function $(e) {
|
|
@@ -135,7 +135,7 @@ function se({ value: e, onChange: t, onSubmit: n, onBlur: r, onFocus: i, placeho
|
|
|
135
135
|
};
|
|
136
136
|
let p = T(u);
|
|
137
137
|
p.current = u;
|
|
138
|
-
let m =
|
|
138
|
+
let m = I({
|
|
139
139
|
extensions: Q({
|
|
140
140
|
editable: o,
|
|
141
141
|
placeholder: a ?? ""
|
|
@@ -172,7 +172,7 @@ function se({ value: e, onChange: t, onSubmit: n, onBlur: r, onFocus: i, placeho
|
|
|
172
172
|
}, [m, o]);
|
|
173
173
|
let h = T(d);
|
|
174
174
|
return h.current = d, w(() => (h.current?.(m), () => h.current?.(null)), [m]), /* @__PURE__ */ O(E, { children: [
|
|
175
|
-
/* @__PURE__ */ D(
|
|
175
|
+
/* @__PURE__ */ D(F, { editor: m }),
|
|
176
176
|
o && /* @__PURE__ */ D(g, { editor: m }),
|
|
177
177
|
o && /* @__PURE__ */ D(x, {
|
|
178
178
|
editor: m,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { useNavigate as e } from "../lib/router.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
2
|
+
import { useFavorites as t } from "../lib/favorites.js";
|
|
3
|
+
import { docRef as n } from "../lib/docs.js";
|
|
4
|
+
import { CycleIcon as r, FileTextIcon as i, InboxIcon as a, LibraryIcon as o, ListViewIcon as s, ProjectIcon as c, StatusIcon as l, UserIcon as u } from "./icons.js";
|
|
5
|
+
import { EntityIcon as d } from "./EntityIcon.js";
|
|
6
|
+
import { DocIcon as f } from "./DocIcon.js";
|
|
7
|
+
import { teamPath as p } from "../lib/teamPaths.js";
|
|
8
8
|
import { menuDivider as m, useOpenMenu as h } from "@parallelworks/ui";
|
|
9
9
|
import { useState as g } from "react";
|
|
10
10
|
import { useTranslations as _ } from "use-intl";
|
|
@@ -13,120 +13,120 @@ import { MoreButton as y } from "@parallelworks/ui/list";
|
|
|
13
13
|
import { AppFrameNavGroup as b, AppFrameNavItem as x } from "@parallelworks/ui/app-frame";
|
|
14
14
|
// src/components/FavoritesNav.tsx
|
|
15
15
|
var S = (...e) => e.filter(Boolean).join(" ");
|
|
16
|
-
function C(e,
|
|
16
|
+
function C(e, t, m, h) {
|
|
17
17
|
switch (e.kind) {
|
|
18
18
|
case "issue": return {
|
|
19
|
-
href: `/${
|
|
19
|
+
href: `/${t}/issues/${e.issue?.identifier ?? ""}`,
|
|
20
20
|
label: e.issue ? `${e.issue.identifier} ${e.issue.title}` : h("issue"),
|
|
21
|
-
icon: e.issue ? /* @__PURE__ */ v(
|
|
21
|
+
icon: e.issue ? /* @__PURE__ */ v(l, { category: e.issue.status.category }) : null
|
|
22
22
|
};
|
|
23
23
|
case "team": return {
|
|
24
|
-
href:
|
|
24
|
+
href: p(t, e.team?.key ?? "", "issues"),
|
|
25
25
|
label: e.team?.name ?? h("team"),
|
|
26
|
-
icon: e.team ? /* @__PURE__ */ v(
|
|
26
|
+
icon: e.team ? /* @__PURE__ */ v(d, {
|
|
27
27
|
icon: e.team.icon,
|
|
28
28
|
color: e.team.color,
|
|
29
29
|
name: e.team.name
|
|
30
30
|
}) : null
|
|
31
31
|
};
|
|
32
32
|
case "doc": return {
|
|
33
|
-
href: `/${
|
|
33
|
+
href: `/${t}/docs/${e.doc ? n(e.doc) : ""}`,
|
|
34
34
|
label: e.doc?.title ?? h("doc"),
|
|
35
|
-
icon: /* @__PURE__ */ v(
|
|
35
|
+
icon: /* @__PURE__ */ v(f, {
|
|
36
36
|
icon: e.doc?.icon,
|
|
37
37
|
className: "size-4"
|
|
38
38
|
})
|
|
39
39
|
};
|
|
40
40
|
case "project": return {
|
|
41
|
-
href: `/${
|
|
41
|
+
href: `/${t}/projects/${e.plan?.ref ?? e.target}`,
|
|
42
42
|
label: e.plan?.name ?? h("project"),
|
|
43
|
-
icon: e.plan?.icon || e.plan?.color ? /* @__PURE__ */ v(
|
|
43
|
+
icon: e.plan?.icon || e.plan?.color ? /* @__PURE__ */ v(d, {
|
|
44
44
|
icon: e.plan.icon ?? "",
|
|
45
45
|
color: e.plan.color ?? "",
|
|
46
46
|
name: e.plan.name
|
|
47
|
-
}) : /* @__PURE__ */ v(
|
|
47
|
+
}) : /* @__PURE__ */ v(c, { className: "size-4" })
|
|
48
48
|
};
|
|
49
49
|
case "cycle": return {
|
|
50
|
-
href: `${
|
|
50
|
+
href: `${p(t, e.team?.key ?? "", "cycles")}/${e.plan?.ref ?? ""}`,
|
|
51
51
|
label: e.plan ? e.plan.name || h("cycleOf", {
|
|
52
52
|
team: e.team?.key ?? "",
|
|
53
53
|
number: e.plan.ref
|
|
54
54
|
}) : h("cycle"),
|
|
55
|
-
icon: /* @__PURE__ */ v(
|
|
55
|
+
icon: /* @__PURE__ */ v(r, { className: "size-4" })
|
|
56
56
|
};
|
|
57
57
|
case "view": return {
|
|
58
58
|
href: e.target,
|
|
59
59
|
label: e.label || h("view"),
|
|
60
|
-
icon: /* @__PURE__ */ v(
|
|
60
|
+
icon: /* @__PURE__ */ v(s, { className: "size-4" })
|
|
61
61
|
};
|
|
62
62
|
case "page": return e.target === "decisions" ? {
|
|
63
|
-
href: `/${
|
|
63
|
+
href: `/${t}/decisions`,
|
|
64
64
|
label: h("decisions"),
|
|
65
|
-
icon: /* @__PURE__ */ v(
|
|
65
|
+
icon: /* @__PURE__ */ v(a, { className: "size-4" })
|
|
66
66
|
} : e.target === "agents" ? {
|
|
67
|
-
href: `/${
|
|
67
|
+
href: `/${t}/agents`,
|
|
68
68
|
label: h("agents"),
|
|
69
|
-
icon: /* @__PURE__ */ v(
|
|
69
|
+
icon: /* @__PURE__ */ v(u, { className: "size-4" })
|
|
70
70
|
} : e.target === "projects" ? {
|
|
71
|
-
href: `/${
|
|
71
|
+
href: `/${t}/projects`,
|
|
72
72
|
label: h("projects"),
|
|
73
|
-
icon: /* @__PURE__ */ v(
|
|
73
|
+
icon: /* @__PURE__ */ v(c, { className: "size-4" })
|
|
74
74
|
} : e.target === "knowledge" ? {
|
|
75
|
-
href: `/${
|
|
75
|
+
href: `/${t}/knowledge`,
|
|
76
76
|
label: h("knowledge"),
|
|
77
|
-
icon: /* @__PURE__ */ v(
|
|
77
|
+
icon: /* @__PURE__ */ v(o, { className: "size-4" })
|
|
78
78
|
} : e.target === "docs" ? {
|
|
79
|
-
href: `/${
|
|
79
|
+
href: `/${t}/docs`,
|
|
80
80
|
label: h("docs"),
|
|
81
|
-
icon: /* @__PURE__ */ v(
|
|
81
|
+
icon: /* @__PURE__ */ v(i, { className: "size-4" })
|
|
82
82
|
} : e.target === "my-issues" ? {
|
|
83
|
-
href: `/${
|
|
83
|
+
href: `/${t}/issues?assignee=${m}`,
|
|
84
84
|
label: h("myIssues"),
|
|
85
|
-
icon: /* @__PURE__ */ v(
|
|
85
|
+
icon: /* @__PURE__ */ v(u, { className: "size-4" })
|
|
86
86
|
} : {
|
|
87
|
-
href: `/${
|
|
87
|
+
href: `/${t}/issues`,
|
|
88
88
|
label: h("issues"),
|
|
89
|
-
icon: /* @__PURE__ */ v(
|
|
89
|
+
icon: /* @__PURE__ */ v(s, { className: "size-4" })
|
|
90
90
|
};
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
|
-
function w({ workspace:
|
|
94
|
-
let { favorites:
|
|
95
|
-
if (
|
|
93
|
+
function w({ workspace: n, myUsername: r, currentHref: i }) {
|
|
94
|
+
let { favorites: a, remove: o, move: s } = t(n), c = h(), l = _("favorites"), u = _("common"), d = e(), [f, p] = g(null), [w, T] = g(null);
|
|
95
|
+
if (a.length === 0) return null;
|
|
96
96
|
let E = (e, t) => [
|
|
97
97
|
{
|
|
98
|
-
label:
|
|
98
|
+
label: u("open"),
|
|
99
99
|
onClick: () => d({ href: t })
|
|
100
100
|
},
|
|
101
101
|
{
|
|
102
|
-
label:
|
|
102
|
+
label: u("openInNewTab"),
|
|
103
103
|
href: t,
|
|
104
104
|
target: "_blank"
|
|
105
105
|
},
|
|
106
106
|
m,
|
|
107
107
|
{
|
|
108
|
-
label:
|
|
109
|
-
onClick: () =>
|
|
108
|
+
label: l("remove"),
|
|
109
|
+
onClick: () => o(e.id)
|
|
110
110
|
}
|
|
111
111
|
], D = (e) => {
|
|
112
112
|
if (!f || f === e) return;
|
|
113
|
-
let t =
|
|
114
|
-
|
|
113
|
+
let t = a.filter((e) => e.id !== f), n = t.findIndex((t) => t.id === e), [r, i] = a.findIndex((e) => e.id === f) < a.findIndex((t) => t.id === e) ? [t[n], t[n + 1]] : [t[n - 1], t[n]];
|
|
114
|
+
s({
|
|
115
115
|
id: f,
|
|
116
116
|
...r && { after: r.id },
|
|
117
|
-
...
|
|
117
|
+
...i && { before: i.id }
|
|
118
118
|
});
|
|
119
119
|
};
|
|
120
120
|
return /* @__PURE__ */ v(b, {
|
|
121
|
-
label:
|
|
121
|
+
label: l("title"),
|
|
122
122
|
collapsible: !1,
|
|
123
|
-
children:
|
|
124
|
-
let
|
|
123
|
+
children: a.map((e) => {
|
|
124
|
+
let t = C(e, n, r, l);
|
|
125
125
|
return /* @__PURE__ */ v(x, {
|
|
126
|
-
label:
|
|
127
|
-
icon:
|
|
128
|
-
href:
|
|
129
|
-
selected:
|
|
126
|
+
label: t.label,
|
|
127
|
+
icon: t.icon,
|
|
128
|
+
href: t.href,
|
|
129
|
+
selected: t.href === i,
|
|
130
130
|
draggable: !0,
|
|
131
131
|
onDragStart: (t) => {
|
|
132
132
|
p(e.id), t.dataTransfer.effectAllowed = "move";
|
|
@@ -141,11 +141,11 @@ function w({ workspace: t, myUsername: n, currentHref: r }) {
|
|
|
141
141
|
onDragEnd: () => {
|
|
142
142
|
p(null), T(null);
|
|
143
143
|
},
|
|
144
|
-
onContextMenu: (
|
|
144
|
+
onContextMenu: (n) => c(n, E(e, t.href)),
|
|
145
145
|
className: S(f === e.id && "opacity-40", w === e.id && f !== e.id && "ring-1 ring-primary/60"),
|
|
146
146
|
action: /* @__PURE__ */ v(y, {
|
|
147
|
-
items: () => E(e,
|
|
148
|
-
label:
|
|
147
|
+
items: () => E(e, t.href),
|
|
148
|
+
label: u("moreActionsFor", { name: t.label })
|
|
149
149
|
})
|
|
150
150
|
}, e.id);
|
|
151
151
|
})
|
package/components/GitHub.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { basePath as e } from "../lib/base.js";
|
|
2
2
|
import { api as t, unwrap as n } from "../api/client.js";
|
|
3
3
|
import { githubAccountQuery as r, githubSettingsQuery as i, teamsQuery as a } from "../api/queries.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { CheckIcon as o, CodeHostIcon as s } from "./icons.js";
|
|
5
|
+
import { useConfirm as c } from "../lib/confirm.js";
|
|
6
6
|
import { cardList as l, useFormError as u } from "./settings.js";
|
|
7
7
|
import { ConnectionCard as d } from "./ConnectionCard.js";
|
|
8
8
|
import { TeamName as f } from "./TeamName.js";
|
|
@@ -44,15 +44,15 @@ async function I(e) {
|
|
|
44
44
|
}
|
|
45
45
|
var L = () => window.location.pathname.slice(e.length) || "/";
|
|
46
46
|
function R() {
|
|
47
|
-
let { data: e } = M(r), i = T("github"), a = j(),
|
|
47
|
+
let { data: e } = M(r), i = T("github"), a = j(), o = u(), l = P(), f = k({
|
|
48
48
|
mutationFn: () => I(async () => n(await t.POST("/api/v1/me/github", { body: { returnTo: L() } }))),
|
|
49
|
-
onMutate:
|
|
50
|
-
onError:
|
|
49
|
+
onMutate: o.clear,
|
|
50
|
+
onError: o.set
|
|
51
51
|
}), m = k({
|
|
52
52
|
mutationFn: async () => n(await t.DELETE("/api/v1/me/github")),
|
|
53
|
-
onMutate:
|
|
53
|
+
onMutate: o.clear,
|
|
54
54
|
onSettled: () => a.invalidateQueries({ queryKey: r.queryKey })
|
|
55
|
-
}), { confirm: h, dialog: g } =
|
|
55
|
+
}), { confirm: h, dialog: g } = c();
|
|
56
56
|
if (!e.enabled) return null;
|
|
57
57
|
let _ = e.keepsTokens ? i("accountDescriptionBothWays") : i("accountDescription"), y = e.login ? /* @__PURE__ */ D(z, {
|
|
58
58
|
login: e.login,
|
|
@@ -62,7 +62,7 @@ function R() {
|
|
|
62
62
|
children: i("notLinkedLabel")
|
|
63
63
|
});
|
|
64
64
|
if (e.linkedByHost) return /* @__PURE__ */ D(d, {
|
|
65
|
-
icon: /* @__PURE__ */ D(
|
|
65
|
+
icon: /* @__PURE__ */ D(s, { className: "size-7" }),
|
|
66
66
|
name: i("accountTitle"),
|
|
67
67
|
status: /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ D("span", {
|
|
68
68
|
className: "block",
|
|
@@ -79,10 +79,10 @@ function R() {
|
|
|
79
79
|
});
|
|
80
80
|
let S = !!e.login && e.keepsTokens && !e.actsAsYou;
|
|
81
81
|
return /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ D(d, {
|
|
82
|
-
icon: /* @__PURE__ */ D(
|
|
82
|
+
icon: /* @__PURE__ */ D(s, { className: "size-7" }),
|
|
83
83
|
name: i("accountTitle"),
|
|
84
84
|
status: y,
|
|
85
|
-
error:
|
|
85
|
+
error: o.error,
|
|
86
86
|
action: e.login ? /* @__PURE__ */ D(p, {
|
|
87
87
|
variant: "outline",
|
|
88
88
|
type: "button",
|
|
@@ -167,8 +167,8 @@ function B({ workspace: e }) {
|
|
|
167
167
|
}) : null;
|
|
168
168
|
}
|
|
169
169
|
var V = "", H = 2e3;
|
|
170
|
-
function U({ workspace: e, repository: r, teamName:
|
|
171
|
-
let d = T("github"), h = j(), _ = u(), { confirm: v, dialog: y } =
|
|
170
|
+
function U({ workspace: e, repository: r, teamName: s, children: l }) {
|
|
171
|
+
let d = T("github"), h = j(), _ = u(), { confirm: v, dialog: y } = c(), { data: b } = A(i(e)), { data: C = [] } = A(a(e)), w = (e) => C.find((t) => t.key === e) ?? {
|
|
172
172
|
icon: "",
|
|
173
173
|
name: e
|
|
174
174
|
}, M = (e) => w(e).name, N = (e) => () => /* @__PURE__ */ D(f, { team: w(e) }), P = (b?.repositories ?? []).filter((e) => e.id === r.id && e.team !== r.team), F = P.find((e) => e.syncMode), [I, L] = S(!1);
|
|
@@ -224,12 +224,12 @@ function U({ workspace: e, repository: r, teamName: c, children: l }) {
|
|
|
224
224
|
repository: r.fullName
|
|
225
225
|
}),
|
|
226
226
|
description: /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ D("p", { children: d.rich("takeOverIntro", {
|
|
227
|
-
teamName:
|
|
227
|
+
teamName: s,
|
|
228
228
|
team: N(r.team)
|
|
229
229
|
}) }), /* @__PURE__ */ O("ul", {
|
|
230
230
|
className: "mt-2 list-disc space-y-1 pl-5",
|
|
231
231
|
children: [/* @__PURE__ */ D("li", { children: d.rich("takeOverNew", {
|
|
232
|
-
teamName:
|
|
232
|
+
teamName: s,
|
|
233
233
|
team: N(r.team)
|
|
234
234
|
}) }), F.imported > 0 && /* @__PURE__ */ D("li", { children: d.rich("takeOverKeeps", {
|
|
235
235
|
fromName: t,
|
|
@@ -237,7 +237,7 @@ function U({ workspace: e, repository: r, teamName: c, children: l }) {
|
|
|
237
237
|
count: F.imported
|
|
238
238
|
}) })]
|
|
239
239
|
})] }),
|
|
240
|
-
confirmLabel: d("takeOver", { team:
|
|
240
|
+
confirmLabel: d("takeOver", { team: s }),
|
|
241
241
|
destructive: !1,
|
|
242
242
|
onConfirm: () => B.mutateAsync({
|
|
243
243
|
syncMode: e,
|
|
@@ -260,7 +260,7 @@ function U({ workspace: e, repository: r, teamName: c, children: l }) {
|
|
|
260
260
|
role: "status",
|
|
261
261
|
className: "flex items-center gap-1 text-xs text-muted-foreground",
|
|
262
262
|
children: [
|
|
263
|
-
/* @__PURE__ */ D(
|
|
263
|
+
/* @__PURE__ */ D(o, { className: "size-3.5" }),
|
|
264
264
|
" ",
|
|
265
265
|
d("saved")
|
|
266
266
|
]
|
|
@@ -268,7 +268,7 @@ function U({ workspace: e, repository: r, teamName: c, children: l }) {
|
|
|
268
268
|
/* @__PURE__ */ D(g, {
|
|
269
269
|
"aria-label": d("modeFor", {
|
|
270
270
|
repository: r.fullName,
|
|
271
|
-
team:
|
|
271
|
+
team: s
|
|
272
272
|
}),
|
|
273
273
|
value: K,
|
|
274
274
|
disabled: B.isPending,
|
|
@@ -411,7 +411,7 @@ function q({ links: e }) {
|
|
|
411
411
|
target: "_blank",
|
|
412
412
|
rel: "noreferrer",
|
|
413
413
|
className: "inline-flex h-6 min-w-0 items-center gap-1.5 rounded-md border border-border px-1.5 text-xs text-muted-foreground hover:bg-muted hover:text-foreground",
|
|
414
|
-
children: [/* @__PURE__ */ D(
|
|
414
|
+
children: [/* @__PURE__ */ D(s, { className: "size-3.5" }), /* @__PURE__ */ D("span", {
|
|
415
415
|
className: "truncate",
|
|
416
416
|
children: J(e.url)
|
|
417
417
|
})]
|
package/components/Graph.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Link as e, useNavigate as t } from "../lib/router.js";
|
|
2
2
|
import { docGraphQuery as n, knowledgeGraphQuery as r, teamsQuery as i, workspaceQuery as a } from "../api/queries.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { docRef as o } from "../lib/docs.js";
|
|
4
|
+
import { FileTextIcon as s, LibraryIcon as c, ListViewIcon as l } from "./icons.js";
|
|
5
5
|
import { useTermRefs as u } from "../lib/knowledge.js";
|
|
6
6
|
import { IconButton as d, SegmentedControl as f, Tooltip as p } from "@parallelworks/ui";
|
|
7
7
|
import { useMemo as m, useState as h } from "react";
|
|
@@ -14,9 +14,9 @@ import { Handle as T, MarkerType as E, Position as D, ReactFlow as O, ReactFlowP
|
|
|
14
14
|
import "@xyflow/react/dist/style.css";
|
|
15
15
|
// src/components/Graph.tsx
|
|
16
16
|
var j = 196, M = 48, N = 22, P = (e) => e.kind === "doc" ? "bg-primary" : e.kind === "issue" ? e.status === "completed" || e.status === "canceled" ? "bg-muted-foreground/50" : "bg-primary" : e.status === "decided" ? "bg-success" : e.status === "proposed" ? "bg-warning" : "bg-muted-foreground/50", F = {
|
|
17
|
-
doc:
|
|
18
|
-
issue:
|
|
19
|
-
entry:
|
|
17
|
+
doc: s,
|
|
18
|
+
issue: l,
|
|
19
|
+
entry: c
|
|
20
20
|
}, I = "!size-1 !min-h-0 !min-w-0 !border-0 !bg-transparent";
|
|
21
21
|
function L({ data: e }) {
|
|
22
22
|
let { node: t, root: n, kind: r, vertical: i } = e, a = F[t.kind];
|
|
@@ -179,7 +179,7 @@ function V(e) {
|
|
|
179
179
|
to: "/$workspace/docs/$doc",
|
|
180
180
|
params: {
|
|
181
181
|
workspace: e,
|
|
182
|
-
doc:
|
|
182
|
+
doc: o({
|
|
183
183
|
slug: t.slug ?? "",
|
|
184
184
|
key: t.ref ?? ""
|
|
185
185
|
})
|
|
@@ -322,12 +322,12 @@ function G({ workspace: e, nodes: t, edges: n, width: r, rooted: o, height: s })
|
|
|
322
322
|
});
|
|
323
323
|
}
|
|
324
324
|
function K({ workspace: t, nodes: n, label: r }) {
|
|
325
|
-
let i = u(t), a = g("graph"),
|
|
325
|
+
let i = u(t), a = g("graph"), s = H(), c = "flex items-baseline gap-2 rounded-md px-2 py-1 text-sm hover:bg-muted";
|
|
326
326
|
return /* @__PURE__ */ v("ul", {
|
|
327
327
|
className: "mt-3 space-y-px",
|
|
328
328
|
"aria-label": r,
|
|
329
329
|
children: n.map((n) => {
|
|
330
|
-
let r =
|
|
330
|
+
let r = s(n), l = /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v("span", {
|
|
331
331
|
className: "min-w-0 flex-1 truncate",
|
|
332
332
|
children: n.title
|
|
333
333
|
}), /* @__PURE__ */ v("span", {
|
|
@@ -338,29 +338,29 @@ function K({ workspace: t, nodes: n, label: r }) {
|
|
|
338
338
|
to: "/$workspace/docs/$doc",
|
|
339
339
|
params: {
|
|
340
340
|
workspace: t,
|
|
341
|
-
doc:
|
|
341
|
+
doc: o({
|
|
342
342
|
slug: n.slug ?? "",
|
|
343
343
|
key: n.ref ?? ""
|
|
344
344
|
})
|
|
345
345
|
},
|
|
346
|
-
className:
|
|
347
|
-
children:
|
|
346
|
+
className: c,
|
|
347
|
+
children: l
|
|
348
348
|
}) : n.kind === "issue" ? /* @__PURE__ */ v(e, {
|
|
349
349
|
to: "/$workspace/issues/$identifier",
|
|
350
350
|
params: {
|
|
351
351
|
workspace: t,
|
|
352
352
|
identifier: n.ref ?? ""
|
|
353
353
|
},
|
|
354
|
-
className:
|
|
355
|
-
children:
|
|
354
|
+
className: c,
|
|
355
|
+
children: l
|
|
356
356
|
}) : /* @__PURE__ */ v(e, {
|
|
357
357
|
to: "/$workspace/knowledge/$term",
|
|
358
358
|
params: {
|
|
359
359
|
workspace: t,
|
|
360
360
|
term: i(n.id)
|
|
361
361
|
},
|
|
362
|
-
className:
|
|
363
|
-
children:
|
|
362
|
+
className: c,
|
|
363
|
+
children: l
|
|
364
364
|
}) }, n.id);
|
|
365
365
|
})
|
|
366
366
|
});
|
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { useHostPanel as e } from "../lib/hostPanel.js";
|
|
2
|
+
import { appLink as t } from "../lib/appLink.js";
|
|
3
3
|
import { Tooltip as n } from "@parallelworks/ui";
|
|
4
4
|
import { jsx as r } from "react/jsx-runtime";
|
|
5
5
|
// src/components/HostActions.tsx
|
|
6
6
|
var i = "flex size-8 items-center justify-center rounded-md text-muted-foreground hover:bg-muted hover:text-foreground";
|
|
7
7
|
function a({ className: a = "" }) {
|
|
8
|
-
let { actions: s, state: c, toggle: l } =
|
|
8
|
+
let { actions: s, state: c, toggle: l } = e();
|
|
9
9
|
return s.length === 0 ? null : /* @__PURE__ */ r("div", {
|
|
10
10
|
className: `flex items-center ${a}`,
|
|
11
|
-
children: s.map((
|
|
12
|
-
if (
|
|
13
|
-
let
|
|
11
|
+
children: s.map((e) => {
|
|
12
|
+
if (e.panel) {
|
|
13
|
+
let t = c?.id === e.id && c.open;
|
|
14
14
|
return /* @__PURE__ */ r(n, {
|
|
15
|
-
content:
|
|
15
|
+
content: e.label,
|
|
16
16
|
side: "bottom",
|
|
17
17
|
children: /* @__PURE__ */ r("button", {
|
|
18
18
|
type: "button",
|
|
19
|
-
"aria-label":
|
|
20
|
-
"aria-pressed":
|
|
21
|
-
onClick: () => l(
|
|
22
|
-
className: `${i} ${
|
|
23
|
-
children: /* @__PURE__ */ r(o, { action:
|
|
19
|
+
"aria-label": e.label,
|
|
20
|
+
"aria-pressed": t,
|
|
21
|
+
onClick: () => l(e),
|
|
22
|
+
className: `${i} ${t ? "bg-muted text-foreground" : ""}`,
|
|
23
|
+
children: /* @__PURE__ */ r(o, { action: e })
|
|
24
24
|
})
|
|
25
|
-
},
|
|
25
|
+
}, e.id);
|
|
26
26
|
}
|
|
27
|
-
let a = e
|
|
27
|
+
let a = t(e.url);
|
|
28
28
|
return a ? /* @__PURE__ */ r(n, {
|
|
29
|
-
content:
|
|
29
|
+
content: e.label,
|
|
30
30
|
side: "bottom",
|
|
31
31
|
children: /* @__PURE__ */ r("a", {
|
|
32
32
|
href: a,
|
|
33
|
-
"aria-label":
|
|
33
|
+
"aria-label": e.label,
|
|
34
34
|
className: i,
|
|
35
|
-
children: /* @__PURE__ */ r(o, { action:
|
|
35
|
+
children: /* @__PURE__ */ r(o, { action: e })
|
|
36
36
|
})
|
|
37
|
-
},
|
|
37
|
+
}, e.id) : null;
|
|
38
38
|
})
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
|
-
function o({ action:
|
|
42
|
-
let n =
|
|
41
|
+
function o({ action: e }) {
|
|
42
|
+
let n = e.iconUrl ? t(e.iconUrl) : void 0;
|
|
43
43
|
return n ? /* @__PURE__ */ r("img", {
|
|
44
44
|
src: n,
|
|
45
45
|
alt: "",
|
|
@@ -47,7 +47,7 @@ function o({ action: t }) {
|
|
|
47
47
|
}) : /* @__PURE__ */ r("span", {
|
|
48
48
|
"aria-hidden": "true",
|
|
49
49
|
className: "text-xs font-semibold",
|
|
50
|
-
children:
|
|
50
|
+
children: e.label.trim().charAt(0).toUpperCase()
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
53
|
export { a as HostActions };
|
package/components/HostPanel.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { useHostPanel as e } from "../lib/hostPanel.js";
|
|
2
|
+
import { ExpandIcon as t, MinimizeIcon as n, ShrinkIcon as r } from "./icons.js";
|
|
3
|
+
import { appLink as i } from "../lib/appLink.js";
|
|
4
4
|
import { IconButton as a } from "@parallelworks/ui";
|
|
5
5
|
import { useRef as o, useState as s } from "react";
|
|
6
6
|
import { useTranslations as c } from "use-intl";
|
|
7
7
|
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
8
8
|
// src/components/HostPanel.tsx
|
|
9
9
|
function d() {
|
|
10
|
-
let d = c("workspace"), { actions: f, state: p, close: m, resize: h, maximize: g } =
|
|
10
|
+
let d = c("workspace"), { actions: f, state: p, close: m, resize: h, maximize: g } = e(), [_, v] = s(!1), y = o(null), b = p && f.find((e) => e.id === p.id), x = p && i(p.url);
|
|
11
11
|
if (!p || !b || !x) return null;
|
|
12
12
|
let S = () => Math.max(160, window.innerHeight * .85);
|
|
13
13
|
return /* @__PURE__ */ u("section", {
|
|
@@ -49,14 +49,14 @@ function d() {
|
|
|
49
49
|
/* @__PURE__ */ l(a, {
|
|
50
50
|
size: "sm",
|
|
51
51
|
variant: "ghost",
|
|
52
|
-
icon: p.maximized ? /* @__PURE__ */ l(
|
|
52
|
+
icon: p.maximized ? /* @__PURE__ */ l(r, { className: "size-3.5" }) : /* @__PURE__ */ l(t, { className: "size-3.5" }),
|
|
53
53
|
label: p.maximized ? d("restorePanel") : d("maximizePanel"),
|
|
54
54
|
onClick: () => g(!p.maximized)
|
|
55
55
|
}),
|
|
56
56
|
/* @__PURE__ */ l(a, {
|
|
57
57
|
size: "sm",
|
|
58
58
|
variant: "ghost",
|
|
59
|
-
icon: /* @__PURE__ */ l(
|
|
59
|
+
icon: /* @__PURE__ */ l(n, { className: "size-3.5" }),
|
|
60
60
|
label: d("minimizePanel"),
|
|
61
61
|
onClick: m
|
|
62
62
|
})
|