@cyclone-ui/cli 0.0.0-stage โ†’ 0.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/LICENSE +187 -0
  2. package/README.md +113 -2
  3. package/dist/add-DXaT7So9.mjs +1 -0
  4. package/dist/add.mjs +4 -0
  5. package/dist/analyze-a11y-DSQGGQW0.mjs +1 -0
  6. package/dist/analyze-a11y.mjs +2 -0
  7. package/dist/bin.mjs +9 -0
  8. package/dist/build-C5SQ7omP.mjs +1 -0
  9. package/dist/build.mjs +2 -0
  10. package/dist/completions-bash-config.mjs +6 -0
  11. package/dist/completions-bash-script.mjs +6 -0
  12. package/dist/completions-fish-config.mjs +6 -0
  13. package/dist/completions-fish-script.mjs +6 -0
  14. package/dist/completions-powershell-config.mjs +6 -0
  15. package/dist/completions-powershell-script.mjs +6 -0
  16. package/dist/completions-zsh-config.mjs +6 -0
  17. package/dist/completions-zsh-script.mjs +6 -0
  18. package/dist/components-CL5K9O-8.mjs +10 -0
  19. package/dist/config-4Rgq0kBY.mjs +1 -0
  20. package/dist/config-CcLxKgqv.mjs +1 -0
  21. package/dist/config-D4XQ3gm9.mjs +1 -0
  22. package/dist/config-DYtzUnW1.mjs +1 -0
  23. package/dist/config-DiyybDxS.mjs +1 -0
  24. package/dist/console-wWDh21MV.mjs +20 -0
  25. package/dist/create-tokens-BkSmDzsb.mjs +1 -0
  26. package/dist/create-tokens.mjs +2 -0
  27. package/dist/design-system-C6qKXe7_.mjs +1 -0
  28. package/dist/diff-BENt04nS.mjs +1 -0
  29. package/dist/diff.mjs +2 -0
  30. package/dist/docs-CV-tOshm.mjs +1 -0
  31. package/dist/docs.mjs +4 -0
  32. package/dist/guidelines-CaUBc0wB.mjs +1 -0
  33. package/dist/guidelines.mjs +2 -0
  34. package/dist/help.mjs +2 -0
  35. package/dist/info-Vg-ZDW4H.mjs +1 -0
  36. package/dist/info.mjs +2 -0
  37. package/dist/init-CTw6TmcL.mjs +1 -0
  38. package/dist/init.mjs +2 -0
  39. package/dist/list-components-CI9b0sg9.mjs +1 -0
  40. package/dist/list-components.mjs +2 -0
  41. package/dist/list-fonts-CtGQHoE_.mjs +1 -0
  42. package/dist/list-fonts.mjs +2 -0
  43. package/dist/list-icons-BNwuGwSr.mjs +1 -0
  44. package/dist/list-icons.mjs +2 -0
  45. package/dist/list-tokens-BSwZsUam.mjs +1 -0
  46. package/dist/list-tokens.mjs +2 -0
  47. package/dist/local-registry-pqsOERYj.mjs +1 -0
  48. package/dist/mcp-DleN2BRI.mjs +1 -0
  49. package/dist/mcp.mjs +48 -0
  50. package/dist/plan-BiklQTti.mjs +1 -0
  51. package/dist/plan.mjs +2 -0
  52. package/dist/prompts-zyeiNLLd.mjs +8 -0
  53. package/dist/registry-Bsa1pzvl.mjs +1 -0
  54. package/dist/registry-C95vaVW8.mjs +1 -0
  55. package/dist/registry-validate.mjs +2 -0
  56. package/dist/script-C089wQdt.mjs +1 -0
  57. package/dist/script-CIEAixHe.mjs +1 -0
  58. package/dist/script-CPF-jk49.mjs +1 -0
  59. package/dist/script-DUM1UD8_.mjs +1 -0
  60. package/dist/search-C78IX7wC.mjs +1 -0
  61. package/dist/search-components-Cv1FVd2d.mjs +1 -0
  62. package/dist/search-components.mjs +3 -0
  63. package/dist/search-fonts-S-_oxo-_.mjs +1 -0
  64. package/dist/search-fonts.mjs +3 -0
  65. package/dist/search-icons-9B6-pV_m.mjs +1 -0
  66. package/dist/search-icons.mjs +3 -0
  67. package/dist/search-tokens-ChSh44BL.mjs +1 -0
  68. package/dist/search-tokens.mjs +3 -0
  69. package/dist/search.mjs +3 -0
  70. package/dist/shared-BHWQIq8h.mjs +216 -0
  71. package/dist/shared-BgKqmf2q.mjs +103 -0
  72. package/dist/shared-Bs-4ebiC.mjs +249 -0
  73. package/dist/shared-DgLETJ0V.mjs +235 -0
  74. package/dist/update-BP6PyX8m.mjs +1 -0
  75. package/dist/update-DcG9HWj8.mjs +1 -0
  76. package/dist/update.mjs +2 -0
  77. package/dist/validate-BhYpRUOH.mjs +1 -0
  78. package/dist/view-DLb3I50K.mjs +1 -0
  79. package/dist/view.mjs +3 -0
  80. package/package.json +99 -4
@@ -0,0 +1 @@
1
+ import{D as e,S as t,h as n,t as r,x as i}from"./console-wWDh21MV.mjs";function a(){e(``),e(r(t.heading.secondary(`Usage:`))),e(t.body.secondary(`${t.usage.bin(`>_ cyclone-ui`)} ${t.usage.command(`diff`)} ${t.usage.args(`<components...>`)} ${t.usage.options(`[options]`)}`),{padding:0}),e(t.body.secondary(`${t.usage.bin(`>_ cyclone-ui`)} ${t.usage.command(`diff`)} ${t.usage.options(`[options]`)} ${t.usage.args(`<components...>`)}`),{padding:0}),e(``),e(r(t.heading.secondary(`Options:`))),i([[{value:t.body.primary(`--color, --colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Force colored terminal output (env: CYCLONE_UI_COLOR, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--no-color, --no-colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Force disable colored terminal output (env: CYCLONE_UI_NO_COLOR, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--cwd <cwd>`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`The working directory.`),align:`left`,border:`none`}],[{value:t.body.primary(`-?, -h, --help`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Show help information (default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`-i, --interact, --interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Enable interactive mode - will be set to false if running in a CI pipeline (env: CYCLONE_UI_INTERACTIVE, default: true).`),align:`left`,border:`none`}],[{value:t.body.primary(`--no-interactive, --non-interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Disable interactive mode - will be set to true if running in a CI pipeline (env: CYCLONE_UI_NON_INTERACTIVE, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--hide-banner, --no-banner`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Do not display the application banner displayed while running the CLI - will be set to true if running in a CI pipeline (env: CYCLONE_UI_NO_BANNER, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--no-color, --no-colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Force disable colored terminal output (env: CYCLONE_UI_NO_COLOR, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--no-interactive, --non-interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Disable interactive mode - will be set to true if running in a CI pipeline (env: CYCLONE_UI_NON_INTERACTIVE, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--quiet`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Suppress command decorations and diagnostic messages (default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--registry <registry>`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Registry API URL.`),align:`left`,border:`none`}],[{value:t.body.primary(`-V, --verbose`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Enable verbose output (env: CYCLONE_UI_VERBOSE, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`-v, --version`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Show the version of the application (default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`-y, --yes`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Skip all prompts by answering yes to all of them - will be set to true if running in a CI pipeline (env: CYCLONE_UI_YES, default: false).`),align:`left`,border:`none`}]]),e(``),e(t.body.tertiary(`More information can be found in the Diff Components command documentation at ${n(`https://docs.cyclone-ui.com/reference/cli/diff`)}${t.body.tertiary(`.`)}`),{padding:0}),e(``)}export{a as t};
package/dist/diff.mjs ADDED
@@ -0,0 +1,2 @@
1
+ import{A as e,B as t,D as n,E as r,F as i,G as a,I as o,K as s,L as c,N as l,S as u,U as d,V as f,_ as p,j as m,k as h,n as g,t as _,y as v,z as y}from"./console-wWDh21MV.mjs";import{a as b}from"./prompts-zyeiNLLd.mjs";import{t as x}from"./update-BP6PyX8m.mjs";import{a as S}from"./config-D4XQ3gm9.mjs";import{n as C}from"./registry-C95vaVW8.mjs";import{n as w,r as T}from"./components-CL5K9O-8.mjs";import{t as E}from"./diff-BENt04nS.mjs";import{resolve as D}from"node:path";async function O(r=500){if(t().get(`is-banner-displayed`)||i(`no-banner`)||i(`hide-banner`)||m)return;t().set(`is-banner-displayed`,!0),n(``),n(g.banner.outline.primary(`โ”`)+g.banner.outline.primary(`โ”`.repeat(6))+` `+u.banner.header.primary(`โฌค`)+` `+g.banner.outline.primary(`โ”`)+` `+_(u.banner.header.primary(`Cyclone CLI v0.6.1`))+` `+g.banner.outline.primary(`โ”`.repeat(Math.max(h().columns-32,0)))+g.banner.outline.primary(`โ”“`),{consoleFn:console.log});let a=Math.max(...b.map(e=>v(e).length))>Math.max(h().columns+30,20)?`Cyclone User Interface`:`\n${b.join(`
2
+ `)}\n`;p(a,Math.max(h().columns-30,20)).forEach(e=>{n(g.banner.outline.primary(`โ”ƒ`)+` `.repeat(Math.max(Math.floor((h().columns-(v(e).length+2))/2),0))+_(u.banner.title.primary(e))+` `.repeat(Math.max(Math.ceil((h().columns-(v(e).length+2))/2),0))+g.banner.outline.primary(`โ”ƒ`),{consoleFn:console.log})}),n(g.banner.outline.primary(`โ”ƒ`)+` `.repeat(Math.max(Math.floor((h().columns-(v(`Diff Components`).length+2))/2),0))+_(u.banner.command.primary(`Diff Components`))+` `.repeat(Math.max(Math.ceil((h().columns-(v(`Diff Components`).length+2))/2),0))+g.banner.outline.primary(`โ”ƒ`),{consoleFn:console.log}),p(_(u.banner.description.primary(`Compare installed components with the registry.`)),Math.max(60>h().columns/2?h().columns-6:h().columns-30,20)).forEach(e=>{n(g.banner.outline.primary(`โ”ƒ`)+` `.repeat(Math.max(Math.floor((h().columns-(v(e).length+2))/2),0))+u.banner.description.primary(e)+` `.repeat(Math.max(Math.ceil((h().columns-(v(e).length+2))/2),0))+g.banner.outline.primary(`โ”ƒ`),{consoleFn:console.log})}),n(g.banner.outline.primary(`โ”ƒ`)+` `.repeat(Math.max(h().columns-2,0))+g.banner.outline.primary(`โ”ƒ`),{consoleFn:console.log}),n(g.banner.outline.primary(`โ”—`)+g.banner.outline.primary(`โ”`.repeat(Math.max(h().columns-32,0)))+` `+_(u.banner.footer.primary(`https://cyclone-ui.com`))+` `+g.banner.outline.primary(`โ”`.repeat(6))+g.banner.outline.primary(`โ”›`),{consoleFn:console.log}),n(``),e&&!o()&&await l(r)}async function k(e,t=[]){let n=D(e.cwd??process.cwd()),i=await S(n),a=t.length>0?t:Object.keys(i.components);if(a.length===0)throw Error(`No installed components to compare.`);let o=await w(C(e.registry??i.registry),i,a,{root:n,overwrite:!0,dryRun:!0});r(T(o,n))}async function A(e=c()){let t={...y()};for(let n=0;n<e.slice(0).length;n++){let r=e[n].length>3&&e[n].startsWith(`--`)?`--${e[n].slice(2).replaceAll(`-`,``).toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)}`:e[n].length>2&&e[n].startsWith(`-`)?`-${e[n].slice(1).replaceAll(`-`,``)}`:e[n];r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`cwd=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`cwd`||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`cwd=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`cwd`?/^--?(cwd)=/.test(`-`+r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))?t.cwd=r.replace(/^--?(cwd)=/,``).trim().replace(/^("|')/,``).replace(/("|')$/,``):e.length>n+1&&(t.cwd=e[++n].trim().replace(/^("|')/,``).replace(/("|')$/,``)):(r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`registry=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`registry`||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`registry=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`registry`)&&(/^--?(registry)=/.test(`-`+r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))?t.registry=r.replace(/^--?(registry)=/,``).trim().replace(/^("|')/,``).replace(/("|')$/,``):e.length>n+1&&(t.registry=e[++n].trim().replace(/^("|')/,``).replace(/("|')$/,``)))}let r=Math.max(0,e.slice(2).findIndex(e=>e.startsWith(`-`)&&/^(cwd|registry)=?.*$/.test(e.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))))+2,l=r>2?2:Math.max(0,e.slice(r).findLastIndex(e=>e.startsWith(`-`)&&/^(cwd|registry)=?.*$/.test(e.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))))+2,p=[];return l+0<e.length&&l+0!==r&&(p=e.slice(l+0,(r>l?r:e.length)-1).join(` `).split(`,`).map(e=>e.trim().replace(/^("|')/,``).replace(/("|')$/,``)).filter(Boolean)),i(`quiet`)||(await O(),await x()),!o()&&!i(`quiet`)&&(n(``),(s||a||d.LOG_LEVEL===`debug`)&&n(u.body.tertiary(`Debug mode is enabled. Additional debug information may be logged to the console.`))),t.help?E():f(`diff`,[`diff`],[t,p],k)}export{A as handler};
@@ -0,0 +1 @@
1
+ import{D as e,S as t,h as n,t as r,x as i}from"./console-wWDh21MV.mjs";function a(){e(``),e(r(t.heading.secondary(`Usage:`))),e(t.body.secondary(`${t.usage.bin(`>_ cyclone-ui`)} ${t.usage.command(`docs`)} ${t.usage.args(`<components...>`)} ${t.usage.options(`[options]`)}`),{padding:0}),e(t.body.secondary(`${t.usage.bin(`>_ cyclone-ui`)} ${t.usage.command(`docs`)} ${t.usage.options(`[options]`)} ${t.usage.args(`<components...>`)}`),{padding:0}),e(``),e(r(t.heading.secondary(`Options:`))),i([[{value:t.body.primary(`--color, --colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Force colored terminal output (env: CYCLONE_UI_COLOR, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--no-color, --no-colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Force disable colored terminal output (env: CYCLONE_UI_NO_COLOR, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--cwd <cwd>`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`The working directory.`),align:`left`,border:`none`}],[{value:t.body.primary(`-?, -h, --help`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Show help information (default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`-i, --interact, --interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Enable interactive mode - will be set to false if running in a CI pipeline (env: CYCLONE_UI_INTERACTIVE, default: true).`),align:`left`,border:`none`}],[{value:t.body.primary(`--no-interactive, --non-interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Disable interactive mode - will be set to true if running in a CI pipeline (env: CYCLONE_UI_NON_INTERACTIVE, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--json`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Output machine-readable JSON.`),align:`left`,border:`none`}],[{value:t.body.primary(`--hide-banner, --no-banner`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Do not display the application banner displayed while running the CLI - will be set to true if running in a CI pipeline (env: CYCLONE_UI_NO_BANNER, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--no-color, --no-colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Force disable colored terminal output (env: CYCLONE_UI_NO_COLOR, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--no-interactive, --non-interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Disable interactive mode - will be set to true if running in a CI pipeline (env: CYCLONE_UI_NON_INTERACTIVE, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--quiet`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Suppress command decorations and diagnostic messages (default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--registry <registry>`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Registry API URL.`),align:`left`,border:`none`}],[{value:t.body.primary(`-V, --verbose`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Enable verbose output (env: CYCLONE_UI_VERBOSE, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`-v, --version`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Show the version of the application (default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`-y, --yes`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Skip all prompts by answering yes to all of them - will be set to true if running in a CI pipeline (env: CYCLONE_UI_YES, default: false).`),align:`left`,border:`none`}]]),e(``),e(t.body.tertiary(`More information can be found in the Component Documentation command documentation at ${n(`https://docs.cyclone-ui.com/reference/cli/docs`)}${t.body.tertiary(`.`)}`),{padding:0}),e(``)}export{a as t};
package/dist/docs.mjs ADDED
@@ -0,0 +1,4 @@
1
+ import{A as e,B as t,D as n,E as r,F as i,G as a,I as o,K as s,L as c,N as l,S as u,U as d,V as f,_ as p,c as m,j as h,k as g,m as _,n as v,t as y,y as b,z as x}from"./console-wWDh21MV.mjs";import{a as S,r as C,t as w}from"./prompts-zyeiNLLd.mjs";import{t as T}from"./update-BP6PyX8m.mjs";import{i as E}from"./config-D4XQ3gm9.mjs";import{n as D,t as O}from"./registry-C95vaVW8.mjs";import{t as k}from"./docs-CV-tOshm.mjs";import{resolve as A}from"node:path";import{DEFAULT_REGISTRY_URL as j}from"@cyclone-ui/registry-api/client";async function M(r=500){if(t().get(`is-banner-displayed`)||i(`no-banner`)||i(`hide-banner`)||h)return;t().set(`is-banner-displayed`,!0),n(``),n(v.banner.outline.primary(`โ”`)+v.banner.outline.primary(`โ”`.repeat(6))+` `+u.banner.header.primary(`โฌค`)+` `+v.banner.outline.primary(`โ”`)+` `+y(u.banner.header.primary(`Cyclone CLI v0.6.1`))+` `+v.banner.outline.primary(`โ”`.repeat(Math.max(g().columns-32,0)))+v.banner.outline.primary(`โ”“`),{consoleFn:console.log});let a=Math.max(...S.map(e=>b(e).length))>Math.max(g().columns+30,20)?`Cyclone User Interface`:`\n${S.join(`
2
+ `)}\n`;p(a,Math.max(g().columns-30,20)).forEach(e=>{n(v.banner.outline.primary(`โ”ƒ`)+` `.repeat(Math.max(Math.floor((g().columns-(b(e).length+2))/2),0))+y(u.banner.title.primary(e))+` `.repeat(Math.max(Math.ceil((g().columns-(b(e).length+2))/2),0))+v.banner.outline.primary(`โ”ƒ`),{consoleFn:console.log})}),n(v.banner.outline.primary(`โ”ƒ`)+` `.repeat(Math.max(Math.floor((g().columns-(b(`Component Documentation`).length+2))/2),0))+y(u.banner.command.primary(`Component Documentation`))+` `.repeat(Math.max(Math.ceil((g().columns-(b(`Component Documentation`).length+2))/2),0))+v.banner.outline.primary(`โ”ƒ`),{consoleFn:console.log}),p(y(u.banner.description.primary(`Get documentation links for registry components.`)),Math.max(60>g().columns/2?g().columns-6:g().columns-30,20)).forEach(e=>{n(v.banner.outline.primary(`โ”ƒ`)+` `.repeat(Math.max(Math.floor((g().columns-(b(e).length+2))/2),0))+u.banner.description.primary(e)+` `.repeat(Math.max(Math.ceil((g().columns-(b(e).length+2))/2),0))+v.banner.outline.primary(`โ”ƒ`),{consoleFn:console.log})}),n(v.banner.outline.primary(`โ”ƒ`)+` `.repeat(Math.max(g().columns-2,0))+v.banner.outline.primary(`โ”ƒ`),{consoleFn:console.log}),n(v.banner.outline.primary(`โ”—`)+v.banner.outline.primary(`โ”`.repeat(Math.max(g().columns-32,0)))+` `+y(u.banner.footer.primary(`https://cyclone-ui.com`))+` `+v.banner.outline.primary(`โ”`.repeat(6))+v.banner.outline.primary(`โ”›`),{consoleFn:console.log}),n(``),e&&!o()&&await l(r)}async function N(e,t){let n=A(e.cwd??process.cwd()),i=await E(n),a=D(e.registry??i?.registry??j),o=await Promise.all(t.map(async e=>{let t=await a.components.get.query(e),n=O(t.name);return{name:t.name,description:t.description,url:`https://docs.stormsoftware.com/projects/cyclone-ui/components/${n}`}}));r(e.json?JSON.stringify(o,null,2):o.map(e=>`${e.name}: ${e.url}`).join(`
3
+ `))}async function P(t=c()){let r={...x()};for(let e=0;e<t.slice(0).length;e++){let n=t[e].length>3&&t[e].startsWith(`--`)?`--${t[e].slice(2).replaceAll(`-`,``).toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)}`:t[e].length>2&&t[e].startsWith(`-`)?`-${t[e].slice(1).replaceAll(`-`,``)}`:t[e];if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`cwd=`)||n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`cwd`||n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`cwd=`)||n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`cwd`)/^--?(cwd)=/.test(`-`+n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))?r.cwd=n.replace(/^--?(cwd)=/,``).trim().replace(/^("|')/,``).replace(/("|')$/,``):t.length>e+1&&(r.cwd=t[++e].trim().replace(/^("|')/,``).replace(/("|')$/,``));else if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`registry=`)||n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`registry`||n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`registry=`)||n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`registry`)/^--?(registry)=/.test(`-`+n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))?r.registry=n.replace(/^--?(registry)=/,``).trim().replace(/^("|')/,``).replace(/("|')$/,``):t.length>e+1&&(r.registry=t[++e].trim().replace(/^("|')/,``).replace(/("|')$/,``));else if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`json=`)||n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`json`||n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`json=`)||n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`json`){if(/^--?(json)=/.test(`-`+n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))){let e=n.replace(/^--?(json)=/,``).trim().replace(/^("|')/,``).replace(/("|')$/,``).toLowerCase();r.json=!!e&&e.toLowerCase()!==`false`&&e.toLowerCase()!==`f`&&e.toLowerCase()!==`no`&&e!==`n`&&e.toLowerCase()!==`0`&&e.toLowerCase()!==`off`&&e!==`disable`&&e.toLowerCase()!==`disabled`&&e.toLowerCase()!==`never`&&(Number.isNaN(Number.parseFloat(e))||Number.parseFloat(e)>0)}else r.json=!0}}let l=Math.max(0,t.slice(2).findIndex(e=>e.startsWith(`-`)&&/^(cwd|registry|json)=?.*$/.test(e.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))))+2,p=l>2?2:Math.max(0,t.slice(l).findLastIndex(e=>e.startsWith(`-`)&&/^(cwd|registry|json)=?.*$/.test(e.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))))+2,h=[];if(p+0<t.length&&p+0!==l&&(h=t.slice(p+0,(l>p?l:t.length)-1).join(` `).split(`,`).map(e=>e.trim().replace(/^("|')/,``).replace(/("|')$/,``)).filter(Boolean)),i(`quiet`)||(await M(),await T()),!o()&&!i(`quiet`)&&(n(``),(s||a||d.LOG_LEVEL===`debug`)&&n(u.body.tertiary(`Debug mode is enabled. Additional debug information may be logged to the console.`))),!e){let e=[];h?h.length===0&&e.push(`No values were provided to the required "components" array positional argument`):e.push(`Missing required "components" positional argument`)}else if(!o()&&(!h||h.length===0)){if(n(``),!h){let e=await C({message:`Please provide a value for the ${_(`components`)} argument`,description:`Component names to document.`,validate(e){return!e||e.trim()===``?`A value must be provided for this argument`:null}});if(w(e))return;h=e}else if(h.length===0){let e=await C({message:`Please provide one or more values for the ${_(`components`)} argument (values are separated by a \",\" character)`,description:`Component names to document.`,validate(e){if(!e||e.trim()===``)return`A value must be provided for this argument`;if(e.split(`,`).map(e=>e.trim()).filter(Boolean).length===0)return`At least one value must be provided for this argument`}});if(w(e))return;h=e.split(`,`).map(e=>e.trim()).filter(Boolean)}n(``);let e=[];h?h.length===0&&e.push(`No values were provided to the required "components" array positional argument`):e.push(`Missing required "components" positional argument`),e.length>0&&(m(`The following validation failures were found while processing the user provided input, and must be corrected before the ${_(`Component Documentation`)} command can be executed: \n\n${e.map(e=>` - `+e).join(`
4
+ `)}`),r.help=!0)}return r.help?k():f(`docs`,[`docs`],[r,h],N)}export{P as handler};
@@ -0,0 +1 @@
1
+ import{D as e,S as t,h as n,p as r,t as i,x as a}from"./console-wWDh21MV.mjs";function o(){e(`${i(t.heading.secondary(`Tags: `))} ${t.tags.designSystem?t.tags.designSystem(r(` Design System `)):t.tags.default(r(` Design System `))} ${t.tags.docs?t.tags.docs(r(` Docs `)):t.tags.default(r(` Docs `))}`,{padding:0}),e(``),e(i(t.heading.secondary(`Usage:`))),e(t.body.secondary(`${t.usage.bin(`>_ cyclone-ui`)} ${t.usage.command(`guidelines`)} ${t.usage.options(`[options]`)}`),{padding:0}),e(``),e(i(t.heading.secondary(`Options:`))),a([[{value:t.body.primary(`--color, --colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Force colored terminal output (env: CYCLONE_UI_COLOR, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--no-color, --no-colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Force disable colored terminal output (env: CYCLONE_UI_NO_COLOR, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`-?, -h, --help`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Show help information (default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`-i, --interact, --interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Enable interactive mode - will be set to false if running in a CI pipeline (env: CYCLONE_UI_INTERACTIVE, default: true).`),align:`left`,border:`none`}],[{value:t.body.primary(`--no-interactive, --non-interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Disable interactive mode - will be set to true if running in a CI pipeline (env: CYCLONE_UI_NON_INTERACTIVE, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--limit <limit>`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Maximum matches per term when searching (default: 1).`),align:`left`,border:`none`}],[{value:t.body.primary(`--hide-banner, --no-banner`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Do not display the application banner displayed while running the CLI - will be set to true if running in a CI pipeline (env: CYCLONE_UI_NO_BANNER, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--no-color, --no-colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Force disable colored terminal output (env: CYCLONE_UI_NO_COLOR, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--no-interactive, --non-interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Disable interactive mode - will be set to true if running in a CI pipeline (env: CYCLONE_UI_NON_INTERACTIVE, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--quiet`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Suppress command decorations and diagnostic messages (default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--terms <terms...>`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Search terms matched against guideline keywords, titles and body (fuzzy).`),align:`left`,border:`none`}],[{value:t.body.primary(`-V, --verbose`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Enable verbose output (env: CYCLONE_UI_VERBOSE, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`-v, --version`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Show the version of the application (default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`-y, --yes`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Skip all prompts by answering yes to all of them - will be set to true if running in a CI pipeline (env: CYCLONE_UI_YES, default: false).`),align:`left`,border:`none`}]]),e(``),e(t.body.tertiary(`More information can be found in the Guidelines command documentation at ${n(`https://docs.cyclone-ui.com/reference/cli/guidelines`)}${t.body.tertiary(`.`)}`),{padding:0}),e(``)}export{o as t};
@@ -0,0 +1,2 @@
1
+ import{A as e,B as t,D as n,F as r,G as i,I as a,K as o,L as s,N as c,S as l,U as u,V as d,_ as f,j as p,k as m,n as h,t as g,y as _,z as v}from"./console-wWDh21MV.mjs";import{a as y}from"./prompts-zyeiNLLd.mjs";import{t as b}from"./update-BP6PyX8m.mjs";import{t as x}from"./design-system-C6qKXe7_.mjs";import{t as S}from"./guidelines-CaUBc0wB.mjs";import{getGuidelines as C}from"@razorwind/shell-shock/runtime";async function w(i=500){if(t().get(`is-banner-displayed`)||r(`no-banner`)||r(`hide-banner`)||p)return;t().set(`is-banner-displayed`,!0),n(``),n(h.banner.outline.primary(`โ”`)+h.banner.outline.primary(`โ”`.repeat(6))+` `+l.banner.header.primary(`โฌค`)+` `+h.banner.outline.primary(`โ”`)+` `+g(l.banner.header.primary(`Cyclone CLI v0.6.1`))+` `+h.banner.outline.primary(`โ”`.repeat(Math.max(m().columns-32,0)))+h.banner.outline.primary(`โ”“`),{consoleFn:console.log});let o=Math.max(...y.map(e=>_(e).length))>Math.max(m().columns+30,20)?`Cyclone User Interface`:`\n${y.join(`
2
+ `)}\n`;f(o,Math.max(m().columns-30,20)).forEach(e=>{n(h.banner.outline.primary(`โ”ƒ`)+` `.repeat(Math.max(Math.floor((m().columns-(_(e).length+2))/2),0))+g(l.banner.title.primary(e))+` `.repeat(Math.max(Math.ceil((m().columns-(_(e).length+2))/2),0))+h.banner.outline.primary(`โ”ƒ`),{consoleFn:console.log})}),n(h.banner.outline.primary(`โ”ƒ`)+` `.repeat(Math.max(Math.floor((m().columns-(_(`Guidelines`).length+2))/2),0))+g(l.banner.command.primary(`Guidelines`))+` `.repeat(Math.max(Math.ceil((m().columns-(_(`Guidelines`).length+2))/2),0))+h.banner.outline.primary(`โ”ƒ`),{consoleFn:console.log}),f(g(l.banner.description.primary(`Return design-system guidelines as Markdown: an overview of the token groups, one section per component (with usage examples), typography, the design-system style guidelines, and any bundled guideline documents. Pass --terms to search; omit for the full set.`)),Math.max(60>m().columns/2?m().columns-6:m().columns-30,20)).forEach(e=>{n(h.banner.outline.primary(`โ”ƒ`)+` `.repeat(Math.max(Math.floor((m().columns-(_(e).length+2))/2),0))+l.banner.description.primary(e)+` `.repeat(Math.max(Math.ceil((m().columns-(_(e).length+2))/2),0))+h.banner.outline.primary(`โ”ƒ`),{consoleFn:console.log})}),n(h.banner.outline.primary(`โ”ƒ`)+` `.repeat(Math.max(m().columns-2,0))+h.banner.outline.primary(`โ”ƒ`),{consoleFn:console.log}),n(h.banner.outline.primary(`โ”—`)+h.banner.outline.primary(`โ”`.repeat(Math.max(m().columns-32,0)))+` `+g(l.banner.footer.primary(`https://cyclone-ui.com`))+` `+h.banner.outline.primary(`โ”`.repeat(6))+h.banner.outline.primary(`โ”›`),{consoleFn:console.log}),n(``),e&&!a()&&await c(i)}function T(e){process.stdout.write(`${typeof e==`string`?e:JSON.stringify(e,null,2)}\n`)}async function E(e){T(C(x,{terms:e.terms,limit:e.limit}))}async function D(t=s()){let c={...v(),terms:[],limit:1};for(let e=0;e<t.slice(0).length;e++){let n=t[e].length>3&&t[e].startsWith(`--`)?`--${t[e].slice(2).replaceAll(`-`,``).toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)}`:t[e].length>2&&t[e].startsWith(`-`)?`-${t[e].slice(1).replaceAll(`-`,``)}`:t[e];if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`terms=`)||n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`terms`||n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`terms=`)||n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`terms`)c.terms??=[],/^--?(terms)=/.test(`-`+n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))?c.terms.push(...n.replace(/^--?(terms)=/,``).split(`,`).map(e=>e.trim().replace(/^("|')/,``).replace(/("|')$/,``)).filter(Boolean)):t.length>e+1&&c.terms.push(...t[++e].split(`,`).map(e=>e.trim().replace(/^("|')/,``).replace(/("|')$/,``)).filter(Boolean));else if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`limit=`)||n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`limit`||n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`limit=`)||n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`limit`){if(/^--?(limit)=/.test(`-`+n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))){let e=Number(n.replace(/^--?(limit)=/,``).trim().replace(/^("|')/,``).replace(/("|')$/,``));Number.isNaN(e)||(c.limit=e)}else if(t.length>e+1){let n=Number(t[++e].trim().replace(/^("|')/,``).replace(/("|')$/,``));Number.isNaN(n)||(c.limit=n)}}}return r(`quiet`)||(await w(),await b()),!a()&&!r(`quiet`)&&(n(``),(o||i||u.LOG_LEVEL===`debug`)&&n(l.body.tertiary(`Debug mode is enabled. Additional debug information may be logged to the console.`))),e||c.limit&&Number.isNaN(c.limit)&&[].push(`Invalid numeric value provided for the "limit" option`),c.help?S():d(`guidelines`,[`guidelines`],[c],E)}export{D as handler};
package/dist/help.mjs ADDED
@@ -0,0 +1,2 @@
1
+ import{A as e,B as t,D as n,F as r,G as i,I as a,K as o,L as s,N as c,S as l,U as ee,V as u,_ as d,h as f,j as te,k as p,n as m,p as h,t as g,x as _,y as v,z as y}from"./console-wWDh21MV.mjs";import{a as b}from"./prompts-zyeiNLLd.mjs";import{a as x,i as S,n as C,o as w,r as T,s as E,t as D}from"./registry-Bsa1pzvl.mjs";import{t as O}from"./view-DLb3I50K.mjs";import{t as k}from"./update-BP6PyX8m.mjs";import{t as A}from"./search-C78IX7wC.mjs";import{t as j}from"./init-CTw6TmcL.mjs";import{t as M}from"./info-Vg-ZDW4H.mjs";import{t as N}from"./docs-CV-tOshm.mjs";import{t as P}from"./diff-BENt04nS.mjs";import{t as F}from"./create-tokens-BkSmDzsb.mjs";import{t as I}from"./build-C5SQ7omP.mjs";import{t as ne}from"./add-DXaT7So9.mjs";import{t as L}from"./script-C089wQdt.mjs";import{t as R}from"./config-DiyybDxS.mjs";import{t as z}from"./script-CPF-jk49.mjs";import{t as B}from"./config-CcLxKgqv.mjs";import{t as V}from"./script-CIEAixHe.mjs";import{t as H}from"./config-DYtzUnW1.mjs";import{t as U}from"./script-DUM1UD8_.mjs";import{t as W}from"./config-4Rgq0kBY.mjs";import{t as G}from"./update-DcG9HWj8.mjs";import{t as K}from"./search-tokens-ChSh44BL.mjs";import{t as q}from"./list-tokens-BSwZsUam.mjs";import{t as J}from"./search-components-Cv1FVd2d.mjs";import{t as Y}from"./list-components-CI9b0sg9.mjs";import{t as X}from"./search-icons-9B6-pV_m.mjs";import{t as Z}from"./list-icons-BNwuGwSr.mjs";import{t as re}from"./search-fonts-S-_oxo-_.mjs";import{t as ie}from"./list-fonts-CtGQHoE_.mjs";import{t as ae}from"./plan-BiklQTti.mjs";import{t as oe}from"./guidelines-CaUBc0wB.mjs";import{t as se}from"./analyze-a11y-DSQGGQW0.mjs";import{t as Q}from"./mcp-DleN2BRI.mjs";import{t as ce}from"./validate-BhYpRUOH.mjs";async function le(i=500){if(t().get(`is-banner-displayed`)||r(`no-banner`)||r(`hide-banner`)||te)return;t().set(`is-banner-displayed`,!0),n(``),n(m.banner.outline.primary(`โ”`)+m.banner.outline.primary(`โ”`.repeat(6))+` `+l.banner.header.primary(`โฌค`)+` `+m.banner.outline.primary(`โ”`)+` `+g(l.banner.header.primary(`Cyclone CLI v0.6.1`))+` `+m.banner.outline.primary(`โ”`.repeat(Math.max(p().columns-32,0)))+m.banner.outline.primary(`โ”“`),{consoleFn:console.log});let o=Math.max(...b.map(e=>v(e).length))>Math.max(p().columns+30,20)?`Cyclone User Interface`:`\n${b.join(`
2
+ `)}\n`;d(o,Math.max(p().columns-30,20)).forEach(e=>{n(m.banner.outline.primary(`โ”ƒ`)+` `.repeat(Math.max(Math.floor((p().columns-(v(e).length+2))/2),0))+g(l.banner.title.primary(e))+` `.repeat(Math.max(Math.ceil((p().columns-(v(e).length+2))/2),0))+m.banner.outline.primary(`โ”ƒ`),{consoleFn:console.log})}),n(m.banner.outline.primary(`โ”ƒ`)+` `.repeat(Math.max(Math.floor((p().columns-(v(`Help`).length+2))/2),0))+g(l.banner.command.primary(`Help`))+` `.repeat(Math.max(Math.ceil((p().columns-(v(`Help`).length+2))/2),0))+m.banner.outline.primary(`โ”ƒ`),{consoleFn:console.log}),d(g(l.banner.description.primary(`Display command usage details and other useful information to the user.`)),Math.max(60>p().columns/2?p().columns-6:p().columns-30,20)).forEach(e=>{n(m.banner.outline.primary(`โ”ƒ`)+` `.repeat(Math.max(Math.floor((p().columns-(v(e).length+2))/2),0))+l.banner.description.primary(e)+` `.repeat(Math.max(Math.ceil((p().columns-(v(e).length+2))/2),0))+m.banner.outline.primary(`โ”ƒ`),{consoleFn:console.log})}),n(m.banner.outline.primary(`โ”ƒ`)+` `.repeat(Math.max(p().columns-2,0))+m.banner.outline.primary(`โ”ƒ`),{consoleFn:console.log}),n(m.banner.outline.primary(`โ”—`)+m.banner.outline.primary(`โ”`.repeat(Math.max(p().columns-32,0)))+` `+g(l.banner.footer.primary(`https://cyclone-ui.com`))+` `+m.banner.outline.primary(`โ”`.repeat(6))+m.banner.outline.primary(`โ”›`),{consoleFn:console.log}),n(``),e&&!a()&&await c(i)}function $(){n(`${g(l.heading.secondary(`Tags: `))} ${l.tags.utility?l.tags.utility(h(` Utility `)):l.tags.default(h(` Utility `))}`,{padding:0}),n(``),n(g(l.heading.secondary(`Usage:`))),n(l.body.secondary(`${l.usage.bin(`>_ cyclone-ui`)} ${l.usage.command(`help`)} ${l.usage.args(`<commands...>`)} ${l.usage.options(`[options]`)}`),{padding:0}),n(l.body.secondary(`${l.usage.bin(`>_ cyclone-ui`)} ${l.usage.command(`help`)} ${l.usage.options(`[options]`)} ${l.usage.args(`<commands...>`)}`),{padding:0}),n(``),n(g(l.heading.secondary(`Options:`))),_([[{value:l.body.primary(`--color, --colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:l.body.tertiary(`Force colored terminal output (env: CYCLONE_UI_COLOR, default: false).`),align:`left`,border:`none`}],[{value:l.body.primary(`--no-color, --no-colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:l.body.tertiary(`Force disable colored terminal output (env: CYCLONE_UI_NO_COLOR, default: false).`),align:`left`,border:`none`}],[{value:l.body.primary(`-?, -h, --help`),align:`right`,border:`none`,maxWidth:`1/3`},{value:l.body.tertiary(`Show help information (default: false).`),align:`left`,border:`none`}],[{value:l.body.primary(`-i, --interact, --interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:l.body.tertiary(`Enable interactive mode - will be set to false if running in a CI pipeline (env: CYCLONE_UI_INTERACTIVE, default: true).`),align:`left`,border:`none`}],[{value:l.body.primary(`--no-interactive, --non-interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:l.body.tertiary(`Disable interactive mode - will be set to true if running in a CI pipeline (env: CYCLONE_UI_NON_INTERACTIVE, default: false).`),align:`left`,border:`none`}],[{value:l.body.primary(`--hide-banner, --no-banner`),align:`right`,border:`none`,maxWidth:`1/3`},{value:l.body.tertiary(`Do not display the application banner displayed while running the CLI - will be set to true if running in a CI pipeline (env: CYCLONE_UI_NO_BANNER, default: false).`),align:`left`,border:`none`}],[{value:l.body.primary(`--no-color, --no-colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:l.body.tertiary(`Force disable colored terminal output (env: CYCLONE_UI_NO_COLOR, default: false).`),align:`left`,border:`none`}],[{value:l.body.primary(`--no-interactive, --non-interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:l.body.tertiary(`Disable interactive mode - will be set to true if running in a CI pipeline (env: CYCLONE_UI_NON_INTERACTIVE, default: false).`),align:`left`,border:`none`}],[{value:l.body.primary(`--quiet`),align:`right`,border:`none`,maxWidth:`1/3`},{value:l.body.tertiary(`Suppress command decorations and diagnostic messages (default: false).`),align:`left`,border:`none`}],[{value:l.body.primary(`-V, --verbose`),align:`right`,border:`none`,maxWidth:`1/3`},{value:l.body.tertiary(`Enable verbose output (env: CYCLONE_UI_VERBOSE, default: false).`),align:`left`,border:`none`}],[{value:l.body.primary(`-v, --version`),align:`right`,border:`none`,maxWidth:`1/3`},{value:l.body.tertiary(`Show the version of the application (default: false).`),align:`left`,border:`none`}],[{value:l.body.primary(`-y, --yes`),align:`right`,border:`none`,maxWidth:`1/3`},{value:l.body.tertiary(`Skip all prompts by answering yes to all of them - will be set to true if running in a CI pipeline (env: CYCLONE_UI_YES, default: false).`),align:`left`,border:`none`}]]),n(``),n(l.body.tertiary(`More information can be found in the Help command documentation at ${f(`https://docs.cyclone-ui.com/reference/cli/help`)}${l.body.tertiary(`.`)}`),{padding:0}),n(``)}async function ue(e=[]){e.join(`/`).toLowerCase()===`add`?ne():e.join(`/`).toLowerCase()===`analyze-a11y`?se():e.join(`/`).toLowerCase()===`build`?I():e.join(`/`).toLowerCase()===`completions`?w():e.join(`/`).toLowerCase()===`completions/bash`?x():e.join(`/`).toLowerCase()===`completions/bash/config`?R():e.join(`/`).toLowerCase()===`completions/bash/script`?L():e.join(`/`).toLowerCase()===`completions/fish`?S():e.join(`/`).toLowerCase()===`completions/fish/config`?W():e.join(`/`).toLowerCase()===`completions/fish/script`?U():e.join(`/`).toLowerCase()===`completions/powershell`?T():e.join(`/`).toLowerCase()===`completions/powershell/config`?H():e.join(`/`).toLowerCase()===`completions/powershell/script`?V():e.join(`/`).toLowerCase()===`completions/zsh`?C():e.join(`/`).toLowerCase()===`completions/zsh/config`?B():e.join(`/`).toLowerCase()===`completions/zsh/script`?z():e.join(`/`).toLowerCase()===`create-tokens`?F():e.join(`/`).toLowerCase()===`diff`?P():e.join(`/`).toLowerCase()===`docs`?N():e.join(`/`).toLowerCase()===`guidelines`?oe():e.join(`/`).toLowerCase()===`help`?$():e.join(`/`).toLowerCase()===`info`?M():e.join(`/`).toLowerCase()===`init`?j():e.join(`/`).toLowerCase()===`list-components`?Y():e.join(`/`).toLowerCase()===`list-fonts`?ie():e.join(`/`).toLowerCase()===`list-icons`?Z():e.join(`/`).toLowerCase()===`list-tokens`?q():e.join(`/`).toLowerCase()===`mcp`?Q():e.join(`/`).toLowerCase()===`plan`?ae():e.join(`/`).toLowerCase()===`registry`?D():e.join(`/`).toLowerCase()===`registry/validate`?ce():e.join(`/`).toLowerCase()===`search`?A():e.join(`/`).toLowerCase()===`search-components`?J():e.join(`/`).toLowerCase()===`search-fonts`?re():e.join(`/`).toLowerCase()===`search-icons`?X():e.join(`/`).toLowerCase()===`search-tokens`?K():e.join(`/`).toLowerCase()===`update`?G():e.join(`/`).toLowerCase()===`view`?O():E()}async function de(e=s()){let t={...y()};for(let t=0;t<e.slice(0).length;t++)e[t].length>3&&e[t].startsWith(`--`)?`${e[t].slice(2).replaceAll(`-`,``).toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)}`:e[t].length>2&&e[t].startsWith(`-`)?`${e[t].slice(1).replaceAll(`-`,``)}`:e[t];let c=Math.max(0,e.slice(2).findIndex(e=>e.startsWith(`-`)&&/^()=?.*$/.test(e.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))))+2,d=c>2?2:Math.max(0,e.slice(c).findLastIndex(e=>e.startsWith(`-`)&&/^()=?.*$/.test(e.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))))+2,f=[];return d+0<e.length&&d+0!==c&&(f=e.slice(d+0,(c>d?c:e.length)-1).join(` `).split(`,`).map(e=>e.trim().replace(/^("|')/,``).replace(/("|')$/,``)).filter(Boolean)),r(`quiet`)||(await le(),await k()),!a()&&!r(`quiet`)&&(n(``),(o||i||ee.LOG_LEVEL===`debug`)&&n(l.body.tertiary(`Debug mode is enabled. Additional debug information may be logged to the console.`))),t.help?$():u(`help`,[`help`],[f],ue)}export{de as handler};
@@ -0,0 +1 @@
1
+ import{D as e,S as t,h as n,t as r,x as i}from"./console-wWDh21MV.mjs";function a(){e(``),e(r(t.heading.secondary(`Usage:`))),e(t.body.secondary(`${t.usage.bin(`>_ cyclone-ui`)} ${t.usage.command(`info`)} ${t.usage.options(`[options]`)}`),{padding:0}),e(``),e(r(t.heading.secondary(`Options:`))),i([[{value:t.body.primary(`--color, --colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Force colored terminal output (env: CYCLONE_UI_COLOR, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--no-color, --no-colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Force disable colored terminal output (env: CYCLONE_UI_NO_COLOR, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--cwd <cwd>`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`The working directory.`),align:`left`,border:`none`}],[{value:t.body.primary(`-?, -h, --help`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Show help information (default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`-i, --interact, --interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Enable interactive mode - will be set to false if running in a CI pipeline (env: CYCLONE_UI_INTERACTIVE, default: true).`),align:`left`,border:`none`}],[{value:t.body.primary(`--no-interactive, --non-interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Disable interactive mode - will be set to true if running in a CI pipeline (env: CYCLONE_UI_NON_INTERACTIVE, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--json`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Output machine-readable JSON.`),align:`left`,border:`none`}],[{value:t.body.primary(`--hide-banner, --no-banner`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Do not display the application banner displayed while running the CLI - will be set to true if running in a CI pipeline (env: CYCLONE_UI_NO_BANNER, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--no-color, --no-colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Force disable colored terminal output (env: CYCLONE_UI_NO_COLOR, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--no-interactive, --non-interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Disable interactive mode - will be set to true if running in a CI pipeline (env: CYCLONE_UI_NON_INTERACTIVE, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--quiet`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Suppress command decorations and diagnostic messages (default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`-V, --verbose`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Enable verbose output (env: CYCLONE_UI_VERBOSE, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`-v, --version`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Show the version of the application (default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`-y, --yes`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Skip all prompts by answering yes to all of them - will be set to true if running in a CI pipeline (env: CYCLONE_UI_YES, default: false).`),align:`left`,border:`none`}]]),e(``),e(t.body.tertiary(`More information can be found in the Project Information command documentation at ${n(`https://docs.cyclone-ui.com/reference/cli/info`)}${t.body.tertiary(`.`)}`),{padding:0}),e(``)}export{a as t};
package/dist/info.mjs ADDED
@@ -0,0 +1,2 @@
1
+ import{A as e,B as t,D as n,E as r,F as i,G as a,I as o,K as s,L as c,N as l,S as u,U as d,V as f,_ as p,j as m,k as h,n as g,t as _,y as v,z as y}from"./console-wWDh21MV.mjs";import{a as b}from"./prompts-zyeiNLLd.mjs";import{t as x}from"./update-BP6PyX8m.mjs";import{i as S,t as C}from"./config-D4XQ3gm9.mjs";import{t as w}from"./info-Vg-ZDW4H.mjs";import{resolve as T}from"node:path";async function E(r=500){if(t().get(`is-banner-displayed`)||i(`no-banner`)||i(`hide-banner`)||m)return;t().set(`is-banner-displayed`,!0),n(``),n(g.banner.outline.primary(`โ”`)+g.banner.outline.primary(`โ”`.repeat(6))+` `+u.banner.header.primary(`โฌค`)+` `+g.banner.outline.primary(`โ”`)+` `+_(u.banner.header.primary(`Cyclone CLI v0.6.1`))+` `+g.banner.outline.primary(`โ”`.repeat(Math.max(h().columns-32,0)))+g.banner.outline.primary(`โ”“`),{consoleFn:console.log});let a=Math.max(...b.map(e=>v(e).length))>Math.max(h().columns+30,20)?`Cyclone User Interface`:`\n${b.join(`
2
+ `)}\n`;p(a,Math.max(h().columns-30,20)).forEach(e=>{n(g.banner.outline.primary(`โ”ƒ`)+` `.repeat(Math.max(Math.floor((h().columns-(v(e).length+2))/2),0))+_(u.banner.title.primary(e))+` `.repeat(Math.max(Math.ceil((h().columns-(v(e).length+2))/2),0))+g.banner.outline.primary(`โ”ƒ`),{consoleFn:console.log})}),n(g.banner.outline.primary(`โ”ƒ`)+` `.repeat(Math.max(Math.floor((h().columns-(v(`Project Information`).length+2))/2),0))+_(u.banner.command.primary(`Project Information`))+` `.repeat(Math.max(Math.ceil((h().columns-(v(`Project Information`).length+2))/2),0))+g.banner.outline.primary(`โ”ƒ`),{consoleFn:console.log}),p(_(u.banner.description.primary(`Show Cyclone UI project configuration and installed components.`)),Math.max(60>h().columns/2?h().columns-6:h().columns-30,20)).forEach(e=>{n(g.banner.outline.primary(`โ”ƒ`)+` `.repeat(Math.max(Math.floor((h().columns-(v(e).length+2))/2),0))+u.banner.description.primary(e)+` `.repeat(Math.max(Math.ceil((h().columns-(v(e).length+2))/2),0))+g.banner.outline.primary(`โ”ƒ`),{consoleFn:console.log})}),n(g.banner.outline.primary(`โ”ƒ`)+` `.repeat(Math.max(h().columns-2,0))+g.banner.outline.primary(`โ”ƒ`),{consoleFn:console.log}),n(g.banner.outline.primary(`โ”—`)+g.banner.outline.primary(`โ”`.repeat(Math.max(h().columns-32,0)))+` `+_(u.banner.footer.primary(`https://cyclone-ui.com`))+` `+g.banner.outline.primary(`โ”`.repeat(6))+g.banner.outline.primary(`โ”›`),{consoleFn:console.log}),n(``),e&&!o()&&await l(r)}async function D(e){let t=T(e.cwd??process.cwd()),i=await S(t),a={root:t,configFile:i?T(t,C):null,registry:i?.registry??null,componentPath:i?T(t,i.path):null,components:i?.components??{}};e.json?r(JSON.stringify(a,null,2)):(n(`Project: ${a.root}`),n(`Configuration: ${a.configFile??`not initialized`}`),i&&(n(`Registry: ${i.registry}`),n(`Components: ${Object.keys(i.components).join(`, `)||`none`}`)))}async function O(e=c()){let t={...y()};for(let n=0;n<e.slice(0).length;n++){let r=e[n].length>3&&e[n].startsWith(`--`)?`--${e[n].slice(2).replaceAll(`-`,``).toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)}`:e[n].length>2&&e[n].startsWith(`-`)?`-${e[n].slice(1).replaceAll(`-`,``)}`:e[n];if(r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`cwd=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`cwd`||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`cwd=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`cwd`)/^--?(cwd)=/.test(`-`+r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))?t.cwd=r.replace(/^--?(cwd)=/,``).trim().replace(/^("|')/,``).replace(/("|')$/,``):e.length>n+1&&(t.cwd=e[++n].trim().replace(/^("|')/,``).replace(/("|')$/,``));else if(r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`json=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`json`||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`json=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`json`){if(/^--?(json)=/.test(`-`+r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))){let e=r.replace(/^--?(json)=/,``).trim().replace(/^("|')/,``).replace(/("|')$/,``).toLowerCase();t.json=!!e&&e.toLowerCase()!==`false`&&e.toLowerCase()!==`f`&&e.toLowerCase()!==`no`&&e!==`n`&&e.toLowerCase()!==`0`&&e.toLowerCase()!==`off`&&e!==`disable`&&e.toLowerCase()!==`disabled`&&e.toLowerCase()!==`never`&&(Number.isNaN(Number.parseFloat(e))||Number.parseFloat(e)>0)}else t.json=!0}}return i(`quiet`)||(await E(),await x()),!o()&&!i(`quiet`)&&(n(``),(s||a||d.LOG_LEVEL===`debug`)&&n(u.body.tertiary(`Debug mode is enabled. Additional debug information may be logged to the console.`))),t.help?w():f(`info`,[`info`],[t],D)}export{O as handler};
@@ -0,0 +1 @@
1
+ import{D as e,S as t,h as n,t as r,x as i}from"./console-wWDh21MV.mjs";function a(){e(``),e(r(t.heading.secondary(`Usage:`))),e(t.body.secondary(`${t.usage.bin(`>_ cyclone-ui`)} ${t.usage.command(`init`)} ${t.usage.args(`<components...>`)} ${t.usage.options(`[options]`)}`),{padding:0}),e(t.body.secondary(`${t.usage.bin(`>_ cyclone-ui`)} ${t.usage.command(`init`)} ${t.usage.options(`[options]`)} ${t.usage.args(`<components...>`)}`),{padding:0}),e(t.body.secondary(`${t.usage.bin(`>_ cyclone-ui`)} ${t.usage.command(`create`)} ${t.usage.args(`<components...>`)} ${t.usage.options(`[options]`)}`),{padding:0}),e(t.body.secondary(`${t.usage.bin(`>_ cyclone-ui`)} ${t.usage.command(`create`)} ${t.usage.options(`[options]`)} ${t.usage.args(`<components...>`)}`),{padding:0}),e(``),e(r(t.heading.secondary(`Options:`))),i([[{value:t.body.primary(`--color, --colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Force colored terminal output (env: CYCLONE_UI_COLOR, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--no-color, --no-colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Force disable colored terminal output (env: CYCLONE_UI_NO_COLOR, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--cwd <cwd>`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`The working directory.`),align:`left`,border:`none`}],[{value:t.body.primary(`--force`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Overwrite an existing Cyclone configuration.`),align:`left`,border:`none`}],[{value:t.body.primary(`-?, -h, --help`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Show help information (default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`-i, --interact, --interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Enable interactive mode - will be set to false if running in a CI pipeline (env: CYCLONE_UI_INTERACTIVE, default: true).`),align:`left`,border:`none`}],[{value:t.body.primary(`--no-interactive, --non-interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Disable interactive mode - will be set to true if running in a CI pipeline (env: CYCLONE_UI_NON_INTERACTIVE, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--hide-banner, --no-banner`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Do not display the application banner displayed while running the CLI - will be set to true if running in a CI pipeline (env: CYCLONE_UI_NO_BANNER, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--no-color, --no-colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Force disable colored terminal output (env: CYCLONE_UI_NO_COLOR, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--no-interactive, --non-interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Disable interactive mode - will be set to true if running in a CI pipeline (env: CYCLONE_UI_NON_INTERACTIVE, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--path <path>`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Component output path, relative to the working directory.`),align:`left`,border:`none`}],[{value:t.body.primary(`--quiet`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Suppress command decorations and diagnostic messages (default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--registry <registry>`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Registry API URL.`),align:`left`,border:`none`}],[{value:t.body.primary(`--silent`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Mute non-essential output.`),align:`left`,border:`none`}],[{value:t.body.primary(`-V, --verbose`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Enable verbose output (env: CYCLONE_UI_VERBOSE, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`-v, --version`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Show the version of the application (default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`-y, --yes`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Skip all prompts by answering yes to all of them - will be set to true if running in a CI pipeline (env: CYCLONE_UI_YES, default: false).`),align:`left`,border:`none`}]]),e(``),e(t.body.tertiary(`More information can be found in the Initialize command documentation at ${n(`https://docs.cyclone-ui.com/reference/cli/init`)}${t.body.tertiary(`.`)}`),{padding:0}),e(``)}export{a as t};
package/dist/init.mjs ADDED
@@ -0,0 +1,2 @@
1
+ import{A as e,B as t,D as n,F as r,G as i,I as a,K as o,L as s,N as c,S as l,U as u,V as d,_ as f,b as p,j as m,k as h,n as g,t as _,y as v,z as y}from"./console-wWDh21MV.mjs";import{a as b}from"./prompts-zyeiNLLd.mjs";import{t as x}from"./update-BP6PyX8m.mjs";import{n as S,o as C,r as w,s as T,t as E}from"./config-D4XQ3gm9.mjs";import{n as D}from"./registry-C95vaVW8.mjs";import{t as O}from"./init-CTw6TmcL.mjs";import{n as k,t as A}from"./components-CL5K9O-8.mjs";import{resolve as j}from"node:path";import{mkdir as M}from"node:fs/promises";async function N(i=500){if(t().get(`is-banner-displayed`)||r(`no-banner`)||r(`hide-banner`)||m)return;t().set(`is-banner-displayed`,!0),n(``),n(g.banner.outline.primary(`โ”`)+g.banner.outline.primary(`โ”`.repeat(6))+` `+l.banner.header.primary(`โฌค`)+` `+g.banner.outline.primary(`โ”`)+` `+_(l.banner.header.primary(`Cyclone CLI v0.6.1`))+` `+g.banner.outline.primary(`โ”`.repeat(Math.max(h().columns-32,0)))+g.banner.outline.primary(`โ”“`),{consoleFn:console.log});let o=Math.max(...b.map(e=>v(e).length))>Math.max(h().columns+30,20)?`Cyclone User Interface`:`\n${b.join(`
2
+ `)}\n`;f(o,Math.max(h().columns-30,20)).forEach(e=>{n(g.banner.outline.primary(`โ”ƒ`)+` `.repeat(Math.max(Math.floor((h().columns-(v(e).length+2))/2),0))+_(l.banner.title.primary(e))+` `.repeat(Math.max(Math.ceil((h().columns-(v(e).length+2))/2),0))+g.banner.outline.primary(`โ”ƒ`),{consoleFn:console.log})}),n(g.banner.outline.primary(`โ”ƒ`)+` `.repeat(Math.max(Math.floor((h().columns-(v(`Initialize`).length+2))/2),0))+_(l.banner.command.primary(`Initialize`))+` `.repeat(Math.max(Math.ceil((h().columns-(v(`Initialize`).length+2))/2),0))+g.banner.outline.primary(`โ”ƒ`),{consoleFn:console.log}),f(_(l.banner.description.primary(`Initialize Cyclone UI in a project.`)),Math.max(60>h().columns/2?h().columns-6:h().columns-30,20)).forEach(e=>{n(g.banner.outline.primary(`โ”ƒ`)+` `.repeat(Math.max(Math.floor((h().columns-(v(e).length+2))/2),0))+l.banner.description.primary(e)+` `.repeat(Math.max(Math.ceil((h().columns-(v(e).length+2))/2),0))+g.banner.outline.primary(`โ”ƒ`),{consoleFn:console.log})}),n(g.banner.outline.primary(`โ”ƒ`)+` `.repeat(Math.max(h().columns-2,0))+g.banner.outline.primary(`โ”ƒ`),{consoleFn:console.log}),n(g.banner.outline.primary(`โ”—`)+g.banner.outline.primary(`โ”`.repeat(Math.max(h().columns-32,0)))+` `+_(l.banner.footer.primary(`https://cyclone-ui.com`))+` `+g.banner.outline.primary(`โ”`.repeat(6))+g.banner.outline.primary(`โ”›`),{consoleFn:console.log}),n(``),e&&!a()&&await c(i)}async function P(e,t=[]){let n=j(e.cwd??process.cwd()),r=j(n,E);if(await w(r)&&!e.force)throw Error(`${E} already exists. Re-run with --force to replace it.`);let i=S({registry:e.registry,path:e.path});if(await M(C(n,i.path),{recursive:!0}),t.length>0){let r=await k(D(i.registry),i,t,{root:n,overwrite:e.force});await A(i,r,{root:n,overwrite:e.force})}else await T(n,i);e.silent||p(`Initialized Cyclone UI in ${n}.`)}async function F(e=s()){let t={...y()};for(let n=0;n<e.slice(0).length;n++){let r=e[n].length>3&&e[n].startsWith(`--`)?`--${e[n].slice(2).replaceAll(`-`,``).toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)}`:e[n].length>2&&e[n].startsWith(`-`)?`-${e[n].slice(1).replaceAll(`-`,``)}`:e[n];if(r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`cwd=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`cwd`||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`cwd=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`cwd`)/^--?(cwd)=/.test(`-`+r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))?t.cwd=r.replace(/^--?(cwd)=/,``).trim().replace(/^("|')/,``).replace(/("|')$/,``):e.length>n+1&&(t.cwd=e[++n].trim().replace(/^("|')/,``).replace(/("|')$/,``));else if(r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`path=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`path`||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`path=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`path`)/^--?(path)=/.test(`-`+r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))?t.path=r.replace(/^--?(path)=/,``).trim().replace(/^("|')/,``).replace(/("|')$/,``):e.length>n+1&&(t.path=e[++n].trim().replace(/^("|')/,``).replace(/("|')$/,``));else if(r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`registry=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`registry`||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`registry=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`registry`)/^--?(registry)=/.test(`-`+r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))?t.registry=r.replace(/^--?(registry)=/,``).trim().replace(/^("|')/,``).replace(/("|')$/,``):e.length>n+1&&(t.registry=e[++n].trim().replace(/^("|')/,``).replace(/("|')$/,``));else if(r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`force=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`force`||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`force=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`force`){if(/^--?(force)=/.test(`-`+r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))){let e=r.replace(/^--?(force)=/,``).trim().replace(/^("|')/,``).replace(/("|')$/,``).toLowerCase();t.force=!!e&&e.toLowerCase()!==`false`&&e.toLowerCase()!==`f`&&e.toLowerCase()!==`no`&&e!==`n`&&e.toLowerCase()!==`0`&&e.toLowerCase()!==`off`&&e!==`disable`&&e.toLowerCase()!==`disabled`&&e.toLowerCase()!==`never`&&(Number.isNaN(Number.parseFloat(e))||Number.parseFloat(e)>0)}else t.force=!0}else if(r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`silent=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`silent`||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`silent=`)||r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`silent`){if(/^--?(silent)=/.test(`-`+r.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))){let e=r.replace(/^--?(silent)=/,``).trim().replace(/^("|')/,``).replace(/("|')$/,``).toLowerCase();t.silent=!!e&&e.toLowerCase()!==`false`&&e.toLowerCase()!==`f`&&e.toLowerCase()!==`no`&&e!==`n`&&e.toLowerCase()!==`0`&&e.toLowerCase()!==`off`&&e!==`disable`&&e.toLowerCase()!==`disabled`&&e.toLowerCase()!==`never`&&(Number.isNaN(Number.parseFloat(e))||Number.parseFloat(e)>0)}else t.silent=!0}}let c=Math.max(0,e.slice(2).findIndex(e=>e.startsWith(`-`)&&/^(cwd|path|registry|force|silent)=?.*$/.test(e.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))))+2,f=c>2?2:Math.max(0,e.slice(c).findLastIndex(e=>e.startsWith(`-`)&&/^(cwd|path|registry|force|silent)=?.*$/.test(e.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))))+2,p=[];return f+0<e.length&&f+0!==c&&(p=e.slice(f+0,(c>f?c:e.length)-1).join(` `).split(`,`).map(e=>e.trim().replace(/^("|')/,``).replace(/("|')$/,``)).filter(Boolean)),r(`quiet`)||(await N(),await x()),!a()&&!r(`quiet`)&&(n(``),(o||i||u.LOG_LEVEL===`debug`)&&n(l.body.tertiary(`Debug mode is enabled. Additional debug information may be logged to the console.`))),t.help?O():d(`init`,[`init`],[t,p],P)}export{F as handler};
@@ -0,0 +1 @@
1
+ import{D as e,S as t,h as n,p as r,t as i,x as a}from"./console-wWDh21MV.mjs";function o(){e(`${i(t.heading.secondary(`Tags: `))} ${t.tags.designSystem?t.tags.designSystem(r(` Design System `)):t.tags.default(r(` Design System `))} ${t.tags.components?t.tags.components(r(` Components `)):t.tags.default(r(` Components `))}`,{padding:0}),e(``),e(i(t.heading.secondary(`Usage:`))),e(t.body.secondary(`${t.usage.bin(`>_ cyclone-ui`)} ${t.usage.command(`list-components`)} ${t.usage.options(`[options]`)}`),{padding:0}),e(``),e(i(t.heading.secondary(`Options:`))),a([[{value:t.body.primary(`--color, --colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Force colored terminal output (env: CYCLONE_UI_COLOR, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--no-color, --no-colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Force disable colored terminal output (env: CYCLONE_UI_NO_COLOR, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`-?, -h, --help`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Show help information (default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`-i, --interact, --interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Enable interactive mode - will be set to false if running in a CI pipeline (env: CYCLONE_UI_INTERACTIVE, default: true).`),align:`left`,border:`none`}],[{value:t.body.primary(`--no-interactive, --non-interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Disable interactive mode - will be set to true if running in a CI pipeline (env: CYCLONE_UI_NON_INTERACTIVE, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--hide-banner, --no-banner`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Do not display the application banner displayed while running the CLI - will be set to true if running in a CI pipeline (env: CYCLONE_UI_NO_BANNER, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--no-color, --no-colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Force disable colored terminal output (env: CYCLONE_UI_NO_COLOR, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--no-interactive, --non-interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Disable interactive mode - will be set to true if running in a CI pipeline (env: CYCLONE_UI_NON_INTERACTIVE, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--quiet`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Suppress command decorations and diagnostic messages (default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`-V, --verbose`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Enable verbose output (env: CYCLONE_UI_VERBOSE, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`-v, --version`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Show the version of the application (default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`-y, --yes`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Skip all prompts by answering yes to all of them - will be set to true if running in a CI pipeline (env: CYCLONE_UI_YES, default: false).`),align:`left`,border:`none`}]]),e(``),e(t.body.tertiary(`More information can be found in the List Components command documentation at ${n(`https://docs.cyclone-ui.com/reference/cli/list-components`)}${t.body.tertiary(`.`)}`),{padding:0}),e(``)}export{o as t};
@@ -0,0 +1,2 @@
1
+ import{A as e,B as t,D as n,F as r,G as i,I as a,K as o,L as s,N as c,S as l,U as u,V as d,_ as f,j as p,k as m,n as h,t as g,y as _,z as v}from"./console-wWDh21MV.mjs";import{a as y}from"./prompts-zyeiNLLd.mjs";import{t as b}from"./update-BP6PyX8m.mjs";import{t as x}from"./design-system-C6qKXe7_.mjs";import{t as S}from"./list-components-CI9b0sg9.mjs";import{listComponents as C}from"@razorwind/shell-shock/runtime";async function w(i=500){if(t().get(`is-banner-displayed`)||r(`no-banner`)||r(`hide-banner`)||p)return;t().set(`is-banner-displayed`,!0),n(``),n(h.banner.outline.primary(`โ”`)+h.banner.outline.primary(`โ”`.repeat(6))+` `+l.banner.header.primary(`โฌค`)+` `+h.banner.outline.primary(`โ”`)+` `+g(l.banner.header.primary(`Cyclone CLI v0.6.1`))+` `+h.banner.outline.primary(`โ”`.repeat(Math.max(m().columns-32,0)))+h.banner.outline.primary(`โ”“`),{consoleFn:console.log});let o=Math.max(...y.map(e=>_(e).length))>Math.max(m().columns+30,20)?`Cyclone User Interface`:`\n${y.join(`
2
+ `)}\n`;f(o,Math.max(m().columns-30,20)).forEach(e=>{n(h.banner.outline.primary(`โ”ƒ`)+` `.repeat(Math.max(Math.floor((m().columns-(_(e).length+2))/2),0))+g(l.banner.title.primary(e))+` `.repeat(Math.max(Math.ceil((m().columns-(_(e).length+2))/2),0))+h.banner.outline.primary(`โ”ƒ`),{consoleFn:console.log})}),n(h.banner.outline.primary(`โ”ƒ`)+` `.repeat(Math.max(Math.floor((m().columns-(_(`List Components`).length+2))/2),0))+g(l.banner.command.primary(`List Components`))+` `.repeat(Math.max(Math.ceil((m().columns-(_(`List Components`).length+2))/2),0))+h.banner.outline.primary(`โ”ƒ`),{consoleFn:console.log}),f(g(l.banner.description.primary(`Return every design-system component record. Large output - prefer search-components for normal use.`)),Math.max(60>m().columns/2?m().columns-6:m().columns-30,20)).forEach(e=>{n(h.banner.outline.primary(`โ”ƒ`)+` `.repeat(Math.max(Math.floor((m().columns-(_(e).length+2))/2),0))+l.banner.description.primary(e)+` `.repeat(Math.max(Math.ceil((m().columns-(_(e).length+2))/2),0))+h.banner.outline.primary(`โ”ƒ`),{consoleFn:console.log})}),n(h.banner.outline.primary(`โ”ƒ`)+` `.repeat(Math.max(m().columns-2,0))+h.banner.outline.primary(`โ”ƒ`),{consoleFn:console.log}),n(h.banner.outline.primary(`โ”—`)+h.banner.outline.primary(`โ”`.repeat(Math.max(m().columns-32,0)))+` `+g(l.banner.footer.primary(`https://cyclone-ui.com`))+` `+h.banner.outline.primary(`โ”`.repeat(6))+h.banner.outline.primary(`โ”›`),{consoleFn:console.log}),n(``),e&&!a()&&await c(i)}function T(e){process.stdout.write(`${typeof e==`string`?e:JSON.stringify(e,null,2)}\n`)}async function E(){T(C(x))}async function D(e=s()){let t={...v()};for(let t=0;t<e.slice(0).length;t++)e[t].length>3&&e[t].startsWith(`--`)?`${e[t].slice(2).replaceAll(`-`,``).toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)}`:e[t].length>2&&e[t].startsWith(`-`)?`${e[t].slice(1).replaceAll(`-`,``)}`:e[t];return r(`quiet`)||(await w(),await b()),!a()&&!r(`quiet`)&&(n(``),(o||i||u.LOG_LEVEL===`debug`)&&n(l.body.tertiary(`Debug mode is enabled. Additional debug information may be logged to the console.`))),t.help?S():d(`list-components`,[`list-components`],[],E)}export{D as handler};
@@ -0,0 +1 @@
1
+ import{D as e,S as t,h as n,p as r,t as i,x as a}from"./console-wWDh21MV.mjs";function o(){e(`${i(t.heading.secondary(`Tags: `))} ${t.tags.designSystem?t.tags.designSystem(r(` Design System `)):t.tags.default(r(` Design System `))} ${t.tags.fonts?t.tags.fonts(r(` Fonts `)):t.tags.default(r(` Fonts `))}`,{padding:0}),e(``),e(i(t.heading.secondary(`Usage:`))),e(t.body.secondary(`${t.usage.bin(`>_ cyclone-ui`)} ${t.usage.command(`list-fonts`)} ${t.usage.options(`[options]`)}`),{padding:0}),e(``),e(i(t.heading.secondary(`Options:`))),a([[{value:t.body.primary(`--color, --colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Force colored terminal output (env: CYCLONE_UI_COLOR, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--no-color, --no-colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Force disable colored terminal output (env: CYCLONE_UI_NO_COLOR, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`-?, -h, --help`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Show help information (default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`-i, --interact, --interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Enable interactive mode - will be set to false if running in a CI pipeline (env: CYCLONE_UI_INTERACTIVE, default: true).`),align:`left`,border:`none`}],[{value:t.body.primary(`--no-interactive, --non-interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Disable interactive mode - will be set to true if running in a CI pipeline (env: CYCLONE_UI_NON_INTERACTIVE, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--hide-banner, --no-banner`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Do not display the application banner displayed while running the CLI - will be set to true if running in a CI pipeline (env: CYCLONE_UI_NO_BANNER, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--no-color, --no-colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Force disable colored terminal output (env: CYCLONE_UI_NO_COLOR, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--no-interactive, --non-interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Disable interactive mode - will be set to true if running in a CI pipeline (env: CYCLONE_UI_NON_INTERACTIVE, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--quiet`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Suppress command decorations and diagnostic messages (default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`-V, --verbose`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Enable verbose output (env: CYCLONE_UI_VERBOSE, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`-v, --version`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Show the version of the application (default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`-y, --yes`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Skip all prompts by answering yes to all of them - will be set to true if running in a CI pipeline (env: CYCLONE_UI_YES, default: false).`),align:`left`,border:`none`}]]),e(``),e(t.body.tertiary(`More information can be found in the List Fonts command documentation at ${n(`https://docs.cyclone-ui.com/reference/cli/list-fonts`)}${t.body.tertiary(`.`)}`),{padding:0}),e(``)}export{o as t};
@@ -0,0 +1,2 @@
1
+ import{A as e,B as t,D as n,F as r,G as i,I as a,K as o,L as s,N as c,S as l,U as u,V as d,_ as f,j as p,k as m,n as h,t as g,y as _,z as v}from"./console-wWDh21MV.mjs";import{a as y}from"./prompts-zyeiNLLd.mjs";import{t as b}from"./update-BP6PyX8m.mjs";import{t as x}from"./design-system-C6qKXe7_.mjs";import{t as S}from"./list-fonts-CtGQHoE_.mjs";import{listFonts as C}from"@razorwind/shell-shock/runtime";async function w(i=500){if(t().get(`is-banner-displayed`)||r(`no-banner`)||r(`hide-banner`)||p)return;t().set(`is-banner-displayed`,!0),n(``),n(h.banner.outline.primary(`โ”`)+h.banner.outline.primary(`โ”`.repeat(6))+` `+l.banner.header.primary(`โฌค`)+` `+h.banner.outline.primary(`โ”`)+` `+g(l.banner.header.primary(`Cyclone CLI v0.6.1`))+` `+h.banner.outline.primary(`โ”`.repeat(Math.max(m().columns-32,0)))+h.banner.outline.primary(`โ”“`),{consoleFn:console.log});let o=Math.max(...y.map(e=>_(e).length))>Math.max(m().columns+30,20)?`Cyclone User Interface`:`\n${y.join(`
2
+ `)}\n`;f(o,Math.max(m().columns-30,20)).forEach(e=>{n(h.banner.outline.primary(`โ”ƒ`)+` `.repeat(Math.max(Math.floor((m().columns-(_(e).length+2))/2),0))+g(l.banner.title.primary(e))+` `.repeat(Math.max(Math.ceil((m().columns-(_(e).length+2))/2),0))+h.banner.outline.primary(`โ”ƒ`),{consoleFn:console.log})}),n(h.banner.outline.primary(`โ”ƒ`)+` `.repeat(Math.max(Math.floor((m().columns-(_(`List Fonts`).length+2))/2),0))+g(l.banner.command.primary(`List Fonts`))+` `.repeat(Math.max(Math.ceil((m().columns-(_(`List Fonts`).length+2))/2),0))+h.banner.outline.primary(`โ”ƒ`),{consoleFn:console.log}),f(g(l.banner.description.primary(`Return every design-system font record.`)),Math.max(60>m().columns/2?m().columns-6:m().columns-30,20)).forEach(e=>{n(h.banner.outline.primary(`โ”ƒ`)+` `.repeat(Math.max(Math.floor((m().columns-(_(e).length+2))/2),0))+l.banner.description.primary(e)+` `.repeat(Math.max(Math.ceil((m().columns-(_(e).length+2))/2),0))+h.banner.outline.primary(`โ”ƒ`),{consoleFn:console.log})}),n(h.banner.outline.primary(`โ”ƒ`)+` `.repeat(Math.max(m().columns-2,0))+h.banner.outline.primary(`โ”ƒ`),{consoleFn:console.log}),n(h.banner.outline.primary(`โ”—`)+h.banner.outline.primary(`โ”`.repeat(Math.max(m().columns-32,0)))+` `+g(l.banner.footer.primary(`https://cyclone-ui.com`))+` `+h.banner.outline.primary(`โ”`.repeat(6))+h.banner.outline.primary(`โ”›`),{consoleFn:console.log}),n(``),e&&!a()&&await c(i)}function T(e){process.stdout.write(`${typeof e==`string`?e:JSON.stringify(e,null,2)}\n`)}async function E(){T(C(x))}async function D(e=s()){let t={...v()};for(let t=0;t<e.slice(0).length;t++)e[t].length>3&&e[t].startsWith(`--`)?`${e[t].slice(2).replaceAll(`-`,``).toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)}`:e[t].length>2&&e[t].startsWith(`-`)?`${e[t].slice(1).replaceAll(`-`,``)}`:e[t];return r(`quiet`)||(await w(),await b()),!a()&&!r(`quiet`)&&(n(``),(o||i||u.LOG_LEVEL===`debug`)&&n(l.body.tertiary(`Debug mode is enabled. Additional debug information may be logged to the console.`))),t.help?S():d(`list-fonts`,[`list-fonts`],[],E)}export{D as handler};
@@ -0,0 +1 @@
1
+ import{D as e,S as t,h as n,p as r,t as i,x as a}from"./console-wWDh21MV.mjs";function o(){e(`${i(t.heading.secondary(`Tags: `))} ${t.tags.designSystem?t.tags.designSystem(r(` Design System `)):t.tags.default(r(` Design System `))} ${t.tags.icons?t.tags.icons(r(` Icons `)):t.tags.default(r(` Icons `))}`,{padding:0}),e(``),e(i(t.heading.secondary(`Usage:`))),e(t.body.secondary(`${t.usage.bin(`>_ cyclone-ui`)} ${t.usage.command(`list-icons`)} ${t.usage.options(`[options]`)}`),{padding:0}),e(``),e(i(t.heading.secondary(`Options:`))),a([[{value:t.body.primary(`--color, --colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Force colored terminal output (env: CYCLONE_UI_COLOR, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--no-color, --no-colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Force disable colored terminal output (env: CYCLONE_UI_NO_COLOR, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`-?, -h, --help`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Show help information (default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`-i, --interact, --interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Enable interactive mode - will be set to false if running in a CI pipeline (env: CYCLONE_UI_INTERACTIVE, default: true).`),align:`left`,border:`none`}],[{value:t.body.primary(`--no-interactive, --non-interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Disable interactive mode - will be set to true if running in a CI pipeline (env: CYCLONE_UI_NON_INTERACTIVE, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--hide-banner, --no-banner`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Do not display the application banner displayed while running the CLI - will be set to true if running in a CI pipeline (env: CYCLONE_UI_NO_BANNER, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--no-color, --no-colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Force disable colored terminal output (env: CYCLONE_UI_NO_COLOR, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--no-interactive, --non-interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Disable interactive mode - will be set to true if running in a CI pipeline (env: CYCLONE_UI_NON_INTERACTIVE, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--quiet`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Suppress command decorations and diagnostic messages (default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`-V, --verbose`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Enable verbose output (env: CYCLONE_UI_VERBOSE, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`-v, --version`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Show the version of the application (default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`-y, --yes`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Skip all prompts by answering yes to all of them - will be set to true if running in a CI pipeline (env: CYCLONE_UI_YES, default: false).`),align:`left`,border:`none`}]]),e(``),e(t.body.tertiary(`More information can be found in the List Icons command documentation at ${n(`https://docs.cyclone-ui.com/reference/cli/list-icons`)}${t.body.tertiary(`.`)}`),{padding:0}),e(``)}export{o as t};
@@ -0,0 +1,2 @@
1
+ import{A as e,B as t,D as n,F as r,G as i,I as a,K as o,L as s,N as c,S as l,U as u,V as d,_ as f,j as p,k as m,n as h,t as g,y as _,z as v}from"./console-wWDh21MV.mjs";import{a as y}from"./prompts-zyeiNLLd.mjs";import{t as b}from"./update-BP6PyX8m.mjs";import{t as x}from"./design-system-C6qKXe7_.mjs";import{t as S}from"./list-icons-BNwuGwSr.mjs";import{listIcons as C}from"@razorwind/shell-shock/runtime";async function w(i=500){if(t().get(`is-banner-displayed`)||r(`no-banner`)||r(`hide-banner`)||p)return;t().set(`is-banner-displayed`,!0),n(``),n(h.banner.outline.primary(`โ”`)+h.banner.outline.primary(`โ”`.repeat(6))+` `+l.banner.header.primary(`โฌค`)+` `+h.banner.outline.primary(`โ”`)+` `+g(l.banner.header.primary(`Cyclone CLI v0.6.1`))+` `+h.banner.outline.primary(`โ”`.repeat(Math.max(m().columns-32,0)))+h.banner.outline.primary(`โ”“`),{consoleFn:console.log});let o=Math.max(...y.map(e=>_(e).length))>Math.max(m().columns+30,20)?`Cyclone User Interface`:`\n${y.join(`
2
+ `)}\n`;f(o,Math.max(m().columns-30,20)).forEach(e=>{n(h.banner.outline.primary(`โ”ƒ`)+` `.repeat(Math.max(Math.floor((m().columns-(_(e).length+2))/2),0))+g(l.banner.title.primary(e))+` `.repeat(Math.max(Math.ceil((m().columns-(_(e).length+2))/2),0))+h.banner.outline.primary(`โ”ƒ`),{consoleFn:console.log})}),n(h.banner.outline.primary(`โ”ƒ`)+` `.repeat(Math.max(Math.floor((m().columns-(_(`List Icons`).length+2))/2),0))+g(l.banner.command.primary(`List Icons`))+` `.repeat(Math.max(Math.ceil((m().columns-(_(`List Icons`).length+2))/2),0))+h.banner.outline.primary(`โ”ƒ`),{consoleFn:console.log}),f(g(l.banner.description.primary(`Return every design-system icon record. Large output - prefer search-icons for normal use.`)),Math.max(60>m().columns/2?m().columns-6:m().columns-30,20)).forEach(e=>{n(h.banner.outline.primary(`โ”ƒ`)+` `.repeat(Math.max(Math.floor((m().columns-(_(e).length+2))/2),0))+l.banner.description.primary(e)+` `.repeat(Math.max(Math.ceil((m().columns-(_(e).length+2))/2),0))+h.banner.outline.primary(`โ”ƒ`),{consoleFn:console.log})}),n(h.banner.outline.primary(`โ”ƒ`)+` `.repeat(Math.max(m().columns-2,0))+h.banner.outline.primary(`โ”ƒ`),{consoleFn:console.log}),n(h.banner.outline.primary(`โ”—`)+h.banner.outline.primary(`โ”`.repeat(Math.max(m().columns-32,0)))+` `+g(l.banner.footer.primary(`https://cyclone-ui.com`))+` `+h.banner.outline.primary(`โ”`.repeat(6))+h.banner.outline.primary(`โ”›`),{consoleFn:console.log}),n(``),e&&!a()&&await c(i)}function T(e){process.stdout.write(`${typeof e==`string`?e:JSON.stringify(e,null,2)}\n`)}async function E(){T(C(x))}async function D(e=s()){let t={...v()};for(let t=0;t<e.slice(0).length;t++)e[t].length>3&&e[t].startsWith(`--`)?`${e[t].slice(2).replaceAll(`-`,``).toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)}`:e[t].length>2&&e[t].startsWith(`-`)?`${e[t].slice(1).replaceAll(`-`,``)}`:e[t];return r(`quiet`)||(await w(),await b()),!a()&&!r(`quiet`)&&(n(``),(o||i||u.LOG_LEVEL===`debug`)&&n(l.body.tertiary(`Debug mode is enabled. Additional debug information may be logged to the console.`))),t.help?S():d(`list-icons`,[`list-icons`],[],E)}export{D as handler};
@@ -0,0 +1 @@
1
+ import{D as e,S as t,h as n,p as r,t as i,x as a}from"./console-wWDh21MV.mjs";function o(){e(`${i(t.heading.secondary(`Tags: `))} ${t.tags.designSystem?t.tags.designSystem(r(` Design System `)):t.tags.default(r(` Design System `))} ${t.tags.tokens?t.tags.tokens(r(` Tokens `)):t.tags.default(r(` Tokens `))}`,{padding:0}),e(``),e(i(t.heading.secondary(`Usage:`))),e(t.body.secondary(`${t.usage.bin(`>_ cyclone-ui`)} ${t.usage.command(`list-tokens`)} ${t.usage.options(`[options]`)}`),{padding:0}),e(``),e(i(t.heading.secondary(`Options:`))),a([[{value:t.body.primary(`--color, --colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Force colored terminal output (env: CYCLONE_UI_COLOR, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--no-color, --no-colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Force disable colored terminal output (env: CYCLONE_UI_NO_COLOR, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`-?, -h, --help`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Show help information (default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`-i, --interact, --interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Enable interactive mode - will be set to false if running in a CI pipeline (env: CYCLONE_UI_INTERACTIVE, default: true).`),align:`left`,border:`none`}],[{value:t.body.primary(`--no-interactive, --non-interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Disable interactive mode - will be set to true if running in a CI pipeline (env: CYCLONE_UI_NON_INTERACTIVE, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--hide-banner, --no-banner`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Do not display the application banner displayed while running the CLI - will be set to true if running in a CI pipeline (env: CYCLONE_UI_NO_BANNER, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--no-color, --no-colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Force disable colored terminal output (env: CYCLONE_UI_NO_COLOR, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--no-interactive, --non-interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Disable interactive mode - will be set to true if running in a CI pipeline (env: CYCLONE_UI_NON_INTERACTIVE, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--quiet`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Suppress command decorations and diagnostic messages (default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`-V, --verbose`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Enable verbose output (env: CYCLONE_UI_VERBOSE, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`-v, --version`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Show the version of the application (default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`-y, --yes`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Skip all prompts by answering yes to all of them - will be set to true if running in a CI pipeline (env: CYCLONE_UI_YES, default: false).`),align:`left`,border:`none`}]]),e(``),e(t.body.tertiary(`More information can be found in the List Tokens command documentation at ${n(`https://docs.cyclone-ui.com/reference/cli/list-tokens`)}${t.body.tertiary(`.`)}`),{padding:0}),e(``)}export{o as t};
@@ -0,0 +1,2 @@
1
+ import{A as e,B as t,D as n,F as r,G as i,I as a,K as o,L as s,N as c,S as l,U as u,V as d,_ as f,j as p,k as m,n as h,t as g,y as _,z as v}from"./console-wWDh21MV.mjs";import{a as y}from"./prompts-zyeiNLLd.mjs";import{t as b}from"./update-BP6PyX8m.mjs";import{t as x}from"./design-system-C6qKXe7_.mjs";import{t as S}from"./list-tokens-BSwZsUam.mjs";import{listTokens as C}from"@razorwind/shell-shock/runtime";async function w(i=500){if(t().get(`is-banner-displayed`)||r(`no-banner`)||r(`hide-banner`)||p)return;t().set(`is-banner-displayed`,!0),n(``),n(h.banner.outline.primary(`โ”`)+h.banner.outline.primary(`โ”`.repeat(6))+` `+l.banner.header.primary(`โฌค`)+` `+h.banner.outline.primary(`โ”`)+` `+g(l.banner.header.primary(`Cyclone CLI v0.6.1`))+` `+h.banner.outline.primary(`โ”`.repeat(Math.max(m().columns-32,0)))+h.banner.outline.primary(`โ”“`),{consoleFn:console.log});let o=Math.max(...y.map(e=>_(e).length))>Math.max(m().columns+30,20)?`Cyclone User Interface`:`\n${y.join(`
2
+ `)}\n`;f(o,Math.max(m().columns-30,20)).forEach(e=>{n(h.banner.outline.primary(`โ”ƒ`)+` `.repeat(Math.max(Math.floor((m().columns-(_(e).length+2))/2),0))+g(l.banner.title.primary(e))+` `.repeat(Math.max(Math.ceil((m().columns-(_(e).length+2))/2),0))+h.banner.outline.primary(`โ”ƒ`),{consoleFn:console.log})}),n(h.banner.outline.primary(`โ”ƒ`)+` `.repeat(Math.max(Math.floor((m().columns-(_(`List Tokens`).length+2))/2),0))+g(l.banner.command.primary(`List Tokens`))+` `.repeat(Math.max(Math.ceil((m().columns-(_(`List Tokens`).length+2))/2),0))+h.banner.outline.primary(`โ”ƒ`),{consoleFn:console.log}),f(g(l.banner.description.primary(`Return every design token (name, value, type, description, CSS variable). Large output - prefer search-tokens for normal use.`)),Math.max(60>m().columns/2?m().columns-6:m().columns-30,20)).forEach(e=>{n(h.banner.outline.primary(`โ”ƒ`)+` `.repeat(Math.max(Math.floor((m().columns-(_(e).length+2))/2),0))+l.banner.description.primary(e)+` `.repeat(Math.max(Math.ceil((m().columns-(_(e).length+2))/2),0))+h.banner.outline.primary(`โ”ƒ`),{consoleFn:console.log})}),n(h.banner.outline.primary(`โ”ƒ`)+` `.repeat(Math.max(m().columns-2,0))+h.banner.outline.primary(`โ”ƒ`),{consoleFn:console.log}),n(h.banner.outline.primary(`โ”—`)+h.banner.outline.primary(`โ”`.repeat(Math.max(m().columns-32,0)))+` `+g(l.banner.footer.primary(`https://cyclone-ui.com`))+` `+h.banner.outline.primary(`โ”`.repeat(6))+h.banner.outline.primary(`โ”›`),{consoleFn:console.log}),n(``),e&&!a()&&await c(i)}function T(e){process.stdout.write(`${typeof e==`string`?e:JSON.stringify(e,null,2)}\n`)}async function E(){T(C(x))}async function D(e=s()){let t={...v()};for(let t=0;t<e.slice(0).length;t++)e[t].length>3&&e[t].startsWith(`--`)?`${e[t].slice(2).replaceAll(`-`,``).toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)}`:e[t].length>2&&e[t].startsWith(`-`)?`${e[t].slice(1).replaceAll(`-`,``)}`:e[t];return r(`quiet`)||(await w(),await b()),!a()&&!r(`quiet`)&&(n(``),(o||i||u.LOG_LEVEL===`debug`)&&n(l.body.tertiary(`Debug mode is enabled. Additional debug information may be logged to the console.`))),t.help?S():d(`list-tokens`,[`list-tokens`],[],E)}export{D as handler};
@@ -0,0 +1 @@
1
+ import{o as e,r as t}from"./config-D4XQ3gm9.mjs";import{resolve as n}from"node:path";import{readFile as r}from"node:fs/promises";async function i(e){let n=JSON.parse(await r(e,`utf8`));if(!n||typeof n!=`object`||!(`items`in n)||!Array.isArray(n.items))throw Error(`Registry manifest must contain an items array.`);let i=/* @__PURE__ */ new Set;for(let[e,r]of n.items.entries()){if(!r||typeof r!=`object`||typeof r.name!=`string`||!r.name)throw Error(`Registry item ${e} must have a name.`);if(i.has(r.name))throw Error(`Duplicate registry item: ${r.name}`);if(i.add(r.name),typeof r.type!=`string`||!Array.isArray(r.files))throw Error(`Registry item \"${r.name}\" must have a type and files array.`);for(let e of r.files){if(!e||typeof e!=`object`||typeof e.path!=`string`)throw Error(`Registry item \"${r.name}\" contains an invalid file.`);if(!e.content&&!await t(e.path))throw Error(`Registry source file not found: ${e.path}`)}}return n}async function a(t,i,a){let o=e(t,a);return Promise.all(i.items.map(async i=>{let a=i.name.replace(/^@cyclone-ui\//,``);if(!/^[a-z0-9][a-z0-9._-]*$/i.test(a))throw Error(`Invalid registry item name: ${i.name}`);let s=await Promise.all(i.files.map(async i=>({...i,path:i.target??i.path,content:i.content??await r(e(t,n(t,i.path)),`utf8`)})));return{path:e(o,`${a}.json`),content:`${JSON.stringify({...i,files:s},null,2)}\n`}}))}export{i as n,a as t};
@@ -0,0 +1 @@
1
+ import{D as e,S as t,h as n,p as r,t as i,x as a}from"./console-wWDh21MV.mjs";function o(){e(`${i(t.heading.secondary(`Tags: `))} ${t.tags.ai?t.tags.ai(r(` AI `)):t.tags.default(r(` AI `))} ${t.tags.utility?t.tags.utility(r(` Utility `)):t.tags.default(r(` Utility `))} ${t.tags.mcp?t.tags.mcp(r(` MCP `)):t.tags.default(r(` MCP `))}`,{padding:0}),e(``),e(i(t.heading.secondary(`Usage:`))),e(t.body.secondary(`${t.usage.bin(`>_ cyclone-ui`)} ${t.usage.command(`mcp`)} ${t.usage.options(`[options]`)}`),{padding:0}),e(``),e(i(t.heading.secondary(`Options:`))),a([[{value:t.body.primary(`--color, --colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Force colored terminal output (env: CYCLONE_UI_COLOR, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--no-color, --no-colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Force disable colored terminal output (env: CYCLONE_UI_NO_COLOR, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`-?, -h, --help`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Show help information (default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--include-self`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Whether to expose the MCP command itself as a tool in the generated server (default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`-i, --interact, --interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Enable interactive mode - will be set to false if running in a CI pipeline (env: CYCLONE_UI_INTERACTIVE, default: true).`),align:`left`,border:`none`}],[{value:t.body.primary(`--no-interactive, --non-interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Disable interactive mode - will be set to true if running in a CI pipeline (env: CYCLONE_UI_NON_INTERACTIVE, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--hide-banner, --no-banner`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Do not display the application banner displayed while running the CLI - will be set to true if running in a CI pipeline (env: CYCLONE_UI_NO_BANNER, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--no-color, --no-colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Force disable colored terminal output (env: CYCLONE_UI_NO_COLOR, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--no-interactive, --non-interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Disable interactive mode - will be set to true if running in a CI pipeline (env: CYCLONE_UI_NON_INTERACTIVE, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--quiet`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Suppress command decorations and diagnostic messages (default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`-V, --verbose`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Enable verbose output (env: CYCLONE_UI_VERBOSE, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`-v, --version`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Show the version of the application (default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`-y, --yes`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Skip all prompts by answering yes to all of them - will be set to true if running in a CI pipeline (env: CYCLONE_UI_YES, default: false).`),align:`left`,border:`none`}]]),e(``),e(t.body.tertiary(`More information can be found in the MCP Server command documentation at ${n(`https://docs.cyclone-ui.com/reference/cli/mcp`)}${t.body.tertiary(`.`)}`),{padding:0}),e(``)}export{o as t};
package/dist/mcp.mjs ADDED
@@ -0,0 +1,48 @@
1
+ import{L as e,P as t,V as n,z as r}from"./console-wWDh21MV.mjs";import{t as i}from"./mcp-DleN2BRI.mjs";import{defineMetadata as a,defineOptions as o}from"@shell-shock/core";import{McpServer as s}from"@modelcontextprotocol/server";import{StdioServerTransport as c}from"@modelcontextprotocol/server/stdio";import{z as l}from"zod/v4";const u=[{id:`add`,name:`add`,path:`add`,segments:[`add`],title:`Add`,description:`Adds a new component to the project.
2
+ Options: --cwd (string), --overwrite (boolean), --all (boolean), --path (string), --dry-run (boolean), --diff (boolean), --view (boolean), --silent (boolean), --registry (string)
3
+ Args: components:string[]`,toolName:`add`,options:[{name:`cwd`,title:`Current Working Directory`,description:`The working directory.`,type:`string`,required:!1,variadic:!1},{name:`overwrite`,title:`Overwrite`,description:`Overwrite existing files.`,type:`boolean`,required:!1,variadic:!1},{name:`all`,title:`All`,description:`Add every available component.`,type:`boolean`,required:!1,variadic:!1},{name:`path`,title:`Path`,description:`Override the configured component output path.`,type:`string`,required:!1,variadic:!1},{name:`dryRun`,title:`Dry Run`,description:`Preview changes without writing files.`,type:`boolean`,required:!1,variadic:!1},{name:`diff`,title:`Diff`,description:`Show the changes as a diff without writing files.`,type:`boolean`,required:!1,variadic:!1},{name:`view`,title:`View`,description:`Show resolved file contents without writing files.`,type:`boolean`,required:!1,variadic:!1},{name:`silent`,title:`Silent`,description:`Mute non-essential output.`,type:`boolean`,required:!1,variadic:!1},{name:`registry`,title:`Registry`,description:`Override the configured registry API URL.`,type:`string`,required:!1,variadic:!1}],args:[{name:`components`,title:`Components`,description:`Component names to add.`,type:`string`,required:!1,variadic:!0}]},{id:`analyze-a11y`,name:`analyze-a11y`,path:`analyze-a11y`,segments:[`analyze-a11y`],title:`Analyze Accessibility`,description:`Analyze a React/JSX source string (or file) for likely accessibility issues and hard-coded colors, suggesting the nearest design tokens for each color.
4
+ Options: --code (string), --file (string), --component-name (string), --context (string), --pattern-analysis (boolean)`,toolName:`analyze-a11y`,options:[{name:`code`,title:`Code`,description:`Source code of a React component or JSX snippet to analyze.`,type:`string`,required:!1,variadic:!1},{name:`file`,title:`File`,description:`Path to a source file to analyze (alternative to --code).`,type:`string`,required:!1,variadic:!1},{name:`componentName`,title:`Component Name`,description:`Optional label for the component under review.`,type:`string`,required:!1,variadic:!1},{name:`context`,title:`Context`,description:`Optional usage context (for example "in a form" or "modal").`,type:`string`,required:!1,variadic:!1},{name:`patternAnalysis`,title:`Pattern Analysis`,description:`Run regex-based heuristics (unlabeled buttons, missing alt, โ€ฆ).`,type:`boolean`,required:!1,variadic:!1}],args:[]},{id:`build`,name:`build`,path:`build`,segments:[`build`],title:`Build Registry`,description:`Build registry item JSON files for distribution.
5
+ Options: --cwd (string), --output (string)
6
+ Args: registry:string`,toolName:`build`,options:[{name:`cwd`,title:`Current Working Directory`,description:`The working directory.`,type:`string`,required:!1,variadic:!1},{name:`output`,title:`Output`,description:`Output directory.`,type:`string`,required:!1,variadic:!1}],args:[{name:`registry`,title:`Registry`,description:`Registry manifest path.`,type:`string`,required:!1,variadic:!1}]},{id:`completions-bash-config`,name:`config`,path:`completions/bash/config`,segments:[`completions`,`bash`,`config`],title:`Completions - Bash Configuration`,description:`Update the current system's bash shell configuration to include completions for the Cyclone User Interface command-line interface.
7
+ Options: --display (boolean)
8
+ Args: path:string`,toolName:`completions_bash_config`,options:[{name:`display`,title:`Display`,description:`Should the generated completion script be written to console output instead of an actual file on disk? This is useful for debugging purposes or if you want to manually handle the output.`,type:`boolean`,required:!1,variadic:!1}],args:[{name:`path`,title:`Path`,description:`An argument that allows the user to specify a custom Path string value.`,type:`string`,required:!1,variadic:!1}]},{id:`completions-bash-script`,name:`script`,path:`completions/bash/script`,segments:[`completions`,`bash`,`script`],title:`Completions - Bash Script`,description:`Generate a bash completion script for the Cyclone User Interface command-line interface.
9
+ Options: --display (boolean)
10
+ Args: path:string`,toolName:`completions_bash_script`,options:[{name:`display`,title:`Display`,description:`Should the generated completion script be written to console output instead of an actual file on disk? This is useful for debugging purposes or if you want to manually handle the output.`,type:`boolean`,required:!1,variadic:!1}],args:[{name:`path`,title:`Path`,description:`An argument that allows the user to specify a custom Path string value.`,type:`string`,required:!1,variadic:!1}]},{id:`completions-fish-config`,name:`config`,path:`completions/fish/config`,segments:[`completions`,`fish`,`config`],title:`Completions - Fish Configuration`,description:`Update the current system's Fish shell configuration to include completions for the Cyclone User Interface command-line interface.
11
+ Options: --display (boolean)
12
+ Args: path:string`,toolName:`completions_fish_config`,options:[{name:`display`,title:`Display`,description:`Should the generated completion script be written to console output instead of an actual file on disk? This is useful for debugging purposes or if you want to manually handle the output.`,type:`boolean`,required:!1,variadic:!1}],args:[{name:`path`,title:`Path`,description:`An argument that allows the user to specify a custom Path string value.`,type:`string`,required:!1,variadic:!1}]},{id:`completions-fish-script`,name:`script`,path:`completions/fish/script`,segments:[`completions`,`fish`,`script`],title:`Completions - Fish Script`,description:`Generate a Fish completion script for the Cyclone User Interface command-line interface.
13
+ Options: --display (boolean)
14
+ Args: path:string`,toolName:`completions_fish_script`,options:[{name:`display`,title:`Display`,description:`Should the generated completion script be written to console output instead of an actual file on disk? This is useful for debugging purposes or if you want to manually handle the output.`,type:`boolean`,required:!1,variadic:!1}],args:[{name:`path`,title:`Path`,description:`An argument that allows the user to specify a custom Path string value.`,type:`string`,required:!1,variadic:!1}]},{id:`completions-powershell-config`,name:`config`,path:`completions/powershell/config`,segments:[`completions`,`powershell`,`config`],title:`Completions - PowerShell Configuration`,description:`Update the current system's PowerShell configuration to include completions for the Cyclone User Interface command-line interface.
15
+ Options: --display (boolean)
16
+ Args: path:string`,toolName:`completions_powershell_config`,options:[{name:`display`,title:`Display`,description:`Should the generated completion script be written to console output instead of an actual file on disk? This is useful for debugging purposes or if you want to manually handle the output.`,type:`boolean`,required:!1,variadic:!1}],args:[{name:`path`,title:`Path`,description:`An argument that allows the user to specify a custom Path string value.`,type:`string`,required:!1,variadic:!1}]},{id:`completions-powershell-script`,name:`script`,path:`completions/powershell/script`,segments:[`completions`,`powershell`,`script`],title:`Completions - PowerShell Script`,description:`Generate a PowerShell completion script for the Cyclone User Interface command-line interface.
17
+ Options: --display (boolean)
18
+ Args: path:string`,toolName:`completions_powershell_script`,options:[{name:`display`,title:`Display`,description:`Should the generated completion script be written to console output instead of an actual file on disk? This is useful for debugging purposes or if you want to manually handle the output.`,type:`boolean`,required:!1,variadic:!1}],args:[{name:`path`,title:`Path`,description:`An argument that allows the user to specify a custom Path string value.`,type:`string`,required:!1,variadic:!1}]},{id:`completions-zsh-config`,name:`config`,path:`completions/zsh/config`,segments:[`completions`,`zsh`,`config`],title:`Completions - Zsh Configuration`,description:`Update the current system's Zsh shell configuration to include completions for the Cyclone User Interface command-line interface.
19
+ Options: --display (boolean)
20
+ Args: path:string`,toolName:`completions_zsh_config`,options:[{name:`display`,title:`Display`,description:`Should the generated completion script be written to console output instead of an actual file on disk? This is useful for debugging purposes or if you want to manually handle the output.`,type:`boolean`,required:!1,variadic:!1}],args:[{name:`path`,title:`Path`,description:`An argument that allows the user to specify a custom Path string value.`,type:`string`,required:!1,variadic:!1}]},{id:`completions-zsh-script`,name:`script`,path:`completions/zsh/script`,segments:[`completions`,`zsh`,`script`],title:`Completions - Zsh Script`,description:`Generate a Zsh completion script for the Cyclone User Interface command-line interface.
21
+ Options: --display (boolean)
22
+ Args: path:string`,toolName:`completions_zsh_script`,options:[{name:`display`,title:`Display`,description:`Should the generated completion script be written to console output instead of an actual file on disk? This is useful for debugging purposes or if you want to manually handle the output.`,type:`boolean`,required:!1,variadic:!1}],args:[{name:`path`,title:`Path`,description:`An argument that allows the user to specify a custom Path string value.`,type:`string`,required:!1,variadic:!1}]},{id:`create-tokens`,name:`create-tokens`,path:`create-tokens`,segments:[`create-tokens`],title:`Create Tokens`,description:`Generate a Tamagui config file from design tokens.
23
+ Options: --cwd (string), --config (string), --tokens (string), --output (string)`,toolName:`create-tokens`,options:[{name:`cwd`,title:`Current Working Directory`,description:`The working directory.`,type:`string`,required:!1,variadic:!1},{name:`config`,title:`Config`,description:`Path to the Razorwind configuration file.`,type:`string`,required:!1,variadic:!1},{name:`tokens`,title:`Tokens`,description:"Design token source path or glob (overrides the configured `tokensPath`).",type:`string`,required:!1,variadic:!1},{name:`output`,title:`Output`,description:`Output path for the generated Tamagui config.`,type:`string`,required:!1,variadic:!1}],args:[]},{id:`diff`,name:`diff`,path:`diff`,segments:[`diff`],title:`Diff Components`,description:`Compare installed components with the registry.
24
+ Options: --cwd (string), --registry (string)
25
+ Args: components:string[]`,toolName:`diff`,options:[{name:`cwd`,title:`Current Working Directory`,description:`The working directory.`,type:`string`,required:!1,variadic:!1},{name:`registry`,title:`Registry`,description:`Registry API URL.`,type:`string`,required:!1,variadic:!1}],args:[{name:`components`,title:`Components`,description:`Installed component names to compare.`,type:`string`,required:!1,variadic:!0}]},{id:`docs`,name:`docs`,path:`docs`,segments:[`docs`],title:`Component Documentation`,description:`Get documentation links for registry components.
26
+ Options: --cwd (string), --registry (string), --json (boolean)
27
+ Args: components:string (required)[]`,toolName:`docs`,options:[{name:`cwd`,title:`Current Working Directory`,description:`The working directory.`,type:`string`,required:!1,variadic:!1},{name:`registry`,title:`Registry`,description:`Registry API URL.`,type:`string`,required:!1,variadic:!1},{name:`json`,title:`JavaScript Object Notation`,description:`Output machine-readable JSON.`,type:`boolean`,required:!1,variadic:!1}],args:[{name:`components`,title:`Components`,description:`Component names to document.`,type:`string`,required:!0,variadic:!0}]},{id:`guidelines`,name:`guidelines`,path:`guidelines`,segments:[`guidelines`],title:`Guidelines`,description:`Return design-system guidelines as Markdown: an overview of the token groups, one section per component (with usage examples), typography, the design-system style guidelines, and any bundled guideline documents. Pass --terms to search; omit for the full set.
28
+ Options: --terms (string), --limit (number)`,toolName:`guidelines`,options:[{name:`terms`,title:`Terms`,description:`Search terms matched against guideline keywords, titles and body (fuzzy). Omit to return all guidelines.`,type:`string`,required:!1,variadic:!0},{name:`limit`,title:`Limit`,description:`Maximum matches per term when searching.`,type:`number`,required:!1,variadic:!1}],args:[]},{id:`help`,name:`help`,path:`help`,segments:[`help`],title:`Help`,description:`Display command usage details and other useful information to the user.
29
+ Args: commands:string[]`,toolName:`help`,options:[],args:[{name:`commands`,title:`Commands`,description:`- The command segments for the command to show help for. This
30
+ is used to determine which command's help information to display. If no
31
+ commands are provided, general help information about the CLI application
32
+ will be displayed.`,type:`string`,required:!1,variadic:!0}]},{id:`info`,name:`info`,path:`info`,segments:[`info`],title:`Project Information`,description:`Show Cyclone UI project configuration and installed components.
33
+ Options: --cwd (string), --json (boolean)`,toolName:`info`,options:[{name:`cwd`,title:`Current Working Directory`,description:`The working directory.`,type:`string`,required:!1,variadic:!1},{name:`json`,title:`JavaScript Object Notation`,description:`Output machine-readable JSON.`,type:`boolean`,required:!1,variadic:!1}],args:[]},{id:`init`,name:`init`,path:`init`,segments:[`init`],title:`Initialize`,description:`Initialize Cyclone UI in a project.
34
+ Options: --cwd (string), --path (string), --registry (string), --force (boolean), --silent (boolean)
35
+ Args: components:string[]`,toolName:`init`,options:[{name:`cwd`,title:`Current Working Directory`,description:`The working directory.`,type:`string`,required:!1,variadic:!1},{name:`path`,title:`Path`,description:`Component output path, relative to the working directory.`,type:`string`,required:!1,variadic:!1},{name:`registry`,title:`Registry`,description:`Registry API URL.`,type:`string`,required:!1,variadic:!1},{name:`force`,title:`Force`,description:`Overwrite an existing Cyclone configuration.`,type:`boolean`,required:!1,variadic:!1},{name:`silent`,title:`Silent`,description:`Mute non-essential output.`,type:`boolean`,required:!1,variadic:!1}],args:[{name:`components`,title:`Components`,description:`Components to install after initialization.`,type:`string`,required:!1,variadic:!0}]},{id:`list-components`,name:`list-components`,path:`list-components`,segments:[`list-components`],title:`List Components`,description:`Return every design-system component record. Large output - prefer search-components for normal use.`,toolName:`list-components`,options:[],args:[]},{id:`list-fonts`,name:`list-fonts`,path:`list-fonts`,segments:[`list-fonts`],title:`List Fonts`,description:`Return every design-system font record.`,toolName:`list-fonts`,options:[],args:[]},{id:`list-icons`,name:`list-icons`,path:`list-icons`,segments:[`list-icons`],title:`List Icons`,description:`Return every design-system icon record. Large output - prefer search-icons for normal use.`,toolName:`list-icons`,options:[],args:[]},{id:`list-tokens`,name:`list-tokens`,path:`list-tokens`,segments:[`list-tokens`],title:`List Tokens`,description:`Return every design token (name, value, type, description, CSS variable). Large output - prefer search-tokens for normal use.`,toolName:`list-tokens`,options:[],args:[]},{id:`mcp`,name:`mcp`,path:`mcp`,segments:[`mcp`],title:`MCP Server`,description:`Starts an MCP stdio server that exposes this Shell Shock application's commands as tools.
36
+ Options: --include-self (boolean)`,toolName:`mcp`,options:[{name:`includeSelf`,title:`Include MCP Command`,description:`Whether to expose the MCP command itself as a tool in the generated server.`,type:`boolean`,required:!1,variadic:!1}],args:[]},{id:`plan`,name:`plan`,path:`plan`,segments:[`plan`],title:`Plan`,description:`Search tokens, icons, components and fonts in one call to plan what to build. Provide terms for at least one list.
37
+ Options: --tokens (string), --icons (string), --components (string), --fonts (string), --limit (number)`,toolName:`plan`,options:[{name:`tokens`,title:`Tokens`,description:`Search terms for design tokens. Prefer at least two terms when known.`,type:`string`,required:!1,variadic:!0},{name:`icons`,title:`Icons`,description:`Search terms for icons.`,type:`string`,required:!1,variadic:!0},{name:`components`,title:`Components`,description:`Search terms for components.`,type:`string`,required:!1,variadic:!0},{name:`fonts`,title:`Fonts`,description:`Search terms for fonts.`,type:`string`,required:!1,variadic:!0},{name:`limit`,title:`Limit`,description:`Maximum matches per term for each list.`,type:`number`,required:!1,variadic:!1}],args:[]},{id:`registry-validate`,name:`validate`,path:`registry/validate`,segments:[`registry`,`validate`],title:`Validate Registry`,description:`Validate a local registry manifest and its source files.
38
+ Options: --cwd (string)
39
+ Args: registry:string`,toolName:`registry_validate`,options:[{name:`cwd`,title:`Current Working Directory`,description:`The working directory.`,type:`string`,required:!1,variadic:!1}],args:[{name:`registry`,title:`Registry`,description:`Registry manifest path.`,type:`string`,required:!1,variadic:!1}]},{id:`search`,name:`search`,path:`search`,segments:[`search`],title:`Search Registry`,description:`Search components in the Cyclone registry.
40
+ Options: --cwd (string), --query (string), --limit (number), --offset (number), --json (boolean), --registry (string)`,toolName:`search`,options:[{name:`cwd`,title:`Current Working Directory`,description:`The working directory.`,type:`string`,required:!1,variadic:!1},{name:`query`,title:`Query`,description:`Text to match against names, descriptions, and tags.`,type:`string`,required:!1,variadic:!1},{name:`limit`,title:`Limit`,description:`Maximum number of results.`,type:`number`,required:!1,variadic:!1},{name:`offset`,title:`Offset`,description:`Number of results to skip.`,type:`number`,required:!1,variadic:!1},{name:`json`,title:`JavaScript Object Notation`,description:`Output machine-readable JSON.`,type:`boolean`,required:!1,variadic:!1},{name:`registry`,title:`Registry`,description:`Registry API URL.`,type:`string`,required:!1,variadic:!1}],args:[]},{id:`search-components`,name:`search-components`,path:`search-components`,segments:[`search-components`],title:`Search Components`,description:`Search design-system components by name, title, category, description and tags. Returns name, files, dependencies and usage examples for each match.
41
+ Options: --terms (string, required), --limit (number)`,toolName:`search-components`,options:[{name:`terms`,title:`Terms`,description:`One or more search terms (fuzzy match). Example: ["button", "modal", "select"].`,type:`string`,required:!0,variadic:!0},{name:`limit`,title:`Limit`,description:`Maximum matches per term.`,type:`number`,required:!1,variadic:!1}],args:[]},{id:`search-fonts`,name:`search-fonts`,path:`search-fonts`,segments:[`search-fonts`],title:`Search Fonts`,description:`Search design-system fonts by name, family, role, tags and category. Returns the CSS font-family stack, weights and files for each match.
42
+ Options: --terms (string, required), --limit (number)`,toolName:`search-fonts`,options:[{name:`terms`,title:`Terms`,description:`One or more search terms (fuzzy match). Example: ["heading", "mono", "inter"].`,type:`string`,required:!0,variadic:!0},{name:`limit`,title:`Limit`,description:`Maximum matches per term.`,type:`number`,required:!1,variadic:!1}],args:[]},{id:`search-icons`,name:`search-icons`,path:`search-icons`,segments:[`search-icons`],title:`Search Icons`,description:`Search design-system icons by name, title, aliases, tags and category. Returns name and asset files for each match.
43
+ Options: --terms (string, required), --limit (number)`,toolName:`search-icons`,options:[{name:`terms`,title:`Terms`,description:`One or more search terms (fuzzy match). Example: ["search", "folder", "user"].`,type:`string`,required:!0,variadic:!0},{name:`limit`,title:`Limit`,description:`Maximum matches per term.`,type:`number`,required:!1,variadic:!1}],args:[]},{id:`search-tokens`,name:`search-tokens`,path:`search-tokens`,segments:[`search-tokens`],title:`Search Tokens`,description:`Search design tokens by name, path, description, type and value. Returns compact JSON records with name and value for each match; set --include-metadata for descriptions and CSS variables.
44
+ Options: --terms (string, required), --limit (number), --include-metadata (boolean)`,toolName:`search-tokens`,options:[{name:`terms`,title:`Terms`,description:`One or more search terms (fuzzy match). Example: ["spacing", "color.text", "background"].`,type:`string`,required:!0,variadic:!0},{name:`limit`,title:`Limit`,description:`Maximum matches per term.`,type:`number`,required:!1,variadic:!1},{name:`includeMetadata`,title:`Include Metadata`,description:`Include type, description, hex value and CSS variable in each result.`,type:`boolean`,required:!1,variadic:!1}],args:[]},{id:`update`,name:`update`,path:`update`,segments:[`update`],title:`Update`,description:`A command for checking and updating the version of the Cyclone User Interface command-line interface application.
45
+ Options: --latest (boolean), --version (string)`,toolName:`update`,options:[{name:`latest`,title:`Latest`,description:`Whether to update to the latest version.`,type:`boolean`,required:!1,variadic:!1},{name:`version`,title:`Version`,description:`A specific application version to update to.`,type:`string`,required:!1,variadic:!1}],args:[]},{id:`view`,name:`view`,path:`view`,segments:[`view`],title:`View Registry Components`,description:`View component metadata and files from the registry.
46
+ Options: --cwd (string), --registry (string)
47
+ Args: components:string (required)[]`,toolName:`view`,options:[{name:`cwd`,title:`Current Working Directory`,description:`The working directory.`,type:`string`,required:!1,variadic:!1},{name:`registry`,title:`Registry`,description:`Registry API URL.`,type:`string`,required:!1,variadic:!1}],args:[{name:`components`,title:`Components`,description:`Component names to view.`,type:`string`,required:!0,variadic:!0}]}];a({title:`MCP Server`,description:`Starts an MCP stdio server that exposes this Shell Shock application's commands as tools.`,icon:`๐Ÿ”Œ`,tags:[`Utility`,`MCP`]}),o({includeSelf:{type:`boolean`,title:`Include MCP Command`,description:`Whether to expose the MCP command itself as a tool in the generated server.`,default:!1,required:!1,variadic:!1}});function d(e){return e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).replace(/[^a-z0-9-]/gi,`-`).replace(/-{2,}/g,`-`).replace(/^-+|-+$/g,``).toLowerCase()}function f(e){let t=[];for(let[n,r]of Object.entries(e??{})){if(!/^[a-zA-Z0-9_-]+$/.test(n))continue;let e=d(n);if(e&&r!=null){if(typeof r==`boolean`)t.push(r?`--`+e:`--no-`+e);else if(Array.isArray(r))for(let n of r)n!=null&&t.push(`--`+e,String(n));else t.push(`--`+e,String(r))}}return t}async function p(e){let n=/* @__PURE__ */ new Map,r=/* @__PURE__ */ new Set,i=e.includeSelf===!0;for(let e of u){if(!i&&e.path===`mcp`)continue;let t=e.toolName;if(r.has(t)){let e=2;for(;r.has(t+`_`+String(e));)e+=1;t=t+`_`+String(e)}r.add(t),n.set(t,e)}let a=new s({name:`cyclone-ui-shell-shock`,version:`1.0.0`});for(let[e,r]of n.entries())a.registerTool(e,{title:r.title,description:r.description,inputSchema:l.object({options:l.record(l.unknown()).optional(),args:l.array(l.string()).optional(),cwd:l.string().optional(),timeoutMs:l.number().int().positive().optional()})},async e=>{let n=[...r.segments,...f(e.options??{}),`--no-banner`,`--quiet`,...e.args??[]],i=process.argv.length>=2?[process.argv[0],process.argv[1],...n]:[`mcp`,...n],a=await t(i,{cwd:e.cwd,timeoutMs:e.timeoutMs??3e5}),o=(a.code??0)!==0,s=[a.stdout,o?a.stderr:``].filter(Boolean).join(`
48
+ `).trim();return{isError:o,content:[{type:`text`,text:s.length>0?s:o?`Command failed with exit code `+String(a.code??1)+`.`:`Command completed successfully.`}]}});await a.connect(new c)}async function m(t=e()){let a={...r(),includeSelf:!1};for(let e=0;e<t.slice(0).length;e++){let n=t[e].length>3&&t[e].startsWith(`--`)?`--${t[e].slice(2).replaceAll(`-`,``).toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)}`:t[e].length>2&&t[e].startsWith(`-`)?`-${t[e].slice(1).replaceAll(`-`,``)}`:t[e];if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`includeself=`)||n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`includeself`||n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`includeself=`)||n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`includeself`){if(/^--?(includeself)=/.test(`-`+n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))){let e=n.replace(/^--?(includeself)=/,``).trim().replace(/^("|')/,``).replace(/("|')$/,``).toLowerCase();a.includeSelf=!!e&&e.toLowerCase()!==`false`&&e.toLowerCase()!==`f`&&e.toLowerCase()!==`no`&&e!==`n`&&e.toLowerCase()!==`0`&&e.toLowerCase()!==`off`&&e!==`disable`&&e.toLowerCase()!==`disabled`&&e.toLowerCase()!==`never`&&(Number.isNaN(Number.parseFloat(e))||Number.parseFloat(e)>0)}else a.includeSelf=!0}}return a.help?i():n(`mcp`,[`mcp`],[a],p)}export{m as handler};
@@ -0,0 +1 @@
1
+ import{D as e,S as t,h as n,p as r,t as i,x as a}from"./console-wWDh21MV.mjs";function o(){e(`${i(t.heading.secondary(`Tags: `))} ${t.tags.designSystem?t.tags.designSystem(r(` Design System `)):t.tags.default(r(` Design System `))}`,{padding:0}),e(``),e(i(t.heading.secondary(`Usage:`))),e(t.body.secondary(`${t.usage.bin(`>_ cyclone-ui`)} ${t.usage.command(`plan`)} ${t.usage.options(`[options]`)}`),{padding:0}),e(``),e(i(t.heading.secondary(`Options:`))),a([[{value:t.body.primary(`--color, --colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Force colored terminal output (env: CYCLONE_UI_COLOR, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--no-color, --no-colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Force disable colored terminal output (env: CYCLONE_UI_NO_COLOR, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--components <components...>`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Search terms for components.`),align:`left`,border:`none`}],[{value:t.body.primary(`--fonts <fonts...>`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Search terms for fonts.`),align:`left`,border:`none`}],[{value:t.body.primary(`-?, -h, --help`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Show help information (default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--icons <icons...>`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Search terms for icons.`),align:`left`,border:`none`}],[{value:t.body.primary(`-i, --interact, --interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Enable interactive mode - will be set to false if running in a CI pipeline (env: CYCLONE_UI_INTERACTIVE, default: true).`),align:`left`,border:`none`}],[{value:t.body.primary(`--no-interactive, --non-interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Disable interactive mode - will be set to true if running in a CI pipeline (env: CYCLONE_UI_NON_INTERACTIVE, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--limit <limit>`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Maximum matches per term for each list (default: 2).`),align:`left`,border:`none`}],[{value:t.body.primary(`--hide-banner, --no-banner`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Do not display the application banner displayed while running the CLI - will be set to true if running in a CI pipeline (env: CYCLONE_UI_NO_BANNER, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--no-color, --no-colors`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Force disable colored terminal output (env: CYCLONE_UI_NO_COLOR, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--no-interactive, --non-interactive`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Disable interactive mode - will be set to true if running in a CI pipeline (env: CYCLONE_UI_NON_INTERACTIVE, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--quiet`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Suppress command decorations and diagnostic messages (default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`--tokens <tokens...>`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Search terms for design tokens.`),align:`left`,border:`none`}],[{value:t.body.primary(`-V, --verbose`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Enable verbose output (env: CYCLONE_UI_VERBOSE, default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`-v, --version`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Show the version of the application (default: false).`),align:`left`,border:`none`}],[{value:t.body.primary(`-y, --yes`),align:`right`,border:`none`,maxWidth:`1/3`},{value:t.body.tertiary(`Skip all prompts by answering yes to all of them - will be set to true if running in a CI pipeline (env: CYCLONE_UI_YES, default: false).`),align:`left`,border:`none`}]]),e(``),e(t.body.tertiary(`More information can be found in the Plan command documentation at ${n(`https://docs.cyclone-ui.com/reference/cli/plan`)}${t.body.tertiary(`.`)}`),{padding:0}),e(``)}export{o as t};
package/dist/plan.mjs ADDED
@@ -0,0 +1,2 @@
1
+ import{A as e,B as t,D as n,F as r,G as i,I as a,K as o,L as s,N as c,S as l,U as u,V as d,_ as f,j as p,k as m,n as h,t as g,y as _,z as v}from"./console-wWDh21MV.mjs";import{a as y}from"./prompts-zyeiNLLd.mjs";import{t as b}from"./update-BP6PyX8m.mjs";import{t as x}from"./design-system-C6qKXe7_.mjs";import{t as S}from"./plan-BiklQTti.mjs";import{isSearchError as C,plan as w}from"@razorwind/shell-shock/runtime";async function T(i=500){if(t().get(`is-banner-displayed`)||r(`no-banner`)||r(`hide-banner`)||p)return;t().set(`is-banner-displayed`,!0),n(``),n(h.banner.outline.primary(`โ”`)+h.banner.outline.primary(`โ”`.repeat(6))+` `+l.banner.header.primary(`โฌค`)+` `+h.banner.outline.primary(`โ”`)+` `+g(l.banner.header.primary(`Cyclone CLI v0.6.1`))+` `+h.banner.outline.primary(`โ”`.repeat(Math.max(m().columns-32,0)))+h.banner.outline.primary(`โ”“`),{consoleFn:console.log});let o=Math.max(...y.map(e=>_(e).length))>Math.max(m().columns+30,20)?`Cyclone User Interface`:`\n${y.join(`
2
+ `)}\n`;f(o,Math.max(m().columns-30,20)).forEach(e=>{n(h.banner.outline.primary(`โ”ƒ`)+` `.repeat(Math.max(Math.floor((m().columns-(_(e).length+2))/2),0))+g(l.banner.title.primary(e))+` `.repeat(Math.max(Math.ceil((m().columns-(_(e).length+2))/2),0))+h.banner.outline.primary(`โ”ƒ`),{consoleFn:console.log})}),n(h.banner.outline.primary(`โ”ƒ`)+` `.repeat(Math.max(Math.floor((m().columns-(_(`Plan`).length+2))/2),0))+g(l.banner.command.primary(`Plan`))+` `.repeat(Math.max(Math.ceil((m().columns-(_(`Plan`).length+2))/2),0))+h.banner.outline.primary(`โ”ƒ`),{consoleFn:console.log}),f(g(l.banner.description.primary(`Search tokens, icons, components and fonts in one call to plan what to build. Provide terms for at least one list.`)),Math.max(60>m().columns/2?m().columns-6:m().columns-30,20)).forEach(e=>{n(h.banner.outline.primary(`โ”ƒ`)+` `.repeat(Math.max(Math.floor((m().columns-(_(e).length+2))/2),0))+l.banner.description.primary(e)+` `.repeat(Math.max(Math.ceil((m().columns-(_(e).length+2))/2),0))+h.banner.outline.primary(`โ”ƒ`),{consoleFn:console.log})}),n(h.banner.outline.primary(`โ”ƒ`)+` `.repeat(Math.max(m().columns-2,0))+h.banner.outline.primary(`โ”ƒ`),{consoleFn:console.log}),n(h.banner.outline.primary(`โ”—`)+h.banner.outline.primary(`โ”`.repeat(Math.max(m().columns-32,0)))+` `+g(l.banner.footer.primary(`https://cyclone-ui.com`))+` `+h.banner.outline.primary(`โ”`.repeat(6))+h.banner.outline.primary(`โ”›`),{consoleFn:console.log}),n(``),e&&!a()&&await c(i)}function E(e){process.stdout.write(`${typeof e==`string`?e:JSON.stringify(e,null,2)}\n`)}async function D(e){let t=w(x,{tokens:e.tokens,icons:e.icons,components:e.components,fonts:e.fonts,limit:e.limit});E(t),C(t)&&(process.exitCode=1)}async function O(t=s()){let c={...v(),tokens:[],icons:[],components:[],fonts:[],limit:2};for(let e=0;e<t.slice(0).length;e++){let n=t[e].length>3&&t[e].startsWith(`--`)?`--${t[e].slice(2).replaceAll(`-`,``).toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)}`:t[e].length>2&&t[e].startsWith(`-`)?`-${t[e].slice(1).replaceAll(`-`,``)}`:t[e];if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`tokens=`)||n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`tokens`||n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`tokens=`)||n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`tokens`)c.tokens??=[],/^--?(tokens)=/.test(`-`+n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))?c.tokens.push(...n.replace(/^--?(tokens)=/,``).split(`,`).map(e=>e.trim().replace(/^("|')/,``).replace(/("|')$/,``)).filter(Boolean)):t.length>e+1&&c.tokens.push(...t[++e].split(`,`).map(e=>e.trim().replace(/^("|')/,``).replace(/("|')$/,``)).filter(Boolean));else if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`icons=`)||n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`icons`||n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`icons=`)||n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`icons`)c.icons??=[],/^--?(icons)=/.test(`-`+n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))?c.icons.push(...n.replace(/^--?(icons)=/,``).split(`,`).map(e=>e.trim().replace(/^("|')/,``).replace(/("|')$/,``)).filter(Boolean)):t.length>e+1&&c.icons.push(...t[++e].split(`,`).map(e=>e.trim().replace(/^("|')/,``).replace(/("|')$/,``)).filter(Boolean));else if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`components=`)||n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`components`||n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`components=`)||n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`components`)c.components??=[],/^--?(components)=/.test(`-`+n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))?c.components.push(...n.replace(/^--?(components)=/,``).split(`,`).map(e=>e.trim().replace(/^("|')/,``).replace(/("|')$/,``)).filter(Boolean)):t.length>e+1&&c.components.push(...t[++e].split(`,`).map(e=>e.trim().replace(/^("|')/,``).replace(/("|')$/,``)).filter(Boolean));else if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`fonts=`)||n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`fonts`||n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`fonts=`)||n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`fonts`)c.fonts??=[],/^--?(fonts)=/.test(`-`+n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))?c.fonts.push(...n.replace(/^--?(fonts)=/,``).split(`,`).map(e=>e.trim().replace(/^("|')/,``).replace(/("|')$/,``)).filter(Boolean)):t.length>e+1&&c.fonts.push(...t[++e].split(`,`).map(e=>e.trim().replace(/^("|')/,``).replace(/("|')$/,``)).filter(Boolean));else if(n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`limit=`)||n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`limit`||n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``).startsWith(`limit=`)||n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``)===`limit`){if(/^--?(limit)=/.test(`-`+n.toLowerCase().replaceAll(`-`,``).replaceAll(`_`,``))){let e=Number(n.replace(/^--?(limit)=/,``).trim().replace(/^("|')/,``).replace(/("|')$/,``));Number.isNaN(e)||(c.limit=e)}else if(t.length>e+1){let n=Number(t[++e].trim().replace(/^("|')/,``).replace(/("|')$/,``));Number.isNaN(n)||(c.limit=n)}}}return r(`quiet`)||(await T(),await b()),!a()&&!r(`quiet`)&&(n(``),(o||i||u.LOG_LEVEL===`debug`)&&n(l.body.tertiary(`Debug mode is enabled. Additional debug information may be logged to the console.`))),e||c.limit&&Number.isNaN(c.limit)&&[].push(`Invalid numeric value provided for the "limit" option`),c.help?S():d(`plan`,[`plan`],[c],D)}export{O as handler};
@@ -0,0 +1,8 @@
1
+ import{A as e,B as t,C as n,D as r,F as i,I as a,N as o,S as s,_ as c,a as l,j as u,k as d,m as f,n as p,q as m,r as h,s as g,t as _,v,y}from"./console-wWDh21MV.mjs";import b from"node:events";import{createInterface as x,emitKeypressEvents as S}from"node:readline";const C=[`โ–„โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ โ–„โ–„ โ–„โ–„ โ–„โ–„โ–„โ–„ โ–„โ–„ โ–„โ–„โ–„ โ–„โ–„ โ–„โ–„ โ–„โ–„โ–„โ–„โ–„ โ–ˆโ–ˆ โ–ˆโ–ˆ โ–„โ–„โ–„โ–„ โ–„โ–„โ–„โ–„โ–„ โ–„โ–„โ–„โ–„ โ–ˆโ–ˆ โ–„โ–„ โ–„โ–„ โ–„โ–„โ–„โ–„โ–„โ–„ โ–„โ–„โ–„โ–„โ–„ โ–„โ–„โ–„โ–„ โ–„โ–„โ–„โ–„โ–„ โ–„โ–„โ–„ โ–„โ–„โ–„โ–„ โ–„โ–„โ–„โ–„โ–„ `,`โ–ˆโ–ˆ โ–€โ–ˆโ–ˆโ–ˆโ–€ โ–ˆโ–ˆโ–€โ–€โ–€ โ–ˆโ–ˆ โ–ˆโ–ˆโ–€โ–ˆโ–ˆ โ–ˆโ–ˆโ–ˆโ–„โ–ˆโ–ˆ โ–ˆโ–ˆโ–„โ–„ โ–ˆโ–ˆ โ–ˆโ–ˆ โ–ˆโ–ˆโ–ˆโ–„โ–„ โ–ˆโ–ˆโ–„โ–„ โ–ˆโ–ˆโ–„โ–ˆโ–„ โ–ˆโ–ˆ โ–ˆโ–ˆโ–ˆโ–„โ–ˆโ–ˆ โ–ˆโ–ˆ โ–ˆโ–ˆโ–„โ–„ โ–ˆโ–ˆโ–„โ–ˆโ–„ โ–ˆโ–ˆโ–„โ–„ โ–ˆโ–ˆโ–€โ–ˆโ–ˆ โ–ˆโ–ˆโ–€โ–€โ–€ โ–ˆโ–ˆโ–„โ–„ `,`โ–€โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ โ–ˆ โ–€โ–ˆโ–ˆโ–ˆโ–ˆ โ–ˆโ–ˆโ–„โ–„โ–„ โ–€โ–ˆโ–ˆโ–ˆโ–€ โ–ˆโ–ˆ โ–€โ–ˆโ–ˆ โ–ˆโ–ˆโ–„โ–„โ–„ โ–€โ–ˆโ–ˆโ–ˆโ–ˆโ–€ โ–„โ–„โ–ˆโ–ˆโ–€ โ–ˆโ–ˆโ–„โ–„โ–„ โ–ˆโ–ˆ โ–ˆโ–ˆ โ–ˆโ–ˆ โ–ˆโ–ˆ โ–€โ–ˆโ–ˆ โ–ˆโ–ˆ โ–ˆโ–ˆโ–„โ–„โ–„ โ–ˆโ–ˆ โ–ˆโ–ˆ โ–ˆโ–ˆ โ–ˆโ–ˆโ–€โ–ˆโ–ˆ โ–€โ–ˆโ–ˆโ–ˆโ–ˆ โ–ˆโ–ˆโ–„โ–„โ–„ `];async function w(n=500){if(t().get(`is-banner-displayed`)||i(`no-banner`)||i(`hide-banner`)||u)return;t().set(`is-banner-displayed`,!0),r(``),r(p.banner.outline.primary(`โ”`)+p.banner.outline.primary(`โ”`.repeat(6))+` `+s.banner.header.primary(`โฌค`)+` `+p.banner.outline.primary(`โ”`)+` `+_(s.banner.header.primary(`Cyclone CLI v0.6.1`))+` `+p.banner.outline.primary(`โ”`.repeat(Math.max(d().columns-32,0)))+p.banner.outline.primary(`โ”“`),{consoleFn:console.log});let l=Math.max(...C.map(e=>y(e).length))>Math.max(d().columns+30,20)?`Cyclone User Interface`:`\n${C.join(`
2
+ `)}\n`;c(l,Math.max(d().columns-30,20)).forEach(e=>{r(p.banner.outline.primary(`โ”ƒ`)+` `.repeat(Math.max(Math.floor((d().columns-(y(e).length+2))/2),0))+_(s.banner.title.primary(e))+` `.repeat(Math.max(Math.ceil((d().columns-(y(e).length+2))/2),0))+p.banner.outline.primary(`โ”ƒ`),{consoleFn:console.log})}),c(_(s.banner.description.primary(`๐ŸŒ€ A repository containing [Tamagui](https://github.com/tamagui/tamagui) based design components used by Storm Software. Like [shadcn/ui](https://github.com/shadcn-ui/ui), the components are copied into other repositories via the Cyclone CLI.`)),Math.max(60>d().columns/2?d().columns-6:d().columns-30,20)).forEach(e=>{r(p.banner.outline.primary(`โ”ƒ`)+` `.repeat(Math.max(Math.floor((d().columns-(y(e).length+2))/2),0))+s.banner.description.primary(e)+` `.repeat(Math.max(Math.ceil((d().columns-(y(e).length+2))/2),0))+p.banner.outline.primary(`โ”ƒ`),{consoleFn:console.log})}),r(p.banner.outline.primary(`โ”ƒ`)+` `.repeat(Math.max(d().columns-2,0))+p.banner.outline.primary(`โ”ƒ`),{consoleFn:console.log}),r(p.banner.outline.primary(`โ”—`)+p.banner.outline.primary(`โ”`.repeat(Math.max(d().columns-32,0)))+` `+_(s.banner.footer.primary(`https://cyclone-ui.com`))+` `+p.banner.outline.primary(`โ”`.repeat(6))+p.banner.outline.primary(`โ”›`),{consoleFn:console.log}),r(``),e&&!a()&&await o(n)}function T(e){return e}var E=class extends b{config;#e;#t;#n=!1;#r=!1;#i=!1;input=process.stdin;output=process.stdout;message=``;description=``;errorMessage=null;defaultErrorMessage=`An invalid value was provided`;isSubmitted=!1;isCancelled=!1;isInitial=!0;consoleOutput=``;consoleStatus=``;displayValue=``;validate=()=>!0;parse=e=>e;format=e=>String(e);mask=T;maskCompleted=this.mask;cursor=0;cursorHidden=!1;constructor(e){super(),this.config=e,e.input&&(this.input=e.input),e.output&&(this.output=e.output),e.defaultErrorMessage&&(this.defaultErrorMessage=e.defaultErrorMessage),e.description&&(this.description=e.description),e.validate&&(this.validate=e.validate),e.parse&&(this.parse=e.parse.bind(this)),e.format&&(this.format=e.format.bind(this)),e.maskCompleted&&(this.maskCompleted=e.maskCompleted),e.mask&&(this.mask=e.mask),e.timeout!==void 0&&!Number.isNaN(e.timeout)&&setTimeout(()=>{this.isCompleted||this.cancel()},e.timeout),this.message=e.message,this.#e=x({input:this.input,escapeCodeTimeout:50}),S(this.input,this.#e),this.input.isTTY&&this.input.setRawMode(!0),this.input.on(`keypress`,this.keypress.bind(this))}[Symbol.dispose](){this.close()}get value(){return this.#t||this.initialValue}get isError(){return!!this.errorMessage}get isSelect(){return!1}get isCompleted(){return this.isCancelled||this.isSubmitted}get isPlaceholder(){return this.displayValue===this.format(this.initialValue)&&!this.#r||!this.#n}get status(){return this.isSubmitted?``:` \n ${f(this.isError?s.prompt.description.error(c(this.errorMessage,`3/4`).join(`
3
+ `)):this.isCancelled?s.prompt.description.cancelled(c(`Input was cancelled by user`,`3/4`).join(`
4
+ `)):this.description?s.prompt.description.active(c(this.description,`3/4`).join(`
5
+ `)):``)}`}get isCursorAtStart(){return this.cursor<=0||this.isPlaceholder&&this.cursor<=1}get isCursorAtEnd(){return this.cursor>=this.displayValue.length||this.isPlaceholder&&this.cursor>=this.displayValue.length-1}changeValue(e){let t=this.value,n=e;n=e===void 0||e===``?this.initialValue:e,this.displayValue=this.mask(this.format(n)),this.#t=n,!this.#r&&this.#t!==this.initialValue&&(this.#r=!0),this.onChange(t),setTimeout(()=>{Promise.resolve(this.checkValidations(n)).then(()=>this.sync())},0),this.sync()}sync(){this.emit(`state`,{value:this.value,errorMessage:this.errorMessage,isError:this.isError,isSubmitted:this.isSubmitted,isCancelled:this.isCancelled,isCompleted:this.isCompleted}),this.render()}bell(){this.output.write(`\x07`)}onRender(){return this.isPlaceholder?s.prompt.input.disabled(this.displayValue):this.isError?s.prompt.input.error(this.displayValue):this.isSubmitted?s.prompt.input.submitted(this.maskCompleted(this.displayValue)):this.isCancelled?s.prompt.input.cancelled(this.maskCompleted(this.displayValue)):_(s.prompt.input.active(this.displayValue))}onChange(e){}onKeyPress(e,t){let n=this.getAction(t);n?typeof this[n]==`function`&&this[n](t):this.bell()}async close(){this.#i||=(this.output.write(l.show),this.input.removeListener(`keypress`,this.keypress),this.input.isTTY&&this.input.setRawMode(!1),this.#e.close(),this.emit(this.isSubmitted?`submit`:`cancel`,this.value),!0)}async checkValidations(e){let t=await this.validate(e);this.errorMessage=typeof t==`string`?t:typeof t==`boolean`?t?null:this.defaultErrorMessage:null}getAction(e){if(e.meta&&e.name!==`escape`)return!1;let t;return e.ctrl&&(e.name===`a`&&(t=`first`),e.name===`c`&&(t=`cancel`),e.name===`d`&&(t=`cancel`),e.name===`e`&&(t=`last`),e.name===`g`&&(t=`reset`)),e.name===`return`&&(t=`submit`),e.name===`enter`&&(t=`submit`),e.name===`backspace`&&(t=`backspace`),e.name===`delete`&&(t=`delete`),e.name===`cancel`&&(t=`cancel`),e.name===`escape`&&(t=`cancel`),e.name===`tab`&&(t=`next`),e.name===`pagedown`&&(t=`nextPage`),e.name===`pageup`&&(t=`prevPage`),e.name===`home`&&(t=`home`),e.name===`end`&&(t=`end`),e.name===`up`&&(t=`up`),e.name===`down`&&(t=`down`),e.name===`right`&&(t=`right`),e.name===`left`&&(t=`left`),t||!1}moveCursor(e){this.cursor+e<0?this.cursor=0:this.cursor+e>this.displayValue.length?this.cursor=this.displayValue.length:this.cursor+=e}backspace(){if(this.isCursorAtStart||this.displayValue===``)return this.bell();let e=this.isCursorAtEnd&&this.displayValue.length===this.cursor;this.changeValue(this.parse(`${this.displayValue.slice(0,this.cursor-1)}${this.displayValue.slice(this.cursor)}`)),this.moveCursor(e?-1:-2),this.sync()}delete(){if(this.isCursorAtEnd)return this.bell();this.changeValue(this.parse(`${this.displayValue.slice(0,this.cursor)}${this.displayValue.slice(this.cursor+1)}`)),this.isCursorAtStart||this.moveCursor(-1),this.sync()}reset(){this.changeValue(this.initialValue),this.cursor=0,this.errorMessage=null,this.isCancelled=!1,this.isSubmitted=!1,this.sync()}cancel(){this.errorMessage=null,this.isCancelled=!0,this.isSubmitted=!1,this.sync(),this.output.write(`
6
+ `),this.close()}async submit(){this.cursor=this.displayValue.length,await this.checkValidations(this.value),this.isError?(this.sync(),this.bell()):(this.isSubmitted=!0,this.isCancelled=!1,this.sync(),this.output.write(`
7
+ `),this.close())}render(){if(this.#i)return;let e=setTimeout(()=>{throw Error(`Rendering Timeout: Prompt render took too long, this is likely due to a long-running operation being performed during the render phase. Please ensure that any operations performed during rendering are optimized and do not block the event loop to prevent this error.`)},1e3);try{this.isInitial?this.cursorHidden&&this.output.write(l.hide):(this.consoleStatus&&this.output.write(l.down(y(this.consoleStatus).split(/\r?\n/).map(e=>Math.ceil(e.length/this.output.columns)).reduce((e,t)=>e+t)-1)+h(this.consoleStatus,this.output.columns)),this.output.write(h(this.consoleOutput,this.output.columns))),this.consoleOutput=` ${this.isSubmitted?s.prompt.icon.submitted(`โœ”`):this.isCancelled?s.prompt.icon.cancelled(`๐Ÿ›‡`):this.isError?s.prompt.icon.error(`โœ˜`):s.prompt.icon.active(`โœฑ`)} ${this.isCompleted?s.prompt.message.submitted(this.message):_(s.prompt.message.active(this.message))} ${p.app.divider.tertiary(this.isCompleted?m?`...`:`โ€ฆ`:m?`ยป`:`โ€บ`)} `,this.consoleOutput+=this.onRender(),this.isInitial&&=!1,this.output.write(g.line+l.to(0)+this.consoleOutput+(this.status?l.save+this.status+l.restore+l.move(this.displayValue.length-(this.displayValue.length-this.cursor)-this.displayValue.length,0):l.save)),this.consoleStatus=this.status}finally{clearTimeout(e)}}keypress(e,t){if(!this.#i)return this.#n||=!0,this.onKeyPress(e,t)}};const D=Symbol(`shell-shock:prompts:cancel`);function O(e){return e===D}var k=class extends E{#e=!1;initialValue=``;constructor(e){super(e),e.initialValue&&(this.initialValue=e.initialValue),this.initialValue&&this.changeValue(this.initialValue),this.cursor=0,this.sync(),this.last()}onKeyPress(e,t){let n=this.getAction(t);if(n&&typeof this[n]==`function`)return this[n]();if(!e||e.length===0)return this.bell();this.changeValue(`${this.displayValue.slice(0,this.cursor)}${e}${this.displayValue.slice(this.cursor)}`),this.sync()}onChange(e){this.#e=!1,this.cursor=this.displayValue.slice(0,this.cursor).length+1}reset(){this.cursor=Number(!!this.initialValue),super.reset()}async checkValidations(){await super.checkValidations(this.value),this.#e=this.isError}next(){this.changeValue(this.initialValue),this.cursor=this.displayValue.length,this.sync()}first(){this.cursor=0,this.sync()}last(){this.cursor=this.displayValue.length,this.sync()}left(){if(this.cursor<=0)return this.bell();this.moveCursor(-1),this.sync()}right(){if(this.cursor>=this.displayValue.length)return this.bell();this.moveCursor(1),this.sync()}onRender(){return this.isPlaceholder?s.prompt.input.disabled(this.displayValue):this.#e?s.prompt.input.error(this.displayValue):this.isSubmitted?s.prompt.input.submitted(this.displayValue):this.isCancelled?s.prompt.input.cancelled(this.displayValue):_(s.prompt.input.active(this.displayValue))}};function A(e){return new Promise((t,n)=>{let r=new k(e);r.on(`state`,t=>e.onState?.(t)),r.on(`submit`,e=>t(e)),r.on(`cancel`,e=>t(D))})}var j=class extends E{initialValue;optionsPerPage=8;options=[];cursorHidden=!0;constructor(e){super(e),this.initialValue=e.initialValue?e.initialValue:void 0,this.options=e.options.map((e,t)=>{let n={};if(typeof e==`string`)n={label:e,value:e,selected:!1,disabled:!1};else if(typeof e==`object`)n=e;else throw Error(`Invalid option provided to SelectPrompt at index #${t}`);return{label:String(n.value)||``,...n,description:n.description,selected:!!n.selected||this.initialValue!==void 0&&n.value===this.initialValue,disabled:!!n.disabled}}).sort((e,t)=>e.label.localeCompare(t.label)).map((e,t)=>({...e,index:t}));let t=this.options.findIndex(e=>e.selected);t>-1&&(this.cursor=t,this.options[this.cursor]&&(this.initialValue=this.options[this.cursor].value)),this.initialValue===void 0&&this.options.length>0&&this.options[0]&&(this.initialValue=this.options[0].value),e.optionsPerPage&&(this.optionsPerPage=e.optionsPerPage),this.sync()}get selectedOption(){return this.options.find(e=>e.value===this.value)??null}getAction(e){let t=super.getAction(e);return t||(e.name===`j`&&(t=`down`),e.name===`k`&&(t=`up`)),t||!1}reset(){this.moveCursor(0),super.reset()}async submit(){this.selectedOption?.disabled?this.bell():await super.submit()}next(){this.moveCursor((this.cursor+1)%this.options.length),this.sync()}moveCursor(e){this.cursor=e,this.changeValue(this.options[e].value),this.sync()}first(){this.moveCursor(0),this.sync()}last(){this.moveCursor(this.options.length-1),this.sync()}first_2(){this.cursor=0,this.sync()}up(){this.cursor===0?this.moveCursor(this.options.length-1):this.moveCursor(this.cursor-1),this.sync()}down(){this.cursor===this.options.length-1?this.moveCursor(0):this.moveCursor(this.cursor+1),this.sync()}onRender(){let e=Math.max(...this.options.map(e=>e.label?.length||0))+2,t=Math.max(Math.min(this.options.length-this.optionsPerPage,this.cursor-Math.floor(this.optionsPerPage/2)),0),r=Math.min(t+this.optionsPerPage,this.options.length),i=``;if(this.isCompleted)this.displayValue=this.selectedOption?.label||String(this.value),i+=super.onRender();else{i+=`
8
+ `;for(let a=t;a<r;a++)i+=`${this.options[a].disabled?this.cursor===a?_(s.prompt.input.disabled(`>`)):a===t?p.app.divider.tertiary(`โ†‘`):a===r-1?p.app.divider.tertiary(`โ†“`):` `:this.cursor===a?_(s.prompt.input.active(`>`)):a===t?p.app.divider.tertiary(`โ†‘`):a===r-1?p.app.divider.tertiary(`โ†“`):` `} ${this.options[a].disabled?this.cursor===a?_(s.prompt.input.disabled(this.options[a].icon?n(`${this.options[a].icon} `):``)):v(s.prompt.input.disabled(this.options[a].icon?`${this.options[a].icon} `:``)):this.cursor===a?_(s.prompt.input.active(this.options[a].icon?n(`${this.options[a].icon} `):``)):s.prompt.input.inactive(this.options[a].icon?`${this.options[a].icon} `:``)}${this.options[a].disabled?this.cursor===a?_(n(s.prompt.input.disabled(this.options[a].label))):v(s.prompt.input.disabled(this.options[a].label)):this.cursor===a?_(n(s.prompt.input.active(this.options[a].label))):s.prompt.input.inactive(this.options[a].label)} ${` `.repeat(Math.max(0,e-this.options[a].label.length-(this.options[a].icon?this.options[a].icon.length+1:0)))}${this.options[a].description&&this.cursor===a?f(s.prompt.description.active(this.options[a].description)):``} \n`}return i}};function M(e){return new Promise((t,n)=>{let r=new j(e);r.on(`state`,t=>e.onState?.(t)),r.on(`submit`,e=>t(e)),r.on(`cancel`,e=>t(D))})}function N(e=72e5){return process.stdin.setRawMode(!0),new Promise(t=>process.stdin.once(`data`,()=>{e>=0&&setTimeout(()=>{process.stdin.setRawMode(!1),t(void 0)},e),process.stdin.setRawMode(!1),t(void 0)}))}export{C as a,N as i,M as n,w as o,A as r,O as t};