@parallelworks/tandem-web 0.171.1 → 0.171.3
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 +5 -2
- package/_virtual/_virtual_i18n/es/common.js +5 -2
- package/_virtual/_virtual_i18n/ja/common.js +5 -2
- package/_virtual/_virtual_i18n/ko/common.js +5 -2
- package/_virtual/_virtual_i18n/zh/common.js +5 -2
- package/components/AccessGrants.js +6 -6
- package/components/ActivityTimeline.js +60 -60
- package/components/ActorAvatar.js +4 -4
- package/components/ActorLink.js +34 -0
- package/components/AgentWork.js +494 -494
- package/components/AppLauncher.js +7 -7
- package/components/AreaLink.js +13 -13
- package/components/AreaTiles.js +13 -13
- package/components/AreaWork.js +22 -22
- package/components/Attachments.js +73 -69
- package/components/BlockHandle.js +3 -3
- package/components/BugRotation.js +8 -8
- package/components/CodeHostSettings.js +121 -87
- package/components/CollabEditor.js +13 -13
- package/components/CommandPalette.js +206 -206
- package/components/CustomFields.js +95 -95
- package/components/CustomerRequests.js +11 -11
- package/components/DashboardPanel.js +201 -164
- package/components/DateChip.js +21 -21
- package/components/DocHistory.js +14 -14
- package/components/DocIcon.js +4 -4
- package/components/DocIconPicker.js +4 -4
- package/components/DocLinkPicker.js +22 -22
- package/components/DocLook.js +16 -16
- package/components/DocProperties.js +81 -81
- package/components/DocTable.js +53 -53
- package/components/DocsTree.js +179 -179
- package/components/Editor.js +69 -69
- package/components/FavoritesNav.js +78 -78
- package/components/GitHub.js +87 -87
- package/components/Graph.js +14 -14
- package/components/HostActions.js +21 -21
- package/components/HostPanel.js +6 -6
- package/components/HoverCards.js +74 -74
- package/components/IssueBoard.js +13 -10
- package/components/IssueBreakdown.js +31 -31
- package/components/IssueCode.js +19 -19
- package/components/IssueEvent.js +97 -92
- package/components/IssueFilters.js +39 -39
- package/components/IssueGroup.js +16 -16
- package/components/IssueImport.js +13 -13
- package/components/IssueInsights.js +20 -20
- package/components/IssueListBlock.js +81 -81
- package/components/IssueRelations.js +34 -34
- package/components/IssueRow.js +31 -31
- package/components/IssueSentry.js +36 -34
- package/components/IssueTemplates.js +23 -23
- package/components/IssueTypes.js +40 -40
- package/components/MarkdownTransfer.js +10 -10
- package/components/MentionPicker.js +19 -19
- package/components/NewIssueDialog.js +53 -53
- package/components/NewProjectDialog.js +82 -82
- package/components/PersonActivity.js +13 -13
- package/components/PersonHoverCard.js +44 -44
- package/components/Planning.js +16 -16
- package/components/Reports.js +8 -8
- package/components/SettingsNav.js +15 -15
- package/components/ShareDialog.js +8 -8
- package/components/SharedViewer.js +23 -23
- package/components/SlashMenu.js +26 -26
- package/components/SubPages.js +10 -10
- package/components/TeamForm.js +9 -9
- package/components/TeamRepositories.js +21 -21
- package/components/TeamWorkflow.js +6 -6
- package/components/UnlinkedMentions.js +29 -29
- package/components/Updates.js +8 -8
- package/components/Widgets.js +99 -97
- package/components/WorkCounts.js +12 -12
- package/components/cycleCrumb.js +8 -8
- package/components/editorPlugins.js +101 -101
- package/components/settings.js +6 -6
- package/components/video.js +7 -7
- package/hostedApp.js +24 -24
- package/index.js +18 -18
- package/lib/assignees.js +3 -3
- package/lib/attachments.js +12 -12
- package/lib/boardMove.js +27 -27
- package/lib/collab.js +1 -1
- package/lib/docs.js +115 -115
- package/lib/githubLink.js +7 -7
- package/lib/issueList.js +51 -51
- package/lib/issueMenu.js +117 -117
- package/lib/knowledge.js +134 -134
- package/lib/live.js +38 -38
- package/lib/notifications.js +47 -47
- package/lib/triageSeen.js +2 -2
- package/lib/views.js +31 -31
- package/package.json +24 -24
- package/pages/area.js +64 -64
- package/pages/areas.js +199 -199
- package/pages/decisions.js +51 -51
- package/pages/issues.js +120 -120
- package/pages/projects.js +238 -238
- package/pages/triage.js +202 -212
- package/routes/_workspace/agents/_slug2.js +127 -127
- package/routes/_workspace/agents/index2.js +22 -22
- package/routes/_workspace/dashboards/_dashboardId2.js +84 -84
- package/routes/_workspace/dashboards/index2.js +34 -34
- package/routes/_workspace/docs/_doc2.js +267 -267
- package/routes/_workspace/docs/space2._space.js +31 -31
- package/routes/_workspace/docs2.js +4 -4
- package/routes/_workspace/graph2.js +11 -11
- package/routes/_workspace/graph3.js +11 -11
- package/routes/_workspace/issues/_identifier2.js +519 -522
- package/routes/_workspace/issues/index.js +13 -13
- package/routes/_workspace/knowledge/_term2.js +148 -146
- package/routes/_workspace/knowledge/_term3.js +4 -4
- package/routes/_workspace/knowledge/index.js +12 -12
- package/routes/_workspace/knowledge/index2.js +117 -115
- package/routes/_workspace/measures2.js +8 -8
- package/routes/_workspace/measures3.js +29 -29
- package/routes/_workspace/notifications2.js +263 -263
- package/routes/_workspace/people/_username.js +10 -10
- package/routes/_workspace/people/_username2.js +41 -41
- package/routes/_workspace/projects/_projectId3.js +303 -303
- package/routes/_workspace/projects/_projectId4.js +4 -4
- package/routes/_workspace/projects/_projectId_3.milestones._milestoneId.js +28 -28
- package/routes/_workspace/projects/_projectId_4.milestones._milestoneId.js +4 -4
- package/routes/_workspace/projects/index.js +8 -8
- package/routes/_workspace/settings/account2.js +8 -8
- package/routes/_workspace/settings/audit-log2.js +8 -8
- package/routes/_workspace/settings/audit-log3.js +155 -155
- package/routes/_workspace/settings/connections2.js +4 -4
- package/routes/_workspace/settings/fields2.js +5 -5
- package/routes/_workspace/settings/github2.js +11 -11
- package/routes/_workspace/settings/gitlab2.js +5 -5
- package/routes/_workspace/settings/groups2.js +52 -52
- package/routes/_workspace/settings/import2.js +39 -39
- package/routes/_workspace/settings/index2.js +5 -5
- package/routes/_workspace/settings/intercom2.js +11 -11
- package/routes/_workspace/settings/labels2.js +33 -33
- package/routes/_workspace/settings/members2.js +81 -81
- package/routes/_workspace/settings/notifications2.js +46 -46
- package/routes/_workspace/settings/parallelworks2.js +20 -20
- package/routes/_workspace/settings/roles2.js +41 -41
- package/routes/_workspace/settings/runners2.js +15 -15
- package/routes/_workspace/settings/sentry2.js +15 -15
- package/routes/_workspace/settings/sessions2.js +9 -9
- package/routes/_workspace/settings/sessions3.js +4 -4
- package/routes/_workspace/settings/slack2.js +12 -12
- package/routes/_workspace/settings/sso2.js +37 -37
- package/routes/_workspace/settings/sso3.js +7 -7
- package/routes/_workspace/settings/teams2.js +29 -29
- package/routes/_workspace/settings/tokens2.js +32 -32
- package/routes/_workspace/settings/tokens3.js +4 -4
- package/routes/_workspace/settings/webhooks2.js +41 -41
- package/routes/_workspace/settings/zendesk2.js +11 -11
- package/routes/_workspace/teams/_key/cycles/_number2.js +33 -33
- package/routes/_workspace/teams/_key/cycles/_number3.js +7 -7
- package/routes/_workspace/teams/_key/cycles/index2.js +37 -37
- package/routes/_workspace/teams/_key/issues.js +10 -10
- package/routes/_workspace/teams/_key/projects.js +6 -6
- package/routes/_workspace/teams/_key/settings2.js +396 -396
- package/routes/_workspace2.js +308 -308
- package/routes/_workspace3.js +8 -8
- package/routes/device2.js +4 -4
- package/routes/device3.js +4 -4
- package/routes/docs/_tag/_endpoint2.js +3 -3
- package/routes/docs/_tag/index2.js +3 -3
- package/routes/docs/route2.js +7 -7
- package/routes/index2.js +5 -5
- package/routes/login2.js +10 -10
- package/routes/new2.js +12 -12
- package/routes/new3.js +5 -5
- package/routes/request2._token.js +6 -6
- package/routes/share2._secret.js +4 -4
|
@@ -1,187 +1,221 @@
|
|
|
1
1
|
import { api as e, unwrap as t } from "../api/client.js";
|
|
2
2
|
import { codeHostAccountsQuery as n, codeHostQuery as r, meQuery as i } from "../api/queries.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { useConfirm as a } from "../lib/confirm.js";
|
|
4
|
+
import { externalUrl as o } from "../lib/externalUrl.js";
|
|
5
5
|
import { usePeople as s } from "../lib/people.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { Avatar as f, Button as p, Card as m, ErrorText as h, Section as g, Select as _, SettingsCard as v, StatusLabel as y } from "@parallelworks/ui";
|
|
10
|
-
import { useState as
|
|
11
|
-
import { useTranslations as
|
|
12
|
-
import { Fragment as
|
|
13
|
-
import { useMutation as
|
|
6
|
+
import { ConnectionCard as c, ConnectionPanel as l } from "./ConnectionCard.js";
|
|
7
|
+
import { CodeHostIcon as u } from "./icons.js";
|
|
8
|
+
import { useFormError as d } from "./settings.js";
|
|
9
|
+
import { Avatar as f, Button as p, Card as m, ErrorText as h, Section as g, Select as _, SettingsCard as v, StatusLabel as y, Switch as b } from "@parallelworks/ui";
|
|
10
|
+
import { useState as x } from "react";
|
|
11
|
+
import { useTranslations as S } from "use-intl";
|
|
12
|
+
import { Fragment as C, jsx as w, jsxs as T } from "react/jsx-runtime";
|
|
13
|
+
import { useMutation as E, useQueryClient as D, useSuspenseQuery as O } from "@tanstack/react-query";
|
|
14
14
|
// src/components/CodeHostSettings.tsx
|
|
15
|
-
function
|
|
16
|
-
let
|
|
15
|
+
function k({ workspace: n }) {
|
|
16
|
+
let o = S("code"), { data: s } = O(i), { data: c } = O(r(n)), l = D(), u = d(), { confirm: f, dialog: m } = a(), v = E({
|
|
17
17
|
mutationFn: async (r) => t(await e.DELETE("/api/v1/workspaces/{workspace}/code-host/connections/{account}", { params: { path: {
|
|
18
18
|
workspace: n,
|
|
19
19
|
account: r
|
|
20
20
|
} } })),
|
|
21
|
-
onMutate:
|
|
21
|
+
onMutate: u.clear,
|
|
22
22
|
onSettled: () => {
|
|
23
|
-
|
|
23
|
+
l.invalidateQueries({ queryKey: r(n).queryKey }), l.invalidateQueries({ queryKey: [
|
|
24
24
|
"workspace",
|
|
25
25
|
n,
|
|
26
26
|
"teams"
|
|
27
27
|
] });
|
|
28
28
|
}
|
|
29
29
|
}), y = (e) => f({
|
|
30
|
-
title:
|
|
31
|
-
description:
|
|
32
|
-
confirmLabel:
|
|
30
|
+
title: o("disconnectConfirm", { account: e }),
|
|
31
|
+
description: o("disconnectDetail"),
|
|
32
|
+
confirmLabel: o("disconnect"),
|
|
33
33
|
onConfirm: () => v.mutateAsync(e)
|
|
34
|
-
}), [
|
|
34
|
+
}), [b, C] = x(""), k = c.connections.filter((e) => e.connectedBy === s?.user.username), A = k[0];
|
|
35
35
|
if (!A) return null;
|
|
36
|
-
let j = k.some((e) => e.account ===
|
|
37
|
-
return /* @__PURE__ */
|
|
36
|
+
let j = k.some((e) => e.account === b) ? b : A.account;
|
|
37
|
+
return /* @__PURE__ */ T(g, {
|
|
38
38
|
variant: "card",
|
|
39
39
|
tone: "error",
|
|
40
40
|
collapsible: !1,
|
|
41
41
|
headingLevel: 2,
|
|
42
|
-
title:
|
|
43
|
-
description:
|
|
42
|
+
title: o("dangerZone"),
|
|
43
|
+
description: o("disconnectDetail"),
|
|
44
44
|
className: "mt-10",
|
|
45
45
|
children: [
|
|
46
|
-
/* @__PURE__ */
|
|
46
|
+
/* @__PURE__ */ T("div", {
|
|
47
47
|
className: "flex flex-wrap items-center gap-2",
|
|
48
|
-
children: [/* @__PURE__ */
|
|
48
|
+
children: [/* @__PURE__ */ w("div", {
|
|
49
49
|
className: "w-56 max-w-full",
|
|
50
|
-
children: /* @__PURE__ */
|
|
51
|
-
"aria-label":
|
|
50
|
+
children: /* @__PURE__ */ w(_, {
|
|
51
|
+
"aria-label": o("disconnectWhich"),
|
|
52
52
|
value: j,
|
|
53
|
-
onValueChange: (e) => e &&
|
|
53
|
+
onValueChange: (e) => e && C(e),
|
|
54
54
|
items: k.map((e) => ({
|
|
55
55
|
value: e.account,
|
|
56
56
|
label: e.account
|
|
57
57
|
}))
|
|
58
58
|
})
|
|
59
|
-
}), /* @__PURE__ */
|
|
59
|
+
}), /* @__PURE__ */ w(p, {
|
|
60
60
|
variant: "danger",
|
|
61
61
|
onClick: () => y(j),
|
|
62
62
|
loading: v.isPending,
|
|
63
|
-
children:
|
|
63
|
+
children: o("disconnectAccount", { account: j })
|
|
64
64
|
})]
|
|
65
65
|
}),
|
|
66
|
-
/* @__PURE__ */
|
|
66
|
+
/* @__PURE__ */ w(h, {
|
|
67
67
|
size: "md",
|
|
68
68
|
className: "mt-3",
|
|
69
|
-
children:
|
|
69
|
+
children: u.error
|
|
70
70
|
}),
|
|
71
71
|
m
|
|
72
72
|
]
|
|
73
73
|
});
|
|
74
74
|
}
|
|
75
|
-
function
|
|
76
|
-
let m =
|
|
75
|
+
function A({ workspace: n, isAdmin: i, result: a }) {
|
|
76
|
+
let m = S("code"), { data: h } = O(r(n)), { person: g } = s(n), _ = d(), x = D(), k = E({
|
|
77
|
+
mutationFn: async ({ account: r, on: i }) => t(await e.PATCH("/api/v1/workspaces/{workspace}/code-host/connections/{account}", {
|
|
78
|
+
params: { path: {
|
|
79
|
+
workspace: n,
|
|
80
|
+
account: r
|
|
81
|
+
} },
|
|
82
|
+
body: { showImages: i }
|
|
83
|
+
})),
|
|
84
|
+
onMutate: _.clear,
|
|
85
|
+
onSuccess: () => x.invalidateQueries({ queryKey: r(n).queryKey }),
|
|
86
|
+
onError: _.set
|
|
87
|
+
}), A = E({
|
|
77
88
|
mutationFn: async () => t(await e.POST("/api/v1/workspaces/{workspace}/code-host/connect", { params: { path: { workspace: n } } })),
|
|
78
89
|
onMutate: _.clear,
|
|
79
90
|
onSuccess: ({ url: e }) => {
|
|
80
|
-
let t =
|
|
91
|
+
let t = o(e);
|
|
81
92
|
t && window.location.assign(t);
|
|
82
93
|
},
|
|
83
94
|
onError: _.set
|
|
84
95
|
});
|
|
85
|
-
return h.provider === "" ? /* @__PURE__ */
|
|
96
|
+
return h.provider === "" ? /* @__PURE__ */ w(v, { children: /* @__PURE__ */ w("p", {
|
|
86
97
|
className: "px-3 py-2 text-sm text-muted-foreground",
|
|
87
98
|
children: m("notConfigured")
|
|
88
|
-
}) }) : /* @__PURE__ */
|
|
89
|
-
|
|
99
|
+
}) }) : /* @__PURE__ */ T(C, { children: [
|
|
100
|
+
a && a !== "choose" && /* @__PURE__ */ w("p", {
|
|
90
101
|
role: "status",
|
|
91
|
-
className: `mb-3 rounded-md bg-muted px-3 py-2 text-sm ${
|
|
92
|
-
children: m(`result.${
|
|
102
|
+
className: `mb-3 rounded-md bg-muted px-3 py-2 text-sm ${a === "failed" ? "text-danger" : ""}`,
|
|
103
|
+
children: m(`result.${a}`)
|
|
93
104
|
}),
|
|
94
|
-
/* @__PURE__ */
|
|
95
|
-
icon: /* @__PURE__ */
|
|
105
|
+
/* @__PURE__ */ w(c, {
|
|
106
|
+
icon: /* @__PURE__ */ w(u, {
|
|
96
107
|
provider: h.provider,
|
|
97
108
|
className: "size-7"
|
|
98
109
|
}),
|
|
99
110
|
name: m("provider"),
|
|
100
111
|
status: h.connections.length > 0 ? m("linkedCount", { count: h.connections.length }) : m("description"),
|
|
101
112
|
error: _.error,
|
|
102
|
-
action: /* @__PURE__ */
|
|
113
|
+
action: /* @__PURE__ */ T(C, { children: [h.connections.length === 0 && /* @__PURE__ */ w(y, {
|
|
103
114
|
off: !0,
|
|
104
115
|
children: m("notLinked")
|
|
105
|
-
}), i && /* @__PURE__ */
|
|
116
|
+
}), i && /* @__PURE__ */ w(p, {
|
|
106
117
|
type: "button",
|
|
107
118
|
variant: h.connections.length === 0 ? "primary" : "outline",
|
|
108
|
-
onClick: () =>
|
|
109
|
-
loading:
|
|
119
|
+
onClick: () => A.mutate(),
|
|
120
|
+
loading: A.isPending,
|
|
110
121
|
children: m("connect")
|
|
111
122
|
})] }),
|
|
112
|
-
children: h.connections.length > 0 && /* @__PURE__ */
|
|
123
|
+
children: h.connections.length > 0 && /* @__PURE__ */ w(l, {
|
|
113
124
|
title: m("connections"),
|
|
114
|
-
children: h.connections.map((e) => /* @__PURE__ */
|
|
115
|
-
className: "
|
|
116
|
-
children: [/* @__PURE__ */
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
className: "
|
|
124
|
-
children:
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
125
|
+
children: h.connections.map((e) => /* @__PURE__ */ T("li", {
|
|
126
|
+
className: "px-4 py-3 text-sm",
|
|
127
|
+
children: [/* @__PURE__ */ T("div", {
|
|
128
|
+
className: "flex items-center gap-3",
|
|
129
|
+
children: [/* @__PURE__ */ w(f, {
|
|
130
|
+
name: e.account,
|
|
131
|
+
size: "sm",
|
|
132
|
+
decorative: !0
|
|
133
|
+
}), /* @__PURE__ */ T("div", {
|
|
134
|
+
className: "min-w-0 flex-1",
|
|
135
|
+
children: [/* @__PURE__ */ w("p", {
|
|
136
|
+
className: "truncate font-medium",
|
|
137
|
+
children: e.account
|
|
138
|
+
}), /* @__PURE__ */ w("p", {
|
|
139
|
+
className: "truncate text-muted-foreground",
|
|
140
|
+
children: e.removed ? m("removed") : e.connectedBy && m("connectedBy", { name: g(e.connectedBy).name })
|
|
141
|
+
})]
|
|
142
|
+
})]
|
|
143
|
+
}), i && !e.removed && /* @__PURE__ */ T("div", {
|
|
144
|
+
className: "mt-3 flex items-start gap-3 pl-9",
|
|
145
|
+
children: [/* @__PURE__ */ T("div", {
|
|
146
|
+
className: "min-w-0 flex-1",
|
|
147
|
+
children: [/* @__PURE__ */ w("p", {
|
|
148
|
+
className: "font-medium",
|
|
149
|
+
children: m("showImages")
|
|
150
|
+
}), /* @__PURE__ */ w("p", {
|
|
151
|
+
className: "text-muted-foreground",
|
|
152
|
+
children: h.canShowImages ? m("showImagesHint") : m("showImagesUnavailable")
|
|
153
|
+
})]
|
|
154
|
+
}), /* @__PURE__ */ w(b, {
|
|
155
|
+
"aria-label": m("showImagesFor", { account: e.account }),
|
|
156
|
+
checked: e.showImages,
|
|
157
|
+
disabled: !h.canShowImages || k.isPending,
|
|
158
|
+
onCheckedChange: (t) => k.mutate({
|
|
159
|
+
account: e.account,
|
|
160
|
+
on: t
|
|
161
|
+
})
|
|
128
162
|
})]
|
|
129
163
|
})]
|
|
130
164
|
}, e.account))
|
|
131
165
|
})
|
|
132
166
|
}),
|
|
133
|
-
i && /* @__PURE__ */
|
|
167
|
+
i && /* @__PURE__ */ w(j, {
|
|
134
168
|
workspace: n,
|
|
135
|
-
chosen:
|
|
169
|
+
chosen: a === "choose"
|
|
136
170
|
})
|
|
137
171
|
] });
|
|
138
172
|
}
|
|
139
|
-
function
|
|
140
|
-
let s =
|
|
173
|
+
function j({ workspace: i, chosen: a }) {
|
|
174
|
+
let s = S("code"), { data: c } = O(n(i)), l = D(), u = d(), f = E({
|
|
141
175
|
mutationFn: async (n) => t(await e.POST("/api/v1/workspaces/{workspace}/code-host/connections", {
|
|
142
176
|
params: { path: { workspace: i } },
|
|
143
177
|
body: { id: n }
|
|
144
178
|
})),
|
|
145
|
-
onMutate:
|
|
146
|
-
onError:
|
|
179
|
+
onMutate: u.clear,
|
|
180
|
+
onError: u.set,
|
|
147
181
|
onSettled: () => {
|
|
148
|
-
|
|
182
|
+
l.invalidateQueries({ queryKey: r(i).queryKey }), l.invalidateQueries({ queryKey: [
|
|
149
183
|
"workspace",
|
|
150
184
|
i,
|
|
151
185
|
"teams"
|
|
152
186
|
] });
|
|
153
187
|
}
|
|
154
|
-
}), g =
|
|
188
|
+
}), g = E({
|
|
155
189
|
mutationFn: async () => t(await e.POST("/api/v1/workspaces/{workspace}/code-host/connect", {
|
|
156
190
|
params: { path: { workspace: i } },
|
|
157
191
|
body: { install: !0 }
|
|
158
192
|
})),
|
|
159
|
-
onMutate:
|
|
160
|
-
onError:
|
|
193
|
+
onMutate: u.clear,
|
|
194
|
+
onError: u.set
|
|
161
195
|
});
|
|
162
|
-
return !
|
|
196
|
+
return !a && c.length === 0 ? null : /* @__PURE__ */ T(m, {
|
|
163
197
|
size: "fill",
|
|
164
198
|
padding: "sm",
|
|
165
199
|
className: "mt-4",
|
|
166
200
|
children: [
|
|
167
|
-
/* @__PURE__ */
|
|
201
|
+
/* @__PURE__ */ w("h3", {
|
|
168
202
|
className: "text-sm font-medium",
|
|
169
203
|
children: s("chooseTitle")
|
|
170
204
|
}),
|
|
171
|
-
/* @__PURE__ */
|
|
205
|
+
/* @__PURE__ */ w("p", {
|
|
172
206
|
className: "mt-0.5 text-sm text-muted-foreground",
|
|
173
207
|
children: c.length > 0 ? s("chooseDescription") : s("noAccounts")
|
|
174
208
|
}),
|
|
175
|
-
c.length > 0 && /* @__PURE__ */
|
|
209
|
+
c.length > 0 && /* @__PURE__ */ w("ul", {
|
|
176
210
|
className: "mt-3 divide-y divide-border rounded-md border border-border",
|
|
177
|
-
children: c.map((e) => /* @__PURE__ */
|
|
211
|
+
children: c.map((e) => /* @__PURE__ */ T("li", {
|
|
178
212
|
className: "px-3 py-2 text-sm",
|
|
179
|
-
children: [/* @__PURE__ */
|
|
213
|
+
children: [/* @__PURE__ */ T("div", {
|
|
180
214
|
className: "flex items-center gap-3",
|
|
181
|
-
children: [/* @__PURE__ */
|
|
215
|
+
children: [/* @__PURE__ */ w("span", {
|
|
182
216
|
className: "min-w-0 flex-1 truncate font-medium",
|
|
183
217
|
children: e.account
|
|
184
|
-
}), /* @__PURE__ */
|
|
218
|
+
}), /* @__PURE__ */ w(p, {
|
|
185
219
|
size: "sm",
|
|
186
220
|
type: "button",
|
|
187
221
|
onClick: () => f.mutate(e.id),
|
|
@@ -189,23 +223,23 @@ function A({ workspace: i, chosen: o }) {
|
|
|
189
223
|
loading: f.isPending && f.variables === e.id,
|
|
190
224
|
children: s("connectThis")
|
|
191
225
|
})]
|
|
192
|
-
}), /* @__PURE__ */
|
|
226
|
+
}), /* @__PURE__ */ w(h, {
|
|
193
227
|
size: "md",
|
|
194
228
|
className: "mt-2",
|
|
195
|
-
children: f.isError && f.variables === e.id ?
|
|
229
|
+
children: f.isError && f.variables === e.id ? u.error : null
|
|
196
230
|
})]
|
|
197
231
|
}, e.id))
|
|
198
232
|
}),
|
|
199
|
-
/* @__PURE__ */
|
|
233
|
+
/* @__PURE__ */ T("div", {
|
|
200
234
|
className: "mt-3 flex flex-wrap items-center gap-x-3 gap-y-1",
|
|
201
|
-
children: [/* @__PURE__ */
|
|
235
|
+
children: [/* @__PURE__ */ w(p, {
|
|
202
236
|
size: "sm",
|
|
203
237
|
type: "button",
|
|
204
238
|
onClick: () => {
|
|
205
239
|
let e = window.open("about:blank", "_blank");
|
|
206
240
|
g.mutate(void 0, {
|
|
207
241
|
onSuccess: ({ url: t }) => {
|
|
208
|
-
let n =
|
|
242
|
+
let n = o(t);
|
|
209
243
|
if (!n) return e?.close();
|
|
210
244
|
if (!e) return window.location.assign(n);
|
|
211
245
|
e.opener = null, e.location.href = n;
|
|
@@ -215,17 +249,17 @@ function A({ workspace: i, chosen: o }) {
|
|
|
215
249
|
},
|
|
216
250
|
loading: g.isPending,
|
|
217
251
|
children: s("installElsewhere")
|
|
218
|
-
}), /* @__PURE__ */
|
|
252
|
+
}), /* @__PURE__ */ w("span", {
|
|
219
253
|
className: "text-xs text-muted-foreground",
|
|
220
254
|
children: s("installHint")
|
|
221
255
|
})]
|
|
222
256
|
}),
|
|
223
|
-
/* @__PURE__ */
|
|
257
|
+
/* @__PURE__ */ w(h, {
|
|
224
258
|
size: "md",
|
|
225
259
|
className: "mt-2",
|
|
226
|
-
children: g.isError ?
|
|
260
|
+
children: g.isError ? u.error : null
|
|
227
261
|
})
|
|
228
262
|
]
|
|
229
263
|
});
|
|
230
264
|
}
|
|
231
|
-
export {
|
|
265
|
+
export { k as CodeHostDangerZone, A as CodeHostSettings };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { SlashMenu as r } from "./SlashMenu.js";
|
|
1
|
+
import { docField as e, selectionClass as t } from "../lib/collab.js";
|
|
2
|
+
import { BlockHandle as n } from "./BlockHandle.js";
|
|
3
|
+
import { DocLinkPicker as r } from "./DocLinkPicker.js";
|
|
5
4
|
import { contentExtensions as i, fileHandlers as a } from "./Editor.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
5
|
+
import { MoveBlock as o } from "./editorPlugins.js";
|
|
6
|
+
import { MentionPicker as s } from "./MentionPicker.js";
|
|
7
|
+
import { SlashMenu as c } from "./SlashMenu.js";
|
|
8
8
|
import { useEffect as l, useRef as u } from "react";
|
|
9
9
|
import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
10
10
|
import { EditorContent as m, useEditor as h } from "@tiptap/react";
|
|
@@ -28,15 +28,15 @@ function v({ session: v, user: y, placeholder: b, label: x, className: S = "", g
|
|
|
28
28
|
placeholder: b,
|
|
29
29
|
collaborative: !0
|
|
30
30
|
}),
|
|
31
|
-
|
|
31
|
+
o,
|
|
32
32
|
g.configure({
|
|
33
33
|
document: v.doc,
|
|
34
|
-
field:
|
|
34
|
+
field: e
|
|
35
35
|
}),
|
|
36
36
|
_.configure({
|
|
37
37
|
provider: { awareness: v.awareness },
|
|
38
38
|
user: y,
|
|
39
|
-
selectionRender: (e) => ({ class:
|
|
39
|
+
selectionRender: (e) => ({ class: t(e.color) })
|
|
40
40
|
})
|
|
41
41
|
],
|
|
42
42
|
injectCSS: !1,
|
|
@@ -58,13 +58,13 @@ function v({ session: v, user: y, placeholder: b, label: x, className: S = "", g
|
|
|
58
58
|
let j = u(E);
|
|
59
59
|
return j.current = E, l(() => (j.current?.(A), () => j.current?.(null)), [A]), /* @__PURE__ */ p(d, { children: [
|
|
60
60
|
/* @__PURE__ */ f(m, { editor: A }),
|
|
61
|
-
/* @__PURE__ */ f(
|
|
62
|
-
/* @__PURE__ */ f(
|
|
63
|
-
/* @__PURE__ */ f(
|
|
61
|
+
/* @__PURE__ */ f(n, { editor: A }),
|
|
62
|
+
/* @__PURE__ */ f(r, { editor: A }),
|
|
63
|
+
/* @__PURE__ */ f(c, {
|
|
64
64
|
editor: A,
|
|
65
65
|
onFiles: k
|
|
66
66
|
}),
|
|
67
|
-
/* @__PURE__ */ f(
|
|
67
|
+
/* @__PURE__ */ f(s, { editor: A })
|
|
68
68
|
] });
|
|
69
69
|
}
|
|
70
70
|
export { v as CollabEditor };
|