@unocss/preset-mini 0.59.1 → 0.59.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/index.mjs +6 -6
- package/dist/rules.mjs +3 -3
- package/dist/shared/{preset-mini.BLqeNSHq.mjs → preset-mini.BF7x-VAh.mjs} +1 -1
- package/dist/shared/{preset-mini.BkfCAdS7.mjs → preset-mini.CB8Dk02e.mjs} +2 -2
- package/dist/shared/{preset-mini.C1Rrw9HG.mjs → preset-mini.DD2Q_iFh.mjs} +2 -2
- package/dist/shared/{preset-mini.B-FeHxXU.mjs → preset-mini.DqoFZ7ib.mjs} +1 -1
- package/dist/shared/{preset-mini.CWuOZAHF.mjs → preset-mini.LaTU_0KF.mjs} +8 -2
- package/dist/theme.mjs +3 -3
- package/dist/utils.d.mts +4 -3
- package/dist/utils.d.ts +4 -3
- package/dist/utils.mjs +1 -1
- package/dist/variants.mjs +2 -2
- package/package.json +4 -4
package/dist/index.mjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { entriesToCss, toArray, definePreset } from '@unocss/core';
|
|
2
2
|
import { extractorArbitraryVariants } from '@unocss/extractor-arbitrary-variants';
|
|
3
|
-
import { g as globalKeywords } from './shared/preset-mini.
|
|
4
|
-
export {
|
|
5
|
-
import { t as theme } from './shared/preset-mini.
|
|
6
|
-
import { r as rules } from './shared/preset-mini.
|
|
7
|
-
import { h as variants } from './shared/preset-mini.
|
|
3
|
+
import { g as globalKeywords } from './shared/preset-mini.LaTU_0KF.mjs';
|
|
4
|
+
export { k as parseColor } from './shared/preset-mini.LaTU_0KF.mjs';
|
|
5
|
+
import { t as theme } from './shared/preset-mini.DqoFZ7ib.mjs';
|
|
6
|
+
import { r as rules } from './shared/preset-mini.CB8Dk02e.mjs';
|
|
7
|
+
import { h as variants } from './shared/preset-mini.DD2Q_iFh.mjs';
|
|
8
8
|
export { colors } from './colors.mjs';
|
|
9
9
|
import '@unocss/rule-utils';
|
|
10
|
-
import './shared/preset-mini.
|
|
10
|
+
import './shared/preset-mini.BF7x-VAh.mjs';
|
|
11
11
|
|
|
12
12
|
const preflights = [
|
|
13
13
|
{
|
package/dist/rules.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { s as alignments, a as appearance, E as aspectRatio, e as bgColors, b as borderStyles, c as borders, B as boxSizing, f as colorScheme, g as containerParent, P as cssProperty, O as cssVariables, j as flex, x as flexGridJustifiesAlignments, z as floats, J as fonts, k as gaps, l as grids, h as handlerBorderStyle, y as insets, n as justifies, G as margins, d as opacity, q as orders, o as outline, m as overflows, F as paddings, u as placements, p as positions, C as questionMark, r as rules, D as sizes, H as svgUtilities, K as tabSizes, t as textAligns, i as textDecorations, L as textIndents, N as textShadows, M as textStrokes, I as transitions, v as verticalAligns, w as willChange, A as zIndexes } from './shared/preset-mini.
|
|
2
|
-
export { e as appearances, c as boxShadows, b as boxShadowsBase, k as breaks, g as contains, i as contentVisibility, j as contents, f as cursors, d as displays, o as fontSmoothings, n as fontStyles, p as pointerEvents, h as resizes, r as ringBase, a as rings, l as textOverflows, m as textTransforms, t as textWraps, q as transformBase, s as transforms, u as userSelects, v as varEmpty, w as whitespaces } from './shared/preset-mini.
|
|
3
|
-
import './shared/preset-mini.
|
|
1
|
+
export { s as alignments, a as appearance, E as aspectRatio, e as bgColors, b as borderStyles, c as borders, B as boxSizing, f as colorScheme, g as containerParent, P as cssProperty, O as cssVariables, j as flex, x as flexGridJustifiesAlignments, z as floats, J as fonts, k as gaps, l as grids, h as handlerBorderStyle, y as insets, n as justifies, G as margins, d as opacity, q as orders, o as outline, m as overflows, F as paddings, u as placements, p as positions, C as questionMark, r as rules, D as sizes, H as svgUtilities, K as tabSizes, t as textAligns, i as textDecorations, L as textIndents, N as textShadows, M as textStrokes, I as transitions, v as verticalAligns, w as willChange, A as zIndexes } from './shared/preset-mini.CB8Dk02e.mjs';
|
|
2
|
+
export { e as appearances, c as boxShadows, b as boxShadowsBase, k as breaks, g as contains, i as contentVisibility, j as contents, f as cursors, d as displays, o as fontSmoothings, n as fontStyles, p as pointerEvents, h as resizes, r as ringBase, a as rings, l as textOverflows, m as textTransforms, t as textWraps, q as transformBase, s as transforms, u as userSelects, v as varEmpty, w as whitespaces } from './shared/preset-mini.BF7x-VAh.mjs';
|
|
3
|
+
import './shared/preset-mini.LaTU_0KF.mjs';
|
|
4
4
|
import '@unocss/core';
|
|
5
5
|
import '@unocss/rule-utils';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { f as h, q as makeGlobalStaticRules, g as globalKeywords, l as colorResolver, t as isCSSMathFn, n as hasParseableColor, m as colorableShadows, p as positionMap, w as transformXYZ } from './preset-mini.LaTU_0KF.mjs';
|
|
2
2
|
|
|
3
3
|
const cursorValues = ["auto", "default", "none", "context-menu", "help", "pointer", "progress", "wait", "cell", "crosshair", "text", "vertical-text", "alias", "copy", "move", "no-drop", "not-allowed", "grab", "grabbing", "all-scroll", "col-resize", "row-resize", "n-resize", "e-resize", "s-resize", "w-resize", "ne-resize", "nw-resize", "se-resize", "sw-resize", "ew-resize", "ns-resize", "nesw-resize", "nwse-resize", "zoom-in", "zoom-out"];
|
|
4
4
|
const containValues = ["none", "strict", "content", "size", "inline-size", "layout", "style", "paint"];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { g as globalKeywords,
|
|
1
|
+
import { g as globalKeywords, f as h, t as isCSSMathFn, l as colorResolver, d as directionMap, n as hasParseableColor, c as cornerMap, k as parseColor, u as isSize, q as makeGlobalStaticRules, m as colorableShadows, s as splitShorthand, i as insetMap, r as resolveBreakpoints, j as directionSize } from './preset-mini.LaTU_0KF.mjs';
|
|
2
2
|
import { colorToString, colorOpacityToString } from '@unocss/rule-utils';
|
|
3
3
|
import { warnOnce, toArray } from '@unocss/core';
|
|
4
|
-
import { d as displays, i as contentVisibility, j as contents, l as textOverflows, m as textTransforms, n as fontStyles, o as fontSmoothings, c as boxShadows, a as rings, f as cursors, e as appearances, p as pointerEvents, h as resizes, u as userSelects, w as whitespaces, k as breaks, s as transforms, g as contains, t as textWraps } from './preset-mini.
|
|
4
|
+
import { d as displays, i as contentVisibility, j as contents, l as textOverflows, m as textTransforms, n as fontStyles, o as fontSmoothings, c as boxShadows, a as rings, f as cursors, e as appearances, p as pointerEvents, h as resizes, u as userSelects, w as whitespaces, k as breaks, s as transforms, g as contains, t as textWraps } from './preset-mini.BF7x-VAh.mjs';
|
|
5
5
|
|
|
6
6
|
const verticalAlignAlias = {
|
|
7
7
|
"mid": "middle",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { f as h, r as resolveBreakpoints, C as CONTROL_MINI_NO_NEGATIVE, b as cssMathFnRE, e as cssVarFnRE } from './preset-mini.LaTU_0KF.mjs';
|
|
2
2
|
import { variantGetParameter, variantGetBracket, variantMatcher, variantParentMatcher, getBracket, hasThemeFn, transformThemeFn, getStringComponent } from '@unocss/rule-utils';
|
|
3
3
|
import { warnOnce, escapeRegExp, escapeSelector } from '@unocss/core';
|
|
4
4
|
|
|
@@ -345,7 +345,7 @@ const ignoreProps = [
|
|
|
345
345
|
/\b(opacity|color|flex|backdrop-filter|^filter|transform)\b/
|
|
346
346
|
];
|
|
347
347
|
function negateMathFunction(value) {
|
|
348
|
-
const match = value.match(cssMathFnRE);
|
|
348
|
+
const match = value.match(cssMathFnRE) || value.match(cssVarFnRE);
|
|
349
349
|
if (match) {
|
|
350
350
|
const [fnBody, rest] = getStringComponent(`(${match[2]})${match[3]}`, "(", ")", " ") ?? [];
|
|
351
351
|
if (fnBody)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { colors } from '../colors.mjs';
|
|
2
|
-
import { q as transformBase, b as boxShadowsBase, r as ringBase } from './preset-mini.
|
|
2
|
+
import { q as transformBase, b as boxShadowsBase, r as ringBase } from './preset-mini.BF7x-VAh.mjs';
|
|
3
3
|
|
|
4
4
|
const fontFamily = {
|
|
5
5
|
sans: [
|
|
@@ -108,6 +108,7 @@ const globalKeywords = [
|
|
|
108
108
|
"unset"
|
|
109
109
|
];
|
|
110
110
|
const cssMathFnRE = /^(calc|clamp|min|max)\s*\((.+)\)(.*)/;
|
|
111
|
+
const cssVarFnRE = /^(var)\s*\((.+)\)(.*)/;
|
|
111
112
|
|
|
112
113
|
const numberWithUnitRE = /^(-?\d*(?:\.\d+)?)(px|pt|pc|%|r?(?:em|ex|lh|cap|ch|ic)|(?:[sld]?v|cq)(?:[whib]|min|max)|in|cm|mm|rpx)?$/i;
|
|
113
114
|
const numberRE = /^(-?\d*(?:\.\d+)?)$/i;
|
|
@@ -383,8 +384,13 @@ const CONTROL_MINI_NO_NEGATIVE = "$$mini-no-negative";
|
|
|
383
384
|
function directionSize(propertyPrefix) {
|
|
384
385
|
return ([_, direction, size], { theme }) => {
|
|
385
386
|
const v = theme.spacing?.[size || "DEFAULT"] ?? h.bracket.cssvar.global.auto.fraction.rem(size);
|
|
386
|
-
if (v != null)
|
|
387
|
+
if (v != null) {
|
|
387
388
|
return directionMap[direction].map((i) => [`${propertyPrefix}${i}`, v]);
|
|
389
|
+
} else if (size.startsWith("-")) {
|
|
390
|
+
const v2 = theme.spacing?.[size.slice(1)];
|
|
391
|
+
if (v2 != null)
|
|
392
|
+
return directionMap[direction].map((i) => [`${propertyPrefix}${i}`, `calc(${v2} * -1)`]);
|
|
393
|
+
}
|
|
388
394
|
};
|
|
389
395
|
}
|
|
390
396
|
function getThemeColorForKey(theme, colors, key = "colors") {
|
|
@@ -565,4 +571,4 @@ function transformXYZ(d, v, name) {
|
|
|
565
571
|
return values.map((v2, i) => [`--un-${name}-${xyzArray[i]}`, v2]);
|
|
566
572
|
}
|
|
567
573
|
|
|
568
|
-
export { CONTROL_MINI_NO_NEGATIVE as C, xyzArray as a, cssMathFnRE as b, cornerMap as c, directionMap as d,
|
|
574
|
+
export { CONTROL_MINI_NO_NEGATIVE as C, xyzArray as a, cssMathFnRE as b, cornerMap as c, directionMap as d, cssVarFnRE as e, h as f, globalKeywords as g, handler as h, insetMap as i, directionSize as j, parseColor as k, colorResolver as l, colorableShadows as m, hasParseableColor as n, resolveVerticalBreakpoints as o, positionMap as p, makeGlobalStaticRules as q, resolveBreakpoints as r, splitShorthand as s, isCSSMathFn as t, isSize as u, valueHandlers as v, transformXYZ as w, xyzMap as x };
|
package/dist/theme.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { colors } from './colors.mjs';
|
|
2
|
-
export { x as baseSize, b as blur, n as borderRadius, o as boxShadow, j as breakpoints, D as containers, d as dropShadow, m as duration, p as easing, f as fontFamily, a as fontSize, i as fontWeight, B as height, h as letterSpacing, l as lineHeight, k as lineWidth, C as maxHeight, A as maxWidth, q as media, u as preflightBase, r as ringWidth, s as spacing, c as textIndent, g as textShadow, e as textStrokeWidth, t as theme, v as verticalBreakpoints, y as width, w as wordSpacing, z as zIndex } from './shared/preset-mini.
|
|
3
|
-
import './shared/preset-mini.
|
|
4
|
-
import './shared/preset-mini.
|
|
2
|
+
export { x as baseSize, b as blur, n as borderRadius, o as boxShadow, j as breakpoints, D as containers, d as dropShadow, m as duration, p as easing, f as fontFamily, a as fontSize, i as fontWeight, B as height, h as letterSpacing, l as lineHeight, k as lineWidth, C as maxHeight, A as maxWidth, q as media, u as preflightBase, r as ringWidth, s as spacing, c as textIndent, g as textShadow, e as textStrokeWidth, t as theme, v as verticalBreakpoints, y as width, w as wordSpacing, z as zIndex } from './shared/preset-mini.DqoFZ7ib.mjs';
|
|
3
|
+
import './shared/preset-mini.BF7x-VAh.mjs';
|
|
4
|
+
import './shared/preset-mini.LaTU_0KF.mjs';
|
|
5
5
|
import '@unocss/core';
|
|
6
6
|
import '@unocss/rule-utils';
|
package/dist/utils.d.mts
CHANGED
|
@@ -12,6 +12,7 @@ declare const xyzArray: string[];
|
|
|
12
12
|
declare const positionMap: Record<string, string>;
|
|
13
13
|
declare const globalKeywords: string[];
|
|
14
14
|
declare const cssMathFnRE: RegExp;
|
|
15
|
+
declare const cssVarFnRE: RegExp;
|
|
15
16
|
|
|
16
17
|
declare function numberWithUnit(str: string): string | undefined;
|
|
17
18
|
declare function auto(str: string): "auto" | undefined;
|
|
@@ -52,7 +53,7 @@ declare namespace handlers {
|
|
|
52
53
|
export { handlers_auto as auto, handlers_bracket as bracket, handlers_bracketOfColor as bracketOfColor, handlers_bracketOfLength as bracketOfLength, handlers_bracketOfPosition as bracketOfPosition, handlers_cssvar as cssvar, handlers_degree as degree, handlers_fraction as fraction, handlers_global as global, handlers_number as number, handlers_numberWithUnit as numberWithUnit, handlers_percent as percent, handlers_position as position, handlers_properties as properties, handlers_px as px, handlers_rem as rem, handlers_time as time };
|
|
53
54
|
}
|
|
54
55
|
|
|
55
|
-
declare const handler: _unocss_rule_utils.ValueHandler<"number" | "
|
|
56
|
-
declare const h: _unocss_rule_utils.ValueHandler<"number" | "
|
|
56
|
+
declare const handler: _unocss_rule_utils.ValueHandler<"number" | "auto" | "position" | "global" | "px" | "numberWithUnit" | "rem" | "percent" | "fraction" | "bracket" | "bracketOfColor" | "bracketOfLength" | "bracketOfPosition" | "cssvar" | "time" | "degree" | "properties">;
|
|
57
|
+
declare const h: _unocss_rule_utils.ValueHandler<"number" | "auto" | "position" | "global" | "px" | "numberWithUnit" | "rem" | "percent" | "fraction" | "bracket" | "bracketOfColor" | "bracketOfLength" | "bracketOfPosition" | "cssvar" | "time" | "degree" | "properties">;
|
|
57
58
|
|
|
58
|
-
export { cornerMap, cssMathFnRE, directionMap, globalKeywords, h, handler, insetMap, positionMap, handlers as valueHandlers, xyzArray, xyzMap };
|
|
59
|
+
export { cornerMap, cssMathFnRE, cssVarFnRE, directionMap, globalKeywords, h, handler, insetMap, positionMap, handlers as valueHandlers, xyzArray, xyzMap };
|
package/dist/utils.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ declare const xyzArray: string[];
|
|
|
12
12
|
declare const positionMap: Record<string, string>;
|
|
13
13
|
declare const globalKeywords: string[];
|
|
14
14
|
declare const cssMathFnRE: RegExp;
|
|
15
|
+
declare const cssVarFnRE: RegExp;
|
|
15
16
|
|
|
16
17
|
declare function numberWithUnit(str: string): string | undefined;
|
|
17
18
|
declare function auto(str: string): "auto" | undefined;
|
|
@@ -52,7 +53,7 @@ declare namespace handlers {
|
|
|
52
53
|
export { handlers_auto as auto, handlers_bracket as bracket, handlers_bracketOfColor as bracketOfColor, handlers_bracketOfLength as bracketOfLength, handlers_bracketOfPosition as bracketOfPosition, handlers_cssvar as cssvar, handlers_degree as degree, handlers_fraction as fraction, handlers_global as global, handlers_number as number, handlers_numberWithUnit as numberWithUnit, handlers_percent as percent, handlers_position as position, handlers_properties as properties, handlers_px as px, handlers_rem as rem, handlers_time as time };
|
|
53
54
|
}
|
|
54
55
|
|
|
55
|
-
declare const handler: _unocss_rule_utils.ValueHandler<"number" | "
|
|
56
|
-
declare const h: _unocss_rule_utils.ValueHandler<"number" | "
|
|
56
|
+
declare const handler: _unocss_rule_utils.ValueHandler<"number" | "auto" | "position" | "global" | "px" | "numberWithUnit" | "rem" | "percent" | "fraction" | "bracket" | "bracketOfColor" | "bracketOfLength" | "bracketOfPosition" | "cssvar" | "time" | "degree" | "properties">;
|
|
57
|
+
declare const h: _unocss_rule_utils.ValueHandler<"number" | "auto" | "position" | "global" | "px" | "numberWithUnit" | "rem" | "percent" | "fraction" | "bracket" | "bracketOfColor" | "bracketOfLength" | "bracketOfPosition" | "cssvar" | "time" | "degree" | "properties">;
|
|
57
58
|
|
|
58
|
-
export { cornerMap, cssMathFnRE, directionMap, globalKeywords, h, handler, insetMap, positionMap, handlers as valueHandlers, xyzArray, xyzMap };
|
|
59
|
+
export { cornerMap, cssMathFnRE, cssVarFnRE, directionMap, globalKeywords, h, handler, insetMap, positionMap, handlers as valueHandlers, xyzArray, xyzMap };
|
package/dist/utils.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { C as CONTROL_MINI_NO_NEGATIVE,
|
|
1
|
+
export { C as CONTROL_MINI_NO_NEGATIVE, l as colorResolver, m as colorableShadows, c as cornerMap, b as cssMathFnRE, e as cssVarFnRE, d as directionMap, j as directionSize, g as globalKeywords, f as h, h as handler, n as hasParseableColor, i as insetMap, t as isCSSMathFn, u as isSize, q as makeGlobalStaticRules, k as parseColor, p as positionMap, r as resolveBreakpoints, o as resolveVerticalBreakpoints, s as splitShorthand, w as transformXYZ, v as valueHandlers, a as xyzArray, x as xyzMap } from './shared/preset-mini.LaTU_0KF.mjs';
|
|
2
2
|
export * from '@unocss/rule-utils';
|
|
3
3
|
import '@unocss/core';
|
package/dist/variants.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { c as calcMaxWidthBySize, v as variantAria, a as variantBreakpoints, e as variantColorsMediaOrClass, b as variantCombinators, d as variantContainerQuery, n as variantCssLayer, l as variantCustomMedia, f as variantDataAttribute, j as variantImportant, o as variantInternalLayer, i as variantLanguageDirections, s as variantNegative, x as variantPartClasses, k as variantPrint, u as variantPseudoClassFunctions, t as variantPseudoClassesAndElements, p as variantScope, m as variantSelector, y as variantSupports, g as variantTaggedDataAttributes, w as variantTaggedPseudoClasses, r as variantTheme, q as variantVariables, h as variants } from './shared/preset-mini.
|
|
2
|
-
import './shared/preset-mini.
|
|
1
|
+
export { c as calcMaxWidthBySize, v as variantAria, a as variantBreakpoints, e as variantColorsMediaOrClass, b as variantCombinators, d as variantContainerQuery, n as variantCssLayer, l as variantCustomMedia, f as variantDataAttribute, j as variantImportant, o as variantInternalLayer, i as variantLanguageDirections, s as variantNegative, x as variantPartClasses, k as variantPrint, u as variantPseudoClassFunctions, t as variantPseudoClassesAndElements, p as variantScope, m as variantSelector, y as variantSupports, g as variantTaggedDataAttributes, w as variantTaggedPseudoClasses, r as variantTheme, q as variantVariables, h as variants } from './shared/preset-mini.DD2Q_iFh.mjs';
|
|
2
|
+
import './shared/preset-mini.LaTU_0KF.mjs';
|
|
3
3
|
import '@unocss/core';
|
|
4
4
|
import '@unocss/rule-utils';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unocss/preset-mini",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.59.
|
|
4
|
+
"version": "0.59.2",
|
|
5
5
|
"description": "The minimal preset for UnoCSS",
|
|
6
6
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -56,9 +56,9 @@
|
|
|
56
56
|
"dist"
|
|
57
57
|
],
|
|
58
58
|
"dependencies": {
|
|
59
|
-
"@unocss/
|
|
60
|
-
"@unocss/
|
|
61
|
-
"@unocss/
|
|
59
|
+
"@unocss/core": "0.59.2",
|
|
60
|
+
"@unocss/rule-utils": "0.59.2",
|
|
61
|
+
"@unocss/extractor-arbitrary-variants": "0.59.2"
|
|
62
62
|
},
|
|
63
63
|
"scripts": {
|
|
64
64
|
"build": "unbuild",
|