Commit Graph

3063 Commits

Author SHA1 Message Date
Evan Jacobs
c9579c3edb compress all dist outputs 2020-01-13 21:57:54 -05:00
Evan Jacobs
6ec9dd2e09 Update README.md 2020-01-13 18:19:38 -05:00
Evan Jacobs
53bc31f8fb add note on TS 2020-01-13 18:17:02 -05:00
Evan Jacobs
60d02ee0b4 v5.0.0 v5.0.0 2020-01-13 13:13:32 -05:00
Evan Jacobs
147b0e9a1f Merge pull request #2863 from styled-components/v5
v5
2020-01-13 13:05:27 -05:00
Evan Jacobs
aca9186920 allocate cGS instances from the stylesheet instead (#2947)
* remove an unnecessary allocation in cGS

* allocate cGS instances from the stylesheet instead

fixes #2913

Previously the cGS instance count was managed locally in the cGS factory,
which works fine client-side but will never be reset properly for
server-side rendering (in this case, each cGS factory should be reset
to an instance count of 0 per rendering run.)
2020-01-13 13:00:47 -05:00
Evan Jacobs
fe2a2ccfa4 adjust rehydration regex to handle deeply-nested MQs (#2949)
fixes #2946
2020-01-06 16:29:03 -05:00
Evan Jacobs
d227ec9bdc Add componentId to "Over 200 classes..." warning (#2948)
* Add componentId to "Over 200 classes..." warning

Two minor changes:
- Add optional `componentId` parameter to `src/utils/createWarnTooManyClasses.js` that is then rendered in the warning if it exists.
- Pass in `componentId` in `src/models/StyledComponent.js`

Implements #2776

(cherry picked from commit c1c02425dcd5367bccd543332b8833d29e38b4ee)

* Remove `$FlowFixMe`

 This was likely added during rebase / was brought over from the master branch.

(cherry picked from commit 0314552eafc090b63d4bbe2f0f907a2e468b4a30)

* minor adjustments

Co-authored-by: Bee Ellis <44533466+hegelocampus@users.noreply.github.com>
2020-01-06 16:27:54 -05:00
Evan Jacobs
dff9510b0b inline stylis-rule-sheet (#2940)
fixes #2874

(and saves some bytes)
2020-01-03 12:06:24 -05:00
Evan Jacobs
37f472da70 v5.0.0-rc.3 v5.0.0-rc.3 2019-12-29 22:54:20 -05:00
Evan Jacobs
cd3ef89673 refactor stylis management (#2936)
* emit differentiated dynamic hashes for subtrees with different stylis plugins

* reorganize hashing files to avoid a cycle

* prehash the stylis plugin function bodies to make later hashing faster

* look for plugin.name in stylisPlugins for uniqueness

* throw an error instead of a dev-time warning if stylis plugins aren't named

minification can introduce the issue, so a dev warning isn't sufficient

* remove unused fallback code

* use stylis-plugin-rtl

* actually add the plugin

* just use phash

* cache djb2 seed
2019-12-29 22:35:55 -05:00
James Armenta
7ea065cba6 Expose version in API (#2888)
* Export bundle version

* Comment for version export

* Better version comment
2019-12-27 16:10:17 -05:00
Evan Jacobs
67ddce95fb run ci against v5 2019-12-25 23:15:06 -05:00
Evan Jacobs
bef7299b73 fix usage of nested stylesheetmanagers in SSR 2019-12-25 23:15:06 -05:00
Toru Kobayashi
9aaac333e9 use funding field instead of post install script (#2931) 2019-12-23 11:27:37 -05:00
Evan Jacobs
7e11092c7a switch back to mainline hoist-non-react-statics (#2934)
should fix #2930
2019-12-23 11:27:01 -05:00
Max Stoiber
9e29e497a1 Merge pull request #2898 from vepor/css-without-interpolations
Unnecessary flattening and interleave of css without interpolations
2019-12-02 10:34:44 +01:00
Luděk Vepřek
ffa7d5a895 Unnecessary flattening and interleave of css without interpolations 2019-12-02 09:46:26 +01:00
Jafar Rezaei
9b7a60c3f5 Make useTheme cleaner (#2879) 2019-11-30 18:05:25 -05:00
Max Stoiber
921e14f7af Merge pull request #2887 from styled-components/vulnerable-workflow
Remove vulnerable workflow
2019-11-21 08:56:45 +01:00
Kornel Dubieniecki
ce0b708c43 Remove vulnerable workflow 2019-11-20 22:27:33 +01:00
Evan Jacobs
50d1284518 v5.0.0-rc.2 v5.0.0-rc.2 2019-11-12 16:48:04 -05:00
Evan Jacobs
270d464a94 replace rehydration from CSSOM with progressive regex (#2872)
* replace rehydration from CSSOM with progressive regex

* lighter suppression comment, remove some unnecessary allocations
2019-11-12 16:42:44 -05:00
Max Stoiber
c914e00378 Merge pull request #2868 from styled-components/lekterable-patch-1
Update `inclusive organization` action to add contributors to a team and add a comment
2019-11-09 11:12:29 +01:00
Kornel Dubieniecki
6667e7bb0e Update main.yml 2019-11-09 10:12:16 +01:00
Max Stoiber
7a8c817574 Merge pull request #2867 from lekterable/master
Use 'Inclusive Organization' action to invite contributors to organization
2019-11-08 11:58:39 +01:00
Kornel Dubieniecki
ec9fa146c7 Update .github/workflows/main.yml
Co-Authored-By: Max Stoiber <contact@mxstbr.com>
2019-11-08 11:48:27 +01:00
Kornel Dubieniecki
4f96af7008 Create main.yml 2019-11-08 11:28:08 +01:00
Evan Jacobs
96ed2ec455 remove canary branch disclosure from README 2019-11-07 16:33:24 -05:00
Evan Jacobs
062cfca5a9 fix building benchmarks 2019-11-07 16:29:15 -05:00
Evan Jacobs
c11750e464 upgrade wsrun, its buggy output has been annoying me 2019-11-07 16:19:19 -05:00
Evan Jacobs
e4b7fd4e14 remove some rebasing artifacts 2019-11-07 16:14:03 -05:00
Samuli Ulmanen
e2e93a635e [styled-components] add ThemeProvider to Example (#2856) 2019-11-07 16:10:19 -05:00
Samuli Ulmanen
02aaba9b70 [styled-components] streaming ssr example to devServer (#2855) 2019-11-07 16:09:50 -05:00
Evan Jacobs
12a9f3c847 (v5) aggregate classNames passed via attrs (#2859)
* add failing test

* aggregate classNames passed via attrs

fixes #2839

Normally attrs fully override the previous value, but in the case of
className they're often composed additively and it's desired to retain
the previous value in a HOC or folding scenario.

* changelog entry [skip ci]

* add simple joining util

* add function signature
2019-11-07 16:03:00 -05:00
Evan Jacobs
df36f93b76 remove the theme usage dev-time check
this was also removed in a later v4 version but missed doing it here
2019-11-07 16:03:00 -05:00
Evan Jacobs
d2f4509254 fix a few missed cases where attrs were not preferred over props 2019-11-07 16:03:00 -05:00
Evan Jacobs
5485947008 v5.0.0-rc.1 2019-11-07 16:02:59 -05:00
Evan Jacobs
4ee67293c6 inline mixinDeep util (#2846)
* inline mixinDeep util

This will ensure the ES6 syntax gets transpiled properly

* inline MIT license from mixin-deep
2019-11-07 16:02:59 -05:00
Evan Jacobs
72a6c4193e v5.0.0-rc.0 2019-11-07 16:02:59 -05:00
Evan Jacobs
2c760a1890 disallow /ad/i in generated class names (#2837)
* disallow /ad/i in generated class names

fixes #2803

doing a simple replacement for these two characters when they're
preceded by a case-insensitive "a" character since many adblockers
use this as a hook

* simpler logic

* changelog entry
2019-11-07 16:02:59 -05:00
Evan Jacobs
c27a83a313 turn travis on (#2841) 2019-11-07 16:02:58 -05:00
Ole-Martin Bratteng
a7d85e0235 Update css-to-react-native to v3.0.0 (#2811) 2019-11-07 16:02:58 -05:00
Evan Jacobs
7541c004f9 replace merge-anything with mixin-deep (#2838)
Saves ~130 bytes
2019-11-07 16:02:58 -05:00
Evan Jacobs
5aeb3d218c alpha -> beta in readme 2019-11-07 16:02:57 -05:00
Evan Jacobs
6621b581f1 pin merge-anything to 2.2.x
in later versions they added functionality we don't need that would
just be bloat
2019-11-07 16:02:57 -05:00
Evan Jacobs
d2df615579 update minor deps 2019-11-07 16:02:57 -05:00
Evan Jacobs
9a39dd3537 shard cGS by runtime instance (#2824)
* shard cGS by runtime instance

fixes #2769

cGS has a different injection profile than typical components, in that
there is a single component ID for the global style and any number of
instances. This creates problems when rendering multiple of the same
cGS with different props, as it is a defacto singleton but we don't
enforce a single cGS instance at once...

Utilizing a simple sharding strategy will create duplicate styles, but
ensure that when instances are removed from the page they're taken out
of the stylesheet in the proper order such that previous still-live
instances will continue to function and not be removed as well.

* switch to useRef

* remove the explicit stringification
2019-11-07 16:02:57 -05:00
Ashrith Reddy
389b8155fb Adds object syntax to readme for documentation (#2826)
* Adds object syntax to readme for documentation

* Updates documentation text.

* removed unnecessary braces.

* Update README.md
2019-11-07 16:02:56 -05:00
Evan Jacobs
b61fbb1b42 Memoize theme (#2820)
Fix #2767
2019-11-07 16:02:56 -05:00