@ingit/cli-win32-x64 0.1.10 → 0.2.1
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{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-
|
|
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-CL170g4C.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
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 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
4
|
`)),[m,y]=(0,h.useState)(t.customSvg??``),[x,C]=(0,h.useState)(``),w=t.customSvg===void 0?null:n(m),E=d.split(`
|