Releases: CAAPIM/themer
Release list
v2.3.0
v2.2.2
v2.2.1
v2.2.0
<a name"2.2.0">
2.2.0 (2017-03-14)
Features
- pass resolved styles as "classes" prop for quick access (3518e3be)
v2.1.2
v2.1.1
v2.1.0
v2.0.0
<a name"2.0.0">
2.0.0 (2017-02-27)
Breaking Changes
-
remove unused property from
Themerclass:theme. We useThemerinstance for many themed components, each with different themes, therefore we can't storethemeas a property ofThemer. -
remove unused property from
Themerclass:id. There is no need to assign a uuid to Themer instances if we only instantiate one per project. -
remove unused methods from
Themerclass:getVariants,getThemeVariables,getThemeStyles,getThemeId,setTheme. No need for these convenience methods if nothemeinstance is stored inThemer. -
BREAKING CHANGE: remove unused method from
Themerclass:render. As a developer I want to use the same rendering mechanism, no matter if I am usingThemerfor styling or not. After wrapping the snippet via the themer decorator, the developer can render the themed snippet simply by executing it. -
remove unused method from
Themerclass:resolveMiddleware. Middlewares are resolved when callingresolveAttributes, therefore the convenience methodresolveMiddlewareis not needed. -
Add new method
resolve()toThemeclass to get resolved theme, instead of different methods forvariants,stylesandvariables. TheThemeclass now owns the theme structure, whileThemeronly owns middlewares. If the theme structure should change in the future, only theThemewould need to be refactored. -
BREAKING CHANGE: in method
Themer.resolveAttributes, the entire resolved theme is now passed tothis.middleware.resolve(), this allows to keep the knowledge of the theme structure within theThemeclass alone. This is a breaking change for all themer-based middlewares likeca-ui-react-themer-jss. -
fix decorator to allow themeing multiple snippets. Before the fix, if the decorator was used on two snippets consecutively, they would both get the theme from the second snippet.
-
fix variants props mapper to allow multiple prop checks per variant class.
-
create new utility function
mapThemePropsthat mapsthemeandvariantsto snippet props. -
BREAKING CHANGE: variants are mapped into snippet props from the decorator and not from
Themeras the latter doesn't have access to props. This is a breaking change for other themer-based decorators likeca-ui-react-themer(f16057b0)
v1.1.1
<a name"1.1.1">
1.1.1 (2017-02-25)
Bug Fixes
- pass global variables when resolving theme variables (a00bc8aa)