@unocss/preset-wind 0.57.4 → 0.57.6
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 +7 -7
- package/dist/index.mjs +7 -7
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -101,7 +101,7 @@ function bgGradientColorValue(mode, cssColor, color, alpha) {
|
|
|
101
101
|
}
|
|
102
102
|
function bgGradientColorResolver() {
|
|
103
103
|
return ([, mode, body], { theme }) => {
|
|
104
|
-
const data = utils.parseColor(body, theme);
|
|
104
|
+
const data = utils.parseColor(body, theme, "backgroundColor");
|
|
105
105
|
if (!data)
|
|
106
106
|
return;
|
|
107
107
|
const { alpha, color, cssColor } = data;
|
|
@@ -263,11 +263,11 @@ const listStyle = [
|
|
|
263
263
|
...utils.makeGlobalStaticRules("list", "list-style-type")
|
|
264
264
|
];
|
|
265
265
|
const accents = [
|
|
266
|
-
[/^accent-(.+)$/, utils.colorResolver("accent-color", "accent"), { autocomplete: "accent-$colors" }],
|
|
266
|
+
[/^accent-(.+)$/, utils.colorResolver("accent-color", "accent", "accentColor"), { autocomplete: "accent-$colors" }],
|
|
267
267
|
[/^accent-op(?:acity)?-?(.+)$/, ([, d]) => ({ "--un-accent-opacity": utils.h.bracket.percent(d) }), { autocomplete: ["accent-(op|opacity)", "accent-(op|opacity)-<percent>"] }]
|
|
268
268
|
];
|
|
269
269
|
const carets = [
|
|
270
|
-
[/^caret-(.+)$/, utils.colorResolver("caret-color", "caret"), { autocomplete: "caret-$colors" }],
|
|
270
|
+
[/^caret-(.+)$/, utils.colorResolver("caret-color", "caret", "textColor"), { autocomplete: "caret-$colors" }],
|
|
271
271
|
[/^caret-op(?:acity)?-?(.+)$/, ([, d]) => ({ "--un-caret-opacity": utils.h.bracket.percent(d) }), { autocomplete: ["caret-(op|opacity)", "caret-(op|opacity)-<percent>"] }]
|
|
272
272
|
];
|
|
273
273
|
const imageRenderings = [
|
|
@@ -485,7 +485,7 @@ const filters = [
|
|
|
485
485
|
"drop-shadow-color-(op|opacity)-<percent>"
|
|
486
486
|
]
|
|
487
487
|
}],
|
|
488
|
-
[/^(?:filter-)?drop-shadow-color-(.+)$/, utils.colorResolver("--un-drop-shadow-color", "drop-shadow")],
|
|
488
|
+
[/^(?:filter-)?drop-shadow-color-(.+)$/, utils.colorResolver("--un-drop-shadow-color", "drop-shadow", "shadowColor")],
|
|
489
489
|
[/^(?:filter-)?drop-shadow-color-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-drop-shadow-opacity": utils.h.bracket.percent(opacity) })],
|
|
490
490
|
[/^(?:(backdrop-)|filter-)?grayscale(?:-(.+))?$/, toFilter("grayscale", percentWithDefault), { autocomplete: ["(backdrop|filter)-grayscale", "(backdrop|filter)-grayscale-<percent>", "grayscale-<percent>"] }],
|
|
491
491
|
[/^(?:(backdrop-)|filter-)?hue-rotate-(.+)$/, toFilter("hue-rotate", (s) => utils.h.bracket.cssvar.degree(s))],
|
|
@@ -732,7 +732,7 @@ const divides = [
|
|
|
732
732
|
[/^divide-(block|inline)-(-?.+)$/, handlerDivide],
|
|
733
733
|
[/^divide-(block|inline)-reverse$/, ([, d]) => ({ [`--un-divide-${d}-reverse`]: 1 })],
|
|
734
734
|
// color & opacity
|
|
735
|
-
[/^divide-(.+)$/, utils.colorResolver("border-color", "divide"), { autocomplete: "divide-$colors" }],
|
|
735
|
+
[/^divide-(.+)$/, utils.colorResolver("border-color", "divide", "borderColor"), { autocomplete: "divide-$colors" }],
|
|
736
736
|
[/^divide-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-divide-opacity": utils.h.bracket.percent(opacity) }), { autocomplete: ["divide-(op|opacity)", "divide-(op|opacity)-<percent>"] }],
|
|
737
737
|
// styles
|
|
738
738
|
..._.borderStyles.map((style) => [`divide-${style}`, { "border-style": style }])
|
|
@@ -869,7 +869,7 @@ const scrolls = [
|
|
|
869
869
|
const placeholders = [
|
|
870
870
|
// The prefix `$ ` is intentional. This rule is not to be matched directly from user-generated token.
|
|
871
871
|
// See variants/placeholder.
|
|
872
|
-
[/^\$ placeholder-(.+)$/, utils.colorResolver("color", "placeholder"), { autocomplete: "placeholder-$colors" }],
|
|
872
|
+
[/^\$ placeholder-(.+)$/, utils.colorResolver("color", "placeholder", "accentColor"), { autocomplete: "placeholder-$colors" }],
|
|
873
873
|
[/^\$ placeholder-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-placeholder-opacity": utils.h.bracket.percent(opacity) }), { autocomplete: ["placeholder-(op|opacity)", "placeholder-(op|opacity)-<percent>"] }]
|
|
874
874
|
];
|
|
875
875
|
|
|
@@ -1233,7 +1233,7 @@ const placeholderModifier = (input, { theme }) => {
|
|
|
1233
1233
|
const m = input.match(/^(.*)\b(placeholder-)(.+)$/);
|
|
1234
1234
|
if (m) {
|
|
1235
1235
|
const [, pre = "", p, body] = m;
|
|
1236
|
-
if (utils.hasParseableColor(body, theme) || hasOpacityValue(body)) {
|
|
1236
|
+
if (utils.hasParseableColor(body, theme, "accentColor") || hasOpacityValue(body)) {
|
|
1237
1237
|
return {
|
|
1238
1238
|
// Append `placeholder-$ ` (with space!) to the rule to be matched.
|
|
1239
1239
|
// The `placeholder-` is added for placeholder variant processing, and
|
package/dist/index.mjs
CHANGED
|
@@ -85,7 +85,7 @@ function bgGradientColorValue(mode, cssColor, color, alpha) {
|
|
|
85
85
|
}
|
|
86
86
|
function bgGradientColorResolver() {
|
|
87
87
|
return ([, mode, body], { theme }) => {
|
|
88
|
-
const data = parseColor(body, theme);
|
|
88
|
+
const data = parseColor(body, theme, "backgroundColor");
|
|
89
89
|
if (!data)
|
|
90
90
|
return;
|
|
91
91
|
const { alpha, color, cssColor } = data;
|
|
@@ -247,11 +247,11 @@ const listStyle = [
|
|
|
247
247
|
...makeGlobalStaticRules("list", "list-style-type")
|
|
248
248
|
];
|
|
249
249
|
const accents = [
|
|
250
|
-
[/^accent-(.+)$/, colorResolver("accent-color", "accent"), { autocomplete: "accent-$colors" }],
|
|
250
|
+
[/^accent-(.+)$/, colorResolver("accent-color", "accent", "accentColor"), { autocomplete: "accent-$colors" }],
|
|
251
251
|
[/^accent-op(?:acity)?-?(.+)$/, ([, d]) => ({ "--un-accent-opacity": h.bracket.percent(d) }), { autocomplete: ["accent-(op|opacity)", "accent-(op|opacity)-<percent>"] }]
|
|
252
252
|
];
|
|
253
253
|
const carets = [
|
|
254
|
-
[/^caret-(.+)$/, colorResolver("caret-color", "caret"), { autocomplete: "caret-$colors" }],
|
|
254
|
+
[/^caret-(.+)$/, colorResolver("caret-color", "caret", "textColor"), { autocomplete: "caret-$colors" }],
|
|
255
255
|
[/^caret-op(?:acity)?-?(.+)$/, ([, d]) => ({ "--un-caret-opacity": h.bracket.percent(d) }), { autocomplete: ["caret-(op|opacity)", "caret-(op|opacity)-<percent>"] }]
|
|
256
256
|
];
|
|
257
257
|
const imageRenderings = [
|
|
@@ -469,7 +469,7 @@ const filters = [
|
|
|
469
469
|
"drop-shadow-color-(op|opacity)-<percent>"
|
|
470
470
|
]
|
|
471
471
|
}],
|
|
472
|
-
[/^(?:filter-)?drop-shadow-color-(.+)$/, colorResolver("--un-drop-shadow-color", "drop-shadow")],
|
|
472
|
+
[/^(?:filter-)?drop-shadow-color-(.+)$/, colorResolver("--un-drop-shadow-color", "drop-shadow", "shadowColor")],
|
|
473
473
|
[/^(?:filter-)?drop-shadow-color-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-drop-shadow-opacity": h.bracket.percent(opacity) })],
|
|
474
474
|
[/^(?:(backdrop-)|filter-)?grayscale(?:-(.+))?$/, toFilter("grayscale", percentWithDefault), { autocomplete: ["(backdrop|filter)-grayscale", "(backdrop|filter)-grayscale-<percent>", "grayscale-<percent>"] }],
|
|
475
475
|
[/^(?:(backdrop-)|filter-)?hue-rotate-(.+)$/, toFilter("hue-rotate", (s) => h.bracket.cssvar.degree(s))],
|
|
@@ -716,7 +716,7 @@ const divides = [
|
|
|
716
716
|
[/^divide-(block|inline)-(-?.+)$/, handlerDivide],
|
|
717
717
|
[/^divide-(block|inline)-reverse$/, ([, d]) => ({ [`--un-divide-${d}-reverse`]: 1 })],
|
|
718
718
|
// color & opacity
|
|
719
|
-
[/^divide-(.+)$/, colorResolver("border-color", "divide"), { autocomplete: "divide-$colors" }],
|
|
719
|
+
[/^divide-(.+)$/, colorResolver("border-color", "divide", "borderColor"), { autocomplete: "divide-$colors" }],
|
|
720
720
|
[/^divide-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-divide-opacity": h.bracket.percent(opacity) }), { autocomplete: ["divide-(op|opacity)", "divide-(op|opacity)-<percent>"] }],
|
|
721
721
|
// styles
|
|
722
722
|
...borderStyles.map((style) => [`divide-${style}`, { "border-style": style }])
|
|
@@ -853,7 +853,7 @@ const scrolls = [
|
|
|
853
853
|
const placeholders = [
|
|
854
854
|
// The prefix `$ ` is intentional. This rule is not to be matched directly from user-generated token.
|
|
855
855
|
// See variants/placeholder.
|
|
856
|
-
[/^\$ placeholder-(.+)$/, colorResolver("color", "placeholder"), { autocomplete: "placeholder-$colors" }],
|
|
856
|
+
[/^\$ placeholder-(.+)$/, colorResolver("color", "placeholder", "accentColor"), { autocomplete: "placeholder-$colors" }],
|
|
857
857
|
[/^\$ placeholder-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-placeholder-opacity": h.bracket.percent(opacity) }), { autocomplete: ["placeholder-(op|opacity)", "placeholder-(op|opacity)-<percent>"] }]
|
|
858
858
|
];
|
|
859
859
|
|
|
@@ -1217,7 +1217,7 @@ const placeholderModifier = (input, { theme }) => {
|
|
|
1217
1217
|
const m = input.match(/^(.*)\b(placeholder-)(.+)$/);
|
|
1218
1218
|
if (m) {
|
|
1219
1219
|
const [, pre = "", p, body] = m;
|
|
1220
|
-
if (hasParseableColor(body, theme) || hasOpacityValue(body)) {
|
|
1220
|
+
if (hasParseableColor(body, theme, "accentColor") || hasOpacityValue(body)) {
|
|
1221
1221
|
return {
|
|
1222
1222
|
// Append `placeholder-$ ` (with space!) to the rule to be matched.
|
|
1223
1223
|
// The `placeholder-` is added for placeholder variant processing, and
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unocss/preset-wind",
|
|
3
|
-
"version": "0.57.
|
|
3
|
+
"version": "0.57.6",
|
|
4
4
|
"description": "Tailwind / Windi CSS compact preset for UnoCSS",
|
|
5
5
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -35,9 +35,9 @@
|
|
|
35
35
|
"dist"
|
|
36
36
|
],
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@unocss/core": "0.57.
|
|
39
|
-
"@unocss/preset-mini": "0.57.
|
|
40
|
-
"@unocss/rule-utils": "0.57.
|
|
38
|
+
"@unocss/core": "0.57.6",
|
|
39
|
+
"@unocss/preset-mini": "0.57.6",
|
|
40
|
+
"@unocss/rule-utils": "0.57.6"
|
|
41
41
|
},
|
|
42
42
|
"scripts": {
|
|
43
43
|
"build": "unbuild",
|