@unocss/transformer-attributify-jsx 65.4.0 → 65.4.3
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/README.md +7 -7
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
<!-- @unocss-ignore -->
|
|
4
4
|
|
|
5
|
-
Support [valueless attributify](https://github.com/unocss/unocss/tree/main/packages/preset-attributify#valueless-attributify) in JSX/TSX.
|
|
5
|
+
Support [valueless attributify](https://github.com/unocss/unocss/tree/main/packages-presets/preset-attributify#valueless-attributify) in JSX/TSX.
|
|
6
6
|
|
|
7
7
|
```jsx
|
|
8
8
|
export function Component() {
|
|
@@ -68,14 +68,16 @@ export default defineConfig({
|
|
|
68
68
|
|
|
69
69
|
## Caveats
|
|
70
70
|
|
|
71
|
-
If you encounter any issues with this package, there is [@unocss/transformer-attributify-jsx-babel](https://github.com/unocss/unocss/tree/main/packages/transformer-attributify-jsx-babel) package that uses Babel to transform JSX.
|
|
71
|
+
If you encounter any issues with this package, there is [@unocss/transformer-attributify-jsx-babel](https://github.com/unocss/unocss/tree/main/packages-presets/transformer-attributify-jsx-babel) package that uses Babel to transform JSX.
|
|
72
72
|
|
|
73
73
|
> ⚠️ The rules are almost the same as those of `preset-attributify`, but there are several precautions
|
|
74
74
|
|
|
75
75
|
```html
|
|
76
|
-
<div translate-x-100% />
|
|
76
|
+
<div translate-x-100% />
|
|
77
|
+
<!-- cannot end with `%` -->
|
|
77
78
|
|
|
78
|
-
<div translate-x-[100px] />
|
|
79
|
+
<div translate-x-[100px] />
|
|
80
|
+
<!-- cannot contain `[` or `]` -->
|
|
79
81
|
```
|
|
80
82
|
|
|
81
83
|
Instead, you may want to use valued attributes instead:
|
|
@@ -106,9 +108,7 @@ transformerAttributifyJsx({
|
|
|
106
108
|
Will be compiled to:
|
|
107
109
|
|
|
108
110
|
```html
|
|
109
|
-
<div text-red text-center text-5xl animate-bounce="">
|
|
110
|
-
unocss
|
|
111
|
-
</div>
|
|
111
|
+
<div text-red text-center text-5xl animate-bounce="">unocss</div>
|
|
112
112
|
```
|
|
113
113
|
|
|
114
114
|
## License
|
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unocss/transformer-attributify-jsx",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "65.4.
|
|
4
|
+
"version": "65.4.3",
|
|
5
5
|
"description": "Support valueless attributify in JSX/TSX.",
|
|
6
6
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"funding": "https://github.com/sponsors/antfu",
|
|
9
|
-
"homepage": "https://
|
|
9
|
+
"homepage": "https://unocss.dev",
|
|
10
10
|
"repository": {
|
|
11
11
|
"type": "git",
|
|
12
12
|
"url": "https://github.com/unocss/unocss",
|
|
13
|
-
"directory": "packages/transformer-attributify-jsx"
|
|
13
|
+
"directory": "packages-presets/transformer-attributify-jsx"
|
|
14
14
|
},
|
|
15
15
|
"bugs": {
|
|
16
16
|
"url": "https://github.com/unocss/unocss/issues"
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"dist"
|
|
34
34
|
],
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@unocss/core": "65.4.
|
|
36
|
+
"@unocss/core": "65.4.3"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"magic-string": "^0.30.17"
|