# Changelog
All notable changes to Rustyle will be documented in this file.
## [0.3.0] - 2025-01-27
### Added
#### Complete Core Infrastructure
- **Full CSS Modules Implementation** - Complete file system loading, build-time compilation, scoped class names, and `css_module!` proc macro
- **Complete Reactive Styling** - Full `style_signal!` macro with embedded Rust expression parsing and automatic signal dependency extraction
- **Complete `style_with_vars!` Macro** - Full CSS variable parsing, scoping, and runtime updates
- **Complete Critical CSS Extraction** - Real HTML/DOM parsing, selector matching, and route-based CSS splitting
- **Complete Tree Shaking** - Unused CSS removal with component-level analysis and dead rule elimination
#### Enhanced Developer Experience
- **Intelligent Error System** - Enhanced error messages with source locations, visual code snippets, multiple fix suggestions, and quick-fix code actions
- **Expanded Linting System** - 50+ accessibility, performance, and best practice rules with auto-fix capabilities
- **Advanced Debugging Tools** - Enhanced style inspector with real-time visualization and performance profiling
- **Improved Macro Error Messages** - Context-aware errors with code snippets and helpful suggestions
#### Expanded Component Library
- **SelectStyle** - Type-safe select/dropdown component with variants, sizes, and states
- **TextareaStyle** - Textarea component with validation states
- **BadgeStyle** - Badge component with variants and sizes
- **AlertStyle** - Alert component with semantic variants
- **ProgressStyle** - Progress bar component with variants
- **SpinnerStyle** - Loading spinner component
- **ModalStyle** - Modal/dialog component with variants and sizes
- **TableStyle** - Table component with variants and header styling
- **TooltipStyle** - Tooltip component with positions and variants
- **DropdownStyle** - Dropdown menu component with variants and sizes
- **TabsStyle** - Tabs component with active state styling
- **PaginationStyle** - Pagination component with variants and sizes
#### Performance Optimizations
- **DashMap Integration** - Thread-safe style registry using DashMap for concurrent access
- **Optimized Style Registry** - Improved performance for style lookups and registrations
- **Enhanced CSS Processing** - Better caching and lazy evaluation
#### Enhanced Linting System
- **50+ Linting Rules** - Comprehensive accessibility, performance, and best practice checks
- **Auto-fix Capabilities** - Automatic fixing of common CSS issues (missing semicolons, whitespace, etc.)
- **Linting Statistics** - Detailed stats on errors, warnings, and info messages
- **CI/CD Integration Ready** - Structured output for automated checks
#### Design Token Enhancements
- **Token Validation** - Validate design tokens for consistency and correctness
- **Token Inheritance** - Merge and extend tokens with inheritance support
- **Runtime Token Updates** - Update tokens at runtime with validation
#### Testing & Quality
- **Comprehensive Test Suite** - 35+ integration tests covering components, modules, optimization, error handling, linting, and token validation
- **Component Tests** - Tests for all component variants, sizes, and states
- **Optimization Tests** - Tests for critical CSS extraction and tree shaking
- **Error Handling Tests** - Tests for property validation and suggestions
### Changed
- **Version updated to 0.3.0** - Major release with breaking improvements
- **Style Registry** - Migrated from Mutex<HashMap> to DashMap for better concurrent performance
- **Error Types** - Enhanced with multiple suggestions, source locations, and context
- **Linting Rules** - Expanded from basic checks to 50+ comprehensive rules
### Fixed
- Improved CSS module class name scoping
- Fixed reactive expression parsing in style_signal! macro
- Enhanced error message formatting with proper context
- Improved tree shaking selector matching
## [0.2.0] - 2025-12-04
### Added
#### Design System & Tokens
- Comprehensive design token system with colors, spacing, typography, shadows, borders, and animations
- Type-safe color scales (50-950) with semantic colors
- Spacing scale with predefined values (xs, sm, md, lg, xl, 2xl, etc.)
- Typography system with font families, sizes, weights, and line heights
- Shadow tokens for elevation system
- Border tokens for consistent borders and radius
- Animation tokens for durations and easing functions
#### Component System
- `ButtonStyle` component with variants (Primary, Secondary, Success, Error, Warning, Info) and sizes
- `CardStyle` component with elevation system
- `InputStyle` component with validation states
- Component trait system for extensibility
#### Modern CSS Features
- View Transitions API support with `view_transition!` macro
- Advanced selectors: `:has()`, `:is()`, `:where()` with type-safe builders
- `@scope` rule support with `scope_style!` macro
- `@starting-style` support with `starting_style!` macro
- CSS Grid with subgrid support
- Enhanced container queries with type-safe builders
#### Theming
- `ThemeManager` for multi-theme support
- Theme transitions with `apply_theme_with_transition()`
- System theme detection with `register_system_theme()`
- Design token integration in themes
#### Performance Optimizations
- Critical CSS extraction framework
- Advanced CSS minification using lightningcss
- Dead code elimination structure
- CSS optimization utilities
#### Reactive Styling
- Full Leptos signal integration with `ReactiveStyleBuilder`
- `create_reactive_style()` helper for signal-based styles
- Animation state management with `AnimationStateMachine`
- State-driven animations
#### Developer Experience
- Enhanced error messages with suggestions (`RustyleError`)
- Hot Module Replacement (HMR) for development (requires `dev` feature)
- Debugging tools: `StyleInspector` and `DebugInfo`
- CSS linting with `CssLinter` (accessibility, performance, best practices)
- Testing utilities: `CssAssertions` and `StyleValidator`
- Property suggestion system with Levenshtein distance
#### Accessibility
- Focus management with `FocusStyle` and `register_focus_styles()`
- Reduced motion support with `register_reduced_motion()`
- Color contrast checking with WCAG AA/AAA validation
- `ContrastLinter` for accessibility checks
#### Advanced Features
- Style composition system with `StyleComposition`, `StyleMixin`, and `MixinRegistry`
- Runtime style generation with `DynamicStyleBuilder`
- CSS modules support (basic structure)
#### Layout Systems
- Enhanced CSS Grid builder with `GridTemplate`, `GridArea`, and `Subgrid`
- `FlexGap` for consistent flexbox spacing
- Type-safe `ContainerQuery` builder
### Changed
- `Theme` struct now uses `DesignTokens` instead of individual fields
- Enhanced type safety throughout the codebase
- Improved error messages with context and suggestions
### Fixed
- Better handling of temporary values in component styles
- Improved macro error messages
### Documentation
- Comprehensive README with all new features
- Migration guide from 0.1.0 to 0.2.0
- New examples: design_tokens, components, theming_advanced, accessibility
- Updated API documentation
## [0.1.0] - Initial Release
### Added
- Basic CSS-in-Rust solution for Leptos 0.8.14
- Compile-time CSS processing
- Automatic scoped styles
- SSR/CSR support
- Type-safe CSS utilities
- CSS nesting support
- CSS variables and theming
- Basic reactive styling
- Container queries
- Media queries
- Keyframe animations
- Cascade layers