@unocss/preset-mini 0.37.0 → 0.37.3

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.
@@ -182,7 +182,7 @@ const numberRE = /[0-9.]+(?:[a-z]+|%)?/;
182
182
  const variantNegative = {
183
183
  name: "negative",
184
184
  match(matcher) {
185
- if (!matcher.startsWith("-") || !matcher.match(/\d|-px|-full/))
185
+ if (!matcher.startsWith("-"))
186
186
  return;
187
187
  return {
188
188
  matcher: matcher.slice(1),
@@ -180,7 +180,7 @@ const numberRE = /[0-9.]+(?:[a-z]+|%)?/;
180
180
  const variantNegative = {
181
181
  name: "negative",
182
182
  match(matcher) {
183
- if (!matcher.startsWith("-") || !matcher.match(/\d|-px|-full/))
183
+ if (!matcher.startsWith("-"))
184
184
  return;
185
185
  return {
186
186
  matcher: matcher.slice(1),
@@ -177,8 +177,7 @@ const transformBase = {
177
177
  "--un-skew-y": 0,
178
178
  "--un-translate-x": 0,
179
179
  "--un-translate-y": 0,
180
- "--un-translate-z": 0,
181
- "--un-transform": transformCpu
180
+ "--un-translate-z": 0
182
181
  };
183
182
  const transforms = [
184
183
  [/^(?:transform-)?origin-(.+)$/, ([, s]) => ({ "transform-origin": utilities.positionMap[s] ?? utilities.handler.bracket.cssvar(s) }), { autocomplete: [`transform-origin-(${Object.keys(utilities.positionMap).join("|")})`, `origin-(${Object.keys(utilities.positionMap).join("|")})`] }],
@@ -209,8 +208,8 @@ const transforms = [
209
208
  [/^(?:transform-)?scale-([xyz])-(.+)$/, handleScale],
210
209
  [/^(?:transform-)?preserve-3d$/, () => ({ "transform-style": "preserve-3d" })],
211
210
  [/^(?:transform-)?preserve-flat$/, () => ({ "transform-style": "flat" })],
212
- ["transform", { transform: "var(--un-transform)" }],
213
- ["transform-cpu", { transform: "var(--un-transform)" }],
211
+ ["transform", { transform: transformCpu }],
212
+ ["transform-cpu", { transform: transformCpu }],
214
213
  ["transform-gpu", { transform: transformGpu }],
215
214
  ["transform-none", { transform: "none" }]
216
215
  ];
@@ -219,7 +218,7 @@ function handleTranslate([, d, b], { theme }) {
219
218
  if (v != null) {
220
219
  return [
221
220
  ...utilities.xyzMap[d].map((i) => [`--un-translate${i}`, v]),
222
- ["transform", "var(--un-transform)"]
221
+ ["transform", transformCpu]
223
222
  ];
224
223
  }
225
224
  }
@@ -228,7 +227,7 @@ function handleScale([, d, b]) {
228
227
  if (v != null) {
229
228
  return [
230
229
  ...utilities.xyzMap[d].map((i) => [`--un-scale${i}`, v]),
231
- ["transform", "var(--un-transform)"]
230
+ ["transform", transformCpu]
232
231
  ];
233
232
  }
234
233
  }
@@ -239,7 +238,7 @@ function handleRotate([, d = "", b]) {
239
238
  return {
240
239
  "--un-rotate": 0,
241
240
  [`--un-rotate-${d}`]: v,
242
- "transform": "var(--un-transform)"
241
+ "transform": transformCpu
243
242
  };
244
243
  } else {
245
244
  return {
@@ -247,7 +246,7 @@ function handleRotate([, d = "", b]) {
247
246
  "--un-rotate-y": 0,
248
247
  "--un-rotate-z": 0,
249
248
  "--un-rotate": v,
250
- "transform": "var(--un-transform)"
249
+ "transform": transformCpu
251
250
  };
252
251
  }
253
252
  }
@@ -257,7 +256,7 @@ function handleSkew([, d, b]) {
257
256
  if (v != null) {
258
257
  return {
259
258
  [`--un-skew-${d}`]: v,
260
- transform: "var(--un-transform)"
259
+ transform: transformCpu
261
260
  };
262
261
  }
263
262
  }
@@ -175,8 +175,7 @@ const transformBase = {
175
175
  "--un-skew-y": 0,
176
176
  "--un-translate-x": 0,
177
177
  "--un-translate-y": 0,
178
- "--un-translate-z": 0,
179
- "--un-transform": transformCpu
178
+ "--un-translate-z": 0
180
179
  };
181
180
  const transforms = [
182
181
  [/^(?:transform-)?origin-(.+)$/, ([, s]) => ({ "transform-origin": positionMap[s] ?? handler.bracket.cssvar(s) }), { autocomplete: [`transform-origin-(${Object.keys(positionMap).join("|")})`, `origin-(${Object.keys(positionMap).join("|")})`] }],
@@ -207,8 +206,8 @@ const transforms = [
207
206
  [/^(?:transform-)?scale-([xyz])-(.+)$/, handleScale],
208
207
  [/^(?:transform-)?preserve-3d$/, () => ({ "transform-style": "preserve-3d" })],
209
208
  [/^(?:transform-)?preserve-flat$/, () => ({ "transform-style": "flat" })],
210
- ["transform", { transform: "var(--un-transform)" }],
211
- ["transform-cpu", { transform: "var(--un-transform)" }],
209
+ ["transform", { transform: transformCpu }],
210
+ ["transform-cpu", { transform: transformCpu }],
212
211
  ["transform-gpu", { transform: transformGpu }],
213
212
  ["transform-none", { transform: "none" }]
214
213
  ];
@@ -217,7 +216,7 @@ function handleTranslate([, d, b], { theme }) {
217
216
  if (v != null) {
218
217
  return [
219
218
  ...xyzMap[d].map((i) => [`--un-translate${i}`, v]),
220
- ["transform", "var(--un-transform)"]
219
+ ["transform", transformCpu]
221
220
  ];
222
221
  }
223
222
  }
@@ -226,7 +225,7 @@ function handleScale([, d, b]) {
226
225
  if (v != null) {
227
226
  return [
228
227
  ...xyzMap[d].map((i) => [`--un-scale${i}`, v]),
229
- ["transform", "var(--un-transform)"]
228
+ ["transform", transformCpu]
230
229
  ];
231
230
  }
232
231
  }
@@ -237,7 +236,7 @@ function handleRotate([, d = "", b]) {
237
236
  return {
238
237
  "--un-rotate": 0,
239
238
  [`--un-rotate-${d}`]: v,
240
- "transform": "var(--un-transform)"
239
+ "transform": transformCpu
241
240
  };
242
241
  } else {
243
242
  return {
@@ -245,7 +244,7 @@ function handleRotate([, d = "", b]) {
245
244
  "--un-rotate-y": 0,
246
245
  "--un-rotate-z": 0,
247
246
  "--un-rotate": v,
248
- "transform": "var(--un-transform)"
247
+ "transform": transformCpu
249
248
  };
250
249
  }
251
250
  }
@@ -255,7 +254,7 @@ function handleSkew([, d, b]) {
255
254
  if (v != null) {
256
255
  return {
257
256
  [`--un-skew-${d}`]: v,
258
- transform: "var(--un-transform)"
257
+ transform: transformCpu
259
258
  };
260
259
  }
261
260
  }
package/dist/rules.d.ts CHANGED
@@ -101,7 +101,6 @@ declare const transformBase: {
101
101
  '--un-translate-x': number;
102
102
  '--un-translate-y': number;
103
103
  '--un-translate-z': number;
104
- '--un-transform': string;
105
104
  };
106
105
  declare const transforms: Rule[];
107
106
 
package/dist/theme.d.ts CHANGED
@@ -216,7 +216,6 @@ declare const preflightBase: {
216
216
  '--un-translate-x': number;
217
217
  '--un-translate-y': number;
218
218
  '--un-translate-z': number;
219
- '--un-transform': string;
220
219
  };
221
220
 
222
221
  export { baseSize, blur, borderRadius, boxShadow, breakpoints, dropShadow, duration, easing, fontFamily, fontSize, height, letterSpacing, lineHeight, lineWidth, maxHeight, maxWidth, preflightBase, ringWidth, spacing, textIndent, textShadow, textStrokeWidth, verticalBreakpoints, width, wordSpacing };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unocss/preset-mini",
3
- "version": "0.37.0",
3
+ "version": "0.37.3",
4
4
  "description": "The minimal preset for UnoCSS",
5
5
  "author": "Anthony Fu <anthonyfu117@hotmail.com>",
6
6
  "license": "MIT",
@@ -61,7 +61,7 @@
61
61
  "*.css"
62
62
  ],
63
63
  "dependencies": {
64
- "@unocss/core": "0.37.0"
64
+ "@unocss/core": "0.37.3"
65
65
  },
66
66
  "scripts": {
67
67
  "build": "unbuild",