v3.0.0
Breaking Changes:
- Added a distinction between
colorsandthemes - Updated
defaultThemeprop to default tothemes.auto - Updated context with
theme(as active theme),color(as active color),themes(as object with supported themes), andcolor(as object with supported colors) - Removed
colorsfrom server-side and client-side package - Removed
getColors()
Other Changes:
- Added
'auto'theme - Added
themesfor server-side and client-side components - Added
colors.autooption that automatically determines color scheme based onprefers-color-schemeandundefinedfor server - Added feature to automatically update theme if
prefers-color-schemechanges - Added feature to automatically switch to the opposite color from whatever color is set by
'auto'mode - Added
localStorage.mock.jsandmatchMedia.mock.js - Added
ThemeAutoColorcomponent for tests - Added tests for functions in
theme.helper.js - Added tests for the
'auto'option - Added new tests + updated old ones
- Added
colorsobject totheme.helper.js - Added
flipThemeByColor() - Added prettier
- Updated inline script in
AntiFlickerScript - Moved
device.mock.jsto__tests__/mocksfolder - Moved
isServer()toenv.helper.js - Renamed
applyPreference()toapplyTheme() - Renamed
setPreference()tosaveTheme() - Renamed
getPreference()togetTheme()