@visulima/tui 1.0.0-alpha.1 → 1.0.0-alpha.10

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 (542) hide show
  1. package/CHANGELOG.md +137 -0
  2. package/LICENSE.md +203 -9
  3. package/README.md +6 -6
  4. package/dist/core/index.d.ts +58 -5
  5. package/dist/core/index.js +1 -5
  6. package/dist/ink/index.d.ts +6574 -159
  7. package/dist/ink/index.js +1 -100
  8. package/dist/packem_chunks/devtools.js +3 -26
  9. package/dist/packem_shared/Accordion-BXsqchV-.js +1 -0
  10. package/dist/packem_shared/Alert-BhYVMHtR.js +1 -0
  11. package/dist/packem_shared/AnimatePresence-Eu7Z8KHc.js +1 -0
  12. package/dist/packem_shared/ApprovalPrompt-BSn0FT1g.js +1 -0
  13. package/dist/packem_shared/AreaChart-Chy-frI7.js +1 -0
  14. package/dist/packem_shared/Badge-B8WPyRsK.js +1 -0
  15. package/dist/packem_shared/BarChart-rpZtlMcF.js +1 -0
  16. package/dist/packem_shared/BigText-CRpwUzrt.js +1 -0
  17. package/dist/packem_shared/BlinkDot-BvnRuWP8.js +1 -0
  18. package/dist/packem_shared/Box-BwqSvWuq.js +1 -0
  19. package/dist/packem_shared/Breadcrumb-D0hClbRV.js +1 -0
  20. package/dist/packem_shared/Button-B89Yvbc6.js +1 -0
  21. package/dist/packem_shared/COLOR_BLINDNESS_SIMULATION-DqErf7XX.js +1 -0
  22. package/dist/packem_shared/Calendar-Dmflvm2S.js +1 -0
  23. package/dist/packem_shared/Canvas-CKg6WV47.js +1 -0
  24. package/dist/packem_shared/Card-B_9fXdtU.js +1 -0
  25. package/dist/packem_shared/Cell-BrXn3jxY.js +1 -0
  26. package/dist/packem_shared/Checkbox-BN71eCWU.js +1 -0
  27. package/dist/packem_shared/Code-HhevcyiH.js +2 -0
  28. package/dist/packem_shared/Collapsible-u6uf_FdV.js +1 -0
  29. package/dist/packem_shared/CommandBlock-B-nslpCv.js +4 -0
  30. package/dist/packem_shared/CommandPalette-CEFdaURo.js +1 -0
  31. package/dist/packem_shared/ConfirmDialog-5Jje_Xpu.js +1 -0
  32. package/dist/packem_shared/ConfirmInput-D44Mb9oo.js +1 -0
  33. package/dist/packem_shared/ConsoleOverlay-CM3APfgP.js +1 -0
  34. package/dist/packem_shared/ContentSwitcher-Dm5BkrCt.js +1 -0
  35. package/dist/packem_shared/ControlledScrollView-DI8KZOQB.js +1 -0
  36. package/dist/packem_shared/Cursor-BoLFIMol.js +1 -0
  37. package/dist/packem_shared/DatePicker-CnSrFFAE.js +1 -0
  38. package/dist/packem_shared/DefinitionList-v8RDuF_R.js +1 -0
  39. package/dist/packem_shared/DevTools-O8EbCfHa.js +1 -0
  40. package/dist/packem_shared/Dialog-CTaL8pn0.js +1 -0
  41. package/dist/packem_shared/DiffView-BUIFqUB0.js +1 -0
  42. package/dist/packem_shared/Divider-C47bKmqu.js +1 -0
  43. package/dist/packem_shared/FilePicker-CUo7R5Qb.js +1 -0
  44. package/dist/packem_shared/FocusContext-Xy0cwJpO.js +1 -0
  45. package/dist/packem_shared/FormField-af3aUpRL.js +1 -0
  46. package/dist/packem_shared/Fullscreen-CuJ8y0s0.js +1 -0
  47. package/dist/packem_shared/Gauge-Dz-usH__.js +1 -0
  48. package/dist/packem_shared/Gradient-DYNc0GZA.js +1 -0
  49. package/dist/packem_shared/Heading-mwEYza3Y.js +1 -0
  50. package/dist/packem_shared/Heatmap-ChL97U1-.js +1 -0
  51. package/dist/packem_shared/Help-Zcelyw_U.js +1 -0
  52. package/dist/packem_shared/Histogram-FIf2F83d.js +1 -0
  53. package/dist/packem_shared/IMECompositionBuffer-C89PhiOu.js +1 -0
  54. package/dist/packem_shared/InputParser-rZKjY_7Y.js +2 -0
  55. package/dist/packem_shared/KEY-Bk8B-3h_.js +1 -0
  56. package/dist/packem_shared/Kbd-DpkPp4jB.js +1 -0
  57. package/dist/packem_shared/LayoutNode-rxblE317.js +1 -0
  58. package/dist/packem_shared/LineChart-BXE_girm.js +1 -0
  59. package/dist/packem_shared/Link-i2o2EG4-.js +1 -0
  60. package/dist/packem_shared/LoadingIndicator-TC1Fjwyt.js +1 -0
  61. package/dist/packem_shared/Markdown-R1XqK63D.js +1 -0
  62. package/dist/packem_shared/MaskedInput-J01phOZs.js +1 -0
  63. package/dist/packem_shared/Menu-CfrH4ymk.js +1 -0
  64. package/dist/packem_shared/MessageBubble-BmBBU2Rm.js +1 -0
  65. package/dist/packem_shared/ModelBadge-D3wrXncu.js +1 -0
  66. package/dist/packem_shared/MouseProvider-pjza-lpc.js +1 -0
  67. package/dist/packem_shared/MultiSelect-Dqmn-bVo.js +1 -0
  68. package/dist/packem_shared/NAMED_COLORS-B9fJsYdg.js +1 -0
  69. package/dist/packem_shared/Newline-BSG4iUqp.js +2 -0
  70. package/dist/packem_shared/OperationTree-DksxjMIV.js +1 -0
  71. package/dist/packem_shared/OptionList-CNx7r9yN.js +1 -0
  72. package/dist/packem_shared/OrderedList-BeDy035w.js +1 -0
  73. package/dist/packem_shared/Paginator-B56s6bhS.js +1 -0
  74. package/dist/packem_shared/Paragraph-BqJlH0R-.js +1 -0
  75. package/dist/packem_shared/Placeholder-GMpHRGC8.js +1 -0
  76. package/dist/packem_shared/ProgressBar-Bj3fmORR.js +1 -0
  77. package/dist/packem_shared/RadioGroup-Br8BeEwS.js +1 -0
  78. package/dist/packem_shared/Renderer-DJXooAsp.js +1 -0
  79. package/dist/packem_shared/ResizeObserverEntry-Dq0dk8Kq.js +1 -0
  80. package/dist/packem_shared/ScatterPlot-OhfYco5l.js +1 -0
  81. package/dist/packem_shared/ScrollBar-Da5Y3z7N.js +1 -0
  82. package/dist/packem_shared/ScrollBarBox-Dz6F-Eat.js +1 -0
  83. package/dist/packem_shared/ScrollList-DiVGyEjv.js +1 -0
  84. package/dist/packem_shared/ScrollView-BojONotI.js +1 -0
  85. package/dist/packem_shared/SearchInput-BoPTRbhV.js +1 -0
  86. package/dist/packem_shared/SelectInput-CAJ7SCBq.js +1 -0
  87. package/dist/packem_shared/SelectInputIndicator-N1n8ULHs.js +1 -0
  88. package/dist/packem_shared/SelectInputItem-BEkbmobs.js +1 -0
  89. package/dist/packem_shared/ShimmerText-CuGQ2NDC.js +1 -0
  90. package/dist/packem_shared/Slider-Cg_tJpKa.js +1 -0
  91. package/dist/packem_shared/Spacer-eT3HOrXk.js +1 -0
  92. package/dist/packem_shared/Sparkline-T6_FPVET.js +1 -0
  93. package/dist/packem_shared/Spinner-B0-A50pu.js +1 -0
  94. package/dist/packem_shared/Static-DLynr5pn.js +1 -0
  95. package/dist/packem_shared/Static-jzLPaHJF.js +1 -0
  96. package/dist/packem_shared/StaticRender-BgD61E7x.js +1 -0
  97. package/dist/packem_shared/StatusLine-Ch4jjef1.js +1 -0
  98. package/dist/packem_shared/StatusMessage-B1qfKeMM.js +1 -0
  99. package/dist/packem_shared/Stepper-CNPAqxiU.js +1 -0
  100. package/dist/packem_shared/Stopwatch-CAx2EWwq.js +1 -0
  101. package/dist/packem_shared/StreamingText-BYOKSB2T.js +1 -0
  102. package/dist/packem_shared/Switch-DzSpKYu7.js +1 -0
  103. package/dist/packem_shared/Tab-BcXzSUdj.js +1 -0
  104. package/dist/packem_shared/Table-DJp1TLrR.js +1 -0
  105. package/dist/packem_shared/Tabs-D68z0SOt.js +1 -0
  106. package/dist/packem_shared/Tag-BvLHnYRn.js +1 -0
  107. package/dist/packem_shared/Text-mTAve9R2.js +1 -0
  108. package/dist/packem_shared/TextInput-C_gYQlnF.js +1 -0
  109. package/dist/packem_shared/Textarea-C2ET_oMb.js +2 -0
  110. package/dist/packem_shared/Timer-CI3aQX65.js +1 -0
  111. package/dist/packem_shared/Toast-Drvc8XfG.js +1 -0
  112. package/dist/packem_shared/Tooltip-C5UnQlLd.js +1 -0
  113. package/dist/packem_shared/Transform-fYmcdqRT.js +1 -0
  114. package/dist/packem_shared/Transition-CJDBKYUB.js +1 -0
  115. package/dist/packem_shared/TreeNodeMap-CspqSCpb.js +1 -0
  116. package/dist/packem_shared/TreeView-DjhacGJ5.js +1 -0
  117. package/dist/packem_shared/TuiApp-DrjI_i-R.js +1 -0
  118. package/dist/packem_shared/TuiContext-BoJvG3NN.js +3 -0
  119. package/dist/packem_shared/UnorderedList-BnfqexZs.js +1 -0
  120. package/dist/packem_shared/accessibility-context-DDyHTwmA.js +1 -0
  121. package/dist/packem_shared/animation-context-DW3p-vpk.js +1 -0
  122. package/dist/packem_shared/ansi-parser-B6uXaq65.js +1 -0
  123. package/dist/packem_shared/ansi-tokenizer-DqX9nJuk.js +1 -0
  124. package/dist/packem_shared/app-context-BVpKlG1z.js +1 -0
  125. package/dist/packem_shared/background-context-rjOaWFki.js +1 -0
  126. package/dist/packem_shared/boxes-DyY_LXCi.js +1 -0
  127. package/dist/packem_shared/braille-BBjIoaN0.js +1 -0
  128. package/dist/packem_shared/colorize-DbTZMrJO.js +1 -0
  129. package/dist/packem_shared/comparePoints-C85EsmNz.js +1 -0
  130. package/dist/packem_shared/controlled-scroll-view-CmrAEvJk.js +1 -0
  131. package/dist/packem_shared/createInlineLoop-DRNZ7jqH.js +2 -0
  132. package/dist/packem_shared/createLinkedScrollGroup-BMTJ7rAj.js +1 -0
  133. package/dist/packem_shared/createMemoryStorage-QVZNXbWz.js +2 -0
  134. package/dist/packem_shared/createScreen-CrLrxA6t.js +3 -0
  135. package/dist/packem_shared/cursor-context-CFviBqPX.js +1 -0
  136. package/dist/packem_shared/dom-4y__5fWB.js +1 -0
  137. package/dist/packem_shared/focus-context-CsT69klR.js +1 -0
  138. package/dist/packem_shared/format-time-C7Q-hQZq.js +1 -0
  139. package/dist/packem_shared/getPathToRoot-B2tKmx3i.js +1 -0
  140. package/dist/packem_shared/getScrollHeight-BTEY8ewu.js +1 -0
  141. package/dist/packem_shared/input-utils-fAxzSlNh.js +1 -0
  142. package/dist/packem_shared/input.d-Bfq7oc06.d.ts +90 -0
  143. package/dist/packem_shared/isIntersecting-B3KbKTmu.js +1 -0
  144. package/dist/packem_shared/isOsc52Supported-DKK7Uee6.js +1 -0
  145. package/dist/packem_shared/isTerminalPaletteQuerySupported-Dn2hFAZ_.js +1 -0
  146. package/dist/packem_shared/kittyFlags-C3rZLbcK.js +1 -0
  147. package/dist/packem_shared/line-chart-DrM8PwnI.js +1 -0
  148. package/dist/packem_shared/measure-element-DSp7YDus.js +2 -0
  149. package/dist/packem_shared/measure-text-DDjHT1jD.js +3 -0
  150. package/dist/packem_shared/measureElement-DA8WqFP_.js +1 -0
  151. package/dist/packem_shared/mouse-context-DaARgUu1.js +1 -0
  152. package/dist/packem_shared/parseSgrMouse-Ccj70ijb.js +1 -0
  153. package/dist/packem_shared/processLayout-DXDfFb_d.js +1 -0
  154. package/dist/packem_shared/reconciler-BuOP-TZ6.js +1 -0
  155. package/dist/packem_shared/reconciler-DSYCrIZs.js +1 -0
  156. package/dist/packem_shared/render-DDqtMAFN.js +1 -0
  157. package/dist/packem_shared/render-_r0K9K11.js +28 -0
  158. package/dist/packem_shared/render.d-BR3gA-N8.d.ts +1257 -0
  159. package/dist/packem_shared/renderToString-DeqOWRP8.js +4 -0
  160. package/dist/packem_shared/renderToString-IYYPyASm.js +2 -0
  161. package/dist/packem_shared/renderTreeToBuffer-DPkoCgP2.js +2 -0
  162. package/dist/packem_shared/renderer-D2p6av2X.js +17 -0
  163. package/dist/packem_shared/setEnableStyledLineCache-D2gZbwFM.js +1 -0
  164. package/dist/packem_shared/squashTextNodesWithMap-Cpqmc45i.js +1 -0
  165. package/dist/packem_shared/stderr-context-BzEaUICS.js +1 -0
  166. package/dist/packem_shared/stdin-context-BTaaFagk.js +1 -0
  167. package/dist/packem_shared/stdout-context-BnblEPez.js +1 -0
  168. package/dist/packem_shared/text-width-CZ9vPvM0.js +2 -0
  169. package/dist/packem_shared/token-to-elements-BYxT6J_Q.js +1 -0
  170. package/dist/packem_shared/treeViewTheme-1RIZyB4M.js +1 -0
  171. package/dist/packem_shared/useAnimation-B9we6ZzL.js +1 -0
  172. package/dist/packem_shared/useApp-B6fvM42d.js +1 -0
  173. package/dist/packem_shared/useBoxMetrics-D5pkIr6P.js +1 -0
  174. package/dist/packem_shared/useClipboard-CBxy0hT8.js +1 -0
  175. package/dist/packem_shared/useColorBlindness-BvWcu2Bb.js +1 -0
  176. package/dist/packem_shared/useConsoleCapture-BxiG8iLJ.js +1 -0
  177. package/dist/packem_shared/useCursor-CPu8T5Db.js +1 -0
  178. package/dist/packem_shared/useElementDimensions-qJ_WXFZ9.js +1 -0
  179. package/dist/packem_shared/useFocus-DSmziO_x.js +1 -0
  180. package/dist/packem_shared/useFocusManager-Uapn3LQo.js +1 -0
  181. package/dist/packem_shared/useForm-CzV-Oext.js +1 -0
  182. package/dist/packem_shared/useHotkey-D0dGey14.js +1 -0
  183. package/dist/packem_shared/useInput-D1_jG26Z.js +2 -0
  184. package/dist/packem_shared/useInterval-AobjZT3u.js +1 -0
  185. package/dist/packem_shared/useIsScreenReaderEnabled-DjWHh-II.js +1 -0
  186. package/dist/packem_shared/useKeyBindings-zabkEJQs.js +1 -0
  187. package/dist/packem_shared/useKeyChord-CICQIxXj.js +1 -0
  188. package/dist/packem_shared/useMouseAction-2dRfU1vE.js +1 -0
  189. package/dist/packem_shared/useMouseContext-C746G7kY.js +1 -0
  190. package/dist/packem_shared/useMousePosition-BTWfV4JK.js +1 -0
  191. package/dist/packem_shared/useOnMouseClick-nY8xLZmt.js +1 -0
  192. package/dist/packem_shared/useOnMouseHover-D3DczIol.js +1 -0
  193. package/dist/packem_shared/useOnMouseState-cRK8QvzD.js +1 -0
  194. package/dist/packem_shared/usePaste-CKKB9H-Z.js +1 -0
  195. package/dist/packem_shared/useScrollAcceleration-NrY1oVMs.js +1 -0
  196. package/dist/packem_shared/useScrollInput-Caghtn-Q.js +1 -0
  197. package/dist/packem_shared/useStderr-BDZb6InG.js +1 -0
  198. package/dist/packem_shared/useStdin-DKa4h35k.js +1 -0
  199. package/dist/packem_shared/useStdout-B-2lX4C5.js +1 -0
  200. package/dist/packem_shared/useStopwatch-DffK7iMh.js +1 -0
  201. package/dist/packem_shared/useTerminalPalette-Cv7tSduR.js +1 -0
  202. package/dist/packem_shared/useTextBuffer-DekkGLxI.js +4 -0
  203. package/dist/packem_shared/useTextSelection-CGT0GLDR.js +1 -0
  204. package/dist/packem_shared/useTimeout-7LEFYTnG.js +1 -0
  205. package/dist/packem_shared/useTimer-DyoqSyGi.js +1 -0
  206. package/dist/packem_shared/useTreeView-8UlTK6sW.js +1 -0
  207. package/dist/packem_shared/useTreeViewState-CRPCUWrb.js +1 -0
  208. package/dist/packem_shared/useWindowSize-yDZsXF8z.js +1 -0
  209. package/dist/packem_shared/utils-THUhYKG2.js +1 -0
  210. package/dist/packem_shared/variant-config-BJqpNo7H.js +1 -0
  211. package/dist/packem_shared/waitFor-Dj5zfL5s.js +4 -0
  212. package/dist/packem_shared/wrapOrTruncateStyledLine-BZ00SM8i.js +3 -0
  213. package/dist/react/index.d.ts +519 -8
  214. package/dist/react/index.js +1 -9
  215. package/dist/testing/index.d.ts +274 -135
  216. package/dist/testing/index.js +1 -260
  217. package/index.js +691 -539
  218. package/package.json +24 -28
  219. package/dist/core/app.d.ts +0 -50
  220. package/dist/core/cell.d.ts +0 -33
  221. package/dist/core/inline.d.ts +0 -22
  222. package/dist/core/input.d.ts +0 -18
  223. package/dist/core/native-binding.d.ts +0 -22
  224. package/dist/ink/ansi-to-cell.d.ts +0 -5
  225. package/dist/ink/ansi-tokenizer.d.ts +0 -38
  226. package/dist/ink/clipboard.d.ts +0 -29
  227. package/dist/ink/color-matrix.d.ts +0 -49
  228. package/dist/ink/color-utils.d.ts +0 -30
  229. package/dist/ink/colorize.d.ts +0 -4
  230. package/dist/ink/components/AccessibilityContext.d.ts +0 -4
  231. package/dist/ink/components/Alert.d.ts +0 -30
  232. package/dist/ink/components/AnimationContext.d.ts +0 -10
  233. package/dist/ink/components/App.d.ts +0 -19
  234. package/dist/ink/components/AppContext.d.ts +0 -38
  235. package/dist/ink/components/BackgroundContext.d.ts +0 -5
  236. package/dist/ink/components/Badge.d.ts +0 -27
  237. package/dist/ink/components/BigText.d.ts +0 -71
  238. package/dist/ink/components/Box.d.ts +0 -58
  239. package/dist/ink/components/Code.d.ts +0 -46
  240. package/dist/ink/components/ConfirmInput.d.ts +0 -40
  241. package/dist/ink/components/ConsoleOverlay.d.ts +0 -52
  242. package/dist/ink/components/Cursor.d.ts +0 -43
  243. package/dist/ink/components/CursorContext.d.ts +0 -12
  244. package/dist/ink/components/Dialog.d.ts +0 -93
  245. package/dist/ink/components/DiffView.d.ts +0 -71
  246. package/dist/ink/components/ErrorBoundary.d.ts +0 -17
  247. package/dist/ink/components/ErrorOverview.d.ts +0 -6
  248. package/dist/ink/components/FocusContext.d.ts +0 -17
  249. package/dist/ink/components/Gradient.d.ts +0 -38
  250. package/dist/ink/components/Help.d.ts +0 -49
  251. package/dist/ink/components/Link.d.ts +0 -34
  252. package/dist/ink/components/Markdown.d.ts +0 -34
  253. package/dist/ink/components/MultiSelect.d.ts +0 -63
  254. package/dist/ink/components/Newline.d.ts +0 -12
  255. package/dist/ink/components/OrderedList.d.ts +0 -30
  256. package/dist/ink/components/Paginator.d.ts +0 -75
  257. package/dist/ink/components/ProgressBar.d.ts +0 -51
  258. package/dist/ink/components/SelectInput.d.ts +0 -96
  259. package/dist/ink/components/SelectInputIndicator.d.ts +0 -36
  260. package/dist/ink/components/SelectInputItem.d.ts +0 -43
  261. package/dist/ink/components/Slider.d.ts +0 -92
  262. package/dist/ink/components/Spacer.d.ts +0 -7
  263. package/dist/ink/components/Spinner.d.ts +0 -42
  264. package/dist/ink/components/Static.d.ts +0 -24
  265. package/dist/ink/components/StaticRender.d.ts +0 -28
  266. package/dist/ink/components/StatusMessage.d.ts +0 -26
  267. package/dist/ink/components/StderrContext.d.ts +0 -16
  268. package/dist/ink/components/StdinContext.d.ts +0 -29
  269. package/dist/ink/components/StdoutContext.d.ts +0 -16
  270. package/dist/ink/components/Stopwatch.d.ts +0 -44
  271. package/dist/ink/components/Tab.d.ts +0 -25
  272. package/dist/ink/components/Table.d.ts +0 -80
  273. package/dist/ink/components/Tabs.d.ts +0 -97
  274. package/dist/ink/components/Text.d.ts +0 -63
  275. package/dist/ink/components/TextInput.d.ts +0 -48
  276. package/dist/ink/components/Textarea.d.ts +0 -62
  277. package/dist/ink/components/Timer.d.ts +0 -52
  278. package/dist/ink/components/Transform.d.ts +0 -16
  279. package/dist/ink/components/UnorderedList.d.ts +0 -35
  280. package/dist/ink/components/file-picker/FilePicker.d.ts +0 -75
  281. package/dist/ink/components/file-picker/index.d.ts +0 -3
  282. package/dist/ink/components/file-picker/types.d.ts +0 -38
  283. package/dist/ink/components/file-picker/use-file-system.d.ts +0 -16
  284. package/dist/ink/components/scroll/ControlledScrollView.d.ts +0 -43
  285. package/dist/ink/components/scroll/ScrollBar.d.ts +0 -20
  286. package/dist/ink/components/scroll/ScrollBarBox.d.ts +0 -15
  287. package/dist/ink/components/scroll/ScrollList.d.ts +0 -12
  288. package/dist/ink/components/scroll/ScrollView.d.ts +0 -98
  289. package/dist/ink/components/scroll/index.d.ts +0 -10
  290. package/dist/ink/components/scroll/use-state-ref.d.ts +0 -8
  291. package/dist/ink/components/tree-view/TreeView.d.ts +0 -89
  292. package/dist/ink/components/tree-view/TreeViewNode.d.ts +0 -29
  293. package/dist/ink/components/tree-view/index.d.ts +0 -11
  294. package/dist/ink/components/tree-view/theme.d.ts +0 -24
  295. package/dist/ink/components/tree-view/tree-node-map.d.ts +0 -72
  296. package/dist/ink/components/tree-view/types.d.ts +0 -55
  297. package/dist/ink/components/tree-view/use-tree-view-state.d.ts +0 -135
  298. package/dist/ink/components/tree-view/use-tree-view.d.ts +0 -26
  299. package/dist/ink/components/variant-config.d.ts +0 -10
  300. package/dist/ink/cursor-helpers.d.ts +0 -38
  301. package/dist/ink/data-limited-lru-map.d.ts +0 -21
  302. package/dist/ink/devtools-window-polyfill.d.ts +0 -1
  303. package/dist/ink/devtools.d.ts +0 -1
  304. package/dist/ink/dom.d.ts +0 -213
  305. package/dist/ink/get-max-width.d.ts +0 -3
  306. package/dist/ink/highlighter.d.ts +0 -28
  307. package/dist/ink/hooks/use-animation.d.ts +0 -43
  308. package/dist/ink/hooks/use-app.d.ts +0 -6
  309. package/dist/ink/hooks/use-box-metrics.d.ts +0 -58
  310. package/dist/ink/hooks/use-clipboard.d.ts +0 -29
  311. package/dist/ink/hooks/use-color-blindness.d.ts +0 -33
  312. package/dist/ink/hooks/use-console-capture.d.ts +0 -43
  313. package/dist/ink/hooks/use-cursor.d.ts +0 -12
  314. package/dist/ink/hooks/use-focus-manager.d.ts +0 -42
  315. package/dist/ink/hooks/use-focus.d.ts +0 -30
  316. package/dist/ink/hooks/use-input.d.ts +0 -149
  317. package/dist/ink/hooks/use-is-screen-reader-enabled.d.ts +0 -6
  318. package/dist/ink/hooks/use-key-bindings.d.ts +0 -61
  319. package/dist/ink/hooks/use-linked-scroll.d.ts +0 -41
  320. package/dist/ink/hooks/use-paste.d.ts +0 -44
  321. package/dist/ink/hooks/use-scroll-acceleration.d.ts +0 -47
  322. package/dist/ink/hooks/use-scroll-input.d.ts +0 -34
  323. package/dist/ink/hooks/use-stderr.d.ts +0 -6
  324. package/dist/ink/hooks/use-stdin.d.ts +0 -7
  325. package/dist/ink/hooks/use-stdout.d.ts +0 -6
  326. package/dist/ink/hooks/use-stopwatch.d.ts +0 -40
  327. package/dist/ink/hooks/use-terminal-palette.d.ts +0 -19
  328. package/dist/ink/hooks/use-text-buffer.d.ts +0 -42
  329. package/dist/ink/hooks/use-text-selection.d.ts +0 -45
  330. package/dist/ink/hooks/use-timer.d.ts +0 -49
  331. package/dist/ink/hooks/use-window-size.d.ts +0 -18
  332. package/dist/ink/ime-utils.d.ts +0 -25
  333. package/dist/ink/ink.d.ts +0 -189
  334. package/dist/ink/input-parser.d.ts +0 -10
  335. package/dist/ink/input-utils.d.ts +0 -16
  336. package/dist/ink/instances.d.ts +0 -3
  337. package/dist/ink/kitty-keyboard.d.ts +0 -23
  338. package/dist/ink/layout.d.ts +0 -26
  339. package/dist/ink/log-update-native.d.ts +0 -14
  340. package/dist/ink/log-update.d.ts +0 -21
  341. package/dist/ink/measure-element.d.ts +0 -147
  342. package/dist/ink/measure-text.d.ts +0 -56
  343. package/dist/ink/mouse/Fullscreen.d.ts +0 -8
  344. package/dist/ink/mouse/MouseProvider.d.ts +0 -11
  345. package/dist/ink/mouse/ansi-parser.d.ts +0 -37
  346. package/dist/ink/mouse/constants.d.ts +0 -59
  347. package/dist/ink/mouse/index.d.ts +0 -20
  348. package/dist/ink/mouse/is-intersecting.d.ts +0 -18
  349. package/dist/ink/mouse/mouse-context.d.ts +0 -36
  350. package/dist/ink/mouse/use-element-position.d.ts +0 -29
  351. package/dist/ink/mouse/use-mouse-action.d.ts +0 -7
  352. package/dist/ink/mouse/use-mouse-position.d.ts +0 -7
  353. package/dist/ink/mouse/use-mouse.d.ts +0 -7
  354. package/dist/ink/mouse/use-on-mouse-click.d.ts +0 -14
  355. package/dist/ink/mouse/use-on-mouse-hover.d.ts +0 -8
  356. package/dist/ink/mouse/use-on-mouse-state.d.ts +0 -11
  357. package/dist/ink/output.d.ts +0 -74
  358. package/dist/ink/parse-keypress.d.ts +0 -22
  359. package/dist/ink/reconciler.d.ts +0 -3
  360. package/dist/ink/region.d.ts +0 -99
  361. package/dist/ink/render-background.d.ts +0 -4
  362. package/dist/ink/render-border.d.ts +0 -4
  363. package/dist/ink/render-node-to-output.d.ts +0 -38
  364. package/dist/ink/render-scrollbar.d.ts +0 -9
  365. package/dist/ink/render-sticky.d.ts +0 -44
  366. package/dist/ink/render-to-string.d.ts +0 -37
  367. package/dist/ink/render.d.ts +0 -191
  368. package/dist/ink/renderer.d.ts +0 -17
  369. package/dist/ink/resize-observer.d.ts +0 -44
  370. package/dist/ink/sanitize-ansi.d.ts +0 -2
  371. package/dist/ink/scroll.d.ts +0 -23
  372. package/dist/ink/selection.d.ts +0 -70
  373. package/dist/ink/squash-text-nodes.d.ts +0 -18
  374. package/dist/ink/style-flags.d.ts +0 -17
  375. package/dist/ink/styled-line-factory.d.ts +0 -25
  376. package/dist/ink/styled-line-serializer.d.ts +0 -18
  377. package/dist/ink/styled-line.d.ts +0 -109
  378. package/dist/ink/styles.d.ts +0 -369
  379. package/dist/ink/terminal-palette.d.ts +0 -25
  380. package/dist/ink/text-wrap.d.ts +0 -10
  381. package/dist/ink/token-to-elements.d.ts +0 -22
  382. package/dist/ink/utils/format-time.d.ts +0 -4
  383. package/dist/ink/utils.d.ts +0 -9
  384. package/dist/ink/wrap-text.d.ts +0 -3
  385. package/dist/ink/write-synchronized.d.ts +0 -4
  386. package/dist/packem_shared/AccessibilityContext-BLelHhNU.js +0 -7
  387. package/dist/packem_shared/Alert-Dr3s_LD9.js +0 -17
  388. package/dist/packem_shared/AnimationContext-BcJg8Jr6.js +0 -15
  389. package/dist/packem_shared/AppContext-CP0U6H7O.js +0 -11
  390. package/dist/packem_shared/BackgroundContext-BAUaxfOb.js +0 -5
  391. package/dist/packem_shared/Badge-Dk7EGGM6.js +0 -13
  392. package/dist/packem_shared/BigText-CjMdY63X.js +0 -24
  393. package/dist/packem_shared/Box-D_pSJ9Jp.js +0 -73
  394. package/dist/packem_shared/COLOR_BLINDNESS_SIMULATION-BsMy5Ewl.js +0 -81
  395. package/dist/packem_shared/Cell-DCg1kJY-.js +0 -48
  396. package/dist/packem_shared/Code-DjQvPBD9.js +0 -53
  397. package/dist/packem_shared/ConfirmInput-85Y4kRQW.js +0 -44
  398. package/dist/packem_shared/ConsoleOverlay-DBNa4vtj.js +0 -57
  399. package/dist/packem_shared/ControlledScrollView-BlOaxcsN.js +0 -286
  400. package/dist/packem_shared/ControlledScrollView-DfAhcufF.js +0 -5
  401. package/dist/packem_shared/Cursor-DiW7YoSK.js +0 -18
  402. package/dist/packem_shared/CursorContext-JxRzlqAx.js +0 -9
  403. package/dist/packem_shared/DevTools-aMPIsaHx.js +0 -61
  404. package/dist/packem_shared/Dialog-DsSNAVgC.js +0 -71
  405. package/dist/packem_shared/DiffView-hqaw-2S6.js +0 -329
  406. package/dist/packem_shared/FilePicker-DNwFxRhq.js +0 -254
  407. package/dist/packem_shared/FocusContext-CWkYtgcm.js +0 -26
  408. package/dist/packem_shared/FocusContext-D5wFxSRz.js +0 -153
  409. package/dist/packem_shared/Fullscreen-DrElAE1o.js +0 -11
  410. package/dist/packem_shared/Gradient-Ql5P0GUd.js +0 -136
  411. package/dist/packem_shared/Help-6wanGG38.js +0 -112
  412. package/dist/packem_shared/IMECompositionBuffer-Dl3S0KnF.js +0 -55
  413. package/dist/packem_shared/InputParser-BKHpWfvN.js +0 -156
  414. package/dist/packem_shared/LayoutNode-Cjnsodiy.js +0 -131
  415. package/dist/packem_shared/Link-COcKYfGT.js +0 -66
  416. package/dist/packem_shared/Markdown-y1ISztof.js +0 -212
  417. package/dist/packem_shared/MouseProvider-Y9TSSEGl.js +0 -136
  418. package/dist/packem_shared/MultiSelect-ChoLUcDI.js +0 -129
  419. package/dist/packem_shared/NAMED_COLORS-a4QBvb5r.js +0 -262
  420. package/dist/packem_shared/Newline-DBtYEg8x.js +0 -7
  421. package/dist/packem_shared/OrderedList-Cp7pXr6m.js +0 -26
  422. package/dist/packem_shared/Paginator-D1AuD-kj.js +0 -104
  423. package/dist/packem_shared/ProgressBar-DOfpVagn.js +0 -22
  424. package/dist/packem_shared/Renderer-zZ5O3vxc.js +0 -31
  425. package/dist/packem_shared/ResizeObserverEntry-Br4seLeQ.js +0 -102
  426. package/dist/packem_shared/ScrollBar-EWAs2Uc7.js +0 -106
  427. package/dist/packem_shared/ScrollBarBox-DTNNlh7R.js +0 -72
  428. package/dist/packem_shared/ScrollList-DCeIFL8M.js +0 -227
  429. package/dist/packem_shared/ScrollView-v3MCNIyX.js +0 -196
  430. package/dist/packem_shared/SelectInput-BN2TMyxp.js +0 -260
  431. package/dist/packem_shared/SelectInputIndicator-DkRMoH_b.js +0 -9
  432. package/dist/packem_shared/SelectInputItem-BF9LQgKu.js +0 -8
  433. package/dist/packem_shared/Slider-BWD7xZX6.js +0 -116
  434. package/dist/packem_shared/Spacer-Bs4ER-HK.js +0 -8
  435. package/dist/packem_shared/Spinner-BuI-kN4p.js +0 -1799
  436. package/dist/packem_shared/Static-DpTd6Eed.js +0 -22
  437. package/dist/packem_shared/Static-xmD9giJj.js +0 -18
  438. package/dist/packem_shared/StaticRender-tYwH6QXl.js +0 -33
  439. package/dist/packem_shared/StatusMessage-BtSYxzwb.js +0 -14
  440. package/dist/packem_shared/StderrContext-Bj4Mf7v7.js +0 -17
  441. package/dist/packem_shared/StdinContext-Bq_GNJ3z.js +0 -38
  442. package/dist/packem_shared/StdoutContext-CgjWeCdO.js +0 -17
  443. package/dist/packem_shared/Stopwatch-DjtTCyHn.js +0 -23
  444. package/dist/packem_shared/Tab-C6r5q4hR.js +0 -7
  445. package/dist/packem_shared/Table-D-rSVlzb.js +0 -82
  446. package/dist/packem_shared/Tabs-BXpZwLWo.js +0 -146
  447. package/dist/packem_shared/Text-DvAUdZcK.js +0 -65
  448. package/dist/packem_shared/TextInput-C79WEQ5U.js +0 -137
  449. package/dist/packem_shared/Textarea-Dj06R6Zd.js +0 -272
  450. package/dist/packem_shared/Timer-wi9zuh4n.js +0 -22
  451. package/dist/packem_shared/Transform-BHxY_dAM.js +0 -14
  452. package/dist/packem_shared/TreeNodeMap-CtJUvBnd.js +0 -155
  453. package/dist/packem_shared/TreeView-C2062dtj.js +0 -148
  454. package/dist/packem_shared/TuiApp-DfxOnXqi.js +0 -120
  455. package/dist/packem_shared/TuiContext-CqEjMyXd.js +0 -415
  456. package/dist/packem_shared/UnorderedList-DhnadWjX.js +0 -33
  457. package/dist/packem_shared/ansi-parser-0BdVTKho.js +0 -41
  458. package/dist/packem_shared/ansi-tokenizer-LHq2LUWA.js +0 -307
  459. package/dist/packem_shared/boxes-oi3WUbyR.js +0 -92
  460. package/dist/packem_shared/colorize-88_Vk8cn.js +0 -48
  461. package/dist/packem_shared/comparePoints-CGMDnd3_.js +0 -287
  462. package/dist/packem_shared/createInlineLoop-BxMmcq9D.js +0 -93
  463. package/dist/packem_shared/createLinkedScrollGroup-Djw4Ceo0.js +0 -44
  464. package/dist/packem_shared/dom-DvzhsAez.js +0 -225
  465. package/dist/packem_shared/format-time-BGmnDukX.js +0 -12
  466. package/dist/packem_shared/getPathToRoot-a1wbwxfL.js +0 -4
  467. package/dist/packem_shared/getScrollHeight-BubfU_df.js +0 -63
  468. package/dist/packem_shared/input-utils-ViAEXa0Z.js +0 -19
  469. package/dist/packem_shared/isIntersecting-fEXHJN5R.js +0 -10
  470. package/dist/packem_shared/isOsc52Supported-G0k4sXJx.js +0 -36
  471. package/dist/packem_shared/isTerminalPaletteQuerySupported-EeiwMKbr.js +0 -93
  472. package/dist/packem_shared/kittyFlags-bNNf_9kX.js +0 -26
  473. package/dist/packem_shared/measure-element-Reza_yfC.js +0 -396
  474. package/dist/packem_shared/measure-text-DItZYotK.js +0 -1189
  475. package/dist/packem_shared/measureElement-CTgFCmKd.js +0 -4
  476. package/dist/packem_shared/mouse-context-BUHWKEIe.js +0 -6
  477. package/dist/packem_shared/parseSgrMouse-BHVBPP9G.js +0 -1
  478. package/dist/packem_shared/processLayout-BQ9kXfd3.js +0 -2
  479. package/dist/packem_shared/reconciler-BXf6miSS.js +0 -211
  480. package/dist/packem_shared/reconciler-gfmqURLy.js +0 -680
  481. package/dist/packem_shared/render-BAwdjfki.js +0 -2806
  482. package/dist/packem_shared/render-Bpjhf0lD.js +0 -195
  483. package/dist/packem_shared/renderToString-Cfg55DRD.js +0 -62
  484. package/dist/packem_shared/renderToString-ClIaXgrC.js +0 -86
  485. package/dist/packem_shared/renderTreeToBuffer-D3mo7M7m.js +0 -308
  486. package/dist/packem_shared/renderer-B3wROkeg.js +0 -1431
  487. package/dist/packem_shared/setEnableStyledLineCache-BpskngSJ.js +0 -2
  488. package/dist/packem_shared/squashTextNodesWithMap-iqm6OMMT.js +0 -100
  489. package/dist/packem_shared/text-width-DhuarWcB.js +0 -42
  490. package/dist/packem_shared/token-to-elements-BRFl_rzw.js +0 -249
  491. package/dist/packem_shared/treeViewTheme-BpSw9TMf.js +0 -52
  492. package/dist/packem_shared/useAnimation-kj31sA-T.js +0 -62
  493. package/dist/packem_shared/useApp-DPQlRzi5.js +0 -6
  494. package/dist/packem_shared/useBoxMetrics-rBjKc-g4.js +0 -54
  495. package/dist/packem_shared/useClipboard-B_9-adw1.js +0 -23
  496. package/dist/packem_shared/useColorBlindness-D_sTIhcb.js +0 -30
  497. package/dist/packem_shared/useConsoleCapture-Dvt7G1W1.js +0 -61
  498. package/dist/packem_shared/useCursor-BIJzc8k9.js +0 -19
  499. package/dist/packem_shared/useElementDimensions-CAoKitVD.js +0 -67
  500. package/dist/packem_shared/useFocus-CNl5QHHf.js +0 -37
  501. package/dist/packem_shared/useFocusManager-BPYaUuKQ.js +0 -16
  502. package/dist/packem_shared/useInput-Cfp5zB2s.js +0 -594
  503. package/dist/packem_shared/useIsScreenReaderEnabled-CnGKCe0f.js +0 -9
  504. package/dist/packem_shared/useKeyBindings-B78l1E1n.js +0 -66
  505. package/dist/packem_shared/useMouseAction-C5gZ2nj7.js +0 -29
  506. package/dist/packem_shared/useMouseContext-D-rFy60Q.js +0 -12
  507. package/dist/packem_shared/useMousePosition-BHBJ-kBk.js +0 -25
  508. package/dist/packem_shared/useOnMouseClick--ZIyBOBO.js +0 -35
  509. package/dist/packem_shared/useOnMouseHover-26diuXUC.js +0 -32
  510. package/dist/packem_shared/useOnMouseState-NO_Kda_C.js +0 -13
  511. package/dist/packem_shared/usePaste-Ct8J4AGR.js +0 -35
  512. package/dist/packem_shared/useScrollAcceleration-R9LfrPVG.js +0 -73
  513. package/dist/packem_shared/useScrollInput-D3CpBq_a.js +0 -72
  514. package/dist/packem_shared/useStderr-CAOVUh4E.js +0 -6
  515. package/dist/packem_shared/useStdin-X-O0kd-n.js +0 -7
  516. package/dist/packem_shared/useStdout-DyF6DSH0.js +0 -6
  517. package/dist/packem_shared/useStopwatch-qC4Beai4.js +0 -33
  518. package/dist/packem_shared/useTerminalPalette-BaWO2c4Q.js +0 -38
  519. package/dist/packem_shared/useTextBuffer-C8fEe9Ly.js +0 -398
  520. package/dist/packem_shared/useTextSelection-mXtxgsPK.js +0 -50
  521. package/dist/packem_shared/useTimer-CPQ7j827.js +0 -46
  522. package/dist/packem_shared/useTreeView-BT57P3Kx.js +0 -101
  523. package/dist/packem_shared/useTreeViewState-BpS_KZ-K.js +0 -502
  524. package/dist/packem_shared/useWindowSize-ugEmGZJm.js +0 -20
  525. package/dist/packem_shared/utils-BgdlrbOH.js +0 -140
  526. package/dist/packem_shared/variant-config-DSZoX5TM.js +0 -8
  527. package/dist/packem_shared/wrapOrTruncateStyledLine-DN3Nogoc.js +0 -147
  528. package/dist/react/devtools.d.ts +0 -27
  529. package/dist/react/focus.d.ts +0 -39
  530. package/dist/react/hooks.d.ts +0 -238
  531. package/dist/react/layout.d.ts +0 -35
  532. package/dist/react/react.d.ts +0 -57
  533. package/dist/react/reconciler.d.ts +0 -4
  534. package/dist/react/render-to-string.d.ts +0 -21
  535. package/dist/react/renderer.d.ts +0 -2
  536. package/dist/react/scene.d.ts +0 -3
  537. package/dist/react/static.d.ts +0 -39
  538. package/dist/react/styles.d.ts +0 -83
  539. package/dist/react/text-width.d.ts +0 -20
  540. package/dist/testing/keys.d.ts +0 -89
  541. package/dist/testing/screen.d.ts +0 -35
  542. package/dist/testing/wait-for.d.ts +0 -21
@@ -1,37 +0,0 @@
1
- /**
2
- * Ported from `\@zenobius/ink-mouse` (https://github.com/zenobi-us/ink-mouse)
3
- * Copyright Zeno Jiricek, licensed under Apache-2.0
4
- *
5
- * Rewritten to use a unified SGR 1006 parser with full button support.
6
- */
7
- import type { MouseButton } from "./mouse-context.d.ts";
8
- type SgrMouseEvent = {
9
- action: "press" | "release";
10
- button: MouseButton;
11
- type: "click";
12
- x: number;
13
- y: number;
14
- } | {
15
- action: "press" | "release";
16
- button: MouseButton;
17
- type: "drag";
18
- x: number;
19
- y: number;
20
- } | {
21
- type: "move";
22
- x: number;
23
- y: number;
24
- } | {
25
- direction: "scrolldown" | "scrollup";
26
- type: "scroll";
27
- x: number;
28
- y: number;
29
- };
30
- /**
31
- * Parse an SGR 1006 mouse escape sequence into a structured event.
32
- *
33
- * Returns `undefined` if the input is not a valid SGR mouse sequence.
34
- */
35
- declare const parseSgrMouse: (input: string) => SgrMouseEvent | undefined;
36
- export { parseSgrMouse };
37
- export type { SgrMouseEvent };
@@ -1,59 +0,0 @@
1
- /**
2
- * Ported from `\@zenobius/ink-mouse` (https://github.com/zenobi-us/ink-mouse)
3
- * Copyright Zeno Jiricek, licensed under Apache-2.0
4
- */
5
- declare const ANSI_CODES: {
6
- alternateScroll: {
7
- off: string;
8
- on: string;
9
- };
10
- mouseButton: {
11
- off: string;
12
- on: string;
13
- };
14
- mouseDrag: {
15
- off: string;
16
- on: string;
17
- };
18
- mouseFocus: {
19
- off: string;
20
- on: string;
21
- };
22
- mouseHighlight: {
23
- off: string;
24
- on: string;
25
- };
26
- mouseMotion: {
27
- off: string;
28
- on: string;
29
- };
30
- mouseMotionOthers: {
31
- off: string;
32
- on: string;
33
- };
34
- mousePixelMode: {
35
- off: string;
36
- on: string;
37
- };
38
- mouseSGR: {
39
- off: string;
40
- on: string;
41
- };
42
- mouseUtf8: {
43
- off: string;
44
- on: string;
45
- };
46
- mouseX10: {
47
- off: string;
48
- on: string;
49
- };
50
- };
51
- /**
52
- * Unified SGR 1006 mouse sequence pattern.
53
- *
54
- * Captures: (buttonCode) (x) (y) (M|m)
55
- * - M = press/motion, m = release
56
- * - Button code includes modifier bits (shift=+4, meta=+8, ctrl=+16)
57
- */
58
- declare const SGR_MOUSE_PATTERN: RegExp;
59
- export { ANSI_CODES, SGR_MOUSE_PATTERN };
@@ -1,20 +0,0 @@
1
- /**
2
- * Mouse tracking for terminal UIs.
3
- *
4
- * Ported from `\@zenobius/ink-mouse` (https://github.com/zenobi-us/ink-mouse)
5
- * Copyright Zeno Jiricek, licensed under Apache-2.0
6
- */
7
- export type { SgrMouseEvent } from "./ansi-parser.d.ts";
8
- export { parseSgrMouse } from "./ansi-parser.d.ts";
9
- export { default as Fullscreen } from "./Fullscreen.d.ts";
10
- export { default as isIntersecting } from "./is-intersecting.d.ts";
11
- export type { MouseAction, MouseButton, MouseClickAction, MouseContextShape, MouseDragAction, MouseEvents, MousePosition, MouseScrollAction, } from "./mouse-context.d.ts";
12
- export { default as MouseProvider } from "./MouseProvider.d.ts";
13
- export { useElementDimensions, useElementPosition } from "./use-element-position.d.ts";
14
- export { default as useMouseContext } from "./use-mouse.d.ts";
15
- export { default as useMouseAction } from "./use-mouse-action.d.ts";
16
- export { default as useMousePosition } from "./use-mouse-position.d.ts";
17
- export type { UseOnMouseClickOptions } from "./use-on-mouse-click.d.ts";
18
- export { useOnMouseClick } from "./use-on-mouse-click.d.ts";
19
- export { default as useOnMouseHover } from "./use-on-mouse-hover.d.ts";
20
- export { default as useOnMouseState } from "./use-on-mouse-state.d.ts";
@@ -1,18 +0,0 @@
1
- /**
2
- * Ported from `\@zenobius/ink-mouse` (https://github.com/zenobi-us/ink-mouse)
3
- * Copyright Zeno Jiricek, licensed under Apache-2.0
4
- */
5
- import type { MousePosition } from "./mouse-context.d.ts";
6
- /**
7
- * Determines if the mouse position is intersecting with the element's layout bounds.
8
- */
9
- declare const isIntersecting: ({ element, mouse: { x, y }, }: {
10
- element: {
11
- height: number;
12
- left: number;
13
- top: number;
14
- width: number;
15
- };
16
- mouse: MousePosition;
17
- }) => boolean;
18
- export default isIntersecting;
@@ -1,36 +0,0 @@
1
- /**
2
- * Ported from `\@zenobius/ink-mouse` (https://github.com/zenobi-us/ink-mouse)
3
- * Copyright Zeno Jiricek, licensed under Apache-2.0
4
- */
5
- import type { EventEmitter } from "node:events";
6
- import type { Context } from "react";
7
- type MousePosition = {
8
- x: number;
9
- y: number;
10
- };
11
- type MouseButton = "left" | "middle" | "right";
12
- type MouseClickAction = "press" | "release" | null;
13
- type MouseScrollAction = "scrolldown" | "scrollup" | null;
14
- type MouseDragAction = "dragging" | null;
15
- type MouseAction = MouseClickAction | MouseDragAction | MouseScrollAction;
16
- /**
17
- * Internal event emitter for mouse state changes.
18
- *
19
- * Events:
20
- * - "position" (position: MousePosition)
21
- * - "click" (position: MousePosition, action: MouseClickAction, button: MouseButton)
22
- * - "scroll" (position: MousePosition, direction: MouseScrollAction)
23
- * - "drag" (position: MousePosition, action: MouseDragAction, button: MouseButton)
24
- */
25
- type MouseEvents = EventEmitter;
26
- type MouseContextShape = {
27
- readonly button: MouseButton | null;
28
- readonly click: MouseClickAction;
29
- readonly drag: MouseDragAction;
30
- readonly events: MouseEvents;
31
- readonly position: MousePosition;
32
- readonly scroll: MouseScrollAction;
33
- };
34
- declare const MouseContext: Context<MouseContextShape | null>;
35
- export { MouseContext };
36
- export type { MouseAction, MouseButton, MouseClickAction, MouseContextShape, MouseDragAction, MouseEvents, MousePosition, MouseScrollAction };
@@ -1,29 +0,0 @@
1
- /**
2
- * Ported from `\@zenobius/ink-mouse` (https://github.com/zenobi-us/ink-mouse)
3
- * Copyright Zeno Jiricek, licensed under Apache-2.0
4
- */
5
- import type { RefObject } from "react";
6
- import type { DOMElement } from "../dom.d.ts";
7
- declare const getElementPosition: (node: DOMElement | null) => {
8
- left: number;
9
- top: number;
10
- } | undefined;
11
- declare const getElementDimensions: (node: DOMElement | null) => {
12
- height: number;
13
- width: number;
14
- } | undefined;
15
- /**
16
- * Stateful hook to provide the absolute position of the referenced element.
17
- */
18
- declare const useElementPosition: (ref: RefObject<DOMElement | null>, deps?: unknown[]) => {
19
- left: number;
20
- top: number;
21
- };
22
- /**
23
- * Stateful hook to provide the dimensions of the referenced element.
24
- */
25
- declare const useElementDimensions: (ref: RefObject<DOMElement | null>, deps?: unknown[]) => {
26
- height: number;
27
- width: number;
28
- };
29
- export { getElementDimensions, getElementPosition, useElementDimensions, useElementPosition };
@@ -1,7 +0,0 @@
1
- /**
2
- * Ported from `\@zenobius/ink-mouse` (https://github.com/zenobi-us/ink-mouse)
3
- * Copyright Zeno Jiricek, licensed under Apache-2.0
4
- */
5
- import type { MouseClickAction, MouseDragAction, MouseScrollAction } from "./mouse-context.d.ts";
6
- declare const useMouseAction: () => MouseClickAction | MouseDragAction | MouseScrollAction | null;
7
- export default useMouseAction;
@@ -1,7 +0,0 @@
1
- /**
2
- * Ported from `\@zenobius/ink-mouse` (https://github.com/zenobi-us/ink-mouse)
3
- * Copyright Zeno Jiricek, licensed under Apache-2.0
4
- */
5
- import type { MousePosition } from "./mouse-context.d.ts";
6
- declare const useMousePosition: () => MousePosition;
7
- export default useMousePosition;
@@ -1,7 +0,0 @@
1
- /**
2
- * Ported from `\@zenobius/ink-mouse` (https://github.com/zenobi-us/ink-mouse)
3
- * Copyright Zeno Jiricek, licensed under Apache-2.0
4
- */
5
- import type { MouseContextShape } from "./mouse-context.d.ts";
6
- declare const useMouseContext: () => MouseContextShape;
7
- export default useMouseContext;
@@ -1,14 +0,0 @@
1
- /**
2
- * Ported from `\@zenobius/ink-mouse` (https://github.com/zenobi-us/ink-mouse)
3
- * Copyright Zeno Jiricek, licensed under Apache-2.0
4
- */
5
- import type { RefObject } from "react";
6
- import type { DOMElement } from "../dom.d.ts";
7
- import type { MouseButton } from "./mouse-context.d.ts";
8
- type UseOnMouseClickOptions = {
9
- /** Filter to only respond to a specific mouse button. Defaults to all buttons. */
10
- button?: MouseButton;
11
- };
12
- declare const useOnMouseClick: (ref: RefObject<DOMElement | null>, onChange: (clicking: boolean, button?: MouseButton) => void, options?: UseOnMouseClickOptions) => void;
13
- export { useOnMouseClick };
14
- export type { UseOnMouseClickOptions };
@@ -1,8 +0,0 @@
1
- /**
2
- * Ported from `\@zenobius/ink-mouse` (https://github.com/zenobi-us/ink-mouse)
3
- * Copyright Zeno Jiricek, licensed under Apache-2.0
4
- */
5
- import type { RefObject } from "react";
6
- import type { DOMElement } from "../dom.d.ts";
7
- declare const useOnMouseHover: (ref: RefObject<DOMElement | null>, onChange: (event: boolean) => void) => void;
8
- export default useOnMouseHover;
@@ -1,11 +0,0 @@
1
- /**
2
- * Ported from `\@zenobius/ink-mouse` (https://github.com/zenobi-us/ink-mouse)
3
- * Copyright Zeno Jiricek, licensed under Apache-2.0
4
- */
5
- import type { RefObject } from "react";
6
- import type { DOMElement } from "../dom.d.ts";
7
- declare const useOnMouseState: (ref: RefObject<DOMElement | null>) => {
8
- clicking: boolean;
9
- hovering: boolean;
10
- };
11
- export default useOnMouseState;
@@ -1,74 +0,0 @@
1
- import type { OutputTransformer } from "./render-node-to-output.d.ts";
2
- import { StyledLine } from "./styled-line.d.ts";
3
- /**
4
- * "Virtual" output class — immediate-write model.
5
- *
6
- * Writes go directly to the StyledLine grid instead of being queued
7
- * as operations and replayed later. This eliminates the operation queue
8
- * allocation and iteration overhead.
9
- */
10
- type Options = {
11
- caches?: OutputCaches;
12
- height: number;
13
- width: number;
14
- };
15
- type Clip = {
16
- x1: number | undefined;
17
- x2: number | undefined;
18
- y1: number | undefined;
19
- y2: number | undefined;
20
- };
21
- type OutputCachesOptions = {
22
- maxEntries?: number;
23
- pruneToFactor?: number;
24
- };
25
- export declare class OutputCaches {
26
- widths: Map<string, number>;
27
- blockWidths: Map<string, number>;
28
- styledLines: Map<string, StyledLine>;
29
- lines: Map<string, string[]>;
30
- private readonly maxEntries;
31
- private readonly pruneToFactor;
32
- constructor(options?: OutputCachesOptions);
33
- getStyledLine(line: string): StyledLine;
34
- getStringWidth(text: string): number;
35
- getWidestLine(text: string): number;
36
- getLines(text: string): string[];
37
- private hasAnsiControlMarker;
38
- private setCacheEntry;
39
- private pruneCache;
40
- }
41
- export default class Output {
42
- width: number;
43
- height: number;
44
- private readonly caches;
45
- private grid;
46
- private readonly clipStack;
47
- private readonly previousLines;
48
- private readonly previousRenderedLines;
49
- private lineMemoizationEnabled;
50
- private memoizationProbeCountdown;
51
- constructor(options: Options);
52
- reset(width: number, height: number): void;
53
- startChildRegion(absX: number, absY: number, width: number, height: number): void;
54
- endChildRegion(): void;
55
- write(x: number, y: number, text: string, options: {
56
- transformers: OutputTransformer[];
57
- }): void;
58
- writeStyledLine(x: number, y: number, line: StyledLine): void;
59
- getRootLines(): ReadonlyArray<StyledLine>;
60
- getCurrentClip(): Clip | undefined;
61
- addRegionTree(region: import("./region").Region, x: number, y: number): void;
62
- private writeStyledLineToRow;
63
- get(): {
64
- height: number;
65
- output: string;
66
- };
67
- getBuffer(): {
68
- buffer: Uint32Array;
69
- height: number;
70
- };
71
- private createGrid;
72
- private disableLineMemoization;
73
- }
74
- export {};
@@ -1,22 +0,0 @@
1
- import { Buffer } from "node:buffer";
2
- export declare const nonAlphanumericKeys: string[];
3
- type ParsedKey = {
4
- capsLock?: boolean;
5
- code?: string;
6
- ctrl: boolean;
7
- eventType?: "press" | "repeat" | "release";
8
- hyper?: boolean;
9
- isKittyProtocol?: boolean;
10
- isPrintable?: boolean;
11
- meta: boolean;
12
- name: string;
13
- numLock?: boolean;
14
- option: boolean;
15
- raw: string | undefined;
16
- sequence: string;
17
- shift: boolean;
18
- super?: boolean;
19
- text?: string;
20
- };
21
- declare const parseKeypress: (s?: Buffer | string) => ParsedKey;
22
- export default parseKeypress;
@@ -1,3 +0,0 @@
1
- import createReconciler from "react-reconciler";
2
- declare const reconcilerInstance: ReturnType<typeof createReconciler>;
3
- export default reconcilerInstance;
@@ -1,99 +0,0 @@
1
- /**
2
- * Region-based hierarchical output model.
3
- *
4
- * A Region represents a rectangular area of terminal output with its own
5
- * line buffer, scroll state, and child regions. Regions form a tree that
6
- * is composited into the final screen buffer via flattenRegion().
7
- *
8
- * This enables:
9
- * - Incremental rendering (only changed regions are re-composited)
10
- * - Render caching (cachedRender stores a Region for unchanged subtrees)
11
- * - Dirty tracking (terminal buffer only writes changed lines)
12
- *
13
- * Ported from jacob314/ink (Google LLC, Apache-2.0).
14
- */
15
- import type { StyledLine } from "./styled-line.d.ts";
16
- export type Region = {
17
- backgroundColor?: string;
18
- borderBottom?: number;
19
- borderTop?: number;
20
- cachedStickyHeaders?: StickyHeader[];
21
- /** Child regions (nested content areas) */
22
- children: Region[];
23
- /** Cursor position within this region */
24
- cursorPosition?: {
25
- col: number;
26
- row: number;
27
- };
28
- height: number;
29
- /** Unique identifier for this region (used for dirty tracking) */
30
- id: number | string;
31
- isHorizontallyScrollable?: boolean;
32
- /** Whether this region supports scrolling */
33
- isScrollable: boolean;
34
- isVerticallyScrollable?: boolean;
35
- /** Content buffer — StyledLine per row, relative to (0,0) of this region */
36
- readonly lines: ReadonlyArray<StyledLine>;
37
- marginBottom?: number;
38
- marginRight?: number;
39
- /** DOM node reference for debugging/caching */
40
- nodeId?: number;
41
- opaque?: boolean;
42
- /** Layout properties */
43
- overflowToBackbuffer?: boolean;
44
- scrollbarThumbColor?: string;
45
- scrollbarVisible?: boolean;
46
- scrollHeight?: number;
47
- scrollLeft?: number;
48
- /** Scroll state */
49
- scrollTop?: number;
50
- scrollWidth?: number;
51
- /** Selectable text spans for text selection */
52
- selectableSpans: SelectableSpan[];
53
- selectableText?: string;
54
- /** Whether the scrollback position is stable */
55
- stableScrollback?: boolean;
56
- /** Sticky headers for this region */
57
- stickyHeaders: StickyHeader[];
58
- /** Trimmed output (trailing spaces removed) for final rendering */
59
- readonly styledOutput: ReadonlyArray<StyledLine>;
60
- /** Dimensions */
61
- width: number;
62
- /** Position relative to parent region */
63
- x: number;
64
- y: number;
65
- };
66
- export type SelectableSpan = {
67
- endX: number;
68
- startX: number;
69
- text: string;
70
- y: number;
71
- };
72
- export type StickyHeader = {
73
- /** Lines in the natural (scrolling) position */
74
- lines: ReadonlyArray<StyledLine>;
75
- /** Height of the header in lines */
76
- maxHeaderHeight: number;
77
- /** Natural row offset relative to content start */
78
- naturalRow: number;
79
- /** Node ID for identification */
80
- nodeId: number;
81
- /** Lines in the stuck (fixed) position */
82
- stuckLines?: ReadonlyArray<StyledLine>;
83
- /** Stuck X position relative to region */
84
- x: number;
85
- /** Stuck Y position relative to region */
86
- y: number;
87
- };
88
- export type RegionNode = {
89
- children: RegionNode[];
90
- id: number | string;
91
- };
92
- /**
93
- * Compare two region trees for structural equality (same IDs in same order).
94
- */
95
- export declare const treesEqual: (a: RegionNode, b: RegionNode) => boolean;
96
- /**
97
- * Extract selectable text from a list of selectable spans.
98
- */
99
- export declare const extractSelectableText: (spans: ReadonlyArray<SelectableSpan>) => string;
@@ -1,4 +0,0 @@
1
- import type { DOMNode } from "./dom.d.ts";
2
- import type Output from "./output.d.ts";
3
- declare const renderBackground: (x: number, y: number, node: DOMNode, output: Output) => void;
4
- export default renderBackground;
@@ -1,4 +0,0 @@
1
- import type { DOMNode } from "./dom.d.ts";
2
- import type Output from "./output.d.ts";
3
- declare const renderBorder: (x: number, y: number, node: DOMNode, output: Output) => void;
4
- export default renderBorder;
@@ -1,38 +0,0 @@
1
- import type { DOMElement, DOMNode } from "./dom.d.ts";
2
- import Output from "./output.d.ts";
3
- export type OutputTransformer = (s: string, index: number) => string;
4
- export type CursorOutputPosition = {
5
- x: number;
6
- y: number;
7
- };
8
- export type RenderState = {
9
- cursorPosition: CursorOutputPosition | undefined;
10
- cursorRequested: boolean;
11
- lastTextWriteEnd?: CursorOutputPosition;
12
- };
13
- export declare const renderNodeToScreenReaderOutput: (node: DOMElement, options?: {
14
- parentRole?: string;
15
- skipStaticElements?: boolean;
16
- }) => string;
17
- declare const renderNodeToOutput: (node: DOMElement, output: Output, options: {
18
- absoluteOffsetX?: number;
19
- absoluteOffsetY?: number;
20
- offsetX?: number;
21
- offsetY?: number;
22
- renderState?: RenderState;
23
- selectionMap?: Map<DOMNode, {
24
- end: number;
25
- start: number;
26
- }>;
27
- skipStaticElements: boolean;
28
- transformers?: OutputTransformer[];
29
- }) => void;
30
- export default renderNodeToOutput;
31
- /**
32
- * Render a DOM subtree into a cached Region.
33
- * Used by StaticRender to pre-render content once and cache it.
34
- */
35
- export declare const renderToStatic: (node: DOMElement, options?: {
36
- skipStaticElements?: boolean;
37
- trackSelection?: boolean;
38
- }) => void;
@@ -1,9 +0,0 @@
1
- import type { ScrollbarBoundingBox } from "./measure-element.d.ts";
2
- import type Output from "./output.d.ts";
3
- export type RenderScrollbarOptions = {
4
- axis: "horizontal" | "vertical";
5
- color?: string;
6
- layout: ScrollbarBoundingBox;
7
- output: Output;
8
- };
9
- export declare const renderScrollbar: ({ axis, color, layout, output }: RenderScrollbarOptions) => void;
@@ -1,44 +0,0 @@
1
- import type { DOMElement } from "./dom.d.ts";
2
- import type Output from "./output.d.ts";
3
- import type { OutputTransformer } from "./render-node-to-output.d.ts";
4
- export type StickyNodeInfo = {
5
- node: DOMElement;
6
- type: "top" | "bottom";
7
- };
8
- /**
9
- * Factory function type for creating Output instances.
10
- * Passed as a parameter to avoid circular dependency between render-sticky and output.
11
- */
12
- export type OutputFactory = (options: {
13
- height: number;
14
- width: number;
15
- }) => Output;
16
- /**
17
- * Walk the DOM tree under `node` to find all sticky descendants.
18
- * Stops at scroll boundaries (nested scrollable containers own their sticky nodes).
19
- */
20
- export declare const getStickyDescendants: (node: DOMElement, result?: StickyNodeInfo[]) => StickyNodeInfo[];
21
- /**
22
- * Identify which sticky nodes are currently active (should be pinned)
23
- * based on the scroll position and viewport.
24
- */
25
- export declare const identifyActiveStickyNodes: (stickyNodes: StickyNodeInfo[], node: DOMElement, scrollTop: number, viewportBottom: number) => {
26
- nextStickyNodeInfo?: StickyNodeInfo;
27
- stickyNode: DOMElement;
28
- type: "top" | "bottom";
29
- }[];
30
- /**
31
- * Render active sticky headers and write them to the output at their stuck positions.
32
- * Called during the rendering of a scrollable container.
33
- * @param createOutput Factory function for creating Output instances (avoids circular imports).
34
- */
35
- export declare const renderActiveStickyNodes: (activeStickyNodes: {
36
- nextStickyNodeInfo?: StickyNodeInfo;
37
- stickyNode: DOMElement;
38
- type: "top" | "bottom";
39
- }[], node: DOMElement, output: Output, createOutput: OutputFactory, options: {
40
- newTransformers: OutputTransformer[];
41
- skipStaticElements: boolean;
42
- x: number;
43
- y: number;
44
- }) => void;
@@ -1,37 +0,0 @@
1
- import type { ReactNode } from "react";
2
- export type RenderToStringOptions = {
3
- /**
4
- * Width of the virtual terminal in columns.
5
- * @default 80
6
- */
7
- columns?: number;
8
- };
9
- /**
10
- * Render a React element to a string synchronously. Unlike `render()`, this function does not write to stdout, does not set up any terminal event listeners, and returns the rendered output as a string.
11
- *
12
- * Useful for generating documentation, writing output to files, testing, or any scenario where you need the rendered output as a string without starting a persistent terminal application.
13
- *
14
- *Notes:**
15
- *
16
- * - Terminal-specific hooks (`useInput`, `useStdin`, `useStdout`, `useStderr`, `useApp`, `useFocus`, `useFocusManager`) return default no-op values since there is no terminal session. They will not throw, but they will not function as in a live terminal.
17
- * - `useEffect` callbacks will execute during rendering (due to synchronous rendering mode), but state updates they trigger will not affect the returned output, which reflects the initial render.
18
- * - `useLayoutEffect` callbacks fire synchronously during commit, so state updates they trigger **will** be reflected in the output.
19
- - The `<Static>` component is supported — its output is prepended to the dynamic output.
20
- - If a component throws during rendering, the error is propagated to the caller after cleanup.
21
-
22
- @example
23
- ```
24
- import {renderToString, Text, Box} from 'ink';
25
-
26
- const output = renderToString(
27
- <Box padding={1}>
28
- <Text color="green">Hello World</Text>
29
- </Box>,
30
- {columns: 40}
31
- );
32
-
33
- console.log(output);
34
- ```
35
- */
36
- declare const renderToString: (node: ReactNode, options?: RenderToStringOptions) => string;
37
- export default renderToString;