@unocss/preset-wind 0.34.1 → 0.35.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/index.cjs +6 -4
- package/dist/index.mjs +6 -4
- package/package.json +19 -19
package/dist/index.cjs
CHANGED
|
@@ -104,6 +104,8 @@ const backgroundStyles = [
|
|
|
104
104
|
return { "--un-url": `${utils.handler.bracket(d)}`, "background-image": "var(--un-url)" };
|
|
105
105
|
else if (/^\[length:(.+)\]$/.test(d) && utils.handler.bracketOfLength(d) != null)
|
|
106
106
|
return { "background-size": utils.handler.bracketOfLength(d).split(" ").map((e) => utils.handler.fraction.auto.px.cssvar(e)).join(" ") };
|
|
107
|
+
else if (/^\[position:(.+)\]$/.test(d) && utils.handler.bracketOfPosition(d) != null)
|
|
108
|
+
return { "background-position": utils.handler.bracketOfPosition(d).split(" ").map((e) => utils.handler.fraction.auto.px.cssvar(e)).join(" ") };
|
|
107
109
|
}],
|
|
108
110
|
[/^bg-gradient-(.+)$/, ([, d]) => ({ "--un-gradient": utils.handler.bracket(d) }), {
|
|
109
111
|
autocomplete: ["bg-gradient", "bg-gradient-(from|to|via)", "bg-gradient-(from|to|via)-$colors", "bg-gradient-(from|to|via)-(op|opacity)", "bg-gradient-(from|to|via)-(op|opacity)-<percent>"]
|
|
@@ -152,10 +154,10 @@ const backgroundStyles = [
|
|
|
152
154
|
[/^bg-([-\w]{3,})$/, ([, s]) => ({ "background-position": utils.positionMap[s] })],
|
|
153
155
|
["bg-repeat", { "background-repeat": "repeat" }],
|
|
154
156
|
["bg-no-repeat", { "background-repeat": "no-repeat" }],
|
|
155
|
-
["bg-repeat-x", { "background-
|
|
156
|
-
["bg-repeat-y", { "background-
|
|
157
|
-
["bg-repeat-round", { "background-
|
|
158
|
-
["bg-repeat-space", { "background-
|
|
157
|
+
["bg-repeat-x", { "background-repeat": "repeat-x" }],
|
|
158
|
+
["bg-repeat-y", { "background-repeat": "repeat-y" }],
|
|
159
|
+
["bg-repeat-round", { "background-repeat": "round" }],
|
|
160
|
+
["bg-repeat-space", { "background-repeat": "space" }],
|
|
159
161
|
["bg-origin-border", { "background-origin": "border-box" }],
|
|
160
162
|
["bg-origin-padding", { "background-origin": "padding-box" }],
|
|
161
163
|
["bg-origin-content", { "background-origin": "content-box" }]
|
package/dist/index.mjs
CHANGED
|
@@ -100,6 +100,8 @@ const backgroundStyles = [
|
|
|
100
100
|
return { "--un-url": `${handler.bracket(d)}`, "background-image": "var(--un-url)" };
|
|
101
101
|
else if (/^\[length:(.+)\]$/.test(d) && handler.bracketOfLength(d) != null)
|
|
102
102
|
return { "background-size": handler.bracketOfLength(d).split(" ").map((e) => handler.fraction.auto.px.cssvar(e)).join(" ") };
|
|
103
|
+
else if (/^\[position:(.+)\]$/.test(d) && handler.bracketOfPosition(d) != null)
|
|
104
|
+
return { "background-position": handler.bracketOfPosition(d).split(" ").map((e) => handler.fraction.auto.px.cssvar(e)).join(" ") };
|
|
103
105
|
}],
|
|
104
106
|
[/^bg-gradient-(.+)$/, ([, d]) => ({ "--un-gradient": handler.bracket(d) }), {
|
|
105
107
|
autocomplete: ["bg-gradient", "bg-gradient-(from|to|via)", "bg-gradient-(from|to|via)-$colors", "bg-gradient-(from|to|via)-(op|opacity)", "bg-gradient-(from|to|via)-(op|opacity)-<percent>"]
|
|
@@ -148,10 +150,10 @@ const backgroundStyles = [
|
|
|
148
150
|
[/^bg-([-\w]{3,})$/, ([, s]) => ({ "background-position": positionMap[s] })],
|
|
149
151
|
["bg-repeat", { "background-repeat": "repeat" }],
|
|
150
152
|
["bg-no-repeat", { "background-repeat": "no-repeat" }],
|
|
151
|
-
["bg-repeat-x", { "background-
|
|
152
|
-
["bg-repeat-y", { "background-
|
|
153
|
-
["bg-repeat-round", { "background-
|
|
154
|
-
["bg-repeat-space", { "background-
|
|
153
|
+
["bg-repeat-x", { "background-repeat": "repeat-x" }],
|
|
154
|
+
["bg-repeat-y", { "background-repeat": "repeat-y" }],
|
|
155
|
+
["bg-repeat-round", { "background-repeat": "round" }],
|
|
156
|
+
["bg-repeat-space", { "background-repeat": "space" }],
|
|
155
157
|
["bg-origin-border", { "background-origin": "border-box" }],
|
|
156
158
|
["bg-origin-padding", { "background-origin": "padding-box" }],
|
|
157
159
|
["bg-origin-content", { "background-origin": "content-box" }]
|
package/package.json
CHANGED
|
@@ -1,42 +1,42 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unocss/preset-wind",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.35.2",
|
|
4
4
|
"description": "Tailwind / Windi CSS compact preset for UnoCSS",
|
|
5
|
-
"keywords": [
|
|
6
|
-
"unocss",
|
|
7
|
-
"unocss-preset"
|
|
8
|
-
],
|
|
9
|
-
"homepage": "https://github.com/unocss/unocss/tree/main/packages/preset-wind#readme",
|
|
10
|
-
"bugs": {
|
|
11
|
-
"url": "https://github.com/unocss/unocss/issues"
|
|
12
|
-
},
|
|
13
|
-
"license": "MIT",
|
|
14
5
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"funding": "https://github.com/sponsors/antfu",
|
|
8
|
+
"homepage": "https://github.com/unocss/unocss/tree/main/packages/preset-wind#readme",
|
|
15
9
|
"repository": {
|
|
16
10
|
"type": "git",
|
|
17
11
|
"url": "git+https://github.com/unocss/unocss.git",
|
|
18
12
|
"directory": "packages/preset-wind"
|
|
19
13
|
},
|
|
20
|
-
"
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
"
|
|
14
|
+
"bugs": {
|
|
15
|
+
"url": "https://github.com/unocss/unocss/issues"
|
|
16
|
+
},
|
|
17
|
+
"keywords": [
|
|
18
|
+
"unocss",
|
|
19
|
+
"unocss-preset"
|
|
20
|
+
],
|
|
21
|
+
"sideEffects": false,
|
|
24
22
|
"exports": {
|
|
25
23
|
".": {
|
|
24
|
+
"types": "./dist/index.d.ts",
|
|
26
25
|
"require": "./dist/index.cjs",
|
|
27
|
-
"import": "./dist/index.mjs"
|
|
28
|
-
"types": "./dist/index.d.ts"
|
|
26
|
+
"import": "./dist/index.mjs"
|
|
29
27
|
},
|
|
30
28
|
"./*": "./*"
|
|
31
29
|
},
|
|
30
|
+
"main": "dist/index.cjs",
|
|
31
|
+
"module": "dist/index.mjs",
|
|
32
|
+
"types": "dist/index.d.ts",
|
|
32
33
|
"files": [
|
|
33
34
|
"dist",
|
|
34
35
|
"*.css"
|
|
35
36
|
],
|
|
36
|
-
"sideEffects": false,
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@unocss/core": "0.
|
|
39
|
-
"@unocss/preset-mini": "0.
|
|
38
|
+
"@unocss/core": "0.35.2",
|
|
39
|
+
"@unocss/preset-mini": "0.35.2"
|
|
40
40
|
},
|
|
41
41
|
"scripts": {
|
|
42
42
|
"build": "unbuild",
|