@trinityui/design-system 2.11.1 → 2.13.0

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 (515) hide show
  1. package/CHANGELOG.md +2155 -0
  2. package/CONTRIBUTING.md +180 -69
  3. package/LICENSE +21 -0
  4. package/MIGRATION.md +505 -28
  5. package/README.md +281 -120
  6. package/dist/IllustratedMessage.js +546 -1341
  7. package/dist/accessibility.d.ts +596 -18
  8. package/dist/accessibility.d.ts.map +1 -1
  9. package/dist/accessibility.js +458 -0
  10. package/dist/app-shell.js +18458 -10385
  11. package/dist/assets/index.d.ts +1 -1
  12. package/dist/charts.js +8507 -6059
  13. package/dist/color-contrast.d.ts +35 -0
  14. package/dist/color-contrast.d.ts.map +1 -0
  15. package/dist/commonjs-helpers.js +8 -0
  16. package/dist/component-color-references.d.ts +175 -0
  17. package/dist/component-color-references.d.ts.map +1 -0
  18. package/dist/components/AI/AIActions.d.ts +72 -12
  19. package/dist/components/AI/AIActions.d.ts.map +1 -1
  20. package/dist/components/AI/AIAvatar.d.ts +31 -3
  21. package/dist/components/AI/AIAvatar.d.ts.map +1 -1
  22. package/dist/components/AI/AIChainOfThought.d.ts +159 -77
  23. package/dist/components/AI/AIChainOfThought.d.ts.map +1 -1
  24. package/dist/components/AI/AIChainOfThought.types.d.ts +292 -40
  25. package/dist/components/AI/AIChainOfThought.types.d.ts.map +1 -1
  26. package/dist/components/AI/AIChainOfThought.utils.d.ts +25 -7
  27. package/dist/components/AI/AIChainOfThought.utils.d.ts.map +1 -1
  28. package/dist/components/AI/AIChat.d.ts +12 -0
  29. package/dist/components/AI/AIChat.d.ts.map +1 -1
  30. package/dist/components/AI/AIChatWelcome.d.ts +254 -0
  31. package/dist/components/AI/AIChatWelcome.d.ts.map +1 -0
  32. package/dist/components/AI/AIClarificationPrompt.d.ts +134 -0
  33. package/dist/components/AI/AIClarificationPrompt.d.ts.map +1 -0
  34. package/dist/components/AI/AIConfidenceBadge.d.ts +117 -0
  35. package/dist/components/AI/AIConfidenceBadge.d.ts.map +1 -0
  36. package/dist/components/AI/AIConfigContext.d.ts +100 -0
  37. package/dist/components/AI/AIConfigContext.d.ts.map +1 -0
  38. package/dist/components/AI/AIConfigProvider.d.ts +66 -0
  39. package/dist/components/AI/AIConfigProvider.d.ts.map +1 -0
  40. package/dist/components/AI/AIContainer.d.ts +80 -11
  41. package/dist/components/AI/AIContainer.d.ts.map +1 -1
  42. package/dist/components/AI/AIExplainability.d.ts +39 -5
  43. package/dist/components/AI/AIExplainability.d.ts.map +1 -1
  44. package/dist/components/AI/AIFeedbackControl.d.ts +113 -0
  45. package/dist/components/AI/AIFeedbackControl.d.ts.map +1 -0
  46. package/dist/components/AI/AIFeedbackForm.d.ts +117 -0
  47. package/dist/components/AI/AIFeedbackForm.d.ts.map +1 -0
  48. package/dist/components/AI/AIFeedbackHostContext.d.ts +16 -0
  49. package/dist/components/AI/AIFeedbackHostContext.d.ts.map +1 -0
  50. package/dist/components/AI/AILabel.d.ts +39 -6
  51. package/dist/components/AI/AILabel.d.ts.map +1 -1
  52. package/dist/components/AI/AIMessage.d.ts +337 -42
  53. package/dist/components/AI/AIMessage.d.ts.map +1 -1
  54. package/dist/components/AI/AIPlanReview.d.ts +194 -0
  55. package/dist/components/AI/AIPlanReview.d.ts.map +1 -0
  56. package/dist/components/AI/AIQueryDisclosure.d.ts +119 -0
  57. package/dist/components/AI/AIQueryDisclosure.d.ts.map +1 -0
  58. package/dist/components/AI/AIRelatedQuestions.d.ts +50 -11
  59. package/dist/components/AI/AIRelatedQuestions.d.ts.map +1 -1
  60. package/dist/components/AI/AIResponseRenderer.d.ts +133 -21
  61. package/dist/components/AI/AIResponseRenderer.d.ts.map +1 -1
  62. package/dist/components/AI/AIResponseSourcesContext.d.ts +83 -0
  63. package/dist/components/AI/AIResponseSourcesContext.d.ts.map +1 -0
  64. package/dist/components/AI/AIReviewItem.d.ts +142 -0
  65. package/dist/components/AI/AIReviewItem.d.ts.map +1 -0
  66. package/dist/components/AI/AISourceChip.d.ts +135 -0
  67. package/dist/components/AI/AISourceChip.d.ts.map +1 -0
  68. package/dist/components/AI/AISources.d.ts +81 -11
  69. package/dist/components/AI/AISources.d.ts.map +1 -1
  70. package/dist/components/AI/AISourcesPanel.d.ts +43 -7
  71. package/dist/components/AI/AISourcesPanel.d.ts.map +1 -1
  72. package/dist/components/AI/AITextBlock.d.ts +104 -16
  73. package/dist/components/AI/AITextBlock.d.ts.map +1 -1
  74. package/dist/components/AI/AITextBlock.parser.d.ts +153 -0
  75. package/dist/components/AI/AITextBlock.parser.d.ts.map +1 -0
  76. package/dist/components/AI/AIVerificationBadge.d.ts +94 -0
  77. package/dist/components/AI/AIVerificationBadge.d.ts.map +1 -0
  78. package/dist/components/AI/AIVisuals.d.ts +92 -23
  79. package/dist/components/AI/AIVisuals.d.ts.map +1 -1
  80. package/dist/components/AI/AIVoiceInput.d.ts +42 -11
  81. package/dist/components/AI/AIVoiceInput.d.ts.map +1 -1
  82. package/dist/components/AI/AIVoiceMode.d.ts +16 -2
  83. package/dist/components/AI/AIVoiceMode.d.ts.map +1 -1
  84. package/dist/components/AI/BlockErrorBoundary.d.ts +77 -0
  85. package/dist/components/AI/BlockErrorBoundary.d.ts.map +1 -0
  86. package/dist/components/AI/ChatHeader.d.ts +41 -4
  87. package/dist/components/AI/ChatHeader.d.ts.map +1 -1
  88. package/dist/components/AI/ChatHistoryList.d.ts +25 -12
  89. package/dist/components/AI/ChatHistoryList.d.ts.map +1 -1
  90. package/dist/components/AI/ChatThread.d.ts +263 -13
  91. package/dist/components/AI/ChatThread.d.ts.map +1 -1
  92. package/dist/components/AI/InThreadContext.d.ts +14 -0
  93. package/dist/components/AI/InThreadContext.d.ts.map +1 -0
  94. package/dist/components/AI/InsightEngine.d.ts +270 -46
  95. package/dist/components/AI/InsightEngine.d.ts.map +1 -1
  96. package/dist/components/AI/InsightEngineInput.d.ts +47 -4
  97. package/dist/components/AI/InsightEngineInput.d.ts.map +1 -1
  98. package/dist/components/AI/MessageActionButton.d.ts +72 -0
  99. package/dist/components/AI/MessageActionButton.d.ts.map +1 -0
  100. package/dist/components/AI/QueryInput.d.ts.map +1 -1
  101. package/dist/components/AI/UserAvatar.d.ts +50 -4
  102. package/dist/components/AI/UserAvatar.d.ts.map +1 -1
  103. package/dist/components/AI/UserMessage.d.ts +32 -3
  104. package/dist/components/AI/UserMessage.d.ts.map +1 -1
  105. package/dist/components/AI/blockRendererContext.d.ts +64 -0
  106. package/dist/components/AI/blockRendererContext.d.ts.map +1 -0
  107. package/dist/components/AI/hitlBlockRenderers.d.ts +48 -0
  108. package/dist/components/AI/hitlBlockRenderers.d.ts.map +1 -0
  109. package/dist/components/AI/index.d.ts +23 -6
  110. package/dist/components/AI/index.d.ts.map +1 -1
  111. package/dist/components/AI/moleculeBlockRenderers.d.ts +15 -0
  112. package/dist/components/AI/moleculeBlockRenderers.d.ts.map +1 -0
  113. package/dist/components/AI/planReviewBlockRenderer.d.ts +8 -0
  114. package/dist/components/AI/planReviewBlockRenderer.d.ts.map +1 -0
  115. package/dist/components/AI/strings/defaults.d.ts +31 -0
  116. package/dist/components/AI/strings/defaults.d.ts.map +1 -0
  117. package/dist/components/AI/tokens.d.ts +185 -20
  118. package/dist/components/AI/tokens.d.ts.map +1 -1
  119. package/dist/components/AI/types/hitl.d.ts +2294 -0
  120. package/dist/components/AI/types/hitl.d.ts.map +1 -0
  121. package/dist/components/AI/types/index.d.ts +2 -1
  122. package/dist/components/AI/types/index.d.ts.map +1 -1
  123. package/dist/components/AI/types/response.d.ts +428 -40
  124. package/dist/components/AI/types/response.d.ts.map +1 -1
  125. package/dist/components/AI/useBlockSources.d.ts +67 -0
  126. package/dist/components/AI/useBlockSources.d.ts.map +1 -0
  127. package/dist/components/AI/useBrowserVoiceMode.d.ts +31 -2
  128. package/dist/components/AI/useBrowserVoiceMode.d.ts.map +1 -1
  129. package/dist/components/AI/useWelcomeComposerHandoff.d.ts +30 -0
  130. package/dist/components/AI/useWelcomeComposerHandoff.d.ts.map +1 -0
  131. package/dist/components/AI/utils/alphaIndex.d.ts +19 -0
  132. package/dist/components/AI/utils/alphaIndex.d.ts.map +1 -0
  133. package/dist/components/AI/utils/blockReady.d.ts +54 -0
  134. package/dist/components/AI/utils/blockReady.d.ts.map +1 -0
  135. package/dist/components/AI/utils/blocks.d.ts +28 -0
  136. package/dist/components/AI/utils/blocks.d.ts.map +1 -0
  137. package/dist/components/AI/utils/confidence.d.ts +182 -0
  138. package/dist/components/AI/utils/confidence.d.ts.map +1 -0
  139. package/dist/components/AI/utils/filters.d.ts +31 -0
  140. package/dist/components/AI/utils/filters.d.ts.map +1 -0
  141. package/dist/components/AI/utils/responseText.d.ts +8 -0
  142. package/dist/components/AI/utils/responseText.d.ts.map +1 -0
  143. package/dist/components/AI/utils/sources.d.ts +110 -0
  144. package/dist/components/AI/utils/sources.d.ts.map +1 -0
  145. package/dist/components/AIDigestCard/AIDigestCard.d.ts.map +1 -1
  146. package/dist/components/AIDigestCard/types.d.ts +42 -5
  147. package/dist/components/AIDigestCard/types.d.ts.map +1 -1
  148. package/dist/components/AppLayout/AIFab.d.ts +33 -6
  149. package/dist/components/AppLayout/AIFab.d.ts.map +1 -1
  150. package/dist/components/AppLayout/AIFabLayout.deprecated.d.ts.map +1 -1
  151. package/dist/components/AppLayout/AppLayout.d.ts +135 -7
  152. package/dist/components/AppLayout/AppLayout.d.ts.map +1 -1
  153. package/dist/components/AppLayout/InsightEnginePanel.d.ts +315 -21
  154. package/dist/components/AppLayout/InsightEnginePanel.d.ts.map +1 -1
  155. package/dist/components/AppLayout/ResizablePanel.d.ts +145 -8
  156. package/dist/components/AppLayout/ResizablePanel.d.ts.map +1 -1
  157. package/dist/components/AppLayout/ThreadHistorySidebar.d.ts +6 -0
  158. package/dist/components/AppLayout/ThreadHistorySidebar.d.ts.map +1 -1
  159. package/dist/components/AppLayout/index.d.ts +3 -3
  160. package/dist/components/AppLayout/index.d.ts.map +1 -1
  161. package/dist/components/AppLayout/insightEnginePanel.demo.d.ts +32 -0
  162. package/dist/components/AppLayout/insightEnginePanel.demo.d.ts.map +1 -0
  163. package/dist/components/AppLayout/panelPropsPath.d.ts +26 -0
  164. package/dist/components/AppLayout/panelPropsPath.d.ts.map +1 -0
  165. package/dist/components/AppLayout/panelResizeTransition.d.ts +49 -0
  166. package/dist/components/AppLayout/panelResizeTransition.d.ts.map +1 -0
  167. package/dist/components/AppLayout/toChatThreadMessage.d.ts +40 -0
  168. package/dist/components/AppLayout/toChatThreadMessage.d.ts.map +1 -0
  169. package/dist/components/AssessmentDrawer/AssessmentDrawer.d.ts +5 -1
  170. package/dist/components/AssessmentDrawer/AssessmentDrawer.d.ts.map +1 -1
  171. package/dist/components/AuditDrawer/AuditDrawer.d.ts +4 -3
  172. package/dist/components/AuditDrawer/AuditDrawer.d.ts.map +1 -1
  173. package/dist/components/AuditDrawer/index.d.ts +1 -1
  174. package/dist/components/AuditDrawer/index.d.ts.map +1 -1
  175. package/dist/components/AuditDrawer/types.d.ts +39 -5
  176. package/dist/components/AuditDrawer/types.d.ts.map +1 -1
  177. package/dist/components/Autocomplete/Autocomplete.d.ts +6 -1
  178. package/dist/components/Autocomplete/Autocomplete.d.ts.map +1 -1
  179. package/dist/components/BulkActionDock/BulkActionDock.d.ts.map +1 -1
  180. package/dist/components/Carousel/Carousel.d.ts +10 -2
  181. package/dist/components/Carousel/Carousel.d.ts.map +1 -1
  182. package/dist/components/Charts/AreaChart.d.ts.map +1 -1
  183. package/dist/components/Charts/BarChart.d.ts.map +1 -1
  184. package/dist/components/Charts/ChartWrapper.d.ts.map +1 -1
  185. package/dist/components/Charts/ComposedChart.d.ts.map +1 -1
  186. package/dist/components/Charts/CustomLegend.d.ts +11 -2
  187. package/dist/components/Charts/CustomLegend.d.ts.map +1 -1
  188. package/dist/components/Charts/LineChart.d.ts.map +1 -1
  189. package/dist/components/Charts/PieChart.d.ts.map +1 -1
  190. package/dist/components/Charts/RadialChart.d.ts.map +1 -1
  191. package/dist/components/Charts/ScatterChart.d.ts.map +1 -1
  192. package/dist/components/Charts/Sparkline.d.ts.map +1 -1
  193. package/dist/components/Charts/gaugeGeometry.d.ts +35 -0
  194. package/dist/components/Charts/gaugeGeometry.d.ts.map +1 -0
  195. package/dist/components/Charts/highcharts.d.ts +23 -0
  196. package/dist/components/Charts/highcharts.d.ts.map +1 -0
  197. package/dist/components/Charts/highchartsUtils.d.ts +101 -6
  198. package/dist/components/Charts/highchartsUtils.d.ts.map +1 -1
  199. package/dist/components/Charts/index.d.ts +1 -1
  200. package/dist/components/Charts/index.d.ts.map +1 -1
  201. package/dist/components/Charts/tokens.d.ts +21 -0
  202. package/dist/components/Charts/tokens.d.ts.map +1 -1
  203. package/dist/components/Charts/types.d.ts +7 -7
  204. package/dist/components/Charts/types.d.ts.map +1 -1
  205. package/dist/components/ChipsInput/ChipsInput.d.ts.map +1 -1
  206. package/dist/components/ChoiceChips/ChoiceChips.d.ts +106 -0
  207. package/dist/components/ChoiceChips/ChoiceChips.d.ts.map +1 -0
  208. package/dist/components/ClearableTextField/ClearableTextField.d.ts +23 -2
  209. package/dist/components/ClearableTextField/ClearableTextField.d.ts.map +1 -1
  210. package/dist/components/CodeBlock/CodeBlock.d.ts +80 -0
  211. package/dist/components/CodeBlock/CodeBlock.d.ts.map +1 -0
  212. package/dist/components/Combobox/Combobox.d.ts +3 -2
  213. package/dist/components/Combobox/Combobox.d.ts.map +1 -1
  214. package/dist/components/CommandPalette/CommandPalette.d.ts +54 -3
  215. package/dist/components/CommandPalette/CommandPalette.d.ts.map +1 -1
  216. package/dist/components/CommandPalette/index.d.ts +1 -1
  217. package/dist/components/CommandPalette/index.d.ts.map +1 -1
  218. package/dist/components/CopyButton/CopyButton.d.ts +80 -0
  219. package/dist/components/CopyButton/CopyButton.d.ts.map +1 -0
  220. package/dist/components/DataCard/DataCard.d.ts +11 -1
  221. package/dist/components/DataCard/DataCard.d.ts.map +1 -1
  222. package/dist/components/DataTable/CellRenderers.d.ts +8 -11
  223. package/dist/components/DataTable/CellRenderers.d.ts.map +1 -1
  224. package/dist/components/DataTable/DataTable.d.ts +1 -1
  225. package/dist/components/DataTable/DataTable.d.ts.map +1 -1
  226. package/dist/components/DataTable/InlineAddRow.d.ts.map +1 -1
  227. package/dist/components/DataTable/columnContext.d.ts +8 -0
  228. package/dist/components/DataTable/columnContext.d.ts.map +1 -0
  229. package/dist/components/DataTable/index.d.ts +2 -2
  230. package/dist/components/DataTable/index.d.ts.map +1 -1
  231. package/dist/components/DataTable/labels.d.ts +13 -0
  232. package/dist/components/DataTable/labels.d.ts.map +1 -0
  233. package/dist/components/DataTable/types.d.ts +34 -0
  234. package/dist/components/DataTable/types.d.ts.map +1 -1
  235. package/dist/components/DateRangePicker/DateRangePicker.d.ts.map +1 -1
  236. package/dist/components/DetailsPopover/DetailsPopover.d.ts +185 -0
  237. package/dist/components/DetailsPopover/DetailsPopover.d.ts.map +1 -0
  238. package/dist/components/DiffViewer/DiffViewer.d.ts +3 -2
  239. package/dist/components/DiffViewer/DiffViewer.d.ts.map +1 -1
  240. package/dist/components/Disclosure/Disclosure.d.ts +83 -0
  241. package/dist/components/Disclosure/Disclosure.d.ts.map +1 -0
  242. package/dist/components/DockLayout/DockLayout.d.ts +58 -0
  243. package/dist/components/DockLayout/DockLayout.d.ts.map +1 -1
  244. package/dist/components/DockLayout/index.d.ts +1 -1
  245. package/dist/components/DockLayout/index.d.ts.map +1 -1
  246. package/dist/components/DocumentCard/DocumentCard.d.ts +5 -1
  247. package/dist/components/DocumentCard/DocumentCard.d.ts.map +1 -1
  248. package/dist/components/EntityDetailPanel/EntityDetailPanel.d.ts +6 -2
  249. package/dist/components/EntityDetailPanel/EntityDetailPanel.d.ts.map +1 -1
  250. package/dist/components/FileUpload/FileUpload.d.ts +141 -6
  251. package/dist/components/FileUpload/FileUpload.d.ts.map +1 -1
  252. package/dist/components/FileUpload/index.d.ts +1 -1
  253. package/dist/components/FileUpload/index.d.ts.map +1 -1
  254. package/dist/components/FilterBar/FilterBar.d.ts +27 -1
  255. package/dist/components/FilterBar/FilterBar.d.ts.map +1 -1
  256. package/dist/components/FilterBar/index.d.ts +1 -1
  257. package/dist/components/FilterBar/index.d.ts.map +1 -1
  258. package/dist/components/FlowAutoLayout/useFlowAutoLayout.d.ts.map +1 -1
  259. package/dist/components/GanttView/GanttView.d.ts +24 -0
  260. package/dist/components/GanttView/GanttView.d.ts.map +1 -1
  261. package/dist/components/GanttView/types.d.ts +33 -7
  262. package/dist/components/GanttView/types.d.ts.map +1 -1
  263. package/dist/components/GaugeCard/GaugeCard.d.ts +4 -3
  264. package/dist/components/GaugeCard/GaugeCard.d.ts.map +1 -1
  265. package/dist/components/GaugeCard/geometry.d.ts +59 -0
  266. package/dist/components/GaugeCard/geometry.d.ts.map +1 -0
  267. package/dist/components/GeoStatusMap/GeoStatusMap.d.ts.map +1 -1
  268. package/dist/components/GeoStatusMap/types.d.ts +8 -5
  269. package/dist/components/GeoStatusMap/types.d.ts.map +1 -1
  270. package/dist/components/GoToTop/GoToTop.d.ts +1 -1
  271. package/dist/components/GoToTop/GoToTop.d.ts.map +1 -1
  272. package/dist/components/HierarchicalDrillDown/HierarchicalDrillDown.d.ts.map +1 -1
  273. package/dist/components/HistoricalDataIndicator/HistoricalDataIndicator.d.ts.map +1 -1
  274. package/dist/components/HtmlToMui/HtmlToMui.d.ts.map +1 -1
  275. package/dist/components/Icon.d.ts +567 -10
  276. package/dist/components/Icon.d.ts.map +1 -1
  277. package/dist/components/IllustratedMessage.d.ts +52 -3
  278. package/dist/components/IllustratedMessage.d.ts.map +1 -1
  279. package/dist/components/InlineEditableText/InlineEditableText.d.ts +117 -0
  280. package/dist/components/InlineEditableText/InlineEditableText.d.ts.map +1 -0
  281. package/dist/components/InsightCard/InsightCard.d.ts.map +1 -1
  282. package/dist/components/InsightCard/types.d.ts +10 -3
  283. package/dist/components/InsightCard/types.d.ts.map +1 -1
  284. package/dist/components/KeyValueList/KeyValueList.d.ts +94 -0
  285. package/dist/components/KeyValueList/KeyValueList.d.ts.map +1 -0
  286. package/dist/components/LandingPage/FeatureCard.d.ts +4 -0
  287. package/dist/components/LandingPage/FeatureCard.d.ts.map +1 -1
  288. package/dist/components/LandingPage/LandingPage.d.ts +43 -4
  289. package/dist/components/LandingPage/LandingPage.d.ts.map +1 -1
  290. package/dist/components/LandingPage/heroTone.d.ts +54 -0
  291. package/dist/components/LandingPage/heroTone.d.ts.map +1 -0
  292. package/dist/components/MentionsInput/MentionsInput.d.ts.map +1 -1
  293. package/dist/components/MetaChip/MetaChip.d.ts +113 -0
  294. package/dist/components/MetaChip/MetaChip.d.ts.map +1 -0
  295. package/dist/components/Modal/Modal.d.ts +222 -20
  296. package/dist/components/Modal/Modal.d.ts.map +1 -1
  297. package/dist/components/Modal/index.d.ts +1 -1
  298. package/dist/components/Modal/index.d.ts.map +1 -1
  299. package/dist/components/NotificationCenter/NotificationCenter.d.ts.map +1 -1
  300. package/dist/components/OrgChart/OrgChart.d.ts +5 -0
  301. package/dist/components/OrgChart/OrgChart.d.ts.map +1 -1
  302. package/dist/components/OrgChart/types.d.ts +31 -7
  303. package/dist/components/OrgChart/types.d.ts.map +1 -1
  304. package/dist/components/OverflowTooltip/OverflowTooltip.d.ts +1 -1
  305. package/dist/components/OverflowTooltip/OverflowTooltip.d.ts.map +1 -1
  306. package/dist/components/PageHeader/PageHeader.d.ts.map +1 -1
  307. package/dist/components/PageTOC/PageTOC.d.ts +2 -1
  308. package/dist/components/PageTOC/PageTOC.d.ts.map +1 -1
  309. package/dist/components/Popper/Popper.d.ts +80 -9
  310. package/dist/components/Popper/Popper.d.ts.map +1 -1
  311. package/dist/components/Popper/index.d.ts +1 -1
  312. package/dist/components/Popper/index.d.ts.map +1 -1
  313. package/dist/components/PredictiveTextInput/PredictiveTextInput.d.ts +5 -1
  314. package/dist/components/PredictiveTextInput/PredictiveTextInput.d.ts.map +1 -1
  315. package/dist/components/SearchInput/SearchInput.d.ts +49 -0
  316. package/dist/components/SearchInput/SearchInput.d.ts.map +1 -1
  317. package/dist/components/SearchInput/index.d.ts +1 -1
  318. package/dist/components/SearchInput/index.d.ts.map +1 -1
  319. package/dist/components/SimpleTable/SimpleTable.d.ts +11 -2
  320. package/dist/components/SimpleTable/SimpleTable.d.ts.map +1 -1
  321. package/dist/components/SplitPane/SplitPane.d.ts +2 -1
  322. package/dist/components/SplitPane/SplitPane.d.ts.map +1 -1
  323. package/dist/components/StatusHero/StatusHero.d.ts.map +1 -1
  324. package/dist/components/StatusIndicator/Badge.d.ts +6 -1
  325. package/dist/components/StatusIndicator/Badge.d.ts.map +1 -1
  326. package/dist/components/StatusIndicator/Chip.d.ts +3 -1
  327. package/dist/components/StatusIndicator/Chip.d.ts.map +1 -1
  328. package/dist/components/StatusIndicator/Indicators.d.ts +5 -1
  329. package/dist/components/StatusIndicator/Indicators.d.ts.map +1 -1
  330. package/dist/components/StatusIndicator/Legend.d.ts.map +1 -1
  331. package/dist/components/StatusIndicator/StatusIndicator.d.ts +98 -4
  332. package/dist/components/StatusIndicator/StatusIndicator.d.ts.map +1 -1
  333. package/dist/components/StatusIndicator/index.d.ts +2 -2
  334. package/dist/components/StatusIndicator/index.d.ts.map +1 -1
  335. package/dist/components/StatusIndicator/types.d.ts +48 -1
  336. package/dist/components/StatusIndicator/types.d.ts.map +1 -1
  337. package/dist/components/StepList/StepList.d.ts +80 -0
  338. package/dist/components/StepList/StepList.d.ts.map +1 -0
  339. package/dist/components/StepList/StepStatusMarker.d.ts +39 -0
  340. package/dist/components/StepList/StepStatusMarker.d.ts.map +1 -0
  341. package/dist/components/StepList/stepStatus.d.ts +30 -0
  342. package/dist/components/StepList/stepStatus.d.ts.map +1 -0
  343. package/dist/components/SystemBanner/SystemBanner.d.ts.map +1 -1
  344. package/dist/components/Timeline/Timeline.d.ts +57 -3
  345. package/dist/components/Timeline/Timeline.d.ts.map +1 -1
  346. package/dist/components/Timeline/index.d.ts +1 -1
  347. package/dist/components/Timeline/index.d.ts.map +1 -1
  348. package/dist/components/Timeline/timelineLabels.d.ts +70 -0
  349. package/dist/components/Timeline/timelineLabels.d.ts.map +1 -0
  350. package/dist/components/Toast/Toast.d.ts.map +1 -1
  351. package/dist/components/TopNavHeader.d.ts +6 -0
  352. package/dist/components/TopNavHeader.d.ts.map +1 -1
  353. package/dist/components/TopNavWithSidebar.d.ts +49 -1
  354. package/dist/components/TopNavWithSidebar.d.ts.map +1 -1
  355. package/dist/components/Tour/Tour.d.ts +18 -1
  356. package/dist/components/Tour/Tour.d.ts.map +1 -1
  357. package/dist/components/TransferList/TransferList.d.ts +123 -4
  358. package/dist/components/TransferList/TransferList.d.ts.map +1 -1
  359. package/dist/components/TransferList/index.d.ts +1 -1
  360. package/dist/components/TransferList/index.d.ts.map +1 -1
  361. package/dist/components/TreeView/TreeView.d.ts +97 -8
  362. package/dist/components/TreeView/TreeView.d.ts.map +1 -1
  363. package/dist/components/TreeView/index.d.ts +1 -1
  364. package/dist/components/TreeView/index.d.ts.map +1 -1
  365. package/dist/components/TrinityLoader.d.ts.map +1 -1
  366. package/dist/components/icons/featherExtensions.d.ts +55 -0
  367. package/dist/components/icons/featherExtensions.d.ts.map +1 -0
  368. package/dist/components/icons/materialExtensions.d.ts +20 -0
  369. package/dist/components/icons/materialExtensions.d.ts.map +1 -0
  370. package/dist/components/internal/index.d.ts +87 -0
  371. package/dist/components/internal/index.d.ts.map +1 -1
  372. package/dist/components/navigation/MenuListWithHeading.d.ts +33 -0
  373. package/dist/components/navigation/MenuListWithHeading.d.ts.map +1 -0
  374. package/dist/components/navigation/clientSelectorLabels.d.ts +13 -0
  375. package/dist/components/navigation/clientSelectorLabels.d.ts.map +1 -0
  376. package/dist/components/navigation/components.d.ts +6 -0
  377. package/dist/components/navigation/components.d.ts.map +1 -1
  378. package/dist/components/shared/AsyncOutcomeAlert.d.ts +91 -0
  379. package/dist/components/shared/AsyncOutcomeAlert.d.ts.map +1 -0
  380. package/dist/components/shared/TrinityIconSvg.d.ts.map +1 -1
  381. package/dist/components/shared/TrinityLogoSvg.d.ts.map +1 -1
  382. package/dist/components/shared/bidi.d.ts +44 -0
  383. package/dist/components/shared/bidi.d.ts.map +1 -0
  384. package/dist/components/shared/bidiText.d.ts +25 -0
  385. package/dist/components/shared/bidiText.d.ts.map +1 -0
  386. package/dist/components/shared/containerQueries.d.ts +73 -0
  387. package/dist/components/shared/containerQueries.d.ts.map +1 -0
  388. package/dist/components/shared/createStringsContext.d.ts +69 -0
  389. package/dist/components/shared/createStringsContext.d.ts.map +1 -0
  390. package/dist/components/shared/direction.d.ts +46 -0
  391. package/dist/components/shared/direction.d.ts.map +1 -0
  392. package/dist/components/shared/focusTrap.d.ts +36 -0
  393. package/dist/components/shared/focusTrap.d.ts.map +1 -0
  394. package/dist/components/shared/getInitials.d.ts +29 -0
  395. package/dist/components/shared/getInitials.d.ts.map +1 -0
  396. package/dist/components/shared/headingLevel.d.ts +69 -0
  397. package/dist/components/shared/headingLevel.d.ts.map +1 -0
  398. package/dist/components/shared/mergeSlotProps.d.ts +50 -0
  399. package/dist/components/shared/mergeSlotProps.d.ts.map +1 -0
  400. package/dist/components/shared/mergeSx.d.ts +26 -0
  401. package/dist/components/shared/mergeSx.d.ts.map +1 -0
  402. package/dist/components/shared/motion.d.ts +110 -0
  403. package/dist/components/shared/motion.d.ts.map +1 -0
  404. package/dist/components/shared/occurrenceKeys.d.ts +23 -0
  405. package/dist/components/shared/occurrenceKeys.d.ts.map +1 -0
  406. package/dist/components/shared/primaryAction.d.ts +89 -0
  407. package/dist/components/shared/primaryAction.d.ts.map +1 -0
  408. package/dist/components/shared/resizeKeyboard.d.ts +68 -0
  409. package/dist/components/shared/resizeKeyboard.d.ts.map +1 -0
  410. package/dist/components/shared/rootProps.d.ts +117 -0
  411. package/dist/components/shared/rootProps.d.ts.map +1 -0
  412. package/dist/components/shared/safeContent.d.ts +9 -2
  413. package/dist/components/shared/safeContent.d.ts.map +1 -1
  414. package/dist/components/shared/targetSize.d.ts +64 -0
  415. package/dist/components/shared/targetSize.d.ts.map +1 -0
  416. package/dist/components/shared/useContainerInlineSize.d.ts +43 -0
  417. package/dist/components/shared/useContainerInlineSize.d.ts.map +1 -0
  418. package/dist/components/shared/useCopyAction.d.ts +35 -0
  419. package/dist/components/shared/useCopyAction.d.ts.map +1 -0
  420. package/dist/components/shared/useOverflow.d.ts +44 -0
  421. package/dist/components/shared/useOverflow.d.ts.map +1 -0
  422. package/dist/components/shared/useResizable.d.ts +106 -7
  423. package/dist/components/shared/useResizable.d.ts.map +1 -1
  424. package/dist/components/shared/warnDeprecated.d.ts +89 -15
  425. package/dist/components/shared/warnDeprecated.d.ts.map +1 -1
  426. package/dist/components/shared/zIndexRoles.d.ts +62 -0
  427. package/dist/components/shared/zIndexRoles.d.ts.map +1 -0
  428. package/dist/components/templates/AIReviewQueue/AIReviewQueueTemplate.d.ts +213 -0
  429. package/dist/components/templates/AIReviewQueue/AIReviewQueueTemplate.d.ts.map +1 -0
  430. package/dist/components/templates/AIReviewQueue/index.d.ts +2 -0
  431. package/dist/components/templates/AIReviewQueue/index.d.ts.map +1 -0
  432. package/dist/components/templates/Auth/AuthTemplate.d.ts.map +1 -1
  433. package/dist/components/templates/Auth/types.d.ts +4 -1
  434. package/dist/components/templates/Auth/types.d.ts.map +1 -1
  435. package/dist/components/templates/Catalog/CatalogTemplate.d.ts.map +1 -1
  436. package/dist/components/templates/ConnectorWizard/ConnectorWizardTemplate.d.ts.map +1 -1
  437. package/dist/components/templates/InsightsCenter/InsightsCenterTemplate.d.ts.map +1 -1
  438. package/dist/components/templates/IntegrationDetail/IntegrationDetailTemplate.d.ts.map +1 -1
  439. package/dist/components/templates/ListDetail/ListDetailTemplate.d.ts +168 -10
  440. package/dist/components/templates/ListDetail/ListDetailTemplate.d.ts.map +1 -1
  441. package/dist/components/templates/ListDetail/index.d.ts +1 -1
  442. package/dist/components/templates/ListDetail/index.d.ts.map +1 -1
  443. package/dist/components/templates/ListDetail/listDetailLabels.d.ts +106 -0
  444. package/dist/components/templates/ListDetail/listDetailLabels.d.ts.map +1 -0
  445. package/dist/components/templates/Onboarding/OnboardingTemplate.d.ts.map +1 -1
  446. package/dist/components/templates/Settings/SettingsTemplate.d.ts +0 -3
  447. package/dist/components/templates/Settings/SettingsTemplate.d.ts.map +1 -1
  448. package/dist/components/templates/Wizard/WizardTemplate.d.ts +4 -1
  449. package/dist/components/templates/Wizard/WizardTemplate.d.ts.map +1 -1
  450. package/dist/components/templates/index.d.ts +2 -1
  451. package/dist/components/templates/index.d.ts.map +1 -1
  452. package/dist/data-table.d.ts +1 -1
  453. package/dist/data-table.d.ts.map +1 -1
  454. package/dist/data-table.js +1 -0
  455. package/dist/data-table2.js +13522 -13465
  456. package/dist/data.js +213 -194
  457. package/dist/elk.bundled.js +47371 -0
  458. package/dist/essentials.d.ts +3 -3
  459. package/dist/essentials.d.ts.map +1 -1
  460. package/dist/essentials.js +179 -147
  461. package/dist/focus-on-replace.js +49 -0
  462. package/dist/form.d.ts +26 -4
  463. package/dist/form.d.ts.map +1 -1
  464. package/dist/forms.js +575 -483
  465. package/dist/foundation.js +3704 -0
  466. package/dist/hooks/storageStore.d.ts +51 -0
  467. package/dist/hooks/storageStore.d.ts.map +1 -0
  468. package/dist/hooks/useAsyncAction.d.ts +65 -0
  469. package/dist/hooks/useAsyncAction.d.ts.map +1 -0
  470. package/dist/hooks/useDisclosure.d.ts +190 -0
  471. package/dist/hooks/useDisclosure.d.ts.map +1 -0
  472. package/dist/hooks/useFocusOnReplace.d.ts +95 -0
  473. package/dist/hooks/useFocusOnReplace.d.ts.map +1 -0
  474. package/dist/hooks/useTrinityPalette.d.ts +38 -40
  475. package/dist/hooks/useTrinityPalette.d.ts.map +1 -1
  476. package/dist/hooks.d.ts +44 -6
  477. package/dist/hooks.d.ts.map +1 -1
  478. package/dist/hooks.js +301 -0
  479. package/dist/index.d.ts +71 -26
  480. package/dist/index.d.ts.map +1 -1
  481. package/dist/index.js +13923 -60619
  482. package/dist/patterns/AICopilotPattern/AICopilotPattern.d.ts +203 -0
  483. package/dist/patterns/AICopilotPattern/AICopilotPattern.d.ts.map +1 -0
  484. package/dist/patterns/AICopilotPattern/index.d.ts +3 -0
  485. package/dist/patterns/AICopilotPattern/index.d.ts.map +1 -0
  486. package/dist/patterns/index.d.ts +15 -0
  487. package/dist/patterns/index.d.ts.map +1 -0
  488. package/dist/presets/analytics.d.ts +8 -1
  489. package/dist/presets/analytics.d.ts.map +1 -1
  490. package/dist/presets/crm.d.ts +8 -1
  491. package/dist/presets/crm.d.ts.map +1 -1
  492. package/dist/presets/index.d.ts +1 -1
  493. package/dist/presets/portal.d.ts +8 -1
  494. package/dist/presets/portal.d.ts.map +1 -1
  495. package/dist/safe-content.js +69 -69
  496. package/dist/theme-augmentation.d.ts +388 -0
  497. package/dist/theme-augmentation.d.ts.map +1 -0
  498. package/dist/theme.d.ts +116 -30
  499. package/dist/theme.d.ts.map +1 -1
  500. package/dist/theme.js +891 -436
  501. package/dist/token-color.d.ts +14 -0
  502. package/dist/token-color.d.ts.map +1 -0
  503. package/dist/token-merge.d.ts +56 -0
  504. package/dist/token-merge.d.ts.map +1 -0
  505. package/dist/token-serialization.d.ts +65 -0
  506. package/dist/token-serialization.d.ts.map +1 -0
  507. package/dist/tokens.d.ts +882 -13
  508. package/dist/tokens.d.ts.map +1 -1
  509. package/dist/tokens.js +21 -19
  510. package/dist/trinity.css +1077 -414
  511. package/package.json +111 -90
  512. package/dist/components/index.d.ts +0 -145
  513. package/dist/components/index.d.ts.map +0 -1
  514. package/dist/components/shared.d.ts +0 -92
  515. package/dist/components/shared.d.ts.map +0 -1
@@ -7,40 +7,87 @@
7
7
  * It composes:
8
8
  * - ChatHeader
9
9
  * - ChatHistoryList (collapsible)
10
+ * - AIChatWelcome (the start screen before the first message, with the composer centred in it)
10
11
  * - ChatThread (messages area)
11
12
  * - AIRelatedQuestions
12
13
  * - AISuggestedAction / AIActionsGroup
13
14
  * - InsightEngineInput
14
15
  *
15
16
  * State owned by InsightEngine:
16
- * - viewMode ('sidepanel' | 'expanded')
17
- * - isOpen
18
- * - activeChatId
17
+ * - viewMode ('sidepanel' | 'expanded'), unless controlled through `viewMode`
19
18
  * - historyExpanded (for sidepanel mode)
20
19
  *
20
+ * Presentation (H-15): `presentation="drawer"` (default) is a right-anchored drawer, persistent on
21
+ * desktop and a full-width modal drawer below `sm`; `presentation="embedded"` fills its parent, for
22
+ * a host panel such as AppLayout's `renderAiPanel`.
23
+ *
21
24
  * @example
22
25
  * ```tsx
23
- * import { MOCK_MESSAGES } from '@trinityui/design-system';
26
+ * import { useState } from 'react';
27
+ * import { InsightEngine, type ChatThreadMessage } from '@trinityui/design-system';
24
28
  *
25
- * <MOCK_MESSAGES
26
- * isOpen={false}
27
- * onClose={() => {}}
28
- * />
29
- * ```
29
+ * export function Assistant() {
30
+ * const [isOpen, setIsOpen] = useState(true);
31
+ * const [messages, setMessages] = useState<ChatThreadMessage[]>([]);
32
+ * return (
33
+ * <InsightEngine
34
+ * isOpen={isOpen}
35
+ * onClose={() => setIsOpen(false)}
36
+ * messages={messages}
37
+ * onSendMessage={(value) => setMessages((prev) => [...prev, { id: String(prev.length + 1), role: 'user', content: value }])}
38
+ * />
39
+ * );
40
+ * }
41
+ * ```
30
42
  */
31
43
  import React from 'react';
32
44
  import { SxProps, Theme } from '@mui/material';
45
+ import { type TrinityRootProps, type TrinitySlotProps } from '../shared/rootProps';
33
46
  import { type ChatViewMode } from './ChatHeader';
34
47
  import { type ChatHistoryItem } from './ChatHistoryList';
35
- import { type ChatMessage } from './ChatThread';
48
+ import { type ChatThreadMessage, type ChatThreadMessageActions, type ChatThreadOwnProps } from './ChatThread';
49
+ import { type HeadingLevel } from '../shared/headingLevel';
36
50
  import { type AISourceCategory, type AISourceItem } from './AISourcesPanel';
51
+ import { type AIRelatedQuestion } from './AIRelatedQuestions';
37
52
  import { type ModelOption, type SourceOption } from './InsightEngineInput';
53
+ import { type AIChatWelcomeOptions } from './AIChatWelcome';
38
54
  /** Re-export source types from AISourcesPanel for convenience */
39
55
  export type { AISourceCategory, AISourceItem };
40
- /** Re-export ChatMessage from ChatThread */
41
- export type { ChatMessage } from './ChatThread';
56
+ /** Re-export ChatThreadMessage from ChatThread */
57
+ export type { ChatThreadMessage } from './ChatThread';
42
58
  /**
43
- * Props for InsightEngine component.
59
+ * Trinity-owned slots of InsightEngine (ADR-04 (6)). Each takes `className`, `sx`, `id`,
60
+ * `data-*` and the slot element's HTML attributes; owned attributes (`role`, `aria-live`, ...)
61
+ * are ignored.
62
+ *
63
+ * @since 2.13.0
64
+ */
65
+ export interface InsightEngineSlotProps {
66
+ /**
67
+ * The root: the Drawer's root in the `drawer` presentation, the embedded `div` in the
68
+ * `embedded` presentation. Applied after the root's own styles and before the root `sx` and
69
+ * `className`.
70
+ * @since 2.13.0
71
+ */
72
+ root?: TrinitySlotProps<HTMLDivElement>;
73
+ /**
74
+ * The drawer's paper (a `div`; `drawer` presentation only). Its own width and width transition
75
+ * apply first, then these props. A root `sx` rule on `& .MuiDrawer-paper` still wins over the
76
+ * paper's own styles.
77
+ */
78
+ paper?: TrinitySlotProps<HTMLDivElement>;
79
+ /**
80
+ * The body: the `div` below the header that holds the history, the thread and the composer.
81
+ * @since 2.13.0
82
+ */
83
+ body?: TrinitySlotProps<HTMLDivElement>;
84
+ /** The message thread's root (ChatThread's log `div`). */
85
+ thread?: TrinitySlotProps<HTMLDivElement>;
86
+ /** The composer's container (the `div` around the input, at the bottom of the panel). */
87
+ composer?: TrinitySlotProps<HTMLDivElement>;
88
+ }
89
+ /**
90
+ * InsightEngine's own props, without the root element's HTML attributes.
44
91
  *
45
92
  * **State ownership model:**
46
93
  *
@@ -50,33 +97,90 @@ export type { ChatMessage } from './ChatThread';
50
97
  * must manage that state and pass it in. The component calls back via the
51
98
  * various `on*` props whenever the user interacts.
52
99
  *
53
- * Internally-owned state (do NOT pass these as props; they're UI affordances):
54
- * - `viewMode`: which panel layout is shown (`sidepanel` | `expanded`). Seeded
55
- * by `defaultViewMode` on mount.
56
- * - `historyExpanded`: whether the history sidebar is expanded in sidepanel mode.
100
+ * UI state:
101
+ * - `viewMode`: which panel layout is shown (`sidepanel` | `expanded`). Controlled with
102
+ * `viewMode` / `onViewModeChange`, or kept internally and seeded by `defaultViewMode`.
103
+ * - `historyExpanded`: whether the history sidebar is expanded in sidepanel mode (internal).
57
104
  *
58
105
  * Parent-owned (pass via props and update via callbacks):
59
106
  * - `isOpen` / `onClose`
60
107
  * - `messages` (thread content)
61
- * - `inputValue` / `onInputChange` / `onSendMessage`
108
+ * - `inputValue` / `onInputChange` / `onSendMessage` (the composer's text may also stay
109
+ * uncontrolled: omit `inputValue` and read sends from `onSendMessage`)
62
110
  * - `chats` / `activeChatId` / `onSelectChat` and friends
63
111
  * - `selectedModel` / `onModelChange`
64
112
  * - `sources` / `onSourceToggle`
65
113
  */
66
- export interface InsightEngineProps {
67
- /** Whether the panel is open */
114
+ export interface InsightEngineOwnProps {
115
+ /** Whether the panel is open. A closed `embedded` panel stays mounted and hidden. */
68
116
  isOpen: boolean;
69
- /** Close callback */
70
- onClose: () => void;
71
- /** Initial view mode */
117
+ /**
118
+ * Called when the panel asks to close, with the reason: the header's Close button
119
+ * (`'closeButton'`), or Escape and the backdrop of the modal drawer on phones
120
+ * (`'escapeKeyDown'`, `'backdropClick'`). A handler that takes no argument still fits.
121
+ *
122
+ * Required for the `drawer` presentation (a development warning says so when it is missing).
123
+ * Optional for `embedded` (since 2.13.0): without it the header shows no Close button, for a
124
+ * host that is always open or closes itself.
125
+ */
126
+ onClose?: (reason?: 'closeButton' | 'escapeKeyDown' | 'backdropClick') => void;
127
+ /**
128
+ * Where the panel renders (H-15).
129
+ * - `'drawer'`: a right-anchored drawer. At and above the `sm` breakpoint it is persistent
130
+ * (non-modal) at `sidepanelWidth` / `expandedWidth`, never wider than the viewport; below `sm`
131
+ * it is a full-width modal drawer (see `mobileVariant`).
132
+ * - `'embedded'`: no drawer. The header, body and composer fill the parent (width and height
133
+ * 100%), so the panel fits any host: AppLayout's AI panel through `renderAiPanel`, a 320px
134
+ * column, a dialog. The width props do not apply; the host sets the width.
135
+ * @default 'drawer'
136
+ * @since 2.13.0
137
+ */
138
+ presentation?: 'drawer' | 'embedded';
139
+ /**
140
+ * The drawer below the `sm` breakpoint (`drawer` presentation): `'temporary'` is a full-width
141
+ * modal drawer (focus trap, Escape and backdrop close through `onClose`, focus returns to the
142
+ * opener); `'persistent'` keeps the non-modal drawer at full width. The expand toggle is hidden
143
+ * on phones either way.
144
+ * @default 'temporary'
145
+ * @since 2.13.0
146
+ */
147
+ mobileVariant?: 'temporary' | 'persistent';
148
+ /** Initial view mode, when `viewMode` is not passed (uncontrolled). */
72
149
  defaultViewMode?: ChatViewMode;
73
- /** Panel title */
150
+ /**
151
+ * The view mode, controlled: `'sidepanel'` (collapsible history above the thread) or
152
+ * `'expanded'` (history column beside the thread, and the `expandedWidth` drawer). Pass it with
153
+ * `onViewModeChange`; without it the panel keeps its own, seeded by `defaultViewMode`.
154
+ * @since 2.13.0
155
+ */
156
+ viewMode?: ChatViewMode;
157
+ /**
158
+ * Called with the next view mode when the header's expand toggle is pressed, controlled or not.
159
+ * @since 2.13.0
160
+ */
161
+ onViewModeChange?: (mode: ChatViewMode) => void;
162
+ /**
163
+ * The panel's title (its h2, which names the panel). Default: the `ai.insightEngine.title`
164
+ * string ('Insight Engine'), from the nearest AIConfigProvider.
165
+ */
74
166
  title?: string;
75
167
  /**
76
- * Fires when a network or business-logic error happens inside the panel
77
- * (e.g. failed chat load, failed message send). The component does NOT own
78
- * error UI — the consumer decides how to present the error. A default
79
- * inline banner is a sensible UX, but you can toast, modal, or ignore.
168
+ * Controls of the host in the header, before the expand toggle and Close (ChatHeader
169
+ * `actions`): for example 'New chat', or AppLayout's fullscreen toggle when the panel is
170
+ * embedded through `renderAiPanel`. Give each control an accessible name and a matching
171
+ * tooltip.
172
+ * @since 2.13.0
173
+ */
174
+ headerActions?: React.ReactNode;
175
+ /**
176
+ * The panel's async error sink (G-15, H-16): called with an `Error` when an action inside the
177
+ * panel fails: a send (`onSendMessage` threw or rejected), a message action (Regenerate, Copy's
178
+ * clipboard write, an app action) or a block event (`onBlockEvent` rejected or threw). A
179
+ * rejection that is not an `Error` arrives wrapped, with the original value as its `cause`. The
180
+ * failure still shows inline where it happened (ADR-36): a failed send shows an alert above the
181
+ * composer with 'Try again', an action or a block shows its own error. Without `onError` a
182
+ * failed send or message action goes to `globalThis.reportError`, and a block shows its error
183
+ * inline.
80
184
  */
81
185
  onError?: (error: Error) => void;
82
186
  /** List of past chats */
@@ -92,13 +196,101 @@ export interface InsightEngineProps {
92
196
  onPinChat?: (id: string) => void;
93
197
  onAddChatToProject?: (id: string) => void;
94
198
  /** Messages in current thread */
95
- messages?: ChatMessage[];
96
- /** Input value */
199
+ messages?: ChatThreadMessage[];
200
+ /**
201
+ * What the thread shows while `messages` is empty, forwarded to ChatThread, with the composer
202
+ * at the bottom. It wins over the start screen (`welcome`).
203
+ * @since 2.13.0
204
+ */
205
+ emptyState?: React.ReactNode;
206
+ /**
207
+ * The start screen while `messages` is empty and no `emptyState` is passed: AIChatWelcome with
208
+ * the composer centred in it, which moves to the bottom after the first message (no motion
209
+ * under reduced motion). Pass its options (`variant`, `userName`, `greeting`, `subtitle`,
210
+ * `suggestions`, `suggestionBehavior`, `onSuggestionSelect`, `updates`, `scope`,
211
+ * `recentThreads`, `onRecentThreadClick`, `disclaimer`, `guidelinesHref`, …); a suggestion
212
+ * sends through `onSendMessage` by default. `false` shows ChatThread's 'Start a conversation'
213
+ * state (`ai.chatThread.empty`) above the bottom composer, as before.
214
+ * @default {} (the showcase variant with the default greeting)
215
+ * @since 2.13.0
216
+ */
217
+ welcome?: AIChatWelcomeOptions | false;
218
+ /**
219
+ * Called with the message and what the user did in an interactive block of its response
220
+ * (answered a clarification, confirmed a plan), forwarded to ChatThread. Return the promise of
221
+ * your request: it drives the block's pending state, and a rejection shows the block's error and
222
+ * reaches `onError`. While the latest response asks a required clarification, the composer is
223
+ * blocked with a visible reason ('Answer the question above to continue',
224
+ * `ai.blocks.answerToContinue`) until the answer is submitted, whether or not you write the
225
+ * answer back into `messages`. Without `onBlockEvent` the blocks are read-only and the composer
226
+ * is never blocked by them.
227
+ * @since 2.13.0
228
+ */
229
+ onBlockEvent?: ChatThreadOwnProps['onBlockEvent'];
230
+ /**
231
+ * Block renderers by block type, forwarded to ChatThread (which renders the interactive blocks
232
+ * by default; an entry wins, `null` turns a default off). Keep the object stable.
233
+ * @since 2.13.0
234
+ */
235
+ blockRenderers?: ChatThreadOwnProps['blockRenderers'];
236
+ /**
237
+ * Renders any block first, forwarded to ChatThread: return a node, `null` to skip the block, or
238
+ * `undefined` to fall through.
239
+ * @since 2.13.0
240
+ */
241
+ renderBlock?: ChatThreadOwnProps['renderBlock'];
242
+ /**
243
+ * Overrides the slots of an assistant message (badges, feedback control, attachments), forwarded
244
+ * to ChatThread. Also the way to add AIChainOfThought reasoning to a message.
245
+ * @since 2.13.0
246
+ */
247
+ getMessageSlots?: ChatThreadOwnProps['getMessageSlots'];
248
+ /**
249
+ * The level of the visually hidden heading before each message, forwarded to ChatThread. The
250
+ * panel's title is an h2, so `3` fits.
251
+ * @since 2.13.0
252
+ */
253
+ headingLevel?: HeadingLevel;
254
+ /**
255
+ * Overrides the composer's blocked state. A string blocks sending and shows it as the reason;
256
+ * `null` never blocks (not even for a required clarification); `undefined` (the default) blocks
257
+ * only while a required clarification waits for an answer.
258
+ * @since 2.13.0
259
+ */
260
+ composerBlockedReason?: string | null;
261
+ /**
262
+ * The actions of each assistant message, forwarded to ChatThread unchanged (G-05). Each action
263
+ * shows only when its handler is passed; Copy always shows. `getGoldenDataset` adds the built-in
264
+ * 'Add to golden dataset' action for the users your app permits (GA-01).
265
+ * @since 2.13.0
266
+ */
267
+ messageActions?: ChatThreadMessageActions;
268
+ /**
269
+ * The composer's text, controlled. Without it the composer keeps its own text (uncontrolled)
270
+ * and clears it after a send.
271
+ */
97
272
  inputValue?: string;
98
- /** Input change callback */
273
+ /** Called with the composer's text on every change, controlled or not. */
99
274
  onInputChange?: (value: string) => void;
100
- /** Send message callback */
101
- onSendMessage?: (value: string) => void;
275
+ /**
276
+ * Called with the trimmed text when the user sends a message, controlled or not. Return the
277
+ * promise of your request (H-16): while it is pending, Send stays in place `aria-disabled` and
278
+ * `aria-busy` with a spinner (never disabled, so focus stays), and Enter does not send again. If
279
+ * it rejects (or the handler throws), an alert above the composer says the message wasn't sent,
280
+ * with 'Try again' that sends the same text again, and the error reaches `onError`. The composer
281
+ * text is not restored: a controlled `inputValue` stays as you set it.
282
+ *
283
+ * Typed as a union of the sync and the async form, so a handler written before H-16 that returns
284
+ * something else (`(value) => list.push(value)`) still compiles.
285
+ */
286
+ onSendMessage?: ((value: string) => void) | ((value: string) => Promise<void>);
287
+ /**
288
+ * The composer's placeholder, which is also its accessible name while a reason blocks it.
289
+ * Default: the `ai.insightEngine.placeholder` string ('Ask anything…'), from the nearest
290
+ * AIConfigProvider.
291
+ * @since 2.13.0
292
+ */
293
+ placeholder?: string;
102
294
  /** Model options */
103
295
  models?: ModelOption[];
104
296
  /** Selected model ID */
@@ -109,10 +301,19 @@ export interface InsightEngineProps {
109
301
  sources?: SourceOption[];
110
302
  /** Source toggle callback */
111
303
  onSourceToggle?: (id: string, enabled: boolean) => void;
112
- /** Related questions to display */
113
- relatedQuestions?: string[];
114
- /** Related question click callback */
304
+ /**
305
+ * Related questions after the last message, shown when no message shows its own. Strings, or
306
+ * {@link AIRelatedQuestion} objects for an id and the verified flag (since 2.13.0).
307
+ */
308
+ relatedQuestions?: Array<string | AIRelatedQuestion>;
309
+ /** Called with the text of a picked related question (a message's or the thread's). */
115
310
  onRelatedQuestionClick?: (question: string) => void;
311
+ /**
312
+ * Called with a picked related question (a string is passed as `{ text }`) and its index in its
313
+ * list, after `onRelatedQuestionClick`; forwarded to ChatThread.
314
+ * @since 2.13.0
315
+ */
316
+ onRelatedQuestionSelect?: (question: AIRelatedQuestion, index: number) => void;
116
317
  /** Suggested actions */
117
318
  suggestedActions?: Array<{
118
319
  label: string;
@@ -122,21 +323,44 @@ export interface InsightEngineProps {
122
323
  sidepanelWidth?: number;
123
324
  /** Expanded width */
124
325
  expandedWidth?: number;
125
- /** Custom sx props */
326
+ /**
327
+ * Width in px of the history column in the expanded view. In a panel narrower than 600px (the
328
+ * `regular` container width) the column stacks above the thread at full width instead. The
329
+ * drawer itself never grows past the viewport (`max-width: 100vw`).
330
+ * @default 260
331
+ * @since 2.13.0
332
+ */
333
+ historyWidth?: number;
334
+ /**
335
+ * Styles for the root (the Drawer in the `drawer` presentation, the embedded `div` otherwise),
336
+ * applied after its own. Object, array and function forms all apply. Style the paper through
337
+ * `slotProps.paper`; a `& .MuiDrawer-paper` rule here still wins over the paper's own width.
338
+ */
126
339
  sx?: SxProps<Theme>;
340
+ /**
341
+ * Added to the root's class names.
342
+ * @since 2.13.0
343
+ */
344
+ className?: string;
345
+ /**
346
+ * Props for Trinity-owned slots (ADR-04 (6)): `root`, `paper`, `body`, `thread` and `composer`.
347
+ * @since 2.13.0
348
+ */
349
+ slotProps?: InsightEngineSlotProps;
127
350
  }
128
351
  /**
129
- * Example mock messages for development/testing.
130
- * Demonstrates both simple text and structured AIResponse formats.
131
- *
132
- * @example
133
- * ```tsx
134
- * import { MOCK_MESSAGES } from './InsightEngine';
352
+ * Props for InsightEngine. Besides its own props, the root takes the HTML attributes of a `div`
353
+ * (`id`, `data-*`, `aria-*`, event handlers), spread before its own (ADR-04). Owned attributes
354
+ * (`role`, `aria-live`, `aria-busy`, `aria-relevant`, `aria-atomic`, `aria-modal`) are ignored on
355
+ * the root, with a development warning.
135
356
  *
136
- * <InsightEngine messages={MOCK_MESSAGES} ... />
137
- * ```
357
+ * **The root and the ref target, per presentation** (H-15, recorded under ADR-04 as deliberate):
358
+ * the persistent drawer's root (`.MuiDrawer-docked`, as before H-15) on desktop; the modal
359
+ * drawer's root (the MUI Modal root, portalled to `body`) below `sm`; the embedded `div` (a
360
+ * region named by the title) in the `embedded` presentation.
138
361
  */
139
- export declare const MOCK_MESSAGES: ChatMessage[];
362
+ export interface InsightEngineProps extends InsightEngineOwnProps, TrinityRootProps<HTMLDivElement, InsightEngineOwnProps> {
363
+ }
140
364
  /**
141
365
  * InsightEngine - Pure composition container for AI chat interface.
142
366
  *
@@ -1 +1 @@
1
- {"version":3,"file":"InsightEngine.d.ts","sourceRoot":"","sources":["../../../src/components/AI/InsightEngine.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,KAAmB,MAAM,OAAO,CAAC;AACxC,OAAO,EAKL,OAAO,EACP,KAAK,EACN,MAAM,eAAe,CAAC;AAGvB,OAAO,EAAc,KAAK,YAAY,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,EAAmB,KAAK,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC1E,OAAO,EAAc,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;AAC5D,OAAO,EAAE,KAAK,gBAAgB,EAAE,KAAK,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAC5E,OAAO,EAAsB,KAAK,WAAW,EAAE,KAAK,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAM/F,iEAAiE;AACjE,YAAY,EAAE,gBAAgB,EAAE,YAAY,EAAE,CAAC;AAE/C,4CAA4C;AAC5C,YAAY,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,WAAW,kBAAkB;IACjC,gCAAgC;IAChC,MAAM,EAAE,OAAO,CAAC;IAChB,qBAAqB;IACrB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,wBAAwB;IACxB,eAAe,CAAC,EAAE,YAAY,CAAC;IAC/B,kBAAkB;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;;;OAKG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,I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,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAG/E,wBAAwB;IACxB,gBAAgB,CAAC,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;KAAE,CAAC,CAAC;IAGlE,sBAAsB;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,qBAAqB;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;;;;OAMG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;;OAIG;IACH,EAAE,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;IACpB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,SAAS,CAAC,EAAE,sBAAsB,CAAC;CACpC;AAED;;;;;;;;;;GAUG;AACH,MAAM,WAAW,kBAAmB,SAAQ,qBAAqB,EAAE,gBAAgB,CAAC,cAAc,EAAE,qBAAqB,CAAC;CAAG;AA2B7H;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,eAAO,MAAM,aAAa,2FAkfxB,CAAC;AAEH,eAAe,aAAa,CAAC"}
@@ -24,6 +24,7 @@ import React from 'react';
24
24
  import { SxProps, Theme } from '@mui/material';
25
25
  import { type MentionTrigger, type MentionOption, type MentionMatch } from '../MentionsInput';
26
26
  import { type AIVoiceStatus } from './AIVoiceMode';
27
+ import { type TrinityRootProps } from '../shared/rootProps';
27
28
  export interface ModelOption {
28
29
  /** Unique identifier */
29
30
  id: string;
@@ -100,16 +101,16 @@ export interface InsightEngineAction {
100
101
  keepOpenOnClick?: boolean;
101
102
  }
102
103
  /**
103
- * Props for InsightEngineInput component.
104
+ * InsightEngineInput's own props.
104
105
  */
105
- export interface InsightEngineInputProps {
106
+ export interface InsightEngineInputOwnProps {
106
107
  /** Current input value (controlled) */
107
108
  value?: string;
108
109
  /** Change handler for input */
109
110
  onChange?: (value: string) => void;
110
111
  /** Submit handler */
111
112
  onSubmit?: (value: string) => void;
112
- /** Placeholder text */
113
+ /** Placeholder text. Default: the `ai.insightEngineInput.placeholder` string. */
113
114
  placeholder?: string;
114
115
  /** Enable native mentions experience in input area */
115
116
  mentionsEnabled?: boolean;
@@ -121,6 +122,37 @@ export interface InsightEngineInputProps {
121
122
  onMentionsChange?: (mentions: MentionMatch[]) => void;
122
123
  /** Whether input is disabled */
123
124
  disabled?: boolean;
125
+ /**
126
+ * Blocks sending, with a visible reason (ADR-05 (6)), for example while a required
127
+ * clarification waits for an answer. Send becomes `aria-disabled` (never natively disabled, so
128
+ * it keeps focus and stays in the tab order), Enter and Send do not submit, and the field stays
129
+ * editable so the user can keep drafting (DN-13). The reason renders as helper text below the
130
+ * composer, and both the field and Send are described by it (`aria-describedby`). Native
131
+ * `disabled` is unchanged and is never set by this prop.
132
+ * @since 2.13.0
133
+ */
134
+ disabledReason?: string;
135
+ /**
136
+ * The sent message is waiting to be accepted (for example while the request starts). Send
137
+ * stays in place, `aria-disabled` and `aria-busy` (never natively disabled), so focus stays on
138
+ * it; a spinner replaces its icon; Enter and Send do not submit. The field stays editable.
139
+ * @since 2.13.0
140
+ */
141
+ pending?: boolean;
142
+ /**
143
+ * An answer is being generated. Send becomes a Stop button (named and tooltipped
144
+ * `ai.insightEngineInput.stopGenerating`, 'Stop generating') in the same place, so focus stays on it, and Enter does not submit.
145
+ * Stop calls `onStop` once per generation and emits the content-free `answer.stopped`
146
+ * interaction through `AIConfigProvider`'s `onInteraction`.
147
+ * @since 2.13.0
148
+ */
149
+ generating?: boolean;
150
+ /**
151
+ * Called when the user stops the answer being generated (the Stop button shown while
152
+ * `generating`). Replaces the deprecated AIChatInput's `onStopGeneration`.
153
+ * @since 2.13.0
154
+ */
155
+ onStop?: () => void;
124
156
  /** Available AI models */
125
157
  models?: ModelOption[];
126
158
  /** Currently selected model ID */
@@ -186,9 +218,20 @@ export interface InsightEngineInputProps {
186
218
  * mode is active.
187
219
  */
188
220
  glow?: boolean;
189
- /** Custom sx props */
221
+ /**
222
+ * Added to the root's own class names.
223
+ * @since 2.13.0
224
+ */
225
+ className?: string;
226
+ /** Custom sx props, applied after the root's own styles (object, array or function). */
190
227
  sx?: SxProps<Theme>;
191
228
  }
229
+ /**
230
+ * Props for InsightEngineInput: its own props, plus the HTML attributes of its root `div`
231
+ * (`id`, `data-*`, `aria-*`), which reach the root (ADR-04, WI-40).
232
+ */
233
+ export interface InsightEngineInputProps extends InsightEngineInputOwnProps, TrinityRootProps<HTMLDivElement, InsightEngineInputOwnProps> {
234
+ }
192
235
  export declare const InsightEngineInput: React.ForwardRefExoticComponent<InsightEngineInputProps & React.RefAttributes<HTMLDivElement>>;
193
236
  export default InsightEngineInput;
194
237
  //# sourceMappingURL=InsightEngineInput.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"InsightEngineInput.d.ts","sourceRoot":"","sources":["../../../src/components/AI/InsightEngineInput.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,KAAmD,MAAM,OAAO,CAAC;AACxE,OAAO,EAiBL,OAAO,EACP,KAAK,EACN,MAAM,eAAe,CAAC;AAIvB,OAAO,EAAiB,KAAK,cAAc,EAAE,KAAK,aAAa,EAAE,KAAK,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAC7G,OAAO,EAAe,KAAK,aAAa,EAAE,MAAM,eAAe,CAAC;AAMhE,MAAM,WAAW,WAAW;IAC1B,wBAAwB;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,oBAAoB;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,2BAA2B;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,yBAAyB;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,YAAY;IAC3B,wBAAwB;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,oBAAoB;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,yBAAyB;IACz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,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAG7C;;;;OAIG;IACH,OAAO,CAAC,EAAE,mBAAmB,EAAE,CAAC;IAGhC,qFAAqF;IACrF,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC/B;;;OAGG;IACH,WAAW,CAAC,EAAE,cAAc,EAAE,CAAC;IAC/B,mEAAmE;IACnE,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,IAAI,CAAC;IAC1C,gEAAgE;IAChE,YAAY,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,qGAAqG;IACrG,WAAW,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,8DAA8D;IAC9D,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,yFAAyF;IACzF,eAAe,CAAC,EAAE,MAAM,CAAC;IAGzB,wCAAwC;IACxC,UAAU,CAAC,EAAE,MAAM,CAAC;IAGpB,kCAAkC;IAClC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;OAIG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,wFAAwF;IACxF,EAAE,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;CACrB;AAED;;;GAGG;AACH,MAAM,WAAW,uBAAwB,SAAQ,0BAA0B,EAAE,gBAAgB,CAAC,cAAc,EAAE,0BAA0B,CAAC;CAAG;AAM5I,eAAO,MAAM,kBAAkB,gGAmkC7B,CAAC;AAEH,eAAe,kBAAkB,CAAC"}
@@ -0,0 +1,72 @@
1
+ /**
2
+ * @internal — not part of the public API; see ADR-02
3
+ *
4
+ * MessageActionButton: the one renderer of AIMessage's footer actions (master plan G-04a,
5
+ * ADR-13 (3)). AIMessage describes each built-in action (copy, share, download, and later
6
+ * regenerate) as a {@link BuiltInActionSpec} and renders it here, so the actions share one
7
+ * markup instead of copy-pasted blocks.
8
+ *
9
+ * - An icon-only MUI IconButton inside a Tooltip. The spec's one `label` is both the button's
10
+ * explicit `aria-label` and the tooltip text (ADR-13 (3), G-28), so what a sighted user reads
11
+ * is what a screen reader announces. The Tooltip stays in MUI's default naming mode (no
12
+ * `describeChild`), so the tooltip never adds a description that repeats the name.
13
+ * - The glyph is `text.secondary` at rest, 3:1 or more on the paper and default surfaces in
14
+ * every mode and preset (WCAG 1.4.11, G-04d); the spec's `hoverColor` is its colour on hover
15
+ * (a palette key such as `'success.main'`).
16
+ * - Keyboard focus is an outline (the theme's focus ring, `interactive.focus`), in `Highlight`
17
+ * under forced colours (ADR-33 (2)). The pointer target is at least 24 by 24 px
18
+ * (`targetSizeHitAreaSx`, WCAG 2.5.8).
19
+ * - Unavailable (`disabledReason`): the button is `aria-disabled` (never `disabled`, which drops
20
+ * focus), a VisuallyHidden reason describes it through `aria-describedby`, and the tooltip
21
+ * shows the label, then the reason. This is the one place the Tooltip describes its child
22
+ * (`describeChild`, OD-F13 A); the button's own `aria-describedby` wins over the tooltip's, so
23
+ * the reason is read once. Clicks do nothing.
24
+ * - Pending (`busy`, ADR-07): `aria-disabled` and `aria-busy`, focus stays, clicks do nothing.
25
+ * - Toggle (`pressed`, G-11): `aria-pressed`, and pressed draws the selected fill with an inset
26
+ * ring (not colour alone), an inset Highlight outline under forced colours. Without `pressed`
27
+ * the button is not a toggle and its styles are unchanged.
28
+ *
29
+ * Registered in src/components/internal/index.ts under AI ORGANISMS INTERNALS (G-30); no
30
+ * package entry exports it.
31
+ *
32
+ * @module components/AI/MessageActionButton
33
+ */
34
+ import * as React from 'react';
35
+ import { type IconName } from '../Icon';
36
+ /**
37
+ * One built-in footer action of AIMessage.
38
+ *
39
+ * @internal
40
+ */
41
+ export interface BuiltInActionSpec {
42
+ /** Stable id of the action, for example 'copy'. Also its React key. */
43
+ id: string;
44
+ /** The button's accessible name (`aria-label`) and its tooltip text: one string (ADR-13 (3)). */
45
+ label: string;
46
+ /** The glyph. An app action (G-11) may name any icon of the Icon set. */
47
+ icon: IconName | (string & {});
48
+ /** Runs the action. */
49
+ onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;
50
+ /** The glyph's colour on hover: a palette key, for example 'text.secondary'. */
51
+ hoverColor: string;
52
+ /** Why the action is unavailable now. Set, the button is aria-disabled and described by it. */
53
+ disabledReason?: string;
54
+ /** The action is running: aria-disabled and aria-busy, clicks do nothing (ADR-07). */
55
+ busy?: boolean;
56
+ /** Unavailable without a reason to show: aria-disabled, clicks do nothing (G-11). */
57
+ disabled?: boolean;
58
+ /** A toggle's state (G-11): sets `aria-pressed`. Leave it out for an action that is not a toggle. */
59
+ pressed?: boolean;
60
+ }
61
+ /** Props of {@link MessageActionButton}. @internal */
62
+ export interface MessageActionButtonProps {
63
+ /** The action to render. */
64
+ action: BuiltInActionSpec;
65
+ }
66
+ /**
67
+ * Renders one AIMessage footer action. See the module notes.
68
+ *
69
+ * @internal
70
+ */
71
+ export declare const MessageActionButton: React.ForwardRefExoticComponent<MessageActionButtonProps & React.RefAttributes<HTMLButtonElement>>;
72
+ //# sourceMappingURL=MessageActionButton.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MessageActionButton.d.ts","sourceRoot":"","sources":["../../../src/components/AI/MessageActionButton.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAQ/B,OAAO,EAAQ,KAAK,QAAQ,EAAE,MAAM,SAAS,CAAC;AAM9C;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAChC,uEAAuE;IACvE,EAAE,EAAE,MAAM,CAAC;IACX,iGAAiG;IACjG,KAAK,EAAE,MAAM,CAAC;IACd,yEAAyE;IACzE,IAAI,EAAE,QAAQ,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;IAC/B,uBAAuB;IACvB,O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