@parallelworks/tandem-web 0.171.0 → 0.171.2
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 +1 -0
- package/_virtual/_virtual_i18n/es/common.js +1 -0
- package/_virtual/_virtual_i18n/ja/common.js +1 -0
- package/_virtual/_virtual_i18n/ko/common.js +1 -0
- package/_virtual/_virtual_i18n/zh/common.js +1 -0
- package/components/AccessGrants.js +6 -6
- package/components/ActivityTimeline.js +57 -57
- package/components/ActorAvatar.js +4 -4
- 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 +29 -29
- package/components/BlockHandle.js +3 -3
- package/components/BugRotation.js +8 -8
- package/components/CodeHostSettings.js +38 -38
- 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 +23 -23
- 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 +12 -12
- package/components/IssueFilters.js +103 -99
- 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 +4 -4
- 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 +4 -4
- 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/assigneeOrder.js +6 -0
- package/lib/assignees.js +24 -20
- 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/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 +109 -109
- 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 +477 -477
- package/routes/_workspace/issues/index.js +13 -13
- package/routes/_workspace/knowledge/_term2.js +175 -175
- package/routes/_workspace/knowledge/_term3.js +4 -4
- package/routes/_workspace/knowledge/index.js +12 -12
- package/routes/_workspace/knowledge/index2.js +117 -117
- 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,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { linkedIssues as g } from "../lib/linkedIssues.js";
|
|
9
|
-
import { mentionable as _, mentionsIn as ne } from "../lib/mentions.js";
|
|
1
|
+
import { attachmentIdOf as e, attachmentPrefix as t, attachmentSizes as n, attachmentURL as r, githubMedia as i, githubUpload as a, mediaURL as o, playableLink as s, videoName as c } from "../lib/attachments.js";
|
|
2
|
+
import { docLooks as l } from "../lib/docLooks.js";
|
|
3
|
+
import { githubLinkPage as u } from "../lib/githubLink.js";
|
|
4
|
+
import { glossary as d, mentions as f } from "../lib/glossary.js";
|
|
5
|
+
import { issueKeyOfHref as p, issueKeyPattern as ee, issueRefs as m } from "../lib/issueRefs.js";
|
|
6
|
+
import { linkedIssues as h } from "../lib/linkedIssues.js";
|
|
7
|
+
import { mentionable as g, mentionsIn as _ } from "../lib/mentions.js";
|
|
10
8
|
import { teamNames as v } from "../lib/teamNames.js";
|
|
9
|
+
import { docIcons as te } from "./DocIcon.js";
|
|
10
|
+
import { iconImageURL as ne } from "./EntityIcon.js";
|
|
11
11
|
import { createElement as y } from "react";
|
|
12
12
|
import { Extension as b } from "@tiptap/react";
|
|
13
13
|
import { Plugin as x, PluginKey as S, TextSelection as re } from "@tiptap/pm/state";
|
|
@@ -36,20 +36,20 @@ function A(e, t) {
|
|
|
36
36
|
}), t(r, n + 1), !1;
|
|
37
37
|
});
|
|
38
38
|
}
|
|
39
|
-
function j(
|
|
40
|
-
let
|
|
41
|
-
if (
|
|
42
|
-
let
|
|
43
|
-
return A(
|
|
44
|
-
for (let
|
|
39
|
+
function j(e, t) {
|
|
40
|
+
let n = d.forms();
|
|
41
|
+
if (n.length === 0) return w.empty;
|
|
42
|
+
let r = [];
|
|
43
|
+
return A(e, (e, i) => {
|
|
44
|
+
for (let a of f(e, n)) r.push(C.inline(i + a.from, i + a.to, {
|
|
45
45
|
class: "kb-term",
|
|
46
|
-
"data-term":
|
|
47
|
-
...
|
|
46
|
+
"data-term": a.id,
|
|
47
|
+
...t && {
|
|
48
48
|
tabindex: "0",
|
|
49
49
|
role: "button"
|
|
50
50
|
}
|
|
51
51
|
}));
|
|
52
|
-
}), w.create(
|
|
52
|
+
}), w.create(e, r);
|
|
53
53
|
}
|
|
54
54
|
function ie(e) {
|
|
55
55
|
let t = /* @__PURE__ */ new Set();
|
|
@@ -58,41 +58,41 @@ function ie(e) {
|
|
|
58
58
|
return !0;
|
|
59
59
|
}), t;
|
|
60
60
|
}
|
|
61
|
-
function ae(e,
|
|
62
|
-
let
|
|
63
|
-
return A(e, (e,
|
|
64
|
-
for (let
|
|
65
|
-
from:
|
|
66
|
-
to:
|
|
67
|
-
id:
|
|
68
|
-
text: e.slice(
|
|
61
|
+
function ae(e, t, n) {
|
|
62
|
+
let r = [], i = /* @__PURE__ */ new Set();
|
|
63
|
+
return A(e, (e, a) => {
|
|
64
|
+
for (let o of f(e, t)) i.has(o.id) || (i.add(o.id), n(o.id) || r.push({
|
|
65
|
+
from: a + o.from,
|
|
66
|
+
to: a + o.to,
|
|
67
|
+
id: o.id,
|
|
68
|
+
text: e.slice(o.from, o.to)
|
|
69
69
|
}));
|
|
70
|
-
}),
|
|
70
|
+
}), r;
|
|
71
71
|
}
|
|
72
72
|
var oe = b.create({
|
|
73
73
|
name: "knowledgeTerms",
|
|
74
74
|
addProseMirrorPlugins() {
|
|
75
|
-
let
|
|
75
|
+
let e = this.editor, t = "";
|
|
76
76
|
return [new x({
|
|
77
77
|
key: D,
|
|
78
78
|
state: {
|
|
79
|
-
init: (
|
|
80
|
-
apply: (
|
|
79
|
+
init: (t, n) => j(n.doc, !e.isEditable),
|
|
80
|
+
apply: (t, n) => t.docChanged || t.getMeta(D) ? j(t.doc, !e.isEditable) : n.map(t.mapping, t.doc)
|
|
81
81
|
},
|
|
82
82
|
props: {
|
|
83
83
|
decorations: (e) => D.getState(e),
|
|
84
|
-
handleKeyDown: (e,
|
|
84
|
+
handleKeyDown: (e, n) => (t = n.key, !1)
|
|
85
85
|
},
|
|
86
|
-
view: (
|
|
87
|
-
update: (e,
|
|
86
|
+
view: (e) => ({
|
|
87
|
+
update: (e, n) => {
|
|
88
88
|
let { selection: r } = e.state;
|
|
89
|
-
if (!O.has(
|
|
90
|
-
|
|
89
|
+
if (!O.has(t) || !r.empty || n.selection.eq(r)) return;
|
|
90
|
+
t = "";
|
|
91
91
|
let i = e.domAtPos(r.from);
|
|
92
92
|
(i.node.nodeType === 1 ? i.node : i.node.parentElement)?.closest(".kb-term")?.dispatchEvent(new CustomEvent(k, { bubbles: !0 }));
|
|
93
93
|
},
|
|
94
|
-
destroy:
|
|
95
|
-
|
|
94
|
+
destroy: d.subscribe(() => {
|
|
95
|
+
e.isDestroyed || e.dispatch(e.state.tr.setMeta(D, !0));
|
|
96
96
|
})
|
|
97
97
|
})
|
|
98
98
|
})];
|
|
@@ -115,14 +115,14 @@ var ce = b.create({
|
|
|
115
115
|
parseHTML() {
|
|
116
116
|
return [{
|
|
117
117
|
tag: "img[src]",
|
|
118
|
-
getAttrs: (
|
|
119
|
-
let
|
|
120
|
-
return
|
|
121
|
-
src:
|
|
122
|
-
alt:
|
|
123
|
-
} :
|
|
124
|
-
src:
|
|
125
|
-
alt:
|
|
118
|
+
getAttrs: (n) => {
|
|
119
|
+
let r = n.getAttribute("src"), a = e(r);
|
|
120
|
+
return a ? {
|
|
121
|
+
src: t + a,
|
|
122
|
+
alt: n.getAttribute("alt")
|
|
123
|
+
} : i(r) ? {
|
|
124
|
+
src: r,
|
|
125
|
+
alt: n.getAttribute("alt")
|
|
126
126
|
} : !1;
|
|
127
127
|
}
|
|
128
128
|
}];
|
|
@@ -130,7 +130,7 @@ var ce = b.create({
|
|
|
130
130
|
renderHTML({ HTMLAttributes: e }) {
|
|
131
131
|
return ["img", {
|
|
132
132
|
...e,
|
|
133
|
-
src:
|
|
133
|
+
src: o(String(e.src ?? "")),
|
|
134
134
|
class: "attachment-image",
|
|
135
135
|
loading: "lazy"
|
|
136
136
|
}];
|
|
@@ -138,7 +138,7 @@ var ce = b.create({
|
|
|
138
138
|
addNodeView() {
|
|
139
139
|
return ({ node: e }) => {
|
|
140
140
|
let t = String(e.attrs.src ?? ""), n = document.createElement("img");
|
|
141
|
-
if (n.src =
|
|
141
|
+
if (n.src = o(t), n.className = "attachment-image", n.loading = "lazy", e.attrs.alt && (n.alt = String(e.attrs.alt)), e.attrs.title && (n.title = String(e.attrs.title)), !a(t)) return { dom: n };
|
|
142
142
|
let r = document.createElement("span");
|
|
143
143
|
return r.append(n), n.addEventListener("error", () => {
|
|
144
144
|
n.replaceWith(N(t, (e) => F(e, t, !0)));
|
|
@@ -151,14 +151,14 @@ var ce = b.create({
|
|
|
151
151
|
}).configure({ inline: !0 });
|
|
152
152
|
function N(e, t) {
|
|
153
153
|
let n = document.createElement("video");
|
|
154
|
-
return n.className = "github-recording", n.src =
|
|
155
|
-
n.src !== e &&
|
|
154
|
+
return n.className = "github-recording", n.src = o(e), n.controls = !0, n.preload = "metadata", n.contentEditable = "false", n.addEventListener("error", function r() {
|
|
155
|
+
n.src !== e && a(e) ? n.src = e : (n.removeEventListener("error", r), t(n));
|
|
156
156
|
}), n;
|
|
157
157
|
}
|
|
158
158
|
var P = { linkHint: "" };
|
|
159
159
|
function F(e, t, n) {
|
|
160
160
|
let r = document.createElement("span");
|
|
161
|
-
r.className = "recording-unplayable", r.contentEditable = "false", n && r.append(I(t)), e.replaceWith(r),
|
|
161
|
+
r.className = "recording-unplayable", r.contentEditable = "false", n && r.append(I(t)), e.replaceWith(r), a(t) && u().then((e) => {
|
|
162
162
|
if (!e || !P.linkHint) return;
|
|
163
163
|
let t = document.createElement("a");
|
|
164
164
|
t.className = "recording-hint", t.href = e, t.textContent = P.linkHint, r.append(t);
|
|
@@ -166,14 +166,14 @@ function F(e, t, n) {
|
|
|
166
166
|
}
|
|
167
167
|
function I(e) {
|
|
168
168
|
let t = document.createElement("a");
|
|
169
|
-
return t.href =
|
|
169
|
+
return t.href = r(e), t.textContent = e, t.rel = "noopener noreferrer", t.target = "_blank", t;
|
|
170
170
|
}
|
|
171
171
|
var L = new S("attachmentFiles");
|
|
172
172
|
function R(e, t) {
|
|
173
173
|
e.descendants((e, n) => {
|
|
174
174
|
if (e.type.name !== "paragraph") return !0;
|
|
175
175
|
let r = e.childCount === 1 ? e.firstChild : null, i = r?.marks.find((e) => e.type.name === "link")?.attrs.href;
|
|
176
|
-
return r?.isText && i &&
|
|
176
|
+
return r?.isText && i && s(i) && r.text?.trim() === i && t.push(C.widget(n + e.nodeSize - 1, () => {
|
|
177
177
|
let e = document.createElement("span");
|
|
178
178
|
return e.className = "recording-box", e.contentEditable = "false", e.append(N(i, (e) => F(e, i, !1))), e;
|
|
179
179
|
}, {
|
|
@@ -184,27 +184,27 @@ function R(e, t) {
|
|
|
184
184
|
})), !1;
|
|
185
185
|
});
|
|
186
186
|
}
|
|
187
|
-
function z(
|
|
188
|
-
let
|
|
189
|
-
return R(
|
|
190
|
-
if (!
|
|
191
|
-
let
|
|
192
|
-
|
|
193
|
-
let
|
|
194
|
-
if (
|
|
195
|
-
let
|
|
196
|
-
|
|
197
|
-
let
|
|
198
|
-
return
|
|
187
|
+
function z(t) {
|
|
188
|
+
let i = [];
|
|
189
|
+
return R(t, i), t.descendants((t, a) => {
|
|
190
|
+
if (!t.isText) return !0;
|
|
191
|
+
let o = t.marks.find((e) => e.type.name === "link"), s = e(o?.attrs.href), l = s && n.get(s);
|
|
192
|
+
l && i.push(C.inline(a, a + t.nodeSize, { "data-size": l }));
|
|
193
|
+
let u = !n.get(s ?? "") && c.test(t.text ?? "");
|
|
194
|
+
if (s && (n.isVideo(s) || u) && o) {
|
|
195
|
+
let e = r(String(o.attrs.href));
|
|
196
|
+
i.push(C.widget(a + t.nodeSize, () => {
|
|
197
|
+
let t = document.createElement("video");
|
|
198
|
+
return t.className = "attachment-video", t.src = e, t.controls = !0, t.preload = "metadata", t.contentEditable = "false", u && t.addEventListener("error", () => t.remove(), { once: !0 }), t;
|
|
199
199
|
}, {
|
|
200
200
|
side: 1,
|
|
201
|
-
key: `video-${
|
|
201
|
+
key: `video-${s}`,
|
|
202
202
|
stopEvent: () => !0,
|
|
203
203
|
ignoreSelection: !0
|
|
204
204
|
}));
|
|
205
205
|
}
|
|
206
206
|
return !1;
|
|
207
|
-
}), w.create(
|
|
207
|
+
}), w.create(t, i);
|
|
208
208
|
}
|
|
209
209
|
var B = b.create({
|
|
210
210
|
name: "attachmentFiles",
|
|
@@ -218,22 +218,22 @@ var B = b.create({
|
|
|
218
218
|
},
|
|
219
219
|
props: {
|
|
220
220
|
decorations: (e) => L.getState(e),
|
|
221
|
-
handleClickOn: (
|
|
221
|
+
handleClickOn: (t, n, r, i, a) => r.type.name !== "image" || !e(r.attrs.src) ? !1 : (a.preventDefault(), t.dom.dispatchEvent(new CustomEvent(M, {
|
|
222
222
|
bubbles: !0,
|
|
223
223
|
detail: {
|
|
224
|
-
src:
|
|
225
|
-
name:
|
|
224
|
+
src: r.attrs.src,
|
|
225
|
+
name: r.attrs.alt ?? ""
|
|
226
226
|
}
|
|
227
227
|
})), !0),
|
|
228
|
-
handleClick: (
|
|
229
|
-
let
|
|
230
|
-
if (!
|
|
231
|
-
|
|
232
|
-
let
|
|
233
|
-
return
|
|
228
|
+
handleClick: (t, n, i) => {
|
|
229
|
+
let a = i.target?.closest("a[href]")?.getAttribute("href");
|
|
230
|
+
if (!a || !e(a) || i.button !== 0) return !1;
|
|
231
|
+
i.preventDefault();
|
|
232
|
+
let o = document.createElement("a");
|
|
233
|
+
return o.href = r(a), o.download = "", o.click(), !0;
|
|
234
234
|
}
|
|
235
235
|
},
|
|
236
|
-
view: (e) => ({ destroy:
|
|
236
|
+
view: (e) => ({ destroy: n.subscribe(() => {
|
|
237
237
|
e.isDestroyed || e.dispatch(e.state.tr.setMeta(L, !0));
|
|
238
238
|
}) })
|
|
239
239
|
})];
|
|
@@ -241,7 +241,7 @@ var B = b.create({
|
|
|
241
241
|
}), V = new S("linkedIssues");
|
|
242
242
|
function H(e) {
|
|
243
243
|
let t = [], n, r = () => {
|
|
244
|
-
let e = n &&
|
|
244
|
+
let e = n && h.get(n.href);
|
|
245
245
|
if (n && e) {
|
|
246
246
|
let { identifier: r, title: i, status: a } = e;
|
|
247
247
|
t.push(C.widget(n.end, () => {
|
|
@@ -276,10 +276,10 @@ var U = b.create({
|
|
|
276
276
|
decorations: (e) => V.getState(e),
|
|
277
277
|
handleDOMEvents: { click: (e, t) => {
|
|
278
278
|
let n = t.target?.closest("[data-linked-issue]");
|
|
279
|
-
return n ? (t.preventDefault(),
|
|
279
|
+
return n ? (t.preventDefault(), h.open(n.dataset.linkedIssue ?? ""), !0) : !1;
|
|
280
280
|
} }
|
|
281
281
|
},
|
|
282
|
-
view: (e) => ({ destroy:
|
|
282
|
+
view: (e) => ({ destroy: h.subscribe(() => {
|
|
283
283
|
e.isDestroyed || e.dispatch(e.state.tr.setMeta(V, !0));
|
|
284
284
|
}) })
|
|
285
285
|
})];
|
|
@@ -290,10 +290,10 @@ function ue(e) {
|
|
|
290
290
|
return t.className = "issue-mention-status", t.dataset.category = e, t.contentEditable = "false", t;
|
|
291
291
|
}
|
|
292
292
|
function G(e) {
|
|
293
|
-
let t =
|
|
293
|
+
let t = m.workspace();
|
|
294
294
|
if (!t) return w.empty;
|
|
295
295
|
let n = [], r = [], i = (e, t, i, a) => {
|
|
296
|
-
let o =
|
|
296
|
+
let o = m.get(i);
|
|
297
297
|
if (!o) {
|
|
298
298
|
r.push(i);
|
|
299
299
|
return;
|
|
@@ -315,13 +315,13 @@ function G(e) {
|
|
|
315
315
|
}));
|
|
316
316
|
};
|
|
317
317
|
A(e, (e, t) => {
|
|
318
|
-
for (let n of e.matchAll(
|
|
318
|
+
for (let n of e.matchAll(ee)) {
|
|
319
319
|
let e = n[1] ?? "";
|
|
320
320
|
i(t + (n.index ?? 0), t + (n.index ?? 0) + e.length, e, !0);
|
|
321
321
|
}
|
|
322
322
|
});
|
|
323
323
|
let a, o = () => {
|
|
324
|
-
let e = a &&
|
|
324
|
+
let e = a && p(a.href, t);
|
|
325
325
|
a && e && i(a.from, a.to, e, !1), a = void 0;
|
|
326
326
|
};
|
|
327
327
|
return e.descendants((e, t) => {
|
|
@@ -335,7 +335,7 @@ function G(e) {
|
|
|
335
335
|
from: t,
|
|
336
336
|
to: t + e.nodeSize
|
|
337
337
|
}), !1;
|
|
338
|
-
}), o(), r.length > 0 &&
|
|
338
|
+
}), o(), r.length > 0 && m.want(r), w.create(e, n);
|
|
339
339
|
}
|
|
340
340
|
var de = b.create({
|
|
341
341
|
name: "issueMentions",
|
|
@@ -347,22 +347,22 @@ var de = b.create({
|
|
|
347
347
|
apply: (e, t) => e.docChanged || e.getMeta(W) ? G(e.doc) : t.map(e.mapping, e.doc)
|
|
348
348
|
},
|
|
349
349
|
props: { decorations: (e) => W.getState(e) },
|
|
350
|
-
view: (e) => ({ destroy:
|
|
350
|
+
view: (e) => ({ destroy: m.subscribe(() => {
|
|
351
351
|
e.isDestroyed || e.dispatch(e.state.tr.setMeta(W, !0));
|
|
352
352
|
}) })
|
|
353
353
|
})];
|
|
354
354
|
}
|
|
355
355
|
}), K = new S("teamNames");
|
|
356
356
|
function q(e) {
|
|
357
|
-
let
|
|
358
|
-
if (
|
|
359
|
-
let
|
|
360
|
-
return A(e, (e,
|
|
361
|
-
for (let
|
|
357
|
+
let t = v.forms();
|
|
358
|
+
if (t.length === 0) return w.empty;
|
|
359
|
+
let n = [];
|
|
360
|
+
return A(e, (e, r) => {
|
|
361
|
+
for (let i of f(e, t, !0)) n.push(C.inline(r + i.from, r + i.to, {
|
|
362
362
|
class: "team-mention",
|
|
363
|
-
"data-team":
|
|
363
|
+
"data-team": i.id
|
|
364
364
|
}));
|
|
365
|
-
}), w.create(e,
|
|
365
|
+
}), w.create(e, n);
|
|
366
366
|
}
|
|
367
367
|
var fe = b.create({
|
|
368
368
|
name: "teamNames",
|
|
@@ -383,7 +383,7 @@ var fe = b.create({
|
|
|
383
383
|
function Y(e) {
|
|
384
384
|
let t = [];
|
|
385
385
|
return A(e, (e, n) => {
|
|
386
|
-
for (let r of
|
|
386
|
+
for (let r of _(e)) g.has(r.username) && t.push(C.inline(n + r.from, n + r.to, {
|
|
387
387
|
class: "person-mention",
|
|
388
388
|
"data-username": r.username
|
|
389
389
|
}));
|
|
@@ -399,7 +399,7 @@ var X = b.create({
|
|
|
399
399
|
apply: (e, t) => e.docChanged || e.getMeta(J) ? Y(e.doc) : t.map(e.mapping, e.doc)
|
|
400
400
|
},
|
|
401
401
|
props: { decorations: (e) => J.getState(e) },
|
|
402
|
-
view: (e) => ({ destroy:
|
|
402
|
+
view: (e) => ({ destroy: g.subscribe(() => {
|
|
403
403
|
e.isDestroyed || e.dispatch(e.state.tr.setMeta(J, !0));
|
|
404
404
|
}) })
|
|
405
405
|
})];
|
|
@@ -408,13 +408,13 @@ var X = b.create({
|
|
|
408
408
|
function pe(e) {
|
|
409
409
|
let t = document.createElement("span");
|
|
410
410
|
t.className = "doc-link-icon", t.contentEditable = "false";
|
|
411
|
-
let
|
|
412
|
-
if (
|
|
411
|
+
let n = ne(e), r = e.startsWith("icon:") ? te[e.slice(5)] : void 0;
|
|
412
|
+
if (n) {
|
|
413
413
|
let e = document.createElement("img");
|
|
414
|
-
e.src =
|
|
415
|
-
} else if (
|
|
414
|
+
e.src = n, e.alt = "", t.appendChild(e);
|
|
415
|
+
} else if (r) {
|
|
416
416
|
let e = E(t);
|
|
417
|
-
queueMicrotask(() => e.render(y(
|
|
417
|
+
queueMicrotask(() => e.render(y(r, { className: "size-[0.95em]" }))), Q.set(t, e);
|
|
418
418
|
} else t.textContent = e;
|
|
419
419
|
return t;
|
|
420
420
|
}
|
|
@@ -424,7 +424,7 @@ function $(e) {
|
|
|
424
424
|
if (!e.isText) return !0;
|
|
425
425
|
let a = e.marks.find((e) => e.type.name === "link"), o = String(a?.attrs.href ?? ""), s = !!a && o === r && i === n;
|
|
426
426
|
if (r = a ? o : "", n = i + e.nodeSize, !a || s || !o.includes("/docs/")) return !1;
|
|
427
|
-
let c =
|
|
427
|
+
let c = l.iconAt(o);
|
|
428
428
|
return c && t.push(C.widget(i, () => pe(c), {
|
|
429
429
|
side: 1,
|
|
430
430
|
marks: [a],
|
|
@@ -447,7 +447,7 @@ var me = b.create({
|
|
|
447
447
|
apply: (e, t) => e.docChanged || e.getMeta(Z) ? $(e.doc) : t
|
|
448
448
|
},
|
|
449
449
|
props: { decorations: (e) => Z.getState(e) },
|
|
450
|
-
view: (e) => ({ destroy:
|
|
450
|
+
view: (e) => ({ destroy: l.subscribe(() => {
|
|
451
451
|
e.isDestroyed || e.dispatch(e.state.tr.setMeta(Z, !0));
|
|
452
452
|
}) })
|
|
453
453
|
})];
|
package/components/settings.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { usePageTitle as e } from "../lib/pageTitle.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { useCan as t } from "../lib/roles.js";
|
|
3
|
+
import { usePathname as n } from "../lib/router.js";
|
|
4
4
|
import { useSettingsPages as r } from "./SettingsNav.js";
|
|
5
5
|
import { Callout as i, PageHeader as a } from "@parallelworks/ui";
|
|
6
6
|
import { useParams as o } from "@tanstack/react-router";
|
|
@@ -18,8 +18,8 @@ function f() {
|
|
|
18
18
|
};
|
|
19
19
|
}
|
|
20
20
|
function p(e) {
|
|
21
|
-
let
|
|
22
|
-
label:
|
|
21
|
+
let t = l("settingsNav"), { workspace: i = "" } = o({ strict: !1 }), a = n(), s = r(), c = [{
|
|
22
|
+
label: t("label"),
|
|
23
23
|
href: `/${i}/settings`
|
|
24
24
|
}], u;
|
|
25
25
|
for (let e of s) for (let t of e.items) {
|
|
@@ -69,8 +69,8 @@ function m({ title: t, description: n, wide: r = !1, actions: i, toolbar: o, chi
|
|
|
69
69
|
});
|
|
70
70
|
}
|
|
71
71
|
var h = "divide-y divide-border", g = "flex gap-2 border-t border-border px-3 py-2";
|
|
72
|
-
function _({ workspace: e, permission:
|
|
73
|
-
let r =
|
|
72
|
+
function _({ workspace: e, permission: n = "manage_workspace" }) {
|
|
73
|
+
let r = t(e, n), a = l("settings");
|
|
74
74
|
return r ? null : /* @__PURE__ */ u(i, {
|
|
75
75
|
tone: "muted",
|
|
76
76
|
className: "mb-6",
|
package/components/video.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { attachmentIdOf as e, githubMedia as t, githubUpload as n } from "../lib/attachments.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { videoMarkdown as r, videoTag as i } from "../lib/videoMarkdown.js";
|
|
3
|
+
import { plainLink as a, recordingPlayer as o, unplayable as s } from "./editorPlugins.js";
|
|
4
4
|
import { Node as c, mergeAttributes as l } from "@tiptap/react";
|
|
5
5
|
// src/components/video.ts
|
|
6
6
|
function u(e) {
|
|
@@ -24,9 +24,9 @@ var d = c.create({
|
|
|
24
24
|
controls: "",
|
|
25
25
|
preload: "metadata"
|
|
26
26
|
})],
|
|
27
|
-
addNodeView: () => ({ node:
|
|
28
|
-
let
|
|
29
|
-
return c.className = "video-block", n(
|
|
27
|
+
addNodeView: () => ({ node: r }) => {
|
|
28
|
+
let i = String(r.attrs.src ?? ""), c = document.createElement("div");
|
|
29
|
+
return c.className = "video-block", n(i) || t(i) || e(i) ? c.append(o(i, (e) => s(e, i, !0))) : c.append(a(i)), {
|
|
30
30
|
dom: c,
|
|
31
31
|
ignoreMutation: () => !0
|
|
32
32
|
};
|
|
@@ -37,7 +37,7 @@ var d = c.create({
|
|
|
37
37
|
level: "block",
|
|
38
38
|
start: (e) => e.search(/^<video\b/im),
|
|
39
39
|
tokenize: (e) => {
|
|
40
|
-
let t =
|
|
40
|
+
let t = i(e);
|
|
41
41
|
return t ? {
|
|
42
42
|
type: "video",
|
|
43
43
|
raw: t.raw,
|
|
@@ -46,6 +46,6 @@ var d = c.create({
|
|
|
46
46
|
}
|
|
47
47
|
},
|
|
48
48
|
parseMarkdown: (e, t) => t.createNode("video", { src: e.text ?? "" }),
|
|
49
|
-
renderMarkdown: (e) =>
|
|
49
|
+
renderMarkdown: (e) => r(String(e.attrs?.src ?? ""))
|
|
50
50
|
});
|
|
51
51
|
export { d as VideoBlock };
|
package/hostedApp.js
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { SharedUI as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { loadMessages as e, locales as t } from "./_virtual/_virtual_i18n.js";
|
|
2
|
+
import { SharedUI as n } from "./components/SharedUI.js";
|
|
3
|
+
import { HostProvider as r } from "./lib/host.js";
|
|
4
|
+
import { setShownPath as i } from "./lib/listSearch.js";
|
|
5
|
+
import { PageTitle as a } from "./lib/pageTitle.js";
|
|
6
6
|
import { useRouter as o } from "@tanstack/react-router";
|
|
7
7
|
import { use as s, useEffect as c, useRef as l } from "react";
|
|
8
8
|
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
9
9
|
import { LocaleProvider as f, useSetLocale as p } from "@parallelworks/i18n/react";
|
|
10
10
|
import { QueryClientProvider as m } from "@tanstack/react-query";
|
|
11
11
|
// src/hostedApp.tsx
|
|
12
|
-
function h({ host:
|
|
13
|
-
return /* @__PURE__ */ u(
|
|
14
|
-
host:
|
|
12
|
+
function h({ host: e, queryClient: t, children: i }) {
|
|
13
|
+
return /* @__PURE__ */ u(r, {
|
|
14
|
+
host: e,
|
|
15
15
|
children: /* @__PURE__ */ u(y, {
|
|
16
|
-
locale:
|
|
16
|
+
locale: e.locale,
|
|
17
17
|
children: /* @__PURE__ */ d(m, {
|
|
18
|
-
client:
|
|
18
|
+
client: t,
|
|
19
19
|
children: [
|
|
20
20
|
/* @__PURE__ */ u(x, {
|
|
21
|
-
identity:
|
|
22
|
-
queryClient:
|
|
21
|
+
identity: e.identity,
|
|
22
|
+
queryClient: t
|
|
23
23
|
}),
|
|
24
24
|
/* @__PURE__ */ u(S, {}),
|
|
25
25
|
/* @__PURE__ */ u(C, {}),
|
|
26
|
-
/* @__PURE__ */ u(
|
|
27
|
-
/* @__PURE__ */ u(
|
|
26
|
+
/* @__PURE__ */ u(a, {}),
|
|
27
|
+
/* @__PURE__ */ u(n, { children: /* @__PURE__ */ u("div", {
|
|
28
28
|
className: "tandem flex h-full min-h-0 flex-col",
|
|
29
|
-
children:
|
|
29
|
+
children: i
|
|
30
30
|
}) })
|
|
31
31
|
]
|
|
32
32
|
})
|
|
@@ -34,21 +34,21 @@ function h({ host: n, queryClient: r, children: a }) {
|
|
|
34
34
|
});
|
|
35
35
|
}
|
|
36
36
|
var g = /* @__PURE__ */ new Map();
|
|
37
|
-
function _(
|
|
38
|
-
let
|
|
39
|
-
return
|
|
37
|
+
function _(t) {
|
|
38
|
+
let n = g.get(t);
|
|
39
|
+
return n || (n = e(t).catch(() => e("en")), g.set(t, n)), n;
|
|
40
40
|
}
|
|
41
|
-
var v = (e) =>
|
|
42
|
-
function y({ locale:
|
|
43
|
-
let r = l(v(
|
|
41
|
+
var v = (e) => t.includes(e) ? e : "en";
|
|
42
|
+
function y({ locale: t, children: n }) {
|
|
43
|
+
let r = l(v(t)), i = s(_(r.current));
|
|
44
44
|
return /* @__PURE__ */ d(f, {
|
|
45
45
|
initial: {
|
|
46
46
|
locale: r.current,
|
|
47
47
|
messages: i
|
|
48
48
|
},
|
|
49
|
-
load:
|
|
49
|
+
load: e,
|
|
50
50
|
fallbackLocale: "en",
|
|
51
|
-
children: [/* @__PURE__ */ u(b, { locale: v(
|
|
51
|
+
children: [/* @__PURE__ */ u(b, { locale: v(t) }), n]
|
|
52
52
|
});
|
|
53
53
|
}
|
|
54
54
|
function b({ locale: e }) {
|
|
@@ -65,7 +65,7 @@ function x({ identity: e, queryClient: t }) {
|
|
|
65
65
|
}
|
|
66
66
|
function S() {
|
|
67
67
|
let e = o();
|
|
68
|
-
return c(() => (
|
|
68
|
+
return c(() => (i(e.state.location.pathname), e.subscribe("onResolved", ({ toLocation: e }) => i(e.pathname))), [e]), null;
|
|
69
69
|
}
|
|
70
70
|
function C() {
|
|
71
71
|
return c(() => (document.body.dataset.tandem = "", () => {
|
package/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { ErrorMessage as e, Pending as t } from "./components/status.js";
|
|
2
|
+
import { appPath as n, mountAt as r, routerBase as i } from "./lib/base.js";
|
|
3
3
|
import { issueAddresses as a } from "./lib/branch.js";
|
|
4
4
|
import { ErrorPage as o } from "@parallelworks/ui";
|
|
5
5
|
import { notFound as s, redirect as c } from "@tanstack/react-router";
|
|
@@ -20,32 +20,32 @@ var d = /* @__PURE__ */ new Set([
|
|
|
20
20
|
"icon-192.png"
|
|
21
21
|
]);
|
|
22
22
|
function f({ mountPath: f }) {
|
|
23
|
-
|
|
23
|
+
r(f);
|
|
24
24
|
let m, g, _ = () => (g ??= Promise.all([import("./hostedApp.js"), import("./lib/queryClient.js").then((e) => e.createQueryClient())]).then(([e, t]) => (m = {
|
|
25
25
|
HostedApp: e.default,
|
|
26
26
|
client: t
|
|
27
27
|
}, m)), g), v, y, b, x = !1, S = async (e) => {
|
|
28
|
-
let t = v,
|
|
29
|
-
throw !t || !
|
|
30
|
-
let
|
|
31
|
-
for (let e of
|
|
32
|
-
p(
|
|
28
|
+
let t = v, n = y;
|
|
29
|
+
throw !t || !n ? Error("Tandem: call mount and connect before opening a page") : (b ??= import("./pages.js").then(({ splitPages: e }) => {
|
|
30
|
+
let r = e();
|
|
31
|
+
for (let e of r.frameless) Object.assign(e.options, { path: i + e.options.path });
|
|
32
|
+
p(n.framed, r.framed), p(n.frameless, r.frameless), t.setRoutes(t.buildRouteTree()), x = !0;
|
|
33
33
|
}), await b, c({
|
|
34
34
|
href: e,
|
|
35
35
|
replace: !0
|
|
36
36
|
}));
|
|
37
37
|
};
|
|
38
38
|
return {
|
|
39
|
-
mountPath:
|
|
39
|
+
mountPath: i,
|
|
40
40
|
contains: h,
|
|
41
|
-
hosts: (
|
|
41
|
+
hosts: (e) => h(e) && !d.has(n(e).split("/")[1] ?? ""),
|
|
42
42
|
route: {
|
|
43
43
|
beforeLoad: async ({ location: e }) => {
|
|
44
44
|
let t = _();
|
|
45
45
|
return x || await S(e.href), { queryClient: (await t).client };
|
|
46
46
|
},
|
|
47
|
-
pendingComponent:
|
|
48
|
-
errorComponent: ({ error:
|
|
47
|
+
pendingComponent: t,
|
|
48
|
+
errorComponent: ({ error: t }) => /* @__PURE__ */ u(e, { error: t }),
|
|
49
49
|
notFoundComponent: (e) => /* @__PURE__ */ u("div", {
|
|
50
50
|
className: "flex h-full",
|
|
51
51
|
children: /* @__PURE__ */ u(o, { status: 404 })
|
|
@@ -56,7 +56,7 @@ function f({ mountPath: f }) {
|
|
|
56
56
|
if (x) throw s();
|
|
57
57
|
_(), await S(e.href);
|
|
58
58
|
},
|
|
59
|
-
pendingComponent:
|
|
59
|
+
pendingComponent: t
|
|
60
60
|
},
|
|
61
61
|
mount(e, t) {
|
|
62
62
|
y = {
|
|
@@ -81,13 +81,13 @@ function f({ mountPath: f }) {
|
|
|
81
81
|
}
|
|
82
82
|
};
|
|
83
83
|
}
|
|
84
|
-
function p(
|
|
85
|
-
for (let
|
|
86
|
-
|
|
87
|
-
|
|
84
|
+
function p(n, r) {
|
|
85
|
+
for (let e of r) Object.assign(e.options, { getParentRoute: () => n });
|
|
86
|
+
n.addChildren([...m(n), ...r]), g(r, (n) => {
|
|
87
|
+
n.options.preloadStaleTime ??= 0, n.options.pendingComponent ??= t, n.options.errorComponent ??= ({ error: t }) => /* @__PURE__ */ u(e, { error: t });
|
|
88
88
|
});
|
|
89
89
|
}
|
|
90
|
-
var m = (e) => Array.isArray(e.children) ? e.children : Object.values(e.children ?? {}), h = (e) => e ===
|
|
90
|
+
var m = (e) => Array.isArray(e.children) ? e.children : Object.values(e.children ?? {}), h = (e) => e === i || e.startsWith(`${i}/`);
|
|
91
91
|
function g(e, t) {
|
|
92
92
|
for (let n of e) t(n), n.children && g(m(n), t);
|
|
93
93
|
}
|