@unocss/transformer-attributify-jsx 0.45.13 → 0.45.18
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 +0 -4
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -73,8 +73,6 @@ export default defineConfig({
|
|
|
73
73
|
```html
|
|
74
74
|
<div translate-x-100% /> <!-- cannot end with `%` -->
|
|
75
75
|
|
|
76
|
-
<div hover:text-2xl /> <!-- cannot contain `:` -->
|
|
77
|
-
|
|
78
76
|
<div translate-x-[100px] /> <!-- cannot contain `[` or `]` -->
|
|
79
77
|
```
|
|
80
78
|
|
|
@@ -83,8 +81,6 @@ Instead, you may want to use valued attributes instead:
|
|
|
83
81
|
```html
|
|
84
82
|
<div translate="x-100%" />
|
|
85
83
|
|
|
86
|
-
<div hover="text-2xl" />
|
|
87
|
-
|
|
88
84
|
<div translate="x-[100px]" />
|
|
89
85
|
```
|
|
90
86
|
|
package/dist/index.cjs
CHANGED
|
@@ -40,7 +40,7 @@ function transformerAttributifyJsx(options = {}) {
|
|
|
40
40
|
const tasks = [];
|
|
41
41
|
for (const item of Array.from(code.original.matchAll(elementRE))) {
|
|
42
42
|
for (const attr of item[3].matchAll(attributeRE)) {
|
|
43
|
-
const matchedRule = attr[0];
|
|
43
|
+
const matchedRule = attr[0].replace(/\:/i, "-");
|
|
44
44
|
if (matchedRule.includes("=") || isBlocked(matchedRule))
|
|
45
45
|
continue;
|
|
46
46
|
tasks.push(uno.parseToken(matchedRule).then((matched) => {
|
package/dist/index.mjs
CHANGED
|
@@ -38,7 +38,7 @@ function transformerAttributifyJsx(options = {}) {
|
|
|
38
38
|
const tasks = [];
|
|
39
39
|
for (const item of Array.from(code.original.matchAll(elementRE))) {
|
|
40
40
|
for (const attr of item[3].matchAll(attributeRE)) {
|
|
41
|
-
const matchedRule = attr[0];
|
|
41
|
+
const matchedRule = attr[0].replace(/\:/i, "-");
|
|
42
42
|
if (matchedRule.includes("=") || isBlocked(matchedRule))
|
|
43
43
|
continue;
|
|
44
44
|
tasks.push(uno.parseToken(matchedRule).then((matched) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unocss/transformer-attributify-jsx",
|
|
3
|
-
"version": "0.45.
|
|
3
|
+
"version": "0.45.18",
|
|
4
4
|
"description": "Support valueless attributify in JSX/TSX.",
|
|
5
5
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"dist"
|
|
33
33
|
],
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@unocss/core": "0.45.
|
|
35
|
+
"@unocss/core": "0.45.18"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"magic-string": "^0.26.2"
|