@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
package/dist/tokens/index.js
CHANGED
|
@@ -1,374 +1,289 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
critical: "#ff2a04",
|
|
14
|
-
serious: "#ffaf3d",
|
|
15
|
-
caution: "#fad800",
|
|
16
|
-
normal: "#00e200",
|
|
17
|
-
standby: "#64d9ff",
|
|
18
|
-
off: "#7b8089"
|
|
19
|
-
},
|
|
20
|
-
// Status Colors (Light Theme - Border)
|
|
21
|
-
statusLightBorder: {
|
|
22
|
-
critical: "#661102",
|
|
23
|
-
serious: "#664618",
|
|
24
|
-
caution: "#645600",
|
|
25
|
-
normal: "#005a00",
|
|
26
|
-
standby: "#285766",
|
|
27
|
-
off: "#3c3e42"
|
|
28
|
-
},
|
|
29
|
-
// Background Colors
|
|
30
|
-
background: {
|
|
31
|
-
dark: {
|
|
32
|
-
base: "#101923",
|
|
33
|
-
surface: "#1b2d3e",
|
|
34
|
-
elevated: "#243647",
|
|
35
|
-
overlay: "rgba(0, 0, 0, 0.7)"
|
|
36
|
-
},
|
|
37
|
-
light: {
|
|
38
|
-
base: "#f5f6f9",
|
|
39
|
-
surface: "#ffffff",
|
|
40
|
-
elevated: "#ffffff",
|
|
41
|
-
overlay: "rgba(0, 0, 0, 0.5)"
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
|
-
// Text Colors
|
|
45
|
-
text: {
|
|
46
|
-
dark: {
|
|
47
|
-
primary: "#ffffff",
|
|
48
|
-
secondary: "#9ea7ad",
|
|
49
|
-
tertiary: "#6b7175",
|
|
50
|
-
muted: "#52595f"
|
|
51
|
-
},
|
|
52
|
-
light: {
|
|
53
|
-
primary: "#1b2d3e",
|
|
54
|
-
secondary: "#4c5a67",
|
|
55
|
-
tertiary: "#7a8891",
|
|
56
|
-
muted: "#a4adb5"
|
|
57
|
-
}
|
|
58
|
-
},
|
|
59
|
-
// Accent Colors
|
|
60
|
-
accent: {
|
|
61
|
-
primary: "#4dacff",
|
|
62
|
-
secondary: "#3d8ddb",
|
|
63
|
-
tertiary: "#2e6eb3"
|
|
64
|
-
},
|
|
65
|
-
// Border Colors
|
|
66
|
-
border: {
|
|
67
|
-
dark: {
|
|
68
|
-
default: "#3c4b5a",
|
|
69
|
-
muted: "#2b3d4e",
|
|
70
|
-
focus: "#4dacff"
|
|
71
|
-
},
|
|
72
|
-
light: {
|
|
73
|
-
default: "#c4c8cc",
|
|
74
|
-
muted: "#e1e4e8",
|
|
75
|
-
focus: "#4dacff"
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
};
|
|
79
|
-
const spacing = {
|
|
80
|
-
xxs: "2px",
|
|
81
|
-
xs: "4px",
|
|
82
|
-
sm: "8px",
|
|
83
|
-
smd: "12px",
|
|
84
|
-
md: "16px",
|
|
85
|
-
mdl: "20px",
|
|
86
|
-
lg: "24px",
|
|
87
|
-
xl: "32px",
|
|
88
|
-
xxl: "48px"
|
|
89
|
-
};
|
|
90
|
-
const borderRadius = {
|
|
91
|
-
none: "0",
|
|
92
|
-
xs: "1px",
|
|
93
|
-
sm: "2px",
|
|
94
|
-
md: "4px",
|
|
95
|
-
lg: "8px",
|
|
96
|
-
/**
|
|
97
|
-
* 12px. Sized for surfaces (Container, Card, SidePanel). Matches the
|
|
98
|
-
* value already in use across zendir-ui components and the operator's
|
|
99
|
-
* LandingPage. Was 16px in earlier docs — corrected here so the JS
|
|
100
|
-
* tokens and the auto-generated CSS variables agree.
|
|
101
|
-
*/
|
|
102
|
-
xl: "12px",
|
|
103
|
-
full: "9999px"
|
|
104
|
-
};
|
|
105
|
-
const typography = {
|
|
106
|
-
fontFamily: {
|
|
107
|
-
/** Heading font: Sora (Zendir Brand Standard) */
|
|
108
|
-
heading: '"Sora", "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif',
|
|
109
|
-
/** Primary font: Public Sans (Zendir Brand Standard) */
|
|
110
|
-
primary: '"Public Sans", "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif',
|
|
111
|
-
/** Monospace font: Roboto Mono for data/code */
|
|
112
|
-
mono: '"Roboto Mono", "SF Mono", "Consolas", "Liberation Mono", monospace'
|
|
113
|
-
},
|
|
114
|
-
/**
|
|
115
|
-
* Convenience numeric scale used by ~300+ existing zendir-ui components
|
|
116
|
-
* via `tokens.typography.fontSize.*`. Density-tuned for data-rich UIs.
|
|
117
|
-
*
|
|
118
|
-
* For semantically-named typographic styles (display1/2, h1-h6, body1-3,
|
|
119
|
-
* control1) use the `display` / `heading` / `body` / `control` preset
|
|
120
|
-
* objects on `<ThemeProvider>` instead — those follow the canonical
|
|
121
|
-
* AstroUXDS scale.
|
|
122
|
-
*/
|
|
123
|
-
fontSize: {
|
|
124
|
-
// Compact sizes for dense UIs (cards, badges, data labels)
|
|
125
|
-
micro: "0.5625rem",
|
|
126
|
-
// 9px - very tight spaces
|
|
127
|
-
xxs: "0.625rem",
|
|
128
|
-
// 10px - compact labels
|
|
129
|
-
xs: "0.625rem",
|
|
130
|
-
// 10px - compact (alias of xxs, kept for back-compat)
|
|
131
|
-
sm: "0.75rem",
|
|
132
|
-
// 12px - body 3
|
|
133
|
-
base: "0.875rem",
|
|
134
|
-
// 14px - body 2
|
|
135
|
-
md: "0.875rem",
|
|
136
|
-
// 14px - body 2 (alias of base)
|
|
137
|
-
lg: "1rem",
|
|
138
|
-
// 16px - body 1
|
|
139
|
-
xl: "1.25rem",
|
|
140
|
-
// 20px - heading 3/4
|
|
141
|
-
xxl: "1.5rem",
|
|
142
|
-
// 24px - heading 2
|
|
143
|
-
xxxl: "2.125rem",
|
|
144
|
-
// 34px - heading 1
|
|
145
|
-
display: "3.75rem"
|
|
146
|
-
// 60px - display 1
|
|
147
|
-
},
|
|
148
|
-
/**
|
|
149
|
-
* Font weights per AstroUXDS specification
|
|
150
|
-
* Only 300, 400, 500, 700 are officially supported
|
|
151
|
-
*/
|
|
152
|
-
fontWeight: {
|
|
153
|
-
light: 300,
|
|
154
|
-
normal: 400,
|
|
155
|
-
regular: 400,
|
|
156
|
-
// Alias for normal
|
|
157
|
-
medium: 500,
|
|
158
|
-
bold: 700,
|
|
159
|
-
// DEPRECATED: semibold is not in Astro spec, use medium (500) instead
|
|
160
|
-
/** @deprecated Use medium (500) instead - Astro spec only supports 300, 400, 500, 700 */
|
|
161
|
-
semibold: 500
|
|
162
|
-
},
|
|
163
|
-
lineHeight: {
|
|
164
|
-
tight: 1.25,
|
|
165
|
-
normal: 1.5,
|
|
166
|
-
relaxed: 1.75
|
|
167
|
-
}
|
|
168
|
-
};
|
|
169
|
-
const shadows = {
|
|
170
|
-
none: "none",
|
|
171
|
-
sm: "0 1px 2px rgba(0, 0, 0, 0.3)",
|
|
172
|
-
md: "0 2px 8px rgba(0, 0, 0, 0.3)",
|
|
173
|
-
lg: "0 4px 16px rgba(0, 0, 0, 0.3)",
|
|
174
|
-
xl: "0 8px 32px rgba(0, 0, 0, 0.4)",
|
|
175
|
-
glow: "0 0 20px rgba(77, 172, 255, 0.4)"
|
|
176
|
-
};
|
|
177
|
-
const animation = {
|
|
178
|
-
fast: "150ms ease",
|
|
179
|
-
normal: "250ms ease",
|
|
180
|
-
slow: "400ms ease"
|
|
181
|
-
};
|
|
1
|
+
import { base, electricBlue, neutral, prussianBlue, ultraviolet, zendirScales, zendir_exports } from "./palettes/zendir.js";
|
|
2
|
+
import { amber, astroScales, astroStatus, astroStatusLightBorder, astroStatusLightFill, astro_exports, cyan, green, red, yellow } from "./palettes/astro.js";
|
|
3
|
+
import { tailwindScales, tailwind_exports } from "./palettes/tailwind.js";
|
|
4
|
+
import { allPalettes } from "./palettes/index.js";
|
|
5
|
+
import { astroThemeDark, astroThemeLight, hybridTheme, nebulaTheme, purpleHueTheme, transparentMinimalTheme, transparentTheme } from "./themes.js";
|
|
6
|
+
import { animation, borderRadius, colors, shadows, spacing, typography } from "./core.js";
|
|
7
|
+
//#region src/tokens/index.ts
|
|
8
|
+
/**
|
|
9
|
+
* Build a CSS rule body for the mode-invariant tokens (status, spacing,
|
|
10
|
+
* radius, typography, shadows, animation). These don't change between
|
|
11
|
+
* light/dark or across themes — they're shared.
|
|
12
|
+
*/
|
|
182
13
|
function buildInvariantBlock() {
|
|
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
|
-
" * ANIMATION",
|
|
283
|
-
" * ============================================================ */",
|
|
284
|
-
` --zendir-animation-fast: ${animation.fast};`,
|
|
285
|
-
` --zendir-animation-normal: ${animation.normal};`,
|
|
286
|
-
` --zendir-animation-slow: ${animation.slow};`
|
|
287
|
-
].join("\n");
|
|
14
|
+
return [
|
|
15
|
+
" /* ============================================================",
|
|
16
|
+
" * STATUS COLORS (Astro UX Compliant)",
|
|
17
|
+
" * ============================================================ */",
|
|
18
|
+
` --zendir-status-critical: ${colors.status.critical};`,
|
|
19
|
+
` --zendir-status-serious: ${colors.status.serious};`,
|
|
20
|
+
` --zendir-status-caution: ${colors.status.caution};`,
|
|
21
|
+
` --zendir-status-normal: ${colors.status.normal};`,
|
|
22
|
+
` --zendir-status-standby: ${colors.status.standby};`,
|
|
23
|
+
` --zendir-status-off: ${colors.status.off};`,
|
|
24
|
+
"",
|
|
25
|
+
" /* Light-theme status fill colors */",
|
|
26
|
+
` --zendir-status-critical-light: ${colors.statusLightFill.critical};`,
|
|
27
|
+
` --zendir-status-serious-light: ${colors.statusLightFill.serious};`,
|
|
28
|
+
` --zendir-status-caution-light: ${colors.statusLightFill.caution};`,
|
|
29
|
+
` --zendir-status-normal-light: ${colors.statusLightFill.normal};`,
|
|
30
|
+
` --zendir-status-standby-light: ${colors.statusLightFill.standby};`,
|
|
31
|
+
` --zendir-status-off-light: ${colors.statusLightFill.off};`,
|
|
32
|
+
"",
|
|
33
|
+
" /* Light-theme status border colors */",
|
|
34
|
+
` --zendir-status-critical-border: ${colors.statusLightBorder.critical};`,
|
|
35
|
+
` --zendir-status-serious-border: ${colors.statusLightBorder.serious};`,
|
|
36
|
+
` --zendir-status-caution-border: ${colors.statusLightBorder.caution};`,
|
|
37
|
+
` --zendir-status-normal-border: ${colors.statusLightBorder.normal};`,
|
|
38
|
+
` --zendir-status-standby-border: ${colors.statusLightBorder.standby};`,
|
|
39
|
+
` --zendir-status-off-border: ${colors.statusLightBorder.off};`,
|
|
40
|
+
"",
|
|
41
|
+
" /* ============================================================",
|
|
42
|
+
" * SPACING",
|
|
43
|
+
" * ============================================================ */",
|
|
44
|
+
` --zendir-spacing-xs: ${spacing.xs};`,
|
|
45
|
+
` --zendir-spacing-sm: ${spacing.sm};`,
|
|
46
|
+
` --zendir-spacing-md: ${spacing.md};`,
|
|
47
|
+
` --zendir-spacing-lg: ${spacing.lg};`,
|
|
48
|
+
` --zendir-spacing-xl: ${spacing.xl};`,
|
|
49
|
+
` --zendir-spacing-xxl: ${spacing.xxl};`,
|
|
50
|
+
"",
|
|
51
|
+
" /* ============================================================",
|
|
52
|
+
" * BORDER RADIUS",
|
|
53
|
+
" * ============================================================ */",
|
|
54
|
+
` --zendir-radius-none: ${borderRadius.none};`,
|
|
55
|
+
` --zendir-radius-sm: ${borderRadius.sm};`,
|
|
56
|
+
` --zendir-radius-md: ${borderRadius.md};`,
|
|
57
|
+
` --zendir-radius-lg: ${borderRadius.lg};`,
|
|
58
|
+
` --zendir-radius-xl: ${borderRadius.xl};`,
|
|
59
|
+
` --zendir-radius-full: ${borderRadius.full};`,
|
|
60
|
+
"",
|
|
61
|
+
" /* ============================================================",
|
|
62
|
+
" * TYPOGRAPHY",
|
|
63
|
+
" * Public Sans leads body, Sora leads headings, Roboto is the",
|
|
64
|
+
" * AstroUXDS-compliant fallback. OS-native fonts complete the chain.",
|
|
65
|
+
" * @see https://www.astrouxds.com/foundations/typography/",
|
|
66
|
+
" * ============================================================ */",
|
|
67
|
+
` --zendir-font-primary: ${typography.fontFamily.primary};`,
|
|
68
|
+
` --zendir-font-heading: ${typography.fontFamily.heading};`,
|
|
69
|
+
` --zendir-font-mono: ${typography.fontFamily.mono};`,
|
|
70
|
+
"",
|
|
71
|
+
" /* Font sizes (rem-based, AstroUXDS scale) */",
|
|
72
|
+
` --zendir-font-size-micro: ${typography.fontSize.micro};`,
|
|
73
|
+
` --zendir-font-size-xxs: ${typography.fontSize.xxs};`,
|
|
74
|
+
` --zendir-font-size-xs: ${typography.fontSize.xs};`,
|
|
75
|
+
` --zendir-font-size-sm: ${typography.fontSize.sm};`,
|
|
76
|
+
` --zendir-font-size-base: ${typography.fontSize.base};`,
|
|
77
|
+
` --zendir-font-size-md: ${typography.fontSize.md};`,
|
|
78
|
+
` --zendir-font-size-lg: ${typography.fontSize.lg};`,
|
|
79
|
+
` --zendir-font-size-xl: ${typography.fontSize.xl};`,
|
|
80
|
+
` --zendir-font-size-xxl: ${typography.fontSize.xxl};`,
|
|
81
|
+
` --zendir-font-size-xxxl: ${typography.fontSize.xxxl};`,
|
|
82
|
+
` --zendir-font-size-display: ${typography.fontSize.display};`,
|
|
83
|
+
"",
|
|
84
|
+
" /* Font weights — AstroUXDS supports only 300/400/500/700 */",
|
|
85
|
+
` --zendir-font-weight-light: ${typography.fontWeight.light};`,
|
|
86
|
+
` --zendir-font-weight-normal: ${typography.fontWeight.normal};`,
|
|
87
|
+
` --zendir-font-weight-medium: ${typography.fontWeight.medium};`,
|
|
88
|
+
` --zendir-font-weight-semibold: ${typography.fontWeight.semibold};`,
|
|
89
|
+
` --zendir-font-weight-bold: ${typography.fontWeight.bold};`,
|
|
90
|
+
"",
|
|
91
|
+
" /* Line heights */",
|
|
92
|
+
` --zendir-line-height-tight: ${typography.lineHeight.tight};`,
|
|
93
|
+
` --zendir-line-height-normal: ${typography.lineHeight.normal};`,
|
|
94
|
+
` --zendir-line-height-relaxed: ${typography.lineHeight.relaxed};`,
|
|
95
|
+
"",
|
|
96
|
+
" /* ============================================================",
|
|
97
|
+
" * SHADOWS",
|
|
98
|
+
" * ============================================================ */",
|
|
99
|
+
` --zendir-shadow-none: ${shadows.none};`,
|
|
100
|
+
` --zendir-shadow-sm: ${shadows.sm};`,
|
|
101
|
+
` --zendir-shadow-md: ${shadows.md};`,
|
|
102
|
+
` --zendir-shadow-lg: ${shadows.lg};`,
|
|
103
|
+
` --zendir-shadow-xl: ${shadows.xl};`,
|
|
104
|
+
` --zendir-shadow-glow: ${shadows.glow};`,
|
|
105
|
+
"",
|
|
106
|
+
" /* ============================================================",
|
|
107
|
+
" * ANIMATION",
|
|
108
|
+
" * ============================================================ */",
|
|
109
|
+
` --zendir-animation-fast: ${animation.fast};`,
|
|
110
|
+
` --zendir-animation-normal: ${animation.normal};`,
|
|
111
|
+
` --zendir-animation-slow: ${animation.slow};`
|
|
112
|
+
].join("\n");
|
|
288
113
|
}
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
114
|
+
/** Build the mode-specific block (background + text + border + accent + semantic). */
|
|
115
|
+
function buildModeBlock(theme) {
|
|
116
|
+
const bg = theme.colors.background;
|
|
117
|
+
const txt = theme.colors.text;
|
|
118
|
+
const bdr = theme.colors.border;
|
|
119
|
+
const accent = theme.colors.accent;
|
|
120
|
+
const semantic = theme.colors.semantic;
|
|
121
|
+
return [
|
|
122
|
+
` --zendir-bg-base: ${bg.base};`,
|
|
123
|
+
` --zendir-bg-surface: ${bg.surface};`,
|
|
124
|
+
` --zendir-bg-elevated: ${bg.elevated};`,
|
|
125
|
+
` --zendir-bg-overlay: ${bg.overlay};`,
|
|
126
|
+
"",
|
|
127
|
+
` --zendir-text-primary: ${txt.primary};`,
|
|
128
|
+
` --zendir-text-secondary: ${txt.secondary};`,
|
|
129
|
+
` --zendir-text-tertiary: ${txt.tertiary};`,
|
|
130
|
+
` --zendir-text-muted: ${txt.muted || txt.tertiary};`,
|
|
131
|
+
"",
|
|
132
|
+
` --zendir-border-default: ${bdr.default};`,
|
|
133
|
+
` --zendir-border-muted: ${bdr.muted};`,
|
|
134
|
+
` --zendir-border-focus: ${bdr.focus};`,
|
|
135
|
+
"",
|
|
136
|
+
` --zendir-accent-primary: ${accent.primary};`,
|
|
137
|
+
` --zendir-accent-secondary: ${accent.secondary};`,
|
|
138
|
+
` --zendir-accent-tertiary: ${accent.tertiary};`,
|
|
139
|
+
"",
|
|
140
|
+
` --zendir-semantic-success: ${semantic.success};`,
|
|
141
|
+
` --zendir-semantic-warning: ${semantic.warning};`,
|
|
142
|
+
` --zendir-semantic-error: ${semantic.error};`,
|
|
143
|
+
` --zendir-semantic-info: ${semantic.info};`
|
|
144
|
+
].join("\n");
|
|
308
145
|
}
|
|
146
|
+
/**
|
|
147
|
+
* Emit every primitive palette stop as a CSS variable. Mode-invariant by
|
|
148
|
+
* definition — primitives never change with theme. Naming:
|
|
149
|
+
* Zendir scales --zendir-eb-500 / --zendir-pb-500 / --zendir-uv-500 /
|
|
150
|
+
* --zendir-neutral-500
|
|
151
|
+
* Astro ramps --zendir-astro-red-500 … --zendir-astro-cyan-900
|
|
152
|
+
* Tailwind v4.2 --zendir-tw-red-500 … --zendir-tw-neutral-950
|
|
153
|
+
*/
|
|
154
|
+
function buildPaletteBlock() {
|
|
155
|
+
const lines = [];
|
|
156
|
+
const emit = (prefix, scale) => {
|
|
157
|
+
for (const [stop, hex] of Object.entries(scale)) lines.push(` --zendir-${prefix}-${stop}: ${hex};`);
|
|
158
|
+
};
|
|
159
|
+
lines.push(" /* Zendir Colour System */");
|
|
160
|
+
emit("eb", electricBlue);
|
|
161
|
+
emit("pb", prussianBlue);
|
|
162
|
+
emit("uv", ultraviolet);
|
|
163
|
+
emit("neutral", neutral);
|
|
164
|
+
lines.push("");
|
|
165
|
+
lines.push(" /* Astro UXDS status ramps */");
|
|
166
|
+
emit("astro-red", red);
|
|
167
|
+
emit("astro-amber", amber);
|
|
168
|
+
emit("astro-yellow", yellow);
|
|
169
|
+
emit("astro-green", green);
|
|
170
|
+
emit("astro-cyan", cyan);
|
|
171
|
+
lines.push("");
|
|
172
|
+
lines.push(" /* Tailwind CSS v4.2 */");
|
|
173
|
+
for (const [name, scale] of Object.entries(tailwindScales)) emit(`tw-${name.toLowerCase()}`, scale);
|
|
174
|
+
return lines.join("\n");
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* Single-mode generator. Emits one `:root { … }` block with the
|
|
178
|
+
* mode-invariant tokens AND the chosen mode's bg/text/border.
|
|
179
|
+
*
|
|
180
|
+
* Useful for runtime injection — `<style>` tags written by SSR helpers
|
|
181
|
+
* that target a single mode. The full stylesheet generator below is what
|
|
182
|
+
* ships to consumers.
|
|
183
|
+
*/
|
|
309
184
|
function generateCSSVariables(mode = "dark") {
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
185
|
+
return [
|
|
186
|
+
":root {",
|
|
187
|
+
buildInvariantBlock(),
|
|
188
|
+
"",
|
|
189
|
+
` /* ${mode === "dark" ? "Dark" : "Light"}-theme color overrides */`,
|
|
190
|
+
buildModeBlock(mode === "dark" ? hybridTheme : astroThemeLight),
|
|
191
|
+
"}"
|
|
192
|
+
].join("\n");
|
|
318
193
|
}
|
|
194
|
+
/**
|
|
195
|
+
* Full stylesheet generator. Emits the complete tokens.css equivalent —
|
|
196
|
+
* mode-invariant `:root` block, the primitive palette block, plus per-theme
|
|
197
|
+
* `[data-theme="…"]` overrides. This is what scripts/build-tokens.ts writes
|
|
198
|
+
* to src/tokens/tokens.css.
|
|
199
|
+
*/
|
|
319
200
|
function generateCSSStylesheet() {
|
|
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
|
-
|
|
201
|
+
return [
|
|
202
|
+
"/**",
|
|
203
|
+
" * @zendir/ui — CSS Design Tokens",
|
|
204
|
+
" *",
|
|
205
|
+
" * AUTO-GENERATED from src/tokens/index.ts. DO NOT EDIT BY HAND.",
|
|
206
|
+
" * Regenerate with: npm run build:tokens",
|
|
207
|
+
" *",
|
|
208
|
+
" * Usage:",
|
|
209
|
+
" * @import '@zendir/ui/tokens/css';",
|
|
210
|
+
" * .my-component { background: var(--zendir-bg-surface); }",
|
|
211
|
+
" */",
|
|
212
|
+
"",
|
|
213
|
+
":root {",
|
|
214
|
+
buildInvariantBlock(),
|
|
215
|
+
"}",
|
|
216
|
+
"",
|
|
217
|
+
"/* ============================================================",
|
|
218
|
+
" * PRIMITIVE PALETTES (Layer 0 — src/tokens/palettes)",
|
|
219
|
+
" * Raw scales; prefer the semantic tokens above for UI surfaces.",
|
|
220
|
+
" * ============================================================ */",
|
|
221
|
+
":root {",
|
|
222
|
+
buildPaletteBlock(),
|
|
223
|
+
"}",
|
|
224
|
+
"",
|
|
225
|
+
"/* ============================================================",
|
|
226
|
+
" * ZEN (HYBRID) THEME (default)",
|
|
227
|
+
" * ============================================================ */",
|
|
228
|
+
":root,",
|
|
229
|
+
"[data-theme=\"hybrid\"],",
|
|
230
|
+
"[data-theme=\"dark\"] {",
|
|
231
|
+
buildModeBlock(hybridTheme),
|
|
232
|
+
"}",
|
|
233
|
+
"",
|
|
234
|
+
"/* ============================================================",
|
|
235
|
+
" * ASTRO THEME",
|
|
236
|
+
" * ============================================================ */",
|
|
237
|
+
"[data-theme=\"astro\"] {",
|
|
238
|
+
buildModeBlock(astroThemeDark),
|
|
239
|
+
"}",
|
|
240
|
+
"",
|
|
241
|
+
"[data-theme=\"astro\"][data-mode=\"light\"],",
|
|
242
|
+
"[data-theme=\"hybrid\"][data-mode=\"light\"],",
|
|
243
|
+
"[data-theme=\"nebula\"][data-mode=\"light\"],",
|
|
244
|
+
"[data-theme=\"purple-hue\"][data-mode=\"light\"],",
|
|
245
|
+
"[data-theme=\"light\"] {",
|
|
246
|
+
buildModeBlock(astroThemeLight),
|
|
247
|
+
"}",
|
|
248
|
+
"",
|
|
249
|
+
"/* ============================================================",
|
|
250
|
+
" * NEBULA THEME",
|
|
251
|
+
" * ============================================================ */",
|
|
252
|
+
"[data-theme=\"nebula\"] {",
|
|
253
|
+
buildModeBlock(nebulaTheme),
|
|
254
|
+
"}",
|
|
255
|
+
"",
|
|
256
|
+
"/* ============================================================",
|
|
257
|
+
" * PURPLE HUE THEME",
|
|
258
|
+
" * ============================================================ */",
|
|
259
|
+
"[data-theme=\"purple-hue\"] {",
|
|
260
|
+
buildModeBlock(purpleHueTheme),
|
|
261
|
+
"}",
|
|
262
|
+
"",
|
|
263
|
+
"/* ============================================================",
|
|
264
|
+
" * TRANSPARENT THEMES",
|
|
265
|
+
" * ============================================================ */",
|
|
266
|
+
"[data-theme=\"transparent\"], [data-theme=\"transparent-bold\"] {",
|
|
267
|
+
buildModeBlock(transparentTheme),
|
|
268
|
+
"}",
|
|
269
|
+
"",
|
|
270
|
+
"[data-theme=\"transparent-minimal\"] {",
|
|
271
|
+
buildModeBlock(transparentMinimalTheme),
|
|
272
|
+
"}",
|
|
273
|
+
""
|
|
274
|
+
].join("\n");
|
|
352
275
|
}
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
};
|
|
363
|
-
export {
|
|
364
|
-
animation,
|
|
365
|
-
borderRadius,
|
|
366
|
-
colors,
|
|
367
|
-
index as default,
|
|
368
|
-
generateCSSStylesheet,
|
|
369
|
-
generateCSSVariables,
|
|
370
|
-
shadows,
|
|
371
|
-
spacing,
|
|
372
|
-
typography
|
|
276
|
+
var tokens_default = {
|
|
277
|
+
colors,
|
|
278
|
+
spacing,
|
|
279
|
+
borderRadius,
|
|
280
|
+
typography,
|
|
281
|
+
shadows,
|
|
282
|
+
animation,
|
|
283
|
+
generateCSSVariables,
|
|
284
|
+
generateCSSStylesheet
|
|
373
285
|
};
|
|
374
|
-
//#
|
|
286
|
+
//#endregion
|
|
287
|
+
export { allPalettes, animation, astroScales, astroStatus, astroStatusLightBorder, astroStatusLightFill, astro_exports as astroUxds, borderRadius, colors, tokens_default as default, electricBlue, generateCSSStylesheet, generateCSSVariables, prussianBlue, shadows, spacing, tailwind_exports as tailwind, tailwindScales, typography, ultraviolet, zendir_exports as zendir, base as zendirBase, neutral as zendirNeutral, zendirScales };
|
|
288
|
+
|
|
289
|
+
//# sourceMappingURL=index.js.map
|