@swc/plugin-styled-jsx 1.5.83 → 1.5.86
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,31 +0,0 @@
|
|
|
1
|
-
const Component = () => (
|
|
2
|
-
<>
|
|
3
|
-
<header>
|
|
4
|
-
<Comp>
|
|
5
|
-
<style jsx>{styles}</style>
|
|
6
|
-
<style jsx global>{``}</style>
|
|
7
|
-
</Comp>
|
|
8
|
-
<p><style jsx>{``}</style></p>
|
|
9
|
-
</header>
|
|
10
|
-
<div>
|
|
11
|
-
<h1>
|
|
12
|
-
Welcome!
|
|
13
|
-
<style jsx>{``}</style>
|
|
14
|
-
</h1>
|
|
15
|
-
<style jsx>{``}</style>
|
|
16
|
-
</div>
|
|
17
|
-
<div>
|
|
18
|
-
<style jsx>{``}</style>
|
|
19
|
-
<h1>
|
|
20
|
-
Hello world!
|
|
21
|
-
<style jsx global>{``}</style>
|
|
22
|
-
</h1>
|
|
23
|
-
</div>
|
|
24
|
-
<div>
|
|
25
|
-
<>
|
|
26
|
-
<style jsx>{styles}</style>
|
|
27
|
-
</>
|
|
28
|
-
<style jsx>{``}</style>
|
|
29
|
-
</div>
|
|
30
|
-
</>
|
|
31
|
-
)
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import _JSXStyle from "styled-jsx/style";
|
|
2
|
-
const Component = ()=><>
|
|
3
|
-
|
|
4
|
-
<header>
|
|
5
|
-
|
|
6
|
-
<Comp>
|
|
7
|
-
|
|
8
|
-
<_JSXStyle id={styles.__hash}>{styles}</_JSXStyle>
|
|
9
|
-
|
|
10
|
-
<_JSXStyle id={"b3e1b6a7c9b96113"}>{""}</_JSXStyle>
|
|
11
|
-
|
|
12
|
-
</Comp>
|
|
13
|
-
|
|
14
|
-
<p className={"jsx-b3e1b6a7c9b96113"}><_JSXStyle id={"b3e1b6a7c9b96113"}>{""}</_JSXStyle></p>
|
|
15
|
-
|
|
16
|
-
</header>
|
|
17
|
-
|
|
18
|
-
<div className={"jsx-b3e1b6a7c9b96113"}>
|
|
19
|
-
|
|
20
|
-
<h1 className={"jsx-b3e1b6a7c9b96113"}>
|
|
21
|
-
|
|
22
|
-
Welcome!
|
|
23
|
-
|
|
24
|
-
<style jsx>{``}</style>
|
|
25
|
-
|
|
26
|
-
</h1>
|
|
27
|
-
|
|
28
|
-
<_JSXStyle id={"b3e1b6a7c9b96113"}>{""}</_JSXStyle>
|
|
29
|
-
|
|
30
|
-
</div>
|
|
31
|
-
|
|
32
|
-
<div className={"jsx-b3e1b6a7c9b96113"}>
|
|
33
|
-
|
|
34
|
-
<_JSXStyle id={"b3e1b6a7c9b96113"}>{""}</_JSXStyle>
|
|
35
|
-
|
|
36
|
-
<h1 className={"jsx-b3e1b6a7c9b96113"}>
|
|
37
|
-
|
|
38
|
-
Hello world!
|
|
39
|
-
|
|
40
|
-
<style jsx global>{``}</style>
|
|
41
|
-
|
|
42
|
-
</h1>
|
|
43
|
-
|
|
44
|
-
</div>
|
|
45
|
-
|
|
46
|
-
<div className={"jsx-b3e1b6a7c9b96113"}>
|
|
47
|
-
|
|
48
|
-
<>
|
|
49
|
-
|
|
50
|
-
<style jsx>{styles}</style>
|
|
51
|
-
|
|
52
|
-
</>
|
|
53
|
-
|
|
54
|
-
<_JSXStyle id={"b3e1b6a7c9b96113"}>{""}</_JSXStyle>
|
|
55
|
-
|
|
56
|
-
</div>
|
|
57
|
-
|
|
58
|
-
</>;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
x Detected nested styled-jsx tag.
|
|
3
|
-
| Read more: https://nextjs.org/docs/messages/nested-styled-jsx-tags
|
|
4
|
-
,-[input.js:12:1]
|
|
5
|
-
12 | Welcome!
|
|
6
|
-
13 | <style jsx>{``}</style>
|
|
7
|
-
: ^^^^^^^^^^^^^^^^^^^^^^^
|
|
8
|
-
14 | </h1>
|
|
9
|
-
`----
|
|
10
|
-
|
|
11
|
-
x Detected nested styled-jsx tag.
|
|
12
|
-
| Read more: https://nextjs.org/docs/messages/nested-styled-jsx-tags
|
|
13
|
-
,-[input.js:20:1]
|
|
14
|
-
20 | Hello world!
|
|
15
|
-
21 | <style jsx global>{``}</style>
|
|
16
|
-
: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
17
|
-
22 | </h1>
|
|
18
|
-
`----
|
|
19
|
-
|
|
20
|
-
x Detected nested styled-jsx tag.
|
|
21
|
-
| Read more: https://nextjs.org/docs/messages/nested-styled-jsx-tags
|
|
22
|
-
,-[input.js:25:1]
|
|
23
|
-
25 | <>
|
|
24
|
-
26 | <style jsx>{styles}</style>
|
|
25
|
-
: ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
26
|
-
27 | </>
|
|
27
|
-
`----
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import _JSXStyle from "styled-jsx/style";
|
|
2
|
-
const Component = ()=><>
|
|
3
|
-
|
|
4
|
-
<header>
|
|
5
|
-
|
|
6
|
-
<Comp>
|
|
7
|
-
|
|
8
|
-
<_JSXStyle id={styles.__hash}>{styles}</_JSXStyle>
|
|
9
|
-
|
|
10
|
-
<_JSXStyle id={"b3e1b6a7c9b96113"}>{""}</_JSXStyle>
|
|
11
|
-
|
|
12
|
-
</Comp>
|
|
13
|
-
|
|
14
|
-
<p className={"jsx-b3e1b6a7c9b96113"}><_JSXStyle id={"b3e1b6a7c9b96113"}>{""}</_JSXStyle></p>
|
|
15
|
-
|
|
16
|
-
</header>
|
|
17
|
-
|
|
18
|
-
<div className={"jsx-b3e1b6a7c9b96113"}>
|
|
19
|
-
|
|
20
|
-
<h1 className={"jsx-b3e1b6a7c9b96113"}>
|
|
21
|
-
|
|
22
|
-
Welcome!
|
|
23
|
-
|
|
24
|
-
<style jsx>{``}</style>
|
|
25
|
-
|
|
26
|
-
</h1>
|
|
27
|
-
|
|
28
|
-
<_JSXStyle id={"b3e1b6a7c9b96113"}>{""}</_JSXStyle>
|
|
29
|
-
|
|
30
|
-
</div>
|
|
31
|
-
|
|
32
|
-
<div className={"jsx-b3e1b6a7c9b96113"}>
|
|
33
|
-
|
|
34
|
-
<_JSXStyle id={"b3e1b6a7c9b96113"}>{""}</_JSXStyle>
|
|
35
|
-
|
|
36
|
-
<h1 className={"jsx-b3e1b6a7c9b96113"}>
|
|
37
|
-
|
|
38
|
-
Hello world!
|
|
39
|
-
|
|
40
|
-
<style jsx global>{``}</style>
|
|
41
|
-
|
|
42
|
-
</h1>
|
|
43
|
-
|
|
44
|
-
</div>
|
|
45
|
-
|
|
46
|
-
<div className={"jsx-b3e1b6a7c9b96113"}>
|
|
47
|
-
|
|
48
|
-
<>
|
|
49
|
-
|
|
50
|
-
<style jsx>{styles}</style>
|
|
51
|
-
|
|
52
|
-
</>
|
|
53
|
-
|
|
54
|
-
<_JSXStyle id={"b3e1b6a7c9b96113"}>{""}</_JSXStyle>
|
|
55
|
-
|
|
56
|
-
</div>
|
|
57
|
-
|
|
58
|
-
</>;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
x Detected nested styled-jsx tag.
|
|
3
|
-
| Read more: https://nextjs.org/docs/messages/nested-styled-jsx-tags
|
|
4
|
-
,-[input.js:12:1]
|
|
5
|
-
12 | Welcome!
|
|
6
|
-
13 | <style jsx>{``}</style>
|
|
7
|
-
: ^^^^^^^^^^^^^^^^^^^^^^^
|
|
8
|
-
14 | </h1>
|
|
9
|
-
`----
|
|
10
|
-
|
|
11
|
-
x Detected nested styled-jsx tag.
|
|
12
|
-
| Read more: https://nextjs.org/docs/messages/nested-styled-jsx-tags
|
|
13
|
-
,-[input.js:20:1]
|
|
14
|
-
20 | Hello world!
|
|
15
|
-
21 | <style jsx global>{``}</style>
|
|
16
|
-
: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
17
|
-
22 | </h1>
|
|
18
|
-
`----
|
|
19
|
-
|
|
20
|
-
x Detected nested styled-jsx tag.
|
|
21
|
-
| Read more: https://nextjs.org/docs/messages/nested-styled-jsx-tags
|
|
22
|
-
,-[input.js:25:1]
|
|
23
|
-
25 | <>
|
|
24
|
-
26 | <style jsx>{styles}</style>
|
|
25
|
-
: ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
26
|
-
27 | </>
|
|
27
|
-
`----
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import _JSXStyle from "styled-jsx/style";
|
|
2
|
-
const Component = ()=><>
|
|
3
|
-
|
|
4
|
-
<header>
|
|
5
|
-
|
|
6
|
-
<Comp>
|
|
7
|
-
|
|
8
|
-
<_JSXStyle id={styles.__hash}>{styles}</_JSXStyle>
|
|
9
|
-
|
|
10
|
-
<_JSXStyle id={"b3e1b6a7c9b96113"}>{""}</_JSXStyle>
|
|
11
|
-
|
|
12
|
-
</Comp>
|
|
13
|
-
|
|
14
|
-
<p className={"jsx-b3e1b6a7c9b96113"}><_JSXStyle id={"b3e1b6a7c9b96113"}>{""}</_JSXStyle></p>
|
|
15
|
-
|
|
16
|
-
</header>
|
|
17
|
-
|
|
18
|
-
<div className={"jsx-b3e1b6a7c9b96113"}>
|
|
19
|
-
|
|
20
|
-
<h1 className={"jsx-b3e1b6a7c9b96113"}>
|
|
21
|
-
|
|
22
|
-
Welcome!
|
|
23
|
-
|
|
24
|
-
<style jsx>{``}</style>
|
|
25
|
-
|
|
26
|
-
</h1>
|
|
27
|
-
|
|
28
|
-
<_JSXStyle id={"b3e1b6a7c9b96113"}>{""}</_JSXStyle>
|
|
29
|
-
|
|
30
|
-
</div>
|
|
31
|
-
|
|
32
|
-
<div className={"jsx-b3e1b6a7c9b96113"}>
|
|
33
|
-
|
|
34
|
-
<_JSXStyle id={"b3e1b6a7c9b96113"}>{""}</_JSXStyle>
|
|
35
|
-
|
|
36
|
-
<h1 className={"jsx-b3e1b6a7c9b96113"}>
|
|
37
|
-
|
|
38
|
-
Hello world!
|
|
39
|
-
|
|
40
|
-
<style jsx global>{``}</style>
|
|
41
|
-
|
|
42
|
-
</h1>
|
|
43
|
-
|
|
44
|
-
</div>
|
|
45
|
-
|
|
46
|
-
<div className={"jsx-b3e1b6a7c9b96113"}>
|
|
47
|
-
|
|
48
|
-
<>
|
|
49
|
-
|
|
50
|
-
<style jsx>{styles}</style>
|
|
51
|
-
|
|
52
|
-
</>
|
|
53
|
-
|
|
54
|
-
<_JSXStyle id={"b3e1b6a7c9b96113"}>{""}</_JSXStyle>
|
|
55
|
-
|
|
56
|
-
</div>
|
|
57
|
-
|
|
58
|
-
</>;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
x Expected one child under JSX style tag, but got 2.
|
|
3
|
-
| Read more: https://nextjs.org/docs/messages/invalid-styled-jsx-children
|
|
4
|
-
,-[input.js:2:1]
|
|
5
|
-
2 | <div>
|
|
6
|
-
3 | ,-> <style jsx>
|
|
7
|
-
4 | | {`.p {}`}
|
|
8
|
-
5 | | {`.p {}`}
|
|
9
|
-
6 | `-> </style>
|
|
10
|
-
7 | </div>
|
|
11
|
-
`----
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
x Expected one child under JSX style tag, but got 2.
|
|
3
|
-
| Read more: https://nextjs.org/docs/messages/invalid-styled-jsx-children
|
|
4
|
-
,-[input.js:2:1]
|
|
5
|
-
2 | <div>
|
|
6
|
-
3 | ,-> <style jsx>
|
|
7
|
-
4 | | {`.p {}`}
|
|
8
|
-
5 | | {`.p {}`}
|
|
9
|
-
6 | `-> </style>
|
|
10
|
-
7 | </div>
|
|
11
|
-
`----
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
x Expected a template literal, string or identifier inside the JSXExpressionContainer.
|
|
3
|
-
| Read more: https://nextjs.org/docs/messages/invalid-styled-jsx-children
|
|
4
|
-
,-[input.js:2:1]
|
|
5
|
-
2 | <div>
|
|
6
|
-
3 | ,-> <style jsx>
|
|
7
|
-
4 | | {[]}
|
|
8
|
-
5 | `-> </style>
|
|
9
|
-
6 | </div>
|
|
10
|
-
`----
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
x Expected a template literal, string or identifier inside the JSXExpressionContainer.
|
|
3
|
-
| Read more: https://nextjs.org/docs/messages/invalid-styled-jsx-children
|
|
4
|
-
,-[input.js:2:1]
|
|
5
|
-
2 | <div>
|
|
6
|
-
3 | ,-> <style jsx>
|
|
7
|
-
4 | | {[]}
|
|
8
|
-
5 | `-> </style>
|
|
9
|
-
6 | </div>
|
|
10
|
-
`----
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
const darken = c => c
|
|
2
|
-
const color = 'red'
|
|
3
|
-
const otherColor = 'green'
|
|
4
|
-
const mediumScreen = '680px'
|
|
5
|
-
const animationDuration = '200ms'
|
|
6
|
-
const animationName = 'my-cool-animation'
|
|
7
|
-
const obj = { display: 'block' }
|
|
8
|
-
|
|
9
|
-
export default ({ display }) => (
|
|
10
|
-
<div>
|
|
11
|
-
<p>test</p>
|
|
12
|
-
<style jsx>{`
|
|
13
|
-
p.${color} {
|
|
14
|
-
color: ${otherColor};
|
|
15
|
-
display: ${obj.display};
|
|
16
|
-
}
|
|
17
|
-
`}</style>
|
|
18
|
-
<style jsx>{'p { color: red }'}</style>
|
|
19
|
-
<style jsx global>{`
|
|
20
|
-
body {
|
|
21
|
-
background: ${color};
|
|
22
|
-
}
|
|
23
|
-
`}</style>
|
|
24
|
-
<style jsx global>{`
|
|
25
|
-
body {
|
|
26
|
-
background: ${color};
|
|
27
|
-
}
|
|
28
|
-
`}</style>
|
|
29
|
-
// TODO: the next two should have the same hash
|
|
30
|
-
<style jsx>{`
|
|
31
|
-
p {
|
|
32
|
-
color: ${color};
|
|
33
|
-
}
|
|
34
|
-
`}</style>
|
|
35
|
-
<style jsx>{`
|
|
36
|
-
p {
|
|
37
|
-
color: ${color};
|
|
38
|
-
}
|
|
39
|
-
`}</style>
|
|
40
|
-
<style jsx>{`
|
|
41
|
-
p {
|
|
42
|
-
color: ${darken(color)};
|
|
43
|
-
}
|
|
44
|
-
`}</style>
|
|
45
|
-
<style jsx>{`
|
|
46
|
-
p {
|
|
47
|
-
color: ${darken(color) + 2};
|
|
48
|
-
}
|
|
49
|
-
`}</style>
|
|
50
|
-
<style jsx>{`
|
|
51
|
-
@media (min-width: ${mediumScreen}) {
|
|
52
|
-
p {
|
|
53
|
-
color: green;
|
|
54
|
-
}
|
|
55
|
-
p {
|
|
56
|
-
color: ${`red`};
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
p {
|
|
60
|
-
color: red;
|
|
61
|
-
}
|
|
62
|
-
`}</style>
|
|
63
|
-
<style jsx>{`
|
|
64
|
-
p {
|
|
65
|
-
animation-duration: ${animationDuration};
|
|
66
|
-
}
|
|
67
|
-
`}</style>
|
|
68
|
-
<style jsx>{`
|
|
69
|
-
p {
|
|
70
|
-
animation: ${animationDuration} forwards ${animationName};
|
|
71
|
-
}
|
|
72
|
-
div {
|
|
73
|
-
background: ${color};
|
|
74
|
-
}
|
|
75
|
-
`}</style>
|
|
76
|
-
|
|
77
|
-
<style jsx>{`
|
|
78
|
-
span {
|
|
79
|
-
display: ${display ? 'block' : 'none'};
|
|
80
|
-
}
|
|
81
|
-
`}</style>
|
|
82
|
-
// TODO: causes bad syntax
|
|
83
|
-
{/* <style jsx>{`
|
|
84
|
-
span:before {
|
|
85
|
-
display: ${display ? 'block' : 'none'};
|
|
86
|
-
content: '\`';
|
|
87
|
-
}
|
|
88
|
-
`}</style> */}
|
|
89
|
-
</div>
|
|
90
|
-
)
|