@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,532 +1,870 @@
|
|
|
1
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { memo, useState, useRef, useMemo, useCallback } from "react";
|
|
3
1
|
import { useTheme } from "../../theme/ThemeProvider.js";
|
|
2
|
+
import { memo, useCallback, useMemo, useRef, useState } from "react";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
//#region src/react/core/widgets/ActivityPlanner.tsx
|
|
5
|
+
/**
|
|
6
|
+
* @zendir/ui - ActivityPlanner Component
|
|
7
|
+
*
|
|
8
|
+
* Activity scheduling and management panel. Creates, edits, and monitors
|
|
9
|
+
* scheduled activities across timelines. Integrates with MissionCalendar
|
|
10
|
+
* and Timeline components.
|
|
11
|
+
*
|
|
12
|
+
* Space Mission Features:
|
|
13
|
+
* - Create/edit activities with command or script execution
|
|
14
|
+
* - Drag-and-drop reorder within timeline
|
|
15
|
+
* - Hazardous activity warnings (Astro UX)
|
|
16
|
+
* - Activity lifecycle tracking (created → scheduled → started → completed)
|
|
17
|
+
* - Overlap detection within a timeline
|
|
18
|
+
* - Metadata recording (operator, environment, notes)
|
|
19
|
+
* - Contact window awareness
|
|
20
|
+
* - Batch scheduling
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```tsx
|
|
24
|
+
* <ActivityPlanner
|
|
25
|
+
* activities={activities}
|
|
26
|
+
* timelines={timelines}
|
|
27
|
+
* onActivityCreate={(a) => console.log('Create:', a)}
|
|
28
|
+
* onActivityUpdate={(a) => console.log('Update:', a)}
|
|
29
|
+
* />
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
/**
|
|
33
|
+
* Map activity status → Astro UX status color using tokens.
|
|
34
|
+
* created/scheduled → standby (cyan)
|
|
35
|
+
* started/completed → normal (green)
|
|
36
|
+
* paused/stopped/disabled → caution (yellow)
|
|
37
|
+
* error/failed/crashed → critical (red)
|
|
38
|
+
*/
|
|
4
39
|
function getStatusColor(status, tokens) {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
case "failed":
|
|
19
|
-
case "crashed":
|
|
20
|
-
return tokens.colors.status.critical;
|
|
21
|
-
}
|
|
40
|
+
if (!status || !tokens) return tokens?.colors.text.muted ?? "currentColor";
|
|
41
|
+
switch (status) {
|
|
42
|
+
case "created":
|
|
43
|
+
case "scheduled": return tokens.colors.status.standby;
|
|
44
|
+
case "started":
|
|
45
|
+
case "completed": return tokens.colors.status.normal;
|
|
46
|
+
case "paused":
|
|
47
|
+
case "stopped":
|
|
48
|
+
case "disabled": return tokens.colors.status.caution;
|
|
49
|
+
case "error":
|
|
50
|
+
case "failed":
|
|
51
|
+
case "crashed": return tokens.colors.status.critical;
|
|
52
|
+
}
|
|
22
53
|
}
|
|
54
|
+
/**
|
|
55
|
+
* Return Astro UX status shape + contextual icon.
|
|
56
|
+
* The leading character is the Astro status shape for the mapped level:
|
|
57
|
+
* standby → ◯ (ring), normal → ● (filled circle),
|
|
58
|
+
* caution → ■ (square), critical → ▼ (triangle down)
|
|
59
|
+
* Followed by a contextual glyph for the specific activity state.
|
|
60
|
+
*/
|
|
23
61
|
function getStatusIcon(status) {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
return "■ ⏹";
|
|
38
|
-
case "disabled":
|
|
39
|
-
return "■ ⊘";
|
|
40
|
-
case "error":
|
|
41
|
-
case "failed":
|
|
42
|
-
case "crashed":
|
|
43
|
-
return "▼";
|
|
44
|
-
}
|
|
62
|
+
if (!status) return "◯";
|
|
63
|
+
switch (status) {
|
|
64
|
+
case "created": return "◯";
|
|
65
|
+
case "scheduled": return "◯ ◉";
|
|
66
|
+
case "started": return "● ▶";
|
|
67
|
+
case "completed": return "● ✓";
|
|
68
|
+
case "paused": return "■ ⏸";
|
|
69
|
+
case "stopped": return "■ ⏹";
|
|
70
|
+
case "disabled": return "■ ⊘";
|
|
71
|
+
case "error":
|
|
72
|
+
case "failed":
|
|
73
|
+
case "crashed": return "▼";
|
|
74
|
+
}
|
|
45
75
|
}
|
|
46
76
|
function formatDate(d) {
|
|
47
|
-
|
|
77
|
+
return d.toLocaleDateString("en-US", {
|
|
78
|
+
month: "short",
|
|
79
|
+
day: "numeric",
|
|
80
|
+
year: "numeric"
|
|
81
|
+
});
|
|
48
82
|
}
|
|
49
83
|
function formatTime(d) {
|
|
50
|
-
|
|
84
|
+
return d.toLocaleTimeString("en-US", {
|
|
85
|
+
hour12: false,
|
|
86
|
+
hour: "2-digit",
|
|
87
|
+
minute: "2-digit",
|
|
88
|
+
second: "2-digit"
|
|
89
|
+
});
|
|
51
90
|
}
|
|
52
91
|
function checkOverlap(a, b) {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
92
|
+
if (!a.end || !b.end) return false;
|
|
93
|
+
if (a.timeline !== b.timeline) return false;
|
|
94
|
+
return a.start < b.end && b.start < a.end;
|
|
56
95
|
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
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
|
-
|
|
96
|
+
var ActivityForm = memo(function ActivityForm({ timelines, selectedDate, tokens, onSubmit, onCancel }) {
|
|
97
|
+
const now = selectedDate || /* @__PURE__ */ new Date();
|
|
98
|
+
const endDefault = new Date(now.getTime() + 36e5);
|
|
99
|
+
const [form, setForm] = useState({
|
|
100
|
+
title: "",
|
|
101
|
+
type: "command",
|
|
102
|
+
start: now.toISOString().slice(0, 16),
|
|
103
|
+
end: endDefault.toISOString().slice(0, 16),
|
|
104
|
+
timeline: timelines[0]?.id || "",
|
|
105
|
+
description: "",
|
|
106
|
+
command: "",
|
|
107
|
+
script: "",
|
|
108
|
+
hazardous: false,
|
|
109
|
+
metadata: {}
|
|
110
|
+
});
|
|
111
|
+
const [metaKey, setMetaKey] = useState("");
|
|
112
|
+
const [metaValue, setMetaValue] = useState("");
|
|
113
|
+
const addMetadata = useCallback(() => {
|
|
114
|
+
if (metaKey.trim()) {
|
|
115
|
+
setForm((prev) => ({
|
|
116
|
+
...prev,
|
|
117
|
+
metadata: {
|
|
118
|
+
...prev.metadata,
|
|
119
|
+
[metaKey.trim()]: metaValue
|
|
120
|
+
}
|
|
121
|
+
}));
|
|
122
|
+
setMetaKey("");
|
|
123
|
+
setMetaValue("");
|
|
124
|
+
}
|
|
125
|
+
}, [metaKey, metaValue]);
|
|
126
|
+
const inputStyle = {
|
|
127
|
+
background: tokens.colors.background.base,
|
|
128
|
+
color: tokens.colors.text.primary,
|
|
129
|
+
border: `1px solid ${tokens.colors.border.muted}`,
|
|
130
|
+
borderRadius: tokens.borderRadius.md,
|
|
131
|
+
padding: `${tokens.spacing.xs}px ${tokens.spacing.sm}px`,
|
|
132
|
+
fontSize: tokens.typography.fontSize.xs,
|
|
133
|
+
width: "100%",
|
|
134
|
+
minHeight: 40,
|
|
135
|
+
fontFamily: tokens.typography.fontFamily.primary,
|
|
136
|
+
transition: "all 150ms ease"
|
|
137
|
+
};
|
|
138
|
+
const labelStyle = {
|
|
139
|
+
fontSize: tokens.typography.fontSize.xxs,
|
|
140
|
+
fontWeight: 500,
|
|
141
|
+
color: tokens.colors.text.muted,
|
|
142
|
+
textTransform: "uppercase",
|
|
143
|
+
marginBottom: 3,
|
|
144
|
+
display: "block"
|
|
145
|
+
};
|
|
146
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
147
|
+
style: {
|
|
148
|
+
padding: 12,
|
|
149
|
+
display: "flex",
|
|
150
|
+
flexDirection: "column",
|
|
151
|
+
gap: 8
|
|
152
|
+
},
|
|
153
|
+
children: [
|
|
154
|
+
/* @__PURE__ */ jsxs("div", {
|
|
155
|
+
style: {
|
|
156
|
+
display: "grid",
|
|
157
|
+
gridTemplateColumns: "1fr 120px",
|
|
158
|
+
gap: 8
|
|
159
|
+
},
|
|
160
|
+
children: [/* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("label", {
|
|
161
|
+
htmlFor: "activity-title",
|
|
162
|
+
style: labelStyle,
|
|
163
|
+
children: "Title"
|
|
164
|
+
}), /* @__PURE__ */ jsx("input", {
|
|
165
|
+
id: "activity-title",
|
|
166
|
+
"aria-label": "Activity title",
|
|
167
|
+
style: inputStyle,
|
|
168
|
+
value: form.title,
|
|
169
|
+
onChange: (e) => setForm((p) => ({
|
|
170
|
+
...p,
|
|
171
|
+
title: e.target.value
|
|
172
|
+
})),
|
|
173
|
+
placeholder: "Activity name"
|
|
174
|
+
})] }), /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("label", {
|
|
175
|
+
htmlFor: "activity-type",
|
|
176
|
+
style: labelStyle,
|
|
177
|
+
children: "Type"
|
|
178
|
+
}), /* @__PURE__ */ jsxs("select", {
|
|
179
|
+
id: "activity-type",
|
|
180
|
+
"aria-label": "Activity type",
|
|
181
|
+
style: inputStyle,
|
|
182
|
+
value: form.type,
|
|
183
|
+
onChange: (e) => setForm((p) => ({
|
|
184
|
+
...p,
|
|
185
|
+
type: e.target.value
|
|
186
|
+
})),
|
|
187
|
+
children: [
|
|
188
|
+
/* @__PURE__ */ jsx("option", {
|
|
189
|
+
value: "command",
|
|
190
|
+
children: "Command"
|
|
191
|
+
}),
|
|
192
|
+
/* @__PURE__ */ jsx("option", {
|
|
193
|
+
value: "script",
|
|
194
|
+
children: "Script"
|
|
195
|
+
}),
|
|
196
|
+
/* @__PURE__ */ jsx("option", {
|
|
197
|
+
value: "reserve",
|
|
198
|
+
children: "Reserve"
|
|
199
|
+
}),
|
|
200
|
+
/* @__PURE__ */ jsx("option", {
|
|
201
|
+
value: "contact",
|
|
202
|
+
children: "Contact"
|
|
203
|
+
}),
|
|
204
|
+
/* @__PURE__ */ jsx("option", {
|
|
205
|
+
value: "note",
|
|
206
|
+
children: "Note"
|
|
207
|
+
}),
|
|
208
|
+
/* @__PURE__ */ jsx("option", {
|
|
209
|
+
value: "metadata",
|
|
210
|
+
children: "Metadata"
|
|
211
|
+
})
|
|
212
|
+
]
|
|
213
|
+
})] })]
|
|
214
|
+
}),
|
|
215
|
+
/* @__PURE__ */ jsxs("div", {
|
|
216
|
+
style: {
|
|
217
|
+
display: "grid",
|
|
218
|
+
gridTemplateColumns: "1fr 1fr",
|
|
219
|
+
gap: 8
|
|
220
|
+
},
|
|
221
|
+
children: [/* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("label", {
|
|
222
|
+
htmlFor: "activity-start-time",
|
|
223
|
+
style: labelStyle,
|
|
224
|
+
children: "Start Time"
|
|
225
|
+
}), /* @__PURE__ */ jsx("input", {
|
|
226
|
+
id: "activity-start-time",
|
|
227
|
+
"aria-label": "Start time",
|
|
228
|
+
type: "datetime-local",
|
|
229
|
+
style: {
|
|
230
|
+
...inputStyle,
|
|
231
|
+
fontFamily: tokens.typography.fontFamily.mono
|
|
232
|
+
},
|
|
233
|
+
value: form.start,
|
|
234
|
+
onChange: (e) => setForm((p) => ({
|
|
235
|
+
...p,
|
|
236
|
+
start: e.target.value
|
|
237
|
+
}))
|
|
238
|
+
})] }), /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("label", {
|
|
239
|
+
htmlFor: "activity-end-time",
|
|
240
|
+
style: labelStyle,
|
|
241
|
+
children: "End Time"
|
|
242
|
+
}), /* @__PURE__ */ jsx("input", {
|
|
243
|
+
id: "activity-end-time",
|
|
244
|
+
"aria-label": "End time",
|
|
245
|
+
type: "datetime-local",
|
|
246
|
+
style: {
|
|
247
|
+
...inputStyle,
|
|
248
|
+
fontFamily: tokens.typography.fontFamily.mono
|
|
249
|
+
},
|
|
250
|
+
value: form.end,
|
|
251
|
+
onChange: (e) => setForm((p) => ({
|
|
252
|
+
...p,
|
|
253
|
+
end: e.target.value
|
|
254
|
+
}))
|
|
255
|
+
})] })]
|
|
256
|
+
}),
|
|
257
|
+
timelines.length > 0 && /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("label", {
|
|
258
|
+
htmlFor: "activity-timeline",
|
|
259
|
+
style: labelStyle,
|
|
260
|
+
children: "Timeline"
|
|
261
|
+
}), /* @__PURE__ */ jsx("select", {
|
|
262
|
+
id: "activity-timeline",
|
|
263
|
+
"aria-label": "Timeline",
|
|
264
|
+
style: inputStyle,
|
|
265
|
+
value: form.timeline,
|
|
266
|
+
onChange: (e) => setForm((p) => ({
|
|
267
|
+
...p,
|
|
268
|
+
timeline: e.target.value
|
|
269
|
+
})),
|
|
270
|
+
children: timelines.map((t) => /* @__PURE__ */ jsx("option", {
|
|
271
|
+
value: t.id,
|
|
272
|
+
children: t.name
|
|
273
|
+
}, t.id))
|
|
274
|
+
})] }),
|
|
275
|
+
form.type === "command" && /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("label", {
|
|
276
|
+
htmlFor: "activity-command",
|
|
277
|
+
style: labelStyle,
|
|
278
|
+
children: "Command"
|
|
279
|
+
}), /* @__PURE__ */ jsx("input", {
|
|
280
|
+
id: "activity-command",
|
|
281
|
+
"aria-label": "Command",
|
|
282
|
+
style: {
|
|
283
|
+
...inputStyle,
|
|
284
|
+
fontFamily: tokens.typography.fontFamily.mono
|
|
285
|
+
},
|
|
286
|
+
value: form.command,
|
|
287
|
+
onChange: (e) => setForm((p) => ({
|
|
288
|
+
...p,
|
|
289
|
+
command: e.target.value
|
|
290
|
+
})),
|
|
291
|
+
placeholder: "cmd(\"TARGET COMMAND\")"
|
|
292
|
+
})] }),
|
|
293
|
+
form.type === "script" && /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("label", {
|
|
294
|
+
htmlFor: "activity-script",
|
|
295
|
+
style: labelStyle,
|
|
296
|
+
children: "Script Path"
|
|
297
|
+
}), /* @__PURE__ */ jsx("input", {
|
|
298
|
+
id: "activity-script",
|
|
299
|
+
"aria-label": "Script path",
|
|
300
|
+
style: {
|
|
301
|
+
...inputStyle,
|
|
302
|
+
fontFamily: tokens.typography.fontFamily.mono
|
|
303
|
+
},
|
|
304
|
+
value: form.script,
|
|
305
|
+
onChange: (e) => setForm((p) => ({
|
|
306
|
+
...p,
|
|
307
|
+
script: e.target.value
|
|
308
|
+
})),
|
|
309
|
+
placeholder: "/scripts/ops/collect.rb"
|
|
310
|
+
})] }),
|
|
311
|
+
/* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("label", {
|
|
312
|
+
htmlFor: "activity-description",
|
|
313
|
+
style: labelStyle,
|
|
314
|
+
children: "Description"
|
|
315
|
+
}), /* @__PURE__ */ jsx("textarea", {
|
|
316
|
+
id: "activity-description",
|
|
317
|
+
"aria-label": "Description",
|
|
318
|
+
style: {
|
|
319
|
+
...inputStyle,
|
|
320
|
+
minHeight: 48,
|
|
321
|
+
resize: "vertical"
|
|
322
|
+
},
|
|
323
|
+
value: form.description,
|
|
324
|
+
onChange: (e) => setForm((p) => ({
|
|
325
|
+
...p,
|
|
326
|
+
description: e.target.value
|
|
327
|
+
})),
|
|
328
|
+
placeholder: "Notes..."
|
|
329
|
+
})] }),
|
|
330
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
331
|
+
/* @__PURE__ */ jsx("div", {
|
|
332
|
+
style: labelStyle,
|
|
333
|
+
children: "Metadata"
|
|
334
|
+
}),
|
|
335
|
+
/* @__PURE__ */ jsxs("div", {
|
|
336
|
+
style: {
|
|
337
|
+
display: "flex",
|
|
338
|
+
gap: 4,
|
|
339
|
+
marginBottom: 4
|
|
340
|
+
},
|
|
341
|
+
children: [
|
|
342
|
+
/* @__PURE__ */ jsx("input", {
|
|
343
|
+
"aria-label": "Metadata key",
|
|
344
|
+
style: {
|
|
345
|
+
...inputStyle,
|
|
346
|
+
flex: 1
|
|
347
|
+
},
|
|
348
|
+
value: metaKey,
|
|
349
|
+
onChange: (e) => setMetaKey(e.target.value),
|
|
350
|
+
placeholder: "Key"
|
|
351
|
+
}),
|
|
352
|
+
/* @__PURE__ */ jsx("input", {
|
|
353
|
+
"aria-label": "Metadata value",
|
|
354
|
+
style: {
|
|
355
|
+
...inputStyle,
|
|
356
|
+
flex: 1
|
|
357
|
+
},
|
|
358
|
+
value: metaValue,
|
|
359
|
+
onChange: (e) => setMetaValue(e.target.value),
|
|
360
|
+
placeholder: "Value"
|
|
361
|
+
}),
|
|
362
|
+
/* @__PURE__ */ jsx("button", {
|
|
363
|
+
onClick: addMetadata,
|
|
364
|
+
style: {
|
|
365
|
+
background: tokens.colors.interactive.default,
|
|
366
|
+
color: tokens.colors.text.inverse,
|
|
367
|
+
border: "none",
|
|
368
|
+
borderRadius: tokens.borderRadius.md,
|
|
369
|
+
padding: `0 ${tokens.spacing.sm}px`,
|
|
370
|
+
fontSize: tokens.typography.fontSize.xs,
|
|
371
|
+
cursor: "pointer",
|
|
372
|
+
transition: "all 150ms ease"
|
|
373
|
+
},
|
|
374
|
+
children: "+"
|
|
375
|
+
})
|
|
376
|
+
]
|
|
377
|
+
}),
|
|
378
|
+
Object.keys(form.metadata).length > 0 && /* @__PURE__ */ jsx("div", {
|
|
379
|
+
style: {
|
|
380
|
+
display: "flex",
|
|
381
|
+
gap: 4,
|
|
382
|
+
flexWrap: "wrap"
|
|
383
|
+
},
|
|
384
|
+
children: Object.entries(form.metadata).map(([k, v]) => /* @__PURE__ */ jsxs("span", {
|
|
385
|
+
style: {
|
|
386
|
+
fontSize: tokens.typography.fontSize.micro,
|
|
387
|
+
background: tokens.colors.background.surface,
|
|
388
|
+
padding: `2px 6px`,
|
|
389
|
+
borderRadius: tokens.borderRadius.sm,
|
|
390
|
+
display: "flex",
|
|
391
|
+
alignItems: "center",
|
|
392
|
+
gap: tokens.spacing.xs
|
|
393
|
+
},
|
|
394
|
+
children: [
|
|
395
|
+
k,
|
|
396
|
+
": ",
|
|
397
|
+
v,
|
|
398
|
+
/* @__PURE__ */ jsx("button", {
|
|
399
|
+
type: "button",
|
|
400
|
+
"aria-label": `Remove metadata ${k}`,
|
|
401
|
+
onClick: () => setForm((p) => {
|
|
402
|
+
const m = { ...p.metadata };
|
|
403
|
+
delete m[k];
|
|
404
|
+
return {
|
|
405
|
+
...p,
|
|
406
|
+
metadata: m
|
|
407
|
+
};
|
|
408
|
+
}),
|
|
409
|
+
style: {
|
|
410
|
+
cursor: "pointer",
|
|
411
|
+
color: tokens.colors.status.critical,
|
|
412
|
+
fontWeight: 500,
|
|
413
|
+
border: "none",
|
|
414
|
+
background: "transparent",
|
|
415
|
+
padding: 0,
|
|
416
|
+
lineHeight: 1
|
|
417
|
+
},
|
|
418
|
+
children: "×"
|
|
419
|
+
})
|
|
420
|
+
]
|
|
421
|
+
}, k))
|
|
422
|
+
})
|
|
423
|
+
] }),
|
|
424
|
+
/* @__PURE__ */ jsxs("label", {
|
|
425
|
+
style: {
|
|
426
|
+
display: "flex",
|
|
427
|
+
alignItems: "center",
|
|
428
|
+
gap: 6,
|
|
429
|
+
fontSize: tokens.typography.fontSize.xs,
|
|
430
|
+
cursor: "pointer"
|
|
431
|
+
},
|
|
432
|
+
children: [/* @__PURE__ */ jsx("input", {
|
|
433
|
+
"aria-label": "Hazardous activity",
|
|
434
|
+
type: "checkbox",
|
|
435
|
+
checked: form.hazardous,
|
|
436
|
+
onChange: (e) => setForm((p) => ({
|
|
437
|
+
...p,
|
|
438
|
+
hazardous: e.target.checked
|
|
439
|
+
}))
|
|
440
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
441
|
+
style: { color: form.hazardous ? tokens.colors.status.critical : tokens.colors.text.secondary },
|
|
442
|
+
children: "⚠ Hazardous Activity"
|
|
443
|
+
})]
|
|
444
|
+
}),
|
|
445
|
+
/* @__PURE__ */ jsxs("div", {
|
|
446
|
+
style: {
|
|
447
|
+
display: "flex",
|
|
448
|
+
gap: 6,
|
|
449
|
+
justifyContent: "flex-end",
|
|
450
|
+
marginTop: 4
|
|
451
|
+
},
|
|
452
|
+
children: [/* @__PURE__ */ jsx("button", {
|
|
453
|
+
onClick: onCancel,
|
|
454
|
+
style: {
|
|
455
|
+
background: "transparent",
|
|
456
|
+
color: tokens.colors.text.muted,
|
|
457
|
+
border: `1px solid ${tokens.colors.border.muted}`,
|
|
458
|
+
borderRadius: tokens.borderRadius.md,
|
|
459
|
+
padding: `${tokens.spacing.xs}px 14px`,
|
|
460
|
+
fontSize: tokens.typography.fontSize.xs,
|
|
461
|
+
cursor: "pointer",
|
|
462
|
+
transition: "all 150ms ease"
|
|
463
|
+
},
|
|
464
|
+
children: "Cancel"
|
|
465
|
+
}), /* @__PURE__ */ jsx("button", {
|
|
466
|
+
onClick: () => onSubmit(form),
|
|
467
|
+
disabled: !form.title.trim(),
|
|
468
|
+
style: {
|
|
469
|
+
background: tokens.colors.interactive.default,
|
|
470
|
+
color: tokens.colors.text.inverse,
|
|
471
|
+
border: "none",
|
|
472
|
+
borderRadius: tokens.borderRadius.md,
|
|
473
|
+
padding: `${tokens.spacing.xs}px 14px`,
|
|
474
|
+
fontSize: tokens.typography.fontSize.xs,
|
|
475
|
+
cursor: form.title.trim() ? "pointer" : "not-allowed",
|
|
476
|
+
fontWeight: 500,
|
|
477
|
+
opacity: form.title.trim() ? 1 : .5,
|
|
478
|
+
transition: "all 150ms ease"
|
|
479
|
+
},
|
|
480
|
+
children: "Create Activity"
|
|
481
|
+
})]
|
|
482
|
+
})
|
|
483
|
+
]
|
|
484
|
+
});
|
|
233
485
|
});
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
486
|
+
var ActivityPlanner = memo(function ActivityPlanner({ activities, timelines, selectedDate, height = 500, title = "Activity Planner", readOnly = false, showOverlapWarning = true, onActivityCreate, onActivityUpdate: _onActivityUpdate, onActivityDelete, onViewInCalendar, onViewInTimeline, className = "" }) {
|
|
487
|
+
const { tokens, theme } = useTheme();
|
|
488
|
+
const isTransparentTheme = theme === "transparent" || theme === "transparent-bold" || theme === "transparent-minimal";
|
|
489
|
+
const [showForm, setShowForm] = useState(false);
|
|
490
|
+
const [filter, setFilter] = useState("");
|
|
491
|
+
const [sortBy, setSortBy] = useState("time");
|
|
492
|
+
const listRef = useRef(null);
|
|
493
|
+
const overlaps = useMemo(() => {
|
|
494
|
+
const pairs = [];
|
|
495
|
+
for (let i = 0; i < activities.length; i++) for (let j = i + 1; j < activities.length; j++) if (checkOverlap(activities[i], activities[j])) pairs.push([activities[i].id, activities[j].id]);
|
|
496
|
+
return new Set(pairs.flat());
|
|
497
|
+
}, [activities]);
|
|
498
|
+
const displayActivities = useMemo(() => {
|
|
499
|
+
let list = [...activities];
|
|
500
|
+
if (filter) {
|
|
501
|
+
const lf = filter.toLowerCase();
|
|
502
|
+
list = list.filter((a) => a.title.toLowerCase().includes(lf) || a.description?.toLowerCase().includes(lf) || a.timeline?.toLowerCase().includes(lf) || a.command?.toLowerCase().includes(lf));
|
|
503
|
+
}
|
|
504
|
+
switch (sortBy) {
|
|
505
|
+
case "time":
|
|
506
|
+
list.sort((a, b) => a.start.getTime() - b.start.getTime());
|
|
507
|
+
break;
|
|
508
|
+
case "status":
|
|
509
|
+
list.sort((a, b) => (a.status || "").localeCompare(b.status || ""));
|
|
510
|
+
break;
|
|
511
|
+
case "timeline":
|
|
512
|
+
list.sort((a, b) => (a.timeline || "").localeCompare(b.timeline || ""));
|
|
513
|
+
break;
|
|
514
|
+
}
|
|
515
|
+
return list;
|
|
516
|
+
}, [
|
|
517
|
+
activities,
|
|
518
|
+
filter,
|
|
519
|
+
sortBy
|
|
520
|
+
]);
|
|
521
|
+
const stats = useMemo(() => ({
|
|
522
|
+
total: activities.length,
|
|
523
|
+
scheduled: activities.filter((a) => a.status === "scheduled" || a.status === "created").length,
|
|
524
|
+
running: activities.filter((a) => a.status === "started").length,
|
|
525
|
+
completed: activities.filter((a) => a.status === "completed").length,
|
|
526
|
+
errors: activities.filter((a) => a.status === "error" || a.status === "failed" || a.status === "crashed").length
|
|
527
|
+
}), [activities]);
|
|
528
|
+
const handleCreate = useCallback((data) => {
|
|
529
|
+
onActivityCreate?.({
|
|
530
|
+
title: data.title,
|
|
531
|
+
type: data.type,
|
|
532
|
+
start: new Date(data.start),
|
|
533
|
+
end: new Date(data.end),
|
|
534
|
+
timeline: data.timeline,
|
|
535
|
+
description: data.description,
|
|
536
|
+
command: data.command || void 0,
|
|
537
|
+
script: data.script || void 0,
|
|
538
|
+
metadata: Object.keys(data.metadata).length > 0 ? data.metadata : void 0,
|
|
539
|
+
status: "created"
|
|
540
|
+
});
|
|
541
|
+
setShowForm(false);
|
|
542
|
+
}, [onActivityCreate]);
|
|
543
|
+
const panelPadX = tokens.spacing.md;
|
|
544
|
+
const panelPadY = tokens.spacing.sm;
|
|
545
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
546
|
+
className: `activity-planner ${className}`,
|
|
547
|
+
style: {
|
|
548
|
+
height: typeof height === "number" ? height : void 0,
|
|
549
|
+
background: tokens.colors.background.base,
|
|
550
|
+
...tokens.colors.border.cardStyle ?? { border: `1px solid ${tokens.colors.border.muted}` },
|
|
551
|
+
borderRadius: tokens.borderRadius.lg,
|
|
552
|
+
overflow: "hidden",
|
|
553
|
+
display: "flex",
|
|
554
|
+
flexDirection: "column",
|
|
555
|
+
fontFamily: tokens.typography.fontFamily.primary,
|
|
556
|
+
color: tokens.colors.text.primary,
|
|
557
|
+
backdropFilter: isTransparentTheme ? "blur(10px)" : void 0,
|
|
558
|
+
WebkitBackdropFilter: isTransparentTheme ? "blur(10px)" : void 0
|
|
559
|
+
},
|
|
560
|
+
children: [
|
|
561
|
+
/* @__PURE__ */ jsxs("div", {
|
|
562
|
+
style: {
|
|
563
|
+
padding: `${panelPadY}px ${panelPadX}px`,
|
|
564
|
+
borderBottom: `1px solid ${tokens.colors.border.muted}`,
|
|
565
|
+
background: tokens.colors.background.surface,
|
|
566
|
+
backdropFilter: "blur(8px)",
|
|
567
|
+
display: "flex",
|
|
568
|
+
alignItems: "center",
|
|
569
|
+
justifyContent: "space-between"
|
|
570
|
+
},
|
|
571
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
572
|
+
style: {
|
|
573
|
+
display: "flex",
|
|
574
|
+
alignItems: "center",
|
|
575
|
+
gap: tokens.spacing.sm
|
|
576
|
+
},
|
|
577
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
578
|
+
style: {
|
|
579
|
+
fontWeight: 500,
|
|
580
|
+
fontSize: tokens.typography.fontSize.sm
|
|
581
|
+
},
|
|
582
|
+
children: title
|
|
583
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
584
|
+
style: {
|
|
585
|
+
display: "flex",
|
|
586
|
+
gap: 10,
|
|
587
|
+
fontSize: tokens.typography.fontSize.xxs,
|
|
588
|
+
color: tokens.colors.text.muted
|
|
589
|
+
},
|
|
590
|
+
children: [
|
|
591
|
+
/* @__PURE__ */ jsxs("span", { children: ["Scheduled ", stats.scheduled] }),
|
|
592
|
+
/* @__PURE__ */ jsxs("span", {
|
|
593
|
+
style: { color: tokens.colors.text.secondary },
|
|
594
|
+
children: ["Running ", stats.running]
|
|
595
|
+
}),
|
|
596
|
+
/* @__PURE__ */ jsxs("span", {
|
|
597
|
+
style: { color: tokens.colors.text.secondary },
|
|
598
|
+
children: ["Completed ", stats.completed]
|
|
599
|
+
}),
|
|
600
|
+
stats.errors > 0 && /* @__PURE__ */ jsxs("span", {
|
|
601
|
+
style: { color: tokens.colors.status.critical },
|
|
602
|
+
children: ["Errors ", stats.errors]
|
|
603
|
+
})
|
|
604
|
+
]
|
|
605
|
+
})]
|
|
606
|
+
}), !readOnly && /* @__PURE__ */ jsx("button", {
|
|
607
|
+
onClick: () => setShowForm(!showForm),
|
|
608
|
+
style: {
|
|
609
|
+
background: showForm ? tokens.colors.status.critical + "22" : tokens.colors.interactive.default,
|
|
610
|
+
color: showForm ? tokens.colors.status.critical : tokens.colors.text.inverse,
|
|
611
|
+
border: "none",
|
|
612
|
+
borderRadius: tokens.borderRadius.md,
|
|
613
|
+
padding: "3px 10px",
|
|
614
|
+
fontSize: tokens.typography.fontSize.xs,
|
|
615
|
+
fontWeight: 500,
|
|
616
|
+
cursor: "pointer",
|
|
617
|
+
transition: "all 150ms ease"
|
|
618
|
+
},
|
|
619
|
+
children: showForm ? "✕ Cancel" : "+ New Activity"
|
|
620
|
+
})]
|
|
621
|
+
}),
|
|
622
|
+
showForm && !readOnly && /* @__PURE__ */ jsx("div", {
|
|
623
|
+
style: {
|
|
624
|
+
borderBottom: `1px solid ${tokens.colors.border.muted}`,
|
|
625
|
+
background: tokens.colors.background.surface + "88"
|
|
626
|
+
},
|
|
627
|
+
children: /* @__PURE__ */ jsx(ActivityForm, {
|
|
628
|
+
timelines,
|
|
629
|
+
selectedDate,
|
|
630
|
+
tokens,
|
|
631
|
+
onSubmit: handleCreate,
|
|
632
|
+
onCancel: () => setShowForm(false)
|
|
633
|
+
})
|
|
634
|
+
}),
|
|
635
|
+
/* @__PURE__ */ jsxs("div", {
|
|
636
|
+
style: {
|
|
637
|
+
padding: `${tokens.spacing.xs}px ${panelPadX}px`,
|
|
638
|
+
display: "flex",
|
|
639
|
+
gap: 6,
|
|
640
|
+
alignItems: "center",
|
|
641
|
+
borderBottom: `1px solid ${tokens.colors.border.muted}`
|
|
642
|
+
},
|
|
643
|
+
children: [/* @__PURE__ */ jsx("input", {
|
|
644
|
+
value: filter,
|
|
645
|
+
onChange: (e) => setFilter(e.target.value),
|
|
646
|
+
"aria-label": "Search activities",
|
|
647
|
+
placeholder: "Search activities...",
|
|
648
|
+
style: {
|
|
649
|
+
flex: 1,
|
|
650
|
+
background: tokens.colors.background.surface,
|
|
651
|
+
color: tokens.colors.text.primary,
|
|
652
|
+
border: `1px solid ${tokens.colors.border.muted}`,
|
|
653
|
+
borderRadius: tokens.borderRadius.md,
|
|
654
|
+
padding: "3px 8px",
|
|
655
|
+
fontSize: tokens.typography.fontSize.xxs,
|
|
656
|
+
fontFamily: tokens.typography.fontFamily.primary,
|
|
657
|
+
transition: "all 150ms ease"
|
|
658
|
+
}
|
|
659
|
+
}), /* @__PURE__ */ jsxs("select", {
|
|
660
|
+
value: sortBy,
|
|
661
|
+
onChange: (e) => setSortBy(e.target.value),
|
|
662
|
+
"aria-label": "Sort activities",
|
|
663
|
+
style: {
|
|
664
|
+
background: tokens.colors.background.surface,
|
|
665
|
+
color: tokens.colors.text.secondary,
|
|
666
|
+
border: `1px solid ${tokens.colors.border.muted}`,
|
|
667
|
+
borderRadius: tokens.borderRadius.md,
|
|
668
|
+
padding: "3px 6px",
|
|
669
|
+
fontSize: tokens.typography.fontSize.xxs,
|
|
670
|
+
transition: "all 150ms ease"
|
|
671
|
+
},
|
|
672
|
+
children: [
|
|
673
|
+
/* @__PURE__ */ jsx("option", {
|
|
674
|
+
value: "time",
|
|
675
|
+
children: "Sort: Time"
|
|
676
|
+
}),
|
|
677
|
+
/* @__PURE__ */ jsx("option", {
|
|
678
|
+
value: "status",
|
|
679
|
+
children: "Sort: Status"
|
|
680
|
+
}),
|
|
681
|
+
/* @__PURE__ */ jsx("option", {
|
|
682
|
+
value: "timeline",
|
|
683
|
+
children: "Sort: Timeline"
|
|
684
|
+
})
|
|
685
|
+
]
|
|
686
|
+
})]
|
|
687
|
+
}),
|
|
688
|
+
/* @__PURE__ */ jsx("div", {
|
|
689
|
+
ref: listRef,
|
|
690
|
+
style: {
|
|
691
|
+
flex: 1,
|
|
692
|
+
overflow: "auto",
|
|
693
|
+
padding: 8
|
|
694
|
+
},
|
|
695
|
+
children: displayActivities.length === 0 ? /* @__PURE__ */ jsx("div", {
|
|
696
|
+
style: {
|
|
697
|
+
textAlign: "center",
|
|
698
|
+
color: tokens.colors.text.muted,
|
|
699
|
+
padding: 40,
|
|
700
|
+
fontSize: tokens.typography.fontSize.xs
|
|
701
|
+
},
|
|
702
|
+
children: filter ? "No matching activities" : "No activities scheduled"
|
|
703
|
+
}) : /* @__PURE__ */ jsx("div", {
|
|
704
|
+
style: {
|
|
705
|
+
display: "flex",
|
|
706
|
+
flexDirection: "column",
|
|
707
|
+
gap: 4
|
|
708
|
+
},
|
|
709
|
+
children: displayActivities.map((a) => {
|
|
710
|
+
const color = a.color || getStatusColor(a.status, tokens);
|
|
711
|
+
const hasOverlap = overlaps.has(a.id);
|
|
712
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
713
|
+
style: {
|
|
714
|
+
display: "grid",
|
|
715
|
+
gridTemplateColumns: "24px 1fr auto",
|
|
716
|
+
alignItems: "center",
|
|
717
|
+
gap: tokens.spacing.sm,
|
|
718
|
+
padding: "6px 10px",
|
|
719
|
+
background: hasOverlap ? `${tokens.colors.status.caution}10` : `${color}08`,
|
|
720
|
+
borderLeft: `3px solid ${color}`,
|
|
721
|
+
borderRadius: tokens.borderRadius.md,
|
|
722
|
+
fontSize: tokens.typography.fontSize.xs,
|
|
723
|
+
cursor: "pointer",
|
|
724
|
+
border: hasOverlap && showOverlapWarning ? `1px solid ${tokens.colors.status.caution}44` : void 0,
|
|
725
|
+
transition: "all 150ms ease"
|
|
726
|
+
},
|
|
727
|
+
children: [
|
|
728
|
+
/* @__PURE__ */ jsx("div", {
|
|
729
|
+
style: { textAlign: "center" },
|
|
730
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
731
|
+
style: {
|
|
732
|
+
color,
|
|
733
|
+
fontSize: tokens.typography.fontSize.sm,
|
|
734
|
+
fontWeight: 500
|
|
735
|
+
},
|
|
736
|
+
children: getStatusIcon(a.status)
|
|
737
|
+
})
|
|
738
|
+
}),
|
|
739
|
+
/* @__PURE__ */ jsxs("div", {
|
|
740
|
+
style: { overflow: "hidden" },
|
|
741
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
742
|
+
style: {
|
|
743
|
+
display: "flex",
|
|
744
|
+
alignItems: "center",
|
|
745
|
+
gap: 6,
|
|
746
|
+
marginBottom: 2
|
|
747
|
+
},
|
|
748
|
+
children: [
|
|
749
|
+
/* @__PURE__ */ jsx("span", {
|
|
750
|
+
style: {
|
|
751
|
+
fontWeight: 500,
|
|
752
|
+
overflow: "hidden",
|
|
753
|
+
textOverflow: "ellipsis",
|
|
754
|
+
whiteSpace: "nowrap"
|
|
755
|
+
},
|
|
756
|
+
children: a.title
|
|
757
|
+
}),
|
|
758
|
+
a.timeline && /* @__PURE__ */ jsx("span", {
|
|
759
|
+
style: {
|
|
760
|
+
fontSize: tokens.typography.fontSize.micro,
|
|
761
|
+
background: tokens.colors.background.surface,
|
|
762
|
+
padding: `0 ${tokens.spacing.xs}px`,
|
|
763
|
+
borderRadius: tokens.borderRadius.sm,
|
|
764
|
+
color: tokens.colors.text.muted
|
|
765
|
+
},
|
|
766
|
+
children: a.timeline
|
|
767
|
+
}),
|
|
768
|
+
hasOverlap && showOverlapWarning && /* @__PURE__ */ jsx("span", {
|
|
769
|
+
style: {
|
|
770
|
+
fontSize: tokens.typography.fontSize.micro,
|
|
771
|
+
color: tokens.colors.status.caution,
|
|
772
|
+
fontWeight: 500
|
|
773
|
+
},
|
|
774
|
+
children: "⚠ OVERLAP"
|
|
775
|
+
})
|
|
776
|
+
]
|
|
777
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
778
|
+
style: {
|
|
779
|
+
fontSize: tokens.typography.fontSize.micro,
|
|
780
|
+
fontFamily: tokens.typography.fontFamily.mono,
|
|
781
|
+
color: tokens.colors.text.muted
|
|
782
|
+
},
|
|
783
|
+
children: [
|
|
784
|
+
formatDate(a.start),
|
|
785
|
+
" ",
|
|
786
|
+
formatTime(a.start),
|
|
787
|
+
a.end ? ` → ${formatTime(a.end)}` : ""
|
|
788
|
+
]
|
|
789
|
+
})]
|
|
790
|
+
}),
|
|
791
|
+
/* @__PURE__ */ jsxs("div", {
|
|
792
|
+
style: {
|
|
793
|
+
display: "flex",
|
|
794
|
+
gap: 4
|
|
795
|
+
},
|
|
796
|
+
children: [
|
|
797
|
+
onViewInCalendar && /* @__PURE__ */ jsx("button", {
|
|
798
|
+
"aria-label": `View ${a.title} in calendar`,
|
|
799
|
+
onClick: () => onViewInCalendar(a),
|
|
800
|
+
style: actionBtnStyle(tokens),
|
|
801
|
+
title: "View in Calendar",
|
|
802
|
+
children: "Calendar"
|
|
803
|
+
}),
|
|
804
|
+
onViewInTimeline && /* @__PURE__ */ jsx("button", {
|
|
805
|
+
"aria-label": `View ${a.title} in timeline`,
|
|
806
|
+
onClick: () => onViewInTimeline(a),
|
|
807
|
+
style: actionBtnStyle(tokens),
|
|
808
|
+
title: "View in Timeline",
|
|
809
|
+
children: "Timeline"
|
|
810
|
+
}),
|
|
811
|
+
!readOnly && onActivityDelete && /* @__PURE__ */ jsx("button", {
|
|
812
|
+
"aria-label": `Delete ${a.title}`,
|
|
813
|
+
onClick: () => onActivityDelete(a.id),
|
|
814
|
+
style: {
|
|
815
|
+
...actionBtnStyle(tokens),
|
|
816
|
+
color: tokens.colors.status.critical
|
|
817
|
+
},
|
|
818
|
+
title: "Delete",
|
|
819
|
+
children: "Delete"
|
|
820
|
+
})
|
|
821
|
+
]
|
|
822
|
+
})
|
|
823
|
+
]
|
|
824
|
+
}, a.id);
|
|
825
|
+
})
|
|
826
|
+
})
|
|
827
|
+
}),
|
|
828
|
+
/* @__PURE__ */ jsxs("div", {
|
|
829
|
+
style: {
|
|
830
|
+
padding: `${tokens.spacing.xs}px ${panelPadX}px`,
|
|
831
|
+
borderTop: `1px solid ${tokens.colors.border.muted}`,
|
|
832
|
+
background: tokens.colors.background.surface,
|
|
833
|
+
fontSize: tokens.typography.fontSize.micro,
|
|
834
|
+
color: tokens.colors.text.muted,
|
|
835
|
+
display: "flex",
|
|
836
|
+
justifyContent: "space-between"
|
|
837
|
+
},
|
|
838
|
+
children: [/* @__PURE__ */ jsxs("span", { children: [
|
|
839
|
+
displayActivities.length,
|
|
840
|
+
" / ",
|
|
841
|
+
activities.length,
|
|
842
|
+
" activities"
|
|
843
|
+
] }), overlaps.size > 0 && showOverlapWarning && /* @__PURE__ */ jsxs("span", {
|
|
844
|
+
style: { color: tokens.colors.status.caution },
|
|
845
|
+
children: [
|
|
846
|
+
"⚠ ",
|
|
847
|
+
overlaps.size,
|
|
848
|
+
" overlapping activities"
|
|
849
|
+
]
|
|
850
|
+
})]
|
|
851
|
+
})
|
|
852
|
+
]
|
|
853
|
+
});
|
|
516
854
|
});
|
|
517
855
|
function actionBtnStyle(tokens) {
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
856
|
+
return {
|
|
857
|
+
background: "transparent",
|
|
858
|
+
border: `1px solid ${tokens.colors.border.muted}`,
|
|
859
|
+
borderRadius: tokens.borderRadius.sm,
|
|
860
|
+
padding: `2px ${tokens.spacing.xs}px`,
|
|
861
|
+
fontSize: tokens.typography.fontSize.xxs,
|
|
862
|
+
cursor: "pointer",
|
|
863
|
+
lineHeight: 1,
|
|
864
|
+
transition: "all 150ms ease"
|
|
865
|
+
};
|
|
528
866
|
}
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
//# sourceMappingURL=ActivityPlanner.js.map
|
|
867
|
+
//#endregion
|
|
868
|
+
export { ActivityPlanner, ActivityPlanner as default };
|
|
869
|
+
|
|
870
|
+
//# sourceMappingURL=ActivityPlanner.js.map
|