Changelog
v1.1.3 — Enhanced Theming & Callback Improvements
Last updated April 29, 2025
Minor Changes
This release introduces enhanced theme flexibility and significantly improved consent callbacks with structured data responses.
✨ New Features
Comprehensive Theming Support
useColorSchemenow detects themes via the.darkclass ondocument.documentElement- Optional
colorSchemeparameter improves integration with existing theme systems - Full test suite added to validate dark/light/system theme switching
- Theme system now uses
@layer basefor better CSS encapsulation
Improved Consent Callbacks
- Callbacks now return structured and useful consent data
- Works consistently across offline, c15t, and backend-connected modes
- Callback responses now reflect user-selected preferences more clearly
🐛 Bug Fixes
- #203 4d47e21 – fix(core): callbacks not working in c15t mode. Thanks @KayleeWilliams!
- Fixed callbacks not firing in alternate modes (e.g., c15t)
useColorSchemenow correctly responds to:- System preference changes
- Document class changes (via MutationObserver)
- Improved error handling for environments missing
matchMedia - Removed unnecessary localStorage dependency for theme persistence
🏗️ Refactors
- Theme-related CSS is now consistently structured using
@layer base - Refined internal theme types to allow better extension/customization
- Simplified theme config to support nested object structure for banners and widgets
📚 Documentation
- Fixed broken example in offline mode – #187
- Updated configuration types to document new theme and colorScheme options
- Added detailed callback payload examples and behavior notes across client modes
- Enhanced API references and docs for:
onSetConsentand other lifecycle callbacks- Banner fetch event handler
🧪 Tests
Color Scheme Tests:
- System preference override
- Explicit theme override
- Document class detection
Callback Tests:
- Triggering across client modes
- Payload accuracy and structure
💥 Breaking Changes
- Removed localStorage theme fallback — rely on system preference or class
- Misconfigured theme props in c15t config may need to be adjusted
- Some fields (e.g.,
id) removed from callback data objects — now accessible via the response object
🔄 Migration Guide
Theme System Changes
localStorage theme fallback has been removed:
Callback Data Structure
Some fields have been moved in callback responses:
📦 Version Packages
Published via #205 by @github-actions
This release significantly enhances the theming capabilities and callback reliability of c15t, providing a more robust foundation for custom UI implementations and better integration with existing design systems.