@unocss/preset-mini 0.31.15 → 0.32.0
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/chunks/default2.cjs +1 -1
- package/dist/chunks/default2.mjs +1 -1
- package/dist/chunks/default3.cjs +19 -12
- package/dist/chunks/default3.mjs +19 -12
- package/package.json +2 -2
package/dist/chunks/default2.cjs
CHANGED
|
@@ -387,7 +387,7 @@ const overflowValues = [
|
|
|
387
387
|
"scroll"
|
|
388
388
|
];
|
|
389
389
|
const overflows = [
|
|
390
|
-
[/^(?:overflow|of)-(.+)$/, ([, v]) => overflowValues.includes(v) ? { overflow: v } : void 0, { autocomplete: [`(overflow|of)
|
|
390
|
+
[/^(?:overflow|of)-(.+)$/, ([, v]) => overflowValues.includes(v) ? { overflow: v } : void 0, { autocomplete: [`(overflow|of)-(${overflowValues.join("|")})`, `(overflow|of)-(x|y)-(${overflowValues.join("|")})`] }],
|
|
391
391
|
[/^(?:overflow|of)-([xy])-(.+)$/, ([, d, v]) => overflowValues.includes(v) ? { [`overflow-${d}`]: v } : void 0]
|
|
392
392
|
];
|
|
393
393
|
|
package/dist/chunks/default2.mjs
CHANGED
|
@@ -385,7 +385,7 @@ const overflowValues = [
|
|
|
385
385
|
"scroll"
|
|
386
386
|
];
|
|
387
387
|
const overflows = [
|
|
388
|
-
[/^(?:overflow|of)-(.+)$/, ([, v]) => overflowValues.includes(v) ? { overflow: v } : void 0, { autocomplete: [`(overflow|of)
|
|
388
|
+
[/^(?:overflow|of)-(.+)$/, ([, v]) => overflowValues.includes(v) ? { overflow: v } : void 0, { autocomplete: [`(overflow|of)-(${overflowValues.join("|")})`, `(overflow|of)-(x|y)-(${overflowValues.join("|")})`] }],
|
|
389
389
|
[/^(?:overflow|of)-([xy])-(.+)$/, ([, d, v]) => overflowValues.includes(v) ? { [`overflow-${d}`]: v } : void 0]
|
|
390
390
|
];
|
|
391
391
|
|
package/dist/chunks/default3.cjs
CHANGED
|
@@ -155,21 +155,28 @@ const variantImportant = {
|
|
|
155
155
|
},
|
|
156
156
|
autocomplete: "(important)"
|
|
157
157
|
};
|
|
158
|
+
const numberRE = /[0-9.]+(?:[a-z]+|%)?/;
|
|
158
159
|
const variantNegative = {
|
|
159
160
|
match(matcher) {
|
|
160
|
-
if (matcher.startsWith("-"))
|
|
161
|
-
return
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
161
|
+
if (!matcher.startsWith("-") || !matcher.match(/\d|-px|-full/))
|
|
162
|
+
return;
|
|
163
|
+
return {
|
|
164
|
+
matcher: matcher.slice(1),
|
|
165
|
+
body: (body) => {
|
|
166
|
+
let changed = false;
|
|
167
|
+
body.forEach((v) => {
|
|
168
|
+
const value = v[1]?.toString();
|
|
169
|
+
if (!value || v[0].startsWith("--un-scale") || value === "0")
|
|
170
|
+
return;
|
|
171
|
+
if (numberRE.test(value)) {
|
|
172
|
+
v[1] = value.replace(numberRE, (i) => `-${i}`);
|
|
173
|
+
changed = true;
|
|
174
|
+
}
|
|
175
|
+
});
|
|
176
|
+
if (changed)
|
|
169
177
|
return body;
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
}
|
|
178
|
+
}
|
|
179
|
+
};
|
|
173
180
|
}
|
|
174
181
|
};
|
|
175
182
|
|
package/dist/chunks/default3.mjs
CHANGED
|
@@ -153,21 +153,28 @@ const variantImportant = {
|
|
|
153
153
|
},
|
|
154
154
|
autocomplete: "(important)"
|
|
155
155
|
};
|
|
156
|
+
const numberRE = /[0-9.]+(?:[a-z]+|%)?/;
|
|
156
157
|
const variantNegative = {
|
|
157
158
|
match(matcher) {
|
|
158
|
-
if (matcher.startsWith("-"))
|
|
159
|
-
return
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
159
|
+
if (!matcher.startsWith("-") || !matcher.match(/\d|-px|-full/))
|
|
160
|
+
return;
|
|
161
|
+
return {
|
|
162
|
+
matcher: matcher.slice(1),
|
|
163
|
+
body: (body) => {
|
|
164
|
+
let changed = false;
|
|
165
|
+
body.forEach((v) => {
|
|
166
|
+
const value = v[1]?.toString();
|
|
167
|
+
if (!value || v[0].startsWith("--un-scale") || value === "0")
|
|
168
|
+
return;
|
|
169
|
+
if (numberRE.test(value)) {
|
|
170
|
+
v[1] = value.replace(numberRE, (i) => `-${i}`);
|
|
171
|
+
changed = true;
|
|
172
|
+
}
|
|
173
|
+
});
|
|
174
|
+
if (changed)
|
|
167
175
|
return body;
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
}
|
|
176
|
+
}
|
|
177
|
+
};
|
|
171
178
|
}
|
|
172
179
|
};
|
|
173
180
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unocss/preset-mini",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.32.0",
|
|
4
4
|
"description": "The minimal preset for UnoCSS",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"unocss",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
],
|
|
62
62
|
"sideEffects": false,
|
|
63
63
|
"dependencies": {
|
|
64
|
-
"@unocss/core": "0.
|
|
64
|
+
"@unocss/core": "0.32.0"
|
|
65
65
|
},
|
|
66
66
|
"scripts": {
|
|
67
67
|
"build": "unbuild",
|