@unocss/preset-mini 0.45.15 → 0.45.18

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.cjs CHANGED
@@ -3,11 +3,11 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const core = require('@unocss/core');
6
- require('./shared/preset-mini.856c0481.cjs');
6
+ require('./shared/preset-mini.c2e70e38.cjs');
7
7
  const colors$1 = require('./shared/preset-mini.733d8647.cjs');
8
- const _default$1 = require('./shared/preset-mini.6825a75e.cjs');
8
+ const _default$1 = require('./shared/preset-mini.b6e40094.cjs');
9
9
  const colors = require('./shared/preset-mini.30606736.cjs');
10
- const _default = require('./shared/preset-mini.b2a86477.cjs');
10
+ const _default = require('./shared/preset-mini.c8a22133.cjs');
11
11
  const _default$2 = require('./shared/preset-mini.ae6afba7.cjs');
12
12
  require('./shared/preset-mini.6d3bd985.cjs');
13
13
 
package/dist/index.d.ts CHANGED
@@ -3,7 +3,7 @@ export { c as colors } from './colors-84e505e0.js';
3
3
  export { t as theme } from './default-89bad733.js';
4
4
  import { T as Theme } from './types-dcc1dd95.js';
5
5
  export { T as Theme, a as ThemeAnimation } from './types-dcc1dd95.js';
6
- export { p as parseColor } from './utilities-dc2de1b0.js';
6
+ export { p as parseColor } from './utilities-f6e9c552.js';
7
7
 
8
8
  declare const preflights: Preflight[];
9
9
 
package/dist/index.mjs CHANGED
@@ -1,10 +1,10 @@
1
1
  import { entriesToCss } from '@unocss/core';
2
- import './shared/preset-mini.3dac5630.mjs';
2
+ import './shared/preset-mini.c260372d.mjs';
3
3
  export { p as parseColor } from './shared/preset-mini.2811888e.mjs';
4
- import { r as rules } from './shared/preset-mini.ddc21a95.mjs';
4
+ import { r as rules } from './shared/preset-mini.97e2534d.mjs';
5
5
  export { c as colors } from './shared/preset-mini.65ac75be.mjs';
6
- import { t as theme } from './shared/preset-mini.56ccc3fb.mjs';
7
- export { t as theme } from './shared/preset-mini.56ccc3fb.mjs';
6
+ import { t as theme } from './shared/preset-mini.29df4c12.mjs';
7
+ export { t as theme } from './shared/preset-mini.29df4c12.mjs';
8
8
  import { v as variants } from './shared/preset-mini.2b450f6c.mjs';
9
9
  import './shared/preset-mini.f73f9ed7.mjs';
10
10
 
package/dist/rules.cjs CHANGED
@@ -2,8 +2,8 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const decoration = require('./shared/preset-mini.856c0481.cjs');
6
- const _default = require('./shared/preset-mini.6825a75e.cjs');
5
+ const decoration = require('./shared/preset-mini.c2e70e38.cjs');
6
+ const _default = require('./shared/preset-mini.b6e40094.cjs');
7
7
  require('./shared/preset-mini.733d8647.cjs');
8
8
  require('@unocss/core');
9
9
 
package/dist/rules.mjs CHANGED
@@ -1,4 +1,4 @@
1
- export { F as alignments, C as appearance, s as appearances, R as borderStyles, b as borders, o as boxShadows, P as boxShadowsBase, K as boxSizing, z as breaks, c as contentVisibility, a as contents, q as cursors, d as displays, I as floats, n as fontSmoothings, m as fontStyles, f as fonts, S 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, Q 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, O as transformBase, M as transforms, L as transitions, x as userSelects, T as varEmpty, w as verticalAligns, y as whitespaces, N as willChange, J as zIndexes } from './shared/preset-mini.3dac5630.mjs';
2
- export { c as aspectRatio, b as bgColors, h as cssProperty, e 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, d as svgUtilities, t as textColors } from './shared/preset-mini.ddc21a95.mjs';
1
+ export { F as alignments, C as appearance, s as appearances, R as borderStyles, b as borders, o as boxShadows, P as boxShadowsBase, K as boxSizing, z as breaks, c as contentVisibility, a as contents, q as cursors, d as displays, I as floats, n as fontSmoothings, m as fontStyles, f as fonts, S 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, Q 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, O as transformBase, M as transforms, L as transitions, x as userSelects, T as varEmpty, w as verticalAligns, y as whitespaces, N as willChange, J as zIndexes } from './shared/preset-mini.c260372d.mjs';
2
+ export { c as aspectRatio, b as bgColors, h as cssProperty, e 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, d as svgUtilities, t as textColors } from './shared/preset-mini.97e2534d.mjs';
3
3
  import './shared/preset-mini.2811888e.mjs';
4
4
  import '@unocss/core';
@@ -1,5 +1,5 @@
1
1
  import { c as colors } from './preset-mini.65ac75be.mjs';
2
- import { O as transformBase, P as boxShadowsBase, Q as ringBase } from './preset-mini.3dac5630.mjs';
2
+ import { O as transformBase, P as boxShadowsBase, Q as ringBase } from './preset-mini.c260372d.mjs';
3
3
  import './preset-mini.2811888e.mjs';
4
4
  import '@unocss/core';
5
5
 
@@ -1,4 +1,4 @@
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 } from './preset-mini.3dac5630.mjs';
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 } from './preset-mini.c260372d.mjs';
2
2
  import { h as handler, c as colorResolver, n as numberWithUnitRE, r as resolveVerticalBreakpoints, l as resolveBreakpoints, o as directionSize } from './preset-mini.2811888e.mjs';
3
3
  import '@unocss/core';
4
4
 
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const decoration = require('./preset-mini.856c0481.cjs');
3
+ const decoration = require('./preset-mini.c2e70e38.cjs');
4
4
  const colors = require('./preset-mini.733d8647.cjs');
5
5
  require('@unocss/core');
6
6
 
@@ -567,16 +567,18 @@ const boxShadowsBase = {
567
567
  "--un-shadow": "0 0 rgba(0,0,0,0)"
568
568
  };
569
569
  const boxShadows = [
570
- [/^shadow(?:-(.+))?$/, ([, d], { theme }) => {
571
- const v = theme.boxShadow?.[d || "DEFAULT"];
570
+ [/^shadow(?:-(.+))?$/, (match, context) => {
571
+ const [, d] = match;
572
+ const { theme } = context;
573
+ const v = theme.boxShadow?.[d || "DEFAULT"] || handler.bracket.cssvar(d);
572
574
  if (v) {
573
575
  return {
574
576
  "--un-shadow": colorableShadows(v, "--un-shadow-color").join(","),
575
577
  "box-shadow": "var(--un-ring-offset-shadow), var(--un-ring-shadow), var(--un-shadow)"
576
578
  };
577
579
  }
578
- }, { autocomplete: "shadow-$boxShadow" }],
579
- [/^shadow-(.+)$/, colorResolver("--un-shadow-color", "shadow"), { autocomplete: "shadow-$colors" }],
580
+ return colorResolver("--un-shadow-color", "shadow")(match, context);
581
+ }, { autocomplete: ["shadow-$colors", "shadow-$boxShadow"] }],
580
582
  [/^shadow-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-shadow-opacity": handler.bracket.percent(opacity) }), { autocomplete: "shadow-(op|opacity)-<percent>" }],
581
583
  ["shadow-inset", { "--un-shadow-inset": "inset" }]
582
584
  ];
@@ -569,16 +569,18 @@ const boxShadowsBase = {
569
569
  "--un-shadow": "0 0 rgba(0,0,0,0)"
570
570
  };
571
571
  const boxShadows = [
572
- [/^shadow(?:-(.+))?$/, ([, d], { theme }) => {
573
- const v = theme.boxShadow?.[d || "DEFAULT"];
572
+ [/^shadow(?:-(.+))?$/, (match, context) => {
573
+ const [, d] = match;
574
+ const { theme } = context;
575
+ const v = theme.boxShadow?.[d || "DEFAULT"] || colors.handler.bracket.cssvar(d);
574
576
  if (v) {
575
577
  return {
576
578
  "--un-shadow": colors.colorableShadows(v, "--un-shadow-color").join(","),
577
579
  "box-shadow": "var(--un-ring-offset-shadow), var(--un-ring-shadow), var(--un-shadow)"
578
580
  };
579
581
  }
580
- }, { autocomplete: "shadow-$boxShadow" }],
581
- [/^shadow-(.+)$/, colors.colorResolver("--un-shadow-color", "shadow"), { autocomplete: "shadow-$colors" }],
582
+ return colors.colorResolver("--un-shadow-color", "shadow")(match, context);
583
+ }, { autocomplete: ["shadow-$colors", "shadow-$boxShadow"] }],
582
584
  [/^shadow-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-shadow-opacity": colors.handler.bracket.percent(opacity) }), { autocomplete: "shadow-(op|opacity)-<percent>" }],
583
585
  ["shadow-inset", { "--un-shadow-inset": "inset" }]
584
586
  ];
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  const colors = require('./preset-mini.30606736.cjs');
4
- const decoration = require('./preset-mini.856c0481.cjs');
4
+ const decoration = require('./preset-mini.c2e70e38.cjs');
5
5
  require('./preset-mini.733d8647.cjs');
6
6
  require('@unocss/core');
7
7
 
package/dist/theme.cjs CHANGED
@@ -3,8 +3,8 @@
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.b2a86477.cjs');
7
- require('./shared/preset-mini.856c0481.cjs');
6
+ const _default = require('./shared/preset-mini.c8a22133.cjs');
7
+ require('./shared/preset-mini.c2e70e38.cjs');
8
8
  require('./shared/preset-mini.733d8647.cjs');
9
9
  require('@unocss/core');
10
10
 
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, 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, z 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.56ccc3fb.mjs';
3
- import './shared/preset-mini.3dac5630.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, z 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.29df4c12.mjs';
3
+ import './shared/preset-mini.c260372d.mjs';
4
4
  import './shared/preset-mini.2811888e.mjs';
5
5
  import '@unocss/core';
@@ -47,6 +47,7 @@ declare function parseColor(body: string, theme: Theme): ParsedColorValue | unde
47
47
  *
48
48
  * @param {string} property - Property for the css value to be created.
49
49
  * @param {string} varName - Base name for the opacity variable.
50
+ * @param {function} [shouldPass] - Function to decide whether to pass the css.
50
51
  * @return {@link DynamicMatcher} object.
51
52
  */
52
53
  declare function colorResolver(property: string, varName: string, shouldPass?: (css: CSSObject) => boolean): DynamicMatcher;
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 getComponent, e as getComponents, h as hasParseableColor, m as makeGlobalStaticRules, p as parseColor, r as resolveBreakpoints, b as resolveVerticalBreakpoints } from './utilities-dc2de1b0.js';
3
+ export { C as CONTROL_MINI_NO_NEGATIVE, c as colorResolver, a as colorableShadows, d as directionSize, g as getComponent, e as getComponents, h as hasParseableColor, m as makeGlobalStaticRules, p as parseColor, r as resolveBreakpoints, b as resolveVerticalBreakpoints } from './utilities-f6e9c552.js';
4
4
  import './types-dcc1dd95.js';
5
5
 
6
6
  declare function hex2rgba(hex?: string): RGBAColorValue | undefined;
@@ -3,7 +3,7 @@ import { T as Theme } from './types-dcc1dd95.js';
3
3
  import { PresetMiniOptions } from './index.js';
4
4
  import './colors-84e505e0.js';
5
5
  import './default-89bad733.js';
6
- import './utilities-dc2de1b0.js';
6
+ import './utilities-f6e9c552.js';
7
7
 
8
8
  declare const calcMaxWidthBySize: (size: string) => string;
9
9
  declare const variantBreakpoints: Variant<Theme>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unocss/preset-mini",
3
- "version": "0.45.15",
3
+ "version": "0.45.18",
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.45.15"
64
+ "@unocss/core": "0.45.18"
65
65
  },
66
66
  "scripts": {
67
67
  "build": "unbuild",