@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,665 +1,629 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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
|
-
// 20% black overlay
|
|
37
|
-
purpleDeep: "#5F4499",
|
|
38
|
-
// 35% black overlay
|
|
39
|
-
// === Prussian Blue Shades ===
|
|
40
|
-
prussianBlueLighter: "#4A5FD6",
|
|
41
|
-
// 35% white overlay
|
|
42
|
-
prussianBlueLight: "#3548C0",
|
|
43
|
-
// 20% white overlay
|
|
44
|
-
prussianBlueSoft: "#2838B0",
|
|
45
|
-
// 10% white overlay
|
|
46
|
-
prussianBlueDark: "#182890",
|
|
47
|
-
// 10% black overlay
|
|
48
|
-
prussianBlueDarker: "#142380",
|
|
49
|
-
// 20% black overlay
|
|
50
|
-
prussianBlueDeep: "#0F1A60"
|
|
51
|
-
// 35% black overlay
|
|
1
|
+
//#region src/react/charts/unified/theme.ts
|
|
2
|
+
/**
|
|
3
|
+
* Zendir Brand Colors (from Brand Guide v2026)
|
|
4
|
+
* Core: Electric (#3E3CFF), Purple (#9D70FF), Prussian Blue (#1B2DA0)
|
|
5
|
+
* Shades derived using 10%, 20%, 35% white/black overlays per brand guide
|
|
6
|
+
*/
|
|
7
|
+
var ZENDIR_BRAND_COLORS = {
|
|
8
|
+
/** Electric - Primary accent (#3E3CFF) */
|
|
9
|
+
electric: "#3E3CFF",
|
|
10
|
+
/** Purple - Secondary accent (#9D70FF) */
|
|
11
|
+
purple: "#9D70FF",
|
|
12
|
+
/** Prussian Blue - Subsections (#1B2DA0) */
|
|
13
|
+
prussianBlue: "#1B2DA0",
|
|
14
|
+
/** Black */
|
|
15
|
+
black: "#000000",
|
|
16
|
+
/** White */
|
|
17
|
+
white: "#FFFFFF",
|
|
18
|
+
electricLighter: "#9997FF",
|
|
19
|
+
electricLight: "#6B69FF",
|
|
20
|
+
electricSoft: "#5250FF",
|
|
21
|
+
electricDark: "#3836E6",
|
|
22
|
+
electricDarker: "#3230CC",
|
|
23
|
+
electricDeep: "#2926A3",
|
|
24
|
+
purpleLighter: "#C9A8FF",
|
|
25
|
+
purpleLight: "#B48DFF",
|
|
26
|
+
purpleSoft: "#A97FFF",
|
|
27
|
+
purpleDark: "#8E64E6",
|
|
28
|
+
purpleDarker: "#7E5ACC",
|
|
29
|
+
purpleDeep: "#5F4499",
|
|
30
|
+
prussianBlueLighter: "#4A5FD6",
|
|
31
|
+
prussianBlueLight: "#3548C0",
|
|
32
|
+
prussianBlueSoft: "#2838B0",
|
|
33
|
+
prussianBlueDark: "#182890",
|
|
34
|
+
prussianBlueDarker: "#142380",
|
|
35
|
+
prussianBlueDeep: "#0F1A60"
|
|
52
36
|
};
|
|
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
|
-
|
|
37
|
+
/**
|
|
38
|
+
* Official AstroUXDS Data Visualization Color Palette
|
|
39
|
+
* Per https://astrouxds.com/design-tokens/system/#data-viz
|
|
40
|
+
*
|
|
41
|
+
* These are the OFFICIAL AstroUXDS data visualization colors from the design system.
|
|
42
|
+
* Use these for pure AstroUXDS compliance (e.g., 'astro' theme).
|
|
43
|
+
*
|
|
44
|
+
* @see https://astrouxds.com/design-tokens/system/
|
|
45
|
+
*/
|
|
46
|
+
var OFFICIAL_ASTRO_DATA_VIZ_COLORS = {
|
|
47
|
+
/** Official AstroUXDS data visualization palette (8 colors) */
|
|
48
|
+
primary: [
|
|
49
|
+
"#00c7cb",
|
|
50
|
+
"#938bdb",
|
|
51
|
+
"#4dacff",
|
|
52
|
+
"#70dde0",
|
|
53
|
+
"#c9c5ed",
|
|
54
|
+
"#92cbff",
|
|
55
|
+
"#a1e9eb",
|
|
56
|
+
"#b7dcff"
|
|
57
|
+
],
|
|
58
|
+
/** Extended palette - primary + additional derived colors for 11 max */
|
|
59
|
+
extended: [
|
|
60
|
+
"#00c7cb",
|
|
61
|
+
"#938bdb",
|
|
62
|
+
"#4dacff",
|
|
63
|
+
"#70dde0",
|
|
64
|
+
"#c9c5ed",
|
|
65
|
+
"#92cbff",
|
|
66
|
+
"#a1e9eb",
|
|
67
|
+
"#b7dcff",
|
|
68
|
+
"#009a9d",
|
|
69
|
+
"#756bb8",
|
|
70
|
+
"#2b659b"
|
|
71
|
+
],
|
|
72
|
+
/** Sequential palettes for heatmaps using AstroUXDS colors */
|
|
73
|
+
sequential: {
|
|
74
|
+
/** Teal sequential */
|
|
75
|
+
teal: [
|
|
76
|
+
"#e5f9f9",
|
|
77
|
+
"#a1e9eb",
|
|
78
|
+
"#70dde0",
|
|
79
|
+
"#00c7cb",
|
|
80
|
+
"#009a9d",
|
|
81
|
+
"#006e70"
|
|
82
|
+
],
|
|
83
|
+
/** Purple sequential */
|
|
84
|
+
purple: [
|
|
85
|
+
"#eceaf7",
|
|
86
|
+
"#c9c5ed",
|
|
87
|
+
"#a9a3dc",
|
|
88
|
+
"#938bdb",
|
|
89
|
+
"#756bb8",
|
|
90
|
+
"#5b5299"
|
|
91
|
+
],
|
|
92
|
+
/** Brightblue sequential */
|
|
93
|
+
brightblue: [
|
|
94
|
+
"#e8f4ff",
|
|
95
|
+
"#b7dcff",
|
|
96
|
+
"#92cbff",
|
|
97
|
+
"#4dacff",
|
|
98
|
+
"#2b659b",
|
|
99
|
+
"#1c3f5e"
|
|
100
|
+
],
|
|
101
|
+
/** Thermal - Status colors for temperature */
|
|
102
|
+
thermal: [
|
|
103
|
+
"#00c7cb",
|
|
104
|
+
"#56f000",
|
|
105
|
+
"#fce83a",
|
|
106
|
+
"#ffb302",
|
|
107
|
+
"#ff6b35",
|
|
108
|
+
"#ff3838"
|
|
109
|
+
]
|
|
110
|
+
}
|
|
109
111
|
};
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
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
|
-
// #9D70FF
|
|
291
|
-
ZENDIR_BRAND_COLORS.purpleLight
|
|
292
|
-
// #B48DFF
|
|
293
|
-
],
|
|
294
|
-
/**
|
|
295
|
-
* Sequential palettes for heatmaps and gradual data
|
|
296
|
-
* Zendir brand-forward gradients
|
|
297
|
-
*/
|
|
298
|
-
sequential: {
|
|
299
|
-
/** Zendir Electric sequential - Primary brand gradient */
|
|
300
|
-
electric: ["#E8E8FF", "#C9C8FF", "#9997FF", "#6B69FF", "#3E3CFF", "#3230CC", "#262499"],
|
|
301
|
-
/** Zendir Purple sequential - Secondary brand gradient */
|
|
302
|
-
purple: ["#F0E8FF", "#DCC4FF", "#C9A8FF", "#B48DFF", "#9D70FF", "#7E5ACC", "#5F4499"],
|
|
303
|
-
/** Zendir Prussian Blue sequential - Deep brand gradient */
|
|
304
|
-
prussianBlue: ["#E8ECFF", "#C5CFF0", "#8A9DD6", "#4A5FD6", "#3548C0", "#1B2DA0", "#0F1A60"],
|
|
305
|
-
/** Zendir gradient - Electric → Purple blend */
|
|
306
|
-
brand: ["#3E3CFF", "#5250FF", "#6B69FF", "#7E70FF", "#9D70FF", "#B48DFF", "#C9A8FF"],
|
|
307
|
-
/** Thermal - Status colors for temperature (AstroUXDS compliant) */
|
|
308
|
-
thermal: ["#00C7CB", "#56F000", "#FCE83A", "#FFB302", "#FF6B35", "#FF3838"]
|
|
309
|
-
}
|
|
112
|
+
/**
|
|
113
|
+
* Zendir-branded Data Visualization Color Palette
|
|
114
|
+
* Uses Zendir brand colors (Electric, Purple, Prussian Blue)
|
|
115
|
+
* while maintaining AstroUXDS compliance (max 11 colors, colorblind-accessible)
|
|
116
|
+
*
|
|
117
|
+
* @see https://www.astrouxds.com/patterns/data-visualization/
|
|
118
|
+
*/
|
|
119
|
+
var ASTRO_DATA_VIZ_COLORS = {
|
|
120
|
+
/**
|
|
121
|
+
* Primary data visualization palette - Pure Zendir Brand
|
|
122
|
+
* Uses only Zendir brand colors and their derived shades
|
|
123
|
+
* Max 11 colors per AstroUXDS compliance requirement 3.2.1
|
|
124
|
+
*
|
|
125
|
+
* NOTE: Status colors (green, yellow, red) reserved for status indication only
|
|
126
|
+
*/
|
|
127
|
+
mixed: [
|
|
128
|
+
ZENDIR_BRAND_COLORS.electric,
|
|
129
|
+
ZENDIR_BRAND_COLORS.purple,
|
|
130
|
+
ZENDIR_BRAND_COLORS.electricLight,
|
|
131
|
+
ZENDIR_BRAND_COLORS.purpleLight,
|
|
132
|
+
ZENDIR_BRAND_COLORS.prussianBlueLight,
|
|
133
|
+
ZENDIR_BRAND_COLORS.electricLighter,
|
|
134
|
+
ZENDIR_BRAND_COLORS.purpleLighter,
|
|
135
|
+
ZENDIR_BRAND_COLORS.prussianBlue,
|
|
136
|
+
ZENDIR_BRAND_COLORS.electricDarker,
|
|
137
|
+
ZENDIR_BRAND_COLORS.purpleDarker,
|
|
138
|
+
ZENDIR_BRAND_COLORS.prussianBlueLighter
|
|
139
|
+
],
|
|
140
|
+
/**
|
|
141
|
+
* Zendir Brand palette - Full brand spectrum
|
|
142
|
+
* Complete set of Zendir brand colors for maximum brand expression
|
|
143
|
+
*/
|
|
144
|
+
zendir: [
|
|
145
|
+
ZENDIR_BRAND_COLORS.electric,
|
|
146
|
+
ZENDIR_BRAND_COLORS.purple,
|
|
147
|
+
ZENDIR_BRAND_COLORS.electricLight,
|
|
148
|
+
ZENDIR_BRAND_COLORS.purpleLight,
|
|
149
|
+
ZENDIR_BRAND_COLORS.prussianBlue,
|
|
150
|
+
ZENDIR_BRAND_COLORS.electricLighter,
|
|
151
|
+
ZENDIR_BRAND_COLORS.purpleLighter,
|
|
152
|
+
ZENDIR_BRAND_COLORS.prussianBlueLight
|
|
153
|
+
],
|
|
154
|
+
/**
|
|
155
|
+
* Extended Zendir palette - All shades for complex visualizations
|
|
156
|
+
* Includes dark and light variants for maximum differentiation
|
|
157
|
+
*/
|
|
158
|
+
zendirExtended: [
|
|
159
|
+
ZENDIR_BRAND_COLORS.electric,
|
|
160
|
+
ZENDIR_BRAND_COLORS.purple,
|
|
161
|
+
ZENDIR_BRAND_COLORS.prussianBlue,
|
|
162
|
+
ZENDIR_BRAND_COLORS.electricLight,
|
|
163
|
+
ZENDIR_BRAND_COLORS.purpleLight,
|
|
164
|
+
ZENDIR_BRAND_COLORS.prussianBlueLight,
|
|
165
|
+
ZENDIR_BRAND_COLORS.electricLighter,
|
|
166
|
+
ZENDIR_BRAND_COLORS.purpleLighter,
|
|
167
|
+
ZENDIR_BRAND_COLORS.electricDarker,
|
|
168
|
+
ZENDIR_BRAND_COLORS.purpleDarker,
|
|
169
|
+
ZENDIR_BRAND_COLORS.prussianBlueDarker
|
|
170
|
+
],
|
|
171
|
+
/**
|
|
172
|
+
* Cool palette - Blues and purples
|
|
173
|
+
* Professional Zendir-branded cool tones
|
|
174
|
+
*/
|
|
175
|
+
cool: [
|
|
176
|
+
ZENDIR_BRAND_COLORS.electric,
|
|
177
|
+
ZENDIR_BRAND_COLORS.prussianBlue,
|
|
178
|
+
ZENDIR_BRAND_COLORS.purple,
|
|
179
|
+
ZENDIR_BRAND_COLORS.electricLight,
|
|
180
|
+
ZENDIR_BRAND_COLORS.prussianBlueLight,
|
|
181
|
+
ZENDIR_BRAND_COLORS.purpleLight,
|
|
182
|
+
ZENDIR_BRAND_COLORS.electricLighter,
|
|
183
|
+
ZENDIR_BRAND_COLORS.prussianBlueLighter
|
|
184
|
+
],
|
|
185
|
+
/**
|
|
186
|
+
* Warm accent palette - For charts needing warm tones
|
|
187
|
+
* Use sparingly - not part of Zendir brand
|
|
188
|
+
*/
|
|
189
|
+
warm: [
|
|
190
|
+
"#ffb302",
|
|
191
|
+
"#ff9966",
|
|
192
|
+
"#fce83a",
|
|
193
|
+
"#ff6b6b",
|
|
194
|
+
"#f0a000",
|
|
195
|
+
"#ffcc80",
|
|
196
|
+
"#e0a86c",
|
|
197
|
+
"#d4b896"
|
|
198
|
+
],
|
|
199
|
+
/**
|
|
200
|
+
* Electric-Purple gradient palette (Zendir brand gradient)
|
|
201
|
+
* Matches the official brand gradient from Electric to Purple
|
|
202
|
+
*/
|
|
203
|
+
electricPurple: [
|
|
204
|
+
ZENDIR_BRAND_COLORS.electric,
|
|
205
|
+
ZENDIR_BRAND_COLORS.electricSoft,
|
|
206
|
+
ZENDIR_BRAND_COLORS.electricLight,
|
|
207
|
+
"#8070FF",
|
|
208
|
+
ZENDIR_BRAND_COLORS.purple,
|
|
209
|
+
ZENDIR_BRAND_COLORS.purpleLight,
|
|
210
|
+
ZENDIR_BRAND_COLORS.purpleLighter,
|
|
211
|
+
"#DCC4FF"
|
|
212
|
+
],
|
|
213
|
+
/**
|
|
214
|
+
* Prussian-Electric gradient palette
|
|
215
|
+
* Deep to vibrant brand progression
|
|
216
|
+
*/
|
|
217
|
+
prussianElectric: [
|
|
218
|
+
ZENDIR_BRAND_COLORS.prussianBlueDarker,
|
|
219
|
+
ZENDIR_BRAND_COLORS.prussianBlue,
|
|
220
|
+
ZENDIR_BRAND_COLORS.prussianBlueLight,
|
|
221
|
+
ZENDIR_BRAND_COLORS.electricDarker,
|
|
222
|
+
ZENDIR_BRAND_COLORS.electric,
|
|
223
|
+
ZENDIR_BRAND_COLORS.electricLight
|
|
224
|
+
],
|
|
225
|
+
/**
|
|
226
|
+
* Full Zendir spectrum gradient
|
|
227
|
+
* Prussian Blue → Electric → Purple
|
|
228
|
+
*/
|
|
229
|
+
zendirSpectrum: [
|
|
230
|
+
ZENDIR_BRAND_COLORS.prussianBlue,
|
|
231
|
+
ZENDIR_BRAND_COLORS.prussianBlueLight,
|
|
232
|
+
ZENDIR_BRAND_COLORS.electric,
|
|
233
|
+
ZENDIR_BRAND_COLORS.electricLight,
|
|
234
|
+
ZENDIR_BRAND_COLORS.purple,
|
|
235
|
+
ZENDIR_BRAND_COLORS.purpleLight
|
|
236
|
+
],
|
|
237
|
+
/**
|
|
238
|
+
* Sequential palettes for heatmaps and gradual data
|
|
239
|
+
* Zendir brand-forward gradients
|
|
240
|
+
*/
|
|
241
|
+
sequential: {
|
|
242
|
+
/** Zendir Electric sequential - Primary brand gradient */
|
|
243
|
+
electric: [
|
|
244
|
+
"#E8E8FF",
|
|
245
|
+
"#C9C8FF",
|
|
246
|
+
"#9997FF",
|
|
247
|
+
"#6B69FF",
|
|
248
|
+
"#3E3CFF",
|
|
249
|
+
"#3230CC",
|
|
250
|
+
"#262499"
|
|
251
|
+
],
|
|
252
|
+
/** Zendir Purple sequential - Secondary brand gradient */
|
|
253
|
+
purple: [
|
|
254
|
+
"#F0E8FF",
|
|
255
|
+
"#DCC4FF",
|
|
256
|
+
"#C9A8FF",
|
|
257
|
+
"#B48DFF",
|
|
258
|
+
"#9D70FF",
|
|
259
|
+
"#7E5ACC",
|
|
260
|
+
"#5F4499"
|
|
261
|
+
],
|
|
262
|
+
/** Zendir Prussian Blue sequential - Deep brand gradient */
|
|
263
|
+
prussianBlue: [
|
|
264
|
+
"#E8ECFF",
|
|
265
|
+
"#C5CFF0",
|
|
266
|
+
"#8A9DD6",
|
|
267
|
+
"#4A5FD6",
|
|
268
|
+
"#3548C0",
|
|
269
|
+
"#1B2DA0",
|
|
270
|
+
"#0F1A60"
|
|
271
|
+
],
|
|
272
|
+
/** Zendir gradient - Electric → Purple blend */
|
|
273
|
+
brand: [
|
|
274
|
+
"#3E3CFF",
|
|
275
|
+
"#5250FF",
|
|
276
|
+
"#6B69FF",
|
|
277
|
+
"#7E70FF",
|
|
278
|
+
"#9D70FF",
|
|
279
|
+
"#B48DFF",
|
|
280
|
+
"#C9A8FF"
|
|
281
|
+
],
|
|
282
|
+
/** Thermal - Status colors for temperature (AstroUXDS compliant) */
|
|
283
|
+
thermal: [
|
|
284
|
+
"#00C7CB",
|
|
285
|
+
"#56F000",
|
|
286
|
+
"#FCE83A",
|
|
287
|
+
"#FFB302",
|
|
288
|
+
"#FF6B35",
|
|
289
|
+
"#FF3838"
|
|
290
|
+
]
|
|
291
|
+
}
|
|
310
292
|
};
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
293
|
+
/**
|
|
294
|
+
* AstroUXDS Status Colors (DO NOT MODIFY)
|
|
295
|
+
* Per https://www.astrouxds.com/patterns/status-system/
|
|
296
|
+
*
|
|
297
|
+
* These colors are RESERVED for status indication only.
|
|
298
|
+
* Per compliance requirement, do not use status colors for
|
|
299
|
+
* non-status data visualization.
|
|
300
|
+
*
|
|
301
|
+
* @see https://www.astrouxds.com/compliance/astro-design-compliance/
|
|
302
|
+
* Rule 3.1.2: Elements indicating state shall use only specified Status Colors
|
|
303
|
+
*/
|
|
304
|
+
var STATUS_COLORS = {
|
|
305
|
+
normal: "#56f000",
|
|
306
|
+
standby: "#2dccff",
|
|
307
|
+
caution: "#fce83a",
|
|
308
|
+
serious: "#ffb302",
|
|
309
|
+
critical: "#ff3838",
|
|
310
|
+
off: "#a4abb6"
|
|
324
311
|
};
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
312
|
+
ZENDIR_BRAND_COLORS.electric, ZENDIR_BRAND_COLORS.purple, ZENDIR_BRAND_COLORS.prussianBlue, ZENDIR_BRAND_COLORS.prussianBlueLight, ZENDIR_BRAND_COLORS.electricLight;
|
|
313
|
+
/**
|
|
314
|
+
* Generate ECharts theme from Astro tokens
|
|
315
|
+
*
|
|
316
|
+
* Creates a theme that:
|
|
317
|
+
* - Uses official AstroUXDS colors for 'astro' theme variant
|
|
318
|
+
* - Uses Zendir brand colors for all other theme variants
|
|
319
|
+
* - Maintains AstroUXDS compliance (max 11 colors, 14pt min font)
|
|
320
|
+
* - Preserves status colors for their reserved purposes
|
|
321
|
+
* - Supports both dark and light modes
|
|
322
|
+
*
|
|
323
|
+
* @param tokens - Theme tokens from ThemeProvider
|
|
324
|
+
* @param mode - Current theme mode ('dark' | 'light')
|
|
325
|
+
* @param themeVariant - Optional theme variant to determine color palette
|
|
326
|
+
* @returns ECharts theme configuration
|
|
327
|
+
*/
|
|
337
328
|
function createAstroEChartsTheme(tokens, mode, themeVariant) {
|
|
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
|
-
tooltip: {
|
|
386
|
-
backgroundColor: isDark ? "rgba(27, 45, 62, 0.95)" : "rgba(255, 255, 255, 0.95)",
|
|
387
|
-
borderColor: tokens.colors.border.default,
|
|
388
|
-
borderWidth: 1,
|
|
389
|
-
textStyle: {
|
|
390
|
-
color: tokens.colors.text.primary,
|
|
391
|
-
fontSize: 12,
|
|
392
|
-
textBorderWidth: 0,
|
|
393
|
-
textBorderColor: "transparent"
|
|
394
|
-
},
|
|
395
|
-
extraCssText: `
|
|
329
|
+
const isDark = mode === "dark";
|
|
330
|
+
const isAstroTheme = themeVariant === "astro";
|
|
331
|
+
return {
|
|
332
|
+
color: isAstroTheme ? [...OFFICIAL_ASTRO_DATA_VIZ_COLORS.extended] : ASTRO_DATA_VIZ_COLORS.mixed,
|
|
333
|
+
backgroundColor: "transparent",
|
|
334
|
+
textStyle: {
|
|
335
|
+
color: tokens.colors.text.primary,
|
|
336
|
+
fontFamily: tokens.typography.fontFamily.primary,
|
|
337
|
+
fontSize: 14,
|
|
338
|
+
textBorderWidth: 0,
|
|
339
|
+
textBorderColor: "transparent"
|
|
340
|
+
},
|
|
341
|
+
title: {
|
|
342
|
+
textStyle: {
|
|
343
|
+
color: tokens.colors.text.secondary,
|
|
344
|
+
fontSize: 14,
|
|
345
|
+
fontWeight: "bold",
|
|
346
|
+
textBorderWidth: 0,
|
|
347
|
+
textBorderColor: "transparent"
|
|
348
|
+
},
|
|
349
|
+
subtextStyle: {
|
|
350
|
+
color: tokens.colors.text.tertiary,
|
|
351
|
+
fontSize: 12,
|
|
352
|
+
textBorderWidth: 0,
|
|
353
|
+
textBorderColor: "transparent"
|
|
354
|
+
}
|
|
355
|
+
},
|
|
356
|
+
legend: {
|
|
357
|
+
textStyle: {
|
|
358
|
+
color: tokens.colors.text.secondary,
|
|
359
|
+
fontSize: 12,
|
|
360
|
+
textBorderWidth: 0,
|
|
361
|
+
textBorderColor: "transparent"
|
|
362
|
+
},
|
|
363
|
+
inactiveColor: tokens.colors.text.tertiary
|
|
364
|
+
},
|
|
365
|
+
tooltip: {
|
|
366
|
+
backgroundColor: isDark ? "rgba(27, 45, 62, 0.95)" : "rgba(255, 255, 255, 0.95)",
|
|
367
|
+
borderColor: tokens.colors.border.default,
|
|
368
|
+
borderWidth: 1,
|
|
369
|
+
textStyle: {
|
|
370
|
+
color: tokens.colors.text.primary,
|
|
371
|
+
fontSize: 12,
|
|
372
|
+
textBorderWidth: 0,
|
|
373
|
+
textBorderColor: "transparent"
|
|
374
|
+
},
|
|
375
|
+
extraCssText: `
|
|
396
376
|
border-radius: ${tokens.borderRadius.md};
|
|
397
377
|
box-shadow: ${tokens.shadows.lg};
|
|
398
378
|
backdrop-filter: blur(8px);
|
|
399
379
|
`
|
|
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
|
-
fontSize: 12
|
|
504
|
-
}
|
|
505
|
-
},
|
|
506
|
-
scatter: {
|
|
507
|
-
symbolSize: 10
|
|
508
|
-
},
|
|
509
|
-
gauge: {
|
|
510
|
-
axisLine: {
|
|
511
|
-
lineStyle: {
|
|
512
|
-
width: 10
|
|
513
|
-
}
|
|
514
|
-
}
|
|
515
|
-
}
|
|
516
|
-
},
|
|
517
|
-
// Data zoom - Theme-aware interactive controls
|
|
518
|
-
dataZoom: {
|
|
519
|
-
backgroundColor: isDark ? "rgba(27, 45, 62, 0.5)" : "rgba(234, 238, 244, 0.5)",
|
|
520
|
-
borderColor: tokens.colors.border.muted,
|
|
521
|
-
// Astro theme uses brightblue, others use Zendir Electric
|
|
522
|
-
fillerColor: isAstroTheme ? "rgba(77, 172, 255, 0.15)" : "rgba(62, 60, 255, 0.15)",
|
|
523
|
-
// Zendir Electric
|
|
524
|
-
handleColor: isAstroTheme ? "#4dacff" : ZENDIR_BRAND_COLORS.electric,
|
|
525
|
-
// Zendir Electric
|
|
526
|
-
textStyle: {
|
|
527
|
-
color: tokens.colors.text.secondary,
|
|
528
|
-
textBorderWidth: 0,
|
|
529
|
-
textBorderColor: "transparent"
|
|
530
|
-
}
|
|
531
|
-
},
|
|
532
|
-
// Visual map (for heatmaps) - Theme-aware sequential palette
|
|
533
|
-
visualMap: {
|
|
534
|
-
textStyle: {
|
|
535
|
-
color: tokens.colors.text.secondary,
|
|
536
|
-
textBorderWidth: 0,
|
|
537
|
-
textBorderColor: "transparent"
|
|
538
|
-
},
|
|
539
|
-
inRange: {
|
|
540
|
-
// Astro theme uses official teal gradient, others use Zendir Electric
|
|
541
|
-
color: isAstroTheme ? [...OFFICIAL_ASTRO_DATA_VIZ_COLORS.sequential.teal] : ASTRO_DATA_VIZ_COLORS.sequential.electric
|
|
542
|
-
}
|
|
543
|
-
},
|
|
544
|
-
// Grid
|
|
545
|
-
grid: {
|
|
546
|
-
borderColor: tokens.colors.border.muted
|
|
547
|
-
}
|
|
548
|
-
};
|
|
380
|
+
},
|
|
381
|
+
axisPointer: {
|
|
382
|
+
lineStyle: {
|
|
383
|
+
color: tokens.colors.text.tertiary,
|
|
384
|
+
width: 1
|
|
385
|
+
},
|
|
386
|
+
crossStyle: {
|
|
387
|
+
color: tokens.colors.text.tertiary,
|
|
388
|
+
width: 1
|
|
389
|
+
}
|
|
390
|
+
},
|
|
391
|
+
xAxis: {
|
|
392
|
+
axisLine: { lineStyle: { color: tokens.colors.border.default } },
|
|
393
|
+
axisTick: { lineStyle: { color: tokens.colors.border.muted } },
|
|
394
|
+
axisLabel: {
|
|
395
|
+
color: tokens.colors.text.secondary,
|
|
396
|
+
fontSize: 12,
|
|
397
|
+
fontFamily: tokens.typography.fontFamily.mono,
|
|
398
|
+
textBorderWidth: 0,
|
|
399
|
+
textBorderColor: "transparent"
|
|
400
|
+
},
|
|
401
|
+
splitLine: { lineStyle: {
|
|
402
|
+
color: tokens.colors.border.muted,
|
|
403
|
+
type: "dashed"
|
|
404
|
+
} },
|
|
405
|
+
nameTextStyle: {
|
|
406
|
+
color: tokens.colors.text.secondary,
|
|
407
|
+
fontSize: 12,
|
|
408
|
+
textBorderWidth: 0,
|
|
409
|
+
textBorderColor: "transparent"
|
|
410
|
+
}
|
|
411
|
+
},
|
|
412
|
+
yAxis: {
|
|
413
|
+
axisLine: { lineStyle: { color: tokens.colors.border.default } },
|
|
414
|
+
axisTick: { lineStyle: { color: tokens.colors.border.muted } },
|
|
415
|
+
axisLabel: {
|
|
416
|
+
color: tokens.colors.text.secondary,
|
|
417
|
+
fontSize: 12,
|
|
418
|
+
fontFamily: tokens.typography.fontFamily.mono,
|
|
419
|
+
textBorderWidth: 0,
|
|
420
|
+
textBorderColor: "transparent"
|
|
421
|
+
},
|
|
422
|
+
splitLine: { lineStyle: {
|
|
423
|
+
color: tokens.colors.border.muted,
|
|
424
|
+
type: "dashed"
|
|
425
|
+
} },
|
|
426
|
+
nameTextStyle: {
|
|
427
|
+
color: tokens.colors.text.secondary,
|
|
428
|
+
fontSize: 12,
|
|
429
|
+
textBorderWidth: 0,
|
|
430
|
+
textBorderColor: "transparent"
|
|
431
|
+
}
|
|
432
|
+
},
|
|
433
|
+
series: {
|
|
434
|
+
line: {
|
|
435
|
+
lineStyle: { width: 2 },
|
|
436
|
+
symbolSize: 6
|
|
437
|
+
},
|
|
438
|
+
bar: {
|
|
439
|
+
barMaxWidth: 40,
|
|
440
|
+
itemStyle: { borderRadius: [
|
|
441
|
+
4,
|
|
442
|
+
4,
|
|
443
|
+
0,
|
|
444
|
+
0
|
|
445
|
+
] }
|
|
446
|
+
},
|
|
447
|
+
pie: {
|
|
448
|
+
itemStyle: {
|
|
449
|
+
borderColor: tokens.colors.background.surface,
|
|
450
|
+
borderWidth: 2
|
|
451
|
+
},
|
|
452
|
+
label: {
|
|
453
|
+
color: tokens.colors.text.primary,
|
|
454
|
+
textBorderWidth: 0,
|
|
455
|
+
textBorderColor: "transparent",
|
|
456
|
+
fontSize: 12
|
|
457
|
+
}
|
|
458
|
+
},
|
|
459
|
+
scatter: { symbolSize: 10 },
|
|
460
|
+
gauge: { axisLine: { lineStyle: { width: 10 } } }
|
|
461
|
+
},
|
|
462
|
+
dataZoom: {
|
|
463
|
+
backgroundColor: isDark ? "rgba(27, 45, 62, 0.5)" : "rgba(234, 238, 244, 0.5)",
|
|
464
|
+
borderColor: tokens.colors.border.muted,
|
|
465
|
+
fillerColor: isAstroTheme ? "rgba(77, 172, 255, 0.15)" : "rgba(62, 60, 255, 0.15)",
|
|
466
|
+
handleColor: isAstroTheme ? "#4dacff" : ZENDIR_BRAND_COLORS.electric,
|
|
467
|
+
textStyle: {
|
|
468
|
+
color: tokens.colors.text.secondary,
|
|
469
|
+
textBorderWidth: 0,
|
|
470
|
+
textBorderColor: "transparent"
|
|
471
|
+
}
|
|
472
|
+
},
|
|
473
|
+
visualMap: {
|
|
474
|
+
textStyle: {
|
|
475
|
+
color: tokens.colors.text.secondary,
|
|
476
|
+
textBorderWidth: 0,
|
|
477
|
+
textBorderColor: "transparent"
|
|
478
|
+
},
|
|
479
|
+
inRange: { color: isAstroTheme ? [...OFFICIAL_ASTRO_DATA_VIZ_COLORS.sequential.teal] : ASTRO_DATA_VIZ_COLORS.sequential.electric }
|
|
480
|
+
},
|
|
481
|
+
grid: { borderColor: tokens.colors.border.muted }
|
|
482
|
+
};
|
|
549
483
|
}
|
|
484
|
+
/**
|
|
485
|
+
* Get status color from value and thresholds
|
|
486
|
+
*/
|
|
550
487
|
function getStatusColor(value, thresholds) {
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
return STATUS_COLORS.serious;
|
|
556
|
-
}
|
|
557
|
-
if (thresholds.caution !== void 0 && value >= thresholds.caution) {
|
|
558
|
-
return STATUS_COLORS.caution;
|
|
559
|
-
}
|
|
560
|
-
return STATUS_COLORS.normal;
|
|
488
|
+
if (thresholds.critical !== void 0 && value >= thresholds.critical) return STATUS_COLORS.critical;
|
|
489
|
+
if (thresholds.serious !== void 0 && value >= thresholds.serious) return STATUS_COLORS.serious;
|
|
490
|
+
if (thresholds.caution !== void 0 && value >= thresholds.caution) return STATUS_COLORS.caution;
|
|
491
|
+
return STATUS_COLORS.normal;
|
|
561
492
|
}
|
|
493
|
+
/**
|
|
494
|
+
* Get color for series by index (wraps around palette)
|
|
495
|
+
*
|
|
496
|
+
* @param index - Series index
|
|
497
|
+
* @param palette - Color palette to use (defaults to Zendir-Astro mixed)
|
|
498
|
+
* @returns Hex color string
|
|
499
|
+
*
|
|
500
|
+
* @example
|
|
501
|
+
* ```tsx
|
|
502
|
+
* // Uses Zendir-Astro fusion palette
|
|
503
|
+
* const color = getSeriesColor(0); // #3E3CFF (Zendir Electric)
|
|
504
|
+
*
|
|
505
|
+
* // Use Zendir-only palette
|
|
506
|
+
* const brandColor = getSeriesColor(0, ASTRO_DATA_VIZ_COLORS.zendir);
|
|
507
|
+
* ```
|
|
508
|
+
*/
|
|
562
509
|
function getSeriesColor(index, palette = ASTRO_DATA_VIZ_COLORS.mixed) {
|
|
563
|
-
|
|
510
|
+
return palette[index % palette.length];
|
|
564
511
|
}
|
|
512
|
+
/**
|
|
513
|
+
* Get appropriate palette based on data type and optional theme
|
|
514
|
+
*
|
|
515
|
+
* @param dataType - Type of data being visualized
|
|
516
|
+
* @param useAstroTheme - If true, uses official AstroUXDS colors; otherwise Zendir colors
|
|
517
|
+
* @returns Appropriate color palette
|
|
518
|
+
*
|
|
519
|
+
* @example
|
|
520
|
+
* ```tsx
|
|
521
|
+
* // For general multi-series data (Zendir brand - default)
|
|
522
|
+
* const colors = getPaletteForDataType('categorical');
|
|
523
|
+
*
|
|
524
|
+
* // For official AstroUXDS colors
|
|
525
|
+
* const astroColors = getPaletteForDataType('categorical', true);
|
|
526
|
+
*
|
|
527
|
+
* // For Zendir brand-forward charts
|
|
528
|
+
* const brandColors = getPaletteForDataType('zendir');
|
|
529
|
+
*
|
|
530
|
+
* // For official AstroUXDS palette explicitly
|
|
531
|
+
* const officialColors = getPaletteForDataType('astro-official');
|
|
532
|
+
*
|
|
533
|
+
* // For status-based data (uses reserved AstroUXDS status colors)
|
|
534
|
+
* const statusColors = getPaletteForDataType('status');
|
|
535
|
+
* ```
|
|
536
|
+
*/
|
|
565
537
|
function getPaletteForDataType(dataType, useAstroTheme = false) {
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
STATUS_COLORS.standby,
|
|
586
|
-
STATUS_COLORS.caution,
|
|
587
|
-
STATUS_COLORS.serious,
|
|
588
|
-
STATUS_COLORS.critical
|
|
589
|
-
];
|
|
590
|
-
case "cool":
|
|
591
|
-
return ASTRO_DATA_VIZ_COLORS.cool;
|
|
592
|
-
case "warm":
|
|
593
|
-
return ASTRO_DATA_VIZ_COLORS.warm;
|
|
594
|
-
default:
|
|
595
|
-
return ASTRO_DATA_VIZ_COLORS.mixed;
|
|
596
|
-
}
|
|
538
|
+
if (useAstroTheme && (dataType === "categorical" || dataType === "sequential")) return dataType === "sequential" ? [...OFFICIAL_ASTRO_DATA_VIZ_COLORS.sequential.teal] : [...OFFICIAL_ASTRO_DATA_VIZ_COLORS.extended];
|
|
539
|
+
switch (dataType) {
|
|
540
|
+
case "astro-official": return [...OFFICIAL_ASTRO_DATA_VIZ_COLORS.extended];
|
|
541
|
+
case "categorical": return ASTRO_DATA_VIZ_COLORS.mixed;
|
|
542
|
+
case "zendir": return ASTRO_DATA_VIZ_COLORS.zendir;
|
|
543
|
+
case "zendirExtended": return ASTRO_DATA_VIZ_COLORS.zendirExtended;
|
|
544
|
+
case "sequential": return ASTRO_DATA_VIZ_COLORS.sequential.electric;
|
|
545
|
+
case "diverging": return [...ASTRO_DATA_VIZ_COLORS.sequential.electric].reverse().concat(ASTRO_DATA_VIZ_COLORS.sequential.purple);
|
|
546
|
+
case "status": return [
|
|
547
|
+
STATUS_COLORS.normal,
|
|
548
|
+
STATUS_COLORS.standby,
|
|
549
|
+
STATUS_COLORS.caution,
|
|
550
|
+
STATUS_COLORS.serious,
|
|
551
|
+
STATUS_COLORS.critical
|
|
552
|
+
];
|
|
553
|
+
case "cool": return ASTRO_DATA_VIZ_COLORS.cool;
|
|
554
|
+
case "warm": return ASTRO_DATA_VIZ_COLORS.warm;
|
|
555
|
+
default: return ASTRO_DATA_VIZ_COLORS.mixed;
|
|
556
|
+
}
|
|
597
557
|
}
|
|
558
|
+
/**
|
|
559
|
+
* Create gradient for area charts
|
|
560
|
+
*/
|
|
598
561
|
function createAreaGradient(color, direction = "vertical") {
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
562
|
+
return {
|
|
563
|
+
type: "linear",
|
|
564
|
+
x: 0,
|
|
565
|
+
y: direction === "vertical" ? 0 : 0,
|
|
566
|
+
x2: direction === "horizontal" ? 1 : 0,
|
|
567
|
+
y2: direction === "vertical" ? 1 : 0,
|
|
568
|
+
colorStops: [{
|
|
569
|
+
offset: 0,
|
|
570
|
+
color: `${color}40`
|
|
571
|
+
}, {
|
|
572
|
+
offset: 1,
|
|
573
|
+
color: `${color}05`
|
|
574
|
+
}]
|
|
575
|
+
};
|
|
610
576
|
}
|
|
577
|
+
/**
|
|
578
|
+
* Format time for axis labels
|
|
579
|
+
*/
|
|
611
580
|
function formatTimeLabel(timestamp, format = "short") {
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
hour12: false
|
|
634
|
-
});
|
|
635
|
-
}
|
|
581
|
+
const date = new Date(timestamp);
|
|
582
|
+
switch (format) {
|
|
583
|
+
case "short": return date.toLocaleTimeString([], {
|
|
584
|
+
hour: "2-digit",
|
|
585
|
+
minute: "2-digit",
|
|
586
|
+
hour12: false
|
|
587
|
+
});
|
|
588
|
+
case "medium": return date.toLocaleTimeString([], {
|
|
589
|
+
hour: "2-digit",
|
|
590
|
+
minute: "2-digit",
|
|
591
|
+
second: "2-digit",
|
|
592
|
+
hour12: false
|
|
593
|
+
});
|
|
594
|
+
case "long": return date.toLocaleString([], {
|
|
595
|
+
month: "short",
|
|
596
|
+
day: "numeric",
|
|
597
|
+
hour: "2-digit",
|
|
598
|
+
minute: "2-digit",
|
|
599
|
+
hour12: false
|
|
600
|
+
});
|
|
601
|
+
}
|
|
636
602
|
}
|
|
603
|
+
/**
|
|
604
|
+
* Format number with unit suffix
|
|
605
|
+
*/
|
|
637
606
|
function formatValueWithUnit(value, unit, precision = 2) {
|
|
638
|
-
|
|
639
|
-
|
|
607
|
+
const formatted = Number.isInteger(value) ? value.toString() : value.toFixed(precision);
|
|
608
|
+
return unit ? `${formatted}${unit}` : formatted;
|
|
640
609
|
}
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
610
|
+
/**
|
|
611
|
+
* Calculate nice axis bounds
|
|
612
|
+
*/
|
|
613
|
+
function calculateAxisBounds(values, padding = .1) {
|
|
614
|
+
if (values.length === 0) return {
|
|
615
|
+
min: 0,
|
|
616
|
+
max: 100
|
|
617
|
+
};
|
|
618
|
+
const min = Math.min(...values);
|
|
619
|
+
const max = Math.max(...values);
|
|
620
|
+
const range = max - min || 1;
|
|
621
|
+
return {
|
|
622
|
+
min: min - range * padding,
|
|
623
|
+
max: max + range * padding
|
|
624
|
+
};
|
|
650
625
|
}
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
ZENDIR_BRAND_COLORS,
|
|
656
|
-
calculateAxisBounds,
|
|
657
|
-
createAreaGradient,
|
|
658
|
-
createAstroEChartsTheme,
|
|
659
|
-
formatTimeLabel,
|
|
660
|
-
formatValueWithUnit,
|
|
661
|
-
getPaletteForDataType,
|
|
662
|
-
getSeriesColor,
|
|
663
|
-
getStatusColor
|
|
664
|
-
};
|
|
665
|
-
//# sourceMappingURL=theme.js.map
|
|
626
|
+
//#endregion
|
|
627
|
+
export { ASTRO_DATA_VIZ_COLORS, OFFICIAL_ASTRO_DATA_VIZ_COLORS, STATUS_COLORS, ZENDIR_BRAND_COLORS, calculateAxisBounds, createAreaGradient, createAstroEChartsTheme, formatTimeLabel, formatValueWithUnit, getPaletteForDataType, getSeriesColor, getStatusColor };
|
|
628
|
+
|
|
629
|
+
//# sourceMappingURL=theme.js.map
|