@unocss/rule-utils 0.60.1 → 0.60.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/dist/index.mjs +3 -2
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -286,6 +286,7 @@ function createValueHandler(handlers) {
|
|
|
286
286
|
for (const name of Object.keys(handlers)) {
|
|
287
287
|
Object.defineProperty(handler, name, {
|
|
288
288
|
enumerable: true,
|
|
289
|
+
configurable: true,
|
|
289
290
|
get() {
|
|
290
291
|
return addProcessor(this, name);
|
|
291
292
|
}
|
|
@@ -370,7 +371,7 @@ function variantGetParameter(prefix, matcher, separators) {
|
|
|
370
371
|
}
|
|
371
372
|
}
|
|
372
373
|
|
|
373
|
-
const themeFnRE = /theme\(\s*['"]?(
|
|
374
|
+
const themeFnRE = /theme\(\s*(['"])?([^\1]*?)\1?\s*\)/g;
|
|
374
375
|
function hasThemeFn(str) {
|
|
375
376
|
return str.includes("theme(") && str.includes(")");
|
|
376
377
|
}
|
|
@@ -380,7 +381,7 @@ function transformThemeFn(code, theme, throwOnMissing = true) {
|
|
|
380
381
|
return code;
|
|
381
382
|
const s = new MagicString(code);
|
|
382
383
|
for (const match of matches) {
|
|
383
|
-
const rawArg = match[
|
|
384
|
+
const rawArg = match[2];
|
|
384
385
|
if (!rawArg)
|
|
385
386
|
throw new Error("theme() expect exact one argument, but got 0");
|
|
386
387
|
const value = transformThemeString(rawArg, theme, throwOnMissing);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unocss/rule-utils",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.60.
|
|
4
|
+
"version": "0.60.3",
|
|
5
5
|
"description": "Utilities for UnoCSS",
|
|
6
6
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"magic-string": "^0.30.10",
|
|
37
|
-
"@unocss/core": "^0.60.
|
|
37
|
+
"@unocss/core": "^0.60.3"
|
|
38
38
|
},
|
|
39
39
|
"scripts": {
|
|
40
40
|
"build": "unbuild",
|