@unocss/core 0.55.5 → 0.55.7
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 +6 -2
- package/dist/index.d.cts +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +6 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -15,6 +15,10 @@ function escapeSelector(str) {
|
|
|
15
15
|
result += "\uFFFD";
|
|
16
16
|
continue;
|
|
17
17
|
}
|
|
18
|
+
if (codeUnit === 37) {
|
|
19
|
+
result += "\\%";
|
|
20
|
+
continue;
|
|
21
|
+
}
|
|
18
22
|
if (codeUnit === 44) {
|
|
19
23
|
result += "\\,";
|
|
20
24
|
continue;
|
|
@@ -609,7 +613,7 @@ function mergeAutocompleteShorthands(shorthands) {
|
|
|
609
613
|
);
|
|
610
614
|
}
|
|
611
615
|
|
|
612
|
-
const version = "0.55.
|
|
616
|
+
const version = "0.55.7";
|
|
613
617
|
|
|
614
618
|
var __defProp = Object.defineProperty;
|
|
615
619
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
@@ -1099,7 +1103,7 @@ class UnoGenerator {
|
|
|
1099
1103
|
}).flat(2).filter(Boolean));
|
|
1100
1104
|
}
|
|
1101
1105
|
isBlocked(raw) {
|
|
1102
|
-
return !raw || this.config.blocklist.some((e2) => isString(e2) ? e2 === raw : e2.test(raw));
|
|
1106
|
+
return !raw || this.config.blocklist.some((e2) => typeof e2 === "function" ? e2(raw) : isString(e2) ? e2 === raw : e2.test(raw));
|
|
1103
1107
|
}
|
|
1104
1108
|
}
|
|
1105
1109
|
function createGenerator(config, defaults) {
|
package/dist/index.d.cts
CHANGED
|
@@ -362,7 +362,7 @@ interface Preflight<Theme extends object = object> {
|
|
|
362
362
|
getCSS: (context: PreflightContext<Theme>) => Promise<string | undefined> | string | undefined;
|
|
363
363
|
layer?: string;
|
|
364
364
|
}
|
|
365
|
-
type BlocklistRule = string | RegExp;
|
|
365
|
+
type BlocklistRule = string | RegExp | ((selector: string) => boolean | null | undefined);
|
|
366
366
|
interface VariantHandlerContext {
|
|
367
367
|
/**
|
|
368
368
|
* Rewrite the output selector. Often be used to append parents.
|
package/dist/index.d.mts
CHANGED
|
@@ -362,7 +362,7 @@ interface Preflight<Theme extends object = object> {
|
|
|
362
362
|
getCSS: (context: PreflightContext<Theme>) => Promise<string | undefined> | string | undefined;
|
|
363
363
|
layer?: string;
|
|
364
364
|
}
|
|
365
|
-
type BlocklistRule = string | RegExp;
|
|
365
|
+
type BlocklistRule = string | RegExp | ((selector: string) => boolean | null | undefined);
|
|
366
366
|
interface VariantHandlerContext {
|
|
367
367
|
/**
|
|
368
368
|
* Rewrite the output selector. Often be used to append parents.
|
package/dist/index.d.ts
CHANGED
|
@@ -362,7 +362,7 @@ interface Preflight<Theme extends object = object> {
|
|
|
362
362
|
getCSS: (context: PreflightContext<Theme>) => Promise<string | undefined> | string | undefined;
|
|
363
363
|
layer?: string;
|
|
364
364
|
}
|
|
365
|
-
type BlocklistRule = string | RegExp;
|
|
365
|
+
type BlocklistRule = string | RegExp | ((selector: string) => boolean | null | undefined);
|
|
366
366
|
interface VariantHandlerContext {
|
|
367
367
|
/**
|
|
368
368
|
* Rewrite the output selector. Often be used to append parents.
|
package/dist/index.mjs
CHANGED
|
@@ -13,6 +13,10 @@ function escapeSelector(str) {
|
|
|
13
13
|
result += "\uFFFD";
|
|
14
14
|
continue;
|
|
15
15
|
}
|
|
16
|
+
if (codeUnit === 37) {
|
|
17
|
+
result += "\\%";
|
|
18
|
+
continue;
|
|
19
|
+
}
|
|
16
20
|
if (codeUnit === 44) {
|
|
17
21
|
result += "\\,";
|
|
18
22
|
continue;
|
|
@@ -607,7 +611,7 @@ function mergeAutocompleteShorthands(shorthands) {
|
|
|
607
611
|
);
|
|
608
612
|
}
|
|
609
613
|
|
|
610
|
-
const version = "0.55.
|
|
614
|
+
const version = "0.55.7";
|
|
611
615
|
|
|
612
616
|
var __defProp = Object.defineProperty;
|
|
613
617
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
@@ -1097,7 +1101,7 @@ class UnoGenerator {
|
|
|
1097
1101
|
}).flat(2).filter(Boolean));
|
|
1098
1102
|
}
|
|
1099
1103
|
isBlocked(raw) {
|
|
1100
|
-
return !raw || this.config.blocklist.some((e2) => isString(e2) ? e2 === raw : e2.test(raw));
|
|
1104
|
+
return !raw || this.config.blocklist.some((e2) => typeof e2 === "function" ? e2(raw) : isString(e2) ? e2 === raw : e2.test(raw));
|
|
1101
1105
|
}
|
|
1102
1106
|
}
|
|
1103
1107
|
function createGenerator(config, defaults) {
|