@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
@@ -22,15 +22,25 @@
22
22
  * ```
23
23
  */
24
24
  import React from 'react';
25
+ import type { SxProps, Theme } from '@mui/material/styles';
26
+ import { type TrinityRootProps, type TrinitySlotProps } from '../shared/rootProps';
27
+ import { type HeadingLevel } from '../shared/headingLevel';
28
+ import { type AIMessageAction, type AIMessageGoldenDataset, type AIMessageProps } from './AIMessage';
29
+ import { type AIRelatedQuestion } from './AIRelatedQuestions';
25
30
  import { type AISourceCategory } from './AISourcesPanel';
26
31
  import { type AIResponse } from './types';
32
+ import type { AIActionErrorContext, AIBlockEvent, AIFeedbackEvent, AIFeedbackRating } from './types/hitl';
27
33
  /**
28
- * Message in the chat thread.
34
+ * A message in ChatThread (and InsightEngine), exported from the package root as
35
+ * `ChatThreadMessage` (G-14, ADR-16 (3)). Not the root `ChatMessage`, which is AppLayout's AI
36
+ * panel message: map one to the other explicitly.
29
37
  *
30
38
  * For user messages: only `content` is used.
31
39
  * For AI messages: use `response` for structured content, or `content` for simple text.
40
+ *
41
+ * @since 2.13.0
32
42
  */
33
- export interface ChatMessage {
43
+ export interface ChatThreadMessage {
34
44
  id: string;
35
45
  role: 'user' | 'assistant';
36
46
  /** Simple text content (required for user, fallback for assistant) */
@@ -40,32 +50,162 @@ export interface ChatMessage {
40
50
  * When present, this is rendered via AIResponseRenderer.
41
51
  */
42
52
  response?: AIResponse;
43
- /** Sources referenced in this response (using AISourcesPanel structure) */
53
+ /**
54
+ * Sources referenced in this response (using AISourcesPanel structure), shown in the message's
55
+ * `attachments`. Without them, `response.sources` is shown (through `toSourceCategories`); when
56
+ * both are present these win, with a development warning.
57
+ */
44
58
  sources?: AISourceCategory[];
45
- /** Related questions for this response */
46
- relatedQuestions?: string[];
59
+ /**
60
+ * Related questions for this response, shown in the message's `attachments`. Without them,
61
+ * `response.relatedQuestions` is shown; when both are present these win, with a development
62
+ * warning. Strings, or {@link AIRelatedQuestion} objects for an id and the verified flag
63
+ * (since 2.13.0); both can be mixed.
64
+ */
65
+ relatedQuestions?: Array<string | AIRelatedQuestion>;
47
66
  timestamp?: string;
48
67
  /**
49
- * Whether this assistant message is currently being streamed in. When true,
50
- * AIMessage renders the content region as `aria-live="polite"` so screen
51
- * readers announce incremental updates. Ignored for user messages.
68
+ * The rating already given to this assistant message, for example after a reload. It seeds the
69
+ * thumbs (AIMessage `defaultFeedback`): the thumbs then keep their own state, so writing the new
70
+ * rating back into the message after a click causes no controlled-switch warning.
71
+ * @since 2.13.0
72
+ */
73
+ feedback?: AIFeedbackRating | null;
74
+ /**
75
+ * Whether this assistant message is still being streamed in. Its article is `aria-busy` while
76
+ * it streams; when the flag turns false the thread announces 'Response ready' once. A message
77
+ * that arrives complete is read by the log as it is added, without that announcement. Ignored
78
+ * for user messages.
52
79
  */
53
80
  streaming?: boolean;
54
81
  }
55
82
  /**
56
- * Props for ChatThread component.
83
+ * The actions each assistant message offers, with the message they act on (G-05, DN-16 D1).
84
+ *
85
+ * An action shows only when its handler is passed, so no button does nothing. Copy is the
86
+ * exception: it always shows, and without `onCopy` it writes the message to the clipboard.
87
+ *
88
+ * Generic in the message type (G-14), so a host with its own message shape (AppLayout's AI panel)
89
+ * can type its callbacks with the same interface; ChatThread uses the default.
90
+ *
91
+ * @typeParam TMessage The message the callbacks receive. @default ChatThreadMessage
92
+ * @since 2.13.0
93
+ */
94
+ export interface ChatThreadMessageActions<TMessage extends {
95
+ id: string;
96
+ } = ChatThreadMessage> {
97
+ /**
98
+ * Called with the message and its text when Copy is pressed. With `copyBehavior` `'auto'` (the
99
+ * default), passing it makes Copy callback-only; without it, Copy writes to the clipboard.
100
+ */
101
+ onCopy?: (message: TMessage, text: string) => void;
102
+ /** What Copy does; see AIMessage's `copyBehavior`. @default 'auto' */
103
+ copyBehavior?: AIMessageProps['copyBehavior'];
104
+ /** Shows the rating thumbs. Called with the new rating, `null` when the rating is cleared. */
105
+ onFeedback?: (message: TMessage, value: AIFeedbackRating | null) => void;
106
+ /** Shows Share. */
107
+ onShare?: (message: TMessage) => void;
108
+ /** Shows Download. */
109
+ onDownload?: (message: TMessage) => void;
110
+ /**
111
+ * Shows Regenerate. A returned promise drives its pending state; a rejection shows the inline
112
+ * "Couldn't regenerate the response" alert with Try again.
113
+ */
114
+ onRegenerate?: (message: TMessage) => void | Promise<void>;
115
+ /**
116
+ * App actions for a message, after the built-in ones in its footer (AIMessage `actions`), for
117
+ * example 'Add to golden dataset'. A rejected action reaches `onActionError` with
118
+ * `{ source: 'action', actionId, messageId }`.
119
+ * @since 2.13.0
120
+ */
121
+ getActions?: (message: TMessage) => AIMessageAction[] | undefined;
122
+ /**
123
+ * The built-in 'Add to golden dataset' action of a message (GA-01; AIMessage `goldenDataset`):
124
+ * return `{ canAdd, onAdd, added }` for the message, or `undefined` for none. The action shows
125
+ * only when `canAdd` is true: your app decides who may add (for example data scientists), the
126
+ * design system never decides roles. `onAdd` receives `{ messageId, response }`; a rejection
127
+ * shows "Couldn't add to the golden dataset" with Try again and reaches `onActionError` with
128
+ * `{ source: 'action', actionId: 'golden', messageId }`. Read during render, like `getActions`.
129
+ * @since 2.13.0
130
+ */
131
+ getGoldenDataset?: (message: TMessage) => AIMessageGoldenDataset | undefined;
132
+ /**
133
+ * Sends detailed feedback (G-32, R18, R20, R22). When passed, each assistant message shows
134
+ * AIFeedbackControl in detailed mode instead of the plain thumbs: after a thumbs-down, 'Tell us
135
+ * what went wrong' opens a form (categories, a comment, and 'Rerun with this correction', which
136
+ * sets `event.rerun`: rerun the question with the correction when it is true). Called with
137
+ * the message and the form's event; return your request's promise: the form stays open while it
138
+ * runs, and a rejection shows its error and reaches `onActionError` with
139
+ * `{ source: 'action', actionId: 'feedback', messageId }`. The rating still reaches `onFeedback`.
140
+ * Replace or remove the control per message with `getMessageSlots` (`feedbackControl`).
141
+ * @since 2.13.0
142
+ */
143
+ onFeedbackSubmit?: (message: TMessage, event: AIFeedbackEvent) => void | Promise<void>;
144
+ }
145
+ /**
146
+ * The slots of one assistant message that ChatThread fills (G-13): see `getMessageSlots`.
147
+ *
148
+ * - `badges`: AIConfidenceBadge from `response.metadata.confidence` (with
149
+ * `metadata.confidenceRationale` as its rationale) and AIVerificationBadge from
150
+ * `response.metadata.verification`.
151
+ * - `feedbackControl`: AIFeedbackControl in detailed mode when `messageActions.onFeedbackSubmit` is
152
+ * passed; otherwise none (the built-in thumbs show when `messageActions.onFeedback` is passed).
153
+ * - `attachments`: AISourcesPanel and AIRelatedQuestions for the message's sources and related
154
+ * questions.
155
+ *
156
+ * A slot with nothing to show is `undefined`.
157
+ *
158
+ * @since 2.13.0
159
+ */
160
+ export interface ChatThreadMessageSlots {
161
+ badges?: React.ReactNode;
162
+ feedbackControl?: React.ReactNode;
163
+ attachments?: React.ReactNode;
164
+ }
165
+ /**
166
+ * Trinity-owned slots of ChatThread (ADR-04 (6)).
167
+ *
168
+ * @since 2.13.0
169
+ */
170
+ export interface ChatThreadSlotProps {
171
+ /**
172
+ * The default empty state's container (a `div`), rendered when `messages` is empty and no
173
+ * `emptyState` is passed. A custom `emptyState` renders as given, without this container.
174
+ */
175
+ emptyState?: TrinitySlotProps<HTMLDivElement>;
176
+ /**
177
+ * The messages' container inside the log (a `div` with `container-type: inline-size`). Constrain
178
+ * it here, for example a boxed layout's `maxWidth` with `marginInline: 'auto'`: the log stays the
179
+ * scroll container, so its scrollbar stays at the host's edge.
180
+ * @since 2.13.0
181
+ */
182
+ content?: TrinitySlotProps<HTMLDivElement>;
183
+ }
184
+ /**
185
+ * ChatThread's own props, without the root element's HTML attributes.
57
186
  */
58
- export interface ChatThreadProps {
59
- messages: ChatMessage[];
60
- relatedQuestions?: string[];
187
+ export interface ChatThreadOwnProps {
188
+ messages: ChatThreadMessage[];
189
+ /**
190
+ * Related questions after the last message, shown only when no message shows its own. Strings,
191
+ * or {@link AIRelatedQuestion} objects for an id and the verified flag (since 2.13.0).
192
+ */
193
+ relatedQuestions?: Array<string | AIRelatedQuestion>;
194
+ /** Called with the text of a picked related question (a message's or the thread's). */
61
195
  onRelatedQuestionClick?: (q: string) => void;
196
+ /**
197
+ * Called with a picked related question (a string is passed as `{ text }`) and its index in its
198
+ * list, after `onRelatedQuestionClick`. Forwarded to AIRelatedQuestions' `onQuestionSelect`.
199
+ * @since 2.13.0
200
+ */
201
+ onRelatedQuestionSelect?: (question: AIRelatedQuestion, index: number) => void;
62
202
  suggestedActions?: Array<{
63
203
  label: string;
64
204
  onClick?: () => void;
65
205
  }>;
66
206
  /**
67
207
  * Custom empty-state content rendered when `messages` is empty. Defaults to
68
- * a centered chat icon with "Start a conversation" text. Pass your own
208
+ * a centered chat icon with "Start a conversation" text (`ai.chatThread.empty`). Pass your own
69
209
  * ReactNode to customize (e.g. suggested prompts, onboarding tips).
70
210
  *
71
211
  * @example
@@ -77,6 +217,116 @@ export interface ChatThreadProps {
77
217
  * ```
78
218
  */
79
219
  emptyState?: React.ReactNode;
220
+ /**
221
+ * The actions of each assistant message (G-05). Each action shows only when its handler is
222
+ * passed; Copy always shows and, without `onCopy`, writes to the clipboard.
223
+ * @since 2.13.0
224
+ */
225
+ messageActions?: ChatThreadMessageActions;
226
+ /**
227
+ * Renders a visually hidden heading of this level before each message ('Your message',
228
+ * 'Assistant response'), so screen-reader users can move between messages by heading. No
229
+ * heading without it. With it, the markdown headings of a response move down by the same
230
+ * number of levels (AIMessage `headingOffset`), so a response's `#` sits one level under its
231
+ * message heading: with `headingLevel={3}` under a panel's h2 title, `#` renders an h4.
232
+ * @since 2.13.0
233
+ */
234
+ headingLevel?: HeadingLevel;
235
+ /**
236
+ * Replaces the default assistant avatar of every assistant message (AIMessage `avatar`). Make it
237
+ * fill the 32px avatar column: thread-level related questions and suggested actions align to the
238
+ * content column after it.
239
+ * @since 2.13.0
240
+ */
241
+ assistantAvatar?: React.ReactNode;
242
+ /**
243
+ * Replaces the default user avatar of every user message (UserMessage `avatar`), for example
244
+ * `<UserAvatar size="small" initials="JD" />`. Make it fill the 32px avatar column.
245
+ * @since 2.13.0
246
+ */
247
+ userAvatar?: React.ReactNode;
248
+ /**
249
+ * Called with the message and what the user did in an interactive block of its response
250
+ * (answered a clarification, confirmed a plan). Return the promise of your request: it drives the
251
+ * block's pending state, and a rejection shows the block's error and reaches `onActionError`
252
+ * with `{ source: 'block', blockId, messageId }`.
253
+ * @since 2.13.0
254
+ */
255
+ onBlockEvent?: (message: ChatThreadMessage, event: AIBlockEvent) => void | Promise<void>;
256
+ /**
257
+ * Block renderers by block type for every message's response. ChatThread renders the
258
+ * interactive blocks by default with `hitlBlockRenderers` (query, clarification, plan review);
259
+ * an entry here wins over the default for its type, and `null` turns a default off (for
260
+ * example `{ clarification: null }`). Keep the object stable (module scope or `useMemo`): a new
261
+ * object rebuilds the merged map.
262
+ * @since 2.13.0
263
+ */
264
+ blockRenderers?: AIMessageProps['blockRenderers'];
265
+ /**
266
+ * Renders any block first, passed to each message's AIResponseRenderer: return a node, `null`
267
+ * to skip the block, or `undefined` to fall through.
268
+ * @since 2.13.0
269
+ */
270
+ renderBlock?: AIMessageProps['renderBlock'];
271
+ /**
272
+ * Overrides the slots ChatThread fills for an assistant message (see
273
+ * {@link ChatThreadMessageSlots}). Return a node to replace a slot, `null` to leave it empty, or
274
+ * leave the key out to keep the default. The second argument holds the slots ChatThread built
275
+ * for this message, so you can extend them instead of replacing them. This is also the way to
276
+ * put AIChainOfThought reasoning into a message:
277
+ *
278
+ * ```tsx
279
+ * getMessageSlots={(message, defaults) => ({
280
+ * attachments: <>{reasoningFor(message)}{defaults.attachments}</>,
281
+ * badges: null, // no automatic confidence or verification badge
282
+ * })}
283
+ * ```
284
+ * @since 2.13.0
285
+ */
286
+ getMessageSlots?: (message: ChatThreadMessage, defaults: ChatThreadMessageSlots) => {
287
+ [K in keyof ChatThreadMessageSlots]?: React.ReactNode | null;
288
+ } | undefined;
289
+ /**
290
+ * Called when an action of a message fails: Regenerate, Copy's clipboard write, an app action
291
+ * (`{ source: 'action', actionId }`) or a block event (`{ source: 'block', blockId }`), with the
292
+ * message's `messageId` added. Without it, the error goes to `globalThis.reportError`.
293
+ * @since 2.13.0
294
+ */
295
+ onActionError?: (error: unknown, context: AIActionErrorContext) => void;
296
+ /**
297
+ * Added to the root's own class names.
298
+ * @since 2.13.0
299
+ */
300
+ className?: string;
301
+ /**
302
+ * Styles for the root (the log), applied after its own. Object, array and function forms all
303
+ * apply.
304
+ * @since 2.13.0
305
+ */
306
+ sx?: SxProps<Theme>;
307
+ /**
308
+ * Props for Trinity-owned slots (ADR-04 (6)): `className`, `sx`, `id`, `data-*` and the
309
+ * slot element's HTML attributes. Owned attributes (`role`, `aria-live`, ...) are ignored.
310
+ * @since 2.13.0
311
+ */
312
+ slotProps?: ChatThreadSlotProps;
313
+ }
314
+ /**
315
+ * Props for ChatThread component.
316
+ *
317
+ * Besides its own props, the root takes the HTML attributes of its `div` (`id`, `data-*`,
318
+ * `aria-*`, event handlers), spread before its own attributes (ADR-04). ChatThread owns `role`,
319
+ * `aria-live`, `aria-relevant` and `aria-atomic` on the root: a consumer value for one of them is
320
+ * ignored, with a development warning. A consumer `aria-label` replaces the default
321
+ * 'Chat messages' name (`ai.chatThread.logLabel`, from the nearest AIConfigProvider).
322
+ *
323
+ * **Screen readers (G-06, ADR-19).** The root is one log (`role="log"`, `aria-live="polite"`,
324
+ * `aria-relevant="additions"`): a message is read when it is added. Each message is an article
325
+ * ('Your message', 'Assistant response'); nothing inside the log is live on its own. When a
326
+ * streamed message completes (`streaming` turns false), 'Response ready' is announced once,
327
+ * through two visually hidden regions rendered after the log, as its siblings.
328
+ */
329
+ export interface ChatThreadProps extends ChatThreadOwnProps, TrinityRootProps<HTMLDivElement, ChatThreadOwnProps> {
80
330
  }
81
331
  /**
82
332
  * ChatThread - Scrollable messages area.
@@ -1 +1 @@
1
- {"version":3,"file":"ChatThread.d.ts","sourceRoot":"","sources":["../../../src/components/AI/ChatThread.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,EAAkB,KAAK,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAGzE,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C;;;;;GAKG;AACH,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,GAAG,WAAW,CAAC;IAC3B,sEAAsE;IACtE,OAAO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ACnB;;;;OAIG;IACH,EAAE,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;IACpB;;;;OAIG;IACH,SAAS,CAAC,EAAE,mBAAmB,CAAC;CACjC;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,eAAgB,SAAQ,kBAAkB,EAAE,gBAAgB,CAAC,cAAc,EAAE,kBAAkB,CAAC;CAAG;AA0VpH;;;;;;;;;;GAUG;AACH,eAAO,MAAM,UAAU,wFAmKrB,CAAC;AAoEH,eAAe,UAAU,CAAC"}
@@ -0,0 +1,14 @@
1
+ import type { Context } from 'react';
2
+ /**
3
+ * `true` inside a ChatThread's live container; `false` everywhere else.
4
+ *
5
+ * @example
6
+ * ```tsx
7
+ * const inThread = useContext(InThreadContext);
8
+ * const live = !inThread && streaming ? liveRegionProps({ politeness: 'polite' }) : {};
9
+ * ```
10
+ *
11
+ * @internal
12
+ */
13
+ export declare const InThreadContext: Context<boolean>;
14
+ //# sourceMappingURL=InThreadContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InThreadContext.d.ts","sourceRoot":"","sources":["../../../src/components/AI/InThreadContext.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAUrC;;;;;;;;;;GAUG;AACH,eAAO,MAAM,eAAe,EAAE,OAAO,CAAC,OAAO,CAA2C,CAAC"}