@lincyaw/aegis-ui 0.12.1 → 0.14.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/dist/components/ui/CommitGraph.cjs +1 -1
- package/dist/components/ui/CommitGraph.cjs.map +1 -1
- package/dist/components/ui/CommitGraph.d.ts +23 -5
- package/dist/components/ui/CommitGraph.js +236 -200
- package/dist/components/ui/CommitGraph.js.map +1 -1
- package/dist/components/ui/DataTable.cjs +1 -1
- package/dist/components/ui/DataTable.cjs.map +1 -1
- package/dist/components/ui/DataTable.js +205 -207
- package/dist/components/ui/DataTable.js.map +1 -1
- package/dist/components/ui/DetailBeside.cjs +2 -0
- package/dist/components/ui/DetailBeside.cjs.map +1 -0
- package/dist/components/ui/DetailBeside.d.ts +59 -0
- package/dist/components/ui/DetailBeside.js +117 -0
- package/dist/components/ui/DetailBeside.js.map +1 -0
- package/dist/components/ui/FileTree.cjs +1 -1
- package/dist/components/ui/FileTree.cjs.map +1 -1
- package/dist/components/ui/FileTree.js +118 -111
- package/dist/components/ui/FileTree.js.map +1 -1
- package/dist/components/ui/ServiceMap.cjs +1 -1
- package/dist/components/ui/ServiceMap.cjs.map +1 -1
- package/dist/components/ui/ServiceMap.js +320 -271
- package/dist/components/ui/ServiceMap.js.map +1 -1
- package/dist/components/ui/TraceTree.cjs +1 -1
- package/dist/components/ui/TraceTree.cjs.map +1 -1
- package/dist/components/ui/TraceTree.d.ts +2 -1
- package/dist/components/ui/TraceTree.js +182 -178
- package/dist/components/ui/TraceTree.js.map +1 -1
- package/dist/components/ui/index.d.ts +3 -1
- package/dist/components/ui/selectedRowDetail.cjs +2 -0
- package/dist/components/ui/selectedRowDetail.cjs.map +1 -0
- package/dist/components/ui/selectedRowDetail.d.ts +25 -0
- package/dist/components/ui/selectedRowDetail.js +8 -0
- package/dist/components/ui/selectedRowDetail.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +259 -257
- package/dist/index.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,139 +1,144 @@
|
|
|
1
|
-
import { jsx as r, jsxs as
|
|
2
|
-
import { useMemo as
|
|
3
|
-
import { Tooltip as
|
|
4
|
-
import { useMediaQuery as
|
|
1
|
+
import { jsx as r, jsxs as w, Fragment as I } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo as H, useId as O, useState as P, Fragment as G } from "react";
|
|
3
|
+
import { Tooltip as F } from "antd";
|
|
4
|
+
import { useMediaQuery as U } from "../../hooks/useMediaQuery.js";
|
|
5
5
|
import { Checkbox as W } from "./Checkbox.js";
|
|
6
6
|
import { Chip as Q } from "./Chip.js";
|
|
7
7
|
/* empty css */
|
|
8
|
-
import { useStrings as
|
|
9
|
-
const
|
|
10
|
-
function
|
|
11
|
-
const i = [], t = /* @__PURE__ */ new Map(), o = [],
|
|
12
|
-
const
|
|
13
|
-
return
|
|
8
|
+
import { useStrings as y } from "../../locale/useStrings.js";
|
|
9
|
+
const L = 36, k = 16, X = 104, Y = 56, q = 4, K = "(max-width: 640px)", A = "aegis-commit-graph__part--cut";
|
|
10
|
+
function z(e, a, s) {
|
|
11
|
+
const i = [], t = /* @__PURE__ */ new Map(), o = [], g = () => {
|
|
12
|
+
const c = i.indexOf(null);
|
|
13
|
+
return c === -1 ? i.length : c;
|
|
14
14
|
};
|
|
15
|
-
let
|
|
16
|
-
for (const { commit:
|
|
17
|
-
const
|
|
18
|
-
(
|
|
15
|
+
let n = 0;
|
|
16
|
+
for (const { commit: c, row: m } of e) {
|
|
17
|
+
const _ = i.flatMap(
|
|
18
|
+
(h, f) => h === c.id ? [f] : []
|
|
19
19
|
);
|
|
20
|
-
|
|
21
|
-
i[
|
|
20
|
+
_.forEach((h) => {
|
|
21
|
+
i[h] = null;
|
|
22
22
|
});
|
|
23
|
-
const
|
|
24
|
-
i[
|
|
25
|
-
const
|
|
26
|
-
i[
|
|
27
|
-
}),
|
|
23
|
+
const p = _.length > 0 ? _[0] : g();
|
|
24
|
+
i[p] = null, t.set(m, p), c.parents.filter((h) => !a.has(h) || s(h)).forEach((h, f) => {
|
|
25
|
+
const $ = i.indexOf(h), l = f === 0 ? p : $ === -1 ? g() : $;
|
|
26
|
+
i[l] = h, o.push({ from: m, to: a.get(h) ?? -1, via: l, parent: h });
|
|
27
|
+
}), n = Math.max(n, i.length, p + 1);
|
|
28
28
|
}
|
|
29
|
-
return { trackOf: t, edges: o, tracks:
|
|
29
|
+
return { trackOf: t, edges: o, tracks: n };
|
|
30
30
|
}
|
|
31
|
-
function
|
|
32
|
-
const i = new Map(
|
|
33
|
-
}),
|
|
34
|
-
let
|
|
35
|
-
for (const [
|
|
36
|
-
const
|
|
37
|
-
(
|
|
31
|
+
function J(e, a, s) {
|
|
32
|
+
const i = new Map(e.map((l, S) => [l.id, S])), t = a?.map((l) => l.id) ?? [void 0], o = new Set(t), g = (l) => o.has(l.lane) ? l.lane : t[0], n = e.map(() => 0), c = e.map(() => {
|
|
33
|
+
}), m = [], _ = [];
|
|
34
|
+
let p = 0;
|
|
35
|
+
for (const [l, S] of t.entries()) {
|
|
36
|
+
const v = e.flatMap(
|
|
37
|
+
(d, b) => g(d) === S ? [{ commit: d, row: b }] : []
|
|
38
38
|
);
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
v.forEach(({ row: d }) => {
|
|
40
|
+
c[d] = a?.[l].label;
|
|
41
41
|
});
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}),
|
|
46
|
-
const b =
|
|
47
|
-
|
|
48
|
-
from:
|
|
42
|
+
const N = new Set(v.map(({ commit: d }) => d.id)), x = z(v, i, (d) => N.has(d)), T = Math.max(x.tracks, 1) * k, E = a === void 0 ? T : Math.max(T, s), C = (d) => p + (E - T) / 2 + (d + 0.5) * k;
|
|
43
|
+
x.trackOf.forEach((d, b) => {
|
|
44
|
+
n[b] = C(d);
|
|
45
|
+
}), x.edges.forEach((d) => {
|
|
46
|
+
const b = d.to === -1 ? e.length : d.to;
|
|
47
|
+
m.push({
|
|
48
|
+
from: d.from,
|
|
49
49
|
to: b,
|
|
50
|
-
fromX:
|
|
51
|
-
toX:
|
|
52
|
-
viaX:
|
|
50
|
+
fromX: n[d.from],
|
|
51
|
+
toX: d.to === -1 ? C(d.via) : C(x.trackOf.get(b) ?? 0),
|
|
52
|
+
viaX: C(d.via)
|
|
53
53
|
});
|
|
54
|
-
}),
|
|
54
|
+
}), _.push({ x: p, width: E }), p += E;
|
|
55
55
|
}
|
|
56
|
-
const
|
|
57
|
-
(
|
|
58
|
-
const
|
|
59
|
-
return
|
|
56
|
+
const h = e.flatMap(
|
|
57
|
+
(l, S) => (l.links ?? []).flatMap((v) => {
|
|
58
|
+
const N = i.get(v);
|
|
59
|
+
return N === void 0 ? [] : [{ from: S, to: N, fromX: n[S], toX: n[N] }];
|
|
60
60
|
})
|
|
61
|
-
),
|
|
62
|
-
|
|
63
|
-
|
|
61
|
+
), f = /* @__PURE__ */ new Map();
|
|
62
|
+
m.forEach((l) => {
|
|
63
|
+
f.set(l.from, (f.get(l.from) ?? 0) + 1);
|
|
64
64
|
});
|
|
65
|
-
const
|
|
66
|
-
return { dotX:
|
|
65
|
+
const $ = e.map((l, S) => (f.get(S) ?? 0) > 1);
|
|
66
|
+
return { dotX: n, merge: $, laneLabel: c, edges: m, links: h, lanes: _, width: p };
|
|
67
67
|
}
|
|
68
|
-
const
|
|
69
|
-
function
|
|
70
|
-
const t = (
|
|
71
|
-
return `C ${String(
|
|
68
|
+
const u = (e) => (e + 0.5) * L;
|
|
69
|
+
function M(e, a, s, i) {
|
|
70
|
+
const t = (a + i) / 2;
|
|
71
|
+
return `C ${String(e)} ${String(t)} ${String(s)} ${String(t)} ${String(s)} ${String(i)}`;
|
|
72
72
|
}
|
|
73
|
-
function
|
|
74
|
-
const o = `M ${String(s)} ${String(
|
|
75
|
-
if (
|
|
76
|
-
return `${o} ${
|
|
77
|
-
const
|
|
78
|
-
return [o,
|
|
73
|
+
function V({ from: e, to: a, fromX: s, toX: i, viaX: t }) {
|
|
74
|
+
const o = `M ${String(s)} ${String(u(e))}`;
|
|
75
|
+
if (a - e <= 1)
|
|
76
|
+
return `${o} ${M(s, u(e), i, u(a))}`;
|
|
77
|
+
const g = t === s ? "" : M(s, u(e), t, u(e + 1)), n = `L ${String(t)} ${String(u(a - 1))}`, c = t === i ? `L ${String(i)} ${String(u(a))}` : M(t, u(a - 1), i, u(a));
|
|
78
|
+
return [o, g, n, c].filter(Boolean).join(" ");
|
|
79
79
|
}
|
|
80
|
-
function
|
|
81
|
-
id:
|
|
82
|
-
className:
|
|
83
|
-
|
|
80
|
+
function B({
|
|
81
|
+
id: e,
|
|
82
|
+
className: a,
|
|
83
|
+
whole: s,
|
|
84
|
+
children: i
|
|
84
85
|
}) {
|
|
85
|
-
const [
|
|
86
|
+
const [t, o] = P(!1);
|
|
86
87
|
return /* @__PURE__ */ r(
|
|
87
|
-
|
|
88
|
+
F,
|
|
88
89
|
{
|
|
89
90
|
placement: "topLeft",
|
|
90
91
|
mouseEnterDelay: 0.3,
|
|
91
92
|
styles: { root: { maxWidth: "var(--tooltip-max-width)" } },
|
|
92
|
-
title:
|
|
93
|
+
title: t ? s ?? i : void 0,
|
|
93
94
|
children: /* @__PURE__ */ r(
|
|
94
95
|
"span",
|
|
95
96
|
{
|
|
96
|
-
id:
|
|
97
|
-
className:
|
|
98
|
-
onMouseEnter: (
|
|
99
|
-
|
|
100
|
-
|
|
97
|
+
id: e,
|
|
98
|
+
className: a,
|
|
99
|
+
onMouseEnter: (g) => {
|
|
100
|
+
const n = g.currentTarget;
|
|
101
|
+
o(
|
|
102
|
+
[
|
|
103
|
+
n,
|
|
104
|
+
...n.querySelectorAll(`.${A}`)
|
|
105
|
+
].some((c) => c.scrollWidth > c.clientWidth)
|
|
101
106
|
);
|
|
102
107
|
},
|
|
103
|
-
children:
|
|
108
|
+
children: i
|
|
104
109
|
}
|
|
105
110
|
)
|
|
106
111
|
}
|
|
107
112
|
);
|
|
108
113
|
}
|
|
109
|
-
function
|
|
110
|
-
const t = s.laneLabel[
|
|
114
|
+
function R(e, a, s, i) {
|
|
115
|
+
const t = s.laneLabel[a], o = s.merge[a], g = `${e}-lane-${String(a)}`, n = `${e}-merge-${String(a)}`, c = [t === void 0 ? "" : g, o ? n : ""].filter(
|
|
111
116
|
Boolean
|
|
112
117
|
);
|
|
113
118
|
return {
|
|
114
|
-
describedBy:
|
|
115
|
-
spans: /* @__PURE__ */
|
|
116
|
-
t !== void 0 && /* @__PURE__ */ r("span", { id:
|
|
117
|
-
o && /* @__PURE__ */ r("span", { id:
|
|
119
|
+
describedBy: c.length === 0 ? void 0 : c.join(" "),
|
|
120
|
+
spans: /* @__PURE__ */ w(I, { children: [
|
|
121
|
+
t !== void 0 && /* @__PURE__ */ r("span", { id: g, hidden: !0, children: t }),
|
|
122
|
+
o && /* @__PURE__ */ r("span", { id: n, hidden: !0, children: i })
|
|
118
123
|
] })
|
|
119
124
|
};
|
|
120
125
|
}
|
|
121
|
-
function
|
|
122
|
-
commits:
|
|
123
|
-
layout:
|
|
126
|
+
function D({
|
|
127
|
+
commits: e,
|
|
128
|
+
layout: a,
|
|
124
129
|
selected: s
|
|
125
130
|
}) {
|
|
126
|
-
const i =
|
|
127
|
-
return /* @__PURE__ */
|
|
131
|
+
const i = e.length * L;
|
|
132
|
+
return /* @__PURE__ */ w(
|
|
128
133
|
"svg",
|
|
129
134
|
{
|
|
130
135
|
className: "aegis-commit-graph__svg",
|
|
131
|
-
width:
|
|
136
|
+
width: a.width,
|
|
132
137
|
height: i,
|
|
133
|
-
viewBox: `0 0 ${String(
|
|
138
|
+
viewBox: `0 0 ${String(a.width)} ${String(i)}`,
|
|
134
139
|
"aria-hidden": "true",
|
|
135
140
|
children: [
|
|
136
|
-
|
|
141
|
+
a.lanes.slice(1).map((t) => /* @__PURE__ */ r(
|
|
137
142
|
"line",
|
|
138
143
|
{
|
|
139
144
|
className: "aegis-commit-graph__lane-rule",
|
|
@@ -144,33 +149,33 @@ function R({
|
|
|
144
149
|
},
|
|
145
150
|
t.x
|
|
146
151
|
)),
|
|
147
|
-
|
|
152
|
+
a.links.map((t) => /* @__PURE__ */ r(
|
|
148
153
|
"path",
|
|
149
154
|
{
|
|
150
155
|
className: "aegis-commit-graph__link",
|
|
151
|
-
d: `M ${String(t.fromX)} ${String(
|
|
156
|
+
d: `M ${String(t.fromX)} ${String(u(t.from))} ${M(t.fromX, u(t.from), t.toX, u(t.to))}`
|
|
152
157
|
},
|
|
153
158
|
`${String(t.from)}-${String(t.to)}`
|
|
154
159
|
)),
|
|
155
|
-
|
|
160
|
+
a.edges.map((t) => /* @__PURE__ */ r(
|
|
156
161
|
"path",
|
|
157
162
|
{
|
|
158
163
|
className: "aegis-commit-graph__edge",
|
|
159
|
-
d:
|
|
164
|
+
d: V(t)
|
|
160
165
|
},
|
|
161
166
|
`${String(t.from)}-${String(t.to)}-${String(t.viaX)}`
|
|
162
167
|
)),
|
|
163
|
-
|
|
168
|
+
e.map((t, o) => /* @__PURE__ */ r(
|
|
164
169
|
"circle",
|
|
165
170
|
{
|
|
166
171
|
className: [
|
|
167
172
|
"aegis-commit-graph__dot",
|
|
168
|
-
|
|
173
|
+
a.merge[o] ? "aegis-commit-graph__dot--merge" : "",
|
|
169
174
|
s.has(t.id) ? "aegis-commit-graph__dot--selected" : ""
|
|
170
175
|
].filter(Boolean).join(" "),
|
|
171
|
-
cx:
|
|
172
|
-
cy:
|
|
173
|
-
r:
|
|
176
|
+
cx: a.dotX[o],
|
|
177
|
+
cy: u(o),
|
|
178
|
+
r: q
|
|
174
179
|
},
|
|
175
180
|
t.id
|
|
176
181
|
))
|
|
@@ -179,128 +184,163 @@ function R({
|
|
|
179
184
|
);
|
|
180
185
|
}
|
|
181
186
|
function j({
|
|
182
|
-
lanes:
|
|
183
|
-
layout:
|
|
187
|
+
lanes: e,
|
|
188
|
+
layout: a
|
|
184
189
|
}) {
|
|
185
|
-
return /* @__PURE__ */ r("span", { className: "aegis-commit-graph__lane-labels", children:
|
|
190
|
+
return /* @__PURE__ */ r("span", { className: "aegis-commit-graph__lane-labels", children: e.map((s, i) => /* @__PURE__ */ r(
|
|
186
191
|
"span",
|
|
187
192
|
{
|
|
188
193
|
className: "aegis-commit-graph__lane-label",
|
|
189
|
-
style: { width: `${String(
|
|
194
|
+
style: { width: `${String(a.lanes[i].width)}px` },
|
|
190
195
|
children: s.label
|
|
191
196
|
},
|
|
192
197
|
s.id
|
|
193
198
|
)) });
|
|
194
199
|
}
|
|
195
|
-
function
|
|
196
|
-
commits:
|
|
197
|
-
lanes:
|
|
200
|
+
function Z({
|
|
201
|
+
commits: e,
|
|
202
|
+
lanes: a,
|
|
198
203
|
layout: s,
|
|
199
204
|
selected: i,
|
|
200
205
|
toggle: t,
|
|
201
206
|
ariaLabel: o
|
|
202
207
|
}) {
|
|
203
|
-
const
|
|
204
|
-
return /* @__PURE__ */
|
|
205
|
-
|
|
208
|
+
const g = y(), n = O();
|
|
209
|
+
return /* @__PURE__ */ w(I, { children: [
|
|
210
|
+
a !== void 0 && /* @__PURE__ */ w("div", { className: "aegis-commit-graph__lanes", "aria-hidden": "true", children: [
|
|
206
211
|
/* @__PURE__ */ r("span", { className: "aegis-commit-graph__lane-spacer" }),
|
|
207
|
-
/* @__PURE__ */ r(j, { lanes:
|
|
212
|
+
/* @__PURE__ */ r(j, { lanes: a, layout: s })
|
|
208
213
|
] }),
|
|
209
|
-
/* @__PURE__ */
|
|
210
|
-
/* @__PURE__ */ r(
|
|
211
|
-
/* @__PURE__ */ r("ol", { className: "aegis-commit-graph__rows", "aria-label": o, children:
|
|
212
|
-
const
|
|
213
|
-
|
|
214
|
-
|
|
214
|
+
/* @__PURE__ */ w("div", { className: "aegis-commit-graph__body", children: [
|
|
215
|
+
/* @__PURE__ */ r(D, { commits: e, layout: s, selected: i }),
|
|
216
|
+
/* @__PURE__ */ r("ol", { className: "aegis-commit-graph__rows", "aria-label": o, children: e.map((c, m) => {
|
|
217
|
+
const _ = i.has(c.id), p = `${n}-title-${String(m)}`, h = R(
|
|
218
|
+
n,
|
|
219
|
+
m,
|
|
215
220
|
s,
|
|
216
|
-
|
|
221
|
+
g.mergeCommit
|
|
217
222
|
);
|
|
218
|
-
return /* @__PURE__ */
|
|
223
|
+
return /* @__PURE__ */ w(
|
|
219
224
|
"li",
|
|
220
225
|
{
|
|
221
|
-
className:
|
|
222
|
-
"aria-describedby":
|
|
226
|
+
className: _ ? "aegis-commit-graph__row aegis-commit-graph__row--selected" : "aegis-commit-graph__row",
|
|
227
|
+
"aria-describedby": h.describedBy,
|
|
223
228
|
children: [
|
|
224
229
|
/* @__PURE__ */ r("span", { className: "aegis-commit-graph__select", children: t !== void 0 && /* @__PURE__ */ r(
|
|
225
230
|
W,
|
|
226
231
|
{
|
|
227
|
-
checked:
|
|
228
|
-
onChange: (
|
|
229
|
-
t(
|
|
232
|
+
checked: _,
|
|
233
|
+
onChange: (f) => {
|
|
234
|
+
t(c.id, f);
|
|
230
235
|
},
|
|
231
|
-
"aria-labelledby":
|
|
236
|
+
"aria-labelledby": p
|
|
232
237
|
}
|
|
233
238
|
) }),
|
|
234
|
-
/* @__PURE__ */
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
/* @__PURE__ */ r(
|
|
239
|
+
/* @__PURE__ */ w("span", { className: "aegis-commit-graph__text", children: [
|
|
240
|
+
h.spans,
|
|
241
|
+
c.refs?.map((f) => /* @__PURE__ */ r(Q, { className: "aegis-commit-graph__ref", children: f }, f)),
|
|
242
|
+
/* @__PURE__ */ r(B, { id: p, className: "aegis-commit-graph__title", children: c.title })
|
|
238
243
|
] }),
|
|
239
|
-
|
|
244
|
+
c.meta !== void 0 && /* @__PURE__ */ r("span", { className: "aegis-commit-graph__meta", children: c.meta })
|
|
240
245
|
]
|
|
241
246
|
},
|
|
242
|
-
|
|
247
|
+
c.id
|
|
243
248
|
);
|
|
244
249
|
}) })
|
|
245
250
|
] })
|
|
246
251
|
] });
|
|
247
252
|
}
|
|
248
|
-
function
|
|
249
|
-
|
|
250
|
-
|
|
253
|
+
function tt(e) {
|
|
254
|
+
return typeof e == "object" && e !== null && "parts" in e;
|
|
255
|
+
}
|
|
256
|
+
function et({
|
|
257
|
+
cell: e,
|
|
258
|
+
grow: a,
|
|
259
|
+
id: s,
|
|
260
|
+
select: i
|
|
261
|
+
}) {
|
|
262
|
+
const t = tt(e) ? {
|
|
263
|
+
value: /* @__PURE__ */ r("span", { id: s, className: "aegis-commit-graph__parts", children: e.parts.map((g, n) => /* @__PURE__ */ r(
|
|
264
|
+
"span",
|
|
265
|
+
{
|
|
266
|
+
className: g.cut === !0 ? `aegis-commit-graph__part ${A}` : "aegis-commit-graph__part",
|
|
267
|
+
children: g.content
|
|
268
|
+
},
|
|
269
|
+
n
|
|
270
|
+
)) }),
|
|
271
|
+
whole: e.parts.map((g, n) => /* @__PURE__ */ w(G, { children: [
|
|
272
|
+
n > 0 && " ",
|
|
273
|
+
g.content
|
|
274
|
+
] }, n)),
|
|
275
|
+
cellClass: "aegis-commit-graph__cell aegis-commit-graph__cell--parts",
|
|
276
|
+
growClass: "aegis-commit-graph__td aegis-commit-graph__td--grow aegis-commit-graph__td--parts"
|
|
277
|
+
} : {
|
|
278
|
+
value: s === void 0 ? e : /* @__PURE__ */ r("span", { id: s, children: e }),
|
|
279
|
+
whole: void 0,
|
|
280
|
+
cellClass: "aegis-commit-graph__cell",
|
|
281
|
+
growClass: "aegis-commit-graph__td aegis-commit-graph__td--grow"
|
|
282
|
+
}, o = /* @__PURE__ */ w(I, { children: [
|
|
283
|
+
i,
|
|
284
|
+
t.value
|
|
285
|
+
] });
|
|
286
|
+
return a ? /* @__PURE__ */ r("td", { className: t.growClass, children: /* @__PURE__ */ r(B, { className: t.cellClass, whole: t.whole, children: o }) }) : /* @__PURE__ */ r("td", { className: "aegis-commit-graph__td", children: /* @__PURE__ */ r("span", { className: t.cellClass, children: o }) });
|
|
287
|
+
}
|
|
288
|
+
function at({
|
|
289
|
+
commits: e,
|
|
290
|
+
lanes: a,
|
|
251
291
|
layout: s,
|
|
252
292
|
selected: i,
|
|
253
293
|
toggle: t,
|
|
254
294
|
ariaLabel: o,
|
|
255
|
-
columns:
|
|
295
|
+
columns: g
|
|
256
296
|
}) {
|
|
257
|
-
const
|
|
258
|
-
return /* @__PURE__ */ r("div", { className: "aegis-commit-graph__scroll", children: /* @__PURE__ */
|
|
259
|
-
/* @__PURE__ */ r("thead", { children: /* @__PURE__ */
|
|
297
|
+
const n = y(), c = O();
|
|
298
|
+
return /* @__PURE__ */ r("div", { className: "aegis-commit-graph__scroll", children: /* @__PURE__ */ w("table", { className: "aegis-commit-graph__table", "aria-label": o, children: [
|
|
299
|
+
/* @__PURE__ */ r("thead", { children: /* @__PURE__ */ w("tr", { children: [
|
|
260
300
|
/* @__PURE__ */ r(
|
|
261
301
|
"th",
|
|
262
302
|
{
|
|
263
303
|
scope: "col",
|
|
264
304
|
className: "aegis-commit-graph__th aegis-commit-graph__th--graph",
|
|
265
305
|
"aria-hidden": "true",
|
|
266
|
-
children:
|
|
306
|
+
children: a !== void 0 && /* @__PURE__ */ r(j, { lanes: a, layout: s })
|
|
267
307
|
}
|
|
268
308
|
),
|
|
269
|
-
|
|
309
|
+
g.map((m) => /* @__PURE__ */ r(
|
|
270
310
|
"th",
|
|
271
311
|
{
|
|
272
312
|
scope: "col",
|
|
273
313
|
className: "aegis-commit-graph__th",
|
|
274
|
-
children:
|
|
314
|
+
children: m.label
|
|
275
315
|
},
|
|
276
|
-
|
|
316
|
+
m.id
|
|
277
317
|
))
|
|
278
318
|
] }) }),
|
|
279
|
-
/* @__PURE__ */ r("tbody", { children:
|
|
280
|
-
const
|
|
281
|
-
|
|
282
|
-
|
|
319
|
+
/* @__PURE__ */ r("tbody", { children: e.map((m, _) => {
|
|
320
|
+
const p = i.has(m.id), h = `${c}-first-${String(_)}`, f = R(
|
|
321
|
+
c,
|
|
322
|
+
_,
|
|
283
323
|
s,
|
|
284
|
-
|
|
324
|
+
n.mergeCommit
|
|
285
325
|
);
|
|
286
|
-
return /* @__PURE__ */
|
|
326
|
+
return /* @__PURE__ */ w(
|
|
287
327
|
"tr",
|
|
288
328
|
{
|
|
289
|
-
className:
|
|
290
|
-
"aria-selected": t === void 0 ? void 0 :
|
|
291
|
-
"aria-describedby":
|
|
329
|
+
className: p ? "aegis-commit-graph__tr aegis-commit-graph__tr--selected" : "aegis-commit-graph__tr",
|
|
330
|
+
"aria-selected": t === void 0 ? void 0 : p,
|
|
331
|
+
"aria-describedby": f.describedBy,
|
|
292
332
|
children: [
|
|
293
|
-
/* @__PURE__ */
|
|
333
|
+
/* @__PURE__ */ w(
|
|
294
334
|
"td",
|
|
295
335
|
{
|
|
296
|
-
className:
|
|
336
|
+
className: _ === 0 ? "aegis-commit-graph__td aegis-commit-graph__td--graph aegis-commit-graph__td--drawing" : "aegis-commit-graph__td aegis-commit-graph__td--graph",
|
|
297
337
|
"aria-hidden": "true",
|
|
298
338
|
children: [
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
339
|
+
f.spans,
|
|
340
|
+
_ === 0 && /* @__PURE__ */ r(
|
|
341
|
+
D,
|
|
302
342
|
{
|
|
303
|
-
commits:
|
|
343
|
+
commits: e,
|
|
304
344
|
layout: s,
|
|
305
345
|
selected: i
|
|
306
346
|
}
|
|
@@ -308,76 +348,72 @@ function V({
|
|
|
308
348
|
]
|
|
309
349
|
}
|
|
310
350
|
),
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
351
|
+
g.map(($, l) => /* @__PURE__ */ r(
|
|
352
|
+
et,
|
|
353
|
+
{
|
|
354
|
+
cell: m.cells?.[$.id],
|
|
355
|
+
grow: $.grow === !0,
|
|
356
|
+
id: l === 0 ? h : void 0,
|
|
357
|
+
select: l === 0 && t !== void 0 && /* @__PURE__ */ r("span", { className: "aegis-commit-graph__cell-select", children: /* @__PURE__ */ r(
|
|
314
358
|
W,
|
|
315
359
|
{
|
|
316
|
-
checked:
|
|
317
|
-
onChange: (
|
|
318
|
-
t(
|
|
360
|
+
checked: p,
|
|
361
|
+
onChange: (S) => {
|
|
362
|
+
t(m.id, S);
|
|
319
363
|
},
|
|
320
|
-
"aria-labelledby":
|
|
364
|
+
"aria-labelledby": h
|
|
321
365
|
}
|
|
322
|
-
) })
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
"td",
|
|
327
|
-
{
|
|
328
|
-
className: "aegis-commit-graph__td aegis-commit-graph__td--grow",
|
|
329
|
-
children: /* @__PURE__ */ r(y, { className: "aegis-commit-graph__cell", children: u })
|
|
330
|
-
},
|
|
331
|
-
N.id
|
|
332
|
-
) : /* @__PURE__ */ r("td", { className: "aegis-commit-graph__td", children: /* @__PURE__ */ r("span", { className: "aegis-commit-graph__cell", children: u }) }, N.id);
|
|
333
|
-
})
|
|
366
|
+
) })
|
|
367
|
+
},
|
|
368
|
+
$.id
|
|
369
|
+
))
|
|
334
370
|
]
|
|
335
371
|
},
|
|
336
|
-
|
|
372
|
+
m.id
|
|
337
373
|
);
|
|
338
374
|
}) })
|
|
339
375
|
] }) });
|
|
340
376
|
}
|
|
341
|
-
function
|
|
342
|
-
commits:
|
|
343
|
-
lanes:
|
|
377
|
+
function ht({
|
|
378
|
+
commits: e,
|
|
379
|
+
lanes: a,
|
|
344
380
|
columns: s,
|
|
345
381
|
selectedIds: i = [],
|
|
346
382
|
onSelectedIdsChange: t,
|
|
347
383
|
maxSelected: o,
|
|
348
|
-
ariaLabel:
|
|
349
|
-
className:
|
|
384
|
+
ariaLabel: g,
|
|
385
|
+
className: n
|
|
350
386
|
}) {
|
|
351
|
-
const
|
|
352
|
-
() =>
|
|
353
|
-
[
|
|
354
|
-
),
|
|
355
|
-
const
|
|
387
|
+
const m = U(K) ? Y : X, _ = H(
|
|
388
|
+
() => J(e, a, m),
|
|
389
|
+
[e, a, m]
|
|
390
|
+
), p = t === void 0 ? void 0 : (l, S) => {
|
|
391
|
+
const v = S ? [...i.filter((N) => N !== l), l] : i.filter((N) => N !== l);
|
|
356
392
|
t(
|
|
357
|
-
o === void 0 ?
|
|
393
|
+
o === void 0 ? v : v.slice(-o)
|
|
358
394
|
);
|
|
359
|
-
},
|
|
360
|
-
commits:
|
|
361
|
-
lanes:
|
|
362
|
-
layout:
|
|
395
|
+
}, h = {
|
|
396
|
+
commits: e,
|
|
397
|
+
lanes: a,
|
|
398
|
+
layout: _,
|
|
363
399
|
selected: new Set(i),
|
|
364
|
-
toggle:
|
|
365
|
-
ariaLabel:
|
|
366
|
-
},
|
|
400
|
+
toggle: p,
|
|
401
|
+
ariaLabel: g
|
|
402
|
+
}, f = [
|
|
367
403
|
"aegis-commit-graph",
|
|
368
404
|
// The list's checkboxes take a column of their own; the table's sit in its first column.
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
].filter(Boolean).join(" "),
|
|
372
|
-
"--aegis-commit-graph-row-h": `${String(
|
|
373
|
-
"--aegis-commit-graph-graph-w": `${String(
|
|
405
|
+
p !== void 0 && s === void 0 ? "aegis-commit-graph--selectable" : "",
|
|
406
|
+
n ?? ""
|
|
407
|
+
].filter(Boolean).join(" "), $ = {
|
|
408
|
+
"--aegis-commit-graph-row-h": `${String(L)}px`,
|
|
409
|
+
"--aegis-commit-graph-graph-w": `${String(_.width)}px`,
|
|
374
410
|
"--aegis-commit-graph-grow-count": String(
|
|
375
|
-
s?.filter((
|
|
411
|
+
s?.filter((l) => l.grow === !0).length ?? 0
|
|
376
412
|
)
|
|
377
413
|
};
|
|
378
|
-
return /* @__PURE__ */ r("div", { className:
|
|
414
|
+
return /* @__PURE__ */ r("div", { className: f, style: $, children: s === void 0 ? /* @__PURE__ */ r(Z, { ...h }) : /* @__PURE__ */ r(at, { ...h, columns: s }) });
|
|
379
415
|
}
|
|
380
416
|
export {
|
|
381
|
-
|
|
417
|
+
ht as CommitGraph
|
|
382
418
|
};
|
|
383
419
|
//# sourceMappingURL=CommitGraph.js.map
|