@parallelworks/tandem-web 0.191.0 → 0.192.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 +3 -2
- package/_virtual/_virtual_i18n/es/common.js +3 -2
- package/_virtual/_virtual_i18n/ja/common.js +3 -2
- package/_virtual/_virtual_i18n/ko/common.js +3 -2
- package/_virtual/_virtual_i18n/zh/common.js +3 -2
- package/api/queries.js +13 -5
- package/components/Editor.js +101 -99
- package/components/HoverCards.js +121 -121
- package/components/IssueEvent.js +1 -0
- package/components/StatusRules.js +1 -1
- package/components/docLink.js +18 -0
- package/lib/base.js +10 -1
- package/lib/listSearch.js +13 -10
- package/package.json +2 -1
- package/pages/issues.js +466 -414
- package/pages/triage.js +165 -167
- package/routes/_workspace/docs/_doc2.js +2 -2
- package/routes/_workspace/settings/audit-log3.js +1 -0
- package/routes/_workspace2.js +357 -383
package/components/HoverCards.js
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
import { api as e, unwrap as t } from "../api/client.js";
|
|
2
2
|
import { docQuery as n, docsQuery as r, knowledgeQuery as i, membersQuery as a, teamsQuery as o } from "../api/queries.js";
|
|
3
|
-
import { appPath as s, basePath as c } from "../lib/base.js";
|
|
4
|
-
import { docLooks as
|
|
5
|
-
import { docKey as
|
|
6
|
-
import { glossary as
|
|
7
|
-
import { issueRefs as
|
|
8
|
-
import { useTermRefs as
|
|
9
|
-
import { termRef as
|
|
10
|
-
import { mentionable as
|
|
11
|
-
import { Link as
|
|
12
|
-
import { teamNames as
|
|
13
|
-
import { DocIcon as
|
|
14
|
-
import { termCaretEvent as
|
|
15
|
-
import { FileTextIcon as
|
|
16
|
-
import { PersonCard as
|
|
17
|
-
import { HoverCard as
|
|
18
|
-
import { useEffect as
|
|
19
|
-
import { useTranslations as
|
|
20
|
-
import { Fragment as
|
|
21
|
-
import { useQuery as
|
|
3
|
+
import { appPath as s, basePath as c, storedHref as l } from "../lib/base.js";
|
|
4
|
+
import { docLooks as u } from "../lib/docLooks.js";
|
|
5
|
+
import { docKey as d, docRef as f } from "../lib/docs.js";
|
|
6
|
+
import { glossary as p, headingAnchor as m } from "../lib/glossary.js";
|
|
7
|
+
import { issueRefs as h } from "../lib/issueRefs.js";
|
|
8
|
+
import { useTermRefs as g } from "../lib/knowledge.js";
|
|
9
|
+
import { termRef as _ } from "../lib/knowledgeKinds.js";
|
|
10
|
+
import { mentionable as v } from "../lib/mentions.js";
|
|
11
|
+
import { Link as y, useNavigate as b } from "../lib/router.js";
|
|
12
|
+
import { teamNames as x } from "../lib/teamNames.js";
|
|
13
|
+
import { DocIcon as S } from "./DocIcon.js";
|
|
14
|
+
import { termCaretEvent as C } from "./editorPlugins.js";
|
|
15
|
+
import { FileTextIcon as w } from "./icons.js";
|
|
16
|
+
import { PersonCard as T } from "./PersonHoverCard.js";
|
|
17
|
+
import { HoverCard as E, Loader as D } from "@parallelworks/ui";
|
|
18
|
+
import { useEffect as O, useRef as k, useState as A } from "react";
|
|
19
|
+
import { useTranslations as j } from "use-intl";
|
|
20
|
+
import { Fragment as M, jsx as N, jsxs as P } from "react/jsx-runtime";
|
|
21
|
+
import { useQuery as F, useQueryClient as I } from "@tanstack/react-query";
|
|
22
22
|
// src/components/HoverCards.tsx
|
|
23
|
-
var
|
|
24
|
-
function
|
|
25
|
-
let t = e?.closest(
|
|
23
|
+
var L = ".kb-term, .person-mention, .prose-issue a[href*=\"/docs/\"]", R = 300, z = 200;
|
|
24
|
+
function B(e) {
|
|
25
|
+
let t = e?.closest(L);
|
|
26
26
|
if (!t) return null;
|
|
27
27
|
if (t.classList.contains("kb-term")) {
|
|
28
28
|
let e = t.dataset.term;
|
|
@@ -44,88 +44,88 @@ function z(e) {
|
|
|
44
44
|
return r?.[1] ? {
|
|
45
45
|
kind: "doc",
|
|
46
46
|
el: t,
|
|
47
|
-
key:
|
|
47
|
+
key: d(r[1])
|
|
48
48
|
} : null;
|
|
49
49
|
}
|
|
50
|
-
function
|
|
50
|
+
function V(e) {
|
|
51
51
|
if (!e.closest(".ProseMirror")) return null;
|
|
52
52
|
let t = new URL(e.getAttribute("href") ?? "", location.href);
|
|
53
53
|
if (t.origin !== location.origin) return null;
|
|
54
|
-
let n = s(t.pathname);
|
|
54
|
+
let n = l(s(t.pathname));
|
|
55
55
|
return /^\/[^/]+\/docs\/(?!space\/)[^/]+\/?$/.test(n) ? n + t.hash : null;
|
|
56
56
|
}
|
|
57
|
-
var
|
|
58
|
-
function
|
|
59
|
-
let [s, c] =
|
|
60
|
-
|
|
61
|
-
let t =
|
|
62
|
-
|
|
57
|
+
var H = (e) => location.origin + c + e;
|
|
58
|
+
function U({ workspace: n }) {
|
|
59
|
+
let [s, c] = A(null), l = k(null), d = k(void 0), { data: f } = F(i(n)), m = b(), g = k((e) => {});
|
|
60
|
+
g.current = (e) => {
|
|
61
|
+
let t = f?.find((t) => t.id === e);
|
|
62
|
+
m({
|
|
63
63
|
to: "/$workspace/knowledge/$term",
|
|
64
64
|
params: {
|
|
65
65
|
workspace: n,
|
|
66
|
-
term: t ?
|
|
66
|
+
term: t ? _(t) : e
|
|
67
67
|
}
|
|
68
68
|
});
|
|
69
|
-
},
|
|
70
|
-
|
|
71
|
-
}, [
|
|
72
|
-
let { data:
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
}, [
|
|
76
|
-
let { data:
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
}, [
|
|
80
|
-
let { data:
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
}, [
|
|
84
|
-
let
|
|
85
|
-
|
|
86
|
-
|
|
69
|
+
}, O(() => {
|
|
70
|
+
p.set(f ?? []);
|
|
71
|
+
}, [f]), O(() => () => p.set([]), []);
|
|
72
|
+
let { data: y } = F(r(n));
|
|
73
|
+
O(() => {
|
|
74
|
+
u.set(y ?? []);
|
|
75
|
+
}, [y]), O(() => () => u.set([]), []);
|
|
76
|
+
let { data: S } = F(a(n));
|
|
77
|
+
O(() => {
|
|
78
|
+
v.set((S ?? []).map((e) => e.user.username));
|
|
79
|
+
}, [S]), O(() => () => v.set([]), []);
|
|
80
|
+
let { data: w } = F(o(n));
|
|
81
|
+
O(() => {
|
|
82
|
+
x.set(w ?? []);
|
|
83
|
+
}, [w]), O(() => () => x.set([]), []);
|
|
84
|
+
let D = I();
|
|
85
|
+
O(() => {
|
|
86
|
+
h.set(n, async (r) => {
|
|
87
87
|
let { issues: i } = t(await e.POST("/api/v1/workspaces/{workspace}/issue-refs", {
|
|
88
88
|
params: { path: { workspace: n } },
|
|
89
89
|
body: { identifiers: r }
|
|
90
90
|
}));
|
|
91
91
|
return new Map(i.map((e) => [e.identifier, e.issue]));
|
|
92
92
|
});
|
|
93
|
-
let r, i =
|
|
94
|
-
e.type === "updated" && e.query.queryKey[2] === "issues" && (clearTimeout(r), r = setTimeout(() =>
|
|
93
|
+
let r, i = D.getQueryCache().subscribe((e) => {
|
|
94
|
+
e.type === "updated" && e.query.queryKey[2] === "issues" && (clearTimeout(r), r = setTimeout(() => h.refresh(), 1e3));
|
|
95
95
|
});
|
|
96
96
|
return () => {
|
|
97
|
-
clearTimeout(r), i(),
|
|
97
|
+
clearTimeout(r), i(), h.set("", void 0);
|
|
98
98
|
};
|
|
99
|
-
}, [n,
|
|
100
|
-
let j =
|
|
101
|
-
j.current = (e) =>
|
|
99
|
+
}, [n, D]);
|
|
100
|
+
let j = k((e) => {});
|
|
101
|
+
j.current = (e) => m({
|
|
102
102
|
to: "/$workspace/issues/$identifier",
|
|
103
103
|
params: {
|
|
104
104
|
workspace: n,
|
|
105
105
|
identifier: e
|
|
106
106
|
}
|
|
107
107
|
});
|
|
108
|
-
let
|
|
109
|
-
|
|
110
|
-
let
|
|
111
|
-
|
|
108
|
+
let M = k((e) => {});
|
|
109
|
+
M.current = (e) => m({ href: e });
|
|
110
|
+
let P = k((e) => {});
|
|
111
|
+
P.current = (e) => m({
|
|
112
112
|
to: "/$workspace/teams/$key/issues",
|
|
113
113
|
params: {
|
|
114
114
|
workspace: n,
|
|
115
115
|
key: e
|
|
116
116
|
}
|
|
117
|
-
}),
|
|
117
|
+
}), O(() => {
|
|
118
118
|
let e = (e, t) => {
|
|
119
119
|
clearTimeout(d.current), d.current = setTimeout(e, t);
|
|
120
120
|
}, t = (t) => {
|
|
121
121
|
if (t.pointerType === "touch") return;
|
|
122
|
-
let n =
|
|
123
|
-
n && e(() => c(n),
|
|
122
|
+
let n = B(t.target);
|
|
123
|
+
n && e(() => c(n), R);
|
|
124
124
|
}, n = (t) => {
|
|
125
125
|
let n = t.relatedTarget;
|
|
126
|
-
n &&
|
|
126
|
+
n && l.current?.contains(n) || B(t.target) && e(() => c(null), z);
|
|
127
127
|
}, r = (e) => {
|
|
128
|
-
let t =
|
|
128
|
+
let t = B(e.target);
|
|
129
129
|
t && (clearTimeout(d.current), c(t));
|
|
130
130
|
}, i = (e) => {
|
|
131
131
|
e.target.matches?.(".kb-term[tabindex], .prose-issue a[href*=\"/docs/\"]") && r(e);
|
|
@@ -141,99 +141,99 @@ function H({ workspace: n }) {
|
|
|
141
141
|
return;
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
|
-
let a = e.target.closest?.("a[href]"), o = a && e.button === 0 ?
|
|
144
|
+
let a = e.target.closest?.("a[href]"), o = a && e.button === 0 ? V(a) : null;
|
|
145
145
|
if (a && o) {
|
|
146
|
-
e.preventDefault(), c(null), e.metaKey || e.ctrlKey || e.shiftKey ? window.open(
|
|
146
|
+
e.preventDefault(), c(null), e.metaKey || e.ctrlKey || e.shiftKey ? window.open(H(o), "_blank", "noopener") : M.current(o);
|
|
147
147
|
return;
|
|
148
148
|
}
|
|
149
149
|
let s = e.target.closest?.(".team-mention"), l = s?.dataset.team;
|
|
150
150
|
if (s && l && (!s.closest("[contenteditable=\"true\"]") || e.metaKey || e.ctrlKey)) {
|
|
151
|
-
e.preventDefault(),
|
|
151
|
+
e.preventDefault(), P.current(l);
|
|
152
152
|
return;
|
|
153
153
|
}
|
|
154
154
|
let u = e.target.closest?.(".kb-term");
|
|
155
155
|
if (!u) return;
|
|
156
156
|
let d = u.dataset.term;
|
|
157
|
-
d && (!u.closest("[contenteditable=\"true\"]") || e.metaKey || e.ctrlKey) ? (e.preventDefault(), c(null),
|
|
157
|
+
d && (!u.closest("[contenteditable=\"true\"]") || e.metaKey || e.ctrlKey) ? (e.preventDefault(), c(null), g.current(d)) : r(e);
|
|
158
158
|
}, o = (e) => {
|
|
159
159
|
if (e.button !== 1) return;
|
|
160
160
|
let t = e.target.closest?.("a[href]");
|
|
161
161
|
if (!t?.closest("[contenteditable=\"true\"]")) return;
|
|
162
|
-
let n =
|
|
163
|
-
(t.classList.contains("issue-mention") || n) && (e.preventDefault(), window.open(n ?
|
|
162
|
+
let n = V(t);
|
|
163
|
+
(t.classList.contains("issue-mention") || n) && (e.preventDefault(), window.open(n ? H(n) : t.href, "_blank", "noopener"));
|
|
164
164
|
}, s = (e) => {
|
|
165
|
-
e.key === "Escape" &&
|
|
165
|
+
e.key === "Escape" && l.current?.isConnected && (e.stopPropagation(), e.preventDefault(), c((e) => (e?.el.tabIndex === 0 && e.el.focus(), null)));
|
|
166
166
|
};
|
|
167
|
-
return document.addEventListener("pointerover", t), document.addEventListener("pointerout", n), document.addEventListener("focusin", i), document.addEventListener("click", a), document.addEventListener("auxclick", o), document.addEventListener(
|
|
168
|
-
clearTimeout(d.current), document.removeEventListener("pointerover", t), document.removeEventListener("pointerout", n), document.removeEventListener("focusin", i), document.removeEventListener("click", a), document.removeEventListener("auxclick", o), document.removeEventListener(
|
|
167
|
+
return document.addEventListener("pointerover", t), document.addEventListener("pointerout", n), document.addEventListener("focusin", i), document.addEventListener("click", a), document.addEventListener("auxclick", o), document.addEventListener(C, r), document.addEventListener("keydown", s, !0), () => {
|
|
168
|
+
clearTimeout(d.current), document.removeEventListener("pointerover", t), document.removeEventListener("pointerout", n), document.removeEventListener("focusin", i), document.removeEventListener("click", a), document.removeEventListener("auxclick", o), document.removeEventListener(C, r), document.removeEventListener("keydown", s, !0);
|
|
169
169
|
};
|
|
170
|
-
}, []),
|
|
170
|
+
}, []), O(() => {
|
|
171
171
|
if (!s) return;
|
|
172
172
|
let e = (e) => {
|
|
173
173
|
let t = e.target;
|
|
174
|
-
!
|
|
174
|
+
!l.current?.contains(t) && !s.el.contains(t) && c(null);
|
|
175
175
|
};
|
|
176
176
|
return document.addEventListener("pointerdown", e), () => document.removeEventListener("pointerdown", e);
|
|
177
177
|
}, [s]);
|
|
178
|
-
let
|
|
179
|
-
return /* @__PURE__ */
|
|
180
|
-
at:
|
|
181
|
-
open: !!
|
|
178
|
+
let L = s?.el.isConnected ? s : null;
|
|
179
|
+
return /* @__PURE__ */ N(E, {
|
|
180
|
+
at: L?.el ?? null,
|
|
181
|
+
open: !!L,
|
|
182
182
|
onOpenChange: (e) => {
|
|
183
183
|
e || c(null);
|
|
184
184
|
},
|
|
185
185
|
onPointerEnter: () => clearTimeout(d.current),
|
|
186
186
|
onPointerLeave: () => {
|
|
187
|
-
clearTimeout(d.current), d.current = setTimeout(() => c(null),
|
|
187
|
+
clearTimeout(d.current), d.current = setTimeout(() => c(null), z);
|
|
188
188
|
},
|
|
189
|
-
card:
|
|
190
|
-
ref:
|
|
189
|
+
card: L && /* @__PURE__ */ N("div", {
|
|
190
|
+
ref: l,
|
|
191
191
|
role: "dialog",
|
|
192
|
-
"aria-label":
|
|
193
|
-
className:
|
|
194
|
-
children:
|
|
192
|
+
"aria-label": L.kind === "doc" ? L.key : L.kind === "person" ? L.username : void 0,
|
|
193
|
+
className: L.kind === "person" ? "" : "w-80 max-w-[calc(100vw-16px)] p-3 text-sm",
|
|
194
|
+
children: L.kind === "term" ? /* @__PURE__ */ N(W, {
|
|
195
195
|
workspace: n,
|
|
196
|
-
entry:
|
|
197
|
-
}) :
|
|
196
|
+
entry: f?.find((e) => e.id === L.id)
|
|
197
|
+
}) : L.kind === "person" ? /* @__PURE__ */ N(T, {
|
|
198
198
|
workspace: n,
|
|
199
|
-
handle:
|
|
200
|
-
}) : /* @__PURE__ */
|
|
199
|
+
handle: L.username
|
|
200
|
+
}) : /* @__PURE__ */ N(K, {
|
|
201
201
|
workspace: n,
|
|
202
|
-
docKey:
|
|
202
|
+
docKey: L.key
|
|
203
203
|
})
|
|
204
204
|
})
|
|
205
205
|
});
|
|
206
206
|
}
|
|
207
|
-
function
|
|
208
|
-
let n =
|
|
209
|
-
if (!t) return /* @__PURE__ */
|
|
207
|
+
function W({ workspace: e, entry: t }) {
|
|
208
|
+
let n = j("knowledge"), r = g(e);
|
|
209
|
+
if (!t) return /* @__PURE__ */ N("p", {
|
|
210
210
|
className: "text-muted-foreground",
|
|
211
211
|
children: n("gone")
|
|
212
212
|
});
|
|
213
213
|
let i = t.source.doc;
|
|
214
|
-
return /* @__PURE__ */
|
|
215
|
-
/* @__PURE__ */
|
|
214
|
+
return /* @__PURE__ */ P(M, { children: [
|
|
215
|
+
/* @__PURE__ */ P("p", {
|
|
216
216
|
className: "flex items-center gap-2",
|
|
217
|
-
children: [/* @__PURE__ */
|
|
217
|
+
children: [/* @__PURE__ */ N(y, {
|
|
218
218
|
to: "/$workspace/knowledge/$term",
|
|
219
219
|
params: {
|
|
220
220
|
workspace: e,
|
|
221
|
-
term:
|
|
221
|
+
term: _(t)
|
|
222
222
|
},
|
|
223
223
|
className: "font-semibold hover:underline",
|
|
224
224
|
children: t.name
|
|
225
|
-
}), /* @__PURE__ */
|
|
225
|
+
}), /* @__PURE__ */ N("span", {
|
|
226
226
|
className: "text-xs text-muted-foreground",
|
|
227
227
|
children: n(`kind.${t.kind}`)
|
|
228
228
|
})]
|
|
229
229
|
}),
|
|
230
|
-
/* @__PURE__ */
|
|
230
|
+
/* @__PURE__ */ N("p", {
|
|
231
231
|
className: "mt-1.5 text-foreground",
|
|
232
232
|
children: t.definition
|
|
233
233
|
}),
|
|
234
|
-
t.supersededBy && /* @__PURE__ */
|
|
234
|
+
t.supersededBy && /* @__PURE__ */ N("p", {
|
|
235
235
|
className: "mt-1.5 text-xs",
|
|
236
|
-
children: /* @__PURE__ */
|
|
236
|
+
children: /* @__PURE__ */ N(y, {
|
|
237
237
|
to: "/$workspace/knowledge/$term",
|
|
238
238
|
params: {
|
|
239
239
|
workspace: e,
|
|
@@ -243,21 +243,21 @@ function U({ workspace: e, entry: t }) {
|
|
|
243
243
|
children: n("supersededBy", { name: t.supersededByName ?? "" })
|
|
244
244
|
})
|
|
245
245
|
}),
|
|
246
|
-
(i || t.source.identifier) && /* @__PURE__ */
|
|
246
|
+
(i || t.source.identifier) && /* @__PURE__ */ P("p", {
|
|
247
247
|
className: "mt-2 flex flex-wrap gap-x-3 gap-y-1 text-xs text-muted-foreground",
|
|
248
|
-
children: [i && /* @__PURE__ */
|
|
248
|
+
children: [i && /* @__PURE__ */ P(y, {
|
|
249
249
|
to: "/$workspace/docs/$doc",
|
|
250
250
|
params: {
|
|
251
251
|
workspace: e,
|
|
252
|
-
doc:
|
|
252
|
+
doc: f(i)
|
|
253
253
|
},
|
|
254
|
-
...t.source.section && { hash:
|
|
254
|
+
...t.source.section && { hash: m(t.source.section) },
|
|
255
255
|
className: "inline-flex items-center gap-1 hover:text-foreground",
|
|
256
|
-
children: [/* @__PURE__ */
|
|
256
|
+
children: [/* @__PURE__ */ N(w, { className: "size-3" }), t.source.section ? n("sourceSection", {
|
|
257
257
|
doc: i.title,
|
|
258
258
|
section: t.source.section
|
|
259
259
|
}) : i.title]
|
|
260
|
-
}), t.source.identifier && /* @__PURE__ */
|
|
260
|
+
}), t.source.identifier && /* @__PURE__ */ N(y, {
|
|
261
261
|
to: "/$workspace/issues/$identifier",
|
|
262
262
|
params: {
|
|
263
263
|
workspace: e,
|
|
@@ -267,41 +267,41 @@ function U({ workspace: e, entry: t }) {
|
|
|
267
267
|
children: t.source.identifier
|
|
268
268
|
})]
|
|
269
269
|
}),
|
|
270
|
-
/* @__PURE__ */
|
|
270
|
+
/* @__PURE__ */ N(y, {
|
|
271
271
|
to: "/$workspace/knowledge/$term",
|
|
272
272
|
params: {
|
|
273
273
|
workspace: e,
|
|
274
|
-
term:
|
|
274
|
+
term: _(t)
|
|
275
275
|
},
|
|
276
276
|
className: "mt-2 block text-xs text-primary hover:underline",
|
|
277
277
|
children: n("openEntry")
|
|
278
278
|
})
|
|
279
279
|
] });
|
|
280
280
|
}
|
|
281
|
-
function
|
|
281
|
+
function G(e) {
|
|
282
282
|
return e.split("\n").map((e) => e.replace(/^#{1,6}\s+|^[-*>]\s+|^\d+\.\s+|\[[ x]\]\s*/g, "").replace(/[*_`]/g, "")).filter((e) => e.trim()).slice(0, 4).join(" ").slice(0, 280);
|
|
283
283
|
}
|
|
284
|
-
function
|
|
285
|
-
let r =
|
|
284
|
+
function K({ workspace: e, docKey: t }) {
|
|
285
|
+
let r = j("docLinks"), { data: i, isError: a } = F({
|
|
286
286
|
...n(e, t),
|
|
287
287
|
retry: !1
|
|
288
288
|
});
|
|
289
|
-
return a ? /* @__PURE__ */
|
|
289
|
+
return a ? /* @__PURE__ */ N("p", {
|
|
290
290
|
className: "text-muted-foreground",
|
|
291
291
|
children: r("unavailable")
|
|
292
|
-
}) : i ? /* @__PURE__ */
|
|
292
|
+
}) : i ? /* @__PURE__ */ P(M, { children: [/* @__PURE__ */ P("p", {
|
|
293
293
|
className: "flex items-center gap-2 font-semibold",
|
|
294
|
-
children: [/* @__PURE__ */
|
|
294
|
+
children: [/* @__PURE__ */ N(S, {
|
|
295
295
|
icon: i.icon,
|
|
296
296
|
className: "size-3.5",
|
|
297
297
|
emojiClassName: "text-xs"
|
|
298
|
-
}), /* @__PURE__ */
|
|
298
|
+
}), /* @__PURE__ */ N("span", {
|
|
299
299
|
className: "truncate",
|
|
300
300
|
children: i.title
|
|
301
301
|
})]
|
|
302
|
-
}), /* @__PURE__ */
|
|
302
|
+
}), /* @__PURE__ */ N("p", {
|
|
303
303
|
className: "mt-1.5 line-clamp-4 text-muted-foreground",
|
|
304
|
-
children:
|
|
305
|
-
})] }) : /* @__PURE__ */
|
|
304
|
+
children: G(i.body ?? "") || r("empty")
|
|
305
|
+
})] }) : /* @__PURE__ */ N(D, { size: 16 });
|
|
306
306
|
}
|
|
307
|
-
export {
|
|
307
|
+
export { U as HoverCards };
|
package/components/IssueEvent.js
CHANGED
|
@@ -139,6 +139,7 @@ function p({ workspace: p, event: m }) {
|
|
|
139
139
|
});
|
|
140
140
|
case "issue.triage_accepted": return E("triageAccepted");
|
|
141
141
|
case "issue.triage_declined": return E("triageDeclined");
|
|
142
|
+
case "issue.triage_undone": return E("triageUndone");
|
|
142
143
|
case "decision.requested": return E("decisionRequested");
|
|
143
144
|
case "decision.answered": return E("decisionAnswered");
|
|
144
145
|
default: return E("other", { type: m.type });
|
|
@@ -91,7 +91,7 @@ function w({ workspace: i, team: w, isAdmin: T }) {
|
|
|
91
91
|
children: [E(`fields.${e}`), /* @__PURE__ */ g(s, { text: E(`fieldHelp.${e}`) })]
|
|
92
92
|
})
|
|
93
93
|
}, e)),
|
|
94
|
-
k.map((e) => /* @__PURE__ */ _("tr", { children: [/* @__PURE__ */ g(f.Item, { children: /* @__PURE__ */ g(C, { status: e }) }), S.map((t) => /* @__PURE__ */ g(f.Item, { children: /* @__PURE__ */ g(a, {
|
|
94
|
+
k.filter((e) => e.category !== "triage").map((e) => /* @__PURE__ */ _("tr", { children: [/* @__PURE__ */ g(f.Item, { children: /* @__PURE__ */ g(C, { status: e }) }), S.map((t) => /* @__PURE__ */ g(f.Item, { children: /* @__PURE__ */ g(a, {
|
|
95
95
|
className: "mx-auto",
|
|
96
96
|
"aria-label": E("need", {
|
|
97
97
|
field: E(`fields.${t}`),
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { mountedHref as e, storedHref as t } from "../lib/base.js";
|
|
2
|
+
import n from "@tiptap/extension-link";
|
|
3
|
+
// src/components/docLink.ts
|
|
4
|
+
var r = n.extend({ addAttributes() {
|
|
5
|
+
let n = this.parent?.() ?? {};
|
|
6
|
+
return {
|
|
7
|
+
...n,
|
|
8
|
+
href: {
|
|
9
|
+
...n.href,
|
|
10
|
+
parseHTML: (e) => {
|
|
11
|
+
let n = e.getAttribute("href");
|
|
12
|
+
return n === null ? null : t(n);
|
|
13
|
+
},
|
|
14
|
+
renderHTML: (t) => typeof t.href == "string" ? { href: e(t.href) } : {}
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
} });
|
|
18
|
+
export { r as DocLink };
|
package/lib/base.js
CHANGED
|
@@ -15,4 +15,13 @@ function i(e) {
|
|
|
15
15
|
function a(t) {
|
|
16
16
|
return window.location.origin + e + t;
|
|
17
17
|
}
|
|
18
|
-
|
|
18
|
+
var o = /^\/[^/]+\/docs\/[^/?#]/;
|
|
19
|
+
function s(t) {
|
|
20
|
+
return e && o.test(t) ? e + t : t;
|
|
21
|
+
}
|
|
22
|
+
function c(t) {
|
|
23
|
+
if (!e || !t.startsWith(`${e}/`)) return t;
|
|
24
|
+
let n = t.slice(e.length);
|
|
25
|
+
return o.test(n) ? n : t;
|
|
26
|
+
}
|
|
27
|
+
export { i as appPath, a as appURL, e as basePath, n as mountAt, s as mountedHref, t as routerBase, r as routerPath, c as storedHref };
|
package/lib/listSearch.js
CHANGED
|
@@ -19,16 +19,19 @@ function i(t) {
|
|
|
19
19
|
return {};
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
|
-
var a = (e, t) => JSON.stringify(e) === JSON.stringify(t);
|
|
23
|
-
function
|
|
24
|
-
let
|
|
25
|
-
if (r !== n && u && !a(
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
22
|
+
var a = (e, t) => JSON.stringify(e) === JSON.stringify(t), o = "q";
|
|
23
|
+
function s(r, s, c, l = t()) {
|
|
24
|
+
let u = i(l), { [o]: d, ...f } = u[r] ?? {}, { [o]: p, ...m } = s;
|
|
25
|
+
if (r !== n && u[r] && !a(m, f) && Object.entries(m).every(([e, t]) => a(t, f[e]))) return p === void 0 ? f : {
|
|
26
|
+
...f,
|
|
27
|
+
[o]: p
|
|
28
|
+
};
|
|
29
|
+
if (c) return;
|
|
30
|
+
delete u[r], u[r] = m;
|
|
31
|
+
let h = Object.keys(u);
|
|
32
|
+
for (let e of h.slice(0, Math.max(0, h.length - 100))) delete u[e];
|
|
30
33
|
try {
|
|
31
|
-
|
|
34
|
+
l?.setItem(e, JSON.stringify(u));
|
|
32
35
|
} catch {}
|
|
33
36
|
}
|
|
34
|
-
export {
|
|
37
|
+
export { s as rememberSearch, r as setShownPath };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@parallelworks/tandem-web",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.192.0",
|
|
4
4
|
"description": "Tandem's pages, for a host app to render in its own",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"type": "module",
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
"@tiptap/extension-drag-handle": "3.34.0",
|
|
31
31
|
"@tiptap/extension-drag-handle-react": "3.34.0",
|
|
32
32
|
"@tiptap/extension-image": "^3.34.0",
|
|
33
|
+
"@tiptap/extension-link": "3.34.0",
|
|
33
34
|
"@tiptap/extension-list": "^3.34.0",
|
|
34
35
|
"@tiptap/extension-node-range": "3.34.0",
|
|
35
36
|
"@tiptap/extension-table": "3.34.0",
|