@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.
- 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/shared/preset-mini.0d957b3b.d.mts +721 -0
- package/dist/shared/preset-mini.0fac4963.mjs +320 -0
- package/dist/shared/preset-mini.2f8c3259.d.mts +67 -0
- package/dist/{types-d991ba46.d.ts → shared/preset-mini.32abac2c.d.cts} +1 -1
- package/dist/shared/preset-mini.32abac2c.d.mts +71 -0
- package/dist/shared/preset-mini.32abac2c.d.ts +71 -0
- package/dist/{default-1f25a0ae.d.ts → shared/preset-mini.3a79e471.d.ts} +1 -1
- package/dist/shared/preset-mini.5bfee53b.cjs +344 -0
- package/dist/shared/preset-mini.7b9de562.d.cts +67 -0
- package/dist/shared/{preset-mini.a21c5071.cjs → preset-mini.b4ad509c.cjs} +12 -8
- package/dist/shared/{preset-mini.6c1c8016.mjs → preset-mini.f1fe435e.mjs} +13 -9
- package/dist/shared/preset-mini.f67366b3.d.cts +721 -0
- package/dist/{utilities-d496540e.d.ts → shared/preset-mini.fa67009f.d.ts} +1 -1
- 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 +65 -0
- package/dist/utils.d.mts +65 -0
- package/dist/utils.d.ts +13 -31
- 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/theme.d.mts
ADDED
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
export { colors } from './colors.mjs';
|
|
2
|
+
export { t as theme } from './shared/preset-mini.0d957b3b.mjs';
|
|
3
|
+
import { T as Theme } from './shared/preset-mini.32abac2c.mjs';
|
|
4
|
+
export { C as Colors, a as ThemeAnimation } from './shared/preset-mini.32abac2c.mjs';
|
|
5
|
+
import '@unocss/core';
|
|
6
|
+
|
|
7
|
+
declare const blur: {
|
|
8
|
+
DEFAULT: string;
|
|
9
|
+
'0': string;
|
|
10
|
+
sm: string;
|
|
11
|
+
md: string;
|
|
12
|
+
lg: string;
|
|
13
|
+
xl: string;
|
|
14
|
+
'2xl': string;
|
|
15
|
+
'3xl': string;
|
|
16
|
+
};
|
|
17
|
+
declare const dropShadow: {
|
|
18
|
+
DEFAULT: string[];
|
|
19
|
+
sm: string;
|
|
20
|
+
md: string[];
|
|
21
|
+
lg: string[];
|
|
22
|
+
xl: string[];
|
|
23
|
+
'2xl': string;
|
|
24
|
+
none: string;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
declare const fontFamily: {
|
|
28
|
+
sans: string;
|
|
29
|
+
serif: string;
|
|
30
|
+
mono: string;
|
|
31
|
+
};
|
|
32
|
+
declare const fontSize: Theme['fontSize'];
|
|
33
|
+
declare const textIndent: Theme['textIndent'];
|
|
34
|
+
declare const textStrokeWidth: Theme['textStrokeWidth'];
|
|
35
|
+
declare const textShadow: {
|
|
36
|
+
DEFAULT: string[];
|
|
37
|
+
none: string;
|
|
38
|
+
sm: string;
|
|
39
|
+
md: string[];
|
|
40
|
+
lg: string[];
|
|
41
|
+
xl: string[];
|
|
42
|
+
};
|
|
43
|
+
declare const lineHeight: {
|
|
44
|
+
none: string;
|
|
45
|
+
tight: string;
|
|
46
|
+
snug: string;
|
|
47
|
+
normal: string;
|
|
48
|
+
relaxed: string;
|
|
49
|
+
loose: string;
|
|
50
|
+
};
|
|
51
|
+
declare const letterSpacing: {
|
|
52
|
+
tighter: string;
|
|
53
|
+
tight: string;
|
|
54
|
+
normal: string;
|
|
55
|
+
wide: string;
|
|
56
|
+
wider: string;
|
|
57
|
+
widest: string;
|
|
58
|
+
};
|
|
59
|
+
declare const fontWeight: {
|
|
60
|
+
thin: string;
|
|
61
|
+
extralight: string;
|
|
62
|
+
light: string;
|
|
63
|
+
normal: string;
|
|
64
|
+
medium: string;
|
|
65
|
+
semibold: string;
|
|
66
|
+
bold: string;
|
|
67
|
+
extrabold: string;
|
|
68
|
+
black: string;
|
|
69
|
+
};
|
|
70
|
+
declare const wordSpacing: {
|
|
71
|
+
tighter: string;
|
|
72
|
+
tight: string;
|
|
73
|
+
normal: string;
|
|
74
|
+
wide: string;
|
|
75
|
+
wider: string;
|
|
76
|
+
widest: string;
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
declare const breakpoints: {
|
|
80
|
+
sm: string;
|
|
81
|
+
md: string;
|
|
82
|
+
lg: string;
|
|
83
|
+
xl: string;
|
|
84
|
+
'2xl': string;
|
|
85
|
+
};
|
|
86
|
+
declare const verticalBreakpoints: {
|
|
87
|
+
sm: string;
|
|
88
|
+
md: string;
|
|
89
|
+
lg: string;
|
|
90
|
+
xl: string;
|
|
91
|
+
'2xl': string;
|
|
92
|
+
};
|
|
93
|
+
declare const lineWidth: {
|
|
94
|
+
DEFAULT: string;
|
|
95
|
+
none: string;
|
|
96
|
+
};
|
|
97
|
+
declare const spacing: {
|
|
98
|
+
DEFAULT: string;
|
|
99
|
+
none: string;
|
|
100
|
+
xs: string;
|
|
101
|
+
sm: string;
|
|
102
|
+
lg: string;
|
|
103
|
+
xl: string;
|
|
104
|
+
'2xl': string;
|
|
105
|
+
'3xl': string;
|
|
106
|
+
'4xl': string;
|
|
107
|
+
'5xl': string;
|
|
108
|
+
'6xl': string;
|
|
109
|
+
'7xl': string;
|
|
110
|
+
'8xl': string;
|
|
111
|
+
'9xl': string;
|
|
112
|
+
};
|
|
113
|
+
declare const duration: {
|
|
114
|
+
DEFAULT: string;
|
|
115
|
+
none: string;
|
|
116
|
+
75: string;
|
|
117
|
+
100: string;
|
|
118
|
+
150: string;
|
|
119
|
+
200: string;
|
|
120
|
+
300: string;
|
|
121
|
+
500: string;
|
|
122
|
+
700: string;
|
|
123
|
+
1000: string;
|
|
124
|
+
};
|
|
125
|
+
declare const borderRadius: {
|
|
126
|
+
DEFAULT: string;
|
|
127
|
+
none: string;
|
|
128
|
+
sm: string;
|
|
129
|
+
md: string;
|
|
130
|
+
lg: string;
|
|
131
|
+
xl: string;
|
|
132
|
+
'2xl': string;
|
|
133
|
+
'3xl': string;
|
|
134
|
+
full: string;
|
|
135
|
+
};
|
|
136
|
+
declare const boxShadow: {
|
|
137
|
+
DEFAULT: string[];
|
|
138
|
+
none: string;
|
|
139
|
+
sm: string;
|
|
140
|
+
md: string[];
|
|
141
|
+
lg: string[];
|
|
142
|
+
xl: string[];
|
|
143
|
+
'2xl': string;
|
|
144
|
+
inner: string;
|
|
145
|
+
};
|
|
146
|
+
declare const easing: {
|
|
147
|
+
DEFAULT: string;
|
|
148
|
+
linear: string;
|
|
149
|
+
in: string;
|
|
150
|
+
out: string;
|
|
151
|
+
'in-out': string;
|
|
152
|
+
};
|
|
153
|
+
declare const ringWidth: {
|
|
154
|
+
DEFAULT: string;
|
|
155
|
+
none: string;
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
declare const preflightBase: {
|
|
159
|
+
'--un-ring-inset': string;
|
|
160
|
+
'--un-ring-offset-width': string;
|
|
161
|
+
'--un-ring-offset-color': string;
|
|
162
|
+
'--un-ring-width': string;
|
|
163
|
+
'--un-ring-color': string;
|
|
164
|
+
'--un-shadow': string;
|
|
165
|
+
'--un-ring-offset-shadow': string;
|
|
166
|
+
'--un-ring-shadow': string;
|
|
167
|
+
'--un-shadow-inset': string;
|
|
168
|
+
'--un-rotate': number;
|
|
169
|
+
'--un-rotate-x': number;
|
|
170
|
+
'--un-rotate-y': number;
|
|
171
|
+
'--un-rotate-z': number;
|
|
172
|
+
'--un-scale-x': number;
|
|
173
|
+
'--un-scale-y': number;
|
|
174
|
+
'--un-scale-z': number;
|
|
175
|
+
'--un-skew-x': number;
|
|
176
|
+
'--un-skew-y': number;
|
|
177
|
+
'--un-translate-x': number;
|
|
178
|
+
'--un-translate-y': number;
|
|
179
|
+
'--un-translate-z': number;
|
|
180
|
+
};
|
|
181
|
+
|
|
182
|
+
declare const baseSize: {
|
|
183
|
+
xs: string;
|
|
184
|
+
sm: string;
|
|
185
|
+
md: string;
|
|
186
|
+
lg: string;
|
|
187
|
+
xl: string;
|
|
188
|
+
'2xl': string;
|
|
189
|
+
'3xl': string;
|
|
190
|
+
'4xl': string;
|
|
191
|
+
'5xl': string;
|
|
192
|
+
'6xl': string;
|
|
193
|
+
'7xl': string;
|
|
194
|
+
prose: string;
|
|
195
|
+
};
|
|
196
|
+
declare const width: {
|
|
197
|
+
screen: string;
|
|
198
|
+
xs: string;
|
|
199
|
+
sm: string;
|
|
200
|
+
md: string;
|
|
201
|
+
lg: string;
|
|
202
|
+
xl: string;
|
|
203
|
+
'2xl': string;
|
|
204
|
+
'3xl': string;
|
|
205
|
+
'4xl': string;
|
|
206
|
+
'5xl': string;
|
|
207
|
+
'6xl': string;
|
|
208
|
+
'7xl': string;
|
|
209
|
+
prose: string;
|
|
210
|
+
auto: string;
|
|
211
|
+
};
|
|
212
|
+
declare const maxWidth: {
|
|
213
|
+
screen: string;
|
|
214
|
+
xs: string;
|
|
215
|
+
sm: string;
|
|
216
|
+
md: string;
|
|
217
|
+
lg: string;
|
|
218
|
+
xl: string;
|
|
219
|
+
'2xl': string;
|
|
220
|
+
'3xl': string;
|
|
221
|
+
'4xl': string;
|
|
222
|
+
'5xl': string;
|
|
223
|
+
'6xl': string;
|
|
224
|
+
'7xl': string;
|
|
225
|
+
prose: string;
|
|
226
|
+
none: string;
|
|
227
|
+
};
|
|
228
|
+
declare const height: {
|
|
229
|
+
screen: string;
|
|
230
|
+
xs: string;
|
|
231
|
+
sm: string;
|
|
232
|
+
md: string;
|
|
233
|
+
lg: string;
|
|
234
|
+
xl: string;
|
|
235
|
+
'2xl': string;
|
|
236
|
+
'3xl': string;
|
|
237
|
+
'4xl': string;
|
|
238
|
+
'5xl': string;
|
|
239
|
+
'6xl': string;
|
|
240
|
+
'7xl': string;
|
|
241
|
+
prose: string;
|
|
242
|
+
auto: string;
|
|
243
|
+
};
|
|
244
|
+
declare const maxHeight: {
|
|
245
|
+
screen: string;
|
|
246
|
+
xs: string;
|
|
247
|
+
sm: string;
|
|
248
|
+
md: string;
|
|
249
|
+
lg: string;
|
|
250
|
+
xl: string;
|
|
251
|
+
'2xl': string;
|
|
252
|
+
'3xl': string;
|
|
253
|
+
'4xl': string;
|
|
254
|
+
'5xl': string;
|
|
255
|
+
'6xl': string;
|
|
256
|
+
'7xl': string;
|
|
257
|
+
prose: string;
|
|
258
|
+
none: string;
|
|
259
|
+
};
|
|
260
|
+
declare const containers: {
|
|
261
|
+
[k: string]: string;
|
|
262
|
+
};
|
|
263
|
+
|
|
264
|
+
export { Theme, baseSize, blur, borderRadius, boxShadow, breakpoints, containers, dropShadow, duration, easing, fontFamily, fontSize, fontWeight, height, letterSpacing, lineHeight, lineWidth, maxHeight, maxWidth, preflightBase, ringWidth, spacing, textIndent, textShadow, textStrokeWidth, verticalBreakpoints, width, wordSpacing };
|
package/dist/theme.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export { t as theme } from './
|
|
3
|
-
import { T as Theme } from './
|
|
4
|
-
export { C as Colors,
|
|
1
|
+
export { colors } from './colors.js';
|
|
2
|
+
export { t as theme } from './shared/preset-mini.3a79e471.js';
|
|
3
|
+
import { T as Theme } from './shared/preset-mini.32abac2c.js';
|
|
4
|
+
export { C as Colors, a as ThemeAnimation } from './shared/preset-mini.32abac2c.js';
|
|
5
5
|
import '@unocss/core';
|
|
6
6
|
|
|
7
7
|
declare const blur: {
|
|
@@ -261,4 +261,4 @@ declare const containers: {
|
|
|
261
261
|
[k: string]: string;
|
|
262
262
|
};
|
|
263
263
|
|
|
264
|
-
export { baseSize, blur, borderRadius, boxShadow, breakpoints, containers, dropShadow, duration, easing, fontFamily, fontSize, fontWeight, height, letterSpacing, lineHeight, lineWidth, maxHeight, maxWidth, preflightBase, ringWidth, spacing, textIndent, textShadow, textStrokeWidth, verticalBreakpoints, width, wordSpacing };
|
|
264
|
+
export { Theme, baseSize, blur, borderRadius, boxShadow, breakpoints, containers, dropShadow, duration, easing, fontFamily, fontSize, fontWeight, height, letterSpacing, lineHeight, lineWidth, maxHeight, maxWidth, preflightBase, ringWidth, spacing, textIndent, textShadow, textStrokeWidth, verticalBreakpoints, width, wordSpacing };
|
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;
|