@trinityui/design-system 2.11.1 → 2.13.1

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 +2171 -0
  2. package/CONTRIBUTING.md +180 -69
  3. package/LICENSE +21 -0
  4. package/MIGRATION.md +508 -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 +17219 -9131
  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 +143 -8
  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 +18 -1
  352. package/dist/components/TopNavHeader.d.ts.map +1 -1
  353. package/dist/components/TopNavWithSidebar.d.ts +61 -2
  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 +13925 -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
@@ -0,0 +1,43 @@
1
+ /**
2
+ * @fileoverview useContainerInlineSize: an element's inline size from a ResizeObserver
3
+ * (master-plan H-20, ADR-11 (5), ADR-27).
4
+ * @module components/shared/useContainerInlineSize
5
+ *
6
+ * @internal — not part of the public API; see ADR-02
7
+ *
8
+ * For a switch CSS container queries cannot express: a structural change, such as
9
+ * ListDetailTemplate's split view becoming a list with a full-width drawer
10
+ * (`collapseMode="container"`). Styling that only changes properties uses
11
+ * `containerUp` / `containerDown` (containerQueries.ts) instead.
12
+ *
13
+ * Semantics:
14
+ *
15
+ * - The size is `null` until the element is measured: on the server and in the first client
16
+ * render, so hydration matches (ADR-27's stable initial value). Callers treat `null` as
17
+ * "wide enough" (the split layout).
18
+ * - The element is passed through the returned callback ref, so an element that is replaced
19
+ * (a new root node) is observed again.
20
+ * - The size is the border box's content inline size (`contentBoxSize[0].inlineSize`, else
21
+ * `contentRect.width`), updated on every ResizeObserver report; state changes only when the
22
+ * value changes.
23
+ * - Without ResizeObserver (an old engine, a server) the size stays `null`.
24
+ * - `enabled: false` observes nothing and reports `null`.
25
+ *
26
+ * @example
27
+ * ```tsx
28
+ * const [inlineSize, measureRef] = useContainerInlineSize<HTMLDivElement>({ enabled: collapseMode === 'container' });
29
+ * const handleRef = useForkRef(ref, measureRef);
30
+ * const collapsed = inlineSize !== null && inlineSize < threshold;
31
+ * ```
32
+ */
33
+ /** Options of {@link useContainerInlineSize}. @internal */
34
+ export interface UseContainerInlineSizeOptions {
35
+ /** Observe the element. Default `true`; `false` reports `null`. */
36
+ enabled?: boolean;
37
+ }
38
+ /**
39
+ * The inline size of the element given to the returned ref, or `null` before it is measured.
40
+ * @internal
41
+ */
42
+ export declare function useContainerInlineSize<El extends HTMLElement = HTMLElement>(options?: UseContainerInlineSizeOptions): [inlineSize: number | null, ref: (node: El | null) => void];
43
+ //# sourceMappingURL=useContainerInlineSize.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useContainerInlineSize.d.ts","sourceRoot":"","sources":["../../../src/components/shared/useContainerInlineSize.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAIH,2DAA2D;AAC3D,MAAM,WAAW,6BAA6B;IAC5C,mEAAmE;IACnE,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AASD;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,EAAE,SAAS,WAAW,GAAG,WAAW,EACzE,OAAO,GAAE,6BAAkC,GAC1C,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,EAAE,GAAG,EAAE,CAAC,IAAI,EAAE,EAAE,GAAG,IAAI,KAAK,IAAI,CAAC,CAqB7D"}
@@ -0,0 +1,35 @@
1
+ import { type AsyncActionResult } from '../../hooks';
2
+ /** Options of {@link useCopyAction}. @internal */
3
+ export interface UseCopyActionOptions {
4
+ /** Announced through `useAnnounce`: `success` politely, `error` assertively. */
5
+ messages?: {
6
+ success?: string;
7
+ error?: string;
8
+ };
9
+ /** Called with the copied text after a successful copy. */
10
+ onCopied?: (text: string) => void;
11
+ /** Called with the error after a failed copy. Without it the error goes to `globalThis.reportError`. */
12
+ onCopyError?: (error: unknown) => void;
13
+ /**
14
+ * How long `status` stays `'copied'` or `'error'`, in ms.
15
+ * @default 2000
16
+ */
17
+ feedbackDuration?: number;
18
+ }
19
+ /** Where the latest copy is. @internal */
20
+ export type CopyActionStatus = 'idle' | 'pending' | 'copied' | 'error';
21
+ /** Return value of {@link useCopyAction}. @internal */
22
+ export interface UseCopyActionResult {
23
+ /** Copies `text`. Resolves to the outcome; never rejects. Stable identity. */
24
+ copy: (text: string) => Promise<AsyncActionResult>;
25
+ status: CopyActionStatus;
26
+ /** Back to `'idle'`. Stable identity. */
27
+ reset: () => void;
28
+ }
29
+ /**
30
+ * Copies text through `useClipboard` and `useAsyncAction`, with failures surfaced. See the
31
+ * module notes.
32
+ * @internal
33
+ */
34
+ export declare function useCopyAction(options?: UseCopyActionOptions): UseCopyActionResult;
35
+ //# sourceMappingURL=useCopyAction.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useCopyAction.d.ts","sourceRoot":"","sources":["../../../src/components/shared/useCopyAction.ts"],"names":[],"mappings":"AAgCA,OAAO,EAAgC,KAAK,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAYnF,kDAAkD;AAClD,MAAM,WAAW,oBAAoB;IACnC,gFAAgF;IAChF,QAAQ,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAChD,2DAA2D;IAC3D,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,wGAAwG;IACxG,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,0CAA0C;AAC1C,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,SAAS,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEvE,uDAAuD;AACvD,MAAM,WAAW,mBAAmB;IAClC,8EAA8E;IAC9E,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,iBAAiB,CAAC,CAAC;IACnD,MAAM,EAAE,gBAAgB,CAAC;IACzB,yCAAyC;IACzC,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,OAAO,GAAE,oBAAyB,GAAG,mBAAmB,CAmDrF"}
@@ -0,0 +1,44 @@
1
+ /**
2
+ * @fileoverview useOverflow: whether an element's content overflows its box (master-plan D-43).
3
+ * @module components/shared/useOverflow
4
+ *
5
+ * @internal — not part of the public API; see ADR-02
6
+ *
7
+ * One measurement for every component that reacts to overflow: OverflowTooltip today,
8
+ * MetaChip truncation (D-04) and CodeBlock scrolling (D-07) next. Semantics:
9
+ *
10
+ * - The first render reports no overflow, on the server and on the client, so hydration
11
+ * matches.
12
+ * - The element is measured after layout, on every commit. A content change (a new value,
13
+ * streamed text) is measured without a dependency list.
14
+ * - It is measured again when a ResizeObserver reports the element and on window resize.
15
+ * Without ResizeObserver, window resize still works.
16
+ * - State changes only when a result changes, so a re-render or a resize with the same
17
+ * overflow causes no extra render.
18
+ * - The observer is disconnected and the resize listener removed on unmount.
19
+ *
20
+ * @example
21
+ * ```tsx
22
+ * const ref = React.useRef<HTMLSpanElement>(null);
23
+ * const { overflowX } = useOverflow(ref, { axis: 'x' });
24
+ * ```
25
+ */
26
+ import * as React from 'react';
27
+ /** Which overflow to measure. `'both'` (the default) measures both axes. */
28
+ export type OverflowAxis = 'x' | 'y' | 'both';
29
+ export interface UseOverflowOptions {
30
+ /** Which axis to measure. An axis left out always reports `false`. Default `'both'`. */
31
+ axis?: OverflowAxis;
32
+ }
33
+ export interface UseOverflowResult {
34
+ /** `scrollWidth` is larger than `clientWidth`. */
35
+ overflowX: boolean;
36
+ /** `scrollHeight` is larger than `clientHeight`. */
37
+ overflowY: boolean;
38
+ }
39
+ /**
40
+ * Reports whether the element in `ref` overflows horizontally and vertically.
41
+ * @internal
42
+ */
43
+ export declare function useOverflow(ref: React.RefObject<HTMLElement | null>, options?: UseOverflowOptions): UseOverflowResult;
44
+ //# sourceMappingURL=useOverflow.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useOverflow.d.ts","sourceRoot":"","sources":["../../../src/components/shared/useOverflow.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,4EAA4E;AAC5E,MAAM,MAAM,YAAY,GAAG,GAAG,GAAG,GAAG,GAAG,MAAM,CAAC;AAE9C,MAAM,WAAW,kBAAkB;IACjC,wFAAwF;IACxF,IAAI,CAAC,EAAE,YAAY,CAAC;CACrB;AAED,MAAM,WAAW,iBAAiB;IAChC,kDAAkD;IAClD,SAAS,EAAE,OAAO,CAAC;IACnB,oDAAoD;IACpD,SAAS,EAAE,OAAO,CAAC;CACpB;AAYD;;;GAGG;AACH,wBAAgB,WAAW,CACzB,GAAG,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,EACxC,OAAO,GAAE,kBAAuB,GAC/B,iBAAiB,CAuCnB"}
@@ -6,16 +6,24 @@
6
6
  * `ResizablePanel`, and any future drag-to-resize surface:
7
7
  *
8
8
  * 1. `mousedown` on a handle captures the start position + start size
9
+ * (the current size through the caller's clamp)
9
10
  * 2. Global `mousemove` listener updates size (clamped by the caller)
10
11
  * 3. Global `mouseup` ends the drag
11
12
  * 4. Optional body cursor lock and text-selection suppression during drag
12
13
  *
14
+ * The size can be uncontrolled (seeded once from `initialSize`) or controlled
15
+ * (`size` + `onSizeChange`), through MUI `useControlled` (ADR-35). Every size
16
+ * write — drag, `setSize`, `setSizeClamped` — goes through one internal
17
+ * commit that stores the size when uncontrolled and reports it through
18
+ * `onSizeChange` in both modes.
19
+ *
13
20
  * **Not used by `DockLayout`** — that component uses the HTML5 Drag-and-Drop
14
21
  * API (`DragEvent`, `dataTransfer`) for whole-panel moves between zones, which
15
22
  * is a fundamentally different mechanism. Don't try to unify them.
16
23
  *
17
24
  * @example
18
25
  * ```tsx
26
+ * // Uncontrolled: the hook owns the size.
19
27
  * const { size, isResizing, onMouseDown, setSize } = useResizable({
20
28
  * initialSize: 400,
21
29
  * axis: 'x',
@@ -26,11 +34,85 @@
26
34
  *
27
35
  * return <div onMouseDown={onMouseDown}>...</div>;
28
36
  * ```
37
+ *
38
+ * @example
39
+ * ```tsx
40
+ * // Controlled: the caller owns the size; the hook reports changes.
41
+ * const [width, setWidth] = React.useState(400);
42
+ * const { size, onMouseDown } = useResizable({
43
+ * initialSize: 400,
44
+ * size: width,
45
+ * onSizeChange: (next) => setWidth(next),
46
+ * axis: 'x',
47
+ * });
48
+ * ```
29
49
  */
30
50
  import * as React from 'react';
51
+ /**
52
+ * Why the size changed, as reported to `onSizeChange`.
53
+ *
54
+ * - `'drag'`: a mouse or touch drag on the handle (set by the hook).
55
+ * - `'keyboard'`: a key press on the handle. The hook binds no keys itself; the
56
+ * caller passes this reason to `setSize` / `setSizeClamped`.
57
+ * - `'set'`: any other `setSize` / `setSizeClamped` call (the default).
58
+ */
59
+ export type ResizeReason = 'drag' | 'keyboard' | 'set';
31
60
  export interface UseResizableOptions {
32
- /** Initial pixel size — can be a function for lazy/derived values */
61
+ /**
62
+ * Initial pixel size when uncontrolled — can be a function for lazy/derived
63
+ * values. Read once, on mount: later changes (a new number or a new
64
+ * function) are ignored, so a caller may recompute it on every render
65
+ * (e.g. `controlledSize ?? 200`) without resetting the size or triggering
66
+ * MUI's "changing the default size state" warning. When `size` is
67
+ * controlled it is still resolved on mount, but not used.
68
+ */
33
69
  initialSize: number | (() => number);
70
+ /**
71
+ * Controlled pixel size. When defined on the first render, the hook never
72
+ * changes the size on its own: drags and `setSize` / `setSizeClamped`
73
+ * report the next (clamped) size through `onSizeChange`, and the returned
74
+ * `size` changes only when this option changes. A drag starts from
75
+ * `clamp(size)`, so a controlled size outside the caller's bounds has no
76
+ * dead zone. The mode is decided on the first render; switching between
77
+ * `undefined` and a number afterwards is unsupported and logs MUI's
78
+ * controlled/uncontrolled warning in development (it names `name` and
79
+ * `stateName`). Implemented with MUI `useControlled` (ADR-35).
80
+ */
81
+ size?: number;
82
+ /**
83
+ * Component name shown in MUI's controlled/uncontrolled warning. A
84
+ * component built on the hook passes its own name, so the warning points
85
+ * at the component the consumer rendered (for example `'ResizablePanel'`).
86
+ * @internal
87
+ * @default 'useResizable'
88
+ */
89
+ name?: string;
90
+ /**
91
+ * Name of the controlled prop shown in MUI's controlled/uncontrolled
92
+ * warning (for example `'width'`).
93
+ * @internal
94
+ * @default 'size'
95
+ */
96
+ stateName?: string;
97
+ /**
98
+ * Turns drag resizing off. While true, `onMouseDown` and `onTouchStart`
99
+ * start nothing, and a drag already in progress ends at once: its global
100
+ * listeners and the body cursor lock are released, no further move is
101
+ * reported, and `onResizeEnd` fires once with the size it reached.
102
+ * `setSize` and `setSizeClamped` still work.
103
+ * @internal
104
+ * @default false
105
+ */
106
+ disabled?: boolean;
107
+ /**
108
+ * Fires with the next size on every write, in both controlled and
109
+ * uncontrolled mode: once per drag move (the clamped size, like `onResize`,
110
+ * including repeats of the same value at a bound) with reason `'drag'`, and
111
+ * once per `setSize` / `setSizeClamped` call with the reason passed there
112
+ * (default `'set'`). Not called when a controlled `size` changes. The latest
113
+ * function is always used (no re-binding needed).
114
+ */
115
+ onSizeChange?: (size: number, reason: ResizeReason) => void;
34
116
  /** Which axis the drag handle moves along */
35
117
  axis: 'x' | 'y';
36
118
  /**
@@ -45,7 +127,13 @@ export interface UseResizableOptions {
45
127
  onResize?: (size: number) => void;
46
128
  /** Fires once when drag begins */
47
129
  onResizeStart?: () => void;
48
- /** Fires once when drag ends (with the final size) */
130
+ /**
131
+ * Fires once when drag ends (with the final size). It runs in an effect
132
+ * after the commit in which `isResizing` turns false, so it reports the
133
+ * settled size (for a controlled `size`, the value the parent kept). A
134
+ * consumer that switches animations off while `isResizing` is true sees
135
+ * them come back one commit before this call.
136
+ */
49
137
  onResizeEnd?: (size: number) => void;
50
138
  /**
51
139
  * Lock body cursor + suppress text selection during drag. Default true.
@@ -59,7 +147,7 @@ export interface UseResizableOptions {
59
147
  dragCursor?: string;
60
148
  }
61
149
  export interface UseResizableReturn {
62
- /** Current pixel size */
150
+ /** Current pixel size: the controlled `size` when given, else the hook's own state */
63
151
  size: number;
64
152
  /** True while a drag is in progress */
65
153
  isResizing: boolean;
@@ -67,10 +155,20 @@ export interface UseResizableReturn {
67
155
  onMouseDown: (e: React.MouseEvent) => void;
68
156
  /** Attach to the drag handle's onTouchStart (mobile touch support) */
69
157
  onTouchStart: (e: React.TouchEvent) => void;
70
- /** Imperatively set the size (for keyboard nav, reset buttons, etc.) */
71
- setSize: (size: number) => void;
72
- /** Same as setSize but routes through clamp first */
73
- setSizeClamped: (size: number) => void;
158
+ /**
159
+ * Imperatively set the size (for keyboard nav, reset buttons, etc.). Stores
160
+ * it when uncontrolled and reports it through `onSizeChange` with `reason`.
161
+ * Stable identity.
162
+ * @param size Next pixel size, used as given (not clamped).
163
+ * @param reason Reported to `onSizeChange` (default `'set'`).
164
+ */
165
+ setSize: (size: number, reason?: ResizeReason) => void;
166
+ /**
167
+ * Same as setSize but routes through clamp first. Stable identity.
168
+ * @param size Next pixel size, clamped with the latest `clamp`.
169
+ * @param reason Reported to `onSizeChange` (default `'set'`).
170
+ */
171
+ setSizeClamped: (size: number, reason?: ResizeReason) => void;
74
172
  }
75
173
  /**
76
174
  * useResizable — React hook that owns the pointer-drag lifecycle for a
@@ -79,4 +177,5 @@ export interface UseResizableReturn {
79
177
  * The hook does NOT render anything. It's a headless primitive.
80
178
  */
81
179
  export declare function useResizable(options: UseResizableOptions): UseResizableReturn;
180
+ export { getResizeKeyTarget, RESIZE_KEY_STEP, RESIZE_KEY_LARGE_STEP, type ResizeKeyOptions, type ResizeOrientation, type ResizeGrowDirection, } from './resizeKeyboard';
82
181
  //# sourceMappingURL=useResizable.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useResizable.d.ts","sourceRoot":"","sources":["../../../src/components/shared/useResizable.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,MAAM,WAAW,mBAAmB;IAClC,qEAAqE;IACrE,WAAW,EAAE,MAAM,GAAG,CAAC,MAAM,MAAM,CAAC,CAAC;IACrC,6CAA6C;IAC7C,IAAI,EAAE,GAAG,GAAG,GAAG,CAAC;IAChB;;;;OAIG;IACH,SAAS,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IAClC,+EAA+E;IAC/E,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IACjC,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,kCAAkC;IAClC,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,sDAAsD;IACtD,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,kBAAkB;IACjC,yBAAyB;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,uCAAuC;IACvC,UAAU,EAAE,OAAO,CAAC;IACpB,8CAA8C;IAC9C,WAAW,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IAC3C,sEAAsE;IACtE,YAAY,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IAC5C,wEAAwE;IACxE,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,qDAAqD;IACrD,cAAc,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACxC;AAID;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,mBAAmB,GAAG,kBAAkB,CAoJ7E"}
1
+ {"version":3,"file":"useResizable.d.ts","sourceRoot":"","sources":["../../../src/components/shared/useResizable.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B;;;;;;;GAOG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,UAAU,GAAG,KAAK,CAAC;AAEvD,MAAM,WAAW,mBAAmB;IAClC;;;;;;;OAOG;IACH,WAAW,EAAE,MAAM,GAAG,CAAC,MAAM,MAAM,CAAC,CAAC;IACrC;;;;;;;;;;OAUG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;;OAKG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;;;;OAQG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;;;;OAOG;IACH,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,KAAK,IAAI,CAAC;IAC5D,6CAA6C;IAC7C,IAAI,EAAE,GAAG,GAAG,GAAG,CAAC;IAChB;;;;OAIG;IACH,SAAS,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IAClC,+EAA+E;IAC/E,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IACjC,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,kCAAkC;IAClC,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,kBAAkB;IACjC,sFAAsF;IACtF,IAAI,EAAE,MAAM,CAAC;IACb,uCAAuC;IACvC,UAAU,EAAE,OAAO,CAAC;IACpB,8CAA8C;IAC9C,WAAW,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IAC3C,sEAAsE;IACtE,YAAY,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IAC5C;;;;;;OAMG;IACH,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,YAAY,KAAK,IAAI,CAAC;IACvD;;;;OAIG;IACH,cAAc,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,YAAY,KAAK,IAAI,CAAC;CAC/D;AAKD;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,mBAAmB,GAAG,kBAAkB,CAwL7E;AAMD,OAAO,EACL,kBAAkB,EAClB,eAAe,EACf,qBAAqB,EACrB,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,GACzB,MAAM,kBAAkB,CAAC"}
@@ -1,30 +1,104 @@
1
1
  /**
2
- * @fileoverview Dev-only runtime warning for deprecated components.
2
+ * @fileoverview Development-only warnings: deprecations (ADR-30) and keyed one-time warnings.
3
3
  * @module components/shared/warnDeprecated
4
4
  *
5
- * Emits a single `console.warn` the first time a deprecated component is
6
- * rendered in the current session. Silent in production builds. IDEs already
7
- * strike through `@deprecated` JSDoc at the call site — this adds a runtime
8
- * signal for consumers who paste code without reading the hover hint (Replit
9
- * Agent output, LLM-generated code, copy-paste from Stack Overflow, etc.).
5
+ * @internal — not part of the public API; see ADR-02
10
6
  *
11
- * Each component should call this once at module scope (NOT inside the
12
- * render function) so the warning fires once per page load, not once per
13
- * render.
7
+ * Placement rule (ADR-30):
8
+ *
9
+ * 1. Never warn at module scope. A module-scope call warns every app that
10
+ * imports the chunk, whether or not it renders the component.
11
+ * 2. Never warn during render. Warn from an effect. `useDeprecationWarning`
12
+ * does this for you.
13
+ * 3. An unconditional deprecation (the whole component is deprecated) warns
14
+ * from a mount effect, keyed by the component name:
15
+ * `useDeprecationWarning('OldCard', 'v3.0', '`Card`')`.
16
+ * 4. A conditional deprecation (a deprecated prop is passed, or a default is
17
+ * relied on) warns from an effect keyed by `<Component>.<condition>`, and
18
+ * only when the condition holds:
19
+ * `useDeprecationWarning('Chart.legacyColors', 'v3.0', '`colors`', legacyColors !== undefined)`.
20
+ * 5. Trinity components that render a deprecated component on purpose wrap
21
+ * it in `DeprecationSuppressionContext.Provider value={true}`. The consumer
22
+ * cannot change that usage, so no warning fires for it.
23
+ * 6. Each key warns once per session. All warnings are development-only:
24
+ * production builds drop the warning code.
25
+ *
26
+ * `src/components/shared/__tests__/warnDeprecated.test.ts` enforces rule 1
27
+ * and 2 with an AST check over `src/components`. It holds a ratchet of the
28
+ * render-phase calls that are left; the ratchet can only go down.
29
+ *
30
+ * `warnOnce(key, message)` is the single helper for other development
31
+ * warnings (a missing handler, an unsupported value). Call it from an effect
32
+ * too, and keep the call inside the literal check
33
+ * `if (process.env.NODE_ENV !== 'production')`, so bundlers drop your message
34
+ * text as well as the helper.
35
+ *
36
+ * Tests: `src/test-setup.ts` calls `__resetDevWarnings()` after every test,
37
+ * so each test sees its own first warning.
14
38
  *
15
39
  * @example
16
40
  * ```tsx
17
- * // Top of AIChat.tsx:
18
- * warnDeprecated('AIChatMessage', 'v3.0', 'AIMessage from @trinityui/design-system');
19
- * export const AIChatMessage = ...;
41
+ * export function OldCard(props: OldCardProps) {
42
+ * useDeprecationWarning('OldCard', 'v3.0', '`Card`');
43
+ * return <Card {...props} />;
44
+ * }
45
+ *
46
+ * // Inside a Trinity component that still renders OldCard internally:
47
+ * <DeprecationSuppressionContext.Provider value={true}>
48
+ * <OldCard />
49
+ * </DeprecationSuppressionContext.Provider>
20
50
  * ```
21
51
  */
52
+ import * as React from 'react';
53
+ /**
54
+ * `true` inside a Trinity component that renders a deprecated component on
55
+ * purpose. `useDeprecationWarning` does not warn while it is `true`.
56
+ *
57
+ * @internal
58
+ */
59
+ export declare const DeprecationSuppressionContext: React.Context<boolean>;
60
+ /**
61
+ * Warns once per session that `componentName` is deprecated. Development only.
62
+ *
63
+ * Prefer `useDeprecationWarning` in components: it warns from an effect and
64
+ * respects `DeprecationSuppressionContext`. Call this function directly only
65
+ * from an effect, never at module scope or during render.
66
+ *
67
+ * @param componentName - The key and the name shown in the message, e.g.
68
+ * `'OldCard'` or `'Chart.legacyColors'`.
69
+ * @param removalVersion - The version that removes it, e.g. `'v3.0'`.
70
+ * @param replacement - What to use instead, as Markdown-style text.
71
+ */
22
72
  export declare function warnDeprecated(componentName: string, removalVersion: string, replacement: string): void;
23
73
  /**
24
- * Test-only helper — clear the warned-set so repeated test runs can observe
25
- * the warning. NOT part of the public API.
74
+ * Warns from an effect that `name` is deprecated (ADR-30). Development only.
75
+ * Does nothing inside `DeprecationSuppressionContext` or while `when` is
76
+ * `false`. Each `name` warns once per session.
77
+ *
78
+ * @param name - The component name, or `<Component>.<condition>` for a
79
+ * conditional deprecation.
80
+ * @param removalVersion - The version that removes it, e.g. `'v3.0'`.
81
+ * @param replacement - What to use instead.
82
+ * @param when - The deprecation condition. Defaults to `true` (unconditional).
83
+ *
84
+ * @internal
85
+ */
86
+ export declare function useDeprecationWarning(name: string, removalVersion: string, replacement: string, when?: boolean): void;
87
+ /**
88
+ * Logs `message` once per `key` per session. Development only. Call it from
89
+ * an effect, inside `if (process.env.NODE_ENV !== 'production')`.
90
+ *
91
+ * @param key - Identifies the warning, e.g. `'AIResponseRenderer.unknownBlock.chart'`.
92
+ * @param message - The text after the `[trinity]` prefix.
93
+ *
94
+ * @internal
95
+ */
96
+ export declare function warnOnce(key: string, message: string): void;
97
+ /**
98
+ * Test-only: forget every key that already warned, so the next call warns
99
+ * again. `src/test-setup.ts` calls it after each test.
26
100
  *
27
101
  * @internal
28
102
  */
29
- export declare function __resetDeprecationWarnings(): void;
103
+ export declare function __resetDevWarnings(): void;
30
104
  //# sourceMappingURL=warnDeprecated.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"warnDeprecated.d.ts","sourceRoot":"","sources":["../../../src/components/shared/warnDeprecated.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAMH,wBAAgB,cAAc,CAC5B,aAAa,EAAE,MAAM,EACrB,cAAc,EAAE,MAAM,EACtB,WAAW,EAAE,MAAM,GAClB,IAAI,CAeN;AAED;;;;;GAKG;AACH,wBAAgB,0BAA0B,IAAI,IAAI,CAEjD"}
1
+ {"version":3,"file":"warnDeprecated.d.ts","sourceRoot":"","sources":["../../../src/components/shared/warnDeprecated.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B;;;;;GAKG;AACH,eAAO,MAAM,6BAA6B,wBAAsC,CAAC;AAGjF;;;;;;;;;;;GAWG;AACH,wBAAgB,cAAc,CAC5B,aAAa,EAAE,MAAM,EACrB,cAAc,EAAE,MAAM,EACtB,WAAW,EAAE,MAAM,GAClB,IAAI,CAcN;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,MAAM,EACZ,cAAc,EAAE,MAAM,EACtB,WAAW,EAAE,MAAM,EACnB,IAAI,GAAE,OAAc,GACnB,IAAI,CAON;AAED;;;;;;;;GAQG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAQ3D;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,IAAI,IAAI,CAGzC"}
@@ -0,0 +1,62 @@
1
+ /**
2
+ * @fileoverview Named overlay layer roles on `theme.zIndex` (ADR-03-R12, master-plan E-46+).
3
+ * @module components/shared/zIndexRoles
4
+ *
5
+ * Remediation §5.6 names every overlay layer and bans arbitrary 1000, 1300 and 9999 values. The
6
+ * roles are offsets on MUI's own zIndex scale, which every MUI overlay already uses (Trinity's
7
+ * CSS z-index scale tops out at 1070, below MUI's modal, so it cannot order a toast or a skip
8
+ * link above an open dialog). No new absolute value is introduced.
9
+ *
10
+ * | Role | Value | Used by |
11
+ * |---|---|---|
12
+ * | `aiPanel` | `drawer - 1` | AppLayout's AI panel, under the header and the sidebar |
13
+ * | `appChrome` | `drawer + 1` | the application header |
14
+ * | `aiFab` | `drawer + 1` | the AI floating action button |
15
+ * | `popover` | `modal` | anchored listboxes and popovers (SearchInput's suggestions) |
16
+ * | `toast` | `snackbar` | Toast's stacks |
17
+ * | `skipLink` | `tooltip + 1` | SkipLink, above every overlay but the diagnostic layer |
18
+ * | `diagnostic` | `tooltip + 2` | emergency and diagnostic layers |
19
+ *
20
+ * `fab` (GoToTop) and `tooltip` are MUI's own keys and stay as they are.
21
+ *
22
+ * Trinity themes carry the roles on `theme.zIndex` (optional keys in the published types).
23
+ * Components read them through {@link getZIndexRole}, which derives the role from the theme's
24
+ * scale when a theme does not carry it (a plain `createTheme()`, a consumer theme), so a role
25
+ * always resolves (ADR-26). A theme extended from a Trinity theme
26
+ * (`createTheme(trinityTheme, { zIndex: { tooltip } })`) keeps the carried roles: override the
27
+ * role keys with the scale. Not exported from a package entry.
28
+ */
29
+ import type { Theme } from '@mui/material/styles';
30
+ /** The MUI zIndex keys the roles derive from. */
31
+ export interface ZIndexScale {
32
+ drawer: number;
33
+ modal: number;
34
+ snackbar: number;
35
+ tooltip: number;
36
+ }
37
+ /** The named overlay layer roles (ADR-03-R12). */
38
+ export interface TrinityZIndexRoles {
39
+ appChrome: number;
40
+ aiPanel: number;
41
+ aiFab: number;
42
+ popover: number;
43
+ toast: number;
44
+ skipLink: number;
45
+ diagnostic: number;
46
+ }
47
+ export type TrinityZIndexRole = keyof TrinityZIndexRoles;
48
+ /** Every role name, in stacking order (lowest first). */
49
+ export declare const Z_INDEX_ROLE_NAMES: readonly TrinityZIndexRole[];
50
+ /** The roles for a MUI zIndex scale: offsets only, no absolute value. */
51
+ export declare function zIndexRoles(scale: ZIndexScale): TrinityZIndexRoles;
52
+ /**
53
+ * The z-index of `role` for `theme`: the theme's own value when it carries the role (a Trinity
54
+ * theme, or a consumer override), else the value derived from the theme's MUI scale.
55
+ */
56
+ export declare function getZIndexRole(theme: Pick<Theme, 'zIndex'>, role: TrinityZIndexRole): number;
57
+ /**
58
+ * `theme` with every role on `theme.zIndex`, derived from its scale; a role the theme already
59
+ * carries is kept. The Trinity theme factories call it (E-46+ theme wire).
60
+ */
61
+ export declare function withZIndexRoles<T extends Pick<Theme, 'zIndex'>>(theme: T): T;
62
+ //# sourceMappingURL=zIndexRoles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zIndexRoles.d.ts","sourceRoot":"","sources":["../../../src/components/shared/zIndexRoles.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAElD,iDAAiD;AACjD,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,kDAAkD;AAClD,MAAM,WAAW,kBAAkB;IACjC,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,MAAM,iBAAiB,GAAG,MAAM,kBAAkB,CAAC;AAEzD,yDAAyD;AACzD,eAAO,MAAM,kBAAkB,EAAE,SAAS,iBAAiB,EAQzD,CAAC;AAEH,yEAAyE;AACzE,wBAAgB,WAAW,CAAC,KAAK,EAAE,WAAW,GAAG,kBAAkB,CAUlE;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,QAAQ,CAAC,EAAE,IAAI,EAAE,iBAAiB,GAAG,MAAM,CAG3F;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,CAAC,SAAS,IAAI,CAAC,KAAK,EAAE,QAAQ,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,CAG5E"}