@unocss/preset-mini 0.16.4 → 0.17.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/default2.cjs +176 -327
- package/dist/chunks/default2.mjs +172 -320
- package/dist/chunks/default3.cjs +2 -1
- package/dist/chunks/default3.mjs +3 -2
- package/dist/chunks/pseudo.cjs +17 -0
- package/dist/chunks/pseudo.mjs +17 -1
- package/dist/chunks/utilities.cjs +143 -8
- package/dist/chunks/utilities.mjs +143 -10
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/rules.cjs +1 -4
- package/dist/rules.d.ts +2 -13
- package/dist/rules.mjs +2 -2
- package/dist/utils.cjs +2 -0
- package/dist/utils.d.ts +61 -5
- package/dist/utils.mjs +1 -1
- package/dist/variants.cjs +1 -0
- package/dist/variants.d.ts +2 -1
- package/dist/variants.mjs +1 -1
- package/package.json +2 -2
package/dist/utils.d.ts
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import * as _unocss_core from '@unocss/core';
|
|
2
|
-
import { VariantHandler,
|
|
2
|
+
import { VariantHandler, DynamicMatcher, ParsedColorValue } from '@unocss/core';
|
|
3
|
+
import { T as Theme } from './types-7963d0b3';
|
|
3
4
|
|
|
4
5
|
declare const directionMap: Record<string, string[]>;
|
|
5
6
|
declare const cornerMap: Record<string, string[]>;
|
|
6
7
|
declare const xyzMap: Record<string, string[]>;
|
|
7
8
|
|
|
8
9
|
declare function numberWithUnit(str: string): string | undefined;
|
|
10
|
+
declare function auto(str: string): "auto" | undefined;
|
|
9
11
|
declare function rem(str: string): string | undefined;
|
|
10
12
|
declare function px(str: string): string | undefined;
|
|
11
13
|
declare function number(str: string): number | undefined;
|
|
@@ -15,8 +17,10 @@ declare function bracket(str: string): string | undefined;
|
|
|
15
17
|
declare function cssvar(str: string): string | undefined;
|
|
16
18
|
declare function time(str: string): string | undefined;
|
|
17
19
|
declare function global(str: string): string | undefined;
|
|
20
|
+
declare function properties(str: string): string | undefined;
|
|
18
21
|
|
|
19
22
|
declare const handlers_numberWithUnit: typeof numberWithUnit;
|
|
23
|
+
declare const handlers_auto: typeof auto;
|
|
20
24
|
declare const handlers_rem: typeof rem;
|
|
21
25
|
declare const handlers_px: typeof px;
|
|
22
26
|
declare const handlers_number: typeof number;
|
|
@@ -26,9 +30,11 @@ declare const handlers_bracket: typeof bracket;
|
|
|
26
30
|
declare const handlers_cssvar: typeof cssvar;
|
|
27
31
|
declare const handlers_time: typeof time;
|
|
28
32
|
declare const handlers_global: typeof global;
|
|
33
|
+
declare const handlers_properties: typeof properties;
|
|
29
34
|
declare namespace handlers {
|
|
30
35
|
export {
|
|
31
36
|
handlers_numberWithUnit as numberWithUnit,
|
|
37
|
+
handlers_auto as auto,
|
|
32
38
|
handlers_rem as rem,
|
|
33
39
|
handlers_px as px,
|
|
34
40
|
handlers_number as number,
|
|
@@ -38,15 +44,65 @@ declare namespace handlers {
|
|
|
38
44
|
handlers_cssvar as cssvar,
|
|
39
45
|
handlers_time as time,
|
|
40
46
|
handlers_global as global,
|
|
47
|
+
handlers_properties as properties,
|
|
41
48
|
};
|
|
42
49
|
}
|
|
43
50
|
|
|
44
|
-
declare const handler: _unocss_core.ValueHandler<"number" | "numberWithUnit" | "rem" | "px" | "percent" | "fraction" | "bracket" | "cssvar" | "time" | "global">;
|
|
45
|
-
declare const h: _unocss_core.ValueHandler<"number" | "numberWithUnit" | "rem" | "px" | "percent" | "fraction" | "bracket" | "cssvar" | "time" | "global">;
|
|
51
|
+
declare const handler: _unocss_core.ValueHandler<"number" | "auto" | "numberWithUnit" | "rem" | "px" | "percent" | "fraction" | "bracket" | "cssvar" | "time" | "global" | "properties">;
|
|
52
|
+
declare const h: _unocss_core.ValueHandler<"number" | "auto" | "numberWithUnit" | "rem" | "px" | "percent" | "fraction" | "bracket" | "cssvar" | "time" | "global" | "properties">;
|
|
46
53
|
|
|
47
54
|
declare const variantMatcher: (name: string, selector?: ((input: string) => string | undefined) | undefined) => (input: string) => VariantHandler | undefined;
|
|
48
55
|
|
|
49
56
|
declare function capitalize<T extends string>(str: T): Capitalize<T>;
|
|
50
|
-
|
|
57
|
+
/**
|
|
58
|
+
* Provide {@link DynamicMatcher} function returning spacing definition. See spacing rules.
|
|
59
|
+
*
|
|
60
|
+
* @param {string} propertyPrefix - Property for the css value to be created. Postfix will be appended according to direction matched.
|
|
61
|
+
* @return {DynamicMatcher} {@link DynamicMatcher}
|
|
62
|
+
* @see {@link directionMap}
|
|
63
|
+
*/
|
|
64
|
+
declare const directionSize: (propertyPrefix: string) => DynamicMatcher;
|
|
65
|
+
/**
|
|
66
|
+
* Parse color string into rgba (if possible) with opacity opacity. Color value will be matched to theme object before converting to rgb value.
|
|
67
|
+
*
|
|
68
|
+
* @example Parseable strings:
|
|
69
|
+
* 'red' // From theme, if 'red' is available
|
|
70
|
+
* 'red-100' // From theme, plus scale
|
|
71
|
+
* 'red-100/20' // From theme, plus scale/opacity
|
|
72
|
+
* '#f12' // Hex color
|
|
73
|
+
* 'hex-f12' // Alternative hex color
|
|
74
|
+
* '[rgb(100,2,3)]/[var(--op)]' // Bracket with rgb color and bracket with opacity
|
|
75
|
+
*
|
|
76
|
+
* @param {string} body - Color string to be parsed.
|
|
77
|
+
* @param {Theme} theme - {@link Theme} object.
|
|
78
|
+
* @return {ParsedColorValue|undefined} {@link ParsedColorValue} object if string is parseable.
|
|
79
|
+
*/
|
|
80
|
+
declare const parseColor: (body: string, theme: Theme) => ParsedColorValue | undefined;
|
|
81
|
+
/**
|
|
82
|
+
* Provide {@link DynamicMatcher} function to produce color value matched from rule.
|
|
83
|
+
*
|
|
84
|
+
* @see {@link parseColor}
|
|
85
|
+
*
|
|
86
|
+
* @example Resolving 'red' from theme:
|
|
87
|
+
* colorResolver('background-color', 'background')('', 'red')
|
|
88
|
+
* return { 'background-color': '#f12' }
|
|
89
|
+
*
|
|
90
|
+
* @example Resolving 'red-100' from theme:
|
|
91
|
+
* colorResolver('background-color', 'background')('', 'red-100')
|
|
92
|
+
* return { '--un-background-opacity': '1', 'background-color': 'rgba(254,226,226,var(--un-bg-opacity))' }
|
|
93
|
+
*
|
|
94
|
+
* @example Resolving 'red-100/20' from theme:
|
|
95
|
+
* colorResolver('background-color', 'background')('', 'red-100/20')
|
|
96
|
+
* return { 'background-color': 'rgba(204,251,241,0.22)' }
|
|
97
|
+
*
|
|
98
|
+
* @example Resolving 'hex-124':
|
|
99
|
+
* colorResolver('color', 'text')('', 'hex-124')
|
|
100
|
+
* return { '--un-text-opacity': '1', 'color': 'rgba(17,34,68,var(--un-text-opacity))' }
|
|
101
|
+
*
|
|
102
|
+
* @param {string} property - Property for the css value to be created.
|
|
103
|
+
* @param {string} varName - Base name for the opacity variable.
|
|
104
|
+
* @return {DynamicMatcher} {@link DynamicMatcher} object.
|
|
105
|
+
*/
|
|
106
|
+
declare const colorResolver: (property: string, varName: string) => DynamicMatcher;
|
|
51
107
|
|
|
52
|
-
export { capitalize, cornerMap, directionMap, directionSize, h, handler, handlers as valueHandlers, variantMatcher, xyzMap };
|
|
108
|
+
export { capitalize, colorResolver, cornerMap, directionMap, directionSize, h, handler, parseColor, handlers as valueHandlers, variantMatcher, xyzMap };
|
package/dist/utils.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { b as capitalize, c as colorResolver, a as cornerMap, d as directionMap, e as directionSize, f as h, h as handler, p as parseColor, v as valueHandlers, x as xyzMap } from './chunks/utilities.mjs';
|
|
2
2
|
export { v as variantMatcher } from './chunks/variants.mjs';
|
|
3
3
|
import '@unocss/core';
|
package/dist/variants.cjs
CHANGED
|
@@ -19,5 +19,6 @@ exports.variantSpace = _default.variantSpace;
|
|
|
19
19
|
exports.variants = _default.variants;
|
|
20
20
|
exports.CONTROL_BYPASS_PSEUDO_CLASS = pseudo.CONTROL_BYPASS_PSEUDO_CLASS;
|
|
21
21
|
exports.PseudoClasses = pseudo.PseudoClasses;
|
|
22
|
+
exports.partClasses = pseudo.partClasses;
|
|
22
23
|
exports.variantPseudoClasses = pseudo.variantPseudoClasses;
|
|
23
24
|
exports.variantPseudoElements = pseudo.variantPseudoElements;
|
package/dist/variants.d.ts
CHANGED
|
@@ -18,5 +18,6 @@ declare const CONTROL_BYPASS_PSEUDO_CLASS = "$$no-pseudo";
|
|
|
18
18
|
declare const PseudoClasses: Record<string, string | undefined>;
|
|
19
19
|
declare const variantPseudoElements: VariantFunction;
|
|
20
20
|
declare const variantPseudoClasses: VariantObject;
|
|
21
|
+
declare const partClasses: VariantObject;
|
|
21
22
|
|
|
22
|
-
export { CONTROL_BYPASS_PSEUDO_CLASS, PseudoClasses, variantBreakpoints, variantColorsClass, variantColorsMedia, variantCombinators, variantImportant, variantNegative, variantPseudoClasses, variantPseudoElements, variantSpace, variants };
|
|
23
|
+
export { CONTROL_BYPASS_PSEUDO_CLASS, PseudoClasses, partClasses, variantBreakpoints, variantColorsClass, variantColorsMedia, variantCombinators, variantImportant, variantNegative, variantPseudoClasses, variantPseudoElements, variantSpace, variants };
|
package/dist/variants.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { c as variantBreakpoints, b as variantColorsClass, a as variantColorsMedia, d as variantCombinators, e as variantImportant, f as variantNegative, g as variantSpace, v as variants } from './chunks/default3.mjs';
|
|
2
|
-
export { C as CONTROL_BYPASS_PSEUDO_CLASS, P as PseudoClasses, v as variantPseudoClasses, a as variantPseudoElements } from './chunks/pseudo.mjs';
|
|
2
|
+
export { C as CONTROL_BYPASS_PSEUDO_CLASS, P as PseudoClasses, p as partClasses, v as variantPseudoClasses, a as variantPseudoElements } from './chunks/pseudo.mjs';
|
|
3
3
|
import './chunks/variants.mjs';
|
|
4
4
|
import '@unocss/core';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unocss/preset-mini",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.17.2",
|
|
4
4
|
"description": "The minimal preset for UnoCSS",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"unocss",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"*.css"
|
|
62
62
|
],
|
|
63
63
|
"dependencies": {
|
|
64
|
-
"@unocss/core": "0.
|
|
64
|
+
"@unocss/core": "0.17.2"
|
|
65
65
|
},
|
|
66
66
|
"scripts": {
|
|
67
67
|
"build": "unbuild",
|