@unocss/preset-wind 0.34.0 → 0.35.1

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 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-position": "repeat-x" }],
156
- ["bg-repeat-y", { "background-position": "repeat-y" }],
157
- ["bg-repeat-round", { "background-position": "round" }],
158
- ["bg-repeat-space", { "background-position": "space" }],
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-position": "repeat-x" }],
152
- ["bg-repeat-y", { "background-position": "repeat-y" }],
153
- ["bg-repeat-round", { "background-position": "round" }],
154
- ["bg-repeat-space", { "background-position": "space" }],
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.34.0",
3
+ "version": "0.35.1",
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
- "funding": "https://github.com/sponsors/antfu",
21
- "main": "dist/index.cjs",
22
- "module": "dist/index.mjs",
23
- "types": "dist/index.d.ts",
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
  ".": {
26
- "require": "./dist/index.cjs",
24
+ "types": "./dist/index.d.ts",
27
25
  "import": "./dist/index.mjs",
28
- "types": "./dist/index.d.ts"
26
+ "require": "./dist/index.cjs"
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.34.0",
39
- "@unocss/preset-mini": "0.34.0"
38
+ "@unocss/core": "0.35.1",
39
+ "@unocss/preset-mini": "0.35.1"
40
40
  },
41
41
  "scripts": {
42
42
  "build": "unbuild",