@akshay-rajput/git-graph-svg 1.0.1 → 1.0.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.
|
@@ -11,6 +11,8 @@ export interface GitGraphSVGProps {
|
|
|
11
11
|
rowHeight?: number;
|
|
12
12
|
colorPalette?: string[];
|
|
13
13
|
laneWidth?: number;
|
|
14
|
+
renderNode?: (commit: CommitItem) => React.ReactNode;
|
|
15
|
+
renderEdge?: (from: CommitItem, to: CommitItem, defaultPath: string) => React.ReactNode;
|
|
14
16
|
}
|
|
15
17
|
export interface _CommitItem extends CommitItem {
|
|
16
18
|
color: string;
|
|
@@ -1,105 +1,105 @@
|
|
|
1
|
-
import
|
|
2
|
-
var
|
|
3
|
-
var
|
|
1
|
+
import Te, { useMemo as We } from "react";
|
|
2
|
+
var le = { exports: {} }, ee = {};
|
|
3
|
+
var Ye;
|
|
4
4
|
function vr() {
|
|
5
|
-
if (
|
|
6
|
-
|
|
7
|
-
var
|
|
8
|
-
function
|
|
9
|
-
var
|
|
10
|
-
|
|
11
|
-
for (
|
|
12
|
-
if (
|
|
13
|
-
return { $$typeof:
|
|
5
|
+
if (Ye) return ee;
|
|
6
|
+
Ye = 1;
|
|
7
|
+
var $ = Te, A = /* @__PURE__ */ Symbol.for("react.element"), V = /* @__PURE__ */ Symbol.for("react.fragment"), j = Object.prototype.hasOwnProperty, F = $.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, M = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
8
|
+
function E(_, l, k) {
|
|
9
|
+
var h, x = {}, S = null, N = null;
|
|
10
|
+
k !== void 0 && (S = "" + k), l.key !== void 0 && (S = "" + l.key), l.ref !== void 0 && (N = l.ref);
|
|
11
|
+
for (h in l) j.call(l, h) && !M.hasOwnProperty(h) && (x[h] = l[h]);
|
|
12
|
+
if (_ && _.defaultProps) for (h in l = _.defaultProps, l) x[h] === void 0 && (x[h] = l[h]);
|
|
13
|
+
return { $$typeof: A, type: _, key: S, ref: N, props: x, _owner: F.current };
|
|
14
14
|
}
|
|
15
|
-
return
|
|
15
|
+
return ee.Fragment = V, ee.jsx = E, ee.jsxs = E, ee;
|
|
16
16
|
}
|
|
17
|
-
var
|
|
18
|
-
var
|
|
17
|
+
var re = {};
|
|
18
|
+
var Le;
|
|
19
19
|
function pr() {
|
|
20
|
-
return
|
|
21
|
-
var
|
|
22
|
-
function
|
|
20
|
+
return Le || (Le = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
21
|
+
var $ = Te, A = /* @__PURE__ */ Symbol.for("react.element"), V = /* @__PURE__ */ Symbol.for("react.portal"), j = /* @__PURE__ */ Symbol.for("react.fragment"), F = /* @__PURE__ */ Symbol.for("react.strict_mode"), M = /* @__PURE__ */ Symbol.for("react.profiler"), E = /* @__PURE__ */ Symbol.for("react.provider"), _ = /* @__PURE__ */ Symbol.for("react.context"), l = /* @__PURE__ */ Symbol.for("react.forward_ref"), k = /* @__PURE__ */ Symbol.for("react.suspense"), h = /* @__PURE__ */ Symbol.for("react.suspense_list"), x = /* @__PURE__ */ Symbol.for("react.memo"), S = /* @__PURE__ */ Symbol.for("react.lazy"), N = /* @__PURE__ */ Symbol.for("react.offscreen"), s = Symbol.iterator, v = "@@iterator";
|
|
22
|
+
function p(e) {
|
|
23
23
|
if (e === null || typeof e != "object")
|
|
24
24
|
return null;
|
|
25
|
-
var r =
|
|
25
|
+
var r = s && e[s] || e[v];
|
|
26
26
|
return typeof r == "function" ? r : null;
|
|
27
27
|
}
|
|
28
|
-
var
|
|
29
|
-
function
|
|
28
|
+
var R = $.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
29
|
+
function i(e) {
|
|
30
30
|
{
|
|
31
|
-
for (var r = arguments.length,
|
|
32
|
-
n
|
|
33
|
-
|
|
31
|
+
for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), n = 1; n < r; n++)
|
|
32
|
+
t[n - 1] = arguments[n];
|
|
33
|
+
y("error", e, t);
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
|
-
function
|
|
36
|
+
function y(e, r, t) {
|
|
37
37
|
{
|
|
38
|
-
var
|
|
39
|
-
u !== "" && (r += "%s",
|
|
40
|
-
var
|
|
38
|
+
var n = R.ReactDebugCurrentFrame, u = n.getStackAddendum();
|
|
39
|
+
u !== "" && (r += "%s", t = t.concat([u]));
|
|
40
|
+
var c = t.map(function(o) {
|
|
41
41
|
return String(o);
|
|
42
42
|
});
|
|
43
|
-
|
|
43
|
+
c.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, c);
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
|
-
var
|
|
47
|
-
|
|
48
|
-
function
|
|
49
|
-
return !!(typeof e == "string" || typeof e == "function" || e ===
|
|
46
|
+
var D = !1, I = !1, O = !1, U = !1, fe = !1, J;
|
|
47
|
+
J = /* @__PURE__ */ Symbol.for("react.module.reference");
|
|
48
|
+
function de(e) {
|
|
49
|
+
return !!(typeof e == "string" || typeof e == "function" || e === j || e === M || fe || e === F || e === k || e === h || U || e === N || D || I || O || typeof e == "object" && e !== null && (e.$$typeof === S || e.$$typeof === x || e.$$typeof === E || e.$$typeof === _ || e.$$typeof === l || // This needs to include all possible module reference object
|
|
50
50
|
// types supported by any Flight configuration anywhere since
|
|
51
51
|
// we don't know which Flight build this will end up being used
|
|
52
52
|
// with.
|
|
53
|
-
e.$$typeof ===
|
|
53
|
+
e.$$typeof === J || e.getModuleId !== void 0));
|
|
54
54
|
}
|
|
55
|
-
function
|
|
56
|
-
var
|
|
57
|
-
if (
|
|
58
|
-
return
|
|
55
|
+
function ve(e, r, t) {
|
|
56
|
+
var n = e.displayName;
|
|
57
|
+
if (n)
|
|
58
|
+
return n;
|
|
59
59
|
var u = r.displayName || r.name || "";
|
|
60
|
-
return u !== "" ?
|
|
60
|
+
return u !== "" ? t + "(" + u + ")" : t;
|
|
61
61
|
}
|
|
62
|
-
function
|
|
62
|
+
function te(e) {
|
|
63
63
|
return e.displayName || "Context";
|
|
64
64
|
}
|
|
65
|
-
function
|
|
65
|
+
function C(e) {
|
|
66
66
|
if (e == null)
|
|
67
67
|
return null;
|
|
68
|
-
if (typeof e.tag == "number" &&
|
|
68
|
+
if (typeof e.tag == "number" && i("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
|
|
69
69
|
return e.displayName || e.name || null;
|
|
70
70
|
if (typeof e == "string")
|
|
71
71
|
return e;
|
|
72
72
|
switch (e) {
|
|
73
|
-
case
|
|
73
|
+
case j:
|
|
74
74
|
return "Fragment";
|
|
75
|
-
case
|
|
75
|
+
case V:
|
|
76
76
|
return "Portal";
|
|
77
|
-
case
|
|
77
|
+
case M:
|
|
78
78
|
return "Profiler";
|
|
79
|
-
case
|
|
79
|
+
case F:
|
|
80
80
|
return "StrictMode";
|
|
81
|
-
case
|
|
81
|
+
case k:
|
|
82
82
|
return "Suspense";
|
|
83
|
-
case
|
|
83
|
+
case h:
|
|
84
84
|
return "SuspenseList";
|
|
85
85
|
}
|
|
86
86
|
if (typeof e == "object")
|
|
87
87
|
switch (e.$$typeof) {
|
|
88
|
-
case
|
|
88
|
+
case _:
|
|
89
89
|
var r = e;
|
|
90
|
-
return
|
|
91
|
-
case
|
|
92
|
-
var
|
|
93
|
-
return
|
|
94
|
-
case
|
|
95
|
-
return
|
|
96
|
-
case
|
|
97
|
-
var
|
|
98
|
-
return
|
|
99
|
-
case
|
|
100
|
-
var u = e,
|
|
90
|
+
return te(r) + ".Consumer";
|
|
91
|
+
case E:
|
|
92
|
+
var t = e;
|
|
93
|
+
return te(t._context) + ".Provider";
|
|
94
|
+
case l:
|
|
95
|
+
return ve(e, e.render, "ForwardRef");
|
|
96
|
+
case x:
|
|
97
|
+
var n = e.displayName || null;
|
|
98
|
+
return n !== null ? n : C(e.type) || "Memo";
|
|
99
|
+
case S: {
|
|
100
|
+
var u = e, c = u._payload, o = u._init;
|
|
101
101
|
try {
|
|
102
|
-
return
|
|
102
|
+
return C(o(c));
|
|
103
103
|
} catch {
|
|
104
104
|
return null;
|
|
105
105
|
}
|
|
@@ -107,18 +107,18 @@ function pr() {
|
|
|
107
107
|
}
|
|
108
108
|
return null;
|
|
109
109
|
}
|
|
110
|
-
var
|
|
111
|
-
function
|
|
110
|
+
var w = Object.assign, m = 0, P, q, ne, z, H, ae, oe;
|
|
111
|
+
function ie() {
|
|
112
112
|
}
|
|
113
|
-
|
|
114
|
-
function
|
|
113
|
+
ie.__reactDisabledLog = !0;
|
|
114
|
+
function pe() {
|
|
115
115
|
{
|
|
116
|
-
if (
|
|
117
|
-
|
|
116
|
+
if (m === 0) {
|
|
117
|
+
P = console.log, q = console.info, ne = console.warn, z = console.error, H = console.group, ae = console.groupCollapsed, oe = console.groupEnd;
|
|
118
118
|
var e = {
|
|
119
119
|
configurable: !0,
|
|
120
120
|
enumerable: !0,
|
|
121
|
-
value:
|
|
121
|
+
value: ie,
|
|
122
122
|
writable: !0
|
|
123
123
|
};
|
|
124
124
|
Object.defineProperties(console, {
|
|
@@ -131,77 +131,77 @@ function pr() {
|
|
|
131
131
|
groupEnd: e
|
|
132
132
|
});
|
|
133
133
|
}
|
|
134
|
-
|
|
134
|
+
m++;
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
|
-
function
|
|
137
|
+
function ue() {
|
|
138
138
|
{
|
|
139
|
-
if (
|
|
139
|
+
if (m--, m === 0) {
|
|
140
140
|
var e = {
|
|
141
141
|
configurable: !0,
|
|
142
142
|
enumerable: !0,
|
|
143
143
|
writable: !0
|
|
144
144
|
};
|
|
145
145
|
Object.defineProperties(console, {
|
|
146
|
-
log:
|
|
147
|
-
value:
|
|
146
|
+
log: w({}, e, {
|
|
147
|
+
value: P
|
|
148
148
|
}),
|
|
149
|
-
info:
|
|
150
|
-
value:
|
|
149
|
+
info: w({}, e, {
|
|
150
|
+
value: q
|
|
151
151
|
}),
|
|
152
|
-
warn:
|
|
153
|
-
value:
|
|
152
|
+
warn: w({}, e, {
|
|
153
|
+
value: ne
|
|
154
154
|
}),
|
|
155
|
-
error:
|
|
156
|
-
value:
|
|
155
|
+
error: w({}, e, {
|
|
156
|
+
value: z
|
|
157
157
|
}),
|
|
158
|
-
group:
|
|
159
|
-
value:
|
|
158
|
+
group: w({}, e, {
|
|
159
|
+
value: H
|
|
160
160
|
}),
|
|
161
|
-
groupCollapsed:
|
|
162
|
-
value:
|
|
161
|
+
groupCollapsed: w({}, e, {
|
|
162
|
+
value: ae
|
|
163
163
|
}),
|
|
164
|
-
groupEnd:
|
|
165
|
-
value:
|
|
164
|
+
groupEnd: w({}, e, {
|
|
165
|
+
value: oe
|
|
166
166
|
})
|
|
167
167
|
});
|
|
168
168
|
}
|
|
169
|
-
|
|
169
|
+
m < 0 && i("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
170
170
|
}
|
|
171
171
|
}
|
|
172
|
-
var
|
|
173
|
-
function
|
|
172
|
+
var W = R.ReactCurrentDispatcher, Y;
|
|
173
|
+
function B(e, r, t) {
|
|
174
174
|
{
|
|
175
|
-
if (
|
|
175
|
+
if (Y === void 0)
|
|
176
176
|
try {
|
|
177
177
|
throw Error();
|
|
178
178
|
} catch (u) {
|
|
179
|
-
var
|
|
180
|
-
|
|
179
|
+
var n = u.stack.trim().match(/\n( *(at )?)/);
|
|
180
|
+
Y = n && n[1] || "";
|
|
181
181
|
}
|
|
182
182
|
return `
|
|
183
|
-
` +
|
|
183
|
+
` + Y + e;
|
|
184
184
|
}
|
|
185
185
|
}
|
|
186
|
-
var
|
|
186
|
+
var Z = !1, G;
|
|
187
187
|
{
|
|
188
|
-
var
|
|
189
|
-
|
|
188
|
+
var he = typeof WeakMap == "function" ? WeakMap : Map;
|
|
189
|
+
G = new he();
|
|
190
190
|
}
|
|
191
|
-
function
|
|
192
|
-
if (!e ||
|
|
191
|
+
function xe(e, r) {
|
|
192
|
+
if (!e || Z)
|
|
193
193
|
return "";
|
|
194
194
|
{
|
|
195
|
-
var
|
|
196
|
-
if (
|
|
197
|
-
return
|
|
195
|
+
var t = G.get(e);
|
|
196
|
+
if (t !== void 0)
|
|
197
|
+
return t;
|
|
198
198
|
}
|
|
199
|
-
var
|
|
200
|
-
|
|
199
|
+
var n;
|
|
200
|
+
Z = !0;
|
|
201
201
|
var u = Error.prepareStackTrace;
|
|
202
202
|
Error.prepareStackTrace = void 0;
|
|
203
|
-
var
|
|
204
|
-
|
|
203
|
+
var c;
|
|
204
|
+
c = W.current, W.current = null, pe();
|
|
205
205
|
try {
|
|
206
206
|
if (r) {
|
|
207
207
|
var o = function() {
|
|
@@ -214,146 +214,146 @@ function pr() {
|
|
|
214
214
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
215
215
|
try {
|
|
216
216
|
Reflect.construct(o, []);
|
|
217
|
-
} catch (
|
|
218
|
-
|
|
217
|
+
} catch (b) {
|
|
218
|
+
n = b;
|
|
219
219
|
}
|
|
220
220
|
Reflect.construct(e, [], o);
|
|
221
221
|
} else {
|
|
222
222
|
try {
|
|
223
223
|
o.call();
|
|
224
|
-
} catch (
|
|
225
|
-
|
|
224
|
+
} catch (b) {
|
|
225
|
+
n = b;
|
|
226
226
|
}
|
|
227
227
|
e.call(o.prototype);
|
|
228
228
|
}
|
|
229
229
|
} else {
|
|
230
230
|
try {
|
|
231
231
|
throw Error();
|
|
232
|
-
} catch (
|
|
233
|
-
|
|
232
|
+
} catch (b) {
|
|
233
|
+
n = b;
|
|
234
234
|
}
|
|
235
235
|
e();
|
|
236
236
|
}
|
|
237
|
-
} catch (
|
|
238
|
-
if (
|
|
239
|
-
for (var a =
|
|
240
|
-
`),
|
|
241
|
-
`),
|
|
242
|
-
|
|
243
|
-
for (;
|
|
244
|
-
if (a[
|
|
245
|
-
if (
|
|
237
|
+
} catch (b) {
|
|
238
|
+
if (b && n && typeof b.stack == "string") {
|
|
239
|
+
for (var a = b.stack.split(`
|
|
240
|
+
`), g = n.stack.split(`
|
|
241
|
+
`), f = a.length - 1, d = g.length - 1; f >= 1 && d >= 0 && a[f] !== g[d]; )
|
|
242
|
+
d--;
|
|
243
|
+
for (; f >= 1 && d >= 0; f--, d--)
|
|
244
|
+
if (a[f] !== g[d]) {
|
|
245
|
+
if (f !== 1 || d !== 1)
|
|
246
246
|
do
|
|
247
|
-
if (
|
|
248
|
-
var
|
|
249
|
-
` + a[
|
|
250
|
-
return e.displayName &&
|
|
247
|
+
if (f--, d--, d < 0 || a[f] !== g[d]) {
|
|
248
|
+
var T = `
|
|
249
|
+
` + a[f].replace(" at new ", " at ");
|
|
250
|
+
return e.displayName && T.includes("<anonymous>") && (T = T.replace("<anonymous>", e.displayName)), typeof e == "function" && G.set(e, T), T;
|
|
251
251
|
}
|
|
252
|
-
while (
|
|
252
|
+
while (f >= 1 && d >= 0);
|
|
253
253
|
break;
|
|
254
254
|
}
|
|
255
255
|
}
|
|
256
256
|
} finally {
|
|
257
|
-
|
|
257
|
+
Z = !1, W.current = c, ue(), Error.prepareStackTrace = u;
|
|
258
258
|
}
|
|
259
|
-
var
|
|
260
|
-
return typeof e == "function" &&
|
|
259
|
+
var X = e ? e.displayName || e.name : "", L = X ? B(X) : "";
|
|
260
|
+
return typeof e == "function" && G.set(e, L), L;
|
|
261
261
|
}
|
|
262
|
-
function Ue(e, r,
|
|
263
|
-
return
|
|
262
|
+
function Ue(e, r, t) {
|
|
263
|
+
return xe(e, !1);
|
|
264
264
|
}
|
|
265
|
-
function
|
|
265
|
+
function Je(e) {
|
|
266
266
|
var r = e.prototype;
|
|
267
267
|
return !!(r && r.isReactComponent);
|
|
268
268
|
}
|
|
269
|
-
function
|
|
269
|
+
function se(e, r, t) {
|
|
270
270
|
if (e == null)
|
|
271
271
|
return "";
|
|
272
272
|
if (typeof e == "function")
|
|
273
|
-
return
|
|
273
|
+
return xe(e, Je(e));
|
|
274
274
|
if (typeof e == "string")
|
|
275
|
-
return
|
|
275
|
+
return B(e);
|
|
276
276
|
switch (e) {
|
|
277
|
-
case
|
|
278
|
-
return
|
|
279
|
-
case
|
|
280
|
-
return
|
|
277
|
+
case k:
|
|
278
|
+
return B("Suspense");
|
|
279
|
+
case h:
|
|
280
|
+
return B("SuspenseList");
|
|
281
281
|
}
|
|
282
282
|
if (typeof e == "object")
|
|
283
283
|
switch (e.$$typeof) {
|
|
284
|
-
case
|
|
284
|
+
case l:
|
|
285
285
|
return Ue(e.render);
|
|
286
|
-
case
|
|
287
|
-
return
|
|
288
|
-
case
|
|
289
|
-
var
|
|
286
|
+
case x:
|
|
287
|
+
return se(e.type, r, t);
|
|
288
|
+
case S: {
|
|
289
|
+
var n = e, u = n._payload, c = n._init;
|
|
290
290
|
try {
|
|
291
|
-
return
|
|
291
|
+
return se(c(u), r, t);
|
|
292
292
|
} catch {
|
|
293
293
|
}
|
|
294
294
|
}
|
|
295
295
|
}
|
|
296
296
|
return "";
|
|
297
297
|
}
|
|
298
|
-
var
|
|
299
|
-
function
|
|
298
|
+
var Q = Object.prototype.hasOwnProperty, Se = {}, Oe = R.ReactDebugCurrentFrame;
|
|
299
|
+
function ce(e) {
|
|
300
300
|
if (e) {
|
|
301
|
-
var r = e._owner,
|
|
302
|
-
|
|
301
|
+
var r = e._owner, t = se(e.type, e._source, r ? r.type : null);
|
|
302
|
+
Oe.setExtraStackFrame(t);
|
|
303
303
|
} else
|
|
304
|
-
|
|
304
|
+
Oe.setExtraStackFrame(null);
|
|
305
305
|
}
|
|
306
|
-
function
|
|
306
|
+
function qe(e, r, t, n, u) {
|
|
307
307
|
{
|
|
308
|
-
var
|
|
308
|
+
var c = Function.call.bind(Q);
|
|
309
309
|
for (var o in e)
|
|
310
|
-
if (
|
|
310
|
+
if (c(e, o)) {
|
|
311
311
|
var a = void 0;
|
|
312
312
|
try {
|
|
313
313
|
if (typeof e[o] != "function") {
|
|
314
|
-
var
|
|
315
|
-
throw
|
|
314
|
+
var g = Error((n || "React class") + ": " + t + " type `" + o + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[o] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
315
|
+
throw g.name = "Invariant Violation", g;
|
|
316
316
|
}
|
|
317
|
-
a = e[o](r, o,
|
|
318
|
-
} catch (
|
|
319
|
-
a =
|
|
317
|
+
a = e[o](r, o, n, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
318
|
+
} catch (f) {
|
|
319
|
+
a = f;
|
|
320
320
|
}
|
|
321
|
-
a && !(a instanceof Error) && (
|
|
321
|
+
a && !(a instanceof Error) && (ce(u), i("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", n || "React class", t, o, typeof a), ce(null)), a instanceof Error && !(a.message in Se) && (Se[a.message] = !0, ce(u), i("Failed %s type: %s", t, a.message), ce(null));
|
|
322
322
|
}
|
|
323
323
|
}
|
|
324
324
|
}
|
|
325
|
-
var
|
|
326
|
-
function
|
|
327
|
-
return
|
|
325
|
+
var Be = Array.isArray;
|
|
326
|
+
function ge(e) {
|
|
327
|
+
return Be(e);
|
|
328
328
|
}
|
|
329
|
-
function
|
|
329
|
+
function Ge(e) {
|
|
330
330
|
{
|
|
331
|
-
var r = typeof Symbol == "function" && Symbol.toStringTag,
|
|
332
|
-
return
|
|
331
|
+
var r = typeof Symbol == "function" && Symbol.toStringTag, t = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
332
|
+
return t;
|
|
333
333
|
}
|
|
334
334
|
}
|
|
335
|
-
function
|
|
335
|
+
function Ke(e) {
|
|
336
336
|
try {
|
|
337
|
-
return
|
|
337
|
+
return me(e), !1;
|
|
338
338
|
} catch {
|
|
339
339
|
return !0;
|
|
340
340
|
}
|
|
341
341
|
}
|
|
342
|
-
function
|
|
342
|
+
function me(e) {
|
|
343
343
|
return "" + e;
|
|
344
344
|
}
|
|
345
|
-
function
|
|
346
|
-
if (
|
|
347
|
-
return
|
|
345
|
+
function Ce(e) {
|
|
346
|
+
if (Ke(e))
|
|
347
|
+
return i("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Ge(e)), me(e);
|
|
348
348
|
}
|
|
349
|
-
var
|
|
349
|
+
var we = R.ReactCurrentOwner, Xe = {
|
|
350
350
|
key: !0,
|
|
351
351
|
ref: !0,
|
|
352
352
|
__self: !0,
|
|
353
353
|
__source: !0
|
|
354
|
-
},
|
|
354
|
+
}, Pe, je;
|
|
355
355
|
function ze(e) {
|
|
356
|
-
if (
|
|
356
|
+
if (Q.call(e, "ref")) {
|
|
357
357
|
var r = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
358
358
|
if (r && r.isReactWarning)
|
|
359
359
|
return !1;
|
|
@@ -361,49 +361,49 @@ function pr() {
|
|
|
361
361
|
return e.ref !== void 0;
|
|
362
362
|
}
|
|
363
363
|
function He(e) {
|
|
364
|
-
if (
|
|
364
|
+
if (Q.call(e, "key")) {
|
|
365
365
|
var r = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
366
366
|
if (r && r.isReactWarning)
|
|
367
367
|
return !1;
|
|
368
368
|
}
|
|
369
369
|
return e.key !== void 0;
|
|
370
370
|
}
|
|
371
|
-
function Xe(e, r) {
|
|
372
|
-
typeof e.ref == "string" && _e.current;
|
|
373
|
-
}
|
|
374
371
|
function Ze(e, r) {
|
|
372
|
+
typeof e.ref == "string" && we.current;
|
|
373
|
+
}
|
|
374
|
+
function Qe(e, r) {
|
|
375
375
|
{
|
|
376
|
-
var
|
|
377
|
-
|
|
376
|
+
var t = function() {
|
|
377
|
+
Pe || (Pe = !0, i("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
|
|
378
378
|
};
|
|
379
|
-
|
|
380
|
-
get:
|
|
379
|
+
t.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
380
|
+
get: t,
|
|
381
381
|
configurable: !0
|
|
382
382
|
});
|
|
383
383
|
}
|
|
384
384
|
}
|
|
385
|
-
function
|
|
385
|
+
function er(e, r) {
|
|
386
386
|
{
|
|
387
|
-
var
|
|
388
|
-
|
|
387
|
+
var t = function() {
|
|
388
|
+
je || (je = !0, i("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
|
|
389
389
|
};
|
|
390
|
-
|
|
391
|
-
get:
|
|
390
|
+
t.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
391
|
+
get: t,
|
|
392
392
|
configurable: !0
|
|
393
393
|
});
|
|
394
394
|
}
|
|
395
395
|
}
|
|
396
|
-
var
|
|
396
|
+
var rr = function(e, r, t, n, u, c, o) {
|
|
397
397
|
var a = {
|
|
398
398
|
// This tag allows us to uniquely identify this as a React Element
|
|
399
|
-
$$typeof:
|
|
399
|
+
$$typeof: A,
|
|
400
400
|
// Built-in properties that belong on the element
|
|
401
401
|
type: e,
|
|
402
402
|
key: r,
|
|
403
|
-
ref:
|
|
403
|
+
ref: t,
|
|
404
404
|
props: o,
|
|
405
405
|
// Record the component responsible for creating this element.
|
|
406
|
-
_owner:
|
|
406
|
+
_owner: c
|
|
407
407
|
};
|
|
408
408
|
return a._store = {}, Object.defineProperty(a._store, "validated", {
|
|
409
409
|
configurable: !1,
|
|
@@ -414,7 +414,7 @@ function pr() {
|
|
|
414
414
|
configurable: !1,
|
|
415
415
|
enumerable: !1,
|
|
416
416
|
writable: !1,
|
|
417
|
-
value:
|
|
417
|
+
value: n
|
|
418
418
|
}), Object.defineProperty(a, "_source", {
|
|
419
419
|
configurable: !1,
|
|
420
420
|
enumerable: !1,
|
|
@@ -422,41 +422,41 @@ function pr() {
|
|
|
422
422
|
value: u
|
|
423
423
|
}), Object.freeze && (Object.freeze(a.props), Object.freeze(a)), a;
|
|
424
424
|
};
|
|
425
|
-
function
|
|
425
|
+
function tr(e, r, t, n, u) {
|
|
426
426
|
{
|
|
427
|
-
var
|
|
428
|
-
|
|
429
|
-
for (
|
|
430
|
-
|
|
427
|
+
var c, o = {}, a = null, g = null;
|
|
428
|
+
t !== void 0 && (Ce(t), a = "" + t), He(r) && (Ce(r.key), a = "" + r.key), ze(r) && (g = r.ref, Ze(r, u));
|
|
429
|
+
for (c in r)
|
|
430
|
+
Q.call(r, c) && !Xe.hasOwnProperty(c) && (o[c] = r[c]);
|
|
431
431
|
if (e && e.defaultProps) {
|
|
432
|
-
var
|
|
433
|
-
for (
|
|
434
|
-
o[
|
|
432
|
+
var f = e.defaultProps;
|
|
433
|
+
for (c in f)
|
|
434
|
+
o[c] === void 0 && (o[c] = f[c]);
|
|
435
435
|
}
|
|
436
|
-
if (a ||
|
|
437
|
-
var
|
|
438
|
-
a &&
|
|
436
|
+
if (a || g) {
|
|
437
|
+
var d = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
438
|
+
a && Qe(o, d), g && er(o, d);
|
|
439
439
|
}
|
|
440
|
-
return
|
|
440
|
+
return rr(e, a, g, u, n, we.current, o);
|
|
441
441
|
}
|
|
442
442
|
}
|
|
443
|
-
var
|
|
444
|
-
function
|
|
443
|
+
var ye = R.ReactCurrentOwner, ke = R.ReactDebugCurrentFrame;
|
|
444
|
+
function K(e) {
|
|
445
445
|
if (e) {
|
|
446
|
-
var r = e._owner,
|
|
447
|
-
|
|
446
|
+
var r = e._owner, t = se(e.type, e._source, r ? r.type : null);
|
|
447
|
+
ke.setExtraStackFrame(t);
|
|
448
448
|
} else
|
|
449
|
-
|
|
449
|
+
ke.setExtraStackFrame(null);
|
|
450
450
|
}
|
|
451
|
-
var
|
|
452
|
-
|
|
453
|
-
function
|
|
454
|
-
return typeof e == "object" && e !== null && e.$$typeof ===
|
|
451
|
+
var be;
|
|
452
|
+
be = !1;
|
|
453
|
+
function Ee(e) {
|
|
454
|
+
return typeof e == "object" && e !== null && e.$$typeof === A;
|
|
455
455
|
}
|
|
456
|
-
function
|
|
456
|
+
function De() {
|
|
457
457
|
{
|
|
458
|
-
if (
|
|
459
|
-
var e =
|
|
458
|
+
if (ye.current) {
|
|
459
|
+
var e = C(ye.current.type);
|
|
460
460
|
if (e)
|
|
461
461
|
return `
|
|
462
462
|
|
|
@@ -468,181 +468,179 @@ Check the render method of \`` + e + "`.";
|
|
|
468
468
|
function nr(e) {
|
|
469
469
|
return "";
|
|
470
470
|
}
|
|
471
|
-
var
|
|
472
|
-
function
|
|
471
|
+
var $e = {};
|
|
472
|
+
function ar(e) {
|
|
473
473
|
{
|
|
474
|
-
var r =
|
|
474
|
+
var r = De();
|
|
475
475
|
if (!r) {
|
|
476
|
-
var
|
|
477
|
-
|
|
476
|
+
var t = typeof e == "string" ? e : e.displayName || e.name;
|
|
477
|
+
t && (r = `
|
|
478
478
|
|
|
479
|
-
Check the top-level render call using <` +
|
|
479
|
+
Check the top-level render call using <` + t + ">.");
|
|
480
480
|
}
|
|
481
481
|
return r;
|
|
482
482
|
}
|
|
483
483
|
}
|
|
484
|
-
function
|
|
484
|
+
function Ae(e, r) {
|
|
485
485
|
{
|
|
486
486
|
if (!e._store || e._store.validated || e.key != null)
|
|
487
487
|
return;
|
|
488
488
|
e._store.validated = !0;
|
|
489
|
-
var
|
|
490
|
-
if (
|
|
489
|
+
var t = ar(r);
|
|
490
|
+
if ($e[t])
|
|
491
491
|
return;
|
|
492
|
-
|
|
493
|
-
var
|
|
494
|
-
e && e._owner && e._owner !==
|
|
492
|
+
$e[t] = !0;
|
|
493
|
+
var n = "";
|
|
494
|
+
e && e._owner && e._owner !== ye.current && (n = " It was passed a child from " + C(e._owner.type) + "."), K(e), i('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', t, n), K(null);
|
|
495
495
|
}
|
|
496
496
|
}
|
|
497
|
-
function
|
|
497
|
+
function Fe(e, r) {
|
|
498
498
|
{
|
|
499
499
|
if (typeof e != "object")
|
|
500
500
|
return;
|
|
501
|
-
if (
|
|
502
|
-
for (var
|
|
503
|
-
var
|
|
504
|
-
|
|
501
|
+
if (ge(e))
|
|
502
|
+
for (var t = 0; t < e.length; t++) {
|
|
503
|
+
var n = e[t];
|
|
504
|
+
Ee(n) && Ae(n, r);
|
|
505
505
|
}
|
|
506
|
-
else if (
|
|
506
|
+
else if (Ee(e))
|
|
507
507
|
e._store && (e._store.validated = !0);
|
|
508
508
|
else if (e) {
|
|
509
|
-
var u =
|
|
509
|
+
var u = p(e);
|
|
510
510
|
if (typeof u == "function" && u !== e.entries)
|
|
511
|
-
for (var
|
|
512
|
-
|
|
511
|
+
for (var c = u.call(e), o; !(o = c.next()).done; )
|
|
512
|
+
Ee(o.value) && Ae(o.value, r);
|
|
513
513
|
}
|
|
514
514
|
}
|
|
515
515
|
}
|
|
516
|
-
function
|
|
516
|
+
function or(e) {
|
|
517
517
|
{
|
|
518
518
|
var r = e.type;
|
|
519
519
|
if (r == null || typeof r == "string")
|
|
520
520
|
return;
|
|
521
|
-
var
|
|
521
|
+
var t;
|
|
522
522
|
if (typeof r == "function")
|
|
523
|
-
|
|
524
|
-
else if (typeof r == "object" && (r.$$typeof ===
|
|
523
|
+
t = r.propTypes;
|
|
524
|
+
else if (typeof r == "object" && (r.$$typeof === l || // Note: Memo only checks outer props here.
|
|
525
525
|
// Inner props are checked in the reconciler.
|
|
526
|
-
r.$$typeof ===
|
|
527
|
-
|
|
526
|
+
r.$$typeof === x))
|
|
527
|
+
t = r.propTypes;
|
|
528
528
|
else
|
|
529
529
|
return;
|
|
530
|
-
if (
|
|
531
|
-
var
|
|
532
|
-
|
|
533
|
-
} else if (r.PropTypes !== void 0 && !
|
|
534
|
-
|
|
535
|
-
var u =
|
|
536
|
-
|
|
530
|
+
if (t) {
|
|
531
|
+
var n = C(r);
|
|
532
|
+
qe(t, e.props, "prop", n, e);
|
|
533
|
+
} else if (r.PropTypes !== void 0 && !be) {
|
|
534
|
+
be = !0;
|
|
535
|
+
var u = C(r);
|
|
536
|
+
i("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", u || "Unknown");
|
|
537
537
|
}
|
|
538
|
-
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved &&
|
|
538
|
+
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && i("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
539
539
|
}
|
|
540
540
|
}
|
|
541
|
-
function
|
|
541
|
+
function ir(e) {
|
|
542
542
|
{
|
|
543
|
-
for (var r = Object.keys(e.props),
|
|
544
|
-
var
|
|
545
|
-
if (
|
|
546
|
-
|
|
543
|
+
for (var r = Object.keys(e.props), t = 0; t < r.length; t++) {
|
|
544
|
+
var n = r[t];
|
|
545
|
+
if (n !== "children" && n !== "key") {
|
|
546
|
+
K(e), i("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", n), K(null);
|
|
547
547
|
break;
|
|
548
548
|
}
|
|
549
549
|
}
|
|
550
|
-
e.ref !== null && (
|
|
550
|
+
e.ref !== null && (K(e), i("Invalid attribute `ref` supplied to `React.Fragment`."), K(null));
|
|
551
551
|
}
|
|
552
552
|
}
|
|
553
|
-
var
|
|
554
|
-
function
|
|
553
|
+
var Me = {};
|
|
554
|
+
function Ie(e, r, t, n, u, c) {
|
|
555
555
|
{
|
|
556
|
-
var o =
|
|
556
|
+
var o = de(e);
|
|
557
557
|
if (!o) {
|
|
558
558
|
var a = "";
|
|
559
559
|
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (a += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
560
|
-
var
|
|
561
|
-
|
|
562
|
-
var
|
|
563
|
-
e === null ?
|
|
560
|
+
var g = nr();
|
|
561
|
+
g ? a += g : a += De();
|
|
562
|
+
var f;
|
|
563
|
+
e === null ? f = "null" : ge(e) ? f = "array" : e !== void 0 && e.$$typeof === A ? (f = "<" + (C(e.type) || "Unknown") + " />", a = " Did you accidentally export a JSX literal instead of a component?") : f = typeof e, i("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", f, a);
|
|
564
564
|
}
|
|
565
|
-
var
|
|
566
|
-
if (
|
|
567
|
-
return
|
|
565
|
+
var d = tr(e, r, t, u, c);
|
|
566
|
+
if (d == null)
|
|
567
|
+
return d;
|
|
568
568
|
if (o) {
|
|
569
|
-
var
|
|
570
|
-
if (
|
|
571
|
-
if (
|
|
572
|
-
if (
|
|
573
|
-
for (var
|
|
574
|
-
|
|
575
|
-
Object.freeze && Object.freeze(
|
|
569
|
+
var T = r.children;
|
|
570
|
+
if (T !== void 0)
|
|
571
|
+
if (n)
|
|
572
|
+
if (ge(T)) {
|
|
573
|
+
for (var X = 0; X < T.length; X++)
|
|
574
|
+
Fe(T[X], e);
|
|
575
|
+
Object.freeze && Object.freeze(T);
|
|
576
576
|
} else
|
|
577
|
-
|
|
577
|
+
i("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
578
578
|
else
|
|
579
|
-
|
|
579
|
+
Fe(T, e);
|
|
580
580
|
}
|
|
581
|
-
if (
|
|
582
|
-
var
|
|
583
|
-
return
|
|
584
|
-
}),
|
|
585
|
-
if (!
|
|
586
|
-
var
|
|
587
|
-
|
|
581
|
+
if (Q.call(r, "key")) {
|
|
582
|
+
var L = C(e), b = Object.keys(r).filter(function(dr) {
|
|
583
|
+
return dr !== "key";
|
|
584
|
+
}), _e = b.length > 0 ? "{key: someKey, " + b.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
585
|
+
if (!Me[L + _e]) {
|
|
586
|
+
var fr = b.length > 0 ? "{" + b.join(": ..., ") + ": ...}" : "{}";
|
|
587
|
+
i(`A props object containing a "key" prop is being spread into JSX:
|
|
588
588
|
let props = %s;
|
|
589
589
|
<%s {...props} />
|
|
590
590
|
React keys must be passed directly to JSX without using spread:
|
|
591
591
|
let props = %s;
|
|
592
|
-
<%s key={someKey} {...props} />`,
|
|
592
|
+
<%s key={someKey} {...props} />`, _e, L, fr, L), Me[L + _e] = !0;
|
|
593
593
|
}
|
|
594
594
|
}
|
|
595
|
-
return e ===
|
|
595
|
+
return e === j ? ir(d) : or(d), d;
|
|
596
596
|
}
|
|
597
597
|
}
|
|
598
|
-
function
|
|
599
|
-
return
|
|
598
|
+
function ur(e, r, t) {
|
|
599
|
+
return Ie(e, r, t, !0);
|
|
600
600
|
}
|
|
601
|
-
function
|
|
602
|
-
return
|
|
601
|
+
function sr(e, r, t) {
|
|
602
|
+
return Ie(e, r, t, !1);
|
|
603
603
|
}
|
|
604
|
-
var
|
|
605
|
-
|
|
606
|
-
})()),
|
|
604
|
+
var cr = sr, lr = ur;
|
|
605
|
+
re.Fragment = j, re.jsx = cr, re.jsxs = lr;
|
|
606
|
+
})()), re;
|
|
607
607
|
}
|
|
608
|
-
var
|
|
608
|
+
var Ve;
|
|
609
609
|
function hr() {
|
|
610
|
-
return
|
|
610
|
+
return Ve || (Ve = 1, process.env.NODE_ENV === "production" ? le.exports = vr() : le.exports = pr()), le.exports;
|
|
611
611
|
}
|
|
612
|
-
var
|
|
613
|
-
const
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
commits: F,
|
|
621
|
-
rowHeight: k,
|
|
622
|
-
colorPalette: Y,
|
|
623
|
-
laneWidth: P
|
|
612
|
+
var Re = hr();
|
|
613
|
+
const Ne = 50, gr = 5, yr = ["#3a86ff", "#8338ec", "#ff006e", "#fb5607", "#ffbe0b"], Er = ({
|
|
614
|
+
commits: $,
|
|
615
|
+
rowHeight: A,
|
|
616
|
+
colorPalette: V,
|
|
617
|
+
laneWidth: j,
|
|
618
|
+
renderNode: F,
|
|
619
|
+
renderEdge: M
|
|
624
620
|
}) => {
|
|
625
|
-
const
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
621
|
+
const E = j || Ne, _ = A || Ne, l = We(() => (V || yr).map(
|
|
622
|
+
(s, v) => ({
|
|
623
|
+
color: s,
|
|
624
|
+
branch: null,
|
|
625
|
+
lane: v + 1
|
|
626
|
+
})
|
|
627
|
+
), [V, $]);
|
|
628
|
+
function k() {
|
|
629
|
+
var s = l.findIndex((p) => !p.branch);
|
|
630
|
+
if (s > -1)
|
|
631
|
+
return l[s];
|
|
632
|
+
var v = {
|
|
635
633
|
color: "#" + Math.floor(Math.random() * 16777215).toString(16),
|
|
636
634
|
branch: null,
|
|
637
|
-
lane:
|
|
635
|
+
lane: l.length + 1
|
|
638
636
|
};
|
|
639
|
-
return
|
|
637
|
+
return l.push(v), v;
|
|
640
638
|
}
|
|
641
|
-
const [
|
|
642
|
-
var
|
|
643
|
-
const
|
|
644
|
-
return
|
|
645
|
-
var
|
|
639
|
+
const [h, x] = Te.useState(0), S = We(() => {
|
|
640
|
+
var s = [];
|
|
641
|
+
const v = /* @__PURE__ */ new Map();
|
|
642
|
+
return $.forEach((p, R) => {
|
|
643
|
+
var i = {
|
|
646
644
|
...p,
|
|
647
645
|
color: "",
|
|
648
646
|
lane: 0,
|
|
@@ -650,66 +648,60 @@ const De = 50, br = 5, gr = [
|
|
|
650
648
|
cy: 0,
|
|
651
649
|
prev: []
|
|
652
650
|
// initialize empty
|
|
653
|
-
},
|
|
654
|
-
|
|
655
|
-
var
|
|
656
|
-
|
|
657
|
-
var
|
|
658
|
-
|
|
659
|
-
}),
|
|
660
|
-
p.parents.forEach((
|
|
661
|
-
const
|
|
662
|
-
|
|
651
|
+
}, y = l.find((O) => O.branch == p.id);
|
|
652
|
+
console.log("brachColor", y, i), console.log("colorPool", JSON.parse(JSON.stringify(l))), y || (y = k());
|
|
653
|
+
var D = l.find((O) => O.branch == p.parents[0]);
|
|
654
|
+
D ? y.branch = null : y.branch = p.parents[0], i.color = y.color, i.lane = y.lane, i.cx = i.lane * E - E / 2, i.cy = _ * R + E / 2;
|
|
655
|
+
var I = l.reduce((O, U) => U.branch !== null ? O + 1 : O, 0);
|
|
656
|
+
I > h && x(I), s.push(i), v.set(i.id, i);
|
|
657
|
+
}), s.forEach((p) => {
|
|
658
|
+
p.parents.forEach((R) => {
|
|
659
|
+
const i = v.get(R);
|
|
660
|
+
i && i.prev.push(p);
|
|
663
661
|
});
|
|
664
|
-
}),
|
|
665
|
-
}, [
|
|
666
|
-
function
|
|
667
|
-
const p = i.cx, E = i.
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
`;
|
|
679
|
-
}
|
|
680
|
-
return `
|
|
681
|
-
M ${p} ${E}
|
|
682
|
-
C ${p} ${E + j / 2},
|
|
683
|
-
${l} ${E + j / 2},
|
|
684
|
-
${l} ${C}
|
|
685
|
-
L ${l} ${d}
|
|
686
|
-
`;
|
|
662
|
+
}), s;
|
|
663
|
+
}, [$, _, E]);
|
|
664
|
+
function N(s, v) {
|
|
665
|
+
const p = s.cx, R = s.cy, i = v.cx, y = v.cy, D = E + E * 0.01, I = _ + _ * 0.01, O = i - p, U = y - R, fe = Math.sign(O), J = Math.sign(U), de = Math.abs(O), ve = Math.abs(U), te = Math.min(
|
|
666
|
+
Math.floor(de / D),
|
|
667
|
+
Math.floor(ve / I)
|
|
668
|
+
), C = I * J, w = D * 1;
|
|
669
|
+
let m = p, P = R, q = `M ${m} ${P} `;
|
|
670
|
+
for (let ue = 0; ue < te; ue++) {
|
|
671
|
+
const W = m + fe * D, Y = P + C, B = m, Z = P + J * w, G = W, he = Y - J * w;
|
|
672
|
+
q += `C ${B} ${Z}, ${G} ${he}, ${W} ${Y} `, m = W, P = Y;
|
|
673
|
+
}
|
|
674
|
+
const ne = y - P, z = Math.sign(ne), H = D * 1, ae = m, oe = P + z * H, ie = i, pe = y - z * H;
|
|
675
|
+
return q += `C ${ae} ${oe}, ${ie} ${pe}, ${i} ${y}`, q;
|
|
687
676
|
}
|
|
688
|
-
return /* @__PURE__ */
|
|
689
|
-
|
|
690
|
-
(
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
677
|
+
return /* @__PURE__ */ Re.jsxs("svg", { width: h * E + 100, height: _ * S.length, children: [
|
|
678
|
+
S.flatMap(
|
|
679
|
+
(s) => s.prev.map((v) => {
|
|
680
|
+
const p = N(s, v);
|
|
681
|
+
return M ? M(s, v, p) : /* @__PURE__ */ Re.jsx(
|
|
682
|
+
"path",
|
|
683
|
+
{
|
|
684
|
+
d: p,
|
|
685
|
+
fill: "none",
|
|
686
|
+
stroke: s.lane <= v.lane ? v.color : s.color,
|
|
687
|
+
strokeWidth: 2
|
|
688
|
+
},
|
|
689
|
+
`${s.id}-${v.id}`
|
|
690
|
+
);
|
|
691
|
+
})
|
|
700
692
|
),
|
|
701
|
-
|
|
693
|
+
S.map((s) => F ? F(s) : /* @__PURE__ */ Re.jsx(
|
|
702
694
|
"circle",
|
|
703
695
|
{
|
|
704
|
-
cx:
|
|
705
|
-
cy:
|
|
706
|
-
r:
|
|
707
|
-
fill:
|
|
696
|
+
cx: s.cx,
|
|
697
|
+
cy: s.cy,
|
|
698
|
+
r: gr,
|
|
699
|
+
fill: s.color
|
|
708
700
|
},
|
|
709
|
-
|
|
701
|
+
s.id
|
|
710
702
|
))
|
|
711
703
|
] });
|
|
712
704
|
};
|
|
713
705
|
export {
|
|
714
|
-
|
|
706
|
+
Er as GitGraphSVG
|
|
715
707
|
};
|
|
@@ -1,25 +1,14 @@
|
|
|
1
|
-
(function(
|
|
2
|
-
`+
|
|
3
|
-
`),
|
|
4
|
-
`),
|
|
5
|
-
`+a[
|
|
1
|
+
(function(F,w){typeof exports=="object"&&typeof module<"u"?w(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],w):(F=typeof globalThis<"u"?globalThis:F||self,w(F.GitRepoGraph={},F.React))})(this,(function(F,w){"use strict";var ae={exports:{}},Z={};var Se;function Ue(){if(Se)return Z;Se=1;var M=w,$=Symbol.for("react.element"),U=Symbol.for("react.fragment"),k=Object.prototype.hasOwnProperty,I=M.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,W={key:!0,ref:!0,__self:!0,__source:!0};function E(_,l,D){var h,x={},S=null,G=null;D!==void 0&&(S=""+D),l.key!==void 0&&(S=""+l.key),l.ref!==void 0&&(G=l.ref);for(h in l)k.call(l,h)&&!W.hasOwnProperty(h)&&(x[h]=l[h]);if(_&&_.defaultProps)for(h in l=_.defaultProps,l)x[h]===void 0&&(x[h]=l[h]);return{$$typeof:$,type:_,key:S,ref:G,props:x,_owner:I.current}}return Z.Fragment=U,Z.jsx=E,Z.jsxs=E,Z}var Q={};var Oe;function Ge(){return Oe||(Oe=1,process.env.NODE_ENV!=="production"&&(function(){var M=w,$=Symbol.for("react.element"),U=Symbol.for("react.portal"),k=Symbol.for("react.fragment"),I=Symbol.for("react.strict_mode"),W=Symbol.for("react.profiler"),E=Symbol.for("react.provider"),_=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),D=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),x=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),G=Symbol.for("react.offscreen"),u=Symbol.iterator,v="@@iterator";function p(e){if(e===null||typeof e!="object")return null;var r=u&&e[u]||e[v];return typeof r=="function"?r:null}var R=M.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function i(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];y("error",e,t)}}function y(e,r,t){{var n=R.ReactDebugCurrentFrame,s=n.getStackAddendum();s!==""&&(r+="%s",t=t.concat([s]));var c=t.map(function(o){return String(o)});c.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,c)}}var A=!1,Y=!1,O=!1,J=!1,pe=!1,B;B=Symbol.for("react.module.reference");function he(e){return!!(typeof e=="string"||typeof e=="function"||e===k||e===W||pe||e===I||e===D||e===h||J||e===G||A||Y||O||typeof e=="object"&&e!==null&&(e.$$typeof===S||e.$$typeof===x||e.$$typeof===E||e.$$typeof===_||e.$$typeof===l||e.$$typeof===B||e.getModuleId!==void 0))}function ge(e,r,t){var n=e.displayName;if(n)return n;var s=r.displayName||r.name||"";return s!==""?t+"("+s+")":t}function oe(e){return e.displayName||"Context"}function C(e){if(e==null)return null;if(typeof e.tag=="number"&&i("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case k:return"Fragment";case U:return"Portal";case W:return"Profiler";case I:return"StrictMode";case D:return"Suspense";case h:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case _:var r=e;return oe(r)+".Consumer";case E:var t=e;return oe(t._context)+".Provider";case l:return ge(e,e.render,"ForwardRef");case x:var n=e.displayName||null;return n!==null?n:C(e.type)||"Memo";case S:{var s=e,c=s._payload,o=s._init;try{return C(o(c))}catch{return null}}}return null}var P=Object.assign,m=0,j,K,ie,ee,re,se,ue;function ce(){}ce.__reactDisabledLog=!0;function ye(){{if(m===0){j=console.log,K=console.info,ie=console.warn,ee=console.error,re=console.group,se=console.groupCollapsed,ue=console.groupEnd;var e={configurable:!0,enumerable:!0,value:ce,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}m++}}function le(){{if(m--,m===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:P({},e,{value:j}),info:P({},e,{value:K}),warn:P({},e,{value:ie}),error:P({},e,{value:ee}),group:P({},e,{value:re}),groupCollapsed:P({},e,{value:se}),groupEnd:P({},e,{value:ue})})}m<0&&i("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var L=R.ReactCurrentDispatcher,V;function X(e,r,t){{if(V===void 0)try{throw Error()}catch(s){var n=s.stack.trim().match(/\n( *(at )?)/);V=n&&n[1]||""}return`
|
|
2
|
+
`+V+e}}var te=!1,q;{var be=typeof WeakMap=="function"?WeakMap:Map;q=new be}function Pe(e,r){if(!e||te)return"";{var t=q.get(e);if(t!==void 0)return t}var n;te=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var c;c=L.current,L.current=null,ye();try{if(r){var o=function(){throw Error()};if(Object.defineProperty(o.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(o,[])}catch(b){n=b}Reflect.construct(e,[],o)}else{try{o.call()}catch(b){n=b}e.call(o.prototype)}}else{try{throw Error()}catch(b){n=b}e()}}catch(b){if(b&&n&&typeof b.stack=="string"){for(var a=b.stack.split(`
|
|
3
|
+
`),g=n.stack.split(`
|
|
4
|
+
`),f=a.length-1,d=g.length-1;f>=1&&d>=0&&a[f]!==g[d];)d--;for(;f>=1&&d>=0;f--,d--)if(a[f]!==g[d]){if(f!==1||d!==1)do if(f--,d--,d<0||a[f]!==g[d]){var T=`
|
|
5
|
+
`+a[f].replace(" at new "," at ");return e.displayName&&T.includes("<anonymous>")&&(T=T.replace("<anonymous>",e.displayName)),typeof e=="function"&&q.set(e,T),T}while(f>=1&&d>=0);break}}}finally{te=!1,L.current=c,le(),Error.prepareStackTrace=s}var H=e?e.displayName||e.name:"",N=H?X(H):"";return typeof e=="function"&&q.set(e,N),N}function qe(e,r,t){return Pe(e,!1)}function ze(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function fe(e,r,t){if(e==null)return"";if(typeof e=="function")return Pe(e,ze(e));if(typeof e=="string")return X(e);switch(e){case D:return X("Suspense");case h:return X("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case l:return qe(e.render);case x:return fe(e.type,r,t);case S:{var n=e,s=n._payload,c=n._init;try{return fe(c(s),r,t)}catch{}}}return""}var ne=Object.prototype.hasOwnProperty,we={},je=R.ReactDebugCurrentFrame;function de(e){if(e){var r=e._owner,t=fe(e.type,e._source,r?r.type:null);je.setExtraStackFrame(t)}else je.setExtraStackFrame(null)}function He(e,r,t,n,s){{var c=Function.call.bind(ne);for(var o in e)if(c(e,o)){var a=void 0;try{if(typeof e[o]!="function"){var g=Error((n||"React class")+": "+t+" type `"+o+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[o]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw g.name="Invariant Violation",g}a=e[o](r,o,n,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(f){a=f}a&&!(a instanceof Error)&&(de(s),i("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",n||"React class",t,o,typeof a),de(null)),a instanceof Error&&!(a.message in we)&&(we[a.message]=!0,de(s),i("Failed %s type: %s",t,a.message),de(null))}}}var Ze=Array.isArray;function Ee(e){return Ze(e)}function Qe(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function er(e){try{return ke(e),!1}catch{return!0}}function ke(e){return""+e}function De(e){if(er(e))return i("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Qe(e)),ke(e)}var Ae=R.ReactCurrentOwner,rr={key:!0,ref:!0,__self:!0,__source:!0},Fe,Me;function tr(e){if(ne.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function nr(e){if(ne.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function ar(e,r){typeof e.ref=="string"&&Ae.current}function or(e,r){{var t=function(){Fe||(Fe=!0,i("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}}function ir(e,r){{var t=function(){Me||(Me=!0,i("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"ref",{get:t,configurable:!0})}}var sr=function(e,r,t,n,s,c,o){var a={$$typeof:$,type:e,key:r,ref:t,props:o,_owner:c};return a._store={},Object.defineProperty(a._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(a,"_self",{configurable:!1,enumerable:!1,writable:!1,value:n}),Object.defineProperty(a,"_source",{configurable:!1,enumerable:!1,writable:!1,value:s}),Object.freeze&&(Object.freeze(a.props),Object.freeze(a)),a};function ur(e,r,t,n,s){{var c,o={},a=null,g=null;t!==void 0&&(De(t),a=""+t),nr(r)&&(De(r.key),a=""+r.key),tr(r)&&(g=r.ref,ar(r,s));for(c in r)ne.call(r,c)&&!rr.hasOwnProperty(c)&&(o[c]=r[c]);if(e&&e.defaultProps){var f=e.defaultProps;for(c in f)o[c]===void 0&&(o[c]=f[c])}if(a||g){var d=typeof e=="function"?e.displayName||e.name||"Unknown":e;a&&or(o,d),g&&ir(o,d)}return sr(e,a,g,s,n,Ae.current,o)}}var _e=R.ReactCurrentOwner,$e=R.ReactDebugCurrentFrame;function z(e){if(e){var r=e._owner,t=fe(e.type,e._source,r?r.type:null);$e.setExtraStackFrame(t)}else $e.setExtraStackFrame(null)}var Re;Re=!1;function Te(e){return typeof e=="object"&&e!==null&&e.$$typeof===$}function Ie(){{if(_e.current){var e=C(_e.current.type);if(e)return`
|
|
6
6
|
|
|
7
|
-
Check the render method of \``+e+"`."}return""}}function
|
|
7
|
+
Check the render method of \``+e+"`."}return""}}function cr(e){return""}var We={};function lr(e){{var r=Ie();if(!r){var t=typeof e=="string"?e:e.displayName||e.name;t&&(r=`
|
|
8
8
|
|
|
9
|
-
Check the top-level render call using <`+t+">.")}return r}}function
|
|
9
|
+
Check the top-level render call using <`+t+">.")}return r}}function Ye(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=lr(r);if(We[t])return;We[t]=!0;var n="";e&&e._owner&&e._owner!==_e.current&&(n=" It was passed a child from "+C(e._owner.type)+"."),z(e),i('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',t,n),z(null)}}function Le(e,r){{if(typeof e!="object")return;if(Ee(e))for(var t=0;t<e.length;t++){var n=e[t];Te(n)&&Ye(n,r)}else if(Te(e))e._store&&(e._store.validated=!0);else if(e){var s=p(e);if(typeof s=="function"&&s!==e.entries)for(var c=s.call(e),o;!(o=c.next()).done;)Te(o.value)&&Ye(o.value,r)}}}function fr(e){{var r=e.type;if(r==null||typeof r=="string")return;var t;if(typeof r=="function")t=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===l||r.$$typeof===x))t=r.propTypes;else return;if(t){var n=C(r);He(t,e.props,"prop",n,e)}else if(r.PropTypes!==void 0&&!Re){Re=!0;var s=C(r);i("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",s||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&i("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function dr(e){{for(var r=Object.keys(e.props),t=0;t<r.length;t++){var n=r[t];if(n!=="children"&&n!=="key"){z(e),i("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",n),z(null);break}}e.ref!==null&&(z(e),i("Invalid attribute `ref` supplied to `React.Fragment`."),z(null))}}var Ve={};function Ne(e,r,t,n,s,c){{var o=he(e);if(!o){var a="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(a+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var g=cr();g?a+=g:a+=Ie();var f;e===null?f="null":Ee(e)?f="array":e!==void 0&&e.$$typeof===$?(f="<"+(C(e.type)||"Unknown")+" />",a=" Did you accidentally export a JSX literal instead of a component?"):f=typeof e,i("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",f,a)}var d=ur(e,r,t,s,c);if(d==null)return d;if(o){var T=r.children;if(T!==void 0)if(n)if(Ee(T)){for(var H=0;H<T.length;H++)Le(T[H],e);Object.freeze&&Object.freeze(T)}else i("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Le(T,e)}if(ne.call(r,"key")){var N=C(e),b=Object.keys(r).filter(function(br){return br!=="key"}),xe=b.length>0?"{key: someKey, "+b.join(": ..., ")+": ...}":"{key: someKey}";if(!Ve[N+xe]){var yr=b.length>0?"{"+b.join(": ..., ")+": ...}":"{}";i(`A props object containing a "key" prop is being spread into JSX:
|
|
10
10
|
let props = %s;
|
|
11
11
|
<%s {...props} />
|
|
12
12
|
React keys must be passed directly to JSX without using spread:
|
|
13
13
|
let props = %s;
|
|
14
|
-
<%s key={someKey} {...props} />`,
|
|
15
|
-
M ${p} ${y}
|
|
16
|
-
C ${p} ${W},
|
|
17
|
-
${l} ${W},
|
|
18
|
-
${l} ${d}
|
|
19
|
-
`}return`
|
|
20
|
-
M ${p} ${y}
|
|
21
|
-
C ${p} ${y+k/2},
|
|
22
|
-
${l} ${y+k/2},
|
|
23
|
-
${l} ${x}
|
|
24
|
-
L ${l} ${d}
|
|
25
|
-
`}return X.jsxs("svg",{width:b*O+100,height:S*g.length,children:[g.flatMap(i=>i.prev.map(f=>X.jsx("path",{d:m(i,f),fill:"none",stroke:i.lane<=f.lane?f.color:i.color,strokeWidth:2},`${i.id}-${f.id}`))),g.map(i=>X.jsx("circle",{cx:i.cx,cy:i.cy,r:We,fill:i.color},i.id))]})};D.GitGraphSVG=Le,Object.defineProperty(D,Symbol.toStringTag,{value:"Module"})}));
|
|
14
|
+
<%s key={someKey} {...props} />`,xe,N,yr,N),Ve[N+xe]=!0}}return e===k?dr(d):fr(d),d}}function vr(e,r,t){return Ne(e,r,t,!0)}function pr(e,r,t){return Ne(e,r,t,!1)}var hr=pr,gr=vr;Q.Fragment=k,Q.jsx=hr,Q.jsxs=gr})()),Q}var me;function Je(){return me||(me=1,process.env.NODE_ENV==="production"?ae.exports=Ue():ae.exports=Ge()),ae.exports}var ve=Je();const Ce=50,Be=5,Ke=["#3a86ff","#8338ec","#ff006e","#fb5607","#ffbe0b"],Xe=({commits:M,rowHeight:$,colorPalette:U,laneWidth:k,renderNode:I,renderEdge:W})=>{const E=k||Ce,_=$||Ce,l=w.useMemo(()=>(U||Ke).map((u,v)=>({color:u,branch:null,lane:v+1})),[U,M]);function D(){var u=l.findIndex(p=>!p.branch);if(u>-1)return l[u];var v={color:"#"+Math.floor(Math.random()*16777215).toString(16),branch:null,lane:l.length+1};return l.push(v),v}const[h,x]=w.useState(0),S=w.useMemo(()=>{var u=[];const v=new Map;return M.forEach((p,R)=>{var i={...p,color:"",lane:0,cx:0,cy:0,prev:[]},y=l.find(O=>O.branch==p.id);console.log("brachColor",y,i),console.log("colorPool",JSON.parse(JSON.stringify(l))),y||(y=D());var A=l.find(O=>O.branch==p.parents[0]);A?y.branch=null:y.branch=p.parents[0],i.color=y.color,i.lane=y.lane,i.cx=i.lane*E-E/2,i.cy=_*R+E/2;var Y=l.reduce((O,J)=>J.branch!==null?O+1:O,0);Y>h&&x(Y),u.push(i),v.set(i.id,i)}),u.forEach(p=>{p.parents.forEach(R=>{const i=v.get(R);i&&i.prev.push(p)})}),u},[M,_,E]);function G(u,v){const p=u.cx,R=u.cy,i=v.cx,y=v.cy,A=E+E*.01,Y=_+_*.01,O=i-p,J=y-R,pe=Math.sign(O),B=Math.sign(J),he=Math.abs(O),ge=Math.abs(J),oe=Math.min(Math.floor(he/A),Math.floor(ge/Y)),C=Y*B,P=A*1;let m=p,j=R,K=`M ${m} ${j} `;for(let le=0;le<oe;le++){const L=m+pe*A,V=j+C,X=m,te=j+B*P,q=L,be=V-B*P;K+=`C ${X} ${te}, ${q} ${be}, ${L} ${V} `,m=L,j=V}const ie=y-j,ee=Math.sign(ie),re=A*1,se=m,ue=j+ee*re,ce=i,ye=y-ee*re;return K+=`C ${se} ${ue}, ${ce} ${ye}, ${i} ${y}`,K}return ve.jsxs("svg",{width:h*E+100,height:_*S.length,children:[S.flatMap(u=>u.prev.map(v=>{const p=G(u,v);return W?W(u,v,p):ve.jsx("path",{d:p,fill:"none",stroke:u.lane<=v.lane?v.color:u.color,strokeWidth:2},`${u.id}-${v.id}`)})),S.map(u=>I?I(u):ve.jsx("circle",{cx:u.cx,cy:u.cy,r:Be,fill:u.color},u.id))]})};F.GitGraphSVG=Xe,Object.defineProperty(F,Symbol.toStringTag,{value:"Module"})}));
|