@ingit/cli-darwin-arm64 0.6.3 → 0.6.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/client/index.html CHANGED
@@ -10,7 +10,7 @@
10
10
  <link rel="manifest" href="/site.webmanifest" />
11
11
  <title>ingit</title>
12
12
  <style>*{box-sizing:border-box;margin:0;padding:0}html,body,#root{width:100%;height:100%;overflow:hidden}body{color:#cdd6f4;background:#1e1e2e;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-track{background:0 0}::-webkit-scrollbar-thumb{background:#45475a;border-radius:4px}::-webkit-scrollbar-thumb:hover{background:#585b70}::-webkit-scrollbar-corner{background:0 0}</style>
13
- <script type="module" crossorigin src="/assets/index-B24T_6wL.js"></script>
13
+ <script type="module" crossorigin src="/assets/index-CfmvOaXi.js"></script>
14
14
  <link rel="stylesheet" crossorigin href="/assets/index-DefWf8x_.css">
15
15
  </head>
16
16
  <body>
package/ingit CHANGED
@@ -1,4 +1,4 @@
1
1
  [diffend] Oversized file quarantined before diffing.
2
2
  name: package/ingit
3
3
  size: 64554482 bytes
4
- sha256: f41629ec610f552810331e08e524fa58092cf9d524b1a2dd7f36c2829bb57387
4
+ sha256: ee8eb8eb929ffe928a1a9b99178bebed1c0f2312aa99bbe4fd3bf7ebfad20856
package/libziggit.dylib CHANGED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ingit/cli-darwin-arm64",
3
- "version": "0.6.3",
3
+ "version": "0.6.4",
4
4
  "description": "ingit prebuilt binary for darwin-arm64",
5
5
  "os": [
6
6
  "darwin"
@@ -1,7 +0,0 @@
1
- import{C as e,S as t,_ as n,a as r,b as i,c as a,d as o,f as s,g as c,h as l,i as u,l as d,m as f,n as p,o as m,p as h,r as g,s as _,t as v,u as y,v as b,w as x,x as S,y as C}from"./index-B24T_6wL.js";var w=x(t(),1),T=e();function E(){let[e,t]=(0,w.useState)(null),[n,r]=(0,w.useState)(!1),[a,o]=(0,w.useState)(null);(0,w.useEffect)(()=>{let e=!0;return i().then(n=>{e&&t(n.autoUpdate)}).catch(t=>{e&&o(t instanceof Error?t.message:`Could not load update settings`)}),()=>{e=!1}},[]);let s=async e=>{r(!0),o(null);try{let n=await S(e);t(n.autoUpdate)}catch(e){o(e instanceof Error?e.message:`Could not save update settings`)}finally{r(!1)}};return(0,T.jsxs)(`div`,{style:{padding:18},children:[(0,T.jsx)(`h2`,{style:{margin:`0 0 16px`,fontSize:16},children:`Updates`}),(0,T.jsxs)(`label`,{style:{display:`flex`,gap:10,alignItems:`center`,cursor:`pointer`},children:[(0,T.jsx)(`input`,{type:`checkbox`,checked:e??!1,disabled:e===null||n,onChange:e=>{s(e.target.checked)},style:{accentColor:`#89b4fa`}}),`Install updates automatically`]}),(0,T.jsx)(`p`,{style:{color:`#7f849c`,fontSize:12,lineHeight:1.6,maxWidth:540},children:`When ingit starts, check npm for a newer version and install it using the package manager that owns your global installation (npm, pnpm, Yarn Classic, or Bun).`}),(0,T.jsx)(`p`,{style:{color:`#7f849c`,fontSize:12},children:`Turn this off to manage updates yourself. Changes are saved automatically on this machine and take effect the next time you start ingit.`}),(0,T.jsx)(`div`,{role:`status`,style:{color:`#a6adc8`,fontSize:12},children:n?`Saving…`:e===null&&!a?`Loading…`:``}),a&&(0,T.jsx)(`p`,{role:`alert`,style:{color:`#f38ba8`,fontSize:12},children:a})]})}var D={width:`100%`,border:`1px solid #45475a`,borderRadius:6,background:`#11111b`,color:`#cdd6f4`,fontFamily:`inherit`,fontSize:12,outline:`none`},O={height:30,padding:`0 11px`,border:`1px solid #45475a`,borderRadius:6,background:`#181825`,color:`#bac2de`,fontFamily:`inherit`,fontSize:11,fontWeight:700,cursor:`pointer`},k={...O,border:`1px solid #6d9658`,background:`#8dcf78`,color:`#0b1020`,fontWeight:800},A=`<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 j(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 M(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 N({icon:e,customSvg:t,size:n=18,muted:r=!1}){let i=n+10;return(0,T.jsxs)(`svg`,{"aria-hidden":`true`,width:i,height:i,viewBox:`-12 -12 24 24`,style:{display:`block`,flex:`0 0 auto`},children:[(0,T.jsx)(`circle`,{r:`10`,fill:`#11111b`,stroke:r?`#45475a`:`#89b4fa`,strokeWidth:`1.5`}),(0,T.jsx)(d,{icon:e,customSvg:t,color:r?`#6c7086`:`#89b4fa`,size:n})]})}function P(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 F(e){for(let t of e){if(!t.label.trim())return{id:t.id,message:`Every rule needs a name.`};if(t.enabled&&t.types.length===0&&t.patterns.length===0)return{id:t.id,message:`“${t.label}” needs at least one commit type or message pattern.`};for(let e of t.patterns){let n=s(e);if(n)return{id:t.id,message:`Invalid pattern in “${t.label}”: ${n}`}}if(t.customSvg!==void 0){let e=b(t.customSvg);if(e)return{id:t.id,message:`Invalid custom SVG in “${t.label}”: ${e}`}}}return null}function I(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 L({rule:e,index:t,count:n,onChange:r,onMove:i,onDuplicate:o,onDelete:c}){let[l,u]=(0,w.useState)(e.types.join(`, `)),[d,f]=(0,w.useState)(e.patterns.join(`
4
- `)),[p,m]=(0,w.useState)(e.customSvg??``),[h,g]=(0,w.useState)(``),_=e.customSvg===void 0?null:b(p),v=d.split(`
5
- `).map(e=>e.trim()).filter(Boolean).map(e=>({pattern:e,error:s(e)})).filter(e=>e.error!==null),y=()=>{if(!h.trim())return;let t=I(h),n=[...e.patterns,t];f(n.join(`
6
- `)),g(``),r({patterns:n})};return(0,T.jsxs)(`div`,{style:{display:`flex`,minHeight:0,height:`100%`,flexDirection:`column`},children:[(0,T.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10,padding:`14px 16px`,borderBottom:`1px solid #313244`},children:[(0,T.jsx)(N,{icon:e.icon,customSvg:e.customSvg,size:17,muted:!e.enabled}),(0,T.jsxs)(`div`,{style:{minWidth:0,flex:1},children:[(0,T.jsx)(`div`,{style:{color:`#cdd6f4`,fontSize:14,fontWeight:750,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:e.label||`Untitled rule`}),(0,T.jsxs)(`div`,{style:{marginTop:2,color:`#6c7086`,fontSize:10},children:[`Rule `,t+1,` of `,n,` · evaluated top to bottom`]})]}),(0,T.jsxs)(`label`,{style:{display:`flex`,alignItems:`center`,gap:6,color:e.enabled?`#a6e3a1`:`#7f849c`,fontSize:11,cursor:`pointer`},children:[(0,T.jsx)(`input`,{type:`checkbox`,checked:e.enabled,onChange:e=>r({enabled:e.target.checked}),style:{accentColor:`#a6e3a1`}}),`Enabled`]})]}),(0,T.jsxs)(`div`,{style:{flex:1,minHeight:0,overflowY:`auto`,padding:16},children:[(0,T.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`minmax(0, 1fr) minmax(0, 1fr)`,gap:14},children:[(0,T.jsxs)(`label`,{style:{display:`flex`,flexDirection:`column`,gap:6,color:`#bac2de`,fontSize:11,fontWeight:700},children:[`Rule name`,(0,T.jsx)(`input`,{value:e.label,maxLength:100,onChange:e=>r({label:e.target.value}),style:{...D,height:34,padding:`0 9px`}})]}),(0,T.jsxs)(`label`,{style:{display:`flex`,flexDirection:`column`,gap:6,color:`#bac2de`,fontSize:11,fontWeight:700},children:[`Conventional Commit types`,(0,T.jsx)(`input`,{value:l,onChange:e=>{let t=e.target.value;u(t),r({types:t.split(`,`).map(e=>e.trim()).filter(Boolean)})},placeholder:`feat, feature`,spellCheck:!1,style:{...D,height:34,padding:`0 9px`,fontFamily:`ui-monospace, SFMono-Regular, monospace`}})]})]}),(0,T.jsxs)(`div`,{style:{marginTop:16},children:[(0,T.jsx)(`div`,{style:{marginBottom:7,color:`#bac2de`,fontSize:11,fontWeight:700},children:`Icon`}),(0,T.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(auto-fill, minmax(38px, 1fr))`,gap:5},children:a.map(t=>{let n=e.customSvg===void 0&&e.icon===t;return(0,T.jsx)(`button`,{type:`button`,title:t,"aria-label":`Use ${t} icon`,"aria-pressed":n,onClick:()=>r({icon:t,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,T.jsx)(N,{icon:t,size:14,muted:!n})},t)})}),(0,T.jsxs)(`button`,{type:`button`,"aria-pressed":e.customSvg!==void 0,onClick:()=>{let e=p||A;m(e),r({customSvg:e})},style:{width:`100%`,height:38,marginTop:6,display:`flex`,alignItems:`center`,justifyContent:`center`,gap:7,border:`1px solid ${e.customSvg===void 0?`#313244`:`#89b4fa`}`,borderRadius:6,background:e.customSvg===void 0?`#181825`:`#89b4fa18`,color:e.customSvg===void 0?`#9399b2`:`#89b4fa`,fontFamily:`inherit`,fontSize:11,fontWeight:700,cursor:`pointer`},children:[(0,T.jsx)(N,{icon:e.icon,customSvg:e.customSvg??A,size:13,muted:e.customSvg===void 0}),`Custom SVG`]}),e.customSvg!==void 0&&(0,T.jsxs)(`label`,{style:{display:`flex`,flexDirection:`column`,gap:6,marginTop:9,color:`#bac2de`,fontSize:11,fontWeight:700},children:[`Raw SVG`,(0,T.jsx)(`textarea`,{value:p,onChange:e=>{let t=e.target.value;m(t),r({customSvg:t})},rows:5,placeholder:`<svg viewBox="0 0 24 24">…</svg>`,spellCheck:!1,style:{...D,minHeight:112,resize:`vertical`,padding:`8px 9px`,lineHeight:1.45,fontFamily:`ui-monospace, SFMono-Regular, monospace`,borderColor:_?`#f38ba888`:`#45475a`}}),(0,T.jsx)(`span`,{style:{color:_?`#f38ba8`:`#6c7086`,fontSize:10,fontWeight:500,lineHeight:1.4},children:_??`Scripts, events, external references, and unsupported elements are blocked. Paint inherits the branch color.`})]})]}),(0,T.jsxs)(`div`,{style:{marginTop:16},children:[(0,T.jsx)(`div`,{style:{marginBottom:6,color:`#bac2de`,fontSize:11,fontWeight:700},children:`Quick-add a keyword or phrase`}),(0,T.jsxs)(`div`,{style:{display:`flex`,gap:7},children:[(0,T.jsx)(`input`,{value:h,onChange:e=>g(e.target.value),onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),y())},placeholder:`e.g. upgrade dependency`,style:{...D,height:32,flex:1,padding:`0 9px`}}),(0,T.jsx)(`button`,{type:`button`,onClick:y,disabled:!h.trim(),style:{...O,height:32,opacity:h.trim()?1:.45},children:`Add keyword`})]})]}),(0,T.jsxs)(`label`,{style:{display:`flex`,flexDirection:`column`,gap:6,marginTop:13,color:`#bac2de`,fontSize:11,fontWeight:700},children:[`Message patterns `,(0,T.jsx)(`span`,{style:{color:`#6c7086`,fontWeight:500},children:`(advanced)`}),(0,T.jsx)(`textarea`,{value:d,onChange:e=>{let t=e.target.value;f(t),r({patterns:t.split(`
7
- `).map(e=>e.trim()).filter(Boolean)})},rows:5,placeholder:String.raw`\bkeyword\b`,spellCheck:!1,style:{...D,minHeight:108,resize:`vertical`,padding:`8px 9px`,lineHeight:1.5,fontFamily:`ui-monospace, SFMono-Regular, monospace`}})]}),(0,T.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.`}),v.map(({pattern:e,error:t})=>(0,T.jsxs)(`div`,{style:{marginTop:6,color:`#f38ba8`,fontSize:10},children:[(0,T.jsx)(`code`,{children:e}),`: `,t]},`${e}:${t}`))]}),(0,T.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6,padding:`10px 16px`,borderTop:`1px solid #313244`,background:`#181825`},children:[(0,T.jsx)(`button`,{type:`button`,onClick:()=>i(-1),disabled:t===0,title:`Move rule up`,style:{...O,opacity:t===0?.4:1},children:`↑ Up`}),(0,T.jsx)(`button`,{type:`button`,onClick:()=>i(1),disabled:t===n-1,title:`Move rule down`,style:{...O,opacity:t===n-1?.4:1},children:`↓ Down`}),(0,T.jsx)(`button`,{type:`button`,onClick:o,style:O,children:`Duplicate`}),(0,T.jsx)(`button`,{type:`button`,onClick:c,style:{...O,marginLeft:`auto`,borderColor:`#f38ba866`,color:`#f38ba8`},children:`Delete`})]})]})}function R({onClose:e,onDirtyChange:t}){let r=n(),[i,a]=(0,w.useState)(()=>o(r)),[s,u]=(0,w.useState)(()=>r[0]?.id??null),[d,p]=(0,w.useState)(`feat: add commit icon settings`),[m,g]=(0,w.useState)(null),_=i.findIndex(e=>e.id===s),v=_>=0?i[_]??null:null,b=(0,w.useMemo)(()=>h(d,i),[d,i]),x=i.filter(e=>e.enabled).length,S=(0,w.useMemo)(()=>c(P(i))!==c(r),[r,i]);(0,w.useEffect)(()=>(t(S),()=>t(!1)),[S,t]);let C=e=>{s&&(g(null),a(t=>t.map(t=>t.id===s?{...t,...e}:t)))},E=()=>{let e={id:j(i),icon:`feature`,label:`New rule`,enabled:!0,types:[],patterns:[String.raw`\bkeyword\b`]};a(t=>[...t,e]),u(e.id),g(null)},A=e=>{if(_<0)return;let t=_+e;t<0||t>=i.length||(a(e=>{let n=[...e],[r]=n.splice(_,1);return r&&n.splice(t,0,r),n}),g(null))},M=()=>{if(!v)return;let e={...v,id:j(i),label:`${v.label} copy`,types:[...v.types],patterns:[...v.patterns]};a(t=>{let n=[...t];return n.splice(_+1,0,e),n}),u(e.id),g(null)},I=()=>{if(_<0)return;let e=i.filter((e,t)=>t!==_);a(e),u(e[Math.min(_,e.length-1)]?.id??null),g(null)},R=()=>{let e=o(y);a(e),u(e[0]?.id??null),g(null)},z=()=>{let t=P(i),n=F(t);if(n){u(n.id),g(n.message);return}if(!(c(t)===c(y)?f():l(t))){g(`Could not save commit icon settings to local storage.`);return}e()};return(0,T.jsxs)(`div`,{style:{display:`flex`,minWidth:0,minHeight:0,height:`100%`,flexDirection:`column`},children:[(0,T.jsxs)(`div`,{style:{padding:`15px 18px 13px`,borderBottom:`1px solid #313244`},children:[(0,T.jsx)(`h2`,{style:{margin:0,color:`#f5e0dc`,fontSize:16},children:`Commit icons`}),(0,T.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,T.jsxs)(`div`,{style:{padding:`10px 14px`,display:`flex`,alignItems:`center`,gap:9,borderBottom:`1px solid #313244`,background:`#181825`},children:[(0,T.jsx)(`span`,{style:{color:`#7f849c`,fontSize:10,fontWeight:700,textTransform:`uppercase`,letterSpacing:`0.06em`},children:`Test`}),(0,T.jsx)(`input`,{value:d,onChange:e=>p(e.target.value),"aria-label":`Test commit message`,placeholder:`Enter a commit message…`,style:{...D,minWidth:120,height:32,flex:1,padding:`0 9px`}}),(0,T.jsx)(`div`,{style:{width:145,display:`flex`,alignItems:`center`,gap:7,color:b?`#cdd6f4`:`#6c7086`,fontSize:11},children:b?(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(N,{icon:b.icon,customSvg:b.customSvg,size:14}),(0,T.jsx)(`span`,{style:{overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:b.label})]}):`No matching icon`})]}),(0,T.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`250px minmax(0, 1fr)`,flex:1,minHeight:0},children:[(0,T.jsxs)(`div`,{style:{display:`flex`,minHeight:0,flexDirection:`column`,borderRight:`1px solid #313244`,background:`#181825`},children:[(0,T.jsxs)(`div`,{style:{height:42,padding:`0 10px 0 12px`,display:`flex`,alignItems:`center`,color:`#7f849c`,fontSize:10},children:[x,` enabled · `,i.length,` total`,(0,T.jsx)(`button`,{type:`button`,onClick:E,style:{...O,height:26,marginLeft:`auto`,padding:`0 8px`},children:`+ Add`})]}),(0,T.jsxs)(`div`,{style:{flex:1,minHeight:0,overflowY:`auto`,padding:`0 6px 8px`},children:[i.map((e,t)=>{let n=e.id===s;return(0,T.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,T.jsx)(`span`,{style:{width:18,flexShrink:0,color:`#585b70`,fontSize:9,textAlign:`right`},children:t+1}),(0,T.jsx)(N,{icon:e.icon,customSvg:e.customSvg,size:13,muted:!e.enabled}),(0,T.jsxs)(`span`,{style:{minWidth:0,flex:1},children:[(0,T.jsx)(`span`,{style:{display:`block`,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,fontSize:11,fontWeight:650},children:e.label||`Untitled rule`}),(0,T.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,T.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,T.jsx)(`div`,{style:{minWidth:0,minHeight:0},children:v?(0,T.jsx)(L,{rule:v,index:_,count:i.length,onChange:C,onMove:A,onDuplicate:M,onDelete:I},v.id):(0,T.jsx)(`div`,{style:{height:`100%`,display:`grid`,placeItems:`center`,color:`#6c7086`,fontSize:12},children:`Select or add a rule to edit it.`})})]}),(0,T.jsxs)(`div`,{style:{minHeight:52,padding:`10px 14px`,display:`flex`,alignItems:`center`,gap:8,borderTop:`1px solid #313244`,background:`#11111b`},children:[(0,T.jsx)(`button`,{type:`button`,onClick:R,style:O,children:`Restore defaults`}),(0,T.jsx)(`span`,{style:{color:m?`#f38ba8`:`#585b70`,fontSize:10,marginLeft:4},children:m??`Custom settings are stored in this browser.`}),(0,T.jsx)(`button`,{type:`button`,onClick:e,style:{...O,marginLeft:`auto`},children:`Cancel`}),(0,T.jsx)(`button`,{type:`button`,onClick:z,style:k,children:`Save settings`})]})]})}function z(e){return e.map(e=>({...e,fileName:e.fileName.trim(),command:e.command.trim()}))}function B(e){let t=new Set;for(let n of e){let e=n.fileName.trim(),r=n.command.trim();if(!e)return`Every resolver needs a file name.`;if(e===`.`||e===`..`||e.includes(`/`)||e.includes(`\\`))return`“${e}” must be a file name, not a path.`;if(t.has(e))return`“${e}” has more than one resolver.`;if(!r)return`“${e}” needs a command.`;if(!_(r))return`The command for “${e}” is empty or contains an unterminated quote.`;t.add(e)}return null}function V({onClose:e,onDirtyChange:t}){let n=m(),[i,a]=(0,w.useState)(()=>p(n)),[o,s]=(0,w.useState)(null),c=(0,w.useMemo)(()=>r(z(i))!==r(n),[n,i]);(0,w.useEffect)(()=>(t(c),()=>t(!1)),[c,t]);let l=(e,t)=>{s(null),a(n=>n.map(n=>n.id===e?{...n,...t}:n))},d=()=>{let e={id:M(i),fileName:``,command:``};a(t=>[...t,e]),s(null)},f=()=>{a(p(v)),s(null)},h=()=>{let t=z(i),n=B(t);if(n){s(n);return}if(!(r(t)===r(v)?g():u(t))){s(`Could not save conflict resolver settings to local storage.`);return}e()};return(0,T.jsxs)(`div`,{style:{display:`flex`,minWidth:0,minHeight:0,height:`100%`,flexDirection:`column`},children:[(0,T.jsxs)(`div`,{style:{padding:`15px 18px 13px`,borderBottom:`1px solid #313244`},children:[(0,T.jsx)(`h2`,{style:{margin:0,color:`#f5e0dc`,fontSize:16},children:`Lockfile conflict resolvers`}),(0,T.jsx)(`p`,{style:{margin:`5px 0 0`,color:`#7f849c`,fontSize:11,lineHeight:1.45},children:`Show “run install & resolve” for conflicted files with an exact matching name. The command runs from that file's directory.`})]}),(0,T.jsxs)(`div`,{style:{padding:`10px 14px`,display:`flex`,alignItems:`center`,gap:10,borderBottom:`1px solid #313244`,background:`#181825`},children:[(0,T.jsx)(`span`,{style:{color:`#7f849c`,fontSize:10},children:`Commands launch directly with your user permissions. Quotes are supported; no shell is added implicitly.`}),(0,T.jsx)(`button`,{type:`button`,onClick:d,style:{...O,height:28,marginLeft:`auto`,flexShrink:0},children:`+ Add resolver`})]}),(0,T.jsxs)(`div`,{style:{flex:1,minHeight:0,overflowY:`auto`,padding:14},children:[(0,T.jsxs)(`div`,{"aria-hidden":`true`,style:{display:`grid`,gridTemplateColumns:`minmax(170px, 0.7fr) minmax(280px, 1.3fr) 32px`,gap:8,padding:`0 8px 7px`,color:`#6c7086`,fontSize:9,fontWeight:800,letterSpacing:`0.08em`,textTransform:`uppercase`},children:[(0,T.jsx)(`span`,{children:`File name`}),(0,T.jsx)(`span`,{children:`Command`}),(0,T.jsx)(`span`,{})]}),(0,T.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:6},children:[i.map((e,t)=>(0,T.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`minmax(170px, 0.7fr) minmax(280px, 1.3fr) 32px`,alignItems:`center`,gap:8,padding:8,border:`1px solid #313244`,borderRadius:7,background:`#181825`},children:[(0,T.jsx)(`input`,{value:e.fileName,"aria-label":`Resolver ${t+1} file name`,placeholder:`example.lock`,spellCheck:!1,onChange:t=>l(e.id,{fileName:t.target.value}),style:{...D,height:32,padding:`0 9px`,fontFamily:`ui-monospace, SFMono-Regular, monospace`}}),(0,T.jsx)(`input`,{value:e.command,"aria-label":`Resolver ${t+1} command`,placeholder:`package-manager install`,spellCheck:!1,onChange:t=>l(e.id,{command:t.target.value}),style:{...D,height:32,padding:`0 9px`,fontFamily:`ui-monospace, SFMono-Regular, monospace`}}),(0,T.jsx)(`button`,{type:`button`,"aria-label":`Delete resolver for ${e.fileName||`row ${t+1}`}`,title:`Delete resolver`,onClick:()=>{a(t=>t.filter(t=>t.id!==e.id)),s(null)},style:{width:30,height:30,padding:0,border:`1px solid transparent`,borderRadius:6,background:`transparent`,color:`#f38ba8`,fontSize:15,cursor:`pointer`},children:`×`})]},e.id)),i.length===0&&(0,T.jsx)(`div`,{style:{padding:36,border:`1px dashed #313244`,borderRadius:7,color:`#6c7086`,fontSize:11,textAlign:`center`},children:`No resolvers configured. Conflicted files will use the normal “Mark resolved” action.`})]})]}),(0,T.jsxs)(`div`,{style:{minHeight:52,padding:`10px 14px`,display:`flex`,alignItems:`center`,gap:8,borderTop:`1px solid #313244`,background:`#11111b`},children:[(0,T.jsx)(`button`,{type:`button`,onClick:f,style:O,children:`Restore defaults`}),(0,T.jsx)(`span`,{style:{color:o?`#f38ba8`:`#585b70`,fontSize:10,marginLeft:4},children:o??`${i.length} resolver${i.length===1?``:`s`} · stored in this browser`}),(0,T.jsx)(`button`,{type:`button`,onClick:e,style:{...O,marginLeft:`auto`},children:`Cancel`}),(0,T.jsx)(`button`,{type:`button`,onClick:h,style:k,children:`Save settings`})]})]})}function H(){let e=C(e=>e.offerSshConversion),t=C(e=>e.setOfferSshConversion);return(0,T.jsxs)(`div`,{style:{padding:18},children:[(0,T.jsx)(`h2`,{style:{marginTop:0,fontSize:16},children:`Remotes`}),(0,T.jsxs)(`label`,{style:{display:`flex`,gap:10,alignItems:`center`,cursor:`pointer`},children:[(0,T.jsx)(`input`,{type:`checkbox`,checked:e,onChange:e=>t(e.target.checked)}),`Offer to convert HTTPS remotes to SSH`]}),(0,T.jsx)(`p`,{style:{color:`#7f849c`,fontSize:12},children:`Show a prompt when opening a repository whose default remote uses HTTPS. Changes are saved automatically.`})]})}function U({onClose:e}){let t=C(e=>e.showGutterColors),n=C(e=>e.setShowGutterColors),r=C(e=>e.normalizeAcrossWorktrees),i=C(e=>e.setNormalizeAcrossWorktrees);return(0,T.jsxs)(`div`,{style:{display:`flex`,minWidth:0,minHeight:0,height:`100%`,flexDirection:`column`},children:[(0,T.jsxs)(`div`,{style:{padding:`15px 18px 13px`,borderBottom:`1px solid #313244`},children:[(0,T.jsx)(`h2`,{style:{margin:0,color:`#f5e0dc`,fontSize:16},children:`Graph appearance`}),(0,T.jsx)(`p`,{style:{margin:`5px 0 0`,color:`#7f849c`,fontSize:11,lineHeight:1.45},children:`Control visual aids used across repository graphs.`})]}),(0,T.jsxs)(`div`,{style:{flex:1,padding:18},children:[(0,T.jsxs)(`label`,{title:`Keep linked worktrees on one shared commit graph`,style:{display:`flex`,alignItems:`flex-start`,gap:10,maxWidth:560,padding:14,marginBottom:10,border:`1px solid ${r?`#89b4fa55`:`#313244`}`,borderRadius:7,background:r?`#89b4fa10`:`#181825`,color:`#cdd6f4`,cursor:`pointer`},children:[(0,T.jsx)(`input`,{type:`checkbox`,checked:r,onChange:e=>i(e.target.checked),style:{margin:`2px 0 0`,accentColor:`#89b4fa`,cursor:`pointer`}}),(0,T.jsxs)(`span`,{children:[(0,T.jsx)(`span`,{style:{display:`block`,fontSize:12,fontWeight:750},children:`Normalize linked worktree graphs`}),(0,T.jsx)(`span`,{style:{display:`block`,marginTop:4,color:`#7f849c`,fontSize:10,lineHeight:1.45},children:`Use one lane layout and show pending-change nodes from every linked worktree, whichever worktree is open.`})]})]}),(0,T.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,T.jsx)(`input`,{type:`checkbox`,checked:t,onChange:e=>n(e.target.checked),style:{margin:`2px 0 0`,accentColor:`#89b4fa`,cursor:`pointer`}}),(0,T.jsxs)(`span`,{children:[(0,T.jsx)(`span`,{style:{display:`block`,fontSize:12,fontWeight:750},children:`Color-code gutters`}),(0,T.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,T.jsxs)(`div`,{style:{minHeight:52,padding:`10px 14px`,display:`flex`,alignItems:`center`,borderTop:`1px solid #313244`,background:`#11111b`},children:[(0,T.jsx)(`span`,{style:{color:`#585b70`,fontSize:10},children:`Appearance settings are saved automatically.`}),(0,T.jsx)(`button`,{type:`button`,onClick:e,style:{...k,marginLeft:`auto`},children:`Done`})]})]})}function W(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 G({open:e,onClose:t,initialSection:n=`appearance`}){let r=(0,w.useRef)(null),i=(0,w.useRef)(null),[a,o]=(0,w.useState)(n),[s,c]=(0,w.useState)(!1),[l,u]=(0,w.useState)(!1),d=()=>{(!s&&!l||window.confirm(`Discard unsaved settings changes?`))&&t()};return(0,w.useEffect)(()=>{let t=r.current;t&&(e?(t.open||t.showModal(),requestAnimationFrame(()=>i.current?.focus())):t.open&&t.close())},[e]),(0,T.jsxs)(`dialog`,{ref:r,className:`ingit-settings-dialog`,"aria-labelledby":`settings-dialog-title`,onCancel:e=>{e.preventDefault(),d()},onClose:d,onClick:e=>{e.target===e.currentTarget&&d()},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,T.jsx)(`style`,{children:`.ingit-settings-dialog::backdrop { background: rgba(10, 10, 18, 0.72); backdrop-filter: blur(2px); }`}),(0,T.jsxs)(`div`,{onClick:e=>e.stopPropagation(),style:{display:`grid`,gridTemplateColumns:`170px minmax(0, 1fr)`,height:`100%`},children:[(0,T.jsxs)(`aside`,{style:{display:`flex`,flexDirection:`column`,background:`#181825`,borderRight:`1px solid #313244`},children:[(0,T.jsxs)(`div`,{style:{height:58,padding:`0 14px`,display:`flex`,alignItems:`center`,borderBottom:`1px solid #313244`},children:[(0,T.jsx)(`h1`,{id:`settings-dialog-title`,style:{margin:0,color:`#f5e0dc`,fontSize:16},children:`Settings`}),(0,T.jsx)(`button`,{ref:i,type:`button`,onClick:d,"aria-label":`Close settings`,title:`Close settings`,style:{marginLeft:`auto`,padding:3,border:`none`,background:`transparent`,color:`#7f849c`,fontSize:15,cursor:`pointer`},children:`✕`})]}),(0,T.jsxs)(`div`,{style:{padding:`12px 8px`},children:[(0,T.jsx)(`button`,{type:`button`,onClick:()=>o(`updates`),"aria-current":a===`updates`?`page`:void 0,style:W(a===`updates`),children:`Updates`}),(0,T.jsx)(`button`,{type:`button`,onClick:()=>o(`remotes`),"aria-current":a===`remotes`?`page`:void 0,style:W(a===`remotes`),children:`Remotes`}),(0,T.jsx)(`div`,{style:{padding:`0 8px 6px`,color:`#585b70`,fontSize:9,fontWeight:800,letterSpacing:`0.1em`,textTransform:`uppercase`},children:`Graph`}),(0,T.jsx)(`button`,{type:`button`,onClick:()=>o(`appearance`),"aria-current":a===`appearance`?`page`:void 0,style:W(a===`appearance`),children:`Appearance`}),(0,T.jsxs)(`button`,{type:`button`,onClick:()=>o(`commit-icons`),"aria-current":a===`commit-icons`?`page`:void 0,style:{...W(a===`commit-icons`),marginTop:3},children:[`Commit icons`,s?` •`:``]}),(0,T.jsx)(`div`,{style:{padding:`14px 8px 6px`,color:`#585b70`,fontSize:9,fontWeight:800,letterSpacing:`0.1em`,textTransform:`uppercase`},children:`Working tree`}),(0,T.jsxs)(`button`,{type:`button`,onClick:()=>o(`conflict-resolvers`),"aria-current":a===`conflict-resolvers`?`page`:void 0,style:W(a===`conflict-resolvers`),children:[`Lockfile resolvers`,l?` •`:``]})]}),(0,T.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,T.jsx)(`main`,{style:{minWidth:0,minHeight:0},children:e&&(0,T.jsxs)(T.Fragment,{children:[a===`remotes`&&(0,T.jsx)(H,{}),a===`updates`&&(0,T.jsx)(E,{}),(0,T.jsx)(`div`,{style:{display:a===`appearance`?`block`:`none`,height:`100%`},children:(0,T.jsx)(U,{onClose:d})}),(0,T.jsx)(`div`,{style:{display:a===`commit-icons`?`block`:`none`,height:`100%`},children:(0,T.jsx)(R,{onClose:t,onDirtyChange:c})}),(0,T.jsx)(`div`,{style:{display:a===`conflict-resolvers`?`block`:`none`,height:`100%`},children:(0,T.jsx)(V,{onClose:t,onDirtyChange:u})})]})})]})]})}export{G as SettingsDialog};