@visulima/tui 1.0.0-alpha.6 → 1.0.0-alpha.8

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 (412) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/dist/core/index.js +1 -5
  3. package/dist/ink/index.d.ts +15 -34
  4. package/dist/ink/index.js +1 -155
  5. package/dist/packem_chunks/devtools.js +3 -26
  6. package/dist/packem_shared/Accordion-BXsqchV-.js +1 -0
  7. package/dist/packem_shared/Alert-BhYVMHtR.js +1 -0
  8. package/dist/packem_shared/AnimatePresence-Eu7Z8KHc.js +1 -0
  9. package/dist/packem_shared/ApprovalPrompt-BSn0FT1g.js +1 -0
  10. package/dist/packem_shared/AreaChart-Chy-frI7.js +1 -0
  11. package/dist/packem_shared/Badge-B8WPyRsK.js +1 -0
  12. package/dist/packem_shared/BarChart-rpZtlMcF.js +1 -0
  13. package/dist/packem_shared/BigText-CRpwUzrt.js +1 -0
  14. package/dist/packem_shared/BlinkDot-BvnRuWP8.js +1 -0
  15. package/dist/packem_shared/Box-BwqSvWuq.js +1 -0
  16. package/dist/packem_shared/Breadcrumb-D0hClbRV.js +1 -0
  17. package/dist/packem_shared/Button-B89Yvbc6.js +1 -0
  18. package/dist/packem_shared/COLOR_BLINDNESS_SIMULATION-DqErf7XX.js +1 -0
  19. package/dist/packem_shared/Calendar-Dmflvm2S.js +1 -0
  20. package/dist/packem_shared/Canvas-CKg6WV47.js +1 -0
  21. package/dist/packem_shared/Card-B_9fXdtU.js +1 -0
  22. package/dist/packem_shared/Cell-BrXn3jxY.js +1 -0
  23. package/dist/packem_shared/Checkbox-BN71eCWU.js +1 -0
  24. package/dist/packem_shared/Code-HhevcyiH.js +2 -0
  25. package/dist/packem_shared/Collapsible-u6uf_FdV.js +1 -0
  26. package/dist/packem_shared/CommandBlock-B-nslpCv.js +4 -0
  27. package/dist/packem_shared/CommandPalette-CEFdaURo.js +1 -0
  28. package/dist/packem_shared/ConfirmDialog-5Jje_Xpu.js +1 -0
  29. package/dist/packem_shared/ConfirmInput-D44Mb9oo.js +1 -0
  30. package/dist/packem_shared/ConsoleOverlay-CM3APfgP.js +1 -0
  31. package/dist/packem_shared/ContentSwitcher-Dm5BkrCt.js +1 -0
  32. package/dist/packem_shared/ControlledScrollView-DI8KZOQB.js +1 -0
  33. package/dist/packem_shared/Cursor-BoLFIMol.js +1 -0
  34. package/dist/packem_shared/DatePicker-CnSrFFAE.js +1 -0
  35. package/dist/packem_shared/DefinitionList-v8RDuF_R.js +1 -0
  36. package/dist/packem_shared/DevTools-O8EbCfHa.js +1 -0
  37. package/dist/packem_shared/Dialog-CTaL8pn0.js +1 -0
  38. package/dist/packem_shared/DiffView-BUIFqUB0.js +1 -0
  39. package/dist/packem_shared/Divider-C47bKmqu.js +1 -0
  40. package/dist/packem_shared/FilePicker-CUo7R5Qb.js +1 -0
  41. package/dist/packem_shared/FocusContext-Xy0cwJpO.js +1 -0
  42. package/dist/packem_shared/FormField-af3aUpRL.js +1 -0
  43. package/dist/packem_shared/Fullscreen-CuJ8y0s0.js +1 -0
  44. package/dist/packem_shared/Gauge-Dz-usH__.js +1 -0
  45. package/dist/packem_shared/Gradient-DYNc0GZA.js +1 -0
  46. package/dist/packem_shared/Heading-mwEYza3Y.js +1 -0
  47. package/dist/packem_shared/Heatmap-ChL97U1-.js +1 -0
  48. package/dist/packem_shared/Help-Zcelyw_U.js +1 -0
  49. package/dist/packem_shared/Histogram-FIf2F83d.js +1 -0
  50. package/dist/packem_shared/IMECompositionBuffer-C89PhiOu.js +1 -0
  51. package/dist/packem_shared/InputParser-rZKjY_7Y.js +2 -0
  52. package/dist/packem_shared/KEY-Bk8B-3h_.js +1 -0
  53. package/dist/packem_shared/Kbd-DpkPp4jB.js +1 -0
  54. package/dist/packem_shared/LayoutNode-rxblE317.js +1 -0
  55. package/dist/packem_shared/LineChart-BXE_girm.js +1 -0
  56. package/dist/packem_shared/Link-i2o2EG4-.js +1 -0
  57. package/dist/packem_shared/LoadingIndicator-TC1Fjwyt.js +1 -0
  58. package/dist/packem_shared/Markdown-R1XqK63D.js +1 -0
  59. package/dist/packem_shared/MaskedInput-J01phOZs.js +1 -0
  60. package/dist/packem_shared/Menu-CfrH4ymk.js +1 -0
  61. package/dist/packem_shared/MessageBubble-BmBBU2Rm.js +1 -0
  62. package/dist/packem_shared/ModelBadge-D3wrXncu.js +1 -0
  63. package/dist/packem_shared/MouseProvider-pjza-lpc.js +1 -0
  64. package/dist/packem_shared/MultiSelect-Dqmn-bVo.js +1 -0
  65. package/dist/packem_shared/NAMED_COLORS-B9fJsYdg.js +1 -0
  66. package/dist/packem_shared/Newline-BSG4iUqp.js +2 -0
  67. package/dist/packem_shared/OperationTree-DksxjMIV.js +1 -0
  68. package/dist/packem_shared/OptionList-CNx7r9yN.js +1 -0
  69. package/dist/packem_shared/OrderedList-BeDy035w.js +1 -0
  70. package/dist/packem_shared/Paginator-B56s6bhS.js +1 -0
  71. package/dist/packem_shared/Paragraph-BqJlH0R-.js +1 -0
  72. package/dist/packem_shared/Placeholder-GMpHRGC8.js +1 -0
  73. package/dist/packem_shared/ProgressBar-Bj3fmORR.js +1 -0
  74. package/dist/packem_shared/RadioGroup-Br8BeEwS.js +1 -0
  75. package/dist/packem_shared/Renderer-DJXooAsp.js +1 -0
  76. package/dist/packem_shared/ResizeObserverEntry-Dq0dk8Kq.js +1 -0
  77. package/dist/packem_shared/ScatterPlot-OhfYco5l.js +1 -0
  78. package/dist/packem_shared/ScrollBar-Da5Y3z7N.js +1 -0
  79. package/dist/packem_shared/ScrollBarBox-Dz6F-Eat.js +1 -0
  80. package/dist/packem_shared/ScrollList-DiVGyEjv.js +1 -0
  81. package/dist/packem_shared/ScrollView-BojONotI.js +1 -0
  82. package/dist/packem_shared/SearchInput-BoPTRbhV.js +1 -0
  83. package/dist/packem_shared/SelectInput-CAJ7SCBq.js +1 -0
  84. package/dist/packem_shared/SelectInputIndicator-N1n8ULHs.js +1 -0
  85. package/dist/packem_shared/SelectInputItem-BEkbmobs.js +1 -0
  86. package/dist/packem_shared/ShimmerText-CuGQ2NDC.js +1 -0
  87. package/dist/packem_shared/Slider-Cg_tJpKa.js +1 -0
  88. package/dist/packem_shared/Spacer-eT3HOrXk.js +1 -0
  89. package/dist/packem_shared/Sparkline-T6_FPVET.js +1 -0
  90. package/dist/packem_shared/Spinner-B0-A50pu.js +1 -0
  91. package/dist/packem_shared/Static-DLynr5pn.js +1 -0
  92. package/dist/packem_shared/Static-jzLPaHJF.js +1 -0
  93. package/dist/packem_shared/StaticRender-BgD61E7x.js +1 -0
  94. package/dist/packem_shared/StatusLine-Ch4jjef1.js +1 -0
  95. package/dist/packem_shared/StatusMessage-B1qfKeMM.js +1 -0
  96. package/dist/packem_shared/Stepper-CNPAqxiU.js +1 -0
  97. package/dist/packem_shared/Stopwatch-CAx2EWwq.js +1 -0
  98. package/dist/packem_shared/StreamingText-BYOKSB2T.js +1 -0
  99. package/dist/packem_shared/Switch-DzSpKYu7.js +1 -0
  100. package/dist/packem_shared/Tab-BcXzSUdj.js +1 -0
  101. package/dist/packem_shared/Table-DJp1TLrR.js +1 -0
  102. package/dist/packem_shared/Tabs-D68z0SOt.js +1 -0
  103. package/dist/packem_shared/Tag-BvLHnYRn.js +1 -0
  104. package/dist/packem_shared/Text-mTAve9R2.js +1 -0
  105. package/dist/packem_shared/TextInput-C_gYQlnF.js +1 -0
  106. package/dist/packem_shared/Textarea-C2ET_oMb.js +2 -0
  107. package/dist/packem_shared/Timer-CI3aQX65.js +1 -0
  108. package/dist/packem_shared/Toast-Drvc8XfG.js +1 -0
  109. package/dist/packem_shared/Tooltip-C5UnQlLd.js +1 -0
  110. package/dist/packem_shared/Transform-fYmcdqRT.js +1 -0
  111. package/dist/packem_shared/Transition-CJDBKYUB.js +1 -0
  112. package/dist/packem_shared/TreeNodeMap-CspqSCpb.js +1 -0
  113. package/dist/packem_shared/TreeView-DjhacGJ5.js +1 -0
  114. package/dist/packem_shared/TuiApp-DrjI_i-R.js +1 -0
  115. package/dist/packem_shared/TuiContext-BoJvG3NN.js +3 -0
  116. package/dist/packem_shared/UnorderedList-BnfqexZs.js +1 -0
  117. package/dist/packem_shared/accessibility-context-DDyHTwmA.js +1 -0
  118. package/dist/packem_shared/animation-context-DW3p-vpk.js +1 -0
  119. package/dist/packem_shared/ansi-parser-B6uXaq65.js +1 -0
  120. package/dist/packem_shared/ansi-tokenizer-DqX9nJuk.js +1 -0
  121. package/dist/packem_shared/app-context-BVpKlG1z.js +1 -0
  122. package/dist/packem_shared/background-context-rjOaWFki.js +1 -0
  123. package/dist/packem_shared/boxes-DyY_LXCi.js +1 -0
  124. package/dist/packem_shared/braille-BBjIoaN0.js +1 -0
  125. package/dist/packem_shared/colorize-DbTZMrJO.js +1 -0
  126. package/dist/packem_shared/comparePoints-C85EsmNz.js +1 -0
  127. package/dist/packem_shared/controlled-scroll-view-CmrAEvJk.js +1 -0
  128. package/dist/packem_shared/createInlineLoop-DRNZ7jqH.js +2 -0
  129. package/dist/packem_shared/createLinkedScrollGroup-BMTJ7rAj.js +1 -0
  130. package/dist/packem_shared/createMemoryStorage-QVZNXbWz.js +2 -0
  131. package/dist/packem_shared/createScreen-CrLrxA6t.js +3 -0
  132. package/dist/packem_shared/cursor-context-CFviBqPX.js +1 -0
  133. package/dist/packem_shared/dom-4y__5fWB.js +1 -0
  134. package/dist/packem_shared/focus-context-CsT69klR.js +1 -0
  135. package/dist/packem_shared/format-time-C7Q-hQZq.js +1 -0
  136. package/dist/packem_shared/getPathToRoot-B2tKmx3i.js +1 -0
  137. package/dist/packem_shared/getScrollHeight-BTEY8ewu.js +1 -0
  138. package/dist/packem_shared/input-utils-fAxzSlNh.js +1 -0
  139. package/dist/packem_shared/isIntersecting-B3KbKTmu.js +1 -0
  140. package/dist/packem_shared/isOsc52Supported-DKK7Uee6.js +1 -0
  141. package/dist/packem_shared/isTerminalPaletteQuerySupported-Dn2hFAZ_.js +1 -0
  142. package/dist/packem_shared/kittyFlags-C3rZLbcK.js +1 -0
  143. package/dist/packem_shared/line-chart-DrM8PwnI.js +1 -0
  144. package/dist/packem_shared/measure-element-DSp7YDus.js +2 -0
  145. package/dist/packem_shared/measure-text-DDjHT1jD.js +3 -0
  146. package/dist/packem_shared/measureElement-DA8WqFP_.js +1 -0
  147. package/dist/packem_shared/mouse-context-DaARgUu1.js +1 -0
  148. package/dist/packem_shared/parseSgrMouse-Ccj70ijb.js +1 -0
  149. package/dist/packem_shared/processLayout-DXDfFb_d.js +1 -0
  150. package/dist/packem_shared/reconciler-BuOP-TZ6.js +1 -0
  151. package/dist/packem_shared/reconciler-DSYCrIZs.js +1 -0
  152. package/dist/packem_shared/render-DDqtMAFN.js +1 -0
  153. package/dist/packem_shared/render-_r0K9K11.js +28 -0
  154. package/dist/packem_shared/renderToString-DeqOWRP8.js +4 -0
  155. package/dist/packem_shared/renderToString-IYYPyASm.js +2 -0
  156. package/dist/packem_shared/renderTreeToBuffer-DPkoCgP2.js +2 -0
  157. package/dist/packem_shared/renderer-D2p6av2X.js +17 -0
  158. package/dist/packem_shared/setEnableStyledLineCache-D2gZbwFM.js +1 -0
  159. package/dist/packem_shared/squashTextNodesWithMap-Cpqmc45i.js +1 -0
  160. package/dist/packem_shared/stderr-context-BzEaUICS.js +1 -0
  161. package/dist/packem_shared/stdin-context-BTaaFagk.js +1 -0
  162. package/dist/packem_shared/stdout-context-BnblEPez.js +1 -0
  163. package/dist/packem_shared/text-width-CZ9vPvM0.js +2 -0
  164. package/dist/packem_shared/token-to-elements-BYxT6J_Q.js +1 -0
  165. package/dist/packem_shared/treeViewTheme-1RIZyB4M.js +1 -0
  166. package/dist/packem_shared/useAnimation-B9we6ZzL.js +1 -0
  167. package/dist/packem_shared/useApp-B6fvM42d.js +1 -0
  168. package/dist/packem_shared/useBoxMetrics-D5pkIr6P.js +1 -0
  169. package/dist/packem_shared/useClipboard-CBxy0hT8.js +1 -0
  170. package/dist/packem_shared/useColorBlindness-BvWcu2Bb.js +1 -0
  171. package/dist/packem_shared/useConsoleCapture-BxiG8iLJ.js +1 -0
  172. package/dist/packem_shared/useCursor-CPu8T5Db.js +1 -0
  173. package/dist/packem_shared/useElementDimensions-qJ_WXFZ9.js +1 -0
  174. package/dist/packem_shared/useFocus-DSmziO_x.js +1 -0
  175. package/dist/packem_shared/useFocusManager-Uapn3LQo.js +1 -0
  176. package/dist/packem_shared/useForm-CzV-Oext.js +1 -0
  177. package/dist/packem_shared/useHotkey-D0dGey14.js +1 -0
  178. package/dist/packem_shared/useInput-D1_jG26Z.js +2 -0
  179. package/dist/packem_shared/useInterval-AobjZT3u.js +1 -0
  180. package/dist/packem_shared/useIsScreenReaderEnabled-DjWHh-II.js +1 -0
  181. package/dist/packem_shared/useKeyBindings-zabkEJQs.js +1 -0
  182. package/dist/packem_shared/useKeyChord-CICQIxXj.js +1 -0
  183. package/dist/packem_shared/useMouseAction-2dRfU1vE.js +1 -0
  184. package/dist/packem_shared/useMouseContext-C746G7kY.js +1 -0
  185. package/dist/packem_shared/useMousePosition-BTWfV4JK.js +1 -0
  186. package/dist/packem_shared/useOnMouseClick-nY8xLZmt.js +1 -0
  187. package/dist/packem_shared/useOnMouseHover-D3DczIol.js +1 -0
  188. package/dist/packem_shared/useOnMouseState-cRK8QvzD.js +1 -0
  189. package/dist/packem_shared/usePaste-CKKB9H-Z.js +1 -0
  190. package/dist/packem_shared/useScrollAcceleration-NrY1oVMs.js +1 -0
  191. package/dist/packem_shared/useScrollInput-Caghtn-Q.js +1 -0
  192. package/dist/packem_shared/useStderr-BDZb6InG.js +1 -0
  193. package/dist/packem_shared/useStdin-DKa4h35k.js +1 -0
  194. package/dist/packem_shared/useStdout-B-2lX4C5.js +1 -0
  195. package/dist/packem_shared/useStopwatch-DffK7iMh.js +1 -0
  196. package/dist/packem_shared/useTerminalPalette-Cv7tSduR.js +1 -0
  197. package/dist/packem_shared/useTextBuffer-DekkGLxI.js +4 -0
  198. package/dist/packem_shared/useTextSelection-CGT0GLDR.js +1 -0
  199. package/dist/packem_shared/useTimeout-7LEFYTnG.js +1 -0
  200. package/dist/packem_shared/useTimer-DyoqSyGi.js +1 -0
  201. package/dist/packem_shared/useTreeView-8UlTK6sW.js +1 -0
  202. package/dist/packem_shared/useTreeViewState-CRPCUWrb.js +1 -0
  203. package/dist/packem_shared/useWindowSize-yDZsXF8z.js +1 -0
  204. package/dist/packem_shared/utils-THUhYKG2.js +1 -0
  205. package/dist/packem_shared/variant-config-BJqpNo7H.js +1 -0
  206. package/dist/packem_shared/waitFor-Dj5zfL5s.js +4 -0
  207. package/dist/packem_shared/wrapOrTruncateStyledLine-BZ00SM8i.js +3 -0
  208. package/dist/react/index.js +1 -9
  209. package/dist/testing/index.js +1 -152
  210. package/package.json +9 -9
  211. package/dist/packem_shared/Accordion-BG-yfIkV.js +0 -80
  212. package/dist/packem_shared/Alert-BLcwIW8V.js +0 -17
  213. package/dist/packem_shared/AnimatePresence-D8nEOr_B.js +0 -98
  214. package/dist/packem_shared/ApprovalPrompt-BXdPros1.js +0 -104
  215. package/dist/packem_shared/AreaChart-CmTcxLum.js +0 -116
  216. package/dist/packem_shared/Badge-CUfbXwAB.js +0 -13
  217. package/dist/packem_shared/BarChart-DWRae67P.js +0 -87
  218. package/dist/packem_shared/BigText-CVq2X7B5.js +0 -24
  219. package/dist/packem_shared/BlinkDot-CrbHMR3L.js +0 -11
  220. package/dist/packem_shared/Box-W1w_NGin.js +0 -71
  221. package/dist/packem_shared/Breadcrumb-CPdNxVYs.js +0 -26
  222. package/dist/packem_shared/Button-CBmTbJ_D.js +0 -57
  223. package/dist/packem_shared/COLOR_BLINDNESS_SIMULATION-BsMy5Ewl.js +0 -81
  224. package/dist/packem_shared/Calendar-C2Qxt-LA.js +0 -139
  225. package/dist/packem_shared/Canvas-COttmLPX.js +0 -246
  226. package/dist/packem_shared/Card-D3tGkNCm.js +0 -24
  227. package/dist/packem_shared/Cell-DCg1kJY-.js +0 -48
  228. package/dist/packem_shared/Checkbox-Dpy_4Lws.js +0 -49
  229. package/dist/packem_shared/Code-CwzzbsLx.js +0 -53
  230. package/dist/packem_shared/Collapsible-BMDrXf5C.js +0 -45
  231. package/dist/packem_shared/CommandBlock-jdOGJPjY.js +0 -80
  232. package/dist/packem_shared/CommandPalette-B5IfUQwi.js +0 -146
  233. package/dist/packem_shared/ConfirmDialog-5XJv3Cc4.js +0 -67
  234. package/dist/packem_shared/ConfirmInput-CxUS0XAA.js +0 -44
  235. package/dist/packem_shared/ConsoleOverlay-BvnCEgjG.js +0 -57
  236. package/dist/packem_shared/ContentSwitcher-BHFpO5Za.js +0 -81
  237. package/dist/packem_shared/ControlledScrollView-C2wOOlJO.js +0 -5
  238. package/dist/packem_shared/Cursor-DiW7YoSK.js +0 -18
  239. package/dist/packem_shared/DatePicker-CPejKoqS.js +0 -73
  240. package/dist/packem_shared/DefinitionList-BAwr0l5J.js +0 -18
  241. package/dist/packem_shared/DevTools-BdxRSkhL.js +0 -63
  242. package/dist/packem_shared/Dialog-S9r7Izff.js +0 -71
  243. package/dist/packem_shared/DiffView-BR4T6-Sj.js +0 -329
  244. package/dist/packem_shared/Divider-DocXIqNn.js +0 -30
  245. package/dist/packem_shared/FilePicker-BZ55oF_n.js +0 -261
  246. package/dist/packem_shared/FocusContext-D5wFxSRz.js +0 -153
  247. package/dist/packem_shared/FormField-BSG16cnA.js +0 -29
  248. package/dist/packem_shared/Fullscreen-DO7voOq5.js +0 -11
  249. package/dist/packem_shared/Gauge-CKXUXxft.js +0 -122
  250. package/dist/packem_shared/Gradient-Dg0NezWc.js +0 -136
  251. package/dist/packem_shared/Heading-BnR7McmP.js +0 -29
  252. package/dist/packem_shared/Heatmap-_jqISOU0.js +0 -79
  253. package/dist/packem_shared/Help-0yZ_IcQg.js +0 -105
  254. package/dist/packem_shared/Histogram-CB6XcmZW.js +0 -92
  255. package/dist/packem_shared/IMECompositionBuffer-Dl3S0KnF.js +0 -55
  256. package/dist/packem_shared/InputParser-BlsfeY9J.js +0 -158
  257. package/dist/packem_shared/KEY-STOdi-nc.js +0 -74
  258. package/dist/packem_shared/Kbd-BNDXQgey.js +0 -19
  259. package/dist/packem_shared/LayoutNode-DAkKg9TE.js +0 -129
  260. package/dist/packem_shared/LineChart-ef3HF816.js +0 -7
  261. package/dist/packem_shared/Link-DZ2Tiq1m.js +0 -66
  262. package/dist/packem_shared/LoadingIndicator-DzbLGfyJ.js +0 -13
  263. package/dist/packem_shared/Markdown-33bpCUoe.js +0 -212
  264. package/dist/packem_shared/MaskedInput-Ctr6v2dO.js +0 -119
  265. package/dist/packem_shared/Menu-CeKxhEix.js +0 -112
  266. package/dist/packem_shared/MessageBubble-BMoU8L2Q.js +0 -26
  267. package/dist/packem_shared/ModelBadge-CNIxPs7v.js +0 -40
  268. package/dist/packem_shared/MouseProvider-CekPbXCh.js +0 -136
  269. package/dist/packem_shared/MultiSelect-yz7-w0Zv.js +0 -129
  270. package/dist/packem_shared/NAMED_COLORS-DcI3erCu.js +0 -300
  271. package/dist/packem_shared/Newline-DBtYEg8x.js +0 -7
  272. package/dist/packem_shared/OperationTree-Dudx5o1o.js +0 -67
  273. package/dist/packem_shared/OptionList-CTyqQaZ1.js +0 -24
  274. package/dist/packem_shared/OrderedList-VsvSmHUC.js +0 -26
  275. package/dist/packem_shared/Paginator-DmGogvEI.js +0 -104
  276. package/dist/packem_shared/Paragraph-CNNhfepo.js +0 -9
  277. package/dist/packem_shared/Placeholder-DkM69Q8Z.js +0 -29
  278. package/dist/packem_shared/ProgressBar-B7cS4uQm.js +0 -22
  279. package/dist/packem_shared/RadioGroup-B4F9PUyL.js +0 -108
  280. package/dist/packem_shared/Renderer-zZ5O3vxc.js +0 -31
  281. package/dist/packem_shared/ResizeObserverEntry-Vr8GZ74x.js +0 -102
  282. package/dist/packem_shared/ScatterPlot-CWOg4G5h.js +0 -63
  283. package/dist/packem_shared/ScrollBar-DFeWH43I.js +0 -106
  284. package/dist/packem_shared/ScrollBarBox-C7VL6Izd.js +0 -72
  285. package/dist/packem_shared/ScrollList-DRcr_RrN.js +0 -227
  286. package/dist/packem_shared/ScrollView-C6rdlGwU.js +0 -196
  287. package/dist/packem_shared/SearchInput-cB8zFhSg.js +0 -32
  288. package/dist/packem_shared/SelectInput-WzZSqp72.js +0 -260
  289. package/dist/packem_shared/SelectInputIndicator-DKeN6v5Z.js +0 -9
  290. package/dist/packem_shared/SelectInputItem-CxFL3spM.js +0 -8
  291. package/dist/packem_shared/ShimmerText-B2VbPUSB.js +0 -34
  292. package/dist/packem_shared/Slider-BOrNTOQe.js +0 -116
  293. package/dist/packem_shared/Spacer-DhmXyTb8.js +0 -8
  294. package/dist/packem_shared/Sparkline-BSbjPrwK.js +0 -44
  295. package/dist/packem_shared/Spinner-BcO5BCAa.js +0 -1942
  296. package/dist/packem_shared/Static-DpTd6Eed.js +0 -22
  297. package/dist/packem_shared/Static-xmD9giJj.js +0 -18
  298. package/dist/packem_shared/StaticRender-C3XWvJdC.js +0 -69
  299. package/dist/packem_shared/StatusLine-DQNUstN9.js +0 -22
  300. package/dist/packem_shared/StatusMessage-BYTL6Pl-.js +0 -14
  301. package/dist/packem_shared/Stepper-CmUPRK3z.js +0 -60
  302. package/dist/packem_shared/Stopwatch-zqLQAxXC.js +0 -21
  303. package/dist/packem_shared/StreamingText-BmuoJtGu.js +0 -38
  304. package/dist/packem_shared/Switch-DcPdy8nm.js +0 -59
  305. package/dist/packem_shared/Tab-C6r5q4hR.js +0 -7
  306. package/dist/packem_shared/Table-Bgxo87Df.js +0 -88
  307. package/dist/packem_shared/Tabs-DubuHdYV.js +0 -164
  308. package/dist/packem_shared/Tag-CCqM7Ee9.js +0 -35
  309. package/dist/packem_shared/Text-CtUwV89_.js +0 -65
  310. package/dist/packem_shared/TextInput-C9r7zT0U.js +0 -137
  311. package/dist/packem_shared/Textarea-CGmgt-Nl.js +0 -272
  312. package/dist/packem_shared/Timer-D7ZZ0_wz.js +0 -20
  313. package/dist/packem_shared/Toast-DXSCXFPY.js +0 -37
  314. package/dist/packem_shared/Tooltip-SvVjj-2k.js +0 -32
  315. package/dist/packem_shared/Transform-Cfyva2wd.js +0 -14
  316. package/dist/packem_shared/Transition-CbNfKhaj.js +0 -108
  317. package/dist/packem_shared/TreeNodeMap-CtJUvBnd.js +0 -155
  318. package/dist/packem_shared/TreeView-DGlZeSsK.js +0 -148
  319. package/dist/packem_shared/TuiApp-DtdgNRWa.js +0 -122
  320. package/dist/packem_shared/TuiContext-lXmJFd-x.js +0 -418
  321. package/dist/packem_shared/UnorderedList-D8RPaEAW.js +0 -33
  322. package/dist/packem_shared/accessibility-context-BLelHhNU.js +0 -7
  323. package/dist/packem_shared/animation-context-BcJg8Jr6.js +0 -15
  324. package/dist/packem_shared/ansi-parser-BOP8fNdT.js +0 -43
  325. package/dist/packem_shared/ansi-tokenizer-LHq2LUWA.js +0 -307
  326. package/dist/packem_shared/app-context-CP0U6H7O.js +0 -11
  327. package/dist/packem_shared/background-context-BAUaxfOb.js +0 -5
  328. package/dist/packem_shared/boxes-oi3WUbyR.js +0 -92
  329. package/dist/packem_shared/braille-BoEWoH2I.js +0 -93
  330. package/dist/packem_shared/colorize-88_Vk8cn.js +0 -48
  331. package/dist/packem_shared/comparePoints-CAAlhiMS.js +0 -287
  332. package/dist/packem_shared/controlled-scroll-view-DJXfdWMm.js +0 -286
  333. package/dist/packem_shared/createInlineLoop-Dnfm1ZSJ.js +0 -99
  334. package/dist/packem_shared/createLinkedScrollGroup-Djw4Ceo0.js +0 -44
  335. package/dist/packem_shared/createMemoryStorage-esFJ61La.js +0 -115
  336. package/dist/packem_shared/createScreen-Dh0sZlQ0.js +0 -38
  337. package/dist/packem_shared/cursor-context-JxRzlqAx.js +0 -9
  338. package/dist/packem_shared/dom-CrbpQgat.js +0 -228
  339. package/dist/packem_shared/focus-context-CWkYtgcm.js +0 -26
  340. package/dist/packem_shared/format-time-BGmnDukX.js +0 -12
  341. package/dist/packem_shared/getPathToRoot-BbvlppLC.js +0 -4
  342. package/dist/packem_shared/getScrollHeight-Cz3CDQN2.js +0 -63
  343. package/dist/packem_shared/input-utils-ViAEXa0Z.js +0 -19
  344. package/dist/packem_shared/isIntersecting-fEXHJN5R.js +0 -10
  345. package/dist/packem_shared/isOsc52Supported-G0k4sXJx.js +0 -36
  346. package/dist/packem_shared/isTerminalPaletteQuerySupported-EeiwMKbr.js +0 -93
  347. package/dist/packem_shared/kittyFlags-bNNf_9kX.js +0 -26
  348. package/dist/packem_shared/line-chart-VGU2l7pu.js +0 -139
  349. package/dist/packem_shared/measure-element-Bc6PEaIe.js +0 -405
  350. package/dist/packem_shared/measure-text-BdOhbOeh.js +0 -1256
  351. package/dist/packem_shared/measureElement-DTELRaij.js +0 -4
  352. package/dist/packem_shared/mouse-context-BUHWKEIe.js +0 -6
  353. package/dist/packem_shared/parseSgrMouse-4hpBJBsW.js +0 -1
  354. package/dist/packem_shared/processLayout-B0Coz0Ua.js +0 -2
  355. package/dist/packem_shared/reconciler-Dd7Z0A97.js +0 -696
  356. package/dist/packem_shared/reconciler-mzMwSOft.js +0 -221
  357. package/dist/packem_shared/render-Bm9Oa1sG.js +0 -2799
  358. package/dist/packem_shared/render-CjlKdg4m.js +0 -199
  359. package/dist/packem_shared/renderToString-CWYS1ZXE.js +0 -86
  360. package/dist/packem_shared/renderToString-DB3ILWFm.js +0 -62
  361. package/dist/packem_shared/renderTreeToBuffer-CDDTGyZn.js +0 -311
  362. package/dist/packem_shared/renderer-GE9OLNNM.js +0 -1437
  363. package/dist/packem_shared/setEnableStyledLineCache-D5f4favX.js +0 -2
  364. package/dist/packem_shared/squashTextNodesWithMap-iqm6OMMT.js +0 -100
  365. package/dist/packem_shared/stderr-context-Bj4Mf7v7.js +0 -17
  366. package/dist/packem_shared/stdin-context-Bq_GNJ3z.js +0 -38
  367. package/dist/packem_shared/stdout-context-CgjWeCdO.js +0 -17
  368. package/dist/packem_shared/text-width-Db-AxMea.js +0 -43
  369. package/dist/packem_shared/token-to-elements-CK4s8MJd.js +0 -249
  370. package/dist/packem_shared/treeViewTheme-BpSw9TMf.js +0 -52
  371. package/dist/packem_shared/useAnimation-DV22qxiJ.js +0 -62
  372. package/dist/packem_shared/useApp-Cbi788rV.js +0 -6
  373. package/dist/packem_shared/useBoxMetrics-_5icypir.js +0 -54
  374. package/dist/packem_shared/useClipboard-MNj6MNR-.js +0 -23
  375. package/dist/packem_shared/useColorBlindness-D_sTIhcb.js +0 -30
  376. package/dist/packem_shared/useConsoleCapture-Dvt7G1W1.js +0 -61
  377. package/dist/packem_shared/useCursor-DS6LjIgv.js +0 -19
  378. package/dist/packem_shared/useElementDimensions-CAoKitVD.js +0 -67
  379. package/dist/packem_shared/useFocus-DLoGQJd9.js +0 -37
  380. package/dist/packem_shared/useFocusManager-UeZWtnNc.js +0 -16
  381. package/dist/packem_shared/useForm-sQENbEuv.js +0 -88
  382. package/dist/packem_shared/useHotkey-D9giUX3q.js +0 -112
  383. package/dist/packem_shared/useInput-DKZbqMRc.js +0 -594
  384. package/dist/packem_shared/useInterval-CSXM8c2I.js +0 -32
  385. package/dist/packem_shared/useIsScreenReaderEnabled-BeoVqo1R.js +0 -9
  386. package/dist/packem_shared/useKeyBindings-S4fSIEAk.js +0 -66
  387. package/dist/packem_shared/useKeyChord-BmXGNuEO.js +0 -114
  388. package/dist/packem_shared/useMouseAction-C5gZ2nj7.js +0 -29
  389. package/dist/packem_shared/useMouseContext-D-rFy60Q.js +0 -12
  390. package/dist/packem_shared/useMousePosition-BHBJ-kBk.js +0 -25
  391. package/dist/packem_shared/useOnMouseClick--ZIyBOBO.js +0 -35
  392. package/dist/packem_shared/useOnMouseHover-26diuXUC.js +0 -32
  393. package/dist/packem_shared/useOnMouseState-NO_Kda_C.js +0 -13
  394. package/dist/packem_shared/usePaste-png73gvT.js +0 -35
  395. package/dist/packem_shared/useScrollAcceleration-R9LfrPVG.js +0 -73
  396. package/dist/packem_shared/useScrollInput-DfzRGQFe.js +0 -72
  397. package/dist/packem_shared/useStderr-BSWerMZ7.js +0 -6
  398. package/dist/packem_shared/useStdin-Rf0zPzVA.js +0 -7
  399. package/dist/packem_shared/useStdout-B5yRcg9N.js +0 -6
  400. package/dist/packem_shared/useStopwatch-C__Zu6hd.js +0 -33
  401. package/dist/packem_shared/useTerminalPalette-CtFG2JTq.js +0 -38
  402. package/dist/packem_shared/useTextBuffer-C8fEe9Ly.js +0 -398
  403. package/dist/packem_shared/useTextSelection-ChrYZXsn.js +0 -50
  404. package/dist/packem_shared/useTimeout-DuCqgWPX.js +0 -34
  405. package/dist/packem_shared/useTimer-DnBtbhB5.js +0 -46
  406. package/dist/packem_shared/useTreeView-mkN5Di7w.js +0 -101
  407. package/dist/packem_shared/useTreeViewState-BpS_KZ-K.js +0 -502
  408. package/dist/packem_shared/useWindowSize-D3UU41mv.js +0 -20
  409. package/dist/packem_shared/utils-BgdlrbOH.js +0 -140
  410. package/dist/packem_shared/variant-config-DSZoX5TM.js +0 -8
  411. package/dist/packem_shared/waitFor-Cv9M2jKA.js +0 -39
  412. package/dist/packem_shared/wrapOrTruncateStyledLine-49Mne3t3.js +0 -147
@@ -1,129 +0,0 @@
1
- import { jsx, jsxs } from 'react/jsx-runtime';
2
- import { useReducer, useState, useRef, useMemo, useCallback } from 'react';
3
- import useInput from './useInput-DKZbqMRc.js';
4
- import useWindowSize from './useWindowSize-D3UU41mv.js';
5
- import Box from './Box-W1w_NGin.js';
6
- import Text from './Text-CtUwV89_.js';
7
-
8
- const EMPTY_DEFAULT = [];
9
- const multiSelectReducer = (state, action) => {
10
- switch (action.type) {
11
- case "focus": {
12
- return { ...state, focusedIndex: action.index };
13
- }
14
- case "focus-next": {
15
- const nextIndex = state.focusedIndex + 1;
16
- const needsScroll = nextIndex >= state.visibleFrom + action.limit;
17
- return {
18
- ...state,
19
- focusedIndex: nextIndex,
20
- visibleFrom: needsScroll ? state.visibleFrom + 1 : state.visibleFrom
21
- };
22
- }
23
- case "focus-prev": {
24
- const previousIndex = state.focusedIndex - 1;
25
- const needsScroll = previousIndex < state.visibleFrom;
26
- return {
27
- ...state,
28
- focusedIndex: previousIndex,
29
- visibleFrom: needsScroll ? state.visibleFrom - 1 : state.visibleFrom
30
- };
31
- }
32
- default: {
33
- return state;
34
- }
35
- }
36
- };
37
- function MultiSelect({
38
- accentColor = "blue",
39
- defaultColor,
40
- defaultValue = EMPTY_DEFAULT,
41
- isDisabled = false,
42
- isFocused = true,
43
- limit: customLimit,
44
- onChange,
45
- onSubmit,
46
- options
47
- }) {
48
- const { rows: terminalRows } = useWindowSize();
49
- const effectiveLimit = typeof customLimit === "number" ? customLimit : terminalRows;
50
- const limit = Math.min(effectiveLimit, options.length);
51
- const [state, dispatch] = useReducer(multiSelectReducer, {
52
- focusedIndex: 0,
53
- visibleFrom: 0
54
- });
55
- const [selectedValues, setSelectedValues] = useState(defaultValue);
56
- const selectedValuesRef = useRef(selectedValues);
57
- selectedValuesRef.current = selectedValues;
58
- const onSubmitRef = useRef(onSubmit);
59
- onSubmitRef.current = onSubmit;
60
- const onChangeRef = useRef(onChange);
61
- onChangeRef.current = onChange;
62
- const stateRef = useRef(state);
63
- stateRef.current = state;
64
- const visibleOptions = useMemo(() => options.slice(state.visibleFrom, state.visibleFrom + limit), [options, state.visibleFrom, limit]);
65
- const handleToggle = useCallback(() => {
66
- const focusedValue = options[stateRef.current.focusedIndex]?.value;
67
- if (!focusedValue) {
68
- return;
69
- }
70
- setSelectedValues((previous) => {
71
- const next = previous.includes(focusedValue) ? previous.filter((v) => v !== focusedValue) : [...previous, focusedValue];
72
- onChangeRef.current?.(next);
73
- return next;
74
- });
75
- }, [options]);
76
- const handleToggleAll = useCallback(() => {
77
- setSelectedValues((previous) => {
78
- const next = previous.length === options.length ? [] : options.map((o) => o.value);
79
- onChangeRef.current?.(next);
80
- return next;
81
- });
82
- }, [options]);
83
- useInput(
84
- useCallback(
85
- (input, key) => {
86
- const { focusedIndex } = stateRef.current;
87
- if ((key.downArrow || input === "j") && focusedIndex < options.length - 1) {
88
- dispatch({ limit, type: "focus-next" });
89
- }
90
- if ((key.upArrow || input === "k") && focusedIndex > 0) {
91
- dispatch({ limit, type: "focus-prev" });
92
- }
93
- if (input === " ") {
94
- handleToggle();
95
- }
96
- if (input === "a") {
97
- handleToggleAll();
98
- }
99
- if (key.return) {
100
- onSubmitRef.current?.(selectedValuesRef.current);
101
- }
102
- },
103
- [options.length, limit, handleToggle, handleToggleAll]
104
- ),
105
- { isActive: !isDisabled && isFocused }
106
- );
107
- return jsx(Box, { flexDirection: "column", children: visibleOptions.map((option, visibleIndex) => {
108
- const absoluteIndex = state.visibleFrom + visibleIndex;
109
- const isFocusedOption = absoluteIndex === state.focusedIndex;
110
- const isSelected = selectedValues.includes(option.value);
111
- let labelColor = defaultColor;
112
- if (isSelected) {
113
- labelColor = "green";
114
- } else if (isFocusedOption) {
115
- labelColor = accentColor;
116
- }
117
- return jsxs(Box, { gap: 1, children: [
118
- isFocusedOption ? jsx(Text, { color: accentColor, dimColor: !isFocused, children: "▸" }) : jsx(Text, { children: " " }),
119
- jsxs(Text, { color: labelColor, dimColor: isDisabled, children: [
120
- isSelected ? "◼" : "◻",
121
- " ",
122
- option.label
123
- ] }),
124
- isSelected ? jsx(Text, { color: "green", dimColor: !isFocused, children: "✓" }) : void 0
125
- ] }, option.key ?? option.value);
126
- }) });
127
- }
128
-
129
- export { MultiSelect as default };
@@ -1,300 +0,0 @@
1
- import Yoga from 'yoga-layout';
2
-
3
- const NAMED_COLORS = {
4
- black: 0,
5
- // bright variants
6
- blackBright: 8,
7
- blue: 4,
8
- blueBright: 12,
9
- cyan: 6,
10
- cyanBright: 14,
11
- gray: 8,
12
- green: 2,
13
- greenBright: 10,
14
- grey: 8,
15
- magenta: 5,
16
- magentaBright: 13,
17
- red: 1,
18
- redBright: 9,
19
- white: 7,
20
- whiteBright: 15,
21
- yellow: 3,
22
- yellowBright: 11
23
- };
24
- function rgbToAnsi256(r, g, b) {
25
- const ri = Math.round(r / 51);
26
- const gi = Math.round(g / 51);
27
- const bi = Math.round(b / 51);
28
- return 16 + 36 * ri + 6 * gi + bi;
29
- }
30
- function resolveColor(color) {
31
- if (color === void 0) {
32
- return 255;
33
- }
34
- if (typeof color === "number") {
35
- return color;
36
- }
37
- if (color in NAMED_COLORS) {
38
- return NAMED_COLORS[color];
39
- }
40
- const ansiMatch = /^ansi256\(\s*(\d+)\s*\)$/.exec(color);
41
- if (ansiMatch) {
42
- return Number(ansiMatch[1]);
43
- }
44
- const hex3Match = /^#([0-9a-f])([0-9a-f])([0-9a-f])$/i.exec(color);
45
- if (hex3Match) {
46
- return rgbToAnsi256(
47
- Number.parseInt(hex3Match[1] + hex3Match[1], 16),
48
- Number.parseInt(hex3Match[2] + hex3Match[2], 16),
49
- Number.parseInt(hex3Match[3] + hex3Match[3], 16)
50
- );
51
- }
52
- const hexMatch = /^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(color);
53
- if (hexMatch) {
54
- return rgbToAnsi256(Number.parseInt(hexMatch[1], 16), Number.parseInt(hexMatch[2], 16), Number.parseInt(hexMatch[3], 16));
55
- }
56
- const rgbMatch = /^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/.exec(color);
57
- if (rgbMatch) {
58
- return rgbToAnsi256(Number(rgbMatch[1]), Number(rgbMatch[2]), Number(rgbMatch[3]));
59
- }
60
- return 255;
61
- }
62
- const positionEdges = [
63
- ["top", Yoga.EDGE_TOP],
64
- ["right", Yoga.EDGE_RIGHT],
65
- ["bottom", Yoga.EDGE_BOTTOM],
66
- ["left", Yoga.EDGE_LEFT]
67
- ];
68
- const applyPositionStyles = (node, style) => {
69
- if ("position" in style) {
70
- node.setPositionType(
71
- style.position === "absolute" ? Yoga.POSITION_TYPE_ABSOLUTE : (
72
- // static maps to relative because there is no static conceptually
73
- Yoga.POSITION_TYPE_RELATIVE
74
- )
75
- );
76
- }
77
- for (const [property, edge] of positionEdges) {
78
- if (property in style) {
79
- const value = style[property];
80
- if (typeof value === "string") {
81
- node.setPositionPercent(edge, Number.parseFloat(value));
82
- } else {
83
- node.setPosition(edge, value);
84
- }
85
- }
86
- }
87
- };
88
- const applyMarginStyles = (node, style) => {
89
- if ("margin" in style) {
90
- node.setMargin(Yoga.EDGE_ALL, style.margin ?? 0);
91
- }
92
- if ("marginX" in style) {
93
- node.setMargin(Yoga.EDGE_HORIZONTAL, style.marginX ?? 0);
94
- }
95
- if ("marginY" in style) {
96
- node.setMargin(Yoga.EDGE_VERTICAL, style.marginY ?? 0);
97
- }
98
- if ("marginLeft" in style) {
99
- node.setMargin(Yoga.EDGE_LEFT, style.marginLeft ?? 0);
100
- }
101
- if ("marginRight" in style) {
102
- node.setMargin(Yoga.EDGE_RIGHT, style.marginRight ?? 0);
103
- }
104
- if ("marginTop" in style) {
105
- node.setMargin(Yoga.EDGE_TOP, style.marginTop ?? 0);
106
- }
107
- if ("marginBottom" in style) {
108
- node.setMargin(Yoga.EDGE_BOTTOM, style.marginBottom ?? 0);
109
- }
110
- };
111
- const applyPaddingStyles = (node, style) => {
112
- if ("padding" in style) {
113
- node.setPadding(Yoga.EDGE_ALL, style.padding ?? 0);
114
- }
115
- if ("paddingX" in style) {
116
- node.setPadding(Yoga.EDGE_HORIZONTAL, style.paddingX ?? 0);
117
- }
118
- if ("paddingY" in style) {
119
- node.setPadding(Yoga.EDGE_VERTICAL, style.paddingY ?? 0);
120
- }
121
- if ("paddingLeft" in style) {
122
- node.setPadding(Yoga.EDGE_LEFT, style.paddingLeft ?? 0);
123
- }
124
- if ("paddingRight" in style) {
125
- node.setPadding(Yoga.EDGE_RIGHT, style.paddingRight ?? 0);
126
- }
127
- if ("paddingTop" in style) {
128
- node.setPadding(Yoga.EDGE_TOP, style.paddingTop ?? 0);
129
- }
130
- if ("paddingBottom" in style) {
131
- node.setPadding(Yoga.EDGE_BOTTOM, style.paddingBottom ?? 0);
132
- }
133
- };
134
- const applyFlexStyles = (node, style) => {
135
- if ("flexGrow" in style) {
136
- node.setFlexGrow(style.flexGrow ?? 0);
137
- }
138
- if ("flexShrink" in style) {
139
- node.setFlexShrink(style.flexShrink ?? 1);
140
- }
141
- if ("flexWrap" in style) {
142
- node.setFlexWrap(style.flexWrap === "nowrap" ? Yoga.WRAP_NO_WRAP : style.flexWrap === "wrap" ? Yoga.WRAP_WRAP : Yoga.WRAP_WRAP_REVERSE);
143
- }
144
- if ("flexDirection" in style) {
145
- if (style.flexDirection === "row") {
146
- node.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
147
- }
148
- if (style.flexDirection === "row-reverse") {
149
- node.setFlexDirection(Yoga.FLEX_DIRECTION_ROW_REVERSE);
150
- }
151
- if (style.flexDirection === "column") {
152
- node.setFlexDirection(Yoga.FLEX_DIRECTION_COLUMN);
153
- }
154
- if (style.flexDirection === "column-reverse") {
155
- node.setFlexDirection(Yoga.FLEX_DIRECTION_COLUMN_REVERSE);
156
- }
157
- }
158
- if ("flexBasis" in style) {
159
- if (typeof style.flexBasis === "number") {
160
- node.setFlexBasis(style.flexBasis);
161
- } else if (typeof style.flexBasis === "string") {
162
- node.setFlexBasisPercent(Number.parseInt(style.flexBasis, 10));
163
- } else {
164
- node.setFlexBasis(Number.NaN);
165
- }
166
- }
167
- if ("alignItems" in style) {
168
- const map = {
169
- baseline: Yoga.ALIGN_BASELINE,
170
- center: Yoga.ALIGN_CENTER,
171
- "flex-end": Yoga.ALIGN_FLEX_END,
172
- "flex-start": Yoga.ALIGN_FLEX_START,
173
- stretch: Yoga.ALIGN_STRETCH
174
- };
175
- node.setAlignItems(map[style.alignItems || "stretch"]);
176
- }
177
- if ("alignSelf" in style) {
178
- const map = {
179
- auto: Yoga.ALIGN_AUTO,
180
- baseline: Yoga.ALIGN_BASELINE,
181
- center: Yoga.ALIGN_CENTER,
182
- "flex-end": Yoga.ALIGN_FLEX_END,
183
- "flex-start": Yoga.ALIGN_FLEX_START,
184
- stretch: Yoga.ALIGN_STRETCH
185
- };
186
- node.setAlignSelf(map[style.alignSelf || "auto"]);
187
- }
188
- if ("alignContent" in style) {
189
- const map = {
190
- center: Yoga.ALIGN_CENTER,
191
- "flex-end": Yoga.ALIGN_FLEX_END,
192
- "flex-start": Yoga.ALIGN_FLEX_START,
193
- "space-around": Yoga.ALIGN_SPACE_AROUND,
194
- "space-between": Yoga.ALIGN_SPACE_BETWEEN,
195
- stretch: Yoga.ALIGN_STRETCH
196
- };
197
- node.setAlignContent(map[style.alignContent || "flex-start"]);
198
- }
199
- if ("justifyContent" in style) {
200
- const map = {
201
- center: Yoga.JUSTIFY_CENTER,
202
- "flex-end": Yoga.JUSTIFY_FLEX_END,
203
- "flex-start": Yoga.JUSTIFY_FLEX_START,
204
- "space-around": Yoga.JUSTIFY_SPACE_AROUND,
205
- "space-between": Yoga.JUSTIFY_SPACE_BETWEEN,
206
- "space-evenly": Yoga.JUSTIFY_SPACE_EVENLY
207
- };
208
- node.setJustifyContent(map[style.justifyContent || "flex-start"]);
209
- }
210
- };
211
- const applyDimensionStyles = (node, style) => {
212
- if ("width" in style) {
213
- if (typeof style.width === "number") {
214
- node.setWidth(style.width);
215
- } else if (typeof style.width === "string") {
216
- node.setWidthPercent(Number.parseInt(style.width, 10));
217
- } else {
218
- node.setWidthAuto();
219
- }
220
- }
221
- if ("height" in style) {
222
- if (typeof style.height === "number") {
223
- node.setHeight(style.height);
224
- } else if (typeof style.height === "string") {
225
- node.setHeightPercent(Number.parseInt(style.height, 10));
226
- } else {
227
- node.setHeightAuto();
228
- }
229
- }
230
- if ("minWidth" in style) {
231
- if (typeof style.minWidth === "string") {
232
- node.setMinWidthPercent(Number.parseInt(style.minWidth, 10));
233
- } else {
234
- node.setMinWidth(style.minWidth ?? 0);
235
- }
236
- }
237
- if ("minHeight" in style) {
238
- if (typeof style.minHeight === "string") {
239
- node.setMinHeightPercent(Number.parseInt(style.minHeight, 10));
240
- } else {
241
- node.setMinHeight(style.minHeight ?? 0);
242
- }
243
- }
244
- if ("maxWidth" in style) {
245
- if (typeof style.maxWidth === "string") {
246
- node.setMaxWidthPercent(Number.parseInt(style.maxWidth, 10));
247
- } else {
248
- node.setMaxWidth(style.maxWidth);
249
- }
250
- }
251
- if ("maxHeight" in style) {
252
- if (typeof style.maxHeight === "string") {
253
- node.setMaxHeightPercent(Number.parseInt(style.maxHeight, 10));
254
- } else {
255
- node.setMaxHeight(style.maxHeight);
256
- }
257
- }
258
- if ("aspectRatio" in style) {
259
- node.setAspectRatio(style.aspectRatio);
260
- }
261
- };
262
- const applyDisplayStyles = (node, style) => {
263
- if ("display" in style) {
264
- node.setDisplay(style.display === "flex" ? Yoga.DISPLAY_FLEX : Yoga.DISPLAY_NONE);
265
- }
266
- };
267
- const applyBorderStyles = (node, style, currentStyle) => {
268
- const hasBorderChanges = "borderStyle" in style || "borderTop" in style || "borderBottom" in style || "borderLeft" in style || "borderRight" in style;
269
- if (!hasBorderChanges) {
270
- return;
271
- }
272
- const borderWidth = currentStyle.borderStyle ? 1 : 0;
273
- node.setBorder(Yoga.EDGE_TOP, currentStyle.borderTop === false ? 0 : borderWidth);
274
- node.setBorder(Yoga.EDGE_BOTTOM, currentStyle.borderBottom === false ? 0 : borderWidth);
275
- node.setBorder(Yoga.EDGE_LEFT, currentStyle.borderLeft === false ? 0 : borderWidth);
276
- node.setBorder(Yoga.EDGE_RIGHT, currentStyle.borderRight === false ? 0 : borderWidth);
277
- };
278
- const applyGapStyles = (node, style) => {
279
- if ("gap" in style) {
280
- node.setGap(Yoga.GUTTER_ALL, style.gap ?? 0);
281
- }
282
- if ("columnGap" in style) {
283
- node.setGap(Yoga.GUTTER_COLUMN, style.columnGap ?? 0);
284
- }
285
- if ("rowGap" in style) {
286
- node.setGap(Yoga.GUTTER_ROW, style.rowGap ?? 0);
287
- }
288
- };
289
- const applyStyles = (node, style = {}, currentStyle = style) => {
290
- applyPositionStyles(node, style);
291
- applyMarginStyles(node, style);
292
- applyPaddingStyles(node, style);
293
- applyFlexStyles(node, style);
294
- applyDimensionStyles(node, style);
295
- applyDisplayStyles(node, style);
296
- applyBorderStyles(node, style, currentStyle);
297
- applyGapStyles(node, style);
298
- };
299
-
300
- export { NAMED_COLORS, applyStyles, resolveColor };
@@ -1,7 +0,0 @@
1
- import { jsx } from 'react/jsx-runtime';
2
-
3
- function Newline({ count = 1 }) {
4
- return jsx("ink-text", { children: "\n".repeat(count) });
5
- }
6
-
7
- export { Newline as default };
@@ -1,67 +0,0 @@
1
- import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
- import Box from './Box-W1w_NGin.js';
3
- import Spinner from './Spinner-BcO5BCAa.js';
4
- import Text from './Text-CtUwV89_.js';
5
-
6
- const STATUS_COLOR = {
7
- completed: "green",
8
- error: "red",
9
- pending: "gray",
10
- running: "cyan",
11
- skipped: "yellow"
12
- };
13
- const STATUS_ICON = {
14
- completed: "✔",
15
- error: "✖",
16
- pending: "○",
17
- skipped: "⊘"
18
- };
19
- const formatDuration = (ms) => {
20
- if (ms < 1e3) {
21
- return `${Math.round(ms)}ms`;
22
- }
23
- if (ms < 6e4) {
24
- return `${(ms / 1e3).toFixed(1)}s`;
25
- }
26
- const totalSeconds = Math.round(ms / 1e3);
27
- const minutes = Math.floor(totalSeconds / 60);
28
- const seconds = totalSeconds % 60;
29
- return `${minutes}m ${seconds}s`;
30
- };
31
- const NodeLine = ({ isLast, node, prefix, showSpinner }) => {
32
- const color = STATUS_COLOR[node.status];
33
- const connector = prefix.length === 0 ? "" : isLast ? "└─ " : "├─ ";
34
- const childPrefix = prefix + (isLast ? " " : "│ ");
35
- return jsxs(Fragment, { children: [
36
- jsxs(Box, { children: [
37
- jsx(Text, { dimColor: true, children: prefix }),
38
- jsx(Text, { dimColor: true, children: connector }),
39
- jsx(Box, { flexShrink: 0, children: jsx(Text, { color, children: node.status === "running" ? showSpinner ? jsx(Spinner, { type: "dots" }) : "…" : STATUS_ICON[node.status] }) }),
40
- jsx(Text, { children: " " }),
41
- jsx(Box, { flexGrow: 1, flexShrink: 1, minWidth: 0, children: jsx(
42
- Text,
43
- {
44
- bold: node.status === "running",
45
- color: node.status === "pending" ? "gray" : void 0,
46
- dimColor: node.status === "skipped",
47
- wrap: "truncate-end",
48
- children: node.label
49
- }
50
- ) }),
51
- node.durationMs === void 0 ? void 0 : jsx(Box, { flexShrink: 0, children: jsxs(Text, { dimColor: true, children: [
52
- " ",
53
- formatDuration(node.durationMs)
54
- ] }) })
55
- ] }),
56
- node.details === void 0 ? void 0 : jsxs(Box, { children: [
57
- jsx(Text, { dimColor: true, children: childPrefix }),
58
- jsx(Text, { dimColor: true, children: node.details })
59
- ] }),
60
- node.children?.map((child, index, all) => jsx(NodeLine, { isLast: index === all.length - 1, node: child, prefix: childPrefix, showSpinner }, child.id))
61
- ] });
62
- };
63
- function OperationTree({ nodes, showSpinner = true }) {
64
- return jsx(Box, { flexDirection: "column", children: nodes.map((node, index) => jsx(NodeLine, { isLast: index === nodes.length - 1, node, prefix: "", showSpinner }, node.id)) });
65
- }
66
-
67
- export { OperationTree as default };
@@ -1,24 +0,0 @@
1
- import { jsx, jsxs } from 'react/jsx-runtime';
2
- import Box from './Box-W1w_NGin.js';
3
- import Text from './Text-CtUwV89_.js';
4
-
5
- function OptionList({ accentColor = "blue", bordered = false, currentId, iconColumnWidth = 2, options }) {
6
- const list = jsx(Box, { flexDirection: "column", children: options.map((option) => {
7
- const isCurrent = option.id === currentId;
8
- const color = isCurrent ? accentColor : void 0;
9
- return jsxs(Box, { flexDirection: "column", children: [
10
- jsxs(Box, { children: [
11
- jsx(Box, { flexShrink: 0, width: iconColumnWidth, children: jsx(Text, { color, children: option.icon ?? (isCurrent ? "▸" : " ") }) }),
12
- jsx(Box, { flexGrow: 1, flexShrink: 1, minWidth: 0, children: jsx(Text, { bold: isCurrent, color, wrap: "truncate-end", children: option.label }) }),
13
- option.trailing === void 0 ? void 0 : jsx(Box, { flexShrink: 0, children: option.trailing })
14
- ] }),
15
- option.description === void 0 ? void 0 : jsx(Box, { marginLeft: iconColumnWidth, children: jsx(Text, { dimColor: true, wrap: "truncate-end", children: option.description }) })
16
- ] }, option.id);
17
- }) });
18
- if (!bordered) {
19
- return list;
20
- }
21
- return jsx(Box, { borderStyle: "round", paddingX: 1, children: list });
22
- }
23
-
24
- export { OptionList as default };
@@ -1,26 +0,0 @@
1
- import { jsx, jsxs } from 'react/jsx-runtime';
2
- import Box from './Box-W1w_NGin.js';
3
- import Text from './Text-CtUwV89_.js';
4
-
5
- const renderList = (items, parentMarker) => {
6
- const maxWidth = String(items.length).length;
7
- return jsx(Box, { flexDirection: "column", children: items.map((item, index) => {
8
- const paddedNumber = `${String(index + 1).padStart(maxWidth)}.`;
9
- const marker = `${parentMarker}${paddedNumber}`;
10
- return (
11
- // eslint-disable-next-line react-x/no-array-index-key -- list entries have no unique key
12
- jsxs(Box, { gap: 1, children: [
13
- jsx(Text, { dimColor: true, children: marker }),
14
- jsxs(Box, { flexDirection: "column", children: [
15
- jsx(Text, { children: item.label }),
16
- item.children ? renderList(item.children, marker) : void 0
17
- ] })
18
- ] }, index)
19
- );
20
- }) });
21
- };
22
- function OrderedList({ items }) {
23
- return renderList(items, "");
24
- }
25
-
26
- export { OrderedList as default };
@@ -1,104 +0,0 @@
1
- import { jsxs, jsx } from 'react/jsx-runtime';
2
- import { useState, useCallback } from 'react';
3
- import useInput from './useInput-DKZbqMRc.js';
4
- import Box from './Box-W1w_NGin.js';
5
- import Text from './Text-CtUwV89_.js';
6
-
7
- const Indicator = ({
8
- color,
9
- currentPage,
10
- style,
11
- totalPages
12
- }) => {
13
- if (style === "fraction") {
14
- return jsxs(Text, { children: [
15
- jsx(Text, { color, children: currentPage + 1 }),
16
- jsxs(Text, { dimColor: true, children: [
17
- "/",
18
- totalPages
19
- ] })
20
- ] });
21
- }
22
- if (style === "numeric") {
23
- const previousArrow = currentPage > 0 ? jsx(Text, { color, children: "‹ " }) : jsx(Text, { dimColor: true, children: "‹ " });
24
- const nextArrow = currentPage < totalPages - 1 ? jsx(Text, { color, children: " ›" }) : jsx(Text, { dimColor: true, children: " ›" });
25
- return jsxs(Box, { children: [
26
- previousArrow,
27
- jsx(Text, { color, children: currentPage + 1 }),
28
- jsxs(Text, { dimColor: true, children: [
29
- " ",
30
- "/",
31
- totalPages
32
- ] }),
33
- nextArrow
34
- ] });
35
- }
36
- const dots = Array.from({ length: totalPages }, (_, i) => {
37
- if (i === currentPage) {
38
- return jsx(Text, { color, children: "●" }, i);
39
- }
40
- return jsx(Text, { dimColor: true, children: "○" }, i);
41
- });
42
- return jsx(Box, { gap: 1, children: dots });
43
- };
44
- const Paginator = ({
45
- children,
46
- defaultPage = 0,
47
- indicatorColor = "cyan",
48
- isFocused = true,
49
- items,
50
- onChange,
51
- page: controlledPage,
52
- pageSize,
53
- style = "dots"
54
- }) => {
55
- const isControlled = controlledPage !== void 0;
56
- const [internalPage, setInternalPage] = useState(defaultPage);
57
- const currentPage = isControlled ? controlledPage : internalPage;
58
- const totalPages = Math.max(1, Math.ceil(items.length / pageSize));
59
- const safePage = Math.max(0, Math.min(currentPage, totalPages - 1));
60
- const setPage = useCallback(
61
- (newPage) => {
62
- const clamped = Math.max(0, Math.min(newPage, totalPages - 1));
63
- if (!isControlled) {
64
- setInternalPage(clamped);
65
- }
66
- onChange?.(clamped);
67
- },
68
- [totalPages, isControlled, onChange]
69
- );
70
- useInput(
71
- useCallback(
72
- (_input, key) => {
73
- if (key.leftArrow || key.pageUp) {
74
- setPage(safePage - 1);
75
- } else if (key.rightArrow || key.pageDown) {
76
- setPage(safePage + 1);
77
- } else if (key.home) {
78
- setPage(0);
79
- } else if (key.end) {
80
- setPage(totalPages - 1);
81
- }
82
- },
83
- [safePage, totalPages, setPage]
84
- ),
85
- { isActive: isFocused }
86
- );
87
- const startIndex = safePage * pageSize;
88
- const endIndex = Math.min(startIndex + pageSize, items.length);
89
- const pageItems = items.slice(startIndex, endIndex);
90
- const meta = {
91
- currentPage: safePage,
92
- endIndex,
93
- isFirstPage: safePage === 0,
94
- isLastPage: safePage === totalPages - 1,
95
- startIndex,
96
- totalPages
97
- };
98
- return jsxs(Box, { flexDirection: "column", children: [
99
- children(pageItems, meta),
100
- totalPages > 1 && jsx(Indicator, { color: indicatorColor, currentPage: safePage, style, totalPages })
101
- ] });
102
- };
103
-
104
- export { Paginator as default };
@@ -1,9 +0,0 @@
1
- import { jsx } from 'react/jsx-runtime';
2
- import Box from './Box-W1w_NGin.js';
3
- import Text from './Text-CtUwV89_.js';
4
-
5
- function Paragraph({ children, color, dimColor = false, marginBottom = 1, marginTop = 0 }) {
6
- return jsx(Box, { flexDirection: "column", marginBottom, marginTop, children: jsx(Text, { color, dimColor, children }) });
7
- }
8
-
9
- export { Paragraph as default };