@unocss/preset-mini 0.51.4 → 0.51.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/dist/index.cjs CHANGED
@@ -4,11 +4,11 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const extractorArbitraryVariants = require('@unocss/extractor-arbitrary-variants');
6
6
  const core = require('@unocss/core');
7
- require('./shared/preset-mini.ec9a9ad9.cjs');
8
- const _default$1 = require('./shared/preset-mini.91256db5.cjs');
7
+ require('./shared/preset-mini.a6e5a967.cjs');
8
+ const _default$1 = require('./shared/preset-mini.e7d6efba.cjs');
9
9
  const colors$1 = require('./shared/preset-mini.d7d4b4ea.cjs');
10
10
  const colors = require('./shared/preset-mini.bb7dc365.cjs');
11
- const _default = require('./shared/preset-mini.5e320038.cjs');
11
+ const _default = require('./shared/preset-mini.00f6869f.cjs');
12
12
  const _default$2 = require('./shared/preset-mini.1baba2d5.cjs');
13
13
  require('./shared/preset-mini.950e178f.cjs');
14
14
 
package/dist/index.d.ts CHANGED
@@ -3,7 +3,7 @@ export { c as colors } from './colors-e683aa85.js';
3
3
  export { t as theme } from './default-d9218dd5.js';
4
4
  import { T as Theme } from './types-f73ecdfe.js';
5
5
  export { T as Theme, a as ThemeAnimation } from './types-f73ecdfe.js';
6
- export { p as parseColor } from './utilities-a87209ad.js';
6
+ export { p as parseColor } from './utilities-73daa267.js';
7
7
 
8
8
  declare const preflights: Preflight[];
9
9
 
package/dist/index.mjs CHANGED
@@ -1,11 +1,11 @@
1
1
  import { extractorArbitraryVariants } from '@unocss/extractor-arbitrary-variants';
2
2
  import { entriesToCss, toArray } from '@unocss/core';
3
- import './shared/preset-mini.7cde01b2.mjs';
4
- import { r as rules } from './shared/preset-mini.eeb53fee.mjs';
3
+ import './shared/preset-mini.46b4a7e7.mjs';
4
+ import { r as rules } from './shared/preset-mini.ad7a639d.mjs';
5
5
  export { p as parseColor } from './shared/preset-mini.acf4efb2.mjs';
6
6
  export { c as colors } from './shared/preset-mini.74b45c11.mjs';
7
- import { t as theme } from './shared/preset-mini.ea93a64e.mjs';
8
- export { t as theme } from './shared/preset-mini.ea93a64e.mjs';
7
+ import { t as theme } from './shared/preset-mini.a749a848.mjs';
8
+ export { t as theme } from './shared/preset-mini.a749a848.mjs';
9
9
  import { v as variants } from './shared/preset-mini.780dcf0b.mjs';
10
10
  import './shared/preset-mini.780f5e22.mjs';
11
11
 
package/dist/rules.cjs CHANGED
@@ -2,8 +2,8 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const transform = require('./shared/preset-mini.ec9a9ad9.cjs');
6
- const _default = require('./shared/preset-mini.91256db5.cjs');
5
+ const transform = require('./shared/preset-mini.a6e5a967.cjs');
6
+ const _default = require('./shared/preset-mini.e7d6efba.cjs');
7
7
  require('./shared/preset-mini.d7d4b4ea.cjs');
8
8
  require('@unocss/core');
9
9
 
@@ -24,6 +24,7 @@ exports.contentVisibility = transform.contentVisibility;
24
24
  exports.contents = transform.contents;
25
25
  exports.cursors = transform.cursors;
26
26
  exports.displays = transform.displays;
27
+ exports.flexGridJustifiesAlignments = transform.flexGridJustifiesAlignments;
27
28
  exports.floats = transform.floats;
28
29
  exports.fontSmoothings = transform.fontSmoothings;
29
30
  exports.fontStyles = transform.fontStyles;
package/dist/rules.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Rule, CSSEntries } from '@unocss/core';
1
+ import { Rule, CSSEntries, StaticRule } from '@unocss/core';
2
2
  import { T as Theme } from './types-f73ecdfe.js';
3
3
 
4
4
  declare const verticalAligns: Rule[];
@@ -37,10 +37,15 @@ declare const grids: Rule<Theme>[];
37
37
  declare const overflows: Rule[];
38
38
 
39
39
  declare const positions: Rule[];
40
- declare const justifies: Rule[];
40
+ declare const justifies: StaticRule[];
41
41
  declare const orders: Rule[];
42
- declare const alignments: Rule[];
42
+ declare const alignments: StaticRule[];
43
43
  declare const placements: Rule[];
44
+ /**
45
+ * This is to add `flex-` and `grid-` prefix to the alignment rules,
46
+ * supporting `flex="~ items-center"` in attributify mode.
47
+ */
48
+ declare const flexGridJustifiesAlignments: StaticRule[];
44
49
  declare const insets: Rule[];
45
50
  declare const floats: Rule[];
46
51
  declare const zIndexes: Rule[];
@@ -123,4 +128,4 @@ declare const textShadows: Rule<Theme>[];
123
128
  declare const cssVariables: Rule[];
124
129
  declare const cssProperty: Rule[];
125
130
 
126
- export { alignments, appearance, appearances, aspectRatio, bgColors, borderStyles, borders, boxShadows, boxShadowsBase, boxSizing, breaks, containerParent, contains, contentVisibility, contents, cssProperty, cssVariables, cursors, displays, flex, floats, fontSmoothings, fontStyles, fonts, gaps, grids, handlerBorderStyle, 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 };
131
+ export { alignments, appearance, appearances, aspectRatio, bgColors, borderStyles, borders, boxShadows, boxShadowsBase, boxSizing, breaks, containerParent, contains, contentVisibility, contents, cssProperty, cssVariables, cursors, displays, flex, flexGridJustifiesAlignments, floats, fontSmoothings, fontStyles, fonts, gaps, grids, handlerBorderStyle, 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 { I as alignments, F as appearance, w as appearances, b as bgColors, V as borderStyles, a as borders, r as boxShadows, T as boxShadowsBase, N as boxSizing, C as breaks, R as contains, c as contentVisibility, e as contents, v as cursors, d as displays, L as floats, q as fontSmoothings, p as fontStyles, f as fonts, W as handlerBorderStyle, K as insets, H as justifies, o as opacity, G as orders, E as outline, D as overflows, J as placements, x as pointerEvents, u as positions, y as resizes, U as ringBase, s as rings, t as tabSizes, m as textAligns, n as textColors, i as textDecorations, g as textIndents, h as textOverflows, k as textShadows, j as textStrokes, l as textTransforms, S as transformBase, P as transforms, O as transitions, A as userSelects, X as varEmpty, z as verticalAligns, B as whitespaces, Q as willChange, M as zIndexes } from './shared/preset-mini.7cde01b2.mjs';
2
- export { b as aspectRatio, c as containerParent, h as cssProperty, e as cssVariables, f as flex, g as gaps, a as grids, m as margins, p as paddings, q as questionMark, r as rules, s as sizes, d as svgUtilities } from './shared/preset-mini.eeb53fee.mjs';
1
+ export { I as alignments, F as appearance, w as appearances, b as bgColors, W as borderStyles, a as borders, r as boxShadows, U as boxShadowsBase, O as boxSizing, C as breaks, S as contains, c as contentVisibility, e as contents, v as cursors, d as displays, K as flexGridJustifiesAlignments, M as floats, q as fontSmoothings, p as fontStyles, f as fonts, X as handlerBorderStyle, L as insets, H as justifies, o as opacity, G as orders, E as outline, D as overflows, J as placements, x as pointerEvents, u as positions, y as resizes, V as ringBase, s as rings, t as tabSizes, m as textAligns, n as textColors, i as textDecorations, g as textIndents, h as textOverflows, k as textShadows, j as textStrokes, l as textTransforms, T as transformBase, Q as transforms, P as transitions, A as userSelects, Y as varEmpty, z as verticalAligns, B as whitespaces, R as willChange, N as zIndexes } from './shared/preset-mini.46b4a7e7.mjs';
2
+ export { b as aspectRatio, c as containerParent, h as cssProperty, e as cssVariables, f as flex, g as gaps, a as grids, m as margins, p as paddings, q as questionMark, r as rules, s as sizes, d as svgUtilities } from './shared/preset-mini.ad7a639d.mjs';
3
3
  import './shared/preset-mini.acf4efb2.mjs';
4
4
  import '@unocss/core';
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  const colors = require('./preset-mini.bb7dc365.cjs');
4
- const transform = require('./preset-mini.ec9a9ad9.cjs');
4
+ const transform = require('./preset-mini.a6e5a967.cjs');
5
5
  require('@unocss/core');
6
6
  require('./preset-mini.d7d4b4ea.cjs');
7
7
 
@@ -127,7 +127,7 @@ function handlerBorderColor([, a = "", c], { theme }) {
127
127
  }
128
128
  }
129
129
  function handlerBorderOpacity([, a = "", opacity]) {
130
- const v = handler.bracket.percent(opacity);
130
+ const v = handler.bracket.percent.cssvar(opacity);
131
131
  if (a in directionMap && v != null)
132
132
  return directionMap[a].map((i) => [`--un-border${i}-opacity`, v]);
133
133
  }
@@ -148,11 +148,11 @@ const textColors = [
148
148
  [/^(?:color|c)-(.+)$/, colorResolver("color", "text"), { autocomplete: "(color|c)-$colors" }],
149
149
  [/^text-(.+)$/, colorResolver("color", "text", (css) => !css.color?.toString().match(numberWithUnitRE)), { autocomplete: "text-$colors" }],
150
150
  [/^(?:text|color|c)-(.+)$/, ([, v]) => globalKeywords.includes(v) ? { color: v } : void 0, { autocomplete: `(text|color|c)-(${globalKeywords.join("|")})` }],
151
- [/^(?:text|color|c)-op(?:acity)?-?(.+)$/, ([, opacity2]) => ({ "--un-text-opacity": handler.bracket.percent(opacity2) }), { autocomplete: "(text|color|c)-(op|opacity)-<percent>" }]
151
+ [/^(?:text|color|c)-op(?:acity)?-?(.+)$/, ([, opacity2]) => ({ "--un-text-opacity": handler.bracket.percent.cssvar(opacity2) }), { autocomplete: "(text|color|c)-(op|opacity)-<percent>" }]
152
152
  ];
153
153
  const bgColors = [
154
154
  [/^bg-(.+)$/, colorResolver("background-color", "bg"), { autocomplete: "bg-$colors" }],
155
- [/^bg-op(?:acity)?-?(.+)$/, ([, opacity2]) => ({ "--un-bg-opacity": handler.bracket.percent(opacity2) }), { autocomplete: "bg-(op|opacity)-<percent>" }]
155
+ [/^bg-op(?:acity)?-?(.+)$/, ([, opacity2]) => ({ "--un-bg-opacity": handler.bracket.percent.cssvar(opacity2) }), { autocomplete: "bg-(op|opacity)-<percent>" }]
156
156
  ];
157
157
 
158
158
  const decorationStyles = ["solid", "double", "dotted", "dashed", "wavy", ...globalKeywords];
@@ -169,7 +169,7 @@ const textDecorations = [
169
169
  };
170
170
  }
171
171
  }, { autocomplete: "(underline|decoration)-$colors" }],
172
- [/^(?:underline|decoration)-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-line-opacity": handler.bracket.percent(opacity) }), { autocomplete: "(underline|decoration)-(op|opacity)-<percent>" }],
172
+ [/^(?:underline|decoration)-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-line-opacity": handler.bracket.percent.cssvar(opacity) }), { autocomplete: "(underline|decoration)-(op|opacity)-<percent>" }],
173
173
  [/^(?:underline|decoration)-offset-(.+)$/, ([, s], { theme }) => ({ "text-underline-offset": theme.lineWidth?.[s] ?? handler.auto.bracket.cssvar.global.px(s) }), { autocomplete: "(underline|decoration)-(offset)-<num>" }],
174
174
  ...decorationStyles.map((v) => [`underline-${v}`, { "text-decoration-style": v }]),
175
175
  ...decorationStyles.map((v) => [`decoration-${v}`, { "text-decoration-style": v }]),
@@ -318,7 +318,7 @@ const textIndents = [
318
318
  const textStrokes = [
319
319
  [/^text-stroke(?:-(.+))?$/, ([, s], { theme }) => ({ "-webkit-text-stroke-width": theme.textStrokeWidth?.[s || "DEFAULT"] || handler.bracket.cssvar.px(s) }), { autocomplete: "text-stroke-$textStrokeWidth" }],
320
320
  [/^text-stroke-(.+)$/, colorResolver("-webkit-text-stroke-color", "text-stroke"), { autocomplete: "text-stroke-$colors" }],
321
- [/^text-stroke-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-text-stroke-opacity": handler.bracket.percent(opacity) }), { autocomplete: "text-stroke-(op|opacity)-<percent>" }]
321
+ [/^text-stroke-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-text-stroke-opacity": handler.bracket.percent.cssvar(opacity) }), { autocomplete: "text-stroke-(op|opacity)-<percent>" }]
322
322
  ];
323
323
  const textShadows = [
324
324
  [/^text-shadow(?:-(.+))?$/, ([, s], { theme }) => {
@@ -332,7 +332,7 @@ const textShadows = [
332
332
  return { "text-shadow": handler.bracket.cssvar.global(s) };
333
333
  }, { autocomplete: "text-shadow-$textShadow" }],
334
334
  [/^text-shadow-color-(.+)$/, colorResolver("--un-text-shadow-color", "text-shadow"), { autocomplete: "text-shadow-color-$colors" }],
335
- [/^text-shadow-color-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-text-shadow-opacity": handler.bracket.percent(opacity) }), { autocomplete: "text-shadow-color-(op|opacity)-<percent>" }]
335
+ [/^text-shadow-color-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-text-shadow-opacity": handler.bracket.percent.cssvar(opacity) }), { autocomplete: "text-shadow-color-(op|opacity)-<percent>" }]
336
336
  ];
337
337
 
338
338
  const overflowValues = [
@@ -423,6 +423,10 @@ const placements = [
423
423
  ["place-self-stretch", { "place-self": "stretch" }],
424
424
  ...makeGlobalStaticRules("place-self")
425
425
  ];
426
+ const flexGridJustifiesAlignments = [...justifies, ...alignments].flatMap(([k, v]) => [
427
+ [`flex-${k}`, v],
428
+ [`grid-${k}`, v]
429
+ ]);
426
430
  function handleInsetValue(v, { theme }) {
427
431
  return theme.spacing?.[v] ?? handler.bracket.cssvar.global.auto.fraction.rem(v);
428
432
  }
@@ -552,6 +556,7 @@ const breaks = [
552
556
  ];
553
557
  const textOverflows = [
554
558
  ["truncate", { "overflow": "hidden", "text-overflow": "ellipsis", "white-space": "nowrap" }],
559
+ ["text-truncate", { "overflow": "hidden", "text-overflow": "ellipsis", "white-space": "nowrap" }],
555
560
  ["text-ellipsis", { "text-overflow": "ellipsis" }],
556
561
  ["text-clip", { "text-overflow": "clip" }]
557
562
  ];
@@ -609,9 +614,9 @@ const rings = [
609
614
  ["ring-offset", { "--un-ring-offset-width": "1px" }],
610
615
  [/^ring-offset-(?:width-|size-)?(.+)$/, ([, d], { theme }) => ({ "--un-ring-offset-width": theme.lineWidth?.[d] ?? handler.bracket.cssvar.px(d) }), { autocomplete: "ring-offset-(width|size)-$lineWidth" }],
611
616
  [/^ring-(.+)$/, colorResolver("--un-ring-color", "ring"), { autocomplete: "ring-$colors" }],
612
- [/^ring-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-ring-opacity": handler.bracket.percent(opacity) }), { autocomplete: "ring-(op|opacity)-<percent>" }],
617
+ [/^ring-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-ring-opacity": handler.bracket.percent.cssvar(opacity) }), { autocomplete: "ring-(op|opacity)-<percent>" }],
613
618
  [/^ring-offset-(.+)$/, colorResolver("--un-ring-offset-color", "ring-offset"), { autocomplete: "ring-offset-$colors" }],
614
- [/^ring-offset-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-ring-offset-opacity": handler.bracket.percent(opacity) }), { autocomplete: "ring-offset-(op|opacity)-<percent>" }],
619
+ [/^ring-offset-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-ring-offset-opacity": handler.bracket.percent.cssvar(opacity) }), { autocomplete: "ring-offset-(op|opacity)-<percent>" }],
615
620
  ["ring-inset", { "--un-ring-inset": "inset" }]
616
621
  ];
617
622
 
@@ -635,7 +640,7 @@ const boxShadows = [
635
640
  }
636
641
  return colorResolver("--un-shadow-color", "shadow")(match, context);
637
642
  }, { autocomplete: ["shadow-$colors", "shadow-$boxShadow"] }],
638
- [/^shadow-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-shadow-opacity": handler.bracket.percent(opacity) }), { autocomplete: "shadow-(op|opacity)-<percent>" }],
643
+ [/^shadow-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-shadow-opacity": handler.bracket.percent.cssvar(opacity) }), { autocomplete: "shadow-(op|opacity)-<percent>" }],
639
644
  ["shadow-inset", { "--un-shadow-inset": "inset" }]
640
645
  ];
641
646
 
@@ -767,4 +772,4 @@ function handleSkew([, d, b]) {
767
772
  }
768
773
  }
769
774
 
770
- export { userSelects as A, whitespaces as B, breaks as C, overflows as D, outline as E, appearance as F, orders as G, justifies as H, alignments as I, placements as J, insets as K, floats as L, zIndexes as M, boxSizing as N, transitions as O, transforms as P, willChange as Q, contains as R, transformBase as S, boxShadowsBase as T, ringBase as U, borderStyles as V, handlerBorderStyle as W, varEmpty as X, borders as a, bgColors as b, contentVisibility as c, displays as d, contents as e, fonts as f, textIndents as g, textOverflows as h, textDecorations as i, textStrokes as j, textShadows as k, textTransforms as l, textAligns as m, textColors as n, opacity as o, fontStyles as p, fontSmoothings as q, boxShadows as r, rings as s, tabSizes as t, positions as u, cursors as v, appearances as w, pointerEvents as x, resizes as y, verticalAligns as z };
775
+ export { userSelects as A, whitespaces as B, breaks as C, overflows as D, outline as E, appearance as F, orders as G, justifies as H, alignments as I, placements as J, flexGridJustifiesAlignments as K, insets as L, floats as M, zIndexes as N, boxSizing as O, transitions as P, transforms as Q, willChange as R, contains as S, transformBase as T, boxShadowsBase as U, ringBase as V, borderStyles as W, handlerBorderStyle as X, varEmpty as Y, borders as a, bgColors as b, contentVisibility as c, displays as d, contents as e, fonts as f, textIndents as g, textOverflows as h, textDecorations as i, textStrokes as j, textShadows as k, textTransforms as l, textAligns as m, textColors as n, opacity as o, fontStyles as p, fontSmoothings as q, boxShadows as r, rings as s, tabSizes as t, positions as u, cursors as v, appearances as w, pointerEvents as x, resizes as y, verticalAligns as z };
@@ -129,7 +129,7 @@ function handlerBorderColor([, a = "", c], { theme }) {
129
129
  }
130
130
  }
131
131
  function handlerBorderOpacity([, a = "", opacity]) {
132
- const v = colors.handler.bracket.percent(opacity);
132
+ const v = colors.handler.bracket.percent.cssvar(opacity);
133
133
  if (a in colors.directionMap && v != null)
134
134
  return colors.directionMap[a].map((i) => [`--un-border${i}-opacity`, v]);
135
135
  }
@@ -150,11 +150,11 @@ const textColors = [
150
150
  [/^(?:color|c)-(.+)$/, colors.colorResolver("color", "text"), { autocomplete: "(color|c)-$colors" }],
151
151
  [/^text-(.+)$/, colors.colorResolver("color", "text", (css) => !css.color?.toString().match(colors.numberWithUnitRE)), { autocomplete: "text-$colors" }],
152
152
  [/^(?:text|color|c)-(.+)$/, ([, v]) => colors.globalKeywords.includes(v) ? { color: v } : void 0, { autocomplete: `(text|color|c)-(${colors.globalKeywords.join("|")})` }],
153
- [/^(?:text|color|c)-op(?:acity)?-?(.+)$/, ([, opacity2]) => ({ "--un-text-opacity": colors.handler.bracket.percent(opacity2) }), { autocomplete: "(text|color|c)-(op|opacity)-<percent>" }]
153
+ [/^(?:text|color|c)-op(?:acity)?-?(.+)$/, ([, opacity2]) => ({ "--un-text-opacity": colors.handler.bracket.percent.cssvar(opacity2) }), { autocomplete: "(text|color|c)-(op|opacity)-<percent>" }]
154
154
  ];
155
155
  const bgColors = [
156
156
  [/^bg-(.+)$/, colors.colorResolver("background-color", "bg"), { autocomplete: "bg-$colors" }],
157
- [/^bg-op(?:acity)?-?(.+)$/, ([, opacity2]) => ({ "--un-bg-opacity": colors.handler.bracket.percent(opacity2) }), { autocomplete: "bg-(op|opacity)-<percent>" }]
157
+ [/^bg-op(?:acity)?-?(.+)$/, ([, opacity2]) => ({ "--un-bg-opacity": colors.handler.bracket.percent.cssvar(opacity2) }), { autocomplete: "bg-(op|opacity)-<percent>" }]
158
158
  ];
159
159
 
160
160
  const decorationStyles = ["solid", "double", "dotted", "dashed", "wavy", ...colors.globalKeywords];
@@ -171,7 +171,7 @@ const textDecorations = [
171
171
  };
172
172
  }
173
173
  }, { autocomplete: "(underline|decoration)-$colors" }],
174
- [/^(?:underline|decoration)-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-line-opacity": colors.handler.bracket.percent(opacity) }), { autocomplete: "(underline|decoration)-(op|opacity)-<percent>" }],
174
+ [/^(?:underline|decoration)-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-line-opacity": colors.handler.bracket.percent.cssvar(opacity) }), { autocomplete: "(underline|decoration)-(op|opacity)-<percent>" }],
175
175
  [/^(?:underline|decoration)-offset-(.+)$/, ([, s], { theme }) => ({ "text-underline-offset": theme.lineWidth?.[s] ?? colors.handler.auto.bracket.cssvar.global.px(s) }), { autocomplete: "(underline|decoration)-(offset)-<num>" }],
176
176
  ...decorationStyles.map((v) => [`underline-${v}`, { "text-decoration-style": v }]),
177
177
  ...decorationStyles.map((v) => [`decoration-${v}`, { "text-decoration-style": v }]),
@@ -320,7 +320,7 @@ const textIndents = [
320
320
  const textStrokes = [
321
321
  [/^text-stroke(?:-(.+))?$/, ([, s], { theme }) => ({ "-webkit-text-stroke-width": theme.textStrokeWidth?.[s || "DEFAULT"] || colors.handler.bracket.cssvar.px(s) }), { autocomplete: "text-stroke-$textStrokeWidth" }],
322
322
  [/^text-stroke-(.+)$/, colors.colorResolver("-webkit-text-stroke-color", "text-stroke"), { autocomplete: "text-stroke-$colors" }],
323
- [/^text-stroke-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-text-stroke-opacity": colors.handler.bracket.percent(opacity) }), { autocomplete: "text-stroke-(op|opacity)-<percent>" }]
323
+ [/^text-stroke-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-text-stroke-opacity": colors.handler.bracket.percent.cssvar(opacity) }), { autocomplete: "text-stroke-(op|opacity)-<percent>" }]
324
324
  ];
325
325
  const textShadows = [
326
326
  [/^text-shadow(?:-(.+))?$/, ([, s], { theme }) => {
@@ -334,7 +334,7 @@ const textShadows = [
334
334
  return { "text-shadow": colors.handler.bracket.cssvar.global(s) };
335
335
  }, { autocomplete: "text-shadow-$textShadow" }],
336
336
  [/^text-shadow-color-(.+)$/, colors.colorResolver("--un-text-shadow-color", "text-shadow"), { autocomplete: "text-shadow-color-$colors" }],
337
- [/^text-shadow-color-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-text-shadow-opacity": colors.handler.bracket.percent(opacity) }), { autocomplete: "text-shadow-color-(op|opacity)-<percent>" }]
337
+ [/^text-shadow-color-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-text-shadow-opacity": colors.handler.bracket.percent.cssvar(opacity) }), { autocomplete: "text-shadow-color-(op|opacity)-<percent>" }]
338
338
  ];
339
339
 
340
340
  const overflowValues = [
@@ -425,6 +425,10 @@ const placements = [
425
425
  ["place-self-stretch", { "place-self": "stretch" }],
426
426
  ...colors.makeGlobalStaticRules("place-self")
427
427
  ];
428
+ const flexGridJustifiesAlignments = [...justifies, ...alignments].flatMap(([k, v]) => [
429
+ [`flex-${k}`, v],
430
+ [`grid-${k}`, v]
431
+ ]);
428
432
  function handleInsetValue(v, { theme }) {
429
433
  return theme.spacing?.[v] ?? colors.handler.bracket.cssvar.global.auto.fraction.rem(v);
430
434
  }
@@ -554,6 +558,7 @@ const breaks = [
554
558
  ];
555
559
  const textOverflows = [
556
560
  ["truncate", { "overflow": "hidden", "text-overflow": "ellipsis", "white-space": "nowrap" }],
561
+ ["text-truncate", { "overflow": "hidden", "text-overflow": "ellipsis", "white-space": "nowrap" }],
557
562
  ["text-ellipsis", { "text-overflow": "ellipsis" }],
558
563
  ["text-clip", { "text-overflow": "clip" }]
559
564
  ];
@@ -611,9 +616,9 @@ const rings = [
611
616
  ["ring-offset", { "--un-ring-offset-width": "1px" }],
612
617
  [/^ring-offset-(?:width-|size-)?(.+)$/, ([, d], { theme }) => ({ "--un-ring-offset-width": theme.lineWidth?.[d] ?? colors.handler.bracket.cssvar.px(d) }), { autocomplete: "ring-offset-(width|size)-$lineWidth" }],
613
618
  [/^ring-(.+)$/, colors.colorResolver("--un-ring-color", "ring"), { autocomplete: "ring-$colors" }],
614
- [/^ring-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-ring-opacity": colors.handler.bracket.percent(opacity) }), { autocomplete: "ring-(op|opacity)-<percent>" }],
619
+ [/^ring-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-ring-opacity": colors.handler.bracket.percent.cssvar(opacity) }), { autocomplete: "ring-(op|opacity)-<percent>" }],
615
620
  [/^ring-offset-(.+)$/, colors.colorResolver("--un-ring-offset-color", "ring-offset"), { autocomplete: "ring-offset-$colors" }],
616
- [/^ring-offset-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-ring-offset-opacity": colors.handler.bracket.percent(opacity) }), { autocomplete: "ring-offset-(op|opacity)-<percent>" }],
621
+ [/^ring-offset-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-ring-offset-opacity": colors.handler.bracket.percent.cssvar(opacity) }), { autocomplete: "ring-offset-(op|opacity)-<percent>" }],
617
622
  ["ring-inset", { "--un-ring-inset": "inset" }]
618
623
  ];
619
624
 
@@ -637,7 +642,7 @@ const boxShadows = [
637
642
  }
638
643
  return colors.colorResolver("--un-shadow-color", "shadow")(match, context);
639
644
  }, { autocomplete: ["shadow-$colors", "shadow-$boxShadow"] }],
640
- [/^shadow-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-shadow-opacity": colors.handler.bracket.percent(opacity) }), { autocomplete: "shadow-(op|opacity)-<percent>" }],
645
+ [/^shadow-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-shadow-opacity": colors.handler.bracket.percent.cssvar(opacity) }), { autocomplete: "shadow-(op|opacity)-<percent>" }],
641
646
  ["shadow-inset", { "--un-shadow-inset": "inset" }]
642
647
  ];
643
648
 
@@ -784,6 +789,7 @@ exports.contentVisibility = contentVisibility;
784
789
  exports.contents = contents;
785
790
  exports.cursors = cursors;
786
791
  exports.displays = displays;
792
+ exports.flexGridJustifiesAlignments = flexGridJustifiesAlignments;
787
793
  exports.floats = floats;
788
794
  exports.fontSmoothings = fontSmoothings;
789
795
  exports.fontStyles = fontStyles;
@@ -1,5 +1,5 @@
1
1
  import { c as colors } from './preset-mini.74b45c11.mjs';
2
- import { S as transformBase, T as boxShadowsBase, U as ringBase } from './preset-mini.7cde01b2.mjs';
2
+ import { T as transformBase, U as boxShadowsBase, V as ringBase } from './preset-mini.46b4a7e7.mjs';
3
3
  import '@unocss/core';
4
4
  import './preset-mini.acf4efb2.mjs';
5
5
 
@@ -1,4 +1,4 @@
1
- import { d as displays, o as opacity, b as bgColors, a as borders, c as contentVisibility, e as contents, f as fonts, t as tabSizes, g as textIndents, h as textOverflows, i as textDecorations, j as textStrokes, k as textShadows, l as textTransforms, m as textAligns, n as textColors, p as fontStyles, q as fontSmoothings, r as boxShadows, s as rings, u as positions, v as cursors, w as appearances, x as pointerEvents, y as resizes, z as verticalAligns, A as userSelects, B as whitespaces, C as breaks, D as overflows, E as outline, F as appearance, G as orders, H as justifies, I as alignments, J as placements, K as insets, L as floats, M as zIndexes, N as boxSizing, O as transitions, P as transforms, Q as willChange, R as contains } from './preset-mini.7cde01b2.mjs';
1
+ import { d as displays, o as opacity, b as bgColors, a as borders, c as contentVisibility, e as contents, f as fonts, t as tabSizes, g as textIndents, h as textOverflows, i as textDecorations, j as textStrokes, k as textShadows, l as textTransforms, m as textAligns, n as textColors, p as fontStyles, q as fontSmoothings, r as boxShadows, s as rings, u as positions, v as cursors, w as appearances, x as pointerEvents, y as resizes, z as verticalAligns, A as userSelects, B as whitespaces, C as breaks, D as overflows, E as outline, F as appearance, G as orders, H as justifies, I as alignments, J as placements, K as flexGridJustifiesAlignments, L as insets, M as floats, N as zIndexes, O as boxSizing, P as transitions, Q as transforms, R as willChange, S as contains } from './preset-mini.46b4a7e7.mjs';
2
2
  import { h as handler, r as resolveVerticalBreakpoints, l as resolveBreakpoints, o as directionSize, c as colorResolver } from './preset-mini.acf4efb2.mjs';
3
3
  import { warnOnce } from '@unocss/core';
4
4
 
@@ -231,13 +231,13 @@ ${constructCSS({ animation: "__un_qm 0.5s ease-in-out alternate infinite" })}`;
231
231
 
232
232
  const svgUtilities = [
233
233
  [/^fill-(.+)$/, colorResolver("fill", "fill"), { autocomplete: "fill-$colors" }],
234
- [/^fill-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-fill-opacity": handler.bracket.percent(opacity) }), { autocomplete: "fill-(op|opacity)-<percent>" }],
234
+ [/^fill-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-fill-opacity": handler.bracket.percent.cssvar(opacity) }), { autocomplete: "fill-(op|opacity)-<percent>" }],
235
235
  ["fill-none", { fill: "none" }],
236
236
  [/^stroke-(?:width-|size-)?(.+)$/, ([, s], { theme }) => ({ "stroke-width": theme.lineWidth?.[s] ?? handler.bracket.cssvar.fraction.px.number(s) }), { autocomplete: ["stroke-width-$lineWidth", "stroke-size-$lineWidth"] }],
237
237
  [/^stroke-dash-(.+)$/, ([, s]) => ({ "stroke-dasharray": handler.bracket.cssvar.number(s) }), { autocomplete: "stroke-dash-<num>" }],
238
238
  [/^stroke-offset-(.+)$/, ([, s], { theme }) => ({ "stroke-dashoffset": theme.lineWidth?.[s] ?? handler.bracket.cssvar.px.numberWithUnit(s) }), { autocomplete: "stroke-offset-$lineWidth" }],
239
239
  [/^stroke-(.+)$/, colorResolver("stroke", "stroke"), { autocomplete: "stroke-$colors" }],
240
- [/^stroke-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-stroke-opacity": handler.bracket.percent(opacity) }), { autocomplete: "stroke-(op|opacity)-<percent>" }],
240
+ [/^stroke-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-stroke-opacity": handler.bracket.percent.cssvar(opacity) }), { autocomplete: "stroke-(op|opacity)-<percent>" }],
241
241
  ["stroke-cap-square", { "stroke-linecap": "square" }],
242
242
  ["stroke-cap-round", { "stroke-linecap": "round" }],
243
243
  ["stroke-cap-auto", { "stroke-linecap": "butt" }],
@@ -296,6 +296,7 @@ const rules = [
296
296
  justifies,
297
297
  alignments,
298
298
  placements,
299
+ flexGridJustifiesAlignments,
299
300
  insets,
300
301
  floats,
301
302
  zIndexes,
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const transform = require('./preset-mini.ec9a9ad9.cjs');
3
+ const transform = require('./preset-mini.a6e5a967.cjs');
4
4
  const colors = require('./preset-mini.d7d4b4ea.cjs');
5
5
  const core = require('@unocss/core');
6
6
 
@@ -233,13 +233,13 @@ ${constructCSS({ animation: "__un_qm 0.5s ease-in-out alternate infinite" })}`;
233
233
 
234
234
  const svgUtilities = [
235
235
  [/^fill-(.+)$/, colors.colorResolver("fill", "fill"), { autocomplete: "fill-$colors" }],
236
- [/^fill-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-fill-opacity": colors.handler.bracket.percent(opacity) }), { autocomplete: "fill-(op|opacity)-<percent>" }],
236
+ [/^fill-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-fill-opacity": colors.handler.bracket.percent.cssvar(opacity) }), { autocomplete: "fill-(op|opacity)-<percent>" }],
237
237
  ["fill-none", { fill: "none" }],
238
238
  [/^stroke-(?:width-|size-)?(.+)$/, ([, s], { theme }) => ({ "stroke-width": theme.lineWidth?.[s] ?? colors.handler.bracket.cssvar.fraction.px.number(s) }), { autocomplete: ["stroke-width-$lineWidth", "stroke-size-$lineWidth"] }],
239
239
  [/^stroke-dash-(.+)$/, ([, s]) => ({ "stroke-dasharray": colors.handler.bracket.cssvar.number(s) }), { autocomplete: "stroke-dash-<num>" }],
240
240
  [/^stroke-offset-(.+)$/, ([, s], { theme }) => ({ "stroke-dashoffset": theme.lineWidth?.[s] ?? colors.handler.bracket.cssvar.px.numberWithUnit(s) }), { autocomplete: "stroke-offset-$lineWidth" }],
241
241
  [/^stroke-(.+)$/, colors.colorResolver("stroke", "stroke"), { autocomplete: "stroke-$colors" }],
242
- [/^stroke-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-stroke-opacity": colors.handler.bracket.percent(opacity) }), { autocomplete: "stroke-(op|opacity)-<percent>" }],
242
+ [/^stroke-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-stroke-opacity": colors.handler.bracket.percent.cssvar(opacity) }), { autocomplete: "stroke-(op|opacity)-<percent>" }],
243
243
  ["stroke-cap-square", { "stroke-linecap": "square" }],
244
244
  ["stroke-cap-round", { "stroke-linecap": "round" }],
245
245
  ["stroke-cap-auto", { "stroke-linecap": "butt" }],
@@ -298,6 +298,7 @@ const rules = [
298
298
  transform.justifies,
299
299
  transform.alignments,
300
300
  transform.placements,
301
+ transform.flexGridJustifiesAlignments,
301
302
  transform.insets,
302
303
  transform.floats,
303
304
  transform.zIndexes,
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.bb7dc365.cjs');
6
- const _default = require('./shared/preset-mini.5e320038.cjs');
7
- require('./shared/preset-mini.ec9a9ad9.cjs');
6
+ const _default = require('./shared/preset-mini.00f6869f.cjs');
7
+ require('./shared/preset-mini.a6e5a967.cjs');
8
8
  require('./shared/preset-mini.d7d4b4ea.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.74b45c11.mjs';
2
- export { q as baseSize, b as blur, m as borderRadius, n as boxShadow, i as breakpoints, A as containers, d as dropShadow, k as duration, o as easing, f as fontFamily, a as fontSize, y as height, h as letterSpacing, l as lineHeight, j as lineWidth, z as maxHeight, x as maxWidth, p as preflightBase, r as ringWidth, s as spacing, c as textIndent, g as textShadow, e as textStrokeWidth, t as theme, v as verticalBreakpoints, u as width, w as wordSpacing } from './shared/preset-mini.ea93a64e.mjs';
3
- import './shared/preset-mini.7cde01b2.mjs';
2
+ export { q as baseSize, b as blur, m as borderRadius, n as boxShadow, i as breakpoints, A as containers, d as dropShadow, k as duration, o as easing, f as fontFamily, a as fontSize, y as height, h as letterSpacing, l as lineHeight, j as lineWidth, z as maxHeight, x as maxWidth, p as preflightBase, r as ringWidth, s as spacing, c as textIndent, g as textShadow, e as textStrokeWidth, t as theme, v as verticalBreakpoints, u as width, w as wordSpacing } from './shared/preset-mini.a749a848.mjs';
3
+ import './shared/preset-mini.46b4a7e7.mjs';
4
4
  import './shared/preset-mini.acf4efb2.mjs';
5
5
  import '@unocss/core';
@@ -1,4 +1,4 @@
1
- import { DynamicMatcher, ParsedColorValue, CSSObject, VariantContext, Rule } from '@unocss/core';
1
+ import { DynamicMatcher, ParsedColorValue, CSSObject, VariantContext, StaticRule } from '@unocss/core';
2
2
  import { T as Theme } from './types-f73ecdfe.js';
3
3
 
4
4
  declare const CONTROL_MINI_NO_NEGATIVE = "$$mini-no-negative";
@@ -59,7 +59,7 @@ declare function colorableShadows(shadows: string | string[], colorVar: string):
59
59
  declare function hasParseableColor(color: string | undefined, theme: Theme): boolean;
60
60
  declare function resolveBreakpoints({ theme, generator }: Readonly<VariantContext<Theme>>): Record<string, string> | undefined;
61
61
  declare function resolveVerticalBreakpoints({ theme, generator }: Readonly<VariantContext<Theme>>): Record<string, string> | undefined;
62
- declare function makeGlobalStaticRules(prefix: string, property?: string): Rule<{}>[];
62
+ declare function makeGlobalStaticRules(prefix: string, property?: string): StaticRule[];
63
63
  declare function getBracket(str: string, open: string, close: string): string[] | undefined;
64
64
  declare function getComponent(str: string, open: string, close: string, separators: string | string[]): string[] | undefined;
65
65
  declare function getComponents(str: string, separators: string | string[], limit?: number): string[] | undefined;
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, s as splitShorthand } from './utilities-a87209ad.js';
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-73daa267.js';
4
4
  import './types-f73ecdfe.js';
5
5
 
6
6
  declare function hex2rgba(hex?: string): RGBAColorValue | undefined;
@@ -3,7 +3,7 @@ import { PresetMiniOptions } from './index.js';
3
3
  import { T as Theme } from './types-f73ecdfe.js';
4
4
  import './colors-e683aa85.js';
5
5
  import './default-d9218dd5.js';
6
- import './utilities-a87209ad.js';
6
+ import './utilities-73daa267.js';
7
7
 
8
8
  declare const variantAria: VariantObject;
9
9
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unocss/preset-mini",
3
- "version": "0.51.4",
3
+ "version": "0.51.5",
4
4
  "description": "The minimal preset for UnoCSS",
5
5
  "author": "Anthony Fu <anthonyfu117@hotmail.com>",
6
6
  "license": "MIT",
@@ -61,8 +61,8 @@
61
61
  "*.css"
62
62
  ],
63
63
  "dependencies": {
64
- "@unocss/core": "0.51.4",
65
- "@unocss/extractor-arbitrary-variants": "0.51.4"
64
+ "@unocss/core": "0.51.5",
65
+ "@unocss/extractor-arbitrary-variants": "0.51.5"
66
66
  },
67
67
  "scripts": {
68
68
  "build": "unbuild",