@unocss/preset-mini 0.25.0 → 0.26.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/rules.d.ts CHANGED
@@ -1,10 +1,10 @@
1
1
  import { Rule } from '@unocss/core';
2
- import { T as Theme } from './types-ef1d7462';
2
+ import { T as Theme } from './types-f7b2c653';
3
3
 
4
4
  declare const verticalAligns: Rule[];
5
5
  declare const textAligns: Rule[];
6
6
 
7
- declare const outline: Rule[];
7
+ declare const outline: Rule<Theme>[];
8
8
  declare const appearance: Rule[];
9
9
  declare const willChange: Rule[];
10
10
 
@@ -22,11 +22,11 @@ declare const bgColors: Rule[];
22
22
 
23
23
  declare const rules: Rule[];
24
24
 
25
- declare const flex: Rule[];
25
+ declare const flex: Rule<Theme>[];
26
26
 
27
27
  declare const gaps: Rule[];
28
28
 
29
- declare const grids: Rule[];
29
+ declare const grids: Rule<Theme>[];
30
30
 
31
31
  declare const overflows: Rule[];
32
32
 
@@ -49,13 +49,6 @@ declare const questionMark: Rule[];
49
49
 
50
50
  declare const rings: Rule<Theme>[];
51
51
 
52
- declare const shadowBase: {
53
- "$$shortcut-no-merge": string;
54
- '--un-ring-offset-shadow': string;
55
- '--un-ring-shadow': string;
56
- '--un-shadow-inset': string;
57
- '--un-shadow': string;
58
- };
59
52
  declare const boxShadows: Rule<Theme>[];
60
53
 
61
54
  declare const sizes: Rule<Theme>[];
@@ -79,7 +72,7 @@ declare const textTransforms: Rule[];
79
72
  declare const fontStyles: Rule[];
80
73
  declare const fontSmoothings: Rule[];
81
74
 
82
- declare const svgUtilities: Rule[];
75
+ declare const svgUtilities: Rule<Theme>[];
83
76
 
84
77
  declare const transforms: Rule[];
85
78
 
@@ -94,6 +87,6 @@ declare const textShadows: Rule<Theme>[];
94
87
  declare const cssVariables: Rule[];
95
88
  declare const cssProperty: Rule[];
96
89
 
97
- declare const textDecorations: Rule[];
90
+ declare const textDecorations: Rule<Theme>[];
98
91
 
99
- export { alignments, appearance, appearances, aspectRatio, bgColors, borders, boxShadows, boxSizing, breaks, contents, cssProperty, cssVariables, cursors, displays, flex, floats, fontSmoothings, fontStyles, fonts, gaps, grids, insets, justifies, margins, opacity, orders, outline, overflows, paddings, placements, pointerEvents, positions, questionMark, resizes, rings, rules, shadowBase, sizes, svgUtilities, tabSizes, textAligns, textColors, textDecorations, textIndents, textOverflows, textShadows, textStrokes, textTransforms, transforms, transitions, userSelects, varEmpty, verticalAligns, whitespaces, willChange, zIndexes };
92
+ export { alignments, appearance, appearances, aspectRatio, bgColors, borders, boxShadows, boxSizing, breaks, contents, cssProperty, cssVariables, cursors, displays, flex, floats, fontSmoothings, fontStyles, fonts, gaps, grids, insets, justifies, margins, opacity, orders, outline, overflows, paddings, placements, pointerEvents, positions, questionMark, resizes, rings, rules, sizes, svgUtilities, tabSizes, textAligns, textColors, textDecorations, textIndents, textOverflows, textShadows, textStrokes, textTransforms, transforms, transitions, userSelects, varEmpty, verticalAligns, whitespaces, willChange, zIndexes };
package/dist/rules.mjs CHANGED
@@ -1,3 +1,3 @@
1
- export { l as alignments, a as appearance, H as appearances, C as aspectRatio, e as bgColors, b as borders, A as boxShadows, s as boxSizing, O as breaks, N as contents, a0 as cssProperty, $ as cssVariables, I as cursors, G as displays, f as flex, q as floats, S as fontSmoothings, R as fontStyles, W as fonts, g as gaps, h as grids, n as insets, j as justifies, E as margins, c as opacity, k as orders, o as outline, i as overflows, D as paddings, m as placements, J as pointerEvents, p as positions, u as questionMark, K as resizes, x as rings, r as rules, y as shadowBase, B as sizes, T as svgUtilities, X as tabSizes, t as textAligns, d as textColors, a1 as textDecorations, Y as textIndents, P as textOverflows, _ as textShadows, Z as textStrokes, Q as textTransforms, U as transforms, V as transitions, L as userSelects, F as varEmpty, v as verticalAligns, M as whitespaces, w as willChange, z as zIndexes } from './chunks/default2.mjs';
1
+ export { l as alignments, a as appearance, G as appearances, B as aspectRatio, e as bgColors, b as borders, y as boxShadows, s as boxSizing, N as breaks, M as contents, $ as cssProperty, _ as cssVariables, H as cursors, F as displays, f as flex, q as floats, R as fontSmoothings, Q as fontStyles, V as fonts, g as gaps, h as grids, n as insets, j as justifies, D as margins, c as opacity, k as orders, o as outline, i as overflows, C as paddings, m as placements, I as pointerEvents, p as positions, u as questionMark, J as resizes, x as rings, r as rules, A as sizes, S as svgUtilities, W as tabSizes, t as textAligns, d as textColors, a0 as textDecorations, X as textIndents, O as textOverflows, Z as textShadows, Y as textStrokes, P as textTransforms, T as transforms, U as transitions, K as userSelects, E as varEmpty, v as verticalAligns, L as whitespaces, w as willChange, z as zIndexes } from './chunks/default2.mjs';
2
2
  import './chunks/utilities.mjs';
3
3
  import '@unocss/core';
package/dist/theme.cjs CHANGED
@@ -14,14 +14,18 @@ exports.borderRadius = _default.borderRadius;
14
14
  exports.boxShadow = _default.boxShadow;
15
15
  exports.breakpoints = _default.breakpoints;
16
16
  exports.dropShadow = _default.dropShadow;
17
+ exports.duration = _default.duration;
17
18
  exports.easing = _default.easing;
18
19
  exports.fontFamily = _default.fontFamily;
19
20
  exports.fontSize = _default.fontSize;
20
21
  exports.height = _default.height;
21
22
  exports.letterSpacing = _default.letterSpacing;
22
23
  exports.lineHeight = _default.lineHeight;
24
+ exports.lineWidth = _default.lineWidth;
23
25
  exports.maxHeight = _default.maxHeight;
24
26
  exports.maxWidth = _default.maxWidth;
27
+ exports.ringWidth = _default.ringWidth;
28
+ exports.spacing = _default.spacing;
25
29
  exports.textIndent = _default.textIndent;
26
30
  exports.textShadow = _default.textShadow;
27
31
  exports.textStrokeWidth = _default.textStrokeWidth;
package/dist/theme.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- export { c as colors } from './colors-0db1b382';
2
- export { t as theme } from './default-3eaf5bb0';
3
- import { T as Theme } from './types-ef1d7462';
4
- export { T as Theme, a as ThemeAnimation } from './types-ef1d7462';
1
+ export { c as colors } from './colors-ce2fecb8';
2
+ export { t as theme } from './default-e6d1b2e8';
3
+ import { T as Theme } from './types-f7b2c653';
4
+ export { T as Theme, a as ThemeAnimation } from './types-f7b2c653';
5
5
 
6
6
  declare const blur: {
7
7
  DEFAULT: string;
@@ -50,6 +50,30 @@ declare const verticalBreakpoints: {
50
50
  xl: string;
51
51
  '2xl': string;
52
52
  };
53
+ declare const lineWidth: {
54
+ DEFAULT: string;
55
+ none: string;
56
+ };
57
+ declare const spacing: {
58
+ DEFAULT: string;
59
+ none: string;
60
+ xs: string;
61
+ sm: string;
62
+ lg: string;
63
+ xl: string;
64
+ '2xl': string;
65
+ '3xl': string;
66
+ '4xl': string;
67
+ '5xl': string;
68
+ '6xl': string;
69
+ '7xl': string;
70
+ '8xl': string;
71
+ '9xl': string;
72
+ };
73
+ declare const duration: {
74
+ DEFAULT: string;
75
+ none: string;
76
+ };
53
77
  declare const borderRadius: {
54
78
  DEFAULT: string;
55
79
  none: string;
@@ -63,13 +87,13 @@ declare const borderRadius: {
63
87
  };
64
88
  declare const boxShadow: {
65
89
  DEFAULT: string[];
90
+ none: string;
66
91
  sm: string;
67
92
  md: string[];
68
93
  lg: string[];
69
94
  xl: string[];
70
95
  '2xl': string;
71
96
  inner: string;
72
- none: string;
73
97
  };
74
98
  declare const easing: {
75
99
  DEFAULT: string;
@@ -78,6 +102,10 @@ declare const easing: {
78
102
  out: string;
79
103
  'in-out': string;
80
104
  };
105
+ declare const ringWidth: {
106
+ DEFAULT: string;
107
+ none: string;
108
+ };
81
109
 
82
110
  declare const baseSize: {
83
111
  xs: string;
@@ -158,4 +186,4 @@ declare const maxHeight: {
158
186
  none: string;
159
187
  };
160
188
 
161
- export { baseSize, blur, borderRadius, boxShadow, breakpoints, dropShadow, easing, fontFamily, fontSize, height, letterSpacing, lineHeight, maxHeight, maxWidth, textIndent, textShadow, textStrokeWidth, verticalBreakpoints, width, wordSpacing };
189
+ export { baseSize, blur, borderRadius, boxShadow, breakpoints, dropShadow, duration, easing, fontFamily, fontSize, height, letterSpacing, lineHeight, lineWidth, maxHeight, maxWidth, ringWidth, spacing, textIndent, textShadow, textStrokeWidth, verticalBreakpoints, width, wordSpacing };
package/dist/theme.mjs CHANGED
@@ -1,2 +1,2 @@
1
1
  export { c as colors } from './chunks/colors.mjs';
2
- export { n as baseSize, b as blur, j as borderRadius, k as boxShadow, i as breakpoints, d as dropShadow, m as easing, f as fontFamily, a as fontSize, q as height, h as letterSpacing, l as lineHeight, r as maxHeight, p as maxWidth, c as textIndent, g as textShadow, e as textStrokeWidth, t as theme, v as verticalBreakpoints, o as width, w as wordSpacing } from './chunks/default.mjs';
2
+ export { p as baseSize, b as blur, m as borderRadius, n as boxShadow, i as breakpoints, d as dropShadow, k as duration, o as easing, f as fontFamily, a as fontSize, x as height, h as letterSpacing, l as lineHeight, j as lineWidth, y as maxHeight, u as maxWidth, r as ringWidth, s as spacing, c as textIndent, g as textShadow, e as textStrokeWidth, t as theme, v as verticalBreakpoints, q as width, w as wordSpacing } from './chunks/default.mjs';
@@ -30,11 +30,21 @@ interface Theme {
30
30
  textIndent?: Record<string, string>;
31
31
  textShadow?: Record<string, string | string[]>;
32
32
  textStrokeWidth?: Record<string, string>;
33
+ ringWidth?: Record<string, string>;
34
+ lineWidth?: Record<string, string>;
35
+ spacing?: Record<string, string>;
36
+ duration?: Record<string, string>;
33
37
  blur?: Record<string, string>;
34
38
  dropShadow?: Record<string, string | string[]>;
35
39
  easing?: Record<string, string>;
36
40
  media?: Record<string, string>;
37
41
  animation?: ThemeAnimation;
42
+ gridAutoColumn?: Record<string, string>;
43
+ gridAutoRow?: Record<string, string>;
44
+ gridColumn?: Record<string, string>;
45
+ gridRow?: Record<string, string>;
46
+ gridTemplateColumn?: Record<string, string>;
47
+ gridTemplateRow?: Record<string, string>;
38
48
  }
39
49
 
40
50
  export { Theme as T, ThemeAnimation as a };
@@ -1,23 +1,22 @@
1
- import { DynamicMatcher, ParsedColorValue } from '@unocss/core';
2
- import { T as Theme } from './types-ef1d7462';
1
+ import { RuleContext, CSSEntries, ParsedColorValue, CSSObject } from '@unocss/core';
2
+ import { T as Theme } from './types-f7b2c653';
3
3
 
4
4
  /**
5
5
  * Provide {@link DynamicMatcher} function returning spacing definition. See spacing rules.
6
6
  *
7
7
  * @param {string} propertyPrefix - Property for the css value to be created. Postfix will be appended according to direction matched.
8
- * @return {DynamicMatcher} {@link DynamicMatcher}
8
+ * @return {@link DynamicMatcher} object.
9
9
  * @see {@link directionMap}
10
10
  */
11
- declare const directionSize: (propertyPrefix: string) => DynamicMatcher;
11
+ declare const directionSize: (propertyPrefix: string) => ([_, direction, size]: string[], { theme }: RuleContext<Theme>) => CSSEntries | undefined;
12
12
  /**
13
- * Parse color string into rgba (if possible) with opacity. Color value will be matched to theme object before converting to rgb value.
13
+ * Parse color string into {@link ParsedColorValue} (if possible). Color value will first be matched to theme object before parsing.
14
+ * See also color.tests.ts for more examples.
14
15
  *
15
16
  * @example Parseable strings:
16
17
  * 'red' // From theme, if 'red' is available
17
18
  * 'red-100' // From theme, plus scale
18
19
  * 'red-100/20' // From theme, plus scale/opacity
19
- * '#f12' // Hex color
20
- * 'hex-f12' // Alternative hex color
21
20
  * '[rgb(100,2,3)]/[var(--op)]' // Bracket with rgb color and bracket with opacity
22
21
  *
23
22
  * @param {string} body - Color string to be parsed.
@@ -36,21 +35,22 @@ declare const parseColor: (body: string, theme: Theme) => ParsedColorValue | und
36
35
  *
37
36
  * @example Resolving 'red-100' from theme:
38
37
  * colorResolver('background-color', 'background')('', 'red-100')
39
- * return { '--un-background-opacity': '1', 'background-color': 'rgb(254,226,226,var(--un-bg-opacity))' }
38
+ * return { '--un-background-opacity': '1', 'background-color': 'rgba(254,226,226,var(--un-bg-opacity))' }
40
39
  *
41
40
  * @example Resolving 'red-100/20' from theme:
42
41
  * colorResolver('background-color', 'background')('', 'red-100/20')
43
- * return { 'background-color': 'rgb(204,251,241,0.22)' }
42
+ * return { 'background-color': 'rgba(204,251,241,0.22)' }
44
43
  *
45
44
  * @example Resolving 'hex-124':
46
45
  * colorResolver('color', 'text')('', 'hex-124')
47
- * return { '--un-text-opacity': '1', 'color': 'rgb(17,34,68,var(--un-text-opacity))' }
46
+ * return { '--un-text-opacity': '1', 'color': 'rgba(17,34,68,var(--un-text-opacity))' }
48
47
  *
49
48
  * @param {string} property - Property for the css value to be created.
50
49
  * @param {string} varName - Base name for the opacity variable.
51
- * @return {DynamicMatcher} {@link DynamicMatcher} object.
50
+ * @return {@link DynamicMatcher} object.
52
51
  */
53
- declare const colorResolver: (property: string, varName: string) => DynamicMatcher;
52
+ declare const colorResolver: (property: string, varName: string) => ([, body]: string[], { theme }: RuleContext<Theme>) => CSSObject | undefined;
54
53
  declare const colorableShadows: (shadows: string | string[], colorVar: string) => string[];
54
+ declare const hasParseableColor: (color: string | undefined, theme: Theme) => boolean;
55
55
 
56
- export { colorableShadows as a, colorResolver as c, directionSize as d, parseColor as p };
56
+ export { colorableShadows as a, colorResolver as c, directionSize as d, hasParseableColor as h, parseColor as p };
package/dist/utils.cjs CHANGED
@@ -17,6 +17,7 @@ exports.directionSize = utilities.directionSize;
17
17
  exports.getComponents = utilities.getComponents;
18
18
  exports.h = utilities.h;
19
19
  exports.handler = utilities.handler;
20
+ exports.hasParseableColor = utilities.hasParseableColor;
20
21
  exports.hex2rgba = utilities.hex2rgba;
21
22
  exports.insetMap = utilities.insetMap;
22
23
  exports.parseColor = utilities.parseColor;
package/dist/utils.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as _unocss_core from '@unocss/core';
2
2
  import { RGBAColorValue, CSSColorValue, VariantHandler } from '@unocss/core';
3
- export { c as colorResolver, a as colorableShadows, d as directionSize, p as parseColor } from './utilities-43c87ad4';
4
- import './types-ef1d7462';
3
+ export { c as colorResolver, a as colorableShadows, d as directionSize, h as hasParseableColor, p as parseColor } from './utilities-820bcff8';
4
+ import './types-f7b2c653';
5
5
 
6
6
  declare function hex2rgba(hex?: string): RGBAColorValue | undefined;
7
7
  declare function parseCssColor(str?: string): CSSColorValue | undefined;
@@ -22,6 +22,8 @@ declare function number(str: string): string | undefined;
22
22
  declare function percent(str: string): string | undefined;
23
23
  declare function fraction(str: string): string | undefined;
24
24
  declare function bracket(str: string): string | undefined;
25
+ declare function bracketOfColor(str: string): string | undefined;
26
+ declare function bracketOfLength(str: string): string | undefined;
25
27
  declare function cssvar(str: string): string | undefined;
26
28
  declare function time(str: string): string | undefined;
27
29
  declare function degree(str: string): string | undefined;
@@ -36,6 +38,8 @@ declare const handlers_number: typeof number;
36
38
  declare const handlers_percent: typeof percent;
37
39
  declare const handlers_fraction: typeof fraction;
38
40
  declare const handlers_bracket: typeof bracket;
41
+ declare const handlers_bracketOfColor: typeof bracketOfColor;
42
+ declare const handlers_bracketOfLength: typeof bracketOfLength;
39
43
  declare const handlers_cssvar: typeof cssvar;
40
44
  declare const handlers_time: typeof time;
41
45
  declare const handlers_degree: typeof degree;
@@ -51,6 +55,8 @@ declare namespace handlers {
51
55
  handlers_percent as percent,
52
56
  handlers_fraction as fraction,
53
57
  handlers_bracket as bracket,
58
+ handlers_bracketOfColor as bracketOfColor,
59
+ handlers_bracketOfLength as bracketOfLength,
54
60
  handlers_cssvar as cssvar,
55
61
  handlers_time as time,
56
62
  handlers_degree as degree,
@@ -59,8 +65,8 @@ declare namespace handlers {
59
65
  };
60
66
  }
61
67
 
62
- declare const handler: _unocss_core.ValueHandler<"number" | "auto" | "numberWithUnit" | "rem" | "px" | "percent" | "fraction" | "bracket" | "cssvar" | "time" | "degree" | "global" | "properties">;
63
- declare const h: _unocss_core.ValueHandler<"number" | "auto" | "numberWithUnit" | "rem" | "px" | "percent" | "fraction" | "bracket" | "cssvar" | "time" | "degree" | "global" | "properties">;
68
+ declare const handler: _unocss_core.ValueHandler<"number" | "auto" | "numberWithUnit" | "rem" | "px" | "percent" | "fraction" | "bracket" | "bracketOfColor" | "bracketOfLength" | "cssvar" | "time" | "degree" | "global" | "properties">;
69
+ declare const h: _unocss_core.ValueHandler<"number" | "auto" | "numberWithUnit" | "rem" | "px" | "percent" | "fraction" | "bracket" | "bracketOfColor" | "bracketOfLength" | "cssvar" | "time" | "degree" | "global" | "properties">;
64
70
 
65
71
  declare const variantMatcher: (name: string, selector?: ((input: string) => string | undefined) | undefined) => (input: string) => VariantHandler | undefined;
66
72
  declare const variantParentMatcher: (name: string, parent: string) => (input: string) => VariantHandler | undefined;
package/dist/utils.mjs CHANGED
@@ -1,3 +1,3 @@
1
- export { c as colorResolver, a as colorToString, e as colorableShadows, b as cornerMap, d as directionMap, f as directionSize, l as getComponents, m as h, h as handler, j as hex2rgba, i as insetMap, p as parseColor, k as parseCssColor, g as positionMap, v as valueHandlers, x as xyzMap } from './chunks/utilities.mjs';
1
+ export { c as colorResolver, b as colorToString, f as colorableShadows, e as cornerMap, d as directionMap, g as directionSize, m as getComponents, n as h, h as handler, a as hasParseableColor, k as hex2rgba, i as insetMap, p as parseColor, l as parseCssColor, j as positionMap, v as valueHandlers, x as xyzMap } from './chunks/utilities.mjs';
2
2
  export { a as variantMatcher, v as variantParentMatcher } from './chunks/variants.mjs';
3
3
  import '@unocss/core';
@@ -1,9 +1,9 @@
1
1
  import { Variant, VariantFunction, VariantObject } from '@unocss/core';
2
- import { T as Theme } from './types-ef1d7462';
2
+ import { T as Theme } from './types-f7b2c653';
3
3
  import { PresetMiniOptions } from './index';
4
- import './default-3eaf5bb0';
5
- import './colors-0db1b382';
6
- import './utilities-43c87ad4';
4
+ import './default-e6d1b2e8';
5
+ import './colors-ce2fecb8';
6
+ import './utilities-820bcff8';
7
7
 
8
8
  declare const variantBreakpoints: Variant<Theme>;
9
9
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unocss/preset-mini",
3
- "version": "0.25.0",
3
+ "version": "0.26.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.25.0"
64
+ "@unocss/core": "0.26.2"
65
65
  },
66
66
  "scripts": {
67
67
  "build": "unbuild",