1pub mod arbitrary;
42pub mod classes;
43pub mod color;
44pub mod config;
45pub mod custom_variant;
46pub mod dark_mode;
47pub mod error;
48pub mod gradients;
49pub mod performance;
50pub mod responsive;
51pub mod theme;
52pub mod theme_new;
53pub mod utils;
54pub mod utilities;
55pub mod validation;
56
57#[cfg(test)]
58mod property_tests;
59
60#[cfg(test)]
61mod api_stability;
62
63#[cfg(test)]
64mod week18_documentation_tests;
65
66#[cfg(test)]
67mod week19_testing_qa_tests;
68
69#[cfg(test)]
70mod week20_release_prep_tests;
71
72pub use arbitrary::{ArbitraryValue, ArbitraryValueError, ArbitraryValueUtilities};
74pub use classes::{ClassBuilder, ClassSet};
75pub use color::Color;
76pub use config::{BuildConfig, TailwindConfig};
77pub use custom_variant::{CustomVariant, CustomVariantManager, CustomVariantType};
78pub use dark_mode::{DarkModeVariant, DarkModeVariantError, DarkModeVariantUtilities};
79pub use error::{Result, TailwindError};
80pub use gradients::{Gradient, GradientDirection, GradientError, GradientStop, GradientUtilities};
81pub use performance::{CacheStats, ClassCache, OptimizationLevel, PerformanceOptimizer};
82pub use responsive::{
83 AlignItems, Breakpoint, FlexDirection, FlexWrap, JustifyContent, Responsive, ResponsiveBuilder,
84 ResponsiveFlex, ResponsiveGrid, ResponsiveValue, State,
85};
86pub use theme::{BorderRadius, BoxShadow, Spacing, Theme, ThemeValue};
87pub use theme_new::{
88 AnimationScale, BorderScale, FontFamily, FontSizeScale, FontWeightScale, LetterSpacingScale,
89 LineHeightScale, ShadowScale, SpacingScale, SpacingSize, Theme as NewTheme, ThemePreset,
90 ThemeVariant, ThemedComponent, TypographyScale,
91};
92pub use utilities::*;
93pub use validation::{ClassValidator, ErrorReporter, ValidationError, ValidationRules};
94
95#[cfg(test)]
96mod tests {
97 mod sync_api_tests;
98
99 use super::*;
100
101 #[test]
102 fn test_version_constant() {
103 assert!(!VERSION.is_empty());
104 assert!(VERSION.chars().any(|c| c.is_ascii_digit()));
105 }
106
107 #[test]
108 fn test_defaults() {
109 assert_eq!(defaults::DEFAULT_THEME, "default");
110 assert_eq!(defaults::DEFAULT_BREAKPOINT, Breakpoint::Base);
111 assert_eq!(defaults::default_color(), Color::Blue);
112 }
113}
114
115pub struct TailwindBuilder;
117pub struct CssOptimizer;
118
119impl Default for TailwindBuilder {
120 fn default() -> Self {
121 Self::new()
122 }
123}
124
125impl TailwindBuilder {
126 pub fn new() -> Self {
127 Self
128 }
129
130 pub fn scan_source(self, _path: &std::path::Path) -> Self {
131 self
132 }
133
134 pub fn output_css(self, _path: &std::path::Path) -> Self {
135 self
136 }
137
138 pub fn config_file(self, _path: &std::path::Path) -> Self {
139 self
140 }
141
142 pub fn enable_tree_shaking(self) -> Self {
143 self
144 }
145
146 pub fn enable_minification(self) -> Self {
147 self
148 }
149
150 pub fn enable_source_maps(self) -> Self {
151 self
152 }
153
154 pub fn build(self) -> Result<()> {
155 Ok(())
156 }
157}
158
159impl Default for CssOptimizer {
160 fn default() -> Self {
161 Self::new()
162 }
163}
164
165impl CssOptimizer {
166 pub fn new() -> Self {
167 Self
168 }
169
170 pub fn input_file(self, _path: &std::path::Path) -> Self {
171 self
172 }
173
174 pub fn output_file(self, _path: &std::path::Path) -> Self {
175 self
176 }
177
178 pub fn optimization_level(self, _level: u8) -> Self {
179 self
180 }
181
182 pub fn remove_unused_classes(self) -> Self {
183 self
184 }
185
186 pub fn minify(self) -> Self {
187 self
188 }
189
190 pub fn generate_source_maps(self) -> Self {
191 self
192 }
193
194 pub fn optimize(self) -> Result<()> {
195 Ok(())
196 }
197}
198
199pub const VERSION: &str = env!("CARGO_PKG_VERSION");
201
202pub mod defaults {
204 use super::*;
205
206 pub const DEFAULT_THEME: &str = "default";
207 pub const DEFAULT_BREAKPOINT: Breakpoint = Breakpoint::Base;
208 pub const DEFAULT_SPACING: Spacing = Spacing::Rem(1.0);
209
210 pub fn default_color() -> Color {
211 Color::Blue
212 }
213}
214