@unocss/preset-mini 0.21.1 → 0.22.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/chunks/default.cjs +25 -19
- package/dist/chunks/default.mjs +25 -19
- package/dist/chunks/default2.cjs +273 -151
- package/dist/chunks/default2.mjs +273 -154
- package/dist/chunks/default3.cjs +162 -6
- package/dist/chunks/default3.mjs +152 -2
- package/dist/chunks/utilities.cjs +33 -4
- package/dist/chunks/utilities.mjs +33 -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 +3 -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.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const variants$1 = require('./variants.cjs');
|
|
4
|
-
const
|
|
4
|
+
const core = require('@unocss/core');
|
|
5
5
|
|
|
6
6
|
const regexCache = {};
|
|
7
7
|
const variantBreakpoints = (matcher, { theme }) => {
|
|
@@ -110,6 +110,156 @@ const variantOrientations = [
|
|
|
110
110
|
|
|
111
111
|
const variantPrint = variants$1.variantParentMatcher("print", "@media print");
|
|
112
112
|
|
|
113
|
+
const CONTROL_BYPASS_PSEUDO_CLASS = "$$no-pseudo";
|
|
114
|
+
const PseudoClasses = Object.fromEntries([
|
|
115
|
+
"any-link",
|
|
116
|
+
"link",
|
|
117
|
+
"visited",
|
|
118
|
+
"target",
|
|
119
|
+
["open", "[open]"],
|
|
120
|
+
"hover",
|
|
121
|
+
"active",
|
|
122
|
+
"focus-visible",
|
|
123
|
+
"focus-within",
|
|
124
|
+
"focus",
|
|
125
|
+
"autofill",
|
|
126
|
+
"enabled",
|
|
127
|
+
"disabled",
|
|
128
|
+
"read-only",
|
|
129
|
+
"read-write",
|
|
130
|
+
"placeholder-shown",
|
|
131
|
+
"default",
|
|
132
|
+
"checked",
|
|
133
|
+
"indeterminate",
|
|
134
|
+
"valid",
|
|
135
|
+
"invalid",
|
|
136
|
+
"in-range",
|
|
137
|
+
"out-of-range",
|
|
138
|
+
"required",
|
|
139
|
+
"optional",
|
|
140
|
+
"root",
|
|
141
|
+
"empty",
|
|
142
|
+
["even-of-type", ":nth-of-type(even)"],
|
|
143
|
+
["even", ":nth-child(even)"],
|
|
144
|
+
["odd-of-type", ":nth-of-type(odd)"],
|
|
145
|
+
["odd", ":nth-child(odd)"],
|
|
146
|
+
"first-of-type",
|
|
147
|
+
["first", ":first-child"],
|
|
148
|
+
"last-of-type",
|
|
149
|
+
["last", ":last-child"],
|
|
150
|
+
"only-child",
|
|
151
|
+
"only-of-type"
|
|
152
|
+
].map(core.toArray));
|
|
153
|
+
const PseudoElements = Object.fromEntries([
|
|
154
|
+
"placeholder",
|
|
155
|
+
"before",
|
|
156
|
+
"after",
|
|
157
|
+
"first-letter",
|
|
158
|
+
"first-line",
|
|
159
|
+
"selection",
|
|
160
|
+
"marker",
|
|
161
|
+
["file", "::file-selector-button"]
|
|
162
|
+
].map(core.toArray));
|
|
163
|
+
const PseudoClassFunctions = [
|
|
164
|
+
"not",
|
|
165
|
+
"is",
|
|
166
|
+
"where",
|
|
167
|
+
"has"
|
|
168
|
+
];
|
|
169
|
+
const PseudoElementsStr = Object.keys(PseudoElements).join("|");
|
|
170
|
+
const PseudoClassesStr = Object.keys(PseudoClasses).join("|");
|
|
171
|
+
const PseudoClassFunctionsStr = PseudoClassFunctions.join("|");
|
|
172
|
+
const PartClassesRE = /(part-\[(.+)]:)(.+)/;
|
|
173
|
+
const PseudoElementsRE = new RegExp(`^(${PseudoElementsStr})[:-]`);
|
|
174
|
+
const PseudoClassesRE = new RegExp(`^(${PseudoClassesStr})[:-]`);
|
|
175
|
+
const PseudoClassFunctionsRE = new RegExp(`^(${PseudoClassFunctionsStr})-(${PseudoClassesStr})[:-]`);
|
|
176
|
+
function shouldAdd(entires) {
|
|
177
|
+
return !entires.find((i) => i[0] === CONTROL_BYPASS_PSEUDO_CLASS) || void 0;
|
|
178
|
+
}
|
|
179
|
+
const taggedPseudoClassMatcher = (tag, parent, combinator) => {
|
|
180
|
+
const re = new RegExp(`^${tag}-((?:(${PseudoClassFunctionsStr})-)?(${PseudoClassesStr}))[:-]`);
|
|
181
|
+
const rawRe = new RegExp(`^${core.escapeRegExp(parent)}:`);
|
|
182
|
+
return (input) => {
|
|
183
|
+
const match = input.match(re);
|
|
184
|
+
if (match) {
|
|
185
|
+
let pseudo = PseudoClasses[match[3]] || `:${match[3]}`;
|
|
186
|
+
if (match[2])
|
|
187
|
+
pseudo = `:${match[2]}(${pseudo})`;
|
|
188
|
+
return {
|
|
189
|
+
matcher: input.slice(match[1].length + tag.length + 2),
|
|
190
|
+
selector: (s, body) => {
|
|
191
|
+
return shouldAdd(body) && rawRe.test(s) ? s.replace(rawRe, `${parent}${pseudo}:`) : `${parent}${pseudo}${combinator}${s}`;
|
|
192
|
+
}
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
};
|
|
196
|
+
};
|
|
197
|
+
const variantPseudoElements = (input) => {
|
|
198
|
+
const match = input.match(PseudoElementsRE);
|
|
199
|
+
if (match) {
|
|
200
|
+
const pseudo = PseudoElements[match[1]] || `::${match[1]}`;
|
|
201
|
+
return {
|
|
202
|
+
matcher: input.slice(match[1].length + 1),
|
|
203
|
+
selector: (s) => `${s}${pseudo}`
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
};
|
|
207
|
+
const variantPseudoClasses = {
|
|
208
|
+
match: (input) => {
|
|
209
|
+
const match = input.match(PseudoClassesRE);
|
|
210
|
+
if (match) {
|
|
211
|
+
const pseudo = PseudoClasses[match[1]] || `:${match[1]}`;
|
|
212
|
+
return {
|
|
213
|
+
matcher: input.slice(match[1].length + 1),
|
|
214
|
+
selector: (s, body) => shouldAdd(body) && `${s}${pseudo}`
|
|
215
|
+
};
|
|
216
|
+
}
|
|
217
|
+
},
|
|
218
|
+
multiPass: true
|
|
219
|
+
};
|
|
220
|
+
const variantPseudoClassFunctions = {
|
|
221
|
+
match: (input) => {
|
|
222
|
+
const match = input.match(PseudoClassFunctionsRE);
|
|
223
|
+
if (match) {
|
|
224
|
+
const fn = match[1];
|
|
225
|
+
const pseudo = PseudoClasses[match[2]] || `:${match[2]}`;
|
|
226
|
+
return {
|
|
227
|
+
matcher: input.slice(match[1].length + match[2].length + 2),
|
|
228
|
+
selector: (s, body) => shouldAdd(body) && `${s}:${fn}(${pseudo})`
|
|
229
|
+
};
|
|
230
|
+
}
|
|
231
|
+
},
|
|
232
|
+
multiPass: true
|
|
233
|
+
};
|
|
234
|
+
const variantTaggedPseudoClasses = (options = {}) => {
|
|
235
|
+
const attributify = !!options?.attributifyPseudo;
|
|
236
|
+
return [
|
|
237
|
+
{
|
|
238
|
+
match: taggedPseudoClassMatcher("group", attributify ? '[group=""]' : ".group", " "),
|
|
239
|
+
multiPass: true
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
match: taggedPseudoClassMatcher("peer", attributify ? '[peer=""]' : ".peer", "~"),
|
|
243
|
+
multiPass: true
|
|
244
|
+
}
|
|
245
|
+
];
|
|
246
|
+
};
|
|
247
|
+
const partClasses = {
|
|
248
|
+
match: (input) => {
|
|
249
|
+
const match = input.match(PartClassesRE);
|
|
250
|
+
if (match) {
|
|
251
|
+
const part = `part(${match[2]})`;
|
|
252
|
+
return {
|
|
253
|
+
matcher: input.slice(match[1].length),
|
|
254
|
+
selector: (s, body) => {
|
|
255
|
+
return shouldAdd(body) && `${s}::${part}`;
|
|
256
|
+
}
|
|
257
|
+
};
|
|
258
|
+
}
|
|
259
|
+
},
|
|
260
|
+
multiPass: true
|
|
261
|
+
};
|
|
262
|
+
|
|
113
263
|
const variants = (options) => [
|
|
114
264
|
variantNegative,
|
|
115
265
|
variantImportant,
|
|
@@ -118,15 +268,17 @@ const variants = (options) => [
|
|
|
118
268
|
...variantMotions,
|
|
119
269
|
variantBreakpoints,
|
|
120
270
|
...variantCombinators,
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
...
|
|
124
|
-
|
|
125
|
-
|
|
271
|
+
variantPseudoClasses,
|
|
272
|
+
variantPseudoClassFunctions,
|
|
273
|
+
...variantTaggedPseudoClasses(options),
|
|
274
|
+
variantPseudoElements,
|
|
275
|
+
partClasses,
|
|
126
276
|
...variantColorsMediaOrClass(options),
|
|
127
277
|
...variantLanguageDirections
|
|
128
278
|
];
|
|
129
279
|
|
|
280
|
+
exports.CONTROL_BYPASS_PSEUDO_CLASS = CONTROL_BYPASS_PSEUDO_CLASS;
|
|
281
|
+
exports.partClasses = partClasses;
|
|
130
282
|
exports.variantBreakpoints = variantBreakpoints;
|
|
131
283
|
exports.variantColorsMediaOrClass = variantColorsMediaOrClass;
|
|
132
284
|
exports.variantCombinators = variantCombinators;
|
|
@@ -136,4 +288,8 @@ exports.variantMotions = variantMotions;
|
|
|
136
288
|
exports.variantNegative = variantNegative;
|
|
137
289
|
exports.variantOrientations = variantOrientations;
|
|
138
290
|
exports.variantPrint = variantPrint;
|
|
291
|
+
exports.variantPseudoClassFunctions = variantPseudoClassFunctions;
|
|
292
|
+
exports.variantPseudoClasses = variantPseudoClasses;
|
|
293
|
+
exports.variantPseudoElements = variantPseudoElements;
|
|
294
|
+
exports.variantTaggedPseudoClasses = variantTaggedPseudoClasses;
|
|
139
295
|
exports.variants = variants;
|
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,29 @@ 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
|
+
s: ["-inset-inline-start"],
|
|
25
|
+
e: ["-inset-inline-end"],
|
|
26
|
+
bs: ["-inset-block-start"],
|
|
27
|
+
be: ["-inset-block-end"],
|
|
28
|
+
is: ["-inset-inline-start"],
|
|
29
|
+
ie: ["-inset-inline-end"],
|
|
30
|
+
block: ["-inset-block-start", "-inset-block-end"],
|
|
31
|
+
inline: ["-inset-inline-start", "-inset-inline-end"]
|
|
16
32
|
};
|
|
17
33
|
const cornerMap = {
|
|
18
|
-
"
|
|
34
|
+
"l": ["-top-left", "-bottom-left"],
|
|
19
35
|
"r": ["-top-right", "-bottom-right"],
|
|
36
|
+
"t": ["-top-left", "-top-right"],
|
|
20
37
|
"b": ["-bottom-left", "-bottom-right"],
|
|
21
|
-
"l": ["-bottom-left", "-top-left"],
|
|
22
38
|
"tl": ["-top-left"],
|
|
23
39
|
"lt": ["-top-left"],
|
|
24
40
|
"tr": ["-top-right"],
|
|
@@ -27,7 +43,19 @@ const cornerMap = {
|
|
|
27
43
|
"lb": ["-bottom-left"],
|
|
28
44
|
"br": ["-bottom-right"],
|
|
29
45
|
"rb": ["-bottom-right"],
|
|
30
|
-
"": [""]
|
|
46
|
+
"": [""],
|
|
47
|
+
"bs": ["-start-start", "-start-end"],
|
|
48
|
+
"be": ["-end-start", "-end-end"],
|
|
49
|
+
"is": ["-end-start", "-start-start"],
|
|
50
|
+
"ie": ["-start-end", "-end-end"],
|
|
51
|
+
"bs-is": ["-start-start"],
|
|
52
|
+
"is-bs": ["-start-start"],
|
|
53
|
+
"bs-ie": ["-start-end"],
|
|
54
|
+
"ie-bs": ["-start-end"],
|
|
55
|
+
"be-is": ["-end-start"],
|
|
56
|
+
"is-be": ["-end-start"],
|
|
57
|
+
"be-ie": ["-end-end"],
|
|
58
|
+
"ie-be": ["-end-end"]
|
|
31
59
|
};
|
|
32
60
|
const xyzMap = {
|
|
33
61
|
"x": ["-x"],
|
|
@@ -332,6 +360,7 @@ exports.directionMap = directionMap;
|
|
|
332
360
|
exports.directionSize = directionSize;
|
|
333
361
|
exports.h = h;
|
|
334
362
|
exports.handler = handler;
|
|
363
|
+
exports.insetMap = insetMap;
|
|
335
364
|
exports.parseColor = parseColor;
|
|
336
365
|
exports.positionMap = positionMap;
|
|
337
366
|
exports.valueHandlers = valueHandlers;
|
|
@@ -10,13 +10,29 @@ 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
|
+
s: ["-inset-inline-start"],
|
|
23
|
+
e: ["-inset-inline-end"],
|
|
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"]
|
|
14
30
|
};
|
|
15
31
|
const cornerMap = {
|
|
16
|
-
"
|
|
32
|
+
"l": ["-top-left", "-bottom-left"],
|
|
17
33
|
"r": ["-top-right", "-bottom-right"],
|
|
34
|
+
"t": ["-top-left", "-top-right"],
|
|
18
35
|
"b": ["-bottom-left", "-bottom-right"],
|
|
19
|
-
"l": ["-bottom-left", "-top-left"],
|
|
20
36
|
"tl": ["-top-left"],
|
|
21
37
|
"lt": ["-top-left"],
|
|
22
38
|
"tr": ["-top-right"],
|
|
@@ -25,7 +41,19 @@ const cornerMap = {
|
|
|
25
41
|
"lb": ["-bottom-left"],
|
|
26
42
|
"br": ["-bottom-right"],
|
|
27
43
|
"rb": ["-bottom-right"],
|
|
28
|
-
"": [""]
|
|
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"]
|
|
29
57
|
};
|
|
30
58
|
const xyzMap = {
|
|
31
59
|
"x": ["-x"],
|
|
@@ -323,4 +351,4 @@ const colorResolver = (property, varName) => ([, body], { theme }) => {
|
|
|
323
351
|
}
|
|
324
352
|
};
|
|
325
353
|
|
|
326
|
-
export { cornerMap as a,
|
|
354
|
+
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
|
|
|
@@ -18,7 +17,9 @@ exports.borders = _default.borders;
|
|
|
18
17
|
exports.boxShadows = _default.boxShadows;
|
|
19
18
|
exports.boxSizing = _default.boxSizing;
|
|
20
19
|
exports.breaks = _default.breaks;
|
|
20
|
+
exports.colorableShadows = _default.colorableShadows;
|
|
21
21
|
exports.contents = _default.contents;
|
|
22
|
+
exports.cssProperty = _default.cssProperty;
|
|
22
23
|
exports.cssVariables = _default.cssVariables;
|
|
23
24
|
exports.cursors = _default.cursors;
|
|
24
25
|
exports.displays = _default.displays;
|
|
@@ -44,6 +45,7 @@ exports.questionMark = _default.questionMark;
|
|
|
44
45
|
exports.resizes = _default.resizes;
|
|
45
46
|
exports.rings = _default.rings;
|
|
46
47
|
exports.rules = _default.rules;
|
|
48
|
+
exports.shadowBase = _default.shadowBase;
|
|
47
49
|
exports.sizes = _default.sizes;
|
|
48
50
|
exports.svgUtilities = _default.svgUtilities;
|
|
49
51
|
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
|
+
};
|
|
59
|
+
declare const colorableShadows: (shadows: string | string[], colorVar: string) => string[];
|
|
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, colorableShadows, 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, I as appearances, D as aspectRatio, e as bgColors, b as borders, B as boxShadows, s as boxSizing, P as breaks, A as colorableShadows, O as contents, a1 as cssProperty, a0 as cssVariables, J as cursors, H as displays, f as flex, q as floats, T as fontSmoothings, S as fontStyles, X as fonts, g as gaps, h as grids, n as insets, j as justifies, F as margins, c as opacity, k as orders, o as outline, i as overflows, E as paddings, m as placements, K as pointerEvents, p as positions, u as questionMark, L as resizes, x as rings, r as rules, y as shadowBase, C as sizes, U as svgUtilities, Y as tabSizes, t as textAligns, d as textColors, a2 as textDecorations, Z as textIndents, Q as textOverflows, $ as textShadows, _ as textStrokes, R as textTransforms, V as transforms, W as transitions, M as userSelects, G as varEmpty, v as verticalAligns, N 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[]>;
|