tuiuiu.js 0.1.1

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 (803) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +324 -0
  3. package/dist/app/index.d.ts +9 -0
  4. package/dist/app/index.d.ts.map +1 -0
  5. package/dist/app/index.js +12 -0
  6. package/dist/app/index.js.map +1 -0
  7. package/dist/app/render-loop.d.ts +51 -0
  8. package/dist/app/render-loop.d.ts.map +1 -0
  9. package/dist/app/render-loop.js +263 -0
  10. package/dist/app/render-loop.js.map +1 -0
  11. package/dist/atoms/button.d.ts +109 -0
  12. package/dist/atoms/button.d.ts.map +1 -0
  13. package/dist/atoms/button.js +173 -0
  14. package/dist/atoms/button.js.map +1 -0
  15. package/dist/atoms/index.d.ts +29 -0
  16. package/dist/atoms/index.d.ts.map +1 -0
  17. package/dist/atoms/index.js +53 -0
  18. package/dist/atoms/index.js.map +1 -0
  19. package/dist/atoms/progress-bar.d.ts +96 -0
  20. package/dist/atoms/progress-bar.d.ts.map +1 -0
  21. package/dist/atoms/progress-bar.js +443 -0
  22. package/dist/atoms/progress-bar.js.map +1 -0
  23. package/dist/atoms/slider.d.ts +137 -0
  24. package/dist/atoms/slider.d.ts.map +1 -0
  25. package/dist/atoms/slider.js +317 -0
  26. package/dist/atoms/slider.js.map +1 -0
  27. package/dist/atoms/spinner.d.ts +91 -0
  28. package/dist/atoms/spinner.d.ts.map +1 -0
  29. package/dist/atoms/spinner.js +650 -0
  30. package/dist/atoms/spinner.js.map +1 -0
  31. package/dist/atoms/switch.d.ts +102 -0
  32. package/dist/atoms/switch.d.ts.map +1 -0
  33. package/dist/atoms/switch.js +176 -0
  34. package/dist/atoms/switch.js.map +1 -0
  35. package/dist/atoms/text-input.d.ts +82 -0
  36. package/dist/atoms/text-input.d.ts.map +1 -0
  37. package/dist/atoms/text-input.js +347 -0
  38. package/dist/atoms/text-input.js.map +1 -0
  39. package/dist/atoms/timer.d.ts +178 -0
  40. package/dist/atoms/timer.d.ts.map +1 -0
  41. package/dist/atoms/timer.js +355 -0
  42. package/dist/atoms/timer.js.map +1 -0
  43. package/dist/atoms/tooltip.d.ts +191 -0
  44. package/dist/atoms/tooltip.d.ts.map +1 -0
  45. package/dist/atoms/tooltip.js +279 -0
  46. package/dist/atoms/tooltip.js.map +1 -0
  47. package/dist/components/canvas.d.ts +322 -0
  48. package/dist/components/canvas.d.ts.map +1 -0
  49. package/dist/components/canvas.js +833 -0
  50. package/dist/components/canvas.js.map +1 -0
  51. package/dist/components/code-block.d.ts +75 -0
  52. package/dist/components/code-block.d.ts.map +1 -0
  53. package/dist/components/code-block.js +322 -0
  54. package/dist/components/code-block.js.map +1 -0
  55. package/dist/components/components.d.ts +122 -0
  56. package/dist/components/components.d.ts.map +1 -0
  57. package/dist/components/components.js +151 -0
  58. package/dist/components/components.js.map +1 -0
  59. package/dist/components/data-viz/bar-chart.d.ts +167 -0
  60. package/dist/components/data-viz/bar-chart.d.ts.map +1 -0
  61. package/dist/components/data-viz/bar-chart.js +375 -0
  62. package/dist/components/data-viz/bar-chart.js.map +1 -0
  63. package/dist/components/data-viz/gauge.d.ts +163 -0
  64. package/dist/components/data-viz/gauge.d.ts.map +1 -0
  65. package/dist/components/data-viz/gauge.js +451 -0
  66. package/dist/components/data-viz/gauge.js.map +1 -0
  67. package/dist/components/data-viz/heatmap.d.ts +154 -0
  68. package/dist/components/data-viz/heatmap.d.ts.map +1 -0
  69. package/dist/components/data-viz/heatmap.js +458 -0
  70. package/dist/components/data-viz/heatmap.js.map +1 -0
  71. package/dist/components/data-viz/index.d.ts +16 -0
  72. package/dist/components/data-viz/index.d.ts.map +1 -0
  73. package/dist/components/data-viz/index.js +16 -0
  74. package/dist/components/data-viz/index.js.map +1 -0
  75. package/dist/components/data-viz/line-chart.d.ts +157 -0
  76. package/dist/components/data-viz/line-chart.d.ts.map +1 -0
  77. package/dist/components/data-viz/line-chart.js +578 -0
  78. package/dist/components/data-viz/line-chart.js.map +1 -0
  79. package/dist/components/data-viz/sparkline.d.ts +156 -0
  80. package/dist/components/data-viz/sparkline.d.ts.map +1 -0
  81. package/dist/components/data-viz/sparkline.js +325 -0
  82. package/dist/components/data-viz/sparkline.js.map +1 -0
  83. package/dist/components/grid.d.ts +234 -0
  84. package/dist/components/grid.d.ts.map +1 -0
  85. package/dist/components/grid.js +719 -0
  86. package/dist/components/grid.js.map +1 -0
  87. package/dist/components/index.d.ts +33 -0
  88. package/dist/components/index.d.ts.map +1 -0
  89. package/dist/components/index.js +69 -0
  90. package/dist/components/index.js.map +1 -0
  91. package/dist/components/markdown.d.ts +52 -0
  92. package/dist/components/markdown.d.ts.map +1 -0
  93. package/dist/components/markdown.js +341 -0
  94. package/dist/components/markdown.js.map +1 -0
  95. package/dist/components/modal.d.ts +237 -0
  96. package/dist/components/modal.d.ts.map +1 -0
  97. package/dist/components/modal.js +396 -0
  98. package/dist/components/modal.js.map +1 -0
  99. package/dist/components/progress-bar.d.ts +89 -0
  100. package/dist/components/progress-bar.d.ts.map +1 -0
  101. package/dist/components/progress-bar.js +288 -0
  102. package/dist/components/progress-bar.js.map +1 -0
  103. package/dist/components/select.d.ts +114 -0
  104. package/dist/components/select.d.ts.map +1 -0
  105. package/dist/components/select.js +415 -0
  106. package/dist/components/select.js.map +1 -0
  107. package/dist/components/spinner.d.ts +71 -0
  108. package/dist/components/spinner.d.ts.map +1 -0
  109. package/dist/components/spinner.js +300 -0
  110. package/dist/components/spinner.js.map +1 -0
  111. package/dist/components/split-panel.d.ts +175 -0
  112. package/dist/components/split-panel.d.ts.map +1 -0
  113. package/dist/components/split-panel.js +322 -0
  114. package/dist/components/split-panel.js.map +1 -0
  115. package/dist/components/table.d.ts +103 -0
  116. package/dist/components/table.d.ts.map +1 -0
  117. package/dist/components/table.js +359 -0
  118. package/dist/components/table.js.map +1 -0
  119. package/dist/components/text-input.d.ts +79 -0
  120. package/dist/components/text-input.d.ts.map +1 -0
  121. package/dist/components/text-input.js +332 -0
  122. package/dist/components/text-input.js.map +1 -0
  123. package/dist/core/animation.d.ts +262 -0
  124. package/dist/core/animation.d.ts.map +1 -0
  125. package/dist/core/animation.js +626 -0
  126. package/dist/core/animation.js.map +1 -0
  127. package/dist/core/buffer.d.ts +179 -0
  128. package/dist/core/buffer.d.ts.map +1 -0
  129. package/dist/core/buffer.js +549 -0
  130. package/dist/core/buffer.js.map +1 -0
  131. package/dist/core/capabilities.d.ts +184 -0
  132. package/dist/core/capabilities.d.ts.map +1 -0
  133. package/dist/core/capabilities.js +393 -0
  134. package/dist/core/capabilities.js.map +1 -0
  135. package/dist/core/colors.d.ts +111 -0
  136. package/dist/core/colors.d.ts.map +1 -0
  137. package/dist/core/colors.js +417 -0
  138. package/dist/core/colors.js.map +1 -0
  139. package/dist/core/command-palette.d.ts +220 -0
  140. package/dist/core/command-palette.d.ts.map +1 -0
  141. package/dist/core/command-palette.js +564 -0
  142. package/dist/core/command-palette.js.map +1 -0
  143. package/dist/core/constraint.d.ts +315 -0
  144. package/dist/core/constraint.d.ts.map +1 -0
  145. package/dist/core/constraint.js +651 -0
  146. package/dist/core/constraint.js.map +1 -0
  147. package/dist/core/delta-render.d.ts +64 -0
  148. package/dist/core/delta-render.d.ts.map +1 -0
  149. package/dist/core/delta-render.js +367 -0
  150. package/dist/core/delta-render.js.map +1 -0
  151. package/dist/core/dirty.d.ts +181 -0
  152. package/dist/core/dirty.d.ts.map +1 -0
  153. package/dist/core/dirty.js +335 -0
  154. package/dist/core/dirty.js.map +1 -0
  155. package/dist/core/error-boundary.d.ts +79 -0
  156. package/dist/core/error-boundary.d.ts.map +1 -0
  157. package/dist/core/error-boundary.js +258 -0
  158. package/dist/core/error-boundary.js.map +1 -0
  159. package/dist/core/events.d.ts +206 -0
  160. package/dist/core/events.d.ts.map +1 -0
  161. package/dist/core/events.js +411 -0
  162. package/dist/core/events.js.map +1 -0
  163. package/dist/core/focus.d.ts +294 -0
  164. package/dist/core/focus.d.ts.map +1 -0
  165. package/dist/core/focus.js +589 -0
  166. package/dist/core/focus.js.map +1 -0
  167. package/dist/core/graphics.d.ts +146 -0
  168. package/dist/core/graphics.d.ts.map +1 -0
  169. package/dist/core/graphics.js +561 -0
  170. package/dist/core/graphics.js.map +1 -0
  171. package/dist/core/highlighter.d.ts +148 -0
  172. package/dist/core/highlighter.d.ts.map +1 -0
  173. package/dist/core/highlighter.js +2726 -0
  174. package/dist/core/highlighter.js.map +1 -0
  175. package/dist/core/hit-test.d.ts +126 -0
  176. package/dist/core/hit-test.d.ts.map +1 -0
  177. package/dist/core/hit-test.js +336 -0
  178. package/dist/core/hit-test.js.map +1 -0
  179. package/dist/core/index.d.ts +58 -0
  180. package/dist/core/index.d.ts.map +1 -0
  181. package/dist/core/index.js +254 -0
  182. package/dist/core/index.js.map +1 -0
  183. package/dist/core/input.d.ts +241 -0
  184. package/dist/core/input.d.ts.map +1 -0
  185. package/dist/core/input.js +768 -0
  186. package/dist/core/input.js.map +1 -0
  187. package/dist/core/keybindings.d.ts +256 -0
  188. package/dist/core/keybindings.d.ts.map +1 -0
  189. package/dist/core/keybindings.js +532 -0
  190. package/dist/core/keybindings.js.map +1 -0
  191. package/dist/core/layout.d.ts +30 -0
  192. package/dist/core/layout.d.ts.map +1 -0
  193. package/dist/core/layout.js +347 -0
  194. package/dist/core/layout.js.map +1 -0
  195. package/dist/core/overlay.d.ts +318 -0
  196. package/dist/core/overlay.d.ts.map +1 -0
  197. package/dist/core/overlay.js +794 -0
  198. package/dist/core/overlay.js.map +1 -0
  199. package/dist/core/query.d.ts +155 -0
  200. package/dist/core/query.d.ts.map +1 -0
  201. package/dist/core/query.js +616 -0
  202. package/dist/core/query.js.map +1 -0
  203. package/dist/core/renderer.d.ts +28 -0
  204. package/dist/core/renderer.d.ts.map +1 -0
  205. package/dist/core/renderer.js +403 -0
  206. package/dist/core/renderer.js.map +1 -0
  207. package/dist/core/router.d.ts +401 -0
  208. package/dist/core/router.d.ts.map +1 -0
  209. package/dist/core/router.js +766 -0
  210. package/dist/core/router.js.map +1 -0
  211. package/dist/core/screen.d.ts +302 -0
  212. package/dist/core/screen.d.ts.map +1 -0
  213. package/dist/core/screen.js +537 -0
  214. package/dist/core/screen.js.map +1 -0
  215. package/dist/core/signal.d.ts +136 -0
  216. package/dist/core/signal.d.ts.map +1 -0
  217. package/dist/core/signal.js +336 -0
  218. package/dist/core/signal.js.map +1 -0
  219. package/dist/core/theme.d.ts +220 -0
  220. package/dist/core/theme.d.ts.map +1 -0
  221. package/dist/core/theme.js +499 -0
  222. package/dist/core/theme.js.map +1 -0
  223. package/dist/core/tick.d.ts +107 -0
  224. package/dist/core/tick.d.ts.map +1 -0
  225. package/dist/core/tick.js +174 -0
  226. package/dist/core/tick.js.map +1 -0
  227. package/dist/core/transitions.d.ts +335 -0
  228. package/dist/core/transitions.d.ts.map +1 -0
  229. package/dist/core/transitions.js +650 -0
  230. package/dist/core/transitions.js.map +1 -0
  231. package/dist/core/virtual-scroll.d.ts +241 -0
  232. package/dist/core/virtual-scroll.d.ts.map +1 -0
  233. package/dist/core/virtual-scroll.js +476 -0
  234. package/dist/core/virtual-scroll.js.map +1 -0
  235. package/dist/core/visualization.d.ts +248 -0
  236. package/dist/core/visualization.d.ts.map +1 -0
  237. package/dist/core/visualization.js +709 -0
  238. package/dist/core/visualization.js.map +1 -0
  239. package/dist/design-system/core/index.d.ts +6 -0
  240. package/dist/design-system/core/index.d.ts.map +1 -0
  241. package/dist/design-system/core/index.js +6 -0
  242. package/dist/design-system/core/index.js.map +1 -0
  243. package/dist/design-system/core/layout.d.ts +30 -0
  244. package/dist/design-system/core/layout.d.ts.map +1 -0
  245. package/dist/design-system/core/layout.js +344 -0
  246. package/dist/design-system/core/layout.js.map +1 -0
  247. package/dist/design-system/core/renderer.d.ts +28 -0
  248. package/dist/design-system/core/renderer.d.ts.map +1 -0
  249. package/dist/design-system/core/renderer.js +418 -0
  250. package/dist/design-system/core/renderer.js.map +1 -0
  251. package/dist/design-system/data-display/calendar.d.ts +141 -0
  252. package/dist/design-system/data-display/calendar.d.ts.map +1 -0
  253. package/dist/design-system/data-display/calendar.js +524 -0
  254. package/dist/design-system/data-display/calendar.js.map +1 -0
  255. package/dist/design-system/data-display/code-block.d.ts +75 -0
  256. package/dist/design-system/data-display/code-block.d.ts.map +1 -0
  257. package/dist/design-system/data-display/code-block.js +311 -0
  258. package/dist/design-system/data-display/code-block.js.map +1 -0
  259. package/dist/design-system/data-display/data-table.d.ts +173 -0
  260. package/dist/design-system/data-display/data-table.d.ts.map +1 -0
  261. package/dist/design-system/data-display/data-table.js +428 -0
  262. package/dist/design-system/data-display/data-table.js.map +1 -0
  263. package/dist/design-system/data-display/index.d.ts +10 -0
  264. package/dist/design-system/data-display/index.d.ts.map +1 -0
  265. package/dist/design-system/data-display/index.js +16 -0
  266. package/dist/design-system/data-display/index.js.map +1 -0
  267. package/dist/design-system/data-display/markdown.d.ts +52 -0
  268. package/dist/design-system/data-display/markdown.d.ts.map +1 -0
  269. package/dist/design-system/data-display/markdown.js +341 -0
  270. package/dist/design-system/data-display/markdown.js.map +1 -0
  271. package/dist/design-system/data-display/table.d.ts +103 -0
  272. package/dist/design-system/data-display/table.d.ts.map +1 -0
  273. package/dist/design-system/data-display/table.js +342 -0
  274. package/dist/design-system/data-display/table.js.map +1 -0
  275. package/dist/design-system/data-display/tree.d.ts +166 -0
  276. package/dist/design-system/data-display/tree.d.ts.map +1 -0
  277. package/dist/design-system/data-display/tree.js +428 -0
  278. package/dist/design-system/data-display/tree.js.map +1 -0
  279. package/dist/design-system/feedback/badge.d.ts +21 -0
  280. package/dist/design-system/feedback/badge.d.ts.map +1 -0
  281. package/dist/design-system/feedback/badge.js +9 -0
  282. package/dist/design-system/feedback/badge.js.map +1 -0
  283. package/dist/design-system/feedback/index.d.ts +8 -0
  284. package/dist/design-system/feedback/index.d.ts.map +1 -0
  285. package/dist/design-system/feedback/index.js +12 -0
  286. package/dist/design-system/feedback/index.js.map +1 -0
  287. package/dist/design-system/feedback/progress-bar.d.ts +93 -0
  288. package/dist/design-system/feedback/progress-bar.d.ts.map +1 -0
  289. package/dist/design-system/feedback/progress-bar.js +440 -0
  290. package/dist/design-system/feedback/progress-bar.js.map +1 -0
  291. package/dist/design-system/feedback/spinner.d.ts +88 -0
  292. package/dist/design-system/feedback/spinner.d.ts.map +1 -0
  293. package/dist/design-system/feedback/spinner.js +679 -0
  294. package/dist/design-system/feedback/spinner.js.map +1 -0
  295. package/dist/design-system/feedback/timer.d.ts +175 -0
  296. package/dist/design-system/feedback/timer.d.ts.map +1 -0
  297. package/dist/design-system/feedback/timer.js +352 -0
  298. package/dist/design-system/feedback/timer.js.map +1 -0
  299. package/dist/design-system/forms/autocomplete.d.ts +163 -0
  300. package/dist/design-system/forms/autocomplete.d.ts.map +1 -0
  301. package/dist/design-system/forms/autocomplete.js +455 -0
  302. package/dist/design-system/forms/autocomplete.js.map +1 -0
  303. package/dist/design-system/forms/button.d.ts +106 -0
  304. package/dist/design-system/forms/button.d.ts.map +1 -0
  305. package/dist/design-system/forms/button.js +170 -0
  306. package/dist/design-system/forms/button.js.map +1 -0
  307. package/dist/design-system/forms/index.d.ts +12 -0
  308. package/dist/design-system/forms/index.d.ts.map +1 -0
  309. package/dist/design-system/forms/index.js +20 -0
  310. package/dist/design-system/forms/index.js.map +1 -0
  311. package/dist/design-system/forms/multi-select.d.ts +102 -0
  312. package/dist/design-system/forms/multi-select.d.ts.map +1 -0
  313. package/dist/design-system/forms/multi-select.js +309 -0
  314. package/dist/design-system/forms/multi-select.js.map +1 -0
  315. package/dist/design-system/forms/radio-group.d.ts +88 -0
  316. package/dist/design-system/forms/radio-group.d.ts.map +1 -0
  317. package/dist/design-system/forms/radio-group.js +145 -0
  318. package/dist/design-system/forms/radio-group.js.map +1 -0
  319. package/dist/design-system/forms/select.d.ts +116 -0
  320. package/dist/design-system/forms/select.d.ts.map +1 -0
  321. package/dist/design-system/forms/select.js +441 -0
  322. package/dist/design-system/forms/select.js.map +1 -0
  323. package/dist/design-system/forms/slider.d.ts +134 -0
  324. package/dist/design-system/forms/slider.d.ts.map +1 -0
  325. package/dist/design-system/forms/slider.js +314 -0
  326. package/dist/design-system/forms/slider.js.map +1 -0
  327. package/dist/design-system/forms/switch.d.ts +99 -0
  328. package/dist/design-system/forms/switch.d.ts.map +1 -0
  329. package/dist/design-system/forms/switch.js +173 -0
  330. package/dist/design-system/forms/switch.js.map +1 -0
  331. package/dist/design-system/forms/text-input.d.ts +79 -0
  332. package/dist/design-system/forms/text-input.d.ts.map +1 -0
  333. package/dist/design-system/forms/text-input.js +344 -0
  334. package/dist/design-system/forms/text-input.js.map +1 -0
  335. package/dist/design-system/index.d.ts +23 -0
  336. package/dist/design-system/index.d.ts.map +1 -0
  337. package/dist/design-system/index.js +74 -0
  338. package/dist/design-system/index.js.map +1 -0
  339. package/dist/design-system/layout/app.d.ts +205 -0
  340. package/dist/design-system/layout/app.d.ts.map +1 -0
  341. package/dist/design-system/layout/app.js +286 -0
  342. package/dist/design-system/layout/app.js.map +1 -0
  343. package/dist/design-system/layout/collapsible.d.ts +166 -0
  344. package/dist/design-system/layout/collapsible.d.ts.map +1 -0
  345. package/dist/design-system/layout/collapsible.js +286 -0
  346. package/dist/design-system/layout/collapsible.js.map +1 -0
  347. package/dist/design-system/layout/grid.d.ts +232 -0
  348. package/dist/design-system/layout/grid.d.ts.map +1 -0
  349. package/dist/design-system/layout/grid.js +333 -0
  350. package/dist/design-system/layout/grid.js.map +1 -0
  351. package/dist/design-system/layout/index.d.ts +27 -0
  352. package/dist/design-system/layout/index.d.ts.map +1 -0
  353. package/dist/design-system/layout/index.js +34 -0
  354. package/dist/design-system/layout/index.js.map +1 -0
  355. package/dist/design-system/layout/scroll-area.d.ts +188 -0
  356. package/dist/design-system/layout/scroll-area.d.ts.map +1 -0
  357. package/dist/design-system/layout/scroll-area.js +348 -0
  358. package/dist/design-system/layout/scroll-area.js.map +1 -0
  359. package/dist/design-system/layout/split-panel.d.ts +183 -0
  360. package/dist/design-system/layout/split-panel.d.ts.map +1 -0
  361. package/dist/design-system/layout/split-panel.js +323 -0
  362. package/dist/design-system/layout/split-panel.js.map +1 -0
  363. package/dist/design-system/layout/stack.d.ts +189 -0
  364. package/dist/design-system/layout/stack.d.ts.map +1 -0
  365. package/dist/design-system/layout/stack.js +170 -0
  366. package/dist/design-system/layout/stack.js.map +1 -0
  367. package/dist/design-system/layout/tabs.d.ts +129 -0
  368. package/dist/design-system/layout/tabs.d.ts.map +1 -0
  369. package/dist/design-system/layout/tabs.js +373 -0
  370. package/dist/design-system/layout/tabs.js.map +1 -0
  371. package/dist/design-system/media/index.d.ts +13 -0
  372. package/dist/design-system/media/index.d.ts.map +1 -0
  373. package/dist/design-system/media/index.js +23 -0
  374. package/dist/design-system/media/index.js.map +1 -0
  375. package/dist/design-system/media/picture.d.ts +304 -0
  376. package/dist/design-system/media/picture.d.ts.map +1 -0
  377. package/dist/design-system/media/picture.js +681 -0
  378. package/dist/design-system/media/picture.js.map +1 -0
  379. package/dist/design-system/navigation/file-manager.d.ts +492 -0
  380. package/dist/design-system/navigation/file-manager.d.ts.map +1 -0
  381. package/dist/design-system/navigation/file-manager.js +807 -0
  382. package/dist/design-system/navigation/file-manager.js.map +1 -0
  383. package/dist/design-system/navigation/index.d.ts +13 -0
  384. package/dist/design-system/navigation/index.d.ts.map +1 -0
  385. package/dist/design-system/navigation/index.js +19 -0
  386. package/dist/design-system/navigation/index.js.map +1 -0
  387. package/dist/design-system/overlays/command-palette.d.ts +217 -0
  388. package/dist/design-system/overlays/command-palette.d.ts.map +1 -0
  389. package/dist/design-system/overlays/command-palette.js +443 -0
  390. package/dist/design-system/overlays/command-palette.js.map +1 -0
  391. package/dist/design-system/overlays/index.d.ts +7 -0
  392. package/dist/design-system/overlays/index.d.ts.map +1 -0
  393. package/dist/design-system/overlays/index.js +10 -0
  394. package/dist/design-system/overlays/index.js.map +1 -0
  395. package/dist/design-system/overlays/modal.d.ts +251 -0
  396. package/dist/design-system/overlays/modal.d.ts.map +1 -0
  397. package/dist/design-system/overlays/modal.js +461 -0
  398. package/dist/design-system/overlays/modal.js.map +1 -0
  399. package/dist/design-system/overlays/overlay-stack.d.ts +200 -0
  400. package/dist/design-system/overlays/overlay-stack.d.ts.map +1 -0
  401. package/dist/design-system/overlays/overlay-stack.js +341 -0
  402. package/dist/design-system/overlays/overlay-stack.js.map +1 -0
  403. package/dist/design-system/primitives/box.d.ts +16 -0
  404. package/dist/design-system/primitives/box.d.ts.map +1 -0
  405. package/dist/design-system/primitives/box.js +23 -0
  406. package/dist/design-system/primitives/box.js.map +1 -0
  407. package/dist/design-system/primitives/divider.d.ts +52 -0
  408. package/dist/design-system/primitives/divider.d.ts.map +1 -0
  409. package/dist/design-system/primitives/divider.js +72 -0
  410. package/dist/design-system/primitives/divider.js.map +1 -0
  411. package/dist/design-system/primitives/helpers.d.ts +10 -0
  412. package/dist/design-system/primitives/helpers.d.ts.map +1 -0
  413. package/dist/design-system/primitives/helpers.js +27 -0
  414. package/dist/design-system/primitives/helpers.js.map +1 -0
  415. package/dist/design-system/primitives/index.d.ts +11 -0
  416. package/dist/design-system/primitives/index.d.ts.map +1 -0
  417. package/dist/design-system/primitives/index.js +14 -0
  418. package/dist/design-system/primitives/index.js.map +1 -0
  419. package/dist/design-system/primitives/slot.d.ts +35 -0
  420. package/dist/design-system/primitives/slot.d.ts.map +1 -0
  421. package/dist/design-system/primitives/slot.js +17 -0
  422. package/dist/design-system/primitives/slot.js.map +1 -0
  423. package/dist/design-system/primitives/spacer.d.ts +34 -0
  424. package/dist/design-system/primitives/spacer.d.ts.map +1 -0
  425. package/dist/design-system/primitives/spacer.js +53 -0
  426. package/dist/design-system/primitives/spacer.js.map +1 -0
  427. package/dist/design-system/primitives/text.d.ts +12 -0
  428. package/dist/design-system/primitives/text.d.ts.map +1 -0
  429. package/dist/design-system/primitives/text.js +25 -0
  430. package/dist/design-system/primitives/text.js.map +1 -0
  431. package/dist/design-system/primitives/utilities.d.ts +70 -0
  432. package/dist/design-system/primitives/utilities.d.ts.map +1 -0
  433. package/dist/design-system/primitives/utilities.js +56 -0
  434. package/dist/design-system/primitives/utilities.js.map +1 -0
  435. package/dist/design-system/visual/big-text.d.ts +151 -0
  436. package/dist/design-system/visual/big-text.d.ts.map +1 -0
  437. package/dist/design-system/visual/big-text.js +578 -0
  438. package/dist/design-system/visual/big-text.js.map +1 -0
  439. package/dist/design-system/visual/digits.d.ts +159 -0
  440. package/dist/design-system/visual/digits.d.ts.map +1 -0
  441. package/dist/design-system/visual/digits.js +287 -0
  442. package/dist/design-system/visual/digits.js.map +1 -0
  443. package/dist/design-system/visual/index.d.ts +20 -0
  444. package/dist/design-system/visual/index.d.ts.map +1 -0
  445. package/dist/design-system/visual/index.js +23 -0
  446. package/dist/design-system/visual/index.js.map +1 -0
  447. package/dist/design-system/visual/splash-screen.d.ts +93 -0
  448. package/dist/design-system/visual/splash-screen.d.ts.map +1 -0
  449. package/dist/design-system/visual/splash-screen.js +219 -0
  450. package/dist/design-system/visual/splash-screen.js.map +1 -0
  451. package/dist/design-system/visual/tooltip.d.ts +188 -0
  452. package/dist/design-system/visual/tooltip.d.ts.map +1 -0
  453. package/dist/design-system/visual/tooltip.js +276 -0
  454. package/dist/design-system/visual/tooltip.js.map +1 -0
  455. package/dist/dev-tools/debugger.d.ts +223 -0
  456. package/dist/dev-tools/debugger.d.ts.map +1 -0
  457. package/dist/dev-tools/debugger.js +489 -0
  458. package/dist/dev-tools/debugger.js.map +1 -0
  459. package/dist/dev-tools/index.d.ts +22 -0
  460. package/dist/dev-tools/index.d.ts.map +1 -0
  461. package/dist/dev-tools/index.js +63 -0
  462. package/dist/dev-tools/index.js.map +1 -0
  463. package/dist/dev-tools/mouse-simulator.d.ts +155 -0
  464. package/dist/dev-tools/mouse-simulator.d.ts.map +1 -0
  465. package/dist/dev-tools/mouse-simulator.js +314 -0
  466. package/dist/dev-tools/mouse-simulator.js.map +1 -0
  467. package/dist/dev-tools/testing.d.ts +262 -0
  468. package/dist/dev-tools/testing.d.ts.map +1 -0
  469. package/dist/dev-tools/testing.js +858 -0
  470. package/dist/dev-tools/testing.js.map +1 -0
  471. package/dist/hooks/context.d.ts +47 -0
  472. package/dist/hooks/context.d.ts.map +1 -0
  473. package/dist/hooks/context.js +108 -0
  474. package/dist/hooks/context.js.map +1 -0
  475. package/dist/hooks/focus-context.d.ts +65 -0
  476. package/dist/hooks/focus-context.d.ts.map +1 -0
  477. package/dist/hooks/focus-context.js +79 -0
  478. package/dist/hooks/focus-context.js.map +1 -0
  479. package/dist/hooks/index.d.ts +16 -0
  480. package/dist/hooks/index.d.ts.map +1 -0
  481. package/dist/hooks/index.js +22 -0
  482. package/dist/hooks/index.js.map +1 -0
  483. package/dist/hooks/types.d.ts +76 -0
  484. package/dist/hooks/types.d.ts.map +1 -0
  485. package/dist/hooks/types.js +5 -0
  486. package/dist/hooks/types.js.map +1 -0
  487. package/dist/hooks/use-app.d.ts +27 -0
  488. package/dist/hooks/use-app.d.ts.map +1 -0
  489. package/dist/hooks/use-app.js +179 -0
  490. package/dist/hooks/use-app.js.map +1 -0
  491. package/dist/hooks/use-effect.d.ts +20 -0
  492. package/dist/hooks/use-effect.d.ts.map +1 -0
  493. package/dist/hooks/use-effect.js +55 -0
  494. package/dist/hooks/use-effect.js.map +1 -0
  495. package/dist/hooks/use-focus.d.ts +48 -0
  496. package/dist/hooks/use-focus.d.ts.map +1 -0
  497. package/dist/hooks/use-focus.js +152 -0
  498. package/dist/hooks/use-focus.js.map +1 -0
  499. package/dist/hooks/use-input.d.ts +35 -0
  500. package/dist/hooks/use-input.d.ts.map +1 -0
  501. package/dist/hooks/use-input.js +352 -0
  502. package/dist/hooks/use-input.js.map +1 -0
  503. package/dist/hooks/use-mouse.d.ts +82 -0
  504. package/dist/hooks/use-mouse.d.ts.map +1 -0
  505. package/dist/hooks/use-mouse.js +328 -0
  506. package/dist/hooks/use-mouse.js.map +1 -0
  507. package/dist/hooks/use-navigation.d.ts +206 -0
  508. package/dist/hooks/use-navigation.d.ts.map +1 -0
  509. package/dist/hooks/use-navigation.js +319 -0
  510. package/dist/hooks/use-navigation.js.map +1 -0
  511. package/dist/hooks/use-state.d.ts +15 -0
  512. package/dist/hooks/use-state.d.ts.map +1 -0
  513. package/dist/hooks/use-state.js +29 -0
  514. package/dist/hooks/use-state.js.map +1 -0
  515. package/dist/hooks/use-terminal-size.d.ts +12 -0
  516. package/dist/hooks/use-terminal-size.d.ts.map +1 -0
  517. package/dist/hooks/use-terminal-size.js +20 -0
  518. package/dist/hooks/use-terminal-size.js.map +1 -0
  519. package/dist/index.d.ts +85 -0
  520. package/dist/index.d.ts.map +1 -0
  521. package/dist/index.js +334 -0
  522. package/dist/index.js.map +1 -0
  523. package/dist/molecules/autocomplete.d.ts +166 -0
  524. package/dist/molecules/autocomplete.d.ts.map +1 -0
  525. package/dist/molecules/autocomplete.js +458 -0
  526. package/dist/molecules/autocomplete.js.map +1 -0
  527. package/dist/molecules/calendar.d.ts +144 -0
  528. package/dist/molecules/calendar.d.ts.map +1 -0
  529. package/dist/molecules/calendar.js +527 -0
  530. package/dist/molecules/calendar.js.map +1 -0
  531. package/dist/molecules/code-block.d.ts +88 -0
  532. package/dist/molecules/code-block.d.ts.map +1 -0
  533. package/dist/molecules/code-block.js +324 -0
  534. package/dist/molecules/code-block.js.map +1 -0
  535. package/dist/molecules/collapsible.d.ts +169 -0
  536. package/dist/molecules/collapsible.d.ts.map +1 -0
  537. package/dist/molecules/collapsible.js +289 -0
  538. package/dist/molecules/collapsible.js.map +1 -0
  539. package/dist/molecules/data-viz/bar-chart.d.ts +167 -0
  540. package/dist/molecules/data-viz/bar-chart.d.ts.map +1 -0
  541. package/dist/molecules/data-viz/bar-chart.js +375 -0
  542. package/dist/molecules/data-viz/bar-chart.js.map +1 -0
  543. package/dist/molecules/data-viz/gauge.d.ts +163 -0
  544. package/dist/molecules/data-viz/gauge.d.ts.map +1 -0
  545. package/dist/molecules/data-viz/gauge.js +451 -0
  546. package/dist/molecules/data-viz/gauge.js.map +1 -0
  547. package/dist/molecules/data-viz/heatmap.d.ts +154 -0
  548. package/dist/molecules/data-viz/heatmap.d.ts.map +1 -0
  549. package/dist/molecules/data-viz/heatmap.js +458 -0
  550. package/dist/molecules/data-viz/heatmap.js.map +1 -0
  551. package/dist/molecules/data-viz/index.d.ts +16 -0
  552. package/dist/molecules/data-viz/index.d.ts.map +1 -0
  553. package/dist/molecules/data-viz/index.js +16 -0
  554. package/dist/molecules/data-viz/index.js.map +1 -0
  555. package/dist/molecules/data-viz/line-chart.d.ts +157 -0
  556. package/dist/molecules/data-viz/line-chart.d.ts.map +1 -0
  557. package/dist/molecules/data-viz/line-chart.js +578 -0
  558. package/dist/molecules/data-viz/line-chart.js.map +1 -0
  559. package/dist/molecules/data-viz/sparkline.d.ts +156 -0
  560. package/dist/molecules/data-viz/sparkline.d.ts.map +1 -0
  561. package/dist/molecules/data-viz/sparkline.js +325 -0
  562. package/dist/molecules/data-viz/sparkline.js.map +1 -0
  563. package/dist/molecules/index.d.ts +22 -0
  564. package/dist/molecules/index.d.ts.map +1 -0
  565. package/dist/molecules/index.js +26 -0
  566. package/dist/molecules/index.js.map +1 -0
  567. package/dist/molecules/markdown.d.ts +61 -0
  568. package/dist/molecules/markdown.d.ts.map +1 -0
  569. package/dist/molecules/markdown.js +350 -0
  570. package/dist/molecules/markdown.js.map +1 -0
  571. package/dist/molecules/multi-select.d.ts +105 -0
  572. package/dist/molecules/multi-select.d.ts.map +1 -0
  573. package/dist/molecules/multi-select.js +312 -0
  574. package/dist/molecules/multi-select.js.map +1 -0
  575. package/dist/molecules/radio-group.d.ts +91 -0
  576. package/dist/molecules/radio-group.d.ts.map +1 -0
  577. package/dist/molecules/radio-group.js +148 -0
  578. package/dist/molecules/radio-group.js.map +1 -0
  579. package/dist/molecules/select.d.ts +119 -0
  580. package/dist/molecules/select.d.ts.map +1 -0
  581. package/dist/molecules/select.js +444 -0
  582. package/dist/molecules/select.js.map +1 -0
  583. package/dist/molecules/table.d.ts +106 -0
  584. package/dist/molecules/table.d.ts.map +1 -0
  585. package/dist/molecules/table.js +345 -0
  586. package/dist/molecules/table.js.map +1 -0
  587. package/dist/molecules/tabs.d.ts +132 -0
  588. package/dist/molecules/tabs.d.ts.map +1 -0
  589. package/dist/molecules/tabs.js +376 -0
  590. package/dist/molecules/tabs.js.map +1 -0
  591. package/dist/molecules/tree.d.ts +169 -0
  592. package/dist/molecules/tree.d.ts.map +1 -0
  593. package/dist/molecules/tree.js +431 -0
  594. package/dist/molecules/tree.js.map +1 -0
  595. package/dist/organisms/command-palette.d.ts +217 -0
  596. package/dist/organisms/command-palette.d.ts.map +1 -0
  597. package/dist/organisms/command-palette.js +443 -0
  598. package/dist/organisms/command-palette.js.map +1 -0
  599. package/dist/organisms/data-table.d.ts +173 -0
  600. package/dist/organisms/data-table.d.ts.map +1 -0
  601. package/dist/organisms/data-table.js +428 -0
  602. package/dist/organisms/data-table.js.map +1 -0
  603. package/dist/organisms/file-browser.d.ts +492 -0
  604. package/dist/organisms/file-browser.d.ts.map +1 -0
  605. package/dist/organisms/file-browser.js +807 -0
  606. package/dist/organisms/file-browser.js.map +1 -0
  607. package/dist/organisms/grid.d.ts +234 -0
  608. package/dist/organisms/grid.d.ts.map +1 -0
  609. package/dist/organisms/grid.js +719 -0
  610. package/dist/organisms/grid.js.map +1 -0
  611. package/dist/organisms/index.d.ts +30 -0
  612. package/dist/organisms/index.d.ts.map +1 -0
  613. package/dist/organisms/index.js +92 -0
  614. package/dist/organisms/index.js.map +1 -0
  615. package/dist/organisms/modal.d.ts +251 -0
  616. package/dist/organisms/modal.d.ts.map +1 -0
  617. package/dist/organisms/modal.js +461 -0
  618. package/dist/organisms/modal.js.map +1 -0
  619. package/dist/organisms/overlay-stack.d.ts +200 -0
  620. package/dist/organisms/overlay-stack.d.ts.map +1 -0
  621. package/dist/organisms/overlay-stack.js +341 -0
  622. package/dist/organisms/overlay-stack.js.map +1 -0
  623. package/dist/organisms/scroll-area.d.ts +188 -0
  624. package/dist/organisms/scroll-area.d.ts.map +1 -0
  625. package/dist/organisms/scroll-area.js +348 -0
  626. package/dist/organisms/scroll-area.js.map +1 -0
  627. package/dist/organisms/split-panel.d.ts +183 -0
  628. package/dist/organisms/split-panel.d.ts.map +1 -0
  629. package/dist/organisms/split-panel.js +323 -0
  630. package/dist/organisms/split-panel.js.map +1 -0
  631. package/dist/primitives/canvas.d.ts +322 -0
  632. package/dist/primitives/canvas.d.ts.map +1 -0
  633. package/dist/primitives/canvas.js +833 -0
  634. package/dist/primitives/canvas.js.map +1 -0
  635. package/dist/primitives/context.d.ts +83 -0
  636. package/dist/primitives/context.d.ts.map +1 -0
  637. package/dist/primitives/context.js +101 -0
  638. package/dist/primitives/context.js.map +1 -0
  639. package/dist/primitives/divider.d.ts +52 -0
  640. package/dist/primitives/divider.d.ts.map +1 -0
  641. package/dist/primitives/divider.js +71 -0
  642. package/dist/primitives/divider.js.map +1 -0
  643. package/dist/primitives/index.d.ts +10 -0
  644. package/dist/primitives/index.d.ts.map +1 -0
  645. package/dist/primitives/index.js +10 -0
  646. package/dist/primitives/index.js.map +1 -0
  647. package/dist/primitives/nodes.d.ts +152 -0
  648. package/dist/primitives/nodes.d.ts.map +1 -0
  649. package/dist/primitives/nodes.js +164 -0
  650. package/dist/primitives/nodes.js.map +1 -0
  651. package/dist/primitives/signal.d.ts +136 -0
  652. package/dist/primitives/signal.d.ts.map +1 -0
  653. package/dist/primitives/signal.js +338 -0
  654. package/dist/primitives/signal.js.map +1 -0
  655. package/dist/primitives/store.d.ts +86 -0
  656. package/dist/primitives/store.d.ts.map +1 -0
  657. package/dist/primitives/store.js +147 -0
  658. package/dist/primitives/store.js.map +1 -0
  659. package/dist/storybook/app.d.ts +16 -0
  660. package/dist/storybook/app.d.ts.map +1 -0
  661. package/dist/storybook/app.js +697 -0
  662. package/dist/storybook/app.js.map +1 -0
  663. package/dist/storybook/cli.d.ts +10 -0
  664. package/dist/storybook/cli.d.ts.map +1 -0
  665. package/dist/storybook/cli.js +14 -0
  666. package/dist/storybook/cli.js.map +1 -0
  667. package/dist/storybook/components/compare-view.d.ts +46 -0
  668. package/dist/storybook/components/compare-view.d.ts.map +1 -0
  669. package/dist/storybook/components/compare-view.js +235 -0
  670. package/dist/storybook/components/compare-view.js.map +1 -0
  671. package/dist/storybook/components/index.d.ts +7 -0
  672. package/dist/storybook/components/index.d.ts.map +1 -0
  673. package/dist/storybook/components/index.js +7 -0
  674. package/dist/storybook/components/index.js.map +1 -0
  675. package/dist/storybook/components/log-viewer.d.ts +9 -0
  676. package/dist/storybook/components/log-viewer.d.ts.map +1 -0
  677. package/dist/storybook/components/log-viewer.js +46 -0
  678. package/dist/storybook/components/log-viewer.js.map +1 -0
  679. package/dist/storybook/components/preview.d.ts +28 -0
  680. package/dist/storybook/components/preview.d.ts.map +1 -0
  681. package/dist/storybook/components/preview.js +248 -0
  682. package/dist/storybook/components/preview.js.map +1 -0
  683. package/dist/storybook/components/sidebar.d.ts +29 -0
  684. package/dist/storybook/components/sidebar.d.ts.map +1 -0
  685. package/dist/storybook/components/sidebar.js +176 -0
  686. package/dist/storybook/components/sidebar.js.map +1 -0
  687. package/dist/storybook/core/comparatives.d.ts +94 -0
  688. package/dist/storybook/core/comparatives.d.ts.map +1 -0
  689. package/dist/storybook/core/comparatives.js +301 -0
  690. package/dist/storybook/core/comparatives.js.map +1 -0
  691. package/dist/storybook/core/index.d.ts +8 -0
  692. package/dist/storybook/core/index.d.ts.map +1 -0
  693. package/dist/storybook/core/index.js +8 -0
  694. package/dist/storybook/core/index.js.map +1 -0
  695. package/dist/storybook/core/navigator.d.ts +64 -0
  696. package/dist/storybook/core/navigator.d.ts.map +1 -0
  697. package/dist/storybook/core/navigator.js +279 -0
  698. package/dist/storybook/core/navigator.js.map +1 -0
  699. package/dist/storybook/core/playground.d.ts +73 -0
  700. package/dist/storybook/core/playground.d.ts.map +1 -0
  701. package/dist/storybook/core/playground.js +338 -0
  702. package/dist/storybook/core/playground.js.map +1 -0
  703. package/dist/storybook/core/registry.d.ts +87 -0
  704. package/dist/storybook/core/registry.d.ts.map +1 -0
  705. package/dist/storybook/core/registry.js +222 -0
  706. package/dist/storybook/core/registry.js.map +1 -0
  707. package/dist/storybook/data/ascii-art.d.ts +18 -0
  708. package/dist/storybook/data/ascii-art.d.ts.map +1 -0
  709. package/dist/storybook/data/ascii-art.js +62 -0
  710. package/dist/storybook/data/ascii-art.js.map +1 -0
  711. package/dist/storybook/data/tuiuiu-bird-colored.d.ts +13 -0
  712. package/dist/storybook/data/tuiuiu-bird-colored.d.ts.map +1 -0
  713. package/dist/storybook/data/tuiuiu-bird-colored.js +12 -0
  714. package/dist/storybook/data/tuiuiu-bird-colored.js.map +1 -0
  715. package/dist/storybook/index.d.ts +33 -0
  716. package/dist/storybook/index.d.ts.map +1 -0
  717. package/dist/storybook/index.js +44 -0
  718. package/dist/storybook/index.js.map +1 -0
  719. package/dist/storybook/store.d.ts +39 -0
  720. package/dist/storybook/store.d.ts.map +1 -0
  721. package/dist/storybook/store.js +91 -0
  722. package/dist/storybook/store.js.map +1 -0
  723. package/dist/storybook/stories/apps/index.d.ts +24 -0
  724. package/dist/storybook/stories/apps/index.d.ts.map +1 -0
  725. package/dist/storybook/stories/apps/index.js +434 -0
  726. package/dist/storybook/stories/apps/index.js.map +1 -0
  727. package/dist/storybook/stories/atoms/index.d.ts +40 -0
  728. package/dist/storybook/stories/atoms/index.d.ts.map +1 -0
  729. package/dist/storybook/stories/atoms/index.js +462 -0
  730. package/dist/storybook/stories/atoms/index.js.map +1 -0
  731. package/dist/storybook/stories/index.d.ts +37 -0
  732. package/dist/storybook/stories/index.d.ts.map +1 -0
  733. package/dist/storybook/stories/index.js +56 -0
  734. package/dist/storybook/stories/index.js.map +1 -0
  735. package/dist/storybook/stories/molecules/index.d.ts +68 -0
  736. package/dist/storybook/stories/molecules/index.d.ts.map +1 -0
  737. package/dist/storybook/stories/molecules/index.js +587 -0
  738. package/dist/storybook/stories/molecules/index.js.map +1 -0
  739. package/dist/storybook/stories/organisms/index.d.ts +29 -0
  740. package/dist/storybook/stories/organisms/index.d.ts.map +1 -0
  741. package/dist/storybook/stories/organisms/index.js +677 -0
  742. package/dist/storybook/stories/organisms/index.js.map +1 -0
  743. package/dist/storybook/types.d.ts +40 -0
  744. package/dist/storybook/types.d.ts.map +1 -0
  745. package/dist/storybook/types.js +5 -0
  746. package/dist/storybook/types.js.map +1 -0
  747. package/dist/styling/index.d.ts +12 -0
  748. package/dist/styling/index.d.ts.map +1 -0
  749. package/dist/styling/index.js +24 -0
  750. package/dist/styling/index.js.map +1 -0
  751. package/dist/styling/parser.d.ts +217 -0
  752. package/dist/styling/parser.d.ts.map +1 -0
  753. package/dist/styling/parser.js +901 -0
  754. package/dist/styling/parser.js.map +1 -0
  755. package/dist/styling/resolver.d.ts +217 -0
  756. package/dist/styling/resolver.d.ts.map +1 -0
  757. package/dist/styling/resolver.js +628 -0
  758. package/dist/styling/resolver.js.map +1 -0
  759. package/dist/styling/tokenizer.d.ts +121 -0
  760. package/dist/styling/tokenizer.d.ts.map +1 -0
  761. package/dist/styling/tokenizer.js +553 -0
  762. package/dist/styling/tokenizer.js.map +1 -0
  763. package/dist/templates/app.d.ts +205 -0
  764. package/dist/templates/app.d.ts.map +1 -0
  765. package/dist/templates/app.js +286 -0
  766. package/dist/templates/app.js.map +1 -0
  767. package/dist/templates/index.d.ts +30 -0
  768. package/dist/templates/index.d.ts.map +1 -0
  769. package/dist/templates/index.js +40 -0
  770. package/dist/templates/index.js.map +1 -0
  771. package/dist/templates/stack.d.ts +189 -0
  772. package/dist/templates/stack.d.ts.map +1 -0
  773. package/dist/templates/stack.js +170 -0
  774. package/dist/templates/stack.js.map +1 -0
  775. package/dist/utils/batcher.d.ts +88 -0
  776. package/dist/utils/batcher.d.ts.map +1 -0
  777. package/dist/utils/batcher.js +172 -0
  778. package/dist/utils/batcher.js.map +1 -0
  779. package/dist/utils/cursor.d.ts +28 -0
  780. package/dist/utils/cursor.d.ts.map +1 -0
  781. package/dist/utils/cursor.js +86 -0
  782. package/dist/utils/cursor.js.map +1 -0
  783. package/dist/utils/fs-storage.d.ts +23 -0
  784. package/dist/utils/fs-storage.d.ts.map +1 -0
  785. package/dist/utils/fs-storage.js +34 -0
  786. package/dist/utils/fs-storage.js.map +1 -0
  787. package/dist/utils/index.d.ts +14 -0
  788. package/dist/utils/index.d.ts.map +1 -0
  789. package/dist/utils/index.js +15 -0
  790. package/dist/utils/index.js.map +1 -0
  791. package/dist/utils/log-update.d.ts +31 -0
  792. package/dist/utils/log-update.d.ts.map +1 -0
  793. package/dist/utils/log-update.js +147 -0
  794. package/dist/utils/log-update.js.map +1 -0
  795. package/dist/utils/text-utils.d.ts +151 -0
  796. package/dist/utils/text-utils.d.ts.map +1 -0
  797. package/dist/utils/text-utils.js +699 -0
  798. package/dist/utils/text-utils.js.map +1 -0
  799. package/dist/utils/types.d.ts +205 -0
  800. package/dist/utils/types.d.ts.map +1 -0
  801. package/dist/utils/types.js +430 -0
  802. package/dist/utils/types.js.map +1 -0
  803. package/package.json +142 -0
@@ -0,0 +1,858 @@
1
+ /**
2
+ * Testing Utilities - Tools for testing tuiuiu applications
3
+ *
4
+ * Provides:
5
+ * - Terminal Simulator: Mock terminal for testing
6
+ * - Snapshot Testing: Compare rendered output
7
+ * - Event Simulation: Simulate user input
8
+ * - Accessibility Checker: Validate a11y requirements
9
+ * - Test Harness: Complete testing environment
10
+ */
11
+ // =============================================================================
12
+ // Terminal Simulator
13
+ // =============================================================================
14
+ /**
15
+ * Simulated terminal for testing
16
+ */
17
+ export class TerminalSimulator {
18
+ state;
19
+ size;
20
+ output = [];
21
+ inputQueue = [];
22
+ eventHandlers = new Map();
23
+ constructor(columns = 80, rows = 24) {
24
+ this.size = { columns, rows };
25
+ this.state = this.createInitialState();
26
+ }
27
+ createInitialState() {
28
+ const cells = [];
29
+ for (let y = 0; y < this.size.rows; y++) {
30
+ const row = [];
31
+ for (let x = 0; x < this.size.columns; x++) {
32
+ row.push({ char: ' ' });
33
+ }
34
+ cells.push(row);
35
+ }
36
+ return {
37
+ cells,
38
+ cursor: { x: 0, y: 0 },
39
+ cursorVisible: true,
40
+ title: '',
41
+ alternateScreen: false,
42
+ mouseEnabled: false,
43
+ bracketedPaste: false,
44
+ };
45
+ }
46
+ /**
47
+ * Get terminal size
48
+ */
49
+ getSize() {
50
+ return { ...this.size };
51
+ }
52
+ /**
53
+ * Resize terminal
54
+ */
55
+ resize(columns, rows) {
56
+ this.size = { columns, rows };
57
+ this.state = this.createInitialState();
58
+ this.emit('resize', this.size);
59
+ }
60
+ /**
61
+ * Write to terminal (process ANSI sequences)
62
+ */
63
+ write(data) {
64
+ this.output.push(data);
65
+ this.processOutput(data);
66
+ }
67
+ /**
68
+ * Get raw output
69
+ */
70
+ getOutput() {
71
+ return [...this.output];
72
+ }
73
+ /**
74
+ * Get combined output
75
+ */
76
+ getOutputString() {
77
+ return this.output.join('');
78
+ }
79
+ /**
80
+ * Clear output buffer
81
+ */
82
+ clearOutput() {
83
+ this.output = [];
84
+ }
85
+ /**
86
+ * Get current terminal state
87
+ */
88
+ getState() {
89
+ return {
90
+ ...this.state,
91
+ cells: this.state.cells.map((row) => row.map((cell) => ({ ...cell }))),
92
+ cursor: { ...this.state.cursor },
93
+ };
94
+ }
95
+ /**
96
+ * Get cell at position
97
+ */
98
+ getCell(x, y) {
99
+ if (y >= 0 && y < this.size.rows && x >= 0 && x < this.size.columns) {
100
+ return { ...this.state.cells[y][x] };
101
+ }
102
+ return null;
103
+ }
104
+ /**
105
+ * Get row as string
106
+ */
107
+ getRow(y) {
108
+ if (y >= 0 && y < this.size.rows) {
109
+ return this.state.cells[y].map((c) => c.char).join('');
110
+ }
111
+ return '';
112
+ }
113
+ /**
114
+ * Get screen as string array
115
+ */
116
+ getScreen() {
117
+ return this.state.cells.map((row) => row.map((c) => c.char).join(''));
118
+ }
119
+ /**
120
+ * Get screen as single string
121
+ */
122
+ getScreenString() {
123
+ return this.getScreen().join('\n');
124
+ }
125
+ /**
126
+ * Simulate key press
127
+ */
128
+ sendKey(event) {
129
+ const sequence = this.keyToSequence(event);
130
+ this.inputQueue.push(sequence);
131
+ this.emit('data', sequence);
132
+ }
133
+ /**
134
+ * Simulate text input
135
+ */
136
+ sendText(text) {
137
+ for (const char of text) {
138
+ this.sendKey({ key: char });
139
+ }
140
+ }
141
+ /**
142
+ * Simulate mouse event
143
+ */
144
+ sendMouse(event) {
145
+ if (!this.state.mouseEnabled)
146
+ return;
147
+ const sequence = this.mouseToSequence(event);
148
+ this.inputQueue.push(sequence);
149
+ this.emit('data', sequence);
150
+ }
151
+ /**
152
+ * Simulate paste
153
+ */
154
+ sendPaste(text) {
155
+ if (this.state.bracketedPaste) {
156
+ this.inputQueue.push(`\x1b[200~${text}\x1b[201~`);
157
+ this.emit('data', `\x1b[200~${text}\x1b[201~`);
158
+ }
159
+ else {
160
+ this.sendText(text);
161
+ }
162
+ }
163
+ /**
164
+ * Get cursor position
165
+ */
166
+ getCursor() {
167
+ return { ...this.state.cursor };
168
+ }
169
+ /**
170
+ * Check if cursor is visible
171
+ */
172
+ isCursorVisible() {
173
+ return this.state.cursorVisible;
174
+ }
175
+ /**
176
+ * Get window title
177
+ */
178
+ getTitle() {
179
+ return this.state.title;
180
+ }
181
+ /**
182
+ * Register event handler
183
+ */
184
+ on(event, handler) {
185
+ if (!this.eventHandlers.has(event)) {
186
+ this.eventHandlers.set(event, []);
187
+ }
188
+ this.eventHandlers.get(event).push(handler);
189
+ }
190
+ /**
191
+ * Remove event handler
192
+ */
193
+ off(event, handler) {
194
+ const handlers = this.eventHandlers.get(event);
195
+ if (handlers) {
196
+ const index = handlers.indexOf(handler);
197
+ if (index !== -1) {
198
+ handlers.splice(index, 1);
199
+ }
200
+ }
201
+ }
202
+ /**
203
+ * Emit event
204
+ */
205
+ emit(event, ...args) {
206
+ const handlers = this.eventHandlers.get(event);
207
+ if (handlers) {
208
+ for (const handler of handlers) {
209
+ handler(...args);
210
+ }
211
+ }
212
+ }
213
+ /**
214
+ * Reset terminal
215
+ */
216
+ reset() {
217
+ this.state = this.createInitialState();
218
+ this.output = [];
219
+ this.inputQueue = [];
220
+ }
221
+ /**
222
+ * Process ANSI output
223
+ */
224
+ processOutput(data) {
225
+ let i = 0;
226
+ while (i < data.length) {
227
+ if (data[i] === '\x1b') {
228
+ // ESC sequence
229
+ const result = this.parseEscapeSequence(data, i);
230
+ i = result.nextIndex;
231
+ }
232
+ else if (data[i] === '\n') {
233
+ // Newline
234
+ this.state.cursor.y++;
235
+ this.state.cursor.x = 0;
236
+ i++;
237
+ }
238
+ else if (data[i] === '\r') {
239
+ // Carriage return
240
+ this.state.cursor.x = 0;
241
+ i++;
242
+ }
243
+ else if (data[i] === '\t') {
244
+ // Tab
245
+ this.state.cursor.x = Math.min(this.state.cursor.x + (8 - (this.state.cursor.x % 8)), this.size.columns - 1);
246
+ i++;
247
+ }
248
+ else {
249
+ // Regular character
250
+ this.writeChar(data[i]);
251
+ i++;
252
+ }
253
+ }
254
+ }
255
+ writeChar(char) {
256
+ const { x, y } = this.state.cursor;
257
+ if (y >= 0 && y < this.size.rows && x >= 0 && x < this.size.columns) {
258
+ this.state.cells[y][x].char = char;
259
+ this.state.cursor.x++;
260
+ if (this.state.cursor.x >= this.size.columns) {
261
+ this.state.cursor.x = 0;
262
+ this.state.cursor.y++;
263
+ }
264
+ }
265
+ }
266
+ parseEscapeSequence(data, start) {
267
+ if (start + 1 >= data.length) {
268
+ return { nextIndex: start + 1 };
269
+ }
270
+ const next = data[start + 1];
271
+ // CSI sequence
272
+ if (next === '[') {
273
+ return this.parseCSI(data, start + 2);
274
+ }
275
+ // OSC sequence
276
+ if (next === ']') {
277
+ return this.parseOSC(data, start + 2);
278
+ }
279
+ // Other sequences
280
+ return { nextIndex: start + 2 };
281
+ }
282
+ parseCSI(data, start) {
283
+ let params = '';
284
+ let i = start;
285
+ // Collect parameters
286
+ while (i < data.length && /[0-9;?]/.test(data[i])) {
287
+ params += data[i];
288
+ i++;
289
+ }
290
+ if (i >= data.length) {
291
+ return { nextIndex: i };
292
+ }
293
+ const cmd = data[i];
294
+ i++;
295
+ // Process CSI command
296
+ switch (cmd) {
297
+ case 'H': // Cursor position
298
+ case 'f': {
299
+ const [row, col] = params.split(';').map((n) => parseInt(n) || 1);
300
+ this.state.cursor.y = (row ?? 1) - 1;
301
+ this.state.cursor.x = (col ?? 1) - 1;
302
+ break;
303
+ }
304
+ case 'A': // Cursor up
305
+ this.state.cursor.y -= parseInt(params) || 1;
306
+ break;
307
+ case 'B': // Cursor down
308
+ this.state.cursor.y += parseInt(params) || 1;
309
+ break;
310
+ case 'C': // Cursor forward
311
+ this.state.cursor.x += parseInt(params) || 1;
312
+ break;
313
+ case 'D': // Cursor back
314
+ this.state.cursor.x -= parseInt(params) || 1;
315
+ break;
316
+ case 'J': // Erase display
317
+ this.eraseDisplay(parseInt(params) || 0);
318
+ break;
319
+ case 'K': // Erase line
320
+ this.eraseLine(parseInt(params) || 0);
321
+ break;
322
+ case 'h': // Set mode
323
+ this.setMode(params, true);
324
+ break;
325
+ case 'l': // Reset mode
326
+ this.setMode(params, false);
327
+ break;
328
+ case 'm': // SGR (style)
329
+ // Ignore for now - could track styles
330
+ break;
331
+ }
332
+ return { nextIndex: i };
333
+ }
334
+ parseOSC(data, start) {
335
+ // Find ST (string terminator)
336
+ let i = start;
337
+ while (i < data.length) {
338
+ if (data[i] === '\x07' || (data[i] === '\x1b' && data[i + 1] === '\\')) {
339
+ break;
340
+ }
341
+ i++;
342
+ }
343
+ const content = data.slice(start, i);
344
+ const semicolon = content.indexOf(';');
345
+ if (semicolon !== -1) {
346
+ const code = content.slice(0, semicolon);
347
+ const value = content.slice(semicolon + 1);
348
+ if (code === '0' || code === '2') {
349
+ this.state.title = value;
350
+ }
351
+ }
352
+ return { nextIndex: data[i] === '\x1b' ? i + 2 : i + 1 };
353
+ }
354
+ eraseDisplay(mode) {
355
+ switch (mode) {
356
+ case 0: // From cursor to end
357
+ for (let y = this.state.cursor.y; y < this.size.rows; y++) {
358
+ const startX = y === this.state.cursor.y ? this.state.cursor.x : 0;
359
+ for (let x = startX; x < this.size.columns; x++) {
360
+ this.state.cells[y][x].char = ' ';
361
+ }
362
+ }
363
+ break;
364
+ case 1: // From start to cursor
365
+ for (let y = 0; y <= this.state.cursor.y; y++) {
366
+ const endX = y === this.state.cursor.y ? this.state.cursor.x : this.size.columns;
367
+ for (let x = 0; x < endX; x++) {
368
+ this.state.cells[y][x].char = ' ';
369
+ }
370
+ }
371
+ break;
372
+ case 2: // Entire screen
373
+ case 3:
374
+ for (let y = 0; y < this.size.rows; y++) {
375
+ for (let x = 0; x < this.size.columns; x++) {
376
+ this.state.cells[y][x].char = ' ';
377
+ }
378
+ }
379
+ break;
380
+ }
381
+ }
382
+ eraseLine(mode) {
383
+ const y = this.state.cursor.y;
384
+ if (y < 0 || y >= this.size.rows)
385
+ return;
386
+ switch (mode) {
387
+ case 0: // From cursor to end
388
+ for (let x = this.state.cursor.x; x < this.size.columns; x++) {
389
+ this.state.cells[y][x].char = ' ';
390
+ }
391
+ break;
392
+ case 1: // From start to cursor
393
+ for (let x = 0; x <= this.state.cursor.x; x++) {
394
+ this.state.cells[y][x].char = ' ';
395
+ }
396
+ break;
397
+ case 2: // Entire line
398
+ for (let x = 0; x < this.size.columns; x++) {
399
+ this.state.cells[y][x].char = ' ';
400
+ }
401
+ break;
402
+ }
403
+ }
404
+ setMode(params, enable) {
405
+ if (params.startsWith('?')) {
406
+ const mode = parseInt(params.slice(1));
407
+ switch (mode) {
408
+ case 25: // Cursor visibility
409
+ this.state.cursorVisible = enable;
410
+ break;
411
+ case 1000: // Mouse tracking
412
+ case 1002:
413
+ case 1003:
414
+ case 1006:
415
+ this.state.mouseEnabled = enable;
416
+ break;
417
+ case 1049: // Alternate screen
418
+ this.state.alternateScreen = enable;
419
+ break;
420
+ case 2004: // Bracketed paste
421
+ this.state.bracketedPaste = enable;
422
+ break;
423
+ }
424
+ }
425
+ }
426
+ keyToSequence(event) {
427
+ let seq = '';
428
+ // Special keys
429
+ const specialKeys = {
430
+ enter: '\r',
431
+ return: '\r',
432
+ escape: '\x1b',
433
+ esc: '\x1b',
434
+ tab: '\t',
435
+ backspace: '\x7f',
436
+ delete: '\x1b[3~',
437
+ up: '\x1b[A',
438
+ down: '\x1b[B',
439
+ right: '\x1b[C',
440
+ left: '\x1b[D',
441
+ home: '\x1b[H',
442
+ end: '\x1b[F',
443
+ pageup: '\x1b[5~',
444
+ pagedown: '\x1b[6~',
445
+ insert: '\x1b[2~',
446
+ f1: '\x1bOP',
447
+ f2: '\x1bOQ',
448
+ f3: '\x1bOR',
449
+ f4: '\x1bOS',
450
+ f5: '\x1b[15~',
451
+ f6: '\x1b[17~',
452
+ f7: '\x1b[18~',
453
+ f8: '\x1b[19~',
454
+ f9: '\x1b[20~',
455
+ f10: '\x1b[21~',
456
+ f11: '\x1b[23~',
457
+ f12: '\x1b[24~',
458
+ space: ' ',
459
+ };
460
+ const key = event.key.toLowerCase();
461
+ if (specialKeys[key]) {
462
+ seq = specialKeys[key];
463
+ }
464
+ else if (event.key.length === 1) {
465
+ seq = event.key;
466
+ }
467
+ // Apply modifiers
468
+ if (event.ctrl && seq.length === 1) {
469
+ const code = seq.charCodeAt(0);
470
+ if (code >= 97 && code <= 122) {
471
+ // a-z
472
+ seq = String.fromCharCode(code - 96);
473
+ }
474
+ }
475
+ if (event.alt && seq.length === 1) {
476
+ seq = '\x1b' + seq;
477
+ }
478
+ return seq;
479
+ }
480
+ mouseToSequence(event) {
481
+ // SGR mouse encoding
482
+ const buttonMap = { left: 0, middle: 1, right: 2, none: 3 };
483
+ let button = buttonMap[event.button];
484
+ if (event.action === 'scroll') {
485
+ button = event.scrollDirection === 'up' ? 64 : 65;
486
+ }
487
+ else if (event.action === 'move') {
488
+ button = 32 + button;
489
+ }
490
+ if (event.shift)
491
+ button += 4;
492
+ if (event.alt)
493
+ button += 8;
494
+ if (event.ctrl)
495
+ button += 16;
496
+ const action = event.action === 'release' ? 'm' : 'M';
497
+ return `\x1b[<${button};${event.x + 1};${event.y + 1}${action}`;
498
+ }
499
+ }
500
+ // =============================================================================
501
+ // Snapshot Testing
502
+ // =============================================================================
503
+ /**
504
+ * Create a snapshot of rendered output
505
+ */
506
+ export function createSnapshot(output, options = {}) {
507
+ let snapshot = output;
508
+ if (options.normalize) {
509
+ // Remove ANSI codes if not including styles
510
+ if (!options.includeStyles) {
511
+ snapshot = stripAnsi(snapshot);
512
+ }
513
+ // Normalize whitespace
514
+ snapshot = snapshot
515
+ .split('\n')
516
+ .map((line) => line.trimEnd())
517
+ .join('\n')
518
+ .trimEnd();
519
+ }
520
+ return snapshot;
521
+ }
522
+ /**
523
+ * Compare snapshots
524
+ */
525
+ export function compareSnapshots(expected, actual) {
526
+ const expectedLines = expected.split('\n');
527
+ const actualLines = actual.split('\n');
528
+ const differences = [];
529
+ const maxLines = Math.max(expectedLines.length, actualLines.length);
530
+ for (let i = 0; i < maxLines; i++) {
531
+ const exp = expectedLines[i] ?? '';
532
+ const act = actualLines[i] ?? '';
533
+ if (exp !== act) {
534
+ differences.push({
535
+ line: i + 1,
536
+ expected: exp,
537
+ actual: act,
538
+ });
539
+ }
540
+ }
541
+ return {
542
+ matches: differences.length === 0,
543
+ differences,
544
+ };
545
+ }
546
+ /**
547
+ * Format snapshot diff for display
548
+ */
549
+ export function formatSnapshotDiff(diff) {
550
+ if (diff.matches) {
551
+ return 'Snapshots match';
552
+ }
553
+ const lines = ['Snapshot differences:', ''];
554
+ for (const d of diff.differences) {
555
+ lines.push(`Line ${d.line}:`);
556
+ lines.push(` - ${d.expected}`);
557
+ lines.push(` + ${d.actual}`);
558
+ lines.push('');
559
+ }
560
+ return lines.join('\n');
561
+ }
562
+ /**
563
+ * Strip ANSI codes from string
564
+ */
565
+ export function stripAnsi(str) {
566
+ // eslint-disable-next-line no-control-regex
567
+ return str.replace(/\x1b\[[0-9;]*[a-zA-Z]/g, '');
568
+ }
569
+ /**
570
+ * Create event simulator for terminal
571
+ */
572
+ export function createEventSimulator(terminal) {
573
+ return {
574
+ keyPress(key, modifiers = {}) {
575
+ terminal.sendKey({ key, ...modifiers });
576
+ },
577
+ keyDown(key, modifiers = {}) {
578
+ // For simulation, keyDown is same as keyPress
579
+ terminal.sendKey({ key, ...modifiers });
580
+ },
581
+ keyUp(_key, _modifiers = {}) {
582
+ // Terminal doesn't have separate keyup events
583
+ },
584
+ async type(text, delay = 0) {
585
+ for (const char of text) {
586
+ terminal.sendKey({ key: char });
587
+ if (delay > 0) {
588
+ await new Promise((resolve) => setTimeout(resolve, delay));
589
+ }
590
+ }
591
+ },
592
+ click(x, y, button = 'left') {
593
+ terminal.sendMouse({ x, y, button, action: 'press' });
594
+ terminal.sendMouse({ x, y, button, action: 'release' });
595
+ },
596
+ doubleClick(x, y) {
597
+ this.click(x, y);
598
+ this.click(x, y);
599
+ },
600
+ rightClick(x, y) {
601
+ this.click(x, y, 'right');
602
+ },
603
+ drag(fromX, fromY, toX, toY) {
604
+ terminal.sendMouse({ x: fromX, y: fromY, button: 'left', action: 'press' });
605
+ // Simulate movement
606
+ const steps = Math.max(Math.abs(toX - fromX), Math.abs(toY - fromY));
607
+ for (let i = 1; i <= steps; i++) {
608
+ const x = Math.round(fromX + ((toX - fromX) * i) / steps);
609
+ const y = Math.round(fromY + ((toY - fromY) * i) / steps);
610
+ terminal.sendMouse({ x, y, button: 'left', action: 'move' });
611
+ }
612
+ terminal.sendMouse({ x: toX, y: toY, button: 'left', action: 'release' });
613
+ },
614
+ scroll(x, y, direction, amount = 3) {
615
+ for (let i = 0; i < amount; i++) {
616
+ terminal.sendMouse({
617
+ x,
618
+ y,
619
+ button: 'none',
620
+ action: 'scroll',
621
+ scrollDirection: direction,
622
+ });
623
+ }
624
+ },
625
+ paste(text) {
626
+ terminal.sendPaste(text);
627
+ },
628
+ resize(columns, rows) {
629
+ terminal.resize(columns, rows);
630
+ },
631
+ };
632
+ }
633
+ // =============================================================================
634
+ // Accessibility Checker
635
+ // =============================================================================
636
+ /**
637
+ * Check accessibility of VNode tree
638
+ */
639
+ export function checkAccessibility(node) {
640
+ const issues = [];
641
+ function check(n, path) {
642
+ const props = n.props || {};
643
+ const type = typeof n.type === 'string' ? n.type : n.type?.name || 'Component';
644
+ // Check for missing labels on interactive elements
645
+ const interactiveTypes = ['button', 'input', 'select', 'textinput', 'checkbox'];
646
+ if (interactiveTypes.includes(type.toLowerCase())) {
647
+ if (!props.label && !props['aria-label'] && !props['aria-labelledby']) {
648
+ issues.push({
649
+ type: 'error',
650
+ code: 'missing-label',
651
+ message: `Interactive element "${type}" is missing a label`,
652
+ node: n,
653
+ path,
654
+ });
655
+ }
656
+ }
657
+ // Check for focusable elements without tabIndex
658
+ if (props.focusable === true && props.tabIndex === undefined) {
659
+ issues.push({
660
+ type: 'warning',
661
+ code: 'missing-tabindex',
662
+ message: `Focusable element "${type}" should have explicit tabIndex`,
663
+ node: n,
664
+ path,
665
+ });
666
+ }
667
+ // Check for images without alt text
668
+ if (type.toLowerCase() === 'image' || type.toLowerCase() === 'picture') {
669
+ if (!props.alt && !props['aria-label']) {
670
+ issues.push({
671
+ type: 'error',
672
+ code: 'missing-alt',
673
+ message: `Image element is missing alt text`,
674
+ node: n,
675
+ path,
676
+ });
677
+ }
678
+ }
679
+ // Check for color contrast issues (basic check)
680
+ if (props.color && props.backgroundColor) {
681
+ const hasLowContrast = checkLowContrast(props.color, props.backgroundColor);
682
+ if (hasLowContrast) {
683
+ issues.push({
684
+ type: 'warning',
685
+ code: 'low-contrast',
686
+ message: `Potential low contrast between "${props.color}" and "${props.backgroundColor}"`,
687
+ node: n,
688
+ path,
689
+ });
690
+ }
691
+ }
692
+ // Check for keyboard accessibility
693
+ if (props.onClick && !props.onKeyPress && !props.focusable) {
694
+ issues.push({
695
+ type: 'warning',
696
+ code: 'click-no-keyboard',
697
+ message: `Element with onClick should be keyboard accessible`,
698
+ node: n,
699
+ path,
700
+ });
701
+ }
702
+ // Check for heading hierarchy
703
+ if (type === 'heading' || props.role === 'heading') {
704
+ if (!props.level && !props['aria-level']) {
705
+ issues.push({
706
+ type: 'info',
707
+ code: 'heading-no-level',
708
+ message: `Heading should have explicit level for screen readers`,
709
+ node: n,
710
+ path,
711
+ });
712
+ }
713
+ }
714
+ // Recursively check children
715
+ const children = n.children || [];
716
+ let childIndex = 0;
717
+ for (const child of children) {
718
+ if (child && typeof child === 'object' && 'type' in child) {
719
+ check(child, `${path}.${childIndex}`);
720
+ childIndex++;
721
+ }
722
+ }
723
+ }
724
+ check(node, '0');
725
+ return {
726
+ valid: issues.filter((i) => i.type === 'error').length === 0,
727
+ issues,
728
+ summary: {
729
+ errors: issues.filter((i) => i.type === 'error').length,
730
+ warnings: issues.filter((i) => i.type === 'warning').length,
731
+ info: issues.filter((i) => i.type === 'info').length,
732
+ },
733
+ };
734
+ }
735
+ /**
736
+ * Basic low contrast check (simplified)
737
+ */
738
+ function checkLowContrast(fg, bg) {
739
+ // Simple check for obviously problematic combinations
740
+ const similar = [
741
+ ['gray', 'grey'],
742
+ ['lightgray', 'white'],
743
+ ['darkgray', 'black'],
744
+ ['yellow', 'white'],
745
+ ['cyan', 'white'],
746
+ ];
747
+ const fgLower = fg.toLowerCase();
748
+ const bgLower = bg.toLowerCase();
749
+ for (const pair of similar) {
750
+ if ((pair.includes(fgLower) && pair.includes(bgLower)) ||
751
+ fgLower === bgLower) {
752
+ return true;
753
+ }
754
+ }
755
+ return false;
756
+ }
757
+ /**
758
+ * Format accessibility report
759
+ */
760
+ export function formatAccessibilityReport(report) {
761
+ const lines = [
762
+ `Accessibility Report: ${report.valid ? '✓ PASSED' : '✗ FAILED'}`,
763
+ ` Errors: ${report.summary.errors}`,
764
+ ` Warnings: ${report.summary.warnings}`,
765
+ ` Info: ${report.summary.info}`,
766
+ '',
767
+ ];
768
+ if (report.issues.length > 0) {
769
+ lines.push('Issues:');
770
+ for (const issue of report.issues) {
771
+ const icon = issue.type === 'error' ? '✗' : issue.type === 'warning' ? '⚠' : 'ℹ';
772
+ lines.push(` ${icon} [${issue.code}] ${issue.message}`);
773
+ if (issue.path) {
774
+ lines.push(` at path: ${issue.path}`);
775
+ }
776
+ }
777
+ }
778
+ return lines.join('\n');
779
+ }
780
+ /**
781
+ * Create a complete test harness
782
+ */
783
+ export function createTestHarness(options = {}) {
784
+ const { columns = 80, rows = 24 } = options;
785
+ const terminal = new TerminalSimulator(columns, rows);
786
+ const events = createEventSimulator(terminal);
787
+ // Enable mouse if requested
788
+ if (options.enableMouse) {
789
+ terminal.write('\x1b[?1000h');
790
+ }
791
+ // Enable bracketed paste if requested
792
+ if (options.enableBracketedPaste) {
793
+ terminal.write('\x1b[?2004h');
794
+ }
795
+ return {
796
+ terminal,
797
+ events,
798
+ render(node) {
799
+ // This would integrate with the actual renderer
800
+ // For now, return a simple string representation
801
+ return formatVNode(node);
802
+ },
803
+ getScreen() {
804
+ return terminal.getScreen();
805
+ },
806
+ getScreenString() {
807
+ return terminal.getScreenString();
808
+ },
809
+ checkA11y(node) {
810
+ return checkAccessibility(node);
811
+ },
812
+ snapshot(output, opts) {
813
+ return createSnapshot(output, opts);
814
+ },
815
+ compareSnapshot(expected, actual) {
816
+ return compareSnapshots(expected, actual);
817
+ },
818
+ reset() {
819
+ terminal.reset();
820
+ },
821
+ cleanup() {
822
+ terminal.reset();
823
+ },
824
+ };
825
+ }
826
+ /**
827
+ * Format VNode as string (simple representation)
828
+ */
829
+ function formatVNode(node, indent = 0) {
830
+ const type = typeof node.type === 'string' ? node.type : node.type?.name || 'Component';
831
+ const props = node.props || {};
832
+ const prefix = ' '.repeat(indent);
833
+ let result = `${prefix}<${type}`;
834
+ // Add relevant props
835
+ if (props.id)
836
+ result += ` id="${props.id}"`;
837
+ if (props.className)
838
+ result += ` class="${props.className}"`;
839
+ const children = node.children || [];
840
+ const hasChildren = children.length > 0;
841
+ if (!hasChildren) {
842
+ result += ' />\n';
843
+ }
844
+ else {
845
+ result += '>\n';
846
+ for (const child of children) {
847
+ if (typeof child === 'string') {
848
+ result += `${prefix} ${child}\n`;
849
+ }
850
+ else if (child && typeof child === 'object' && 'type' in child) {
851
+ result += formatVNode(child, indent + 1);
852
+ }
853
+ }
854
+ result += `${prefix}</${type}>\n`;
855
+ }
856
+ return result;
857
+ }
858
+ //# sourceMappingURL=testing.js.map