git-truck 0.0.0-00dc485

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.
@@ -0,0 +1 @@
1
+ import{a as G,b as S,c as W,d as w}from"/build/_shared/chunk-VSIPHLJL.js";import{Ia as v,ba as N,ca as b,oa as D,za as d}from"/build/_shared/chunk-XPBA2PRG.js";import{a as g,e as f,j as h,n as y,o as x,t as m}from"/build/_shared/chunk-6XVEPPET.js";import{c as o}from"/build/_shared/chunk-Q3IECNXJ.js";var k=o(G()),U=o(W());var c=o(g());var l=o(m());function z(t){let a=x();(0,c.useEffect)(()=>{var r,n;if(a.state==="idle"){let[,s,u]=(n=(r=t.transitionData.location)==null?void 0:r.pathname.split("/"))!=null?n:["","",""];a.load(`/progress?repo=${s}&branch=${u}`)}},[a,a.state]);let i=(0,c.useMemo)(()=>{if(!a.data)return"Starting analyzation";let{progress:r,totalCommitCount:n,analyzationStatus:s}=a.data;return!s||s==="Starting"?"Starting analyzation":s==="GeneratingChart"?"Generating chart":"Analyzing commits: "+(r&&n?Math.round(r/n*100):0)+"% done"},[a.data]);return(0,l.jsx)("div",{className:N("grid h-full w-full place-items-center",""),children:(0,l.jsxs)("div",{className:"flex animate-hide-initially flex-col px-2 py-2 opacity-0",children:[(0,l.jsx)("p",{className:"text-center text-3xl font-bold opacity-70",children:i}),(0,l.jsx)("img",{src:b,alt:"\u{1F69B}",className:"w-full min-w-0 max-w-sm self-center"})]})})}var L=o(S());var p=o(g());var C="/build/_assets/truck-JLDVJULS.png";var e=o(m());function E(){let{repositories:t,baseDir:a,baseDirName:i}=y(),r=f();return r.state!=="idle"?(0,e.jsx)("div",{className:"grid h-screen place-items-center",children:(0,e.jsx)(z,{transitionData:r})}):(0,e.jsxs)("main",{className:"m-auto flex min-h-screen w-full max-w-4xl flex-col gap-2 p-2",children:[(0,e.jsxs)("div",{className:"card",children:[(0,e.jsxs)("h1",{className:"flex items-center text-4xl",children:[(0,e.jsx)("img",{src:C,alt:"Git Truck",className:"mr-2 inline-block h-12"}),"Git Truck"]}),(0,e.jsx)("p",{children:(0,e.jsxs)(e.Fragment,{children:["Found ",t.length," git repositor",t.length===1?"y":"ies"," in the folder"," ",(0,e.jsx)(d,{inline:!0,title:a,children:i}),"."]})})]}),(0,e.jsx)($,{repositories:t})]})}function $({repositories:t}){return t.length===0?(0,e.jsx)(e.Fragment,{children:(0,e.jsxs)("p",{children:["Try running ",(0,e.jsx)(d,{inline:!0,children:"git-truck"})," in another folder or provide another path as argument."]})}):(0,e.jsxs)("div",{className:"card row-start-auto grid w-full grid-flow-row grid-cols-[max-content,1fr,1fr,1fr] flex-wrap items-center gap-1",children:[(0,e.jsx)("h2",{className:"card__title truncate break-all",title:"Clone repository",children:"Clone repository"}),(0,e.jsx)("span",{className:"select-none rounded-full bg-gradient-to-r from-blue-500 to-blue-600 px-2 py-1.5 text-center text-xs font-bold uppercase leading-none tracking-widest text-white/90",children:"Coming soon"}),(0,e.jsx)("input",{type:"text",className:"input input--hover-border",placeholder:"git@github.com/owner/repo.git"}),(0,e.jsx)("button",{className:"btn rounded-full",disabled:!0,title:"Coming soon!",children:"Clone"}),(0,e.jsx)("hr",{className:"col-span-full"}),t.map((a,i)=>(0,e.jsx)(q,{index:i,repo:a},a.path))]})}function q({repo:t}){let[a,i]=(0,p.useState)(t.currentHead),r=D(t.name,a),n=t.analyzedHeads[a];return(0,e.jsxs)(p.Fragment,{children:[(0,e.jsx)("h2",{className:"card__title truncate",title:t.name,children:t.name}),(0,e.jsx)("span",{className:v("w-full min-w-max select-none rounded-full bg-white/20 bg-gradient-to-r px-2 py-1.5 text-center text-xs font-bold uppercase leading-none tracking-widest text-white/90",n?" from-green-500 to-green-600 ":"bg-transparent text-inherit"),children:n?"Ready":"Not analyzed"}),(0,e.jsx)(w,{className:"input--hover-border",value:a,onChange:s=>i(s.target.value),headGroups:t.refs,analyzedHeads:t.analyzedHeads}),(0,e.jsx)("div",{className:"grid",children:(0,e.jsx)(h,{className:`btn rounded-full ${n?"btn--success":""}`,to:r,children:n?"View":"Analyze"})})]},t.name)}export{E as default};
@@ -0,0 +1 @@
1
+ import{b as o}from"/build/_shared/chunk-Q3IECNXJ.js";var p=o((r,e)=>{e.exports={}});export default p();
@@ -0,0 +1 @@
1
+ import{b as o}from"/build/_shared/chunk-Q3IECNXJ.js";var p=o((r,e)=>{e.exports={}});export default p();
@@ -0,0 +1 @@
1
+ import{b as o}from"/build/_shared/chunk-Q3IECNXJ.js";var p=o((r,e)=>{e.exports={}});export default p();
@@ -0,0 +1 @@
1
+ import{b as o}from"/build/_shared/chunk-Q3IECNXJ.js";var p=o((r,e)=>{e.exports={}});export default p();
Binary file