@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 ae, { useMemo as dr } from "react";
2
- var K = { exports: {} }, U = {};
3
- var je;
1
+ import Te, { useMemo as We } from "react";
2
+ var le = { exports: {} }, ee = {};
3
+ var Ye;
4
4
  function vr() {
5
- if (je) return U;
6
- je = 1;
7
- var F = ae, k = /* @__PURE__ */ Symbol.for("react.element"), Y = /* @__PURE__ */ Symbol.for("react.fragment"), P = Object.prototype.hasOwnProperty, O = F.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, x = { key: !0, ref: !0, __self: !0, __source: !0 };
8
- function R(S, b, w) {
9
- var g, T = {}, i = null, f = null;
10
- w !== void 0 && (i = "" + w), b.key !== void 0 && (i = "" + b.key), b.ref !== void 0 && (f = b.ref);
11
- for (g in b) P.call(b, g) && !x.hasOwnProperty(g) && (T[g] = b[g]);
12
- if (S && S.defaultProps) for (g in b = S.defaultProps, b) T[g] === void 0 && (T[g] = b[g]);
13
- return { $$typeof: k, type: S, key: i, ref: f, props: T, _owner: O.current };
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 U.Fragment = Y, U.jsx = R, U.jsxs = R, U;
15
+ return ee.Fragment = V, ee.jsx = E, ee.jsxs = E, ee;
16
16
  }
17
- var N = {};
18
- var $e;
17
+ var re = {};
18
+ var Le;
19
19
  function pr() {
20
- return $e || ($e = 1, process.env.NODE_ENV !== "production" && (function() {
21
- var F = ae, k = /* @__PURE__ */ Symbol.for("react.element"), Y = /* @__PURE__ */ Symbol.for("react.portal"), P = /* @__PURE__ */ Symbol.for("react.fragment"), O = /* @__PURE__ */ Symbol.for("react.strict_mode"), x = /* @__PURE__ */ Symbol.for("react.profiler"), R = /* @__PURE__ */ Symbol.for("react.provider"), S = /* @__PURE__ */ Symbol.for("react.context"), b = /* @__PURE__ */ Symbol.for("react.forward_ref"), w = /* @__PURE__ */ Symbol.for("react.suspense"), g = /* @__PURE__ */ Symbol.for("react.suspense_list"), T = /* @__PURE__ */ Symbol.for("react.memo"), i = /* @__PURE__ */ Symbol.for("react.lazy"), f = /* @__PURE__ */ Symbol.for("react.offscreen"), p = Symbol.iterator, E = "@@iterator";
22
- function l(e) {
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 = p && e[p] || e[E];
25
+ var r = s && e[s] || e[v];
26
26
  return typeof r == "function" ? r : null;
27
27
  }
28
- var d = F.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
29
- function h(e) {
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, n = new Array(r > 1 ? r - 1 : 0), t = 1; t < r; t++)
32
- n[t - 1] = arguments[t];
33
- j("error", e, n);
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 j(e, r, n) {
36
+ function y(e, r, t) {
37
37
  {
38
- var t = d.ReactDebugCurrentFrame, u = t.getStackAddendum();
39
- u !== "" && (r += "%s", n = n.concat([u]));
40
- var s = n.map(function(o) {
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
- s.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, s);
43
+ c.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, c);
44
44
  }
45
45
  }
46
- var C = !1, I = !1, Ae = !1, Fe = !1, Ie = !1, oe;
47
- oe = /* @__PURE__ */ Symbol.for("react.module.reference");
48
- function Me(e) {
49
- return !!(typeof e == "string" || typeof e == "function" || e === P || e === x || Ie || e === O || e === w || e === g || Fe || e === f || C || I || Ae || typeof e == "object" && e !== null && (e.$$typeof === i || e.$$typeof === T || e.$$typeof === R || e.$$typeof === S || e.$$typeof === b || // This needs to include all possible module reference object
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 === oe || e.getModuleId !== void 0));
53
+ e.$$typeof === J || e.getModuleId !== void 0));
54
54
  }
55
- function We(e, r, n) {
56
- var t = e.displayName;
57
- if (t)
58
- return t;
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 !== "" ? n + "(" + u + ")" : n;
60
+ return u !== "" ? t + "(" + u + ")" : t;
61
61
  }
62
- function ie(e) {
62
+ function te(e) {
63
63
  return e.displayName || "Context";
64
64
  }
65
- function $(e) {
65
+ function C(e) {
66
66
  if (e == null)
67
67
  return null;
68
- if (typeof e.tag == "number" && h("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
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 P:
73
+ case j:
74
74
  return "Fragment";
75
- case Y:
75
+ case V:
76
76
  return "Portal";
77
- case x:
77
+ case M:
78
78
  return "Profiler";
79
- case O:
79
+ case F:
80
80
  return "StrictMode";
81
- case w:
81
+ case k:
82
82
  return "Suspense";
83
- case g:
83
+ case h:
84
84
  return "SuspenseList";
85
85
  }
86
86
  if (typeof e == "object")
87
87
  switch (e.$$typeof) {
88
- case S:
88
+ case _:
89
89
  var r = e;
90
- return ie(r) + ".Consumer";
91
- case R:
92
- var n = e;
93
- return ie(n._context) + ".Provider";
94
- case b:
95
- return We(e, e.render, "ForwardRef");
96
- case T:
97
- var t = e.displayName || null;
98
- return t !== null ? t : $(e.type) || "Memo";
99
- case i: {
100
- var u = e, s = u._payload, o = u._init;
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 $(o(s));
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 D = Object.assign, L = 0, ue, se, le, ce, fe, de, ve;
111
- function pe() {
110
+ var w = Object.assign, m = 0, P, q, ne, z, H, ae, oe;
111
+ function ie() {
112
112
  }
113
- pe.__reactDisabledLog = !0;
114
- function Ye() {
113
+ ie.__reactDisabledLog = !0;
114
+ function pe() {
115
115
  {
116
- if (L === 0) {
117
- ue = console.log, se = console.info, le = console.warn, ce = console.error, fe = console.group, de = console.groupCollapsed, ve = console.groupEnd;
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: pe,
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
- L++;
134
+ m++;
135
135
  }
136
136
  }
137
- function Le() {
137
+ function ue() {
138
138
  {
139
- if (L--, L === 0) {
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: D({}, e, {
147
- value: ue
146
+ log: w({}, e, {
147
+ value: P
148
148
  }),
149
- info: D({}, e, {
150
- value: se
149
+ info: w({}, e, {
150
+ value: q
151
151
  }),
152
- warn: D({}, e, {
153
- value: le
152
+ warn: w({}, e, {
153
+ value: ne
154
154
  }),
155
- error: D({}, e, {
156
- value: ce
155
+ error: w({}, e, {
156
+ value: z
157
157
  }),
158
- group: D({}, e, {
159
- value: fe
158
+ group: w({}, e, {
159
+ value: H
160
160
  }),
161
- groupCollapsed: D({}, e, {
162
- value: de
161
+ groupCollapsed: w({}, e, {
162
+ value: ae
163
163
  }),
164
- groupEnd: D({}, e, {
165
- value: ve
164
+ groupEnd: w({}, e, {
165
+ value: oe
166
166
  })
167
167
  });
168
168
  }
169
- L < 0 && h("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
169
+ m < 0 && i("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
170
170
  }
171
171
  }
172
- var z = d.ReactCurrentDispatcher, H;
173
- function J(e, r, n) {
172
+ var W = R.ReactCurrentDispatcher, Y;
173
+ function B(e, r, t) {
174
174
  {
175
- if (H === void 0)
175
+ if (Y === void 0)
176
176
  try {
177
177
  throw Error();
178
178
  } catch (u) {
179
- var t = u.stack.trim().match(/\n( *(at )?)/);
180
- H = t && t[1] || "";
179
+ var n = u.stack.trim().match(/\n( *(at )?)/);
180
+ Y = n && n[1] || "";
181
181
  }
182
182
  return `
183
- ` + H + e;
183
+ ` + Y + e;
184
184
  }
185
185
  }
186
- var X = !1, q;
186
+ var Z = !1, G;
187
187
  {
188
- var Ve = typeof WeakMap == "function" ? WeakMap : Map;
189
- q = new Ve();
188
+ var he = typeof WeakMap == "function" ? WeakMap : Map;
189
+ G = new he();
190
190
  }
191
- function he(e, r) {
192
- if (!e || X)
191
+ function xe(e, r) {
192
+ if (!e || Z)
193
193
  return "";
194
194
  {
195
- var n = q.get(e);
196
- if (n !== void 0)
197
- return n;
195
+ var t = G.get(e);
196
+ if (t !== void 0)
197
+ return t;
198
198
  }
199
- var t;
200
- X = !0;
199
+ var n;
200
+ Z = !0;
201
201
  var u = Error.prepareStackTrace;
202
202
  Error.prepareStackTrace = void 0;
203
- var s;
204
- s = z.current, z.current = null, Ye();
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
- t = _;
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
- t = _;
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
- t = _;
232
+ } catch (b) {
233
+ n = b;
234
234
  }
235
235
  e();
236
236
  }
237
- } catch (_) {
238
- if (_ && t && typeof _.stack == "string") {
239
- for (var a = _.stack.split(`
240
- `), y = t.stack.split(`
241
- `), c = a.length - 1, v = y.length - 1; c >= 1 && v >= 0 && a[c] !== y[v]; )
242
- v--;
243
- for (; c >= 1 && v >= 0; c--, v--)
244
- if (a[c] !== y[v]) {
245
- if (c !== 1 || v !== 1)
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 (c--, v--, v < 0 || a[c] !== y[v]) {
248
- var m = `
249
- ` + a[c].replace(" at new ", " at ");
250
- return e.displayName && m.includes("<anonymous>") && (m = m.replace("<anonymous>", e.displayName)), typeof e == "function" && q.set(e, m), m;
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 (c >= 1 && v >= 0);
252
+ while (f >= 1 && d >= 0);
253
253
  break;
254
254
  }
255
255
  }
256
256
  } finally {
257
- X = !1, z.current = s, Le(), Error.prepareStackTrace = u;
257
+ Z = !1, W.current = c, ue(), Error.prepareStackTrace = u;
258
258
  }
259
- var W = e ? e.displayName || e.name : "", A = W ? J(W) : "";
260
- return typeof e == "function" && q.set(e, A), A;
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, n) {
263
- return he(e, !1);
262
+ function Ue(e, r, t) {
263
+ return xe(e, !1);
264
264
  }
265
- function Ne(e) {
265
+ function Je(e) {
266
266
  var r = e.prototype;
267
267
  return !!(r && r.isReactComponent);
268
268
  }
269
- function B(e, r, n) {
269
+ function se(e, r, t) {
270
270
  if (e == null)
271
271
  return "";
272
272
  if (typeof e == "function")
273
- return he(e, Ne(e));
273
+ return xe(e, Je(e));
274
274
  if (typeof e == "string")
275
- return J(e);
275
+ return B(e);
276
276
  switch (e) {
277
- case w:
278
- return J("Suspense");
279
- case g:
280
- return J("SuspenseList");
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 b:
284
+ case l:
285
285
  return Ue(e.render);
286
- case T:
287
- return B(e.type, r, n);
288
- case i: {
289
- var t = e, u = t._payload, s = t._init;
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 B(s(u), r, n);
291
+ return se(c(u), r, t);
292
292
  } catch {
293
293
  }
294
294
  }
295
295
  }
296
296
  return "";
297
297
  }
298
- var V = Object.prototype.hasOwnProperty, be = {}, ge = d.ReactDebugCurrentFrame;
299
- function G(e) {
298
+ var Q = Object.prototype.hasOwnProperty, Se = {}, Oe = R.ReactDebugCurrentFrame;
299
+ function ce(e) {
300
300
  if (e) {
301
- var r = e._owner, n = B(e.type, e._source, r ? r.type : null);
302
- ge.setExtraStackFrame(n);
301
+ var r = e._owner, t = se(e.type, e._source, r ? r.type : null);
302
+ Oe.setExtraStackFrame(t);
303
303
  } else
304
- ge.setExtraStackFrame(null);
304
+ Oe.setExtraStackFrame(null);
305
305
  }
306
- function Je(e, r, n, t, u) {
306
+ function qe(e, r, t, n, u) {
307
307
  {
308
- var s = Function.call.bind(V);
308
+ var c = Function.call.bind(Q);
309
309
  for (var o in e)
310
- if (s(e, o)) {
310
+ if (c(e, o)) {
311
311
  var a = void 0;
312
312
  try {
313
313
  if (typeof e[o] != "function") {
314
- var y = Error((t || "React class") + ": " + n + " 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 y.name = "Invariant Violation", y;
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, t, n, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
318
- } catch (c) {
319
- a = c;
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) && (G(u), h("%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).", t || "React class", n, o, typeof a), G(null)), a instanceof Error && !(a.message in be) && (be[a.message] = !0, G(u), h("Failed %s type: %s", n, a.message), G(null));
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 qe = Array.isArray;
326
- function Z(e) {
327
- return qe(e);
325
+ var Be = Array.isArray;
326
+ function ge(e) {
327
+ return Be(e);
328
328
  }
329
- function Be(e) {
329
+ function Ge(e) {
330
330
  {
331
- var r = typeof Symbol == "function" && Symbol.toStringTag, n = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
332
- return n;
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 Ge(e) {
335
+ function Ke(e) {
336
336
  try {
337
- return Ee(e), !1;
337
+ return me(e), !1;
338
338
  } catch {
339
339
  return !0;
340
340
  }
341
341
  }
342
- function Ee(e) {
342
+ function me(e) {
343
343
  return "" + e;
344
344
  }
345
- function ye(e) {
346
- if (Ge(e))
347
- return h("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Be(e)), Ee(e);
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 _e = d.ReactCurrentOwner, Ke = {
349
+ var we = R.ReactCurrentOwner, Xe = {
350
350
  key: !0,
351
351
  ref: !0,
352
352
  __self: !0,
353
353
  __source: !0
354
- }, Re, me;
354
+ }, Pe, je;
355
355
  function ze(e) {
356
- if (V.call(e, "ref")) {
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 (V.call(e, "key")) {
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 n = function() {
377
- Re || (Re = !0, h("%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));
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
- n.isReactWarning = !0, Object.defineProperty(e, "key", {
380
- get: n,
379
+ t.isReactWarning = !0, Object.defineProperty(e, "key", {
380
+ get: t,
381
381
  configurable: !0
382
382
  });
383
383
  }
384
384
  }
385
- function Qe(e, r) {
385
+ function er(e, r) {
386
386
  {
387
- var n = function() {
388
- me || (me = !0, h("%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));
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
- n.isReactWarning = !0, Object.defineProperty(e, "ref", {
391
- get: n,
390
+ t.isReactWarning = !0, Object.defineProperty(e, "ref", {
391
+ get: t,
392
392
  configurable: !0
393
393
  });
394
394
  }
395
395
  }
396
- var er = function(e, r, n, t, u, s, o) {
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: k,
399
+ $$typeof: A,
400
400
  // Built-in properties that belong on the element
401
401
  type: e,
402
402
  key: r,
403
- ref: n,
403
+ ref: t,
404
404
  props: o,
405
405
  // Record the component responsible for creating this element.
406
- _owner: s
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: t
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 rr(e, r, n, t, u) {
425
+ function tr(e, r, t, n, u) {
426
426
  {
427
- var s, o = {}, a = null, y = null;
428
- n !== void 0 && (ye(n), a = "" + n), He(r) && (ye(r.key), a = "" + r.key), ze(r) && (y = r.ref, Xe(r, u));
429
- for (s in r)
430
- V.call(r, s) && !Ke.hasOwnProperty(s) && (o[s] = r[s]);
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 c = e.defaultProps;
433
- for (s in c)
434
- o[s] === void 0 && (o[s] = c[s]);
432
+ var f = e.defaultProps;
433
+ for (c in f)
434
+ o[c] === void 0 && (o[c] = f[c]);
435
435
  }
436
- if (a || y) {
437
- var v = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
438
- a && Ze(o, v), y && Qe(o, v);
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 er(e, a, y, u, t, _e.current, o);
440
+ return rr(e, a, g, u, n, we.current, o);
441
441
  }
442
442
  }
443
- var Q = d.ReactCurrentOwner, Te = d.ReactDebugCurrentFrame;
444
- function M(e) {
443
+ var ye = R.ReactCurrentOwner, ke = R.ReactDebugCurrentFrame;
444
+ function K(e) {
445
445
  if (e) {
446
- var r = e._owner, n = B(e.type, e._source, r ? r.type : null);
447
- Te.setExtraStackFrame(n);
446
+ var r = e._owner, t = se(e.type, e._source, r ? r.type : null);
447
+ ke.setExtraStackFrame(t);
448
448
  } else
449
- Te.setExtraStackFrame(null);
449
+ ke.setExtraStackFrame(null);
450
450
  }
451
- var ee;
452
- ee = !1;
453
- function re(e) {
454
- return typeof e == "object" && e !== null && e.$$typeof === k;
451
+ var be;
452
+ be = !1;
453
+ function Ee(e) {
454
+ return typeof e == "object" && e !== null && e.$$typeof === A;
455
455
  }
456
- function Oe() {
456
+ function De() {
457
457
  {
458
- if (Q.current) {
459
- var e = $(Q.current.type);
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 xe = {};
472
- function tr(e) {
471
+ var $e = {};
472
+ function ar(e) {
473
473
  {
474
- var r = Oe();
474
+ var r = De();
475
475
  if (!r) {
476
- var n = typeof e == "string" ? e : e.displayName || e.name;
477
- n && (r = `
476
+ var t = typeof e == "string" ? e : e.displayName || e.name;
477
+ t && (r = `
478
478
 
479
- Check the top-level render call using <` + n + ">.");
479
+ Check the top-level render call using <` + t + ">.");
480
480
  }
481
481
  return r;
482
482
  }
483
483
  }
484
- function Ce(e, r) {
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 n = tr(r);
490
- if (xe[n])
489
+ var t = ar(r);
490
+ if ($e[t])
491
491
  return;
492
- xe[n] = !0;
493
- var t = "";
494
- e && e._owner && e._owner !== Q.current && (t = " It was passed a child from " + $(e._owner.type) + "."), M(e), h('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', n, t), M(null);
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 Se(e, r) {
497
+ function Fe(e, r) {
498
498
  {
499
499
  if (typeof e != "object")
500
500
  return;
501
- if (Z(e))
502
- for (var n = 0; n < e.length; n++) {
503
- var t = e[n];
504
- re(t) && Ce(t, r);
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 (re(e))
506
+ else if (Ee(e))
507
507
  e._store && (e._store.validated = !0);
508
508
  else if (e) {
509
- var u = l(e);
509
+ var u = p(e);
510
510
  if (typeof u == "function" && u !== e.entries)
511
- for (var s = u.call(e), o; !(o = s.next()).done; )
512
- re(o.value) && Ce(o.value, r);
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 ar(e) {
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 n;
521
+ var t;
522
522
  if (typeof r == "function")
523
- n = r.propTypes;
524
- else if (typeof r == "object" && (r.$$typeof === b || // Note: Memo only checks outer props here.
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 === T))
527
- n = r.propTypes;
526
+ r.$$typeof === x))
527
+ t = r.propTypes;
528
528
  else
529
529
  return;
530
- if (n) {
531
- var t = $(r);
532
- Je(n, e.props, "prop", t, e);
533
- } else if (r.PropTypes !== void 0 && !ee) {
534
- ee = !0;
535
- var u = $(r);
536
- h("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", u || "Unknown");
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 && h("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
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 or(e) {
541
+ function ir(e) {
542
542
  {
543
- for (var r = Object.keys(e.props), n = 0; n < r.length; n++) {
544
- var t = r[n];
545
- if (t !== "children" && t !== "key") {
546
- M(e), h("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", t), M(null);
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 && (M(e), h("Invalid attribute `ref` supplied to `React.Fragment`."), M(null));
550
+ e.ref !== null && (K(e), i("Invalid attribute `ref` supplied to `React.Fragment`."), K(null));
551
551
  }
552
552
  }
553
- var Pe = {};
554
- function we(e, r, n, t, u, s) {
553
+ var Me = {};
554
+ function Ie(e, r, t, n, u, c) {
555
555
  {
556
- var o = Me(e);
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 y = nr();
561
- y ? a += y : a += Oe();
562
- var c;
563
- e === null ? c = "null" : Z(e) ? c = "array" : e !== void 0 && e.$$typeof === k ? (c = "<" + ($(e.type) || "Unknown") + " />", a = " Did you accidentally export a JSX literal instead of a component?") : c = typeof e, h("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", c, a);
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 v = rr(e, r, n, u, s);
566
- if (v == null)
567
- return v;
565
+ var d = tr(e, r, t, u, c);
566
+ if (d == null)
567
+ return d;
568
568
  if (o) {
569
- var m = r.children;
570
- if (m !== void 0)
571
- if (t)
572
- if (Z(m)) {
573
- for (var W = 0; W < m.length; W++)
574
- Se(m[W], e);
575
- Object.freeze && Object.freeze(m);
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
- h("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
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
- Se(m, e);
579
+ Fe(T, e);
580
580
  }
581
- if (V.call(r, "key")) {
582
- var A = $(e), _ = Object.keys(r).filter(function(fr) {
583
- return fr !== "key";
584
- }), ne = _.length > 0 ? "{key: someKey, " + _.join(": ..., ") + ": ...}" : "{key: someKey}";
585
- if (!Pe[A + ne]) {
586
- var cr = _.length > 0 ? "{" + _.join(": ..., ") + ": ...}" : "{}";
587
- h(`A props object containing a "key" prop is being spread into JSX:
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} />`, ne, A, cr, A), Pe[A + ne] = !0;
592
+ <%s key={someKey} {...props} />`, _e, L, fr, L), Me[L + _e] = !0;
593
593
  }
594
594
  }
595
- return e === P ? or(v) : ar(v), v;
595
+ return e === j ? ir(d) : or(d), d;
596
596
  }
597
597
  }
598
- function ir(e, r, n) {
599
- return we(e, r, n, !0);
598
+ function ur(e, r, t) {
599
+ return Ie(e, r, t, !0);
600
600
  }
601
- function ur(e, r, n) {
602
- return we(e, r, n, !1);
601
+ function sr(e, r, t) {
602
+ return Ie(e, r, t, !1);
603
603
  }
604
- var sr = ur, lr = ir;
605
- N.Fragment = P, N.jsx = sr, N.jsxs = lr;
606
- })()), N;
604
+ var cr = sr, lr = ur;
605
+ re.Fragment = j, re.jsx = cr, re.jsxs = lr;
606
+ })()), re;
607
607
  }
608
- var ke;
608
+ var Ve;
609
609
  function hr() {
610
- return ke || (ke = 1, process.env.NODE_ENV === "production" ? K.exports = vr() : K.exports = pr()), K.exports;
610
+ return Ve || (Ve = 1, process.env.NODE_ENV === "production" ? le.exports = vr() : le.exports = pr()), le.exports;
611
611
  }
612
- var te = hr();
613
- const De = 50, br = 5, gr = [
614
- "#3a86ff",
615
- "#8338ec",
616
- "#ff006e",
617
- "#fb5607",
618
- "#ffbe0b"
619
- ], yr = ({
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 O = P || De, x = k || De, R = (Y || gr).map((i, f) => ({
626
- color: i,
627
- branch: null,
628
- lane: f + 1
629
- }));
630
- function S() {
631
- var i = R.findIndex((p) => !p.branch);
632
- if (i > -1)
633
- return R[i];
634
- var f = {
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: R.length + 1
635
+ lane: l.length + 1
638
636
  };
639
- return R.push(f), f;
637
+ return l.push(v), v;
640
638
  }
641
- const [b, w] = ae.useState(0), g = dr(() => {
642
- var i = [];
643
- const f = /* @__PURE__ */ new Map();
644
- return F.forEach((p, E) => {
645
- var l = {
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
- }, d = R.find((C) => C.branch == p.id);
654
- d || (d = S());
655
- var h = R.find((C) => C.branch == p.parents[0]);
656
- h ? d.branch = null : d.branch = p.parents[0], l.color = d.color, l.lane = d.lane, l.cx = l.lane * O - O / 2, l.cy = x * E + O / 2;
657
- var j = R.reduce((C, I) => I.branch !== null ? C + 1 : C, 0);
658
- j > b && w(j), i.push(l), f.set(l.id, l);
659
- }), i.forEach((p) => {
660
- p.parents.forEach((E) => {
661
- const l = f.get(E);
662
- l && l.prev.push(p);
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
- }), i;
665
- }, [F, x, O]);
666
- function T(i, f) {
667
- const p = i.cx, E = i.cy, l = f.cx, d = f.cy;
668
- if (p === l)
669
- return `M ${p} ${E} L ${l} ${d}`;
670
- const h = d > E ? 1 : -1, j = x * h, C = E + j;
671
- if (Math.abs(d - E) <= x) {
672
- const I = (E + d) / 2;
673
- return `
674
- M ${p} ${E}
675
- C ${p} ${I},
676
- ${l} ${I},
677
- ${l} ${d}
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__ */ te.jsxs("svg", { width: b * O + 100, height: x * g.length, children: [
689
- g.flatMap(
690
- (i) => i.prev.map((f) => /* @__PURE__ */ te.jsx(
691
- "path",
692
- {
693
- d: T(i, f),
694
- fill: "none",
695
- stroke: i.lane <= f.lane ? f.color : i.color,
696
- strokeWidth: 2
697
- },
698
- `${i.id}-${f.id}`
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
- g.map((i) => /* @__PURE__ */ te.jsx(
693
+ S.map((s) => F ? F(s) : /* @__PURE__ */ Re.jsx(
702
694
  "circle",
703
695
  {
704
- cx: i.cx,
705
- cy: i.cy,
706
- r: br,
707
- fill: i.color
696
+ cx: s.cx,
697
+ cy: s.cy,
698
+ r: gr,
699
+ fill: s.color
708
700
  },
709
- i.id
701
+ s.id
710
702
  ))
711
703
  ] });
712
704
  };
713
705
  export {
714
- yr as GitGraphSVG
706
+ Er as GitGraphSVG
715
707
  };
@@ -1,25 +1,14 @@
1
- (function(D,P){typeof exports=="object"&&typeof module<"u"?P(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],P):(D=typeof globalThis<"u"?globalThis:D||self,P(D.GitRepoGraph={},D.React))})(this,(function(D,P){"use strict";var B={exports:{}},V={};var ie;function Fe(){if(ie)return V;ie=1;var M=P,A=Symbol.for("react.element"),N=Symbol.for("react.fragment"),w=Object.prototype.hasOwnProperty,O=M.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,S={key:!0,ref:!0,__self:!0,__source:!0};function R(C,b,j){var g,m={},i=null,f=null;j!==void 0&&(i=""+j),b.key!==void 0&&(i=""+b.key),b.ref!==void 0&&(f=b.ref);for(g in b)w.call(b,g)&&!S.hasOwnProperty(g)&&(m[g]=b[g]);if(C&&C.defaultProps)for(g in b=C.defaultProps,b)m[g]===void 0&&(m[g]=b[g]);return{$$typeof:A,type:C,key:i,ref:f,props:m,_owner:O.current}}return V.Fragment=N,V.jsx=R,V.jsxs=R,V}var U={};var ue;function Ie(){return ue||(ue=1,process.env.NODE_ENV!=="production"&&(function(){var M=P,A=Symbol.for("react.element"),N=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),O=Symbol.for("react.strict_mode"),S=Symbol.for("react.profiler"),R=Symbol.for("react.provider"),C=Symbol.for("react.context"),b=Symbol.for("react.forward_ref"),j=Symbol.for("react.suspense"),g=Symbol.for("react.suspense_list"),m=Symbol.for("react.memo"),i=Symbol.for("react.lazy"),f=Symbol.for("react.offscreen"),p=Symbol.iterator,y="@@iterator";function l(e){if(e===null||typeof e!="object")return null;var r=p&&e[p]||e[y];return typeof r=="function"?r:null}var d=M.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function h(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];k("error",e,t)}}function k(e,r,t){{var n=d.ReactDebugCurrentFrame,u=n.getStackAddendum();u!==""&&(r+="%s",t=t.concat([u]));var s=t.map(function(o){return String(o)});s.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,s)}}var x=!1,W=!1,Ve=!1,Ue=!1,Ne=!1,ce;ce=Symbol.for("react.module.reference");function Ge(e){return!!(typeof e=="string"||typeof e=="function"||e===w||e===S||Ne||e===O||e===j||e===g||Ue||e===f||x||W||Ve||typeof e=="object"&&e!==null&&(e.$$typeof===i||e.$$typeof===m||e.$$typeof===R||e.$$typeof===C||e.$$typeof===b||e.$$typeof===ce||e.getModuleId!==void 0))}function Je(e,r,t){var n=e.displayName;if(n)return n;var u=r.displayName||r.name||"";return u!==""?t+"("+u+")":t}function fe(e){return e.displayName||"Context"}function $(e){if(e==null)return null;if(typeof e.tag=="number"&&h("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 w:return"Fragment";case N:return"Portal";case S:return"Profiler";case O:return"StrictMode";case j:return"Suspense";case g:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case C:var r=e;return fe(r)+".Consumer";case R:var t=e;return fe(t._context)+".Provider";case b:return Je(e,e.render,"ForwardRef");case m:var n=e.displayName||null;return n!==null?n:$(e.type)||"Memo";case i:{var u=e,s=u._payload,o=u._init;try{return $(o(s))}catch{return null}}}return null}var F=Object.assign,G=0,de,ve,pe,he,be,ge,ye;function Ee(){}Ee.__reactDisabledLog=!0;function Be(){{if(G===0){de=console.log,ve=console.info,pe=console.warn,he=console.error,be=console.group,ge=console.groupCollapsed,ye=console.groupEnd;var e={configurable:!0,enumerable:!0,value:Ee,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}G++}}function Ke(){{if(G--,G===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:F({},e,{value:de}),info:F({},e,{value:ve}),warn:F({},e,{value:pe}),error:F({},e,{value:he}),group:F({},e,{value:be}),groupCollapsed:F({},e,{value:ge}),groupEnd:F({},e,{value:ye})})}G<0&&h("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Z=d.ReactCurrentDispatcher,Q;function K(e,r,t){{if(Q===void 0)try{throw Error()}catch(u){var n=u.stack.trim().match(/\n( *(at )?)/);Q=n&&n[1]||""}return`
2
- `+Q+e}}var ee=!1,q;{var qe=typeof WeakMap=="function"?WeakMap:Map;q=new qe}function _e(e,r){if(!e||ee)return"";{var t=q.get(e);if(t!==void 0)return t}var n;ee=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var s;s=Z.current,Z.current=null,Be();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(_){n=_}Reflect.construct(e,[],o)}else{try{o.call()}catch(_){n=_}e.call(o.prototype)}}else{try{throw Error()}catch(_){n=_}e()}}catch(_){if(_&&n&&typeof _.stack=="string"){for(var a=_.stack.split(`
3
- `),E=n.stack.split(`
4
- `),c=a.length-1,v=E.length-1;c>=1&&v>=0&&a[c]!==E[v];)v--;for(;c>=1&&v>=0;c--,v--)if(a[c]!==E[v]){if(c!==1||v!==1)do if(c--,v--,v<0||a[c]!==E[v]){var T=`
5
- `+a[c].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(c>=1&&v>=0);break}}}finally{ee=!1,Z.current=s,Ke(),Error.prepareStackTrace=u}var L=e?e.displayName||e.name:"",I=L?K(L):"";return typeof e=="function"&&q.set(e,I),I}function ze(e,r,t){return _e(e,!1)}function He(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function z(e,r,t){if(e==null)return"";if(typeof e=="function")return _e(e,He(e));if(typeof e=="string")return K(e);switch(e){case j:return K("Suspense");case g:return K("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case b:return ze(e.render);case m:return z(e.type,r,t);case i:{var n=e,u=n._payload,s=n._init;try{return z(s(u),r,t)}catch{}}}return""}var J=Object.prototype.hasOwnProperty,Re={},Te=d.ReactDebugCurrentFrame;function H(e){if(e){var r=e._owner,t=z(e.type,e._source,r?r.type:null);Te.setExtraStackFrame(t)}else Te.setExtraStackFrame(null)}function Xe(e,r,t,n,u){{var s=Function.call.bind(J);for(var o in e)if(s(e,o)){var a=void 0;try{if(typeof e[o]!="function"){var E=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 E.name="Invariant Violation",E}a=e[o](r,o,n,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(c){a=c}a&&!(a instanceof Error)&&(H(u),h("%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),H(null)),a instanceof Error&&!(a.message in Re)&&(Re[a.message]=!0,H(u),h("Failed %s type: %s",t,a.message),H(null))}}}var Ze=Array.isArray;function re(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 me(e),!1}catch{return!0}}function me(e){return""+e}function Oe(e){if(er(e))return h("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Qe(e)),me(e)}var Se=d.ReactCurrentOwner,rr={key:!0,ref:!0,__self:!0,__source:!0},xe,Ce;function tr(e){if(J.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(J.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"&&Se.current}function or(e,r){{var t=function(){xe||(xe=!0,h("%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(){Ce||(Ce=!0,h("%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 ur=function(e,r,t,n,u,s,o){var a={$$typeof:A,type:e,key:r,ref:t,props:o,_owner:s};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:u}),Object.freeze&&(Object.freeze(a.props),Object.freeze(a)),a};function sr(e,r,t,n,u){{var s,o={},a=null,E=null;t!==void 0&&(Oe(t),a=""+t),nr(r)&&(Oe(r.key),a=""+r.key),tr(r)&&(E=r.ref,ar(r,u));for(s in r)J.call(r,s)&&!rr.hasOwnProperty(s)&&(o[s]=r[s]);if(e&&e.defaultProps){var c=e.defaultProps;for(s in c)o[s]===void 0&&(o[s]=c[s])}if(a||E){var v=typeof e=="function"?e.displayName||e.name||"Unknown":e;a&&or(o,v),E&&ir(o,v)}return ur(e,a,E,u,n,Se.current,o)}}var te=d.ReactCurrentOwner,Pe=d.ReactDebugCurrentFrame;function Y(e){if(e){var r=e._owner,t=z(e.type,e._source,r?r.type:null);Pe.setExtraStackFrame(t)}else Pe.setExtraStackFrame(null)}var ne;ne=!1;function ae(e){return typeof e=="object"&&e!==null&&e.$$typeof===A}function we(){{if(te.current){var e=$(te.current.type);if(e)return`
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 lr(e){return""}var je={};function cr(e){{var r=we();if(!r){var t=typeof e=="string"?e:e.displayName||e.name;t&&(r=`
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 ke(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=cr(r);if(je[t])return;je[t]=!0;var n="";e&&e._owner&&e._owner!==te.current&&(n=" It was passed a child from "+$(e._owner.type)+"."),Y(e),h('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),Y(null)}}function $e(e,r){{if(typeof e!="object")return;if(re(e))for(var t=0;t<e.length;t++){var n=e[t];ae(n)&&ke(n,r)}else if(ae(e))e._store&&(e._store.validated=!0);else if(e){var u=l(e);if(typeof u=="function"&&u!==e.entries)for(var s=u.call(e),o;!(o=s.next()).done;)ae(o.value)&&ke(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===b||r.$$typeof===m))t=r.propTypes;else return;if(t){var n=$(r);Xe(t,e.props,"prop",n,e)}else if(r.PropTypes!==void 0&&!ne){ne=!0;var u=$(r);h("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",u||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&h("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"){Y(e),h("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",n),Y(null);break}}e.ref!==null&&(Y(e),h("Invalid attribute `ref` supplied to `React.Fragment`."),Y(null))}}var De={};function Ae(e,r,t,n,u,s){{var o=Ge(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 E=lr();E?a+=E:a+=we();var c;e===null?c="null":re(e)?c="array":e!==void 0&&e.$$typeof===A?(c="<"+($(e.type)||"Unknown")+" />",a=" Did you accidentally export a JSX literal instead of a component?"):c=typeof e,h("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",c,a)}var v=sr(e,r,t,u,s);if(v==null)return v;if(o){var T=r.children;if(T!==void 0)if(n)if(re(T)){for(var L=0;L<T.length;L++)$e(T[L],e);Object.freeze&&Object.freeze(T)}else h("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 $e(T,e)}if(J.call(r,"key")){var I=$(e),_=Object.keys(r).filter(function(yr){return yr!=="key"}),oe=_.length>0?"{key: someKey, "+_.join(": ..., ")+": ...}":"{key: someKey}";if(!De[I+oe]){var gr=_.length>0?"{"+_.join(": ..., ")+": ...}":"{}";h(`A props object containing a "key" prop is being spread into JSX:
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} />`,oe,I,gr,I),De[I+oe]=!0}}return e===w?dr(v):fr(v),v}}function vr(e,r,t){return Ae(e,r,t,!0)}function pr(e,r,t){return Ae(e,r,t,!1)}var hr=pr,br=vr;U.Fragment=w,U.jsx=hr,U.jsxs=br})()),U}var se;function Me(){return se||(se=1,process.env.NODE_ENV==="production"?B.exports=Fe():B.exports=Ie()),B.exports}var X=Me();const le=50,We=5,Ye=["#3a86ff","#8338ec","#ff006e","#fb5607","#ffbe0b"],Le=({commits:M,rowHeight:A,colorPalette:N,laneWidth:w})=>{const O=w||le,S=A||le,R=(N||Ye).map((i,f)=>({color:i,branch:null,lane:f+1}));function C(){var i=R.findIndex(p=>!p.branch);if(i>-1)return R[i];var f={color:"#"+Math.floor(Math.random()*16777215).toString(16),branch:null,lane:R.length+1};return R.push(f),f}const[b,j]=P.useState(0),g=P.useMemo(()=>{var i=[];const f=new Map;return M.forEach((p,y)=>{var l={...p,color:"",lane:0,cx:0,cy:0,prev:[]},d=R.find(x=>x.branch==p.id);d||(d=C());var h=R.find(x=>x.branch==p.parents[0]);h?d.branch=null:d.branch=p.parents[0],l.color=d.color,l.lane=d.lane,l.cx=l.lane*O-O/2,l.cy=S*y+O/2;var k=R.reduce((x,W)=>W.branch!==null?x+1:x,0);k>b&&j(k),i.push(l),f.set(l.id,l)}),i.forEach(p=>{p.parents.forEach(y=>{const l=f.get(y);l&&l.prev.push(p)})}),i},[M,S,O]);function m(i,f){const p=i.cx,y=i.cy,l=f.cx,d=f.cy;if(p===l)return`M ${p} ${y} L ${l} ${d}`;const h=d>y?1:-1,k=S*h,x=y+k;if(Math.abs(d-y)<=S){const W=(y+d)/2;return`
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"})}));
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@akshay-rajput/git-graph-svg",
3
3
  "private": false,
4
- "version": "1.0.1",
4
+ "version": "1.0.3",
5
5
  "main": "dist/git-repo-graph.umd.js",
6
6
  "module": "dist/git-repo-graph.es.js",
7
7
  "types": "dist/index.d.ts",