@zendir/ui 0.1.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 +19 -0
- package/LICENSE +21 -0
- package/README.md +589 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +421 -0
- package/dist/index.js.map +1 -0
- package/dist/react/3d/EarthViewer.d.ts +46 -0
- package/dist/react/3d/EarthViewer.js +836 -0
- package/dist/react/3d/EarthViewer.js.map +1 -0
- package/dist/react/3d/SolarSystemViewer.d.ts +43 -0
- package/dist/react/3d/SolarSystemViewer.js +372 -0
- package/dist/react/3d/SolarSystemViewer.js.map +1 -0
- package/dist/react/3d/ZenSpace3D.d.ts +16 -0
- package/dist/react/3d/ZenSpace3D.js +1253 -0
- package/dist/react/3d/ZenSpace3D.js.map +1 -0
- package/dist/react/3d/ZenSpace3DCesium.d.ts +9 -0
- package/dist/react/3d/ZenSpace3DCesium.js +186 -0
- package/dist/react/3d/ZenSpace3DCesium.js.map +1 -0
- package/dist/react/3d/ZenSpace3DShaders.d.ts +78 -0
- package/dist/react/3d/ZenSpace3DShaders.js +94 -0
- package/dist/react/3d/ZenSpace3DShaders.js.map +1 -0
- package/dist/react/3d/ZenSpace3DTypes.d.ts +614 -0
- package/dist/react/3d/ZenSpace3DUtils.d.ts +183 -0
- package/dist/react/3d/ZenSpace3DUtils.js +213 -0
- package/dist/react/3d/ZenSpace3DUtils.js.map +1 -0
- package/dist/react/3d/index.d.ts +23 -0
- package/dist/react/3d/threeLoader.d.ts +22 -0
- package/dist/react/3d/threeLoader.js +18 -0
- package/dist/react/3d/threeLoader.js.map +1 -0
- package/dist/react/astro/ClassificationBanner.d.ts +25 -0
- package/dist/react/astro/ClassificationBanner.js +83 -0
- package/dist/react/astro/ClassificationBanner.js.map +1 -0
- package/dist/react/astro/GlobalStatusBar.d.ts +42 -0
- package/dist/react/astro/GlobalStatusBar.js +165 -0
- package/dist/react/astro/GlobalStatusBar.js.map +1 -0
- package/dist/react/astro/MissionClock.d.ts +169 -0
- package/dist/react/astro/MissionClock.js +411 -0
- package/dist/react/astro/MissionClock.js.map +1 -0
- package/dist/react/astro/MonitoringIcon.d.ts +60 -0
- package/dist/react/astro/MonitoringIcon.js +369 -0
- package/dist/react/astro/MonitoringIcon.js.map +1 -0
- package/dist/react/astro/Notification.d.ts +42 -0
- package/dist/react/astro/Notification.js +156 -0
- package/dist/react/astro/Notification.js.map +1 -0
- package/dist/react/astro/Progress.d.ts +39 -0
- package/dist/react/astro/Progress.js +149 -0
- package/dist/react/astro/Progress.js.map +1 -0
- package/dist/react/astro/SimulationControls.d.ts +136 -0
- package/dist/react/astro/SimulationControls.js +668 -0
- package/dist/react/astro/SimulationControls.js.map +1 -0
- package/dist/react/astro/StatusIndicator.d.ts +34 -0
- package/dist/react/astro/StatusIndicator.js +189 -0
- package/dist/react/astro/StatusIndicator.js.map +1 -0
- package/dist/react/astro/UnifiedTimeline.d.ts +106 -0
- package/dist/react/astro/UnifiedTimeline.js +1768 -0
- package/dist/react/astro/UnifiedTimeline.js.map +1 -0
- package/dist/react/astro/index.d.ts +63 -0
- package/dist/react/cards/AccessCard.d.ts +37 -0
- package/dist/react/cards/AccessCard.js +410 -0
- package/dist/react/cards/AccessCard.js.map +1 -0
- package/dist/react/cards/OrbitCard.d.ts +31 -0
- package/dist/react/cards/OrbitCard.js +372 -0
- package/dist/react/cards/OrbitCard.js.map +1 -0
- package/dist/react/cards/SpacecraftCard.d.ts +54 -0
- package/dist/react/cards/SpacecraftCard.js +941 -0
- package/dist/react/cards/SpacecraftCard.js.map +1 -0
- package/dist/react/cards/TelemetryCard.d.ts +40 -0
- package/dist/react/cards/TelemetryCard.js +742 -0
- package/dist/react/cards/TelemetryCard.js.map +1 -0
- package/dist/react/cards/TelemetryStreamCard.d.ts +59 -0
- package/dist/react/cards/TelemetryStreamCard.js +309 -0
- package/dist/react/cards/TelemetryStreamCard.js.map +1 -0
- package/dist/react/cards/index.d.ts +13 -0
- package/dist/react/charts/GroundTrackMap.d.ts +112 -0
- package/dist/react/charts/GroundTrackMap.js +1123 -0
- package/dist/react/charts/GroundTrackMap.js.map +1 -0
- package/dist/react/charts/GroundTrackMapLeaflet.d.ts +26 -0
- package/dist/react/charts/GroundTrackMapLeaflet.js +571 -0
- package/dist/react/charts/GroundTrackMapLeaflet.js.map +1 -0
- package/dist/react/charts/groundTrackMapLeafletTiles.d.ts +22 -0
- package/dist/react/charts/groundTrackMapLeafletTiles.js +11 -0
- package/dist/react/charts/groundTrackMapLeafletTiles.js.map +1 -0
- package/dist/react/charts/groundTrackMapLeafletUtils.d.ts +24 -0
- package/dist/react/charts/groundTrackMapLeafletUtils.js +109 -0
- package/dist/react/charts/groundTrackMapLeafletUtils.js.map +1 -0
- package/dist/react/charts/index.d.ts +10 -0
- package/dist/react/charts/unified/AstroChart.d.ts +24 -0
- package/dist/react/charts/unified/AstroChart.js +1405 -0
- package/dist/react/charts/unified/AstroChart.js.map +1 -0
- package/dist/react/charts/unified/PowerOverviewChart.d.ts +73 -0
- package/dist/react/charts/unified/PowerOverviewChart.js +488 -0
- package/dist/react/charts/unified/PowerOverviewChart.js.map +1 -0
- package/dist/react/charts/unified/domain.d.ts +845 -0
- package/dist/react/charts/unified/domain.js +3168 -0
- package/dist/react/charts/unified/domain.js.map +1 -0
- package/dist/react/charts/unified/generators.d.ts +276 -0
- package/dist/react/charts/unified/generators.js +518 -0
- package/dist/react/charts/unified/generators.js.map +1 -0
- package/dist/react/charts/unified/index.d.ts +55 -0
- package/dist/react/charts/unified/presets.d.ts +290 -0
- package/dist/react/charts/unified/presets.js +999 -0
- package/dist/react/charts/unified/presets.js.map +1 -0
- package/dist/react/charts/unified/sync.d.ts +69 -0
- package/dist/react/charts/unified/sync.js +219 -0
- package/dist/react/charts/unified/sync.js.map +1 -0
- package/dist/react/charts/unified/theme.d.ts +447 -0
- package/dist/react/charts/unified/theme.js +562 -0
- package/dist/react/charts/unified/theme.js.map +1 -0
- package/dist/react/charts/unified/types.d.ts +826 -0
- package/dist/react/charts/unified/useChartStream.d.ts +58 -0
- package/dist/react/charts/unified/useChartStream.js +226 -0
- package/dist/react/charts/unified/useChartStream.js.map +1 -0
- package/dist/react/chatgpt/AppCard.d.ts +59 -0
- package/dist/react/chatgpt/AppCard.js +306 -0
- package/dist/react/chatgpt/AppCard.js.map +1 -0
- package/dist/react/chatgpt/ChatGPTCard.d.ts +6 -0
- package/dist/react/chatgpt/index.d.ts +167 -0
- package/dist/react/chatgpt/index.js +166 -0
- package/dist/react/chatgpt/index.js.map +1 -0
- package/dist/react/context/DisplaySettingsContext.d.ts +107 -0
- package/dist/react/context/DisplaySettingsContext.js +169 -0
- package/dist/react/context/DisplaySettingsContext.js.map +1 -0
- package/dist/react/context/index.d.ts +5 -0
- package/dist/react/core/ActivityPlanner.d.ts +45 -0
- package/dist/react/core/ActivityPlanner.js +532 -0
- package/dist/react/core/ActivityPlanner.js.map +1 -0
- package/dist/react/core/AppBar.d.ts +71 -0
- package/dist/react/core/AppBar.js +817 -0
- package/dist/react/core/AppBar.js.map +1 -0
- package/dist/react/core/AstroIcon.d.ts +84 -0
- package/dist/react/core/AstroIcon.js +1243 -0
- package/dist/react/core/AstroIcon.js.map +1 -0
- package/dist/react/core/Badge.d.ts +27 -0
- package/dist/react/core/Badge.js +134 -0
- package/dist/react/core/Badge.js.map +1 -0
- package/dist/react/core/Button.d.ts +26 -0
- package/dist/react/core/Button.js +306 -0
- package/dist/react/core/Button.js.map +1 -0
- package/dist/react/core/CardHeader.d.ts +34 -0
- package/dist/react/core/CardHeader.js +316 -0
- package/dist/react/core/CardHeader.js.map +1 -0
- package/dist/react/core/ChatPanel.d.ts +627 -0
- package/dist/react/core/ChatPanel.js +1144 -0
- package/dist/react/core/ChatPanel.js.map +1 -0
- package/dist/react/core/Checkbox.d.ts +26 -0
- package/dist/react/core/Checkbox.js +130 -0
- package/dist/react/core/Checkbox.js.map +1 -0
- package/dist/react/core/ColorPickerPanel.d.ts +25 -0
- package/dist/react/core/ColorPickerPanel.js +293 -0
- package/dist/react/core/ColorPickerPanel.js.map +1 -0
- package/dist/react/core/CommandBuilder.d.ts +74 -0
- package/dist/react/core/CommandBuilder.js +518 -0
- package/dist/react/core/CommandBuilder.js.map +1 -0
- package/dist/react/core/ConfirmDialog.d.ts +45 -0
- package/dist/react/core/ConfirmDialog.js +315 -0
- package/dist/react/core/ConfirmDialog.js.map +1 -0
- package/dist/react/core/ConnectionForm.d.ts +57 -0
- package/dist/react/core/ConnectionForm.js +496 -0
- package/dist/react/core/ConnectionForm.js.map +1 -0
- package/dist/react/core/Container.d.ts +51 -0
- package/dist/react/core/Container.js +670 -0
- package/dist/react/core/Container.js.map +1 -0
- package/dist/react/core/CopyButton.d.ts +39 -0
- package/dist/react/core/CopyButton.js +105 -0
- package/dist/react/core/CopyButton.js.map +1 -0
- package/dist/react/core/DataTable.d.ts +113 -0
- package/dist/react/core/DataTable.js +446 -0
- package/dist/react/core/DataTable.js.map +1 -0
- package/dist/react/core/DataValue.d.ts +64 -0
- package/dist/react/core/DataValue.js +545 -0
- package/dist/react/core/DataValue.js.map +1 -0
- package/dist/react/core/Dialog.d.ts +32 -0
- package/dist/react/core/Dialog.js +201 -0
- package/dist/react/core/Dialog.js.map +1 -0
- package/dist/react/core/FileExplorer.d.ts +65 -0
- package/dist/react/core/FileExplorer.js +520 -0
- package/dist/react/core/FileExplorer.js.map +1 -0
- package/dist/react/core/GlassCard.d.ts +129 -0
- package/dist/react/core/GlassCard.js +375 -0
- package/dist/react/core/GlassCard.js.map +1 -0
- package/dist/react/core/HeaderIconWithStatus.d.ts +39 -0
- package/dist/react/core/HeaderIconWithStatus.js +157 -0
- package/dist/react/core/HeaderIconWithStatus.js.map +1 -0
- package/dist/react/core/HexViewer.d.ts +143 -0
- package/dist/react/core/HexViewer.js +1106 -0
- package/dist/react/core/HexViewer.js.map +1 -0
- package/dist/react/core/Icon.d.ts +32 -0
- package/dist/react/core/Icon.js +142 -0
- package/dist/react/core/Icon.js.map +1 -0
- package/dist/react/core/ImageGallery.d.ts +41 -0
- package/dist/react/core/ImageGallery.js +320 -0
- package/dist/react/core/ImageGallery.js.map +1 -0
- package/dist/react/core/Input.d.ts +38 -0
- package/dist/react/core/Input.js +288 -0
- package/dist/react/core/Input.js.map +1 -0
- package/dist/react/core/LimitsBar.d.ts +51 -0
- package/dist/react/core/LimitsBar.js +200 -0
- package/dist/react/core/LimitsBar.js.map +1 -0
- package/dist/react/core/LogViewer.d.ts +61 -0
- package/dist/react/core/LogViewer.js +599 -0
- package/dist/react/core/LogViewer.js.map +1 -0
- package/dist/react/core/MessageStream.d.ts +58 -0
- package/dist/react/core/MessageStream.js +455 -0
- package/dist/react/core/MessageStream.js.map +1 -0
- package/dist/react/core/MissionCalendar.d.ts +81 -0
- package/dist/react/core/MissionCalendar.js +1049 -0
- package/dist/react/core/MissionCalendar.js.map +1 -0
- package/dist/react/core/NumberInput.d.ts +85 -0
- package/dist/react/core/NumberInput.js +507 -0
- package/dist/react/core/NumberInput.js.map +1 -0
- package/dist/react/core/PacketViewer.d.ts +73 -0
- package/dist/react/core/PacketViewer.js +431 -0
- package/dist/react/core/PacketViewer.js.map +1 -0
- package/dist/react/core/Pagination.d.ts +30 -0
- package/dist/react/core/Pagination.js +190 -0
- package/dist/react/core/Pagination.js.map +1 -0
- package/dist/react/core/PinInput.d.ts +41 -0
- package/dist/react/core/PinInput.js +210 -0
- package/dist/react/core/PinInput.js.map +1 -0
- package/dist/react/core/Popover.d.ts +55 -0
- package/dist/react/core/Popover.js +288 -0
- package/dist/react/core/Popover.js.map +1 -0
- package/dist/react/core/Select.d.ts +42 -0
- package/dist/react/core/Select.js +303 -0
- package/dist/react/core/Select.js.map +1 -0
- package/dist/react/core/SideNav.d.ts +103 -0
- package/dist/react/core/SideNav.js +551 -0
- package/dist/react/core/SideNav.js.map +1 -0
- package/dist/react/core/SidePanel.d.ts +33 -0
- package/dist/react/core/SidePanel.js +199 -0
- package/dist/react/core/SidePanel.js.map +1 -0
- package/dist/react/core/Tabs.d.ts +47 -0
- package/dist/react/core/Tabs.js +129 -0
- package/dist/react/core/Tabs.js.map +1 -0
- package/dist/react/core/Toast.d.ts +56 -0
- package/dist/react/core/Toast.js +229 -0
- package/dist/react/core/Toast.js.map +1 -0
- package/dist/react/core/Toggle.d.ts +22 -0
- package/dist/react/core/Toggle.js +151 -0
- package/dist/react/core/Toggle.js.map +1 -0
- package/dist/react/core/Tooltip.d.ts +19 -0
- package/dist/react/core/Tooltip.js +179 -0
- package/dist/react/core/Tooltip.js.map +1 -0
- package/dist/react/core/Typography.d.ts +127 -0
- package/dist/react/core/Typography.js +187 -0
- package/dist/react/core/Typography.js.map +1 -0
- package/dist/react/core/index.d.ts +108 -0
- package/dist/react/core/layout/Box.d.ts +77 -0
- package/dist/react/core/layout/Box.js +126 -0
- package/dist/react/core/layout/Box.js.map +1 -0
- package/dist/react/core/layout/Center.d.ts +20 -0
- package/dist/react/core/layout/Center.js +34 -0
- package/dist/react/core/layout/Center.js.map +1 -0
- package/dist/react/core/layout/Divider.d.ts +16 -0
- package/dist/react/core/layout/Divider.js +108 -0
- package/dist/react/core/layout/Divider.js.map +1 -0
- package/dist/react/core/layout/Flex.d.ts +30 -0
- package/dist/react/core/layout/Flex.js +128 -0
- package/dist/react/core/layout/Flex.js.map +1 -0
- package/dist/react/core/layout/Grid.d.ts +36 -0
- package/dist/react/core/layout/Grid.js +142 -0
- package/dist/react/core/layout/Grid.js.map +1 -0
- package/dist/react/core/layout/Spacer.d.ts +8 -0
- package/dist/react/core/layout/Spacer.js +31 -0
- package/dist/react/core/layout/Spacer.js.map +1 -0
- package/dist/react/core/layout/Stack.d.ts +54 -0
- package/dist/react/core/layout/Stack.js +74 -0
- package/dist/react/core/layout/Stack.js.map +1 -0
- package/dist/react/core/layout/index.d.ts +38 -0
- package/dist/react/core/layout/responsive.d.ts +23 -0
- package/dist/react/core/layout/responsive.js +26 -0
- package/dist/react/core/layout/responsive.js.map +1 -0
- package/dist/react/core/layout/useBreakpoint.d.ts +77 -0
- package/dist/react/core/layout/useBreakpoint.js +73 -0
- package/dist/react/core/layout/useBreakpoint.js.map +1 -0
- package/dist/react/core/propertyConfig.d.ts +443 -0
- package/dist/react/core/propertyConfig.js +399 -0
- package/dist/react/core/propertyConfig.js.map +1 -0
- package/dist/react/hooks/index.d.ts +21 -0
- package/dist/react/hooks/useAccessWindows.d.ts +66 -0
- package/dist/react/hooks/useCompactMode.d.ts +82 -0
- package/dist/react/hooks/useCompactMode.js +62 -0
- package/dist/react/hooks/useCompactMode.js.map +1 -0
- package/dist/react/hooks/useLiveSelection.d.ts +57 -0
- package/dist/react/hooks/useSimulationPlayback.d.ts +97 -0
- package/dist/react/hooks/useSimulationTime.d.ts +61 -0
- package/dist/react/hooks/useSpacecraftPosition.d.ts +50 -0
- package/dist/react/hooks/useSpacecraftPosition.js +89 -0
- package/dist/react/hooks/useSpacecraftPosition.js.map +1 -0
- package/dist/react/hooks/useTelemetry.d.ts +55 -0
- package/dist/react/hooks/useTelemetry.js +73 -0
- package/dist/react/hooks/useTelemetry.js.map +1 -0
- package/dist/react/hooks/useZendirSession.d.ts +109 -0
- package/dist/react/hooks/useZendirSession.js +148 -0
- package/dist/react/hooks/useZendirSession.js.map +1 -0
- package/dist/react/index.d.ts +74 -0
- package/dist/react/shared/ErrorBoundary.d.ts +63 -0
- package/dist/react/shared/ErrorBoundary.js +142 -0
- package/dist/react/shared/ErrorBoundary.js.map +1 -0
- package/dist/react/shared/Skeleton.d.ts +110 -0
- package/dist/react/shared/Skeleton.js +324 -0
- package/dist/react/shared/Skeleton.js.map +1 -0
- package/dist/react/shared/index.d.ts +12 -0
- package/dist/react/theme/ThemeProvider.d.ts +385 -0
- package/dist/react/theme/ThemeProvider.js +1096 -0
- package/dist/react/theme/ThemeProvider.js.map +1 -0
- package/dist/react/theme/astro-tokens.d.ts +153 -0
- package/dist/react/theme/cardAccent.d.ts +75 -0
- package/dist/react/theme/cardAccent.js +137 -0
- package/dist/react/theme/cardAccent.js.map +1 -0
- package/dist/react/theme/config.d.ts +39 -0
- package/dist/react/theme/index.d.ts +9 -0
- package/dist/react/types.d.ts +360 -0
- package/dist/react/types.js +58 -0
- package/dist/react/types.js.map +1 -0
- package/dist/react/utils/index.d.ts +247 -0
- package/dist/react/utils/index.js +423 -0
- package/dist/react/utils/index.js.map +1 -0
- package/dist/react/visualizations/EclipseTimerCard.d.ts +17 -0
- package/dist/react/visualizations/EclipseTimerCard.js +250 -0
- package/dist/react/visualizations/EclipseTimerCard.js.map +1 -0
- package/dist/react/visualizations/LinkBudgetCard.d.ts +50 -0
- package/dist/react/visualizations/LinkBudgetCard.js +444 -0
- package/dist/react/visualizations/LinkBudgetCard.js.map +1 -0
- package/dist/react/visualizations/NavBallCard.d.ts +17 -0
- package/dist/react/visualizations/NavBallCard.js +243 -0
- package/dist/react/visualizations/NavBallCard.js.map +1 -0
- package/dist/react/visualizations/PropulsionCard.d.ts +37 -0
- package/dist/react/visualizations/PropulsionCard.js +298 -0
- package/dist/react/visualizations/PropulsionCard.js.map +1 -0
- package/dist/react/visualizations/SensorFootprintCard.d.ts +33 -0
- package/dist/react/visualizations/SensorFootprintCard.js +326 -0
- package/dist/react/visualizations/SensorFootprintCard.js.map +1 -0
- package/dist/react/visualizations/ThermalHeatmapCard.d.ts +38 -0
- package/dist/react/visualizations/ThermalHeatmapCard.js +372 -0
- package/dist/react/visualizations/ThermalHeatmapCard.js.map +1 -0
- package/dist/react/visualizations/index.d.ts +17 -0
- package/dist/react.d.ts +1 -0
- package/dist/react.js +421 -0
- package/dist/react.js.map +1 -0
- package/dist/shaders/atmosphere.frag.js +5 -0
- package/dist/shaders/atmosphere.frag.js.map +1 -0
- package/dist/shaders/atmosphere.vert.js +5 -0
- package/dist/shaders/atmosphere.vert.js.map +1 -0
- package/dist/shaders/stars.frag.js +5 -0
- package/dist/shaders/stars.frag.js.map +1 -0
- package/dist/shaders/stars.vert.js +5 -0
- package/dist/shaders/stars.vert.js.map +1 -0
- package/dist/style.css +143 -0
- package/dist/tokens/index.d.ts +296 -0
- package/dist/tokens/index.js +263 -0
- package/dist/tokens/index.js.map +1 -0
- package/dist/tokens/tokens.css +155 -0
- package/dist/types/index.d.ts +23 -0
- package/dist/types.d.ts +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/package.json +220 -0
- package/sdk-stub.js +22 -0
|
@@ -0,0 +1,742 @@
|
|
|
1
|
+
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { memo, useState, useMemo } from "react";
|
|
3
|
+
import { DataValue } from "../core/DataValue.js";
|
|
4
|
+
import { getPropertyConfig } from "../core/propertyConfig.js";
|
|
5
|
+
import { AstroIcon } from "../core/AstroIcon.js";
|
|
6
|
+
import { CardHeader } from "../core/CardHeader.js";
|
|
7
|
+
import { HeaderIconWithStatus } from "../core/HeaderIconWithStatus.js";
|
|
8
|
+
import { Icon } from "../core/Icon.js";
|
|
9
|
+
import { useCardBorderStyle } from "../context/DisplaySettingsContext.js";
|
|
10
|
+
import { classNames, getStatusColor, formatTime, safeNumber, normalizeStatus, deriveBatteryStatus } from "../utils/index.js";
|
|
11
|
+
import { useTheme } from "../theme/ThemeProvider.js";
|
|
12
|
+
import { useCompactMode } from "../hooks/useCompactMode.js";
|
|
13
|
+
import { StatusIndicator } from "../astro/StatusIndicator.js";
|
|
14
|
+
function getHealthStatus(healthStatus) {
|
|
15
|
+
return normalizeStatus(healthStatus);
|
|
16
|
+
}
|
|
17
|
+
function getBatteryStatus(level) {
|
|
18
|
+
return deriveBatteryStatus(level);
|
|
19
|
+
}
|
|
20
|
+
const TelemetryCard = memo(function TelemetryCard2({
|
|
21
|
+
telemetry,
|
|
22
|
+
spacecraftName,
|
|
23
|
+
showPower = true,
|
|
24
|
+
showAttitude = true,
|
|
25
|
+
showComms = true,
|
|
26
|
+
loading = false,
|
|
27
|
+
className = "",
|
|
28
|
+
compact = false,
|
|
29
|
+
defaultExpanded = false,
|
|
30
|
+
onPinChange
|
|
31
|
+
}) {
|
|
32
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v;
|
|
33
|
+
const { tokens, theme, prefersReducedMotion } = useTheme();
|
|
34
|
+
const isTransparentTheme = theme === "transparent" || theme === "transparent-bold" || theme === "transparent-minimal";
|
|
35
|
+
const isBoldVariant = theme === "transparent-bold";
|
|
36
|
+
const isMinimalVariant = theme === "transparent-minimal";
|
|
37
|
+
const useGlassMode = isBoldVariant || isMinimalVariant;
|
|
38
|
+
const glassAccentColor = tokens.colors.accent.primary;
|
|
39
|
+
const glassAccentMuted = `${glassAccentColor}66`;
|
|
40
|
+
const cardBg = isTransparentTheme ? "transparent" : tokens.colors.background.surface;
|
|
41
|
+
const cardGlass = isTransparentTheme ? {
|
|
42
|
+
backdropFilter: "blur(12px)",
|
|
43
|
+
WebkitBackdropFilter: "blur(12px)"
|
|
44
|
+
} : {};
|
|
45
|
+
const cardBorderStyle = useCardBorderStyle(tokens, isTransparentTheme);
|
|
46
|
+
const glassContainerStyle = useGlassMode ? {
|
|
47
|
+
backgroundColor: "rgba(10, 15, 25, 0.35)",
|
|
48
|
+
backdropFilter: "blur(12px)",
|
|
49
|
+
WebkitBackdropFilter: "blur(12px)",
|
|
50
|
+
border: `1px solid ${glassAccentMuted}`,
|
|
51
|
+
borderTop: isBoldVariant ? `2px solid ${glassAccentColor}` : `1px solid ${glassAccentColor}`
|
|
52
|
+
} : {};
|
|
53
|
+
const { expanded, isPinned, isHovered: _isHovered, handlers, transitionDuration: compactTransition } = useCompactMode({
|
|
54
|
+
compact,
|
|
55
|
+
defaultExpanded,
|
|
56
|
+
onPinChange
|
|
57
|
+
});
|
|
58
|
+
const [_isAnimating, _setIsAnimating] = useState(false);
|
|
59
|
+
const animationDuration = prefersReducedMotion ? 0 : 250;
|
|
60
|
+
const animationEasing = "cubic-bezier(0.4, 0, 0.2, 1)";
|
|
61
|
+
const healthStatus = useMemo(
|
|
62
|
+
() => {
|
|
63
|
+
var _a2;
|
|
64
|
+
return getHealthStatus((_a2 = telemetry == null ? void 0 : telemetry.health) == null ? void 0 : _a2.status);
|
|
65
|
+
},
|
|
66
|
+
[(_a = telemetry == null ? void 0 : telemetry.health) == null ? void 0 : _a.status]
|
|
67
|
+
);
|
|
68
|
+
const batteryStatus = useMemo(
|
|
69
|
+
() => {
|
|
70
|
+
var _a2;
|
|
71
|
+
return getBatteryStatus((_a2 = telemetry == null ? void 0 : telemetry.power) == null ? void 0 : _a2.batteryLevel);
|
|
72
|
+
},
|
|
73
|
+
[(_b = telemetry == null ? void 0 : telemetry.power) == null ? void 0 : _b.batteryLevel]
|
|
74
|
+
);
|
|
75
|
+
const transitionDuration = prefersReducedMotion ? "0ms" : "200ms";
|
|
76
|
+
if (loading) {
|
|
77
|
+
return /* @__PURE__ */ jsxs(
|
|
78
|
+
"div",
|
|
79
|
+
{
|
|
80
|
+
className: classNames("zendir-telemetry-card", "loading", className),
|
|
81
|
+
role: "article",
|
|
82
|
+
"aria-busy": "true",
|
|
83
|
+
"aria-label": "Loading telemetry data",
|
|
84
|
+
style: {
|
|
85
|
+
backgroundColor: cardBg,
|
|
86
|
+
...cardGlass,
|
|
87
|
+
...cardBorderStyle,
|
|
88
|
+
borderRadius: tokens.borderRadius.lg,
|
|
89
|
+
padding: tokens.spacing.md,
|
|
90
|
+
minHeight: 200
|
|
91
|
+
},
|
|
92
|
+
children: [
|
|
93
|
+
/* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: 8, marginBottom: 16 }, children: [
|
|
94
|
+
/* @__PURE__ */ jsx(
|
|
95
|
+
"div",
|
|
96
|
+
{
|
|
97
|
+
style: {
|
|
98
|
+
width: 24,
|
|
99
|
+
height: 24,
|
|
100
|
+
borderRadius: 4,
|
|
101
|
+
backgroundColor: "rgba(255,255,255,0.1)"
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
),
|
|
105
|
+
/* @__PURE__ */ jsx(
|
|
106
|
+
"div",
|
|
107
|
+
{
|
|
108
|
+
style: {
|
|
109
|
+
height: 16,
|
|
110
|
+
width: "40%",
|
|
111
|
+
backgroundColor: "rgba(255,255,255,0.1)",
|
|
112
|
+
borderRadius: 4
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
)
|
|
116
|
+
] }),
|
|
117
|
+
[1, 2, 3].map((i) => /* @__PURE__ */ jsxs("div", { style: { marginBottom: 16 }, children: [
|
|
118
|
+
/* @__PURE__ */ jsx(
|
|
119
|
+
"div",
|
|
120
|
+
{
|
|
121
|
+
style: {
|
|
122
|
+
height: 12,
|
|
123
|
+
width: "30%",
|
|
124
|
+
backgroundColor: "rgba(255,255,255,0.08)",
|
|
125
|
+
borderRadius: 2,
|
|
126
|
+
marginBottom: 8
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
),
|
|
130
|
+
/* @__PURE__ */ jsx(
|
|
131
|
+
"div",
|
|
132
|
+
{
|
|
133
|
+
style: {
|
|
134
|
+
display: "grid",
|
|
135
|
+
gridTemplateColumns: "repeat(2, 1fr)",
|
|
136
|
+
gap: 8
|
|
137
|
+
},
|
|
138
|
+
children: [1, 2, 3, 4].map((j) => /* @__PURE__ */ jsx(
|
|
139
|
+
"div",
|
|
140
|
+
{
|
|
141
|
+
style: {
|
|
142
|
+
height: 32,
|
|
143
|
+
backgroundColor: "rgba(255,255,255,0.06)",
|
|
144
|
+
borderRadius: 4
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
j
|
|
148
|
+
))
|
|
149
|
+
}
|
|
150
|
+
)
|
|
151
|
+
] }, i))
|
|
152
|
+
]
|
|
153
|
+
}
|
|
154
|
+
);
|
|
155
|
+
}
|
|
156
|
+
if (!telemetry) {
|
|
157
|
+
return /* @__PURE__ */ jsxs(
|
|
158
|
+
"div",
|
|
159
|
+
{
|
|
160
|
+
className: classNames("zendir-telemetry-card", "empty", className),
|
|
161
|
+
role: "article",
|
|
162
|
+
"aria-label": "No telemetry data",
|
|
163
|
+
style: {
|
|
164
|
+
backgroundColor: cardBg,
|
|
165
|
+
...cardGlass,
|
|
166
|
+
...tokens.colors.border.cardStyleDashed ?? {},
|
|
167
|
+
borderRadius: tokens.borderRadius.lg,
|
|
168
|
+
padding: tokens.spacing.lg,
|
|
169
|
+
textAlign: "center",
|
|
170
|
+
color: tokens.colors.text.tertiary
|
|
171
|
+
},
|
|
172
|
+
children: [
|
|
173
|
+
/* @__PURE__ */ jsx(AstroIcon, { name: "antenna", size: "normal", label: "", style: { opacity: 0.5 } }),
|
|
174
|
+
/* @__PURE__ */ jsx("p", { style: { margin: "8px 0 0 0", fontSize: tokens.typography.body[2].fontSize }, children: "No telemetry data available" })
|
|
175
|
+
]
|
|
176
|
+
}
|
|
177
|
+
);
|
|
178
|
+
}
|
|
179
|
+
const sectionStyle = {
|
|
180
|
+
marginBottom: tokens.spacing.md,
|
|
181
|
+
paddingBottom: tokens.spacing.md,
|
|
182
|
+
borderBottom: `1px solid ${tokens.colors.border.muted}`
|
|
183
|
+
};
|
|
184
|
+
const iconColumnWidth = 20;
|
|
185
|
+
const iconGap = tokens.spacing.sm;
|
|
186
|
+
const rowGap = tokens.spacing.smd;
|
|
187
|
+
const sectionGridColumns = `${iconColumnWidth}px 1fr ${iconColumnWidth}px 1fr`;
|
|
188
|
+
const CompactMetric = ({
|
|
189
|
+
icon,
|
|
190
|
+
label,
|
|
191
|
+
value,
|
|
192
|
+
color,
|
|
193
|
+
astroIcon
|
|
194
|
+
}) => /* @__PURE__ */ jsxs("div", { style: {
|
|
195
|
+
display: "flex",
|
|
196
|
+
alignItems: "center",
|
|
197
|
+
gap: 3,
|
|
198
|
+
padding: `2px 0`
|
|
199
|
+
}, children: [
|
|
200
|
+
astroIcon ? /* @__PURE__ */ jsx(AstroIcon, { name: astroIcon, size: 12, color: color ?? tokens.colors.text.secondary }) : icon ? /* @__PURE__ */ jsx(Icon, { name: icon, size: 12, color: color ?? tokens.colors.text.secondary }) : null,
|
|
201
|
+
/* @__PURE__ */ jsx("span", { style: {
|
|
202
|
+
fontSize: tokens.typography.fontSize.micro,
|
|
203
|
+
// 0.5625rem / 9px (AstroUXDS micro)
|
|
204
|
+
fontWeight: tokens.typography.fontWeight.medium,
|
|
205
|
+
fontFamily: tokens.typography.fontFamily.primary,
|
|
206
|
+
// Roboto - Astro UX compliant
|
|
207
|
+
color: tokens.colors.text.tertiary,
|
|
208
|
+
textTransform: "uppercase",
|
|
209
|
+
minWidth: 8
|
|
210
|
+
}, children: label.charAt(0) }),
|
|
211
|
+
/* @__PURE__ */ jsx("span", { style: {
|
|
212
|
+
fontVariantNumeric: "tabular-nums",
|
|
213
|
+
fontFamily: tokens.typography.fontFamily.mono,
|
|
214
|
+
fontSize: tokens.typography.fontSize.xs,
|
|
215
|
+
color: color ?? tokens.colors.text.primary,
|
|
216
|
+
fontWeight: tokens.typography.fontWeight.medium
|
|
217
|
+
}, children: value })
|
|
218
|
+
] });
|
|
219
|
+
const renderCompactContent = () => {
|
|
220
|
+
var _a2, _b2, _c2, _d2;
|
|
221
|
+
const power = (telemetry == null ? void 0 : telemetry.power) ?? ((_a2 = telemetry == null ? void 0 : telemetry.subsystems) == null ? void 0 : _a2.power);
|
|
222
|
+
const attitude = (telemetry == null ? void 0 : telemetry.attitude) ?? ((_b2 = telemetry == null ? void 0 : telemetry.subsystems) == null ? void 0 : _b2.attitude);
|
|
223
|
+
const comms = (telemetry == null ? void 0 : telemetry.communications) ?? ((_c2 = telemetry == null ? void 0 : telemetry.subsystems) == null ? void 0 : _c2.comms);
|
|
224
|
+
const thermal = (_d2 = telemetry == null ? void 0 : telemetry.subsystems) == null ? void 0 : _d2.thermal;
|
|
225
|
+
const compactStatusColor = getStatusColor(healthStatus);
|
|
226
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
227
|
+
/* @__PURE__ */ jsxs("div", { style: {
|
|
228
|
+
display: "flex",
|
|
229
|
+
alignItems: "center",
|
|
230
|
+
justifyContent: "space-between",
|
|
231
|
+
marginBottom: tokens.spacing.xs,
|
|
232
|
+
paddingBottom: tokens.spacing.xs,
|
|
233
|
+
borderBottom: useGlassMode ? "none" : `1px solid ${tokens.colors.border.muted}`,
|
|
234
|
+
position: "relative",
|
|
235
|
+
zIndex: 1
|
|
236
|
+
}, children: [
|
|
237
|
+
/* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: tokens.spacing.sm, minWidth: 0, flex: 1 }, children: [
|
|
238
|
+
/* @__PURE__ */ jsx(
|
|
239
|
+
HeaderIconWithStatus,
|
|
240
|
+
{
|
|
241
|
+
icon: "antenna-receive",
|
|
242
|
+
size: 20,
|
|
243
|
+
status: healthStatus,
|
|
244
|
+
statusColor: compactStatusColor
|
|
245
|
+
}
|
|
246
|
+
),
|
|
247
|
+
/* @__PURE__ */ jsx("span", { style: {
|
|
248
|
+
fontWeight: tokens.typography.fontWeight.semibold,
|
|
249
|
+
fontSize: tokens.typography.fontSize.sm,
|
|
250
|
+
fontFamily: tokens.typography.fontFamily.primary,
|
|
251
|
+
color: useGlassMode ? glassAccentColor : void 0,
|
|
252
|
+
textShadow: useGlassMode ? `0 0 16px ${glassAccentMuted}` : void 0,
|
|
253
|
+
whiteSpace: "nowrap",
|
|
254
|
+
overflow: "hidden",
|
|
255
|
+
textOverflow: "ellipsis",
|
|
256
|
+
minWidth: 0
|
|
257
|
+
}, children: spacecraftName ? spacecraftName.split(" ")[0] : "Telemetry" }),
|
|
258
|
+
useGlassMode && /* @__PURE__ */ jsx("div", { style: {
|
|
259
|
+
flex: 1,
|
|
260
|
+
height: isBoldVariant ? "2px" : "1px",
|
|
261
|
+
minWidth: 20,
|
|
262
|
+
background: `linear-gradient(90deg, ${glassAccentColor} 0%, ${glassAccentMuted} 60%, transparent 100%)`,
|
|
263
|
+
boxShadow: isBoldVariant ? `0 0 8px ${glassAccentMuted}` : void 0
|
|
264
|
+
} })
|
|
265
|
+
] }),
|
|
266
|
+
/* @__PURE__ */ jsx("div", { style: { display: "flex", alignItems: "center", gap: tokens.spacing.xs, flexShrink: 0 }, children: isPinned && /* @__PURE__ */ jsx(Icon, { name: "lock", size: 10, color: tokens.colors.accent.primary }) })
|
|
267
|
+
] }),
|
|
268
|
+
/* @__PURE__ */ jsxs("div", { style: {
|
|
269
|
+
display: "grid",
|
|
270
|
+
gridTemplateColumns: "repeat(3, 1fr)",
|
|
271
|
+
gap: `${tokens.spacing.xs} ${tokens.spacing.sm}`
|
|
272
|
+
}, children: [
|
|
273
|
+
showPower && power && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
274
|
+
power.batteryLevel !== void 0 && /* @__PURE__ */ jsx(
|
|
275
|
+
CompactMetric,
|
|
276
|
+
{
|
|
277
|
+
icon: "battery",
|
|
278
|
+
label: "Battery",
|
|
279
|
+
value: `${safeNumber(power.batteryLevel, 0)}%`,
|
|
280
|
+
color: getStatusColor(batteryStatus)
|
|
281
|
+
}
|
|
282
|
+
),
|
|
283
|
+
(power.solarGeneration ?? power.solarArrayOutput) !== void 0 && /* @__PURE__ */ jsx(
|
|
284
|
+
CompactMetric,
|
|
285
|
+
{
|
|
286
|
+
astroIcon: "solar",
|
|
287
|
+
label: "Solar",
|
|
288
|
+
value: `${safeNumber(power.solarGeneration ?? power.solarArrayOutput, 1)}W`,
|
|
289
|
+
color: tokens.colors.status.standby
|
|
290
|
+
}
|
|
291
|
+
),
|
|
292
|
+
power.voltage !== void 0 && /* @__PURE__ */ jsx(
|
|
293
|
+
CompactMetric,
|
|
294
|
+
{
|
|
295
|
+
astroIcon: "propulsion-power",
|
|
296
|
+
label: "Voltage",
|
|
297
|
+
value: `${safeNumber(power.voltage, 1)}V`
|
|
298
|
+
}
|
|
299
|
+
)
|
|
300
|
+
] }),
|
|
301
|
+
showAttitude && attitude && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
302
|
+
attitude.pointingError !== void 0 && /* @__PURE__ */ jsx(
|
|
303
|
+
CompactMetric,
|
|
304
|
+
{
|
|
305
|
+
astroIcon: "explore",
|
|
306
|
+
label: "Pointing",
|
|
307
|
+
value: `${safeNumber(attitude.pointingError, 2)}°`
|
|
308
|
+
}
|
|
309
|
+
),
|
|
310
|
+
attitude.targetMode && /* @__PURE__ */ jsx(
|
|
311
|
+
CompactMetric,
|
|
312
|
+
{
|
|
313
|
+
astroIcon: "explore",
|
|
314
|
+
label: "Mode",
|
|
315
|
+
value: attitude.targetMode
|
|
316
|
+
}
|
|
317
|
+
)
|
|
318
|
+
] }),
|
|
319
|
+
thermal && /* @__PURE__ */ jsx(Fragment, { children: thermal.cpuTemp !== void 0 && /* @__PURE__ */ jsx(
|
|
320
|
+
CompactMetric,
|
|
321
|
+
{
|
|
322
|
+
icon: "thermometer",
|
|
323
|
+
label: "CPU",
|
|
324
|
+
value: `${safeNumber(thermal.cpuTemp, 0)}°C`,
|
|
325
|
+
color: thermal.cpuTemp > 50 ? tokens.colors.status.caution : void 0
|
|
326
|
+
}
|
|
327
|
+
) }),
|
|
328
|
+
showComms && comms && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
329
|
+
comms.signalStrength !== void 0 && /* @__PURE__ */ jsx(
|
|
330
|
+
CompactMetric,
|
|
331
|
+
{
|
|
332
|
+
astroIcon: "antenna",
|
|
333
|
+
label: "Signal",
|
|
334
|
+
value: `${safeNumber(comms.signalStrength, 0)}%`
|
|
335
|
+
}
|
|
336
|
+
),
|
|
337
|
+
(comms.downlinkRate ?? comms.dataRate) !== void 0 && /* @__PURE__ */ jsx(
|
|
338
|
+
CompactMetric,
|
|
339
|
+
{
|
|
340
|
+
astroIcon: "antenna-transmit",
|
|
341
|
+
label: "Rate",
|
|
342
|
+
value: `${safeNumber(comms.downlinkRate ?? comms.dataRate, 0)}Mb`
|
|
343
|
+
}
|
|
344
|
+
),
|
|
345
|
+
comms.transmitterStatus && /* @__PURE__ */ jsx(
|
|
346
|
+
CompactMetric,
|
|
347
|
+
{
|
|
348
|
+
astroIcon: "antenna-receive",
|
|
349
|
+
label: "TX",
|
|
350
|
+
value: comms.transmitterStatus === "transmitting" ? "ON" : "OFF",
|
|
351
|
+
color: comms.transmitterStatus === "transmitting" ? tokens.colors.status.normal : tokens.colors.status.off
|
|
352
|
+
}
|
|
353
|
+
)
|
|
354
|
+
] })
|
|
355
|
+
] })
|
|
356
|
+
] });
|
|
357
|
+
};
|
|
358
|
+
if (compact) {
|
|
359
|
+
return /* @__PURE__ */ jsxs(
|
|
360
|
+
"article",
|
|
361
|
+
{
|
|
362
|
+
className: classNames("zendir-telemetry-card", "compact", expanded ? "expanded" : "", className),
|
|
363
|
+
...handlers,
|
|
364
|
+
"aria-label": spacecraftName ? `${spacecraftName} Telemetry${expanded ? "" : " (compact)"}` : "Telemetry Data",
|
|
365
|
+
style: {
|
|
366
|
+
position: "relative",
|
|
367
|
+
overflow: "hidden",
|
|
368
|
+
// Use glass container style for bold/minimal themes
|
|
369
|
+
...useGlassMode ? glassContainerStyle : {
|
|
370
|
+
backgroundColor: cardBg,
|
|
371
|
+
...cardGlass,
|
|
372
|
+
...cardBorderStyle
|
|
373
|
+
},
|
|
374
|
+
borderRadius: tokens.borderRadius.lg,
|
|
375
|
+
padding: expanded ? tokens.spacing.md : tokens.spacing.sm,
|
|
376
|
+
fontFamily: tokens.typography.fontFamily.primary,
|
|
377
|
+
color: tokens.colors.text.primary,
|
|
378
|
+
fontSize: expanded ? tokens.typography.fontSize.base : tokens.typography.fontSize.sm,
|
|
379
|
+
cursor: "pointer",
|
|
380
|
+
transition: `all ${animationDuration}ms ${animationEasing}`,
|
|
381
|
+
boxShadow: expanded ? `0 12px 40px rgba(0,0,0,0.4), 0 0 0 1px ${tokens.colors.accent.primary}30` : "none",
|
|
382
|
+
zIndex: expanded ? 50 : 1
|
|
383
|
+
},
|
|
384
|
+
children: [
|
|
385
|
+
useGlassMode && /* @__PURE__ */ jsx(
|
|
386
|
+
"div",
|
|
387
|
+
{
|
|
388
|
+
style: {
|
|
389
|
+
position: "absolute",
|
|
390
|
+
inset: 0,
|
|
391
|
+
background: "linear-gradient(135deg, rgba(255,255,255,0.03) 0%, transparent 50%, rgba(0,0,0,0.1) 100%)",
|
|
392
|
+
pointerEvents: "none",
|
|
393
|
+
zIndex: 0
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
),
|
|
397
|
+
expanded ? (
|
|
398
|
+
// Full expanded content - resolve data with fallbacks like compact view
|
|
399
|
+
(() => {
|
|
400
|
+
var _a2, _b2, _c2, _d2, _e2, _f2;
|
|
401
|
+
const power = (telemetry == null ? void 0 : telemetry.power) ?? ((_a2 = telemetry == null ? void 0 : telemetry.subsystems) == null ? void 0 : _a2.power);
|
|
402
|
+
const attitude = (telemetry == null ? void 0 : telemetry.attitude) ?? ((_b2 = telemetry == null ? void 0 : telemetry.subsystems) == null ? void 0 : _b2.attitude);
|
|
403
|
+
const comms = (telemetry == null ? void 0 : telemetry.communications) ?? ((_c2 = telemetry == null ? void 0 : telemetry.subsystems) == null ? void 0 : _c2.comms);
|
|
404
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
405
|
+
/* @__PURE__ */ jsxs(
|
|
406
|
+
"header",
|
|
407
|
+
{
|
|
408
|
+
style: {
|
|
409
|
+
display: "flex",
|
|
410
|
+
justifyContent: "space-between",
|
|
411
|
+
alignItems: "center",
|
|
412
|
+
marginBottom: tokens.spacing.md
|
|
413
|
+
},
|
|
414
|
+
children: [
|
|
415
|
+
/* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: tokens.spacing.sm }, children: [
|
|
416
|
+
/* @__PURE__ */ jsx(
|
|
417
|
+
HeaderIconWithStatus,
|
|
418
|
+
{
|
|
419
|
+
icon: "antenna-receive",
|
|
420
|
+
size: 24,
|
|
421
|
+
status: healthStatus
|
|
422
|
+
}
|
|
423
|
+
),
|
|
424
|
+
/* @__PURE__ */ jsx(
|
|
425
|
+
"h3",
|
|
426
|
+
{
|
|
427
|
+
style: {
|
|
428
|
+
margin: 0,
|
|
429
|
+
fontSize: tokens.typography.fontSize.md,
|
|
430
|
+
fontWeight: tokens.typography.fontWeight.semibold
|
|
431
|
+
},
|
|
432
|
+
children: spacecraftName ? `${spacecraftName} Telemetry` : "Telemetry"
|
|
433
|
+
}
|
|
434
|
+
),
|
|
435
|
+
isPinned && /* @__PURE__ */ jsx(Icon, { name: "lock", size: 12, color: tokens.colors.accent.primary, style: { marginLeft: 4 } })
|
|
436
|
+
] }),
|
|
437
|
+
/* @__PURE__ */ jsx(StatusIndicator, { status: healthStatus, label: healthStatus, small: true })
|
|
438
|
+
]
|
|
439
|
+
}
|
|
440
|
+
),
|
|
441
|
+
showPower && /* @__PURE__ */ jsxs("section", { style: sectionStyle, "aria-label": "Power subsystem", children: [
|
|
442
|
+
/* @__PURE__ */ jsxs("div", { style: { display: "grid", gridTemplateColumns: sectionGridColumns, gap: `${rowGap} ${iconGap}`, alignItems: "center" }, children: [
|
|
443
|
+
/* @__PURE__ */ jsx(AstroIcon, { name: "propulsion-power", size: 12, color: tokens.colors.text.tertiary }),
|
|
444
|
+
/* @__PURE__ */ jsx("h4", { style: { margin: 0, gridColumn: "2 / -1", fontSize: tokens.typography.fontSize.xs, fontWeight: tokens.typography.fontWeight.medium, color: tokens.colors.text.secondary }, children: "Power" }),
|
|
445
|
+
/* @__PURE__ */ jsx(AstroIcon, { name: getPropertyConfig("battery").icon, size: 16, color: getStatusColor(batteryStatus) }),
|
|
446
|
+
/* @__PURE__ */ jsx(DataValue, { property: "battery", value: power == null ? void 0 : power.batteryLevel, size: "sm", variant: "card", showIcon: false }),
|
|
447
|
+
/* @__PURE__ */ jsx(AstroIcon, { name: getPropertyConfig("voltage").icon, size: 16, color: tokens.colors.text.tertiary }),
|
|
448
|
+
/* @__PURE__ */ jsx(DataValue, { property: "voltage", value: power == null ? void 0 : power.voltage, size: "sm", variant: "card", showIcon: false }),
|
|
449
|
+
/* @__PURE__ */ jsx(AstroIcon, { name: getPropertyConfig("solarPower").icon, size: 16, color: tokens.colors.text.tertiary }),
|
|
450
|
+
/* @__PURE__ */ jsx(DataValue, { property: "solarPower", value: (power == null ? void 0 : power.solarGeneration) ?? (power == null ? void 0 : power.solarArrayOutput), size: "sm", variant: "card", status: "standby", showIcon: false }),
|
|
451
|
+
/* @__PURE__ */ jsx(AstroIcon, { name: getPropertyConfig("load").icon, size: 16, color: tokens.colors.text.tertiary }),
|
|
452
|
+
/* @__PURE__ */ jsx(DataValue, { property: "load", value: power == null ? void 0 : power.consumption, size: "sm", variant: "card", showIcon: false })
|
|
453
|
+
] }),
|
|
454
|
+
/* @__PURE__ */ jsx(
|
|
455
|
+
"div",
|
|
456
|
+
{
|
|
457
|
+
style: {
|
|
458
|
+
marginTop: tokens.spacing.sm,
|
|
459
|
+
height: 4,
|
|
460
|
+
backgroundColor: tokens.colors.border.muted,
|
|
461
|
+
borderRadius: 2,
|
|
462
|
+
overflow: "hidden"
|
|
463
|
+
},
|
|
464
|
+
children: /* @__PURE__ */ jsx(
|
|
465
|
+
"div",
|
|
466
|
+
{
|
|
467
|
+
role: "progressbar",
|
|
468
|
+
"aria-valuenow": (power == null ? void 0 : power.batteryLevel) ?? 0,
|
|
469
|
+
"aria-valuemin": 0,
|
|
470
|
+
"aria-valuemax": 100,
|
|
471
|
+
"aria-label": "Battery level",
|
|
472
|
+
style: {
|
|
473
|
+
height: "100%",
|
|
474
|
+
width: `${Math.min(100, Math.max(0, (power == null ? void 0 : power.batteryLevel) ?? 0))}%`,
|
|
475
|
+
backgroundColor: getStatusColor(batteryStatus),
|
|
476
|
+
borderRadius: 2,
|
|
477
|
+
transition: `width ${transitionDuration} ease-out`
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
)
|
|
481
|
+
}
|
|
482
|
+
)
|
|
483
|
+
] }),
|
|
484
|
+
showAttitude && /* @__PURE__ */ jsx("section", { style: sectionStyle, "aria-label": "Attitude subsystem", children: /* @__PURE__ */ jsxs("div", { style: { display: "grid", gridTemplateColumns: sectionGridColumns, gap: `${rowGap} ${iconGap}`, alignItems: "center" }, children: [
|
|
485
|
+
/* @__PURE__ */ jsx(AstroIcon, { name: "explore", size: 12, color: tokens.colors.text.tertiary }),
|
|
486
|
+
/* @__PURE__ */ jsx("h4", { style: { margin: 0, gridColumn: "2 / -1", fontSize: tokens.typography.fontSize.xs, fontWeight: tokens.typography.fontWeight.medium, color: tokens.colors.text.secondary }, children: "Attitude" }),
|
|
487
|
+
/* @__PURE__ */ jsx(AstroIcon, { name: getPropertyConfig("roll").icon, size: 16, color: tokens.colors.text.tertiary }),
|
|
488
|
+
/* @__PURE__ */ jsx(DataValue, { property: "roll", value: ((_d2 = attitude == null ? void 0 : attitude.eulerAngles) == null ? void 0 : _d2.roll) ?? (attitude == null ? void 0 : attitude.pointingError), size: "sm", variant: "card", showStatus: false, showIcon: false }),
|
|
489
|
+
/* @__PURE__ */ jsx(AstroIcon, { name: getPropertyConfig("pitch").icon, size: 16, color: tokens.colors.text.tertiary }),
|
|
490
|
+
/* @__PURE__ */ jsx(DataValue, { property: "pitch", value: (_e2 = attitude == null ? void 0 : attitude.eulerAngles) == null ? void 0 : _e2.pitch, size: "sm", variant: "card", showStatus: false, showIcon: false }),
|
|
491
|
+
/* @__PURE__ */ jsx(AstroIcon, { name: getPropertyConfig("yaw").icon, size: 16, color: tokens.colors.text.tertiary }),
|
|
492
|
+
/* @__PURE__ */ jsx(DataValue, { property: "yaw", value: (_f2 = attitude == null ? void 0 : attitude.eulerAngles) == null ? void 0 : _f2.yaw, size: "sm", variant: "card", showStatus: false, showIcon: false }),
|
|
493
|
+
/* @__PURE__ */ jsx(AstroIcon, { name: "explore", size: 16, color: tokens.colors.text.tertiary }),
|
|
494
|
+
/* @__PURE__ */ jsx(DataValue, { label: "Mode", icon: "explore", value: (attitude == null ? void 0 : attitude.targetMode) ?? "--", size: "sm", variant: "card", showStatus: false, showIcon: false })
|
|
495
|
+
] }) }),
|
|
496
|
+
showComms && /* @__PURE__ */ jsx("section", { style: { marginBottom: tokens.spacing.sm }, "aria-label": "Communications subsystem", children: /* @__PURE__ */ jsxs("div", { style: { display: "grid", gridTemplateColumns: sectionGridColumns, gap: `${rowGap} ${iconGap}`, alignItems: "center" }, children: [
|
|
497
|
+
/* @__PURE__ */ jsx(AstroIcon, { name: "antenna", size: 12, color: tokens.colors.text.tertiary }),
|
|
498
|
+
/* @__PURE__ */ jsx("h4", { style: { margin: 0, gridColumn: "2 / -1", fontSize: tokens.typography.fontSize.xs, fontWeight: tokens.typography.fontWeight.medium, color: tokens.colors.text.secondary }, children: "Communications" }),
|
|
499
|
+
/* @__PURE__ */ jsx(AstroIcon, { name: "antenna-transmit", size: 16, color: tokens.colors.text.tertiary }),
|
|
500
|
+
/* @__PURE__ */ jsx(DataValue, { label: "Status", icon: "antenna-transmit", value: (comms == null ? void 0 : comms.transmitterStatus) ?? (comms == null ? void 0 : comms.status) ?? "--", size: "sm", variant: "card", showStatus: false, showIcon: false }),
|
|
501
|
+
/* @__PURE__ */ jsx(AstroIcon, { name: getPropertyConfig("signalStrength").icon, size: 16, color: tokens.colors.text.tertiary }),
|
|
502
|
+
/* @__PURE__ */ jsx(DataValue, { property: "signalStrength", value: comms == null ? void 0 : comms.signalStrength, size: "sm", variant: "card", showStatus: false, showIcon: false }),
|
|
503
|
+
/* @__PURE__ */ jsx(AstroIcon, { name: "antenna-receive", size: 16, color: tokens.colors.text.tertiary }),
|
|
504
|
+
/* @__PURE__ */ jsx(DataValue, { label: "Transmitted", icon: "antenna-receive", value: (comms == null ? void 0 : comms.packetsTransmitted) ?? (comms == null ? void 0 : comms.dataRate) ?? "--", size: "sm", variant: "card", showStatus: false, showIcon: false }),
|
|
505
|
+
/* @__PURE__ */ jsx("span", { style: { gridColumn: "4 / -1" } })
|
|
506
|
+
] }) }),
|
|
507
|
+
(telemetry == null ? void 0 : telemetry.timestamp) && /* @__PURE__ */ jsx(
|
|
508
|
+
"time",
|
|
509
|
+
{
|
|
510
|
+
dateTime: telemetry.timestamp,
|
|
511
|
+
style: {
|
|
512
|
+
display: "block",
|
|
513
|
+
fontSize: tokens.typography.fontSize.xs,
|
|
514
|
+
color: tokens.colors.text.tertiary,
|
|
515
|
+
marginTop: tokens.spacing.sm,
|
|
516
|
+
fontVariantNumeric: "tabular-nums"
|
|
517
|
+
},
|
|
518
|
+
children: formatTime(telemetry.timestamp)
|
|
519
|
+
}
|
|
520
|
+
)
|
|
521
|
+
] });
|
|
522
|
+
})()
|
|
523
|
+
) : (
|
|
524
|
+
// Compact content
|
|
525
|
+
renderCompactContent()
|
|
526
|
+
)
|
|
527
|
+
]
|
|
528
|
+
}
|
|
529
|
+
);
|
|
530
|
+
}
|
|
531
|
+
return /* @__PURE__ */ jsxs(
|
|
532
|
+
"article",
|
|
533
|
+
{
|
|
534
|
+
className: classNames("zendir-telemetry-card", compact ? "expanded" : "", className),
|
|
535
|
+
...compact ? handlers : {},
|
|
536
|
+
role: compact ? handlers.role : "article",
|
|
537
|
+
tabIndex: compact ? handlers.tabIndex : void 0,
|
|
538
|
+
"aria-expanded": compact ? handlers["aria-expanded"] : void 0,
|
|
539
|
+
"aria-label": spacecraftName ? `${spacecraftName} Telemetry` : "Telemetry Data",
|
|
540
|
+
style: {
|
|
541
|
+
position: "relative",
|
|
542
|
+
overflow: "hidden",
|
|
543
|
+
...useGlassMode ? glassContainerStyle : {
|
|
544
|
+
backgroundColor: cardBg,
|
|
545
|
+
...cardGlass,
|
|
546
|
+
...cardBorderStyle
|
|
547
|
+
},
|
|
548
|
+
borderRadius: tokens.borderRadius.lg,
|
|
549
|
+
padding: tokens.spacing.md,
|
|
550
|
+
fontFamily: tokens.typography.fontFamily.primary,
|
|
551
|
+
color: tokens.colors.text.primary,
|
|
552
|
+
fontSize: tokens.typography.fontSize.sm,
|
|
553
|
+
cursor: compact ? "pointer" : void 0,
|
|
554
|
+
transition: compact ? `all ${compactTransition} ease-out` : void 0
|
|
555
|
+
},
|
|
556
|
+
children: [
|
|
557
|
+
useGlassMode && /* @__PURE__ */ jsx(
|
|
558
|
+
"div",
|
|
559
|
+
{
|
|
560
|
+
style: {
|
|
561
|
+
position: "absolute",
|
|
562
|
+
inset: 0,
|
|
563
|
+
background: "linear-gradient(135deg, rgba(255,255,255,0.03) 0%, transparent 50%, rgba(0,0,0,0.1) 100%)",
|
|
564
|
+
pointerEvents: "none",
|
|
565
|
+
zIndex: 0
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
),
|
|
569
|
+
/* @__PURE__ */ jsx(
|
|
570
|
+
CardHeader,
|
|
571
|
+
{
|
|
572
|
+
icon: "antenna-receive",
|
|
573
|
+
title: spacecraftName ? `${spacecraftName} Telemetry` : "Telemetry",
|
|
574
|
+
status: healthStatus,
|
|
575
|
+
isPinned: compact && isPinned
|
|
576
|
+
}
|
|
577
|
+
),
|
|
578
|
+
showPower && /* @__PURE__ */ jsxs("section", { style: sectionStyle, "aria-label": "Power subsystem", children: [
|
|
579
|
+
/* @__PURE__ */ jsxs("div", { style: { display: "grid", gridTemplateColumns: sectionGridColumns, gap: `${rowGap} ${iconGap}`, alignItems: "center" }, children: [
|
|
580
|
+
/* @__PURE__ */ jsx(AstroIcon, { name: "propulsion-power", size: 12, color: tokens.colors.text.tertiary }),
|
|
581
|
+
/* @__PURE__ */ jsx("h4", { style: { margin: 0, gridColumn: "2 / -1", fontSize: tokens.typography.fontSize.xs, fontWeight: tokens.typography.fontWeight.medium, color: tokens.colors.text.secondary }, children: "Power" }),
|
|
582
|
+
/* @__PURE__ */ jsx(AstroIcon, { name: getPropertyConfig("battery").icon, size: 16, color: getStatusColor(batteryStatus) }),
|
|
583
|
+
/* @__PURE__ */ jsx(DataValue, { property: "battery", value: (_c = telemetry.power) == null ? void 0 : _c.batteryLevel, size: "sm", variant: "card", showIcon: false }),
|
|
584
|
+
/* @__PURE__ */ jsx(AstroIcon, { name: getPropertyConfig("voltage").icon, size: 16, color: tokens.colors.text.tertiary }),
|
|
585
|
+
/* @__PURE__ */ jsx(DataValue, { property: "voltage", value: (_d = telemetry.power) == null ? void 0 : _d.voltage, size: "sm", variant: "card", showIcon: false }),
|
|
586
|
+
/* @__PURE__ */ jsx(AstroIcon, { name: getPropertyConfig("solarPower").icon, size: 16, color: tokens.colors.text.tertiary }),
|
|
587
|
+
/* @__PURE__ */ jsx(DataValue, { property: "solarPower", value: (_e = telemetry.power) == null ? void 0 : _e.solarGeneration, size: "sm", variant: "card", status: "standby", showIcon: false }),
|
|
588
|
+
/* @__PURE__ */ jsx(AstroIcon, { name: getPropertyConfig("load").icon, size: 16, color: tokens.colors.text.tertiary }),
|
|
589
|
+
/* @__PURE__ */ jsx(DataValue, { property: "load", value: (_f = telemetry.power) == null ? void 0 : _f.consumption, size: "sm", variant: "card", showIcon: false })
|
|
590
|
+
] }),
|
|
591
|
+
/* @__PURE__ */ jsx(
|
|
592
|
+
"div",
|
|
593
|
+
{
|
|
594
|
+
style: {
|
|
595
|
+
marginTop: tokens.spacing.sm,
|
|
596
|
+
height: 4,
|
|
597
|
+
backgroundColor: tokens.colors.border.muted,
|
|
598
|
+
borderRadius: 2,
|
|
599
|
+
overflow: "hidden"
|
|
600
|
+
},
|
|
601
|
+
children: /* @__PURE__ */ jsx(
|
|
602
|
+
"div",
|
|
603
|
+
{
|
|
604
|
+
role: "progressbar",
|
|
605
|
+
"aria-valuenow": ((_g = telemetry.power) == null ? void 0 : _g.batteryLevel) ?? 0,
|
|
606
|
+
"aria-valuemin": 0,
|
|
607
|
+
"aria-valuemax": 100,
|
|
608
|
+
"aria-label": "Battery level",
|
|
609
|
+
style: {
|
|
610
|
+
height: "100%",
|
|
611
|
+
width: `${Math.min(100, Math.max(0, ((_h = telemetry.power) == null ? void 0 : _h.batteryLevel) ?? 0))}%`,
|
|
612
|
+
backgroundColor: getStatusColor(batteryStatus),
|
|
613
|
+
borderRadius: 2,
|
|
614
|
+
transition: `width ${transitionDuration} ease-out`
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
)
|
|
618
|
+
}
|
|
619
|
+
)
|
|
620
|
+
] }),
|
|
621
|
+
showAttitude && /* @__PURE__ */ jsxs("section", { style: sectionStyle, "aria-label": "Attitude subsystem", children: [
|
|
622
|
+
/* @__PURE__ */ jsxs("div", { style: { display: "grid", gridTemplateColumns: sectionGridColumns, gap: `${rowGap} ${iconGap}`, alignItems: "center" }, children: [
|
|
623
|
+
/* @__PURE__ */ jsx(AstroIcon, { name: "explore", size: 12, color: tokens.colors.text.tertiary }),
|
|
624
|
+
/* @__PURE__ */ jsx("h4", { style: { margin: 0, gridColumn: "2 / -1", fontSize: tokens.typography.fontSize.xs, fontWeight: tokens.typography.fontWeight.medium, color: tokens.colors.text.secondary }, children: "Attitude" }),
|
|
625
|
+
/* @__PURE__ */ jsx(AstroIcon, { name: getPropertyConfig("roll").icon, size: 16, color: tokens.colors.text.tertiary }),
|
|
626
|
+
/* @__PURE__ */ jsx(DataValue, { property: "roll", value: (_j = (_i = telemetry.attitude) == null ? void 0 : _i.eulerAngles) == null ? void 0 : _j.roll, size: "sm", variant: "card", showStatus: false, showIcon: false }),
|
|
627
|
+
/* @__PURE__ */ jsx(AstroIcon, { name: getPropertyConfig("pitch").icon, size: 16, color: tokens.colors.text.tertiary }),
|
|
628
|
+
/* @__PURE__ */ jsx(DataValue, { property: "pitch", value: (_l = (_k = telemetry.attitude) == null ? void 0 : _k.eulerAngles) == null ? void 0 : _l.pitch, size: "sm", variant: "card", showStatus: false, showIcon: false }),
|
|
629
|
+
/* @__PURE__ */ jsx(AstroIcon, { name: getPropertyConfig("yaw").icon, size: 16, color: tokens.colors.text.tertiary }),
|
|
630
|
+
/* @__PURE__ */ jsx(DataValue, { property: "yaw", value: (_n = (_m = telemetry.attitude) == null ? void 0 : _m.eulerAngles) == null ? void 0 : _n.yaw, size: "sm", variant: "card", showStatus: false, showIcon: false }),
|
|
631
|
+
/* @__PURE__ */ jsx(AstroIcon, { name: "explore", size: 16, color: tokens.colors.text.tertiary }),
|
|
632
|
+
/* @__PURE__ */ jsx(DataValue, { label: "Mode", icon: "explore", value: ((_o = telemetry.attitude) == null ? void 0 : _o.targetMode) ?? "--", size: "sm", variant: "card", showStatus: false, showIcon: false })
|
|
633
|
+
] }),
|
|
634
|
+
((_p = telemetry.attitude) == null ? void 0 : _p.pointingError) !== void 0 && /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: iconGap, marginTop: tokens.spacing.sm }, children: [
|
|
635
|
+
/* @__PURE__ */ jsx(AstroIcon, { name: getPropertyConfig("pointingError").icon, size: 16, color: tokens.colors.text.tertiary }),
|
|
636
|
+
/* @__PURE__ */ jsx(DataValue, { property: "pointingError", value: telemetry.attitude.pointingError, size: "sm", variant: "inline", showIcon: false })
|
|
637
|
+
] })
|
|
638
|
+
] }),
|
|
639
|
+
showComms && /* @__PURE__ */ jsx("section", { style: { marginBottom: tokens.spacing.md }, "aria-label": "Communications subsystem", children: /* @__PURE__ */ jsxs("div", { style: { display: "grid", gridTemplateColumns: sectionGridColumns, gap: `${rowGap} ${iconGap}`, alignItems: "center" }, children: [
|
|
640
|
+
/* @__PURE__ */ jsx(AstroIcon, { name: "antenna", size: 12, color: tokens.colors.text.tertiary }),
|
|
641
|
+
/* @__PURE__ */ jsx("h4", { style: { margin: 0, gridColumn: "2 / -1", fontSize: tokens.typography.fontSize.xs, fontWeight: tokens.typography.fontWeight.medium, color: tokens.colors.text.secondary }, children: "Communications" }),
|
|
642
|
+
/* @__PURE__ */ jsx(AstroIcon, { name: "antenna-transmit", size: 16, color: tokens.colors.text.tertiary }),
|
|
643
|
+
/* @__PURE__ */ jsx(
|
|
644
|
+
DataValue,
|
|
645
|
+
{
|
|
646
|
+
label: "Status",
|
|
647
|
+
icon: "antenna-transmit",
|
|
648
|
+
value: ((_q = telemetry.communications) == null ? void 0 : _q.transmitterStatus) ?? "--",
|
|
649
|
+
size: "sm",
|
|
650
|
+
variant: "card",
|
|
651
|
+
showIcon: false,
|
|
652
|
+
status: ((_r = telemetry.communications) == null ? void 0 : _r.transmitterStatus) === "transmitting" ? "normal" : ((_s = telemetry.communications) == null ? void 0 : _s.transmitterStatus) === "error" ? "critical" : "off"
|
|
653
|
+
}
|
|
654
|
+
),
|
|
655
|
+
/* @__PURE__ */ jsx(AstroIcon, { name: getPropertyConfig("queue").icon, size: 16, color: tokens.colors.text.tertiary }),
|
|
656
|
+
/* @__PURE__ */ jsx(DataValue, { property: "queue", value: (_t = telemetry.communications) == null ? void 0 : _t.packetsQueued, size: "sm", variant: "card", showIcon: false }),
|
|
657
|
+
/* @__PURE__ */ jsx(AstroIcon, { name: "antenna-receive", size: 16, color: tokens.colors.text.tertiary }),
|
|
658
|
+
/* @__PURE__ */ jsx(
|
|
659
|
+
DataValue,
|
|
660
|
+
{
|
|
661
|
+
label: "Transmitted",
|
|
662
|
+
icon: "antenna-receive",
|
|
663
|
+
value: safeNumber((((_u = telemetry.communications) == null ? void 0 : _u.bytesTransmitted) ?? 0) / 1024, 1),
|
|
664
|
+
unit: "KB",
|
|
665
|
+
size: "sm",
|
|
666
|
+
variant: "card",
|
|
667
|
+
showStatus: false,
|
|
668
|
+
showIcon: false
|
|
669
|
+
}
|
|
670
|
+
),
|
|
671
|
+
/* @__PURE__ */ jsx("span", { style: { gridColumn: "4 / -1" } })
|
|
672
|
+
] }) }),
|
|
673
|
+
((_v = telemetry.health) == null ? void 0 : _v.anomalies) && telemetry.health.anomalies.length > 0 && /* @__PURE__ */ jsxs(
|
|
674
|
+
"div",
|
|
675
|
+
{
|
|
676
|
+
role: "alert",
|
|
677
|
+
style: {
|
|
678
|
+
backgroundColor: `${tokens.colors.status.critical}15`,
|
|
679
|
+
border: `1px solid ${tokens.colors.status.critical}40`,
|
|
680
|
+
borderRadius: tokens.borderRadius.md,
|
|
681
|
+
padding: tokens.spacing.sm,
|
|
682
|
+
marginTop: tokens.spacing.md
|
|
683
|
+
},
|
|
684
|
+
children: [
|
|
685
|
+
/* @__PURE__ */ jsxs(
|
|
686
|
+
"h4",
|
|
687
|
+
{
|
|
688
|
+
style: {
|
|
689
|
+
margin: `0 0 ${tokens.spacing.xs} 0`,
|
|
690
|
+
fontSize: tokens.typography.fontSize.xs,
|
|
691
|
+
fontWeight: tokens.typography.fontWeight.medium,
|
|
692
|
+
color: tokens.colors.status.critical,
|
|
693
|
+
display: "flex",
|
|
694
|
+
alignItems: "center",
|
|
695
|
+
gap: 4
|
|
696
|
+
},
|
|
697
|
+
children: [
|
|
698
|
+
"⚠️ Anomalies (",
|
|
699
|
+
telemetry.health.anomalies.length,
|
|
700
|
+
")"
|
|
701
|
+
]
|
|
702
|
+
}
|
|
703
|
+
),
|
|
704
|
+
/* @__PURE__ */ jsx("ul", { style: { margin: 0, paddingLeft: 16 }, children: telemetry.health.anomalies.map((anomaly, idx) => /* @__PURE__ */ jsx(
|
|
705
|
+
"li",
|
|
706
|
+
{
|
|
707
|
+
style: {
|
|
708
|
+
fontSize: tokens.typography.fontSize.xs,
|
|
709
|
+
color: tokens.colors.status.critical,
|
|
710
|
+
marginTop: 2
|
|
711
|
+
},
|
|
712
|
+
children: typeof anomaly === "object" && anomaly !== null && "message" in anomaly ? anomaly.message : String(anomaly)
|
|
713
|
+
},
|
|
714
|
+
idx
|
|
715
|
+
)) })
|
|
716
|
+
]
|
|
717
|
+
}
|
|
718
|
+
),
|
|
719
|
+
/* @__PURE__ */ jsx(
|
|
720
|
+
"footer",
|
|
721
|
+
{
|
|
722
|
+
style: {
|
|
723
|
+
marginTop: tokens.spacing.md,
|
|
724
|
+
fontSize: tokens.typography.fontSize.xs,
|
|
725
|
+
color: tokens.colors.text.secondary,
|
|
726
|
+
// WCAG AA compliant - 4.5:1 contrast
|
|
727
|
+
textAlign: "right"
|
|
728
|
+
},
|
|
729
|
+
children: /* @__PURE__ */ jsxs("time", { dateTime: telemetry.timestamp, children: [
|
|
730
|
+
formatTime(telemetry.timestamp),
|
|
731
|
+
" UTC"
|
|
732
|
+
] })
|
|
733
|
+
}
|
|
734
|
+
)
|
|
735
|
+
]
|
|
736
|
+
}
|
|
737
|
+
);
|
|
738
|
+
});
|
|
739
|
+
export {
|
|
740
|
+
TelemetryCard
|
|
741
|
+
};
|
|
742
|
+
//# sourceMappingURL=TelemetryCard.js.map
|