styled-components 4.1.0-rehydrate → 4.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +66 -1
- package/dist/styled-components-macro.cjs.js +196 -152
- package/dist/styled-components-macro.cjs.js.map +1 -1
- package/dist/styled-components-macro.esm.js +196 -152
- package/dist/styled-components-macro.esm.js.map +1 -1
- package/dist/styled-components.browser.cjs.js +187 -139
- package/dist/styled-components.browser.cjs.js.map +1 -1
- package/dist/styled-components.browser.esm.js +187 -139
- package/dist/styled-components.browser.esm.js.map +1 -1
- package/dist/styled-components.cjs.js +187 -139
- package/dist/styled-components.cjs.js.map +1 -1
- package/dist/styled-components.esm.js +187 -139
- package/dist/styled-components.esm.js.map +1 -1
- package/dist/styled-components.js +479 -204
- package/dist/styled-components.js.map +1 -1
- package/dist/styled-components.min.js +1 -1
- package/dist/styled-components.min.js.map +1 -1
- package/native/dist/styled-components.native.cjs.js +152 -99
- package/native/dist/styled-components.native.cjs.js.map +1 -1
- package/native/dist/styled-components.native.esm.js +151 -100
- package/native/dist/styled-components.native.esm.js.map +1 -1
- package/package.json +27 -25
- package/primitives/dist/styled-components-primitives.cjs.js +152 -99
- package/primitives/dist/styled-components-primitives.cjs.js.map +1 -1
- package/primitives/dist/styled-components-primitives.esm.js +151 -100
- package/primitives/dist/styled-components-primitives.esm.js.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,8 +6,69 @@ _The format is based on [Keep a Changelog](http://keepachangelog.com/) and this
|
|
|
6
6
|
|
|
7
7
|
## Unreleased
|
|
8
8
|
|
|
9
|
+
## [v4.1.3] - 2018-12-17
|
|
10
|
+
|
|
11
|
+
- Under the hood code cleanup of the Babel macro, by [@lucleray](https://github.com/lucleray) (see [#2286](https://github.com/styled-components/styled-components/pull/2286))
|
|
12
|
+
|
|
13
|
+
## [v4.1.2] - 2018-11-28
|
|
14
|
+
|
|
15
|
+
- Fix function-form attrs to receive the full execution context (including theme) (see [#2210](https://github.com/styled-components/styled-components/pull/2210))
|
|
16
|
+
|
|
17
|
+
- Adjust `innerRef` deprecation warning to not be fired if wrapping a custom component, since that underlying component may not be on forwardRef yet and actually using the prop (see [#2211](https://github.com/styled-components/styled-components/pull/2211))
|
|
18
|
+
|
|
19
|
+
- Expose the `ThemeConsumer` and `ThemeContext` exports for the native and primitives entries (see [#2217](https://github.com/styled-components/styled-components/pull/2217))
|
|
20
|
+
|
|
21
|
+
- Remove `createGlobalStyle` multimount warning; Concurrent and Strict modes intentionally render the same component multiple times, which causes this warning to be triggered always even when usage is correct in the application (see [#2216](https://github.com/styled-components/styled-components/pull/2216))
|
|
22
|
+
|
|
23
|
+
- Folded components are now targettable via component selector as in v3 if you used the old `.extend` API (see [#2239](https://github.com/styled-components/styled-components/pull/2239))
|
|
24
|
+
|
|
25
|
+
- Don't treat uppercased strings as tag-like components and don't filter out props from them (see [#2225](https://github.com/styled-components/styled-components/pull/2225))
|
|
26
|
+
|
|
27
|
+
## [v4.1.1] - 2018-11-12
|
|
28
|
+
|
|
29
|
+
- Put back the try/catch guard around a part of the flattener that sometimes receives undetectable SFCs (fixes an errand hard error in an edge case)
|
|
30
|
+
|
|
31
|
+
## [v4.1.0] - 2018-11-12
|
|
32
|
+
|
|
9
33
|
- Performance optimization for fully static (no function interpolation) styled-components by avoiding using `ThemeConsumer` since it isn't necessary, by [@mxstbr](https://github.com/mxstbr) (see [#2166](https://github.com/styled-components/styled-components/pull/2166))
|
|
10
34
|
|
|
35
|
+
- Allow disabling "speedy" mode via global `SC_DISABLE_SPEEDY` variable, by [@devrelm](https://github.com/devrelm) (see [#2185](https://github.com/styled-components/styled-components/pull/2185))
|
|
36
|
+
|
|
37
|
+
To make use of this, you can either set `SC_DISABLE_SPEEDY` in your app's entry file or use something like `webpack.DefinePlugin` to do it at build time:
|
|
38
|
+
|
|
39
|
+
```js
|
|
40
|
+
webpack.DefinePlugin({
|
|
41
|
+
SC_DISABLE_SPEEDY: true,
|
|
42
|
+
});
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
- Attrs can now be passed a function (see [#2200](https://github.com/styled-components/styled-components/pull/2200)); thanks [@oliverlaz](https://github.com/oliverlaz) for providing an early PoC PR for this!
|
|
46
|
+
|
|
47
|
+
e.g.:
|
|
48
|
+
|
|
49
|
+
```js
|
|
50
|
+
styled.div.attrs(props => ({ 'aria-title': props.title }))``;
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
- Fix the `warnTooManyClasses` dev helper not being totally dead code eliminated in production (see [#2200](https://github.com/styled-components/styled-components/pull/2200))
|
|
54
|
+
|
|
55
|
+
- Deprecate functions as object keys for object-form attrs (see [#2200](https://github.com/styled-components/styled-components/pull/2200))
|
|
56
|
+
|
|
57
|
+
e.g.:
|
|
58
|
+
|
|
59
|
+
```js
|
|
60
|
+
styled.div.attrs({ 'aria-title': props => props.title })``; // bad
|
|
61
|
+
styled.div.attrs(props => ({ 'aria-title': props.title }))``; // good
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Support for this will be removed in styled-components v5. The primary impetus behind this change is to eliminate confusion around basic functions vs styled-components vs React components provided as values in the object-form attrs constructor, each of which has different handling behaviors. The single outer function to receive the props and then return a props object is conceptually simpler.
|
|
65
|
+
|
|
66
|
+
- The standalone CDN build is now UMD-compliant and can be used with RequireJS, etc.
|
|
67
|
+
|
|
68
|
+
- Add pixels to unitless numbers when object interpolation is used, by [@Fer0x](https://github.com/Fer0x) (see [#2173](https://github.com/styled-components/styled-components/pull/2173))
|
|
69
|
+
|
|
70
|
+
- Trying to interpolate a non-styled component into CSS is now a hard error, rather than a warning (see [#2173](https://github.com/styled-components/styled-components/pull/2173))
|
|
71
|
+
|
|
11
72
|
## [v4.0.3] - 2018-10-30
|
|
12
73
|
|
|
13
74
|
- Interpolating a styled component into a string now returns the static component selector (emotion cross-compat)
|
|
@@ -864,7 +925,11 @@ _v3.3.1 was skipped due to a bad deploy._
|
|
|
864
925
|
|
|
865
926
|
- Fixed compatibility with other react-broadcast-based systems (like `react-router` v4)
|
|
866
927
|
|
|
867
|
-
[unreleased]: https://github.com/styled-components/styled-components/compare/v4.
|
|
928
|
+
[unreleased]: https://github.com/styled-components/styled-components/compare/v4.1.3...master
|
|
929
|
+
[v4.1.2]: https://github.com/styled-components/styled-components/compare/v4.1.2...v4.1.3
|
|
930
|
+
[v4.1.2]: https://github.com/styled-components/styled-components/compare/v4.1.1...v4.1.2
|
|
931
|
+
[v4.1.1]: https://github.com/styled-components/styled-components/compare/v4.1.0...v4.1.1
|
|
932
|
+
[v4.1.0]: https://github.com/styled-components/styled-components/compare/v4.0.3...v4.1.0
|
|
868
933
|
[v4.0.3]: https://github.com/styled-components/styled-components/compare/v4.0.2...v4.0.3
|
|
869
934
|
[v4.0.2]: https://github.com/styled-components/styled-components/compare/v4.0.1...v4.0.2
|
|
870
935
|
[v4.0.1]: https://github.com/styled-components/styled-components/compare/v4.0.0...v4.0.1
|