@flikk/ui 1.0.0-beta.30 → 1.0.0-beta.32

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 (610) hide show
  1. package/CHANGELOG.md +375 -5
  2. package/dist/components/ai/AgentRequest/AgentRequest.animations.d.ts +25 -0
  3. package/dist/components/ai/AgentRequest/AgentRequest.animations.js +81 -0
  4. package/dist/components/ai/AgentRequest/AgentRequest.d.ts +3 -0
  5. package/dist/components/ai/AgentRequest/AgentRequest.js +435 -0
  6. package/dist/components/ai/AgentRequest/AgentRequest.theme.d.ts +2 -0
  7. package/dist/components/ai/AgentRequest/AgentRequest.theme.js +106 -0
  8. package/dist/components/ai/AgentRequest/AgentRequest.types.d.ts +241 -0
  9. package/dist/components/ai/AgentRequest/index.d.ts +3 -0
  10. package/dist/components/ai/AgentStatus/AgentStatus.d.ts +3 -0
  11. package/dist/components/ai/AgentStatus/AgentStatus.js +144 -0
  12. package/dist/components/ai/AgentStatus/AgentStatus.theme.d.ts +2 -0
  13. package/dist/components/ai/AgentStatus/AgentStatus.theme.js +37 -0
  14. package/dist/components/ai/AgentStatus/AgentStatus.types.d.ts +116 -0
  15. package/dist/components/ai/AgentStatus/index.d.ts +3 -0
  16. package/dist/components/ai/CodeBlock/CodeBlock.js +3 -3
  17. package/dist/components/ai/CodeBlock/CodeBlock.theme.js +2 -2
  18. package/dist/components/ai/PromptInput/PromptInput.js +13 -14
  19. package/dist/components/ai/PromptInput/PromptInput.theme.js +3 -3
  20. package/dist/components/ai/PromptInput/VoiceRecorder.js +3 -3
  21. package/dist/components/ai/PromptSuggestion/PromptSuggestion.theme.js +2 -2
  22. package/dist/components/ai/Reasoning/Reasoning.d.ts +5 -0
  23. package/dist/components/ai/Reasoning/Reasoning.js +40 -0
  24. package/dist/components/ai/Reasoning/Reasoning.theme.d.ts +6 -0
  25. package/dist/components/ai/Reasoning/Reasoning.theme.js +36 -0
  26. package/dist/components/ai/Reasoning/Reasoning.types.d.ts +73 -0
  27. package/dist/components/ai/Reasoning/ReasoningTrace.d.ts +11 -0
  28. package/dist/components/ai/Reasoning/ReasoningTrace.js +84 -0
  29. package/dist/components/ai/Reasoning/index.d.ts +3 -0
  30. package/dist/components/ai/SourceCitation/SourceCitation.d.ts +4 -0
  31. package/dist/components/ai/SourceCitation/SourceCitation.js +29 -0
  32. package/dist/components/ai/SourceCitation/SourceCitation.theme.d.ts +2 -0
  33. package/dist/components/ai/SourceCitation/SourceCitation.theme.js +23 -0
  34. package/dist/components/ai/SourceCitation/SourceCitation.types.d.ts +55 -0
  35. package/dist/components/ai/SourceCitation/index.d.ts +3 -0
  36. package/dist/components/ai/StreamingResponse/AnimatedText.d.ts +7 -0
  37. package/dist/components/ai/StreamingResponse/AnimatedText.js +8 -7
  38. package/dist/components/ai/StreamingResponse/ErrorDisplay.js +2 -2
  39. package/dist/components/ai/StreamingResponse/MarkdownRenderer.d.ts +5 -0
  40. package/dist/components/ai/StreamingResponse/MarkdownRenderer.js +4 -4
  41. package/dist/components/ai/StreamingResponse/StreamingCursor.d.ts +2 -2
  42. package/dist/components/ai/StreamingResponse/StreamingCursor.js +10 -7
  43. package/dist/components/ai/StreamingResponse/StreamingResponse.animations.d.ts +10 -0
  44. package/dist/components/ai/StreamingResponse/StreamingResponse.animations.js +59 -33
  45. package/dist/components/ai/StreamingResponse/StreamingResponse.js +14 -10
  46. package/dist/components/ai/StreamingResponse/StreamingResponse.theme.js +3 -1
  47. package/dist/components/ai/StreamingResponse/StreamingResponse.types.d.ts +33 -2
  48. package/dist/components/ai/StreamingResponse/StreamingSurface.d.ts +13 -0
  49. package/dist/components/ai/StreamingResponse/StreamingSurface.js +38 -0
  50. package/dist/components/ai/StreamingResponse/WordAnimationContext.d.ts +5 -0
  51. package/dist/components/ai/StreamingResponse/WordAnimationContext.js +5 -4
  52. package/dist/components/ai/StreamingResponse/index.d.ts +4 -2
  53. package/dist/components/ai/TokenCounter/TokenCounter.js +2 -2
  54. package/dist/components/ai/TokenCounter/TokenCounter.theme.js +1 -1
  55. package/dist/components/ai/index.d.ts +6 -2
  56. package/dist/components/ai/index.js +10 -3
  57. package/dist/components/ai/shared/StatusIndicator.d.ts +8 -0
  58. package/dist/components/ai/shared/StatusIndicator.js +34 -0
  59. package/dist/components/canvas/BaseNode.js +1 -1
  60. package/dist/components/canvas/CanvasToolbar.js +2 -3
  61. package/dist/components/canvas/Edge.js +2 -2
  62. package/dist/components/canvas/NodeControls.js +2 -3
  63. package/dist/components/canvas/NodeRenderer.js +4 -4
  64. package/dist/components/charts/ActivityRings/ActivityRings.js +4 -4
  65. package/dist/components/charts/ActivityRings/ActivityRings.theme.js +1 -1
  66. package/dist/components/charts/AreaChart/AreaChart.js +24 -35
  67. package/dist/components/charts/AreaChart/AreaChart.theme.d.ts +1 -6
  68. package/dist/components/charts/AreaChart/AreaChart.theme.js +10 -22
  69. package/dist/components/charts/AreaChart/AreaChart.types.d.ts +18 -11
  70. package/dist/components/charts/AreaChart/AreaChart.types.js +10 -3
  71. package/dist/components/charts/AreaChart/index.d.ts +1 -1
  72. package/dist/components/charts/BarChart/BarChart.js +13 -32
  73. package/dist/components/charts/BarChart/BarChart.types.d.ts +20 -16
  74. package/dist/components/charts/BarChart/BarChart.types.js +11 -4
  75. package/dist/components/charts/ComboChart/BarRenderer.js +10 -7
  76. package/dist/components/charts/ComboChart/BarRenderer.types.d.ts +1 -1
  77. package/dist/components/charts/ComboChart/ComboChart.js +11 -24
  78. package/dist/components/charts/ComboChart/ComboChart.types.d.ts +15 -13
  79. package/dist/components/charts/ComboChart/ComboChart.types.js +14 -2
  80. package/dist/components/charts/ComboChart/ComboChartCanvas.js +1 -1
  81. package/dist/components/charts/ComboChart/LineRenderer.js +16 -11
  82. package/dist/components/charts/ComboChart/LineRenderer.types.d.ts +1 -1
  83. package/dist/components/charts/DonutChart/DonutChart.theme.js +4 -4
  84. package/dist/components/charts/DonutChart/MultiSegmentDonutChart.theme.js +1 -1
  85. package/dist/components/charts/Heatmap/Heatmap.js +49 -42
  86. package/dist/components/charts/Heatmap/Heatmap.theme.d.ts +6 -2
  87. package/dist/components/charts/Heatmap/Heatmap.theme.js +20 -8
  88. package/dist/components/charts/Heatmap/Heatmap.types.d.ts +49 -82
  89. package/dist/components/charts/Heatmap/HeatmapCell.js +30 -81
  90. package/dist/components/charts/Heatmap/HeatmapLegend.d.ts +7 -6
  91. package/dist/components/charts/Heatmap/HeatmapLegend.js +6 -6
  92. package/dist/components/charts/Heatmap/index.d.ts +1 -1
  93. package/dist/components/charts/Heatmap/utils/heatmapUtils.d.ts +7 -12
  94. package/dist/components/charts/Heatmap/utils/heatmapUtils.js +16 -61
  95. package/dist/components/charts/Heatmap/utils/heatmapUtils.test.d.ts +1 -0
  96. package/dist/components/charts/HorizontalBarChart/HorizontalBarChart.d.ts +16 -0
  97. package/dist/components/charts/HorizontalBarChart/HorizontalBarChart.js +237 -0
  98. package/dist/components/charts/HorizontalBarChart/HorizontalBarChart.types.d.ts +62 -0
  99. package/dist/components/charts/HorizontalBarChart/HorizontalBarChart.types.js +21 -0
  100. package/dist/components/charts/HorizontalBarChart/index.d.ts +3 -0
  101. package/dist/components/charts/LineChart/LineChart.js +11 -28
  102. package/dist/components/charts/LineChart/LineChart.types.d.ts +11 -14
  103. package/dist/components/charts/LineChart/LineChart.types.js +11 -3
  104. package/dist/components/charts/LollipopChart/LollipopChart.d.ts +3 -0
  105. package/dist/components/charts/LollipopChart/LollipopChart.js +361 -0
  106. package/dist/components/charts/LollipopChart/LollipopChart.types.d.ts +42 -0
  107. package/dist/components/charts/LollipopChart/LollipopChart.types.js +12 -0
  108. package/dist/components/charts/LollipopChart/index.d.ts +3 -0
  109. package/dist/components/charts/RadarChart/RadarChart.js +1 -1
  110. package/dist/components/charts/StackedBarChart/StackedBarChart.js +151 -133
  111. package/dist/components/charts/StackedBarChart/StackedBarChart.types.d.ts +20 -18
  112. package/dist/components/charts/StackedBarChart/StackedBarChart.types.js +10 -4
  113. package/dist/components/charts/hooks/useChartAccessibility.d.ts +1 -1
  114. package/dist/components/charts/hooks/useChartAccessibility.js +12 -6
  115. package/dist/components/charts/hooks/useTooltipPosition.js +18 -6
  116. package/dist/components/charts/index.d.ts +10 -8
  117. package/dist/components/charts/index.js +8 -4
  118. package/dist/components/charts/shared/ChartAxis/CategoryYAxis.d.ts +14 -0
  119. package/dist/components/charts/shared/ChartAxis/CategoryYAxis.js +35 -0
  120. package/dist/components/charts/shared/ChartAxis/ChartAxis.types.d.ts +69 -8
  121. package/dist/components/charts/shared/ChartAxis/ValueXAxis.d.ts +14 -0
  122. package/dist/components/charts/shared/ChartAxis/ValueXAxis.js +64 -0
  123. package/dist/components/charts/shared/ChartAxis/XAxis.js +1 -1
  124. package/dist/components/charts/shared/ChartAxis/YAxis.js +2 -2
  125. package/dist/components/charts/shared/ChartAxis/index.d.ts +3 -1
  126. package/dist/components/charts/shared/ChartGrid/HorizontalGrid.d.ts +0 -2
  127. package/dist/components/charts/shared/ChartGrid/HorizontalGrid.js +1 -1
  128. package/dist/components/charts/shared/ChartGrid/VerticalGrid.d.ts +29 -0
  129. package/dist/components/charts/shared/ChartGrid/VerticalGrid.js +26 -0
  130. package/dist/components/charts/shared/ChartGrid/index.d.ts +2 -0
  131. package/dist/components/charts/shared/ChartMarker/ChartMarker.js +7 -1
  132. package/dist/components/charts/shared/ChartText/ChartText.theme.js +1 -1
  133. package/dist/components/charts/shared/index.d.ts +1 -1
  134. package/dist/components/charts/theme/chart.theme.js +21 -26
  135. package/dist/components/charts/types/chart.types.d.ts +9 -5
  136. package/dist/components/charts/types/chart.types.js +1 -7
  137. package/dist/components/charts/utils/animation-utils.d.ts +12 -7
  138. package/dist/components/charts/utils/animation-utils.js +19 -21
  139. package/dist/components/charts/utils/bar-emphasis.d.ts +32 -3
  140. package/dist/components/charts/utils/bar-emphasis.js +24 -8
  141. package/dist/components/charts/utils/index.d.ts +1 -0
  142. package/dist/components/charts/utils/series-color.d.ts +7 -0
  143. package/dist/components/charts/utils/series-color.js +20 -0
  144. package/dist/components/core/Accordion/Accordion.theme.js +3 -3
  145. package/dist/components/core/Accordion/AccordionTrigger.js +2 -2
  146. package/dist/components/core/Alert/Alert.animations.d.ts +11 -3
  147. package/dist/components/core/Alert/Alert.animations.js +30 -8
  148. package/dist/components/core/Alert/Alert.js +23 -9
  149. package/dist/components/core/Alert/Alert.theme.js +1 -1
  150. package/dist/components/core/Alert/Alert.types.d.ts +4 -2
  151. package/dist/components/core/AlertDialog/AlertDialog.js +2 -2
  152. package/dist/components/core/Avatar/Avatar.js +50 -42
  153. package/dist/components/core/Avatar/Avatar.theme.d.ts +8 -4
  154. package/dist/components/core/Avatar/Avatar.theme.js +64 -8
  155. package/dist/components/core/Avatar/Avatar.types.d.ts +13 -2
  156. package/dist/components/core/Avatar/index.d.ts +1 -1
  157. package/dist/components/core/AvatarGroup/AvatarGroup.js +6 -8
  158. package/dist/components/core/AvatarGroup/AvatarGroup.theme.d.ts +1 -2
  159. package/dist/components/core/AvatarGroup/AvatarGroup.theme.js +2 -6
  160. package/dist/components/core/AvatarGroup/AvatarGroup.types.d.ts +0 -6
  161. package/dist/components/core/AvatarGroup/index.d.ts +1 -1
  162. package/dist/components/core/Badge/Badge.animations.d.ts +0 -5
  163. package/dist/components/core/Badge/Badge.animations.js +5 -82
  164. package/dist/components/core/Badge/Badge.d.ts +7 -4
  165. package/dist/components/core/Badge/Badge.js +33 -65
  166. package/dist/components/core/Badge/Badge.theme.js +26 -24
  167. package/dist/components/core/Badge/Badge.types.d.ts +18 -34
  168. package/dist/components/core/Breadcrumbs/Breadcrumbs.theme.d.ts +1 -4
  169. package/dist/components/core/Breadcrumbs/Breadcrumbs.theme.js +6 -6
  170. package/dist/components/core/Button/Button.js +14 -58
  171. package/dist/components/core/Button/Button.theme.d.ts +2 -0
  172. package/dist/components/core/Button/Button.theme.js +35 -22
  173. package/dist/components/core/Button/Button.types.d.ts +26 -13
  174. package/dist/components/core/Button/index.d.ts +0 -2
  175. package/dist/components/core/Calendar/Calendar.js +20 -5
  176. package/dist/components/core/Calendar/Calendar.theme.js +15 -23
  177. package/dist/components/core/Calendar/Calendar.types.d.ts +0 -1
  178. package/dist/components/core/Calendar/CalendarMini/CalendarMini.js +3 -3
  179. package/dist/components/core/Calendar/CalendarMini/CalendarMini.theme.js +2 -2
  180. package/dist/components/core/Card/Card.js +7 -2
  181. package/dist/components/core/Card/Card.theme.js +40 -4
  182. package/dist/components/core/Card/Card.types.d.ts +20 -0
  183. package/dist/components/core/Card/CardBody.js +9 -1
  184. package/dist/components/core/Card/CardContext.d.ts +13 -0
  185. package/dist/components/core/Card/CardContext.js +14 -0
  186. package/dist/components/core/Card/CardFooter.js +1 -1
  187. package/dist/components/core/Card/CardHeader.js +4 -1
  188. package/dist/components/core/CommandPalette/CommandPalette.js +5 -4
  189. package/dist/components/core/CommandPalette/CommandPalette.theme.js +3 -7
  190. package/dist/components/core/CommandPalette/CommandPalette.types.d.ts +2 -0
  191. package/dist/components/core/ContextMenu/ContextMenu.theme.js +4 -3
  192. package/dist/components/core/ContextMenu/ContextMenu.types.d.ts +8 -1
  193. package/dist/components/core/ContextMenu/ContextMenuItem.js +2 -2
  194. package/dist/components/core/ContextMenu/ContextMenuSub.d.ts +11 -1
  195. package/dist/components/core/ContextMenu/ContextMenuSub.js +35 -22
  196. package/dist/components/core/ContextMenu/ContextMenuSubBody.js +14 -3
  197. package/dist/components/core/ContextMenu/ContextMenuSubTrigger.js +22 -9
  198. package/dist/components/core/DragDrop/DragDrop.theme.js +2 -2
  199. package/dist/components/core/Drawer/Drawer.theme.js +7 -4
  200. package/dist/components/core/Drawer/DrawerHeader.js +2 -3
  201. package/dist/components/core/Dropdown/Dropdown.theme.js +3 -1
  202. package/dist/components/core/Dropdown/DropdownItem.js +2 -2
  203. package/dist/components/core/Dropdown/DropdownMenu.js +22 -7
  204. package/dist/components/core/Dropdown/DropdownTrigger.js +16 -5
  205. package/dist/components/core/HeroCard/HeroCard.theme.js +5 -2
  206. package/dist/components/core/Kbd/Kbd.theme.js +4 -2
  207. package/dist/components/core/Link/Link.js +7 -5
  208. package/dist/components/core/Masonry/Masonry.theme.js +1 -1
  209. package/dist/components/core/MenuItem/MenuItem.js +2 -1
  210. package/dist/components/core/MenuItem/MenuItem.theme.js +13 -1
  211. package/dist/components/core/Message/Message.js +4 -2
  212. package/dist/components/core/Message/Message.theme.js +8 -10
  213. package/dist/components/core/Message/MessageAudio.js +2 -2
  214. package/dist/components/core/Message/MessageFile.js +2 -2
  215. package/dist/components/core/Message/MessageLink.js +2 -2
  216. package/dist/components/core/Message/MessageStatusIndicator.js +5 -5
  217. package/dist/components/core/Modal/Modal.animations.d.ts +1 -1
  218. package/dist/components/core/Modal/Modal.animations.js +50 -11
  219. package/dist/components/core/Modal/Modal.d.ts +1 -1
  220. package/dist/components/core/Modal/Modal.js +6 -2
  221. package/dist/components/core/Modal/Modal.theme.js +9 -4
  222. package/dist/components/core/Modal/ModalHeader.js +2 -3
  223. package/dist/components/core/ModalStack/ModalStackModal.js +4 -2
  224. package/dist/components/core/NavItem/NavItem.js +8 -7
  225. package/dist/components/core/NavItem/NavItem.theme.js +1 -1
  226. package/dist/components/core/OfflineIndicator/OfflineIndicator.animations.d.ts +22 -0
  227. package/dist/components/core/OfflineIndicator/OfflineIndicator.animations.js +54 -0
  228. package/dist/components/core/OfflineIndicator/OfflineIndicator.js +23 -24
  229. package/dist/components/core/OfflineIndicator/OfflineIndicator.theme.js +27 -6
  230. package/dist/components/core/OfflineIndicator/OfflineIndicator.types.d.ts +17 -0
  231. package/dist/components/core/PageHeading/PageHeading.theme.js +1 -1
  232. package/dist/components/core/PageHeading/PageHeadingBackButton.js +2 -2
  233. package/dist/components/core/Pagination/Pagination.js +3 -3
  234. package/dist/components/core/Pagination/Pagination.theme.js +5 -5
  235. package/dist/components/core/Pill/Pill.js +5 -2
  236. package/dist/components/core/Pill/Pill.theme.js +9 -5
  237. package/dist/components/core/Popover/PopoverBody.js +16 -5
  238. package/dist/components/core/Progress/Progress.d.ts +0 -25
  239. package/dist/components/core/Progress/Progress.js +79 -11
  240. package/dist/components/core/Progress/Progress.theme.js +17 -0
  241. package/dist/components/core/Progress/Progress.types.d.ts +47 -1
  242. package/dist/components/core/Rating/Rating.js +4 -5
  243. package/dist/components/core/Rating/Rating.theme.js +2 -2
  244. package/dist/components/core/Rating/Rating.types.d.ts +3 -2
  245. package/dist/components/core/ScrollArea/ScrollArea.js +1 -1
  246. package/dist/components/core/ScrollArea/ScrollArea.theme.js +1 -1
  247. package/dist/components/core/Segmented/Segmented.theme.js +10 -7
  248. package/dist/components/core/Segmented/SegmentedContext.js +1 -0
  249. package/dist/components/core/Sidebar/Sidebar.js +5 -2
  250. package/dist/components/core/Sidebar/Sidebar.theme.js +2 -2
  251. package/dist/components/core/Sidebar/Sidebar.types.d.ts +4 -2
  252. package/dist/components/core/Sidebar/SidebarContent.js +1 -1
  253. package/dist/components/core/Sidebar/SidebarHeader.js +3 -3
  254. package/dist/components/core/Sidebar/SidebarMobileTrigger.js +2 -2
  255. package/dist/components/core/Sidebar/SidebarSearch.js +4 -4
  256. package/dist/components/core/Sidebar/SidebarToggle.js +3 -3
  257. package/dist/components/core/Sidebar/SidebarUserProfile.js +3 -3
  258. package/dist/components/core/Sortable/Sortable.js +2 -2
  259. package/dist/components/core/Sortable/Sortable.theme.js +1 -1
  260. package/dist/components/core/Tabs/Tabs.theme.js +1 -1
  261. package/dist/components/core/Tag/Tag.js +2 -2
  262. package/dist/components/core/Tag/Tag.theme.js +5 -3
  263. package/dist/components/core/Toast/Toast.js +3 -3
  264. package/dist/components/core/Toast/Toast.types.d.ts +1 -1
  265. package/dist/components/core/Toast/ToastProvider.js +1 -1
  266. package/dist/components/core/Toast/useToast.js +5 -5
  267. package/dist/components/core/Tooltip/Tooltip.d.ts +1 -1
  268. package/dist/components/core/Tooltip/Tooltip.js +42 -10
  269. package/dist/components/core/Tooltip/Tooltip.types.d.ts +25 -0
  270. package/dist/components/core/Tree/Tree.js +2 -2
  271. package/dist/components/core/Tree/Tree.theme.js +1 -1
  272. package/dist/components/core/index.d.ts +0 -2
  273. package/dist/components/core/index.js +0 -4
  274. package/dist/components/core/shared/ChartTooltip/ChartTooltip.animations.d.ts +4 -0
  275. package/dist/components/core/shared/ChartTooltip/ChartTooltip.animations.js +20 -0
  276. package/dist/components/{charts → core}/shared/ChartTooltip/ChartTooltip.js +1 -1
  277. package/dist/components/core/shared/Ripple.d.ts +16 -0
  278. package/dist/components/core/shared/Ripple.js +141 -0
  279. package/dist/components/core/shared/interaction.animations.d.ts +51 -0
  280. package/dist/components/core/shared/interaction.animations.js +59 -0
  281. package/dist/components/data-display/Feed/Feed.js +2 -2
  282. package/dist/components/data-display/GanttChart/GanttChart.theme.js +7 -7
  283. package/dist/components/data-display/GanttChart/GanttChartPanel.js +2 -2
  284. package/dist/components/data-display/GanttChart/GanttTableGroupRow.js +3 -3
  285. package/dist/components/data-display/GanttChart/GanttTaskBar.js +1 -1
  286. package/dist/components/data-display/GanttChart/GanttTaskContextMenu.js +2 -2
  287. package/dist/components/data-display/GanttChart/GanttTimelineHeader.js +1 -1
  288. package/dist/components/data-display/GanttChart/GanttToolbar.js +2 -3
  289. package/dist/components/data-display/KPI/KPI.js +12 -21
  290. package/dist/components/data-display/KPI/KPI.theme.js +8 -4
  291. package/dist/components/data-display/Metric/Metric.js +2 -2
  292. package/dist/components/data-display/Metric/Metric.theme.js +25 -8
  293. package/dist/components/data-display/Metric/Metric.types.d.ts +1 -1
  294. package/dist/components/data-display/Table/Table.theme.js +11 -11
  295. package/dist/components/data-display/Table/TableActions.js +2 -2
  296. package/dist/components/data-display/Table/TableActionsMenu.js +1 -1
  297. package/dist/components/data-display/Table/TableColumnManager.js +2 -3
  298. package/dist/components/data-display/Table/TableContext.js +1 -0
  299. package/dist/components/data-display/Table/TableDeclarative.js +3 -3
  300. package/dist/components/data-display/Table/TableFilter.js +13 -6
  301. package/dist/components/data-display/Table/TableHeader.js +3 -3
  302. package/dist/components/data-display/Table/TableRow.js +2 -2
  303. package/dist/components/data-display/Table/TableSelectionHeader.js +4 -4
  304. package/dist/components/data-display/Timeline/Timeline.theme.js +1 -1
  305. package/dist/components/data-display/Timeline/TimelineMarker.js +2 -2
  306. package/dist/components/effects/CustomCursor/CustomCursor.d.ts +1 -1
  307. package/dist/components/effects/CustomCursor/CustomCursor.js +3 -3
  308. package/dist/components/effects/CustomCursor/CustomCursor.theme.js +4 -4
  309. package/dist/components/effects/DotPattern/DotPattern.js +6 -0
  310. package/dist/components/effects/DotPattern/DotPattern.types.d.ts +4 -2
  311. package/dist/components/effects/MeshGradient/MeshGradient.utils.d.ts +1 -1
  312. package/dist/components/effects/MeshGradient/MeshGradient.utils.js +1 -1
  313. package/dist/components/effects/Neumorphic/InsetCircleButton.js +1 -1
  314. package/dist/components/effects/Overlay/Overlay.js +7 -3
  315. package/dist/components/effects/index.d.ts +0 -32
  316. package/dist/components/effects/index.js +0 -16
  317. package/dist/components/effects/shared/ShaderCanvas/ShaderCanvas.d.ts +0 -2
  318. package/dist/components/effects/shared/ShaderCanvas/ShaderCanvas.js +1 -93
  319. package/dist/components/effects/shared/ShaderCanvas/ShaderCanvas.types.d.ts +0 -10
  320. package/dist/components/effects/shared/ShaderCanvas/index.d.ts +1 -1
  321. package/dist/components/effects/shared/index.d.ts +1 -3
  322. package/dist/components/effects/shared/shaderNoise.glsl.d.ts +1 -1
  323. package/dist/components/effects/shared/shaderNoise.glsl.js +2 -11
  324. package/dist/components/forms/Checkbox/Checkbox.js +2 -1
  325. package/dist/components/forms/Checkbox/Checkbox.theme.js +3 -3
  326. package/dist/components/forms/ColorPicker/ColorPickerEyeDropper.js +2 -2
  327. package/dist/components/forms/ColorPicker/ColorPickerGradient.js +2 -2
  328. package/dist/components/forms/ColorPicker/ColorPickerHeader.js +2 -2
  329. package/dist/components/forms/ColorPicker/ColorPickerImage.js +3 -3
  330. package/dist/components/forms/ColorPicker/ColorPickerInput.js +2 -2
  331. package/dist/components/forms/ColorPicker/ColorPickerPresets.js +2 -2
  332. package/dist/components/forms/ColorPicker/ColorPickerSavedColors.js +2 -2
  333. package/dist/components/forms/Combobox/Combobox.js +5 -3
  334. package/dist/components/forms/Combobox/Combobox.theme.js +2 -2
  335. package/dist/components/forms/DatePicker/DatePicker.animations.js +16 -25
  336. package/dist/components/forms/DatePicker/DatePicker.theme.js +2 -2
  337. package/dist/components/forms/DatePicker/DatePickerBody.js +1 -1
  338. package/dist/components/forms/DatePicker/DatePickerTrigger.js +2 -2
  339. package/dist/components/forms/DateRangePicker/DateRangePicker.theme.js +4 -4
  340. package/dist/components/forms/DateRangePicker/DateRangePickerBody.js +1 -1
  341. package/dist/components/forms/DateRangePicker/DateRangePickerContext.js +1 -0
  342. package/dist/components/forms/DateRangePicker/DateRangePickerPresets.js +2 -2
  343. package/dist/components/forms/DateRangePicker/DateRangePickerTrigger.js +2 -2
  344. package/dist/components/forms/FileUpload/FileUpload.js +4 -4
  345. package/dist/components/forms/FileUpload/FileUpload.theme.js +7 -3
  346. package/dist/components/forms/FileUpload/FileUploadProgress.js +7 -7
  347. package/dist/components/forms/FileUpload/FileUploadProgress.theme.js +1 -1
  348. package/dist/components/forms/Input/Input.js +6 -7
  349. package/dist/components/forms/Input/Input.theme.js +19 -15
  350. package/dist/components/forms/InputAddress/InputAddress.js +10 -3
  351. package/dist/components/forms/InputAddress/InputAddress.types.d.ts +2 -2
  352. package/dist/components/forms/InputCounter/InputCounter.js +3 -3
  353. package/dist/components/forms/InputOTP/InputOTP.d.ts +3 -12
  354. package/dist/components/forms/InputOTP/InputOTP.js +140 -151
  355. package/dist/components/forms/InputOTP/InputOTP.theme.d.ts +5 -1
  356. package/dist/components/forms/InputOTP/InputOTP.theme.js +40 -5
  357. package/dist/components/forms/InputOTP/InputOTP.types.d.ts +45 -2
  358. package/dist/components/forms/InputOTP/index.d.ts +1 -1
  359. package/dist/components/forms/InputTag/InputTag.js +5 -5
  360. package/dist/components/forms/InputTag/InputTag.theme.js +1 -2
  361. package/dist/components/forms/Mention/Mention.theme.js +3 -5
  362. package/dist/components/forms/Radio/Radio.js +3 -2
  363. package/dist/components/forms/Radio/Radio.theme.js +3 -3
  364. package/dist/components/forms/RichTextEditor/RichTextEditor.d.ts +12 -16
  365. package/dist/components/forms/RichTextEditor/RichTextEditor.js +165 -1681
  366. package/dist/components/forms/RichTextEditor/RichTextEditor.theme.d.ts +12 -56
  367. package/dist/components/forms/RichTextEditor/RichTextEditor.theme.js +60 -118
  368. package/dist/components/forms/RichTextEditor/RichTextEditor.types.d.ts +62 -126
  369. package/dist/components/forms/RichTextEditor/RichTextLinkField.d.ts +18 -0
  370. package/dist/components/forms/RichTextEditor/RichTextLinkField.js +46 -0
  371. package/dist/components/forms/RichTextEditor/RichTextToolbar.d.ts +15 -0
  372. package/dist/components/forms/RichTextEditor/RichTextToolbar.js +93 -0
  373. package/dist/components/forms/RichTextEditor/editorCommands.d.ts +50 -0
  374. package/dist/components/forms/RichTextEditor/editorCommands.js +58 -0
  375. package/dist/components/forms/RichTextEditor/editorState.d.ts +19 -0
  376. package/dist/components/forms/RichTextEditor/editorState.js +103 -0
  377. package/dist/components/forms/RichTextEditor/index.d.ts +5 -3
  378. package/dist/components/forms/RichTextEditor/sanitizeHtml.d.ts +38 -0
  379. package/dist/components/forms/RichTextEditor/sanitizeHtml.js +179 -0
  380. package/dist/components/forms/RichTextEditor/sanitizeHtml.test.d.ts +1 -0
  381. package/dist/components/forms/Select/Select.d.ts +5 -1
  382. package/dist/components/forms/Select/Select.js +14 -13
  383. package/dist/components/forms/Select/Select.theme.js +4 -4
  384. package/dist/components/forms/Select/Select.types.d.ts +74 -8
  385. package/dist/components/forms/Select/useSelectState.d.ts +9 -3
  386. package/dist/components/forms/Select/useSelectState.js +4 -1
  387. package/dist/components/forms/SelectableCard/SelectableCard.animations.d.ts +1 -2
  388. package/dist/components/forms/SelectableCard/SelectableCard.animations.js +6 -7
  389. package/dist/components/forms/SelectableCard/SelectableCard.js +3 -2
  390. package/dist/components/forms/SelectableCard/SelectableCard.theme.js +1 -1
  391. package/dist/components/forms/Signature/Signature.js +1 -1
  392. package/dist/components/forms/Slider/Slider.js +24 -11
  393. package/dist/components/forms/Slider/Slider.theme.js +9 -3
  394. package/dist/components/forms/Switch/Switch.theme.js +3 -3
  395. package/dist/components/forms/TimePicker/TimePicker.theme.js +7 -8
  396. package/dist/components/forms/TimePicker/TimePickerContent.js +1 -1
  397. package/dist/components/forms/TimePicker/TimePickerTrigger.js +3 -3
  398. package/dist/components/forms/forms.theme.js +38 -13
  399. package/dist/components/forms/index.js +2 -1
  400. package/dist/components/generative/FormShell.d.ts +22 -0
  401. package/dist/components/generative/FormShell.js +102 -0
  402. package/dist/components/generative/GenerativeView.d.ts +52 -1
  403. package/dist/components/generative/GenerativeView.js +203 -11
  404. package/dist/components/generative/actions.d.ts +5 -0
  405. package/dist/components/generative/ai-sdk/index.d.ts +1 -0
  406. package/dist/components/generative/ai-sdk/index.js +1 -0
  407. package/dist/components/generative/ai-sdk/useGenerativeChat.d.ts +52 -0
  408. package/dist/components/generative/ai-sdk/useGenerativeChat.js +73 -0
  409. package/dist/components/generative/ai-sdk/useGenerativeChat.test.d.ts +1 -0
  410. package/dist/components/generative/fieldBinding.d.ts +31 -0
  411. package/dist/components/generative/fieldBinding.js +33 -0
  412. package/dist/components/generative/fieldBinding.test.d.ts +1 -0
  413. package/dist/components/generative/formScope.d.ts +71 -0
  414. package/dist/components/generative/formScope.js +135 -0
  415. package/dist/components/generative/index.d.ts +4 -0
  416. package/dist/components/generative/index.js +4 -0
  417. package/dist/components/generative/registry.d.ts +2 -0
  418. package/dist/components/generative/registry.js +197 -4
  419. package/dist/components/generative/resolvers.js +16 -16
  420. package/dist/components/generative/schema.generated.js +2522 -328
  421. package/dist/components/generative/toToolResult.d.ts +21 -0
  422. package/dist/components/generative/toToolResult.js +15 -0
  423. package/dist/components/generative/toToolResult.test.d.ts +1 -0
  424. package/dist/components/generative/validate.d.ts +10 -1
  425. package/dist/components/generative/validate.js +126 -11
  426. package/dist/components/layout/Grid/Grid.js +1 -0
  427. package/dist/components/layout/Section/Section.theme.js +1 -1
  428. package/dist/components/layout/Stack/Stack.js +1 -0
  429. package/dist/generative.schema.json +2522 -328
  430. package/dist/hooks/index.d.ts +2 -0
  431. package/dist/hooks/useElapsedTime.d.ts +28 -0
  432. package/dist/hooks/useElapsedTime.js +37 -0
  433. package/dist/hooks/useSelectPortal.d.ts +10 -2
  434. package/dist/hooks/useSelectPortal.js +6 -3
  435. package/dist/index.js +2 -5
  436. package/dist/registry.json +3262 -2464
  437. package/dist/shadcn-compat.css +6 -6
  438. package/dist/styles/theme.test.d.ts +1 -0
  439. package/dist/styles.css +1 -1
  440. package/dist/test/render.d.ts +17 -0
  441. package/dist/theme.css +5 -1
  442. package/dist/themes/ember.css +131 -0
  443. package/dist/themes/iris.css +94 -0
  444. package/dist/themes/jade.css +139 -0
  445. package/dist/themes/precision.css +232 -0
  446. package/dist/tools.json +2557 -328
  447. package/dist/utils/colorUtils.d.ts +6 -6
  448. package/dist/utils/colorUtils.js +8 -8
  449. package/dist/utils/index.d.ts +0 -1
  450. package/package.json +39 -6
  451. package/src/global.scss +32 -28
  452. package/src/styles/theme.css +547 -176
  453. package/src/styles/theme.test.ts +119 -0
  454. package/tailwind.preset.cjs +66 -38
  455. package/dist/components/charts/FunnelChart/FunnelChart.animations.d.ts +0 -35
  456. package/dist/components/charts/FunnelChart/FunnelChart.animations.js +0 -59
  457. package/dist/components/charts/FunnelChart/FunnelChart.d.ts +0 -8
  458. package/dist/components/charts/FunnelChart/FunnelChart.js +0 -410
  459. package/dist/components/charts/FunnelChart/FunnelChart.theme.d.ts +0 -2
  460. package/dist/components/charts/FunnelChart/FunnelChart.theme.js +0 -12
  461. package/dist/components/charts/FunnelChart/FunnelChart.types.d.ts +0 -105
  462. package/dist/components/charts/FunnelChart/index.d.ts +0 -4
  463. package/dist/components/charts/ScatterPlot/ScatterPlot.d.ts +0 -9
  464. package/dist/components/charts/ScatterPlot/ScatterPlot.js +0 -207
  465. package/dist/components/charts/ScatterPlot/ScatterPlot.theme.d.ts +0 -18
  466. package/dist/components/charts/ScatterPlot/ScatterPlot.theme.js +0 -42
  467. package/dist/components/charts/ScatterPlot/ScatterPlot.types.d.ts +0 -65
  468. package/dist/components/charts/ScatterPlot/ScatterPlot.types.js +0 -12
  469. package/dist/components/charts/ScatterPlot/index.d.ts +0 -3
  470. package/dist/components/core/Button/Button.ripple.d.ts +0 -71
  471. package/dist/components/core/Button/Button.ripple.js +0 -236
  472. package/dist/components/core/Calendar/CalendarEvent/CalendarEvent.d.ts +0 -4
  473. package/dist/components/core/Calendar/CalendarEvent/CalendarEvent.theme.d.ts +0 -12
  474. package/dist/components/core/Calendar/CalendarEvent/CalendarEvent.types.d.ts +0 -23
  475. package/dist/components/core/Calendar/CalendarEvent/index.d.ts +0 -2
  476. package/dist/components/core/CardStack/CardStack.animations.d.ts +0 -47
  477. package/dist/components/core/CardStack/CardStack.d.ts +0 -3
  478. package/dist/components/core/CardStack/CardStack.js +0 -187
  479. package/dist/components/core/CardStack/CardStack.theme.d.ts +0 -6
  480. package/dist/components/core/CardStack/CardStack.theme.js +0 -33
  481. package/dist/components/core/CardStack/CardStack.types.d.ts +0 -139
  482. package/dist/components/core/CardStack/index.d.ts +0 -7
  483. package/dist/components/core/Carousel/Carousel.d.ts +0 -3
  484. package/dist/components/core/Carousel/Carousel.js +0 -83
  485. package/dist/components/core/Carousel/Carousel.theme.d.ts +0 -10
  486. package/dist/components/core/Carousel/Carousel.theme.js +0 -20
  487. package/dist/components/core/Carousel/Carousel.types.d.ts +0 -113
  488. package/dist/components/core/Carousel/CarouselBody.d.ts +0 -4
  489. package/dist/components/core/Carousel/CarouselBody.js +0 -59
  490. package/dist/components/core/Carousel/CarouselContext.d.ts +0 -3
  491. package/dist/components/core/Carousel/CarouselContext.js +0 -13
  492. package/dist/components/core/Carousel/CarouselItem.d.ts +0 -4
  493. package/dist/components/core/Carousel/CarouselItem.js +0 -11
  494. package/dist/components/core/Carousel/CarouselNext.d.ts +0 -4
  495. package/dist/components/core/Carousel/CarouselNext.js +0 -16
  496. package/dist/components/core/Carousel/CarouselPrevious.d.ts +0 -4
  497. package/dist/components/core/Carousel/CarouselPrevious.js +0 -16
  498. package/dist/components/core/Carousel/index.d.ts +0 -3
  499. package/dist/components/core/Pill/Pill.animations.d.ts +0 -32
  500. package/dist/components/core/Pill/Pill.animations.js +0 -16
  501. package/dist/components/effects/ColorPanels/ColorPanels.d.ts +0 -8
  502. package/dist/components/effects/ColorPanels/ColorPanels.js +0 -66
  503. package/dist/components/effects/ColorPanels/ColorPanels.shaders.d.ts +0 -12
  504. package/dist/components/effects/ColorPanels/ColorPanels.shaders.js +0 -218
  505. package/dist/components/effects/ColorPanels/ColorPanels.types.d.ts +0 -29
  506. package/dist/components/effects/ColorPanels/ColorPanels.types.js +0 -3
  507. package/dist/components/effects/ColorPanels/index.d.ts +0 -2
  508. package/dist/components/effects/FlutedGlass/FlutedGlass.d.ts +0 -9
  509. package/dist/components/effects/FlutedGlass/FlutedGlass.js +0 -80
  510. package/dist/components/effects/FlutedGlass/FlutedGlass.shaders.d.ts +0 -12
  511. package/dist/components/effects/FlutedGlass/FlutedGlass.shaders.js +0 -335
  512. package/dist/components/effects/FlutedGlass/FlutedGlass.types.d.ts +0 -61
  513. package/dist/components/effects/FlutedGlass/FlutedGlass.types.js +0 -16
  514. package/dist/components/effects/FlutedGlass/index.d.ts +0 -3
  515. package/dist/components/effects/GlassEffect/GlassEffect.d.ts +0 -15
  516. package/dist/components/effects/GlassEffect/GlassEffect.js +0 -38
  517. package/dist/components/effects/GlassEffect/GlassEffect.types.d.ts +0 -19
  518. package/dist/components/effects/GlassEffect/index.d.ts +0 -2
  519. package/dist/components/effects/GlassSurface/GlassSurface.d.ts +0 -8
  520. package/dist/components/effects/GlassSurface/GlassSurface.js +0 -250
  521. package/dist/components/effects/GlassSurface/GlassSurface.types.d.ts +0 -66
  522. package/dist/components/effects/GlassSurface/index.d.ts +0 -2
  523. package/dist/components/effects/GodRays/GodRays.d.ts +0 -8
  524. package/dist/components/effects/GodRays/GodRays.js +0 -68
  525. package/dist/components/effects/GodRays/GodRays.shaders.d.ts +0 -10
  526. package/dist/components/effects/GodRays/GodRays.shaders.js +0 -128
  527. package/dist/components/effects/GodRays/GodRays.types.d.ts +0 -25
  528. package/dist/components/effects/GodRays/GodRays.types.js +0 -3
  529. package/dist/components/effects/GodRays/index.d.ts +0 -2
  530. package/dist/components/effects/GridPattern/GridPattern.d.ts +0 -18
  531. package/dist/components/effects/GridPattern/GridPattern.js +0 -65
  532. package/dist/components/effects/GridPattern/GridPattern.types.d.ts +0 -47
  533. package/dist/components/effects/GridPattern/index.d.ts +0 -2
  534. package/dist/components/effects/HalftoneCmyk/HalftoneCmyk.d.ts +0 -10
  535. package/dist/components/effects/HalftoneCmyk/HalftoneCmyk.js +0 -78
  536. package/dist/components/effects/HalftoneCmyk/HalftoneCmyk.shaders.d.ts +0 -22
  537. package/dist/components/effects/HalftoneCmyk/HalftoneCmyk.shaders.js +0 -239
  538. package/dist/components/effects/HalftoneCmyk/HalftoneCmyk.types.d.ts +0 -52
  539. package/dist/components/effects/HalftoneCmyk/index.d.ts +0 -2
  540. package/dist/components/effects/HalftoneDots/HalftoneDots.d.ts +0 -9
  541. package/dist/components/effects/HalftoneDots/HalftoneDots.js +0 -68
  542. package/dist/components/effects/HalftoneDots/HalftoneDots.shaders.d.ts +0 -13
  543. package/dist/components/effects/HalftoneDots/HalftoneDots.shaders.js +0 -296
  544. package/dist/components/effects/HalftoneDots/HalftoneDots.types.d.ts +0 -43
  545. package/dist/components/effects/HalftoneDots/HalftoneDots.types.js +0 -12
  546. package/dist/components/effects/HalftoneDots/index.d.ts +0 -3
  547. package/dist/components/effects/ImageDithering/ImageDithering.d.ts +0 -9
  548. package/dist/components/effects/ImageDithering/ImageDithering.js +0 -68
  549. package/dist/components/effects/ImageDithering/ImageDithering.shaders.d.ts +0 -12
  550. package/dist/components/effects/ImageDithering/ImageDithering.shaders.js +0 -117
  551. package/dist/components/effects/ImageDithering/ImageDithering.types.d.ts +0 -30
  552. package/dist/components/effects/ImageDithering/ImageDithering.types.js +0 -8
  553. package/dist/components/effects/ImageDithering/index.d.ts +0 -3
  554. package/dist/components/effects/MagneticElement/MagneticElement.d.ts +0 -30
  555. package/dist/components/effects/MagneticElement/MagneticElement.js +0 -111
  556. package/dist/components/effects/MagneticElement/MagneticElement.types.d.ts +0 -44
  557. package/dist/components/effects/MagneticElement/index.d.ts +0 -2
  558. package/dist/components/effects/Metaballs/Metaballs.d.ts +0 -8
  559. package/dist/components/effects/Metaballs/Metaballs.js +0 -59
  560. package/dist/components/effects/Metaballs/Metaballs.shaders.d.ts +0 -10
  561. package/dist/components/effects/Metaballs/Metaballs.shaders.js +0 -102
  562. package/dist/components/effects/Metaballs/Metaballs.types.d.ts +0 -16
  563. package/dist/components/effects/Metaballs/Metaballs.types.js +0 -3
  564. package/dist/components/effects/Metaballs/index.d.ts +0 -2
  565. package/dist/components/effects/PaperTexture/PaperTexture.d.ts +0 -9
  566. package/dist/components/effects/PaperTexture/PaperTexture.js +0 -61
  567. package/dist/components/effects/PaperTexture/PaperTexture.shaders.d.ts +0 -22
  568. package/dist/components/effects/PaperTexture/PaperTexture.shaders.js +0 -145
  569. package/dist/components/effects/PaperTexture/PaperTexture.types.d.ts +0 -19
  570. package/dist/components/effects/PaperTexture/index.d.ts +0 -2
  571. package/dist/components/effects/PulsingBorder/PulsingBorder.d.ts +0 -27
  572. package/dist/components/effects/PulsingBorder/PulsingBorder.js +0 -174
  573. package/dist/components/effects/PulsingBorder/PulsingBorder.shaders.d.ts +0 -14
  574. package/dist/components/effects/PulsingBorder/PulsingBorder.shaders.js +0 -258
  575. package/dist/components/effects/PulsingBorder/PulsingBorder.types.d.ts +0 -75
  576. package/dist/components/effects/PulsingBorder/PulsingBorder.types.js +0 -3
  577. package/dist/components/effects/PulsingBorder/index.d.ts +0 -2
  578. package/dist/components/effects/SmokeRing/SmokeRing.d.ts +0 -8
  579. package/dist/components/effects/SmokeRing/SmokeRing.js +0 -62
  580. package/dist/components/effects/SmokeRing/SmokeRing.shaders.d.ts +0 -14
  581. package/dist/components/effects/SmokeRing/SmokeRing.shaders.js +0 -130
  582. package/dist/components/effects/SmokeRing/SmokeRing.types.d.ts +0 -22
  583. package/dist/components/effects/SmokeRing/SmokeRing.types.js +0 -3
  584. package/dist/components/effects/SmokeRing/index.d.ts +0 -2
  585. package/dist/components/effects/StaticGradientMesh/StaticGradientMesh.d.ts +0 -9
  586. package/dist/components/effects/StaticGradientMesh/StaticGradientMesh.js +0 -59
  587. package/dist/components/effects/StaticGradientMesh/StaticGradientMesh.shaders.d.ts +0 -14
  588. package/dist/components/effects/StaticGradientMesh/StaticGradientMesh.shaders.js +0 -129
  589. package/dist/components/effects/StaticGradientMesh/StaticGradientMesh.types.d.ts +0 -23
  590. package/dist/components/effects/StaticGradientMesh/StaticGradientMesh.types.js +0 -3
  591. package/dist/components/effects/StaticGradientMesh/index.d.ts +0 -2
  592. package/dist/components/effects/Water/Water.d.ts +0 -9
  593. package/dist/components/effects/Water/Water.js +0 -65
  594. package/dist/components/effects/Water/Water.shaders.d.ts +0 -11
  595. package/dist/components/effects/Water/Water.shaders.js +0 -123
  596. package/dist/components/effects/Water/Water.types.d.ts +0 -25
  597. package/dist/components/effects/Water/index.d.ts +0 -2
  598. package/dist/components/effects/shared/bayerMatrices.glsl.d.ts +0 -10
  599. package/dist/components/effects/shared/bayerMatrices.glsl.js +0 -44
  600. package/dist/components/effects/shared/imageUV.glsl.d.ts +0 -12
  601. package/dist/components/effects/shared/imageUV.glsl.js +0 -26
  602. package/dist/components/forms/RichTextEditor/RichTextEditor.animations.d.ts +0 -7
  603. package/dist/components/forms/RichTextEditor/RichTextEditor.animations.js +0 -32
  604. package/dist/utils/calendarUtils.d.ts +0 -60
  605. /package/dist/components/{charts → core}/shared/ChartTooltip/ChartTooltip.d.ts +0 -0
  606. /package/dist/components/{charts → core}/shared/ChartTooltip/ChartTooltip.theme.d.ts +0 -0
  607. /package/dist/components/{charts → core}/shared/ChartTooltip/ChartTooltip.theme.js +0 -0
  608. /package/dist/components/{charts → core}/shared/ChartTooltip/ChartTooltip.types.d.ts +0 -0
  609. /package/dist/components/{charts → core}/shared/ChartTooltip/ChartTooltipContent.d.ts +0 -0
  610. /package/dist/components/{charts → core}/shared/ChartTooltip/index.d.ts +0 -0
@@ -13,8 +13,7 @@ import '../../core/Dropdown/DropdownSection.js';
13
13
  import '../../core/Dropdown/DropdownSeparator.js';
14
14
  import '../../core/Dropdown/Dropdown.theme.js';
15
15
  import { cn } from '../../../utils/cn.js';
16
- import { CloudArrowUpIcon, MicrophoneIcon, PaperClipIcon, LinkIcon, DocumentIcon, XMarkIcon, PlusIcon, AdjustmentsHorizontalIcon, ChevronDownIcon, ArrowRightIcon } from '@heroicons/react/24/outline';
17
- import { MicrophoneIcon as MicrophoneIcon$1, StopIcon } from '@heroicons/react/24/solid';
16
+ import { CloudArrowUp, Microphone, Paperclip, Link, File as File$1, X, Plus, SlidersHorizontal, CaretDown, ArrowRight, Stop } from '@phosphor-icons/react';
18
17
  import { promptInputTheme } from './PromptInput.theme.js';
19
18
  import { VoiceRecorder } from './VoiceRecorder.js';
20
19
  import { dropzoneContainerVariants, dropzoneChildVariants, dropzoneActionIconVariants, textareaSwapVariants, iconSwapVariants } from './PromptInput.animations.js';
@@ -70,7 +69,7 @@ attachments: controlledAttachments, onAttachmentsChange, acceptedFileTypes = ["i
70
69
  // Button visibility
71
70
  showAttachmentButton = true, showVoiceButton = true, showSettingsButton = true, showModelSelector = true,
72
71
  // Submit button
73
- submitButtonLabel = "Submit prompt", submitButtonIcon = (jsx(ArrowRightIcon, { className: "size-4", strokeWidth: 2.5 })), submitShortcut,
72
+ submitButtonLabel = "Submit prompt", submitButtonIcon = (jsx(ArrowRight, { className: "size-4", weight: "bold" })), submitShortcut,
74
73
  // Variant
75
74
  variant = "default",
76
75
  // Styling
@@ -508,7 +507,7 @@ className, textareaClassName, footerClassName, theme = {},
508
507
  */
509
508
  const renderSubmitButton = (buttonSize, buttonVariant, buttonColor, extraClassName) => {
510
509
  if (showStopButton) {
511
- return (jsx(Button, { iconOnly: true, className: cn(mergedTheme.submitButtonStyle, extraClassName), size: buttonSize, variant: buttonVariant, color: "danger", onClick: onStop, "aria-label": "Stop generation", title: "Stop generation", showReflection: false, children: jsx(AnimatePresence, { mode: "wait", initial: false, children: jsx(motion.span, { variants: iconSwapVariants, initial: "initial", animate: "animate", exit: "exit", className: "flex items-center justify-center", children: jsx(StopIcon, { className: "size-4" }) }, "stop") }) }));
510
+ return (jsx(Button, { iconOnly: true, className: cn(mergedTheme.submitButtonStyle, extraClassName), size: buttonSize, variant: buttonVariant, color: "danger", onClick: onStop, "aria-label": "Stop generation", title: "Stop generation", showReflection: false, children: jsx(AnimatePresence, { mode: "wait", initial: false, children: jsx(motion.span, { variants: iconSwapVariants, initial: "initial", animate: "animate", exit: "exit", className: "flex items-center justify-center", children: jsx(Stop, { className: "size-4" }) }, "stop") }) }));
512
511
  }
513
512
  return (jsx(Button, { iconOnly: true, className: cn(mergedTheme.submitButtonStyle, extraClassName), size: buttonSize, variant: buttonVariant, color: buttonColor, onClick: handleSubmit, disabled: !canSubmit, state: isLoading ? "loading" : "default", "aria-label": submitButtonLabel, title: submitShortcut ? `Submit (${submitShortcut})` : undefined, showReflection: buttonVariant === "filled" ? false : undefined, children: jsx(AnimatePresence, { mode: "wait", initial: false, children: jsx(motion.span, { variants: iconSwapVariants, initial: "initial", animate: "animate", exit: "exit", className: "flex items-center justify-center", children: submitButtonIcon }, "submit") }) }));
514
513
  };
@@ -517,24 +516,24 @@ className, textareaClassName, footerClassName, theme = {},
517
516
  if (e.target.files)
518
517
  processFiles(e.target.files);
519
518
  e.target.value = "";
520
- }, className: "sr-only", "aria-label": "Attach files" }), jsxs("div", { className: cn("relative", mergedTheme.baseStyle, mergedTheme.stateStyle, variant === "simple" ? "p-3 rounded-full pl-5" : ""), onDragEnter: handleDragEnter, onDragOver: handleDragOver, onDragLeave: handleDragLeave, onDrop: handleDrop, children: [jsx(AnimatePresence, { children: isDragOver && enableDropzone && (jsxs(motion.div, { variants: dropzoneContainerVariants, initial: "initial", animate: "animate", exit: "exit", className: mergedTheme.dropzoneStyle, children: [jsx(motion.div, { variants: dropzoneChildVariants, children: jsx(CloudArrowUpIcon, { className: "size-8 text-[var(--color-primary)] mx-auto" }) }), jsx(motion.p, { variants: dropzoneChildVariants, className: mergedTheme.dropzoneTitleStyle, children: dropzoneTitle ? (
519
+ }, className: "sr-only", "aria-label": "Attach files" }), jsxs("div", { className: cn("relative", mergedTheme.baseStyle, mergedTheme.stateStyle, variant === "simple" ? "p-3 rounded-full pl-5" : ""), onDragEnter: handleDragEnter, onDragOver: handleDragOver, onDragLeave: handleDragLeave, onDrop: handleDrop, children: [jsx(AnimatePresence, { children: isDragOver && enableDropzone && (jsxs(motion.div, { variants: dropzoneContainerVariants, initial: "initial", animate: "animate", exit: "exit", className: mergedTheme.dropzoneStyle, children: [jsx(motion.div, { variants: dropzoneChildVariants, children: jsx(CloudArrowUp, { className: "size-8 text-[var(--color-primary)] mx-auto" }) }), jsx(motion.p, { variants: dropzoneChildVariants, className: mergedTheme.dropzoneTitleStyle, children: dropzoneTitle ? (
521
520
  // Parse **browse** as clickable button
522
521
  jsx(Fragment, { children: resolvedDropzoneTitle
523
522
  .split(/\*\*(.*?)\*\*/)
524
523
  .map((part, i) => i % 2 === 1 ? (jsx("button", { type: "button", onClick: handleDropzoneBrowse, className: "font-bold underline underline-offset-2 cursor-pointer hover:opacity-80", children: part }, i)) : (jsx("span", { children: part }, i))) })) : (resolvedDropzoneTitle) }), dropzoneSubtitle && (jsx(motion.p, { variants: dropzoneChildVariants, className: mergedTheme.dropzoneSubtitleStyle, children: dropzoneSubtitle })), dropzoneTitle && (jsx(motion.div, { variants: dropzoneChildVariants, className: mergedTheme.dropzoneActionsStyle, children: [
525
- CloudArrowUpIcon,
526
- MicrophoneIcon,
527
- PaperClipIcon,
528
- LinkIcon,
524
+ CloudArrowUp,
525
+ Microphone,
526
+ Paperclip,
527
+ Link,
529
528
  ].map((Icon, i) => (jsx(motion.div, { variants: dropzoneActionIconVariants, className: "size-8 rounded-full bg-white/30 dark:bg-white/10 flex items-center justify-center", children: jsx(Icon, { className: "size-4 text-[var(--color-primary)]" }) }, i))) }))] })) }), currentAttachments.length > 0 && (jsx("div", { className: "flex flex-wrap gap-2 py-2 px-1", children: currentAttachments.map((attachment) => {
530
529
  var _a;
531
- return (jsxs("div", { className: "relative group rounded-lg border border-[var(--color-border)] bg-white", children: [attachment.type === "image" ? (attachment.isCompressing ? (jsx("div", { className: "size-12 flex items-center justify-center bg-gray-100 rounded-lg", children: jsx("div", { className: "w-4 h-4 border-2 border-gray-300 border-t-[var(--color-primary)] rounded-full animate-spin" }) })) : (jsx("img", { src: attachment.previewUrl, alt: attachment.file.name, className: "size-12 object-cover rounded-lg" }))) : (jsxs("div", { className: "size-12 flex flex-col items-center justify-center text-center p-1 rounded-lg", children: [jsx(DocumentIcon, { className: "w-5 h-5 text-[var(--color-text-muted)]" }), jsx("span", { className: "text-[10px] text-[var(--color-text-secondary)] truncate w-full", children: (_a = attachment.file.name.split(".").pop()) === null || _a === void 0 ? void 0 : _a.toUpperCase() })] })), jsx("button", { onClick: () => removeAttachment(attachment.id), className: "absolute -top-1.5 -right-1.5 size-5 rounded-full bg-[var(--color-danger)] text-[var(--color-danger-contrast)] flex items-center justify-center opacity-0 translate-y-1 group-hover:translate-y-0 group-hover:opacity-100 transition-all duration-300 ease-in-out cursor-pointer shadow-md", "aria-label": `Remove ${attachment.file.name}`, children: jsx(XMarkIcon, { className: "size-3", strokeWidth: 3 }) })] }, attachment.id));
530
+ return (jsxs("div", { className: "relative group rounded-lg border border-[var(--color-border)] bg-white", children: [attachment.type === "image" ? (attachment.isCompressing ? (jsx("div", { className: "size-12 flex items-center justify-center bg-gray-100 rounded-lg", children: jsx("div", { className: "w-4 h-4 border-2 border-gray-300 border-t-[var(--color-primary)] rounded-full animate-spin" }) })) : (jsx("img", { src: attachment.previewUrl, alt: attachment.file.name, className: "size-12 object-cover rounded-lg" }))) : (jsxs("div", { className: "size-12 flex flex-col items-center justify-center text-center p-1 rounded-lg", children: [jsx(File$1, { className: "w-5 h-5 text-[var(--color-text-muted)]" }), jsx("span", { className: "text-[10px] text-[var(--color-text-secondary)] truncate w-full", children: (_a = attachment.file.name.split(".").pop()) === null || _a === void 0 ? void 0 : _a.toUpperCase() })] })), jsx("button", { onClick: () => removeAttachment(attachment.id), className: "absolute -top-1.5 -right-1.5 size-5 rounded-full bg-[var(--color-danger)] text-[var(--color-danger-contrast)] flex items-center justify-center opacity-0 translate-y-1 group-hover:translate-y-0 group-hover:opacity-100 transition-all duration-[var(--motion-duration-slow)] ease-in-out cursor-pointer shadow-md", "aria-label": `Remove ${attachment.file.name}`, children: jsx(X, { className: "size-3", weight: "bold" }) })] }, attachment.id));
532
531
  }) })), jsxs("div", { className: cn("flex gap-2", variant === "simple" ? "items-end" : "items-start"), children: [jsx(AnimatePresence, { mode: "wait", initial: false, children: isRecording && enableVoiceRecording ? (jsx(motion.div, { variants: textareaSwapVariants, initial: "initial", animate: "animate", exit: "exit", className: "flex-1 min-w-0", children: jsx("p", { className: "text-center text-sm text-[var(--color-text-placeholder)]", children: placeholder }) }, "voice-recorder")) : (jsx(motion.div, { variants: textareaSwapVariants, initial: "initial", animate: "animate", exit: "exit", className: cn("flex-1 min-w-0", variant === "simple" && "flex items-end"), children: jsx(Textarea, { ref: textareaRef, id: id, unstyled: true, value: currentValue, onChange: handleChange, onKeyDown: handleKeyDown, onPaste: handlePaste, placeholder: placeholder, disabled: isDisabled, maxLength: maxLength, rows: rows, "aria-label": ariaLabel || "Prompt input", "aria-describedby": helperTextId, "aria-invalid": isInvalid, "aria-disabled": isDisabled, className: cn(mergedTheme.textareaStyle, variant === "simple" &&
533
532
  "!w-auto flex-1 min-w-0 justify-center", textareaClassName), style: {
534
533
  minHeight,
535
534
  maxHeight,
536
535
  } }) }, "textarea")) }), variant === "simple" &&
537
- renderSubmitButton("md", "filled", "neutral", "shrink-0")] }), variant !== "simple" && (jsx("div", { className: cn(mergedTheme.footerStyle, footerClassName), children: jsx(AnimatePresence, { mode: "wait", initial: false, children: isRecording && enableVoiceRecording ? (jsx(motion.div, { variants: textareaSwapVariants, initial: "initial", animate: "animate", exit: "exit", className: "w-full", children: jsx(VoiceRecorder, { onComplete: handleRecordingComplete, onCancel: handleRecordingCancel, maxDuration: maxRecordingDuration, className: mergedTheme.voiceRecorderStyle }) }, "recorder-controls")) : (jsxs(motion.div, { variants: textareaSwapVariants, initial: "initial", animate: "animate", exit: "exit", className: "flex justify-between items-end w-full", children: [jsxs("div", { className: mergedTheme.actionsStyle, children: [showAttachmentButton && (jsxs(Dropdown, { selectionMode: "none", children: [jsx(Dropdown.Trigger, { children: jsx(Button, { iconOnly: true, variant: "outline", color: "neutral", size: "sm", className: "rounded-full !border-0.5", "aria-label": "Add attachment", disabled: isDisabled, children: jsx(PlusIcon, { className: "size-4", strokeWidth: 2 }) }) }), jsxs(Dropdown.Menu, { children: [jsx(Dropdown.Item, { itemKey: "upload-image", onAction: () => {
536
+ renderSubmitButton("md", "filled", "mono", "shrink-0")] }), variant !== "simple" && (jsx("div", { className: cn(mergedTheme.footerStyle, footerClassName), children: jsx(AnimatePresence, { mode: "wait", initial: false, children: isRecording && enableVoiceRecording ? (jsx(motion.div, { variants: textareaSwapVariants, initial: "initial", animate: "animate", exit: "exit", className: "w-full", children: jsx(VoiceRecorder, { onComplete: handleRecordingComplete, onCancel: handleRecordingCancel, maxDuration: maxRecordingDuration, className: mergedTheme.voiceRecorderStyle }) }, "recorder-controls")) : (jsxs(motion.div, { variants: textareaSwapVariants, initial: "initial", animate: "animate", exit: "exit", className: "flex justify-between items-end w-full", children: [jsxs("div", { className: mergedTheme.actionsStyle, children: [showAttachmentButton && (jsxs(Dropdown, { selectionMode: "none", children: [jsx(Dropdown.Trigger, { children: jsx(Button, { iconOnly: true, variant: "outline", color: "mono", size: "sm", className: "rounded-full !border-0.5", "aria-label": "Add attachment", disabled: isDisabled, children: jsx(Plus, { className: "size-4", weight: "bold" }) }) }), jsxs(Dropdown.Menu, { children: [jsx(Dropdown.Item, { itemKey: "upload-image", onAction: () => {
538
537
  // Set accept to images only and trigger file input
539
538
  if (fileInputRef.current) {
540
539
  fileInputRef.current.accept = "image/*";
@@ -553,12 +552,12 @@ className, textareaClassName, footerClassName, theme = {},
553
552
  fileInputRef.current.click();
554
553
  }
555
554
  onAttachmentClick === null || onAttachmentClick === void 0 ? void 0 : onAttachmentClick();
556
- }, children: "Upload PDF" }, "upload-pdf")] })] })), showSettingsButton && (jsx(Button, { iconOnly: true, variant: "outline", color: "neutral", size: "sm", className: "rounded-full !border-0.5", onClick: onSettingsClick, "aria-label": "Open settings", disabled: isDisabled, children: jsx(AdjustmentsHorizontalIcon, { className: "size-4 text-[var(--color-text-muted)]", strokeWidth: 2 }) })), showVoiceButton && (jsxs(Button, { variant: "outline", color: "neutral", size: "sm", className: "rounded-full border-0 hover:bg-[var(--color-surface-hover)] dark:hover:bg-[var(--color-surface-hover)] text-[var(--color-text-secondary)]", onClick: handleVoiceClick, "aria-label": "Voice input", disabled: isDisabled || isRecording, children: [jsx(MicrophoneIcon$1, { className: "size-4" }), "Voice"] })), showModelSelector && (jsxs(Dropdown, { selectionMode: "single", selectedKeys: isModelControlled
555
+ }, children: "Upload PDF" }, "upload-pdf")] })] })), showSettingsButton && (jsx(Button, { iconOnly: true, variant: "outline", color: "mono", size: "sm", className: "rounded-full !border-0.5", onClick: onSettingsClick, "aria-label": "Open settings", disabled: isDisabled, children: jsx(SlidersHorizontal, { className: "size-4 text-[var(--color-text-muted)]", weight: "bold" }) })), showVoiceButton && (jsxs(Button, { variant: "outline", color: "mono", size: "sm", className: "rounded-full border-0 hover:bg-[var(--color-surface-hover)] dark:hover:bg-[var(--color-surface-hover)] text-[var(--color-text-secondary)]", onClick: handleVoiceClick, "aria-label": "Voice input", disabled: isDisabled || isRecording, children: [jsx(Microphone, { className: "size-4" }), "Voice"] })), showModelSelector && (jsxs(Dropdown, { selectionMode: "single", selectedKeys: isModelControlled
557
556
  ? [controlledModel]
558
- : internalModel, onSelectionChange: handleModelChange, children: [jsx(Dropdown.Trigger, { children: jsxs(Button, { variant: "outline", color: "neutral", size: "sm",
557
+ : internalModel, onSelectionChange: handleModelChange, children: [jsx(Dropdown.Trigger, { children: jsxs(Button, { variant: "outline", color: "mono", size: "sm",
559
558
  // Hover + open active state now come from Dropdown.Trigger
560
559
  // (unified surface-hover tint). `group` stays for the chevron flip.
561
- className: "group bg-transparent rounded-full border-0 font-medium text-[var(--color-text-secondary)]", "aria-label": "Select AI model", disabled: isDisabled, children: [modelMap[currentModel] || "Select Model", jsx(ChevronDownIcon, { className: "size-3 opacity-80 transition-transform duration-200 group-aria-[expanded=true]:rotate-180", strokeWidth: 2 })] }) }), jsx(Dropdown.Menu, { children: models.map((model) => (jsxs(Dropdown.Item, { itemKey: model.key, children: [model.icon && (jsx("span", { className: "mr-2", children: model.icon })), model.label] }, model.key))) })] }))] }), jsx("div", { children: renderSubmitButton("sm", "outline", "neutral") })] }, "footer-controls")) }) }))] }), displayHelperText && (jsx("div", { id: helperTextId, className: cn("mt-1 text-sm", isInvalid
560
+ className: "group bg-transparent rounded-full border-0 font-medium text-[var(--color-text-secondary)]", "aria-label": "Select AI model", disabled: isDisabled, children: [modelMap[currentModel] || "Select Model", jsx(CaretDown, { className: "size-3 opacity-80 transition-transform duration-[var(--motion-duration-base)] group-aria-[expanded=true]:rotate-180", weight: "bold" })] }) }), jsx(Dropdown.Menu, { children: models.map((model) => (jsx(Dropdown.Item, { itemKey: model.key, startContent: model.icon, children: model.label }, model.key))) })] }))] }), jsx("div", { children: renderSubmitButton("sm", "outline", "mono") })] }, "footer-controls")) }) }))] }), displayHelperText && (jsx("div", { id: helperTextId, className: cn("mt-1 text-sm", isInvalid
562
561
  ? "text-[var(--color-danger)]"
563
562
  : "text-[var(--color-text-muted)]"), role: isInvalid ? "alert" : undefined, "aria-live": isInvalid ? "polite" : undefined, children: displayHelperText }))] }));
564
563
  });
@@ -4,14 +4,14 @@ const promptInputTheme = {
4
4
  // self-contained here rather than importing the shared forms theme. Border is an inset
5
5
  // box-shadow (not `border`/`outline`) so it's clip-safe and reflow-free, like the inputs.
6
6
  baseStyle: "relative flex flex-col gap-2 p-4 rounded-[var(--card-radius)] " +
7
- "bg-white dark:bg-[var(--color-background-secondary)] transition-all " +
7
+ "bg-white dark:bg-[var(--color-surface)] transition-all " +
8
8
  "outline-none shadow-[inset_0_0_0_1px_var(--color-border)] " +
9
9
  "focus-within:shadow-[inset_0_0_0_1px_var(--color-primary-600)] " +
10
10
  "focus-within:ring-4 focus-within:ring-[var(--color-primary)]/10 " +
11
11
  "not-focus-within:hover:shadow-[inset_0_0_0_1px_var(--color-border-secondary)] " +
12
12
  "dark:focus-within:shadow-[inset_0_0_0_1px_var(--color-primary-500)] " +
13
13
  "dark:focus-within:ring-[var(--color-primary-500)]/20",
14
- textareaStyle: "w-full bg-transparent text-sm text-[var(--color-text-primary)] placeholder:text-[var(--color-text-placeholder)] focus:outline-none resize-none overflow-y-auto transition-[height] duration-200 ease-in-out",
14
+ textareaStyle: "w-full bg-transparent text-sm text-[var(--color-text-primary)] placeholder:text-[var(--color-text-placeholder)] focus:outline-none resize-none overflow-y-auto transition-[height] duration-[var(--motion-duration-base)] ease-in-out",
15
15
  footerStyle: "flex justify-between items-end",
16
16
  actionsStyle: "flex gap-1",
17
17
  submitButtonStyle: "rounded-full",
@@ -26,7 +26,7 @@ const promptInputTheme = {
26
26
  // Inset danger edge + fill (mirrors the resting/focus border model above) so invalid
27
27
  // composes over baseStyle instead of stacking a second real border on the hairline.
28
28
  invalid: "shadow-[inset_0_0_0_1px_var(--color-danger)] bg-[var(--color-danger-50)] " +
29
- "focus-within:shadow-[inset_0_0_0_1px_var(--color-danger)] focus-within:ring-[var(--color-danger-500)]/10 " +
29
+ "focus-within:shadow-[inset_0_0_0_1px_var(--color-danger)] focus-within:ring-[var(--color-danger)]/10 " +
30
30
  "not-focus-within:hover:shadow-[inset_0_0_0_1px_var(--color-danger)] " +
31
31
  "dark:bg-[var(--color-danger-950)]/30 dark:shadow-[inset_0_0_0_1px_var(--color-danger-500)] " +
32
32
  "dark:focus-within:ring-[var(--color-danger-500)]/20",
@@ -2,7 +2,7 @@
2
2
  import { jsxs, jsx } from 'react/jsx-runtime';
3
3
  import { useState, useRef, useEffect, useCallback } from 'react';
4
4
  import { motion } from 'motion/react';
5
- import { PlayIcon, PauseIcon, CheckIcon } from '@heroicons/react/24/outline';
5
+ import { Play, Pause, Check } from '@phosphor-icons/react';
6
6
  import { cn } from '../../../utils/cn.js';
7
7
  import { Button } from '../../core/Button/Button.js';
8
8
 
@@ -315,13 +315,13 @@ const VoiceRecorder = ({ onComplete, onCancel, maxDuration, className, }) => {
315
315
  }
316
316
  }
317
317
  }, [recordingState, clearTimer, startTimer]);
318
- return (jsxs("div", { className: cn("flex items-center justify-between w-full", className), children: [jsx(Button, { variant: "soft", color: "neutral", size: "sm", className: "rounded-full", onClick: handleCancel, "aria-label": "Cancel recording", children: "Cancel" }), jsxs("div", { className: "flex items-center gap-4", children: [jsxs("div", { className: "flex items-center gap-2", children: [jsx(motion.div, { className: "size-2 rounded-full bg-[var(--color-danger)]", animate: recordingState === "recording"
318
+ return (jsxs("div", { className: cn("flex items-center justify-between w-full", className), children: [jsx(Button, { variant: "soft", color: "mono", size: "sm", className: "rounded-full", onClick: handleCancel, "aria-label": "Cancel recording", children: "Cancel" }), jsxs("div", { className: "flex items-center gap-4", children: [jsxs("div", { className: "flex items-center gap-2", children: [jsx(motion.div, { className: "size-2 rounded-full bg-[var(--color-danger)]", animate: recordingState === "recording"
319
319
  ? { scale: [1, 1.4, 1] }
320
320
  : undefined, transition: {
321
321
  duration: 1.5,
322
322
  repeat: Infinity,
323
323
  ease: "easeInOut",
324
- } }), jsx("span", { className: "text-sm font-medium tabular-nums text-[var(--color-text-primary)] min-w-[2.5rem] text-center", children: formatTime(elapsed) })] }), jsx("canvas", { ref: canvasRef, width: 128, height: 32, className: "w-32 h-8 bg-transparent" })] }), jsxs("div", { className: "flex items-center gap-2", children: [jsx(Button, { iconOnly: true, variant: "outline", color: "neutral", size: "sm", className: "rounded-full", onClick: handleTogglePause, "aria-label": recordingState === "paused" ? "Resume recording" : "Pause recording", children: recordingState === "paused" ? (jsx(PlayIcon, { className: "size-4", strokeWidth: 2 })) : (jsx(PauseIcon, { className: "size-4", strokeWidth: 2 })) }), jsx(Button, { iconOnly: true, variant: "filled", color: "primary", size: "sm", className: "rounded-full", onClick: handleConfirm, "aria-label": "Confirm recording", children: jsx(CheckIcon, { className: "size-4", strokeWidth: 2.5 }) })] })] }));
324
+ } }), jsx("span", { className: "text-sm font-medium tabular-nums text-[var(--color-text-primary)] min-w-[2.5rem] text-center", children: formatTime(elapsed) })] }), jsx("canvas", { ref: canvasRef, width: 128, height: 32, className: "w-32 h-8 bg-transparent" })] }), jsxs("div", { className: "flex items-center gap-2", children: [jsx(Button, { iconOnly: true, variant: "outline", color: "mono", size: "sm", className: "rounded-full", onClick: handleTogglePause, "aria-label": recordingState === "paused" ? "Resume recording" : "Pause recording", children: recordingState === "paused" ? (jsx(Play, { className: "size-4", weight: "bold" })) : (jsx(Pause, { className: "size-4", weight: "bold" })) }), jsx(Button, { iconOnly: true, variant: "filled", color: "primary", size: "sm", className: "rounded-full", onClick: handleConfirm, "aria-label": "Confirm recording", children: jsx(Check, { className: "size-4", weight: "bold" }) })] })] }));
325
325
  };
326
326
  VoiceRecorder.displayName = "VoiceRecorder";
327
327
 
@@ -3,8 +3,8 @@ const promptSuggestionTheme = {
3
3
  "bg-[var(--color-surface)] " +
4
4
  "border border-[var(--color-border)] " +
5
5
  "text-sm text-[var(--color-text-primary)] " +
6
- "cursor-pointer transition-all duration-300 " +
7
- "hover:bg-[var(--color-background-secondary)] " +
6
+ "cursor-pointer transition-all duration-[var(--motion-duration-slow)] " +
7
+ "hover:bg-[var(--color-surface)] " +
8
8
  "focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-primary)]",
9
9
  iconStyle: "size-4 flex-shrink-0",
10
10
  };
@@ -0,0 +1,5 @@
1
+ import React from "react";
2
+ import type { ReasoningProps, ReasoningStepProps } from "./Reasoning.types";
3
+ export declare const Reasoning: React.ForwardRefExoticComponent<ReasoningProps & React.RefAttributes<HTMLDivElement>> & {
4
+ Step: React.ForwardRefExoticComponent<ReasoningStepProps & React.RefAttributes<HTMLDivElement>>;
5
+ };
@@ -0,0 +1,40 @@
1
+ "use client";
2
+ import { jsx } from 'react/jsx-runtime';
3
+ import React__default, { useMemo } from 'react';
4
+ import { Sparkle } from '@phosphor-icons/react';
5
+ import { AgentStatus } from '../AgentStatus/AgentStatus.js';
6
+ import { reasoningTheme } from './Reasoning.theme.js';
7
+ import { ReasoningTrace } from './ReasoningTrace.js';
8
+
9
+ // Reasoning keeps AgentStatus's disclosure, timer, live-region, and reduced-motion
10
+ // behavior, then adds a richer trace body for steps, prose, search, and coding.
11
+ const ReasoningRoot = React__default.forwardRef(({ variant = "steps", steps, query, remainingCount, status = "active", icon, indicator, divider = false, children, theme: themeOverrides, ...rest }, ref) => {
12
+ const disclosureTheme = useMemo(() => {
13
+ const overrides = { ...themeOverrides };
14
+ delete overrides.trace;
15
+ return {
16
+ ...reasoningTheme.disclosure,
17
+ ...overrides,
18
+ stateStyles: {
19
+ ...reasoningTheme.disclosure.stateStyles,
20
+ ...overrides.stateStyles,
21
+ },
22
+ indicatorStyles: {
23
+ ...reasoningTheme.disclosure.indicatorStyles,
24
+ ...overrides.indicatorStyles,
25
+ },
26
+ };
27
+ }, [themeOverrides]);
28
+ const traceTheme = useMemo(() => ({ ...reasoningTheme.trace, ...themeOverrides === null || themeOverrides === void 0 ? void 0 : themeOverrides.trace }), [themeOverrides]);
29
+ const body = steps ? (jsx(ReasoningTrace, { variant: variant, steps: steps, query: query, remainingCount: remainingCount, theme: traceTheme })) : (children);
30
+ return (jsx(AgentStatus, { ref: ref, mode: "reasoning", status: status, icon: icon !== null && icon !== void 0 ? icon : (jsx(Sparkle, { "data-reasoning-summary-icon": "", className: "size-3.5", weight: status === "active" ? "fill" : "regular" })), indicator: indicator !== null && indicator !== void 0 ? indicator : true, divider: divider, theme: disclosureTheme, ...rest, children: body }));
31
+ });
32
+ ReasoningRoot.displayName = "Reasoning";
33
+ // A step is just a status row; children carry its text.
34
+ const ReasoningStep = React__default.forwardRef(({ children, status = "complete", ...rest }, ref) => (jsx(AgentStatus, { ref: ref, mode: "status", status: status, label: children, wrap: true, live: "off", ...rest })));
35
+ ReasoningStep.displayName = "Reasoning.Step";
36
+ const Reasoning = Object.assign(ReasoningRoot, {
37
+ Step: ReasoningStep,
38
+ });
39
+
40
+ export { Reasoning };
@@ -0,0 +1,6 @@
1
+ import type { ReasoningTraceTheme, ReasoningThemeOverrides } from "./Reasoning.types";
2
+ export interface ReasoningTheme {
3
+ disclosure: ReasoningThemeOverrides;
4
+ trace: ReasoningTraceTheme;
5
+ }
6
+ export declare const reasoningTheme: ReasoningTheme;
@@ -0,0 +1,36 @@
1
+ const reasoningTheme = {
2
+ disclosure: {
3
+ reasoningRootStyle: "w-full min-w-0",
4
+ triggerStyle: "-mx-1.5 flex w-fit max-w-full items-center rounded-[var(--form-radius)] px-1.5 py-1 text-left " +
5
+ "transition-colors duration-[var(--motion-duration-fast)] ease-out hover:bg-[var(--color-surface-hover)] " +
6
+ "focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-primary)]",
7
+ triggerContentStyle: "inline-flex min-w-0 items-center gap-1.5",
8
+ chevronStyle: "inline-flex size-3.5 shrink-0 items-center justify-center text-[var(--color-text-muted)]",
9
+ dividerStyle: "hidden",
10
+ contentStyle: "w-full min-w-0 overflow-hidden",
11
+ contentInnerStyle: "w-full min-w-0 pt-1",
12
+ proseStyle: "flex flex-col gap-2 pl-5 text-sm leading-relaxed text-[var(--color-text-secondary)] [&_p]:m-0",
13
+ },
14
+ trace: {
15
+ traceStyle: "relative min-w-0 py-1",
16
+ guideStyle: "pointer-events-none absolute bottom-3 left-[13px] top-3 w-px bg-[var(--color-border)]",
17
+ listStyle: "relative flex min-w-0 flex-col gap-0.5",
18
+ itemStyle: "relative flex min-h-7 min-w-0 items-start gap-2 rounded-[calc(var(--radius-base)*0.75)] px-1.5 py-1 text-left",
19
+ interactiveItemStyle: "transition-colors duration-[var(--motion-duration-fast)] ease-out hover:bg-[var(--color-surface-hover)] " +
20
+ "focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[var(--color-primary)]",
21
+ indicatorStyle: "relative z-10 mt-0.5 flex size-3.5 shrink-0 items-center justify-center",
22
+ indicatorSurfaceStyle: "rounded-full bg-[var(--color-surface)] ring-2 ring-[var(--color-surface)]",
23
+ primaryStyle: "min-w-0 flex-1 text-sm font-medium leading-5 text-[var(--color-text-primary)]",
24
+ reasoningPrimaryStyle: "min-w-0 flex-1 text-sm font-normal leading-relaxed text-[var(--color-text-secondary)]",
25
+ secondaryStyle: "shrink-0 text-xs leading-5 text-[var(--color-text-muted)]",
26
+ queryStyle: "mb-0.5 flex min-h-7 min-w-0 items-center gap-2 rounded-[calc(var(--radius-base)*0.75)] px-1.5 py-1",
27
+ queryIconStyle: "ml-px flex size-3.5 shrink-0 items-center justify-center text-[var(--color-text-muted)]",
28
+ queryTextStyle: "min-w-0 truncate text-sm leading-5 text-[var(--color-text-secondary)]",
29
+ diffStyle: "shrink-0 font-mono text-xs leading-5 tabular-nums",
30
+ additionsStyle: "text-[var(--color-success)]",
31
+ deletionsStyle: "text-[var(--color-danger)]",
32
+ remainingStyle: "ml-5 px-1.5 py-1 text-xs text-[var(--color-text-muted)]",
33
+ },
34
+ };
35
+
36
+ export { reasoningTheme };
@@ -0,0 +1,73 @@
1
+ import React from "react";
2
+ import type { AgentStatusProps, AgentStatusState, AgentStatusThemeOverrides } from "../AgentStatus";
3
+ export type ReasoningVariant = "steps" | "reasoning" | "search" | "coding";
4
+ export type ReasoningStepKind = "step" | "source" | "read" | "edit" | "command";
5
+ export interface ReasoningTraceTheme {
6
+ traceStyle: string;
7
+ guideStyle: string;
8
+ listStyle: string;
9
+ itemStyle: string;
10
+ interactiveItemStyle: string;
11
+ indicatorStyle: string;
12
+ indicatorSurfaceStyle: string;
13
+ primaryStyle: string;
14
+ reasoningPrimaryStyle: string;
15
+ secondaryStyle: string;
16
+ queryStyle: string;
17
+ queryIconStyle: string;
18
+ queryTextStyle: string;
19
+ diffStyle: string;
20
+ additionsStyle: string;
21
+ deletionsStyle: string;
22
+ remainingStyle: string;
23
+ }
24
+ /**
25
+ * Reasoning is a preset of AgentStatus fixed to `mode="reasoning"` — the
26
+ * collapsible "show the AI's thinking" disclosure. Every AgentStatus prop
27
+ * except `mode` applies.
28
+ */
29
+ export interface ReasoningProps extends Omit<AgentStatusProps, "mode" | "steps" | "theme"> {
30
+ /** Trace presentation. @default "steps" */
31
+ variant?: ReasoningVariant;
32
+ /** Structured trace rows. Existing `{ label, status, duration }` rows remain valid. */
33
+ steps?: ReasoningStepData[];
34
+ /** Search query shown before source rows when `variant="search"`. */
35
+ query?: React.ReactNode;
36
+ /** Additional undisclosed results, rendered as “+N more”. */
37
+ remainingCount?: number;
38
+ theme?: ReasoningThemeOverrides;
39
+ }
40
+ /** A structured reasoning, search-source, or coding-tool trace row. */
41
+ export interface ReasoningStepData {
42
+ id?: React.Key;
43
+ label: React.ReactNode;
44
+ status?: AgentStatusState;
45
+ /** Elapsed or final step duration in seconds. */
46
+ duration?: number;
47
+ /** Secondary metadata such as a domain, file path, result count, or command. */
48
+ description?: React.ReactNode;
49
+ /** Optional destination. Rows with an href render as links. */
50
+ href?: string;
51
+ target?: React.HTMLAttributeAnchorTarget;
52
+ rel?: string;
53
+ /** Uses the code font for secondary metadata. */
54
+ mono?: boolean;
55
+ /** Optional row glyph; inferred from `variant`/`kind` when omitted. */
56
+ icon?: React.ReactNode;
57
+ /** Tool/source semantics used to select a default glyph. */
58
+ kind?: ReasoningStepKind;
59
+ additions?: number;
60
+ deletions?: number;
61
+ }
62
+ export interface ReasoningThemeOverrides extends AgentStatusThemeOverrides {
63
+ trace?: Partial<ReasoningTraceTheme>;
64
+ }
65
+ export interface ReasoningStepProps {
66
+ /** Step state — drives the indicator glyph. @default "complete" */
67
+ status?: AgentStatusState;
68
+ /** Step text. */
69
+ children: React.ReactNode;
70
+ /** Elapsed or final step duration in seconds. */
71
+ duration?: number;
72
+ className?: string;
73
+ }
@@ -0,0 +1,11 @@
1
+ import React from "react";
2
+ import type { ReasoningStepData, ReasoningTraceTheme, ReasoningVariant } from "./Reasoning.types";
3
+ interface ReasoningTraceProps {
4
+ variant: ReasoningVariant;
5
+ steps: ReasoningStepData[];
6
+ query?: React.ReactNode;
7
+ remainingCount?: number;
8
+ theme: ReasoningTraceTheme;
9
+ }
10
+ export declare const ReasoningTrace: React.FC<ReasoningTraceProps>;
11
+ export {};
@@ -0,0 +1,84 @@
1
+ "use client";
2
+ import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
3
+ import { MagnifyingGlass, GlobeSimple, FileText, TerminalWindow, PencilSimple, WarningCircle, Clock, Check, CircleNotch } from '@phosphor-icons/react';
4
+ import { useReducedMotion, motion } from 'motion/react';
5
+ import { cn } from '../../../utils/cn.js';
6
+
7
+ const formatDuration = (duration) => {
8
+ const safe = Math.max(0, duration);
9
+ const rounded = safe < 60 ? Math.round(safe * 10) / 10 : Math.round(safe);
10
+ if (rounded < 60) {
11
+ return `${rounded.toFixed(Number.isInteger(rounded) ? 0 : 1)}s`;
12
+ }
13
+ return `${Math.floor(rounded / 60)}m ${rounded % 60}s`;
14
+ };
15
+ const statusTone = (status) => {
16
+ switch (status) {
17
+ case "active":
18
+ return "text-[var(--color-primary)]";
19
+ case "complete":
20
+ return "text-[var(--color-success)]";
21
+ case "pending":
22
+ return "text-[var(--color-text-placeholder)]";
23
+ case "error":
24
+ return "text-[var(--color-danger)]";
25
+ default:
26
+ return "text-[var(--color-text-muted)]";
27
+ }
28
+ };
29
+ const stateGlyph = (step) => {
30
+ var _a;
31
+ if (step.icon)
32
+ return step.icon;
33
+ switch ((_a = step.status) !== null && _a !== void 0 ? _a : "complete") {
34
+ case "active":
35
+ return jsx(CircleNotch, { className: "size-3.5 animate-spin" });
36
+ case "complete":
37
+ return jsx(Check, { className: "size-3.5", weight: "bold" });
38
+ case "pending":
39
+ return jsx(Clock, { className: "size-3.5" });
40
+ case "error":
41
+ return jsx(WarningCircle, { className: "size-3.5", weight: "fill" });
42
+ default:
43
+ return jsx("span", { className: "size-1.5 rounded-full bg-current" });
44
+ }
45
+ };
46
+ const traceGlyph = (variant, step) => {
47
+ if (step.icon)
48
+ return step.icon;
49
+ if (variant === "steps")
50
+ return stateGlyph(step);
51
+ if (variant === "search" || step.kind === "source") {
52
+ return jsx(GlobeSimple, { className: "size-3.5" });
53
+ }
54
+ if (variant === "coding") {
55
+ switch (step.kind) {
56
+ case "edit":
57
+ return jsx(PencilSimple, { className: "size-3.5" });
58
+ case "command":
59
+ return jsx(TerminalWindow, { className: "size-3.5" });
60
+ default:
61
+ return jsx(FileText, { className: "size-3.5" });
62
+ }
63
+ }
64
+ return jsx("span", { className: "size-1.5 rounded-full bg-current" });
65
+ };
66
+ const ReasoningTrace = ({ variant, steps, query, remainingCount = 0, theme, }) => {
67
+ const shouldReduceMotion = useReducedMotion();
68
+ return (jsxs("div", { className: theme.traceStyle, "data-reasoning-variant": variant, children: [steps.length > 1 && (jsx("span", { className: theme.guideStyle, "data-reasoning-trace-guide": "", "aria-hidden": "true" })), query !== undefined && (jsxs(motion.div, { className: theme.queryStyle, initial: shouldReduceMotion ? false : { opacity: 0, y: -3 }, animate: { opacity: 1, y: 0 }, transition: { duration: shouldReduceMotion ? 0 : 0.18 }, children: [jsx("span", { className: theme.queryIconStyle, "aria-hidden": "true", children: jsx(MagnifyingGlass, { className: "size-full" }) }), jsx("span", { className: theme.queryTextStyle, children: query })] })), jsx("ol", { className: theme.listStyle, children: steps.map((step, index) => {
69
+ var _a, _b, _c, _d;
70
+ const status = (_a = step.status) !== null && _a !== void 0 ? _a : "complete";
71
+ const metadata = (_b = step.description) !== null && _b !== void 0 ? _b : (step.duration !== undefined ? formatDuration(step.duration) : undefined);
72
+ const rowClassName = cn(theme.itemStyle, step.href && theme.interactiveItemStyle);
73
+ const content = (jsxs(Fragment, { children: [jsx("span", { className: cn(theme.indicatorStyle, theme.indicatorSurfaceStyle, statusTone(variant === "steps" ? status : undefined)), "aria-hidden": "true", children: traceGlyph(variant, step) }), jsx("span", { className: variant === "reasoning"
74
+ ? theme.reasoningPrimaryStyle
75
+ : theme.primaryStyle, children: step.label }), metadata !== undefined && (jsx("span", { className: cn(theme.secondaryStyle, step.mono && "font-mono"), children: metadata })), (step.additions !== undefined || step.deletions !== undefined) && (jsxs("span", { className: theme.diffStyle, "aria-label": "Code changes", children: [step.additions !== undefined && (jsxs("span", { className: theme.additionsStyle, children: ["+", step.additions] })), step.additions !== undefined && step.deletions !== undefined && " ", step.deletions !== undefined && (jsxs("span", { className: theme.deletionsStyle, children: ["\u2212", step.deletions] }))] }))] }));
76
+ return (jsx(motion.li, { initial: shouldReduceMotion ? false : { opacity: 0, y: -3 }, animate: { opacity: 1, y: 0 }, transition: {
77
+ duration: shouldReduceMotion ? 0 : 0.2,
78
+ delay: shouldReduceMotion ? 0 : index * 0.045,
79
+ ease: [0.23, 1, 0.32, 1],
80
+ }, className: "min-w-0", children: step.href ? (jsx("a", { href: step.href, target: step.target, rel: (_c = step.rel) !== null && _c !== void 0 ? _c : (step.target === "_blank" ? "noreferrer" : undefined), className: rowClassName, children: content })) : (jsx("div", { className: rowClassName, children: content })) }, (_d = step.id) !== null && _d !== void 0 ? _d : index));
81
+ }) }), remainingCount > 0 && (jsxs(motion.div, { className: theme.remainingStyle, initial: shouldReduceMotion ? false : { opacity: 0 }, animate: { opacity: 1 }, transition: { duration: shouldReduceMotion ? 0 : 0.2 }, children: ["+", remainingCount, " more"] }))] }));
82
+ };
83
+
84
+ export { ReasoningTrace };
@@ -0,0 +1,3 @@
1
+ export { Reasoning } from "./Reasoning";
2
+ export { reasoningTheme } from "./Reasoning.theme";
3
+ export type { ReasoningProps, ReasoningStepProps, ReasoningStepData, ReasoningStepKind, ReasoningTraceTheme, ReasoningVariant, ReasoningThemeOverrides, } from "./Reasoning.types";
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import type { SourceCitationGroupProps, SourceCitationProps } from "./SourceCitation.types";
3
+ export declare const SourceCitation: React.ForwardRefExoticComponent<SourceCitationProps & React.RefAttributes<HTMLButtonElement>>;
4
+ export declare const SourceCitationGroup: React.ForwardRefExoticComponent<SourceCitationGroupProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,29 @@
1
+ "use client";
2
+ import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
3
+ import React__default, { useMemo } from 'react';
4
+ import { Link, ArrowSquareOut } from '@phosphor-icons/react';
5
+ import { cn } from '../../../utils/cn.js';
6
+ import { Link as Link$1 } from '../../core/Link/Link.js';
7
+ import { Popover } from '../../core/Popover/Popover.js';
8
+ import '../../core/Popover/PopoverContext.js';
9
+ import '../../core/Popover/PopoverBody.js';
10
+ import { sourceCitationTheme } from './SourceCitation.theme.js';
11
+
12
+ const SourceCitation = React__default.forwardRef(({ index, title, domain, excerpt, href, icon, preview, placement = "top-start", open, defaultOpen, onOpenChange, openInNewTab = true, linkLabel = "Open source", className, theme: themeOverrides, disabled, ...props }, ref) => {
13
+ const theme = useMemo(() => ({ ...sourceCitationTheme, ...themeOverrides }), [themeOverrides]);
14
+ // `title` and `domain` are both ReactNode, so neither is guaranteed to yield a
15
+ // usable name. Fall back through the domain (already the visible chip text) before
16
+ // the generic word, so rich-titled citations stay distinguishable by ear.
17
+ const label = (typeof title === "string" && title) ||
18
+ (typeof domain === "string" && domain) ||
19
+ "source";
20
+ return (jsxs(Popover, { placement: placement, isOpen: open, defaultIsOpen: defaultOpen, onOpenChange: onOpenChange, children: [jsx(Popover.Trigger, { children: jsxs("button", { ref: ref, type: "button", className: cn(theme.triggerStyle, className), "aria-label": `View source: ${label}`, disabled: disabled, ...props, children: [icon ? (jsx("span", { className: theme.faviconStyle, "aria-hidden": "true", children: icon })) : (index !== undefined && (jsx("span", { className: theme.indexStyle, children: index }))), jsx("span", { className: theme.domainStyle, children: domain !== null && domain !== void 0 ? domain : title })] }) }), jsx(Popover.Body, { className: theme.popoverStyle, children: preview !== null && preview !== void 0 ? preview : (jsxs(Fragment, { children: [jsxs("div", { className: theme.previewHeaderStyle, children: [jsx("span", { className: theme.previewIconStyle, "aria-hidden": "true", children: icon !== null && icon !== void 0 ? icon : jsx(Link, { className: "size-4" }) }), jsxs("div", { className: "min-w-0", children: [jsx("div", { className: theme.previewTitleStyle, children: title }), domain && (jsx("div", { className: theme.previewDomainStyle, children: domain }))] })] }), excerpt && jsx("div", { className: theme.excerptStyle, children: excerpt }), href && (jsxs(Link$1, { href: href, target: openInNewTab ? "_blank" : undefined, rel: openInNewTab ? "noopener noreferrer" : undefined, className: theme.linkStyle, children: [linkLabel, jsx(ArrowSquareOut, { className: "size-3.5", "aria-hidden": "true", weight: "bold" })] }))] })) })] }));
21
+ });
22
+ SourceCitation.displayName = "SourceCitation";
23
+ const SourceCitationGroup = React__default.forwardRef(({ children, className, theme: themeOverrides, ...props }, ref) => {
24
+ var _a;
25
+ return (jsx("div", { ref: ref, role: "group", "aria-label": "Sources", className: cn((_a = themeOverrides === null || themeOverrides === void 0 ? void 0 : themeOverrides.groupStyle) !== null && _a !== void 0 ? _a : sourceCitationTheme.groupStyle, className), ...props, children: children }));
26
+ });
27
+ SourceCitationGroup.displayName = "SourceCitation.Group";
28
+
29
+ export { SourceCitation, SourceCitationGroup };
@@ -0,0 +1,2 @@
1
+ import type { SourceCitationTheme } from "./SourceCitation.types";
2
+ export declare const sourceCitationTheme: SourceCitationTheme;
@@ -0,0 +1,23 @@
1
+ const sourceCitationTheme = {
2
+ // Asymmetric padding: the round leading token provides its own visual inset,
3
+ // so the left padding is tighter than the right where the domain text sits.
4
+ triggerStyle: "inline-flex max-w-52 cursor-pointer items-center gap-1.5 rounded-full border border-[var(--color-border)] bg-[var(--color-surface)] py-0.5 pl-0.5 pr-2.5 text-xs font-medium text-[var(--color-text-secondary)] transition-colors hover:border-[var(--color-border-hover)] hover:bg-[var(--color-surface-hover)] hover:text-[var(--color-text-primary)] focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-primary)]",
5
+ // Quiet numbered token — a recessed well with a hairline, not a loud filled disc.
6
+ indexStyle: "flex size-[1.125rem] shrink-0 items-center justify-center rounded-full bg-[var(--color-surface-sunken)] text-[10px] font-semibold tabular-nums text-[var(--color-text-secondary)] ring-1 ring-inset ring-[var(--color-border)]",
7
+ // Favicon well (shown instead of the number when an icon is supplied).
8
+ faviconStyle: "flex size-[1.125rem] shrink-0 items-center justify-center overflow-hidden rounded-full bg-[var(--color-surface-sunken)] ring-1 ring-inset ring-[var(--color-border)] [&>img]:size-full [&>img]:object-cover [&>svg]:size-3",
9
+ domainStyle: "truncate",
10
+ popoverStyle: "w-80 space-y-3",
11
+ previewHeaderStyle: "flex items-start gap-2.5",
12
+ previewIconStyle: "flex size-10 shrink-0 items-center justify-center rounded-lg bg-[var(--color-surface-sunken)] text-[var(--color-text-muted)]",
13
+ previewTitleStyle: "line-clamp-2 text-sm font-semibold text-[var(--color-text-primary)]",
14
+ previewDomainStyle: "mt-0.5 truncate text-xs text-[var(--color-text-muted)]",
15
+ excerptStyle: "line-clamp-4 text-sm leading-5 text-[var(--color-text-secondary)]",
16
+ // Link's own base already provides layout (inline-flex/items-center/gap),
17
+ // color, hover underline, and focus-visible ring — only the size-specific
18
+ // bits need overriding here.
19
+ linkStyle: "text-xs font-medium",
20
+ groupStyle: "inline-flex flex-wrap items-center gap-1.5",
21
+ };
22
+
23
+ export { sourceCitationTheme };
@@ -0,0 +1,55 @@
1
+ import React from "react";
2
+ import type { PopoverPlacement } from "../../core/Popover";
3
+ export interface SourceCitationTheme {
4
+ triggerStyle: string;
5
+ indexStyle: string;
6
+ faviconStyle: string;
7
+ domainStyle: string;
8
+ popoverStyle: string;
9
+ previewHeaderStyle: string;
10
+ previewIconStyle: string;
11
+ previewTitleStyle: string;
12
+ previewDomainStyle: string;
13
+ excerptStyle: string;
14
+ linkStyle: string;
15
+ groupStyle: string;
16
+ }
17
+ export type SourceCitationThemeOverrides = Partial<SourceCitationTheme>;
18
+ export interface SourceCitationProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "children" | "title"> {
19
+ /** Citation number or compact identifier displayed in the chip. */
20
+ index?: React.ReactNode;
21
+ /** Source title displayed in the preview. */
22
+ title: React.ReactNode;
23
+ /** Source domain displayed in both the chip and preview. */
24
+ domain?: React.ReactNode;
25
+ /** Supporting source excerpt. */
26
+ excerpt?: React.ReactNode;
27
+ /** Destination URL. */
28
+ href?: string;
29
+ /** Optional source or favicon icon. */
30
+ icon?: React.ReactNode;
31
+ /** Fully custom preview content. */
32
+ preview?: React.ReactNode;
33
+ /** Popover placement relative to the citation chip. */
34
+ placement?: PopoverPlacement;
35
+ /** Controlled popover state. */
36
+ open?: boolean;
37
+ /** Initial popover state for uncontrolled usage. */
38
+ defaultOpen?: boolean;
39
+ onOpenChange?: (open: boolean) => void;
40
+ /** Open the source link in a new tab. @default true */
41
+ openInNewTab?: boolean;
42
+ /**
43
+ * Label for the link at the foot of the preview. Overridable so the string is
44
+ * not trapped in English.
45
+ * @default "Open source"
46
+ */
47
+ linkLabel?: React.ReactNode;
48
+ className?: string;
49
+ theme?: SourceCitationThemeOverrides;
50
+ }
51
+ export interface SourceCitationGroupProps extends React.HTMLAttributes<HTMLDivElement> {
52
+ children: React.ReactNode;
53
+ className?: string;
54
+ theme?: Pick<SourceCitationThemeOverrides, "groupStyle">;
55
+ }
@@ -0,0 +1,3 @@
1
+ export { SourceCitation, SourceCitationGroup } from "./SourceCitation";
2
+ export { sourceCitationTheme } from "./SourceCitation.theme";
3
+ export type { SourceCitationProps, SourceCitationGroupProps, SourceCitationTheme, SourceCitationThemeOverrides, } from "./SourceCitation.types";
@@ -4,6 +4,7 @@
4
4
  * Only animates the most recent tokens for performance
5
5
  */
6
6
  import React from 'react';
7
+ import type { StreamingTokenEffect } from './StreamingResponse.types';
7
8
  export interface AnimatedTextProps {
8
9
  /** The full accumulated text */
9
10
  text: string;
@@ -15,6 +16,12 @@ export interface AnimatedTextProps {
15
16
  enabled?: boolean;
16
17
  /** Additional CSS classes */
17
18
  className?: string;
19
+ /** Optional inline indicator rendered immediately after the text */
20
+ cursor?: React.ReactNode;
21
+ /** Visual treatment for newly arrived words */
22
+ tokenEffect?: StreamingTokenEffect;
23
+ /** New-word transition duration in seconds */
24
+ tokenDuration?: number;
18
25
  }
19
26
  /**
20
27
  * AnimatedText renders streaming text with smooth per-token fade-in.