commit-graph
Advanced tools
Comparing version
@@ -1,2 +0,2 @@ | ||
"use strict";var e=require("react"),t=function(){return t=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},t.apply(this,arguments)};function n(e,t){var n=e.sort((function(e,t){return t.committerDate.getTime()-e.committerDate.getTime()})),r=[],a=new Map;function o(e){var n=e.hash;a.get(n)||(a.set(n,!0),e.children.forEach((function(e){o(t.get(e))})),r.push(n))}return n.forEach((function(e){o(e)})),r}function r(e){var r=new Map(e.map((function(e){return[e.hash,e]}))),a=n(e,r),o=function(e,n){var r=[],a=new Map,o=new Map(e.map((function(e,t){return[e,t]})));function c(e,n,a){r[e][r[e].length-1]=t(t({},r[e][r[e].length-1]),{end:n,endCommitHash:a})}var i=0;return e.forEach((function(e,t){var l=n.get(e),m=l.children.filter((function(e){return n.get(e).parents[0]===l.hash})),s=0===l.children.length,u=m.length>0,h=-1;if(s)r.push([{start:t,end:1/0,endCommitHash:l.hash,branchOrder:i}]),i++,h=r.length-1;else if(u){var d=m.map((function(e){return a.get(e)}));c(h=Math.min.apply(Math,d),1/0,l.hash),d.filter((function(e){return e!==h})).forEach((function(e){c(e,t-1,l.hash)}))}else{var f=1/0,p=-1;l.children.forEach((function(e){var t=o.get(e),n=a.get(e);t<f&&(f=t),n>p&&(p=n)}));var g=r.slice(p+1).findIndex((function(e){return f>=e[e.length-1].end})),x=-1===g?-1:p+1+g;-1===x?(r.push([{start:f+1,end:1/0,endCommitHash:l.hash,branchOrder:i}]),i++,h=r.length-1):(h=x,r[x].push({start:f+1,end:1/0,endCommitHash:l.hash,branchOrder:i}),i++)}a.set(e,h)})),{columns:r,commitYs:a}}(a,r),c=o.columns,i=o.commitYs,l=new Map(a.map((function(e,n){return[e,t(t({},r.get(e)),{x:n,y:i.get(e)})]})));return{columns:c.map((function(e){return e.map((function(e){return t(t({},e),{endCommit:l.get(e.endCommitHash)})}))})),commitsMap:l}}var a={commitSpacing:90,branchSpacing:20,nodeRadius:2,branchColors:["#010A40","#FC42C9","#3D91F0","#29E3C1","#C5A15A","#FA7978","#5D6280","#5AC58D","#5C5AC5","#EB7340"]};function o(e){if(!e)return"";var t=parseInt(e.substring(1,3),16)/255,n=parseInt(e.substring(3,5),16)/255,r=parseInt(e.substring(5,7),16)/255;return"0 0 0 0 ".concat(t," 0 0 0 0 ").concat(n," 0 0 0 0 ").concat(r," 0 0 0 0.5 0")}function c(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css","top"===n&&r.firstChild?r.insertBefore(a,r.firstChild):r.appendChild(a),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e))}}var i={container:"index-module_container__wEBx3",bold:"index-module_bold__b82z-",msg:"index-module_msg__FIAXR"};function l(e,t){var n=.3*(t[0]-e[0]),r=.4*(e[1]-t[1]),a=t[0]-.1*n,o=t[1]+r,c=e[0]+3*n,i=e[1]-r;return"M ".concat(e[0]," ").concat(e[1]," C ").concat(c," ").concat(i,", ").concat(a," ").concat(o,", ").concat(t[0]," ").concat(t[1])}function m(e,t,n,r,a){return[e*a+4*n,t*r+2*n]}function s(t){var n,r,a=t.commit,o=new Date(a.committerDate).toLocaleDateString(),c=a.hash.slice(0,7),l=a.committer,m=a.message,s="".concat(c," - ").concat(l," - ").concat(o);return e.createElement("div",{className:i.container},e.createElement("div",{style:{color:a.commitColor}},a.commitLink?e.createElement("a",{href:a.commitLink,className:i.bold},s):e.createElement("span",{className:i.bold},s)),e.createElement("div",{className:i.msg},(r=200,(n=m).length>r?n.substring(0,r)+"...":n)))}c('.index-module_container__wEBx3 {\n font-family: "Source Sans Pro";\n font-size: small;\n width: calc(50vw);\n max-width: 500px;\n}\n\n.index-module_bold__b82z- {\n font-weight: 600;\n}\n\n.index-module_msg__FIAXR {\n margin-top: 6px;\n color: #5d6280;\n}\n');var u="index-module_container__mhEMW",h="index-module_svg__SVy0g",d="index-module_commitInfoContainer__3w-Au",f="index-module_details__x2MF2";function p(e,t,n,r){return{x:e*r.y+4*n,y:t*r.x+4*n}}function g(t){var n=t.commit,r=t.commitSpacing,a=t.branchSpacing,c=t.nodeRadius,i=p(a,r,c,n),l=i.x,m=i.y,s="filter_".concat(n.hash,"_node");return e.createElement(e.Fragment,null,e.createElement("g",{filter:"url(#".concat(s,")"),fill:n.commitColor},e.createElement("circle",{cx:l,cy:m,r:2*c+1.5,fill:n.commitColor}),e.createElement("circle",{cx:l,cy:m,r:2*c+.25,stroke:"white",strokeWidth:"2"})),e.createElement("defs",null,e.createElement("filter",{id:s,x:l-4*c,y:m-4*c,width:8*c,height:8*c,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},e.createElement("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),e.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),e.createElement("feOffset",null),e.createElement("feGaussianBlur",{stdDeviation:"1"}),e.createElement("feComposite",{in2:"hardAlpha",operator:"out"}),e.createElement("feColorMatrix",{type:"matrix",values:o(n.commitColor)}),e.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_46_47"}),e.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_46_47",result:"shape"}))))}function x(t){var n=t.start,r=t.end,a=t.commitSpacing,c=t.branchSpacing,i=t.branchColor,l=t.branchOrder,m=t.nodeRadius,s=Math.abs(r-n)*(a+4*m),u=4*m+l*c-1,h=o(i);return e.createElement(e.Fragment,null,e.createElement("g",{filter:"url(#filter".concat(l,"-").concat(n,"-").concat(r,")")},e.createElement("line",{x1:u,y1:n*a+2*m,x2:u,y2:r*a+5*m,stroke:i,strokeWidth:"4"})),e.createElement("defs",null,e.createElement("filter",{id:"filter".concat(l,"-").concat(n,"-").concat(r),x:u,y:n*a,width:12,height:s,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},e.createElement("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),e.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),e.createElement("feOffset",null),e.createElement("feGaussianBlur",{stdDeviation:"2.5"}),e.createElement("feComposite",{in2:"hardAlpha",operator:"out"}),e.createElement("feColorMatrix",{type:"matrix",values:h}),e.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_2_590"}),e.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_2_590",result:"shape"}))))}function E(t){var n=t.columns,r=t.commitsMap,a=t.commitSpacing,o=t.branchSpacing,c=t.nodeRadius;return e.createElement(e.Fragment,null,n.map((function(t,n){return t.map((function(t){var i=t.end===1/0?r.get(t.endCommit.hash).x:t.end;return e.createElement(x,{key:"branch-path-".concat(n,"-").concat(t.start,"-").concat(t.end),start:t.start,end:i,commitSpacing:a,branchSpacing:o,branchColor:t.color,branchOrder:n,nodeRadius:c})}))})))}function v(n){n.commit;var r=n.curve;return e.createElement(e.Fragment,null,e.createElement("g",{filter:"url(#".concat(r.id,")")},e.createElement("path",{d:r.path,stroke:r.pathColor,strokeWidth:"2",fill:"none"})),e.createElement("defs",null,e.createElement("filter",t({},r,{filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"}),e.createElement("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),e.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),e.createElement("feOffset",null),e.createElement("feGaussianBlur",{stdDeviation:"2.5"}),e.createElement("feComposite",{in2:"hardAlpha",operator:"out"}),e.createElement("feColorMatrix",{type:"matrix",values:o(r.pathColor)}),e.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_103_601"}),e.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_103_601",result:"shape"}))))}function _(t){var n=t.commits,r=t.commitsMap,a=t.commitSpacing,o=t.branchSpacing,c=t.nodeRadius;return e.createElement(e.Fragment,null,n.map((function(t){var n=function(e,t,n,r,a){if(e.parents.length<2)return null;for(var o=[],c=1;c<e.parents.length;c++){var i=t.get(e.parents[c]);if(i){var s=m(n,r,a,e.x,e.y),u=e.x+1>i.x?i.x:e.x+1,h=Math.abs(i.x-e.x)*(r+4*a),d=Math.abs(i.y-e.y+1)*(n+4*a),f=m(n,r,a,u,i.y);o.push({path:l(s,f),pathColor:i.commitColor,id:"filter_".concat(e.hash.slice(0,7),"_curved_path_").concat(i.hash.slice(0,7)),x:e.y,y:e.x*r,width:d,height:h})}}return o}(t,r,o,a,c),i=function(e,t,n,r,a){if(e.children.length<2)return null;var o=[];return e.children.forEach((function(c){var i=t.get(c);if(i.parents[0]===e.hash&&i.y!==e.y){var s=m(n,r,a,e.x,e.y),u=e.x-1>i.x?e.x-1:i.x,h=m(n,r,a,u,i.y),d=Math.abs(i.x-e.x)*(r+4*a),f=Math.abs(i.y-e.y+1)*(n+4*a);o.push({path:l(s,[h[0],h[1]+3*a]),pathColor:i.commitColor,id:"filter_".concat(e.hash.slice(0,7),"_curved_path_").concat(i.hash.slice(0,7)),x:i.y,y:i.x*r,width:f,height:d})}})),o}(t,r,o,a,c);return e.createElement(e.Fragment,null,i&&i.map((function(n){return e.createElement(v,{key:"".concat(t.hash,"-curved-up-path-").concat(n[0]),commit:t,curve:n})})),n&&n.map((function(n){return e.createElement(v,{key:"".concat(t.hash,"-curved-down-path-").concat(n[0],"}"),commit:t,curve:n})})))})))}c(".index-module_container__mhEMW {\n position: relative;\n display: flex;\n flex-direction: column;\n}\n\n.index-module_svg__SVy0g {\n width: calc(18vw);\n overflow-x: scroll;\n /* Hide scrollbar for IE, Edge, and Firefox */\n -ms-overflow-style: none;\n scrollbar-width: none;\n /* Hide scrollbar for Chrome, Safari and Opera */\n &::-webkit-scrollbar {\n @apply hidden;\n }\n}\n\n.index-module_commitInfoContainer__3w-Au {\n position: absolute;\n left: calc(18vw + 1rem);\n}\n\n.index-module_details__x2MF2 {\n position: absolute;\n display: flex;\n align-items: baseline;\n}\n");var y={outer:"index-module_outer__52HDL"};function b(t){var n=t.branchName,r=t.branchColor;return e.createElement("div",{style:{color:r,borderColor:r},className:y.outer},n)}c(".index-module_outer__52HDL {\n font-size: small;\n border: 1px solid;\n width: fit-content;\n padding-left: 0.75rem;\n padding-right: 0.75rem;\n height: 1.5rem;\n line-height: 1.5rem;\n border-radius: 50px;\n margin-left: 2rem;\n font-weight: 600;\n}\n"),exports.CommitGraph=function(n){var o=n.commits,c=n.style,i=n.branchHeads,l=function(e){var t=new Map;return e.forEach((function(e){e.parents.forEach((function(n){t[n]?t[n].push(e.hash):t[n]=[e.hash]}))})),e.map((function(e){var n;return{hash:e.hash,parents:e.parents,children:null!==(n=t[e.hash])&&void 0!==n?n:[],committer:e.committer.displayName,message:e.message,committerDate:new Date(e.committedAt),commitLink:e.commitLink,x:-1,y:-1}}))}(o),m=t(t({},a),c),x=m.commitSpacing,v=m.branchSpacing,y=m.branchColors,C=m.nodeRadius,S=r(l),w=S.columns,M=S.commitsMap,F=w.length*(v+2*C)+3,B=Math.max.apply(Math,w.map((function(e){return e[e.length-1].end===1/0?e[e.length-1].endCommit.x:e[e.length-1].end})))*(x+2*C)+4*C+3;!function(e,t,n){e.map((function(e,r){e.map((function(e){var a=t[e.branchOrder%t.length];e.color=a,function(e,t,n,r){n.forEach((function(n){n.y===t&&e.start<=n.x&&e.end>=n.x&&(n.commitColor=r)}))}(e,r,n,a)}))}))}(w,y,M);var A=Array.from(M.values());return e.createElement("div",{className:u},e.createElement("div",{className:h},e.createElement("svg",{width:F,height:B},e.createElement(E,{columns:w,commitsMap:M,commitSpacing:x,branchSpacing:v,nodeRadius:C}),e.createElement(_,{commitsMap:M,commits:A,commitSpacing:x,branchSpacing:v,nodeRadius:C}),A.map((function(t){return e.createElement(g,{key:"".concat(t.hash,"-dot"),commit:t,commitSpacing:x,branchSpacing:v,nodeRadius:C})})))),e.createElement("div",{className:d},A.map((function(t){var n=p(v,x,C,t).y,r=i.filter((function(e){return e.headCommitHash===t.hash}));return e.createElement("div",{style:{top:n-2*C},className:f},e.createElement(s,{commit:t}),!!r.length&&e.createElement(b,{branchName:r[0].branchName,branchColor:t.commitColor}))}))))}; | ||
"use strict";var e=require("react"),t=function(){return t=Object.assign||function(e){for(var t,n=1,a=arguments.length;n<a;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},t.apply(this,arguments)};function n(e,t){var n=e.sort((function(e,t){return t.committerDate.getTime()-e.committerDate.getTime()})),a=[],r=new Map;function o(e){var n=e.hash;r.get(n)||(r.set(n,!0),e.children.forEach((function(e){o(t.get(e))})),a.push(n))}return n.forEach((function(e){o(e)})),a}function a(e){var a=new Map(e.map((function(e){return[e.hash,e]}))),r=n(e,a),o=function(e,n){var a=[],r=new Map,o=new Map(e.map((function(e,t){return[e,t]})));function c(e,n,r){a[e][a[e].length-1]=t(t({},a[e][a[e].length-1]),{end:n,endCommitHash:r})}var i=0;return e.forEach((function(e,t){var l=n.get(e),m=l.children.filter((function(e){return n.get(e).parents[0]===l.hash})),s=0===l.children.length,u=m.length>0,h=-1;if(s)a.push([{start:t,end:1/0,endCommitHash:l.hash,branchOrder:i}]),i++,h=a.length-1;else if(u){var d=m.map((function(e){return r.get(e)}));c(h=Math.min.apply(Math,d),1/0,l.hash),d.filter((function(e){return e!==h})).forEach((function(e){c(e,t-1,l.hash)}))}else{var f=1/0,p=-1;l.children.forEach((function(e){var t=o.get(e),n=r.get(e);t<f&&(f=t),n>p&&(p=n)}));var g=a.slice(p+1).findIndex((function(e){return f>=e[e.length-1].end})),x=-1===g?-1:p+1+g;-1===x?(a.push([{start:f+1,end:1/0,endCommitHash:l.hash,branchOrder:i}]),i++,h=a.length-1):(h=x,a[x].push({start:f+1,end:1/0,endCommitHash:l.hash,branchOrder:i}),i++)}r.set(e,h)})),{columns:a,commitYs:r}}(r,a),c=o.columns,i=o.commitYs,l=new Map(r.map((function(e,n){return[e,t(t({},a.get(e)),{x:n,y:i.get(e)})]})));return{columns:c.map((function(e){return e.map((function(e){return t(t({},e),{endCommit:l.get(e.endCommitHash)})}))})),commitsMap:l}}var r={commitSpacing:90,branchSpacing:20,nodeRadius:2,branchColors:["#010A40","#FC42C9","#3D91F0","#29E3C1","#C5A15A","#FA7978","#5D6280","#5AC58D","#5C5AC5","#EB7340"]};function o(e){if(!e)return"";var t=parseInt(e.substring(1,3),16)/255,n=parseInt(e.substring(3,5),16)/255,a=parseInt(e.substring(5,7),16)/255;return"0 0 0 0 ".concat(t," 0 0 0 0 ").concat(n," 0 0 0 0 ").concat(a," 0 0 0 0.5 0")}function c(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var a=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===n&&a.firstChild?a.insertBefore(r,a.firstChild):a.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}var i={container:"index-module_container__wEBx3",bold:"index-module_bold__b82z-",msg:"index-module_msg__FIAXR"};function l(e,t){var n=.3*(t[0]-e[0]),a=.4*(e[1]-t[1]),r=t[0]-.1*n,o=t[1]+a,c=e[0]+3*n,i=e[1]-a;return"M ".concat(e[0]," ").concat(e[1]," C ").concat(c," ").concat(i,", ").concat(r," ").concat(o,", ").concat(t[0]," ").concat(t[1])}function m(e,t,n,a,r){return[e*r+4*n,t*a+2*n]}function s(t){var n,a,r=t.commit,o=new Date(r.committerDate).toLocaleDateString(),c=r.hash.slice(0,7),l=r.committer,m=r.message,s="".concat(c," - ").concat(l," - ").concat(o);return e.createElement("div",{className:i.container},e.createElement("div",{style:{color:r.commitColor}},r.commitLink?e.createElement("a",{href:r.commitLink,className:i.bold},s):e.createElement("span",{className:i.bold},s)),e.createElement("div",{className:i.msg},(a=200,(n=m).length>a?n.substring(0,a)+"...":n)))}c('.index-module_container__wEBx3 {\n font-family: "Source Sans Pro";\n font-size: small;\n max-width: 500px;\n}\n\n.index-module_bold__b82z- {\n font-weight: 600;\n}\n\n.index-module_msg__FIAXR {\n margin-top: 6px;\n color: #5d6280;\n}\n');var u="index-module_container__mhEMW",h="index-module_commitInfoContainer__3w-Au",d="index-module_details__x2MF2";function f(e,t,n,a){return{x:e*a.y+4*n,y:t*a.x+4*n}}function p(t){var n=t.commit,a=t.commitSpacing,r=t.branchSpacing,c=t.nodeRadius,i=f(r,a,c,n),l=i.x,m=i.y,s="filter_".concat(n.hash,"_node");return e.createElement(e.Fragment,null,e.createElement("g",{filter:"url(#".concat(s,")"),fill:n.commitColor},e.createElement("circle",{cx:l,cy:m,r:2*c+1.5,fill:n.commitColor}),e.createElement("circle",{cx:l,cy:m,r:2*c+.25,stroke:"white",strokeWidth:"2"})),e.createElement("defs",null,e.createElement("filter",{id:s,x:l-4*c,y:m-4*c,width:8*c,height:8*c,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},e.createElement("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),e.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),e.createElement("feOffset",null),e.createElement("feGaussianBlur",{stdDeviation:"1"}),e.createElement("feComposite",{in2:"hardAlpha",operator:"out"}),e.createElement("feColorMatrix",{type:"matrix",values:o(n.commitColor)}),e.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_46_47"}),e.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_46_47",result:"shape"}))))}function g(t){var n=t.start,a=t.end,r=t.commitSpacing,c=t.branchSpacing,i=t.branchColor,l=t.branchOrder,m=t.nodeRadius,s=Math.abs(a-n)*(r+4*m),u=4*m+l*c-1,h=o(i);return e.createElement(e.Fragment,null,e.createElement("g",{filter:"url(#filter".concat(l,"-").concat(n,"-").concat(a,")")},e.createElement("line",{x1:u,y1:n*r+2*m,x2:u,y2:a*r+5*m,stroke:i,strokeWidth:"4"})),e.createElement("defs",null,e.createElement("filter",{id:"filter".concat(l,"-").concat(n,"-").concat(a),x:u,y:n*r,width:12,height:s,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},e.createElement("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),e.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),e.createElement("feOffset",null),e.createElement("feGaussianBlur",{stdDeviation:"2.5"}),e.createElement("feComposite",{in2:"hardAlpha",operator:"out"}),e.createElement("feColorMatrix",{type:"matrix",values:h}),e.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_2_590"}),e.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_2_590",result:"shape"}))))}function x(t){var n=t.columns,a=t.commitsMap,r=t.commitSpacing,o=t.branchSpacing,c=t.nodeRadius;return e.createElement(e.Fragment,null,n.map((function(t,n){return t.map((function(t){var i=t.end===1/0?a.get(t.endCommit.hash).x:t.end;return e.createElement(g,{key:"branch-path-".concat(n,"-").concat(t.start,"-").concat(t.end),start:t.start,end:i,commitSpacing:r,branchSpacing:o,branchColor:t.color,branchOrder:n,nodeRadius:c})}))})))}function E(n){var a=n.curve;return e.createElement(e.Fragment,null,e.createElement("g",{filter:"url(#".concat(a.id,")")},e.createElement("path",{d:a.path,stroke:a.pathColor,strokeWidth:"2",fill:"none"})),e.createElement("defs",null,e.createElement("filter",t({},a,{filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"}),e.createElement("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),e.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),e.createElement("feOffset",null),e.createElement("feGaussianBlur",{stdDeviation:"2.5"}),e.createElement("feComposite",{in2:"hardAlpha",operator:"out"}),e.createElement("feColorMatrix",{type:"matrix",values:o(a.pathColor)}),e.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_103_601"}),e.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_103_601",result:"shape"}))))}function v(t){var n=t.commits,a=t.commitsMap,r=t.commitSpacing,o=t.branchSpacing,c=t.nodeRadius;return e.createElement(e.Fragment,null,n.map((function(t){var n=function(e,t,n,a,r){if(e.parents.length<2)return null;for(var o=[],c=1;c<e.parents.length;c++){var i=t.get(e.parents[c]);if(i){var s=m(n,a,r,e.x,e.y),u=e.x+1>i.x?i.x:e.x+1,h=Math.abs(i.x-e.x)*(a+4*r),d=Math.abs(i.y-e.y+1)*(n+4*r)+4,f=m(n,a,r,u,i.y);o.push({path:l(s,f),pathColor:i.commitColor,id:"filter_".concat(e.hash.slice(0,7),"_curved_path_").concat(i.hash.slice(0,7)),x:e.y,y:e.x*a,width:d,height:h})}}return o}(t,a,o,r,c),i=function(e,t,n,a,r){if(e.children.length<2)return null;var o=[];return e.children.forEach((function(c){var i=t.get(c);if(i.parents[0]===e.hash&&i.y!==e.y){var s=m(n,a,r,e.x,e.y),u=e.x-1>i.x?e.x-1:i.x,h=m(n,a,r,u,i.y),d=Math.abs(i.x-e.x)*(a+4*r),f=Math.abs(i.y-e.y+1)*(n+4*r);o.push({path:l(s,[h[0],h[1]+3*r]),pathColor:i.commitColor,id:"filter_".concat(e.hash.slice(0,7),"_curved_path_").concat(i.hash.slice(0,7)),x:i.y,y:i.x*a,width:f,height:d})}})),o}(t,a,o,r,c);return e.createElement(e.Fragment,null,i&&i.map((function(n){return e.createElement(E,{key:"".concat(t.hash,"-curved-up-path-").concat(n[0]),commit:t,curve:n})})),n&&n.map((function(n){return e.createElement(E,{key:"".concat(t.hash,"-curved-down-path-").concat(n[0],"}"),commit:t,curve:n})})))})))}c(".index-module_container__mhEMW {\n position: relative;\n display: flex;\n flex-direction: column;\n}\n\n.index-module_commitInfoContainer__3w-Au {\n position: absolute;\n width: 100%;\n}\n\n.index-module_details__x2MF2 {\n position: absolute;\n display: flex;\n align-items: baseline;\n}\n");var _={outer:"index-module_outer__52HDL"};function y(t){var n=t.branchName,a=t.branchColor;return e.createElement("div",{style:{color:a,borderColor:a},className:_.outer},n)}c(".index-module_outer__52HDL {\n font-size: small;\n border: 1px solid;\n width: fit-content;\n padding-left: 0.75rem;\n padding-right: 0.75rem;\n height: 1.5rem;\n line-height: 1.5rem;\n border-radius: 50px;\n margin-left: 2rem;\n font-weight: 600;\n}\n"),exports.CommitGraph=function(n){var o=n.commits,c=n.style,i=n.branchHeads,l=function(e){var t=new Map;return e.forEach((function(e){e.parents.forEach((function(n){t[n]?t[n].push(e.hash):t[n]=[e.hash]}))})),e.map((function(e){var n;return{hash:e.hash,parents:e.parents,children:null!==(n=t[e.hash])&&void 0!==n?n:[],committer:e.committer.displayName,message:e.message,committerDate:new Date(e.committedAt),commitLink:e.commitLink,x:-1,y:-1}}))}(o),m=t(t({},r),c),g=m.commitSpacing,E=m.branchSpacing,_=m.branchColors,C=m.nodeRadius,b=a(l),S=b.columns,M=b.commitsMap,w=S.length*(E+2*C)+3,F=Math.max.apply(Math,S.map((function(e){return e[e.length-1].end===1/0?e[e.length-1].endCommit.x:e[e.length-1].end})))*(g+2*C)+4*C+3;!function(e,t,n){e.map((function(e,a){e.map((function(e){var r=t[e.branchOrder%t.length];e.color=r,function(e,t,n,a){n.forEach((function(n){n.y===t&&e.start<=n.x&&e.end>=n.x&&(n.commitColor=a)}))}(e,a,n,r)}))}))}(S,_,M);var B=Array.from(M.values());return e.createElement("div",{className:u},e.createElement("div",null,e.createElement("svg",{width:w,height:F},e.createElement(x,{columns:S,commitsMap:M,commitSpacing:g,branchSpacing:E,nodeRadius:C}),e.createElement(v,{commitsMap:M,commits:B,commitSpacing:g,branchSpacing:E,nodeRadius:C}),B.map((function(t){return e.createElement(p,{key:"".concat(t.hash,"-dot"),commit:t,commitSpacing:g,branchSpacing:E,nodeRadius:C})})))),e.createElement("div",{style:{left:w+20},className:h},B.map((function(t){var n=f(E,g,C,t).y,a=i.filter((function(e){return e.headCommitHash===t.hash}));return e.createElement("div",{style:{top:n-2*C},className:d},e.createElement(s,{commit:t}),!!a.length&&e.createElement(y,{branchName:a[0].branchName,branchColor:t.commitColor}))}))))}; | ||
//# sourceMappingURL=index.js.map |
@@ -8,3 +8,3 @@ import React from "react"; | ||
}; | ||
export default function CurvePath({ commit, curve }: Props): React.JSX.Element; | ||
export default function CurvePath({ curve }: Props): React.JSX.Element; | ||
export {}; |
@@ -6,5 +6,5 @@ export type Commit = { | ||
committer: { | ||
username: string; | ||
username?: string | null; | ||
displayName: string; | ||
emailAddress: string; | ||
emailAddress?: string; | ||
}; | ||
@@ -11,0 +11,0 @@ message: string; |
@@ -1,2 +0,2 @@ | ||
import e from"react";var t=function(){return t=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},t.apply(this,arguments)};function n(e,t){var n=e.sort((function(e,t){return t.committerDate.getTime()-e.committerDate.getTime()})),r=[],a=new Map;function o(e){var n=e.hash;a.get(n)||(a.set(n,!0),e.children.forEach((function(e){o(t.get(e))})),r.push(n))}return n.forEach((function(e){o(e)})),r}function r(e){var r=new Map(e.map((function(e){return[e.hash,e]}))),a=n(e,r),o=function(e,n){var r=[],a=new Map,o=new Map(e.map((function(e,t){return[e,t]})));function c(e,n,a){r[e][r[e].length-1]=t(t({},r[e][r[e].length-1]),{end:n,endCommitHash:a})}var i=0;return e.forEach((function(e,t){var l=n.get(e),m=l.children.filter((function(e){return n.get(e).parents[0]===l.hash})),s=0===l.children.length,u=m.length>0,h=-1;if(s)r.push([{start:t,end:1/0,endCommitHash:l.hash,branchOrder:i}]),i++,h=r.length-1;else if(u){var d=m.map((function(e){return a.get(e)}));c(h=Math.min.apply(Math,d),1/0,l.hash),d.filter((function(e){return e!==h})).forEach((function(e){c(e,t-1,l.hash)}))}else{var f=1/0,p=-1;l.children.forEach((function(e){var t=o.get(e),n=a.get(e);t<f&&(f=t),n>p&&(p=n)}));var g=r.slice(p+1).findIndex((function(e){return f>=e[e.length-1].end})),x=-1===g?-1:p+1+g;-1===x?(r.push([{start:f+1,end:1/0,endCommitHash:l.hash,branchOrder:i}]),i++,h=r.length-1):(h=x,r[x].push({start:f+1,end:1/0,endCommitHash:l.hash,branchOrder:i}),i++)}a.set(e,h)})),{columns:r,commitYs:a}}(a,r),c=o.columns,i=o.commitYs,l=new Map(a.map((function(e,n){return[e,t(t({},r.get(e)),{x:n,y:i.get(e)})]})));return{columns:c.map((function(e){return e.map((function(e){return t(t({},e),{endCommit:l.get(e.endCommitHash)})}))})),commitsMap:l}}var a={commitSpacing:90,branchSpacing:20,nodeRadius:2,branchColors:["#010A40","#FC42C9","#3D91F0","#29E3C1","#C5A15A","#FA7978","#5D6280","#5AC58D","#5C5AC5","#EB7340"]};function o(e){if(!e)return"";var t=parseInt(e.substring(1,3),16)/255,n=parseInt(e.substring(3,5),16)/255,r=parseInt(e.substring(5,7),16)/255;return"0 0 0 0 ".concat(t," 0 0 0 0 ").concat(n," 0 0 0 0 ").concat(r," 0 0 0 0.5 0")}function c(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css","top"===n&&r.firstChild?r.insertBefore(a,r.firstChild):r.appendChild(a),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e))}}var i={container:"index-module_container__wEBx3",bold:"index-module_bold__b82z-",msg:"index-module_msg__FIAXR"};function l(e,t){var n=.3*(t[0]-e[0]),r=.4*(e[1]-t[1]),a=t[0]-.1*n,o=t[1]+r,c=e[0]+3*n,i=e[1]-r;return"M ".concat(e[0]," ").concat(e[1]," C ").concat(c," ").concat(i,", ").concat(a," ").concat(o,", ").concat(t[0]," ").concat(t[1])}function m(e,t,n,r,a){return[e*a+4*n,t*r+2*n]}function s(t){var n,r,a=t.commit,o=new Date(a.committerDate).toLocaleDateString(),c=a.hash.slice(0,7),l=a.committer,m=a.message,s="".concat(c," - ").concat(l," - ").concat(o);return e.createElement("div",{className:i.container},e.createElement("div",{style:{color:a.commitColor}},a.commitLink?e.createElement("a",{href:a.commitLink,className:i.bold},s):e.createElement("span",{className:i.bold},s)),e.createElement("div",{className:i.msg},(r=200,(n=m).length>r?n.substring(0,r)+"...":n)))}c('.index-module_container__wEBx3 {\n font-family: "Source Sans Pro";\n font-size: small;\n width: calc(50vw);\n max-width: 500px;\n}\n\n.index-module_bold__b82z- {\n font-weight: 600;\n}\n\n.index-module_msg__FIAXR {\n margin-top: 6px;\n color: #5d6280;\n}\n');var u="index-module_container__mhEMW",h="index-module_svg__SVy0g",d="index-module_commitInfoContainer__3w-Au",f="index-module_details__x2MF2";function p(e,t,n,r){return{x:e*r.y+4*n,y:t*r.x+4*n}}function g(t){var n=t.commit,r=t.commitSpacing,a=t.branchSpacing,c=t.nodeRadius,i=p(a,r,c,n),l=i.x,m=i.y,s="filter_".concat(n.hash,"_node");return e.createElement(e.Fragment,null,e.createElement("g",{filter:"url(#".concat(s,")"),fill:n.commitColor},e.createElement("circle",{cx:l,cy:m,r:2*c+1.5,fill:n.commitColor}),e.createElement("circle",{cx:l,cy:m,r:2*c+.25,stroke:"white",strokeWidth:"2"})),e.createElement("defs",null,e.createElement("filter",{id:s,x:l-4*c,y:m-4*c,width:8*c,height:8*c,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},e.createElement("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),e.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),e.createElement("feOffset",null),e.createElement("feGaussianBlur",{stdDeviation:"1"}),e.createElement("feComposite",{in2:"hardAlpha",operator:"out"}),e.createElement("feColorMatrix",{type:"matrix",values:o(n.commitColor)}),e.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_46_47"}),e.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_46_47",result:"shape"}))))}function x(t){var n=t.start,r=t.end,a=t.commitSpacing,c=t.branchSpacing,i=t.branchColor,l=t.branchOrder,m=t.nodeRadius,s=Math.abs(r-n)*(a+4*m),u=4*m+l*c-1,h=o(i);return e.createElement(e.Fragment,null,e.createElement("g",{filter:"url(#filter".concat(l,"-").concat(n,"-").concat(r,")")},e.createElement("line",{x1:u,y1:n*a+2*m,x2:u,y2:r*a+5*m,stroke:i,strokeWidth:"4"})),e.createElement("defs",null,e.createElement("filter",{id:"filter".concat(l,"-").concat(n,"-").concat(r),x:u,y:n*a,width:12,height:s,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},e.createElement("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),e.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),e.createElement("feOffset",null),e.createElement("feGaussianBlur",{stdDeviation:"2.5"}),e.createElement("feComposite",{in2:"hardAlpha",operator:"out"}),e.createElement("feColorMatrix",{type:"matrix",values:h}),e.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_2_590"}),e.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_2_590",result:"shape"}))))}function E(t){var n=t.columns,r=t.commitsMap,a=t.commitSpacing,o=t.branchSpacing,c=t.nodeRadius;return e.createElement(e.Fragment,null,n.map((function(t,n){return t.map((function(t){var i=t.end===1/0?r.get(t.endCommit.hash).x:t.end;return e.createElement(x,{key:"branch-path-".concat(n,"-").concat(t.start,"-").concat(t.end),start:t.start,end:i,commitSpacing:a,branchSpacing:o,branchColor:t.color,branchOrder:n,nodeRadius:c})}))})))}function v(n){n.commit;var r=n.curve;return e.createElement(e.Fragment,null,e.createElement("g",{filter:"url(#".concat(r.id,")")},e.createElement("path",{d:r.path,stroke:r.pathColor,strokeWidth:"2",fill:"none"})),e.createElement("defs",null,e.createElement("filter",t({},r,{filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"}),e.createElement("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),e.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),e.createElement("feOffset",null),e.createElement("feGaussianBlur",{stdDeviation:"2.5"}),e.createElement("feComposite",{in2:"hardAlpha",operator:"out"}),e.createElement("feColorMatrix",{type:"matrix",values:o(r.pathColor)}),e.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_103_601"}),e.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_103_601",result:"shape"}))))}function _(t){var n=t.commits,r=t.commitsMap,a=t.commitSpacing,o=t.branchSpacing,c=t.nodeRadius;return e.createElement(e.Fragment,null,n.map((function(t){var n=function(e,t,n,r,a){if(e.parents.length<2)return null;for(var o=[],c=1;c<e.parents.length;c++){var i=t.get(e.parents[c]);if(i){var s=m(n,r,a,e.x,e.y),u=e.x+1>i.x?i.x:e.x+1,h=Math.abs(i.x-e.x)*(r+4*a),d=Math.abs(i.y-e.y+1)*(n+4*a),f=m(n,r,a,u,i.y);o.push({path:l(s,f),pathColor:i.commitColor,id:"filter_".concat(e.hash.slice(0,7),"_curved_path_").concat(i.hash.slice(0,7)),x:e.y,y:e.x*r,width:d,height:h})}}return o}(t,r,o,a,c),i=function(e,t,n,r,a){if(e.children.length<2)return null;var o=[];return e.children.forEach((function(c){var i=t.get(c);if(i.parents[0]===e.hash&&i.y!==e.y){var s=m(n,r,a,e.x,e.y),u=e.x-1>i.x?e.x-1:i.x,h=m(n,r,a,u,i.y),d=Math.abs(i.x-e.x)*(r+4*a),f=Math.abs(i.y-e.y+1)*(n+4*a);o.push({path:l(s,[h[0],h[1]+3*a]),pathColor:i.commitColor,id:"filter_".concat(e.hash.slice(0,7),"_curved_path_").concat(i.hash.slice(0,7)),x:i.y,y:i.x*r,width:f,height:d})}})),o}(t,r,o,a,c);return e.createElement(e.Fragment,null,i&&i.map((function(n){return e.createElement(v,{key:"".concat(t.hash,"-curved-up-path-").concat(n[0]),commit:t,curve:n})})),n&&n.map((function(n){return e.createElement(v,{key:"".concat(t.hash,"-curved-down-path-").concat(n[0],"}"),commit:t,curve:n})})))})))}c(".index-module_container__mhEMW {\n position: relative;\n display: flex;\n flex-direction: column;\n}\n\n.index-module_svg__SVy0g {\n width: calc(18vw);\n overflow-x: scroll;\n /* Hide scrollbar for IE, Edge, and Firefox */\n -ms-overflow-style: none;\n scrollbar-width: none;\n /* Hide scrollbar for Chrome, Safari and Opera */\n &::-webkit-scrollbar {\n @apply hidden;\n }\n}\n\n.index-module_commitInfoContainer__3w-Au {\n position: absolute;\n left: calc(18vw + 1rem);\n}\n\n.index-module_details__x2MF2 {\n position: absolute;\n display: flex;\n align-items: baseline;\n}\n");var y={outer:"index-module_outer__52HDL"};function b(t){var n=t.branchName,r=t.branchColor;return e.createElement("div",{style:{color:r,borderColor:r},className:y.outer},n)}function C(n){var o=n.commits,c=n.style,i=n.branchHeads,l=function(e){var t=new Map;return e.forEach((function(e){e.parents.forEach((function(n){t[n]?t[n].push(e.hash):t[n]=[e.hash]}))})),e.map((function(e){var n;return{hash:e.hash,parents:e.parents,children:null!==(n=t[e.hash])&&void 0!==n?n:[],committer:e.committer.displayName,message:e.message,committerDate:new Date(e.committedAt),commitLink:e.commitLink,x:-1,y:-1}}))}(o),m=t(t({},a),c),x=m.commitSpacing,v=m.branchSpacing,y=m.branchColors,C=m.nodeRadius,S=r(l),w=S.columns,M=S.commitsMap,F=w.length*(v+2*C)+3,B=Math.max.apply(Math,w.map((function(e){return e[e.length-1].end===1/0?e[e.length-1].endCommit.x:e[e.length-1].end})))*(x+2*C)+4*C+3;!function(e,t,n){e.map((function(e,r){e.map((function(e){var a=t[e.branchOrder%t.length];e.color=a,function(e,t,n,r){n.forEach((function(n){n.y===t&&e.start<=n.x&&e.end>=n.x&&(n.commitColor=r)}))}(e,r,n,a)}))}))}(w,y,M);var A=Array.from(M.values());return e.createElement("div",{className:u},e.createElement("div",{className:h},e.createElement("svg",{width:F,height:B},e.createElement(E,{columns:w,commitsMap:M,commitSpacing:x,branchSpacing:v,nodeRadius:C}),e.createElement(_,{commitsMap:M,commits:A,commitSpacing:x,branchSpacing:v,nodeRadius:C}),A.map((function(t){return e.createElement(g,{key:"".concat(t.hash,"-dot"),commit:t,commitSpacing:x,branchSpacing:v,nodeRadius:C})})))),e.createElement("div",{className:d},A.map((function(t){var n=p(v,x,C,t).y,r=i.filter((function(e){return e.headCommitHash===t.hash}));return e.createElement("div",{style:{top:n-2*C},className:f},e.createElement(s,{commit:t}),!!r.length&&e.createElement(b,{branchName:r[0].branchName,branchColor:t.commitColor}))}))))}c(".index-module_outer__52HDL {\n font-size: small;\n border: 1px solid;\n width: fit-content;\n padding-left: 0.75rem;\n padding-right: 0.75rem;\n height: 1.5rem;\n line-height: 1.5rem;\n border-radius: 50px;\n margin-left: 2rem;\n font-weight: 600;\n}\n");export{C as CommitGraph}; | ||
import e from"react";var t=function(){return t=Object.assign||function(e){for(var t,n=1,a=arguments.length;n<a;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},t.apply(this,arguments)};function n(e,t){var n=e.sort((function(e,t){return t.committerDate.getTime()-e.committerDate.getTime()})),a=[],r=new Map;function o(e){var n=e.hash;r.get(n)||(r.set(n,!0),e.children.forEach((function(e){o(t.get(e))})),a.push(n))}return n.forEach((function(e){o(e)})),a}function a(e){var a=new Map(e.map((function(e){return[e.hash,e]}))),r=n(e,a),o=function(e,n){var a=[],r=new Map,o=new Map(e.map((function(e,t){return[e,t]})));function c(e,n,r){a[e][a[e].length-1]=t(t({},a[e][a[e].length-1]),{end:n,endCommitHash:r})}var i=0;return e.forEach((function(e,t){var l=n.get(e),m=l.children.filter((function(e){return n.get(e).parents[0]===l.hash})),s=0===l.children.length,u=m.length>0,h=-1;if(s)a.push([{start:t,end:1/0,endCommitHash:l.hash,branchOrder:i}]),i++,h=a.length-1;else if(u){var d=m.map((function(e){return r.get(e)}));c(h=Math.min.apply(Math,d),1/0,l.hash),d.filter((function(e){return e!==h})).forEach((function(e){c(e,t-1,l.hash)}))}else{var f=1/0,p=-1;l.children.forEach((function(e){var t=o.get(e),n=r.get(e);t<f&&(f=t),n>p&&(p=n)}));var g=a.slice(p+1).findIndex((function(e){return f>=e[e.length-1].end})),x=-1===g?-1:p+1+g;-1===x?(a.push([{start:f+1,end:1/0,endCommitHash:l.hash,branchOrder:i}]),i++,h=a.length-1):(h=x,a[x].push({start:f+1,end:1/0,endCommitHash:l.hash,branchOrder:i}),i++)}r.set(e,h)})),{columns:a,commitYs:r}}(r,a),c=o.columns,i=o.commitYs,l=new Map(r.map((function(e,n){return[e,t(t({},a.get(e)),{x:n,y:i.get(e)})]})));return{columns:c.map((function(e){return e.map((function(e){return t(t({},e),{endCommit:l.get(e.endCommitHash)})}))})),commitsMap:l}}var r={commitSpacing:90,branchSpacing:20,nodeRadius:2,branchColors:["#010A40","#FC42C9","#3D91F0","#29E3C1","#C5A15A","#FA7978","#5D6280","#5AC58D","#5C5AC5","#EB7340"]};function o(e){if(!e)return"";var t=parseInt(e.substring(1,3),16)/255,n=parseInt(e.substring(3,5),16)/255,a=parseInt(e.substring(5,7),16)/255;return"0 0 0 0 ".concat(t," 0 0 0 0 ").concat(n," 0 0 0 0 ").concat(a," 0 0 0 0.5 0")}function c(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var a=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===n&&a.firstChild?a.insertBefore(r,a.firstChild):a.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}var i={container:"index-module_container__wEBx3",bold:"index-module_bold__b82z-",msg:"index-module_msg__FIAXR"};function l(e,t){var n=.3*(t[0]-e[0]),a=.4*(e[1]-t[1]),r=t[0]-.1*n,o=t[1]+a,c=e[0]+3*n,i=e[1]-a;return"M ".concat(e[0]," ").concat(e[1]," C ").concat(c," ").concat(i,", ").concat(r," ").concat(o,", ").concat(t[0]," ").concat(t[1])}function m(e,t,n,a,r){return[e*r+4*n,t*a+2*n]}function s(t){var n,a,r=t.commit,o=new Date(r.committerDate).toLocaleDateString(),c=r.hash.slice(0,7),l=r.committer,m=r.message,s="".concat(c," - ").concat(l," - ").concat(o);return e.createElement("div",{className:i.container},e.createElement("div",{style:{color:r.commitColor}},r.commitLink?e.createElement("a",{href:r.commitLink,className:i.bold},s):e.createElement("span",{className:i.bold},s)),e.createElement("div",{className:i.msg},(a=200,(n=m).length>a?n.substring(0,a)+"...":n)))}c('.index-module_container__wEBx3 {\n font-family: "Source Sans Pro";\n font-size: small;\n max-width: 500px;\n}\n\n.index-module_bold__b82z- {\n font-weight: 600;\n}\n\n.index-module_msg__FIAXR {\n margin-top: 6px;\n color: #5d6280;\n}\n');var u="index-module_container__mhEMW",h="index-module_commitInfoContainer__3w-Au",d="index-module_details__x2MF2";function f(e,t,n,a){return{x:e*a.y+4*n,y:t*a.x+4*n}}function p(t){var n=t.commit,a=t.commitSpacing,r=t.branchSpacing,c=t.nodeRadius,i=f(r,a,c,n),l=i.x,m=i.y,s="filter_".concat(n.hash,"_node");return e.createElement(e.Fragment,null,e.createElement("g",{filter:"url(#".concat(s,")"),fill:n.commitColor},e.createElement("circle",{cx:l,cy:m,r:2*c+1.5,fill:n.commitColor}),e.createElement("circle",{cx:l,cy:m,r:2*c+.25,stroke:"white",strokeWidth:"2"})),e.createElement("defs",null,e.createElement("filter",{id:s,x:l-4*c,y:m-4*c,width:8*c,height:8*c,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},e.createElement("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),e.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),e.createElement("feOffset",null),e.createElement("feGaussianBlur",{stdDeviation:"1"}),e.createElement("feComposite",{in2:"hardAlpha",operator:"out"}),e.createElement("feColorMatrix",{type:"matrix",values:o(n.commitColor)}),e.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_46_47"}),e.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_46_47",result:"shape"}))))}function g(t){var n=t.start,a=t.end,r=t.commitSpacing,c=t.branchSpacing,i=t.branchColor,l=t.branchOrder,m=t.nodeRadius,s=Math.abs(a-n)*(r+4*m),u=4*m+l*c-1,h=o(i);return e.createElement(e.Fragment,null,e.createElement("g",{filter:"url(#filter".concat(l,"-").concat(n,"-").concat(a,")")},e.createElement("line",{x1:u,y1:n*r+2*m,x2:u,y2:a*r+5*m,stroke:i,strokeWidth:"4"})),e.createElement("defs",null,e.createElement("filter",{id:"filter".concat(l,"-").concat(n,"-").concat(a),x:u,y:n*r,width:12,height:s,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},e.createElement("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),e.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),e.createElement("feOffset",null),e.createElement("feGaussianBlur",{stdDeviation:"2.5"}),e.createElement("feComposite",{in2:"hardAlpha",operator:"out"}),e.createElement("feColorMatrix",{type:"matrix",values:h}),e.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_2_590"}),e.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_2_590",result:"shape"}))))}function x(t){var n=t.columns,a=t.commitsMap,r=t.commitSpacing,o=t.branchSpacing,c=t.nodeRadius;return e.createElement(e.Fragment,null,n.map((function(t,n){return t.map((function(t){var i=t.end===1/0?a.get(t.endCommit.hash).x:t.end;return e.createElement(g,{key:"branch-path-".concat(n,"-").concat(t.start,"-").concat(t.end),start:t.start,end:i,commitSpacing:r,branchSpacing:o,branchColor:t.color,branchOrder:n,nodeRadius:c})}))})))}function E(n){var a=n.curve;return e.createElement(e.Fragment,null,e.createElement("g",{filter:"url(#".concat(a.id,")")},e.createElement("path",{d:a.path,stroke:a.pathColor,strokeWidth:"2",fill:"none"})),e.createElement("defs",null,e.createElement("filter",t({},a,{filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"}),e.createElement("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),e.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),e.createElement("feOffset",null),e.createElement("feGaussianBlur",{stdDeviation:"2.5"}),e.createElement("feComposite",{in2:"hardAlpha",operator:"out"}),e.createElement("feColorMatrix",{type:"matrix",values:o(a.pathColor)}),e.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_103_601"}),e.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_103_601",result:"shape"}))))}function v(t){var n=t.commits,a=t.commitsMap,r=t.commitSpacing,o=t.branchSpacing,c=t.nodeRadius;return e.createElement(e.Fragment,null,n.map((function(t){var n=function(e,t,n,a,r){if(e.parents.length<2)return null;for(var o=[],c=1;c<e.parents.length;c++){var i=t.get(e.parents[c]);if(i){var s=m(n,a,r,e.x,e.y),u=e.x+1>i.x?i.x:e.x+1,h=Math.abs(i.x-e.x)*(a+4*r),d=Math.abs(i.y-e.y+1)*(n+4*r)+4,f=m(n,a,r,u,i.y);o.push({path:l(s,f),pathColor:i.commitColor,id:"filter_".concat(e.hash.slice(0,7),"_curved_path_").concat(i.hash.slice(0,7)),x:e.y,y:e.x*a,width:d,height:h})}}return o}(t,a,o,r,c),i=function(e,t,n,a,r){if(e.children.length<2)return null;var o=[];return e.children.forEach((function(c){var i=t.get(c);if(i.parents[0]===e.hash&&i.y!==e.y){var s=m(n,a,r,e.x,e.y),u=e.x-1>i.x?e.x-1:i.x,h=m(n,a,r,u,i.y),d=Math.abs(i.x-e.x)*(a+4*r),f=Math.abs(i.y-e.y+1)*(n+4*r);o.push({path:l(s,[h[0],h[1]+3*r]),pathColor:i.commitColor,id:"filter_".concat(e.hash.slice(0,7),"_curved_path_").concat(i.hash.slice(0,7)),x:i.y,y:i.x*a,width:f,height:d})}})),o}(t,a,o,r,c);return e.createElement(e.Fragment,null,i&&i.map((function(n){return e.createElement(E,{key:"".concat(t.hash,"-curved-up-path-").concat(n[0]),commit:t,curve:n})})),n&&n.map((function(n){return e.createElement(E,{key:"".concat(t.hash,"-curved-down-path-").concat(n[0],"}"),commit:t,curve:n})})))})))}c(".index-module_container__mhEMW {\n position: relative;\n display: flex;\n flex-direction: column;\n}\n\n.index-module_commitInfoContainer__3w-Au {\n position: absolute;\n width: 100%;\n}\n\n.index-module_details__x2MF2 {\n position: absolute;\n display: flex;\n align-items: baseline;\n}\n");var _={outer:"index-module_outer__52HDL"};function y(t){var n=t.branchName,a=t.branchColor;return e.createElement("div",{style:{color:a,borderColor:a},className:_.outer},n)}function b(n){var o=n.commits,c=n.style,i=n.branchHeads,l=function(e){var t=new Map;return e.forEach((function(e){e.parents.forEach((function(n){t[n]?t[n].push(e.hash):t[n]=[e.hash]}))})),e.map((function(e){var n;return{hash:e.hash,parents:e.parents,children:null!==(n=t[e.hash])&&void 0!==n?n:[],committer:e.committer.displayName,message:e.message,committerDate:new Date(e.committedAt),commitLink:e.commitLink,x:-1,y:-1}}))}(o),m=t(t({},r),c),g=m.commitSpacing,E=m.branchSpacing,_=m.branchColors,b=m.nodeRadius,C=a(l),S=C.columns,M=C.commitsMap,w=S.length*(E+2*b)+3,F=Math.max.apply(Math,S.map((function(e){return e[e.length-1].end===1/0?e[e.length-1].endCommit.x:e[e.length-1].end})))*(g+2*b)+4*b+3;!function(e,t,n){e.map((function(e,a){e.map((function(e){var r=t[e.branchOrder%t.length];e.color=r,function(e,t,n,a){n.forEach((function(n){n.y===t&&e.start<=n.x&&e.end>=n.x&&(n.commitColor=a)}))}(e,a,n,r)}))}))}(S,_,M);var B=Array.from(M.values());return e.createElement("div",{className:u},e.createElement("div",null,e.createElement("svg",{width:w,height:F},e.createElement(x,{columns:S,commitsMap:M,commitSpacing:g,branchSpacing:E,nodeRadius:b}),e.createElement(v,{commitsMap:M,commits:B,commitSpacing:g,branchSpacing:E,nodeRadius:b}),B.map((function(t){return e.createElement(p,{key:"".concat(t.hash,"-dot"),commit:t,commitSpacing:g,branchSpacing:E,nodeRadius:b})})))),e.createElement("div",{style:{left:w+20},className:h},B.map((function(t){var n=f(E,g,b,t).y,a=i.filter((function(e){return e.headCommitHash===t.hash}));return e.createElement("div",{style:{top:n-2*b},className:d},e.createElement(s,{commit:t}),!!a.length&&e.createElement(y,{branchName:a[0].branchName,branchColor:t.commitColor}))}))))}c(".index-module_outer__52HDL {\n font-size: small;\n border: 1px solid;\n width: fit-content;\n padding-left: 0.75rem;\n padding-right: 0.75rem;\n height: 1.5rem;\n line-height: 1.5rem;\n border-radius: 50px;\n margin-left: 2rem;\n font-weight: 600;\n}\n");export{b as CommitGraph}; | ||
//# sourceMappingURL=index.js.map |
@@ -8,3 +8,3 @@ import React from "react"; | ||
}; | ||
export default function CurvePath({ commit, curve }: Props): React.JSX.Element; | ||
export default function CurvePath({ curve }: Props): React.JSX.Element; | ||
export {}; |
@@ -6,5 +6,5 @@ export type Commit = { | ||
committer: { | ||
username: string; | ||
username?: string | null; | ||
displayName: string; | ||
emailAddress: string; | ||
emailAddress?: string; | ||
}; | ||
@@ -11,0 +11,0 @@ message: string; |
@@ -8,5 +8,5 @@ import React from 'react'; | ||
committer: { | ||
username: string; | ||
username?: string | null; | ||
displayName: string; | ||
emailAddress: string; | ||
emailAddress?: string; | ||
}; | ||
@@ -13,0 +13,0 @@ message: string; |
{ | ||
"name": "commit-graph", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"author": "Liu Liu <liuliu.developer@gmail.com>", | ||
@@ -5,0 +5,0 @@ "description": "A React component to visualize a commit graph.", |
@@ -6,2 +6,3 @@ import type { Meta, StoryObj } from "@storybook/react"; | ||
half, | ||
multipleBranches, | ||
notPaintedWellInDoltHub, | ||
@@ -12,5 +13,3 @@ threeBranches, | ||
} from "../../helpers/sampleCommits"; | ||
import { getCommits } from "../../helpers/utils"; | ||
// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction | ||
const meta: Meta<typeof CommitGraph> = { | ||
@@ -105,1 +104,9 @@ title: "Example/CommitGraph", | ||
}; | ||
export const Multiple2: Story = { | ||
args: { | ||
commits: multipleBranches, | ||
branchHeads: [], | ||
style, | ||
}, | ||
}; |
@@ -39,3 +39,4 @@ import { CommitNode } from "../../helpers/types"; | ||
const width = | ||
Math.abs(parent.y - commit.y + 1) * (branchSpacing + nodeRadius * 4); | ||
Math.abs(parent.y - commit.y + 1) * (branchSpacing + nodeRadius * 4) + | ||
4; | ||
@@ -42,0 +43,0 @@ const end = getPositionsBySpacing( |
@@ -1299,1 +1299,554 @@ export const threeBranches = [ | ||
]; | ||
export const multipleBranches = [ | ||
{ | ||
ownerName: "liuliu", | ||
repoName: "us-jails", | ||
committer: { | ||
_id: "liu@dolthub.com", | ||
username: "liuliu", | ||
displayName: "liuliu", | ||
emailAddress: "liu@dolthub.com", | ||
__typename: "DoltWriter", | ||
}, | ||
message: | ||
"Run SQL query: CREATE TABLE tablename (\n pk INT,\n col1 VARCHAR(255)\n);", | ||
parents: ["i3f3orlfmbjgqnst90c8r96jps7tdtv9"], | ||
hash: "16f398rmboomr4tgeb8emenogtbqpmiv", | ||
committedAt: 1680643666000, | ||
__typename: "Commit", | ||
}, | ||
{ | ||
ownerName: "liuliu", | ||
repoName: "us-jails", | ||
committer: { | ||
_id: "alec@dolthub.com", | ||
username: null, | ||
displayName: "spacelove", | ||
emailAddress: "alec@dolthub.com", | ||
__typename: "DoltWriter", | ||
}, | ||
message: "Dolthub User: abmyii\nAccepted PR: 44", | ||
parents: [ | ||
"mgqogflskqiav33uitqmis4dcbvj5h3i", | ||
"ubu61jhc3qp1d28035ee3kd105ao10q1", | ||
], | ||
hash: "i3f3orlfmbjgqnst90c8r96jps7tdtv9", | ||
committedAt: 1655233918000, | ||
__typename: "Commit", | ||
}, | ||
{ | ||
_id: "repositoryOwners/liuliu/repositories/us-jails/commits/mgqogflskqiav33uitqmis4dcbvj5h3i", | ||
ownerName: "liuliu", | ||
repoName: "us-jails", | ||
committer: { | ||
_id: "alec@dolthub.com", | ||
username: null, | ||
displayName: "spacelove", | ||
emailAddress: "alec@dolthub.com", | ||
__typename: "DoltWriter", | ||
}, | ||
message: "Dolthub User: captainstabs\nAccepted PR: 43", | ||
parents: [ | ||
"m8b0nj9t1fjn9kmhpe8rnfjk64v54g4j", | ||
"jpm4mg8btdnkcaolo5iqj7u36s4sk08s", | ||
], | ||
hash: "mgqogflskqiav33uitqmis4dcbvj5h3i", | ||
committedAt: 1655233917000, | ||
__typename: "Commit", | ||
}, | ||
{ | ||
ownerName: "liuliu", | ||
repoName: "us-jails", | ||
committer: { | ||
_id: "comportfailure@gmail.com", | ||
username: null, | ||
displayName: "Captain Stabs", | ||
emailAddress: "comportfailure@gmail.com", | ||
__typename: "DoltWriter", | ||
}, | ||
message: "Merge 9201 with TX0043", | ||
parents: ["ufnl2hu0rkgq2soqre0tj1terhf7jtmd"], | ||
hash: "jpm4mg8btdnkcaolo5iqj7u36s4sk08s", | ||
committedAt: 1655141852000, | ||
__typename: "Commit", | ||
}, | ||
{ | ||
_id: "repositoryOwners/liuliu/repositories/us-jails/commits/m8b0nj9t1fjn9kmhpe8rnfjk64v54g4j", | ||
ownerName: "liuliu", | ||
repoName: "us-jails", | ||
committer: { | ||
_id: "alec@dolthub.com", | ||
username: null, | ||
displayName: "spacelove", | ||
emailAddress: "alec@dolthub.com", | ||
__typename: "DoltWriter", | ||
}, | ||
message: "Dolthub User: abmyii\nAccepted PR: 42", | ||
parents: [ | ||
"ba66kmkq4cchibsreufcr0gf870hmnsr", | ||
"di0dte7dteioqq3ju33fcn0149r6kurn", | ||
], | ||
hash: "m8b0nj9t1fjn9kmhpe8rnfjk64v54g4j", | ||
committedAt: 1655233916000, | ||
__typename: "Commit", | ||
}, | ||
{ | ||
_id: "repositoryOwners/liuliu/repositories/us-jails/commits/ufnl2hu0rkgq2soqre0tj1terhf7jtmd", | ||
ownerName: "liuliu", | ||
repoName: "us-jails", | ||
committer: { | ||
_id: "comportfailure@gmail.com", | ||
username: null, | ||
displayName: "Captain Stabs", | ||
emailAddress: "comportfailure@gmail.com", | ||
__typename: "DoltWriter", | ||
}, | ||
message: "'Merge", | ||
parents: ["ba66kmkq4cchibsreufcr0gf870hmnsr"], | ||
hash: "ufnl2hu0rkgq2soqre0tj1terhf7jtmd", | ||
committedAt: 1655141487000, | ||
__typename: "Commit", | ||
}, | ||
{ | ||
_id: "repositoryOwners/liuliu/repositories/us-jails/commits/ba66kmkq4cchibsreufcr0gf870hmnsr", | ||
ownerName: "liuliu", | ||
repoName: "us-jails", | ||
committer: { | ||
_id: "alec@dolthub.com", | ||
username: null, | ||
displayName: "spacelove", | ||
emailAddress: "alec@dolthub.com", | ||
__typename: "DoltWriter", | ||
}, | ||
message: "Dolthub User: joeeoj\nAccepted PR: 40", | ||
parents: [ | ||
"tv6so04lt2vrdja4i55iki7t7jiongnb", | ||
"oe7iun3lqae1ujpe5o3ic3qla0hh7tnm", | ||
], | ||
hash: "ba66kmkq4cchibsreufcr0gf870hmnsr", | ||
committedAt: 1654957545000, | ||
__typename: "Commit", | ||
}, | ||
{ | ||
_id: "repositoryOwners/liuliu/repositories/us-jails/commits/tv6so04lt2vrdja4i55iki7t7jiongnb", | ||
ownerName: "liuliu", | ||
repoName: "us-jails", | ||
committer: { | ||
_id: "alec@dolthub.com", | ||
username: null, | ||
displayName: "spacelove", | ||
emailAddress: "alec@dolthub.com", | ||
__typename: "DoltWriter", | ||
}, | ||
message: "Dolthub User: abmyii\nAccepted PR: 39", | ||
parents: [ | ||
"mqvorubnll8s6n294q0bmfr932o38kcj", | ||
"2hcjmh04cff6k4ibl88k8qsco7qfio1v", | ||
], | ||
hash: "tv6so04lt2vrdja4i55iki7t7jiongnb", | ||
committedAt: 1654957544000, | ||
__typename: "Commit", | ||
}, | ||
{ | ||
_id: "repositoryOwners/liuliu/repositories/us-jails/commits/mqvorubnll8s6n294q0bmfr932o38kcj", | ||
ownerName: "liuliu", | ||
repoName: "us-jails", | ||
committer: { | ||
_id: "alec@dolthub.com", | ||
username: null, | ||
displayName: "spacelove", | ||
emailAddress: "alec@dolthub.com", | ||
__typename: "DoltWriter", | ||
}, | ||
message: "Dolthub User: rl1987\nAccepted PR: 38", | ||
parents: [ | ||
"o7jeie7it07n7mmdugc3kb3p7qffqbqk", | ||
"p8sfi9iuu1rur2i1vq89bnsoueonuqk2", | ||
], | ||
hash: "mqvorubnll8s6n294q0bmfr932o38kcj", | ||
committedAt: 1654957541000, | ||
__typename: "Commit", | ||
}, | ||
{ | ||
_id: "repositoryOwners/liuliu/repositories/us-jails/commits/o7jeie7it07n7mmdugc3kb3p7qffqbqk", | ||
ownerName: "liuliu", | ||
repoName: "us-jails", | ||
committer: { | ||
_id: "alec@dolthub.com", | ||
username: null, | ||
displayName: "spacelove", | ||
emailAddress: "alec@dolthub.com", | ||
__typename: "DoltWriter", | ||
}, | ||
message: "Dolthub User: joeeoj\nAccepted PR: 37", | ||
parents: [ | ||
"beeg47n89hktas0po8g4que9hqrpj33c", | ||
"23c24p5s3f3qcnfkl27igmktb095q19q", | ||
], | ||
hash: "o7jeie7it07n7mmdugc3kb3p7qffqbqk", | ||
committedAt: 1654957151000, | ||
__typename: "Commit", | ||
}, | ||
{ | ||
_id: "repositoryOwners/liuliu/repositories/us-jails/commits/beeg47n89hktas0po8g4que9hqrpj33c", | ||
ownerName: "liuliu", | ||
repoName: "us-jails", | ||
committer: { | ||
_id: "alec@dolthub.com", | ||
username: null, | ||
displayName: "spacelove", | ||
emailAddress: "alec@dolthub.com", | ||
__typename: "DoltWriter", | ||
}, | ||
message: "Dolthub User: joeeoj\nAccepted PR: 36", | ||
parents: [ | ||
"5unofrovlp90drn0uh13louv5551tk95", | ||
"5670epd9rfsndavmgtahb502d4fl2id1", | ||
], | ||
hash: "beeg47n89hktas0po8g4que9hqrpj33c", | ||
committedAt: 1654957151000, | ||
__typename: "Commit", | ||
}, | ||
{ | ||
_id: "repositoryOwners/liuliu/repositories/us-jails/commits/5unofrovlp90drn0uh13louv5551tk95", | ||
ownerName: "liuliu", | ||
repoName: "us-jails", | ||
committer: { | ||
_id: "alec@dolthub.com", | ||
username: null, | ||
displayName: "spacelove", | ||
emailAddress: "alec@dolthub.com", | ||
__typename: "DoltWriter", | ||
}, | ||
message: "Update LICENSE", | ||
parents: ["qk2rudrj5i49d97pemp4nt1jgaoccrqj"], | ||
hash: "5unofrovlp90drn0uh13louv5551tk95", | ||
committedAt: 1654809849000, | ||
__typename: "Commit", | ||
}, | ||
{ | ||
_id: "repositoryOwners/liuliu/repositories/us-jails/commits/p8sfi9iuu1rur2i1vq89bnsoueonuqk2", | ||
ownerName: "liuliu", | ||
repoName: "us-jails", | ||
committer: { | ||
_id: "rimantas@keyspace.lt", | ||
username: null, | ||
displayName: "rl1987", | ||
emailAddress: "rimantas@keyspace.lt", | ||
__typename: "DoltWriter", | ||
}, | ||
message: | ||
"Add monthly snapshots of data from: https://doc.iowa.gov/daily-statistics", | ||
parents: ["q718cb3ou7lac4tdkpikio0p1trmdpad"], | ||
hash: "p8sfi9iuu1rur2i1vq89bnsoueonuqk2", | ||
committedAt: 1654539193000, | ||
__typename: "Commit", | ||
}, | ||
{ | ||
_id: "repositoryOwners/liuliu/repositories/us-jails/commits/ubu61jhc3qp1d28035ee3kd105ao10q1", | ||
ownerName: "liuliu", | ||
repoName: "us-jails", | ||
committer: { | ||
_id: "abdurrahmaaniqbal@hotmail.com", | ||
username: null, | ||
displayName: "Abdurrahmaan Iqbal", | ||
emailAddress: "abdurrahmaaniqbal@hotmail.com", | ||
__typename: "DoltWriter", | ||
}, | ||
message: "Import KY data", | ||
parents: ["gora1aioouji9j3858n928g84en6b17b"], | ||
hash: "ubu61jhc3qp1d28035ee3kd105ao10q1", | ||
committedAt: 1655188823000, | ||
__typename: "Commit", | ||
}, | ||
{ | ||
_id: "repositoryOwners/liuliu/repositories/us-jails/commits/di0dte7dteioqq3ju33fcn0149r6kurn", | ||
ownerName: "liuliu", | ||
repoName: "us-jails", | ||
committer: { | ||
_id: "abdurrahmaaniqbal@hotmail.com", | ||
username: null, | ||
displayName: "Abdurrahmaan Iqbal", | ||
emailAddress: "abdurrahmaaniqbal@hotmail.com", | ||
__typename: "DoltWriter", | ||
}, | ||
message: "Use correct jail id for Santa Ana Jail data", | ||
parents: ["gora1aioouji9j3858n928g84en6b17b"], | ||
hash: "di0dte7dteioqq3ju33fcn0149r6kurn", | ||
committedAt: 1654886389000, | ||
__typename: "Commit", | ||
}, | ||
{ | ||
_id: "repositoryOwners/liuliu/repositories/us-jails/commits/qk2rudrj5i49d97pemp4nt1jgaoccrqj", | ||
ownerName: "liuliu", | ||
repoName: "us-jails", | ||
committer: { | ||
_id: "alec@dolthub.com", | ||
username: null, | ||
displayName: "spacelove", | ||
emailAddress: "alec@dolthub.com", | ||
__typename: "DoltWriter", | ||
}, | ||
message: "Dolthub User: joeeoj\nAccepted PR: 32", | ||
parents: [ | ||
"gora1aioouji9j3858n928g84en6b17b", | ||
"jefb309kvl082pp3r0g3hlraif318cq0", | ||
], | ||
hash: "qk2rudrj5i49d97pemp4nt1jgaoccrqj", | ||
committedAt: 1654809567000, | ||
__typename: "Commit", | ||
}, | ||
{ | ||
_id: "repositoryOwners/liuliu/repositories/us-jails/commits/2hcjmh04cff6k4ibl88k8qsco7qfio1v", | ||
ownerName: "liuliu", | ||
repoName: "us-jails", | ||
committer: { | ||
_id: "abdurrahmaaniqbal@hotmail.com", | ||
username: null, | ||
displayName: "Abdurrahmaan Iqbal", | ||
emailAddress: "abdurrahmaaniqbal@hotmail.com", | ||
__typename: "DoltWriter", | ||
}, | ||
message: "Import missing TX jails & inmate population snapshots", | ||
parents: ["gora1aioouji9j3858n928g84en6b17b"], | ||
hash: "2hcjmh04cff6k4ibl88k8qsco7qfio1v", | ||
committedAt: 1654562172000, | ||
__typename: "Commit", | ||
}, | ||
{ | ||
_id: "repositoryOwners/liuliu/repositories/us-jails/commits/q718cb3ou7lac4tdkpikio0p1trmdpad", | ||
ownerName: "liuliu", | ||
repoName: "us-jails", | ||
committer: { | ||
_id: "rimantas@keyspace.lt", | ||
username: null, | ||
displayName: "rl1987", | ||
emailAddress: "rimantas@keyspace.lt", | ||
__typename: "DoltWriter", | ||
}, | ||
message: | ||
"Update jails table with facilities managed by Iowa Department of Corrections", | ||
parents: ["gora1aioouji9j3858n928g84en6b17b"], | ||
hash: "q718cb3ou7lac4tdkpikio0p1trmdpad", | ||
committedAt: 1654536292000, | ||
__typename: "Commit", | ||
}, | ||
{ | ||
_id: "repositoryOwners/liuliu/repositories/us-jails/commits/jefb309kvl082pp3r0g3hlraif318cq0", | ||
ownerName: "liuliu", | ||
repoName: "us-jails", | ||
committer: { | ||
_id: "joeeoj@blueskyemail.net", | ||
username: null, | ||
displayName: "joeeoj", | ||
emailAddress: "joeeoj@blueskyemail.net", | ||
__typename: "DoltWriter", | ||
}, | ||
message: | ||
"condense so results on multiple related rows flatten to a one single row", | ||
parents: ["fl0loa9q3ed8b5mvrthik3r53fofjhcb"], | ||
hash: "jefb309kvl082pp3r0g3hlraif318cq0", | ||
committedAt: 1654537392000, | ||
__typename: "Commit", | ||
}, | ||
{ | ||
_id: "repositoryOwners/liuliu/repositories/us-jails/commits/gora1aioouji9j3858n928g84en6b17b", | ||
ownerName: "liuliu", | ||
repoName: "us-jails", | ||
committer: { | ||
_id: "alec@dolthub.com", | ||
username: null, | ||
displayName: "spacelove", | ||
emailAddress: "alec@dolthub.com", | ||
__typename: "DoltWriter", | ||
}, | ||
message: "Dolthub User: abmyii\nAccepted PR: 34", | ||
parents: [ | ||
"75fh9ddp5k4vt16b1n5v7fjpdn9om8l3", | ||
"r60ng1cnm4q3tbkkfjcbj6a2b057ba1d", | ||
], | ||
hash: "gora1aioouji9j3858n928g84en6b17b", | ||
committedAt: 1654197954000, | ||
__typename: "Commit", | ||
}, | ||
{ | ||
_id: "repositoryOwners/liuliu/repositories/us-jails/commits/oe7iun3lqae1ujpe5o3ic3qla0hh7tnm", | ||
ownerName: "liuliu", | ||
repoName: "us-jails", | ||
committer: { | ||
_id: "joeeoj@blueskyemail.net", | ||
username: null, | ||
displayName: "joeeoj", | ||
emailAddress: "joeeoj@blueskyemail.net", | ||
__typename: "DoltWriter", | ||
}, | ||
message: "Merge pull request #9 from joeeoj/import-1654568778", | ||
parents: [ | ||
"su0vsmitli17stku7vnchad6adek8v1c", | ||
"ksu190idj8uuhbhavtnlev03gm1edi0u", | ||
], | ||
hash: "oe7iun3lqae1ujpe5o3ic3qla0hh7tnm", | ||
committedAt: 1654568930000, | ||
__typename: "Commit", | ||
}, | ||
{ | ||
_id: "repositoryOwners/liuliu/repositories/us-jails/commits/23c24p5s3f3qcnfkl27igmktb095q19q", | ||
ownerName: "liuliu", | ||
repoName: "us-jails", | ||
committer: { | ||
_id: "joeeoj@blueskyemail.net", | ||
username: null, | ||
displayName: "joeeoj", | ||
emailAddress: "joeeoj@blueskyemail.net", | ||
__typename: "DoltWriter", | ||
}, | ||
message: "Merge pull request #7 from joeeoj/import-1654292411", | ||
parents: [ | ||
"kskinpg8srqrvcgtkhhoj056a5apc9ar", | ||
"qsa9tilj4ive4ic9od5v43p8gp39gu84", | ||
], | ||
hash: "23c24p5s3f3qcnfkl27igmktb095q19q", | ||
committedAt: 1654292457000, | ||
__typename: "Commit", | ||
}, | ||
{ | ||
_id: "repositoryOwners/liuliu/repositories/us-jails/commits/fl0loa9q3ed8b5mvrthik3r53fofjhcb", | ||
ownerName: "liuliu", | ||
repoName: "us-jails", | ||
committer: { | ||
_id: "joeeoj@blueskyemail.net", | ||
username: null, | ||
displayName: "joeeoj", | ||
emailAddress: "joeeoj@blueskyemail.net", | ||
__typename: "DoltWriter", | ||
}, | ||
message: "add race and gender breakdowns", | ||
parents: ["mpbgcnrd599rn10ujnrh52vaaqk9vdth"], | ||
hash: "fl0loa9q3ed8b5mvrthik3r53fofjhcb", | ||
committedAt: 1654189695000, | ||
__typename: "Commit", | ||
}, | ||
{ | ||
_id: "repositoryOwners/liuliu/repositories/us-jails/commits/75fh9ddp5k4vt16b1n5v7fjpdn9om8l3", | ||
ownerName: "liuliu", | ||
repoName: "us-jails", | ||
committer: { | ||
_id: "alec@dolthub.com", | ||
username: null, | ||
displayName: "spacelove", | ||
emailAddress: "alec@dolthub.com", | ||
__typename: "DoltWriter", | ||
}, | ||
message: "Dolthub User: abmyii\nAccepted PR: 33", | ||
parents: [ | ||
"ic15hmbs18vmac3qps0nseiu0p091qi0", | ||
"4qjm7nipub4ntf8ff58ntpfvqlsess49", | ||
], | ||
hash: "75fh9ddp5k4vt16b1n5v7fjpdn9om8l3", | ||
committedAt: 1654183013000, | ||
__typename: "Commit", | ||
}, | ||
{ | ||
_id: "repositoryOwners/liuliu/repositories/us-jails/commits/5670epd9rfsndavmgtahb502d4fl2id1", | ||
ownerName: "liuliu", | ||
repoName: "us-jails", | ||
committer: { | ||
_id: "joeeoj@blueskyemail.net", | ||
username: null, | ||
displayName: "joeeoj", | ||
emailAddress: "joeeoj@blueskyemail.net", | ||
__typename: "DoltWriter", | ||
}, | ||
message: "add az prisons", | ||
parents: ["ic15hmbs18vmac3qps0nseiu0p091qi0"], | ||
hash: "5670epd9rfsndavmgtahb502d4fl2id1", | ||
committedAt: 1654122393000, | ||
__typename: "Commit", | ||
}, | ||
{ | ||
_id: "repositoryOwners/liuliu/repositories/us-jails/commits/su0vsmitli17stku7vnchad6adek8v1c", | ||
ownerName: "liuliu", | ||
repoName: "us-jails", | ||
committer: { | ||
_id: "joeeoj@blueskyemail.net", | ||
username: null, | ||
displayName: "joeeoj", | ||
emailAddress: "joeeoj@blueskyemail.net", | ||
__typename: "DoltWriter", | ||
}, | ||
message: | ||
"Add CT prison population data from a daily data source. I used the first day of the month as the snapshot date for simplicity.", | ||
parents: ["dep2rnnvna3ttpgdf26jcvdsibts82g6"], | ||
hash: "su0vsmitli17stku7vnchad6adek8v1c", | ||
committedAt: 1654568916000, | ||
__typename: "Commit", | ||
}, | ||
{ | ||
_id: "repositoryOwners/liuliu/repositories/us-jails/commits/ksu190idj8uuhbhavtnlev03gm1edi0u", | ||
ownerName: "liuliu", | ||
repoName: "us-jails", | ||
committer: { | ||
_id: "joeeoj@blueskyemail.net", | ||
username: null, | ||
displayName: "joeeoj", | ||
emailAddress: "joeeoj@blueskyemail.net", | ||
__typename: "DoltWriter", | ||
}, | ||
message: "add CT jails (and two VA jails that sometimes house CT inmates)", | ||
parents: ["dep2rnnvna3ttpgdf26jcvdsibts82g6"], | ||
hash: "ksu190idj8uuhbhavtnlev03gm1edi0u", | ||
committedAt: 1654568784000, | ||
__typename: "Commit", | ||
}, | ||
{ | ||
_id: "repositoryOwners/liuliu/repositories/us-jails/commits/qsa9tilj4ive4ic9od5v43p8gp39gu84", | ||
ownerName: "liuliu", | ||
repoName: "us-jails", | ||
committer: { | ||
_id: "joeeoj@blueskyemail.net", | ||
username: null, | ||
displayName: "joeeoj", | ||
emailAddress: "joeeoj@blueskyemail.net", | ||
__typename: "DoltWriter", | ||
}, | ||
message: "aggregated population counts", | ||
parents: ["dep2rnnvna3ttpgdf26jcvdsibts82g6"], | ||
hash: "qsa9tilj4ive4ic9od5v43p8gp39gu84", | ||
committedAt: 1654292414000, | ||
__typename: "Commit", | ||
}, | ||
{ | ||
_id: "repositoryOwners/liuliu/repositories/us-jails/commits/kskinpg8srqrvcgtkhhoj056a5apc9ar", | ||
ownerName: "liuliu", | ||
repoName: "us-jails", | ||
committer: { | ||
_id: "joeeoj@blueskyemail.net", | ||
username: null, | ||
displayName: "joeeoj", | ||
emailAddress: "joeeoj@blueskyemail.net", | ||
__typename: "DoltWriter", | ||
}, | ||
message: "add prisons for population snapshots", | ||
parents: ["dep2rnnvna3ttpgdf26jcvdsibts82g6"], | ||
hash: "kskinpg8srqrvcgtkhhoj056a5apc9ar", | ||
committedAt: 1654292373000, | ||
__typename: "Commit", | ||
}, | ||
{ | ||
ownerName: "liuliu", | ||
repoName: "us-jails", | ||
committer: { | ||
_id: "abdurrahmaaniqbal@hotmail.com", | ||
username: null, | ||
displayName: "Abdurrahmaan Iqbal", | ||
emailAddress: "abdurrahmaaniqbal@hotmail.com", | ||
__typename: "DoltWriter", | ||
}, | ||
message: "NULL where in_urban_area = 0", | ||
parents: ["bg7c1miq9rpbhfhnlebtlmpdvt3u898j"], | ||
hash: "r60ng1cnm4q3tbkkfjcbj6a2b057ba1d", | ||
committedAt: 1654043113000, | ||
__typename: "Commit", | ||
}, | ||
]; |
@@ -6,5 +6,5 @@ export type Commit = { | ||
committer: { | ||
username: string; | ||
username?: string | null; | ||
displayName: string; | ||
emailAddress: string; | ||
emailAddress?: string; | ||
}; | ||
@@ -11,0 +11,0 @@ message: string; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
272356
6.57%3784
16.75%