styled-components 2.3.3-0 → 2.4.1

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.
Files changed (88) hide show
  1. package/CHANGELOG.md +10 -1
  2. package/README.md +0 -62
  3. package/dist/styled-components.es.js +37 -593
  4. package/dist/styled-components.js +84 -590
  5. package/dist/styled-components.min.js +2 -2
  6. package/lib/constructors/constructWithOptions.js +45 -0
  7. package/lib/constructors/css.js +27 -0
  8. package/lib/constructors/injectGlobal.js +37 -0
  9. package/lib/constructors/keyframes.js +46 -0
  10. package/lib/constructors/styled.js +26 -0
  11. package/lib/hoc/withTheme.js +129 -0
  12. package/lib/index.js +94 -0
  13. package/lib/models/BrowserStyleSheet.js +189 -0
  14. package/lib/models/ComponentStyle.js +129 -0
  15. package/lib/models/InlineStyle.js +81 -0
  16. package/lib/models/ServerStyleSheet.js +168 -0
  17. package/lib/models/StyleSheet.js +200 -0
  18. package/lib/models/StyleSheetManager.js +64 -0
  19. package/lib/models/StyledComponent.js +344 -0
  20. package/lib/models/StyledNativeComponent.js +262 -0
  21. package/lib/models/ThemeProvider.js +172 -0
  22. package/lib/native/index.js +67 -0
  23. package/lib/no-parser/css.js +19 -0
  24. package/lib/no-parser/flatten.js +98 -0
  25. package/lib/no-parser/index.js +97 -0
  26. package/lib/no-parser/stringifyRules.js +16 -0
  27. package/lib/primitives/index.js +67 -0
  28. package/lib/test/utils.js +124 -0
  29. package/lib/types.js +10 -0
  30. package/lib/utils/create-broadcast.js +53 -0
  31. package/lib/utils/createWarnTooManyClasses.js +24 -0
  32. package/lib/utils/determineTheme.js +17 -0
  33. package/lib/utils/domElements.js +11 -0
  34. package/lib/utils/escape.js +20 -0
  35. package/lib/utils/extractCompsFromCSS.js +23 -0
  36. package/lib/utils/flatten.js +58 -0
  37. package/lib/utils/generateAlphabeticName.js +20 -0
  38. package/lib/utils/getComponentName.js +11 -0
  39. package/lib/utils/interleave.js +13 -0
  40. package/lib/utils/isStyledComponent.js +11 -0
  41. package/lib/utils/isTag.js +11 -0
  42. package/lib/utils/nonce.js +10 -0
  43. package/lib/utils/once.js +17 -0
  44. package/lib/utils/stringifyRules.js +31 -0
  45. package/lib/utils/validAttr.js +33 -0
  46. package/lib/vendor/glamor/hash.js +69 -0
  47. package/lib/vendor/postcss/at-rule.js +158 -0
  48. package/lib/vendor/postcss/comment.js +88 -0
  49. package/lib/vendor/postcss/container.js +859 -0
  50. package/lib/vendor/postcss/css-syntax-error.js +252 -0
  51. package/lib/vendor/postcss/declaration.js +130 -0
  52. package/lib/vendor/postcss/input.js +194 -0
  53. package/lib/vendor/postcss/lazy-result.js +416 -0
  54. package/lib/vendor/postcss/list.js +94 -0
  55. package/lib/vendor/postcss/node.js +656 -0
  56. package/lib/vendor/postcss/parse.js +40 -0
  57. package/lib/vendor/postcss/parser.js +502 -0
  58. package/lib/vendor/postcss/postcss.js +291 -0
  59. package/lib/vendor/postcss/processor.js +223 -0
  60. package/lib/vendor/postcss/result.js +204 -0
  61. package/lib/vendor/postcss/root.js +136 -0
  62. package/lib/vendor/postcss/rule.js +137 -0
  63. package/lib/vendor/postcss/stringifier.js +336 -0
  64. package/lib/vendor/postcss/stringify.js +16 -0
  65. package/lib/vendor/postcss/terminal-highlight.js +49 -0
  66. package/lib/vendor/postcss/tokenize.js +272 -0
  67. package/lib/vendor/postcss/vendor.js +56 -0
  68. package/lib/vendor/postcss/warn-once.js +13 -0
  69. package/lib/vendor/postcss/warning.js +121 -0
  70. package/lib/vendor/postcss-nested/index.js +85 -0
  71. package/lib/vendor/postcss-safe-parser/parse.js +25 -0
  72. package/lib/vendor/postcss-safe-parser/safe-parser.js +113 -0
  73. package/native/index.js +1 -1
  74. package/no-parser.js +2 -0
  75. package/package.json +14 -11
  76. package/primitives/index.js +2 -0
  77. package/src/models/StyledComponent.js +18 -5
  78. package/src/utils/validAttr.js +19 -588
  79. package/typings/styled-components.d.ts +2 -1
  80. package/dist/styled-components-no-parser.cjs.js +0 -2370
  81. package/dist/styled-components-no-parser.es.js +0 -2355
  82. package/dist/styled-components-primitives.cjs.js +0 -5506
  83. package/dist/styled-components-primitives.es.js +0 -5495
  84. package/dist/styled-components.cjs.js +0 -2295
  85. package/dist/styled-components.native.js +0 -5506
  86. package/no-parser/package.json +0 -7
  87. package/primitives/package.json +0 -7
  88. package/src/models/.StyledNativeComponent.js.swp +0 -0
package/CHANGELOG.md CHANGED
@@ -6,7 +6,16 @@ All notable changes to this project will be documented in this file. If a contri
6
6
 
7
7
  ## Unreleased
8
8
 
9
- - N/A
9
+ -
10
+
11
+ ## [v2.4.0] - 2017-12-22
12
+
13
+ - remove some extra information from the generated hash that can differ between build environments ([see #1381](https://github.com/styled-components/styled-components/pull/1381))
14
+
15
+ ## [v2.3.3] - 2017-12-20
16
+
17
+ - Fix the attr filtering optimization removed in v2.3.2; bundle size improvement, thanks to [@probablyup](https://github.com/probablyup) (see [#1377](https://github.com/styled-components/styled-components/pull/1377))
18
+ - Move last bits of docs from the README to the website, thanks to [@Carryon](https://github.com/Carryon), [@SaraVieira](https://github.com/SaraVieira) and [@JamesJefferyUK](https://github.com/JamesJefferyUK)
10
19
 
11
20
  ## [v2.3.2] - 2017-12-19
12
21
 
package/README.md CHANGED
@@ -74,74 +74,12 @@ This is what you'll see in your browser:
74
74
  </a>
75
75
  </div>
76
76
 
77
- ## Syntax highlighting
78
-
79
- The one thing you lose when writing CSS in template literals is syntax highlighting. We're working hard on making proper syntax highlighting happening in all editors. We currently have support for Atom, Visual Studio Code, WebStorm, and soon Sublime Text.
80
-
81
- This is what it looks like when properly highlighted:
82
-
83
- <img alt="Syntax highlighted styled component" src="http://imgur.com/k7h45c3.jpg" height="150px" />
84
-
85
- ### Atom
86
-
87
- [**@gandm**](https://github.com/gandm), the creator of `language-babel`, has added support for `styled-components` in Atom!
88
-
89
- To get proper syntax highlighting, all you have to do is install and use the `language-babel` package for your JavaScript files!
90
-
91
- ### Sublime Text
92
-
93
- There is an [open PR](https://github.com/babel/babel-sublime/pull/289) by [@garetmckinley](https://github.com/garetmckinley) to add support for `styled-components` to `babel-sublime`! (if you want the PR to land, feel free to 👍 the initial comment to let the maintainers know there's a need for this!)
94
-
95
- As soon as that PR is merged and a new version released, all you'll have to do is install and use `babel-sublime` to highlight your JavaScript files!
96
-
97
- ### Visual Studio Code
98
-
99
- [**@gandm**](https://github.com/gandm)'s language-babel has been ported to VSCode under the name [Babel JavaScript](https://marketplace.visualstudio.com/items?itemName=mgmcdermott.vscode-language-babel) by [Michael McDermott](https://twitter.com/michaelgmcd). It provides the same all-in-one solution for Babel syntax highlighting with styled-components included.
100
-
101
- If you would like to keep your current JavaScript syntax highlighting, you can use the [vscode-styled-components](https://github.com/styled-components/vscode-styled-components) extension to provide styled-components syntax highlighting inside your Javascript files. You can install it as usual from the [Marketplace](https://marketplace.visualstudio.com/items?itemName=jpoissonnier.vscode-styled-components).
102
-
103
- ### VIM / NeoVim
104
-
105
- The [`vim-styled-components`](https://github.com/fleischie/vim-styled-components) plugin gives you syntax highlighting inside your Javascript files. Install it with your usual plugin manager like [Plug](https://github.com/junegunn/vim-plug), [Vundle](https://github.com/VundleVim/Vundle.vim), [Pathogen](https://github.com/tpope/vim-pathogen), etc.
106
-
107
- Also if you're looking for an awesome javascript syntax package you can never go wrong with [YAJS.vim](https://github.com/othree/yajs.vim).
108
-
109
- ### WebStorm, IntelliJ IDEA, PhpStorm, PyCharm, and RubyMine
110
-
111
- The [`webstorm-styled-components`](https://github.com/styled-components/webstorm-styled-components) plugin adds code completion and highlighting for CSS properties and values in the template strings. And it also provides code completion and navigation for JavaScript symbols in the interpolations. You can install it from the IDE: go to `Preferences | Plugins` and search for `Styled Components`.
112
-
113
- ### Other Editors
114
-
115
- We could use your help to get syntax highlighting support to other editors! If you want to start working on syntax highlighting for your editor, open an issue to let us know.
116
-
117
- ## Code completions and error reporting
118
-
119
- Along with syntax highlighting, you can install the [TypeScript styled plugin](https://github.com/Microsoft/typescript-styled-plugin) to get error reporting and code completion for styled components in your editor. The plugin supports styled components in both JavaScript and TypeScript files, and works in Visual Studio Code, Sublime, and Atom.
120
-
121
77
  ## Built with `styled-components`
122
78
 
123
79
  A lot of hard work goes into community libraries, projects, and guides. A lot of them make it easier to get started or help you with your next project! There’s also a whole lot of interesting apps and sites that people have built using styled-components.
124
80
 
125
81
  Make sure to head over to [awesome-styled-components](https://github.com/styled-components/awesome-styled-components) to see them all! And please contribute and add your own work to the list so others can find it.
126
82
 
127
- ## Alternative Installation Methods
128
-
129
- If you're not using a module bundler or not using `npm` as your package manager, we also have a global ("UMD") build!
130
-
131
- You can use that via the `unpkg` CDN to get `styled-components`, the URL is `https://unpkg.com/styled-components/dist/styled-components.min.js`.
132
-
133
- To install `styled-components` with bower you'd do:
134
-
135
- ```
136
- bower install styled-components=https://unpkg.com/styled-components/dist/styled-components.min.js
137
- ```
138
-
139
- To use it from your HTML, add this at the bottom of your `index.html`, and you'll have access to the global `window.styled` variable:
140
-
141
- ```HTML
142
- <script src="https://unpkg.com/styled-components/dist/styled-components.min.js" type="text/javascript"></script>
143
- ```
144
-
145
83
  ## Contributing
146
84
 
147
85
  If you want to contribute to `styled-components` please see our [contributing and community guidelines](./CONTRIBUTING.md), they'll help you get set up locally and explain the whole process.