@clack/prompts
Advanced tools
+7
-0
| # @clack/prompts | ||
| ## 1.0.0-alpha.9 | ||
| ### Patch Changes | ||
| - f952592: Fixes missing guide when rendering empty log lines. | ||
| - 372b526: Add `clear` method to spinner for stopping and clearing. | ||
| ## 1.0.0-alpha.8 | ||
@@ -4,0 +11,0 @@ |
+1
-0
@@ -284,2 +284,3 @@ import { State, AutocompletePrompt } from '@clack/core'; | ||
| message(msg?: string): void; | ||
| clear(): void; | ||
| readonly isCancelled: boolean; | ||
@@ -286,0 +287,0 @@ } |
+26
-26
@@ -1,2 +0,2 @@ | ||
| import{getColumns as X,getRows as et,AutocompletePrompt as Be,settings as H,ConfirmPrompt as tt,isCancel as st,GroupMultiSelectPrompt as rt,MultiSelectPrompt as it,wrapTextWithPrefix as U,PasswordPrompt as nt,block as at,SelectPrompt as ot,SelectKeyPrompt as lt,TextPrompt as ut}from"@clack/core";export{isCancel,settings,updateSettings}from"@clack/core";import t from"picocolors";import P from"node:process";import{readdirSync as ct,existsSync as dt,lstatSync as be}from"node:fs";import{dirname as xe,join as $t}from"node:path";import{cursor as _e,erase as De}from"sisteransi";import{stripVTControlCharacters as le}from"node:util";function ht(){return P.platform!=="win32"?P.env.TERM!=="linux":!!P.env.CI||!!P.env.WT_SESSION||!!P.env.TERMINUS_SUBLIME||P.env.ConEmuTask==="{cmd::Cmder}"||P.env.TERM_PROGRAM==="Terminus-Sublime"||P.env.TERM_PROGRAM==="vscode"||P.env.TERM==="xterm-256color"||P.env.TERM==="alacritty"||P.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}const ee=ht(),ue=()=>process.env.CI==="true",Te=e=>e.isTTY===!0,w=(e,r)=>ee?e:r,Me=w("\u25C6","*"),ce=w("\u25A0","x"),de=w("\u25B2","x"),j=w("\u25C7","o"),$e=w("\u250C","T"),h=w("\u2502","|"),x=w("\u2514","\u2014"),Re=w("\u2510","T"),Oe=w("\u2518","\u2014"),Y=w("\u25CF",">"),K=w("\u25CB"," "),te=w("\u25FB","[\u2022]"),V=w("\u25FC","[+]"),z=w("\u25FB","[ ]"),Pe=w("\u25AA","\u2022"),se=w("\u2500","-"),he=w("\u256E","+"),Ne=w("\u251C","+"),me=w("\u256F","+"),pe=w("\u2570","+"),We=w("\u256D","+"),ge=w("\u25CF","\u2022"),fe=w("\u25C6","*"),Fe=w("\u25B2","!"),ye=w("\u25A0","x"),W=e=>{switch(e){case"initial":case"active":return t.cyan(Me);case"cancel":return t.red(ce);case"error":return t.yellow(de);case"submit":return t.green(j)}},Ee=e=>{switch(e){case"initial":case"active":return t.cyan(h);case"cancel":return t.red(h);case"error":return t.yellow(h);case"submit":return t.green(h)}},mt=e=>e===161||e===164||e===167||e===168||e===170||e===173||e===174||e>=176&&e<=180||e>=182&&e<=186||e>=188&&e<=191||e===198||e===208||e===215||e===216||e>=222&&e<=225||e===230||e>=232&&e<=234||e===236||e===237||e===240||e===242||e===243||e>=247&&e<=250||e===252||e===254||e===257||e===273||e===275||e===283||e===294||e===295||e===299||e>=305&&e<=307||e===312||e>=319&&e<=322||e===324||e>=328&&e<=331||e===333||e===338||e===339||e===358||e===359||e===363||e===462||e===464||e===466||e===468||e===470||e===472||e===474||e===476||e===593||e===609||e===708||e===711||e>=713&&e<=715||e===717||e===720||e>=728&&e<=731||e===733||e===735||e>=768&&e<=879||e>=913&&e<=929||e>=931&&e<=937||e>=945&&e<=961||e>=963&&e<=969||e===1025||e>=1040&&e<=1103||e===1105||e===8208||e>=8211&&e<=8214||e===8216||e===8217||e===8220||e===8221||e>=8224&&e<=8226||e>=8228&&e<=8231||e===8240||e===8242||e===8243||e===8245||e===8251||e===8254||e===8308||e===8319||e>=8321&&e<=8324||e===8364||e===8451||e===8453||e===8457||e===8467||e===8470||e===8481||e===8482||e===8486||e===8491||e===8531||e===8532||e>=8539&&e<=8542||e>=8544&&e<=8555||e>=8560&&e<=8569||e===8585||e>=8592&&e<=8601||e===8632||e===8633||e===8658||e===8660||e===8679||e===8704||e===8706||e===8707||e===8711||e===8712||e===8715||e===8719||e===8721||e===8725||e===8730||e>=8733&&e<=8736||e===8739||e===8741||e>=8743&&e<=8748||e===8750||e>=8756&&e<=8759||e===8764||e===8765||e===8776||e===8780||e===8786||e===8800||e===8801||e>=8804&&e<=8807||e===8810||e===8811||e===8814||e===8815||e===8834||e===8835||e===8838||e===8839||e===8853||e===8857||e===8869||e===8895||e===8978||e>=9312&&e<=9449||e>=9451&&e<=9547||e>=9552&&e<=9587||e>=9600&&e<=9615||e>=9618&&e<=9621||e===9632||e===9633||e>=9635&&e<=9641||e===9650||e===9651||e===9654||e===9655||e===9660||e===9661||e===9664||e===9665||e>=9670&&e<=9672||e===9675||e>=9678&&e<=9681||e>=9698&&e<=9701||e===9711||e===9733||e===9734||e===9737||e===9742||e===9743||e===9756||e===9758||e===9792||e===9794||e===9824||e===9825||e>=9827&&e<=9829||e>=9831&&e<=9834||e===9836||e===9837||e===9839||e===9886||e===9887||e===9919||e>=9926&&e<=9933||e>=9935&&e<=9939||e>=9941&&e<=9953||e===9955||e===9960||e===9961||e>=9963&&e<=9969||e===9972||e>=9974&&e<=9977||e===9979||e===9980||e===9982||e===9983||e===10045||e>=10102&&e<=10111||e>=11094&&e<=11097||e>=12872&&e<=12879||e>=57344&&e<=63743||e>=65024&&e<=65039||e===65533||e>=127232&&e<=127242||e>=127248&&e<=127277||e>=127280&&e<=127337||e>=127344&&e<=127373||e===127375||e===127376||e>=127387&&e<=127404||e>=917760&&e<=917999||e>=983040&&e<=1048573||e>=1048576&&e<=1114109,pt=e=>e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510,gt=e=>e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9800&&e<=9811||e===9855||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12771||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e===94192||e===94193||e>=94208&&e<=100343||e>=100352&&e<=101589||e>=101632&&e<=101640||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128727||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129672||e>=129680&&e<=129725||e>=129727&&e<=129733||e>=129742&&e<=129755||e>=129760&&e<=129768||e>=129776&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141,ve=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/y,re=/[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y,ie=/\t{1,1000}/y,Ae=/[\u{1F1E6}-\u{1F1FF}]{2}|\u{1F3F4}[\u{E0061}-\u{E007A}]{2}[\u{E0030}-\u{E0039}\u{E0061}-\u{E007A}]{1,3}\u{E007F}|(?:\p{Emoji}\uFE0F\u20E3?|\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation})(?:\u200D(?:\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation}|\p{Emoji}\uFE0F\u20E3?))*/yu,ne=/(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y,ft=/\p{M}+/gu,Ft={limit:1/0,ellipsis:""},Le=(e,r={},s={})=>{const i=r.limit??1/0,n=r.ellipsis??"",l=r?.ellipsisWidth??(n?Le(n,Ft,s).width:0),u=s.ansiWidth??0,o=s.controlWidth??0,a=s.tabWidth??8,c=s.ambiguousWidth??1,g=s.emojiWidth??2,E=s.fullWidthWidth??2,p=s.regularWidth??1,y=s.wideWidth??2;let $=0,m=0,d=e.length,F=0,f=!1,v=d,I=Math.max(0,i-l),B=0,b=0,A=0,C=0;e:for(;;){if(b>B||m>=d&&m>$){const _=e.slice(B,b)||e.slice($,m);F=0;for(const D of _.replaceAll(ft,"")){const T=D.codePointAt(0)||0;if(pt(T)?C=E:gt(T)?C=y:c!==p&&mt(T)?C=c:C=p,A+C>I&&(v=Math.min(v,Math.max(B,$)+F)),A+C>i){f=!0;break e}F+=D.length,A+=C}B=b=0}if(m>=d)break;if(ne.lastIndex=m,ne.test(e)){if(F=ne.lastIndex-m,C=F*p,A+C>I&&(v=Math.min(v,m+Math.floor((I-A)/p))),A+C>i){f=!0;break}A+=C,B=$,b=m,m=$=ne.lastIndex;continue}if(ve.lastIndex=m,ve.test(e)){if(A+u>I&&(v=Math.min(v,m)),A+u>i){f=!0;break}A+=u,B=$,b=m,m=$=ve.lastIndex;continue}if(re.lastIndex=m,re.test(e)){if(F=re.lastIndex-m,C=F*o,A+C>I&&(v=Math.min(v,m+Math.floor((I-A)/o))),A+C>i){f=!0;break}A+=C,B=$,b=m,m=$=re.lastIndex;continue}if(ie.lastIndex=m,ie.test(e)){if(F=ie.lastIndex-m,C=F*a,A+C>I&&(v=Math.min(v,m+Math.floor((I-A)/a))),A+C>i){f=!0;break}A+=C,B=$,b=m,m=$=ie.lastIndex;continue}if(Ae.lastIndex=m,Ae.test(e)){if(A+g>I&&(v=Math.min(v,m)),A+g>i){f=!0;break}A+=g,B=$,b=m,m=$=Ae.lastIndex;continue}m+=1}return{width:f?I:A,index:f?v:d,truncated:f,ellipsed:f&&i>=l}},yt={limit:1/0,ellipsis:"",ellipsisWidth:0},M=(e,r={})=>Le(e,yt,r).width,ae="\x1B",je="\x9B",Et=39,Ce="\x07",Ve="[",vt="]",ke="m",we=`${vt}8;;`,Ge=new RegExp(`(?:\\${Ve}(?<code>\\d+)m|\\${we}(?<uri>.*)${Ce})`,"y"),At=e=>{if(e>=30&&e<=37||e>=90&&e<=97)return 39;if(e>=40&&e<=47||e>=100&&e<=107)return 49;if(e===1||e===2)return 22;if(e===3)return 23;if(e===4)return 24;if(e===7)return 27;if(e===8)return 28;if(e===9)return 29;if(e===0)return 0},He=e=>`${ae}${Ve}${e}${ke}`,Ue=e=>`${ae}${we}${e}${Ce}`,Ct=e=>e.map(r=>M(r)),Ie=(e,r,s)=>{const i=r[Symbol.iterator]();let n=!1,l=!1,u=e.at(-1),o=u===void 0?0:M(u),a=i.next(),c=i.next(),g=0;for(;!a.done;){const E=a.value,p=M(E);o+p<=s?e[e.length-1]+=E:(e.push(E),o=0),(E===ae||E===je)&&(n=!0,l=r.startsWith(we,g+1)),n?l?E===Ce&&(n=!1,l=!1):E===ke&&(n=!1):(o+=p,o===s&&!c.done&&(e.push(""),o=0)),a=c,c=i.next(),g+=E.length}u=e.at(-1),!o&&u!==void 0&&u.length>0&&e.length>1&&(e[e.length-2]+=e.pop())},wt=e=>{const r=e.split(" ");let s=r.length;for(;s>0&&!(M(r[s-1])>0);)s--;return s===r.length?e:r.slice(0,s).join(" ")+r.slice(s).join("")},It=(e,r,s={})=>{if(s.trim!==!1&&e.trim()==="")return"";let i="",n,l;const u=e.split(" "),o=Ct(u);let a=[""];for(const[$,m]of u.entries()){s.trim!==!1&&(a[a.length-1]=(a.at(-1)??"").trimStart());let d=M(a.at(-1)??"");if($!==0&&(d>=r&&(s.wordWrap===!1||s.trim===!1)&&(a.push(""),d=0),(d>0||s.trim===!1)&&(a[a.length-1]+=" ",d++)),s.hard&&o[$]>r){const F=r-d,f=1+Math.floor((o[$]-F-1)/r);Math.floor((o[$]-1)/r)<f&&a.push(""),Ie(a,m,r);continue}if(d+o[$]>r&&d>0&&o[$]>0){if(s.wordWrap===!1&&d<r){Ie(a,m,r);continue}a.push("")}if(d+o[$]>r&&s.wordWrap===!1){Ie(a,m,r);continue}a[a.length-1]+=m}s.trim!==!1&&(a=a.map($=>wt($)));const c=a.join(` | ||
| import{getColumns as X,getRows as et,AutocompletePrompt as Be,settings as H,ConfirmPrompt as tt,isCancel as st,GroupMultiSelectPrompt as rt,MultiSelectPrompt as it,wrapTextWithPrefix as U,PasswordPrompt as nt,block as at,SelectPrompt as ot,SelectKeyPrompt as lt,TextPrompt as ut}from"@clack/core";export{isCancel,settings,updateSettings}from"@clack/core";import t from"picocolors";import P from"node:process";import{readdirSync as ct,existsSync as dt,lstatSync as be}from"node:fs";import{dirname as xe,join as $t}from"node:path";import{cursor as _e,erase as De}from"sisteransi";import{stripVTControlCharacters as le}from"node:util";function ht(){return P.platform!=="win32"?P.env.TERM!=="linux":!!P.env.CI||!!P.env.WT_SESSION||!!P.env.TERMINUS_SUBLIME||P.env.ConEmuTask==="{cmd::Cmder}"||P.env.TERM_PROGRAM==="Terminus-Sublime"||P.env.TERM_PROGRAM==="vscode"||P.env.TERM==="xterm-256color"||P.env.TERM==="alacritty"||P.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}const ee=ht(),ue=()=>process.env.CI==="true",Te=e=>e.isTTY===!0,w=(e,r)=>ee?e:r,Me=w("\u25C6","*"),ce=w("\u25A0","x"),de=w("\u25B2","x"),V=w("\u25C7","o"),$e=w("\u250C","T"),h=w("\u2502","|"),x=w("\u2514","\u2014"),Re=w("\u2510","T"),Oe=w("\u2518","\u2014"),Y=w("\u25CF",">"),K=w("\u25CB"," "),te=w("\u25FB","[\u2022]"),k=w("\u25FC","[+]"),z=w("\u25FB","[ ]"),Pe=w("\u25AA","\u2022"),se=w("\u2500","-"),he=w("\u256E","+"),Ne=w("\u251C","+"),me=w("\u256F","+"),pe=w("\u2570","+"),We=w("\u256D","+"),ge=w("\u25CF","\u2022"),fe=w("\u25C6","*"),Fe=w("\u25B2","!"),ye=w("\u25A0","x"),N=e=>{switch(e){case"initial":case"active":return t.cyan(Me);case"cancel":return t.red(ce);case"error":return t.yellow(de);case"submit":return t.green(V)}},Ee=e=>{switch(e){case"initial":case"active":return t.cyan(h);case"cancel":return t.red(h);case"error":return t.yellow(h);case"submit":return t.green(h)}},mt=e=>e===161||e===164||e===167||e===168||e===170||e===173||e===174||e>=176&&e<=180||e>=182&&e<=186||e>=188&&e<=191||e===198||e===208||e===215||e===216||e>=222&&e<=225||e===230||e>=232&&e<=234||e===236||e===237||e===240||e===242||e===243||e>=247&&e<=250||e===252||e===254||e===257||e===273||e===275||e===283||e===294||e===295||e===299||e>=305&&e<=307||e===312||e>=319&&e<=322||e===324||e>=328&&e<=331||e===333||e===338||e===339||e===358||e===359||e===363||e===462||e===464||e===466||e===468||e===470||e===472||e===474||e===476||e===593||e===609||e===708||e===711||e>=713&&e<=715||e===717||e===720||e>=728&&e<=731||e===733||e===735||e>=768&&e<=879||e>=913&&e<=929||e>=931&&e<=937||e>=945&&e<=961||e>=963&&e<=969||e===1025||e>=1040&&e<=1103||e===1105||e===8208||e>=8211&&e<=8214||e===8216||e===8217||e===8220||e===8221||e>=8224&&e<=8226||e>=8228&&e<=8231||e===8240||e===8242||e===8243||e===8245||e===8251||e===8254||e===8308||e===8319||e>=8321&&e<=8324||e===8364||e===8451||e===8453||e===8457||e===8467||e===8470||e===8481||e===8482||e===8486||e===8491||e===8531||e===8532||e>=8539&&e<=8542||e>=8544&&e<=8555||e>=8560&&e<=8569||e===8585||e>=8592&&e<=8601||e===8632||e===8633||e===8658||e===8660||e===8679||e===8704||e===8706||e===8707||e===8711||e===8712||e===8715||e===8719||e===8721||e===8725||e===8730||e>=8733&&e<=8736||e===8739||e===8741||e>=8743&&e<=8748||e===8750||e>=8756&&e<=8759||e===8764||e===8765||e===8776||e===8780||e===8786||e===8800||e===8801||e>=8804&&e<=8807||e===8810||e===8811||e===8814||e===8815||e===8834||e===8835||e===8838||e===8839||e===8853||e===8857||e===8869||e===8895||e===8978||e>=9312&&e<=9449||e>=9451&&e<=9547||e>=9552&&e<=9587||e>=9600&&e<=9615||e>=9618&&e<=9621||e===9632||e===9633||e>=9635&&e<=9641||e===9650||e===9651||e===9654||e===9655||e===9660||e===9661||e===9664||e===9665||e>=9670&&e<=9672||e===9675||e>=9678&&e<=9681||e>=9698&&e<=9701||e===9711||e===9733||e===9734||e===9737||e===9742||e===9743||e===9756||e===9758||e===9792||e===9794||e===9824||e===9825||e>=9827&&e<=9829||e>=9831&&e<=9834||e===9836||e===9837||e===9839||e===9886||e===9887||e===9919||e>=9926&&e<=9933||e>=9935&&e<=9939||e>=9941&&e<=9953||e===9955||e===9960||e===9961||e>=9963&&e<=9969||e===9972||e>=9974&&e<=9977||e===9979||e===9980||e===9982||e===9983||e===10045||e>=10102&&e<=10111||e>=11094&&e<=11097||e>=12872&&e<=12879||e>=57344&&e<=63743||e>=65024&&e<=65039||e===65533||e>=127232&&e<=127242||e>=127248&&e<=127277||e>=127280&&e<=127337||e>=127344&&e<=127373||e===127375||e===127376||e>=127387&&e<=127404||e>=917760&&e<=917999||e>=983040&&e<=1048573||e>=1048576&&e<=1114109,pt=e=>e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510,gt=e=>e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9800&&e<=9811||e===9855||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12771||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e===94192||e===94193||e>=94208&&e<=100343||e>=100352&&e<=101589||e>=101632&&e<=101640||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128727||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129672||e>=129680&&e<=129725||e>=129727&&e<=129733||e>=129742&&e<=129755||e>=129760&&e<=129768||e>=129776&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141,ve=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/y,re=/[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y,ie=/\t{1,1000}/y,Ae=/[\u{1F1E6}-\u{1F1FF}]{2}|\u{1F3F4}[\u{E0061}-\u{E007A}]{2}[\u{E0030}-\u{E0039}\u{E0061}-\u{E007A}]{1,3}\u{E007F}|(?:\p{Emoji}\uFE0F\u20E3?|\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation})(?:\u200D(?:\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation}|\p{Emoji}\uFE0F\u20E3?))*/yu,ne=/(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y,ft=/\p{M}+/gu,Ft={limit:1/0,ellipsis:""},Le=(e,r={},s={})=>{const i=r.limit??1/0,n=r.ellipsis??"",l=r?.ellipsisWidth??(n?Le(n,Ft,s).width:0),u=s.ansiWidth??0,o=s.controlWidth??0,a=s.tabWidth??8,c=s.ambiguousWidth??1,g=s.emojiWidth??2,E=s.fullWidthWidth??2,p=s.regularWidth??1,y=s.wideWidth??2;let $=0,m=0,d=e.length,F=0,f=!1,v=d,I=Math.max(0,i-l),B=0,b=0,A=0,C=0;e:for(;;){if(b>B||m>=d&&m>$){const _=e.slice(B,b)||e.slice($,m);F=0;for(const D of _.replaceAll(ft,"")){const T=D.codePointAt(0)||0;if(pt(T)?C=E:gt(T)?C=y:c!==p&&mt(T)?C=c:C=p,A+C>I&&(v=Math.min(v,Math.max(B,$)+F)),A+C>i){f=!0;break e}F+=D.length,A+=C}B=b=0}if(m>=d)break;if(ne.lastIndex=m,ne.test(e)){if(F=ne.lastIndex-m,C=F*p,A+C>I&&(v=Math.min(v,m+Math.floor((I-A)/p))),A+C>i){f=!0;break}A+=C,B=$,b=m,m=$=ne.lastIndex;continue}if(ve.lastIndex=m,ve.test(e)){if(A+u>I&&(v=Math.min(v,m)),A+u>i){f=!0;break}A+=u,B=$,b=m,m=$=ve.lastIndex;continue}if(re.lastIndex=m,re.test(e)){if(F=re.lastIndex-m,C=F*o,A+C>I&&(v=Math.min(v,m+Math.floor((I-A)/o))),A+C>i){f=!0;break}A+=C,B=$,b=m,m=$=re.lastIndex;continue}if(ie.lastIndex=m,ie.test(e)){if(F=ie.lastIndex-m,C=F*a,A+C>I&&(v=Math.min(v,m+Math.floor((I-A)/a))),A+C>i){f=!0;break}A+=C,B=$,b=m,m=$=ie.lastIndex;continue}if(Ae.lastIndex=m,Ae.test(e)){if(A+g>I&&(v=Math.min(v,m)),A+g>i){f=!0;break}A+=g,B=$,b=m,m=$=Ae.lastIndex;continue}m+=1}return{width:f?I:A,index:f?v:d,truncated:f,ellipsed:f&&i>=l}},yt={limit:1/0,ellipsis:"",ellipsisWidth:0},M=(e,r={})=>Le(e,yt,r).width,ae="\x1B",je="\x9B",Et=39,Ce="\x07",Ve="[",vt="]",ke="m",we=`${vt}8;;`,Ge=new RegExp(`(?:\\${Ve}(?<code>\\d+)m|\\${we}(?<uri>.*)${Ce})`,"y"),At=e=>{if(e>=30&&e<=37||e>=90&&e<=97)return 39;if(e>=40&&e<=47||e>=100&&e<=107)return 49;if(e===1||e===2)return 22;if(e===3)return 23;if(e===4)return 24;if(e===7)return 27;if(e===8)return 28;if(e===9)return 29;if(e===0)return 0},He=e=>`${ae}${Ve}${e}${ke}`,Ue=e=>`${ae}${we}${e}${Ce}`,Ct=e=>e.map(r=>M(r)),Ie=(e,r,s)=>{const i=r[Symbol.iterator]();let n=!1,l=!1,u=e.at(-1),o=u===void 0?0:M(u),a=i.next(),c=i.next(),g=0;for(;!a.done;){const E=a.value,p=M(E);o+p<=s?e[e.length-1]+=E:(e.push(E),o=0),(E===ae||E===je)&&(n=!0,l=r.startsWith(we,g+1)),n?l?E===Ce&&(n=!1,l=!1):E===ke&&(n=!1):(o+=p,o===s&&!c.done&&(e.push(""),o=0)),a=c,c=i.next(),g+=E.length}u=e.at(-1),!o&&u!==void 0&&u.length>0&&e.length>1&&(e[e.length-2]+=e.pop())},wt=e=>{const r=e.split(" ");let s=r.length;for(;s>0&&!(M(r[s-1])>0);)s--;return s===r.length?e:r.slice(0,s).join(" ")+r.slice(s).join("")},It=(e,r,s={})=>{if(s.trim!==!1&&e.trim()==="")return"";let i="",n,l;const u=e.split(" "),o=Ct(u);let a=[""];for(const[$,m]of u.entries()){s.trim!==!1&&(a[a.length-1]=(a.at(-1)??"").trimStart());let d=M(a.at(-1)??"");if($!==0&&(d>=r&&(s.wordWrap===!1||s.trim===!1)&&(a.push(""),d=0),(d>0||s.trim===!1)&&(a[a.length-1]+=" ",d++)),s.hard&&o[$]>r){const F=r-d,f=1+Math.floor((o[$]-F-1)/r);Math.floor((o[$]-1)/r)<f&&a.push(""),Ie(a,m,r);continue}if(d+o[$]>r&&d>0&&o[$]>0){if(s.wordWrap===!1&&d<r){Ie(a,m,r);continue}a.push("")}if(d+o[$]>r&&s.wordWrap===!1){Ie(a,m,r);continue}a[a.length-1]+=m}s.trim!==!1&&(a=a.map($=>wt($)));const c=a.join(` | ||
| `),g=c[Symbol.iterator]();let E=g.next(),p=g.next(),y=0;for(;!E.done;){const $=E.value,m=p.value;if(i+=$,$===ae||$===je){Ge.lastIndex=y+1;const f=Ge.exec(c)?.groups;if(f?.code!==void 0){const v=Number.parseFloat(f.code);n=v===Et?void 0:v}else f?.uri!==void 0&&(l=f.uri.length===0?void 0:f.uri)}const d=n?At(n):void 0;m===` | ||
@@ -9,3 +9,3 @@ `?(l&&(i+=Ue("")),n&&d&&(i+=He(d))):$===` | ||
| `)}const St=(e,r,s,i,n)=>{let l=r,u=0;for(let o=s;o<i;o++){const a=e[o];if(l=l-a.length,u++,l<=n)break}return{lineCount:l,removals:u}},J=e=>{const{cursor:r,options:s,style:i}=e,n=e.output??process.stdout,l=X(n),u=e.columnPadding??0,o=e.rowPadding??4,a=l-u,c=et(n),g=t.dim("..."),E=e.maxItems??Number.POSITIVE_INFINITY,p=Math.max(c-o,0),y=Math.max(Math.min(E,p),5);let $=0;r>=y-3&&($=Math.max(Math.min(r-y+3,s.length-y),0));let m=y<s.length&&$>0,d=y<s.length&&$+y<s.length;const F=Math.min($+y,s.length),f=[];let v=0;m&&v++,d&&v++;const I=$+(m?1:0),B=F-(d?1:0);for(let A=I;A<B;A++){const C=q(i(s[A],A===r),a,{hard:!0,trim:!1}).split(` | ||
| `);f.push(C),v+=C.length}if(v>p){let A=0,C=0,_=v;const D=r-I,T=(L,S)=>St(f,_,L,S,p);m?({lineCount:_,removals:A}=T(0,D),_>p&&({lineCount:_,removals:C}=T(D+1,f.length))):({lineCount:_,removals:C}=T(D+1,f.length),_>p&&({lineCount:_,removals:A}=T(0,D))),A>0&&(m=!0,f.splice(0,A)),C>0&&(d=!0,f.splice(f.length-C,C))}const b=[];m&&b.push(g);for(const A of f)for(const C of A)b.push(C);return d&&b.push(g),b};function Ke(e){return e.label??String(e.value??"")}function qe(e,r){if(!e)return!0;const s=(r.label??String(r.value??"")).toLowerCase(),i=(r.hint??"").toLowerCase(),n=String(r.value).toLowerCase(),l=e.toLowerCase();return s.includes(l)||i.includes(l)||n.includes(l)}function Bt(e,r){const s=[];for(const i of r)e.includes(i.value)&&s.push(i);return s}const Je=e=>new Be({options:e.options,initialValue:e.initialValue?[e.initialValue]:void 0,initialUserInput:e.initialUserInput,filter:(r,s)=>qe(r,s),signal:e.signal,input:e.input,output:e.output,validate:e.validate,render(){const r=[`${t.gray(h)}`,`${W(this.state)} ${e.message}`],s=this.userInput,i=String(this.value??""),n=this.options,l=e.placeholder,u=i===""&&l!==void 0;switch(this.state){case"submit":{const o=Bt(this.selectedValues,n),a=o.length>0?` ${t.dim(o.map(Ke).join(", "))}`:"";return`${r.join(` | ||
| `);f.push(C),v+=C.length}if(v>p){let A=0,C=0,_=v;const D=r-I,T=(W,S)=>St(f,_,W,S,p);m?({lineCount:_,removals:A}=T(0,D),_>p&&({lineCount:_,removals:C}=T(D+1,f.length))):({lineCount:_,removals:C}=T(D+1,f.length),_>p&&({lineCount:_,removals:A}=T(0,D))),A>0&&(m=!0,f.splice(0,A)),C>0&&(d=!0,f.splice(f.length-C,C))}const b=[];m&&b.push(g);for(const A of f)for(const C of A)b.push(C);return d&&b.push(g),b};function Ke(e){return e.label??String(e.value??"")}function qe(e,r){if(!e)return!0;const s=(r.label??String(r.value??"")).toLowerCase(),i=(r.hint??"").toLowerCase(),n=String(r.value).toLowerCase(),l=e.toLowerCase();return s.includes(l)||i.includes(l)||n.includes(l)}function Bt(e,r){const s=[];for(const i of r)e.includes(i.value)&&s.push(i);return s}const Je=e=>new Be({options:e.options,initialValue:e.initialValue?[e.initialValue]:void 0,initialUserInput:e.initialUserInput,filter:(r,s)=>qe(r,s),signal:e.signal,input:e.input,output:e.output,validate:e.validate,render(){const r=[`${t.gray(h)}`,`${N(this.state)} ${e.message}`],s=this.userInput,i=String(this.value??""),n=this.options,l=e.placeholder,u=i===""&&l!==void 0;switch(this.state){case"submit":{const o=Bt(this.selectedValues,n),a=o.length>0?` ${t.dim(o.map(Ke).join(", "))}`:"";return`${r.join(` | ||
| `)} | ||
@@ -15,8 +15,8 @@ ${t.gray(h)}${a}`}case"cancel":{const o=s?` ${t.strikethrough(t.dim(s))}`:"";return`${r.join(` | ||
| ${t.gray(h)}${o}`}default:{const o=`${(this.state==="error"?t.yellow:t.cyan)(h)} `,a=(this.state==="error"?t.yellow:t.cyan)(x);let c="";if(this.isNavigating||u){const d=u?l:s;c=d!==""?` ${t.dim(d)}`:""}else c=` ${this.userInputWithCursor}`;const g=this.filteredOptions.length!==n.length?t.dim(` (${this.filteredOptions.length} match${this.filteredOptions.length===1?"":"es"})`):"",E=this.filteredOptions.length===0&&s?[`${o}${t.yellow("No matches found")}`]:[],p=this.state==="error"?[`${o}${t.yellow(this.error)}`]:[];r.push(`${o.trimEnd()}`,`${o}${t.dim("Search:")}${c}${g}`,...E,...p);const y=[`${t.dim("\u2191/\u2193")} to select`,`${t.dim("Enter:")} confirm`,`${t.dim("Type:")} to search`],$=[`${o}${t.dim(y.join(" \u2022 "))}`,`${a}`],m=this.filteredOptions.length===0?[]:J({cursor:this.cursor,options:this.filteredOptions,columnPadding:3,rowPadding:r.length+$.length,style:(d,F)=>{const f=Ke(d),v=d.hint&&d.value===this.focusedValue?t.dim(` (${d.hint})`):"";return F?`${t.green(Y)} ${f}${v}`:`${t.dim(K)} ${t.dim(f)}${v}`},maxItems:e.maxItems,output:e.output});return[...r,...m.map(d=>`${o}${d}`),...$].join(` | ||
| `)}}}}).prompt(),bt=e=>{const r=(i,n,l,u)=>{const o=l.includes(i.value),a=i.label??String(i.value??""),c=i.hint&&u!==void 0&&i.value===u?t.dim(` (${i.hint})`):"",g=o?t.green(V):t.dim(z);return n?`${g} ${a}${c}`:`${g} ${t.dim(a)}`},s=new Be({options:e.options,multiple:!0,filter:(i,n)=>qe(i,n),validate:()=>{if(e.required&&s.selectedValues.length===0)return"Please select at least one item"},initialValue:e.initialValues,signal:e.signal,input:e.input,output:e.output,render(){const i=`${t.gray(h)} | ||
| ${W(this.state)} ${e.message} | ||
| `)}}}}).prompt(),bt=e=>{const r=(i,n,l,u)=>{const o=l.includes(i.value),a=i.label??String(i.value??""),c=i.hint&&u!==void 0&&i.value===u?t.dim(` (${i.hint})`):"",g=o?t.green(k):t.dim(z);return n?`${g} ${a}${c}`:`${g} ${t.dim(a)}`},s=new Be({options:e.options,multiple:!0,filter:(i,n)=>qe(i,n),validate:()=>{if(e.required&&s.selectedValues.length===0)return"Please select at least one item"},initialValue:e.initialValues,signal:e.signal,input:e.input,output:e.output,render(){const i=`${t.gray(h)} | ||
| ${N(this.state)} ${e.message} | ||
| `,n=this.userInput,l=e.placeholder,u=n===""&&l!==void 0,o=this.isNavigating||u?t.dim(u?l:n):this.userInputWithCursor,a=this.options,c=this.filteredOptions.length!==a.length?t.dim(` (${this.filteredOptions.length} match${this.filteredOptions.length===1?"":"es"})`):"";switch(this.state){case"submit":return`${i}${t.gray(h)} ${t.dim(`${this.selectedValues.length} items selected`)}`;case"cancel":return`${i}${t.gray(h)} ${t.strikethrough(t.dim(n))}`;default:{const g=this.state==="error"?t.yellow:t.cyan,E=[`${t.dim("\u2191/\u2193")} to navigate`,`${t.dim(this.isNavigating?"Space/Tab:":"Tab:")} select`,`${t.dim("Enter:")} confirm`,`${t.dim("Type:")} to search`],p=this.filteredOptions.length===0&&n?[`${g(h)} ${t.yellow("No matches found")}`]:[],y=this.state==="error"?[`${g(h)} ${t.yellow(this.error)}`]:[],$=[...`${i}${g(h)}`.split(` | ||
| `),`${g(h)} ${t.dim("Search:")} ${o}${c}`,...p,...y],m=[`${g(h)} ${t.dim(E.join(" \u2022 "))}`,`${g(x)}`],d=J({cursor:this.cursor,options:this.filteredOptions,style:(F,f)=>r(F,f,this.selectedValues,this.focusedValue),maxItems:e.maxItems,output:e.output,rowPadding:$.length+m.length});return[...$,...d.map(F=>`${g(h)} ${F}`),...m].join(` | ||
| `)}}}});return s.prompt()},xt=[We,he,pe,me],_t=[$e,Re,x,Oe];function Xe(e,r,s,i){let n=s,l=s;return i==="center"?n=Math.floor((r-e)/2):i==="right"&&(n=r-e-s),l=r-n-e,[n,l]}const Dt=e=>e,Tt=(e="",r="",s)=>{const i=s?.output??process.stdout,n=X(i),l=2,u=s?.titlePadding??1,o=s?.contentPadding??2,a=s?.width===void 0||s.width==="auto"?1:Math.min(1,s.width),c=(s?.withGuide??H.withGuide)!==!1?`${h} `:"",g=s?.formatBorder??Dt,E=(s?.rounded?xt:_t).map(g),p=g(se),y=g(h),$=M(c),m=M(r),d=n-$;let F=Math.floor(n*a)-$;if(s?.width==="auto"){const _=e.split(` | ||
| `);let D=m+u*2;for(const L of _){const S=M(L)+o*2;S>D&&(D=S)}const T=D+l;T<F&&(F=T)}F%2!==0&&(F<d?F++:F--);const f=F-l,v=f-u*2,I=m>v?`${r.slice(0,v-3)}...`:r,[B,b]=Xe(M(I),f,u,s?.titleAlign),A=q(e,f-o*2,{hard:!0,trim:!1});i.write(`${c}${E[0]}${p.repeat(B)}${I}${p.repeat(b)}${E[1]} | ||
| `);let D=m+u*2;for(const W of _){const S=M(W)+o*2;S>D&&(D=S)}const T=D+l;T<F&&(F=T)}F%2!==0&&(F<d?F++:F--);const f=F-l,v=f-u*2,I=m>v?`${r.slice(0,v-3)}...`:r,[B,b]=Xe(M(I),f,u,s?.titleAlign),A=q(e,f-o*2,{hard:!0,trim:!1});i.write(`${c}${E[0]}${p.repeat(B)}${I}${p.repeat(b)}${E[1]} | ||
| `);const C=A.split(` | ||
@@ -26,3 +26,3 @@ `);for(const _ of C){const[D,T]=Xe(M(_),f,o,s?.contentAlign);i.write(`${c}${y}${" ".repeat(D)}${_}${" ".repeat(T)}${y} | ||
| `)},Mt=e=>{const r=e.active??"Yes",s=e.inactive??"No";return new tt({active:r,inactive:s,signal:e.signal,input:e.input,output:e.output,initialValue:e.initialValue??!0,render(){const i=`${t.gray(h)} | ||
| ${W(this.state)} ${e.message} | ||
| ${N(this.state)} ${e.message} | ||
| `,n=this.value?r:s;switch(this.state){case"submit":return`${i}${t.gray(h)} ${t.dim(n)}`;case"cancel":return`${i}${t.gray(h)} ${t.strikethrough(t.dim(n))} | ||
@@ -32,5 +32,5 @@ ${t.gray(h)}`;default:return`${i}${t.cyan(h)} ${this.value?`${t.green(Y)} ${r}`:`${t.dim(K)} ${t.dim(r)}`} ${t.dim("/")} ${this.value?`${t.dim(K)} ${t.dim(s)}`:`${t.green(Y)} ${s}`} | ||
| `}}}).prompt()},Rt=async(e,r)=>{const s={},i=Object.keys(e);for(const n of i){const l=e[n],u=await l({results:s})?.catch(o=>{throw o});if(typeof r?.onCancel=="function"&&st(u)){s[n]="canceled",r.onCancel({results:s});continue}s[n]=u}return s},Ot=e=>{const{selectableGroups:r=!0,groupSpacing:s=0}=e,i=(l,u,o=[])=>{const a=l.label??String(l.value),c=typeof l.group=="string",g=c&&(o[o.indexOf(l)+1]??{group:!0}),E=c&&g&&g.group===!0,p=c?r?`${E?x:h} `:" ":"";let y="";if(s>0&&!c){const m=` | ||
| ${t.cyan(h)}`;y=`${m.repeat(s-1)}${m} `}if(u==="active")return`${y}${t.dim(p)}${t.cyan(te)} ${a}${l.hint?` ${t.dim(`(${l.hint})`)}`:""}`;if(u==="group-active")return`${y}${p}${t.cyan(te)} ${t.dim(a)}`;if(u==="group-active-selected")return`${y}${p}${t.green(V)} ${t.dim(a)}`;if(u==="selected"){const m=c||r?t.green(V):"";return`${y}${t.dim(p)}${m} ${t.dim(a)}${l.hint?` ${t.dim(`(${l.hint})`)}`:""}`}if(u==="cancelled")return`${t.strikethrough(t.dim(a))}`;if(u==="active-selected")return`${y}${t.dim(p)}${t.green(V)} ${a}${l.hint?` ${t.dim(`(${l.hint})`)}`:""}`;if(u==="submitted")return`${t.dim(a)}`;const $=c||r?t.dim(z):"";return`${y}${t.dim(p)}${$} ${t.dim(a)}`},n=e.required??!0;return new rt({options:e.options,signal:e.signal,input:e.input,output:e.output,initialValues:e.initialValues,required:n,cursorAt:e.cursorAt,selectableGroups:r,validate(l){if(n&&(l===void 0||l.length===0))return`Please select at least one option. | ||
| ${t.cyan(h)}`;y=`${m.repeat(s-1)}${m} `}if(u==="active")return`${y}${t.dim(p)}${t.cyan(te)} ${a}${l.hint?` ${t.dim(`(${l.hint})`)}`:""}`;if(u==="group-active")return`${y}${p}${t.cyan(te)} ${t.dim(a)}`;if(u==="group-active-selected")return`${y}${p}${t.green(k)} ${t.dim(a)}`;if(u==="selected"){const m=c||r?t.green(k):"";return`${y}${t.dim(p)}${m} ${t.dim(a)}${l.hint?` ${t.dim(`(${l.hint})`)}`:""}`}if(u==="cancelled")return`${t.strikethrough(t.dim(a))}`;if(u==="active-selected")return`${y}${t.dim(p)}${t.green(k)} ${a}${l.hint?` ${t.dim(`(${l.hint})`)}`:""}`;if(u==="submitted")return`${t.dim(a)}`;const $=c||r?t.dim(z):"";return`${y}${t.dim(p)}${$} ${t.dim(a)}`},n=e.required??!0;return new rt({options:e.options,signal:e.signal,input:e.input,output:e.output,initialValues:e.initialValues,required:n,cursorAt:e.cursorAt,selectableGroups:r,validate(l){if(n&&(l===void 0||l.length===0))return`Please select at least one option. | ||
| ${t.reset(t.dim(`Press ${t.gray(t.bgWhite(t.inverse(" space ")))} to select, ${t.gray(t.bgWhite(t.inverse(" enter ")))} to submit`))}`},render(){const l=`${t.gray(h)} | ||
| ${W(this.state)} ${e.message} | ||
| ${N(this.state)} ${e.message} | ||
| `,u=this.value??[];switch(this.state){case"submit":{const o=this.options.filter(({value:c})=>u.includes(c)).map(c=>i(c,"submitted")),a=o.length===0?"":` ${o.join(t.dim(", "))}`;return`${l}${t.gray(h)}${a}`}case"cancel":{const o=this.options.filter(({value:a})=>u.includes(a)).map(a=>i(a,"cancelled")).join(t.dim(", "));return`${l}${t.gray(h)} ${o.trim()?`${o} | ||
@@ -48,5 +48,5 @@ ${t.gray(h)}`:""}`}case"error":{const o=this.error.split(` | ||
| `}}}}).prompt()},R={message:(e=[],{symbol:r=t.gray(h),secondarySymbol:s=t.gray(h),output:i=process.stdout,spacing:n=1,withGuide:l}={})=>{const u=[],o=(l??H.withGuide)!==!1,a=o?s:"",c=o?`${r} `:"",g=o?`${s} `:"";for(let p=0;p<n;p++)u.push(a);const E=Array.isArray(e)?e:e.split(` | ||
| `);if(E.length>0){const[p,...y]=E;p.length>0?u.push(`${c}${p}`):u.push(o?r:"");for(const $ of y)$.length>0?u.push(`${g}${$}`):u.push(o?"":s)}i.write(`${u.join(` | ||
| `);if(E.length>0){const[p,...y]=E;p.length>0?u.push(`${c}${p}`):u.push(o?r:"");for(const $ of y)$.length>0?u.push(`${g}${$}`):u.push(o?s:"")}i.write(`${u.join(` | ||
| `)} | ||
| `)},info:(e,r)=>{R.message(e,{...r,symbol:t.blue(ge)})},success:(e,r)=>{R.message(e,{...r,symbol:t.green(fe)})},step:(e,r)=>{R.message(e,{...r,symbol:t.green(j)})},warn:(e,r)=>{R.message(e,{...r,symbol:t.yellow(Fe)})},warning:(e,r)=>{R.warn(e,r)},error:(e,r)=>{R.message(e,{...r,symbol:t.red(ye)})}},Pt=(e="",r)=>{(r?.output??process.stdout).write(`${t.gray(x)} ${t.red(e)} | ||
| `)},info:(e,r)=>{R.message(e,{...r,symbol:t.blue(ge)})},success:(e,r)=>{R.message(e,{...r,symbol:t.green(fe)})},step:(e,r)=>{R.message(e,{...r,symbol:t.green(V)})},warn:(e,r)=>{R.message(e,{...r,symbol:t.yellow(Fe)})},warning:(e,r)=>{R.warn(e,r)},error:(e,r)=>{R.message(e,{...r,symbol:t.red(ye)})}},Pt=(e="",r)=>{(r?.output??process.stdout).write(`${t.gray(x)} ${t.red(e)} | ||
@@ -59,4 +59,4 @@ `)},Nt=(e="",r)=>{(r?.output??process.stdout).write(`${t.gray($e)} ${e} | ||
| `).map(s=>r(s)).join(` | ||
| `),Lt=e=>{const r=(i,n)=>{const l=i.label??String(i.value);return n==="disabled"?`${t.gray(z)} ${Q(l,u=>t.strikethrough(t.gray(u)))}${i.hint?` ${t.dim(`(${i.hint??"disabled"})`)}`:""}`:n==="active"?`${t.cyan(te)} ${l}${i.hint?` ${t.dim(`(${i.hint})`)}`:""}`:n==="selected"?`${t.green(V)} ${Q(l,t.dim)}${i.hint?` ${t.dim(`(${i.hint})`)}`:""}`:n==="cancelled"?`${Q(l,u=>t.strikethrough(t.dim(u)))}`:n==="active-selected"?`${t.green(V)} ${l}${i.hint?` ${t.dim(`(${i.hint})`)}`:""}`:n==="submitted"?`${Q(l,t.dim)}`:`${t.dim(z)} ${Q(l,t.dim)}`},s=e.required??!0;return new it({options:e.options,signal:e.signal,input:e.input,output:e.output,initialValues:e.initialValues,required:s,cursorAt:e.cursorAt,validate(i){if(s&&(i===void 0||i.length===0))return`Please select at least one option. | ||
| ${t.reset(t.dim(`Press ${t.gray(t.bgWhite(t.inverse(" space ")))} to select, ${t.gray(t.bgWhite(t.inverse(" enter ")))} to submit`))}`},render(){const i=U(e.output,e.message,`${Ee(this.state)} `,`${W(this.state)} `),n=`${t.gray(h)} | ||
| `),Lt=e=>{const r=(i,n)=>{const l=i.label??String(i.value);return n==="disabled"?`${t.gray(z)} ${Q(l,u=>t.strikethrough(t.gray(u)))}${i.hint?` ${t.dim(`(${i.hint??"disabled"})`)}`:""}`:n==="active"?`${t.cyan(te)} ${l}${i.hint?` ${t.dim(`(${i.hint})`)}`:""}`:n==="selected"?`${t.green(k)} ${Q(l,t.dim)}${i.hint?` ${t.dim(`(${i.hint})`)}`:""}`:n==="cancelled"?`${Q(l,u=>t.strikethrough(t.dim(u)))}`:n==="active-selected"?`${t.green(k)} ${l}${i.hint?` ${t.dim(`(${i.hint})`)}`:""}`:n==="submitted"?`${Q(l,t.dim)}`:`${t.dim(z)} ${Q(l,t.dim)}`},s=e.required??!0;return new it({options:e.options,signal:e.signal,input:e.input,output:e.output,initialValues:e.initialValues,required:s,cursorAt:e.cursorAt,validate(i){if(s&&(i===void 0||i.length===0))return`Please select at least one option. | ||
| ${t.reset(t.dim(`Press ${t.gray(t.bgWhite(t.inverse(" space ")))} to select, ${t.gray(t.bgWhite(t.inverse(" enter ")))} to submit`))}`},render(){const i=U(e.output,e.message,`${Ee(this.state)} `,`${N(this.state)} `),n=`${t.gray(h)} | ||
| ${i} | ||
@@ -79,7 +79,7 @@ `,l=this.value??[],u=(o,a)=>{if(o.disabled)return r(o,"disabled");const c=l.includes(o.value);return a&&c?r(o,"active-selected"):c?r(o,"selected"):r(o,a?"active":"inactive")};switch(this.state){case"submit":{const o=this.options.filter(({value:c})=>l.includes(c)).map(c=>r(c,"submitted")).join(t.dim(", "))||t.dim("none"),a=U(e.output,o,`${t.gray(h)} `);return`${n}${a}`}case"cancel":{const o=this.options.filter(({value:c})=>l.includes(c)).map(c=>r(c,"cancelled")).join(t.dim(", "));if(o.trim()==="")return`${n}${t.gray(h)}`;const a=U(e.output,o,`${t.gray(h)} `);return`${n}${a} | ||
| `),g=n?`${t.gray(h)} | ||
| `:"",E=n?Ne:pe;i.write(`${g}${t.green(j)} ${t.reset(r)} ${t.gray(se.repeat(Math.max(a-o-1,1))+he)} | ||
| `:"",E=n?Ne:pe;i.write(`${g}${t.green(V)} ${t.reset(r)} ${t.gray(se.repeat(Math.max(a-o-1,1))+he)} | ||
| ${c} | ||
| ${t.gray(E+se.repeat(a+2)+me)} | ||
| `)},Gt=e=>new nt({validate:e.validate,mask:e.mask??Pe,signal:e.signal,input:e.input,output:e.output,render(){const r=`${t.gray(h)} | ||
| ${W(this.state)} ${e.message} | ||
| ${N(this.state)} ${e.message} | ||
| `,s=this.userInputWithCursor,i=this.masked;switch(this.state){case"error":{const n=i?` ${i}`:"";return e.clearOnError&&this.clear(),`${r.trim()} | ||
@@ -91,11 +91,11 @@ ${t.yellow(h)}${n} | ||
| ${t.cyan(x)} | ||
| `}}}).prompt(),Ht=e=>{const r=e.validate;return Je({...e,initialUserInput:e.initialValue??e.root??process.cwd(),maxItems:5,validate(s){if(!Array.isArray(s)){if(!s)return"Please select a path";if(r)return r(s)}},options(){const s=this.userInput;if(s==="")return[];try{let i;return dt(s)?be(s).isDirectory()?i=s:i=xe(s):i=xe(s),ct(i).map(n=>{const l=$t(i,n),u=be(l);return{name:n,path:l,isDirectory:u.isDirectory()}}).filter(({path:n,isDirectory:l})=>n.startsWith(s)&&(e.directory||!l)).map(n=>({value:n.path}))}catch{return[]}}})},Ut=t.magenta,Se=({indicator:e="dots",onCancel:r,output:s=process.stdout,cancelMessage:i,errorMessage:n,frames:l=ee?["\u25D2","\u25D0","\u25D3","\u25D1"]:["\u2022","o","O","0"],delay:u=ee?80:120,signal:o,...a}={})=>{const c=ue();let g,E,p=!1,y=!1,$="",m,d=performance.now();const F=X(s),f=a?.styleFrame??Ut,v=S=>{const O=S>1?n??H.messages.error:i??H.messages.cancel;y=S===1,p&&(L(O,S),y&&typeof r=="function"&&r())},I=()=>v(2),B=()=>v(1),b=()=>{process.on("uncaughtExceptionMonitor",I),process.on("unhandledRejection",I),process.on("SIGINT",B),process.on("SIGTERM",B),process.on("exit",v),o&&o.addEventListener("abort",B)},A=()=>{process.removeListener("uncaughtExceptionMonitor",I),process.removeListener("unhandledRejection",I),process.removeListener("SIGINT",B),process.removeListener("SIGTERM",B),process.removeListener("exit",v),o&&o.removeEventListener("abort",B)},C=()=>{if(m===void 0)return;c&&s.write(` | ||
| `}}}).prompt(),Ht=e=>{const r=e.validate;return Je({...e,initialUserInput:e.initialValue??e.root??process.cwd(),maxItems:5,validate(s){if(!Array.isArray(s)){if(!s)return"Please select a path";if(r)return r(s)}},options(){const s=this.userInput;if(s==="")return[];try{let i;return dt(s)?be(s).isDirectory()?i=s:i=xe(s):i=xe(s),ct(i).map(n=>{const l=$t(i,n),u=be(l);return{name:n,path:l,isDirectory:u.isDirectory()}}).filter(({path:n,isDirectory:l})=>n.startsWith(s)&&(e.directory||!l)).map(n=>({value:n.path}))}catch{return[]}}})},Ut=t.magenta,Se=({indicator:e="dots",onCancel:r,output:s=process.stdout,cancelMessage:i,errorMessage:n,frames:l=ee?["\u25D2","\u25D0","\u25D3","\u25D1"]:["\u2022","o","O","0"],delay:u=ee?80:120,signal:o,...a}={})=>{const c=ue();let g,E,p=!1,y=!1,$="",m,d=performance.now();const F=X(s),f=a?.styleFrame??Ut,v=S=>{const O=S>1?n??H.messages.error:i??H.messages.cancel;y=S===1,p&&(W(O,S),y&&typeof r=="function"&&r())},I=()=>v(2),B=()=>v(1),b=()=>{process.on("uncaughtExceptionMonitor",I),process.on("unhandledRejection",I),process.on("SIGINT",B),process.on("SIGTERM",B),process.on("exit",v),o&&o.addEventListener("abort",B)},A=()=>{process.removeListener("uncaughtExceptionMonitor",I),process.removeListener("unhandledRejection",I),process.removeListener("SIGINT",B),process.removeListener("SIGTERM",B),process.removeListener("exit",v),o&&o.removeEventListener("abort",B)},C=()=>{if(m===void 0)return;c&&s.write(` | ||
| `);const S=q(m,F,{hard:!0,trim:!1}).split(` | ||
| `);S.length>1&&s.write(_e.up(S.length-1)),s.write(_e.to(0)),s.write(De.down())},_=S=>S.replace(/\.+$/,""),D=S=>{const O=(performance.now()-S)/1e3,N=Math.floor(O/60),G=Math.floor(O%60);return N>0?`[${N}m ${G}s]`:`[${G}s]`},T=(S="")=>{p=!0,g=at({output:s}),$=_(S),d=performance.now(),s.write(`${t.gray(h)} | ||
| `);let O=0,N=0;b(),E=setInterval(()=>{if(c&&$===m)return;C(),m=$;const G=f(l[O]);let Z;if(c)Z=`${G} ${$}...`;else if(e==="timer")Z=`${G} ${$} ${D(d)}`;else{const Ze=".".repeat(Math.floor(N)).slice(0,3);Z=`${G} ${$}${Ze}`}const Qe=q(Z,F,{hard:!0,trim:!1});s.write(Qe),O=O+1<l.length?O+1:0,N=N<4?N+.125:0},u)},L=(S="",O=0)=>{if(!p)return;p=!1,clearInterval(E),C();const N=O===0?t.green(j):O===1?t.red(ce):t.red(de);$=S??$,e==="timer"?s.write(`${N} ${$} ${D(d)} | ||
| `):s.write(`${N} ${$} | ||
| `),A(),g()};return{start:T,stop:(S="")=>L(S,0),message:(S="")=>{$=_(S??$)},cancel:(S="")=>L(S,1),error:(S="")=>L(S,2),get isCancelled(){return y}}},Ye={light:w("\u2500","-"),heavy:w("\u2501","="),block:w("\u2588","#")};function Kt({style:e="heavy",max:r=100,size:s=40,...i}={}){const n=Se(i);let l=0,u="";const o=Math.max(1,r),a=Math.max(1,s),c=y=>{switch(y){case"initial":case"active":return t.magenta;case"error":case"cancel":return t.red;case"submit":return t.green;default:return t.magenta}},g=(y,$)=>{const m=Math.floor(l/o*a);return`${c(y)(Ye[e].repeat(m))}${t.dim(Ye[e].repeat(a-m))} ${$}`},E=(y="")=>{u=y,n.start(g("initial",y))},p=(y=1,$)=>{l=Math.min(o,y+l),n.message(g("active",$??u)),u=$??u};return{start:E,stop:n.stop,cancel:n.cancel,error:n.error,advance:p,isCancelled:n.isCancelled,message:y=>p(0,y)}}const oe=(e,r)=>e.includes(` | ||
| `);S.length>1&&s.write(_e.up(S.length-1)),s.write(_e.to(0)),s.write(De.down())},_=S=>S.replace(/\.+$/,""),D=S=>{const O=(performance.now()-S)/1e3,L=Math.floor(O/60),j=Math.floor(O%60);return L>0?`[${L}m ${j}s]`:`[${j}s]`},T=(S="")=>{p=!0,g=at({output:s}),$=_(S),d=performance.now(),s.write(`${t.gray(h)} | ||
| `);let O=0,L=0;b(),E=setInterval(()=>{if(c&&$===m)return;C(),m=$;const j=f(l[O]);let Z;if(c)Z=`${j} ${$}...`;else if(e==="timer")Z=`${j} ${$} ${D(d)}`;else{const Ze=".".repeat(Math.floor(L)).slice(0,3);Z=`${j} ${$}${Ze}`}const Qe=q(Z,F,{hard:!0,trim:!1});s.write(Qe),O=O+1<l.length?O+1:0,L=L<4?L+.125:0},u)},W=(S="",O=0,L=!1)=>{if(!p)return;p=!1,clearInterval(E),C();const j=O===0?t.green(V):O===1?t.red(ce):t.red(de);$=S??$,L||(e==="timer"?s.write(`${j} ${$} ${D(d)} | ||
| `):s.write(`${j} ${$} | ||
| `)),A(),g()};return{start:T,stop:(S="")=>W(S,0),message:(S="")=>{$=_(S??$)},cancel:(S="")=>W(S,1),error:(S="")=>W(S,2),clear:()=>W("",0,!0),get isCancelled(){return y}}},Ye={light:w("\u2500","-"),heavy:w("\u2501","="),block:w("\u2588","#")};function Kt({style:e="heavy",max:r=100,size:s=40,...i}={}){const n=Se(i);let l=0,u="";const o=Math.max(1,r),a=Math.max(1,s),c=y=>{switch(y){case"initial":case"active":return t.magenta;case"error":case"cancel":return t.red;case"submit":return t.green;default:return t.magenta}},g=(y,$)=>{const m=Math.floor(l/o*a);return`${c(y)(Ye[e].repeat(m))}${t.dim(Ye[e].repeat(a-m))} ${$}`},E=(y="")=>{u=y,n.start(g("initial",y))},p=(y=1,$)=>{l=Math.min(o,y+l),n.message(g("active",$??u)),u=$??u};return{start:E,stop:n.stop,cancel:n.cancel,error:n.error,clear:n.clear,advance:p,isCancelled:n.isCancelled,message:y=>p(0,y)}}const oe=(e,r)=>e.includes(` | ||
| `)?e.split(` | ||
| `).map(s=>r(s)).join(` | ||
| `):r(e),qt=e=>{const r=(s,i)=>{const n=s.label??String(s.value);switch(i){case"disabled":return`${t.gray(K)} ${oe(n,t.gray)}${s.hint?` ${t.dim(`(${s.hint??"disabled"})`)}`:""}`;case"selected":return`${oe(n,t.dim)}`;case"active":return`${t.green(Y)} ${n}${s.hint?` ${t.dim(`(${s.hint})`)}`:""}`;case"cancelled":return`${oe(n,l=>t.strikethrough(t.dim(l)))}`;default:return`${t.dim(K)} ${oe(n,t.dim)}`}};return new ot({options:e.options,signal:e.signal,input:e.input,output:e.output,initialValue:e.initialValue,render(){const s=`${W(this.state)} `,i=`${Ee(this.state)} `,n=U(e.output,e.message,i,s),l=`${t.gray(h)} | ||
| `):r(e),qt=e=>{const r=(s,i)=>{const n=s.label??String(s.value);switch(i){case"disabled":return`${t.gray(K)} ${oe(n,t.gray)}${s.hint?` ${t.dim(`(${s.hint??"disabled"})`)}`:""}`;case"selected":return`${oe(n,t.dim)}`;case"active":return`${t.green(Y)} ${n}${s.hint?` ${t.dim(`(${s.hint})`)}`:""}`;case"cancelled":return`${oe(n,l=>t.strikethrough(t.dim(l)))}`;default:return`${t.dim(K)} ${oe(n,t.dim)}`}};return new ot({options:e.options,signal:e.signal,input:e.input,output:e.output,initialValue:e.initialValue,render(){const s=`${N(this.state)} `,i=`${Ee(this.state)} `,n=U(e.output,e.message,i,s),l=`${t.gray(h)} | ||
| ${n} | ||
@@ -108,3 +108,3 @@ `;switch(this.state){case"submit":{const u=`${t.gray(h)} `,o=U(e.output,r(this.options[this.cursor],"selected"),u);return`${l}${o}`}case"cancel":{const u=`${t.gray(h)} `,o=U(e.output,r(this.options[this.cursor],"cancelled"),u);return`${l}${o} | ||
| `}}}}).prompt()},Jt=e=>{const r=(s,i="inactive")=>{const n=s.label??String(s.value);return i==="selected"?`${t.dim(n)}`:i==="cancelled"?`${t.strikethrough(t.dim(n))}`:i==="active"?`${t.bgCyan(t.gray(` ${s.value} `))} ${n} ${s.hint?t.dim(`(${s.hint})`):""}`:`${t.gray(t.bgWhite(t.inverse(` ${s.value} `)))} ${n} ${s.hint?t.dim(`(${s.hint})`):""}`};return new lt({options:e.options,signal:e.signal,input:e.input,output:e.output,initialValue:e.initialValue,render(){const s=`${t.gray(h)} | ||
| ${W(this.state)} ${e.message} | ||
| ${N(this.state)} ${e.message} | ||
| `;switch(this.state){case"submit":return`${s}${t.gray(h)} ${r(this.options.find(i=>i.value===this.value)??e.options[0],"selected")}`;case"cancel":return`${s}${t.gray(h)} ${r(this.options[0],"cancelled")} | ||
@@ -114,3 +114,3 @@ ${t.gray(h)}`;default:return`${s}${t.cyan(h)} ${this.options.map((i,n)=>r(i,n===this.cursor?"active":"inactive")).join(` | ||
| ${t.cyan(x)} | ||
| `}}}).prompt()},ze=`${t.gray(h)} `,k={message:async(e,{symbol:r=t.gray(h)}={})=>{process.stdout.write(`${t.gray(h)} | ||
| `}}}).prompt()},ze=`${t.gray(h)} `,G={message:async(e,{symbol:r=t.gray(h)}={})=>{process.stdout.write(`${t.gray(h)} | ||
| ${r} `);let s=3;for await(let i of e){i=i.replace(/\n/g,` | ||
@@ -121,4 +121,4 @@ ${ze}`),i.includes(` | ||
| ${ze}${i.trimStart()}`),s=3+le(i.trimStart()).length)}process.stdout.write(` | ||
| `)},info:e=>k.message(e,{symbol:t.blue(ge)}),success:e=>k.message(e,{symbol:t.green(fe)}),step:e=>k.message(e,{symbol:t.green(j)}),warn:e=>k.message(e,{symbol:t.yellow(Fe)}),warning:e=>k.warn(e),error:e=>k.message(e,{symbol:t.red(ye)})},Xt=async(e,r)=>{for(const s of e){if(s.enabled===!1)continue;const i=Se(r);i.start(s.title);const n=await s.task(i.message);i.stop(n||s.title)}},Yt=e=>e.replace(/\x1b\[(?:\d+;)*\d*[ABCDEFGHfJKSTsu]|\x1b\[(s|u)/g,""),zt=e=>{const r=e.output??process.stdout,s=X(r),i=t.gray(h),n=e.spacing??1,l=3,u=e.retainLog===!0,o=!ue()&&Te(r);r.write(`${i} | ||
| `),r.write(`${t.green(j)} ${e.title} | ||
| `)},info:e=>G.message(e,{symbol:t.blue(ge)}),success:e=>G.message(e,{symbol:t.green(fe)}),step:e=>G.message(e,{symbol:t.green(V)}),warn:e=>G.message(e,{symbol:t.yellow(Fe)}),warning:e=>G.warn(e),error:e=>G.message(e,{symbol:t.red(ye)})},Xt=async(e,r)=>{for(const s of e){if(s.enabled===!1)continue;const i=Se(r);i.start(s.title);const n=await s.task(i.message);i.stop(n||s.title)}},Yt=e=>e.replace(/\x1b\[(?:\d+;)*\d*[ABCDEFGHfJKSTsu]|\x1b\[(s|u)/g,""),zt=e=>{const r=e.output??process.stdout,s=X(r),i=t.gray(h),n=e.spacing??1,l=3,u=e.retainLog===!0,o=!ue()&&Te(r);r.write(`${i} | ||
| `),r.write(`${t.green(V)} ${e.title} | ||
| `);for(let d=0;d<n;d++)r.write(`${i} | ||
@@ -136,3 +136,3 @@ `);const a=[{value:"",full:""}];let c=!1;const g=d=>{if(a.length===0)return;let F=0;d&&(F+=n+2);for(const f of a){const{value:v,result:I}=f;let B=I?.message??v;if(B.length===0)continue;I===void 0&&f.header!==void 0&&f.header!==""&&(B+=` | ||
| `)}o&&$()},$=()=>{for(const d of a)d.result?d.result.status==="error"?R.error(d.result.message,{output:r,secondarySymbol:i,spacing:0}):R.success(d.result.message,{output:r,secondarySymbol:i,spacing:0}):d.value!==""&&E(d,0)},m=(d,F)=>{g(!1),d.result=F,o&&$()};return{message(d,F){y(a[0],d,F)},group(d){const F={header:d,value:"",full:""};return a.push(F),{message(f,v){y(F,f,v)},error(f){m(F,{status:"error",message:f})},success(f){m(F,{status:"success",message:f})}}},error(d,F){g(!0),R.error(d,{output:r,secondarySymbol:i,spacing:1}),F?.showLog!==!1&&p(),a.splice(1,a.length-1),a[0].value="",a[0].full=""},success(d,F){g(!0),R.success(d,{output:r,secondarySymbol:i,spacing:1}),F?.showLog===!0&&p(),a.splice(1,a.length-1),a[0].value="",a[0].full=""}}},Qt=e=>new ut({validate:e.validate,placeholder:e.placeholder,defaultValue:e.defaultValue,initialValue:e.initialValue,output:e.output,signal:e.signal,input:e.input,render(){const r=(e?.withGuide??H.withGuide)!==!1,s=`${`${r?`${t.gray(h)} | ||
| `:""}${W(this.state)} `}${e.message} | ||
| `:""}${N(this.state)} `}${e.message} | ||
| `,i=e.placeholder?t.inverse(e.placeholder[0])+t.dim(e.placeholder.slice(1)):t.inverse(t.hidden("_")),n=this.userInput?this.userInputWithCursor:i,l=this.value??"";switch(this.state){case"error":{const u=this.error?` ${t.yellow(this.error)}`:"",o=r?`${t.yellow(h)} `:"",a=r?t.yellow(x):"";return`${s.trim()} | ||
@@ -144,3 +144,3 @@ ${o}${n} | ||
| ${o} | ||
| `}}}}).prompt();export{h as S_BAR,x as S_BAR_END,Oe as S_BAR_END_RIGHT,se as S_BAR_H,$e as S_BAR_START,Re as S_BAR_START_RIGHT,te as S_CHECKBOX_ACTIVE,z as S_CHECKBOX_INACTIVE,V as S_CHECKBOX_SELECTED,Ne as S_CONNECT_LEFT,pe as S_CORNER_BOTTOM_LEFT,me as S_CORNER_BOTTOM_RIGHT,We as S_CORNER_TOP_LEFT,he as S_CORNER_TOP_RIGHT,ye as S_ERROR,ge as S_INFO,Pe as S_PASSWORD_MASK,Y as S_RADIO_ACTIVE,K as S_RADIO_INACTIVE,Me as S_STEP_ACTIVE,ce as S_STEP_CANCEL,de as S_STEP_ERROR,j as S_STEP_SUBMIT,fe as S_SUCCESS,Fe as S_WARN,Je as autocomplete,bt as autocompleteMultiselect,Tt as box,Pt as cancel,Mt as confirm,Rt as group,Ot as groupMultiselect,Nt as intro,ue as isCI,Te as isTTY,J as limitOptions,R as log,Lt as multiselect,kt as note,Wt as outro,Gt as password,Ht as path,Kt as progress,qt as select,Jt as selectKey,Se as spinner,k as stream,W as symbol,Ee as symbolBar,zt as taskLog,Xt as tasks,Qt as text,ee as unicode,w as unicodeOr}; | ||
| `}}}}).prompt();export{h as S_BAR,x as S_BAR_END,Oe as S_BAR_END_RIGHT,se as S_BAR_H,$e as S_BAR_START,Re as S_BAR_START_RIGHT,te as S_CHECKBOX_ACTIVE,z as S_CHECKBOX_INACTIVE,k as S_CHECKBOX_SELECTED,Ne as S_CONNECT_LEFT,pe as S_CORNER_BOTTOM_LEFT,me as S_CORNER_BOTTOM_RIGHT,We as S_CORNER_TOP_LEFT,he as S_CORNER_TOP_RIGHT,ye as S_ERROR,ge as S_INFO,Pe as S_PASSWORD_MASK,Y as S_RADIO_ACTIVE,K as S_RADIO_INACTIVE,Me as S_STEP_ACTIVE,ce as S_STEP_CANCEL,de as S_STEP_ERROR,V as S_STEP_SUBMIT,fe as S_SUCCESS,Fe as S_WARN,Je as autocomplete,bt as autocompleteMultiselect,Tt as box,Pt as cancel,Mt as confirm,Rt as group,Ot as groupMultiselect,Nt as intro,ue as isCI,Te as isTTY,J as limitOptions,R as log,Lt as multiselect,kt as note,Wt as outro,Gt as password,Ht as path,Kt as progress,qt as select,Jt as selectKey,Se as spinner,G as stream,N as symbol,Ee as symbolBar,zt as taskLog,Xt as tasks,Qt as text,ee as unicode,w as unicodeOr}; | ||
| //# sourceMappingURL=index.mjs.map |
+1
-1
| { | ||
| "name": "@clack/prompts", | ||
| "version": "1.0.0-alpha.8", | ||
| "version": "1.0.0-alpha.9", | ||
| "type": "module", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.mjs", |
Sorry, the diff of this file is too big to display
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
234414
0.29%0
-100%