@deepseek-harness-tui/dsh-tui 0.5.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 (638) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +235 -0
  3. package/bin/dsh-tui.js +95 -0
  4. package/cordis.patch.yml +218 -0
  5. package/cordis.yml +185 -0
  6. package/lib/invariant.js +28 -0
  7. package/lib/types/activityPrefs.d.ts +29 -0
  8. package/lib/types/activityPrefs.d.ts.map +1 -0
  9. package/lib/types/activityPrefs.js +60 -0
  10. package/lib/types/bootstrap/state.d.ts +13 -0
  11. package/lib/types/bootstrap/state.d.ts.map +1 -0
  12. package/lib/types/bootstrap/state.js +12 -0
  13. package/lib/types/cc/cliHighlight.d.ts +20 -0
  14. package/lib/types/cc/cliHighlight.d.ts.map +1 -0
  15. package/lib/types/cc/cliHighlight.js +53 -0
  16. package/lib/types/cc/figures.d.ts +59 -0
  17. package/lib/types/cc/figures.d.ts.map +1 -0
  18. package/lib/types/cc/figures.js +69 -0
  19. package/lib/types/cc/format.d.ts +26 -0
  20. package/lib/types/cc/format.d.ts.map +1 -0
  21. package/lib/types/cc/format.js +55 -0
  22. package/lib/types/cc/hash.d.ts +25 -0
  23. package/lib/types/cc/hash.d.ts.map +1 -0
  24. package/lib/types/cc/hash.js +41 -0
  25. package/lib/types/cc/hyperlink.d.ts +21 -0
  26. package/lib/types/cc/hyperlink.d.ts.map +1 -0
  27. package/lib/types/cc/hyperlink.js +31 -0
  28. package/lib/types/cc/markdown.d.ts +43 -0
  29. package/lib/types/cc/markdown.d.ts.map +1 -0
  30. package/lib/types/cc/markdown.js +345 -0
  31. package/lib/types/cc/spinnerVerbs.d.ts +3 -0
  32. package/lib/types/cc/spinnerVerbs.d.ts.map +1 -0
  33. package/lib/types/cc/spinnerVerbs.js +190 -0
  34. package/lib/types/cc/terminal.d.ts +15 -0
  35. package/lib/types/cc/terminal.d.ts.map +1 -0
  36. package/lib/types/cc/terminal.js +84 -0
  37. package/lib/types/channel.d.ts +672 -0
  38. package/lib/types/channel.d.ts.map +1 -0
  39. package/lib/types/channel.js +2427 -0
  40. package/lib/types/childStderr.d.ts +63 -0
  41. package/lib/types/childStderr.d.ts.map +1 -0
  42. package/lib/types/childStderr.js +161 -0
  43. package/lib/types/commands.d.ts +55 -0
  44. package/lib/types/commands.d.ts.map +1 -0
  45. package/lib/types/commands.js +101 -0
  46. package/lib/types/components/ActivityLine.d.ts +29 -0
  47. package/lib/types/components/ActivityLine.d.ts.map +1 -0
  48. package/lib/types/components/ActivityLine.js +47 -0
  49. package/lib/types/components/ActivityPicker.d.ts +13 -0
  50. package/lib/types/components/ActivityPicker.d.ts.map +1 -0
  51. package/lib/types/components/ActivityPicker.js +24 -0
  52. package/lib/types/components/CommandSuggestions.d.ts +14 -0
  53. package/lib/types/components/CommandSuggestions.d.ts.map +1 -0
  54. package/lib/types/components/CommandSuggestions.js +33 -0
  55. package/lib/types/components/FileSuggestions.d.ts +12 -0
  56. package/lib/types/components/FileSuggestions.d.ts.map +1 -0
  57. package/lib/types/components/FileSuggestions.js +26 -0
  58. package/lib/types/components/GoalTodoPanel.d.ts +13 -0
  59. package/lib/types/components/GoalTodoPanel.d.ts.map +1 -0
  60. package/lib/types/components/GoalTodoPanel.js +57 -0
  61. package/lib/types/components/HelpMenu.d.ts +12 -0
  62. package/lib/types/components/HelpMenu.d.ts.map +1 -0
  63. package/lib/types/components/HelpMenu.js +12 -0
  64. package/lib/types/components/HistorySearchDialog.d.ts +16 -0
  65. package/lib/types/components/HistorySearchDialog.d.ts.map +1 -0
  66. package/lib/types/components/HistorySearchDialog.js +31 -0
  67. package/lib/types/components/InterruptedByUser.d.ts +7 -0
  68. package/lib/types/components/InterruptedByUser.d.ts.map +1 -0
  69. package/lib/types/components/InterruptedByUser.js +9 -0
  70. package/lib/types/components/LoadedContextPanel.d.ts +20 -0
  71. package/lib/types/components/LoadedContextPanel.d.ts.map +1 -0
  72. package/lib/types/components/LoadedContextPanel.js +30 -0
  73. package/lib/types/components/LogoV2.d.ts +23 -0
  74. package/lib/types/components/LogoV2.d.ts.map +1 -0
  75. package/lib/types/components/LogoV2.js +95 -0
  76. package/lib/types/components/Markdown.d.ts +24 -0
  77. package/lib/types/components/Markdown.d.ts.map +1 -0
  78. package/lib/types/components/Markdown.js +106 -0
  79. package/lib/types/components/MarkdownTable.d.ts +17 -0
  80. package/lib/types/components/MarkdownTable.d.ts.map +1 -0
  81. package/lib/types/components/MarkdownTable.js +272 -0
  82. package/lib/types/components/MessageList.d.ts +41 -0
  83. package/lib/types/components/MessageList.d.ts.map +1 -0
  84. package/lib/types/components/MessageList.js +303 -0
  85. package/lib/types/components/ModelPicker.d.ts +14 -0
  86. package/lib/types/components/ModelPicker.d.ts.map +1 -0
  87. package/lib/types/components/ModelPicker.js +15 -0
  88. package/lib/types/components/PresetPicker.d.ts +17 -0
  89. package/lib/types/components/PresetPicker.d.ts.map +1 -0
  90. package/lib/types/components/PresetPicker.js +25 -0
  91. package/lib/types/components/PromptInput.d.ts +67 -0
  92. package/lib/types/components/PromptInput.d.ts.map +1 -0
  93. package/lib/types/components/PromptInput.js +778 -0
  94. package/lib/types/components/ResumePicker.d.ts +15 -0
  95. package/lib/types/components/ResumePicker.d.ts.map +1 -0
  96. package/lib/types/components/ResumePicker.js +34 -0
  97. package/lib/types/components/RewindPicker.d.ts +14 -0
  98. package/lib/types/components/RewindPicker.d.ts.map +1 -0
  99. package/lib/types/components/RewindPicker.js +23 -0
  100. package/lib/types/components/SearchBox.d.ts +20 -0
  101. package/lib/types/components/SearchBox.d.ts.map +1 -0
  102. package/lib/types/components/SearchBox.js +33 -0
  103. package/lib/types/components/Select.d.ts +22 -0
  104. package/lib/types/components/Select.d.ts.map +1 -0
  105. package/lib/types/components/Select.js +19 -0
  106. package/lib/types/components/Spinner/GlimmerMessage.d.ts +19 -0
  107. package/lib/types/components/Spinner/GlimmerMessage.d.ts.map +1 -0
  108. package/lib/types/components/Spinner/GlimmerMessage.js +78 -0
  109. package/lib/types/components/Spinner/SpinnerAnimationRow.d.ts +31 -0
  110. package/lib/types/components/Spinner/SpinnerAnimationRow.d.ts.map +1 -0
  111. package/lib/types/components/Spinner/SpinnerAnimationRow.js +162 -0
  112. package/lib/types/components/Spinner/SpinnerGlyph.d.ts +16 -0
  113. package/lib/types/components/Spinner/SpinnerGlyph.d.ts.map +1 -0
  114. package/lib/types/components/Spinner/SpinnerGlyph.js +36 -0
  115. package/lib/types/components/Spinner/spinnerMode.d.ts +6 -0
  116. package/lib/types/components/Spinner/spinnerMode.d.ts.map +1 -0
  117. package/lib/types/components/Spinner/spinnerMode.js +1 -0
  118. package/lib/types/components/Spinner/spinnerUtils.d.ts +41 -0
  119. package/lib/types/components/Spinner/spinnerUtils.d.ts.map +1 -0
  120. package/lib/types/components/Spinner/spinnerUtils.js +104 -0
  121. package/lib/types/components/Spinner/useStalledAnimation.d.ts +16 -0
  122. package/lib/types/components/Spinner/useStalledAnimation.d.ts.map +1 -0
  123. package/lib/types/components/Spinner/useStalledAnimation.js +71 -0
  124. package/lib/types/components/StreamingMarkdown.d.ts +12 -0
  125. package/lib/types/components/StreamingMarkdown.d.ts.map +1 -0
  126. package/lib/types/components/StreamingMarkdown.js +39 -0
  127. package/lib/types/components/ThemePicker.d.ts +22 -0
  128. package/lib/types/components/ThemePicker.d.ts.map +1 -0
  129. package/lib/types/components/ThemePicker.js +51 -0
  130. package/lib/types/components/ThinkingToggle.d.ts +17 -0
  131. package/lib/types/components/ThinkingToggle.d.ts.map +1 -0
  132. package/lib/types/components/ThinkingToggle.js +30 -0
  133. package/lib/types/components/ToolUseLoader.d.ts +13 -0
  134. package/lib/types/components/ToolUseLoader.d.ts.map +1 -0
  135. package/lib/types/components/ToolUseLoader.js +17 -0
  136. package/lib/types/components/Whale.d.ts +22 -0
  137. package/lib/types/components/Whale.d.ts.map +1 -0
  138. package/lib/types/components/Whale.js +78 -0
  139. package/lib/types/components/WorkingSpinner.d.ts +26 -0
  140. package/lib/types/components/WorkingSpinner.d.ts.map +1 -0
  141. package/lib/types/components/WorkingSpinner.js +68 -0
  142. package/lib/types/components/activityFrames.d.ts +31 -0
  143. package/lib/types/components/activityFrames.d.ts.map +1 -0
  144. package/lib/types/components/activityFrames.js +83 -0
  145. package/lib/types/components/bigfont.d.ts +28 -0
  146. package/lib/types/components/bigfont.d.ts.map +1 -0
  147. package/lib/types/components/bigfont.js +91 -0
  148. package/lib/types/components/design-system/Byline.d.ts +14 -0
  149. package/lib/types/components/design-system/Byline.d.ts.map +1 -0
  150. package/lib/types/components/design-system/Byline.js +17 -0
  151. package/lib/types/components/design-system/Divider.d.ts +40 -0
  152. package/lib/types/components/design-system/Divider.d.ts.map +1 -0
  153. package/lib/types/components/design-system/Divider.js +24 -0
  154. package/lib/types/components/design-system/KeyboardShortcutHint.d.ts +19 -0
  155. package/lib/types/components/design-system/KeyboardShortcutHint.d.ts.map +1 -0
  156. package/lib/types/components/design-system/KeyboardShortcutHint.js +14 -0
  157. package/lib/types/components/design-system/ListItem.d.ts +36 -0
  158. package/lib/types/components/design-system/ListItem.d.ts.map +1 -0
  159. package/lib/types/components/design-system/ListItem.js +48 -0
  160. package/lib/types/components/design-system/LoadingState.d.ts +19 -0
  161. package/lib/types/components/design-system/LoadingState.d.ts.map +1 -0
  162. package/lib/types/components/design-system/LoadingState.js +22 -0
  163. package/lib/types/components/design-system/Pane.d.ts +17 -0
  164. package/lib/types/components/design-system/Pane.d.ts.map +1 -0
  165. package/lib/types/components/design-system/Pane.js +15 -0
  166. package/lib/types/components/design-system/ProgressBar.d.ts +22 -0
  167. package/lib/types/components/design-system/ProgressBar.d.ts.map +1 -0
  168. package/lib/types/components/design-system/ProgressBar.js +27 -0
  169. package/lib/types/components/design-system/StatusIcon.d.ts +15 -0
  170. package/lib/types/components/design-system/StatusIcon.d.ts.map +1 -0
  171. package/lib/types/components/design-system/StatusIcon.js +20 -0
  172. package/lib/types/components/design-system/ThemeProvider.d.ts +11 -0
  173. package/lib/types/components/design-system/ThemeProvider.d.ts.map +1 -0
  174. package/lib/types/components/design-system/ThemeProvider.js +135 -0
  175. package/lib/types/components/design-system/ThemedBox.d.ts +37 -0
  176. package/lib/types/components/design-system/ThemedBox.d.ts.map +1 -0
  177. package/lib/types/components/design-system/ThemedBox.js +26 -0
  178. package/lib/types/components/design-system/ThemedText.d.ts +56 -0
  179. package/lib/types/components/design-system/ThemedText.d.ts.map +1 -0
  180. package/lib/types/components/design-system/ThemedText.js +45 -0
  181. package/lib/types/components/messages/AssistantTextMessage.d.ts +18 -0
  182. package/lib/types/components/messages/AssistantTextMessage.d.ts.map +1 -0
  183. package/lib/types/components/messages/AssistantTextMessage.js +15 -0
  184. package/lib/types/components/messages/AssistantThinkingMessage.d.ts +23 -0
  185. package/lib/types/components/messages/AssistantThinkingMessage.d.ts.map +1 -0
  186. package/lib/types/components/messages/AssistantThinkingMessage.js +23 -0
  187. package/lib/types/components/messages/AssistantToolUseMessage.d.ts +23 -0
  188. package/lib/types/components/messages/AssistantToolUseMessage.d.ts.map +1 -0
  189. package/lib/types/components/messages/AssistantToolUseMessage.js +220 -0
  190. package/lib/types/components/messages/MessageMetadata.d.ts +15 -0
  191. package/lib/types/components/messages/MessageMetadata.d.ts.map +1 -0
  192. package/lib/types/components/messages/MessageMetadata.js +20 -0
  193. package/lib/types/components/messages/UserPromptMessage.d.ts +19 -0
  194. package/lib/types/components/messages/UserPromptMessage.d.ts.map +1 -0
  195. package/lib/types/components/messages/UserPromptMessage.js +15 -0
  196. package/lib/types/components/questions/AskUserQuestionPanel.d.ts +39 -0
  197. package/lib/types/components/questions/AskUserQuestionPanel.d.ts.map +1 -0
  198. package/lib/types/components/questions/AskUserQuestionPanel.js +228 -0
  199. package/lib/types/components/shimmer.d.ts +35 -0
  200. package/lib/types/components/shimmer.d.ts.map +1 -0
  201. package/lib/types/components/shimmer.js +43 -0
  202. package/lib/types/components/whaleFrames.d.ts +25 -0
  203. package/lib/types/components/whaleFrames.d.ts.map +1 -0
  204. package/lib/types/components/whaleFrames.js +419 -0
  205. package/lib/types/customTheme.d.ts +104 -0
  206. package/lib/types/customTheme.d.ts.map +1 -0
  207. package/lib/types/customTheme.js +268 -0
  208. package/lib/types/effortPrefs.d.ts +22 -0
  209. package/lib/types/effortPrefs.d.ts.map +1 -0
  210. package/lib/types/effortPrefs.js +45 -0
  211. package/lib/types/history.d.ts +24 -0
  212. package/lib/types/history.d.ts.map +1 -0
  213. package/lib/types/history.js +75 -0
  214. package/lib/types/hooks/useBlink.d.ts +11 -0
  215. package/lib/types/hooks/useBlink.d.ts.map +1 -0
  216. package/lib/types/hooks/useBlink.js +20 -0
  217. package/lib/types/i18n.d.ts +926 -0
  218. package/lib/types/i18n.d.ts.map +1 -0
  219. package/lib/types/i18n.js +356 -0
  220. package/lib/types/index.d.ts +70 -0
  221. package/lib/types/index.d.ts.map +1 -0
  222. package/lib/types/index.js +31 -0
  223. package/lib/types/ink/Ansi.d.ts +11 -0
  224. package/lib/types/ink/Ansi.d.ts.map +1 -0
  225. package/lib/types/ink/Ansi.js +269 -0
  226. package/lib/types/ink/bidi.d.ts +18 -0
  227. package/lib/types/ink/bidi.d.ts.map +1 -0
  228. package/lib/types/ink/bidi.js +119 -0
  229. package/lib/types/ink/clearTerminal.d.ts +22 -0
  230. package/lib/types/ink/clearTerminal.d.ts.map +1 -0
  231. package/lib/types/ink/clearTerminal.js +72 -0
  232. package/lib/types/ink/colorize.d.ts +33 -0
  233. package/lib/types/ink/colorize.d.ts.map +1 -0
  234. package/lib/types/ink/colorize.js +213 -0
  235. package/lib/types/ink/components/AlternateScreen.d.ts +22 -0
  236. package/lib/types/ink/components/AlternateScreen.d.ts.map +1 -0
  237. package/lib/types/ink/components/AlternateScreen.js +74 -0
  238. package/lib/types/ink/components/App.d.ts +73 -0
  239. package/lib/types/ink/components/App.d.ts.map +1 -0
  240. package/lib/types/ink/components/App.js +597 -0
  241. package/lib/types/ink/components/AppContext.d.ts +15 -0
  242. package/lib/types/ink/components/AppContext.d.ts.map +1 -0
  243. package/lib/types/ink/components/AppContext.js +11 -0
  244. package/lib/types/ink/components/Box.d.ts +49 -0
  245. package/lib/types/ink/components/Box.d.ts.map +1 -0
  246. package/lib/types/ink/components/Box.js +153 -0
  247. package/lib/types/ink/components/Button.d.ts +37 -0
  248. package/lib/types/ink/components/Button.d.ts.map +1 -0
  249. package/lib/types/ink/components/Button.js +166 -0
  250. package/lib/types/ink/components/ClockContext.d.ts +10 -0
  251. package/lib/types/ink/components/ClockContext.d.ts.map +1 -0
  252. package/lib/types/ink/components/ClockContext.js +108 -0
  253. package/lib/types/ink/components/CursorDeclarationContext.d.ts +30 -0
  254. package/lib/types/ink/components/CursorDeclarationContext.d.ts.map +1 -0
  255. package/lib/types/ink/components/CursorDeclarationContext.js +6 -0
  256. package/lib/types/ink/components/ErrorOverview.d.ts +7 -0
  257. package/lib/types/ink/components/ErrorOverview.d.ts.map +1 -0
  258. package/lib/types/ink/components/ErrorOverview.js +49 -0
  259. package/lib/types/ink/components/Link.d.ts +8 -0
  260. package/lib/types/ink/components/Link.d.ts.map +1 -0
  261. package/lib/types/ink/components/Link.js +33 -0
  262. package/lib/types/ink/components/Newline.d.ts +13 -0
  263. package/lib/types/ink/components/Newline.d.ts.map +1 -0
  264. package/lib/types/ink/components/Newline.js +29 -0
  265. package/lib/types/ink/components/NoSelect.d.ts +20 -0
  266. package/lib/types/ink/components/NoSelect.d.ts.map +1 -0
  267. package/lib/types/ink/components/NoSelect.js +56 -0
  268. package/lib/types/ink/components/RawAnsi.d.ts +17 -0
  269. package/lib/types/ink/components/RawAnsi.d.ts.map +1 -0
  270. package/lib/types/ink/components/RawAnsi.js +45 -0
  271. package/lib/types/ink/components/ScrollBox.d.ts +78 -0
  272. package/lib/types/ink/components/ScrollBox.d.ts.map +1 -0
  273. package/lib/types/ink/components/ScrollBox.js +174 -0
  274. package/lib/types/ink/components/Spacer.d.ts +6 -0
  275. package/lib/types/ink/components/Spacer.d.ts.map +1 -0
  276. package/lib/types/ink/components/Spacer.js +19 -0
  277. package/lib/types/ink/components/StdinContext.d.ts +32 -0
  278. package/lib/types/ink/components/StdinContext.d.ts.map +1 -0
  279. package/lib/types/ink/components/StdinContext.js +16 -0
  280. package/lib/types/ink/components/TerminalFocusContext.d.ts +11 -0
  281. package/lib/types/ink/components/TerminalFocusContext.d.ts.map +1 -0
  282. package/lib/types/ink/components/TerminalFocusContext.js +45 -0
  283. package/lib/types/ink/components/TerminalSizeContext.d.ts +6 -0
  284. package/lib/types/ink/components/TerminalSizeContext.d.ts.map +1 -0
  285. package/lib/types/ink/components/TerminalSizeContext.js +3 -0
  286. package/lib/types/ink/components/Text.d.ts +56 -0
  287. package/lib/types/ink/components/Text.d.ts.map +1 -0
  288. package/lib/types/ink/components/Text.js +194 -0
  289. package/lib/types/ink/constants.d.ts +3 -0
  290. package/lib/types/ink/constants.d.ts.map +1 -0
  291. package/lib/types/ink/constants.js +2 -0
  292. package/lib/types/ink/cursor.d.ts +11 -0
  293. package/lib/types/ink/cursor.d.ts.map +1 -0
  294. package/lib/types/ink/cursor.js +1 -0
  295. package/lib/types/ink/devtools.d.ts +7 -0
  296. package/lib/types/ink/devtools.d.ts.map +1 -0
  297. package/lib/types/ink/devtools.js +1 -0
  298. package/lib/types/ink/dom.d.ts +178 -0
  299. package/lib/types/ink/dom.d.ts.map +1 -0
  300. package/lib/types/ink/dom.js +424 -0
  301. package/lib/types/ink/events/click-event.d.ts +32 -0
  302. package/lib/types/ink/events/click-event.d.ts.map +1 -0
  303. package/lib/types/ink/events/click-event.js +36 -0
  304. package/lib/types/ink/events/dispatcher.d.ts +63 -0
  305. package/lib/types/ink/events/dispatcher.d.ts.map +1 -0
  306. package/lib/types/ink/events/dispatcher.js +194 -0
  307. package/lib/types/ink/events/emitter.d.ts +20 -0
  308. package/lib/types/ink/events/emitter.d.ts.map +1 -0
  309. package/lib/types/ink/events/emitter.js +43 -0
  310. package/lib/types/ink/events/event-handlers.d.ts +47 -0
  311. package/lib/types/ink/events/event-handlers.d.ts.map +1 -0
  312. package/lib/types/ink/events/event-handlers.js +30 -0
  313. package/lib/types/ink/events/event.d.ts +19 -0
  314. package/lib/types/ink/events/event.d.ts.map +1 -0
  315. package/lib/types/ink/events/event.js +22 -0
  316. package/lib/types/ink/events/focus-event.d.ts +19 -0
  317. package/lib/types/ink/events/focus-event.d.ts.map +1 -0
  318. package/lib/types/ink/events/focus-event.js +21 -0
  319. package/lib/types/ink/events/input-event.d.ts +53 -0
  320. package/lib/types/ink/events/input-event.d.ts.map +1 -0
  321. package/lib/types/ink/events/input-event.js +180 -0
  322. package/lib/types/ink/events/keyboard-event.d.ts +40 -0
  323. package/lib/types/ink/events/keyboard-event.d.ts.map +1 -0
  324. package/lib/types/ink/events/keyboard-event.js +65 -0
  325. package/lib/types/ink/events/paste-event.d.ts +11 -0
  326. package/lib/types/ink/events/paste-event.d.ts.map +1 -0
  327. package/lib/types/ink/events/paste-event.js +13 -0
  328. package/lib/types/ink/events/resize-event.d.ts +13 -0
  329. package/lib/types/ink/events/resize-event.d.ts.map +1 -0
  330. package/lib/types/ink/events/resize-event.js +16 -0
  331. package/lib/types/ink/events/terminal-event.d.ts +112 -0
  332. package/lib/types/ink/events/terminal-event.d.ts.map +1 -0
  333. package/lib/types/ink/events/terminal-event.js +131 -0
  334. package/lib/types/ink/events/terminal-focus-event.d.ts +21 -0
  335. package/lib/types/ink/events/terminal-focus-event.d.ts.map +1 -0
  336. package/lib/types/ink/events/terminal-focus-event.js +18 -0
  337. package/lib/types/ink/focus.d.ts +74 -0
  338. package/lib/types/ink/focus.d.ts.map +1 -0
  339. package/lib/types/ink/focus.js +188 -0
  340. package/lib/types/ink/frame.d.ts +119 -0
  341. package/lib/types/ink/frame.d.ts.map +1 -0
  342. package/lib/types/ink/frame.js +43 -0
  343. package/lib/types/ink/get-max-width.d.ts +20 -0
  344. package/lib/types/ink/get-max-width.d.ts.map +1 -0
  345. package/lib/types/ink/get-max-width.js +25 -0
  346. package/lib/types/ink/hit-test.d.ts +47 -0
  347. package/lib/types/ink/hit-test.d.ts.map +1 -0
  348. package/lib/types/ink/hit-test.js +126 -0
  349. package/lib/types/ink/hooks/use-animation-frame.d.ts +27 -0
  350. package/lib/types/ink/hooks/use-animation-frame.d.ts.map +1 -0
  351. package/lib/types/ink/hooks/use-animation-frame.js +48 -0
  352. package/lib/types/ink/hooks/use-app.d.ts +8 -0
  353. package/lib/types/ink/hooks/use-app.d.ts.map +1 -0
  354. package/lib/types/ink/hooks/use-app.js +8 -0
  355. package/lib/types/ink/hooks/use-copy-on-select.d.ts +22 -0
  356. package/lib/types/ink/hooks/use-copy-on-select.d.ts.map +1 -0
  357. package/lib/types/ink/hooks/use-copy-on-select.js +40 -0
  358. package/lib/types/ink/hooks/use-declared-cursor.d.ts +31 -0
  359. package/lib/types/ink/hooks/use-declared-cursor.d.ts.map +1 -0
  360. package/lib/types/ink/hooks/use-declared-cursor.js +65 -0
  361. package/lib/types/ink/hooks/use-input.d.ts +41 -0
  362. package/lib/types/ink/hooks/use-input.d.ts.map +1 -0
  363. package/lib/types/ink/hooks/use-input.js +73 -0
  364. package/lib/types/ink/hooks/use-interval.d.ts +23 -0
  365. package/lib/types/ink/hooks/use-interval.d.ts.map +1 -0
  366. package/lib/types/ink/hooks/use-interval.js +58 -0
  367. package/lib/types/ink/hooks/use-search-highlight.d.ts +34 -0
  368. package/lib/types/ink/hooks/use-search-highlight.d.ts.map +1 -0
  369. package/lib/types/ink/hooks/use-search-highlight.js +35 -0
  370. package/lib/types/ink/hooks/use-selection.d.ts +44 -0
  371. package/lib/types/ink/hooks/use-selection.d.ts.map +1 -0
  372. package/lib/types/ink/hooks/use-selection.js +64 -0
  373. package/lib/types/ink/hooks/use-stdin.d.ts +8 -0
  374. package/lib/types/ink/hooks/use-stdin.d.ts.map +1 -0
  375. package/lib/types/ink/hooks/use-stdin.js +8 -0
  376. package/lib/types/ink/hooks/use-tab-status.d.ts +18 -0
  377. package/lib/types/ink/hooks/use-tab-status.d.ts.map +1 -0
  378. package/lib/types/ink/hooks/use-tab-status.js +58 -0
  379. package/lib/types/ink/hooks/use-terminal-focus.d.ts +11 -0
  380. package/lib/types/ink/hooks/use-terminal-focus.d.ts.map +1 -0
  381. package/lib/types/ink/hooks/use-terminal-focus.js +15 -0
  382. package/lib/types/ink/hooks/use-terminal-size.d.ts +6 -0
  383. package/lib/types/ink/hooks/use-terminal-size.d.ts.map +1 -0
  384. package/lib/types/ink/hooks/use-terminal-size.js +12 -0
  385. package/lib/types/ink/hooks/use-terminal-title.d.ts +14 -0
  386. package/lib/types/ink/hooks/use-terminal-title.d.ts.map +1 -0
  387. package/lib/types/ink/hooks/use-terminal-title.js +30 -0
  388. package/lib/types/ink/hooks/use-terminal-viewport.d.ts +32 -0
  389. package/lib/types/ink/hooks/use-terminal-viewport.d.ts.map +1 -0
  390. package/lib/types/ink/hooks/use-terminal-viewport.js +79 -0
  391. package/lib/types/ink/ink.d.ts +370 -0
  392. package/lib/types/ink/ink.d.ts.map +1 -0
  393. package/lib/types/ink/ink.js +1665 -0
  394. package/lib/types/ink/instances.d.ts +10 -0
  395. package/lib/types/ink/instances.d.ts.map +1 -0
  396. package/lib/types/ink/instances.js +13 -0
  397. package/lib/types/ink/layout/engine.d.ts +7 -0
  398. package/lib/types/ink/layout/engine.d.ts.map +1 -0
  399. package/lib/types/ink/layout/engine.js +8 -0
  400. package/lib/types/ink/layout/geometry.d.ts +86 -0
  401. package/lib/types/ink/layout/geometry.d.ts.map +1 -0
  402. package/lib/types/ink/layout/geometry.js +95 -0
  403. package/lib/types/ink/layout/node.d.ts +151 -0
  404. package/lib/types/ink/layout/node.d.ts.map +1 -0
  405. package/lib/types/ink/layout/node.js +72 -0
  406. package/lib/types/ink/layout/yoga.d.ts +69 -0
  407. package/lib/types/ink/layout/yoga.d.ts.map +1 -0
  408. package/lib/types/ink/layout/yoga.js +249 -0
  409. package/lib/types/ink/line-width-cache.d.ts +9 -0
  410. package/lib/types/ink/line-width-cache.d.ts.map +1 -0
  411. package/lib/types/ink/line-width-cache.js +45 -0
  412. package/lib/types/ink/log-update.d.ts +57 -0
  413. package/lib/types/ink/log-update.d.ts.map +1 -0
  414. package/lib/types/ink/log-update.js +710 -0
  415. package/lib/types/ink/measure-element.d.ts +19 -0
  416. package/lib/types/ink/measure-element.d.ts.map +1 -0
  417. package/lib/types/ink/measure-element.js +10 -0
  418. package/lib/types/ink/measure-text.d.ts +13 -0
  419. package/lib/types/ink/measure-text.d.ts.map +1 -0
  420. package/lib/types/ink/measure-text.js +38 -0
  421. package/lib/types/ink/node-cache.d.ts +33 -0
  422. package/lib/types/ink/node-cache.d.ts.map +1 -0
  423. package/lib/types/ink/node-cache.js +42 -0
  424. package/lib/types/ink/optimizer.d.ts +18 -0
  425. package/lib/types/ink/optimizer.d.ts.map +1 -0
  426. package/lib/types/ink/optimizer.js +83 -0
  427. package/lib/types/ink/output.d.ts +200 -0
  428. package/lib/types/ink/output.d.ts.map +1 -0
  429. package/lib/types/ink/output.js +663 -0
  430. package/lib/types/ink/parse-keypress.d.ts +132 -0
  431. package/lib/types/ink/parse-keypress.d.ts.map +1 -0
  432. package/lib/types/ink/parse-keypress.js +707 -0
  433. package/lib/types/ink/reconciler.d.ts +43 -0
  434. package/lib/types/ink/reconciler.d.ts.map +1 -0
  435. package/lib/types/ink/reconciler.js +413 -0
  436. package/lib/types/ink/render-border.d.ts +36 -0
  437. package/lib/types/ink/render-border.d.ts.map +1 -0
  438. package/lib/types/ink/render-border.js +143 -0
  439. package/lib/types/ink/render-node-to-output.d.ts +93 -0
  440. package/lib/types/ink/render-node-to-output.d.ts.map +1 -0
  441. package/lib/types/ink/render-node-to-output.js +1290 -0
  442. package/lib/types/ink/render-to-screen.d.ts +65 -0
  443. package/lib/types/ink/render-to-screen.d.ts.map +1 -0
  444. package/lib/types/ink/render-to-screen.js +189 -0
  445. package/lib/types/ink/renderer.d.ts +24 -0
  446. package/lib/types/ink/renderer.d.ts.map +1 -0
  447. package/lib/types/ink/renderer.js +136 -0
  448. package/lib/types/ink/root.d.ts +91 -0
  449. package/lib/types/ink/root.d.ts.map +1 -0
  450. package/lib/types/ink/root.js +93 -0
  451. package/lib/types/ink/screen.d.ts +443 -0
  452. package/lib/types/ink/screen.d.ts.map +1 -0
  453. package/lib/types/ink/screen.js +1295 -0
  454. package/lib/types/ink/searchHighlight.d.ts +25 -0
  455. package/lib/types/ink/searchHighlight.d.ts.map +1 -0
  456. package/lib/types/ink/searchHighlight.js +82 -0
  457. package/lib/types/ink/selection.d.ts +323 -0
  458. package/lib/types/ink/selection.d.ts.map +1 -0
  459. package/lib/types/ink/selection.js +881 -0
  460. package/lib/types/ink/squash-text-nodes.d.ts +30 -0
  461. package/lib/types/ink/squash-text-nodes.d.ts.map +1 -0
  462. package/lib/types/ink/squash-text-nodes.js +63 -0
  463. package/lib/types/ink/stringWidth.d.ts +11 -0
  464. package/lib/types/ink/stringWidth.d.ts.map +1 -0
  465. package/lib/types/ink/stringWidth.js +209 -0
  466. package/lib/types/ink/styles.d.ts +324 -0
  467. package/lib/types/ink/styles.d.ts.map +1 -0
  468. package/lib/types/ink/styles.js +307 -0
  469. package/lib/types/ink/supports-hyperlinks.d.ts +20 -0
  470. package/lib/types/ink/supports-hyperlinks.d.ts.map +1 -0
  471. package/lib/types/ink/supports-hyperlinks.js +44 -0
  472. package/lib/types/ink/tabstops.d.ts +9 -0
  473. package/lib/types/ink/tabstops.d.ts.map +1 -0
  474. package/lib/types/ink/tabstops.js +46 -0
  475. package/lib/types/ink/terminal-focus-state.d.ts +35 -0
  476. package/lib/types/ink/terminal-focus-state.d.ts.map +1 -0
  477. package/lib/types/ink/terminal-focus-state.js +57 -0
  478. package/lib/types/ink/terminal-querier.d.ts +161 -0
  479. package/lib/types/ink/terminal-querier.d.ts.map +1 -0
  480. package/lib/types/ink/terminal-querier.js +204 -0
  481. package/lib/types/ink/terminal.d.ts +80 -0
  482. package/lib/types/ink/terminal.d.ts.map +1 -0
  483. package/lib/types/ink/terminal.js +268 -0
  484. package/lib/types/ink/termio/ansi.d.ts +75 -0
  485. package/lib/types/ink/termio/ansi.d.ts.map +1 -0
  486. package/lib/types/ink/termio/ansi.js +79 -0
  487. package/lib/types/ink/termio/csi.d.ts +253 -0
  488. package/lib/types/ink/termio/csi.d.ts.map +1 -0
  489. package/lib/types/ink/termio/csi.js +347 -0
  490. package/lib/types/ink/termio/dec.d.ts +61 -0
  491. package/lib/types/ink/termio/dec.d.ts.map +1 -0
  492. package/lib/types/ink/termio/dec.js +76 -0
  493. package/lib/types/ink/termio/esc.d.ts +15 -0
  494. package/lib/types/ink/termio/esc.d.ts.map +1 -0
  495. package/lib/types/ink/termio/esc.js +57 -0
  496. package/lib/types/ink/termio/osc.d.ts +208 -0
  497. package/lib/types/ink/termio/osc.d.ts.map +1 -0
  498. package/lib/types/ink/termio/osc.js +466 -0
  499. package/lib/types/ink/termio/parser.d.ts +46 -0
  500. package/lib/types/ink/termio/parser.d.ts.map +1 -0
  501. package/lib/types/ink/termio/parser.js +366 -0
  502. package/lib/types/ink/termio/sgr.d.ts +17 -0
  503. package/lib/types/ink/termio/sgr.d.ts.map +1 -0
  504. package/lib/types/ink/termio/sgr.js +300 -0
  505. package/lib/types/ink/termio/tokenize.d.ts +50 -0
  506. package/lib/types/ink/termio/tokenize.d.ts.map +1 -0
  507. package/lib/types/ink/termio/tokenize.js +266 -0
  508. package/lib/types/ink/termio/types.d.ts +211 -0
  509. package/lib/types/ink/termio/types.d.ts.map +1 -0
  510. package/lib/types/ink/termio/types.js +68 -0
  511. package/lib/types/ink/termio.d.ts +25 -0
  512. package/lib/types/ink/termio.d.ts.map +1 -0
  513. package/lib/types/ink/termio.js +24 -0
  514. package/lib/types/ink/truncateToWidth.d.ts +7 -0
  515. package/lib/types/ink/truncateToWidth.d.ts.map +1 -0
  516. package/lib/types/ink/truncateToWidth.js +18 -0
  517. package/lib/types/ink/useTerminalNotification.d.ts +45 -0
  518. package/lib/types/ink/useTerminalNotification.d.ts.map +1 -0
  519. package/lib/types/ink/useTerminalNotification.js +70 -0
  520. package/lib/types/ink/warn.d.ts +7 -0
  521. package/lib/types/ink/warn.d.ts.map +1 -0
  522. package/lib/types/ink/warn.js +15 -0
  523. package/lib/types/ink/widest-line.d.ts +7 -0
  524. package/lib/types/ink/widest-line.d.ts.map +1 -0
  525. package/lib/types/ink/widest-line.js +19 -0
  526. package/lib/types/ink/wrap-text.d.ts +10 -0
  527. package/lib/types/ink/wrap-text.d.ts.map +1 -0
  528. package/lib/types/ink/wrap-text.js +61 -0
  529. package/lib/types/ink/wrapAnsi.d.ts +18 -0
  530. package/lib/types/ink/wrapAnsi.d.ts.map +1 -0
  531. package/lib/types/ink/wrapAnsi.js +16 -0
  532. package/lib/types/invariant.d.ts +20 -0
  533. package/lib/types/invariant.d.ts.map +1 -0
  534. package/lib/types/invariant.js +26 -0
  535. package/lib/types/modelPrefs.d.ts +37 -0
  536. package/lib/types/modelPrefs.d.ts.map +1 -0
  537. package/lib/types/modelPrefs.js +66 -0
  538. package/lib/types/modelRoute.d.ts +79 -0
  539. package/lib/types/modelRoute.d.ts.map +1 -0
  540. package/lib/types/modelRoute.js +96 -0
  541. package/lib/types/native-ts/yoga-layout/enums.d.ts +183 -0
  542. package/lib/types/native-ts/yoga-layout/enums.d.ts.map +1 -0
  543. package/lib/types/native-ts/yoga-layout/enums.js +150 -0
  544. package/lib/types/native-ts/yoga-layout/index.d.ts +788 -0
  545. package/lib/types/native-ts/yoga-layout/index.d.ts.map +1 -0
  546. package/lib/types/native-ts/yoga-layout/index.js +2571 -0
  547. package/lib/types/packaged-skills.d.ts +10 -0
  548. package/lib/types/packaged-skills.d.ts.map +1 -0
  549. package/lib/types/packaged-skills.js +63 -0
  550. package/lib/types/plugin.d.ts +33 -0
  551. package/lib/types/plugin.d.ts.map +1 -0
  552. package/lib/types/plugin.js +454 -0
  553. package/lib/types/presetPrefs.d.ts +29 -0
  554. package/lib/types/presetPrefs.d.ts.map +1 -0
  555. package/lib/types/presetPrefs.js +61 -0
  556. package/lib/types/presets.d.ts +110 -0
  557. package/lib/types/presets.d.ts.map +1 -0
  558. package/lib/types/presets.js +114 -0
  559. package/lib/types/questions.d.ts +97 -0
  560. package/lib/types/questions.d.ts.map +1 -0
  561. package/lib/types/questions.js +201 -0
  562. package/lib/types/screens/Chat.d.ts +23 -0
  563. package/lib/types/screens/Chat.d.ts.map +1 -0
  564. package/lib/types/screens/Chat.js +1263 -0
  565. package/lib/types/screens/StatusLine.d.ts +16 -0
  566. package/lib/types/screens/StatusLine.d.ts.map +1 -0
  567. package/lib/types/screens/StatusLine.js +105 -0
  568. package/lib/types/screens/StatusMetrics.d.ts +87 -0
  569. package/lib/types/screens/StatusMetrics.d.ts.map +1 -0
  570. package/lib/types/screens/StatusMetrics.js +252 -0
  571. package/lib/types/sessionHistory.d.ts +32 -0
  572. package/lib/types/sessionHistory.d.ts.map +1 -0
  573. package/lib/types/sessionHistory.js +87 -0
  574. package/lib/types/theme.d.ts +115 -0
  575. package/lib/types/theme.d.ts.map +1 -0
  576. package/lib/types/theme.js +300 -0
  577. package/lib/types/themePrefs.d.ts +28 -0
  578. package/lib/types/themePrefs.d.ts.map +1 -0
  579. package/lib/types/themePrefs.js +59 -0
  580. package/lib/types/ui.d.ts +28 -0
  581. package/lib/types/ui.d.ts.map +1 -0
  582. package/lib/types/ui.js +25 -0
  583. package/lib/types/update.d.ts +76 -0
  584. package/lib/types/update.d.ts.map +1 -0
  585. package/lib/types/update.js +203 -0
  586. package/lib/types/utils/clipboard.d.ts +43 -0
  587. package/lib/types/utils/clipboard.d.ts.map +1 -0
  588. package/lib/types/utils/clipboard.js +82 -0
  589. package/lib/types/utils/debug.d.ts +8 -0
  590. package/lib/types/utils/debug.d.ts.map +1 -0
  591. package/lib/types/utils/debug.js +12 -0
  592. package/lib/types/utils/earlyInput.d.ts +7 -0
  593. package/lib/types/utils/earlyInput.d.ts.map +1 -0
  594. package/lib/types/utils/earlyInput.js +6 -0
  595. package/lib/types/utils/env.d.ts +10 -0
  596. package/lib/types/utils/env.d.ts.map +1 -0
  597. package/lib/types/utils/env.js +9 -0
  598. package/lib/types/utils/envUtils.d.ts +8 -0
  599. package/lib/types/utils/envUtils.d.ts.map +1 -0
  600. package/lib/types/utils/envUtils.js +13 -0
  601. package/lib/types/utils/execFileNoThrow.d.ts +34 -0
  602. package/lib/types/utils/execFileNoThrow.d.ts.map +1 -0
  603. package/lib/types/utils/execFileNoThrow.js +31 -0
  604. package/lib/types/utils/fullscreen.d.ts +8 -0
  605. package/lib/types/utils/fullscreen.d.ts.map +1 -0
  606. package/lib/types/utils/fullscreen.js +10 -0
  607. package/lib/types/utils/intl.d.ts +7 -0
  608. package/lib/types/utils/intl.d.ts.map +1 -0
  609. package/lib/types/utils/intl.js +9 -0
  610. package/lib/types/utils/loaded-context.d.ts +20 -0
  611. package/lib/types/utils/loaded-context.d.ts.map +1 -0
  612. package/lib/types/utils/loaded-context.js +36 -0
  613. package/lib/types/utils/log.d.ts +7 -0
  614. package/lib/types/utils/log.d.ts.map +1 -0
  615. package/lib/types/utils/log.js +9 -0
  616. package/lib/types/utils/mentions.d.ts +30 -0
  617. package/lib/types/utils/mentions.d.ts.map +1 -0
  618. package/lib/types/utils/mentions.js +72 -0
  619. package/lib/types/utils/narration.d.ts +11 -0
  620. package/lib/types/utils/narration.d.ts.map +1 -0
  621. package/lib/types/utils/narration.js +16 -0
  622. package/lib/types/utils/semver.d.ts +9 -0
  623. package/lib/types/utils/semver.d.ts.map +1 -0
  624. package/lib/types/utils/semver.js +24 -0
  625. package/lib/types/utils/sliceAnsi.d.ts +12 -0
  626. package/lib/types/utils/sliceAnsi.d.ts.map +1 -0
  627. package/lib/types/utils/sliceAnsi.js +79 -0
  628. package/lib/types/working-activity.d.ts +19 -0
  629. package/lib/types/working-activity.d.ts.map +1 -0
  630. package/lib/types/working-activity.js +18 -0
  631. package/package.json +141 -0
  632. package/skills/audit/SKILL.md +24 -0
  633. package/skills/bug/SKILL.md +27 -0
  634. package/skills/pr-comments/SKILL.md +20 -0
  635. package/skills/practice/SKILL.md +22 -0
  636. package/skills/release-notes/SKILL.md +25 -0
  637. package/skills/review/SKILL.md +25 -0
  638. package/skills/vuln-check/SKILL.md +25 -0
@@ -0,0 +1,30 @@
1
+ import type { DOMElement } from './dom.js';
2
+ import type { TextStyles } from './styles.js';
3
+ /**
4
+ * A segment of text with its associated styles.
5
+ * Used for structured rendering without ANSI string transforms.
6
+ */
7
+ export type StyledSegment = {
8
+ text: string;
9
+ styles: TextStyles;
10
+ hyperlink?: string;
11
+ };
12
+ /**
13
+ * Squash text nodes into styled segments, propagating styles down through the tree.
14
+ * This allows structured styling without relying on ANSI string transforms.
15
+ * @param node - the subtree root whose text nodes are collected.
16
+ * @param inheritedStyles - styles inherited from ancestors, merged with the node's own.
17
+ * @param inheritedHyperlink - the hyperlink inherited from ancestor ink-link elements.
18
+ * @param out - the array segments are appended to; defaults to a fresh array.
19
+ * @returns `out` containing one segment per non-empty text node.
20
+ */
21
+ export declare function squashTextNodesToSegments(node: DOMElement, inheritedStyles?: TextStyles, inheritedHyperlink?: string, out?: StyledSegment[]): StyledSegment[];
22
+ /**
23
+ * Squash text nodes into a plain string (without styles).
24
+ * Used for text measurement in layout calculations.
25
+ * @param node - the subtree root whose text nodes are concatenated.
26
+ * @returns the concatenated text content of every text node in the subtree.
27
+ */
28
+ declare function squashTextNodes(node: DOMElement): string;
29
+ export default squashTextNodes;
30
+ //# sourceMappingURL=squash-text-nodes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"squash-text-nodes.d.ts","sourceRoot":"","sources":["../../../src/ink/squash-text-nodes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAC1C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAE7C;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,UAAU,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAED;;;;;;;;GAQG;AACH,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,UAAU,EAChB,eAAe,GAAE,UAAe,EAChC,kBAAkB,CAAC,EAAE,MAAM,EAC3B,GAAG,GAAE,aAAa,EAAO,GACxB,aAAa,EAAE,CAwCjB;AAED;;;;;GAKG;AACH,iBAAS,eAAe,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,CAqBjD;AAED,eAAe,eAAe,CAAA"}
@@ -0,0 +1,63 @@
1
+ /**
2
+ * Squash text nodes into styled segments, propagating styles down through the tree.
3
+ * This allows structured styling without relying on ANSI string transforms.
4
+ * @param node - the subtree root whose text nodes are collected.
5
+ * @param inheritedStyles - styles inherited from ancestors, merged with the node's own.
6
+ * @param inheritedHyperlink - the hyperlink inherited from ancestor ink-link elements.
7
+ * @param out - the array segments are appended to; defaults to a fresh array.
8
+ * @returns `out` containing one segment per non-empty text node.
9
+ */
10
+ export function squashTextNodesToSegments(node, inheritedStyles = {}, inheritedHyperlink, out = []) {
11
+ const mergedStyles = node.textStyles
12
+ ? { ...inheritedStyles, ...node.textStyles }
13
+ : inheritedStyles;
14
+ for (const childNode of node.childNodes) {
15
+ if (childNode === undefined) {
16
+ continue;
17
+ }
18
+ if (childNode.nodeName === '#text') {
19
+ if (childNode.nodeValue.length > 0) {
20
+ out.push({
21
+ text: childNode.nodeValue,
22
+ styles: mergedStyles,
23
+ hyperlink: inheritedHyperlink,
24
+ });
25
+ }
26
+ }
27
+ else if (childNode.nodeName === 'ink-text' ||
28
+ childNode.nodeName === 'ink-virtual-text') {
29
+ squashTextNodesToSegments(childNode, mergedStyles, inheritedHyperlink, out);
30
+ }
31
+ else if (childNode.nodeName === 'ink-link') {
32
+ const href = childNode.attributes['href'];
33
+ squashTextNodesToSegments(childNode, mergedStyles, href || inheritedHyperlink, out);
34
+ }
35
+ }
36
+ return out;
37
+ }
38
+ /**
39
+ * Squash text nodes into a plain string (without styles).
40
+ * Used for text measurement in layout calculations.
41
+ * @param node - the subtree root whose text nodes are concatenated.
42
+ * @returns the concatenated text content of every text node in the subtree.
43
+ */
44
+ function squashTextNodes(node) {
45
+ let text = '';
46
+ for (const childNode of node.childNodes) {
47
+ if (childNode === undefined) {
48
+ continue;
49
+ }
50
+ if (childNode.nodeName === '#text') {
51
+ text += childNode.nodeValue;
52
+ }
53
+ else if (childNode.nodeName === 'ink-text' ||
54
+ childNode.nodeName === 'ink-virtual-text') {
55
+ text += squashTextNodes(childNode);
56
+ }
57
+ else if (childNode.nodeName === 'ink-link') {
58
+ text += squashTextNodes(childNode);
59
+ }
60
+ }
61
+ return text;
62
+ }
63
+ export default squashTextNodes;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Get the display width of a string as it would appear in a terminal.
3
+ *
4
+ * Uses Bun.stringWidth when available; otherwise falls back to the JS
5
+ * implementation above, which strips ANSI codes and handles emoji, wide
6
+ * characters, and zero-width combining marks.
7
+ * @param str - the string to measure.
8
+ * @returns the number of terminal cells the string occupies.
9
+ */
10
+ export declare const stringWidth: (str: string) => number;
11
+ //# sourceMappingURL=stringWidth.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stringWidth.d.ts","sourceRoot":"","sources":["../../../src/ink/stringWidth.ts"],"names":[],"mappings":"AA2NA;;;;;;;;GAQG;AACH,eAAO,MAAM,WAAW,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAElB,CAAA"}
@@ -0,0 +1,209 @@
1
+ import emojiRegex from 'emoji-regex';
2
+ import { eastAsianWidth } from 'get-east-asian-width';
3
+ import stripAnsi from 'strip-ansi';
4
+ import { getGraphemeSegmenter } from '../utils/intl.js';
5
+ const EMOJI_REGEX = emojiRegex();
6
+ /**
7
+ * Fallback JavaScript implementation of stringWidth when Bun.stringWidth is not available.
8
+ *
9
+ * Get the display width of a string as it would appear in a terminal.
10
+ *
11
+ * This is a more accurate alternative to the string-width package that correctly handles
12
+ * characters like ⚠ (U+26A0) which string-width incorrectly reports as width 2.
13
+ *
14
+ * The implementation uses eastAsianWidth directly with ambiguousAsWide: false,
15
+ * which correctly treats ambiguous-width characters as narrow (width 1) as
16
+ * recommended by the Unicode standard for Western contexts.
17
+ */
18
+ function stringWidthJavaScript(str) {
19
+ if (typeof str !== 'string' || str.length === 0) {
20
+ return 0;
21
+ }
22
+ // Fast path: pure ASCII string (no ANSI codes, no wide chars)
23
+ let isPureAscii = true;
24
+ for (let i = 0; i < str.length; i++) {
25
+ const code = str.charCodeAt(i);
26
+ // Check for non-ASCII or ANSI escape (0x1b)
27
+ if (code >= 127 || code === 0x1b) {
28
+ isPureAscii = false;
29
+ break;
30
+ }
31
+ }
32
+ if (isPureAscii) {
33
+ // Count printable characters (exclude control chars)
34
+ let width = 0;
35
+ for (let i = 0; i < str.length; i++) {
36
+ const code = str.charCodeAt(i);
37
+ if (code > 0x1f) {
38
+ width++;
39
+ }
40
+ }
41
+ return width;
42
+ }
43
+ // Strip ANSI if escape character is present
44
+ if (str.includes('\x1b')) {
45
+ str = stripAnsi(str);
46
+ if (str.length === 0) {
47
+ return 0;
48
+ }
49
+ }
50
+ // Fast path: simple Unicode (no emoji, variation selectors, or joiners)
51
+ if (!needsSegmentation(str)) {
52
+ let width = 0;
53
+ for (const char of str) {
54
+ const codePoint = char.codePointAt(0);
55
+ if (!isZeroWidth(codePoint)) {
56
+ width += eastAsianWidth(codePoint, { ambiguousAsWide: false });
57
+ }
58
+ }
59
+ return width;
60
+ }
61
+ let width = 0;
62
+ for (const { segment: grapheme } of getGraphemeSegmenter().segment(str)) {
63
+ // Check for emoji first (most emoji sequences are width 2)
64
+ EMOJI_REGEX.lastIndex = 0;
65
+ if (EMOJI_REGEX.test(grapheme)) {
66
+ width += getEmojiWidth(grapheme);
67
+ continue;
68
+ }
69
+ // Calculate width for non-emoji graphemes
70
+ // For grapheme clusters (like Devanagari conjuncts with virama+ZWJ), only count
71
+ // the first non-zero-width character's width since the cluster renders as one glyph
72
+ for (const char of grapheme) {
73
+ const codePoint = char.codePointAt(0);
74
+ if (!isZeroWidth(codePoint)) {
75
+ width += eastAsianWidth(codePoint, { ambiguousAsWide: false });
76
+ break;
77
+ }
78
+ }
79
+ }
80
+ return width;
81
+ }
82
+ function needsSegmentation(str) {
83
+ for (const char of str) {
84
+ const cp = char.codePointAt(0);
85
+ // Emoji ranges
86
+ if (cp >= 0x1f300 && cp <= 0x1faff)
87
+ return true;
88
+ if (cp >= 0x2600 && cp <= 0x27bf)
89
+ return true;
90
+ if (cp >= 0x1f1e6 && cp <= 0x1f1ff)
91
+ return true;
92
+ // Variation selectors, ZWJ
93
+ if (cp >= 0xfe00 && cp <= 0xfe0f)
94
+ return true;
95
+ if (cp === 0x200d)
96
+ return true;
97
+ }
98
+ return false;
99
+ }
100
+ function getEmojiWidth(grapheme) {
101
+ // Regional indicators: single = 1, pair = 2
102
+ const first = grapheme.codePointAt(0);
103
+ if (first >= 0x1f1e6 && first <= 0x1f1ff) {
104
+ let count = 0;
105
+ for (const _ of grapheme)
106
+ count++;
107
+ return count === 1 ? 1 : 2;
108
+ }
109
+ // Incomplete keycap: digit/symbol + VS16 without U+20E3
110
+ if (grapheme.length === 2) {
111
+ const second = grapheme.codePointAt(1);
112
+ if (second === 0xfe0f &&
113
+ ((first >= 0x30 && first <= 0x39) || first === 0x23 || first === 0x2a)) {
114
+ return 1;
115
+ }
116
+ }
117
+ return 2;
118
+ }
119
+ function isZeroWidth(codePoint) {
120
+ // Fast path for common printable range
121
+ if (codePoint >= 0x20 && codePoint < 0x7f)
122
+ return false;
123
+ if (codePoint >= 0xa0 && codePoint < 0x0300)
124
+ return codePoint === 0x00ad;
125
+ // Control characters
126
+ if (codePoint <= 0x1f || (codePoint >= 0x7f && codePoint <= 0x9f))
127
+ return true;
128
+ // Zero-width and invisible characters
129
+ if ((codePoint >= 0x200b && codePoint <= 0x200d) || // ZW space/joiner
130
+ codePoint === 0xfeff || // BOM
131
+ (codePoint >= 0x2060 && codePoint <= 0x2064) // Word joiner etc.
132
+ ) {
133
+ return true;
134
+ }
135
+ // Variation selectors
136
+ if ((codePoint >= 0xfe00 && codePoint <= 0xfe0f) ||
137
+ (codePoint >= 0xe0100 && codePoint <= 0xe01ef)) {
138
+ return true;
139
+ }
140
+ // Combining diacritical marks
141
+ if ((codePoint >= 0x0300 && codePoint <= 0x036f) ||
142
+ (codePoint >= 0x1ab0 && codePoint <= 0x1aff) ||
143
+ (codePoint >= 0x1dc0 && codePoint <= 0x1dff) ||
144
+ (codePoint >= 0x20d0 && codePoint <= 0x20ff) ||
145
+ (codePoint >= 0xfe20 && codePoint <= 0xfe2f)) {
146
+ return true;
147
+ }
148
+ // Indic script combining marks (covers Devanagari through Malayalam)
149
+ if (codePoint >= 0x0900 && codePoint <= 0x0d4f) {
150
+ // Signs and vowel marks at start of each script block
151
+ const offset = codePoint & 0x7f;
152
+ if (offset <= 0x03)
153
+ return true; // Signs at block start
154
+ if (offset >= 0x3a && offset <= 0x4f)
155
+ return true; // Vowel signs, virama
156
+ if (offset >= 0x51 && offset <= 0x57)
157
+ return true; // Stress signs
158
+ if (offset >= 0x62 && offset <= 0x63)
159
+ return true; // Vowel signs
160
+ }
161
+ // Thai/Lao combining marks
162
+ // Note: U+0E32 (SARA AA), U+0E33 (SARA AM), U+0EB2, U+0EB3 are spacing vowels (width 1), not combining marks
163
+ if (codePoint === 0x0e31 || // Thai MAI HAN-AKAT
164
+ (codePoint >= 0x0e34 && codePoint <= 0x0e3a) || // Thai vowel signs (skip U+0E32, U+0E33)
165
+ (codePoint >= 0x0e47 && codePoint <= 0x0e4e) || // Thai vowel signs and marks
166
+ codePoint === 0x0eb1 || // Lao MAI KAN
167
+ (codePoint >= 0x0eb4 && codePoint <= 0x0ebc) || // Lao vowel signs (skip U+0EB2, U+0EB3)
168
+ (codePoint >= 0x0ec8 && codePoint <= 0x0ecd) // Lao tone marks
169
+ ) {
170
+ return true;
171
+ }
172
+ // Arabic formatting
173
+ if ((codePoint >= 0x0600 && codePoint <= 0x0605) ||
174
+ codePoint === 0x06dd ||
175
+ codePoint === 0x070f ||
176
+ codePoint === 0x08e2) {
177
+ return true;
178
+ }
179
+ // Surrogates, tag characters
180
+ if (codePoint >= 0xd800 && codePoint <= 0xdfff)
181
+ return true;
182
+ if (codePoint >= 0xe0000 && codePoint <= 0xe007f)
183
+ return true;
184
+ return false;
185
+ }
186
+ // Note: complex-script graphemes like Devanagari क्ष (ka+virama+ZWJ+ssa) render
187
+ // as a single ligature glyph but occupy 2 terminal cells (wcwidth sums the base
188
+ // consonants). Bun.stringWidth=2 matches terminal cell allocation, which is what
189
+ // we need for cursor positioning — the JS fallback's grapheme-cluster width of 1
190
+ // would desync Ink's layout from the terminal.
191
+ //
192
+ // Bun.stringWidth is resolved once at module scope rather than checked on every
193
+ // call — typeof guards deopt property access and this is a hot path (~100k calls/frame).
194
+ const bunStringWidth = typeof Bun !== 'undefined' && typeof Bun.stringWidth === 'function'
195
+ ? Bun.stringWidth
196
+ : null;
197
+ const BUN_STRING_WIDTH_OPTS = { ambiguousIsNarrow: true };
198
+ /**
199
+ * Get the display width of a string as it would appear in a terminal.
200
+ *
201
+ * Uses Bun.stringWidth when available; otherwise falls back to the JS
202
+ * implementation above, which strips ANSI codes and handles emoji, wide
203
+ * characters, and zero-width combining marks.
204
+ * @param str - the string to measure.
205
+ * @returns the number of terminal cells the string occupies.
206
+ */
207
+ export const stringWidth = bunStringWidth
208
+ ? str => bunStringWidth(str, BUN_STRING_WIDTH_OPTS)
209
+ : stringWidthJavaScript;
@@ -0,0 +1,324 @@
1
+ import { type LayoutNode } from './layout/node.js';
2
+ import type { BorderStyle, BorderTextOptions } from './render-border.js';
3
+ /** Template-literal type for rgb(r,g,b) color strings. */
4
+ export type RGBColor = `rgb(${number},${number},${number})`;
5
+ /** Template-literal type for hex color strings like `#ff8800`. */
6
+ export type HexColor = `#${string}`;
7
+ /** Template-literal type for 256-color strings like `ansi256(174)`. */
8
+ export type Ansi256Color = `ansi256(${number})`;
9
+ /** Named ANSI color strings, optionally bright variants. */
10
+ export type AnsiColor = 'ansi:black' | 'ansi:red' | 'ansi:green' | 'ansi:yellow' | 'ansi:blue' | 'ansi:magenta' | 'ansi:cyan' | 'ansi:white' | 'ansi:blackBright' | 'ansi:redBright' | 'ansi:greenBright' | 'ansi:yellowBright' | 'ansi:blueBright' | 'ansi:magentaBright' | 'ansi:cyanBright' | 'ansi:whiteBright';
11
+ /** Raw color value - not a theme key */
12
+ export type Color = RGBColor | HexColor | Ansi256Color | AnsiColor;
13
+ /**
14
+ * Structured text styling properties.
15
+ * Used to style text without relying on ANSI string transforms.
16
+ * Colors are raw values - theme resolution happens at the component layer.
17
+ */
18
+ export type TextStyles = {
19
+ readonly color?: Color;
20
+ readonly backgroundColor?: Color;
21
+ readonly dim?: boolean;
22
+ readonly bold?: boolean;
23
+ readonly italic?: boolean;
24
+ readonly underline?: boolean;
25
+ readonly strikethrough?: boolean;
26
+ readonly inverse?: boolean;
27
+ };
28
+ /**
29
+ * Layout and text styles applied to an element: text wrapping, positioning,
30
+ * margins, padding, flex properties, dimensions, borders, gaps, and overflow.
31
+ * All properties are optional; unset ones keep their defaults.
32
+ */
33
+ export type Styles = {
34
+ readonly textWrap?: 'wrap' | 'wrap-trim' | 'end' | 'middle' | 'truncate-end' | 'truncate' | 'truncate-middle' | 'truncate-start';
35
+ readonly position?: 'absolute' | 'relative';
36
+ readonly top?: number | `${number}%`;
37
+ readonly bottom?: number | `${number}%`;
38
+ readonly left?: number | `${number}%`;
39
+ readonly right?: number | `${number}%`;
40
+ /**
41
+ * Size of the gap between an element's columns.
42
+ */
43
+ readonly columnGap?: number;
44
+ /**
45
+ * Size of the gap between element's rows.
46
+ */
47
+ readonly rowGap?: number;
48
+ /**
49
+ * Size of the gap between an element's columns and rows. Shorthand for `columnGap` and `rowGap`.
50
+ */
51
+ readonly gap?: number;
52
+ /**
53
+ * Margin on all sides. Equivalent to setting `marginTop`, `marginBottom`, `marginLeft` and `marginRight`.
54
+ */
55
+ readonly margin?: number;
56
+ /**
57
+ * Horizontal margin. Equivalent to setting `marginLeft` and `marginRight`.
58
+ */
59
+ readonly marginX?: number;
60
+ /**
61
+ * Vertical margin. Equivalent to setting `marginTop` and `marginBottom`.
62
+ */
63
+ readonly marginY?: number;
64
+ /**
65
+ * Top margin.
66
+ */
67
+ readonly marginTop?: number;
68
+ /**
69
+ * Bottom margin.
70
+ */
71
+ readonly marginBottom?: number;
72
+ /**
73
+ * Left margin.
74
+ */
75
+ readonly marginLeft?: number;
76
+ /**
77
+ * Right margin.
78
+ */
79
+ readonly marginRight?: number;
80
+ /**
81
+ * Padding on all sides. Equivalent to setting `paddingTop`, `paddingBottom`, `paddingLeft` and `paddingRight`.
82
+ */
83
+ readonly padding?: number;
84
+ /**
85
+ * Horizontal padding. Equivalent to setting `paddingLeft` and `paddingRight`.
86
+ */
87
+ readonly paddingX?: number;
88
+ /**
89
+ * Vertical padding. Equivalent to setting `paddingTop` and `paddingBottom`.
90
+ */
91
+ readonly paddingY?: number;
92
+ /**
93
+ * Top padding.
94
+ */
95
+ readonly paddingTop?: number;
96
+ /**
97
+ * Bottom padding.
98
+ */
99
+ readonly paddingBottom?: number;
100
+ /**
101
+ * Left padding.
102
+ */
103
+ readonly paddingLeft?: number;
104
+ /**
105
+ * Right padding.
106
+ */
107
+ readonly paddingRight?: number;
108
+ /**
109
+ * This property defines the ability for a flex item to grow if necessary.
110
+ * See [flex-grow](https://css-tricks.com/almanac/properties/f/flex-grow/).
111
+ */
112
+ readonly flexGrow?: number;
113
+ /**
114
+ * It specifies the “flex shrink factor”, which determines how much the flex item will shrink relative to the rest of the flex items in the flex container when there isn’t enough space on the row.
115
+ * See [flex-shrink](https://css-tricks.com/almanac/properties/f/flex-shrink/).
116
+ */
117
+ readonly flexShrink?: number;
118
+ /**
119
+ * It establishes the main-axis, thus defining the direction flex items are placed in the flex container.
120
+ * See [flex-direction](https://css-tricks.com/almanac/properties/f/flex-direction/).
121
+ */
122
+ readonly flexDirection?: 'row' | 'column' | 'row-reverse' | 'column-reverse';
123
+ /**
124
+ * It specifies the initial size of the flex item, before any available space is distributed according to the flex factors.
125
+ * See [flex-basis](https://css-tricks.com/almanac/properties/f/flex-basis/).
126
+ */
127
+ readonly flexBasis?: number | string;
128
+ /**
129
+ * It defines whether the flex items are forced in a single line or can be flowed into multiple lines. If set to multiple lines, it also defines the cross-axis which determines the direction new lines are stacked in.
130
+ * See [flex-wrap](https://css-tricks.com/almanac/properties/f/flex-wrap/).
131
+ */
132
+ readonly flexWrap?: 'nowrap' | 'wrap' | 'wrap-reverse';
133
+ /**
134
+ * The align-items property defines the default behavior for how items are laid out along the cross axis (perpendicular to the main axis).
135
+ * See [align-items](https://css-tricks.com/almanac/properties/a/align-items/).
136
+ */
137
+ readonly alignItems?: 'flex-start' | 'center' | 'flex-end' | 'stretch';
138
+ /**
139
+ * It makes possible to override the align-items value for specific flex items.
140
+ * See [align-self](https://css-tricks.com/almanac/properties/a/align-self/).
141
+ */
142
+ readonly alignSelf?: 'flex-start' | 'center' | 'flex-end' | 'auto';
143
+ /**
144
+ * It defines the alignment along the main axis.
145
+ * See [justify-content](https://css-tricks.com/almanac/properties/j/justify-content/).
146
+ */
147
+ readonly justifyContent?: 'flex-start' | 'flex-end' | 'space-between' | 'space-around' | 'space-evenly' | 'center';
148
+ /**
149
+ * Width of the element in spaces.
150
+ * You can also set it in percent, which will calculate the width based on the width of parent element.
151
+ */
152
+ readonly width?: number | string;
153
+ /**
154
+ * Height of the element in lines (rows).
155
+ * You can also set it in percent, which will calculate the height based on the height of parent element.
156
+ */
157
+ readonly height?: number | string;
158
+ /**
159
+ * Sets a minimum width of the element.
160
+ */
161
+ readonly minWidth?: number | string;
162
+ /**
163
+ * Sets a minimum height of the element.
164
+ */
165
+ readonly minHeight?: number | string;
166
+ /**
167
+ * Sets a maximum width of the element.
168
+ */
169
+ readonly maxWidth?: number | string;
170
+ /**
171
+ * Sets a maximum height of the element.
172
+ */
173
+ readonly maxHeight?: number | string;
174
+ /**
175
+ * Set this property to `none` to hide the element.
176
+ */
177
+ readonly display?: 'flex' | 'none';
178
+ /**
179
+ * Add a border with a specified style.
180
+ * If `borderStyle` is `undefined` (which it is by default), no border will be added.
181
+ */
182
+ readonly borderStyle?: BorderStyle;
183
+ /**
184
+ * Determines whether top border is visible.
185
+ *
186
+ * @default true
187
+ */
188
+ readonly borderTop?: boolean;
189
+ /**
190
+ * Determines whether bottom border is visible.
191
+ *
192
+ * @default true
193
+ */
194
+ readonly borderBottom?: boolean;
195
+ /**
196
+ * Determines whether left border is visible.
197
+ *
198
+ * @default true
199
+ */
200
+ readonly borderLeft?: boolean;
201
+ /**
202
+ * Determines whether right border is visible.
203
+ *
204
+ * @default true
205
+ */
206
+ readonly borderRight?: boolean;
207
+ /**
208
+ * Change border color.
209
+ * Shorthand for setting `borderTopColor`, `borderRightColor`, `borderBottomColor` and `borderLeftColor`.
210
+ */
211
+ readonly borderColor?: Color;
212
+ /**
213
+ * Change top border color.
214
+ * Accepts raw color values (rgb, hex, ansi).
215
+ */
216
+ readonly borderTopColor?: Color;
217
+ /**
218
+ * Change bottom border color.
219
+ * Accepts raw color values (rgb, hex, ansi).
220
+ */
221
+ readonly borderBottomColor?: Color;
222
+ /**
223
+ * Change left border color.
224
+ * Accepts raw color values (rgb, hex, ansi).
225
+ */
226
+ readonly borderLeftColor?: Color;
227
+ /**
228
+ * Change right border color.
229
+ * Accepts raw color values (rgb, hex, ansi).
230
+ */
231
+ readonly borderRightColor?: Color;
232
+ /**
233
+ * Dim the border color.
234
+ * Shorthand for setting `borderTopDimColor`, `borderBottomDimColor`, `borderLeftDimColor` and `borderRightDimColor`.
235
+ *
236
+ * @default false
237
+ */
238
+ readonly borderDimColor?: boolean;
239
+ /**
240
+ * Dim the top border color.
241
+ *
242
+ * @default false
243
+ */
244
+ readonly borderTopDimColor?: boolean;
245
+ /**
246
+ * Dim the bottom border color.
247
+ *
248
+ * @default false
249
+ */
250
+ readonly borderBottomDimColor?: boolean;
251
+ /**
252
+ * Dim the left border color.
253
+ *
254
+ * @default false
255
+ */
256
+ readonly borderLeftDimColor?: boolean;
257
+ /**
258
+ * Dim the right border color.
259
+ *
260
+ * @default false
261
+ */
262
+ readonly borderRightDimColor?: boolean;
263
+ /**
264
+ * Add text within the border. Only applies to top or bottom borders.
265
+ */
266
+ readonly borderText?: BorderTextOptions;
267
+ /**
268
+ * Background color for the box. Fills the interior with background-colored
269
+ * spaces and is inherited by child text nodes as their default background.
270
+ */
271
+ readonly backgroundColor?: Color;
272
+ /**
273
+ * Fill the box's interior (padding included) with spaces before
274
+ * rendering children, so nothing behind it shows through. Like
275
+ * `backgroundColor` but without emitting any SGR — the terminal's
276
+ * default background is used. Useful for absolute-positioned overlays
277
+ * where Box padding/gaps would otherwise be transparent.
278
+ */
279
+ readonly opaque?: boolean;
280
+ /**
281
+ * Behavior for an element's overflow in both directions.
282
+ * 'scroll' constrains the container's size (children do not expand it)
283
+ * and enables scrollTop-based virtualized scrolling at render time.
284
+ *
285
+ * @default 'visible'
286
+ */
287
+ readonly overflow?: 'visible' | 'hidden' | 'scroll';
288
+ /**
289
+ * Behavior for an element's overflow in horizontal direction.
290
+ *
291
+ * @default 'visible'
292
+ */
293
+ readonly overflowX?: 'visible' | 'hidden' | 'scroll';
294
+ /**
295
+ * Behavior for an element's overflow in vertical direction.
296
+ *
297
+ * @default 'visible'
298
+ */
299
+ readonly overflowY?: 'visible' | 'hidden' | 'scroll';
300
+ /**
301
+ * Exclude this box's cells from text selection in fullscreen mode.
302
+ * Cells inside this region are skipped by both the selection highlight
303
+ * and the copied text — useful for fencing off gutters (line numbers,
304
+ * diff sigils) so click-drag over a diff yields clean copyable code.
305
+ * Only affects alt-screen text selection; no-op otherwise.
306
+ *
307
+ * `'from-left-edge'` extends the exclusion from column 0 to the box's
308
+ * right edge for every row it occupies — this covers any upstream
309
+ * indentation (tool message prefix, tree lines) so a multi-row drag
310
+ * doesn't pick up leading whitespace from middle rows.
311
+ */
312
+ readonly noSelect?: boolean | 'from-left-edge';
313
+ };
314
+ /**
315
+ * Apply a style diff to a layout node, delegating each property group to its
316
+ * Yoga setter. The node's styles must already be applied elsewhere; `style`
317
+ * may be a diff containing only changed properties.
318
+ * @param node - the layout node to style.
319
+ * @param style - the styles to apply; defaults to an empty object.
320
+ * @param resolvedStyle - the node's full current styles, used to resolve border side values.
321
+ */
322
+ declare const styles: (node: LayoutNode, style?: Styles, resolvedStyle?: Styles) => void;
323
+ export default styles;
324
+ //# sourceMappingURL=styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/ink/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,UAAU,EAIhB,MAAM,kBAAkB,CAAA;AACzB,OAAO,KAAK,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAExE,0DAA0D;AAC1D,MAAM,MAAM,QAAQ,GAAG,OAAO,MAAM,IAAI,MAAM,IAAI,MAAM,GAAG,CAAA;AAC3D,kEAAkE;AAClE,MAAM,MAAM,QAAQ,GAAG,IAAI,MAAM,EAAE,CAAA;AACnC,uEAAuE;AACvE,MAAM,MAAM,YAAY,GAAG,WAAW,MAAM,GAAG,CAAA;AAC/C,4DAA4D;AAC5D,MAAM,MAAM,SAAS,GACjB,YAAY,GACZ,UAAU,GACV,YAAY,GACZ,aAAa,GACb,WAAW,GACX,cAAc,GACd,WAAW,GACX,YAAY,GACZ,kBAAkB,GAClB,gBAAgB,GAChB,kBAAkB,GAClB,mBAAmB,GACnB,iBAAiB,GACjB,oBAAoB,GACpB,iBAAiB,GACjB,kBAAkB,CAAA;AAEtB,wCAAwC;AACxC,MAAM,MAAM,KAAK,GAAG,QAAQ,GAAG,QAAQ,GAAG,YAAY,GAAG,SAAS,CAAA;AAElE;;;;GAIG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB,QAAQ,CAAC,KAAK,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