@unocss/transformer-directives 0.58.6 → 0.58.8
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/dist/index.cjs +4 -3
- package/dist/index.mjs +4 -3
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -104,6 +104,7 @@ async function parseApply({ code, uno, offset, applyVariable }, node, childNode)
|
|
|
104
104
|
}, []);
|
|
105
105
|
if (!utils.length)
|
|
106
106
|
return;
|
|
107
|
+
const simicolonOffset = code.toString()[childNode.loc.end.offset] === ";" ? 1 : 0;
|
|
107
108
|
for (const i of utils) {
|
|
108
109
|
const [, _selector, body2, parent] = i;
|
|
109
110
|
const selectorOrGroup = _selector?.replace(core.regexScopePlaceholder, " ") || _selector;
|
|
@@ -131,14 +132,14 @@ async function parseApply({ code, uno, offset, applyVariable }, node, childNode)
|
|
|
131
132
|
code.appendLeft(calcOffset(node.loc.end.offset), css);
|
|
132
133
|
} else {
|
|
133
134
|
if (body2.includes("@"))
|
|
134
|
-
code.appendRight(code.original.length, body2);
|
|
135
|
+
code.appendRight(code.original.length + simicolonOffset, body2);
|
|
135
136
|
else
|
|
136
|
-
code.appendRight(calcOffset(childNode.loc.end.offset), body2);
|
|
137
|
+
code.appendRight(calcOffset(childNode.loc.end.offset + simicolonOffset), body2);
|
|
137
138
|
}
|
|
138
139
|
}
|
|
139
140
|
code.remove(
|
|
140
141
|
calcOffset(childNode.loc.start.offset),
|
|
141
|
-
calcOffset(childNode.loc.end.offset)
|
|
142
|
+
calcOffset(childNode.loc.end.offset + simicolonOffset)
|
|
142
143
|
);
|
|
143
144
|
}
|
|
144
145
|
|
package/dist/index.mjs
CHANGED
|
@@ -100,6 +100,7 @@ async function parseApply({ code, uno, offset, applyVariable }, node, childNode)
|
|
|
100
100
|
}, []);
|
|
101
101
|
if (!utils.length)
|
|
102
102
|
return;
|
|
103
|
+
const simicolonOffset = code.toString()[childNode.loc.end.offset] === ";" ? 1 : 0;
|
|
103
104
|
for (const i of utils) {
|
|
104
105
|
const [, _selector, body2, parent] = i;
|
|
105
106
|
const selectorOrGroup = _selector?.replace(regexScopePlaceholder, " ") || _selector;
|
|
@@ -127,14 +128,14 @@ async function parseApply({ code, uno, offset, applyVariable }, node, childNode)
|
|
|
127
128
|
code.appendLeft(calcOffset(node.loc.end.offset), css);
|
|
128
129
|
} else {
|
|
129
130
|
if (body2.includes("@"))
|
|
130
|
-
code.appendRight(code.original.length, body2);
|
|
131
|
+
code.appendRight(code.original.length + simicolonOffset, body2);
|
|
131
132
|
else
|
|
132
|
-
code.appendRight(calcOffset(childNode.loc.end.offset), body2);
|
|
133
|
+
code.appendRight(calcOffset(childNode.loc.end.offset + simicolonOffset), body2);
|
|
133
134
|
}
|
|
134
135
|
}
|
|
135
136
|
code.remove(
|
|
136
137
|
calcOffset(childNode.loc.start.offset),
|
|
137
|
-
calcOffset(childNode.loc.end.offset)
|
|
138
|
+
calcOffset(childNode.loc.end.offset + simicolonOffset)
|
|
138
139
|
);
|
|
139
140
|
}
|
|
140
141
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unocss/transformer-directives",
|
|
3
|
-
"version": "0.58.
|
|
3
|
+
"version": "0.58.8",
|
|
4
4
|
"description": "UnoCSS transformer for `@apply` directive",
|
|
5
5
|
"author": "hannoeru <me@hanlee.co>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
],
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"css-tree": "^2.3.1",
|
|
36
|
-
"@unocss/core": "0.58.
|
|
37
|
-
"@unocss/rule-utils": "0.58.
|
|
36
|
+
"@unocss/core": "0.58.8",
|
|
37
|
+
"@unocss/rule-utils": "0.58.8"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"magic-string": "^0.30.8"
|