@unocss/preset-wind 0.21.2 → 0.22.0
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/index.cjs +52 -25
- package/dist/index.mjs +54 -27
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -213,7 +213,6 @@ const containerShortcuts = [
|
|
|
213
213
|
}]
|
|
214
214
|
];
|
|
215
215
|
|
|
216
|
-
const filterContnet = "var(--un-blur) var(--un-brightness) var(--un-contrast) var(--un-drop-shadow) var(--un-grayscale) var(--un-hue-rotate) var(--un-invert) var(--un-saturate) var(--un-sepia)";
|
|
217
216
|
const filterBase = {
|
|
218
217
|
"--un-blur": rules$1.varEmpty,
|
|
219
218
|
"--un-brightness": rules$1.varEmpty,
|
|
@@ -224,10 +223,9 @@ const filterBase = {
|
|
|
224
223
|
"--un-invert": rules$1.varEmpty,
|
|
225
224
|
"--un-saturate": rules$1.varEmpty,
|
|
226
225
|
"--un-sepia": rules$1.varEmpty,
|
|
227
|
-
"filter":
|
|
228
|
-
[
|
|
226
|
+
"--un-filter": "var(--un-blur) var(--un-brightness) var(--un-contrast) var(--un-drop-shadow) var(--un-grayscale) var(--un-hue-rotate) var(--un-invert) var(--un-saturate) var(--un-sepia)",
|
|
227
|
+
[core.CONTROL_SHORTCUT_NO_MERGE]: ""
|
|
229
228
|
};
|
|
230
|
-
const backdropFilterContent = "var(--un-backdrop-blur) var(--un-backdrop-brightness) var(--un-backdrop-contrast) var(--un-backdrop-grayscale) var(--un-backdrop-hue-rotate) var(--un-backdrop-invert) var(--un-backdrop-opacity) var(--un-backdrop-saturate) var(--un-backdrop-sepia)";
|
|
231
229
|
const backdropFilterBase = {
|
|
232
230
|
"--un-backdrop-blur": rules$1.varEmpty,
|
|
233
231
|
"--un-backdrop-brightness": rules$1.varEmpty,
|
|
@@ -238,9 +236,8 @@ const backdropFilterBase = {
|
|
|
238
236
|
"--un-backdrop-opacity": rules$1.varEmpty,
|
|
239
237
|
"--un-backdrop-saturate": rules$1.varEmpty,
|
|
240
238
|
"--un-backdrop-sepia": rules$1.varEmpty,
|
|
241
|
-
"-
|
|
242
|
-
"
|
|
243
|
-
[variants.CONTROL_BYPASS_PSEUDO_CLASS]: ""
|
|
239
|
+
"--un-backdrop-filter": "var(--un-backdrop-blur) var(--un-backdrop-brightness) var(--un-backdrop-contrast) var(--un-backdrop-grayscale) var(--un-backdrop-hue-rotate) var(--un-backdrop-invert) var(--un-backdrop-opacity) var(--un-backdrop-saturate) var(--un-backdrop-sepia)",
|
|
240
|
+
[core.CONTROL_SHORTCUT_NO_MERGE]: ""
|
|
244
241
|
};
|
|
245
242
|
const percentWithDefault = (str) => {
|
|
246
243
|
let v = utils.handler.bracket(str || "");
|
|
@@ -253,15 +250,27 @@ const percentWithDefault = (str) => {
|
|
|
253
250
|
const toFilter = (varName, resolver) => ([, b, s], { theme }) => {
|
|
254
251
|
const value = resolver(s, theme);
|
|
255
252
|
if (value != null && value !== "") {
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
253
|
+
if (b) {
|
|
254
|
+
return [
|
|
255
|
+
backdropFilterBase,
|
|
256
|
+
{
|
|
257
|
+
[`--un-${b}${varName}`]: `${varName}(${value})`,
|
|
258
|
+
"-webkit-backdrop-filter": "var(--un-backdrop-filter)",
|
|
259
|
+
"backdrop-filter": "var(--un-backdrop-filter)"
|
|
260
|
+
}
|
|
261
|
+
];
|
|
262
|
+
} else {
|
|
263
|
+
return [
|
|
264
|
+
filterBase,
|
|
265
|
+
{
|
|
266
|
+
[`--un-${varName}`]: `${varName}(${value})`,
|
|
267
|
+
filter: "var(--un-filter)"
|
|
268
|
+
}
|
|
269
|
+
];
|
|
270
|
+
}
|
|
260
271
|
}
|
|
261
272
|
};
|
|
262
273
|
const filters = [
|
|
263
|
-
["filter", filterBase],
|
|
264
|
-
["backdrop-filter", backdropFilterBase],
|
|
265
274
|
[/^(backdrop-)?blur(?:-(.+))?$/, toFilter("blur", (s, theme) => theme.blur?.[s || "DEFAULT"] || utils.handler.bracket.px(s))],
|
|
266
275
|
[/^(backdrop-)?brightness-(.+)$/, toFilter("brightness", (s) => utils.handler.bracket.percent(s))],
|
|
267
276
|
[/^(backdrop-)?contrast-(.+)$/, toFilter("contrast", (s) => utils.handler.bracket.percent(s))],
|
|
@@ -279,6 +288,17 @@ const filters = [
|
|
|
279
288
|
[/^(backdrop-)opacity-(.+)$/, toFilter("opacity", (s) => utils.handler.bracket.percent(s))],
|
|
280
289
|
[/^(backdrop-)?saturate-(.+)$/, toFilter("saturate", (s) => utils.handler.bracket.percent(s))],
|
|
281
290
|
[/^(backdrop-)?sepia(?:-(.+))?$/, toFilter("sepia", percentWithDefault)],
|
|
291
|
+
[/^filter$/, () => [
|
|
292
|
+
filterBase,
|
|
293
|
+
{ filter: "var(--un-filter)" }
|
|
294
|
+
]],
|
|
295
|
+
[/^backdrop-filter$/, () => [
|
|
296
|
+
backdropFilterBase,
|
|
297
|
+
{
|
|
298
|
+
"-webkit-backdrop-filter": "var(--un-backdrop-filter)",
|
|
299
|
+
"backdrop-filter": "var(--un-backdrop-filter)"
|
|
300
|
+
}
|
|
301
|
+
]],
|
|
282
302
|
["filter-none", { filter: "none" }],
|
|
283
303
|
["backdrop-filter-none", {
|
|
284
304
|
"-webkit-backdrop-filter": "none",
|
|
@@ -508,18 +528,25 @@ const fontVariantNumericBase = {
|
|
|
508
528
|
"--un-numeric-figure": rules$1.varEmpty,
|
|
509
529
|
"--un-numeric-spacing": rules$1.varEmpty,
|
|
510
530
|
"--un-numeric-fraction": rules$1.varEmpty,
|
|
511
|
-
"font-variant-numeric": "var(--un-ordinal) var(--un-slashed-zero) var(--un-numeric-figure) var(--un-numeric-spacing) var(--un-numeric-fraction)",
|
|
512
|
-
[
|
|
531
|
+
"--un-font-variant-numeric": "var(--un-ordinal) var(--un-slashed-zero) var(--un-numeric-figure) var(--un-numeric-spacing) var(--un-numeric-fraction)",
|
|
532
|
+
[core.CONTROL_SHORTCUT_NO_MERGE]: ""
|
|
513
533
|
};
|
|
534
|
+
const toEntries = (entry) => [
|
|
535
|
+
fontVariantNumericBase,
|
|
536
|
+
{
|
|
537
|
+
...entry,
|
|
538
|
+
"font-variant-numeric": "var(--un-font-variant-numeric)"
|
|
539
|
+
}
|
|
540
|
+
];
|
|
514
541
|
const fontVariantNumeric = [
|
|
515
|
-
[/^ordinal$/, () =>
|
|
516
|
-
[/^slashed-zero$/, () =>
|
|
517
|
-
[/^lining-nums$/, () =>
|
|
518
|
-
[/^oldstyle-nums$/, () =>
|
|
519
|
-
[/^proportional-nums$/, () =>
|
|
520
|
-
[/^tabular-nums$/, () =>
|
|
521
|
-
[/^diagonal-fractions$/, () =>
|
|
522
|
-
[/^stacked-fractions$/, () =>
|
|
542
|
+
[/^ordinal$/, () => toEntries({ "--un-ordinal": "ordinal" })],
|
|
543
|
+
[/^slashed-zero$/, () => toEntries({ "--un-slashed-zero": "slashed-zero" })],
|
|
544
|
+
[/^lining-nums$/, () => toEntries({ "--un-numeric-figure": "lining-nums" })],
|
|
545
|
+
[/^oldstyle-nums$/, () => toEntries({ "--un-numeric-figure": "oldstyle-nums" })],
|
|
546
|
+
[/^proportional-nums$/, () => toEntries({ "--un-numeric-spacing": "proportional-nums" })],
|
|
547
|
+
[/^tabular-nums$/, () => toEntries({ "--un-numeric-spacing": "tabular-nums" })],
|
|
548
|
+
[/^diagonal-fractions$/, () => toEntries({ "--un-numeric-fraction": "diagonal-fractions" })],
|
|
549
|
+
[/^stacked-fractions$/, () => toEntries({ "--un-numeric-fraction": "stacked-fractions" })],
|
|
523
550
|
["normal-nums", { "font-variant-numeric": "normal" }]
|
|
524
551
|
];
|
|
525
552
|
|
|
@@ -528,7 +555,7 @@ const touchActionBase = {
|
|
|
528
555
|
"--un-pan-y": rules$1.varEmpty,
|
|
529
556
|
"--un-pinch-zoom": rules$1.varEmpty,
|
|
530
557
|
"--un-touch-action": "var(--un-pan-x) var(--un-pan-y) var(--un-pinch-zoom)",
|
|
531
|
-
[
|
|
558
|
+
[core.CONTROL_SHORTCUT_NO_MERGE]: ""
|
|
532
559
|
};
|
|
533
560
|
const touchActions = [
|
|
534
561
|
[/^touch-pan-(x|left|right)$/, ([, d]) => [
|
|
@@ -561,7 +588,7 @@ const scrolls = [
|
|
|
561
588
|
[/^snap-(x|y|both)$/, ([, d]) => [
|
|
562
589
|
{
|
|
563
590
|
"--un-scroll-snap-strictness": "proximity",
|
|
564
|
-
[
|
|
591
|
+
[core.CONTROL_SHORTCUT_NO_MERGE]: ""
|
|
565
592
|
},
|
|
566
593
|
{
|
|
567
594
|
"scroll-snap-type": `${d} var(--un-scroll-snap-strictness)`
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { toArray } from '@unocss/core';
|
|
1
|
+
import { variants } from '@unocss/preset-mini/variants';
|
|
2
|
+
import { toArray, CONTROL_SHORTCUT_NO_MERGE } from '@unocss/core';
|
|
3
3
|
import { theme as theme$1 } from '@unocss/preset-mini/theme';
|
|
4
4
|
export { colors } from '@unocss/preset-mini';
|
|
5
5
|
import { varEmpty, cssVariables as cssVariables$1, pointerEvents, appearances, positions, insets, zIndexes, orders, grids, floats, margins, boxSizing, displays, aspectRatio, sizes, flex, transforms, cursors, userSelects, resizes, appearance, placements, alignments, justifies, gaps, overflows, textOverflows, whitespaces, breaks, borders, bgColors, svgUtilities, paddings, textAligns, textIndents, verticalAligns, fonts, fontStyles, textColors, textDecorations, fontSmoothings, tabSizes, textStrokes, textShadows, opacity, boxShadows, outline, rings, transitions, willChange, contents, questionMark } from '@unocss/preset-mini/rules';
|
|
@@ -209,7 +209,6 @@ const containerShortcuts = [
|
|
|
209
209
|
}]
|
|
210
210
|
];
|
|
211
211
|
|
|
212
|
-
const filterContnet = "var(--un-blur) var(--un-brightness) var(--un-contrast) var(--un-drop-shadow) var(--un-grayscale) var(--un-hue-rotate) var(--un-invert) var(--un-saturate) var(--un-sepia)";
|
|
213
212
|
const filterBase = {
|
|
214
213
|
"--un-blur": varEmpty,
|
|
215
214
|
"--un-brightness": varEmpty,
|
|
@@ -220,10 +219,9 @@ const filterBase = {
|
|
|
220
219
|
"--un-invert": varEmpty,
|
|
221
220
|
"--un-saturate": varEmpty,
|
|
222
221
|
"--un-sepia": varEmpty,
|
|
223
|
-
"filter":
|
|
224
|
-
[
|
|
222
|
+
"--un-filter": "var(--un-blur) var(--un-brightness) var(--un-contrast) var(--un-drop-shadow) var(--un-grayscale) var(--un-hue-rotate) var(--un-invert) var(--un-saturate) var(--un-sepia)",
|
|
223
|
+
[CONTROL_SHORTCUT_NO_MERGE]: ""
|
|
225
224
|
};
|
|
226
|
-
const backdropFilterContent = "var(--un-backdrop-blur) var(--un-backdrop-brightness) var(--un-backdrop-contrast) var(--un-backdrop-grayscale) var(--un-backdrop-hue-rotate) var(--un-backdrop-invert) var(--un-backdrop-opacity) var(--un-backdrop-saturate) var(--un-backdrop-sepia)";
|
|
227
225
|
const backdropFilterBase = {
|
|
228
226
|
"--un-backdrop-blur": varEmpty,
|
|
229
227
|
"--un-backdrop-brightness": varEmpty,
|
|
@@ -234,9 +232,8 @@ const backdropFilterBase = {
|
|
|
234
232
|
"--un-backdrop-opacity": varEmpty,
|
|
235
233
|
"--un-backdrop-saturate": varEmpty,
|
|
236
234
|
"--un-backdrop-sepia": varEmpty,
|
|
237
|
-
"-
|
|
238
|
-
"
|
|
239
|
-
[CONTROL_BYPASS_PSEUDO_CLASS]: ""
|
|
235
|
+
"--un-backdrop-filter": "var(--un-backdrop-blur) var(--un-backdrop-brightness) var(--un-backdrop-contrast) var(--un-backdrop-grayscale) var(--un-backdrop-hue-rotate) var(--un-backdrop-invert) var(--un-backdrop-opacity) var(--un-backdrop-saturate) var(--un-backdrop-sepia)",
|
|
236
|
+
[CONTROL_SHORTCUT_NO_MERGE]: ""
|
|
240
237
|
};
|
|
241
238
|
const percentWithDefault = (str) => {
|
|
242
239
|
let v = handler.bracket(str || "");
|
|
@@ -249,15 +246,27 @@ const percentWithDefault = (str) => {
|
|
|
249
246
|
const toFilter = (varName, resolver) => ([, b, s], { theme }) => {
|
|
250
247
|
const value = resolver(s, theme);
|
|
251
248
|
if (value != null && value !== "") {
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
249
|
+
if (b) {
|
|
250
|
+
return [
|
|
251
|
+
backdropFilterBase,
|
|
252
|
+
{
|
|
253
|
+
[`--un-${b}${varName}`]: `${varName}(${value})`,
|
|
254
|
+
"-webkit-backdrop-filter": "var(--un-backdrop-filter)",
|
|
255
|
+
"backdrop-filter": "var(--un-backdrop-filter)"
|
|
256
|
+
}
|
|
257
|
+
];
|
|
258
|
+
} else {
|
|
259
|
+
return [
|
|
260
|
+
filterBase,
|
|
261
|
+
{
|
|
262
|
+
[`--un-${varName}`]: `${varName}(${value})`,
|
|
263
|
+
filter: "var(--un-filter)"
|
|
264
|
+
}
|
|
265
|
+
];
|
|
266
|
+
}
|
|
256
267
|
}
|
|
257
268
|
};
|
|
258
269
|
const filters = [
|
|
259
|
-
["filter", filterBase],
|
|
260
|
-
["backdrop-filter", backdropFilterBase],
|
|
261
270
|
[/^(backdrop-)?blur(?:-(.+))?$/, toFilter("blur", (s, theme) => theme.blur?.[s || "DEFAULT"] || handler.bracket.px(s))],
|
|
262
271
|
[/^(backdrop-)?brightness-(.+)$/, toFilter("brightness", (s) => handler.bracket.percent(s))],
|
|
263
272
|
[/^(backdrop-)?contrast-(.+)$/, toFilter("contrast", (s) => handler.bracket.percent(s))],
|
|
@@ -275,6 +284,17 @@ const filters = [
|
|
|
275
284
|
[/^(backdrop-)opacity-(.+)$/, toFilter("opacity", (s) => handler.bracket.percent(s))],
|
|
276
285
|
[/^(backdrop-)?saturate-(.+)$/, toFilter("saturate", (s) => handler.bracket.percent(s))],
|
|
277
286
|
[/^(backdrop-)?sepia(?:-(.+))?$/, toFilter("sepia", percentWithDefault)],
|
|
287
|
+
[/^filter$/, () => [
|
|
288
|
+
filterBase,
|
|
289
|
+
{ filter: "var(--un-filter)" }
|
|
290
|
+
]],
|
|
291
|
+
[/^backdrop-filter$/, () => [
|
|
292
|
+
backdropFilterBase,
|
|
293
|
+
{
|
|
294
|
+
"-webkit-backdrop-filter": "var(--un-backdrop-filter)",
|
|
295
|
+
"backdrop-filter": "var(--un-backdrop-filter)"
|
|
296
|
+
}
|
|
297
|
+
]],
|
|
278
298
|
["filter-none", { filter: "none" }],
|
|
279
299
|
["backdrop-filter-none", {
|
|
280
300
|
"-webkit-backdrop-filter": "none",
|
|
@@ -504,18 +524,25 @@ const fontVariantNumericBase = {
|
|
|
504
524
|
"--un-numeric-figure": varEmpty,
|
|
505
525
|
"--un-numeric-spacing": varEmpty,
|
|
506
526
|
"--un-numeric-fraction": varEmpty,
|
|
507
|
-
"font-variant-numeric": "var(--un-ordinal) var(--un-slashed-zero) var(--un-numeric-figure) var(--un-numeric-spacing) var(--un-numeric-fraction)",
|
|
508
|
-
[
|
|
527
|
+
"--un-font-variant-numeric": "var(--un-ordinal) var(--un-slashed-zero) var(--un-numeric-figure) var(--un-numeric-spacing) var(--un-numeric-fraction)",
|
|
528
|
+
[CONTROL_SHORTCUT_NO_MERGE]: ""
|
|
509
529
|
};
|
|
530
|
+
const toEntries = (entry) => [
|
|
531
|
+
fontVariantNumericBase,
|
|
532
|
+
{
|
|
533
|
+
...entry,
|
|
534
|
+
"font-variant-numeric": "var(--un-font-variant-numeric)"
|
|
535
|
+
}
|
|
536
|
+
];
|
|
510
537
|
const fontVariantNumeric = [
|
|
511
|
-
[/^ordinal$/, () =>
|
|
512
|
-
[/^slashed-zero$/, () =>
|
|
513
|
-
[/^lining-nums$/, () =>
|
|
514
|
-
[/^oldstyle-nums$/, () =>
|
|
515
|
-
[/^proportional-nums$/, () =>
|
|
516
|
-
[/^tabular-nums$/, () =>
|
|
517
|
-
[/^diagonal-fractions$/, () =>
|
|
518
|
-
[/^stacked-fractions$/, () =>
|
|
538
|
+
[/^ordinal$/, () => toEntries({ "--un-ordinal": "ordinal" })],
|
|
539
|
+
[/^slashed-zero$/, () => toEntries({ "--un-slashed-zero": "slashed-zero" })],
|
|
540
|
+
[/^lining-nums$/, () => toEntries({ "--un-numeric-figure": "lining-nums" })],
|
|
541
|
+
[/^oldstyle-nums$/, () => toEntries({ "--un-numeric-figure": "oldstyle-nums" })],
|
|
542
|
+
[/^proportional-nums$/, () => toEntries({ "--un-numeric-spacing": "proportional-nums" })],
|
|
543
|
+
[/^tabular-nums$/, () => toEntries({ "--un-numeric-spacing": "tabular-nums" })],
|
|
544
|
+
[/^diagonal-fractions$/, () => toEntries({ "--un-numeric-fraction": "diagonal-fractions" })],
|
|
545
|
+
[/^stacked-fractions$/, () => toEntries({ "--un-numeric-fraction": "stacked-fractions" })],
|
|
519
546
|
["normal-nums", { "font-variant-numeric": "normal" }]
|
|
520
547
|
];
|
|
521
548
|
|
|
@@ -524,7 +551,7 @@ const touchActionBase = {
|
|
|
524
551
|
"--un-pan-y": varEmpty,
|
|
525
552
|
"--un-pinch-zoom": varEmpty,
|
|
526
553
|
"--un-touch-action": "var(--un-pan-x) var(--un-pan-y) var(--un-pinch-zoom)",
|
|
527
|
-
[
|
|
554
|
+
[CONTROL_SHORTCUT_NO_MERGE]: ""
|
|
528
555
|
};
|
|
529
556
|
const touchActions = [
|
|
530
557
|
[/^touch-pan-(x|left|right)$/, ([, d]) => [
|
|
@@ -557,7 +584,7 @@ const scrolls = [
|
|
|
557
584
|
[/^snap-(x|y|both)$/, ([, d]) => [
|
|
558
585
|
{
|
|
559
586
|
"--un-scroll-snap-strictness": "proximity",
|
|
560
|
-
[
|
|
587
|
+
[CONTROL_SHORTCUT_NO_MERGE]: ""
|
|
561
588
|
},
|
|
562
589
|
{
|
|
563
590
|
"scroll-snap-type": `${d} var(--un-scroll-snap-strictness)`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unocss/preset-wind",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.22.0",
|
|
4
4
|
"description": "Tailwind / Windi CSS compact preset for UnoCSS",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"unocss",
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
"*.css"
|
|
36
36
|
],
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@unocss/core": "0.
|
|
39
|
-
"@unocss/preset-mini": "0.
|
|
38
|
+
"@unocss/core": "0.22.0",
|
|
39
|
+
"@unocss/preset-mini": "0.22.0"
|
|
40
40
|
},
|
|
41
41
|
"scripts": {
|
|
42
42
|
"build": "unbuild",
|