@unocss/preset-mini 0.48.3 → 0.48.5
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/README.md +1 -1
- package/dist/index.cjs +21 -7
- package/dist/index.d.ts +3 -2
- package/dist/index.mjs +22 -9
- package/dist/rules.cjs +3 -3
- package/dist/rules.mjs +3 -3
- package/dist/shared/{preset-mini.3e342bd2.mjs → preset-mini.0a36abfc.mjs} +2 -2
- package/dist/shared/{preset-mini.2612e983.mjs → preset-mini.0d510914.mjs} +2 -2
- package/dist/shared/{preset-mini.19fa93be.cjs → preset-mini.28b1d01c.cjs} +1 -1
- package/dist/shared/{preset-mini.3bc25cb8.cjs → preset-mini.435805c5.cjs} +2 -2
- package/dist/shared/{preset-mini.1d8e9215.cjs → preset-mini.43dfafb9.cjs} +2 -2
- package/dist/shared/{preset-mini.b1ae1bfe.mjs → preset-mini.6b96b995.mjs} +2 -2
- package/dist/shared/{preset-mini.07bfe95b.cjs → preset-mini.8953ff1a.cjs} +18 -7
- package/dist/shared/{preset-mini.2ad50fb9.cjs → preset-mini.89cb41ec.cjs} +2 -2
- package/dist/shared/{preset-mini.73c67c88.mjs → preset-mini.a6daaf18.mjs} +18 -7
- package/dist/shared/{preset-mini.33f541c6.mjs → preset-mini.bd4c0c0c.mjs} +1 -1
- package/dist/shared/{preset-mini.97298de6.mjs → preset-mini.ca595ab5.mjs} +12 -9
- package/dist/shared/{preset-mini.5002aa63.cjs → preset-mini.e54ce13d.cjs} +12 -8
- package/dist/theme.cjs +3 -3
- package/dist/theme.mjs +3 -3
- package/dist/{utilities-51b38240.d.ts → utilities-d2f973f4.d.ts} +5 -1
- package/dist/utils.cjs +3 -2
- package/dist/utils.d.ts +1 -1
- package/dist/utils.mjs +2 -2
- package/dist/variants.cjs +3 -3
- package/dist/variants.d.ts +1 -1
- package/dist/variants.mjs +3 -3
- package/package.json +2 -2
package/README.md
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const core = require('@unocss/core');
|
|
6
|
-
require('./shared/preset-mini.
|
|
7
|
-
const colors$1 = require('./shared/preset-mini.
|
|
8
|
-
const _default$1 = require('./shared/preset-mini.
|
|
6
|
+
require('./shared/preset-mini.8953ff1a.cjs');
|
|
7
|
+
const colors$1 = require('./shared/preset-mini.e54ce13d.cjs');
|
|
8
|
+
const _default$1 = require('./shared/preset-mini.435805c5.cjs');
|
|
9
9
|
const colors = require('./shared/preset-mini.30606736.cjs');
|
|
10
|
-
const _default = require('./shared/preset-mini.
|
|
11
|
-
const _default$2 = require('./shared/preset-mini.
|
|
12
|
-
require('./shared/preset-mini.
|
|
10
|
+
const _default = require('./shared/preset-mini.43dfafb9.cjs');
|
|
11
|
+
const _default$2 = require('./shared/preset-mini.89cb41ec.cjs');
|
|
12
|
+
require('./shared/preset-mini.28b1d01c.cjs');
|
|
13
13
|
|
|
14
14
|
const preflights = [
|
|
15
15
|
{
|
|
@@ -35,7 +35,7 @@ const presetMini = (options = {}) => {
|
|
|
35
35
|
variants: _default$2.variants(options),
|
|
36
36
|
options,
|
|
37
37
|
postprocess: options.variablePrefix && options.variablePrefix !== "un-" ? VarPrefixPostprocessor(options.variablePrefix) : void 0,
|
|
38
|
-
preflights: options.preflight ? preflights : [],
|
|
38
|
+
preflights: options.preflight ? normalizePreflights(preflights, options.variablePrefix) : [],
|
|
39
39
|
prefix: options.prefix
|
|
40
40
|
};
|
|
41
41
|
};
|
|
@@ -48,11 +48,25 @@ function VarPrefixPostprocessor(prefix) {
|
|
|
48
48
|
});
|
|
49
49
|
};
|
|
50
50
|
}
|
|
51
|
+
function normalizePreflights(preflights3, variablePrefix) {
|
|
52
|
+
if (variablePrefix && variablePrefix !== "un-") {
|
|
53
|
+
return preflights3.map((p) => ({
|
|
54
|
+
...p,
|
|
55
|
+
getCSS: (() => async (ctx) => {
|
|
56
|
+
const css = await p.getCSS(ctx);
|
|
57
|
+
if (css)
|
|
58
|
+
return css.replace(/--un-/g, `--${variablePrefix}`);
|
|
59
|
+
})()
|
|
60
|
+
}));
|
|
61
|
+
}
|
|
62
|
+
return preflights3;
|
|
63
|
+
}
|
|
51
64
|
|
|
52
65
|
exports.parseColor = colors$1.parseColor;
|
|
53
66
|
exports.colors = colors.colors;
|
|
54
67
|
exports.theme = _default.theme;
|
|
55
68
|
exports.VarPrefixPostprocessor = VarPrefixPostprocessor;
|
|
56
69
|
exports["default"] = presetMini;
|
|
70
|
+
exports.normalizePreflights = normalizePreflights;
|
|
57
71
|
exports.preflights = preflights;
|
|
58
72
|
exports.presetMini = presetMini;
|
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export { c as colors } from './colors-b217808a.js';
|
|
|
3
3
|
export { t as theme } from './default-344896b2.js';
|
|
4
4
|
import { T as Theme } from './types-fa74508f.js';
|
|
5
5
|
export { T as Theme, a as ThemeAnimation } from './types-fa74508f.js';
|
|
6
|
-
export { p as parseColor } from './utilities-
|
|
6
|
+
export { p as parseColor } from './utilities-d2f973f4.js';
|
|
7
7
|
|
|
8
8
|
declare const preflights: Preflight[];
|
|
9
9
|
|
|
@@ -56,5 +56,6 @@ interface PresetMiniOptions extends PresetOptions {
|
|
|
56
56
|
declare const presetMini: (options?: PresetMiniOptions) => Preset<Theme>;
|
|
57
57
|
|
|
58
58
|
declare function VarPrefixPostprocessor(prefix: string): Postprocessor;
|
|
59
|
+
declare function normalizePreflights(preflights: Preflight[], variablePrefix?: string): Preflight<{}>[];
|
|
59
60
|
|
|
60
|
-
export { DarkModeSelectors, PresetMiniOptions, VarPrefixPostprocessor, presetMini as default, preflights, presetMini };
|
|
61
|
+
export { DarkModeSelectors, PresetMiniOptions, VarPrefixPostprocessor, presetMini as default, normalizePreflights, preflights, presetMini };
|
package/dist/index.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { entriesToCss, toArray } from '@unocss/core';
|
|
2
|
-
import './shared/preset-mini.
|
|
3
|
-
export { p as parseColor } from './shared/preset-mini.
|
|
4
|
-
import { r as rules } from './shared/preset-mini.
|
|
2
|
+
import './shared/preset-mini.a6daaf18.mjs';
|
|
3
|
+
export { p as parseColor } from './shared/preset-mini.ca595ab5.mjs';
|
|
4
|
+
import { r as rules } from './shared/preset-mini.6b96b995.mjs';
|
|
5
5
|
export { c as colors } from './shared/preset-mini.65ac75be.mjs';
|
|
6
|
-
import { t as theme } from './shared/preset-mini.
|
|
7
|
-
export { t as theme } from './shared/preset-mini.
|
|
8
|
-
import { v as variants } from './shared/preset-mini.
|
|
9
|
-
import './shared/preset-mini.
|
|
6
|
+
import { t as theme } from './shared/preset-mini.0a36abfc.mjs';
|
|
7
|
+
export { t as theme } from './shared/preset-mini.0a36abfc.mjs';
|
|
8
|
+
import { v as variants } from './shared/preset-mini.0d510914.mjs';
|
|
9
|
+
import './shared/preset-mini.bd4c0c0c.mjs';
|
|
10
10
|
|
|
11
11
|
const preflights = [
|
|
12
12
|
{
|
|
@@ -32,7 +32,7 @@ const presetMini = (options = {}) => {
|
|
|
32
32
|
variants: variants(options),
|
|
33
33
|
options,
|
|
34
34
|
postprocess: options.variablePrefix && options.variablePrefix !== "un-" ? VarPrefixPostprocessor(options.variablePrefix) : void 0,
|
|
35
|
-
preflights: options.preflight ? preflights : [],
|
|
35
|
+
preflights: options.preflight ? normalizePreflights(preflights, options.variablePrefix) : [],
|
|
36
36
|
prefix: options.prefix
|
|
37
37
|
};
|
|
38
38
|
};
|
|
@@ -45,5 +45,18 @@ function VarPrefixPostprocessor(prefix) {
|
|
|
45
45
|
});
|
|
46
46
|
};
|
|
47
47
|
}
|
|
48
|
+
function normalizePreflights(preflights3, variablePrefix) {
|
|
49
|
+
if (variablePrefix && variablePrefix !== "un-") {
|
|
50
|
+
return preflights3.map((p) => ({
|
|
51
|
+
...p,
|
|
52
|
+
getCSS: (() => async (ctx) => {
|
|
53
|
+
const css = await p.getCSS(ctx);
|
|
54
|
+
if (css)
|
|
55
|
+
return css.replace(/--un-/g, `--${variablePrefix}`);
|
|
56
|
+
})()
|
|
57
|
+
}));
|
|
58
|
+
}
|
|
59
|
+
return preflights3;
|
|
60
|
+
}
|
|
48
61
|
|
|
49
|
-
export { VarPrefixPostprocessor, presetMini as default, preflights, presetMini };
|
|
62
|
+
export { VarPrefixPostprocessor, presetMini as default, normalizePreflights, preflights, presetMini };
|
package/dist/rules.cjs
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const decoration = require('./shared/preset-mini.
|
|
6
|
-
const _default = require('./shared/preset-mini.
|
|
7
|
-
require('./shared/preset-mini.
|
|
5
|
+
const decoration = require('./shared/preset-mini.8953ff1a.cjs');
|
|
6
|
+
const _default = require('./shared/preset-mini.435805c5.cjs');
|
|
7
|
+
require('./shared/preset-mini.e54ce13d.cjs');
|
|
8
8
|
require('@unocss/core');
|
|
9
9
|
|
|
10
10
|
|
package/dist/rules.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { F as alignments, C as appearance, s as appearances, S as borderStyles, b as borders, o as boxShadows, Q as boxShadowsBase, K as boxSizing, z as breaks, O as contains, c as contentVisibility, a as contents, q as cursors, d as displays, I as floats, n as fontSmoothings, m as fontStyles, f as fonts, T as handlerBorderStyle, H as insets, E as justifies, D as orders, B as outline, A as overflows, G as placements, u as pointerEvents, p as positions, v as resizes, R as ringBase, r as rings, t as tabSizes, l as textAligns, h as textDecorations, e as textIndents, g as textOverflows, j as textShadows, i as textStrokes, k as textTransforms, P as transformBase, M as transforms, L as transitions, x as userSelects, U as varEmpty, w as verticalAligns, y as whitespaces, N as willChange, J as zIndexes } from './shared/preset-mini.
|
|
2
|
-
export { d as aspectRatio, b as bgColors, c as containerParent, i as cssProperty, h as cssVariables, f as flex, g as gaps, a as grids, m as margins, o as opacity, p as paddings, q as questionMark, r as rules, s as sizes, e as svgUtilities, t as textColors } from './shared/preset-mini.
|
|
3
|
-
import './shared/preset-mini.
|
|
1
|
+
export { F as alignments, C as appearance, s as appearances, S as borderStyles, b as borders, o as boxShadows, Q as boxShadowsBase, K as boxSizing, z as breaks, O as contains, c as contentVisibility, a as contents, q as cursors, d as displays, I as floats, n as fontSmoothings, m as fontStyles, f as fonts, T as handlerBorderStyle, H as insets, E as justifies, D as orders, B as outline, A as overflows, G as placements, u as pointerEvents, p as positions, v as resizes, R as ringBase, r as rings, t as tabSizes, l as textAligns, h as textDecorations, e as textIndents, g as textOverflows, j as textShadows, i as textStrokes, k as textTransforms, P as transformBase, M as transforms, L as transitions, x as userSelects, U as varEmpty, w as verticalAligns, y as whitespaces, N as willChange, J as zIndexes } from './shared/preset-mini.a6daaf18.mjs';
|
|
2
|
+
export { d as aspectRatio, b as bgColors, c as containerParent, i as cssProperty, h as cssVariables, f as flex, g as gaps, a as grids, m as margins, o as opacity, p as paddings, q as questionMark, r as rules, s as sizes, e as svgUtilities, t as textColors } from './shared/preset-mini.6b96b995.mjs';
|
|
3
|
+
import './shared/preset-mini.ca595ab5.mjs';
|
|
4
4
|
import '@unocss/core';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { c as colors } from './preset-mini.65ac75be.mjs';
|
|
2
|
-
import { P as transformBase, Q as boxShadowsBase, R as ringBase } from './preset-mini.
|
|
3
|
-
import './preset-mini.
|
|
2
|
+
import { P as transformBase, Q as boxShadowsBase, R as ringBase } from './preset-mini.a6daaf18.mjs';
|
|
3
|
+
import './preset-mini.ca595ab5.mjs';
|
|
4
4
|
import '@unocss/core';
|
|
5
5
|
|
|
6
6
|
const fontFamily = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { h as handler, l as resolveBreakpoints, q as getBracket, C as CONTROL_MINI_NO_NEGATIVE,
|
|
1
|
+
import { h as handler, l as resolveBreakpoints, q as getBracket, C as CONTROL_MINI_NO_NEGATIVE, t as getComponent } from './preset-mini.ca595ab5.mjs';
|
|
2
2
|
import { warnOnce, escapeRegExp, escapeSelector } from '@unocss/core';
|
|
3
|
-
import { v as variantGetParameter, a as variantGetBracket, b as variantParentMatcher, c as variantMatcher } from './preset-mini.
|
|
3
|
+
import { v as variantGetParameter, a as variantGetBracket, b as variantParentMatcher, c as variantMatcher } from './preset-mini.bd4c0c0c.mjs';
|
|
4
4
|
|
|
5
5
|
const variantAria = {
|
|
6
6
|
name: "aria",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const core = require('@unocss/core');
|
|
4
|
-
const colors = require('./preset-mini.
|
|
4
|
+
const colors = require('./preset-mini.e54ce13d.cjs');
|
|
5
5
|
|
|
6
6
|
const variantMatcher = (name, handler) => {
|
|
7
7
|
const re = new RegExp(`^${core.escapeRegExp(name)}[:-]`);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const decoration = require('./preset-mini.
|
|
4
|
-
const colors = require('./preset-mini.
|
|
3
|
+
const decoration = require('./preset-mini.8953ff1a.cjs');
|
|
4
|
+
const colors = require('./preset-mini.e54ce13d.cjs');
|
|
5
5
|
const core = require('@unocss/core');
|
|
6
6
|
|
|
7
7
|
const opacity = [
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const colors = require('./preset-mini.30606736.cjs');
|
|
4
|
-
const decoration = require('./preset-mini.
|
|
5
|
-
require('./preset-mini.
|
|
4
|
+
const decoration = require('./preset-mini.8953ff1a.cjs');
|
|
5
|
+
require('./preset-mini.e54ce13d.cjs');
|
|
6
6
|
require('@unocss/core');
|
|
7
7
|
|
|
8
8
|
const fontFamily = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { d as displays, b as borders, c as contentVisibility, a as contents, f as fonts, t as tabSizes, e as textIndents, g as textOverflows, h as textDecorations, i as textStrokes, j as textShadows, k as textTransforms, l as textAligns, m as fontStyles, n as fontSmoothings, o as boxShadows, r as rings, p as positions, q as cursors, s as appearances, u as pointerEvents, v as resizes, w as verticalAligns, x as userSelects, y as whitespaces, z as breaks, A as overflows, B as outline, C as appearance, D as orders, E as justifies, F as alignments, G as placements, H as insets, I as floats, J as zIndexes, K as boxSizing, L as transitions, M as transforms, N as willChange, O as contains } from './preset-mini.
|
|
2
|
-
import { h as handler, c as colorResolver, n as numberWithUnitRE, r as resolveVerticalBreakpoints, l as resolveBreakpoints, o as directionSize } from './preset-mini.
|
|
1
|
+
import { d as displays, b as borders, c as contentVisibility, a as contents, f as fonts, t as tabSizes, e as textIndents, g as textOverflows, h as textDecorations, i as textStrokes, j as textShadows, k as textTransforms, l as textAligns, m as fontStyles, n as fontSmoothings, o as boxShadows, r as rings, p as positions, q as cursors, s as appearances, u as pointerEvents, v as resizes, w as verticalAligns, x as userSelects, y as whitespaces, z as breaks, A as overflows, B as outline, C as appearance, D as orders, E as justifies, F as alignments, G as placements, H as insets, I as floats, J as zIndexes, K as boxSizing, L as transitions, M as transforms, N as willChange, O as contains } from './preset-mini.a6daaf18.mjs';
|
|
2
|
+
import { h as handler, c as colorResolver, n as numberWithUnitRE, r as resolveVerticalBreakpoints, l as resolveBreakpoints, o as directionSize } from './preset-mini.ca595ab5.mjs';
|
|
3
3
|
import { warnOnce } from '@unocss/core';
|
|
4
4
|
|
|
5
5
|
const opacity = [
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const colors = require('./preset-mini.
|
|
3
|
+
const colors = require('./preset-mini.e54ce13d.cjs');
|
|
4
4
|
const core = require('@unocss/core');
|
|
5
5
|
|
|
6
6
|
const verticalAlignAlias = {
|
|
@@ -199,6 +199,9 @@ const weightMap = {
|
|
|
199
199
|
extrabold: "800",
|
|
200
200
|
black: "900"
|
|
201
201
|
};
|
|
202
|
+
function handleLineHeight(s, theme) {
|
|
203
|
+
return theme.lineHeight?.[s] || colors.handler.bracket.cssvar.global.rem(s);
|
|
204
|
+
}
|
|
202
205
|
const fonts = [
|
|
203
206
|
[
|
|
204
207
|
/^font-(.+)$/,
|
|
@@ -208,12 +211,20 @@ const fonts = [
|
|
|
208
211
|
[
|
|
209
212
|
/^text-(.+)$/,
|
|
210
213
|
([, s = "base"], { theme }) => {
|
|
211
|
-
const
|
|
212
|
-
|
|
213
|
-
|
|
214
|
+
const [size, leading] = colors.splitShorthand(s, "length");
|
|
215
|
+
const sizePairs = core.toArray(theme.fontSize?.[size]);
|
|
216
|
+
const lineHeight = leading ? handleLineHeight(leading, theme) : void 0;
|
|
217
|
+
if (sizePairs?.[0]) {
|
|
218
|
+
const [fontSize, height] = sizePairs;
|
|
219
|
+
return {
|
|
220
|
+
"font-size": fontSize,
|
|
221
|
+
"line-height": lineHeight ?? height ?? "1"
|
|
222
|
+
};
|
|
223
|
+
}
|
|
224
|
+
if (lineHeight) {
|
|
214
225
|
return {
|
|
215
|
-
"font-size": size,
|
|
216
|
-
"line-height":
|
|
226
|
+
"font-size": colors.handler.bracketOfLength.rem(size),
|
|
227
|
+
"line-height": lineHeight
|
|
217
228
|
};
|
|
218
229
|
}
|
|
219
230
|
return { "font-size": colors.handler.bracketOfLength.rem(s) };
|
|
@@ -233,7 +244,7 @@ const fonts = [
|
|
|
233
244
|
],
|
|
234
245
|
[
|
|
235
246
|
/^(?:font-)?(?:leading|lh)-(.+)$/,
|
|
236
|
-
([, s], { theme }) => ({ "line-height":
|
|
247
|
+
([, s], { theme }) => ({ "line-height": handleLineHeight(s, theme) }),
|
|
237
248
|
{ autocomplete: "(leading|lh)-$lineHeight" }
|
|
238
249
|
],
|
|
239
250
|
["font-synthesis-weight", { "font-synthesis": "weight" }],
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const colors = require('./preset-mini.
|
|
3
|
+
const colors = require('./preset-mini.e54ce13d.cjs');
|
|
4
4
|
const core = require('@unocss/core');
|
|
5
|
-
const variants$1 = require('./preset-mini.
|
|
5
|
+
const variants$1 = require('./preset-mini.28b1d01c.cjs');
|
|
6
6
|
|
|
7
7
|
const variantAria = {
|
|
8
8
|
name: "aria",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as globalKeywords, h as handler, c as colorResolver, d as directionMap, a as hasParseableColor, b as cornerMap, p as parseColor, e as colorToString, f as colorOpacityToString, m as makeGlobalStaticRules, i as colorableShadows, j as insetMap, k as positionMap, x as xyzMap } from './preset-mini.
|
|
1
|
+
import { g as globalKeywords, h as handler, c as colorResolver, d as directionMap, a as hasParseableColor, b as cornerMap, p as parseColor, e as colorToString, f as colorOpacityToString, m as makeGlobalStaticRules, s as splitShorthand, i as colorableShadows, j as insetMap, k as positionMap, x as xyzMap } from './preset-mini.ca595ab5.mjs';
|
|
2
2
|
import { toArray } from '@unocss/core';
|
|
3
3
|
|
|
4
4
|
const verticalAlignAlias = {
|
|
@@ -197,6 +197,9 @@ const weightMap = {
|
|
|
197
197
|
extrabold: "800",
|
|
198
198
|
black: "900"
|
|
199
199
|
};
|
|
200
|
+
function handleLineHeight(s, theme) {
|
|
201
|
+
return theme.lineHeight?.[s] || handler.bracket.cssvar.global.rem(s);
|
|
202
|
+
}
|
|
200
203
|
const fonts = [
|
|
201
204
|
[
|
|
202
205
|
/^font-(.+)$/,
|
|
@@ -206,12 +209,20 @@ const fonts = [
|
|
|
206
209
|
[
|
|
207
210
|
/^text-(.+)$/,
|
|
208
211
|
([, s = "base"], { theme }) => {
|
|
209
|
-
const
|
|
210
|
-
|
|
211
|
-
|
|
212
|
+
const [size, leading] = splitShorthand(s, "length");
|
|
213
|
+
const sizePairs = toArray(theme.fontSize?.[size]);
|
|
214
|
+
const lineHeight = leading ? handleLineHeight(leading, theme) : void 0;
|
|
215
|
+
if (sizePairs?.[0]) {
|
|
216
|
+
const [fontSize, height] = sizePairs;
|
|
217
|
+
return {
|
|
218
|
+
"font-size": fontSize,
|
|
219
|
+
"line-height": lineHeight ?? height ?? "1"
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
if (lineHeight) {
|
|
212
223
|
return {
|
|
213
|
-
"font-size": size,
|
|
214
|
-
"line-height":
|
|
224
|
+
"font-size": handler.bracketOfLength.rem(size),
|
|
225
|
+
"line-height": lineHeight
|
|
215
226
|
};
|
|
216
227
|
}
|
|
217
228
|
return { "font-size": handler.bracketOfLength.rem(s) };
|
|
@@ -231,7 +242,7 @@ const fonts = [
|
|
|
231
242
|
],
|
|
232
243
|
[
|
|
233
244
|
/^(?:font-)?(?:leading|lh)-(.+)$/,
|
|
234
|
-
([, s], { theme }) => ({ "line-height":
|
|
245
|
+
([, s], { theme }) => ({ "line-height": handleLineHeight(s, theme) }),
|
|
235
246
|
{ autocomplete: "(leading|lh)-$lineHeight" }
|
|
236
247
|
],
|
|
237
248
|
["font-synthesis-weight", { "font-synthesis": "weight" }],
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { escapeRegExp } from '@unocss/core';
|
|
2
|
-
import { q as getBracket } from './preset-mini.
|
|
2
|
+
import { q as getBracket } from './preset-mini.ca595ab5.mjs';
|
|
3
3
|
|
|
4
4
|
const variantMatcher = (name, handler) => {
|
|
5
5
|
const re = new RegExp(`^${escapeRegExp(name)}[:-]`);
|
|
@@ -98,7 +98,7 @@ const globalKeywords = [
|
|
|
98
98
|
"unset"
|
|
99
99
|
];
|
|
100
100
|
|
|
101
|
-
const numberWithUnitRE = /^(-?\d*(?:\.\d+)?)(px|pt|pc|%|r?em|ex|ch|ic|(?:[sld]?v|cq)(?:[whib]|min|max)|in|cm|mm|rpx)?$/i;
|
|
101
|
+
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;
|
|
102
102
|
const numberRE = /^(-?\d*(?:\.\d+)?)$/i;
|
|
103
103
|
const unitOnlyRE = /^(px)$/i;
|
|
104
104
|
|
|
@@ -350,15 +350,18 @@ function getThemeColor(theme, colors) {
|
|
|
350
350
|
}
|
|
351
351
|
return obj;
|
|
352
352
|
}
|
|
353
|
-
function
|
|
353
|
+
function splitShorthand(body, type) {
|
|
354
354
|
const split = body.split(/(?:\/|:)/);
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
[main, opacity] = split;
|
|
355
|
+
if (split[0] === `[${type}`) {
|
|
356
|
+
return [
|
|
357
|
+
split.slice(0, 2).join(":"),
|
|
358
|
+
split[2]
|
|
359
|
+
];
|
|
361
360
|
}
|
|
361
|
+
return split;
|
|
362
|
+
}
|
|
363
|
+
function parseColor$1(body, theme) {
|
|
364
|
+
const [main, opacity] = splitShorthand(body, "color");
|
|
362
365
|
const colors = main.replace(/([a-z])([0-9])/g, "$1-$2").split(/-/g);
|
|
363
366
|
const [name] = colors;
|
|
364
367
|
if (!name)
|
|
@@ -727,4 +730,4 @@ function parseCssSpaceColorValues(componentString) {
|
|
|
727
730
|
};
|
|
728
731
|
}
|
|
729
732
|
|
|
730
|
-
export { CONTROL_MINI_NO_NEGATIVE as C, hasParseableColor as a, cornerMap as b, colorResolver as c, directionMap as d, colorToString as e, colorOpacityToString as f, globalKeywords as g, handler as h, colorableShadows as i, insetMap as j, positionMap as k, resolveBreakpoints as l, makeGlobalStaticRules as m, numberWithUnitRE as n, directionSize as o, parseColor$1 as p, getBracket as q, resolveVerticalBreakpoints as r,
|
|
733
|
+
export { CONTROL_MINI_NO_NEGATIVE as C, hasParseableColor as a, cornerMap as b, colorResolver as c, directionMap as d, colorToString as e, colorOpacityToString as f, globalKeywords as g, handler as h, colorableShadows as i, insetMap as j, positionMap as k, resolveBreakpoints as l, makeGlobalStaticRules as m, numberWithUnitRE as n, directionSize as o, parseColor$1 as p, getBracket as q, resolveVerticalBreakpoints as r, splitShorthand as s, getComponent as t, hex2rgba as u, parseCssColor as v, h as w, xyzMap as x, valueHandlers as y, getComponents as z };
|
|
@@ -100,7 +100,7 @@ const globalKeywords = [
|
|
|
100
100
|
"unset"
|
|
101
101
|
];
|
|
102
102
|
|
|
103
|
-
const numberWithUnitRE = /^(-?\d*(?:\.\d+)?)(px|pt|pc|%|r?em|ex|ch|ic|(?:[sld]?v|cq)(?:[whib]|min|max)|in|cm|mm|rpx)?$/i;
|
|
103
|
+
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;
|
|
104
104
|
const numberRE = /^(-?\d*(?:\.\d+)?)$/i;
|
|
105
105
|
const unitOnlyRE = /^(px)$/i;
|
|
106
106
|
|
|
@@ -352,15 +352,18 @@ function getThemeColor(theme, colors) {
|
|
|
352
352
|
}
|
|
353
353
|
return obj;
|
|
354
354
|
}
|
|
355
|
-
function
|
|
355
|
+
function splitShorthand(body, type) {
|
|
356
356
|
const split = body.split(/(?:\/|:)/);
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
[main, opacity] = split;
|
|
357
|
+
if (split[0] === `[${type}`) {
|
|
358
|
+
return [
|
|
359
|
+
split.slice(0, 2).join(":"),
|
|
360
|
+
split[2]
|
|
361
|
+
];
|
|
363
362
|
}
|
|
363
|
+
return split;
|
|
364
|
+
}
|
|
365
|
+
function parseColor$1(body, theme) {
|
|
366
|
+
const [main, opacity] = splitShorthand(body, "color");
|
|
364
367
|
const colors = main.replace(/([a-z])([0-9])/g, "$1-$2").split(/-/g);
|
|
365
368
|
const [name] = colors;
|
|
366
369
|
if (!name)
|
|
@@ -753,5 +756,6 @@ exports.parseCssColor = parseCssColor;
|
|
|
753
756
|
exports.positionMap = positionMap;
|
|
754
757
|
exports.resolveBreakpoints = resolveBreakpoints;
|
|
755
758
|
exports.resolveVerticalBreakpoints = resolveVerticalBreakpoints;
|
|
759
|
+
exports.splitShorthand = splitShorthand;
|
|
756
760
|
exports.valueHandlers = valueHandlers;
|
|
757
761
|
exports.xyzMap = xyzMap;
|
package/dist/theme.cjs
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const colors = require('./shared/preset-mini.30606736.cjs');
|
|
6
|
-
const _default = require('./shared/preset-mini.
|
|
7
|
-
require('./shared/preset-mini.
|
|
8
|
-
require('./shared/preset-mini.
|
|
6
|
+
const _default = require('./shared/preset-mini.43dfafb9.cjs');
|
|
7
|
+
require('./shared/preset-mini.8953ff1a.cjs');
|
|
8
|
+
require('./shared/preset-mini.e54ce13d.cjs');
|
|
9
9
|
require('@unocss/core');
|
|
10
10
|
|
|
11
11
|
|
package/dist/theme.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { c as colors } from './shared/preset-mini.65ac75be.mjs';
|
|
2
|
-
export { p as baseSize, b as blur, m as borderRadius, n as boxShadow, i as breakpoints, z as containers, 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, A as preflightBase, 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 './shared/preset-mini.
|
|
3
|
-
import './shared/preset-mini.
|
|
4
|
-
import './shared/preset-mini.
|
|
2
|
+
export { p as baseSize, b as blur, m as borderRadius, n as boxShadow, i as breakpoints, z as containers, 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, A as preflightBase, 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 './shared/preset-mini.0a36abfc.mjs';
|
|
3
|
+
import './shared/preset-mini.a6daaf18.mjs';
|
|
4
|
+
import './shared/preset-mini.ca595ab5.mjs';
|
|
5
5
|
import '@unocss/core';
|
|
@@ -9,6 +9,10 @@ declare const CONTROL_MINI_NO_NEGATIVE = "$$mini-no-negative";
|
|
|
9
9
|
* @see {@link directionMap}
|
|
10
10
|
*/
|
|
11
11
|
declare function directionSize(propertyPrefix: string): DynamicMatcher;
|
|
12
|
+
/**
|
|
13
|
+
* Split utility shorthand delimited by / or :
|
|
14
|
+
*/
|
|
15
|
+
declare function splitShorthand(body: string, type: string): string[];
|
|
12
16
|
/**
|
|
13
17
|
* Parse color string into {@link ParsedColorValue} (if possible). Color value will first be matched to theme object before parsing.
|
|
14
18
|
* See also color.tests.ts for more examples.
|
|
@@ -60,4 +64,4 @@ declare function getBracket(str: string, open: string, close: string): string[]
|
|
|
60
64
|
declare function getComponent(str: string, open: string, close: string, separators: string | string[]): string[] | undefined;
|
|
61
65
|
declare function getComponents(str: string, separators: string | string[], limit?: number): string[] | undefined;
|
|
62
66
|
|
|
63
|
-
export { CONTROL_MINI_NO_NEGATIVE as C, colorableShadows as a, resolveVerticalBreakpoints as b, colorResolver as c, directionSize as d, getComponent as e, getComponents as f, getBracket as g, hasParseableColor as h, makeGlobalStaticRules as m, parseColor as p, resolveBreakpoints as r };
|
|
67
|
+
export { CONTROL_MINI_NO_NEGATIVE as C, colorableShadows as a, resolveVerticalBreakpoints as b, colorResolver as c, directionSize as d, getComponent as e, getComponents as f, getBracket as g, hasParseableColor as h, makeGlobalStaticRules as m, parseColor as p, resolveBreakpoints as r, splitShorthand as s };
|
package/dist/utils.cjs
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const colors = require('./shared/preset-mini.
|
|
6
|
-
const variants = require('./shared/preset-mini.
|
|
5
|
+
const colors = require('./shared/preset-mini.e54ce13d.cjs');
|
|
6
|
+
const variants = require('./shared/preset-mini.28b1d01c.cjs');
|
|
7
7
|
require('@unocss/core');
|
|
8
8
|
|
|
9
9
|
|
|
@@ -31,6 +31,7 @@ exports.parseCssColor = colors.parseCssColor;
|
|
|
31
31
|
exports.positionMap = colors.positionMap;
|
|
32
32
|
exports.resolveBreakpoints = colors.resolveBreakpoints;
|
|
33
33
|
exports.resolveVerticalBreakpoints = colors.resolveVerticalBreakpoints;
|
|
34
|
+
exports.splitShorthand = colors.splitShorthand;
|
|
34
35
|
exports.valueHandlers = colors.valueHandlers;
|
|
35
36
|
exports.xyzMap = colors.xyzMap;
|
|
36
37
|
exports.variantGetBracket = variants.variantGetBracket;
|
package/dist/utils.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _unocss_core from '@unocss/core';
|
|
2
2
|
import { RGBAColorValue, CSSColorValue, VariantHandlerContext, VariantObject } from '@unocss/core';
|
|
3
|
-
export { C as CONTROL_MINI_NO_NEGATIVE, c as colorResolver, a as colorableShadows, d as directionSize, g as getBracket, e as getComponent, f as getComponents, h as hasParseableColor, m as makeGlobalStaticRules, p as parseColor, r as resolveBreakpoints, b as resolveVerticalBreakpoints } from './utilities-
|
|
3
|
+
export { C as CONTROL_MINI_NO_NEGATIVE, c as colorResolver, a as colorableShadows, d as directionSize, g as getBracket, e as getComponent, f as getComponents, h as hasParseableColor, m as makeGlobalStaticRules, p as parseColor, r as resolveBreakpoints, b as resolveVerticalBreakpoints, s as splitShorthand } from './utilities-d2f973f4.js';
|
|
4
4
|
import './types-fa74508f.js';
|
|
5
5
|
|
|
6
6
|
declare function hex2rgba(hex?: string): RGBAColorValue | undefined;
|
package/dist/utils.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { C as CONTROL_MINI_NO_NEGATIVE, f as colorOpacityToString, c as colorResolver, e as colorToString, i as colorableShadows, b as cornerMap, d as directionMap, o as directionSize, q as getBracket,
|
|
2
|
-
export { a as variantGetBracket, v as variantGetParameter, c as variantMatcher, b as variantParentMatcher } from './shared/preset-mini.
|
|
1
|
+
export { C as CONTROL_MINI_NO_NEGATIVE, f as colorOpacityToString, c as colorResolver, e as colorToString, i as colorableShadows, b as cornerMap, d as directionMap, o as directionSize, q as getBracket, t as getComponent, z as getComponents, g as globalKeywords, w as h, h as handler, a as hasParseableColor, u as hex2rgba, j as insetMap, m as makeGlobalStaticRules, p as parseColor, v as parseCssColor, k as positionMap, l as resolveBreakpoints, r as resolveVerticalBreakpoints, s as splitShorthand, y as valueHandlers, x as xyzMap } from './shared/preset-mini.ca595ab5.mjs';
|
|
2
|
+
export { a as variantGetBracket, v as variantGetParameter, c as variantMatcher, b as variantParentMatcher } from './shared/preset-mini.bd4c0c0c.mjs';
|
|
3
3
|
import '@unocss/core';
|
package/dist/variants.cjs
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const _default = require('./shared/preset-mini.
|
|
6
|
-
require('./shared/preset-mini.
|
|
5
|
+
const _default = require('./shared/preset-mini.89cb41ec.cjs');
|
|
6
|
+
require('./shared/preset-mini.e54ce13d.cjs');
|
|
7
7
|
require('@unocss/core');
|
|
8
|
-
require('./shared/preset-mini.
|
|
8
|
+
require('./shared/preset-mini.28b1d01c.cjs');
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
package/dist/variants.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { T as Theme } from './types-fa74508f.js';
|
|
|
3
3
|
import { PresetMiniOptions } from './index.js';
|
|
4
4
|
import './colors-b217808a.js';
|
|
5
5
|
import './default-344896b2.js';
|
|
6
|
-
import './utilities-
|
|
6
|
+
import './utilities-d2f973f4.js';
|
|
7
7
|
|
|
8
8
|
declare const variantAria: VariantObject;
|
|
9
9
|
|
package/dist/variants.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { c as calcMaxWidthBySize, t as partClasses, a as variantAria, b as variantBreakpoints, j as variantColorsMediaOrClass, d as variantCombinators, e as variantContainerQuery, m as variantCssLayer, h as variantCustomMedia, f as variantDataAttribute, u as variantImportant, n as variantInternalLayer, k as variantLanguageDirections, w as variantNegative, g as variantPrint, r as variantPseudoClassFunctions, q as variantPseudoClassesAndElements, o as variantScope, l as variantSelector, i as variantSupports, s as variantTaggedPseudoClasses, p as variantVariables, v as variants } from './shared/preset-mini.
|
|
2
|
-
import './shared/preset-mini.
|
|
1
|
+
export { c as calcMaxWidthBySize, t as partClasses, a as variantAria, b as variantBreakpoints, j as variantColorsMediaOrClass, d as variantCombinators, e as variantContainerQuery, m as variantCssLayer, h as variantCustomMedia, f as variantDataAttribute, u as variantImportant, n as variantInternalLayer, k as variantLanguageDirections, w as variantNegative, g as variantPrint, r as variantPseudoClassFunctions, q as variantPseudoClassesAndElements, o as variantScope, l as variantSelector, i as variantSupports, s as variantTaggedPseudoClasses, p as variantVariables, v as variants } from './shared/preset-mini.0d510914.mjs';
|
|
2
|
+
import './shared/preset-mini.ca595ab5.mjs';
|
|
3
3
|
import '@unocss/core';
|
|
4
|
-
import './shared/preset-mini.
|
|
4
|
+
import './shared/preset-mini.bd4c0c0c.mjs';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unocss/preset-mini",
|
|
3
|
-
"version": "0.48.
|
|
3
|
+
"version": "0.48.5",
|
|
4
4
|
"description": "The minimal preset for UnoCSS",
|
|
5
5
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"*.css"
|
|
62
62
|
],
|
|
63
63
|
"dependencies": {
|
|
64
|
-
"@unocss/core": "0.48.
|
|
64
|
+
"@unocss/core": "0.48.5"
|
|
65
65
|
},
|
|
66
66
|
"scripts": {
|
|
67
67
|
"build": "unbuild",
|