mepcli 2.0.0-beta.1 → 2.0.0-beta.3

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 (357) hide show
  1. package/README.md +32 -10
  2. package/dist/ansi.d.ts +36 -0
  3. package/dist/ansi.js +1 -0
  4. package/dist/base.d.ts +60 -0
  5. package/dist/base.js +1 -0
  6. package/dist/{src/core.js → core.d.ts} +175 -347
  7. package/dist/core.js +1 -0
  8. package/dist/data/countries.d.ts +2 -0
  9. package/dist/data/countries.js +1 -0
  10. package/dist/data/licenses.d.ts +2 -0
  11. package/dist/data/licenses.js +1 -0
  12. package/dist/highlight.d.ts +7 -0
  13. package/dist/highlight.js +1 -0
  14. package/dist/index.d.ts +48 -0
  15. package/dist/index.js +1 -0
  16. package/dist/input.d.ts +14 -0
  17. package/dist/input.js +1 -0
  18. package/dist/pipeline.d.ts +90 -0
  19. package/dist/pipeline.js +1 -0
  20. package/dist/prompts/autocomplete.d.ts +22 -0
  21. package/dist/prompts/autocomplete.js +1 -0
  22. package/dist/prompts/box.d.ts +21 -0
  23. package/dist/prompts/box.js +4 -0
  24. package/dist/prompts/breadcrumb-search.d.ts +14 -0
  25. package/dist/prompts/breadcrumb-search.js +2 -0
  26. package/dist/prompts/breadcrumb.d.ts +32 -0
  27. package/dist/prompts/breadcrumb.js +3 -0
  28. package/dist/prompts/byte.d.ts +13 -0
  29. package/dist/prompts/byte.js +5 -0
  30. package/dist/prompts/calculator.d.ts +17 -0
  31. package/dist/prompts/calculator.js +3 -0
  32. package/dist/prompts/calendar.d.ts +33 -0
  33. package/dist/prompts/calendar.js +3 -0
  34. package/dist/prompts/checkbox.d.ts +13 -0
  35. package/dist/prompts/checkbox.js +2 -0
  36. package/dist/prompts/code.d.ts +19 -0
  37. package/dist/prompts/code.js +4 -0
  38. package/dist/prompts/color.d.ts +14 -0
  39. package/dist/prompts/color.js +10 -0
  40. package/dist/prompts/confirm.d.ts +8 -0
  41. package/dist/prompts/confirm.js +1 -0
  42. package/dist/prompts/connection-string.d.ts +18 -0
  43. package/dist/prompts/connection-string.js +1 -0
  44. package/dist/prompts/cron.d.ts +13 -0
  45. package/dist/prompts/cron.js +4 -0
  46. package/dist/prompts/curl-utils.d.ts +25 -0
  47. package/dist/prompts/curl-utils.js +1 -0
  48. package/dist/prompts/curl.d.ts +41 -0
  49. package/dist/prompts/curl.js +12 -0
  50. package/dist/prompts/data-inspector.d.ts +22 -0
  51. package/dist/prompts/data-inspector.js +5 -0
  52. package/dist/prompts/date.d.ts +12 -0
  53. package/dist/prompts/date.js +2 -0
  54. package/dist/prompts/dependency.d.ts +16 -0
  55. package/dist/prompts/dependency.js +3 -0
  56. package/dist/prompts/dial.d.ts +10 -0
  57. package/dist/prompts/dial.js +3 -0
  58. package/dist/prompts/diff.d.ts +10 -0
  59. package/dist/prompts/diff.js +10 -0
  60. package/dist/prompts/draw.d.ts +20 -0
  61. package/dist/prompts/draw.js +6 -0
  62. package/dist/prompts/editor.d.ts +14 -0
  63. package/dist/prompts/editor.js +2 -0
  64. package/dist/prompts/emoji.d.ts +18 -0
  65. package/dist/prompts/emoji.js +5 -0
  66. package/dist/prompts/exec.d.ts +17 -0
  67. package/dist/prompts/exec.js +1 -0
  68. package/dist/prompts/file.d.ts +21 -0
  69. package/dist/prompts/file.js +2 -0
  70. package/dist/prompts/form.d.ts +18 -0
  71. package/dist/prompts/form.js +1 -0
  72. package/dist/prompts/fuzzy-multi-column.d.ts +12 -0
  73. package/dist/prompts/fuzzy-multi-column.js +2 -0
  74. package/dist/prompts/fuzzy.d.ts +12 -0
  75. package/dist/prompts/fuzzy.js +2 -0
  76. package/dist/prompts/gauge.d.ts +21 -0
  77. package/dist/prompts/gauge.js +4 -0
  78. package/dist/prompts/grid.d.ts +14 -0
  79. package/dist/prompts/grid.js +2 -0
  80. package/dist/prompts/heatmap.d.ts +13 -0
  81. package/dist/prompts/heatmap.js +2 -0
  82. package/dist/prompts/ip.d.ts +11 -0
  83. package/dist/prompts/ip.js +3 -0
  84. package/dist/prompts/kanban.d.ts +17 -0
  85. package/dist/prompts/kanban.js +4 -0
  86. package/dist/prompts/keypress.d.ts +7 -0
  87. package/dist/prompts/keypress.js +1 -0
  88. package/dist/prompts/license.d.ts +9 -0
  89. package/dist/prompts/license.js +13 -0
  90. package/dist/prompts/list.d.ts +9 -0
  91. package/dist/prompts/list.js +1 -0
  92. package/dist/prompts/map.d.ts +17 -0
  93. package/dist/prompts/map.js +5 -0
  94. package/dist/prompts/match.d.ts +19 -0
  95. package/dist/prompts/match.js +7 -0
  96. package/dist/prompts/miller.d.ts +15 -0
  97. package/dist/prompts/miller.js +2 -0
  98. package/dist/prompts/multi-column-select.d.ts +10 -0
  99. package/dist/prompts/multi-column-select.js +2 -0
  100. package/dist/prompts/multi-range.d.ts +9 -0
  101. package/dist/prompts/multi-range.js +3 -0
  102. package/dist/prompts/multi-select.d.ts +15 -0
  103. package/dist/prompts/multi-select.js +4 -0
  104. package/dist/prompts/number.d.ts +11 -0
  105. package/dist/prompts/number.js +2 -0
  106. package/dist/prompts/otp.d.ts +10 -0
  107. package/dist/prompts/otp.js +2 -0
  108. package/dist/prompts/pattern.d.ts +22 -0
  109. package/dist/prompts/pattern.js +4 -0
  110. package/dist/prompts/phone.d.ts +41 -0
  111. package/dist/prompts/phone.js +3 -0
  112. package/dist/prompts/quiz-select.d.ts +10 -0
  113. package/dist/prompts/quiz-select.js +7 -0
  114. package/dist/prompts/quiz-text.d.ts +11 -0
  115. package/dist/prompts/quiz-text.js +8 -0
  116. package/dist/prompts/range.d.ts +9 -0
  117. package/dist/prompts/range.js +1 -0
  118. package/dist/prompts/rating.d.ts +8 -0
  119. package/dist/prompts/rating.js +1 -0
  120. package/dist/prompts/regex.d.ts +13 -0
  121. package/dist/prompts/regex.js +5 -0
  122. package/dist/prompts/region.d.ts +11 -0
  123. package/dist/prompts/region.js +5 -0
  124. package/dist/prompts/schedule.d.ts +20 -0
  125. package/dist/prompts/schedule.js +5 -0
  126. package/dist/prompts/scroll.d.ts +13 -0
  127. package/dist/prompts/scroll.js +1 -0
  128. package/dist/prompts/seat.d.ts +17 -0
  129. package/dist/prompts/seat.js +5 -0
  130. package/dist/prompts/select-range.d.ts +8 -0
  131. package/dist/prompts/select-range.js +3 -0
  132. package/dist/prompts/select.d.ts +15 -0
  133. package/dist/prompts/select.js +2 -0
  134. package/dist/prompts/semver.d.ts +6 -0
  135. package/dist/prompts/semver.js +1 -0
  136. package/dist/prompts/shortcut.d.ts +9 -0
  137. package/dist/prompts/shortcut.js +1 -0
  138. package/dist/prompts/slider.d.ts +8 -0
  139. package/dist/prompts/slider.js +1 -0
  140. package/dist/prompts/slot.d.ts +16 -0
  141. package/dist/prompts/slot.js +8 -0
  142. package/dist/prompts/snippet.d.ts +19 -0
  143. package/dist/prompts/snippet.js +4 -0
  144. package/dist/prompts/sort-grid.d.ts +16 -0
  145. package/dist/prompts/sort-grid.js +2 -0
  146. package/dist/prompts/sort.d.ts +14 -0
  147. package/dist/prompts/sort.js +2 -0
  148. package/dist/prompts/spam.d.ts +17 -0
  149. package/dist/prompts/spam.js +2 -0
  150. package/dist/prompts/spreadsheet.d.ts +21 -0
  151. package/dist/prompts/spreadsheet.js +7 -0
  152. package/dist/prompts/table.d.ts +14 -0
  153. package/dist/prompts/table.js +3 -0
  154. package/dist/prompts/text.d.ts +17 -0
  155. package/dist/prompts/text.js +2 -0
  156. package/dist/prompts/time.d.ts +12 -0
  157. package/dist/prompts/time.js +2 -0
  158. package/dist/prompts/toggle.d.ts +8 -0
  159. package/dist/prompts/toggle.js +1 -0
  160. package/dist/prompts/transfer.d.ts +18 -0
  161. package/dist/prompts/transfer.js +5 -0
  162. package/dist/prompts/tree-select.d.ts +31 -0
  163. package/dist/prompts/tree-select.js +3 -0
  164. package/dist/prompts/tree.d.ts +20 -0
  165. package/dist/prompts/tree.js +3 -0
  166. package/dist/prompts/wait.d.ts +18 -0
  167. package/dist/prompts/wait.js +1 -0
  168. package/dist/spinner.d.ts +33 -0
  169. package/dist/spinner.js +3 -0
  170. package/dist/symbols.d.ts +33 -0
  171. package/dist/symbols.js +1 -0
  172. package/dist/tasks.d.ts +57 -0
  173. package/dist/tasks.js +1 -0
  174. package/dist/theme.d.ts +2 -0
  175. package/dist/theme.js +1 -0
  176. package/dist/types.d.ts +503 -0
  177. package/dist/types.js +1 -0
  178. package/dist/utils.d.ts +81 -0
  179. package/dist/utils.js +1 -0
  180. package/package.json +12 -17
  181. package/dist/src/ansi.js +0 -50
  182. package/dist/src/ansi.js.map +0 -1
  183. package/dist/src/base.js +0 -258
  184. package/dist/src/base.js.map +0 -1
  185. package/dist/src/core.js.map +0 -1
  186. package/dist/src/data/countries.js +0 -569
  187. package/dist/src/data/countries.js.map +0 -1
  188. package/dist/src/data/licenses.js +0 -480
  189. package/dist/src/data/licenses.js.map +0 -1
  190. package/dist/src/highlight.js +0 -185
  191. package/dist/src/highlight.js.map +0 -1
  192. package/dist/src/index.js +0 -66
  193. package/dist/src/index.js.map +0 -1
  194. package/dist/src/input.js +0 -158
  195. package/dist/src/input.js.map +0 -1
  196. package/dist/src/pipeline.js +0 -273
  197. package/dist/src/pipeline.js.map +0 -1
  198. package/dist/src/prompts/autocomplete.js +0 -171
  199. package/dist/src/prompts/autocomplete.js.map +0 -1
  200. package/dist/src/prompts/box.js +0 -225
  201. package/dist/src/prompts/box.js.map +0 -1
  202. package/dist/src/prompts/breadcrumb-search.js +0 -260
  203. package/dist/src/prompts/breadcrumb-search.js.map +0 -1
  204. package/dist/src/prompts/breadcrumb.js +0 -307
  205. package/dist/src/prompts/breadcrumb.js.map +0 -1
  206. package/dist/src/prompts/byte.js +0 -176
  207. package/dist/src/prompts/byte.js.map +0 -1
  208. package/dist/src/prompts/calculator.js +0 -243
  209. package/dist/src/prompts/calculator.js.map +0 -1
  210. package/dist/src/prompts/calendar.js +0 -430
  211. package/dist/src/prompts/calendar.js.map +0 -1
  212. package/dist/src/prompts/checkbox.js +0 -159
  213. package/dist/src/prompts/checkbox.js.map +0 -1
  214. package/dist/src/prompts/code.js +0 -271
  215. package/dist/src/prompts/code.js.map +0 -1
  216. package/dist/src/prompts/color.js +0 -165
  217. package/dist/src/prompts/color.js.map +0 -1
  218. package/dist/src/prompts/confirm.js +0 -55
  219. package/dist/src/prompts/confirm.js.map +0 -1
  220. package/dist/src/prompts/connection-string.js +0 -120
  221. package/dist/src/prompts/connection-string.js.map +0 -1
  222. package/dist/src/prompts/cron.js +0 -207
  223. package/dist/src/prompts/cron.js.map +0 -1
  224. package/dist/src/prompts/curl-utils.js +0 -71
  225. package/dist/src/prompts/curl-utils.js.map +0 -1
  226. package/dist/src/prompts/curl.js +0 -431
  227. package/dist/src/prompts/curl.js.map +0 -1
  228. package/dist/src/prompts/data-inspector.js +0 -261
  229. package/dist/src/prompts/data-inspector.js.map +0 -1
  230. package/dist/src/prompts/date.js +0 -185
  231. package/dist/src/prompts/date.js.map +0 -1
  232. package/dist/src/prompts/dependency.js +0 -283
  233. package/dist/src/prompts/dependency.js.map +0 -1
  234. package/dist/src/prompts/dial.js +0 -124
  235. package/dist/src/prompts/dial.js.map +0 -1
  236. package/dist/src/prompts/diff.js +0 -118
  237. package/dist/src/prompts/diff.js.map +0 -1
  238. package/dist/src/prompts/draw.js +0 -191
  239. package/dist/src/prompts/draw.js.map +0 -1
  240. package/dist/src/prompts/editor.js +0 -234
  241. package/dist/src/prompts/editor.js.map +0 -1
  242. package/dist/src/prompts/emoji.js +0 -226
  243. package/dist/src/prompts/emoji.js.map +0 -1
  244. package/dist/src/prompts/exec.js +0 -151
  245. package/dist/src/prompts/exec.js.map +0 -1
  246. package/dist/src/prompts/file.js +0 -217
  247. package/dist/src/prompts/file.js.map +0 -1
  248. package/dist/src/prompts/form.js +0 -241
  249. package/dist/src/prompts/form.js.map +0 -1
  250. package/dist/src/prompts/fuzzy-multi-column.js +0 -161
  251. package/dist/src/prompts/fuzzy-multi-column.js.map +0 -1
  252. package/dist/src/prompts/fuzzy.js +0 -147
  253. package/dist/src/prompts/fuzzy.js.map +0 -1
  254. package/dist/src/prompts/gauge.js +0 -137
  255. package/dist/src/prompts/gauge.js.map +0 -1
  256. package/dist/src/prompts/grid.js +0 -191
  257. package/dist/src/prompts/grid.js.map +0 -1
  258. package/dist/src/prompts/heatmap.js +0 -147
  259. package/dist/src/prompts/heatmap.js.map +0 -1
  260. package/dist/src/prompts/ip.js +0 -138
  261. package/dist/src/prompts/ip.js.map +0 -1
  262. package/dist/src/prompts/kanban.js +0 -233
  263. package/dist/src/prompts/kanban.js.map +0 -1
  264. package/dist/src/prompts/keypress.js +0 -54
  265. package/dist/src/prompts/keypress.js.map +0 -1
  266. package/dist/src/prompts/license.js +0 -144
  267. package/dist/src/prompts/license.js.map +0 -1
  268. package/dist/src/prompts/list.js +0 -124
  269. package/dist/src/prompts/list.js.map +0 -1
  270. package/dist/src/prompts/map.js +0 -262
  271. package/dist/src/prompts/map.js.map +0 -1
  272. package/dist/src/prompts/match.js +0 -271
  273. package/dist/src/prompts/match.js.map +0 -1
  274. package/dist/src/prompts/miller.js +0 -228
  275. package/dist/src/prompts/miller.js.map +0 -1
  276. package/dist/src/prompts/multi-column-select.js +0 -176
  277. package/dist/src/prompts/multi-column-select.js.map +0 -1
  278. package/dist/src/prompts/multi-range.js +0 -189
  279. package/dist/src/prompts/multi-range.js.map +0 -1
  280. package/dist/src/prompts/multi-select.js +0 -183
  281. package/dist/src/prompts/multi-select.js.map +0 -1
  282. package/dist/src/prompts/number.js +0 -166
  283. package/dist/src/prompts/number.js.map +0 -1
  284. package/dist/src/prompts/otp.js +0 -107
  285. package/dist/src/prompts/otp.js.map +0 -1
  286. package/dist/src/prompts/pattern.js +0 -252
  287. package/dist/src/prompts/pattern.js.map +0 -1
  288. package/dist/src/prompts/phone.js +0 -398
  289. package/dist/src/prompts/phone.js.map +0 -1
  290. package/dist/src/prompts/quiz-select.js +0 -114
  291. package/dist/src/prompts/quiz-select.js.map +0 -1
  292. package/dist/src/prompts/quiz-text.js +0 -98
  293. package/dist/src/prompts/quiz-text.js.map +0 -1
  294. package/dist/src/prompts/range.js +0 -164
  295. package/dist/src/prompts/range.js.map +0 -1
  296. package/dist/src/prompts/rating.js +0 -83
  297. package/dist/src/prompts/rating.js.map +0 -1
  298. package/dist/src/prompts/regex.js +0 -145
  299. package/dist/src/prompts/regex.js.map +0 -1
  300. package/dist/src/prompts/region.js +0 -170
  301. package/dist/src/prompts/region.js.map +0 -1
  302. package/dist/src/prompts/schedule.js +0 -270
  303. package/dist/src/prompts/schedule.js.map +0 -1
  304. package/dist/src/prompts/scroll.js +0 -155
  305. package/dist/src/prompts/scroll.js.map +0 -1
  306. package/dist/src/prompts/seat.js +0 -164
  307. package/dist/src/prompts/seat.js.map +0 -1
  308. package/dist/src/prompts/select-range.js +0 -148
  309. package/dist/src/prompts/select-range.js.map +0 -1
  310. package/dist/src/prompts/select.js +0 -163
  311. package/dist/src/prompts/select.js.map +0 -1
  312. package/dist/src/prompts/semver.js +0 -43
  313. package/dist/src/prompts/semver.js.map +0 -1
  314. package/dist/src/prompts/shortcut.js +0 -133
  315. package/dist/src/prompts/shortcut.js.map +0 -1
  316. package/dist/src/prompts/slider.js +0 -69
  317. package/dist/src/prompts/slider.js.map +0 -1
  318. package/dist/src/prompts/slot.js +0 -117
  319. package/dist/src/prompts/slot.js.map +0 -1
  320. package/dist/src/prompts/snippet.js +0 -228
  321. package/dist/src/prompts/snippet.js.map +0 -1
  322. package/dist/src/prompts/sort-grid.js +0 -151
  323. package/dist/src/prompts/sort-grid.js.map +0 -1
  324. package/dist/src/prompts/sort.js +0 -166
  325. package/dist/src/prompts/sort.js.map +0 -1
  326. package/dist/src/prompts/spam.js +0 -80
  327. package/dist/src/prompts/spam.js.map +0 -1
  328. package/dist/src/prompts/spreadsheet.js +0 -240
  329. package/dist/src/prompts/spreadsheet.js.map +0 -1
  330. package/dist/src/prompts/table.js +0 -120
  331. package/dist/src/prompts/table.js.map +0 -1
  332. package/dist/src/prompts/text.js +0 -317
  333. package/dist/src/prompts/text.js.map +0 -1
  334. package/dist/src/prompts/time.js +0 -211
  335. package/dist/src/prompts/time.js.map +0 -1
  336. package/dist/src/prompts/toggle.js +0 -53
  337. package/dist/src/prompts/toggle.js.map +0 -1
  338. package/dist/src/prompts/transfer.js +0 -207
  339. package/dist/src/prompts/transfer.js.map +0 -1
  340. package/dist/src/prompts/tree-select.js +0 -270
  341. package/dist/src/prompts/tree-select.js.map +0 -1
  342. package/dist/src/prompts/tree.js +0 -233
  343. package/dist/src/prompts/tree.js.map +0 -1
  344. package/dist/src/prompts/wait.js +0 -79
  345. package/dist/src/prompts/wait.js.map +0 -1
  346. package/dist/src/spinner.js +0 -105
  347. package/dist/src/spinner.js.map +0 -1
  348. package/dist/src/symbols.js +0 -66
  349. package/dist/src/symbols.js.map +0 -1
  350. package/dist/src/tasks.js +0 -231
  351. package/dist/src/tasks.js.map +0 -1
  352. package/dist/src/theme.js +0 -29
  353. package/dist/src/theme.js.map +0 -1
  354. package/dist/src/types.js +0 -8
  355. package/dist/src/types.js.map +0 -1
  356. package/dist/src/utils.js +0 -480
  357. package/dist/src/utils.js.map +0 -1
@@ -0,0 +1,503 @@
1
+ /**
2
+ * Type definitions for Mep CLI interactions.
3
+ */
4
+ export interface ThemeConfig {
5
+ main: string;
6
+ success: string;
7
+ error: string;
8
+ muted: string;
9
+ title: string;
10
+ syntax: {
11
+ key: string;
12
+ string: string;
13
+ number: string;
14
+ boolean: string;
15
+ null: string;
16
+ punctuation: string;
17
+ };
18
+ }
19
+ export interface BaseOptions {
20
+ message: string;
21
+ mouse?: boolean;
22
+ }
23
+ export interface MouseEvent {
24
+ name: 'mouse';
25
+ x: number;
26
+ y: number;
27
+ button: number;
28
+ action: 'press' | 'release' | 'move' | 'scroll';
29
+ scroll?: 'up' | 'down';
30
+ shift?: boolean;
31
+ ctrl?: boolean;
32
+ meta?: boolean;
33
+ }
34
+ export interface TextOptions extends BaseOptions {
35
+ placeholder?: string;
36
+ initial?: string;
37
+ validate?: (value: string) => string | boolean | Promise<string | boolean>;
38
+ isPassword?: boolean;
39
+ multiline?: boolean;
40
+ mask?: string;
41
+ suggest?: (input: string) => string | Promise<string>;
42
+ }
43
+ export interface Separator {
44
+ separator: true;
45
+ text?: string;
46
+ }
47
+ export interface SelectChoice<V> {
48
+ title: string;
49
+ value: V;
50
+ description?: string;
51
+ }
52
+ export interface SelectOptions<V> extends BaseOptions {
53
+ choices: (SelectChoice<V> | Separator)[];
54
+ }
55
+ export interface TransferOptions<V> extends BaseOptions {
56
+ source: (string | SelectChoice<V>)[];
57
+ target?: (string | SelectChoice<V>)[];
58
+ }
59
+ export interface CronOptions extends BaseOptions {
60
+ initial?: string;
61
+ placeholder?: string;
62
+ }
63
+ export interface CheckboxChoice<V> extends SelectChoice<V> {
64
+ selected?: boolean;
65
+ }
66
+ export interface CheckboxOptions<V> extends BaseOptions {
67
+ choices: CheckboxChoice<V>[];
68
+ min?: number;
69
+ max?: number;
70
+ }
71
+ export interface ConfirmOptions extends BaseOptions {
72
+ initial?: boolean;
73
+ }
74
+ export interface NumberOptions extends BaseOptions {
75
+ initial?: number;
76
+ min?: number;
77
+ max?: number;
78
+ step?: number;
79
+ placeholder?: string;
80
+ }
81
+ export interface ToggleOptions extends BaseOptions {
82
+ initial?: boolean;
83
+ activeText?: string;
84
+ inactiveText?: string;
85
+ }
86
+ export interface ListOptions extends BaseOptions {
87
+ placeholder?: string;
88
+ initial?: string[];
89
+ validate?: (value: string[]) => string | boolean | Promise<string | boolean>;
90
+ }
91
+ export interface SliderOptions extends BaseOptions {
92
+ min: number;
93
+ max: number;
94
+ initial?: number;
95
+ step?: number;
96
+ unit?: string;
97
+ }
98
+ export interface RangeOptions extends BaseOptions {
99
+ min: number;
100
+ max: number;
101
+ initial?: [number, number];
102
+ step?: number;
103
+ unit?: string;
104
+ }
105
+ export interface SelectRangeOptions<V> extends Omit<SelectOptions<V>, 'initial'> {
106
+ initial?: [number, number];
107
+ }
108
+ export interface RatingOptions extends BaseOptions {
109
+ min?: number;
110
+ max?: number;
111
+ initial?: number;
112
+ }
113
+ export interface DateOptions extends BaseOptions {
114
+ initial?: Date;
115
+ min?: Date;
116
+ max?: Date;
117
+ }
118
+ export interface FileOptions extends BaseOptions {
119
+ basePath?: string;
120
+ extensions?: string[];
121
+ onlyDirectories?: boolean;
122
+ }
123
+ export interface MultiSelectOptions<V> extends CheckboxOptions<V> {
124
+ }
125
+ export interface AutocompleteOptions<V> extends BaseOptions {
126
+ suggest: (input: string) => Promise<SelectChoice<V>[]>;
127
+ limit?: number;
128
+ fallback?: string;
129
+ initial?: string;
130
+ }
131
+ export interface SortOptions extends BaseOptions {
132
+ items: string[];
133
+ }
134
+ export interface EditorOptions extends BaseOptions {
135
+ initial?: string;
136
+ extension?: string;
137
+ waitUserInput?: boolean;
138
+ }
139
+ export interface TableRow<V> {
140
+ value: V;
141
+ row: string[];
142
+ }
143
+ export interface TableOptions<V> extends BaseOptions {
144
+ columns: string[];
145
+ data: TableRow<V>[];
146
+ rows?: number;
147
+ }
148
+ export interface TreeNode<V> {
149
+ title: string;
150
+ value: V;
151
+ children?: TreeNode<V>[];
152
+ expanded?: boolean;
153
+ disabled?: boolean;
154
+ selected?: boolean | 'indeterminate';
155
+ }
156
+ export interface TreeOptions<V> extends BaseOptions {
157
+ data: TreeNode<V>[];
158
+ initial?: V;
159
+ indent?: number;
160
+ }
161
+ export interface KeypressOptions extends BaseOptions {
162
+ keys?: string[];
163
+ showInvisible?: boolean;
164
+ }
165
+ export interface FormField {
166
+ name: string;
167
+ message: string;
168
+ initial?: string;
169
+ validate?: (value: string) => string | boolean | Promise<string | boolean>;
170
+ }
171
+ export interface FormOptions extends BaseOptions {
172
+ fields: FormField[];
173
+ }
174
+ export interface SnippetOptions extends BaseOptions {
175
+ template: string;
176
+ values?: Record<string, string>;
177
+ fields?: Record<string, {
178
+ message?: string;
179
+ validate?: (value: string) => string | boolean;
180
+ }>;
181
+ }
182
+ export interface SpamOptions extends BaseOptions {
183
+ threshold: number;
184
+ spamKey?: string;
185
+ decay?: boolean;
186
+ }
187
+ export interface WaitOptions extends BaseOptions {
188
+ seconds: number;
189
+ autoSubmit?: boolean;
190
+ }
191
+ export interface CodeOptions extends BaseOptions {
192
+ template: string;
193
+ language?: 'json' | 'env' | 'toml' | 'csv' | 'sh' | 'bash' | 'zsh' | 'properties' | 'props' | 'conf';
194
+ /**
195
+ * Enable syntax highlighting (Experimental).
196
+ * @default true
197
+ */
198
+ highlight?: boolean;
199
+ /**
200
+ * Initial values for variables in the template.
201
+ */
202
+ values?: Record<string, string>;
203
+ }
204
+ export interface TreeSelectNode<V> {
205
+ title: string;
206
+ value: V;
207
+ children?: TreeSelectNode<V>[];
208
+ expanded?: boolean;
209
+ disabled?: boolean;
210
+ selected?: boolean | 'indeterminate';
211
+ }
212
+ export interface TreeSelectOptions<V> extends BaseOptions {
213
+ data: TreeSelectNode<V>[];
214
+ initial?: V[];
215
+ indent?: number;
216
+ }
217
+ export interface ColorOptions extends BaseOptions {
218
+ initial?: string;
219
+ format?: 'hex' | 'rgb' | 'hsl';
220
+ }
221
+ export interface GridOptions extends BaseOptions {
222
+ rows: string[];
223
+ columns: string[];
224
+ initial?: boolean[][];
225
+ }
226
+ export interface SortGridOptions extends BaseOptions {
227
+ data: string[][];
228
+ }
229
+ export interface CalendarOptions extends BaseOptions {
230
+ mode?: 'single' | 'range';
231
+ multiple?: boolean;
232
+ initial?: Date | [Date, Date];
233
+ min?: Date;
234
+ max?: Date;
235
+ weekStart?: 0 | 1;
236
+ }
237
+ export interface MapOptions extends BaseOptions {
238
+ initial?: Record<string, string>;
239
+ suggestions?: string[];
240
+ }
241
+ export interface SemVerOptions extends BaseOptions {
242
+ currentVersion: string;
243
+ }
244
+ export interface IPOptions extends BaseOptions {
245
+ initial?: string;
246
+ }
247
+ export interface OTPOptions extends BaseOptions {
248
+ length?: number;
249
+ mask?: string;
250
+ secure?: boolean;
251
+ placeholder?: string;
252
+ }
253
+ export interface QuizSelectOptions<V> extends SelectOptions<V> {
254
+ correctValue: V;
255
+ explanation?: string;
256
+ }
257
+ export interface QuizTextOptions extends TextOptions {
258
+ verify?: (value: string) => boolean | Promise<boolean>;
259
+ correctAnswer: string;
260
+ explanation?: string;
261
+ }
262
+ export interface KanbanItem {
263
+ id: string;
264
+ title: string;
265
+ [key: string]: any;
266
+ }
267
+ export interface KanbanColumn<V extends KanbanItem> {
268
+ id: string;
269
+ title: string;
270
+ items: V[];
271
+ }
272
+ export interface KanbanOptions<V extends KanbanItem> extends BaseOptions {
273
+ columns: KanbanColumn<V>[];
274
+ }
275
+ export interface TimeOptions extends BaseOptions {
276
+ format?: '12h' | '24h';
277
+ step?: number;
278
+ initial?: Date | string;
279
+ }
280
+ export interface HeatmapLegend {
281
+ value: number;
282
+ char: string;
283
+ color: (str: string) => string;
284
+ }
285
+ export interface HeatmapOptions extends BaseOptions {
286
+ rows: string[];
287
+ columns: string[];
288
+ legend: HeatmapLegend[];
289
+ initial?: number[][];
290
+ }
291
+ export interface ByteOptions extends BaseOptions {
292
+ initial?: number;
293
+ min?: number;
294
+ max?: number;
295
+ }
296
+ export interface SlotOptions extends BaseOptions {
297
+ choices: string[];
298
+ rows?: number;
299
+ initial?: number;
300
+ }
301
+ export interface GaugeOptions extends BaseOptions {
302
+ theme?: Partial<ThemeConfig>;
303
+ width?: number;
304
+ /** Safe zone width as a percentage (0-1) or absolute character count (>1). Default: 0.2 (20%) */
305
+ safeZone?: number;
306
+ }
307
+ export interface CalculatorOptions extends BaseOptions {
308
+ initial?: string;
309
+ variables?: Record<string, number>;
310
+ precision?: number;
311
+ placeholder?: string;
312
+ }
313
+ export interface EmojiItem {
314
+ char: string;
315
+ name: string;
316
+ description?: string;
317
+ }
318
+ export interface EmojiOptions extends BaseOptions {
319
+ emojis: EmojiItem[];
320
+ recent?: string[];
321
+ cols?: number;
322
+ }
323
+ export interface MatchItem {
324
+ id: string;
325
+ label: string;
326
+ value?: any;
327
+ }
328
+ export interface MatchOptions extends BaseOptions {
329
+ source: (string | MatchItem)[];
330
+ target: (string | MatchItem)[];
331
+ constraints?: {
332
+ required?: boolean;
333
+ oneToMany?: boolean;
334
+ };
335
+ }
336
+ export interface DiffOptions extends BaseOptions {
337
+ original: string;
338
+ modified: string;
339
+ context?: number;
340
+ mode?: 'inline' | 'split';
341
+ }
342
+ export interface DialOptions extends BaseOptions {
343
+ min: number;
344
+ max: number;
345
+ step?: number;
346
+ radius?: number;
347
+ pointerSymbol?: string;
348
+ initial?: number;
349
+ }
350
+ export interface DrawOptions extends BaseOptions {
351
+ width: number;
352
+ height: number;
353
+ exportType?: 'matrix' | 'text';
354
+ initial?: boolean[][];
355
+ }
356
+ export interface MultiColumnSelectOptions<V> extends SelectOptions<V> {
357
+ cols?: number | 'auto';
358
+ }
359
+ export interface FuzzySelectOptions<V> extends SelectOptions<V> {
360
+ }
361
+ export interface MillerOptions<V> extends BaseOptions {
362
+ data: TreeNode<V>[];
363
+ initial?: V[];
364
+ separator?: string;
365
+ }
366
+ export interface PatternOptions extends BaseOptions {
367
+ rows?: number;
368
+ cols?: number;
369
+ nodeChar?: string;
370
+ lineChar?: string;
371
+ }
372
+ export interface MapRegion {
373
+ id: string;
374
+ label: string;
375
+ x: number;
376
+ y: number;
377
+ description?: string;
378
+ }
379
+ export interface RegionOptions extends BaseOptions {
380
+ mapArt: string;
381
+ regions: MapRegion[];
382
+ initial?: string;
383
+ }
384
+ export interface SpreadsheetColumn {
385
+ name: string;
386
+ key: string;
387
+ width?: number;
388
+ editable?: boolean;
389
+ }
390
+ export interface SpreadsheetOptions extends BaseOptions {
391
+ columns: SpreadsheetColumn[];
392
+ data: Record<string, any>[];
393
+ rows?: number;
394
+ keyBindings?: {
395
+ save?: string[];
396
+ cancel?: string[];
397
+ };
398
+ }
399
+ export interface ScrollOptions extends BaseOptions {
400
+ content: string;
401
+ height?: number;
402
+ requireScrollToBottom?: boolean;
403
+ }
404
+ export interface BreadcrumbOptions extends BaseOptions {
405
+ root?: string;
406
+ separator?: string;
407
+ showHidden?: boolean;
408
+ }
409
+ export interface ScheduleTask {
410
+ name: string;
411
+ start: Date;
412
+ end: Date;
413
+ metadata?: any;
414
+ }
415
+ export interface ScheduleOptions extends BaseOptions {
416
+ data: ScheduleTask[];
417
+ }
418
+ export interface DataInspectorOptions extends BaseOptions {
419
+ data: any;
420
+ maxDepth?: number;
421
+ }
422
+ export interface ExecOptions extends BaseOptions {
423
+ command: string;
424
+ timeout?: number;
425
+ cwd?: string;
426
+ streamOutput?: boolean;
427
+ }
428
+ export interface ShortcutResult {
429
+ name: string;
430
+ ctrl: boolean;
431
+ shift: boolean;
432
+ meta: boolean;
433
+ sequence: string;
434
+ }
435
+ export interface ShortcutOptions extends BaseOptions {
436
+ initial?: ShortcutResult;
437
+ }
438
+ export interface SeatOptions extends BaseOptions {
439
+ layout: string[];
440
+ rows?: string[];
441
+ cols?: string[];
442
+ initial?: string[];
443
+ multiple?: boolean;
444
+ }
445
+ export interface DependencyItem<V> extends CheckboxChoice<V> {
446
+ dependsOn?: V[];
447
+ triggers?: V[];
448
+ conflictsWith?: V[];
449
+ }
450
+ export interface DependencyOptions<V> extends BaseOptions {
451
+ choices: DependencyItem<V>[];
452
+ min?: number;
453
+ max?: number;
454
+ autoResolve?: boolean;
455
+ }
456
+ export interface License {
457
+ id: string;
458
+ name: string;
459
+ description: string;
460
+ permissions: string[];
461
+ conditions: string[];
462
+ limitations: string[];
463
+ }
464
+ export interface LicenseOptions extends BaseOptions {
465
+ defaultLicense?: string;
466
+ }
467
+ export interface RegexOptions extends BaseOptions {
468
+ tests: string[];
469
+ flags?: string;
470
+ }
471
+ export interface BoxOptions extends BaseOptions {
472
+ initial?: number | {
473
+ top: number;
474
+ right: number;
475
+ bottom: number;
476
+ left: number;
477
+ };
478
+ min?: number;
479
+ max?: number;
480
+ step?: number;
481
+ }
482
+ export interface PhoneOptions extends BaseOptions {
483
+ defaultCountry?: string;
484
+ placeholder?: string;
485
+ strict?: boolean;
486
+ validate?: (value: string) => string | boolean | Promise<string | boolean>;
487
+ }
488
+ export type TaskStatus = 'pending' | 'loading' | 'success' | 'error' | 'warning';
489
+ export interface TaskConfig {
490
+ id: string;
491
+ title: string;
492
+ type?: 'spinner' | 'progress';
493
+ total?: number;
494
+ }
495
+ export interface TaskState extends TaskConfig {
496
+ status: TaskStatus;
497
+ current: number;
498
+ message?: string;
499
+ }
500
+ export interface TaskGroupOptions {
501
+ concurrency?: number;
502
+ renderer?: 'default' | 'minimal';
503
+ }
package/dist/types.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:true});
@@ -0,0 +1,81 @@
1
+ /**
2
+ * Detects terminal capabilities.
3
+ */
4
+ export declare function detectCapabilities(): {
5
+ isCI: boolean;
6
+ hasTrueColor: boolean;
7
+ hasUnicode: boolean | "";
8
+ hasMouse: boolean;
9
+ };
10
+ /**
11
+ * Strips ANSI escape codes from a string.
12
+ */
13
+ export declare function stripAnsi(str: string): string;
14
+ /**
15
+ * Calculates the visual width of a string.
16
+ * Uses binary search for wide characters.
17
+ * Handles ANSI codes (zero width).
18
+ */
19
+ export declare function stringWidth(str: string): number;
20
+ /**
21
+ * Safely splits a string into an array of grapheme clusters.
22
+ * Uses Intl.Segmenter (Node 16+).
23
+ */
24
+ export declare function safeSplit(str: string): string[];
25
+ /**
26
+ * Fuzzy match algorithm (Subsequence matching).
27
+ * Returns score and matched indices, or null if no match.
28
+ */
29
+ export declare function fuzzyMatch(query: string, target: string): {
30
+ score: number;
31
+ indices: number[];
32
+ } | null;
33
+ /**
34
+ * Layout utilities for advanced rendering (Split View, etc.)
35
+ */
36
+ export declare const Layout: {
37
+ /**
38
+ * Truncates a string to a specific visual width, respecting ANSI codes.
39
+ */
40
+ truncate(str: string, width: number): string;
41
+ /**
42
+ * Pads a string to a specific visual length.
43
+ * Respects ANSI codes (does not count them towards length).
44
+ */
45
+ pad(text: string, length: number, align?: "left" | "right" | "center"): string;
46
+ /**
47
+ * Splits two multi-line strings side-by-side.
48
+ * @param left Content for left column
49
+ * @param right Content for right column
50
+ * @param width Total available width
51
+ * @param options Configuration for ratio and gap
52
+ */
53
+ split(left: string, right: string, width: number, options?: {
54
+ ratio?: number;
55
+ gap?: number;
56
+ }): string;
57
+ /**
58
+ * Wraps a string to a specific visual width.
59
+ * Respects word boundaries where possible.
60
+ */
61
+ wrap(str: string, width: number): string;
62
+ };
63
+ /**
64
+ * Graph utilities for dependency management
65
+ */
66
+ export declare const Graph: {
67
+ /**
68
+ * Returns all dependencies (transitive) for an item.
69
+ */
70
+ getDependencies<T>(item: T, getDeps: (i: T) => T[]): T[];
71
+ /**
72
+ * Topologically sorts items based on dependencies.
73
+ * Returns items in order (dependencies first).
74
+ * Throws error if cycle detected.
75
+ */
76
+ topologicalSort<T>(items: T[], getDeps: (i: T) => T[]): T[];
77
+ };
78
+ /**
79
+ * Generates a progress bar string.
80
+ */
81
+ export declare function generateProgressBar(current: number, total: number, width?: number): string;
package/dist/utils.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:true});function _export(target,all){for(var name in all)Object.defineProperty(target,name,{enumerable:true,get:Object.getOwnPropertyDescriptor(all,name).get})}_export(exports,{get Graph(){return Graph},get Layout(){return Layout},get detectCapabilities(){return detectCapabilities},get fuzzyMatch(){return fuzzyMatch},get generateProgressBar(){return generateProgressBar},get safeSplit(){return safeSplit},get stringWidth(){return stringWidth},get stripAnsi(){return stripAnsi}});function detectCapabilities(){const env=process.env;const isCI=!!env.CI;const hasTrueColor=env.COLORTERM==="truecolor"||!!env.WT_SESSION;const isTTY=process.stdout.isTTY;const isWindows=process.platform==="win32";const isUnicodeSupported=()=>{if(isWindows){if(env.WT_SESSION)return true;if(env.TERM_PROGRAM==="vscode")return true;if(env.TERM==="xterm-256color"||env.TERM==="alacritty")return true;if(env.ConEmuTask)return true;if(isCI)return true;return false}if(env.TERM_PROGRAM==="Apple_Terminal")return true;const lang=env.LANG||"";const lcAll=env.LC_ALL||"";return lang&&lang.toUpperCase().endsWith("UTF-8")||lcAll&&lcAll.toUpperCase().endsWith("UTF-8")};return{isCI,hasTrueColor,hasUnicode:isTTY&&isUnicodeSupported(),hasMouse:isTTY&&!isCI}}function stripAnsi(str){return str.replace(/\x1b\[[0-9;]*m/g,"")}const WIDE_RANGES=[[4352,4607],[11904,12031],[12032,12255],[12288,12351],[12352,12447],[12448,12543],[12544,12591],[12592,12687],[12800,13055],[13056,13311],[13312,19903],[19968,40959],[43360,43391],[44032,55215],[55216,55295],[63744,64255],[65040,65055],[65072,65103],[65104,65135],[65281,65376],[65504,65510],[127744,128767],[129280,129535]];function isWideCodePoint(cp){let low=0;let high=WIDE_RANGES.length-1;while(low<=high){const mid=Math.floor((low+high)/2);const[start,end]=WIDE_RANGES[mid];if(cp>=start&&cp<=end){return true}else if(cp<start){high=mid-1}else{low=mid+1}}return false}function stringWidth(str){let width=0;let inAnsi=false;for(let i=0;i<str.length;i++){const code=str.charCodeAt(i);if(str[i]==="\x1b"){inAnsi=true;continue}if(inAnsi){if(str[i]==="["){continue}if(str[i]>="@"&&str[i]<="~"){inAnsi=false}continue}let cp=code;if(code>=55296&&code<=56319&&i+1<str.length){const next=str.charCodeAt(i+1);if(next>=56320&&next<=57343){cp=(code-55296)*1024+(next-56320)+65536;i++}}width+=isWideCodePoint(cp)?2:1}return width}function safeSplit(str){const segmenter=new Intl.Segmenter(undefined,{granularity:"grapheme"});const segments=segmenter.segment(str);const result=[];for(const segment of segments){result.push(segment.segment)}return result}function fuzzyMatch(query,target){if(!query)return{score:0,indices:[]};const queryLower=query.toLowerCase();const targetLower=target.toLowerCase();let queryIdx=0;let targetIdx=0;const indices=[];let score=0;let consecutive=0;let lastMatchIdx=-1;while(queryIdx<queryLower.length&&targetIdx<targetLower.length){const qChar=queryLower[queryIdx];const tChar=targetLower[targetIdx];if(qChar===tChar){indices.push(targetIdx);let charScore=1;if(lastMatchIdx!==-1&&targetIdx===lastMatchIdx+1){consecutive++;charScore+=consecutive*2}else{consecutive=0}if(targetIdx===0){charScore+=5}else if(targetIdx>0){const prevChar=target.charAt(targetIdx-1);if(/[\s_\-.]/.test(prevChar)||prevChar==="/"){charScore+=4}else if(prevChar!==prevChar.toUpperCase()&&target.charAt(targetIdx)===target.charAt(targetIdx).toUpperCase()){charScore+=3}}score+=charScore;lastMatchIdx=targetIdx;queryIdx++}targetIdx++}if(queryIdx<queryLower.length){return null}score-=target.length*.1;if(indices.length>1){const spread=indices[indices.length-1]-indices[0];score-=spread*.5}return{score,indices}}const Layout={truncate(str,width){const visualWidth=stringWidth(str);if(visualWidth<=width){return str}let currentWidth=0;let cutIndex=0;let inAnsi=false;for(let i=0;i<str.length;i++){if(str[i]==="\x1b")inAnsi=true;if(!inAnsi){const code=str.charCodeAt(i);if(code>=55296&&code<=56319&&i+1<str.length){const next=str.charCodeAt(i+1);if(next>=56320&&next<=57343){const cp=(code-55296)*1024+(next-56320)+65536;const w=isWideCodePoint(cp)?2:1;if(currentWidth+w>width)break;currentWidth+=w;cutIndex=i+2;i++;continue}}const w=isWideCodePoint(code)?2:1;if(currentWidth+w>width)break;currentWidth+=w}else{if(str[i]==="m"||str[i]>="A"&&str[i]<="Z")inAnsi=false}cutIndex=i+1}return str.substring(0,cutIndex)+"\x1b[0m"},pad(text,length,align="left"){const visualLen=stringWidth(text);if(visualLen>=length)return text;const padLen=Math.max(0,length-visualLen);if(align==="left"){return text+" ".repeat(padLen)}else if(align==="right"){return" ".repeat(padLen)+text}else{const leftPad=Math.floor(padLen/2);const rightPad=padLen-leftPad;return" ".repeat(leftPad)+text+" ".repeat(rightPad)}},split(left,right,width,options={}){const ratio=options.ratio??.5;const gap=options.gap??2;let leftWidth=Math.floor((width-gap)*ratio);let rightWidth=width-leftWidth-gap;if(leftWidth<1||rightWidth<1){leftWidth=Math.max(0,width);rightWidth=0}const leftLines=left.split("\n");const rightLines=right.split("\n");const maxLines=Math.max(leftLines.length,rightLines.length);const result=[];for(let i=0;i<maxLines;i++){const leftLine=leftLines[i]||"";const rightLine=rightLines[i]||"";const l=Layout.pad(Layout.truncate(leftLine,leftWidth),leftWidth);const r=Layout.pad(Layout.truncate(rightLine,rightWidth),rightWidth);result.push(`${l}${" ".repeat(gap)}${r}`)}return result.join("\n")},wrap(str,width){const paragraphs=str.split("\n");return paragraphs.map(para=>{const words=para.split(" ");let currentLine="";const lines=[];for(const word of words){const wordWidth=stringWidth(word);const currentWidth=stringWidth(currentLine);const spaceWidth=currentLine?1:0;if(currentWidth+spaceWidth+wordWidth<=width){currentLine+=(currentLine?" ":"")+word}else{if(currentLine)lines.push(currentLine);currentLine=word}}if(currentLine)lines.push(currentLine);return lines.join("\n")}).join("\n")}};const Graph={getDependencies(item,getDeps){const visited=new Set;const result=[];const visit=current=>{if(visited.has(current))return;visited.add(current);const deps=getDeps(current);for(const dep of deps){visit(dep)}if(current!==item){result.push(current)}};visit(item);return result},topologicalSort(items,getDeps){const visited=new Set;const temp=new Set;const order=[];const visit=node=>{if(temp.has(node)){throw new Error("Cyclic dependency detected")}if(visited.has(node))return;temp.add(node);const deps=getDeps(node);for(const dep of deps){visit(dep)}temp.delete(node);visited.add(node);order.push(node)};for(const item of items){if(!visited.has(item)){visit(item)}}return order}};function generateProgressBar(current,total,width=20){const percentage=Math.min(Math.max(current/total,0),1);const barWidth=width;const filledWidth=Math.round(barWidth*percentage);const emptyWidth=barWidth-filledWidth;const filled="█".repeat(filledWidth);const empty="-".repeat(emptyWidth);const percentStr=Math.round(percentage*100)+"%";return`[${filled}${empty}] ${percentStr}`}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mepcli",
3
- "version": "2.0.0-beta.1",
4
- "description": "Zero-dependency, interactive CLI prompt",
3
+ "version": "2.0.0-beta.3",
4
+ "description": "Zero-dependency interactive CLI prompt",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/CodeTease/mep.git"
@@ -15,12 +15,14 @@
15
15
  ],
16
16
  "scripts": {
17
17
  "typecheck": "tsc --noEmit",
18
- "build": "swc src -d dist --config-file .swcrc",
19
- "prepublishOnly": "npm run build",
20
- "test": "jest",
21
- "demo": "ts-node example.ts",
22
- "lint": "eslint .",
23
- "lint:fix": "eslint . --fix"
18
+ "compile": "swc src -d dist --strip-leading-paths --config-file .swcrc",
19
+ "types": "tsc --emitDeclarationOnly --outDir dist",
20
+ "build": "bun run compile && bun run types",
21
+ "prepublishOnly": "bun run build",
22
+ "test": "bun test",
23
+ "demo": "bun example.ts",
24
+ "lint": "biome check ./src",
25
+ "lint:fix": "biome check --write ./src"
24
26
  },
25
27
  "keywords": [
26
28
  "cli",
@@ -45,17 +47,10 @@
45
47
  "author": "CodeTease",
46
48
  "license": "MIT",
47
49
  "devDependencies": {
48
- "@eslint/js": "^9.39.3",
50
+ "@biomejs/biome": "^1.9.4",
49
51
  "@swc/cli": "^0.8.0",
50
52
  "@swc/core": "^1.15.18",
51
- "@types/jest": "^30.0.0",
52
53
  "@types/node": "^22.19.13",
53
- "eslint": "^9.39.3",
54
- "globals": "^17.4.0",
55
- "jest": "^30.2.0",
56
- "ts-jest": "^29.4.6",
57
- "ts-node": "^10.9.2",
58
- "typescript": "^5.9.3",
59
- "typescript-eslint": "^8.56.1"
54
+ "typescript": "^5.9.3"
60
55
  }
61
56
  }
package/dist/src/ansi.js DELETED
@@ -1,50 +0,0 @@
1
- /**
2
- * ANSI Escape Codes
3
- * Manual definitions to maintain zero-dependency status.
4
- */ "use strict";
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- Object.defineProperty(exports, "ANSI", {
9
- enumerable: true,
10
- get: function() {
11
- return ANSI;
12
- }
13
- });
14
- const ANSI = {
15
- RESET: '\x1b[0m',
16
- BOLD: '\x1b[1m',
17
- DIM: '\x1b[2m',
18
- ITALIC: '\x1b[3m',
19
- UNDERLINE: '\x1b[4m',
20
- REVERSE: '\x1b[7m',
21
- // Colors
22
- FG_GREEN: '\x1b[32m',
23
- FG_CYAN: '\x1b[36m',
24
- FG_YELLOW: '\x1b[33m',
25
- FG_RED: '\x1b[31m',
26
- FG_GRAY: '\x1b[90m',
27
- FG_WHITE: '\x1b[37m',
28
- FG_BLUE: '\x1b[34m',
29
- FG_MAGENTA: '\x1b[35m',
30
- FG_BLACK: '\x1b[30m',
31
- BG_YELLOW: '\x1b[43m',
32
- BG_BLUE: '\x1b[44m',
33
- BG_CYAN: '\x1b[46m',
34
- BG_GREEN: '\x1b[42m',
35
- BG_RED: '\x1b[41m',
36
- // Cursor & Erasing
37
- ERASE_LINE: '\x1b[2K',
38
- ERASE_DOWN: '\x1b[J',
39
- CURSOR_LEFT: '\x1b[1000D',
40
- HIDE_CURSOR: '\x1b[?25l',
41
- SHOW_CURSOR: '\x1b[?25h',
42
- UP: '\x1b[A',
43
- DOWN: '\x1b[B',
44
- // Mouse Tracking (SGR Protocol)
45
- SET_ANY_EVENT_MOUSE: '\x1b[?1003h',
46
- SET_SGR_EXT_MODE_MOUSE: '\x1b[?1006h',
47
- DISABLE_MOUSE: '\x1b[?1003l\x1b[?1006l'
48
- };
49
-
50
- //# sourceMappingURL=ansi.js.map