@visulima/tui 1.0.0-alpha.8 → 1.0.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 (549) hide show
  1. package/CHANGELOG.md +654 -0
  2. package/LICENSE.md +2414 -187
  3. package/README.md +49 -4
  4. package/dist/components/accordion.d.ts +59 -0
  5. package/dist/components/accordion.js +1 -0
  6. package/dist/components/alert.d.ts +26 -0
  7. package/dist/components/alert.js +1 -0
  8. package/dist/components/animate-presence.d.ts +18 -0
  9. package/dist/components/animate-presence.js +1 -0
  10. package/dist/components/approval-prompt.d.ts +65 -0
  11. package/dist/components/approval-prompt.js +1 -0
  12. package/dist/components/area-chart.d.ts +66 -0
  13. package/dist/components/area-chart.js +1 -0
  14. package/dist/components/badge.d.ts +22 -0
  15. package/dist/components/badge.js +1 -0
  16. package/dist/components/bar-chart.d.ts +67 -0
  17. package/dist/components/bar-chart.js +1 -0
  18. package/dist/components/big-text.d.ts +81 -0
  19. package/dist/components/big-text.js +1 -0
  20. package/dist/components/blink-dot.d.ts +36 -0
  21. package/dist/components/blink-dot.js +1 -0
  22. package/dist/components/box.d.ts +62 -0
  23. package/dist/components/box.js +1 -0
  24. package/dist/components/breadcrumb.d.ts +33 -0
  25. package/dist/components/breadcrumb.js +1 -0
  26. package/dist/components/button.d.ts +45 -0
  27. package/dist/components/button.js +1 -0
  28. package/dist/components/calendar.d.ts +72 -0
  29. package/dist/components/calendar.js +1 -0
  30. package/dist/components/canvas.d.ts +44 -0
  31. package/dist/components/canvas.js +1 -0
  32. package/dist/components/card.d.ts +57 -0
  33. package/dist/components/card.js +1 -0
  34. package/dist/components/checkbox.d.ts +48 -0
  35. package/dist/components/checkbox.js +1 -0
  36. package/dist/components/code.d.ts +48 -0
  37. package/dist/components/code.js +2 -0
  38. package/dist/components/collapsible.d.ts +53 -0
  39. package/dist/components/collapsible.js +1 -0
  40. package/dist/components/command-block.d.ts +47 -0
  41. package/dist/components/command-block.js +4 -0
  42. package/dist/components/command-palette.d.ts +82 -0
  43. package/dist/components/command-palette.js +1 -0
  44. package/dist/components/confirm-dialog.d.ts +75 -0
  45. package/dist/components/confirm-dialog.js +1 -0
  46. package/dist/components/confirm-input.d.ts +38 -0
  47. package/dist/components/confirm-input.js +1 -0
  48. package/dist/components/console-overlay.d.ts +54 -0
  49. package/dist/components/console-overlay.js +1 -0
  50. package/dist/components/content-switcher.d.ts +57 -0
  51. package/dist/components/content-switcher.js +1 -0
  52. package/dist/components/controlled-scroll-view.d.ts +61 -0
  53. package/dist/components/controlled-scroll-view.js +1 -0
  54. package/dist/components/cursor.d.ts +62 -0
  55. package/dist/components/cursor.js +1 -0
  56. package/dist/components/date-picker.d.ts +65 -0
  57. package/dist/components/date-picker.js +1 -0
  58. package/dist/components/definition-list.d.ts +44 -0
  59. package/dist/components/definition-list.js +1 -0
  60. package/dist/components/dialog.d.ts +117 -0
  61. package/dist/components/dialog.js +1 -0
  62. package/dist/components/diff-view.d.ts +85 -0
  63. package/dist/components/diff-view.js +1 -0
  64. package/dist/components/divider.d.ts +49 -0
  65. package/dist/components/divider.js +1 -0
  66. package/dist/components/file-picker-entry.d.ts +104 -0
  67. package/dist/components/file-picker-entry.js +1 -0
  68. package/dist/components/form.d.ts +81 -0
  69. package/dist/components/form.js +1 -0
  70. package/dist/components/gauge.d.ts +87 -0
  71. package/dist/components/gauge.js +1 -0
  72. package/dist/components/gradient.d.ts +42 -0
  73. package/dist/components/gradient.js +1 -0
  74. package/dist/components/heading.d.ts +33 -0
  75. package/dist/components/heading.js +1 -0
  76. package/dist/components/heatmap.d.ts +62 -0
  77. package/dist/components/heatmap.js +1 -0
  78. package/dist/components/help.d.ts +52 -0
  79. package/dist/components/help.js +1 -0
  80. package/dist/components/histogram.d.ts +62 -0
  81. package/dist/components/histogram.js +1 -0
  82. package/dist/components/kbd.d.ts +31 -0
  83. package/dist/components/kbd.js +1 -0
  84. package/dist/components/line-chart.d.ts +109 -0
  85. package/dist/components/line-chart.js +1 -0
  86. package/dist/components/link.d.ts +38 -0
  87. package/dist/components/link.js +1 -0
  88. package/dist/components/loading-indicator.d.ts +29 -0
  89. package/dist/components/loading-indicator.js +1 -0
  90. package/dist/components/markdown.d.ts +40 -0
  91. package/dist/components/markdown.js +1 -0
  92. package/dist/components/masked-input.d.ts +50 -0
  93. package/dist/components/masked-input.js +1 -0
  94. package/dist/components/menu.d.ts +78 -0
  95. package/dist/components/menu.js +1 -0
  96. package/dist/components/message-bubble.d.ts +43 -0
  97. package/dist/components/message-bubble.js +1 -0
  98. package/dist/components/model-badge.d.ts +39 -0
  99. package/dist/components/model-badge.js +1 -0
  100. package/dist/components/multi-select.d.ts +65 -0
  101. package/dist/components/multi-select.js +1 -0
  102. package/dist/components/newline.d.ts +15 -0
  103. package/dist/components/newline.js +2 -0
  104. package/dist/components/operation-tree.d.ts +49 -0
  105. package/dist/components/operation-tree.js +1 -0
  106. package/dist/components/option-list.d.ts +47 -0
  107. package/dist/components/option-list.js +1 -0
  108. package/dist/components/ordered-list.d.ts +24 -0
  109. package/dist/components/ordered-list.js +1 -0
  110. package/dist/components/paginator.d.ts +69 -0
  111. package/dist/components/paginator.js +1 -0
  112. package/dist/components/paragraph.d.ts +38 -0
  113. package/dist/components/paragraph.js +1 -0
  114. package/dist/components/placeholder.d.ts +55 -0
  115. package/dist/components/placeholder.js +1 -0
  116. package/dist/components/progress-bar.d.ts +56 -0
  117. package/dist/components/progress-bar.js +1 -0
  118. package/dist/components/radio-group.d.ts +74 -0
  119. package/dist/components/radio-group.js +1 -0
  120. package/dist/components/scatter-plot.d.ts +35 -0
  121. package/dist/components/scatter-plot.js +1 -0
  122. package/dist/components/scroll-bar-box.d.ts +37 -0
  123. package/dist/components/scroll-bar-box.js +1 -0
  124. package/dist/components/scroll-bar.d.ts +25 -0
  125. package/dist/components/scroll-bar.js +1 -0
  126. package/dist/components/scroll-list.d.ts +20 -0
  127. package/dist/components/scroll-list.js +1 -0
  128. package/dist/components/scroll-view.d.ts +10 -0
  129. package/dist/components/scroll-view.js +1 -0
  130. package/dist/components/search-input.d.ts +55 -0
  131. package/dist/components/search-input.js +1 -0
  132. package/dist/components/select-input-indicator.d.ts +32 -0
  133. package/dist/components/select-input-indicator.js +1 -0
  134. package/dist/components/select-input-item.d.ts +41 -0
  135. package/dist/components/select-input-item.js +1 -0
  136. package/dist/components/select-input.d.ts +110 -0
  137. package/dist/components/select-input.js +1 -0
  138. package/dist/components/shimmer-text.d.ts +47 -0
  139. package/dist/components/shimmer-text.js +1 -0
  140. package/dist/components/slider.d.ts +103 -0
  141. package/dist/components/slider.js +1 -0
  142. package/dist/components/spacer.d.ts +8 -0
  143. package/dist/components/spacer.js +1 -0
  144. package/dist/components/sparkline.d.ts +35 -0
  145. package/dist/components/sparkline.js +1 -0
  146. package/dist/components/spinner.d.ts +17 -0
  147. package/dist/components/spinner.js +1 -0
  148. package/dist/components/static-render.d.ts +55 -0
  149. package/dist/components/static-render.js +1 -0
  150. package/dist/components/static.d.ts +29 -0
  151. package/dist/components/static.js +1 -0
  152. package/dist/components/status-line.d.ts +37 -0
  153. package/dist/components/status-line.js +1 -0
  154. package/dist/components/status-message.d.ts +21 -0
  155. package/dist/components/status-message.js +1 -0
  156. package/dist/components/stepper.d.ts +48 -0
  157. package/dist/components/stepper.js +1 -0
  158. package/dist/components/stopwatch.d.ts +49 -0
  159. package/dist/components/stopwatch.js +1 -0
  160. package/dist/components/streaming-text.d.ts +46 -0
  161. package/dist/components/streaming-text.js +1 -0
  162. package/dist/components/switch.d.ts +55 -0
  163. package/dist/components/switch.js +1 -0
  164. package/dist/components/tab.d.ts +19 -0
  165. package/dist/components/tab.js +1 -0
  166. package/dist/components/table.d.ts +119 -0
  167. package/dist/components/table.js +1 -0
  168. package/dist/components/tabs.d.ts +107 -0
  169. package/dist/components/tabs.js +1 -0
  170. package/dist/components/tag.d.ts +35 -0
  171. package/dist/components/tag.js +1 -0
  172. package/dist/components/text-input.d.ts +48 -0
  173. package/dist/components/text-input.js +1 -0
  174. package/dist/components/text.d.ts +79 -0
  175. package/dist/components/text.js +1 -0
  176. package/dist/components/textarea.d.ts +68 -0
  177. package/dist/components/textarea.js +2 -0
  178. package/dist/components/timer.d.ts +59 -0
  179. package/dist/components/timer.js +1 -0
  180. package/dist/components/toast.d.ts +49 -0
  181. package/dist/components/toast.js +1 -0
  182. package/dist/components/tooltip.d.ts +43 -0
  183. package/dist/components/tooltip.js +1 -0
  184. package/dist/components/transform.d.ts +21 -0
  185. package/dist/components/transform.js +1 -0
  186. package/dist/components/transition.d.ts +74 -0
  187. package/dist/components/transition.js +1 -0
  188. package/dist/components/tree-view-entry.d.ts +357 -0
  189. package/dist/components/tree-view-entry.js +1 -0
  190. package/dist/components/unordered-list.d.ts +30 -0
  191. package/dist/components/unordered-list.js +1 -0
  192. package/dist/core/index.d.ts +2 -2
  193. package/dist/core/index.js +1 -1
  194. package/dist/ink/hooks/use-animation.d.ts +41 -0
  195. package/dist/ink/hooks/use-animation.js +1 -0
  196. package/dist/ink/hooks/use-app.d.ts +38 -0
  197. package/dist/ink/hooks/use-app.js +1 -0
  198. package/dist/ink/hooks/use-box-metrics.d.ts +66 -0
  199. package/dist/ink/hooks/use-box-metrics.js +1 -0
  200. package/dist/ink/hooks/use-clipboard.d.ts +30 -0
  201. package/dist/ink/hooks/use-clipboard.js +1 -0
  202. package/dist/ink/hooks/use-color-blindness.d.ts +33 -0
  203. package/dist/ink/hooks/use-color-blindness.js +1 -0
  204. package/dist/ink/hooks/use-console-capture.d.ts +43 -0
  205. package/dist/ink/hooks/use-console-capture.js +1 -0
  206. package/dist/ink/hooks/use-cursor.d.ts +13 -0
  207. package/dist/ink/hooks/use-cursor.js +1 -0
  208. package/dist/ink/hooks/use-focus-manager.d.ts +57 -0
  209. package/dist/ink/hooks/use-focus-manager.js +1 -0
  210. package/dist/ink/hooks/use-focus.d.ts +34 -0
  211. package/dist/ink/hooks/use-focus.js +1 -0
  212. package/dist/ink/hooks/use-form.d.ts +68 -0
  213. package/dist/ink/hooks/use-form.js +1 -0
  214. package/dist/ink/hooks/use-hotkey.d.ts +37 -0
  215. package/dist/ink/hooks/use-hotkey.js +1 -0
  216. package/dist/ink/hooks/use-input.d.ts +149 -0
  217. package/dist/ink/hooks/use-input.js +2 -0
  218. package/dist/ink/hooks/use-interval.d.ts +25 -0
  219. package/dist/ink/hooks/use-interval.js +1 -0
  220. package/dist/ink/hooks/use-is-screen-reader-enabled.d.ts +6 -0
  221. package/dist/ink/hooks/use-is-screen-reader-enabled.js +1 -0
  222. package/dist/ink/hooks/use-key-bindings.d.ts +59 -0
  223. package/dist/ink/hooks/use-key-bindings.js +1 -0
  224. package/dist/ink/hooks/use-key-chord.d.ts +25 -0
  225. package/dist/ink/hooks/use-key-chord.js +1 -0
  226. package/dist/ink/hooks/use-linked-scroll.d.ts +49 -0
  227. package/dist/ink/hooks/use-linked-scroll.js +1 -0
  228. package/dist/ink/hooks/use-paste.d.ts +45 -0
  229. package/dist/ink/hooks/use-paste.js +1 -0
  230. package/dist/ink/hooks/use-persistent-state.d.ts +65 -0
  231. package/dist/ink/hooks/use-persistent-state.js +2 -0
  232. package/dist/ink/hooks/use-scroll-acceleration.d.ts +47 -0
  233. package/dist/ink/hooks/use-scroll-acceleration.js +1 -0
  234. package/dist/ink/hooks/use-scroll-input.d.ts +34 -0
  235. package/dist/ink/hooks/use-scroll-input.js +1 -0
  236. package/dist/ink/hooks/use-stderr.d.ts +16 -0
  237. package/dist/ink/hooks/use-stderr.js +1 -0
  238. package/dist/ink/hooks/use-stdin.d.ts +30 -0
  239. package/dist/ink/hooks/use-stdin.js +1 -0
  240. package/dist/ink/hooks/use-stdout.d.ts +16 -0
  241. package/dist/ink/hooks/use-stdout.js +1 -0
  242. package/dist/ink/hooks/use-stopwatch.d.ts +39 -0
  243. package/dist/ink/hooks/use-stopwatch.js +1 -0
  244. package/dist/ink/hooks/use-terminal-palette.d.ts +20 -0
  245. package/dist/ink/hooks/use-terminal-palette.js +1 -0
  246. package/dist/ink/hooks/use-text-buffer.d.ts +42 -0
  247. package/dist/ink/hooks/use-text-buffer.js +4 -0
  248. package/dist/ink/hooks/use-text-selection.d.ts +45 -0
  249. package/dist/ink/hooks/use-text-selection.js +1 -0
  250. package/dist/ink/hooks/use-timeout.d.ts +24 -0
  251. package/dist/ink/hooks/use-timeout.js +1 -0
  252. package/dist/ink/hooks/use-timer.d.ts +48 -0
  253. package/dist/ink/hooks/use-timer.js +1 -0
  254. package/dist/ink/hooks/use-window-size.d.ts +18 -0
  255. package/dist/ink/hooks/use-window-size.js +1 -0
  256. package/dist/ink/index.d.ts +30 -6251
  257. package/dist/ink/index.js +1 -1
  258. package/dist/ink/mouse/use-element-position.d.ts +31 -0
  259. package/dist/ink/mouse/use-element-position.js +1 -0
  260. package/dist/ink/mouse/use-mouse-action.d.ts +5 -0
  261. package/dist/ink/mouse/use-mouse-action.js +1 -0
  262. package/dist/ink/mouse/use-mouse-position.d.ts +5 -0
  263. package/dist/ink/mouse/use-mouse-position.js +1 -0
  264. package/dist/ink/mouse/use-mouse.d.ts +5 -0
  265. package/dist/ink/mouse/use-mouse.js +1 -0
  266. package/dist/ink/mouse/use-on-mouse-click.d.ts +16 -0
  267. package/dist/ink/mouse/use-on-mouse-click.js +1 -0
  268. package/dist/ink/mouse/use-on-mouse-hover.d.ts +10 -0
  269. package/dist/ink/mouse/use-on-mouse-hover.js +1 -0
  270. package/dist/ink/mouse/use-on-mouse-state.d.ts +13 -0
  271. package/dist/ink/mouse/use-on-mouse-state.js +1 -0
  272. package/dist/packem_chunks/devtools.js +1 -1
  273. package/dist/packem_shared/COLOR_BLINDNESS_COMPENSATION-Ilnoyeqc.js +1 -0
  274. package/dist/packem_shared/ControlledScrollView-Cn4byU2n.js +1 -0
  275. package/dist/packem_shared/DevTools-k6uiVzqv.js +1 -0
  276. package/dist/packem_shared/FilePicker-BLS9nOPz.js +1 -0
  277. package/dist/packem_shared/FocusContext-C2Sosxa4.js +1 -0
  278. package/dist/packem_shared/Fullscreen-BRhuBLBh.js +1 -0
  279. package/dist/packem_shared/IMECompositionBuffer-VhC9HRCv.js +1 -0
  280. package/dist/packem_shared/InputParser-CtwkCbrQ.js +2 -0
  281. package/dist/packem_shared/KEY-C--kOw41.js +1 -0
  282. package/dist/packem_shared/LayoutNode-LPYsuzBg.js +1 -0
  283. package/dist/packem_shared/MouseProvider-DUqQ3Eaa.js +1 -0
  284. package/dist/packem_shared/NAMED_COLORS-82DpREQV.js +1 -0
  285. package/dist/packem_shared/Range-BsVYNWtg.js +1 -0
  286. package/dist/packem_shared/Renderer-DsskdkUd.js +1 -0
  287. package/dist/packem_shared/ResizeObserver-BI9bDy-j.js +1 -0
  288. package/dist/packem_shared/ScrollBar-qa1IzDDv.js +1 -0
  289. package/dist/packem_shared/ScrollBarBox-DchESZWv.js +1 -0
  290. package/dist/packem_shared/ScrollList-BBAnRsrC.js +1 -0
  291. package/dist/packem_shared/ScrollView-CHAo7Epj.js +1 -0
  292. package/dist/packem_shared/Static-DSzsElz4.js +1 -0
  293. package/dist/packem_shared/TreeNodeMap-cJlYqckB.js +1 -0
  294. package/dist/packem_shared/TreeView-BsvLCsf0.js +1 -0
  295. package/dist/packem_shared/TuiApp-BPL8v1i1.js +1 -0
  296. package/dist/packem_shared/TuiContext-BNmP0lMY.js +3 -0
  297. package/dist/packem_shared/ansi-parser-DlgLtOYO.js +1 -0
  298. package/dist/packem_shared/ansi-tokenizer-BU67A126.js +1 -0
  299. package/dist/packem_shared/braille-ch3O5D7I.js +1 -0
  300. package/dist/packem_shared/buffer.d-EJkZr8uH.d.ts +39 -0
  301. package/dist/packem_shared/calculateScroll-D4Y_JR4H.js +1 -0
  302. package/dist/packem_shared/{measureElement-DA8WqFP_.js → calculateScrollbarLayout-Lf6i24c9.js} +1 -1
  303. package/dist/packem_shared/clearOsc52-BUpnQOav.js +1 -0
  304. package/dist/packem_shared/clearStringWidthCache-DKFjfJuB.js +1 -0
  305. package/dist/packem_shared/clipboard.d-D6lZTQ21.d.ts +23 -0
  306. package/dist/packem_shared/color-matrix.d-DSXLsB64.d.ts +50 -0
  307. package/dist/packem_shared/colorize-DU4YZkp3.js +1 -0
  308. package/dist/packem_shared/controlled-scroll-view-BVg7ywNW.js +1 -0
  309. package/dist/packem_shared/createInlineLoop-BT40Wpmx.js +2 -0
  310. package/dist/packem_shared/createScreen-DoYpyL0V.js +3 -0
  311. package/dist/packem_shared/cursor-helpers.d-BONB9tky.d.ts +12 -0
  312. package/dist/packem_shared/dom-rphpG0kf.js +1 -0
  313. package/dist/packem_shared/dom.d-B4kXbaVY.d.ts +449 -0
  314. package/dist/packem_shared/format-time-fjoQHMxD.js +1 -0
  315. package/dist/packem_shared/{getPathToRoot-B2tKmx3i.js → getPathToRoot-PDJeqiEH.js} +1 -1
  316. package/dist/packem_shared/input-utils-BSWCb4F_.js +1 -0
  317. package/dist/packem_shared/{input.d-Bfq7oc06.d.ts → input.d-CgxV2e8U.d.ts} +1 -1
  318. package/dist/packem_shared/isIntersecting-Bo2npvMR.js +1 -0
  319. package/dist/packem_shared/isTerminalPaletteQuerySupported-BYzmqq9-.js +1 -0
  320. package/dist/packem_shared/kittyFlags-g8ALyoCU.js +1 -0
  321. package/dist/packem_shared/line-chart-C7CUrvVs.js +1 -0
  322. package/dist/packem_shared/load-native-root-binding-DDikxNox.js +1 -0
  323. package/dist/packem_shared/measure-element-D4M9iSYp.js +1 -0
  324. package/dist/packem_shared/measure-text-B7juNq4Y.js +3 -0
  325. package/dist/packem_shared/mouse-context.d-BfL9xGk_.d.ts +30 -0
  326. package/dist/packem_shared/parseSgrMouse-bUrqPrh-.js +1 -0
  327. package/dist/packem_shared/processLayout-I83k6vXE.js +2 -0
  328. package/dist/packem_shared/reconciler-CFyBVf7l.js +1 -0
  329. package/dist/packem_shared/reconciler-ClpU7Y-V.js +1 -0
  330. package/dist/packem_shared/render-CuQecTAs.js +24 -0
  331. package/dist/packem_shared/render-DFZ8NHlG.js +1 -0
  332. package/dist/packem_shared/render.d-CBnYBDk2.d.ts +417 -0
  333. package/dist/packem_shared/renderToString-DwXFY8Qh.js +4 -0
  334. package/dist/packem_shared/renderToString-L_bpw4OQ.js +2 -0
  335. package/dist/packem_shared/renderTreeToBuffer-C8lS0lJ2.js +2 -0
  336. package/dist/packem_shared/renderer-k-xShm1P.js +17 -0
  337. package/dist/packem_shared/scroll-view.d-DtpsgHLg.d.ts +119 -0
  338. package/dist/packem_shared/selection.d-CI3_p8wg.d.ts +62 -0
  339. package/dist/packem_shared/squashTextNodesWithMap-BmUSBPfc.js +1 -0
  340. package/dist/packem_shared/stderr-context-Bvnik0hL.js +1 -0
  341. package/dist/packem_shared/stdin-context-88AhuztD.js +1 -0
  342. package/dist/packem_shared/styles.d-cMo36xQz.d.ts +396 -0
  343. package/dist/packem_shared/terminal-palette.d-D2SQjfn-.d.ts +19 -0
  344. package/dist/packem_shared/text-width-e49vlbQH.js +2 -0
  345. package/dist/packem_shared/token-to-elements-D6J6-P2A.js +1 -0
  346. package/dist/packem_shared/treeViewTheme-Dq3ekRAC.js +1 -0
  347. package/dist/packem_shared/useTreeView-D5ifGwG3.js +1 -0
  348. package/dist/packem_shared/useTreeViewState-BiTJakkh.js +1 -0
  349. package/dist/packem_shared/utils-Bup8lyK8.js +1 -0
  350. package/dist/packem_shared/variant-config.d-D5NnrrQK.d.ts +2 -0
  351. package/dist/packem_shared/waitFor-CTAki32d.js +4 -0
  352. package/dist/packem_shared/wrapOrTruncateStyledLine-46W8bTtv.js +3 -0
  353. package/dist/react/index.d.ts +2 -2
  354. package/dist/react/index.js +1 -1
  355. package/dist/testing/index.d.ts +5 -1
  356. package/dist/testing/index.js +1 -1
  357. package/index.js +550 -692
  358. package/package.json +583 -32
  359. package/dist/packem_shared/Accordion-BXsqchV-.js +0 -1
  360. package/dist/packem_shared/Alert-BhYVMHtR.js +0 -1
  361. package/dist/packem_shared/AnimatePresence-Eu7Z8KHc.js +0 -1
  362. package/dist/packem_shared/ApprovalPrompt-BSn0FT1g.js +0 -1
  363. package/dist/packem_shared/AreaChart-Chy-frI7.js +0 -1
  364. package/dist/packem_shared/Badge-B8WPyRsK.js +0 -1
  365. package/dist/packem_shared/BarChart-rpZtlMcF.js +0 -1
  366. package/dist/packem_shared/BigText-CRpwUzrt.js +0 -1
  367. package/dist/packem_shared/BlinkDot-BvnRuWP8.js +0 -1
  368. package/dist/packem_shared/Box-BwqSvWuq.js +0 -1
  369. package/dist/packem_shared/Breadcrumb-D0hClbRV.js +0 -1
  370. package/dist/packem_shared/Button-B89Yvbc6.js +0 -1
  371. package/dist/packem_shared/COLOR_BLINDNESS_SIMULATION-DqErf7XX.js +0 -1
  372. package/dist/packem_shared/Calendar-Dmflvm2S.js +0 -1
  373. package/dist/packem_shared/Canvas-CKg6WV47.js +0 -1
  374. package/dist/packem_shared/Card-B_9fXdtU.js +0 -1
  375. package/dist/packem_shared/Checkbox-BN71eCWU.js +0 -1
  376. package/dist/packem_shared/Code-HhevcyiH.js +0 -2
  377. package/dist/packem_shared/Collapsible-u6uf_FdV.js +0 -1
  378. package/dist/packem_shared/CommandBlock-B-nslpCv.js +0 -4
  379. package/dist/packem_shared/CommandPalette-CEFdaURo.js +0 -1
  380. package/dist/packem_shared/ConfirmDialog-5Jje_Xpu.js +0 -1
  381. package/dist/packem_shared/ConfirmInput-D44Mb9oo.js +0 -1
  382. package/dist/packem_shared/ConsoleOverlay-CM3APfgP.js +0 -1
  383. package/dist/packem_shared/ContentSwitcher-Dm5BkrCt.js +0 -1
  384. package/dist/packem_shared/ControlledScrollView-DI8KZOQB.js +0 -1
  385. package/dist/packem_shared/Cursor-BoLFIMol.js +0 -1
  386. package/dist/packem_shared/DatePicker-CnSrFFAE.js +0 -1
  387. package/dist/packem_shared/DefinitionList-v8RDuF_R.js +0 -1
  388. package/dist/packem_shared/DevTools-O8EbCfHa.js +0 -1
  389. package/dist/packem_shared/Dialog-CTaL8pn0.js +0 -1
  390. package/dist/packem_shared/DiffView-BUIFqUB0.js +0 -1
  391. package/dist/packem_shared/Divider-C47bKmqu.js +0 -1
  392. package/dist/packem_shared/FilePicker-CUo7R5Qb.js +0 -1
  393. package/dist/packem_shared/FocusContext-Xy0cwJpO.js +0 -1
  394. package/dist/packem_shared/FormField-af3aUpRL.js +0 -1
  395. package/dist/packem_shared/Fullscreen-CuJ8y0s0.js +0 -1
  396. package/dist/packem_shared/Gauge-Dz-usH__.js +0 -1
  397. package/dist/packem_shared/Gradient-DYNc0GZA.js +0 -1
  398. package/dist/packem_shared/Heading-mwEYza3Y.js +0 -1
  399. package/dist/packem_shared/Heatmap-ChL97U1-.js +0 -1
  400. package/dist/packem_shared/Help-Zcelyw_U.js +0 -1
  401. package/dist/packem_shared/Histogram-FIf2F83d.js +0 -1
  402. package/dist/packem_shared/IMECompositionBuffer-C89PhiOu.js +0 -1
  403. package/dist/packem_shared/InputParser-rZKjY_7Y.js +0 -2
  404. package/dist/packem_shared/KEY-Bk8B-3h_.js +0 -1
  405. package/dist/packem_shared/Kbd-DpkPp4jB.js +0 -1
  406. package/dist/packem_shared/LayoutNode-rxblE317.js +0 -1
  407. package/dist/packem_shared/LineChart-BXE_girm.js +0 -1
  408. package/dist/packem_shared/Link-i2o2EG4-.js +0 -1
  409. package/dist/packem_shared/LoadingIndicator-TC1Fjwyt.js +0 -1
  410. package/dist/packem_shared/Markdown-R1XqK63D.js +0 -1
  411. package/dist/packem_shared/MaskedInput-J01phOZs.js +0 -1
  412. package/dist/packem_shared/Menu-CfrH4ymk.js +0 -1
  413. package/dist/packem_shared/MessageBubble-BmBBU2Rm.js +0 -1
  414. package/dist/packem_shared/ModelBadge-D3wrXncu.js +0 -1
  415. package/dist/packem_shared/MouseProvider-pjza-lpc.js +0 -1
  416. package/dist/packem_shared/MultiSelect-Dqmn-bVo.js +0 -1
  417. package/dist/packem_shared/NAMED_COLORS-B9fJsYdg.js +0 -1
  418. package/dist/packem_shared/Newline-BSG4iUqp.js +0 -2
  419. package/dist/packem_shared/OperationTree-DksxjMIV.js +0 -1
  420. package/dist/packem_shared/OptionList-CNx7r9yN.js +0 -1
  421. package/dist/packem_shared/OrderedList-BeDy035w.js +0 -1
  422. package/dist/packem_shared/Paginator-B56s6bhS.js +0 -1
  423. package/dist/packem_shared/Paragraph-BqJlH0R-.js +0 -1
  424. package/dist/packem_shared/Placeholder-GMpHRGC8.js +0 -1
  425. package/dist/packem_shared/ProgressBar-Bj3fmORR.js +0 -1
  426. package/dist/packem_shared/RadioGroup-Br8BeEwS.js +0 -1
  427. package/dist/packem_shared/Renderer-DJXooAsp.js +0 -1
  428. package/dist/packem_shared/ResizeObserverEntry-Dq0dk8Kq.js +0 -1
  429. package/dist/packem_shared/ScatterPlot-OhfYco5l.js +0 -1
  430. package/dist/packem_shared/ScrollBar-Da5Y3z7N.js +0 -1
  431. package/dist/packem_shared/ScrollBarBox-Dz6F-Eat.js +0 -1
  432. package/dist/packem_shared/ScrollList-DiVGyEjv.js +0 -1
  433. package/dist/packem_shared/ScrollView-BojONotI.js +0 -1
  434. package/dist/packem_shared/SearchInput-BoPTRbhV.js +0 -1
  435. package/dist/packem_shared/SelectInput-CAJ7SCBq.js +0 -1
  436. package/dist/packem_shared/SelectInputIndicator-N1n8ULHs.js +0 -1
  437. package/dist/packem_shared/SelectInputItem-BEkbmobs.js +0 -1
  438. package/dist/packem_shared/ShimmerText-CuGQ2NDC.js +0 -1
  439. package/dist/packem_shared/Slider-Cg_tJpKa.js +0 -1
  440. package/dist/packem_shared/Spacer-eT3HOrXk.js +0 -1
  441. package/dist/packem_shared/Sparkline-T6_FPVET.js +0 -1
  442. package/dist/packem_shared/Spinner-B0-A50pu.js +0 -1
  443. package/dist/packem_shared/Static-DLynr5pn.js +0 -1
  444. package/dist/packem_shared/Static-jzLPaHJF.js +0 -1
  445. package/dist/packem_shared/StaticRender-BgD61E7x.js +0 -1
  446. package/dist/packem_shared/StatusLine-Ch4jjef1.js +0 -1
  447. package/dist/packem_shared/StatusMessage-B1qfKeMM.js +0 -1
  448. package/dist/packem_shared/Stepper-CNPAqxiU.js +0 -1
  449. package/dist/packem_shared/Stopwatch-CAx2EWwq.js +0 -1
  450. package/dist/packem_shared/StreamingText-BYOKSB2T.js +0 -1
  451. package/dist/packem_shared/Switch-DzSpKYu7.js +0 -1
  452. package/dist/packem_shared/Tab-BcXzSUdj.js +0 -1
  453. package/dist/packem_shared/Table-DJp1TLrR.js +0 -1
  454. package/dist/packem_shared/Tabs-D68z0SOt.js +0 -1
  455. package/dist/packem_shared/Tag-BvLHnYRn.js +0 -1
  456. package/dist/packem_shared/Text-mTAve9R2.js +0 -1
  457. package/dist/packem_shared/TextInput-C_gYQlnF.js +0 -1
  458. package/dist/packem_shared/Textarea-C2ET_oMb.js +0 -2
  459. package/dist/packem_shared/Timer-CI3aQX65.js +0 -1
  460. package/dist/packem_shared/Toast-Drvc8XfG.js +0 -1
  461. package/dist/packem_shared/Tooltip-C5UnQlLd.js +0 -1
  462. package/dist/packem_shared/Transform-fYmcdqRT.js +0 -1
  463. package/dist/packem_shared/Transition-CJDBKYUB.js +0 -1
  464. package/dist/packem_shared/TreeNodeMap-CspqSCpb.js +0 -1
  465. package/dist/packem_shared/TreeView-DjhacGJ5.js +0 -1
  466. package/dist/packem_shared/TuiApp-DrjI_i-R.js +0 -1
  467. package/dist/packem_shared/TuiContext-BoJvG3NN.js +0 -3
  468. package/dist/packem_shared/UnorderedList-BnfqexZs.js +0 -1
  469. package/dist/packem_shared/ansi-parser-B6uXaq65.js +0 -1
  470. package/dist/packem_shared/ansi-tokenizer-DqX9nJuk.js +0 -1
  471. package/dist/packem_shared/boxes-DyY_LXCi.js +0 -1
  472. package/dist/packem_shared/braille-BBjIoaN0.js +0 -1
  473. package/dist/packem_shared/colorize-DbTZMrJO.js +0 -1
  474. package/dist/packem_shared/comparePoints-C85EsmNz.js +0 -1
  475. package/dist/packem_shared/controlled-scroll-view-CmrAEvJk.js +0 -1
  476. package/dist/packem_shared/createInlineLoop-DRNZ7jqH.js +0 -2
  477. package/dist/packem_shared/createLinkedScrollGroup-BMTJ7rAj.js +0 -1
  478. package/dist/packem_shared/createMemoryStorage-QVZNXbWz.js +0 -2
  479. package/dist/packem_shared/createScreen-CrLrxA6t.js +0 -3
  480. package/dist/packem_shared/dom-4y__5fWB.js +0 -1
  481. package/dist/packem_shared/format-time-C7Q-hQZq.js +0 -1
  482. package/dist/packem_shared/getScrollHeight-BTEY8ewu.js +0 -1
  483. package/dist/packem_shared/input-utils-fAxzSlNh.js +0 -1
  484. package/dist/packem_shared/isIntersecting-B3KbKTmu.js +0 -1
  485. package/dist/packem_shared/isOsc52Supported-DKK7Uee6.js +0 -1
  486. package/dist/packem_shared/isTerminalPaletteQuerySupported-Dn2hFAZ_.js +0 -1
  487. package/dist/packem_shared/kittyFlags-C3rZLbcK.js +0 -1
  488. package/dist/packem_shared/line-chart-DrM8PwnI.js +0 -1
  489. package/dist/packem_shared/measure-element-DSp7YDus.js +0 -2
  490. package/dist/packem_shared/measure-text-DDjHT1jD.js +0 -3
  491. package/dist/packem_shared/parseSgrMouse-Ccj70ijb.js +0 -1
  492. package/dist/packem_shared/processLayout-DXDfFb_d.js +0 -1
  493. package/dist/packem_shared/reconciler-BuOP-TZ6.js +0 -1
  494. package/dist/packem_shared/reconciler-DSYCrIZs.js +0 -1
  495. package/dist/packem_shared/render-DDqtMAFN.js +0 -1
  496. package/dist/packem_shared/render-_r0K9K11.js +0 -28
  497. package/dist/packem_shared/render.d-BR3gA-N8.d.ts +0 -1257
  498. package/dist/packem_shared/renderToString-DeqOWRP8.js +0 -4
  499. package/dist/packem_shared/renderToString-IYYPyASm.js +0 -2
  500. package/dist/packem_shared/renderTreeToBuffer-DPkoCgP2.js +0 -2
  501. package/dist/packem_shared/renderer-D2p6av2X.js +0 -17
  502. package/dist/packem_shared/setEnableStyledLineCache-D2gZbwFM.js +0 -1
  503. package/dist/packem_shared/squashTextNodesWithMap-Cpqmc45i.js +0 -1
  504. package/dist/packem_shared/stderr-context-BzEaUICS.js +0 -1
  505. package/dist/packem_shared/stdin-context-BTaaFagk.js +0 -1
  506. package/dist/packem_shared/text-width-CZ9vPvM0.js +0 -2
  507. package/dist/packem_shared/token-to-elements-BYxT6J_Q.js +0 -1
  508. package/dist/packem_shared/treeViewTheme-1RIZyB4M.js +0 -1
  509. package/dist/packem_shared/useAnimation-B9we6ZzL.js +0 -1
  510. package/dist/packem_shared/useApp-B6fvM42d.js +0 -1
  511. package/dist/packem_shared/useBoxMetrics-D5pkIr6P.js +0 -1
  512. package/dist/packem_shared/useClipboard-CBxy0hT8.js +0 -1
  513. package/dist/packem_shared/useColorBlindness-BvWcu2Bb.js +0 -1
  514. package/dist/packem_shared/useConsoleCapture-BxiG8iLJ.js +0 -1
  515. package/dist/packem_shared/useCursor-CPu8T5Db.js +0 -1
  516. package/dist/packem_shared/useElementDimensions-qJ_WXFZ9.js +0 -1
  517. package/dist/packem_shared/useFocus-DSmziO_x.js +0 -1
  518. package/dist/packem_shared/useFocusManager-Uapn3LQo.js +0 -1
  519. package/dist/packem_shared/useForm-CzV-Oext.js +0 -1
  520. package/dist/packem_shared/useHotkey-D0dGey14.js +0 -1
  521. package/dist/packem_shared/useInput-D1_jG26Z.js +0 -2
  522. package/dist/packem_shared/useInterval-AobjZT3u.js +0 -1
  523. package/dist/packem_shared/useIsScreenReaderEnabled-DjWHh-II.js +0 -1
  524. package/dist/packem_shared/useKeyBindings-zabkEJQs.js +0 -1
  525. package/dist/packem_shared/useKeyChord-CICQIxXj.js +0 -1
  526. package/dist/packem_shared/useMouseAction-2dRfU1vE.js +0 -1
  527. package/dist/packem_shared/useMouseContext-C746G7kY.js +0 -1
  528. package/dist/packem_shared/useMousePosition-BTWfV4JK.js +0 -1
  529. package/dist/packem_shared/useOnMouseClick-nY8xLZmt.js +0 -1
  530. package/dist/packem_shared/useOnMouseHover-D3DczIol.js +0 -1
  531. package/dist/packem_shared/useOnMouseState-cRK8QvzD.js +0 -1
  532. package/dist/packem_shared/usePaste-CKKB9H-Z.js +0 -1
  533. package/dist/packem_shared/useScrollAcceleration-NrY1oVMs.js +0 -1
  534. package/dist/packem_shared/useScrollInput-Caghtn-Q.js +0 -1
  535. package/dist/packem_shared/useStderr-BDZb6InG.js +0 -1
  536. package/dist/packem_shared/useStdin-DKa4h35k.js +0 -1
  537. package/dist/packem_shared/useStdout-B-2lX4C5.js +0 -1
  538. package/dist/packem_shared/useStopwatch-DffK7iMh.js +0 -1
  539. package/dist/packem_shared/useTerminalPalette-Cv7tSduR.js +0 -1
  540. package/dist/packem_shared/useTextBuffer-DekkGLxI.js +0 -4
  541. package/dist/packem_shared/useTextSelection-CGT0GLDR.js +0 -1
  542. package/dist/packem_shared/useTimeout-7LEFYTnG.js +0 -1
  543. package/dist/packem_shared/useTimer-DyoqSyGi.js +0 -1
  544. package/dist/packem_shared/useTreeView-8UlTK6sW.js +0 -1
  545. package/dist/packem_shared/useTreeViewState-CRPCUWrb.js +0 -1
  546. package/dist/packem_shared/useWindowSize-yDZsXF8z.js +0 -1
  547. package/dist/packem_shared/utils-THUhYKG2.js +0 -1
  548. package/dist/packem_shared/waitFor-Dj5zfL5s.js +0 -4
  549. package/dist/packem_shared/wrapOrTruncateStyledLine-BZ00SM8i.js +0 -3
@@ -0,0 +1,12 @@
1
+ type CursorPosition = {
2
+ x: number;
3
+ y: number;
4
+ };
5
+ /**
6
+ * Declarative cursor shape, mapped to DECSCUSR (`CSI Ps SP q`).
7
+ *
8
+ * `"default"` restores the terminal's user-configured shape (`Ps=0`).
9
+ * Steady variants are non-blinking; `blinking-*` variants opt into blink.
10
+ */
11
+ type CursorShape = "bar" | "blinking-bar" | "blinking-block" | "blinking-underline" | "block" | "default" | "underline";
12
+ export { CursorShape as C, CursorPosition as a };
@@ -0,0 +1 @@
1
+ import h from"yoga-layout";import{y as l}from"./measure-text-B7juNq4Y.js";import g from"./squashTextNodesWithMap-BmUSBPfc.js";import{wordWrap as p,truncate as f}from"@visulima/string";const N={},m={hard:"STRICT_WIDTH",wrap:"BREAK_WORDS","wrap-anywhere":"BREAK_AT_CHARACTERS","wrap-preserve-words":"PRESERVE_WORDS","wrap-strict":"STRICT_WIDTH"},C=(e,t,o)=>{const n=e+String(t)+String(o),r=N[n];if(r)return r;let a=e;const s=m[o];if(s)a=p(e,{trim:!1,width:t,wrapMode:s}).replace(/\n$/,"");else if(o.startsWith("truncate")){let d="end";o==="truncate-middle"&&(d="middle"),o==="truncate-start"&&(d="start"),a=f(e,t,{position:d})}return N[n]=a,a};let x=0;const T=e=>{const t={attributes:{},childNodes:[],internal_accessibility:{},internal_id:x++,nodeName:e,parentNode:void 0,style:{},yogaNode:e==="ink-virtual-text"||e==="ink-cursor"?void 0:h.Node.create()};return e==="ink-text"&&t.yogaNode?.setMeasureFunc(R.bind(null,t)),t},i=e=>{y(e.nodeName==="ink-static-render"&&e.cachedRender?e.parentNode:e)},b=(e,t)=>{t.parentNode&&c(t.parentNode,t),t.parentNode=e,e.childNodes.push(t),t.yogaNode&&e.yogaNode?.insertChild(t.yogaNode,e.yogaNode.getChildCount()),i(e)},L=(e,t,o)=>{t.parentNode&&c(t.parentNode,t),t.parentNode=e;const n=e.childNodes.indexOf(o);if(n===-1)e.childNodes.push(t),t.yogaNode&&e.yogaNode?.insertChild(t.yogaNode,e.yogaNode.getChildCount());else if(e.childNodes.splice(n,0,t),t.yogaNode){const r=e.childNodes.slice(0,n).filter(a=>!!a.yogaNode).length;e.yogaNode?.insertChild(t.yogaNode,r)}i(e)},c=(e,t)=>{if(t.yogaNode){const n=t.yogaNode.getParent();n&&n.removeChild(t.yogaNode)}t.parentNode=void 0;const o=e.childNodes.indexOf(t);o!==-1&&e.childNodes.splice(o,1),i(e)},W=(e,t,o)=>{if(t==="internal_accessibility"){e.internal_accessibility=o;return}e.attributes[t]=o},A=(e,t)=>{e.style=t??{}},D=e=>{const t={nodeName:"#text",nodeValue:e,parentNode:void 0,style:{},yogaNode:void 0};return _(t,e),t},R=function(e,t){const o=e.nodeName==="#text"?e.nodeValue:g(e),n=l(o);if(n.width<=t||n.width>=1&&t>0&&t<1)return n;const r=e.style?.textWrap??"wrap",a=C(o,Math.floor(t),r);return l(a)},u=e=>{if(e?.parentNode)return e.yogaNode??u(e.parentNode)},y=e=>{(e?.nodeName==="#text"||e?.nodeName==="ink-text"||e?.nodeName==="ink-virtual-text")&&u(e)?.markDirty();let t=e;for(;t;){if((t.nodeName==="ink-text"||t.nodeName==="ink-virtual-text")&&(t.internal_textCache=void 0),"childNodes"in t){if(t!==e&&t.nodeName==="ink-static-render"&&t.cachedRender)break;t.cachedRender=void 0}t=t.parentNode}},_=(e,t)=>{typeof t!="string"&&(t=String(t)),e.nodeValue=t,y(e)},E=(e,t)=>e.nodeName!=="ink-root"?()=>{}:(e.internal_layoutListeners??=new Set,e.internal_layoutListeners.add(t),()=>{e.internal_layoutListeners?.delete(t)}),V=e=>{if(!(e.nodeName!=="ink-root"||!e.internal_layoutListeners))for(const t of e.internal_layoutListeners)t()},H=(e,t)=>{if(e.cachedRender=t,e.yogaNode){for(e.yogaNode.setWidth(t.width),e.yogaNode.setHeight(t.height);e.yogaNode.getChildCount()>0;)e.yogaNode.removeChild(e.yogaNode.getChild(0));e.isYogaTreeDetached=!0}},I=e=>{const t=[];let o=e;for(;o;)t.unshift(o),o=o.parentNode;return t},O=e=>{let t=e;for(;t;){const{userSelect:o}=t.style;if(o==="none")return!1;if(o==="text"||o==="all")return!0;t=t.parentNode}return!0};export{E as a,L as b,T as c,b as d,V as e,D as f,I as g,A as h,O as i,W as j,H as k,C as l,y as m,c as r,_ as s};
@@ -0,0 +1,449 @@
1
+ import { Node } from 'yoga-layout';
2
+ import { C as CursorShape } from "./cursor-helpers.d-BONB9tky.js";
3
+ import '@visulima/colorize';
4
+ import 'cli-boxes';
5
+ import { S as Styles } from "./styles.d-cMo36xQz.js";
6
+
7
+ /**
8
+ * Columnar data structure for a single line of styled terminal text.
9
+ *
10
+ * Instead of one heap-allocated object per visible character, StyledLine stores:
11
+ *
12
+ * - `text: string` — concatenated raw character values
13
+ * - `charData: number[]` — per-character: 30-bit offset into text | 1-bit full-width flag
14
+ * - `spans: StyleSpan[]` — run-length encoded style information
15
+ *
16
+ * For an 80-column line this reduces allocations from ~80 objects to
17
+ * 1 string + 1 array + typically 1-5 span objects.
18
+ *
19
+ * Ported from jacob314/ink (Google LLC, Apache-2.0).
20
+ * @license Apache-2.0
21
+ * Copyright 2026 Google LLC
22
+ * SPDX-License-Identifier: Apache-2.0
23
+ */
24
+ /**
25
+ * Columnar data structure for a single line of styled terminal text.
26
+ *
27
+ * Instead of one heap-allocated object per visible character, StyledLine stores:
28
+ *
29
+ * - `text: string` — concatenated raw character values
30
+ * - `charData: number[]` — per-character: 30-bit offset into text | 1-bit full-width flag
31
+ * - `spans: StyleSpan[]` — run-length encoded style information
32
+ *
33
+ * For an 80-column line this reduces allocations from ~80 objects to
34
+ * 1 string + 1 array + typically 1-5 span objects.
35
+ *
36
+ * Ported from jacob314/ink (Google LLC, Apache-2.0).
37
+ * @license Apache-2.0
38
+ * Copyright 2026 Google LLC
39
+ * SPDX-License-Identifier: Apache-2.0
40
+ */
41
+ type StyleSpan = {
42
+ bgColor?: string;
43
+ fgColor?: string;
44
+ formatFlags: number;
45
+ length: number;
46
+ link?: string;
47
+ };
48
+ declare class StyledLine {
49
+ length: number;
50
+ private static readonly emptyCache;
51
+ private text;
52
+ private charData;
53
+ private spans;
54
+ private _cachedTrimmedLength?;
55
+ static empty(length: number): StyledLine;
56
+ getValue(index: number): string;
57
+ /**
58
+ * Get the raw text for a range of characters as a single string slice.
59
+ * Much faster than calling getValue() per character.
60
+ */
61
+ getTextRange(start: number, end: number): string;
62
+ getSpan(index: number): StyleSpan | undefined;
63
+ getFullWidth(index: number): boolean;
64
+ hasStyles(index: number): boolean;
65
+ getFormatFlags(index: number): number;
66
+ getFgColor(index: number): string | undefined;
67
+ getBgColor(index: number): string | undefined;
68
+ getLink(index: number): string | undefined;
69
+ setInverted(index: number, inverted: boolean): void;
70
+ setBackgroundColor(index: number, color: string | undefined): void;
71
+ setForegroundColor(index: number, color: string | undefined): void;
72
+ setChar(index: number, value: string, formatFlags: number, fgColor?: string, bgColor?: string, link?: string): void;
73
+ /**
74
+ * Optimized setChar for same-length single-byte replacement.
75
+ * Skips string rebuild and offset adjustment when old and new values
76
+ * have the same byte length (the common case for ASCII overwrites on empty lines).
77
+ */
78
+ setCharFast(index: number, value: string, formatFlags: number, fgColor?: string, bgColor?: string, link?: string): void;
79
+ /**
80
+ * Overwrite a range of this line with content from a source StyledLine.
81
+ * More efficient than calling setChar() per character because it does
82
+ * a single span split + rebuild instead of per-character span manipulation.
83
+ * @param destinationStart — start index in this line
84
+ * @param source — the StyledLine to copy from
85
+ * @param srcStart — start index in source (default 0)
86
+ * @param count — number of characters to copy (default: source.length)
87
+ */
88
+ writeFrom(destinationStart: number, source: StyledLine, srcStart?: number, count?: number): void;
89
+ pushChar(value: string, formatFlags: number, fgColor?: string, bgColor?: string, link?: string): void;
90
+ clone(): StyledLine;
91
+ slice(start: number, end?: number): StyledLine;
92
+ combine(...others: StyledLine[]): StyledLine;
93
+ getTrimmedLength(): number;
94
+ trimEnd(): StyledLine;
95
+ equals(other: StyledLine): boolean;
96
+ getText(): string;
97
+ getSpans(): StyleSpan[];
98
+ getValues(): string[];
99
+ [Symbol.iterator](): Iterator<{
100
+ bgColor?: string;
101
+ fgColor?: string;
102
+ formatFlags: number;
103
+ fullWidth: boolean;
104
+ hasStyles: boolean;
105
+ link?: string;
106
+ value: string;
107
+ }>;
108
+ /**
109
+ * Split the span at `index` into a single-char span, apply the updater,
110
+ * then merge adjacent spans. Shared by setInverted/setBackgroundColor/setForegroundColor.
111
+ */
112
+ private updateSpanAt;
113
+ /**
114
+ * Grow the line to at least `minWidth` columns, filling new cells with
115
+ * empty strings (zero-width placeholders). This matches the behavior of
116
+ * sparse JS arrays in the original ink Output where out-of-bounds writes
117
+ * created gaps that produced no visible output.
118
+ */
119
+ ensureWidth(minWidth: number): void;
120
+ private ensureInitialized;
121
+ private splitSpansAt;
122
+ /**
123
+ * Try to apply a single-char style at `index` by matching or merging
124
+ * with an adjacent span, avoiding splitSpansAt + mergeSpans.
125
+ *
126
+ * Returns true if the style was applied (or was already correct),
127
+ * false if the caller must fall through to the split/update/merge path.
128
+ *
129
+ * Ported from jacob314/ink PR #123 (Google LLC, Apache-2.0).
130
+ */
131
+ private trySetStyleAtIndex;
132
+ private mergeSpans;
133
+ }
134
+ type Region = {
135
+ backgroundColor?: string;
136
+ borderBottom?: number;
137
+ borderTop?: number;
138
+ cachedStickyHeaders?: StickyHeader$1[]; /** Child regions (nested content areas) */
139
+ children: Region[];
140
+ /** Cursor position within this region */
141
+ cursorPosition?: {
142
+ col: number;
143
+ row: number;
144
+ };
145
+ height: number; /** Unique identifier for this region (used for dirty tracking) */
146
+ id: number | string;
147
+ isHorizontallyScrollable?: boolean; /** Whether this region supports scrolling */
148
+ isScrollable: boolean;
149
+ isVerticallyScrollable?: boolean; /** Content buffer — StyledLine per row, relative to (0,0) of this region */
150
+ readonly lines: ReadonlyArray<StyledLine>;
151
+ marginBottom?: number;
152
+ marginRight?: number; /** DOM node reference for debugging/caching */
153
+ nodeId?: number;
154
+ opaque?: boolean; /** Layout properties */
155
+ overflowToBackbuffer?: boolean;
156
+ scrollbarThumbColor?: string;
157
+ scrollbarVisible?: boolean;
158
+ scrollHeight?: number;
159
+ scrollLeft?: number; /** Scroll state */
160
+ scrollTop?: number;
161
+ scrollWidth?: number; /** Selectable text spans for text selection */
162
+ selectableSpans: SelectableSpan[];
163
+ selectableText?: string; /** Whether the scrollback position is stable */
164
+ stableScrollback?: boolean;
165
+ /** Sticky headers for this region */
166
+ stickyHeaders: StickyHeader$1[];
167
+ /** Trimmed output (trailing spaces removed) for final rendering */
168
+ readonly styledOutput: ReadonlyArray<StyledLine>;
169
+ /** Dimensions */
170
+ width: number;
171
+ /** Position relative to parent region */
172
+ x: number;
173
+ y: number;
174
+ };
175
+ type SelectableSpan = {
176
+ endX: number;
177
+ startX: number;
178
+ text: string;
179
+ y: number;
180
+ };
181
+ type StickyHeader$1 = {
182
+ /** Lines in the natural (scrolling) position */
183
+ lines: ReadonlyArray<StyledLine>;
184
+ /** Height of the header in lines */
185
+ maxHeaderHeight: number;
186
+ /** Natural row offset relative to content start */
187
+ naturalRow: number;
188
+ /** Node ID for identification */
189
+ nodeId: number;
190
+ /** Lines in the stuck (fixed) position */
191
+ stuckLines?: ReadonlyArray<StyledLine>;
192
+ /** Stuck X position relative to region */
193
+ x: number;
194
+ /** Stuck Y position relative to region */
195
+ y: number;
196
+ };
197
+ type OutputTransformer = (s: string, index: number) => string;
198
+ type ResizeObserverCallback = (entries: ResizeObserverEntry[], observer: ResizeObserver) => void;
199
+ declare class ResizeObserverEntry {
200
+ readonly target: DOMElement;
201
+ readonly contentRect: Readonly<{
202
+ height: number;
203
+ width: number;
204
+ }>;
205
+ constructor(target: DOMElement, contentRect: Readonly<{
206
+ height: number;
207
+ width: number;
208
+ }>);
209
+ }
210
+ declare class ResizeObserver {
211
+ private readonly callback;
212
+ private readonly observedElements;
213
+ constructor(callback: ResizeObserverCallback);
214
+ observe(element: DOMElement): void;
215
+ unobserve(element: DOMElement): void;
216
+ disconnect(): void;
217
+ /**
218
+ * Internal method called by the layout engine after computing layout.
219
+ */
220
+ internalTrigger(entries: ResizeObserverEntry[]): void;
221
+ }
222
+ /**
223
+ * Measure a node and collect resize observer entries for it.
224
+ * Used by both the main render loop and static render processing.
225
+ */
226
+ type ScrollState = {
227
+ actualScrollHeight: number;
228
+ clientHeight: number;
229
+ clientWidth: number;
230
+ scrollHeight: number;
231
+ scrollLeft: number;
232
+ scrollTop: number;
233
+ scrollWidth: number;
234
+ };
235
+ declare const getScrollHeight: (node: DOMElement) => number;
236
+ declare const getScrollWidth: (node: DOMElement) => number;
237
+ declare const calculateScroll: (node: DOMElement) => void;
238
+ /**
239
+ * Get the effective scroll top position from the pre-computed scroll state.
240
+ * Falls back to computing from style if scroll state hasn't been calculated yet.
241
+ */
242
+ declare const getScrollTop: (node: DOMElement) => number;
243
+ /**
244
+ * Get the effective scroll left position from the pre-computed scroll state.
245
+ * Falls back to computing from style if scroll state hasn't been calculated yet.
246
+ */
247
+ declare const getScrollLeft: (node: DOMElement) => number;
248
+ type InkNode = {
249
+ internal_static?: boolean;
250
+ parentNode: DOMElement | undefined;
251
+ style: Styles;
252
+ yogaNode?: Node;
253
+ };
254
+ type LayoutListener = () => void;
255
+ type TextName = "#text";
256
+ type ElementNames = "ink-root" | "ink-box" | "ink-text" | "ink-cursor" | "ink-virtual-text" | "ink-static-render";
257
+ /**
258
+ * Describes a sticky header that should be composited on top of scrolled content.
259
+ * Ported from jacob314/ink fork (Google LLC, Apache-2.0).
260
+ */
261
+ type StickyHeader = {
262
+ /** Content-relative end row. */
263
+ endRow: number;
264
+ /** Height in rows. */
265
+ height?: number;
266
+ /** If true, natural 'lines' are already in background content. */
267
+ isStuckOnly: boolean;
268
+ /** Lines rendered in the natural (scrolling) position. */
269
+ lines: ReadonlyArray<StyledLine>;
270
+ /** Natural row offset relative to content start. */
271
+ naturalRow: number;
272
+ /** Reference to the DOM node for this header. */
273
+ node?: DOMElement;
274
+ /** Unique ID of the sticky node. */
275
+ nodeId: number;
276
+ /** ID of the scroll container this header belongs to. */
277
+ scrollContainerId: number | string;
278
+ /** Content-relative start row. */
279
+ startRow: number;
280
+ /** Lines rendered in the stuck (pinned) position, if different. */
281
+ stuckLines?: ReadonlyArray<StyledLine>;
282
+ /** Sticky type: top-pinned or bottom-pinned. */
283
+ type?: "top" | "bottom";
284
+ /** Stuck X position relative to region. */
285
+ x: number;
286
+ /** Stuck Y position relative to region. */
287
+ y: number;
288
+ };
289
+ type NodeNames = ElementNames | TextName;
290
+ type CursorAnchorRef = {
291
+ readonly current: DOMElement | undefined | null;
292
+ };
293
+ type CursorMarker = {
294
+ anchorRef?: CursorAnchorRef;
295
+ inline?: boolean;
296
+ shape?: CursorShape;
297
+ x: number;
298
+ y: number;
299
+ };
300
+ type DOMElement = InkNode & {
301
+ attributes: Record<string, DOMNodeAttribute>;
302
+ /**
303
+ * Cached render result (a Region). When set, the entire subtree is
304
+ * skipped during rendering and the cached region is composited directly.
305
+ * Set by setCachedRender(), cleared on unmount by cleanupNodeTree().
306
+ */
307
+ cachedRender?: Region;
308
+ childNodes: DOMNode[];
309
+ internal_accessibility?: {
310
+ role?: "button" | "checkbox" | "combobox" | "list" | "listbox" | "listitem" | "menu" | "menuitem" | "option" | "progressbar" | "radio" | "radiogroup" | "tab" | "tablist" | "table" | "textbox" | "timer" | "toolbar";
311
+ state?: {
312
+ busy?: boolean;
313
+ checked?: boolean;
314
+ disabled?: boolean;
315
+ expanded?: boolean;
316
+ multiline?: boolean;
317
+ multiselectable?: boolean;
318
+ readonly?: boolean;
319
+ required?: boolean;
320
+ selected?: boolean;
321
+ };
322
+ };
323
+ internal_cursor?: CursorMarker;
324
+ internal_hidden?: boolean;
325
+ /**
326
+ * Auto-incrementing unique identifier for this node.
327
+ */
328
+ internal_id: number;
329
+ /**
330
+ * Whether this element's scrollback buffer is dirty (needs recalculation).
331
+ */
332
+ internal_isScrollbackDirty?: boolean;
333
+ /**
334
+ * Last measured size for ResizeObserver tracking.
335
+ */
336
+ internal_lastMeasuredSize?: {
337
+ height: number;
338
+ width: number;
339
+ };
340
+ internal_layoutListeners?: Set<LayoutListener>;
341
+ /**
342
+ * Highest scrollTop whose scrolled-off lines have already been flushed
343
+ * into the terminal's real scrollback history. Monotonic; used by the
344
+ * `overflowToBackbuffer` emission path so a given line is pushed exactly
345
+ * once and scrolling back up never re-emits.
346
+ */
347
+ internal_maxPushedScrollTop?: number;
348
+ /**
349
+ * Maximum scrollTop ever reached, used with stableScrollback.
350
+ */
351
+ internal_maxScrollTop?: number;
352
+ /**
353
+ * Callback invoked after prepareYogaTree() caches the render output for
354
+ * an ink-static-render node. StaticRender uses this to set `isRendered`
355
+ * state, which prevents React from re-reconciling children once cached.
356
+ */
357
+ internal_onRendered?: () => void;
358
+ /**
359
+ * Whether this element is opaque (prevents rendering of covered content beneath it).
360
+ */
361
+ internal_opaque?: boolean;
362
+ /**
363
+ * Whether the scrollbar should be rendered for this scrollable element.
364
+ * Defaults to true for elements with overflow: 'scroll'.
365
+ */
366
+ internal_scrollbar?: boolean;
367
+ /**
368
+ * Scroll state computed by calculateScroll() for elements with overflow: 'scroll'.
369
+ */
370
+ internal_scrollState?: ScrollState;
371
+ /**
372
+ * Whether this element is sticky (pinned during scroll).
373
+ * - `true` or `'top'`: pinned to the top of the scroll container
374
+ * - `'bottom'`: pinned to the bottom of the scroll container
375
+ */
376
+ internal_sticky?: boolean | "top" | "bottom";
377
+ /**
378
+ * Whether this element is the alternate (stuck) version of a sticky header.
379
+ * The stuck version is rendered when the header is pinned.
380
+ */
381
+ internal_stickyAlternate?: boolean;
382
+ /**
383
+ * Whether this element should receive the terminal cursor focus.
384
+ */
385
+ internal_terminalCursorFocus?: boolean;
386
+ /**
387
+ * Terminal cursor position offset within this element.
388
+ */
389
+ internal_terminalCursorPosition?: number;
390
+ /**
391
+ * Cached text squash result for this node's subtree.
392
+ * Invalidated by markNodeAsDirty() when children change.
393
+ */
394
+ internal_textCache?: {
395
+ map: Map<DOMNode, {
396
+ end: number;
397
+ start: number;
398
+ }>;
399
+ text: string;
400
+ };
401
+ internal_transform?: OutputTransformer;
402
+ isStaticDirty?: boolean;
403
+ /**
404
+ * Whether the Yoga subtree has been detached (children removed from Yoga layout)
405
+ * because a cachedRender was set. When cachedRender is invalidated,
406
+ * prepareYogaTree() re-attaches the children before the next layout pass.
407
+ */
408
+ isYogaTreeDetached?: boolean;
409
+ nodeName: ElementNames;
410
+ onComputeLayout?: () => void;
411
+ onImmediateRender?: () => void;
412
+ onRender?: () => void;
413
+ onStaticChange?: () => void;
414
+ /**
415
+ * Tracks the previous commit's `staticNode` so the reconciler can detect identity changes
416
+ * (first mount, last unmount, key-driven remount) and reset accumulated `fullStaticOutput`.
417
+ */
418
+ previousStaticNode?: DOMElement;
419
+ /**
420
+ * Set of ResizeObservers attached to this element.
421
+ */
422
+ resizeObservers?: Set<ResizeObserver>;
423
+ staticNode?: DOMElement;
424
+ };
425
+ type TextNode = InkNode & {
426
+ nodeName: TextName;
427
+ nodeValue: string;
428
+ };
429
+ type DOMNode<T = {
430
+ nodeName: NodeNames;
431
+ }> = T extends {
432
+ nodeName: infer U;
433
+ } ? U extends "#text" ? TextNode : DOMElement : never;
434
+ type DOMNodeAttribute = boolean | string | number;
435
+ /**
436
+ * Get the path from the root to this node (inclusive).
437
+ * Returns an array starting with the root and ending with the node.
438
+ *
439
+ * Ported from jacob314/ink fork (Google LLC, Apache-2.0).
440
+ */
441
+ declare const getPathToRoot: (node: DOMNode) => DOMNode[];
442
+ /**
443
+ * Check if a node is selectable by walking up the tree checking `userSelect` style.
444
+ * Returns true by default unless an ancestor has `userSelect: 'none'`.
445
+ *
446
+ * Ported from jacob314/ink fork (Google LLC, Apache-2.0).
447
+ */
448
+ declare const isNodeSelectable: (node: DOMElement) => boolean;
449
+ export { DOMElement as D, ResizeObserver as R, StyledLine as S, DOMNode as a, ResizeObserverCallback as b, ResizeObserverEntry as c, ScrollState as d, StickyHeader as e, calculateScroll as f, getPathToRoot as g, getScrollHeight as h, getScrollLeft as i, getScrollTop as j, getScrollWidth as k, isNodeSelectable as l };
@@ -0,0 +1 @@
1
+ function S(o){const t=Math.max(0,Math.floor(o/1e3)),a=Math.floor(t/3600),r=Math.floor(t%3600/60),n=t%60;return a>0?`${String(a).padStart(2,"0")}:${String(r).padStart(2,"0")}:${String(n).padStart(2,"0")}`:`${String(r).padStart(2,"0")}:${String(n).padStart(2,"0")}`}export{S as f};
@@ -1 +1 @@
1
- import"yoga-layout";import"./measure-text-DDjHT1jD.js";import"./squashTextNodesWithMap-Cpqmc45i.js";import{a as r,d,c as i,f as m,e as N,g as l,b as p,i as c,m as h,r as n,j as u,k as y,h as L,s as b}from"./dom-4y__5fWB.js";export{r as addLayoutListener,d as appendChildNode,i as createNode,m as createTextNode,N as emitLayoutListeners,l as getPathToRoot,p as insertBeforeNode,c as isNodeSelectable,h as markNodeAsDirty,n as removeChildNode,u as setAttribute,y as setCachedRender,L as setStyle,b as setTextNodeValue};
1
+ import"yoga-layout";import"./measure-text-B7juNq4Y.js";import"./squashTextNodesWithMap-BmUSBPfc.js";import{a as r,d,c as i,f as m,e as N,g as l,b as p,i as c,m as h,r as n,j as u,k as y,h as L,s as b}from"./dom-rphpG0kf.js";export{r as addLayoutListener,d as appendChildNode,i as createNode,m as createTextNode,N as emitLayoutListeners,l as getPathToRoot,p as insertBeforeNode,c as isNodeSelectable,h as markNodeAsDirty,n as removeChildNode,u as setAttribute,y as setCachedRender,L as setStyle,b as setTextNodeValue};
@@ -0,0 +1 @@
1
+ const e=/^[a-z]$/i,n=r=>{const t=r.codePointAt(0);return t!==void 0&&(t<32||t===127)},o=(r,t)=>r.length===0||n(r)?!1:t.ctrl&&t.meta?!e.test(r):!(t.ctrl||t.meta);export{o as i};
@@ -1,4 +1,4 @@
1
- import EventEmitter from 'eventemitter3';
1
+ import { EventEmitter } from 'tseep';
2
2
  declare class TuiApp extends EventEmitter {
3
3
  private renderer;
4
4
  private terminal;
@@ -0,0 +1 @@
1
+ const n=({element:e,mouse:{x:t,y:o}})=>{const s=t<e.left||t>=e.left+e.width,l=o<e.top||o>=e.top+e.height;return!s&&!l};export{n as default};
@@ -0,0 +1 @@
1
+ const u=e=>{const r=/rgb:([\da-f]{2,4})\/([\da-f]{2,4})\/([\da-f]{2,4})/i.exec(e);if(!r)return null;const n=s=>s.length<=2?s.padStart(2,"0"):s.slice(0,2);return`#${n(r[1])}${n(r[2])}${n(r[3])}`},d=()=>{const e=process.env.TERM_PROGRAM??"";return new Set(["Alacritty","contour","foot","Ghostty","iTerm2","iTerm.app","kitty","rio","WezTerm"]).has(e)?!0:(process.env.TERM??"").startsWith("xterm")||!!process.env.WT_SESSION},f=(e,r,n,s=500)=>new Promise(a=>{let o="",i;const c=()=>{i&&clearTimeout(i),e.removeListener("data",t)},t=l=>{if(o+=l.toString(),o.length>256){c(),a(null);return}(o.includes("\x07")||o.includes("\x1B\\"))&&(c(),a(o))};i=setTimeout(()=>{c(),a(null)},s),e.on("data",t),r.write(n)}),m=async(e,r,n=500)=>{const s={},a=await f(e,r,"\x1B]10;?\x07",n);if(a){const t=u(a);t&&(s.foreground=t)}const o=await f(e,r,"\x1B]11;?\x07",n);if(o){const t=u(o);t&&(s.background=t)}const i=await f(e,r,"\x1B]12;?\x07",n);if(i){const t=u(i);t&&(s.cursor=t)}const c=[];for(let t=0;t<16;t++){const l=await f(e,r,`\x1B]4;${t};?\x07`,n);if(l){const x=u(l);c.push(x??"")}else c.push("")}return c.some(t=>t.length>0)&&(s.colors=c),s};export{d as isTerminalPaletteQuerySupported,m as queryTerminalPalette};
@@ -0,0 +1 @@
1
+ const o={disambiguateEscapeCodes:1,reportAllKeysAsEscapeCodes:8,reportAlternateKeys:4,reportAssociatedText:16,reportEventTypes:2};function r(t){let e=0;for(const s of t)e|=o[s];return e}const a={alt:2,capsLock:64,ctrl:4,hyper:16,meta:32,numLock:128,shift:1,super:8};export{o as kittyFlags,a as kittyModifiers,r as resolveFlags};
@@ -0,0 +1 @@
1
+ import{jsxs as N,jsx as I}from"react/jsx-runtime";import{useMemo as u}from"react";import{c as d}from"./braille-ch3O5D7I.js";import{Box as h}from"../components/box.js";import{Canvas as f}from"../components/canvas.js";import{Text as y}from"../components/text.js";const T=["cyan","magenta","yellow","green","blue","red"],g=e=>e.length===0?[]:typeof e[0]=="number"?e.map((o,t)=>({x:t,y:o})):e,E=(e,o,t)=>e.color??t[o%t.length]??"cyan",b=e=>{let o=Number.POSITIVE_INFINITY,t=Number.NEGATIVE_INFINITY,r=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY;for(const{points:x}of e)for(const n of x)n.x<o&&(o=n.x),n.x>t&&(t=n.x),n.y<r&&(r=n.y),n.y>s&&(s=n.y);return{xMax:t,xMin:o,yMax:s,yMin:r}},Y=T,M=(e,o,t,r)=>{const s=o.xMax-o.xMin||1,x=o.yMax-o.yMin||1,n=(e.x-o.xMin)/s,c=(e.y-o.yMin)/x;return{px:Math.max(0,Math.min(t-1,Math.round(n*(t-1)))),py:Math.max(0,Math.min(r-1,Math.round((1-c)*(r-1))))}},_=(e,o,t)=>{e.clear();const{axisColor:r,seriesList:s}=t,x=Math.max(1,e.width*2),n=Math.max(1,e.height*4);for(let c=0;c<e.width;c+=2)e.setCell(c,e.height-1,"·",{color:r,dim:!0});for(const{color:c,points:m}of s){if(m.length===0)continue;const l=d(e.width,e.height);if(o==="scatter")for(const i of m){const a=M(i,t,x,n);l.plotPoint(a.px,a.py)}else{let i=M(m[0],t,x,n);l.plotPoint(i.px,i.py);for(let a=1;a<m.length;a+=1){const p=M(m[a],t,x,n);l.plotLine(i.px,i.py,p.px,p.py),i=p}}l.flush(e,{color:c})}};function L({axisColor:e="gray",height:o=10,maxY:t,minY:r,palette:s=Y,series:x,showLegend:n=!0,width:c=40}){const m=u(()=>{const l=x.map((a,p)=>({color:E(a,p,s),points:g(a.data),series:a})),i=b(l);return{axisColor:e,palette:s,seriesList:l,xMax:i.xMax===Number.NEGATIVE_INFINITY?1:i.xMax,xMin:i.xMin===Number.POSITIVE_INFINITY?0:i.xMin,yMax:t??(i.yMax===Number.NEGATIVE_INFINITY?1:i.yMax),yMin:r??(i.yMin===Number.POSITIVE_INFINITY?0:i.yMin)}},[x,e,s,r,t]);return N(h,{flexDirection:"column",children:[I(f,{draw:l=>{_(l,"line",m)},height:o,version:[x,c,o,r,t,e,s],width:c}),n?I(h,{gap:2,marginTop:1,children:m.seriesList.map(({color:l,series:i},a)=>N(h,{gap:1,children:[I(y,{color:l,children:"●"}),I(y,{children:i.label??`Series ${a+1}`})]},`${a}:${i.label??""}`))}):void 0]})}export{T as D,M as a,b as c,_ as d,L as h,E as p,g as t};
@@ -0,0 +1 @@
1
+ import{createRequire as l}from"node:module";const f=l(import.meta.url),t=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,i=s=>{if(typeof t<"u"&&t.versions&&t.versions.node){const[e,n]=t.versions.node.split(".").map(Number);if(e>22||e===22&&n>=3||e===20&&n>=16)return t.getBuiltinModule(s)}return f(s)},{existsSync:u}=i("node:fs"),{createRequire:p}=i("node:module"),{dirname:a,join:r}=i("node:path"),{fileURLToPath:_}=i("node:url"),j=12,g=s=>{const e=p(s),n=a(_(s));let o=n;for(let c=0;c<j;c+=1){if(u(r(o,"package.json"))&&u(r(o,"index.js")))return e(r(o,"index.js"));const d=a(o);if(d===o)break;o=d}return e(r(n,"..","index.js"))};export{g as p};
@@ -0,0 +1 @@
1
+ import d from"yoga-layout";import{getScrollTop as P,getScrollLeft as R}from"./calculateScroll-D4Y_JR4H.js";import F from"./squashTextNodesWithMap-BmUSBPfc.js";const G=t=>{let e=t,o=0,n=0;for(;e?.parentNode;){if(!e.yogaNode)return;o+=e.yogaNode.getComputedLeft(),n+=e.yogaNode.getComputedTop(),e=e.parentNode}return{x:o,y:n}},W=t=>G(t),V=t=>{const e=G(t);if(!(!e||!t.yogaNode))return{x:e.x+t.yogaNode.getComputedBorder(d.EDGE_LEFT)+t.yogaNode.getComputedPadding(d.EDGE_LEFT),y:e.y+t.yogaNode.getComputedBorder(d.EDGE_TOP)+t.yogaNode.getComputedPadding(d.EDGE_TOP)}},z=t=>{const e=W(t);return{height:Math.round(t.yogaNode?.getComputedHeight()??0),width:Math.round(t.yogaNode?.getComputedWidth()??0),x:Math.round(e?.x??0),y:Math.round(e?.y??0)}},A=t=>{const{yogaNode:e}=t;if(!e)return 0;const o=e.getComputedWidth()??0,n=e.getComputedBorder(d.EDGE_LEFT),i=e.getComputedBorder(d.EDGE_RIGHT);return Math.round(o-n-i)},U=t=>{const{yogaNode:e}=t;if(!e)return 0;const o=e.getComputedHeight()??0,n=e.getComputedBorder(d.EDGE_TOP),i=e.getComputedBorder(d.EDGE_BOTTOM);return Math.round(o-n-i)},S=t=>{const{yogaNode:e}=t;if(!e)return{height:0,width:0,x:0,y:0};const o=e.getComputedWidth()??0,n=e.getComputedHeight()??0;let i=e.getComputedLeft(),r=e.getComputedTop(),a=t.parentNode;for(;a?.yogaNode;){if(i+=a.yogaNode.getComputedLeft(),r+=a.yogaNode.getComputedTop(),a.nodeName==="ink-box"){const l=a.style.overflow??"visible",s=a.style.overflowX??l;(a.style.overflowY??l)==="scroll"&&(r-=P(a)),s==="scroll"&&(i-=R(a))}a=a.parentNode}return{height:Math.round(n),width:Math.round(o),x:Math.round(i),y:Math.round(r)}},j=t=>{const e=t.internal_scrollState?.scrollHeight??0,o=t.internal_scrollState?.actualScrollHeight??0;return Math.max(0,e-o)},H=t=>{const{axis:e,clientDimension:o,scrollbarDimension:n,scrollDimension:i,scrollPosition:r}=t,a=n*2,l=Math.max(e==="vertical"?2:1,Math.round(o/i*a)),s=i-o,h=a-l,g=s>0?Math.round(r/s*h):0,u=g,m=g+l,c=Math.floor(u/2);return{endIndex:Math.min(n,Math.ceil(m/2)),startIndex:c,thumbEndHalf:m,thumbStartHalf:u}},b=t=>{const{axis:e,clientDimension:o,hasOppositeScrollbar:n,height:i,marginBottom:r,marginRight:a,scrollDimension:l,scrollPosition:s,width:h,x:g,y:u}=t;if(l<=o)return;if(e==="vertical"){const{endIndex:N,startIndex:x,thumbEndHalf:T,thumbStartHalf:_}=H({axis:e,clientDimension:o,scrollbarDimension:i,scrollDimension:l,scrollPosition:s}),E=g+h-1-a;return{height:i,thumb:{end:N,endHalf:T,height:N-x,start:x,startHalf:_,width:1,x:E,y:u+x},width:1,x:E,y:u}}const m=h-(n?1:0),{endIndex:c,startIndex:p,thumbEndHalf:C,thumbStartHalf:y}=H({axis:e,clientDimension:o,scrollbarDimension:m,scrollDimension:l,scrollPosition:s}),D=u+i-1-r;return{height:1,thumb:{end:c,endHalf:C,height:1,start:p,startHalf:y,width:c-p,x:g+p,y:D},width:m,x:g,y:D}},q=(t,e)=>{const{yogaNode:o}=t;if(!o)return;const n=t.style.overflow??"visible";if((t.style.overflowY??n)!=="scroll")return;const i=t.internal_scrollState?.clientHeight??0,r=t.internal_scrollState?.scrollHeight??0;if(r<=i)return;const{x:a,y:l}=e??S(t),s=o.getComputedHeight()-o.getComputedBorder(d.EDGE_TOP)-o.getComputedBorder(d.EDGE_BOTTOM);return b({axis:"vertical",clientDimension:i,hasOppositeScrollbar:!1,height:s,marginBottom:o.getComputedBorder(d.EDGE_BOTTOM),marginRight:o.getComputedBorder(d.EDGE_RIGHT),scrollDimension:r,scrollPosition:t.internal_scrollState?.scrollTop??0,width:o.getComputedWidth()-o.getComputedBorder(d.EDGE_LEFT),x:a+o.getComputedBorder(d.EDGE_LEFT),y:l+o.getComputedBorder(d.EDGE_TOP)})},J=(t,e)=>{const{yogaNode:o}=t;if(!o)return;const n=t.style.overflow??"visible";if((t.style.overflowX??n)!=="scroll")return;const i=t.internal_scrollState?.clientWidth??0,r=t.internal_scrollState?.scrollWidth??0;if(r<=i)return;const{x:a,y:l}=e??S(t),s=t.style.overflowY??n,h=t.internal_scrollState?.clientHeight??0,g=t.internal_scrollState?.scrollHeight??0,u=s==="scroll"&&g>h;return b({axis:"horizontal",clientDimension:i,hasOppositeScrollbar:u,height:o.getComputedHeight()-o.getComputedBorder(d.EDGE_TOP),marginBottom:o.getComputedBorder(d.EDGE_BOTTOM),marginRight:o.getComputedBorder(d.EDGE_RIGHT),scrollDimension:r,scrollPosition:t.internal_scrollState?.scrollLeft??0,width:o.getComputedWidth()-o.getComputedBorder(d.EDGE_LEFT)-o.getComputedBorder(d.EDGE_RIGHT),x:a+o.getComputedBorder(d.EDGE_LEFT),y:l+o.getComputedBorder(d.EDGE_TOP)})},K=(t,e)=>{if(!t.yogaNode||t===e)return 0;let o=t.yogaNode.getComputedTop(),n=t.parentNode;for(;n&&n!==e;)n.yogaNode&&(o+=n.yogaNode.getComputedTop()),n=n.parentNode;if(!(e!==void 0&&n!==e))return Math.round(o)},Q=(t,e)=>{if(!t.yogaNode||t===e)return 0;let o=t.yogaNode.getComputedLeft(),n=t.parentNode;for(;n&&n!==e;)n.yogaNode&&(o+=n.yogaNode.getComputedLeft()),n=n.parentNode;if(!(e!==void 0&&n!==e))return Math.round(o)},k=t=>t.nodeName==="#text"?t.nodeValue:t.nodeName==="ink-text"||t.nodeName==="ink-virtual-text"?F(t):"",Z=t=>{const e=[],o=(r,a,l)=>{const{visualX:s,visualY:h,x:g,y:u}=a;let m=0,c=0,p=l;const{userSelect:C}=r.style;if(C==="none"?p=!1:(C==="text"||C==="all")&&(p=!0),r.nodeName==="ink-text"||r.nodeName==="ink-virtual-text"){if(p){const y=k(r);return e.push({height:Math.round(r.yogaNode?.getComputedHeight()??0),node:r,text:y,visualX:Math.round(s),visualY:Math.round(h),width:Math.round(r.yogaNode?.getComputedWidth()??0),x:Math.round(g),y:Math.round(u)}),{h:0,hasContent:!0,v:0}}return{h:r.yogaNode?.getComputedWidth()??0,hasContent:!1,v:r.yogaNode?.getComputedHeight()??0}}if(r.nodeName==="ink-box"||r.nodeName==="ink-root"){if(!r.yogaNode||r.yogaNode.getDisplay()===d.DISPLAY_NONE)return{h:0,hasContent:!1,v:0};const y=r.yogaNode.getComputedBorder(d.EDGE_TOP),D=r.yogaNode.getComputedBorder(d.EDGE_BOTTOM),N=r.yogaNode.getComputedBorder(d.EDGE_LEFT),x=r.yogaNode.getComputedBorder(d.EDGE_RIGHT);m+=y+D,c+=N+x;const T=r.yogaNode.getFlexDirection(),_=T===d.FLEX_DIRECTION_COLUMN||T===d.FLEX_DIRECTION_COLUMN_REVERSE;let E=0,v=0,M=!1;for(const f of r.childNodes)if(f.yogaNode){const O=g+f.yogaNode.getComputedLeft()-N-E,L=u+f.yogaNode.getComputedTop()-y-v,w=s+f.yogaNode.getComputedLeft(),I=h+f.yogaNode.getComputedTop(),B=o(f,{visualX:w,visualY:I,x:O,y:L},p);B.hasContent&&(M=!0),_?v+=B.v:E+=B.h}return _?m+=v:c+=E,{h:c,hasContent:M,v:m}}return{h:0,hasContent:!1,v:0}},{h:n,v:i}=o(t,{visualX:0,visualY:0,x:0,y:0},!0);return e.sort((r,a)=>r.y!==a.y?r.y-a.y:r.x-a.x),{fragments:e,removedHorizontal:Math.round(n),removedVertical:Math.round(i)}};export{z as R,H as a,Z as b,b as c,S as d,J as e,U as f,j as g,A as h,Q as i,K as j,k,q as l,V as u};
@@ -0,0 +1,3 @@
1
+ import{isFullwidthCodePoint as G,getStringWidth as q}from"@visulima/string";import{t as J}from"./ansi-tokenizer-BU67A126.js";let N=class{map;maxDataSize;maxKeys;currentDataSize=0;constructor(t,e){this.map=new Map,this.maxKeys=t,this.maxDataSize=e}get size(){return this.map.size}clear(){this.map.clear(),this.currentDataSize=0}get(t){if(!this.map.has(t))return;const e=this.map.get(t);return this.map.delete(t),this.map.set(t,e),e}set(t,e){const s=t.length;if(!(s>this.maxDataSize)){for(this.map.has(t)&&(this.map.delete(t),this.currentDataSize-=s);this.currentDataSize+s>this.maxDataSize&&this.map.size>0;){const n=this.map.keys().next().value;if(n===void 0)break;this.map.delete(n),this.currentDataSize-=n.length}for(;this.map.size>=this.maxKeys;){const n=this.map.keys().next().value;if(n===void 0)break;this.map.delete(n),this.currentDataSize-=n.length}this.map.set(t,e),this.currentDataSize+=s}}};const Q=1,X=2,K=4,E=8,O=16,A=32,R=64,x=128,d=1073741823,k=1073741824;class m{length=0;static emptyCache=new Map;text;charData;spans;_cachedTrimmedLength;static empty(t){if(t<=0)return new m;const e=m.emptyCache.get(t);if(e)return e.clone();const s=new m;s.length=t,s.text=" ".repeat(t),s.charData=Array.from({length:t});for(let n=0;n<t;n++)s.charData[n]=n;return s.spans=[{formatFlags:0,length:t}],s._cachedTrimmedLength=0,Object.freeze(s.spans[0]),Object.freeze(s.spans),Object.freeze(s),m.emptyCache.set(t,s),s.clone()}getValue(t){if(this.text===void 0||t<0||t>=this.length)return"";const e=this.charData[t]&d,s=t+1<this.length?this.charData[t+1]&d:this.text.length;return this.text.slice(e,s)}getTextRange(t,e){if(this.text===void 0||t<0||e>this.length||t>=e)return"";const s=this.charData[t]&d,n=e<this.length?this.charData[e]&d:this.text.length;return this.text.slice(s,n)}getSpan(t){if(this.spans===void 0||t<0||t>=this.length)return;let e=0;for(const s of this.spans){if(t<e+s.length)return s;e+=s.length}}getFullWidth(t){return this.charData===void 0||t<0||t>=this.length?!1:(this.charData[t]&k)!==0}hasStyles(t){const e=this.getSpan(t);return e?(e.formatFlags&~x)!==0||e.fgColor!==void 0||e.bgColor!==void 0||e.link!==void 0:!1}getFormatFlags(t){let e=this.getSpan(t)?.formatFlags??0;return this.getFullWidth(t)&&(e|=x),e}getFgColor(t){return this.getSpan(t)?.fgColor}getBgColor(t){return this.getSpan(t)?.bgColor}getLink(t){return this.getSpan(t)?.link}setInverted(t,e){this._cachedTrimmedLength=void 0,this.updateSpanAt(t,s=>{e?s.formatFlags|=A:s.formatFlags&=~A})}setBackgroundColor(t,e){this._cachedTrimmedLength=void 0,this.updateSpanAt(t,s=>{s.bgColor=e})}setForegroundColor(t,e){this._cachedTrimmedLength=void 0,this.updateSpanAt(t,s=>{s.fgColor=e})}setChar(t,e,s,n,a,h){if(t<0||t>=this.length)return;this._cachedTrimmedLength=void 0,this.ensureInitialized();const i=(s&x)!==0,o=s&~x,l=this.charData[t]&d,c=t+1<this.length?this.charData[t+1]&d:this.text.length,p=c-l,b=e.length;if(this.text=this.text.slice(0,l)+e+this.text.slice(c),p!==b){const f=b-p;for(let C=t+1;C<this.length;C++){const S=this.charData[C],F=S&d,T=S&k;this.charData[C]=F+f|T}}if(this.charData[t]=l|(i?k:0),this.trySetStyleAtIndex(t,o,n,a,h))return;this.splitSpansAt(t),this.splitSpansAt(t+1);let u=0;for(let f=0;f<this.spans.length;f++){const C=this.spans[f];if(u===t&&C.length===1){this.spans[f]={bgColor:a,fgColor:n,formatFlags:o,length:1,link:h};break}u+=C.length}this.mergeSpans()}setCharFast(t,e,s,n,a,h){if(t<0||t>=this.length)return;this._cachedTrimmedLength=void 0,this.ensureInitialized();const i=(s&x)!==0,o=s&~x,l=this.charData[t]&d,c=t+1<this.length?this.charData[t+1]&d:this.text.length,p=c-l;if(e.length===p)e!==this.text.slice(l,c)&&(this.text=this.text.slice(0,l)+e+this.text.slice(c)),this.charData[t]=l|(i?k:0);else{if(this.text=this.text.slice(0,l)+e+this.text.slice(c),p!==e.length){const u=e.length-p;for(let f=t+1;f<this.length;f++){const C=this.charData[f];this.charData[f]=(C&d)+u|C&k}}this.charData[t]=l|(i?k:0)}if(this.trySetStyleAtIndex(t,o,n,a,h))return;this.splitSpansAt(t),this.splitSpansAt(t+1);let b=0;for(let u=0;u<this.spans.length;u++){const f=this.spans[u];if(b===t&&f.length===1){this.spans[u]={bgColor:a,fgColor:n,formatFlags:o,length:1,link:h};break}b+=f.length}this.mergeSpans()}writeFrom(t,e,s=0,n){const a=n??e.length-s;if(a<=0||t>=this.length)return;this._cachedTrimmedLength=void 0,this.ensureInitialized();const h=Math.min(a,this.length-t,e.length-s),i=this.charData[t]&d,o=t+h<this.length?this.charData[t+h]&d:this.text.length;let l="";for(let g=0;g<h;g++)l+=e.getValue(s+g);const c=o-i,p=l.length-c;this.text=this.text.slice(0,i)+l+this.text.slice(o);let b=i;for(let g=0;g<h;g++){const D=e.getFullWidth(s+g);this.charData[t+g]=b|(D?k:0),b+=e.getValue(s+g).length}if(p!==0)for(let g=t+h;g<this.length;g++){const D=this.charData[g];this.charData[g]=(D&d)+p|D&k}this.splitSpansAt(t),this.splitSpansAt(t+h);const u=[];let f=0;for(const g of e.getSpans()){const D=f+g.length,$=Math.max(s,f),W=Math.min(s+h,D);if($<W&&u.push({...g,length:W-$}),f=D,f>=s+h)break}let C=0,S=0;for(let g=0;g<this.spans.length;g++){if(S===t){C=g;break}S+=this.spans[g].length}let F=0,T=0;for(let g=C;g<this.spans.length&&T<h;g++)T+=this.spans[g].length,F++;this.spans.splice(C,F,...u),this.mergeSpans()}pushChar(t,e,s,n,a){this._cachedTrimmedLength=void 0,this.ensureInitialized();const h=(e&x)!==0,i=e&~x,o=this.text.length;this.text=(this.text??"")+t,this.charData.push(o|(h?k:0));const l=this.spans.at(-1);l?.formatFlags===i&&l.fgColor===s&&l.bgColor===n&&l.link===a?l.length++:this.spans.push({bgColor:n,fgColor:s,formatFlags:i,length:1,link:a}),this.length++}clone(){if(this.charData===void 0)return new m;const t=new m;return t.length=this.length,t.text=this.text,t.charData=[...this.charData],t.spans=this.spans.map(e=>({...e})),t._cachedTrimmedLength=this._cachedTrimmedLength,t}slice(t,e){if(this.charData===void 0)return new m;const s=Math.max(0,t),n=e===void 0?this.length:Math.min(this.length,e);if(s>=n)return new m;if(s===0&&n===this.length)return this.clone();const a=new m;a.length=n-s,a.charData=Array.from({length:a.length});const h=this.charData[s]&d,i=n<this.length?this.charData[n]&d:this.text.length;a.text=this.text.slice(h,i);for(let c=0;c<a.length;c++){const p=this.charData[s+c],b=p&d,u=p&k;a.charData[c]=b-h|u}const o=[];let l=0;for(const c of this.spans){const p=l,b=l+c.length,u=Math.max(s,p),f=Math.min(n,b);if(u<f&&o.push({...c,length:f-u}),l+=c.length,l>=n)break}return a.spans=o,a.mergeSpans(),a}combine(...t){if(t.length===0)return this.clone();const e=[this,...t].filter(i=>i.length>0);if(e.length===0)return new m;if(e.length===1)return e[0].clone();let s=0;for(const i of e)s+=i.length;const n=new m;n.length=s,n.text=e.map(i=>i.getText()).join(""),n.charData=Array.from({length:s});let a=0,h=0;for(const i of e){const o=i.charData,l=i.getText();if(o)for(let c=0;c<i.length;c++){const p=o[c],b=p&d,u=p&k;n.charData[a+c]=h+b|u}else for(let c=0;c<i.length;c++)n.charData[a+c]=h+c;a+=i.length,h+=l.length}return n.spans=e.flatMap(i=>i.getSpans().map(o=>({...o}))),n.mergeSpans(),n}getTrimmedLength(){if(this._cachedTrimmedLength!==void 0)return this._cachedTrimmedLength;if(this.length===0)return this._cachedTrimmedLength=0,0;if(this.text===void 0||this.charData===void 0)return this._cachedTrimmedLength=0,0;let t=this.length-1;if(this.spans)for(let e=this.spans.length-1;e>=0;e--){const s=this.spans[e];if((s.formatFlags&~x)!==0||s.fgColor!==void 0||s.bgColor!==void 0||s.link!==void 0)return this._cachedTrimmedLength=t+1,this._cachedTrimmedLength;for(let n=0;n<s.length;n++){const a=this.charData[t]&d;if((t+1<this.length?this.charData[t+1]&d:this.text.length)-a!==1||this.text[a]!==" ")return this._cachedTrimmedLength=t+1,this._cachedTrimmedLength;t--}}return this._cachedTrimmedLength=0,0}trimEnd(){const t=this.getTrimmedLength();return t===this.length?this:t===0?new m:this.slice(0,t)}equals(t){if(this.length!==t.length)return!1;if(this.length===0)return!0;if(this.getText()!==t.getText())return!1;const e=this.getSpans(),s=t.getSpans();if(e.length!==s.length)return!1;for(const[h,i]of e.entries()){const o=i,l=s[h];if(o.length!==l.length||o.formatFlags!==l.formatFlags||o.fgColor!==l.fgColor||o.bgColor!==l.bgColor||o.link!==l.link)return!1}const n=this.charData,a=t.charData;if(n&&a){for(let h=0;h<this.length;h++)if(n[h]!==a[h])return!1}return!0}getText(){return this.text??""}getSpans(){return this.spans??[]}getValues(){return Array.from({length:this.length},(t,e)=>this.getValue(e))}*[Symbol.iterator](){if(this.length===0)return;let t=0,e=0;const s=this.getSpans();for(let n=0;n<this.length;n++){const a=s[t],h=a?a.formatFlags:0,i=this.getFullWidth(n);yield{bgColor:a?.bgColor,fgColor:a?.fgColor,formatFlags:h|(i?x:0),fullWidth:i,hasStyles:(h&~x)!==0||a?.fgColor!==void 0||a?.bgColor!==void 0||a?.link!==void 0,link:a?.link,value:this.getValue(n)},a&&(e++,e>=a.length&&(t++,e=0))}}updateSpanAt(t,e){if(t<0||t>=this.length)return;this.ensureInitialized(),this.splitSpansAt(t),this.splitSpansAt(t+1);let s=0;for(const n of this.spans){if(s===t&&n.length===1){e(n);break}s+=n.length}this.mergeSpans()}ensureWidth(t){if(t<=this.length)return;this.ensureInitialized();const e=this.length,s=t-e,n=this.text.length;for(let h=0;h<s;h++)this.charData.push(n);this.length=t;const a=this.spans.at(-1);a?.formatFlags===0&&a.fgColor===void 0&&a.bgColor===void 0&&a.link===void 0?a.length+=s:this.spans.push({formatFlags:0,length:s})}ensureInitialized(){if(this.charData===void 0&&(this.text="",this.charData=Array.from({length:this.length}),this.spans=this.length>0?[{formatFlags:0,length:this.length}]:[],this.length>0&&this.text.length===0)){this.text=" ".repeat(this.length);for(let t=0;t<this.length;t++)this.charData[t]=t}}splitSpansAt(t){if(this.spans===void 0||t<=0||t>=this.length)return;let e=0;for(let s=0;s<this.spans.length;s++){const n=this.spans[s];if(t>e&&t<e+n.length){const a=t-e,h=n.length-a;this.spans.splice(s,1,{...n,length:a},{...n,length:h});return}e+=n.length}}trySetStyleAtIndex(t,e,s,n,a){if(!this.spans)return!1;let h=0,i=-1,o;for(let l=0;l<this.spans.length;l++){const c=this.spans[l];if(h<=t&&h+c.length>t){i=l,o=c;break}h+=c.length}if(!o)return!1;if(o.formatFlags===e&&o.fgColor===s&&o.bgColor===n&&o.link===a)return!0;if(t===h&&i>0){const l=this.spans[i-1];if(l.formatFlags===e&&l.fgColor===s&&l.bgColor===n&&l.link===a)return l.length+=1,o.length===1?this.spans.splice(i,1):o.length-=1,!0}if(t===h+o.length-1&&i<this.spans.length-1){const l=this.spans[i+1];if(l.formatFlags===e&&l.fgColor===s&&l.bgColor===n&&l.link===a)return l.length+=1,o.length===1?this.spans.splice(i,1):o.length-=1,!0}return!1}mergeSpans(){if(this.spans===void 0)return;const t=[];for(const e of this.spans){if(e.length===0)continue;const s=t.at(-1);s?.formatFlags===e.formatFlags&&s.fgColor===e.fgColor&&s.bgColor===e.bgColor&&s.link===e.link?s.length+=e.length:t.push({...e})}this.spans=t}}const V={black:0,blue:4,cyan:6,gray:8,green:2,grey:8,magenta:5,red:1,white:7,yellow:3},P={blackBright:8,blueBright:12,cyanBright:14,greenBright:10,magentaBright:13,redBright:9,whiteBright:15,yellowBright:11},H=/^ansi256\(\s?(\d+)\s?\)$/,j=/^rgb\(\s?(\d+),\s?(\d+),\s?(\d+)\s?\)$/,xt=r=>{const t=V[r];if(t!==void 0)return t;const e=P[r];if(e!==void 0)return e;const s=H.exec(r);if(s)return Number(s[1])&255;if(r.startsWith("#")&&r.length===7){const a=Number.parseInt(r.slice(1,3),16),h=Number.parseInt(r.slice(3,5),16),i=Number.parseInt(r.slice(5,7),16);return 16+36*Math.round(a/51)+6*Math.round(h/51)+Math.round(i/51)}const n=j.exec(r);return n?16+36*Math.round(Number(n[1])/51)+6*Math.round(Number(n[2])/51)+Math.round(Number(n[3])/51):255},kt=(r,t)=>{const e=t?30:40,s=V[r];if(s!==void 0)return[e+s];const n=P[r];if(n!==void 0)return[e+60+(n-8)];if(r.startsWith("#")&&r.length===7){const i=Number.parseInt(r.slice(1,3),16),o=Number.parseInt(r.slice(3,5),16),l=Number.parseInt(r.slice(5,7),16);return[t?38:48,2,i,o,l]}const a=H.exec(r);if(a)return[t?38:48,5,Number(a[1])];const h=j.exec(r);return h?[t?38:48,2,Number(h[1]),Number(h[2]),Number(h[3])]:[]},w=r=>{const t=["black","red","green","yellow","blue","magenta","cyan","white"];return r>=0&&r<=7?t[r]:`ansi256(${r})`},_=()=>({bgColor:void 0,fgColor:void 0,formatFlags:0,link:void 0}),Y=(r,t)=>{if(t.length===0)return _();const e=(t.includes(":")?t.replaceAll(":",";"):t).split(";").filter(o=>o.length>0).map(Number);let{bgColor:s,fgColor:n,formatFlags:a,link:h}=r,i=0;for(;i<e.length;){const o=e[i];switch(o){case 0:{a=0,n=void 0,s=void 0,h=void 0;break}case 1:{a|=Q;break}case 2:{a|=X;break}case 3:{a|=K;break}case 4:{a|=E;break}case 7:{a|=A;break}case 8:{a|=R;break}case 9:{a|=O;break}case 22:{a&=-4;break}case 23:{a&=~K;break}case 24:{a&=~E;break}case 27:{a&=~A;break}case 28:{a&=~R;break}case 29:{a&=~O;break}case 30:case 31:case 32:case 33:case 34:case 35:case 36:case 37:{n=w(o-30);break}case 38:{e[i+1]===5&&e[i+2]!==void 0?(n=w(e[i+2]),i+=2):e[i+1]===2&&i+4<e.length&&(n=`rgb(${e[i+2]}, ${e[i+3]}, ${e[i+4]})`,i+=4);break}case 39:{n=void 0;break}case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:{s=w(o-40);break}case 48:{e[i+1]===5&&e[i+2]!==void 0?(s=w(e[i+2]),i+=2):e[i+1]===2&&i+4<e.length&&(s=`rgb(${e[i+2]}, ${e[i+3]}, ${e[i+4]})`,i+=4);break}case 49:{s=void 0;break}case 90:case 91:case 92:case 93:case 94:case 95:case 96:case 97:{n=`ansi256(${o-90+8})`;break}case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:{s=`ansi256(${o-100+8})`;break}}i++}return{bgColor:s,fgColor:n,formatFlags:a,link:h}},y=127462,L=127487,Z=127995,tt=127999,et=8205,st=917504,nt=917631,at=new RegExp("\\p{Mark}","u"),rt=new Intl.Segmenter(void 0,{granularity:"grapheme"}),it=(r,t)=>!!(G(t)||r.includes("️")||t>=y&&t<=L),ht=/(?:\u001B\]|\u009D)8;([^;]*);(.*?)(?:\u001B\\|\u0007|\u009C)/,lt=r=>{const t=ht.exec(r);return!t?.[2]||t[2].length===0?void 0:r.endsWith("\x1B\\")?`ST:${t[2]}`:t[2]},U=(r,t,e)=>{const s=rt.segment(r),n=[];for(const{segment:a}of s)n.push(a);for(let a=0;a<n.length;a++){let h=n[a];if(h===" "){for(let l=0;l<4;l++)t.pushChar(" ",e.formatFlags,e.fgColor,e.bgColor,e.link);continue}if(h==="\b")continue;const i=h.codePointAt(0);if(!i)continue;if(i>=y&&i<=L&&a+1<n.length){const l=n[a+1],c=l.codePointAt(0);c&&c>=y&&c<=L&&(h+=l,a++)}else for(;a+1<n.length;){const l=n[a+1],c=l.codePointAt(0);if(!c)break;const p=at.test(String.fromCodePoint(c)),b=c>=Z&&c<=tt,u=c===et,f=c>=st&&c<=nt;if(!p&&!b&&!u&&!f)break;h+=l,a++,u&&a+1<n.length&&(h+=n[a+1],a++)}const o=it(h,i)?e.formatFlags|x:e.formatFlags;t.pushChar(h,o,e.fgColor,e.bgColor,e.link)}},ot=r=>{if(r.length===0)return new m;const t=J(r),e=new m;let s=_();for(const n of t)switch(n.type){case"csi":{n.finalCharacter==="m"&&(s=Y(s,n.parameterString));break}case"osc":{const a=lt(n.value);a!==void 0?s={...s,link:a}:n.value.includes("8;")&&(s={...s,link:void 0});break}case"text":{U(n.value,e,s);break}}return e},ct=/^[\u0020-\u007E]*$/,Dt=r=>{if(r.length===0)return new m;const t=new m;if(ct.test(r)){for(const e of r)t.pushChar(e,0);return t}return U(r,t,_()),t},I=new N(1e4,1e6),M=new N(1e4,1e6),v=new N(1e4,1e6);let z=!0,B=q;const St=r=>{z=r,r||v.clear()},vt=()=>{v.clear()},Ft=r=>{B=r,gt()},gt=()=>{I.clear(),M.clear(),v.clear()},ft=r=>{if(r.length===1){const s=r.codePointAt(0);if(s!==void 0&&s>=32&&s<127)return 1}const t=M.get(r);if(t!==void 0)return t;let e;try{e=B(r)}catch{e=1}return M.set(r,e),e},ut=r=>{try{return B(r)}catch{return 1}},Tt=r=>{if(r.length===0)return{height:0,width:0};const t=I.get(r);if(t)return t;const e=r.split(`
2
+ `);let s=0;for(const a of e){const h=ut(a);h>s&&(s=h)}const n={height:e.length,width:s};return I.set(r,n),n},wt=r=>{if(z){const e=v.get(r);if(e!==void 0)return e}const t=ot(r);return z&&v.set(r,t),t},mt=r=>{let t=0;for(let e=0;e<r.length;e++)t+=ft(r.getValue(e));return t},pt=r=>{if(r.length===0)return[new m];const t=[];let e=0;for(let s=0;s<r.length;s++)r.getValue(s)===`
3
+ `&&(t.push(s>e?r.slice(e,s):new m),e=s+1);return t.push(e<r.length?r.slice(e):new m),t},At=r=>{if(r.length===0)return{height:0,width:0};const t=pt(r);let e=0;for(const s of t)e=Math.max(e,mt(s));return{height:t.length,width:e}};export{Q as B,X as D,x as F,R as H,K as I,m as S,E as U,vt as a,Ft as b,gt as c,mt as d,A as e,O as f,kt as g,xt as h,ft as i,ot as j,pt as k,At as m,Dt as p,St as s,wt as t,Tt as y};
@@ -0,0 +1,30 @@
1
+ import { EventEmitter } from 'node:events';
2
+ import 'react';
3
+ type MousePosition = {
4
+ x: number;
5
+ y: number;
6
+ };
7
+ type MouseButton = "left" | "middle" | "right";
8
+ type MouseClickAction = "press" | "release" | null;
9
+ type MouseScrollAction = "scrolldown" | "scrollup" | null;
10
+ type MouseDragAction = "dragging" | null;
11
+ type MouseAction = MouseClickAction | MouseDragAction | MouseScrollAction;
12
+ /**
13
+ * Internal event emitter for mouse state changes.
14
+ *
15
+ * Events:
16
+ * - "position" (position: MousePosition)
17
+ * - "click" (position: MousePosition, action: MouseClickAction, button: MouseButton)
18
+ * - "scroll" (position: MousePosition, direction: MouseScrollAction)
19
+ * - "drag" (position: MousePosition, action: MouseDragAction, button: MouseButton)
20
+ */
21
+ type MouseEvents = EventEmitter;
22
+ type MouseContextShape = {
23
+ readonly button: MouseButton | null;
24
+ readonly click: MouseClickAction;
25
+ readonly drag: MouseDragAction;
26
+ readonly events: MouseEvents;
27
+ readonly position: MousePosition;
28
+ readonly scroll: MouseScrollAction;
29
+ };
30
+ export { MouseContextShape as M, MouseClickAction as a, MouseDragAction as b, MouseScrollAction as c, MousePosition as d, MouseButton as e, MouseAction as f, MouseEvents as g };
@@ -0,0 +1 @@
1
+ import{d as o}from"./ansi-parser-DlgLtOYO.js";export{o as parseSgrMouse};
@@ -0,0 +1,2 @@
1
+ import{b as x}from"./measure-element-D4M9iSYp.js";const u=(o,l)=>{const{initialState:r,onNewline:a,onSpace:c,onText:m}=l;if(o.nodeName!=="ink-box"&&o.nodeName!=="ink-root"&&o.nodeName!=="ink-text"&&o.nodeName!=="ink-virtual-text"||!o.yogaNode)return{lineBottom:0,state:r()};const{fragments:s}=x(o),t=r();t.currentX=0,t.lineBottom=0,t.yieldedContent=!1;for(const e of s){if(e.y>=t.lineBottom){const n=e.y-t.lineBottom,i=t.yieldedContent?1+n:n;i>0&&(a(i,t),t.currentX=0),t.lineBottom=e.y}if(e.x>t.currentX){const n=e.x-t.currentX;c(n,t),t.currentX=e.x}if(e.text.length>0&&(t.yieldedContent=!0,m(e,t)),(e.text.match(/\n/g)??[]).length>0){const n=e.text.lastIndexOf(`
2
+ `);t.currentX=e.text.length-n-1}else t.currentX+=e.text.length;t.lineBottom=Math.max(t.lineBottom,e.y+e.height)}return{lineBottom:t.lineBottom,state:t}};export{u as processLayout};
@@ -0,0 +1 @@
1
+ import{createRequire as x}from"node:module";import{version as L,createContext as R}from"react";import b from"react-reconciler";import{NoEventPriority as A,DefaultEventPriority as P}from"react-reconciler/constants.js";import{unstable_shouldYield as D,unstable_scheduleCallback as O,unstable_now as G,unstable_cancelCallback as F}from"scheduler";import n from"yoga-layout";import{b as _,d as f,s as m,m as p,e as v,r as T,f as w,c as W,h,j as I}from"./dom-rphpG0kf.js";const $=x(import.meta.url),S=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,y=S,k=[["top",n.EDGE_TOP],["right",n.EDGE_RIGHT],["bottom",n.EDGE_BOTTOM],["left",n.EDGE_LEFT]],B=(t,e)=>{if("position"in e){let r=n.POSITION_TYPE_RELATIVE;e.position==="absolute"?r=n.POSITION_TYPE_ABSOLUTE:e.position==="static"&&(r=n.POSITION_TYPE_STATIC),t.setPositionType(r)}for(const[r,s]of k){if(!(r in e))continue;const l=e[r];if(typeof l=="string"){t.setPositionPercent(s,Number.parseFloat(l));continue}t.setPosition(s,l)}},H=(t,e)=>{"margin"in e&&t.setMargin(n.EDGE_ALL,e.margin??0),"marginX"in e&&t.setMargin(n.EDGE_HORIZONTAL,e.marginX??0),"marginY"in e&&t.setMargin(n.EDGE_VERTICAL,e.marginY??0),"marginLeft"in e&&t.setMargin(n.EDGE_START,e.marginLeft||0),"marginRight"in e&&t.setMargin(n.EDGE_END,e.marginRight||0),"marginTop"in e&&t.setMargin(n.EDGE_TOP,e.marginTop||0),"marginBottom"in e&&t.setMargin(n.EDGE_BOTTOM,e.marginBottom||0)},M=(t,e)=>{"padding"in e&&t.setPadding(n.EDGE_ALL,e.padding??0),"paddingX"in e&&t.setPadding(n.EDGE_HORIZONTAL,e.paddingX??0),"paddingY"in e&&t.setPadding(n.EDGE_VERTICAL,e.paddingY??0),"paddingLeft"in e&&t.setPadding(n.EDGE_LEFT,e.paddingLeft||0),"paddingRight"in e&&t.setPadding(n.EDGE_RIGHT,e.paddingRight||0),"paddingTop"in e&&t.setPadding(n.EDGE_TOP,e.paddingTop||0),"paddingBottom"in e&&t.setPadding(n.EDGE_BOTTOM,e.paddingBottom||0)},U=(t,e)=>{"flexGrow"in e&&t.setFlexGrow(e.flexGrow??0),"flexShrink"in e&&t.setFlexShrink(typeof e.flexShrink=="number"?e.flexShrink:1),"flexWrap"in e&&(e.flexWrap==="nowrap"&&t.setFlexWrap(n.WRAP_NO_WRAP),e.flexWrap==="wrap"&&t.setFlexWrap(n.WRAP_WRAP),e.flexWrap==="wrap-reverse"&&t.setFlexWrap(n.WRAP_WRAP_REVERSE)),"flexDirection"in e&&(e.flexDirection==="row"&&t.setFlexDirection(n.FLEX_DIRECTION_ROW),e.flexDirection==="row-reverse"&&t.setFlexDirection(n.FLEX_DIRECTION_ROW_REVERSE),e.flexDirection==="column"&&t.setFlexDirection(n.FLEX_DIRECTION_COLUMN),e.flexDirection==="column-reverse"&&t.setFlexDirection(n.FLEX_DIRECTION_COLUMN_REVERSE)),"flexBasis"in e&&(typeof e.flexBasis=="number"?t.setFlexBasis(e.flexBasis):typeof e.flexBasis=="string"?t.setFlexBasisPercent(Number.parseInt(e.flexBasis,10)):t.setFlexBasis(Number.NaN)),"alignItems"in e&&((e.alignItems==="stretch"||!e.alignItems)&&t.setAlignItems(n.ALIGN_STRETCH),e.alignItems==="flex-start"&&t.setAlignItems(n.ALIGN_FLEX_START),e.alignItems==="center"&&t.setAlignItems(n.ALIGN_CENTER),e.alignItems==="flex-end"&&t.setAlignItems(n.ALIGN_FLEX_END),e.alignItems==="baseline"&&t.setAlignItems(n.ALIGN_BASELINE)),"alignSelf"in e&&((e.alignSelf==="auto"||!e.alignSelf)&&t.setAlignSelf(n.ALIGN_AUTO),e.alignSelf==="flex-start"&&t.setAlignSelf(n.ALIGN_FLEX_START),e.alignSelf==="center"&&t.setAlignSelf(n.ALIGN_CENTER),e.alignSelf==="flex-end"&&t.setAlignSelf(n.ALIGN_FLEX_END),e.alignSelf==="stretch"&&t.setAlignSelf(n.ALIGN_STRETCH),e.alignSelf==="baseline"&&t.setAlignSelf(n.ALIGN_BASELINE)),"alignContent"in e&&((e.alignContent==="flex-start"||!e.alignContent)&&t.setAlignContent(n.ALIGN_FLEX_START),e.alignContent==="center"&&t.setAlignContent(n.ALIGN_CENTER),e.alignContent==="flex-end"&&t.setAlignContent(n.ALIGN_FLEX_END),e.alignContent==="space-between"&&t.setAlignContent(n.ALIGN_SPACE_BETWEEN),e.alignContent==="space-around"&&t.setAlignContent(n.ALIGN_SPACE_AROUND),e.alignContent==="space-evenly"&&t.setAlignContent(n.ALIGN_SPACE_EVENLY),e.alignContent==="stretch"&&t.setAlignContent(n.ALIGN_STRETCH)),"justifyContent"in e&&((e.justifyContent==="flex-start"||!e.justifyContent)&&t.setJustifyContent(n.JUSTIFY_FLEX_START),e.justifyContent==="center"&&t.setJustifyContent(n.JUSTIFY_CENTER),e.justifyContent==="flex-end"&&t.setJustifyContent(n.JUSTIFY_FLEX_END),e.justifyContent==="space-between"&&t.setJustifyContent(n.JUSTIFY_SPACE_BETWEEN),e.justifyContent==="space-around"&&t.setJustifyContent(n.JUSTIFY_SPACE_AROUND),e.justifyContent==="space-evenly"&&t.setJustifyContent(n.JUSTIFY_SPACE_EVENLY))},Y=(t,e)=>{"width"in e&&(typeof e.width=="number"?t.setWidth(e.width):typeof e.width=="string"?t.setWidthPercent(Number.parseInt(e.width,10)):t.setWidthAuto()),"height"in e&&(typeof e.height=="number"?t.setHeight(e.height):typeof e.height=="string"?t.setHeightPercent(Number.parseInt(e.height,10)):t.setHeightAuto()),"minWidth"in e&&(typeof e.minWidth=="string"?t.setMinWidthPercent(Number.parseInt(e.minWidth,10)):t.setMinWidth(e.minWidth??0)),"minHeight"in e&&(typeof e.minHeight=="string"?t.setMinHeightPercent(Number.parseInt(e.minHeight,10)):t.setMinHeight(e.minHeight??0)),"maxWidth"in e&&(typeof e.maxWidth=="string"?t.setMaxWidthPercent(Number.parseInt(e.maxWidth,10)):t.setMaxWidth(e.maxWidth)),"maxHeight"in e&&(typeof e.maxHeight=="string"?t.setMaxHeightPercent(Number.parseInt(e.maxHeight,10)):t.setMaxHeight(e.maxHeight)),"aspectRatio"in e&&t.setAspectRatio(e.aspectRatio)},j=(t,e)=>{"display"in e&&t.setDisplay(e.display==="flex"?n.DISPLAY_FLEX:n.DISPLAY_NONE)},X=(t,e,r)=>{if(!("borderStyle"in e||"borderTop"in e||"borderBottom"in e||"borderLeft"in e||"borderRight"in e))return;const s=r.borderStyle?1:0;t.setBorder(n.EDGE_TOP,r.borderTop===!1?0:s),t.setBorder(n.EDGE_BOTTOM,r.borderBottom===!1?0:s),t.setBorder(n.EDGE_LEFT,r.borderLeft===!1?0:s),t.setBorder(n.EDGE_RIGHT,r.borderRight===!1?0:s)},V=(t,e)=>{"gap"in e&&t.setGap(n.GUTTER_ALL,e.gap??0),"columnGap"in e&&t.setGap(n.GUTTER_COLUMN,e.columnGap??0),"rowGap"in e&&t.setGap(n.GUTTER_ROW,e.rowGap??0)},J=(t,e)=>{const r=e.overflow??"visible",s=e.overflowX??r,l=e.overflowY??r;s==="scroll"||l==="scroll"?t.setOverflow(n.OVERFLOW_SCROLL):s==="hidden"||l==="hidden"?t.setOverflow(n.OVERFLOW_HIDDEN):t.setOverflow(n.OVERFLOW_VISIBLE)},C=(t,e={},r=e)=>{B(t,e),H(t,e),M(t,e),U(t,e),Y(t,e),j(t,e),X(t,e,r),V(t,e),J(t,r)};if(y.env.DEV==="true"){let t=!1;try{import.meta.resolve("react-devtools-core"),t=!0}catch{}t&&await import("../packem_chunks/devtools.js")}const N=(t,e)=>{if(t===e)return;if(!t)return e;const r={};let s=!1;for(const l of Object.keys(t))(!e||!Object.hasOwn(e,l))&&(r[l]=void 0,s=!0);if(e)for(const l of Object.keys(e))e[l]!==t[l]&&(r[l]=e[l],s=!0);return s?r:void 0},E=t=>{if(t){if(t.yogaNode?.unsetMeasureFunc(),"resizeObservers"in t&&t.resizeObservers?.clear(),"childNodes"in t&&t.childNodes)for(const e of t.childNodes)E(e);t.yogaNode?.free(),"cachedRender"in t&&(t.cachedRender=void 0),"childNodes"in t&&(t.childNodes=[]),t.parentNode=void 0}};let u=A,g;async function q(){const t=(await import("node:fs")).readFileSync(new URL("../package.json",import.meta.url),"utf8"),e=JSON.parse(t);return{name:e?.name,version:e?.version}}let d={name:"ink",version:L};if(y.env.DEV==="true")try{const t=await q();d={name:t.name||d.name,version:t.version||d.version}}catch(t){console.warn("Failed to load package.json in development mode. Falling back to default renderer metadata.",t)}const rt=b({afterActiveInstanceBlur(){},appendChild:f,appendChildToContainer:f,appendInitialChild:f,beforeActiveInstanceBlur(){},cancelCallback:F,cancelTimeout:clearTimeout,clearContainer:()=>!1,commitTextUpdate(t,e,r){m(t,r)},commitUpdate(t,e,r,s){g&&t.internal_static&&(g.isStaticDirty=!0);const l=N(r,s),a=N(r.style,s.style);if(!l&&!a)return;let i=!!a;if(l){for(const[o,c]of Object.entries(l))if(o!=="children"){if(o==="style"){h(t,c);continue}if(o==="internal_transform"){t.internal_transform=c,i=!0;continue}if(o==="internal_cursor"){t.internal_cursor=c,i=!0;continue}if(o==="internal_static"){t.internal_static=!0,i=!0;continue}if(o==="sticky"){t.internal_sticky=c,i=!0;continue}if(o==="internalStickyAlternate"){t.internal_stickyAlternate=c,i=!0;continue}if(o==="opaque"){t.internal_opaque=c,i=!0;continue}if(o==="scrollbar"){t.internal_scrollbar=c,i=!0;continue}if(o==="internal_terminalCursorFocus"){t.internal_terminalCursorFocus=c,i=!0;continue}if(o==="internal_terminalCursorPosition"){t.internal_terminalCursorPosition=c,i=!0;continue}if(o==="cachedRender"){t.cachedRender=c,i=!0;continue}I(t,o,c),i=!0}}a&&t.yogaNode&&C(t.yogaNode,a,s.style??{}),i&&p(t)},createInstance(t,e,r,s){if(s.isInsideText&&t==="ink-box")throw new Error("<Box> can’t be nested inside <Text> component");if(s.isInsideText&&t==="ink-cursor")throw new Error("<Cursor> can’t be nested inside <Text> component");const l=t==="ink-text"&&s.isInsideText?"ink-virtual-text":t,a=W(l);for(const[i,o]of Object.entries(e))if(i!=="children"){if(i==="style"){h(a,o),a.yogaNode&&C(a.yogaNode,o);continue}if(i==="internal_transform"){a.internal_transform=o;continue}if(i==="internal_cursor"){a.internal_cursor=o;continue}if(i==="internal_static"){g=r,a.internal_static=!0,r.isStaticDirty=!0,r.staticNode=a;continue}if(i==="sticky"){a.internal_sticky=o;continue}if(i==="internalStickyAlternate"){a.internal_stickyAlternate=o;continue}if(i==="opaque"){a.internal_opaque=o;continue}if(i==="scrollbar"){a.internal_scrollbar=o;continue}if(i==="internal_terminalCursorFocus"){a.internal_terminalCursorFocus=o;continue}if(i==="internal_terminalCursorPosition"){a.internal_terminalCursorPosition=o;continue}if(i==="internal_static"){a.internal_static=!0;continue}if(i==="cachedRender"){a.cachedRender=o;continue}I(a,i,o)}return a},createTextInstance(t,e,r){if(!r.isInsideText)throw new Error(`Text string "${t}" must be rendered inside <Text> component`);return w(t)},detachDeletedInstance(){},finalizeInitialChildren(){return!1},getChildHostContext(t,e){const r=t.isInsideText,s=e==="ink-text"||e==="ink-virtual-text";return r===s?t:{isInsideText:s}},getCurrentUpdatePriority:()=>u,getInstanceFromNode:()=>null,getInstanceFromScope:()=>null,getPublicInstance:t=>t,getRootHostContext:()=>({isInsideText:!1}),hideInstance(t){t.internal_hidden=!0,t.yogaNode?.setDisplay(n.DISPLAY_NONE),p(t)},hideTextInstance(t){m(t,"")},HostTransitionContext:R(null),insertBefore:_,insertInContainerBefore:_,isPrimaryRenderer:!0,maySuspendCommit(){return!0},noTimeout:-1,NotPendingTransition:void 0,now:G,preloadInstance(){return!0},prepareForCommit:()=>null,preparePortalMount:()=>null,prepareScopeUpdate(){},removeChild(t,e){T(t,e),E(e)},removeChildFromContainer(t,e){T(t,e),E(e)},rendererPackageName:d.name,rendererVersion:d.version,requestPostPaintCallback(){},resetAfterCommit(t){if(typeof t.onComputeLayout=="function"&&t.onComputeLayout(),v(t),t.staticNode!==t.previousStaticNode&&(t.previousStaticNode=t.staticNode,typeof t.onStaticChange=="function"&&t.onStaticChange()),t.isStaticDirty){t.isStaticDirty=!1,typeof t.onImmediateRender=="function"&&t.onImmediateRender();return}typeof t.onRender=="function"&&t.onRender()},resetFormInstance(){},resetTextContent(){},resolveEventTimeStamp(){return-1.1},resolveEventType(){return null},resolveUpdatePriority(){return u!==A?u:P},scheduleCallback:O,scheduleMicrotask:queueMicrotask,scheduleTimeout:setTimeout,setCurrentUpdatePriority(t){u=t},shouldAttemptEagerTransition(){return!1},shouldSetTextContent:()=>!1,shouldYield:D,startSuspendingCommit(){},supportsHydration:!1,supportsMicrotasks:!0,supportsMutation:!0,supportsPersistence:!1,suspendInstance(){},trackSchedulerEvent(){},unhideInstance(t){t.internal_hidden=!1,t.yogaNode?.setDisplay(n.DISPLAY_FLEX),p(t)},unhideTextInstance(t,e){m(t,e)},waitForCommitToBeReady(){return null}});export{C as c,rt as j};