diff --git a/.babelrc b/.babelrc
index 44678ba..189e946 100644
--- a/.babelrc
+++ b/.babelrc
@@ -1,9 +1,10 @@
{
presets: [
+ 'es2015',
'react',
],
plugins: [
- 'transform-es2015-modules-commonjs',
+ 'transform-flow-strip-types',
'transform-class-properties',
['transform-object-rest-spread', { useBuiltIns: true }],
]
diff --git a/.eslintrc b/.eslintrc
index da26acc..8a91a04 100644
--- a/.eslintrc
+++ b/.eslintrc
@@ -3,3 +3,6 @@ parser: babel-eslint
env:
jest: true
+
+globals:
+ ReactClass: true
diff --git a/README.md b/README.md
index e41cc1f..8975ca5 100644
--- a/README.md
+++ b/README.md
@@ -31,16 +31,21 @@ const PrimaryButton = styled(Button, {
Using base Style Sheet we can share classes between styled primitives.
```js
-import { Styled } from 'styled-jss'
-import injectSheet from 'react-jss'
+import { Styled, injectStyled } from 'styled-jss'
// Base styles, like a regular jss object.
const styled = Styled({
root: {
- margin: 10
+ margin: 10,
+ '& $baseButton': {
+ fontSize: 16
+ }
},
baseButton: {
- padding: 10
+ padding: 10,
+ '& + &': {
+ marginLeft; 10
+ }
}
})
@@ -58,20 +63,24 @@ const PrimaryButton = styled(NormalButton, {
// One can use classes AND styled primitives.
const MyComponent = ({classes}) => (
+
normal button
primary button
)
-const MyStyledComponent = injectSheet(styled.styles)(MyComponent)
+const MyStyledComponent = injectStyled(styled)(MyComponent)
```
### With custom JSS setup:
+`styled-jss` use [jss-preset-default](https://github.com/cssinjs/jss-preset-default) by default.
+But you can require `createStyled` and provide your custom jss instance.
+
```js
import { create as createJss } from 'jss'
import vendorPrefixer from 'jss-vendor-prefixer'
-import { createStyled } from 'styled-jss'
+import createStyled from 'styled-jss/createStyled'
const jss = createJss()
jss.use(vendorPrefixer())
diff --git a/package.json b/package.json
index a261d4b..48bd5bd 100644
--- a/package.json
+++ b/package.json
@@ -53,8 +53,9 @@
"babel-core": "^6.23.1",
"babel-eslint": "^7.2.2",
"babel-plugin-transform-class-properties": "^6.23.0",
- "babel-plugin-transform-es2015-modules-commonjs": "^6.23.0",
+ "babel-plugin-transform-flow-strip-types": "^6.22.0",
"babel-plugin-transform-object-rest-spread": "^6.23.0",
+ "babel-preset-es2015": "^6.24.1",
"babel-preset-react": "^6.23.0",
"eslint": "^3.13.0",
"eslint-config-airbnb": "^14.1.0",
@@ -78,5 +79,8 @@
"git add"
]
},
- "pre-commit": "lint:staged"
+ "pre-commit": [
+ "lint:staged",
+ "test"
+ ]
}
diff --git a/src/createStyled.js b/src/createStyled.js
new file mode 100644
index 0000000..b079d8a
--- /dev/null
+++ b/src/createStyled.js
@@ -0,0 +1,47 @@
+import styled from './styled'
+
+import type {
+ BaseStylesType,
+ ComponentStyleType,
+ StyledType,
+ StyledElementAttrsType,
+ StyledElementType,
+ TagNameOrStyledElementType
+} from './types'
+
+const createStyled = (jss: Function) => (
+ baseStyles: BaseStylesType = {}
+): StyledType => {
+ let staticSheet
+ let dynamicSheet
+
+ const mountSheets = () => {
+ if (!staticSheet) {
+ staticSheet = jss.createStyleSheet(baseStyles, {
+ meta: 'StaticBaseSheet',
+ }).attach()
+
+ dynamicSheet = jss.createStyleSheet({}, {
+ link: true,
+ meta: 'DynamicComponentSheet',
+ }).attach()
+ }
+
+ return {staticSheet, dynamicSheet}
+ }
+
+ return Object.assign((
+ tagNameOrStyledElement: TagNameOrStyledElementType,
+ ownStyle: ComponentStyleType
+ ): StyledElementType => {
+ const {tagName, style}: StyledElementAttrsType = typeof tagNameOrStyledElement === 'string'
+ ? {tagName: tagNameOrStyledElement, style: {}}
+ : tagNameOrStyledElement
+
+ const elementStyle = {...style, ...ownStyle}
+
+ return styled({tagName, baseStyles, elementStyle, mountSheets})
+ }, {mountSheets, styles: baseStyles})
+}
+
+export default createStyled
diff --git a/src/index.js b/src/index.js
index c1bf92a..deab007 100644
--- a/src/index.js
+++ b/src/index.js
@@ -1,116 +1,11 @@
-import {PureComponent, createElement} from 'react'
-import {create as createJss, getDynamicStyles} from 'jss'
+import {create as createJss} from 'jss'
import preset from 'jss-preset-default'
-import filterProps from './utils/filter-props'
-const jssDefault = createJss(preset())
+import createStyled from './createStyled'
-type StyledElementAttrsType = { tag: string, styles: Object }
-type StyledElementType = Function & StyledElementAttrsType
-type tagOrStyledElementTypeype = string | StyledElementType
-type StyledElementPropsType = {
- classes: Object,
- children: ?any,
- className: ?string,
-}
+const jss: Function = createJss(preset())
-const createStyled = (jss?: Function = jssDefault) => (baseStyles: Object = {}) => {
- let sheet
- let dynamicSheet
- let counter = 0
+export const Styled = createStyled(jss)
+export default Styled()
- const styled = (
- tagOrStyledElement: tagOrStyledElementTypeype,
- ownStyles: Object
- ): StyledElementType => {
- const {tag, styles}: StyledElementAttrsType = typeof tagOrStyledElement === 'string'
- ? {tag: tagOrStyledElement, styles: {}}
- : tagOrStyledElement
-
- const elementStyles = {...styles, ...ownStyles}
- const dynamicStyles = getDynamicStyles(elementStyles)
- const staticTag = `${tag}-${++counter}`
-
- return class StyledElement extends PureComponent {
- static tag = tag
-
- static styles = elementStyles
-
- props: StyledElementPropsType
-
- tagScoped = ''
-
- constructor(props) {
- super(props)
- this.tagScoped = `${tag}-${++counter}`
- }
-
- componentWillMount() {
- if (!sheet) {
- sheet = jss.createStyleSheet(baseStyles, {
- link: true,
- meta: 'StaticBaseSheet',
- }).attach()
-
- dynamicSheet = jss.createStyleSheet({}, {
- link: true,
- meta: 'DynamicComponentSheet',
- }).attach()
- }
-
- if (!sheet.getRule(staticTag)) {
- sheet.addRule(staticTag, elementStyles)
- }
-
- if (dynamicStyles && !dynamicSheet.getRule(this.tagScoped)) {
- dynamicSheet
- .detach()
- .addRule(this.tagScoped, dynamicStyles)
- dynamicSheet
- .update(this.tagScoped, this.props)
- .attach()
- .link()
- }
- }
-
- componentWillReceiveProps(nextProps: StyledElementPropsType) {
- if (dynamicStyles) {
- dynamicSheet.update(this.tagScoped, nextProps)
- }
- }
-
- componentWillUnmount() {
- dynamicSheet.deleteRule(this.tagScoped)
- }
-
- render() {
- if (!sheet) return null
-
- const {children, className, ...attrs} = this.props
-
- const props = filterProps(attrs)
- const tagClass = [
- sheet.classes[staticTag],
- dynamicSheet.classes[this.tagScoped],
- className,
- ]
- .filter(Boolean)
- .join(' ')
-
- return createElement(tag, {...props, className: tagClass}, children)
- }
- }
- }
-
- return Object.assign(styled, {styles: baseStyles})
-}
-
-const defaultStyledCreator = createStyled()
-const defaultStyled = defaultStyledCreator()
-
-export {
- createStyled,
- defaultStyledCreator as Styled,
-}
-
-export default defaultStyled
+export {default as injectStyled} from './injectStyled'
diff --git a/src/injectStyled.js b/src/injectStyled.js
new file mode 100644
index 0000000..c53d2d1
--- /dev/null
+++ b/src/injectStyled.js
@@ -0,0 +1,20 @@
+import {createElement} from 'react'
+
+import composeClasses from './utils/composeClasses'
+import type {StyledType} from './types'
+
+const injectStyled = (styled: StyledType) => (InnerComponent: ReactClass) => {
+ const {staticSheet, dynamicSheet} = styled.mountSheets()
+
+ const classNames = Object.keys({...staticSheet.classes, ...dynamicSheet.classes})
+
+ const classes = [...classNames]
+ .reduce((acc, name) => ({
+ ...acc,
+ [name]: composeClasses(staticSheet.classes[name], dynamicSheet.classes[name]),
+ }), {})
+
+ return (props: Object) => createElement(InnerComponent, {classes, ...props})
+}
+
+export default injectStyled
diff --git a/src/styled.js b/src/styled.js
new file mode 100644
index 0000000..4fba7c7
--- /dev/null
+++ b/src/styled.js
@@ -0,0 +1,83 @@
+import {PureComponent, createElement} from 'react'
+import {getDynamicStyles} from 'jss'
+
+import filterProps from './utils/filterProps'
+import composeClasses from './utils/composeClasses'
+import generateTagName from './utils/generateTagName'
+
+import type {
+ JssStaticSheet,
+ JssDynamicSheet,
+ ComponentStyleType,
+ StyledElementPropsType
+} from './types'
+
+type StyledArgs = {
+ tagName: string,
+ elementStyle: ComponentStyleType,
+ mountSheets: Function
+}
+
+const styled = ({tagName, elementStyle, mountSheets}: StyledArgs) => {
+ const dynamicStyle = getDynamicStyles(elementStyle)
+ const staticTagName = generateTagName(tagName)
+
+ return class StyledElement extends PureComponent {
+ static tagName: string = tagName
+ static style: ComponentStyleType = elementStyle
+
+ props: StyledElementPropsType
+
+ dynamicTagName = ''
+ staticSheet: JssStaticSheet
+ dynamicSheet: JssDynamicSheet
+
+ constructor(props: StyledElementPropsType) {
+ super(props)
+ if (!this.dynamicTagName) {
+ this.dynamicTagName = generateTagName(tagName)
+ }
+ }
+
+ componentWillMount() {
+ Object.assign(this, mountSheets())
+
+ if (!this.staticSheet.getRule(staticTagName)) {
+ this.staticSheet.addRule(staticTagName, elementStyle)
+ }
+
+ if (dynamicStyle && !this.dynamicSheet.getRule(this.dynamicTagName)) {
+ this.dynamicSheet
+ .detach()
+ .addRule(this.dynamicTagName, dynamicStyle)
+ this.dynamicSheet
+ .update(this.dynamicTagName, this.props)
+ .attach()
+ .link()
+ }
+ }
+
+ componentWillReceiveProps(nextProps: StyledElementPropsType) {
+ if (dynamicStyle) {
+ this.dynamicSheet.update(this.dynamicTagName, nextProps)
+ }
+ }
+
+ render() {
+ if (!this.staticSheet) return null
+
+ const {children, className, ...attrs} = this.props
+
+ const props = filterProps(attrs)
+ const tagClass = composeClasses(
+ this.staticSheet.classes[staticTagName],
+ this.dynamicSheet.classes[this.dynamicTagName],
+ className
+ )
+
+ return createElement(tagName, {...props, className: tagClass}, children)
+ }
+ }
+}
+
+export default styled
diff --git a/src/tests/App.jsx b/src/tests/App.jsx
index 9753c20..ab05e9a 100644
--- a/src/tests/App.jsx
+++ b/src/tests/App.jsx
@@ -1,7 +1,7 @@
import React from 'react'
+import type {StyledType} from '../types'
-
-export default (styled: Function) => {
+export default (styled: StyledType) => {
const App = styled('div', {
margin: 50,
})
diff --git a/src/tests/__snapshots__/index.spec.jsx.snap b/src/tests/__snapshots__/index.spec.jsx.snap
index 606a4df..7bb0a82 100644
--- a/src/tests/__snapshots__/index.spec.jsx.snap
+++ b/src/tests/__snapshots__/index.spec.jsx.snap
@@ -1,26 +1,26 @@
exports[`test renders correctly App with default Styled 1`] = `
+ className="div-14-0-9">
+ className="header-15-0-10">
+ className="h1-18-0-11">
Title
+ className="section-16-0-12">
+ className="section-17-0-16">
Another section
@@ -53,3 +53,34 @@ exports[`test renders correctly App with default styled 1`] = `
`;
+
+exports[`test renders correctly App with injectStyled 1`] = `
+
+
+
+
+
+
+
+
+
+
+`;
diff --git a/src/tests/index.spec.jsx b/src/tests/index.spec.jsx
index 928fd92..d00d1aa 100644
--- a/src/tests/index.spec.jsx
+++ b/src/tests/index.spec.jsx
@@ -1,7 +1,7 @@
import renderer from 'react-test-renderer'
import React from 'react'
-import styled, {Styled} from '../'
+import styled, {Styled, injectStyled} from '../'
import CreateApp from './App'
@@ -25,3 +25,22 @@ it('renders correctly App with default Styled', () => {
expect(tree).toMatchSnapshot()
})
+
+it('renders correctly App with injectStyled', () => {
+ const customStyled = Styled({
+ root: {
+ fontSize: 16
+ },
+ baseButton: {
+ color: 'red',
+ },
+ })
+
+ const App = CreateApp(customStyled)
+ const StyledApp = injectStyled(customStyled)(({classes}) => (
+
+ ))
+ const tree = renderer.create().toJSON()
+
+ expect(tree).toMatchSnapshot()
+})
diff --git a/src/types/index.js b/src/types/index.js
new file mode 100644
index 0000000..5c64838
--- /dev/null
+++ b/src/types/index.js
@@ -0,0 +1,19 @@
+export type JssStyles = Object
+export type JssStyle = Object
+export type JssStaticSheet = Object
+export type JssDynamicSheet = JssStaticSheet
+
+export type BaseStylesType = JssStyles
+export type ComponentStyleType = JssStyle
+export type StyledType = Function & {
+ mountSheets: Function,
+ styles: JssStyles
+}
+export type StyledElementAttrsType = {tagName: string, style: ComponentStyleType}
+export type StyledElementType = Function & StyledElementAttrsType
+export type TagNameOrStyledElementType = string | StyledElementType
+export type StyledElementPropsType = {
+ classes: Object,
+ children: ?any,
+ className: ?string,
+}
diff --git a/src/utils/composeClasses.js b/src/utils/composeClasses.js
new file mode 100644
index 0000000..03bd4e0
--- /dev/null
+++ b/src/utils/composeClasses.js
@@ -0,0 +1 @@
+export default (...args: any) => args.filter(Boolean).join(' ')
diff --git a/src/utils/filter-props.js b/src/utils/filterProps.js
similarity index 100%
rename from src/utils/filter-props.js
rename to src/utils/filterProps.js
diff --git a/src/utils/generateTagName.js b/src/utils/generateTagName.js
new file mode 100644
index 0000000..2f5dac1
--- /dev/null
+++ b/src/utils/generateTagName.js
@@ -0,0 +1,3 @@
+let tagNameCounter = 0
+
+export default (tagName: string) => `${tagName}-${++tagNameCounter}`
diff --git a/yarn.lock b/yarn.lock
index 9f1bd69..b9f8321 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -281,6 +281,24 @@ babel-helper-builder-react-jsx@^6.24.1:
babel-types "^6.24.1"
esutils "^2.0.0"
+babel-helper-call-delegate@^6.24.1:
+ version "6.24.1"
+ resolved "https://registry.yarnpkg.com/babel-helper-call-delegate/-/babel-helper-call-delegate-6.24.1.tgz#ece6aacddc76e41c3461f88bfc575bd0daa2df8d"
+ dependencies:
+ babel-helper-hoist-variables "^6.24.1"
+ babel-runtime "^6.22.0"
+ babel-traverse "^6.24.1"
+ babel-types "^6.24.1"
+
+babel-helper-define-map@^6.24.1:
+ version "6.24.1"
+ resolved "https://registry.yarnpkg.com/babel-helper-define-map/-/babel-helper-define-map-6.24.1.tgz#7a9747f258d8947d32d515f6aa1c7bd02204a080"
+ dependencies:
+ babel-helper-function-name "^6.24.1"
+ babel-runtime "^6.22.0"
+ babel-types "^6.24.1"
+ lodash "^4.2.0"
+
babel-helper-function-name@^6.24.1:
version "6.24.1"
resolved "https://registry.yarnpkg.com/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz#d3475b8c03ed98242a25b48351ab18399d3580a9"
@@ -298,6 +316,39 @@ babel-helper-get-function-arity@^6.24.1:
babel-runtime "^6.22.0"
babel-types "^6.24.1"
+babel-helper-hoist-variables@^6.24.1:
+ version "6.24.1"
+ resolved "https://registry.yarnpkg.com/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.24.1.tgz#1ecb27689c9d25513eadbc9914a73f5408be7a76"
+ dependencies:
+ babel-runtime "^6.22.0"
+ babel-types "^6.24.1"
+
+babel-helper-optimise-call-expression@^6.24.1:
+ version "6.24.1"
+ resolved "https://registry.yarnpkg.com/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.24.1.tgz#f7a13427ba9f73f8f4fa993c54a97882d1244257"
+ dependencies:
+ babel-runtime "^6.22.0"
+ babel-types "^6.24.1"
+
+babel-helper-regex@^6.24.1:
+ version "6.24.1"
+ resolved "https://registry.yarnpkg.com/babel-helper-regex/-/babel-helper-regex-6.24.1.tgz#d36e22fab1008d79d88648e32116868128456ce8"
+ dependencies:
+ babel-runtime "^6.22.0"
+ babel-types "^6.24.1"
+ lodash "^4.2.0"
+
+babel-helper-replace-supers@^6.24.1:
+ version "6.24.1"
+ resolved "https://registry.yarnpkg.com/babel-helper-replace-supers/-/babel-helper-replace-supers-6.24.1.tgz#bf6dbfe43938d17369a213ca8a8bf74b6a90ab1a"
+ dependencies:
+ babel-helper-optimise-call-expression "^6.24.1"
+ babel-messages "^6.23.0"
+ babel-runtime "^6.22.0"
+ babel-template "^6.24.1"
+ babel-traverse "^6.24.1"
+ babel-types "^6.24.1"
+
babel-helpers@^6.24.1:
version "6.24.1"
resolved "https://registry.yarnpkg.com/babel-helpers/-/babel-helpers-6.24.1.tgz#3471de9caec388e5c850e597e58a26ddf37602b2"
@@ -319,6 +370,12 @@ babel-messages@^6.23.0:
dependencies:
babel-runtime "^6.22.0"
+babel-plugin-check-es2015-constants@^6.22.0:
+ version "6.22.0"
+ resolved "https://registry.yarnpkg.com/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz#35157b101426fd2ffd3da3f75c7d1e91835bbf8a"
+ dependencies:
+ babel-runtime "^6.22.0"
+
babel-plugin-istanbul@^3.0.0:
version "3.1.2"
resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-3.1.2.tgz#11d5abde18425ec24b5d648c7e0b5d25cd354a22"
@@ -357,7 +414,91 @@ babel-plugin-transform-class-properties@^6.23.0:
babel-runtime "^6.22.0"
babel-template "^6.24.1"
-babel-plugin-transform-es2015-modules-commonjs@^6.23.0:
+babel-plugin-transform-es2015-arrow-functions@^6.22.0:
+ version "6.22.0"
+ resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz#452692cb711d5f79dc7f85e440ce41b9f244d221"
+ dependencies:
+ babel-runtime "^6.22.0"
+
+babel-plugin-transform-es2015-block-scoped-functions@^6.22.0:
+ version "6.22.0"
+ resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoped-functions/-/babel-plugin-transform-es2015-block-scoped-functions-6.22.0.tgz#bbc51b49f964d70cb8d8e0b94e820246ce3a6141"
+ dependencies:
+ babel-runtime "^6.22.0"
+
+babel-plugin-transform-es2015-block-scoping@^6.24.1:
+ version "6.24.1"
+ resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.24.1.tgz#76c295dc3a4741b1665adfd3167215dcff32a576"
+ dependencies:
+ babel-runtime "^6.22.0"
+ babel-template "^6.24.1"
+ babel-traverse "^6.24.1"
+ babel-types "^6.24.1"
+ lodash "^4.2.0"
+
+babel-plugin-transform-es2015-classes@^6.24.1:
+ version "6.24.1"
+ resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.24.1.tgz#5a4c58a50c9c9461e564b4b2a3bfabc97a2584db"
+ dependencies:
+ babel-helper-define-map "^6.24.1"
+ babel-helper-function-name "^6.24.1"
+ babel-helper-optimise-call-expression "^6.24.1"
+ babel-helper-replace-supers "^6.24.1"
+ babel-messages "^6.23.0"
+ babel-runtime "^6.22.0"
+ babel-template "^6.24.1"
+ babel-traverse "^6.24.1"
+ babel-types "^6.24.1"
+
+babel-plugin-transform-es2015-computed-properties@^6.24.1:
+ version "6.24.1"
+ resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.24.1.tgz#6fe2a8d16895d5634f4cd999b6d3480a308159b3"
+ dependencies:
+ babel-runtime "^6.22.0"
+ babel-template "^6.24.1"
+
+babel-plugin-transform-es2015-destructuring@^6.22.0:
+ version "6.23.0"
+ resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz#997bb1f1ab967f682d2b0876fe358d60e765c56d"
+ dependencies:
+ babel-runtime "^6.22.0"
+
+babel-plugin-transform-es2015-duplicate-keys@^6.24.1:
+ version "6.24.1"
+ resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.24.1.tgz#73eb3d310ca969e3ef9ec91c53741a6f1576423e"
+ dependencies:
+ babel-runtime "^6.22.0"
+ babel-types "^6.24.1"
+
+babel-plugin-transform-es2015-for-of@^6.22.0:
+ version "6.23.0"
+ resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.23.0.tgz#f47c95b2b613df1d3ecc2fdb7573623c75248691"
+ dependencies:
+ babel-runtime "^6.22.0"
+
+babel-plugin-transform-es2015-function-name@^6.24.1:
+ version "6.24.1"
+ resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.24.1.tgz#834c89853bc36b1af0f3a4c5dbaa94fd8eacaa8b"
+ dependencies:
+ babel-helper-function-name "^6.24.1"
+ babel-runtime "^6.22.0"
+ babel-types "^6.24.1"
+
+babel-plugin-transform-es2015-literals@^6.22.0:
+ version "6.22.0"
+ resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.22.0.tgz#4f54a02d6cd66cf915280019a31d31925377ca2e"
+ dependencies:
+ babel-runtime "^6.22.0"
+
+babel-plugin-transform-es2015-modules-amd@^6.24.1:
+ version "6.24.1"
+ resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-amd/-/babel-plugin-transform-es2015-modules-amd-6.24.1.tgz#3b3e54017239842d6d19c3011c4bd2f00a00d154"
+ dependencies:
+ babel-plugin-transform-es2015-modules-commonjs "^6.24.1"
+ babel-runtime "^6.22.0"
+ babel-template "^6.24.1"
+
+babel-plugin-transform-es2015-modules-commonjs@^6.23.0, babel-plugin-transform-es2015-modules-commonjs@^6.24.1:
version "6.24.1"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.24.1.tgz#d3e310b40ef664a36622200097c6d440298f2bfe"
dependencies:
@@ -366,6 +507,81 @@ babel-plugin-transform-es2015-modules-commonjs@^6.23.0:
babel-template "^6.24.1"
babel-types "^6.24.1"
+babel-plugin-transform-es2015-modules-systemjs@^6.24.1:
+ version "6.24.1"
+ resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.24.1.tgz#ff89a142b9119a906195f5f106ecf305d9407d23"
+ dependencies:
+ babel-helper-hoist-variables "^6.24.1"
+ babel-runtime "^6.22.0"
+ babel-template "^6.24.1"
+
+babel-plugin-transform-es2015-modules-umd@^6.24.1:
+ version "6.24.1"
+ resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.24.1.tgz#ac997e6285cd18ed6176adb607d602344ad38468"
+ dependencies:
+ babel-plugin-transform-es2015-modules-amd "^6.24.1"
+ babel-runtime "^6.22.0"
+ babel-template "^6.24.1"
+
+babel-plugin-transform-es2015-object-super@^6.24.1:
+ version "6.24.1"
+ resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.24.1.tgz#24cef69ae21cb83a7f8603dad021f572eb278f8d"
+ dependencies:
+ babel-helper-replace-supers "^6.24.1"
+ babel-runtime "^6.22.0"
+
+babel-plugin-transform-es2015-parameters@^6.24.1:
+ version "6.24.1"
+ resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.24.1.tgz#57ac351ab49caf14a97cd13b09f66fdf0a625f2b"
+ dependencies:
+ babel-helper-call-delegate "^6.24.1"
+ babel-helper-get-function-arity "^6.24.1"
+ babel-runtime "^6.22.0"
+ babel-template "^6.24.1"
+ babel-traverse "^6.24.1"
+ babel-types "^6.24.1"
+
+babel-plugin-transform-es2015-shorthand-properties@^6.24.1:
+ version "6.24.1"
+ resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.24.1.tgz#24f875d6721c87661bbd99a4622e51f14de38aa0"
+ dependencies:
+ babel-runtime "^6.22.0"
+ babel-types "^6.24.1"
+
+babel-plugin-transform-es2015-spread@^6.22.0:
+ version "6.22.0"
+ resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.22.0.tgz#d6d68a99f89aedc4536c81a542e8dd9f1746f8d1"
+ dependencies:
+ babel-runtime "^6.22.0"
+
+babel-plugin-transform-es2015-sticky-regex@^6.24.1:
+ version "6.24.1"
+ resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.24.1.tgz#00c1cdb1aca71112cdf0cf6126c2ed6b457ccdbc"
+ dependencies:
+ babel-helper-regex "^6.24.1"
+ babel-runtime "^6.22.0"
+ babel-types "^6.24.1"
+
+babel-plugin-transform-es2015-template-literals@^6.22.0:
+ version "6.22.0"
+ resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.22.0.tgz#a84b3450f7e9f8f1f6839d6d687da84bb1236d8d"
+ dependencies:
+ babel-runtime "^6.22.0"
+
+babel-plugin-transform-es2015-typeof-symbol@^6.22.0:
+ version "6.23.0"
+ resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.23.0.tgz#dec09f1cddff94b52ac73d505c84df59dcceb372"
+ dependencies:
+ babel-runtime "^6.22.0"
+
+babel-plugin-transform-es2015-unicode-regex@^6.24.1:
+ version "6.24.1"
+ resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.24.1.tgz#d38b12f42ea7323f729387f18a7c5ae1faeb35e9"
+ dependencies:
+ babel-helper-regex "^6.24.1"
+ babel-runtime "^6.22.0"
+ regexpu-core "^2.0.0"
+
babel-plugin-transform-flow-strip-types@^6.22.0:
version "6.22.0"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-flow-strip-types/-/babel-plugin-transform-flow-strip-types-6.22.0.tgz#84cb672935d43714fdc32bce84568d87441cf7cf"
@@ -408,6 +624,12 @@ babel-plugin-transform-react-jsx@^6.24.1:
babel-plugin-syntax-jsx "^6.8.0"
babel-runtime "^6.22.0"
+babel-plugin-transform-regenerator@^6.24.1:
+ version "6.24.1"
+ resolved "https://registry.yarnpkg.com/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.24.1.tgz#b8da305ad43c3c99b4848e4fe4037b770d23c418"
+ dependencies:
+ regenerator-transform "0.9.11"
+
babel-plugin-transform-strict-mode@^6.24.1:
version "6.24.1"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz#d5faf7aa578a65bbe591cf5edae04a0c67020758"
@@ -423,6 +645,35 @@ babel-polyfill@^6.23.0, babel-polyfill@^6.6.1:
core-js "^2.4.0"
regenerator-runtime "^0.10.0"
+babel-preset-es2015@^6.24.1:
+ version "6.24.1"
+ resolved "https://registry.yarnpkg.com/babel-preset-es2015/-/babel-preset-es2015-6.24.1.tgz#d44050d6bc2c9feea702aaf38d727a0210538939"
+ dependencies:
+ babel-plugin-check-es2015-constants "^6.22.0"
+ babel-plugin-transform-es2015-arrow-functions "^6.22.0"
+ babel-plugin-transform-es2015-block-scoped-functions "^6.22.0"
+ babel-plugin-transform-es2015-block-scoping "^6.24.1"
+ babel-plugin-transform-es2015-classes "^6.24.1"
+ babel-plugin-transform-es2015-computed-properties "^6.24.1"
+ babel-plugin-transform-es2015-destructuring "^6.22.0"
+ babel-plugin-transform-es2015-duplicate-keys "^6.24.1"
+ babel-plugin-transform-es2015-for-of "^6.22.0"
+ babel-plugin-transform-es2015-function-name "^6.24.1"
+ babel-plugin-transform-es2015-literals "^6.22.0"
+ babel-plugin-transform-es2015-modules-amd "^6.24.1"
+ babel-plugin-transform-es2015-modules-commonjs "^6.24.1"
+ babel-plugin-transform-es2015-modules-systemjs "^6.24.1"
+ babel-plugin-transform-es2015-modules-umd "^6.24.1"
+ babel-plugin-transform-es2015-object-super "^6.24.1"
+ babel-plugin-transform-es2015-parameters "^6.24.1"
+ babel-plugin-transform-es2015-shorthand-properties "^6.24.1"
+ babel-plugin-transform-es2015-spread "^6.22.0"
+ babel-plugin-transform-es2015-sticky-regex "^6.24.1"
+ babel-plugin-transform-es2015-template-literals "^6.22.0"
+ babel-plugin-transform-es2015-typeof-symbol "^6.22.0"
+ babel-plugin-transform-es2015-unicode-regex "^6.24.1"
+ babel-plugin-transform-regenerator "^6.24.1"
+
babel-preset-flow@^6.23.0:
version "6.23.0"
resolved "https://registry.yarnpkg.com/babel-preset-flow/-/babel-preset-flow-6.23.0.tgz#e71218887085ae9a24b5be4169affb599816c49d"
@@ -458,7 +709,7 @@ babel-register@^6.24.1:
mkdirp "^0.5.1"
source-map-support "^0.4.2"
-babel-runtime@^6.22.0:
+babel-runtime@^6.18.0, babel-runtime@^6.22.0:
version "6.23.0"
resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.23.0.tgz#0a9489f144de70efb3ce4300accdb329e2fc543b"
dependencies:
@@ -489,7 +740,7 @@ babel-traverse@^6.18.0, babel-traverse@^6.23.1, babel-traverse@^6.24.1:
invariant "^2.2.0"
lodash "^4.2.0"
-babel-types@^6.18.0, babel-types@^6.23.0, babel-types@^6.24.1:
+babel-types@^6.18.0, babel-types@^6.19.0, babel-types@^6.23.0, babel-types@^6.24.1:
version "6.24.1"
resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.24.1.tgz#a136879dc15b3606bda0d90c1fc74304c2ff0975"
dependencies:
@@ -2158,6 +2409,10 @@ jsesc@^1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b"
+jsesc@~0.5.0:
+ version "0.5.0"
+ resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d"
+
json-schema@0.2.3:
version "0.2.3"
resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13"
@@ -3048,10 +3303,22 @@ redeyed@~1.0.0:
dependencies:
esprima "~3.0.0"
+regenerate@^1.2.1:
+ version "1.3.2"
+ resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.3.2.tgz#d1941c67bad437e1be76433add5b385f95b19260"
+
regenerator-runtime@^0.10.0:
version "0.10.3"
resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.10.3.tgz#8c4367a904b51ea62a908ac310bf99ff90a82a3e"
+regenerator-transform@0.9.11:
+ version "0.9.11"
+ resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.9.11.tgz#3a7d067520cb7b7176769eb5ff868691befe1283"
+ dependencies:
+ babel-runtime "^6.18.0"
+ babel-types "^6.19.0"
+ private "^0.1.6"
+
regex-cache@^0.4.2:
version "0.4.3"
resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.3.tgz#9b1a6c35d4d0dfcef5711ae651e8e9d3d7114145"
@@ -3059,6 +3326,24 @@ regex-cache@^0.4.2:
is-equal-shallow "^0.1.3"
is-primitive "^2.0.0"
+regexpu-core@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-2.0.0.tgz#49d038837b8dcf8bfa5b9a42139938e6ea2ae240"
+ dependencies:
+ regenerate "^1.2.1"
+ regjsgen "^0.2.0"
+ regjsparser "^0.1.4"
+
+regjsgen@^0.2.0:
+ version "0.2.0"
+ resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.2.0.tgz#6c016adeac554f75823fe37ac05b92d5a4edb1f7"
+
+regjsparser@^0.1.4:
+ version "0.1.5"
+ resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.1.5.tgz#7ee8f84dc6fa792d3fd0ae228d24bd949ead205c"
+ dependencies:
+ jsesc "~0.5.0"
+
remove-trailing-separator@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.0.1.tgz#615ebb96af559552d4bf4057c8436d486ab63cc4"