@ingit/cli-win32-x64 0.1.9

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.
Files changed (44) hide show
  1. package/client/assets/SettingsDialog-ChXHytj0.js +7 -0
  2. package/client/assets/index-u6U3c3iu.js +615 -0
  3. package/client/index.html +33 -0
  4. package/client/press-kit/README.md +26 -0
  5. package/client/press-kit/favicon/favicon-16.png +0 -0
  6. package/client/press-kit/favicon/favicon-32.png +0 -0
  7. package/client/press-kit/favicon/favicon-48.png +0 -0
  8. package/client/press-kit/favicon/favicon.ico +0 -0
  9. package/client/press-kit/favicon/favicon.svg +19 -0
  10. package/client/press-kit/index.html +155 -0
  11. package/client/press-kit/ingit-icon-light.svg +19 -0
  12. package/client/press-kit/ingit-icon-mark-dark.svg +17 -0
  13. package/client/press-kit/ingit-icon-mark-light.svg +17 -0
  14. package/client/press-kit/ingit-icon-transparent.svg +16 -0
  15. package/client/press-kit/ingit-icon.svg +19 -0
  16. package/client/press-kit/png/dark/ingit-icon-1024.png +0 -0
  17. package/client/press-kit/png/dark/ingit-icon-128.png +0 -0
  18. package/client/press-kit/png/dark/ingit-icon-16.png +0 -0
  19. package/client/press-kit/png/dark/ingit-icon-180.png +0 -0
  20. package/client/press-kit/png/dark/ingit-icon-192.png +0 -0
  21. package/client/press-kit/png/dark/ingit-icon-256.png +0 -0
  22. package/client/press-kit/png/dark/ingit-icon-32.png +0 -0
  23. package/client/press-kit/png/dark/ingit-icon-48.png +0 -0
  24. package/client/press-kit/png/dark/ingit-icon-512.png +0 -0
  25. package/client/press-kit/png/dark/ingit-icon-64.png +0 -0
  26. package/client/press-kit/png/light/ingit-icon-light-1024.png +0 -0
  27. package/client/press-kit/png/light/ingit-icon-light-128.png +0 -0
  28. package/client/press-kit/png/light/ingit-icon-light-256.png +0 -0
  29. package/client/press-kit/png/light/ingit-icon-light-512.png +0 -0
  30. package/client/press-kit/png/mark-dark/ingit-icon-mark-dark-1024.png +0 -0
  31. package/client/press-kit/png/mark-dark/ingit-icon-mark-dark-128.png +0 -0
  32. package/client/press-kit/png/mark-dark/ingit-icon-mark-dark-256.png +0 -0
  33. package/client/press-kit/png/mark-dark/ingit-icon-mark-dark-512.png +0 -0
  34. package/client/press-kit/png/mark-light/ingit-icon-mark-light-1024.png +0 -0
  35. package/client/press-kit/png/mark-light/ingit-icon-mark-light-128.png +0 -0
  36. package/client/press-kit/png/mark-light/ingit-icon-mark-light-256.png +0 -0
  37. package/client/press-kit/png/mark-light/ingit-icon-mark-light-512.png +0 -0
  38. package/client/press-kit/png/transparent/ingit-icon-transparent-1024.png +0 -0
  39. package/client/press-kit/png/transparent/ingit-icon-transparent-128.png +0 -0
  40. package/client/press-kit/png/transparent/ingit-icon-transparent-256.png +0 -0
  41. package/client/press-kit/png/transparent/ingit-icon-transparent-512.png +0 -0
  42. package/client/site.webmanifest +20 -0
  43. package/ingit.exe +0 -0
  44. package/package.json +24 -0
@@ -0,0 +1,7 @@
1
+ import{a as e,c as t,d as n,f as r,h as i,i as a,l as o,m as s,n as c,o as l,p as u,r as d,s as f,t as p,u as m}from"./index-u6U3c3iu.js";var h=i(u(),1),g=s(),_={width:`100%`,border:`1px solid #45475a`,borderRadius:6,background:`#11111b`,color:`#cdd6f4`,fontFamily:`inherit`,fontSize:12,outline:`none`},v={height:30,padding:`0 11px`,border:`1px solid #45475a`,borderRadius:6,background:`#181825`,color:`#bac2de`,fontFamily:`inherit`,fontSize:11,fontWeight:700,cursor:`pointer`},y={...v,border:`1px solid #6d9658`,background:`#8dcf78`,color:`#0b1020`,fontWeight:800},b=`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
2
+ <path d="m12 3 2.5 5.5L20 11l-5.5 2.5L12 19l-2.5-5.5L4 11l5.5-2.5L12 3Z" />
3
+ </svg>`;function x(e){let t=new Set(e.map(e=>e.id)),n=typeof crypto<`u`&&`randomUUID`in crypto?crypto.randomUUID():`${Date.now()}-${Math.random().toString(36).slice(2)}`,r=`custom-${n}`,i=2;for(;t.has(r);)r=`custom-${n}-${i}`,i+=1;return r}function S({icon:e,customSvg:t,size:n=18,muted:r=!1}){let i=n+10;return(0,g.jsxs)(`svg`,{"aria-hidden":`true`,width:i,height:i,viewBox:`-12 -12 24 24`,style:{display:`block`,flex:`0 0 auto`},children:[(0,g.jsx)(`circle`,{r:`10`,fill:`#11111b`,stroke:r?`#45475a`:`#89b4fa`,strokeWidth:`1.5`}),(0,g.jsx)(c,{icon:e,customSvg:t,color:r?`#6c7086`:`#89b4fa`,size:n})]})}function C(e){return e.map(e=>({...e,label:e.label.trim(),types:e.types.map(e=>e.trim()).filter(Boolean),patterns:e.patterns.map(e=>e.trim()).filter(Boolean),...e.customSvg===void 0?{}:{customSvg:e.customSvg.trim()}}))}function w(t){for(let r of t){if(!r.label.trim())return{id:r.id,message:`Every rule needs a name.`};if(r.enabled&&r.types.length===0&&r.patterns.length===0)return{id:r.id,message:`“${r.label}” needs at least one commit type or message pattern.`};for(let t of r.patterns){let n=e(t);if(n)return{id:r.id,message:`Invalid pattern in “${r.label}”: ${n}`}}if(r.customSvg!==void 0){let e=n(r.customSvg);if(e)return{id:r.id,message:`Invalid custom SVG in “${r.label}”: ${e}`}}}return null}function T(e){let t=e.trim(),n=t.split(/\s+/).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)).join(String.raw`\s+`);return`${/^\w/.test(t)?String.raw`\b`:``}${n}${/\w$/.test(t)?String.raw`\b`:``}`}function E({rule:t,index:r,count:i,onChange:a,onMove:o,onDuplicate:s,onDelete:c}){let[l,u]=(0,h.useState)(t.types.join(`, `)),[d,f]=(0,h.useState)(t.patterns.join(`
4
+ `)),[m,y]=(0,h.useState)(t.customSvg??``),[x,C]=(0,h.useState)(``),w=t.customSvg===void 0?null:n(m),E=d.split(`
5
+ `).map(e=>e.trim()).filter(Boolean).map(t=>({pattern:t,error:e(t)})).filter(e=>e.error!==null),D=()=>{if(!x.trim())return;let e=T(x),n=[...t.patterns,e];f(n.join(`
6
+ `)),C(``),a({patterns:n})};return(0,g.jsxs)(`div`,{style:{display:`flex`,minHeight:0,height:`100%`,flexDirection:`column`},children:[(0,g.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10,padding:`14px 16px`,borderBottom:`1px solid #313244`},children:[(0,g.jsx)(S,{icon:t.icon,customSvg:t.customSvg,size:17,muted:!t.enabled}),(0,g.jsxs)(`div`,{style:{minWidth:0,flex:1},children:[(0,g.jsx)(`div`,{style:{color:`#cdd6f4`,fontSize:14,fontWeight:750,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:t.label||`Untitled rule`}),(0,g.jsxs)(`div`,{style:{marginTop:2,color:`#6c7086`,fontSize:10},children:[`Rule `,r+1,` of `,i,` · evaluated top to bottom`]})]}),(0,g.jsxs)(`label`,{style:{display:`flex`,alignItems:`center`,gap:6,color:t.enabled?`#a6e3a1`:`#7f849c`,fontSize:11,cursor:`pointer`},children:[(0,g.jsx)(`input`,{type:`checkbox`,checked:t.enabled,onChange:e=>a({enabled:e.target.checked}),style:{accentColor:`#a6e3a1`}}),`Enabled`]})]}),(0,g.jsxs)(`div`,{style:{flex:1,minHeight:0,overflowY:`auto`,padding:16},children:[(0,g.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`minmax(0, 1fr) minmax(0, 1fr)`,gap:14},children:[(0,g.jsxs)(`label`,{style:{display:`flex`,flexDirection:`column`,gap:6,color:`#bac2de`,fontSize:11,fontWeight:700},children:[`Rule name`,(0,g.jsx)(`input`,{value:t.label,maxLength:100,onChange:e=>a({label:e.target.value}),style:{..._,height:34,padding:`0 9px`}})]}),(0,g.jsxs)(`label`,{style:{display:`flex`,flexDirection:`column`,gap:6,color:`#bac2de`,fontSize:11,fontWeight:700},children:[`Conventional Commit types`,(0,g.jsx)(`input`,{value:l,onChange:e=>{let t=e.target.value;u(t),a({types:t.split(`,`).map(e=>e.trim()).filter(Boolean)})},placeholder:`feat, feature`,spellCheck:!1,style:{..._,height:34,padding:`0 9px`,fontFamily:`ui-monospace, SFMono-Regular, monospace`}})]})]}),(0,g.jsxs)(`div`,{style:{marginTop:16},children:[(0,g.jsx)(`div`,{style:{marginBottom:7,color:`#bac2de`,fontSize:11,fontWeight:700},children:`Icon`}),(0,g.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(auto-fill, minmax(38px, 1fr))`,gap:5},children:p.map(e=>{let n=t.customSvg===void 0&&t.icon===e;return(0,g.jsx)(`button`,{type:`button`,title:e,"aria-label":`Use ${e} icon`,"aria-pressed":n,onClick:()=>a({icon:e,customSvg:void 0}),style:{height:38,display:`grid`,placeItems:`center`,padding:0,border:`1px solid ${n?`#89b4fa`:`#313244`}`,borderRadius:6,background:n?`#89b4fa18`:`#181825`,cursor:`pointer`},children:(0,g.jsx)(S,{icon:e,size:14,muted:!n})},e)})}),(0,g.jsxs)(`button`,{type:`button`,"aria-pressed":t.customSvg!==void 0,onClick:()=>{let e=m||b;y(e),a({customSvg:e})},style:{width:`100%`,height:38,marginTop:6,display:`flex`,alignItems:`center`,justifyContent:`center`,gap:7,border:`1px solid ${t.customSvg===void 0?`#313244`:`#89b4fa`}`,borderRadius:6,background:t.customSvg===void 0?`#181825`:`#89b4fa18`,color:t.customSvg===void 0?`#9399b2`:`#89b4fa`,fontFamily:`inherit`,fontSize:11,fontWeight:700,cursor:`pointer`},children:[(0,g.jsx)(S,{icon:t.icon,customSvg:t.customSvg??b,size:13,muted:t.customSvg===void 0}),`Custom SVG`]}),t.customSvg!==void 0&&(0,g.jsxs)(`label`,{style:{display:`flex`,flexDirection:`column`,gap:6,marginTop:9,color:`#bac2de`,fontSize:11,fontWeight:700},children:[`Raw SVG`,(0,g.jsx)(`textarea`,{value:m,onChange:e=>{let t=e.target.value;y(t),a({customSvg:t})},rows:5,placeholder:`<svg viewBox="0 0 24 24">…</svg>`,spellCheck:!1,style:{..._,minHeight:112,resize:`vertical`,padding:`8px 9px`,lineHeight:1.45,fontFamily:`ui-monospace, SFMono-Regular, monospace`,borderColor:w?`#f38ba888`:`#45475a`}}),(0,g.jsx)(`span`,{style:{color:w?`#f38ba8`:`#6c7086`,fontSize:10,fontWeight:500,lineHeight:1.4},children:w??`Scripts, events, external references, and unsupported elements are blocked. Paint inherits the branch color.`})]})]}),(0,g.jsxs)(`div`,{style:{marginTop:16},children:[(0,g.jsx)(`div`,{style:{marginBottom:6,color:`#bac2de`,fontSize:11,fontWeight:700},children:`Quick-add a keyword or phrase`}),(0,g.jsxs)(`div`,{style:{display:`flex`,gap:7},children:[(0,g.jsx)(`input`,{value:x,onChange:e=>C(e.target.value),onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),D())},placeholder:`e.g. upgrade dependency`,style:{..._,height:32,flex:1,padding:`0 9px`}}),(0,g.jsx)(`button`,{type:`button`,onClick:D,disabled:!x.trim(),style:{...v,height:32,opacity:x.trim()?1:.45},children:`Add keyword`})]})]}),(0,g.jsxs)(`label`,{style:{display:`flex`,flexDirection:`column`,gap:6,marginTop:13,color:`#bac2de`,fontSize:11,fontWeight:700},children:[`Message patterns `,(0,g.jsx)(`span`,{style:{color:`#6c7086`,fontWeight:500},children:`(advanced)`}),(0,g.jsx)(`textarea`,{value:d,onChange:e=>{let t=e.target.value;f(t),a({patterns:t.split(`
7
+ `).map(e=>e.trim()).filter(Boolean)})},rows:5,placeholder:String.raw`\bkeyword\b`,spellCheck:!1,style:{..._,minHeight:108,resize:`vertical`,padding:`8px 9px`,lineHeight:1.5,fontFamily:`ui-monospace, SFMono-Regular, monospace`}})]}),(0,g.jsx)(`div`,{style:{marginTop:6,color:`#6c7086`,fontSize:10,lineHeight:1.45},children:`One case-insensitive regular expression per line. The keyword helper adds safe word boundaries automatically. Conventional Commit types are matched before message patterns.`}),E.map(({pattern:e,error:t})=>(0,g.jsxs)(`div`,{style:{marginTop:6,color:`#f38ba8`,fontSize:10},children:[(0,g.jsx)(`code`,{children:e}),`: `,t]},`${e}:${t}`))]}),(0,g.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6,padding:`10px 16px`,borderTop:`1px solid #313244`,background:`#181825`},children:[(0,g.jsx)(`button`,{type:`button`,onClick:()=>o(-1),disabled:r===0,title:`Move rule up`,style:{...v,opacity:r===0?.4:1},children:`↑ Up`}),(0,g.jsx)(`button`,{type:`button`,onClick:()=>o(1),disabled:r===i-1,title:`Move rule down`,style:{...v,opacity:r===i-1?.4:1},children:`↓ Down`}),(0,g.jsx)(`button`,{type:`button`,onClick:s,style:v,children:`Duplicate`}),(0,g.jsx)(`button`,{type:`button`,onClick:c,style:{...v,marginLeft:`auto`,borderColor:`#f38ba866`,color:`#f38ba8`},children:`Delete`})]})]})}function D({onClose:e,onDirtyChange:n}){let r=m(),[i,s]=(0,h.useState)(()=>a(r)),[c,u]=(0,h.useState)(()=>r[0]?.id??null),[p,b]=(0,h.useState)(`feat: add commit icon settings`),[T,D]=(0,h.useState)(null),O=i.findIndex(e=>e.id===c),k=O>=0?i[O]??null:null,A=(0,h.useMemo)(()=>l(p,i),[p,i]),j=i.filter(e=>e.enabled).length,M=(0,h.useMemo)(()=>o(C(i))!==o(r),[r,i]);(0,h.useEffect)(()=>(n(M),()=>n(!1)),[M,n]);let N=e=>{c&&(D(null),s(t=>t.map(t=>t.id===c?{...t,...e}:t)))},P=()=>{let e={id:x(i),icon:`feature`,label:`New rule`,enabled:!0,types:[],patterns:[String.raw`\bkeyword\b`]};s(t=>[...t,e]),u(e.id),D(null)},F=e=>{if(O<0)return;let t=O+e;t<0||t>=i.length||(s(e=>{let n=[...e],[r]=n.splice(O,1);return r&&n.splice(t,0,r),n}),D(null))},I=()=>{if(!k)return;let e={...k,id:x(i),label:`${k.label} copy`,types:[...k.types],patterns:[...k.patterns]};s(t=>{let n=[...t];return n.splice(O+1,0,e),n}),u(e.id),D(null)},L=()=>{if(O<0)return;let e=i.filter((e,t)=>t!==O);s(e),u(e[Math.min(O,e.length-1)]?.id??null),D(null)},R=()=>{let e=a(d);s(e),u(e[0]?.id??null),D(null)},z=()=>{let n=C(i),r=w(n);if(r){u(r.id),D(r.message);return}if(!(o(n)===o(d)?f():t(n))){D(`Could not save commit icon settings to local storage.`);return}e()};return(0,g.jsxs)(`div`,{style:{display:`flex`,minWidth:0,minHeight:0,height:`100%`,flexDirection:`column`},children:[(0,g.jsxs)(`div`,{style:{padding:`15px 18px 13px`,borderBottom:`1px solid #313244`},children:[(0,g.jsx)(`h2`,{style:{margin:0,color:`#f5e0dc`,fontSize:16},children:`Commit icons`}),(0,g.jsx)(`p`,{style:{margin:`5px 0 0`,color:`#7f849c`,fontSize:11,lineHeight:1.45},children:`Choose how commit messages map to graph-node icons. Rule order matters; the first enabled match wins.`})]}),(0,g.jsxs)(`div`,{style:{padding:`10px 14px`,display:`flex`,alignItems:`center`,gap:9,borderBottom:`1px solid #313244`,background:`#181825`},children:[(0,g.jsx)(`span`,{style:{color:`#7f849c`,fontSize:10,fontWeight:700,textTransform:`uppercase`,letterSpacing:`0.06em`},children:`Test`}),(0,g.jsx)(`input`,{value:p,onChange:e=>b(e.target.value),"aria-label":`Test commit message`,placeholder:`Enter a commit message…`,style:{..._,minWidth:120,height:32,flex:1,padding:`0 9px`}}),(0,g.jsx)(`div`,{style:{width:145,display:`flex`,alignItems:`center`,gap:7,color:A?`#cdd6f4`:`#6c7086`,fontSize:11},children:A?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(S,{icon:A.icon,customSvg:A.customSvg,size:14}),(0,g.jsx)(`span`,{style:{overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:A.label})]}):`No matching icon`})]}),(0,g.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`250px minmax(0, 1fr)`,flex:1,minHeight:0},children:[(0,g.jsxs)(`div`,{style:{display:`flex`,minHeight:0,flexDirection:`column`,borderRight:`1px solid #313244`,background:`#181825`},children:[(0,g.jsxs)(`div`,{style:{height:42,padding:`0 10px 0 12px`,display:`flex`,alignItems:`center`,color:`#7f849c`,fontSize:10},children:[j,` enabled · `,i.length,` total`,(0,g.jsx)(`button`,{type:`button`,onClick:P,style:{...v,height:26,marginLeft:`auto`,padding:`0 8px`},children:`+ Add`})]}),(0,g.jsxs)(`div`,{style:{flex:1,minHeight:0,overflowY:`auto`,padding:`0 6px 8px`},children:[i.map((e,t)=>{let n=e.id===c;return(0,g.jsxs)(`button`,{type:`button`,onClick:()=>u(e.id),style:{width:`100%`,display:`flex`,alignItems:`center`,gap:8,minHeight:42,padding:`5px 8px`,border:`1px solid ${n?`#89b4fa55`:`transparent`}`,borderRadius:6,background:n?`#89b4fa16`:`transparent`,color:e.enabled?`#cdd6f4`:`#6c7086`,fontFamily:`inherit`,textAlign:`left`,cursor:`pointer`,opacity:e.enabled?1:.68},children:[(0,g.jsx)(`span`,{style:{width:18,flexShrink:0,color:`#585b70`,fontSize:9,textAlign:`right`},children:t+1}),(0,g.jsx)(S,{icon:e.icon,customSvg:e.customSvg,size:13,muted:!e.enabled}),(0,g.jsxs)(`span`,{style:{minWidth:0,flex:1},children:[(0,g.jsx)(`span`,{style:{display:`block`,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,fontSize:11,fontWeight:650},children:e.label||`Untitled rule`}),(0,g.jsx)(`span`,{style:{display:`block`,marginTop:2,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,color:`#6c7086`,fontSize:9},children:e.types.length>0?e.types.join(`, `):`${e.patterns.length} pattern${e.patterns.length===1?``:`s`}`})]})]},e.id)}),i.length===0&&(0,g.jsx)(`div`,{style:{padding:`26px 14px`,color:`#6c7086`,fontSize:11,lineHeight:1.5,textAlign:`center`},children:`No rules. Add one, or restore the defaults.`})]})]}),(0,g.jsx)(`div`,{style:{minWidth:0,minHeight:0},children:k?(0,g.jsx)(E,{rule:k,index:O,count:i.length,onChange:N,onMove:F,onDuplicate:I,onDelete:L},k.id):(0,g.jsx)(`div`,{style:{height:`100%`,display:`grid`,placeItems:`center`,color:`#6c7086`,fontSize:12},children:`Select or add a rule to edit it.`})})]}),(0,g.jsxs)(`div`,{style:{minHeight:52,padding:`10px 14px`,display:`flex`,alignItems:`center`,gap:8,borderTop:`1px solid #313244`,background:`#11111b`},children:[(0,g.jsx)(`button`,{type:`button`,onClick:R,style:v,children:`Restore defaults`}),(0,g.jsx)(`span`,{style:{color:T?`#f38ba8`:`#585b70`,fontSize:10,marginLeft:4},children:T??`Custom settings are stored in this browser.`}),(0,g.jsx)(`button`,{type:`button`,onClick:e,style:{...v,marginLeft:`auto`},children:`Cancel`}),(0,g.jsx)(`button`,{type:`button`,onClick:z,style:y,children:`Save settings`})]})]})}function O({onClose:e}){let t=r(e=>e.showGutterColors),n=r(e=>e.setShowGutterColors);return(0,g.jsxs)(`div`,{style:{display:`flex`,minWidth:0,minHeight:0,height:`100%`,flexDirection:`column`},children:[(0,g.jsxs)(`div`,{style:{padding:`15px 18px 13px`,borderBottom:`1px solid #313244`},children:[(0,g.jsx)(`h2`,{style:{margin:0,color:`#f5e0dc`,fontSize:16},children:`Graph appearance`}),(0,g.jsx)(`p`,{style:{margin:`5px 0 0`,color:`#7f849c`,fontSize:11,lineHeight:1.45},children:`Control visual aids used across repository graphs.`})]}),(0,g.jsx)(`div`,{style:{flex:1,padding:18},children:(0,g.jsxs)(`label`,{title:`Give each graph gutter a distinct background color`,style:{display:`flex`,alignItems:`flex-start`,gap:10,maxWidth:560,padding:14,border:`1px solid ${t?`#89b4fa55`:`#313244`}`,borderRadius:7,background:t?`#89b4fa10`:`#181825`,color:`#cdd6f4`,cursor:`pointer`},children:[(0,g.jsx)(`input`,{type:`checkbox`,checked:t,onChange:e=>n(e.target.checked),style:{margin:`2px 0 0`,accentColor:`#89b4fa`,cursor:`pointer`}}),(0,g.jsxs)(`span`,{children:[(0,g.jsx)(`span`,{style:{display:`block`,fontSize:12,fontWeight:750},children:`Color-code gutters`}),(0,g.jsx)(`span`,{style:{display:`block`,marginTop:4,color:`#7f849c`,fontSize:10,lineHeight:1.45},children:`Tint each branch lane with its stable branch color to make parallel histories easier to follow.`})]})]})}),(0,g.jsxs)(`div`,{style:{minHeight:52,padding:`10px 14px`,display:`flex`,alignItems:`center`,borderTop:`1px solid #313244`,background:`#11111b`},children:[(0,g.jsx)(`span`,{style:{color:`#585b70`,fontSize:10},children:`Appearance settings are saved automatically.`}),(0,g.jsx)(`button`,{type:`button`,onClick:e,style:{...y,marginLeft:`auto`},children:`Done`})]})]})}function k(e){return{width:`100%`,padding:`8px 9px`,border:`1px solid ${e?`#89b4fa44`:`transparent`}`,borderRadius:6,background:e?`#89b4fa16`:`transparent`,color:e?`#89b4fa`:`#a6adc8`,fontFamily:`inherit`,fontSize:11,fontWeight:700,textAlign:`left`,cursor:`pointer`}}function A({open:e,onClose:t}){let n=(0,h.useRef)(null),r=(0,h.useRef)(null),[i,a]=(0,h.useState)(`appearance`),[o,s]=(0,h.useState)(!1),c=()=>{o&&!window.confirm(`Discard unsaved commit icon changes?`)||t()};return(0,h.useEffect)(()=>{let t=n.current;t&&(e?(t.open||t.showModal(),requestAnimationFrame(()=>r.current?.focus())):t.open&&t.close())},[e]),(0,g.jsxs)(`dialog`,{ref:n,className:`ingit-settings-dialog`,"aria-labelledby":`settings-dialog-title`,onCancel:e=>{e.preventDefault(),c()},onClose:c,onClick:e=>{e.target===e.currentTarget&&c()},style:{position:`fixed`,inset:0,width:`min(980px, calc(100vw - 32px))`,height:`min(720px, calc(100vh - 32px))`,margin:`auto`,padding:0,overflow:`hidden`,border:`1px solid #45475a`,borderRadius:9,background:`#1e1e2e`,color:`#cdd6f4`,boxShadow:`0 24px 80px rgba(0,0,0,0.65)`,fontFamily:`system-ui, -apple-system, sans-serif`},children:[(0,g.jsx)(`style`,{children:`.ingit-settings-dialog::backdrop { background: rgba(10, 10, 18, 0.72); backdrop-filter: blur(2px); }`}),(0,g.jsxs)(`div`,{onClick:e=>e.stopPropagation(),style:{display:`grid`,gridTemplateColumns:`170px minmax(0, 1fr)`,height:`100%`},children:[(0,g.jsxs)(`aside`,{style:{display:`flex`,flexDirection:`column`,background:`#181825`,borderRight:`1px solid #313244`},children:[(0,g.jsxs)(`div`,{style:{height:58,padding:`0 14px`,display:`flex`,alignItems:`center`,borderBottom:`1px solid #313244`},children:[(0,g.jsx)(`h1`,{id:`settings-dialog-title`,style:{margin:0,color:`#f5e0dc`,fontSize:16},children:`Settings`}),(0,g.jsx)(`button`,{ref:r,type:`button`,onClick:c,"aria-label":`Close settings`,title:`Close settings`,style:{marginLeft:`auto`,padding:3,border:`none`,background:`transparent`,color:`#7f849c`,fontSize:15,cursor:`pointer`},children:`✕`})]}),(0,g.jsxs)(`div`,{style:{padding:`12px 8px`},children:[(0,g.jsx)(`div`,{style:{padding:`0 8px 6px`,color:`#585b70`,fontSize:9,fontWeight:800,letterSpacing:`0.1em`,textTransform:`uppercase`},children:`Graph`}),(0,g.jsx)(`button`,{type:`button`,onClick:()=>a(`appearance`),"aria-current":i===`appearance`?`page`:void 0,style:k(i===`appearance`),children:`Appearance`}),(0,g.jsxs)(`button`,{type:`button`,onClick:()=>a(`commit-icons`),"aria-current":i===`commit-icons`?`page`:void 0,style:{...k(i===`commit-icons`),marginTop:3},children:[`Commit icons`,o?` •`:``]})]}),(0,g.jsx)(`div`,{style:{marginTop:`auto`,padding:12,borderTop:`1px solid #313244`,color:`#45475a`,fontSize:9,lineHeight:1.45},children:`Settings apply across repositories on this device.`})]}),(0,g.jsx)(`main`,{style:{minWidth:0,minHeight:0},children:e&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(`div`,{style:{display:i===`appearance`?`block`:`none`,height:`100%`},children:(0,g.jsx)(O,{onClose:c})}),(0,g.jsx)(`div`,{style:{display:i===`commit-icons`?`block`:`none`,height:`100%`},children:(0,g.jsx)(D,{onClose:t,onDirtyChange:s})})]})})]})]})}export{A as SettingsDialog};