@unocss/preset-mini 0.34.1 → 0.35.2
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/utilities.cjs +5 -1
- package/dist/chunks/utilities.mjs +5 -1
- package/dist/utils.d.ts +5 -2
- package/package.json +28 -28
|
@@ -427,7 +427,7 @@ function fraction(str) {
|
|
|
427
427
|
function bracketWithType(str, type) {
|
|
428
428
|
if (str && str.startsWith("[") && str.endsWith("]")) {
|
|
429
429
|
let base;
|
|
430
|
-
const match = str.match(/^\[(color|length):/i);
|
|
430
|
+
const match = str.match(/^\[(color|length|position):/i);
|
|
431
431
|
if (!match)
|
|
432
432
|
base = str.slice(1, -1);
|
|
433
433
|
else if (type && match[1] === type)
|
|
@@ -448,6 +448,9 @@ function bracketOfColor(str) {
|
|
|
448
448
|
function bracketOfLength(str) {
|
|
449
449
|
return bracketWithType(str, "length");
|
|
450
450
|
}
|
|
451
|
+
function bracketOfPosition(str) {
|
|
452
|
+
return bracketWithType(str, "position");
|
|
453
|
+
}
|
|
451
454
|
function cssvar(str) {
|
|
452
455
|
if (str.match(/^\$\S/))
|
|
453
456
|
return `var(--${core.escapeSelector(str.slice(1))})`;
|
|
@@ -491,6 +494,7 @@ const valueHandlers = {
|
|
|
491
494
|
bracket: bracket,
|
|
492
495
|
bracketOfColor: bracketOfColor,
|
|
493
496
|
bracketOfLength: bracketOfLength,
|
|
497
|
+
bracketOfPosition: bracketOfPosition,
|
|
494
498
|
cssvar: cssvar,
|
|
495
499
|
time: time,
|
|
496
500
|
degree: degree,
|
|
@@ -425,7 +425,7 @@ function fraction(str) {
|
|
|
425
425
|
function bracketWithType(str, type) {
|
|
426
426
|
if (str && str.startsWith("[") && str.endsWith("]")) {
|
|
427
427
|
let base;
|
|
428
|
-
const match = str.match(/^\[(color|length):/i);
|
|
428
|
+
const match = str.match(/^\[(color|length|position):/i);
|
|
429
429
|
if (!match)
|
|
430
430
|
base = str.slice(1, -1);
|
|
431
431
|
else if (type && match[1] === type)
|
|
@@ -446,6 +446,9 @@ function bracketOfColor(str) {
|
|
|
446
446
|
function bracketOfLength(str) {
|
|
447
447
|
return bracketWithType(str, "length");
|
|
448
448
|
}
|
|
449
|
+
function bracketOfPosition(str) {
|
|
450
|
+
return bracketWithType(str, "position");
|
|
451
|
+
}
|
|
449
452
|
function cssvar(str) {
|
|
450
453
|
if (str.match(/^\$\S/))
|
|
451
454
|
return `var(--${escapeSelector(str.slice(1))})`;
|
|
@@ -489,6 +492,7 @@ const valueHandlers = {
|
|
|
489
492
|
bracket: bracket,
|
|
490
493
|
bracketOfColor: bracketOfColor,
|
|
491
494
|
bracketOfLength: bracketOfLength,
|
|
495
|
+
bracketOfPosition: bracketOfPosition,
|
|
492
496
|
cssvar: cssvar,
|
|
493
497
|
time: time,
|
|
494
498
|
degree: degree,
|
package/dist/utils.d.ts
CHANGED
|
@@ -24,6 +24,7 @@ declare function fraction(str: string): string | undefined;
|
|
|
24
24
|
declare function bracket(str: string): string | undefined;
|
|
25
25
|
declare function bracketOfColor(str: string): string | undefined;
|
|
26
26
|
declare function bracketOfLength(str: string): string | undefined;
|
|
27
|
+
declare function bracketOfPosition(str: string): string | undefined;
|
|
27
28
|
declare function cssvar(str: string): string | undefined;
|
|
28
29
|
declare function time(str: string): string | undefined;
|
|
29
30
|
declare function degree(str: string): string | undefined;
|
|
@@ -40,6 +41,7 @@ declare const handlers_fraction: typeof fraction;
|
|
|
40
41
|
declare const handlers_bracket: typeof bracket;
|
|
41
42
|
declare const handlers_bracketOfColor: typeof bracketOfColor;
|
|
42
43
|
declare const handlers_bracketOfLength: typeof bracketOfLength;
|
|
44
|
+
declare const handlers_bracketOfPosition: typeof bracketOfPosition;
|
|
43
45
|
declare const handlers_cssvar: typeof cssvar;
|
|
44
46
|
declare const handlers_time: typeof time;
|
|
45
47
|
declare const handlers_degree: typeof degree;
|
|
@@ -57,6 +59,7 @@ declare namespace handlers {
|
|
|
57
59
|
handlers_bracket as bracket,
|
|
58
60
|
handlers_bracketOfColor as bracketOfColor,
|
|
59
61
|
handlers_bracketOfLength as bracketOfLength,
|
|
62
|
+
handlers_bracketOfPosition as bracketOfPosition,
|
|
60
63
|
handlers_cssvar as cssvar,
|
|
61
64
|
handlers_time as time,
|
|
62
65
|
handlers_degree as degree,
|
|
@@ -65,8 +68,8 @@ declare namespace handlers {
|
|
|
65
68
|
};
|
|
66
69
|
}
|
|
67
70
|
|
|
68
|
-
declare const handler: _unocss_core.ValueHandler<"number" | "global" | "auto" | "numberWithUnit" | "rem" | "px" | "percent" | "fraction" | "bracket" | "bracketOfColor" | "bracketOfLength" | "cssvar" | "time" | "degree" | "properties">;
|
|
69
|
-
declare const h: _unocss_core.ValueHandler<"number" | "global" | "auto" | "numberWithUnit" | "rem" | "px" | "percent" | "fraction" | "bracket" | "bracketOfColor" | "bracketOfLength" | "cssvar" | "time" | "degree" | "properties">;
|
|
71
|
+
declare const handler: _unocss_core.ValueHandler<"number" | "global" | "auto" | "numberWithUnit" | "rem" | "px" | "percent" | "fraction" | "bracket" | "bracketOfColor" | "bracketOfLength" | "bracketOfPosition" | "cssvar" | "time" | "degree" | "properties">;
|
|
72
|
+
declare const h: _unocss_core.ValueHandler<"number" | "global" | "auto" | "numberWithUnit" | "rem" | "px" | "percent" | "fraction" | "bracket" | "bracketOfColor" | "bracketOfLength" | "bracketOfPosition" | "cssvar" | "time" | "degree" | "properties">;
|
|
70
73
|
|
|
71
74
|
declare const variantMatcher: (name: string, selector?: ((input: string) => string | undefined) | undefined) => VariantObject;
|
|
72
75
|
declare const variantParentMatcher: (name: string, parent: string) => VariantObject;
|
package/package.json
CHANGED
|
@@ -1,67 +1,67 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unocss/preset-mini",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.35.2",
|
|
4
4
|
"description": "The minimal preset for UnoCSS",
|
|
5
|
-
"keywords": [
|
|
6
|
-
"unocss",
|
|
7
|
-
"unocss-preset"
|
|
8
|
-
],
|
|
9
|
-
"homepage": "https://github.com/unocss/unocss/tree/main/packages/preset-mini#readme",
|
|
10
|
-
"bugs": {
|
|
11
|
-
"url": "https://github.com/unocss/unocss/issues"
|
|
12
|
-
},
|
|
13
|
-
"license": "MIT",
|
|
14
5
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"funding": "https://github.com/sponsors/antfu",
|
|
8
|
+
"homepage": "https://github.com/unocss/unocss/tree/main/packages/preset-mini#readme",
|
|
15
9
|
"repository": {
|
|
16
10
|
"type": "git",
|
|
17
11
|
"url": "git+https://github.com/unocss/unocss.git",
|
|
18
12
|
"directory": "packages/preset-mini"
|
|
19
13
|
},
|
|
20
|
-
"
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
"
|
|
14
|
+
"bugs": {
|
|
15
|
+
"url": "https://github.com/unocss/unocss/issues"
|
|
16
|
+
},
|
|
17
|
+
"keywords": [
|
|
18
|
+
"unocss",
|
|
19
|
+
"unocss-preset"
|
|
20
|
+
],
|
|
21
|
+
"sideEffects": false,
|
|
24
22
|
"exports": {
|
|
25
23
|
".": {
|
|
24
|
+
"types": "./dist/index.d.ts",
|
|
26
25
|
"require": "./dist/index.cjs",
|
|
27
|
-
"import": "./dist/index.mjs"
|
|
28
|
-
"types": "./dist/index.d.ts"
|
|
26
|
+
"import": "./dist/index.mjs"
|
|
29
27
|
},
|
|
30
28
|
"./theme": {
|
|
29
|
+
"types": "./dist/theme.d.ts",
|
|
31
30
|
"require": "./dist/theme.cjs",
|
|
32
|
-
"import": "./dist/theme.mjs"
|
|
33
|
-
"types": "./dist/theme.d.ts"
|
|
31
|
+
"import": "./dist/theme.mjs"
|
|
34
32
|
},
|
|
35
33
|
"./variants": {
|
|
34
|
+
"types": "./dist/variants.d.ts",
|
|
36
35
|
"require": "./dist/variants.cjs",
|
|
37
|
-
"import": "./dist/variants.mjs"
|
|
38
|
-
"types": "./dist/variants.d.ts"
|
|
36
|
+
"import": "./dist/variants.mjs"
|
|
39
37
|
},
|
|
40
38
|
"./rules": {
|
|
39
|
+
"types": "./dist/rules.d.ts",
|
|
41
40
|
"require": "./dist/rules.cjs",
|
|
42
|
-
"import": "./dist/rules.mjs"
|
|
43
|
-
"types": "./dist/rules.d.ts"
|
|
41
|
+
"import": "./dist/rules.mjs"
|
|
44
42
|
},
|
|
45
43
|
"./colors": {
|
|
44
|
+
"types": "./dist/colors.d.ts",
|
|
46
45
|
"require": "./dist/colors.cjs",
|
|
47
|
-
"import": "./dist/colors.mjs"
|
|
48
|
-
"types": "./dist/colors.d.ts"
|
|
46
|
+
"import": "./dist/colors.mjs"
|
|
49
47
|
},
|
|
50
48
|
"./utils": {
|
|
49
|
+
"types": "./dist/utils.d.ts",
|
|
51
50
|
"require": "./dist/utils.cjs",
|
|
52
|
-
"import": "./dist/utils.mjs"
|
|
53
|
-
"types": "./dist/utils.d.ts"
|
|
51
|
+
"import": "./dist/utils.mjs"
|
|
54
52
|
},
|
|
55
53
|
"./*": "./*"
|
|
56
54
|
},
|
|
55
|
+
"main": "dist/index.cjs",
|
|
56
|
+
"module": "dist/index.mjs",
|
|
57
|
+
"types": "dist/index.d.ts",
|
|
57
58
|
"files": [
|
|
58
59
|
"dist",
|
|
59
60
|
"*.d.ts",
|
|
60
61
|
"*.css"
|
|
61
62
|
],
|
|
62
|
-
"sideEffects": false,
|
|
63
63
|
"dependencies": {
|
|
64
|
-
"@unocss/core": "0.
|
|
64
|
+
"@unocss/core": "0.35.2"
|
|
65
65
|
},
|
|
66
66
|
"scripts": {
|
|
67
67
|
"build": "unbuild",
|