@sybilion/uilib 1.0.20
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/README.md +138 -0
- package/dist/esm/assets/doc-4d8d38268d07c83e.png +0 -0
- package/dist/esm/assets/xls-d1595343260dd096.png +0 -0
- package/dist/esm/components/ui/AnalysesSelector/AnalysesSelector.js +188 -0
- package/dist/esm/components/ui/AnalysesSelector/AnalysesSelector.styl.js +7 -0
- package/dist/esm/components/ui/AnalysisLineIcon/AnalysisLineIcon.js +11 -0
- package/dist/esm/components/ui/AnalysisLineIcon/AnalysisLineIcon.styl.js +7 -0
- package/dist/esm/components/ui/AppHeader/AppHeader.js +22 -0
- package/dist/esm/components/ui/AppHeader/AppHeader.styl.js +7 -0
- package/dist/esm/components/ui/AppHeader/appChromeAnchors.js +4 -0
- package/dist/esm/components/ui/Avatar/Avatar.js +16 -0
- package/dist/esm/components/ui/Avatar/Avatar.styl.js +7 -0
- package/dist/esm/components/ui/Badge/Badge.js +11 -0
- package/dist/esm/components/ui/Badge/Badge.styl.js +7 -0
- package/dist/esm/components/ui/Breadcrumb/Breadcrumb.js +30 -0
- package/dist/esm/components/ui/Breadcrumb/Breadcrumb.styl.js +7 -0
- package/dist/esm/components/ui/Button/Button.js +12 -0
- package/dist/esm/components/ui/Button/Button.styl.js +7 -0
- package/dist/esm/components/ui/Card/Card.js +57 -0
- package/dist/esm/components/ui/Card/Card.styl.js +7 -0
- package/dist/esm/components/ui/Chart/Chart.context.js +11 -0
- package/dist/esm/components/ui/Chart/Chart.helpers.js +9 -0
- package/dist/esm/components/ui/Chart/Chart.js +23 -0
- package/dist/esm/components/ui/Chart/Chart.styl.js +7 -0
- package/dist/esm/components/ui/Chart/Chart.types.js +3 -0
- package/dist/esm/components/ui/Chart/components/BaseChartWrapper.js +473 -0
- package/dist/esm/components/ui/Chart/components/BaseChartWrapper.styl.js +7 -0
- package/dist/esm/components/ui/Chart/components/ChartAxes.js +52 -0
- package/dist/esm/components/ui/Chart/components/ChartContainer.js +31 -0
- package/dist/esm/components/ui/Chart/components/ChartGrid.js +9 -0
- package/dist/esm/components/ui/Chart/components/ChartLegendContent.js +17 -0
- package/dist/esm/components/ui/Chart/components/ChartLegendItem.js +13 -0
- package/dist/esm/components/ui/Chart/components/ChartTooltipContent.js +74 -0
- package/dist/esm/components/ui/Chart/components/ChartTooltipItem.js +26 -0
- package/dist/esm/components/ui/Chart/components/CustomChartLegend/CustomChartLegend.js +64 -0
- package/dist/esm/components/ui/Chart/components/CustomChartLegend/CustomChartLegend.styl.js +7 -0
- package/dist/esm/components/ui/Chart/components/LegendSvg/LegendSvg.js +19 -0
- package/dist/esm/components/ui/Chart/components/QuantileBands.js +23 -0
- package/dist/esm/components/ui/Chart/tools/formatters.js +81 -0
- package/dist/esm/components/ui/ChartAreaInteractive/ChartAreaInteractive.helpers.js +15 -0
- package/dist/esm/components/ui/ChartAreaInteractive/ChartAreaInteractive.js +103 -0
- package/dist/esm/components/ui/ChartAreaInteractive/ChartAreaInteractive.styl.js +7 -0
- package/dist/esm/components/ui/ChartAreaInteractive/ChartLines.js +81 -0
- package/dist/esm/components/ui/ChartAreaInteractive/overlays/IntervalsOverlay/IntervalsOverlay.hooks.js +134 -0
- package/dist/esm/components/ui/ChartAreaInteractive/overlays/IntervalsOverlay/IntervalsOverlay.js +257 -0
- package/dist/esm/components/ui/ChartAreaInteractive/overlays/IntervalsOverlay/IntervalsOverlay.styl.js +7 -0
- package/dist/esm/components/ui/ChartAreaInteractive/overlays/PinOverlay/PinOverlay.js +165 -0
- package/dist/esm/components/ui/ChartAreaInteractive/overlays/PinOverlay/PinOverlay.styl.js +7 -0
- package/dist/esm/components/ui/ChartAreaInteractive/overlays/ThresholdsOverlay/ThresholdsOverlay.hooks.js +113 -0
- package/dist/esm/components/ui/ChartAreaInteractive/overlays/ThresholdsOverlay/ThresholdsOverlay.js +114 -0
- package/dist/esm/components/ui/ChartAreaInteractive/overlays/ThresholdsOverlay/ThresholdsOverlay.styl.js +7 -0
- package/dist/esm/components/ui/ChartAreaInteractive/overlays/useChartYRange.js +155 -0
- package/dist/esm/components/ui/ChartAreaInteractive/overlays/useForecastColor.js +33 -0
- package/dist/esm/components/ui/ChartAreaInteractive/overlays/useQuantileBands.js +170 -0
- package/dist/esm/components/ui/Chat/Chat.js +17 -0
- package/dist/esm/components/ui/Chat/Chat.styl.js +7 -0
- package/dist/esm/components/ui/Chat/Chat.types.js +10 -0
- package/dist/esm/components/ui/Chat/ChatChrome/ChatChrome.js +31 -0
- package/dist/esm/components/ui/Chat/ChatChrome/ChatChrome.styl.js +7 -0
- package/dist/esm/components/ui/Chat/ChatEmptyState/ChatEmptyState.js +8 -0
- package/dist/esm/components/ui/Chat/ChatEmptyState/ChatEmptyState.styl.js +7 -0
- package/dist/esm/components/ui/Chat/ChatMessage/AgentMessageContent.helpers.js +312 -0
- package/dist/esm/components/ui/Chat/ChatMessage/AgentMessageContent.js +133 -0
- package/dist/esm/components/ui/Chat/ChatMessage/ChatDatasetApplicationLink.js +23 -0
- package/dist/esm/components/ui/Chat/ChatMessage/ChatMessage.js +14 -0
- package/dist/esm/components/ui/Chat/ChatMessage/ChatMessage.styl.js +7 -0
- package/dist/esm/components/ui/Chat/ChatMessage/icons/DocIcon.js +8 -0
- package/dist/esm/components/ui/Chat/ChatMessage/icons/XlsIcon.js +8 -0
- package/dist/esm/components/ui/Chat/ChatMessage/icons/doc.png.js +3 -0
- package/dist/esm/components/ui/Chat/ChatMessage/icons/xls.png.js +3 -0
- package/dist/esm/components/ui/Chat/ChatMessage/presetScript.js +187 -0
- package/dist/esm/components/ui/Chat/ChatPresets/ChatPresets.js +23 -0
- package/dist/esm/components/ui/Chat/ChatPresets/ChatPresets.styl.js +7 -0
- package/dist/esm/components/ui/Chat/ChatPrompt/ChatPrompt.js +48 -0
- package/dist/esm/components/ui/Chat/ChatPrompt/ChatPrompt.styl.js +7 -0
- package/dist/esm/components/ui/Chat/ChatSheet/ChatSelector.js +29 -0
- package/dist/esm/components/ui/Chat/ChatSheet/ChatSheet.js +34 -0
- package/dist/esm/components/ui/Chat/ChatSheet/useChatPanelChromeModel.js +800 -0
- package/dist/esm/components/ui/Chat/chat-preset-utils.js +22 -0
- package/dist/esm/components/ui/Checkbox/Checkbox.js +11 -0
- package/dist/esm/components/ui/Checkbox/Checkbox.styl.js +7 -0
- package/dist/esm/components/ui/Dialog/Dialog.js +126 -0
- package/dist/esm/components/ui/Dialog/Dialog.styl.js +7 -0
- package/dist/esm/components/ui/DraggingButton/DraggingButton.js +11 -0
- package/dist/esm/components/ui/DraggingButton/DraggingButton.styl.js +7 -0
- package/dist/esm/components/ui/Drawer/Drawer.js +37 -0
- package/dist/esm/components/ui/Drawer/Drawer.styl.js +7 -0
- package/dist/esm/components/ui/DropZone/DropZone.js +112 -0
- package/dist/esm/components/ui/DropZone/DropZone.styl.js +7 -0
- package/dist/esm/components/ui/DropdownMenu/DropdownMenu.js +53 -0
- package/dist/esm/components/ui/DropdownMenu/DropdownMenu.styl.js +7 -0
- package/dist/esm/components/ui/FlickeringGrid/FlickeringGrid.js +8 -0
- package/dist/esm/components/ui/FlickeringGrid/FlickeringGrid.styl.js +7 -0
- package/dist/esm/components/ui/Foldable/Foldable.js +15 -0
- package/dist/esm/components/ui/Foldable/Foldable.styl.js +7 -0
- package/dist/esm/components/ui/Gap/Gap.js +6 -0
- package/dist/esm/components/ui/Gap/Gap.styl.js +7 -0
- package/dist/esm/components/ui/Image/Image.js +17 -0
- package/dist/esm/components/ui/Image/Image.styl.js +7 -0
- package/dist/esm/components/ui/ImageWithFallback/ImageWithFallback.js +19 -0
- package/dist/esm/components/ui/Input/Input.js +14 -0
- package/dist/esm/components/ui/Input/Input.styl.js +7 -0
- package/dist/esm/components/ui/InteractionOverlay/InteractionOverlay.js +35 -0
- package/dist/esm/components/ui/InteractionOverlay/InteractionOverlay.styl.js +7 -0
- package/dist/esm/components/ui/InteractiveContent/InteractiveContent.js +10 -0
- package/dist/esm/components/ui/InteractiveContent/InteractiveContent.styl.js +7 -0
- package/dist/esm/components/ui/Label/Label.js +10 -0
- package/dist/esm/components/ui/Label/Label.styl.js +7 -0
- package/dist/esm/components/ui/LabelWithId/AltKeyProvider.js +22 -0
- package/dist/esm/components/ui/LabelWithId/LabelWithId.js +9 -0
- package/dist/esm/components/ui/LabelWithId/LabelWithId.styl.js +7 -0
- package/dist/esm/components/ui/LabeledInput/LabeledInput.js +12 -0
- package/dist/esm/components/ui/LabeledInput/LabeledInput.styl.js +7 -0
- package/dist/esm/components/ui/LegacyPlatformLink/LegacyPlatformLink.js +10 -0
- package/dist/esm/components/ui/LegacyPlatformLink/LegacyPlatformLink.styl.js +7 -0
- package/dist/esm/components/ui/Logo/Logo.js +9 -0
- package/dist/esm/components/ui/Logo/Logo.styl.js +7 -0
- package/dist/esm/components/ui/MobileAdaptiveSelector/MobileAdaptiveSelector.js +23 -0
- package/dist/esm/components/ui/MobileAdaptiveSelector/MobileAdaptiveSelector.styl.js +7 -0
- package/dist/esm/components/ui/NumberControl/NumberControl.js +26 -0
- package/dist/esm/components/ui/NumberControl/NumberControl.styl.js +7 -0
- package/dist/esm/components/ui/Page/AppShell/AppShell.js +14 -0
- package/dist/esm/components/ui/Page/AppShell/AppShell.styl.js +7 -0
- package/dist/esm/components/ui/Page/Breadcrumbs/Breadcrumbs.js +22 -0
- package/dist/esm/components/ui/Page/Breadcrumbs/Breadcrumbs.styl.js +7 -0
- package/dist/esm/components/ui/Page/PageColumns/PageColumns.js +9 -0
- package/dist/esm/components/ui/Page/PageColumns/PageColumns.styl.js +7 -0
- package/dist/esm/components/ui/Page/PageContent/PageContent.js +12 -0
- package/dist/esm/components/ui/Page/PageContent/PageContent.styl.js +7 -0
- package/dist/esm/components/ui/Page/PageEmptyCanvas/PageEmptyCanvas.js +8 -0
- package/dist/esm/components/ui/Page/PageEmptyCanvas/PageEmptyCanvas.styl.js +7 -0
- package/dist/esm/components/ui/Page/PageFooter/PageFooter.js +10 -0
- package/dist/esm/components/ui/Page/PageFooter/PageFooter.styl.js +7 -0
- package/dist/esm/components/ui/Page/PageHeader/PageHeader.js +14 -0
- package/dist/esm/components/ui/Page/PageHeader/PageHeader.styl.js +7 -0
- package/dist/esm/components/ui/Page/PageScroll/PageScroll.js +37 -0
- package/dist/esm/components/ui/Page/PageScroll/PageScroll.styl.js +7 -0
- package/dist/esm/components/ui/Page/PageTabs/PageTabs.js +22 -0
- package/dist/esm/components/ui/Page/PageTabs/PageTabs.styl.js +7 -0
- package/dist/esm/components/ui/Page/PageXScroll/PageXScroll.js +34 -0
- package/dist/esm/components/ui/Page/PageXScroll/PageXScroll.styl.js +7 -0
- package/dist/esm/components/ui/Page/SectionHeader/SectionHeader.js +9 -0
- package/dist/esm/components/ui/Page/SectionHeader/SectionHeader.styl.js +7 -0
- package/dist/esm/components/ui/Page/pageContext.js +8 -0
- package/dist/esm/components/ui/Progress/Progress.js +10 -0
- package/dist/esm/components/ui/Progress/Progress.styl.js +7 -0
- package/dist/esm/components/ui/RegionCoords/RegionSelector.js +22 -0
- package/dist/esm/components/ui/RegionCoords/RegionSelector.styl.js +7 -0
- package/dist/esm/components/ui/Renamer/Renamer.js +61 -0
- package/dist/esm/components/ui/Renamer/Renamer.styl.js +7 -0
- package/dist/esm/components/ui/Select/Select.js +35 -0
- package/dist/esm/components/ui/Select/Select.styl.js +7 -0
- package/dist/esm/components/ui/Separator/Separator.js +10 -0
- package/dist/esm/components/ui/Separator/Separator.styl.js +7 -0
- package/dist/esm/components/ui/Sheet/Sheet.js +41 -0
- package/dist/esm/components/ui/Sheet/Sheet.styl.js +7 -0
- package/dist/esm/components/ui/Sidebar/Sidebar.js +448 -0
- package/dist/esm/components/ui/Sidebar/Sidebar.styl.js +7 -0
- package/dist/esm/components/ui/Skeleton/Skeleton.js +9 -0
- package/dist/esm/components/ui/Skeleton/Skeleton.styl.js +7 -0
- package/dist/esm/components/ui/Slider/Slider.js +123 -0
- package/dist/esm/components/ui/Slider/Slider.styl.js +7 -0
- package/dist/esm/components/ui/SmartTextTruncate/SmartTextTruncate.js +98 -0
- package/dist/esm/components/ui/Sparkline/Sparkline.helpers.js +11 -0
- package/dist/esm/components/ui/Sparkline/Sparkline.js +27 -0
- package/dist/esm/components/ui/Sparkline/Sparkline.styl.js +7 -0
- package/dist/esm/components/ui/Switch/Switch.js +17 -0
- package/dist/esm/components/ui/Switch/Switch.styl.js +7 -0
- package/dist/esm/components/ui/Table/Table.js +30 -0
- package/dist/esm/components/ui/Table/Table.styl.js +7 -0
- package/dist/esm/components/ui/Tabs/Tabs.js +19 -0
- package/dist/esm/components/ui/Tabs/Tabs.styl.js +7 -0
- package/dist/esm/components/ui/TextShimmer/TextShimmer.js +31 -0
- package/dist/esm/components/ui/TextShimmer/TextShimmer.styl.js +7 -0
- package/dist/esm/components/ui/TextWithDeferTooltip/TextWithDeferTooltip.js +48 -0
- package/dist/esm/components/ui/TimeRangeControls/TimeRangeControls.constants.js +3 -0
- package/dist/esm/components/ui/TimeRangeControls/TimeRangeControls.js +13 -0
- package/dist/esm/components/ui/TimeRangeControls/TimeRangeControls.styl.js +7 -0
- package/dist/esm/components/ui/Toggle/Toggle.js +10 -0
- package/dist/esm/components/ui/Toggle/Toggle.styl.js +7 -0
- package/dist/esm/components/ui/ToggleGroup/ToggleGroup.helpers.js +12 -0
- package/dist/esm/components/ui/ToggleGroup/ToggleGroup.js +19 -0
- package/dist/esm/components/ui/ToggleGroup/ToggleGroup.styl.js +7 -0
- package/dist/esm/components/ui/Tooltip/Tooltip.js +22 -0
- package/dist/esm/components/ui/Tooltip/Tooltip.styl.js +7 -0
- package/dist/esm/components/ui/VimeoEmbed/VimeoEmbed.js +137 -0
- package/dist/esm/components/ui/VimeoEmbed/VimeoEmbed.styl.js +7 -0
- package/dist/esm/constants/dataset.js +4 -0
- package/dist/esm/contexts/chat-context.js +297 -0
- package/dist/esm/hooks/panelWidth.js +46 -0
- package/dist/esm/hooks/useDebounceCallback.js +14 -0
- package/dist/esm/hooks/useDragElem.js +115 -0
- package/dist/esm/hooks/useEvent.js +52 -0
- package/dist/esm/hooks/useIsMobile.js +18 -0
- package/dist/esm/hooks/useIsTouchDevice.js +43 -0
- package/dist/esm/hooks/useQueryParams.js +40 -0
- package/dist/esm/hooks/useShellWidthObserver.js +23 -0
- package/dist/esm/hooks/useThrottledCallback.js +28 -0
- package/dist/esm/index.js +83 -0
- package/dist/esm/lib/cookie-consent/cookie-consent.js +63 -0
- package/dist/esm/lib/cookie.js +22 -0
- package/dist/esm/lib/dashboard-spec/stripJsonDashboardFences.js +7 -0
- package/dist/esm/lib/logger.js +10 -0
- package/dist/esm/tools/debounce.js +41 -0
- package/dist/esm/tools/env.js +7 -0
- package/dist/esm/types/index.d.ts +1 -0
- package/dist/esm/types/node_modules/@reduxjs/toolkit/dist/uncheckedindexed.d.ts +5 -0
- package/dist/esm/types/node_modules/@vimeo/player/types/errors.d.ts +28 -0
- package/dist/esm/types/node_modules/@vimeo/player/types/events.d.ts +144 -0
- package/dist/esm/types/node_modules/@vimeo/player/types/formats.d.ts +406 -0
- package/dist/esm/types/src/components/ui/AnalysesSelector/AnalysesSelector.d.ts +2 -0
- package/dist/esm/types/src/components/ui/AnalysesSelector/AnalysesSelector.types.d.ts +38 -0
- package/dist/esm/types/src/components/ui/AnalysesSelector/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/AnalysisLineIcon/AnalysisLineIcon.d.ts +6 -0
- package/dist/esm/types/src/components/ui/AnalysisLineIcon/index.d.ts +1 -0
- package/dist/esm/types/src/components/ui/AppHeader/AppHeader.d.ts +11 -0
- package/dist/esm/types/src/components/ui/AppHeader/appChromeAnchors.d.ts +2 -0
- package/dist/esm/types/src/components/ui/AppHeader/index.d.ts +3 -0
- package/dist/esm/types/src/components/ui/Avatar/Avatar.d.ts +5 -0
- package/dist/esm/types/src/components/ui/Avatar/Avatar.types.d.ts +9 -0
- package/dist/esm/types/src/components/ui/Avatar/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/Badge/Badge.d.ts +3 -0
- package/dist/esm/types/src/components/ui/Badge/Badge.types.d.ts +6 -0
- package/dist/esm/types/src/components/ui/Badge/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/Breadcrumb/Breadcrumb.d.ts +9 -0
- package/dist/esm/types/src/components/ui/Breadcrumb/Breadcrumb.types.d.ts +15 -0
- package/dist/esm/types/src/components/ui/Breadcrumb/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/Button/Button.d.ts +3 -0
- package/dist/esm/types/src/components/ui/Button/Button.types.d.ts +8 -0
- package/dist/esm/types/src/components/ui/Button/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/Card/Card.d.ts +11 -0
- package/dist/esm/types/src/components/ui/Card/Card.types.d.ts +29 -0
- package/dist/esm/types/src/components/ui/Card/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/Chart/Chart.context.d.ts +3 -0
- package/dist/esm/types/src/components/ui/Chart/Chart.d.ts +12 -0
- package/dist/esm/types/src/components/ui/Chart/Chart.helpers.d.ts +11 -0
- package/dist/esm/types/src/components/ui/Chart/Chart.types.d.ts +34 -0
- package/dist/esm/types/src/components/ui/Chart/chartForecastVisualization.constants.d.ts +21 -0
- package/dist/esm/types/src/components/ui/Chart/chartForecastVisualization.types.d.ts +84 -0
- package/dist/esm/types/src/components/ui/Chart/components/ActiveDotsLayer/ActiveDotsLayer.d.ts +11 -0
- package/dist/esm/types/src/components/ui/Chart/components/BaseChartWrapper.d.ts +79 -0
- package/dist/esm/types/src/components/ui/Chart/components/ChartAxes.d.ts +15 -0
- package/dist/esm/types/src/components/ui/Chart/components/ChartContainer.d.ts +11 -0
- package/dist/esm/types/src/components/ui/Chart/components/ChartGrid.d.ts +1 -0
- package/dist/esm/types/src/components/ui/Chart/components/ChartLegendContent.d.ts +7 -0
- package/dist/esm/types/src/components/ui/Chart/components/ChartLegendItem.d.ts +15 -0
- package/dist/esm/types/src/components/ui/Chart/components/ChartTooltipContent.d.ts +2 -0
- package/dist/esm/types/src/components/ui/Chart/components/ChartTooltipItem.d.ts +24 -0
- package/dist/esm/types/src/components/ui/Chart/components/ConfidenceBands.d.ts +7 -0
- package/dist/esm/types/src/components/ui/Chart/components/CustomChartLegend/CustomChartLegend.d.ts +31 -0
- package/dist/esm/types/src/components/ui/Chart/components/ForecastBoundaries.d.ts +8 -0
- package/dist/esm/types/src/components/ui/Chart/components/ForecastLine.d.ts +12 -0
- package/dist/esm/types/src/components/ui/Chart/components/HistoricalLine.d.ts +12 -0
- package/dist/esm/types/src/components/ui/Chart/components/LegendSvg/LegendSvg.d.ts +12 -0
- package/dist/esm/types/src/components/ui/Chart/components/QuantileBands.d.ts +18 -0
- package/dist/esm/types/src/components/ui/Chart/components/index.d.ts +12 -0
- package/dist/esm/types/src/components/ui/Chart/hooks/useChartAnimation.d.ts +5 -0
- package/dist/esm/types/src/components/ui/Chart/hooks/useChartColors.d.ts +12 -0
- package/dist/esm/types/src/components/ui/Chart/hooks/useLegendState.d.ts +10 -0
- package/dist/esm/types/src/components/ui/Chart/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/Chart/tools/formatters.d.ts +21 -0
- package/dist/esm/types/src/components/ui/ChartAreaInteractive/ChartAreaInteractive.d.ts +3 -0
- package/dist/esm/types/src/components/ui/ChartAreaInteractive/ChartAreaInteractive.helpers.d.ts +31 -0
- package/dist/esm/types/src/components/ui/ChartAreaInteractive/ChartAreaInteractive.types.d.ts +63 -0
- package/dist/esm/types/src/components/ui/ChartAreaInteractive/ChartLines.d.ts +45 -0
- package/dist/esm/types/src/components/ui/ChartAreaInteractive/index.d.ts +3 -0
- package/dist/esm/types/src/components/ui/ChartAreaInteractive/overlays/IntervalsOverlay/IntervalsOverlay.d.ts +17 -0
- package/dist/esm/types/src/components/ui/ChartAreaInteractive/overlays/IntervalsOverlay/IntervalsOverlay.hooks.d.ts +15 -0
- package/dist/esm/types/src/components/ui/ChartAreaInteractive/overlays/PinOverlay/PinOverlay.d.ts +10 -0
- package/dist/esm/types/src/components/ui/ChartAreaInteractive/overlays/ThresholdsOverlay/ThresholdsOverlay.d.ts +19 -0
- package/dist/esm/types/src/components/ui/ChartAreaInteractive/overlays/ThresholdsOverlay/ThresholdsOverlay.hooks.d.ts +15 -0
- package/dist/esm/types/src/components/ui/ChartAreaInteractive/overlays/index.d.ts +3 -0
- package/dist/esm/types/src/components/ui/ChartAreaInteractive/overlays/useChartYRange.d.ts +18 -0
- package/dist/esm/types/src/components/ui/ChartAreaInteractive/overlays/useForecastColor.d.ts +10 -0
- package/dist/esm/types/src/components/ui/ChartAreaInteractive/overlays/useQuantileBands.d.ts +22 -0
- package/dist/esm/types/src/components/ui/Chat/Chat.d.ts +12 -0
- package/dist/esm/types/src/components/ui/Chat/Chat.types.d.ts +80 -0
- package/dist/esm/types/src/components/ui/Chat/ChatChrome/ChatChrome.d.ts +2 -0
- package/dist/esm/types/src/components/ui/Chat/ChatChrome/ChatChrome.types.d.ts +45 -0
- package/dist/esm/types/src/components/ui/Chat/ChatChrome/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/Chat/ChatEmptyState/ChatEmptyState.d.ts +2 -0
- package/dist/esm/types/src/components/ui/Chat/ChatEmptyState/ChatEmptyState.types.d.ts +5 -0
- package/dist/esm/types/src/components/ui/Chat/ChatMessage/AgentMessageContent.d.ts +13 -0
- package/dist/esm/types/src/components/ui/Chat/ChatMessage/AgentMessageContent.helpers.d.ts +31 -0
- package/dist/esm/types/src/components/ui/Chat/ChatMessage/ChatDatasetApplicationLink.d.ts +5 -0
- package/dist/esm/types/src/components/ui/Chat/ChatMessage/ChatMessage.d.ts +2 -0
- package/dist/esm/types/src/components/ui/Chat/ChatMessage/MessageChart.d.ts +9 -0
- package/dist/esm/types/src/components/ui/Chat/ChatMessage/icons/DocIcon.d.ts +3 -0
- package/dist/esm/types/src/components/ui/Chat/ChatMessage/icons/XlsIcon.d.ts +3 -0
- package/dist/esm/types/src/components/ui/Chat/ChatMessage/index.d.ts +1 -0
- package/dist/esm/types/src/components/ui/Chat/ChatMessage/presetScript.d.ts +55 -0
- package/dist/esm/types/src/components/ui/Chat/ChatPresets/ChatPresets.d.ts +11 -0
- package/dist/esm/types/src/components/ui/Chat/ChatPresets/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/Chat/ChatPrompt/ChatPrompt.d.ts +2 -0
- package/dist/esm/types/src/components/ui/Chat/ChatPrompt/index.d.ts +1 -0
- package/dist/esm/types/src/components/ui/Chat/ChatSheet/ChatSelector.d.ts +5 -0
- package/dist/esm/types/src/components/ui/Chat/ChatSheet/ChatSettings.d.ts +5 -0
- package/dist/esm/types/src/components/ui/Chat/ChatSheet/ChatSheet.d.ts +22 -0
- package/dist/esm/types/src/components/ui/Chat/ChatSheet/index.d.ts +3 -0
- package/dist/esm/types/src/components/ui/Chat/ChatSheet/useChatPanelChromeModel.d.ts +25 -0
- package/dist/esm/types/src/components/ui/Chat/chat-preset-utils.d.ts +6 -0
- package/dist/esm/types/src/components/ui/Chat/index.d.ts +13 -0
- package/dist/esm/types/src/components/ui/Checkbox/Checkbox.d.ts +3 -0
- package/dist/esm/types/src/components/ui/Checkbox/Checkbox.types.d.ts +3 -0
- package/dist/esm/types/src/components/ui/Checkbox/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/Dialog/Dialog.d.ts +3 -0
- package/dist/esm/types/src/components/ui/Dialog/Dialog.types.d.ts +26 -0
- package/dist/esm/types/src/components/ui/Dialog/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/DraggingButton/DraggingButton.d.ts +12 -0
- package/dist/esm/types/src/components/ui/Drawer/Drawer.d.ts +12 -0
- package/dist/esm/types/src/components/ui/Drawer/Drawer.types.d.ts +30 -0
- package/dist/esm/types/src/components/ui/Drawer/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/DropZone/DropZone.d.ts +20 -0
- package/dist/esm/types/src/components/ui/DropdownMenu/DropdownMenu.d.ts +17 -0
- package/dist/esm/types/src/components/ui/DropdownMenu/DropdownMenu.types.d.ts +36 -0
- package/dist/esm/types/src/components/ui/DropdownMenu/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/FlickeringGrid/FlickeringGrid.d.ts +3 -0
- package/dist/esm/types/src/components/ui/FlickeringGrid/FlickeringGrid.types.d.ts +10 -0
- package/dist/esm/types/src/components/ui/FlickeringGrid/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/Foldable/Foldable.d.ts +2 -0
- package/dist/esm/types/src/components/ui/Foldable/Foldable.types.d.ts +6 -0
- package/dist/esm/types/src/components/ui/Foldable/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/Gap/Gap.d.ts +1 -0
- package/dist/esm/types/src/components/ui/Image/Image.d.ts +3 -0
- package/dist/esm/types/src/components/ui/Image/Image.types.d.ts +5 -0
- package/dist/esm/types/src/components/ui/Image/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/ImageWithFallback/ImageWithFallback.d.ts +2 -0
- package/dist/esm/types/src/components/ui/ImageWithFallback/ImageWithFallback.types.d.ts +5 -0
- package/dist/esm/types/src/components/ui/ImageWithFallback/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/InfoIconTooltip/InfoIconTooltip.d.ts +3 -0
- package/dist/esm/types/src/components/ui/Input/Input.d.ts +11 -0
- package/dist/esm/types/src/components/ui/Input/Input.types.d.ts +9 -0
- package/dist/esm/types/src/components/ui/Input/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/InteractionOverlay/InteractionOverlay.d.ts +6 -0
- package/dist/esm/types/src/components/ui/InteractiveContent/InteractiveContent.d.ts +6 -0
- package/dist/esm/types/src/components/ui/InteractiveContent/index.d.ts +1 -0
- package/dist/esm/types/src/components/ui/Label/Label.d.ts +3 -0
- package/dist/esm/types/src/components/ui/Label/Label.types.d.ts +3 -0
- package/dist/esm/types/src/components/ui/Label/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/LabelWithId/AltKeyProvider.d.ts +3 -0
- package/dist/esm/types/src/components/ui/LabelWithId/LabelWithId.d.ts +2 -0
- package/dist/esm/types/src/components/ui/LabelWithId/LabelWithId.types.d.ts +5 -0
- package/dist/esm/types/src/components/ui/LabelWithId/index.d.ts +3 -0
- package/dist/esm/types/src/components/ui/LabeledInput/LabeledInput.d.ts +12 -0
- package/dist/esm/types/src/components/ui/LabledCheckbox/LabledCheckbox.d.ts +6 -0
- package/dist/esm/types/src/components/ui/LegacyPlatformLink/LegacyPlatformLink.d.ts +2 -0
- package/dist/esm/types/src/components/ui/LegacyPlatformLink/LegacyPlatformLink.types.d.ts +4 -0
- package/dist/esm/types/src/components/ui/LegacyPlatformLink/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/Logo/Logo.d.ts +2 -0
- package/dist/esm/types/src/components/ui/Logo/Logo.types.d.ts +7 -0
- package/dist/esm/types/src/components/ui/Logo/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/MobileAdaptiveSelector/MobileAdaptiveSelector.d.ts +2 -0
- package/dist/esm/types/src/components/ui/MobileAdaptiveSelector/MobileAdaptiveSelector.types.d.ts +18 -0
- package/dist/esm/types/src/components/ui/MobileAdaptiveSelector/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/NumberControl/NumberControl.d.ts +2 -0
- package/dist/esm/types/src/components/ui/NumberControl/NumberControl.types.d.ts +7 -0
- package/dist/esm/types/src/components/ui/NumberControl/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/Page/AppShell/AppShell.d.ts +13 -0
- package/dist/esm/types/src/components/ui/Page/Breadcrumbs/Breadcrumbs.d.ts +15 -0
- package/dist/esm/types/src/components/ui/Page/Breadcrumbs/Breadcrumbs.types.d.ts +4 -0
- package/dist/esm/types/src/components/ui/Page/PageColumns/PageColumns.d.ts +5 -0
- package/dist/esm/types/src/components/ui/Page/PageContent/PageContent.d.ts +9 -0
- package/dist/esm/types/src/components/ui/Page/PageEmptyCanvas/PageEmptyCanvas.d.ts +6 -0
- package/dist/esm/types/src/components/ui/Page/PageFooter/PageFooter.d.ts +16 -0
- package/dist/esm/types/src/components/ui/Page/PageHeader/PageHeader.d.ts +11 -0
- package/dist/esm/types/src/components/ui/Page/PageScroll/PageScroll.d.ts +4 -0
- package/dist/esm/types/src/components/ui/Page/PageTabs/PageTabs.d.ts +14 -0
- package/dist/esm/types/src/components/ui/Page/PageXScroll/PageXScroll.d.ts +11 -0
- package/dist/esm/types/src/components/ui/Page/SectionHeader/SectionHeader.d.ts +2 -0
- package/dist/esm/types/src/components/ui/Page/SectionHeader/SectionHeader.types.d.ts +7 -0
- package/dist/esm/types/src/components/ui/Page/SectionHeader/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/Page/index.d.ts +13 -0
- package/dist/esm/types/src/components/ui/Page/pageContext.d.ts +4 -0
- package/dist/esm/types/src/components/ui/Progress/Progress.d.ts +3 -0
- package/dist/esm/types/src/components/ui/Progress/Progress.types.d.ts +3 -0
- package/dist/esm/types/src/components/ui/Progress/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/RegionCoords/RegionSelector.d.ts +2 -0
- package/dist/esm/types/src/components/ui/RegionCoords/RegionSelector.types.d.ts +13 -0
- package/dist/esm/types/src/components/ui/RegionCoords/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/Renamer/Renamer.d.ts +2 -0
- package/dist/esm/types/src/components/ui/Renamer/Renamer.types.d.ts +11 -0
- package/dist/esm/types/src/components/ui/Renamer/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/Select/Select.d.ts +13 -0
- package/dist/esm/types/src/components/ui/Select/Select.types.d.ts +20 -0
- package/dist/esm/types/src/components/ui/Select/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/Separator/Separator.d.ts +3 -0
- package/dist/esm/types/src/components/ui/Separator/Separator.types.d.ts +4 -0
- package/dist/esm/types/src/components/ui/Separator/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/Sheet/Sheet.d.ts +10 -0
- package/dist/esm/types/src/components/ui/Sheet/Sheet.types.d.ts +15 -0
- package/dist/esm/types/src/components/ui/Sheet/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/Sidebar/Sidebar.d.ts +93 -0
- package/dist/esm/types/src/components/ui/Skeleton/Skeleton.d.ts +3 -0
- package/dist/esm/types/src/components/ui/Skeleton/Skeleton.helpers.d.ts +7 -0
- package/dist/esm/types/src/components/ui/Skeleton/Skeleton.types.d.ts +8 -0
- package/dist/esm/types/src/components/ui/Skeleton/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/Slider/Slider.d.ts +3 -0
- package/dist/esm/types/src/components/ui/Slider/Slider.types.d.ts +4 -0
- package/dist/esm/types/src/components/ui/Slider/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/SmartTextTruncate/SmartTextTruncate.d.ts +3 -0
- package/dist/esm/types/src/components/ui/SmartTextTruncate/SmartTextTruncate.types.d.ts +4 -0
- package/dist/esm/types/src/components/ui/SmartTextTruncate/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/Sparkline/Sparkline.d.ts +3 -0
- package/dist/esm/types/src/components/ui/Sparkline/Sparkline.helpers.d.ts +9 -0
- package/dist/esm/types/src/components/ui/Sparkline/Sparkline.types.d.ts +16 -0
- package/dist/esm/types/src/components/ui/Sparkline/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/Switch/Switch.d.ts +3 -0
- package/dist/esm/types/src/components/ui/Switch/Switch.types.d.ts +4 -0
- package/dist/esm/types/src/components/ui/Switch/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/Table/Table.d.ts +13 -0
- package/dist/esm/types/src/components/ui/Table/Table.types.d.ts +19 -0
- package/dist/esm/types/src/components/ui/Table/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/Tabs/Tabs.d.ts +12 -0
- package/dist/esm/types/src/components/ui/Tabs/Tabs.types.d.ts +6 -0
- package/dist/esm/types/src/components/ui/Tabs/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/TextShimmer/TextShimmer.d.ts +5 -0
- package/dist/esm/types/src/components/ui/TextShimmer/TextShimmer.types.d.ts +8 -0
- package/dist/esm/types/src/components/ui/TextShimmer/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/TextWithDeferTooltip/TextWithDeferTooltip.d.ts +3 -0
- package/dist/esm/types/src/components/ui/TextWithDeferTooltip/TextWithDeferTooltip.types.d.ts +7 -0
- package/dist/esm/types/src/components/ui/TextWithDeferTooltip/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/TimeRangeControls/TimeRangeControls.constants.d.ts +1 -0
- package/dist/esm/types/src/components/ui/TimeRangeControls/TimeRangeControls.d.ts +11 -0
- package/dist/esm/types/src/components/ui/TimeRangeControls/TimeRangeControls.types.d.ts +2 -0
- package/dist/esm/types/src/components/ui/TimeRangeControls/index.d.ts +3 -0
- package/dist/esm/types/src/components/ui/Toggle/Toggle.d.ts +3 -0
- package/dist/esm/types/src/components/ui/Toggle/Toggle.types.d.ts +7 -0
- package/dist/esm/types/src/components/ui/Toggle/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/ToggleGroup/ToggleGroup.d.ts +4 -0
- package/dist/esm/types/src/components/ui/ToggleGroup/ToggleGroup.helpers.d.ts +6 -0
- package/dist/esm/types/src/components/ui/ToggleGroup/ToggleGroup.types.d.ts +32 -0
- package/dist/esm/types/src/components/ui/ToggleGroup/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/Tooltip/Tooltip.d.ts +6 -0
- package/dist/esm/types/src/components/ui/Tooltip/Tooltip.types.d.ts +13 -0
- package/dist/esm/types/src/components/ui/Tooltip/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/VimeoEmbed/VimeoEmbed.d.ts +3 -0
- package/dist/esm/types/src/components/ui/VimeoEmbed/VimeoEmbed.types.d.ts +9 -0
- package/dist/esm/types/src/components/ui/VimeoEmbed/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/icons/Github.d.ts +1 -0
- package/dist/esm/types/src/constants/dataset.d.ts +2 -0
- package/dist/esm/types/src/contexts/chat-context.d.ts +48 -0
- package/dist/esm/types/src/docs/App/App.d.ts +1 -0
- package/dist/esm/types/src/docs/App/ThemeToggle.d.ts +1 -0
- package/dist/esm/types/src/docs/DocPage.d.ts +1 -0
- package/dist/esm/types/src/docs/DocsShell.d.ts +1 -0
- package/dist/esm/types/src/docs/components/AppPageHeader/AppPageHeader.d.ts +8 -0
- package/dist/esm/types/src/docs/components/DocsSidebar/DocsSidebar.d.ts +1 -0
- package/dist/esm/types/src/docs/config/paths.d.ts +10 -0
- package/dist/esm/types/src/docs/contexts/theme-context.d.ts +8 -0
- package/dist/esm/types/src/docs/docsConstants.d.ts +4 -0
- package/dist/esm/types/src/docs/docsHeaderActions.d.ts +1 -0
- package/dist/esm/types/src/docs/index.d.ts +1 -0
- package/dist/esm/types/src/docs/lib/theme.d.ts +5 -0
- package/dist/esm/types/src/docs/pages/AnalysesSelectorPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/AnalysisLineIconPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/AvatarPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/BadgePage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/BreadcrumbPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/ButtonPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/CardPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/ChartAreaInteractivePage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/ChartPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/ChatPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/CheckboxPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/DialogPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/DrawerPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/DropZonePage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/DropdownMenuPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/FlickeringGridPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/FoldablePage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/ImagePage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/ImageWithFallbackPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/InputPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/InteractiveContentPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/LabelPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/LabelWithIdPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/LabeledInputPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/LegacyPlatformLinkPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/LogoPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/MobileAdaptiveSelectorPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/NumberControlPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/PagePage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/ProgressPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/RegionCoordsPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/RenamerPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/SelectPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/SeparatorPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/SheetPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/SidebarPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/SkeletonPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/SliderPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/SmartTextTruncatePage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/SparklinePage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/SwitchPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/TablePage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/TabsPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/TextShimmerPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/TextWithDeferTooltipPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/TimeRangeControlsPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/ToggleGroupPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/TogglePage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/TooltipPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/VimeoEmbedPage.d.ts +1 -0
- package/dist/esm/types/src/docs/registry.d.ts +14 -0
- package/dist/esm/types/src/hooks/panelWidth.d.ts +20 -0
- package/dist/esm/types/src/hooks/useClickOutside.d.ts +10 -0
- package/dist/esm/types/src/hooks/useDebounceCallback.d.ts +3 -0
- package/dist/esm/types/src/hooks/useDragElem.d.ts +15 -0
- package/dist/esm/types/src/hooks/useEvent.d.ts +11 -0
- package/dist/esm/types/src/hooks/useIsMobile.d.ts +1 -0
- package/dist/esm/types/src/hooks/useIsTouchDevice.d.ts +6 -0
- package/dist/esm/types/src/hooks/useQueryParams.d.ts +6 -0
- package/dist/esm/types/src/hooks/useShellWidthObserver.d.ts +1 -0
- package/dist/esm/types/src/hooks/useThrottledCallback.d.ts +5 -0
- package/dist/esm/types/src/index.d.ts +54 -0
- package/dist/esm/types/src/lib/cookie-consent/cookie-consent.d.ts +20 -0
- package/dist/esm/types/src/lib/cookie.d.ts +2 -0
- package/dist/esm/types/src/lib/dashboard-spec/stripJsonDashboardFences.d.ts +2 -0
- package/dist/esm/types/src/lib/logger.d.ts +9 -0
- package/dist/esm/types/src/tools/debounce.d.ts +6 -0
- package/dist/esm/types/src/tools/env.d.ts +2 -0
- package/dist/esm/types/src/types/chat-api.types.d.ts +5 -0
- package/dist/esm/types/src/types/forecast-data.d.ts +8 -0
- package/dist/esm/types/src/utils/analysisDate.d.ts +7 -0
- package/dist/esm/types/src/utils/chartConnectionPoint.d.ts +61 -0
- package/dist/esm/types/src/utils/chartRenderQueue.d.ts +10 -0
- package/dist/esm/types/src/utils/chatPresetMerge.d.ts +2 -0
- package/dist/esm/types/src/utils/datasetApplicationLink.d.ts +7 -0
- package/dist/esm/types/src/utils/quantileFormat.d.ts +3 -0
- package/dist/esm/types/tests/chartConnectionPoint.test.d.ts +1 -0
- package/dist/esm/types/tests/smoke.test.d.ts +1 -0
- package/dist/esm/utils/analysisDate.js +16 -0
- package/dist/esm/utils/chartConnectionPoint.js +105 -0
- package/dist/esm/utils/chartRenderQueue.js +49 -0
- package/dist/esm/utils/chatPresetMerge.js +29 -0
- package/dist/esm/utils/datasetApplicationLink.js +21 -0
- package/dist/esm/utils/quantileFormat.js +32 -0
- package/package.json +172 -0
- package/src/components/ui/AnalysesSelector/AnalysesSelector.styl +68 -0
- package/src/components/ui/AnalysesSelector/AnalysesSelector.styl.d.ts +19 -0
- package/src/components/ui/AnalysesSelector/AnalysesSelector.tsx +369 -0
- package/src/components/ui/AnalysesSelector/AnalysesSelector.types.ts +41 -0
- package/src/components/ui/AnalysesSelector/index.ts +5 -0
- package/src/components/ui/AnalysisLineIcon/AnalysisLineIcon.styl +22 -0
- package/src/components/ui/AnalysisLineIcon/AnalysisLineIcon.styl.d.ts +9 -0
- package/src/components/ui/AnalysisLineIcon/AnalysisLineIcon.tsx +47 -0
- package/src/components/ui/AnalysisLineIcon/index.ts +5 -0
- package/src/components/ui/AppHeader/AppHeader.styl +73 -0
- package/src/components/ui/AppHeader/AppHeader.styl.d.ts +13 -0
- package/src/components/ui/AppHeader/AppHeader.tsx +37 -0
- package/src/components/ui/AppHeader/appChromeAnchors.ts +2 -0
- package/src/components/ui/AppHeader/index.ts +3 -0
- package/src/components/ui/Avatar/Avatar.styl +31 -0
- package/src/components/ui/Avatar/Avatar.styl.d.ts +12 -0
- package/src/components/ui/Avatar/Avatar.tsx +42 -0
- package/src/components/ui/Avatar/Avatar.types.ts +17 -0
- package/src/components/ui/Avatar/index.ts +6 -0
- package/src/components/ui/Badge/Badge.styl +95 -0
- package/src/components/ui/Badge/Badge.styl.d.ts +13 -0
- package/src/components/ui/Badge/Badge.tsx +31 -0
- package/src/components/ui/Badge/Badge.types.ts +7 -0
- package/src/components/ui/Badge/index.ts +2 -0
- package/src/components/ui/Breadcrumb/Breadcrumb.styl +49 -0
- package/src/components/ui/Breadcrumb/Breadcrumb.styl.d.ts +12 -0
- package/src/components/ui/Breadcrumb/Breadcrumb.tsx +107 -0
- package/src/components/ui/Breadcrumb/Breadcrumb.types.ts +15 -0
- package/src/components/ui/Breadcrumb/index.ts +10 -0
- package/src/components/ui/Button/Button.styl +131 -0
- package/src/components/ui/Button/Button.styl.d.ts +17 -0
- package/src/components/ui/Button/Button.tsx +35 -0
- package/src/components/ui/Button/Button.types.ts +15 -0
- package/src/components/ui/Button/index.ts +2 -0
- package/src/components/ui/Card/Card.styl +108 -0
- package/src/components/ui/Card/Card.styl.d.ts +21 -0
- package/src/components/ui/Card/Card.tsx +199 -0
- package/src/components/ui/Card/Card.types.ts +35 -0
- package/src/components/ui/Card/index.ts +11 -0
- package/src/components/ui/Chart/Chart.context.ts +14 -0
- package/src/components/ui/Chart/Chart.helpers.ts +14 -0
- package/src/components/ui/Chart/Chart.styl +184 -0
- package/src/components/ui/Chart/Chart.styl.d.ts +22 -0
- package/src/components/ui/Chart/Chart.tsx +23 -0
- package/src/components/ui/Chart/Chart.types.ts +46 -0
- package/src/components/ui/Chart/chart-types.csv +33 -0
- package/src/components/ui/Chart/chartForecastVisualization.constants.ts +22 -0
- package/src/components/ui/Chart/chartForecastVisualization.types.ts +97 -0
- package/src/components/ui/Chart/components/ActiveDotsLayer/ActiveDotsLayer.styl +16 -0
- package/src/components/ui/Chart/components/ActiveDotsLayer/ActiveDotsLayer.styl.d.ts +8 -0
- package/src/components/ui/Chart/components/ActiveDotsLayer/ActiveDotsLayer.tsx +32 -0
- package/src/components/ui/Chart/components/BaseChartWrapper.styl +96 -0
- package/src/components/ui/Chart/components/BaseChartWrapper.styl.d.ts +20 -0
- package/src/components/ui/Chart/components/BaseChartWrapper.tsx +907 -0
- package/src/components/ui/Chart/components/ChartAxes.tsx +140 -0
- package/src/components/ui/Chart/components/ChartContainer.tsx +73 -0
- package/src/components/ui/Chart/components/ChartGrid.tsx +7 -0
- package/src/components/ui/Chart/components/ChartLegendContent.tsx +48 -0
- package/src/components/ui/Chart/components/ChartLegendItem.tsx +43 -0
- package/src/components/ui/Chart/components/ChartTooltipContent.tsx +140 -0
- package/src/components/ui/Chart/components/ChartTooltipItem.tsx +114 -0
- package/src/components/ui/Chart/components/ConfidenceBands.tsx +49 -0
- package/src/components/ui/Chart/components/CustomChartLegend/CustomChartLegend.styl +102 -0
- package/src/components/ui/Chart/components/CustomChartLegend/CustomChartLegend.styl.d.ts +18 -0
- package/src/components/ui/Chart/components/CustomChartLegend/CustomChartLegend.tsx +152 -0
- package/src/components/ui/Chart/components/ForecastBoundaries.tsx +71 -0
- package/src/components/ui/Chart/components/ForecastLine.tsx +68 -0
- package/src/components/ui/Chart/components/HistoricalLine.tsx +67 -0
- package/src/components/ui/Chart/components/LegendSvg/LegendSvg.tsx +61 -0
- package/src/components/ui/Chart/components/QuantileBands.tsx +73 -0
- package/src/components/ui/Chart/components/index.ts +12 -0
- package/src/components/ui/Chart/hooks/useChartAnimation.ts +17 -0
- package/src/components/ui/Chart/hooks/useChartColors.ts +24 -0
- package/src/components/ui/Chart/hooks/useLegendState.ts +31 -0
- package/src/components/ui/Chart/index.ts +2 -0
- package/src/components/ui/Chart/tools/formatters.ts +88 -0
- package/src/components/ui/ChartAreaInteractive/ChartAreaInteractive.helpers.ts +168 -0
- package/src/components/ui/ChartAreaInteractive/ChartAreaInteractive.styl +66 -0
- package/src/components/ui/ChartAreaInteractive/ChartAreaInteractive.styl.d.ts +14 -0
- package/src/components/ui/ChartAreaInteractive/ChartAreaInteractive.tsx +230 -0
- package/src/components/ui/ChartAreaInteractive/ChartAreaInteractive.types.ts +68 -0
- package/src/components/ui/ChartAreaInteractive/ChartLines.tsx +204 -0
- package/src/components/ui/ChartAreaInteractive/index.ts +3 -0
- package/src/components/ui/ChartAreaInteractive/overlays/DraggingButton.styl +29 -0
- package/src/components/ui/ChartAreaInteractive/overlays/DraggingButton.styl.d.ts +8 -0
- package/src/components/ui/ChartAreaInteractive/overlays/IntervalsOverlay/IntervalsOverlay.hooks.ts +211 -0
- package/src/components/ui/ChartAreaInteractive/overlays/IntervalsOverlay/IntervalsOverlay.styl +17 -0
- package/src/components/ui/ChartAreaInteractive/overlays/IntervalsOverlay/IntervalsOverlay.styl.d.ts +8 -0
- package/src/components/ui/ChartAreaInteractive/overlays/IntervalsOverlay/IntervalsOverlay.tsx +402 -0
- package/src/components/ui/ChartAreaInteractive/overlays/PinOverlay/PinOverlay.styl +107 -0
- package/src/components/ui/ChartAreaInteractive/overlays/PinOverlay/PinOverlay.styl.d.ts +15 -0
- package/src/components/ui/ChartAreaInteractive/overlays/PinOverlay/PinOverlay.tsx +256 -0
- package/src/components/ui/ChartAreaInteractive/overlays/ThresholdsOverlay/ThresholdsOverlay.hooks.ts +185 -0
- package/src/components/ui/ChartAreaInteractive/overlays/ThresholdsOverlay/ThresholdsOverlay.styl +21 -0
- package/src/components/ui/ChartAreaInteractive/overlays/ThresholdsOverlay/ThresholdsOverlay.styl.d.ts +8 -0
- package/src/components/ui/ChartAreaInteractive/overlays/ThresholdsOverlay/ThresholdsOverlay.tsx +206 -0
- package/src/components/ui/ChartAreaInteractive/overlays/index.ts +3 -0
- package/src/components/ui/ChartAreaInteractive/overlays/useChartYRange.ts +209 -0
- package/src/components/ui/ChartAreaInteractive/overlays/useForecastColor.ts +49 -0
- package/src/components/ui/ChartAreaInteractive/overlays/useQuantileBands.ts +248 -0
- package/src/components/ui/Chat/Chat.styl +7 -0
- package/src/components/ui/Chat/Chat.styl.d.ts +8 -0
- package/src/components/ui/Chat/Chat.tsx +22 -0
- package/src/components/ui/Chat/Chat.types.ts +88 -0
- package/src/components/ui/Chat/ChatChrome/ChatChrome.styl +125 -0
- package/src/components/ui/Chat/ChatChrome/ChatChrome.styl.d.ts +21 -0
- package/src/components/ui/Chat/ChatChrome/ChatChrome.tsx +188 -0
- package/src/components/ui/Chat/ChatChrome/ChatChrome.types.ts +50 -0
- package/src/components/ui/Chat/ChatChrome/index.ts +5 -0
- package/src/components/ui/Chat/ChatEmptyState/ChatEmptyState.styl +20 -0
- package/src/components/ui/Chat/ChatEmptyState/ChatEmptyState.styl.d.ts +8 -0
- package/src/components/ui/Chat/ChatEmptyState/ChatEmptyState.tsx +16 -0
- package/src/components/ui/Chat/ChatEmptyState/ChatEmptyState.types.ts +5 -0
- package/src/components/ui/Chat/ChatEmptyState/sparkles.svg +22 -0
- package/src/components/ui/Chat/ChatMessage/AgentMessageContent.helpers.tsx +405 -0
- package/src/components/ui/Chat/ChatMessage/AgentMessageContent.tsx +234 -0
- package/src/components/ui/Chat/ChatMessage/ChatDatasetApplicationLink.tsx +38 -0
- package/src/components/ui/Chat/ChatMessage/ChatMessage.styl +184 -0
- package/src/components/ui/Chat/ChatMessage/ChatMessage.styl.d.ts +22 -0
- package/src/components/ui/Chat/ChatMessage/ChatMessage.tsx +52 -0
- package/src/components/ui/Chat/ChatMessage/MessageChart.tsx +32 -0
- package/src/components/ui/Chat/ChatMessage/icons/DocIcon.tsx +7 -0
- package/src/components/ui/Chat/ChatMessage/icons/XlsIcon.tsx +7 -0
- package/src/components/ui/Chat/ChatMessage/icons/doc.png +0 -0
- package/src/components/ui/Chat/ChatMessage/icons/doc.svg +1 -0
- package/src/components/ui/Chat/ChatMessage/icons/xls.png +0 -0
- package/src/components/ui/Chat/ChatMessage/icons/xls.svg +1 -0
- package/src/components/ui/Chat/ChatMessage/index.ts +1 -0
- package/src/components/ui/Chat/ChatMessage/presetScript.ts +282 -0
- package/src/components/ui/Chat/ChatPresets/ChatPresets.styl +41 -0
- package/src/components/ui/Chat/ChatPresets/ChatPresets.styl.d.ts +11 -0
- package/src/components/ui/Chat/ChatPresets/ChatPresets.tsx +59 -0
- package/src/components/ui/Chat/ChatPresets/index.ts +2 -0
- package/src/components/ui/Chat/ChatPrompt/ChatPrompt.styl +84 -0
- package/src/components/ui/Chat/ChatPrompt/ChatPrompt.styl.d.ts +13 -0
- package/src/components/ui/Chat/ChatPrompt/ChatPrompt.tsx +103 -0
- package/src/components/ui/Chat/ChatPrompt/index.ts +1 -0
- package/src/components/ui/Chat/ChatSheet/ChatSelector.tsx +65 -0
- package/src/components/ui/Chat/ChatSheet/ChatSettings.styl +35 -0
- package/src/components/ui/Chat/ChatSheet/ChatSettings.styl.d.ts +10 -0
- package/src/components/ui/Chat/ChatSheet/ChatSettings.tsx +61 -0
- package/src/components/ui/Chat/ChatSheet/ChatSheet.styl.d.ts +19 -0
- package/src/components/ui/Chat/ChatSheet/ChatSheet.tsx +91 -0
- package/src/components/ui/Chat/ChatSheet/ChatSidebar.styl.d.ts +17 -0
- package/src/components/ui/Chat/ChatSheet/index.ts +7 -0
- package/src/components/ui/Chat/ChatSheet/loader.svg +14 -0
- package/src/components/ui/Chat/ChatSheet/useChatPanelChromeModel.tsx +1024 -0
- package/src/components/ui/Chat/chat-preset-utils.ts +27 -0
- package/src/components/ui/Chat/index.ts +24 -0
- package/src/components/ui/Checkbox/Checkbox.styl +42 -0
- package/src/components/ui/Checkbox/Checkbox.styl.d.ts +9 -0
- package/src/components/ui/Checkbox/Checkbox.tsx +26 -0
- package/src/components/ui/Checkbox/Checkbox.types.ts +5 -0
- package/src/components/ui/Checkbox/index.ts +2 -0
- package/src/components/ui/Dialog/Dialog.styl +145 -0
- package/src/components/ui/Dialog/Dialog.styl.d.ts +21 -0
- package/src/components/ui/Dialog/Dialog.tsx +233 -0
- package/src/components/ui/Dialog/Dialog.types.ts +27 -0
- package/src/components/ui/Dialog/index.ts +3 -0
- package/src/components/ui/DraggingButton/DraggingButton.styl +74 -0
- package/src/components/ui/DraggingButton/DraggingButton.styl.d.ts +11 -0
- package/src/components/ui/DraggingButton/DraggingButton.tsx +55 -0
- package/src/components/ui/Drawer/Drawer.styl +123 -0
- package/src/components/ui/Drawer/Drawer.styl.d.ts +15 -0
- package/src/components/ui/Drawer/Drawer.tsx +112 -0
- package/src/components/ui/Drawer/Drawer.types.ts +35 -0
- package/src/components/ui/Drawer/index.ts +13 -0
- package/src/components/ui/DropZone/DropZone.styl +66 -0
- package/src/components/ui/DropZone/DropZone.styl.d.ts +13 -0
- package/src/components/ui/DropZone/DropZone.tsx +188 -0
- package/src/components/ui/DropdownMenu/DropdownMenu.styl +331 -0
- package/src/components/ui/DropdownMenu/DropdownMenu.styl.d.ts +27 -0
- package/src/components/ui/DropdownMenu/DropdownMenu.tsx +231 -0
- package/src/components/ui/DropdownMenu/DropdownMenu.types.ts +68 -0
- package/src/components/ui/DropdownMenu/index.ts +18 -0
- package/src/components/ui/FlickeringGrid/FlickeringGrid.styl +12 -0
- package/src/components/ui/FlickeringGrid/FlickeringGrid.styl.d.ts +7 -0
- package/src/components/ui/FlickeringGrid/FlickeringGrid.tsx +10 -0
- package/src/components/ui/FlickeringGrid/FlickeringGrid.types.ts +10 -0
- package/src/components/ui/FlickeringGrid/bg.svg +194 -0
- package/src/components/ui/FlickeringGrid/index.ts +2 -0
- package/src/components/ui/Foldable/Foldable.styl +48 -0
- package/src/components/ui/Foldable/Foldable.styl.d.ts +13 -0
- package/src/components/ui/Foldable/Foldable.tsx +38 -0
- package/src/components/ui/Foldable/Foldable.types.ts +6 -0
- package/src/components/ui/Foldable/index.ts +2 -0
- package/src/components/ui/Gap/Gap.styl +2 -0
- package/src/components/ui/Gap/Gap.styl.d.ts +7 -0
- package/src/components/ui/Gap/Gap.tsx +3 -0
- package/src/components/ui/Image/Image.styl +27 -0
- package/src/components/ui/Image/Image.styl.d.ts +10 -0
- package/src/components/ui/Image/Image.tsx +31 -0
- package/src/components/ui/Image/Image.types.ts +6 -0
- package/src/components/ui/Image/index.ts +2 -0
- package/src/components/ui/ImageWithFallback/ImageWithFallback.tsx +32 -0
- package/src/components/ui/ImageWithFallback/ImageWithFallback.types.ts +9 -0
- package/src/components/ui/ImageWithFallback/index.ts +2 -0
- package/src/components/ui/InfoIconTooltip/InfoIconTooltip.styl +5 -0
- package/src/components/ui/InfoIconTooltip/InfoIconTooltip.styl.d.ts +7 -0
- package/src/components/ui/InfoIconTooltip/InfoIconTooltip.tsx +21 -0
- package/src/components/ui/Input/Input.styl +67 -0
- package/src/components/ui/Input/Input.styl.d.ts +11 -0
- package/src/components/ui/Input/Input.tsx +42 -0
- package/src/components/ui/Input/Input.types.ts +11 -0
- package/src/components/ui/Input/index.ts +2 -0
- package/src/components/ui/InteractionOverlay/InteractionOverlay.styl +19 -0
- package/src/components/ui/InteractionOverlay/InteractionOverlay.styl.d.ts +8 -0
- package/src/components/ui/InteractionOverlay/InteractionOverlay.tsx +55 -0
- package/src/components/ui/InteractiveContent/InteractiveContent.styl +3 -0
- package/src/components/ui/InteractiveContent/InteractiveContent.styl.d.ts +7 -0
- package/src/components/ui/InteractiveContent/InteractiveContent.tsx +21 -0
- package/src/components/ui/InteractiveContent/index.ts +1 -0
- package/src/components/ui/Label/Label.styl +16 -0
- package/src/components/ui/Label/Label.styl.d.ts +7 -0
- package/src/components/ui/Label/Label.tsx +18 -0
- package/src/components/ui/Label/Label.types.ts +5 -0
- package/src/components/ui/Label/index.ts +2 -0
- package/src/components/ui/LabelWithId/AltKeyProvider.tsx +22 -0
- package/src/components/ui/LabelWithId/LabelWithId.styl +14 -0
- package/src/components/ui/LabelWithId/LabelWithId.styl.d.ts +8 -0
- package/src/components/ui/LabelWithId/LabelWithId.tsx +12 -0
- package/src/components/ui/LabelWithId/LabelWithId.types.ts +5 -0
- package/src/components/ui/LabelWithId/index.ts +3 -0
- package/src/components/ui/LabeledInput/LabeledInput.styl +32 -0
- package/src/components/ui/LabeledInput/LabeledInput.styl.d.ts +14 -0
- package/src/components/ui/LabeledInput/LabeledInput.tsx +53 -0
- package/src/components/ui/LabledCheckbox/LabledCheckbox.tsx +21 -0
- package/src/components/ui/LegacyPlatformLink/LegacyPlatformLink.styl +10 -0
- package/src/components/ui/LegacyPlatformLink/LegacyPlatformLink.styl.d.ts +7 -0
- package/src/components/ui/LegacyPlatformLink/LegacyPlatformLink.tsx +18 -0
- package/src/components/ui/LegacyPlatformLink/LegacyPlatformLink.types.ts +5 -0
- package/src/components/ui/LegacyPlatformLink/index.ts +2 -0
- package/src/components/ui/Logo/Logo.styl +39 -0
- package/src/components/ui/Logo/Logo.styl.d.ts +12 -0
- package/src/components/ui/Logo/Logo.tsx +18 -0
- package/src/components/ui/Logo/Logo.types.ts +12 -0
- package/src/components/ui/Logo/index.ts +5 -0
- package/src/components/ui/MobileAdaptiveSelector/MobileAdaptiveSelector.styl +32 -0
- package/src/components/ui/MobileAdaptiveSelector/MobileAdaptiveSelector.styl.d.ts +13 -0
- package/src/components/ui/MobileAdaptiveSelector/MobileAdaptiveSelector.tsx +117 -0
- package/src/components/ui/MobileAdaptiveSelector/MobileAdaptiveSelector.types.ts +31 -0
- package/src/components/ui/MobileAdaptiveSelector/index.ts +8 -0
- package/src/components/ui/NumberControl/NumberControl.styl +11 -0
- package/src/components/ui/NumberControl/NumberControl.styl.d.ts +8 -0
- package/src/components/ui/NumberControl/NumberControl.tsx +58 -0
- package/src/components/ui/NumberControl/NumberControl.types.ts +10 -0
- package/src/components/ui/NumberControl/index.ts +2 -0
- package/src/components/ui/Page/AppShell/AppShell.styl +36 -0
- package/src/components/ui/Page/AppShell/AppShell.styl.d.ts +9 -0
- package/src/components/ui/Page/AppShell/AppShell.tsx +38 -0
- package/src/components/ui/Page/Breadcrumbs/Breadcrumbs.styl +33 -0
- package/src/components/ui/Page/Breadcrumbs/Breadcrumbs.styl.d.ts +10 -0
- package/src/components/ui/Page/Breadcrumbs/Breadcrumbs.tsx +71 -0
- package/src/components/ui/Page/Breadcrumbs/Breadcrumbs.types.ts +6 -0
- package/src/components/ui/Page/PageColumns/PageColumns.styl +28 -0
- package/src/components/ui/Page/PageColumns/PageColumns.styl.d.ts +11 -0
- package/src/components/ui/Page/PageColumns/PageColumns.tsx +31 -0
- package/src/components/ui/Page/PageContent/PageContent.styl +17 -0
- package/src/components/ui/Page/PageContent/PageContent.styl.d.ts +8 -0
- package/src/components/ui/Page/PageContent/PageContent.tsx +34 -0
- package/src/components/ui/Page/PageEmptyCanvas/PageEmptyCanvas.styl +28 -0
- package/src/components/ui/Page/PageEmptyCanvas/PageEmptyCanvas.styl.d.ts +9 -0
- package/src/components/ui/Page/PageEmptyCanvas/PageEmptyCanvas.tsx +21 -0
- package/src/components/ui/Page/PageFooter/DebugPanel/DebugPanel.styl.d.ts +9 -0
- package/src/components/ui/Page/PageFooter/PageFooter.styl +69 -0
- package/src/components/ui/Page/PageFooter/PageFooter.styl.d.ts +12 -0
- package/src/components/ui/Page/PageFooter/PageFooter.tsx +68 -0
- package/src/components/ui/Page/PageFooter/treads.svg +3 -0
- package/src/components/ui/Page/PageHeader/PageHeader.styl +185 -0
- package/src/components/ui/Page/PageHeader/PageHeader.styl.d.ts +17 -0
- package/src/components/ui/Page/PageHeader/PageHeader.tsx +67 -0
- package/src/components/ui/Page/PageScroll/PageScroll.styl +32 -0
- package/src/components/ui/Page/PageScroll/PageScroll.styl.d.ts +9 -0
- package/src/components/ui/Page/PageScroll/PageScroll.tsx +69 -0
- package/src/components/ui/Page/PageTabs/PageTabs.styl +20 -0
- package/src/components/ui/Page/PageTabs/PageTabs.styl.d.ts +11 -0
- package/src/components/ui/Page/PageTabs/PageTabs.tsx +64 -0
- package/src/components/ui/Page/PageXScroll/PageXScroll.styl +16 -0
- package/src/components/ui/Page/PageXScroll/PageXScroll.styl.d.ts +9 -0
- package/src/components/ui/Page/PageXScroll/PageXScroll.tsx +70 -0
- package/src/components/ui/Page/SectionHeader/SectionHeader.styl +36 -0
- package/src/components/ui/Page/SectionHeader/SectionHeader.styl.d.ts +12 -0
- package/src/components/ui/Page/SectionHeader/SectionHeader.tsx +26 -0
- package/src/components/ui/Page/SectionHeader/SectionHeader.types.ts +8 -0
- package/src/components/ui/Page/SectionHeader/index.ts +2 -0
- package/src/components/ui/Page/index.ts +18 -0
- package/src/components/ui/Page/pageContext.ts +9 -0
- package/src/components/ui/Progress/Progress.styl +22 -0
- package/src/components/ui/Progress/Progress.styl.d.ts +8 -0
- package/src/components/ui/Progress/Progress.tsx +26 -0
- package/src/components/ui/Progress/Progress.types.ts +5 -0
- package/src/components/ui/Progress/index.ts +2 -0
- package/src/components/ui/RegionCoords/RegionSelector.styl +21 -0
- package/src/components/ui/RegionCoords/RegionSelector.styl.d.ts +9 -0
- package/src/components/ui/RegionCoords/RegionSelector.tsx +56 -0
- package/src/components/ui/RegionCoords/RegionSelector.types.ts +10 -0
- package/src/components/ui/RegionCoords/index.ts +2 -0
- package/src/components/ui/Renamer/Renamer.styl +22 -0
- package/src/components/ui/Renamer/Renamer.styl.d.ts +11 -0
- package/src/components/ui/Renamer/Renamer.tsx +127 -0
- package/src/components/ui/Renamer/Renamer.types.ts +11 -0
- package/src/components/ui/Renamer/index.ts +2 -0
- package/src/components/ui/Select/Select.styl +321 -0
- package/src/components/ui/Select/Select.styl.d.ts +31 -0
- package/src/components/ui/Select/Select.tsx +169 -0
- package/src/components/ui/Select/Select.types.ts +40 -0
- package/src/components/ui/Select/index.ts +2 -0
- package/src/components/ui/Separator/Separator.styl +11 -0
- package/src/components/ui/Separator/Separator.styl.d.ts +7 -0
- package/src/components/ui/Separator/Separator.tsx +25 -0
- package/src/components/ui/Separator/Separator.types.ts +7 -0
- package/src/components/ui/Separator/index.ts +2 -0
- package/src/components/ui/Sheet/Sheet.styl +238 -0
- package/src/components/ui/Sheet/Sheet.styl.d.ts +28 -0
- package/src/components/ui/Sheet/Sheet.tsx +129 -0
- package/src/components/ui/Sheet/Sheet.types.ts +22 -0
- package/src/components/ui/Sheet/index.ts +11 -0
- package/src/components/ui/Sidebar/Sidebar.styl +710 -0
- package/src/components/ui/Sidebar/Sidebar.styl.d.ts +48 -0
- package/src/components/ui/Sidebar/Sidebar.tsx +971 -0
- package/src/components/ui/Skeleton/Skeleton.helpers.ts +13 -0
- package/src/components/ui/Skeleton/Skeleton.styl +31 -0
- package/src/components/ui/Skeleton/Skeleton.styl.d.ts +14 -0
- package/src/components/ui/Skeleton/Skeleton.tsx +21 -0
- package/src/components/ui/Skeleton/Skeleton.types.ts +10 -0
- package/src/components/ui/Skeleton/index.ts +2 -0
- package/src/components/ui/Slider/Slider.styl +77 -0
- package/src/components/ui/Slider/Slider.styl.d.ts +11 -0
- package/src/components/ui/Slider/Slider.tsx +189 -0
- package/src/components/ui/Slider/Slider.types.ts +7 -0
- package/src/components/ui/Slider/index.ts +2 -0
- package/src/components/ui/SmartTextTruncate/SmartTextTruncate.tsx +141 -0
- package/src/components/ui/SmartTextTruncate/SmartTextTruncate.types.ts +5 -0
- package/src/components/ui/SmartTextTruncate/index.ts +2 -0
- package/src/components/ui/Sparkline/Sparkline.helpers.ts +26 -0
- package/src/components/ui/Sparkline/Sparkline.styl +18 -0
- package/src/components/ui/Sparkline/Sparkline.styl.d.ts +9 -0
- package/src/components/ui/Sparkline/Sparkline.tsx +80 -0
- package/src/components/ui/Sparkline/Sparkline.types.ts +18 -0
- package/src/components/ui/Sparkline/index.ts +2 -0
- package/src/components/ui/Switch/Switch.styl +63 -0
- package/src/components/ui/Switch/Switch.styl.d.ts +11 -0
- package/src/components/ui/Switch/Switch.tsx +40 -0
- package/src/components/ui/Switch/Switch.types.ts +7 -0
- package/src/components/ui/Switch/index.ts +2 -0
- package/src/components/ui/Table/Table.styl +119 -0
- package/src/components/ui/Table/Table.styl.d.ts +20 -0
- package/src/components/ui/Table/Table.tsx +114 -0
- package/src/components/ui/Table/Table.types.ts +14 -0
- package/src/components/ui/Table/index.ts +11 -0
- package/src/components/ui/Tabs/Tabs.styl +117 -0
- package/src/components/ui/Tabs/Tabs.styl.d.ts +14 -0
- package/src/components/ui/Tabs/Tabs.tsx +73 -0
- package/src/components/ui/Tabs/Tabs.types.ts +8 -0
- package/src/components/ui/Tabs/index.ts +2 -0
- package/src/components/ui/TextShimmer/TextShimmer.styl +16 -0
- package/src/components/ui/TextShimmer/TextShimmer.styl.d.ts +7 -0
- package/src/components/ui/TextShimmer/TextShimmer.tsx +56 -0
- package/src/components/ui/TextShimmer/TextShimmer.types.ts +9 -0
- package/src/components/ui/TextShimmer/index.ts +2 -0
- package/src/components/ui/TextWithDeferTooltip/TextWithDeferTooltip.tsx +98 -0
- package/src/components/ui/TextWithDeferTooltip/TextWithDeferTooltip.types.ts +11 -0
- package/src/components/ui/TextWithDeferTooltip/index.ts +2 -0
- package/src/components/ui/TimeRangeControls/TimeRangeControls.constants.ts +1 -0
- package/src/components/ui/TimeRangeControls/TimeRangeControls.styl +28 -0
- package/src/components/ui/TimeRangeControls/TimeRangeControls.styl.d.ts +12 -0
- package/src/components/ui/TimeRangeControls/TimeRangeControls.tsx +92 -0
- package/src/components/ui/TimeRangeControls/TimeRangeControls.types.ts +3 -0
- package/src/components/ui/TimeRangeControls/index.ts +3 -0
- package/src/components/ui/Toggle/Toggle.styl +79 -0
- package/src/components/ui/Toggle/Toggle.styl.d.ts +12 -0
- package/src/components/ui/Toggle/Toggle.tsx +28 -0
- package/src/components/ui/Toggle/Toggle.types.ts +11 -0
- package/src/components/ui/Toggle/index.ts +2 -0
- package/src/components/ui/ToggleGroup/ToggleGroup.helpers.ts +20 -0
- package/src/components/ui/ToggleGroup/ToggleGroup.styl +38 -0
- package/src/components/ui/ToggleGroup/ToggleGroup.styl.d.ts +8 -0
- package/src/components/ui/ToggleGroup/ToggleGroup.tsx +77 -0
- package/src/components/ui/ToggleGroup/ToggleGroup.types.ts +38 -0
- package/src/components/ui/ToggleGroup/index.ts +2 -0
- package/src/components/ui/Tooltip/Tooltip.styl +131 -0
- package/src/components/ui/Tooltip/Tooltip.styl.d.ts +16 -0
- package/src/components/ui/Tooltip/Tooltip.tsx +64 -0
- package/src/components/ui/Tooltip/Tooltip.types.ts +23 -0
- package/src/components/ui/Tooltip/index.ts +12 -0
- package/src/components/ui/VimeoEmbed/VimeoEmbed.styl +63 -0
- package/src/components/ui/VimeoEmbed/VimeoEmbed.styl.d.ts +11 -0
- package/src/components/ui/VimeoEmbed/VimeoEmbed.tsx +191 -0
- package/src/components/ui/VimeoEmbed/VimeoEmbed.types.ts +10 -0
- package/src/components/ui/VimeoEmbed/index.ts +2 -0
- package/src/components/ui/icons/Github.tsx +10 -0
- package/src/constants/dataset.ts +2 -0
- package/src/contexts/chat-context.tsx +444 -0
- package/src/declarations.d.ts +15 -0
- package/src/docs/App/App.styl +8 -0
- package/src/docs/App/App.styl.d.ts +8 -0
- package/src/docs/App/App.tsx +55 -0
- package/src/docs/App/ThemeToggle.tsx +30 -0
- package/src/docs/DocPage.tsx +21 -0
- package/src/docs/DocsShell.styl +28 -0
- package/src/docs/DocsShell.styl.d.ts +11 -0
- package/src/docs/DocsShell.tsx +39 -0
- package/src/docs/components/AppPageHeader/AppPageHeader.tsx +28 -0
- package/src/docs/components/DocsSidebar/DocsSidebar.styl +22 -0
- package/src/docs/components/DocsSidebar/DocsSidebar.styl.d.ts +7 -0
- package/src/docs/components/DocsSidebar/DocsSidebar.tsx +165 -0
- package/src/docs/config/paths.ts +18 -0
- package/src/docs/config/webpack.config.js +212 -0
- package/src/docs/contexts/theme-context.tsx +47 -0
- package/src/docs/docsConstants.ts +5 -0
- package/src/docs/docsHeaderActions.tsx +18 -0
- package/src/docs/index.tsx +16 -0
- package/src/docs/lib/theme.ts +55 -0
- package/src/docs/pages/AnalysesSelectorPage.tsx +57 -0
- package/src/docs/pages/AnalysisLineIconPage.tsx +24 -0
- package/src/docs/pages/AvatarPage.tsx +33 -0
- package/src/docs/pages/BadgePage.tsx +27 -0
- package/src/docs/pages/BreadcrumbPage.tsx +38 -0
- package/src/docs/pages/ButtonPage.tsx +142 -0
- package/src/docs/pages/CardPage.tsx +42 -0
- package/src/docs/pages/ChartAreaInteractivePage.tsx +161 -0
- package/src/docs/pages/ChartPage.tsx +50 -0
- package/src/docs/pages/ChatPage.tsx +61 -0
- package/src/docs/pages/CheckboxPage.tsx +25 -0
- package/src/docs/pages/DialogPage.tsx +38 -0
- package/src/docs/pages/DrawerPage.tsx +48 -0
- package/src/docs/pages/DropZonePage.tsx +32 -0
- package/src/docs/pages/DropdownMenuPage.tsx +41 -0
- package/src/docs/pages/FlickeringGridPage.tsx +23 -0
- package/src/docs/pages/FoldablePage.tsx +25 -0
- package/src/docs/pages/ImagePage.tsx +26 -0
- package/src/docs/pages/ImageWithFallbackPage.tsx +34 -0
- package/src/docs/pages/InputPage.tsx +39 -0
- package/src/docs/pages/InteractiveContentPage.tsx +23 -0
- package/src/docs/pages/LabelPage.tsx +21 -0
- package/src/docs/pages/LabelWithIdPage.tsx +21 -0
- package/src/docs/pages/LabeledInputPage.tsx +32 -0
- package/src/docs/pages/LegacyPlatformLinkPage.tsx +23 -0
- package/src/docs/pages/LogoPage.tsx +25 -0
- package/src/docs/pages/MobileAdaptiveSelectorPage.tsx +36 -0
- package/src/docs/pages/NumberControlPage.tsx +25 -0
- package/src/docs/pages/PagePage.tsx +25 -0
- package/src/docs/pages/ProgressPage.tsx +21 -0
- package/src/docs/pages/RegionCoordsPage.tsx +40 -0
- package/src/docs/pages/RenamerPage.tsx +27 -0
- package/src/docs/pages/SelectPage.tsx +40 -0
- package/src/docs/pages/SeparatorPage.tsx +23 -0
- package/src/docs/pages/SheetPage.tsx +40 -0
- package/src/docs/pages/SidebarPage.tsx +53 -0
- package/src/docs/pages/SkeletonPage.tsx +30 -0
- package/src/docs/pages/SliderPage.tsx +26 -0
- package/src/docs/pages/SmartTextTruncatePage.tsx +26 -0
- package/src/docs/pages/SparklinePage.tsx +23 -0
- package/src/docs/pages/SwitchPage.tsx +29 -0
- package/src/docs/pages/TablePage.tsx +45 -0
- package/src/docs/pages/TabsPage.tsx +33 -0
- package/src/docs/pages/TextShimmerPage.tsx +23 -0
- package/src/docs/pages/TextWithDeferTooltipPage.tsx +29 -0
- package/src/docs/pages/TimeRangeControlsPage.tsx +30 -0
- package/src/docs/pages/ToggleGroupPage.tsx +35 -0
- package/src/docs/pages/TogglePage.tsx +24 -0
- package/src/docs/pages/TooltipPage.tsx +35 -0
- package/src/docs/pages/VimeoEmbedPage.tsx +21 -0
- package/src/docs/registry.ts +338 -0
- package/src/hooks/panelWidth.ts +72 -0
- package/src/hooks/useClickOutside.ts +36 -0
- package/src/hooks/useDebounceCallback.ts +18 -0
- package/src/hooks/useDragElem.ts +153 -0
- package/src/hooks/useEvent.ts +73 -0
- package/src/hooks/useIsMobile.ts +21 -0
- package/src/hooks/useIsTouchDevice.ts +43 -0
- package/src/hooks/useQueryParams.ts +60 -0
- package/src/hooks/useShellWidthObserver.ts +25 -0
- package/src/hooks/useThrottledCallback.ts +41 -0
- package/src/index.ts +54 -0
- package/src/lib/cookie-consent/cookie-consent.ts +132 -0
- package/src/lib/cookie.ts +23 -0
- package/src/lib/dashboard-spec/stripJsonDashboardFences.ts +6 -0
- package/src/lib/logger.ts +9 -0
- package/src/lib/theme.styl +23 -0
- package/src/lib/theme.styl.d.ts +2 -0
- package/src/tools/debounce.ts +59 -0
- package/src/tools/env.ts +7 -0
- package/src/types/chat-api.types.ts +5 -0
- package/src/types/forecast-data.ts +8 -0
- package/src/utils/analysisDate.ts +17 -0
- package/src/utils/chartConnectionPoint.ts +292 -0
- package/src/utils/chartRenderQueue.ts +52 -0
- package/src/utils/chatPresetMerge.ts +36 -0
- package/src/utils/datasetApplicationLink.ts +25 -0
- package/src/utils/quantileFormat.ts +46 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
2
|
+
import cn from 'classnames';
|
|
3
|
+
import { displayLabelForBranchKeyFromMessages, humanizeBranchKey } from '../ChatMessage/presetScript.js';
|
|
4
|
+
import { TextShimmer } from '../../TextShimmer/TextShimmer.js';
|
|
5
|
+
import { Scroll } from '@homecode/ui';
|
|
6
|
+
import { X, PaperPlaneRightIcon, ChartLineIcon } from '@phosphor-icons/react';
|
|
7
|
+
import { Button } from '../../Button/Button.js';
|
|
8
|
+
import { PanelResizeHandle } from '../../Sidebar/Sidebar.js';
|
|
9
|
+
import SidebarStem from '../../Sidebar/Sidebar.styl.js';
|
|
10
|
+
import { Chat } from '../Chat.js';
|
|
11
|
+
import S from './ChatChrome.styl.js';
|
|
12
|
+
|
|
13
|
+
function ChatChrome({ showResizeHandle, resizeHandle, onClose, isEmpty, renderPresets, messages, onQuickReply, suppressedQuickReplyKeys, isLoading, scriptContinueLabel, onScriptContinue, renderMessageChart, showBranchActionsRow, showSyntheticBranchButtons, unusedBranchKeys, isScriptComplete, onGenerateDashboard, generatingDashboard, onGenerateDashboardClick, showInlinePresets, isLastMessageFromUser, scrollRef, effectiveScopeId, onPromptSubmit, onChatDeleted, promptPrefill, variant = 'sidebar', footerClassName, emptyState, }) {
|
|
14
|
+
return (jsxs("div", { className: cn(S.panelRoot, S[`variant-${variant}`]), children: [showResizeHandle && resizeHandle ? (jsx(PanelResizeHandle, { edge: "leading", isActive: resizeHandle.isActive, startWidthPx: resizeHandle.startWidthPx, getShellWidth: resizeHandle.getShellWidth, onDragWidth: resizeHandle.onDragWidth, onDragComplete: resizeHandle.onDragComplete, className: cn(SidebarStem.sidebarResizeHandle, S.chatResizeHandle) })) : null, jsx("div", { className: S.panelHeader, children: onClose ? (jsx(Button, { type: "button", variant: "ghost", icon: true, className: S.panelClose, "aria-label": "Close chat", onClick: onClose, children: jsx(X, { className: "size-4" }) })) : null }), jsx("div", { className: S.content, children: jsxs(Chat, { isEmpty: isEmpty, children: [isEmpty ? (jsxs(Fragment, { children: [jsx(Chat.EmptyState, { ...emptyState }), renderPresets('fixed')] })) : (jsx("div", { className: S.scrollWrapper, children: jsxs(Scroll, { y: true, yScrollbarClassName: S.scrollbar, className: S.scroll, innerClassName: S.scrollInner, offset: { y: { before: 56, after: 180 } }, fadeSize: "m", autoHide: true, ref: scrollRef, children: [messages.map((msg, index, arr) => {
|
|
15
|
+
const isLast = index === arr.length - 1;
|
|
16
|
+
return (jsx(Chat.Message, { role: msg.role, text: msg.text, onQuickReply: onQuickReply, suppressedQuickReplyKeys: suppressedQuickReplyKeys, quickReplyDisabled: isLoading, isLastMessage: isLast, scriptContinue: isLast && scriptContinueLabel
|
|
17
|
+
? { label: scriptContinueLabel }
|
|
18
|
+
: undefined, onScriptContinue: isLast && scriptContinueLabel
|
|
19
|
+
? onScriptContinue
|
|
20
|
+
: undefined, renderMessageChart: renderMessageChart }, msg.id));
|
|
21
|
+
}), showBranchActionsRow && (jsxs("div", { className: S.branchRow, children: [showSyntheticBranchButtons
|
|
22
|
+
? unusedBranchKeys.map(key => {
|
|
23
|
+
const label = displayLabelForBranchKeyFromMessages(key, messages) ?? humanizeBranchKey(key);
|
|
24
|
+
return (jsx("span", { className: S.branchBtnWrap, children: jsxs(Button, { type: "button", variant: "outline", size: "sm", disabled: isLoading, onClick: () => onQuickReply(key, label), children: [jsx(PaperPlaneRightIcon, {}), label] }) }, key));
|
|
25
|
+
})
|
|
26
|
+
: null, isScriptComplete &&
|
|
27
|
+
onGenerateDashboard &&
|
|
28
|
+
!generatingDashboard ? (jsxs(Button, { type: "button", variant: "default", size: "lg", disabled: isLoading, onClick: onGenerateDashboardClick, children: [jsx(ChartLineIcon, {}), "Generate Dashboard"] })) : null] })), showInlinePresets && renderPresets('inline'), isLoading && isLastMessageFromUser && (jsx(TextShimmer, { duration: 1, spread: 5, className: S.loader, children: "Thinking..." }))] }) })), jsx("div", { className: cn(S.footer, footerClassName), children: jsx(Chat.Prompt, { id: effectiveScopeId, onSubmit: onPromptSubmit, disabled: isLoading, onChatDeleted: onChatDeleted, prefillMessage: promptPrefill ?? undefined }) })] }) })] }));
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export { ChatChrome };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import styleInject from 'style-inject';
|
|
2
|
+
|
|
3
|
+
var css_248z = "@media (max-width:768px){:root{--page-x-padding:var(--p-6);--page-y-padding:var(--p-6)}}.ChatChrome_panelRoot__XOrBH{display:flex;flex-direction:column;height:100%;min-height:0;overflow:hidden;position:relative}.ChatChrome_panelRoot__XOrBH.ChatChrome_variant-sidebar__1lK8c .ChatChrome_footer__a5Bpp{backdrop-filter:blur(30px);background-color:var(--background-alpha-800);border-top:1px solid var(--border);box-shadow:0 0 20px 16px var(--background)}.ChatChrome_panelRoot__XOrBH.ChatChrome_variant-default__NAFT5 .ChatChrome_footer__a5Bpp{--chat-chrome-footer-variant:default}.ChatChrome_chatResizeHandle__epfiT{background-color:var(--page-color);border-radius:2.5px;height:calc(100vh + 200px);left:0;opacity:0;position:absolute;right:auto;top:-200px;touch-action:none;transition:opacity .15s ease-out;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:5px;z-index:30}.ChatChrome_chatResizeHandle__epfiT:before{left:0;right:auto}.ChatChrome_panelHeader__Hkfit{align-items:center;display:flex;flex-shrink:0;justify-content:flex-end;padding:var(--p-2) var(--p-3);position:absolute;width:100%;z-index:100}.ChatChrome_panelClose__DbKxz{flex-shrink:0}.ChatChrome_content__5qFEi{display:flex;flex:1;flex-direction:column;min-height:0;position:relative}.ChatChrome_scrollWrapper__m4HMu{flex:1;min-height:0;position:relative}.ChatChrome_scroll__oCxoJ{align-items:flex-end;height:100%;max-height:100%;max-width:100%;padding-bottom:var(--p-2);position:absolute;width:100%;z-index:3}.ChatChrome_scrollbar__Hu0aG{right:0!important}.ChatChrome_scrollInner__K9hIy{padding-top:var(--p-10)}.ChatChrome_scrollInner__K9hIy:after{content:\"\";display:block;height:170px}.ChatChrome_footer__a5Bpp{bottom:0;display:flex;flex-direction:column;position:absolute;width:100%;z-index:50}.ChatChrome_loader__9-lnf{color:var(--muted-foreground);margin:var(--p-2) var(--p-6) var(--p-10)}.ChatChrome_branchRow__NMDNv{display:flex;flex-wrap:wrap;gap:8px;margin-top:var(--p-6);padding:0 var(--p-6);width:100%}.ChatChrome_branchBtnWrap__aOSVP{display:inline-flex;vertical-align:middle}";
|
|
4
|
+
var S = {"panelRoot":"ChatChrome_panelRoot__XOrBH","variant-sidebar":"ChatChrome_variant-sidebar__1lK8c","footer":"ChatChrome_footer__a5Bpp","variant-default":"ChatChrome_variant-default__NAFT5","chatResizeHandle":"ChatChrome_chatResizeHandle__epfiT","panelHeader":"ChatChrome_panelHeader__Hkfit","panelClose":"ChatChrome_panelClose__DbKxz","content":"ChatChrome_content__5qFEi","scrollWrapper":"ChatChrome_scrollWrapper__m4HMu","scroll":"ChatChrome_scroll__oCxoJ","scrollbar":"ChatChrome_scrollbar__Hu0aG","scrollInner":"ChatChrome_scrollInner__K9hIy","loader":"ChatChrome_loader__9-lnf","branchRow":"ChatChrome_branchRow__NMDNv","branchBtnWrap":"ChatChrome_branchBtnWrap__aOSVP"};
|
|
5
|
+
styleInject(css_248z);
|
|
6
|
+
|
|
7
|
+
export { S as default };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import S from './ChatEmptyState.styl.js';
|
|
3
|
+
|
|
4
|
+
function ChatEmptyState({ icon, title, description, }) {
|
|
5
|
+
return (jsxs("div", { className: S.root, children: [icon && jsx("div", { className: S.icon, children: icon }), title && jsx("h2", { children: title }), description && jsx("p", { children: description })] }));
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export { ChatEmptyState };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import styleInject from 'style-inject';
|
|
2
|
+
|
|
3
|
+
var css_248z = ".ChatEmptyState_root__j1n-C{align-items:center;display:flex;flex:1;flex-direction:column;gap:var(--p-2);justify-content:center;padding:var(--p-6);text-align:center;text-size:var(--text-sm);color:var(--text-secondary)}.ChatEmptyState_icon__YSDgv{background:url(sparkles.svg) no-repeat 50%;height:26px;margin-bottom:var(--p-4);width:26px}";
|
|
4
|
+
var S = {"root":"ChatEmptyState_root__j1n-C","icon":"ChatEmptyState_icon__YSDgv"};
|
|
5
|
+
styleInject(css_248z);
|
|
6
|
+
|
|
7
|
+
export { S as default };
|
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
|
+
import logger from '../../../../lib/logger.js';
|
|
3
|
+
import S from './ChatMessage.styl.js';
|
|
4
|
+
|
|
5
|
+
const injectHeaders = (content) => {
|
|
6
|
+
// Match #, ##, ###, or #### headers at start of line
|
|
7
|
+
const regex = /(^|\n)(#{1,4})\s+(.+?)(?=\n|$)/m;
|
|
8
|
+
const matches = content.match(regex);
|
|
9
|
+
if (!matches)
|
|
10
|
+
return null;
|
|
11
|
+
const level = matches[2].length;
|
|
12
|
+
const headerText = matches[3].replace(/^\*+|\*+$/g, '');
|
|
13
|
+
const Tag = level === 1 ? 'h1' : level === 2 ? 'h2' : level === 3 ? 'h3' : 'h4';
|
|
14
|
+
// Calculate the actual match position and length
|
|
15
|
+
// matches[0] includes the leading \n if present, but we want to replace from the # position
|
|
16
|
+
const hasLeadingNewline = matches[1] === '\n';
|
|
17
|
+
const startIndex = matches.index + (hasLeadingNewline ? 1 : 0);
|
|
18
|
+
// Length is: # markers + space + header text (excluding leading newline)
|
|
19
|
+
const length = matches[2].length + 1 + matches[3].length;
|
|
20
|
+
return {
|
|
21
|
+
elem: jsx(Tag, { children: headerText }),
|
|
22
|
+
index: startIndex,
|
|
23
|
+
length: length,
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
/** Match sits inside list/table HTML (those blocks use dangerouslySetInnerHTML elsewhere). */
|
|
27
|
+
const isInsideHtmlListOrTable = (content, matchStartIndex) => {
|
|
28
|
+
const before = content.substring(0, matchStartIndex);
|
|
29
|
+
const lastOpen = Math.max(before.lastIndexOf('<ul'), before.lastIndexOf('<ol'), before.lastIndexOf('<table'));
|
|
30
|
+
const lastClose = Math.max(before.lastIndexOf('</ul>'), before.lastIndexOf('</ol>'), before.lastIndexOf('</table>'));
|
|
31
|
+
return lastOpen > lastClose;
|
|
32
|
+
};
|
|
33
|
+
const injectHTMLTags = (content) => {
|
|
34
|
+
// Match <strong> or <b> tags (with optional whitespace, handles nested tags)
|
|
35
|
+
const regex = /<(strong|b)\s*>([\s\S]*?)<\/\1\s*>/i;
|
|
36
|
+
const matches = content.match(regex);
|
|
37
|
+
if (!matches)
|
|
38
|
+
return null;
|
|
39
|
+
if (isInsideHtmlListOrTable(content, matches.index)) {
|
|
40
|
+
return null;
|
|
41
|
+
}
|
|
42
|
+
return {
|
|
43
|
+
elem: jsx("strong", { children: matches[2] }),
|
|
44
|
+
index: matches.index,
|
|
45
|
+
length: matches[0].length,
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
const injectBold = (content) => {
|
|
49
|
+
const regex = /\*\*([^*]+?)\*\*/;
|
|
50
|
+
const matches = content.match(regex);
|
|
51
|
+
if (!matches)
|
|
52
|
+
return null;
|
|
53
|
+
return {
|
|
54
|
+
elem: jsx("strong", { children: matches[1] }),
|
|
55
|
+
index: matches.index,
|
|
56
|
+
length: matches[0].length,
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
const injectBullet = (content) => {
|
|
60
|
+
// Match bullet points: * or - followed by space
|
|
61
|
+
// Match at start of string/line or after whitespace/colon (for nested bullets)
|
|
62
|
+
// Then check manually that it's not part of **
|
|
63
|
+
const regex = /(\n|^|[\s:])(\*|\-)\s/;
|
|
64
|
+
const matches = content.match(regex);
|
|
65
|
+
if (!matches)
|
|
66
|
+
return null;
|
|
67
|
+
// Skip if this is part of ** (double asterisk for bold)
|
|
68
|
+
const bulletIndex = matches.index + matches[1].length;
|
|
69
|
+
if (bulletIndex > 0 && content[bulletIndex - 1] === '*') {
|
|
70
|
+
return null;
|
|
71
|
+
}
|
|
72
|
+
const hasLeadingNewline = matches[1] === '\n';
|
|
73
|
+
return {
|
|
74
|
+
elem: (jsxs(Fragment, { children: [hasLeadingNewline && jsx("br", {}), jsx("span", { className: S.bullet })] })),
|
|
75
|
+
index: hasLeadingNewline ? matches.index : bulletIndex,
|
|
76
|
+
length: (hasLeadingNewline ? 1 : 0) + matches[2].length + 1,
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
const injectNewlines = (content) => {
|
|
80
|
+
const regex = /\n/;
|
|
81
|
+
const matches = content.match(regex);
|
|
82
|
+
if (!matches)
|
|
83
|
+
return null;
|
|
84
|
+
return {
|
|
85
|
+
elem: jsx("br", {}),
|
|
86
|
+
index: matches.index,
|
|
87
|
+
length: matches[0].length,
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
const formatTableCellContent = (content) => {
|
|
91
|
+
// Process markdown formatting in table cells
|
|
92
|
+
// Currently supports bold (**text**)
|
|
93
|
+
let result = content;
|
|
94
|
+
// Process bold (**text**)
|
|
95
|
+
result = result.replace(/\*\*(.*?)\*\*/g, '<strong>$1</strong>');
|
|
96
|
+
return result;
|
|
97
|
+
};
|
|
98
|
+
const convertMarkdownTableToHTML = (text) => {
|
|
99
|
+
// Find markdown tables by looking for header row followed by separator row
|
|
100
|
+
// Then collect all subsequent rows that start with |
|
|
101
|
+
const lines = text.split('\n');
|
|
102
|
+
const replacements = [];
|
|
103
|
+
// Track character positions as we iterate
|
|
104
|
+
let charPos = 0;
|
|
105
|
+
let i = 0;
|
|
106
|
+
while (i < lines.length) {
|
|
107
|
+
const line = lines[i];
|
|
108
|
+
const lineTrimmed = line.trim();
|
|
109
|
+
const lineStartPos = charPos;
|
|
110
|
+
// Check if this line looks like a table header (starts with |)
|
|
111
|
+
if (lineTrimmed.startsWith('|') && i + 1 < lines.length) {
|
|
112
|
+
const nextLineTrimmed = lines[i + 1].trim();
|
|
113
|
+
// Check if next line is a separator row (contains : and -)
|
|
114
|
+
if (nextLineTrimmed.startsWith('|') && /[:|\-]/.test(nextLineTrimmed)) {
|
|
115
|
+
// Found a table! Collect all rows
|
|
116
|
+
const tableRows = [];
|
|
117
|
+
let rowIndex = i;
|
|
118
|
+
let tableStartPos = lineStartPos;
|
|
119
|
+
// Collect header and separator
|
|
120
|
+
tableRows.push(lineTrimmed);
|
|
121
|
+
tableRows.push(nextLineTrimmed);
|
|
122
|
+
rowIndex = i + 2;
|
|
123
|
+
charPos += line.length + 1; // +1 for newline
|
|
124
|
+
charPos += lines[i + 1].length + 1;
|
|
125
|
+
// Collect all data rows until we hit a blank line or non-table line
|
|
126
|
+
while (rowIndex < lines.length) {
|
|
127
|
+
const rowLine = lines[rowIndex];
|
|
128
|
+
const rowLineTrimmed = rowLine.trim();
|
|
129
|
+
if (rowLineTrimmed.startsWith('|')) {
|
|
130
|
+
tableRows.push(rowLineTrimmed);
|
|
131
|
+
charPos += rowLine.length + 1;
|
|
132
|
+
rowIndex++;
|
|
133
|
+
}
|
|
134
|
+
else if (rowLineTrimmed.length === 0) {
|
|
135
|
+
// Blank line ends the table
|
|
136
|
+
charPos += rowLine.length + 1;
|
|
137
|
+
break;
|
|
138
|
+
}
|
|
139
|
+
else {
|
|
140
|
+
// Non-table line ends the table
|
|
141
|
+
break;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
const tableEndPos = charPos;
|
|
145
|
+
// Parse the table
|
|
146
|
+
if (tableRows.length >= 2) {
|
|
147
|
+
const headerRow = tableRows[0];
|
|
148
|
+
const separatorRow = tableRows[1];
|
|
149
|
+
const dataRows = tableRows.slice(2);
|
|
150
|
+
// Parse header cells
|
|
151
|
+
const headerCells = headerRow
|
|
152
|
+
.split('|')
|
|
153
|
+
.map(cell => cell.trim())
|
|
154
|
+
.filter(cell => cell.length > 0);
|
|
155
|
+
// Parse alignment from separator row
|
|
156
|
+
const alignments = separatorRow
|
|
157
|
+
.split('|')
|
|
158
|
+
.map(cell => cell.trim())
|
|
159
|
+
.filter(cell => cell.length > 0)
|
|
160
|
+
.map(cell => {
|
|
161
|
+
const leftAlign = cell.startsWith(':');
|
|
162
|
+
const rightAlign = cell.endsWith(':');
|
|
163
|
+
if (leftAlign && rightAlign)
|
|
164
|
+
return 'center';
|
|
165
|
+
if (rightAlign)
|
|
166
|
+
return 'right';
|
|
167
|
+
return 'left';
|
|
168
|
+
});
|
|
169
|
+
// Build HTML table
|
|
170
|
+
let htmlTable = '<table>';
|
|
171
|
+
// Header row
|
|
172
|
+
htmlTable += '<thead><tr>';
|
|
173
|
+
headerCells.forEach((cell, idx) => {
|
|
174
|
+
const align = alignments[idx] || 'left';
|
|
175
|
+
const formattedCell = formatTableCellContent(cell);
|
|
176
|
+
htmlTable += `<th style="text-align: ${align}">${formattedCell}</th>`;
|
|
177
|
+
});
|
|
178
|
+
htmlTable += '</tr></thead>';
|
|
179
|
+
// Data rows
|
|
180
|
+
if (dataRows.length > 0) {
|
|
181
|
+
htmlTable += '<tbody>';
|
|
182
|
+
dataRows.forEach(row => {
|
|
183
|
+
const cells = row
|
|
184
|
+
.split('|')
|
|
185
|
+
.map(cell => cell.trim())
|
|
186
|
+
.filter(cell => cell.length > 0);
|
|
187
|
+
htmlTable += '<tr>';
|
|
188
|
+
cells.forEach((cell, idx) => {
|
|
189
|
+
const align = alignments[idx] || 'left';
|
|
190
|
+
const formattedCell = formatTableCellContent(cell);
|
|
191
|
+
htmlTable += `<td style="text-align: ${align}">${formattedCell}</td>`;
|
|
192
|
+
});
|
|
193
|
+
htmlTable += '</tr>';
|
|
194
|
+
});
|
|
195
|
+
htmlTable += '</tbody>';
|
|
196
|
+
}
|
|
197
|
+
htmlTable += '</table>';
|
|
198
|
+
replacements.push({
|
|
199
|
+
start: tableStartPos,
|
|
200
|
+
end: tableEndPos,
|
|
201
|
+
replacement: htmlTable,
|
|
202
|
+
});
|
|
203
|
+
i = rowIndex;
|
|
204
|
+
continue;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
charPos += line.length + 1; // +1 for newline
|
|
209
|
+
i++;
|
|
210
|
+
}
|
|
211
|
+
// Apply replacements in reverse order
|
|
212
|
+
let result = text;
|
|
213
|
+
for (let i = replacements.length - 1; i >= 0; i--) {
|
|
214
|
+
const { start, end, replacement } = replacements[i];
|
|
215
|
+
result = result.substring(0, start) + replacement + result.substring(end);
|
|
216
|
+
}
|
|
217
|
+
return result;
|
|
218
|
+
};
|
|
219
|
+
/** http(s), mailto, or same-app path (single leading slash). */
|
|
220
|
+
const isAllowedHref = (href) => {
|
|
221
|
+
const h = href.trim();
|
|
222
|
+
if (!h)
|
|
223
|
+
return false;
|
|
224
|
+
if (/^https?:\/\//i.test(h))
|
|
225
|
+
return true;
|
|
226
|
+
if (/^mailto:/i.test(h))
|
|
227
|
+
return true;
|
|
228
|
+
if (h.startsWith('/') && !h.startsWith('//'))
|
|
229
|
+
return true;
|
|
230
|
+
return false;
|
|
231
|
+
};
|
|
232
|
+
const runFormattingPipeline = (text, injectors) => {
|
|
233
|
+
let result = [text];
|
|
234
|
+
try {
|
|
235
|
+
injectors.forEach(fn => {
|
|
236
|
+
let hasMore = true;
|
|
237
|
+
while (hasMore) {
|
|
238
|
+
hasMore = false;
|
|
239
|
+
for (let i = 0; i < result.length; i++) {
|
|
240
|
+
const item = result[i];
|
|
241
|
+
if (typeof item === 'string') {
|
|
242
|
+
const res = fn(item);
|
|
243
|
+
if (!res)
|
|
244
|
+
continue;
|
|
245
|
+
const { elem, index, length } = res;
|
|
246
|
+
if (index >= 0) {
|
|
247
|
+
const before = item.substring(0, index);
|
|
248
|
+
const after = item.substring(index + length);
|
|
249
|
+
result.splice(i, 1, before, elem, after);
|
|
250
|
+
hasMore = true;
|
|
251
|
+
break;
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
});
|
|
257
|
+
}
|
|
258
|
+
catch (e) {
|
|
259
|
+
logger.error('Formatting error:', e);
|
|
260
|
+
}
|
|
261
|
+
return result;
|
|
262
|
+
};
|
|
263
|
+
const injectAnchor = (content) => {
|
|
264
|
+
const regex = /<a\s+([^>]+)>([\s\S]*?)<\/a\s*>/i;
|
|
265
|
+
const matches = content.match(regex);
|
|
266
|
+
if (!matches)
|
|
267
|
+
return null;
|
|
268
|
+
if (isInsideHtmlListOrTable(content, matches.index)) {
|
|
269
|
+
return null;
|
|
270
|
+
}
|
|
271
|
+
const attrs = matches[1];
|
|
272
|
+
const inner = matches[2];
|
|
273
|
+
const hrefMatch = attrs.match(/href\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s>]+))/i);
|
|
274
|
+
const href = hrefMatch
|
|
275
|
+
? (hrefMatch[1] ?? hrefMatch[2] ?? hrefMatch[3] ?? '').trim()
|
|
276
|
+
: '';
|
|
277
|
+
const targetMatch = attrs.match(/target\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s>]+))/i);
|
|
278
|
+
const targetRaw = targetMatch
|
|
279
|
+
? (targetMatch[1] ?? targetMatch[2] ?? targetMatch[3] ?? '').trim()
|
|
280
|
+
: '';
|
|
281
|
+
if (!href || !isAllowedHref(href)) {
|
|
282
|
+
return null;
|
|
283
|
+
}
|
|
284
|
+
const opensNewTab = targetRaw.toLowerCase() === '_blank';
|
|
285
|
+
const target = opensNewTab ? '_blank' : targetRaw || undefined;
|
|
286
|
+
const rel = target === '_blank' ? 'noopener noreferrer' : undefined;
|
|
287
|
+
return {
|
|
288
|
+
elem: (jsx("a", { href: href, target: target, rel: rel, children: runFormattingPipeline(inner, [
|
|
289
|
+
injectHTMLTags,
|
|
290
|
+
injectBold,
|
|
291
|
+
injectNewlines,
|
|
292
|
+
]) })),
|
|
293
|
+
index: matches.index,
|
|
294
|
+
length: matches[0].length,
|
|
295
|
+
};
|
|
296
|
+
};
|
|
297
|
+
const applyFormatting = (text) => runFormattingPipeline(text, [
|
|
298
|
+
injectHeaders,
|
|
299
|
+
injectAnchor,
|
|
300
|
+
injectHTMLTags,
|
|
301
|
+
injectBullet,
|
|
302
|
+
injectBold,
|
|
303
|
+
injectNewlines,
|
|
304
|
+
]);
|
|
305
|
+
const applyFormattingInline = (text) => runFormattingPipeline(text, [
|
|
306
|
+
injectAnchor,
|
|
307
|
+
injectHTMLTags,
|
|
308
|
+
injectBold,
|
|
309
|
+
injectNewlines,
|
|
310
|
+
]);
|
|
311
|
+
|
|
312
|
+
export { applyFormatting, applyFormattingInline, convertMarkdownTableToHTML, injectAnchor, injectBold, injectBullet, injectHeaders, injectNewlines };
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import { useState, useMemo } from 'react';
|
|
3
|
+
import { Button } from '../../Button/Button.js';
|
|
4
|
+
import { InteractiveContent } from '../../InteractiveContent/InteractiveContent.js';
|
|
5
|
+
import { parseDatasetAppToken } from '../../../../utils/datasetApplicationLink.js';
|
|
6
|
+
import { Scroll } from '@homecode/ui';
|
|
7
|
+
import { PaperPlaneRightIcon } from '@phosphor-icons/react';
|
|
8
|
+
import { Presentation } from 'lucide-react';
|
|
9
|
+
import { convertMarkdownTableToHTML } from './AgentMessageContent.helpers.js';
|
|
10
|
+
import { ChatDatasetApplicationLink } from './ChatDatasetApplicationLink.js';
|
|
11
|
+
import S from './ChatMessage.styl.js';
|
|
12
|
+
import { DocIcon } from './icons/DocIcon.js';
|
|
13
|
+
import { XlsIcon } from './icons/XlsIcon.js';
|
|
14
|
+
|
|
15
|
+
function AgentMessageContent({ text, onQuickReply, suppressedQuickReplyKeys, quickReplyDisabled, isLastMessage = true, scriptContinue, onScriptContinue, renderMessageChart, }) {
|
|
16
|
+
const [showRaw, setShowRaw] = useState(false);
|
|
17
|
+
const parts = useMemo(() => {
|
|
18
|
+
// Convert markdown tables to HTML first
|
|
19
|
+
const textWithHTMLTables = convertMarkdownTableToHTML(text);
|
|
20
|
+
const result = [];
|
|
21
|
+
let lastIndex = 0;
|
|
22
|
+
let previousWasDownload = false;
|
|
23
|
+
const combinedRegex = /(?:<table[^>]*>[\s\S]*?<\/table>|<ul[^>]*>[\s\S]*?<\/ul>|<ol[^>]*>[\s\S]*?<\/ol>|\[CHART\]|\[DOWNLOAD_BUTTONS\]|\[DOWNLOAD:([^\]]+)\]|\[datasetId:\d+(?:;analysisId:\d+)?\]|\[(?!CHART\]|DOWNLOAD_BUTTONS\]|DOWNLOAD:)([^\]]+)\](?!\())/gi;
|
|
24
|
+
let match;
|
|
25
|
+
while ((match = combinedRegex.exec(textWithHTMLTables)) !== null) {
|
|
26
|
+
// Add non-match part before this match
|
|
27
|
+
if (match.index > lastIndex) {
|
|
28
|
+
let nonMatchPart = textWithHTMLTables.slice(lastIndex, match.index);
|
|
29
|
+
if (match[0].startsWith('<table') && /\n\|\s*$/.test(nonMatchPart)) {
|
|
30
|
+
nonMatchPart = nonMatchPart.replace(/\n\|\s*$/, '\n');
|
|
31
|
+
}
|
|
32
|
+
const currentIsDownload = match[0].startsWith('[DOWNLOAD:');
|
|
33
|
+
// Skip formatting for very short text between download markers (like "-")
|
|
34
|
+
// to avoid unwanted line breaks
|
|
35
|
+
if (previousWasDownload &&
|
|
36
|
+
currentIsDownload &&
|
|
37
|
+
nonMatchPart.trim().length <= 5) ;
|
|
38
|
+
else {
|
|
39
|
+
result.push(jsx(InteractiveContent, { text: nonMatchPart }));
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
// Check if it's a table, list, [CHART], [DOWNLOAD_BUTTONS], or [DOWNLOAD:filename]
|
|
43
|
+
if (match[0].startsWith('<table')) {
|
|
44
|
+
// Add table wrapped in Scroll
|
|
45
|
+
result.push(jsx(Scroll, { x: true, size: "s", className: S.scrollHorizontal, children: jsx("div", { dangerouslySetInnerHTML: { __html: match[0] } }) }, `table-${match.index}`));
|
|
46
|
+
}
|
|
47
|
+
else if (match[0].startsWith('<ul') || match[0].startsWith('<ol')) {
|
|
48
|
+
// Add HTML list
|
|
49
|
+
result.push(jsx("div", { dangerouslySetInnerHTML: { __html: match[0] } }, `list-${match.index}`));
|
|
50
|
+
}
|
|
51
|
+
else if (match[0] === '[CHART]') {
|
|
52
|
+
const chart = renderMessageChart?.();
|
|
53
|
+
if (chart != null) {
|
|
54
|
+
result.push(jsx("span", { children: chart }, `chart-${match.index}`));
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
else if (match[0].startsWith('[DOWNLOAD:')) {
|
|
58
|
+
// Parse filename from [DOWNLOAD:filename] format
|
|
59
|
+
// Extract filename from the full match string or use match[2] if available
|
|
60
|
+
const fullMatch = match[0];
|
|
61
|
+
const filenameMatch = fullMatch.match(/\[DOWNLOAD:\s*([^\]]+)\]/i);
|
|
62
|
+
const filename = (filenameMatch?.[1] || match[1] || '').trim();
|
|
63
|
+
const extension = filename.split('.').pop()?.toLowerCase() || '';
|
|
64
|
+
const filenameWithoutExt = filename.replace(/\.[^.]+$/, '');
|
|
65
|
+
// Determine file type and icon
|
|
66
|
+
const isDoc = extension === 'doc' || extension === 'docx';
|
|
67
|
+
const isXls = extension === 'xls' || extension === 'xlsx';
|
|
68
|
+
const isPpt = extension === 'ppt' || extension === 'pptx';
|
|
69
|
+
// Only render if it's a recognized file type
|
|
70
|
+
if (isDoc || isXls || isPpt) {
|
|
71
|
+
let Icon, fileTypeLabel;
|
|
72
|
+
if (isDoc) {
|
|
73
|
+
Icon = DocIcon;
|
|
74
|
+
fileTypeLabel = 'DOC';
|
|
75
|
+
}
|
|
76
|
+
else if (isXls) {
|
|
77
|
+
Icon = XlsIcon;
|
|
78
|
+
fileTypeLabel = 'XLS';
|
|
79
|
+
}
|
|
80
|
+
else if (isPpt) {
|
|
81
|
+
Icon = Presentation;
|
|
82
|
+
fileTypeLabel = 'PPT';
|
|
83
|
+
}
|
|
84
|
+
result.push(jsxs("div", { className: S.downloadCard, children: [jsx("div", { className: S.downloadCardIcon, children: jsx(Icon, { size: 32 }) }), jsxs("div", { className: S.downloadCardContent, children: [jsx("div", { className: S.downloadCardTitle, children: filenameWithoutExt }), jsxs("div", { className: S.downloadCardSubtitle, children: ["Download .", fileTypeLabel, " file"] })] })] }, `download-${match.index}`));
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
else if (match[0].startsWith('[datasetId:')) {
|
|
88
|
+
const parsed = parseDatasetAppToken(match[0]);
|
|
89
|
+
if (parsed) {
|
|
90
|
+
result.push(jsx(ChatDatasetApplicationLink, { datasetId: parsed.datasetId, analysisId: parsed.analysisId }, `dataset-app-${match.index}`));
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
else if (isLastMessage && match[2] != null && match[2] !== '') {
|
|
94
|
+
const inner = match[2].trim();
|
|
95
|
+
const pipeIdx = inner.indexOf('|');
|
|
96
|
+
const displayLabel = pipeIdx >= 0 ? inner.slice(0, pipeIdx).trim() : inner;
|
|
97
|
+
const branchKey = pipeIdx >= 0 ? inner.slice(pipeIdx + 1).trim() : inner;
|
|
98
|
+
if (branchKey && displayLabel) {
|
|
99
|
+
const suppressed = suppressedQuickReplyKeys?.has(branchKey);
|
|
100
|
+
if (!suppressed && onQuickReply) {
|
|
101
|
+
result.push(jsx("span", { className: S.quickReplyWrap, children: jsxs(Button, { type: "button", variant: "outline", size: "sm", disabled: quickReplyDisabled, onClick: () => onQuickReply(branchKey, displayLabel), children: [jsx(PaperPlaneRightIcon, {}), displayLabel] }) }, `quick-${match.index}`));
|
|
102
|
+
}
|
|
103
|
+
else if (!suppressed) {
|
|
104
|
+
result.push(jsx("span", { children: displayLabel }, `quick-${match.index}`));
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
// Track if current match is a download marker for next iteration
|
|
109
|
+
previousWasDownload = match[0].startsWith('[DOWNLOAD:');
|
|
110
|
+
lastIndex = match.index + match[0].length;
|
|
111
|
+
}
|
|
112
|
+
// Add remaining non-match part
|
|
113
|
+
if (lastIndex < textWithHTMLTables.length) {
|
|
114
|
+
const nonMatchPart = textWithHTMLTables.slice(lastIndex);
|
|
115
|
+
result.push(jsx("div", { children: jsx(InteractiveContent, { text: nonMatchPart }) }, `text-${lastIndex}`));
|
|
116
|
+
}
|
|
117
|
+
return result;
|
|
118
|
+
}, [
|
|
119
|
+
text,
|
|
120
|
+
onQuickReply,
|
|
121
|
+
suppressedQuickReplyKeys,
|
|
122
|
+
quickReplyDisabled,
|
|
123
|
+
isLastMessage,
|
|
124
|
+
renderMessageChart,
|
|
125
|
+
]);
|
|
126
|
+
return (jsxs("div", { className: S.text, children: [showRaw ? text : parts, !showRaw &&
|
|
127
|
+
isLastMessage &&
|
|
128
|
+
scriptContinue &&
|
|
129
|
+
onScriptContinue &&
|
|
130
|
+
scriptContinue.label && (jsx("span", { className: S.quickReplyWrap, children: jsxs(Button, { type: "button", variant: "outline", size: "sm", disabled: quickReplyDisabled, onClick: () => onScriptContinue(), children: [jsx(PaperPlaneRightIcon, {}), scriptContinue.label] }) }))] }));
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export { AgentMessageContent };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { useSearchParams, Link } from 'react-router-dom';
|
|
3
|
+
import { buildDatasetApplicationPath } from '../../../../utils/datasetApplicationLink.js';
|
|
4
|
+
import { LayoutDashboard } from 'lucide-react';
|
|
5
|
+
import S from './ChatMessage.styl.js';
|
|
6
|
+
|
|
7
|
+
function ChatDatasetApplicationLink({ datasetId, analysisId, label = 'Open application', }) {
|
|
8
|
+
const url = buildDatasetApplicationPath(datasetId, analysisId);
|
|
9
|
+
const [searchParams, setSearchParams] = useSearchParams();
|
|
10
|
+
const handleClick = (e) => {
|
|
11
|
+
if (location.pathname !== '/datasets')
|
|
12
|
+
return;
|
|
13
|
+
e.preventDefault();
|
|
14
|
+
const params = new URLSearchParams(searchParams);
|
|
15
|
+
params.set('id', datasetId.toString());
|
|
16
|
+
if (analysisId)
|
|
17
|
+
params.set('analysisId', analysisId.toString());
|
|
18
|
+
setSearchParams(params);
|
|
19
|
+
};
|
|
20
|
+
return (jsxs(Link, { className: S.datasetAppLink, to: url, onClickCapture: handleClick, children: [jsx(LayoutDashboard, { size: 16, "aria-hidden": true }), jsx("span", { className: S.datasetAppLinkLabel, children: label })] }));
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export { ChatDatasetApplicationLink };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import cn from 'classnames';
|
|
3
|
+
import { TextShimmer } from '../../TextShimmer/TextShimmer.js';
|
|
4
|
+
import { MessageRole, GENERATING_DASHBOARD_SYSTEM_TEXT } from '../Chat.types.js';
|
|
5
|
+
import { AgentMessageContent } from './AgentMessageContent.js';
|
|
6
|
+
import S from './ChatMessage.styl.js';
|
|
7
|
+
|
|
8
|
+
function ChatMessage({ role, text, onQuickReply, suppressedQuickReplyKeys, quickReplyDisabled, isLastMessage = true, scriptContinue, onScriptContinue, renderMessageChart, }) {
|
|
9
|
+
const isAssistant = role === MessageRole.ASSISTANT;
|
|
10
|
+
const isSystem = role === MessageRole.SYSTEM;
|
|
11
|
+
return (jsx("div", { className: cn(S.root, S[`role-${role}`]), children: isSystem ? (jsx("div", { className: S.text, children: text === GENERATING_DASHBOARD_SYSTEM_TEXT ? (jsx(TextShimmer, { as: "span", children: text })) : (text) })) : isAssistant ? (jsx(AgentMessageContent, { text: text, onQuickReply: onQuickReply, suppressedQuickReplyKeys: suppressedQuickReplyKeys, quickReplyDisabled: quickReplyDisabled, isLastMessage: isLastMessage, scriptContinue: scriptContinue, onScriptContinue: onScriptContinue, renderMessageChart: renderMessageChart })) : (jsx("div", { className: S.text, children: text })) }));
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export { ChatMessage };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import styleInject from 'style-inject';
|
|
2
|
+
|
|
3
|
+
var css_248z = ".ChatMessage_root__6rnsF{background:var(--bg-secondary);display:flex;flex-direction:column;gap:var(--p-1);padding:var(--p-6)}.ChatMessage_text__Y1XNR{color:var(--text-secondary);font-size:var(--text-sm);max-width:100%;-webkit-user-select:text;-moz-user-select:text;user-select:text;width:-moz-fit-content;width:fit-content}.ChatMessage_role-user__u4JPV{align-items:flex-end}.ChatMessage_role-user__u4JPV .ChatMessage_text__Y1XNR{background-color:var(--sb-slate-100);border-radius:var(--p-4);border-bottom-right-radius:0;padding:var(--p-3) var(--p-4);white-space:pre-wrap}.dark .ChatMessage_role-user__u4JPV .ChatMessage_text__Y1XNR{background-color:var(--sb-gray-800)}.ChatMessage_role-system__g13OP{align-items:center}.ChatMessage_role-system__g13OP .ChatMessage_text__Y1XNR{color:var(--muted-foreground);font-size:var(--text-xs);width:100%}.ChatMessage_role-assistant__wketE .ChatMessage_text__Y1XNR{width:100%}.ChatMessage_role-assistant__wketE h3{line-height:2.4}.ChatMessage_role-assistant__wketE h4{font-size:1.1em;font-weight:600;line-height:2.2}.ChatMessage_role-assistant__wketE .ChatMessage_bullet__6vAhq{display:inline-block;margin-left:4px;margin-right:6px}.ChatMessage_role-assistant__wketE .ChatMessage_bullet__6vAhq:before{color:var(--text-secondary);content:\"•\";display:inline-block}.ChatMessage_role-assistant__wketE .ChatMessage_scrollHorizontal__Rms9n{max-width:100%}.ChatMessage_role-assistant__wketE table{border:1px solid var(--border);border-collapse:collapse;border-radius:var(--p-2);border-spacing:0;margin:var(--p-4) 0;overflow:hidden}.ChatMessage_role-assistant__wketE table td,.ChatMessage_role-assistant__wketE table th{border:1px solid var(--border);min-width:100px;padding:var(--p-1)}.ChatMessage_role-assistant__wketE table th{text-align:left}.ChatMessage_role-assistant__wketE ol,.ChatMessage_role-assistant__wketE ul{padding-left:var(--p-4)}.ChatMessage_role-assistant__wketE ul{list-style-type:disc}.ChatMessage_role-assistant__wketE ol{list-style-type:decimal}.ChatMessage_role-assistant__wketE .ChatMessage_datasetAppLink__Pxy-T{align-items:center;border:1px dashed var(--sb-slate-300);border-radius:8px;color:var(--foreground);display:inline-flex;font-size:var(--text-xs);gap:6px;margin:1px;max-width:100%;padding:2px 6px 2px 4px;text-decoration:none;vertical-align:middle}.ChatMessage_role-assistant__wketE .ChatMessage_datasetAppLink__Pxy-T:hover{background-color:var(--sb-slate-50);border-color:var(--sb-slate-400);border-style:solid}.dark .ChatMessage_role-assistant__wketE .ChatMessage_datasetAppLink__Pxy-T{border-color:var(--sb-gray-600)}.dark .ChatMessage_role-assistant__wketE .ChatMessage_datasetAppLink__Pxy-T:hover{background-color:var(--sb-gray-900)}.ChatMessage_role-assistant__wketE .ChatMessage_datasetAppLinkLabel__PMU7e{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ChatMessage_role-assistant__wketE .ChatMessage_quickReplyWrap__1UFyD{display:inline-block;margin:var(--p-1) var(--p-1) var(--p-1) 0;vertical-align:middle}.ChatMessage_role-assistant__wketE .ChatMessage_downloadButtons__RygM-{display:flex;gap:var(--p-2);margin-top:var(--p-4)}.ChatMessage_role-assistant__wketE .ChatMessage_downloadCard__NsNRa{align-items:center;background-color:var(--background);border-radius:var(--p-3);box-shadow:0 0 0 1px var(--border);cursor:pointer;display:flex;gap:var(--p-4);margin-top:var(--p-3);padding:var(--p-3);padding-right:var(--p-4);transition:all .15s;width:-moz-fit-content;width:fit-content}.ChatMessage_role-assistant__wketE .ChatMessage_downloadCard__NsNRa:hover{background-color:var(--sb-gray-50);border-color:var(--border)}.dark .ChatMessage_role-assistant__wketE .ChatMessage_downloadCard__NsNRa{background-color:var(--sb-gray-900);border-color:var(--border)}.dark .ChatMessage_role-assistant__wketE .ChatMessage_downloadCard__NsNRa:hover{background-color:var(--sb-gray-800)}.ChatMessage_role-assistant__wketE .ChatMessage_downloadCardIcon__jkxDJ{align-items:center;border-radius:var(--p-2);display:flex;flex-shrink:0;height:32px;justify-content:center;width:32px}.ChatMessage_role-assistant__wketE .ChatMessage_downloadCardContent__PTPwz{display:flex;flex:1;flex-direction:column;min-width:0}.ChatMessage_role-assistant__wketE .ChatMessage_downloadCardTitle__K1wqr{font-size:var(--text-base);font-weight:600;line-height:1.4}.ChatMessage_role-assistant__wketE .ChatMessage_downloadCardSubtitle__fVeF2{color:var(--muted-foreground);font-size:var(--text-sm);line-height:1.4}";
|
|
4
|
+
var S = {"root":"ChatMessage_root__6rnsF","text":"ChatMessage_text__Y1XNR","role-user":"ChatMessage_role-user__u4JPV","role-system":"ChatMessage_role-system__g13OP","role-assistant":"ChatMessage_role-assistant__wketE","bullet":"ChatMessage_bullet__6vAhq","scrollHorizontal":"ChatMessage_scrollHorizontal__Rms9n","datasetAppLink":"ChatMessage_datasetAppLink__Pxy-T","datasetAppLinkLabel":"ChatMessage_datasetAppLinkLabel__PMU7e","quickReplyWrap":"ChatMessage_quickReplyWrap__1UFyD","downloadButtons":"ChatMessage_downloadButtons__RygM-","downloadCard":"ChatMessage_downloadCard__NsNRa","downloadCardIcon":"ChatMessage_downloadCardIcon__jkxDJ","downloadCardContent":"ChatMessage_downloadCardContent__PTPwz","downloadCardTitle":"ChatMessage_downloadCardTitle__K1wqr","downloadCardSubtitle":"ChatMessage_downloadCardSubtitle__fVeF2"};
|
|
5
|
+
styleInject(css_248z);
|
|
6
|
+
|
|
7
|
+
export { S as default };
|