@trinityui/design-system 2.11.1 → 2.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2171 -0
- package/CONTRIBUTING.md +180 -69
- package/LICENSE +21 -0
- package/MIGRATION.md +508 -28
- 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 +17219 -9131
- 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 +159 -77
- package/dist/components/AI/AIChainOfThought.d.ts.map +1 -1
- package/dist/components/AI/AIChainOfThought.types.d.ts +292 -40
- 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 +81 -11
- 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 +104 -16
- 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 +47 -4
- 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 +143 -8
- 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.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/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 +18 -1
- package/dist/components/TopNavHeader.d.ts.map +1 -1
- package/dist/components/TopNavWithSidebar.d.ts +61 -2
- 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 +9 -2
- package/dist/components/shared/safeContent.d.ts.map +1 -1
- 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 +13925 -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 +69 -69
- 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,67 @@
|
|
|
1
|
+
import type { AIResponseSource } from './types/response';
|
|
2
|
+
/**
|
|
3
|
+
* What {@link useBlockSources} returns for one block. Every lookup is a map read: nothing
|
|
4
|
+
* rescans the sources, so a large table can look up each cell while it renders. The returned
|
|
5
|
+
* arrays are shared; read them, never change them.
|
|
6
|
+
*
|
|
7
|
+
* @since 2.13.0
|
|
8
|
+
*/
|
|
9
|
+
export interface AIBlockSourcesApi {
|
|
10
|
+
/** The sources whose `blockIds` name this block, in the response's `sources` order. */
|
|
11
|
+
sources: AIResponseSource[];
|
|
12
|
+
/**
|
|
13
|
+
* The sources whose `cellRefs` name one cell of this table block.
|
|
14
|
+
*
|
|
15
|
+
* @param row The row's `rowKey` value when the table sets `TableBlock.rowKey`, otherwise its
|
|
16
|
+
* 0-based index in `rows` as sent (before sorting). Matched as text: `0` and `'0'` are the
|
|
17
|
+
* same row.
|
|
18
|
+
* @param column The column's `key`.
|
|
19
|
+
*/
|
|
20
|
+
getCellSources(row: string | number, column: string): AIResponseSource[];
|
|
21
|
+
/**
|
|
22
|
+
* The sources whose `pointRefs` name one point of this chart block.
|
|
23
|
+
*
|
|
24
|
+
* @param series The series' `dataKey`.
|
|
25
|
+
* @param index The point's 0-based index in the chart's `data`.
|
|
26
|
+
*/
|
|
27
|
+
getPointSources(series: string, index: number): AIResponseSource[];
|
|
28
|
+
/**
|
|
29
|
+
* A source's number: its 1-based place in the response's `sources`, the number inline source
|
|
30
|
+
* chips and AISourcesPanel show. `undefined` for an id the response does not have.
|
|
31
|
+
*/
|
|
32
|
+
getSourceNumber(sourceId: string): number | undefined;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* The sources behind one block of the AI response it renders in: the block's own sources, the
|
|
36
|
+
* sources of each table cell and chart point, and each source's number. Use it in a custom
|
|
37
|
+
* table or chart renderer to put source chips on the cells and points the response cites.
|
|
38
|
+
*
|
|
39
|
+
* It reads the response that AIResponseRenderer provides around its blocks. Outside one it
|
|
40
|
+
* returns an empty API (no sources, `undefined` numbers) with a stable identity, never throws,
|
|
41
|
+
* and warns once in development.
|
|
42
|
+
*
|
|
43
|
+
* Numbers follow the response's `sources` order. The backend appends sources while a response
|
|
44
|
+
* streams and keeps earlier ones in place; reordering them renumbers the chips.
|
|
45
|
+
*
|
|
46
|
+
* @param blockId The `id` of the table or chart block.
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* ```tsx
|
|
50
|
+
* function RevenueCell({ blockId, row, column, value }: { blockId: string; row: number; column: string; value: string }) {
|
|
51
|
+
* const { getCellSources, getSourceNumber } = useBlockSources(blockId);
|
|
52
|
+
* const cited = getCellSources(row, column);
|
|
53
|
+
* return (
|
|
54
|
+
* <td>
|
|
55
|
+
* {value}
|
|
56
|
+
* {cited.map((source) => (
|
|
57
|
+
* <sup key={source.id}>[{getSourceNumber(source.id)}]</sup>
|
|
58
|
+
* ))}
|
|
59
|
+
* </td>
|
|
60
|
+
* );
|
|
61
|
+
* }
|
|
62
|
+
* ```
|
|
63
|
+
*
|
|
64
|
+
* @since 2.13.0
|
|
65
|
+
*/
|
|
66
|
+
export declare function useBlockSources(blockId: string): AIBlockSourcesApi;
|
|
67
|
+
//# sourceMappingURL=useBlockSources.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useBlockSources.d.ts","sourceRoot":"","sources":["../../../src/components/AI/useBlockSources.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEzD;;;;;;GAMG;AACH,MAAM,WAAW,iBAAiB;IAChC,uFAAuF;IACvF,OAAO,EAAE,gBAAgB,EAAE,CAAC;IAC5B;;;;;;;OAOG;IACH,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,gBAAgB,EAAE,CAAC;IACzE;;;;;OAKG;IACH,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,gBAAgB,EAAE,CAAC;IACnE;;;OAGG;IACH,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;CACvD;AAYD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,iBAAiB,CAuBlE"}
|
|
@@ -35,11 +35,24 @@ export interface UseBrowserVoiceModeOptions {
|
|
|
35
35
|
* silent and resume listening.
|
|
36
36
|
*/
|
|
37
37
|
respond?: (text: string) => string | void | Promise<string | void>;
|
|
38
|
-
/**
|
|
38
|
+
/**
|
|
39
|
+
* BCP 47 language tag for recognition and synthesis. Resolution order: this
|
|
40
|
+
* option, then the `locale` of the nearest `AIConfigProvider` that sets one
|
|
41
|
+
* (an ancestor's when the nearest sets none), then `en-US`. Without a
|
|
42
|
+
* provider locale the default stays `en-US`; the page's `lang` attribute is
|
|
43
|
+
* not read.
|
|
44
|
+
*/
|
|
39
45
|
lang?: string;
|
|
40
46
|
}
|
|
41
47
|
export interface UseBrowserVoiceModeResult {
|
|
42
|
-
/**
|
|
48
|
+
/**
|
|
49
|
+
* Whether the browser supports the required Web Speech APIs.
|
|
50
|
+
*
|
|
51
|
+
* `false` on the server and during hydration, so server and client markup
|
|
52
|
+
* match. React re-renders with the real value right after hydration. A
|
|
53
|
+
* client-only render (`createRoot`) gets the real value on its first render.
|
|
54
|
+
* Render your voice control from it as usual.
|
|
55
|
+
*/
|
|
43
56
|
supported: boolean;
|
|
44
57
|
/** Whether voice mode is currently active. */
|
|
45
58
|
open: boolean;
|
|
@@ -55,6 +68,22 @@ export interface UseBrowserVoiceModeResult {
|
|
|
55
68
|
stop: () => void;
|
|
56
69
|
/** Toggle the microphone on/off without leaving voice mode. */
|
|
57
70
|
toggleMute: () => void;
|
|
71
|
+
/**
|
|
72
|
+
* Why voice mode stopped by itself. Set when the recognizer reports an error
|
|
73
|
+
* that restarting cannot fix; voice mode then closes instead of retrying.
|
|
74
|
+
* `undefined` while nothing has failed. The next `start()` clears it.
|
|
75
|
+
*
|
|
76
|
+
* - `'not-allowed'`: microphone access was denied.
|
|
77
|
+
* - `'no-microphone'`: no microphone could capture audio.
|
|
78
|
+
* - `'service-unavailable'`: the browser's speech service refused the
|
|
79
|
+
* request or cannot recognize the requested language.
|
|
80
|
+
*
|
|
81
|
+
* Other recognition errors (`no-speech`, `aborted`, `network`) keep
|
|
82
|
+
* restarting recognition while voice mode is open.
|
|
83
|
+
*
|
|
84
|
+
* @since 2.13.0
|
|
85
|
+
*/
|
|
86
|
+
error?: 'not-allowed' | 'no-microphone' | 'service-unavailable';
|
|
58
87
|
}
|
|
59
88
|
export declare function useBrowserVoiceMode(options?: UseBrowserVoiceModeOptions): UseBrowserVoiceModeResult;
|
|
60
89
|
export default useBrowserVoiceMode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useBrowserVoiceMode.d.ts","sourceRoot":"","sources":["../../../src/components/AI/useBrowserVoiceMode.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAGH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"useBrowserVoiceMode.d.ts","sourceRoot":"","sources":["../../../src/components/AI/useBrowserVoiceMode.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAGH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAGnD,MAAM,WAAW,0BAA0B;IACzC,gEAAgE;IAChE,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC;;;;OAIG;IACH,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IACnE;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,yBAAyB;IACxC;;;;;;;OAOG;IACH,SAAS,EAAE,OAAO,CAAC;IACnB,8CAA8C;IAC9C,IAAI,EAAE,OAAO,CAAC;IACd,kEAAkE;IAClE,MAAM,EAAE,aAAa,CAAC;IACtB,oEAAoE;IACpE,UAAU,EAAE,MAAM,CAAC;IACnB,uCAAuC;IACvC,KAAK,EAAE,OAAO,CAAC;IACf,4CAA4C;IAC5C,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,0CAA0C;IAC1C,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,+DAA+D;IAC/D,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB;;;;;;;;;;;;;;OAcG;IACH,KAAK,CAAC,EAAE,aAAa,GAAG,eAAe,GAAG,qBAAqB,CAAC;CACjE;AA8ED,wBAAgB,mBAAmB,CACjC,OAAO,GAAE,0BAA+B,GACvC,yBAAyB,CA2L3B;AAED,eAAe,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview useWelcomeComposerHandoff: the start screen's composer moving to the bottom of a
|
|
3
|
+
* chat after the first message (post-M8 lane welcome).
|
|
4
|
+
* @module components/AI/useWelcomeComposerHandoff
|
|
5
|
+
*
|
|
6
|
+
* InsightEnginePanel and InsightEngine show AIChatWelcome, with their composer centred in it,
|
|
7
|
+
* before the first message, and their thread with the composer at the bottom after it. The
|
|
8
|
+
* composer element moves between the two places, so this hook carries focus over and plays the
|
|
9
|
+
* move: the bottom composer slides from where the centred one was.
|
|
10
|
+
*/
|
|
11
|
+
import * as React from 'react';
|
|
12
|
+
/** The field inside a composer that takes focus (InsightEngine's selector). */
|
|
13
|
+
export declare const WELCOME_FIELD_SELECTOR = "textarea:not([aria-hidden=\"true\"]), input:not([type=\"hidden\"]):not([type=\"file\"])";
|
|
14
|
+
/**
|
|
15
|
+
* The welcome-to-thread handoff of a host that shows AIChatWelcome before the first message and
|
|
16
|
+
* its thread with a bottom composer after it (InsightEnginePanel, InsightEngine). Call
|
|
17
|
+
* `capture()` right before the send that ends the welcome: when the welcome goes away, focus
|
|
18
|
+
* moves to the bottom composer's field if it was inside the welcome, and the bottom composer
|
|
19
|
+
* slides from where the welcome's composer was (the token `motion.duration.slow` with the
|
|
20
|
+
* default easing; no motion under reduced motion).
|
|
21
|
+
*
|
|
22
|
+
* Host plumbing: no package entry exports it.
|
|
23
|
+
*/
|
|
24
|
+
export declare function useWelcomeComposerHandoff(welcomeVisible: boolean): {
|
|
25
|
+
welcomeRef: React.RefObject<HTMLDivElement | null>;
|
|
26
|
+
bottomRef: React.RefObject<HTMLDivElement | null>;
|
|
27
|
+
capture: () => void;
|
|
28
|
+
clear: () => void;
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=useWelcomeComposerHandoff.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useWelcomeComposerHandoff.d.ts","sourceRoot":"","sources":["../../../src/components/AI/useWelcomeComposerHandoff.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,+EAA+E;AAC/E,eAAO,MAAM,sBAAsB,4FAAsF,CAAC;AAE1H;;;;;;;;;GASG;AACH,wBAAgB,yBAAyB,CAAC,cAAc,EAAE,OAAO;;;;;EAqChE"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Letter indices for lists (WI-21a): a, b, ..., z, aa, ab, ..., az, ba, ..., zz, aaa.
|
|
3
|
+
*
|
|
4
|
+
* Bijective base 26, the way spreadsheet columns count, so every index has letters and none
|
|
5
|
+
* repeats. It replaces `String.fromCharCode(97 + index)`, which gave '{', '|' and '}' after z.
|
|
6
|
+
*
|
|
7
|
+
* Pure: no React, no DOM, no module state.
|
|
8
|
+
*
|
|
9
|
+
* @module components/AI/utils/alphaIndex
|
|
10
|
+
* @internal — not part of the public API; see ADR-02
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* The letters for a zero-based index: `toAlphaIndex(0)` is 'a', `toAlphaIndex(25)` 'z',
|
|
14
|
+
* `toAlphaIndex(26)` 'aa' and `toAlphaIndex(27)` 'ab'.
|
|
15
|
+
*
|
|
16
|
+
* @throws RangeError for a negative, fractional or non-finite index.
|
|
17
|
+
*/
|
|
18
|
+
export declare function toAlphaIndex(index: number): string;
|
|
19
|
+
//# sourceMappingURL=alphaIndex.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alphaIndex.d.ts","sourceRoot":"","sources":["../../../../src/components/AI/utils/alphaIndex.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CASlD"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @internal — not part of the public API; see ADR-02
|
|
3
|
+
*
|
|
4
|
+
* useBlockReadyAnnouncement: the one "ready" announcement of an interactive response block
|
|
5
|
+
* (master plan G-12, ADR-05 (4), ADR-19).
|
|
6
|
+
*
|
|
7
|
+
* An interactive block (a clarification, a plan to review, a query) streams in with its
|
|
8
|
+
* controls `aria-disabled`, and announces nothing while it streams. When it first becomes
|
|
9
|
+
* interactive after streaming, it announces `message` once, politely, through `useAnnounce`:
|
|
10
|
+
* inside a ChatThread that is the thread's `LiveRegionProvider` (so no live region is nested in
|
|
11
|
+
* the log), elsewhere the nearest provider or the document-level region.
|
|
12
|
+
*
|
|
13
|
+
* - A block that mounts complete (a reloaded thread, an answer that arrived whole) never
|
|
14
|
+
* announces: nothing changed for the reader.
|
|
15
|
+
* - It announces once per block id: a re-render, a new `message`, React StrictMode's double
|
|
16
|
+
* effects, or the block turning read-only and back do not repeat it. A new `blockId` is a new
|
|
17
|
+
* block (it announces only if it streams in).
|
|
18
|
+
* - `message` defaults to `ai.blocks.ready` ('Ready for your input'). Blocks with better text
|
|
19
|
+
* pass their own (`ai.clarificationPrompt.ready`, `ai.planReview.*`).
|
|
20
|
+
* - `BlockReadyAnnouncementSuppressed`: a host that announces on the block's behalf (the chain
|
|
21
|
+
* hosting a plan-review phase announces the pinned plan text once, M8 W2-CH) provides `true`,
|
|
22
|
+
* and the hook stays silent, so the reader hears the plan once. A block whose ready moment
|
|
23
|
+
* passes while suppressed counts as announced.
|
|
24
|
+
*
|
|
25
|
+
* Effects only, so the server render and hydration are unaffected.
|
|
26
|
+
*
|
|
27
|
+
* Registered in src/components/internal/index.ts under AI ORGANISMS INTERNALS (G-30); no
|
|
28
|
+
* package entry exports it.
|
|
29
|
+
*
|
|
30
|
+
* @module components/AI/utils/blockReady
|
|
31
|
+
*/
|
|
32
|
+
import * as React from 'react';
|
|
33
|
+
/**
|
|
34
|
+
* `true` inside a host that announces its blocks' ready moment itself; `useBlockReadyAnnouncement`
|
|
35
|
+
* then stays silent. Default `false`.
|
|
36
|
+
*/
|
|
37
|
+
export declare const BlockReadyAnnouncementSuppressed: React.Context<boolean>;
|
|
38
|
+
/** Options of {@link useBlockReadyAnnouncement}. */
|
|
39
|
+
export interface UseBlockReadyAnnouncementOptions {
|
|
40
|
+
/** Whether the block is still streaming (`block.status === 'streaming'`). */
|
|
41
|
+
streaming: boolean;
|
|
42
|
+
/** Whether the block's controls are usable now (false when read-only, resolved or without a handler). */
|
|
43
|
+
interactive: boolean;
|
|
44
|
+
/** The announcement. Default `ai.blocks.ready`. An empty string announces nothing. */
|
|
45
|
+
message?: string;
|
|
46
|
+
/** The block's id. A new id is a new block. */
|
|
47
|
+
blockId?: string;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Announces `message` once when the block first becomes interactive after streaming. See the
|
|
51
|
+
* module header for the rules.
|
|
52
|
+
*/
|
|
53
|
+
export declare function useBlockReadyAnnouncement({ streaming, interactive, message, blockId }: UseBlockReadyAnnouncementOptions): void;
|
|
54
|
+
//# sourceMappingURL=blockReady.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"blockReady.d.ts","sourceRoot":"","sources":["../../../../src/components/AI/utils/blockReady.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B;;;GAGG;AACH,eAAO,MAAM,gCAAgC,wBAAsC,CAAC;AAGpF,oDAAoD;AACpD,MAAM,WAAW,gCAAgC;IAC/C,6EAA6E;IAC7E,SAAS,EAAE,OAAO,CAAC;IACnB,yGAAyG;IACzG,WAAW,EAAE,OAAO,CAAC;IACrB,sFAAsF;IACtF,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,+CAA+C;IAC/C,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAUD;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,EAAE,SAAS,EAAE,WAAW,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,gCAAgC,GAAG,IAAI,CAyB9H"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { AIBlockEvent } from '../types/hitl';
|
|
2
|
+
import type { AIResponse, ClarificationBlock } from '../types/response';
|
|
3
|
+
/** The message fields the gate reads: any chat message type with these fits. */
|
|
4
|
+
export interface BlockGateMessage {
|
|
5
|
+
role: string;
|
|
6
|
+
streaming?: boolean;
|
|
7
|
+
response?: AIResponse;
|
|
8
|
+
}
|
|
9
|
+
/** A handler with ChatThread's `onBlockEvent` signature. */
|
|
10
|
+
export type MessageBlockEventHandler<M extends BlockGateMessage> = (message: M, event: AIBlockEvent) => void | Promise<void>;
|
|
11
|
+
/** What {@link useRequiredClarificationGate} returns. */
|
|
12
|
+
export interface RequiredClarificationGate<M extends BlockGateMessage> {
|
|
13
|
+
/** The composer's visible reason while a required question waits for an answer, else `null`. */
|
|
14
|
+
blockedReason: string | null;
|
|
15
|
+
/** Pass to ChatThread's `onBlockEvent`; `undefined` when no `onBlockEvent` is wired. */
|
|
16
|
+
handleBlockEvent: MessageBlockEventHandler<M> | undefined;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* The latest assistant message's first required clarification that is complete and unanswered,
|
|
20
|
+
* or `null`. See the module header.
|
|
21
|
+
*/
|
|
22
|
+
export declare function getPendingRequiredClarification(messages: readonly BlockGateMessage[], locallyResolvedIds?: ReadonlySet<string> | readonly string[]): ClarificationBlock | null;
|
|
23
|
+
/**
|
|
24
|
+
* The required-clarification gate over `messages`, wrapping `onBlockEvent`. See the module
|
|
25
|
+
* header.
|
|
26
|
+
*/
|
|
27
|
+
export declare function useRequiredClarificationGate<M extends BlockGateMessage>(messages: readonly M[], onBlockEvent: MessageBlockEventHandler<M> | undefined): RequiredClarificationGate<M>;
|
|
28
|
+
//# sourceMappingURL=blocks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"blocks.d.ts","sourceRoot":"","sources":["../../../../src/components/AI/utils/blocks.ts"],"names":[],"mappings":"AA4CA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,KAAK,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAExE,gFAAgF;AAChF,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,UAAU,CAAC;CACvB;AAED,4DAA4D;AAC5D,MAAM,MAAM,wBAAwB,CAAC,CAAC,SAAS,gBAAgB,IAAI,CAAC,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,YAAY,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;AAE7H,yDAAyD;AACzD,MAAM,WAAW,yBAAyB,CAAC,CAAC,SAAS,gBAAgB;IACnE,gGAAgG;IAChG,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,wFAAwF;IACxF,gBAAgB,EAAE,wBAAwB,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC;CAC3D;AAWD;;;GAGG;AACH,wBAAgB,+BAA+B,CAC7C,QAAQ,EAAE,SAAS,gBAAgB,EAAE,EACrC,kBAAkB,GAAE,WAAW,CAAC,MAAM,CAAC,GAAG,SAAS,MAAM,EAAO,GAC/D,kBAAkB,GAAG,IAAI,CAe3B;AAWD;;;GAGG;AACH,wBAAgB,4BAA4B,CAAC,CAAC,SAAS,gBAAgB,EACrE,QAAQ,EAAE,SAAS,CAAC,EAAE,EACtB,YAAY,EAAE,wBAAwB,CAAC,CAAC,CAAC,GAAG,SAAS,GACpD,yBAAyB,CAAC,CAAC,CAAC,CAiD9B"}
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Confidence utilities (master plan F-04, ADR-03).
|
|
3
|
+
*
|
|
4
|
+
* Pure functions for confidence values on the 0-1 scale (ADR-16 (4), contract rule 1): check a
|
|
5
|
+
* value, round it, rate it low, medium or high, and format it as a locale percent.
|
|
6
|
+
*
|
|
7
|
+
* Why not `Math.round(value * 100)`: it disagrees with Intl at half units. `Math.round(0.565 *
|
|
8
|
+
* 100)` is 56, because 0.565 * 100 is 56.49999… in binary floating point, while
|
|
9
|
+
* `Intl.NumberFormat('en-US', { style: 'percent' })` formats 0.565 as '57%': it rounds the
|
|
10
|
+
* decimal digits half away from zero ("halfExpand"). A level computed one way next to text
|
|
11
|
+
* formatted the other way shows '57%' rated below a 57% threshold. So rounding goes through Intl
|
|
12
|
+
* too, and `describeConfidence` rounds once, then rates and formats that same number.
|
|
13
|
+
*
|
|
14
|
+
* Rules for this module: no React, no DOM, no console and no module state, so every function
|
|
15
|
+
* is safe on the server and gives the same answer everywhere. Its one module-level call is
|
|
16
|
+
* marked `@__PURE__`, so bundles that do not use it drop it (OD-A3: this module sits in the
|
|
17
|
+
* app-shell chunk that every entry loads). Components emit warnings, from
|
|
18
|
+
* effects (ADR-30 (2)). There are no scale heuristics: 0-100 data is converted explicitly with
|
|
19
|
+
* `normalizeConfidence(value, 'percent')`.
|
|
20
|
+
*
|
|
21
|
+
* ICU caveat: locale output comes from the runtime's ICU data, which can differ between Node and
|
|
22
|
+
* browsers for some locales. Rounding does not: it always uses 'en-US' digits internally.
|
|
23
|
+
*
|
|
24
|
+
* @module components/AI/utils/confidence
|
|
25
|
+
*/
|
|
26
|
+
import type { AIConfidenceLevel, AIConfidenceThresholds } from '../types/hitl';
|
|
27
|
+
/**
|
|
28
|
+
* Default confidence thresholds: 0.6 and above is medium, 0.85 and above is high. The single
|
|
29
|
+
* source for these numbers; `AIConfigProvider` and every component read them from here.
|
|
30
|
+
*
|
|
31
|
+
* Documented placeholders owned by product (ADR-06 (9)): override them with the provider's
|
|
32
|
+
* `thresholds` prop.
|
|
33
|
+
*
|
|
34
|
+
* @since 2.13.0
|
|
35
|
+
*/
|
|
36
|
+
export declare const DEFAULT_AI_CONFIDENCE_THRESHOLDS: Readonly<AIConfidenceThresholds>;
|
|
37
|
+
/** Why a value was rejected: NaN or not a number at all ('0.5'), or outside 0-1 (92). */
|
|
38
|
+
type InvalidReason = 'not-a-number' | 'out-of-range';
|
|
39
|
+
/**
|
|
40
|
+
* Checks that a value is a confidence: a number from 0 to 1, inclusive. Otherwise it gives the
|
|
41
|
+
* reason: `'not-a-number'` (NaN, or not a number at all, such as the string '0.5') or
|
|
42
|
+
* `'out-of-range'` (below 0 or above 1, such as 92 on a 0-100 scale).
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* ```ts
|
|
46
|
+
* validateConfidence(0.92); // { ok: true, value: 0.92 }
|
|
47
|
+
* validateConfidence(92); // { ok: false, reason: 'out-of-range' }
|
|
48
|
+
* validateConfidence('0.5'); // { ok: false, reason: 'not-a-number' }
|
|
49
|
+
* ```
|
|
50
|
+
*
|
|
51
|
+
* @since 2.13.0
|
|
52
|
+
*/
|
|
53
|
+
export declare function validateConfidence(value: unknown): {
|
|
54
|
+
ok: true;
|
|
55
|
+
value: number;
|
|
56
|
+
} | {
|
|
57
|
+
ok: false;
|
|
58
|
+
reason: InvalidReason;
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* Fills in and checks thresholds. Missing keys take the defaults. When the result is not
|
|
62
|
+
* `0 <= medium <= high <= 1` (or a value is not a finite number), it returns the defaults and
|
|
63
|
+
* `valid: false`, so a caller can warn.
|
|
64
|
+
*
|
|
65
|
+
* @example
|
|
66
|
+
* ```ts
|
|
67
|
+
* resolveConfidenceThresholds({ high: 0.9 }); // { thresholds: { medium: 0.6, high: 0.9 }, valid: true }
|
|
68
|
+
* resolveConfidenceThresholds({ medium: 0.9, high: 0.5 }); // the defaults, valid: false
|
|
69
|
+
* ```
|
|
70
|
+
*
|
|
71
|
+
* @since 2.13.0
|
|
72
|
+
*/
|
|
73
|
+
export declare function resolveConfidenceThresholds(partial?: Partial<AIConfidenceThresholds>): {
|
|
74
|
+
thresholds: Readonly<AIConfidenceThresholds>;
|
|
75
|
+
valid: boolean;
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* Rounds a 0-1 value to `fractionDigits` decimals of its percent, the same way Intl percent
|
|
79
|
+
* formatting rounds ("halfExpand" on the shortest decimal form): 0.565 becomes 0.57 at the
|
|
80
|
+
* default 0 digits, where `Math.round(0.565 * 100) / 100` gives 0.56.
|
|
81
|
+
*
|
|
82
|
+
* @param value A finite number; NaN and infinities are returned unchanged.
|
|
83
|
+
* @param fractionDigits Decimals of the percent to keep: an integer from 0 to 18. Default 0.
|
|
84
|
+
* @throws RangeError when `fractionDigits` is out of range.
|
|
85
|
+
*
|
|
86
|
+
* @example
|
|
87
|
+
* ```ts
|
|
88
|
+
* roundConfidence(0.565); // 0.57 (57%)
|
|
89
|
+
* roundConfidence(0.12345, 1); // 0.123 (12.3%)
|
|
90
|
+
* ```
|
|
91
|
+
*
|
|
92
|
+
* @since 2.13.0
|
|
93
|
+
*/
|
|
94
|
+
export declare function roundConfidence(value: number, fractionDigits?: number): number;
|
|
95
|
+
/**
|
|
96
|
+
* Rates a 0-1 value against the thresholds: `'high'` from `high` up, `'medium'` from `medium`
|
|
97
|
+
* up, `'low'` below. Both bounds are inclusive. The value is used as given; to rate what a
|
|
98
|
+
* user reads, rate the rounded value (`describeConfidence` does).
|
|
99
|
+
*
|
|
100
|
+
* @param thresholds Partial thresholds; missing or invalid ones fall back to the defaults.
|
|
101
|
+
* @returns The level, or `null` when the value is not a valid confidence.
|
|
102
|
+
*
|
|
103
|
+
* @example
|
|
104
|
+
* ```ts
|
|
105
|
+
* getConfidenceLevel(0.85); // 'high'
|
|
106
|
+
* getConfidenceLevel(0.5999); // 'low'
|
|
107
|
+
* getConfidenceLevel(92); // null
|
|
108
|
+
* ```
|
|
109
|
+
*
|
|
110
|
+
* @since 2.13.0
|
|
111
|
+
*/
|
|
112
|
+
export declare function getConfidenceLevel(value: number, thresholds?: Partial<AIConfidenceThresholds>): AIConfidenceLevel | null;
|
|
113
|
+
/**
|
|
114
|
+
* Formats a 0-1 value as a percent in `locale`, through `Intl.NumberFormat` with
|
|
115
|
+
* `style: 'percent'`. Pass a locale explicitly; when the app has none, pass 'en-US'.
|
|
116
|
+
*
|
|
117
|
+
* It formats any number as given (1.2 is '120%'); check the value first, or use
|
|
118
|
+
* `describeConfidence`, which does both.
|
|
119
|
+
*
|
|
120
|
+
* @param options.maximumFractionDigits Decimals of the percent: an integer from 0 to 18. Default 0.
|
|
121
|
+
* @throws RangeError when `locale` is not a valid language tag or the digits are out of range.
|
|
122
|
+
*
|
|
123
|
+
* @example
|
|
124
|
+
* ```ts
|
|
125
|
+
* formatConfidence(0.92, 'en-US'); // '92%'
|
|
126
|
+
* formatConfidence(0.92, 'de-DE'); // '92 %' (with a no-break space)
|
|
127
|
+
* ```
|
|
128
|
+
*
|
|
129
|
+
* @since 2.13.0
|
|
130
|
+
*/
|
|
131
|
+
export declare function formatConfidence(value: number, locale: string, options?: {
|
|
132
|
+
maximumFractionDigits?: number;
|
|
133
|
+
}): string;
|
|
134
|
+
/**
|
|
135
|
+
* The one call a component needs: checks the value, rounds it once, then rates and formats
|
|
136
|
+
* that same rounded number, so the level and the text always agree (0.5999 reads '60%' and
|
|
137
|
+
* rates medium at the default thresholds).
|
|
138
|
+
*
|
|
139
|
+
* @param value Anything; only a number from 0 to 1 is valid.
|
|
140
|
+
* @param options.locale The locale for the text. Pass 'en-US' when the app has none.
|
|
141
|
+
* @param options.thresholds Partial thresholds; missing or invalid ones fall back to the defaults.
|
|
142
|
+
* @param options.fractionDigits Decimals of the percent: an integer from 0 to 18. Default 0.
|
|
143
|
+
*
|
|
144
|
+
* @example
|
|
145
|
+
* ```ts
|
|
146
|
+
* describeConfidence(0.565, { locale: 'en-US' });
|
|
147
|
+
* // { status: 'ok', rounded: 0.57, level: 'low', text: '57%' }
|
|
148
|
+
* describeConfidence(92, { locale: 'en-US' });
|
|
149
|
+
* // { status: 'invalid', reason: 'out-of-range' }
|
|
150
|
+
* ```
|
|
151
|
+
*
|
|
152
|
+
* @since 2.13.0
|
|
153
|
+
*/
|
|
154
|
+
export declare function describeConfidence(value: unknown, options: {
|
|
155
|
+
thresholds?: Partial<AIConfidenceThresholds>;
|
|
156
|
+
locale: string;
|
|
157
|
+
fractionDigits?: number;
|
|
158
|
+
}): {
|
|
159
|
+
status: 'ok';
|
|
160
|
+
rounded: number;
|
|
161
|
+
level: AIConfidenceLevel;
|
|
162
|
+
text: string;
|
|
163
|
+
} | {
|
|
164
|
+
status: 'invalid';
|
|
165
|
+
reason: InvalidReason;
|
|
166
|
+
};
|
|
167
|
+
/**
|
|
168
|
+
* Converts a confidence to the 0-1 scale, from the scale you name. `'percent'` divides by 100
|
|
169
|
+
* (92 becomes 0.92); `'unit'` returns the value unchanged. It never guesses the scale and does
|
|
170
|
+
* not check the range: validate the result.
|
|
171
|
+
*
|
|
172
|
+
* @example
|
|
173
|
+
* ```ts
|
|
174
|
+
* normalizeConfidence(92, 'percent'); // 0.92
|
|
175
|
+
* normalizeConfidence(0.92, 'unit'); // 0.92
|
|
176
|
+
* ```
|
|
177
|
+
*
|
|
178
|
+
* @since 2.13.0
|
|
179
|
+
*/
|
|
180
|
+
export declare function normalizeConfidence(value: number, from: 'percent' | 'unit'): number;
|
|
181
|
+
export {};
|
|
182
|
+
//# sourceMappingURL=confidence.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"confidence.d.ts","sourceRoot":"","sources":["../../../../src/components/AI/utils/confidence.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,OAAO,KAAK,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAE/E;;;;;;;;GAQG;AACH,eAAO,MAAM,gCAAgC,EAAE,QAAQ,CAAC,sBAAsB,CAG5E,CAAC;AAEH,yFAAyF;AACzF,KAAK,aAAa,GAAG,cAAc,GAAG,cAAc,CAAC;AAerD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,aAAa,CAAA;CAAE,CAIrH;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,2BAA2B,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,sBAAsB,CAAC,GAAG;IACtF,UAAU,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC;IAC7C,KAAK,EAAE,OAAO,CAAC;CAChB,CAQA;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,cAAc,SAAI,GAAG,MAAM,CAKzE;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,OAAO,CAAC,sBAAsB,CAAC,GAAG,iBAAiB,GAAG,IAAI,CAOxH;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,GAAE;IAAE,qBAAqB,CAAC,EAAE,MAAM,CAAA;CAAO,GAAG,MAAM,CAGxH;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,OAAO,EACd,OAAO,EAAE;IAAE,UAAU,CAAC,EAAE,OAAO,CAAC,sBAAsB,CAAC,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,cAAc,CAAC,EAAE,MAAM,CAAA;CAAE,GACjG;IAAE,MAAM,EAAE,IAAI,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,iBAAiB,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,MAAM,EAAE,SAAS,CAAC;IAAC,MAAM,EAAE,aAAa,CAAA;CAAE,CAQ1H;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,GAAG,MAAM,GAAG,MAAM,CAEnF"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { AIPlanFilter, AIStrings } from '../types/hitl';
|
|
2
|
+
/**
|
|
3
|
+
* The display text of one filter.
|
|
4
|
+
*
|
|
5
|
+
* - `filter.label`, when set, is the whole text: the backend already wrote it.
|
|
6
|
+
* - Without an `operator`, an array value reads as `'in'` and any other value as `'eq'`
|
|
7
|
+
* (`AIPlanFilter.operator`).
|
|
8
|
+
* - `'between'` takes `[min, max]`; a value of another shape is listed as for `'eq'`.
|
|
9
|
+
* - An array value under a single-value operator is joined into one list.
|
|
10
|
+
* - An operator this version does not know reads as `'eq'` (open unions, ADR-16 (4) rule 4).
|
|
11
|
+
*
|
|
12
|
+
* @param filter The filter, as the backend sent it.
|
|
13
|
+
* @param options.strings The AI strings, as `useAIStrings()` returns them. Default: the built-in
|
|
14
|
+
* English strings.
|
|
15
|
+
* @param options.locale The locale for numbers and lists. Default 'en-US' (DN-13). An invalid
|
|
16
|
+
* locale throws a RangeError, as `Intl` does.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```ts
|
|
20
|
+
* formatFilter({ field: 'Region', value: 'EMEA' }); // 'Region: EMEA'
|
|
21
|
+
* formatFilter({ field: 'Revenue', operator: 'gt', value: 1000 }); // 'Revenue greater than 1,000'
|
|
22
|
+
* formatFilter({ field: 'Region', value: ['EMEA', 'APAC'] }, { locale: 'de-DE' }); // 'Region: EMEA, APAC'
|
|
23
|
+
* ```
|
|
24
|
+
*
|
|
25
|
+
* @since 2.13.0
|
|
26
|
+
*/
|
|
27
|
+
export declare function formatFilter(filter: AIPlanFilter, options?: {
|
|
28
|
+
strings?: AIStrings;
|
|
29
|
+
locale?: string;
|
|
30
|
+
}): string;
|
|
31
|
+
//# sourceMappingURL=filters.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filters.d.ts","sourceRoot":"","sources":["../../../../src/components/AI/utils/filters.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AA0B7D;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,YAAY,EAAE,OAAO,GAAE;IAAE,OAAO,CAAC,EAAE,SAAS,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAO,GAAG,MAAM,CAoBjH"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { AIResponse } from '../types/response';
|
|
2
|
+
/**
|
|
3
|
+
* The response as plain text, for the Copy action. See the module notes.
|
|
4
|
+
*
|
|
5
|
+
* @internal
|
|
6
|
+
*/
|
|
7
|
+
export declare function getResponsePlainText(response: AIResponse): string;
|
|
8
|
+
//# sourceMappingURL=responseText.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"responseText.d.ts","sourceRoot":"","sources":["../../../../src/components/AI/utils/responseText.ts"],"names":[],"mappings":"AA+BA,OAAO,KAAK,EAAE,UAAU,EAA8B,MAAM,mBAAmB,CAAC;AAsFhF;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,UAAU,GAAG,MAAM,CAajE"}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import type { AISourceCategory } from '../AISourcesPanel';
|
|
2
|
+
import type { AIStrings } from '../types/hitl';
|
|
3
|
+
import type { AIResponseSource } from '../types/response';
|
|
4
|
+
/**
|
|
5
|
+
* An ISO 8601 date or date-time as display text, the same on the server and in the browser.
|
|
6
|
+
*
|
|
7
|
+
* - A date-only value ('2026-06-30') is formatted in UTC, so it shows the same calendar day in
|
|
8
|
+
* every time zone: 'June 30, 2026'.
|
|
9
|
+
* - A date-time ('2026-06-30T23:59:59Z') is formatted in `timeZone`, with the zone's short name:
|
|
10
|
+
* 'June 30, 2026 at 11:59 PM UTC'. A date-time without an offset is read as UTC, because the
|
|
11
|
+
* runtime would otherwise read it in its own zone, which differs between server and browser.
|
|
12
|
+
* - Anything else, including an impossible date ('2026-02-31') and an empty string, is returned
|
|
13
|
+
* unchanged.
|
|
14
|
+
*
|
|
15
|
+
* @param iso The date or date-time, as the data carries it (ADR-16 (4) rule 2).
|
|
16
|
+
* @param options.locale The locale of the text. Default 'en-US' (DN-13).
|
|
17
|
+
* @param options.timeZone The IANA time zone of a date-time. Default 'UTC'. Date-only values
|
|
18
|
+
* ignore it.
|
|
19
|
+
*
|
|
20
|
+
* An invalid locale or time zone throws a RangeError, as `Intl` does.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```ts
|
|
24
|
+
* formatAsOf('2026-06-30'); // 'June 30, 2026'
|
|
25
|
+
* formatAsOf('2026-06-30T16:00:00Z', { timeZone: 'America/Los_Angeles' }); // 'June 30, 2026 at 9:00 AM PDT'
|
|
26
|
+
* formatAsOf('last quarter'); // 'last quarter'
|
|
27
|
+
* ```
|
|
28
|
+
*
|
|
29
|
+
* @since 2.13.0
|
|
30
|
+
*/
|
|
31
|
+
export declare function formatAsOf(iso: string, options?: {
|
|
32
|
+
locale?: string;
|
|
33
|
+
timeZone?: string;
|
|
34
|
+
}): string;
|
|
35
|
+
/**
|
|
36
|
+
* `formatAsOf` with the locale and time zone of the nearest `AIConfigProvider`
|
|
37
|
+
* (`useAILocale()`, `useAITimeZone()`). Without a provider time zone it formats date-times in
|
|
38
|
+
* UTC during server rendering and hydration and in the browser's zone afterwards, so the markup
|
|
39
|
+
* hydrates without a mismatch (OD-F22 A). The returned function is stable while the locale and
|
|
40
|
+
* time zone stay the same.
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* ```tsx
|
|
44
|
+
* function AsOf({ iso }: { iso: string }) {
|
|
45
|
+
* const format = useFormatAsOf();
|
|
46
|
+
* return <time dateTime={iso}>{format(iso)}</time>;
|
|
47
|
+
* }
|
|
48
|
+
* ```
|
|
49
|
+
*
|
|
50
|
+
* @since 2.13.0
|
|
51
|
+
*/
|
|
52
|
+
export declare function useFormatAsOf(): (iso: string) => string;
|
|
53
|
+
/**
|
|
54
|
+
* Options of {@link toSourceCategories}.
|
|
55
|
+
*
|
|
56
|
+
* @since 2.13.0
|
|
57
|
+
*/
|
|
58
|
+
export interface SourceCategoriesOptions {
|
|
59
|
+
/** The AI strings, as `useAIStrings()` returns them. Default: the built-in English strings. */
|
|
60
|
+
strings?: AIStrings;
|
|
61
|
+
/** The locale for numbers, lists and dates. Default 'en-US' (DN-13). */
|
|
62
|
+
locale?: string;
|
|
63
|
+
/** The IANA time zone of as-of date-times. Default 'UTC'. */
|
|
64
|
+
timeZone?: string;
|
|
65
|
+
/**
|
|
66
|
+
* `'type'` (default): one category per source type, in order of first appearance; a source
|
|
67
|
+
* without a type, or with one this version does not know, goes to 'other'. `'none'`: one
|
|
68
|
+
* category holding every source.
|
|
69
|
+
*/
|
|
70
|
+
groupBy?: 'type' | 'none';
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Turns a response's sources into AISourcesPanel categories.
|
|
74
|
+
*
|
|
75
|
+
* Every item carries the source's `number` (its 1-based place in `sources`, the same number
|
|
76
|
+
* inline source chips show), its `url` and its details; its label is the source's title.
|
|
77
|
+
* Category names and detail terms come from `ai.sources.*`.
|
|
78
|
+
*
|
|
79
|
+
* Numbering assumes `sources` only grows while a response streams (append-only); reordering
|
|
80
|
+
* sources renumbers them.
|
|
81
|
+
*
|
|
82
|
+
* @param sources The response's `sources`. `undefined` or empty gives `[]`.
|
|
83
|
+
*
|
|
84
|
+
* @example
|
|
85
|
+
* ```tsx
|
|
86
|
+
* <AISourcesPanel sources={toSourceCategories(response.sources)} />
|
|
87
|
+
* ```
|
|
88
|
+
*
|
|
89
|
+
* @since 2.13.0
|
|
90
|
+
*/
|
|
91
|
+
export declare function toSourceCategories(sources: readonly AIResponseSource[] | undefined, options?: SourceCategoriesOptions): AISourceCategory[];
|
|
92
|
+
/**
|
|
93
|
+
* {@link toSourceCategories} with the strings, locale and time zone of the nearest
|
|
94
|
+
* `AIConfigProvider`. The result keeps its identity while `sources`, `groupBy` and the provider
|
|
95
|
+
* values stay the same, so it can feed a memoized panel.
|
|
96
|
+
*
|
|
97
|
+
* @example
|
|
98
|
+
* ```tsx
|
|
99
|
+
* function ResponseSources({ response }: { response: AIResponse }) {
|
|
100
|
+
* const categories = useSourceCategories(response.sources);
|
|
101
|
+
* return categories.length > 0 ? <AISourcesPanel sources={categories} /> : null;
|
|
102
|
+
* }
|
|
103
|
+
* ```
|
|
104
|
+
*
|
|
105
|
+
* @since 2.13.0
|
|
106
|
+
*/
|
|
107
|
+
export declare function useSourceCategories(sources?: readonly AIResponseSource[], options?: {
|
|
108
|
+
groupBy?: 'type' | 'none';
|
|
109
|
+
}): AISourceCategory[];
|
|
110
|
+
//# sourceMappingURL=sources.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sources.d.ts","sourceRoot":"","sources":["../../../../src/components/AI/utils/sources.ts"],"names":[],"mappings":"AA2BA,OAAO,KAAK,EAAE,gBAAgB,EAAgB,MAAM,mBAAmB,CAAC;AAGxE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAgB1D;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,GAAE;IAAE,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAO,GAAG,MAAM,CA8BpG;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,aAAa,IAAI,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAIvD;AA8BD;;;;GAIG;AACH,MAAM,WAAW,uBAAuB;IACtC,+FAA+F;IAC/F,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,wEAAwE;IACxE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,6DAA6D;IAC7D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAC3B;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,SAAS,gBAAgB,EAAE,GAAG,SAAS,EAAE,OAAO,GAAE,uBAA4B,GAAG,gBAAgB,EAAE,CAsB9I;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,CAAC,EAAE,SAAS,gBAAgB,EAAE,EACrC,OAAO,GAAE;IAAE,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;CAAO,GAC1C,gBAAgB,EAAE,CAMpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AIDigestCard.d.ts","sourceRoot":"","sources":["../../../src/components/AIDigestCard/AIDigestCard.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"AIDigestCard.d.ts","sourceRoot":"","sources":["../../../src/components/AIDigestCard/AIDigestCard.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAgB/B,OAAO,KAAK,EACV,iBAAiB,EAElB,MAAM,SAAS,CAAC;AA2EjB,eAAO,MAAM,YAAY,0FAmLxB,CAAC;AAEF,eAAe,YAAY,CAAC"}
|