@flikk/ui 1.0.0-beta.31 → 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 (428) hide show
  1. package/CHANGELOG.md +295 -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 +2 -2
  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 +2 -1
  136. package/dist/components/core/Pill/Pill.theme.js +4 -2
  137. package/dist/components/core/Popover/PopoverBody.js +16 -5
  138. package/dist/components/core/Progress/Progress.d.ts +0 -25
  139. package/dist/components/core/Progress/Progress.js +79 -11
  140. package/dist/components/core/Progress/Progress.theme.js +17 -0
  141. package/dist/components/core/Progress/Progress.types.d.ts +47 -1
  142. package/dist/components/core/Rating/Rating.theme.js +1 -1
  143. package/dist/components/core/Rating/Rating.types.d.ts +3 -2
  144. package/dist/components/core/ScrollArea/ScrollArea.js +1 -1
  145. package/dist/components/core/ScrollArea/ScrollArea.theme.js +1 -1
  146. package/dist/components/core/Segmented/Segmented.theme.js +3 -3
  147. package/dist/components/core/Segmented/SegmentedContext.js +1 -0
  148. package/dist/components/core/Sidebar/Sidebar.js +5 -2
  149. package/dist/components/core/Sidebar/Sidebar.theme.js +2 -2
  150. package/dist/components/core/Sidebar/SidebarContent.js +1 -1
  151. package/dist/components/core/Sidebar/SidebarHeader.js +1 -1
  152. package/dist/components/core/Sidebar/SidebarSearch.js +2 -2
  153. package/dist/components/core/Sidebar/SidebarToggle.js +1 -1
  154. package/dist/components/core/Sidebar/SidebarUserProfile.js +1 -1
  155. package/dist/components/core/Sortable/Sortable.theme.js +1 -1
  156. package/dist/components/core/Tabs/Tabs.theme.js +1 -1
  157. package/dist/components/core/Tag/Tag.theme.js +1 -1
  158. package/dist/components/core/Toast/ToastProvider.js +1 -1
  159. package/dist/components/core/Tree/Tree.theme.js +1 -1
  160. package/dist/components/core/index.d.ts +0 -2
  161. package/dist/components/core/index.js +0 -4
  162. package/dist/components/core/shared/ChartTooltip/ChartTooltip.animations.d.ts +4 -0
  163. package/dist/components/core/shared/ChartTooltip/ChartTooltip.animations.js +20 -0
  164. package/dist/components/{charts → core}/shared/ChartTooltip/ChartTooltip.js +1 -1
  165. package/dist/components/core/shared/Ripple.d.ts +16 -0
  166. package/dist/components/core/shared/Ripple.js +141 -0
  167. package/dist/components/data-display/GanttChart/GanttChart.theme.js +6 -6
  168. package/dist/components/data-display/GanttChart/GanttTaskBar.js +1 -1
  169. package/dist/components/data-display/GanttChart/GanttTimelineHeader.js +1 -1
  170. package/dist/components/data-display/GanttChart/GanttToolbar.js +0 -1
  171. package/dist/components/data-display/KPI/KPI.js +11 -20
  172. package/dist/components/data-display/KPI/KPI.theme.js +8 -4
  173. package/dist/components/data-display/Metric/Metric.theme.js +4 -4
  174. package/dist/components/data-display/Table/Table.theme.js +2 -2
  175. package/dist/components/data-display/Table/TableColumnManager.js +1 -2
  176. package/dist/components/data-display/Table/TableContext.js +1 -0
  177. package/dist/components/data-display/Table/TableFilter.js +9 -2
  178. package/dist/components/data-display/Table/TableSelectionHeader.js +1 -1
  179. package/dist/components/data-display/Timeline/Timeline.theme.js +1 -1
  180. package/dist/components/effects/CustomCursor/CustomCursor.d.ts +1 -1
  181. package/dist/components/effects/CustomCursor/CustomCursor.js +1 -1
  182. package/dist/components/effects/CustomCursor/CustomCursor.theme.js +4 -4
  183. package/dist/components/effects/Neumorphic/InsetCircleButton.js +1 -1
  184. package/dist/components/effects/Overlay/Overlay.js +7 -3
  185. package/dist/components/effects/index.d.ts +0 -32
  186. package/dist/components/effects/index.js +0 -16
  187. package/dist/components/effects/shared/ShaderCanvas/ShaderCanvas.d.ts +0 -2
  188. package/dist/components/effects/shared/ShaderCanvas/ShaderCanvas.js +1 -93
  189. package/dist/components/effects/shared/ShaderCanvas/ShaderCanvas.types.d.ts +0 -10
  190. package/dist/components/effects/shared/ShaderCanvas/index.d.ts +1 -1
  191. package/dist/components/effects/shared/index.d.ts +1 -3
  192. package/dist/components/effects/shared/shaderNoise.glsl.d.ts +1 -1
  193. package/dist/components/effects/shared/shaderNoise.glsl.js +2 -11
  194. package/dist/components/forms/Checkbox/Checkbox.theme.js +1 -1
  195. package/dist/components/forms/ColorPicker/ColorPickerHeader.js +1 -1
  196. package/dist/components/forms/ColorPicker/ColorPickerImage.js +1 -1
  197. package/dist/components/forms/Combobox/Combobox.js +2 -0
  198. package/dist/components/forms/DateRangePicker/DateRangePicker.theme.js +1 -1
  199. package/dist/components/forms/DateRangePicker/DateRangePickerContext.js +1 -0
  200. package/dist/components/forms/FileUpload/FileUpload.theme.js +2 -2
  201. package/dist/components/forms/FileUpload/FileUploadProgress.theme.js +1 -1
  202. package/dist/components/forms/InputAddress/InputAddress.types.d.ts +2 -2
  203. package/dist/components/forms/Radio/Radio.theme.js +1 -1
  204. package/dist/components/forms/RichTextEditor/RichTextEditor.d.ts +12 -16
  205. package/dist/components/forms/RichTextEditor/RichTextEditor.js +165 -1680
  206. package/dist/components/forms/RichTextEditor/RichTextEditor.theme.d.ts +12 -56
  207. package/dist/components/forms/RichTextEditor/RichTextEditor.theme.js +60 -118
  208. package/dist/components/forms/RichTextEditor/RichTextEditor.types.d.ts +62 -126
  209. package/dist/components/forms/RichTextEditor/RichTextLinkField.d.ts +18 -0
  210. package/dist/components/forms/RichTextEditor/RichTextLinkField.js +46 -0
  211. package/dist/components/forms/RichTextEditor/RichTextToolbar.d.ts +15 -0
  212. package/dist/components/forms/RichTextEditor/RichTextToolbar.js +93 -0
  213. package/dist/components/forms/RichTextEditor/editorCommands.d.ts +50 -0
  214. package/dist/components/forms/RichTextEditor/editorCommands.js +58 -0
  215. package/dist/components/forms/RichTextEditor/editorState.d.ts +19 -0
  216. package/dist/components/forms/RichTextEditor/editorState.js +103 -0
  217. package/dist/components/forms/RichTextEditor/index.d.ts +5 -3
  218. package/dist/components/forms/RichTextEditor/sanitizeHtml.d.ts +38 -0
  219. package/dist/components/forms/RichTextEditor/sanitizeHtml.js +179 -0
  220. package/dist/components/forms/RichTextEditor/sanitizeHtml.test.d.ts +1 -0
  221. package/dist/components/forms/Select/Select.js +4 -4
  222. package/dist/components/forms/Select/Select.types.d.ts +70 -7
  223. package/dist/components/forms/Select/useSelectState.d.ts +9 -3
  224. package/dist/components/forms/Select/useSelectState.js +4 -1
  225. package/dist/components/forms/SelectableCard/SelectableCard.js +2 -1
  226. package/dist/components/forms/SelectableCard/SelectableCard.theme.js +1 -1
  227. package/dist/components/forms/Switch/Switch.theme.js +2 -2
  228. package/dist/components/forms/TimePicker/TimePicker.theme.js +1 -1
  229. package/dist/components/forms/TimePicker/TimePickerTrigger.js +1 -1
  230. package/dist/components/forms/forms.theme.js +19 -5
  231. package/dist/components/forms/index.js +1 -0
  232. package/dist/components/generative/FormShell.d.ts +22 -0
  233. package/dist/components/generative/FormShell.js +102 -0
  234. package/dist/components/generative/GenerativeView.d.ts +52 -1
  235. package/dist/components/generative/GenerativeView.js +203 -11
  236. package/dist/components/generative/actions.d.ts +5 -0
  237. package/dist/components/generative/ai-sdk/index.d.ts +1 -0
  238. package/dist/components/generative/ai-sdk/index.js +1 -0
  239. package/dist/components/generative/ai-sdk/useGenerativeChat.d.ts +52 -0
  240. package/dist/components/generative/ai-sdk/useGenerativeChat.js +73 -0
  241. package/dist/components/generative/ai-sdk/useGenerativeChat.test.d.ts +1 -0
  242. package/dist/components/generative/fieldBinding.d.ts +31 -0
  243. package/dist/components/generative/fieldBinding.js +33 -0
  244. package/dist/components/generative/fieldBinding.test.d.ts +1 -0
  245. package/dist/components/generative/formScope.d.ts +71 -0
  246. package/dist/components/generative/formScope.js +135 -0
  247. package/dist/components/generative/index.d.ts +4 -0
  248. package/dist/components/generative/index.js +4 -0
  249. package/dist/components/generative/registry.d.ts +2 -0
  250. package/dist/components/generative/registry.js +10 -10
  251. package/dist/components/generative/schema.generated.js +178 -292
  252. package/dist/components/generative/toToolResult.d.ts +21 -0
  253. package/dist/components/generative/toToolResult.js +15 -0
  254. package/dist/components/generative/toToolResult.test.d.ts +1 -0
  255. package/dist/components/generative/validate.d.ts +10 -1
  256. package/dist/components/generative/validate.js +126 -11
  257. package/dist/components/layout/Grid/Grid.js +1 -0
  258. package/dist/components/layout/Section/Section.theme.js +1 -1
  259. package/dist/components/layout/Stack/Stack.js +1 -0
  260. package/dist/generative.schema.json +178 -292
  261. package/dist/index.js +1 -4
  262. package/dist/registry.json +2599 -2375
  263. package/dist/shadcn-compat.css +5 -5
  264. package/dist/styles/theme.test.d.ts +1 -0
  265. package/dist/styles.css +1 -1
  266. package/dist/test/render.d.ts +17 -0
  267. package/dist/themes/precision.css +232 -0
  268. package/dist/tools.json +179 -294
  269. package/dist/utils/index.d.ts +0 -1
  270. package/package.json +31 -1
  271. package/src/global.scss +21 -28
  272. package/src/styles/theme.css +124 -41
  273. package/src/styles/theme.test.ts +119 -0
  274. package/tailwind.preset.cjs +30 -20
  275. package/dist/components/charts/FunnelChart/FunnelChart.animations.d.ts +0 -35
  276. package/dist/components/charts/FunnelChart/FunnelChart.animations.js +0 -59
  277. package/dist/components/charts/FunnelChart/FunnelChart.d.ts +0 -8
  278. package/dist/components/charts/FunnelChart/FunnelChart.js +0 -410
  279. package/dist/components/charts/FunnelChart/FunnelChart.theme.d.ts +0 -2
  280. package/dist/components/charts/FunnelChart/FunnelChart.theme.js +0 -12
  281. package/dist/components/charts/FunnelChart/FunnelChart.types.d.ts +0 -105
  282. package/dist/components/charts/FunnelChart/index.d.ts +0 -4
  283. package/dist/components/charts/ScatterPlot/ScatterPlot.d.ts +0 -9
  284. package/dist/components/charts/ScatterPlot/ScatterPlot.js +0 -208
  285. package/dist/components/charts/ScatterPlot/ScatterPlot.theme.d.ts +0 -18
  286. package/dist/components/charts/ScatterPlot/ScatterPlot.theme.js +0 -42
  287. package/dist/components/charts/ScatterPlot/ScatterPlot.types.d.ts +0 -60
  288. package/dist/components/charts/ScatterPlot/ScatterPlot.types.js +0 -19
  289. package/dist/components/charts/ScatterPlot/index.d.ts +0 -3
  290. package/dist/components/core/Button/Button.ripple.d.ts +0 -71
  291. package/dist/components/core/Button/Button.ripple.js +0 -236
  292. package/dist/components/core/Calendar/CalendarEvent/CalendarEvent.d.ts +0 -4
  293. package/dist/components/core/Calendar/CalendarEvent/CalendarEvent.theme.d.ts +0 -12
  294. package/dist/components/core/Calendar/CalendarEvent/CalendarEvent.types.d.ts +0 -23
  295. package/dist/components/core/Calendar/CalendarEvent/index.d.ts +0 -2
  296. package/dist/components/core/CardStack/CardStack.animations.d.ts +0 -47
  297. package/dist/components/core/CardStack/CardStack.d.ts +0 -3
  298. package/dist/components/core/CardStack/CardStack.js +0 -187
  299. package/dist/components/core/CardStack/CardStack.theme.d.ts +0 -6
  300. package/dist/components/core/CardStack/CardStack.theme.js +0 -33
  301. package/dist/components/core/CardStack/CardStack.types.d.ts +0 -139
  302. package/dist/components/core/CardStack/index.d.ts +0 -7
  303. package/dist/components/core/Carousel/Carousel.d.ts +0 -3
  304. package/dist/components/core/Carousel/Carousel.js +0 -83
  305. package/dist/components/core/Carousel/Carousel.theme.d.ts +0 -10
  306. package/dist/components/core/Carousel/Carousel.theme.js +0 -20
  307. package/dist/components/core/Carousel/Carousel.types.d.ts +0 -113
  308. package/dist/components/core/Carousel/CarouselBody.d.ts +0 -4
  309. package/dist/components/core/Carousel/CarouselBody.js +0 -59
  310. package/dist/components/core/Carousel/CarouselContext.d.ts +0 -3
  311. package/dist/components/core/Carousel/CarouselContext.js +0 -13
  312. package/dist/components/core/Carousel/CarouselItem.d.ts +0 -4
  313. package/dist/components/core/Carousel/CarouselItem.js +0 -11
  314. package/dist/components/core/Carousel/CarouselNext.d.ts +0 -4
  315. package/dist/components/core/Carousel/CarouselNext.js +0 -16
  316. package/dist/components/core/Carousel/CarouselPrevious.d.ts +0 -4
  317. package/dist/components/core/Carousel/CarouselPrevious.js +0 -16
  318. package/dist/components/core/Carousel/index.d.ts +0 -3
  319. package/dist/components/effects/ColorPanels/ColorPanels.d.ts +0 -8
  320. package/dist/components/effects/ColorPanels/ColorPanels.js +0 -66
  321. package/dist/components/effects/ColorPanels/ColorPanels.shaders.d.ts +0 -12
  322. package/dist/components/effects/ColorPanels/ColorPanels.shaders.js +0 -218
  323. package/dist/components/effects/ColorPanels/ColorPanels.types.d.ts +0 -29
  324. package/dist/components/effects/ColorPanels/ColorPanels.types.js +0 -3
  325. package/dist/components/effects/ColorPanels/index.d.ts +0 -2
  326. package/dist/components/effects/FlutedGlass/FlutedGlass.d.ts +0 -9
  327. package/dist/components/effects/FlutedGlass/FlutedGlass.js +0 -80
  328. package/dist/components/effects/FlutedGlass/FlutedGlass.shaders.d.ts +0 -12
  329. package/dist/components/effects/FlutedGlass/FlutedGlass.shaders.js +0 -335
  330. package/dist/components/effects/FlutedGlass/FlutedGlass.types.d.ts +0 -61
  331. package/dist/components/effects/FlutedGlass/FlutedGlass.types.js +0 -16
  332. package/dist/components/effects/FlutedGlass/index.d.ts +0 -3
  333. package/dist/components/effects/GlassEffect/GlassEffect.d.ts +0 -15
  334. package/dist/components/effects/GlassEffect/GlassEffect.js +0 -38
  335. package/dist/components/effects/GlassEffect/GlassEffect.types.d.ts +0 -19
  336. package/dist/components/effects/GlassEffect/index.d.ts +0 -2
  337. package/dist/components/effects/GlassSurface/GlassSurface.d.ts +0 -8
  338. package/dist/components/effects/GlassSurface/GlassSurface.js +0 -250
  339. package/dist/components/effects/GlassSurface/GlassSurface.types.d.ts +0 -66
  340. package/dist/components/effects/GlassSurface/index.d.ts +0 -2
  341. package/dist/components/effects/GodRays/GodRays.d.ts +0 -8
  342. package/dist/components/effects/GodRays/GodRays.js +0 -68
  343. package/dist/components/effects/GodRays/GodRays.shaders.d.ts +0 -10
  344. package/dist/components/effects/GodRays/GodRays.shaders.js +0 -128
  345. package/dist/components/effects/GodRays/GodRays.types.d.ts +0 -25
  346. package/dist/components/effects/GodRays/GodRays.types.js +0 -3
  347. package/dist/components/effects/GodRays/index.d.ts +0 -2
  348. package/dist/components/effects/GridPattern/GridPattern.d.ts +0 -18
  349. package/dist/components/effects/GridPattern/GridPattern.js +0 -65
  350. package/dist/components/effects/GridPattern/GridPattern.types.d.ts +0 -47
  351. package/dist/components/effects/GridPattern/index.d.ts +0 -2
  352. package/dist/components/effects/HalftoneCmyk/HalftoneCmyk.d.ts +0 -10
  353. package/dist/components/effects/HalftoneCmyk/HalftoneCmyk.js +0 -78
  354. package/dist/components/effects/HalftoneCmyk/HalftoneCmyk.shaders.d.ts +0 -22
  355. package/dist/components/effects/HalftoneCmyk/HalftoneCmyk.shaders.js +0 -239
  356. package/dist/components/effects/HalftoneCmyk/HalftoneCmyk.types.d.ts +0 -52
  357. package/dist/components/effects/HalftoneCmyk/index.d.ts +0 -2
  358. package/dist/components/effects/HalftoneDots/HalftoneDots.d.ts +0 -9
  359. package/dist/components/effects/HalftoneDots/HalftoneDots.js +0 -68
  360. package/dist/components/effects/HalftoneDots/HalftoneDots.shaders.d.ts +0 -13
  361. package/dist/components/effects/HalftoneDots/HalftoneDots.shaders.js +0 -296
  362. package/dist/components/effects/HalftoneDots/HalftoneDots.types.d.ts +0 -43
  363. package/dist/components/effects/HalftoneDots/HalftoneDots.types.js +0 -12
  364. package/dist/components/effects/HalftoneDots/index.d.ts +0 -3
  365. package/dist/components/effects/ImageDithering/ImageDithering.d.ts +0 -9
  366. package/dist/components/effects/ImageDithering/ImageDithering.js +0 -68
  367. package/dist/components/effects/ImageDithering/ImageDithering.shaders.d.ts +0 -12
  368. package/dist/components/effects/ImageDithering/ImageDithering.shaders.js +0 -117
  369. package/dist/components/effects/ImageDithering/ImageDithering.types.d.ts +0 -30
  370. package/dist/components/effects/ImageDithering/ImageDithering.types.js +0 -8
  371. package/dist/components/effects/ImageDithering/index.d.ts +0 -3
  372. package/dist/components/effects/MagneticElement/MagneticElement.d.ts +0 -30
  373. package/dist/components/effects/MagneticElement/MagneticElement.js +0 -111
  374. package/dist/components/effects/MagneticElement/MagneticElement.types.d.ts +0 -44
  375. package/dist/components/effects/MagneticElement/index.d.ts +0 -2
  376. package/dist/components/effects/Metaballs/Metaballs.d.ts +0 -8
  377. package/dist/components/effects/Metaballs/Metaballs.js +0 -59
  378. package/dist/components/effects/Metaballs/Metaballs.shaders.d.ts +0 -10
  379. package/dist/components/effects/Metaballs/Metaballs.shaders.js +0 -102
  380. package/dist/components/effects/Metaballs/Metaballs.types.d.ts +0 -16
  381. package/dist/components/effects/Metaballs/Metaballs.types.js +0 -3
  382. package/dist/components/effects/Metaballs/index.d.ts +0 -2
  383. package/dist/components/effects/PaperTexture/PaperTexture.d.ts +0 -9
  384. package/dist/components/effects/PaperTexture/PaperTexture.js +0 -61
  385. package/dist/components/effects/PaperTexture/PaperTexture.shaders.d.ts +0 -22
  386. package/dist/components/effects/PaperTexture/PaperTexture.shaders.js +0 -145
  387. package/dist/components/effects/PaperTexture/PaperTexture.types.d.ts +0 -19
  388. package/dist/components/effects/PaperTexture/index.d.ts +0 -2
  389. package/dist/components/effects/PulsingBorder/PulsingBorder.d.ts +0 -27
  390. package/dist/components/effects/PulsingBorder/PulsingBorder.js +0 -174
  391. package/dist/components/effects/PulsingBorder/PulsingBorder.shaders.d.ts +0 -14
  392. package/dist/components/effects/PulsingBorder/PulsingBorder.shaders.js +0 -258
  393. package/dist/components/effects/PulsingBorder/PulsingBorder.types.d.ts +0 -75
  394. package/dist/components/effects/PulsingBorder/PulsingBorder.types.js +0 -3
  395. package/dist/components/effects/PulsingBorder/index.d.ts +0 -2
  396. package/dist/components/effects/SmokeRing/SmokeRing.d.ts +0 -8
  397. package/dist/components/effects/SmokeRing/SmokeRing.js +0 -62
  398. package/dist/components/effects/SmokeRing/SmokeRing.shaders.d.ts +0 -14
  399. package/dist/components/effects/SmokeRing/SmokeRing.shaders.js +0 -130
  400. package/dist/components/effects/SmokeRing/SmokeRing.types.d.ts +0 -22
  401. package/dist/components/effects/SmokeRing/SmokeRing.types.js +0 -3
  402. package/dist/components/effects/SmokeRing/index.d.ts +0 -2
  403. package/dist/components/effects/StaticGradientMesh/StaticGradientMesh.d.ts +0 -9
  404. package/dist/components/effects/StaticGradientMesh/StaticGradientMesh.js +0 -59
  405. package/dist/components/effects/StaticGradientMesh/StaticGradientMesh.shaders.d.ts +0 -14
  406. package/dist/components/effects/StaticGradientMesh/StaticGradientMesh.shaders.js +0 -129
  407. package/dist/components/effects/StaticGradientMesh/StaticGradientMesh.types.d.ts +0 -23
  408. package/dist/components/effects/StaticGradientMesh/StaticGradientMesh.types.js +0 -3
  409. package/dist/components/effects/StaticGradientMesh/index.d.ts +0 -2
  410. package/dist/components/effects/Water/Water.d.ts +0 -9
  411. package/dist/components/effects/Water/Water.js +0 -65
  412. package/dist/components/effects/Water/Water.shaders.d.ts +0 -11
  413. package/dist/components/effects/Water/Water.shaders.js +0 -123
  414. package/dist/components/effects/Water/Water.types.d.ts +0 -25
  415. package/dist/components/effects/Water/index.d.ts +0 -2
  416. package/dist/components/effects/shared/bayerMatrices.glsl.d.ts +0 -10
  417. package/dist/components/effects/shared/bayerMatrices.glsl.js +0 -44
  418. package/dist/components/effects/shared/imageUV.glsl.d.ts +0 -12
  419. package/dist/components/effects/shared/imageUV.glsl.js +0 -26
  420. package/dist/components/forms/RichTextEditor/RichTextEditor.animations.d.ts +0 -7
  421. package/dist/components/forms/RichTextEditor/RichTextEditor.animations.js +0 -32
  422. package/dist/utils/calendarUtils.d.ts +0 -60
  423. /package/dist/components/{charts → core}/shared/ChartTooltip/ChartTooltip.d.ts +0 -0
  424. /package/dist/components/{charts → core}/shared/ChartTooltip/ChartTooltip.theme.d.ts +0 -0
  425. /package/dist/components/{charts → core}/shared/ChartTooltip/ChartTooltip.theme.js +0 -0
  426. /package/dist/components/{charts → core}/shared/ChartTooltip/ChartTooltip.types.d.ts +0 -0
  427. /package/dist/components/{charts → core}/shared/ChartTooltip/ChartTooltipContent.d.ts +0 -0
  428. /package/dist/components/{charts → core}/shared/ChartTooltip/index.d.ts +0 -0
@@ -2,7 +2,6 @@ export { cn } from "./cn";
2
2
  export { debounce } from "./debounce";
3
3
  export { formatTimestamp, formatDate, formatTime, formatDateCustom, formatRelativeTime, isToday, isYesterday, isThisWeek, getLastNDays, getThisWeek, getLastWeek, getThisMonth, getLastMonth, getThisYear, getLastYear, toDate, addDays, isSameDay, isWeekend, getDaysBetween, getWeekNumber, type DateInput, type TimestampOptions, type DateRange, } from "./dateUtils";
4
4
  export { findNextMatchingOption, isValidTypeaheadChar, TYPEAHEAD_TIMEOUT_MS, type TypeaheadOption, type FindNextMatchingOptionParams, } from "./typeaheadUtils";
5
- export { timeToMinutes, minutesToTime, getEventDuration, getTotalTimeSlots, getTimeSlotIndex, getTimeSlotForIndex, calculateEventPosition, calculateEventHeight, eventsOverlap, findOverlappingEvents, groupOverlappingEvents, resolveOverlappingEvents, generateTimeGrid, filterEventsByDate, sortEventsByStartTime, separateAllDayEvents, isValidTimeFormat, isValidDateFormat, validateEvent, DEFAULT_GRID_CONFIGS, type CalendarEvent, type GridConfig, type EventPosition, type EventLayout, type TimeSlot, } from "./calendarUtils";
6
5
  export { parseOpenAI, parseAnthropic, parseGemini, parseSSELine, SSE_PARSERS, type SSEFormat, type SSEParser, } from "./sseFormatParsers";
7
6
  export { StreamingNetworkError, StreamingTimeoutError, StreamingParseError, StreamingAbortError, StreamingServerError, normalizeError, type StreamingError, } from "./streamingErrors";
8
7
  export { calculateRetryDelay, shouldRetry, type RetryConfig, } from "./retryUtils";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flikk/ui",
3
- "version": "1.0.0-beta.31",
3
+ "version": "1.0.0-beta.32",
4
4
  "description": "A modern React component library built with TypeScript, Tailwind CSS v4, and Framer Motion. Follows the shadcn philosophy with complete className override support.",
5
5
  "type": "module",
6
6
  "packageManager": "yarn@1.22.22",
@@ -58,6 +58,10 @@
58
58
  "types": "./dist/components/generative/index.d.ts",
59
59
  "import": "./dist/components/generative/index.js"
60
60
  },
61
+ "./generative/ai-sdk": {
62
+ "types": "./dist/components/generative/ai-sdk/index.d.ts",
63
+ "import": "./dist/components/generative/ai-sdk/index.js"
64
+ },
61
65
  "./components/*": {
62
66
  "import": "./dist/components/*.js",
63
67
  "types": "./dist/components/*.d.ts"
@@ -99,6 +103,19 @@
99
103
  "watch": "rollup -c -w",
100
104
  "typecheck": "tsc --noEmit",
101
105
  "lint": "eslint src",
106
+ "verify": "node scripts/verify.mjs",
107
+ "verify:fast": "node scripts/verify.mjs --fast",
108
+ "verify:full": "node scripts/verify.mjs --full",
109
+ "verify:pack": "node scripts/smoke-package.mjs",
110
+ "test:stories": "node scripts/test-stories.mjs",
111
+ "test-storybook": "test-storybook",
112
+ "verify:drift": "yarn build:generative && yarn build:inventory && git diff --exit-code src/components/generative/schema.generated.ts && git diff --exit-code CLAUDE.md",
113
+ "prepare": "git config core.hooksPath .githooks || true",
114
+ "chromatic": "chromatic --build-script-name build-storybook --only-changed",
115
+ "changeset": "changeset",
116
+ "release:status": "changeset status --verbose",
117
+ "release:version": "changeset version && node scripts/normalize-changelog.mjs && yarn build:inventory",
118
+ "release:publish": "changeset publish",
102
119
  "clean": "rimraf dist",
103
120
  "prepublishOnly": "npm run clean && npm run test && npm run build",
104
121
  "dev": "concurrently \"npm run watch:css:dev\" \"storybook dev -p 6006\" \"npm --prefix apps/docs run dev\"",
@@ -131,9 +148,11 @@
131
148
  "npm": ">=10.0.0"
132
149
  },
133
150
  "peerDependencies": {
151
+ "@ai-sdk/react": ">=4.0.0",
134
152
  "@phosphor-icons/react": ">=2.1.0",
135
153
  "@react-three/drei": ">=10.0.0",
136
154
  "@react-three/fiber": ">=9.0.0",
155
+ "ai": ">=7.0.0",
137
156
  "motion": ">=12.0.0",
138
157
  "react": ">=18.0.0",
139
158
  "react-dom": ">=18.0.0",
@@ -144,6 +163,12 @@
144
163
  "three": ">=0.170.0"
145
164
  },
146
165
  "peerDependenciesMeta": {
166
+ "ai": {
167
+ "optional": true
168
+ },
169
+ "@ai-sdk/react": {
170
+ "optional": true
171
+ },
147
172
  "react-markdown": {
148
173
  "optional": true
149
174
  },
@@ -167,6 +192,8 @@
167
192
  }
168
193
  },
169
194
  "devDependencies": {
195
+ "@ai-sdk/react": "^4.0.50",
196
+ "@changesets/cli": "^2.31.1",
170
197
  "@chromatic-com/storybook": "^5.0.0",
171
198
  "@emotion/is-prop-valid": "^1.4.0",
172
199
  "@eslint/js": "^9",
@@ -184,6 +211,7 @@
184
211
  "@storybook/addon-themes": "^10.2.3",
185
212
  "@storybook/addon-webpack5-compiler-swc": "^4.0.2",
186
213
  "@storybook/react-webpack5": "^10.2.3",
214
+ "@storybook/test-runner": "^0.24.4",
187
215
  "@tailwindcss/cli": "^4.1.18",
188
216
  "@testing-library/dom": "^10.4.1",
189
217
  "@testing-library/jest-dom": "^6.9.1",
@@ -195,7 +223,9 @@
195
223
  "@types/react-syntax-highlighter": "^15.5.11",
196
224
  "@types/three": "^0.182.0",
197
225
  "@vitejs/plugin-react": "^5.2.0",
226
+ "ai": "^7.0.47",
198
227
  "autoprefixer": "^10.4.24",
228
+ "chromatic": "^18.1.0",
199
229
  "concurrently": "^9.2.1",
200
230
  "eslint": "^9",
201
231
  "eslint-plugin-react-hooks": "^5.2.0",
package/src/global.scss CHANGED
@@ -822,6 +822,12 @@ body {
822
822
  -moz-osx-font-smoothing: grayscale;
823
823
  }
824
824
 
825
+ @layer base {
826
+ h1, h2, h3, h4, h5, h6 {
827
+ font-family: var(--font-heading);
828
+ }
829
+ }
830
+
825
831
  /* Auto-fill input styling resets - fixes border-radius issues with auto-populated inputs */
826
832
  @layer base {
827
833
  /* Webkit browsers (Chrome, Safari, Edge) */
@@ -896,34 +902,6 @@ body {
896
902
  }
897
903
  }
898
904
 
899
- /* Heatmap flicker animation */
900
- @keyframes flicker {
901
- 0% {
902
- opacity: 0;
903
- transform: scale(1.05);
904
- }
905
- 20% {
906
- opacity: 0.3;
907
- transform: scale(1.02);
908
- }
909
- 40% {
910
- opacity: 0.1;
911
- transform: scale(1.03);
912
- }
913
- 60% {
914
- opacity: 0.7;
915
- transform: scale(1.01);
916
- }
917
- 80% {
918
- opacity: 0.4;
919
- transform: scale(1.02);
920
- }
921
- 100% {
922
- transform: scale(1);
923
- /* No opacity at 100% - let inline styles control final opacity */
924
- }
925
- }
926
-
927
905
  /* Loader shimmer animation for indeterminate linear progress */
928
906
  @keyframes shimmer {
929
907
  0% {
@@ -1023,3 +1001,18 @@ body {
1023
1001
  width: 33%;
1024
1002
  }
1025
1003
  }
1004
+
1005
+ /*
1006
+ * Segmented Progress indeterminate animation. Each cell runs the same pulse
1007
+ * with a staggered animation-delay, which reads as a lit band travelling along
1008
+ * the row — the discrete equivalent of the sweep above.
1009
+ */
1010
+ @keyframes progress-segment-chase {
1011
+ 0%,
1012
+ 100% {
1013
+ opacity: 0.15;
1014
+ }
1015
+ 50% {
1016
+ opacity: 1;
1017
+ }
1018
+ }
@@ -21,26 +21,6 @@
21
21
  the live --color-primary, so a raw override (even white) self-corrects. */
22
22
  --color-primary-contrast: oklch(from var(--color-primary) clamp(0, (0.85 - l) * 1000, 1) 0 0);
23
23
 
24
- /* DEPRECATED: the `secondary` semantic color was removed (it overlapped
25
- `neutral` and was ambiguous — see CLAUDE.md §8). These vars are now aliased
26
- to the neutral scale so any stray/consumer CSS still resolves. Remove next
27
- major. Original Tailwind-gray ramp kept for reference:
28
- 50 oklch(0.984 0.003 247.858) … 600 oklch(0.446 0.043 257.281) … 950 oklch(0.129 0.042 264.695). */
29
- --color-secondary-50: var(--color-mono-50);
30
- --color-secondary-100: var(--color-mono-100);
31
- --color-secondary-200: var(--color-mono-200);
32
- --color-secondary-300: var(--color-mono-300);
33
- --color-secondary-400: var(--color-mono-400);
34
- --color-secondary-500: var(--color-mono-500);
35
- --color-secondary-600: var(--color-mono-600);
36
- --color-secondary-700: var(--color-mono-700);
37
- --color-secondary-800: var(--color-mono-800);
38
- --color-secondary-900: var(--color-mono-900);
39
- --color-secondary-950: var(--color-mono-950);
40
-
41
- --color-secondary: var(--color-secondary-600);
42
- --color-secondary-contrast: oklch(from var(--color-secondary) clamp(0, (0.85 - l) * 1000, 1) 0 0);
43
-
44
24
  /* Danger/Error color palette - full 50-950 range */
45
25
  --color-danger-50: oklch(0.971 0.013 17.38);
46
26
  --color-danger-100: oklch(0.936 0.032 17.717);
@@ -168,13 +148,6 @@
168
148
  --color-chart-5-contrast: oklch(from var(--color-chart-5) clamp(0, (0.85 - l) * 1000, 1) 0 0);
169
149
  --color-background: var(--surface-1);
170
150
  /* near-white page canvas (rung 1) — white cards lift via the shadow ring */
171
- /* DEPRECATED (remove next major): alias of --color-surface. Use the surface ladder. */
172
- --color-background-secondary: var(--color-surface);
173
- /* DEPRECATED (remove next major): recessed/subtle fills. Migrate per-usage to --color-surface-sunken
174
- (dark values below are inverted vs. a correct sunken token, so no blind alias). */
175
- --color-background-tertiary: oklch(90% 0.002 247.839);
176
- --color-background-quaternary: oklch(85% 0.002 247.839);
177
- --color-background-quinary: oklch(80% 0.002 247.839);
178
151
  --color-background-disabled: var(--color-mono-100);
179
152
 
180
153
  --color-mono-50: oklch(98.5% 0 0);
@@ -199,6 +172,10 @@
199
172
 
200
173
  /* Font family variables */
201
174
  --font-family-base: var(--font-sans);
175
+ /* Heading font — defaults to the body font so the default render is
176
+ unchanged; themes override it independently (e.g. display face for
177
+ headings, workhorse for body). */
178
+ --font-heading: var(--font-family-base);
202
179
 
203
180
  /* ============================================
204
181
  TYPE SCALE — one --font-scale knob (like --radius-base).
@@ -261,12 +238,33 @@
261
238
  font-size, and a bare var() value resolves to the COLOR branch (silently
262
239
  dropping the font-size change, no error). The `length:` type hint forces
263
240
  the correct branch.
241
+
242
+ 🔴 Every size token below has a PAIRED --*-line-height token, consumed via
243
+ the `/[var(--…)]` modifier: `text-[length:var(--x-size)]/[var(--x-line-height)]`.
244
+ This is the same rule CONTROL TYPE SIZE states for --form-text-size-*, and it
245
+ is mandatory for the same reason. A named utility like `text-sm` compiles to
246
+ font-size AND Tailwind's paired --text-sm--line-height; an arbitrary
247
+ `text-[length:…]` carries font-size ONLY and silently falls back to
248
+ normal/1.5. These roles previously pinned the gap shut with hardcoded
249
+ literals (leading-[1.4], leading-6, leading-none), which meant a theme could
250
+ resize a title but never re-lead it — and a theme raising --card-title-size
251
+ got a title that stayed locked at line-height 1. Defaults below are the exact
252
+ values those literals resolved to, so this is a zero-visual-change addition.
264
253
  ============================================ */
265
254
  --card-title-size: var(--text-base);
266
255
  --modal-title-size: var(--text-base);
267
256
  --drawer-title-size: var(--text-base);
268
257
  --page-heading-title-size: var(--text-xl);
269
258
  --section-title-size: var(--text-base);
259
+ /* Unitless where the old literal was unitless (1.4/1.5 scale with the font),
260
+ and 1.5rem where it was leading-6 (a fixed 6 x --spacing step, which did
261
+ NOT scale with the title size) — preserving each role's existing behaviour
262
+ rather than silently converting one model into the other. */
263
+ --card-title-line-height: 1;
264
+ --modal-title-line-height: 1.5rem;
265
+ --drawer-title-line-height: 1.5rem;
266
+ --page-heading-title-line-height: 1.4;
267
+ --section-title-line-height: 1.5;
270
268
  /* AlertDialog has no title style of its own — it renders Modal.Title
271
269
  directly, so it already inherits --modal-title-size above. */
272
270
 
@@ -281,6 +279,15 @@
281
279
  --kpi-value-size-sm: var(--text-xl);
282
280
  --kpi-value-size-md: var(--text-2xl);
283
281
  --kpi-value-size-lg: var(--text-3xl);
282
+ /* Paired leading, per the rule above. Unitless so a themed value-size still
283
+ leads proportionally — these are big display numerals where a fixed rem
284
+ leading would clip descenders the moment a theme scaled the size up. */
285
+ --metric-value-line-height-sm: 1.4;
286
+ --metric-value-line-height-md: 1.2;
287
+ --metric-value-line-height-lg: 1.2;
288
+ --kpi-value-line-height-sm: 1.4;
289
+ --kpi-value-line-height-md: 1.333;
290
+ --kpi-value-line-height-lg: 1.2;
284
291
 
285
292
  /* Form element variables — fixed px so they don't scale with root font-size */
286
293
  --form-min-h-sm: 32px;
@@ -435,6 +442,17 @@
435
442
  /* Overlays (1.5x base = 18px, capped; tooltip stays 1x but is now ALSO
436
443
  capped — same 1x multiplier as before, just no longer unbounded) */
437
444
  --dropdown-radius: min(calc(var(--radius-base) * 1.5), var(--surface-radius-cap-sm));
445
+ /* The form listbox panel (Select/Combobox/InputTag/Mention) is the same kind of
446
+ anchored menu panel as the one above — Mention literally renders MenuItem rows
447
+ in it — so it ALIASES --dropdown-radius rather than restating the formula. An
448
+ alias, not a copy: `precision.css` overrides --dropdown-radius alone, and two
449
+ parallel formulas would have left form listboxes at a different radius than the
450
+ menus they sit beside. Override this token to deliberately split the two.
451
+ 🔴 It used to paint --form-radius, which is `var(--radius-base)`: the UNCAPPED
452
+ CONTROL token, on a padded content container — the exact bypass the caps above
453
+ exist to prevent (on `ember`, base 24px, a 24px curve against 4px of padding).
454
+ Never route a panel through a control token. */
455
+ --form-dropdown-radius: var(--dropdown-radius);
438
456
  --tooltip-radius: min(var(--radius-base), var(--surface-radius-cap-xs));
439
457
  --codeblock-radius: min(calc(var(--radius-base) * 1.5), var(--surface-radius-cap-sm));
440
458
  --popover-radius: min(calc(var(--radius-base) * 1.5), var(--surface-radius-cap-sm));
@@ -453,6 +471,17 @@
453
471
  /* Owns its own border/bg/shadow with compact (~12-20px) paddings, closer
454
472
  to Alert/Dropdown's profile than Card's, despite living in data-display. */
455
473
  --gantt-chart-radius: min(calc(var(--radius-base) * 1.5), var(--surface-radius-cap-sm));
474
+ /* AgentRequest: the composer-slot panel. Compact chrome (~14px padding), so
475
+ it takes the sm cap like Dropdown/Popover/Toast — NOT --card-radius. It
476
+ used to borrow that token, but Card earns the lg cap by having 24px of
477
+ padding to absorb the curve; at 14px the same 32px radius visibly crowds
478
+ the header row (ember, --radius-base: 24px). */
479
+ --agent-request-radius: min(calc(var(--radius-base) * 1.5), var(--surface-radius-cap-sm));
480
+ /* The payload well INSIDE that panel (the command/diff being approved) has
481
+ only ~10px of padding, so it needs the tight xs cap — same formula and
482
+ reasoning as --tooltip-radius, one tier below its own container. A bare
483
+ var(--radius-base) here rendered a 24px curve on a 10px-padded box. */
484
+ --agent-request-well-radius: min(var(--radius-base), var(--surface-radius-cap-xs));
456
485
 
457
486
  /* Surfaces (1.5x base = 18px, capped) */
458
487
  --card-radius: min(calc(var(--radius-base) * 1.5), var(--surface-radius-cap-lg));
@@ -505,17 +534,29 @@
505
534
  Segmented) — 0.75x = 6px at the 8px base, and now it tracks a themed base
506
535
  (was a hardcoded 6px literal that silently ignored --radius-base). Uncapped:
507
536
  a large base takes Badge fully pill, which CSS auto-clamps to 50%.
508
- Paddings are fixed px (like --button-px-*/--form-px-*), overridable per theme
537
+ Paddings are fixed px (like --button-px-* / --form-px-*), overridable per theme
509
538
  so a spacious theme can grow the chip tier alongside its controls. py drives
510
- height together with the text line-height + 1px border (sm: 16+0+2=18, md:
539
+ height together with the text line-height + 1px border (sm: 16+2+2=20, md:
511
540
  16+4+2=22). pill-px must clear the rounded-full cap so text is not eaten
512
- by the curve. */
541
+ by the curve.
542
+
543
+ RADIUS IS PER SIZE. A single shared radius does not survive down the ramp:
544
+ the curve starts `radius` in from each edge while text starts `px + border`
545
+ in, so the smaller box — which has LESS padding to absorb the curve — is the
546
+ one whose glyphs end up sitting inside it. At the shared 0.75x (6px) sm's
547
+ text started at 5px against a 6px curve; 0.5x (4px) clears it. Same
548
+ curve-vs-padding collision the --surface-radius-cap-* ceilings solve for
549
+ containers, one tier down. Both still derive from --radius-base so a themed
550
+ base scales them; --badge-radius stays the md value (and the name a theme
551
+ already overrides), with --badge-radius-md aliasing it. */
513
552
  --badge-radius: calc(var(--radius-base) * 0.75);
553
+ --badge-radius-sm: calc(var(--radius-base) * 0.5);
554
+ --badge-radius-md: var(--badge-radius);
514
555
  --badge-px-sm: 4px;
515
556
  --badge-px-md: 6px;
516
- --badge-py-sm: 0px;
557
+ --badge-py-sm: 1px;
517
558
  --badge-py-md: 2px;
518
- --badge-pill-px-sm: 8px;
559
+ --badge-pill-px-sm: 10px;
519
560
  --badge-pill-px-md: 10px;
520
561
 
521
562
  /* Pill (chip tier) — px/py per size. rounded-full is intrinsic (no radius
@@ -599,6 +640,37 @@
599
640
  --metric-content-p-lg: 20px;
600
641
  /* from p-5 */
601
642
 
643
+ /* ============================================
644
+ MOTION SYSTEM — the transition-duration tier, tokenised.
645
+
646
+ Unlike the type utilities, Tailwind's duration-* does NOT route through a
647
+ theme variable: `duration-200` compiles to a literal `transition-duration:
648
+ .2s`, so a theme had no way to make the whole UI quicker or calmer. These
649
+ five tokens cover every duration the library actually uses; consume them as
650
+ `duration-[var(--motion-duration-base)]`.
651
+
652
+ 🔴 Values are the EXACT literals they replace — this is a tokenisation, not
653
+ a retune. The names label the existing tiers rather than proposing new
654
+ timings, so a theme opts into a different feel by overriding a token; the
655
+ default rendering is byte-identical.
656
+
657
+ 🔴 There is deliberately NO --motion-ease-* family. Easing ALREADY routes
658
+ through overridable variables — `ease-out` compiles to
659
+ `transition-timing-function: var(--ease-out)`, same as `tracking-tight` ->
660
+ var(--tracking-tight). A theme retunes --ease-out/--ease-in/--ease-in-out
661
+ directly; adding a parallel --motion-ease-* namespace would give the same
662
+ property two competing knobs.
663
+
664
+ 🔴 Scope is CSS transitions only. motion/react animations take durations as
665
+ JS numbers (seconds) in .animations.ts and cannot read a CSS variable — see
666
+ interaction.animations.ts for the shared press/hover springs, which stay the
667
+ single source of truth for those. Don't mirror these tokens into JS. */
668
+ --motion-duration-fast: 150ms;
669
+ --motion-duration-base: 200ms;
670
+ --motion-duration-slow: 300ms;
671
+ --motion-duration-slower: 400ms;
672
+ --motion-duration-slowest: 500ms;
673
+
602
674
  /* Segmented inner offset — drives wrapper padding AND inner radius so
603
675
  the sliding background + items stay concentric with the outer shell.
604
676
  border (1px) + padding (--segmented-padding) = total inset. */
@@ -606,6 +678,25 @@
606
678
  /* 2px */
607
679
  --segmented-inner-radius: calc(var(--segmented-radius) - var(--segmented-padding) - 1px);
608
680
 
681
+ /* Menu panel inner offset — same model as --segmented-* above: one padding
682
+ token drives BOTH the panel's own padding AND the outer corner radius of
683
+ its first/last row, so the rows stay concentric with the panel instead of
684
+ bulging past its curve. border (1px) + padding (--dropdown-padding) = total
685
+ inset. Consumed by Dropdown's menu, ContextMenu's body + submenu body, and
686
+ MenuItem's first:/last: rules — change the padding here, never at a call
687
+ site, or the two drift apart. Interior rows keep their own flat radius;
688
+ only the two rows that meet the panel's corners take this one. */
689
+ --dropdown-padding: 0.25rem;
690
+ /* 4px */
691
+ --dropdown-inner-radius: calc(var(--dropdown-radius) - var(--dropdown-padding) - 1px);
692
+
693
+ /* Same pair for the FORM listbox panel, aliasing the menu's by default (see
694
+ --form-dropdown-radius). Named separately so a theme CAN split the two — and so
695
+ the inner radius always derives from the panel it actually sits in, whichever
696
+ way that goes. */
697
+ --form-dropdown-padding: var(--dropdown-padding);
698
+ --form-dropdown-inner-radius: calc(var(--form-dropdown-radius) - var(--form-dropdown-padding) - 1px);
699
+
609
700
  /* Glass effect gradient variables */
610
701
  --glass-gradient-outer: linear-gradient(to bottom,
611
702
  rgba(250, 250, 250, 0.8) 0%,
@@ -634,7 +725,7 @@
634
725
  --nav-item-radius: var(--radius-base);
635
726
 
636
727
  /* Modal and Drawer */
637
- --overlay-bg: rgba(0, 0, 0, 0.65);
728
+ --overlay-bg: rgba(0, 0, 0, 0.75);
638
729
  --overlay-blur: 8px;
639
730
  --color-scale-background: oklch(0% 0 0);
640
731
  /* backdrop behind scaled content */
@@ -892,7 +983,6 @@
892
983
  --color-success: var(--color-success-400);
893
984
  --color-warning: var(--color-warning-400);
894
985
  --color-danger: var(--color-danger-400);
895
- --color-secondary: var(--color-secondary-400);
896
986
  /* Neutral fill flips to a light chip (dark ink text via auto contrast) */
897
987
  --color-mono: var(--color-mono-200);
898
988
 
@@ -903,7 +993,6 @@
903
993
  --color-danger-contrast: oklch(from var(--color-danger) clamp(0, (0.85 - l) * 1000, 1) 0 0);
904
994
  --color-success-contrast: oklch(from var(--color-success) clamp(0, (0.85 - l) * 1000, 1) 0 0);
905
995
  --color-warning-contrast: oklch(from var(--color-warning) clamp(0, (0.85 - l) * 1000, 1) 0 0);
906
- --color-secondary-contrast: oklch(from var(--color-secondary) clamp(0, (0.85 - l) * 1000, 1) 0 0);
907
996
  --color-mono-contrast: oklch(from var(--color-mono) clamp(0, (0.85 - l) * 1000, 1) 0 0);
908
997
 
909
998
  /* Background colors - dark equivalents */
@@ -926,12 +1015,6 @@
926
1015
  --color-surface-hover: oklch(100% 0 0 / 0.07);
927
1016
  --color-background: var(--surface-1);
928
1017
  /* rung 1 — dark floor */
929
- /* DEPRECATED (remove next major): alias of --color-surface. */
930
- --color-background-secondary: var(--color-surface);
931
- /* DEPRECATED (remove next major): migrate per-usage to --color-surface-sunken / surface ladder. */
932
- --color-background-tertiary: oklch(22% 0 0);
933
- --color-background-quaternary: oklch(26% 0 0);
934
- --color-background-quinary: oklch(30% 0 0);
935
1018
  --color-background-disabled: var(--color-mono-800);
936
1019
 
937
1020
  /* Scale backdrop — sits behind scaled content, darker than the #171717 floor */
@@ -0,0 +1,119 @@
1
+ import { readdirSync, readFileSync } from "node:fs";
2
+ import { join, resolve } from "node:path";
3
+
4
+ import { describe, expect, it } from "vitest";
5
+
6
+ const themeCss = readFileSync(
7
+ resolve(process.cwd(), "src/styles/theme.css"),
8
+ "utf8",
9
+ );
10
+
11
+ /**
12
+ * CSS comments do NOT nest and are terminated by the FIRST `*​/`. Writing a
13
+ * token glob like `--button-px-*` immediately before a `/` (e.g. the shorthand
14
+ * `--button-px-*​/--form-px-*`) therefore closes the comment early: the prose
15
+ * that follows is parsed as CSS, and it swallows the next declaration up to the
16
+ * first `;` — silently deleting a token that still *looks* defined in source.
17
+ *
18
+ * That is exactly how `--badge-radius` went missing (every non-pill Badge
19
+ * rendered with square corners, because `border-radius: var(--badge-radius)`
20
+ * had no definition to resolve). Stripping comments the way a real parser does
21
+ * — non-greedy, first-terminator-wins — leaves a stray `*​/` behind whenever it
22
+ * happens, which is what these tests assert on.
23
+ */
24
+ const stripComments = (css: string) => css.replace(/\/\*[\s\S]*?\*\//g, "");
25
+
26
+ describe("theme.css", () => {
27
+ it("has no comment that terminates early", () => {
28
+ const strays = stripComments(themeCss)
29
+ .split("\n")
30
+ .map((line, i) => ({ line: line.trim(), number: i + 1 }))
31
+ .filter(({ line }) => line.includes("*/"));
32
+
33
+ expect(strays).toEqual([]);
34
+ });
35
+
36
+ it("defines every custom property the chip tier consumes", () => {
37
+ // Split on declaration boundaries and keep only chunks that *start* with a
38
+ // custom property, the way a parser sees them. Matching `--x:` anywhere
39
+ // would also match the leaked prose of an early-terminated comment — i.e.
40
+ // it would report the very token that got swallowed as still defined.
41
+ const declared = new Set(
42
+ stripComments(themeCss)
43
+ .split(/[;{}]/)
44
+ .map((chunk) => /^\s*(--[a-z0-9-]+)\s*:/.exec(chunk)?.[1])
45
+ .filter((name): name is string => name !== undefined),
46
+ );
47
+
48
+ // --badge-radius is the token the early-terminated comment ate; the rest
49
+ // are its immediate neighbours, which pin the boundaries of the damage.
50
+ for (const token of [
51
+ "--badge-radius",
52
+ "--badge-radius-sm",
53
+ "--badge-radius-md",
54
+ "--badge-px-sm",
55
+ "--badge-py-sm",
56
+ "--badge-pill-px-sm",
57
+ "--pill-px-sm",
58
+ "--tag-px-sm",
59
+ "--kbd-px-sm",
60
+ ]) {
61
+ expect(declared).toContain(token);
62
+ }
63
+ });
64
+
65
+ /**
66
+ * A named utility like `text-sm` compiles to font-size AND Tailwind's paired
67
+ * `--text-sm--line-height`. An arbitrary `text-[length:var(--x)]` carries
68
+ * font-size ONLY — leading silently falls back to normal/1.5. So every
69
+ * per-role size token must be consumed with the `/[var(--…)]` modifier, or a
70
+ * theme can resize a title but never re-lead it.
71
+ *
72
+ * This scans real source rather than a hardcoded list, so a NEW size token
73
+ * that ships without its line-height partner fails here immediately.
74
+ */
75
+ it("pairs every per-role font-size token with a line-height token", () => {
76
+ const declared = new Set(
77
+ stripComments(themeCss)
78
+ .split(/[;{}]/)
79
+ .map((chunk) => /^\s*(--[a-z0-9-]+)\s*:/.exec(chunk)?.[1])
80
+ .filter((name): name is string => name !== undefined),
81
+ );
82
+
83
+ const collectThemeFiles = (dir: string): string[] =>
84
+ readdirSync(dir, { withFileTypes: true }).flatMap((entry) => {
85
+ const path = join(dir, entry.name);
86
+ if (entry.isDirectory()) return collectThemeFiles(path);
87
+ return entry.name.endsWith(".theme.ts") ? [path] : [];
88
+ });
89
+
90
+ const themeFiles = collectThemeFiles(
91
+ resolve(process.cwd(), "src/components"),
92
+ );
93
+
94
+ const unpaired: string[] = [];
95
+ const undeclaredLineHeight: string[] = [];
96
+
97
+ for (const file of themeFiles) {
98
+ const source = readFileSync(file, "utf8");
99
+ // Each `text-[length:var(--x)]` occurrence, plus whatever directly follows,
100
+ // so we can tell a paired `/[var(--y)]` from a bare size.
101
+ for (const match of source.matchAll(
102
+ /text-\[length:var\((--[a-z0-9-]+)\)\](\/\[var\((--[a-z0-9-]+)\)\])?/g,
103
+ )) {
104
+ const [, sizeToken, pairing, lineHeightToken] = match;
105
+ if (!pairing) {
106
+ unpaired.push(`${file}: ${sizeToken}`);
107
+ continue;
108
+ }
109
+ if (!declared.has(lineHeightToken)) {
110
+ undeclaredLineHeight.push(`${file}: ${lineHeightToken}`);
111
+ }
112
+ expect(declared).toContain(sizeToken);
113
+ }
114
+ }
115
+
116
+ expect(unpaired).toEqual([]);
117
+ expect(undeclaredLineHeight).toEqual([]);
118
+ });
119
+ });
@@ -9,6 +9,11 @@
9
9
  * components paint, and follows the active theme + dark mode automatically:
10
10
  * the monochrome base theme aliases --color-primary -> -900, a colored theme
11
11
  * (e.g. iris) sets it -> -600. Numbered utilities (bg-primary-600) are unchanged.
12
+ *
13
+ * `contrast` on each semantic color is the auto-derived foreground for a FILLED
14
+ * surface of that color (text-primary-contrast on bg-primary) — see CLAUDE.md §3.
15
+ * It is derived in pure CSS from the live base var, so it tracks any theme and
16
+ * both modes; never substitute a hardcoded text-white.
12
17
  */
13
18
 
14
19
  module.exports = {
@@ -27,7 +32,8 @@ module.exports = {
27
32
  800: 'var(--color-primary-800)',
28
33
  900: 'var(--color-primary-900)',
29
34
  950: 'var(--color-primary-950)',
30
- DEFAULT: 'var(--color-primary)'
35
+ DEFAULT: 'var(--color-primary)',
36
+ contrast: 'var(--color-primary-contrast)'
31
37
  },
32
38
  danger: {
33
39
  50: 'var(--color-danger-50)',
@@ -41,7 +47,8 @@ module.exports = {
41
47
  800: 'var(--color-danger-800)',
42
48
  900: 'var(--color-danger-900)',
43
49
  950: 'var(--color-danger-950)',
44
- DEFAULT: 'var(--color-danger)'
50
+ DEFAULT: 'var(--color-danger)',
51
+ contrast: 'var(--color-danger-contrast)'
45
52
  },
46
53
  success: {
47
54
  50: 'var(--color-success-50)',
@@ -55,7 +62,8 @@ module.exports = {
55
62
  800: 'var(--color-success-800)',
56
63
  900: 'var(--color-success-900)',
57
64
  950: 'var(--color-success-950)',
58
- DEFAULT: 'var(--color-success)'
65
+ DEFAULT: 'var(--color-success)',
66
+ contrast: 'var(--color-success-contrast)'
59
67
  },
60
68
  warning: {
61
69
  50: 'var(--color-warning-50)',
@@ -69,7 +77,8 @@ module.exports = {
69
77
  800: 'var(--color-warning-800)',
70
78
  900: 'var(--color-warning-900)',
71
79
  950: 'var(--color-warning-950)',
72
- DEFAULT: 'var(--color-warning)'
80
+ DEFAULT: 'var(--color-warning)',
81
+ contrast: 'var(--color-warning-contrast)'
73
82
  },
74
83
  // The gray/neutral role. Named `mono` (not `neutral`) on purpose:
75
84
  // mapping `neutral` here would override Tailwind's own built-in neutral
@@ -87,22 +96,8 @@ module.exports = {
87
96
  800: 'var(--color-mono-800)',
88
97
  900: 'var(--color-mono-900)',
89
98
  950: 'var(--color-mono-950)',
90
- DEFAULT: 'var(--color-mono)'
91
- },
92
- // DEPRECATED (remove next major): alias of the gray scale. Prefer `mono`.
93
- secondary: {
94
- 50: 'var(--color-secondary-50)',
95
- 100: 'var(--color-secondary-100)',
96
- 200: 'var(--color-secondary-200)',
97
- 300: 'var(--color-secondary-300)',
98
- 400: 'var(--color-secondary-400)',
99
- 500: 'var(--color-secondary-500)',
100
- 600: 'var(--color-secondary-600)',
101
- 700: 'var(--color-secondary-700)',
102
- 800: 'var(--color-secondary-800)',
103
- 900: 'var(--color-secondary-900)',
104
- 950: 'var(--color-secondary-950)',
105
- DEFAULT: 'var(--color-secondary)'
99
+ DEFAULT: 'var(--color-mono)',
100
+ contrast: 'var(--color-mono-contrast)'
106
101
  },
107
102
  text: {
108
103
  primary: 'var(--color-text-primary)',
@@ -127,6 +122,21 @@ module.exports = {
127
122
  secondary: 'var(--color-border-secondary)',
128
123
  hover: 'var(--color-border-hover)'
129
124
  },
125
+ // Categorical chart series palette + the unfilled-track color, for consumers
126
+ // building their own visuals alongside @flikk/ui/charts (charts themselves are
127
+ // `config`-driven and never take a className — see CLAUDE.md §19).
128
+ // NOTE: the matching --color-chart-N-contrast tokens are deliberately NOT mapped
129
+ // here — they are declared in @theme and unreferenced by library source, so
130
+ // Tailwind prunes them from the light block of the shipped styles.css and they
131
+ // resolve only under .dark. Map them once they are defined outside @theme.
132
+ chart: {
133
+ 1: 'var(--color-chart-1)',
134
+ 2: 'var(--color-chart-2)',
135
+ 3: 'var(--color-chart-3)',
136
+ 4: 'var(--color-chart-4)',
137
+ 5: 'var(--color-chart-5)',
138
+ track: 'var(--color-chart-track)'
139
+ },
130
140
  dark: 'var(--color-mono-950)'
131
141
  },
132
142
  fontFamily: {