@akshay-rajput/git-graph-svg 1.0.3 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/git-repo-graph.es.js +47 -45
- package/dist/git-repo-graph.umd.js +5 -5
- package/package.json +1 -1
|
@@ -5,37 +5,37 @@ function vr() {
|
|
|
5
5
|
if (Ye) return ee;
|
|
6
6
|
Ye = 1;
|
|
7
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
|
|
9
|
-
var h, x = {}, S = null,
|
|
10
|
-
k !== void 0 && (S = "" + k), l.key !== void 0 && (S = "" + l.key), l.ref !== void 0 && (
|
|
8
|
+
function y(E, l, k) {
|
|
9
|
+
var h, x = {}, S = null, U = null;
|
|
10
|
+
k !== void 0 && (S = "" + k), l.key !== void 0 && (S = "" + l.key), l.ref !== void 0 && (U = l.ref);
|
|
11
11
|
for (h in l) j.call(l, h) && !M.hasOwnProperty(h) && (x[h] = l[h]);
|
|
12
|
-
if (
|
|
13
|
-
return { $$typeof: A, type:
|
|
12
|
+
if (E && E.defaultProps) for (h in l = E.defaultProps, l) x[h] === void 0 && (x[h] = l[h]);
|
|
13
|
+
return { $$typeof: A, type: E, key: S, ref: U, props: x, _owner: F.current };
|
|
14
14
|
}
|
|
15
|
-
return ee.Fragment = V, ee.jsx =
|
|
15
|
+
return ee.Fragment = V, ee.jsx = y, ee.jsxs = y, ee;
|
|
16
16
|
}
|
|
17
17
|
var re = {};
|
|
18
18
|
var Le;
|
|
19
19
|
function pr() {
|
|
20
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"),
|
|
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"), y = /* @__PURE__ */ Symbol.for("react.provider"), E = /* @__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"), U = /* @__PURE__ */ Symbol.for("react.offscreen"), s = Symbol.iterator, v = "@@iterator";
|
|
22
22
|
function p(e) {
|
|
23
23
|
if (e === null || typeof e != "object")
|
|
24
24
|
return null;
|
|
25
25
|
var r = s && e[s] || e[v];
|
|
26
26
|
return typeof r == "function" ? r : null;
|
|
27
27
|
}
|
|
28
|
-
var
|
|
28
|
+
var _ = $.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
29
29
|
function i(e) {
|
|
30
30
|
{
|
|
31
31
|
for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), n = 1; n < r; n++)
|
|
32
32
|
t[n - 1] = arguments[n];
|
|
33
|
-
|
|
33
|
+
R("error", e, t);
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
|
-
function
|
|
36
|
+
function R(e, r, t) {
|
|
37
37
|
{
|
|
38
|
-
var n =
|
|
38
|
+
var n = _.ReactDebugCurrentFrame, u = n.getStackAddendum();
|
|
39
39
|
u !== "" && (r += "%s", t = t.concat([u]));
|
|
40
40
|
var c = t.map(function(o) {
|
|
41
41
|
return String(o);
|
|
@@ -43,10 +43,10 @@ function pr() {
|
|
|
43
43
|
c.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, c);
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
|
-
var D = !1, I = !1, O = !1,
|
|
46
|
+
var D = !1, I = !1, O = !1, N = !1, fe = !1, J;
|
|
47
47
|
J = /* @__PURE__ */ Symbol.for("react.module.reference");
|
|
48
48
|
function de(e) {
|
|
49
|
-
return !!(typeof e == "string" || typeof e == "function" || e === j || e === M || fe || e === F || e === k || e === h ||
|
|
49
|
+
return !!(typeof e == "string" || typeof e == "function" || e === j || e === M || fe || e === F || e === k || e === h || N || e === U || D || I || O || typeof e == "object" && e !== null && (e.$$typeof === S || e.$$typeof === x || e.$$typeof === y || e.$$typeof === E || 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.
|
|
@@ -85,10 +85,10 @@ function pr() {
|
|
|
85
85
|
}
|
|
86
86
|
if (typeof e == "object")
|
|
87
87
|
switch (e.$$typeof) {
|
|
88
|
-
case
|
|
88
|
+
case E:
|
|
89
89
|
var r = e;
|
|
90
90
|
return te(r) + ".Consumer";
|
|
91
|
-
case
|
|
91
|
+
case y:
|
|
92
92
|
var t = e;
|
|
93
93
|
return te(t._context) + ".Provider";
|
|
94
94
|
case l:
|
|
@@ -169,7 +169,7 @@ function pr() {
|
|
|
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 W =
|
|
172
|
+
var W = _.ReactCurrentDispatcher, Y;
|
|
173
173
|
function B(e, r, t) {
|
|
174
174
|
{
|
|
175
175
|
if (Y === void 0)
|
|
@@ -259,7 +259,7 @@ function pr() {
|
|
|
259
259
|
var X = e ? e.displayName || e.name : "", L = X ? B(X) : "";
|
|
260
260
|
return typeof e == "function" && G.set(e, L), L;
|
|
261
261
|
}
|
|
262
|
-
function
|
|
262
|
+
function Ne(e, r, t) {
|
|
263
263
|
return xe(e, !1);
|
|
264
264
|
}
|
|
265
265
|
function Je(e) {
|
|
@@ -282,7 +282,7 @@ function pr() {
|
|
|
282
282
|
if (typeof e == "object")
|
|
283
283
|
switch (e.$$typeof) {
|
|
284
284
|
case l:
|
|
285
|
-
return
|
|
285
|
+
return Ne(e.render);
|
|
286
286
|
case x:
|
|
287
287
|
return se(e.type, r, t);
|
|
288
288
|
case S: {
|
|
@@ -295,7 +295,7 @@ function pr() {
|
|
|
295
295
|
}
|
|
296
296
|
return "";
|
|
297
297
|
}
|
|
298
|
-
var Q = Object.prototype.hasOwnProperty, Se = {}, Oe =
|
|
298
|
+
var Q = Object.prototype.hasOwnProperty, Se = {}, Oe = _.ReactDebugCurrentFrame;
|
|
299
299
|
function ce(e) {
|
|
300
300
|
if (e) {
|
|
301
301
|
var r = e._owner, t = se(e.type, e._source, r ? r.type : null);
|
|
@@ -346,7 +346,7 @@ function pr() {
|
|
|
346
346
|
if (Ke(e))
|
|
347
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 we =
|
|
349
|
+
var we = _.ReactCurrentOwner, Xe = {
|
|
350
350
|
key: !0,
|
|
351
351
|
ref: !0,
|
|
352
352
|
__self: !0,
|
|
@@ -440,7 +440,7 @@ function pr() {
|
|
|
440
440
|
return rr(e, a, g, u, n, we.current, o);
|
|
441
441
|
}
|
|
442
442
|
}
|
|
443
|
-
var
|
|
443
|
+
var be = _.ReactCurrentOwner, ke = _.ReactDebugCurrentFrame;
|
|
444
444
|
function K(e) {
|
|
445
445
|
if (e) {
|
|
446
446
|
var r = e._owner, t = se(e.type, e._source, r ? r.type : null);
|
|
@@ -448,15 +448,15 @@ function pr() {
|
|
|
448
448
|
} else
|
|
449
449
|
ke.setExtraStackFrame(null);
|
|
450
450
|
}
|
|
451
|
-
var
|
|
452
|
-
|
|
451
|
+
var ye;
|
|
452
|
+
ye = !1;
|
|
453
453
|
function Ee(e) {
|
|
454
454
|
return typeof e == "object" && e !== null && e.$$typeof === A;
|
|
455
455
|
}
|
|
456
456
|
function De() {
|
|
457
457
|
{
|
|
458
|
-
if (
|
|
459
|
-
var e = C(
|
|
458
|
+
if (be.current) {
|
|
459
|
+
var e = C(be.current.type);
|
|
460
460
|
if (e)
|
|
461
461
|
return `
|
|
462
462
|
|
|
@@ -491,7 +491,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
491
491
|
return;
|
|
492
492
|
$e[t] = !0;
|
|
493
493
|
var n = "";
|
|
494
|
-
e && e._owner && e._owner !==
|
|
494
|
+
e && e._owner && e._owner !== be.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
497
|
function Fe(e, r) {
|
|
@@ -530,8 +530,8 @@ Check the top-level render call using <` + t + ">.");
|
|
|
530
530
|
if (t) {
|
|
531
531
|
var n = C(r);
|
|
532
532
|
qe(t, e.props, "prop", n, e);
|
|
533
|
-
} else if (r.PropTypes !== void 0 && !
|
|
534
|
-
|
|
533
|
+
} else if (r.PropTypes !== void 0 && !ye) {
|
|
534
|
+
ye = !0;
|
|
535
535
|
var u = C(r);
|
|
536
536
|
i("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", u || "Unknown");
|
|
537
537
|
}
|
|
@@ -610,7 +610,7 @@ function hr() {
|
|
|
610
610
|
return Ve || (Ve = 1, process.env.NODE_ENV === "production" ? le.exports = vr() : le.exports = pr()), le.exports;
|
|
611
611
|
}
|
|
612
612
|
var Re = hr();
|
|
613
|
-
const
|
|
613
|
+
const Ue = 50, gr = 5, br = ["#3a86ff", "#8338ec", "#ff006e", "#fb5607", "#ffbe0b"], Er = ({
|
|
614
614
|
commits: $,
|
|
615
615
|
rowHeight: A,
|
|
616
616
|
colorPalette: V,
|
|
@@ -618,7 +618,7 @@ const Ne = 50, gr = 5, yr = ["#3a86ff", "#8338ec", "#ff006e", "#fb5607", "#ffbe0
|
|
|
618
618
|
renderNode: F,
|
|
619
619
|
renderEdge: M
|
|
620
620
|
}) => {
|
|
621
|
-
const
|
|
621
|
+
const y = j || Ue, E = A || Ue, l = We(() => (V || br).map(
|
|
622
622
|
(s, v) => ({
|
|
623
623
|
color: s,
|
|
624
624
|
branch: null,
|
|
@@ -639,7 +639,7 @@ const Ne = 50, gr = 5, yr = ["#3a86ff", "#8338ec", "#ff006e", "#fb5607", "#ffbe0
|
|
|
639
639
|
const [h, x] = Te.useState(0), S = We(() => {
|
|
640
640
|
var s = [];
|
|
641
641
|
const v = /* @__PURE__ */ new Map();
|
|
642
|
-
return $.forEach((p,
|
|
642
|
+
return $.forEach((p, _) => {
|
|
643
643
|
var i = {
|
|
644
644
|
...p,
|
|
645
645
|
color: "",
|
|
@@ -648,36 +648,38 @@ const Ne = 50, gr = 5, yr = ["#3a86ff", "#8338ec", "#ff006e", "#fb5607", "#ffbe0
|
|
|
648
648
|
cy: 0,
|
|
649
649
|
prev: []
|
|
650
650
|
// initialize empty
|
|
651
|
-
},
|
|
652
|
-
|
|
651
|
+
}, R = l.find((O) => O.branch == p.id);
|
|
652
|
+
R || (R = k());
|
|
653
653
|
var D = l.find((O) => O.branch == p.parents[0]);
|
|
654
|
-
D ?
|
|
655
|
-
|
|
654
|
+
if (D ? R.branch = null : R.branch = p.parents[0], console.log(l), console.log(i), p.id == "c45")
|
|
655
|
+
debugger;
|
|
656
|
+
i.color = R.color, i.lane = R.lane, i.cx = i.lane * y - y / 2, i.cy = E * _ + y / 2;
|
|
657
|
+
var I = l.reduce((O, N) => N.branch !== null ? O + 1 : O, 0);
|
|
656
658
|
I > h && x(I), s.push(i), v.set(i.id, i);
|
|
657
659
|
}), s.forEach((p) => {
|
|
658
|
-
p.parents.forEach((
|
|
659
|
-
const i = v.get(
|
|
660
|
+
p.parents.forEach((_) => {
|
|
661
|
+
const i = v.get(_);
|
|
660
662
|
i && i.prev.push(p);
|
|
661
663
|
});
|
|
662
664
|
}), s;
|
|
663
|
-
}, [$,
|
|
664
|
-
function
|
|
665
|
-
const p = s.cx,
|
|
665
|
+
}, [$, E, y]);
|
|
666
|
+
function U(s, v) {
|
|
667
|
+
const p = s.cx, _ = s.cy, i = v.cx, R = v.cy, D = y + y * 0.01, I = E + E * 0.01, O = i - p, N = R - _, fe = Math.sign(O), J = Math.sign(N), de = Math.abs(O), ve = Math.abs(N), te = Math.min(
|
|
666
668
|
Math.floor(de / D),
|
|
667
669
|
Math.floor(ve / I)
|
|
668
670
|
), C = I * J, w = D * 1;
|
|
669
|
-
let m = p, P =
|
|
671
|
+
let m = p, P = _, q = `M ${m} ${P} `;
|
|
670
672
|
for (let ue = 0; ue < te; ue++) {
|
|
671
673
|
const W = m + fe * D, Y = P + C, B = m, Z = P + J * w, G = W, he = Y - J * w;
|
|
672
674
|
q += `C ${B} ${Z}, ${G} ${he}, ${W} ${Y} `, m = W, P = Y;
|
|
673
675
|
}
|
|
674
|
-
const ne =
|
|
675
|
-
return q += `C ${ae} ${oe}, ${ie} ${pe}, ${i} ${
|
|
676
|
+
const ne = R - P, z = Math.sign(ne), H = D * 1, ae = m, oe = P + z * H, ie = i, pe = R - z * H;
|
|
677
|
+
return q += `C ${ae} ${oe}, ${ie} ${pe}, ${i} ${R}`, q;
|
|
676
678
|
}
|
|
677
|
-
return /* @__PURE__ */ Re.jsxs("svg", { width: h *
|
|
679
|
+
return /* @__PURE__ */ Re.jsxs("svg", { width: h * y + 100, height: E * S.length, children: [
|
|
678
680
|
S.flatMap(
|
|
679
681
|
(s) => s.prev.map((v) => {
|
|
680
|
-
const p =
|
|
682
|
+
const p = U(s, v);
|
|
681
683
|
return M ? M(s, v, p) : /* @__PURE__ */ Re.jsx(
|
|
682
684
|
"path",
|
|
683
685
|
{
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
(function(F,
|
|
2
|
-
`+V+e}}var te=!1,q;{var be=typeof WeakMap=="function"?WeakMap:Map;q=new be}function
|
|
1
|
+
(function(F,P){typeof exports=="object"&&typeof module<"u"?P(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],P):(F=typeof globalThis<"u"?globalThis:F||self,P(F.GitRepoGraph={},F.React))})(this,(function(F,P){"use strict";var ae={exports:{}},Z={};var Se;function Ne(){if(Se)return Z;Se=1;var M=P,$=Symbol.for("react.element"),N=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 b(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(E&&E.defaultProps)for(h in l=E.defaultProps,l)x[h]===void 0&&(x[h]=l[h]);return{$$typeof:$,type:E,key:S,ref:G,props:x,_owner:I.current}}return Z.Fragment=N,Z.jsx=b,Z.jsxs=b,Z}var Q={};var Oe;function Ge(){return Oe||(Oe=1,process.env.NODE_ENV!=="production"&&(function(){var M=P,$=Symbol.for("react.element"),N=Symbol.for("react.portal"),k=Symbol.for("react.fragment"),I=Symbol.for("react.strict_mode"),W=Symbol.for("react.profiler"),b=Symbol.for("react.provider"),E=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"),s=Symbol.iterator,v="@@iterator";function p(e){if(e===null||typeof e!="object")return null;var r=s&&e[s]||e[v];return typeof r=="function"?r:null}var _=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];R("error",e,t)}}function R(e,r,t){{var n=_.ReactDebugCurrentFrame,u=n.getStackAddendum();u!==""&&(r+="%s",t=t.concat([u]));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===b||e.$$typeof===E||e.$$typeof===l||e.$$typeof===B||e.getModuleId!==void 0))}function ge(e,r,t){var n=e.displayName;if(n)return n;var u=r.displayName||r.name||"";return u!==""?t+"("+u+")":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 N: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 E:var r=e;return oe(r)+".Consumer";case b: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 u=e,c=u._payload,o=u._init;try{return C(o(c))}catch{return null}}}return null}var w=Object.assign,m=0,j,K,ie,ee,re,ue,se;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,ue=console.groupCollapsed,se=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:w({},e,{value:j}),info:w({},e,{value:K}),warn:w({},e,{value:ie}),error:w({},e,{value:ee}),group:w({},e,{value:re}),groupCollapsed:w({},e,{value:ue}),groupEnd:w({},e,{value:se})})}m<0&&i("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var L=_.ReactCurrentDispatcher,V;function X(e,r,t){{if(V===void 0)try{throw Error()}catch(u){var n=u.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 we(e,r){if(!e||te)return"";{var t=q.get(e);if(t!==void 0)return t}var n;te=!0;var u=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(y){n=y}Reflect.construct(e,[],o)}else{try{o.call()}catch(y){n=y}e.call(o.prototype)}}else{try{throw Error()}catch(y){n=y}e()}}catch(y){if(y&&n&&typeof y.stack=="string"){for(var a=y.stack.split(`
|
|
3
3
|
`),g=n.stack.split(`
|
|
4
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=
|
|
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=u}var H=e?e.displayName||e.name:"",U=H?X(H):"";return typeof e=="function"&&q.set(e,U),U}function qe(e,r,t){return we(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 we(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,u=n._payload,c=n._init;try{return fe(c(u),r,t)}catch{}}}return""}var ne=Object.prototype.hasOwnProperty,Pe={},je=_.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,u){{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(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),de(null)),a instanceof Error&&!(a.message in Pe)&&(Pe[a.message]=!0,de(u),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=_.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 ur=function(e,r,t,n,u,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:u}),Object.freeze&&(Object.freeze(a.props),Object.freeze(a)),a};function sr(e,r,t,n,u){{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,u));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 ur(e,a,g,u,n,Ae.current,o)}}var _e=_.ReactCurrentOwner,$e=_.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
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 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
|
|
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 u=p(e);if(typeof u=="function"&&u!==e.entries)for(var c=u.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 u=C(r);i("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",u||"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 Ue(e,r,t,n,u,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=sr(e,r,t,u,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 U=C(e),y=Object.keys(r).filter(function(br){return br!=="key"}),xe=y.length>0?"{key: someKey, "+y.join(": ..., ")+": ...}":"{key: someKey}";if(!Ve[U+xe]){var yr=y.length>0?"{"+y.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} />`,xe,
|
|
14
|
+
<%s key={someKey} {...props} />`,xe,U,yr,U),Ve[U+xe]=!0}}return e===k?dr(d):fr(d),d}}function vr(e,r,t){return Ue(e,r,t,!0)}function pr(e,r,t){return Ue(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=Ne():ae.exports=Ge()),ae.exports}var ve=Je();const Ce=50,Be=5,Ke=["#3a86ff","#8338ec","#ff006e","#fb5607","#ffbe0b"],Xe=({commits:M,rowHeight:$,colorPalette:N,laneWidth:k,renderNode:I,renderEdge:W})=>{const b=k||Ce,E=$||Ce,l=P.useMemo(()=>(N||Ke).map((s,v)=>({color:s,branch:null,lane:v+1})),[N,M]);function D(){var s=l.findIndex(p=>!p.branch);if(s>-1)return l[s];var v={color:"#"+Math.floor(Math.random()*16777215).toString(16),branch:null,lane:l.length+1};return l.push(v),v}const[h,x]=P.useState(0),S=P.useMemo(()=>{var s=[];const v=new Map;return M.forEach((p,_)=>{var i={...p,color:"",lane:0,cx:0,cy:0,prev:[]},R=l.find(O=>O.branch==p.id);R||(R=D());var A=l.find(O=>O.branch==p.parents[0]);if(A?R.branch=null:R.branch=p.parents[0],console.log(l),console.log(i),p.id=="c45")debugger;i.color=R.color,i.lane=R.lane,i.cx=i.lane*b-b/2,i.cy=E*_+b/2;var Y=l.reduce((O,J)=>J.branch!==null?O+1:O,0);Y>h&&x(Y),s.push(i),v.set(i.id,i)}),s.forEach(p=>{p.parents.forEach(_=>{const i=v.get(_);i&&i.prev.push(p)})}),s},[M,E,b]);function G(s,v){const p=s.cx,_=s.cy,i=v.cx,R=v.cy,A=b+b*.01,Y=E+E*.01,O=i-p,J=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,w=A*1;let m=p,j=_,K=`M ${m} ${j} `;for(let le=0;le<oe;le++){const L=m+pe*A,V=j+C,X=m,te=j+B*w,q=L,be=V-B*w;K+=`C ${X} ${te}, ${q} ${be}, ${L} ${V} `,m=L,j=V}const ie=R-j,ee=Math.sign(ie),re=A*1,ue=m,se=j+ee*re,ce=i,ye=R-ee*re;return K+=`C ${ue} ${se}, ${ce} ${ye}, ${i} ${R}`,K}return ve.jsxs("svg",{width:h*b+100,height:E*S.length,children:[S.flatMap(s=>s.prev.map(v=>{const p=G(s,v);return W?W(s,v,p):ve.jsx("path",{d:p,fill:"none",stroke:s.lane<=v.lane?v.color:s.color,strokeWidth:2},`${s.id}-${v.id}`)})),S.map(s=>I?I(s):ve.jsx("circle",{cx:s.cx,cy:s.cy,r:Be,fill:s.color},s.id))]})};F.GitGraphSVG=Xe,Object.defineProperty(F,Symbol.toStringTag,{value:"Module"})}));
|