@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,520 +1,632 @@
|
|
|
1
|
-
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
2
|
-
import React, { memo, useState, useMemo, useCallback } from "react";
|
|
3
1
|
import { useTheme } from "../../theme/ThemeProvider.js";
|
|
4
2
|
import { AstroIcon } from "../display/AstroIcon.js";
|
|
3
|
+
import React, { memo, useCallback, useMemo, useState } from "react";
|
|
4
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
//#region src/react/core/widgets/FileExplorer.tsx
|
|
6
|
+
/**
|
|
7
|
+
* @zendir/ui - FileExplorer Component
|
|
8
|
+
*
|
|
9
|
+
* Hierarchical file browser for mission data management and file operations.
|
|
10
|
+
* Supports tree navigation, file actions (download, delete, upload),
|
|
11
|
+
* search, breadcrumbs, and multiple selection.
|
|
12
|
+
*
|
|
13
|
+
* Features:
|
|
14
|
+
* - Tree view and list view modes
|
|
15
|
+
* - Breadcrumb navigation
|
|
16
|
+
* - File type icons
|
|
17
|
+
* - Search/filter
|
|
18
|
+
* - Multi-select with checkboxes
|
|
19
|
+
* - File actions (open, download, delete, rename)
|
|
20
|
+
* - Upload dropzone
|
|
21
|
+
* - File size and modified date display
|
|
22
|
+
* - Sort by name, size, date
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```tsx
|
|
26
|
+
* <FileExplorer
|
|
27
|
+
* files={fileTree}
|
|
28
|
+
* onFileOpen={(file) => console.log('Open:', file)}
|
|
29
|
+
* onFileDownload={(file) => console.log('Download:', file)}
|
|
30
|
+
* />
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
5
33
|
function formatFileSize(bytes) {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
34
|
+
if (bytes === void 0 || bytes === null) return "—";
|
|
35
|
+
if (bytes === 0) return "0 B";
|
|
36
|
+
const units = [
|
|
37
|
+
"B",
|
|
38
|
+
"KB",
|
|
39
|
+
"MB",
|
|
40
|
+
"GB",
|
|
41
|
+
"TB"
|
|
42
|
+
];
|
|
43
|
+
const i = Math.floor(Math.log(bytes) / Math.log(1024));
|
|
44
|
+
return `${(bytes / Math.pow(1024, i)).toFixed(i > 0 ? 1 : 0)} ${units[i]}`;
|
|
11
45
|
}
|
|
12
46
|
function formatDate(date) {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
47
|
+
if (!date) return "—";
|
|
48
|
+
const d = typeof date === "string" ? new Date(date) : date;
|
|
49
|
+
if (isNaN(d.getTime())) return String(date);
|
|
50
|
+
return d.toLocaleDateString("en-US", {
|
|
51
|
+
month: "short",
|
|
52
|
+
day: "2-digit",
|
|
53
|
+
year: "numeric"
|
|
54
|
+
}) + " " + d.toLocaleTimeString("en-US", {
|
|
55
|
+
hour12: false,
|
|
56
|
+
hour: "2-digit",
|
|
57
|
+
minute: "2-digit"
|
|
58
|
+
});
|
|
17
59
|
}
|
|
18
60
|
function getFileIconName(file) {
|
|
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
|
-
ppt: "insert-drive-file"
|
|
50
|
-
};
|
|
51
|
-
return iconMap[ext] || "insert-drive-file";
|
|
61
|
+
if (file.isDirectory) return "folder";
|
|
62
|
+
return {
|
|
63
|
+
rb: "code",
|
|
64
|
+
py: "code",
|
|
65
|
+
js: "code",
|
|
66
|
+
ts: "code",
|
|
67
|
+
jsx: "code",
|
|
68
|
+
tsx: "code",
|
|
69
|
+
json: "insert-drive-file",
|
|
70
|
+
yaml: "insert-drive-file",
|
|
71
|
+
yml: "insert-drive-file",
|
|
72
|
+
xml: "insert-drive-file",
|
|
73
|
+
csv: "table-chart",
|
|
74
|
+
txt: "short-text",
|
|
75
|
+
md: "description",
|
|
76
|
+
log: "insert-drive-file",
|
|
77
|
+
gz: "archive",
|
|
78
|
+
zip: "archive",
|
|
79
|
+
tar: "archive",
|
|
80
|
+
bin: "storage",
|
|
81
|
+
dat: "storage",
|
|
82
|
+
png: "image",
|
|
83
|
+
jpg: "image",
|
|
84
|
+
gif: "image",
|
|
85
|
+
svg: "image",
|
|
86
|
+
pdf: "picture-as-pdf",
|
|
87
|
+
doc: "insert-drive-file",
|
|
88
|
+
xls: "table-chart",
|
|
89
|
+
ppt: "insert-drive-file"
|
|
90
|
+
}[file.name.split(".").pop()?.toLowerCase() ?? ""] || "insert-drive-file";
|
|
52
91
|
}
|
|
53
92
|
function flattenVisible(files, expanded, depth = 0) {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
93
|
+
const result = [];
|
|
94
|
+
for (const f of files) {
|
|
95
|
+
result.push({
|
|
96
|
+
file: f,
|
|
97
|
+
depth
|
|
98
|
+
});
|
|
99
|
+
if (f.isDirectory && expanded.has(f.path) && f.children) result.push(...flattenVisible(f.children, expanded, depth + 1));
|
|
100
|
+
}
|
|
101
|
+
return result;
|
|
62
102
|
}
|
|
63
103
|
function filterFiles(files, query) {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
}, []);
|
|
104
|
+
const q = query.toLowerCase();
|
|
105
|
+
return files.reduce((acc, f) => {
|
|
106
|
+
if (f.isDirectory && f.children) {
|
|
107
|
+
const filteredChildren = filterFiles(f.children, query);
|
|
108
|
+
if (filteredChildren.length > 0 || f.name.toLowerCase().includes(q)) acc.push({
|
|
109
|
+
...f,
|
|
110
|
+
children: filteredChildren
|
|
111
|
+
});
|
|
112
|
+
} else if (f.name.toLowerCase().includes(q)) acc.push(f);
|
|
113
|
+
return acc;
|
|
114
|
+
}, []);
|
|
76
115
|
}
|
|
77
116
|
function sortFiles(files, sortBy, sortDir) {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
});
|
|
90
|
-
return sorted.map(
|
|
91
|
-
(f) => f.isDirectory && f.children ? { ...f, children: sortFiles(f.children, sortBy, sortDir) } : f
|
|
92
|
-
);
|
|
117
|
+
return [...files].sort((a, b) => {
|
|
118
|
+
if (a.isDirectory !== b.isDirectory) return a.isDirectory ? -1 : 1;
|
|
119
|
+
let cmp = 0;
|
|
120
|
+
if (sortBy === "name") cmp = a.name.localeCompare(b.name);
|
|
121
|
+
else if (sortBy === "size") cmp = (a.size ?? 0) - (b.size ?? 0);
|
|
122
|
+
else if (sortBy === "modified") cmp = (a.modified ? new Date(a.modified).getTime() : 0) - (b.modified ? new Date(b.modified).getTime() : 0);
|
|
123
|
+
return sortDir === "asc" ? cmp : -cmp;
|
|
124
|
+
}).map((f) => f.isDirectory && f.children ? {
|
|
125
|
+
...f,
|
|
126
|
+
children: sortFiles(f.children, sortBy, sortDir)
|
|
127
|
+
} : f);
|
|
93
128
|
}
|
|
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
|
-
|
|
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
|
-
|
|
129
|
+
var FileExplorer = memo(function FileExplorer({ files, height = 500, title, viewMode: initialViewMode = "list", showSearch = true, showBreadcrumbs = true, showDetails = true, multiSelect = false, allowUpload = false, allowDelete = false, onFileOpen, onFileDownload: _onFileDownload, onFileDelete, onFileUpload, onSelectionChange: _onSelectionChange, className = "", bordered = true, style: styleProp }) {
|
|
130
|
+
const { tokens, theme } = useTheme();
|
|
131
|
+
const isTransparentTheme = theme === "transparent" || theme === "transparent-bold" || theme === "transparent-minimal";
|
|
132
|
+
const [expanded, setExpanded] = useState(/* @__PURE__ */ new Set());
|
|
133
|
+
const [selected, setSelected] = useState(/* @__PURE__ */ new Set());
|
|
134
|
+
const [currentPath, setCurrentPath] = useState([]);
|
|
135
|
+
const [searchQuery, setSearchQuery] = useState("");
|
|
136
|
+
const [sortBy, setSortBy] = useState("name");
|
|
137
|
+
const [sortDir, setSortDir] = useState("asc");
|
|
138
|
+
const [isDragging, setIsDragging] = useState(false);
|
|
139
|
+
const [scrollTop, setScrollTop] = useState(0);
|
|
140
|
+
const [viewportHeight, setViewportHeight] = useState(240);
|
|
141
|
+
const listRef = React.useRef(null);
|
|
142
|
+
const processedFiles = useMemo(() => {
|
|
143
|
+
let result = files;
|
|
144
|
+
if (searchQuery.trim()) result = filterFiles(result, searchQuery);
|
|
145
|
+
return sortFiles(result, sortBy, sortDir);
|
|
146
|
+
}, [
|
|
147
|
+
files,
|
|
148
|
+
searchQuery,
|
|
149
|
+
sortBy,
|
|
150
|
+
sortDir
|
|
151
|
+
]);
|
|
152
|
+
const currentFiles = useMemo(() => {
|
|
153
|
+
let current = processedFiles;
|
|
154
|
+
for (const dir of currentPath) {
|
|
155
|
+
const found = current.find((f) => f.isDirectory && f.name === dir);
|
|
156
|
+
if (found && found.children) current = found.children;
|
|
157
|
+
else break;
|
|
158
|
+
}
|
|
159
|
+
return current;
|
|
160
|
+
}, [processedFiles, currentPath]);
|
|
161
|
+
const visibleItems = useMemo(() => {
|
|
162
|
+
if (initialViewMode === "tree") return flattenVisible(processedFiles, expanded);
|
|
163
|
+
return currentFiles.map((f) => ({
|
|
164
|
+
file: f,
|
|
165
|
+
depth: 0
|
|
166
|
+
}));
|
|
167
|
+
}, [
|
|
168
|
+
processedFiles,
|
|
169
|
+
expanded,
|
|
170
|
+
currentFiles,
|
|
171
|
+
initialViewMode
|
|
172
|
+
]);
|
|
173
|
+
const toggleExpand = useCallback((path) => {
|
|
174
|
+
setExpanded((prev) => {
|
|
175
|
+
const next = new Set(prev);
|
|
176
|
+
if (next.has(path)) next.delete(path);
|
|
177
|
+
else next.add(path);
|
|
178
|
+
return next;
|
|
179
|
+
});
|
|
180
|
+
}, []);
|
|
181
|
+
const toggleSelect = useCallback((path) => {
|
|
182
|
+
setSelected((prev) => {
|
|
183
|
+
const next = new Set(prev);
|
|
184
|
+
if (next.has(path)) next.delete(path);
|
|
185
|
+
else {
|
|
186
|
+
if (!multiSelect) next.clear();
|
|
187
|
+
next.add(path);
|
|
188
|
+
}
|
|
189
|
+
return next;
|
|
190
|
+
});
|
|
191
|
+
}, [multiSelect]);
|
|
192
|
+
const handleFileClick = useCallback((file) => {
|
|
193
|
+
if (file.isDirectory) if (initialViewMode === "list") setCurrentPath((prev) => [...prev, file.name]);
|
|
194
|
+
else toggleExpand(file.path);
|
|
195
|
+
else toggleSelect(file.path);
|
|
196
|
+
}, [
|
|
197
|
+
initialViewMode,
|
|
198
|
+
toggleExpand,
|
|
199
|
+
toggleSelect
|
|
200
|
+
]);
|
|
201
|
+
const handleFileDoubleClick = useCallback((file) => {
|
|
202
|
+
if (!file.isDirectory) onFileOpen?.(file);
|
|
203
|
+
}, [onFileOpen]);
|
|
204
|
+
const navigateTo = useCallback((idx) => {
|
|
205
|
+
setCurrentPath((prev) => prev.slice(0, idx));
|
|
206
|
+
}, []);
|
|
207
|
+
const handleDrop = useCallback((e) => {
|
|
208
|
+
e.preventDefault();
|
|
209
|
+
setIsDragging(false);
|
|
210
|
+
if (!allowUpload || !onFileUpload) return;
|
|
211
|
+
const droppedFiles = Array.from(e.dataTransfer.files);
|
|
212
|
+
if (droppedFiles.length > 0) onFileUpload(droppedFiles, "/" + currentPath.join("/"));
|
|
213
|
+
}, [
|
|
214
|
+
allowUpload,
|
|
215
|
+
onFileUpload,
|
|
216
|
+
currentPath
|
|
217
|
+
]);
|
|
218
|
+
const handleSort = useCallback((col) => {
|
|
219
|
+
if (sortBy === col) setSortDir((d) => d === "asc" ? "desc" : "asc");
|
|
220
|
+
else {
|
|
221
|
+
setSortBy(col);
|
|
222
|
+
setSortDir("asc");
|
|
223
|
+
}
|
|
224
|
+
}, [sortBy]);
|
|
225
|
+
const selectedFiles = useMemo(() => visibleItems.filter((v) => selected.has(v.file.path)).map((v) => v.file), [visibleItems, selected]);
|
|
226
|
+
const rowHeightPx = Number.parseInt(String(tokens.elementSize.sm), 10) || 32;
|
|
227
|
+
const overscanRows = 12;
|
|
228
|
+
const totalRows = visibleItems.length;
|
|
229
|
+
const startRow = Math.max(0, Math.floor(scrollTop / rowHeightPx) - overscanRows);
|
|
230
|
+
const visibleRows = Math.ceil(viewportHeight / rowHeightPx) + overscanRows * 2;
|
|
231
|
+
const endRow = Math.min(totalRows, startRow + visibleRows);
|
|
232
|
+
const virtualVisibleItems = useMemo(() => visibleItems.slice(startRow, endRow), [
|
|
233
|
+
visibleItems,
|
|
234
|
+
startRow,
|
|
235
|
+
endRow
|
|
236
|
+
]);
|
|
237
|
+
React.useEffect(() => {
|
|
238
|
+
const el = listRef.current;
|
|
239
|
+
if (!el) return void 0;
|
|
240
|
+
const updateHeight = () => setViewportHeight(Math.max(rowHeightPx * 4, el.clientHeight || 240));
|
|
241
|
+
updateHeight();
|
|
242
|
+
if (typeof ResizeObserver !== "undefined") {
|
|
243
|
+
const observer = new ResizeObserver(updateHeight);
|
|
244
|
+
observer.observe(el);
|
|
245
|
+
return () => observer.disconnect();
|
|
246
|
+
}
|
|
247
|
+
window.addEventListener("resize", updateHeight);
|
|
248
|
+
return () => window.removeEventListener("resize", updateHeight);
|
|
249
|
+
}, [rowHeightPx]);
|
|
250
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
251
|
+
className: `file-explorer ${className}`,
|
|
252
|
+
style: {
|
|
253
|
+
height: typeof height === "number" ? height : void 0,
|
|
254
|
+
background: tokens.colors.background.base,
|
|
255
|
+
...bordered ? tokens.colors.border.cardStyle ?? { border: `1px solid ${tokens.colors.border.muted}` } : { border: "none" },
|
|
256
|
+
borderRadius: tokens.borderRadius.lg,
|
|
257
|
+
overflow: "hidden",
|
|
258
|
+
display: "flex",
|
|
259
|
+
flexDirection: "column",
|
|
260
|
+
fontFamily: tokens.typography.fontFamily.primary,
|
|
261
|
+
color: tokens.colors.text.primary,
|
|
262
|
+
backdropFilter: isTransparentTheme ? "blur(10px)" : void 0,
|
|
263
|
+
WebkitBackdropFilter: isTransparentTheme ? "blur(10px)" : void 0,
|
|
264
|
+
...styleProp
|
|
265
|
+
},
|
|
266
|
+
children: [
|
|
267
|
+
/* @__PURE__ */ jsxs("div", {
|
|
268
|
+
style: {
|
|
269
|
+
padding: `${tokens.spacing.sm} ${tokens.spacing.smd}`,
|
|
270
|
+
borderBottom: `1px solid ${tokens.colors.border.muted}`,
|
|
271
|
+
background: tokens.colors.background.surface,
|
|
272
|
+
backdropFilter: "blur(8px)",
|
|
273
|
+
display: "flex",
|
|
274
|
+
alignItems: "center",
|
|
275
|
+
justifyContent: "space-between"
|
|
276
|
+
},
|
|
277
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
278
|
+
style: {
|
|
279
|
+
fontWeight: tokens.typography.fontWeight.medium,
|
|
280
|
+
fontSize: tokens.typography.fontSize.sm
|
|
281
|
+
},
|
|
282
|
+
children: title || "File Explorer"
|
|
283
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
284
|
+
style: {
|
|
285
|
+
display: "flex",
|
|
286
|
+
gap: tokens.spacing.sm
|
|
287
|
+
},
|
|
288
|
+
children: [allowUpload && /* @__PURE__ */ jsx("button", {
|
|
289
|
+
"aria-label": "Upload files",
|
|
290
|
+
style: {
|
|
291
|
+
background: tokens.colors.interactive.default,
|
|
292
|
+
color: tokens.colors.text.inverse,
|
|
293
|
+
border: "none",
|
|
294
|
+
borderRadius: tokens.borderRadius.md,
|
|
295
|
+
padding: `${tokens.spacing.xs} ${tokens.spacing.smd}`,
|
|
296
|
+
fontSize: tokens.typography.fontSize.xxs,
|
|
297
|
+
cursor: "pointer",
|
|
298
|
+
fontWeight: tokens.typography.fontWeight.medium,
|
|
299
|
+
transition: "opacity 150ms ease"
|
|
300
|
+
},
|
|
301
|
+
children: "Upload"
|
|
302
|
+
}), allowDelete && selectedFiles.length > 0 && /* @__PURE__ */ jsxs("button", {
|
|
303
|
+
onClick: () => onFileDelete?.(selectedFiles),
|
|
304
|
+
"aria-label": `Delete ${selectedFiles.length} selected files`,
|
|
305
|
+
style: {
|
|
306
|
+
background: `${tokens.colors.status.critical}22`,
|
|
307
|
+
color: tokens.colors.status.critical,
|
|
308
|
+
border: `1px solid ${tokens.colors.status.critical}44`,
|
|
309
|
+
borderRadius: tokens.borderRadius.md,
|
|
310
|
+
padding: `${tokens.spacing.xs} ${tokens.spacing.smd}`,
|
|
311
|
+
fontSize: tokens.typography.fontSize.xxs,
|
|
312
|
+
cursor: "pointer",
|
|
313
|
+
fontWeight: tokens.typography.fontWeight.medium,
|
|
314
|
+
transition: "opacity 150ms ease"
|
|
315
|
+
},
|
|
316
|
+
children: [
|
|
317
|
+
"Delete (",
|
|
318
|
+
selectedFiles.length,
|
|
319
|
+
")"
|
|
320
|
+
]
|
|
321
|
+
})]
|
|
322
|
+
})]
|
|
323
|
+
}),
|
|
324
|
+
(showSearch || showBreadcrumbs) && /* @__PURE__ */ jsxs("div", {
|
|
325
|
+
style: {
|
|
326
|
+
padding: `${tokens.spacing.sm} ${tokens.spacing.smd}`,
|
|
327
|
+
borderBottom: `1px solid ${tokens.colors.border.muted}`,
|
|
328
|
+
display: "flex",
|
|
329
|
+
alignItems: "center",
|
|
330
|
+
gap: tokens.spacing.sm,
|
|
331
|
+
background: tokens.colors.background.surface
|
|
332
|
+
},
|
|
333
|
+
children: [showBreadcrumbs && initialViewMode === "list" && /* @__PURE__ */ jsxs("nav", {
|
|
334
|
+
"aria-label": "File path",
|
|
335
|
+
style: {
|
|
336
|
+
display: "flex",
|
|
337
|
+
alignItems: "center",
|
|
338
|
+
gap: tokens.spacing.xs,
|
|
339
|
+
fontSize: tokens.typography.fontSize.xs,
|
|
340
|
+
flex: 1
|
|
341
|
+
},
|
|
342
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
343
|
+
role: "button",
|
|
344
|
+
tabIndex: 0,
|
|
345
|
+
"aria-label": "Navigate to root",
|
|
346
|
+
onClick: () => navigateTo(0),
|
|
347
|
+
onKeyDown: (e) => {
|
|
348
|
+
if (e.key === "Enter") navigateTo(0);
|
|
349
|
+
},
|
|
350
|
+
style: {
|
|
351
|
+
cursor: "pointer",
|
|
352
|
+
color: tokens.colors.interactive.default,
|
|
353
|
+
fontWeight: tokens.typography.fontWeight.medium
|
|
354
|
+
},
|
|
355
|
+
children: "/"
|
|
356
|
+
}), currentPath.map((dir, idx) => /* @__PURE__ */ jsxs(React.Fragment, { children: [/* @__PURE__ */ jsx("span", {
|
|
357
|
+
"aria-hidden": "true",
|
|
358
|
+
style: { color: tokens.colors.text.muted },
|
|
359
|
+
children: "/"
|
|
360
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
361
|
+
role: "button",
|
|
362
|
+
tabIndex: 0,
|
|
363
|
+
"aria-label": `Navigate to ${dir}`,
|
|
364
|
+
onClick: () => navigateTo(idx + 1),
|
|
365
|
+
onKeyDown: (e) => {
|
|
366
|
+
if (e.key === "Enter") navigateTo(idx + 1);
|
|
367
|
+
},
|
|
368
|
+
style: {
|
|
369
|
+
cursor: "pointer",
|
|
370
|
+
color: idx === currentPath.length - 1 ? tokens.colors.text.primary : tokens.colors.interactive.default,
|
|
371
|
+
fontWeight: idx === currentPath.length - 1 ? tokens.typography.fontWeight.medium : tokens.typography.fontWeight.normal
|
|
372
|
+
},
|
|
373
|
+
children: dir
|
|
374
|
+
})] }, idx))]
|
|
375
|
+
}), showSearch && /* @__PURE__ */ jsx("input", {
|
|
376
|
+
type: "text",
|
|
377
|
+
value: searchQuery,
|
|
378
|
+
onChange: (e) => setSearchQuery(e.target.value),
|
|
379
|
+
placeholder: "Search files...",
|
|
380
|
+
"aria-label": "Search files",
|
|
381
|
+
style: {
|
|
382
|
+
background: tokens.colors.background.base,
|
|
383
|
+
color: tokens.colors.text.primary,
|
|
384
|
+
border: `1px solid ${tokens.colors.border.muted}`,
|
|
385
|
+
borderRadius: tokens.borderRadius.md,
|
|
386
|
+
padding: `${tokens.spacing.xs} ${tokens.spacing.sm}`,
|
|
387
|
+
fontSize: tokens.typography.fontSize.xs,
|
|
388
|
+
outline: "none",
|
|
389
|
+
minWidth: 150,
|
|
390
|
+
transition: "border-color 150ms ease"
|
|
391
|
+
}
|
|
392
|
+
})]
|
|
393
|
+
}),
|
|
394
|
+
/* @__PURE__ */ jsxs("div", {
|
|
395
|
+
role: "row",
|
|
396
|
+
style: {
|
|
397
|
+
display: "grid",
|
|
398
|
+
gridTemplateColumns: showDetails ? "1fr auto auto" : "1fr",
|
|
399
|
+
padding: `${tokens.spacing.xs} ${tokens.spacing.smd}`,
|
|
400
|
+
borderBottom: `1px solid ${tokens.colors.border.muted}`,
|
|
401
|
+
background: tokens.colors.background.surface,
|
|
402
|
+
fontSize: tokens.typography.fontSize.xxs,
|
|
403
|
+
color: tokens.colors.text.muted,
|
|
404
|
+
fontWeight: tokens.typography.fontWeight.medium,
|
|
405
|
+
textTransform: "uppercase",
|
|
406
|
+
letterSpacing: "0.5px"
|
|
407
|
+
},
|
|
408
|
+
children: [/* @__PURE__ */ jsxs("span", {
|
|
409
|
+
role: "columnheader",
|
|
410
|
+
tabIndex: 0,
|
|
411
|
+
"aria-label": "Sort by name",
|
|
412
|
+
onClick: () => handleSort("name"),
|
|
413
|
+
onKeyDown: (e) => {
|
|
414
|
+
if (e.key === "Enter") handleSort("name");
|
|
415
|
+
},
|
|
416
|
+
style: { cursor: "pointer" },
|
|
417
|
+
children: ["Name ", sortBy === "name" && (sortDir === "asc" ? "▲" : "▼")]
|
|
418
|
+
}), showDetails && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs("span", {
|
|
419
|
+
role: "columnheader",
|
|
420
|
+
tabIndex: 0,
|
|
421
|
+
"aria-label": "Sort by size",
|
|
422
|
+
onClick: () => handleSort("size"),
|
|
423
|
+
onKeyDown: (e) => {
|
|
424
|
+
if (e.key === "Enter") handleSort("size");
|
|
425
|
+
},
|
|
426
|
+
style: {
|
|
427
|
+
cursor: "pointer",
|
|
428
|
+
minWidth: 70,
|
|
429
|
+
textAlign: "right"
|
|
430
|
+
},
|
|
431
|
+
children: [
|
|
432
|
+
"Size",
|
|
433
|
+
" ",
|
|
434
|
+
sortBy === "size" && (sortDir === "asc" ? "▲" : "▼")
|
|
435
|
+
]
|
|
436
|
+
}), /* @__PURE__ */ jsxs("span", {
|
|
437
|
+
role: "columnheader",
|
|
438
|
+
tabIndex: 0,
|
|
439
|
+
"aria-label": "Sort by modified date",
|
|
440
|
+
onClick: () => handleSort("modified"),
|
|
441
|
+
onKeyDown: (e) => {
|
|
442
|
+
if (e.key === "Enter") handleSort("modified");
|
|
443
|
+
},
|
|
444
|
+
style: {
|
|
445
|
+
cursor: "pointer",
|
|
446
|
+
minWidth: 140,
|
|
447
|
+
textAlign: "right"
|
|
448
|
+
},
|
|
449
|
+
children: [
|
|
450
|
+
"Modified",
|
|
451
|
+
" ",
|
|
452
|
+
sortBy === "modified" && (sortDir === "asc" ? "▲" : "▼")
|
|
453
|
+
]
|
|
454
|
+
})] })]
|
|
455
|
+
}),
|
|
456
|
+
/* @__PURE__ */ jsxs("div", {
|
|
457
|
+
ref: listRef,
|
|
458
|
+
style: {
|
|
459
|
+
flex: 1,
|
|
460
|
+
overflow: "auto",
|
|
461
|
+
position: "relative",
|
|
462
|
+
border: isDragging ? `2px dashed ${tokens.colors.interactive.default}` : "2px solid transparent"
|
|
463
|
+
},
|
|
464
|
+
onScroll: (e) => setScrollTop(e.currentTarget.scrollTop),
|
|
465
|
+
onDragOver: allowUpload ? (e) => {
|
|
466
|
+
e.preventDefault();
|
|
467
|
+
setIsDragging(true);
|
|
468
|
+
} : void 0,
|
|
469
|
+
onDragLeave: allowUpload ? () => setIsDragging(false) : void 0,
|
|
470
|
+
onDrop: allowUpload ? handleDrop : void 0,
|
|
471
|
+
children: [isDragging && /* @__PURE__ */ jsx("div", {
|
|
472
|
+
style: {
|
|
473
|
+
position: "absolute",
|
|
474
|
+
inset: 0,
|
|
475
|
+
background: `${tokens.colors.interactive.default}11`,
|
|
476
|
+
display: "flex",
|
|
477
|
+
alignItems: "center",
|
|
478
|
+
justifyContent: "center",
|
|
479
|
+
fontSize: tokens.typography.fontSize.sm,
|
|
480
|
+
color: tokens.colors.interactive.default,
|
|
481
|
+
fontWeight: tokens.typography.fontWeight.medium,
|
|
482
|
+
zIndex: 10
|
|
483
|
+
},
|
|
484
|
+
children: "Drop files to upload"
|
|
485
|
+
}), visibleItems.length === 0 ? /* @__PURE__ */ jsx("div", {
|
|
486
|
+
style: {
|
|
487
|
+
display: "flex",
|
|
488
|
+
alignItems: "center",
|
|
489
|
+
justifyContent: "center",
|
|
490
|
+
height: "100%",
|
|
491
|
+
color: tokens.colors.text.muted,
|
|
492
|
+
fontSize: tokens.typography.fontSize.sm
|
|
493
|
+
},
|
|
494
|
+
children: searchQuery ? "No matching files" : "Empty directory"
|
|
495
|
+
}) : /* @__PURE__ */ jsx("div", {
|
|
496
|
+
style: {
|
|
497
|
+
height: totalRows * rowHeightPx,
|
|
498
|
+
position: "relative"
|
|
499
|
+
},
|
|
500
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
501
|
+
style: {
|
|
502
|
+
position: "absolute",
|
|
503
|
+
top: startRow * rowHeightPx,
|
|
504
|
+
left: 0,
|
|
505
|
+
right: 0
|
|
506
|
+
},
|
|
507
|
+
children: virtualVisibleItems.map(({ file, depth }) => /* @__PURE__ */ jsxs("div", {
|
|
508
|
+
role: "treeitem",
|
|
509
|
+
tabIndex: 0,
|
|
510
|
+
"aria-label": `${file.isDirectory ? "Folder" : "File"}: ${file.name}`,
|
|
511
|
+
"aria-selected": selected.has(file.path),
|
|
512
|
+
onClick: () => handleFileClick(file),
|
|
513
|
+
onDoubleClick: () => handleFileDoubleClick(file),
|
|
514
|
+
onKeyDown: (e) => {
|
|
515
|
+
if (e.key === "Enter") handleFileDoubleClick(file);
|
|
516
|
+
if (e.key === " ") {
|
|
517
|
+
e.preventDefault();
|
|
518
|
+
handleFileClick(file);
|
|
519
|
+
}
|
|
520
|
+
},
|
|
521
|
+
style: {
|
|
522
|
+
display: "grid",
|
|
523
|
+
gridTemplateColumns: showDetails ? "1fr auto auto" : "1fr",
|
|
524
|
+
padding: `0 ${tokens.spacing.smd}`,
|
|
525
|
+
paddingLeft: `calc(${tokens.spacing.smd} + ${depth * 20}px)`,
|
|
526
|
+
height: tokens.elementSize.sm,
|
|
527
|
+
alignItems: "center",
|
|
528
|
+
borderBottom: `1px solid ${tokens.colors.border.muted}`,
|
|
529
|
+
cursor: "pointer",
|
|
530
|
+
background: selected.has(file.path) ? `${tokens.colors.interactive.default}15` : "transparent",
|
|
531
|
+
transition: "background 150ms ease"
|
|
532
|
+
},
|
|
533
|
+
onMouseEnter: (e) => {
|
|
534
|
+
if (!selected.has(file.path)) e.currentTarget.style.background = tokens.colors.background.surface;
|
|
535
|
+
},
|
|
536
|
+
onMouseLeave: (e) => {
|
|
537
|
+
e.currentTarget.style.background = selected.has(file.path) ? `${tokens.colors.interactive.default}15` : "transparent";
|
|
538
|
+
},
|
|
539
|
+
children: [/* @__PURE__ */ jsxs("span", {
|
|
540
|
+
style: {
|
|
541
|
+
display: "flex",
|
|
542
|
+
alignItems: "center",
|
|
543
|
+
gap: tokens.spacing.sm,
|
|
544
|
+
overflow: "hidden"
|
|
545
|
+
},
|
|
546
|
+
children: [
|
|
547
|
+
multiSelect && /* @__PURE__ */ jsx("input", {
|
|
548
|
+
type: "checkbox",
|
|
549
|
+
checked: selected.has(file.path),
|
|
550
|
+
onChange: () => toggleSelect(file.path),
|
|
551
|
+
onClick: (e) => e.stopPropagation(),
|
|
552
|
+
"aria-label": `Select ${file.name}`,
|
|
553
|
+
style: { accentColor: tokens.colors.interactive.default }
|
|
554
|
+
}),
|
|
555
|
+
initialViewMode === "tree" && file.isDirectory && /* @__PURE__ */ jsx("span", {
|
|
556
|
+
"aria-hidden": "true",
|
|
557
|
+
style: {
|
|
558
|
+
fontSize: tokens.typography.fontSize.xxs,
|
|
559
|
+
color: tokens.colors.text.muted,
|
|
560
|
+
width: 12,
|
|
561
|
+
textAlign: "center"
|
|
562
|
+
},
|
|
563
|
+
children: expanded.has(file.path) ? "▼" : "▶"
|
|
564
|
+
}),
|
|
565
|
+
/* @__PURE__ */ jsx("span", {
|
|
566
|
+
"aria-hidden": "true",
|
|
567
|
+
style: {
|
|
568
|
+
display: "inline-flex",
|
|
569
|
+
alignItems: "center",
|
|
570
|
+
fontSize: tokens.typography.fontSize.sm
|
|
571
|
+
},
|
|
572
|
+
children: /* @__PURE__ */ jsx(AstroIcon, {
|
|
573
|
+
name: getFileIconName(file),
|
|
574
|
+
size: "small",
|
|
575
|
+
label: "",
|
|
576
|
+
style: { fontSize: "inherit" }
|
|
577
|
+
})
|
|
578
|
+
}),
|
|
579
|
+
/* @__PURE__ */ jsx("span", {
|
|
580
|
+
style: {
|
|
581
|
+
fontSize: tokens.typography.fontSize.xs,
|
|
582
|
+
fontWeight: file.isDirectory ? tokens.typography.fontWeight.medium : tokens.typography.fontWeight.normal,
|
|
583
|
+
color: file.isDirectory ? tokens.colors.interactive.default : tokens.colors.text.primary,
|
|
584
|
+
overflow: "hidden",
|
|
585
|
+
textOverflow: "ellipsis",
|
|
586
|
+
whiteSpace: "nowrap"
|
|
587
|
+
},
|
|
588
|
+
children: file.name
|
|
589
|
+
})
|
|
590
|
+
]
|
|
591
|
+
}), showDetails && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", {
|
|
592
|
+
style: {
|
|
593
|
+
fontSize: tokens.typography.fontSize.xs,
|
|
594
|
+
color: tokens.colors.text.muted,
|
|
595
|
+
textAlign: "right",
|
|
596
|
+
minWidth: 70,
|
|
597
|
+
fontFamily: tokens.typography.fontFamily.mono
|
|
598
|
+
},
|
|
599
|
+
children: file.isDirectory ? "—" : formatFileSize(file.size)
|
|
600
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
601
|
+
style: {
|
|
602
|
+
fontSize: tokens.typography.fontSize.xs,
|
|
603
|
+
color: tokens.colors.text.muted,
|
|
604
|
+
textAlign: "right",
|
|
605
|
+
minWidth: 140,
|
|
606
|
+
fontFamily: tokens.typography.fontFamily.mono
|
|
607
|
+
},
|
|
608
|
+
children: formatDate(file.modified)
|
|
609
|
+
})] })]
|
|
610
|
+
}, file.path))
|
|
611
|
+
})
|
|
612
|
+
})]
|
|
613
|
+
}),
|
|
614
|
+
/* @__PURE__ */ jsxs("div", {
|
|
615
|
+
style: {
|
|
616
|
+
padding: `${tokens.spacing.xs} ${tokens.spacing.smd}`,
|
|
617
|
+
borderTop: `1px solid ${tokens.colors.border.muted}`,
|
|
618
|
+
background: tokens.colors.background.surface,
|
|
619
|
+
fontSize: tokens.typography.fontSize.xxs,
|
|
620
|
+
color: tokens.colors.text.muted,
|
|
621
|
+
display: "flex",
|
|
622
|
+
justifyContent: "space-between"
|
|
623
|
+
},
|
|
624
|
+
children: [/* @__PURE__ */ jsxs("span", { children: [visibleItems.length, " items"] }), selected.size > 0 && /* @__PURE__ */ jsxs("span", { children: [selected.size, " selected"] })]
|
|
625
|
+
})
|
|
626
|
+
]
|
|
627
|
+
});
|
|
516
628
|
});
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
//# sourceMappingURL=FileExplorer.js.map
|
|
629
|
+
//#endregion
|
|
630
|
+
export { FileExplorer, FileExplorer as default };
|
|
631
|
+
|
|
632
|
+
//# sourceMappingURL=FileExplorer.js.map
|