@unocss/preset-mini 0.55.1 → 0.55.3

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.
Files changed (56) hide show
  1. package/dist/colors.cjs +360 -6
  2. package/dist/{colors-dabdd21f.d.ts → colors.d.cts} +3 -2
  3. package/dist/colors.d.mts +354 -0
  4. package/dist/colors.d.ts +353 -2
  5. package/dist/colors.mjs +361 -1
  6. package/dist/index.cjs +12 -12
  7. package/dist/index.d.cts +69 -0
  8. package/dist/index.d.mts +69 -0
  9. package/dist/index.d.ts +6 -6
  10. package/dist/index.mjs +9 -10
  11. package/dist/rules.cjs +928 -48
  12. package/dist/rules.d.cts +133 -0
  13. package/dist/rules.d.mts +133 -0
  14. package/dist/rules.d.ts +1 -1
  15. package/dist/rules.mjs +891 -4
  16. package/dist/shared/preset-mini.0d957b3b.d.mts +721 -0
  17. package/dist/shared/preset-mini.0fac4963.mjs +320 -0
  18. package/dist/shared/preset-mini.2f8c3259.d.mts +67 -0
  19. package/dist/{types-d991ba46.d.ts → shared/preset-mini.32abac2c.d.cts} +1 -1
  20. package/dist/shared/preset-mini.32abac2c.d.mts +71 -0
  21. package/dist/shared/preset-mini.32abac2c.d.ts +71 -0
  22. package/dist/{default-1f25a0ae.d.ts → shared/preset-mini.3a79e471.d.ts} +1 -1
  23. package/dist/shared/preset-mini.5bfee53b.cjs +344 -0
  24. package/dist/shared/preset-mini.7b9de562.d.cts +67 -0
  25. package/dist/shared/{preset-mini.a21c5071.cjs → preset-mini.b4ad509c.cjs} +12 -8
  26. package/dist/shared/{preset-mini.6c1c8016.mjs → preset-mini.f1fe435e.mjs} +13 -9
  27. package/dist/shared/preset-mini.f67366b3.d.cts +721 -0
  28. package/dist/{utilities-d496540e.d.ts → shared/preset-mini.fa67009f.d.ts} +1 -1
  29. package/dist/theme.cjs +308 -34
  30. package/dist/theme.d.cts +264 -0
  31. package/dist/theme.d.mts +264 -0
  32. package/dist/theme.d.ts +5 -5
  33. package/dist/theme.mjs +284 -4
  34. package/dist/utils.cjs +81 -10
  35. package/dist/utils.d.cts +65 -0
  36. package/dist/utils.d.mts +65 -0
  37. package/dist/utils.d.ts +13 -31
  38. package/dist/utils.mjs +81 -3
  39. package/dist/variants.cjs +737 -33
  40. package/dist/variants.d.cts +46 -0
  41. package/dist/variants.d.mts +46 -0
  42. package/dist/variants.d.ts +4 -4
  43. package/dist/variants.mjs +714 -4
  44. package/package.json +3 -3
  45. package/dist/shared/preset-mini.0131b915.mjs +0 -704
  46. package/dist/shared/preset-mini.1c66bf79.mjs +0 -361
  47. package/dist/shared/preset-mini.74f9d55e.mjs +0 -80
  48. package/dist/shared/preset-mini.811eb23d.mjs +0 -681
  49. package/dist/shared/preset-mini.8dd73081.mjs +0 -452
  50. package/dist/shared/preset-mini.9d93761b.cjs +0 -729
  51. package/dist/shared/preset-mini.b8d9397e.cjs +0 -471
  52. package/dist/shared/preset-mini.ce5169f2.cjs +0 -730
  53. package/dist/shared/preset-mini.d778b487.cjs +0 -85
  54. package/dist/shared/preset-mini.de3bd9f7.mjs +0 -284
  55. package/dist/shared/preset-mini.e078d7da.cjs +0 -313
  56. package/dist/shared/preset-mini.f3fc54d2.cjs +0 -363
@@ -0,0 +1,320 @@
1
+ import { h, m as makeGlobalStaticRules, g as globalKeywords, c as colorResolver, a as hasParseableColor, b as colorableShadows, d as positionMap, x as xyzMap } from './preset-mini.f1fe435e.mjs';
2
+
3
+ const cursorValues = ["auto", "default", "none", "context-menu", "help", "pointer", "progress", "wait", "cell", "crosshair", "text", "vertical-text", "alias", "copy", "move", "no-drop", "not-allowed", "grab", "grabbing", "all-scroll", "col-resize", "row-resize", "n-resize", "e-resize", "s-resize", "w-resize", "ne-resize", "nw-resize", "se-resize", "sw-resize", "ew-resize", "ns-resize", "nesw-resize", "nwse-resize", "zoom-in", "zoom-out"];
4
+ const containValues = ["none", "strict", "content", "size", "inline-size", "layout", "style", "paint"];
5
+ const varEmpty = " ";
6
+ const displays = [
7
+ ["inline", { display: "inline" }],
8
+ ["block", { display: "block" }],
9
+ ["inline-block", { display: "inline-block" }],
10
+ ["contents", { display: "contents" }],
11
+ ["flow-root", { display: "flow-root" }],
12
+ ["list-item", { display: "list-item" }],
13
+ ["hidden", { display: "none" }],
14
+ [/^display-(.+)$/, ([, c]) => ({ display: h.bracket.cssvar.global(c) || c })]
15
+ ];
16
+ const appearances = [
17
+ ["visible", { visibility: "visible" }],
18
+ ["invisible", { visibility: "hidden" }],
19
+ ["backface-visible", { "backface-visibility": "visible" }],
20
+ ["backface-hidden", { "backface-visibility": "hidden" }],
21
+ ...makeGlobalStaticRules("backface", "backface-visibility")
22
+ ];
23
+ const cursors = [
24
+ [/^cursor-(.+)$/, ([, c]) => ({ cursor: h.bracket.cssvar.global(c) })],
25
+ ...cursorValues.map((v) => [`cursor-${v}`, { cursor: v }])
26
+ ];
27
+ const contains = [
28
+ [/^contain-(.*)$/, ([, d]) => {
29
+ if (h.bracket(d) != null) {
30
+ return {
31
+ contain: h.bracket(d).split(" ").map((e) => h.cssvar.fraction(e) ?? e).join(" ")
32
+ };
33
+ }
34
+ return containValues.includes(d) ? { contain: d } : void 0;
35
+ }]
36
+ ];
37
+ const pointerEvents = [
38
+ ["pointer-events-auto", { "pointer-events": "auto" }],
39
+ ["pointer-events-none", { "pointer-events": "none" }],
40
+ ...makeGlobalStaticRules("pointer-events")
41
+ ];
42
+ const resizes = [
43
+ ["resize-x", { resize: "horizontal" }],
44
+ ["resize-y", { resize: "vertical" }],
45
+ ["resize", { resize: "both" }],
46
+ ["resize-none", { resize: "none" }],
47
+ ...makeGlobalStaticRules("resize")
48
+ ];
49
+ const userSelects = [
50
+ ["select-auto", { "-webkit-user-select": "auto", "user-select": "auto" }],
51
+ ["select-all", { "-webkit-user-select": "all", "user-select": "all" }],
52
+ ["select-text", { "-webkit-user-select": "text", "user-select": "text" }],
53
+ ["select-none", { "-webkit-user-select": "none", "user-select": "none" }],
54
+ ...makeGlobalStaticRules("select", "user-select")
55
+ ];
56
+ const whitespaces = [
57
+ [
58
+ /^(?:whitespace-|ws-)([-\w]+)$/,
59
+ ([, v]) => ["normal", "nowrap", "pre", "pre-line", "pre-wrap", "break-spaces", ...globalKeywords].includes(v) ? { "white-space": v } : void 0,
60
+ { autocomplete: "(whitespace|ws)-(normal|nowrap|pre|pre-line|pre-wrap|break-spaces)" }
61
+ ]
62
+ ];
63
+ const contentVisibility = [
64
+ [/^intrinsic-size-(.+)$/, ([, d]) => ({ "contain-intrinsic-size": h.bracket.cssvar.global.fraction.rem(d) }), { autocomplete: "intrinsic-size-<num>" }],
65
+ ["content-visibility-visible", { "content-visibility": "visible" }],
66
+ ["content-visibility-hidden", { "content-visibility": "hidden" }],
67
+ ["content-visibility-auto", { "content-visibility": "auto" }],
68
+ ...makeGlobalStaticRules("content-visibility")
69
+ ];
70
+ const contents = [
71
+ [/^content-(.+)$/, ([, v]) => ({ content: h.bracket.cssvar(v) })],
72
+ ["content-empty", { content: '""' }],
73
+ ["content-none", { content: "none" }]
74
+ ];
75
+ const breaks = [
76
+ ["break-normal", { "overflow-wrap": "normal", "word-break": "normal" }],
77
+ ["break-words", { "overflow-wrap": "break-word" }],
78
+ ["break-all", { "word-break": "break-all" }],
79
+ ["break-keep", { "word-break": "keep-all" }],
80
+ ["break-anywhere", { "overflow-wrap": "anywhere" }]
81
+ ];
82
+ const textWraps = [
83
+ ["text-wrap", { "text-wrap": "wrap" }],
84
+ ["text-nowrap", { "text-wrap": "nowrap" }],
85
+ ["text-balance", { "text-wrap": "balance" }]
86
+ ];
87
+ const textOverflows = [
88
+ ["truncate", { "overflow": "hidden", "text-overflow": "ellipsis", "white-space": "nowrap" }],
89
+ ["text-truncate", { "overflow": "hidden", "text-overflow": "ellipsis", "white-space": "nowrap" }],
90
+ ["text-ellipsis", { "text-overflow": "ellipsis" }],
91
+ ["text-clip", { "text-overflow": "clip" }]
92
+ ];
93
+ const textTransforms = [
94
+ ["case-upper", { "text-transform": "uppercase" }],
95
+ ["case-lower", { "text-transform": "lowercase" }],
96
+ ["case-capital", { "text-transform": "capitalize" }],
97
+ ["case-normal", { "text-transform": "none" }],
98
+ ...makeGlobalStaticRules("case", "text-transform")
99
+ ];
100
+ const fontStyles = [
101
+ ["italic", { "font-style": "italic" }],
102
+ ["not-italic", { "font-style": "normal" }],
103
+ ["font-italic", { "font-style": "italic" }],
104
+ ["font-not-italic", { "font-style": "normal" }],
105
+ ["oblique", { "font-style": "oblique" }],
106
+ ["not-oblique", { "font-style": "normal" }],
107
+ ["font-oblique", { "font-style": "oblique" }],
108
+ ["font-not-oblique", { "font-style": "normal" }]
109
+ ];
110
+ const fontSmoothings = [
111
+ ["antialiased", {
112
+ "-webkit-font-smoothing": "antialiased",
113
+ "-moz-osx-font-smoothing": "grayscale",
114
+ "font-smoothing": "grayscale"
115
+ }],
116
+ ["subpixel-antialiased", {
117
+ "-webkit-font-smoothing": "auto",
118
+ "-moz-osx-font-smoothing": "auto",
119
+ "font-smoothing": "auto"
120
+ }]
121
+ ];
122
+
123
+ const ringBase = {
124
+ "--un-ring-inset": varEmpty,
125
+ "--un-ring-offset-width": "0px",
126
+ "--un-ring-offset-color": "#fff",
127
+ "--un-ring-width": "0px",
128
+ "--un-ring-color": "rgba(147,197,253,0.5)",
129
+ "--un-shadow": "0 0 rgba(0,0,0,0)"
130
+ };
131
+ const rings = [
132
+ // size
133
+ [/^ring(?:-(.+))?$/, ([, d], { theme }) => {
134
+ const value = theme.ringWidth?.[d || "DEFAULT"] ?? h.px(d || "1");
135
+ if (value) {
136
+ return {
137
+ "--un-ring-width": value,
138
+ "--un-ring-offset-shadow": "var(--un-ring-inset) 0 0 0 var(--un-ring-offset-width) var(--un-ring-offset-color)",
139
+ "--un-ring-shadow": "var(--un-ring-inset) 0 0 0 calc(var(--un-ring-width) + var(--un-ring-offset-width)) var(--un-ring-color)",
140
+ "box-shadow": "var(--un-ring-offset-shadow), var(--un-ring-shadow), var(--un-shadow)"
141
+ };
142
+ }
143
+ }, { autocomplete: "ring-$ringWidth" }],
144
+ [/^ring-(?:width-|size-)(.+)$/, ([, d], { theme }) => ({ "--un-ring-width": theme.lineWidth?.[d] ?? h.bracket.cssvar.px(d) }), { autocomplete: "ring-(width|size)-$lineWidth" }],
145
+ // offset size
146
+ ["ring-offset", { "--un-ring-offset-width": "1px" }],
147
+ [/^ring-offset-(?:width-|size-)?(.+)$/, ([, d], { theme }) => ({ "--un-ring-offset-width": theme.lineWidth?.[d] ?? h.bracket.cssvar.px(d) }), { autocomplete: "ring-offset-(width|size)-$lineWidth" }],
148
+ // colors
149
+ [/^ring-(.+)$/, colorResolver("--un-ring-color", "ring"), { autocomplete: "ring-$colors" }],
150
+ [/^ring-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-ring-opacity": h.bracket.percent.cssvar(opacity) }), { autocomplete: "ring-(op|opacity)-<percent>" }],
151
+ // offset color
152
+ [/^ring-offset-(.+)$/, colorResolver("--un-ring-offset-color", "ring-offset"), { autocomplete: "ring-offset-$colors" }],
153
+ [/^ring-offset-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-ring-offset-opacity": h.bracket.percent.cssvar(opacity) }), { autocomplete: "ring-offset-(op|opacity)-<percent>" }],
154
+ // style
155
+ ["ring-inset", { "--un-ring-inset": "inset" }]
156
+ ];
157
+
158
+ const boxShadowsBase = {
159
+ "--un-ring-offset-shadow": "0 0 rgba(0,0,0,0)",
160
+ "--un-ring-shadow": "0 0 rgba(0,0,0,0)",
161
+ "--un-shadow-inset": varEmpty,
162
+ "--un-shadow": "0 0 rgba(0,0,0,0)"
163
+ };
164
+ const boxShadows = [
165
+ // color
166
+ [/^shadow(?:-(.+))?$/, (match, context) => {
167
+ const [, d] = match;
168
+ const { theme } = context;
169
+ const v = theme.boxShadow?.[d || "DEFAULT"];
170
+ const c = d ? h.bracket.cssvar(d) : void 0;
171
+ if ((v != null || c != null) && !hasParseableColor(c, theme)) {
172
+ return {
173
+ "--un-shadow": colorableShadows(v || c, "--un-shadow-color").join(","),
174
+ "box-shadow": "var(--un-ring-offset-shadow), var(--un-ring-shadow), var(--un-shadow)"
175
+ };
176
+ }
177
+ return colorResolver("--un-shadow-color", "shadow")(match, context);
178
+ }, { autocomplete: ["shadow-$colors", "shadow-$boxShadow"] }],
179
+ [/^shadow-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-shadow-opacity": h.bracket.percent.cssvar(opacity) }), { autocomplete: "shadow-(op|opacity)-<percent>" }],
180
+ // inset
181
+ ["shadow-inset", { "--un-shadow-inset": "inset" }]
182
+ ];
183
+
184
+ const transformValues = [
185
+ "translate",
186
+ "rotate",
187
+ "scale"
188
+ ];
189
+ const transformCpu = [
190
+ "translateX(var(--un-translate-x))",
191
+ "translateY(var(--un-translate-y))",
192
+ "translateZ(var(--un-translate-z))",
193
+ "rotate(var(--un-rotate))",
194
+ "rotateX(var(--un-rotate-x))",
195
+ "rotateY(var(--un-rotate-y))",
196
+ "rotateZ(var(--un-rotate-z))",
197
+ "skewX(var(--un-skew-x))",
198
+ "skewY(var(--un-skew-y))",
199
+ "scaleX(var(--un-scale-x))",
200
+ "scaleY(var(--un-scale-y))",
201
+ "scaleZ(var(--un-scale-z))"
202
+ ].join(" ");
203
+ const transformGpu = [
204
+ "translate3d(var(--un-translate-x), var(--un-translate-y), var(--un-translate-z))",
205
+ "rotate(var(--un-rotate))",
206
+ "rotateX(var(--un-rotate-x))",
207
+ "rotateY(var(--un-rotate-y))",
208
+ "rotateZ(var(--un-rotate-z))",
209
+ "skewX(var(--un-skew-x))",
210
+ "skewY(var(--un-skew-y))",
211
+ "scaleX(var(--un-scale-x))",
212
+ "scaleY(var(--un-scale-y))",
213
+ "scaleZ(var(--un-scale-z))"
214
+ ].join(" ");
215
+ const transformBase = {
216
+ // transform
217
+ "--un-rotate": 0,
218
+ "--un-rotate-x": 0,
219
+ "--un-rotate-y": 0,
220
+ "--un-rotate-z": 0,
221
+ "--un-scale-x": 1,
222
+ "--un-scale-y": 1,
223
+ "--un-scale-z": 1,
224
+ "--un-skew-x": 0,
225
+ "--un-skew-y": 0,
226
+ "--un-translate-x": 0,
227
+ "--un-translate-y": 0,
228
+ "--un-translate-z": 0
229
+ };
230
+ const transforms = [
231
+ // origins
232
+ [/^(?:transform-)?origin-(.+)$/, ([, s]) => ({ "transform-origin": positionMap[s] ?? h.bracket.cssvar(s) }), { autocomplete: [`transform-origin-(${Object.keys(positionMap).join("|")})`, `origin-(${Object.keys(positionMap).join("|")})`] }],
233
+ // perspectives
234
+ [/^(?:transform-)?perspect(?:ive)?-(.+)$/, ([, s]) => {
235
+ const v = h.bracket.cssvar.px.numberWithUnit(s);
236
+ if (v != null) {
237
+ return {
238
+ "-webkit-perspective": v,
239
+ "perspective": v
240
+ };
241
+ }
242
+ }],
243
+ // skip 1 & 2 letters shortcut
244
+ [/^(?:transform-)?perspect(?:ive)?-origin-(.+)$/, ([, s]) => {
245
+ const v = h.bracket.cssvar(s) ?? (s.length >= 3 ? positionMap[s] : void 0);
246
+ if (v != null) {
247
+ return {
248
+ "-webkit-perspective-origin": v,
249
+ "perspective-origin": v
250
+ };
251
+ }
252
+ }],
253
+ // modifiers
254
+ [/^(?:transform-)?translate-()(.+)$/, handleTranslate],
255
+ [/^(?:transform-)?translate-([xyz])-(.+)$/, handleTranslate],
256
+ [/^(?:transform-)?rotate-()(.+)$/, handleRotate],
257
+ [/^(?:transform-)?rotate-([xyz])-(.+)$/, handleRotate],
258
+ [/^(?:transform-)?skew-()(.+)$/, handleSkew],
259
+ [/^(?:transform-)?skew-([xy])-(.+)$/, handleSkew, { autocomplete: ["transform-skew-(x|y)-<percent>"] }],
260
+ [/^(?:transform-)?scale-()(.+)$/, handleScale],
261
+ [/^(?:transform-)?scale-([xyz])-(.+)$/, handleScale, { autocomplete: [`transform-(${transformValues.join("|")})-<percent>`, `transform-(${transformValues.join("|")})-(x|y|z)-<percent>`] }],
262
+ // style
263
+ [/^(?:transform-)?preserve-3d$/, () => ({ "transform-style": "preserve-3d" })],
264
+ [/^(?:transform-)?preserve-flat$/, () => ({ "transform-style": "flat" })],
265
+ // base
266
+ ["transform", { transform: transformCpu }],
267
+ ["transform-cpu", { transform: transformCpu }],
268
+ ["transform-gpu", { transform: transformGpu }],
269
+ ["transform-none", { transform: "none" }],
270
+ ...makeGlobalStaticRules("transform")
271
+ ];
272
+ function handleTranslate([, d, b], { theme }) {
273
+ const v = theme.spacing?.[b] ?? h.bracket.cssvar.fraction.rem(b);
274
+ if (v != null) {
275
+ return [
276
+ ...xyzMap[d].map((i) => [`--un-translate${i}`, v]),
277
+ ["transform", transformCpu]
278
+ ];
279
+ }
280
+ }
281
+ function handleScale([, d, b]) {
282
+ const v = h.bracket.cssvar.fraction.percent(b);
283
+ if (v != null) {
284
+ return [
285
+ ...xyzMap[d].map((i) => [`--un-scale${i}`, v]),
286
+ ["transform", transformCpu]
287
+ ];
288
+ }
289
+ }
290
+ function handleRotate([, d = "", b]) {
291
+ const v = h.bracket.cssvar.degree(b);
292
+ if (v != null) {
293
+ if (d) {
294
+ return {
295
+ "--un-rotate": 0,
296
+ [`--un-rotate-${d}`]: v,
297
+ "transform": transformCpu
298
+ };
299
+ } else {
300
+ return {
301
+ "--un-rotate-x": 0,
302
+ "--un-rotate-y": 0,
303
+ "--un-rotate-z": 0,
304
+ "--un-rotate": v,
305
+ "transform": transformCpu
306
+ };
307
+ }
308
+ }
309
+ }
310
+ function handleSkew([, d, b]) {
311
+ const v = h.bracket.cssvar.degree(b);
312
+ if (v != null) {
313
+ return [
314
+ ...xyzMap[d].map((i) => [`--un-skew${i}`, v]),
315
+ ["transform", transformCpu]
316
+ ];
317
+ }
318
+ }
319
+
320
+ export { contents as a, boxShadowsBase as b, contentVisibility as c, displays as d, textOverflows as e, textTransforms as f, fontStyles as g, fontSmoothings as h, boxShadows as i, rings as j, cursors as k, appearances as l, resizes as m, breaks as n, transforms as o, pointerEvents as p, contains as q, ringBase as r, textWraps as s, transformBase as t, userSelects as u, varEmpty as v, whitespaces as w };
@@ -0,0 +1,67 @@
1
+ import { DynamicMatcher, ParsedColorValue, CSSObject, VariantContext, StaticRule } from '@unocss/core';
2
+ import { T as Theme } from './preset-mini.32abac2c.mjs';
3
+
4
+ declare const CONTROL_MINI_NO_NEGATIVE = "$$mini-no-negative";
5
+ /**
6
+ * Provide {@link DynamicMatcher} function returning spacing definition. See spacing rules.
7
+ *
8
+ * @param {string} propertyPrefix - Property for the css value to be created. Postfix will be appended according to direction matched.
9
+ * @see {@link directionMap}
10
+ */
11
+ declare function directionSize(propertyPrefix: string): DynamicMatcher;
12
+ /**
13
+ * Split utility shorthand delimited by / or :
14
+ */
15
+ declare function splitShorthand(body: string, type: string): string[];
16
+ /**
17
+ * Parse color string into {@link ParsedColorValue} (if possible). Color value will first be matched to theme object before parsing.
18
+ * See also color.tests.ts for more examples.
19
+ *
20
+ * @example Parseable strings:
21
+ * 'red' // From theme, if 'red' is available
22
+ * 'red-100' // From theme, plus scale
23
+ * 'red-100/20' // From theme, plus scale/opacity
24
+ * '[rgb(100,2,3)]/[var(--op)]' // Bracket with rgb color and bracket with opacity
25
+ *
26
+ * @param {string} body - Color string to be parsed.
27
+ * @param {Theme} theme - {@link Theme} object.
28
+ * @return {ParsedColorValue|undefined} {@link ParsedColorValue} object if string is parseable.
29
+ */
30
+ declare function parseColor(body: string, theme: Theme): ParsedColorValue | undefined;
31
+ /**
32
+ * Provide {@link DynamicMatcher} function to produce color value matched from rule.
33
+ *
34
+ * @see {@link parseColor}
35
+ *
36
+ * @example Resolving 'red' from theme:
37
+ * colorResolver('background-color', 'background')('', 'red')
38
+ * return { 'background-color': '#f12' }
39
+ *
40
+ * @example Resolving 'red-100' from theme:
41
+ * colorResolver('background-color', 'background')('', 'red-100')
42
+ * return { '--un-background-opacity': '1', 'background-color': 'rgba(254,226,226,var(--un-background-opacity))' }
43
+ *
44
+ * @example Resolving 'red-100/20' from theme:
45
+ * colorResolver('background-color', 'background')('', 'red-100/20')
46
+ * return { 'background-color': 'rgba(204,251,241,0.22)' }
47
+ *
48
+ * @example Resolving 'hex-124':
49
+ * colorResolver('color', 'text')('', 'hex-124')
50
+ * return { '--un-text-opacity': '1', 'color': 'rgba(17,34,68,var(--un-text-opacity))' }
51
+ *
52
+ * @param {string} property - Property for the css value to be created.
53
+ * @param {string} varName - Base name for the opacity variable.
54
+ * @param {function} [shouldPass] - Function to decide whether to pass the css.
55
+ * @return {@link DynamicMatcher} object.
56
+ */
57
+ declare function colorResolver(property: string, varName: string, shouldPass?: (css: CSSObject) => boolean): DynamicMatcher;
58
+ declare function colorableShadows(shadows: string | string[], colorVar: string): string[];
59
+ declare function hasParseableColor(color: string | undefined, theme: Theme): boolean;
60
+ declare function resolveBreakpoints({ theme, generator }: Readonly<VariantContext<Theme>>): Record<string, string> | undefined;
61
+ declare function resolveVerticalBreakpoints({ theme, generator }: Readonly<VariantContext<Theme>>): Record<string, string> | undefined;
62
+ declare function makeGlobalStaticRules(prefix: string, property?: string): StaticRule[];
63
+ declare function getBracket(str: string, open: string, close: string): string[] | undefined;
64
+ declare function getComponent(str: string, open: string, close: string, separators: string | string[]): string[] | undefined;
65
+ declare function getComponents(str: string, separators: string | string[], limit?: number): string[] | undefined;
66
+
67
+ export { CONTROL_MINI_NO_NEGATIVE as C, colorableShadows as a, resolveVerticalBreakpoints as b, colorResolver as c, directionSize as d, getComponent as e, getComponents as f, getBracket as g, hasParseableColor as h, makeGlobalStaticRules as m, parseColor as p, resolveBreakpoints as r, splitShorthand as s };
@@ -68,4 +68,4 @@ interface Theme {
68
68
  preflightBase?: Record<string, string | number>;
69
69
  }
70
70
 
71
- export { Colors as C, Theme as T, ThemeAnimation as a };
71
+ export type { Colors as C, Theme as T, ThemeAnimation as a };
@@ -0,0 +1,71 @@
1
+ import { Arrayable } from '@unocss/core';
2
+
3
+ interface ThemeAnimation {
4
+ keyframes?: Record<string, string>;
5
+ durations?: Record<string, string>;
6
+ timingFns?: Record<string, string>;
7
+ properties?: Record<string, object>;
8
+ counts?: Record<string, string | number>;
9
+ }
10
+ interface Colors {
11
+ [key: string]: Colors & {
12
+ DEFAULT?: string;
13
+ } | string;
14
+ }
15
+ interface Theme {
16
+ width?: Record<string, string>;
17
+ height?: Record<string, string>;
18
+ maxWidth?: Record<string, string>;
19
+ maxHeight?: Record<string, string>;
20
+ minWidth?: Record<string, string>;
21
+ minHeight?: Record<string, string>;
22
+ inlineSize?: Record<string, string>;
23
+ blockSize?: Record<string, string>;
24
+ maxInlineSize?: Record<string, string>;
25
+ maxBlockSize?: Record<string, string>;
26
+ minInlineSize?: Record<string, string>;
27
+ minBlockSize?: Record<string, string>;
28
+ borderRadius?: Record<string, string>;
29
+ breakpoints?: Record<string, string>;
30
+ verticalBreakpoints?: Record<string, string>;
31
+ colors?: Colors;
32
+ fontFamily?: Record<string, string>;
33
+ fontSize?: Record<string, string | [string, string]>;
34
+ fontWeight?: Record<string, string>;
35
+ lineHeight?: Record<string, string>;
36
+ letterSpacing?: Record<string, string>;
37
+ wordSpacing?: Record<string, string>;
38
+ boxShadow?: Record<string, string | string[]>;
39
+ textIndent?: Record<string, string>;
40
+ textShadow?: Record<string, string | string[]>;
41
+ textStrokeWidth?: Record<string, string>;
42
+ ringWidth?: Record<string, string>;
43
+ lineWidth?: Record<string, string>;
44
+ spacing?: Record<string, string>;
45
+ duration?: Record<string, string>;
46
+ aria?: Record<string, string>;
47
+ data?: Record<string, string>;
48
+ blur?: Record<string, string>;
49
+ dropShadow?: Record<string, string | string[]>;
50
+ easing?: Record<string, string>;
51
+ media?: Record<string, string>;
52
+ supports?: Record<string, string>;
53
+ containers?: Record<string, string>;
54
+ animation?: ThemeAnimation;
55
+ gridAutoColumn?: Record<string, string>;
56
+ gridAutoRow?: Record<string, string>;
57
+ gridColumn?: Record<string, string>;
58
+ gridRow?: Record<string, string>;
59
+ gridTemplateColumn?: Record<string, string>;
60
+ gridTemplateRow?: Record<string, string>;
61
+ container?: {
62
+ center?: boolean;
63
+ padding?: string | Record<string, string>;
64
+ maxWidth?: Record<string, string>;
65
+ };
66
+ /** Used to generate CSS variables placeholder in preflight */
67
+ preflightRoot?: Arrayable<string>;
68
+ preflightBase?: Record<string, string | number>;
69
+ }
70
+
71
+ export type { Colors as C, Theme as T, ThemeAnimation as a };
@@ -0,0 +1,71 @@
1
+ import { Arrayable } from '@unocss/core';
2
+
3
+ interface ThemeAnimation {
4
+ keyframes?: Record<string, string>;
5
+ durations?: Record<string, string>;
6
+ timingFns?: Record<string, string>;
7
+ properties?: Record<string, object>;
8
+ counts?: Record<string, string | number>;
9
+ }
10
+ interface Colors {
11
+ [key: string]: Colors & {
12
+ DEFAULT?: string;
13
+ } | string;
14
+ }
15
+ interface Theme {
16
+ width?: Record<string, string>;
17
+ height?: Record<string, string>;
18
+ maxWidth?: Record<string, string>;
19
+ maxHeight?: Record<string, string>;
20
+ minWidth?: Record<string, string>;
21
+ minHeight?: Record<string, string>;
22
+ inlineSize?: Record<string, string>;
23
+ blockSize?: Record<string, string>;
24
+ maxInlineSize?: Record<string, string>;
25
+ maxBlockSize?: Record<string, string>;
26
+ minInlineSize?: Record<string, string>;
27
+ minBlockSize?: Record<string, string>;
28
+ borderRadius?: Record<string, string>;
29
+ breakpoints?: Record<string, string>;
30
+ verticalBreakpoints?: Record<string, string>;
31
+ colors?: Colors;
32
+ fontFamily?: Record<string, string>;
33
+ fontSize?: Record<string, string | [string, string]>;
34
+ fontWeight?: Record<string, string>;
35
+ lineHeight?: Record<string, string>;
36
+ letterSpacing?: Record<string, string>;
37
+ wordSpacing?: Record<string, string>;
38
+ boxShadow?: Record<string, string | string[]>;
39
+ textIndent?: Record<string, string>;
40
+ textShadow?: Record<string, string | string[]>;
41
+ textStrokeWidth?: Record<string, string>;
42
+ ringWidth?: Record<string, string>;
43
+ lineWidth?: Record<string, string>;
44
+ spacing?: Record<string, string>;
45
+ duration?: Record<string, string>;
46
+ aria?: Record<string, string>;
47
+ data?: Record<string, string>;
48
+ blur?: Record<string, string>;
49
+ dropShadow?: Record<string, string | string[]>;
50
+ easing?: Record<string, string>;
51
+ media?: Record<string, string>;
52
+ supports?: Record<string, string>;
53
+ containers?: Record<string, string>;
54
+ animation?: ThemeAnimation;
55
+ gridAutoColumn?: Record<string, string>;
56
+ gridAutoRow?: Record<string, string>;
57
+ gridColumn?: Record<string, string>;
58
+ gridRow?: Record<string, string>;
59
+ gridTemplateColumn?: Record<string, string>;
60
+ gridTemplateRow?: Record<string, string>;
61
+ container?: {
62
+ center?: boolean;
63
+ padding?: string | Record<string, string>;
64
+ maxWidth?: Record<string, string>;
65
+ };
66
+ /** Used to generate CSS variables placeholder in preflight */
67
+ preflightRoot?: Arrayable<string>;
68
+ preflightBase?: Record<string, string | number>;
69
+ }
70
+
71
+ export type { Colors as C, Theme as T, ThemeAnimation as a };
@@ -1,4 +1,4 @@
1
- import { C as Colors } from './types-d991ba46.js';
1
+ import { C as Colors } from './preset-mini.32abac2c.js';
2
2
 
3
3
  declare const theme: {
4
4
  width: {