@zendir/ui 0.5.0 → 0.6.1
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 +419 -386
- 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 +313 -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 +26 -3
- 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 +533 -155
- 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,320 +1,386 @@
|
|
|
1
|
-
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { memo, useState, useEffect, useCallback } from "react";
|
|
3
1
|
import { useTheme } from "../../theme/ThemeProvider.js";
|
|
4
|
-
import {
|
|
2
|
+
import { resolveResponsiveValue, useBreakpoint } from "../layout/useBreakpoint.js";
|
|
5
3
|
import { Pagination } from "../navigation/Pagination.js";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
4
|
+
import { memo, useCallback, useEffect, useState } from "react";
|
|
5
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
//#region src/react/core/widgets/ImageGallery.tsx
|
|
7
|
+
/**
|
|
8
|
+
* @zendir/ui - ImageGallery Component
|
|
9
|
+
*
|
|
10
|
+
* Grid of image thumbnails with lightbox, download, delete, and pagination.
|
|
11
|
+
* Designed for spacecraft image capture galleries in operator dashboards.
|
|
12
|
+
*
|
|
13
|
+
* Astro UX Compliance:
|
|
14
|
+
* - Consistent card styling with GlassCard
|
|
15
|
+
* - Status-based border colors
|
|
16
|
+
* - Keyboard navigation (Escape to close lightbox)
|
|
17
|
+
* - Focus management
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```tsx
|
|
21
|
+
* <ImageGallery
|
|
22
|
+
* images={[
|
|
23
|
+
* { id: '1', name: 'capture_001.png', src: dataUrl, timestamp: Date.now() },
|
|
24
|
+
* { id: '2', name: 'capture_002.png', src: dataUrl, timestamp: Date.now() },
|
|
25
|
+
* ]}
|
|
26
|
+
* columns={[2, 3, 4]}
|
|
27
|
+
* onDownload={(img) => saveAs(img.src, img.name)}
|
|
28
|
+
* onDelete={(img) => removeImage(img.id)}
|
|
29
|
+
* pageSize={12}
|
|
30
|
+
* />
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
var ImageGallery = memo(function ImageGallery({ images, columns = [
|
|
34
|
+
2,
|
|
35
|
+
3,
|
|
36
|
+
4
|
|
37
|
+
], pageSize = 12, onDownload, onDelete, onClick, lightbox = true, thumbnailHeight = 140, emptyMessage = "No images captured", newCount: _newCount, style }) {
|
|
38
|
+
const { tokens } = useTheme();
|
|
39
|
+
const { breakpoint } = useBreakpoint();
|
|
40
|
+
const [currentPage, setCurrentPage] = useState(0);
|
|
41
|
+
const [selectedImage, setSelectedImage] = useState(null);
|
|
42
|
+
const [hoveredId, setHoveredId] = useState(null);
|
|
43
|
+
const cols = Array.isArray(columns) ? resolveResponsiveValue(columns, breakpoint) : columns;
|
|
44
|
+
const totalPages = pageSize > 0 ? Math.ceil(images.length / pageSize) : 1;
|
|
45
|
+
const pageImages = pageSize > 0 ? images.slice(currentPage * pageSize, (currentPage + 1) * pageSize) : images;
|
|
46
|
+
useEffect(() => {
|
|
47
|
+
if (currentPage >= totalPages && totalPages > 0) setCurrentPage(totalPages - 1);
|
|
48
|
+
}, [
|
|
49
|
+
images.length,
|
|
50
|
+
totalPages,
|
|
51
|
+
currentPage
|
|
52
|
+
]);
|
|
53
|
+
useEffect(() => {
|
|
54
|
+
if (!selectedImage) return;
|
|
55
|
+
const handler = (e) => {
|
|
56
|
+
if (e.key === "Escape") setSelectedImage(null);
|
|
57
|
+
};
|
|
58
|
+
document.addEventListener("keydown", handler);
|
|
59
|
+
return () => document.removeEventListener("keydown", handler);
|
|
60
|
+
}, [selectedImage]);
|
|
61
|
+
const handleImageClick = useCallback((img) => {
|
|
62
|
+
onClick?.(img);
|
|
63
|
+
if (lightbox) setSelectedImage(img);
|
|
64
|
+
}, [onClick, lightbox]);
|
|
65
|
+
const formatTime = (ts) => {
|
|
66
|
+
if (!ts) return "";
|
|
67
|
+
return new Date(ts).toLocaleTimeString([], {
|
|
68
|
+
hour: "2-digit",
|
|
69
|
+
minute: "2-digit",
|
|
70
|
+
second: "2-digit"
|
|
71
|
+
});
|
|
72
|
+
};
|
|
73
|
+
const ActionBtn = ({ icon, label, onClick: handler, color }) => /* @__PURE__ */ jsx("button", {
|
|
74
|
+
"aria-label": label,
|
|
75
|
+
onClick: (e) => {
|
|
76
|
+
e.stopPropagation();
|
|
77
|
+
handler();
|
|
78
|
+
},
|
|
79
|
+
style: {
|
|
80
|
+
display: "flex",
|
|
81
|
+
alignItems: "center",
|
|
82
|
+
justifyContent: "center",
|
|
83
|
+
width: 28,
|
|
84
|
+
height: 28,
|
|
85
|
+
border: `1px solid ${tokens.colors.border.muted}`,
|
|
86
|
+
borderRadius: tokens.borderRadius.sm,
|
|
87
|
+
backgroundColor: `${tokens.colors.background.elevated}e0`,
|
|
88
|
+
color: color || tokens.colors.text.secondary,
|
|
89
|
+
cursor: "pointer",
|
|
90
|
+
transition: tokens.animation.fast,
|
|
91
|
+
backdropFilter: "blur(4px)"
|
|
92
|
+
},
|
|
93
|
+
children: icon
|
|
94
|
+
});
|
|
95
|
+
const downloadIcon = /* @__PURE__ */ jsxs("svg", {
|
|
96
|
+
width: "14",
|
|
97
|
+
height: "14",
|
|
98
|
+
viewBox: "0 0 24 24",
|
|
99
|
+
fill: "none",
|
|
100
|
+
stroke: "currentColor",
|
|
101
|
+
strokeWidth: "2",
|
|
102
|
+
strokeLinecap: "round",
|
|
103
|
+
children: [
|
|
104
|
+
/* @__PURE__ */ jsx("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }),
|
|
105
|
+
/* @__PURE__ */ jsx("polyline", { points: "7 10 12 15 17 10" }),
|
|
106
|
+
/* @__PURE__ */ jsx("line", {
|
|
107
|
+
x1: "12",
|
|
108
|
+
y1: "15",
|
|
109
|
+
x2: "12",
|
|
110
|
+
y2: "3"
|
|
111
|
+
})
|
|
112
|
+
]
|
|
113
|
+
});
|
|
114
|
+
const deleteIcon = /* @__PURE__ */ jsxs("svg", {
|
|
115
|
+
width: "14",
|
|
116
|
+
height: "14",
|
|
117
|
+
viewBox: "0 0 24 24",
|
|
118
|
+
fill: "none",
|
|
119
|
+
stroke: "currentColor",
|
|
120
|
+
strokeWidth: "2",
|
|
121
|
+
strokeLinecap: "round",
|
|
122
|
+
children: [/* @__PURE__ */ jsx("polyline", { points: "3 6 5 6 21 6" }), /* @__PURE__ */ jsx("path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" })]
|
|
123
|
+
});
|
|
124
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
125
|
+
style: {
|
|
126
|
+
fontFamily: tokens.typography.fontFamily.primary,
|
|
127
|
+
...style
|
|
128
|
+
},
|
|
129
|
+
children: [
|
|
130
|
+
images.length === 0 && /* @__PURE__ */ jsx("div", {
|
|
131
|
+
style: {
|
|
132
|
+
display: "flex",
|
|
133
|
+
alignItems: "center",
|
|
134
|
+
justifyContent: "center",
|
|
135
|
+
height: 200,
|
|
136
|
+
color: tokens.colors.text.tertiary,
|
|
137
|
+
fontSize: tokens.typography.fontSize.sm,
|
|
138
|
+
border: `1px dashed ${tokens.colors.border.muted}`,
|
|
139
|
+
borderRadius: tokens.borderRadius.md
|
|
140
|
+
},
|
|
141
|
+
children: emptyMessage
|
|
142
|
+
}),
|
|
143
|
+
pageImages.length > 0 && /* @__PURE__ */ jsx("div", {
|
|
144
|
+
style: {
|
|
145
|
+
display: "grid",
|
|
146
|
+
gridTemplateColumns: `repeat(${cols}, 1fr)`,
|
|
147
|
+
gap: tokens.spacing.sm
|
|
148
|
+
},
|
|
149
|
+
children: pageImages.map((img) => {
|
|
150
|
+
const isHovered = hoveredId === img.id;
|
|
151
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
152
|
+
role: "button",
|
|
153
|
+
tabIndex: 0,
|
|
154
|
+
"aria-label": `View image ${img.name || img.id}`,
|
|
155
|
+
onClick: () => handleImageClick(img),
|
|
156
|
+
onKeyDown: (e) => {
|
|
157
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
158
|
+
e.preventDefault();
|
|
159
|
+
handleImageClick(img);
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
onMouseEnter: () => setHoveredId(img.id),
|
|
163
|
+
onMouseLeave: () => setHoveredId(null),
|
|
164
|
+
style: {
|
|
165
|
+
position: "relative",
|
|
166
|
+
borderRadius: tokens.borderRadius.md,
|
|
167
|
+
border: `1px solid ${tokens.colors.border.muted}`,
|
|
168
|
+
overflow: "hidden",
|
|
169
|
+
cursor: "pointer",
|
|
170
|
+
transition: tokens.animation.fast,
|
|
171
|
+
transform: isHovered ? "translateY(-2px)" : "none",
|
|
172
|
+
boxShadow: isHovered ? tokens.shadows.md : "none",
|
|
173
|
+
backgroundColor: tokens.colors.background.surface
|
|
174
|
+
},
|
|
175
|
+
children: [
|
|
176
|
+
img.badge ? /* @__PURE__ */ jsx("span", {
|
|
177
|
+
style: {
|
|
178
|
+
position: "absolute",
|
|
179
|
+
top: tokens.spacing.xs,
|
|
180
|
+
left: tokens.spacing.xs,
|
|
181
|
+
zIndex: 1,
|
|
182
|
+
padding: `2px ${tokens.spacing.xs}`,
|
|
183
|
+
borderRadius: tokens.borderRadius.sm,
|
|
184
|
+
backgroundColor: tokens.colors.accent.primary,
|
|
185
|
+
color: "#fff",
|
|
186
|
+
fontSize: tokens.typography.fontSize.micro,
|
|
187
|
+
fontWeight: tokens.typography.fontWeight.bold,
|
|
188
|
+
letterSpacing: "0.06em",
|
|
189
|
+
textTransform: "uppercase",
|
|
190
|
+
lineHeight: 1.4,
|
|
191
|
+
pointerEvents: "none",
|
|
192
|
+
boxShadow: tokens.shadows.sm
|
|
193
|
+
},
|
|
194
|
+
children: img.badge
|
|
195
|
+
}) : null,
|
|
196
|
+
/* @__PURE__ */ jsx("div", {
|
|
197
|
+
style: {
|
|
198
|
+
height: thumbnailHeight,
|
|
199
|
+
display: "flex",
|
|
200
|
+
alignItems: "center",
|
|
201
|
+
justifyContent: "center",
|
|
202
|
+
overflow: "hidden",
|
|
203
|
+
backgroundColor: tokens.colors.background.base
|
|
204
|
+
},
|
|
205
|
+
children: /* @__PURE__ */ jsx("img", {
|
|
206
|
+
src: img.src,
|
|
207
|
+
alt: img.name,
|
|
208
|
+
loading: "lazy",
|
|
209
|
+
onError: (e) => {
|
|
210
|
+
const target = e.target;
|
|
211
|
+
target.style.display = "none";
|
|
212
|
+
target.parentElement.innerHTML = `<span style="color:${tokens.colors.text.tertiary};font-size:${tokens.typography.fontSize.xxs}">Image unavailable</span>`;
|
|
213
|
+
},
|
|
214
|
+
style: {
|
|
215
|
+
maxWidth: "100%",
|
|
216
|
+
maxHeight: "100%",
|
|
217
|
+
objectFit: "contain"
|
|
218
|
+
}
|
|
219
|
+
})
|
|
220
|
+
}),
|
|
221
|
+
/* @__PURE__ */ jsxs("div", {
|
|
222
|
+
style: {
|
|
223
|
+
padding: `${tokens.spacing.xs} ${tokens.spacing.sm}`,
|
|
224
|
+
borderTop: `1px solid ${tokens.colors.border.muted}`
|
|
225
|
+
},
|
|
226
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
227
|
+
style: {
|
|
228
|
+
fontSize: tokens.typography.fontSize.xxs,
|
|
229
|
+
fontWeight: tokens.typography.fontWeight.medium,
|
|
230
|
+
color: tokens.colors.text.primary,
|
|
231
|
+
whiteSpace: "nowrap",
|
|
232
|
+
overflow: "hidden",
|
|
233
|
+
textOverflow: "ellipsis"
|
|
234
|
+
},
|
|
235
|
+
children: img.name
|
|
236
|
+
}), img.timestamp && /* @__PURE__ */ jsx("div", {
|
|
237
|
+
style: {
|
|
238
|
+
fontSize: tokens.typography.fontSize.micro,
|
|
239
|
+
color: tokens.colors.text.tertiary,
|
|
240
|
+
fontFamily: tokens.typography.fontFamily.mono
|
|
241
|
+
},
|
|
242
|
+
children: formatTime(img.timestamp)
|
|
243
|
+
})]
|
|
244
|
+
}),
|
|
245
|
+
isHovered && /* @__PURE__ */ jsxs("div", {
|
|
246
|
+
style: {
|
|
247
|
+
position: "absolute",
|
|
248
|
+
top: tokens.spacing.xs,
|
|
249
|
+
right: tokens.spacing.xs,
|
|
250
|
+
display: "flex",
|
|
251
|
+
gap: "4px"
|
|
252
|
+
},
|
|
253
|
+
children: [onDownload && /* @__PURE__ */ jsx(ActionBtn, {
|
|
254
|
+
icon: downloadIcon,
|
|
255
|
+
label: "Download",
|
|
256
|
+
onClick: () => onDownload(img)
|
|
257
|
+
}), onDelete && /* @__PURE__ */ jsx(ActionBtn, {
|
|
258
|
+
icon: deleteIcon,
|
|
259
|
+
label: "Delete",
|
|
260
|
+
onClick: () => onDelete(img),
|
|
261
|
+
color: tokens.colors.status.critical
|
|
262
|
+
})]
|
|
263
|
+
})
|
|
264
|
+
]
|
|
265
|
+
}, img.id);
|
|
266
|
+
})
|
|
267
|
+
}),
|
|
268
|
+
totalPages > 1 && /* @__PURE__ */ jsx("div", {
|
|
269
|
+
style: {
|
|
270
|
+
display: "flex",
|
|
271
|
+
justifyContent: "center",
|
|
272
|
+
alignItems: "center",
|
|
273
|
+
marginTop: tokens.spacing.md
|
|
274
|
+
},
|
|
275
|
+
children: /* @__PURE__ */ jsx(Pagination, {
|
|
276
|
+
currentPage: currentPage + 1,
|
|
277
|
+
totalPages,
|
|
278
|
+
onChange: (page) => setCurrentPage(Math.max(0, page - 1)),
|
|
279
|
+
showFirstLast: false,
|
|
280
|
+
displayMode: "text",
|
|
281
|
+
size: "small"
|
|
282
|
+
})
|
|
283
|
+
}),
|
|
284
|
+
selectedImage && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
285
|
+
/* @__PURE__ */ jsx("div", {
|
|
286
|
+
"aria-hidden": "true",
|
|
287
|
+
onClick: () => setSelectedImage(null),
|
|
288
|
+
style: {
|
|
289
|
+
position: "fixed",
|
|
290
|
+
inset: 0,
|
|
291
|
+
zIndex: 9998,
|
|
292
|
+
backgroundColor: `${tokens.colors.background.base}e0`,
|
|
293
|
+
backdropFilter: "blur(8px)",
|
|
294
|
+
animation: `zendir-lb-fade 200ms ${tokens.animation.easing.default}`
|
|
295
|
+
}
|
|
296
|
+
}),
|
|
297
|
+
/* @__PURE__ */ jsxs("div", {
|
|
298
|
+
role: "dialog",
|
|
299
|
+
"aria-modal": "true",
|
|
300
|
+
"aria-label": `Image: ${selectedImage.name}`,
|
|
301
|
+
onClick: () => setSelectedImage(null),
|
|
302
|
+
style: {
|
|
303
|
+
position: "fixed",
|
|
304
|
+
inset: 0,
|
|
305
|
+
zIndex: 9999,
|
|
306
|
+
display: "flex",
|
|
307
|
+
flexDirection: "column",
|
|
308
|
+
alignItems: "center",
|
|
309
|
+
justifyContent: "center",
|
|
310
|
+
padding: tokens.spacing.xl
|
|
311
|
+
},
|
|
312
|
+
children: [/* @__PURE__ */ jsx("img", {
|
|
313
|
+
src: selectedImage.src,
|
|
314
|
+
alt: selectedImage.name,
|
|
315
|
+
onClick: (e) => e.stopPropagation(),
|
|
316
|
+
style: {
|
|
317
|
+
maxWidth: "90vw",
|
|
318
|
+
maxHeight: "80vh",
|
|
319
|
+
objectFit: "contain",
|
|
320
|
+
borderRadius: tokens.borderRadius.md,
|
|
321
|
+
boxShadow: tokens.shadows.xl,
|
|
322
|
+
animation: `zendir-lb-scale 250ms ${tokens.animation.easing.default}`
|
|
323
|
+
}
|
|
324
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
325
|
+
style: {
|
|
326
|
+
display: "flex",
|
|
327
|
+
alignItems: "center",
|
|
328
|
+
gap: tokens.spacing.md,
|
|
329
|
+
marginTop: tokens.spacing.md
|
|
330
|
+
},
|
|
331
|
+
onClick: (e) => e.stopPropagation(),
|
|
332
|
+
children: [
|
|
333
|
+
/* @__PURE__ */ jsx("span", {
|
|
334
|
+
style: {
|
|
335
|
+
color: tokens.colors.text.primary,
|
|
336
|
+
fontSize: tokens.typography.fontSize.sm,
|
|
337
|
+
fontWeight: tokens.typography.fontWeight.medium
|
|
338
|
+
},
|
|
339
|
+
children: selectedImage.name
|
|
340
|
+
}),
|
|
341
|
+
onDownload && /* @__PURE__ */ jsx("button", {
|
|
342
|
+
onClick: () => onDownload(selectedImage),
|
|
343
|
+
style: {
|
|
344
|
+
padding: "6px 16px",
|
|
345
|
+
fontSize: tokens.typography.fontSize.xs,
|
|
346
|
+
color: tokens.colors.text.primary,
|
|
347
|
+
backgroundColor: `${tokens.colors.accent.primary}20`,
|
|
348
|
+
border: `1px solid ${tokens.colors.accent.primary}40`,
|
|
349
|
+
borderRadius: tokens.borderRadius.md,
|
|
350
|
+
cursor: "pointer",
|
|
351
|
+
fontFamily: tokens.typography.fontFamily.primary
|
|
352
|
+
},
|
|
353
|
+
children: "Download"
|
|
354
|
+
}),
|
|
355
|
+
onDelete && /* @__PURE__ */ jsx("button", {
|
|
356
|
+
onClick: () => {
|
|
357
|
+
onDelete(selectedImage);
|
|
358
|
+
setSelectedImage(null);
|
|
359
|
+
},
|
|
360
|
+
style: {
|
|
361
|
+
padding: "6px 16px",
|
|
362
|
+
fontSize: tokens.typography.fontSize.xs,
|
|
363
|
+
color: tokens.colors.status.critical,
|
|
364
|
+
backgroundColor: `${tokens.colors.status.critical}15`,
|
|
365
|
+
border: `1px solid ${tokens.colors.status.critical}30`,
|
|
366
|
+
borderRadius: tokens.borderRadius.md,
|
|
367
|
+
cursor: "pointer",
|
|
368
|
+
fontFamily: tokens.typography.fontFamily.primary
|
|
369
|
+
},
|
|
370
|
+
children: "Delete"
|
|
371
|
+
})
|
|
372
|
+
]
|
|
373
|
+
})]
|
|
374
|
+
}),
|
|
375
|
+
/* @__PURE__ */ jsx("style", { children: `
|
|
311
376
|
@keyframes zendir-lb-fade { from { opacity: 0; } to { opacity: 1; } }
|
|
312
377
|
@keyframes zendir-lb-scale { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }
|
|
313
378
|
` })
|
|
314
|
-
|
|
315
|
-
|
|
379
|
+
] })
|
|
380
|
+
]
|
|
381
|
+
});
|
|
316
382
|
});
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
//# sourceMappingURL=ImageGallery.js.map
|
|
383
|
+
//#endregion
|
|
384
|
+
export { ImageGallery, ImageGallery as default };
|
|
385
|
+
|
|
386
|
+
//# sourceMappingURL=ImageGallery.js.map
|