@visulima/tui-kit 0.0.0 → 1.0.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 (371) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/LICENSE.md +2095 -0
  3. package/README.md +115 -29
  4. package/dist/accordion.d.ts +52 -0
  5. package/dist/accordion.js +1 -0
  6. package/dist/alert.d.ts +22 -0
  7. package/dist/alert.js +1 -0
  8. package/dist/animate-presence.d.ts +16 -0
  9. package/dist/animate-presence.js +1 -0
  10. package/dist/approval-prompt.d.ts +55 -0
  11. package/dist/approval-prompt.js +1 -0
  12. package/dist/area-chart.d.ts +56 -0
  13. package/dist/area-chart.js +1 -0
  14. package/dist/badge.d.ts +19 -0
  15. package/dist/badge.js +1 -0
  16. package/dist/bar-chart.d.ts +58 -0
  17. package/dist/bar-chart.js +1 -0
  18. package/dist/big-text.d.ts +71 -0
  19. package/dist/big-text.js +1 -0
  20. package/dist/blink-dot.d.ts +31 -0
  21. package/dist/blink-dot.js +1 -0
  22. package/dist/breadcrumb.d.ts +29 -0
  23. package/dist/breadcrumb.js +1 -0
  24. package/dist/button.d.ts +38 -0
  25. package/dist/button.js +1 -0
  26. package/dist/calendar.d.ts +60 -0
  27. package/dist/calendar.js +1 -0
  28. package/dist/card.d.ts +47 -0
  29. package/dist/card.js +1 -0
  30. package/dist/checkbox-group.d.ts +50 -0
  31. package/dist/checkbox-group.js +1 -0
  32. package/dist/checkbox.d.ts +40 -0
  33. package/dist/checkbox.js +1 -0
  34. package/dist/code.d.ts +41 -0
  35. package/dist/code.js +2 -0
  36. package/dist/collapsible.d.ts +44 -0
  37. package/dist/collapsible.js +1 -0
  38. package/dist/color-picker.d.ts +59 -0
  39. package/dist/color-picker.js +1 -0
  40. package/dist/command-block.d.ts +39 -0
  41. package/dist/command-block.js +4 -0
  42. package/dist/command-palette.d.ts +73 -0
  43. package/dist/command-palette.js +1 -0
  44. package/dist/confirm-dialog.d.ts +63 -0
  45. package/dist/confirm-dialog.js +1 -0
  46. package/dist/confirm-input.d.ts +32 -0
  47. package/dist/confirm-input.js +1 -0
  48. package/dist/console-overlay.d.ts +47 -0
  49. package/dist/console-overlay.js +1 -0
  50. package/dist/content-switcher.d.ts +49 -0
  51. package/dist/content-switcher.js +1 -0
  52. package/dist/controlled-scroll-view.d.ts +3 -0
  53. package/dist/controlled-scroll-view.js +1 -0
  54. package/dist/data-grid.d.ts +43 -0
  55. package/dist/data-grid.js +1 -0
  56. package/dist/date-picker.d.ts +54 -0
  57. package/dist/date-picker.js +1 -0
  58. package/dist/definition-list.d.ts +38 -0
  59. package/dist/definition-list.js +1 -0
  60. package/dist/dialog.d.ts +94 -0
  61. package/dist/dialog.js +1 -0
  62. package/dist/diff-view.d.ts +72 -0
  63. package/dist/diff-view.js +1 -0
  64. package/dist/digits.d.ts +26 -0
  65. package/dist/digits.js +1 -0
  66. package/dist/directory-tree.d.ts +44 -0
  67. package/dist/directory-tree.js +1 -0
  68. package/dist/divider.d.ts +41 -0
  69. package/dist/divider.js +1 -0
  70. package/dist/drawer.d.ts +45 -0
  71. package/dist/drawer.js +1 -0
  72. package/dist/file-change.d.ts +34 -0
  73. package/dist/file-change.js +1 -0
  74. package/dist/file-picker-entry.d.ts +2 -0
  75. package/dist/file-picker-entry.js +1 -0
  76. package/dist/form.d.ts +74 -0
  77. package/dist/form.js +1 -0
  78. package/dist/gauge.d.ts +76 -0
  79. package/dist/gauge.js +1 -0
  80. package/dist/gradient.d.ts +38 -0
  81. package/dist/gradient.js +1 -0
  82. package/dist/grid.d.ts +34 -0
  83. package/dist/grid.js +1 -0
  84. package/dist/heading.d.ts +28 -0
  85. package/dist/heading.js +1 -0
  86. package/dist/heatmap.d.ts +52 -0
  87. package/dist/heatmap.js +1 -0
  88. package/dist/help.d.ts +45 -0
  89. package/dist/help.js +1 -0
  90. package/dist/histogram.d.ts +52 -0
  91. package/dist/histogram.js +1 -0
  92. package/dist/image.d.ts +23 -0
  93. package/dist/image.js +1 -0
  94. package/dist/index.d.ts +125 -0
  95. package/dist/index.js +1 -0
  96. package/dist/json.d.ts +51 -0
  97. package/dist/json.js +1 -0
  98. package/dist/kbd.d.ts +27 -0
  99. package/dist/kbd.js +1 -0
  100. package/dist/line-chart.d.ts +100 -0
  101. package/dist/line-chart.js +1 -0
  102. package/dist/link.d.ts +34 -0
  103. package/dist/link.js +1 -0
  104. package/dist/loading-indicator.d.ts +25 -0
  105. package/dist/loading-indicator.js +1 -0
  106. package/dist/log.d.ts +33 -0
  107. package/dist/log.js +1 -0
  108. package/dist/markdown.d.ts +35 -0
  109. package/dist/markdown.js +1 -0
  110. package/dist/masked-input.d.ts +42 -0
  111. package/dist/masked-input.js +1 -0
  112. package/dist/menu.d.ts +70 -0
  113. package/dist/menu.js +1 -0
  114. package/dist/message-bubble.d.ts +36 -0
  115. package/dist/message-bubble.js +1 -0
  116. package/dist/model-badge.d.ts +33 -0
  117. package/dist/model-badge.js +1 -0
  118. package/dist/model-selector.d.ts +45 -0
  119. package/dist/model-selector.js +1 -0
  120. package/dist/multi-progress.d.ts +48 -0
  121. package/dist/multi-progress.js +1 -0
  122. package/dist/multi-select.d.ts +55 -0
  123. package/dist/multi-select.js +1 -0
  124. package/dist/notification-badge.d.ts +40 -0
  125. package/dist/notification-badge.js +1 -0
  126. package/dist/number-input.d.ts +71 -0
  127. package/dist/number-input.js +1 -0
  128. package/dist/operation-tree.d.ts +46 -0
  129. package/dist/operation-tree.js +1 -0
  130. package/dist/option-list.d.ts +41 -0
  131. package/dist/option-list.js +1 -0
  132. package/dist/ordered-list.d.ts +22 -0
  133. package/dist/ordered-list.js +1 -0
  134. package/dist/packem_shared/ControlledScrollView-BzlbIUph.js +1 -0
  135. package/dist/packem_shared/FilePicker-V5H2fb-v.js +1 -0
  136. package/dist/packem_shared/ScrollBar-C9i3z3Ft.js +1 -0
  137. package/dist/packem_shared/ScrollBarBox-DZEC8YnV.js +1 -0
  138. package/dist/packem_shared/ScrollList-Djtb2vVy.js +1 -0
  139. package/dist/packem_shared/ScrollView-ESxpl6Hy.js +1 -0
  140. package/dist/packem_shared/TreeNodeMap-cJlYqckB.js +1 -0
  141. package/dist/packem_shared/TreeView-q0l446NV.js +1 -0
  142. package/dist/packem_shared/controlled-scroll-view-DerVKKv6.js +1 -0
  143. package/dist/packem_shared/controlled-scroll-view.d-D3kZZzjI.d.ts +43 -0
  144. package/dist/packem_shared/file-picker.d-CH7pccC7.d.ts +92 -0
  145. package/dist/packem_shared/line-chart-BbhMhcZg.js +1 -0
  146. package/dist/packem_shared/scroll-bar-box.d-CpTYEcTZ.d.ts +13 -0
  147. package/dist/packem_shared/scroll-bar.d-B4sD1hBR.d.ts +18 -0
  148. package/dist/packem_shared/scroll-list.d-CPCF0RwC.d.ts +12 -0
  149. package/dist/packem_shared/scroll-view.d-GZcgAHl4.d.ts +98 -0
  150. package/dist/packem_shared/treeViewTheme-Dq3ekRAC.js +1 -0
  151. package/dist/packem_shared/use-tree-view.d-DeMQ6G2r.d.ts +314 -0
  152. package/dist/packem_shared/useTreeView-D0JEqT6W.js +1 -0
  153. package/dist/packem_shared/useTreeViewState-BiTJakkh.js +1 -0
  154. package/dist/packem_shared/variant-config-BJqpNo7H.js +1 -0
  155. package/dist/packem_shared/variant-config.d-D5NnrrQK.d.ts +2 -0
  156. package/dist/paginator.d.ts +59 -0
  157. package/dist/paginator.js +1 -0
  158. package/dist/paragraph.d.ts +32 -0
  159. package/dist/paragraph.js +1 -0
  160. package/dist/path-input.d.ts +56 -0
  161. package/dist/path-input.js +1 -0
  162. package/dist/pie-chart.d.ts +44 -0
  163. package/dist/pie-chart.js +1 -0
  164. package/dist/placeholder.d.ts +47 -0
  165. package/dist/placeholder.js +1 -0
  166. package/dist/popover.d.ts +39 -0
  167. package/dist/popover.js +1 -0
  168. package/dist/progress-bar.d.ts +43 -0
  169. package/dist/progress-bar.js +1 -0
  170. package/dist/progress-circle.d.ts +50 -0
  171. package/dist/progress-circle.js +1 -0
  172. package/dist/qr-code.d.ts +39 -0
  173. package/dist/qr-code.js +1 -0
  174. package/dist/r/accordion.json +24 -0
  175. package/dist/r/alert.json +24 -0
  176. package/dist/r/animate-presence.json +22 -0
  177. package/dist/r/approval-prompt.json +24 -0
  178. package/dist/r/area-chart.json +27 -0
  179. package/dist/r/badge.json +24 -0
  180. package/dist/r/bar-chart.json +24 -0
  181. package/dist/r/big-text.json +23 -0
  182. package/dist/r/blink-dot.json +24 -0
  183. package/dist/r/breadcrumb.json +24 -0
  184. package/dist/r/button.json +24 -0
  185. package/dist/r/calendar.json +24 -0
  186. package/dist/r/card.json +26 -0
  187. package/dist/r/chart-utils.json +24 -0
  188. package/dist/r/checkbox-group.json +24 -0
  189. package/dist/r/checkbox.json +24 -0
  190. package/dist/r/code.json +23 -0
  191. package/dist/r/collapsible.json +24 -0
  192. package/dist/r/color-picker.json +24 -0
  193. package/dist/r/command-block.json +26 -0
  194. package/dist/r/command-palette.json +24 -0
  195. package/dist/r/confirm-dialog.json +24 -0
  196. package/dist/r/confirm-input.json +22 -0
  197. package/dist/r/console-overlay.json +22 -0
  198. package/dist/r/content-switcher.json +24 -0
  199. package/dist/r/controlled-scroll-view.json +24 -0
  200. package/dist/r/data-grid.json +24 -0
  201. package/dist/r/date-picker.json +26 -0
  202. package/dist/r/definition-list.json +24 -0
  203. package/dist/r/dialog.json +24 -0
  204. package/dist/r/diff-view.json +24 -0
  205. package/dist/r/digits.json +24 -0
  206. package/dist/r/directory-tree.json +24 -0
  207. package/dist/r/divider.json +24 -0
  208. package/dist/r/drawer.json +24 -0
  209. package/dist/r/file-change.json +24 -0
  210. package/dist/r/file-picker.json +44 -0
  211. package/dist/r/form.json +24 -0
  212. package/dist/r/gauge.json +24 -0
  213. package/dist/r/gradient.json +24 -0
  214. package/dist/r/grid.json +22 -0
  215. package/dist/r/heading.json +24 -0
  216. package/dist/r/heatmap.json +24 -0
  217. package/dist/r/help.json +22 -0
  218. package/dist/r/histogram.json +26 -0
  219. package/dist/r/image.json +24 -0
  220. package/dist/r/json.json +24 -0
  221. package/dist/r/kbd.json +24 -0
  222. package/dist/r/line-chart.json +26 -0
  223. package/dist/r/link.json +23 -0
  224. package/dist/r/loading-indicator.json +27 -0
  225. package/dist/r/log.json +24 -0
  226. package/dist/r/markdown.json +29 -0
  227. package/dist/r/masked-input.json +22 -0
  228. package/dist/r/menu.json +24 -0
  229. package/dist/r/message-bubble.json +24 -0
  230. package/dist/r/model-badge.json +24 -0
  231. package/dist/r/model-selector.json +24 -0
  232. package/dist/r/multi-progress.json +24 -0
  233. package/dist/r/multi-select.json +24 -0
  234. package/dist/r/notification-badge.json +24 -0
  235. package/dist/r/number-input.json +24 -0
  236. package/dist/r/operation-tree.json +26 -0
  237. package/dist/r/option-list.json +24 -0
  238. package/dist/r/ordered-list.json +22 -0
  239. package/dist/r/paginator.json +22 -0
  240. package/dist/r/paragraph.json +24 -0
  241. package/dist/r/path-input.json +26 -0
  242. package/dist/r/pie-chart.json +24 -0
  243. package/dist/r/placeholder.json +24 -0
  244. package/dist/r/popover.json +24 -0
  245. package/dist/r/progress-bar.json +22 -0
  246. package/dist/r/progress-circle.json +24 -0
  247. package/dist/r/qr-code.json +24 -0
  248. package/dist/r/radio-group.json +24 -0
  249. package/dist/r/registry.json +1051 -0
  250. package/dist/r/scatter-plot.json +27 -0
  251. package/dist/r/scroll-bar-box.json +24 -0
  252. package/dist/r/scroll-bar.json +24 -0
  253. package/dist/r/scroll-list.json +24 -0
  254. package/dist/r/scroll-view.json +24 -0
  255. package/dist/r/scroll.json +58 -0
  256. package/dist/r/search-input.json +26 -0
  257. package/dist/r/select-input-indicator.json +24 -0
  258. package/dist/r/select-input-item.json +24 -0
  259. package/dist/r/select-input.json +28 -0
  260. package/dist/r/shimmer-text.json +24 -0
  261. package/dist/r/sidebar.json +24 -0
  262. package/dist/r/slider.json +24 -0
  263. package/dist/r/sparkline.json +24 -0
  264. package/dist/r/spinner.json +23 -0
  265. package/dist/r/status-line.json +24 -0
  266. package/dist/r/status-message.json +24 -0
  267. package/dist/r/stepper.json +24 -0
  268. package/dist/r/stopwatch.json +22 -0
  269. package/dist/r/streaming-text.json +24 -0
  270. package/dist/r/switch.json +24 -0
  271. package/dist/r/tab.json +22 -0
  272. package/dist/r/table.json +23 -0
  273. package/dist/r/tabs.json +26 -0
  274. package/dist/r/tag-input.json +24 -0
  275. package/dist/r/tag.json +24 -0
  276. package/dist/r/text-input.json +22 -0
  277. package/dist/r/textarea.json +22 -0
  278. package/dist/r/thinking-block.json +24 -0
  279. package/dist/r/time-picker.json +24 -0
  280. package/dist/r/timer.json +22 -0
  281. package/dist/r/toast.json +24 -0
  282. package/dist/r/token-usage.json +24 -0
  283. package/dist/r/tool-call.json +24 -0
  284. package/dist/r/tooltip.json +24 -0
  285. package/dist/r/transition.json +22 -0
  286. package/dist/r/tree-select.json +24 -0
  287. package/dist/r/tree-view.json +64 -0
  288. package/dist/r/unordered-list.json +22 -0
  289. package/dist/r/use-linked-scroll.json +24 -0
  290. package/dist/r/variant-config.json +22 -0
  291. package/dist/radio-group.d.ts +63 -0
  292. package/dist/radio-group.js +1 -0
  293. package/dist/scatter-plot.d.ts +24 -0
  294. package/dist/scatter-plot.js +1 -0
  295. package/dist/scroll-bar-box.d.ts +3 -0
  296. package/dist/scroll-bar-box.js +1 -0
  297. package/dist/scroll-bar.d.ts +3 -0
  298. package/dist/scroll-bar.js +1 -0
  299. package/dist/scroll-list.d.ts +4 -0
  300. package/dist/scroll-list.js +1 -0
  301. package/dist/scroll-view.d.ts +3 -0
  302. package/dist/scroll-view.js +1 -0
  303. package/dist/search-input.d.ts +46 -0
  304. package/dist/search-input.js +1 -0
  305. package/dist/select-input-indicator.d.ts +28 -0
  306. package/dist/select-input-indicator.js +1 -0
  307. package/dist/select-input-item.d.ts +35 -0
  308. package/dist/select-input-item.js +1 -0
  309. package/dist/select-input.d.ts +97 -0
  310. package/dist/select-input.js +1 -0
  311. package/dist/shimmer-text.d.ts +41 -0
  312. package/dist/shimmer-text.js +1 -0
  313. package/dist/sidebar.d.ts +40 -0
  314. package/dist/sidebar.js +1 -0
  315. package/dist/slider.d.ts +87 -0
  316. package/dist/slider.js +1 -0
  317. package/dist/sparkline.d.ts +36 -0
  318. package/dist/sparkline.js +1 -0
  319. package/dist/spinner.d.ts +15 -0
  320. package/dist/spinner.js +1 -0
  321. package/dist/status-line.d.ts +31 -0
  322. package/dist/status-line.js +1 -0
  323. package/dist/status-message.d.ts +18 -0
  324. package/dist/status-message.js +1 -0
  325. package/dist/stepper.d.ts +42 -0
  326. package/dist/stepper.js +1 -0
  327. package/dist/stopwatch.d.ts +42 -0
  328. package/dist/stopwatch.js +1 -0
  329. package/dist/streaming-text.d.ts +39 -0
  330. package/dist/streaming-text.js +1 -0
  331. package/dist/switch.d.ts +46 -0
  332. package/dist/switch.js +1 -0
  333. package/dist/tab.d.ts +17 -0
  334. package/dist/tab.js +1 -0
  335. package/dist/table.d.ts +118 -0
  336. package/dist/table.js +1 -0
  337. package/dist/tabs.d.ts +96 -0
  338. package/dist/tabs.js +1 -0
  339. package/dist/tag-input.d.ts +59 -0
  340. package/dist/tag-input.js +1 -0
  341. package/dist/tag.d.ts +30 -0
  342. package/dist/tag.js +1 -0
  343. package/dist/text-input.d.ts +40 -0
  344. package/dist/text-input.js +1 -0
  345. package/dist/textarea.d.ts +57 -0
  346. package/dist/textarea.js +2 -0
  347. package/dist/thinking-block.d.ts +48 -0
  348. package/dist/thinking-block.js +1 -0
  349. package/dist/time-picker.d.ts +57 -0
  350. package/dist/time-picker.js +1 -0
  351. package/dist/timer.d.ts +50 -0
  352. package/dist/timer.js +1 -0
  353. package/dist/toast.d.ts +41 -0
  354. package/dist/toast.js +1 -0
  355. package/dist/token-usage.d.ts +43 -0
  356. package/dist/token-usage.js +1 -0
  357. package/dist/tool-call.d.ts +28 -0
  358. package/dist/tool-call.js +1 -0
  359. package/dist/tooltip.d.ts +37 -0
  360. package/dist/tooltip.js +1 -0
  361. package/dist/transition.d.ts +66 -0
  362. package/dist/transition.js +1 -0
  363. package/dist/tree-select.d.ts +55 -0
  364. package/dist/tree-select.js +1 -0
  365. package/dist/tree-view-entry.d.ts +4 -0
  366. package/dist/tree-view-entry.js +1 -0
  367. package/dist/unordered-list.d.ts +27 -0
  368. package/dist/unordered-list.js +1 -0
  369. package/dist/use-linked-scroll.d.ts +42 -0
  370. package/dist/use-linked-scroll.js +1 -0
  371. package/package.json +553 -7
@@ -0,0 +1,125 @@
1
+ export { Accordion, type AccordionItem, type AccordionProps } from "./accordion.js";
2
+ export { Alert, type AlertProps, type AlertVariant } from "./alert.js";
3
+ export { AnimatePresence, type AnimatePresenceProps } from "./animate-presence.js";
4
+ export { type ApprovalDecision, ApprovalPrompt, type ApprovalPromptProps, type ApprovalRisk } from "./approval-prompt.js";
5
+ export { AreaChart, type AreaChartProps } from "./area-chart.js";
6
+ export { Badge, type BadgeProps } from "./badge.js";
7
+ export { BarChart, type BarChartProps, type BarDatum } from "./bar-chart.js";
8
+ export { BigText, type Align as BigTextAlign, type BackgroundColor as BigTextBackgroundColor, type BigTextFont, type BigTextProps } from "./big-text.js";
9
+ export { BlinkDot, type BlinkDotProps } from "./blink-dot.js";
10
+ export { Breadcrumb, type BreadcrumbItem, type BreadcrumbProps } from "./breadcrumb.js";
11
+ export { Button, type ButtonProps, type ButtonVariant } from "./button.js";
12
+ export { Calendar, type CalendarProps } from "./calendar.js";
13
+ export { Card, type CardProps } from "./card.js";
14
+ export { Checkbox, type CheckboxProps } from "./checkbox.js";
15
+ export { CheckboxGroup, type CheckboxGroupProps, type CheckboxOption } from "./checkbox-group.js";
16
+ export { Code, type CodeProps } from "./code.js";
17
+ export { Collapsible, type CollapsibleProps } from "./collapsible.js";
18
+ export { ColorPicker, type ColorPickerProps } from "./color-picker.js";
19
+ export { CommandBlock, type CommandBlockProps, type CommandStatus } from "./command-block.js";
20
+ export { type CommandEntry, CommandPalette, type CommandPaletteProps } from "./command-palette.js";
21
+ export { ConfirmDialog, type ConfirmDialogProps, type ConfirmTone } from "./confirm-dialog.js";
22
+ export { ConfirmInput, type ConfirmInputProps } from "./confirm-input.js";
23
+ export { ConsoleOverlay, type ConsoleOverlayDock, type ConsoleOverlayProps } from "./console-overlay.js";
24
+ export { ContentSwitcher, type ContentSwitcherOption, type ContentSwitcherProps } from "./content-switcher.js";
25
+ export { DataGrid, type DataGridColumn, type DataGridProps } from "./data-grid.js";
26
+ export { DatePicker, type DatePickerProps } from "./date-picker.js";
27
+ export { type DefinitionItem, DefinitionList, type DefinitionListProps } from "./definition-list.js";
28
+ export { Dialog, type DialogProps } from "./dialog.js";
29
+ export { DiffView, type DiffViewMode, type DiffViewProps, type InlineDiffMode } from "./diff-view.js";
30
+ export { Digits, type DigitsProps } from "./digits.js";
31
+ export { type DirectoryNode, DirectoryTree, type DirectoryTreeProps } from "./directory-tree.js";
32
+ export { Divider, type DividerProps } from "./divider.js";
33
+ export { Drawer, type DrawerProps } from "./drawer.js";
34
+ export { FileChange, type FileChangeProps, type FileChangeStatus } from "./file-change.js";
35
+ export { type F as FileEntry, a as FilePicker, type b as FilePickerFilter, type P as FilePickerProps } from "./packem_shared/file-picker.d-CH7pccC7.js";
36
+ export { Form, FormField, type FormFieldProps, type FormProps } from "./form.js";
37
+ export { Gauge, type GaugeProps, type GaugeSize, type GaugeThreshold } from "./gauge.js";
38
+ export { Gradient, type GradientColors, type GradientName, type GradientProps } from "./gradient.js";
39
+ export { Grid, type GridProps } from "./grid.js";
40
+ export { Heading, type HeadingLevel, type HeadingProps } from "./heading.js";
41
+ export { Heatmap, type HeatmapProps } from "./heatmap.js";
42
+ export { Help, type HelpProps } from "./help.js";
43
+ export { Histogram, type HistogramProps } from "./histogram.js";
44
+ export { Image, type ImageProps } from "./image.js";
45
+ export { Json, type JsonProps, type JsonTheme } from "./json.js";
46
+ export { Kbd, type KbdProps } from "./kbd.js";
47
+ export { LineChart, type LineChartProps, type LineSeries } from "./line-chart.js";
48
+ export { Link, type LinkProps } from "./link.js";
49
+ export { LoadingIndicator, type LoadingIndicatorProps } from "./loading-indicator.js";
50
+ export { Log, type LogEntry, type LogLevel, type LogProps } from "./log.js";
51
+ export { Markdown, type MarkdownProps } from "./markdown.js";
52
+ export { MaskedInput, type MaskedInputProps } from "./masked-input.js";
53
+ export { Menu, type MenuItem, type MenuProps, type MenuSection } from "./menu.js";
54
+ export { MessageBubble, type MessageBubbleProps, type MessageRole } from "./message-bubble.js";
55
+ export { ModelBadge, type ModelBadgeProps } from "./model-badge.js";
56
+ export { type ModelOption, ModelSelector, type ModelSelectorProps } from "./model-selector.js";
57
+ export { MultiProgress, type MultiProgressProps, type ProgressItem } from "./multi-progress.js";
58
+ export { MultiSelect, type MultiSelectOption, type MultiSelectProps } from "./multi-select.js";
59
+ export { NotificationBadge, type NotificationBadgeProps } from "./notification-badge.js";
60
+ export { NumberInput, type NumberInputProps } from "./number-input.js";
61
+ export { type OperationNode, type OperationStatus, OperationTree, type OperationTreeProps } from "./operation-tree.js";
62
+ export { OptionList, type OptionListEntry, type OptionListProps } from "./option-list.js";
63
+ export { OrderedList, type OrderedListEntry, type OrderedListProps } from "./ordered-list.js";
64
+ export { type PageMeta, Paginator, type PaginatorProps } from "./paginator.js";
65
+ export { Paragraph, type ParagraphProps } from "./paragraph.js";
66
+ export { PathInput, type PathInputProps } from "./path-input.js";
67
+ export { PieChart, type PieChartProps, type PieSlice } from "./pie-chart.js";
68
+ export { Placeholder, type PlaceholderProps } from "./placeholder.js";
69
+ export { Popover, type PopoverProps } from "./popover.js";
70
+ export { ProgressBar, type ProgressBarProps } from "./progress-bar.js";
71
+ export { ProgressCircle, type ProgressCircleProps } from "./progress-circle.js";
72
+ export { QrCode, type Props as QrCodeProps } from "./qr-code.js";
73
+ export { RadioGroup, type Props as RadioGroupProps, type RadioOption } from "./radio-group.js";
74
+ export { ScatterPlot, type Props as ScatterPlotProps } from "./scatter-plot.js";
75
+ export { C as ControlledScrollView, type a as ControlledScrollViewProps, type b as ControlledScrollViewRef } from "./packem_shared/controlled-scroll-view.d-D3kZZzjI.js";
76
+ export { S as ScrollBar, type a as ScrollBarPlacement, type b as ScrollBarProps, type c as ScrollBarStyle } from "./packem_shared/scroll-bar.d-B4sD1hBR.js";
77
+ export { S as ScrollBarBox, type a as ScrollBarBoxProps } from "./packem_shared/scroll-bar-box.d-CpTYEcTZ.js";
78
+ export { type S as ScrollAlignment, a as ScrollList, type b as ScrollListProps, type c as ScrollListRef } from "./packem_shared/scroll-list.d-CPCF0RwC.js";
79
+ export { S as ScrollView, type a as ScrollViewProps, type b as ScrollViewRef } from "./packem_shared/scroll-view.d-GZcgAHl4.js";
80
+ export { SearchInput, type Props as SearchInputProps } from "./search-input.js";
81
+ export { SelectInput, type SelectInputEntry, type Item as SelectInputItemType, type Props as SelectInputProps, type SelectInputSeparator } from "./select-input.js";
82
+ export { SelectInputIndicator, type Props as SelectInputIndicatorProps } from "./select-input-indicator.js";
83
+ export { SelectInputItem, type Props as SelectInputItemProps } from "./select-input-item.js";
84
+ export { ShimmerText, type Props as ShimmerTextProps } from "./shimmer-text.js";
85
+ export { Sidebar, type Props as SidebarProps } from "./sidebar.js";
86
+ export { Slider, type Props as SliderProps } from "./slider.js";
87
+ export { Sparkline, type Props as SparklineProps } from "./sparkline.js";
88
+ export { Spinner, type Props as SpinnerProps } from "./spinner.js";
89
+ export { StatusLine, type Props as StatusLineProps } from "./status-line.js";
90
+ export { StatusMessage, type Props as StatusMessageProps, type StatusMessageVariant } from "./status-message.js";
91
+ export { type StepStatus, Stepper, type Props as StepperProps, type StepperStep } from "./stepper.js";
92
+ export { Stopwatch, type Props as StopwatchProps, type StopwatchRef } from "./stopwatch.js";
93
+ export { StreamingText, type Props as StreamingTextProps } from "./streaming-text.js";
94
+ export { Switch, type Props as SwitchProps } from "./switch.js";
95
+ export { Tab, type Props as TabProps } from "./tab.js";
96
+ export { Table, type ColumnConfig as TableColumnConfig, type Props as TableProps, type Scalar as TableScalar, type ScalarDict as TableScalarDict } from "./table.js";
97
+ export { type TabColors, Tabs, type KeyMap as TabsKeyMap, type Props as TabsProps } from "./tabs.js";
98
+ export { Tag, type Props as TagProps, type TagVariant } from "./tag.js";
99
+ export { TagInput, type Props as TagInputProps } from "./tag-input.js";
100
+ export { TextInput, type Props as TextInputProps } from "./text-input.js";
101
+ export { Textarea, type Props as TextareaProps } from "./textarea.js";
102
+ export { ThinkingBlock, type Props as ThinkingBlockProps } from "./thinking-block.js";
103
+ export { TimePicker, type Props as TimePickerProps, type TimeValue } from "./time-picker.js";
104
+ export { Timer, type Props as TimerProps, type TimerRef } from "./timer.js";
105
+ export { Toast, type Props as ToastProps, type ToastVariant } from "./toast.js";
106
+ export { TokenUsage, type Props as TokenUsageProps } from "./token-usage.js";
107
+ export { ToolCall, type Props as ToolCallProps, type ToolCallStatus } from "./tool-call.js";
108
+ export { Tooltip, type TooltipPlacement, type Props as TooltipProps } from "./tooltip.js";
109
+ export { default as Transition, type TransitionPhase, type TransitionPreset, type Props as TransitionProps } from "./transition.js";
110
+ export { TreeSelect, type TreeSelectNode, type Props as TreeSelectProps } from "./tree-select.js";
111
+ export { type A as AsyncChildrenFunction, type F as FlatNode, type S as SelectionMode, type T as TreeNode, a as TreeNodeMap, type b as TreeNodeRendererProps, type c as TreeNodeState, d as TreeView, type P as TreeViewProps, type e as TreeViewState, type f as TreeViewTheme, type U as UseTreeViewProps, type g as UseTreeViewStateProps, t as treeViewTheme, u as useTreeView, h as useTreeViewState } from "./packem_shared/use-tree-view.d-DeMQ6G2r.js";
112
+ export { UnorderedList, type UnorderedListEntry, type Props as UnorderedListProps } from "./unordered-list.js";
113
+ import '@visulima/colorize';
114
+ import 'react';
115
+ import 'type-fest';
116
+ import "./packem_shared/variant-config.d-D5NnrrQK.js";
117
+ import '@visulima/tui/hooks/use-console-capture';
118
+ import '@visulima/tui/components/box';
119
+ import '@visulima/colorize/gradient';
120
+ import '@visulima/tui/hooks/use-key-bindings';
121
+ import '@visulima/tui/canvas';
122
+ import '@visulima/spinner';
123
+ import '@visulima/tui/components/text';
124
+ import '@visulima/tui/hooks/use-stopwatch';
125
+ import '@visulima/tui/hooks/use-timer';
package/dist/index.js ADDED
@@ -0,0 +1 @@
1
+ import{Accordion as e}from"./accordion.js";import{Alert as p}from"./alert.js";import{AnimatePresence as f}from"./animate-presence.js";import{ApprovalPrompt as a}from"./approval-prompt.js";import{AreaChart as l}from"./area-chart.js";import{Badge as d}from"./badge.js";import{BarChart as c}from"./bar-chart.js";import{BigText as u}from"./big-text.js";import{BlinkDot as T}from"./blink-dot.js";import{Breadcrumb as h}from"./breadcrumb.js";import{Button as k}from"./button.js";import{Calendar as I}from"./calendar.js";import{Card as w}from"./card.js";import{Checkbox as L}from"./checkbox.js";import{CheckboxGroup as V}from"./checkbox-group.js";import{Code as A}from"./code.js";import{Collapsible as v}from"./collapsible.js";import{ColorPicker as O}from"./color-picker.js";import{CommandBlock as y}from"./command-block.js";import{CommandPalette as J}from"./command-palette.js";import{ConfirmDialog as Q}from"./confirm-dialog.js";import{ConfirmInput as j}from"./confirm-input.js";import{ConsoleOverlay as z}from"./console-overlay.js";import{ContentSwitcher as W}from"./content-switcher.js";import{DataGrid as Y}from"./data-grid.js";import{DatePicker as _}from"./date-picker.js";import{DefinitionList as rr}from"./definition-list.js";import{Dialog as er}from"./dialog.js";import{DiffView as pr}from"./diff-view.js";import{Digits as fr}from"./digits.js";import{DirectoryTree as ar}from"./directory-tree.js";import{Divider as lr}from"./divider.js";import{Drawer as dr}from"./drawer.js";import{FileChange as cr}from"./file-change.js";import{Form as ur,FormField as Sr}from"./form.js";import{Gauge as Cr}from"./gauge.js";import{Gradient as Pr}from"./gradient.js";import{Grid as Br}from"./grid.js";import{Heading as br}from"./heading.js";import{Heatmap as Dr}from"./heatmap.js";import{Help as Mr}from"./help.js";import{Histogram as Gr}from"./histogram.js";import{Image as Fr}from"./image.js";import{Json as Hr}from"./json.js";import{Kbd as Nr}from"./kbd.js";import{h as Ur}from"./packem_shared/line-chart-BbhMhcZg.js";import{Link as Kr}from"./link.js";import{LoadingIndicator as Rr}from"./loading-indicator.js";import{Log as qr}from"./log.js";import{Markdown as Er}from"./markdown.js";import{MaskedInput as Xr}from"./masked-input.js";import{Menu as Zr}from"./menu.js";import{MessageBubble as $r}from"./message-bubble.js";import{ModelBadge as oo}from"./model-badge.js";import{ModelSelector as to}from"./model-selector.js";import{MultiProgress as mo}from"./multi-progress.js";import{MultiSelect as xo}from"./multi-select.js";import{NotificationBadge as io}from"./notification-badge.js";import{NumberInput as no}from"./number-input.js";import{OperationTree as co}from"./operation-tree.js";import{OptionList as uo}from"./option-list.js";import{OrderedList as To}from"./ordered-list.js";import{Paginator as ho}from"./paginator.js";import{Paragraph as ko}from"./paragraph.js";import{PathInput as Io}from"./path-input.js";import{PieChart as wo}from"./pie-chart.js";import{Placeholder as Lo}from"./placeholder.js";import{Popover as Vo}from"./popover.js";import{ProgressBar as Ao}from"./progress-bar.js";import{ProgressCircle as vo}from"./progress-circle.js";import{QrCode as Oo}from"./qr-code.js";import{RadioGroup as yo}from"./radio-group.js";import{ScatterPlot as Jo}from"./scatter-plot.js";import{SearchInput as Qo}from"./search-input.js";import{SelectInput as jo}from"./select-input.js";import{SelectInputIndicator as zo}from"./select-input-indicator.js";import{SelectInputItem as Wo}from"./select-input-item.js";import{ShimmerText as Yo}from"./shimmer-text.js";import{Sidebar as _o}from"./sidebar.js";import{Slider as re}from"./slider.js";import{Sparkline as ee}from"./sparkline.js";import{Spinner as pe}from"./spinner.js";import{StatusLine as fe}from"./status-line.js";import{StatusMessage as ae}from"./status-message.js";import{Stepper as le}from"./stepper.js";import{Stopwatch as de}from"./stopwatch.js";import{StreamingText as ce}from"./streaming-text.js";import{Switch as ue}from"./switch.js";import{Tab as Te}from"./tab.js";import{Table as he}from"./table.js";import{Tabs as ke}from"./tabs.js";import{Tag as Ie}from"./tag.js";import{TagInput as we}from"./tag-input.js";import{TextInput as Le}from"./text-input.js";import{Textarea as Ve}from"./textarea.js";import{ThinkingBlock as Ae}from"./thinking-block.js";import{TimePicker as ve}from"./time-picker.js";import{Timer as Oe}from"./timer.js";import{Toast as ye}from"./toast.js";import{TokenUsage as Je}from"./token-usage.js";import{ToolCall as Qe}from"./tool-call.js";import{Tooltip as je}from"./tooltip.js";import{default as ze}from"./transition.js";import{TreeSelect as We}from"./tree-select.js";import{UnorderedList as Ye}from"./unordered-list.js";import{default as _e}from"./packem_shared/FilePicker-V5H2fb-v.js";import{C as rt}from"./packem_shared/controlled-scroll-view-DerVKKv6.js";import{ScrollBar as et}from"./packem_shared/ScrollBar-C9i3z3Ft.js";import{ScrollBarBox as pt}from"./packem_shared/ScrollBarBox-DZEC8YnV.js";import{ScrollList as ft}from"./packem_shared/ScrollList-Djtb2vVy.js";import{ScrollView as at}from"./packem_shared/ScrollView-ESxpl6Hy.js";import{TreeNodeMap as lt}from"./packem_shared/TreeNodeMap-cJlYqckB.js";import{TreeView as dt}from"./packem_shared/TreeView-q0l446NV.js";import{theme as ct}from"./packem_shared/treeViewTheme-Dq3ekRAC.js";import{useTreeView as ut}from"./packem_shared/useTreeView-D0JEqT6W.js";import{useTreeViewState as Tt}from"./packem_shared/useTreeViewState-BiTJakkh.js";export{e as Accordion,p as Alert,f as AnimatePresence,a as ApprovalPrompt,l as AreaChart,d as Badge,c as BarChart,u as BigText,T as BlinkDot,h as Breadcrumb,k as Button,I as Calendar,w as Card,L as Checkbox,V as CheckboxGroup,A as Code,v as Collapsible,O as ColorPicker,y as CommandBlock,J as CommandPalette,Q as ConfirmDialog,j as ConfirmInput,z as ConsoleOverlay,W as ContentSwitcher,rt as ControlledScrollView,Y as DataGrid,_ as DatePicker,rr as DefinitionList,er as Dialog,pr as DiffView,fr as Digits,ar as DirectoryTree,lr as Divider,dr as Drawer,cr as FileChange,_e as FilePicker,ur as Form,Sr as FormField,Cr as Gauge,Pr as Gradient,Br as Grid,br as Heading,Dr as Heatmap,Mr as Help,Gr as Histogram,Fr as Image,Hr as Json,Nr as Kbd,Ur as LineChart,Kr as Link,Rr as LoadingIndicator,qr as Log,Er as Markdown,Xr as MaskedInput,Zr as Menu,$r as MessageBubble,oo as ModelBadge,to as ModelSelector,mo as MultiProgress,xo as MultiSelect,io as NotificationBadge,no as NumberInput,co as OperationTree,uo as OptionList,To as OrderedList,ho as Paginator,ko as Paragraph,Io as PathInput,wo as PieChart,Lo as Placeholder,Vo as Popover,Ao as ProgressBar,vo as ProgressCircle,Oo as QrCode,yo as RadioGroup,Jo as ScatterPlot,et as ScrollBar,pt as ScrollBarBox,ft as ScrollList,at as ScrollView,Qo as SearchInput,jo as SelectInput,zo as SelectInputIndicator,Wo as SelectInputItem,Yo as ShimmerText,_o as Sidebar,re as Slider,ee as Sparkline,pe as Spinner,fe as StatusLine,ae as StatusMessage,le as Stepper,de as Stopwatch,ce as StreamingText,ue as Switch,Te as Tab,he as Table,ke as Tabs,Ie as Tag,we as TagInput,Le as TextInput,Ve as Textarea,Ae as ThinkingBlock,ve as TimePicker,Oe as Timer,ye as Toast,Je as TokenUsage,Qe as ToolCall,je as Tooltip,ze as Transition,lt as TreeNodeMap,We as TreeSelect,dt as TreeView,Ye as UnorderedList,ct as treeViewTheme,ut as useTreeView,Tt as useTreeViewState};
package/dist/json.d.ts ADDED
@@ -0,0 +1,51 @@
1
+ import { AnsiColors } from '@visulima/colorize';
2
+ import { ReactElement } from 'react';
3
+ import { LiteralUnion } from 'type-fest';
4
+ type Color = LiteralUnion<AnsiColors, string>;
5
+ type JsonTheme = {
6
+ readonly boolean: Color;
7
+ readonly bracket: Color;
8
+ readonly key: Color;
9
+ readonly null: Color;
10
+ readonly number: Color;
11
+ readonly string: Color;
12
+ };
13
+ type Props = {
14
+ /**
15
+ * Accent color for the focused row.
16
+ * @default "blue"
17
+ */
18
+ readonly accentColor?: Color;
19
+ /**
20
+ * Auto-focus for keyboard navigation.
21
+ */
22
+ readonly autoFocus?: boolean;
23
+ /**
24
+ * Depth at which nested containers start collapsed. `0` collapses
25
+ * everything below the root; `Infinity` expands all.
26
+ * @default Infinity
27
+ */
28
+ readonly collapseDepth?: number;
29
+ /**
30
+ * The value to render.
31
+ */
32
+ readonly data: unknown;
33
+ /**
34
+ * When true, arrow keys move a cursor and Space toggles the focused
35
+ * container. When false, the tree renders statically fully expanded down to
36
+ * `collapseDepth`.
37
+ * @default true
38
+ */
39
+ readonly interactive?: boolean;
40
+ /**
41
+ * Color theme for the different JSON token kinds.
42
+ */
43
+ readonly theme?: Partial<JsonTheme>;
44
+ };
45
+ /**
46
+ * A collapsible JSON viewer. Objects and arrays can be folded; when
47
+ * `interactive`, arrow keys move a cursor and Space toggles the focused
48
+ * container. Values are colored by type.
49
+ */
50
+ declare function Json({ accentColor, autoFocus, collapseDepth, data, interactive, theme }: Props): ReactElement;
51
+ export { Json, type Props as JsonProps, JsonTheme, Props, Json as default };
package/dist/json.js ADDED
@@ -0,0 +1 @@
1
+ import{jsx as l,jsxs as $}from"react/jsx-runtime";import O from"@visulima/tui/components/box";import a from"@visulima/tui/components/text";import P from"@visulima/tui/hooks/use-focus";import V from"@visulima/tui/hooks/use-input";import{useMemo as I,useState as F,useCallback as N}from"react";const B={boolean:"yellow",bracket:"gray",key:"cyan",null:"gray",number:"green",string:"yellow"},D=e=>{if(e===null)return"null";if(Array.isArray(e))return"array";const o=typeof e;return o==="object"||o==="boolean"||o==="number"||o==="string"||o==="undefined"?o:"string"},C=e=>{const o=D(e);return o==="array"||o==="object"},M=e=>Array.isArray(e)?`[…${e.length}]`:`{…${Object.keys(e).length}}`,w=(e,o,d,c,s,y)=>{const i=C(e)&&(Array.isArray(e)?e.length>0:Object.keys(e).length>0);if(y.push({collapsible:i,depth:d,id:c,key:o,summary:i?M(e):void 0,value:e}),!(!i||s.has(c))){if(Array.isArray(e)){e.forEach((u,f)=>{w(u,String(f),d+1,`${c}.${f}`,s,y)});return}for(const[u,f]of Object.entries(e))w(f,u,d+1,`${c}.${u}`,s,y)}};function x(e,o){return o===0?0:(e%o+o)%o}function H({accentColor:e="blue",autoFocus:o=!1,collapseDepth:d=Number.POSITIVE_INFINITY,data:c,interactive:s=!0,theme:y}){const i={...B,...y},{isFocused:u}=P({autoFocus:o,isActive:s}),f=I(()=>{const r=new Set,n=(t,p,g)=>{if(!C(t))return;p>=d&&r.add(g);const m=Array.isArray(t)?t.map((v,k)=>[String(k),v]):Object.entries(t);for(const[v,k]of m)n(k,p+1,`${g}.${v}`)};return n(c,0,"$"),r},[d,c]),[h,J]=F(f),[A,S]=F(0),b=I(()=>{const r=[];return w(c,void 0,0,"$",h,r),r},[h,c]),j=N(r=>{J(n=>{const t=new Set(n);return t.has(r)?t.delete(r):t.add(r),t})},[]),T=N((r,n)=>{if(n.upArrow){S(m=>x(m-1,b.length));return}if(n.downArrow){S(m=>x(m+1,b.length));return}const t=b[A];if(!t?.collapsible)return;const p=n.rightArrow&&h.has(t.id),g=n.leftArrow&&!h.has(t.id);(r===" "||p||g)&&j(t.id)},[h,A,b,j]);V(T,{isActive:s&&u});const E=r=>{if(r.collapsible){const t=h.has(r.id)?"▸":"▾";return $(a,{color:i.bracket,children:[t," ",r.summary]})}const n=D(r.value);return n==="array"||n==="object"?l(a,{color:i.bracket,children:n==="array"?"[]":"{}"}):n==="string"?l(a,{color:i.string,children:JSON.stringify(r.value)}):n==="number"?l(a,{color:i.number,children:String(r.value)}):n==="boolean"?l(a,{color:i.boolean,children:String(r.value)}):l(a,{color:i.null,children:r.value===void 0?"undefined":"null"})};return l(O,{flexDirection:"column",children:b.map((r,n)=>{const t=s&&u&&n===A;return $(O,{children:[l(a,{color:t?e:void 0,children:t?"❯":" "}),l(a,{children:" ".repeat(r.depth)}),r.key===void 0?void 0:$(a,{color:i.key,children:[r.key,":"," "]}),E(r)]},r.id)})})}export{H as Json,H as default};
package/dist/kbd.d.ts ADDED
@@ -0,0 +1,27 @@
1
+ import { AnsiColors } from '@visulima/colorize';
2
+ import { ReactNode, ReactElement } from 'react';
3
+ import { LiteralUnion } from 'type-fest';
4
+ type Props = {
5
+ /**
6
+ * Key cap content.
7
+ */
8
+ readonly children: ReactNode;
9
+ /**
10
+ * Background color of the key cap.
11
+ * @default "gray"
12
+ */
13
+ readonly color?: LiteralUnion<AnsiColors, string>;
14
+ /**
15
+ * Visual style.
16
+ * - `solid` (default): background filled
17
+ * - `outline`: border only
18
+ * - `bare`: no decoration, just dimmed text
19
+ */
20
+ readonly variant?: "bare" | "outline" | "solid";
21
+ };
22
+ /**
23
+ * Render a keyboard key (e.g. `&lt;Kbd>Enter&lt;/Kbd>`).
24
+ * @returns A `ReactElement` styled as a key cap (solid / outline / bare).
25
+ */
26
+ declare function Kbd({ children, color, variant }: Props): ReactElement;
27
+ export { Kbd, type Props as KbdProps, Props, Kbd as default };
package/dist/kbd.js ADDED
@@ -0,0 +1 @@
1
+ import{jsxs as e,jsx as l}from"react/jsx-runtime";import n from"@visulima/tui/components/box";import d from"@visulima/tui/components/text";function m({children:r,color:o="gray",variant:i="solid"}){return i==="solid"?e(d,{backgroundColor:o,color:"black",children:[" ",r," "]}):i==="outline"?l(n,{borderColor:o,borderStyle:"round",paddingX:1,children:l(d,{color:o,children:r})}):l(d,{dimColor:!0,children:r})}export{m as Kbd,m as default};
@@ -0,0 +1,100 @@
1
+ import { AnsiColors } from '@visulima/colorize';
2
+ import { CanvasContext } from '@visulima/tui/canvas';
3
+ import { ReactElement } from 'react';
4
+ import { LiteralUnion } from 'type-fest';
5
+ /**
6
+ * A single 2D data point.
7
+ */
8
+ type Point = {
9
+ readonly x: number;
10
+ readonly y: number;
11
+ };
12
+ type LineSeries = {
13
+ /**
14
+ * Per-series color override. Falls back to the chart-level palette.
15
+ */
16
+ readonly color?: LiteralUnion<AnsiColors, string>;
17
+ /**
18
+ * Numeric samples to plot. Pass either a list of y-values (x is the
19
+ * index) or {x, y} tuples.
20
+ */
21
+ readonly data: ReadonlyArray<number> | ReadonlyArray<{
22
+ readonly x: number;
23
+ readonly y: number;
24
+ }>;
25
+ /**
26
+ * Optional label shown in the legend.
27
+ */
28
+ readonly label?: string;
29
+ };
30
+ type LineChartProps = {
31
+ /**
32
+ * Color for axis ticks / labels.
33
+ * @default "gray"
34
+ */
35
+ readonly axisColor?: LiteralUnion<AnsiColors, string>;
36
+ /**
37
+ * Chart body height in character rows.
38
+ * @default 10
39
+ */
40
+ readonly height?: number;
41
+ /**
42
+ * Upper bound for the y-axis. When omitted the chart auto-scales.
43
+ */
44
+ readonly maxY?: number;
45
+ /**
46
+ * Lower bound for the y-axis. When omitted the chart auto-scales.
47
+ */
48
+ readonly minY?: number;
49
+ /**
50
+ * Fallback palette cycled through when a series does not set `color`.
51
+ * @default ["cyan", "magenta", "yellow", "green", "blue", "red"]
52
+ */
53
+ readonly palette?: ReadonlyArray<LiteralUnion<AnsiColors, string>>;
54
+ /**
55
+ * One or more line series.
56
+ */
57
+ readonly series: ReadonlyArray<LineSeries>;
58
+ /**
59
+ * Render the legend row under the plot.
60
+ * @default true
61
+ */
62
+ readonly showLegend?: boolean;
63
+ /**
64
+ * Chart body width in character columns.
65
+ * @default 40
66
+ */
67
+ readonly width?: number;
68
+ };
69
+ type RenderConfig = {
70
+ readonly axisColor: LiteralUnion<AnsiColors, string>;
71
+ readonly palette: ReadonlyArray<LiteralUnion<AnsiColors, string>>;
72
+ readonly seriesList: ReadonlyArray<{
73
+ color: LiteralUnion<AnsiColors, string>;
74
+ points: ReadonlyArray<Point>;
75
+ series: LineSeries;
76
+ }>;
77
+ readonly xMax: number;
78
+ readonly xMin: number;
79
+ readonly yMax: number;
80
+ readonly yMin: number;
81
+ };
82
+ /**
83
+ * Project an (x, y) data point into pixel-grid coordinates for the given
84
+ * canvas size. Used by every chart that paints on top of a braille grid.
85
+ */
86
+ declare const projectPoint: (point: Point, config: Pick<RenderConfig, "xMax" | "xMin" | "yMax" | "yMin">, pixelWidth: number, pixelHeight: number) => {
87
+ px: number;
88
+ py: number;
89
+ };
90
+ /**
91
+ * Shared drawing path used by LineChart and ScatterPlot. AreaChart wraps
92
+ * this with a fill pass.
93
+ */
94
+ declare const drawSeriesOnCanvas: (context: CanvasContext, mode: "line" | "scatter", config: RenderConfig) => void;
95
+ /**
96
+ * Smooth multi-series line chart rendered at 2x4 sub-cell resolution using
97
+ * Unicode braille patterns. Auto-scales both axes by default.
98
+ */
99
+ declare function LineChart({ axisColor, height, maxY, minY, palette, series, showLegend, width }: LineChartProps): ReactElement;
100
+ export { LineChart, LineChartProps, type RenderConfig as LineChartRenderConfig, LineSeries, LineChart as default, drawSeriesOnCanvas, projectPoint };
@@ -0,0 +1 @@
1
+ import"react/jsx-runtime";import"@visulima/tui/canvas";import"@visulima/tui/components/box";import"@visulima/tui/components/canvas";import"@visulima/tui/components/text";import"react";import{h as s,h as n,d,a as h}from"./packem_shared/line-chart-BbhMhcZg.js";export{s as LineChart,n as default,d as drawSeriesOnCanvas,h as projectPoint};
package/dist/link.d.ts ADDED
@@ -0,0 +1,34 @@
1
+ import { ReactNode, ReactElement } from 'react';
2
+ type Props = {
3
+ readonly children: ReactNode;
4
+ /**
5
+ * Determines whether the URL should be printed for unsupported terminals.
6
+ *
7
+ * - `true` (default): appends the URL after the text, e.g. `"My website https://example.com"`
8
+ * - `false`: renders just the text with no URL
9
+ * - `function`: custom fallback formatting, e.g. `(text, url) => \`[\${text}](\${url})\``
10
+ * @default true
11
+ */
12
+ readonly fallback?: ((text: string, url: string) => string) | boolean;
13
+ /**
14
+ * The URL to link to.
15
+ */
16
+ readonly url: string;
17
+ };
18
+ /**
19
+ * An Ink component that creates clickable links in the terminal using OSC 8 hyperlink sequences.
20
+ *
21
+ * [Supported terminals.](https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda)
22
+ *
23
+ * For unsupported terminals, the link will be printed after the text: `My website https://example.com`.
24
+ *
25
+ * ```tsx
26
+ * import { Link, Text } from "@visulima/tui/ink";
27
+ *
28
+ * &lt;Link url="https://example.com"&gt;
29
+ * &lt;Text color="cyan"&gt;My Website&lt;/Text&gt;
30
+ * &lt;/Link&gt;
31
+ * ```
32
+ */
33
+ declare function Link({ children, fallback, url }: Props): ReactElement;
34
+ export { Link, type Props as LinkProps, type Props, Link as default };
package/dist/link.js ADDED
@@ -0,0 +1 @@
1
+ import{jsx as i}from"react/jsx-runtime";import{hyperlink as u}from"@visulima/ansi";import c from"@visulima/tui/components/text";import f from"@visulima/tui/components/transform";import{useCallback as l}from"react";let n;const m=()=>{if(!process.stdout.isTTY)return!1;const o=process.env.TERM_PROGRAM??"",r=process.env.TERM_PROGRAM_VERSION??"";if(o==="iTerm.app")return Number.parseInt(r.split(".")[0]??"0",10)>=3;if(o==="WezTerm"||o==="ghostty")return!0;if(o==="vscode"){const s=r.split("."),t=Number.parseInt(s[0]??"0",10),p=Number.parseInt(s[1]??"0",10);return t>1||t===1&&p>=72}if(process.env.WT_SESSION)return!0;const e=process.env.VTE_VERSION;if(e){const s=Number.parseInt(e,10);return s>=5e3&&s!==5e3}return!1},a=()=>process.env.FORCE_HYPERLINK?process.env.FORCE_HYPERLINK!=="0":(n!==void 0||(n=m()),n);function T({children:o,fallback:r=!0,url:e}){const s=l(t=>a()?u(t,e):r===!1?t:typeof r=="function"?r(t,e):`${t} ${e}`,[r,e]);return i(f,{transform:s,children:i(c,{children:o})})}export{T as Link,T as default};
@@ -0,0 +1,25 @@
1
+ import { AnsiColors } from '@visulima/colorize';
2
+ import { SpinnerName } from '@visulima/spinner';
3
+ import { ReactNode, ReactElement } from 'react';
4
+ import { LiteralUnion } from 'type-fest';
5
+ type Props = {
6
+ /**
7
+ * Optional message rendered after the spinner.
8
+ */
9
+ readonly children?: ReactNode;
10
+ /**
11
+ * Color used for the spinner and label.
12
+ * @default "cyan"
13
+ */
14
+ readonly color?: LiteralUnion<AnsiColors, string>;
15
+ /**
16
+ * Spinner preset.
17
+ * @default "dots"
18
+ */
19
+ readonly type?: SpinnerName;
20
+ };
21
+ /**
22
+ * Compact spinner + label for loading states.
23
+ */
24
+ declare function LoadingIndicator({ children, color, type }: Props): ReactElement;
25
+ export { LoadingIndicator, type Props as LoadingIndicatorProps, Props, LoadingIndicator as default };
@@ -0,0 +1 @@
1
+ import{jsxs as c,jsx as o}from"react/jsx-runtime";import d from"@visulima/tui/components/box";import n from"@visulima/tui/components/text";import{Spinner as e}from"./spinner.js";function s({children:r,color:i="cyan",type:t="dots"}){return c(d,{gap:1,children:[o(n,{color:i,children:o(e,{type:t})}),r===void 0?void 0:o(n,{color:i,children:r})]})}export{s as LoadingIndicator,s as default};
package/dist/log.d.ts ADDED
@@ -0,0 +1,33 @@
1
+ import { ReactElement } from 'react';
2
+ type LogLevel = "debug" | "error" | "info" | "success" | "warn";
3
+ type LogEntry = {
4
+ readonly level?: LogLevel;
5
+ readonly message: string;
6
+ readonly timestamp?: string;
7
+ };
8
+ type Props = {
9
+ /**
10
+ * The log entries, oldest first.
11
+ */
12
+ readonly entries: ReadonlyArray<LogEntry>;
13
+ /**
14
+ * Keep only the last N entries (tail). Omit to render all.
15
+ */
16
+ readonly maxLines?: number;
17
+ /**
18
+ * Render the `[LEVEL]` badge before each message.
19
+ * @default true
20
+ */
21
+ readonly showLevel?: boolean;
22
+ /**
23
+ * Render each entry's timestamp, when present.
24
+ * @default true
25
+ */
26
+ readonly showTimestamp?: boolean;
27
+ };
28
+ /**
29
+ * A leveled log view. Renders entries with a colored level badge and optional
30
+ * timestamp; `maxLines` tails the buffer to the most recent entries.
31
+ */
32
+ declare function Log({ entries, maxLines, showLevel, showTimestamp }: Props): ReactElement;
33
+ export { Log, LogEntry, LogLevel, type Props as LogProps, Props, Log as default };
package/dist/log.js ADDED
@@ -0,0 +1 @@
1
+ import{jsx as e,jsxs as d}from"react/jsx-runtime";import r from"@visulima/tui/components/box";import n from"@visulima/tui/components/text";const h={debug:{color:"gray",label:"DBG"},error:{color:"red",label:"ERR"},info:{color:"blue",label:"INF"},success:{color:"green",label:"OK "},warn:{color:"yellow",label:"WRN"}};function p({entries:l,maxLines:i,showLevel:t=!0,showTimestamp:s=!0}){const a=i!==void 0&&l.length>i?l.slice(l.length-i):l;return e(r,{flexDirection:"column",children:a.map((o,m)=>{const c=h[o.level??"info"];return d(r,{children:[s&&o.timestamp!==void 0?e(r,{marginRight:1,children:e(n,{dimColor:!0,children:o.timestamp})}):void 0,t?e(r,{marginRight:1,children:e(n,{bold:!0,color:c.color,children:c.label})}):void 0,e(n,{children:o.message})]},m)})})}export{p as Log,p as default};
@@ -0,0 +1,35 @@
1
+ import { ReactElement } from 'react';
2
+ type Props = {
3
+ /**
4
+ * The Markdown source string.
5
+ */
6
+ readonly children: string;
7
+ /**
8
+ * Shiki theme for code block syntax highlighting.
9
+ * @default "github-dark-default"
10
+ */
11
+ readonly codeTheme?: string;
12
+ /**
13
+ * Maximum width for text wrapping. Defaults to terminal width.
14
+ */
15
+ readonly maxWidth?: number;
16
+ /**
17
+ * Enable streaming mode for progressive rendering.
18
+ * When true, the component re-renders on every prop change and handles
19
+ * incomplete Markdown gracefully (e.g., unclosed code fences, partial lists).
20
+ * Useful for rendering AI-generated text arriving token-by-token.
21
+ * @default false
22
+ */
23
+ readonly streaming?: boolean;
24
+ };
25
+ /**
26
+ * Render Markdown content as Ink terminal UI elements.
27
+ *
28
+ * ```tsx
29
+ * &lt;Markdown>{"# Hello\n\nThis is **bold** and *italic*."}&lt;/Markdown>
30
+ * &lt;Markdown codeTheme="github-dark-default">{"```js\nconst x = 1;\n```"}&lt;/Markdown>
31
+ * &lt;Markdown streaming>{"# Streaming\n\nText arriving..."}&lt;/Markdown>
32
+ * ```
33
+ */
34
+ declare function Markdown({ children, codeTheme, maxWidth: maxWidthProp, streaming }: Props): ReactElement;
35
+ export { Markdown, type Props as MarkdownProps, Props, Markdown as default };
@@ -0,0 +1 @@
1
+ import{jsx as r,jsxs as x}from"react/jsx-runtime";import l from"@visulima/tui/components/box";import w from"@visulima/tui/components/newline";import m from"@visulima/tui/components/text";import D from"@visulima/tui/hooks/use-window-size";import{Lexer as F}from"marked";import k,{useMemo as b}from"react";import{Code as M}from"./code.js";import{Link as j}from"./link.js";import{OrderedList as v}from"./ordered-list.js";import{Table as E}from"./table.js";import{UnorderedList as q}from"./unordered-list.js";const A={1:"cyan",2:"green",3:"yellow",4:"blue",5:"magenta",6:"gray"};function p(c){return!c||c.length===0?null:c.map((a,t)=>{switch(a.type){case"br":return r(w,{},t);case"codespan":return x(m,{inverse:!0,children:[" ",a.text," "]},t);case"del":return r(m,{strikethrough:!0,children:p(a.tokens)},t);case"em":return r(m,{italic:!0,children:p(a.tokens)},t);case"escape":return r(k.Fragment,{children:a.text},t);case"image":{const e=a;return x(m,{dimColor:!0,children:["[image:"," ",e.text||e.href,"]"]},t)}case"link":{const e=a;return r(j,{url:e.href,children:p(e.tokens)??e.text},t)}case"strong":return r(m,{bold:!0,children:p(a.tokens)},t);case"text":return r(k.Fragment,{children:a.text},t);default:{const e="raw"in a?a.raw:"";return r(k.Fragment,{children:e},t)}}})}function T(c){return c.map(a=>{const t=a.tokens??[],e=t.find(i=>i.type==="text"),n=p(e?.tokens??t),h=t.find(i=>i.type==="list");return{children:h?T(h.items):void 0,label:n}})}function y(c,a,t){const e=[];for(const[n,h]of c.entries()){const i=h,s=n>0?1:0;switch(i.type){case"blockquote":{const o=i;e.push(r(l,{borderLeft:!0,borderLeftColor:"gray",marginTop:s,paddingLeft:1,children:r(l,{flexDirection:"column",children:y(o.tokens,a,t-3)})},n));break}case"code":{const o=i;e.push(r(l,{marginTop:s,children:r(M,{code:o.text,language:o.lang,theme:a})},n));break}case"heading":{const o=i,d=A[o.depth]??"white",g=`${"#".repeat(o.depth)} `;e.push(r(l,{marginTop:s,children:x(m,{bold:!0,color:d,children:[g,p(o.tokens)]})},n));break}case"hr":{e.push(r(l,{marginTop:s,children:r(m,{dimColor:!0,children:"─".repeat(Math.min(t,40))})},n));break}case"html":{const o=i.text.replaceAll(/<[^>]*>/g,"");o.trim()&&e.push(r(l,{marginTop:s,children:r(m,{dimColor:!0,children:o})},n));break}case"list":{const o=i,d=T(o.items);o.ordered?e.push(r(l,{marginTop:s,children:r(v,{items:d})},n)):e.push(r(l,{marginTop:s,children:r(q,{items:d})},n));break}case"paragraph":{const o=i;e.push(r(l,{marginTop:s,children:r(m,{wrap:"wrap",children:p(o.tokens)})},n));break}case"space":{e.push(r(w,{},n));break}case"table":{const o=i,d=(o.header??[]).map(u=>u.text),g=(o.rows??[]).map(u=>u.map(f=>f.text)).map(u=>{const f={};return d.forEach((L,C)=>{f[L]=u[C]??""}),f});e.push(r(l,{marginTop:s,children:r(E,{data:g})},n));break}default:{const o="raw"in i?i.raw:"",d="text"in i?i.text:o;d&&e.push(r(l,{marginTop:s,children:r(m,{children:d})},n));break}}}return e}function B(c,a){const t=F.lex(c);if(!a||c.length===0)return t;let e=0;for(const n of t)e+=n.raw?.length??0;if(e<c.length){const n=c.slice(e);n.trim().length>0&&t.push({raw:n,text:n,tokens:[{raw:n,text:n,type:"text"}],type:"paragraph"})}return t}function Q({children:c,codeTheme:a="github-dark-default",maxWidth:t,streaming:e=!1}){const{columns:n}=D(),h=t??n??80,i=b(()=>B(c,e),[c,e]),s=b(()=>y(i,a,h),[i,a,h]);return r(l,{flexDirection:"column",children:s})}export{Q as Markdown,Q as default};
@@ -0,0 +1,42 @@
1
+ import { ReactElement } from 'react';
2
+ type Props = {
3
+ /**
4
+ * Initial raw value (digits/characters only, without mask symbols).
5
+ */
6
+ readonly defaultValue?: string;
7
+ /**
8
+ * Disable input and dim the display.
9
+ */
10
+ readonly isDisabled?: boolean;
11
+ /**
12
+ * Mask definition. Each `#` is replaced with a user character; any other
13
+ * character is rendered literally. Example: `(###) ###-####`.
14
+ */
15
+ readonly mask: string;
16
+ /**
17
+ * Called whenever the underlying raw value changes.
18
+ */
19
+ readonly onChange?: (value: string) => void;
20
+ /**
21
+ * Called when the user presses Enter with the current raw value.
22
+ */
23
+ readonly onSubmit?: (value: string) => void;
24
+ /**
25
+ * Placeholder character used in the mask for empty positions.
26
+ * @default "_"
27
+ */
28
+ readonly placeholderChar?: string;
29
+ /**
30
+ * Sentinel character in the mask string used to mark editable positions.
31
+ * @default "#" (hash)
32
+ */
33
+ readonly token?: string;
34
+ };
35
+ /**
36
+ * Input with a fixed-width mask. The mask token (`#` by default) marks
37
+ * positions where the user can type; every other character is preserved.
38
+ * Supports ←/→ to move within the mask, Home/End to jump, and
39
+ * Backspace/Delete to clear characters.
40
+ */
41
+ declare function MaskedInput({ defaultValue, isDisabled, mask, onChange, onSubmit, placeholderChar, token }: Props): ReactElement;
42
+ export { MaskedInput, type Props as MaskedInputProps, Props, MaskedInput as default };
@@ -0,0 +1 @@
1
+ import{jsxs as S,jsx as C}from"react/jsx-runtime";import V from"@visulima/tui/components/box";import x from"@visulima/tui/components/text";import I from"@visulima/tui/hooks/use-input";import{useMemo as L,useState as b,useCallback as A}from"react";const T=(m,n)=>{const o=[];let s=0;for(const[l,i]of[...m].entries())i===n&&(o.push({maskColumn:l,rawPosition:s}),s+=1);return o},_=(m,n,o,s)=>{let l=0,i="";for(const f of n)if(f===o){const u=m[l];u===void 0?i+=s:(i+=u,l+=1)}else i+=f;return i};function F({defaultValue:m="",isDisabled:n=!1,mask:o,onChange:s,onSubmit:l,placeholderChar:i="_",token:f="#"}){const u=L(()=>T(o,f),[o,f]),h=u.length,M=m.slice(0,h),[e,v]=b(M),[t,d]=b(M.length),g=A((c,r)=>{v(c),d(Math.max(0,Math.min(h,r))),s?.(c)},[h,s]);I(A((c,r)=>{if(r.return){l?.(e);return}if(r.leftArrow){d(a=>Math.max(0,a-1));return}if(r.rightArrow){d(a=>Math.min(e.length,a+1));return}if(r.home||r.ctrl&&c==="a"){d(0);return}if(r.end||r.ctrl&&c==="e"){d(e.length);return}if(r.backspace){if(t===0)return;const a=e.slice(0,t-1)+e.slice(t);g(a,t-1);return}if(r.delete){if(t>=e.length)return;const a=e.slice(0,t)+e.slice(t+1);g(a,t);return}if(c.length!==1||e.length>=h)return;const P=e.slice(0,t)+c+e.slice(t);g(P,t+1)},[e,t,h,g,l]),{isActive:!n});const p=_(e,o,f,i),k=u[t]?.maskColumn??o.length,w=p.slice(0,k),j=p.charAt(k)||" ",D=p.slice(k+1);return S(V,{children:[C(x,{dimColor:n,children:w}),C(x,{dimColor:n,inverse:!n,children:j}),C(x,{dimColor:n,children:D})]})}export{F as MaskedInput,F as default};
package/dist/menu.d.ts ADDED
@@ -0,0 +1,70 @@
1
+ import { AnsiColors } from '@visulima/colorize';
2
+ import { ReactNode, ReactElement } from 'react';
3
+ import { LiteralUnion } from 'type-fest';
4
+ type MenuItem = {
5
+ /**
6
+ * Optional hotkey rendered on the right side of the row (e.g. `"Ctrl+S"`).
7
+ */
8
+ readonly hotkey?: string;
9
+ /**
10
+ * Optional icon rendered before the label.
11
+ */
12
+ readonly icon?: ReactNode;
13
+ /**
14
+ * Identifier returned by `onSelect`.
15
+ */
16
+ readonly id: string;
17
+ /**
18
+ * When true, renders the item dimmed and skips it during navigation.
19
+ */
20
+ readonly isDisabled?: boolean;
21
+ /**
22
+ * Human-readable label.
23
+ */
24
+ readonly label: ReactNode;
25
+ };
26
+ type MenuSection = {
27
+ readonly id: string;
28
+ readonly items: ReadonlyArray<MenuItem>;
29
+ readonly title?: string;
30
+ };
31
+ type Props = {
32
+ /**
33
+ * Accent color for the focused item.
34
+ * @default "blue"
35
+ */
36
+ readonly accentColor?: LiteralUnion<AnsiColors, string>;
37
+ /**
38
+ * Auto-focus the menu on mount.
39
+ */
40
+ readonly autoFocus?: boolean;
41
+ /**
42
+ * Render a border around the menu.
43
+ * @default true
44
+ */
45
+ readonly bordered?: boolean;
46
+ /**
47
+ * Flat list of items. Ignored if `sections` is provided.
48
+ */
49
+ readonly items?: ReadonlyArray<MenuItem>;
50
+ /**
51
+ * Called with the item id when the user presses Enter.
52
+ */
53
+ readonly onSelect: (id: string) => void;
54
+ /**
55
+ * Grouped items. Takes precedence over `items`.
56
+ */
57
+ readonly sections?: ReadonlyArray<MenuSection>;
58
+ /**
59
+ * Optional title rendered at the top of the menu.
60
+ */
61
+ readonly title?: string;
62
+ };
63
+ /**
64
+ * Dropdown / context menu with optional sections and disabled items.
65
+ * Keyboard: ↑/↓ (or j/k) to navigate, Enter to select, Esc to cancel.
66
+ * @returns A `ReactElement` rendering the menu, optionally wrapped in a
67
+ * rounded border when `bordered` is true.
68
+ */
69
+ declare function Menu({ accentColor, autoFocus, bordered, items, onSelect, sections, title }: Props): ReactElement;
70
+ export { Menu, MenuItem, type Props as MenuProps, MenuSection, Props, Menu as default };
package/dist/menu.js ADDED
@@ -0,0 +1 @@
1
+ import{jsxs as b,jsx as l}from"react/jsx-runtime";import m from"@visulima/tui/components/box";import f from"@visulima/tui/components/text";import A from"@visulima/tui/hooks/use-focus";import F from"@visulima/tui/hooks/use-input";import{useMemo as g,useState as j,useRef as y,useEffect as M,useCallback as $}from"react";const B=(t,r)=>{if(r&&r.length>0){const o=[];for(const i of r){i.title!==void 0&&o.push({kind:"section-header",sectionId:i.id,title:i.title});for(const d of i.items)o.push({item:d,kind:"item",sectionId:i.id})}return o}return(t??[]).map(o=>({item:o,kind:"item",sectionId:void 0}))},w=(t,r,o)=>{const i=t.length;if(i===0)return r;for(let d=1;d<=i;d+=1){const a=(r+o*d+i*d)%i,h=t[a];if(h?.kind==="item"&&!h.item.isDisabled)return a}return r},I=t=>{for(const[r,o]of t.entries())if(o.kind==="item"&&!o.item.isDisabled)return r;return 0};function W({accentColor:t="blue",autoFocus:r=!1,bordered:o=!0,items:i,onSelect:d,sections:a,title:h}){const{isFocused:p}=A({autoFocus:r}),n=g(()=>B(i,a),[i,a]),S=g(()=>I(n),[n]),[k,v]=j(S),u=y(k);u.current=k,M(()=>{const{current:c}=u,s=n[c];if(!(s?.kind==="item"&&!s.item.isDisabled)){const e=I(n);v(e),u.current=e}},[n]),F($((c,s)=>{if(p){if(s.downArrow||c==="j")v(w(n,u.current,1));else if(s.upArrow||c==="k")v(w(n,u.current,-1));else if(s.return){const e=n[u.current];e?.kind==="item"&&!e.item.isDisabled&&d(e.item.id)}}},[p,n,d]),{isActive:p});const x=b(m,{flexDirection:"column",children:[h===void 0?void 0:l(m,{marginBottom:1,children:l(f,{bold:!0,color:t,children:h})}),n.map((c,s)=>{if(c.kind==="section-header")return l(m,{marginTop:s===0?0:1,children:l(f,{dimColor:!0,children:c.title.toUpperCase()})},`header:${c.sectionId}`);const{item:e}=c,C=p&&s===k,D=C?t:void 0;return b(m,{children:[l(f,{color:D,dimColor:e.isDisabled,children:C?"▸ ":" "}),e.icon===void 0?void 0:b(f,{color:D,dimColor:e.isDisabled,children:[e.icon," "]}),l(m,{flexGrow:1,flexShrink:1,minWidth:0,children:l(f,{bold:C,color:D,dimColor:e.isDisabled,wrap:"truncate-end",children:e.label})}),e.hotkey===void 0?void 0:l(m,{flexShrink:0,children:b(f,{dimColor:!0,children:[" ",e.hotkey]})})]},`item:${e.id}`)})]});return o?l(m,{borderColor:p?t:void 0,borderStyle:"round",paddingX:1,children:x}):x}export{W as Menu,W as default};