@visulima/tui 1.0.0-alpha.8 → 1.0.0

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 (549) hide show
  1. package/CHANGELOG.md +654 -0
  2. package/LICENSE.md +2414 -187
  3. package/README.md +49 -4
  4. package/dist/components/accordion.d.ts +59 -0
  5. package/dist/components/accordion.js +1 -0
  6. package/dist/components/alert.d.ts +26 -0
  7. package/dist/components/alert.js +1 -0
  8. package/dist/components/animate-presence.d.ts +18 -0
  9. package/dist/components/animate-presence.js +1 -0
  10. package/dist/components/approval-prompt.d.ts +65 -0
  11. package/dist/components/approval-prompt.js +1 -0
  12. package/dist/components/area-chart.d.ts +66 -0
  13. package/dist/components/area-chart.js +1 -0
  14. package/dist/components/badge.d.ts +22 -0
  15. package/dist/components/badge.js +1 -0
  16. package/dist/components/bar-chart.d.ts +67 -0
  17. package/dist/components/bar-chart.js +1 -0
  18. package/dist/components/big-text.d.ts +81 -0
  19. package/dist/components/big-text.js +1 -0
  20. package/dist/components/blink-dot.d.ts +36 -0
  21. package/dist/components/blink-dot.js +1 -0
  22. package/dist/components/box.d.ts +62 -0
  23. package/dist/components/box.js +1 -0
  24. package/dist/components/breadcrumb.d.ts +33 -0
  25. package/dist/components/breadcrumb.js +1 -0
  26. package/dist/components/button.d.ts +45 -0
  27. package/dist/components/button.js +1 -0
  28. package/dist/components/calendar.d.ts +72 -0
  29. package/dist/components/calendar.js +1 -0
  30. package/dist/components/canvas.d.ts +44 -0
  31. package/dist/components/canvas.js +1 -0
  32. package/dist/components/card.d.ts +57 -0
  33. package/dist/components/card.js +1 -0
  34. package/dist/components/checkbox.d.ts +48 -0
  35. package/dist/components/checkbox.js +1 -0
  36. package/dist/components/code.d.ts +48 -0
  37. package/dist/components/code.js +2 -0
  38. package/dist/components/collapsible.d.ts +53 -0
  39. package/dist/components/collapsible.js +1 -0
  40. package/dist/components/command-block.d.ts +47 -0
  41. package/dist/components/command-block.js +4 -0
  42. package/dist/components/command-palette.d.ts +82 -0
  43. package/dist/components/command-palette.js +1 -0
  44. package/dist/components/confirm-dialog.d.ts +75 -0
  45. package/dist/components/confirm-dialog.js +1 -0
  46. package/dist/components/confirm-input.d.ts +38 -0
  47. package/dist/components/confirm-input.js +1 -0
  48. package/dist/components/console-overlay.d.ts +54 -0
  49. package/dist/components/console-overlay.js +1 -0
  50. package/dist/components/content-switcher.d.ts +57 -0
  51. package/dist/components/content-switcher.js +1 -0
  52. package/dist/components/controlled-scroll-view.d.ts +61 -0
  53. package/dist/components/controlled-scroll-view.js +1 -0
  54. package/dist/components/cursor.d.ts +62 -0
  55. package/dist/components/cursor.js +1 -0
  56. package/dist/components/date-picker.d.ts +65 -0
  57. package/dist/components/date-picker.js +1 -0
  58. package/dist/components/definition-list.d.ts +44 -0
  59. package/dist/components/definition-list.js +1 -0
  60. package/dist/components/dialog.d.ts +117 -0
  61. package/dist/components/dialog.js +1 -0
  62. package/dist/components/diff-view.d.ts +85 -0
  63. package/dist/components/diff-view.js +1 -0
  64. package/dist/components/divider.d.ts +49 -0
  65. package/dist/components/divider.js +1 -0
  66. package/dist/components/file-picker-entry.d.ts +104 -0
  67. package/dist/components/file-picker-entry.js +1 -0
  68. package/dist/components/form.d.ts +81 -0
  69. package/dist/components/form.js +1 -0
  70. package/dist/components/gauge.d.ts +87 -0
  71. package/dist/components/gauge.js +1 -0
  72. package/dist/components/gradient.d.ts +42 -0
  73. package/dist/components/gradient.js +1 -0
  74. package/dist/components/heading.d.ts +33 -0
  75. package/dist/components/heading.js +1 -0
  76. package/dist/components/heatmap.d.ts +62 -0
  77. package/dist/components/heatmap.js +1 -0
  78. package/dist/components/help.d.ts +52 -0
  79. package/dist/components/help.js +1 -0
  80. package/dist/components/histogram.d.ts +62 -0
  81. package/dist/components/histogram.js +1 -0
  82. package/dist/components/kbd.d.ts +31 -0
  83. package/dist/components/kbd.js +1 -0
  84. package/dist/components/line-chart.d.ts +109 -0
  85. package/dist/components/line-chart.js +1 -0
  86. package/dist/components/link.d.ts +38 -0
  87. package/dist/components/link.js +1 -0
  88. package/dist/components/loading-indicator.d.ts +29 -0
  89. package/dist/components/loading-indicator.js +1 -0
  90. package/dist/components/markdown.d.ts +40 -0
  91. package/dist/components/markdown.js +1 -0
  92. package/dist/components/masked-input.d.ts +50 -0
  93. package/dist/components/masked-input.js +1 -0
  94. package/dist/components/menu.d.ts +78 -0
  95. package/dist/components/menu.js +1 -0
  96. package/dist/components/message-bubble.d.ts +43 -0
  97. package/dist/components/message-bubble.js +1 -0
  98. package/dist/components/model-badge.d.ts +39 -0
  99. package/dist/components/model-badge.js +1 -0
  100. package/dist/components/multi-select.d.ts +65 -0
  101. package/dist/components/multi-select.js +1 -0
  102. package/dist/components/newline.d.ts +15 -0
  103. package/dist/components/newline.js +2 -0
  104. package/dist/components/operation-tree.d.ts +49 -0
  105. package/dist/components/operation-tree.js +1 -0
  106. package/dist/components/option-list.d.ts +47 -0
  107. package/dist/components/option-list.js +1 -0
  108. package/dist/components/ordered-list.d.ts +24 -0
  109. package/dist/components/ordered-list.js +1 -0
  110. package/dist/components/paginator.d.ts +69 -0
  111. package/dist/components/paginator.js +1 -0
  112. package/dist/components/paragraph.d.ts +38 -0
  113. package/dist/components/paragraph.js +1 -0
  114. package/dist/components/placeholder.d.ts +55 -0
  115. package/dist/components/placeholder.js +1 -0
  116. package/dist/components/progress-bar.d.ts +56 -0
  117. package/dist/components/progress-bar.js +1 -0
  118. package/dist/components/radio-group.d.ts +74 -0
  119. package/dist/components/radio-group.js +1 -0
  120. package/dist/components/scatter-plot.d.ts +35 -0
  121. package/dist/components/scatter-plot.js +1 -0
  122. package/dist/components/scroll-bar-box.d.ts +37 -0
  123. package/dist/components/scroll-bar-box.js +1 -0
  124. package/dist/components/scroll-bar.d.ts +25 -0
  125. package/dist/components/scroll-bar.js +1 -0
  126. package/dist/components/scroll-list.d.ts +20 -0
  127. package/dist/components/scroll-list.js +1 -0
  128. package/dist/components/scroll-view.d.ts +10 -0
  129. package/dist/components/scroll-view.js +1 -0
  130. package/dist/components/search-input.d.ts +55 -0
  131. package/dist/components/search-input.js +1 -0
  132. package/dist/components/select-input-indicator.d.ts +32 -0
  133. package/dist/components/select-input-indicator.js +1 -0
  134. package/dist/components/select-input-item.d.ts +41 -0
  135. package/dist/components/select-input-item.js +1 -0
  136. package/dist/components/select-input.d.ts +110 -0
  137. package/dist/components/select-input.js +1 -0
  138. package/dist/components/shimmer-text.d.ts +47 -0
  139. package/dist/components/shimmer-text.js +1 -0
  140. package/dist/components/slider.d.ts +103 -0
  141. package/dist/components/slider.js +1 -0
  142. package/dist/components/spacer.d.ts +8 -0
  143. package/dist/components/spacer.js +1 -0
  144. package/dist/components/sparkline.d.ts +35 -0
  145. package/dist/components/sparkline.js +1 -0
  146. package/dist/components/spinner.d.ts +17 -0
  147. package/dist/components/spinner.js +1 -0
  148. package/dist/components/static-render.d.ts +55 -0
  149. package/dist/components/static-render.js +1 -0
  150. package/dist/components/static.d.ts +29 -0
  151. package/dist/components/static.js +1 -0
  152. package/dist/components/status-line.d.ts +37 -0
  153. package/dist/components/status-line.js +1 -0
  154. package/dist/components/status-message.d.ts +21 -0
  155. package/dist/components/status-message.js +1 -0
  156. package/dist/components/stepper.d.ts +48 -0
  157. package/dist/components/stepper.js +1 -0
  158. package/dist/components/stopwatch.d.ts +49 -0
  159. package/dist/components/stopwatch.js +1 -0
  160. package/dist/components/streaming-text.d.ts +46 -0
  161. package/dist/components/streaming-text.js +1 -0
  162. package/dist/components/switch.d.ts +55 -0
  163. package/dist/components/switch.js +1 -0
  164. package/dist/components/tab.d.ts +19 -0
  165. package/dist/components/tab.js +1 -0
  166. package/dist/components/table.d.ts +119 -0
  167. package/dist/components/table.js +1 -0
  168. package/dist/components/tabs.d.ts +107 -0
  169. package/dist/components/tabs.js +1 -0
  170. package/dist/components/tag.d.ts +35 -0
  171. package/dist/components/tag.js +1 -0
  172. package/dist/components/text-input.d.ts +48 -0
  173. package/dist/components/text-input.js +1 -0
  174. package/dist/components/text.d.ts +79 -0
  175. package/dist/components/text.js +1 -0
  176. package/dist/components/textarea.d.ts +68 -0
  177. package/dist/components/textarea.js +2 -0
  178. package/dist/components/timer.d.ts +59 -0
  179. package/dist/components/timer.js +1 -0
  180. package/dist/components/toast.d.ts +49 -0
  181. package/dist/components/toast.js +1 -0
  182. package/dist/components/tooltip.d.ts +43 -0
  183. package/dist/components/tooltip.js +1 -0
  184. package/dist/components/transform.d.ts +21 -0
  185. package/dist/components/transform.js +1 -0
  186. package/dist/components/transition.d.ts +74 -0
  187. package/dist/components/transition.js +1 -0
  188. package/dist/components/tree-view-entry.d.ts +357 -0
  189. package/dist/components/tree-view-entry.js +1 -0
  190. package/dist/components/unordered-list.d.ts +30 -0
  191. package/dist/components/unordered-list.js +1 -0
  192. package/dist/core/index.d.ts +2 -2
  193. package/dist/core/index.js +1 -1
  194. package/dist/ink/hooks/use-animation.d.ts +41 -0
  195. package/dist/ink/hooks/use-animation.js +1 -0
  196. package/dist/ink/hooks/use-app.d.ts +38 -0
  197. package/dist/ink/hooks/use-app.js +1 -0
  198. package/dist/ink/hooks/use-box-metrics.d.ts +66 -0
  199. package/dist/ink/hooks/use-box-metrics.js +1 -0
  200. package/dist/ink/hooks/use-clipboard.d.ts +30 -0
  201. package/dist/ink/hooks/use-clipboard.js +1 -0
  202. package/dist/ink/hooks/use-color-blindness.d.ts +33 -0
  203. package/dist/ink/hooks/use-color-blindness.js +1 -0
  204. package/dist/ink/hooks/use-console-capture.d.ts +43 -0
  205. package/dist/ink/hooks/use-console-capture.js +1 -0
  206. package/dist/ink/hooks/use-cursor.d.ts +13 -0
  207. package/dist/ink/hooks/use-cursor.js +1 -0
  208. package/dist/ink/hooks/use-focus-manager.d.ts +57 -0
  209. package/dist/ink/hooks/use-focus-manager.js +1 -0
  210. package/dist/ink/hooks/use-focus.d.ts +34 -0
  211. package/dist/ink/hooks/use-focus.js +1 -0
  212. package/dist/ink/hooks/use-form.d.ts +68 -0
  213. package/dist/ink/hooks/use-form.js +1 -0
  214. package/dist/ink/hooks/use-hotkey.d.ts +37 -0
  215. package/dist/ink/hooks/use-hotkey.js +1 -0
  216. package/dist/ink/hooks/use-input.d.ts +149 -0
  217. package/dist/ink/hooks/use-input.js +2 -0
  218. package/dist/ink/hooks/use-interval.d.ts +25 -0
  219. package/dist/ink/hooks/use-interval.js +1 -0
  220. package/dist/ink/hooks/use-is-screen-reader-enabled.d.ts +6 -0
  221. package/dist/ink/hooks/use-is-screen-reader-enabled.js +1 -0
  222. package/dist/ink/hooks/use-key-bindings.d.ts +59 -0
  223. package/dist/ink/hooks/use-key-bindings.js +1 -0
  224. package/dist/ink/hooks/use-key-chord.d.ts +25 -0
  225. package/dist/ink/hooks/use-key-chord.js +1 -0
  226. package/dist/ink/hooks/use-linked-scroll.d.ts +49 -0
  227. package/dist/ink/hooks/use-linked-scroll.js +1 -0
  228. package/dist/ink/hooks/use-paste.d.ts +45 -0
  229. package/dist/ink/hooks/use-paste.js +1 -0
  230. package/dist/ink/hooks/use-persistent-state.d.ts +65 -0
  231. package/dist/ink/hooks/use-persistent-state.js +2 -0
  232. package/dist/ink/hooks/use-scroll-acceleration.d.ts +47 -0
  233. package/dist/ink/hooks/use-scroll-acceleration.js +1 -0
  234. package/dist/ink/hooks/use-scroll-input.d.ts +34 -0
  235. package/dist/ink/hooks/use-scroll-input.js +1 -0
  236. package/dist/ink/hooks/use-stderr.d.ts +16 -0
  237. package/dist/ink/hooks/use-stderr.js +1 -0
  238. package/dist/ink/hooks/use-stdin.d.ts +30 -0
  239. package/dist/ink/hooks/use-stdin.js +1 -0
  240. package/dist/ink/hooks/use-stdout.d.ts +16 -0
  241. package/dist/ink/hooks/use-stdout.js +1 -0
  242. package/dist/ink/hooks/use-stopwatch.d.ts +39 -0
  243. package/dist/ink/hooks/use-stopwatch.js +1 -0
  244. package/dist/ink/hooks/use-terminal-palette.d.ts +20 -0
  245. package/dist/ink/hooks/use-terminal-palette.js +1 -0
  246. package/dist/ink/hooks/use-text-buffer.d.ts +42 -0
  247. package/dist/ink/hooks/use-text-buffer.js +4 -0
  248. package/dist/ink/hooks/use-text-selection.d.ts +45 -0
  249. package/dist/ink/hooks/use-text-selection.js +1 -0
  250. package/dist/ink/hooks/use-timeout.d.ts +24 -0
  251. package/dist/ink/hooks/use-timeout.js +1 -0
  252. package/dist/ink/hooks/use-timer.d.ts +48 -0
  253. package/dist/ink/hooks/use-timer.js +1 -0
  254. package/dist/ink/hooks/use-window-size.d.ts +18 -0
  255. package/dist/ink/hooks/use-window-size.js +1 -0
  256. package/dist/ink/index.d.ts +30 -6251
  257. package/dist/ink/index.js +1 -1
  258. package/dist/ink/mouse/use-element-position.d.ts +31 -0
  259. package/dist/ink/mouse/use-element-position.js +1 -0
  260. package/dist/ink/mouse/use-mouse-action.d.ts +5 -0
  261. package/dist/ink/mouse/use-mouse-action.js +1 -0
  262. package/dist/ink/mouse/use-mouse-position.d.ts +5 -0
  263. package/dist/ink/mouse/use-mouse-position.js +1 -0
  264. package/dist/ink/mouse/use-mouse.d.ts +5 -0
  265. package/dist/ink/mouse/use-mouse.js +1 -0
  266. package/dist/ink/mouse/use-on-mouse-click.d.ts +16 -0
  267. package/dist/ink/mouse/use-on-mouse-click.js +1 -0
  268. package/dist/ink/mouse/use-on-mouse-hover.d.ts +10 -0
  269. package/dist/ink/mouse/use-on-mouse-hover.js +1 -0
  270. package/dist/ink/mouse/use-on-mouse-state.d.ts +13 -0
  271. package/dist/ink/mouse/use-on-mouse-state.js +1 -0
  272. package/dist/packem_chunks/devtools.js +1 -1
  273. package/dist/packem_shared/COLOR_BLINDNESS_COMPENSATION-Ilnoyeqc.js +1 -0
  274. package/dist/packem_shared/ControlledScrollView-Cn4byU2n.js +1 -0
  275. package/dist/packem_shared/DevTools-k6uiVzqv.js +1 -0
  276. package/dist/packem_shared/FilePicker-BLS9nOPz.js +1 -0
  277. package/dist/packem_shared/FocusContext-C2Sosxa4.js +1 -0
  278. package/dist/packem_shared/Fullscreen-BRhuBLBh.js +1 -0
  279. package/dist/packem_shared/IMECompositionBuffer-VhC9HRCv.js +1 -0
  280. package/dist/packem_shared/InputParser-CtwkCbrQ.js +2 -0
  281. package/dist/packem_shared/KEY-C--kOw41.js +1 -0
  282. package/dist/packem_shared/LayoutNode-LPYsuzBg.js +1 -0
  283. package/dist/packem_shared/MouseProvider-DUqQ3Eaa.js +1 -0
  284. package/dist/packem_shared/NAMED_COLORS-82DpREQV.js +1 -0
  285. package/dist/packem_shared/Range-BsVYNWtg.js +1 -0
  286. package/dist/packem_shared/Renderer-DsskdkUd.js +1 -0
  287. package/dist/packem_shared/ResizeObserver-BI9bDy-j.js +1 -0
  288. package/dist/packem_shared/ScrollBar-qa1IzDDv.js +1 -0
  289. package/dist/packem_shared/ScrollBarBox-DchESZWv.js +1 -0
  290. package/dist/packem_shared/ScrollList-BBAnRsrC.js +1 -0
  291. package/dist/packem_shared/ScrollView-CHAo7Epj.js +1 -0
  292. package/dist/packem_shared/Static-DSzsElz4.js +1 -0
  293. package/dist/packem_shared/TreeNodeMap-cJlYqckB.js +1 -0
  294. package/dist/packem_shared/TreeView-BsvLCsf0.js +1 -0
  295. package/dist/packem_shared/TuiApp-BPL8v1i1.js +1 -0
  296. package/dist/packem_shared/TuiContext-BNmP0lMY.js +3 -0
  297. package/dist/packem_shared/ansi-parser-DlgLtOYO.js +1 -0
  298. package/dist/packem_shared/ansi-tokenizer-BU67A126.js +1 -0
  299. package/dist/packem_shared/braille-ch3O5D7I.js +1 -0
  300. package/dist/packem_shared/buffer.d-EJkZr8uH.d.ts +39 -0
  301. package/dist/packem_shared/calculateScroll-D4Y_JR4H.js +1 -0
  302. package/dist/packem_shared/{measureElement-DA8WqFP_.js → calculateScrollbarLayout-Lf6i24c9.js} +1 -1
  303. package/dist/packem_shared/clearOsc52-BUpnQOav.js +1 -0
  304. package/dist/packem_shared/clearStringWidthCache-DKFjfJuB.js +1 -0
  305. package/dist/packem_shared/clipboard.d-D6lZTQ21.d.ts +23 -0
  306. package/dist/packem_shared/color-matrix.d-DSXLsB64.d.ts +50 -0
  307. package/dist/packem_shared/colorize-DU4YZkp3.js +1 -0
  308. package/dist/packem_shared/controlled-scroll-view-BVg7ywNW.js +1 -0
  309. package/dist/packem_shared/createInlineLoop-BT40Wpmx.js +2 -0
  310. package/dist/packem_shared/createScreen-DoYpyL0V.js +3 -0
  311. package/dist/packem_shared/cursor-helpers.d-BONB9tky.d.ts +12 -0
  312. package/dist/packem_shared/dom-rphpG0kf.js +1 -0
  313. package/dist/packem_shared/dom.d-B4kXbaVY.d.ts +449 -0
  314. package/dist/packem_shared/format-time-fjoQHMxD.js +1 -0
  315. package/dist/packem_shared/{getPathToRoot-B2tKmx3i.js → getPathToRoot-PDJeqiEH.js} +1 -1
  316. package/dist/packem_shared/input-utils-BSWCb4F_.js +1 -0
  317. package/dist/packem_shared/{input.d-Bfq7oc06.d.ts → input.d-CgxV2e8U.d.ts} +1 -1
  318. package/dist/packem_shared/isIntersecting-Bo2npvMR.js +1 -0
  319. package/dist/packem_shared/isTerminalPaletteQuerySupported-BYzmqq9-.js +1 -0
  320. package/dist/packem_shared/kittyFlags-g8ALyoCU.js +1 -0
  321. package/dist/packem_shared/line-chart-C7CUrvVs.js +1 -0
  322. package/dist/packem_shared/load-native-root-binding-DDikxNox.js +1 -0
  323. package/dist/packem_shared/measure-element-D4M9iSYp.js +1 -0
  324. package/dist/packem_shared/measure-text-B7juNq4Y.js +3 -0
  325. package/dist/packem_shared/mouse-context.d-BfL9xGk_.d.ts +30 -0
  326. package/dist/packem_shared/parseSgrMouse-bUrqPrh-.js +1 -0
  327. package/dist/packem_shared/processLayout-I83k6vXE.js +2 -0
  328. package/dist/packem_shared/reconciler-CFyBVf7l.js +1 -0
  329. package/dist/packem_shared/reconciler-ClpU7Y-V.js +1 -0
  330. package/dist/packem_shared/render-CuQecTAs.js +24 -0
  331. package/dist/packem_shared/render-DFZ8NHlG.js +1 -0
  332. package/dist/packem_shared/render.d-CBnYBDk2.d.ts +417 -0
  333. package/dist/packem_shared/renderToString-DwXFY8Qh.js +4 -0
  334. package/dist/packem_shared/renderToString-L_bpw4OQ.js +2 -0
  335. package/dist/packem_shared/renderTreeToBuffer-C8lS0lJ2.js +2 -0
  336. package/dist/packem_shared/renderer-k-xShm1P.js +17 -0
  337. package/dist/packem_shared/scroll-view.d-DtpsgHLg.d.ts +119 -0
  338. package/dist/packem_shared/selection.d-CI3_p8wg.d.ts +62 -0
  339. package/dist/packem_shared/squashTextNodesWithMap-BmUSBPfc.js +1 -0
  340. package/dist/packem_shared/stderr-context-Bvnik0hL.js +1 -0
  341. package/dist/packem_shared/stdin-context-88AhuztD.js +1 -0
  342. package/dist/packem_shared/styles.d-cMo36xQz.d.ts +396 -0
  343. package/dist/packem_shared/terminal-palette.d-D2SQjfn-.d.ts +19 -0
  344. package/dist/packem_shared/text-width-e49vlbQH.js +2 -0
  345. package/dist/packem_shared/token-to-elements-D6J6-P2A.js +1 -0
  346. package/dist/packem_shared/treeViewTheme-Dq3ekRAC.js +1 -0
  347. package/dist/packem_shared/useTreeView-D5ifGwG3.js +1 -0
  348. package/dist/packem_shared/useTreeViewState-BiTJakkh.js +1 -0
  349. package/dist/packem_shared/utils-Bup8lyK8.js +1 -0
  350. package/dist/packem_shared/variant-config.d-D5NnrrQK.d.ts +2 -0
  351. package/dist/packem_shared/waitFor-CTAki32d.js +4 -0
  352. package/dist/packem_shared/wrapOrTruncateStyledLine-46W8bTtv.js +3 -0
  353. package/dist/react/index.d.ts +2 -2
  354. package/dist/react/index.js +1 -1
  355. package/dist/testing/index.d.ts +5 -1
  356. package/dist/testing/index.js +1 -1
  357. package/index.js +550 -692
  358. package/package.json +583 -32
  359. package/dist/packem_shared/Accordion-BXsqchV-.js +0 -1
  360. package/dist/packem_shared/Alert-BhYVMHtR.js +0 -1
  361. package/dist/packem_shared/AnimatePresence-Eu7Z8KHc.js +0 -1
  362. package/dist/packem_shared/ApprovalPrompt-BSn0FT1g.js +0 -1
  363. package/dist/packem_shared/AreaChart-Chy-frI7.js +0 -1
  364. package/dist/packem_shared/Badge-B8WPyRsK.js +0 -1
  365. package/dist/packem_shared/BarChart-rpZtlMcF.js +0 -1
  366. package/dist/packem_shared/BigText-CRpwUzrt.js +0 -1
  367. package/dist/packem_shared/BlinkDot-BvnRuWP8.js +0 -1
  368. package/dist/packem_shared/Box-BwqSvWuq.js +0 -1
  369. package/dist/packem_shared/Breadcrumb-D0hClbRV.js +0 -1
  370. package/dist/packem_shared/Button-B89Yvbc6.js +0 -1
  371. package/dist/packem_shared/COLOR_BLINDNESS_SIMULATION-DqErf7XX.js +0 -1
  372. package/dist/packem_shared/Calendar-Dmflvm2S.js +0 -1
  373. package/dist/packem_shared/Canvas-CKg6WV47.js +0 -1
  374. package/dist/packem_shared/Card-B_9fXdtU.js +0 -1
  375. package/dist/packem_shared/Checkbox-BN71eCWU.js +0 -1
  376. package/dist/packem_shared/Code-HhevcyiH.js +0 -2
  377. package/dist/packem_shared/Collapsible-u6uf_FdV.js +0 -1
  378. package/dist/packem_shared/CommandBlock-B-nslpCv.js +0 -4
  379. package/dist/packem_shared/CommandPalette-CEFdaURo.js +0 -1
  380. package/dist/packem_shared/ConfirmDialog-5Jje_Xpu.js +0 -1
  381. package/dist/packem_shared/ConfirmInput-D44Mb9oo.js +0 -1
  382. package/dist/packem_shared/ConsoleOverlay-CM3APfgP.js +0 -1
  383. package/dist/packem_shared/ContentSwitcher-Dm5BkrCt.js +0 -1
  384. package/dist/packem_shared/ControlledScrollView-DI8KZOQB.js +0 -1
  385. package/dist/packem_shared/Cursor-BoLFIMol.js +0 -1
  386. package/dist/packem_shared/DatePicker-CnSrFFAE.js +0 -1
  387. package/dist/packem_shared/DefinitionList-v8RDuF_R.js +0 -1
  388. package/dist/packem_shared/DevTools-O8EbCfHa.js +0 -1
  389. package/dist/packem_shared/Dialog-CTaL8pn0.js +0 -1
  390. package/dist/packem_shared/DiffView-BUIFqUB0.js +0 -1
  391. package/dist/packem_shared/Divider-C47bKmqu.js +0 -1
  392. package/dist/packem_shared/FilePicker-CUo7R5Qb.js +0 -1
  393. package/dist/packem_shared/FocusContext-Xy0cwJpO.js +0 -1
  394. package/dist/packem_shared/FormField-af3aUpRL.js +0 -1
  395. package/dist/packem_shared/Fullscreen-CuJ8y0s0.js +0 -1
  396. package/dist/packem_shared/Gauge-Dz-usH__.js +0 -1
  397. package/dist/packem_shared/Gradient-DYNc0GZA.js +0 -1
  398. package/dist/packem_shared/Heading-mwEYza3Y.js +0 -1
  399. package/dist/packem_shared/Heatmap-ChL97U1-.js +0 -1
  400. package/dist/packem_shared/Help-Zcelyw_U.js +0 -1
  401. package/dist/packem_shared/Histogram-FIf2F83d.js +0 -1
  402. package/dist/packem_shared/IMECompositionBuffer-C89PhiOu.js +0 -1
  403. package/dist/packem_shared/InputParser-rZKjY_7Y.js +0 -2
  404. package/dist/packem_shared/KEY-Bk8B-3h_.js +0 -1
  405. package/dist/packem_shared/Kbd-DpkPp4jB.js +0 -1
  406. package/dist/packem_shared/LayoutNode-rxblE317.js +0 -1
  407. package/dist/packem_shared/LineChart-BXE_girm.js +0 -1
  408. package/dist/packem_shared/Link-i2o2EG4-.js +0 -1
  409. package/dist/packem_shared/LoadingIndicator-TC1Fjwyt.js +0 -1
  410. package/dist/packem_shared/Markdown-R1XqK63D.js +0 -1
  411. package/dist/packem_shared/MaskedInput-J01phOZs.js +0 -1
  412. package/dist/packem_shared/Menu-CfrH4ymk.js +0 -1
  413. package/dist/packem_shared/MessageBubble-BmBBU2Rm.js +0 -1
  414. package/dist/packem_shared/ModelBadge-D3wrXncu.js +0 -1
  415. package/dist/packem_shared/MouseProvider-pjza-lpc.js +0 -1
  416. package/dist/packem_shared/MultiSelect-Dqmn-bVo.js +0 -1
  417. package/dist/packem_shared/NAMED_COLORS-B9fJsYdg.js +0 -1
  418. package/dist/packem_shared/Newline-BSG4iUqp.js +0 -2
  419. package/dist/packem_shared/OperationTree-DksxjMIV.js +0 -1
  420. package/dist/packem_shared/OptionList-CNx7r9yN.js +0 -1
  421. package/dist/packem_shared/OrderedList-BeDy035w.js +0 -1
  422. package/dist/packem_shared/Paginator-B56s6bhS.js +0 -1
  423. package/dist/packem_shared/Paragraph-BqJlH0R-.js +0 -1
  424. package/dist/packem_shared/Placeholder-GMpHRGC8.js +0 -1
  425. package/dist/packem_shared/ProgressBar-Bj3fmORR.js +0 -1
  426. package/dist/packem_shared/RadioGroup-Br8BeEwS.js +0 -1
  427. package/dist/packem_shared/Renderer-DJXooAsp.js +0 -1
  428. package/dist/packem_shared/ResizeObserverEntry-Dq0dk8Kq.js +0 -1
  429. package/dist/packem_shared/ScatterPlot-OhfYco5l.js +0 -1
  430. package/dist/packem_shared/ScrollBar-Da5Y3z7N.js +0 -1
  431. package/dist/packem_shared/ScrollBarBox-Dz6F-Eat.js +0 -1
  432. package/dist/packem_shared/ScrollList-DiVGyEjv.js +0 -1
  433. package/dist/packem_shared/ScrollView-BojONotI.js +0 -1
  434. package/dist/packem_shared/SearchInput-BoPTRbhV.js +0 -1
  435. package/dist/packem_shared/SelectInput-CAJ7SCBq.js +0 -1
  436. package/dist/packem_shared/SelectInputIndicator-N1n8ULHs.js +0 -1
  437. package/dist/packem_shared/SelectInputItem-BEkbmobs.js +0 -1
  438. package/dist/packem_shared/ShimmerText-CuGQ2NDC.js +0 -1
  439. package/dist/packem_shared/Slider-Cg_tJpKa.js +0 -1
  440. package/dist/packem_shared/Spacer-eT3HOrXk.js +0 -1
  441. package/dist/packem_shared/Sparkline-T6_FPVET.js +0 -1
  442. package/dist/packem_shared/Spinner-B0-A50pu.js +0 -1
  443. package/dist/packem_shared/Static-DLynr5pn.js +0 -1
  444. package/dist/packem_shared/Static-jzLPaHJF.js +0 -1
  445. package/dist/packem_shared/StaticRender-BgD61E7x.js +0 -1
  446. package/dist/packem_shared/StatusLine-Ch4jjef1.js +0 -1
  447. package/dist/packem_shared/StatusMessage-B1qfKeMM.js +0 -1
  448. package/dist/packem_shared/Stepper-CNPAqxiU.js +0 -1
  449. package/dist/packem_shared/Stopwatch-CAx2EWwq.js +0 -1
  450. package/dist/packem_shared/StreamingText-BYOKSB2T.js +0 -1
  451. package/dist/packem_shared/Switch-DzSpKYu7.js +0 -1
  452. package/dist/packem_shared/Tab-BcXzSUdj.js +0 -1
  453. package/dist/packem_shared/Table-DJp1TLrR.js +0 -1
  454. package/dist/packem_shared/Tabs-D68z0SOt.js +0 -1
  455. package/dist/packem_shared/Tag-BvLHnYRn.js +0 -1
  456. package/dist/packem_shared/Text-mTAve9R2.js +0 -1
  457. package/dist/packem_shared/TextInput-C_gYQlnF.js +0 -1
  458. package/dist/packem_shared/Textarea-C2ET_oMb.js +0 -2
  459. package/dist/packem_shared/Timer-CI3aQX65.js +0 -1
  460. package/dist/packem_shared/Toast-Drvc8XfG.js +0 -1
  461. package/dist/packem_shared/Tooltip-C5UnQlLd.js +0 -1
  462. package/dist/packem_shared/Transform-fYmcdqRT.js +0 -1
  463. package/dist/packem_shared/Transition-CJDBKYUB.js +0 -1
  464. package/dist/packem_shared/TreeNodeMap-CspqSCpb.js +0 -1
  465. package/dist/packem_shared/TreeView-DjhacGJ5.js +0 -1
  466. package/dist/packem_shared/TuiApp-DrjI_i-R.js +0 -1
  467. package/dist/packem_shared/TuiContext-BoJvG3NN.js +0 -3
  468. package/dist/packem_shared/UnorderedList-BnfqexZs.js +0 -1
  469. package/dist/packem_shared/ansi-parser-B6uXaq65.js +0 -1
  470. package/dist/packem_shared/ansi-tokenizer-DqX9nJuk.js +0 -1
  471. package/dist/packem_shared/boxes-DyY_LXCi.js +0 -1
  472. package/dist/packem_shared/braille-BBjIoaN0.js +0 -1
  473. package/dist/packem_shared/colorize-DbTZMrJO.js +0 -1
  474. package/dist/packem_shared/comparePoints-C85EsmNz.js +0 -1
  475. package/dist/packem_shared/controlled-scroll-view-CmrAEvJk.js +0 -1
  476. package/dist/packem_shared/createInlineLoop-DRNZ7jqH.js +0 -2
  477. package/dist/packem_shared/createLinkedScrollGroup-BMTJ7rAj.js +0 -1
  478. package/dist/packem_shared/createMemoryStorage-QVZNXbWz.js +0 -2
  479. package/dist/packem_shared/createScreen-CrLrxA6t.js +0 -3
  480. package/dist/packem_shared/dom-4y__5fWB.js +0 -1
  481. package/dist/packem_shared/format-time-C7Q-hQZq.js +0 -1
  482. package/dist/packem_shared/getScrollHeight-BTEY8ewu.js +0 -1
  483. package/dist/packem_shared/input-utils-fAxzSlNh.js +0 -1
  484. package/dist/packem_shared/isIntersecting-B3KbKTmu.js +0 -1
  485. package/dist/packem_shared/isOsc52Supported-DKK7Uee6.js +0 -1
  486. package/dist/packem_shared/isTerminalPaletteQuerySupported-Dn2hFAZ_.js +0 -1
  487. package/dist/packem_shared/kittyFlags-C3rZLbcK.js +0 -1
  488. package/dist/packem_shared/line-chart-DrM8PwnI.js +0 -1
  489. package/dist/packem_shared/measure-element-DSp7YDus.js +0 -2
  490. package/dist/packem_shared/measure-text-DDjHT1jD.js +0 -3
  491. package/dist/packem_shared/parseSgrMouse-Ccj70ijb.js +0 -1
  492. package/dist/packem_shared/processLayout-DXDfFb_d.js +0 -1
  493. package/dist/packem_shared/reconciler-BuOP-TZ6.js +0 -1
  494. package/dist/packem_shared/reconciler-DSYCrIZs.js +0 -1
  495. package/dist/packem_shared/render-DDqtMAFN.js +0 -1
  496. package/dist/packem_shared/render-_r0K9K11.js +0 -28
  497. package/dist/packem_shared/render.d-BR3gA-N8.d.ts +0 -1257
  498. package/dist/packem_shared/renderToString-DeqOWRP8.js +0 -4
  499. package/dist/packem_shared/renderToString-IYYPyASm.js +0 -2
  500. package/dist/packem_shared/renderTreeToBuffer-DPkoCgP2.js +0 -2
  501. package/dist/packem_shared/renderer-D2p6av2X.js +0 -17
  502. package/dist/packem_shared/setEnableStyledLineCache-D2gZbwFM.js +0 -1
  503. package/dist/packem_shared/squashTextNodesWithMap-Cpqmc45i.js +0 -1
  504. package/dist/packem_shared/stderr-context-BzEaUICS.js +0 -1
  505. package/dist/packem_shared/stdin-context-BTaaFagk.js +0 -1
  506. package/dist/packem_shared/text-width-CZ9vPvM0.js +0 -2
  507. package/dist/packem_shared/token-to-elements-BYxT6J_Q.js +0 -1
  508. package/dist/packem_shared/treeViewTheme-1RIZyB4M.js +0 -1
  509. package/dist/packem_shared/useAnimation-B9we6ZzL.js +0 -1
  510. package/dist/packem_shared/useApp-B6fvM42d.js +0 -1
  511. package/dist/packem_shared/useBoxMetrics-D5pkIr6P.js +0 -1
  512. package/dist/packem_shared/useClipboard-CBxy0hT8.js +0 -1
  513. package/dist/packem_shared/useColorBlindness-BvWcu2Bb.js +0 -1
  514. package/dist/packem_shared/useConsoleCapture-BxiG8iLJ.js +0 -1
  515. package/dist/packem_shared/useCursor-CPu8T5Db.js +0 -1
  516. package/dist/packem_shared/useElementDimensions-qJ_WXFZ9.js +0 -1
  517. package/dist/packem_shared/useFocus-DSmziO_x.js +0 -1
  518. package/dist/packem_shared/useFocusManager-Uapn3LQo.js +0 -1
  519. package/dist/packem_shared/useForm-CzV-Oext.js +0 -1
  520. package/dist/packem_shared/useHotkey-D0dGey14.js +0 -1
  521. package/dist/packem_shared/useInput-D1_jG26Z.js +0 -2
  522. package/dist/packem_shared/useInterval-AobjZT3u.js +0 -1
  523. package/dist/packem_shared/useIsScreenReaderEnabled-DjWHh-II.js +0 -1
  524. package/dist/packem_shared/useKeyBindings-zabkEJQs.js +0 -1
  525. package/dist/packem_shared/useKeyChord-CICQIxXj.js +0 -1
  526. package/dist/packem_shared/useMouseAction-2dRfU1vE.js +0 -1
  527. package/dist/packem_shared/useMouseContext-C746G7kY.js +0 -1
  528. package/dist/packem_shared/useMousePosition-BTWfV4JK.js +0 -1
  529. package/dist/packem_shared/useOnMouseClick-nY8xLZmt.js +0 -1
  530. package/dist/packem_shared/useOnMouseHover-D3DczIol.js +0 -1
  531. package/dist/packem_shared/useOnMouseState-cRK8QvzD.js +0 -1
  532. package/dist/packem_shared/usePaste-CKKB9H-Z.js +0 -1
  533. package/dist/packem_shared/useScrollAcceleration-NrY1oVMs.js +0 -1
  534. package/dist/packem_shared/useScrollInput-Caghtn-Q.js +0 -1
  535. package/dist/packem_shared/useStderr-BDZb6InG.js +0 -1
  536. package/dist/packem_shared/useStdin-DKa4h35k.js +0 -1
  537. package/dist/packem_shared/useStdout-B-2lX4C5.js +0 -1
  538. package/dist/packem_shared/useStopwatch-DffK7iMh.js +0 -1
  539. package/dist/packem_shared/useTerminalPalette-Cv7tSduR.js +0 -1
  540. package/dist/packem_shared/useTextBuffer-DekkGLxI.js +0 -4
  541. package/dist/packem_shared/useTextSelection-CGT0GLDR.js +0 -1
  542. package/dist/packem_shared/useTimeout-7LEFYTnG.js +0 -1
  543. package/dist/packem_shared/useTimer-DyoqSyGi.js +0 -1
  544. package/dist/packem_shared/useTreeView-8UlTK6sW.js +0 -1
  545. package/dist/packem_shared/useTreeViewState-CRPCUWrb.js +0 -1
  546. package/dist/packem_shared/useWindowSize-yDZsXF8z.js +0 -1
  547. package/dist/packem_shared/utils-THUhYKG2.js +0 -1
  548. package/dist/packem_shared/waitFor-Dj5zfL5s.js +0 -4
  549. package/dist/packem_shared/wrapOrTruncateStyledLine-BZ00SM8i.js +0 -3
package/README.md CHANGED
@@ -65,11 +65,39 @@ yarn add @visulima/tui react react-reconciler
65
65
  pnpm add @visulima/tui react react-reconciler
66
66
  ```
67
67
 
68
- ## Quick Start
68
+ ### Component imports
69
+
70
+ Every component lives at its own subpath under `@visulima/tui/components/<kebab-name>`. Hooks, `render`, and primitives stay on the bare `@visulima/tui` entry. This keeps the import graph small — you only pull in what you use, and heavy peer dependencies are loaded only when their component is imported.
69
71
 
70
72
  ```tsx
71
- import { render, Box, Text } from "@visulima/tui";
73
+ import { Box } from "@visulima/tui/components/box";
74
+ import { Text } from "@visulima/tui/components/text";
75
+ import { Spinner } from "@visulima/tui/components/spinner";
76
+ import { useApp } from "@visulima/tui/hooks/use-app";
77
+ import { useInput } from "@visulima/tui/hooks/use-input";
78
+ import { render } from "@visulima/tui";
79
+ ```
80
+
81
+ ### Optional peer dependencies
82
+
83
+ A few components have heavy peer dependencies. Install only the peers for the components you use:
84
+
85
+ | Component | Subpath | Required peers |
86
+ | ---------- | ------------------------------------ | --------------------------------------------------------------------------------------------------------- |
87
+ | `BigText` | `@visulima/tui/components/big-text` | `cfonts` |
88
+ | `Code` | `@visulima/tui/components/code` | `shiki`, `@shikijs/langs`, `@shikijs/themes` |
89
+ | `DiffView` | `@visulima/tui/components/diff-view` | `diff` (+ `shiki`, `@shikijs/langs`, `@shikijs/themes` for syntax highlighting) |
90
+ | `Markdown` | `@visulima/tui/components/markdown` | `marked` (+ `shiki`, `@shikijs/langs`, `@shikijs/themes` for code blocks; `@visulima/tabular` for tables) |
91
+ | `Table` | `@visulima/tui/components/table` | `@visulima/tabular` |
92
+
93
+ To enable the in-app React DevTools overlay (`DEV=true`), install `react-devtools-core` and `ws`.
94
+
95
+ ## Quick Start
72
96
 
97
+ ```tsx
98
+ import { Box } from "@visulima/tui/components/box";
99
+ import { Text } from "@visulima/tui/components/text";
100
+ import { render } from "@visulima/tui";
73
101
  const App = () => (
74
102
  <Box flexDirection="column" padding={1}>
75
103
  <Text bold>Hello, world!</Text>
@@ -87,8 +115,8 @@ render(<App />);
87
115
  Drive frame-based or time-based animations with a shared timer. Multiple `useAnimation` calls consolidate into one render cycle.
88
116
 
89
117
  ```tsx
90
- import { Text, useAnimation } from "@visulima/tui";
91
-
118
+ import { Text } from "@visulima/tui/components/text";
119
+ import { useAnimation } from "@visulima/tui/hooks/use-animation";
92
120
  const Spinner = () => {
93
121
  const { frame } = useAnimation({ interval: 80 });
94
122
  const characters = ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"];
@@ -104,6 +132,23 @@ const Spinner = () => {
104
132
 
105
133
  Returns `{ frame, time, delta, reset }`. See the [full hooks reference](https://visulima.com/packages/tui/hooks#useanimation) for detailed return values, more examples (sine waves, physics, pausable, reset), and `maxFps` interaction.
106
134
 
135
+ The full list of hooks (each at `@visulima/tui/hooks/<name>`): `use-animation`, `use-app`, `use-box-metrics`, `use-clipboard`, `use-color-blindness`, `use-console-capture`, `use-cursor`, `use-element-position`, `use-focus`, `use-focus-manager`, `use-form`, `use-hotkey`, `use-input`, `use-interval`, `use-is-screen-reader-enabled`, `use-key-bindings`, `use-key-chord`, `use-linked-scroll`, `use-mouse`, `use-mouse-action`, `use-mouse-position`, `use-on-mouse-click`, `use-on-mouse-hover`, `use-on-mouse-state`, `use-paste`, `use-persistent-state`, `use-scroll-acceleration`, `use-scroll-input`, `use-stderr`, `use-stdin`, `use-stdout`, `use-stopwatch`, `use-terminal-palette`, `use-text-buffer`, `use-text-selection`, `use-timeout`, `use-timer`, `use-window-size`. See the [hooks reference](https://visulima.com/packages/tui/hooks) for details.
136
+
137
+ ## Component Catalog
138
+
139
+ `@visulima/tui` ships 90+ components, each at its own subpath `@visulima/tui/components/<name>`:
140
+
141
+ - **Layout & text**: `box`, `text`, `paragraph`, `heading`, `divider`, `spacer`, `newline`, `transform`, `gradient`, `big-text`, `shimmer-text`, `streaming-text`, `placeholder`, `link`, `kbd`, `code`, `markdown`, `diff-view`.
142
+ - **Lists & data**: `ordered-list`, `unordered-list`, `definition-list`, `option-list`, `table`, `tree-view`, `operation-tree`, `breadcrumb`, `paginator`, `tag`, `badge`, `model-badge`.
143
+ - **Inputs & forms**: `text-input`, `textarea`, `masked-input`, `search-input`, `confirm-input`, `select-input` (`select-input-item`, `select-input-indicator`), `multi-select`, `checkbox`, `radio-group`, `switch`, `slider`, `date-picker`, `calendar`, `form`, `button`, `file-picker`.
144
+ - **Feedback & status**: `alert`, `toast`, `status-line`, `status-message`, `progress-bar`, `gauge`, `spinner`, `loading-indicator`, `blink-dot`, `stepper`, `timer`, `stopwatch`, `cursor`.
145
+ - **Overlays & navigation**: `dialog`, `confirm-dialog`, `approval-prompt`, `command-palette`, `command-block`, `menu`, `tooltip`, `tab`, `tabs`, `content-switcher`, `accordion`, `collapsible`, `help`, `console-overlay`, `message-bubble`.
146
+ - **Charts & viz**: `area-chart`, `bar-chart`, `line-chart`, `scatter-plot`, `histogram`, `heatmap`, `sparkline`, `canvas`, `card`.
147
+ - **Scrolling**: `scroll-view`, `controlled-scroll-view`, `scroll-list`, `scroll-bar`, `scroll-bar-box`.
148
+ - **Animation & rendering**: `animate-presence`, `transition`, `static`, `static-render`.
149
+
150
+ Browse the live gallery and per-component APIs in the [component docs](https://visulima.com/packages/tui/components).
151
+
107
152
  ## Documentation
108
153
 
109
154
  Full documentation, API reference, component gallery, and guides are available at:
@@ -0,0 +1,59 @@
1
+ import { AnsiColors } from '@visulima/colorize';
2
+ import { ReactNode, ReactElement } from 'react';
3
+ import { LiteralUnion } from 'type-fest';
4
+ type AccordionItem = {
5
+ /**
6
+ * Content rendered when the item is expanded.
7
+ */
8
+ readonly content: ReactNode;
9
+ /**
10
+ * Unique identifier.
11
+ */
12
+ readonly id: string;
13
+ /**
14
+ * Header label.
15
+ */
16
+ readonly title: ReactNode;
17
+ };
18
+ type Props = {
19
+ /**
20
+ * Accent color for the focused header.
21
+ * @default "blue"
22
+ */
23
+ readonly accentColor?: LiteralUnion<AnsiColors, string>;
24
+ /**
25
+ * When true, multiple panels can be open at once.
26
+ * @default false
27
+ */
28
+ readonly allowMultiple?: boolean;
29
+ /**
30
+ * Auto-focus the first item on mount.
31
+ */
32
+ readonly autoFocus?: boolean;
33
+ /**
34
+ * Initially open item ids.
35
+ */
36
+ readonly defaultExpanded?: ReadonlyArray<string>;
37
+ /**
38
+ * Disable interaction.
39
+ */
40
+ readonly isDisabled?: boolean;
41
+ /**
42
+ * List of panels.
43
+ */
44
+ readonly items: ReadonlyArray<AccordionItem>;
45
+ };
46
+ /**
47
+ * Keyboard-navigable accordion. Use arrow keys to move between panels and
48
+ * Enter / Space to toggle.
49
+ * @returns A `ReactElement` rendering the accordion column.
50
+ */
51
+ declare function Accordion({
52
+ accentColor,
53
+ allowMultiple,
54
+ autoFocus,
55
+ defaultExpanded,
56
+ isDisabled,
57
+ items
58
+ }: Props): ReactElement;
59
+ export { Accordion, AccordionItem, type Props as AccordionProps, Props, Accordion as default };
@@ -0,0 +1 @@
1
+ import{jsx as m,jsxs as a}from"react/jsx-runtime";import{useState as b,useRef as F,useCallback as v}from"react";import j from"../ink/hooks/use-focus.js";import k from"../ink/hooks/use-input.js";import{Box as u}from"./box.js";import{Text as A}from"./text.js";function M({accentColor:g="blue",allowMultiple:d=!1,autoFocus:w=!1,defaultExpanded:i,isDisabled:c=!1,items:l}){const{isFocused:s}=j({autoFocus:w,isActive:!c}),[C,D]=b(()=>i===void 0||i.length===0?[]:d?i:i.slice(0,1)),[f,p]=b(0),n=F(f);n.current=f;const x=v(r=>{D(e=>{const o=e.includes(r);return d?o?e.filter(t=>t!==r):[...e,r]:o?[]:[r]})},[d]);return k(v((r,e)=>{if(!s)return;const o=l.length;if((e.downArrow||r==="j")&&n.current<o-1)p(n.current+1);else if((e.upArrow||r==="k")&&n.current>0)p(n.current-1);else if(e.return||r===" "){const t=l[n.current];t&&x(t.id)}},[s,l,x]),{isActive:!c&&s}),m(u,{flexDirection:"column",children:l.map((r,e)=>{const o=C.includes(r.id),t=s&&e===f,h=t?g:void 0;return a(u,{flexDirection:"column",children:[a(u,{children:[a(A,{color:h,dimColor:c,children:[t?"▸ ":" ",o?"▼ ":"▶ "]}),m(A,{bold:t,color:h,dimColor:c,children:r.title})]}),o?m(u,{flexDirection:"column",marginBottom:1,marginLeft:4,children:r.content}):void 0]},r.id)})})}export{M as Accordion,M as default};
@@ -0,0 +1,26 @@
1
+ import { ReactNode, ReactElement } from 'react';
2
+ import { V as Variant } from "../packem_shared/variant-config.d-D5NnrrQK.js";
3
+ type AlertVariant = Variant;
4
+ type Props = {
5
+ /**
6
+ * Alert message content.
7
+ */
8
+ readonly children: ReactNode;
9
+ /**
10
+ * Optional heading displayed above the message.
11
+ */
12
+ readonly title?: string;
13
+ /**
14
+ * Determines the border color and icon.
15
+ */
16
+ readonly variant: AlertVariant;
17
+ };
18
+ /**
19
+ * Renders a bordered alert box with a variant-specific icon, optional title, and message.
20
+ */
21
+ declare function Alert({
22
+ children,
23
+ title,
24
+ variant
25
+ }: Props): ReactElement;
26
+ export { Alert, type Props as AlertProps, AlertVariant, Props, Alert as default };
@@ -0,0 +1 @@
1
+ import{jsxs as l,jsx as r}from"react/jsx-runtime";import{Box as o}from"./box.js";import{Text as i}from"./text.js";import{o as f}from"../packem_shared/variant-config-BJqpNo7H.js";function p({children:t,title:e,variant:d}){const{color:n,icon:c}=f[d];return l(o,{borderColor:n,borderStyle:"round",flexGrow:1,gap:1,paddingX:1,children:[r(o,{flexShrink:0,children:r(i,{color:n,children:c})}),l(o,{flexDirection:"column",flexGrow:1,flexShrink:1,gap:1,minWidth:0,children:[e?r(i,{bold:!0,children:e}):void 0,r(i,{children:t})]})]})}export{p as Alert,p as default};
@@ -0,0 +1,18 @@
1
+ import { ReactNode, ReactElement } from 'react';
2
+ type Props = {
3
+ /**
4
+ * Keyed children. Any child that accepts a `show: boolean` prop and calls
5
+ * `onExit` when its exit transition finishes (such as `&lt;Transition />`) is
6
+ * orchestrated automatically. Other children render as-is.
7
+ */
8
+ readonly children: ReactNode;
9
+ };
10
+ /**
11
+ * Orchestrates enter / exit animations for keyed children. Wrap a dynamic
12
+ * list of `&lt;Transition />` (or any component accepting `show` + `onExit`) to
13
+ * keep outgoing children mounted until their exit animation finishes.
14
+ */
15
+ declare function AnimatePresence({
16
+ children
17
+ }: Props): ReactElement;
18
+ export { AnimatePresence, type Props as AnimatePresenceProps, Props, AnimatePresence as default };
@@ -0,0 +1 @@
1
+ import{jsx as y}from"react/jsx-runtime";import{useState as k,Children as f,isValidElement as a,useEffect as w,useCallback as d,cloneElement as m}from"react";import{Box as E}from"./box.js";const p=s=>{const{key:r}=s;if(r!==null)return r},x=s=>s.type?.isAnimatable===!0?!0:typeof s.props=="object"&&s.props!==null&&"show"in s.props;function A({children:s}){const[r,c]=k(()=>{const e=[];return f.forEach(s,t=>{if(!a(t))return;const n=p(t);n!==void 0&&e.push({element:t,key:n,show:!0})}),e});w(()=>{const e=new Map;f.forEach(s,t=>{if(!a(t))return;const n=p(t);n!==void 0&&e.set(n,t)}),c(t=>{const n=[],i=new Set;let l=!1;for(const o of t)if(e.has(o.key)){const u=e.get(o.key);(!o.show||o.element!==u)&&(l=!0),n.push({element:u,key:o.key,show:!0}),i.add(o.key)}else o.show&&(l=!0),n.push({...o,show:!1});for(const[o,u]of e)i.has(o)||(l=!0,n.push({element:u,key:o,show:!0}));return l?n:t})},[s]);const h=d(e=>{c(t=>t.filter(n=>n.key!==e))},[]);return y(E,{flexDirection:"column",children:r.map(e=>{if(!x(e.element))return m(e.element,{key:e.key});const t=e.element.props.onExit;return m(e.element,{key:e.key,onExit:()=>{t?.(),h(e.key)},show:e.show})})})}export{A as AnimatePresence,A as default};
@@ -0,0 +1,65 @@
1
+ import { AnsiColors } from '@visulima/colorize';
2
+ import { ReactNode, ReactElement } from 'react';
3
+ import { LiteralUnion } from 'type-fest';
4
+ type ApprovalRisk = "high" | "low" | "medium";
5
+ type ApprovalDecision = "allow-always" | "allow-once" | "deny";
6
+ type Props = {
7
+ /**
8
+ * Accent color for the highlighted option letters. Overrides the risk color.
9
+ */
10
+ readonly accentColor?: LiteralUnion<AnsiColors, string>;
11
+ /**
12
+ * Auto-focus the prompt on mount. Set to `false` if a parent already
13
+ * owns focus and routes input to this component.
14
+ * @default true
15
+ */
16
+ readonly autoFocus?: boolean;
17
+ /**
18
+ * Optional body rendered between the header and the prompt line (e.g. a
19
+ * rendered diff or command preview).
20
+ */
21
+ readonly children?: ReactNode;
22
+ /**
23
+ * Accessible description of what approving will do.
24
+ */
25
+ readonly description?: string;
26
+ /**
27
+ * Disable input; use when a parent manages focus and input routing.
28
+ */
29
+ readonly isDisabled?: boolean;
30
+ /**
31
+ * Resolution callback. Called once the user answers.
32
+ */
33
+ readonly onDecision: (decision: ApprovalDecision) => void;
34
+ /**
35
+ * Params shown as a compact key=value preview.
36
+ */
37
+ readonly params?: Readonly<Record<string, unknown>>;
38
+ /**
39
+ * Severity badge; controls the border color.
40
+ * @default "medium"
41
+ */
42
+ readonly risk?: ApprovalRisk;
43
+ /**
44
+ * Name of the tool / action under review.
45
+ */
46
+ readonly tool: string;
47
+ };
48
+ /**
49
+ * Three-way approval prompt for tool calls. Resolves via `onDecision`:
50
+ * `y` / Enter → allow-once, `a` → allow-always, `n` / Esc → deny.
51
+ * @returns A bordered `ReactElement` containing the risk banner, params
52
+ * preview, optional body, and the prompt line.
53
+ */
54
+ declare function ApprovalPrompt({
55
+ accentColor,
56
+ autoFocus,
57
+ children,
58
+ description,
59
+ isDisabled,
60
+ onDecision,
61
+ params,
62
+ risk,
63
+ tool
64
+ }: Props): ReactElement;
65
+ export { ApprovalDecision, ApprovalPrompt, type Props as ApprovalPromptProps, ApprovalRisk, Props, ApprovalPrompt as default };
@@ -0,0 +1 @@
1
+ import{jsxs as n,jsx as o}from"react/jsx-runtime";import{useCallback as v}from"react";import x from"../ink/hooks/use-focus.js";import S from"../ink/hooks/use-input.js";import{Box as i}from"./box.js";import{Text as e}from"./text.js";const C={high:"red",low:"green",medium:"yellow"},k={high:"HIGH RISK",low:"LOW RISK",medium:"MEDIUM RISK"},A=r=>{if(r===null)return"null";if(typeof r=="string")return r;if(typeof r=="number"||typeof r=="boolean")return String(r);try{return JSON.stringify(r)}catch{return String(r)}};function O({accentColor:r,autoFocus:b=!0,children:u,description:m,isDisabled:h=!1,onDecision:l,params:p,risk:f="medium",tool:y}){const d=C[f],a=r??d,{isFocused:w}=x({autoFocus:b,isActive:!h});S(v((t,c)=>{const s=t.toLowerCase();if(s==="y"||c.return){l("allow-once");return}if(s==="a"){l("allow-always");return}(s==="n"||c.escape)&&l("deny")},[l]),{isActive:!h&&w});const g=p===void 0?[]:Object.entries(p);return n(i,{borderColor:d,borderStyle:"round",flexDirection:"column",paddingX:1,children:[n(i,{children:[n(e,{backgroundColor:d,color:"black",children:[" ",k[f]," "]}),n(e,{children:[" ",o(e,{bold:!0,children:y})]})]}),m===void 0?void 0:o(i,{marginTop:1,children:o(e,{children:m})}),g.length===0?void 0:o(i,{flexDirection:"column",marginTop:1,children:g.map(([t,c])=>n(i,{children:[n(e,{color:"cyan",children:[t,"="]}),o(e,{wrap:"truncate-end",children:A(c)})]},t))}),u===void 0?void 0:o(i,{marginTop:1,children:u}),o(i,{marginTop:1,children:n(e,{children:["Allow? [",o(e,{bold:!0,color:a,children:"y"}),"es /"," ",o(e,{bold:!0,color:a,children:"a"}),"lways /"," ",o(e,{bold:!0,color:a,children:"n"}),"o ]"]})})]})}export{O as ApprovalPrompt,O as default};
@@ -0,0 +1,66 @@
1
+ import { AnsiColors } from '@visulima/colorize';
2
+ import { ReactElement } from 'react';
3
+ import { LiteralUnion } from 'type-fest';
4
+ import { LineSeries } from "./line-chart.js";
5
+ import "../packem_shared/buffer.d-EJkZr8uH.js";
6
+ type Props = {
7
+ /**
8
+ * Axis label color.
9
+ * @default "gray"
10
+ */
11
+ readonly axisColor?: LiteralUnion<AnsiColors, string>;
12
+ /**
13
+ * Density of the shaded fill below each line.
14
+ * - `light` → `░`
15
+ * - `medium` → `▒` (default)
16
+ * - `heavy` → `▓`
17
+ */
18
+ readonly fillDensity?: "heavy" | "light" | "medium";
19
+ /**
20
+ * Chart body height in character rows.
21
+ * @default 10
22
+ */
23
+ readonly height?: number;
24
+ /**
25
+ * Upper bound for the y-axis.
26
+ */
27
+ readonly maxY?: number;
28
+ /**
29
+ * Lower bound for the y-axis.
30
+ */
31
+ readonly minY?: number;
32
+ /**
33
+ * Fallback palette.
34
+ */
35
+ readonly palette?: ReadonlyArray<LiteralUnion<AnsiColors, string>>;
36
+ /**
37
+ * Series to plot.
38
+ */
39
+ readonly series: ReadonlyArray<LineSeries>;
40
+ /**
41
+ * Render the legend below the plot.
42
+ * @default true
43
+ */
44
+ readonly showLegend?: boolean;
45
+ /**
46
+ * Chart body width in character columns.
47
+ * @default 40
48
+ */
49
+ readonly width?: number;
50
+ };
51
+ /**
52
+ * Area chart: line chart with the area between the line and the baseline
53
+ * filled with shaded blocks.
54
+ */
55
+ declare function AreaChart({
56
+ axisColor,
57
+ fillDensity,
58
+ height,
59
+ maxY,
60
+ minY,
61
+ palette,
62
+ series,
63
+ showLegend,
64
+ width
65
+ }: Props): ReactElement;
66
+ export { AreaChart, type Props as AreaChartProps, Props, AreaChart as default };
@@ -0,0 +1 @@
1
+ import{jsxs as b,jsx as m}from"react/jsx-runtime";import{useMemo as A}from"react";import{c as P}from"../packem_shared/braille-ch3O5D7I.js";import{Box as M}from"./box.js";import{Canvas as Y}from"./canvas.js";import{t as _,p as F,c as L,D,a as u}from"../packem_shared/line-chart-C7CUrvVs.js";import{Text as w}from"./text.js";const S=D,V={heavy:"▓",light:"░",medium:"▒"};function H({axisColor:I="gray",fillDensity:y="medium",height:g=10,maxY:p,minY:h,palette:d=S,series:f,showLegend:C=!0,width:N=40}){const s=A(()=>{const o=f.map((r,c)=>({color:F(r,c,d),points:_(r.data),series:r})),t=L(o);return{list:o,xMax:t.xMax===Number.NEGATIVE_INFINITY?1:t.xMax,xMin:t.xMin===Number.POSITIVE_INFINITY?0:t.xMin,yMax:p??(t.yMax===Number.NEGATIVE_INFINITY?1:t.yMax),yMin:h??(t.yMin===Number.POSITIVE_INFINITY?0:t.yMin)}},[f,d,h,p]),T=V[y];return b(M,{flexDirection:"column",children:[m(Y,{draw:o=>{o.clear();const t=o.width*2,r=o.height*4,c={xMax:s.xMax,xMin:s.xMin,yMax:s.yMax,yMin:s.yMin};for(const{color:a,points:n}of s.list)if(n.length!==0)for(let l=0;l<o.width;l+=1){let i;for(const e of n){const{px:x,py:v}=u(e,c,t,r);if(Math.floor(x/2)===l){const E=Math.floor(v/4);(i===void 0||E<i)&&(i=E)}}if(i!==void 0)for(let e=i+1;e<o.height;e+=1)o.setCell(l,e,T,{color:a,dim:!0})}for(let a=0;a<o.width;a+=2)o.setCell(a,o.height-1,"·",{color:I,dim:!0});for(const{color:a,points:n}of s.list){if(n.length===0)continue;const l=P(o.width,o.height);let i=u(n[0],c,t,r);l.plotPoint(i.px,i.py);for(let e=1;e<n.length;e+=1){const x=u(n[e],c,t,r);l.plotLine(i.px,i.py,x.px,x.py),i=x}l.flush(o,{bold:!0,color:a})}},height:g,version:[f,N,g,h,p,y,I,d],width:N}),C?m(M,{gap:2,marginTop:1,children:s.list.map(({color:o,series:t},r)=>b(M,{gap:1,children:[m(w,{color:o,children:T}),m(w,{children:t.label??`Series ${r+1}`})]},`${r}:${t.label??""}`))}):void 0]})}export{H as AreaChart,H as default};
@@ -0,0 +1,22 @@
1
+ import { AnsiColors } from '@visulima/colorize';
2
+ import { ReactNode, ReactElement } from 'react';
3
+ import { LiteralUnion } from 'type-fest';
4
+ type Props = {
5
+ /**
6
+ * Label content. Strings are automatically uppercased.
7
+ */
8
+ readonly children: ReactNode;
9
+ /**
10
+ * Background color for the badge.
11
+ * @default "magenta"
12
+ */
13
+ readonly color?: LiteralUnion<AnsiColors, string>;
14
+ };
15
+ /**
16
+ * Renders an uppercase colored label badge, useful for status indicators.
17
+ */
18
+ declare function Badge({
19
+ children,
20
+ color
21
+ }: Props): ReactElement;
22
+ export { Badge, type Props as BadgeProps, Props, Badge as default };
@@ -0,0 +1 @@
1
+ import{jsxs as a,jsx as n}from"react/jsx-runtime";import{Text as o}from"./text.js";function l({children:r,color:t="magenta"}){const e=typeof r=="string"?r.toUpperCase():r;return a(o,{backgroundColor:t,children:[" ",n(o,{color:"black",children:e})," "]})}export{l as Badge,l as default};
@@ -0,0 +1,67 @@
1
+ import { AnsiColors } from '@visulima/colorize';
2
+ import { ReactElement } from 'react';
3
+ import { LiteralUnion } from 'type-fest';
4
+ type BarDatum = {
5
+ /**
6
+ * Per-bar color override. Falls back to the chart-level palette.
7
+ */
8
+ readonly color?: LiteralUnion<AnsiColors, string>;
9
+ readonly label?: string;
10
+ readonly value: number;
11
+ };
12
+ type Props = {
13
+ /**
14
+ * Bars to render.
15
+ */
16
+ readonly data: ReadonlyArray<BarDatum>;
17
+ /**
18
+ * Total height of the plot area in character rows.
19
+ * @default 10
20
+ */
21
+ readonly height?: number;
22
+ /**
23
+ * Optional upper bound for the axis. When omitted the chart uses the
24
+ * largest value in `data`.
25
+ */
26
+ readonly max?: number;
27
+ /**
28
+ * Orientation of the bars.
29
+ * @default "vertical"
30
+ */
31
+ readonly orientation?: "horizontal" | "vertical";
32
+ /**
33
+ * Fallback palette cycled through when a bar does not provide its own color.
34
+ * @default ["cyan", "magenta", "yellow", "green", "blue", "red"]
35
+ */
36
+ readonly palette?: ReadonlyArray<LiteralUnion<AnsiColors, string>>;
37
+ /**
38
+ * Render labels underneath vertical bars (or to the left of horizontal bars).
39
+ * @default true
40
+ */
41
+ readonly showLabels?: boolean;
42
+ /**
43
+ * Render numeric values next to each bar.
44
+ * @default false
45
+ */
46
+ readonly showValues?: boolean;
47
+ /**
48
+ * Total width of the plot area in character columns. Defaults to
49
+ * `data.length * 3` for vertical charts, or `24` for horizontal.
50
+ */
51
+ readonly width?: number;
52
+ };
53
+ /**
54
+ * Bar chart rendered on top of `Canvas`. Uses fractional block glyphs for
55
+ * sub-cell precision (▁▂▃▄▅▆▇█ vertical, ▏▎▍▌▋▊▉█ horizontal).
56
+ */
57
+ declare function BarChart({
58
+ data,
59
+ height,
60
+ max: maxOverride,
61
+ orientation,
62
+ palette,
63
+ showLabels,
64
+ showValues,
65
+ width: widthOverride
66
+ }: Props): ReactElement;
67
+ export { BarChart, type Props as BarChartProps, BarDatum, Props, BarChart as default };
@@ -0,0 +1 @@
1
+ import{jsx as e,jsxs as B}from"react/jsx-runtime";import{useMemo as E}from"react";import{Box as o}from"./box.js";import{Canvas as C}from"./canvas.js";import{Text as p}from"./text.js";const j=["cyan","magenta","yellow","green","blue","red"],D=(r,t)=>{if(t!==void 0)return t;if(r.length===0)return 0;let a=r[0].value;for(let u=1;u<r.length;u+=1){const{value:h}=r[u];h>a&&(a=h)}return a},S=(r,t,a)=>a.color??t[r%t.length]??"cyan";function z({data:r,height:t=10,max:a,orientation:u="vertical",palette:h=j,showLabels:w=!0,showValues:g=!1,width:k}){const c=E(()=>D(r,a),[r,a]);if(u==="horizontal"){const i=k??24;return e(o,{flexDirection:"column",children:r.map((l,s)=>{const v=c===0?0:l.value/c,m=S(s,h,l);return B(o,{gap:1,children:[w&&l.label!==void 0?e(o,{flexShrink:0,minWidth:8,children:e(p,{dimColor:!0,wrap:"truncate-end",children:l.label})}):void 0,e(o,{flexGrow:1,flexShrink:1,children:e(C,{draw:f=>{f.clear(),f.drawHBar(0,0,i,v,{color:m})},height:1,version:[l.value,c,m,i],width:i})}),g?e(o,{flexShrink:0,children:e(p,{children:String(l.value)})}):void 0]},s)})})}const n=2,d=1,b=k??Math.max(r.length*(n+d),1);return B(o,{flexDirection:"column",children:[e(C,{draw:i=>{i.clear(),r.forEach((l,s)=>{const v=c===0?0:l.value/c,m=S(s,h,l),f=s*(n+d);for(let x=0;x<n;x+=1)i.drawVBar(f+x,0,t,v,{color:m})})},height:t,version:[r,c,h,n,d,t],width:b}),g?e(o,{children:r.map((i,l)=>e(o,{width:n+d,children:e(p,{dimColor:!0,children:String(i.value).padEnd(n+d," ")})},l))}):void 0,w?e(o,{children:r.map((i,l)=>e(o,{width:n+d,children:e(p,{dimColor:!0,wrap:"truncate-end",children:(i.label??"").padEnd(n+d," ")})},l))}):void 0]})}export{z as BarChart,z as default};
@@ -0,0 +1,81 @@
1
+ import { ReactElement } from 'react';
2
+ /**
3
+ * Available CFonts font faces.
4
+ */
5
+ type Font = "3d" | "block" | "chrome" | "grid" | "huge" | "pallet" | "shade" | "simple" | "simple3d" | "simpleBlock" | "slick" | "tiny";
6
+ /**
7
+ * Horizontal text alignment.
8
+ */
9
+ type Align = "center" | "left" | "right";
10
+ /**
11
+ * Terminal background color names supported by CFonts.
12
+ */
13
+ type BackgroundColor = "black" | "blue" | "cyan" | "green" | "magenta" | "red" | "transparent" | "white" | "yellow";
14
+ type Props = {
15
+ /**
16
+ * Horizontal alignment of the text.
17
+ * @default "left"
18
+ */
19
+ readonly align?: Align;
20
+ /**
21
+ * Background color.
22
+ * @default "transparent"
23
+ */
24
+ readonly backgroundColor?: BackgroundColor;
25
+ /**
26
+ * Colors to use for the font. Accepts color names, hex values, or `"system"` for terminal default.
27
+ * @default ["system"]
28
+ */
29
+ readonly colors?: string[];
30
+ /**
31
+ * Font face to use.
32
+ * @default "block"
33
+ * @see https://github.com/dominikwilkowski/cfonts#supported-fonts
34
+ */
35
+ readonly font?: Font;
36
+ /**
37
+ * Letter spacing.
38
+ * @default 1
39
+ */
40
+ readonly letterSpacing?: number;
41
+ /**
42
+ * Line height.
43
+ * @default 1
44
+ */
45
+ readonly lineHeight?: number;
46
+ /**
47
+ * Maximum character length per line. `0` means no limit.
48
+ * @default 0
49
+ */
50
+ readonly maxLength?: number;
51
+ /**
52
+ * Whether to add an empty line on top and at the bottom of the output.
53
+ * @default true
54
+ */
55
+ readonly space?: boolean;
56
+ /**
57
+ * The text to render in a large font.
58
+ */
59
+ readonly text: string;
60
+ };
61
+ /**
62
+ * Render large terminal text using CFonts.
63
+ * @example
64
+ * ```tsx
65
+ * import { BigText } from "@visulima/tui/ink";
66
+ *
67
+ * <BigText text="Hello" font="block" />
68
+ * ```
69
+ */
70
+ declare function BigText({
71
+ align,
72
+ backgroundColor,
73
+ colors,
74
+ font,
75
+ letterSpacing,
76
+ lineHeight,
77
+ maxLength,
78
+ space,
79
+ text
80
+ }: Props): ReactElement;
81
+ export { type Align, type BackgroundColor, BigText, type Align as BigTextAlign, type BackgroundColor as BigTextBackgroundColor, type Font as BigTextFont, type Props as BigTextProps, type Font, type Props, BigText as default };
@@ -0,0 +1 @@
1
+ import{jsx as s}from"react/jsx-runtime";import m from"cfonts";import{useMemo as p}from"react";import{Text as f}from"./text.js";const u={align:"left",backgroundColor:"transparent",colors:["system"],font:"block",letterSpacing:1,lineHeight:1,maxLength:0,space:!0};function b({align:t,backgroundColor:e,colors:o,font:r,letterSpacing:n,lineHeight:a,maxLength:i,space:c,text:g}){const l=p(()=>m.render(g,{...u,align:t,backgroundColor:e,colors:o,font:r,letterSpacing:n,lineHeight:a,maxLength:i,space:c}),[g,t,e,o,r,n,a,i,c]);return s(f,{children:l&&l.string})}export{b as BigText,b as default};
@@ -0,0 +1,36 @@
1
+ import { AnsiColors } from '@visulima/colorize';
2
+ import { ReactElement } from 'react';
3
+ import { LiteralUnion } from 'type-fest';
4
+ type Props = {
5
+ /**
6
+ * Glyph rendered as the blinking dot.
7
+ * @default "●" (filled bullet)
8
+ */
9
+ readonly character?: string;
10
+ /**
11
+ * Dot color.
12
+ * @default "red"
13
+ */
14
+ readonly color?: LiteralUnion<AnsiColors, string>;
15
+ /**
16
+ * Milliseconds per blink cycle. The dot is visible for half the cycle.
17
+ * @default 800
18
+ */
19
+ readonly interval?: number;
20
+ /**
21
+ * When false, the dot stays solid (no animation).
22
+ * @default true
23
+ */
24
+ readonly isActive?: boolean;
25
+ };
26
+ /**
27
+ * Steady or blinking indicator dot. Pair with `StatusLine` or next to a
28
+ * label to show a "live" / "recording" status.
29
+ */
30
+ declare function BlinkDot({
31
+ character,
32
+ color,
33
+ interval,
34
+ isActive
35
+ }: Props): ReactElement;
36
+ export { BlinkDot, type Props as BlinkDotProps, Props, BlinkDot as default };
@@ -0,0 +1 @@
1
+ import{jsx as c}from"react/jsx-runtime";import l from"../ink/hooks/use-animation.js";import{Text as m}from"./text.js";function h({character:t="●",color:o="red",interval:e=800,isActive:r=!0}){const{frame:i}=l({interval:Math.max(1,Math.floor(e/2)),isActive:r}),a=!r||i%2===0;return c(m,{color:o,children:a?t:" "})}export{h as BlinkDot,h as default};
@@ -0,0 +1,62 @@
1
+ import { ReactNode, PropsWithChildren, RefAttributes, ForwardRefExoticComponent } from 'react';
2
+ import { Except } from 'type-fest';
3
+ import { D as DOMElement } from "../packem_shared/dom.d-B4kXbaVY.js";
4
+ import { S as Styles } from "../packem_shared/styles.d-cMo36xQz.js";
5
+ import 'yoga-layout';
6
+ import "../packem_shared/cursor-helpers.d-BONB9tky.js";
7
+ import '@visulima/colorize';
8
+ import 'cli-boxes';
9
+ type Props = Except<Styles, "textWrap"> & {
10
+ /**
11
+ * Hide the element from screen readers.
12
+ */
13
+ readonly "aria-hidden"?: boolean;
14
+ /**
15
+ * A label for the element for screen readers.
16
+ */
17
+ readonly "aria-label"?: string;
18
+ /**
19
+ * The role of the element.
20
+ */
21
+ readonly "aria-role"?: "button" | "checkbox" | "combobox" | "list" | "listbox" | "listitem" | "menu" | "menuitem" | "option" | "progressbar" | "radio" | "radiogroup" | "tab" | "tablist" | "table" | "textbox" | "timer" | "toolbar";
22
+ /**
23
+ * The state of the element.
24
+ */
25
+ readonly "aria-state"?: {
26
+ readonly busy?: boolean;
27
+ readonly checked?: boolean;
28
+ readonly disabled?: boolean;
29
+ readonly expanded?: boolean;
30
+ readonly multiline?: boolean;
31
+ readonly multiselectable?: boolean;
32
+ readonly readonly?: boolean;
33
+ readonly required?: boolean;
34
+ readonly selected?: boolean;
35
+ };
36
+ /**
37
+ * Whether this element is opaque (prevents rendering of covered content beneath it).
38
+ * Useful for performance optimization with layered content.
39
+ */
40
+ readonly opaque?: boolean;
41
+ /**
42
+ * Whether to render a scrollbar for this scrollable element.
43
+ * Only applies when `overflow` is `'scroll'`. Defaults to `true`.
44
+ */
45
+ readonly scrollbar?: boolean;
46
+ /**
47
+ * Makes this element sticky within its scroll container.
48
+ * - `true` or `'top'`: pinned to the top during scroll
49
+ * - `'bottom'`: pinned to the bottom during scroll
50
+ */
51
+ readonly sticky?: boolean | "top" | "bottom";
52
+ /**
53
+ * Alternate content to render when this element is in its sticky (pinned) state.
54
+ * Only applies when `sticky` is set. When omitted, the normal children are used.
55
+ */
56
+ readonly stickyChildren?: ReactNode;
57
+ };
58
+ /**
59
+ * `&lt;Box>` is an essential Ink component to build your layout. It's like `&lt;div style="display: flex">` in the browser.
60
+ */
61
+ declare const Box: ForwardRefExoticComponent<PropsWithChildren<Props> & RefAttributes<DOMElement>>;
62
+ export { Box, type Props as BoxProps, Props, Box as default };
@@ -0,0 +1 @@
1
+ import{jsx as i,jsxs as k}from"react/jsx-runtime";import{forwardRef as w,useContext as m}from"react";import{a as y}from"../packem_shared/accessibility-context-DDyHTwmA.js";import{b as h}from"../packem_shared/background-context-rjOaWFki.js";const C={flexDirection:"row",flexGrow:0,flexShrink:1,flexWrap:"nowrap"},g=w(({"aria-hidden":d,"aria-label":l,"aria-role":t,"aria-state":a,backgroundColor:o,children:b,opaque:u,scrollbar:x,sticky:n,stickyChildren:s,...r},p)=>{const{isScreenReaderEnabled:e}=m(y),c=l?i("ink-text",{children:l}):void 0,v=t||a?{role:t,state:a}:void 0;if(e&&d)return null;const f=k("ink-box",{internal_accessibility:v,opaque:u,ref:p,scrollbar:x,sticky:n,style:{...C,...r,backgroundColor:o,overflowX:r.overflowX??r.overflow??"visible",overflowY:r.overflowY??r.overflow??"visible"},children:[e&&c?c:b,n&&s&&!e?i("ink-box",{internalStickyAlternate:!0,style:{position:"absolute",...r},children:s}):null]});return o?i(h.Provider,{value:o,children:f}):f});g.displayName="Box";export{g as Box,g as default};