@comma-agents/tui 2.0.0-rc.0

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 (256) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +10 -0
  3. package/dist/App/App.d.ts +24 -0
  4. package/dist/App/App.theme.d.ts +12 -0
  5. package/dist/App/App.types.d.ts +8 -0
  6. package/dist/App/index.d.ts +4 -0
  7. package/dist/Theme/DefineTheme.d.ts +53 -0
  8. package/dist/Theme/Theme.d.ts +11 -0
  9. package/dist/Theme/Theme.types.d.ts +100 -0
  10. package/dist/Theme/index.d.ts +9 -0
  11. package/dist/Theme/themes/dark.d.ts +14 -0
  12. package/dist/Theme/themes/dracula.d.ts +9 -0
  13. package/dist/Theme/themes/index.d.ts +25 -0
  14. package/dist/Theme/themes/light.d.ts +10 -0
  15. package/dist/Theme/themes/solarized-dark.d.ts +9 -0
  16. package/dist/Theme/useTheme/index.d.ts +3 -0
  17. package/dist/Theme/useTheme/useTheme.context.d.ts +31 -0
  18. package/dist/Theme/useTheme/useTheme.d.ts +11 -0
  19. package/dist/Theme/useTheme/useTheme.types.d.ts +10 -0
  20. package/dist/components/BorderedPanel/BorderedPanel.d.ts +70 -0
  21. package/dist/components/BorderedPanel/BorderedPanel.theme.d.ts +59 -0
  22. package/dist/components/BorderedPanel/index.d.ts +4 -0
  23. package/dist/components/Button/Button.d.ts +69 -0
  24. package/dist/components/Button/Button.theme.d.ts +50 -0
  25. package/dist/components/Button/Button.types.d.ts +9 -0
  26. package/dist/components/Button/index.d.ts +4 -0
  27. package/dist/components/ChatTextArea/ChatTextArea.d.ts +85 -0
  28. package/dist/components/ChatTextArea/ChatTextArea.theme.d.ts +34 -0
  29. package/dist/components/ChatTextArea/index.d.ts +2 -0
  30. package/dist/components/CodeView/CodeView.constants.d.ts +9 -0
  31. package/dist/components/CodeView/CodeView.d.ts +23 -0
  32. package/dist/components/CodeView/CodeView.theme.d.ts +26 -0
  33. package/dist/components/CodeView/index.d.ts +4 -0
  34. package/dist/components/CommandPalette/CommandPalette.constants.d.ts +8 -0
  35. package/dist/components/CommandPalette/CommandPalette.d.ts +62 -0
  36. package/dist/components/CommandPalette/CommandPalette.theme.d.ts +50 -0
  37. package/dist/components/CommandPalette/CommandPalette.types.d.ts +50 -0
  38. package/dist/components/CommandPalette/CommandPalette.utils.d.ts +6 -0
  39. package/dist/components/CommandPalette/index.d.ts +5 -0
  40. package/dist/components/CommandPalette/pages/HelpPage/HelpPage.constants.d.ts +2 -0
  41. package/dist/components/CommandPalette/pages/HelpPage/HelpPage.d.ts +12 -0
  42. package/dist/components/CommandPalette/pages/HelpPage/HelpPage.types.d.ts +5 -0
  43. package/dist/components/CommandPalette/pages/HelpPage/index.d.ts +3 -0
  44. package/dist/components/CommandPalette/pages/ListProvidersPage/ListProvidersPage.d.ts +42 -0
  45. package/dist/components/CommandPalette/pages/ListProvidersPage/index.d.ts +1 -0
  46. package/dist/components/CommandPalette/pages/RegisteredProvidersPage/RegisteredProvidersPage.constants.d.ts +3 -0
  47. package/dist/components/CommandPalette/pages/RegisteredProvidersPage/RegisteredProvidersPage.d.ts +40 -0
  48. package/dist/components/CommandPalette/pages/RegisteredProvidersPage/RegisteredProvidersPage.types.d.ts +13 -0
  49. package/dist/components/CommandPalette/pages/RegisteredProvidersPage/RegisteredProvidersPage.utils.d.ts +9 -0
  50. package/dist/components/CommandPalette/pages/RegisteredProvidersPage/index.d.ts +2 -0
  51. package/dist/components/CommandPalette/pages/RunPickerPage/RunPickerPage.constants.d.ts +3 -0
  52. package/dist/components/CommandPalette/pages/RunPickerPage/RunPickerPage.d.ts +31 -0
  53. package/dist/components/CommandPalette/pages/RunPickerPage/RunPickerPage.types.d.ts +8 -0
  54. package/dist/components/CommandPalette/pages/RunPickerPage/RunPickerPage.utils.d.ts +7 -0
  55. package/dist/components/CommandPalette/pages/RunPickerPage/index.d.ts +3 -0
  56. package/dist/components/CommandPalette/pages/SettingsPage/SettingsPage.d.ts +24 -0
  57. package/dist/components/CommandPalette/pages/SettingsPage/index.d.ts +2 -0
  58. package/dist/components/Frame/Frame.d.ts +48 -0
  59. package/dist/components/Frame/Frame.theme.d.ts +52 -0
  60. package/dist/components/Frame/index.d.ts +4 -0
  61. package/dist/components/Hide/Hide.d.ts +20 -0
  62. package/dist/components/Hide/Hide.types.d.ts +12 -0
  63. package/dist/components/Hide/index.d.ts +2 -0
  64. package/dist/components/MessageList/AgentMessage/AgentMessage.d.ts +71 -0
  65. package/dist/components/MessageList/AgentMessage/index.d.ts +2 -0
  66. package/dist/components/MessageList/ContextUsageModal/ContextUsageModal.constants.d.ts +2 -0
  67. package/dist/components/MessageList/ContextUsageModal/ContextUsageModal.d.ts +9 -0
  68. package/dist/components/MessageList/ContextUsageModal/ContextUsageModal.types.d.ts +12 -0
  69. package/dist/components/MessageList/ContextUsageModal/index.d.ts +4 -0
  70. package/dist/components/MessageList/MarkdownView/MarkdownView.constants.d.ts +51 -0
  71. package/dist/components/MessageList/MarkdownView/MarkdownView.d.ts +34 -0
  72. package/dist/components/MessageList/MarkdownView/MarkdownView.theme.d.ts +89 -0
  73. package/dist/components/MessageList/MarkdownView/MarkdownView.types.d.ts +96 -0
  74. package/dist/components/MessageList/MarkdownView/MarkdownView.utils.d.ts +58 -0
  75. package/dist/components/MessageList/MarkdownView/index.d.ts +6 -0
  76. package/dist/components/MessageList/MessageList.d.ts +20 -0
  77. package/dist/components/MessageList/MessageList.theme.d.ts +170 -0
  78. package/dist/components/MessageList/MessageList.types.d.ts +26 -0
  79. package/dist/components/MessageList/OutputModal/OutputModal.constants.d.ts +22 -0
  80. package/dist/components/MessageList/OutputModal/OutputModal.d.ts +37 -0
  81. package/dist/components/MessageList/OutputModal/OutputModal.theme.d.ts +68 -0
  82. package/dist/components/MessageList/OutputModal/OutputModal.types.d.ts +56 -0
  83. package/dist/components/MessageList/OutputModal/OutputModal.utils.d.ts +3 -0
  84. package/dist/components/MessageList/OutputModal/index.d.ts +6 -0
  85. package/dist/components/MessageList/SpawnedStrategyView/SpawnedStrategyView.d.ts +47 -0
  86. package/dist/components/MessageList/SpawnedStrategyView/SpawnedStrategyView.theme.d.ts +58 -0
  87. package/dist/components/MessageList/SpawnedStrategyView/index.d.ts +4 -0
  88. package/dist/components/MessageList/SystemMessage/SystemMessage.d.ts +21 -0
  89. package/dist/components/MessageList/SystemMessage/index.d.ts +2 -0
  90. package/dist/components/MessageList/ToolCallView/ToolCallView.constants.d.ts +42 -0
  91. package/dist/components/MessageList/ToolCallView/ToolCallView.d.ts +71 -0
  92. package/dist/components/MessageList/ToolCallView/ToolCallView.theme.d.ts +47 -0
  93. package/dist/components/MessageList/ToolCallView/ToolCallView.types.d.ts +60 -0
  94. package/dist/components/MessageList/ToolCallView/ToolCallView.utils.d.ts +40 -0
  95. package/dist/components/MessageList/ToolCallView/index.d.ts +8 -0
  96. package/dist/components/MessageList/UserMessage/UserMessage.d.ts +25 -0
  97. package/dist/components/MessageList/UserMessage/index.d.ts +2 -0
  98. package/dist/components/MessageList/index.d.ts +14 -0
  99. package/dist/components/Modal/Modal.d.ts +64 -0
  100. package/dist/components/Modal/Modal.theme.d.ts +29 -0
  101. package/dist/components/Modal/index.d.ts +4 -0
  102. package/dist/components/MouseProvider/MouseContext.d.ts +36 -0
  103. package/dist/components/MouseProvider/MouseProvider.d.ts +20 -0
  104. package/dist/components/MouseProvider/index.d.ts +4 -0
  105. package/dist/components/PermissionPrompt/PermissionPrompt.d.ts +33 -0
  106. package/dist/components/PermissionPrompt/index.d.ts +2 -0
  107. package/dist/components/QuestionPrompt/QuestionPrompt.d.ts +4 -0
  108. package/dist/components/QuestionPrompt/QuestionPrompt.types.d.ts +18 -0
  109. package/dist/components/QuestionPrompt/index.d.ts +2 -0
  110. package/dist/components/ScrollableList/ScrollableList.d.ts +33 -0
  111. package/dist/components/ScrollableList/ScrollableList.theme.d.ts +33 -0
  112. package/dist/components/ScrollableList/ScrollableList.types.d.ts +66 -0
  113. package/dist/components/ScrollableList/index.d.ts +4 -0
  114. package/dist/components/ScrollableView/ScrollableView.d.ts +34 -0
  115. package/dist/components/ScrollableView/ScrollableView.theme.d.ts +34 -0
  116. package/dist/components/ScrollableView/ScrollableView.types.d.ts +113 -0
  117. package/dist/components/ScrollableView/index.d.ts +4 -0
  118. package/dist/components/Scrollbar/Scrollbar.d.ts +21 -0
  119. package/dist/components/Scrollbar/Scrollbar.theme.d.ts +16 -0
  120. package/dist/components/Scrollbar/Scrollbar.types.d.ts +27 -0
  121. package/dist/components/Scrollbar/Scrollbar.utils.d.ts +21 -0
  122. package/dist/components/Scrollbar/index.d.ts +4 -0
  123. package/dist/components/SearchInput/SearchInput.d.ts +22 -0
  124. package/dist/components/SearchInput/SearchInput.theme.d.ts +30 -0
  125. package/dist/components/SearchInput/SearchInput.types.d.ts +25 -0
  126. package/dist/components/SearchInput/SearchInput.utils.d.ts +22 -0
  127. package/dist/components/SearchInput/index.d.ts +5 -0
  128. package/dist/components/Separator/Separator.d.ts +39 -0
  129. package/dist/components/Separator/Separator.theme.d.ts +22 -0
  130. package/dist/components/Separator/index.d.ts +4 -0
  131. package/dist/components/StatusBar/StatusBar.d.ts +4 -0
  132. package/dist/components/StatusBar/StatusBar.theme.d.ts +35 -0
  133. package/dist/components/StatusBar/StatusBar.types.d.ts +24 -0
  134. package/dist/components/StatusBar/index.d.ts +2 -0
  135. package/dist/components/TextAreaInput/TextAreaInput.d.ts +68 -0
  136. package/dist/components/TextAreaInput/TextAreaInput.theme.d.ts +14 -0
  137. package/dist/components/TextAreaInput/TextAreaInput.utils.d.ts +69 -0
  138. package/dist/components/TextAreaInput/index.d.ts +2 -0
  139. package/dist/components/TitleIcon/TitleIcon.d.ts +13 -0
  140. package/dist/components/TitleIcon/TitleIcon.theme.d.ts +19 -0
  141. package/dist/components/TitleIcon/index.d.ts +1 -0
  142. package/dist/components/index.d.ts +61 -0
  143. package/dist/hooks/index.d.ts +27 -0
  144. package/dist/hooks/useBreakpoint/index.d.ts +2 -0
  145. package/dist/hooks/useBreakpoint/useBreakpoint.d.ts +15 -0
  146. package/dist/hooks/useBreakpoint/useBreakpoint.types.d.ts +18 -0
  147. package/dist/hooks/useChat/index.d.ts +22 -0
  148. package/dist/hooks/useChat/useChat.context.d.ts +7 -0
  149. package/dist/hooks/useChat/useChat.d.ts +11 -0
  150. package/dist/hooks/useChat/useChat.types.d.ts +209 -0
  151. package/dist/hooks/useChat/useChat.utils.d.ts +18 -0
  152. package/dist/hooks/useChat/useChatActions.d.ts +10 -0
  153. package/dist/hooks/useChat/useChatAgentMessages/index.d.ts +1 -0
  154. package/dist/hooks/useChat/useChatAgentMessages/useChatAgentMessages.d.ts +2 -0
  155. package/dist/hooks/useChat/useChatInputRequests/index.d.ts +2 -0
  156. package/dist/hooks/useChat/useChatInputRequests/useChatInputRequests.d.ts +3 -0
  157. package/dist/hooks/useChat/useChatInputRequests/useChatInputRequests.types.d.ts +4 -0
  158. package/dist/hooks/useChat/useChatLifecycle.d.ts +5 -0
  159. package/dist/hooks/useChat/useChatPermissionRequests/index.d.ts +2 -0
  160. package/dist/hooks/useChat/useChatPermissionRequests/useChatPermissionRequestSubscriptions.d.ts +2 -0
  161. package/dist/hooks/useChat/useChatPermissionRequests/useChatPermissionRequests.d.ts +3 -0
  162. package/dist/hooks/useChat/useChatPermissionRequests/useChatPermissionRequests.types.d.ts +4 -0
  163. package/dist/hooks/useChat/useChatQuestionRequests/index.d.ts +2 -0
  164. package/dist/hooks/useChat/useChatQuestionRequests/useChatQuestionRequestSubscriptions.d.ts +2 -0
  165. package/dist/hooks/useChat/useChatQuestionRequests/useChatQuestionRequests.d.ts +3 -0
  166. package/dist/hooks/useChat/useChatQuestionRequests/useChatQuestionRequests.types.d.ts +4 -0
  167. package/dist/hooks/useChat/useChatRunLifecycle/index.d.ts +2 -0
  168. package/dist/hooks/useChat/useChatRunLifecycle/useChatRunLifecycle.d.ts +3 -0
  169. package/dist/hooks/useChat/useChatRunLifecycle/useChatRunLifecycle.types.d.ts +11 -0
  170. package/dist/hooks/useChat/useChatRunLifecycle/useChatRunLifecycleSubscriptions.d.ts +2 -0
  171. package/dist/hooks/useChat/useChatRunStore/index.d.ts +1 -0
  172. package/dist/hooks/useChat/useChatRunStore/useChatRunStore.d.ts +3 -0
  173. package/dist/hooks/useChat/useChatRuns.d.ts +10 -0
  174. package/dist/hooks/useChat/useChatState.d.ts +17 -0
  175. package/dist/hooks/useChat/useChatSteering/index.d.ts +2 -0
  176. package/dist/hooks/useChat/useChatSteering/useChatSteering.d.ts +3 -0
  177. package/dist/hooks/useChat/useChatSteering/useChatSteering.types.d.ts +4 -0
  178. package/dist/hooks/useChat/useChatStepMessages/index.d.ts +1 -0
  179. package/dist/hooks/useChat/useChatStepMessages/useChatStepMessages.d.ts +2 -0
  180. package/dist/hooks/useChat/usePersistedRunList/index.d.ts +2 -0
  181. package/dist/hooks/useChat/usePersistedRunList/usePersistedRunList.d.ts +3 -0
  182. package/dist/hooks/useChat/usePersistedRunList/usePersistedRunList.types.d.ts +5 -0
  183. package/dist/hooks/useDaemon/index.d.ts +6 -0
  184. package/dist/hooks/useDaemon/useDaemon.context.d.ts +18 -0
  185. package/dist/hooks/useDaemon/useDaemon.d.ts +7 -0
  186. package/dist/hooks/useDaemon/useDaemon.types.d.ts +62 -0
  187. package/dist/hooks/useDaemon/useDaemonCommand/index.d.ts +2 -0
  188. package/dist/hooks/useDaemon/useDaemonCommand/useDaemonCommand.d.ts +20 -0
  189. package/dist/hooks/useDaemon/useDaemonCommand/useDaemonCommand.types.d.ts +28 -0
  190. package/dist/hooks/useDaemon/useDaemonSubscription/index.d.ts +1 -0
  191. package/dist/hooks/useDaemon/useDaemonSubscription/useDaemonSubscription.d.ts +18 -0
  192. package/dist/hooks/useDebugRender/index.d.ts +2 -0
  193. package/dist/hooks/useDebugRender/useDebugRender.constants.d.ts +18 -0
  194. package/dist/hooks/useDebugRender/useDebugRender.d.ts +35 -0
  195. package/dist/hooks/useDebugRender/useDebugRender.types.d.ts +60 -0
  196. package/dist/hooks/useDebugRender/useDebugRender.utils.d.ts +34 -0
  197. package/dist/hooks/useLogs/index.d.ts +3 -0
  198. package/dist/hooks/useLogs/logStore.d.ts +18 -0
  199. package/dist/hooks/useLogs/useLogs.constants.d.ts +2 -0
  200. package/dist/hooks/useLogs/useLogs.d.ts +15 -0
  201. package/dist/hooks/useLogs/useLogs.types.d.ts +47 -0
  202. package/dist/hooks/useLogs/useLogs.utils.d.ts +13 -0
  203. package/dist/hooks/useModal/index.d.ts +3 -0
  204. package/dist/hooks/useModal/useModal.context.d.ts +20 -0
  205. package/dist/hooks/useModal/useModal.d.ts +22 -0
  206. package/dist/hooks/useModal/useModal.types.d.ts +49 -0
  207. package/dist/hooks/useMouse/index.d.ts +2 -0
  208. package/dist/hooks/useMouse/useMouse.types.d.ts +43 -0
  209. package/dist/hooks/useMouse/useMouse.utils.d.ts +30 -0
  210. package/dist/hooks/useMouseClick/index.d.ts +2 -0
  211. package/dist/hooks/useMouseClick/useMouseClick.d.ts +23 -0
  212. package/dist/hooks/useMouseClick/useMouseClick.types.d.ts +28 -0
  213. package/dist/hooks/useMouseHover/index.d.ts +2 -0
  214. package/dist/hooks/useMouseHover/useMouseHover.d.ts +25 -0
  215. package/dist/hooks/useMouseHover/useMouseHover.types.d.ts +38 -0
  216. package/dist/hooks/useMouseWheelScroll/index.d.ts +2 -0
  217. package/dist/hooks/useMouseWheelScroll/useMouseWheelScroll.d.ts +28 -0
  218. package/dist/hooks/useMouseWheelScroll/useMouseWheelScroll.types.d.ts +32 -0
  219. package/dist/hooks/useRegion/index.d.ts +3 -0
  220. package/dist/hooks/useRegion/useRegion.d.ts +21 -0
  221. package/dist/hooks/useRegion/useRegion.types.d.ts +41 -0
  222. package/dist/hooks/useRegion/useRegion.utils.d.ts +51 -0
  223. package/dist/hooks/useStrategies/useStrategies.d.ts +10 -0
  224. package/dist/hooks/useToolSpinner/index.d.ts +1 -0
  225. package/dist/hooks/useToolSpinner/useToolSpinner.d.ts +28 -0
  226. package/dist/hooks/useUserConfig/index.d.ts +4 -0
  227. package/dist/hooks/useUserConfig/useUserConfig.constants.d.ts +17 -0
  228. package/dist/hooks/useUserConfig/useUserConfig.context.d.ts +9 -0
  229. package/dist/hooks/useUserConfig/useUserConfig.d.ts +9 -0
  230. package/dist/hooks/useUserConfig/useUserConfig.types.d.ts +30 -0
  231. package/dist/hooks/useUserConfig/useUserConfig.utils.d.ts +19 -0
  232. package/dist/hooks/useWebSocket/index.d.ts +2 -0
  233. package/dist/hooks/useWebSocket/useWebSocket.d.ts +17 -0
  234. package/dist/hooks/useWebSocket/useWebSocket.types.d.ts +27 -0
  235. package/dist/index.d.ts +2 -0
  236. package/dist/index.js +10592 -0
  237. package/dist/main.js +10655 -0
  238. package/dist/pages/ChatPage/ChatPage.constants.d.ts +2 -0
  239. package/dist/pages/ChatPage/ChatPage.d.ts +25 -0
  240. package/dist/pages/ChatPage/ChatPage.theme.d.ts +56 -0
  241. package/dist/pages/ChatPage/index.d.ts +4 -0
  242. package/dist/pages/IntroPage/IntroPage.d.ts +14 -0
  243. package/dist/pages/IntroPage/IntroPage.theme.d.ts +13 -0
  244. package/dist/pages/IntroPage/index.d.ts +4 -0
  245. package/dist/pages/LogsPage/LogsPage.d.ts +14 -0
  246. package/dist/pages/LogsPage/LogsPage.theme.d.ts +49 -0
  247. package/dist/pages/LogsPage/LogsPage.utils.d.ts +5 -0
  248. package/dist/pages/LogsPage/index.d.ts +4 -0
  249. package/dist/pages/SpawnedStrategyPage/SpawnedStrategyPage.d.ts +12 -0
  250. package/dist/pages/SpawnedStrategyPage/index.d.ts +2 -0
  251. package/dist/run-tui.d.ts +12 -0
  252. package/dist/run-tui.types.d.ts +12 -0
  253. package/dist/utils/debug.d.ts +12 -0
  254. package/dist/utils/mouseEscape.d.ts +29 -0
  255. package/dist/utils/yogaLayout.d.ts +32 -0
  256. package/package.json +66 -0
@@ -0,0 +1,113 @@
1
+ import type { DOMElement } from "ink";
2
+ import type React from "react";
3
+ import type { ScrollableViewTheme } from "./ScrollableView.theme";
4
+ /**
5
+ * Snapshot of {@link ScrollableView}'s scroll state, delivered to
6
+ * `onScrollChange` whenever the offset, viewport, or content size
7
+ * changes.
8
+ */
9
+ export interface ScrollableViewState {
10
+ /** Current top offset in terminal rows. */
11
+ readonly rowOffset: number;
12
+ /** Total content height in rows (sum of all measured row heights). */
13
+ readonly totalRows: number;
14
+ /** Measured viewport height in rows. */
15
+ readonly viewportRows: number;
16
+ /** True when `rowOffset` is at the largest valid value. */
17
+ readonly atBottom: boolean;
18
+ }
19
+ /**
20
+ * Props for {@link ScrollableView}.
21
+ *
22
+ * `ScrollableView` is the lower-level scrolling primitive: it lays out a
23
+ * variable-height list of items inside a measured viewport and clips with
24
+ * `overflow: hidden`. It has no concept of a selected row — only a scroll
25
+ * offset and a mouse-wheel handler. Use {@link ScrollableList} when you
26
+ * need keyboard-driven selection.
27
+ *
28
+ * Row heights are measured automatically via Ink's headless layout
29
+ * (`measureLayout`) keyed by `(getKey(item, index), viewportWidth)`. When
30
+ * an item's identity changes, the previous height is reused until the new
31
+ * object is re-measured. Only items inside the visible window plus a small
32
+ * overscan are mounted in the rendered tree.
33
+ */
34
+ export interface ScrollableViewProps<ItemType> {
35
+ /** The items to render. */
36
+ readonly items: readonly ItemType[];
37
+ /**
38
+ * Stable key for each item. Used as the React key for the row and as
39
+ * the primary cache key for measured heights — keep it stable when the
40
+ * item's logical identity stays the same and let it change when content
41
+ * fundamentally changes.
42
+ */
43
+ readonly getKey: (item: ItemType, index: number) => string;
44
+ /**
45
+ * Renders a single row. The same JSX is invoked twice per
46
+ * `(item, viewportWidth)` combination: once inside a detached yoga
47
+ * tree to measure the row's natural height, then once in the live
48
+ * tree for the visible window. Both invocations happen synchronously
49
+ * with the same input, so the result must be a pure function of the
50
+ * arguments. Avoid spawning side effects from `renderItem` itself.
51
+ */
52
+ readonly renderItem: (item: ItemType, index: number) => React.ReactNode;
53
+ /**
54
+ * When set, the view auto-scrolls so the row at this index is visible
55
+ * after every layout commit. Use this to implement "follow the selected
56
+ * row" behavior from a parent component.
57
+ */
58
+ readonly scrollToRow?: number;
59
+ /**
60
+ * When `true`, the view pins itself to the bottom on every layout
61
+ * commit — new items push the visible window forward. Disengages
62
+ * automatically the moment the user scrolls up with the wheel; re-
63
+ * engages once they scroll back to the bottom edge.
64
+ */
65
+ readonly stickToBottom?: boolean;
66
+ /** Notified whenever scroll state changes. */
67
+ readonly onScrollChange?: (state: ScrollableViewState) => void;
68
+ /** Text shown when `items` is empty. Defaults to "No items." */
69
+ readonly emptyText?: string;
70
+ }
71
+ /**
72
+ * Props for {@link ScrollableViewRender}.
73
+ *
74
+ * Pure render props — all hook-derived values are computed by the
75
+ * container and passed down.
76
+ */
77
+ export interface ScrollableViewRenderProps<ItemType> {
78
+ /** The items to render. */
79
+ readonly items: readonly ItemType[];
80
+ /** Stable key for each item. */
81
+ readonly getKey: (item: ItemType, index: number) => string;
82
+ /** Renders a single row. */
83
+ readonly renderItem: (item: ItemType, index: number) => React.ReactNode;
84
+ /** Total number of items. */
85
+ readonly totalCount: number;
86
+ /** Measured viewport height in rows. */
87
+ readonly viewportHeight: number;
88
+ /** Total content height in rows. */
89
+ readonly totalRows: number;
90
+ /** Current scroll offset in rows. */
91
+ readonly rowOffset: number;
92
+ /**
93
+ * Number of rows clipped off the top of the first rendered item.
94
+ * Equals `max(0, rowOffset - rowOffsets[renderStart])` — the portion
95
+ * of `items[renderStart]` that sits above the viewport when the scroll
96
+ * line lands inside that item's body. The renderer applies this as a
97
+ * negative `marginTop` on the inner content column so Ink's
98
+ * `overflow: hidden` clips the leading rows at the viewport top.
99
+ */
100
+ readonly topClipRows: number;
101
+ /** First item index to mount (inclusive). */
102
+ readonly renderStart: number;
103
+ /** One past the last item index to mount. */
104
+ readonly renderEnd: number;
105
+ /** Whether the scrollbar should be visible. */
106
+ readonly showScrollbar: boolean;
107
+ /** Text shown when items is empty. */
108
+ readonly emptyText: string;
109
+ /** Spread-ready theme style objects. */
110
+ readonly theme: ScrollableViewTheme;
111
+ /** Ref for the viewport box, attached by this render. */
112
+ readonly viewportRef: React.RefObject<DOMElement>;
113
+ }
@@ -0,0 +1,4 @@
1
+ export { ScrollableView, ScrollableViewRender } from "./ScrollableView";
2
+ export type { ScrollableViewTheme } from "./ScrollableView.theme";
3
+ export { useScrollableViewTheme } from "./ScrollableView.theme";
4
+ export type { ScrollableViewProps, ScrollableViewRenderProps, ScrollableViewState, } from "./ScrollableView.types";
@@ -0,0 +1,21 @@
1
+ import type React from "react";
2
+ import type { ScrollbarTheme } from "./Scrollbar.theme";
3
+ import type { ScrollbarProps, ScrollbarRenderProps } from "./Scrollbar.types";
4
+ /**
5
+ * A single-column vertical scrollbar.
6
+ *
7
+ * Purely presentational — the caller owns the scroll model and passes in
8
+ * `total` / `windowSize` / `offset`. When the content fits (`total <=
9
+ * windowSize`) the thumb fills the track, which is visually indistinguishable
10
+ * from a "no scrolling possible" state.
11
+ *
12
+ * @example
13
+ * ```tsx
14
+ * <Scrollbar total={lines.length} windowSize={visibleRows} offset={scrollTop} />
15
+ * ```
16
+ */
17
+ export declare function Scrollbar(props: ScrollbarProps): React.ReactElement;
18
+ /** Presentational form of `Scrollbar`; takes resolved geometry and theme. */
19
+ export declare function ScrollbarRender(props: ScrollbarRenderProps & {
20
+ readonly theme: ScrollbarTheme;
21
+ }): React.ReactElement;
@@ -0,0 +1,16 @@
1
+ /** Spread-ready style tokens for the `Scrollbar` component. */
2
+ export interface ScrollbarTheme {
3
+ /** Thumb foreground color. */
4
+ readonly thumbColor: string;
5
+ /** Track foreground color. */
6
+ readonly trackColor: string;
7
+ /** Single-character glyph used for the thumb. */
8
+ readonly thumbChar: string;
9
+ /** Single-character glyph used for the track. */
10
+ readonly trackChar: string;
11
+ }
12
+ /**
13
+ * Returns themed style tokens for `Scrollbar`. Consumes global tokens via
14
+ * `useTheme()`.
15
+ */
16
+ export declare function useScrollbarTheme(): ScrollbarTheme;
@@ -0,0 +1,27 @@
1
+ /** Props for the `Scrollbar` presentational component. */
2
+ export interface ScrollbarProps {
3
+ /** Total number of scrollable units (e.g. lines or list items). */
4
+ readonly total: number;
5
+ /** Number of units currently visible. */
6
+ readonly windowSize: number;
7
+ /** Zero-based offset of the first visible unit into `total`. */
8
+ readonly offset: number;
9
+ /**
10
+ * Height of the rendered scrollbar, in terminal rows. Defaults to
11
+ * `windowSize` (one scrollbar row per visible unit).
12
+ */
13
+ readonly height?: number;
14
+ }
15
+ /** Props for the `ScrollbarRender` render-only form. */
16
+ export interface ScrollbarRenderProps {
17
+ /** Scrollbar column height, in rows. */
18
+ readonly height: number;
19
+ /**
20
+ * Inclusive top index of the thumb within `[0, height)`. When the
21
+ * scrollbar is inactive (content fits), this is `0` and
22
+ * `thumbHeight === height` (i.e. the thumb fills the whole track).
23
+ */
24
+ readonly thumbTop: number;
25
+ /** Thumb height in rows. Always `>= 1` when `height >= 1`. */
26
+ readonly thumbHeight: number;
27
+ }
@@ -0,0 +1,21 @@
1
+ import type { ScrollbarRenderProps } from "./Scrollbar.types";
2
+ /**
3
+ * Compute the thumb position and size for a vertical scrollbar.
4
+ *
5
+ * - When `total <= windowSize` (content fits), the thumb fills the full
6
+ * track — callers can use this to render a "neutral" scrollbar or hide it
7
+ * entirely at their discretion.
8
+ * - Thumb height scales proportionally with the visible fraction but is
9
+ * always at least 1 row.
10
+ * - Thumb top is distributed linearly across the non-thumb slack.
11
+ *
12
+ * Invariants:
13
+ * - `0 <= thumbTop <= height - thumbHeight`
14
+ * - `1 <= thumbHeight <= height`
15
+ */
16
+ export declare function computeScrollbarGeometry(params: {
17
+ readonly total: number;
18
+ readonly windowSize: number;
19
+ readonly offset: number;
20
+ readonly height: number;
21
+ }): ScrollbarRenderProps;
@@ -0,0 +1,4 @@
1
+ export { Scrollbar, ScrollbarRender } from "./Scrollbar";
2
+ export type { ScrollbarTheme } from "./Scrollbar.theme";
3
+ export { useScrollbarTheme } from "./Scrollbar.theme";
4
+ export type { ScrollbarProps, ScrollbarRenderProps } from "./Scrollbar.types";
@@ -0,0 +1,22 @@
1
+ import type React from "react";
2
+ import type { SearchInputTheme } from "./SearchInput.theme";
3
+ import type { SearchInputProps, SearchInputRenderProps } from "./SearchInput.types";
4
+ /**
5
+ * Single-line controlled search input with a rounded border, prompt caret,
6
+ * and placeholder.
7
+ *
8
+ * Typing appends characters; Backspace/Delete removes the last character.
9
+ * Navigation keys (arrows, Enter, Escape) are intentionally not handled so
10
+ * the parent can own list navigation and dismissal.
11
+ *
12
+ * @example
13
+ * ```tsx
14
+ * const [query, setQuery] = useState("");
15
+ * <SearchInput value={query} onChange={setQuery} placeholder="Search..." />
16
+ * ```
17
+ */
18
+ export declare function SearchInput({ id, value, onChange, placeholder, prompt, }: SearchInputProps): React.ReactElement;
19
+ /** Presentational form of `SearchInput`; takes resolved props + theme. */
20
+ export declare function SearchInputRender(props: SearchInputRenderProps & {
21
+ readonly theme: SearchInputTheme;
22
+ }): React.ReactElement;
@@ -0,0 +1,30 @@
1
+ import type { BoxProps } from "ink";
2
+ /** Spread-ready style objects for the SearchInput component. */
3
+ export interface SearchInputTheme {
4
+ /** Rounded-border wrapper around the single-line input. */
5
+ readonly inputBorder: {
6
+ readonly borderStyle: BoxProps["borderStyle"];
7
+ readonly borderColor: string;
8
+ readonly paddingX: number;
9
+ readonly width: string;
10
+ };
11
+ /** Text style for the prompt caret. */
12
+ readonly prompt: {
13
+ readonly color: string;
14
+ readonly bold: boolean;
15
+ };
16
+ /** Text style for the user-entered query. */
17
+ readonly query: {
18
+ readonly color: string;
19
+ };
20
+ /** Text style for the placeholder shown when the query is empty. */
21
+ readonly placeholder: {
22
+ readonly color: string;
23
+ readonly dimColor: boolean;
24
+ };
25
+ }
26
+ /**
27
+ * Returns themed style objects for the SearchInput component.
28
+ * Consumes global tokens via `useTheme()`.
29
+ */
30
+ export declare function useSearchInputTheme(): SearchInputTheme;
@@ -0,0 +1,25 @@
1
+ /** Props for the `SearchInput` container component. */
2
+ export interface SearchInputProps {
3
+ /** Current query string (controlled). */
4
+ readonly value: string;
5
+ /** Called with the new query whenever it changes. */
6
+ readonly onChange: (next: string) => void;
7
+ /** Placeholder shown when `value` is empty. */
8
+ readonly placeholder?: string;
9
+ /** Prompt character rendered at the start of the input. Defaults to `› `. */
10
+ readonly prompt?: string;
11
+ /**
12
+ * Stable focus ID for programmatic focusing via `useFocusManager().focus(id)`.
13
+ * When omitted the component still participates in tab-order cycling.
14
+ */
15
+ readonly id?: string;
16
+ }
17
+ /** Props for the `SearchInputRender` presentational component. */
18
+ export interface SearchInputRenderProps {
19
+ /** Current query value. */
20
+ readonly value: string;
21
+ /** Placeholder text for when the query is empty. */
22
+ readonly placeholder: string;
23
+ /** Prompt character(s) shown before the query. */
24
+ readonly prompt: string;
25
+ }
@@ -0,0 +1,22 @@
1
+ /** TODO: Why does it cost so much slop just to search for a string??? tf */
2
+ /**
3
+ * Split a query into whitespace-separated tokens (lowercased, trimmed).
4
+ * Returns an empty array when the query is empty or whitespace-only.
5
+ */
6
+ export declare function tokenizeQuery(query: string): readonly string[];
7
+ /**
8
+ * Token-match predicate: returns `true` when every token in `query` appears
9
+ * (case-insensitively) somewhere in `haystack`.
10
+ *
11
+ * Cheap, non-ranked, "every token must be found" semantics — appropriate
12
+ * for small in-memory lists where a linear scan is fast enough to feel
13
+ * instant and ranked matching adds no practical value.
14
+ */
15
+ export declare function matchesQuery(haystack: string, query: string): boolean;
16
+ /**
17
+ * Filter a list of items by a query, where each item projects to a searchable
18
+ * haystack string via `getHaystack`. The filter is stable — it preserves the
19
+ * original order of the matching items.
20
+ */
21
+ export declare function filterByQuery<ItemType>(items: readonly ItemType[], query: string, getHaystack: (item: ItemType) => string): readonly ItemType[];
22
+ export { isMouseEscape } from "../../utils/mouseEscape";
@@ -0,0 +1,5 @@
1
+ export { SearchInput, SearchInputRender } from "./SearchInput";
2
+ export type { SearchInputTheme } from "./SearchInput.theme";
3
+ export { useSearchInputTheme } from "./SearchInput.theme";
4
+ export type { SearchInputProps, SearchInputRenderProps, } from "./SearchInput.types";
5
+ export { filterByQuery, isMouseEscape, } from "./SearchInput.utils";
@@ -0,0 +1,39 @@
1
+ import type React from "react";
2
+ import type { SeparatorTheme } from "./Separator.theme";
3
+ export interface SeparatorProps {
4
+ /**
5
+ * Width of the separator line.
6
+ *
7
+ * - `"full"` (default): spans the available width of the parent flex
8
+ * container. Implemented via Yoga's flex layout + text truncation —
9
+ * no measurement, no resize listeners, no first-frame flash.
10
+ * - `number`: a fixed number of characters, useful for callouts or
11
+ * visual rhythm where a uniform width across terminals is desired.
12
+ */
13
+ readonly width?: "full" | number;
14
+ }
15
+ /**
16
+ * Horizontal separator line.
17
+ *
18
+ * Defaults to filling the available width of its parent flex container.
19
+ * Pass a numeric `width` for a fixed-length separator.
20
+ *
21
+ * @example
22
+ * ```tsx
23
+ * // Fills parent's available width:
24
+ * <Separator />
25
+ * // Fixed 40-character separator:
26
+ * <Separator width={40} />
27
+ * ```
28
+ */
29
+ export declare function Separator({ width, }: SeparatorProps): React.ReactElement;
30
+ export interface SeparatorRenderProps {
31
+ /** Resolved separator theme. */
32
+ readonly theme: SeparatorTheme;
33
+ /**
34
+ * Width mode: `"full"` grows to fill the parent via flex+truncate,
35
+ * a `number` renders a fixed-length line.
36
+ */
37
+ readonly width?: "full" | number;
38
+ }
39
+ export declare function SeparatorRender({ theme, width, }: SeparatorRenderProps): React.ReactElement;
@@ -0,0 +1,22 @@
1
+ import { type ThemeOf } from "../../Theme";
2
+ /** Memoized themed style objects for the `Separator` component. */
3
+ export declare const useSeparatorTheme: () => {
4
+ /** Outer container holding the separator line. */
5
+ container: {
6
+ flexDirection: "row";
7
+ flexGrow: number;
8
+ flexShrink: number;
9
+ alignSelf: "stretch";
10
+ paddingX: number;
11
+ };
12
+ /** Text props for the separator character itself. */
13
+ text: {
14
+ dimColor: boolean;
15
+ };
16
+ /** Single character repeated to draw the line. */
17
+ char: string;
18
+ /** Default fixed-length width when no explicit width is provided and full mode is off. */
19
+ defaultFixedWidth: number;
20
+ };
21
+ /** Resolved style object shape returned by {@link useSeparatorTheme}. */
22
+ export type SeparatorTheme = ThemeOf<typeof useSeparatorTheme>;
@@ -0,0 +1,4 @@
1
+ export type { SeparatorProps, SeparatorRenderProps } from "./Separator";
2
+ export { Separator, SeparatorRender } from "./Separator";
3
+ export type { SeparatorTheme } from "./Separator.theme";
4
+ export { useSeparatorTheme } from "./Separator.theme";
@@ -0,0 +1,4 @@
1
+ import type { StatusBarProps, StatusBarRenderProps } from "./StatusBar.types";
2
+ /** Compact status bar displayed at the bottom of the chat. */
3
+ export declare function StatusBar({ status, error, strategyName, }: StatusBarProps): React.ReactElement;
4
+ export declare function StatusBarRender({ status, error, strategyName, theme, debugRef, }: StatusBarRenderProps): React.ReactElement;
@@ -0,0 +1,35 @@
1
+ import type { ChatStatus } from "../../hooks/useChat/useChat.types";
2
+ /** Display info for a single status value. */
3
+ export interface StatusInfo {
4
+ readonly label: string;
5
+ readonly color: string;
6
+ readonly spinning: boolean;
7
+ }
8
+ /** Spread-ready style objects for the StatusBar component. */
9
+ export interface StatusBarTheme {
10
+ /** Outer container. */
11
+ readonly container: {
12
+ readonly paddingX: number;
13
+ readonly flexDirection: "row";
14
+ readonly gap: number;
15
+ };
16
+ /** Status label text (bold). */
17
+ readonly statusLabel: {
18
+ readonly bold: boolean;
19
+ };
20
+ /** Strategy name text (dim). */
21
+ readonly strategyName: {
22
+ readonly dimColor: boolean;
23
+ };
24
+ /** Error text. */
25
+ readonly errorText: {
26
+ readonly color: string;
27
+ };
28
+ /** Mapping of chat statuses to display info (label, color, spinner). */
29
+ readonly statusMap: Record<ChatStatus, StatusInfo>;
30
+ }
31
+ /**
32
+ * Returns themed style objects for the StatusBar component.
33
+ * Consumes global tokens via `useTheme()`.
34
+ */
35
+ export declare function useStatusBarTheme(): StatusBarTheme;
@@ -0,0 +1,24 @@
1
+ import type { RefObject } from "react";
2
+ import type { ChatStatus } from "../../hooks/useChat/useChat.types";
3
+ import type { StatusBarTheme } from "./StatusBar.theme";
4
+ /**
5
+ * Props for {@link StatusBar}.
6
+ */
7
+ export interface StatusBarProps {
8
+ readonly status: ChatStatus;
9
+ readonly error: string | null;
10
+ readonly strategyName?: string;
11
+ }
12
+ /**
13
+ * Props for {@link StatusBarRender}.
14
+ *
15
+ * Pure render props — all hook-derived values are computed by the
16
+ * container and passed down.
17
+ */
18
+ export interface StatusBarRenderProps {
19
+ readonly status: ChatStatus;
20
+ readonly error: string | null;
21
+ readonly strategyName?: string;
22
+ readonly theme: StatusBarTheme;
23
+ readonly debugRef: RefObject<unknown>;
24
+ }
@@ -0,0 +1,2 @@
1
+ export { StatusBar, StatusBarRender } from "./StatusBar";
2
+ export type { StatusBarProps, StatusBarRenderProps } from "./StatusBar.types";
@@ -0,0 +1,68 @@
1
+ import { type DOMElement } from "ink";
2
+ import type React from "react";
3
+ import { type CursorCell } from "./TextAreaInput.utils";
4
+ export interface TextAreaInputProps {
5
+ /** Current text value (controlled). */
6
+ readonly value: string;
7
+ /** Called when the text value changes. */
8
+ readonly onChange: (value: string) => void;
9
+ /** Width — columns (number) or CSS-like string (e.g. "100%"). */
10
+ readonly width?: number | string;
11
+ /** Fixed visible row count. When set, disables auto-expanding. */
12
+ readonly height?: number;
13
+ /** Minimum visible rows when auto-expanding (default: 3). */
14
+ readonly minHeight?: number;
15
+ /** Maximum visible rows when auto-expanding (default: 5). */
16
+ readonly maxHeight?: number;
17
+ /** Placeholder shown when value is empty. */
18
+ readonly placeholder?: string;
19
+ /**
20
+ * Stable focus ID for programmatic focusing via `useFocusManager().focus(id)`.
21
+ * When omitted the component still participates in tab-order cycling.
22
+ */
23
+ readonly id?: string;
24
+ /** Called on Enter with the current value. Ctrl/Shift/Meta+Enter inserts a newline. */
25
+ readonly onSubmit?: (value: string) => void;
26
+ }
27
+ /**
28
+ * Multi-line text area input with an inline rendered cursor (a gray
29
+ * background on the character at `cursorIndex`). Controlled — parent owns
30
+ * `value`/`onChange`.
31
+ *
32
+ * The cursor's source of truth is `cursorIndex` (an offset into the
33
+ * normalized raw value). The wrapped display cell + scroll offset are
34
+ * derived from it each render via {@link computeNextCursorState}.
35
+ *
36
+ * Keybindings:
37
+ * - Enter → calls `onSubmit(value.trim())` if provided
38
+ * - Ctrl/Shift/Meta+Enter → inserts a newline at the cursor
39
+ * - Arrow keys → move cursor (preserves column on up/down)
40
+ * - Backspace/Delete → delete the character before the cursor
41
+ */
42
+ export declare function TextAreaInput({ value, onChange, width, height, minHeight, maxHeight, placeholder, id, onSubmit, }: TextAreaInputProps): import("react/jsx-runtime").JSX.Element;
43
+ export interface TextAreaInputRenderProps {
44
+ /** Ref forwarded to the outer Box for layout metrics + mouse wheel. */
45
+ readonly boxRef: React.RefObject<DOMElement>;
46
+ /** Width passed through to the outer Box. */
47
+ readonly width: number | string;
48
+ /** Visible row count. */
49
+ readonly height: number;
50
+ /** Pre-wrapped display rows. */
51
+ readonly rows: readonly string[];
52
+ /** Index of the first visible row. */
53
+ readonly rowDisplayOffset: number;
54
+ /** Cell of the cursor on the wrapped grid (absolute, not viewport-relative). */
55
+ readonly cursorCell: CursorCell;
56
+ /** Whether to render the cursor highlight. */
57
+ readonly showCursor: boolean;
58
+ /** Content width in columns (excludes scrollbar column when shown). */
59
+ readonly textAreaColumns: number;
60
+ /** Whether to render the scrollbar column. */
61
+ readonly showScrollbar: boolean;
62
+ /** Whether to render placeholder text in place of `rows`. */
63
+ readonly showPlaceholder: boolean;
64
+ /** Placeholder string. */
65
+ readonly placeholder: string;
66
+ }
67
+ /** Pure presentational form of {@link TextAreaInput}. */
68
+ export declare function TextAreaInputRender({ boxRef, width, height, rows, rowDisplayOffset, cursorCell, showCursor, textAreaColumns, showScrollbar, showPlaceholder, placeholder, }: TextAreaInputRenderProps): React.ReactElement;
@@ -0,0 +1,14 @@
1
+ export declare const useTextAreaInputTheme: () => {
2
+ textAreaInput: {
3
+ backgroundColor: string;
4
+ flexDirection: "row";
5
+ };
6
+ textAreaInputContent: {
7
+ flexDirection: "column";
8
+ flexGrow: number;
9
+ };
10
+ textAreaPlaceholder: {
11
+ color: string;
12
+ wrap: "truncate";
13
+ };
14
+ };
@@ -0,0 +1,69 @@
1
+ /**
2
+ * Cursor + scroll math for {@link TextAreaInput}.
3
+ *
4
+ * The single source of truth for the cursor is `cursorIndex` — an offset
5
+ * into the *normalized* (CRLF → LF) raw `value`. The wrapped display grid
6
+ * is a derived view; we map between the two with {@link buildIndexCellMap}.
7
+ *
8
+ * Movement intents (`left`, `right`, `up`, `down`) operate on the wrapped
9
+ * grid for natural visual navigation, then translate back to a raw index.
10
+ * `snapToCursor` keeps the index put and just (re)derives the cell + scroll
11
+ * offset — used after an edit changes `value` and/or `cursorIndex`.
12
+ */
13
+ export type CursorIntent = {
14
+ readonly kind: "left";
15
+ } | {
16
+ readonly kind: "right";
17
+ } | {
18
+ readonly kind: "up";
19
+ } | {
20
+ readonly kind: "down";
21
+ } | {
22
+ readonly kind: "snapToCursor";
23
+ };
24
+ export interface CursorCell {
25
+ readonly x: number;
26
+ readonly y: number;
27
+ }
28
+ export interface CursorState {
29
+ readonly cursorIndex: number;
30
+ readonly cell: CursorCell;
31
+ readonly rowDisplayOffset: number;
32
+ }
33
+ export interface ComputeNextCursorStateParams {
34
+ readonly intent: CursorIntent;
35
+ /** Normalized raw text (LF only). */
36
+ readonly value: string;
37
+ /** Wrapped display rows derived from `value`. */
38
+ readonly rows: readonly string[];
39
+ /** Cursor offset into `value` before this update. */
40
+ readonly currentCursorIndex: number;
41
+ /** Scroll offset before this update. */
42
+ readonly currentRowDisplayOffset: number;
43
+ /** Visible row count of the textarea. */
44
+ readonly viewportHeight: number;
45
+ /**
46
+ * Width measurement function. Inject `stringWidth` at the call site;
47
+ * tests can pass `(text) => text.length` for ASCII fixtures.
48
+ */
49
+ readonly measureWidth: (text: string) => number;
50
+ }
51
+ /**
52
+ * Pure transition function for the textarea cursor index, derived cell, and
53
+ * scroll offset. Fully clamped to `value` / `rows` / viewport so callers can
54
+ * apply all three pieces of state on the same render tick.
55
+ */
56
+ export declare function computeNextCursorState(params: ComputeNextCursorStateParams): CursorState;
57
+ /**
58
+ * Map every raw-string index (0..value.length inclusive) to a cell on the
59
+ * wrapped grid.
60
+ *
61
+ * Strategy: walk `value` and the concatenation of `rows` in lockstep. When
62
+ * the next raw char matches the next wrapped char, advance both. When the
63
+ * wrapped grid moves to a new row that doesn't correspond to a `\n` in
64
+ * `value` (a soft wrap), absorb the row break without consuming a raw char.
65
+ * When `word-wrap` drops a space at a soft-wrap boundary, consume the raw
66
+ * space without advancing the cell. The trailing entry maps `value.length`
67
+ * to the cell *after* the last character.
68
+ */
69
+ export declare function buildIndexCellMap(value: string, rows: readonly string[], measureWidth: (text: string) => number): readonly CursorCell[];
@@ -0,0 +1,2 @@
1
+ export type { TextAreaInputProps, TextAreaInputRenderProps, } from "./TextAreaInput";
2
+ export { TextAreaInput, TextAreaInputRender } from "./TextAreaInput";
@@ -0,0 +1,13 @@
1
+ export interface TitleIconProps {
2
+ /** Whether the animation is playing. Defaults to `true`. */
3
+ readonly playing?: boolean;
4
+ }
5
+ /**
6
+ * Animated ASCII art title icon.
7
+ *
8
+ * The animation runs inside a `<DynamicContent>` boundary so frame ticks
9
+ * (16fps) repaint only a reserved region of the screen rather than the
10
+ * whole app. This eliminates the flicker that the title would otherwise
11
+ * induce in surrounding components on every tick.
12
+ */
13
+ export declare function TitleIcon({ playing }: TitleIconProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,19 @@
1
+ /** Spread-ready style objects for the TitleIcon component. */
2
+ export interface TitleIconTheme {
3
+ /** Outer container wrapping the ASCII art. */
4
+ readonly container: {
5
+ readonly flexDirection: "column";
6
+ readonly alignItems: "center";
7
+ readonly paddingY: number;
8
+ };
9
+ /** Each line of the ASCII frame. */
10
+ readonly frameLine: {
11
+ readonly color: string;
12
+ readonly dimColor: boolean;
13
+ };
14
+ }
15
+ /**
16
+ * Returns themed style objects for the TitleIcon component.
17
+ * Consumes global tokens via `useTheme()`.
18
+ */
19
+ export declare function useTitleIconTheme(): TitleIconTheme;