@unocss/preset-mini 0.55.0 → 0.55.2
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/colors.cjs +360 -6
- package/dist/{colors-dabdd21f.d.ts → colors.d.cts} +3 -2
- package/dist/colors.d.mts +354 -0
- package/dist/colors.d.ts +353 -2
- package/dist/colors.mjs +361 -1
- package/dist/index.cjs +12 -12
- package/dist/index.d.cts +69 -0
- package/dist/index.d.mts +69 -0
- package/dist/index.d.ts +6 -6
- package/dist/index.mjs +9 -10
- package/dist/rules.cjs +928 -48
- package/dist/rules.d.cts +133 -0
- package/dist/rules.d.mts +133 -0
- package/dist/rules.d.ts +1 -1
- package/dist/rules.mjs +891 -4
- package/dist/{default-1f25a0ae.d.ts → shared/preset-mini.024bdcea.d.ts} +1 -1
- package/dist/shared/preset-mini.0a9763df.d.mts +721 -0
- package/dist/shared/preset-mini.0fac4963.mjs +320 -0
- package/dist/shared/preset-mini.5bfee53b.cjs +344 -0
- package/dist/shared/preset-mini.5f54784f.d.mts +71 -0
- package/dist/shared/preset-mini.5f54784f.d.ts +71 -0
- package/dist/shared/preset-mini.aa3a264b.d.cts +67 -0
- package/dist/shared/{preset-mini.a21c5071.cjs → preset-mini.b4ad509c.cjs} +12 -8
- package/dist/shared/preset-mini.d69a12a5.d.cts +721 -0
- package/dist/{utilities-d496540e.d.ts → shared/preset-mini.e93c20db.d.ts} +1 -1
- package/dist/shared/{preset-mini.6c1c8016.mjs → preset-mini.f1fe435e.mjs} +13 -9
- package/dist/shared/preset-mini.fc26b619.d.mts +67 -0
- package/dist/theme.cjs +308 -34
- package/dist/theme.d.cts +264 -0
- package/dist/theme.d.mts +264 -0
- package/dist/theme.d.ts +5 -5
- package/dist/theme.mjs +284 -4
- package/dist/utils.cjs +81 -10
- package/dist/utils.d.cts +83 -0
- package/dist/utils.d.mts +83 -0
- package/dist/utils.d.ts +18 -18
- package/dist/utils.mjs +81 -3
- package/dist/variants.cjs +737 -33
- package/dist/variants.d.cts +46 -0
- package/dist/variants.d.mts +46 -0
- package/dist/variants.d.ts +4 -4
- package/dist/variants.mjs +714 -4
- package/package.json +3 -3
- package/dist/shared/preset-mini.0131b915.mjs +0 -704
- package/dist/shared/preset-mini.1c66bf79.mjs +0 -361
- package/dist/shared/preset-mini.74f9d55e.mjs +0 -80
- package/dist/shared/preset-mini.811eb23d.mjs +0 -681
- package/dist/shared/preset-mini.8dd73081.mjs +0 -452
- package/dist/shared/preset-mini.9d93761b.cjs +0 -729
- package/dist/shared/preset-mini.b8d9397e.cjs +0 -471
- package/dist/shared/preset-mini.ce5169f2.cjs +0 -730
- package/dist/shared/preset-mini.d778b487.cjs +0 -85
- package/dist/shared/preset-mini.de3bd9f7.mjs +0 -284
- package/dist/shared/preset-mini.e078d7da.cjs +0 -313
- package/dist/shared/preset-mini.f3fc54d2.cjs +0 -363
- /package/dist/{types-d991ba46.d.ts → shared/preset-mini.5f54784f.d.cts} +0 -0
package/dist/theme.mjs
CHANGED
|
@@ -1,5 +1,285 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import './shared/preset-mini.
|
|
4
|
-
import './shared/preset-mini.6c1c8016.mjs';
|
|
1
|
+
import { colors } from './colors.mjs';
|
|
2
|
+
import { t as transformBase, b as boxShadowsBase, r as ringBase } from './shared/preset-mini.0fac4963.mjs';
|
|
3
|
+
import './shared/preset-mini.f1fe435e.mjs';
|
|
5
4
|
import '@unocss/core';
|
|
5
|
+
|
|
6
|
+
const fontFamily = {
|
|
7
|
+
sans: [
|
|
8
|
+
"ui-sans-serif",
|
|
9
|
+
"system-ui",
|
|
10
|
+
"-apple-system",
|
|
11
|
+
"BlinkMacSystemFont",
|
|
12
|
+
'"Segoe UI"',
|
|
13
|
+
"Roboto",
|
|
14
|
+
'"Helvetica Neue"',
|
|
15
|
+
"Arial",
|
|
16
|
+
'"Noto Sans"',
|
|
17
|
+
"sans-serif",
|
|
18
|
+
'"Apple Color Emoji"',
|
|
19
|
+
'"Segoe UI Emoji"',
|
|
20
|
+
'"Segoe UI Symbol"',
|
|
21
|
+
'"Noto Color Emoji"'
|
|
22
|
+
].join(","),
|
|
23
|
+
serif: [
|
|
24
|
+
"ui-serif",
|
|
25
|
+
"Georgia",
|
|
26
|
+
"Cambria",
|
|
27
|
+
'"Times New Roman"',
|
|
28
|
+
"Times",
|
|
29
|
+
"serif"
|
|
30
|
+
].join(","),
|
|
31
|
+
mono: [
|
|
32
|
+
"ui-monospace",
|
|
33
|
+
"SFMono-Regular",
|
|
34
|
+
"Menlo",
|
|
35
|
+
"Monaco",
|
|
36
|
+
"Consolas",
|
|
37
|
+
'"Liberation Mono"',
|
|
38
|
+
'"Courier New"',
|
|
39
|
+
"monospace"
|
|
40
|
+
].join(",")
|
|
41
|
+
};
|
|
42
|
+
const fontSize = {
|
|
43
|
+
"xs": ["0.75rem", "1rem"],
|
|
44
|
+
"sm": ["0.875rem", "1.25rem"],
|
|
45
|
+
"base": ["1rem", "1.5rem"],
|
|
46
|
+
"lg": ["1.125rem", "1.75rem"],
|
|
47
|
+
"xl": ["1.25rem", "1.75rem"],
|
|
48
|
+
"2xl": ["1.5rem", "2rem"],
|
|
49
|
+
"3xl": ["1.875rem", "2.25rem"],
|
|
50
|
+
"4xl": ["2.25rem", "2.5rem"],
|
|
51
|
+
"5xl": ["3rem", "1"],
|
|
52
|
+
"6xl": ["3.75rem", "1"],
|
|
53
|
+
"7xl": ["4.5rem", "1"],
|
|
54
|
+
"8xl": ["6rem", "1"],
|
|
55
|
+
"9xl": ["8rem", "1"]
|
|
56
|
+
};
|
|
57
|
+
const textIndent = {
|
|
58
|
+
"DEFAULT": "1.5rem",
|
|
59
|
+
"xs": "0.5rem",
|
|
60
|
+
"sm": "1rem",
|
|
61
|
+
"md": "1.5rem",
|
|
62
|
+
"lg": "2rem",
|
|
63
|
+
"xl": "2.5rem",
|
|
64
|
+
"2xl": "3rem",
|
|
65
|
+
"3xl": "4rem"
|
|
66
|
+
};
|
|
67
|
+
const textStrokeWidth = {
|
|
68
|
+
DEFAULT: "1.5rem",
|
|
69
|
+
none: "0",
|
|
70
|
+
sm: "thin",
|
|
71
|
+
md: "medium",
|
|
72
|
+
lg: "thick"
|
|
73
|
+
};
|
|
74
|
+
const textShadow = {
|
|
75
|
+
DEFAULT: ["0 0 1px rgba(0,0,0,0.2)", "0 0 1px rgba(1,0,5,0.1)"],
|
|
76
|
+
none: "0 0 rgba(0,0,0,0)",
|
|
77
|
+
sm: "1px 1px 3px rgba(36,37,47,0.25)",
|
|
78
|
+
md: ["0 1px 2px rgba(30,29,39,0.19)", "1px 2px 4px rgba(54,64,147,0.18)"],
|
|
79
|
+
lg: ["3px 3px 6px rgba(0,0,0,0.26)", "0 0 5px rgba(15,3,86,0.22)"],
|
|
80
|
+
xl: ["1px 1px 3px rgba(0,0,0,0.29)", "2px 4px 7px rgba(73,64,125,0.35)"]
|
|
81
|
+
};
|
|
82
|
+
const lineHeight = {
|
|
83
|
+
none: "1",
|
|
84
|
+
tight: "1.25",
|
|
85
|
+
snug: "1.375",
|
|
86
|
+
normal: "1.5",
|
|
87
|
+
relaxed: "1.625",
|
|
88
|
+
loose: "2"
|
|
89
|
+
};
|
|
90
|
+
const letterSpacing = {
|
|
91
|
+
tighter: "-0.05em",
|
|
92
|
+
tight: "-0.025em",
|
|
93
|
+
normal: "0em",
|
|
94
|
+
wide: "0.025em",
|
|
95
|
+
wider: "0.05em",
|
|
96
|
+
widest: "0.1em"
|
|
97
|
+
};
|
|
98
|
+
const fontWeight = {
|
|
99
|
+
thin: "100",
|
|
100
|
+
extralight: "200",
|
|
101
|
+
light: "300",
|
|
102
|
+
normal: "400",
|
|
103
|
+
medium: "500",
|
|
104
|
+
semibold: "600",
|
|
105
|
+
bold: "700",
|
|
106
|
+
extrabold: "800",
|
|
107
|
+
black: "900"
|
|
108
|
+
// int[0, 900] -> int
|
|
109
|
+
};
|
|
110
|
+
const wordSpacing = letterSpacing;
|
|
111
|
+
|
|
112
|
+
const breakpoints = {
|
|
113
|
+
"sm": "640px",
|
|
114
|
+
"md": "768px",
|
|
115
|
+
"lg": "1024px",
|
|
116
|
+
"xl": "1280px",
|
|
117
|
+
"2xl": "1536px"
|
|
118
|
+
};
|
|
119
|
+
const verticalBreakpoints = { ...breakpoints };
|
|
120
|
+
const lineWidth = {
|
|
121
|
+
DEFAULT: "1px",
|
|
122
|
+
none: "0"
|
|
123
|
+
};
|
|
124
|
+
const spacing = {
|
|
125
|
+
"DEFAULT": "1rem",
|
|
126
|
+
"none": "0",
|
|
127
|
+
"xs": "0.75rem",
|
|
128
|
+
"sm": "0.875rem",
|
|
129
|
+
"lg": "1.125rem",
|
|
130
|
+
"xl": "1.25rem",
|
|
131
|
+
"2xl": "1.5rem",
|
|
132
|
+
"3xl": "1.875rem",
|
|
133
|
+
"4xl": "2.25rem",
|
|
134
|
+
"5xl": "3rem",
|
|
135
|
+
"6xl": "3.75rem",
|
|
136
|
+
"7xl": "4.5rem",
|
|
137
|
+
"8xl": "6rem",
|
|
138
|
+
"9xl": "8rem"
|
|
139
|
+
};
|
|
140
|
+
const duration = {
|
|
141
|
+
DEFAULT: "150ms",
|
|
142
|
+
none: "0s",
|
|
143
|
+
75: "75ms",
|
|
144
|
+
100: "100ms",
|
|
145
|
+
150: "150ms",
|
|
146
|
+
200: "200ms",
|
|
147
|
+
300: "300ms",
|
|
148
|
+
500: "500ms",
|
|
149
|
+
700: "700ms",
|
|
150
|
+
1e3: "1000ms"
|
|
151
|
+
};
|
|
152
|
+
const borderRadius = {
|
|
153
|
+
"DEFAULT": "0.25rem",
|
|
154
|
+
"none": "0",
|
|
155
|
+
"sm": "0.125rem",
|
|
156
|
+
"md": "0.375rem",
|
|
157
|
+
"lg": "0.5rem",
|
|
158
|
+
"xl": "0.75rem",
|
|
159
|
+
"2xl": "1rem",
|
|
160
|
+
"3xl": "1.5rem",
|
|
161
|
+
"full": "9999px"
|
|
162
|
+
};
|
|
163
|
+
const boxShadow = {
|
|
164
|
+
"DEFAULT": ["var(--un-shadow-inset) 0 1px 3px 0 rgba(0,0,0,0.1)", "var(--un-shadow-inset) 0 1px 2px -1px rgba(0,0,0,0.1)"],
|
|
165
|
+
"none": "0 0 rgba(0,0,0,0)",
|
|
166
|
+
"sm": "var(--un-shadow-inset) 0 1px 2px 0 rgba(0,0,0,0.05)",
|
|
167
|
+
"md": ["var(--un-shadow-inset) 0 4px 6px -1px rgba(0,0,0,0.1)", "var(--un-shadow-inset) 0 2px 4px -2px rgba(0,0,0,0.1)"],
|
|
168
|
+
"lg": ["var(--un-shadow-inset) 0 10px 15px -3px rgba(0,0,0,0.1)", "var(--un-shadow-inset) 0 4px 6px -4px rgba(0,0,0,0.1)"],
|
|
169
|
+
"xl": ["var(--un-shadow-inset) 0 20px 25px -5px rgba(0,0,0,0.1)", "var(--un-shadow-inset) 0 8px 10px -6px rgba(0,0,0,0.1)"],
|
|
170
|
+
"2xl": "var(--un-shadow-inset) 0 25px 50px -12px rgba(0,0,0,0.25)",
|
|
171
|
+
"inner": "inset 0 2px 4px 0 rgba(0,0,0,0.05)"
|
|
172
|
+
};
|
|
173
|
+
const easing = {
|
|
174
|
+
"DEFAULT": "cubic-bezier(0.4, 0, 0.2, 1)",
|
|
175
|
+
"linear": "linear",
|
|
176
|
+
"in": "cubic-bezier(0.4, 0, 1, 1)",
|
|
177
|
+
"out": "cubic-bezier(0, 0, 0.2, 1)",
|
|
178
|
+
"in-out": "cubic-bezier(0.4, 0, 0.2, 1)"
|
|
179
|
+
};
|
|
180
|
+
const ringWidth = {
|
|
181
|
+
DEFAULT: "1px",
|
|
182
|
+
none: "0"
|
|
183
|
+
};
|
|
184
|
+
|
|
185
|
+
const blur = {
|
|
186
|
+
"DEFAULT": "8px",
|
|
187
|
+
"0": "0",
|
|
188
|
+
"sm": "4px",
|
|
189
|
+
"md": "12px",
|
|
190
|
+
"lg": "16px",
|
|
191
|
+
"xl": "24px",
|
|
192
|
+
"2xl": "40px",
|
|
193
|
+
"3xl": "64px"
|
|
194
|
+
};
|
|
195
|
+
const dropShadow = {
|
|
196
|
+
"DEFAULT": ["0 1px 2px rgba(0,0,0,0.1)", "0 1px 1px rgba(0,0,0,0.06)"],
|
|
197
|
+
"sm": "0 1px 1px rgba(0,0,0,0.05)",
|
|
198
|
+
"md": ["0 4px 3px rgba(0,0,0,0.07)", "0 2px 2px rgba(0,0,0,0.06)"],
|
|
199
|
+
"lg": ["0 10px 8px rgba(0,0,0,0.04)", "0 4px 3px rgba(0,0,0,0.1)"],
|
|
200
|
+
"xl": ["0 20px 13px rgba(0,0,0,0.03)", "0 8px 5px rgba(0,0,0,0.08)"],
|
|
201
|
+
"2xl": "0 25px 25px rgba(0,0,0,0.15)",
|
|
202
|
+
"none": "0 0 rgba(0,0,0,0)"
|
|
203
|
+
};
|
|
204
|
+
|
|
205
|
+
const baseSize = {
|
|
206
|
+
"xs": "20rem",
|
|
207
|
+
"sm": "24rem",
|
|
208
|
+
"md": "28rem",
|
|
209
|
+
"lg": "32rem",
|
|
210
|
+
"xl": "36rem",
|
|
211
|
+
"2xl": "42rem",
|
|
212
|
+
"3xl": "48rem",
|
|
213
|
+
"4xl": "56rem",
|
|
214
|
+
"5xl": "64rem",
|
|
215
|
+
"6xl": "72rem",
|
|
216
|
+
"7xl": "80rem",
|
|
217
|
+
"prose": "65ch"
|
|
218
|
+
};
|
|
219
|
+
const width = {
|
|
220
|
+
auto: "auto",
|
|
221
|
+
...baseSize,
|
|
222
|
+
screen: "100vw"
|
|
223
|
+
};
|
|
224
|
+
const maxWidth = {
|
|
225
|
+
none: "none",
|
|
226
|
+
...baseSize,
|
|
227
|
+
screen: "100vw"
|
|
228
|
+
};
|
|
229
|
+
const height = {
|
|
230
|
+
auto: "auto",
|
|
231
|
+
...baseSize,
|
|
232
|
+
screen: "100vh"
|
|
233
|
+
};
|
|
234
|
+
const maxHeight = {
|
|
235
|
+
none: "none",
|
|
236
|
+
...baseSize,
|
|
237
|
+
screen: "100vh"
|
|
238
|
+
};
|
|
239
|
+
const containers = Object.fromEntries(Object.entries(baseSize).map(([k, v]) => [k, `(min-width: ${v})`]));
|
|
240
|
+
|
|
241
|
+
const preflightBase = {
|
|
242
|
+
...transformBase,
|
|
243
|
+
...boxShadowsBase,
|
|
244
|
+
...ringBase
|
|
245
|
+
};
|
|
246
|
+
|
|
247
|
+
const theme = {
|
|
248
|
+
width,
|
|
249
|
+
height,
|
|
250
|
+
maxWidth,
|
|
251
|
+
maxHeight,
|
|
252
|
+
minWidth: maxWidth,
|
|
253
|
+
minHeight: maxHeight,
|
|
254
|
+
inlineSize: width,
|
|
255
|
+
blockSize: height,
|
|
256
|
+
maxInlineSize: maxWidth,
|
|
257
|
+
maxBlockSize: maxHeight,
|
|
258
|
+
minInlineSize: maxWidth,
|
|
259
|
+
minBlockSize: maxHeight,
|
|
260
|
+
colors,
|
|
261
|
+
fontFamily,
|
|
262
|
+
fontSize,
|
|
263
|
+
fontWeight,
|
|
264
|
+
breakpoints,
|
|
265
|
+
verticalBreakpoints,
|
|
266
|
+
borderRadius,
|
|
267
|
+
lineHeight,
|
|
268
|
+
letterSpacing,
|
|
269
|
+
wordSpacing,
|
|
270
|
+
boxShadow,
|
|
271
|
+
textIndent,
|
|
272
|
+
textShadow,
|
|
273
|
+
textStrokeWidth,
|
|
274
|
+
blur,
|
|
275
|
+
dropShadow,
|
|
276
|
+
easing,
|
|
277
|
+
lineWidth,
|
|
278
|
+
spacing,
|
|
279
|
+
duration,
|
|
280
|
+
ringWidth,
|
|
281
|
+
preflightBase,
|
|
282
|
+
containers
|
|
283
|
+
};
|
|
284
|
+
|
|
285
|
+
export { baseSize, blur, borderRadius, boxShadow, breakpoints, colors, containers, dropShadow, duration, easing, fontFamily, fontSize, fontWeight, height, letterSpacing, lineHeight, lineWidth, maxHeight, maxWidth, preflightBase, ringWidth, spacing, textIndent, textShadow, textStrokeWidth, theme, verticalBreakpoints, width, wordSpacing };
|
package/dist/utils.cjs
CHANGED
|
@@ -1,12 +1,83 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const colors = require('./shared/preset-mini.a21c5071.cjs');
|
|
6
|
-
const variants = require('./shared/preset-mini.d778b487.cjs');
|
|
7
|
-
require('@unocss/core');
|
|
8
|
-
|
|
3
|
+
const colors = require('./shared/preset-mini.b4ad509c.cjs');
|
|
4
|
+
const core = require('@unocss/core');
|
|
9
5
|
|
|
6
|
+
function variantMatcher(name, handler) {
|
|
7
|
+
let re;
|
|
8
|
+
return {
|
|
9
|
+
name,
|
|
10
|
+
match(input, ctx) {
|
|
11
|
+
if (!re)
|
|
12
|
+
re = new RegExp(`^${core.escapeRegExp(name)}(?:${ctx.generator.config.separators.join("|")})`);
|
|
13
|
+
const match = input.match(re);
|
|
14
|
+
if (match) {
|
|
15
|
+
return {
|
|
16
|
+
matcher: input.slice(match[0].length),
|
|
17
|
+
handle: (input2, next) => next({
|
|
18
|
+
...input2,
|
|
19
|
+
...handler(input2)
|
|
20
|
+
})
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
autocomplete: `${name}:`
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
function variantParentMatcher(name, parent) {
|
|
28
|
+
let re;
|
|
29
|
+
return {
|
|
30
|
+
name,
|
|
31
|
+
match(input, ctx) {
|
|
32
|
+
if (!re)
|
|
33
|
+
re = new RegExp(`^${core.escapeRegExp(name)}(?:${ctx.generator.config.separators.join("|")})`);
|
|
34
|
+
const match = input.match(re);
|
|
35
|
+
if (match) {
|
|
36
|
+
return {
|
|
37
|
+
matcher: input.slice(match[0].length),
|
|
38
|
+
handle: (input2, next) => next({
|
|
39
|
+
...input2,
|
|
40
|
+
parent: `${input2.parent ? `${input2.parent} $$ ` : ""}${parent}`
|
|
41
|
+
})
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
autocomplete: `${name}:`
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
function variantGetBracket(prefix, matcher, separators) {
|
|
49
|
+
if (matcher.startsWith(`${prefix}[`)) {
|
|
50
|
+
const [match, rest] = colors.getBracket(matcher.slice(prefix.length), "[", "]") ?? [];
|
|
51
|
+
if (match && rest) {
|
|
52
|
+
for (const separator of separators) {
|
|
53
|
+
if (rest.startsWith(separator))
|
|
54
|
+
return [match, rest.slice(separator.length), separator];
|
|
55
|
+
}
|
|
56
|
+
return [match, rest, ""];
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
function variantGetParameter(prefix, matcher, separators) {
|
|
61
|
+
if (matcher.startsWith(prefix)) {
|
|
62
|
+
const body = variantGetBracket(prefix, matcher, separators);
|
|
63
|
+
if (body) {
|
|
64
|
+
const [label = "", rest = body[1]] = variantGetParameter("/", body[1], separators) ?? [];
|
|
65
|
+
return [body[0], rest, label];
|
|
66
|
+
}
|
|
67
|
+
for (const separator of separators.filter((x) => x !== "/")) {
|
|
68
|
+
const pos = matcher.indexOf(separator, prefix.length);
|
|
69
|
+
if (pos !== -1) {
|
|
70
|
+
const labelPos = matcher.indexOf("/", prefix.length);
|
|
71
|
+
const unlabelled = labelPos === -1 || pos <= labelPos;
|
|
72
|
+
return [
|
|
73
|
+
matcher.slice(prefix.length, unlabelled ? pos : labelPos),
|
|
74
|
+
matcher.slice(pos + separator.length),
|
|
75
|
+
unlabelled ? "" : matcher.slice(labelPos + 1, pos)
|
|
76
|
+
];
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
10
81
|
|
|
11
82
|
exports.CONTROL_MINI_NO_NEGATIVE = colors.CONTROL_MINI_NO_NEGATIVE;
|
|
12
83
|
exports.colorOpacityToString = colors.colorOpacityToString;
|
|
@@ -34,7 +105,7 @@ exports.resolveVerticalBreakpoints = colors.resolveVerticalBreakpoints;
|
|
|
34
105
|
exports.splitShorthand = colors.splitShorthand;
|
|
35
106
|
exports.valueHandlers = colors.valueHandlers;
|
|
36
107
|
exports.xyzMap = colors.xyzMap;
|
|
37
|
-
exports.variantGetBracket =
|
|
38
|
-
exports.variantGetParameter =
|
|
39
|
-
exports.variantMatcher =
|
|
40
|
-
exports.variantParentMatcher =
|
|
108
|
+
exports.variantGetBracket = variantGetBracket;
|
|
109
|
+
exports.variantGetParameter = variantGetParameter;
|
|
110
|
+
exports.variantMatcher = variantMatcher;
|
|
111
|
+
exports.variantParentMatcher = variantParentMatcher;
|
package/dist/utils.d.cts
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import * as _unocss_core from '@unocss/core';
|
|
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 './shared/preset-mini.aa3a264b.cjs';
|
|
4
|
+
import './shared/preset-mini.5f54784f.cjs';
|
|
5
|
+
|
|
6
|
+
declare function hex2rgba(hex?: string): RGBAColorValue | undefined;
|
|
7
|
+
declare function parseCssColor(str?: string): CSSColorValue | undefined;
|
|
8
|
+
declare function colorOpacityToString(color: CSSColorValue): string | number;
|
|
9
|
+
declare function colorToString(color: CSSColorValue | string, alphaOverride?: string | number): string;
|
|
10
|
+
|
|
11
|
+
declare const directionMap: Record<string, string[]>;
|
|
12
|
+
declare const insetMap: Record<string, string[]>;
|
|
13
|
+
declare const cornerMap: Record<string, string[]>;
|
|
14
|
+
declare const xyzMap: Record<string, string[]>;
|
|
15
|
+
declare const positionMap: Record<string, string>;
|
|
16
|
+
declare const globalKeywords: string[];
|
|
17
|
+
|
|
18
|
+
declare function numberWithUnit(str: string): string | undefined;
|
|
19
|
+
declare function auto(str: string): "auto" | undefined;
|
|
20
|
+
declare function rem(str: string): string | undefined;
|
|
21
|
+
declare function px(str: string): string | undefined;
|
|
22
|
+
declare function number(str: string): string | undefined;
|
|
23
|
+
declare function percent(str: string): string | undefined;
|
|
24
|
+
declare function fraction(str: string): string | undefined;
|
|
25
|
+
declare function bracket(str: string): string | undefined;
|
|
26
|
+
declare function bracketOfColor(str: string): string | undefined;
|
|
27
|
+
declare function bracketOfLength(str: string): string | undefined;
|
|
28
|
+
declare function bracketOfPosition(str: string): string | undefined;
|
|
29
|
+
declare function cssvar(str: string): string | undefined;
|
|
30
|
+
declare function time(str: string): string | undefined;
|
|
31
|
+
declare function degree(str: string): string | undefined;
|
|
32
|
+
declare function global(str: string): string | undefined;
|
|
33
|
+
declare function properties(str: string): string | undefined;
|
|
34
|
+
declare function position(str: string): string | undefined;
|
|
35
|
+
|
|
36
|
+
declare const handlers_auto: typeof auto;
|
|
37
|
+
declare const handlers_bracket: typeof bracket;
|
|
38
|
+
declare const handlers_bracketOfColor: typeof bracketOfColor;
|
|
39
|
+
declare const handlers_bracketOfLength: typeof bracketOfLength;
|
|
40
|
+
declare const handlers_bracketOfPosition: typeof bracketOfPosition;
|
|
41
|
+
declare const handlers_cssvar: typeof cssvar;
|
|
42
|
+
declare const handlers_degree: typeof degree;
|
|
43
|
+
declare const handlers_fraction: typeof fraction;
|
|
44
|
+
declare const handlers_global: typeof global;
|
|
45
|
+
declare const handlers_number: typeof number;
|
|
46
|
+
declare const handlers_numberWithUnit: typeof numberWithUnit;
|
|
47
|
+
declare const handlers_percent: typeof percent;
|
|
48
|
+
declare const handlers_position: typeof position;
|
|
49
|
+
declare const handlers_properties: typeof properties;
|
|
50
|
+
declare const handlers_px: typeof px;
|
|
51
|
+
declare const handlers_rem: typeof rem;
|
|
52
|
+
declare const handlers_time: typeof time;
|
|
53
|
+
declare namespace handlers {
|
|
54
|
+
export {
|
|
55
|
+
handlers_auto as auto,
|
|
56
|
+
handlers_bracket as bracket,
|
|
57
|
+
handlers_bracketOfColor as bracketOfColor,
|
|
58
|
+
handlers_bracketOfLength as bracketOfLength,
|
|
59
|
+
handlers_bracketOfPosition as bracketOfPosition,
|
|
60
|
+
handlers_cssvar as cssvar,
|
|
61
|
+
handlers_degree as degree,
|
|
62
|
+
handlers_fraction as fraction,
|
|
63
|
+
handlers_global as global,
|
|
64
|
+
handlers_number as number,
|
|
65
|
+
handlers_numberWithUnit as numberWithUnit,
|
|
66
|
+
handlers_percent as percent,
|
|
67
|
+
handlers_position as position,
|
|
68
|
+
handlers_properties as properties,
|
|
69
|
+
handlers_px as px,
|
|
70
|
+
handlers_rem as rem,
|
|
71
|
+
handlers_time as time,
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
declare const handler: _unocss_core.ValueHandler<"number" | "auto" | "position" | "global" | "numberWithUnit" | "rem" | "px" | "percent" | "fraction" | "bracket" | "bracketOfColor" | "bracketOfLength" | "bracketOfPosition" | "cssvar" | "time" | "degree" | "properties">;
|
|
76
|
+
declare const h: _unocss_core.ValueHandler<"number" | "auto" | "position" | "global" | "numberWithUnit" | "rem" | "px" | "percent" | "fraction" | "bracket" | "bracketOfColor" | "bracketOfLength" | "bracketOfPosition" | "cssvar" | "time" | "degree" | "properties">;
|
|
77
|
+
|
|
78
|
+
declare function variantMatcher(name: string, handler: (input: VariantHandlerContext) => Record<string, any>): VariantObject;
|
|
79
|
+
declare function variantParentMatcher(name: string, parent: string): VariantObject;
|
|
80
|
+
declare function variantGetBracket(prefix: string, matcher: string, separators: string[]): string[] | undefined;
|
|
81
|
+
declare function variantGetParameter(prefix: string, matcher: string, separators: string[]): string[] | undefined;
|
|
82
|
+
|
|
83
|
+
export { colorOpacityToString, colorToString, cornerMap, directionMap, globalKeywords, h, handler, hex2rgba, insetMap, parseCssColor, positionMap, handlers as valueHandlers, variantGetBracket, variantGetParameter, variantMatcher, variantParentMatcher, xyzMap };
|
package/dist/utils.d.mts
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import * as _unocss_core from '@unocss/core';
|
|
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 './shared/preset-mini.fc26b619.mjs';
|
|
4
|
+
import './shared/preset-mini.5f54784f.mjs';
|
|
5
|
+
|
|
6
|
+
declare function hex2rgba(hex?: string): RGBAColorValue | undefined;
|
|
7
|
+
declare function parseCssColor(str?: string): CSSColorValue | undefined;
|
|
8
|
+
declare function colorOpacityToString(color: CSSColorValue): string | number;
|
|
9
|
+
declare function colorToString(color: CSSColorValue | string, alphaOverride?: string | number): string;
|
|
10
|
+
|
|
11
|
+
declare const directionMap: Record<string, string[]>;
|
|
12
|
+
declare const insetMap: Record<string, string[]>;
|
|
13
|
+
declare const cornerMap: Record<string, string[]>;
|
|
14
|
+
declare const xyzMap: Record<string, string[]>;
|
|
15
|
+
declare const positionMap: Record<string, string>;
|
|
16
|
+
declare const globalKeywords: string[];
|
|
17
|
+
|
|
18
|
+
declare function numberWithUnit(str: string): string | undefined;
|
|
19
|
+
declare function auto(str: string): "auto" | undefined;
|
|
20
|
+
declare function rem(str: string): string | undefined;
|
|
21
|
+
declare function px(str: string): string | undefined;
|
|
22
|
+
declare function number(str: string): string | undefined;
|
|
23
|
+
declare function percent(str: string): string | undefined;
|
|
24
|
+
declare function fraction(str: string): string | undefined;
|
|
25
|
+
declare function bracket(str: string): string | undefined;
|
|
26
|
+
declare function bracketOfColor(str: string): string | undefined;
|
|
27
|
+
declare function bracketOfLength(str: string): string | undefined;
|
|
28
|
+
declare function bracketOfPosition(str: string): string | undefined;
|
|
29
|
+
declare function cssvar(str: string): string | undefined;
|
|
30
|
+
declare function time(str: string): string | undefined;
|
|
31
|
+
declare function degree(str: string): string | undefined;
|
|
32
|
+
declare function global(str: string): string | undefined;
|
|
33
|
+
declare function properties(str: string): string | undefined;
|
|
34
|
+
declare function position(str: string): string | undefined;
|
|
35
|
+
|
|
36
|
+
declare const handlers_auto: typeof auto;
|
|
37
|
+
declare const handlers_bracket: typeof bracket;
|
|
38
|
+
declare const handlers_bracketOfColor: typeof bracketOfColor;
|
|
39
|
+
declare const handlers_bracketOfLength: typeof bracketOfLength;
|
|
40
|
+
declare const handlers_bracketOfPosition: typeof bracketOfPosition;
|
|
41
|
+
declare const handlers_cssvar: typeof cssvar;
|
|
42
|
+
declare const handlers_degree: typeof degree;
|
|
43
|
+
declare const handlers_fraction: typeof fraction;
|
|
44
|
+
declare const handlers_global: typeof global;
|
|
45
|
+
declare const handlers_number: typeof number;
|
|
46
|
+
declare const handlers_numberWithUnit: typeof numberWithUnit;
|
|
47
|
+
declare const handlers_percent: typeof percent;
|
|
48
|
+
declare const handlers_position: typeof position;
|
|
49
|
+
declare const handlers_properties: typeof properties;
|
|
50
|
+
declare const handlers_px: typeof px;
|
|
51
|
+
declare const handlers_rem: typeof rem;
|
|
52
|
+
declare const handlers_time: typeof time;
|
|
53
|
+
declare namespace handlers {
|
|
54
|
+
export {
|
|
55
|
+
handlers_auto as auto,
|
|
56
|
+
handlers_bracket as bracket,
|
|
57
|
+
handlers_bracketOfColor as bracketOfColor,
|
|
58
|
+
handlers_bracketOfLength as bracketOfLength,
|
|
59
|
+
handlers_bracketOfPosition as bracketOfPosition,
|
|
60
|
+
handlers_cssvar as cssvar,
|
|
61
|
+
handlers_degree as degree,
|
|
62
|
+
handlers_fraction as fraction,
|
|
63
|
+
handlers_global as global,
|
|
64
|
+
handlers_number as number,
|
|
65
|
+
handlers_numberWithUnit as numberWithUnit,
|
|
66
|
+
handlers_percent as percent,
|
|
67
|
+
handlers_position as position,
|
|
68
|
+
handlers_properties as properties,
|
|
69
|
+
handlers_px as px,
|
|
70
|
+
handlers_rem as rem,
|
|
71
|
+
handlers_time as time,
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
declare const handler: _unocss_core.ValueHandler<"number" | "auto" | "position" | "global" | "numberWithUnit" | "rem" | "px" | "percent" | "fraction" | "bracket" | "bracketOfColor" | "bracketOfLength" | "bracketOfPosition" | "cssvar" | "time" | "degree" | "properties">;
|
|
76
|
+
declare const h: _unocss_core.ValueHandler<"number" | "auto" | "position" | "global" | "numberWithUnit" | "rem" | "px" | "percent" | "fraction" | "bracket" | "bracketOfColor" | "bracketOfLength" | "bracketOfPosition" | "cssvar" | "time" | "degree" | "properties">;
|
|
77
|
+
|
|
78
|
+
declare function variantMatcher(name: string, handler: (input: VariantHandlerContext) => Record<string, any>): VariantObject;
|
|
79
|
+
declare function variantParentMatcher(name: string, parent: string): VariantObject;
|
|
80
|
+
declare function variantGetBracket(prefix: string, matcher: string, separators: string[]): string[] | undefined;
|
|
81
|
+
declare function variantGetParameter(prefix: string, matcher: string, separators: string[]): string[] | undefined;
|
|
82
|
+
|
|
83
|
+
export { colorOpacityToString, colorToString, cornerMap, directionMap, globalKeywords, h, handler, hex2rgba, insetMap, parseCssColor, positionMap, handlers as valueHandlers, variantGetBracket, variantGetParameter, variantMatcher, variantParentMatcher, xyzMap };
|
package/dist/utils.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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 './
|
|
4
|
-
import './
|
|
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 './shared/preset-mini.e93c20db.js';
|
|
4
|
+
import './shared/preset-mini.5f54784f.js';
|
|
5
5
|
|
|
6
6
|
declare function hex2rgba(hex?: string): RGBAColorValue | undefined;
|
|
7
7
|
declare function parseCssColor(str?: string): CSSColorValue | undefined;
|
|
@@ -33,42 +33,42 @@ declare function global(str: string): string | undefined;
|
|
|
33
33
|
declare function properties(str: string): string | undefined;
|
|
34
34
|
declare function position(str: string): string | undefined;
|
|
35
35
|
|
|
36
|
-
declare const handlers_numberWithUnit: typeof numberWithUnit;
|
|
37
36
|
declare const handlers_auto: typeof auto;
|
|
38
|
-
declare const handlers_rem: typeof rem;
|
|
39
|
-
declare const handlers_px: typeof px;
|
|
40
|
-
declare const handlers_number: typeof number;
|
|
41
|
-
declare const handlers_percent: typeof percent;
|
|
42
|
-
declare const handlers_fraction: typeof fraction;
|
|
43
37
|
declare const handlers_bracket: typeof bracket;
|
|
44
38
|
declare const handlers_bracketOfColor: typeof bracketOfColor;
|
|
45
39
|
declare const handlers_bracketOfLength: typeof bracketOfLength;
|
|
46
40
|
declare const handlers_bracketOfPosition: typeof bracketOfPosition;
|
|
47
41
|
declare const handlers_cssvar: typeof cssvar;
|
|
48
|
-
declare const handlers_time: typeof time;
|
|
49
42
|
declare const handlers_degree: typeof degree;
|
|
43
|
+
declare const handlers_fraction: typeof fraction;
|
|
50
44
|
declare const handlers_global: typeof global;
|
|
51
|
-
declare const
|
|
45
|
+
declare const handlers_number: typeof number;
|
|
46
|
+
declare const handlers_numberWithUnit: typeof numberWithUnit;
|
|
47
|
+
declare const handlers_percent: typeof percent;
|
|
52
48
|
declare const handlers_position: typeof position;
|
|
49
|
+
declare const handlers_properties: typeof properties;
|
|
50
|
+
declare const handlers_px: typeof px;
|
|
51
|
+
declare const handlers_rem: typeof rem;
|
|
52
|
+
declare const handlers_time: typeof time;
|
|
53
53
|
declare namespace handlers {
|
|
54
54
|
export {
|
|
55
|
-
handlers_numberWithUnit as numberWithUnit,
|
|
56
55
|
handlers_auto as auto,
|
|
57
|
-
handlers_rem as rem,
|
|
58
|
-
handlers_px as px,
|
|
59
|
-
handlers_number as number,
|
|
60
|
-
handlers_percent as percent,
|
|
61
|
-
handlers_fraction as fraction,
|
|
62
56
|
handlers_bracket as bracket,
|
|
63
57
|
handlers_bracketOfColor as bracketOfColor,
|
|
64
58
|
handlers_bracketOfLength as bracketOfLength,
|
|
65
59
|
handlers_bracketOfPosition as bracketOfPosition,
|
|
66
60
|
handlers_cssvar as cssvar,
|
|
67
|
-
handlers_time as time,
|
|
68
61
|
handlers_degree as degree,
|
|
62
|
+
handlers_fraction as fraction,
|
|
69
63
|
handlers_global as global,
|
|
70
|
-
|
|
64
|
+
handlers_number as number,
|
|
65
|
+
handlers_numberWithUnit as numberWithUnit,
|
|
66
|
+
handlers_percent as percent,
|
|
71
67
|
handlers_position as position,
|
|
68
|
+
handlers_properties as properties,
|
|
69
|
+
handlers_px as px,
|
|
70
|
+
handlers_rem as rem,
|
|
71
|
+
handlers_time as time,
|
|
72
72
|
};
|
|
73
73
|
}
|
|
74
74
|
|