@zendir/ui 0.5.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/README.md +640 -631
- package/dist/_virtual/_rolldown/runtime.js +13 -0
- package/dist/index.js +17 -221
- package/dist/react/3d/CesiumCaptureSource.d.ts +0 -1
- package/dist/react/3d/CesiumCaptureSource.js +364 -283
- package/dist/react/3d/CesiumCaptureSource.js.map +1 -1
- package/dist/react/3d/ZenSpace3D.d.ts +2 -3
- package/dist/react/3d/ZenSpace3D.js +1681 -1237
- package/dist/react/3d/ZenSpace3D.js.map +1 -1
- package/dist/react/3d/ZenSpace3DCesium.d.ts +0 -1
- package/dist/react/3d/ZenSpace3DCesium.js +513 -560
- package/dist/react/3d/ZenSpace3DCesium.js.map +1 -1
- package/dist/react/3d/ZenSpace3DShaders.js +61 -66
- package/dist/react/3d/ZenSpace3DShaders.js.map +1 -1
- package/dist/react/3d/ZenSpace3DTypes.d.ts +19 -20
- package/dist/react/3d/ZenSpace3DUtils.d.ts +0 -1
- package/dist/react/3d/ZenSpace3DUtils.js +37 -24
- package/dist/react/3d/ZenSpace3DUtils.js.map +1 -1
- package/dist/react/3d/capturePngAnalysis.js +42 -36
- package/dist/react/3d/capturePngAnalysis.js.map +1 -1
- package/dist/react/3d/index.d.ts +3 -3
- package/dist/react/3d/index.js +5 -53
- package/dist/react/3d/threeLoader.d.ts +1 -1
- package/dist/react/3d/threeLoader.js +23 -18
- package/dist/react/3d/threeLoader.js.map +1 -1
- package/dist/react/astro/ClassificationBanner.d.ts +2 -3
- package/dist/react/astro/ClassificationBanner.js +95 -79
- package/dist/react/astro/ClassificationBanner.js.map +1 -1
- package/dist/react/astro/GlobalStatusBar.d.ts +0 -1
- package/dist/react/astro/GlobalStatusBar.js +157 -163
- package/dist/react/astro/GlobalStatusBar.js.map +1 -1
- package/dist/react/astro/MissionClock.d.ts +7 -8
- package/dist/react/astro/MissionClock.js +377 -400
- package/dist/react/astro/MissionClock.js.map +1 -1
- package/dist/react/astro/MonitoringIcon.d.ts +1 -2
- package/dist/react/astro/MonitoringIcon.js +422 -358
- package/dist/react/astro/MonitoringIcon.js.map +1 -1
- package/dist/react/astro/Notification.d.ts +1 -2
- package/dist/react/astro/Notification.js +229 -126
- package/dist/react/astro/Notification.js.map +1 -1
- package/dist/react/astro/Progress.d.ts +0 -1
- package/dist/react/astro/Progress.js +199 -141
- package/dist/react/astro/Progress.js.map +1 -1
- package/dist/react/astro/SimulationControls.d.ts +3 -4
- package/dist/react/astro/SimulationControls.js +596 -650
- package/dist/react/astro/SimulationControls.js.map +1 -1
- package/dist/react/astro/StatusIndicator.d.ts +0 -1
- package/dist/react/astro/StatusIndicator.js +236 -170
- package/dist/react/astro/StatusIndicator.js.map +1 -1
- package/dist/react/astro/UnifiedTimeline.d.ts +9 -10
- package/dist/react/astro/UnifiedTimeline.js +2345 -2392
- package/dist/react/astro/UnifiedTimeline.js.map +1 -1
- package/dist/react/astro/index.d.ts +5 -5
- package/dist/react/astro/index.js +1 -25
- package/dist/react/cards/AccessCard.d.ts +0 -1
- package/dist/react/cards/AccessCard.js +471 -405
- package/dist/react/cards/AccessCard.js.map +1 -1
- package/dist/react/cards/OrbitCard.d.ts +0 -1
- package/dist/react/cards/OrbitCard.js +487 -364
- package/dist/react/cards/OrbitCard.js.map +1 -1
- package/dist/react/cards/SpacecraftCard.d.ts +0 -1
- package/dist/react/cards/SpacecraftCard.js +813 -925
- package/dist/react/cards/SpacecraftCard.js.map +1 -1
- package/dist/react/cards/TelemetryCard.d.ts +0 -1
- package/dist/react/cards/TelemetryCard.js +1055 -732
- package/dist/react/cards/TelemetryCard.js.map +1 -1
- package/dist/react/cards/TelemetryStreamCard.d.ts +0 -1
- package/dist/react/cards/TelemetryStreamCard.js +323 -297
- package/dist/react/cards/TelemetryStreamCard.js.map +1 -1
- package/dist/react/cards/index.d.ts +1 -1
- package/dist/react/cards/index.js +1 -8
- package/dist/react/charts/GroundTrackMap.d.ts +6 -7
- package/dist/react/charts/GroundTrackMap.js +1377 -1256
- package/dist/react/charts/GroundTrackMap.js.map +1 -1
- package/dist/react/charts/GroundTrackMapLeaflet.d.ts +1 -2
- package/dist/react/charts/GroundTrackMapLeaflet.js +1065 -987
- package/dist/react/charts/GroundTrackMapLeaflet.js.map +1 -1
- package/dist/react/charts/groundTrackMapLeafletTiles.js +34 -25
- package/dist/react/charts/groundTrackMapLeafletTiles.js.map +1 -1
- package/dist/react/charts/groundTrackMapLeafletUtils.js +70 -61
- package/dist/react/charts/groundTrackMapLeafletUtils.js.map +1 -1
- package/dist/react/charts/index.d.ts +1 -1
- package/dist/react/charts/index.js +7 -100
- package/dist/react/charts/unified/AstroChart.d.ts +1 -2
- package/dist/react/charts/unified/AstroChart.js +1331 -1411
- package/dist/react/charts/unified/AstroChart.js.map +1 -1
- package/dist/react/charts/unified/PowerOverviewChart.d.ts +3 -3
- package/dist/react/charts/unified/PowerOverviewChart.js +495 -478
- package/dist/react/charts/unified/PowerOverviewChart.js.map +1 -1
- package/dist/react/charts/unified/domain.d.ts +12 -13
- package/dist/react/charts/unified/domain.js +3999 -3145
- package/dist/react/charts/unified/domain.js.map +1 -1
- package/dist/react/charts/unified/generators.d.ts +3 -4
- package/dist/react/charts/unified/generators.js +561 -498
- package/dist/react/charts/unified/generators.js.map +1 -1
- package/dist/react/charts/unified/index.d.ts +1 -1
- package/dist/react/charts/unified/presets.d.ts +14 -15
- package/dist/react/charts/unified/presets.js +857 -994
- package/dist/react/charts/unified/presets.js.map +1 -1
- package/dist/react/charts/unified/sync.d.ts +2 -3
- package/dist/react/charts/unified/sync.js +229 -195
- package/dist/react/charts/unified/sync.js.map +1 -1
- package/dist/react/charts/unified/theme.d.ts +11 -12
- package/dist/react/charts/unified/theme.js +606 -642
- package/dist/react/charts/unified/theme.js.map +1 -1
- package/dist/react/charts/unified/types.d.ts +32 -33
- package/dist/react/charts/unified/useChartStream.d.ts +1 -2
- package/dist/react/charts/unified/useChartStream.js +203 -216
- package/dist/react/charts/unified/useChartStream.js.map +1 -1
- package/dist/react/chatgpt/AppCard.d.ts +1 -2
- package/dist/react/chatgpt/index.d.ts +7 -7
- package/dist/react/chatgpt/index.js +160 -139
- package/dist/react/chatgpt/index.js.map +1 -1
- package/dist/react/context/CategoryContext.d.ts +0 -1
- package/dist/react/context/CategoryContext.js +78 -29
- package/dist/react/context/CategoryContext.js.map +1 -1
- package/dist/react/context/DisplaySettingsContext.d.ts +1 -2
- package/dist/react/context/DisplaySettingsContext.js +205 -156
- package/dist/react/context/DisplaySettingsContext.js.map +1 -1
- package/dist/react/context/SpatialSelectionContext.d.ts +0 -1
- package/dist/react/context/SpatialSelectionContext.js +36 -7
- package/dist/react/context/SpatialSelectionContext.js.map +1 -1
- package/dist/react/core/data/DataTable.d.ts +3 -4
- package/dist/react/core/data/DataTable.js +473 -440
- package/dist/react/core/data/DataTable.js.map +1 -1
- package/dist/react/core/data/DataValue.d.ts +4 -5
- package/dist/react/core/data/DataValue.js +605 -571
- package/dist/react/core/data/DataValue.js.map +1 -1
- package/dist/react/core/data/propertyConfig.d.ts +1 -2
- package/dist/react/core/data/propertyConfig.js +446 -382
- package/dist/react/core/data/propertyConfig.js.map +1 -1
- package/dist/react/core/display/AstroIcon.d.ts +4 -5
- package/dist/react/core/display/AstroIcon.js +339 -429
- package/dist/react/core/display/AstroIcon.js.map +1 -1
- package/dist/react/core/display/Badge.d.ts +2 -3
- package/dist/react/core/display/Badge.js +131 -131
- package/dist/react/core/display/Badge.js.map +1 -1
- package/dist/react/core/display/CardHeader.d.ts +0 -1
- package/dist/react/core/display/CardHeader.js +398 -311
- package/dist/react/core/display/CardHeader.js.map +1 -1
- package/dist/react/core/display/Container.d.ts +2 -3
- package/dist/react/core/display/Container.js +640 -668
- package/dist/react/core/display/Container.js.map +1 -1
- package/dist/react/core/display/CopyButton.d.ts +1 -2
- package/dist/react/core/display/CopyButton.js +158 -101
- package/dist/react/core/display/CopyButton.js.map +1 -1
- package/dist/react/core/display/GlassCard.d.ts +3 -4
- package/dist/react/core/display/GlassCard.js +416 -369
- package/dist/react/core/display/GlassCard.js.map +1 -1
- package/dist/react/core/display/HeaderIconWithStatus.d.ts +0 -1
- package/dist/react/core/display/HeaderIconWithStatus.js +152 -152
- package/dist/react/core/display/HeaderIconWithStatus.js.map +1 -1
- package/dist/react/core/display/Icon.d.ts +2 -3
- package/dist/react/core/display/Icon.js +172 -143
- package/dist/react/core/display/Icon.js.map +1 -1
- package/dist/react/core/display/Typography.d.ts +24 -25
- package/dist/react/core/display/Typography.js +360 -178
- package/dist/react/core/display/Typography.js.map +1 -1
- package/dist/react/core/feedback/ConfirmDialog.d.ts +1 -2
- package/dist/react/core/feedback/ConfirmDialog.js +343 -304
- package/dist/react/core/feedback/ConfirmDialog.js.map +1 -1
- package/dist/react/core/feedback/Dialog.d.ts +2 -3
- package/dist/react/core/feedback/Dialog.js +189 -197
- package/dist/react/core/feedback/Dialog.js.map +1 -1
- package/dist/react/core/feedback/Toast.d.ts +2 -3
- package/dist/react/core/feedback/Toast.js +346 -207
- package/dist/react/core/feedback/Toast.js.map +1 -1
- package/dist/react/core/index.d.ts +26 -26
- package/dist/react/core/index.js +7 -119
- package/dist/react/core/inputs/Button.d.ts +2 -3
- package/dist/react/core/inputs/Button.js +281 -304
- package/dist/react/core/inputs/Button.js.map +1 -1
- package/dist/react/core/inputs/Checkbox.d.ts +2 -3
- package/dist/react/core/inputs/Checkbox.js +139 -127
- package/dist/react/core/inputs/Checkbox.js.map +1 -1
- package/dist/react/core/inputs/Input.d.ts +3 -4
- package/dist/react/core/inputs/Input.js +277 -285
- package/dist/react/core/inputs/Input.js.map +1 -1
- package/dist/react/core/inputs/LimitsBar.d.ts +1 -2
- package/dist/react/core/inputs/LimitsBar.js +271 -196
- package/dist/react/core/inputs/LimitsBar.js.map +1 -1
- package/dist/react/core/inputs/NumberInput.d.ts +2 -3
- package/dist/react/core/inputs/NumberInput.js +531 -503
- package/dist/react/core/inputs/NumberInput.js.map +1 -1
- package/dist/react/core/inputs/PinInput.d.ts +2 -3
- package/dist/react/core/inputs/PinInput.js +224 -207
- package/dist/react/core/inputs/PinInput.js.map +1 -1
- package/dist/react/core/inputs/Select.d.ts +1 -2
- package/dist/react/core/inputs/Select.js +298 -299
- package/dist/react/core/inputs/Select.js.map +1 -1
- package/dist/react/core/inputs/Toggle.d.ts +2 -3
- package/dist/react/core/inputs/Toggle.js +142 -148
- package/dist/react/core/inputs/Toggle.js.map +1 -1
- package/dist/react/core/layout/Box.d.ts +3 -4
- package/dist/react/core/layout/Box.js +118 -122
- package/dist/react/core/layout/Box.js.map +1 -1
- package/dist/react/core/layout/Center.d.ts +0 -1
- package/dist/react/core/layout/Center.js +45 -32
- package/dist/react/core/layout/Center.js.map +1 -1
- package/dist/react/core/layout/Divider.d.ts +1 -2
- package/dist/react/core/layout/Divider.js +112 -106
- package/dist/react/core/layout/Divider.js.map +1 -1
- package/dist/react/core/layout/Flex.d.ts +4 -5
- package/dist/react/core/layout/Flex.js +120 -124
- package/dist/react/core/layout/Flex.js.map +1 -1
- package/dist/react/core/layout/Grid.d.ts +5 -6
- package/dist/react/core/layout/Grid.js +131 -138
- package/dist/react/core/layout/Grid.js.map +1 -1
- package/dist/react/core/layout/Spacer.d.ts +0 -1
- package/dist/react/core/layout/Spacer.js +36 -29
- package/dist/react/core/layout/Spacer.js.map +1 -1
- package/dist/react/core/layout/Stack.d.ts +4 -5
- package/dist/react/core/layout/Stack.js +127 -70
- package/dist/react/core/layout/Stack.js.map +1 -1
- package/dist/react/core/layout/responsive.d.ts +1 -2
- package/dist/react/core/layout/responsive.js +25 -19
- package/dist/react/core/layout/responsive.js.map +1 -1
- package/dist/react/core/layout/useBreakpoint.d.ts +1 -1
- package/dist/react/core/layout/useBreakpoint.js +119 -66
- package/dist/react/core/layout/useBreakpoint.js.map +1 -1
- package/dist/react/core/navigation/AppBar.d.ts +1 -2
- package/dist/react/core/navigation/AppBar.js +827 -805
- package/dist/react/core/navigation/AppBar.js.map +1 -1
- package/dist/react/core/navigation/Pagination.d.ts +2 -3
- package/dist/react/core/navigation/Pagination.js +207 -187
- package/dist/react/core/navigation/Pagination.js.map +1 -1
- package/dist/react/core/navigation/SideNav.d.ts +5 -6
- package/dist/react/core/navigation/SideNav.js +855 -629
- package/dist/react/core/navigation/SideNav.js.map +1 -1
- package/dist/react/core/navigation/Tabs.d.ts +0 -1
- package/dist/react/core/navigation/Tabs.js +113 -119
- package/dist/react/core/navigation/Tabs.js.map +1 -1
- package/dist/react/core/overlays/Popover.d.ts +2 -3
- package/dist/react/core/overlays/Popover.js +303 -282
- package/dist/react/core/overlays/Popover.js.map +1 -1
- package/dist/react/core/overlays/SidePanel.d.ts +1 -2
- package/dist/react/core/overlays/SidePanel.js +217 -212
- package/dist/react/core/overlays/SidePanel.js.map +1 -1
- package/dist/react/core/overlays/Tooltip.d.ts +1 -2
- package/dist/react/core/overlays/Tooltip.js +170 -176
- package/dist/react/core/overlays/Tooltip.js.map +1 -1
- package/dist/react/core/widgets/ActivityPlanner.d.ts +0 -1
- package/dist/react/core/widgets/ActivityPlanner.js +855 -517
- package/dist/react/core/widgets/ActivityPlanner.js.map +1 -1
- package/dist/react/core/widgets/Capture.d.ts +2 -3
- package/dist/react/core/widgets/Capture.js +965 -779
- package/dist/react/core/widgets/Capture.js.map +1 -1
- package/dist/react/core/widgets/ChatPanel.d.ts +16 -17
- package/dist/react/core/widgets/ChatPanel.js +1734 -1034
- package/dist/react/core/widgets/ChatPanel.js.map +1 -1
- package/dist/react/core/widgets/ColorPickerPanel.d.ts +0 -1
- package/dist/react/core/widgets/ColorPickerPanel.js +298 -287
- package/dist/react/core/widgets/ColorPickerPanel.js.map +1 -1
- package/dist/react/core/widgets/CommandBuilder.d.ts +2 -3
- package/dist/react/core/widgets/CommandBuilder.js +624 -516
- package/dist/react/core/widgets/CommandBuilder.js.map +1 -1
- package/dist/react/core/widgets/ConnectionForm.d.ts +2 -3
- package/dist/react/core/widgets/ConnectionForm.js +528 -492
- package/dist/react/core/widgets/ConnectionForm.js.map +1 -1
- package/dist/react/core/widgets/FileExplorer.d.ts +3 -4
- package/dist/react/core/widgets/FileExplorer.js +617 -505
- package/dist/react/core/widgets/FileExplorer.js.map +1 -1
- package/dist/react/core/widgets/HexViewer.d.ts +2 -3
- package/dist/react/core/widgets/HexViewer.js +1353 -1091
- package/dist/react/core/widgets/HexViewer.js.map +1 -1
- package/dist/react/core/widgets/ImageFrame.d.ts +1 -2
- package/dist/react/core/widgets/ImageFrame.js +230 -193
- package/dist/react/core/widgets/ImageFrame.js.map +1 -1
- package/dist/react/core/widgets/ImageGallery.d.ts +2 -1
- package/dist/react/core/widgets/ImageGallery.js +380 -314
- package/dist/react/core/widgets/ImageGallery.js.map +1 -1
- package/dist/react/core/widgets/ImagePanel.d.ts +0 -1
- package/dist/react/core/widgets/ImagePanel.js +110 -101
- package/dist/react/core/widgets/ImagePanel.js.map +1 -1
- package/dist/react/core/widgets/LogViewer.d.ts +2 -3
- package/dist/react/core/widgets/LogViewer.js +711 -607
- package/dist/react/core/widgets/LogViewer.js.map +1 -1
- package/dist/react/core/widgets/MessageStream.d.ts +3 -4
- package/dist/react/core/widgets/MessageStream.js +514 -444
- package/dist/react/core/widgets/MessageStream.js.map +1 -1
- package/dist/react/core/widgets/MissionCalendar.d.ts +3 -4
- package/dist/react/core/widgets/MissionCalendar.js +1488 -1020
- package/dist/react/core/widgets/MissionCalendar.js.map +1 -1
- package/dist/react/core/widgets/PacketViewer.d.ts +2 -3
- package/dist/react/core/widgets/PacketViewer.js +550 -421
- package/dist/react/core/widgets/PacketViewer.js.map +1 -1
- package/dist/react/core/widgets/capture-placeholder.png.js +6 -5
- package/dist/react/core/widgets/capture-placeholder.png.js.map +1 -1
- package/dist/react/hooks/index.d.ts +5 -5
- package/dist/react/hooks/useAccessWindows.d.ts +0 -1
- package/dist/react/hooks/useCompactMode.d.ts +1 -1
- package/dist/react/hooks/useCompactMode.js +104 -58
- package/dist/react/hooks/useCompactMode.js.map +1 -1
- package/dist/react/hooks/useGroundTrackHistory.d.ts +0 -1
- package/dist/react/hooks/useSimulationScene.d.ts +1 -2
- package/dist/react/hooks/useSimulationScene.js +481 -374
- package/dist/react/hooks/useSimulationScene.js.map +1 -1
- package/dist/react/index.d.ts +3 -3
- package/dist/react/panels/LayerControlPanel.d.ts +1 -2
- package/dist/react/panels/LayerControlPanel.js +223 -180
- package/dist/react/panels/LayerControlPanel.js.map +1 -1
- package/dist/react/panels/ObjectInventoryPanel.d.ts +2 -3
- package/dist/react/panels/ObjectInventoryPanel.js +315 -250
- package/dist/react/panels/ObjectInventoryPanel.js.map +1 -1
- package/dist/react/panels/index.d.ts +1 -1
- package/dist/react/panels/index.js +1 -6
- package/dist/react/shared/ErrorBoundary.d.ts +1 -2
- package/dist/react/shared/ErrorBoundary.js +170 -139
- package/dist/react/shared/ErrorBoundary.js.map +1 -1
- package/dist/react/shared/Skeleton.d.ts +1 -2
- package/dist/react/shared/Skeleton.js +300 -301
- package/dist/react/shared/Skeleton.js.map +1 -1
- package/dist/react/theme/ThemeProvider.d.ts +2 -321
- package/dist/react/theme/ThemeProvider.js +312 -939
- package/dist/react/theme/ThemeProvider.js.map +1 -1
- package/dist/react/theme/cardAccent.d.ts +1 -2
- package/dist/react/theme/cardAccent.js +196 -126
- package/dist/react/theme/cardAccent.js.map +1 -1
- package/dist/react/theme/config.d.ts +0 -1
- package/dist/react/theme/config.js +47 -25
- package/dist/react/theme/config.js.map +1 -1
- package/dist/react/theme/index.d.ts +2 -2
- package/dist/react/theme/index.js +1 -16
- package/dist/react/theme/types.d.ts +332 -0
- package/dist/react/theme/types.js +39 -0
- package/dist/react/theme/types.js.map +1 -0
- package/dist/react/types.d.ts +8 -8
- package/dist/react/types.js +147 -47
- package/dist/react/types.js.map +1 -1
- package/dist/react/utils/categoryPalette.d.ts +0 -1
- package/dist/react/utils/categoryPalette.js +91 -102
- package/dist/react/utils/categoryPalette.js.map +1 -1
- package/dist/react/utils/index.d.ts +5 -5
- package/dist/react/utils/index.js +457 -371
- package/dist/react/utils/index.js.map +1 -1
- package/dist/react/visualizations/EclipseTimerCard.d.ts +0 -1
- package/dist/react/visualizations/LinkBudgetCard.d.ts +0 -1
- package/dist/react/visualizations/NavBallCard.d.ts +0 -1
- package/dist/react/visualizations/PropulsionCard.d.ts +1 -2
- package/dist/react/visualizations/SensorFootprintCard.d.ts +1 -2
- package/dist/react/visualizations/ThermalHeatmapCard.d.ts +0 -1
- package/dist/react/visualizations/index.d.ts +3 -3
- package/dist/react.d.ts +2 -1
- package/dist/react.js +17 -221
- package/dist/shaders/atmosphere.frag.js +6 -5
- package/dist/shaders/atmosphere.frag.js.map +1 -1
- package/dist/shaders/atmosphere.vert.js +6 -5
- package/dist/shaders/atmosphere.vert.js.map +1 -1
- package/dist/shaders/stars.frag.js +6 -5
- package/dist/shaders/stars.frag.js.map +1 -1
- package/dist/shaders/stars.vert.js +6 -5
- package/dist/shaders/stars.vert.js.map +1 -1
- package/dist/style.css +217 -194
- package/dist/tokens/core.d.ts +159 -0
- package/dist/tokens/core.js +144 -0
- package/dist/tokens/core.js.map +1 -0
- package/dist/tokens/css-vars.d.ts +213 -2
- package/dist/tokens/css-vars.js +590 -227
- package/dist/tokens/css-vars.js.map +1 -1
- package/dist/tokens/index.d.ts +31 -228
- package/dist/tokens/index.js +281 -366
- package/dist/tokens/index.js.map +1 -1
- package/dist/tokens/palettes/astro.d.ts +129 -0
- package/dist/tokens/palettes/astro.js +112 -0
- package/dist/tokens/palettes/astro.js.map +1 -0
- package/dist/tokens/palettes/index.d.ts +288 -0
- package/dist/tokens/palettes/index.js +35 -0
- package/dist/tokens/palettes/index.js.map +1 -0
- package/dist/tokens/palettes/tailwind.d.ts +324 -0
- package/dist/tokens/palettes/tailwind.js +201 -0
- package/dist/tokens/palettes/tailwind.js.map +1 -0
- package/dist/tokens/palettes/zendir.d.ts +126 -0
- package/dist/tokens/palettes/zendir.js +92 -0
- package/dist/tokens/palettes/zendir.js.map +1 -0
- package/dist/tokens/themes.d.ts +30 -0
- package/dist/tokens/themes.js +704 -0
- package/dist/tokens/themes.js.map +1 -0
- package/dist/tokens/tokens.css +419 -41
- package/dist/types/index.d.ts +2 -2
- package/package.json +310 -313
- package/dist/index.js.map +0 -1
- package/dist/react/3d/index.js.map +0 -1
- package/dist/react/astro/index.js.map +0 -1
- package/dist/react/cards/index.js.map +0 -1
- package/dist/react/charts/index.js.map +0 -1
- package/dist/react/core/index.js.map +0 -1
- package/dist/react/panels/index.js.map +0 -1
- package/dist/react/theme/astro-tokens.d.ts +0 -153
- package/dist/react/theme/index.js.map +0 -1
- package/dist/react.js.map +0 -1
|
@@ -1,1000 +1,863 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { memo, forwardRef } from "react";
|
|
3
|
-
import { AstroChart } from "./AstroChart.js";
|
|
4
|
-
import { ASTRO_DATA_VIZ_COLORS } from "./theme.js";
|
|
5
1
|
import { useTheme } from "../../theme/ThemeProvider.js";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
import { ASTRO_DATA_VIZ_COLORS } from "./theme.js";
|
|
3
|
+
import { AstroChart } from "./AstroChart.js";
|
|
4
|
+
import { forwardRef, memo } from "react";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
//#region src/react/charts/unified/presets.tsx
|
|
7
|
+
/**
|
|
8
|
+
* @zendir/ui - Chart Presets
|
|
9
|
+
*
|
|
10
|
+
* Pre-configured chart components for common use cases.
|
|
11
|
+
* Each preset wraps AstroChart with sensible defaults.
|
|
12
|
+
*/
|
|
13
|
+
var SOFT_STATUS_COLORS = {
|
|
14
|
+
normal: "#6ed86e",
|
|
15
|
+
caution: "#ffd54f",
|
|
16
|
+
serious: "#ffa726",
|
|
17
|
+
critical: "#e57373",
|
|
18
|
+
off: "#90a4ae",
|
|
19
|
+
standby: "#4fc3f7"
|
|
10
20
|
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
)
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
)
|
|
133
|
-
const
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
)
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
))
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
)
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
)
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
}
|
|
723
|
-
}]
|
|
724
|
-
},
|
|
725
|
-
...props
|
|
726
|
-
}
|
|
727
|
-
);
|
|
728
|
-
}
|
|
729
|
-
));
|
|
730
|
-
const CandlestickChart = memo(forwardRef(
|
|
731
|
-
function CandlestickChart2({
|
|
732
|
-
data = [],
|
|
733
|
-
showVolume: _showVolume = false,
|
|
734
|
-
...props
|
|
735
|
-
}, ref) {
|
|
736
|
-
const { tokens } = useTheme();
|
|
737
|
-
const categoryData = data.map((d) => d.time);
|
|
738
|
-
const ohlcData = data.map((d) => [d.open, d.close, d.low, d.high]);
|
|
739
|
-
return /* @__PURE__ */ jsx(
|
|
740
|
-
AstroChart,
|
|
741
|
-
{
|
|
742
|
-
ref,
|
|
743
|
-
type: "candlestick",
|
|
744
|
-
series: [],
|
|
745
|
-
echartsOptions: {
|
|
746
|
-
tooltip: {
|
|
747
|
-
trigger: "axis",
|
|
748
|
-
axisPointer: { type: "cross" }
|
|
749
|
-
},
|
|
750
|
-
xAxis: {
|
|
751
|
-
type: "category",
|
|
752
|
-
data: categoryData,
|
|
753
|
-
axisLine: { lineStyle: { color: "rgba(100, 116, 139, 0.3)" } },
|
|
754
|
-
axisLabel: { color: tokens.colors.text.secondary }
|
|
755
|
-
},
|
|
756
|
-
yAxis: {
|
|
757
|
-
type: "value",
|
|
758
|
-
scale: true,
|
|
759
|
-
splitLine: { lineStyle: { color: "rgba(100, 116, 139, 0.15)" } },
|
|
760
|
-
axisLine: { lineStyle: { color: "rgba(100, 116, 139, 0.3)" } },
|
|
761
|
-
axisLabel: { color: tokens.colors.text.secondary }
|
|
762
|
-
},
|
|
763
|
-
series: [{
|
|
764
|
-
type: "candlestick",
|
|
765
|
-
data: ohlcData,
|
|
766
|
-
itemStyle: {
|
|
767
|
-
color: SOFT_STATUS_COLORS.normal,
|
|
768
|
-
// AstroUXDS green (up/bullish)
|
|
769
|
-
color0: SOFT_STATUS_COLORS.critical,
|
|
770
|
-
// AstroUXDS red (down/bearish)
|
|
771
|
-
borderColor: SOFT_STATUS_COLORS.normal,
|
|
772
|
-
borderColor0: SOFT_STATUS_COLORS.critical
|
|
773
|
-
}
|
|
774
|
-
}],
|
|
775
|
-
dataZoom: [
|
|
776
|
-
{ type: "inside", start: 0, end: 100 },
|
|
777
|
-
{ show: true, type: "slider", bottom: 10 }
|
|
778
|
-
]
|
|
779
|
-
},
|
|
780
|
-
...props
|
|
781
|
-
}
|
|
782
|
-
);
|
|
783
|
-
}
|
|
784
|
-
));
|
|
785
|
-
const GraphChart = memo(forwardRef(
|
|
786
|
-
function GraphChart2({
|
|
787
|
-
nodes = [],
|
|
788
|
-
links = [],
|
|
789
|
-
categories = [],
|
|
790
|
-
layout = "force",
|
|
791
|
-
...props
|
|
792
|
-
}, ref) {
|
|
793
|
-
const { tokens } = useTheme();
|
|
794
|
-
return /* @__PURE__ */ jsx(
|
|
795
|
-
AstroChart,
|
|
796
|
-
{
|
|
797
|
-
ref,
|
|
798
|
-
type: "scatter",
|
|
799
|
-
series: [],
|
|
800
|
-
echartsOptions: {
|
|
801
|
-
tooltip: {},
|
|
802
|
-
legend: categories.length > 0 ? {
|
|
803
|
-
data: categories.map((c) => c.name),
|
|
804
|
-
textStyle: { color: tokens.colors.text.primary }
|
|
805
|
-
} : void 0,
|
|
806
|
-
series: [{
|
|
807
|
-
type: "graph",
|
|
808
|
-
layout,
|
|
809
|
-
data: nodes.map((n) => ({
|
|
810
|
-
...n,
|
|
811
|
-
symbolSize: n.symbolSize || 30
|
|
812
|
-
})),
|
|
813
|
-
links,
|
|
814
|
-
categories,
|
|
815
|
-
roam: true,
|
|
816
|
-
label: {
|
|
817
|
-
show: true,
|
|
818
|
-
position: "right",
|
|
819
|
-
formatter: "{b}",
|
|
820
|
-
color: tokens.colors.text.primary,
|
|
821
|
-
fontSize: 11
|
|
822
|
-
},
|
|
823
|
-
lineStyle: {
|
|
824
|
-
color: "source",
|
|
825
|
-
curveness: 0.3,
|
|
826
|
-
opacity: 0.6
|
|
827
|
-
},
|
|
828
|
-
emphasis: {
|
|
829
|
-
focus: "adjacency",
|
|
830
|
-
lineStyle: { width: 3 }
|
|
831
|
-
},
|
|
832
|
-
force: layout === "force" ? {
|
|
833
|
-
repulsion: 200,
|
|
834
|
-
edgeLength: [50, 150],
|
|
835
|
-
gravity: 0.1
|
|
836
|
-
} : void 0
|
|
837
|
-
}]
|
|
838
|
-
},
|
|
839
|
-
...props
|
|
840
|
-
}
|
|
841
|
-
);
|
|
842
|
-
}
|
|
843
|
-
));
|
|
21
|
+
var LineChart = memo(forwardRef(function LineChart({ smooth = true, showPoints = false, showArea = false, series = [], ...props }, ref) {
|
|
22
|
+
const transformedSeries = series.map((s) => ({
|
|
23
|
+
...s,
|
|
24
|
+
type: showArea ? "area" : "line",
|
|
25
|
+
smooth,
|
|
26
|
+
symbol: showPoints ? {
|
|
27
|
+
type: "circle",
|
|
28
|
+
size: 6
|
|
29
|
+
} : { type: "none" }
|
|
30
|
+
}));
|
|
31
|
+
return /* @__PURE__ */ jsx(AstroChart, {
|
|
32
|
+
ref,
|
|
33
|
+
type: showArea ? "area" : "line",
|
|
34
|
+
series: transformedSeries,
|
|
35
|
+
tooltip: {
|
|
36
|
+
trigger: "axis",
|
|
37
|
+
crosshair: "x"
|
|
38
|
+
},
|
|
39
|
+
...props
|
|
40
|
+
});
|
|
41
|
+
}));
|
|
42
|
+
var AreaChart = memo(forwardRef(function AreaChart({ stacked = false, smooth = true, series = [], ...props }, ref) {
|
|
43
|
+
return /* @__PURE__ */ jsx(AstroChart, {
|
|
44
|
+
ref,
|
|
45
|
+
type: "area",
|
|
46
|
+
series: series.map((s, _i) => ({
|
|
47
|
+
...s,
|
|
48
|
+
type: "area",
|
|
49
|
+
smooth,
|
|
50
|
+
stack: stacked ? "total" : void 0,
|
|
51
|
+
areaStyle: { opacity: stacked ? .8 : .3 }
|
|
52
|
+
})),
|
|
53
|
+
tooltip: {
|
|
54
|
+
trigger: "axis",
|
|
55
|
+
crosshair: "x"
|
|
56
|
+
},
|
|
57
|
+
...props
|
|
58
|
+
});
|
|
59
|
+
}));
|
|
60
|
+
var BarChart = memo(forwardRef(function BarChart({ stacked = false, horizontal = false, series = [], xAxis, yAxis, ...props }, ref) {
|
|
61
|
+
return /* @__PURE__ */ jsx(AstroChart, {
|
|
62
|
+
ref,
|
|
63
|
+
type: "bar",
|
|
64
|
+
series: series.map((s) => ({
|
|
65
|
+
...s,
|
|
66
|
+
type: "bar",
|
|
67
|
+
stack: stacked ? "total" : void 0
|
|
68
|
+
})),
|
|
69
|
+
xAxis: horizontal ? {
|
|
70
|
+
type: "value",
|
|
71
|
+
...yAxis
|
|
72
|
+
} : {
|
|
73
|
+
type: "category",
|
|
74
|
+
...xAxis
|
|
75
|
+
},
|
|
76
|
+
yAxis: horizontal ? {
|
|
77
|
+
type: "category",
|
|
78
|
+
...xAxis
|
|
79
|
+
} : {
|
|
80
|
+
type: "value",
|
|
81
|
+
...yAxis
|
|
82
|
+
},
|
|
83
|
+
tooltip: { trigger: "axis" },
|
|
84
|
+
...props
|
|
85
|
+
});
|
|
86
|
+
}));
|
|
87
|
+
var ScatterChart = memo(forwardRef(function ScatterChart({ symbolSize = 10, series = [], ...props }, ref) {
|
|
88
|
+
return /* @__PURE__ */ jsx(AstroChart, {
|
|
89
|
+
ref,
|
|
90
|
+
type: "scatter",
|
|
91
|
+
series: series.map((s) => ({
|
|
92
|
+
...s,
|
|
93
|
+
type: "scatter",
|
|
94
|
+
symbol: {
|
|
95
|
+
type: "circle",
|
|
96
|
+
size: typeof symbolSize === "number" ? symbolSize : 10
|
|
97
|
+
}
|
|
98
|
+
})),
|
|
99
|
+
tooltip: { trigger: "item" },
|
|
100
|
+
xAxis: { type: "value" },
|
|
101
|
+
yAxis: { type: "value" },
|
|
102
|
+
...props
|
|
103
|
+
});
|
|
104
|
+
}));
|
|
105
|
+
var PieChart = memo(forwardRef(function PieChart({ donut = false, innerRadius = "40%", outerRadius = "70%", showLabels = true, series = [], ...props }, ref) {
|
|
106
|
+
const transformedSeries = series.map((s) => ({
|
|
107
|
+
...s,
|
|
108
|
+
type: donut ? "donut" : "pie"
|
|
109
|
+
}));
|
|
110
|
+
return /* @__PURE__ */ jsx(AstroChart, {
|
|
111
|
+
ref,
|
|
112
|
+
type: donut ? "donut" : "pie",
|
|
113
|
+
series: transformedSeries,
|
|
114
|
+
tooltip: { trigger: "item" },
|
|
115
|
+
echartsOptions: { series: [{
|
|
116
|
+
radius: donut ? [innerRadius, outerRadius] : outerRadius,
|
|
117
|
+
label: {
|
|
118
|
+
show: showLabels,
|
|
119
|
+
formatter: "{b}: {d}%"
|
|
120
|
+
}
|
|
121
|
+
}] },
|
|
122
|
+
...props
|
|
123
|
+
});
|
|
124
|
+
}));
|
|
125
|
+
var DonutChart = memo(forwardRef(function DonutChart(props, ref) {
|
|
126
|
+
return /* @__PURE__ */ jsx(PieChart, {
|
|
127
|
+
ref,
|
|
128
|
+
donut: true,
|
|
129
|
+
...props
|
|
130
|
+
});
|
|
131
|
+
}));
|
|
132
|
+
var GaugeChart = memo(forwardRef(function GaugeChart({ value, min = 0, max = 100, unit = "%", label, thresholds, progress = true, showPointer = true, width = 220, height = 220, ...props }, ref) {
|
|
133
|
+
const { tokens } = useTheme();
|
|
134
|
+
const range = max - min;
|
|
135
|
+
const safeRange = range === 0 ? 1 : range;
|
|
136
|
+
const clampedValue = Math.max(min, Math.min(max, value));
|
|
137
|
+
const gaugeSize = Math.max(120, Math.min(typeof width === "number" ? width : typeof height === "number" ? height : 220, typeof height === "number" ? height : 220));
|
|
138
|
+
const compactGauge = gaugeSize < 170;
|
|
139
|
+
const arcWidth = Math.max(8, Math.round(gaugeSize * .07));
|
|
140
|
+
const valueFontSize = Math.max(16, Math.round(gaugeSize * .15));
|
|
141
|
+
const labelFontSize = Math.max(10, Math.round(gaugeSize * .07));
|
|
142
|
+
const unitSuffix = unit?.trim() ?? "";
|
|
143
|
+
const longUnit = unitSuffix.length > 4;
|
|
144
|
+
const series = [{
|
|
145
|
+
id: "gauge",
|
|
146
|
+
name: label || "Value",
|
|
147
|
+
type: "gauge",
|
|
148
|
+
data: [{
|
|
149
|
+
x: 0,
|
|
150
|
+
y: clampedValue
|
|
151
|
+
}]
|
|
152
|
+
}];
|
|
153
|
+
const colorStops = [...thresholds ?? []].filter((t) => Number.isFinite(t.value)).sort((a, b) => a.value - b.value).map((t) => [Math.max(0, Math.min(1, (t.value - min) / safeRange)), t.color]);
|
|
154
|
+
if (colorStops.length === 0) colorStops.push([.3, SOFT_STATUS_COLORS.normal], [.7, SOFT_STATUS_COLORS.caution], [1, SOFT_STATUS_COLORS.critical]);
|
|
155
|
+
else if (colorStops[colorStops.length - 1][0] < 1) colorStops.push([1, colorStops[colorStops.length - 1][1]]);
|
|
156
|
+
const activeColor = [...colorStops].reverse().find(([stop]) => stop <= (clampedValue - min) / safeRange)?.[1] ?? SOFT_STATUS_COLORS.normal;
|
|
157
|
+
return /* @__PURE__ */ jsx(AstroChart, {
|
|
158
|
+
ref,
|
|
159
|
+
type: "gauge",
|
|
160
|
+
series,
|
|
161
|
+
width,
|
|
162
|
+
height,
|
|
163
|
+
echartsOptions: { series: [{
|
|
164
|
+
type: "gauge",
|
|
165
|
+
min,
|
|
166
|
+
max,
|
|
167
|
+
progress: {
|
|
168
|
+
show: progress,
|
|
169
|
+
width: arcWidth,
|
|
170
|
+
roundCap: true
|
|
171
|
+
},
|
|
172
|
+
axisLine: { lineStyle: {
|
|
173
|
+
width: arcWidth,
|
|
174
|
+
color: colorStops
|
|
175
|
+
} },
|
|
176
|
+
axisTick: { show: false },
|
|
177
|
+
splitLine: { show: false },
|
|
178
|
+
axisLabel: { show: false },
|
|
179
|
+
pointer: {
|
|
180
|
+
show: showPointer,
|
|
181
|
+
length: compactGauge ? "56%" : "60%",
|
|
182
|
+
width: Math.max(3, Math.round(arcWidth * .38))
|
|
183
|
+
},
|
|
184
|
+
title: {
|
|
185
|
+
show: !!label,
|
|
186
|
+
offsetCenter: [0, compactGauge ? "73%" : "78%"],
|
|
187
|
+
fontSize: labelFontSize,
|
|
188
|
+
color: tokens.colors.text.secondary
|
|
189
|
+
},
|
|
190
|
+
detail: {
|
|
191
|
+
valueAnimation: true,
|
|
192
|
+
formatter: (currentValue) => {
|
|
193
|
+
const rounded = Math.round(currentValue);
|
|
194
|
+
if (!unitSuffix) return `${rounded}`;
|
|
195
|
+
if (longUnit) return `${rounded}\n{unit|${unitSuffix}}`;
|
|
196
|
+
return `${rounded}${unitSuffix}`;
|
|
197
|
+
},
|
|
198
|
+
rich: { unit: {
|
|
199
|
+
color: tokens.colors.text.secondary,
|
|
200
|
+
fontSize: Math.max(10, Math.round(valueFontSize * .48)),
|
|
201
|
+
fontWeight: 500,
|
|
202
|
+
lineHeight: Math.round(valueFontSize * .78)
|
|
203
|
+
} },
|
|
204
|
+
lineHeight: Math.round(valueFontSize * 1.05),
|
|
205
|
+
fontSize: valueFontSize,
|
|
206
|
+
fontWeight: 700,
|
|
207
|
+
offsetCenter: [0, compactGauge ? "10%" : "14%"],
|
|
208
|
+
color: activeColor
|
|
209
|
+
},
|
|
210
|
+
data: [{
|
|
211
|
+
value: clampedValue,
|
|
212
|
+
name: label
|
|
213
|
+
}]
|
|
214
|
+
}] },
|
|
215
|
+
...props
|
|
216
|
+
});
|
|
217
|
+
}));
|
|
218
|
+
var RadarChart = memo(forwardRef(function RadarChart({ indicators, areaStyle = true, series = [], ...props }, ref) {
|
|
219
|
+
const extractValues = (data) => {
|
|
220
|
+
if (!data || data.length === 0) return [];
|
|
221
|
+
const first = data[0];
|
|
222
|
+
if (typeof first === "number") return data;
|
|
223
|
+
if (typeof first === "object" && first !== null && "y" in first) return data.map((d) => d.y);
|
|
224
|
+
return [];
|
|
225
|
+
};
|
|
226
|
+
return /* @__PURE__ */ jsx(AstroChart, {
|
|
227
|
+
ref,
|
|
228
|
+
type: "radar",
|
|
229
|
+
series: [],
|
|
230
|
+
tooltip: { trigger: "item" },
|
|
231
|
+
echartsOptions: {
|
|
232
|
+
radar: {
|
|
233
|
+
indicator: indicators,
|
|
234
|
+
shape: "polygon"
|
|
235
|
+
},
|
|
236
|
+
series: series.map((s) => ({
|
|
237
|
+
type: "radar",
|
|
238
|
+
name: s.name,
|
|
239
|
+
data: [{
|
|
240
|
+
value: extractValues(s.data),
|
|
241
|
+
name: s.name
|
|
242
|
+
}],
|
|
243
|
+
areaStyle: areaStyle ? { opacity: .3 } : void 0
|
|
244
|
+
}))
|
|
245
|
+
},
|
|
246
|
+
...props
|
|
247
|
+
});
|
|
248
|
+
}));
|
|
249
|
+
var HeatmapChart = memo(forwardRef(function HeatmapChart({ xCategories, yCategories, valueRange = [0, 100], showLabels = true, series = [], ...props }, ref) {
|
|
250
|
+
const heatmapData = series[0]?.data;
|
|
251
|
+
return /* @__PURE__ */ jsx(AstroChart, {
|
|
252
|
+
ref,
|
|
253
|
+
type: "heatmap",
|
|
254
|
+
series,
|
|
255
|
+
xAxis: { type: "category" },
|
|
256
|
+
yAxis: { type: "category" },
|
|
257
|
+
tooltip: { trigger: "item" },
|
|
258
|
+
echartsOptions: {
|
|
259
|
+
xAxis: { data: xCategories },
|
|
260
|
+
yAxis: { data: yCategories },
|
|
261
|
+
visualMap: {
|
|
262
|
+
min: valueRange[0],
|
|
263
|
+
max: valueRange[1],
|
|
264
|
+
calculable: true,
|
|
265
|
+
orient: "horizontal",
|
|
266
|
+
left: "center",
|
|
267
|
+
bottom: "5%"
|
|
268
|
+
},
|
|
269
|
+
series: [{
|
|
270
|
+
type: "heatmap",
|
|
271
|
+
data: heatmapData,
|
|
272
|
+
label: { show: showLabels },
|
|
273
|
+
emphasis: { itemStyle: {
|
|
274
|
+
shadowBlur: 10,
|
|
275
|
+
shadowColor: "rgba(0, 0, 0, 0.5)"
|
|
276
|
+
} }
|
|
277
|
+
}]
|
|
278
|
+
},
|
|
279
|
+
...props
|
|
280
|
+
});
|
|
281
|
+
}));
|
|
282
|
+
var TimeSeriesChart = memo(forwardRef(function TimeSeriesChart({ timeWindow, maxPoints = 1e3, autoScroll = true, showCurrentValues: _showCurrentValues = true, series = [], ...props }, ref) {
|
|
283
|
+
const xAxis = {
|
|
284
|
+
type: "time",
|
|
285
|
+
...timeWindow ? {
|
|
286
|
+
min: "dataMin",
|
|
287
|
+
max: "dataMax"
|
|
288
|
+
} : {}
|
|
289
|
+
};
|
|
290
|
+
return /* @__PURE__ */ jsx(AstroChart, {
|
|
291
|
+
ref,
|
|
292
|
+
type: "line",
|
|
293
|
+
series: series.map((s) => ({
|
|
294
|
+
...s,
|
|
295
|
+
smooth: true,
|
|
296
|
+
symbol: { type: "none" }
|
|
297
|
+
})),
|
|
298
|
+
xAxis,
|
|
299
|
+
tooltip: {
|
|
300
|
+
trigger: "axis",
|
|
301
|
+
crosshair: "x"
|
|
302
|
+
},
|
|
303
|
+
zoom: autoScroll ? void 0 : {
|
|
304
|
+
enabled: true,
|
|
305
|
+
type: "both",
|
|
306
|
+
axis: "x"
|
|
307
|
+
},
|
|
308
|
+
realTime: {
|
|
309
|
+
enabled: true,
|
|
310
|
+
maxPoints,
|
|
311
|
+
timeWindow,
|
|
312
|
+
shift: autoScroll
|
|
313
|
+
},
|
|
314
|
+
...props
|
|
315
|
+
});
|
|
316
|
+
}));
|
|
317
|
+
var DualAxisChart = memo(forwardRef(function DualAxisChart({ leftAxis, rightAxis, series = [], ...props }, ref) {
|
|
318
|
+
return /* @__PURE__ */ jsx(AstroChart, {
|
|
319
|
+
ref,
|
|
320
|
+
type: "line",
|
|
321
|
+
series: series.map((s, i) => ({
|
|
322
|
+
...s,
|
|
323
|
+
yAxisIndex: s.yAxisIndex ?? i % 2
|
|
324
|
+
})),
|
|
325
|
+
yAxis: [{
|
|
326
|
+
position: "left",
|
|
327
|
+
...leftAxis
|
|
328
|
+
}, {
|
|
329
|
+
position: "right",
|
|
330
|
+
...rightAxis
|
|
331
|
+
}],
|
|
332
|
+
tooltip: {
|
|
333
|
+
trigger: "axis",
|
|
334
|
+
crosshair: "x"
|
|
335
|
+
},
|
|
336
|
+
...props
|
|
337
|
+
});
|
|
338
|
+
}));
|
|
339
|
+
var StackedAreaChart = memo(forwardRef(function StackedAreaChart(props, ref) {
|
|
340
|
+
return /* @__PURE__ */ jsx(AreaChart, {
|
|
341
|
+
ref,
|
|
342
|
+
stacked: true,
|
|
343
|
+
...props
|
|
344
|
+
});
|
|
345
|
+
}));
|
|
346
|
+
var StackedBarChart = memo(forwardRef(function StackedBarChart(props, ref) {
|
|
347
|
+
return /* @__PURE__ */ jsx(BarChart, {
|
|
348
|
+
ref,
|
|
349
|
+
stacked: true,
|
|
350
|
+
...props
|
|
351
|
+
});
|
|
352
|
+
}));
|
|
353
|
+
var BubbleChart = memo(forwardRef(function BubbleChart({ minSize = 10, maxSize = 60, showSizeLegend = true, series = [], ...props }, ref) {
|
|
354
|
+
return /* @__PURE__ */ jsx(AstroChart, {
|
|
355
|
+
ref,
|
|
356
|
+
type: "scatter",
|
|
357
|
+
series: series.map((s) => ({
|
|
358
|
+
...s,
|
|
359
|
+
type: "scatter"
|
|
360
|
+
})),
|
|
361
|
+
tooltip: { trigger: "item" },
|
|
362
|
+
echartsOptions: {
|
|
363
|
+
series: series.map((s, _idx) => {
|
|
364
|
+
const data = s.data;
|
|
365
|
+
return {
|
|
366
|
+
type: "scatter",
|
|
367
|
+
name: s.name,
|
|
368
|
+
data: data.map((d) => {
|
|
369
|
+
if (Array.isArray(d)) return d;
|
|
370
|
+
return [
|
|
371
|
+
d.x,
|
|
372
|
+
d.y,
|
|
373
|
+
d.size ?? 10
|
|
374
|
+
];
|
|
375
|
+
}),
|
|
376
|
+
symbolSize: (val) => {
|
|
377
|
+
const size = val[2] ?? minSize;
|
|
378
|
+
return Math.max(minSize, Math.min(maxSize, size));
|
|
379
|
+
}
|
|
380
|
+
};
|
|
381
|
+
}),
|
|
382
|
+
visualMap: showSizeLegend ? {
|
|
383
|
+
show: true,
|
|
384
|
+
dimension: 2,
|
|
385
|
+
min: 0,
|
|
386
|
+
max: 100,
|
|
387
|
+
inRange: { symbolSize: [minSize, maxSize] },
|
|
388
|
+
right: 10,
|
|
389
|
+
top: "center"
|
|
390
|
+
} : void 0
|
|
391
|
+
},
|
|
392
|
+
...props
|
|
393
|
+
});
|
|
394
|
+
}));
|
|
395
|
+
var HistogramChart = memo(forwardRef(function HistogramChart({ bins: _bins = 20, showCurve: _showCurve = false, series = [], xAxis, ...props }, ref) {
|
|
396
|
+
return /* @__PURE__ */ jsx(AstroChart, {
|
|
397
|
+
ref,
|
|
398
|
+
type: "bar",
|
|
399
|
+
series: series.map((s) => ({
|
|
400
|
+
...s,
|
|
401
|
+
type: "bar"
|
|
402
|
+
})),
|
|
403
|
+
xAxis: {
|
|
404
|
+
type: "category",
|
|
405
|
+
...xAxis
|
|
406
|
+
},
|
|
407
|
+
yAxis: {
|
|
408
|
+
type: "value",
|
|
409
|
+
name: "Frequency"
|
|
410
|
+
},
|
|
411
|
+
tooltip: { trigger: "axis" },
|
|
412
|
+
echartsOptions: { series: series.map((s) => ({
|
|
413
|
+
type: "bar",
|
|
414
|
+
name: s.name,
|
|
415
|
+
data: s.data,
|
|
416
|
+
barWidth: "90%",
|
|
417
|
+
itemStyle: { borderRadius: [
|
|
418
|
+
2,
|
|
419
|
+
2,
|
|
420
|
+
0,
|
|
421
|
+
0
|
|
422
|
+
] }
|
|
423
|
+
})) },
|
|
424
|
+
...props
|
|
425
|
+
});
|
|
426
|
+
}));
|
|
427
|
+
var SankeyChart = memo(forwardRef(function SankeyChart({ nodes = [], links = [], orient = "horizontal", ...props }, ref) {
|
|
428
|
+
const { tokens } = useTheme();
|
|
429
|
+
return /* @__PURE__ */ jsx(AstroChart, {
|
|
430
|
+
ref,
|
|
431
|
+
type: "sankey",
|
|
432
|
+
series: [],
|
|
433
|
+
echartsOptions: {
|
|
434
|
+
tooltip: {
|
|
435
|
+
trigger: "item",
|
|
436
|
+
triggerOn: "mousemove"
|
|
437
|
+
},
|
|
438
|
+
series: [{
|
|
439
|
+
type: "sankey",
|
|
440
|
+
orient,
|
|
441
|
+
layoutIterations: 32,
|
|
442
|
+
emphasis: { focus: "adjacency" },
|
|
443
|
+
nodeAlign: "justify",
|
|
444
|
+
lineStyle: {
|
|
445
|
+
color: "gradient",
|
|
446
|
+
curveness: .5
|
|
447
|
+
},
|
|
448
|
+
data: nodes,
|
|
449
|
+
links,
|
|
450
|
+
label: {
|
|
451
|
+
color: tokens.colors.text.primary,
|
|
452
|
+
fontSize: 12
|
|
453
|
+
}
|
|
454
|
+
}]
|
|
455
|
+
},
|
|
456
|
+
...props
|
|
457
|
+
});
|
|
458
|
+
}));
|
|
459
|
+
var TreemapChart = memo(forwardRef(function TreemapChart({ data = [], showBreadcrumb = true, leafDepth = 2, ...props }, ref) {
|
|
460
|
+
const { tokens } = useTheme();
|
|
461
|
+
return /* @__PURE__ */ jsx(AstroChart, {
|
|
462
|
+
ref,
|
|
463
|
+
type: "treemap",
|
|
464
|
+
series: [],
|
|
465
|
+
echartsOptions: {
|
|
466
|
+
tooltip: { formatter: ((info) => {
|
|
467
|
+
const value = info.value;
|
|
468
|
+
return `${info.name}: ${typeof value === "number" ? value.toLocaleString() : value}`;
|
|
469
|
+
}) },
|
|
470
|
+
series: [{
|
|
471
|
+
type: "treemap",
|
|
472
|
+
data,
|
|
473
|
+
leafDepth,
|
|
474
|
+
roam: false,
|
|
475
|
+
breadcrumb: {
|
|
476
|
+
show: showBreadcrumb,
|
|
477
|
+
bottom: 10,
|
|
478
|
+
itemStyle: { color: "rgba(100, 116, 139, 0.6)" }
|
|
479
|
+
},
|
|
480
|
+
label: {
|
|
481
|
+
show: true,
|
|
482
|
+
formatter: "{b}",
|
|
483
|
+
color: tokens.colors.text.primary,
|
|
484
|
+
fontSize: 12
|
|
485
|
+
},
|
|
486
|
+
upperLabel: {
|
|
487
|
+
show: true,
|
|
488
|
+
height: 30,
|
|
489
|
+
color: tokens.colors.text.secondary
|
|
490
|
+
},
|
|
491
|
+
itemStyle: {
|
|
492
|
+
borderColor: "rgba(100, 116, 139, 0.2)",
|
|
493
|
+
borderWidth: 2,
|
|
494
|
+
gapWidth: 2
|
|
495
|
+
},
|
|
496
|
+
levels: [
|
|
497
|
+
{
|
|
498
|
+
itemStyle: {
|
|
499
|
+
borderColor: "rgba(100, 116, 139, 0.3)",
|
|
500
|
+
borderWidth: 4,
|
|
501
|
+
gapWidth: 4
|
|
502
|
+
},
|
|
503
|
+
upperLabel: { show: false }
|
|
504
|
+
},
|
|
505
|
+
{
|
|
506
|
+
itemStyle: {
|
|
507
|
+
borderColor: "rgba(100, 116, 139, 0.25)",
|
|
508
|
+
borderWidth: 2,
|
|
509
|
+
gapWidth: 2
|
|
510
|
+
},
|
|
511
|
+
emphasis: { itemStyle: { borderColor: ASTRO_DATA_VIZ_COLORS.mixed[0] } }
|
|
512
|
+
},
|
|
513
|
+
{
|
|
514
|
+
colorSaturation: [.35, .5],
|
|
515
|
+
itemStyle: {
|
|
516
|
+
borderColor: "rgba(62, 60, 255, 0.3)",
|
|
517
|
+
borderWidth: 1
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
]
|
|
521
|
+
}]
|
|
522
|
+
},
|
|
523
|
+
...props
|
|
524
|
+
});
|
|
525
|
+
}));
|
|
526
|
+
var SunburstChart = memo(forwardRef(function SunburstChart({ data = [], innerRadius = "15%", outerRadius = "80%", ...props }, ref) {
|
|
527
|
+
const { tokens } = useTheme();
|
|
528
|
+
return /* @__PURE__ */ jsx(AstroChart, {
|
|
529
|
+
ref,
|
|
530
|
+
type: "sunburst",
|
|
531
|
+
series: [],
|
|
532
|
+
echartsOptions: {
|
|
533
|
+
tooltip: { trigger: "item" },
|
|
534
|
+
series: [{
|
|
535
|
+
type: "sunburst",
|
|
536
|
+
data,
|
|
537
|
+
radius: [innerRadius, outerRadius],
|
|
538
|
+
emphasis: { focus: "ancestor" },
|
|
539
|
+
label: {
|
|
540
|
+
rotate: "radial",
|
|
541
|
+
color: tokens.colors.text.secondary,
|
|
542
|
+
fontSize: 11
|
|
543
|
+
},
|
|
544
|
+
itemStyle: {
|
|
545
|
+
borderRadius: 4,
|
|
546
|
+
borderWidth: 2,
|
|
547
|
+
borderColor: "rgba(62, 60, 255, 0.25)"
|
|
548
|
+
},
|
|
549
|
+
levels: [
|
|
550
|
+
{},
|
|
551
|
+
{
|
|
552
|
+
r0: "15%",
|
|
553
|
+
r: "40%",
|
|
554
|
+
label: { rotate: "tangential" }
|
|
555
|
+
},
|
|
556
|
+
{
|
|
557
|
+
r0: "40%",
|
|
558
|
+
r: "65%"
|
|
559
|
+
},
|
|
560
|
+
{
|
|
561
|
+
r0: "65%",
|
|
562
|
+
r: "80%",
|
|
563
|
+
label: {
|
|
564
|
+
position: "outside",
|
|
565
|
+
fontSize: 10
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
]
|
|
569
|
+
}]
|
|
570
|
+
},
|
|
571
|
+
...props
|
|
572
|
+
});
|
|
573
|
+
}));
|
|
574
|
+
var ParallelChart = memo(forwardRef(function ParallelChart({ axes = [], data = [], lineStyle = {
|
|
575
|
+
opacity: .5,
|
|
576
|
+
width: 1.5
|
|
577
|
+
}, ...props }, ref) {
|
|
578
|
+
const { tokens } = useTheme();
|
|
579
|
+
return /* @__PURE__ */ jsx(AstroChart, {
|
|
580
|
+
ref,
|
|
581
|
+
type: "line",
|
|
582
|
+
series: [],
|
|
583
|
+
echartsOptions: {
|
|
584
|
+
parallelAxis: axes.map((axis) => ({
|
|
585
|
+
dim: axis.dim,
|
|
586
|
+
name: axis.name,
|
|
587
|
+
min: axis.min,
|
|
588
|
+
max: axis.max,
|
|
589
|
+
type: axis.type || "value",
|
|
590
|
+
data: axis.data,
|
|
591
|
+
nameTextStyle: { color: tokens.colors.text.secondary },
|
|
592
|
+
axisLine: { lineStyle: { color: "rgba(100, 116, 139, 0.3)" } },
|
|
593
|
+
axisTick: { lineStyle: { color: "rgba(100, 116, 139, 0.3)" } },
|
|
594
|
+
axisLabel: { color: tokens.colors.text.tertiary }
|
|
595
|
+
})),
|
|
596
|
+
parallel: {
|
|
597
|
+
left: 60,
|
|
598
|
+
right: 60,
|
|
599
|
+
bottom: 60,
|
|
600
|
+
top: 60,
|
|
601
|
+
parallelAxisDefault: {
|
|
602
|
+
type: "value",
|
|
603
|
+
nameLocation: "end",
|
|
604
|
+
nameGap: 20,
|
|
605
|
+
axisLine: { lineStyle: { color: "rgba(100, 116, 139, 0.3)" } },
|
|
606
|
+
axisTick: { lineStyle: { color: "rgba(100, 116, 139, 0.3)" } },
|
|
607
|
+
splitLine: { show: false },
|
|
608
|
+
axisLabel: { color: tokens.colors.text.tertiary }
|
|
609
|
+
}
|
|
610
|
+
},
|
|
611
|
+
series: [{
|
|
612
|
+
type: "parallel",
|
|
613
|
+
lineStyle: {
|
|
614
|
+
...lineStyle,
|
|
615
|
+
color: ASTRO_DATA_VIZ_COLORS.mixed[0]
|
|
616
|
+
},
|
|
617
|
+
data: data.map((row) => ({ value: row })),
|
|
618
|
+
emphasis: { lineStyle: {
|
|
619
|
+
width: 3,
|
|
620
|
+
opacity: 1
|
|
621
|
+
} }
|
|
622
|
+
}]
|
|
623
|
+
},
|
|
624
|
+
...props
|
|
625
|
+
});
|
|
626
|
+
}));
|
|
627
|
+
var CandlestickChart = memo(forwardRef(function CandlestickChart({ data = [], showVolume: _showVolume = false, ...props }, ref) {
|
|
628
|
+
const { tokens } = useTheme();
|
|
629
|
+
const categoryData = data.map((d) => d.time);
|
|
630
|
+
const ohlcData = data.map((d) => [
|
|
631
|
+
d.open,
|
|
632
|
+
d.close,
|
|
633
|
+
d.low,
|
|
634
|
+
d.high
|
|
635
|
+
]);
|
|
636
|
+
return /* @__PURE__ */ jsx(AstroChart, {
|
|
637
|
+
ref,
|
|
638
|
+
type: "candlestick",
|
|
639
|
+
series: [],
|
|
640
|
+
echartsOptions: {
|
|
641
|
+
tooltip: {
|
|
642
|
+
trigger: "axis",
|
|
643
|
+
axisPointer: { type: "cross" }
|
|
644
|
+
},
|
|
645
|
+
xAxis: {
|
|
646
|
+
type: "category",
|
|
647
|
+
data: categoryData,
|
|
648
|
+
axisLine: { lineStyle: { color: "rgba(100, 116, 139, 0.3)" } },
|
|
649
|
+
axisLabel: { color: tokens.colors.text.secondary }
|
|
650
|
+
},
|
|
651
|
+
yAxis: {
|
|
652
|
+
type: "value",
|
|
653
|
+
scale: true,
|
|
654
|
+
splitLine: { lineStyle: { color: "rgba(100, 116, 139, 0.15)" } },
|
|
655
|
+
axisLine: { lineStyle: { color: "rgba(100, 116, 139, 0.3)" } },
|
|
656
|
+
axisLabel: { color: tokens.colors.text.secondary }
|
|
657
|
+
},
|
|
658
|
+
series: [{
|
|
659
|
+
type: "candlestick",
|
|
660
|
+
data: ohlcData,
|
|
661
|
+
itemStyle: {
|
|
662
|
+
color: SOFT_STATUS_COLORS.normal,
|
|
663
|
+
color0: SOFT_STATUS_COLORS.critical,
|
|
664
|
+
borderColor: SOFT_STATUS_COLORS.normal,
|
|
665
|
+
borderColor0: SOFT_STATUS_COLORS.critical
|
|
666
|
+
}
|
|
667
|
+
}],
|
|
668
|
+
dataZoom: [{
|
|
669
|
+
type: "inside",
|
|
670
|
+
start: 0,
|
|
671
|
+
end: 100
|
|
672
|
+
}, {
|
|
673
|
+
show: true,
|
|
674
|
+
type: "slider",
|
|
675
|
+
bottom: 10
|
|
676
|
+
}]
|
|
677
|
+
},
|
|
678
|
+
...props
|
|
679
|
+
});
|
|
680
|
+
}));
|
|
681
|
+
var GraphChart = memo(forwardRef(function GraphChart({ nodes = [], links = [], categories = [], layout = "force", ...props }, ref) {
|
|
682
|
+
const { tokens } = useTheme();
|
|
683
|
+
return /* @__PURE__ */ jsx(AstroChart, {
|
|
684
|
+
ref,
|
|
685
|
+
type: "scatter",
|
|
686
|
+
series: [],
|
|
687
|
+
echartsOptions: {
|
|
688
|
+
tooltip: {},
|
|
689
|
+
legend: categories.length > 0 ? {
|
|
690
|
+
data: categories.map((c) => c.name),
|
|
691
|
+
textStyle: { color: tokens.colors.text.primary }
|
|
692
|
+
} : void 0,
|
|
693
|
+
series: [{
|
|
694
|
+
type: "graph",
|
|
695
|
+
layout,
|
|
696
|
+
data: nodes.map((n) => ({
|
|
697
|
+
...n,
|
|
698
|
+
symbolSize: n.symbolSize || 30
|
|
699
|
+
})),
|
|
700
|
+
links,
|
|
701
|
+
categories,
|
|
702
|
+
roam: true,
|
|
703
|
+
label: {
|
|
704
|
+
show: true,
|
|
705
|
+
position: "right",
|
|
706
|
+
formatter: "{b}",
|
|
707
|
+
color: tokens.colors.text.primary,
|
|
708
|
+
fontSize: 11
|
|
709
|
+
},
|
|
710
|
+
lineStyle: {
|
|
711
|
+
color: "source",
|
|
712
|
+
curveness: .3,
|
|
713
|
+
opacity: .6
|
|
714
|
+
},
|
|
715
|
+
emphasis: {
|
|
716
|
+
focus: "adjacency",
|
|
717
|
+
lineStyle: { width: 3 }
|
|
718
|
+
},
|
|
719
|
+
force: layout === "force" ? {
|
|
720
|
+
repulsion: 200,
|
|
721
|
+
edgeLength: [50, 150],
|
|
722
|
+
gravity: .1
|
|
723
|
+
} : void 0
|
|
724
|
+
}]
|
|
725
|
+
},
|
|
726
|
+
...props
|
|
727
|
+
});
|
|
728
|
+
}));
|
|
729
|
+
/**
|
|
730
|
+
* Calculate boxplot statistics from raw values
|
|
731
|
+
*/
|
|
844
732
|
function calculateBoxplotStats(values) {
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
733
|
+
const sorted = [...values].sort((a, b) => a - b);
|
|
734
|
+
const n = sorted.length;
|
|
735
|
+
const min = sorted[0];
|
|
736
|
+
const max = sorted[n - 1];
|
|
737
|
+
const median = n % 2 === 0 ? (sorted[n / 2 - 1] + sorted[n / 2]) / 2 : sorted[Math.floor(n / 2)];
|
|
738
|
+
const q1Index = Math.floor(n * .25);
|
|
739
|
+
const q3Index = Math.floor(n * .75);
|
|
740
|
+
const q1 = sorted[q1Index];
|
|
741
|
+
const q3 = sorted[q3Index];
|
|
742
|
+
const iqr = q3 - q1;
|
|
743
|
+
return [
|
|
744
|
+
Math.max(min, q1 - 1.5 * iqr),
|
|
745
|
+
q1,
|
|
746
|
+
median,
|
|
747
|
+
q3,
|
|
748
|
+
Math.min(max, q3 + 1.5 * iqr)
|
|
749
|
+
];
|
|
858
750
|
}
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
751
|
+
/**
|
|
752
|
+
* BoxPlotChart - Statistical distribution visualization
|
|
753
|
+
*
|
|
754
|
+
* Shows distribution of data through quartiles (box) and whiskers (range).
|
|
755
|
+
* Uses theme-aware colors from the data visualization palette.
|
|
756
|
+
*
|
|
757
|
+
* @example
|
|
758
|
+
* ```tsx
|
|
759
|
+
* <BoxPlotChart
|
|
760
|
+
* title="Score Distribution"
|
|
761
|
+
* data={[
|
|
762
|
+
* { name: 'Team A', values: [65, 72, 84, 91, 55, 88, 76] },
|
|
763
|
+
* { name: 'Team B', values: [78, 82, 95, 88, 70, 92, 85] },
|
|
764
|
+
* ]}
|
|
765
|
+
* />
|
|
766
|
+
* ```
|
|
767
|
+
*/
|
|
768
|
+
var BoxPlotChart = memo(forwardRef(function BoxPlotChart({ data = [], showOutliers = true, colors, horizontal = false, ...props }, ref) {
|
|
769
|
+
const { tokens } = useTheme();
|
|
770
|
+
const categories = data.map((d) => d.name);
|
|
771
|
+
const boxplotData = data.map((d, index) => {
|
|
772
|
+
return {
|
|
773
|
+
value: calculateBoxplotStats(d.values),
|
|
774
|
+
itemStyle: colors?.[index] ? {
|
|
775
|
+
color: colors[index],
|
|
776
|
+
borderColor: colors[index]
|
|
777
|
+
} : void 0
|
|
778
|
+
};
|
|
779
|
+
});
|
|
780
|
+
const outliers = [];
|
|
781
|
+
if (showOutliers) data.forEach((d, catIndex) => {
|
|
782
|
+
const sorted = [...d.values].sort((a, b) => a - b);
|
|
783
|
+
const n = sorted.length;
|
|
784
|
+
const q1Index = Math.floor(n * .25);
|
|
785
|
+
const q3Index = Math.floor(n * .75);
|
|
786
|
+
const q1 = sorted[q1Index];
|
|
787
|
+
const q3 = sorted[q3Index];
|
|
788
|
+
const iqr = q3 - q1;
|
|
789
|
+
const lowerBound = q1 - 1.5 * iqr;
|
|
790
|
+
const upperBound = q3 + 1.5 * iqr;
|
|
791
|
+
d.values.forEach((v) => {
|
|
792
|
+
if (v < lowerBound || v > upperBound) outliers.push([catIndex, v]);
|
|
793
|
+
});
|
|
794
|
+
});
|
|
795
|
+
const categoryAxis = {
|
|
796
|
+
type: "category",
|
|
797
|
+
data: categories,
|
|
798
|
+
boundaryGap: true,
|
|
799
|
+
axisLine: { lineStyle: { color: "rgba(100, 116, 139, 0.3)" } },
|
|
800
|
+
axisLabel: {
|
|
801
|
+
color: tokens.colors.text.secondary,
|
|
802
|
+
fontSize: 12
|
|
803
|
+
},
|
|
804
|
+
splitArea: { show: false }
|
|
805
|
+
};
|
|
806
|
+
const valueAxis = {
|
|
807
|
+
type: "value",
|
|
808
|
+
splitLine: { lineStyle: { color: "rgba(100, 116, 139, 0.15)" } },
|
|
809
|
+
axisLine: { lineStyle: { color: "rgba(100, 116, 139, 0.3)" } },
|
|
810
|
+
axisLabel: { color: tokens.colors.text.secondary }
|
|
811
|
+
};
|
|
812
|
+
return /* @__PURE__ */ jsx(AstroChart, {
|
|
813
|
+
ref,
|
|
814
|
+
type: "boxplot",
|
|
815
|
+
series: [],
|
|
816
|
+
echartsOptions: {
|
|
817
|
+
tooltip: {
|
|
818
|
+
trigger: "item",
|
|
819
|
+
axisPointer: { type: "shadow" },
|
|
820
|
+
formatter: (params) => {
|
|
821
|
+
if (params.seriesType === "boxplot") {
|
|
822
|
+
const value = params.value;
|
|
823
|
+
return `
|
|
927
824
|
<div style="font-weight: 600; margin-bottom: 4px;">${params.name}</div>
|
|
928
|
-
<div>Upper: ${
|
|
929
|
-
<div>Q3: ${
|
|
930
|
-
<div>Median: ${
|
|
931
|
-
<div>Q1: ${
|
|
932
|
-
<div>Lower: ${
|
|
825
|
+
<div>Upper: ${value[5]?.toFixed(1) ?? value[4]?.toFixed(1)}</div>
|
|
826
|
+
<div>Q3: ${value[4]?.toFixed(1) ?? value[3]?.toFixed(1)}</div>
|
|
827
|
+
<div>Median: ${value[3]?.toFixed(1) ?? value[2]?.toFixed(1)}</div>
|
|
828
|
+
<div>Q1: ${value[2]?.toFixed(1) ?? value[1]?.toFixed(1)}</div>
|
|
829
|
+
<div>Lower: ${value[1]?.toFixed(1) ?? value[0]?.toFixed(1)}</div>
|
|
933
830
|
`;
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
}
|
|
968
|
-
}] : []
|
|
969
|
-
]
|
|
970
|
-
},
|
|
971
|
-
...props
|
|
972
|
-
}
|
|
973
|
-
);
|
|
974
|
-
}
|
|
975
|
-
));
|
|
976
|
-
export {
|
|
977
|
-
AreaChart,
|
|
978
|
-
BarChart,
|
|
979
|
-
BoxPlotChart,
|
|
980
|
-
BubbleChart,
|
|
981
|
-
CandlestickChart,
|
|
982
|
-
DonutChart,
|
|
983
|
-
DualAxisChart,
|
|
984
|
-
GaugeChart,
|
|
985
|
-
GraphChart,
|
|
986
|
-
HeatmapChart,
|
|
987
|
-
HistogramChart,
|
|
988
|
-
LineChart,
|
|
989
|
-
ParallelChart,
|
|
990
|
-
PieChart,
|
|
991
|
-
RadarChart,
|
|
992
|
-
SankeyChart,
|
|
993
|
-
ScatterChart,
|
|
994
|
-
StackedAreaChart,
|
|
995
|
-
StackedBarChart,
|
|
996
|
-
SunburstChart,
|
|
997
|
-
TimeSeriesChart,
|
|
998
|
-
TreemapChart
|
|
999
|
-
};
|
|
1000
|
-
//# sourceMappingURL=presets.js.map
|
|
831
|
+
}
|
|
832
|
+
return `Outlier: ${params.value[1]}`;
|
|
833
|
+
}
|
|
834
|
+
},
|
|
835
|
+
grid: {
|
|
836
|
+
left: "10%",
|
|
837
|
+
right: "10%",
|
|
838
|
+
bottom: "15%",
|
|
839
|
+
top: "15%"
|
|
840
|
+
},
|
|
841
|
+
xAxis: horizontal ? valueAxis : categoryAxis,
|
|
842
|
+
yAxis: horizontal ? categoryAxis : valueAxis,
|
|
843
|
+
series: [{
|
|
844
|
+
name: "boxplot",
|
|
845
|
+
type: "boxplot",
|
|
846
|
+
data: boxplotData,
|
|
847
|
+
itemStyle: { borderWidth: 2 },
|
|
848
|
+
emphasis: { itemStyle: { borderWidth: 3 } }
|
|
849
|
+
}, ...showOutliers && outliers.length > 0 ? [{
|
|
850
|
+
name: "outlier",
|
|
851
|
+
type: "scatter",
|
|
852
|
+
data: outliers,
|
|
853
|
+
symbolSize: 8,
|
|
854
|
+
itemStyle: { color: SOFT_STATUS_COLORS.caution }
|
|
855
|
+
}] : []]
|
|
856
|
+
},
|
|
857
|
+
...props
|
|
858
|
+
});
|
|
859
|
+
}));
|
|
860
|
+
//#endregion
|
|
861
|
+
export { AreaChart, BarChart, BoxPlotChart, BubbleChart, CandlestickChart, DonutChart, DualAxisChart, GaugeChart, GraphChart, HeatmapChart, HistogramChart, LineChart, ParallelChart, PieChart, RadarChart, SankeyChart, ScatterChart, StackedAreaChart, StackedBarChart, SunburstChart, TimeSeriesChart, TreemapChart };
|
|
862
|
+
|
|
863
|
+
//# sourceMappingURL=presets.js.map
|