@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
@@ -0,0 +1,46 @@
1
+ import type { ReactElement, ReactNode } from "react";
2
+ export type OperationStatus = "completed" | "error" | "pending" | "running" | "skipped";
3
+ export type OperationNode = {
4
+ /**
5
+ * Nested child operations rendered beneath this node.
6
+ */
7
+ readonly children?: ReadonlyArray<OperationNode>;
8
+ /**
9
+ * Optional supplementary info rendered on the next line (dimmed).
10
+ */
11
+ readonly details?: ReactNode;
12
+ /**
13
+ * Wall-clock duration in ms, displayed right-aligned.
14
+ */
15
+ readonly durationMs?: number;
16
+ /**
17
+ * Unique identifier within the tree.
18
+ */
19
+ readonly id: string;
20
+ /**
21
+ * Human-readable label.
22
+ */
23
+ readonly label: ReactNode;
24
+ /**
25
+ * Lifecycle state controlling icon + color.
26
+ */
27
+ readonly status: OperationStatus;
28
+ };
29
+ export type Props = {
30
+ /**
31
+ * Tree of operations. Each node can have its own children.
32
+ */
33
+ readonly nodes: ReadonlyArray<OperationNode>;
34
+ /**
35
+ * When true, runs the running-spinner animation.
36
+ * @default true
37
+ */
38
+ readonly showSpinner?: boolean;
39
+ };
40
+ /**
41
+ * Renders a tree of operations with per-node status. Perfect for agent
42
+ * progress panels (reading → editing → running tests → done).
43
+ * @param props See {@link Props}.
44
+ * @returns A `ReactElement` rendering the nested tree of operation rows.
45
+ */
46
+ export default function OperationTree({ nodes, showSpinner }: Props): ReactElement;
@@ -0,0 +1,41 @@
1
+ import type { AnsiColors } from "@visulima/colorize";
2
+ import type { ReactElement, ReactNode } from "react";
3
+ import type { LiteralUnion } from "type-fest";
4
+ export type OptionListEntry = {
5
+ readonly description?: string;
6
+ readonly icon?: ReactNode;
7
+ readonly id: string;
8
+ readonly label: ReactNode;
9
+ readonly trailing?: ReactNode;
10
+ };
11
+ export type Props = {
12
+ /**
13
+ * Highlight color for the row marked as current.
14
+ */
15
+ readonly accentColor?: LiteralUnion<AnsiColors, string>;
16
+ /**
17
+ * Render the list with a border.
18
+ */
19
+ readonly bordered?: boolean;
20
+ /**
21
+ * Id of the row to highlight. No visual change if omitted.
22
+ */
23
+ readonly currentId?: string;
24
+ /**
25
+ * Icon width in characters for column alignment.
26
+ * @default 2
27
+ */
28
+ readonly iconColumnWidth?: number;
29
+ /**
30
+ * Entries to render.
31
+ */
32
+ readonly options: ReadonlyArray<OptionListEntry>;
33
+ };
34
+ /**
35
+ * Read-only presentational option list. Like `SelectInput` but without focus,
36
+ * input handling, or scrolling — just a styled list of rows. Useful inside
37
+ * modals, sidebars, or summary panels.
38
+ * @param props See {@link Props}.
39
+ * @returns A `ReactElement` rendering the list; bordered when requested.
40
+ */
41
+ export default function OptionList({ accentColor, bordered, currentId, iconColumnWidth, options }: Props): ReactElement;
@@ -14,29 +14,26 @@ export type Props<T> = {
14
14
  /**
15
15
  * Render-prop that receives the current page items and page metadata.
16
16
  */
17
- readonly children: (pageItems: readonly T[], meta: PageMeta) => ReactNode;
17
+ readonly children: (pageItems: ReadonlyArray<T>, meta: PageMeta) => ReactNode;
18
18
  /**
19
19
  * Uncontrolled initial page (0-indexed).
20
- *
21
20
  * @default 0
22
21
  */
23
22
  readonly defaultPage?: number;
24
23
  /**
25
24
  * Color for the active page indicator.
26
- *
27
25
  * @default "cyan"
28
26
  */
29
27
  readonly indicatorColor?: string;
30
28
  /**
31
29
  * Whether keyboard navigation is active.
32
- *
33
30
  * @default true
34
31
  */
35
32
  readonly isFocused?: boolean;
36
33
  /**
37
34
  * The full list of items to paginate.
38
35
  */
39
- readonly items: readonly T[];
36
+ readonly items: ReadonlyArray<T>;
40
37
  /**
41
38
  * Called when the page changes.
42
39
  */
@@ -54,22 +51,9 @@ export type Props<T> = {
54
51
  * - `"dots"`: `● ○ ○ ○`
55
52
  * - `"numeric"`: `‹ 1 / 4 ›`
56
53
  * - `"fraction"`: `1/4`
57
- *
58
54
  * @default "dots"
59
55
  */
60
56
  readonly style?: "dots" | "fraction" | "numeric";
61
57
  };
62
- /**
63
- * Paginator component with render-prop children and a page indicator.
64
- *
65
- * ```tsx
66
- * <Paginator items={allItems} pageSize={5}>
67
- * {(pageItems, meta) => (
68
- * <Box flexDirection="column">
69
- * {pageItems.map((item, i) => <Text key={i}>{item}</Text>)}
70
- * </Box>
71
- * )}
72
- * </Paginator>
73
- * ```
74
- */
75
- export default function Paginator<T>({ children, defaultPage, indicatorColor, isFocused, items, onChange, page: controlledPage, pageSize, style, }: Props<T>): ReactElement;
58
+ declare const Paginator: <T>({ children, defaultPage, indicatorColor, isFocused, items, onChange, page: controlledPage, pageSize, style, }: Props<T>) => ReactElement;
59
+ export default Paginator;
@@ -0,0 +1,31 @@
1
+ import type { AnsiColors } from "@visulima/colorize";
2
+ import type { ReactElement, ReactNode } from "react";
3
+ import type { LiteralUnion } from "type-fest";
4
+ export type Props = {
5
+ /**
6
+ * Paragraph body.
7
+ */
8
+ readonly children: ReactNode;
9
+ /**
10
+ * Foreground color.
11
+ */
12
+ readonly color?: LiteralUnion<AnsiColors, string>;
13
+ /**
14
+ * Render the paragraph with dim color.
15
+ */
16
+ readonly dimColor?: boolean;
17
+ /**
18
+ * Blank lines to add after the paragraph.
19
+ * @default 1
20
+ */
21
+ readonly marginBottom?: number;
22
+ /**
23
+ * Blank lines to add before the paragraph.
24
+ * @default 0
25
+ */
26
+ readonly marginTop?: number;
27
+ };
28
+ /**
29
+ * Wraps body text with a trailing blank line. Useful for README-style layouts.
30
+ */
31
+ export default function Paragraph({ children, color, dimColor, marginBottom, marginTop }: Props): ReactElement;
@@ -0,0 +1,47 @@
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
+ * Whether to pulse the skeleton blocks (shimmer).
7
+ * @default true
8
+ */
9
+ readonly animated?: boolean;
10
+ /**
11
+ * Fill character used for each block.
12
+ * @default "█"
13
+ */
14
+ readonly character?: string;
15
+ /**
16
+ * Block color.
17
+ * @default "gray"
18
+ */
19
+ readonly color?: LiteralUnion<AnsiColors, string>;
20
+ /**
21
+ * Milliseconds between pulses.
22
+ * @default 500
23
+ */
24
+ readonly interval?: number;
25
+ /**
26
+ * Number of skeleton rows to render.
27
+ * @default 3
28
+ */
29
+ readonly rows?: number;
30
+ /**
31
+ * Total width reference. When omitted, the block flexes to fill its
32
+ * parent.
33
+ */
34
+ readonly width?: number;
35
+ /**
36
+ * Relative widths of each row (0–1). The list is sampled cyclically.
37
+ * @default [1, 0.85, 0.6]
38
+ */
39
+ readonly widths?: ReadonlyArray<number>;
40
+ };
41
+ /**
42
+ * Skeleton loading indicator. Renders a stack of solid blocks whose widths
43
+ * vary to mimic text placeholders. Pair with `async` data fetching.
44
+ * @param props See {@link Props}.
45
+ * @returns A `ReactElement` rendering the skeleton rows.
46
+ */
47
+ export default function Placeholder({ animated, character, color, interval, rows, width, widths, }: Props): ReactElement;
@@ -8,7 +8,7 @@
8
8
  * Copyright (c) Frankie Bagnardi
9
9
  */
10
10
  import type { ReactElement } from "react";
11
- import type { Props as TextProps } from "./Text.d.ts";
11
+ import type { Props as TextProps } from "./text.d.ts";
12
12
  export type Props = {
13
13
  /** Fill glyph repeated across the completed portion of the progress bar. Defaults to "█". */
14
14
  readonly character?: string;
@@ -0,0 +1,62 @@
1
+ import type { AnsiColors } from "@visulima/colorize";
2
+ import type { ReactElement } from "react";
3
+ import type { LiteralUnion } from "type-fest";
4
+ export type RadioOption = {
5
+ readonly description?: string;
6
+ readonly key?: string;
7
+ readonly label: string;
8
+ readonly value: string;
9
+ };
10
+ export type Props = {
11
+ /**
12
+ * Accent color for the focused and selected indicator.
13
+ * @default "blue"
14
+ */
15
+ readonly accentColor?: LiteralUnion<AnsiColors, string>;
16
+ /**
17
+ * Auto-focus when mounted.
18
+ */
19
+ readonly autoFocus?: boolean;
20
+ /**
21
+ * When true, moving focus with arrow keys immediately updates the selected
22
+ * value (and fires `onChange`). When false, focus moves independently and
23
+ * selection commits only on Space or Enter.
24
+ * @default true
25
+ */
26
+ readonly commitOnNavigate?: boolean;
27
+ /**
28
+ * Initial selected value when uncontrolled.
29
+ */
30
+ readonly defaultValue?: string;
31
+ /**
32
+ * Disable input and dim labels.
33
+ */
34
+ readonly isDisabled?: boolean;
35
+ /**
36
+ * Called when selection changes.
37
+ */
38
+ readonly onChange?: (value: string) => void;
39
+ /**
40
+ * Called when the user submits by pressing Enter.
41
+ */
42
+ readonly onSubmit?: (value: string) => void;
43
+ /**
44
+ * Available options.
45
+ */
46
+ readonly options: ReadonlyArray<RadioOption>;
47
+ /**
48
+ * Orientation of options.
49
+ * @default "vertical"
50
+ */
51
+ readonly orientation?: "horizontal" | "vertical";
52
+ /**
53
+ * Controlled selected value.
54
+ */
55
+ readonly value?: string;
56
+ };
57
+ /**
58
+ * Single-choice radio group with keyboard navigation. By default, navigation
59
+ * commits selection; set `commitOnNavigate={false}` to require an explicit
60
+ * Space/Enter commit.
61
+ */
62
+ export default function RadioGroup({ accentColor, autoFocus, commitOnNavigate, defaultValue, isDisabled, onChange, onSubmit, options, orientation, value, }: Props): ReactElement;
@@ -0,0 +1,23 @@
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
+ readonly axisColor?: LiteralUnion<AnsiColors, string>;
7
+ readonly height?: number;
8
+ readonly maxX?: number;
9
+ readonly maxY?: number;
10
+ readonly minX?: number;
11
+ readonly minY?: number;
12
+ readonly palette?: ReadonlyArray<LiteralUnion<AnsiColors, string>>;
13
+ readonly series: ReadonlyArray<LineSeries>;
14
+ readonly showLegend?: boolean;
15
+ readonly width?: number;
16
+ };
17
+ /**
18
+ * Scatter plot rendered on a braille pixel grid. Each sample lights one
19
+ * sub-cell pixel; overlapping points merge into denser braille glyphs.
20
+ * @param props See {@link Props}.
21
+ * @returns A `ReactElement` containing the plot and an optional legend.
22
+ */
23
+ export default function ScatterPlot({ axisColor, height, maxX, maxY, minX, minY, palette, series, showLegend, width, }: Props): ReactElement;
@@ -1,6 +1,6 @@
1
1
  import type React from "react";
2
2
  import type { ReactNode, Ref } from "react";
3
- import type { Props as BoxProps } from "../Box.d.ts";
3
+ import type { Props as BoxProps } from "../box.d.ts";
4
4
  export interface ControlledScrollViewProps extends BoxProps {
5
5
  children?: ReactNode;
6
6
  debug?: boolean;
@@ -1,10 +1,10 @@
1
- export type { ControlledScrollViewProps, ControlledScrollViewRef } from "./ControlledScrollView.d.ts";
2
- export { ControlledScrollView } from "./ControlledScrollView.d.ts";
3
- export type { ScrollBarPlacement, ScrollBarProps, ScrollBarStyle } from "./ScrollBar.d.ts";
4
- export { ScrollBar } from "./ScrollBar.d.ts";
5
- export type { ScrollBarBoxProps } from "./ScrollBarBox.d.ts";
6
- export { ScrollBarBox } from "./ScrollBarBox.d.ts";
7
- export type { ScrollAlignment, ScrollListProps, ScrollListRef } from "./ScrollList.d.ts";
8
- export { ScrollList } from "./ScrollList.d.ts";
9
- export type { ScrollViewProps, ScrollViewRef } from "./ScrollView.d.ts";
10
- export { ScrollView } from "./ScrollView.d.ts";
1
+ export type { ControlledScrollViewProps, ControlledScrollViewRef } from "./controlled-scroll-view.d.ts";
2
+ export { ControlledScrollView } from "./controlled-scroll-view.d.ts";
3
+ export type { ScrollBarPlacement, ScrollBarProps, ScrollBarStyle } from "./scroll-bar.d.ts";
4
+ export { ScrollBar } from "./scroll-bar.d.ts";
5
+ export type { ScrollBarBoxProps } from "./scroll-bar-box.d.ts";
6
+ export { ScrollBarBox } from "./scroll-bar-box.d.ts";
7
+ export type { ScrollAlignment, ScrollListProps, ScrollListRef } from "./scroll-list.d.ts";
8
+ export { ScrollList } from "./scroll-list.d.ts";
9
+ export type { ScrollViewProps, ScrollViewRef } from "./scroll-view.d.ts";
10
+ export { ScrollView } from "./scroll-view.d.ts";
@@ -1,5 +1,5 @@
1
1
  import type React from "react";
2
- import type { Props as BoxProps } from "../Box.d.ts";
2
+ import type { Props as BoxProps } from "../box.d.ts";
3
3
  interface ScrollBarBoxProps extends BoxProps {
4
4
  children?: React.ReactNode;
5
5
  contentHeight: number;
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import type { Props as BoxProps } from "../Box.d.ts";
2
+ import type { Props as BoxProps } from "../box.d.ts";
3
3
  type ScrollBarPlacement = "inset" | "left" | "right";
4
4
  type ScrollBarStyle = BoxProps["borderStyle"] | "block" | "line" | "thick" | "dots";
5
5
  interface ScrollBarProps {
@@ -1,6 +1,6 @@
1
1
  import type React from "react";
2
2
  import type { Ref } from "react";
3
- import type { ScrollViewProps, ScrollViewRef } from "./ScrollView.d.ts";
3
+ import type { ScrollViewProps, ScrollViewRef } from "./scroll-view.d.ts";
4
4
  export type ScrollAlignment = "auto" | "bottom" | "center" | "top";
5
5
  export interface ScrollListProps extends ScrollViewProps {
6
6
  readonly scrollAlignment?: ScrollAlignment;
@@ -1,6 +1,6 @@
1
1
  import type React from "react";
2
2
  import type { ReactNode, Ref } from "react";
3
- import type { Props as BoxProps } from "../Box.d.ts";
3
+ import type { Props as BoxProps } from "../box.d.ts";
4
4
  export interface ScrollViewProps extends BoxProps {
5
5
  children?: ReactNode;
6
6
  debug?: boolean;
@@ -0,0 +1,46 @@
1
+ import type { AnsiColors } from "@visulima/colorize";
2
+ import type { ReactElement, ReactNode } from "react";
3
+ import type { LiteralUnion } from "type-fest";
4
+ export type Props = {
5
+ /**
6
+ * Color of the accent elements (border, icon).
7
+ * @default "blue"
8
+ */
9
+ readonly accentColor?: LiteralUnion<AnsiColors, string>;
10
+ /**
11
+ * Initial value.
12
+ */
13
+ readonly defaultValue?: string;
14
+ /**
15
+ * Optional icon rendered before the input.
16
+ * @default "⌕"
17
+ */
18
+ readonly icon?: ReactNode;
19
+ /**
20
+ * Disable the input.
21
+ */
22
+ readonly isDisabled?: boolean;
23
+ /**
24
+ * Fired whenever the value changes.
25
+ */
26
+ readonly onChange?: (value: string) => void;
27
+ /**
28
+ * Fired when the user presses Enter.
29
+ */
30
+ readonly onSubmit?: (value: string) => void;
31
+ /**
32
+ * Placeholder text shown when the input is empty.
33
+ * @default "Search..."
34
+ */
35
+ readonly placeholder?: string;
36
+ /**
37
+ * Autocomplete suggestions.
38
+ */
39
+ readonly suggestions?: ReadonlyArray<string>;
40
+ };
41
+ /**
42
+ * Search-styled text input with an icon and bordered container.
43
+ * @param props See {@link Props}.
44
+ * @returns A `ReactElement` wrapping `TextInput` with an icon column.
45
+ */
46
+ export default function SearchInput({ accentColor, defaultValue, icon, isDisabled, onChange, onSubmit, placeholder, suggestions, }: Props): ReactElement;
@@ -1,8 +1,8 @@
1
1
  import type { AnsiColors } from "@visulima/colorize";
2
2
  import type { FC, ReactElement } from "react";
3
3
  import type { LiteralUnion } from "type-fest";
4
- import type { Props as IndicatorProps } from "./SelectInputIndicator.d.ts";
5
- import type { Props as ItemProps } from "./SelectInputItem.d.ts";
4
+ import type { Props as IndicatorProps } from "./select-input-indicator.d.ts";
5
+ import type { Props as ItemProps } from "./select-input-item.d.ts";
6
6
  export type Item<V> = {
7
7
  /**
8
8
  * Called automatically when this item is selected (via Enter or number key).
@@ -0,0 +1,39 @@
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
+ * Width of the highlighted band in characters.
7
+ * @default 3
8
+ */
9
+ readonly bandWidth?: number;
10
+ /**
11
+ * Base color of the non-highlighted text.
12
+ */
13
+ readonly color?: LiteralUnion<AnsiColors, string>;
14
+ /**
15
+ * Highlight color of the sweeping band.
16
+ * @default "white"
17
+ */
18
+ readonly highlightColor?: LiteralUnion<AnsiColors, string>;
19
+ /**
20
+ * Milliseconds between frames of the shimmer.
21
+ * @default 60
22
+ */
23
+ readonly interval?: number;
24
+ /**
25
+ * Text to render with a shimmer sweep.
26
+ */
27
+ readonly text: string;
28
+ };
29
+ /**
30
+ * Text with an animated highlight band that sweeps across the characters.
31
+ * Perfect for "generating…" states.
32
+ * @param props.bandWidth Number of characters in the bright band.
33
+ * @param props.color Color applied to characters outside the band.
34
+ * @param props.highlightColor Color applied to characters inside the band.
35
+ * @param props.interval Milliseconds between frames.
36
+ * @param props.text Content to shimmer.
37
+ * @returns A single `Text` element composed of per-character `Text` children.
38
+ */
39
+ export default function ShimmerText({ bandWidth, color, highlightColor, interval, text }: 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
+ * Color applied to the chart glyphs.
7
+ */
8
+ readonly color?: LiteralUnion<AnsiColors, string>;
9
+ /**
10
+ * Data points to plot. Values may be any real numbers.
11
+ */
12
+ readonly data: ReadonlyArray<number>;
13
+ /**
14
+ * Optional fixed maximum for the vertical scale.
15
+ * When omitted the maximum data value is used.
16
+ */
17
+ readonly max?: number;
18
+ /**
19
+ * Optional fixed minimum for the vertical scale.
20
+ * When omitted the minimum data value is used.
21
+ */
22
+ readonly min?: number;
23
+ };
24
+ /**
25
+ * Inline bar chart using Unicode block glyphs.
26
+ * @param props See {@link Props}.
27
+ * @returns A `ReactElement` containing the glyph string, or `null` when
28
+ * `data` is empty.
29
+ */
30
+ export default function Sparkline({ color, data, max, min }: Props): ReactElement | null;
@@ -24,19 +24,17 @@
24
24
  * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
25
25
  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
26
26
  */
27
- import type { SpinnerName } from "cli-spinners";
27
+ import type { SpinnerName } from "@visulima/spinner";
28
28
  import type { ReactElement } from "react";
29
29
  export type Props = {
30
30
  /**
31
31
  * Type of a spinner.
32
- * See [cli-spinners](https://github.com/sindresorhus/cli-spinners) for available spinners.
32
+ * Accepts any preset from `@visulima/spinner` (cli-spinners + custom frame sets).
33
33
  * @default "dots"
34
34
  */
35
35
  readonly type?: SpinnerName;
36
36
  };
37
37
  /**
38
38
  * Spinner component that renders an animated loading indicator.
39
- *
40
- * Uses spinners from [cli-spinners](https://github.com/sindresorhus/cli-spinners).
41
39
  */
42
40
  export default function Spinner({ type }: Props): ReactElement;
@@ -10,19 +10,31 @@
10
10
  * is ready, the component stops calling the function so React does not
11
11
  * re-reconcile the subtree on subsequent renders.
12
12
  *
13
+ * Re-rendering the cached content is controlled via the `deps` prop (similar
14
+ * to React's hook deps). When `deps` changes, the cache is invalidated and
15
+ * `children()` is invoked again. If `deps` is omitted, the cache is
16
+ * invalidated whenever the `children` function reference changes.
17
+ *
13
18
  * Use this for content that renders once and doesn't change (e.g., completed
14
19
  * task output, logged messages, static headers).
15
20
  *
16
21
  * Ported from jacob314/ink (Google LLC, Apache-2.0).
17
22
  * @license Apache-2.0
18
23
  */
19
- import type { ReactNode } from "react";
24
+ import type { DependencyList, ReactNode } from "react";
20
25
  import React from "react";
21
26
  import type { Styles } from "../styles.d.ts";
27
+ /**
28
+ * @property children Render function invoked once to produce the cached content.
29
+ * @property deps Dependencies that control when the static content is re-rendered. When any dependency changes (shallow, Object.is comparison), the cache is invalidated and children() is invoked again. If omitted, the cache is invalidated whenever the children function reference changes.
30
+ * @property style Optional style applied to the static-render container.
31
+ * @property width Optional fixed width for the cached region.
32
+ */
22
33
  export type Props = {
23
34
  readonly children: () => ReactNode;
35
+ readonly deps?: DependencyList;
24
36
  readonly style?: Styles;
25
37
  readonly width?: number;
26
38
  };
27
- declare const StaticRender: ({ children, style, width }: Props) => React.ReactNode;
39
+ declare const StaticRender: ({ children, deps, style, width }: Props) => React.ReactNode;
28
40
  export default StaticRender;
@@ -0,0 +1,30 @@
1
+ import type { AnsiColors } from "@visulima/colorize";
2
+ import type { ReactElement, ReactNode } from "react";
3
+ import type { LiteralUnion } from "type-fest";
4
+ export type Props = {
5
+ /**
6
+ * Background color spanning the whole row.
7
+ */
8
+ readonly backgroundColor?: LiteralUnion<AnsiColors, string>;
9
+ /**
10
+ * Content rendered in the center. Optional.
11
+ */
12
+ readonly center?: ReactNode;
13
+ /**
14
+ * Default foreground for text rendered inside the row.
15
+ */
16
+ readonly color?: LiteralUnion<AnsiColors, string>;
17
+ /**
18
+ * Content rendered flush-left.
19
+ */
20
+ readonly left?: ReactNode;
21
+ /**
22
+ * Content rendered flush-right.
23
+ */
24
+ readonly right?: ReactNode;
25
+ };
26
+ /**
27
+ * Full-width status bar with left / center / right slots. Typically pinned to
28
+ * the bottom of the UI.
29
+ */
30
+ export default function StatusLine({ backgroundColor, center, color, left, right }: Props): ReactElement;
@@ -0,0 +1,42 @@
1
+ import type { AnsiColors } from "@visulima/colorize";
2
+ import type { ReactElement, ReactNode } from "react";
3
+ import type { LiteralUnion } from "type-fest";
4
+ export type StepStatus = "active" | "completed" | "error" | "pending";
5
+ export type StepperStep = {
6
+ readonly description?: string;
7
+ readonly key?: string;
8
+ readonly label: ReactNode;
9
+ readonly status?: StepStatus;
10
+ };
11
+ export type Props = {
12
+ /**
13
+ * Color used for active and completed steps.
14
+ * @default "blue"
15
+ */
16
+ readonly accentColor?: LiteralUnion<AnsiColors, string>;
17
+ /**
18
+ * Index of the current step (used when steps do not provide a status).
19
+ * @default 0
20
+ */
21
+ readonly activeIndex?: number;
22
+ /**
23
+ * Color used for errors.
24
+ * @default "red"
25
+ */
26
+ readonly errorColor?: LiteralUnion<AnsiColors, string>;
27
+ /**
28
+ * Orientation of the stepper.
29
+ * @default "horizontal"
30
+ */
31
+ readonly orientation?: "horizontal" | "vertical";
32
+ /**
33
+ * List of steps.
34
+ */
35
+ readonly steps: ReadonlyArray<StepperStep>;
36
+ };
37
+ /**
38
+ * Step indicator for multi-stage flows.
39
+ * @param props See {@link Props}.
40
+ * @returns A `ReactElement` rendering the steps horizontally or vertically.
41
+ */
42
+ export default function Stepper({ accentColor, activeIndex, errorColor, orientation, steps }: Props): ReactElement;