@trinityui/design-system 2.11.0 → 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.
- package/CHANGELOG.md +2209 -0
- package/CONTRIBUTING.md +180 -69
- package/LICENSE +21 -0
- package/MIGRATION.md +523 -21
- package/README.md +281 -120
- package/dist/IllustratedMessage.js +546 -1341
- package/dist/accessibility.d.ts +596 -18
- package/dist/accessibility.d.ts.map +1 -1
- package/dist/accessibility.js +458 -0
- package/dist/app-shell.js +17230 -9097
- package/dist/assets/index.d.ts +1 -1
- package/dist/charts.js +8507 -6059
- package/dist/color-contrast.d.ts +35 -0
- package/dist/color-contrast.d.ts.map +1 -0
- package/dist/commonjs-helpers.js +8 -0
- package/dist/component-color-references.d.ts +175 -0
- package/dist/component-color-references.d.ts.map +1 -0
- package/dist/components/AI/AIActions.d.ts +72 -12
- package/dist/components/AI/AIActions.d.ts.map +1 -1
- package/dist/components/AI/AIAvatar.d.ts +31 -3
- package/dist/components/AI/AIAvatar.d.ts.map +1 -1
- package/dist/components/AI/AIChainOfThought.d.ts +192 -72
- package/dist/components/AI/AIChainOfThought.d.ts.map +1 -1
- package/dist/components/AI/AIChainOfThought.types.d.ts +296 -34
- package/dist/components/AI/AIChainOfThought.types.d.ts.map +1 -1
- package/dist/components/AI/AIChainOfThought.utils.d.ts +25 -7
- package/dist/components/AI/AIChainOfThought.utils.d.ts.map +1 -1
- package/dist/components/AI/AIChat.d.ts +12 -0
- package/dist/components/AI/AIChat.d.ts.map +1 -1
- package/dist/components/AI/AIChatWelcome.d.ts +254 -0
- package/dist/components/AI/AIChatWelcome.d.ts.map +1 -0
- package/dist/components/AI/AIClarificationPrompt.d.ts +134 -0
- package/dist/components/AI/AIClarificationPrompt.d.ts.map +1 -0
- package/dist/components/AI/AIConfidenceBadge.d.ts +117 -0
- package/dist/components/AI/AIConfidenceBadge.d.ts.map +1 -0
- package/dist/components/AI/AIConfigContext.d.ts +100 -0
- package/dist/components/AI/AIConfigContext.d.ts.map +1 -0
- package/dist/components/AI/AIConfigProvider.d.ts +66 -0
- package/dist/components/AI/AIConfigProvider.d.ts.map +1 -0
- package/dist/components/AI/AIContainer.d.ts +80 -11
- package/dist/components/AI/AIContainer.d.ts.map +1 -1
- package/dist/components/AI/AIExplainability.d.ts +39 -5
- package/dist/components/AI/AIExplainability.d.ts.map +1 -1
- package/dist/components/AI/AIFeedbackControl.d.ts +113 -0
- package/dist/components/AI/AIFeedbackControl.d.ts.map +1 -0
- package/dist/components/AI/AIFeedbackForm.d.ts +117 -0
- package/dist/components/AI/AIFeedbackForm.d.ts.map +1 -0
- package/dist/components/AI/AIFeedbackHostContext.d.ts +16 -0
- package/dist/components/AI/AIFeedbackHostContext.d.ts.map +1 -0
- package/dist/components/AI/AILabel.d.ts +39 -6
- package/dist/components/AI/AILabel.d.ts.map +1 -1
- package/dist/components/AI/AIMessage.d.ts +337 -42
- package/dist/components/AI/AIMessage.d.ts.map +1 -1
- package/dist/components/AI/AIPlanReview.d.ts +194 -0
- package/dist/components/AI/AIPlanReview.d.ts.map +1 -0
- package/dist/components/AI/AIQueryDisclosure.d.ts +119 -0
- package/dist/components/AI/AIQueryDisclosure.d.ts.map +1 -0
- package/dist/components/AI/AIRelatedQuestions.d.ts +50 -11
- package/dist/components/AI/AIRelatedQuestions.d.ts.map +1 -1
- package/dist/components/AI/AIResponseRenderer.d.ts +133 -21
- package/dist/components/AI/AIResponseRenderer.d.ts.map +1 -1
- package/dist/components/AI/AIResponseSourcesContext.d.ts +83 -0
- package/dist/components/AI/AIResponseSourcesContext.d.ts.map +1 -0
- package/dist/components/AI/AIReviewItem.d.ts +142 -0
- package/dist/components/AI/AIReviewItem.d.ts.map +1 -0
- package/dist/components/AI/AISourceChip.d.ts +135 -0
- package/dist/components/AI/AISourceChip.d.ts.map +1 -0
- package/dist/components/AI/AISources.d.ts +91 -13
- package/dist/components/AI/AISources.d.ts.map +1 -1
- package/dist/components/AI/AISourcesPanel.d.ts +43 -7
- package/dist/components/AI/AISourcesPanel.d.ts.map +1 -1
- package/dist/components/AI/AITextBlock.d.ts +107 -17
- package/dist/components/AI/AITextBlock.d.ts.map +1 -1
- package/dist/components/AI/AITextBlock.parser.d.ts +153 -0
- package/dist/components/AI/AITextBlock.parser.d.ts.map +1 -0
- package/dist/components/AI/AIVerificationBadge.d.ts +94 -0
- package/dist/components/AI/AIVerificationBadge.d.ts.map +1 -0
- package/dist/components/AI/AIVisuals.d.ts +92 -23
- package/dist/components/AI/AIVisuals.d.ts.map +1 -1
- package/dist/components/AI/AIVoiceInput.d.ts +42 -11
- package/dist/components/AI/AIVoiceInput.d.ts.map +1 -1
- package/dist/components/AI/AIVoiceMode.d.ts +16 -2
- package/dist/components/AI/AIVoiceMode.d.ts.map +1 -1
- package/dist/components/AI/BlockErrorBoundary.d.ts +77 -0
- package/dist/components/AI/BlockErrorBoundary.d.ts.map +1 -0
- package/dist/components/AI/ChatHeader.d.ts +41 -4
- package/dist/components/AI/ChatHeader.d.ts.map +1 -1
- package/dist/components/AI/ChatHistoryList.d.ts +25 -12
- package/dist/components/AI/ChatHistoryList.d.ts.map +1 -1
- package/dist/components/AI/ChatThread.d.ts +263 -13
- package/dist/components/AI/ChatThread.d.ts.map +1 -1
- package/dist/components/AI/InThreadContext.d.ts +14 -0
- package/dist/components/AI/InThreadContext.d.ts.map +1 -0
- package/dist/components/AI/InsightEngine.d.ts +270 -46
- package/dist/components/AI/InsightEngine.d.ts.map +1 -1
- package/dist/components/AI/InsightEngineInput.d.ts +52 -5
- package/dist/components/AI/InsightEngineInput.d.ts.map +1 -1
- package/dist/components/AI/MessageActionButton.d.ts +72 -0
- package/dist/components/AI/MessageActionButton.d.ts.map +1 -0
- package/dist/components/AI/QueryInput.d.ts.map +1 -1
- package/dist/components/AI/UserAvatar.d.ts +50 -4
- package/dist/components/AI/UserAvatar.d.ts.map +1 -1
- package/dist/components/AI/UserMessage.d.ts +32 -3
- package/dist/components/AI/UserMessage.d.ts.map +1 -1
- package/dist/components/AI/blockRendererContext.d.ts +64 -0
- package/dist/components/AI/blockRendererContext.d.ts.map +1 -0
- package/dist/components/AI/hitlBlockRenderers.d.ts +48 -0
- package/dist/components/AI/hitlBlockRenderers.d.ts.map +1 -0
- package/dist/components/AI/index.d.ts +23 -6
- package/dist/components/AI/index.d.ts.map +1 -1
- package/dist/components/AI/moleculeBlockRenderers.d.ts +15 -0
- package/dist/components/AI/moleculeBlockRenderers.d.ts.map +1 -0
- package/dist/components/AI/planReviewBlockRenderer.d.ts +8 -0
- package/dist/components/AI/planReviewBlockRenderer.d.ts.map +1 -0
- package/dist/components/AI/strings/defaults.d.ts +31 -0
- package/dist/components/AI/strings/defaults.d.ts.map +1 -0
- package/dist/components/AI/tokens.d.ts +185 -20
- package/dist/components/AI/tokens.d.ts.map +1 -1
- package/dist/components/AI/types/hitl.d.ts +2294 -0
- package/dist/components/AI/types/hitl.d.ts.map +1 -0
- package/dist/components/AI/types/index.d.ts +2 -1
- package/dist/components/AI/types/index.d.ts.map +1 -1
- package/dist/components/AI/types/response.d.ts +428 -40
- package/dist/components/AI/types/response.d.ts.map +1 -1
- package/dist/components/AI/useBlockSources.d.ts +67 -0
- package/dist/components/AI/useBlockSources.d.ts.map +1 -0
- package/dist/components/AI/useBrowserVoiceMode.d.ts +31 -2
- package/dist/components/AI/useBrowserVoiceMode.d.ts.map +1 -1
- package/dist/components/AI/useWelcomeComposerHandoff.d.ts +30 -0
- package/dist/components/AI/useWelcomeComposerHandoff.d.ts.map +1 -0
- package/dist/components/AI/utils/alphaIndex.d.ts +19 -0
- package/dist/components/AI/utils/alphaIndex.d.ts.map +1 -0
- package/dist/components/AI/utils/blockReady.d.ts +54 -0
- package/dist/components/AI/utils/blockReady.d.ts.map +1 -0
- package/dist/components/AI/utils/blocks.d.ts +28 -0
- package/dist/components/AI/utils/blocks.d.ts.map +1 -0
- package/dist/components/AI/utils/confidence.d.ts +182 -0
- package/dist/components/AI/utils/confidence.d.ts.map +1 -0
- package/dist/components/AI/utils/filters.d.ts +31 -0
- package/dist/components/AI/utils/filters.d.ts.map +1 -0
- package/dist/components/AI/utils/responseText.d.ts +8 -0
- package/dist/components/AI/utils/responseText.d.ts.map +1 -0
- package/dist/components/AI/utils/sources.d.ts +110 -0
- package/dist/components/AI/utils/sources.d.ts.map +1 -0
- package/dist/components/AIDigestCard/AIDigestCard.d.ts.map +1 -1
- package/dist/components/AIDigestCard/types.d.ts +42 -5
- package/dist/components/AIDigestCard/types.d.ts.map +1 -1
- package/dist/components/AppLayout/AIFab.d.ts +33 -6
- package/dist/components/AppLayout/AIFab.d.ts.map +1 -1
- package/dist/components/AppLayout/AIFabLayout.deprecated.d.ts.map +1 -1
- package/dist/components/AppLayout/AppLayout.d.ts +135 -7
- package/dist/components/AppLayout/AppLayout.d.ts.map +1 -1
- package/dist/components/AppLayout/InsightEnginePanel.d.ts +315 -21
- package/dist/components/AppLayout/InsightEnginePanel.d.ts.map +1 -1
- package/dist/components/AppLayout/ResizablePanel.d.ts +145 -8
- package/dist/components/AppLayout/ResizablePanel.d.ts.map +1 -1
- package/dist/components/AppLayout/ThreadHistorySidebar.d.ts +6 -0
- package/dist/components/AppLayout/ThreadHistorySidebar.d.ts.map +1 -1
- package/dist/components/AppLayout/index.d.ts +3 -3
- package/dist/components/AppLayout/index.d.ts.map +1 -1
- package/dist/components/AppLayout/insightEnginePanel.demo.d.ts +32 -0
- package/dist/components/AppLayout/insightEnginePanel.demo.d.ts.map +1 -0
- package/dist/components/AppLayout/panelPropsPath.d.ts +26 -0
- package/dist/components/AppLayout/panelPropsPath.d.ts.map +1 -0
- package/dist/components/AppLayout/panelResizeTransition.d.ts +49 -0
- package/dist/components/AppLayout/panelResizeTransition.d.ts.map +1 -0
- package/dist/components/AppLayout/toChatThreadMessage.d.ts +40 -0
- package/dist/components/AppLayout/toChatThreadMessage.d.ts.map +1 -0
- package/dist/components/AssessmentDrawer/AssessmentDrawer.d.ts +5 -1
- package/dist/components/AssessmentDrawer/AssessmentDrawer.d.ts.map +1 -1
- package/dist/components/AuditDrawer/AuditDrawer.d.ts +4 -3
- package/dist/components/AuditDrawer/AuditDrawer.d.ts.map +1 -1
- package/dist/components/AuditDrawer/index.d.ts +1 -1
- package/dist/components/AuditDrawer/index.d.ts.map +1 -1
- package/dist/components/AuditDrawer/types.d.ts +39 -5
- package/dist/components/AuditDrawer/types.d.ts.map +1 -1
- package/dist/components/Autocomplete/Autocomplete.d.ts +6 -1
- package/dist/components/Autocomplete/Autocomplete.d.ts.map +1 -1
- package/dist/components/BulkActionDock/BulkActionDock.d.ts.map +1 -1
- package/dist/components/Carousel/Carousel.d.ts +10 -2
- package/dist/components/Carousel/Carousel.d.ts.map +1 -1
- package/dist/components/Charts/AreaChart.d.ts.map +1 -1
- package/dist/components/Charts/BarChart.d.ts.map +1 -1
- package/dist/components/Charts/ChartWrapper.d.ts.map +1 -1
- package/dist/components/Charts/ComposedChart.d.ts.map +1 -1
- package/dist/components/Charts/CustomLegend.d.ts +11 -2
- package/dist/components/Charts/CustomLegend.d.ts.map +1 -1
- package/dist/components/Charts/LineChart.d.ts.map +1 -1
- package/dist/components/Charts/PieChart.d.ts.map +1 -1
- package/dist/components/Charts/RadialChart.d.ts.map +1 -1
- package/dist/components/Charts/ScatterChart.d.ts.map +1 -1
- package/dist/components/Charts/Sparkline.d.ts.map +1 -1
- package/dist/components/Charts/gaugeGeometry.d.ts +35 -0
- package/dist/components/Charts/gaugeGeometry.d.ts.map +1 -0
- package/dist/components/Charts/highcharts.d.ts +23 -0
- package/dist/components/Charts/highcharts.d.ts.map +1 -0
- package/dist/components/Charts/highchartsUtils.d.ts +101 -6
- package/dist/components/Charts/highchartsUtils.d.ts.map +1 -1
- package/dist/components/Charts/index.d.ts +1 -1
- package/dist/components/Charts/index.d.ts.map +1 -1
- package/dist/components/Charts/tokens.d.ts +21 -0
- package/dist/components/Charts/tokens.d.ts.map +1 -1
- package/dist/components/Charts/types.d.ts +7 -7
- package/dist/components/Charts/types.d.ts.map +1 -1
- package/dist/components/ChipsInput/ChipsInput.d.ts.map +1 -1
- package/dist/components/ChoiceChips/ChoiceChips.d.ts +106 -0
- package/dist/components/ChoiceChips/ChoiceChips.d.ts.map +1 -0
- package/dist/components/ClearableTextField/ClearableTextField.d.ts +23 -2
- package/dist/components/ClearableTextField/ClearableTextField.d.ts.map +1 -1
- package/dist/components/CodeBlock/CodeBlock.d.ts +80 -0
- package/dist/components/CodeBlock/CodeBlock.d.ts.map +1 -0
- package/dist/components/Combobox/Combobox.d.ts +3 -2
- package/dist/components/Combobox/Combobox.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPalette.d.ts +54 -3
- package/dist/components/CommandPalette/CommandPalette.d.ts.map +1 -1
- package/dist/components/CommandPalette/index.d.ts +1 -1
- package/dist/components/CommandPalette/index.d.ts.map +1 -1
- package/dist/components/CopyButton/CopyButton.d.ts +80 -0
- package/dist/components/CopyButton/CopyButton.d.ts.map +1 -0
- package/dist/components/DataCard/DataCard.d.ts +11 -1
- package/dist/components/DataCard/DataCard.d.ts.map +1 -1
- package/dist/components/DataTable/CellRenderers.d.ts +8 -11
- package/dist/components/DataTable/CellRenderers.d.ts.map +1 -1
- package/dist/components/DataTable/DataTable.d.ts +1 -1
- package/dist/components/DataTable/DataTable.d.ts.map +1 -1
- package/dist/components/DataTable/InlineAddRow.d.ts.map +1 -1
- package/dist/components/DataTable/columnContext.d.ts +8 -0
- package/dist/components/DataTable/columnContext.d.ts.map +1 -0
- package/dist/components/DataTable/index.d.ts +2 -2
- package/dist/components/DataTable/index.d.ts.map +1 -1
- package/dist/components/DataTable/labels.d.ts +13 -0
- package/dist/components/DataTable/labels.d.ts.map +1 -0
- package/dist/components/DataTable/types.d.ts +34 -0
- package/dist/components/DataTable/types.d.ts.map +1 -1
- package/dist/components/DateRangePicker/DateRangePicker.d.ts.map +1 -1
- package/dist/components/DetailsPopover/DetailsPopover.d.ts +185 -0
- package/dist/components/DetailsPopover/DetailsPopover.d.ts.map +1 -0
- package/dist/components/DiffViewer/DiffViewer.d.ts +3 -2
- package/dist/components/DiffViewer/DiffViewer.d.ts.map +1 -1
- package/dist/components/Disclosure/Disclosure.d.ts +83 -0
- package/dist/components/Disclosure/Disclosure.d.ts.map +1 -0
- package/dist/components/DockLayout/DockLayout.d.ts +58 -0
- package/dist/components/DockLayout/DockLayout.d.ts.map +1 -1
- package/dist/components/DockLayout/index.d.ts +1 -1
- package/dist/components/DockLayout/index.d.ts.map +1 -1
- package/dist/components/DocumentCard/DocumentCard.d.ts +5 -1
- package/dist/components/DocumentCard/DocumentCard.d.ts.map +1 -1
- package/dist/components/EntityDetailPanel/EntityDetailPanel.d.ts +6 -2
- package/dist/components/EntityDetailPanel/EntityDetailPanel.d.ts.map +1 -1
- package/dist/components/FileUpload/FileUpload.d.ts +141 -6
- package/dist/components/FileUpload/FileUpload.d.ts.map +1 -1
- package/dist/components/FileUpload/index.d.ts +1 -1
- package/dist/components/FileUpload/index.d.ts.map +1 -1
- package/dist/components/FilterBar/FilterBar.d.ts +27 -1
- package/dist/components/FilterBar/FilterBar.d.ts.map +1 -1
- package/dist/components/FilterBar/index.d.ts +1 -1
- package/dist/components/FilterBar/index.d.ts.map +1 -1
- package/dist/components/FlowAutoLayout/useFlowAutoLayout.d.ts.map +1 -1
- package/dist/components/GanttView/GanttView.d.ts +24 -0
- package/dist/components/GanttView/GanttView.d.ts.map +1 -1
- package/dist/components/GanttView/types.d.ts +33 -7
- package/dist/components/GanttView/types.d.ts.map +1 -1
- package/dist/components/GaugeCard/GaugeCard.d.ts +4 -3
- package/dist/components/GaugeCard/GaugeCard.d.ts.map +1 -1
- package/dist/components/GaugeCard/geometry.d.ts +59 -0
- package/dist/components/GaugeCard/geometry.d.ts.map +1 -0
- package/dist/components/GeoStatusMap/GeoStatusMap.d.ts.map +1 -1
- package/dist/components/GeoStatusMap/types.d.ts +8 -5
- package/dist/components/GeoStatusMap/types.d.ts.map +1 -1
- package/dist/components/GoToTop/GoToTop.d.ts +1 -1
- package/dist/components/GoToTop/GoToTop.d.ts.map +1 -1
- package/dist/components/HierarchicalDrillDown/HierarchicalDrillDown.d.ts.map +1 -1
- package/dist/components/HistoricalDataIndicator/HistoricalDataIndicator.d.ts.map +1 -1
- package/dist/components/HtmlToMui/HtmlToMui.d.ts +32 -2
- package/dist/components/HtmlToMui/HtmlToMui.d.ts.map +1 -1
- package/dist/components/Icon.d.ts +567 -10
- package/dist/components/Icon.d.ts.map +1 -1
- package/dist/components/IllustratedMessage.d.ts +52 -3
- package/dist/components/IllustratedMessage.d.ts.map +1 -1
- package/dist/components/InlineEditableText/InlineEditableText.d.ts +117 -0
- package/dist/components/InlineEditableText/InlineEditableText.d.ts.map +1 -0
- package/dist/components/InsightCard/InsightCard.d.ts.map +1 -1
- package/dist/components/InsightCard/types.d.ts +10 -3
- package/dist/components/InsightCard/types.d.ts.map +1 -1
- package/dist/components/KeyValueList/KeyValueList.d.ts +94 -0
- package/dist/components/KeyValueList/KeyValueList.d.ts.map +1 -0
- package/dist/components/LandingPage/FeatureCard.d.ts +4 -0
- package/dist/components/LandingPage/FeatureCard.d.ts.map +1 -1
- package/dist/components/LandingPage/LandingPage.d.ts +43 -4
- package/dist/components/LandingPage/LandingPage.d.ts.map +1 -1
- package/dist/components/LandingPage/heroTone.d.ts +54 -0
- package/dist/components/LandingPage/heroTone.d.ts.map +1 -0
- package/dist/components/MentionsInput/MentionsInput.d.ts.map +1 -1
- package/dist/components/MetaChip/MetaChip.d.ts +113 -0
- package/dist/components/MetaChip/MetaChip.d.ts.map +1 -0
- package/dist/components/Modal/Modal.d.ts +222 -20
- package/dist/components/Modal/Modal.d.ts.map +1 -1
- package/dist/components/Modal/index.d.ts +1 -1
- package/dist/components/Modal/index.d.ts.map +1 -1
- package/dist/components/NotificationCenter/NotificationCenter.d.ts.map +1 -1
- package/dist/components/OrgChart/OrgChart.d.ts +5 -0
- package/dist/components/OrgChart/OrgChart.d.ts.map +1 -1
- package/dist/components/OrgChart/types.d.ts +31 -7
- package/dist/components/OrgChart/types.d.ts.map +1 -1
- package/dist/components/OverflowTooltip/OverflowTooltip.d.ts +1 -1
- package/dist/components/OverflowTooltip/OverflowTooltip.d.ts.map +1 -1
- package/dist/components/PageHeader/PageHeader.d.ts.map +1 -1
- package/dist/components/PageTOC/PageTOC.d.ts +2 -1
- package/dist/components/PageTOC/PageTOC.d.ts.map +1 -1
- package/dist/components/Popper/Popper.d.ts +80 -9
- package/dist/components/Popper/Popper.d.ts.map +1 -1
- package/dist/components/Popper/index.d.ts +1 -1
- package/dist/components/Popper/index.d.ts.map +1 -1
- package/dist/components/PredictiveTextInput/PredictiveTextInput.d.ts +5 -1
- package/dist/components/PredictiveTextInput/PredictiveTextInput.d.ts.map +1 -1
- package/dist/components/SandboxedIframeRenderer/SandboxedIframeRenderer.d.ts +48 -4
- package/dist/components/SandboxedIframeRenderer/SandboxedIframeRenderer.d.ts.map +1 -1
- package/dist/components/SearchInput/SearchInput.d.ts +49 -0
- package/dist/components/SearchInput/SearchInput.d.ts.map +1 -1
- package/dist/components/SearchInput/index.d.ts +1 -1
- package/dist/components/SearchInput/index.d.ts.map +1 -1
- package/dist/components/SimpleTable/SimpleTable.d.ts +11 -2
- package/dist/components/SimpleTable/SimpleTable.d.ts.map +1 -1
- package/dist/components/SplitPane/SplitPane.d.ts +2 -1
- package/dist/components/SplitPane/SplitPane.d.ts.map +1 -1
- package/dist/components/StatusHero/StatusHero.d.ts.map +1 -1
- package/dist/components/StatusIndicator/Badge.d.ts +6 -1
- package/dist/components/StatusIndicator/Badge.d.ts.map +1 -1
- package/dist/components/StatusIndicator/Chip.d.ts +3 -1
- package/dist/components/StatusIndicator/Chip.d.ts.map +1 -1
- package/dist/components/StatusIndicator/Indicators.d.ts +5 -1
- package/dist/components/StatusIndicator/Indicators.d.ts.map +1 -1
- package/dist/components/StatusIndicator/Legend.d.ts.map +1 -1
- package/dist/components/StatusIndicator/StatusIndicator.d.ts +98 -4
- package/dist/components/StatusIndicator/StatusIndicator.d.ts.map +1 -1
- package/dist/components/StatusIndicator/index.d.ts +2 -2
- package/dist/components/StatusIndicator/index.d.ts.map +1 -1
- package/dist/components/StatusIndicator/types.d.ts +48 -1
- package/dist/components/StatusIndicator/types.d.ts.map +1 -1
- package/dist/components/StepList/StepList.d.ts +80 -0
- package/dist/components/StepList/StepList.d.ts.map +1 -0
- package/dist/components/StepList/StepStatusMarker.d.ts +39 -0
- package/dist/components/StepList/StepStatusMarker.d.ts.map +1 -0
- package/dist/components/StepList/stepStatus.d.ts +30 -0
- package/dist/components/StepList/stepStatus.d.ts.map +1 -0
- package/dist/components/SystemBanner/SystemBanner.d.ts.map +1 -1
- package/dist/components/Timeline/Timeline.d.ts +57 -3
- package/dist/components/Timeline/Timeline.d.ts.map +1 -1
- package/dist/components/Timeline/index.d.ts +1 -1
- package/dist/components/Timeline/index.d.ts.map +1 -1
- package/dist/components/Timeline/timelineLabels.d.ts +70 -0
- package/dist/components/Timeline/timelineLabels.d.ts.map +1 -0
- package/dist/components/Toast/Toast.d.ts.map +1 -1
- package/dist/components/TopNavHeader.d.ts +6 -0
- package/dist/components/TopNavHeader.d.ts.map +1 -1
- package/dist/components/TopNavWithSidebar.d.ts +49 -1
- package/dist/components/TopNavWithSidebar.d.ts.map +1 -1
- package/dist/components/Tour/Tour.d.ts +18 -1
- package/dist/components/Tour/Tour.d.ts.map +1 -1
- package/dist/components/TransferList/TransferList.d.ts +123 -4
- package/dist/components/TransferList/TransferList.d.ts.map +1 -1
- package/dist/components/TransferList/index.d.ts +1 -1
- package/dist/components/TransferList/index.d.ts.map +1 -1
- package/dist/components/TreeView/TreeView.d.ts +97 -8
- package/dist/components/TreeView/TreeView.d.ts.map +1 -1
- package/dist/components/TreeView/index.d.ts +1 -1
- package/dist/components/TreeView/index.d.ts.map +1 -1
- package/dist/components/TrinityLoader.d.ts.map +1 -1
- package/dist/components/icons/featherExtensions.d.ts +55 -0
- package/dist/components/icons/featherExtensions.d.ts.map +1 -0
- package/dist/components/icons/materialExtensions.d.ts +20 -0
- package/dist/components/icons/materialExtensions.d.ts.map +1 -0
- package/dist/components/internal/index.d.ts +87 -0
- package/dist/components/internal/index.d.ts.map +1 -1
- package/dist/components/navigation/MenuListWithHeading.d.ts +33 -0
- package/dist/components/navigation/MenuListWithHeading.d.ts.map +1 -0
- package/dist/components/navigation/clientSelectorLabels.d.ts +13 -0
- package/dist/components/navigation/clientSelectorLabels.d.ts.map +1 -0
- package/dist/components/navigation/components.d.ts +6 -0
- package/dist/components/navigation/components.d.ts.map +1 -1
- package/dist/components/shared/AsyncOutcomeAlert.d.ts +91 -0
- package/dist/components/shared/AsyncOutcomeAlert.d.ts.map +1 -0
- package/dist/components/shared/TrinityIconSvg.d.ts.map +1 -1
- package/dist/components/shared/TrinityLogoSvg.d.ts.map +1 -1
- package/dist/components/shared/bidi.d.ts +44 -0
- package/dist/components/shared/bidi.d.ts.map +1 -0
- package/dist/components/shared/bidiText.d.ts +25 -0
- package/dist/components/shared/bidiText.d.ts.map +1 -0
- package/dist/components/shared/containerQueries.d.ts +73 -0
- package/dist/components/shared/containerQueries.d.ts.map +1 -0
- package/dist/components/shared/createStringsContext.d.ts +69 -0
- package/dist/components/shared/createStringsContext.d.ts.map +1 -0
- package/dist/components/shared/direction.d.ts +46 -0
- package/dist/components/shared/direction.d.ts.map +1 -0
- package/dist/components/shared/focusTrap.d.ts +36 -0
- package/dist/components/shared/focusTrap.d.ts.map +1 -0
- package/dist/components/shared/getInitials.d.ts +29 -0
- package/dist/components/shared/getInitials.d.ts.map +1 -0
- package/dist/components/shared/headingLevel.d.ts +69 -0
- package/dist/components/shared/headingLevel.d.ts.map +1 -0
- package/dist/components/shared/mergeSlotProps.d.ts +50 -0
- package/dist/components/shared/mergeSlotProps.d.ts.map +1 -0
- package/dist/components/shared/mergeSx.d.ts +26 -0
- package/dist/components/shared/mergeSx.d.ts.map +1 -0
- package/dist/components/shared/motion.d.ts +110 -0
- package/dist/components/shared/motion.d.ts.map +1 -0
- package/dist/components/shared/occurrenceKeys.d.ts +23 -0
- package/dist/components/shared/occurrenceKeys.d.ts.map +1 -0
- package/dist/components/shared/primaryAction.d.ts +89 -0
- package/dist/components/shared/primaryAction.d.ts.map +1 -0
- package/dist/components/shared/resizeKeyboard.d.ts +68 -0
- package/dist/components/shared/resizeKeyboard.d.ts.map +1 -0
- package/dist/components/shared/rootProps.d.ts +117 -0
- package/dist/components/shared/rootProps.d.ts.map +1 -0
- package/dist/components/shared/safeContent.d.ts +136 -0
- package/dist/components/shared/safeContent.d.ts.map +1 -0
- package/dist/components/shared/targetSize.d.ts +64 -0
- package/dist/components/shared/targetSize.d.ts.map +1 -0
- package/dist/components/shared/useContainerInlineSize.d.ts +43 -0
- package/dist/components/shared/useContainerInlineSize.d.ts.map +1 -0
- package/dist/components/shared/useCopyAction.d.ts +35 -0
- package/dist/components/shared/useCopyAction.d.ts.map +1 -0
- package/dist/components/shared/useOverflow.d.ts +44 -0
- package/dist/components/shared/useOverflow.d.ts.map +1 -0
- package/dist/components/shared/useResizable.d.ts +106 -7
- package/dist/components/shared/useResizable.d.ts.map +1 -1
- package/dist/components/shared/warnDeprecated.d.ts +89 -15
- package/dist/components/shared/warnDeprecated.d.ts.map +1 -1
- package/dist/components/shared/zIndexRoles.d.ts +62 -0
- package/dist/components/shared/zIndexRoles.d.ts.map +1 -0
- package/dist/components/templates/AIReviewQueue/AIReviewQueueTemplate.d.ts +213 -0
- package/dist/components/templates/AIReviewQueue/AIReviewQueueTemplate.d.ts.map +1 -0
- package/dist/components/templates/AIReviewQueue/index.d.ts +2 -0
- package/dist/components/templates/AIReviewQueue/index.d.ts.map +1 -0
- package/dist/components/templates/Auth/AuthTemplate.d.ts.map +1 -1
- package/dist/components/templates/Auth/types.d.ts +4 -1
- package/dist/components/templates/Auth/types.d.ts.map +1 -1
- package/dist/components/templates/Catalog/CatalogTemplate.d.ts.map +1 -1
- package/dist/components/templates/ConnectorWizard/ConnectorWizardTemplate.d.ts.map +1 -1
- package/dist/components/templates/InsightsCenter/InsightsCenterTemplate.d.ts.map +1 -1
- package/dist/components/templates/IntegrationDetail/IntegrationDetailTemplate.d.ts.map +1 -1
- package/dist/components/templates/ListDetail/ListDetailTemplate.d.ts +168 -10
- package/dist/components/templates/ListDetail/ListDetailTemplate.d.ts.map +1 -1
- package/dist/components/templates/ListDetail/index.d.ts +1 -1
- package/dist/components/templates/ListDetail/index.d.ts.map +1 -1
- package/dist/components/templates/ListDetail/listDetailLabels.d.ts +106 -0
- package/dist/components/templates/ListDetail/listDetailLabels.d.ts.map +1 -0
- package/dist/components/templates/Onboarding/OnboardingTemplate.d.ts.map +1 -1
- package/dist/components/templates/Settings/SettingsTemplate.d.ts +0 -3
- package/dist/components/templates/Settings/SettingsTemplate.d.ts.map +1 -1
- package/dist/components/templates/Wizard/WizardTemplate.d.ts +4 -1
- package/dist/components/templates/Wizard/WizardTemplate.d.ts.map +1 -1
- package/dist/components/templates/index.d.ts +2 -1
- package/dist/components/templates/index.d.ts.map +1 -1
- package/dist/data-table.d.ts +1 -1
- package/dist/data-table.d.ts.map +1 -1
- package/dist/data-table.js +1 -0
- package/dist/data-table2.js +13522 -13465
- package/dist/data.js +213 -194
- package/dist/elk.bundled.js +47371 -0
- package/dist/essentials.d.ts +3 -3
- package/dist/essentials.d.ts.map +1 -1
- package/dist/essentials.js +179 -147
- package/dist/focus-on-replace.js +49 -0
- package/dist/form.d.ts +26 -4
- package/dist/form.d.ts.map +1 -1
- package/dist/forms.js +575 -483
- package/dist/foundation.js +3704 -0
- package/dist/hooks/storageStore.d.ts +51 -0
- package/dist/hooks/storageStore.d.ts.map +1 -0
- package/dist/hooks/useAsyncAction.d.ts +65 -0
- package/dist/hooks/useAsyncAction.d.ts.map +1 -0
- package/dist/hooks/useDisclosure.d.ts +190 -0
- package/dist/hooks/useDisclosure.d.ts.map +1 -0
- package/dist/hooks/useFocusOnReplace.d.ts +95 -0
- package/dist/hooks/useFocusOnReplace.d.ts.map +1 -0
- package/dist/hooks/useTrinityPalette.d.ts +38 -40
- package/dist/hooks/useTrinityPalette.d.ts.map +1 -1
- package/dist/hooks.d.ts +44 -6
- package/dist/hooks.d.ts.map +1 -1
- package/dist/hooks.js +301 -0
- package/dist/index.d.ts +71 -26
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +13923 -60619
- package/dist/patterns/AICopilotPattern/AICopilotPattern.d.ts +203 -0
- package/dist/patterns/AICopilotPattern/AICopilotPattern.d.ts.map +1 -0
- package/dist/patterns/AICopilotPattern/index.d.ts +3 -0
- package/dist/patterns/AICopilotPattern/index.d.ts.map +1 -0
- package/dist/patterns/index.d.ts +15 -0
- package/dist/patterns/index.d.ts.map +1 -0
- package/dist/presets/analytics.d.ts +8 -1
- package/dist/presets/analytics.d.ts.map +1 -1
- package/dist/presets/crm.d.ts +8 -1
- package/dist/presets/crm.d.ts.map +1 -1
- package/dist/presets/index.d.ts +1 -1
- package/dist/presets/portal.d.ts +8 -1
- package/dist/presets/portal.d.ts.map +1 -1
- package/dist/safe-content.js +792 -0
- package/dist/theme-augmentation.d.ts +388 -0
- package/dist/theme-augmentation.d.ts.map +1 -0
- package/dist/theme.d.ts +116 -30
- package/dist/theme.d.ts.map +1 -1
- package/dist/theme.js +891 -436
- package/dist/token-color.d.ts +14 -0
- package/dist/token-color.d.ts.map +1 -0
- package/dist/token-merge.d.ts +56 -0
- package/dist/token-merge.d.ts.map +1 -0
- package/dist/token-serialization.d.ts +65 -0
- package/dist/token-serialization.d.ts.map +1 -0
- package/dist/tokens.d.ts +882 -13
- package/dist/tokens.d.ts.map +1 -1
- package/dist/tokens.js +21 -19
- package/dist/trinity.css +1077 -414
- package/package.json +111 -90
- package/dist/components/index.d.ts +0 -145
- package/dist/components/index.d.ts.map +0 -1
- package/dist/components/shared.d.ts +0 -92
- 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
|
-
*
|
|
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
|
|
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
|
-
/**
|
|
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
|
-
/**
|
|
46
|
-
|
|
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
|
-
*
|
|
50
|
-
* AIMessage
|
|
51
|
-
*
|
|
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
|
-
*
|
|
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
|
|
59
|
-
messages:
|
|
60
|
-
|
|
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;
|
|
1
|
+
{"version":3,"file":"ChatThread.d.ts","sourceRoot":"","sources":["../../../src/components/AI/ChatThread.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAG3D,OAAO,EAAgB,KAAK,gBAAgB,EAAE,KAAK,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAIjG,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAS3D,OAAO,EAAqC,KAAK,eAAe,EAAE,KAAK,sBAAsB,EAAE,KAAK,cAAc,EAAE,MAA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,MAAM,CAAC;IACnB;;;;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"}
|