Releases: CAAPIM/themer
v2.3.0
v2.2.2
v2.2.1
v2.2.0
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
Themer
class:theme
. We useThemer
instance for many themed components, each with different themes, therefore we can't storetheme
as a property ofThemer
. -
remove unused property from
Themer
class:id
. There is no need to assign a uuid to Themer instances if we only instantiate one per project. -
remove unused methods from
Themer
class:getVariants
,getThemeVariables
,getThemeStyles
,getThemeId
,setTheme
. No need for these convenience methods if notheme
instance is stored inThemer
. -
BREAKING CHANGE: remove unused method from
Themer
class:render
. As a developer I want to use the same rendering mechanism, no matter if I am usingThemer
for 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
Themer
class:resolveMiddleware
. Middlewares are resolved when callingresolveAttributes
, therefore the convenience methodresolveMiddleware
is not needed. -
Add new method
resolve()
toTheme
class to get resolved theme, instead of different methods forvariants
,styles
andvariables
. TheTheme
class now owns the theme structure, whileThemer
only owns middlewares. If the theme structure should change in the future, only theTheme
would 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 theTheme
class 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
mapThemeProps
that mapstheme
andvariants
to snippet props. -
BREAKING CHANGE: variants are mapped into snippet props from the decorator and not from
Themer
as the latter doesn't have access to props. This is a breaking change for other themer-based decorators likeca-ui-react-themer
(f16057b0)