@unocss/preset-mini 0.41.1 → 0.42.1

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.
@@ -274,11 +274,11 @@ const fonts = [
274
274
  ([, s], { theme }) => ({ "line-height": theme.lineHeight?.[s] || utilities.handler.bracket.cssvar.global.rem(s) }),
275
275
  { autocomplete: "(leading|lh)-$lineHeight" }
276
276
  ],
277
- [
278
- /^font-synthesis-(.+)$/,
279
- ([, s]) => ({ "font-synthesis": s }),
280
- { autocomplete: "font-synthesis-(none|weight|style|small-caps)" }
281
- ],
277
+ ["font-synthesis-weight", { "font-synthesis": "weight" }],
278
+ ["font-synthesis-style", { "font-synthesis": "style" }],
279
+ ["font-synthesis-small-caps", { "font-synthesis": "small-caps" }],
280
+ ["font-synthesis-none", { "font-synthesis": "none" }],
281
+ [/^font-synthesis-(.+)$/, ([, s]) => ({ "font-synthesis": utilities.handler.bracket.cssvar.global(s) })],
282
282
  [
283
283
  /^(?:font-)?tracking-(.+)$/,
284
284
  ([, s], { theme }) => ({ "letter-spacing": theme.letterSpacing?.[s] || utilities.handler.bracket.cssvar.global.rem(s) }),
@@ -545,28 +545,26 @@ function getSizeValue(minmax, hw, theme, prop) {
545
545
  return utilities.handler.bracket.cssvar.global.auto.fraction.rem(prop);
546
546
  }
547
547
  const sizes = [
548
- [
549
- /^(min-|max-)?([wh])-?(.+)$/,
550
- ([, m, w, s], { theme }) => ({ [getPropName(m, w)]: getSizeValue(m, w, theme, s) }),
551
- {
552
- autocomplete: [
553
- "(w|h)-$width|height|maxWidth|maxHeight|minWidth|minHeight|inlineSize|blockSize|maxInlineSize|maxBlockSize|minInlineSize|minBlockSize",
554
- "(max|min)-(w|h)-$width|height|maxWidth|maxHeight|minWidth|minHeight|inlineSize|blockSize|maxInlineSize|maxBlockSize|minInlineSize|minBlockSize"
555
- ]
556
- }
557
- ],
558
- [
559
- /^(min-|max-)?(block|inline)-(.+)$/,
560
- ([, m, w, s], { theme }) => ({ [getPropName(m, w)]: getSizeValue(m, w, theme, s) }),
561
- {
562
- autocomplete: [
563
- "(w|h)-(block|inline)-$width|height|maxWidth|maxHeight|minWidth|minHeight|inlineSize|blockSize|maxInlineSize|maxBlockSize|minInlineSize|minBlockSize",
564
- "(max|min)-(w|h)-(block|inline)-$width|height|maxWidth|maxHeight|minWidth|minHeight|inlineSize|blockSize|maxInlineSize|maxBlockSize|minInlineSize|minBlockSize"
565
- ]
566
- }
567
- ],
568
- [/^(min-|max-)?(h)-screen-(.+)$/, ([, m, w, s], context) => ({ [getPropName(m, w)]: utilities.resolveVerticalBreakpoints(context)?.[s] }), { autocomplete: ["h-screen-$verticalBreakpoints", "(min|max)-h-screen-$verticalBreakpoints"] }],
569
- [/^(min-|max-)?(w)-screen-(.+)$/, ([, m, w, s], context) => ({ [getPropName(m, w)]: utilities.resolveBreakpoints(context)?.[s] }), { autocomplete: ["w-screen-$breakpoints", "(min|max)-w-screen-$breakpoints"] }]
548
+ [/^(min-|max-)?([wh])-?(.+)$/, ([, m, w, s], { theme }) => ({ [getPropName(m, w)]: getSizeValue(m, w, theme, s) })],
549
+ [/^(min-|max-)?(block|inline)-(.+)$/, ([, m, w, s], { theme }) => ({ [getPropName(m, w)]: getSizeValue(m, w, theme, s) }), {
550
+ autocomplete: [
551
+ "(w|h)-$width|height|maxWidth|maxHeight|minWidth|minHeight|inlineSize|blockSize|maxInlineSize|maxBlockSize|minInlineSize|minBlockSize",
552
+ "(block|inline)-$width|height|maxWidth|maxHeight|minWidth|minHeight|inlineSize|blockSize|maxInlineSize|maxBlockSize|minInlineSize|minBlockSize",
553
+ "(max|min)-(w|h|block|inline)",
554
+ "(max|min)-(w|h|block|inline)-$width|height|maxWidth|maxHeight|minWidth|minHeight|inlineSize|blockSize|maxInlineSize|maxBlockSize|minInlineSize|minBlockSize"
555
+ ]
556
+ }],
557
+ [/^(min-|max-)?(h)-screen-(.+)$/, ([, m, w, s], context) => ({ [getPropName(m, w)]: utilities.resolveVerticalBreakpoints(context)?.[s] })],
558
+ [/^(min-|max-)?(w)-screen-(.+)$/, ([, m, w, s], context) => ({ [getPropName(m, w)]: utilities.resolveBreakpoints(context)?.[s] }), {
559
+ autocomplete: [
560
+ "(w|h)-screen",
561
+ "(min|max)-(w|h)-screen",
562
+ "h-screen-$verticalBreakpoints",
563
+ "(min|max)-h-screen-$verticalBreakpoints",
564
+ "w-screen-$breakpoints",
565
+ "(min|max)-w-screen-$breakpoints"
566
+ ]
567
+ }]
570
568
  ];
571
569
  function getAspectRatio(prop) {
572
570
  if (/^\d+\/\d+$/.test(prop))
@@ -580,7 +578,7 @@ function getAspectRatio(prop) {
580
578
  return utilities.handler.bracket.cssvar.global.auto.number(prop);
581
579
  }
582
580
  const aspectRatio = [
583
- [/^aspect-(?:ratio-)?(.+)$/, ([, d]) => ({ "aspect-ratio": getAspectRatio(d) }), { autocomplete: ["aspect-(square|video)", "aspect-ratio-(square|video)"] }]
581
+ [/^aspect-(?:ratio-)?(.+)$/, ([, d]) => ({ "aspect-ratio": getAspectRatio(d) }), { autocomplete: ["aspect-(square|video|ratio)", "aspect-ratio-(square|video)"] }]
584
582
  ];
585
583
 
586
584
  const paddings = [
@@ -739,6 +737,7 @@ exports.alignments = alignments;
739
737
  exports.appearance = appearance;
740
738
  exports.aspectRatio = aspectRatio;
741
739
  exports.bgColors = bgColors;
740
+ exports.borderStyles = borderStyles;
742
741
  exports.borders = borders;
743
742
  exports.boxSizing = boxSizing;
744
743
  exports.cssProperty = cssProperty;
@@ -272,11 +272,11 @@ const fonts = [
272
272
  ([, s], { theme }) => ({ "line-height": theme.lineHeight?.[s] || handler.bracket.cssvar.global.rem(s) }),
273
273
  { autocomplete: "(leading|lh)-$lineHeight" }
274
274
  ],
275
- [
276
- /^font-synthesis-(.+)$/,
277
- ([, s]) => ({ "font-synthesis": s }),
278
- { autocomplete: "font-synthesis-(none|weight|style|small-caps)" }
279
- ],
275
+ ["font-synthesis-weight", { "font-synthesis": "weight" }],
276
+ ["font-synthesis-style", { "font-synthesis": "style" }],
277
+ ["font-synthesis-small-caps", { "font-synthesis": "small-caps" }],
278
+ ["font-synthesis-none", { "font-synthesis": "none" }],
279
+ [/^font-synthesis-(.+)$/, ([, s]) => ({ "font-synthesis": handler.bracket.cssvar.global(s) })],
280
280
  [
281
281
  /^(?:font-)?tracking-(.+)$/,
282
282
  ([, s], { theme }) => ({ "letter-spacing": theme.letterSpacing?.[s] || handler.bracket.cssvar.global.rem(s) }),
@@ -543,28 +543,26 @@ function getSizeValue(minmax, hw, theme, prop) {
543
543
  return handler.bracket.cssvar.global.auto.fraction.rem(prop);
544
544
  }
545
545
  const sizes = [
546
- [
547
- /^(min-|max-)?([wh])-?(.+)$/,
548
- ([, m, w, s], { theme }) => ({ [getPropName(m, w)]: getSizeValue(m, w, theme, s) }),
549
- {
550
- autocomplete: [
551
- "(w|h)-$width|height|maxWidth|maxHeight|minWidth|minHeight|inlineSize|blockSize|maxInlineSize|maxBlockSize|minInlineSize|minBlockSize",
552
- "(max|min)-(w|h)-$width|height|maxWidth|maxHeight|minWidth|minHeight|inlineSize|blockSize|maxInlineSize|maxBlockSize|minInlineSize|minBlockSize"
553
- ]
554
- }
555
- ],
556
- [
557
- /^(min-|max-)?(block|inline)-(.+)$/,
558
- ([, m, w, s], { theme }) => ({ [getPropName(m, w)]: getSizeValue(m, w, theme, s) }),
559
- {
560
- autocomplete: [
561
- "(w|h)-(block|inline)-$width|height|maxWidth|maxHeight|minWidth|minHeight|inlineSize|blockSize|maxInlineSize|maxBlockSize|minInlineSize|minBlockSize",
562
- "(max|min)-(w|h)-(block|inline)-$width|height|maxWidth|maxHeight|minWidth|minHeight|inlineSize|blockSize|maxInlineSize|maxBlockSize|minInlineSize|minBlockSize"
563
- ]
564
- }
565
- ],
566
- [/^(min-|max-)?(h)-screen-(.+)$/, ([, m, w, s], context) => ({ [getPropName(m, w)]: resolveVerticalBreakpoints(context)?.[s] }), { autocomplete: ["h-screen-$verticalBreakpoints", "(min|max)-h-screen-$verticalBreakpoints"] }],
567
- [/^(min-|max-)?(w)-screen-(.+)$/, ([, m, w, s], context) => ({ [getPropName(m, w)]: resolveBreakpoints(context)?.[s] }), { autocomplete: ["w-screen-$breakpoints", "(min|max)-w-screen-$breakpoints"] }]
546
+ [/^(min-|max-)?([wh])-?(.+)$/, ([, m, w, s], { theme }) => ({ [getPropName(m, w)]: getSizeValue(m, w, theme, s) })],
547
+ [/^(min-|max-)?(block|inline)-(.+)$/, ([, m, w, s], { theme }) => ({ [getPropName(m, w)]: getSizeValue(m, w, theme, s) }), {
548
+ autocomplete: [
549
+ "(w|h)-$width|height|maxWidth|maxHeight|minWidth|minHeight|inlineSize|blockSize|maxInlineSize|maxBlockSize|minInlineSize|minBlockSize",
550
+ "(block|inline)-$width|height|maxWidth|maxHeight|minWidth|minHeight|inlineSize|blockSize|maxInlineSize|maxBlockSize|minInlineSize|minBlockSize",
551
+ "(max|min)-(w|h|block|inline)",
552
+ "(max|min)-(w|h|block|inline)-$width|height|maxWidth|maxHeight|minWidth|minHeight|inlineSize|blockSize|maxInlineSize|maxBlockSize|minInlineSize|minBlockSize"
553
+ ]
554
+ }],
555
+ [/^(min-|max-)?(h)-screen-(.+)$/, ([, m, w, s], context) => ({ [getPropName(m, w)]: resolveVerticalBreakpoints(context)?.[s] })],
556
+ [/^(min-|max-)?(w)-screen-(.+)$/, ([, m, w, s], context) => ({ [getPropName(m, w)]: resolveBreakpoints(context)?.[s] }), {
557
+ autocomplete: [
558
+ "(w|h)-screen",
559
+ "(min|max)-(w|h)-screen",
560
+ "h-screen-$verticalBreakpoints",
561
+ "(min|max)-h-screen-$verticalBreakpoints",
562
+ "w-screen-$breakpoints",
563
+ "(min|max)-w-screen-$breakpoints"
564
+ ]
565
+ }]
568
566
  ];
569
567
  function getAspectRatio(prop) {
570
568
  if (/^\d+\/\d+$/.test(prop))
@@ -578,7 +576,7 @@ function getAspectRatio(prop) {
578
576
  return handler.bracket.cssvar.global.auto.number(prop);
579
577
  }
580
578
  const aspectRatio = [
581
- [/^aspect-(?:ratio-)?(.+)$/, ([, d]) => ({ "aspect-ratio": getAspectRatio(d) }), { autocomplete: ["aspect-(square|video)", "aspect-ratio-(square|video)"] }]
579
+ [/^aspect-(?:ratio-)?(.+)$/, ([, d]) => ({ "aspect-ratio": getAspectRatio(d) }), { autocomplete: ["aspect-(square|video|ratio)", "aspect-ratio-(square|video)"] }]
582
580
  ];
583
581
 
584
582
  const paddings = [
@@ -733,4 +731,4 @@ const rules = [
733
731
  questionMark
734
732
  ].flat(1);
735
733
 
736
- export { paddings as A, margins as B, svgUtilities as C, transitions as D, fonts as E, tabSizes as F, textIndents as G, textStrokes as H, textShadows as I, cssVariables as J, cssProperty as K, textDecorations as L, appearance as a, borders as b, opacity as c, textColors as d, bgColors as e, flex as f, gaps as g, grids as h, overflows as i, justifies as j, orders as k, alignments as l, placements as m, insets as n, outline as o, positions as p, floats as q, rules as r, boxSizing as s, textAligns as t, questionMark as u, verticalAligns as v, willChange as w, sizes as x, aspectRatio as y, zIndexes as z };
734
+ export { aspectRatio as A, paddings as B, margins as C, svgUtilities as D, transitions as E, fonts as F, tabSizes as G, textIndents as H, textStrokes as I, textShadows as J, cssVariables as K, cssProperty as L, textDecorations as M, appearance as a, borderStyles as b, borders as c, opacity as d, textColors as e, bgColors as f, flex as g, gaps as h, grids as i, overflows as j, justifies as k, orders as l, alignments as m, placements as n, outline as o, positions as p, insets as q, rules as r, floats as s, textAligns as t, boxSizing as u, verticalAligns as v, willChange as w, questionMark as x, sizes as y, zIndexes as z };
@@ -327,7 +327,7 @@ const sortValue = (pseudo) => {
327
327
  return 1;
328
328
  };
329
329
  const taggedPseudoClassMatcher = (tag, parent, combinator) => {
330
- const rawRe = new RegExp(`${core.escapeRegExp(parent)}:`);
330
+ const rawRe = new RegExp(`^(${core.escapeRegExp(parent)}:)(\\S+)${core.escapeRegExp(combinator)}\\1`);
331
331
  const pseudoRE = new RegExp(`^${tag}-((?:(${PseudoClassFunctionsStr})-)?(${PseudoClassesStr}))[:-]`);
332
332
  const pseudoColonRE = new RegExp(`^${tag}-((?:(${PseudoClassFunctionsStr})-)?(${PseudoClassesColonStr}))[:]`);
333
333
  return {
@@ -342,12 +342,13 @@ const taggedPseudoClassMatcher = (tag, parent, combinator) => {
342
342
  matcher: input.slice(match[0].length),
343
343
  handle: (input2, next) => next({
344
344
  ...input2,
345
- prefix: rawRe.test(input2.prefix) ? input2.prefix.replace(rawRe, `${parent}${pseudo}:`) : `${parent}${pseudo}${combinator}${input2.prefix}`,
345
+ prefix: `${parent}${pseudo}${combinator}${input2.prefix}`.replace(rawRe, "$1$2:"),
346
346
  sort: sortValue(match[3])
347
347
  })
348
348
  };
349
349
  }
350
- }
350
+ },
351
+ multiPass: true
351
352
  };
352
353
  };
353
354
  const PseudoClassesAndElementsStr = Object.entries(PseudoClasses).map(([key]) => key).join("|");
@@ -400,22 +401,10 @@ const variantPseudoClassFunctions = {
400
401
  const variantTaggedPseudoClasses = (options = {}) => {
401
402
  const attributify = !!options?.attributifyPseudo;
402
403
  return [
403
- {
404
- ...taggedPseudoClassMatcher("group", attributify ? '[group=""]' : ".group", " "),
405
- multiPass: true
406
- },
407
- {
408
- ...taggedPseudoClassMatcher("peer", attributify ? '[peer=""]' : ".peer", "~"),
409
- multiPass: true
410
- },
411
- {
412
- ...taggedPseudoClassMatcher("parent", attributify ? '[parent=""]' : ".parent", ">"),
413
- multiPass: true
414
- },
415
- {
416
- ...taggedPseudoClassMatcher("previous", attributify ? '[previous=""]' : ".previous", "+"),
417
- multiPass: true
418
- }
404
+ taggedPseudoClassMatcher("group", attributify ? '[group=""]' : ".group", " "),
405
+ taggedPseudoClassMatcher("peer", attributify ? '[peer=""]' : ".peer", "~"),
406
+ taggedPseudoClassMatcher("parent", attributify ? '[parent=""]' : ".parent", ">"),
407
+ taggedPseudoClassMatcher("previous", attributify ? '[previous=""]' : ".previous", "+")
419
408
  ];
420
409
  };
421
410
  const PartClassesRE = /(part-\[(.+)]:)(.+)/;
@@ -325,7 +325,7 @@ const sortValue = (pseudo) => {
325
325
  return 1;
326
326
  };
327
327
  const taggedPseudoClassMatcher = (tag, parent, combinator) => {
328
- const rawRe = new RegExp(`${escapeRegExp(parent)}:`);
328
+ const rawRe = new RegExp(`^(${escapeRegExp(parent)}:)(\\S+)${escapeRegExp(combinator)}\\1`);
329
329
  const pseudoRE = new RegExp(`^${tag}-((?:(${PseudoClassFunctionsStr})-)?(${PseudoClassesStr}))[:-]`);
330
330
  const pseudoColonRE = new RegExp(`^${tag}-((?:(${PseudoClassFunctionsStr})-)?(${PseudoClassesColonStr}))[:]`);
331
331
  return {
@@ -340,12 +340,13 @@ const taggedPseudoClassMatcher = (tag, parent, combinator) => {
340
340
  matcher: input.slice(match[0].length),
341
341
  handle: (input2, next) => next({
342
342
  ...input2,
343
- prefix: rawRe.test(input2.prefix) ? input2.prefix.replace(rawRe, `${parent}${pseudo}:`) : `${parent}${pseudo}${combinator}${input2.prefix}`,
343
+ prefix: `${parent}${pseudo}${combinator}${input2.prefix}`.replace(rawRe, "$1$2:"),
344
344
  sort: sortValue(match[3])
345
345
  })
346
346
  };
347
347
  }
348
- }
348
+ },
349
+ multiPass: true
349
350
  };
350
351
  };
351
352
  const PseudoClassesAndElementsStr = Object.entries(PseudoClasses).map(([key]) => key).join("|");
@@ -398,22 +399,10 @@ const variantPseudoClassFunctions = {
398
399
  const variantTaggedPseudoClasses = (options = {}) => {
399
400
  const attributify = !!options?.attributifyPseudo;
400
401
  return [
401
- {
402
- ...taggedPseudoClassMatcher("group", attributify ? '[group=""]' : ".group", " "),
403
- multiPass: true
404
- },
405
- {
406
- ...taggedPseudoClassMatcher("peer", attributify ? '[peer=""]' : ".peer", "~"),
407
- multiPass: true
408
- },
409
- {
410
- ...taggedPseudoClassMatcher("parent", attributify ? '[parent=""]' : ".parent", ">"),
411
- multiPass: true
412
- },
413
- {
414
- ...taggedPseudoClassMatcher("previous", attributify ? '[previous=""]' : ".previous", "+"),
415
- multiPass: true
416
- }
402
+ taggedPseudoClassMatcher("group", attributify ? '[group=""]' : ".group", " "),
403
+ taggedPseudoClassMatcher("peer", attributify ? '[peer=""]' : ".peer", "~"),
404
+ taggedPseudoClassMatcher("parent", attributify ? '[parent=""]' : ".parent", ">"),
405
+ taggedPseudoClassMatcher("previous", attributify ? '[previous=""]' : ".previous", "+")
417
406
  ];
418
407
  };
419
408
  const PartClassesRE = /(part-\[(.+)]:)(.+)/;
@@ -2,6 +2,7 @@
2
2
 
3
3
  const utilities = require('./utilities.cjs');
4
4
 
5
+ 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"];
5
6
  const varEmpty = "var(--un-empty,/*!*/ /*!*/)";
6
7
  const displays = [
7
8
  ["inline", { display: "inline" }],
@@ -21,7 +22,8 @@ const appearances = [
21
22
  ...utilities.makeGlobalStaticRules("backface", "backface-visibility")
22
23
  ];
23
24
  const cursors = [
24
- [/^cursor-(.+)$/, ([, c]) => ({ cursor: utilities.handler.bracket.cssvar.global(c) || c })]
25
+ [/^cursor-(.+)$/, ([, c]) => ({ cursor: utilities.handler.bracket.cssvar.global(c) })],
26
+ ...cursorValues.map((v) => [`cursor-${v}`, { cursor: v }])
25
27
  ];
26
28
  const pointerEvents = [
27
29
  ["pointer-events-auto", { "pointer-events": "auto" }],
@@ -146,6 +148,11 @@ const boxShadows = [
146
148
  ["shadow-inset", { "--un-shadow-inset": "inset" }]
147
149
  ];
148
150
 
151
+ const transformValues = [
152
+ "translate",
153
+ "rotate",
154
+ "scale"
155
+ ];
149
156
  const transformCpu = [
150
157
  "translateX(var(--un-translate-x))",
151
158
  "translateY(var(--un-translate-y))",
@@ -210,9 +217,9 @@ const transforms = [
210
217
  [/^(?:transform-)?translate-([xyz])-(.+)$/, handleTranslate],
211
218
  [/^(?:transform-)?rotate-()(.+)$/, handleRotate],
212
219
  [/^(?:transform-)?rotate-([xyz])-(.+)$/, handleRotate],
213
- [/^(?:transform-)?skew-([xy])-(.+)$/, handleSkew],
220
+ [/^(?:transform-)?skew-([xy])-(.+)$/, handleSkew, { autocomplete: ["transform-skew-(x|y)-<percent>"] }],
214
221
  [/^(?:transform-)?scale-()(.+)$/, handleScale],
215
- [/^(?:transform-)?scale-([xyz])-(.+)$/, handleScale],
222
+ [/^(?:transform-)?scale-([xyz])-(.+)$/, handleScale, { autocomplete: [`transform-(${transformValues.join("|")})-<percent>`, `transform-(${transformValues.join("|")})-(x|y|z)-<percent>`] }],
216
223
  [/^(?:transform-)?preserve-3d$/, () => ({ "transform-style": "preserve-3d" })],
217
224
  [/^(?:transform-)?preserve-flat$/, () => ({ "transform-style": "flat" })],
218
225
  ["transform", { transform: transformCpu }],
@@ -1,5 +1,6 @@
1
1
  import { h as handler, m as makeGlobalStaticRules, g as globalKeywords, c as colorResolver, i as colorableShadows, n as positionMap, x as xyzMap } from './utilities.mjs';
2
2
 
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"];
3
4
  const varEmpty = "var(--un-empty,/*!*/ /*!*/)";
4
5
  const displays = [
5
6
  ["inline", { display: "inline" }],
@@ -19,7 +20,8 @@ const appearances = [
19
20
  ...makeGlobalStaticRules("backface", "backface-visibility")
20
21
  ];
21
22
  const cursors = [
22
- [/^cursor-(.+)$/, ([, c]) => ({ cursor: handler.bracket.cssvar.global(c) || c })]
23
+ [/^cursor-(.+)$/, ([, c]) => ({ cursor: handler.bracket.cssvar.global(c) })],
24
+ ...cursorValues.map((v) => [`cursor-${v}`, { cursor: v }])
23
25
  ];
24
26
  const pointerEvents = [
25
27
  ["pointer-events-auto", { "pointer-events": "auto" }],
@@ -144,6 +146,11 @@ const boxShadows = [
144
146
  ["shadow-inset", { "--un-shadow-inset": "inset" }]
145
147
  ];
146
148
 
149
+ const transformValues = [
150
+ "translate",
151
+ "rotate",
152
+ "scale"
153
+ ];
147
154
  const transformCpu = [
148
155
  "translateX(var(--un-translate-x))",
149
156
  "translateY(var(--un-translate-y))",
@@ -208,9 +215,9 @@ const transforms = [
208
215
  [/^(?:transform-)?translate-([xyz])-(.+)$/, handleTranslate],
209
216
  [/^(?:transform-)?rotate-()(.+)$/, handleRotate],
210
217
  [/^(?:transform-)?rotate-([xyz])-(.+)$/, handleRotate],
211
- [/^(?:transform-)?skew-([xy])-(.+)$/, handleSkew],
218
+ [/^(?:transform-)?skew-([xy])-(.+)$/, handleSkew, { autocomplete: ["transform-skew-(x|y)-<percent>"] }],
212
219
  [/^(?:transform-)?scale-()(.+)$/, handleScale],
213
- [/^(?:transform-)?scale-([xyz])-(.+)$/, handleScale],
220
+ [/^(?:transform-)?scale-([xyz])-(.+)$/, handleScale, { autocomplete: [`transform-(${transformValues.join("|")})-<percent>`, `transform-(${transformValues.join("|")})-(x|y|z)-<percent>`] }],
214
221
  [/^(?:transform-)?preserve-3d$/, () => ({ "transform-style": "preserve-3d" })],
215
222
  [/^(?:transform-)?preserve-flat$/, () => ({ "transform-style": "flat" })],
216
223
  ["transform", { transform: transformCpu }],
@@ -1,4 +1,4 @@
1
- import { T as Theme } from './types-2a2972f5.js';
1
+ import { T as Theme } from './types-9e30040a.js';
2
2
 
3
3
  declare const colors: Theme['colors'];
4
4
 
package/dist/colors.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export { c as colors } from './colors-b075335e.js';
2
- import './types-2a2972f5.js';
1
+ export { c as colors } from './colors-f2b5968c.js';
2
+ import './types-9e30040a.js';
@@ -1,4 +1,4 @@
1
- import { T as Theme } from './types-2a2972f5.js';
1
+ import { T as Theme } from './types-9e30040a.js';
2
2
 
3
3
  declare const theme: Theme;
4
4
 
package/dist/index.d.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  import { Preflight, PresetOptions, Preset } from '@unocss/core';
2
- import { T as Theme } from './types-2a2972f5.js';
3
- export { T as Theme, a as ThemeAnimation } from './types-2a2972f5.js';
4
- export { t as theme } from './default-08edad2c.js';
5
- export { c as colors } from './colors-b075335e.js';
6
- export { p as parseColor } from './utilities-02300cd4.js';
2
+ import { T as Theme } from './types-9e30040a.js';
3
+ export { T as Theme, a as ThemeAnimation } from './types-9e30040a.js';
4
+ export { t as theme } from './default-0fe8c7f8.js';
5
+ export { c as colors } from './colors-f2b5968c.js';
6
+ export { p as parseColor } from './utilities-654ad3bd.js';
7
7
 
8
8
  declare const preflights: Preflight[];
9
9
 
package/dist/rules.cjs CHANGED
@@ -13,6 +13,7 @@ exports.alignments = _default.alignments;
13
13
  exports.appearance = _default.appearance;
14
14
  exports.aspectRatio = _default.aspectRatio;
15
15
  exports.bgColors = _default.bgColors;
16
+ exports.borderStyles = _default.borderStyles;
16
17
  exports.borders = _default.borders;
17
18
  exports.boxSizing = _default.boxSizing;
18
19
  exports.cssProperty = _default.cssProperty;
package/dist/rules.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Rule } from '@unocss/core';
2
- import { T as Theme } from './types-2a2972f5.js';
2
+ import { T as Theme } from './types-9e30040a.js';
3
3
 
4
4
  declare const verticalAligns: Rule[];
5
5
  declare const textAligns: Rule[];
@@ -8,6 +8,7 @@ declare const outline: Rule<Theme>[];
8
8
  declare const appearance: Rule[];
9
9
  declare const willChange: Rule[];
10
10
 
11
+ declare const borderStyles: string[];
11
12
  declare const borders: Rule[];
12
13
 
13
14
  /**
@@ -117,4 +118,4 @@ declare const cssProperty: Rule[];
117
118
 
118
119
  declare const textDecorations: Rule<Theme>[];
119
120
 
120
- export { alignments, appearance, appearances, aspectRatio, bgColors, borders, boxShadows, boxShadowsBase, boxSizing, breaks, contents, cssProperty, cssVariables, cursors, displays, flex, floats, fontSmoothings, fontStyles, fonts, gaps, grids, insets, justifies, margins, opacity, orders, outline, overflows, paddings, placements, pointerEvents, positions, questionMark, resizes, ringBase, rings, rules, sizes, svgUtilities, tabSizes, textAligns, textColors, textDecorations, textIndents, textOverflows, textShadows, textStrokes, textTransforms, transformBase, transforms, transitions, userSelects, varEmpty, verticalAligns, whitespaces, willChange, zIndexes };
121
+ export { alignments, appearance, appearances, aspectRatio, bgColors, borderStyles, borders, boxShadows, boxShadowsBase, boxSizing, breaks, contents, cssProperty, cssVariables, cursors, displays, flex, floats, fontSmoothings, fontStyles, fonts, gaps, grids, insets, justifies, margins, opacity, orders, outline, overflows, paddings, placements, pointerEvents, positions, questionMark, resizes, ringBase, rings, rules, sizes, svgUtilities, tabSizes, textAligns, textColors, textDecorations, textIndents, textOverflows, textShadows, textStrokes, textTransforms, transformBase, transforms, transitions, userSelects, varEmpty, verticalAligns, whitespaces, willChange, zIndexes };
package/dist/rules.mjs CHANGED
@@ -1,4 +1,4 @@
1
- export { l as alignments, a as appearance, y as aspectRatio, e as bgColors, b as borders, s as boxSizing, K as cssProperty, J as cssVariables, f as flex, q as floats, E as fonts, g as gaps, h as grids, n as insets, j as justifies, B as margins, c as opacity, k as orders, o as outline, i as overflows, A as paddings, m as placements, p as positions, u as questionMark, r as rules, x as sizes, C as svgUtilities, F as tabSizes, t as textAligns, d as textColors, L as textDecorations, G as textIndents, I as textShadows, H as textStrokes, D as transitions, v as verticalAligns, w as willChange, z as zIndexes } from './chunks/default2.mjs';
1
+ export { m as alignments, a as appearance, A as aspectRatio, f as bgColors, b as borderStyles, c as borders, u as boxSizing, L as cssProperty, K as cssVariables, g as flex, s as floats, F as fonts, h as gaps, i as grids, q as insets, k as justifies, C as margins, d as opacity, l as orders, o as outline, j as overflows, B as paddings, n as placements, p as positions, x as questionMark, r as rules, y as sizes, D as svgUtilities, G as tabSizes, t as textAligns, e as textColors, M as textDecorations, H as textIndents, J as textShadows, I as textStrokes, E as transitions, v as verticalAligns, w as willChange, z as zIndexes } from './chunks/default2.mjs';
2
2
  export { k as appearances, h as boxShadows, b as boxShadowsBase, m as breaks, c as contents, j as cursors, d as displays, g as fontSmoothings, f as fontStyles, p as pointerEvents, l as resizes, r as ringBase, i as rings, a as textOverflows, e as textTransforms, t as transformBase, n as transforms, u as userSelects, v as varEmpty, w as whitespaces } from './chunks/transform.mjs';
3
3
  import './chunks/utilities.mjs';
4
4
  import '@unocss/core';
package/dist/theme.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- export { c as colors } from './colors-b075335e.js';
2
- export { t as theme } from './default-08edad2c.js';
3
- import { T as Theme } from './types-2a2972f5.js';
4
- export { T as Theme, a as ThemeAnimation } from './types-2a2972f5.js';
1
+ export { c as colors } from './colors-f2b5968c.js';
2
+ export { t as theme } from './default-0fe8c7f8.js';
3
+ import { T as Theme } from './types-9e30040a.js';
4
+ export { T as Theme, a as ThemeAnimation } from './types-9e30040a.js';
5
5
 
6
6
  declare const blur: {
7
7
  DEFAULT: string;
@@ -46,6 +46,9 @@ interface Theme {
46
46
  gridRow?: Record<string, string>;
47
47
  gridTemplateColumn?: Record<string, string>;
48
48
  gridTemplateRow?: Record<string, string>;
49
+ container?: {
50
+ center?: boolean;
51
+ };
49
52
  /** Used to generate CSS variables placeholder in preflight */
50
53
  preflightBase?: Record<string, string | number>;
51
54
  }
@@ -1,5 +1,5 @@
1
1
  import { RuleContext, CSSEntries, ParsedColorValue, CSSObject, VariantContext, Rule } from '@unocss/core';
2
- import { T as Theme } from './types-2a2972f5.js';
2
+ import { T as Theme } from './types-9e30040a.js';
3
3
 
4
4
  declare const CONTROL_MINI_NO_NEGATIVE = "$$mini-no-negative";
5
5
  /**
package/dist/utils.d.ts CHANGED
@@ -1,7 +1,7 @@
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, h as hasParseableColor, m as makeGlobalStaticRules, p as parseColor, r as resolveBreakpoints, b as resolveVerticalBreakpoints } from './utilities-02300cd4.js';
4
- import './types-2a2972f5.js';
3
+ export { C as CONTROL_MINI_NO_NEGATIVE, c as colorResolver, a as colorableShadows, d as directionSize, h as hasParseableColor, m as makeGlobalStaticRules, p as parseColor, r as resolveBreakpoints, b as resolveVerticalBreakpoints } from './utilities-654ad3bd.js';
4
+ import './types-9e30040a.js';
5
5
 
6
6
  declare function hex2rgba(hex?: string): RGBAColorValue | undefined;
7
7
  declare function parseCssColor(str?: string): CSSColorValue | undefined;
@@ -1,9 +1,9 @@
1
1
  import { Variant, VariantObject } from '@unocss/core';
2
- import { T as Theme } from './types-2a2972f5.js';
2
+ import { T as Theme } from './types-9e30040a.js';
3
3
  import { PresetMiniOptions } from './index.js';
4
- import './default-08edad2c.js';
5
- import './colors-b075335e.js';
6
- import './utilities-02300cd4.js';
4
+ import './default-0fe8c7f8.js';
5
+ import './colors-f2b5968c.js';
6
+ import './utilities-654ad3bd.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.41.1",
3
+ "version": "0.42.1",
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.41.1"
64
+ "@unocss/core": "0.42.1"
65
65
  },
66
66
  "scripts": {
67
67
  "build": "unbuild",