@swc/plugin-styled-jsx 1.5.67 → 1.5.68
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/Cargo.toml +3 -3
- package/package.json +1 -1
- package/swc_plugin_styled_jsx.wasm +0 -0
- package/transform/Cargo.toml +4 -4
- package/transform/tests/fixture/attribute-generation-modes/output.js +7 -7
- package/transform/tests/fixture/css-selector-after-pseudo/output.js +1 -1
- package/transform/tests/fixture/css-tag-same-file/output.js +1 -1
- package/transform/tests/fixture/dynamic-element/output.js +3 -3
- package/transform/tests/fixture/dynamic-element-external/output.js +1 -1
- package/transform/tests/fixture/expressions/output.js +1 -1
- package/transform/tests/fixture/issue-30480/output.js +1 -1
- package/transform/tests/fixture/too-many/output.js +1 -1
- package/transform/tests/fixture/tpl-escape-2/output.js +1 -1
package/Cargo.toml
CHANGED
|
@@ -16,7 +16,7 @@ custom_transform = ["swc_core/common_concurrent"]
|
|
|
16
16
|
[dependencies]
|
|
17
17
|
easy-error = "1.0.0"
|
|
18
18
|
styled_jsx = { path = "./transform" }
|
|
19
|
-
swc_core = { version = "0.
|
|
19
|
+
swc_core = { version = "0.78.0", features = [
|
|
20
20
|
"common",
|
|
21
21
|
"ecma_ast",
|
|
22
22
|
"ecma_plugin_transform",
|
|
@@ -33,5 +33,5 @@ swc_core = { version = "0.76.6", features = [
|
|
|
33
33
|
tracing = { version = "0.1.37", features = ["release_max_level_off"] }
|
|
34
34
|
|
|
35
35
|
[dev-dependencies]
|
|
36
|
-
swc_core = { features = ["testing_transform"], version = "0.
|
|
37
|
-
testing = "0.33.
|
|
36
|
+
swc_core = { features = ["testing_transform"], version = "0.78.0" }
|
|
37
|
+
testing = "0.33.13"
|
package/package.json
CHANGED
|
Binary file
|
package/transform/Cargo.toml
CHANGED
|
@@ -4,7 +4,7 @@ description = "AST transforms visitor for styled-jsx"
|
|
|
4
4
|
edition = "2021"
|
|
5
5
|
license = "Apache-2.0"
|
|
6
6
|
name = "styled_jsx"
|
|
7
|
-
version = "0.
|
|
7
|
+
version = "0.35.0"
|
|
8
8
|
|
|
9
9
|
[features]
|
|
10
10
|
custom_transform = ["swc_core/common_concurrent"]
|
|
@@ -13,7 +13,7 @@ custom_transform = ["swc_core/common_concurrent"]
|
|
|
13
13
|
easy-error = "1.0.0"
|
|
14
14
|
tracing = "0.1.37"
|
|
15
15
|
|
|
16
|
-
swc_core = { version = "0.
|
|
16
|
+
swc_core = { version = "0.78.0", features = [
|
|
17
17
|
"common",
|
|
18
18
|
"ecma_ast",
|
|
19
19
|
"css_ast",
|
|
@@ -28,5 +28,5 @@ swc_core = { version = "0.76.6", features = [
|
|
|
28
28
|
] }
|
|
29
29
|
|
|
30
30
|
[dev-dependencies]
|
|
31
|
-
testing = "0.33.
|
|
32
|
-
swc_core = { features = ["testing_transform"], version = "0.
|
|
31
|
+
testing = "0.33.13"
|
|
32
|
+
swc_core = { features = ["testing_transform"], version = "0.78.0" }
|
|
@@ -22,7 +22,7 @@ export const Test2 = ()=><div className={"jsx-81a68341e430a972 " + `jsx-${styles
|
|
|
22
22
|
|
|
23
23
|
</div>;
|
|
24
24
|
// external and dynamic
|
|
25
|
-
export const Test3 = ({ color
|
|
25
|
+
export const Test3 = ({ color })=><div className={`jsx-${styles.__hash}` + " " + _JSXStyle.dynamic([
|
|
26
26
|
[
|
|
27
27
|
"f08108daf927b99d",
|
|
28
28
|
[
|
|
@@ -48,7 +48,7 @@ export const Test3 = ({ color })=><div className={`jsx-${styles.__hash}` + " "
|
|
|
48
48
|
|
|
49
49
|
</div>;
|
|
50
50
|
// external, static and dynamic
|
|
51
|
-
export const Test4 = ({ color
|
|
51
|
+
export const Test4 = ({ color })=><div className={`jsx-${styles.__hash}` + " jsx-ceba8c9ce34e3d0c " + _JSXStyle.dynamic([
|
|
52
52
|
[
|
|
53
53
|
"9779eebad83219f8",
|
|
54
54
|
[
|
|
@@ -86,7 +86,7 @@ export const Test5 = ()=><div className={"jsx-df0159ebd3f9fb6f"}>
|
|
|
86
86
|
|
|
87
87
|
</div>;
|
|
88
88
|
// static and dynamic
|
|
89
|
-
export const Test6 = ({ color
|
|
89
|
+
export const Test6 = ({ color })=><div className={"jsx-ceba8c9ce34e3d0c " + _JSXStyle.dynamic([
|
|
90
90
|
[
|
|
91
91
|
"9779eebad83219f8",
|
|
92
92
|
[
|
|
@@ -112,7 +112,7 @@ export const Test6 = ({ color })=><div className={"jsx-ceba8c9ce34e3d0c " + _JS
|
|
|
112
112
|
|
|
113
113
|
</div>;
|
|
114
114
|
// dynamic only
|
|
115
|
-
export const Test7 = ({ color
|
|
115
|
+
export const Test7 = ({ color })=><div className={_JSXStyle.dynamic([
|
|
116
116
|
[
|
|
117
117
|
"f08108daf927b99d",
|
|
118
118
|
[
|
|
@@ -136,7 +136,7 @@ export const Test7 = ({ color })=><div className={_JSXStyle.dynamic([
|
|
|
136
136
|
|
|
137
137
|
</div>;
|
|
138
138
|
// dynamic with scoped compound variable
|
|
139
|
-
export const Test8 = ({ color
|
|
139
|
+
export const Test8 = ({ color })=>{
|
|
140
140
|
if (color) {
|
|
141
141
|
const innerProps = {
|
|
142
142
|
color
|
|
@@ -167,7 +167,7 @@ export const Test8 = ({ color })=>{
|
|
|
167
167
|
}
|
|
168
168
|
};
|
|
169
169
|
// dynamic with compound variable
|
|
170
|
-
export const Test9 = ({ color
|
|
170
|
+
export const Test9 = ({ color })=>{
|
|
171
171
|
const innerProps = {
|
|
172
172
|
color
|
|
173
173
|
};
|
|
@@ -205,7 +205,7 @@ export const Test10 = ()=><div className={"jsx-f849b7a02be96503"}>
|
|
|
205
205
|
|
|
206
206
|
</div>;
|
|
207
207
|
// dynamic with complex scope
|
|
208
|
-
export const Test11 = ({ color
|
|
208
|
+
export const Test11 = ({ color })=>{
|
|
209
209
|
const items = Array.from({
|
|
210
210
|
length: 5
|
|
211
211
|
}).map((item, i)=><li key={i} className={_JSXStyle.dynamic([
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _JSXStyle from "styled-jsx/style";
|
|
2
|
-
export default (({ level =1
|
|
2
|
+
export default (({ level = 1 })=>{
|
|
3
3
|
const Element = `h${level}`;
|
|
4
4
|
return <Element className={"jsx-fca64cc3f069b519" + " " + "root"}>
|
|
5
5
|
|
|
@@ -9,7 +9,7 @@ export default (({ level =1 })=>{
|
|
|
9
9
|
|
|
10
10
|
</Element>;
|
|
11
11
|
});
|
|
12
|
-
export const TestLowerCase = ({ level =1
|
|
12
|
+
export const TestLowerCase = ({ level = 1 })=>{
|
|
13
13
|
const element = `h${level}`;
|
|
14
14
|
return <element className={"jsx-fca64cc3f069b519" + " " + "root"}>
|
|
15
15
|
|
|
@@ -29,7 +29,7 @@ export const Test2 = ()=>{
|
|
|
29
29
|
|
|
30
30
|
</Element2>;
|
|
31
31
|
};
|
|
32
|
-
export const Test3 = ({ Component ='div'
|
|
32
|
+
export const Test3 = ({ Component = 'div' })=>{
|
|
33
33
|
return <Component className={"jsx-f825b24bbab5b83b"}>
|
|
34
34
|
|
|
35
35
|
<p className={"jsx-f825b24bbab5b83b"}>dynamic element</p>
|
|
@@ -8,7 +8,7 @@ const animationName = 'my-cool-animation';
|
|
|
8
8
|
const obj = {
|
|
9
9
|
display: 'block'
|
|
10
10
|
};
|
|
11
|
-
export default (({ display
|
|
11
|
+
export default (({ display })=><div className={"jsx-b452af554142d27 " + _JSXStyle.dynamic([
|
|
12
12
|
[
|
|
13
13
|
"469c0b1cc43512b8",
|
|
14
14
|
[
|