@swc/plugin-styled-jsx 1.5.84 → 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,35 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export const Red = ({
|
|
4
|
-
Component = 'button',
|
|
5
|
-
}) => {
|
|
6
|
-
|
|
7
|
-
return (
|
|
8
|
-
<Component
|
|
9
|
-
|
|
10
|
-
>
|
|
11
|
-
|
|
12
|
-
{/* Dynamic Styles */}
|
|
13
|
-
<style jsx>{`
|
|
14
|
-
.button {
|
|
15
|
-
--button-1: ${e1};
|
|
16
|
-
--button-2: ${e2};
|
|
17
|
-
--button-3: ${e3};
|
|
18
|
-
--button-4: ${e4};
|
|
19
|
-
--button-5: ${e5};
|
|
20
|
-
--button-6: ${e6};
|
|
21
|
-
--button-7: ${e7};
|
|
22
|
-
--button-8: ${e8};
|
|
23
|
-
--button-9: ${e9};
|
|
24
|
-
--button-10: ${e10};
|
|
25
|
-
--button-11: ${e11};
|
|
26
|
-
--button-12: ${e12};
|
|
27
|
-
--button-13: ${e13};
|
|
28
|
-
--button-14: ${e14};
|
|
29
|
-
--button-15: ${e15};
|
|
30
|
-
}
|
|
31
|
-
`}</style>
|
|
32
|
-
</Component>
|
|
33
|
-
);
|
|
34
|
-
};
|
|
35
|
-
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import _JSXStyle from "styled-jsx/style";
|
|
2
|
-
export const Red = ({ Component = 'button' })=>{
|
|
3
|
-
return <Component className={_JSXStyle.dynamic([
|
|
4
|
-
[
|
|
5
|
-
"1a9f9e2fa701f7ec",
|
|
6
|
-
[
|
|
7
|
-
e1,
|
|
8
|
-
e2,
|
|
9
|
-
e3,
|
|
10
|
-
e4,
|
|
11
|
-
e5,
|
|
12
|
-
e6,
|
|
13
|
-
e7,
|
|
14
|
-
e8,
|
|
15
|
-
e9,
|
|
16
|
-
e10,
|
|
17
|
-
e11,
|
|
18
|
-
e12,
|
|
19
|
-
e13,
|
|
20
|
-
e14,
|
|
21
|
-
e15
|
|
22
|
-
]
|
|
23
|
-
]
|
|
24
|
-
])}>
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
{}
|
|
29
|
-
|
|
30
|
-
<_JSXStyle id={"1a9f9e2fa701f7ec"} dynamic={[
|
|
31
|
-
e1,
|
|
32
|
-
e2,
|
|
33
|
-
e3,
|
|
34
|
-
e4,
|
|
35
|
-
e5,
|
|
36
|
-
e6,
|
|
37
|
-
e7,
|
|
38
|
-
e8,
|
|
39
|
-
e9,
|
|
40
|
-
e10,
|
|
41
|
-
e11,
|
|
42
|
-
e12,
|
|
43
|
-
e13,
|
|
44
|
-
e14,
|
|
45
|
-
e15
|
|
46
|
-
]}>{`.button.__jsx-style-dynamic-selector{--button-1:${e1};--button-2:${e2};--button-3:${e3};--button-4:${e4};--button-5:${e5};--button-6:${e6};--button-7:${e7};--button-8:${e8};--button-9:${e9};--button-10:${e10};--button-11:${e11};--button-12:${e12};--button-13:${e13};--button-14:${e14};--button-15:${e15}}`}</_JSXStyle>
|
|
47
|
-
|
|
48
|
-
</Component>;
|
|
49
|
-
};
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import _JSXStyle from "styled-jsx/style";
|
|
2
|
-
export const Red = ({ Component = 'button' })=>{
|
|
3
|
-
return <Component className={_JSXStyle.dynamic([
|
|
4
|
-
[
|
|
5
|
-
"1a9f9e2fa701f7ec",
|
|
6
|
-
[
|
|
7
|
-
e1,
|
|
8
|
-
e2,
|
|
9
|
-
e3,
|
|
10
|
-
e4,
|
|
11
|
-
e5,
|
|
12
|
-
e6,
|
|
13
|
-
e7,
|
|
14
|
-
e8,
|
|
15
|
-
e9,
|
|
16
|
-
e10,
|
|
17
|
-
e11,
|
|
18
|
-
e12,
|
|
19
|
-
e13,
|
|
20
|
-
e14,
|
|
21
|
-
e15
|
|
22
|
-
]
|
|
23
|
-
]
|
|
24
|
-
])}>
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
{}
|
|
29
|
-
|
|
30
|
-
<_JSXStyle id={"1a9f9e2fa701f7ec"} dynamic={[
|
|
31
|
-
e1,
|
|
32
|
-
e2,
|
|
33
|
-
e3,
|
|
34
|
-
e4,
|
|
35
|
-
e5,
|
|
36
|
-
e6,
|
|
37
|
-
e7,
|
|
38
|
-
e8,
|
|
39
|
-
e9,
|
|
40
|
-
e10,
|
|
41
|
-
e11,
|
|
42
|
-
e12,
|
|
43
|
-
e13,
|
|
44
|
-
e14,
|
|
45
|
-
e15
|
|
46
|
-
]}>{`.button.__jsx-style-dynamic-selector{--button-1:${e1};--button-2:${e2};--button-3:${e3};--button-4:${e4};--button-5:${e5};--button-6:${e6};--button-7:${e7};--button-8:${e8};--button-9:${e9};--button-10:${e10};--button-11:${e11};--button-12:${e12};--button-13:${e13};--button-14:${e14};--button-15:${e15}}`}</_JSXStyle>
|
|
47
|
-
|
|
48
|
-
</Component>;
|
|
49
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import _JSXStyle from "styled-jsx/style";
|
|
2
|
-
export default class {
|
|
3
|
-
render() {
|
|
4
|
-
return <div className={"jsx-1f6cef12199c3a8f"}>
|
|
5
|
-
|
|
6
|
-
<p className={"jsx-1f6cef12199c3a8f"}>test</p>
|
|
7
|
-
|
|
8
|
-
<_JSXStyle id={"1f6cef12199c3a8f"}>{'p.jsx-1f6cef12199c3a8f{content:"`"}'}</_JSXStyle>
|
|
9
|
-
|
|
10
|
-
</div>;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import _JSXStyle from "styled-jsx/style";
|
|
2
|
-
export default class {
|
|
3
|
-
render() {
|
|
4
|
-
return <div className={"jsx-1f6cef12199c3a8f"}>
|
|
5
|
-
|
|
6
|
-
<p className={"jsx-1f6cef12199c3a8f"}>test</p>
|
|
7
|
-
|
|
8
|
-
<_JSXStyle id={"1f6cef12199c3a8f"}>{'p.jsx-1f6cef12199c3a8f{content:"`"}'}</_JSXStyle>
|
|
9
|
-
|
|
10
|
-
</div>;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import _JSXStyle from "styled-jsx/style";
|
|
2
|
-
export default function Home({ fontFamily }) {
|
|
3
|
-
return <div className={_JSXStyle.dynamic([
|
|
4
|
-
[
|
|
5
|
-
"3892513b52a23034",
|
|
6
|
-
[
|
|
7
|
-
fontFamily
|
|
8
|
-
]
|
|
9
|
-
]
|
|
10
|
-
])}>
|
|
11
|
-
|
|
12
|
-
<_JSXStyle id={"3892513b52a23034"} dynamic={[
|
|
13
|
-
fontFamily
|
|
14
|
-
]}>{`body{font-family:${fontFamily}}code:before,code:after{content:"\`"}`}</_JSXStyle>
|
|
15
|
-
|
|
16
|
-
</div>;
|
|
17
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import _JSXStyle from "styled-jsx/style";
|
|
2
|
-
export default function Home({ fontFamily }) {
|
|
3
|
-
return <div className={_JSXStyle.dynamic([
|
|
4
|
-
[
|
|
5
|
-
"3892513b52a23034",
|
|
6
|
-
[
|
|
7
|
-
fontFamily
|
|
8
|
-
]
|
|
9
|
-
]
|
|
10
|
-
])}>
|
|
11
|
-
|
|
12
|
-
<_JSXStyle id={"3892513b52a23034"} dynamic={[
|
|
13
|
-
fontFamily
|
|
14
|
-
]}>{`body{font-family:${fontFamily}}code:before,code:after{content:"\`"}`}</_JSXStyle>
|
|
15
|
-
|
|
16
|
-
</div>;
|
|
17
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import _JSXStyle from "styled-jsx/style";
|
|
2
|
-
export default class {
|
|
3
|
-
render() {
|
|
4
|
-
return <div className={_JSXStyle.dynamic([
|
|
5
|
-
[
|
|
6
|
-
"fc144a5ba38f1ea7",
|
|
7
|
-
[
|
|
8
|
-
inputSize ? 'height: calc(2 * var(--a)) !important;' : ''
|
|
9
|
-
]
|
|
10
|
-
]
|
|
11
|
-
])}>
|
|
12
|
-
|
|
13
|
-
<p className={_JSXStyle.dynamic([
|
|
14
|
-
[
|
|
15
|
-
"fc144a5ba38f1ea7",
|
|
16
|
-
[
|
|
17
|
-
inputSize ? 'height: calc(2 * var(--a)) !important;' : ''
|
|
18
|
-
]
|
|
19
|
-
]
|
|
20
|
-
])}>test</p>
|
|
21
|
-
|
|
22
|
-
<_JSXStyle id={"fc144a5ba38f1ea7"} dynamic={[
|
|
23
|
-
inputSize ? 'height: calc(2 * var(--a)) !important;' : ''
|
|
24
|
-
]}>{`@media only screen{a.__jsx-style-dynamic-selector{${inputSize ? 'height: calc(2 * var(--a)) !important;' : ''}}`}</_JSXStyle>
|
|
25
|
-
|
|
26
|
-
</div>;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import _JSXStyle from "styled-jsx/style";
|
|
2
|
-
export default class {
|
|
3
|
-
render() {
|
|
4
|
-
return <div className={_JSXStyle.dynamic([
|
|
5
|
-
[
|
|
6
|
-
"fc144a5ba38f1ea7",
|
|
7
|
-
[
|
|
8
|
-
inputSize ? 'height: calc(2 * var(--a)) !important;' : ''
|
|
9
|
-
]
|
|
10
|
-
]
|
|
11
|
-
])}>
|
|
12
|
-
|
|
13
|
-
<p className={_JSXStyle.dynamic([
|
|
14
|
-
[
|
|
15
|
-
"fc144a5ba38f1ea7",
|
|
16
|
-
[
|
|
17
|
-
inputSize ? 'height: calc(2 * var(--a)) !important;' : ''
|
|
18
|
-
]
|
|
19
|
-
]
|
|
20
|
-
])}>test</p>
|
|
21
|
-
|
|
22
|
-
<_JSXStyle id={"fc144a5ba38f1ea7"} dynamic={[
|
|
23
|
-
inputSize ? 'height: calc(2 * var(--a)) !important;' : ''
|
|
24
|
-
]}>{`@media only screen{a.__jsx-style-dynamic-selector{${inputSize ? 'height: calc(2 * var(--a)) !important;' : ''}:0}}`}</_JSXStyle>
|
|
25
|
-
|
|
26
|
-
</div>;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export default class {
|
|
2
|
-
render() {
|
|
3
|
-
return (
|
|
4
|
-
<div>
|
|
5
|
-
<p>test</p>
|
|
6
|
-
<style jsx>{`
|
|
7
|
-
:global(.a):hover .b {
|
|
8
|
-
a: ${a[b]}px !important;
|
|
9
|
-
b: translate3d(
|
|
10
|
-
0,
|
|
11
|
-
${-1 * (c || 0)}px,
|
|
12
|
-
-${d}px
|
|
13
|
-
)
|
|
14
|
-
scale(1) !important;
|
|
15
|
-
}
|
|
16
|
-
`}</style>
|
|
17
|
-
</div>
|
|
18
|
-
)
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import _JSXStyle from "styled-jsx/style";
|
|
2
|
-
export default class {
|
|
3
|
-
render() {
|
|
4
|
-
return <div className={_JSXStyle.dynamic([
|
|
5
|
-
[
|
|
6
|
-
"2afd62ca79f8b081",
|
|
7
|
-
[
|
|
8
|
-
a[b],
|
|
9
|
-
-1 * (c || 0),
|
|
10
|
-
d
|
|
11
|
-
]
|
|
12
|
-
]
|
|
13
|
-
])}>
|
|
14
|
-
|
|
15
|
-
<p className={_JSXStyle.dynamic([
|
|
16
|
-
[
|
|
17
|
-
"2afd62ca79f8b081",
|
|
18
|
-
[
|
|
19
|
-
a[b],
|
|
20
|
-
-1 * (c || 0),
|
|
21
|
-
d
|
|
22
|
-
]
|
|
23
|
-
]
|
|
24
|
-
])}>test</p>
|
|
25
|
-
|
|
26
|
-
<_JSXStyle id={"2afd62ca79f8b081"} dynamic={[
|
|
27
|
-
a[b],
|
|
28
|
-
-1 * (c || 0),
|
|
29
|
-
d
|
|
30
|
-
]}>{`.a:hover .b.__jsx-style-dynamic-selector{a:${a[b]}px!important;b:translate3d(0,${-1 * (c || 0)}px,-${d}px)scale(1)!important}`}</_JSXStyle>
|
|
31
|
-
|
|
32
|
-
</div>;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import _JSXStyle from "styled-jsx/style";
|
|
2
|
-
export default class {
|
|
3
|
-
render() {
|
|
4
|
-
return <div className={_JSXStyle.dynamic([
|
|
5
|
-
[
|
|
6
|
-
"2afd62ca79f8b081",
|
|
7
|
-
[
|
|
8
|
-
a[b],
|
|
9
|
-
-1 * (c || 0),
|
|
10
|
-
d
|
|
11
|
-
]
|
|
12
|
-
]
|
|
13
|
-
])}>
|
|
14
|
-
|
|
15
|
-
<p className={_JSXStyle.dynamic([
|
|
16
|
-
[
|
|
17
|
-
"2afd62ca79f8b081",
|
|
18
|
-
[
|
|
19
|
-
a[b],
|
|
20
|
-
-1 * (c || 0),
|
|
21
|
-
d
|
|
22
|
-
]
|
|
23
|
-
]
|
|
24
|
-
])}>test</p>
|
|
25
|
-
|
|
26
|
-
<_JSXStyle id={"2afd62ca79f8b081"} dynamic={[
|
|
27
|
-
a[b],
|
|
28
|
-
-1 * (c || 0),
|
|
29
|
-
d
|
|
30
|
-
]}>{`.a:hover .b.__jsx-style-dynamic-selector{a:${a[b]}px!important;b:translate3d(0,${-1 * (c || 0)}px,-${d}px)scale(1)!important}`}</_JSXStyle>
|
|
31
|
-
|
|
32
|
-
</div>;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import _JSXStyle from "styled-jsx/style";
|
|
2
|
-
export default class {
|
|
3
|
-
render() {
|
|
4
|
-
return <div className={_JSXStyle.dynamic([
|
|
5
|
-
[
|
|
6
|
-
"e37942245bf0eb35",
|
|
7
|
-
[
|
|
8
|
-
a
|
|
9
|
-
]
|
|
10
|
-
]
|
|
11
|
-
])}>
|
|
12
|
-
|
|
13
|
-
<p className={_JSXStyle.dynamic([
|
|
14
|
-
[
|
|
15
|
-
"e37942245bf0eb35",
|
|
16
|
-
[
|
|
17
|
-
a
|
|
18
|
-
]
|
|
19
|
-
]
|
|
20
|
-
])}>test</p>
|
|
21
|
-
|
|
22
|
-
<_JSXStyle id={"e37942245bf0eb35"} dynamic={[
|
|
23
|
-
a
|
|
24
|
-
]}>{`@media only screen{a.__jsx-style-dynamic-selector{color:${a}}}`}</_JSXStyle>
|
|
25
|
-
|
|
26
|
-
</div>;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import _JSXStyle from "styled-jsx/style";
|
|
2
|
-
export default class {
|
|
3
|
-
render() {
|
|
4
|
-
return <div className={_JSXStyle.dynamic([
|
|
5
|
-
[
|
|
6
|
-
"e37942245bf0eb35",
|
|
7
|
-
[
|
|
8
|
-
a
|
|
9
|
-
]
|
|
10
|
-
]
|
|
11
|
-
])}>
|
|
12
|
-
|
|
13
|
-
<p className={_JSXStyle.dynamic([
|
|
14
|
-
[
|
|
15
|
-
"e37942245bf0eb35",
|
|
16
|
-
[
|
|
17
|
-
a
|
|
18
|
-
]
|
|
19
|
-
]
|
|
20
|
-
])}>test</p>
|
|
21
|
-
|
|
22
|
-
<_JSXStyle id={"e37942245bf0eb35"} dynamic={[
|
|
23
|
-
a
|
|
24
|
-
]}>{`@media only screen{a.__jsx-style-dynamic-selector{color:${a}}}`}</_JSXStyle>
|
|
25
|
-
|
|
26
|
-
</div>;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import _JSXStyle from "styled-jsx/style";
|
|
2
|
-
export default class {
|
|
3
|
-
render() {
|
|
4
|
-
return <div className={_JSXStyle.dynamic([
|
|
5
|
-
[
|
|
6
|
-
"b9b97de593829e6",
|
|
7
|
-
[
|
|
8
|
-
a || 'var(--c)',
|
|
9
|
-
b || 'inherit'
|
|
10
|
-
]
|
|
11
|
-
]
|
|
12
|
-
])}>
|
|
13
|
-
|
|
14
|
-
<p className={_JSXStyle.dynamic([
|
|
15
|
-
[
|
|
16
|
-
"b9b97de593829e6",
|
|
17
|
-
[
|
|
18
|
-
a || 'var(--c)',
|
|
19
|
-
b || 'inherit'
|
|
20
|
-
]
|
|
21
|
-
]
|
|
22
|
-
])}>test</p>
|
|
23
|
-
|
|
24
|
-
<_JSXStyle id={"b9b97de593829e6"} dynamic={[
|
|
25
|
-
a || 'var(--c)',
|
|
26
|
-
b || 'inherit'
|
|
27
|
-
]}>{`.a:hover .b.__jsx-style-dynamic-selector{padding:0 ${a || 'var(--c)'};color:${b || 'inherit'};display:inline-block}`}</_JSXStyle>
|
|
28
|
-
|
|
29
|
-
</div>;
|
|
30
|
-
}
|
|
31
|
-
}
|
package/transform/tests/fixture/tpl-placeholder-4-as-part-of-value-in-multiple/output.swc.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import _JSXStyle from "styled-jsx/style";
|
|
2
|
-
export default class {
|
|
3
|
-
render() {
|
|
4
|
-
return <div className={_JSXStyle.dynamic([
|
|
5
|
-
[
|
|
6
|
-
"b9b97de593829e6",
|
|
7
|
-
[
|
|
8
|
-
a || 'var(--c)',
|
|
9
|
-
b || 'inherit'
|
|
10
|
-
]
|
|
11
|
-
]
|
|
12
|
-
])}>
|
|
13
|
-
|
|
14
|
-
<p className={_JSXStyle.dynamic([
|
|
15
|
-
[
|
|
16
|
-
"b9b97de593829e6",
|
|
17
|
-
[
|
|
18
|
-
a || 'var(--c)',
|
|
19
|
-
b || 'inherit'
|
|
20
|
-
]
|
|
21
|
-
]
|
|
22
|
-
])}>test</p>
|
|
23
|
-
|
|
24
|
-
<_JSXStyle id={"b9b97de593829e6"} dynamic={[
|
|
25
|
-
a || 'var(--c)',
|
|
26
|
-
b || 'inherit'
|
|
27
|
-
]}>{`.a:hover .b.__jsx-style-dynamic-selector{display:inline-block;padding:0 ${a || 'var(--c)'};color:${b || 'inherit'}}`}</_JSXStyle>
|
|
28
|
-
|
|
29
|
-
</div>;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import _JSXStyle from "styled-jsx/style";
|
|
2
|
-
export default class {
|
|
3
|
-
render() {
|
|
4
|
-
return <div className={_JSXStyle.dynamic([
|
|
5
|
-
[
|
|
6
|
-
"23692842dc904882",
|
|
7
|
-
[
|
|
8
|
-
a ? '100%' : '200px',
|
|
9
|
-
b ? '0' : '8px 20px'
|
|
10
|
-
]
|
|
11
|
-
]
|
|
12
|
-
])}>
|
|
13
|
-
|
|
14
|
-
<p className={_JSXStyle.dynamic([
|
|
15
|
-
[
|
|
16
|
-
"23692842dc904882",
|
|
17
|
-
[
|
|
18
|
-
a ? '100%' : '200px',
|
|
19
|
-
b ? '0' : '8px 20px'
|
|
20
|
-
]
|
|
21
|
-
]
|
|
22
|
-
])}>test</p>
|
|
23
|
-
|
|
24
|
-
<_JSXStyle id={"23692842dc904882"} dynamic={[
|
|
25
|
-
a ? '100%' : '200px',
|
|
26
|
-
b ? '0' : '8px 20px'
|
|
27
|
-
]}>{`.item.__jsx-style-dynamic-selector{max-width:${a ? '100%' : '200px'};padding:${b ? '0' : '8px 20px'}}`}</_JSXStyle>
|
|
28
|
-
|
|
29
|
-
</div>;
|
|
30
|
-
}
|
|
31
|
-
}
|
package/transform/tests/fixture/tpl-placeholder-5-values-of-multiple-properties/output.swc.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import _JSXStyle from "styled-jsx/style";
|
|
2
|
-
export default class {
|
|
3
|
-
render() {
|
|
4
|
-
return <div className={_JSXStyle.dynamic([
|
|
5
|
-
[
|
|
6
|
-
"23692842dc904882",
|
|
7
|
-
[
|
|
8
|
-
a ? '100%' : '200px',
|
|
9
|
-
b ? '0' : '8px 20px'
|
|
10
|
-
]
|
|
11
|
-
]
|
|
12
|
-
])}>
|
|
13
|
-
|
|
14
|
-
<p className={_JSXStyle.dynamic([
|
|
15
|
-
[
|
|
16
|
-
"23692842dc904882",
|
|
17
|
-
[
|
|
18
|
-
a ? '100%' : '200px',
|
|
19
|
-
b ? '0' : '8px 20px'
|
|
20
|
-
]
|
|
21
|
-
]
|
|
22
|
-
])}>test</p>
|
|
23
|
-
|
|
24
|
-
<_JSXStyle id={"23692842dc904882"} dynamic={[
|
|
25
|
-
a ? '100%' : '200px',
|
|
26
|
-
b ? '0' : '8px 20px'
|
|
27
|
-
]}>{`.item.__jsx-style-dynamic-selector{max-width:${a ? '100%' : '200px'};padding:${b ? '0' : '8px 20px'}}`}</_JSXStyle>
|
|
28
|
-
|
|
29
|
-
</div>;
|
|
30
|
-
}
|
|
31
|
-
}
|