@swc/plugin-styled-jsx 1.5.84 → 1.5.87
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/package.json +1 -1
- package/swc_plugin_styled_jsx.wasm +0 -0
- package/transform/Cargo.toml +0 -39
- package/transform/src/lib.rs +0 -7
- package/transform/src/lifetime.rs +0 -408
- package/transform/src/style.rs +0 -25
- package/transform/src/transform_css_lightningcss.rs +0 -589
- package/transform/src/transform_css_swc.rs +0 -392
- package/transform/src/utils.rs +0 -371
- package/transform/src/visitor.rs +0 -963
- package/transform/tests/errors/nested-style-tags/input.js +0 -31
- package/transform/tests/errors/nested-style-tags/output-lightningcss.js +0 -58
- package/transform/tests/errors/nested-style-tags/output-lightningcss.stderr +0 -27
- package/transform/tests/errors/nested-style-tags/output-swc.js +0 -58
- package/transform/tests/errors/nested-style-tags/output-swc.stderr +0 -27
- package/transform/tests/errors/nested-style-tags/output.js +0 -58
- package/transform/tests/errors/no-child/input.js +0 -6
- package/transform/tests/errors/no-child/output-lightningcss.js +0 -8
- package/transform/tests/errors/no-child/output-lightningcss.stderr +0 -9
- package/transform/tests/errors/no-child/output-swc.js +0 -8
- package/transform/tests/errors/no-child/output-swc.stderr +0 -9
- package/transform/tests/errors/no-child/output.js +0 -8
- package/transform/tests/errors/ts-with-css-resolve/input.js +0 -10
- package/transform/tests/errors/ts-with-css-resolve/output-lightningcss.js +0 -5
- package/transform/tests/errors/ts-with-css-resolve/output-lightningcss.stderr +0 -2
- package/transform/tests/errors/ts-with-css-resolve/output-swc.js +0 -5
- package/transform/tests/errors/ts-with-css-resolve/output-swc.stderr +0 -2
- package/transform/tests/errors/ts-with-css-resolve/output.js +0 -5
- package/transform/tests/errors/two-children/input.js +0 -8
- package/transform/tests/errors/two-children/output-lightningcss.js +0 -12
- package/transform/tests/errors/two-children/output-lightningcss.stderr +0 -11
- package/transform/tests/errors/two-children/output-swc.js +0 -12
- package/transform/tests/errors/two-children/output-swc.stderr +0 -11
- package/transform/tests/errors/two-children/output.js +0 -12
- package/transform/tests/errors/wrong-child-type/input.js +0 -7
- package/transform/tests/errors/wrong-child-type/output-lightningcss.js +0 -10
- package/transform/tests/errors/wrong-child-type/output-lightningcss.stderr +0 -10
- package/transform/tests/errors/wrong-child-type/output-swc.js +0 -10
- package/transform/tests/errors/wrong-child-type/output-swc.stderr +0 -10
- package/transform/tests/errors/wrong-child-type/output.js +0 -10
- package/transform/tests/errors/wrong-jsx-expression-type/input.js +0 -7
- package/transform/tests/errors/wrong-jsx-expression-type/output-lightningcss.js +0 -10
- package/transform/tests/errors/wrong-jsx-expression-type/output-lightningcss.stderr +0 -10
- package/transform/tests/errors/wrong-jsx-expression-type/output-swc.js +0 -10
- package/transform/tests/errors/wrong-jsx-expression-type/output-swc.stderr +0 -10
- package/transform/tests/errors/wrong-jsx-expression-type/output.js +0 -10
- package/transform/tests/fixture/.expressions/input.js +0 -90
- package/transform/tests/fixture/absent/input.js +0 -6
- package/transform/tests/fixture/absent/output.lightningcss.js +0 -7
- package/transform/tests/fixture/absent/output.swc.js +0 -7
- package/transform/tests/fixture/attribute-generation-classname-rewriting/input.js +0 -55
- package/transform/tests/fixture/attribute-generation-classname-rewriting/output.lightningcss.js +0 -112
- package/transform/tests/fixture/attribute-generation-classname-rewriting/output.swc.js +0 -112
- package/transform/tests/fixture/attribute-generation-modes/input.js +0 -166
- package/transform/tests/fixture/attribute-generation-modes/output.lightningcss.js +0 -228
- package/transform/tests/fixture/attribute-generation-modes/output.swc.js +0 -228
- package/transform/tests/fixture/class/input.js +0 -14
- package/transform/tests/fixture/class/output.lightningcss.js +0 -12
- package/transform/tests/fixture/class/output.swc.js +0 -12
- package/transform/tests/fixture/comments/input.js +0 -18
- package/transform/tests/fixture/comments/output.lightningcss.js +0 -12
- package/transform/tests/fixture/comments/output.swc.js +0 -12
- package/transform/tests/fixture/component-attribute/input.js +0 -11
- package/transform/tests/fixture/component-attribute/output.lightningcss.js +0 -10
- package/transform/tests/fixture/component-attribute/output.swc.js +0 -10
- package/transform/tests/fixture/conflicts/input.js +0 -16
- package/transform/tests/fixture/conflicts/output.lightningcss.js +0 -14
- package/transform/tests/fixture/conflicts/output.swc.js +0 -14
- package/transform/tests/fixture/css-selector-after-pseudo/input.js +0 -18
- package/transform/tests/fixture/css-selector-after-pseudo/output.lightningcss.js +0 -11
- package/transform/tests/fixture/css-selector-after-pseudo/output.swc.js +0 -11
- package/transform/tests/fixture/css-tag-same-file/input.js +0 -25
- package/transform/tests/fixture/css-tag-same-file/output.lightningcss.js +0 -21
- package/transform/tests/fixture/css-tag-same-file/output.swc.js +0 -21
- package/transform/tests/fixture/different-jsx-ids/input.js +0 -23
- package/transform/tests/fixture/different-jsx-ids/output.lightningcss.js +0 -24
- package/transform/tests/fixture/different-jsx-ids/output.swc.js +0 -24
- package/transform/tests/fixture/dynamic-element/input.js +0 -56
- package/transform/tests/fixture/dynamic-element/output.lightningcss.js +0 -40
- package/transform/tests/fixture/dynamic-element/output.swc.js +0 -40
- package/transform/tests/fixture/dynamic-element-class/input.js +0 -32
- package/transform/tests/fixture/dynamic-element-class/output.lightningcss.js +0 -25
- package/transform/tests/fixture/dynamic-element-class/output.swc.js +0 -25
- package/transform/tests/fixture/dynamic-element-external/input.js +0 -12
- package/transform/tests/fixture/dynamic-element-external/output.lightningcss.js +0 -12
- package/transform/tests/fixture/dynamic-element-external/output.swc.js +0 -12
- package/transform/tests/fixture/dynamic-this-in-arrow/input.js +0 -41
- package/transform/tests/fixture/dynamic-this-in-arrow/output.lightningcss.js +0 -39
- package/transform/tests/fixture/dynamic-this-in-arrow/output.swc.js +0 -39
- package/transform/tests/fixture/exported-jsx-style/input.js +0 -1
- package/transform/tests/fixture/exported-jsx-style/output.lightningcss.js +0 -1
- package/transform/tests/fixture/exported-jsx-style/output.swc.js +0 -1
- package/transform/tests/fixture/exported-non-jsx-style/input.js +0 -1
- package/transform/tests/fixture/exported-non-jsx-style/output.lightningcss.js +0 -1
- package/transform/tests/fixture/exported-non-jsx-style/output.swc.js +0 -1
- package/transform/tests/fixture/external-nested-scope/input.js +0 -5
- package/transform/tests/fixture/external-nested-scope/output.lightningcss.js +0 -7
- package/transform/tests/fixture/external-nested-scope/output.swc.js +0 -7
- package/transform/tests/fixture/external-stylesheet/input.js +0 -41
- package/transform/tests/fixture/external-stylesheet/output.lightningcss.js +0 -34
- package/transform/tests/fixture/external-stylesheet/output.swc.js +0 -34
- package/transform/tests/fixture/external-stylesheet-global/input.js +0 -19
- package/transform/tests/fixture/external-stylesheet-global/output.lightningcss.js +0 -18
- package/transform/tests/fixture/external-stylesheet-global/output.swc.js +0 -18
- package/transform/tests/fixture/external-stylesheet-multi-line/input.js +0 -9
- package/transform/tests/fixture/external-stylesheet-multi-line/output.lightningcss.js +0 -9
- package/transform/tests/fixture/external-stylesheet-multi-line/output.swc.js +0 -9
- package/transform/tests/fixture/fragment/input.js +0 -51
- package/transform/tests/fixture/fragment/output.lightningcss.js +0 -47
- package/transform/tests/fixture/fragment/output.swc.js +0 -47
- package/transform/tests/fixture/global/input.js +0 -22
- package/transform/tests/fixture/global/output.lightningcss.js +0 -7
- package/transform/tests/fixture/global/output.swc.js +0 -7
- package/transform/tests/fixture/global-child-selector/input.js +0 -10
- package/transform/tests/fixture/global-child-selector/output.lightningcss.js +0 -8
- package/transform/tests/fixture/global-child-selector/output.swc.js +0 -8
- package/transform/tests/fixture/global-redundant/input.js +0 -12
- package/transform/tests/fixture/global-redundant/output.lightningcss.js +0 -10
- package/transform/tests/fixture/global-redundant/output.swc.js +0 -10
- package/transform/tests/fixture/issue-30480/input.js +0 -11
- package/transform/tests/fixture/issue-30480/output.lightningcss.js +0 -15
- package/transform/tests/fixture/issue-30480/output.swc.js +0 -15
- package/transform/tests/fixture/issue-30570/input.js +0 -15
- package/transform/tests/fixture/issue-30570/output.lightningcss.js +0 -12
- package/transform/tests/fixture/issue-30570/output.swc.js +0 -12
- package/transform/tests/fixture/issue-31562-interpolation-in-mdea/input.js +0 -30
- package/transform/tests/fixture/issue-31562-interpolation-in-mdea/output.lightningcss.js +0 -43
- package/transform/tests/fixture/issue-31562-interpolation-in-mdea/output.swc.js +0 -43
- package/transform/tests/fixture/mixed-global-scoped/input.js +0 -9
- package/transform/tests/fixture/mixed-global-scoped/output.lightningcss.js +0 -11
- package/transform/tests/fixture/mixed-global-scoped/output.swc.js +0 -11
- package/transform/tests/fixture/multiple-jsx/input.js +0 -43
- package/transform/tests/fixture/multiple-jsx/output.lightningcss.js +0 -32
- package/transform/tests/fixture/multiple-jsx/output.swc.js +0 -32
- package/transform/tests/fixture/nested-style-tags/index.js +0 -0
- package/transform/tests/fixture/next-54653/input.js +0 -10
- package/transform/tests/fixture/next-54653/output.lightningcss.js +0 -3
- package/transform/tests/fixture/next-54653/output.swc.js +0 -3
- package/transform/tests/fixture/non-styled-jsx-style/input.js +0 -7
- package/transform/tests/fixture/non-styled-jsx-style/output.lightningcss.js +0 -12
- package/transform/tests/fixture/non-styled-jsx-style/output.swc.js +0 -12
- package/transform/tests/fixture/not-styled-jsx-tagged-templates/input.js +0 -30
- package/transform/tests/fixture/not-styled-jsx-tagged-templates/output.lightningcss.js +0 -23
- package/transform/tests/fixture/not-styled-jsx-tagged-templates/output.swc.js +0 -23
- package/transform/tests/fixture/number-after-placeholder/input.js +0 -17
- package/transform/tests/fixture/number-after-placeholder/output.lightningcss.js +0 -17
- package/transform/tests/fixture/number-after-placeholder/output.swc.js +0 -17
- package/transform/tests/fixture/one-off-global-selectors/input.js +0 -10
- package/transform/tests/fixture/one-off-global-selectors/output.lightningcss.js +0 -8
- package/transform/tests/fixture/one-off-global-selectors/output.swc.js +0 -8
- package/transform/tests/fixture/source-maps/input.js +0 -8
- package/transform/tests/fixture/source-maps/output.lightningcss.js +0 -8
- package/transform/tests/fixture/source-maps/output.swc.js +0 -8
- package/transform/tests/fixture/stateless/input.js +0 -8
- package/transform/tests/fixture/stateless/output.lightningcss.js +0 -12
- package/transform/tests/fixture/stateless/output.swc.js +0 -12
- package/transform/tests/fixture/styles/input.js +0 -57
- package/transform/tests/fixture/styles/output.lightningcss.js +0 -39
- package/transform/tests/fixture/styles/output.swc.js +0 -39
- package/transform/tests/fixture/styles-external-invalid/input.js +0 -13
- package/transform/tests/fixture/styles-external-invalid/output.lightningcss.js +0 -9
- package/transform/tests/fixture/styles-external-invalid/output.swc.js +0 -9
- package/transform/tests/fixture/styles-external-invalid2/input.js +0 -11
- package/transform/tests/fixture/styles-external-invalid2/output.lightningcss.js +0 -8
- package/transform/tests/fixture/styles-external-invalid2/output.swc.js +0 -8
- package/transform/tests/fixture/styles2/input.js +0 -6
- package/transform/tests/fixture/styles2/output.lightningcss.js +0 -5
- package/transform/tests/fixture/styles2/output.swc.js +0 -5
- package/transform/tests/fixture/too-many/input.js +0 -35
- package/transform/tests/fixture/too-many/output.lightningcss.js +0 -49
- package/transform/tests/fixture/too-many/output.swc.js +0 -49
- package/transform/tests/fixture/tpl-escape-1/input.js +0 -14
- package/transform/tests/fixture/tpl-escape-1/output.lightningcss.js +0 -12
- package/transform/tests/fixture/tpl-escape-1/output.swc.js +0 -12
- package/transform/tests/fixture/tpl-escape-2/input.js +0 -17
- package/transform/tests/fixture/tpl-escape-2/output.lightningcss.js +0 -17
- package/transform/tests/fixture/tpl-escape-2/output.swc.js +0 -17
- package/transform/tests/fixture/tpl-placeholder-1-as-property/input.js +0 -17
- package/transform/tests/fixture/tpl-placeholder-1-as-property/output.lightningcss.js +0 -28
- package/transform/tests/fixture/tpl-placeholder-1-as-property/output.swc.js +0 -28
- package/transform/tests/fixture/tpl-placeholder-2-as-part-of-value/input.js +0 -21
- package/transform/tests/fixture/tpl-placeholder-2-as-part-of-value/output.lightningcss.js +0 -34
- package/transform/tests/fixture/tpl-placeholder-2-as-part-of-value/output.swc.js +0 -34
- package/transform/tests/fixture/tpl-placeholder-3-as-value/input.js +0 -17
- package/transform/tests/fixture/tpl-placeholder-3-as-value/output.lightningcss.js +0 -28
- package/transform/tests/fixture/tpl-placeholder-3-as-value/output.swc.js +0 -28
- package/transform/tests/fixture/tpl-placeholder-4-as-part-of-value-in-multiple/input.js +0 -17
- package/transform/tests/fixture/tpl-placeholder-4-as-part-of-value-in-multiple/output.lightningcss.js +0 -31
- package/transform/tests/fixture/tpl-placeholder-4-as-part-of-value-in-multiple/output.swc.js +0 -31
- package/transform/tests/fixture/tpl-placeholder-5-values-of-multiple-properties/input.js +0 -16
- package/transform/tests/fixture/tpl-placeholder-5-values-of-multiple-properties/output.lightningcss.js +0 -31
- package/transform/tests/fixture/tpl-placeholder-5-values-of-multiple-properties/output.swc.js +0 -31
- package/transform/tests/fixture/transform-css/input.js +0 -176
- package/transform/tests/fixture/transform-css/output.lightningcss.js +0 -8
- package/transform/tests/fixture/transform-css/output.swc.js +0 -8
- package/transform/tests/fixture/transform-css-complex-selector/input.js +0 -116
- package/transform/tests/fixture/transform-css-complex-selector/output.lightningcss.js +0 -8
- package/transform/tests/fixture/transform-css-complex-selector/output.swc.js +0 -8
- package/transform/tests/fixture/transform-css-complex-selector-2/input.js +0 -12
- package/transform/tests/fixture/transform-css-complex-selector-2/output.lightningcss.js +0 -8
- package/transform/tests/fixture/transform-css-complex-selector-2/output.swc.js +0 -8
- package/transform/tests/fixture/transform-css-global/input.js +0 -32
- package/transform/tests/fixture/transform-css-global/output.lightningcss.js +0 -8
- package/transform/tests/fixture/transform-css-global/output.swc.js +0 -8
- package/transform/tests/fixture/transform-css-media-query/input.js +0 -24
- package/transform/tests/fixture/transform-css-media-query/output.lightningcss.js +0 -8
- package/transform/tests/fixture/transform-css-media-query/output.swc.js +0 -8
- package/transform/tests/fixture/transform-css-normal/input.js +0 -22
- package/transform/tests/fixture/transform-css-normal/output.lightningcss.js +0 -8
- package/transform/tests/fixture/transform-css-normal/output.swc.js +0 -8
- package/transform/tests/fixture/transform-css-nth-1/input.js +0 -10
- package/transform/tests/fixture/transform-css-nth-1/output.lightningcss.js +0 -8
- package/transform/tests/fixture/transform-css-nth-1/output.swc.js +0 -8
- package/transform/tests/fixture/whitespace/input.js +0 -12
- package/transform/tests/fixture/whitespace/output.lightningcss.js +0 -12
- package/transform/tests/fixture/whitespace/output.swc.js +0 -12
- package/transform/tests/fixture.rs +0 -129
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import css from 'styled-jsx/css'
|
|
2
|
-
|
|
3
|
-
export default ({ children }) => (
|
|
4
|
-
<div>
|
|
5
|
-
<p>{children}</p>
|
|
6
|
-
<style jsx>{styles}</style>
|
|
7
|
-
</div>
|
|
8
|
-
)
|
|
9
|
-
|
|
10
|
-
const styles = css`
|
|
11
|
-
p {
|
|
12
|
-
color: red;
|
|
13
|
-
}
|
|
14
|
-
`
|
|
15
|
-
|
|
16
|
-
class Test extends React.Component {
|
|
17
|
-
render() {
|
|
18
|
-
return (
|
|
19
|
-
<div>
|
|
20
|
-
<p>{this.props.children}</p>
|
|
21
|
-
<style jsx>{styles}</style>
|
|
22
|
-
</div>
|
|
23
|
-
)
|
|
24
|
-
}
|
|
25
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import _JSXStyle from "styled-jsx/style";
|
|
2
|
-
export default (({ children })=><div className={`jsx-${styles.__hash}`}>
|
|
3
|
-
|
|
4
|
-
<p className={`jsx-${styles.__hash}`}>{children}</p>
|
|
5
|
-
|
|
6
|
-
<_JSXStyle id={styles.__hash}>{styles}</_JSXStyle>
|
|
7
|
-
|
|
8
|
-
</div>);
|
|
9
|
-
const styles = new String("p.jsx-556239d258b6d66a{color:red}");
|
|
10
|
-
styles.__hash = "556239d258b6d66a";
|
|
11
|
-
class Test extends React.Component {
|
|
12
|
-
render() {
|
|
13
|
-
return <div className={`jsx-${styles.__hash}`}>
|
|
14
|
-
|
|
15
|
-
<p className={`jsx-${styles.__hash}`}>{this.props.children}</p>
|
|
16
|
-
|
|
17
|
-
<_JSXStyle id={styles.__hash}>{styles}</_JSXStyle>
|
|
18
|
-
|
|
19
|
-
</div>;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import _JSXStyle from "styled-jsx/style";
|
|
2
|
-
export default (({ children })=><div className={`jsx-${styles.__hash}`}>
|
|
3
|
-
|
|
4
|
-
<p className={`jsx-${styles.__hash}`}>{children}</p>
|
|
5
|
-
|
|
6
|
-
<_JSXStyle id={styles.__hash}>{styles}</_JSXStyle>
|
|
7
|
-
|
|
8
|
-
</div>);
|
|
9
|
-
const styles = new String("p.jsx-556239d258b6d66a{color:red}");
|
|
10
|
-
styles.__hash = "556239d258b6d66a";
|
|
11
|
-
class Test extends React.Component {
|
|
12
|
-
render() {
|
|
13
|
-
return <div className={`jsx-${styles.__hash}`}>
|
|
14
|
-
|
|
15
|
-
<p className={`jsx-${styles.__hash}`}>{this.props.children}</p>
|
|
16
|
-
|
|
17
|
-
<_JSXStyle id={styles.__hash}>{styles}</_JSXStyle>
|
|
18
|
-
|
|
19
|
-
</div>;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
const color = 'red'
|
|
2
|
-
const otherColor = 'green'
|
|
3
|
-
|
|
4
|
-
const A = () => (
|
|
5
|
-
<div>
|
|
6
|
-
<p>test</p>
|
|
7
|
-
<style jsx>{`p { color: ${color} }`}</style>
|
|
8
|
-
</div>
|
|
9
|
-
)
|
|
10
|
-
|
|
11
|
-
const B = () => (
|
|
12
|
-
<div>
|
|
13
|
-
<p>test</p>
|
|
14
|
-
<style jsx>{`p { color: ${otherColor} }`}</style>
|
|
15
|
-
</div>
|
|
16
|
-
)
|
|
17
|
-
|
|
18
|
-
export default () => (
|
|
19
|
-
<div>
|
|
20
|
-
<A />
|
|
21
|
-
<B />
|
|
22
|
-
</div>
|
|
23
|
-
)
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import _JSXStyle from "styled-jsx/style";
|
|
2
|
-
const color = 'red';
|
|
3
|
-
const otherColor = 'green';
|
|
4
|
-
const A = ()=><div className={"jsx-8522d6f4b7f930d2"}>
|
|
5
|
-
|
|
6
|
-
<p className={"jsx-8522d6f4b7f930d2"}>test</p>
|
|
7
|
-
|
|
8
|
-
<_JSXStyle id={"8522d6f4b7f930d2"}>{`p.jsx-8522d6f4b7f930d2{color:${color}}`}</_JSXStyle>
|
|
9
|
-
|
|
10
|
-
</div>;
|
|
11
|
-
const B = ()=><div className={"jsx-d1ed441bb35f699d"}>
|
|
12
|
-
|
|
13
|
-
<p className={"jsx-d1ed441bb35f699d"}>test</p>
|
|
14
|
-
|
|
15
|
-
<_JSXStyle id={"d1ed441bb35f699d"}>{`p.jsx-d1ed441bb35f699d{color:${otherColor}}`}</_JSXStyle>
|
|
16
|
-
|
|
17
|
-
</div>;
|
|
18
|
-
export default (()=><div>
|
|
19
|
-
|
|
20
|
-
<A/>
|
|
21
|
-
|
|
22
|
-
<B/>
|
|
23
|
-
|
|
24
|
-
</div>);
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import _JSXStyle from "styled-jsx/style";
|
|
2
|
-
const color = 'red';
|
|
3
|
-
const otherColor = 'green';
|
|
4
|
-
const A = ()=><div className={"jsx-8522d6f4b7f930d2"}>
|
|
5
|
-
|
|
6
|
-
<p className={"jsx-8522d6f4b7f930d2"}>test</p>
|
|
7
|
-
|
|
8
|
-
<_JSXStyle id={"8522d6f4b7f930d2"}>{`p.jsx-8522d6f4b7f930d2{color:${color}}`}</_JSXStyle>
|
|
9
|
-
|
|
10
|
-
</div>;
|
|
11
|
-
const B = ()=><div className={"jsx-d1ed441bb35f699d"}>
|
|
12
|
-
|
|
13
|
-
<p className={"jsx-d1ed441bb35f699d"}>test</p>
|
|
14
|
-
|
|
15
|
-
<_JSXStyle id={"d1ed441bb35f699d"}>{`p.jsx-d1ed441bb35f699d{color:${otherColor}}`}</_JSXStyle>
|
|
16
|
-
|
|
17
|
-
</div>;
|
|
18
|
-
export default (()=><div>
|
|
19
|
-
|
|
20
|
-
<A/>
|
|
21
|
-
|
|
22
|
-
<B/>
|
|
23
|
-
|
|
24
|
-
</div>);
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
export default ({ level = 1 }) => {
|
|
2
|
-
const Element = `h${level}`
|
|
3
|
-
|
|
4
|
-
return (
|
|
5
|
-
<Element className="root">
|
|
6
|
-
<p>dynamic element</p>
|
|
7
|
-
<style jsx>{`
|
|
8
|
-
.root {
|
|
9
|
-
background: red;
|
|
10
|
-
}
|
|
11
|
-
`}</style>
|
|
12
|
-
</Element>
|
|
13
|
-
)
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export const TestLowerCase = ({ level = 1 }) => {
|
|
17
|
-
const element = `h${level}`
|
|
18
|
-
|
|
19
|
-
return (
|
|
20
|
-
<element className="root">
|
|
21
|
-
<p>dynamic element</p>
|
|
22
|
-
<style jsx>{`
|
|
23
|
-
.root {
|
|
24
|
-
background: red;
|
|
25
|
-
}
|
|
26
|
-
`}</style>
|
|
27
|
-
</element>
|
|
28
|
-
)
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
const Element2 = 'div'
|
|
32
|
-
export const Test2 = () => {
|
|
33
|
-
return (
|
|
34
|
-
<Element2 className="root">
|
|
35
|
-
<p>dynamic element</p>
|
|
36
|
-
<style jsx>{`
|
|
37
|
-
.root {
|
|
38
|
-
background: red;
|
|
39
|
-
}
|
|
40
|
-
`}</style>
|
|
41
|
-
</Element2>
|
|
42
|
-
)
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export const Test3 = ({Component = 'div'}) => {
|
|
46
|
-
return (
|
|
47
|
-
<Component>
|
|
48
|
-
<p>dynamic element</p>
|
|
49
|
-
<style jsx>{`
|
|
50
|
-
.root {
|
|
51
|
-
background: red;
|
|
52
|
-
}
|
|
53
|
-
`}</style>
|
|
54
|
-
</Component>
|
|
55
|
-
);
|
|
56
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import _JSXStyle from "styled-jsx/style";
|
|
2
|
-
export default (({ level = 1 })=>{
|
|
3
|
-
const Element = `h${level}`;
|
|
4
|
-
return <Element className={"jsx-fca64cc3f069b519" + " " + "root"}>
|
|
5
|
-
|
|
6
|
-
<p className={"jsx-fca64cc3f069b519"}>dynamic element</p>
|
|
7
|
-
|
|
8
|
-
<_JSXStyle id={"fca64cc3f069b519"}>{".root.jsx-fca64cc3f069b519{background:red}"}</_JSXStyle>
|
|
9
|
-
|
|
10
|
-
</Element>;
|
|
11
|
-
});
|
|
12
|
-
export const TestLowerCase = ({ level = 1 })=>{
|
|
13
|
-
const element = `h${level}`;
|
|
14
|
-
return <element className={"jsx-fca64cc3f069b519" + " " + "root"}>
|
|
15
|
-
|
|
16
|
-
<p className={"jsx-fca64cc3f069b519"}>dynamic element</p>
|
|
17
|
-
|
|
18
|
-
<_JSXStyle id={"fca64cc3f069b519"}>{".root.jsx-fca64cc3f069b519{background:red}"}</_JSXStyle>
|
|
19
|
-
|
|
20
|
-
</element>;
|
|
21
|
-
};
|
|
22
|
-
const Element2 = 'div';
|
|
23
|
-
export const Test2 = ()=>{
|
|
24
|
-
return <Element2 className="root">
|
|
25
|
-
|
|
26
|
-
<p className={"jsx-fca64cc3f069b519"}>dynamic element</p>
|
|
27
|
-
|
|
28
|
-
<_JSXStyle id={"fca64cc3f069b519"}>{".root.jsx-fca64cc3f069b519{background:red}"}</_JSXStyle>
|
|
29
|
-
|
|
30
|
-
</Element2>;
|
|
31
|
-
};
|
|
32
|
-
export const Test3 = ({ Component = 'div' })=>{
|
|
33
|
-
return <Component className={"jsx-f825b24bbab5b83b"}>
|
|
34
|
-
|
|
35
|
-
<p className={"jsx-f825b24bbab5b83b"}>dynamic element</p>
|
|
36
|
-
|
|
37
|
-
<_JSXStyle id={"f825b24bbab5b83b"}>{".root.jsx-f825b24bbab5b83b{background:red}"}</_JSXStyle>
|
|
38
|
-
|
|
39
|
-
</Component>;
|
|
40
|
-
};
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import _JSXStyle from "styled-jsx/style";
|
|
2
|
-
export default (({ level = 1 })=>{
|
|
3
|
-
const Element = `h${level}`;
|
|
4
|
-
return <Element className={"jsx-fca64cc3f069b519" + " " + "root"}>
|
|
5
|
-
|
|
6
|
-
<p className={"jsx-fca64cc3f069b519"}>dynamic element</p>
|
|
7
|
-
|
|
8
|
-
<_JSXStyle id={"fca64cc3f069b519"}>{".root.jsx-fca64cc3f069b519{background:red}"}</_JSXStyle>
|
|
9
|
-
|
|
10
|
-
</Element>;
|
|
11
|
-
});
|
|
12
|
-
export const TestLowerCase = ({ level = 1 })=>{
|
|
13
|
-
const element = `h${level}`;
|
|
14
|
-
return <element className={"jsx-fca64cc3f069b519" + " " + "root"}>
|
|
15
|
-
|
|
16
|
-
<p className={"jsx-fca64cc3f069b519"}>dynamic element</p>
|
|
17
|
-
|
|
18
|
-
<_JSXStyle id={"fca64cc3f069b519"}>{".root.jsx-fca64cc3f069b519{background:red}"}</_JSXStyle>
|
|
19
|
-
|
|
20
|
-
</element>;
|
|
21
|
-
};
|
|
22
|
-
const Element2 = 'div';
|
|
23
|
-
export const Test2 = ()=>{
|
|
24
|
-
return <Element2 className="root">
|
|
25
|
-
|
|
26
|
-
<p className={"jsx-fca64cc3f069b519"}>dynamic element</p>
|
|
27
|
-
|
|
28
|
-
<_JSXStyle id={"fca64cc3f069b519"}>{".root.jsx-fca64cc3f069b519{background:red}"}</_JSXStyle>
|
|
29
|
-
|
|
30
|
-
</Element2>;
|
|
31
|
-
};
|
|
32
|
-
export const Test3 = ({ Component = 'div' })=>{
|
|
33
|
-
return <Component className={"jsx-f825b24bbab5b83b"}>
|
|
34
|
-
|
|
35
|
-
<p className={"jsx-f825b24bbab5b83b"}>dynamic element</p>
|
|
36
|
-
|
|
37
|
-
<_JSXStyle id={"f825b24bbab5b83b"}>{".root.jsx-f825b24bbab5b83b{background:red}"}</_JSXStyle>
|
|
38
|
-
|
|
39
|
-
</Component>;
|
|
40
|
-
};
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
export default class {
|
|
2
|
-
render() {
|
|
3
|
-
const Element = 'div'
|
|
4
|
-
|
|
5
|
-
return (
|
|
6
|
-
<Element className="root">
|
|
7
|
-
<p>dynamic element</p>
|
|
8
|
-
<style jsx>{`
|
|
9
|
-
.root {
|
|
10
|
-
background: red;
|
|
11
|
-
}
|
|
12
|
-
`}</style>
|
|
13
|
-
</Element>
|
|
14
|
-
)
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
const Element2 = 'div'
|
|
19
|
-
export const Test2 = class {
|
|
20
|
-
render() {
|
|
21
|
-
return (
|
|
22
|
-
<Element2 className="root">
|
|
23
|
-
<p>dynamic element</p>
|
|
24
|
-
<style jsx>{`
|
|
25
|
-
.root {
|
|
26
|
-
background: red;
|
|
27
|
-
}
|
|
28
|
-
`}</style>
|
|
29
|
-
</Element2>
|
|
30
|
-
)
|
|
31
|
-
}
|
|
32
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import _JSXStyle from "styled-jsx/style";
|
|
2
|
-
export default class {
|
|
3
|
-
render() {
|
|
4
|
-
const Element = 'div';
|
|
5
|
-
return <Element className={"jsx-f825b24bbab5b83b" + " " + "root"}>
|
|
6
|
-
|
|
7
|
-
<p className={"jsx-f825b24bbab5b83b"}>dynamic element</p>
|
|
8
|
-
|
|
9
|
-
<_JSXStyle id={"f825b24bbab5b83b"}>{".root.jsx-f825b24bbab5b83b{background:red}"}</_JSXStyle>
|
|
10
|
-
|
|
11
|
-
</Element>;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
const Element2 = 'div';
|
|
15
|
-
export const Test2 = class {
|
|
16
|
-
render() {
|
|
17
|
-
return <Element2 className="root">
|
|
18
|
-
|
|
19
|
-
<p className={"jsx-f825b24bbab5b83b"}>dynamic element</p>
|
|
20
|
-
|
|
21
|
-
<_JSXStyle id={"f825b24bbab5b83b"}>{".root.jsx-f825b24bbab5b83b{background:red}"}</_JSXStyle>
|
|
22
|
-
|
|
23
|
-
</Element2>;
|
|
24
|
-
}
|
|
25
|
-
};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import _JSXStyle from "styled-jsx/style";
|
|
2
|
-
export default class {
|
|
3
|
-
render() {
|
|
4
|
-
const Element = 'div';
|
|
5
|
-
return <Element className={"jsx-f825b24bbab5b83b" + " " + "root"}>
|
|
6
|
-
|
|
7
|
-
<p className={"jsx-f825b24bbab5b83b"}>dynamic element</p>
|
|
8
|
-
|
|
9
|
-
<_JSXStyle id={"f825b24bbab5b83b"}>{".root.jsx-f825b24bbab5b83b{background:red}"}</_JSXStyle>
|
|
10
|
-
|
|
11
|
-
</Element>;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
const Element2 = 'div';
|
|
15
|
-
export const Test2 = class {
|
|
16
|
-
render() {
|
|
17
|
-
return <Element2 className="root">
|
|
18
|
-
|
|
19
|
-
<p className={"jsx-f825b24bbab5b83b"}>dynamic element</p>
|
|
20
|
-
|
|
21
|
-
<_JSXStyle id={"f825b24bbab5b83b"}>{".root.jsx-f825b24bbab5b83b{background:red}"}</_JSXStyle>
|
|
22
|
-
|
|
23
|
-
</Element2>;
|
|
24
|
-
}
|
|
25
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import _JSXStyle from "styled-jsx/style";
|
|
2
|
-
import styles from './styles2';
|
|
3
|
-
export default (({ level = 1 })=>{
|
|
4
|
-
const Element = `h${level}`;
|
|
5
|
-
return <Element className={`jsx-${styles.__hash}` + " " + "root"}>
|
|
6
|
-
|
|
7
|
-
<p className={`jsx-${styles.__hash}`}>dynamic element</p>
|
|
8
|
-
|
|
9
|
-
<_JSXStyle id={styles.__hash}>{styles}</_JSXStyle>
|
|
10
|
-
|
|
11
|
-
</Element>;
|
|
12
|
-
});
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import _JSXStyle from "styled-jsx/style";
|
|
2
|
-
import styles from './styles2';
|
|
3
|
-
export default (({ level = 1 })=>{
|
|
4
|
-
const Element = `h${level}`;
|
|
5
|
-
return <Element className={`jsx-${styles.__hash}` + " " + "root"}>
|
|
6
|
-
|
|
7
|
-
<p className={`jsx-${styles.__hash}`}>dynamic element</p>
|
|
8
|
-
|
|
9
|
-
<_JSXStyle id={styles.__hash}>{styles}</_JSXStyle>
|
|
10
|
-
|
|
11
|
-
</Element>;
|
|
12
|
-
});
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
// TODO
|
|
2
|
-
// import React, { Component } from 'react'
|
|
3
|
-
|
|
4
|
-
// export default class Index extends Component {
|
|
5
|
-
// static getInitialProps() {
|
|
6
|
-
// return { color: 'aquamarine' }
|
|
7
|
-
// }
|
|
8
|
-
|
|
9
|
-
// render() {
|
|
10
|
-
// return (
|
|
11
|
-
// <div>
|
|
12
|
-
// {[1, 2].map(idx => (
|
|
13
|
-
// <div key={idx}>
|
|
14
|
-
// {[3, 4].map(idx2 => (
|
|
15
|
-
// <div key={idx2}>{this.props.color}</div>
|
|
16
|
-
// ))}
|
|
17
|
-
// </div>
|
|
18
|
-
// ))}
|
|
19
|
-
// {[1, 2].map(idx => (
|
|
20
|
-
// <div key={idx}>
|
|
21
|
-
// <div>
|
|
22
|
-
// {this.props.color}
|
|
23
|
-
// <div className="something">
|
|
24
|
-
// <React.Fragment>
|
|
25
|
-
// <div>
|
|
26
|
-
// <div>{this.props.color} hello there</div>
|
|
27
|
-
// </div>
|
|
28
|
-
// </React.Fragment>
|
|
29
|
-
// </div>
|
|
30
|
-
// </div>
|
|
31
|
-
// </div>
|
|
32
|
-
// ))}
|
|
33
|
-
// <style jsx>{`
|
|
34
|
-
// div {
|
|
35
|
-
// background: ${this.props.color};
|
|
36
|
-
// }
|
|
37
|
-
// `}</style>
|
|
38
|
-
// </div>
|
|
39
|
-
// )
|
|
40
|
-
// }
|
|
41
|
-
// }
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
// TODO
|
|
2
|
-
// import React, { Component } from 'react'
|
|
3
|
-
// export default class Index extends Component {
|
|
4
|
-
// static getInitialProps() {
|
|
5
|
-
// return { color: 'aquamarine' }
|
|
6
|
-
// }
|
|
7
|
-
// render() {
|
|
8
|
-
// return (
|
|
9
|
-
// <div>
|
|
10
|
-
// {[1, 2].map(idx => (
|
|
11
|
-
// <div key={idx}>
|
|
12
|
-
// {[3, 4].map(idx2 => (
|
|
13
|
-
// <div key={idx2}>{this.props.color}</div>
|
|
14
|
-
// ))}
|
|
15
|
-
// </div>
|
|
16
|
-
// ))}
|
|
17
|
-
// {[1, 2].map(idx => (
|
|
18
|
-
// <div key={idx}>
|
|
19
|
-
// <div>
|
|
20
|
-
// {this.props.color}
|
|
21
|
-
// <div className="something">
|
|
22
|
-
// <React.Fragment>
|
|
23
|
-
// <div>
|
|
24
|
-
// <div>{this.props.color} hello there</div>
|
|
25
|
-
// </div>
|
|
26
|
-
// </React.Fragment>
|
|
27
|
-
// </div>
|
|
28
|
-
// </div>
|
|
29
|
-
// </div>
|
|
30
|
-
// ))}
|
|
31
|
-
// <style jsx>{`
|
|
32
|
-
// div {
|
|
33
|
-
// background: ${this.props.color};
|
|
34
|
-
// }
|
|
35
|
-
// `}</style>
|
|
36
|
-
// </div>
|
|
37
|
-
// )
|
|
38
|
-
// }
|
|
39
|
-
// }
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
// TODO
|
|
2
|
-
// import React, { Component } from 'react'
|
|
3
|
-
// export default class Index extends Component {
|
|
4
|
-
// static getInitialProps() {
|
|
5
|
-
// return { color: 'aquamarine' }
|
|
6
|
-
// }
|
|
7
|
-
// render() {
|
|
8
|
-
// return (
|
|
9
|
-
// <div>
|
|
10
|
-
// {[1, 2].map(idx => (
|
|
11
|
-
// <div key={idx}>
|
|
12
|
-
// {[3, 4].map(idx2 => (
|
|
13
|
-
// <div key={idx2}>{this.props.color}</div>
|
|
14
|
-
// ))}
|
|
15
|
-
// </div>
|
|
16
|
-
// ))}
|
|
17
|
-
// {[1, 2].map(idx => (
|
|
18
|
-
// <div key={idx}>
|
|
19
|
-
// <div>
|
|
20
|
-
// {this.props.color}
|
|
21
|
-
// <div className="something">
|
|
22
|
-
// <React.Fragment>
|
|
23
|
-
// <div>
|
|
24
|
-
// <div>{this.props.color} hello there</div>
|
|
25
|
-
// </div>
|
|
26
|
-
// </React.Fragment>
|
|
27
|
-
// </div>
|
|
28
|
-
// </div>
|
|
29
|
-
// </div>
|
|
30
|
-
// ))}
|
|
31
|
-
// <style jsx>{`
|
|
32
|
-
// div {
|
|
33
|
-
// background: ${this.props.color};
|
|
34
|
-
// }
|
|
35
|
-
// `}</style>
|
|
36
|
-
// </div>
|
|
37
|
-
// )
|
|
38
|
-
// }
|
|
39
|
-
// }
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
// module.exports = () => <p><style jsx>{`p { color:red; }`}</style></p>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
// module.exports = () => <p><style jsx>{`p { color:red; }`}</style></p>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
// module.exports = () => <p><style jsx>{`p { color:red; }`}</style></p>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
// module.exports = () => <p><style>{`p { color:red; }`}</style></p>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
// module.exports = () => <p><style>{`p { color:red; }`}</style></p>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
// module.exports = () => <p><style>{`p { color:red; }`}</style></p>
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import styles from './styles'
|
|
2
|
-
const styles2 = require('./styles2')
|
|
3
|
-
import { foo as styles3 } from './styles'
|
|
4
|
-
|
|
5
|
-
export default () => (
|
|
6
|
-
<div>
|
|
7
|
-
<p className="foo">test</p>
|
|
8
|
-
<p>woot</p>
|
|
9
|
-
<style jsx global>
|
|
10
|
-
{styles2}
|
|
11
|
-
</style>
|
|
12
|
-
<style jsx>{styles3}</style>
|
|
13
|
-
<div>woot</div>
|
|
14
|
-
<style jsx>{`
|
|
15
|
-
p {
|
|
16
|
-
color: red;
|
|
17
|
-
}
|
|
18
|
-
div {
|
|
19
|
-
color: green;
|
|
20
|
-
}
|
|
21
|
-
`}</style>
|
|
22
|
-
<style jsx>{styles}</style>
|
|
23
|
-
</div>
|
|
24
|
-
)
|
|
25
|
-
|
|
26
|
-
export const Test = () => (
|
|
27
|
-
<div>
|
|
28
|
-
<p className="foo">test</p>
|
|
29
|
-
<p>woot</p>
|
|
30
|
-
<style jsx>{styles3}</style>
|
|
31
|
-
<div>woot</div>
|
|
32
|
-
<style jsx>{`
|
|
33
|
-
p {
|
|
34
|
-
color: red;
|
|
35
|
-
}
|
|
36
|
-
div {
|
|
37
|
-
color: green;
|
|
38
|
-
}
|
|
39
|
-
`}</style>
|
|
40
|
-
</div>
|
|
41
|
-
)
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import _JSXStyle from "styled-jsx/style";
|
|
2
|
-
import styles from './styles';
|
|
3
|
-
const styles2 = require('./styles2');
|
|
4
|
-
import { foo as styles3 } from './styles';
|
|
5
|
-
export default (()=><div className={"jsx-bee92b62eadf8a14 " + `jsx-${styles.__hash} jsx-${styles3.__hash}`}>
|
|
6
|
-
|
|
7
|
-
<p className={"jsx-bee92b62eadf8a14 " + `jsx-${styles.__hash} jsx-${styles3.__hash}` + " " + "foo"}>test</p>
|
|
8
|
-
|
|
9
|
-
<p className={"jsx-bee92b62eadf8a14 " + `jsx-${styles.__hash} jsx-${styles3.__hash}`}>woot</p>
|
|
10
|
-
|
|
11
|
-
<_JSXStyle id={styles2.__hash}>{styles2}</_JSXStyle>
|
|
12
|
-
|
|
13
|
-
<_JSXStyle id={styles3.__hash}>{styles3}</_JSXStyle>
|
|
14
|
-
|
|
15
|
-
<div className={"jsx-bee92b62eadf8a14 " + `jsx-${styles.__hash} jsx-${styles3.__hash}`}>woot</div>
|
|
16
|
-
|
|
17
|
-
<_JSXStyle id={"bee92b62eadf8a14"}>{"p.jsx-bee92b62eadf8a14{color:red}div.jsx-bee92b62eadf8a14{color:green}"}</_JSXStyle>
|
|
18
|
-
|
|
19
|
-
<_JSXStyle id={styles.__hash}>{styles}</_JSXStyle>
|
|
20
|
-
|
|
21
|
-
</div>);
|
|
22
|
-
export const Test = ()=><div className={"jsx-bee92b62eadf8a14 " + `jsx-${styles3.__hash}`}>
|
|
23
|
-
|
|
24
|
-
<p className={"jsx-bee92b62eadf8a14 " + `jsx-${styles3.__hash}` + " " + "foo"}>test</p>
|
|
25
|
-
|
|
26
|
-
<p className={"jsx-bee92b62eadf8a14 " + `jsx-${styles3.__hash}`}>woot</p>
|
|
27
|
-
|
|
28
|
-
<_JSXStyle id={styles3.__hash}>{styles3}</_JSXStyle>
|
|
29
|
-
|
|
30
|
-
<div className={"jsx-bee92b62eadf8a14 " + `jsx-${styles3.__hash}`}>woot</div>
|
|
31
|
-
|
|
32
|
-
<_JSXStyle id={"bee92b62eadf8a14"}>{"p.jsx-bee92b62eadf8a14{color:red}div.jsx-bee92b62eadf8a14{color:green}"}</_JSXStyle>
|
|
33
|
-
|
|
34
|
-
</div>;
|