@zendir/ui 0.2.21 → 0.3.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 +183 -1
- package/README.md +70 -28
- package/dist/index.d.ts +1 -1
- package/dist/index.js +51 -42
- package/dist/index.js.map +1 -1
- package/dist/react/3d/CesiumCaptureSource.d.ts +1 -1
- package/dist/react/3d/CesiumCaptureSource.js +1 -1
- package/dist/react/3d/CesiumCaptureSource.js.map +1 -1
- package/dist/react/3d/ZenSpace3D.js +1253 -0
- package/dist/react/3d/ZenSpace3D.js.map +1 -0
- package/dist/react/3d/ZenSpace3DCesium.js +579 -0
- package/dist/react/3d/ZenSpace3DCesium.js.map +1 -0
- package/dist/react/3d/ZenSpace3DTypes.d.ts +28 -1
- package/dist/react/3d/ZenSpace3DUtils.d.ts +17 -173
- package/dist/react/3d/ZenSpace3DUtils.js +20 -1
- package/dist/react/3d/ZenSpace3DUtils.js.map +1 -1
- package/dist/react/3d/index.d.ts +6 -12
- package/dist/react/3d/threeLoader.js +18 -0
- package/dist/react/3d/threeLoader.js.map +1 -0
- package/dist/react/astro/MonitoringIcon.js +1 -1
- package/dist/react/astro/MonitoringIcon.js.map +1 -1
- package/dist/react/astro/SimulationControls.js +2 -2
- package/dist/react/astro/SimulationControls.js.map +1 -1
- package/dist/react/astro/UnifiedTimeline.js +4 -4
- package/dist/react/astro/UnifiedTimeline.js.map +1 -1
- package/dist/react/charts/GroundTrackMap.d.ts +2 -15
- package/dist/react/charts/GroundTrackMap.js +1 -1
- package/dist/react/charts/GroundTrackMap.js.map +1 -1
- package/dist/react/charts/unified/AstroChart.js +34 -13
- package/dist/react/charts/unified/AstroChart.js.map +1 -1
- package/dist/react/chatgpt/AppCard.d.ts +0 -4
- package/dist/react/chatgpt/index.d.ts +0 -19
- package/dist/react/context/SpatialSelectionContext.d.ts +40 -0
- package/dist/react/context/SpatialSelectionContext.js +10 -0
- package/dist/react/context/SpatialSelectionContext.js.map +1 -0
- package/dist/react/context/index.d.ts +2 -0
- package/dist/react/core/{DataTable.d.ts → data/DataTable.d.ts} +1 -1
- package/dist/react/core/{DataTable.js → data/DataTable.js} +4 -4
- package/dist/react/core/data/DataTable.js.map +1 -0
- package/dist/react/core/{DataValue.d.ts → data/DataValue.d.ts} +2 -2
- package/dist/react/core/{DataValue.js → data/DataValue.js} +2 -2
- package/dist/react/core/data/DataValue.js.map +1 -0
- package/dist/react/core/{propertyConfig.d.ts → data/propertyConfig.d.ts} +2 -2
- package/dist/react/core/data/propertyConfig.js.map +1 -0
- package/dist/react/core/{AstroIcon.js → display/AstroIcon.js} +1 -1
- package/dist/react/core/display/AstroIcon.js.map +1 -0
- package/dist/react/core/{Badge.d.ts → display/Badge.d.ts} +1 -1
- package/dist/react/core/{Badge.js → display/Badge.js} +2 -2
- package/dist/react/core/display/Badge.js.map +1 -0
- package/dist/react/core/{CardHeader.d.ts → display/CardHeader.d.ts} +1 -1
- package/dist/react/core/{CardHeader.js → display/CardHeader.js} +2 -2
- package/dist/react/core/display/CardHeader.js.map +1 -0
- package/dist/react/core/{Container.d.ts → display/Container.d.ts} +1 -1
- package/dist/react/core/{Container.js → display/Container.js} +3 -3
- package/dist/react/core/display/Container.js.map +1 -0
- package/dist/react/core/{CopyButton.js → display/CopyButton.js} +1 -1
- package/dist/react/core/display/CopyButton.js.map +1 -0
- package/dist/react/core/{GlassCard.d.ts → display/GlassCard.d.ts} +1 -1
- package/dist/react/core/{GlassCard.js → display/GlassCard.js} +2 -2
- package/dist/react/core/display/GlassCard.js.map +1 -0
- package/dist/react/core/{HeaderIconWithStatus.d.ts → display/HeaderIconWithStatus.d.ts} +1 -1
- package/dist/react/core/{HeaderIconWithStatus.js → display/HeaderIconWithStatus.js} +1 -1
- package/dist/react/core/display/HeaderIconWithStatus.js.map +1 -0
- package/dist/react/core/{Icon.d.ts → display/Icon.d.ts} +1 -1
- package/dist/react/core/{Icon.js → display/Icon.js} +1 -1
- package/dist/react/core/display/Icon.js.map +1 -0
- package/dist/react/core/{Typography.d.ts → display/Typography.d.ts} +13 -4
- package/dist/react/core/{Typography.js → display/Typography.js} +1 -1
- package/dist/react/core/display/Typography.js.map +1 -0
- package/dist/react/core/{ConfirmDialog.js → feedback/ConfirmDialog.js} +1 -1
- package/dist/react/core/feedback/ConfirmDialog.js.map +1 -0
- package/dist/react/core/{Dialog.js → feedback/Dialog.js} +2 -2
- package/dist/react/core/feedback/Dialog.js.map +1 -0
- package/dist/react/core/{Toast.js → feedback/Toast.js} +3 -3
- package/dist/react/core/feedback/Toast.js.map +1 -0
- package/dist/react/core/index.d.ts +85 -85
- package/dist/react/core/{Button.js → inputs/Button.js} +2 -2
- package/dist/react/core/inputs/Button.js.map +1 -0
- package/dist/react/core/{Checkbox.js → inputs/Checkbox.js} +2 -2
- package/dist/react/core/inputs/Checkbox.js.map +1 -0
- package/dist/react/core/{Input.d.ts → inputs/Input.d.ts} +1 -1
- package/dist/react/core/{Input.js → inputs/Input.js} +3 -3
- package/dist/react/core/inputs/Input.js.map +1 -0
- package/dist/react/core/{LimitsBar.js → inputs/LimitsBar.js} +1 -1
- package/dist/react/core/inputs/LimitsBar.js.map +1 -0
- package/dist/react/core/{NumberInput.d.ts → inputs/NumberInput.d.ts} +2 -2
- package/dist/react/core/{NumberInput.js → inputs/NumberInput.js} +3 -3
- package/dist/react/core/inputs/NumberInput.js.map +1 -0
- package/dist/react/core/{PinInput.js → inputs/PinInput.js} +2 -2
- package/dist/react/core/inputs/PinInput.js.map +1 -0
- package/dist/react/core/{Select.js → inputs/Select.js} +3 -3
- package/dist/react/core/inputs/Select.js.map +1 -0
- package/dist/react/core/{Toggle.js → inputs/Toggle.js} +2 -2
- package/dist/react/core/inputs/Toggle.js.map +1 -0
- package/dist/react/core/{AppBar.d.ts → navigation/AppBar.d.ts} +1 -1
- package/dist/react/core/{AppBar.js → navigation/AppBar.js} +7 -7
- package/dist/react/core/navigation/AppBar.js.map +1 -0
- package/dist/react/core/{Pagination.js → navigation/Pagination.js} +2 -2
- package/dist/react/core/navigation/Pagination.js.map +1 -0
- package/dist/react/core/{SideNav.d.ts → navigation/SideNav.d.ts} +1 -1
- package/dist/react/core/{SideNav.js → navigation/SideNav.js} +3 -3
- package/dist/react/core/navigation/SideNav.js.map +1 -0
- package/dist/react/core/{Tabs.js → navigation/Tabs.js} +2 -2
- package/dist/react/core/navigation/Tabs.js.map +1 -0
- package/dist/react/core/{Popover.js → overlays/Popover.js} +1 -1
- package/dist/react/core/overlays/Popover.js.map +1 -0
- package/dist/react/core/{SidePanel.js → overlays/SidePanel.js} +3 -3
- package/dist/react/core/overlays/SidePanel.js.map +1 -0
- package/dist/react/core/{Tooltip.js → overlays/Tooltip.js} +2 -2
- package/dist/react/core/overlays/Tooltip.js.map +1 -0
- package/dist/react/core/{ActivityPlanner.js → widgets/ActivityPlanner.js} +1 -1
- package/dist/react/core/widgets/ActivityPlanner.js.map +1 -0
- package/dist/react/core/{Capture.js → widgets/Capture.js} +3 -3
- package/dist/react/core/widgets/Capture.js.map +1 -0
- package/dist/react/core/{ChatPanel.d.ts → widgets/ChatPanel.d.ts} +1 -1
- package/dist/react/core/{ChatPanel.js → widgets/ChatPanel.js} +2 -2
- package/dist/react/core/widgets/ChatPanel.js.map +1 -0
- package/dist/react/core/{ColorPickerPanel.d.ts → widgets/ColorPickerPanel.d.ts} +1 -1
- package/dist/react/core/{ColorPickerPanel.js → widgets/ColorPickerPanel.js} +3 -3
- package/dist/react/core/widgets/ColorPickerPanel.js.map +1 -0
- package/dist/react/core/{CommandBuilder.js → widgets/CommandBuilder.js} +1 -1
- package/dist/react/core/widgets/CommandBuilder.js.map +1 -0
- package/dist/react/core/{ConnectionForm.d.ts → widgets/ConnectionForm.d.ts} +1 -1
- package/dist/react/core/{ConnectionForm.js → widgets/ConnectionForm.js} +2 -2
- package/dist/react/core/widgets/ConnectionForm.js.map +1 -0
- package/dist/react/core/{FileExplorer.js → widgets/FileExplorer.js} +2 -2
- package/dist/react/core/widgets/FileExplorer.js.map +1 -0
- package/dist/react/core/{HexViewer.js → widgets/HexViewer.js} +1 -1
- package/dist/react/core/widgets/HexViewer.js.map +1 -0
- package/dist/react/core/{ImageGallery.d.ts → widgets/ImageGallery.d.ts} +1 -1
- package/dist/react/core/{ImageGallery.js → widgets/ImageGallery.js} +3 -3
- package/dist/react/core/widgets/ImageGallery.js.map +1 -0
- package/dist/react/core/{LogViewer.d.ts → widgets/LogViewer.d.ts} +13 -3
- package/dist/react/core/{LogViewer.js → widgets/LogViewer.js} +28 -8
- package/dist/react/core/widgets/LogViewer.js.map +1 -0
- package/dist/react/core/{MessageStream.d.ts → widgets/MessageStream.d.ts} +2 -2
- package/dist/react/core/{MessageStream.js → widgets/MessageStream.js} +4 -4
- package/dist/react/core/widgets/MessageStream.js.map +1 -0
- package/dist/react/core/{MissionCalendar.js → widgets/MissionCalendar.js} +2 -2
- package/dist/react/core/widgets/MissionCalendar.js.map +1 -0
- package/dist/react/core/{PacketViewer.js → widgets/PacketViewer.js} +1 -1
- package/dist/react/core/widgets/PacketViewer.js.map +1 -0
- package/dist/react/core/widgets/capture-placeholder.png.js.map +1 -0
- package/dist/react/hooks/index.d.ts +9 -11
- package/dist/react/hooks/useAccessWindows.d.ts +15 -19
- package/dist/react/hooks/useGroundTrackHistory.d.ts +34 -0
- package/dist/react/hooks/useSimulationScene.d.ts +141 -0
- package/dist/react/hooks/useSimulationScene.js +401 -0
- package/dist/react/hooks/useSimulationScene.js.map +1 -0
- package/dist/react/hooks/useZendirSession.d.ts +44 -69
- package/dist/react/index.d.ts +7 -3
- package/dist/react/panels/LayerControlPanel.d.ts +54 -0
- package/dist/react/panels/LayerControlPanel.js +184 -0
- package/dist/react/panels/LayerControlPanel.js.map +1 -0
- package/dist/react/panels/ObjectInventoryPanel.d.ts +57 -0
- package/dist/react/panels/ObjectInventoryPanel.js +261 -0
- package/dist/react/panels/ObjectInventoryPanel.js.map +1 -0
- package/dist/react/panels/index.d.ts +15 -0
- package/dist/react/theme/ThemeProvider.d.ts +2 -0
- package/dist/react/theme/ThemeProvider.js +50 -72
- package/dist/react/theme/ThemeProvider.js.map +1 -1
- package/dist/react/types.d.ts +32 -3
- package/dist/react/types.js.map +1 -1
- package/dist/react.js +51 -42
- package/dist/react.js.map +1 -1
- package/dist/shaders/atmosphere.frag.js +5 -0
- package/dist/shaders/atmosphere.frag.js.map +1 -0
- package/dist/shaders/atmosphere.vert.js +5 -0
- package/dist/shaders/atmosphere.vert.js.map +1 -0
- package/dist/shaders/stars.frag.js +5 -0
- package/dist/shaders/stars.frag.js.map +1 -0
- package/dist/shaders/stars.vert.js +5 -0
- package/dist/shaders/stars.vert.js.map +1 -0
- package/dist/style.css +6 -4
- package/dist/tokens/css-vars.d.ts +91 -0
- package/dist/tokens/css-vars.js +228 -0
- package/dist/tokens/css-vars.js.map +1 -0
- package/dist/tokens/index.d.ts +71 -18
- package/dist/tokens/index.js +206 -97
- package/dist/tokens/index.js.map +1 -1
- package/dist/tokens/tokens.css +50 -50
- package/package.json +26 -22
- package/sdk-stub.js +10 -5
- package/dist/react/3d/EarthViewer.d.ts +0 -46
- package/dist/react/3d/SolarSystemViewer.d.ts +0 -43
- package/dist/react/chatgpt/ChatGPTCard.d.ts +0 -6
- package/dist/react/core/ActivityPlanner.js.map +0 -1
- package/dist/react/core/AppBar.js.map +0 -1
- package/dist/react/core/AstroIcon.js.map +0 -1
- package/dist/react/core/Badge.js.map +0 -1
- package/dist/react/core/Button.js.map +0 -1
- package/dist/react/core/Capture.js.map +0 -1
- package/dist/react/core/CardHeader.js.map +0 -1
- package/dist/react/core/ChatPanel.js.map +0 -1
- package/dist/react/core/Checkbox.js.map +0 -1
- package/dist/react/core/ColorPickerPanel.js.map +0 -1
- package/dist/react/core/CommandBuilder.js.map +0 -1
- package/dist/react/core/ConfirmDialog.js.map +0 -1
- package/dist/react/core/ConnectionForm.js.map +0 -1
- package/dist/react/core/Container.js.map +0 -1
- package/dist/react/core/CopyButton.js.map +0 -1
- package/dist/react/core/DataTable.js.map +0 -1
- package/dist/react/core/DataValue.js.map +0 -1
- package/dist/react/core/Dialog.js.map +0 -1
- package/dist/react/core/FileExplorer.js.map +0 -1
- package/dist/react/core/GlassCard.js.map +0 -1
- package/dist/react/core/HeaderIconWithStatus.js.map +0 -1
- package/dist/react/core/HexViewer.js.map +0 -1
- package/dist/react/core/Icon.js.map +0 -1
- package/dist/react/core/ImageGallery.js.map +0 -1
- package/dist/react/core/Input.js.map +0 -1
- package/dist/react/core/LimitsBar.js.map +0 -1
- package/dist/react/core/LogViewer.js.map +0 -1
- package/dist/react/core/MessageStream.js.map +0 -1
- package/dist/react/core/MissionCalendar.js.map +0 -1
- package/dist/react/core/NumberInput.js.map +0 -1
- package/dist/react/core/PacketViewer.js.map +0 -1
- package/dist/react/core/Pagination.js.map +0 -1
- package/dist/react/core/PinInput.js.map +0 -1
- package/dist/react/core/Popover.js.map +0 -1
- package/dist/react/core/Select.js.map +0 -1
- package/dist/react/core/SideNav.js.map +0 -1
- package/dist/react/core/SidePanel.js.map +0 -1
- package/dist/react/core/Tabs.js.map +0 -1
- package/dist/react/core/Toast.js.map +0 -1
- package/dist/react/core/Toggle.js.map +0 -1
- package/dist/react/core/Tooltip.js.map +0 -1
- package/dist/react/core/Typography.js.map +0 -1
- package/dist/react/core/capture-placeholder.png.js.map +0 -1
- package/dist/react/core/propertyConfig.js.map +0 -1
- package/dist/react/hooks/useSimulationTime.d.ts +0 -61
- package/dist/react/hooks/useSpacecraftPosition.d.ts +0 -50
- package/dist/react/hooks/useTelemetry.d.ts +0 -55
- package/dist/types.d.ts +0 -1
- package/dist/types.js +0 -2
- package/dist/types.js.map +0 -1
- /package/dist/react/core/{propertyConfig.js → data/propertyConfig.js} +0 -0
- /package/dist/react/core/{AstroIcon.d.ts → display/AstroIcon.d.ts} +0 -0
- /package/dist/react/core/{CopyButton.d.ts → display/CopyButton.d.ts} +0 -0
- /package/dist/react/core/{ConfirmDialog.d.ts → feedback/ConfirmDialog.d.ts} +0 -0
- /package/dist/react/core/{Dialog.d.ts → feedback/Dialog.d.ts} +0 -0
- /package/dist/react/core/{Toast.d.ts → feedback/Toast.d.ts} +0 -0
- /package/dist/react/core/{Button.d.ts → inputs/Button.d.ts} +0 -0
- /package/dist/react/core/{Checkbox.d.ts → inputs/Checkbox.d.ts} +0 -0
- /package/dist/react/core/{LimitsBar.d.ts → inputs/LimitsBar.d.ts} +0 -0
- /package/dist/react/core/{PinInput.d.ts → inputs/PinInput.d.ts} +0 -0
- /package/dist/react/core/{Select.d.ts → inputs/Select.d.ts} +0 -0
- /package/dist/react/core/{Toggle.d.ts → inputs/Toggle.d.ts} +0 -0
- /package/dist/react/core/{Pagination.d.ts → navigation/Pagination.d.ts} +0 -0
- /package/dist/react/core/{Tabs.d.ts → navigation/Tabs.d.ts} +0 -0
- /package/dist/react/core/{Popover.d.ts → overlays/Popover.d.ts} +0 -0
- /package/dist/react/core/{SidePanel.d.ts → overlays/SidePanel.d.ts} +0 -0
- /package/dist/react/core/{Tooltip.d.ts → overlays/Tooltip.d.ts} +0 -0
- /package/dist/react/core/{ActivityPlanner.d.ts → widgets/ActivityPlanner.d.ts} +0 -0
- /package/dist/react/core/{Capture.d.ts → widgets/Capture.d.ts} +0 -0
- /package/dist/react/core/{CommandBuilder.d.ts → widgets/CommandBuilder.d.ts} +0 -0
- /package/dist/react/core/{FileExplorer.d.ts → widgets/FileExplorer.d.ts} +0 -0
- /package/dist/react/core/{HexViewer.d.ts → widgets/HexViewer.d.ts} +0 -0
- /package/dist/react/core/{MissionCalendar.d.ts → widgets/MissionCalendar.d.ts} +0 -0
- /package/dist/react/core/{PacketViewer.d.ts → widgets/PacketViewer.d.ts} +0 -0
- /package/dist/react/core/{capture-placeholder.png.js → widgets/capture-placeholder.png.js} +0 -0
package/dist/tokens/index.d.ts
CHANGED
|
@@ -76,19 +76,29 @@ export declare const colors: {
|
|
|
76
76
|
};
|
|
77
77
|
};
|
|
78
78
|
export declare const spacing: {
|
|
79
|
+
readonly xxs: "2px";
|
|
79
80
|
readonly xs: "4px";
|
|
80
81
|
readonly sm: "8px";
|
|
82
|
+
readonly smd: "12px";
|
|
81
83
|
readonly md: "16px";
|
|
84
|
+
readonly mdl: "20px";
|
|
82
85
|
readonly lg: "24px";
|
|
83
86
|
readonly xl: "32px";
|
|
84
87
|
readonly xxl: "48px";
|
|
85
88
|
};
|
|
86
89
|
export declare const borderRadius: {
|
|
87
90
|
readonly none: "0";
|
|
91
|
+
readonly xs: "1px";
|
|
88
92
|
readonly sm: "2px";
|
|
89
93
|
readonly md: "4px";
|
|
90
94
|
readonly lg: "8px";
|
|
91
|
-
|
|
95
|
+
/**
|
|
96
|
+
* 12px. Sized for surfaces (Container, Card, SidePanel). Matches the
|
|
97
|
+
* value already in use across zendir-ui components and the operator's
|
|
98
|
+
* LandingPage. Was 16px in earlier docs — corrected here so the JS
|
|
99
|
+
* tokens and the auto-generated CSS variables agree.
|
|
100
|
+
*/
|
|
101
|
+
readonly xl: "12px";
|
|
92
102
|
readonly full: "9999px";
|
|
93
103
|
};
|
|
94
104
|
/**
|
|
@@ -107,17 +117,26 @@ export declare const typography: {
|
|
|
107
117
|
/** Monospace font: Roboto Mono for data/code */
|
|
108
118
|
readonly mono: "\"Roboto Mono\", \"SF Mono\", \"Consolas\", \"Liberation Mono\", monospace";
|
|
109
119
|
};
|
|
120
|
+
/**
|
|
121
|
+
* Convenience numeric scale used by ~300+ existing zendir-ui components
|
|
122
|
+
* via `tokens.typography.fontSize.*`. Density-tuned for data-rich UIs.
|
|
123
|
+
*
|
|
124
|
+
* For semantically-named typographic styles (display1/2, h1-h6, body1-3,
|
|
125
|
+
* control1) use the `display` / `heading` / `body` / `control` preset
|
|
126
|
+
* objects on `<ThemeProvider>` instead — those follow the canonical
|
|
127
|
+
* AstroUXDS scale.
|
|
128
|
+
*/
|
|
110
129
|
readonly fontSize: {
|
|
111
130
|
readonly micro: "0.5625rem";
|
|
112
131
|
readonly xxs: "0.625rem";
|
|
113
|
-
readonly xs: "0.
|
|
114
|
-
readonly sm: "0.
|
|
115
|
-
readonly base: "
|
|
116
|
-
readonly md: "
|
|
117
|
-
readonly lg: "
|
|
118
|
-
readonly xl: "1.
|
|
119
|
-
readonly xxl: "
|
|
120
|
-
readonly xxxl: "
|
|
132
|
+
readonly xs: "0.625rem";
|
|
133
|
+
readonly sm: "0.75rem";
|
|
134
|
+
readonly base: "0.875rem";
|
|
135
|
+
readonly md: "0.875rem";
|
|
136
|
+
readonly lg: "1rem";
|
|
137
|
+
readonly xl: "1.25rem";
|
|
138
|
+
readonly xxl: "1.5rem";
|
|
139
|
+
readonly xxxl: "2.125rem";
|
|
121
140
|
readonly display: "3.75rem";
|
|
122
141
|
};
|
|
123
142
|
/**
|
|
@@ -152,7 +171,21 @@ export declare const animation: {
|
|
|
152
171
|
readonly normal: "250ms ease";
|
|
153
172
|
readonly slow: "400ms ease";
|
|
154
173
|
};
|
|
174
|
+
/**
|
|
175
|
+
* Single-mode generator. Emits one `:root { … }` block with the
|
|
176
|
+
* mode-invariant tokens AND the chosen mode's bg/text/border.
|
|
177
|
+
*
|
|
178
|
+
* Useful for runtime injection — `<style>` tags written by SSR helpers
|
|
179
|
+
* that target a single mode.
|
|
180
|
+
*/
|
|
155
181
|
export declare function generateCSSVariables(mode?: 'dark' | 'light'): string;
|
|
182
|
+
/**
|
|
183
|
+
* Full stylesheet generator. Emits the complete tokens.css equivalent —
|
|
184
|
+
* mode-invariant `:root` block plus `:root, [data-theme="dark"]` and
|
|
185
|
+
* `[data-theme="light"]` mode overrides. This is what scripts/build-tokens.ts
|
|
186
|
+
* writes to src/tokens/tokens.css.
|
|
187
|
+
*/
|
|
188
|
+
export declare function generateCSSStylesheet(): string;
|
|
156
189
|
declare const _default: {
|
|
157
190
|
colors: {
|
|
158
191
|
readonly status: {
|
|
@@ -226,19 +259,29 @@ declare const _default: {
|
|
|
226
259
|
};
|
|
227
260
|
};
|
|
228
261
|
spacing: {
|
|
262
|
+
readonly xxs: "2px";
|
|
229
263
|
readonly xs: "4px";
|
|
230
264
|
readonly sm: "8px";
|
|
265
|
+
readonly smd: "12px";
|
|
231
266
|
readonly md: "16px";
|
|
267
|
+
readonly mdl: "20px";
|
|
232
268
|
readonly lg: "24px";
|
|
233
269
|
readonly xl: "32px";
|
|
234
270
|
readonly xxl: "48px";
|
|
235
271
|
};
|
|
236
272
|
borderRadius: {
|
|
237
273
|
readonly none: "0";
|
|
274
|
+
readonly xs: "1px";
|
|
238
275
|
readonly sm: "2px";
|
|
239
276
|
readonly md: "4px";
|
|
240
277
|
readonly lg: "8px";
|
|
241
|
-
|
|
278
|
+
/**
|
|
279
|
+
* 12px. Sized for surfaces (Container, Card, SidePanel). Matches the
|
|
280
|
+
* value already in use across zendir-ui components and the operator's
|
|
281
|
+
* LandingPage. Was 16px in earlier docs — corrected here so the JS
|
|
282
|
+
* tokens and the auto-generated CSS variables agree.
|
|
283
|
+
*/
|
|
284
|
+
readonly xl: "12px";
|
|
242
285
|
readonly full: "9999px";
|
|
243
286
|
};
|
|
244
287
|
typography: {
|
|
@@ -250,17 +293,26 @@ declare const _default: {
|
|
|
250
293
|
/** Monospace font: Roboto Mono for data/code */
|
|
251
294
|
readonly mono: "\"Roboto Mono\", \"SF Mono\", \"Consolas\", \"Liberation Mono\", monospace";
|
|
252
295
|
};
|
|
296
|
+
/**
|
|
297
|
+
* Convenience numeric scale used by ~300+ existing zendir-ui components
|
|
298
|
+
* via `tokens.typography.fontSize.*`. Density-tuned for data-rich UIs.
|
|
299
|
+
*
|
|
300
|
+
* For semantically-named typographic styles (display1/2, h1-h6, body1-3,
|
|
301
|
+
* control1) use the `display` / `heading` / `body` / `control` preset
|
|
302
|
+
* objects on `<ThemeProvider>` instead — those follow the canonical
|
|
303
|
+
* AstroUXDS scale.
|
|
304
|
+
*/
|
|
253
305
|
readonly fontSize: {
|
|
254
306
|
readonly micro: "0.5625rem";
|
|
255
307
|
readonly xxs: "0.625rem";
|
|
256
|
-
readonly xs: "0.
|
|
257
|
-
readonly sm: "0.
|
|
258
|
-
readonly base: "
|
|
259
|
-
readonly md: "
|
|
260
|
-
readonly lg: "
|
|
261
|
-
readonly xl: "1.
|
|
262
|
-
readonly xxl: "
|
|
263
|
-
readonly xxxl: "
|
|
308
|
+
readonly xs: "0.625rem";
|
|
309
|
+
readonly sm: "0.75rem";
|
|
310
|
+
readonly base: "0.875rem";
|
|
311
|
+
readonly md: "0.875rem";
|
|
312
|
+
readonly lg: "1rem";
|
|
313
|
+
readonly xl: "1.25rem";
|
|
314
|
+
readonly xxl: "1.5rem";
|
|
315
|
+
readonly xxxl: "2.125rem";
|
|
264
316
|
readonly display: "3.75rem";
|
|
265
317
|
};
|
|
266
318
|
/**
|
|
@@ -296,5 +348,6 @@ declare const _default: {
|
|
|
296
348
|
readonly slow: "400ms ease";
|
|
297
349
|
};
|
|
298
350
|
generateCSSVariables: typeof generateCSSVariables;
|
|
351
|
+
generateCSSStylesheet: typeof generateCSSStylesheet;
|
|
299
352
|
};
|
|
300
353
|
export default _default;
|
package/dist/tokens/index.js
CHANGED
|
@@ -77,19 +77,29 @@ const colors = {
|
|
|
77
77
|
}
|
|
78
78
|
};
|
|
79
79
|
const spacing = {
|
|
80
|
+
xxs: "2px",
|
|
80
81
|
xs: "4px",
|
|
81
82
|
sm: "8px",
|
|
83
|
+
smd: "12px",
|
|
82
84
|
md: "16px",
|
|
85
|
+
mdl: "20px",
|
|
83
86
|
lg: "24px",
|
|
84
87
|
xl: "32px",
|
|
85
88
|
xxl: "48px"
|
|
86
89
|
};
|
|
87
90
|
const borderRadius = {
|
|
88
91
|
none: "0",
|
|
92
|
+
xs: "1px",
|
|
89
93
|
sm: "2px",
|
|
90
94
|
md: "4px",
|
|
91
95
|
lg: "8px",
|
|
92
|
-
|
|
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",
|
|
93
103
|
full: "9999px"
|
|
94
104
|
};
|
|
95
105
|
const typography = {
|
|
@@ -101,31 +111,39 @@ const typography = {
|
|
|
101
111
|
/** Monospace font: Roboto Mono for data/code */
|
|
102
112
|
mono: '"Roboto Mono", "SF Mono", "Consolas", "Liberation Mono", monospace'
|
|
103
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
|
+
*/
|
|
104
123
|
fontSize: {
|
|
105
124
|
// Compact sizes for dense UIs (cards, badges, data labels)
|
|
106
125
|
micro: "0.5625rem",
|
|
107
126
|
// 9px - very tight spaces
|
|
108
127
|
xxs: "0.625rem",
|
|
109
128
|
// 10px - compact labels
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
// 48px - display2
|
|
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
|
|
127
145
|
display: "3.75rem"
|
|
128
|
-
// 60px -
|
|
146
|
+
// 60px - display 1
|
|
129
147
|
},
|
|
130
148
|
/**
|
|
131
149
|
* Font weights per AstroUXDS specification
|
|
@@ -161,87 +179,176 @@ const animation = {
|
|
|
161
179
|
normal: "250ms ease",
|
|
162
180
|
slow: "400ms ease"
|
|
163
181
|
};
|
|
164
|
-
function
|
|
182
|
+
function buildInvariantBlock() {
|
|
183
|
+
return [
|
|
184
|
+
" /* ============================================================",
|
|
185
|
+
" * STATUS COLORS (Astro UX Compliant)",
|
|
186
|
+
" * ============================================================ */",
|
|
187
|
+
` --zendir-status-critical: ${colors.status.critical};`,
|
|
188
|
+
` --zendir-status-serious: ${colors.status.serious};`,
|
|
189
|
+
` --zendir-status-caution: ${colors.status.caution};`,
|
|
190
|
+
` --zendir-status-normal: ${colors.status.normal};`,
|
|
191
|
+
` --zendir-status-standby: ${colors.status.standby};`,
|
|
192
|
+
` --zendir-status-off: ${colors.status.off};`,
|
|
193
|
+
"",
|
|
194
|
+
" /* Light-theme status fill colors */",
|
|
195
|
+
` --zendir-status-critical-light: ${colors.statusLightFill.critical};`,
|
|
196
|
+
` --zendir-status-serious-light: ${colors.statusLightFill.serious};`,
|
|
197
|
+
` --zendir-status-caution-light: ${colors.statusLightFill.caution};`,
|
|
198
|
+
` --zendir-status-normal-light: ${colors.statusLightFill.normal};`,
|
|
199
|
+
` --zendir-status-standby-light: ${colors.statusLightFill.standby};`,
|
|
200
|
+
` --zendir-status-off-light: ${colors.statusLightFill.off};`,
|
|
201
|
+
"",
|
|
202
|
+
" /* Light-theme status border colors */",
|
|
203
|
+
` --zendir-status-critical-border: ${colors.statusLightBorder.critical};`,
|
|
204
|
+
` --zendir-status-serious-border: ${colors.statusLightBorder.serious};`,
|
|
205
|
+
` --zendir-status-caution-border: ${colors.statusLightBorder.caution};`,
|
|
206
|
+
` --zendir-status-normal-border: ${colors.statusLightBorder.normal};`,
|
|
207
|
+
` --zendir-status-standby-border: ${colors.statusLightBorder.standby};`,
|
|
208
|
+
` --zendir-status-off-border: ${colors.statusLightBorder.off};`,
|
|
209
|
+
"",
|
|
210
|
+
" /* ============================================================",
|
|
211
|
+
" * ACCENT COLORS",
|
|
212
|
+
" * ============================================================ */",
|
|
213
|
+
` --zendir-accent-primary: ${colors.accent.primary};`,
|
|
214
|
+
` --zendir-accent-secondary: ${colors.accent.secondary};`,
|
|
215
|
+
` --zendir-accent-tertiary: ${colors.accent.tertiary};`,
|
|
216
|
+
"",
|
|
217
|
+
" /* ============================================================",
|
|
218
|
+
" * SPACING",
|
|
219
|
+
" * ============================================================ */",
|
|
220
|
+
` --zendir-spacing-xs: ${spacing.xs};`,
|
|
221
|
+
` --zendir-spacing-sm: ${spacing.sm};`,
|
|
222
|
+
` --zendir-spacing-md: ${spacing.md};`,
|
|
223
|
+
` --zendir-spacing-lg: ${spacing.lg};`,
|
|
224
|
+
` --zendir-spacing-xl: ${spacing.xl};`,
|
|
225
|
+
` --zendir-spacing-xxl: ${spacing.xxl};`,
|
|
226
|
+
"",
|
|
227
|
+
" /* ============================================================",
|
|
228
|
+
" * BORDER RADIUS",
|
|
229
|
+
" * ============================================================ */",
|
|
230
|
+
` --zendir-radius-none: ${borderRadius.none};`,
|
|
231
|
+
` --zendir-radius-sm: ${borderRadius.sm};`,
|
|
232
|
+
` --zendir-radius-md: ${borderRadius.md};`,
|
|
233
|
+
` --zendir-radius-lg: ${borderRadius.lg};`,
|
|
234
|
+
` --zendir-radius-xl: ${borderRadius.xl};`,
|
|
235
|
+
` --zendir-radius-full: ${borderRadius.full};`,
|
|
236
|
+
"",
|
|
237
|
+
" /* ============================================================",
|
|
238
|
+
" * TYPOGRAPHY",
|
|
239
|
+
" * Public Sans leads body, Sora leads headings, Roboto is the",
|
|
240
|
+
" * AstroUXDS-compliant fallback. OS-native fonts complete the chain.",
|
|
241
|
+
" * @see https://www.astrouxds.com/foundations/typography/",
|
|
242
|
+
" * ============================================================ */",
|
|
243
|
+
` --zendir-font-primary: ${typography.fontFamily.primary};`,
|
|
244
|
+
` --zendir-font-heading: ${typography.fontFamily.heading};`,
|
|
245
|
+
` --zendir-font-mono: ${typography.fontFamily.mono};`,
|
|
246
|
+
"",
|
|
247
|
+
" /* Font sizes (rem-based, AstroUXDS scale) */",
|
|
248
|
+
` --zendir-font-size-micro: ${typography.fontSize.micro};`,
|
|
249
|
+
` --zendir-font-size-xxs: ${typography.fontSize.xxs};`,
|
|
250
|
+
` --zendir-font-size-xs: ${typography.fontSize.xs};`,
|
|
251
|
+
` --zendir-font-size-sm: ${typography.fontSize.sm};`,
|
|
252
|
+
` --zendir-font-size-base: ${typography.fontSize.base};`,
|
|
253
|
+
` --zendir-font-size-md: ${typography.fontSize.md};`,
|
|
254
|
+
` --zendir-font-size-lg: ${typography.fontSize.lg};`,
|
|
255
|
+
` --zendir-font-size-xl: ${typography.fontSize.xl};`,
|
|
256
|
+
` --zendir-font-size-xxl: ${typography.fontSize.xxl};`,
|
|
257
|
+
` --zendir-font-size-xxxl: ${typography.fontSize.xxxl};`,
|
|
258
|
+
` --zendir-font-size-display: ${typography.fontSize.display};`,
|
|
259
|
+
"",
|
|
260
|
+
" /* Font weights — AstroUXDS supports only 300/400/500/700 */",
|
|
261
|
+
` --zendir-font-weight-light: ${typography.fontWeight.light};`,
|
|
262
|
+
` --zendir-font-weight-normal: ${typography.fontWeight.normal};`,
|
|
263
|
+
` --zendir-font-weight-medium: ${typography.fontWeight.medium};`,
|
|
264
|
+
` --zendir-font-weight-bold: ${typography.fontWeight.bold};`,
|
|
265
|
+
"",
|
|
266
|
+
" /* Line heights */",
|
|
267
|
+
` --zendir-line-height-tight: ${typography.lineHeight.tight};`,
|
|
268
|
+
` --zendir-line-height-normal: ${typography.lineHeight.normal};`,
|
|
269
|
+
` --zendir-line-height-relaxed: ${typography.lineHeight.relaxed};`,
|
|
270
|
+
"",
|
|
271
|
+
" /* ============================================================",
|
|
272
|
+
" * SHADOWS",
|
|
273
|
+
" * ============================================================ */",
|
|
274
|
+
` --zendir-shadow-none: ${shadows.none};`,
|
|
275
|
+
` --zendir-shadow-sm: ${shadows.sm};`,
|
|
276
|
+
` --zendir-shadow-md: ${shadows.md};`,
|
|
277
|
+
` --zendir-shadow-lg: ${shadows.lg};`,
|
|
278
|
+
` --zendir-shadow-xl: ${shadows.xl};`,
|
|
279
|
+
` --zendir-shadow-glow: ${shadows.glow};`,
|
|
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");
|
|
288
|
+
}
|
|
289
|
+
function buildModeBlock(mode) {
|
|
165
290
|
const bg = colors.background[mode];
|
|
166
291
|
const txt = colors.text[mode];
|
|
167
292
|
const bdr = colors.border[mode];
|
|
168
|
-
return
|
|
169
|
-
:
|
|
170
|
-
|
|
171
|
-
--zendir-
|
|
172
|
-
--zendir-
|
|
173
|
-
|
|
174
|
-
--zendir-
|
|
175
|
-
--zendir-
|
|
176
|
-
--zendir-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
--zendir-
|
|
180
|
-
--zendir-
|
|
181
|
-
--zendir-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
--zendir-accent-tertiary: ${colors.accent.tertiary};
|
|
194
|
-
|
|
195
|
-
/* Border */
|
|
196
|
-
--zendir-border-default: ${bdr.default};
|
|
197
|
-
--zendir-border-muted: ${bdr.muted};
|
|
198
|
-
--zendir-border-focus: ${bdr.focus};
|
|
199
|
-
|
|
200
|
-
/* Spacing */
|
|
201
|
-
--zendir-spacing-xs: ${spacing.xs};
|
|
202
|
-
--zendir-spacing-sm: ${spacing.sm};
|
|
203
|
-
--zendir-spacing-md: ${spacing.md};
|
|
204
|
-
--zendir-spacing-lg: ${spacing.lg};
|
|
205
|
-
--zendir-spacing-xl: ${spacing.xl};
|
|
206
|
-
--zendir-spacing-xxl: ${spacing.xxl};
|
|
207
|
-
|
|
208
|
-
/* Border Radius */
|
|
209
|
-
--zendir-radius-sm: ${borderRadius.sm};
|
|
210
|
-
--zendir-radius-md: ${borderRadius.md};
|
|
211
|
-
--zendir-radius-lg: ${borderRadius.lg};
|
|
212
|
-
--zendir-radius-xl: ${borderRadius.xl};
|
|
213
|
-
--zendir-radius-full: ${borderRadius.full};
|
|
214
|
-
|
|
215
|
-
/* Typography - AstroUXDS Compliant */
|
|
216
|
-
--zendir-font-primary: ${typography.fontFamily.primary};
|
|
217
|
-
--zendir-font-mono: ${typography.fontFamily.mono};
|
|
218
|
-
--zendir-font-size-micro: ${typography.fontSize.micro};
|
|
219
|
-
--zendir-font-size-xxs: ${typography.fontSize.xxs};
|
|
220
|
-
--zendir-font-size-xs: ${typography.fontSize.xs};
|
|
221
|
-
--zendir-font-size-sm: ${typography.fontSize.sm};
|
|
222
|
-
--zendir-font-size-base: ${typography.fontSize.base};
|
|
223
|
-
--zendir-font-size-md: ${typography.fontSize.md};
|
|
224
|
-
--zendir-font-size-lg: ${typography.fontSize.lg};
|
|
225
|
-
--zendir-font-size-xl: ${typography.fontSize.xl};
|
|
226
|
-
--zendir-font-size-xxl: ${typography.fontSize.xxl};
|
|
227
|
-
--zendir-font-weight-light: ${typography.fontWeight.light};
|
|
228
|
-
--zendir-font-weight-normal: ${typography.fontWeight.normal};
|
|
229
|
-
--zendir-font-weight-medium: ${typography.fontWeight.medium};
|
|
230
|
-
--zendir-font-weight-bold: ${typography.fontWeight.bold};
|
|
231
|
-
|
|
232
|
-
/* Shadows */
|
|
233
|
-
--zendir-shadow-sm: ${shadows.sm};
|
|
234
|
-
--zendir-shadow-md: ${shadows.md};
|
|
235
|
-
--zendir-shadow-lg: ${shadows.lg};
|
|
236
|
-
--zendir-shadow-xl: ${shadows.xl};
|
|
237
|
-
--zendir-shadow-glow: ${shadows.glow};
|
|
238
|
-
|
|
239
|
-
/* Animation */
|
|
240
|
-
--zendir-animation-fast: ${animation.fast};
|
|
241
|
-
--zendir-animation-normal: ${animation.normal};
|
|
242
|
-
--zendir-animation-slow: ${animation.slow};
|
|
293
|
+
return [
|
|
294
|
+
` --zendir-bg-base: ${bg.base};`,
|
|
295
|
+
` --zendir-bg-surface: ${bg.surface};`,
|
|
296
|
+
` --zendir-bg-elevated: ${bg.elevated};`,
|
|
297
|
+
` --zendir-bg-overlay: ${bg.overlay};`,
|
|
298
|
+
"",
|
|
299
|
+
` --zendir-text-primary: ${txt.primary};`,
|
|
300
|
+
` --zendir-text-secondary: ${txt.secondary};`,
|
|
301
|
+
` --zendir-text-tertiary: ${txt.tertiary};`,
|
|
302
|
+
` --zendir-text-muted: ${txt.muted};`,
|
|
303
|
+
"",
|
|
304
|
+
` --zendir-border-default: ${bdr.default};`,
|
|
305
|
+
` --zendir-border-muted: ${bdr.muted};`,
|
|
306
|
+
` --zendir-border-focus: ${bdr.focus};`
|
|
307
|
+
].join("\n");
|
|
308
|
+
}
|
|
309
|
+
function generateCSSVariables(mode = "dark") {
|
|
310
|
+
return [
|
|
311
|
+
":root {",
|
|
312
|
+
buildInvariantBlock(),
|
|
313
|
+
"",
|
|
314
|
+
` /* ${mode === "dark" ? "Dark" : "Light"}-theme color overrides */`,
|
|
315
|
+
buildModeBlock(mode),
|
|
316
|
+
"}"
|
|
317
|
+
].join("\n");
|
|
243
318
|
}
|
|
244
|
-
|
|
319
|
+
function generateCSSStylesheet() {
|
|
320
|
+
return [
|
|
321
|
+
"/**",
|
|
322
|
+
" * @zendir/ui — CSS Design Tokens",
|
|
323
|
+
" *",
|
|
324
|
+
" * AUTO-GENERATED from src/tokens/index.ts. DO NOT EDIT BY HAND.",
|
|
325
|
+
" * Regenerate with: npm run build:tokens",
|
|
326
|
+
" *",
|
|
327
|
+
" * Usage:",
|
|
328
|
+
" * @import '@zendir/ui/tokens/css';",
|
|
329
|
+
" * .my-component { background: var(--zendir-bg-surface); }",
|
|
330
|
+
" */",
|
|
331
|
+
"",
|
|
332
|
+
":root {",
|
|
333
|
+
buildInvariantBlock(),
|
|
334
|
+
"}",
|
|
335
|
+
"",
|
|
336
|
+
"/* ============================================================",
|
|
337
|
+
" * DARK THEME (default)",
|
|
338
|
+
" * ============================================================ */",
|
|
339
|
+
":root,",
|
|
340
|
+
'[data-theme="dark"] {',
|
|
341
|
+
buildModeBlock("dark"),
|
|
342
|
+
"}",
|
|
343
|
+
"",
|
|
344
|
+
"/* ============================================================",
|
|
345
|
+
" * LIGHT THEME",
|
|
346
|
+
" * ============================================================ */",
|
|
347
|
+
'[data-theme="light"] {',
|
|
348
|
+
buildModeBlock("light"),
|
|
349
|
+
"}",
|
|
350
|
+
""
|
|
351
|
+
].join("\n");
|
|
245
352
|
}
|
|
246
353
|
const index = {
|
|
247
354
|
colors,
|
|
@@ -250,13 +357,15 @@ const index = {
|
|
|
250
357
|
typography,
|
|
251
358
|
shadows,
|
|
252
359
|
animation,
|
|
253
|
-
generateCSSVariables
|
|
360
|
+
generateCSSVariables,
|
|
361
|
+
generateCSSStylesheet
|
|
254
362
|
};
|
|
255
363
|
export {
|
|
256
364
|
animation,
|
|
257
365
|
borderRadius,
|
|
258
366
|
colors,
|
|
259
367
|
index as default,
|
|
368
|
+
generateCSSStylesheet,
|
|
260
369
|
generateCSSVariables,
|
|
261
370
|
shadows,
|
|
262
371
|
spacing,
|
package/dist/tokens/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/tokens/index.ts"],"sourcesContent":["/**\n * @zendir/ui - Design Tokens\n * \n * Exportable design tokens for use in CSS and JavaScript.\n * Based on Astro UX Design System.\n */\n\nexport const colors = {\n // Status Colors (Dark Theme)\n status: {\n critical: '#ff3838',\n serious: '#ffb302',\n caution: '#fce83a',\n normal: '#56f000',\n standby: '#2dccff',\n off: '#a4abb6',\n },\n \n // Status Colors (Light Theme - Fill)\n statusLightFill: {\n critical: '#ff2a04',\n serious: '#ffaf3d',\n caution: '#fad800',\n normal: '#00e200',\n standby: '#64d9ff',\n off: '#7b8089',\n },\n \n // Status Colors (Light Theme - Border)\n statusLightBorder: {\n critical: '#661102',\n serious: '#664618',\n caution: '#645600',\n normal: '#005a00',\n standby: '#285766',\n off: '#3c3e42',\n },\n \n // Background Colors\n background: {\n dark: {\n base: '#101923',\n surface: '#1b2d3e',\n elevated: '#243647',\n overlay: 'rgba(0, 0, 0, 0.7)',\n },\n light: {\n base: '#f5f6f9',\n surface: '#ffffff',\n elevated: '#ffffff',\n overlay: 'rgba(0, 0, 0, 0.5)',\n },\n },\n \n // Text Colors\n text: {\n dark: {\n primary: '#ffffff',\n secondary: '#9ea7ad',\n tertiary: '#6b7175',\n muted: '#52595f',\n },\n light: {\n primary: '#1b2d3e',\n secondary: '#4c5a67',\n tertiary: '#7a8891',\n muted: '#a4adb5',\n },\n },\n \n // Accent Colors\n accent: {\n primary: '#4dacff',\n secondary: '#3d8ddb',\n tertiary: '#2e6eb3',\n },\n \n // Border Colors\n border: {\n dark: {\n default: '#3c4b5a',\n muted: '#2b3d4e',\n focus: '#4dacff',\n },\n light: {\n default: '#c4c8cc',\n muted: '#e1e4e8',\n focus: '#4dacff',\n },\n },\n} as const;\n\nexport const spacing = {\n xs: '4px',\n sm: '8px',\n md: '16px',\n lg: '24px',\n xl: '32px',\n xxl: '48px',\n} as const;\n\nexport const borderRadius = {\n none: '0',\n sm: '2px',\n md: '4px',\n lg: '8px',\n xl: '16px',\n full: '9999px',\n} as const;\n\n/**\n * Typography tokens following AstroUXDS Design System\n * @see https://www.astrouxds.com/foundations/typography/\n * \n * Font weights per Astro spec: 300 (Light), 400 (Regular), 500 (Medium), 700 (Bold)\n * Note: Astro does NOT use 600 (semibold) - use 500 (medium) or 700 (bold) instead\n */\nexport const typography = {\n fontFamily: {\n /** Heading font: Sora (Zendir Brand Standard) */\n heading: '\"Sora\", \"Roboto\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", \"Helvetica Neue\", Arial, sans-serif',\n /** Primary font: Public Sans (Zendir Brand Standard) */\n primary: '\"Public Sans\", \"Roboto\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", \"Helvetica Neue\", Arial, sans-serif',\n /** Monospace font: Roboto Mono for data/code */\n mono: '\"Roboto Mono\", \"SF Mono\", \"Consolas\", \"Liberation Mono\", monospace',\n },\n fontSize: {\n // Compact sizes for dense UIs (cards, badges, data labels)\n micro: '0.5625rem', // 9px - very tight spaces\n xxs: '0.625rem', // 10px - compact labels\n // Standard sizes\n xs: '0.75rem', // 12px - small text, body3\n sm: '0.875rem', // 14px - body2\n base: '1rem', // 16px - body1\n md: '1.125rem', // 18px - h5/h6\n lg: '1.25rem', // 20px - h3/h4\n xl: '1.5rem', // 24px - h2\n xxl: '2.125rem', // 34px - h1\n xxxl: '3rem', // 48px - display2\n display: '3.75rem', // 60px - display1\n },\n /**\n * Font weights per AstroUXDS specification\n * Only 300, 400, 500, 700 are officially supported\n */\n fontWeight: {\n light: 300,\n normal: 400,\n regular: 400, // Alias for normal\n medium: 500,\n bold: 700,\n // DEPRECATED: semibold is not in Astro spec, use medium (500) instead\n /** @deprecated Use medium (500) instead - Astro spec only supports 300, 400, 500, 700 */\n semibold: 500,\n },\n lineHeight: {\n tight: 1.25,\n normal: 1.5,\n relaxed: 1.75,\n },\n} as const;\n\nexport const shadows = {\n none: 'none',\n sm: '0 1px 2px rgba(0, 0, 0, 0.3)',\n md: '0 2px 8px rgba(0, 0, 0, 0.3)',\n lg: '0 4px 16px rgba(0, 0, 0, 0.3)',\n xl: '0 8px 32px rgba(0, 0, 0, 0.4)',\n glow: '0 0 20px rgba(77, 172, 255, 0.4)',\n} as const;\n\nexport const animation = {\n fast: '150ms ease',\n normal: '250ms ease',\n slow: '400ms ease',\n} as const;\n\n// CSS Custom Properties generator\nexport function generateCSSVariables(mode: 'dark' | 'light' = 'dark'): string {\n const bg = colors.background[mode];\n const txt = colors.text[mode];\n const bdr = colors.border[mode];\n \n return `\n:root {\n /* Status Colors */\n --zendir-status-critical: ${colors.status.critical};\n --zendir-status-serious: ${colors.status.serious};\n --zendir-status-caution: ${colors.status.caution};\n --zendir-status-normal: ${colors.status.normal};\n --zendir-status-standby: ${colors.status.standby};\n --zendir-status-off: ${colors.status.off};\n \n /* Background */\n --zendir-bg-base: ${bg.base};\n --zendir-bg-surface: ${bg.surface};\n --zendir-bg-elevated: ${bg.elevated};\n --zendir-bg-overlay: ${bg.overlay};\n \n /* Text */\n --zendir-text-primary: ${txt.primary};\n --zendir-text-secondary: ${txt.secondary};\n --zendir-text-tertiary: ${txt.tertiary};\n --zendir-text-muted: ${txt.muted};\n \n /* Accent */\n --zendir-accent-primary: ${colors.accent.primary};\n --zendir-accent-secondary: ${colors.accent.secondary};\n --zendir-accent-tertiary: ${colors.accent.tertiary};\n \n /* Border */\n --zendir-border-default: ${bdr.default};\n --zendir-border-muted: ${bdr.muted};\n --zendir-border-focus: ${bdr.focus};\n \n /* Spacing */\n --zendir-spacing-xs: ${spacing.xs};\n --zendir-spacing-sm: ${spacing.sm};\n --zendir-spacing-md: ${spacing.md};\n --zendir-spacing-lg: ${spacing.lg};\n --zendir-spacing-xl: ${spacing.xl};\n --zendir-spacing-xxl: ${spacing.xxl};\n \n /* Border Radius */\n --zendir-radius-sm: ${borderRadius.sm};\n --zendir-radius-md: ${borderRadius.md};\n --zendir-radius-lg: ${borderRadius.lg};\n --zendir-radius-xl: ${borderRadius.xl};\n --zendir-radius-full: ${borderRadius.full};\n \n /* Typography - AstroUXDS Compliant */\n --zendir-font-primary: ${typography.fontFamily.primary};\n --zendir-font-mono: ${typography.fontFamily.mono};\n --zendir-font-size-micro: ${typography.fontSize.micro};\n --zendir-font-size-xxs: ${typography.fontSize.xxs};\n --zendir-font-size-xs: ${typography.fontSize.xs};\n --zendir-font-size-sm: ${typography.fontSize.sm};\n --zendir-font-size-base: ${typography.fontSize.base};\n --zendir-font-size-md: ${typography.fontSize.md};\n --zendir-font-size-lg: ${typography.fontSize.lg};\n --zendir-font-size-xl: ${typography.fontSize.xl};\n --zendir-font-size-xxl: ${typography.fontSize.xxl};\n --zendir-font-weight-light: ${typography.fontWeight.light};\n --zendir-font-weight-normal: ${typography.fontWeight.normal};\n --zendir-font-weight-medium: ${typography.fontWeight.medium};\n --zendir-font-weight-bold: ${typography.fontWeight.bold};\n \n /* Shadows */\n --zendir-shadow-sm: ${shadows.sm};\n --zendir-shadow-md: ${shadows.md};\n --zendir-shadow-lg: ${shadows.lg};\n --zendir-shadow-xl: ${shadows.xl};\n --zendir-shadow-glow: ${shadows.glow};\n \n /* Animation */\n --zendir-animation-fast: ${animation.fast};\n --zendir-animation-normal: ${animation.normal};\n --zendir-animation-slow: ${animation.slow};\n}\n`.trim();\n}\n\nexport default {\n colors,\n spacing,\n borderRadius,\n typography,\n shadows,\n animation,\n generateCSSVariables,\n};\n"],"names":[],"mappings":"AAOO,MAAM,SAAS;AAAA;AAAA,EAEpB,QAAQ;AAAA,IACN,UAAU;AAAA,IACV,SAAS;AAAA,IACT,SAAS;AAAA,IACT,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,KAAK;AAAA,EAAA;AAAA;AAAA,EAIP,iBAAiB;AAAA,IACf,UAAU;AAAA,IACV,SAAS;AAAA,IACT,SAAS;AAAA,IACT,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,KAAK;AAAA,EAAA;AAAA;AAAA,EAIP,mBAAmB;AAAA,IACjB,UAAU;AAAA,IACV,SAAS;AAAA,IACT,SAAS;AAAA,IACT,QAAQ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AAA,+BACZ,UAAU,MAAM;AAAA,6BAClB,UAAU,IAAI;AAAA;AAAA,EAEzC,KAAA;AACF;AAEA,MAAA,QAAe;AAAA,EACb;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/tokens/index.ts"],"sourcesContent":["/**\n * @zendir/ui - Design Tokens\n * \n * Exportable design tokens for use in CSS and JavaScript.\n * Based on Astro UX Design System.\n */\n\nexport const colors = {\n // Status Colors (Dark Theme)\n status: {\n critical: '#ff3838',\n serious: '#ffb302',\n caution: '#fce83a',\n normal: '#56f000',\n standby: '#2dccff',\n off: '#a4abb6',\n },\n \n // Status Colors (Light Theme - Fill)\n statusLightFill: {\n critical: '#ff2a04',\n serious: '#ffaf3d',\n caution: '#fad800',\n normal: '#00e200',\n standby: '#64d9ff',\n off: '#7b8089',\n },\n \n // Status Colors (Light Theme - Border)\n statusLightBorder: {\n critical: '#661102',\n serious: '#664618',\n caution: '#645600',\n normal: '#005a00',\n standby: '#285766',\n off: '#3c3e42',\n },\n \n // Background Colors\n background: {\n dark: {\n base: '#101923',\n surface: '#1b2d3e',\n elevated: '#243647',\n overlay: 'rgba(0, 0, 0, 0.7)',\n },\n light: {\n base: '#f5f6f9',\n surface: '#ffffff',\n elevated: '#ffffff',\n overlay: 'rgba(0, 0, 0, 0.5)',\n },\n },\n \n // Text Colors\n text: {\n dark: {\n primary: '#ffffff',\n secondary: '#9ea7ad',\n tertiary: '#6b7175',\n muted: '#52595f',\n },\n light: {\n primary: '#1b2d3e',\n secondary: '#4c5a67',\n tertiary: '#7a8891',\n muted: '#a4adb5',\n },\n },\n \n // Accent Colors\n accent: {\n primary: '#4dacff',\n secondary: '#3d8ddb',\n tertiary: '#2e6eb3',\n },\n \n // Border Colors\n border: {\n dark: {\n default: '#3c4b5a',\n muted: '#2b3d4e',\n focus: '#4dacff',\n },\n light: {\n default: '#c4c8cc',\n muted: '#e1e4e8',\n focus: '#4dacff',\n },\n },\n} as const;\n\nexport const spacing = {\n xxs: '2px',\n xs: '4px',\n sm: '8px',\n smd: '12px',\n md: '16px',\n mdl: '20px',\n lg: '24px',\n xl: '32px',\n xxl: '48px',\n} as const;\n\nexport const borderRadius = {\n none: '0',\n xs: '1px',\n sm: '2px',\n md: '4px',\n lg: '8px',\n /**\n * 12px. Sized for surfaces (Container, Card, SidePanel). Matches the\n * value already in use across zendir-ui components and the operator's\n * LandingPage. Was 16px in earlier docs — corrected here so the JS\n * tokens and the auto-generated CSS variables agree.\n */\n xl: '12px',\n full: '9999px',\n} as const;\n\n/**\n * Typography tokens following AstroUXDS Design System\n * @see https://www.astrouxds.com/foundations/typography/\n * \n * Font weights per Astro spec: 300 (Light), 400 (Regular), 500 (Medium), 700 (Bold)\n * Note: Astro does NOT use 600 (semibold) - use 500 (medium) or 700 (bold) instead\n */\nexport const typography = {\n fontFamily: {\n /** Heading font: Sora (Zendir Brand Standard) */\n heading: '\"Sora\", \"Roboto\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", \"Helvetica Neue\", Arial, sans-serif',\n /** Primary font: Public Sans (Zendir Brand Standard) */\n primary: '\"Public Sans\", \"Roboto\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", \"Helvetica Neue\", Arial, sans-serif',\n /** Monospace font: Roboto Mono for data/code */\n mono: '\"Roboto Mono\", \"SF Mono\", \"Consolas\", \"Liberation Mono\", monospace',\n },\n /**\n * Convenience numeric scale used by ~300+ existing zendir-ui components\n * via `tokens.typography.fontSize.*`. Density-tuned for data-rich UIs.\n *\n * For semantically-named typographic styles (display1/2, h1-h6, body1-3,\n * control1) use the `display` / `heading` / `body` / `control` preset\n * objects on `<ThemeProvider>` instead — those follow the canonical\n * AstroUXDS scale.\n */\n fontSize: {\n // Compact sizes for dense UIs (cards, badges, data labels)\n micro: '0.5625rem', // 9px - very tight spaces\n xxs: '0.625rem', // 10px - compact labels\n xs: '0.625rem', // 10px - compact (alias of xxs, kept for back-compat)\n sm: '0.75rem', // 12px - body 3\n base: '0.875rem', // 14px - body 2\n md: '0.875rem', // 14px - body 2 (alias of base)\n lg: '1rem', // 16px - body 1\n xl: '1.25rem', // 20px - heading 3/4\n xxl: '1.5rem', // 24px - heading 2\n xxxl: '2.125rem', // 34px - heading 1\n display: '3.75rem', // 60px - display 1\n },\n /**\n * Font weights per AstroUXDS specification\n * Only 300, 400, 500, 700 are officially supported\n */\n fontWeight: {\n light: 300,\n normal: 400,\n regular: 400, // Alias for normal\n medium: 500,\n bold: 700,\n // DEPRECATED: semibold is not in Astro spec, use medium (500) instead\n /** @deprecated Use medium (500) instead - Astro spec only supports 300, 400, 500, 700 */\n semibold: 500,\n },\n lineHeight: {\n tight: 1.25,\n normal: 1.5,\n relaxed: 1.75,\n },\n} as const;\n\nexport const shadows = {\n none: 'none',\n sm: '0 1px 2px rgba(0, 0, 0, 0.3)',\n md: '0 2px 8px rgba(0, 0, 0, 0.3)',\n lg: '0 4px 16px rgba(0, 0, 0, 0.3)',\n xl: '0 8px 32px rgba(0, 0, 0, 0.4)',\n glow: '0 0 20px rgba(77, 172, 255, 0.4)',\n} as const;\n\nexport const animation = {\n fast: '150ms ease',\n normal: '250ms ease',\n slow: '400ms ease',\n} as const;\n\n// ============================================================================\n// CSS Custom Properties generator\n//\n// Single source of truth for the tokens.css file. Run via\n// `npm run build:tokens` (scripts/build-tokens.ts) — it imports this file\n// and writes the result to src/tokens/tokens.css.\n//\n// Two callable surfaces:\n// • generateCSSVariables(mode) — single :root block for one mode\n// (legacy, kept for backward-compat)\n// • generateCSSStylesheet() — full tokens.css equivalent with\n// mode-invariant block + dark + light\n// [data-theme=\"…\"] overrides. This is\n// what scripts/build-tokens.ts uses.\n// ============================================================================\n\n/**\n * Build a CSS rule body for the mode-invariant tokens (status, accent,\n * spacing, radius, typography, shadows, animation). These don't change\n * between light/dark — they're shared.\n */\nfunction buildInvariantBlock(): string {\n return [\n ' /* ============================================================',\n ' * STATUS COLORS (Astro UX Compliant)',\n ' * ============================================================ */',\n ` --zendir-status-critical: ${colors.status.critical};`,\n ` --zendir-status-serious: ${colors.status.serious};`,\n ` --zendir-status-caution: ${colors.status.caution};`,\n ` --zendir-status-normal: ${colors.status.normal};`,\n ` --zendir-status-standby: ${colors.status.standby};`,\n ` --zendir-status-off: ${colors.status.off};`,\n '',\n ' /* Light-theme status fill colors */',\n ` --zendir-status-critical-light: ${colors.statusLightFill.critical};`,\n ` --zendir-status-serious-light: ${colors.statusLightFill.serious};`,\n ` --zendir-status-caution-light: ${colors.statusLightFill.caution};`,\n ` --zendir-status-normal-light: ${colors.statusLightFill.normal};`,\n ` --zendir-status-standby-light: ${colors.statusLightFill.standby};`,\n ` --zendir-status-off-light: ${colors.statusLightFill.off};`,\n '',\n ' /* Light-theme status border colors */',\n ` --zendir-status-critical-border: ${colors.statusLightBorder.critical};`,\n ` --zendir-status-serious-border: ${colors.statusLightBorder.serious};`,\n ` --zendir-status-caution-border: ${colors.statusLightBorder.caution};`,\n ` --zendir-status-normal-border: ${colors.statusLightBorder.normal};`,\n ` --zendir-status-standby-border: ${colors.statusLightBorder.standby};`,\n ` --zendir-status-off-border: ${colors.statusLightBorder.off};`,\n '',\n ' /* ============================================================',\n ' * ACCENT COLORS',\n ' * ============================================================ */',\n ` --zendir-accent-primary: ${colors.accent.primary};`,\n ` --zendir-accent-secondary: ${colors.accent.secondary};`,\n ` --zendir-accent-tertiary: ${colors.accent.tertiary};`,\n '',\n ' /* ============================================================',\n ' * SPACING',\n ' * ============================================================ */',\n ` --zendir-spacing-xs: ${spacing.xs};`,\n ` --zendir-spacing-sm: ${spacing.sm};`,\n ` --zendir-spacing-md: ${spacing.md};`,\n ` --zendir-spacing-lg: ${spacing.lg};`,\n ` --zendir-spacing-xl: ${spacing.xl};`,\n ` --zendir-spacing-xxl: ${spacing.xxl};`,\n '',\n ' /* ============================================================',\n ' * BORDER RADIUS',\n ' * ============================================================ */',\n ` --zendir-radius-none: ${borderRadius.none};`,\n ` --zendir-radius-sm: ${borderRadius.sm};`,\n ` --zendir-radius-md: ${borderRadius.md};`,\n ` --zendir-radius-lg: ${borderRadius.lg};`,\n ` --zendir-radius-xl: ${borderRadius.xl};`,\n ` --zendir-radius-full: ${borderRadius.full};`,\n '',\n ' /* ============================================================',\n ' * TYPOGRAPHY',\n ' * Public Sans leads body, Sora leads headings, Roboto is the',\n ' * AstroUXDS-compliant fallback. OS-native fonts complete the chain.',\n ' * @see https://www.astrouxds.com/foundations/typography/',\n ' * ============================================================ */',\n ` --zendir-font-primary: ${typography.fontFamily.primary};`,\n ` --zendir-font-heading: ${typography.fontFamily.heading};`,\n ` --zendir-font-mono: ${typography.fontFamily.mono};`,\n '',\n ' /* Font sizes (rem-based, AstroUXDS scale) */',\n ` --zendir-font-size-micro: ${typography.fontSize.micro};`,\n ` --zendir-font-size-xxs: ${typography.fontSize.xxs};`,\n ` --zendir-font-size-xs: ${typography.fontSize.xs};`,\n ` --zendir-font-size-sm: ${typography.fontSize.sm};`,\n ` --zendir-font-size-base: ${typography.fontSize.base};`,\n ` --zendir-font-size-md: ${typography.fontSize.md};`,\n ` --zendir-font-size-lg: ${typography.fontSize.lg};`,\n ` --zendir-font-size-xl: ${typography.fontSize.xl};`,\n ` --zendir-font-size-xxl: ${typography.fontSize.xxl};`,\n ` --zendir-font-size-xxxl: ${typography.fontSize.xxxl};`,\n ` --zendir-font-size-display: ${typography.fontSize.display};`,\n '',\n ' /* Font weights — AstroUXDS supports only 300/400/500/700 */',\n ` --zendir-font-weight-light: ${typography.fontWeight.light};`,\n ` --zendir-font-weight-normal: ${typography.fontWeight.normal};`,\n ` --zendir-font-weight-medium: ${typography.fontWeight.medium};`,\n ` --zendir-font-weight-bold: ${typography.fontWeight.bold};`,\n '',\n ' /* Line heights */',\n ` --zendir-line-height-tight: ${typography.lineHeight.tight};`,\n ` --zendir-line-height-normal: ${typography.lineHeight.normal};`,\n ` --zendir-line-height-relaxed: ${typography.lineHeight.relaxed};`,\n '',\n ' /* ============================================================',\n ' * SHADOWS',\n ' * ============================================================ */',\n ` --zendir-shadow-none: ${shadows.none};`,\n ` --zendir-shadow-sm: ${shadows.sm};`,\n ` --zendir-shadow-md: ${shadows.md};`,\n ` --zendir-shadow-lg: ${shadows.lg};`,\n ` --zendir-shadow-xl: ${shadows.xl};`,\n ` --zendir-shadow-glow: ${shadows.glow};`,\n '',\n ' /* ============================================================',\n ' * ANIMATION',\n ' * ============================================================ */',\n ` --zendir-animation-fast: ${animation.fast};`,\n ` --zendir-animation-normal: ${animation.normal};`,\n ` --zendir-animation-slow: ${animation.slow};`,\n ].join('\\n');\n}\n\n/** Build the mode-specific block (background + text + border). */\nfunction buildModeBlock(mode: 'dark' | 'light'): string {\n const bg = colors.background[mode];\n const txt = colors.text[mode];\n const bdr = colors.border[mode];\n return [\n ` --zendir-bg-base: ${bg.base};`,\n ` --zendir-bg-surface: ${bg.surface};`,\n ` --zendir-bg-elevated: ${bg.elevated};`,\n ` --zendir-bg-overlay: ${bg.overlay};`,\n '',\n ` --zendir-text-primary: ${txt.primary};`,\n ` --zendir-text-secondary: ${txt.secondary};`,\n ` --zendir-text-tertiary: ${txt.tertiary};`,\n ` --zendir-text-muted: ${txt.muted};`,\n '',\n ` --zendir-border-default: ${bdr.default};`,\n ` --zendir-border-muted: ${bdr.muted};`,\n ` --zendir-border-focus: ${bdr.focus};`,\n ].join('\\n');\n}\n\n/**\n * Single-mode generator. Emits one `:root { … }` block with the\n * mode-invariant tokens AND the chosen mode's bg/text/border.\n *\n * Useful for runtime injection — `<style>` tags written by SSR helpers\n * that target a single mode.\n */\nexport function generateCSSVariables(mode: 'dark' | 'light' = 'dark'): string {\n return [\n ':root {',\n buildInvariantBlock(),\n '',\n ` /* ${mode === 'dark' ? 'Dark' : 'Light'}-theme color overrides */`,\n buildModeBlock(mode),\n '}',\n ].join('\\n');\n}\n\n/**\n * Full stylesheet generator. Emits the complete tokens.css equivalent —\n * mode-invariant `:root` block plus `:root, [data-theme=\"dark\"]` and\n * `[data-theme=\"light\"]` mode overrides. This is what scripts/build-tokens.ts\n * writes to src/tokens/tokens.css.\n */\nexport function generateCSSStylesheet(): string {\n return [\n '/**',\n ' * @zendir/ui — CSS Design Tokens',\n ' *',\n ' * AUTO-GENERATED from src/tokens/index.ts. DO NOT EDIT BY HAND.',\n ' * Regenerate with: npm run build:tokens',\n ' *',\n ' * Usage:',\n \" * @import '@zendir/ui/tokens/css';\",\n ' * .my-component { background: var(--zendir-bg-surface); }',\n ' */',\n '',\n ':root {',\n buildInvariantBlock(),\n '}',\n '',\n '/* ============================================================',\n ' * DARK THEME (default)',\n ' * ============================================================ */',\n ':root,',\n '[data-theme=\"dark\"] {',\n buildModeBlock('dark'),\n '}',\n '',\n '/* ============================================================',\n ' * LIGHT THEME',\n ' * ============================================================ */',\n '[data-theme=\"light\"] {',\n buildModeBlock('light'),\n '}',\n '',\n ].join('\\n');\n}\n\nexport default {\n colors,\n spacing,\n borderRadius,\n typography,\n shadows,\n animation,\n generateCSSVariables,\n generateCSSStylesheet,\n};\n"],"names":[],"mappings":"AAOO,MAAM,SAAS;AAAA;AAAA,EAEpB,QAAQ;AAAA,IACN,UAAU;AAAA,IACV,SAAS;AAAA,IACT,SAAS;AAAA,IACT,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,KAAK;AAAA,EAAA;AAAA;AAAA,EAIP,iBAAiB;AAAA,IACf,UAAU;AAAA,IACV,SAAS;AAAA,IACT,SAAS;AAAA,IACT,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,KAAK;AAAA,EAAA;AAAA;AAAA,EAIP,mBAAmB;AAAA,IACjB,UAAU;AAAA,IACV,SAAS;AAAA,IACT,SAAS;AAAA,IACT,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,KAAK;AAAA,EAAA;AAAA;AAAA,EAIP,YAAY;AAAA,IACV,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,SAAS;AAAA,MACT,UAAU;AAAA,MACV,SAAS;AAAA,I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