@flikk/ui 1.0.0-beta.31 → 1.0.0-beta.33

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 (460) hide show
  1. package/CHANGELOG.md +497 -22
  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/CodeBlock/CodeBlock.theme.js +1 -1
  11. package/dist/components/ai/PromptInput/PromptInput.js +2 -2
  12. package/dist/components/ai/PromptInput/PromptInput.theme.js +2 -2
  13. package/dist/components/ai/PromptSuggestion/PromptSuggestion.theme.js +2 -2
  14. package/dist/components/ai/Reasoning/Reasoning.js +27 -3
  15. package/dist/components/ai/Reasoning/Reasoning.theme.d.ts +6 -0
  16. package/dist/components/ai/Reasoning/Reasoning.theme.js +36 -0
  17. package/dist/components/ai/Reasoning/Reasoning.types.d.ts +58 -5
  18. package/dist/components/ai/Reasoning/ReasoningTrace.d.ts +11 -0
  19. package/dist/components/ai/Reasoning/ReasoningTrace.js +84 -0
  20. package/dist/components/ai/Reasoning/index.d.ts +2 -1
  21. package/dist/components/ai/StreamingResponse/AnimatedText.d.ts +7 -0
  22. package/dist/components/ai/StreamingResponse/AnimatedText.js +8 -7
  23. package/dist/components/ai/StreamingResponse/MarkdownRenderer.d.ts +5 -0
  24. package/dist/components/ai/StreamingResponse/MarkdownRenderer.js +4 -4
  25. package/dist/components/ai/StreamingResponse/StreamingCursor.d.ts +2 -2
  26. package/dist/components/ai/StreamingResponse/StreamingCursor.js +10 -7
  27. package/dist/components/ai/StreamingResponse/StreamingResponse.animations.d.ts +10 -0
  28. package/dist/components/ai/StreamingResponse/StreamingResponse.animations.js +59 -33
  29. package/dist/components/ai/StreamingResponse/StreamingResponse.js +13 -7
  30. package/dist/components/ai/StreamingResponse/StreamingResponse.types.d.ts +33 -2
  31. package/dist/components/ai/StreamingResponse/StreamingSurface.d.ts +13 -0
  32. package/dist/components/ai/StreamingResponse/StreamingSurface.js +38 -0
  33. package/dist/components/ai/StreamingResponse/WordAnimationContext.d.ts +5 -0
  34. package/dist/components/ai/StreamingResponse/WordAnimationContext.js +5 -4
  35. package/dist/components/ai/StreamingResponse/index.d.ts +4 -2
  36. package/dist/components/ai/TokenCounter/TokenCounter.theme.js +1 -1
  37. package/dist/components/ai/index.d.ts +3 -2
  38. package/dist/components/ai/index.js +4 -0
  39. package/dist/components/canvas/BaseNode.js +1 -1
  40. package/dist/components/canvas/CanvasToolbar.js +0 -1
  41. package/dist/components/canvas/Edge.js +2 -2
  42. package/dist/components/canvas/NodeControls.js +0 -1
  43. package/dist/components/canvas/NodeRenderer.js +2 -2
  44. package/dist/components/charts/ActivityRings/ActivityRings.js +2 -2
  45. package/dist/components/charts/ActivityRings/ActivityRings.theme.js +1 -1
  46. package/dist/components/charts/AreaChart/AreaChart.js +3 -3
  47. package/dist/components/charts/AreaChart/AreaChart.theme.js +3 -3
  48. package/dist/components/charts/BarChart/BarChart.js +4 -4
  49. package/dist/components/charts/ComboChart/BarRenderer.js +2 -2
  50. package/dist/components/charts/ComboChart/BarRenderer.types.d.ts +1 -1
  51. package/dist/components/charts/ComboChart/ComboChartCanvas.js +1 -1
  52. package/dist/components/charts/ComboChart/LineRenderer.js +1 -1
  53. package/dist/components/charts/ComboChart/LineRenderer.types.d.ts +1 -1
  54. package/dist/components/charts/DonutChart/DonutChart.theme.js +4 -4
  55. package/dist/components/charts/DonutChart/MultiSegmentDonutChart.theme.js +1 -1
  56. package/dist/components/charts/Heatmap/Heatmap.js +49 -42
  57. package/dist/components/charts/Heatmap/Heatmap.theme.d.ts +6 -2
  58. package/dist/components/charts/Heatmap/Heatmap.theme.js +20 -8
  59. package/dist/components/charts/Heatmap/Heatmap.types.d.ts +49 -82
  60. package/dist/components/charts/Heatmap/HeatmapCell.js +30 -81
  61. package/dist/components/charts/Heatmap/HeatmapLegend.d.ts +7 -6
  62. package/dist/components/charts/Heatmap/HeatmapLegend.js +6 -6
  63. package/dist/components/charts/Heatmap/index.d.ts +1 -1
  64. package/dist/components/charts/Heatmap/utils/heatmapUtils.d.ts +7 -12
  65. package/dist/components/charts/Heatmap/utils/heatmapUtils.js +16 -61
  66. package/dist/components/charts/Heatmap/utils/heatmapUtils.test.d.ts +1 -0
  67. package/dist/components/charts/HorizontalBarChart/HorizontalBarChart.js +1 -1
  68. package/dist/components/charts/LineChart/LineChart.js +2 -2
  69. package/dist/components/charts/LollipopChart/LollipopChart.js +1 -1
  70. package/dist/components/charts/RadarChart/RadarChart.js +1 -1
  71. package/dist/components/charts/StackedBarChart/StackedBarChart.js +3 -3
  72. package/dist/components/charts/hooks/useChartAccessibility.js +9 -6
  73. package/dist/components/charts/index.d.ts +4 -8
  74. package/dist/components/charts/index.js +2 -4
  75. package/dist/components/charts/shared/ChartText/ChartText.theme.js +1 -1
  76. package/dist/components/charts/shared/index.d.ts +1 -1
  77. package/dist/components/charts/theme/chart.theme.js +3 -3
  78. package/dist/components/charts/utils/animation-utils.d.ts +12 -7
  79. package/dist/components/charts/utils/animation-utils.js +19 -19
  80. package/dist/components/core/Accordion/Accordion.theme.js +1 -1
  81. package/dist/components/core/Alert/Alert.animations.d.ts +11 -4
  82. package/dist/components/core/Alert/Alert.animations.js +11 -4
  83. package/dist/components/core/Alert/Alert.js +16 -2
  84. package/dist/components/core/Alert/Alert.theme.js +1 -1
  85. package/dist/components/core/Alert/Alert.types.d.ts +4 -2
  86. package/dist/components/core/AlertDialog/AlertDialog.js +2 -2
  87. package/dist/components/core/Avatar/Avatar.theme.js +1 -1
  88. package/dist/components/core/Badge/Badge.animations.d.ts +0 -5
  89. package/dist/components/core/Badge/Badge.animations.js +5 -84
  90. package/dist/components/core/Badge/Badge.d.ts +7 -4
  91. package/dist/components/core/Badge/Badge.js +27 -64
  92. package/dist/components/core/Badge/Badge.theme.js +8 -12
  93. package/dist/components/core/Badge/Badge.types.d.ts +18 -34
  94. package/dist/components/core/Breadcrumbs/Breadcrumbs.theme.js +4 -4
  95. package/dist/components/core/Button/Button.js +7 -43
  96. package/dist/components/core/Button/Button.theme.js +5 -5
  97. package/dist/components/core/Button/Button.types.d.ts +8 -12
  98. package/dist/components/core/Button/index.d.ts +0 -2
  99. package/dist/components/core/Calendar/Calendar.theme.js +1 -1
  100. package/dist/components/core/Calendar/CalendarMini/CalendarMini.theme.js +2 -2
  101. package/dist/components/core/Card/Card.js +7 -2
  102. package/dist/components/core/Card/Card.theme.js +29 -1
  103. package/dist/components/core/Card/Card.types.d.ts +20 -0
  104. package/dist/components/core/Card/CardBody.js +9 -1
  105. package/dist/components/core/Card/CardContext.d.ts +13 -0
  106. package/dist/components/core/Card/CardContext.js +14 -0
  107. package/dist/components/core/Card/CardHeader.js +4 -1
  108. package/dist/components/core/ContextMenu/ContextMenu.theme.js +4 -3
  109. package/dist/components/core/ContextMenu/ContextMenu.types.d.ts +8 -1
  110. package/dist/components/core/ContextMenu/ContextMenuSub.d.ts +11 -1
  111. package/dist/components/core/ContextMenu/ContextMenuSub.js +35 -22
  112. package/dist/components/core/ContextMenu/ContextMenuSubBody.js +14 -3
  113. package/dist/components/core/ContextMenu/ContextMenuSubTrigger.js +21 -8
  114. package/dist/components/core/DragDrop/DragDrop.theme.js +2 -2
  115. package/dist/components/core/Drawer/Drawer.theme.js +1 -1
  116. package/dist/components/core/Drawer/DrawerHeader.js +0 -1
  117. package/dist/components/core/Dropdown/DropdownMenu.js +22 -7
  118. package/dist/components/core/Link/Link.js +1 -1
  119. package/dist/components/core/Masonry/Masonry.theme.js +1 -1
  120. package/dist/components/core/MenuItem/MenuItem.js +2 -1
  121. package/dist/components/core/MenuItem/MenuItem.theme.js +13 -1
  122. package/dist/components/core/Message/Message.js +2 -0
  123. package/dist/components/core/Message/Message.theme.js +3 -3
  124. package/dist/components/core/Modal/Modal.animations.d.ts +1 -1
  125. package/dist/components/core/Modal/Modal.animations.js +50 -11
  126. package/dist/components/core/Modal/Modal.js +5 -1
  127. package/dist/components/core/Modal/Modal.theme.js +1 -1
  128. package/dist/components/core/Modal/ModalHeader.js +0 -1
  129. package/dist/components/core/ModalStack/ModalStackModal.js +3 -1
  130. package/dist/components/core/NavItem/NavItem.js +3 -2
  131. package/dist/components/core/NavItem/NavItem.theme.js +1 -1
  132. package/dist/components/core/OfflineIndicator/OfflineIndicator.theme.js +4 -2
  133. package/dist/components/core/PageHeading/PageHeading.theme.js +1 -1
  134. package/dist/components/core/Pagination/Pagination.theme.js +2 -2
  135. package/dist/components/core/Pill/Pill.js +34 -18
  136. package/dist/components/core/Pill/Pill.theme.js +4 -2
  137. package/dist/components/core/Pill/Pill.types.d.ts +14 -1
  138. package/dist/components/core/Popover/PopoverBody.js +16 -5
  139. package/dist/components/core/Progress/Progress.d.ts +0 -25
  140. package/dist/components/core/Progress/Progress.js +79 -11
  141. package/dist/components/core/Progress/Progress.theme.js +17 -0
  142. package/dist/components/core/Progress/Progress.types.d.ts +47 -1
  143. package/dist/components/core/Rating/Rating.theme.js +1 -1
  144. package/dist/components/core/Rating/Rating.types.d.ts +3 -2
  145. package/dist/components/core/ScrollArea/ScrollArea.js +1 -1
  146. package/dist/components/core/ScrollArea/ScrollArea.theme.js +1 -1
  147. package/dist/components/core/Segmented/Segmented.theme.js +3 -3
  148. package/dist/components/core/Segmented/SegmentedContext.js +1 -0
  149. package/dist/components/core/Sidebar/Sidebar.js +5 -2
  150. package/dist/components/core/Sidebar/Sidebar.theme.js +2 -2
  151. package/dist/components/core/Sidebar/SidebarContent.js +1 -1
  152. package/dist/components/core/Sidebar/SidebarHeader.js +1 -1
  153. package/dist/components/core/Sidebar/SidebarSearch.js +2 -2
  154. package/dist/components/core/Sidebar/SidebarToggle.js +1 -1
  155. package/dist/components/core/Sidebar/SidebarUserProfile.js +1 -1
  156. package/dist/components/core/SlidingNumber/SlidingNumber.d.ts +8 -0
  157. package/dist/components/core/SlidingNumber/SlidingNumber.js +12 -3
  158. package/dist/components/core/Sortable/Sortable.theme.js +1 -1
  159. package/dist/components/core/Tabs/Tabs.theme.js +1 -1
  160. package/dist/components/core/Tag/Tag.theme.js +1 -1
  161. package/dist/components/core/Toast/ToastProvider.js +1 -1
  162. package/dist/components/core/Tree/Tree.theme.js +1 -1
  163. package/dist/components/core/index.d.ts +0 -2
  164. package/dist/components/core/index.js +0 -4
  165. package/dist/components/core/shared/ChartTooltip/ChartTooltip.animations.d.ts +4 -0
  166. package/dist/components/core/shared/ChartTooltip/ChartTooltip.animations.js +20 -0
  167. package/dist/components/{charts → core}/shared/ChartTooltip/ChartTooltip.js +1 -1
  168. package/dist/components/core/shared/Ripple.d.ts +16 -0
  169. package/dist/components/core/shared/Ripple.js +141 -0
  170. package/dist/components/data-display/GanttChart/GanttChart.theme.js +6 -6
  171. package/dist/components/data-display/GanttChart/GanttTaskBar.js +1 -1
  172. package/dist/components/data-display/GanttChart/GanttTimelineHeader.js +1 -1
  173. package/dist/components/data-display/GanttChart/GanttToolbar.js +0 -1
  174. package/dist/components/data-display/KPI/KPI.js +11 -20
  175. package/dist/components/data-display/KPI/KPI.theme.js +8 -4
  176. package/dist/components/data-display/Metric/Metric.theme.js +4 -4
  177. package/dist/components/data-display/Table/Table.theme.js +2 -2
  178. package/dist/components/data-display/Table/TableColumnManager.js +1 -2
  179. package/dist/components/data-display/Table/TableContext.js +1 -0
  180. package/dist/components/data-display/Table/TableFilter.js +9 -2
  181. package/dist/components/data-display/Table/TableSelectionHeader.js +1 -1
  182. package/dist/components/data-display/Timeline/Timeline.theme.js +1 -1
  183. package/dist/components/effects/CustomCursor/CustomCursor.d.ts +1 -1
  184. package/dist/components/effects/CustomCursor/CustomCursor.js +1 -1
  185. package/dist/components/effects/CustomCursor/CustomCursor.theme.js +4 -4
  186. package/dist/components/effects/Neumorphic/InsetCircleButton.js +1 -1
  187. package/dist/components/effects/Overlay/Overlay.js +7 -3
  188. package/dist/components/effects/index.d.ts +0 -32
  189. package/dist/components/effects/index.js +0 -16
  190. package/dist/components/effects/shared/ShaderCanvas/ShaderCanvas.d.ts +0 -2
  191. package/dist/components/effects/shared/ShaderCanvas/ShaderCanvas.js +1 -93
  192. package/dist/components/effects/shared/ShaderCanvas/ShaderCanvas.types.d.ts +0 -10
  193. package/dist/components/effects/shared/ShaderCanvas/index.d.ts +1 -1
  194. package/dist/components/effects/shared/index.d.ts +1 -3
  195. package/dist/components/effects/shared/shaderNoise.glsl.d.ts +1 -1
  196. package/dist/components/effects/shared/shaderNoise.glsl.js +2 -11
  197. package/dist/components/forms/Checkbox/Checkbox.theme.js +1 -1
  198. package/dist/components/forms/ColorPicker/ColorPicker.js +45 -3
  199. package/dist/components/forms/ColorPicker/ColorPickerBody.js +8 -4
  200. package/dist/components/forms/ColorPicker/ColorPickerHeader.js +1 -1
  201. package/dist/components/forms/ColorPicker/ColorPickerImage.js +1 -1
  202. package/dist/components/forms/Combobox/Combobox.js +10 -4
  203. package/dist/components/forms/Combobox/Combobox.theme.js +9 -0
  204. package/dist/components/forms/Combobox/Combobox.types.d.ts +13 -0
  205. package/dist/components/forms/DatePicker/DatePicker.js +19 -12
  206. package/dist/components/forms/DatePicker/DatePicker.theme.js +5 -0
  207. package/dist/components/forms/DatePicker/DatePicker.types.d.ts +8 -0
  208. package/dist/components/forms/DatePicker/DatePickerContext.d.ts +0 -1
  209. package/dist/components/forms/DatePicker/DatePickerTrigger.js +5 -3
  210. package/dist/components/forms/DateRangePicker/DateRangePicker.theme.js +6 -1
  211. package/dist/components/forms/DateRangePicker/DateRangePicker.types.d.ts +8 -0
  212. package/dist/components/forms/DateRangePicker/DateRangePickerContext.js +1 -0
  213. package/dist/components/forms/DateRangePicker/DateRangePickerTrigger.js +5 -3
  214. package/dist/components/forms/FileUpload/FileUpload.theme.js +2 -2
  215. package/dist/components/forms/FileUpload/FileUploadProgress.theme.js +1 -1
  216. package/dist/components/forms/Input/Input.js +17 -12
  217. package/dist/components/forms/Input/Input.theme.js +10 -0
  218. package/dist/components/forms/Input/Input.types.d.ts +14 -0
  219. package/dist/components/forms/InputAddress/InputAddress.js +5 -5
  220. package/dist/components/forms/InputAddress/InputAddress.types.d.ts +9 -2
  221. package/dist/components/forms/InputCounter/InputCounter.js +194 -17
  222. package/dist/components/forms/InputCounter/InputCounter.theme.d.ts +12 -0
  223. package/dist/components/forms/InputCounter/InputCounter.theme.js +92 -2
  224. package/dist/components/forms/InputCounter/InputCounter.types.d.ts +47 -4
  225. package/dist/components/forms/InputCreditCard/InputCreditCard.js +4 -4
  226. package/dist/components/forms/InputCreditCard/InputCreditCard.types.d.ts +7 -0
  227. package/dist/components/forms/Mention/Mention.js +13 -11
  228. package/dist/components/forms/Radio/Radio.theme.js +1 -1
  229. package/dist/components/forms/RichTextEditor/RichTextEditor.d.ts +12 -16
  230. package/dist/components/forms/RichTextEditor/RichTextEditor.js +174 -1680
  231. package/dist/components/forms/RichTextEditor/RichTextEditor.theme.d.ts +12 -56
  232. package/dist/components/forms/RichTextEditor/RichTextEditor.theme.js +60 -118
  233. package/dist/components/forms/RichTextEditor/RichTextEditor.types.d.ts +62 -126
  234. package/dist/components/forms/RichTextEditor/RichTextLinkField.d.ts +18 -0
  235. package/dist/components/forms/RichTextEditor/RichTextLinkField.js +46 -0
  236. package/dist/components/forms/RichTextEditor/RichTextToolbar.d.ts +15 -0
  237. package/dist/components/forms/RichTextEditor/RichTextToolbar.js +93 -0
  238. package/dist/components/forms/RichTextEditor/editorCommands.d.ts +50 -0
  239. package/dist/components/forms/RichTextEditor/editorCommands.js +58 -0
  240. package/dist/components/forms/RichTextEditor/editorState.d.ts +19 -0
  241. package/dist/components/forms/RichTextEditor/editorState.js +103 -0
  242. package/dist/components/forms/RichTextEditor/index.d.ts +5 -3
  243. package/dist/components/forms/RichTextEditor/sanitizeHtml.d.ts +38 -0
  244. package/dist/components/forms/RichTextEditor/sanitizeHtml.js +179 -0
  245. package/dist/components/forms/RichTextEditor/sanitizeHtml.test.d.ts +1 -0
  246. package/dist/components/forms/Select/Select.js +19 -12
  247. package/dist/components/forms/Select/Select.theme.js +9 -1
  248. package/dist/components/forms/Select/Select.types.d.ts +86 -8
  249. package/dist/components/forms/Select/useSelectState.d.ts +9 -3
  250. package/dist/components/forms/Select/useSelectState.js +4 -1
  251. package/dist/components/forms/SelectableCard/SelectableCard.js +2 -1
  252. package/dist/components/forms/SelectableCard/SelectableCard.theme.js +1 -1
  253. package/dist/components/forms/Switch/Switch.theme.js +2 -2
  254. package/dist/components/forms/Textarea/Textarea.js +14 -25
  255. package/dist/components/forms/TimePicker/TimePicker.theme.js +10 -1
  256. package/dist/components/forms/TimePicker/TimePicker.types.d.ts +11 -0
  257. package/dist/components/forms/TimePicker/TimePickerTrigger.js +7 -5
  258. package/dist/components/forms/forms.theme.d.ts +57 -0
  259. package/dist/components/forms/forms.theme.js +102 -13
  260. package/dist/components/forms/index.js +1 -0
  261. package/dist/components/generative/FormShell.d.ts +22 -0
  262. package/dist/components/generative/FormShell.js +102 -0
  263. package/dist/components/generative/GenerativeView.d.ts +52 -1
  264. package/dist/components/generative/GenerativeView.js +203 -11
  265. package/dist/components/generative/actions.d.ts +5 -0
  266. package/dist/components/generative/ai-sdk/index.d.ts +1 -0
  267. package/dist/components/generative/ai-sdk/index.js +1 -0
  268. package/dist/components/generative/ai-sdk/useGenerativeChat.d.ts +52 -0
  269. package/dist/components/generative/ai-sdk/useGenerativeChat.js +73 -0
  270. package/dist/components/generative/ai-sdk/useGenerativeChat.test.d.ts +1 -0
  271. package/dist/components/generative/fieldBinding.d.ts +31 -0
  272. package/dist/components/generative/fieldBinding.js +33 -0
  273. package/dist/components/generative/fieldBinding.test.d.ts +1 -0
  274. package/dist/components/generative/formScope.d.ts +71 -0
  275. package/dist/components/generative/formScope.js +135 -0
  276. package/dist/components/generative/index.d.ts +4 -0
  277. package/dist/components/generative/index.js +4 -0
  278. package/dist/components/generative/registry.d.ts +2 -0
  279. package/dist/components/generative/registry.js +11 -10
  280. package/dist/components/generative/schema.generated.js +199 -293
  281. package/dist/components/generative/toToolResult.d.ts +21 -0
  282. package/dist/components/generative/toToolResult.js +15 -0
  283. package/dist/components/generative/toToolResult.test.d.ts +1 -0
  284. package/dist/components/generative/validate.d.ts +10 -1
  285. package/dist/components/generative/validate.js +126 -11
  286. package/dist/components/layout/Grid/Grid.js +1 -0
  287. package/dist/components/layout/Section/Section.theme.js +1 -1
  288. package/dist/components/layout/Stack/Stack.js +1 -0
  289. package/dist/generative.schema.json +199 -293
  290. package/dist/index.js +1 -4
  291. package/dist/registry.json +2765 -2450
  292. package/dist/shadcn-compat.css +5 -5
  293. package/dist/styles/theme.test.d.ts +1 -0
  294. package/dist/styles.css +1 -1
  295. package/dist/test/render.d.ts +17 -0
  296. package/dist/themes/precision.css +232 -0
  297. package/dist/tools.json +200 -295
  298. package/dist/utils/composeEventHandlers.d.ts +19 -0
  299. package/dist/utils/composeEventHandlers.js +26 -0
  300. package/dist/utils/composeEventHandlers.test.d.ts +1 -0
  301. package/dist/utils/index.d.ts +1 -1
  302. package/package.json +31 -1
  303. package/src/global.scss +21 -28
  304. package/src/styles/theme.css +157 -50
  305. package/src/styles/theme.test.ts +119 -0
  306. package/tailwind.preset.cjs +30 -20
  307. package/dist/components/charts/FunnelChart/FunnelChart.animations.d.ts +0 -35
  308. package/dist/components/charts/FunnelChart/FunnelChart.animations.js +0 -59
  309. package/dist/components/charts/FunnelChart/FunnelChart.d.ts +0 -8
  310. package/dist/components/charts/FunnelChart/FunnelChart.js +0 -410
  311. package/dist/components/charts/FunnelChart/FunnelChart.theme.d.ts +0 -2
  312. package/dist/components/charts/FunnelChart/FunnelChart.theme.js +0 -12
  313. package/dist/components/charts/FunnelChart/FunnelChart.types.d.ts +0 -105
  314. package/dist/components/charts/FunnelChart/index.d.ts +0 -4
  315. package/dist/components/charts/ScatterPlot/ScatterPlot.d.ts +0 -9
  316. package/dist/components/charts/ScatterPlot/ScatterPlot.js +0 -208
  317. package/dist/components/charts/ScatterPlot/ScatterPlot.theme.d.ts +0 -18
  318. package/dist/components/charts/ScatterPlot/ScatterPlot.theme.js +0 -42
  319. package/dist/components/charts/ScatterPlot/ScatterPlot.types.d.ts +0 -60
  320. package/dist/components/charts/ScatterPlot/ScatterPlot.types.js +0 -19
  321. package/dist/components/charts/ScatterPlot/index.d.ts +0 -3
  322. package/dist/components/core/Button/Button.ripple.d.ts +0 -71
  323. package/dist/components/core/Button/Button.ripple.js +0 -236
  324. package/dist/components/core/Calendar/CalendarEvent/CalendarEvent.d.ts +0 -4
  325. package/dist/components/core/Calendar/CalendarEvent/CalendarEvent.theme.d.ts +0 -12
  326. package/dist/components/core/Calendar/CalendarEvent/CalendarEvent.types.d.ts +0 -23
  327. package/dist/components/core/Calendar/CalendarEvent/index.d.ts +0 -2
  328. package/dist/components/core/CardStack/CardStack.animations.d.ts +0 -47
  329. package/dist/components/core/CardStack/CardStack.d.ts +0 -3
  330. package/dist/components/core/CardStack/CardStack.js +0 -187
  331. package/dist/components/core/CardStack/CardStack.theme.d.ts +0 -6
  332. package/dist/components/core/CardStack/CardStack.theme.js +0 -33
  333. package/dist/components/core/CardStack/CardStack.types.d.ts +0 -139
  334. package/dist/components/core/CardStack/index.d.ts +0 -7
  335. package/dist/components/core/Carousel/Carousel.d.ts +0 -3
  336. package/dist/components/core/Carousel/Carousel.js +0 -83
  337. package/dist/components/core/Carousel/Carousel.theme.d.ts +0 -10
  338. package/dist/components/core/Carousel/Carousel.theme.js +0 -20
  339. package/dist/components/core/Carousel/Carousel.types.d.ts +0 -113
  340. package/dist/components/core/Carousel/CarouselBody.d.ts +0 -4
  341. package/dist/components/core/Carousel/CarouselBody.js +0 -59
  342. package/dist/components/core/Carousel/CarouselContext.d.ts +0 -3
  343. package/dist/components/core/Carousel/CarouselContext.js +0 -13
  344. package/dist/components/core/Carousel/CarouselItem.d.ts +0 -4
  345. package/dist/components/core/Carousel/CarouselItem.js +0 -11
  346. package/dist/components/core/Carousel/CarouselNext.d.ts +0 -4
  347. package/dist/components/core/Carousel/CarouselNext.js +0 -16
  348. package/dist/components/core/Carousel/CarouselPrevious.d.ts +0 -4
  349. package/dist/components/core/Carousel/CarouselPrevious.js +0 -16
  350. package/dist/components/core/Carousel/index.d.ts +0 -3
  351. package/dist/components/effects/ColorPanels/ColorPanels.d.ts +0 -8
  352. package/dist/components/effects/ColorPanels/ColorPanels.js +0 -66
  353. package/dist/components/effects/ColorPanels/ColorPanels.shaders.d.ts +0 -12
  354. package/dist/components/effects/ColorPanels/ColorPanels.shaders.js +0 -218
  355. package/dist/components/effects/ColorPanels/ColorPanels.types.d.ts +0 -29
  356. package/dist/components/effects/ColorPanels/ColorPanels.types.js +0 -3
  357. package/dist/components/effects/ColorPanels/index.d.ts +0 -2
  358. package/dist/components/effects/FlutedGlass/FlutedGlass.d.ts +0 -9
  359. package/dist/components/effects/FlutedGlass/FlutedGlass.js +0 -80
  360. package/dist/components/effects/FlutedGlass/FlutedGlass.shaders.d.ts +0 -12
  361. package/dist/components/effects/FlutedGlass/FlutedGlass.shaders.js +0 -335
  362. package/dist/components/effects/FlutedGlass/FlutedGlass.types.d.ts +0 -61
  363. package/dist/components/effects/FlutedGlass/FlutedGlass.types.js +0 -16
  364. package/dist/components/effects/FlutedGlass/index.d.ts +0 -3
  365. package/dist/components/effects/GlassEffect/GlassEffect.d.ts +0 -15
  366. package/dist/components/effects/GlassEffect/GlassEffect.js +0 -38
  367. package/dist/components/effects/GlassEffect/GlassEffect.types.d.ts +0 -19
  368. package/dist/components/effects/GlassEffect/index.d.ts +0 -2
  369. package/dist/components/effects/GlassSurface/GlassSurface.d.ts +0 -8
  370. package/dist/components/effects/GlassSurface/GlassSurface.js +0 -250
  371. package/dist/components/effects/GlassSurface/GlassSurface.types.d.ts +0 -66
  372. package/dist/components/effects/GlassSurface/index.d.ts +0 -2
  373. package/dist/components/effects/GodRays/GodRays.d.ts +0 -8
  374. package/dist/components/effects/GodRays/GodRays.js +0 -68
  375. package/dist/components/effects/GodRays/GodRays.shaders.d.ts +0 -10
  376. package/dist/components/effects/GodRays/GodRays.shaders.js +0 -128
  377. package/dist/components/effects/GodRays/GodRays.types.d.ts +0 -25
  378. package/dist/components/effects/GodRays/GodRays.types.js +0 -3
  379. package/dist/components/effects/GodRays/index.d.ts +0 -2
  380. package/dist/components/effects/GridPattern/GridPattern.d.ts +0 -18
  381. package/dist/components/effects/GridPattern/GridPattern.js +0 -65
  382. package/dist/components/effects/GridPattern/GridPattern.types.d.ts +0 -47
  383. package/dist/components/effects/GridPattern/index.d.ts +0 -2
  384. package/dist/components/effects/HalftoneCmyk/HalftoneCmyk.d.ts +0 -10
  385. package/dist/components/effects/HalftoneCmyk/HalftoneCmyk.js +0 -78
  386. package/dist/components/effects/HalftoneCmyk/HalftoneCmyk.shaders.d.ts +0 -22
  387. package/dist/components/effects/HalftoneCmyk/HalftoneCmyk.shaders.js +0 -239
  388. package/dist/components/effects/HalftoneCmyk/HalftoneCmyk.types.d.ts +0 -52
  389. package/dist/components/effects/HalftoneCmyk/index.d.ts +0 -2
  390. package/dist/components/effects/HalftoneDots/HalftoneDots.d.ts +0 -9
  391. package/dist/components/effects/HalftoneDots/HalftoneDots.js +0 -68
  392. package/dist/components/effects/HalftoneDots/HalftoneDots.shaders.d.ts +0 -13
  393. package/dist/components/effects/HalftoneDots/HalftoneDots.shaders.js +0 -296
  394. package/dist/components/effects/HalftoneDots/HalftoneDots.types.d.ts +0 -43
  395. package/dist/components/effects/HalftoneDots/HalftoneDots.types.js +0 -12
  396. package/dist/components/effects/HalftoneDots/index.d.ts +0 -3
  397. package/dist/components/effects/ImageDithering/ImageDithering.d.ts +0 -9
  398. package/dist/components/effects/ImageDithering/ImageDithering.js +0 -68
  399. package/dist/components/effects/ImageDithering/ImageDithering.shaders.d.ts +0 -12
  400. package/dist/components/effects/ImageDithering/ImageDithering.shaders.js +0 -117
  401. package/dist/components/effects/ImageDithering/ImageDithering.types.d.ts +0 -30
  402. package/dist/components/effects/ImageDithering/ImageDithering.types.js +0 -8
  403. package/dist/components/effects/ImageDithering/index.d.ts +0 -3
  404. package/dist/components/effects/MagneticElement/MagneticElement.d.ts +0 -30
  405. package/dist/components/effects/MagneticElement/MagneticElement.js +0 -111
  406. package/dist/components/effects/MagneticElement/MagneticElement.types.d.ts +0 -44
  407. package/dist/components/effects/MagneticElement/index.d.ts +0 -2
  408. package/dist/components/effects/Metaballs/Metaballs.d.ts +0 -8
  409. package/dist/components/effects/Metaballs/Metaballs.js +0 -59
  410. package/dist/components/effects/Metaballs/Metaballs.shaders.d.ts +0 -10
  411. package/dist/components/effects/Metaballs/Metaballs.shaders.js +0 -102
  412. package/dist/components/effects/Metaballs/Metaballs.types.d.ts +0 -16
  413. package/dist/components/effects/Metaballs/Metaballs.types.js +0 -3
  414. package/dist/components/effects/Metaballs/index.d.ts +0 -2
  415. package/dist/components/effects/PaperTexture/PaperTexture.d.ts +0 -9
  416. package/dist/components/effects/PaperTexture/PaperTexture.js +0 -61
  417. package/dist/components/effects/PaperTexture/PaperTexture.shaders.d.ts +0 -22
  418. package/dist/components/effects/PaperTexture/PaperTexture.shaders.js +0 -145
  419. package/dist/components/effects/PaperTexture/PaperTexture.types.d.ts +0 -19
  420. package/dist/components/effects/PaperTexture/index.d.ts +0 -2
  421. package/dist/components/effects/PulsingBorder/PulsingBorder.d.ts +0 -27
  422. package/dist/components/effects/PulsingBorder/PulsingBorder.js +0 -174
  423. package/dist/components/effects/PulsingBorder/PulsingBorder.shaders.d.ts +0 -14
  424. package/dist/components/effects/PulsingBorder/PulsingBorder.shaders.js +0 -258
  425. package/dist/components/effects/PulsingBorder/PulsingBorder.types.d.ts +0 -75
  426. package/dist/components/effects/PulsingBorder/PulsingBorder.types.js +0 -3
  427. package/dist/components/effects/PulsingBorder/index.d.ts +0 -2
  428. package/dist/components/effects/SmokeRing/SmokeRing.d.ts +0 -8
  429. package/dist/components/effects/SmokeRing/SmokeRing.js +0 -62
  430. package/dist/components/effects/SmokeRing/SmokeRing.shaders.d.ts +0 -14
  431. package/dist/components/effects/SmokeRing/SmokeRing.shaders.js +0 -130
  432. package/dist/components/effects/SmokeRing/SmokeRing.types.d.ts +0 -22
  433. package/dist/components/effects/SmokeRing/SmokeRing.types.js +0 -3
  434. package/dist/components/effects/SmokeRing/index.d.ts +0 -2
  435. package/dist/components/effects/StaticGradientMesh/StaticGradientMesh.d.ts +0 -9
  436. package/dist/components/effects/StaticGradientMesh/StaticGradientMesh.js +0 -59
  437. package/dist/components/effects/StaticGradientMesh/StaticGradientMesh.shaders.d.ts +0 -14
  438. package/dist/components/effects/StaticGradientMesh/StaticGradientMesh.shaders.js +0 -129
  439. package/dist/components/effects/StaticGradientMesh/StaticGradientMesh.types.d.ts +0 -23
  440. package/dist/components/effects/StaticGradientMesh/StaticGradientMesh.types.js +0 -3
  441. package/dist/components/effects/StaticGradientMesh/index.d.ts +0 -2
  442. package/dist/components/effects/Water/Water.d.ts +0 -9
  443. package/dist/components/effects/Water/Water.js +0 -65
  444. package/dist/components/effects/Water/Water.shaders.d.ts +0 -11
  445. package/dist/components/effects/Water/Water.shaders.js +0 -123
  446. package/dist/components/effects/Water/Water.types.d.ts +0 -25
  447. package/dist/components/effects/Water/index.d.ts +0 -2
  448. package/dist/components/effects/shared/bayerMatrices.glsl.d.ts +0 -10
  449. package/dist/components/effects/shared/bayerMatrices.glsl.js +0 -44
  450. package/dist/components/effects/shared/imageUV.glsl.d.ts +0 -12
  451. package/dist/components/effects/shared/imageUV.glsl.js +0 -26
  452. package/dist/components/forms/RichTextEditor/RichTextEditor.animations.d.ts +0 -7
  453. package/dist/components/forms/RichTextEditor/RichTextEditor.animations.js +0 -32
  454. package/dist/utils/calendarUtils.d.ts +0 -60
  455. /package/dist/components/{charts → core}/shared/ChartTooltip/ChartTooltip.d.ts +0 -0
  456. /package/dist/components/{charts → core}/shared/ChartTooltip/ChartTooltip.theme.d.ts +0 -0
  457. /package/dist/components/{charts → core}/shared/ChartTooltip/ChartTooltip.theme.js +0 -0
  458. /package/dist/components/{charts → core}/shared/ChartTooltip/ChartTooltip.types.d.ts +0 -0
  459. /package/dist/components/{charts → core}/shared/ChartTooltip/ChartTooltipContent.d.ts +0 -0
  460. /package/dist/components/{charts → core}/shared/ChartTooltip/index.d.ts +0 -0
@@ -0,0 +1,106 @@
1
+ const agentRequestTheme = {
2
+ baseStyle: "w-full min-w-0",
3
+ // GEOMETRY ONLY — no bg, no shadow. The panel is a `Card` pinned to the
4
+ // overlay rung, so the elevation engine paints the surface, the shadow and
5
+ // `--field-fill` (which is what makes the Input/Radio/Checkbox inside fill
6
+ // correctly against a lifted panel). It used to hand-paint
7
+ // `bg-[var(--color-surface)] shadow-surface-5` — a rung-3 background under a
8
+ // rung-5 shadow, and hardcoded, so it never lifted when nested.
9
+ // The radius stays ours: the panel sits where the composer was and takes the
10
+ // sm cap tier, NOT `--card-radius` (lg). See docs/THEMING.md.
11
+ panelStyle: "relative w-full min-w-0 overflow-hidden rounded-[var(--agent-request-radius)]",
12
+ // Bottom-LEFT, sharing the footer line with the question's own actions: the
13
+ // arrows are navigation, the right-hand button is the answer, and putting
14
+ // them on one line separates "where am I" from "what do I do".
15
+ // 🔴 Still ABSOLUTE, and that is deliberate: the question swaps inside an
16
+ // AnimatePresence, and a nav rendered inside that swap would unmount on every
17
+ // step — taking keyboard focus with it, so a second press of the back arrow
18
+ // would land on nothing. Which is also why the actions row reserves its lane
19
+ // by padding rather than by holding it as a flex child.
20
+ // Pulled 4px out of the panel's 16px inset so the caret GLYPHS line up with
21
+ // the content edge — the ghost button boxes are wider than the marks in them.
22
+ // `bottom-5` centres the 24px nav against the 32px `size="sm"` button sitting
23
+ // on the panel's 16px bottom inset.
24
+ navStyle: "absolute bottom-5 left-3 z-[2] flex shrink-0 items-center gap-0.5",
25
+ // Overrides Button's `iconOnly` sizing (--button-icon-square-sm is the FORM
26
+ // control height — too heavy for a quiet header affordance). Plain utilities,
27
+ // not `!important`: Button puts `className` last in its own `cn(...)`, so
28
+ // twMerge already resolves these against the size/padding it set.
29
+ navButtonStyle: "size-6 p-0 text-[var(--color-text-muted)]",
30
+ navCountStyle: "px-0.5 text-xs tabular-nums text-[var(--color-text-muted)] select-none",
31
+ // 🔴 The panel's own inset, and it lives HERE rather than on a `Card.Body`.
32
+ // Card's body/header slots pad by `--card-px/py` (24px); this panel sits in
33
+ // the composer slot at 16px, which is also what earns it the sm radius cap
34
+ // instead of Card's lg (docs/THEMING.md). Wrapping the question in
35
+ // `Card.Body` stacked the two — the heading sat at 40px while its own
36
+ // options and actions sat at 24px, a 16px stagger down the left edge — so
37
+ // only Card's SURFACE is taken and the padding is ours.
38
+ contentStyle: "px-4 pb-4",
39
+ // The question IS the heading — there is no separate title row, and with the
40
+ // nav moved down to the footer the heading gets the full width.
41
+ headerStyle: "flex flex-col gap-1 pt-3.5 pb-3",
42
+ questionStyle: "min-w-0 text-base font-semibold leading-snug text-[var(--color-text-primary)]",
43
+ metaStyle: "text-sm text-[var(--color-text-secondary)]",
44
+ // Shown above the question when the user has arrowed BACK to one they already
45
+ // answered. The controls below are pre-selected too, but an approval has no
46
+ // control that can hold a selection, so this is the only record of it.
47
+ answeredChipStyle: "flex items-center gap-1.5",
48
+ badgeStyle: "grid size-4 shrink-0 place-items-center rounded-full",
49
+ badgeStates: {
50
+ resolved: "bg-[var(--color-success)] text-[var(--color-success-contrast)]",
51
+ rejected: "bg-[var(--color-danger)] text-[var(--color-danger-contrast)]",
52
+ deferred: "bg-[var(--color-mono)] text-[var(--color-mono-contrast)]",
53
+ },
54
+ // A rem cap, not a percentage — Tailwind v4 emits no rule for a percentage
55
+ // arbitrary max-width, so `max-w-[52%]` would silently never truncate.
56
+ answerStyle: "max-w-[14rem] truncate text-[11px] font-medium text-[var(--color-text-muted)]",
57
+ // The height-animated shell. `overflow-hidden` is load-bearing — it clips the
58
+ // outgoing question while the panel resizes to the incoming one.
59
+ bodyStyle: "relative w-full min-w-0 overflow-hidden",
60
+ // Applied only when `maxHeight` is set, and only to the ANSWERING controls —
61
+ // the question heading sits above the scroller. Capping the whole question
62
+ // let the user scroll the question itself out of sight while picking from its
63
+ // own option list. overscroll-contain stops a flick inside the body from
64
+ // scrolling the transcript behind it.
65
+ scrollAreaStyle: "overflow-y-auto overscroll-contain",
66
+ fadeStyle: "pointer-events-none absolute inset-x-0 z-[2] h-6 transition-opacity duration-[var(--motion-duration-base)] ease-out",
67
+ // `--surface-5`, not `--color-surface`: the panel paints the overlay rung, so
68
+ // a rung-3 gradient would band against it in dark mode.
69
+ fadeTopStyle: "top-0 bg-gradient-to-b from-[var(--surface-5)] to-transparent",
70
+ fadeBottomStyle: "bottom-0 bg-gradient-to-t from-[var(--surface-5)] to-transparent",
71
+ bodyInnerStyle: "min-w-0",
72
+ // Tight inner well — takes the xs-capped token, one tier below the panel it
73
+ // sits in. A bare `--radius-base` put a 24px curve on 10px of padding.
74
+ payloadStyle: "whitespace-pre-wrap break-words rounded-[var(--agent-request-well-radius)] bg-[var(--color-surface-sunken)] px-2.5 py-2 font-mono text-[11px] leading-relaxed text-[var(--color-text-secondary)]",
75
+ // ── option rows ────────────────────────────────────────────────────────────
76
+ // One connected group: a single perimeter on the list, hairline dividers
77
+ // between items, and only the first/last corners rounded. `overflow-hidden`
78
+ // is what rounds the children's outer corners — which is also why the option
79
+ // focus ring below MUST be `ring-inset`, or it gets clipped on the first and
80
+ // last rows. Takes the well radius (xs cap) so a large `--radius-base` theme
81
+ // can't round a 10px-padded row past its own padding.
82
+ optionListStyle: "flex flex-col overflow-hidden rounded-[var(--agent-request-well-radius)] shadow-[inset_0_0_0_1px_var(--color-border)]",
83
+ // The rows are the real `Radio`/`Checkbox` — this styles the row they sit in,
84
+ // nothing more. `first-of-type` (not `first`) is exact here because every
85
+ // child is one of those controls.
86
+ optionStyle: "flex w-full cursor-pointer items-center gap-2.5 border-t border-[var(--color-border)] px-2.5 py-2 text-left text-sm transition-[background-color] duration-[var(--motion-duration-fast)] ease-out first-of-type:border-t-0 hover:bg-[var(--color-surface-hover)] focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[var(--color-primary)]",
87
+ // No optionRadioStyle / optionDescriptionStyle — the real `Radio` and
88
+ // `Checkbox` own the control mark and the per-option `description`
89
+ // (§9: `description` is the per-option slot, distinct from `helperText`).
90
+ // The escape hatch: a plain `Input` under the options, nothing bespoke.
91
+ otherInputStyle: "mt-2",
92
+ // The footer line. Right-anchored: the primary action is the rightmost thing
93
+ // in the panel. `actionsStartStyle`'s `mr-auto` is what pushes it there, and
94
+ // it also holds the row open when the escape hatches are the only things
95
+ // present. `min-h-8` keeps the line tall enough for the absolutely-positioned
96
+ // nav even on a question whose only content is the nav itself; the left inset
97
+ // that clears the nav is applied inline, since its width is measured.
98
+ actionsStyle: "flex min-h-8 flex-wrap items-center justify-end gap-2 pt-3",
99
+ actionsStartStyle: "mr-auto flex items-center gap-2",
100
+ // Spacing ONLY — the box (height, padding, radius, border, focus ring) comes
101
+ // from the real `Input` component and its --form-* tokens. This used to be a
102
+ // hand-rolled <input> that reimplemented all of that and got it wrong.
103
+ inputStyle: "",
104
+ };
105
+
106
+ export { agentRequestTheme };
@@ -0,0 +1,241 @@
1
+ import React from "react";
2
+ /**
3
+ * What the agent is asking for.
4
+ *
5
+ * - `approval` — a permission gate. Approve / Deny (+ optional "always allow").
6
+ * - `choice` — pick one of `options`.
7
+ * - `input` — free text.
8
+ */
9
+ export type AgentRequestKind = "approval" | "choice" | "input";
10
+ /**
11
+ * How consequential the action is.
12
+ *
13
+ * The library paints NOTHING for this by default: a destructive question
14
+ * already reads as destructive through its `meta` line and the danger-outlined
15
+ * Deny action, and a coloured accent on top of those was noise. `destructive`
16
+ * lands on the row as `data-risk="destructive"` so a consumer can style it.
17
+ */
18
+ export type AgentRequestRisk = "normal" | "destructive";
19
+ /**
20
+ * How a question was settled.
21
+ *
22
+ * `deferred` is the escape hatch: the user declined to answer here (Skip). It
23
+ * is a first-class outcome, not a cancel — a composer takeover that cannot be
24
+ * escaped traps a user whose real answer isn't one of the offered options,
25
+ * which is also why a choice question can carry `allowOther`.
26
+ */
27
+ export type AgentRequestOutcome = "resolved" | "rejected" | "deferred";
28
+ export interface AgentRequestOption {
29
+ /** Serializable value handed back to `onAnswer`. */
30
+ value: string;
31
+ label: React.ReactNode;
32
+ /** Secondary line under the label — the trade-off, cost, or consequence. */
33
+ description?: React.ReactNode;
34
+ }
35
+ /** Fields every question kind shares. */
36
+ export interface AgentRequestQuestionBase {
37
+ /** Stable identity. Required — answers are keyed by it, not by index. */
38
+ id: string;
39
+ /**
40
+ * Short summary shown in the collapsed row once answered, and in the
41
+ * dimmed row while pending. Keep it to a few words.
42
+ */
43
+ label: React.ReactNode;
44
+ /** The full question. Falls back to `label` when omitted. */
45
+ question?: React.ReactNode;
46
+ /** Secondary context line under the question. */
47
+ meta?: React.ReactNode;
48
+ /** @default "normal" */
49
+ risk?: AgentRequestRisk;
50
+ /**
51
+ * What is actually being approved — a command, a diff, a params list.
52
+ * Rendered in a monospace well. `ReactNode` on purpose: this is the one slot
53
+ * where a consumer legitimately needs to render their own component
54
+ * (a diff view, a table), so it is NOT part of the serializable schema.
55
+ */
56
+ payload?: React.ReactNode;
57
+ }
58
+ export interface AgentRequestApprovalQuestion extends AgentRequestQuestionBase {
59
+ /** @default "approval" */
60
+ kind?: "approval";
61
+ /** Overrides for the built-in action labels (i18n — §6: never trap strings). */
62
+ approveLabel?: string;
63
+ denyLabel?: string;
64
+ alwaysAllowLabel?: string;
65
+ /** Show the "always allow" action. @default false */
66
+ allowAlways?: boolean;
67
+ /**
68
+ * Renders a Skip action, recorded as `deferred`. @default false
69
+ *
70
+ * An approval has no free-text row to fall back on — Approve and Deny are
71
+ * both real answers — so this is its ONLY escape hatch, and a permission gate
72
+ * the user can neither approve, deny, nor step away from is the trap the
73
+ * `deferred` outcome exists to prevent.
74
+ */
75
+ optional?: boolean;
76
+ skipLabel?: string;
77
+ }
78
+ /** Fields shared by both choice shapes. */
79
+ export interface AgentRequestChoiceBase extends AgentRequestQuestionBase {
80
+ kind: "choice";
81
+ options: AgentRequestOption[];
82
+ /**
83
+ * Append a free-text "something else" row to the bottom of the option list.
84
+ * Opt-in per question, NOT on by default: a closed question ("before or
85
+ * during the rollout?") is closed on purpose, and only the author of the
86
+ * question knows whether an answer off the list is meaningful. The typed
87
+ * answer is recorded as `resolved` with the text as its value.
88
+ * @default false
89
+ */
90
+ allowOther?: boolean;
91
+ /** Placeholder for the "something else" row. @default "Something else" */
92
+ otherPlaceholder?: string;
93
+ /** Label for the action that submits the "something else" text. @default "Send" */
94
+ otherSubmitLabel?: string;
95
+ /** Renders a Skip action. @default false */
96
+ optional?: boolean;
97
+ skipLabel?: string;
98
+ }
99
+ /** Pick exactly one — answers on selection. */
100
+ export interface AgentRequestSingleChoiceQuestion extends AgentRequestChoiceBase {
101
+ multiple?: false;
102
+ }
103
+ /**
104
+ * Pick any number.
105
+ *
106
+ * Unlike single-choice this CANNOT auto-advance on click (the user isn't done
107
+ * until they say so), so it always renders an explicit confirm action.
108
+ */
109
+ export interface AgentRequestMultiChoiceQuestion extends AgentRequestChoiceBase {
110
+ multiple: true;
111
+ /** Minimum selections before confirm enables. @default 0 */
112
+ minSelected?: number;
113
+ /** Maximum selections; further boxes disable once reached. */
114
+ maxSelected?: number;
115
+ confirmLabel?: string;
116
+ }
117
+ export interface AgentRequestInputQuestion extends AgentRequestQuestionBase {
118
+ kind: "input";
119
+ placeholder?: string;
120
+ /** Renders a Skip action. @default false */
121
+ optional?: boolean;
122
+ submitLabel?: string;
123
+ skipLabel?: string;
124
+ }
125
+ /**
126
+ * 🔴 A discriminated union, not one widened interface — `multiple` genuinely
127
+ * changes the shape of the ANSWER (`string` vs `string[]`), which §9 requires
128
+ * be modelled as a union rather than widened-and-cast. It also means `options`
129
+ * is required on a choice and meaningless on an approval, enforced by the
130
+ * compiler instead of by convention.
131
+ */
132
+ export type AgentRequestQuestion = AgentRequestApprovalQuestion | AgentRequestSingleChoiceQuestion | AgentRequestMultiChoiceQuestion | AgentRequestInputQuestion;
133
+ export interface AgentRequestAnswer {
134
+ /** The `id` of the question this answers. */
135
+ id: string;
136
+ /**
137
+ * Serializable answer value. `string[]` for a multi-choice question, `string`
138
+ * for every other kind — narrow with `Array.isArray`.
139
+ */
140
+ value: string | string[];
141
+ /** Human-readable answer, shown in the collapsed row. */
142
+ label: string;
143
+ outcome: AgentRequestOutcome;
144
+ }
145
+ export interface AgentRequestTheme {
146
+ baseStyle: string;
147
+ /**
148
+ * Geometry only. The panel's surface paint (rung background, elevation
149
+ * shadow, `--field-fill` for the controls inside) comes from `Card` and the
150
+ * relative-elevation engine, not from here.
151
+ */
152
+ panelStyle: string;
153
+ navStyle: string;
154
+ navButtonStyle: string;
155
+ navCountStyle: string;
156
+ /** The question-as-heading block. */
157
+ headerStyle: string;
158
+ /** Horizontal inset + bottom inset for the swapping question. */
159
+ contentStyle: string;
160
+ questionStyle: string;
161
+ metaStyle: string;
162
+ bodyStyle: string;
163
+ scrollAreaStyle: string;
164
+ fadeStyle: string;
165
+ fadeTopStyle: string;
166
+ fadeBottomStyle: string;
167
+ bodyInnerStyle: string;
168
+ answeredChipStyle: string;
169
+ badgeStyle: string;
170
+ /**
171
+ * Keyed by OUTCOME only. There are no `pending`/`active` badges any more —
172
+ * one question is on screen at a time, so there is no list of other
173
+ * questions to mark up.
174
+ */
175
+ badgeStates: Record<AgentRequestOutcome, string>;
176
+ answerStyle: string;
177
+ payloadStyle: string;
178
+ actionsStyle: string;
179
+ /** Left-anchored group inside the actions row (Skip). */
180
+ actionsStartStyle: string;
181
+ optionListStyle: string;
182
+ optionStyle: string;
183
+ otherInputStyle: string;
184
+ inputStyle: string;
185
+ }
186
+ export type AgentRequestThemeOverrides = Omit<Partial<AgentRequestTheme>, "badgeStates"> & {
187
+ badgeStates?: Partial<AgentRequestTheme["badgeStates"]>;
188
+ };
189
+ export interface AgentRequestProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onChange" | "children" | "value" | "defaultValue" | "title"> {
190
+ /**
191
+ * The questions to ask, in order. Data-driven and serializable (except
192
+ * `payload`), so an LLM can emit a whole sequence as JSON.
193
+ */
194
+ questions?: AgentRequestQuestion[];
195
+ /**
196
+ * Escape hatch for a bespoke single-question body. Ignored when `questions`
197
+ * is provided (dev-warns if both).
198
+ */
199
+ children?: React.ReactNode;
200
+ /**
201
+ * The panel's accessible name, and only that — it is never painted. The
202
+ * QUESTION is the visible heading, so a second title line would be a heading
203
+ * competing with a heading. Pass a string; this is the i18n override for the
204
+ * default "Agent needs {n} decisions".
205
+ */
206
+ title?: React.ReactNode;
207
+ /** Controlled answers. */
208
+ value?: AgentRequestAnswer[];
209
+ /** Uncontrolled initial answers. @default [] */
210
+ defaultValue?: AgentRequestAnswer[];
211
+ /** Fires with the full answer list on every change. */
212
+ onValueChange?: (answers: AgentRequestAnswer[]) => void;
213
+ /** Fires once per answered question. */
214
+ onAnswer?: (answer: AgentRequestAnswer) => void;
215
+ /** Fires when the last question is answered. */
216
+ onComplete?: (answers: AgentRequestAnswer[]) => void;
217
+ /**
218
+ * Optional ceiling on the answering controls, as any CSS length. Unset by
219
+ * default: one question is on screen at a time, so the panel simply grows
220
+ * and shrinks to fit it. Set this when a question can be long enough to bury
221
+ * the conversation behind the composer (many options, a large `payload`) —
222
+ * beyond it the options scroll instead of growing, while the question itself
223
+ * stays put above them.
224
+ */
225
+ maxHeight?: string;
226
+ /** Accessible name for the back arrow. @default "Previous question" */
227
+ previousLabel?: string;
228
+ /** Accessible name for the forward arrow. @default "Next question" */
229
+ nextLabel?: string;
230
+ /**
231
+ * The progress line in the footer. A function rather than a string because it
232
+ * interpolates two numbers, and every visible string in the library has to be
233
+ * overridable for i18n. Whatever it returns is measured, and the actions row
234
+ * insets itself to clear it — a longer label is a layout choice, not a
235
+ * collision.
236
+ * @default "{current} of {total}"
237
+ */
238
+ progressLabel?: (current: number, total: number) => React.ReactNode;
239
+ className?: string;
240
+ theme?: AgentRequestThemeOverrides;
241
+ }
@@ -0,0 +1,3 @@
1
+ export { AgentRequest } from "./AgentRequest";
2
+ export { agentRequestTheme } from "./AgentRequest.theme";
3
+ export type { AgentRequestProps, AgentRequestKind, AgentRequestRisk, AgentRequestOutcome, AgentRequestOption, AgentRequestQuestion, AgentRequestAnswer, AgentRequestTheme, AgentRequestThemeOverrides, } from "./AgentRequest.types";
@@ -1,6 +1,6 @@
1
1
  const codeBlockTheme = {
2
2
  baseStyle: "relative rounded-[var(--codeblock-radius)] border border-[var(--color-border)] overflow-hidden bg-[var(--color-surface-sunken)] shadow-inner-real-sm",
3
- header: "flex items-center justify-between px-3 py-1.5 bg-[var(--color-background-secondary)] border-b border-[var(--color-border)]",
3
+ header: "flex items-center justify-between px-3 py-1.5 bg-[var(--color-surface)] border-b border-[var(--color-border)]",
4
4
  headerLeft: "flex items-center gap-2 min-w-0 flex-1 ",
5
5
  headerRight: "flex items-center gap-2 flex-shrink-0",
6
6
  filename: "text-sm font-medium text-[var(--color-text-secondary)] truncate",
@@ -527,7 +527,7 @@ className, textareaClassName, footerClassName, theme = {},
527
527
  Link,
528
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) => {
529
529
  var _a;
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-300 ease-in-out cursor-pointer shadow-md", "aria-label": `Remove ${attachment.file.name}`, children: jsx(X, { className: "size-3", weight: "bold" }) })] }, 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));
531
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" &&
532
532
  "!w-auto flex-1 min-w-0 justify-center", textareaClassName), style: {
533
533
  minHeight,
@@ -557,7 +557,7 @@ className, textareaClassName, footerClassName, theme = {},
557
557
  : internalModel, onSelectionChange: handleModelChange, children: [jsx(Dropdown.Trigger, { children: jsxs(Button, { variant: "outline", color: "mono", size: "sm",
558
558
  // Hover + open active state now come from Dropdown.Trigger
559
559
  // (unified surface-hover tint). `group` stays for the chevron flip.
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-200 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
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
561
561
  ? "text-[var(--color-danger)]"
562
562
  : "text-[var(--color-text-muted)]"), role: isInvalid ? "alert" : undefined, "aria-live": isInvalid ? "polite" : undefined, children: displayHelperText }))] }));
563
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",
@@ -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
  };
@@ -1,10 +1,34 @@
1
1
  "use client";
2
2
  import { jsx } from 'react/jsx-runtime';
3
- import React__default from 'react';
3
+ import React__default, { useMemo } from 'react';
4
+ import { Sparkle } from '@phosphor-icons/react';
4
5
  import { AgentStatus } from '../AgentStatus/AgentStatus.js';
6
+ import { reasoningTheme } from './Reasoning.theme.js';
7
+ import { ReasoningTrace } from './ReasoningTrace.js';
5
8
 
6
- // Reasoning is AgentStatus in its reasoning mode, with a discoverable name.
7
- const ReasoningRoot = React__default.forwardRef((props, ref) => jsx(AgentStatus, { ref: ref, mode: "reasoning", ...props }));
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
+ });
8
32
  ReasoningRoot.displayName = "Reasoning";
9
33
  // A step is just a status row; children carry its text.
10
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 })));
@@ -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 };
@@ -1,14 +1,67 @@
1
1
  import React from "react";
2
- import type { AgentStatusProps, AgentStatusState, AgentStatusStepData, AgentStatusThemeOverrides } from "../AgentStatus";
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
+ }
3
24
  /**
4
25
  * Reasoning is a preset of AgentStatus fixed to `mode="reasoning"` — the
5
26
  * collapsible "show the AI's thinking" disclosure. Every AgentStatus prop
6
27
  * except `mode` applies.
7
28
  */
8
- export type ReasoningProps = Omit<AgentStatusProps, "mode">;
9
- /** A structured reasoning step (an AgentStatus row). */
10
- export type ReasoningStepData = AgentStatusStepData;
11
- export type ReasoningThemeOverrides = AgentStatusThemeOverrides;
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
+ }
12
65
  export interface ReasoningStepProps {
13
66
  /** Step state — drives the indicator glyph. @default "complete" */
14
67
  status?: AgentStatusState;
@@ -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 {};