@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,203 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview AICopilotPattern: the human-in-the-loop reference composition (H-29, ADR-12).
|
|
3
|
+
* @module patterns/AICopilotPattern
|
|
4
|
+
*
|
|
5
|
+
* IMPLEMENTATION_PLAN 2.4's AI Copilot pattern: InsightEngine (the drawer or the `embedded`
|
|
6
|
+
* presentation) with ChatThread's default interactive blocks (query, clarification, plan review),
|
|
7
|
+
* the answer's confidence, verification and sources from ChatThread's message slots, and
|
|
8
|
+
* AIChainOfThought reasoning in each answer's attachments. The same component works as a drawer
|
|
9
|
+
* and inside AppLayout's `renderAiPanel`.
|
|
10
|
+
*
|
|
11
|
+
* A thin composition (ADR-12 (3), docs/PATTERNS.md): it owns layout and wiring only. It holds no
|
|
12
|
+
* business state (the composer's text follows the controlled canon through `useControlled`), and
|
|
13
|
+
* adds no live region, landmark or focus code: the organisms inside own them, and the one log is
|
|
14
|
+
* ChatThread's.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```tsx
|
|
18
|
+
* import { useState } from 'react';
|
|
19
|
+
* import { AICopilotPattern, type ChatThreadMessage } from '@trinityui/design-system';
|
|
20
|
+
*
|
|
21
|
+
* export function Copilot({ ask }: { ask: (question: string) => Promise<ChatThreadMessage> }) {
|
|
22
|
+
* const [messages, setMessages] = useState<ChatThreadMessage[]>([]);
|
|
23
|
+
* return (
|
|
24
|
+
* <AICopilotPattern
|
|
25
|
+
* presentation="embedded"
|
|
26
|
+
* messages={messages}
|
|
27
|
+
* suggestedPrompts={['Show Q4 revenue by region']}
|
|
28
|
+
* onSendMessage={async (question) => {
|
|
29
|
+
* setMessages((prev) => [...prev, { id: String(prev.length + 1), role: 'user', content: question }]);
|
|
30
|
+
* const answer = await ask(question);
|
|
31
|
+
* setMessages((prev) => [...prev, answer]);
|
|
32
|
+
* }}
|
|
33
|
+
* />
|
|
34
|
+
* );
|
|
35
|
+
* }
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
import * as React from 'react';
|
|
39
|
+
import type { SxProps, Theme } from '@mui/material/styles';
|
|
40
|
+
import type { AIChainOfThoughtProps } from '../../components/AI/AIChainOfThought.types';
|
|
41
|
+
import type { AIChatWelcomeSuggestion } from '../../components/AI/AIChatWelcome';
|
|
42
|
+
import type { ChatViewMode } from '../../components/AI/ChatHeader';
|
|
43
|
+
import type { ChatHistoryItem } from '../../components/AI/ChatHistoryList';
|
|
44
|
+
import type { ChatThreadMessage, ChatThreadMessageActions } from '../../components/AI/ChatThread';
|
|
45
|
+
import type { AIRelatedQuestion } from '../../components/AI/AIRelatedQuestions';
|
|
46
|
+
import type { AIBlockEvent } from '../../components/AI/types/hitl';
|
|
47
|
+
import { type TrinityRootProps, type TrinitySlotProps } from '../../components/shared/rootProps';
|
|
48
|
+
/**
|
|
49
|
+
* Trinity-owned slots of AICopilotPattern (ADR-04 (6)). Each takes `className`, `sx`, `id`,
|
|
50
|
+
* `data-*` and the element's HTML attributes; owned attributes (`role`, `aria-live`, ...) are
|
|
51
|
+
* ignored.
|
|
52
|
+
*
|
|
53
|
+
* @since 2.13.0
|
|
54
|
+
*/
|
|
55
|
+
export interface AICopilotPatternSlotProps {
|
|
56
|
+
/** The pattern's root `div` (it adds no role). Applied before the root `sx` and `className`. */
|
|
57
|
+
root?: TrinitySlotProps<HTMLDivElement>;
|
|
58
|
+
/**
|
|
59
|
+
* InsightEngine's root (its `slotProps.root`): the drawer's root, or the embedded region.
|
|
60
|
+
*/
|
|
61
|
+
engine?: TrinitySlotProps<HTMLDivElement>;
|
|
62
|
+
/** The message thread's root, ChatThread's log (InsightEngine `slotProps.thread`). */
|
|
63
|
+
thread?: TrinitySlotProps<HTMLDivElement>;
|
|
64
|
+
/** The composer's container at the bottom of the panel (InsightEngine `slotProps.composer`). */
|
|
65
|
+
composer?: TrinitySlotProps<HTMLDivElement>;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* AICopilotPattern's own props, without the root element's HTML attributes.
|
|
69
|
+
*
|
|
70
|
+
* Business data stays the app's: `messages` come in, and the user's actions go out through the
|
|
71
|
+
* organisms' callbacks (`onSendMessage`, `onBlockEvent`, `messageActions`). The pattern keeps
|
|
72
|
+
* only UI state: the composer's text when `inputValue` is not passed.
|
|
73
|
+
*
|
|
74
|
+
* @since 2.13.0
|
|
75
|
+
*/
|
|
76
|
+
export interface AICopilotPatternOwnProps {
|
|
77
|
+
/**
|
|
78
|
+
* Where the copilot renders. `'drawer'`: InsightEngine's right-anchored drawer (persistent on
|
|
79
|
+
* desktop, a full-width modal drawer on phones). `'embedded'`: it fills its parent, for a host
|
|
80
|
+
* panel such as AppLayout's `renderAiPanel`, a page column or a dialog.
|
|
81
|
+
* @default 'drawer'
|
|
82
|
+
*/
|
|
83
|
+
presentation?: 'drawer' | 'embedded';
|
|
84
|
+
/** Whether the copilot is open. A closed embedded copilot stays mounted and hidden. @default true */
|
|
85
|
+
open?: boolean;
|
|
86
|
+
/**
|
|
87
|
+
* Called when the copilot asks to close: the header's Close button, or Escape and the
|
|
88
|
+
* backdrop of the phone drawer. Required for the `'drawer'` presentation (InsightEngine warns in
|
|
89
|
+
* development without it). Optional when `'embedded'`: without it the header has no Close
|
|
90
|
+
* button (in AppLayout's AI panel, pass `renderAiPanel`'s `onClose`).
|
|
91
|
+
*/
|
|
92
|
+
onClose?: (reason?: 'closeButton' | 'escapeKeyDown' | 'backdropClick') => void;
|
|
93
|
+
/** The copilot's title, its h2. Default: InsightEngine's (`ai.insightEngine.title`). */
|
|
94
|
+
title?: string;
|
|
95
|
+
/**
|
|
96
|
+
* The view mode, controlled (InsightEngine `viewMode`). In AppLayout's AI panel, pass
|
|
97
|
+
* `isFullscreen ? 'expanded' : 'sidepanel'` with `onViewModeChange={onFullscreenToggle}` so the
|
|
98
|
+
* header's expand toggle is the panel's fullscreen toggle.
|
|
99
|
+
*/
|
|
100
|
+
viewMode?: ChatViewMode;
|
|
101
|
+
/** The initial view mode when `viewMode` is not passed. @default 'sidepanel' */
|
|
102
|
+
defaultViewMode?: ChatViewMode;
|
|
103
|
+
/** Called with the next view mode when the header's expand toggle is pressed. */
|
|
104
|
+
onViewModeChange?: (mode: ChatViewMode) => void;
|
|
105
|
+
/** The conversation. Assistant answers carry `response` (blocks, sources, metadata). */
|
|
106
|
+
messages: ChatThreadMessage[];
|
|
107
|
+
/** The composer's text, controlled. Without it the pattern keeps the text and clears it after a send. */
|
|
108
|
+
inputValue?: string;
|
|
109
|
+
/** The composer's initial text when `inputValue` is not passed. @default '' */
|
|
110
|
+
defaultInputValue?: string;
|
|
111
|
+
/** Called with the composer's text on every change, controlled or not. */
|
|
112
|
+
onInputChange?: (value: string) => void;
|
|
113
|
+
/**
|
|
114
|
+
* Called with the trimmed text when the user sends a message (the composer, a suggested
|
|
115
|
+
* prompt). Return the promise of your request: while it runs Send stays pending, and a
|
|
116
|
+
* rejection shows the engine's "message wasn't sent" alert with Try again and reaches
|
|
117
|
+
* `onError` (InsightEngine's async path, H-16).
|
|
118
|
+
*/
|
|
119
|
+
onSendMessage: (value: string) => void | Promise<void>;
|
|
120
|
+
/**
|
|
121
|
+
* The async error sink, always with an `Error`: a failed send, message action, block event or
|
|
122
|
+
* reasoning retry. The failure also shows inline where it happened.
|
|
123
|
+
*/
|
|
124
|
+
onError?: (error: Error) => void;
|
|
125
|
+
/**
|
|
126
|
+
* Called with the message and what the user did in an interactive block of its answer or of
|
|
127
|
+
* its reasoning (answered a clarification, confirmed or cancelled a plan). Return the promise
|
|
128
|
+
* of your request: it drives the block's pending state. While the latest answer asks a
|
|
129
|
+
* required clarification, the composer waits for the answer.
|
|
130
|
+
*/
|
|
131
|
+
onBlockEvent?: (message: ChatThreadMessage, event: AIBlockEvent) => void | Promise<void>;
|
|
132
|
+
/**
|
|
133
|
+
* The actions of each assistant message, forwarded unchanged (Copy, thumbs, `onFeedbackSubmit`,
|
|
134
|
+
* Regenerate through `onRegenerate`, Share, Download). App actions go in `getActions`: the
|
|
135
|
+
* golden-dataset handoff is one, shown only to the users your app allows (R23).
|
|
136
|
+
*/
|
|
137
|
+
messageActions?: ChatThreadMessageActions;
|
|
138
|
+
/**
|
|
139
|
+
* The reasoning of an assistant message: return AIChainOfThought's props (its phases: the
|
|
140
|
+
* thinking, a plan awaiting confirmation, a failed task with Retry) to show the chain in the
|
|
141
|
+
* message's attachments, ahead of its sources and related questions, or nothing for none. The
|
|
142
|
+
* chain's content is markdown unless you pass `contentFormat` (ADR-09 (4)). Same shape as
|
|
143
|
+
* InsightEnginePanel's `getReasoning`.
|
|
144
|
+
*/
|
|
145
|
+
getReasoning?: (message: ChatThreadMessage) => AIChainOfThoughtProps | null | undefined;
|
|
146
|
+
/**
|
|
147
|
+
* Starters on the empty copilot (AIChatWelcome's suggestions). A string is its own title and
|
|
148
|
+
* prompt; pass AIChatWelcomeSuggestion objects for a title, a description and an icon. Choosing
|
|
149
|
+
* one sends it through `onSendMessage`.
|
|
150
|
+
*/
|
|
151
|
+
suggestedPrompts?: Array<string | AIChatWelcomeSuggestion>;
|
|
152
|
+
/** Called with the prompt of a chosen starter, before it is sent. */
|
|
153
|
+
onSuggestedPromptSelect?: (prompt: string) => void;
|
|
154
|
+
/**
|
|
155
|
+
* Called with a picked related question (a string arrives as `{ text }`) and its index. The
|
|
156
|
+
* pattern also puts the question in the composer, for the user to send or edit.
|
|
157
|
+
*/
|
|
158
|
+
onRelatedQuestionSelect?: (question: AIRelatedQuestion, index: number) => void;
|
|
159
|
+
/** Past conversations, in the header's history (InsightEngine `chats`). */
|
|
160
|
+
chats?: ChatHistoryItem[];
|
|
161
|
+
/** The open conversation's id. */
|
|
162
|
+
activeChatId?: string;
|
|
163
|
+
/** Called with the id of a conversation picked in the history. */
|
|
164
|
+
onSelectChat?: (id: string) => void;
|
|
165
|
+
/**
|
|
166
|
+
* The empty copilot. Return a node to replace the start screen (the greeting and
|
|
167
|
+
* `suggestedPrompts`), `null` for ChatThread's plain 'Start a conversation' state, or
|
|
168
|
+
* `undefined` for the start screen.
|
|
169
|
+
*/
|
|
170
|
+
renderEmptyState?: () => React.ReactNode;
|
|
171
|
+
/**
|
|
172
|
+
* Your controls in the header, before the expand toggle and Close: for example 'New chat', or
|
|
173
|
+
* AppLayout's fullscreen toggle. They render in a group named 'Conversation actions'
|
|
174
|
+
* (`ai.copilotPattern.headerActions`); give each its own accessible name and a matching tooltip.
|
|
175
|
+
* `null` or `undefined` renders no group.
|
|
176
|
+
*/
|
|
177
|
+
renderHeaderActions?: () => React.ReactNode;
|
|
178
|
+
/** Props for the Trinity-owned slots: `root`, `engine`, `thread` and `composer`. */
|
|
179
|
+
slotProps?: AICopilotPatternSlotProps;
|
|
180
|
+
/** Added to the root's class names. */
|
|
181
|
+
className?: string;
|
|
182
|
+
/** Styles for the root, after its own (object, array and function forms). */
|
|
183
|
+
sx?: SxProps<Theme>;
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Props for AICopilotPattern. Besides its own props, the root takes the HTML attributes of a
|
|
187
|
+
* `div` (`id`, `data-*`, `aria-*`, event handlers), spread before its own (ADR-04). The root has
|
|
188
|
+
* no role; owned attributes (`role`, `aria-live`, ...) are ignored, with a development warning.
|
|
189
|
+
*
|
|
190
|
+
* @since 2.13.0
|
|
191
|
+
*/
|
|
192
|
+
export interface AICopilotPatternProps extends AICopilotPatternOwnProps, TrinityRootProps<HTMLDivElement, AICopilotPatternOwnProps> {
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* AICopilotPattern: InsightEngine wired for the human-in-the-loop flow (plan review, a
|
|
196
|
+
* transparent answer with confidence, verification, sources and reasoning, feedback and app
|
|
197
|
+
* actions). A drawer or embedded in a host panel.
|
|
198
|
+
*
|
|
199
|
+
* @since 2.13.0
|
|
200
|
+
*/
|
|
201
|
+
export declare const AICopilotPattern: React.ForwardRefExoticComponent<AICopilotPatternProps & React.RefAttributes<HTMLDivElement>>;
|
|
202
|
+
export default AICopilotPattern;
|
|
203
|
+
//# sourceMappingURL=AICopilotPattern.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AICopilotPattern.d.ts","sourceRoot":"","sources":["../../../src/patterns/AICopilotPattern/AICopilotPattern.tsx"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/patterns/AICopilotPattern/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,YAAY,EAAE,qBAAqB,EAAE,wBAAwB,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview The pattern layer's barrel (ADR-12, IMPLEMENTATION_PLAN Phase 2).
|
|
3
|
+
* @module patterns
|
|
4
|
+
*
|
|
5
|
+
* A pattern is a thin reference composition of public organisms: it owns layout and wiring and
|
|
6
|
+
* UI state only, and adds no visual primitive, live region, landmark or focus code of its own
|
|
7
|
+
* (the contract is in docs/PATTERNS.md). Each pattern lives in `src/patterns/<Name>Pattern/` with
|
|
8
|
+
* an `index.ts`, and is re-exported here.
|
|
9
|
+
*
|
|
10
|
+
* The root entry (`src/index.ts`, PATTERNS block) re-exports this barrel (H-27). Root-only export:
|
|
11
|
+
* no subpath (the waiver is in docs/PATTERNS.md); chunk placement is H-46's (no manualChunks rule).
|
|
12
|
+
*/
|
|
13
|
+
export { AICopilotPattern } from './AICopilotPattern';
|
|
14
|
+
export type { AICopilotPatternProps, AICopilotPatternOwnProps, AICopilotPatternSlotProps } from './AICopilotPattern';
|
|
15
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/patterns/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,YAAY,EAAE,qBAAqB,EAAE,wBAAwB,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* - Enhanced chart styling
|
|
8
8
|
* - Focus on data readability
|
|
9
9
|
*/
|
|
10
|
-
import { TrinityThemePreset } from '../theme';
|
|
10
|
+
import { TrinityThemePreset, type TrinityThemePresetOptions } from '../theme';
|
|
11
11
|
/**
|
|
12
12
|
* Extended color palette for charts and data visualization
|
|
13
13
|
* Designed for accessibility and clear differentiation
|
|
@@ -104,6 +104,13 @@ export declare const analyticsLightPreset: TrinityThemePreset;
|
|
|
104
104
|
* Analytics Dark Theme Preset
|
|
105
105
|
*/
|
|
106
106
|
export declare const analyticsDarkPreset: TrinityThemePreset;
|
|
107
|
+
/**
|
|
108
|
+
* The options the Analytics preset themes are built from, one object per mode. Spread one into
|
|
109
|
+
* createTrinityThemePreset to build a variant, for example `{ ...analyticsPresetOptions.light, direction: 'rtl' }`.
|
|
110
|
+
* src/testing/themeMatrix.ts builds every preset this way. Not exported from the package:
|
|
111
|
+
* whether it becomes public API is decision OD-E6 (ADR-37).
|
|
112
|
+
*/
|
|
113
|
+
export declare const analyticsPresetOptions: Readonly<Record<'light' | 'dark', TrinityThemePresetOptions>>;
|
|
107
114
|
/** Analytics preset with both light and dark themes */
|
|
108
115
|
export declare const analyticsPreset: {
|
|
109
116
|
light: TrinityThemePreset;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analytics.d.ts","sourceRoot":"","sources":["../../src/presets/analytics.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAA4B,kBAAkB,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"analytics.d.ts","sourceRoot":"","sources":["../../src/presets/analytics.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAA4B,kBAAkB,EAAE,KAAK,yBAAyB,EAAE,MAAM,UAAU,CAAC;AAMxG;;;GAGG;AACH,eAAO,MAAM,aAAa;IACxB,0CAA0C;;IAc1C,+CAA+C;;;;;;IAO/C,6CAA6C;;;;;IAM7C,gCAAgC;;;;;;;IAQhC,mBAAmB;;;;;;CAMpB,CAAC;AAMF;;GAEG;AACH,eAAO,MAAM,eAAe;IAC1B,wCAAwC;;IAGxC,+CAA+C;;IAG/C,+BAA+B;;IAG/B,4CAA4C;;IAG5C,4BAA4B;;IAG5B,2BAA2B;;IAG3B,mCAAmC;;IAGnC,gEAAgE;;IAGhE,uCAAuC;;QA3EvC,0CAA0C;;QAc1C,+CAA+C;;;;;;QAO/C,6CAA6C;;;;;QAM7C,gCAAgC;;;;;;;QAQhC,mBAAmB;;;;;;;IA2CnB,yBAAyB;;IAGzB,wBAAwB;;IAGxB,4BAA4B;;CAE7B,CAAC;AAsJF;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAE,kBAAoE,CAAC;AAoGxG;;GAEG;AACH,eAAO,MAAM,mBAAmB,EAAE,kBAAmE,CAAC;AAMtG;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,MAAM,CAAC,OAAO,GAAG,MAAM,EAAE,yBAAyB,CAAC,CAGhG,CAAC;AAEF,uDAAuD;AACvD,eAAO,MAAM,eAAe;;;;QArT1B,wCAAwC;;QAGxC,+CAA+C;;QAG/C,+BAA+B;;QAG/B,4CAA4C;;QAG5C,4BAA4B;;QAG5B,2BAA2B;;QAG3B,mCAAmC;;QAGnC,gEAAgE;;QAGhE,uCAAuC;;YA3EvC,0CAA0C;;YAc1C,+CAA+C;;;;;;YAO/C,6CAA6C;;;;;YAM7C,gCAAgC;;;;;;;YAQhC,mBAAmB;;;;;;;QA2CnB,yBAAyB;;QAGzB,wBAAwB;;QAGxB,4BAA4B;;;;QApF5B,0CAA0C;;QAc1C,+CAA+C;;;;;;QAO/C,6CAA6C;;;;;QAM7C,gCAAgC;;;;;;;QAQhC,mBAAmB;;;;;;;CA0UpB,CAAC;AAEF,sDAAsD;AACtD,eAAO,MAAM,mBAAmB,+BAA6B,CAAC;AAE9D,qDAAqD;AACrD,eAAO,MAAM,kBAAkB,+BAA4B,CAAC"}
|
package/dist/presets/crm.d.ts
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* - Quick action buttons
|
|
8
8
|
* - Status-heavy interfaces
|
|
9
9
|
*/
|
|
10
|
-
import { TrinityThemePreset } from '../theme';
|
|
10
|
+
import { TrinityThemePreset, type TrinityThemePresetOptions } from '../theme';
|
|
11
11
|
/**
|
|
12
12
|
* CRM-specific configuration options
|
|
13
13
|
*/
|
|
@@ -37,6 +37,13 @@ export declare const crmLightPreset: TrinityThemePreset;
|
|
|
37
37
|
* CRM Dark Theme Preset
|
|
38
38
|
*/
|
|
39
39
|
export declare const crmDarkPreset: TrinityThemePreset;
|
|
40
|
+
/**
|
|
41
|
+
* The options the CRM preset themes are built from, one object per mode. Spread one into
|
|
42
|
+
* createTrinityThemePreset to build a variant, for example `{ ...crmPresetOptions.light, direction: 'rtl' }`.
|
|
43
|
+
* src/testing/themeMatrix.ts builds every preset this way. Not exported from the package:
|
|
44
|
+
* whether it becomes public API is decision OD-E6 (ADR-37).
|
|
45
|
+
*/
|
|
46
|
+
export declare const crmPresetOptions: Readonly<Record<'light' | 'dark', TrinityThemePresetOptions>>;
|
|
40
47
|
/** CRM preset with both light and dark themes */
|
|
41
48
|
export declare const crmPreset: {
|
|
42
49
|
light: TrinityThemePreset;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"crm.d.ts","sourceRoot":"","sources":["../../src/presets/crm.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAA4B,kBAAkB,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"crm.d.ts","sourceRoot":"","sources":["../../src/presets/crm.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAA4B,kBAAkB,EAAE,KAAK,yBAAyB,EAAE,MAAM,UAAU,CAAC;AAMxG;;GAEG;AACH,eAAO,MAAM,SAAS;IACpB,wCAAwC;;IAGxC,kCAAkC;;IAGlC,iCAAiC;;IAGjC,4BAA4B;;IAG5B,oCAAoC;;IAGpC,kCAAkC;;IAGlC,iCAAiC;;IAGjC,4BAA4B;;CAE7B,CAAC;AA2FF;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,kBAA8D,CAAC;AAyD5F;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,kBAA6D,CAAC;AAM1F;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,MAAM,CAAC,OAAO,GAAG,MAAM,EAAE,yBAAyB,CAAC,CAG1F,CAAC;AAEF,iDAAiD;AACjD,eAAO,MAAM,SAAS;;;;QAnMpB,wCAAwC;;QAGxC,kCAAkC;;QAGlC,iCAAiC;;QAGjC,4BAA4B;;QAG5B,oCAAoC;;QAGpC,kCAAkC;;QAGlC,iCAAiC;;QAGjC,4BAA4B;;;CAkL7B,CAAC;AAEF,gDAAgD;AAChD,eAAO,MAAM,aAAa,+BAAuB,CAAC;AAElD,+CAA+C;AAC/C,eAAO,MAAM,YAAY,+BAAsB,CAAC"}
|
package/dist/presets/index.d.ts
CHANGED
package/dist/presets/portal.d.ts
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* - Prominent call-to-action buttons
|
|
8
8
|
* - Accessible focus indicators
|
|
9
9
|
*/
|
|
10
|
-
import { TrinityThemePreset } from '../theme';
|
|
10
|
+
import { TrinityThemePreset, type TrinityThemePresetOptions } from '../theme';
|
|
11
11
|
/**
|
|
12
12
|
* Portal-specific configuration options
|
|
13
13
|
*/
|
|
@@ -37,6 +37,13 @@ export declare const portalLightPreset: TrinityThemePreset;
|
|
|
37
37
|
* Portal Dark Theme Preset
|
|
38
38
|
*/
|
|
39
39
|
export declare const portalDarkPreset: TrinityThemePreset;
|
|
40
|
+
/**
|
|
41
|
+
* The options the Portal preset themes are built from, one object per mode. Spread one into
|
|
42
|
+
* createTrinityThemePreset to build a variant, for example `{ ...portalPresetOptions.light, direction: 'rtl' }`.
|
|
43
|
+
* src/testing/themeMatrix.ts builds every preset this way. Not exported from the package:
|
|
44
|
+
* whether it becomes public API is decision OD-E6 (ADR-37).
|
|
45
|
+
*/
|
|
46
|
+
export declare const portalPresetOptions: Readonly<Record<'light' | 'dark', TrinityThemePresetOptions>>;
|
|
40
47
|
/** Portal preset with both light and dark themes */
|
|
41
48
|
export declare const portalPreset: {
|
|
42
49
|
light: TrinityThemePreset;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"portal.d.ts","sourceRoot":"","sources":["../../src/presets/portal.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAA4B,kBAAkB,EAAe,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"portal.d.ts","sourceRoot":"","sources":["../../src/presets/portal.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAA4B,kBAAkB,EAAe,KAAK,yBAAyB,EAAE,MAAM,UAAU,CAAC;AAMrH;;GAEG;AACH,eAAO,MAAM,YAAY;IACvB,kCAAkC;;IAGlC,mCAAmC;;IAGnC,yBAAyB;;IAGzB,yCAAyC;;IAGzC,qCAAqC;;IAGrC,uCAAuC;;IAGvC,uBAAuB;;IAGvB,kCAAkC;;CAEnC,CAAC;AAyKF;;GAEG;AACH,eAAO,MAAM,iBAAiB,EAAE,kBAAiE,CAAC;AA+ElG;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,kBAAgE,CAAC;AAMhG;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,MAAM,CAAC,OAAO,GAAG,MAAM,EAAE,yBAAyB,CAAC,CAG7F,CAAC;AAEF,oDAAoD;AACpD,eAAO,MAAM,YAAY;;;;QAvSvB,kCAAkC;;QAGlC,mCAAmC;;QAGnC,yBAAyB;;QAGzB,yCAAyC;;QAGzC,qCAAqC;;QAGrC,uCAAuC;;QAGvC,uBAAuB;;QAGvB,kCAAkC;;;CAsRnC,CAAC;AAEF,mDAAmD;AACnD,eAAO,MAAM,gBAAgB,+BAA0B,CAAC;AAExD,kDAAkD;AAClD,eAAO,MAAM,eAAe,+BAAyB,CAAC"}
|
package/dist/safe-content.js
CHANGED
|
@@ -430,18 +430,18 @@ const z = /* @__PURE__ */ new Set([
|
|
|
430
430
|
"yuml"
|
|
431
431
|
]), H = Math.max(...Array.from(z, (a) => a.length));
|
|
432
432
|
function _(a, e = !1) {
|
|
433
|
-
return a.includes("&") ? a.replace(/&(#[xX][0-9a-fA-F]+|#\d+|[a-zA-Z][a-zA-Z0-9]*);?/g, (t,
|
|
434
|
-
if (
|
|
435
|
-
const
|
|
436
|
-
return F(
|
|
433
|
+
return a.includes("&") ? a.replace(/&(#[xX][0-9a-fA-F]+|#\d+|[a-zA-Z][a-zA-Z0-9]*);?/g, (t, s, n) => {
|
|
434
|
+
if (s[0] === "#") {
|
|
435
|
+
const r = s[1] === "x" || s[1] === "X" ? parseInt(s.slice(2), 16) : parseInt(s.slice(1), 10);
|
|
436
|
+
return F(r);
|
|
437
437
|
}
|
|
438
438
|
if (t.endsWith(";"))
|
|
439
|
-
return Object.prototype.hasOwnProperty.call(k,
|
|
440
|
-
for (let
|
|
441
|
-
const u =
|
|
439
|
+
return Object.prototype.hasOwnProperty.call(k, s) ? k[s] : t;
|
|
440
|
+
for (let r = Math.min(s.length, H); r > 0; r -= 1) {
|
|
441
|
+
const u = s.slice(0, r);
|
|
442
442
|
if (!z.has(u)) continue;
|
|
443
|
-
const h = a[n + 1 +
|
|
444
|
-
return e && /[=A-Za-z0-9]/.test(h) ? t : k[u] +
|
|
443
|
+
const h = a[n + 1 + r] ?? "";
|
|
444
|
+
return e && /[=A-Za-z0-9]/.test(h) ? t : k[u] + s.slice(r);
|
|
445
445
|
}
|
|
446
446
|
return t;
|
|
447
447
|
}) : a;
|
|
@@ -471,11 +471,11 @@ function ne(a) {
|
|
|
471
471
|
const C = /* @__PURE__ */ new Set();
|
|
472
472
|
function ae(a, e, t = "link") {
|
|
473
473
|
if (process.env.NODE_ENV === "production") return;
|
|
474
|
-
const
|
|
474
|
+
const s = I(y(String(e ?? ""))) ?? (e ? "relative" : "empty"), n = `${a}:${t}:${s}`;
|
|
475
475
|
if (C.has(n)) return;
|
|
476
476
|
C.add(n);
|
|
477
|
-
const
|
|
478
|
-
console.warn(
|
|
477
|
+
const r = t === "link" ? `[trinity] ${a}: a link with the "${s}" scheme was shown as plain text. Links render only for http(s), mailto, tel and relative URLs - pass one of those to keep it clickable.` : `[trinity] ${a}: an image with a "${s}" source was not loaded. Images load only from http(s), blob:, relative URLs or raster data:image (png, jpeg, gif, webp, avif, bmp, ico) - pass one of those to show it.`;
|
|
478
|
+
console.warn(r);
|
|
479
479
|
}
|
|
480
480
|
const Z = /* @__PURE__ */ new Set([
|
|
481
481
|
"script",
|
|
@@ -571,18 +571,18 @@ const Z = /* @__PURE__ */ new Set([
|
|
|
571
571
|
"br"
|
|
572
572
|
]), K = 64, V = /[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDFFF]/g, U = /--!?>/g;
|
|
573
573
|
function Q(a) {
|
|
574
|
-
const e = a.replace(/\u0000/g, "").replace(V, (h) => h.length === 2 ? h : "�"), t = [],
|
|
575
|
-
let n = 0,
|
|
574
|
+
const e = a.replace(/\u0000/g, "").replace(V, (h) => h.length === 2 ? h : "�"), t = [], s = e.length;
|
|
575
|
+
let n = 0, r = "";
|
|
576
576
|
const u = () => {
|
|
577
|
-
|
|
577
|
+
r && (t.push({ kind: "text", value: _(r) }), r = "");
|
|
578
578
|
};
|
|
579
|
-
for (; n <
|
|
579
|
+
for (; n < s; ) {
|
|
580
580
|
const h = e[n];
|
|
581
581
|
if (h !== "<") {
|
|
582
|
-
|
|
582
|
+
r += h, n += 1;
|
|
583
583
|
continue;
|
|
584
584
|
}
|
|
585
|
-
const
|
|
585
|
+
const w = e[n + 1];
|
|
586
586
|
if (e.startsWith("<!--", n)) {
|
|
587
587
|
if (u(), e.startsWith("<!-->", n)) {
|
|
588
588
|
n += 5;
|
|
@@ -594,32 +594,32 @@ function Q(a) {
|
|
|
594
594
|
}
|
|
595
595
|
U.lastIndex = n + 4;
|
|
596
596
|
const c = U.exec(e);
|
|
597
|
-
n = c ? c.index + c[0].length :
|
|
597
|
+
n = c ? c.index + c[0].length : s;
|
|
598
598
|
continue;
|
|
599
599
|
}
|
|
600
|
-
if (
|
|
600
|
+
if (w === "!" || w === "?") {
|
|
601
601
|
u();
|
|
602
602
|
const c = e.indexOf(">", n + 2);
|
|
603
|
-
n = c === -1 ?
|
|
603
|
+
n = c === -1 ? s : c + 1;
|
|
604
604
|
continue;
|
|
605
605
|
}
|
|
606
|
-
const S =
|
|
606
|
+
const S = w === "/", O = S ? n + 2 : n + 1;
|
|
607
607
|
if (!/[a-zA-Z]/.test(e[O] ?? "")) {
|
|
608
|
-
|
|
608
|
+
r += h, n += 1;
|
|
609
609
|
continue;
|
|
610
610
|
}
|
|
611
611
|
let l = O;
|
|
612
|
-
for (; l <
|
|
612
|
+
for (; l < s && /[a-zA-Z0-9-]/.test(e[l]); ) l += 1;
|
|
613
613
|
const m = e.slice(O, l).toLowerCase(), g = /* @__PURE__ */ Object.create(null);
|
|
614
|
-
let
|
|
615
|
-
for (; l <
|
|
614
|
+
let A = !1, i = !1;
|
|
615
|
+
for (; l < s; ) {
|
|
616
616
|
const c = e[l];
|
|
617
617
|
if (c === ">") {
|
|
618
618
|
i = !0, l += 1;
|
|
619
619
|
break;
|
|
620
620
|
}
|
|
621
621
|
if (c === "/") {
|
|
622
|
-
|
|
622
|
+
A = e[l + 1] === ">", l += 1;
|
|
623
623
|
continue;
|
|
624
624
|
}
|
|
625
625
|
if (/\s/.test(c)) {
|
|
@@ -627,42 +627,42 @@ function Q(a) {
|
|
|
627
627
|
continue;
|
|
628
628
|
}
|
|
629
629
|
let o = l;
|
|
630
|
-
for (; o <
|
|
630
|
+
for (; o < s && !/[\s/>=]/.test(e[o]); ) o += 1;
|
|
631
631
|
const p = e.slice(l, o).toLowerCase();
|
|
632
|
-
for (l = o; l <
|
|
632
|
+
for (l = o; l < s && /\s/.test(e[l]); ) l += 1;
|
|
633
633
|
let d = "";
|
|
634
634
|
if (e[l] === "=") {
|
|
635
|
-
for (l += 1; l <
|
|
636
|
-
const
|
|
637
|
-
if (
|
|
638
|
-
const f = e.indexOf(
|
|
639
|
-
d = e.slice(l + 1, f === -1 ?
|
|
635
|
+
for (l += 1; l < s && /\s/.test(e[l]); ) l += 1;
|
|
636
|
+
const b = e[l];
|
|
637
|
+
if (b === '"' || b === "'") {
|
|
638
|
+
const f = e.indexOf(b, l + 1);
|
|
639
|
+
d = e.slice(l + 1, f === -1 ? s : f), l = f === -1 ? s : f + 1;
|
|
640
640
|
} else {
|
|
641
641
|
let f = l;
|
|
642
|
-
for (; f <
|
|
642
|
+
for (; f < s && !/[\s>]/.test(e[f]); ) f += 1;
|
|
643
643
|
d = e.slice(l, f), l = f;
|
|
644
644
|
}
|
|
645
645
|
}
|
|
646
646
|
p && !Object.prototype.hasOwnProperty.call(g, p) && (g[p] = _(d, !0));
|
|
647
647
|
}
|
|
648
648
|
if (!i) {
|
|
649
|
-
u(), n =
|
|
649
|
+
u(), n = s;
|
|
650
650
|
break;
|
|
651
651
|
}
|
|
652
652
|
if (u(), S) {
|
|
653
653
|
t.push({ kind: "end", name: m }), n = l;
|
|
654
654
|
continue;
|
|
655
655
|
}
|
|
656
|
-
if (t.push({ kind: "start", name: m, attrs: g, selfClosing:
|
|
656
|
+
if (t.push({ kind: "start", name: m, attrs: g, selfClosing: A }), n = l, Y.has(m) && !A) {
|
|
657
657
|
const c = new RegExp(`</${m}(?![a-z0-9-])`, "gi");
|
|
658
658
|
c.lastIndex = n;
|
|
659
659
|
const o = c.exec(e), p = o ? o.index : -1;
|
|
660
660
|
if (p === -1)
|
|
661
|
-
t.push({ kind: "text", value: e.slice(n) }), t.push({ kind: "end", name: m }), n =
|
|
661
|
+
t.push({ kind: "text", value: e.slice(n) }), t.push({ kind: "end", name: m }), n = s;
|
|
662
662
|
else {
|
|
663
663
|
p > n && t.push({ kind: "text", value: e.slice(n, p) });
|
|
664
664
|
const d = e.indexOf(">", p);
|
|
665
|
-
t.push({ kind: "end", name: m }), n = d === -1 ?
|
|
665
|
+
t.push({ kind: "end", name: m }), n = d === -1 ? s : d + 1;
|
|
666
666
|
}
|
|
667
667
|
}
|
|
668
668
|
}
|
|
@@ -679,15 +679,15 @@ function J(a) {
|
|
|
679
679
|
return e;
|
|
680
680
|
}
|
|
681
681
|
function ee(a, e) {
|
|
682
|
-
const t = J(e.allowTags),
|
|
683
|
-
for (;
|
|
684
|
-
if (
|
|
682
|
+
const t = J(e.allowTags), s = e.allowClasses ?? {}, n = { tag: "#root", props: {}, children: [] }, r = [n], u = () => r[r.length - 1], h = (i) => r.some((c) => c.tag === i), w = (i) => {
|
|
683
|
+
for (; r.length > 1; )
|
|
684
|
+
if (r.pop().tag === i) return;
|
|
685
685
|
}, S = (i, c) => {
|
|
686
686
|
i.children.push(c), i.endsWithSpace = !1;
|
|
687
687
|
}, O = () => {
|
|
688
688
|
if (v.has(u().tag)) {
|
|
689
689
|
const i = { tag: "li", props: {}, children: [], implicit: !0 };
|
|
690
|
-
S(u(), i),
|
|
690
|
+
S(u(), i), r.push(i);
|
|
691
691
|
}
|
|
692
692
|
}, l = (i) => {
|
|
693
693
|
if (typeof i == "string" && v.has(u().tag) && !i.trim())
|
|
@@ -705,10 +705,10 @@ function ee(a, e) {
|
|
|
705
705
|
const i = u();
|
|
706
706
|
i.children.length === 0 || i.endsWithSpace || l(" ");
|
|
707
707
|
};
|
|
708
|
-
let g = 0,
|
|
708
|
+
let g = 0, A = "";
|
|
709
709
|
for (const i of a) {
|
|
710
710
|
if (g > 0) {
|
|
711
|
-
i.kind === "start" && i.name ===
|
|
711
|
+
i.kind === "start" && i.name === A && !i.selfClosing && (g += 1), i.kind === "end" && i.name === A && (g -= 1);
|
|
712
712
|
continue;
|
|
713
713
|
}
|
|
714
714
|
if (i.kind === "text") {
|
|
@@ -718,64 +718,64 @@ function ee(a, e) {
|
|
|
718
718
|
if (i.kind === "start") {
|
|
719
719
|
const { name: o } = i;
|
|
720
720
|
if (Z.has(o)) {
|
|
721
|
-
!i.selfClosing && !T.has(o) && o !== "frame" && (g = 1,
|
|
721
|
+
!i.selfClosing && !T.has(o) && o !== "frame" && (g = 1, A = o);
|
|
722
722
|
continue;
|
|
723
723
|
}
|
|
724
724
|
if (!t.has(o)) {
|
|
725
725
|
q.has(o) && m();
|
|
726
726
|
continue;
|
|
727
727
|
}
|
|
728
|
-
if (
|
|
729
|
-
const p = te(o, i.attrs,
|
|
728
|
+
if (r.length > K && !T.has(o)) continue;
|
|
729
|
+
const p = te(o, i.attrs, s, e.newTabHintId);
|
|
730
730
|
if (p === null) continue;
|
|
731
731
|
if (o === "li") {
|
|
732
732
|
let f = -1;
|
|
733
|
-
for (let E =
|
|
734
|
-
if (v.has(
|
|
733
|
+
for (let E = r.length - 1; E > 0; E -= 1)
|
|
734
|
+
if (v.has(r[E].tag)) {
|
|
735
735
|
f = E;
|
|
736
736
|
break;
|
|
737
737
|
}
|
|
738
738
|
if (f === -1) continue;
|
|
739
|
-
const N =
|
|
740
|
-
|
|
739
|
+
const N = r.findIndex((E, P) => P > f && E.tag === "li");
|
|
740
|
+
r.length = N === -1 ? f + 1 : N;
|
|
741
741
|
}
|
|
742
|
-
if ((o === "p" || v.has(o)) && h("p") &&
|
|
743
|
-
for (; B.has(u().tag); )
|
|
744
|
-
o === "a" && h("a") &&
|
|
742
|
+
if ((o === "p" || v.has(o)) && h("p") && w("p"), X.has(o))
|
|
743
|
+
for (; B.has(u().tag); ) r.pop();
|
|
744
|
+
o === "a" && h("a") && w("a");
|
|
745
745
|
const d = p.__tag ?? o;
|
|
746
746
|
delete p.__tag;
|
|
747
|
-
const
|
|
748
|
-
o === "li" ? S(u(),
|
|
747
|
+
const b = { tag: d, props: p, children: [] };
|
|
748
|
+
o === "li" ? S(u(), b) : l(b), !T.has(o) && !i.selfClosing && (b.source = o, r.push(b));
|
|
749
749
|
continue;
|
|
750
750
|
}
|
|
751
751
|
const c = (() => {
|
|
752
|
-
for (let o =
|
|
753
|
-
const p =
|
|
752
|
+
for (let o = r.length - 1; o > 0; o -= 1) {
|
|
753
|
+
const p = r[o];
|
|
754
754
|
if ((p.source ?? p.tag) === i.name) return o;
|
|
755
755
|
}
|
|
756
756
|
return -1;
|
|
757
757
|
})();
|
|
758
|
-
c > 0 ?
|
|
758
|
+
c > 0 ? r.length = c : q.has(i.name) && m();
|
|
759
759
|
}
|
|
760
760
|
return n.children;
|
|
761
761
|
}
|
|
762
|
-
function te(a, e, t) {
|
|
762
|
+
function te(a, e, t, s) {
|
|
763
763
|
if (a === "a") {
|
|
764
|
-
const
|
|
765
|
-
if (!
|
|
766
|
-
const
|
|
767
|
-
return e.title && (
|
|
764
|
+
const n = e.href;
|
|
765
|
+
if (!n || !W(n)) return null;
|
|
766
|
+
const r = { href: n, rel: "noopener noreferrer" };
|
|
767
|
+
return e.title && (r.title = e.title), e.target === "_blank" && (r.target = "_blank", s && (r["aria-describedby"] = s)), r;
|
|
768
768
|
}
|
|
769
769
|
if (a === "span" || a === "mark") {
|
|
770
|
-
const
|
|
771
|
-
return
|
|
770
|
+
const n = (e.class ?? "").split(/\s+/).filter((u) => u && Object.prototype.hasOwnProperty.call(t, u) && (t[u] === "span" || t[u] === "mark")), r = {};
|
|
771
|
+
return n.length && (r.className = n.join(" "), n.some((u) => t[u] === "mark") && (r.__tag = "mark")), r;
|
|
772
772
|
}
|
|
773
773
|
return {};
|
|
774
774
|
}
|
|
775
775
|
function G(a, e) {
|
|
776
|
-
return a.map((t,
|
|
776
|
+
return a.map((t, s) => {
|
|
777
777
|
if (typeof t == "string") return t;
|
|
778
|
-
const n = `${e}${
|
|
778
|
+
const n = `${e}${s}`;
|
|
779
779
|
return T.has(t.tag) ? L.createElement(t.tag, { key: n }) : L.createElement(t.tag, { key: n, ...t.props }, ...G(t.children, `${n}.`));
|
|
780
780
|
});
|
|
781
781
|
}
|