@visulima/tui 1.0.0-alpha.2 → 1.0.0-alpha.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (325) hide show
  1. package/CHANGELOG.md +59 -0
  2. package/LICENSE.md +63 -9
  3. package/README.md +6 -6
  4. package/dist/core/index.js +3 -3
  5. package/dist/ink/canvas/braille.d.ts +22 -0
  6. package/dist/ink/canvas/buffer.d.ts +67 -0
  7. package/dist/ink/components/accordion.d.ts +52 -0
  8. package/dist/ink/components/animate-presence.d.ts +15 -0
  9. package/dist/ink/components/approval-prompt.d.ts +55 -0
  10. package/dist/ink/components/area-chart.d.ts +54 -0
  11. package/dist/ink/components/bar-chart.d.ts +57 -0
  12. package/dist/ink/components/blink-dot.d.ts +30 -0
  13. package/dist/ink/components/breadcrumb.d.ts +28 -0
  14. package/dist/ink/components/button.d.ts +38 -0
  15. package/dist/ink/components/calendar.d.ts +60 -0
  16. package/dist/ink/components/canvas.d.ts +38 -0
  17. package/dist/ink/components/card.d.ts +46 -0
  18. package/dist/ink/components/chart-utils.d.ts +54 -0
  19. package/dist/ink/components/checkbox.d.ts +39 -0
  20. package/dist/ink/components/collapsible.d.ts +43 -0
  21. package/dist/ink/components/command-block.d.ts +38 -0
  22. package/dist/ink/components/command-palette.d.ts +72 -0
  23. package/dist/ink/components/confirm-dialog.d.ts +63 -0
  24. package/dist/ink/components/content-switcher.d.ts +49 -0
  25. package/dist/ink/components/date-picker.d.ts +53 -0
  26. package/dist/ink/components/definition-list.d.ts +37 -0
  27. package/dist/ink/components/divider.d.ts +40 -0
  28. package/dist/ink/components/file-picker/{FilePicker.d.ts → file-picker.d.ts} +2 -19
  29. package/dist/ink/components/file-picker/types.d.ts +1 -4
  30. package/dist/ink/components/file-picker/use-file-system.d.ts +1 -1
  31. package/dist/ink/components/form.d.ts +74 -0
  32. package/dist/ink/components/gauge.d.ts +75 -0
  33. package/dist/ink/components/heading.d.ts +27 -0
  34. package/dist/ink/components/heatmap.d.ts +51 -0
  35. package/dist/ink/components/{Help.d.ts → help.d.ts} +4 -9
  36. package/dist/ink/components/histogram.d.ts +52 -0
  37. package/dist/ink/components/kbd.d.ts +27 -0
  38. package/dist/ink/components/line-chart.d.ts +94 -0
  39. package/dist/ink/components/loading-indicator.d.ts +24 -0
  40. package/dist/ink/components/masked-input.d.ts +41 -0
  41. package/dist/ink/components/menu.d.ts +70 -0
  42. package/dist/ink/components/message-bubble.d.ts +35 -0
  43. package/dist/ink/components/model-badge.d.ts +32 -0
  44. package/dist/ink/components/operation-tree.d.ts +46 -0
  45. package/dist/ink/components/option-list.d.ts +41 -0
  46. package/dist/ink/components/{Paginator.d.ts → paginator.d.ts} +4 -20
  47. package/dist/ink/components/paragraph.d.ts +31 -0
  48. package/dist/ink/components/placeholder.d.ts +47 -0
  49. package/dist/ink/components/{ProgressBar.d.ts → progress-bar.d.ts} +1 -1
  50. package/dist/ink/components/radio-group.d.ts +62 -0
  51. package/dist/ink/components/scatter-plot.d.ts +23 -0
  52. package/dist/ink/components/scroll/{ControlledScrollView.d.ts → controlled-scroll-view.d.ts} +1 -1
  53. package/dist/ink/components/scroll/index.d.ts +10 -10
  54. package/dist/ink/components/scroll/{ScrollBarBox.d.ts → scroll-bar-box.d.ts} +1 -1
  55. package/dist/ink/components/scroll/{ScrollBar.d.ts → scroll-bar.d.ts} +1 -1
  56. package/dist/ink/components/scroll/{ScrollList.d.ts → scroll-list.d.ts} +1 -1
  57. package/dist/ink/components/scroll/{ScrollView.d.ts → scroll-view.d.ts} +1 -1
  58. package/dist/ink/components/search-input.d.ts +46 -0
  59. package/dist/ink/components/{SelectInput.d.ts → select-input.d.ts} +2 -2
  60. package/dist/ink/components/shimmer-text.d.ts +39 -0
  61. package/dist/ink/components/sparkline.d.ts +30 -0
  62. package/dist/ink/components/{Spinner.d.ts → spinner.d.ts} +2 -4
  63. package/dist/ink/components/{StaticRender.d.ts → static-render.d.ts} +14 -2
  64. package/dist/ink/components/status-line.d.ts +30 -0
  65. package/dist/ink/components/stepper.d.ts +42 -0
  66. package/dist/ink/components/{Stopwatch.d.ts → stopwatch.d.ts} +5 -7
  67. package/dist/ink/components/streaming-text.d.ts +38 -0
  68. package/dist/ink/components/switch.d.ts +46 -0
  69. package/dist/ink/components/{Tabs.d.ts → tabs.d.ts} +1 -1
  70. package/dist/ink/components/tag.d.ts +30 -0
  71. package/dist/ink/components/{Timer.d.ts → timer.d.ts} +5 -7
  72. package/dist/ink/components/toast.d.ts +41 -0
  73. package/dist/ink/components/tooltip.d.ts +36 -0
  74. package/dist/ink/components/transition.d.ts +53 -0
  75. package/dist/ink/components/tree-view/theme.d.ts +2 -2
  76. package/dist/ink/cursor-helpers.d.ts +0 -3
  77. package/dist/ink/dom.d.ts +9 -8
  78. package/dist/ink/hooks/use-animation.d.ts +0 -2
  79. package/dist/ink/hooks/use-app.d.ts +1 -1
  80. package/dist/ink/hooks/use-focus-manager.d.ts +1 -1
  81. package/dist/ink/hooks/use-form.d.ts +70 -0
  82. package/dist/ink/hooks/use-hotkey.d.ts +37 -0
  83. package/dist/ink/hooks/use-interval.d.ts +25 -0
  84. package/dist/ink/hooks/use-key-bindings.d.ts +4 -6
  85. package/dist/ink/hooks/use-key-chord.d.ts +26 -0
  86. package/dist/ink/hooks/use-linked-scroll.d.ts +1 -1
  87. package/dist/ink/hooks/use-persistent-state.d.ts +56 -0
  88. package/dist/ink/hooks/use-stderr.d.ts +1 -1
  89. package/dist/ink/hooks/use-stdin.d.ts +1 -1
  90. package/dist/ink/hooks/use-stdout.d.ts +1 -1
  91. package/dist/ink/hooks/use-stopwatch.d.ts +1 -3
  92. package/dist/ink/hooks/use-timeout.d.ts +24 -0
  93. package/dist/ink/hooks/use-timer.d.ts +0 -2
  94. package/dist/ink/index.d.ts +228 -92
  95. package/dist/ink/index.js +132 -77
  96. package/dist/ink/ink.d.ts +7 -6
  97. package/dist/ink/mouse/constants.d.ts +5 -50
  98. package/dist/ink/mouse/index.d.ts +2 -2
  99. package/dist/ink/output.d.ts +2 -1
  100. package/dist/ink/styled-line.d.ts +10 -0
  101. package/dist/ink/write-synchronized.d.ts +2 -2
  102. package/dist/packem_shared/Accordion-BG-yfIkV.js +80 -0
  103. package/dist/packem_shared/{Alert-Dr3s_LD9.js → Alert-BLcwIW8V.js} +2 -2
  104. package/dist/packem_shared/AnimatePresence-D8nEOr_B.js +98 -0
  105. package/dist/packem_shared/ApprovalPrompt-BXdPros1.js +104 -0
  106. package/dist/packem_shared/AreaChart-CmTcxLum.js +116 -0
  107. package/dist/packem_shared/{Badge-Dk7EGGM6.js → Badge-CUfbXwAB.js} +1 -1
  108. package/dist/packem_shared/BarChart-DWRae67P.js +87 -0
  109. package/dist/packem_shared/{BigText-CjMdY63X.js → BigText-CVq2X7B5.js} +1 -1
  110. package/dist/packem_shared/BlinkDot-CrbHMR3L.js +11 -0
  111. package/dist/packem_shared/{Box-D_pSJ9Jp.js → Box-W1w_NGin.js} +4 -6
  112. package/dist/packem_shared/Breadcrumb-CPdNxVYs.js +26 -0
  113. package/dist/packem_shared/Button-CBmTbJ_D.js +57 -0
  114. package/dist/packem_shared/Calendar-C2Qxt-LA.js +139 -0
  115. package/dist/packem_shared/Canvas-COttmLPX.js +246 -0
  116. package/dist/packem_shared/Card-D3tGkNCm.js +24 -0
  117. package/dist/packem_shared/Checkbox-Dpy_4Lws.js +49 -0
  118. package/dist/packem_shared/{Code-DjQvPBD9.js → Code-CwzzbsLx.js} +3 -3
  119. package/dist/packem_shared/Collapsible-BMDrXf5C.js +45 -0
  120. package/dist/packem_shared/CommandBlock-jdOGJPjY.js +80 -0
  121. package/dist/packem_shared/CommandPalette-B5IfUQwi.js +146 -0
  122. package/dist/packem_shared/ConfirmDialog-5XJv3Cc4.js +67 -0
  123. package/dist/packem_shared/{ConfirmInput-85Y4kRQW.js → ConfirmInput-CxUS0XAA.js} +3 -3
  124. package/dist/packem_shared/{ConsoleOverlay-DBNa4vtj.js → ConsoleOverlay-BvnCEgjG.js} +2 -2
  125. package/dist/packem_shared/ContentSwitcher-BHFpO5Za.js +81 -0
  126. package/dist/packem_shared/ControlledScrollView-C2wOOlJO.js +5 -0
  127. package/dist/packem_shared/DatePicker-CPejKoqS.js +73 -0
  128. package/dist/packem_shared/DefinitionList-BAwr0l5J.js +18 -0
  129. package/dist/packem_shared/{DevTools-aMPIsaHx.js → DevTools-BdxRSkhL.js} +6 -4
  130. package/dist/packem_shared/{Dialog-DsSNAVgC.js → Dialog-S9r7Izff.js} +5 -5
  131. package/dist/packem_shared/{DiffView-hqaw-2S6.js → DiffView-BR4T6-Sj.js} +4 -4
  132. package/dist/packem_shared/Divider-DocXIqNn.js +30 -0
  133. package/dist/packem_shared/{FilePicker-DNwFxRhq.js → FilePicker-BZ55oF_n.js} +39 -32
  134. package/dist/packem_shared/FormField-BSG16cnA.js +29 -0
  135. package/dist/packem_shared/{Fullscreen-DrElAE1o.js → Fullscreen-DO7voOq5.js} +2 -2
  136. package/dist/packem_shared/Gauge-CKXUXxft.js +122 -0
  137. package/dist/packem_shared/{Gradient-Ql5P0GUd.js → Gradient-Dg0NezWc.js} +3 -3
  138. package/dist/packem_shared/Heading-BnR7McmP.js +29 -0
  139. package/dist/packem_shared/Heatmap-_jqISOU0.js +79 -0
  140. package/dist/packem_shared/{Help-6wanGG38.js → Help-0yZ_IcQg.js} +4 -11
  141. package/dist/packem_shared/Histogram-cgAjY5AJ.js +92 -0
  142. package/dist/packem_shared/{InputParser-BKHpWfvN.js → InputParser-BlsfeY9J.js} +8 -6
  143. package/dist/packem_shared/KEY-STOdi-nc.js +74 -0
  144. package/dist/packem_shared/Kbd-BNDXQgey.js +19 -0
  145. package/dist/packem_shared/{LayoutNode-Cjnsodiy.js → LayoutNode-DAkKg9TE.js} +5 -7
  146. package/dist/packem_shared/LineChart-ef3HF816.js +7 -0
  147. package/dist/packem_shared/{Link-COcKYfGT.js → Link-DZ2Tiq1m.js} +2 -2
  148. package/dist/packem_shared/LoadingIndicator-DzbLGfyJ.js +13 -0
  149. package/dist/packem_shared/{Markdown-y1ISztof.js → Markdown-33bpCUoe.js} +8 -8
  150. package/dist/packem_shared/MaskedInput-Ctr6v2dO.js +119 -0
  151. package/dist/packem_shared/Menu-CeKxhEix.js +112 -0
  152. package/dist/packem_shared/MessageBubble-BMoU8L2Q.js +26 -0
  153. package/dist/packem_shared/ModelBadge-CNIxPs7v.js +40 -0
  154. package/dist/packem_shared/{MouseProvider-Y9TSSEGl.js → MouseProvider-CekPbXCh.js} +3 -3
  155. package/dist/packem_shared/{MultiSelect-ChoLUcDI.js → MultiSelect-yz7-w0Zv.js} +4 -4
  156. package/dist/packem_shared/{NAMED_COLORS-a4QBvb5r.js → NAMED_COLORS-DcI3erCu.js} +79 -41
  157. package/dist/packem_shared/OperationTree-Dudx5o1o.js +67 -0
  158. package/dist/packem_shared/OptionList-CTyqQaZ1.js +24 -0
  159. package/dist/packem_shared/{OrderedList-Cp7pXr6m.js → OrderedList-VsvSmHUC.js} +2 -2
  160. package/dist/packem_shared/{Paginator-D1AuD-kj.js → Paginator-DmGogvEI.js} +44 -44
  161. package/dist/packem_shared/Paragraph-CNNhfepo.js +9 -0
  162. package/dist/packem_shared/Placeholder-DkM69Q8Z.js +29 -0
  163. package/dist/packem_shared/{ProgressBar-DOfpVagn.js → ProgressBar-B7cS4uQm.js} +2 -2
  164. package/dist/packem_shared/RadioGroup-B4F9PUyL.js +108 -0
  165. package/dist/packem_shared/{ResizeObserverEntry-Br4seLeQ.js → ResizeObserverEntry-Vr8GZ74x.js} +4 -4
  166. package/dist/packem_shared/ScatterPlot-CWOg4G5h.js +63 -0
  167. package/dist/packem_shared/{ScrollBar-EWAs2Uc7.js → ScrollBar-DFeWH43I.js} +2 -2
  168. package/dist/packem_shared/{ScrollBarBox-DTNNlh7R.js → ScrollBarBox-C7VL6Izd.js} +2 -2
  169. package/dist/packem_shared/{ScrollList-DCeIFL8M.js → ScrollList-DRcr_RrN.js} +2 -2
  170. package/dist/packem_shared/{ScrollView-v3MCNIyX.js → ScrollView-C6rdlGwU.js} +4 -4
  171. package/dist/packem_shared/SearchInput-cB8zFhSg.js +32 -0
  172. package/dist/packem_shared/{SelectInput-BN2TMyxp.js → SelectInput-WzZSqp72.js} +6 -6
  173. package/dist/packem_shared/{SelectInputIndicator-DkRMoH_b.js → SelectInputIndicator-DKeN6v5Z.js} +2 -2
  174. package/dist/packem_shared/{SelectInputItem-BF9LQgKu.js → SelectInputItem-CxFL3spM.js} +1 -1
  175. package/dist/packem_shared/ShimmerText-B2VbPUSB.js +34 -0
  176. package/dist/packem_shared/{Slider-BWD7xZX6.js → Slider-BOrNTOQe.js} +3 -3
  177. package/dist/packem_shared/{Spacer-Bs4ER-HK.js → Spacer-DhmXyTb8.js} +1 -1
  178. package/dist/packem_shared/Sparkline-BSbjPrwK.js +44 -0
  179. package/dist/packem_shared/Spinner-BcO5BCAa.js +1942 -0
  180. package/dist/packem_shared/StaticRender-C3XWvJdC.js +69 -0
  181. package/dist/packem_shared/StatusLine-DQNUstN9.js +22 -0
  182. package/dist/packem_shared/{StatusMessage-BtSYxzwb.js → StatusMessage-BYTL6Pl-.js} +2 -2
  183. package/dist/packem_shared/Stepper-CmUPRK3z.js +60 -0
  184. package/dist/packem_shared/Stopwatch-zqLQAxXC.js +21 -0
  185. package/dist/packem_shared/StreamingText-BmuoJtGu.js +38 -0
  186. package/dist/packem_shared/Switch-DcPdy8nm.js +59 -0
  187. package/dist/packem_shared/{Table-D-rSVlzb.js → Table-Bgxo87Df.js} +11 -5
  188. package/dist/packem_shared/{Tabs-hki-KRnx.js → Tabs-DubuHdYV.js} +30 -19
  189. package/dist/packem_shared/Tag-CCqM7Ee9.js +35 -0
  190. package/dist/packem_shared/{Text-DvAUdZcK.js → Text-CtUwV89_.js} +2 -2
  191. package/dist/packem_shared/{TextInput-C79WEQ5U.js → TextInput-C9r7zT0U.js} +3 -3
  192. package/dist/packem_shared/{Textarea-Dj06R6Zd.js → Textarea-CGmgt-Nl.js} +5 -5
  193. package/dist/packem_shared/Timer-D7ZZ0_wz.js +20 -0
  194. package/dist/packem_shared/Toast-DXSCXFPY.js +37 -0
  195. package/dist/packem_shared/Tooltip-SvVjj-2k.js +32 -0
  196. package/dist/packem_shared/{Transform-BHxY_dAM.js → Transform-Cfyva2wd.js} +1 -1
  197. package/dist/packem_shared/Transition-CbNfKhaj.js +108 -0
  198. package/dist/packem_shared/{TreeView-C2062dtj.js → TreeView-DGlZeSsK.js} +4 -4
  199. package/dist/packem_shared/{TuiApp-DfxOnXqi.js → TuiApp-DtdgNRWa.js} +4 -2
  200. package/dist/packem_shared/{TuiContext-CqEjMyXd.js → TuiContext-lXmJFd-x.js} +6 -3
  201. package/dist/packem_shared/{UnorderedList-DhnadWjX.js → UnorderedList-D8RPaEAW.js} +2 -2
  202. package/dist/packem_shared/{ansi-parser-0BdVTKho.js → ansi-parser-BOP8fNdT.js} +6 -4
  203. package/dist/packem_shared/braille-BoEWoH2I.js +93 -0
  204. package/dist/packem_shared/{comparePoints-CGMDnd3_.js → comparePoints-CAAlhiMS.js} +2 -2
  205. package/dist/packem_shared/{ControlledScrollView-BlOaxcsN.js → controlled-scroll-view-DJXfdWMm.js} +2 -2
  206. package/dist/packem_shared/{createInlineLoop-BxMmcq9D.js → createInlineLoop-Dnfm1ZSJ.js} +19 -13
  207. package/dist/packem_shared/createMemoryStorage-esFJ61La.js +115 -0
  208. package/dist/packem_shared/createScreen-Dh0sZlQ0.js +38 -0
  209. package/dist/packem_shared/{dom-DvzhsAez.js → dom-CrbpQgat.js} +17 -14
  210. package/dist/packem_shared/{getPathToRoot-a1wbwxfL.js → getPathToRoot-BbvlppLC.js} +2 -2
  211. package/dist/packem_shared/{getScrollHeight-BubfU_df.js → getScrollHeight-Cz3CDQN2.js} +5 -5
  212. package/dist/packem_shared/line-chart-VGU2l7pu.js +139 -0
  213. package/dist/packem_shared/{measure-element-Reza_yfC.js → measure-element-Bc6PEaIe.js} +26 -17
  214. package/dist/packem_shared/{measure-text-DItZYotK.js → measure-text-BdOhbOeh.js} +74 -7
  215. package/dist/packem_shared/{measureElement-CTgFCmKd.js → measureElement-DTELRaij.js} +2 -2
  216. package/dist/packem_shared/parseSgrMouse-4hpBJBsW.js +1 -0
  217. package/dist/packem_shared/{processLayout-BQ9kXfd3.js → processLayout-B0Coz0Ua.js} +1 -1
  218. package/dist/packem_shared/{reconciler-gfmqURLy.js → reconciler-Dd7Z0A97.js} +21 -5
  219. package/dist/packem_shared/{reconciler-BXf6miSS.js → reconciler-mzMwSOft.js} +23 -13
  220. package/dist/packem_shared/{render-BAwdjfki.js → render-Bm9Oa1sG.js} +72 -79
  221. package/dist/packem_shared/{render-Bpjhf0lD.js → render-CjlKdg4m.js} +15 -11
  222. package/dist/packem_shared/{renderToString-ClIaXgrC.js → renderToString-CWYS1ZXE.js} +4 -4
  223. package/dist/packem_shared/{renderToString-Cfg55DRD.js → renderToString-DB3ILWFm.js} +4 -4
  224. package/dist/packem_shared/{renderTreeToBuffer-D3mo7M7m.js → renderTreeToBuffer-CDDTGyZn.js} +8 -5
  225. package/dist/packem_shared/{renderer-B3wROkeg.js → renderer-GE9OLNNM.js} +47 -41
  226. package/dist/packem_shared/{setEnableStyledLineCache-BpskngSJ.js → setEnableStyledLineCache-D5f4favX.js} +1 -1
  227. package/dist/packem_shared/{text-width-DhuarWcB.js → text-width-Db-AxMea.js} +2 -1
  228. package/dist/packem_shared/{token-to-elements-BRFl_rzw.js → token-to-elements-CK4s8MJd.js} +2 -2
  229. package/dist/packem_shared/{useAnimation-kj31sA-T.js → useAnimation-DV22qxiJ.js} +2 -2
  230. package/dist/packem_shared/{useApp-DPQlRzi5.js → useApp-Cbi788rV.js} +1 -1
  231. package/dist/packem_shared/{useBoxMetrics-rBjKc-g4.js → useBoxMetrics-_5icypir.js} +2 -2
  232. package/dist/packem_shared/{useClipboard-B_9-adw1.js → useClipboard-MNj6MNR-.js} +1 -1
  233. package/dist/packem_shared/{useCursor-BIJzc8k9.js → useCursor-DS6LjIgv.js} +1 -1
  234. package/dist/packem_shared/{useFocus-CNl5QHHf.js → useFocus-DLoGQJd9.js} +2 -2
  235. package/dist/packem_shared/{useFocusManager-BPYaUuKQ.js → useFocusManager-UeZWtnNc.js} +1 -1
  236. package/dist/packem_shared/useForm-sQENbEuv.js +88 -0
  237. package/dist/packem_shared/useHotkey-D9giUX3q.js +112 -0
  238. package/dist/packem_shared/{useInput-Cfp5zB2s.js → useInput-DKZbqMRc.js} +2 -2
  239. package/dist/packem_shared/useInterval-CSXM8c2I.js +32 -0
  240. package/dist/packem_shared/{useIsScreenReaderEnabled-CnGKCe0f.js → useIsScreenReaderEnabled-BeoVqo1R.js} +1 -1
  241. package/dist/packem_shared/{useKeyBindings-B78l1E1n.js → useKeyBindings-S4fSIEAk.js} +2 -2
  242. package/dist/packem_shared/useKeyChord-BmXGNuEO.js +114 -0
  243. package/dist/packem_shared/{usePaste-Ct8J4AGR.js → usePaste-png73gvT.js} +2 -2
  244. package/dist/packem_shared/{useScrollInput-D3CpBq_a.js → useScrollInput-DfzRGQFe.js} +2 -2
  245. package/dist/packem_shared/{useStderr-CAOVUh4E.js → useStderr-BSWerMZ7.js} +1 -1
  246. package/dist/packem_shared/{useStdin-X-O0kd-n.js → useStdin-Rf0zPzVA.js} +1 -1
  247. package/dist/packem_shared/{useStdout-DyF6DSH0.js → useStdout-B5yRcg9N.js} +1 -1
  248. package/dist/packem_shared/{useStopwatch-qC4Beai4.js → useStopwatch-C__Zu6hd.js} +2 -2
  249. package/dist/packem_shared/{useTerminalPalette-BaWO2c4Q.js → useTerminalPalette-CtFG2JTq.js} +2 -2
  250. package/dist/packem_shared/{useTextSelection-mXtxgsPK.js → useTextSelection-ChrYZXsn.js} +2 -2
  251. package/dist/packem_shared/useTimeout-DuCqgWPX.js +34 -0
  252. package/dist/packem_shared/{useTimer-CPQ7j827.js → useTimer-DnBtbhB5.js} +1 -1
  253. package/dist/packem_shared/{useTreeView-BT57P3Kx.js → useTreeView-mkN5Di7w.js} +1 -1
  254. package/dist/packem_shared/{useWindowSize-ugEmGZJm.js → useWindowSize-D3UU41mv.js} +1 -1
  255. package/dist/packem_shared/waitFor-Cv9M2jKA.js +39 -0
  256. package/dist/packem_shared/{wrapOrTruncateStyledLine-DN3Nogoc.js → wrapOrTruncateStyledLine-49Mne3t3.js} +1 -1
  257. package/dist/react/index.js +7 -7
  258. package/dist/react/layout.d.ts +0 -2
  259. package/dist/testing/index.d.ts +4 -4
  260. package/dist/testing/index.js +6 -114
  261. package/dist/testing/wait-for.d.ts +0 -1
  262. package/index.js +691 -539
  263. package/package.json +17 -17
  264. package/dist/ink/components/file-picker/index.d.ts +0 -3
  265. package/dist/ink/components/tree-view/index.d.ts +0 -11
  266. package/dist/packem_shared/ControlledScrollView-DfAhcufF.js +0 -5
  267. package/dist/packem_shared/Spinner-BuI-kN4p.js +0 -1799
  268. package/dist/packem_shared/StaticRender-tYwH6QXl.js +0 -33
  269. package/dist/packem_shared/Stopwatch-DjtTCyHn.js +0 -23
  270. package/dist/packem_shared/Timer-wi9zuh4n.js +0 -22
  271. package/dist/packem_shared/parseSgrMouse-BHVBPP9G.js +0 -1
  272. /package/dist/ink/components/{AccessibilityContext.d.ts → accessibility-context.d.ts} +0 -0
  273. /package/dist/ink/components/{Alert.d.ts → alert.d.ts} +0 -0
  274. /package/dist/ink/components/{AnimationContext.d.ts → animation-context.d.ts} +0 -0
  275. /package/dist/ink/components/{AppContext.d.ts → app-context.d.ts} +0 -0
  276. /package/dist/ink/components/{App.d.ts → app.d.ts} +0 -0
  277. /package/dist/ink/components/{BackgroundContext.d.ts → background-context.d.ts} +0 -0
  278. /package/dist/ink/components/{Badge.d.ts → badge.d.ts} +0 -0
  279. /package/dist/ink/components/{BigText.d.ts → big-text.d.ts} +0 -0
  280. /package/dist/ink/components/{Box.d.ts → box.d.ts} +0 -0
  281. /package/dist/ink/components/{Code.d.ts → code.d.ts} +0 -0
  282. /package/dist/ink/components/{ConfirmInput.d.ts → confirm-input.d.ts} +0 -0
  283. /package/dist/ink/components/{ConsoleOverlay.d.ts → console-overlay.d.ts} +0 -0
  284. /package/dist/ink/components/{CursorContext.d.ts → cursor-context.d.ts} +0 -0
  285. /package/dist/ink/components/{Cursor.d.ts → cursor.d.ts} +0 -0
  286. /package/dist/ink/components/{Dialog.d.ts → dialog.d.ts} +0 -0
  287. /package/dist/ink/components/{DiffView.d.ts → diff-view.d.ts} +0 -0
  288. /package/dist/ink/components/{ErrorBoundary.d.ts → error-boundary.d.ts} +0 -0
  289. /package/dist/ink/components/{ErrorOverview.d.ts → error-overview.d.ts} +0 -0
  290. /package/dist/ink/components/{FocusContext.d.ts → focus-context.d.ts} +0 -0
  291. /package/dist/ink/components/{Gradient.d.ts → gradient.d.ts} +0 -0
  292. /package/dist/ink/components/{Link.d.ts → link.d.ts} +0 -0
  293. /package/dist/ink/components/{Markdown.d.ts → markdown.d.ts} +0 -0
  294. /package/dist/ink/components/{MultiSelect.d.ts → multi-select.d.ts} +0 -0
  295. /package/dist/ink/components/{Newline.d.ts → newline.d.ts} +0 -0
  296. /package/dist/ink/components/{OrderedList.d.ts → ordered-list.d.ts} +0 -0
  297. /package/dist/ink/components/{SelectInputIndicator.d.ts → select-input-indicator.d.ts} +0 -0
  298. /package/dist/ink/components/{SelectInputItem.d.ts → select-input-item.d.ts} +0 -0
  299. /package/dist/ink/components/{Slider.d.ts → slider.d.ts} +0 -0
  300. /package/dist/ink/components/{Spacer.d.ts → spacer.d.ts} +0 -0
  301. /package/dist/ink/components/{Static.d.ts → static.d.ts} +0 -0
  302. /package/dist/ink/components/{StatusMessage.d.ts → status-message.d.ts} +0 -0
  303. /package/dist/ink/components/{StderrContext.d.ts → stderr-context.d.ts} +0 -0
  304. /package/dist/ink/components/{StdinContext.d.ts → stdin-context.d.ts} +0 -0
  305. /package/dist/ink/components/{StdoutContext.d.ts → stdout-context.d.ts} +0 -0
  306. /package/dist/ink/components/{Tab.d.ts → tab.d.ts} +0 -0
  307. /package/dist/ink/components/{Table.d.ts → table.d.ts} +0 -0
  308. /package/dist/ink/components/{TextInput.d.ts → text-input.d.ts} +0 -0
  309. /package/dist/ink/components/{Text.d.ts → text.d.ts} +0 -0
  310. /package/dist/ink/components/{Textarea.d.ts → textarea.d.ts} +0 -0
  311. /package/dist/ink/components/{Transform.d.ts → transform.d.ts} +0 -0
  312. /package/dist/ink/components/tree-view/{TreeViewNode.d.ts → tree-view-node.d.ts} +0 -0
  313. /package/dist/ink/components/tree-view/{TreeView.d.ts → tree-view.d.ts} +0 -0
  314. /package/dist/ink/components/{UnorderedList.d.ts → unordered-list.d.ts} +0 -0
  315. /package/dist/ink/mouse/{Fullscreen.d.ts → fullscreen.d.ts} +0 -0
  316. /package/dist/ink/mouse/{MouseProvider.d.ts → mouse-provider.d.ts} +0 -0
  317. /package/dist/packem_shared/{AccessibilityContext-BLelHhNU.js → accessibility-context-BLelHhNU.js} +0 -0
  318. /package/dist/packem_shared/{AnimationContext-BcJg8Jr6.js → animation-context-BcJg8Jr6.js} +0 -0
  319. /package/dist/packem_shared/{AppContext-CP0U6H7O.js → app-context-CP0U6H7O.js} +0 -0
  320. /package/dist/packem_shared/{BackgroundContext-BAUaxfOb.js → background-context-BAUaxfOb.js} +0 -0
  321. /package/dist/packem_shared/{CursorContext-JxRzlqAx.js → cursor-context-JxRzlqAx.js} +0 -0
  322. /package/dist/packem_shared/{FocusContext-CWkYtgcm.js → focus-context-CWkYtgcm.js} +0 -0
  323. /package/dist/packem_shared/{StderrContext-Bj4Mf7v7.js → stderr-context-Bj4Mf7v7.js} +0 -0
  324. /package/dist/packem_shared/{StdinContext-Bq_GNJ3z.js → stdin-context-Bq_GNJ3z.js} +0 -0
  325. /package/dist/packem_shared/{StdoutContext-CgjWeCdO.js → stdout-context-CgjWeCdO.js} +0 -0
@@ -0,0 +1,139 @@
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
2
+ import { useMemo } from 'react';
3
+ import { c as createBrailleGrid } from './braille-BoEWoH2I.js';
4
+ import Box from './Box-W1w_NGin.js';
5
+ import Canvas from './Canvas-COttmLPX.js';
6
+ import Text from './Text-CtUwV89_.js';
7
+
8
+ const DEFAULT_CHART_PALETTE = ["cyan", "magenta", "yellow", "green", "blue", "red"];
9
+ const toPoints = (data) => {
10
+ if (data.length === 0) {
11
+ return [];
12
+ }
13
+ const first = data[0];
14
+ if (typeof first === "number") {
15
+ return data.map((y, x) => {
16
+ return { x, y };
17
+ });
18
+ }
19
+ return data;
20
+ };
21
+ const pickSeriesColor = (series, index, palette) => series.color ?? palette[index % palette.length] ?? "cyan";
22
+ const computeExtents = (seriesList) => {
23
+ let xMin = Number.POSITIVE_INFINITY;
24
+ let xMax = Number.NEGATIVE_INFINITY;
25
+ let yMin = Number.POSITIVE_INFINITY;
26
+ let yMax = Number.NEGATIVE_INFINITY;
27
+ for (const { points } of seriesList) {
28
+ for (const point of points) {
29
+ if (point.x < xMin) {
30
+ xMin = point.x;
31
+ }
32
+ if (point.x > xMax) {
33
+ xMax = point.x;
34
+ }
35
+ if (point.y < yMin) {
36
+ yMin = point.y;
37
+ }
38
+ if (point.y > yMax) {
39
+ yMax = point.y;
40
+ }
41
+ }
42
+ }
43
+ return { xMax, xMin, yMax, yMin };
44
+ };
45
+
46
+ const DEFAULT_PALETTE = DEFAULT_CHART_PALETTE;
47
+ const projectPoint = (point, config, pixelWidth, pixelHeight) => {
48
+ const xRange = config.xMax - config.xMin || 1;
49
+ const yRange = config.yMax - config.yMin || 1;
50
+ const nx = (point.x - config.xMin) / xRange;
51
+ const ny = (point.y - config.yMin) / yRange;
52
+ return {
53
+ px: Math.max(0, Math.min(pixelWidth - 1, Math.round(nx * (pixelWidth - 1)))),
54
+ py: Math.max(0, Math.min(pixelHeight - 1, Math.round((1 - ny) * (pixelHeight - 1))))
55
+ };
56
+ };
57
+ const drawSeriesOnCanvas = (context, mode, config) => {
58
+ context.clear();
59
+ const { axisColor, seriesList } = config;
60
+ const pixelWidth = Math.max(1, context.width * 2);
61
+ const pixelHeight = Math.max(1, context.height * 4);
62
+ for (let cellX = 0; cellX < context.width; cellX += 2) {
63
+ context.setCell(cellX, context.height - 1, "·", { color: axisColor, dim: true });
64
+ }
65
+ for (const { color, points } of seriesList) {
66
+ if (points.length === 0) {
67
+ continue;
68
+ }
69
+ const grid = createBrailleGrid(context.width, context.height);
70
+ if (mode === "scatter") {
71
+ for (const point of points) {
72
+ const projected = projectPoint(point, config, pixelWidth, pixelHeight);
73
+ grid.plotPoint(projected.px, projected.py);
74
+ }
75
+ } else {
76
+ let previous = projectPoint(points[0], config, pixelWidth, pixelHeight);
77
+ grid.plotPoint(previous.px, previous.py);
78
+ for (let index = 1; index < points.length; index += 1) {
79
+ const current = projectPoint(points[index], config, pixelWidth, pixelHeight);
80
+ grid.plotLine(previous.px, previous.py, current.px, current.py);
81
+ previous = current;
82
+ }
83
+ }
84
+ grid.flush(context, { color });
85
+ }
86
+ };
87
+ function LineChart({
88
+ axisColor = "gray",
89
+ height = 10,
90
+ maxY,
91
+ minY,
92
+ palette = DEFAULT_PALETTE,
93
+ series,
94
+ showLegend = true,
95
+ width = 40
96
+ }) {
97
+ const config = useMemo(() => {
98
+ const seriesList = series.map((input, index) => {
99
+ return {
100
+ color: pickSeriesColor(input, index, palette),
101
+ points: toPoints(input.data),
102
+ series: input
103
+ };
104
+ });
105
+ const extents = computeExtents(seriesList);
106
+ return {
107
+ axisColor,
108
+ palette,
109
+ seriesList,
110
+ xMax: extents.xMax === Number.NEGATIVE_INFINITY ? 1 : extents.xMax,
111
+ xMin: extents.xMin === Number.POSITIVE_INFINITY ? 0 : extents.xMin,
112
+ yMax: maxY ?? (extents.yMax === Number.NEGATIVE_INFINITY ? 1 : extents.yMax),
113
+ yMin: minY ?? (extents.yMin === Number.POSITIVE_INFINITY ? 0 : extents.yMin)
114
+ };
115
+ }, [series, axisColor, palette, minY, maxY]);
116
+ return jsxs(Box, { flexDirection: "column", children: [
117
+ jsx(
118
+ Canvas,
119
+ {
120
+ draw: (context) => {
121
+ drawSeriesOnCanvas(context, "line", config);
122
+ },
123
+ height,
124
+ version: [series, width, height, minY, maxY, axisColor, palette],
125
+ width
126
+ }
127
+ ),
128
+ showLegend ? jsx(Box, { gap: 2, marginTop: 1, children: config.seriesList.map(({ color, series: input }, index) => (
129
+ // Composite key: series index plus label so two
130
+ // series sharing a label don't collide.
131
+ jsxs(Box, { gap: 1, children: [
132
+ jsx(Text, { color, children: "●" }),
133
+ jsx(Text, { children: input.label ?? `Series ${index + 1}` })
134
+ ] }, `${index}:${input.label ?? ""}`)
135
+ )) }) : void 0
136
+ ] });
137
+ }
138
+
139
+ export { DEFAULT_CHART_PALETTE as D, LineChart as L, projectPoint as a, computeExtents as c, drawSeriesOnCanvas as d, pickSeriesColor as p, toPoints as t };
@@ -1,5 +1,5 @@
1
1
  import Yoga from 'yoga-layout';
2
- import { getScrollTop, getScrollLeft } from './getScrollHeight-BubfU_df.js';
2
+ import { getScrollTop, getScrollLeft } from './getScrollHeight-Cz3CDQN2.js';
3
3
  import squashTextNodes from './squashTextNodesWithMap-iqm6OMMT.js';
4
4
 
5
5
  const getAbsoluteBorderPosition = (node) => {
@@ -71,10 +71,10 @@ const processLayout = (node, callbacks) => {
71
71
  const measureElement = (node) => {
72
72
  const position = getAbsolutePosition(node);
73
73
  return {
74
- height: node.yogaNode?.getComputedHeight() ?? 0,
75
- width: node.yogaNode?.getComputedWidth() ?? 0,
76
- x: position?.x ?? 0,
77
- y: position?.y ?? 0
74
+ height: Math.round(node.yogaNode?.getComputedHeight() ?? 0),
75
+ width: Math.round(node.yogaNode?.getComputedWidth() ?? 0),
76
+ x: Math.round(position?.x ?? 0),
77
+ y: Math.round(position?.y ?? 0)
78
78
  };
79
79
  };
80
80
  const getInnerWidth = (node) => {
@@ -85,7 +85,7 @@ const getInnerWidth = (node) => {
85
85
  const width = yogaNode.getComputedWidth() ?? 0;
86
86
  const borderLeft = yogaNode.getComputedBorder(Yoga.EDGE_LEFT);
87
87
  const borderRight = yogaNode.getComputedBorder(Yoga.EDGE_RIGHT);
88
- return width - borderLeft - borderRight;
88
+ return Math.round(width - borderLeft - borderRight);
89
89
  };
90
90
  const getInnerHeight = (node) => {
91
91
  const { yogaNode } = node;
@@ -95,7 +95,7 @@ const getInnerHeight = (node) => {
95
95
  const height = yogaNode.getComputedHeight() ?? 0;
96
96
  const borderTop = yogaNode.getComputedBorder(Yoga.EDGE_TOP);
97
97
  const borderBottom = yogaNode.getComputedBorder(Yoga.EDGE_BOTTOM);
98
- return height - borderTop - borderBottom;
98
+ return Math.round(height - borderTop - borderBottom);
99
99
  };
100
100
  const getBoundingBox = (node) => {
101
101
  const { yogaNode } = node;
@@ -123,7 +123,12 @@ const getBoundingBox = (node) => {
123
123
  }
124
124
  parent = parent.parentNode;
125
125
  }
126
- return { height, width, x, y };
126
+ return {
127
+ height: Math.round(height),
128
+ width: Math.round(width),
129
+ x: Math.round(x),
130
+ y: Math.round(y)
131
+ };
127
132
  };
128
133
  const getAddedScrollHeight = (node) => {
129
134
  const scrollHeight = node.internal_scrollState?.scrollHeight ?? 0;
@@ -280,7 +285,7 @@ const getRelativeTop = (node, ancestor) => {
280
285
  if (ancestor !== void 0 && parent !== ancestor) {
281
286
  return void 0;
282
287
  }
283
- return top;
288
+ return Math.round(top);
284
289
  };
285
290
  const getRelativeLeft = (node, ancestor) => {
286
291
  if (!node.yogaNode || node === ancestor) {
@@ -297,7 +302,7 @@ const getRelativeLeft = (node, ancestor) => {
297
302
  if (ancestor !== void 0 && parent !== ancestor) {
298
303
  return void 0;
299
304
  }
300
- return left;
305
+ return Math.round(left);
301
306
  };
302
307
  const getText = (node) => {
303
308
  if (node.nodeName === "#text") {
@@ -325,14 +330,14 @@ const collectSortedFragments = (node) => {
325
330
  if (currentSelectable) {
326
331
  const text = getText(currentNode);
327
332
  fragments.push({
328
- height: currentNode.yogaNode?.getComputedHeight() ?? 0,
333
+ height: Math.round(currentNode.yogaNode?.getComputedHeight() ?? 0),
329
334
  node: currentNode,
330
335
  text,
331
- visualX,
332
- visualY,
333
- width: currentNode.yogaNode?.getComputedWidth() ?? 0,
334
- x,
335
- y
336
+ visualX: Math.round(visualX),
337
+ visualY: Math.round(visualY),
338
+ width: Math.round(currentNode.yogaNode?.getComputedWidth() ?? 0),
339
+ x: Math.round(x),
340
+ y: Math.round(y)
336
341
  });
337
342
  return { h: 0, hasContent: true, v: 0 };
338
343
  }
@@ -390,7 +395,11 @@ const collectSortedFragments = (node) => {
390
395
  }
391
396
  return a.x - b.x;
392
397
  });
393
- return { fragments, removedHorizontal: h, removedVertical: v };
398
+ return {
399
+ fragments,
400
+ removedHorizontal: Math.round(h),
401
+ removedVertical: Math.round(v)
402
+ };
394
403
  };
395
404
 
396
405
  export { calculateScrollbarThumb as a, collectSortedFragments as b, calculateScrollbarLayout as c, getBoundingBox as d, getHorizontalScrollbarBoundingBox as e, getInnerHeight as f, getAddedScrollHeight as g, getInnerWidth as h, getRelativeLeft as i, getRelativeTop as j, getText as k, getVerticalScrollbarBoundingBox as l, measureElement as m, getAbsoluteContentPosition as n, getAbsolutePosition as o, processLayout as p };
@@ -206,6 +206,9 @@ class StyledLine {
206
206
  }
207
207
  }
208
208
  this.charData[index] = start | (isFullWidth ? FULL_WIDTH_FLAG : 0);
209
+ if (this.trySetStyleAtIndex(index, cleanFormatFlags, fgColor, bgColor, link)) {
210
+ return;
211
+ }
209
212
  this.splitSpansAt(index);
210
213
  this.splitSpansAt(index + 1);
211
214
  let current = 0;
@@ -257,8 +260,7 @@ class StyledLine {
257
260
  }
258
261
  this.charData[index] = start | (isFullWidth ? FULL_WIDTH_FLAG : 0);
259
262
  }
260
- const existingSpan = this.getSpan(index);
261
- if (existingSpan?.formatFlags === cleanFormatFlags && existingSpan.fgColor === fgColor && existingSpan.bgColor === bgColor && existingSpan.link === link) {
263
+ if (this.trySetStyleAtIndex(index, cleanFormatFlags, fgColor, bgColor, link)) {
262
264
  return;
263
265
  }
264
266
  this.splitSpansAt(index);
@@ -475,11 +477,13 @@ class StyledLine {
475
477
  currentChar += line.length;
476
478
  currentOffset += lineText.length;
477
479
  }
478
- result.spans = allLines.flatMap((l) => l.getSpans().map((s) => {
479
- return {
480
- ...s
481
- };
482
- }));
480
+ result.spans = allLines.flatMap(
481
+ (l) => l.getSpans().map((s) => {
482
+ return {
483
+ ...s
484
+ };
485
+ })
486
+ );
483
487
  result.mergeSpans();
484
488
  return result;
485
489
  }
@@ -674,6 +678,63 @@ class StyledLine {
674
678
  current += span.length;
675
679
  }
676
680
  }
681
+ /**
682
+ * Try to apply a single-char style at `index` by matching or merging
683
+ * with an adjacent span, avoiding splitSpansAt + mergeSpans.
684
+ *
685
+ * Returns true if the style was applied (or was already correct),
686
+ * false if the caller must fall through to the split/update/merge path.
687
+ *
688
+ * Ported from jacob314/ink PR #123 (Google LLC, Apache-2.0).
689
+ */
690
+ trySetStyleAtIndex(index, formatFlags, fgColor, bgColor, link) {
691
+ if (!this.spans) {
692
+ return false;
693
+ }
694
+ let currentOffset = 0;
695
+ let spanIndex = -1;
696
+ let span;
697
+ for (let i = 0; i < this.spans.length; i++) {
698
+ const s = this.spans[i];
699
+ if (currentOffset <= index && currentOffset + s.length > index) {
700
+ spanIndex = i;
701
+ span = s;
702
+ break;
703
+ }
704
+ currentOffset += s.length;
705
+ }
706
+ if (!span) {
707
+ return false;
708
+ }
709
+ if (span.formatFlags === formatFlags && span.fgColor === fgColor && span.bgColor === bgColor && span.link === link) {
710
+ return true;
711
+ }
712
+ if (index === currentOffset && spanIndex > 0) {
713
+ const previousSpan = this.spans[spanIndex - 1];
714
+ if (previousSpan.formatFlags === formatFlags && previousSpan.fgColor === fgColor && previousSpan.bgColor === bgColor && previousSpan.link === link) {
715
+ previousSpan.length += 1;
716
+ if (span.length === 1) {
717
+ this.spans.splice(spanIndex, 1);
718
+ } else {
719
+ span.length -= 1;
720
+ }
721
+ return true;
722
+ }
723
+ }
724
+ if (index === currentOffset + span.length - 1 && spanIndex < this.spans.length - 1) {
725
+ const nextSpan = this.spans[spanIndex + 1];
726
+ if (nextSpan.formatFlags === formatFlags && nextSpan.fgColor === fgColor && nextSpan.bgColor === bgColor && nextSpan.link === link) {
727
+ nextSpan.length += 1;
728
+ if (span.length === 1) {
729
+ this.spans.splice(spanIndex, 1);
730
+ } else {
731
+ span.length -= 1;
732
+ }
733
+ return true;
734
+ }
735
+ }
736
+ return false;
737
+ }
677
738
  mergeSpans() {
678
739
  if (this.spans === void 0) {
679
740
  return;
@@ -1101,6 +1162,12 @@ const clearStringWidthCache = () => {
1101
1162
  styledLineCache.clear();
1102
1163
  };
1103
1164
  const inkCharacterWidth = (text) => {
1165
+ if (text.length === 1) {
1166
+ const code = text.codePointAt(0);
1167
+ if (code !== void 0 && code >= 32 && code < 127) {
1168
+ return 1;
1169
+ }
1170
+ }
1104
1171
  const cached = widthCache.get(text);
1105
1172
  if (cached !== void 0) {
1106
1173
  return cached;
@@ -1,4 +1,4 @@
1
1
  import 'yoga-layout';
2
- export { c as calculateScrollbarLayout, a as calculateScrollbarThumb, b as collectSortedFragments, m as default, g as getAddedScrollHeight, d as getBoundingBox, e as getHorizontalScrollbarBoundingBox, f as getInnerHeight, h as getInnerWidth, i as getRelativeLeft, j as getRelativeTop, k as getText, l as getVerticalScrollbarBoundingBox } from './measure-element-Reza_yfC.js';
3
- import './getScrollHeight-BubfU_df.js';
2
+ export { c as calculateScrollbarLayout, a as calculateScrollbarThumb, b as collectSortedFragments, m as default, g as getAddedScrollHeight, d as getBoundingBox, e as getHorizontalScrollbarBoundingBox, f as getInnerHeight, h as getInnerWidth, i as getRelativeLeft, j as getRelativeTop, k as getText, l as getVerticalScrollbarBoundingBox } from './measure-element-Bc6PEaIe.js';
3
+ import './getScrollHeight-Cz3CDQN2.js';
4
4
  import './squashTextNodesWithMap-iqm6OMMT.js';
@@ -0,0 +1 @@
1
+ export { p as parseSgrMouse } from './ansi-parser-BOP8fNdT.js';
@@ -1,2 +1,2 @@
1
1
  import 'yoga-layout';
2
- export { n as getAbsoluteContentPosition, o as getAbsolutePosition, p as processLayout } from './measure-element-Reza_yfC.js';
2
+ export { n as getAbsoluteContentPosition, o as getAbsolutePosition, p as processLayout } from './measure-element-Bc6PEaIe.js';
@@ -10,7 +10,7 @@ import createReconciler from 'react-reconciler';
10
10
  import { NoEventPriority, DefaultEventPriority } from 'react-reconciler/constants.js';
11
11
  import { unstable_shouldYield, unstable_scheduleCallback, unstable_now, unstable_cancelCallback } from 'scheduler';
12
12
  import Yoga from 'yoga-layout';
13
- import { b as insertBeforeNode, d as appendChildNode, s as setTextNodeValue, e as emitLayoutListeners, r as removeChildNode, f as createTextNode, c as createNode, h as setStyle, j as setAttribute } from './dom-DvzhsAez.js';
13
+ import { b as insertBeforeNode, d as appendChildNode, s as setTextNodeValue, m as markNodeAsDirty, e as emitLayoutListeners, r as removeChildNode, f as createTextNode, c as createNode, h as setStyle, j as setAttribute } from './dom-CrbpQgat.js';
14
14
 
15
15
  const positionEdges = [
16
16
  ["top", Yoga.EDGE_TOP],
@@ -419,62 +419,76 @@ const reconcilerInstance = createReconciler({
419
419
  if (!props && !style) {
420
420
  return;
421
421
  }
422
+ let shouldMarkDirty = Boolean(style);
422
423
  if (props) {
423
424
  for (const [key, value] of Object.entries(props)) {
425
+ if (key === "children") {
426
+ continue;
427
+ }
424
428
  if (key === "style") {
425
429
  setStyle(node, value);
426
430
  continue;
427
431
  }
428
432
  if (key === "internal_transform") {
429
433
  node.internal_transform = value;
434
+ shouldMarkDirty = true;
430
435
  continue;
431
436
  }
432
437
  if (key === "internal_cursor") {
433
438
  node.internal_cursor = value;
439
+ shouldMarkDirty = true;
434
440
  continue;
435
441
  }
436
442
  if (key === "internal_static") {
437
443
  node.internal_static = true;
444
+ shouldMarkDirty = true;
438
445
  continue;
439
446
  }
440
447
  if (key === "sticky") {
441
448
  node.internal_sticky = value;
449
+ shouldMarkDirty = true;
442
450
  continue;
443
451
  }
444
452
  if (key === "internalStickyAlternate") {
445
453
  node.internal_stickyAlternate = value;
454
+ shouldMarkDirty = true;
446
455
  continue;
447
456
  }
448
457
  if (key === "opaque") {
449
458
  node.internal_opaque = value;
459
+ shouldMarkDirty = true;
450
460
  continue;
451
461
  }
452
462
  if (key === "scrollbar") {
453
463
  node.internal_scrollbar = value;
464
+ shouldMarkDirty = true;
454
465
  continue;
455
466
  }
456
467
  if (key === "internal_terminalCursorFocus") {
457
468
  node.internal_terminalCursorFocus = value;
469
+ shouldMarkDirty = true;
458
470
  continue;
459
471
  }
460
472
  if (key === "internal_terminalCursorPosition") {
461
473
  node.internal_terminalCursorPosition = value;
462
- continue;
463
- }
464
- if (key === "internal_static") {
465
- node.internal_static = true;
474
+ shouldMarkDirty = true;
466
475
  continue;
467
476
  }
468
477
  if (key === "cachedRender") {
469
478
  node.cachedRender = value;
479
+ shouldMarkDirty = true;
470
480
  continue;
471
481
  }
472
482
  setAttribute(node, key, value);
483
+ shouldMarkDirty = true;
473
484
  }
474
485
  }
475
486
  if (style && node.yogaNode) {
476
487
  styles(node.yogaNode, style, newProps["style"] ?? {});
477
488
  }
489
+ if (shouldMarkDirty) {
490
+ markNodeAsDirty(node);
491
+ }
478
492
  },
479
493
  createInstance(originalType, newProps, rootNode, hostContext) {
480
494
  if (hostContext.isInsideText && originalType === "ink-box") {
@@ -578,6 +592,7 @@ const reconcilerInstance = createReconciler({
578
592
  hideInstance(node) {
579
593
  node.internal_hidden = true;
580
594
  node.yogaNode?.setDisplay(Yoga.DISPLAY_NONE);
595
+ markNodeAsDirty(node);
581
596
  },
582
597
  hideTextInstance(node) {
583
598
  setTextNodeValue(node, "");
@@ -668,6 +683,7 @@ const reconcilerInstance = createReconciler({
668
683
  unhideInstance(node) {
669
684
  node.internal_hidden = false;
670
685
  node.yogaNode?.setDisplay(Yoga.DISPLAY_FLEX);
686
+ markNodeAsDirty(node);
671
687
  },
672
688
  unhideTextInstance(node, text) {
673
689
  setTextNodeValue(node, text);
@@ -2,9 +2,9 @@ import { createContext } from 'react';
2
2
  import createReconciler from 'react-reconciler';
3
3
  import { NoEventPriority, DiscreteEventPriority, DefaultEventPriority } from 'react-reconciler/constants.js';
4
4
  import { unstable_shouldYield, unstable_scheduleCallback, unstable_now, unstable_cancelCallback } from 'scheduler';
5
- import { LayoutNode } from './LayoutNode-Cjnsodiy.js';
6
- import { applyStyles, resolveColor } from './NAMED_COLORS-a4QBvb5r.js';
7
- import { g as getStringWidth } from './text-width-DhuarWcB.js';
5
+ import { LayoutNode } from './LayoutNode-DAkKg9TE.js';
6
+ import { applyStyles, resolveColor } from './NAMED_COLORS-DcI3erCu.js';
7
+ import { g as getStringWidth } from './text-width-Db-AxMea.js';
8
8
 
9
9
  let onAfterCommit = null;
10
10
  function setOnAfterCommit(function_) {
@@ -17,22 +17,30 @@ function resolveNodeColors(props) {
17
17
  let styles;
18
18
  if (props.styles === void 0) {
19
19
  styles = 0;
20
- if (props.bold)
20
+ if (props.bold) {
21
21
  styles |= 1;
22
- if (props.dim || props.dimColor)
22
+ }
23
+ if (props.dim || props.dimColor) {
23
24
  styles |= 2;
24
- if (props.italic)
25
+ }
26
+ if (props.italic) {
25
27
  styles |= 4;
26
- if (props.underline)
28
+ }
29
+ if (props.underline) {
27
30
  styles |= 8;
28
- if (props.blink)
31
+ }
32
+ if (props.blink) {
29
33
  styles |= 16;
30
- if (props.inverse)
34
+ }
35
+ if (props.inverse) {
31
36
  styles |= 32;
32
- if (props.hidden)
37
+ }
38
+ if (props.hidden) {
33
39
  styles |= 64;
34
- if (props.strikethrough)
40
+ }
41
+ if (props.strikethrough) {
35
42
  styles |= 128;
43
+ }
36
44
  } else {
37
45
  styles = props.styles;
38
46
  }
@@ -125,8 +133,9 @@ const hostConfig = {
125
133
  },
126
134
  HostTransitionContext: createContext(null),
127
135
  insertBefore(parentInstance, child, beforeChild) {
128
- if (child.parent)
136
+ if (child.parent) {
129
137
  child.remove();
138
+ }
130
139
  const index = parentInstance.children.indexOf(beforeChild);
131
140
  parentInstance.insertChild(child, index);
132
141
  },
@@ -165,8 +174,9 @@ const hostConfig = {
165
174
  requestPostPaintCallback: () => {
166
175
  },
167
176
  resetAfterCommit(containerInfo) {
168
- if (typeof onAfterCommit === "function")
177
+ if (typeof onAfterCommit === "function") {
169
178
  onAfterCommit();
179
+ }
170
180
  },
171
181
  resolveEventTimeStamp: () => -1.1,
172
182
  resolveEventType: () => null,