@visulima/tui 1.0.0-alpha.2 → 1.0.0-alpha.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 (325) hide show
  1. package/CHANGELOG.md +53 -0
  2. package/LICENSE.md +63 -9
  3. package/README.md +3 -3
  4. package/dist/core/index.js +3 -3
  5. package/dist/ink/canvas/braille.d.ts +22 -0
  6. package/dist/ink/canvas/buffer.d.ts +67 -0
  7. package/dist/ink/components/accordion.d.ts +52 -0
  8. package/dist/ink/components/animate-presence.d.ts +15 -0
  9. package/dist/ink/components/approval-prompt.d.ts +55 -0
  10. package/dist/ink/components/area-chart.d.ts +54 -0
  11. package/dist/ink/components/bar-chart.d.ts +57 -0
  12. package/dist/ink/components/blink-dot.d.ts +30 -0
  13. package/dist/ink/components/breadcrumb.d.ts +28 -0
  14. package/dist/ink/components/button.d.ts +38 -0
  15. package/dist/ink/components/calendar.d.ts +60 -0
  16. package/dist/ink/components/canvas.d.ts +38 -0
  17. package/dist/ink/components/card.d.ts +46 -0
  18. package/dist/ink/components/chart-utils.d.ts +54 -0
  19. package/dist/ink/components/checkbox.d.ts +39 -0
  20. package/dist/ink/components/collapsible.d.ts +43 -0
  21. package/dist/ink/components/command-block.d.ts +38 -0
  22. package/dist/ink/components/command-palette.d.ts +72 -0
  23. package/dist/ink/components/confirm-dialog.d.ts +63 -0
  24. package/dist/ink/components/content-switcher.d.ts +49 -0
  25. package/dist/ink/components/date-picker.d.ts +53 -0
  26. package/dist/ink/components/definition-list.d.ts +37 -0
  27. package/dist/ink/components/divider.d.ts +40 -0
  28. package/dist/ink/components/file-picker/{FilePicker.d.ts → file-picker.d.ts} +2 -19
  29. package/dist/ink/components/file-picker/types.d.ts +1 -4
  30. package/dist/ink/components/file-picker/use-file-system.d.ts +1 -1
  31. package/dist/ink/components/form.d.ts +74 -0
  32. package/dist/ink/components/gauge.d.ts +75 -0
  33. package/dist/ink/components/heading.d.ts +27 -0
  34. package/dist/ink/components/heatmap.d.ts +51 -0
  35. package/dist/ink/components/{Help.d.ts → help.d.ts} +4 -9
  36. package/dist/ink/components/histogram.d.ts +52 -0
  37. package/dist/ink/components/kbd.d.ts +27 -0
  38. package/dist/ink/components/line-chart.d.ts +94 -0
  39. package/dist/ink/components/loading-indicator.d.ts +24 -0
  40. package/dist/ink/components/masked-input.d.ts +41 -0
  41. package/dist/ink/components/menu.d.ts +70 -0
  42. package/dist/ink/components/message-bubble.d.ts +35 -0
  43. package/dist/ink/components/model-badge.d.ts +32 -0
  44. package/dist/ink/components/operation-tree.d.ts +46 -0
  45. package/dist/ink/components/option-list.d.ts +41 -0
  46. package/dist/ink/components/{Paginator.d.ts → paginator.d.ts} +4 -20
  47. package/dist/ink/components/paragraph.d.ts +31 -0
  48. package/dist/ink/components/placeholder.d.ts +47 -0
  49. package/dist/ink/components/{ProgressBar.d.ts → progress-bar.d.ts} +1 -1
  50. package/dist/ink/components/radio-group.d.ts +62 -0
  51. package/dist/ink/components/scatter-plot.d.ts +23 -0
  52. package/dist/ink/components/scroll/{ControlledScrollView.d.ts → controlled-scroll-view.d.ts} +1 -1
  53. package/dist/ink/components/scroll/index.d.ts +10 -10
  54. package/dist/ink/components/scroll/{ScrollBarBox.d.ts → scroll-bar-box.d.ts} +1 -1
  55. package/dist/ink/components/scroll/{ScrollBar.d.ts → scroll-bar.d.ts} +1 -1
  56. package/dist/ink/components/scroll/{ScrollList.d.ts → scroll-list.d.ts} +1 -1
  57. package/dist/ink/components/scroll/{ScrollView.d.ts → scroll-view.d.ts} +1 -1
  58. package/dist/ink/components/search-input.d.ts +46 -0
  59. package/dist/ink/components/{SelectInput.d.ts → select-input.d.ts} +2 -2
  60. package/dist/ink/components/shimmer-text.d.ts +39 -0
  61. package/dist/ink/components/sparkline.d.ts +30 -0
  62. package/dist/ink/components/{Spinner.d.ts → spinner.d.ts} +2 -4
  63. package/dist/ink/components/{StaticRender.d.ts → static-render.d.ts} +14 -2
  64. package/dist/ink/components/status-line.d.ts +30 -0
  65. package/dist/ink/components/stepper.d.ts +42 -0
  66. package/dist/ink/components/{Stopwatch.d.ts → stopwatch.d.ts} +5 -7
  67. package/dist/ink/components/streaming-text.d.ts +38 -0
  68. package/dist/ink/components/switch.d.ts +46 -0
  69. package/dist/ink/components/{Tabs.d.ts → tabs.d.ts} +1 -1
  70. package/dist/ink/components/tag.d.ts +30 -0
  71. package/dist/ink/components/{Timer.d.ts → timer.d.ts} +5 -7
  72. package/dist/ink/components/toast.d.ts +41 -0
  73. package/dist/ink/components/tooltip.d.ts +36 -0
  74. package/dist/ink/components/transition.d.ts +53 -0
  75. package/dist/ink/components/tree-view/theme.d.ts +2 -2
  76. package/dist/ink/cursor-helpers.d.ts +0 -3
  77. package/dist/ink/dom.d.ts +9 -8
  78. package/dist/ink/hooks/use-animation.d.ts +0 -2
  79. package/dist/ink/hooks/use-app.d.ts +1 -1
  80. package/dist/ink/hooks/use-focus-manager.d.ts +1 -1
  81. package/dist/ink/hooks/use-form.d.ts +70 -0
  82. package/dist/ink/hooks/use-hotkey.d.ts +37 -0
  83. package/dist/ink/hooks/use-interval.d.ts +25 -0
  84. package/dist/ink/hooks/use-key-bindings.d.ts +4 -6
  85. package/dist/ink/hooks/use-key-chord.d.ts +26 -0
  86. package/dist/ink/hooks/use-linked-scroll.d.ts +1 -1
  87. package/dist/ink/hooks/use-persistent-state.d.ts +56 -0
  88. package/dist/ink/hooks/use-stderr.d.ts +1 -1
  89. package/dist/ink/hooks/use-stdin.d.ts +1 -1
  90. package/dist/ink/hooks/use-stdout.d.ts +1 -1
  91. package/dist/ink/hooks/use-stopwatch.d.ts +1 -3
  92. package/dist/ink/hooks/use-timeout.d.ts +24 -0
  93. package/dist/ink/hooks/use-timer.d.ts +0 -2
  94. package/dist/ink/index.d.ts +228 -92
  95. package/dist/ink/index.js +132 -77
  96. package/dist/ink/ink.d.ts +7 -6
  97. package/dist/ink/mouse/constants.d.ts +5 -50
  98. package/dist/ink/mouse/index.d.ts +2 -2
  99. package/dist/ink/output.d.ts +2 -1
  100. package/dist/ink/styled-line.d.ts +10 -0
  101. package/dist/ink/write-synchronized.d.ts +2 -2
  102. package/dist/packem_shared/Accordion-BG-yfIkV.js +80 -0
  103. package/dist/packem_shared/{Alert-Dr3s_LD9.js → Alert-BLcwIW8V.js} +2 -2
  104. package/dist/packem_shared/AnimatePresence-D8nEOr_B.js +98 -0
  105. package/dist/packem_shared/ApprovalPrompt-BXdPros1.js +104 -0
  106. package/dist/packem_shared/AreaChart-CmTcxLum.js +116 -0
  107. package/dist/packem_shared/{Badge-Dk7EGGM6.js → Badge-CUfbXwAB.js} +1 -1
  108. package/dist/packem_shared/BarChart-DWRae67P.js +87 -0
  109. package/dist/packem_shared/{BigText-CjMdY63X.js → BigText-CVq2X7B5.js} +1 -1
  110. package/dist/packem_shared/BlinkDot-CrbHMR3L.js +11 -0
  111. package/dist/packem_shared/{Box-D_pSJ9Jp.js → Box-W1w_NGin.js} +4 -6
  112. package/dist/packem_shared/Breadcrumb-CPdNxVYs.js +26 -0
  113. package/dist/packem_shared/Button-CBmTbJ_D.js +57 -0
  114. package/dist/packem_shared/Calendar-C2Qxt-LA.js +139 -0
  115. package/dist/packem_shared/Canvas-COttmLPX.js +246 -0
  116. package/dist/packem_shared/Card-D3tGkNCm.js +24 -0
  117. package/dist/packem_shared/Checkbox-Dpy_4Lws.js +49 -0
  118. package/dist/packem_shared/{Code-DjQvPBD9.js → Code-CwzzbsLx.js} +3 -3
  119. package/dist/packem_shared/Collapsible-BMDrXf5C.js +45 -0
  120. package/dist/packem_shared/CommandBlock-jdOGJPjY.js +80 -0
  121. package/dist/packem_shared/CommandPalette-B5IfUQwi.js +146 -0
  122. package/dist/packem_shared/ConfirmDialog-5XJv3Cc4.js +67 -0
  123. package/dist/packem_shared/{ConfirmInput-85Y4kRQW.js → ConfirmInput-CxUS0XAA.js} +3 -3
  124. package/dist/packem_shared/{ConsoleOverlay-DBNa4vtj.js → ConsoleOverlay-BvnCEgjG.js} +2 -2
  125. package/dist/packem_shared/ContentSwitcher-BHFpO5Za.js +81 -0
  126. package/dist/packem_shared/ControlledScrollView-C2wOOlJO.js +5 -0
  127. package/dist/packem_shared/DatePicker-CPejKoqS.js +73 -0
  128. package/dist/packem_shared/DefinitionList-BAwr0l5J.js +18 -0
  129. package/dist/packem_shared/{DevTools-aMPIsaHx.js → DevTools-BdxRSkhL.js} +6 -4
  130. package/dist/packem_shared/{Dialog-DsSNAVgC.js → Dialog-S9r7Izff.js} +5 -5
  131. package/dist/packem_shared/{DiffView-hqaw-2S6.js → DiffView-BR4T6-Sj.js} +4 -4
  132. package/dist/packem_shared/Divider-DocXIqNn.js +30 -0
  133. package/dist/packem_shared/{FilePicker-DNwFxRhq.js → FilePicker-BZ55oF_n.js} +39 -32
  134. package/dist/packem_shared/FormField-BSG16cnA.js +29 -0
  135. package/dist/packem_shared/{Fullscreen-DrElAE1o.js → Fullscreen-DO7voOq5.js} +2 -2
  136. package/dist/packem_shared/Gauge-CKXUXxft.js +122 -0
  137. package/dist/packem_shared/{Gradient-Ql5P0GUd.js → Gradient-Dg0NezWc.js} +3 -3
  138. package/dist/packem_shared/Heading-BnR7McmP.js +29 -0
  139. package/dist/packem_shared/Heatmap-_jqISOU0.js +79 -0
  140. package/dist/packem_shared/{Help-6wanGG38.js → Help-0yZ_IcQg.js} +4 -11
  141. package/dist/packem_shared/Histogram-cgAjY5AJ.js +92 -0
  142. package/dist/packem_shared/{InputParser-BKHpWfvN.js → InputParser-BlsfeY9J.js} +8 -6
  143. package/dist/packem_shared/KEY-STOdi-nc.js +74 -0
  144. package/dist/packem_shared/Kbd-BNDXQgey.js +19 -0
  145. package/dist/packem_shared/{LayoutNode-Cjnsodiy.js → LayoutNode-DAkKg9TE.js} +5 -7
  146. package/dist/packem_shared/LineChart-ef3HF816.js +7 -0
  147. package/dist/packem_shared/{Link-COcKYfGT.js → Link-DZ2Tiq1m.js} +2 -2
  148. package/dist/packem_shared/LoadingIndicator-DzbLGfyJ.js +13 -0
  149. package/dist/packem_shared/{Markdown-y1ISztof.js → Markdown-33bpCUoe.js} +8 -8
  150. package/dist/packem_shared/MaskedInput-Ctr6v2dO.js +119 -0
  151. package/dist/packem_shared/Menu-CeKxhEix.js +112 -0
  152. package/dist/packem_shared/MessageBubble-BMoU8L2Q.js +26 -0
  153. package/dist/packem_shared/ModelBadge-CNIxPs7v.js +40 -0
  154. package/dist/packem_shared/{MouseProvider-Y9TSSEGl.js → MouseProvider-CekPbXCh.js} +3 -3
  155. package/dist/packem_shared/{MultiSelect-ChoLUcDI.js → MultiSelect-yz7-w0Zv.js} +4 -4
  156. package/dist/packem_shared/{NAMED_COLORS-a4QBvb5r.js → NAMED_COLORS-DcI3erCu.js} +79 -41
  157. package/dist/packem_shared/OperationTree-Dudx5o1o.js +67 -0
  158. package/dist/packem_shared/OptionList-CTyqQaZ1.js +24 -0
  159. package/dist/packem_shared/{OrderedList-Cp7pXr6m.js → OrderedList-VsvSmHUC.js} +2 -2
  160. package/dist/packem_shared/{Paginator-D1AuD-kj.js → Paginator-DmGogvEI.js} +44 -44
  161. package/dist/packem_shared/Paragraph-CNNhfepo.js +9 -0
  162. package/dist/packem_shared/Placeholder-DkM69Q8Z.js +29 -0
  163. package/dist/packem_shared/{ProgressBar-DOfpVagn.js → ProgressBar-B7cS4uQm.js} +2 -2
  164. package/dist/packem_shared/RadioGroup-B4F9PUyL.js +108 -0
  165. package/dist/packem_shared/{ResizeObserverEntry-Br4seLeQ.js → ResizeObserverEntry-Vr8GZ74x.js} +4 -4
  166. package/dist/packem_shared/ScatterPlot-CWOg4G5h.js +63 -0
  167. package/dist/packem_shared/{ScrollBar-EWAs2Uc7.js → ScrollBar-DFeWH43I.js} +2 -2
  168. package/dist/packem_shared/{ScrollBarBox-DTNNlh7R.js → ScrollBarBox-C7VL6Izd.js} +2 -2
  169. package/dist/packem_shared/{ScrollList-DCeIFL8M.js → ScrollList-DRcr_RrN.js} +2 -2
  170. package/dist/packem_shared/{ScrollView-v3MCNIyX.js → ScrollView-C6rdlGwU.js} +4 -4
  171. package/dist/packem_shared/SearchInput-cB8zFhSg.js +32 -0
  172. package/dist/packem_shared/{SelectInput-BN2TMyxp.js → SelectInput-WzZSqp72.js} +6 -6
  173. package/dist/packem_shared/{SelectInputIndicator-DkRMoH_b.js → SelectInputIndicator-DKeN6v5Z.js} +2 -2
  174. package/dist/packem_shared/{SelectInputItem-BF9LQgKu.js → SelectInputItem-CxFL3spM.js} +1 -1
  175. package/dist/packem_shared/ShimmerText-B2VbPUSB.js +34 -0
  176. package/dist/packem_shared/{Slider-BWD7xZX6.js → Slider-BOrNTOQe.js} +3 -3
  177. package/dist/packem_shared/{Spacer-Bs4ER-HK.js → Spacer-DhmXyTb8.js} +1 -1
  178. package/dist/packem_shared/Sparkline-BSbjPrwK.js +44 -0
  179. package/dist/packem_shared/Spinner-BcO5BCAa.js +1942 -0
  180. package/dist/packem_shared/StaticRender-C3XWvJdC.js +69 -0
  181. package/dist/packem_shared/StatusLine-DQNUstN9.js +22 -0
  182. package/dist/packem_shared/{StatusMessage-BtSYxzwb.js → StatusMessage-BYTL6Pl-.js} +2 -2
  183. package/dist/packem_shared/Stepper-CmUPRK3z.js +60 -0
  184. package/dist/packem_shared/Stopwatch-zqLQAxXC.js +21 -0
  185. package/dist/packem_shared/StreamingText-BmuoJtGu.js +38 -0
  186. package/dist/packem_shared/Switch-DcPdy8nm.js +59 -0
  187. package/dist/packem_shared/{Table-D-rSVlzb.js → Table-Bgxo87Df.js} +11 -5
  188. package/dist/packem_shared/{Tabs-hki-KRnx.js → Tabs-DubuHdYV.js} +30 -19
  189. package/dist/packem_shared/Tag-CCqM7Ee9.js +35 -0
  190. package/dist/packem_shared/{Text-DvAUdZcK.js → Text-CtUwV89_.js} +2 -2
  191. package/dist/packem_shared/{TextInput-C79WEQ5U.js → TextInput-C9r7zT0U.js} +3 -3
  192. package/dist/packem_shared/{Textarea-Dj06R6Zd.js → Textarea-CGmgt-Nl.js} +5 -5
  193. package/dist/packem_shared/Timer-D7ZZ0_wz.js +20 -0
  194. package/dist/packem_shared/Toast-DXSCXFPY.js +37 -0
  195. package/dist/packem_shared/Tooltip-SvVjj-2k.js +32 -0
  196. package/dist/packem_shared/{Transform-BHxY_dAM.js → Transform-Cfyva2wd.js} +1 -1
  197. package/dist/packem_shared/Transition-CbNfKhaj.js +108 -0
  198. package/dist/packem_shared/{TreeView-C2062dtj.js → TreeView-DGlZeSsK.js} +4 -4
  199. package/dist/packem_shared/{TuiApp-DfxOnXqi.js → TuiApp-DtdgNRWa.js} +4 -2
  200. package/dist/packem_shared/{TuiContext-CqEjMyXd.js → TuiContext-lXmJFd-x.js} +6 -3
  201. package/dist/packem_shared/{UnorderedList-DhnadWjX.js → UnorderedList-D8RPaEAW.js} +2 -2
  202. package/dist/packem_shared/{ansi-parser-0BdVTKho.js → ansi-parser-BOP8fNdT.js} +6 -4
  203. package/dist/packem_shared/braille-BoEWoH2I.js +93 -0
  204. package/dist/packem_shared/{comparePoints-CGMDnd3_.js → comparePoints-CAAlhiMS.js} +2 -2
  205. package/dist/packem_shared/{ControlledScrollView-BlOaxcsN.js → controlled-scroll-view-DJXfdWMm.js} +2 -2
  206. package/dist/packem_shared/{createInlineLoop-BxMmcq9D.js → createInlineLoop-Dnfm1ZSJ.js} +19 -13
  207. package/dist/packem_shared/createMemoryStorage-esFJ61La.js +115 -0
  208. package/dist/packem_shared/createScreen-Dh0sZlQ0.js +38 -0
  209. package/dist/packem_shared/{dom-DvzhsAez.js → dom-CrbpQgat.js} +17 -14
  210. package/dist/packem_shared/{getPathToRoot-a1wbwxfL.js → getPathToRoot-BbvlppLC.js} +2 -2
  211. package/dist/packem_shared/{getScrollHeight-BubfU_df.js → getScrollHeight-Cz3CDQN2.js} +5 -5
  212. package/dist/packem_shared/line-chart-VGU2l7pu.js +139 -0
  213. package/dist/packem_shared/{measure-element-Reza_yfC.js → measure-element-Bc6PEaIe.js} +26 -17
  214. package/dist/packem_shared/{measure-text-DItZYotK.js → measure-text-BdOhbOeh.js} +74 -7
  215. package/dist/packem_shared/{measureElement-CTgFCmKd.js → measureElement-DTELRaij.js} +2 -2
  216. package/dist/packem_shared/parseSgrMouse-4hpBJBsW.js +1 -0
  217. package/dist/packem_shared/{processLayout-BQ9kXfd3.js → processLayout-B0Coz0Ua.js} +1 -1
  218. package/dist/packem_shared/{reconciler-gfmqURLy.js → reconciler-Dd7Z0A97.js} +21 -5
  219. package/dist/packem_shared/{reconciler-BXf6miSS.js → reconciler-mzMwSOft.js} +23 -13
  220. package/dist/packem_shared/{render-BAwdjfki.js → render-Bm9Oa1sG.js} +72 -79
  221. package/dist/packem_shared/{render-Bpjhf0lD.js → render-CjlKdg4m.js} +15 -11
  222. package/dist/packem_shared/{renderToString-ClIaXgrC.js → renderToString-CWYS1ZXE.js} +4 -4
  223. package/dist/packem_shared/{renderToString-Cfg55DRD.js → renderToString-DB3ILWFm.js} +4 -4
  224. package/dist/packem_shared/{renderTreeToBuffer-D3mo7M7m.js → renderTreeToBuffer-CDDTGyZn.js} +8 -5
  225. package/dist/packem_shared/{renderer-B3wROkeg.js → renderer-GE9OLNNM.js} +47 -41
  226. package/dist/packem_shared/{setEnableStyledLineCache-BpskngSJ.js → setEnableStyledLineCache-D5f4favX.js} +1 -1
  227. package/dist/packem_shared/{text-width-DhuarWcB.js → text-width-Db-AxMea.js} +2 -1
  228. package/dist/packem_shared/{token-to-elements-BRFl_rzw.js → token-to-elements-CK4s8MJd.js} +2 -2
  229. package/dist/packem_shared/{useAnimation-kj31sA-T.js → useAnimation-DV22qxiJ.js} +2 -2
  230. package/dist/packem_shared/{useApp-DPQlRzi5.js → useApp-Cbi788rV.js} +1 -1
  231. package/dist/packem_shared/{useBoxMetrics-rBjKc-g4.js → useBoxMetrics-_5icypir.js} +2 -2
  232. package/dist/packem_shared/{useClipboard-B_9-adw1.js → useClipboard-MNj6MNR-.js} +1 -1
  233. package/dist/packem_shared/{useCursor-BIJzc8k9.js → useCursor-DS6LjIgv.js} +1 -1
  234. package/dist/packem_shared/{useFocus-CNl5QHHf.js → useFocus-DLoGQJd9.js} +2 -2
  235. package/dist/packem_shared/{useFocusManager-BPYaUuKQ.js → useFocusManager-UeZWtnNc.js} +1 -1
  236. package/dist/packem_shared/useForm-sQENbEuv.js +88 -0
  237. package/dist/packem_shared/useHotkey-D9giUX3q.js +112 -0
  238. package/dist/packem_shared/{useInput-Cfp5zB2s.js → useInput-DKZbqMRc.js} +2 -2
  239. package/dist/packem_shared/useInterval-CSXM8c2I.js +32 -0
  240. package/dist/packem_shared/{useIsScreenReaderEnabled-CnGKCe0f.js → useIsScreenReaderEnabled-BeoVqo1R.js} +1 -1
  241. package/dist/packem_shared/{useKeyBindings-B78l1E1n.js → useKeyBindings-S4fSIEAk.js} +2 -2
  242. package/dist/packem_shared/useKeyChord-BmXGNuEO.js +114 -0
  243. package/dist/packem_shared/{usePaste-Ct8J4AGR.js → usePaste-png73gvT.js} +2 -2
  244. package/dist/packem_shared/{useScrollInput-D3CpBq_a.js → useScrollInput-DfzRGQFe.js} +2 -2
  245. package/dist/packem_shared/{useStderr-CAOVUh4E.js → useStderr-BSWerMZ7.js} +1 -1
  246. package/dist/packem_shared/{useStdin-X-O0kd-n.js → useStdin-Rf0zPzVA.js} +1 -1
  247. package/dist/packem_shared/{useStdout-DyF6DSH0.js → useStdout-B5yRcg9N.js} +1 -1
  248. package/dist/packem_shared/{useStopwatch-qC4Beai4.js → useStopwatch-C__Zu6hd.js} +2 -2
  249. package/dist/packem_shared/{useTerminalPalette-BaWO2c4Q.js → useTerminalPalette-CtFG2JTq.js} +2 -2
  250. package/dist/packem_shared/{useTextSelection-mXtxgsPK.js → useTextSelection-ChrYZXsn.js} +2 -2
  251. package/dist/packem_shared/useTimeout-DuCqgWPX.js +34 -0
  252. package/dist/packem_shared/{useTimer-CPQ7j827.js → useTimer-DnBtbhB5.js} +1 -1
  253. package/dist/packem_shared/{useTreeView-BT57P3Kx.js → useTreeView-mkN5Di7w.js} +1 -1
  254. package/dist/packem_shared/{useWindowSize-ugEmGZJm.js → useWindowSize-D3UU41mv.js} +1 -1
  255. package/dist/packem_shared/waitFor-Cv9M2jKA.js +39 -0
  256. package/dist/packem_shared/{wrapOrTruncateStyledLine-DN3Nogoc.js → wrapOrTruncateStyledLine-49Mne3t3.js} +1 -1
  257. package/dist/react/index.js +7 -7
  258. package/dist/react/layout.d.ts +0 -2
  259. package/dist/testing/index.d.ts +4 -4
  260. package/dist/testing/index.js +6 -114
  261. package/dist/testing/wait-for.d.ts +0 -1
  262. package/index.js +691 -539
  263. package/package.json +17 -17
  264. package/dist/ink/components/file-picker/index.d.ts +0 -3
  265. package/dist/ink/components/tree-view/index.d.ts +0 -11
  266. package/dist/packem_shared/ControlledScrollView-DfAhcufF.js +0 -5
  267. package/dist/packem_shared/Spinner-BuI-kN4p.js +0 -1799
  268. package/dist/packem_shared/StaticRender-tYwH6QXl.js +0 -33
  269. package/dist/packem_shared/Stopwatch-DjtTCyHn.js +0 -23
  270. package/dist/packem_shared/Timer-wi9zuh4n.js +0 -22
  271. package/dist/packem_shared/parseSgrMouse-BHVBPP9G.js +0 -1
  272. /package/dist/ink/components/{AccessibilityContext.d.ts → accessibility-context.d.ts} +0 -0
  273. /package/dist/ink/components/{Alert.d.ts → alert.d.ts} +0 -0
  274. /package/dist/ink/components/{AnimationContext.d.ts → animation-context.d.ts} +0 -0
  275. /package/dist/ink/components/{AppContext.d.ts → app-context.d.ts} +0 -0
  276. /package/dist/ink/components/{App.d.ts → app.d.ts} +0 -0
  277. /package/dist/ink/components/{BackgroundContext.d.ts → background-context.d.ts} +0 -0
  278. /package/dist/ink/components/{Badge.d.ts → badge.d.ts} +0 -0
  279. /package/dist/ink/components/{BigText.d.ts → big-text.d.ts} +0 -0
  280. /package/dist/ink/components/{Box.d.ts → box.d.ts} +0 -0
  281. /package/dist/ink/components/{Code.d.ts → code.d.ts} +0 -0
  282. /package/dist/ink/components/{ConfirmInput.d.ts → confirm-input.d.ts} +0 -0
  283. /package/dist/ink/components/{ConsoleOverlay.d.ts → console-overlay.d.ts} +0 -0
  284. /package/dist/ink/components/{CursorContext.d.ts → cursor-context.d.ts} +0 -0
  285. /package/dist/ink/components/{Cursor.d.ts → cursor.d.ts} +0 -0
  286. /package/dist/ink/components/{Dialog.d.ts → dialog.d.ts} +0 -0
  287. /package/dist/ink/components/{DiffView.d.ts → diff-view.d.ts} +0 -0
  288. /package/dist/ink/components/{ErrorBoundary.d.ts → error-boundary.d.ts} +0 -0
  289. /package/dist/ink/components/{ErrorOverview.d.ts → error-overview.d.ts} +0 -0
  290. /package/dist/ink/components/{FocusContext.d.ts → focus-context.d.ts} +0 -0
  291. /package/dist/ink/components/{Gradient.d.ts → gradient.d.ts} +0 -0
  292. /package/dist/ink/components/{Link.d.ts → link.d.ts} +0 -0
  293. /package/dist/ink/components/{Markdown.d.ts → markdown.d.ts} +0 -0
  294. /package/dist/ink/components/{MultiSelect.d.ts → multi-select.d.ts} +0 -0
  295. /package/dist/ink/components/{Newline.d.ts → newline.d.ts} +0 -0
  296. /package/dist/ink/components/{OrderedList.d.ts → ordered-list.d.ts} +0 -0
  297. /package/dist/ink/components/{SelectInputIndicator.d.ts → select-input-indicator.d.ts} +0 -0
  298. /package/dist/ink/components/{SelectInputItem.d.ts → select-input-item.d.ts} +0 -0
  299. /package/dist/ink/components/{Slider.d.ts → slider.d.ts} +0 -0
  300. /package/dist/ink/components/{Spacer.d.ts → spacer.d.ts} +0 -0
  301. /package/dist/ink/components/{Static.d.ts → static.d.ts} +0 -0
  302. /package/dist/ink/components/{StatusMessage.d.ts → status-message.d.ts} +0 -0
  303. /package/dist/ink/components/{StderrContext.d.ts → stderr-context.d.ts} +0 -0
  304. /package/dist/ink/components/{StdinContext.d.ts → stdin-context.d.ts} +0 -0
  305. /package/dist/ink/components/{StdoutContext.d.ts → stdout-context.d.ts} +0 -0
  306. /package/dist/ink/components/{Tab.d.ts → tab.d.ts} +0 -0
  307. /package/dist/ink/components/{Table.d.ts → table.d.ts} +0 -0
  308. /package/dist/ink/components/{TextInput.d.ts → text-input.d.ts} +0 -0
  309. /package/dist/ink/components/{Text.d.ts → text.d.ts} +0 -0
  310. /package/dist/ink/components/{Textarea.d.ts → textarea.d.ts} +0 -0
  311. /package/dist/ink/components/{Transform.d.ts → transform.d.ts} +0 -0
  312. /package/dist/ink/components/tree-view/{TreeViewNode.d.ts → tree-view-node.d.ts} +0 -0
  313. /package/dist/ink/components/tree-view/{TreeView.d.ts → tree-view.d.ts} +0 -0
  314. /package/dist/ink/components/{UnorderedList.d.ts → unordered-list.d.ts} +0 -0
  315. /package/dist/ink/mouse/{Fullscreen.d.ts → fullscreen.d.ts} +0 -0
  316. /package/dist/ink/mouse/{MouseProvider.d.ts → mouse-provider.d.ts} +0 -0
  317. /package/dist/packem_shared/{AccessibilityContext-BLelHhNU.js → accessibility-context-BLelHhNU.js} +0 -0
  318. /package/dist/packem_shared/{AnimationContext-BcJg8Jr6.js → animation-context-BcJg8Jr6.js} +0 -0
  319. /package/dist/packem_shared/{AppContext-CP0U6H7O.js → app-context-CP0U6H7O.js} +0 -0
  320. /package/dist/packem_shared/{BackgroundContext-BAUaxfOb.js → background-context-BAUaxfOb.js} +0 -0
  321. /package/dist/packem_shared/{CursorContext-JxRzlqAx.js → cursor-context-JxRzlqAx.js} +0 -0
  322. /package/dist/packem_shared/{FocusContext-CWkYtgcm.js → focus-context-CWkYtgcm.js} +0 -0
  323. /package/dist/packem_shared/{StderrContext-Bj4Mf7v7.js → stderr-context-Bj4Mf7v7.js} +0 -0
  324. /package/dist/packem_shared/{StdinContext-Bq_GNJ3z.js → stdin-context-Bq_GNJ3z.js} +0 -0
  325. /package/dist/packem_shared/{StdoutContext-CgjWeCdO.js → stdout-context-CgjWeCdO.js} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,3 +1,56 @@
1
+ ## @visulima/tui [1.0.0-alpha.3](https://github.com/visulima/visulima/compare/@visulima/tui@1.0.0-alpha.2...@visulima/tui@1.0.0-alpha.3) (2026-04-22)
2
+
3
+ ### Features
4
+
5
+ * Add comprehensive Ink UI component library with 40+ components ([#614](https://github.com/visulima/visulima/issues/614)) ([24b00a8](https://github.com/visulima/visulima/commit/24b00a8855b1ddb509b85c4a3e0f9f3d76323f76))
6
+ * **tui:** port ink upstream PR 115/119/123/125 ([2232485](https://github.com/visulima/visulima/commit/22324855fbcca38bc263d46194ccf30522ecc599))
7
+
8
+ ### Bug Fixes
9
+
10
+ * **ci:** always run native build job so artifacts are available ([51f3428](https://github.com/visulima/visulima/commit/51f34285bc04a0f6347609db240814862646c1cc))
11
+ * **ci:** publish native addons via local semantic-release plugin ([974beb2](https://github.com/visulima/visulima/commit/974beb2d021e7b2afc86b958bd2137be88d2f464))
12
+ * Remove JSR configuration generation script and generated jsr.json files ([#616](https://github.com/visulima/visulima/issues/616)) ([533744b](https://github.com/visulima/visulima/commit/533744b103b74896941db5b727173e617a27a63b))
13
+ * Replace resetTerminal with clearScreenAndHomeCursor to preserve scrollback ([#605](https://github.com/visulima/visulima/issues/605)) ([6a79e4d](https://github.com/visulima/visulima/commit/6a79e4d8350b90ec553ad5fbcf825d9ac30ece66))
14
+ * **terminal:** resolve eslint and formatting issues ([8f30389](https://github.com/visulima/visulima/commit/8f30389deb9ff81e7afce0aa064ef11fcb179f23))
15
+ * **tui:** declare static props on Form/Transition for isolatedDeclarations ([c30b9f1](https://github.com/visulima/visulima/commit/c30b9f148cf4ea75e54a9e358fea085a34f680e8))
16
+ * **tui:** fixed types ([abe7106](https://github.com/visulima/visulima/commit/abe7106aa1f55340d1b218f4b338709a0317c671))
17
+ * **tui:** floor text node width when calling wrapOrTruncateStyledChars ([1d06086](https://github.com/visulima/visulima/commit/1d06086404c54b46baec8f688fc1e39228a0ab75))
18
+ * **tui:** inline component and hook barrel exports in ink entry ([1cf8dd2](https://github.com/visulima/visulima/commit/1cf8dd25c91a2001268fb9d964d95df649bf7832))
19
+ * **tui:** narrow ANSI_CODES type and cast yoga Node remove call ([87b2c67](https://github.com/visulima/visulima/commit/87b2c6787d44ae630a0eece56b3b2df395a7c63b))
20
+ * **tui:** rename components to kebab-case, fix broken test assertions, protect fixtures from auto-format ([caa2e86](https://github.com/visulima/visulima/commit/caa2e86f7500467e56c89b3671d0e33b6b5d0173))
21
+ * **tui:** type histogram bucket counts as number[] ([883eca4](https://github.com/visulima/visulima/commit/883eca42cf74df3db8409a5f921d75371ba79070))
22
+
23
+ ### Miscellaneous Chores
24
+
25
+ * bump engines.node to ^22.14.0 || >=24.10.0 ([c3d0931](https://github.com/visulima/visulima/commit/c3d0931d1504e4f21ebf50ea680cfa7ce4ba15ce))
26
+ * fixed jsr.json ([5d85e51](https://github.com/visulima/visulima/commit/5d85e5179de38e284ec433b14d77c71a1619c8d6))
27
+ * remove unused deprecated aliases ([#612](https://github.com/visulima/visulima/issues/612)) ([24ee546](https://github.com/visulima/visulima/commit/24ee546bcb2c17b8915622e4878797c00aa1d813))
28
+ * **tui:** apply formatter and lint fixes ([e70da36](https://github.com/visulima/visulima/commit/e70da3672d1c06cbbe2a6294c86535d770dc04bf))
29
+ * **tui:** apply pending changes ([f432dc8](https://github.com/visulima/visulima/commit/f432dc8aae2c4f26b43132d956067b770d4a9548))
30
+ * **tui:** apply pending lint and source updates ([7fe85fe](https://github.com/visulima/visulima/commit/7fe85fe0261d2d792762971c56a98fe1c03040a6))
31
+ * **tui:** enforce curly braces and apply lint fixes ([ffab48f](https://github.com/visulima/visulima/commit/ffab48f89720a8e906d863bb3539c86bee9783a5))
32
+
33
+ ### Code Refactoring
34
+
35
+ * replace inline import() types with top-level imports ([4569a4c](https://github.com/visulima/visulima/commit/4569a4ca04723da069f985855dcfab292f7347e1))
36
+ * **tui:** switch spinner to @visulima/spinner ([0c2e2f4](https://github.com/visulima/visulima/commit/0c2e2f498e8c2f4bee46b257dfc1f61d5924a012))
37
+
38
+ ### Tests
39
+
40
+ * **secret-scanner:** add per-file JIT warmup and extended timeouts ([3255e63](https://github.com/visulima/visulima/commit/3255e636cb554e3bfb40e8c4cafd6108034f9acf))
41
+ * **tui, dev-toolbar:** fix expect.assertions counts on looped assertions ([898bc59](https://github.com/visulima/visulima/commit/898bc59ef217f7c8ee2aa7fdf7da3d355c028b13))
42
+ * **tui:** fix 15 broken ink component tests ([c1e25a0](https://github.com/visulima/visulima/commit/c1e25a00d0fbd4532df0802a07452dc803e93f79))
43
+ * **tui:** move expect.assertions past platform-guard early returns ([f3ce2e3](https://github.com/visulima/visulima/commit/f3ce2e3eecac57192f4b91582ca990e4256b4538))
44
+ * **tui:** move remaining expect.assertions past platform guards ([c227075](https://github.com/visulima/visulima/commit/c2270756cfdc87fa083ea1f8f90d6ece76951540))
45
+ * **tui:** stabilize flaky ink input and chart tests ([183be7b](https://github.com/visulima/visulima/commit/183be7b2a1cfcdf4fa6f57f6ee02b5b8d62b29a4))
46
+ * **tui:** stabilize flaky ink input tests and remove native guard ([445abd8](https://github.com/visulima/visulima/commit/445abd85a0b44707f28122e8b1921564af728f33))
47
+
48
+
49
+ ### Dependencies
50
+
51
+ * **@visulima/boxen:** upgraded to 3.0.0-alpha.10
52
+ * **@visulima/spinner:** upgraded to 1.0.0-alpha.1
53
+
1
54
  ## @visulima/tui [1.0.0-alpha.2](https://github.com/visulima/visulima/compare/@visulima/tui@1.0.0-alpha.1...@visulima/tui@1.0.0-alpha.2) (2026-04-09)
2
55
 
3
56
  ### Features
package/LICENSE.md CHANGED
@@ -71,27 +71,81 @@ The published @visulima/tui artifact additionally contains code with the followi
71
71
  ISC, MIT
72
72
 
73
73
  # Bundled dependencies:
74
- ## cli-boxes
74
+ ## @visulima/spinner
75
75
  License: MIT
76
- By: Sindre Sorhus
77
- Repository: sindresorhus/cli-boxes
76
+ By: Daniel Bannert
77
+ Repository: git+https://github.com/visulima/visulima.git
78
78
 
79
79
  > MIT License
80
80
  >
81
- > Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
81
+ > Copyright (c) 2026 visulima
82
82
  >
83
- > Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
83
+ > Permission is hereby granted, free of charge, to any person obtaining a copy
84
+ > of this software and associated documentation files (the "Software"), to deal
85
+ > in the Software without restriction, including without limitation the rights
86
+ > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
87
+ > copies of the Software, and to permit persons to whom the Software is
88
+ > furnished to do so, subject to the following conditions:
84
89
  >
85
- > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
90
+ > The above copyright notice and this permission notice shall be included in all
91
+ > copies or substantial portions of the Software.
86
92
  >
87
- > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
93
+ > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
94
+ > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
95
+ > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
96
+ > AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
97
+ > LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
98
+ > OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
99
+ > SOFTWARE.
100
+ >
101
+ > ---
102
+ >
103
+ > ## Acknowledgments
104
+ >
105
+ > This project includes spinner animations inspired by and adapted from the following open-source libraries, all licensed under the MIT License:
106
+ >
107
+ > ### Rattles
108
+ >
109
+ > - **Source:** https://github.com/vyfor/rattles
110
+ > - **Author:** vyfor
111
+ > - **License:** MIT
112
+ > - **Description:** A minimal terminal spinner library for Rust that inspired additional braille-based spinner animations.
113
+ >
114
+ > ### unicode-animations
115
+ >
116
+ > - **Source:** https://github.com/gunnargray-dev/unicode-animations
117
+ > - **Author:** gunnar gray
118
+ > - **License:** MIT
119
+ > - **Description:** Provides Unicode-based braille animations that were adapted for additional visual effects.
120
+ >
121
+ >
122
+ >
123
+ > # Licenses of bundled dependencies
124
+ > The published @visulima/spinner artifact additionally contains code with the following licenses:
125
+ > MIT
126
+ >
127
+ > # Bundled dependencies:
128
+ > ## cli-spinners
129
+ > License: MIT
130
+ > By: Sindre Sorhus
131
+ > Repository: sindresorhus/cli-spinners
132
+ >
133
+ > > MIT License
134
+ > >
135
+ > > Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
136
+ > >
137
+ > > Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
138
+ > >
139
+ > > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
140
+ > >
141
+ > > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
88
142
 
89
143
  ---------------------------------------
90
144
 
91
- ## cli-spinners
145
+ ## cli-boxes
92
146
  License: MIT
93
147
  By: Sindre Sorhus
94
- Repository: sindresorhus/cli-spinners
148
+ Repository: sindresorhus/cli-boxes
95
149
 
96
150
  > MIT License
97
151
  >
package/README.md CHANGED
@@ -97,9 +97,9 @@ const Spinner = () => {
97
97
  };
98
98
  ```
99
99
 
100
- | Option | Type | Default | Description |
101
- | ---------- | --------- | ------- | -------------------------------------------------------------------------------------------------------------------------- |
102
- | `interval` | `number` | `100` | Time between ticks in milliseconds. |
100
+ | Option | Type | Default | Description |
101
+ | ---------- | --------- | ------- | --------------------------------------------------------------------------------------------------------------------------- |
102
+ | `interval` | `number` | `100` | Time between ticks in milliseconds. |
103
103
  | `isActive` | `boolean` | `true` | Whether the animation is running. When set to `false`, the animation stops. When toggled back to `true`, values reset to 0. |
104
104
 
105
105
  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.
@@ -1,5 +1,5 @@
1
- export { TuiApp } from '../packem_shared/TuiApp-DfxOnXqi.js';
1
+ export { TuiApp } from '../packem_shared/TuiApp-DtdgNRWa.js';
2
2
  export { Cell, StyleMasks } from '../packem_shared/Cell-DCg1kJY-.js';
3
- export { createInlineLoop } from '../packem_shared/createInlineLoop-BxMmcq9D.js';
4
- export { InputParser } from '../packem_shared/InputParser-BKHpWfvN.js';
3
+ export { createInlineLoop } from '../packem_shared/createInlineLoop-Dnfm1ZSJ.js';
4
+ export { InputParser } from '../packem_shared/InputParser-BlsfeY9J.js';
5
5
  export { Renderer, TerminalGuard, terminalSize } from '../packem_shared/Renderer-zZ5O3vxc.js';
@@ -0,0 +1,22 @@
1
+ import type { CanvasContext, CellStyle } from "./buffer.d.ts";
2
+ export type BrailleGrid = {
3
+ readonly cellHeight: number;
4
+ readonly cellWidth: number;
5
+ readonly clear: () => void;
6
+ /**
7
+ * Flush the accumulated pixels into the canvas, one braille character per
8
+ * dirtied cell. Pass a color via `style` to apply it uniformly (mixing
9
+ * colors across overlapping series requires a separate grid per series).
10
+ */
11
+ readonly flush: (context: CanvasContext, style?: CellStyle) => void;
12
+ readonly pixelHeight: number;
13
+ readonly pixelWidth: number;
14
+ readonly plotLine: (x0: number, y0: number, x1: number, y1: number) => void;
15
+ readonly plotPoint: (x: number, y: number) => void;
16
+ };
17
+ /**
18
+ * Accumulator for braille-rendered charts. Tracks which sub-pixels are lit
19
+ * and emits a braille character per dirtied cell on `flush`. Designed to be
20
+ * allocated per chart render and thrown away.
21
+ */
22
+ export declare const createBrailleGrid: (cellWidth: number, cellHeight: number) => BrailleGrid;
@@ -0,0 +1,67 @@
1
+ export type CanvasColor = number | string | undefined;
2
+ export type CellStyle = {
3
+ readonly background?: CanvasColor;
4
+ readonly bold?: boolean;
5
+ readonly color?: CanvasColor;
6
+ readonly dim?: boolean;
7
+ };
8
+ /**
9
+ * Reverse of the encoder. 0 → undefined; any other id returns the original
10
+ * CanvasColor (preserving number vs string distinction).
11
+ */
12
+ type ColorDecoder = (id: number) => CanvasColor;
13
+ export type CanvasContext = {
14
+ /**
15
+ * Clear every cell back to space + default style.
16
+ */
17
+ readonly clear: () => void;
18
+ /**
19
+ * Draw a horizontal bar using fractional block glyphs (▏▎▍▌▋▊▉█).
20
+ * `fillRatio` in [0, 1] determines the filled portion.
21
+ */
22
+ readonly drawHBar: (x: number, y: number, w: number, fillRatio: number, style?: CellStyle) => void;
23
+ /**
24
+ * Draw a filled rectangle using a single character.
25
+ */
26
+ readonly drawRect: (x: number, y: number, w: number, h: number, char: number | string, style?: CellStyle) => void;
27
+ /**
28
+ * Render a string left-to-right starting at (x, y). Non-printable or
29
+ * multi-byte codepoints are preserved but advance the cursor by 1 cell.
30
+ */
31
+ readonly drawText: (x: number, y: number, text: string, style?: CellStyle) => void;
32
+ /**
33
+ * Draw a vertical bar using fractional block glyphs (▁▂▃▄▅▆▇█).
34
+ * `fillRatio` in [0, 1] determines the filled portion.
35
+ */
36
+ readonly drawVBar: (x: number, y: number, h: number, fillRatio: number, style?: CellStyle) => void;
37
+ readonly height: number;
38
+ /**
39
+ * Set a single cell at (x, y). Out-of-bounds writes are silently ignored.
40
+ */
41
+ readonly setCell: (x: number, y: number, char: number | string, style?: CellStyle) => void;
42
+ readonly width: number;
43
+ };
44
+ export type CanvasBuffer = {
45
+ readonly bg: Int32Array;
46
+ readonly chars: Uint32Array;
47
+ readonly colorDecoder: ColorDecoder;
48
+ readonly context: CanvasContext;
49
+ readonly dirty: Uint8Array;
50
+ readonly fg: Int32Array;
51
+ readonly height: number;
52
+ readonly styles: Uint32Array;
53
+ readonly width: number;
54
+ };
55
+ /**
56
+ * Allocate a canvas buffer and return a context that mutates it in place.
57
+ * The buffer is typed-array backed; all mutations O(1) per cell with no
58
+ * object allocation.
59
+ */
60
+ export declare const createCanvasBuffer: (width: number, height: number) => CanvasBuffer;
61
+ /**
62
+ * Serialize a buffer row into an ANSI string, coalescing adjacent cells that
63
+ * share the same style. Call directly when you need to re-emit rows; row
64
+ * caching lives one level up in Canvas.tsx.
65
+ */
66
+ export declare const serializeRow: (buffer: CanvasBuffer, row: number) => string;
67
+ export {};
@@ -0,0 +1,52 @@
1
+ import type { AnsiColors } from "@visulima/colorize";
2
+ import type { ReactElement, ReactNode } from "react";
3
+ import type { LiteralUnion } from "type-fest";
4
+ export 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
+ export 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
+ * @param props See {@link Props}.
50
+ * @returns A `ReactElement` rendering the accordion column.
51
+ */
52
+ export default function Accordion({ accentColor, allowMultiple, autoFocus, defaultExpanded, isDisabled, items, }: Props): ReactElement;
@@ -0,0 +1,15 @@
1
+ import type { ReactElement, ReactNode } from "react";
2
+ export 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
+ export default function AnimatePresence({ children }: Props): ReactElement;
@@ -0,0 +1,55 @@
1
+ import type { AnsiColors } from "@visulima/colorize";
2
+ import type { ReactElement, ReactNode } from "react";
3
+ import type { LiteralUnion } from "type-fest";
4
+ export type ApprovalRisk = "high" | "low" | "medium";
5
+ export type ApprovalDecision = "allow-always" | "allow-once" | "deny";
6
+ export 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
+ * @param props See {@link Props}.
52
+ * @returns A bordered `ReactElement` containing the risk banner, params
53
+ * preview, optional body, and the prompt line.
54
+ */
55
+ export default function ApprovalPrompt({ accentColor, autoFocus, children, description, isDisabled, onDecision, params, risk, tool, }: Props): ReactElement;
@@ -0,0 +1,54 @@
1
+ import type { AnsiColors } from "@visulima/colorize";
2
+ import type { ReactElement } from "react";
3
+ import type { LiteralUnion } from "type-fest";
4
+ import type { LineSeries } from "./line-chart.d.ts";
5
+ export type Props = {
6
+ /**
7
+ * Axis label color.
8
+ * @default "gray"
9
+ */
10
+ readonly axisColor?: LiteralUnion<AnsiColors, string>;
11
+ /**
12
+ * Density of the shaded fill below each line.
13
+ * - `light` → `░`
14
+ * - `medium` → `▒` (default)
15
+ * - `heavy` → `▓`
16
+ */
17
+ readonly fillDensity?: "heavy" | "light" | "medium";
18
+ /**
19
+ * Chart body height in character rows.
20
+ * @default 10
21
+ */
22
+ readonly height?: number;
23
+ /**
24
+ * Upper bound for the y-axis.
25
+ */
26
+ readonly maxY?: number;
27
+ /**
28
+ * Lower bound for the y-axis.
29
+ */
30
+ readonly minY?: number;
31
+ /**
32
+ * Fallback palette.
33
+ */
34
+ readonly palette?: ReadonlyArray<LiteralUnion<AnsiColors, string>>;
35
+ /**
36
+ * Series to plot.
37
+ */
38
+ readonly series: ReadonlyArray<LineSeries>;
39
+ /**
40
+ * Render the legend below the plot.
41
+ * @default true
42
+ */
43
+ readonly showLegend?: boolean;
44
+ /**
45
+ * Chart body width in character columns.
46
+ * @default 40
47
+ */
48
+ readonly width?: number;
49
+ };
50
+ /**
51
+ * Area chart: line chart with the area between the line and the baseline
52
+ * filled with shaded blocks.
53
+ */
54
+ export default function AreaChart({ axisColor, fillDensity, height, maxY, minY, palette, series, showLegend, width, }: Props): ReactElement;
@@ -0,0 +1,57 @@
1
+ import type { AnsiColors } from "@visulima/colorize";
2
+ import type { ReactElement } from "react";
3
+ import type { LiteralUnion } from "type-fest";
4
+ export 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
+ export 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
+ export default function BarChart({ data, height, max: maxOverride, orientation, palette, showLabels, showValues, width: widthOverride, }: Props): ReactElement;
@@ -0,0 +1,30 @@
1
+ import type { AnsiColors } from "@visulima/colorize";
2
+ import type { ReactElement } from "react";
3
+ import type { LiteralUnion } from "type-fest";
4
+ export type Props = {
5
+ /**
6
+ * Dot character.
7
+ * @default "●"
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
+ export default function BlinkDot({ character, color, interval, isActive }: Props): ReactElement;
@@ -0,0 +1,28 @@
1
+ import type { AnsiColors } from "@visulima/colorize";
2
+ import type { ReactElement, ReactNode } from "react";
3
+ import type { LiteralUnion } from "type-fest";
4
+ export type BreadcrumbItem = {
5
+ readonly icon?: ReactNode;
6
+ readonly key?: string;
7
+ readonly label: string;
8
+ };
9
+ export type Props = {
10
+ /**
11
+ * Color applied to the trailing (current) item.
12
+ * @default "blue"
13
+ */
14
+ readonly currentColor?: LiteralUnion<AnsiColors, string>;
15
+ /**
16
+ * Items to display from root to current page.
17
+ */
18
+ readonly items: ReadonlyArray<BreadcrumbItem>;
19
+ /**
20
+ * Separator between items.
21
+ * @default "›"
22
+ */
23
+ readonly separator?: string;
24
+ };
25
+ /**
26
+ * Render a breadcrumb trail (last item is highlighted).
27
+ */
28
+ export default function Breadcrumb({ currentColor, items, separator }: Props): ReactElement;
@@ -0,0 +1,38 @@
1
+ import type { AnsiColors } from "@visulima/colorize";
2
+ import type { ReactElement, ReactNode } from "react";
3
+ import type { LiteralUnion } from "type-fest";
4
+ export type ButtonVariant = "ghost" | "outline" | "primary" | "secondary";
5
+ export type Props = {
6
+ /**
7
+ * Accent color used when the button is focused.
8
+ * @default "blue"
9
+ */
10
+ readonly accentColor?: LiteralUnion<AnsiColors, string>;
11
+ /**
12
+ * Focus this button when mounted if nothing else is focused.
13
+ */
14
+ readonly autoFocus?: boolean;
15
+ /**
16
+ * Button label.
17
+ */
18
+ readonly children: ReactNode;
19
+ /**
20
+ * When true, the button ignores input and is rendered dim.
21
+ */
22
+ readonly isDisabled?: boolean;
23
+ /**
24
+ * Called when the user presses Enter or Space while the button has focus.
25
+ */
26
+ readonly onPress?: () => void;
27
+ /**
28
+ * Visual style.
29
+ * @default "primary"
30
+ */
31
+ readonly variant?: ButtonVariant;
32
+ };
33
+ /**
34
+ * Focusable button. Triggers `onPress` on Enter / Space.
35
+ * @param props See {@link Props}.
36
+ * @returns A `ReactElement` rendering the button (bordered or ghost variant).
37
+ */
38
+ export default function Button({ accentColor, autoFocus, children, isDisabled, onPress, variant }: Props): ReactElement;
@@ -0,0 +1,60 @@
1
+ import type { AnsiColors } from "@visulima/colorize";
2
+ import type { ReactElement } from "react";
3
+ import type { LiteralUnion } from "type-fest";
4
+ export type Props = {
5
+ /**
6
+ * Accent color for today / the focused cell.
7
+ * @default "blue"
8
+ */
9
+ readonly accentColor?: LiteralUnion<AnsiColors, string>;
10
+ /**
11
+ * Auto-focus the grid on mount.
12
+ */
13
+ readonly autoFocus?: boolean;
14
+ /**
15
+ * Initial focused day when uncontrolled. Defaults to `value` or today.
16
+ */
17
+ readonly defaultValue?: Date;
18
+ /**
19
+ * First day of the week: 0 = Sunday, 1 = Monday.
20
+ * @default 1
21
+ */
22
+ readonly firstDayOfWeek?: 0 | 1;
23
+ /**
24
+ * When true, disable input and render the grid dim.
25
+ */
26
+ readonly isDisabled?: boolean;
27
+ /**
28
+ * Upper bound; days after `maxDate` cannot be selected.
29
+ */
30
+ readonly maxDate?: Date;
31
+ /**
32
+ * Lower bound; days before `minDate` cannot be selected.
33
+ */
34
+ readonly minDate?: Date;
35
+ /**
36
+ * Called whenever the user navigates or selects a day.
37
+ */
38
+ readonly onChange?: (date: Date) => void;
39
+ /**
40
+ * Called when the user presses Enter.
41
+ */
42
+ readonly onSubmit?: (date: Date) => void;
43
+ /**
44
+ * Color used to mark the currently selected day.
45
+ * @default "green"
46
+ */
47
+ readonly selectedColor?: LiteralUnion<AnsiColors, string>;
48
+ /**
49
+ * Controlled selected date.
50
+ */
51
+ readonly value?: Date;
52
+ };
53
+ /**
54
+ * Month-grid date picker. Arrow keys move focus by one day, page up/down move
55
+ * by month. Enter submits; Space or Enter selects.
56
+ * @param props See {@link Props}.
57
+ * @returns A bordered `ReactElement` containing the month header, weekday
58
+ * labels, and the day grid.
59
+ */
60
+ export default function Calendar({ accentColor, autoFocus, defaultValue, firstDayOfWeek, isDisabled, maxDate, minDate, onChange, onSubmit, selectedColor, value, }: Props): ReactElement;