@unocss/preset-mini 66.6.6 → 66.6.7
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-N6PyQljA.d.mts} +1 -1
- 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-r-ur3K_H.d.mts} +1 -1
- 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-DqTKpOev.d.mts} +1 -2
- 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
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
//#region \0rolldown/runtime.js
|
|
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, no_symbols) => {
|
|
7
|
+
let target = {};
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true
|
|
11
|
+
});
|
|
12
|
+
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
13
|
+
return target;
|
|
14
|
+
};
|
|
15
|
+
var __copyProps = (to, from, except, desc) => {
|
|
16
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
17
|
+
key = keys[i];
|
|
18
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
19
|
+
get: ((k) => from[k]).bind(null, key),
|
|
20
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
return to;
|
|
24
|
+
};
|
|
25
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
26
|
+
//#endregion
|
|
27
|
+
export { __reExport as n, __exportAll as t };
|
package/dist/colors.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as colors } from "./colors-
|
|
1
|
+
import { t as colors } from "./colors-DCBiEX2u.mjs";
|
|
2
2
|
export { colors };
|
package/dist/colors.mjs
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import { t as colors } from "./colors-
|
|
2
|
-
|
|
3
|
-
export { colors };
|
|
1
|
+
import { t as colors } from "./colors-BSuZg9eF.mjs";
|
|
2
|
+
export { colors };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as ThemeAnimation, r as Theme, t as colors } from "./colors-
|
|
2
|
-
import { N as theme } from "./theme-
|
|
3
|
-
import { a as preflights, i as presetMini, n as PresetMiniOptions, r as VarPrefixPostprocessor, t as DarkModeSelectors } from "./index-
|
|
4
|
-
import { l as parseColor } from "./utils-
|
|
1
|
+
import { i as ThemeAnimation, r as Theme, t as colors } from "./colors-DCBiEX2u.mjs";
|
|
2
|
+
import { N as theme } from "./theme-r-ur3K_H.mjs";
|
|
3
|
+
import { a as preflights, i as presetMini, n as PresetMiniOptions, r as VarPrefixPostprocessor, t as DarkModeSelectors } from "./index-N6PyQljA.mjs";
|
|
4
|
+
import { l as parseColor } from "./utils-DqTKpOev.mjs";
|
|
5
5
|
export { DarkModeSelectors, PresetMiniOptions, Theme, ThemeAnimation, VarPrefixPostprocessor, colors, presetMini as default, presetMini, parseColor, preflights, theme };
|
package/dist/index.mjs
CHANGED
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
import { C as globalKeywords, d as parseColor } from "./utils-
|
|
2
|
-
import {
|
|
3
|
-
import { t as colors } from "./colors-
|
|
4
|
-
import { t as theme } from "./theme-
|
|
1
|
+
import { C as globalKeywords, d as parseColor } from "./utils-BtCNpQqm.mjs";
|
|
2
|
+
import { rules } from "./rules.mjs";
|
|
3
|
+
import { t as colors } from "./colors-BSuZg9eF.mjs";
|
|
4
|
+
import { t as theme } from "./theme-CnGJp5L0.mjs";
|
|
5
5
|
import { variants } from "./variants.mjs";
|
|
6
6
|
import { definePreset, entriesToCss, toArray } from "@unocss/core";
|
|
7
7
|
import { extractorArbitraryVariants } from "@unocss/extractor-arbitrary-variants";
|
|
8
|
-
|
|
9
8
|
//#region src/preflights.ts
|
|
10
9
|
function preflights(options) {
|
|
11
10
|
if (options.preflight) return [{
|
|
12
11
|
layer: "preflights",
|
|
13
|
-
getCSS({ theme
|
|
14
|
-
if (theme
|
|
15
|
-
let entries = Object.entries(theme
|
|
12
|
+
getCSS({ theme, generator }) {
|
|
13
|
+
if (theme.preflightBase) {
|
|
14
|
+
let entries = Object.entries(theme.preflightBase);
|
|
16
15
|
if (options.preflight === "on-demand") {
|
|
17
16
|
const keys = new Set(Array.from(generator.activatedRules).map((r) => r[2]?.custom?.preflightKeys).filter(Boolean).flat());
|
|
18
17
|
entries = entries.filter(([k]) => keys.has(k));
|
|
@@ -20,13 +19,12 @@ function preflights(options) {
|
|
|
20
19
|
if (entries.length > 0) {
|
|
21
20
|
let css = entriesToCss(entries);
|
|
22
21
|
if (options.variablePrefix !== "un-") css = css.replace(/--un-/g, `--${options.variablePrefix}`);
|
|
23
|
-
return toArray(theme
|
|
22
|
+
return toArray(theme.preflightRoot ?? ["*,::before,::after", "::backdrop"]).map((root) => `${root}{${css}}`).join("");
|
|
24
23
|
}
|
|
25
24
|
}
|
|
26
25
|
}
|
|
27
26
|
}];
|
|
28
27
|
}
|
|
29
|
-
|
|
30
28
|
//#endregion
|
|
31
29
|
//#region src/shorthands.ts
|
|
32
30
|
const shorthands = {
|
|
@@ -39,7 +37,6 @@ const shorthands = {
|
|
|
39
37
|
],
|
|
40
38
|
globalKeyword: globalKeywords
|
|
41
39
|
};
|
|
42
|
-
|
|
43
40
|
//#endregion
|
|
44
41
|
//#region src/index.ts
|
|
45
42
|
/**
|
|
@@ -65,7 +62,6 @@ const presetMini = definePreset((options = {}) => {
|
|
|
65
62
|
autocomplete: { shorthands }
|
|
66
63
|
};
|
|
67
64
|
});
|
|
68
|
-
var src_default = presetMini;
|
|
69
65
|
function VarPrefixPostprocessor(prefix) {
|
|
70
66
|
if (prefix !== "un-") return (obj) => {
|
|
71
67
|
obj.entries.forEach((i) => {
|
|
@@ -74,6 +70,5 @@ function VarPrefixPostprocessor(prefix) {
|
|
|
74
70
|
});
|
|
75
71
|
};
|
|
76
72
|
}
|
|
77
|
-
|
|
78
73
|
//#endregion
|
|
79
|
-
export { VarPrefixPostprocessor, colors,
|
|
74
|
+
export { VarPrefixPostprocessor, colors, presetMini as default, presetMini, parseColor, preflights, theme };
|
package/dist/rules.d.mts
CHANGED