@unocss/preset-mini 0.21.0 → 0.22.1
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/chunks/default.cjs +25 -19
- package/dist/chunks/default.mjs +25 -19
- package/dist/chunks/default2.cjs +210 -78
- package/dist/chunks/default2.mjs +211 -81
- package/dist/chunks/default3.cjs +162 -6
- package/dist/chunks/default3.mjs +152 -2
- package/dist/chunks/utilities.cjs +31 -4
- package/dist/chunks/utilities.mjs +31 -5
- package/dist/{colors-6d634692.d.ts → colors-338f482c.d.ts} +1 -1
- package/dist/colors.d.ts +2 -2
- package/dist/{default-958434b6.d.ts → default-17948303.d.ts} +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.d.ts +5 -4
- package/dist/index.mjs +1 -2
- package/dist/rules.cjs +2 -1
- package/dist/rules.d.ts +11 -2
- package/dist/rules.mjs +1 -2
- package/dist/theme.d.ts +8 -8
- package/dist/{types-a2d2b52f.d.ts → types-c14b808b.d.ts} +8 -2
- package/dist/utilities-13c33ba5.d.ts +56 -0
- package/dist/utils.cjs +1 -0
- package/dist/utils.d.ts +5 -55
- package/dist/utils.mjs +1 -1
- package/dist/variants.cjs +6 -7
- package/dist/variants.d.ts +4 -3
- package/dist/variants.mjs +1 -2
- package/package.json +2 -2
- package/dist/chunks/pseudo.cjs +0 -160
- package/dist/chunks/pseudo.mjs +0 -153
package/dist/chunks/default3.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { v as variantMatcher, a as variantParentMatcher } from './variants.mjs';
|
|
2
|
-
import {
|
|
2
|
+
import { toArray, escapeRegExp } from '@unocss/core';
|
|
3
3
|
|
|
4
4
|
const regexCache = {};
|
|
5
5
|
const variantBreakpoints = (matcher, { theme }) => {
|
|
@@ -108,6 +108,156 @@ const variantOrientations = [
|
|
|
108
108
|
|
|
109
109
|
const variantPrint = variantParentMatcher("print", "@media print");
|
|
110
110
|
|
|
111
|
+
const CONTROL_BYPASS_PSEUDO_CLASS = "$$no-pseudo";
|
|
112
|
+
const PseudoClasses = Object.fromEntries([
|
|
113
|
+
"any-link",
|
|
114
|
+
"link",
|
|
115
|
+
"visited",
|
|
116
|
+
"target",
|
|
117
|
+
["open", "[open]"],
|
|
118
|
+
"hover",
|
|
119
|
+
"active",
|
|
120
|
+
"focus-visible",
|
|
121
|
+
"focus-within",
|
|
122
|
+
"focus",
|
|
123
|
+
"autofill",
|
|
124
|
+
"enabled",
|
|
125
|
+
"disabled",
|
|
126
|
+
"read-only",
|
|
127
|
+
"read-write",
|
|
128
|
+
"placeholder-shown",
|
|
129
|
+
"default",
|
|
130
|
+
"checked",
|
|
131
|
+
"indeterminate",
|
|
132
|
+
"valid",
|
|
133
|
+
"invalid",
|
|
134
|
+
"in-range",
|
|
135
|
+
"out-of-range",
|
|
136
|
+
"required",
|
|
137
|
+
"optional",
|
|
138
|
+
"root",
|
|
139
|
+
"empty",
|
|
140
|
+
["even-of-type", ":nth-of-type(even)"],
|
|
141
|
+
["even", ":nth-child(even)"],
|
|
142
|
+
["odd-of-type", ":nth-of-type(odd)"],
|
|
143
|
+
["odd", ":nth-child(odd)"],
|
|
144
|
+
"first-of-type",
|
|
145
|
+
["first", ":first-child"],
|
|
146
|
+
"last-of-type",
|
|
147
|
+
["last", ":last-child"],
|
|
148
|
+
"only-child",
|
|
149
|
+
"only-of-type"
|
|
150
|
+
].map(toArray));
|
|
151
|
+
const PseudoElements = Object.fromEntries([
|
|
152
|
+
"placeholder",
|
|
153
|
+
"before",
|
|
154
|
+
"after",
|
|
155
|
+
"first-letter",
|
|
156
|
+
"first-line",
|
|
157
|
+
"selection",
|
|
158
|
+
"marker",
|
|
159
|
+
["file", "::file-selector-button"]
|
|
160
|
+
].map(toArray));
|
|
161
|
+
const PseudoClassFunctions = [
|
|
162
|
+
"not",
|
|
163
|
+
"is",
|
|
164
|
+
"where",
|
|
165
|
+
"has"
|
|
166
|
+
];
|
|
167
|
+
const PseudoElementsStr = Object.keys(PseudoElements).join("|");
|
|
168
|
+
const PseudoClassesStr = Object.keys(PseudoClasses).join("|");
|
|
169
|
+
const PseudoClassFunctionsStr = PseudoClassFunctions.join("|");
|
|
170
|
+
const PartClassesRE = /(part-\[(.+)]:)(.+)/;
|
|
171
|
+
const PseudoElementsRE = new RegExp(`^(${PseudoElementsStr})[:-]`);
|
|
172
|
+
const PseudoClassesRE = new RegExp(`^(${PseudoClassesStr})[:-]`);
|
|
173
|
+
const PseudoClassFunctionsRE = new RegExp(`^(${PseudoClassFunctionsStr})-(${PseudoClassesStr})[:-]`);
|
|
174
|
+
function shouldAdd(entires) {
|
|
175
|
+
return !entires.find((i) => i[0] === CONTROL_BYPASS_PSEUDO_CLASS) || void 0;
|
|
176
|
+
}
|
|
177
|
+
const taggedPseudoClassMatcher = (tag, parent, combinator) => {
|
|
178
|
+
const re = new RegExp(`^${tag}-((?:(${PseudoClassFunctionsStr})-)?(${PseudoClassesStr}))[:-]`);
|
|
179
|
+
const rawRe = new RegExp(`^${escapeRegExp(parent)}:`);
|
|
180
|
+
return (input) => {
|
|
181
|
+
const match = input.match(re);
|
|
182
|
+
if (match) {
|
|
183
|
+
let pseudo = PseudoClasses[match[3]] || `:${match[3]}`;
|
|
184
|
+
if (match[2])
|
|
185
|
+
pseudo = `:${match[2]}(${pseudo})`;
|
|
186
|
+
return {
|
|
187
|
+
matcher: input.slice(match[1].length + tag.length + 2),
|
|
188
|
+
selector: (s, body) => {
|
|
189
|
+
return shouldAdd(body) && rawRe.test(s) ? s.replace(rawRe, `${parent}${pseudo}:`) : `${parent}${pseudo}${combinator}${s}`;
|
|
190
|
+
}
|
|
191
|
+
};
|
|
192
|
+
}
|
|
193
|
+
};
|
|
194
|
+
};
|
|
195
|
+
const variantPseudoElements = (input) => {
|
|
196
|
+
const match = input.match(PseudoElementsRE);
|
|
197
|
+
if (match) {
|
|
198
|
+
const pseudo = PseudoElements[match[1]] || `::${match[1]}`;
|
|
199
|
+
return {
|
|
200
|
+
matcher: input.slice(match[1].length + 1),
|
|
201
|
+
selector: (s) => `${s}${pseudo}`
|
|
202
|
+
};
|
|
203
|
+
}
|
|
204
|
+
};
|
|
205
|
+
const variantPseudoClasses = {
|
|
206
|
+
match: (input) => {
|
|
207
|
+
const match = input.match(PseudoClassesRE);
|
|
208
|
+
if (match) {
|
|
209
|
+
const pseudo = PseudoClasses[match[1]] || `:${match[1]}`;
|
|
210
|
+
return {
|
|
211
|
+
matcher: input.slice(match[1].length + 1),
|
|
212
|
+
selector: (s, body) => shouldAdd(body) && `${s}${pseudo}`
|
|
213
|
+
};
|
|
214
|
+
}
|
|
215
|
+
},
|
|
216
|
+
multiPass: true
|
|
217
|
+
};
|
|
218
|
+
const variantPseudoClassFunctions = {
|
|
219
|
+
match: (input) => {
|
|
220
|
+
const match = input.match(PseudoClassFunctionsRE);
|
|
221
|
+
if (match) {
|
|
222
|
+
const fn = match[1];
|
|
223
|
+
const pseudo = PseudoClasses[match[2]] || `:${match[2]}`;
|
|
224
|
+
return {
|
|
225
|
+
matcher: input.slice(match[1].length + match[2].length + 2),
|
|
226
|
+
selector: (s, body) => shouldAdd(body) && `${s}:${fn}(${pseudo})`
|
|
227
|
+
};
|
|
228
|
+
}
|
|
229
|
+
},
|
|
230
|
+
multiPass: true
|
|
231
|
+
};
|
|
232
|
+
const variantTaggedPseudoClasses = (options = {}) => {
|
|
233
|
+
const attributify = !!options?.attributifyPseudo;
|
|
234
|
+
return [
|
|
235
|
+
{
|
|
236
|
+
match: taggedPseudoClassMatcher("group", attributify ? '[group=""]' : ".group", " "),
|
|
237
|
+
multiPass: true
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
match: taggedPseudoClassMatcher("peer", attributify ? '[peer=""]' : ".peer", "~"),
|
|
241
|
+
multiPass: true
|
|
242
|
+
}
|
|
243
|
+
];
|
|
244
|
+
};
|
|
245
|
+
const partClasses = {
|
|
246
|
+
match: (input) => {
|
|
247
|
+
const match = input.match(PartClassesRE);
|
|
248
|
+
if (match) {
|
|
249
|
+
const part = `part(${match[2]})`;
|
|
250
|
+
return {
|
|
251
|
+
matcher: input.slice(match[1].length),
|
|
252
|
+
selector: (s, body) => {
|
|
253
|
+
return shouldAdd(body) && `${s}::${part}`;
|
|
254
|
+
}
|
|
255
|
+
};
|
|
256
|
+
}
|
|
257
|
+
},
|
|
258
|
+
multiPass: true
|
|
259
|
+
};
|
|
260
|
+
|
|
111
261
|
const variants = (options) => [
|
|
112
262
|
variantNegative,
|
|
113
263
|
variantImportant,
|
|
@@ -125,4 +275,4 @@ const variants = (options) => [
|
|
|
125
275
|
...variantLanguageDirections
|
|
126
276
|
];
|
|
127
277
|
|
|
128
|
-
export { variantBreakpoints as a, variantCombinators as b, variantColorsMediaOrClass as c, variantLanguageDirections as d, variantImportant as e, variantNegative as f, variantMotions as g, variantOrientations as h, variantPrint as i, variants as v };
|
|
278
|
+
export { CONTROL_BYPASS_PSEUDO_CLASS as C, variantBreakpoints as a, variantCombinators as b, variantColorsMediaOrClass as c, variantLanguageDirections as d, variantImportant as e, variantNegative as f, variantMotions as g, variantOrientations as h, variantPrint as i, variantPseudoElements as j, variantPseudoClasses as k, variantPseudoClassFunctions as l, variantTaggedPseudoClasses as m, partClasses as p, variants as v };
|
|
@@ -12,13 +12,27 @@ const directionMap = {
|
|
|
12
12
|
"x": ["-left", "-right"],
|
|
13
13
|
"y": ["-top", "-bottom"],
|
|
14
14
|
"": [""],
|
|
15
|
-
"
|
|
15
|
+
"bs": ["-block-start"],
|
|
16
|
+
"be": ["-block-end"],
|
|
17
|
+
"is": ["-inline-start"],
|
|
18
|
+
"ie": ["-inline-end"],
|
|
19
|
+
"block": ["-block-start", "-block-end"],
|
|
20
|
+
"inline": ["-inline-start", "-inline-end"]
|
|
21
|
+
};
|
|
22
|
+
const insetMap = {
|
|
23
|
+
...directionMap,
|
|
24
|
+
bs: ["-inset-block-start"],
|
|
25
|
+
be: ["-inset-block-end"],
|
|
26
|
+
is: ["-inset-inline-start"],
|
|
27
|
+
ie: ["-inset-inline-end"],
|
|
28
|
+
block: ["-inset-block-start", "-inset-block-end"],
|
|
29
|
+
inline: ["-inset-inline-start", "-inset-inline-end"]
|
|
16
30
|
};
|
|
17
31
|
const cornerMap = {
|
|
18
|
-
"
|
|
32
|
+
"l": ["-top-left", "-bottom-left"],
|
|
19
33
|
"r": ["-top-right", "-bottom-right"],
|
|
34
|
+
"t": ["-top-left", "-top-right"],
|
|
20
35
|
"b": ["-bottom-left", "-bottom-right"],
|
|
21
|
-
"l": ["-bottom-left", "-top-left"],
|
|
22
36
|
"tl": ["-top-left"],
|
|
23
37
|
"lt": ["-top-left"],
|
|
24
38
|
"tr": ["-top-right"],
|
|
@@ -27,7 +41,19 @@ const cornerMap = {
|
|
|
27
41
|
"lb": ["-bottom-left"],
|
|
28
42
|
"br": ["-bottom-right"],
|
|
29
43
|
"rb": ["-bottom-right"],
|
|
30
|
-
"": [""]
|
|
44
|
+
"": [""],
|
|
45
|
+
"bs": ["-start-start", "-start-end"],
|
|
46
|
+
"be": ["-end-start", "-end-end"],
|
|
47
|
+
"is": ["-end-start", "-start-start"],
|
|
48
|
+
"ie": ["-start-end", "-end-end"],
|
|
49
|
+
"bs-is": ["-start-start"],
|
|
50
|
+
"is-bs": ["-start-start"],
|
|
51
|
+
"bs-ie": ["-start-end"],
|
|
52
|
+
"ie-bs": ["-start-end"],
|
|
53
|
+
"be-is": ["-end-start"],
|
|
54
|
+
"is-be": ["-end-start"],
|
|
55
|
+
"be-ie": ["-end-end"],
|
|
56
|
+
"ie-be": ["-end-end"]
|
|
31
57
|
};
|
|
32
58
|
const xyzMap = {
|
|
33
59
|
"x": ["-x"],
|
|
@@ -332,6 +358,7 @@ exports.directionMap = directionMap;
|
|
|
332
358
|
exports.directionSize = directionSize;
|
|
333
359
|
exports.h = h;
|
|
334
360
|
exports.handler = handler;
|
|
361
|
+
exports.insetMap = insetMap;
|
|
335
362
|
exports.parseColor = parseColor;
|
|
336
363
|
exports.positionMap = positionMap;
|
|
337
364
|
exports.valueHandlers = valueHandlers;
|
|
@@ -10,13 +10,27 @@ const directionMap = {
|
|
|
10
10
|
"x": ["-left", "-right"],
|
|
11
11
|
"y": ["-top", "-bottom"],
|
|
12
12
|
"": [""],
|
|
13
|
-
"
|
|
13
|
+
"bs": ["-block-start"],
|
|
14
|
+
"be": ["-block-end"],
|
|
15
|
+
"is": ["-inline-start"],
|
|
16
|
+
"ie": ["-inline-end"],
|
|
17
|
+
"block": ["-block-start", "-block-end"],
|
|
18
|
+
"inline": ["-inline-start", "-inline-end"]
|
|
19
|
+
};
|
|
20
|
+
const insetMap = {
|
|
21
|
+
...directionMap,
|
|
22
|
+
bs: ["-inset-block-start"],
|
|
23
|
+
be: ["-inset-block-end"],
|
|
24
|
+
is: ["-inset-inline-start"],
|
|
25
|
+
ie: ["-inset-inline-end"],
|
|
26
|
+
block: ["-inset-block-start", "-inset-block-end"],
|
|
27
|
+
inline: ["-inset-inline-start", "-inset-inline-end"]
|
|
14
28
|
};
|
|
15
29
|
const cornerMap = {
|
|
16
|
-
"
|
|
30
|
+
"l": ["-top-left", "-bottom-left"],
|
|
17
31
|
"r": ["-top-right", "-bottom-right"],
|
|
32
|
+
"t": ["-top-left", "-top-right"],
|
|
18
33
|
"b": ["-bottom-left", "-bottom-right"],
|
|
19
|
-
"l": ["-bottom-left", "-top-left"],
|
|
20
34
|
"tl": ["-top-left"],
|
|
21
35
|
"lt": ["-top-left"],
|
|
22
36
|
"tr": ["-top-right"],
|
|
@@ -25,7 +39,19 @@ const cornerMap = {
|
|
|
25
39
|
"lb": ["-bottom-left"],
|
|
26
40
|
"br": ["-bottom-right"],
|
|
27
41
|
"rb": ["-bottom-right"],
|
|
28
|
-
"": [""]
|
|
42
|
+
"": [""],
|
|
43
|
+
"bs": ["-start-start", "-start-end"],
|
|
44
|
+
"be": ["-end-start", "-end-end"],
|
|
45
|
+
"is": ["-end-start", "-start-start"],
|
|
46
|
+
"ie": ["-start-end", "-end-end"],
|
|
47
|
+
"bs-is": ["-start-start"],
|
|
48
|
+
"is-bs": ["-start-start"],
|
|
49
|
+
"bs-ie": ["-start-end"],
|
|
50
|
+
"ie-bs": ["-start-end"],
|
|
51
|
+
"be-is": ["-end-start"],
|
|
52
|
+
"is-be": ["-end-start"],
|
|
53
|
+
"be-ie": ["-end-end"],
|
|
54
|
+
"ie-be": ["-end-end"]
|
|
29
55
|
};
|
|
30
56
|
const xyzMap = {
|
|
31
57
|
"x": ["-x"],
|
|
@@ -323,4 +349,4 @@ const colorResolver = (property, varName) => ([, body], { theme }) => {
|
|
|
323
349
|
}
|
|
324
350
|
};
|
|
325
351
|
|
|
326
|
-
export { cornerMap as a,
|
|
352
|
+
export { cornerMap as a, directionSize as b, colorResolver as c, directionMap as d, positionMap as e, h as f, capitalize as g, handler as h, insetMap as i, parseColor as p, valueHandlers as v, xyzMap as x };
|
package/dist/colors.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { c as colors } from './colors-
|
|
2
|
-
import './types-
|
|
1
|
+
export { c as colors } from './colors-338f482c';
|
|
2
|
+
import './types-c14b808b';
|
package/dist/index.cjs
CHANGED
|
@@ -6,9 +6,8 @@ const _default = require('./chunks/default.cjs');
|
|
|
6
6
|
const _default$1 = require('./chunks/default2.cjs');
|
|
7
7
|
const _default$2 = require('./chunks/default3.cjs');
|
|
8
8
|
const colors = require('./chunks/colors.cjs');
|
|
9
|
-
require('./chunks/utilities.cjs');
|
|
9
|
+
const utilities = require('./chunks/utilities.cjs');
|
|
10
10
|
require('@unocss/core');
|
|
11
|
-
require('./chunks/pseudo.cjs');
|
|
12
11
|
require('./chunks/variants.cjs');
|
|
13
12
|
|
|
14
13
|
const presetMini = (options = {}) => {
|
|
@@ -35,5 +34,6 @@ function VarPrefixPostprocessor(prefix) {
|
|
|
35
34
|
|
|
36
35
|
exports.theme = _default.theme;
|
|
37
36
|
exports.colors = colors.colors;
|
|
37
|
+
exports.parseColor = utilities.parseColor;
|
|
38
38
|
exports["default"] = presetMini;
|
|
39
39
|
exports.presetMini = presetMini;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { PresetOptions, Preset } from '@unocss/core';
|
|
2
|
-
import { T as Theme } from './types-
|
|
3
|
-
export { T as Theme, a as ThemeAnimation } from './types-
|
|
4
|
-
export { t as theme } from './default-
|
|
5
|
-
export { c as colors } from './colors-
|
|
2
|
+
import { T as Theme } from './types-c14b808b';
|
|
3
|
+
export { T as Theme, a as ThemeAnimation } from './types-c14b808b';
|
|
4
|
+
export { t as theme } from './default-17948303';
|
|
5
|
+
export { c as colors } from './colors-338f482c';
|
|
6
|
+
export { p as parseColor } from './utilities-13c33ba5';
|
|
6
7
|
|
|
7
8
|
interface PresetMiniOptions extends PresetOptions {
|
|
8
9
|
/**
|
package/dist/index.mjs
CHANGED
|
@@ -3,9 +3,8 @@ export { t as theme } from './chunks/default.mjs';
|
|
|
3
3
|
import { r as rules } from './chunks/default2.mjs';
|
|
4
4
|
import { v as variants } from './chunks/default3.mjs';
|
|
5
5
|
export { c as colors } from './chunks/colors.mjs';
|
|
6
|
-
|
|
6
|
+
export { p as parseColor } from './chunks/utilities.mjs';
|
|
7
7
|
import '@unocss/core';
|
|
8
|
-
import './chunks/pseudo.mjs';
|
|
9
8
|
import './chunks/variants.mjs';
|
|
10
9
|
|
|
11
10
|
const presetMini = (options = {}) => {
|
package/dist/rules.cjs
CHANGED
|
@@ -5,7 +5,6 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const _default = require('./chunks/default2.cjs');
|
|
6
6
|
require('./chunks/utilities.cjs');
|
|
7
7
|
require('@unocss/core');
|
|
8
|
-
require('./chunks/pseudo.cjs');
|
|
9
8
|
|
|
10
9
|
|
|
11
10
|
|
|
@@ -19,6 +18,7 @@ exports.boxShadows = _default.boxShadows;
|
|
|
19
18
|
exports.boxSizing = _default.boxSizing;
|
|
20
19
|
exports.breaks = _default.breaks;
|
|
21
20
|
exports.contents = _default.contents;
|
|
21
|
+
exports.cssProperty = _default.cssProperty;
|
|
22
22
|
exports.cssVariables = _default.cssVariables;
|
|
23
23
|
exports.cursors = _default.cursors;
|
|
24
24
|
exports.displays = _default.displays;
|
|
@@ -44,6 +44,7 @@ exports.questionMark = _default.questionMark;
|
|
|
44
44
|
exports.resizes = _default.resizes;
|
|
45
45
|
exports.rings = _default.rings;
|
|
46
46
|
exports.rules = _default.rules;
|
|
47
|
+
exports.shadowBase = _default.shadowBase;
|
|
47
48
|
exports.sizes = _default.sizes;
|
|
48
49
|
exports.svgUtilities = _default.svgUtilities;
|
|
49
50
|
exports.tabSizes = _default.tabSizes;
|
package/dist/rules.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Rule } from '@unocss/core';
|
|
2
|
-
import { T as Theme } from './types-
|
|
2
|
+
import { T as Theme } from './types-c14b808b';
|
|
3
3
|
|
|
4
4
|
declare const verticalAligns: Rule[];
|
|
5
5
|
declare const textAligns: Rule[];
|
|
@@ -49,6 +49,14 @@ declare const questionMark: Rule[];
|
|
|
49
49
|
|
|
50
50
|
declare const rings: Rule<Theme>[];
|
|
51
51
|
|
|
52
|
+
declare const shadowBase: {
|
|
53
|
+
"$$shortcut-no-merge": string;
|
|
54
|
+
'--un-ring-offset-shadow': string;
|
|
55
|
+
'--un-ring-shadow': string;
|
|
56
|
+
'--un-shadow-inset': string;
|
|
57
|
+
'--un-shadow': string;
|
|
58
|
+
'--un-shadow-colored': string;
|
|
59
|
+
};
|
|
52
60
|
declare const boxShadows: Rule<Theme>[];
|
|
53
61
|
|
|
54
62
|
declare const sizes: Rule<Theme>[];
|
|
@@ -85,7 +93,8 @@ declare const textStrokes: Rule<Theme>[];
|
|
|
85
93
|
declare const textShadows: Rule<Theme>[];
|
|
86
94
|
|
|
87
95
|
declare const cssVariables: Rule[];
|
|
96
|
+
declare const cssProperty: Rule[];
|
|
88
97
|
|
|
89
98
|
declare const textDecorations: Rule[];
|
|
90
99
|
|
|
91
|
-
export { alignments, appearance, appearances, aspectRatio, bgColors, borders, boxShadows, boxSizing, breaks, contents, cssVariables, cursors, displays, flex, floats, fontSmoothings, fontStyles, fonts, gaps, grids, insets, justifies, margins, opacity, orders, outline, overflows, paddings, placements, pointerEvents, positions, questionMark, resizes, rings, rules, sizes, svgUtilities, tabSizes, textAligns, textColors, textDecorations, textIndents, textOverflows, textShadows, textStrokes, textTransforms, transforms, transitions, userSelects, varEmpty, verticalAligns, whitespaces, willChange, zIndexes };
|
|
100
|
+
export { alignments, appearance, appearances, aspectRatio, bgColors, borders, boxShadows, boxSizing, breaks, contents, cssProperty, cssVariables, cursors, displays, flex, floats, fontSmoothings, fontStyles, fonts, gaps, grids, insets, justifies, margins, opacity, orders, outline, overflows, paddings, placements, pointerEvents, positions, questionMark, resizes, rings, rules, shadowBase, sizes, svgUtilities, tabSizes, textAligns, textColors, textDecorations, textIndents, textOverflows, textShadows, textStrokes, textTransforms, transforms, transitions, userSelects, varEmpty, verticalAligns, whitespaces, willChange, zIndexes };
|
package/dist/rules.mjs
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export { l as alignments, a as appearance,
|
|
1
|
+
export { l as alignments, a as appearance, H as appearances, C as aspectRatio, e as bgColors, b as borders, A as boxShadows, s as boxSizing, O as breaks, N as contents, a0 as cssProperty, $ as cssVariables, I as cursors, G as displays, f as flex, q as floats, S as fontSmoothings, R as fontStyles, W as fonts, g as gaps, h as grids, n as insets, j as justifies, E as margins, c as opacity, k as orders, o as outline, i as overflows, D as paddings, m as placements, J as pointerEvents, p as positions, u as questionMark, K as resizes, x as rings, r as rules, y as shadowBase, B as sizes, T as svgUtilities, X as tabSizes, t as textAligns, d as textColors, a1 as textDecorations, Y as textIndents, P as textOverflows, _ as textShadows, Z as textStrokes, Q as textTransforms, U as transforms, V as transitions, L as userSelects, F as varEmpty, v as verticalAligns, M as whitespaces, w as willChange, z as zIndexes } from './chunks/default2.mjs';
|
|
2
2
|
import './chunks/utilities.mjs';
|
|
3
3
|
import '@unocss/core';
|
|
4
|
-
import './chunks/pseudo.mjs';
|
package/dist/theme.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { c as colors } from './colors-
|
|
2
|
-
export { t as theme } from './default-
|
|
3
|
-
import { T as Theme } from './types-
|
|
4
|
-
export { T as Theme, a as ThemeAnimation } from './types-
|
|
1
|
+
export { c as colors } from './colors-338f482c';
|
|
2
|
+
export { t as theme } from './default-17948303';
|
|
3
|
+
import { T as Theme } from './types-c14b808b';
|
|
4
|
+
export { T as Theme, a as ThemeAnimation } from './types-c14b808b';
|
|
5
5
|
|
|
6
6
|
declare const blur: {
|
|
7
7
|
DEFAULT: string;
|
|
@@ -55,11 +55,11 @@ declare const borderRadius: {
|
|
|
55
55
|
full: string;
|
|
56
56
|
};
|
|
57
57
|
declare const boxShadow: {
|
|
58
|
-
DEFAULT: string;
|
|
58
|
+
DEFAULT: string[];
|
|
59
59
|
sm: string;
|
|
60
|
-
md: string;
|
|
61
|
-
lg: string;
|
|
62
|
-
xl: string;
|
|
60
|
+
md: string[];
|
|
61
|
+
lg: string[];
|
|
62
|
+
xl: string[];
|
|
63
63
|
'2xl': string;
|
|
64
64
|
inner: string;
|
|
65
65
|
none: string;
|
|
@@ -11,6 +11,12 @@ interface Theme {
|
|
|
11
11
|
maxHeight?: Record<string, string>;
|
|
12
12
|
minWidth?: Record<string, string>;
|
|
13
13
|
minHeight?: Record<string, string>;
|
|
14
|
+
inlineSize?: Record<string, string>;
|
|
15
|
+
blockSize?: Record<string, string>;
|
|
16
|
+
maxInlineSize?: Record<string, string>;
|
|
17
|
+
maxBlockSize?: Record<string, string>;
|
|
18
|
+
minInlineSize?: Record<string, string>;
|
|
19
|
+
minBlockSize?: Record<string, string>;
|
|
14
20
|
borderRadius?: Record<string, string>;
|
|
15
21
|
breakpoints?: Record<string, string>;
|
|
16
22
|
colors?: Record<string, string | Record<string, string>>;
|
|
@@ -19,9 +25,9 @@ interface Theme {
|
|
|
19
25
|
lineHeight?: Record<string, string>;
|
|
20
26
|
letterSpacing?: Record<string, string>;
|
|
21
27
|
wordSpacing?: Record<string, string>;
|
|
22
|
-
boxShadow?: Record<string, string>;
|
|
28
|
+
boxShadow?: Record<string, string | string[]>;
|
|
23
29
|
textIndent?: Record<string, string>;
|
|
24
|
-
textShadow?: Record<string, string>;
|
|
30
|
+
textShadow?: Record<string, string | string[]>;
|
|
25
31
|
textStrokeWidth?: Record<string, string>;
|
|
26
32
|
blur?: Record<string, string>;
|
|
27
33
|
dropShadow?: Record<string, string | string[]>;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { DynamicMatcher, ParsedColorValue } from '@unocss/core';
|
|
2
|
+
import { T as Theme } from './types-c14b808b';
|
|
3
|
+
|
|
4
|
+
declare function capitalize<T extends string>(str: T): Capitalize<T>;
|
|
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
|
+
* @return {DynamicMatcher} {@link DynamicMatcher}
|
|
10
|
+
* @see {@link directionMap}
|
|
11
|
+
*/
|
|
12
|
+
declare const directionSize: (propertyPrefix: string) => DynamicMatcher;
|
|
13
|
+
/**
|
|
14
|
+
* Parse color string into rgba (if possible) with opacity. Color value will be matched to theme object before converting to rgb value.
|
|
15
|
+
*
|
|
16
|
+
* @example Parseable strings:
|
|
17
|
+
* 'red' // From theme, if 'red' is available
|
|
18
|
+
* 'red-100' // From theme, plus scale
|
|
19
|
+
* 'red-100/20' // From theme, plus scale/opacity
|
|
20
|
+
* '#f12' // Hex color
|
|
21
|
+
* 'hex-f12' // Alternative hex color
|
|
22
|
+
* '[rgb(100,2,3)]/[var(--op)]' // Bracket with rgb color and bracket with opacity
|
|
23
|
+
*
|
|
24
|
+
* @param {string} body - Color string to be parsed.
|
|
25
|
+
* @param {Theme} theme - {@link Theme} object.
|
|
26
|
+
* @return {ParsedColorValue|undefined} {@link ParsedColorValue} object if string is parseable.
|
|
27
|
+
*/
|
|
28
|
+
declare const parseColor: (body: string, theme: Theme) => ParsedColorValue | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* Provide {@link DynamicMatcher} function to produce color value matched from rule.
|
|
31
|
+
*
|
|
32
|
+
* @see {@link parseColor}
|
|
33
|
+
*
|
|
34
|
+
* @example Resolving 'red' from theme:
|
|
35
|
+
* colorResolver('background-color', 'background')('', 'red')
|
|
36
|
+
* return { 'background-color': '#f12' }
|
|
37
|
+
*
|
|
38
|
+
* @example Resolving 'red-100' from theme:
|
|
39
|
+
* colorResolver('background-color', 'background')('', 'red-100')
|
|
40
|
+
* return { '--un-background-opacity': '1', 'background-color': 'rgba(254,226,226,var(--un-bg-opacity))' }
|
|
41
|
+
*
|
|
42
|
+
* @example Resolving 'red-100/20' from theme:
|
|
43
|
+
* colorResolver('background-color', 'background')('', 'red-100/20')
|
|
44
|
+
* return { 'background-color': 'rgba(204,251,241,0.22)' }
|
|
45
|
+
*
|
|
46
|
+
* @example Resolving 'hex-124':
|
|
47
|
+
* colorResolver('color', 'text')('', 'hex-124')
|
|
48
|
+
* return { '--un-text-opacity': '1', 'color': 'rgba(17,34,68,var(--un-text-opacity))' }
|
|
49
|
+
*
|
|
50
|
+
* @param {string} property - Property for the css value to be created.
|
|
51
|
+
* @param {string} varName - Base name for the opacity variable.
|
|
52
|
+
* @return {DynamicMatcher} {@link DynamicMatcher} object.
|
|
53
|
+
*/
|
|
54
|
+
declare const colorResolver: (property: string, varName: string) => DynamicMatcher;
|
|
55
|
+
|
|
56
|
+
export { colorResolver as a, capitalize as c, directionSize as d, parseColor as p };
|
package/dist/utils.cjs
CHANGED
|
@@ -15,6 +15,7 @@ exports.directionMap = utilities.directionMap;
|
|
|
15
15
|
exports.directionSize = utilities.directionSize;
|
|
16
16
|
exports.h = utilities.h;
|
|
17
17
|
exports.handler = utilities.handler;
|
|
18
|
+
exports.insetMap = utilities.insetMap;
|
|
18
19
|
exports.parseColor = utilities.parseColor;
|
|
19
20
|
exports.positionMap = utilities.positionMap;
|
|
20
21
|
exports.valueHandlers = utilities.valueHandlers;
|
package/dist/utils.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import * as _unocss_core from '@unocss/core';
|
|
2
|
-
import { VariantHandler
|
|
3
|
-
|
|
2
|
+
import { VariantHandler } from '@unocss/core';
|
|
3
|
+
export { c as capitalize, a as colorResolver, d as directionSize, p as parseColor } from './utilities-13c33ba5';
|
|
4
|
+
import './types-c14b808b';
|
|
4
5
|
|
|
5
6
|
declare const directionMap: Record<string, string[]>;
|
|
7
|
+
declare const insetMap: Record<string, string[]>;
|
|
6
8
|
declare const cornerMap: Record<string, string[]>;
|
|
7
9
|
declare const xyzMap: Record<string, string[]>;
|
|
8
10
|
declare const positionMap: Record<string, string>;
|
|
@@ -58,56 +60,4 @@ declare const h: _unocss_core.ValueHandler<"number" | "auto" | "numberWithUnit"
|
|
|
58
60
|
declare const variantMatcher: (name: string, selector?: ((input: string) => string | undefined) | undefined) => (input: string) => VariantHandler | undefined;
|
|
59
61
|
declare const variantParentMatcher: (name: string, parent: string) => (input: string) => VariantHandler | undefined;
|
|
60
62
|
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* Provide {@link DynamicMatcher} function returning spacing definition. See spacing rules.
|
|
64
|
-
*
|
|
65
|
-
* @param {string} propertyPrefix - Property for the css value to be created. Postfix will be appended according to direction matched.
|
|
66
|
-
* @return {DynamicMatcher} {@link DynamicMatcher}
|
|
67
|
-
* @see {@link directionMap}
|
|
68
|
-
*/
|
|
69
|
-
declare const directionSize: (propertyPrefix: string) => DynamicMatcher;
|
|
70
|
-
/**
|
|
71
|
-
* Parse color string into rgba (if possible) with opacity opacity. Color value will be matched to theme object before converting to rgb value.
|
|
72
|
-
*
|
|
73
|
-
* @example Parseable strings:
|
|
74
|
-
* 'red' // From theme, if 'red' is available
|
|
75
|
-
* 'red-100' // From theme, plus scale
|
|
76
|
-
* 'red-100/20' // From theme, plus scale/opacity
|
|
77
|
-
* '#f12' // Hex color
|
|
78
|
-
* 'hex-f12' // Alternative hex color
|
|
79
|
-
* '[rgb(100,2,3)]/[var(--op)]' // Bracket with rgb color and bracket with opacity
|
|
80
|
-
*
|
|
81
|
-
* @param {string} body - Color string to be parsed.
|
|
82
|
-
* @param {Theme} theme - {@link Theme} object.
|
|
83
|
-
* @return {ParsedColorValue|undefined} {@link ParsedColorValue} object if string is parseable.
|
|
84
|
-
*/
|
|
85
|
-
declare const parseColor: (body: string, theme: Theme) => ParsedColorValue | undefined;
|
|
86
|
-
/**
|
|
87
|
-
* Provide {@link DynamicMatcher} function to produce color value matched from rule.
|
|
88
|
-
*
|
|
89
|
-
* @see {@link parseColor}
|
|
90
|
-
*
|
|
91
|
-
* @example Resolving 'red' from theme:
|
|
92
|
-
* colorResolver('background-color', 'background')('', 'red')
|
|
93
|
-
* return { 'background-color': '#f12' }
|
|
94
|
-
*
|
|
95
|
-
* @example Resolving 'red-100' from theme:
|
|
96
|
-
* colorResolver('background-color', 'background')('', 'red-100')
|
|
97
|
-
* return { '--un-background-opacity': '1', 'background-color': 'rgba(254,226,226,var(--un-bg-opacity))' }
|
|
98
|
-
*
|
|
99
|
-
* @example Resolving 'red-100/20' from theme:
|
|
100
|
-
* colorResolver('background-color', 'background')('', 'red-100/20')
|
|
101
|
-
* return { 'background-color': 'rgba(204,251,241,0.22)' }
|
|
102
|
-
*
|
|
103
|
-
* @example Resolving 'hex-124':
|
|
104
|
-
* colorResolver('color', 'text')('', 'hex-124')
|
|
105
|
-
* return { '--un-text-opacity': '1', 'color': 'rgba(17,34,68,var(--un-text-opacity))' }
|
|
106
|
-
*
|
|
107
|
-
* @param {string} property - Property for the css value to be created.
|
|
108
|
-
* @param {string} varName - Base name for the opacity variable.
|
|
109
|
-
* @return {DynamicMatcher} {@link DynamicMatcher} object.
|
|
110
|
-
*/
|
|
111
|
-
declare const colorResolver: (property: string, varName: string) => DynamicMatcher;
|
|
112
|
-
|
|
113
|
-
export { capitalize, colorResolver, cornerMap, directionMap, directionSize, h, handler, parseColor, positionMap, handlers as valueHandlers, variantMatcher, variantParentMatcher, xyzMap };
|
|
63
|
+
export { cornerMap, directionMap, h, handler, insetMap, positionMap, handlers as valueHandlers, variantMatcher, variantParentMatcher, xyzMap };
|
package/dist/utils.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { g as capitalize, c as colorResolver, a as cornerMap, d as directionMap, b as directionSize, f as h, h as handler, i as insetMap, p as parseColor, e as positionMap, v as valueHandlers, x as xyzMap } from './chunks/utilities.mjs';
|
|
2
2
|
export { v as variantMatcher, a as variantParentMatcher } from './chunks/variants.mjs';
|
|
3
3
|
import '@unocss/core';
|
package/dist/variants.cjs
CHANGED
|
@@ -3,12 +3,13 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const _default = require('./chunks/default3.cjs');
|
|
6
|
-
const pseudo = require('./chunks/pseudo.cjs');
|
|
7
6
|
require('./chunks/variants.cjs');
|
|
8
7
|
require('@unocss/core');
|
|
9
8
|
|
|
10
9
|
|
|
11
10
|
|
|
11
|
+
exports.CONTROL_BYPASS_PSEUDO_CLASS = _default.CONTROL_BYPASS_PSEUDO_CLASS;
|
|
12
|
+
exports.partClasses = _default.partClasses;
|
|
12
13
|
exports.variantBreakpoints = _default.variantBreakpoints;
|
|
13
14
|
exports.variantColorsMediaOrClass = _default.variantColorsMediaOrClass;
|
|
14
15
|
exports.variantCombinators = _default.variantCombinators;
|
|
@@ -18,10 +19,8 @@ exports.variantMotions = _default.variantMotions;
|
|
|
18
19
|
exports.variantNegative = _default.variantNegative;
|
|
19
20
|
exports.variantOrientations = _default.variantOrientations;
|
|
20
21
|
exports.variantPrint = _default.variantPrint;
|
|
22
|
+
exports.variantPseudoClassFunctions = _default.variantPseudoClassFunctions;
|
|
23
|
+
exports.variantPseudoClasses = _default.variantPseudoClasses;
|
|
24
|
+
exports.variantPseudoElements = _default.variantPseudoElements;
|
|
25
|
+
exports.variantTaggedPseudoClasses = _default.variantTaggedPseudoClasses;
|
|
21
26
|
exports.variants = _default.variants;
|
|
22
|
-
exports.CONTROL_BYPASS_PSEUDO_CLASS = pseudo.CONTROL_BYPASS_PSEUDO_CLASS;
|
|
23
|
-
exports.partClasses = pseudo.partClasses;
|
|
24
|
-
exports.variantPseudoClassFunctions = pseudo.variantPseudoClassFunctions;
|
|
25
|
-
exports.variantPseudoClasses = pseudo.variantPseudoClasses;
|
|
26
|
-
exports.variantPseudoElements = pseudo.variantPseudoElements;
|
|
27
|
-
exports.variantTaggedPseudoClasses = pseudo.variantTaggedPseudoClasses;
|