@ingit/cli-darwin-arm64 0.6.4 → 0.6.5

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.
@@ -1,4 +1,4 @@
1
- import{C as e,S as t,T as n,_ as r,a as i,b as a,c as o,d as s,f as c,g as l,h as u,i as d,l as f,m as p,n as m,o as h,p as g,r as _,s as v,t as y,u as b,v as x,w as S,x as C,y as w}from"./index-CfmvOaXi.js";var T=n(e(),1),E=S();function D(){let[e,n]=(0,T.useState)(null),[r,i]=(0,T.useState)(!1),[a,o]=(0,T.useState)(null);(0,T.useEffect)(()=>{let e=!0;return C().then(t=>{e&&n(t.autoUpdate)}).catch(t=>{e&&o(t instanceof Error?t.message:`Could not load update settings`)}),()=>{e=!1}},[]);let s=async e=>{i(!0),o(null);try{let r=await t(e);n(r.autoUpdate)}catch(e){o(e instanceof Error?e.message:`Could not save update settings`)}finally{i(!1)}};return(0,E.jsxs)(`div`,{style:{padding:18},children:[(0,E.jsx)(`h2`,{style:{margin:`0 0 16px`,fontSize:16},children:`Updates`}),(0,E.jsxs)(`label`,{style:{display:`flex`,gap:10,alignItems:`center`,cursor:`pointer`},children:[(0,E.jsx)(`input`,{type:`checkbox`,checked:e??!1,disabled:e===null||r,onChange:e=>{s(e.target.checked)},style:{accentColor:`#89b4fa`}}),`Install updates automatically`]}),(0,E.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,E.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,E.jsx)(`div`,{role:`status`,style:{color:`#a6adc8`,fontSize:12},children:r?`Saving…`:e===null&&!a?`Loading…`:``}),a&&(0,E.jsx)(`p`,{role:`alert`,style:{color:`#f38ba8`,fontSize:12},children:a})]})}var O={width:`100%`,border:`1px solid #45475a`,borderRadius:6,background:`#11111b`,color:`#cdd6f4`,fontFamily:`inherit`,fontSize:12,outline:`none`},k={height:30,padding:`0 11px`,border:`1px solid #45475a`,borderRadius:6,background:`#181825`,color:`#bac2de`,fontFamily:`inherit`,fontSize:11,fontWeight:700,cursor:`pointer`},A={...k,border:`1px solid #6d9658`,background:`#8dcf78`,color:`#0b1020`,fontWeight:800},j=`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
1
+ import{C as e,S as t,T as n,_ as r,a as i,b as a,c as o,d as s,f as c,g as l,h as u,i as d,l as f,m as p,n as m,o as h,p as g,r as _,s as v,t as y,u as b,v as x,w as S,x as C,y as w}from"./index-B3Qfj55z.js";var T=n(e(),1),E=S();function D(){let[e,n]=(0,T.useState)(null),[r,i]=(0,T.useState)(!1),[a,o]=(0,T.useState)(null);(0,T.useEffect)(()=>{let e=!0;return C().then(t=>{e&&n(t.autoUpdate)}).catch(t=>{e&&o(t instanceof Error?t.message:`Could not load update settings`)}),()=>{e=!1}},[]);let s=async e=>{i(!0),o(null);try{let r=await t(e);n(r.autoUpdate)}catch(e){o(e instanceof Error?e.message:`Could not save update settings`)}finally{i(!1)}};return(0,E.jsxs)(`div`,{style:{padding:18},children:[(0,E.jsx)(`h2`,{style:{margin:`0 0 16px`,fontSize:16},children:`Updates`}),(0,E.jsxs)(`label`,{style:{display:`flex`,gap:10,alignItems:`center`,cursor:`pointer`},children:[(0,E.jsx)(`input`,{type:`checkbox`,checked:e??!1,disabled:e===null||r,onChange:e=>{s(e.target.checked)},style:{accentColor:`#89b4fa`}}),`Install updates automatically`]}),(0,E.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,E.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,E.jsx)(`div`,{role:`status`,style:{color:`#a6adc8`,fontSize:12},children:r?`Saving…`:e===null&&!a?`Loading…`:``}),a&&(0,E.jsx)(`p`,{role:`alert`,style:{color:`#f38ba8`,fontSize:12},children:a})]})}var O={width:`100%`,border:`1px solid #45475a`,borderRadius:6,background:`#11111b`,color:`#cdd6f4`,fontFamily:`inherit`,fontSize:12,outline:`none`},k={height:30,padding:`0 11px`,border:`1px solid #45475a`,borderRadius:6,background:`#181825`,color:`#bac2de`,fontFamily:`inherit`,fontSize:11,fontWeight:700,cursor:`pointer`},A={...k,border:`1px solid #6d9658`,background:`#8dcf78`,color:`#0b1020`,fontWeight:800},j=`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
2
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
3
  </svg>`;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(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 P({icon:e,customSvg:t,size:n=18,muted:r=!1}){let i=n+10;return(0,E.jsxs)(`svg`,{"aria-hidden":`true`,width:i,height:i,viewBox:`-12 -12 24 24`,style:{display:`block`,flex:`0 0 auto`},children:[(0,E.jsx)(`circle`,{r:`10`,fill:`#11111b`,stroke:r?`#45475a`:`#89b4fa`,strokeWidth:`1.5`}),(0,E.jsx)(b,{icon:e,customSvg:t,color:r?`#6c7086`:`#89b4fa`,size:n})]})}function F(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 I(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=g(e);if(n)return{id:t.id,message:`Invalid pattern in “${t.label}”: ${n}`}}if(t.customSvg!==void 0){let e=w(t.customSvg);if(e)return{id:t.id,message:`Invalid custom SVG in “${t.label}”: ${e}`}}}return null}function L(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 R({rule:e,index:t,count:n,onChange:r,onMove:i,onDuplicate:a,onDelete:o}){let[s,c]=(0,T.useState)(e.types.join(`, `)),[l,u]=(0,T.useState)(e.patterns.join(`
4
4
  `)),[d,p]=(0,T.useState)(e.customSvg??``),[m,h]=(0,T.useState)(``),_=e.customSvg===void 0?null:w(d),v=l.split(`