@unocss/preset-mini 0.56.5 → 0.57.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.
Files changed (42) hide show
  1. package/dist/colors.d.cts +1 -1
  2. package/dist/colors.d.mts +1 -1
  3. package/dist/colors.d.ts +1 -1
  4. package/dist/index.cjs +2 -2
  5. package/dist/index.d.cts +4 -4
  6. package/dist/index.d.mts +4 -4
  7. package/dist/index.d.ts +4 -4
  8. package/dist/index.mjs +3 -3
  9. package/dist/rules.cjs +33 -12
  10. package/dist/rules.d.cts +1 -1
  11. package/dist/rules.d.mts +1 -1
  12. package/dist/rules.d.ts +1 -1
  13. package/dist/rules.mjs +35 -14
  14. package/dist/shared/{preset-mini.f12010ce.d.mts → preset-mini.2492ad3a.d.mts} +6 -2
  15. package/dist/shared/{preset-mini.0a392a7c.d.ts → preset-mini.31acf3c2.d.ts} +6 -2
  16. package/dist/shared/{preset-mini.302bff75.d.cts → preset-mini.5e80d683.d.cts} +6 -2
  17. package/dist/shared/{preset-mini.bc674518.d.mts → preset-mini.6e321bc3.d.cts} +2 -2
  18. package/dist/shared/{preset-mini.bc674518.d.ts → preset-mini.6e321bc3.d.mts} +2 -2
  19. package/dist/shared/{preset-mini.bc674518.d.cts → preset-mini.6e321bc3.d.ts} +2 -2
  20. package/dist/shared/{preset-mini.7f0d0a40.mjs → preset-mini.7fce5950.mjs} +8 -8
  21. package/dist/shared/{preset-mini.8929b018.mjs → preset-mini.87b98aea.mjs} +11 -12
  22. package/dist/shared/{preset-mini.3db5f008.d.ts → preset-mini.94582694.d.ts} +15 -8
  23. package/dist/shared/{preset-mini.26085c20.d.mts → preset-mini.c3f13a30.d.cts} +15 -8
  24. package/dist/shared/{preset-mini.6a210a3c.cjs → preset-mini.cedf5b6d.cjs} +8 -8
  25. package/dist/shared/{preset-mini.39336e3c.d.cts → preset-mini.e0376460.d.mts} +15 -8
  26. package/dist/shared/{preset-mini.3a376028.cjs → preset-mini.ec90d1ba.cjs} +12 -11
  27. package/dist/theme.cjs +29 -24
  28. package/dist/theme.d.cts +7 -4
  29. package/dist/theme.d.mts +7 -4
  30. package/dist/theme.d.ts +7 -4
  31. package/dist/theme.mjs +29 -25
  32. package/dist/utils.cjs +3 -1
  33. package/dist/utils.d.cts +4 -3
  34. package/dist/utils.d.mts +4 -3
  35. package/dist/utils.d.ts +4 -3
  36. package/dist/utils.mjs +1 -1
  37. package/dist/variants.cjs +2 -2
  38. package/dist/variants.d.cts +3 -3
  39. package/dist/variants.d.mts +3 -3
  40. package/dist/variants.d.ts +3 -3
  41. package/dist/variants.mjs +2 -2
  42. package/package.json +4 -4
package/dist/colors.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { C as Colors } from './shared/preset-mini.bc674518.cjs';
1
+ import { C as Colors } from './shared/preset-mini.6e321bc3.cjs';
2
2
  import '@unocss/core';
3
3
 
4
4
  declare const colors: {
package/dist/colors.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { C as Colors } from './shared/preset-mini.bc674518.mjs';
1
+ import { C as Colors } from './shared/preset-mini.6e321bc3.mjs';
2
2
  import '@unocss/core';
3
3
 
4
4
  declare const colors: {
package/dist/colors.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { C as Colors } from './shared/preset-mini.bc674518.js';
1
+ import { C as Colors } from './shared/preset-mini.6e321bc3.js';
2
2
  import '@unocss/core';
3
3
 
4
4
  declare const colors: {
package/dist/index.cjs CHANGED
@@ -4,13 +4,13 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const core = require('@unocss/core');
6
6
  const extractorArbitraryVariants = require('@unocss/extractor-arbitrary-variants');
7
- const utils = require('./shared/preset-mini.3a376028.cjs');
7
+ const utils = require('./shared/preset-mini.ec90d1ba.cjs');
8
8
  const theme = require('./theme.cjs');
9
9
  const rules = require('./rules.cjs');
10
10
  const variants = require('./variants.cjs');
11
11
  const colors = require('./colors.cjs');
12
12
  require('@unocss/rule-utils');
13
- require('./shared/preset-mini.6a210a3c.cjs');
13
+ require('./shared/preset-mini.cedf5b6d.cjs');
14
14
 
15
15
  const preflights = [
16
16
  {
package/dist/index.d.cts CHANGED
@@ -1,10 +1,10 @@
1
1
  import * as _unocss_core from '@unocss/core';
2
2
  import { Preflight, PresetOptions, Postprocessor } from '@unocss/core';
3
- import { T as Theme } from './shared/preset-mini.bc674518.cjs';
4
- export { a as ThemeAnimation } from './shared/preset-mini.bc674518.cjs';
5
- export { t as theme } from './shared/preset-mini.302bff75.cjs';
3
+ import { T as Theme } from './shared/preset-mini.6e321bc3.cjs';
4
+ export { a as ThemeAnimation } from './shared/preset-mini.6e321bc3.cjs';
5
+ export { t as theme } from './shared/preset-mini.5e80d683.cjs';
6
6
  export { colors } from './colors.cjs';
7
- export { p as parseColor } from './shared/preset-mini.39336e3c.cjs';
7
+ export { p as parseColor } from './shared/preset-mini.c3f13a30.cjs';
8
8
 
9
9
  declare const preflights: Preflight<Theme>[];
10
10
 
package/dist/index.d.mts CHANGED
@@ -1,10 +1,10 @@
1
1
  import * as _unocss_core from '@unocss/core';
2
2
  import { Preflight, PresetOptions, Postprocessor } from '@unocss/core';
3
- import { T as Theme } from './shared/preset-mini.bc674518.mjs';
4
- export { a as ThemeAnimation } from './shared/preset-mini.bc674518.mjs';
5
- export { t as theme } from './shared/preset-mini.f12010ce.mjs';
3
+ import { T as Theme } from './shared/preset-mini.6e321bc3.mjs';
4
+ export { a as ThemeAnimation } from './shared/preset-mini.6e321bc3.mjs';
5
+ export { t as theme } from './shared/preset-mini.2492ad3a.mjs';
6
6
  export { colors } from './colors.mjs';
7
- export { p as parseColor } from './shared/preset-mini.26085c20.mjs';
7
+ export { p as parseColor } from './shared/preset-mini.e0376460.mjs';
8
8
 
9
9
  declare const preflights: Preflight<Theme>[];
10
10
 
package/dist/index.d.ts CHANGED
@@ -1,10 +1,10 @@
1
1
  import * as _unocss_core from '@unocss/core';
2
2
  import { Preflight, PresetOptions, Postprocessor } from '@unocss/core';
3
- import { T as Theme } from './shared/preset-mini.bc674518.js';
4
- export { a as ThemeAnimation } from './shared/preset-mini.bc674518.js';
5
- export { t as theme } from './shared/preset-mini.0a392a7c.js';
3
+ import { T as Theme } from './shared/preset-mini.6e321bc3.js';
4
+ export { a as ThemeAnimation } from './shared/preset-mini.6e321bc3.js';
5
+ export { t as theme } from './shared/preset-mini.31acf3c2.js';
6
6
  export { colors } from './colors.js';
7
- export { p as parseColor } from './shared/preset-mini.3db5f008.js';
7
+ export { p as parseColor } from './shared/preset-mini.94582694.js';
8
8
 
9
9
  declare const preflights: Preflight<Theme>[];
10
10
 
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.8929b018.mjs';
4
- export { p as parseColor } from './shared/preset-mini.8929b018.mjs';
3
+ import { g as globalKeywords } from './shared/preset-mini.87b98aea.mjs';
4
+ export { p as parseColor } from './shared/preset-mini.87b98aea.mjs';
5
5
  import { theme } from './theme.mjs';
6
6
  import { rules } from './rules.mjs';
7
7
  import { variants } from './variants.mjs';
8
8
  export { colors } from './colors.mjs';
9
9
  import '@unocss/rule-utils';
10
- import './shared/preset-mini.7f0d0a40.mjs';
10
+ import './shared/preset-mini.7fce5950.mjs';
11
11
 
12
12
  const preflights = [
13
13
  {
package/dist/rules.cjs CHANGED
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
- const utils = require('./shared/preset-mini.3a376028.cjs');
3
+ const utils = require('./shared/preset-mini.ec90d1ba.cjs');
4
4
  const ruleUtils = require('@unocss/rule-utils');
5
5
  const core = require('@unocss/core');
6
- const transform = require('./shared/preset-mini.6a210a3c.cjs');
6
+ const transform = require('./shared/preset-mini.cedf5b6d.cjs');
7
7
 
8
8
  const verticalAlignAlias = {
9
9
  "mid": "middle",
@@ -128,6 +128,11 @@ function borderColorResolver(direction) {
128
128
  };
129
129
  }
130
130
  } else if (color) {
131
+ if (utils.isCSSMathFn(color)) {
132
+ return {
133
+ "border-width": color
134
+ };
135
+ }
131
136
  return {
132
137
  [`border${direction}-color`]: ruleUtils.colorToString(color, alpha)
133
138
  };
@@ -300,8 +305,8 @@ const flex = [
300
305
  ["flex-nowrap", { "flex-wrap": "nowrap" }]
301
306
  ];
302
307
 
303
- function handleLineHeight(s, theme) {
304
- return theme.lineHeight?.[s] || utils.h.bracket.cssvar.global.rem(s);
308
+ function handleThemeByKey(s, theme, key) {
309
+ return theme[key]?.[s] || utils.h.bracket.cssvar.global.rem(s);
305
310
  }
306
311
  const fonts = [
307
312
  // size
@@ -310,12 +315,19 @@ const fonts = [
310
315
  ([, s = "base"], { theme }) => {
311
316
  const [size, leading] = utils.splitShorthand(s, "length");
312
317
  const sizePairs = core.toArray(theme.fontSize?.[size]);
313
- const lineHeight = leading ? handleLineHeight(leading, theme) : void 0;
318
+ const lineHeight = leading ? handleThemeByKey(leading, theme, "lineHeight") : void 0;
314
319
  if (sizePairs?.[0]) {
315
- const [fontSize2, height] = sizePairs;
320
+ const [fontSize2, height, letterSpacing] = sizePairs;
321
+ if (typeof height === "object") {
322
+ return {
323
+ "font-size": fontSize2,
324
+ ...height
325
+ };
326
+ }
316
327
  return {
317
328
  "font-size": fontSize2,
318
- "line-height": lineHeight ?? height ?? "1"
329
+ "line-height": lineHeight ?? height ?? "1",
330
+ "letter-spacing": letterSpacing ? handleThemeByKey(letterSpacing, theme, "letterSpacing") : void 0
319
331
  };
320
332
  }
321
333
  const fontSize = utils.h.bracketOfLength.rem(size);
@@ -349,7 +361,7 @@ const fonts = [
349
361
  // leadings
350
362
  [
351
363
  /^(?:font-)?(?:leading|lh|line-height)-(.+)$/,
352
- ([, s], { theme }) => ({ "line-height": handleLineHeight(s, theme) }),
364
+ ([, s], { theme }) => ({ "line-height": handleThemeByKey(s, theme, "lineHeight") }),
353
365
  { autocomplete: "(leading|lh|line-height)-$lineHeight" }
354
366
  ],
355
367
  // synthesis
@@ -690,8 +702,8 @@ const sizes = [
690
702
  "(max|min)-(w|h)-full"
691
703
  ]
692
704
  }],
693
- [/^(?:size-)?(min-|max-)?(h)-screen-(.+)$/, ([, m, w, s], context) => ({ [getPropName(m, w)]: utils.resolveVerticalBreakpoints(context)?.[s] })],
694
- [/^(?:size-)?(min-|max-)?(w)-screen-(.+)$/, ([, m, w, s], context) => ({ [getPropName(m, w)]: utils.resolveBreakpoints(context)?.[s] }), {
705
+ [/^(?:size-)?(min-|max-)?(h)-screen-(.+)$/, ([, m, h2, p], context) => ({ [getPropName(m, h2)]: handleBreakpoint(context, p, "verticalBreakpoints") })],
706
+ [/^(?:size-)?(min-|max-)?(w)-screen-(.+)$/, ([, m, w, p], context) => ({ [getPropName(m, w)]: handleBreakpoint(context, p) }), {
695
707
  autocomplete: [
696
708
  "(w|h)-screen",
697
709
  "(min|max)-(w|h)-screen",
@@ -702,6 +714,11 @@ const sizes = [
702
714
  ]
703
715
  }]
704
716
  ];
717
+ function handleBreakpoint(context, point, key = "breakpoints") {
718
+ const bp = utils.resolveBreakpoints(context, key);
719
+ if (bp)
720
+ return bp.find((i) => i.point === point)?.size;
721
+ }
705
722
  function getAspectRatio(prop) {
706
723
  if (/^\d+\/\d+$/.test(prop))
707
724
  return prop;
@@ -757,13 +774,17 @@ const cssVariables = [
757
774
  }]
758
775
  ];
759
776
  const cssProperty = [
760
- [/^\[(.*)\]$/, ([_, body]) => {
777
+ [/^\[(.*)\]$/, ([_, body], { theme }) => {
761
778
  if (!body.includes(":"))
762
779
  return;
763
780
  const [prop, ...rest] = body.split(":");
764
781
  const value = rest.join(":");
765
782
  if (!isURI(body) && prop.match(/^[a-z-]+$/) && isValidCSSBody(value)) {
766
- const parsed = utils.h.bracket(`[${value}]`);
783
+ let parsed;
784
+ if (ruleUtils.hasThemeFn(value))
785
+ parsed = ruleUtils.transformThemeFn(value, theme);
786
+ if (!parsed || parsed === value)
787
+ parsed = utils.h.bracket(`[${value}]`);
767
788
  if (parsed)
768
789
  return { [prop]: parsed };
769
790
  }
package/dist/rules.d.cts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Rule, CSSEntries, StaticRule } from '@unocss/core';
2
- import { T as Theme } from './shared/preset-mini.bc674518.cjs';
2
+ import { T as Theme } from './shared/preset-mini.6e321bc3.cjs';
3
3
 
4
4
  declare const verticalAligns: Rule[];
5
5
  declare const textAligns: Rule[];
package/dist/rules.d.mts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Rule, CSSEntries, StaticRule } from '@unocss/core';
2
- import { T as Theme } from './shared/preset-mini.bc674518.mjs';
2
+ import { T as Theme } from './shared/preset-mini.6e321bc3.mjs';
3
3
 
4
4
  declare const verticalAligns: Rule[];
5
5
  declare const textAligns: Rule[];
package/dist/rules.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Rule, CSSEntries, StaticRule } from '@unocss/core';
2
- import { T as Theme } from './shared/preset-mini.bc674518.js';
2
+ import { T as Theme } from './shared/preset-mini.6e321bc3.js';
3
3
 
4
4
  declare const verticalAligns: Rule[];
5
5
  declare const textAligns: Rule[];
package/dist/rules.mjs CHANGED
@@ -1,8 +1,8 @@
1
- import { g as globalKeywords, h, c as colorResolver, e as directionMap, a as hasParseableColor, f as cornerMap, p as parseColor, n as numberWithUnitRE, m as makeGlobalStaticRules, s as splitShorthand, b as colorableShadows, i as insetMap, r as resolveVerticalBreakpoints, j as resolveBreakpoints, k as directionSize } from './shared/preset-mini.8929b018.mjs';
2
- import { colorToString, colorOpacityToString } from '@unocss/rule-utils';
1
+ import { g as globalKeywords, h, c as colorResolver, e as directionMap, a as hasParseableColor, f as cornerMap, p as parseColor, i as isCSSMathFn, n as numberWithUnitRE, m as makeGlobalStaticRules, s as splitShorthand, b as colorableShadows, j as insetMap, r as resolveBreakpoints, k as directionSize } from './shared/preset-mini.87b98aea.mjs';
2
+ import { colorToString, colorOpacityToString, hasThemeFn, transformThemeFn } from '@unocss/rule-utils';
3
3
  import { warnOnce, toArray } from '@unocss/core';
4
- import { d as displays, c as contentVisibility, a as contents, e as textOverflows, f as textTransforms, g as fontStyles, h as fontSmoothings, i as boxShadows, j as rings, k as cursors, l as appearances, p as pointerEvents, m as resizes, u as userSelects, w as whitespaces, n as breaks, o as transforms, q as contains, s as textWraps } from './shared/preset-mini.7f0d0a40.mjs';
5
- export { b as boxShadowsBase, r as ringBase, t as transformBase, v as varEmpty } from './shared/preset-mini.7f0d0a40.mjs';
4
+ import { d as displays, c as contentVisibility, a as contents, e as textOverflows, f as textTransforms, g as fontStyles, h as fontSmoothings, i as boxShadows, j as rings, k as cursors, l as appearances, p as pointerEvents, m as resizes, u as userSelects, w as whitespaces, n as breaks, o as transforms, q as contains, s as textWraps } from './shared/preset-mini.7fce5950.mjs';
5
+ export { b as boxShadowsBase, r as ringBase, t as transformBase, v as varEmpty } from './shared/preset-mini.7fce5950.mjs';
6
6
 
7
7
  const verticalAlignAlias = {
8
8
  "mid": "middle",
@@ -127,6 +127,11 @@ function borderColorResolver(direction) {
127
127
  };
128
128
  }
129
129
  } else if (color) {
130
+ if (isCSSMathFn(color)) {
131
+ return {
132
+ "border-width": color
133
+ };
134
+ }
130
135
  return {
131
136
  [`border${direction}-color`]: colorToString(color, alpha)
132
137
  };
@@ -299,8 +304,8 @@ const flex = [
299
304
  ["flex-nowrap", { "flex-wrap": "nowrap" }]
300
305
  ];
301
306
 
302
- function handleLineHeight(s, theme) {
303
- return theme.lineHeight?.[s] || h.bracket.cssvar.global.rem(s);
307
+ function handleThemeByKey(s, theme, key) {
308
+ return theme[key]?.[s] || h.bracket.cssvar.global.rem(s);
304
309
  }
305
310
  const fonts = [
306
311
  // size
@@ -309,12 +314,19 @@ const fonts = [
309
314
  ([, s = "base"], { theme }) => {
310
315
  const [size, leading] = splitShorthand(s, "length");
311
316
  const sizePairs = toArray(theme.fontSize?.[size]);
312
- const lineHeight = leading ? handleLineHeight(leading, theme) : void 0;
317
+ const lineHeight = leading ? handleThemeByKey(leading, theme, "lineHeight") : void 0;
313
318
  if (sizePairs?.[0]) {
314
- const [fontSize2, height] = sizePairs;
319
+ const [fontSize2, height, letterSpacing] = sizePairs;
320
+ if (typeof height === "object") {
321
+ return {
322
+ "font-size": fontSize2,
323
+ ...height
324
+ };
325
+ }
315
326
  return {
316
327
  "font-size": fontSize2,
317
- "line-height": lineHeight ?? height ?? "1"
328
+ "line-height": lineHeight ?? height ?? "1",
329
+ "letter-spacing": letterSpacing ? handleThemeByKey(letterSpacing, theme, "letterSpacing") : void 0
318
330
  };
319
331
  }
320
332
  const fontSize = h.bracketOfLength.rem(size);
@@ -348,7 +360,7 @@ const fonts = [
348
360
  // leadings
349
361
  [
350
362
  /^(?:font-)?(?:leading|lh|line-height)-(.+)$/,
351
- ([, s], { theme }) => ({ "line-height": handleLineHeight(s, theme) }),
363
+ ([, s], { theme }) => ({ "line-height": handleThemeByKey(s, theme, "lineHeight") }),
352
364
  { autocomplete: "(leading|lh|line-height)-$lineHeight" }
353
365
  ],
354
366
  // synthesis
@@ -689,8 +701,8 @@ const sizes = [
689
701
  "(max|min)-(w|h)-full"
690
702
  ]
691
703
  }],
692
- [/^(?:size-)?(min-|max-)?(h)-screen-(.+)$/, ([, m, w, s], context) => ({ [getPropName(m, w)]: resolveVerticalBreakpoints(context)?.[s] })],
693
- [/^(?:size-)?(min-|max-)?(w)-screen-(.+)$/, ([, m, w, s], context) => ({ [getPropName(m, w)]: resolveBreakpoints(context)?.[s] }), {
704
+ [/^(?:size-)?(min-|max-)?(h)-screen-(.+)$/, ([, m, h2, p], context) => ({ [getPropName(m, h2)]: handleBreakpoint(context, p, "verticalBreakpoints") })],
705
+ [/^(?:size-)?(min-|max-)?(w)-screen-(.+)$/, ([, m, w, p], context) => ({ [getPropName(m, w)]: handleBreakpoint(context, p) }), {
694
706
  autocomplete: [
695
707
  "(w|h)-screen",
696
708
  "(min|max)-(w|h)-screen",
@@ -701,6 +713,11 @@ const sizes = [
701
713
  ]
702
714
  }]
703
715
  ];
716
+ function handleBreakpoint(context, point, key = "breakpoints") {
717
+ const bp = resolveBreakpoints(context, key);
718
+ if (bp)
719
+ return bp.find((i) => i.point === point)?.size;
720
+ }
704
721
  function getAspectRatio(prop) {
705
722
  if (/^\d+\/\d+$/.test(prop))
706
723
  return prop;
@@ -756,13 +773,17 @@ const cssVariables = [
756
773
  }]
757
774
  ];
758
775
  const cssProperty = [
759
- [/^\[(.*)\]$/, ([_, body]) => {
776
+ [/^\[(.*)\]$/, ([_, body], { theme }) => {
760
777
  if (!body.includes(":"))
761
778
  return;
762
779
  const [prop, ...rest] = body.split(":");
763
780
  const value = rest.join(":");
764
781
  if (!isURI(body) && prop.match(/^[a-z-]+$/) && isValidCSSBody(value)) {
765
- const parsed = h.bracket(`[${value}]`);
782
+ let parsed;
783
+ if (hasThemeFn(value))
784
+ parsed = transformThemeFn(value, theme);
785
+ if (!parsed || parsed === value)
786
+ parsed = h.bracket(`[${value}]`);
766
787
  if (parsed)
767
788
  return { [prop]: parsed };
768
789
  }
@@ -1,4 +1,5 @@
1
- import { C as Colors } from './preset-mini.bc674518.mjs';
1
+ import * as _unocss_core from '@unocss/core';
2
+ import { C as Colors } from './preset-mini.6e321bc3.mjs';
2
3
 
3
4
  declare const theme: {
4
5
  width: {
@@ -547,7 +548,7 @@ declare const theme: {
547
548
  serif: string;
548
549
  mono: string;
549
550
  };
550
- fontSize: Record<string, string | [string, string]> | undefined;
551
+ fontSize: Record<string, string | [string, string | _unocss_core.CSSObject] | [string, string, string]> | undefined;
551
552
  fontWeight: {
552
553
  thin: string;
553
554
  extralight: string;
@@ -719,6 +720,9 @@ declare const theme: {
719
720
  zIndex: {
720
721
  auto: string;
721
722
  };
723
+ media: {
724
+ mouse: string;
725
+ };
722
726
  };
723
727
 
724
728
  export { theme as t };
@@ -1,4 +1,5 @@
1
- import { C as Colors } from './preset-mini.bc674518.js';
1
+ import * as _unocss_core from '@unocss/core';
2
+ import { C as Colors } from './preset-mini.6e321bc3.js';
2
3
 
3
4
  declare const theme: {
4
5
  width: {
@@ -547,7 +548,7 @@ declare const theme: {
547
548
  serif: string;
548
549
  mono: string;
549
550
  };
550
- fontSize: Record<string, string | [string, string]> | undefined;
551
+ fontSize: Record<string, string | [string, string | _unocss_core.CSSObject] | [string, string, string]> | undefined;
551
552
  fontWeight: {
552
553
  thin: string;
553
554
  extralight: string;
@@ -719,6 +720,9 @@ declare const theme: {
719
720
  zIndex: {
720
721
  auto: string;
721
722
  };
723
+ media: {
724
+ mouse: string;
725
+ };
722
726
  };
723
727
 
724
728
  export { theme as t };
@@ -1,4 +1,5 @@
1
- import { C as Colors } from './preset-mini.bc674518.cjs';
1
+ import * as _unocss_core from '@unocss/core';
2
+ import { C as Colors } from './preset-mini.6e321bc3.cjs';
2
3
 
3
4
  declare const theme: {
4
5
  width: {
@@ -547,7 +548,7 @@ declare const theme: {
547
548
  serif: string;
548
549
  mono: string;
549
550
  };
550
- fontSize: Record<string, string | [string, string]> | undefined;
551
+ fontSize: Record<string, string | [string, string | _unocss_core.CSSObject] | [string, string, string]> | undefined;
551
552
  fontWeight: {
552
553
  thin: string;
553
554
  extralight: string;
@@ -719,6 +720,9 @@ declare const theme: {
719
720
  zIndex: {
720
721
  auto: string;
721
722
  };
723
+ media: {
724
+ mouse: string;
725
+ };
722
726
  };
723
727
 
724
728
  export { theme as t };
@@ -1,4 +1,4 @@
1
- import { Arrayable } from '@unocss/core';
1
+ import { CSSObject, Arrayable } from '@unocss/core';
2
2
 
3
3
  interface ThemeAnimation {
4
4
  keyframes?: Record<string, string>;
@@ -30,7 +30,7 @@ interface Theme {
30
30
  verticalBreakpoints?: Record<string, string>;
31
31
  colors?: Colors;
32
32
  fontFamily?: Record<string, string>;
33
- fontSize?: Record<string, string | [string, string]>;
33
+ fontSize?: Record<string, string | [string, string | CSSObject] | [string, string, string]>;
34
34
  fontWeight?: Record<string, string>;
35
35
  lineHeight?: Record<string, string>;
36
36
  letterSpacing?: Record<string, string>;
@@ -1,4 +1,4 @@
1
- import { Arrayable } from '@unocss/core';
1
+ import { CSSObject, Arrayable } from '@unocss/core';
2
2
 
3
3
  interface ThemeAnimation {
4
4
  keyframes?: Record<string, string>;
@@ -30,7 +30,7 @@ interface Theme {
30
30
  verticalBreakpoints?: Record<string, string>;
31
31
  colors?: Colors;
32
32
  fontFamily?: Record<string, string>;
33
- fontSize?: Record<string, string | [string, string]>;
33
+ fontSize?: Record<string, string | [string, string | CSSObject] | [string, string, string]>;
34
34
  fontWeight?: Record<string, string>;
35
35
  lineHeight?: Record<string, string>;
36
36
  letterSpacing?: Record<string, string>;
@@ -1,4 +1,4 @@
1
- import { Arrayable } from '@unocss/core';
1
+ import { CSSObject, Arrayable } from '@unocss/core';
2
2
 
3
3
  interface ThemeAnimation {
4
4
  keyframes?: Record<string, string>;
@@ -30,7 +30,7 @@ interface Theme {
30
30
  verticalBreakpoints?: Record<string, string>;
31
31
  colors?: Colors;
32
32
  fontFamily?: Record<string, string>;
33
- fontSize?: Record<string, string | [string, string]>;
33
+ fontSize?: Record<string, string | [string, string | CSSObject] | [string, string, string]>;
34
34
  fontWeight?: Record<string, string>;
35
35
  lineHeight?: Record<string, string>;
36
36
  letterSpacing?: Record<string, string>;
@@ -1,4 +1,4 @@
1
- import { h, m as makeGlobalStaticRules, g as globalKeywords, c as colorResolver, a as hasParseableColor, b as colorableShadows, d as positionMap, x as xyzMap } from './preset-mini.8929b018.mjs';
1
+ import { h, m as makeGlobalStaticRules, g as globalKeywords, c as colorResolver, a as hasParseableColor, b as colorableShadows, d as positionMap, x as xyzMap } from './preset-mini.87b98aea.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"];
@@ -123,8 +123,8 @@ const ringBase = {
123
123
  "--un-ring-offset-width": "0px",
124
124
  "--un-ring-offset-color": "#fff",
125
125
  "--un-ring-width": "0px",
126
- "--un-ring-color": "rgba(147,197,253,0.5)",
127
- "--un-shadow": "0 0 rgba(0,0,0,0)"
126
+ "--un-ring-color": "rgb(147 197 253 / 0.5)",
127
+ "--un-shadow": "0 0 rgb(0 0 0 / 0)"
128
128
  };
129
129
  const rings = [
130
130
  // size
@@ -154,10 +154,10 @@ const rings = [
154
154
  ];
155
155
 
156
156
  const boxShadowsBase = {
157
- "--un-ring-offset-shadow": "0 0 rgba(0,0,0,0)",
158
- "--un-ring-shadow": "0 0 rgba(0,0,0,0)",
157
+ "--un-ring-offset-shadow": "0 0 rgb(0 0 0 / 0)",
158
+ "--un-ring-shadow": "0 0 rgb(0 0 0 / 0)",
159
159
  "--un-shadow-inset": varEmpty,
160
- "--un-shadow": "0 0 rgba(0,0,0,0)"
160
+ "--un-shadow": "0 0 rgb(0 0 0 / 0)"
161
161
  };
162
162
  const boxShadows = [
163
163
  // color
@@ -254,9 +254,9 @@ const transforms = [
254
254
  [/^(?:transform-)?rotate-()(.+)$/, handleRotate],
255
255
  [/^(?:transform-)?rotate-([xyz])-(.+)$/, handleRotate],
256
256
  [/^(?:transform-)?skew-()(.+)$/, handleSkew],
257
- [/^(?:transform-)?skew-([xy])-(.+)$/, handleSkew, { autocomplete: ["transform-skew-(x|y)-<percent>"] }],
257
+ [/^(?:transform-)?skew-([xy])-(.+)$/, handleSkew, { autocomplete: ["transform-skew-(x|y)-<percent>", "skew-(x|y)-<percent>"] }],
258
258
  [/^(?:transform-)?scale-()(.+)$/, handleScale],
259
- [/^(?:transform-)?scale-([xyz])-(.+)$/, handleScale, { autocomplete: [`transform-(${transformValues.join("|")})-<percent>`, `transform-(${transformValues.join("|")})-(x|y|z)-<percent>`] }],
259
+ [/^(?:transform-)?scale-([xyz])-(.+)$/, handleScale, { autocomplete: [`transform-(${transformValues.join("|")})-<percent>`, `transform-(${transformValues.join("|")})-(x|y|z)-<percent>`, `(${transformValues.join("|")})-<percent>`, `(${transformValues.join("|")})-(x|y|z)-<percent>`] }],
260
260
  // style
261
261
  [/^(?:transform-)?preserve-3d$/, () => ({ "transform-style": "preserve-3d" })],
262
262
  [/^(?:transform-)?preserve-flat$/, () => ({ "transform-style": "flat" })],
@@ -106,6 +106,7 @@ const globalKeywords = [
106
106
  "revert-layer",
107
107
  "unset"
108
108
  ];
109
+ const cssMathFnRE = /^(?:calc|env|clamp|min|max)\(.*\)/;
109
110
 
110
111
  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;
111
112
  const numberRE = /^(-?\d*(?:\.\d+)?)$/i;
@@ -491,24 +492,22 @@ function colorableShadows(shadows, colorVar) {
491
492
  function hasParseableColor(color, theme) {
492
493
  return color != null && !!parseColor(color, theme)?.color;
493
494
  }
494
- function resolveBreakpoints({ theme, generator }) {
495
+ function resolveBreakpoints({ theme, generator }, key = "breakpoints") {
495
496
  let breakpoints;
496
497
  if (generator.userConfig && generator.userConfig.theme)
497
- breakpoints = generator.userConfig.theme.breakpoints;
498
+ breakpoints = generator.userConfig.theme[key];
498
499
  if (!breakpoints)
499
- breakpoints = theme.breakpoints;
500
- return breakpoints;
500
+ breakpoints = theme[key];
501
+ return breakpoints ? Object.entries(breakpoints).sort((a, b) => Number.parseInt(a[1].replace(/[a-z]+/gi, "")) - Number.parseInt(b[1].replace(/[a-z]+/gi, ""))).map(([point, size]) => ({ point, size })) : void 0;
501
502
  }
502
- function resolveVerticalBreakpoints({ theme, generator }) {
503
- let verticalBreakpoints;
504
- if (generator.userConfig && generator.userConfig.theme)
505
- verticalBreakpoints = generator.userConfig.theme.verticalBreakpoints;
506
- if (!verticalBreakpoints)
507
- verticalBreakpoints = theme.verticalBreakpoints;
508
- return verticalBreakpoints;
503
+ function resolveVerticalBreakpoints(context) {
504
+ return resolveBreakpoints(context, "verticalBreakpoints");
509
505
  }
510
506
  function makeGlobalStaticRules(prefix, property) {
511
507
  return globalKeywords.map((keyword) => [`${prefix}-${keyword}`, { [property ?? prefix]: keyword }]);
512
508
  }
509
+ function isCSSMathFn(value) {
510
+ return cssMathFnRE.test(value);
511
+ }
513
512
 
514
- export { CONTROL_MINI_NO_NEGATIVE as C, hasParseableColor as a, colorableShadows as b, colorResolver as c, positionMap as d, directionMap as e, cornerMap as f, globalKeywords as g, h, insetMap as i, resolveBreakpoints as j, directionSize as k, handler as l, makeGlobalStaticRules as m, numberWithUnitRE as n, parseColor as p, resolveVerticalBreakpoints as r, splitShorthand as s, valueHandlers as v, xyzMap as x };
513
+ export { CONTROL_MINI_NO_NEGATIVE as C, hasParseableColor as a, colorableShadows as b, colorResolver as c, positionMap as d, directionMap as e, cornerMap as f, globalKeywords as g, h, isCSSMathFn as i, insetMap as j, directionSize as k, cssMathFnRE as l, makeGlobalStaticRules as m, numberWithUnitRE as n, handler as o, parseColor as p, resolveVerticalBreakpoints as q, resolveBreakpoints as r, splitShorthand as s, valueHandlers as v, xyzMap as x };
@@ -1,5 +1,5 @@
1
1
  import { DynamicMatcher, ParsedColorValue, CSSObject, VariantContext, StaticRule } from '@unocss/core';
2
- import { T as Theme } from './preset-mini.bc674518.js';
2
+ import { T as Theme } from './preset-mini.6e321bc3.js';
3
3
 
4
4
  declare const CONTROL_MINI_NO_NEGATIVE = "$$mini-no-negative";
5
5
  /**
@@ -21,7 +21,7 @@ declare function splitShorthand(body: string, type: string): string[];
21
21
  * 'red' // From theme, if 'red' is available
22
22
  * 'red-100' // From theme, plus scale
23
23
  * 'red-100/20' // From theme, plus scale/opacity
24
- * '[rgb(100,2,3)]/[var(--op)]' // Bracket with rgb color and bracket with opacity
24
+ * '[rgb(100 2 3)]/[var(--op)]' // Bracket with rgb color and bracket with opacity
25
25
  *
26
26
  * @param body - Color string to be parsed.
27
27
  * @param theme - {@link Theme} object.
@@ -39,15 +39,15 @@ declare function parseColor(body: string, theme: Theme): ParsedColorValue | unde
39
39
  *
40
40
  * @example Resolving 'red-100' from theme:
41
41
  * colorResolver('background-color', 'background')('', 'red-100')
42
- * return { '--un-background-opacity': '1', 'background-color': 'rgba(254,226,226,var(--un-background-opacity))' }
42
+ * return { '--un-background-opacity': '1', 'background-color': 'rgb(254 226 226 / var(--un-background-opacity))' }
43
43
  *
44
44
  * @example Resolving 'red-100/20' from theme:
45
45
  * colorResolver('background-color', 'background')('', 'red-100/20')
46
- * return { 'background-color': 'rgba(204,251,241,0.22)' }
46
+ * return { 'background-color': 'rgb(204 251 241 / 0.22)' }
47
47
  *
48
48
  * @example Resolving 'hex-124':
49
49
  * colorResolver('color', 'text')('', 'hex-124')
50
- * return { '--un-text-opacity': '1', 'color': 'rgba(17,34,68,var(--un-text-opacity))' }
50
+ * return { '--un-text-opacity': '1', 'color': 'rgb(17 34 68 / var(--un-text-opacity))' }
51
51
  *
52
52
  * @param property - Property for the css value to be created.
53
53
  * @param varName - Base name for the opacity variable.
@@ -57,8 +57,15 @@ declare function parseColor(body: string, theme: Theme): ParsedColorValue | unde
57
57
  declare function colorResolver(property: string, varName: string, shouldPass?: (css: CSSObject) => boolean): DynamicMatcher;
58
58
  declare function colorableShadows(shadows: string | string[], colorVar: string): string[];
59
59
  declare function hasParseableColor(color: string | undefined, theme: Theme): boolean;
60
- declare function resolveBreakpoints({ theme, generator }: Readonly<VariantContext<Theme>>): Record<string, string> | undefined;
61
- declare function resolveVerticalBreakpoints({ theme, generator }: Readonly<VariantContext<Theme>>): Record<string, string> | undefined;
60
+ declare function resolveBreakpoints({ theme, generator }: Readonly<VariantContext<Theme>>, key?: 'breakpoints' | 'verticalBreakpoints'): {
61
+ point: string;
62
+ size: string;
63
+ }[] | undefined;
64
+ declare function resolveVerticalBreakpoints(context: Readonly<VariantContext<Theme>>): {
65
+ point: string;
66
+ size: string;
67
+ }[] | undefined;
62
68
  declare function makeGlobalStaticRules(prefix: string, property?: string): StaticRule[];
69
+ declare function isCSSMathFn(value: string): boolean;
63
70
 
64
- export { CONTROL_MINI_NO_NEGATIVE as C, colorableShadows as a, resolveVerticalBreakpoints as b, colorResolver as c, directionSize as d, hasParseableColor as h, makeGlobalStaticRules as m, parseColor as p, resolveBreakpoints as r, splitShorthand as s };
71
+ export { CONTROL_MINI_NO_NEGATIVE as C, colorableShadows as a, resolveVerticalBreakpoints as b, colorResolver as c, directionSize as d, hasParseableColor as h, isCSSMathFn as i, makeGlobalStaticRules as m, parseColor as p, resolveBreakpoints as r, splitShorthand as s };