@unocss/preset-mini 0.46.5 → 0.47.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -3,11 +3,11 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const core = require('@unocss/core');
6
- require('./shared/preset-mini.09ec9c56.cjs');
6
+ require('./shared/preset-mini.93f934d2.cjs');
7
7
  const colors$1 = require('./shared/preset-mini.b1936363.cjs');
8
- const _default$1 = require('./shared/preset-mini.4ec9b63c.cjs');
8
+ const _default$1 = require('./shared/preset-mini.152190e6.cjs');
9
9
  const colors = require('./shared/preset-mini.30606736.cjs');
10
- const _default = require('./shared/preset-mini.6de47c6f.cjs');
10
+ const _default = require('./shared/preset-mini.aa0d829d.cjs');
11
11
  const _default$2 = require('./shared/preset-mini.c106b68c.cjs');
12
12
  require('./shared/preset-mini.fbe02827.cjs');
13
13
 
package/dist/index.mjs CHANGED
@@ -1,10 +1,10 @@
1
1
  import { entriesToCss, toArray } from '@unocss/core';
2
- import './shared/preset-mini.489445bc.mjs';
2
+ import './shared/preset-mini.0dd71da8.mjs';
3
3
  export { p as parseColor } from './shared/preset-mini.690517b1.mjs';
4
- import { r as rules } from './shared/preset-mini.6616d61c.mjs';
4
+ import { r as rules } from './shared/preset-mini.71bf58e8.mjs';
5
5
  export { c as colors } from './shared/preset-mini.65ac75be.mjs';
6
- import { t as theme } from './shared/preset-mini.2aa41602.mjs';
7
- export { t as theme } from './shared/preset-mini.2aa41602.mjs';
6
+ import { t as theme } from './shared/preset-mini.3aa2cc9c.mjs';
7
+ export { t as theme } from './shared/preset-mini.3aa2cc9c.mjs';
8
8
  import { v as variants } from './shared/preset-mini.fef10425.mjs';
9
9
  import './shared/preset-mini.74d943b2.mjs';
10
10
 
package/dist/rules.cjs CHANGED
@@ -2,8 +2,8 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const decoration = require('./shared/preset-mini.09ec9c56.cjs');
6
- const _default = require('./shared/preset-mini.4ec9b63c.cjs');
5
+ const decoration = require('./shared/preset-mini.93f934d2.cjs');
6
+ const _default = require('./shared/preset-mini.152190e6.cjs');
7
7
  require('./shared/preset-mini.b1936363.cjs');
8
8
  require('@unocss/core');
9
9
 
@@ -18,6 +18,7 @@ exports.boxShadows = decoration.boxShadows;
18
18
  exports.boxShadowsBase = decoration.boxShadowsBase;
19
19
  exports.boxSizing = decoration.boxSizing;
20
20
  exports.breaks = decoration.breaks;
21
+ exports.contains = decoration.contains;
21
22
  exports.contentVisibility = decoration.contentVisibility;
22
23
  exports.contents = decoration.contents;
23
24
  exports.cursors = decoration.cursors;
package/dist/rules.d.ts CHANGED
@@ -79,6 +79,7 @@ declare const varEmpty = " ";
79
79
  declare const displays: Rule[];
80
80
  declare const appearances: Rule[];
81
81
  declare const cursors: Rule[];
82
+ declare const contains: Rule[];
82
83
  declare const pointerEvents: Rule[];
83
84
  declare const resizes: Rule[];
84
85
  declare const userSelects: Rule[];
@@ -122,4 +123,4 @@ declare const cssProperty: Rule[];
122
123
 
123
124
  declare const textDecorations: Rule<Theme>[];
124
125
 
125
- export { alignments, appearance, appearances, aspectRatio, bgColors, borderStyles, borders, boxShadows, boxShadowsBase, boxSizing, breaks, containerParent, 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 };
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 };
package/dist/rules.mjs CHANGED
@@ -1,4 +1,4 @@
1
- export { F as alignments, C as appearance, s as appearances, R as borderStyles, b as borders, o as boxShadows, P as boxShadowsBase, K as boxSizing, z as breaks, c as contentVisibility, a as contents, q as cursors, d as displays, I as floats, n as fontSmoothings, m as fontStyles, f as fonts, S as handlerBorderStyle, H as insets, E as justifies, D as orders, B as outline, A as overflows, G as placements, u as pointerEvents, p as positions, v as resizes, Q as ringBase, r as rings, t as tabSizes, l as textAligns, h as textDecorations, e as textIndents, g as textOverflows, j as textShadows, i as textStrokes, k as textTransforms, O as transformBase, M as transforms, L as transitions, x as userSelects, T as varEmpty, w as verticalAligns, y as whitespaces, N as willChange, J as zIndexes } from './shared/preset-mini.489445bc.mjs';
2
- export { d as aspectRatio, b as bgColors, c as containerParent, i as cssProperty, h as cssVariables, f as flex, g as gaps, a as grids, m as margins, o as opacity, p as paddings, q as questionMark, r as rules, s as sizes, e as svgUtilities, t as textColors } from './shared/preset-mini.6616d61c.mjs';
1
+ export { F as alignments, C as appearance, s as appearances, S as borderStyles, b as borders, o as boxShadows, Q as boxShadowsBase, K as boxSizing, z as breaks, O as contains, c as contentVisibility, a as contents, q as cursors, d as displays, I as floats, n as fontSmoothings, m as fontStyles, f as fonts, T as handlerBorderStyle, H as insets, E as justifies, D as orders, B as outline, A as overflows, G as placements, u as pointerEvents, p as positions, v as resizes, R as ringBase, r as rings, t as tabSizes, l as textAligns, h as textDecorations, e as textIndents, g as textOverflows, j as textShadows, i as textStrokes, k as textTransforms, P as transformBase, M as transforms, L as transitions, x as userSelects, U as varEmpty, w as verticalAligns, y as whitespaces, N as willChange, J as zIndexes } from './shared/preset-mini.0dd71da8.mjs';
2
+ export { d as aspectRatio, b as bgColors, c as containerParent, i as cssProperty, h as cssVariables, f as flex, g as gaps, a as grids, m as margins, o as opacity, p as paddings, q as questionMark, r as rules, s as sizes, e as svgUtilities, t as textColors } from './shared/preset-mini.71bf58e8.mjs';
3
3
  import './shared/preset-mini.690517b1.mjs';
4
4
  import '@unocss/core';
@@ -429,6 +429,7 @@ const boxSizing = [
429
429
  ];
430
430
 
431
431
  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"];
432
+ const containValues = ["none", "strict", "content", "size", "inline-size", "layout", "style", "paint"];
432
433
  const varEmpty = " ";
433
434
  const displays = [
434
435
  ["inline", { display: "inline" }],
@@ -451,6 +452,16 @@ const cursors = [
451
452
  [/^cursor-(.+)$/, ([, c]) => ({ cursor: handler.bracket.cssvar.global(c) })],
452
453
  ...cursorValues.map((v) => [`cursor-${v}`, { cursor: v }])
453
454
  ];
455
+ const contains = [
456
+ [/^contain-(.*)$/, ([, d]) => {
457
+ if (handler.bracket(d) != null) {
458
+ return {
459
+ contain: handler.bracket(d).split(" ").map((e) => handler.cssvar.fraction(e) ?? e).join(" ")
460
+ };
461
+ }
462
+ return containValues.includes(d) ? { contain: d } : void 0;
463
+ }]
464
+ ];
454
465
  const pointerEvents = [
455
466
  ["pointer-events-auto", { "pointer-events": "auto" }],
456
467
  ["pointer-events-none", { "pointer-events": "none" }],
@@ -733,4 +744,4 @@ const textDecorations = [
733
744
  ["decoration-none", { "text-decoration": "none" }]
734
745
  ];
735
746
 
736
- export { overflows as A, outline as B, appearance as C, orders as D, justifies as E, alignments as F, placements as G, insets as H, floats as I, zIndexes as J, boxSizing as K, transitions as L, transforms as M, willChange as N, transformBase as O, boxShadowsBase as P, ringBase as Q, borderStyles as R, handlerBorderStyle as S, varEmpty as T, contents as a, borders as b, contentVisibility as c, displays as d, textIndents as e, fonts as f, textOverflows as g, textDecorations as h, textStrokes as i, textShadows as j, textTransforms as k, textAligns as l, fontStyles as m, fontSmoothings as n, boxShadows as o, positions as p, cursors as q, rings as r, appearances as s, tabSizes as t, pointerEvents as u, resizes as v, verticalAligns as w, userSelects as x, whitespaces as y, breaks as z };
747
+ export { overflows as A, outline as B, appearance as C, orders as D, justifies as E, alignments as F, placements as G, insets as H, floats as I, zIndexes as J, boxSizing as K, transitions as L, transforms as M, willChange as N, contains as O, transformBase as P, boxShadowsBase as Q, ringBase as R, borderStyles as S, handlerBorderStyle as T, varEmpty as U, contents as a, borders as b, contentVisibility as c, displays as d, textIndents as e, fonts as f, textOverflows as g, textDecorations as h, textStrokes as i, textShadows as j, textTransforms as k, textAligns as l, fontStyles as m, fontSmoothings as n, boxShadows as o, positions as p, cursors as q, rings as r, appearances as s, tabSizes as t, pointerEvents as u, resizes as v, verticalAligns as w, userSelects as x, whitespaces as y, breaks as z };
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const decoration = require('./preset-mini.09ec9c56.cjs');
3
+ const decoration = require('./preset-mini.93f934d2.cjs');
4
4
  const colors = require('./preset-mini.b1936363.cjs');
5
5
  const core = require('@unocss/core');
6
6
 
@@ -106,6 +106,11 @@ const grids = [
106
106
  })],
107
107
  [/^grid-(rows|cols)-minmax-([\w.-]+)$/, ([, c, d]) => ({ [`grid-template-${rowCol(c)}`]: `repeat(auto-fill,minmax(${d},1fr))` })],
108
108
  [/^grid-(rows|cols)-(\d+)$/, ([, c, d]) => ({ [`grid-template-${rowCol(c)}`]: `repeat(${d},minmax(0,1fr))` }), { autocomplete: ["grid-(rows|cols)-<num>", "grid-(rows|cols)-none"] }],
109
+ [/^grid-area(s)?-(.+)$/, ([, s, v]) => {
110
+ if (s != null)
111
+ return { "grid-template-areas": colors.handler.cssvar(v) ?? v.split("-").map((s2) => `"${colors.handler.bracket(s2)}"`).join(" ") };
112
+ return { "grid-area": colors.handler.bracket.cssvar(v) };
113
+ }],
109
114
  ["grid-rows-none", { "grid-template-rows": "none" }],
110
115
  ["grid-cols-none", { "grid-template-columns": "none" }]
111
116
  ];
@@ -209,8 +214,20 @@ const cssVariables = [
209
214
  }]
210
215
  ];
211
216
  const cssProperty = [
212
- [/^\[([\w_-]+):([^'"]+)\]$/, ([, prop, value]) => ({ [prop]: colors.handler.bracket(`[${value}]`) })]
217
+ [/^\[(--(\w|\\\W)+|[\w-]+):(.+)\]$/, ([match, prop, , value]) => {
218
+ if (!isURI(match.slice(1, -1)))
219
+ return { [prop]: colors.handler.bracket(`[${value}]`) };
220
+ }]
213
221
  ];
222
+ function isURI(declaration) {
223
+ if (!declaration.includes("://"))
224
+ return false;
225
+ try {
226
+ return new URL(declaration).host !== "";
227
+ } catch (err) {
228
+ return false;
229
+ }
230
+ }
214
231
 
215
232
  const questionMark = [
216
233
  [
@@ -298,6 +315,7 @@ const rules = [
298
315
  decoration.transforms,
299
316
  decoration.willChange,
300
317
  containerParent,
318
+ decoration.contains,
301
319
  questionMark
302
320
  ].flat(1);
303
321
 
@@ -1,5 +1,5 @@
1
1
  import { c as colors } from './preset-mini.65ac75be.mjs';
2
- import { O as transformBase, P as boxShadowsBase, Q as ringBase } from './preset-mini.489445bc.mjs';
2
+ import { P as transformBase, Q as boxShadowsBase, R as ringBase } from './preset-mini.0dd71da8.mjs';
3
3
  import './preset-mini.690517b1.mjs';
4
4
  import '@unocss/core';
5
5
 
@@ -1,4 +1,4 @@
1
- import { d as displays, b as borders, c as contentVisibility, a as contents, f as fonts, t as tabSizes, e as textIndents, g as textOverflows, h as textDecorations, i as textStrokes, j as textShadows, k as textTransforms, l as textAligns, m as fontStyles, n as fontSmoothings, o as boxShadows, r as rings, p as positions, q as cursors, s as appearances, u as pointerEvents, v as resizes, w as verticalAligns, x as userSelects, y as whitespaces, z as breaks, A as overflows, B as outline, C as appearance, D as orders, E as justifies, F as alignments, G as placements, H as insets, I as floats, J as zIndexes, K as boxSizing, L as transitions, M as transforms, N as willChange } from './preset-mini.489445bc.mjs';
1
+ import { d as displays, b as borders, c as contentVisibility, a as contents, f as fonts, t as tabSizes, e as textIndents, g as textOverflows, h as textDecorations, i as textStrokes, j as textShadows, k as textTransforms, l as textAligns, m as fontStyles, n as fontSmoothings, o as boxShadows, r as rings, p as positions, q as cursors, s as appearances, u as pointerEvents, v as resizes, w as verticalAligns, x as userSelects, y as whitespaces, z as breaks, A as overflows, B as outline, C as appearance, D as orders, E as justifies, F as alignments, G as placements, H as insets, I as floats, J as zIndexes, K as boxSizing, L as transitions, M as transforms, N as willChange, O as contains } from './preset-mini.0dd71da8.mjs';
2
2
  import { h as handler, c as colorResolver, n as numberWithUnitRE, r as resolveVerticalBreakpoints, l as resolveBreakpoints, o as directionSize } from './preset-mini.690517b1.mjs';
3
3
  import { warnOnce } from '@unocss/core';
4
4
 
@@ -104,6 +104,11 @@ const grids = [
104
104
  })],
105
105
  [/^grid-(rows|cols)-minmax-([\w.-]+)$/, ([, c, d]) => ({ [`grid-template-${rowCol(c)}`]: `repeat(auto-fill,minmax(${d},1fr))` })],
106
106
  [/^grid-(rows|cols)-(\d+)$/, ([, c, d]) => ({ [`grid-template-${rowCol(c)}`]: `repeat(${d},minmax(0,1fr))` }), { autocomplete: ["grid-(rows|cols)-<num>", "grid-(rows|cols)-none"] }],
107
+ [/^grid-area(s)?-(.+)$/, ([, s, v]) => {
108
+ if (s != null)
109
+ return { "grid-template-areas": handler.cssvar(v) ?? v.split("-").map((s2) => `"${handler.bracket(s2)}"`).join(" ") };
110
+ return { "grid-area": handler.bracket.cssvar(v) };
111
+ }],
107
112
  ["grid-rows-none", { "grid-template-rows": "none" }],
108
113
  ["grid-cols-none", { "grid-template-columns": "none" }]
109
114
  ];
@@ -207,8 +212,20 @@ const cssVariables = [
207
212
  }]
208
213
  ];
209
214
  const cssProperty = [
210
- [/^\[([\w_-]+):([^'"]+)\]$/, ([, prop, value]) => ({ [prop]: handler.bracket(`[${value}]`) })]
215
+ [/^\[(--(\w|\\\W)+|[\w-]+):(.+)\]$/, ([match, prop, , value]) => {
216
+ if (!isURI(match.slice(1, -1)))
217
+ return { [prop]: handler.bracket(`[${value}]`) };
218
+ }]
211
219
  ];
220
+ function isURI(declaration) {
221
+ if (!declaration.includes("://"))
222
+ return false;
223
+ try {
224
+ return new URL(declaration).host !== "";
225
+ } catch (err) {
226
+ return false;
227
+ }
228
+ }
212
229
 
213
230
  const questionMark = [
214
231
  [
@@ -296,6 +313,7 @@ const rules = [
296
313
  transforms,
297
314
  willChange,
298
315
  containerParent,
316
+ contains,
299
317
  questionMark
300
318
  ].flat(1);
301
319
 
@@ -431,6 +431,7 @@ const boxSizing = [
431
431
  ];
432
432
 
433
433
  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"];
434
+ const containValues = ["none", "strict", "content", "size", "inline-size", "layout", "style", "paint"];
434
435
  const varEmpty = " ";
435
436
  const displays = [
436
437
  ["inline", { display: "inline" }],
@@ -453,6 +454,16 @@ const cursors = [
453
454
  [/^cursor-(.+)$/, ([, c]) => ({ cursor: colors.handler.bracket.cssvar.global(c) })],
454
455
  ...cursorValues.map((v) => [`cursor-${v}`, { cursor: v }])
455
456
  ];
457
+ const contains = [
458
+ [/^contain-(.*)$/, ([, d]) => {
459
+ if (colors.handler.bracket(d) != null) {
460
+ return {
461
+ contain: colors.handler.bracket(d).split(" ").map((e) => colors.handler.cssvar.fraction(e) ?? e).join(" ")
462
+ };
463
+ }
464
+ return containValues.includes(d) ? { contain: d } : void 0;
465
+ }]
466
+ ];
456
467
  const pointerEvents = [
457
468
  ["pointer-events-auto", { "pointer-events": "auto" }],
458
469
  ["pointer-events-none", { "pointer-events": "none" }],
@@ -744,6 +755,7 @@ exports.boxShadows = boxShadows;
744
755
  exports.boxShadowsBase = boxShadowsBase;
745
756
  exports.boxSizing = boxSizing;
746
757
  exports.breaks = breaks;
758
+ exports.contains = contains;
747
759
  exports.contentVisibility = contentVisibility;
748
760
  exports.contents = contents;
749
761
  exports.cursors = cursors;
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  const colors = require('./preset-mini.30606736.cjs');
4
- const decoration = require('./preset-mini.09ec9c56.cjs');
4
+ const decoration = require('./preset-mini.93f934d2.cjs');
5
5
  require('./preset-mini.b1936363.cjs');
6
6
  require('@unocss/core');
7
7
 
package/dist/theme.cjs CHANGED
@@ -3,8 +3,8 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const colors = require('./shared/preset-mini.30606736.cjs');
6
- const _default = require('./shared/preset-mini.6de47c6f.cjs');
7
- require('./shared/preset-mini.09ec9c56.cjs');
6
+ const _default = require('./shared/preset-mini.aa0d829d.cjs');
7
+ require('./shared/preset-mini.93f934d2.cjs');
8
8
  require('./shared/preset-mini.b1936363.cjs');
9
9
  require('@unocss/core');
10
10
 
package/dist/theme.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  export { c as colors } from './shared/preset-mini.65ac75be.mjs';
2
- export { p as baseSize, b as blur, m as borderRadius, n as boxShadow, i as breakpoints, z as containers, d as dropShadow, k as duration, o as easing, f as fontFamily, a as fontSize, x as height, h as letterSpacing, l as lineHeight, j as lineWidth, y as maxHeight, u as maxWidth, A as preflightBase, r as ringWidth, s as spacing, c as textIndent, g as textShadow, e as textStrokeWidth, t as theme, v as verticalBreakpoints, q as width, w as wordSpacing } from './shared/preset-mini.2aa41602.mjs';
3
- import './shared/preset-mini.489445bc.mjs';
2
+ export { p as baseSize, b as blur, m as borderRadius, n as boxShadow, i as breakpoints, z as containers, d as dropShadow, k as duration, o as easing, f as fontFamily, a as fontSize, x as height, h as letterSpacing, l as lineHeight, j as lineWidth, y as maxHeight, u as maxWidth, A as preflightBase, r as ringWidth, s as spacing, c as textIndent, g as textShadow, e as textStrokeWidth, t as theme, v as verticalBreakpoints, q as width, w as wordSpacing } from './shared/preset-mini.3aa2cc9c.mjs';
3
+ import './shared/preset-mini.0dd71da8.mjs';
4
4
  import './shared/preset-mini.690517b1.mjs';
5
5
  import '@unocss/core';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unocss/preset-mini",
3
- "version": "0.46.5",
3
+ "version": "0.47.0",
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.46.5"
64
+ "@unocss/core": "0.47.0"
65
65
  },
66
66
  "scripts": {
67
67
  "build": "unbuild",