@unocss/preset-wind 0.65.0-beta.2 → 0.65.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.mjs
CHANGED
|
@@ -3,13 +3,13 @@ import presetMini, { presetMini as presetMini$1 } from '@unocss/preset-mini';
|
|
|
3
3
|
export { colors, preflights } from '@unocss/preset-mini';
|
|
4
4
|
import { shortcuts } from './shortcuts.mjs';
|
|
5
5
|
import { theme } from './theme.mjs';
|
|
6
|
-
import { r as rules } from './shared/preset-wind.
|
|
6
|
+
import { r as rules } from './shared/preset-wind.BPNbmKYQ.mjs';
|
|
7
7
|
import { b as variants } from './shared/preset-wind.BwVsieym.mjs';
|
|
8
8
|
import './shared/preset-wind.BzmnsdqZ.mjs';
|
|
9
9
|
import '@unocss/preset-mini/utils';
|
|
10
10
|
import '@unocss/preset-mini/rules';
|
|
11
11
|
import '@unocss/preset-mini/theme';
|
|
12
|
-
import './shared/preset-wind.
|
|
12
|
+
import './shared/preset-wind.DjKJQ_OR.mjs';
|
|
13
13
|
import '@unocss/rule-utils';
|
|
14
14
|
import '@unocss/preset-mini/variants';
|
|
15
15
|
|
package/dist/rules.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { c as accents, a as animations, u as backgroundBlendModes, b as backgroundStyles, d as carets, e as columns, y as cssVariables, f as divides, x as dynamicViewportHeight, j as hyphens, i as imageRenderings, n as isolations, g as lineClamps, l as listStyle, v as mixBlendModes, q as objectPositions, o as overscrolls, p as placeholders, r as rules, m as screenReadersAccess, s as scrollBehaviors, h as spaces, t as textTransforms, z as viewTransition, w as writingModes, k as writingOrientations } from './shared/preset-wind.
|
|
1
|
+
export { c as accents, a as animations, u as backgroundBlendModes, b as backgroundStyles, d as carets, e as columns, y as cssVariables, f as divides, x as dynamicViewportHeight, j as hyphens, i as imageRenderings, n as isolations, g as lineClamps, l as listStyle, v as mixBlendModes, q as objectPositions, o as overscrolls, p as placeholders, r as rules, m as screenReadersAccess, s as scrollBehaviors, h as spaces, t as textTransforms, z as viewTransition, w as writingModes, k as writingOrientations } from './shared/preset-wind.BPNbmKYQ.mjs';
|
|
2
2
|
export { c as container, a as containerShortcuts } from './shared/preset-wind.BzmnsdqZ.mjs';
|
|
3
|
-
export { b as backdropFilterBase, d as borderSpacingBase, f as filterBase, a as filters, i as fontVariantNumeric, h as fontVariantNumericBase, s as scrollSnapTypeBase, c as scrolls, t as tables, e as touchActionBase, g as touchActions } from './shared/preset-wind.
|
|
3
|
+
export { b as backdropFilterBase, d as borderSpacingBase, f as filterBase, a as filters, i as fontVariantNumeric, h as fontVariantNumericBase, s as scrollSnapTypeBase, c as scrolls, t as tables, e as touchActionBase, g as touchActions } from './shared/preset-wind.DjKJQ_OR.mjs';
|
|
4
4
|
import '@unocss/preset-mini/rules';
|
|
5
5
|
import '@unocss/preset-mini/utils';
|
|
6
6
|
import '@unocss/rule-utils';
|
|
@@ -3,7 +3,7 @@ import { borderStyles } from '@unocss/preset-mini/rules';
|
|
|
3
3
|
import { h, globalKeywords, makeGlobalStaticRules, positionMap, parseColor, colorResolver, directionMap } from '@unocss/preset-mini/utils';
|
|
4
4
|
import { colorToString, colorOpacityToString } from '@unocss/rule-utils';
|
|
5
5
|
import { c as container } from './preset-wind.BzmnsdqZ.mjs';
|
|
6
|
-
import { t as tables, g as touchActions, c as scrolls, i as fontVariantNumeric, a as filters } from './preset-wind.
|
|
6
|
+
import { t as tables, g as touchActions, c as scrolls, i as fontVariantNumeric, a as filters } from './preset-wind.DjKJQ_OR.mjs';
|
|
7
7
|
|
|
8
8
|
const animations = [
|
|
9
9
|
[/^(?:animate-)?keyframes-(.+)$/, ([, name], { theme }) => {
|
|
@@ -12,6 +12,10 @@ const filterBase = {
|
|
|
12
12
|
"--un-saturate": varEmpty,
|
|
13
13
|
"--un-sepia": varEmpty
|
|
14
14
|
};
|
|
15
|
+
const filterBaseKeys = Object.keys(filterBase);
|
|
16
|
+
const filterMetaCustom = {
|
|
17
|
+
preflightKeys: filterBaseKeys
|
|
18
|
+
};
|
|
15
19
|
const filterProperty = "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)";
|
|
16
20
|
const backdropFilterBase = {
|
|
17
21
|
"--un-backdrop-blur": varEmpty,
|
|
@@ -24,7 +28,14 @@ const backdropFilterBase = {
|
|
|
24
28
|
"--un-backdrop-saturate": varEmpty,
|
|
25
29
|
"--un-backdrop-sepia": varEmpty
|
|
26
30
|
};
|
|
31
|
+
const backdropFilterBaseKeys = Object.keys(backdropFilterBase);
|
|
32
|
+
const backdropMetaCustom = {
|
|
33
|
+
preflightKeys: backdropFilterBaseKeys
|
|
34
|
+
};
|
|
27
35
|
const backdropFilterProperty = "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)";
|
|
36
|
+
const composeMetaCustom = {
|
|
37
|
+
preflightKeys: [...filterBaseKeys, ...backdropFilterBaseKeys]
|
|
38
|
+
};
|
|
28
39
|
function percentWithDefault(str) {
|
|
29
40
|
let v = h.bracket.cssvar(str || "");
|
|
30
41
|
if (v != null)
|
|
@@ -71,11 +82,12 @@ function dropShadowResolver([, s], { theme }) {
|
|
|
71
82
|
}
|
|
72
83
|
const filters = [
|
|
73
84
|
// filters
|
|
74
|
-
[/^(?:(backdrop-)|filter-)?blur(?:-(.+))?$/, toFilter("blur", (s, theme) => theme.blur?.[s || "DEFAULT"] || h.bracket.cssvar.px(s)), { autocomplete: ["(backdrop|filter)-blur-$blur", "blur-$blur", "filter-blur"] }],
|
|
75
|
-
[/^(?:(backdrop-)|filter-)?brightness-(.+)$/, toFilter("brightness", (s) => h.bracket.cssvar.percent(s)), { autocomplete: ["(backdrop|filter)-brightness-<percent>", "brightness-<percent>"] }],
|
|
76
|
-
[/^(?:(backdrop-)|filter-)?contrast-(.+)$/, toFilter("contrast", (s) => h.bracket.cssvar.percent(s)), { autocomplete: ["(backdrop|filter)-contrast-<percent>", "contrast-<percent>"] }],
|
|
85
|
+
[/^(?:(backdrop-)|filter-)?blur(?:-(.+))?$/, toFilter("blur", (s, theme) => theme.blur?.[s || "DEFAULT"] || h.bracket.cssvar.px(s)), { custom: composeMetaCustom, autocomplete: ["(backdrop|filter)-blur-$blur", "blur-$blur", "filter-blur"] }],
|
|
86
|
+
[/^(?:(backdrop-)|filter-)?brightness-(.+)$/, toFilter("brightness", (s) => h.bracket.cssvar.percent(s)), { custom: composeMetaCustom, autocomplete: ["(backdrop|filter)-brightness-<percent>", "brightness-<percent>"] }],
|
|
87
|
+
[/^(?:(backdrop-)|filter-)?contrast-(.+)$/, toFilter("contrast", (s) => h.bracket.cssvar.percent(s)), { custom: composeMetaCustom, autocomplete: ["(backdrop|filter)-contrast-<percent>", "contrast-<percent>"] }],
|
|
77
88
|
// drop-shadow only on filter
|
|
78
89
|
[/^(?:filter-)?drop-shadow(?:-(.+))?$/, dropShadowResolver, {
|
|
90
|
+
custom: filterMetaCustom,
|
|
79
91
|
autocomplete: [
|
|
80
92
|
"filter-drop",
|
|
81
93
|
"filter-drop-shadow",
|
|
@@ -94,19 +106,19 @@ const filters = [
|
|
|
94
106
|
}],
|
|
95
107
|
[/^(?:filter-)?drop-shadow-color-(.+)$/, colorResolver("--un-drop-shadow-color", "drop-shadow", "shadowColor")],
|
|
96
108
|
[/^(?:filter-)?drop-shadow-color-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-drop-shadow-opacity": h.bracket.percent(opacity) })],
|
|
97
|
-
[/^(?:(backdrop-)|filter-)?grayscale(?:-(.+))?$/, toFilter("grayscale", percentWithDefault), { autocomplete: ["(backdrop|filter)-grayscale", "(backdrop|filter)-grayscale-<percent>", "grayscale-<percent>"] }],
|
|
98
|
-
[/^(?:(backdrop-)|filter-)?hue-rotate-(.+)$/, toFilter("hue-rotate", (s) => h.bracket.cssvar.degree(s))],
|
|
99
|
-
[/^(?:(backdrop-)|filter-)?invert(?:-(.+))?$/, toFilter("invert", percentWithDefault), { autocomplete: ["(backdrop|filter)-invert", "(backdrop|filter)-invert-<percent>", "invert-<percent>"] }],
|
|
109
|
+
[/^(?:(backdrop-)|filter-)?grayscale(?:-(.+))?$/, toFilter("grayscale", percentWithDefault), { custom: composeMetaCustom, autocomplete: ["(backdrop|filter)-grayscale", "(backdrop|filter)-grayscale-<percent>", "grayscale-<percent>"] }],
|
|
110
|
+
[/^(?:(backdrop-)|filter-)?hue-rotate-(.+)$/, toFilter("hue-rotate", (s) => h.bracket.cssvar.degree(s)), { custom: composeMetaCustom }],
|
|
111
|
+
[/^(?:(backdrop-)|filter-)?invert(?:-(.+))?$/, toFilter("invert", percentWithDefault), { custom: composeMetaCustom, autocomplete: ["(backdrop|filter)-invert", "(backdrop|filter)-invert-<percent>", "invert-<percent>"] }],
|
|
100
112
|
// opacity only on backdrop-filter
|
|
101
|
-
[/^(backdrop-)op(?:acity)?-(.+)$/, toFilter("opacity", (s) => h.bracket.cssvar.percent(s)), { autocomplete: ["backdrop-(op|opacity)", "backdrop-(op|opacity)-<percent>"] }],
|
|
102
|
-
[/^(?:(backdrop-)|filter-)?saturate-(.+)$/, toFilter("saturate", (s) => h.bracket.cssvar.percent(s)), { autocomplete: ["(backdrop|filter)-saturate", "(backdrop|filter)-saturate-<percent>", "saturate-<percent>"] }],
|
|
103
|
-
[/^(?:(backdrop-)|filter-)?sepia(?:-(.+))?$/, toFilter("sepia", percentWithDefault), { autocomplete: ["(backdrop|filter)-sepia", "(backdrop|filter)-sepia-<percent>", "sepia-<percent>"] }],
|
|
113
|
+
[/^(backdrop-)op(?:acity)?-(.+)$/, toFilter("opacity", (s) => h.bracket.cssvar.percent(s)), { custom: composeMetaCustom, autocomplete: ["backdrop-(op|opacity)", "backdrop-(op|opacity)-<percent>"] }],
|
|
114
|
+
[/^(?:(backdrop-)|filter-)?saturate-(.+)$/, toFilter("saturate", (s) => h.bracket.cssvar.percent(s)), { custom: composeMetaCustom, autocomplete: ["(backdrop|filter)-saturate", "(backdrop|filter)-saturate-<percent>", "saturate-<percent>"] }],
|
|
115
|
+
[/^(?:(backdrop-)|filter-)?sepia(?:-(.+))?$/, toFilter("sepia", percentWithDefault), { custom: composeMetaCustom, autocomplete: ["(backdrop|filter)-sepia", "(backdrop|filter)-sepia-<percent>", "sepia-<percent>"] }],
|
|
104
116
|
// base
|
|
105
|
-
["filter", { filter: filterProperty }],
|
|
117
|
+
["filter", { filter: filterProperty }, { custom: filterMetaCustom }],
|
|
106
118
|
["backdrop-filter", {
|
|
107
119
|
"-webkit-backdrop-filter": backdropFilterProperty,
|
|
108
120
|
"backdrop-filter": backdropFilterProperty
|
|
109
|
-
}],
|
|
121
|
+
}, { custom: backdropMetaCustom }],
|
|
110
122
|
// nones
|
|
111
123
|
["filter-none", { filter: "none" }],
|
|
112
124
|
["backdrop-filter-none", {
|
|
@@ -123,14 +135,15 @@ const filters = [
|
|
|
123
135
|
const scrollSnapTypeBase = {
|
|
124
136
|
"--un-scroll-snap-strictness": "proximity"
|
|
125
137
|
};
|
|
138
|
+
const custom$3 = { preflightKeys: Object.keys(scrollSnapTypeBase) };
|
|
126
139
|
const scrolls = [
|
|
127
140
|
// snap type
|
|
128
141
|
[/^snap-(x|y)$/, ([, d]) => ({
|
|
129
142
|
"scroll-snap-type": `${d} var(--un-scroll-snap-strictness)`
|
|
130
|
-
}), { autocomplete: "snap-(x|y|both)" }],
|
|
143
|
+
}), { custom: custom$3, autocomplete: "snap-(x|y|both)" }],
|
|
131
144
|
[/^snap-both$/, () => ({
|
|
132
145
|
"scroll-snap-type": "both var(--un-scroll-snap-strictness)"
|
|
133
|
-
})],
|
|
146
|
+
}), { custom: custom$3 }],
|
|
134
147
|
["snap-mandatory", { "--un-scroll-snap-strictness": "mandatory" }],
|
|
135
148
|
["snap-proximity", { "--un-scroll-snap-strictness": "proximity" }],
|
|
136
149
|
["snap-none", { "scroll-snap-type": "none" }],
|
|
@@ -167,6 +180,7 @@ const borderSpacingBase = {
|
|
|
167
180
|
"--un-border-spacing-x": 0,
|
|
168
181
|
"--un-border-spacing-y": 0
|
|
169
182
|
};
|
|
183
|
+
const custom$2 = { preflightKeys: Object.keys(borderSpacingBase) };
|
|
170
184
|
const borderSpacingProperty = "var(--un-border-spacing-x) var(--un-border-spacing-y)";
|
|
171
185
|
const tables = [
|
|
172
186
|
// displays
|
|
@@ -192,7 +206,7 @@ const tables = [
|
|
|
192
206
|
"border-spacing": borderSpacingProperty
|
|
193
207
|
};
|
|
194
208
|
}
|
|
195
|
-
}, { autocomplete: ["border-spacing", "border-spacing-$spacing"] }],
|
|
209
|
+
}, { custom: custom$2, autocomplete: ["border-spacing", "border-spacing-$spacing"] }],
|
|
196
210
|
[/^border-spacing-([xy])-(.+)$/, ([, d, s], { theme }) => {
|
|
197
211
|
const v = theme.spacing?.[s] ?? h.bracket.cssvar.global.auto.fraction.rem(s);
|
|
198
212
|
if (v != null) {
|
|
@@ -201,7 +215,7 @@ const tables = [
|
|
|
201
215
|
"border-spacing": borderSpacingProperty
|
|
202
216
|
};
|
|
203
217
|
}
|
|
204
|
-
}, { autocomplete: ["border-spacing-(x|y)", "border-spacing-(x|y)-$spacing"] }],
|
|
218
|
+
}, { custom: custom$2, autocomplete: ["border-spacing-(x|y)", "border-spacing-(x|y)-$spacing"] }],
|
|
205
219
|
["caption-top", { "caption-side": "top" }],
|
|
206
220
|
["caption-bottom", { "caption-side": "bottom" }],
|
|
207
221
|
["table-auto", { "table-layout": "auto" }],
|
|
@@ -215,20 +229,21 @@ const touchActionBase = {
|
|
|
215
229
|
"--un-pan-y": varEmpty,
|
|
216
230
|
"--un-pinch-zoom": varEmpty
|
|
217
231
|
};
|
|
232
|
+
const custom$1 = { preflightKeys: Object.keys(touchActionBase) };
|
|
218
233
|
const touchActionProperty = "var(--un-pan-x) var(--un-pan-y) var(--un-pinch-zoom)";
|
|
219
234
|
const touchActions = [
|
|
220
235
|
[/^touch-pan-(x|left|right)$/, ([, d]) => ({
|
|
221
236
|
"--un-pan-x": `pan-${d}`,
|
|
222
237
|
"touch-action": touchActionProperty
|
|
223
|
-
}), { autocomplete: ["touch-pan", "touch-pan-(x|left|right|y|up|down)"] }],
|
|
238
|
+
}), { custom: custom$1, autocomplete: ["touch-pan", "touch-pan-(x|left|right|y|up|down)"] }],
|
|
224
239
|
[/^touch-pan-(y|up|down)$/, ([, d]) => ({
|
|
225
240
|
"--un-pan-y": `pan-${d}`,
|
|
226
241
|
"touch-action": touchActionProperty
|
|
227
|
-
})],
|
|
242
|
+
}), { custom: custom$1 }],
|
|
228
243
|
["touch-pinch-zoom", {
|
|
229
244
|
"--un-pinch-zoom": "pinch-zoom",
|
|
230
245
|
"touch-action": touchActionProperty
|
|
231
|
-
}],
|
|
246
|
+
}, { custom: custom$1 }],
|
|
232
247
|
["touch-auto", { "touch-action": "auto" }],
|
|
233
248
|
["touch-manipulation", { "touch-action": "manipulation" }],
|
|
234
249
|
["touch-none", { "touch-action": "none" }],
|
|
@@ -242,6 +257,7 @@ const fontVariantNumericBase = {
|
|
|
242
257
|
"--un-numeric-spacing": varEmpty,
|
|
243
258
|
"--un-numeric-fraction": varEmpty
|
|
244
259
|
};
|
|
260
|
+
const custom = { preflightKeys: Object.keys(fontVariantNumericBase) };
|
|
245
261
|
function toEntries(entry) {
|
|
246
262
|
return {
|
|
247
263
|
...entry,
|
|
@@ -249,14 +265,14 @@ function toEntries(entry) {
|
|
|
249
265
|
};
|
|
250
266
|
}
|
|
251
267
|
const fontVariantNumeric = [
|
|
252
|
-
[/^ordinal$/, () => toEntries({ "--un-ordinal": "ordinal" }), { autocomplete: "ordinal" }],
|
|
253
|
-
[/^slashed-zero$/, () => toEntries({ "--un-slashed-zero": "slashed-zero" }), { autocomplete: "slashed-zero" }],
|
|
254
|
-
[/^lining-nums$/, () => toEntries({ "--un-numeric-figure": "lining-nums" }), { autocomplete: "lining-nums" }],
|
|
255
|
-
[/^oldstyle-nums$/, () => toEntries({ "--un-numeric-figure": "oldstyle-nums" }), { autocomplete: "oldstyle-nums" }],
|
|
256
|
-
[/^proportional-nums$/, () => toEntries({ "--un-numeric-spacing": "proportional-nums" }), { autocomplete: "proportional-nums" }],
|
|
257
|
-
[/^tabular-nums$/, () => toEntries({ "--un-numeric-spacing": "tabular-nums" }), { autocomplete: "tabular-nums" }],
|
|
258
|
-
[/^diagonal-fractions$/, () => toEntries({ "--un-numeric-fraction": "diagonal-fractions" }), { autocomplete: "diagonal-fractions" }],
|
|
259
|
-
[/^stacked-fractions$/, () => toEntries({ "--un-numeric-fraction": "stacked-fractions" }), { autocomplete: "stacked-fractions" }],
|
|
268
|
+
[/^ordinal$/, () => toEntries({ "--un-ordinal": "ordinal" }), { custom, autocomplete: "ordinal" }],
|
|
269
|
+
[/^slashed-zero$/, () => toEntries({ "--un-slashed-zero": "slashed-zero" }), { custom, autocomplete: "slashed-zero" }],
|
|
270
|
+
[/^lining-nums$/, () => toEntries({ "--un-numeric-figure": "lining-nums" }), { custom, autocomplete: "lining-nums" }],
|
|
271
|
+
[/^oldstyle-nums$/, () => toEntries({ "--un-numeric-figure": "oldstyle-nums" }), { custom, autocomplete: "oldstyle-nums" }],
|
|
272
|
+
[/^proportional-nums$/, () => toEntries({ "--un-numeric-spacing": "proportional-nums" }), { custom, autocomplete: "proportional-nums" }],
|
|
273
|
+
[/^tabular-nums$/, () => toEntries({ "--un-numeric-spacing": "tabular-nums" }), { custom, autocomplete: "tabular-nums" }],
|
|
274
|
+
[/^diagonal-fractions$/, () => toEntries({ "--un-numeric-fraction": "diagonal-fractions" }), { custom, autocomplete: "diagonal-fractions" }],
|
|
275
|
+
[/^stacked-fractions$/, () => toEntries({ "--un-numeric-fraction": "stacked-fractions" }), { custom, autocomplete: "stacked-fractions" }],
|
|
260
276
|
["normal-nums", { "font-variant-numeric": "normal" }]
|
|
261
277
|
];
|
|
262
278
|
|
package/dist/theme.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { transformBase, boxShadowsBase, ringBase } from '@unocss/preset-mini/rules';
|
|
2
2
|
import { theme as theme$1 } from '@unocss/preset-mini/theme';
|
|
3
|
-
import { e as touchActionBase, s as scrollSnapTypeBase, h as fontVariantNumericBase, d as borderSpacingBase, f as filterBase, b as backdropFilterBase } from './shared/preset-wind.
|
|
3
|
+
import { e as touchActionBase, s as scrollSnapTypeBase, h as fontVariantNumericBase, d as borderSpacingBase, f as filterBase, b as backdropFilterBase } from './shared/preset-wind.DjKJQ_OR.mjs';
|
|
4
4
|
import '@unocss/preset-mini/utils';
|
|
5
5
|
|
|
6
6
|
const theme = {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unocss/preset-wind",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.65.0
|
|
4
|
+
"version": "0.65.0",
|
|
5
5
|
"description": "Tailwind / Windi CSS compact preset for UnoCSS",
|
|
6
6
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -52,9 +52,9 @@
|
|
|
52
52
|
"dist"
|
|
53
53
|
],
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@unocss/core": "0.65.0
|
|
56
|
-
"@unocss/preset-mini": "0.65.0
|
|
57
|
-
"@unocss/rule-utils": "0.65.0
|
|
55
|
+
"@unocss/core": "0.65.0",
|
|
56
|
+
"@unocss/preset-mini": "0.65.0",
|
|
57
|
+
"@unocss/rule-utils": "0.65.0"
|
|
58
58
|
},
|
|
59
59
|
"scripts": {
|
|
60
60
|
"build": "unbuild",
|