@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
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview AIReviewItem: one answer in the golden-dataset review, with what produced it and
|
|
3
|
+
* the reviewer's decision (master plan G-19; requirements R24-R26).
|
|
4
|
+
* @module components/AI/AIReviewItem
|
|
5
|
+
*
|
|
6
|
+
* A thin composition (BEHAVIOR_CONTRACT section 2) of AIContainer (without its title), MetaChip
|
|
7
|
+
* and KeyValueList (D blocks), AIConfidenceBadge, AIVerificationBadge and AIQueryDisclosure (F
|
|
8
|
+
* molecules), AIPlanReview `readOnly` (G-18), AIResponseRenderer `readOnly` or AITextBlock,
|
|
9
|
+
* ConfirmDialog with C-14's `reasonField`, DiffViewer and Timeline (configured, not edited), and
|
|
10
|
+
* B's `useAsyncAction`, `useAnnounce`, `useFocusOnReplace` and `AsyncOutcomeAlert`. The keyboard
|
|
11
|
+
* and focus model is keyboard-models.md, "G flow (a): AIReviewItem decisions".
|
|
12
|
+
*
|
|
13
|
+
* - **Content.** The question is the heading (`headingLevel`, default 2; `headingRef` reaches it).
|
|
14
|
+
* A status chip (icon and text), the details list (asked by, asked at in the provider's locale
|
|
15
|
+
* and time zone, confidence, verification), the plan (`AIPlanReview readOnly`), the query
|
|
16
|
+
* (`AIQueryDisclosure`, expanded), the answer (`AIResponseRenderer readOnly` with
|
|
17
|
+
* `hitlBlockRenderers` and an `idPrefix` from `useId`, so the same answer in a list and a
|
|
18
|
+
* detail view never repeats a DOM id; AITextBlock for a string answer), the users' feedback
|
|
19
|
+
* (rating icon and text, problem chips, comment) and the history.
|
|
20
|
+
* - **Decisions** (a group named 'Decision'). Approve runs `onDecision` through `useAsyncAction`.
|
|
21
|
+
* Edit opens a form with one field per `editableFields` entry (the answer as plain text through
|
|
22
|
+
* `getResponsePlainText`; the service rebuilds its structure). 'Review changes' shows one
|
|
23
|
+
* unified DiffViewer per changed field (no mode switch, no copy, no collapsing, no `maxHeight`:
|
|
24
|
+
* none of DiffViewer's known defects renders), each inside a named, focusable region that
|
|
25
|
+
* scrolls on its own. With no change it shows a validation message; the button stays enabled.
|
|
26
|
+
* Submit sends an `AIReviewEdits` payload. Cancel returns focus to Edit. Reject opens
|
|
27
|
+
* ConfirmDialog with a required reason (C-14): an empty reason marks the field invalid, shows
|
|
28
|
+
* the message and focuses the field; a failed rejection keeps the dialog open with its inline
|
|
29
|
+
* alert; `onDecision` receives the trimmed reason.
|
|
30
|
+
* - **canDecide.** Defaults to `Boolean(onDecision)` (G-OD7). When false, no control renders and
|
|
31
|
+
* `decisionBlockedReason` shows instead.
|
|
32
|
+
* - **Pending.** Every decision control is `aria-disabled` (never `disabled`) and the running one
|
|
33
|
+
* `aria-busy`; clicks do nothing and focus stays. `loading` shows the same state from outside.
|
|
34
|
+
* - **Resolved.** The summary replaces the controls, is announced politely and, with
|
|
35
|
+
* `focusOnResolve` 'summary' (the default), takes focus; 'none' leaves focus to the host (the
|
|
36
|
+
* review queue moves to the next item). A failure shows AsyncOutcomeAlert with Try again.
|
|
37
|
+
* - **History.** Timeline 'compact', non-interactive: each entry is text plus an icon whose shape
|
|
38
|
+
* follows its kind, so colour is never the only cue.
|
|
39
|
+
* - **Design.** Resolver colours only (ADR-26), logical properties, a container-query wrapper
|
|
40
|
+
* inside the root (the buttons stack below the `compact` container width; the ref stays on
|
|
41
|
+
* the root), 24px targets, forced-colours outlines.
|
|
42
|
+
* - **Telemetry (G-26).** `AIReviewInteraction` for decide, edit_start and reject_start: the
|
|
43
|
+
* item id, the decision, the flag count and the edited field names, never the text.
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* ```tsx
|
|
47
|
+
* <AIReviewItem
|
|
48
|
+
* item={item}
|
|
49
|
+
* editableFields={['question', 'answer']}
|
|
50
|
+
* onDecision={(decision) => api.decide(decision)}
|
|
51
|
+
* />
|
|
52
|
+
* ```
|
|
53
|
+
*/
|
|
54
|
+
import * as React from 'react';
|
|
55
|
+
import { type SxProps, type Theme } from '@mui/material/styles';
|
|
56
|
+
import { type HeadingLevel } from '../shared/headingLevel';
|
|
57
|
+
import { type TrinitySlotProps } from '../shared/rootProps';
|
|
58
|
+
import type { AIBlockRendererMap } from './blockRendererContext';
|
|
59
|
+
import type { AIActionErrorContext, AIReviewDecision, AIReviewEditableField, AIReviewItemData } from './types/hitl';
|
|
60
|
+
/**
|
|
61
|
+
* Props of {@link AIReviewItem}. The rest props reach the root `<div>`.
|
|
62
|
+
*
|
|
63
|
+
* @since 2.13.0
|
|
64
|
+
*/
|
|
65
|
+
export interface AIReviewItemProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'color' | 'title' | 'onChange' | 'defaultValue'> {
|
|
66
|
+
/** The answer under review, with what produced it and what happened to it. */
|
|
67
|
+
item: AIReviewItemData;
|
|
68
|
+
/**
|
|
69
|
+
* Whether the reviewer may decide. Without it, the decisions show when `onDecision` is set
|
|
70
|
+
* (G-OD7). When false, no control renders and `decisionBlockedReason` shows instead.
|
|
71
|
+
* @default Boolean(onDecision)
|
|
72
|
+
*/
|
|
73
|
+
canDecide?: boolean;
|
|
74
|
+
/** Why the reviewer cannot decide, shown when `canDecide` is false (`ai.reviewItem.blockedReason`). */
|
|
75
|
+
decisionBlockedReason?: string;
|
|
76
|
+
/**
|
|
77
|
+
* Called with the reviewer's decision. A returned promise shows the pending state, and its
|
|
78
|
+
* rejection the error. An edit's `answer` is plain text: the service rebuilds its structure.
|
|
79
|
+
*/
|
|
80
|
+
onDecision?(decision: AIReviewDecision): void | Promise<void>;
|
|
81
|
+
/**
|
|
82
|
+
* The fields the Edit form offers, in this order. `'query'` shows only when the item has a
|
|
83
|
+
* query.
|
|
84
|
+
* @default ['answer']
|
|
85
|
+
*/
|
|
86
|
+
editableFields?: AIReviewEditableField[];
|
|
87
|
+
/**
|
|
88
|
+
* Where focus goes after a decision: `'summary'` moves it to the resolved summary; `'none'`
|
|
89
|
+
* leaves it to the host (the review queue moves to the next item). The summary is announced
|
|
90
|
+
* either way.
|
|
91
|
+
* @default 'summary'
|
|
92
|
+
*/
|
|
93
|
+
focusOnResolve?: 'summary' | 'none';
|
|
94
|
+
/**
|
|
95
|
+
* The decision is in progress outside the item (for example the queue is saving it): every
|
|
96
|
+
* decision control is `aria-disabled` and the item is `aria-busy`.
|
|
97
|
+
* @default false
|
|
98
|
+
*/
|
|
99
|
+
loading?: boolean;
|
|
100
|
+
/** Level of the question's heading; the sections' headings are one level below. @default 2 */
|
|
101
|
+
headingLevel?: HeadingLevel;
|
|
102
|
+
/** Reaches the question's heading (`tabIndex -1`), so a host can move focus to the item. */
|
|
103
|
+
headingRef?: React.Ref<HTMLHeadingElement>;
|
|
104
|
+
/** Renderers for the answer's blocks; read-only either way. @default hitlBlockRenderers */
|
|
105
|
+
blockRenderers?: AIBlockRendererMap;
|
|
106
|
+
/** Called with the error of a failed decision, with `{ source: 'decision', itemId }`. */
|
|
107
|
+
onActionError?(error: unknown, context: AIActionErrorContext): void;
|
|
108
|
+
/** Replaces the approve button's text (`ai.reviewItem.approve`). */
|
|
109
|
+
approveLabel?: string;
|
|
110
|
+
/** Replaces the edit button's text (`ai.reviewItem.edit`). */
|
|
111
|
+
editLabel?: string;
|
|
112
|
+
/** Replaces the reject button's text (`ai.reviewItem.reject`). */
|
|
113
|
+
rejectLabel?: string;
|
|
114
|
+
/** @default 'medium' */
|
|
115
|
+
size?: 'small' | 'medium';
|
|
116
|
+
className?: string;
|
|
117
|
+
sx?: SxProps<Theme>;
|
|
118
|
+
slotProps?: {
|
|
119
|
+
/** The heading row: the question and the status chip. */
|
|
120
|
+
header?: TrinitySlotProps<HTMLDivElement>;
|
|
121
|
+
/** The details list (`<dl>`). */
|
|
122
|
+
details?: TrinitySlotProps<HTMLElement>;
|
|
123
|
+
/** The decisions group, or the edit form while editing. */
|
|
124
|
+
decisions?: TrinitySlotProps<HTMLDivElement>;
|
|
125
|
+
/** The history section. */
|
|
126
|
+
history?: TrinitySlotProps<HTMLElement>;
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* One answer in the golden-dataset review: the question, the plan, the query, the answer and the
|
|
131
|
+
* users' feedback, with Approve, Edit (with a diff of the changes) and Reject (with a required
|
|
132
|
+
* reason), and the item's history. See the module notes.
|
|
133
|
+
*
|
|
134
|
+
* @example
|
|
135
|
+
* ```tsx
|
|
136
|
+
* <AIReviewItem item={item} onDecision={(decision) => api.decide(decision)} />
|
|
137
|
+
* ```
|
|
138
|
+
*
|
|
139
|
+
* @since 2.13.0
|
|
140
|
+
*/
|
|
141
|
+
export declare const AIReviewItem: React.ForwardRefExoticComponent<AIReviewItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
142
|
+
//# sourceMappingURL=AIReviewItem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AIReviewItem.d.ts","sourceRoot":"","sources":["../../../src/components/AI/AIReviewItem.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,EAAiB,KAAK,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAc/E,OAAO,EAAoB,KAAK,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAI7E,OAAO,EAAgB,KAAK,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAU1E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAGjE,OAAO,KAAK,EACV,oBAAoB,EAEpB,gBAAgB,EAChB,qBAAqB,EAGrB,gBAAgB,EAGjB,MAAM,cAAc,CAAC;AAGtB;;;;GAIG;AACH,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,UAAU,GAAG,cAAc,CAAC;IACpI,8EAA8E;IAC9E,IAAI,EAAE,gBAAgB,CAAC;IACvB;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,uGAAuG;IACvG,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B;;;OAGG;IACH,UAAU,CAAC,CAAC,QAAQ,EAAE,gBAAgB,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9D;;;;OAIG;IACH,cAAc,CAAC,EAAE,qBAAqB,EAAE,CAAC;IACzC;;;;;OAKG;IACH,cAAc,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC;IACpC;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,8FAA8F;IAC9F,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,4FAA4F;IAC5F,UAAU,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC;IAC3C,2FAA2F;IAC3F,cAAc,CAAC,EAAE,kBAAkB,CAAC;IACpC,yFAAyF;IACzF,aAAa,CAAC,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,oBAAoB,GAAG,IAAI,CAAC;IACpE,oEAAoE;IACpE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,8DAA8D;IAC9D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kEAAkE;IAClE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,wBAAwB;IACxB,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,EAAE,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;IACpB,SAAS,CAAC,EAAE;QACV,yDAAyD;QACzD,MAAM,CAAC,EAAE,gBAAgB,CAAC,cAAc,CAAC,CAAC;QAC1C,iCAAiC;QACjC,OAAO,CAAC,EAAE,gBAAgB,CAAC,WAAW,CAAC,CAAC;QACxC,2DAA2D;QAC3D,SAAS,CAAC,EAAE,gBAAgB,CAAC,cAAc,CAAC,CAAC;QAC7C,2BAA2B;QAC3B,OAAO,CAAC,EAAE,gBAAgB,CAAC,WAAW,CAAC,CAAC;KACzC,CAAC;CACH;AAuFD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,YAAY,0FA8mBvB,CAAC"}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview AISourceChip: where one number, sentence or cell came from (master plan F-12).
|
|
3
|
+
* @module components/AI/AISourceChip
|
|
4
|
+
*
|
|
5
|
+
* A source chip names one source of an AI response at the place it supports: inline in text, in
|
|
6
|
+
* a table cell or on a chart point. Activating it opens the source's details.
|
|
7
|
+
*
|
|
8
|
+
* - **The chip** is D's MetaChip in interactive mode, so its root is a native
|
|
9
|
+
* `<button type="button">`: valid phrasing content inside `<p>` and headings, unlike MUI Chip's
|
|
10
|
+
* clickable `div`. The root carries the ref and the rest props. Its colours are the AI roles
|
|
11
|
+
* `ai.badgeBackground` and `ai.primary` with an `ai.border` edge at the default border width;
|
|
12
|
+
* under forced colours MetaChip draws a CanvasText border and a Highlight focus outline.
|
|
13
|
+
* - **Variants.** `'label'` (the default) shows `ai.sourceChip.label({ metric, period, title })`
|
|
14
|
+
* and is named `ai.sourceChip.labelName(...)`, which starts with the visible label (WCAG
|
|
15
|
+
* 2.5.3); it meets the 24 by 24 target size. `'number'` shows only the source's number, named
|
|
16
|
+
* `ai.sourceChip.numberName({ index, title })` ('Source 1: Q4 report'). The number is `index`,
|
|
17
|
+
* else the response's number for the source (its 1-based place in `sources`, the number
|
|
18
|
+
* `useBlockSources().getSourceNumber` and AISourcesPanel show); a source with no number falls
|
|
19
|
+
* back to the label variant and warns once in development. A number chip inline in text uses
|
|
20
|
+
* the meta type size and sits on the text baseline, smaller than 24 by 24: WCAG 2.5.8's inline
|
|
21
|
+
* exception (a target in a sentence, whose size the line height constrains).
|
|
22
|
+
* - **Details** open in DetailsPopover (F-09): a modal dialog named by its visible heading, the
|
|
23
|
+
* source's title. It lists the metric, filters (`formatFilter`), period, dataset, as-of date
|
|
24
|
+
* (`useFormatAsOf`) and excerpt, or 'No additional details'; `renderDetails` replaces the list
|
|
25
|
+
* (`null` renders nothing, `undefined` the default list).
|
|
26
|
+
* - **'Open source'** is a link only when the URL passes the link policy (`isSafeHref`, ADR-09):
|
|
27
|
+
* a new tab with `rel="noopener noreferrer"` and a visually hidden '(opens in new tab)'. Any
|
|
28
|
+
* other URL is shown as text and warns once in development.
|
|
29
|
+
* - **Favicon** only with `showFavicon`: the source URL's origin `/favicon.ico`, for http(s)
|
|
30
|
+
* URLs that pass the image policy (`isSafeSrc`), on the label variant, decorative. Off by
|
|
31
|
+
* default: loading it contacts the source's host.
|
|
32
|
+
* - **'Show query'** appears only when something can show the query: `onShowQuery`, or a query
|
|
33
|
+
* view (AIQueryDisclosure, F-14) registered under the source's `queryId` in the response. It
|
|
34
|
+
* closes the dialog with reason `'action'`; once the dialog has closed and focus has returned,
|
|
35
|
+
* `onShowQuery(source)` runs, else the registered query view opens and takes focus (ADR-31).
|
|
36
|
+
* - **Open state** is controllable: `open`, `defaultOpen`, `onOpenChange(open, reason, event?)`
|
|
37
|
+
* with the reasons `'trigger'`, `'escape'`, `'clickAway'` and `'action'`. Opening reports an
|
|
38
|
+
* `AISourceOpenInteraction` (ids and enums only) through `AIConfigProvider`'s `onInteraction`.
|
|
39
|
+
* - Titles, labels and values are model or data text: bidi-isolated. There is no hover preview.
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ```tsx
|
|
43
|
+
* <AITextBlock content="Net revenue was $4.2M" />
|
|
44
|
+
* <AISourceChip variant="number" source={response.sources[0]} />
|
|
45
|
+
* ```
|
|
46
|
+
*
|
|
47
|
+
* @since 2.13.0
|
|
48
|
+
*/
|
|
49
|
+
import * as React from 'react';
|
|
50
|
+
import { type SxProps, type Theme } from '@mui/material/styles';
|
|
51
|
+
import type { TrinitySlotProps } from '../shared/rootProps';
|
|
52
|
+
import type { AIResponseSource } from './types/response';
|
|
53
|
+
/**
|
|
54
|
+
* Why an AISourceChip's details opened or closed: `'trigger'` (the chip), `'escape'`,
|
|
55
|
+
* `'clickAway'`, or `'action'` ('Show query' closed them).
|
|
56
|
+
*
|
|
57
|
+
* @since 2.13.0
|
|
58
|
+
*/
|
|
59
|
+
export type AISourceChipOpenChangeReason = 'trigger' | 'escape' | 'clickAway' | 'action';
|
|
60
|
+
/**
|
|
61
|
+
* AISourceChip's own props.
|
|
62
|
+
*
|
|
63
|
+
* @since 2.13.0
|
|
64
|
+
*/
|
|
65
|
+
export interface AISourceChipOwnProps {
|
|
66
|
+
/** The source. Its title, metric, period, filters, dataset, as-of date and excerpt are display text. */
|
|
67
|
+
source: AIResponseSource;
|
|
68
|
+
/**
|
|
69
|
+
* `'label'`: the metric (else the title) and the period, as text. `'number'`: the source's
|
|
70
|
+
* number only, for text, table cells and chart points.
|
|
71
|
+
* @default 'label'
|
|
72
|
+
*/
|
|
73
|
+
variant?: 'number' | 'label';
|
|
74
|
+
/**
|
|
75
|
+
* The number the `'number'` variant shows, 1-based. Default: the source's number in the
|
|
76
|
+
* response (its place in `sources`).
|
|
77
|
+
*/
|
|
78
|
+
index?: number;
|
|
79
|
+
/** @default 'small' */
|
|
80
|
+
size?: 'small' | 'medium';
|
|
81
|
+
/** Whether the details are open (controlled). */
|
|
82
|
+
open?: boolean;
|
|
83
|
+
/**
|
|
84
|
+
* Whether the details start open (uncontrolled).
|
|
85
|
+
* @default false
|
|
86
|
+
*/
|
|
87
|
+
defaultOpen?: boolean;
|
|
88
|
+
/** Called on every requested change of the open state, with the reason and the event when there is one. */
|
|
89
|
+
onOpenChange?: (open: boolean, reason: AISourceChipOpenChangeReason, event?: React.SyntheticEvent | Event) => void;
|
|
90
|
+
/** Called when the 'Open source' link is activated. The link still opens. */
|
|
91
|
+
onOpenSource?: (source: AIResponseSource, event: React.MouseEvent<HTMLAnchorElement>) => void;
|
|
92
|
+
/**
|
|
93
|
+
* Shows the query behind the source. Called after the details have closed and focus has
|
|
94
|
+
* returned, so a focus move made here stays. Its presence shows the 'Show query' action.
|
|
95
|
+
*/
|
|
96
|
+
onShowQuery?: (source: AIResponseSource) => void;
|
|
97
|
+
/**
|
|
98
|
+
* Shows the source host's favicon on the label variant: the source URL's origin
|
|
99
|
+
* `/favicon.ico`, for http(s) URLs only. Loading it contacts that host.
|
|
100
|
+
* @default false
|
|
101
|
+
*/
|
|
102
|
+
showFavicon?: boolean;
|
|
103
|
+
/** Replaces the details list: `null` renders nothing, `undefined` the default list. */
|
|
104
|
+
renderDetails?: (source: AIResponseSource) => React.ReactNode | null | undefined;
|
|
105
|
+
/** Added to the root button's class names. */
|
|
106
|
+
className?: string;
|
|
107
|
+
/** Styles for the root button, after the chip's own. */
|
|
108
|
+
sx?: SxProps<Theme>;
|
|
109
|
+
slotProps?: {
|
|
110
|
+
/** The details dialog (DetailsPopover's paper). */
|
|
111
|
+
popover?: TrinitySlotProps<HTMLDivElement>;
|
|
112
|
+
/** The default details list (`<dl>`). */
|
|
113
|
+
details?: TrinitySlotProps<HTMLElement>;
|
|
114
|
+
/** The 'Open source' link. */
|
|
115
|
+
link?: TrinitySlotProps<HTMLAnchorElement>;
|
|
116
|
+
/** The 'Show query' button. */
|
|
117
|
+
showQueryButton?: TrinitySlotProps<HTMLButtonElement>;
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Props of {@link AISourceChip}: its own props and the root button's HTML attributes.
|
|
122
|
+
*
|
|
123
|
+
* @since 2.13.0
|
|
124
|
+
*/
|
|
125
|
+
export interface AISourceChipProps extends AISourceChipOwnProps, Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'color' | 'type' | keyof AISourceChipOwnProps> {
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* A source chip: the source's number or label as a button that opens its details. See the module
|
|
129
|
+
* notes.
|
|
130
|
+
*
|
|
131
|
+
* @since 2.13.0
|
|
132
|
+
*/
|
|
133
|
+
export declare const AISourceChip: React.ForwardRefExoticComponent<AISourceChipProps & React.RefAttributes<HTMLButtonElement>>;
|
|
134
|
+
export default AISourceChip;
|
|
135
|
+
//# sourceMappingURL=AISourceChip.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AISourceChip.d.ts","sourceRoot":"","sources":["../../../src/components/AI/AISourceChip.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,OAAO,EAAY,KAAK,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAW1E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAO5D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAQzD;;;;;GAKG;AACH,MAAM,MAAM,4BAA4B,GAAG,SAAS,GAAG,QAAQ,GAAG,WAAW,GAAG,QAAQ,CAAC;AAEzF;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACnC,wGAAwG;IACxG,MAAM,EAAE,gBAAgB,CAAC;IACzB;;;;OAIG;IACH,OAAO,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC;IAC7B;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,uBAAuB;IACvB,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;IAC1B,iDAAiD;IACjD,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,2GAA2G;IAC3G,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,4BAA4B,EAAE,KAAK,CAAC,EAAE,KAAK,CAAC,cAAc,GAAG,KAAK,KAAK,IAAI,CAAC;IACnH,6EAA6E;IAC7E,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,gBAAgB,EAAE,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IAC9F;;;OAGG;IACH,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,gBAAgB,KAAK,IAAI,CAAC;IACjD;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,uFAAuF;IACvF,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,gBAAgB,KAAK,KAAK,CAAC,SAAS,GAAG,IAAI,GAAG,SAAS,CAAC;IACjF,8CAA8C;IAC9C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,wDAAwD;IACxD,EAAE,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;IACpB,SAAS,CAAC,EAAE;QACV,mDAAmD;QACnD,OAAO,CAAC,EAAE,gBAAgB,CAAC,cAAc,CAAC,CAAC;QAC3C,yCAAyC;QACzC,OAAO,CAAC,EAAE,gBAAgB,CAAC,WAAW,CAAC,CAAC;QACxC,8BAA8B;QAC9B,IAAI,CAAC,EAAE,gBAAgB,CAAC,iBAAiB,CAAC,CAAC;QAC3C,+BAA+B;QAC/B,eAAe,CAAC,EAAE,gBAAgB,CAAC,iBAAiB,CAAC,CAAC;KACvD,CAAC;CACH;AAED;;;;GAIG;AACH,MAAM,WAAW,iBACf,SAAQ,oBAAoB,EAC1B,IAAI,CAAC,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,oBAAoB,CAAC;CAAG;AA6CzG;;;;;GAKG;AACH,eAAO,MAAM,YAAY,6FA4MvB,CAAC;AAEH,eAAe,YAAY,CAAC"}
|
|
@@ -15,39 +15,99 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import React from 'react';
|
|
17
17
|
import { SxProps, Theme } from '@mui/material';
|
|
18
|
+
import { type IconName } from '../Icon';
|
|
19
|
+
import { type HeadingLevel } from '../shared/headingLevel';
|
|
20
|
+
import { type TrinityRootProps } from '../shared/rootProps';
|
|
18
21
|
/**
|
|
19
|
-
*
|
|
22
|
+
* AISource's own props.
|
|
20
23
|
*/
|
|
21
|
-
export interface
|
|
22
|
-
/**
|
|
23
|
-
|
|
24
|
+
export interface AISourceOwnProps {
|
|
25
|
+
/**
|
|
26
|
+
* Source number, shown in a round badge before the title. Without it the
|
|
27
|
+
* card renders no number badge (an unnumbered reference). Optional
|
|
28
|
+
* @since 2.13.0 (it was required).
|
|
29
|
+
*/
|
|
30
|
+
number?: number;
|
|
24
31
|
/** Source title */
|
|
25
32
|
title: string;
|
|
26
|
-
/**
|
|
33
|
+
/**
|
|
34
|
+
* Source URL. Only http(s), mailto, tel and relative URLs become a link (new
|
|
35
|
+
* tab, `rel="noopener noreferrer"`); any other scheme is shown as plain text,
|
|
36
|
+
* with a development warning.
|
|
37
|
+
*/
|
|
27
38
|
url?: string;
|
|
28
39
|
/** Source description/snippet */
|
|
29
40
|
description?: string;
|
|
30
|
-
/**
|
|
41
|
+
/**
|
|
42
|
+
* Source type (webpage, document, etc.). Shown as an icon whose accessible
|
|
43
|
+
* name is the type: "Web page", "Document", "Article", "Video" or "Other source".
|
|
44
|
+
*/
|
|
31
45
|
type?: 'webpage' | 'document' | 'article' | 'video' | 'other';
|
|
32
|
-
/**
|
|
46
|
+
/**
|
|
47
|
+
* Favicon URL: http(s), `blob:`, relative or a raster `data:image/*` source,
|
|
48
|
+
* loaded lazily without a referrer. Other sources are not loaded (development
|
|
49
|
+
* warning).
|
|
50
|
+
*/
|
|
33
51
|
favicon?: string;
|
|
34
|
-
/**
|
|
52
|
+
/**
|
|
53
|
+
* Click handler. When set, the title becomes the card's primary action: a
|
|
54
|
+
* button named by the title that covers the card, with the URL link kept as
|
|
55
|
+
* its own tab stop beside it. Without it the card is plain content, with no
|
|
56
|
+
* pointer cursor and no hover effect.
|
|
57
|
+
*/
|
|
35
58
|
onClick?: () => void;
|
|
36
|
-
/**
|
|
59
|
+
/**
|
|
60
|
+
* Short label shown as a chip after the title, such as "Primary" or "Updated".
|
|
61
|
+
*
|
|
62
|
+
* @since 2.13.0
|
|
63
|
+
*/
|
|
64
|
+
badge?: string;
|
|
65
|
+
/**
|
|
66
|
+
* One line of secondary detail under the title, such as "p. 12-15" or
|
|
67
|
+
* "Updated 2 days ago".
|
|
68
|
+
*
|
|
69
|
+
* @since 2.13.0
|
|
70
|
+
*/
|
|
71
|
+
meta?: string;
|
|
72
|
+
/**
|
|
73
|
+
* Replaces the type's glyph. The icon keeps the type's text as its name, so
|
|
74
|
+
* the type stays available to assistive technology.
|
|
75
|
+
*
|
|
76
|
+
* @since 2.13.0
|
|
77
|
+
*/
|
|
78
|
+
icon?: IconName;
|
|
79
|
+
/**
|
|
80
|
+
* Added to the root's own class names.
|
|
81
|
+
* @since 2.13.0
|
|
82
|
+
*/
|
|
83
|
+
className?: string;
|
|
84
|
+
/** Custom sx props, applied after the card's own styles (object, array or function). */
|
|
37
85
|
sx?: SxProps<Theme>;
|
|
38
86
|
}
|
|
87
|
+
/**
|
|
88
|
+
* Props for AISource: its own props, plus the HTML attributes of its root `div` (`id`,
|
|
89
|
+
* `data-*`, `aria-*`), which reach the root (ADR-04, WI-40).
|
|
90
|
+
*/
|
|
91
|
+
export interface AISourceProps extends AISourceOwnProps, TrinityRootProps<HTMLDivElement, AISourceOwnProps> {
|
|
92
|
+
}
|
|
39
93
|
/**
|
|
40
94
|
* AI Source - Individual source citation card.
|
|
41
95
|
*/
|
|
42
96
|
export declare const AISource: React.ForwardRefExoticComponent<AISourceProps & React.RefAttributes<HTMLDivElement>>;
|
|
43
97
|
/**
|
|
44
|
-
*
|
|
98
|
+
* AISourcesSection's own props.
|
|
45
99
|
*/
|
|
46
|
-
export interface
|
|
100
|
+
export interface AISourcesSectionOwnProps {
|
|
47
101
|
/** List of sources */
|
|
48
102
|
sources: Omit<AISourceProps, 'number'>[];
|
|
49
|
-
/** Section title */
|
|
103
|
+
/** Section title. Default: the `ai.sourcesSection.title` string ('Sources'). */
|
|
50
104
|
title?: string;
|
|
105
|
+
/**
|
|
106
|
+
* Heading level of the title: 2 to 6 for h2 to h6. Set it to fit the page outline.
|
|
107
|
+
* @default 6 (the h6 the title rendered before the prop existed)
|
|
108
|
+
* @since 2.13.0
|
|
109
|
+
*/
|
|
110
|
+
headingLevel?: HeadingLevel;
|
|
51
111
|
/** Whether section is collapsible */
|
|
52
112
|
collapsible?: boolean;
|
|
53
113
|
/** Default expanded state */
|
|
@@ -56,11 +116,29 @@ export interface AISourcesSectionProps {
|
|
|
56
116
|
maxVisible?: number;
|
|
57
117
|
/** Source click handler */
|
|
58
118
|
onSourceClick?: (index: number, source: Omit<AISourceProps, 'number'>) => void;
|
|
59
|
-
/**
|
|
119
|
+
/**
|
|
120
|
+
* Added to the root's own class names.
|
|
121
|
+
* @since 2.13.0
|
|
122
|
+
*/
|
|
123
|
+
className?: string;
|
|
124
|
+
/** Custom sx props, applied after the section's own styles (object, array or function). */
|
|
60
125
|
sx?: SxProps<Theme>;
|
|
61
126
|
}
|
|
127
|
+
/**
|
|
128
|
+
* Props for AISourcesSection: its own props, plus the HTML attributes of its root `div`
|
|
129
|
+
* (`data-*`, `aria-*`, and `id`), which reach the root (ADR-04, WI-40). Collapsible, the root is
|
|
130
|
+
* a Disclosure, whose `id` is its header button's (the panel's is `${id}-panel`).
|
|
131
|
+
*/
|
|
132
|
+
export interface AISourcesSectionProps extends AISourcesSectionOwnProps, TrinityRootProps<HTMLDivElement, AISourcesSectionOwnProps> {
|
|
133
|
+
}
|
|
62
134
|
/**
|
|
63
135
|
* AI Sources Section - Collapsible section displaying source citations.
|
|
136
|
+
*
|
|
137
|
+
* Collapsible (the default), the header renders through the internal Disclosure (D-29, D-08):
|
|
138
|
+
* the heading (`headingLevel`) holds one `<button type="button">` with `aria-expanded` and
|
|
139
|
+
* `aria-controls`, named by the title and the count; Enter and Space toggle it. The count is a
|
|
140
|
+
* MetaChip (D-04) on the resolver's AI roles (`ai.primary` on `ai.surfaceEmphasis`). With
|
|
141
|
+
* `collapsible={false}` the heading and the count are static and the list always shows.
|
|
64
142
|
*/
|
|
65
143
|
export declare const AISourcesSection: React.ForwardRefExoticComponent<AISourcesSectionProps & React.RefAttributes<HTMLDivElement>>;
|
|
66
144
|
//# sourceMappingURL=AISources.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AISources.d.ts","sourceRoot":"","sources":["../../../src/components/AI/AISources.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAmB,MAAM,OAAO,CAAC;AACxC,OAAO,
|
|
1
|
+
{"version":3,"file":"AISources.d.ts","sourceRoot":"","sources":["../../../src/components/AI/AISources.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAmB,MAAM,OAAO,CAAC;AACxC,OAAO,EASL,OAAO,EACP,KAAK,EAEN,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAQ,KAAK,QAAQ,EAAE,MAAM,SAAS,CAAC;AAQ9C,OAAO,EAAoB,KAAK,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAI7E,OAAO,EAAgB,KAAK,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAQ1E;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,mBAAmB;IACnB,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,iCAAiC;IACjC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,IAAI,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,SAAS,GAAG,OAAO,GAAG,OAAO,CAAC;IAC9D;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;OAKG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;;OAKG;IACH,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,wFAAwF;IACxF,EAAE,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;CACrB;AAED;;;GAGG;AACH,MAAM,WAAW,aAAc,SAAQ,gBAAgB,EAAE,gBAAgB,CAAC,cAAc,EAAE,gBAAgB,CAAC;CAAG;AAe9G;;GAEG;AACH,eAAO,MAAM,QAAQ,sFAoLnB,CAAC;AAMH;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC,sBAAsB;IACtB,OAAO,EAAE,IAAI,CAAC,aAAa,EAAE,QAAQ,CAAC,EAAE,CAAC;IACzC,gFAAgF;IAChF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,qCAAqC;IACrC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,6BAA6B;IAC7B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,yDAAyD;IACzD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,2BAA2B;IAC3B,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,aAAa,EAAE,QAAQ,CAAC,KAAK,IAAI,CAAC;IAC/E;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,2FAA2F;IAC3F,EAAE,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;CACrB;AAED;;;;GAIG;AACH,MAAM,WAAW,qBAAsB,SAAQ,wBAAwB,EAAE,gBAAgB,CAAC,cAAc,EAAE,wBAAwB,CAAC;CAAG;AAEtI;;;;;;;;GAQG;AACH,eAAO,MAAM,gBAAgB,8FA2F5B,CAAC"}
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
*/
|
|
19
19
|
import React from 'react';
|
|
20
20
|
import { SxProps, Theme } from '@mui/material';
|
|
21
|
+
import { type TrinityRootProps } from '../shared/rootProps';
|
|
21
22
|
export interface AISourceItem {
|
|
22
23
|
/** Unique identifier */
|
|
23
24
|
id: string;
|
|
@@ -25,6 +26,19 @@ export interface AISourceItem {
|
|
|
25
26
|
label: string;
|
|
26
27
|
/** Optional detail key-value pairs */
|
|
27
28
|
details?: Record<string, string>;
|
|
29
|
+
/**
|
|
30
|
+
* Link to the source, shown with the item's details when its chip is selected (new tab,
|
|
31
|
+
* `rel="noopener noreferrer"`). Only http(s), mailto, tel and relative URLs become a link; any
|
|
32
|
+
* other scheme is shown as plain text, with a development warning.
|
|
33
|
+
* @since 2.13.0
|
|
34
|
+
*/
|
|
35
|
+
url?: string;
|
|
36
|
+
/**
|
|
37
|
+
* The source's number, shown on the chip in place of its letter, so the panel matches the
|
|
38
|
+
* numbers of inline source chips (F-05's toSourceCategories sets it).
|
|
39
|
+
* @since 2.13.0
|
|
40
|
+
*/
|
|
41
|
+
number?: number;
|
|
28
42
|
}
|
|
29
43
|
export interface AISourceCategory {
|
|
30
44
|
/** Unique identifier */
|
|
@@ -37,12 +51,12 @@ export interface AISourceCategory {
|
|
|
37
51
|
items?: AISourceItem[];
|
|
38
52
|
}
|
|
39
53
|
/**
|
|
40
|
-
*
|
|
54
|
+
* AISourcesPanel's own props.
|
|
41
55
|
*/
|
|
42
|
-
export interface
|
|
56
|
+
export interface AISourcesPanelOwnProps {
|
|
43
57
|
/** List of source categories */
|
|
44
58
|
sources: AISourceCategory[];
|
|
45
|
-
/** Panel title */
|
|
59
|
+
/** Panel title. Default: the `ai.sourcesPanel.title` string ('Sources'); the header adds the count (`ai.sourcesPanel.titleWithCount`). */
|
|
46
60
|
title?: string;
|
|
47
61
|
/** Whether panel is initially expanded */
|
|
48
62
|
defaultExpanded?: boolean;
|
|
@@ -50,13 +64,24 @@ export interface AISourcesPanelProps {
|
|
|
50
64
|
expanded?: boolean;
|
|
51
65
|
/** Callback when expanded state changes */
|
|
52
66
|
onExpandedChange?: (expanded: boolean) => void;
|
|
53
|
-
/**
|
|
67
|
+
/**
|
|
68
|
+
* Added to the root's own class names.
|
|
69
|
+
* @since 2.13.0
|
|
70
|
+
*/
|
|
71
|
+
className?: string;
|
|
72
|
+
/** Custom sx props, applied after the panel's own styles (object, array or function). */
|
|
54
73
|
sx?: SxProps<Theme>;
|
|
55
74
|
}
|
|
56
75
|
/**
|
|
57
|
-
* Props for
|
|
76
|
+
* Props for AISourcesPanel: its own props, plus the HTML attributes of its root `div` (`id`,
|
|
77
|
+
* `data-*`, `aria-*`), which reach the root (ADR-04, WI-40).
|
|
58
78
|
*/
|
|
59
|
-
export interface
|
|
79
|
+
export interface AISourcesPanelProps extends AISourcesPanelOwnProps, TrinityRootProps<HTMLDivElement, AISourcesPanelOwnProps> {
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* AISourceCategoryItem's own props.
|
|
83
|
+
*/
|
|
84
|
+
export interface AISourceCategoryItemOwnProps {
|
|
60
85
|
/** Source category data */
|
|
61
86
|
category: AISourceCategory;
|
|
62
87
|
/** Index number to display */
|
|
@@ -69,9 +94,20 @@ export interface AISourceCategoryItemProps {
|
|
|
69
94
|
selectedItem: AISourceItem | null;
|
|
70
95
|
/** Callback when item is selected */
|
|
71
96
|
onSelectItem: (item: AISourceItem | null) => void;
|
|
72
|
-
/**
|
|
97
|
+
/**
|
|
98
|
+
* Added to the root's own class names.
|
|
99
|
+
* @since 2.13.0
|
|
100
|
+
*/
|
|
101
|
+
className?: string;
|
|
102
|
+
/** Custom sx props, applied after the row's own styles (object, array or function). */
|
|
73
103
|
sx?: SxProps<Theme>;
|
|
74
104
|
}
|
|
105
|
+
/**
|
|
106
|
+
* Props for AISourceCategoryItem: its own props, plus the HTML attributes of its root `div`
|
|
107
|
+
* (`id`, `data-*`, `aria-*`), which reach the root (ADR-04, WI-40).
|
|
108
|
+
*/
|
|
109
|
+
export interface AISourceCategoryItemProps extends AISourceCategoryItemOwnProps, TrinityRootProps<HTMLDivElement, AISourceCategoryItemOwnProps> {
|
|
110
|
+
}
|
|
75
111
|
/**
|
|
76
112
|
* AI Sources Panel - Collapsible panel displaying source citations
|
|
77
113
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AISourcesPanel.d.ts","sourceRoot":"","sources":["../../../src/components/AI/AISourcesPanel.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAmB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"AISourcesPanel.d.ts","sourceRoot":"","sources":["../../../src/components/AI/AISourcesPanel.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAmB,MAAM,OAAO,CAAC;AAGxC,OAAO,EAKL,OAAO,EACP,KAAK,EACN,MAAM,eAAe,CAAC;AAavB,OAAO,EAAgB,KAAK,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAM1E,MAAM,WAAW,YAAY;IAC3B,wBAAwB;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,oBAAoB;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,sCAAsC;IACtC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC;;;;;OAKG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,gBAAgB;IAC/B,wBAAwB;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,oBAAoB;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,kCAAkC;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,gCAAgC;IAChC,KAAK,CAAC,EAAE,YAAY,EAAE,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,gCAAgC;IAChC,OAAO,EAAE,gBAAgB,EAAE,CAAC;IAC5B,0IAA0I;IAC1I,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,0CAA0C;IAC1C,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,gCAAgC;IAChC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,2CAA2C;IAC3C,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IAC/C;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yFAAyF;IACzF,EAAE,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;CACrB;AAED;;;GAGG;AACH,MAAM,WAAW,mBAAoB,SAAQ,sBAAsB,EAAE,gBAAgB,CAAC,cAAc,EAAE,sBAAsB,CAAC;CAAG;AAEhI;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC3C,2BAA2B;IAC3B,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,8BAA8B;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,mCAAmC;IACnC,UAAU,EAAE,OAAO,CAAC;IACpB,gCAAgC;IAChC,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,8BAA8B;IAC9B,YAAY,EAAE,YAAY,GAAG,IAAI,CAAC;IAClC,qCAAqC;IACrC,YAAY,EAAE,CAAC,IAAI,EAAE,YAAY,GAAG,IAAI,KAAK,IAAI,CAAC;IAClD;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uFAAuF;IACvF,EAAE,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;CACrB;AAED;;;GAGG;AACH,MAAM,WAAW,yBAA0B,SAAQ,4BAA4B,EAAE,gBAAgB,CAAC,cAAc,EAAE,4BAA4B,CAAC;CAAG;AAgBlJ;;GAEG;AACH,eAAO,MAAM,cAAc,4FAkG1B,CAAC;AAwDF;;GAEG;AACH,eAAO,MAAM,oBAAoB,kGAuIhC,CAAC;AAEF,eAAe,cAAc,CAAC"}
|