@unocss/preset-mini 0.27.4 → 0.28.0
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 +2 -2
- package/dist/chunks/default2.cjs +6 -6
- package/dist/chunks/default2.mjs +6 -6
- package/dist/colors-ce2fecb8.d.ts +1 -1
- package/dist/colors.d.ts +2 -2
- package/dist/default-e6d1b2e8.d.ts +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/rules.d.ts +1 -1
- package/dist/theme.d.ts +4 -4
- package/dist/utilities-820bcff8.d.ts +1 -1
- package/dist/utils.d.ts +2 -2
- package/dist/variants.d.ts +5 -5
- package/package.json +14 -13
package/README.md
CHANGED
package/dist/chunks/default2.cjs
CHANGED
|
@@ -211,7 +211,7 @@ const weightMap = {
|
|
|
211
211
|
black: "900"
|
|
212
212
|
};
|
|
213
213
|
const fonts = [
|
|
214
|
-
[/^font-(\w+)$/, ([, d], { theme }) => ({ "font-family": theme.fontFamily?.[d] })],
|
|
214
|
+
[/^font-(\w+)$/, ([, d], { theme }) => ({ "font-family": theme.fontFamily?.[d] || utilities.handler.global(d) })],
|
|
215
215
|
[/^text-(.+)$/, ([, s = "base"], { theme }) => {
|
|
216
216
|
const themed = core.toArray(theme.fontSize?.[s]);
|
|
217
217
|
if (themed?.[0]) {
|
|
@@ -229,10 +229,10 @@ const fonts = [
|
|
|
229
229
|
if (size != null)
|
|
230
230
|
return { "font-size": size };
|
|
231
231
|
}],
|
|
232
|
-
[/^(?:font|fw)-?([^-]+)$/, ([, s]) => ({ "font-weight": weightMap[s] || utilities.handler.number(s) })],
|
|
233
|
-
[/^(?:leading|lh)-(.+)$/, ([, s], { theme }) => ({ "line-height": theme.lineHeight?.[s] || utilities.handler.bracket.cssvar.rem(s) })],
|
|
234
|
-
[/^tracking-(.+)$/, ([, s], { theme }) => ({ "letter-spacing": theme.letterSpacing?.[s] || utilities.handler.bracket.cssvar.rem(s) })],
|
|
235
|
-
[/^word-spacing-(.+)$/, ([, s], { theme }) => ({ "word-spacing": theme.wordSpacing?.[s] || utilities.handler.bracket.cssvar.rem(s) })]
|
|
232
|
+
[/^(?:font|fw)-?([^-]+)$/, ([, s]) => ({ "font-weight": weightMap[s] || utilities.handler.global.number(s) })],
|
|
233
|
+
[/^(?:leading|lh)-(.+)$/, ([, s], { theme }) => ({ "line-height": theme.lineHeight?.[s] || utilities.handler.bracket.cssvar.global.rem(s) })],
|
|
234
|
+
[/^tracking-(.+)$/, ([, s], { theme }) => ({ "letter-spacing": theme.letterSpacing?.[s] || utilities.handler.bracket.cssvar.global.rem(s) })],
|
|
235
|
+
[/^word-spacing-(.+)$/, ([, s], { theme }) => ({ "word-spacing": theme.wordSpacing?.[s] || utilities.handler.bracket.cssvar.global.rem(s) })]
|
|
236
236
|
];
|
|
237
237
|
const tabSizes = [
|
|
238
238
|
[/^tab(?:-(.+))?$/, ([, s]) => {
|
|
@@ -247,7 +247,7 @@ const tabSizes = [
|
|
|
247
247
|
}]
|
|
248
248
|
];
|
|
249
249
|
const textIndents = [
|
|
250
|
-
[/^indent(?:-(.+))?$/, ([, s], { theme }) => ({ "text-indent": theme.textIndent?.[s || "DEFAULT"] || utilities.handler.bracket.cssvar.fraction.rem(s) })]
|
|
250
|
+
[/^indent(?:-(.+))?$/, ([, s], { theme }) => ({ "text-indent": theme.textIndent?.[s || "DEFAULT"] || utilities.handler.bracket.cssvar.global.fraction.rem(s) })]
|
|
251
251
|
];
|
|
252
252
|
const textStrokes = [
|
|
253
253
|
[/^text-stroke(?:-(.+))?$/, ([, s], { theme }) => ({ "-webkit-text-stroke-width": theme.textStrokeWidth?.[s || "DEFAULT"] || utilities.handler.bracket.cssvar.px(s) })],
|
package/dist/chunks/default2.mjs
CHANGED
|
@@ -209,7 +209,7 @@ const weightMap = {
|
|
|
209
209
|
black: "900"
|
|
210
210
|
};
|
|
211
211
|
const fonts = [
|
|
212
|
-
[/^font-(\w+)$/, ([, d], { theme }) => ({ "font-family": theme.fontFamily?.[d] })],
|
|
212
|
+
[/^font-(\w+)$/, ([, d], { theme }) => ({ "font-family": theme.fontFamily?.[d] || handler.global(d) })],
|
|
213
213
|
[/^text-(.+)$/, ([, s = "base"], { theme }) => {
|
|
214
214
|
const themed = toArray(theme.fontSize?.[s]);
|
|
215
215
|
if (themed?.[0]) {
|
|
@@ -227,10 +227,10 @@ const fonts = [
|
|
|
227
227
|
if (size != null)
|
|
228
228
|
return { "font-size": size };
|
|
229
229
|
}],
|
|
230
|
-
[/^(?:font|fw)-?([^-]+)$/, ([, s]) => ({ "font-weight": weightMap[s] || handler.number(s) })],
|
|
231
|
-
[/^(?:leading|lh)-(.+)$/, ([, s], { theme }) => ({ "line-height": theme.lineHeight?.[s] || handler.bracket.cssvar.rem(s) })],
|
|
232
|
-
[/^tracking-(.+)$/, ([, s], { theme }) => ({ "letter-spacing": theme.letterSpacing?.[s] || handler.bracket.cssvar.rem(s) })],
|
|
233
|
-
[/^word-spacing-(.+)$/, ([, s], { theme }) => ({ "word-spacing": theme.wordSpacing?.[s] || handler.bracket.cssvar.rem(s) })]
|
|
230
|
+
[/^(?:font|fw)-?([^-]+)$/, ([, s]) => ({ "font-weight": weightMap[s] || handler.global.number(s) })],
|
|
231
|
+
[/^(?:leading|lh)-(.+)$/, ([, s], { theme }) => ({ "line-height": theme.lineHeight?.[s] || handler.bracket.cssvar.global.rem(s) })],
|
|
232
|
+
[/^tracking-(.+)$/, ([, s], { theme }) => ({ "letter-spacing": theme.letterSpacing?.[s] || handler.bracket.cssvar.global.rem(s) })],
|
|
233
|
+
[/^word-spacing-(.+)$/, ([, s], { theme }) => ({ "word-spacing": theme.wordSpacing?.[s] || handler.bracket.cssvar.global.rem(s) })]
|
|
234
234
|
];
|
|
235
235
|
const tabSizes = [
|
|
236
236
|
[/^tab(?:-(.+))?$/, ([, s]) => {
|
|
@@ -245,7 +245,7 @@ const tabSizes = [
|
|
|
245
245
|
}]
|
|
246
246
|
];
|
|
247
247
|
const textIndents = [
|
|
248
|
-
[/^indent(?:-(.+))?$/, ([, s], { theme }) => ({ "text-indent": theme.textIndent?.[s || "DEFAULT"] || handler.bracket.cssvar.fraction.rem(s) })]
|
|
248
|
+
[/^indent(?:-(.+))?$/, ([, s], { theme }) => ({ "text-indent": theme.textIndent?.[s || "DEFAULT"] || handler.bracket.cssvar.global.fraction.rem(s) })]
|
|
249
249
|
];
|
|
250
250
|
const textStrokes = [
|
|
251
251
|
[/^text-stroke(?:-(.+))?$/, ([, s], { theme }) => ({ "-webkit-text-stroke-width": theme.textStrokeWidth?.[s || "DEFAULT"] || handler.bracket.cssvar.px(s) })],
|
package/dist/colors.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { c as colors } from './colors-ce2fecb8';
|
|
2
|
-
import './types-f7b2c653';
|
|
1
|
+
export { c as colors } from './colors-ce2fecb8.js';
|
|
2
|
+
import './types-f7b2c653.js';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { PresetOptions, Preset } from '@unocss/core';
|
|
2
|
-
import { T as Theme } from './types-f7b2c653';
|
|
3
|
-
export { T as Theme, a as ThemeAnimation } from './types-f7b2c653';
|
|
4
|
-
export { t as theme } from './default-e6d1b2e8';
|
|
5
|
-
export { c as colors } from './colors-ce2fecb8';
|
|
6
|
-
export { p as parseColor } from './utilities-820bcff8';
|
|
2
|
+
import { T as Theme } from './types-f7b2c653.js';
|
|
3
|
+
export { T as Theme, a as ThemeAnimation } from './types-f7b2c653.js';
|
|
4
|
+
export { t as theme } from './default-e6d1b2e8.js';
|
|
5
|
+
export { c as colors } from './colors-ce2fecb8.js';
|
|
6
|
+
export { p as parseColor } from './utilities-820bcff8.js';
|
|
7
7
|
|
|
8
8
|
interface PresetMiniOptions extends PresetOptions {
|
|
9
9
|
/**
|
package/dist/rules.d.ts
CHANGED
package/dist/theme.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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';
|
|
1
|
+
export { c as colors } from './colors-ce2fecb8.js';
|
|
2
|
+
export { t as theme } from './default-e6d1b2e8.js';
|
|
3
|
+
import { T as Theme } from './types-f7b2c653.js';
|
|
4
|
+
export { T as Theme, a as ThemeAnimation } from './types-f7b2c653.js';
|
|
5
5
|
|
|
6
6
|
declare const blur: {
|
|
7
7
|
DEFAULT: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RuleContext, CSSEntries, ParsedColorValue, CSSObject } from '@unocss/core';
|
|
2
|
-
import { T as Theme } from './types-f7b2c653';
|
|
2
|
+
import { T as Theme } from './types-f7b2c653.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Provide {@link DynamicMatcher} function returning spacing definition. See spacing rules.
|
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, h as hasParseableColor, p as parseColor } from './utilities-820bcff8';
|
|
4
|
-
import './types-f7b2c653';
|
|
3
|
+
export { c as colorResolver, a as colorableShadows, d as directionSize, h as hasParseableColor, p as parseColor } from './utilities-820bcff8.js';
|
|
4
|
+
import './types-f7b2c653.js';
|
|
5
5
|
|
|
6
6
|
declare function hex2rgba(hex?: string): RGBAColorValue | undefined;
|
|
7
7
|
declare function parseCssColor(str?: string): CSSColorValue | undefined;
|
package/dist/variants.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Variant, VariantFunction, VariantObject } from '@unocss/core';
|
|
2
|
-
import { T as Theme } from './types-f7b2c653';
|
|
3
|
-
import { PresetMiniOptions } from './index';
|
|
4
|
-
import './default-e6d1b2e8';
|
|
5
|
-
import './colors-ce2fecb8';
|
|
6
|
-
import './utilities-820bcff8';
|
|
2
|
+
import { T as Theme } from './types-f7b2c653.js';
|
|
3
|
+
import { PresetMiniOptions } from './index.js';
|
|
4
|
+
import './default-e6d1b2e8.js';
|
|
5
|
+
import './colors-ce2fecb8.js';
|
|
6
|
+
import './utilities-820bcff8.js';
|
|
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.
|
|
3
|
+
"version": "0.28.0",
|
|
4
4
|
"description": "The minimal preset for UnoCSS",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"unocss",
|
|
@@ -11,19 +11,16 @@
|
|
|
11
11
|
"url": "https://github.com/unocss/unocss/issues"
|
|
12
12
|
},
|
|
13
13
|
"license": "MIT",
|
|
14
|
+
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
14
15
|
"repository": {
|
|
15
16
|
"type": "git",
|
|
16
17
|
"url": "git+https://github.com/unocss/unocss.git",
|
|
17
18
|
"directory": "packages/preset-mini"
|
|
18
19
|
},
|
|
19
20
|
"funding": "https://github.com/sponsors/antfu",
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"dist",
|
|
24
|
-
"*.d.ts",
|
|
25
|
-
"*.css"
|
|
26
|
-
],
|
|
21
|
+
"main": "dist/index.cjs",
|
|
22
|
+
"module": "dist/index.mjs",
|
|
23
|
+
"types": "dist/index.d.ts",
|
|
27
24
|
"exports": {
|
|
28
25
|
".": {
|
|
29
26
|
"require": "./dist/index.cjs",
|
|
@@ -57,14 +54,18 @@
|
|
|
57
54
|
},
|
|
58
55
|
"./*": "./*"
|
|
59
56
|
},
|
|
60
|
-
"
|
|
61
|
-
|
|
62
|
-
|
|
57
|
+
"files": [
|
|
58
|
+
"dist",
|
|
59
|
+
"*.d.ts",
|
|
60
|
+
"*.css"
|
|
61
|
+
],
|
|
62
|
+
"sideEffects": false,
|
|
63
63
|
"dependencies": {
|
|
64
|
-
"@unocss/core": "0.
|
|
64
|
+
"@unocss/core": "0.28.0"
|
|
65
65
|
},
|
|
66
66
|
"scripts": {
|
|
67
67
|
"build": "unbuild",
|
|
68
68
|
"stub": "unbuild --stub"
|
|
69
|
-
}
|
|
69
|
+
},
|
|
70
|
+
"readme": "# @unocss/preset-mini\n\nThe minimal preset for [UnoCSS](https://github.com/unocss/unocss).\n\n## Installation\n\n```bash\nnpm i -D @unocss/preset-mini\n```\n\n```ts\nimport presetMini from '@unocss/preset-mini'\n\nUnocss({\n presets: [\n presetMini(),\n ],\n})\n```\n\n## License\n\nMIT License © 2021-PRESENT [Anthony Fu](https://github.com/antfu)\n"
|
|
70
71
|
}
|