@unocss/preset-mini 66.6.6 → 66.6.8
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/chunk-D1SwGrFN.mjs +27 -0
- package/dist/{colors-Cxq9P2g9.mjs → colors-BSuZg9eF.mjs} +1 -2
- package/dist/colors.d.mts +1 -1
- package/dist/colors.mjs +2 -3
- package/dist/{index-CnsmLem5.d.mts → index-Df-rxaWU.d.mts} +3 -3
- package/dist/index.d.mts +4 -4
- package/dist/index.mjs +9 -14
- package/dist/rules.d.mts +1 -2
- package/dist/rules.mjs +1675 -3
- package/dist/{theme-B0WWWQYh.mjs → theme-CnGJp5L0.mjs} +35 -47
- package/dist/{theme-5nLH7UVx.d.mts → theme-DmprjxKd.d.mts} +3 -3
- package/dist/theme.d.mts +2 -2
- package/dist/theme.mjs +3 -4
- package/dist/{utils-BiEVyyOJ.mjs → utils-BtCNpQqm.mjs} +11 -19
- package/dist/{utils-CNv_IKMQ.d.mts → utils-C6ZYvciN.d.mts} +4 -5
- package/dist/utils.d.mts +1 -3
- package/dist/utils.mjs +3 -5
- package/dist/variants.d.mts +2 -4
- package/dist/variants.mjs +14 -31
- package/package.json +4 -4
- package/dist/chunk-gol_9zmq.mjs +0 -36
- package/dist/rules-DIZf3KzB.mjs +0 -1701
- /package/dist/{colors-C9l2trjD.d.mts → colors-DCBiEX2u.d.mts} +0 -0
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as colors } from "./colors-
|
|
3
|
-
|
|
1
|
+
import { boxShadowsBase, ringBase, transformBase } from "./rules.mjs";
|
|
2
|
+
import { t as colors } from "./colors-BSuZg9eF.mjs";
|
|
4
3
|
//#region src/_theme/filters.ts
|
|
5
4
|
const blur = {
|
|
6
5
|
"DEFAULT": "8px",
|
|
@@ -21,7 +20,6 @@ const dropShadow = {
|
|
|
21
20
|
"2xl": "0 25px 25px rgb(0 0 0 / 0.15)",
|
|
22
21
|
"none": "0 0 rgb(0 0 0 / 0)"
|
|
23
22
|
};
|
|
24
|
-
|
|
25
23
|
//#endregion
|
|
26
24
|
//#region src/_theme/font.ts
|
|
27
25
|
const fontFamily = {
|
|
@@ -128,7 +126,6 @@ const fontWeight = {
|
|
|
128
126
|
black: "900"
|
|
129
127
|
};
|
|
130
128
|
const wordSpacing = letterSpacing;
|
|
131
|
-
|
|
132
129
|
//#endregion
|
|
133
130
|
//#region src/_theme/misc.ts
|
|
134
131
|
const breakpoints = {
|
|
@@ -198,7 +195,6 @@ const ringWidth = {
|
|
|
198
195
|
};
|
|
199
196
|
const zIndex = { auto: "auto" };
|
|
200
197
|
const media = { mouse: "(hover) and (pointer: fine)" };
|
|
201
|
-
|
|
202
198
|
//#endregion
|
|
203
199
|
//#region src/_theme/preflight.ts
|
|
204
200
|
const preflightBase = {
|
|
@@ -206,7 +202,6 @@ const preflightBase = {
|
|
|
206
202
|
...boxShadowsBase,
|
|
207
203
|
...ringBase
|
|
208
204
|
};
|
|
209
|
-
|
|
210
205
|
//#endregion
|
|
211
206
|
//#region src/_theme/size.ts
|
|
212
207
|
const baseSize = {
|
|
@@ -264,42 +259,6 @@ const maxInlineSize = {
|
|
|
264
259
|
screen: "100vi"
|
|
265
260
|
};
|
|
266
261
|
const containers = { ...baseSize };
|
|
267
|
-
|
|
268
|
-
//#endregion
|
|
269
|
-
//#region src/_theme/transition.ts
|
|
270
|
-
const easing = {
|
|
271
|
-
"DEFAULT": "cubic-bezier(0.4, 0, 0.2, 1)",
|
|
272
|
-
"linear": "linear",
|
|
273
|
-
"in": "cubic-bezier(0.4, 0, 1, 1)",
|
|
274
|
-
"out": "cubic-bezier(0, 0, 0.2, 1)",
|
|
275
|
-
"in-out": "cubic-bezier(0.4, 0, 0.2, 1)"
|
|
276
|
-
};
|
|
277
|
-
const transitionProperty = {
|
|
278
|
-
none: "none",
|
|
279
|
-
all: "all",
|
|
280
|
-
colors: [
|
|
281
|
-
"color",
|
|
282
|
-
"background-color",
|
|
283
|
-
"border-color",
|
|
284
|
-
"text-decoration-color",
|
|
285
|
-
"fill",
|
|
286
|
-
"stroke"
|
|
287
|
-
].join(","),
|
|
288
|
-
opacity: "opacity",
|
|
289
|
-
shadow: "box-shadow",
|
|
290
|
-
transform: "transform",
|
|
291
|
-
get DEFAULT() {
|
|
292
|
-
return [
|
|
293
|
-
this.colors,
|
|
294
|
-
"opacity",
|
|
295
|
-
"box-shadow",
|
|
296
|
-
"transform",
|
|
297
|
-
"filter",
|
|
298
|
-
"backdrop-filter"
|
|
299
|
-
].join(",");
|
|
300
|
-
}
|
|
301
|
-
};
|
|
302
|
-
|
|
303
262
|
//#endregion
|
|
304
263
|
//#region src/_theme/default.ts
|
|
305
264
|
const theme = {
|
|
@@ -331,8 +290,38 @@ const theme = {
|
|
|
331
290
|
textStrokeWidth,
|
|
332
291
|
blur,
|
|
333
292
|
dropShadow,
|
|
334
|
-
easing
|
|
335
|
-
|
|
293
|
+
easing: {
|
|
294
|
+
"DEFAULT": "cubic-bezier(0.4, 0, 0.2, 1)",
|
|
295
|
+
"linear": "linear",
|
|
296
|
+
"in": "cubic-bezier(0.4, 0, 1, 1)",
|
|
297
|
+
"out": "cubic-bezier(0, 0, 0.2, 1)",
|
|
298
|
+
"in-out": "cubic-bezier(0.4, 0, 0.2, 1)"
|
|
299
|
+
},
|
|
300
|
+
transitionProperty: {
|
|
301
|
+
none: "none",
|
|
302
|
+
all: "all",
|
|
303
|
+
colors: [
|
|
304
|
+
"color",
|
|
305
|
+
"background-color",
|
|
306
|
+
"border-color",
|
|
307
|
+
"text-decoration-color",
|
|
308
|
+
"fill",
|
|
309
|
+
"stroke"
|
|
310
|
+
].join(","),
|
|
311
|
+
opacity: "opacity",
|
|
312
|
+
shadow: "box-shadow",
|
|
313
|
+
transform: "transform",
|
|
314
|
+
get DEFAULT() {
|
|
315
|
+
return [
|
|
316
|
+
this.colors,
|
|
317
|
+
"opacity",
|
|
318
|
+
"box-shadow",
|
|
319
|
+
"transform",
|
|
320
|
+
"filter",
|
|
321
|
+
"backdrop-filter"
|
|
322
|
+
].join(",");
|
|
323
|
+
}
|
|
324
|
+
},
|
|
336
325
|
lineWidth,
|
|
337
326
|
spacing,
|
|
338
327
|
duration,
|
|
@@ -342,6 +331,5 @@ const theme = {
|
|
|
342
331
|
zIndex,
|
|
343
332
|
media
|
|
344
333
|
};
|
|
345
|
-
|
|
346
334
|
//#endregion
|
|
347
|
-
export { textStrokeWidth as A, fontFamily as C, lineHeight as D, letterSpacing as E, blur as M, dropShadow as N, textIndent as O, zIndex as S, fontWeight as T, lineWidth as _, height as a, spacing as b, maxHeight as c, width as d, preflightBase as f, duration as g, breakpoints as h, containers as i, wordSpacing as j, textShadow as k, maxInlineSize as l, boxShadow as m, baseSize as n, inlineSize as o, borderRadius as p, blockSize as r, maxBlockSize as s, theme as t, maxWidth as u, media as v, fontSize as w, verticalBreakpoints as x, ringWidth as y };
|
|
335
|
+
export { textStrokeWidth as A, fontFamily as C, lineHeight as D, letterSpacing as E, blur as M, dropShadow as N, textIndent as O, zIndex as S, fontWeight as T, lineWidth as _, height as a, spacing as b, maxHeight as c, width as d, preflightBase as f, duration as g, breakpoints as h, containers as i, wordSpacing as j, textShadow as k, maxInlineSize as l, boxShadow as m, baseSize as n, inlineSize as o, borderRadius as p, blockSize as r, maxBlockSize as s, theme as t, maxWidth as u, media as v, fontSize as w, verticalBreakpoints as x, ringWidth as y };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as Colors, r as Theme } from "./colors-
|
|
2
|
-
import * as _unocss_core0 from "@unocss/core";
|
|
1
|
+
import { n as Colors, r as Theme } from "./colors-DCBiEX2u.mjs";
|
|
2
|
+
import * as _$_unocss_core0 from "@unocss/core";
|
|
3
3
|
|
|
4
4
|
//#region src/_theme/default.d.ts
|
|
5
5
|
declare const theme: {
|
|
@@ -549,7 +549,7 @@ declare const theme: {
|
|
|
549
549
|
serif: string;
|
|
550
550
|
mono: string;
|
|
551
551
|
};
|
|
552
|
-
fontSize: Record<string, string | [string, string | _unocss_core0.CSSObject] | [string, string, string]> | undefined;
|
|
552
|
+
fontSize: Record<string, string | [string, string | _$_unocss_core0.CSSObject] | [string, string, string]> | undefined;
|
|
553
553
|
fontWeight: {
|
|
554
554
|
thin: string;
|
|
555
555
|
extralight: string;
|
package/dist/theme.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { i as ThemeAnimation, n as Colors, r as Theme, t as colors } from "./colors-
|
|
2
|
-
import { A as wordSpacing, C as fontSize, D as textIndent, E as lineHeight, M as dropShadow, N as theme, O as textShadow, S as fontFamily, T as letterSpacing, _ as media, a as inlineSize, b as verticalBreakpoints, c as maxInlineSize, d as preflightBase, f as borderRadius, g as lineWidth, h as duration, i as height, j as blur, k as textStrokeWidth, l as maxWidth, m as breakpoints, n as blockSize, o as maxBlockSize, p as boxShadow, r as containers, s as maxHeight, t as baseSize, u as width, v as ringWidth, w as fontWeight, x as zIndex, y as spacing } from "./theme-
|
|
1
|
+
import { i as ThemeAnimation, n as Colors, r as Theme, t as colors } from "./colors-DCBiEX2u.mjs";
|
|
2
|
+
import { A as wordSpacing, C as fontSize, D as textIndent, E as lineHeight, M as dropShadow, N as theme, O as textShadow, S as fontFamily, T as letterSpacing, _ as media, a as inlineSize, b as verticalBreakpoints, c as maxInlineSize, d as preflightBase, f as borderRadius, g as lineWidth, h as duration, i as height, j as blur, k as textStrokeWidth, l as maxWidth, m as breakpoints, n as blockSize, o as maxBlockSize, p as boxShadow, r as containers, s as maxHeight, t as baseSize, u as width, v as ringWidth, w as fontWeight, x as zIndex, y as spacing } from "./theme-DmprjxKd.mjs";
|
|
3
3
|
export { Colors, Theme, ThemeAnimation, baseSize, blockSize, blur, borderRadius, boxShadow, breakpoints, colors, containers, dropShadow, duration, fontFamily, fontSize, fontWeight, height, inlineSize, letterSpacing, lineHeight, lineWidth, maxBlockSize, maxHeight, maxInlineSize, maxWidth, media, preflightBase, ringWidth, spacing, textIndent, textShadow, textStrokeWidth, theme, verticalBreakpoints, width, wordSpacing, zIndex };
|
package/dist/theme.mjs
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { t as colors } from "./colors-
|
|
2
|
-
import { A as textStrokeWidth, C as fontFamily, D as lineHeight, E as letterSpacing, M as blur, N as dropShadow, O as textIndent, S as zIndex, T as fontWeight, _ as lineWidth, a as height, b as spacing, c as maxHeight, d as width, f as preflightBase, g as duration, h as breakpoints, i as containers, j as wordSpacing, k as textShadow, l as maxInlineSize, m as boxShadow, n as baseSize, o as inlineSize, p as borderRadius, r as blockSize, s as maxBlockSize, t as theme, u as maxWidth, v as media, w as fontSize, x as verticalBreakpoints, y as ringWidth } from "./theme-
|
|
3
|
-
|
|
4
|
-
export { baseSize, blockSize, blur, borderRadius, boxShadow, breakpoints, colors, containers, dropShadow, duration, fontFamily, fontSize, fontWeight, height, inlineSize, letterSpacing, lineHeight, lineWidth, maxBlockSize, maxHeight, maxInlineSize, maxWidth, media, preflightBase, ringWidth, spacing, textIndent, textShadow, textStrokeWidth, theme, verticalBreakpoints, width, wordSpacing, zIndex };
|
|
1
|
+
import { t as colors } from "./colors-BSuZg9eF.mjs";
|
|
2
|
+
import { A as textStrokeWidth, C as fontFamily, D as lineHeight, E as letterSpacing, M as blur, N as dropShadow, O as textIndent, S as zIndex, T as fontWeight, _ as lineWidth, a as height, b as spacing, c as maxHeight, d as width, f as preflightBase, g as duration, h as breakpoints, i as containers, j as wordSpacing, k as textShadow, l as maxInlineSize, m as boxShadow, n as baseSize, o as inlineSize, p as borderRadius, r as blockSize, s as maxBlockSize, t as theme, u as maxWidth, v as media, w as fontSize, x as verticalBreakpoints, y as ringWidth } from "./theme-CnGJp5L0.mjs";
|
|
3
|
+
export { baseSize, blockSize, blur, borderRadius, boxShadow, breakpoints, colors, containers, dropShadow, duration, fontFamily, fontSize, fontWeight, height, inlineSize, letterSpacing, lineHeight, lineWidth, maxBlockSize, maxHeight, maxInlineSize, maxWidth, media, preflightBase, ringWidth, spacing, textIndent, textShadow, textStrokeWidth, theme, verticalBreakpoints, width, wordSpacing, zIndex };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { n as __reExport, t as __exportAll } from "./chunk-
|
|
1
|
+
import { n as __reExport, t as __exportAll } from "./chunk-D1SwGrFN.mjs";
|
|
2
2
|
import { escapeSelector, toArray } from "@unocss/core";
|
|
3
3
|
import { colorOpacityToString, colorToString, createValueHandler, getStringComponent, getStringComponents, parseCssColor } from "@unocss/rule-utils";
|
|
4
|
-
|
|
5
4
|
//#region src/_utils/mappings.ts
|
|
6
5
|
const directionMap = {
|
|
7
6
|
"l": ["-left"],
|
|
@@ -111,7 +110,6 @@ const globalKeywords = [
|
|
|
111
110
|
];
|
|
112
111
|
const cssMathFnRE = /^(calc|clamp|min|max)\s*\((.+)\)(.*)/;
|
|
113
112
|
const cssVarFnRE = /^(var)\s*\((.+)\)(.*)/;
|
|
114
|
-
|
|
115
113
|
//#endregion
|
|
116
114
|
//#region src/_utils/handlers/regex.ts
|
|
117
115
|
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;
|
|
@@ -130,7 +128,6 @@ const unitOnlyMap = {
|
|
|
130
128
|
};
|
|
131
129
|
const bracketTypeRe = /^\[(color|image|length|size|position|quoted|string):/i;
|
|
132
130
|
const splitComma = /,(?![^()]*\))/g;
|
|
133
|
-
|
|
134
131
|
//#endregion
|
|
135
132
|
//#region src/_utils/handlers/handlers.ts
|
|
136
133
|
var handlers_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -289,11 +286,11 @@ function bracketWithType(str, requiredType) {
|
|
|
289
286
|
case "string": return base.replace(/(^|[^\\])_/g, "$1 ").replace(/\\_/g, "_");
|
|
290
287
|
case "quoted": return base.replace(/(^|[^\\])_/g, "$1 ").replace(/\\_/g, "_").replace(/(["\\])/g, "\\$1").replace(/^(.+)$/, "\"$1\"");
|
|
291
288
|
}
|
|
292
|
-
return base.replace(/(url\(.*?\))/g, (v) => v.replace(/_/g, "\\_")).replace(/(^|[^\\])_/g, "$1 ").replace(/\\_/g, "_").replace(/(?:calc|clamp|max|min)\((.*)/g, (match
|
|
289
|
+
return base.replace(/(url\(.*?\))/g, (v) => v.replace(/_/g, "\\_")).replace(/(^|[^\\])_/g, "$1 ").replace(/\\_/g, "_").replace(/(?:calc|clamp|max|min)\((.*)/g, (match) => {
|
|
293
290
|
const vars = [];
|
|
294
|
-
return match
|
|
291
|
+
return match.replace(/var\((--.+?)[,)]/g, (match, g1) => {
|
|
295
292
|
vars.push(g1);
|
|
296
|
-
return match
|
|
293
|
+
return match.replace(g1, "--un-calc");
|
|
297
294
|
}).replace(/(-?\d*\.?\d(?!-\d.+[,)](?![^+\-/*])\D)(?:%|[a-z]+)?|\))([+\-/*])/g, "$1 $2 ").replace(/--un-calc/g, () => vars.shift());
|
|
298
295
|
});
|
|
299
296
|
}
|
|
@@ -351,12 +348,10 @@ function position(str) {
|
|
|
351
348
|
"center"
|
|
352
349
|
].includes(str)) return str;
|
|
353
350
|
}
|
|
354
|
-
|
|
355
351
|
//#endregion
|
|
356
352
|
//#region src/_utils/handlers/index.ts
|
|
357
353
|
const handler = createValueHandler(handlers_exports);
|
|
358
354
|
const h = handler;
|
|
359
|
-
|
|
360
355
|
//#endregion
|
|
361
356
|
//#region src/_utils/utilities.ts
|
|
362
357
|
const CONTROL_MINI_NO_NEGATIVE = "$$mini-no-negative";
|
|
@@ -371,8 +366,8 @@ function directionSize(propertyPrefix) {
|
|
|
371
366
|
const v = theme.spacing?.[size || "DEFAULT"] ?? h.bracket.cssvar.global.auto.fraction.rem(size);
|
|
372
367
|
if (v != null) return directionMap[direction].map((i) => [`${propertyPrefix}${i}`, v]);
|
|
373
368
|
else if (size?.startsWith("-")) {
|
|
374
|
-
const v
|
|
375
|
-
if (v
|
|
369
|
+
const v = theme.spacing?.[size.slice(1)];
|
|
370
|
+
if (v != null) return directionMap[direction].map((i) => [`${propertyPrefix}${i}`, `calc(${v} * -1)`]);
|
|
376
371
|
}
|
|
377
372
|
};
|
|
378
373
|
}
|
|
@@ -430,13 +425,13 @@ function parseColor(body, theme, key) {
|
|
|
430
425
|
const [name] = colors;
|
|
431
426
|
if (!name) return;
|
|
432
427
|
let color;
|
|
433
|
-
const bracket
|
|
434
|
-
const bracketOrMain = bracket
|
|
428
|
+
const bracket = h.bracketOfColor(main);
|
|
429
|
+
const bracketOrMain = bracket || main;
|
|
435
430
|
if (h.numberWithUnit(bracketOrMain)) return;
|
|
436
431
|
if (/^#[\da-f]+$/i.test(bracketOrMain)) color = bracketOrMain;
|
|
437
432
|
else if (/^hex-[\da-fA-F]+$/.test(bracketOrMain)) color = `#${bracketOrMain.slice(4)}`;
|
|
438
433
|
else if (main.startsWith("$")) color = h.cssvar(main);
|
|
439
|
-
color = color || bracket
|
|
434
|
+
color = color || bracket;
|
|
440
435
|
if (!color) {
|
|
441
436
|
const colorData = getThemeColor(theme, [main], key);
|
|
442
437
|
if (typeof colorData === "string") color = colorData;
|
|
@@ -571,9 +566,8 @@ function isSize(str) {
|
|
|
571
566
|
function transformXYZ(d, v, name) {
|
|
572
567
|
const values = v.split(splitComma);
|
|
573
568
|
if (d || !d && values.length === 1) return xyzMap[d].map((i) => [`--un-${name}${i}`, v]);
|
|
574
|
-
return values.map((v
|
|
569
|
+
return values.map((v, i) => [`--un-${name}-${xyzArray[i]}`, v]);
|
|
575
570
|
}
|
|
576
|
-
|
|
577
571
|
//#endregion
|
|
578
572
|
//#region src/_utils/index.ts
|
|
579
573
|
var _utils_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -605,7 +599,6 @@ var _utils_exports = /* @__PURE__ */ __exportAll({
|
|
|
605
599
|
});
|
|
606
600
|
import * as import__unocss_rule_utils from "@unocss/rule-utils";
|
|
607
601
|
__reExport(_utils_exports, import__unocss_rule_utils);
|
|
608
|
-
|
|
609
602
|
//#endregion
|
|
610
603
|
//#region src/utils.ts
|
|
611
604
|
var utils_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -636,6 +629,5 @@ var utils_exports = /* @__PURE__ */ __exportAll({
|
|
|
636
629
|
xyzMap: () => xyzMap
|
|
637
630
|
});
|
|
638
631
|
__reExport(utils_exports, _utils_exports);
|
|
639
|
-
|
|
640
632
|
//#endregion
|
|
641
|
-
export { globalKeywords as C, xyzMap as D, xyzArray as E, directionMap as S, positionMap as T, handler as _, colorableShadows as a, cssMathFnRE as b, isCSSMathFn as c, parseColor as d, resolveBreakpoints as f, h as g, transformXYZ as h, colorResolver as i, isSize as l, splitShorthand as m, _utils_exports as n, directionSize as o, resolveVerticalBreakpoints as p, CONTROL_MINI_NO_NEGATIVE as r, hasParseableColor as s, utils_exports as t, makeGlobalStaticRules as u, handlers_exports as v, insetMap as w, cssVarFnRE as x, cornerMap as y };
|
|
633
|
+
export { globalKeywords as C, xyzMap as D, xyzArray as E, directionMap as S, positionMap as T, handler as _, colorableShadows as a, cssMathFnRE as b, isCSSMathFn as c, parseColor as d, resolveBreakpoints as f, h as g, transformXYZ as h, colorResolver as i, isSize as l, splitShorthand as m, _utils_exports as n, directionSize as o, resolveVerticalBreakpoints as p, CONTROL_MINI_NO_NEGATIVE as r, hasParseableColor as s, utils_exports as t, makeGlobalStaticRules as u, handlers_exports as v, insetMap as w, cssVarFnRE as x, cornerMap as y };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { r as Theme } from "./colors-C9l2trjD.mjs";
|
|
1
|
+
import { r as Theme } from "./colors-DCBiEX2u.mjs";
|
|
3
2
|
import { CSSObject, DynamicMatcher, StaticRule, VariantContext } from "@unocss/core";
|
|
4
|
-
import * as _unocss_rule_utils0 from "@unocss/rule-utils";
|
|
3
|
+
import * as _$_unocss_rule_utils0 from "@unocss/rule-utils";
|
|
5
4
|
import { ParsedColorValue } from "@unocss/rule-utils";
|
|
6
5
|
|
|
7
6
|
//#region src/_utils/handlers/handlers.d.ts
|
|
@@ -27,8 +26,8 @@ declare function properties(str: string): string | undefined;
|
|
|
27
26
|
declare function position(str: string): string | undefined;
|
|
28
27
|
//#endregion
|
|
29
28
|
//#region src/_utils/handlers/index.d.ts
|
|
30
|
-
declare const handler: _unocss_rule_utils0.ValueHandler<"number" | "auto" | "position" | "numberWithUnit" | "rem" | "px" | "percent" | "fraction" | "bracket" | "bracketOfColor" | "bracketOfLength" | "bracketOfPosition" | "cssvar" | "time" | "degree" | "global" | "properties", object>;
|
|
31
|
-
declare const h: _unocss_rule_utils0.ValueHandler<"number" | "auto" | "position" | "numberWithUnit" | "rem" | "px" | "percent" | "fraction" | "bracket" | "bracketOfColor" | "bracketOfLength" | "bracketOfPosition" | "cssvar" | "time" | "degree" | "global" | "properties", object>;
|
|
29
|
+
declare const handler: _$_unocss_rule_utils0.ValueHandler<"number" | "auto" | "position" | "numberWithUnit" | "rem" | "px" | "percent" | "fraction" | "bracket" | "bracketOfColor" | "bracketOfLength" | "bracketOfPosition" | "cssvar" | "time" | "degree" | "global" | "properties", object>;
|
|
30
|
+
declare const h: _$_unocss_rule_utils0.ValueHandler<"number" | "auto" | "position" | "numberWithUnit" | "rem" | "px" | "percent" | "fraction" | "bracket" | "bracketOfColor" | "bracketOfLength" | "bracketOfPosition" | "cssvar" | "time" | "degree" | "global" | "properties", object>;
|
|
32
31
|
//#endregion
|
|
33
32
|
//#region src/_utils/mappings.d.ts
|
|
34
33
|
declare const directionMap: Record<string, string[]>;
|
package/dist/utils.d.mts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import "./theme-5nLH7UVx.mjs";
|
|
3
|
-
import { C as h, S as xyzMap, T as handlers_d_exports, _ as directionMap, a as hasParseableColor, b as positionMap, c as makeGlobalStaticRules, d as resolveVerticalBreakpoints, f as splitShorthand, g as cssVarFnRE, h as cssMathFnRE, i as directionSize, l as parseColor, m as cornerMap, n as colorResolver, o as isCSSMathFn, p as transformXYZ, r as colorableShadows, s as isSize, t as CONTROL_MINI_NO_NEGATIVE, u as resolveBreakpoints, v as globalKeywords, w as handler, x as xyzArray, y as insetMap } from "./utils-CNv_IKMQ.mjs";
|
|
1
|
+
import { C as h, S as xyzMap, T as handlers_d_exports, _ as directionMap, a as hasParseableColor, b as positionMap, c as makeGlobalStaticRules, d as resolveVerticalBreakpoints, f as splitShorthand, g as cssVarFnRE, h as cssMathFnRE, i as directionSize, l as parseColor, m as cornerMap, n as colorResolver, o as isCSSMathFn, p as transformXYZ, r as colorableShadows, s as isSize, t as CONTROL_MINI_NO_NEGATIVE, u as resolveBreakpoints, v as globalKeywords, w as handler, x as xyzArray, y as insetMap } from "./utils-C6ZYvciN.mjs";
|
|
4
2
|
export * from "@unocss/rule-utils";
|
|
5
3
|
export { CONTROL_MINI_NO_NEGATIVE, colorResolver, colorableShadows, cornerMap, cssMathFnRE, cssVarFnRE, directionMap, directionSize, globalKeywords, h, handler, hasParseableColor, insetMap, isCSSMathFn, isSize, makeGlobalStaticRules, parseColor, positionMap, resolveBreakpoints, resolveVerticalBreakpoints, splitShorthand, transformXYZ, handlers_d_exports as valueHandlers, xyzArray, xyzMap };
|
package/dist/utils.mjs
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { C as globalKeywords, D as xyzMap, E as xyzArray, S as directionMap, T as positionMap, _ as handler, a as colorableShadows, b as cssMathFnRE, c as isCSSMathFn, d as parseColor, f as resolveBreakpoints, g as h, h as transformXYZ, i as colorResolver, l as isSize, m as splitShorthand, o as directionSize, p as resolveVerticalBreakpoints, r as CONTROL_MINI_NO_NEGATIVE, s as hasParseableColor, u as makeGlobalStaticRules, v as handlers_exports, w as insetMap, x as cssVarFnRE, y as cornerMap } from "./utils-
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
export { CONTROL_MINI_NO_NEGATIVE, colorResolver, colorableShadows, cornerMap, cssMathFnRE, cssVarFnRE, directionMap, directionSize, globalKeywords, h, handler, hasParseableColor, insetMap, isCSSMathFn, isSize, makeGlobalStaticRules, parseColor, positionMap, resolveBreakpoints, resolveVerticalBreakpoints, splitShorthand, transformXYZ, handlers_exports as valueHandlers, xyzArray, xyzMap };
|
|
1
|
+
import { C as globalKeywords, D as xyzMap, E as xyzArray, S as directionMap, T as positionMap, _ as handler, a as colorableShadows, b as cssMathFnRE, c as isCSSMathFn, d as parseColor, f as resolveBreakpoints, g as h, h as transformXYZ, i as colorResolver, l as isSize, m as splitShorthand, o as directionSize, p as resolveVerticalBreakpoints, r as CONTROL_MINI_NO_NEGATIVE, s as hasParseableColor, u as makeGlobalStaticRules, v as handlers_exports, w as insetMap, x as cssVarFnRE, y as cornerMap } from "./utils-BtCNpQqm.mjs";
|
|
2
|
+
export * from "@unocss/rule-utils";
|
|
3
|
+
export { CONTROL_MINI_NO_NEGATIVE, colorResolver, colorableShadows, cornerMap, cssMathFnRE, cssVarFnRE, directionMap, directionSize, globalKeywords, h, handler, hasParseableColor, insetMap, isCSSMathFn, isSize, makeGlobalStaticRules, parseColor, positionMap, resolveBreakpoints, resolveVerticalBreakpoints, splitShorthand, transformXYZ, handlers_exports as valueHandlers, xyzArray, xyzMap };
|
package/dist/variants.d.mts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { r as Theme } from "./colors-
|
|
2
|
-
import "./
|
|
3
|
-
import { n as PresetMiniOptions } from "./index-CnsmLem5.mjs";
|
|
4
|
-
import "./utils-CNv_IKMQ.mjs";
|
|
1
|
+
import { r as Theme } from "./colors-DCBiEX2u.mjs";
|
|
2
|
+
import { n as PresetMiniOptions } from "./index-Df-rxaWU.mjs";
|
|
5
3
|
import { Variant, VariantObject } from "@unocss/core";
|
|
6
4
|
|
|
7
5
|
//#region src/_variants/aria.d.ts
|
package/dist/variants.mjs
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { b as cssMathFnRE, f as resolveBreakpoints, g as h, n as _utils_exports,
|
|
1
|
+
import { b as cssMathFnRE, f as resolveBreakpoints, g as h, n as _utils_exports, t as utils_exports, x as cssVarFnRE } from "./utils-BtCNpQqm.mjs";
|
|
2
2
|
import { escapeRegExp, escapeSelector, toArray } from "@unocss/core";
|
|
3
3
|
import { createPartClasses, createPseudoClassFunctions, createPseudoClassesAndElements, createTaggedPseudoClasses, getStringComponent } from "@unocss/rule-utils";
|
|
4
|
-
|
|
5
4
|
//#region src/_variants/aria.ts
|
|
6
5
|
const variantAria = {
|
|
7
6
|
name: "aria",
|
|
@@ -35,11 +34,11 @@ function taggedAria(tagName, combinator, options = {}) {
|
|
|
35
34
|
return {
|
|
36
35
|
matcher: rest,
|
|
37
36
|
handle: (input, next) => {
|
|
38
|
-
const regexp =
|
|
39
|
-
const match
|
|
37
|
+
const regexp = new RegExp(`${escapeRegExp(parent)}${escapeRegExp(escapedLabel)}(?:\\[.+?\\])+`);
|
|
38
|
+
const match = input.prefix.match(regexp);
|
|
40
39
|
let nextPrefix;
|
|
41
|
-
if (match
|
|
42
|
-
const insertIndex = (match
|
|
40
|
+
if (match) {
|
|
41
|
+
const insertIndex = (match.index ?? 0) + parent.length + escapedLabel.length;
|
|
43
42
|
nextPrefix = [
|
|
44
43
|
input.prefix.slice(0, insertIndex),
|
|
45
44
|
`[aria-${ariaAttribute}]`,
|
|
@@ -97,7 +96,6 @@ function variantTaggedAriaAttributes(options = {}) {
|
|
|
97
96
|
taggedHasAria()
|
|
98
97
|
];
|
|
99
98
|
}
|
|
100
|
-
|
|
101
99
|
//#endregion
|
|
102
100
|
//#region src/_variants/breakpoints.ts
|
|
103
101
|
const sizePseudo = /(max|min)-\[([^\]]*)\]:/;
|
|
@@ -122,7 +120,7 @@ function variantBreakpoints() {
|
|
|
122
120
|
idx
|
|
123
121
|
]);
|
|
124
122
|
for (const [point, size, idx] of variantEntries) {
|
|
125
|
-
if (!regexCache[point]) regexCache[point] =
|
|
123
|
+
if (!regexCache[point]) regexCache[point] = new RegExp(`^((?:([al]t-|[<~]|max-))?${point}(?:${context.generator.config.separators.join("|")}))`);
|
|
126
124
|
const match = matcher.match(regexCache[point]);
|
|
127
125
|
if (!match) continue;
|
|
128
126
|
const [, pre] = match;
|
|
@@ -165,11 +163,9 @@ function variantBreakpoints() {
|
|
|
165
163
|
autocomplete: "(at-|lt-|max-|)$breakpoints:"
|
|
166
164
|
};
|
|
167
165
|
}
|
|
168
|
-
|
|
169
166
|
//#endregion
|
|
170
167
|
//#region src/_variants/children.ts
|
|
171
168
|
const variantChildren = [(0, utils_exports.variantMatcher)("*", (input) => ({ selector: `${input.selector} > *` }), { order: -1 })];
|
|
172
|
-
|
|
173
169
|
//#endregion
|
|
174
170
|
//#region src/_variants/combinators.ts
|
|
175
171
|
function scopeMatcher(name, combinator) {
|
|
@@ -203,7 +199,6 @@ const variantCombinators = [
|
|
|
203
199
|
scopeMatcher("sibling", "+"),
|
|
204
200
|
scopeMatcher("siblings", "~")
|
|
205
201
|
];
|
|
206
|
-
|
|
207
202
|
//#endregion
|
|
208
203
|
//#region src/_variants/container.ts
|
|
209
204
|
const variantContainerQuery = {
|
|
@@ -233,17 +228,15 @@ const variantContainerQuery = {
|
|
|
233
228
|
},
|
|
234
229
|
multiPass: true
|
|
235
230
|
};
|
|
236
|
-
|
|
237
231
|
//#endregion
|
|
238
232
|
//#region src/_variants/dark.ts
|
|
239
233
|
function variantColorsMediaOrClass(options = {}) {
|
|
240
234
|
if (options?.dark === "class" || typeof options.dark === "object") {
|
|
241
235
|
const { dark = ".dark", light = ".light" } = typeof options.dark === "string" ? {} : options.dark;
|
|
242
|
-
return [(0, utils_exports.variantMatcher)("dark", toArray(dark).map((dark
|
|
236
|
+
return [(0, utils_exports.variantMatcher)("dark", toArray(dark).map((dark) => (input) => ({ prefix: `${dark} $$ ${input.prefix}` }))), (0, utils_exports.variantMatcher)("light", toArray(light).map((light) => (input) => ({ prefix: `${light} $$ ${input.prefix}` })))];
|
|
243
237
|
}
|
|
244
238
|
return [(0, utils_exports.variantParentMatcher)("dark", "@media (prefers-color-scheme: dark)"), (0, utils_exports.variantParentMatcher)("light", "@media (prefers-color-scheme: light)")];
|
|
245
239
|
}
|
|
246
|
-
|
|
247
240
|
//#endregion
|
|
248
241
|
//#region src/_variants/data.ts
|
|
249
242
|
const variantDataAttribute = {
|
|
@@ -278,11 +271,11 @@ function taggedData(tagName, combinator, options = {}) {
|
|
|
278
271
|
return {
|
|
279
272
|
matcher: rest,
|
|
280
273
|
handle: (input, next) => {
|
|
281
|
-
const regexp =
|
|
282
|
-
const match
|
|
274
|
+
const regexp = new RegExp(`${escapeRegExp(parent)}${escapeRegExp(escapedLabel)}(?:\\[.+?\\])+`);
|
|
275
|
+
const match = input.prefix.match(regexp);
|
|
283
276
|
let nextPrefix;
|
|
284
|
-
if (match
|
|
285
|
-
const insertIndex = (match
|
|
277
|
+
if (match) {
|
|
278
|
+
const insertIndex = (match.index ?? 0) + parent.length + escapedLabel.length;
|
|
286
279
|
nextPrefix = [
|
|
287
280
|
input.prefix.slice(0, insertIndex),
|
|
288
281
|
`[data-${dataAttribute}]`,
|
|
@@ -340,11 +333,9 @@ function variantTaggedDataAttributes(options = {}) {
|
|
|
340
333
|
taggedHasData()
|
|
341
334
|
];
|
|
342
335
|
}
|
|
343
|
-
|
|
344
336
|
//#endregion
|
|
345
337
|
//#region src/_variants/directions.ts
|
|
346
338
|
const variantLanguageDirections = [(0, utils_exports.variantMatcher)("rtl", (input) => ({ prefix: `[dir="rtl"] $$ ${input.prefix}` })), (0, utils_exports.variantMatcher)("ltr", (input) => ({ prefix: `[dir="ltr"] $$ ${input.prefix}` }))];
|
|
347
|
-
|
|
348
339
|
//#endregion
|
|
349
340
|
//#region src/_variants/important.ts
|
|
350
341
|
function variantImportant() {
|
|
@@ -352,7 +343,7 @@ function variantImportant() {
|
|
|
352
343
|
return {
|
|
353
344
|
name: "important",
|
|
354
345
|
match(matcher, ctx) {
|
|
355
|
-
if (!re) re =
|
|
346
|
+
if (!re) re = new RegExp(`^(important(?:${ctx.generator.config.separators.join("|")})|!)`);
|
|
356
347
|
let base;
|
|
357
348
|
const match = matcher.match(re);
|
|
358
349
|
if (match) base = matcher.slice(match[0].length);
|
|
@@ -369,7 +360,6 @@ function variantImportant() {
|
|
|
369
360
|
}
|
|
370
361
|
};
|
|
371
362
|
}
|
|
372
|
-
|
|
373
363
|
//#endregion
|
|
374
364
|
//#region src/_variants/media.ts
|
|
375
365
|
const variantPrint = (0, utils_exports.variantParentMatcher)("print", "@media print");
|
|
@@ -392,7 +382,6 @@ const variantCustomMedia = {
|
|
|
392
382
|
},
|
|
393
383
|
multiPass: true
|
|
394
384
|
};
|
|
395
|
-
|
|
396
385
|
//#endregion
|
|
397
386
|
//#region src/_variants/misc.ts
|
|
398
387
|
const variantSelector = {
|
|
@@ -497,7 +486,6 @@ const variantTheme = {
|
|
|
497
486
|
};
|
|
498
487
|
}
|
|
499
488
|
};
|
|
500
|
-
|
|
501
489
|
//#endregion
|
|
502
490
|
//#region src/_variants/negative.ts
|
|
503
491
|
const anchoredNumberRE = /^-?[0-9.]+(?:[a-z]+|%)?$/;
|
|
@@ -528,7 +516,7 @@ const variantNegative = {
|
|
|
528
516
|
return {
|
|
529
517
|
matcher: matcher.slice(1),
|
|
530
518
|
body: (body) => {
|
|
531
|
-
if (body.
|
|
519
|
+
if (body.some((v) => v[0] === "$$mini-no-negative")) return;
|
|
532
520
|
let changed = false;
|
|
533
521
|
body.forEach((v) => {
|
|
534
522
|
const value = v[1]?.toString();
|
|
@@ -557,7 +545,6 @@ const variantNegative = {
|
|
|
557
545
|
};
|
|
558
546
|
}
|
|
559
547
|
};
|
|
560
|
-
|
|
561
548
|
//#endregion
|
|
562
549
|
//#region src/_variants/pseudo.ts
|
|
563
550
|
function variantPseudoClassesAndElements() {
|
|
@@ -582,7 +569,6 @@ function variantTaggedPseudoClasses(options = {}) {
|
|
|
582
569
|
});
|
|
583
570
|
}
|
|
584
571
|
const variantPartClasses = createPartClasses();
|
|
585
|
-
|
|
586
572
|
//#endregion
|
|
587
573
|
//#region src/_variants/startingstyle.ts
|
|
588
574
|
const variantStartingStyle = {
|
|
@@ -598,7 +584,6 @@ const variantStartingStyle = {
|
|
|
598
584
|
};
|
|
599
585
|
}
|
|
600
586
|
};
|
|
601
|
-
|
|
602
587
|
//#endregion
|
|
603
588
|
//#region src/_variants/supports.ts
|
|
604
589
|
const variantSupports = {
|
|
@@ -623,7 +608,6 @@ const variantSupports = {
|
|
|
623
608
|
},
|
|
624
609
|
multiPass: true
|
|
625
610
|
};
|
|
626
|
-
|
|
627
611
|
//#endregion
|
|
628
612
|
//#region src/_variants/default.ts
|
|
629
613
|
function variants(options) {
|
|
@@ -656,6 +640,5 @@ function variants(options) {
|
|
|
656
640
|
variantTheme
|
|
657
641
|
];
|
|
658
642
|
}
|
|
659
|
-
|
|
660
643
|
//#endregion
|
|
661
|
-
export { variantAria, variantBreakpoints, variantChildren, variantColorsMediaOrClass, variantCombinators, variantContainerQuery, variantCssLayer, variantCustomMedia, variantDataAttribute, variantImportant, variantInternalLayer, variantLanguageDirections, variantNegative, variantPartClasses, variantPrint, variantPseudoClassFunctions, variantPseudoClassesAndElements, variantScope, variantSelector, variantStartingStyle, variantSupports, variantTaggedAriaAttributes, variantTaggedDataAttributes, variantTaggedPseudoClasses, variantTheme, variantVariables, variants };
|
|
644
|
+
export { variantAria, variantBreakpoints, variantChildren, variantColorsMediaOrClass, variantCombinators, variantContainerQuery, variantCssLayer, variantCustomMedia, variantDataAttribute, variantImportant, variantInternalLayer, variantLanguageDirections, variantNegative, variantPartClasses, variantPrint, variantPseudoClassFunctions, variantPseudoClassesAndElements, variantScope, variantSelector, variantStartingStyle, variantSupports, variantTaggedAriaAttributes, variantTaggedDataAttributes, variantTaggedPseudoClasses, variantTheme, variantVariables, variants };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unocss/preset-mini",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "66.6.
|
|
4
|
+
"version": "66.6.8",
|
|
5
5
|
"description": "The minimal preset for UnoCSS",
|
|
6
6
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -42,9 +42,9 @@
|
|
|
42
42
|
"dist"
|
|
43
43
|
],
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@unocss/core": "66.6.
|
|
46
|
-
"@unocss/rule-utils": "66.6.
|
|
47
|
-
"@unocss/extractor-arbitrary-variants": "66.6.
|
|
45
|
+
"@unocss/core": "66.6.8",
|
|
46
|
+
"@unocss/rule-utils": "66.6.8",
|
|
47
|
+
"@unocss/extractor-arbitrary-variants": "66.6.8"
|
|
48
48
|
},
|
|
49
49
|
"scripts": {
|
|
50
50
|
"build": "tsdown",
|
package/dist/chunk-gol_9zmq.mjs
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
//#region rolldown:runtime
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __exportAll = (all, symbols) => {
|
|
7
|
-
let target = {};
|
|
8
|
-
for (var name in all) {
|
|
9
|
-
__defProp(target, name, {
|
|
10
|
-
get: all[name],
|
|
11
|
-
enumerable: true
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
if (symbols) {
|
|
15
|
-
__defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
16
|
-
}
|
|
17
|
-
return target;
|
|
18
|
-
};
|
|
19
|
-
var __copyProps = (to, from, except, desc) => {
|
|
20
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
21
|
-
for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
22
|
-
key = keys[i];
|
|
23
|
-
if (!__hasOwnProp.call(to, key) && key !== except) {
|
|
24
|
-
__defProp(to, key, {
|
|
25
|
-
get: ((k) => from[k]).bind(null, key),
|
|
26
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
return to;
|
|
32
|
-
};
|
|
33
|
-
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
34
|
-
|
|
35
|
-
//#endregion
|
|
36
|
-
export { __reExport as n, __exportAll as t };
|