- #2896
c02b1214
Thanks @Andarist! - Fixed an issue that prevented usingcontent: "element(name)"
. This is a valid special value and doesn't need to be quoted.
- #2819
bbad8c79
Thanks @nicksrandall! -exports
field has been added to thepackage.json
manifest. It limits what files can be imported from a package but we've tried our best to allow importing all the files that were considered to be a part of the public API.
- Updated dependencies [
bbad8c79
,bbad8c79
]:- @emotion/hash@0.9.0
- @emotion/memoize@0.8.0
- @emotion/unitless@0.8.0
- @emotion/utils@1.2.0
- #2727
26e4e3e8
Thanks @srmagura! - Changed the error message "Component selectors can only be used in conjunction with @emotion/babel-plugin" to reference the new SWC Emotion plugin which will support component selectors soon.
- #2572
5e81f213
Thanks @otakustay! - Changed theregistered
parameter to be declared as optional in the TypeScript definition to match the runtime requirement.
- #2700
d9357621
Thanks @arturmuller! - Fixed a false positive warning forcontent
properties that includedvar()
.
830dd0e6
#2279 Thanks @lucasweng! - Fixed the issue with incorrectly throwing errors on valid content values containingopen-quote
.
418daad9
#2264 Thanks @lucasweng! - Fix incorrectly throwing error on the gradient content values
c6431074
#1609 Thanks @tomsseisums! - ReworkedInterpolation
-related types. Correct types should now be provided to all flavours of Emotion.
5d692a6a
#1956 Thanks @eps1lon! - Upgradedcsstype
dependency to its v3. This is what we use to provide TypeScript typings for object styles. The upgrade should not affect any consuming code but it's worth mentioning if any edge case scenarios arise.
e3d7db87
#1732 Thanks @Andarist! - An additional semicolon is now inserted after interpolated arrays to cover cases when it doesn't have a trailing semi itself and thus breaking composition with styles coming after it.
8a896a31
#1611 Thanks @Andarist! - Throw error about invalid content property values instead of just logging error to the console.
5c55fd17
#1653 Thanks @Andarist! - Fix to what location generated source maps are pointing in case of composed styles.
-
a085003d
#1613 Thanks @Andarist! - Add missing#__PURE__
annotations -
Updated dependencies [
debaad9a
,9e998e37
]:- @emotion/utils@1.0.0
- Updated dependencies [
9c4ebc16
]:- @emotion/utils@1.0.0-rc.0
76e3dc4d
#2009 Thanks @Andarist! - Re-release latest prerelease version of this package as it has incorrectly been "downgraded" to 0.x version due to a bug in Changesets. This has caused problems because Emotion 10 had a newer 0.x release and thus version targeting Emotion 10 has been fetched on installs as it has been satisfying the specified dependency range.
- Updated dependencies [
debaad9a
]:- @emotion/utils@1.0.0-next.1
5d692a6a
#1956 Thanks @eps1lon! - Upgradedcsstype
dependency to its v3. This is what we use to provide TypeScript typings for object styles. The upgrade should not affect any consuming code but it's worth mentioning if any edge case scenarios arise.
- Updated dependencies [
9e998e37
]:- @emotion/utils@1.0.0-next.0
e3d7db87
#1732 Thanks @Andarist! - An additional semicolon is now inserted after interpolated arrays to cover cases when it doesn't have a trailing semi itself and thus breaking composition with styles coming after it.
f08ef5a3
#1726 Thanks @Andarist! - Removed leftover@emotion/react
import from type definition file.
c643107
#1609 Thanks @joltmode! - Reworked Interpolation-related types. Correct types should now be provided to all flavours of emotion.
5c55fd17
#1653 Thanks @Andarist! - Fix to what location generated source maps are pointing in case of composed styles.
8a896a31
#1611 Thanks @Andarist! - Throw error about invalid content property values instead of just logging error to the console.
-
a72e6dc0
#1501 Thanks @JakeGinnivan! - TypeScript types have been restructured. These changes:- Reduce build times when using emotion
- In many cases remove the need for manually specifying generic parameters for your emotion components.
If you encounter build issues after upgrade, try removing any manually specified generic types and let them be inferred. Otherwise refer to the breaking changes list below.
- useTheme added to EmotionTheming interface and can now create your own closed variation of withTheme. More information in the docs under the theming section.
- Union types as props are better supported and should be inferred properly
- Build times should be reduced significantly in larger projects.
-
withTheme can now have the Theme type specified when calling it. For example
withTheme<MyTheme>(MyComponent)
Breaking change: Generic argument changed, if you were specifying the ComponentType you will need to remove the generic parameter. Recommend following example setup in the TypeScript docs under theming section
-
css
function has been restricted to prevent passing of invalid types -
CreateStyled
functions no longer take a secondExtraProps
argument. Instead move it to after the create styled call. For examplestyled<typeof MyComponent, ExtraProps>(MyComponent)({})
tostyled(MyComponent)<ExtraProps>({})
-
StyledComponent
type no longer supports the third genericTheme
parameter. Instead add thetheme
prop to the firstProps
argument. For example:StyledComponent<Props, {}, MyTheme>
toStyledComponent<Props & { theme?: MyTheme }>
- Updated dependencies [
446e756
]:- @emotion/hash@0.8.0
4c62ae9
#1698 Thanks @Andarist! - Add LICENSE file- Updated dependencies [
4c62ae9
]:- @emotion/hash@0.7.4
- @emotion/memoize@0.7.4
- @emotion/unitless@0.7.5
- @emotion/utils@0.11.3
a55f3d49
#1581 Thanks @Andarist! - Don't cause invalid rule to be serialized when using object style with falsy value
3b7e2f2e
Thanks @mitchellhamilton! - Fix flow errors
10211951
#1553 Thanks @Andarist! - Add dev warning about keyframes being interpolated into plain strings.
57a767ea
#1560 Thanks @Andarist! - Fix composition of styles without a final semicolon in a declaration block
- Updated dependencies [c81c0033]:
- @emotion/hash@0.7.3
- @emotion/memoize@0.7.3
- c257d2a3 #1420 Thanks @Andarist! - Fix for opaque keyframes object being used as value for animation & animationName in object styles
- c0eb604d #1419 Thanks @mitchellhamilton! - Update build tool