@unocss/preset-wind 0.56.5 → 0.57.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.cjs CHANGED
@@ -88,7 +88,7 @@ const animations = [
88
88
  function bgGradientToValue(cssColor) {
89
89
  if (cssColor)
90
90
  return ruleUtils.colorToString(cssColor, 0);
91
- return "rgba(255,255,255,0)";
91
+ return "rgb(255 255 255 / 0)";
92
92
  }
93
93
  function bgGradientColorValue(mode, cssColor, color, alpha) {
94
94
  if (cssColor) {
@@ -162,7 +162,7 @@ const backgroundStyles = [
162
162
  [/^(from|via|to)-([\d\.]+)%$/, bgGradientPositionResolver()],
163
163
  // images
164
164
  [/^bg-gradient-((?:repeating-)?(?:linear|radial|conic))$/, ([, s]) => ({
165
- "background-image": `${s}-gradient(var(--un-gradient, var(--un-gradient-stops, rgba(255, 255, 255, 0))))`
165
+ "background-image": `${s}-gradient(var(--un-gradient, var(--un-gradient-stops, rgb(255 255 255 / 0))))`
166
166
  }), { autocomplete: ["bg-gradient-repeating", "bg-gradient-(linear|radial|conic)", "bg-gradient-repeating-(linear|radial|conic)"] }],
167
167
  // ignore any center position
168
168
  [/^bg-gradient-to-([rltb]{1,2})$/, ([, d]) => {
@@ -350,8 +350,8 @@ const container = [
350
350
  if (core.isString(query)) {
351
351
  const match = query.match(queryMatcher)?.[1];
352
352
  if (match) {
353
- const bp = utils.resolveBreakpoints(context) ?? {};
354
- const matchBp = Object.keys(bp).find((key) => bp[key] === match);
353
+ const bp = utils.resolveBreakpoints(context) ?? [];
354
+ const matchBp = bp.find((i) => i.size === match)?.point;
355
355
  if (!themeMaxWidth)
356
356
  maxWidth = match;
357
357
  else if (matchBp)
@@ -381,7 +381,7 @@ const container = [
381
381
  ];
382
382
  const containerShortcuts = [
383
383
  [/^(?:(\w+)[:-])?container$/, ([, bp], context) => {
384
- let points = Object.keys(utils.resolveBreakpoints(context) ?? {});
384
+ let points = (utils.resolveBreakpoints(context) ?? []).map((i) => i.point);
385
385
  if (bp) {
386
386
  if (!points.includes(bp))
387
387
  return;
@@ -514,8 +514,8 @@ const filters = [
514
514
  ];
515
515
 
516
516
  const spaces = [
517
- [/^space-?([xy])-?(-?.+)$/, handlerSpace, { autocomplete: ["space-(x|y|block|inline)", "space-(x|y|block|inline)-reverse", "space-(x|y|block|inline)-$spacing"] }],
518
- [/^space-?([xy])-reverse$/, ([, d]) => ({ [`--un-space-${d}-reverse`]: 1 })],
517
+ [/^space-([xy])-(-?.+)$/, handlerSpace, { autocomplete: ["space-(x|y|block|inline)", "space-(x|y|block|inline)-reverse", "space-(x|y|block|inline)-$spacing"] }],
518
+ [/^space-([xy])-reverse$/, ([, d]) => ({ [`--un-space-${d}-reverse`]: 1 })],
519
519
  [/^space-(block|inline)-(-?.+)$/, handlerSpace],
520
520
  [/^space-(block|inline)-reverse$/, ([, d]) => ({ [`--un-space-${d}-reverse`]: 1 })]
521
521
  ];
@@ -1157,8 +1157,8 @@ const theme = {
1157
1157
  low_contrast: "(prefers-contrast: low)",
1158
1158
  opacity_ok: "(prefers-reduced-transparency: no-preference)",
1159
1159
  opacity_not_ok: "(prefers-reduced-transparency: reduce)",
1160
- useData_ok: "(prefers-reduced-data: no-preference)",
1161
- useData_not_ok: "(prefers-reduced-data: reduce)",
1160
+ use_data_ok: "(prefers-reduced-data: no-preference)",
1161
+ use_data_not_ok: "(prefers-reduced-data: reduce)",
1162
1162
  touch: "(hover: none) and (pointer: coarse)",
1163
1163
  stylus: "(hover: none) and (pointer: fine)",
1164
1164
  pointer: "(hover) and (pointer: coarse)",
@@ -1218,7 +1218,7 @@ const variantOrientations = [
1218
1218
  const variantSpaceAndDivide = (matcher) => {
1219
1219
  if (matcher.startsWith("_"))
1220
1220
  return;
1221
- if (/space-?([xy])-?(-?.+)$/.test(matcher) || /divide-/.test(matcher)) {
1221
+ if (/space-([xy])-(-?.+)$/.test(matcher) || /divide-/.test(matcher)) {
1222
1222
  return {
1223
1223
  matcher,
1224
1224
  selector: (input) => {
package/dist/index.mjs CHANGED
@@ -72,7 +72,7 @@ const animations = [
72
72
  function bgGradientToValue(cssColor) {
73
73
  if (cssColor)
74
74
  return colorToString(cssColor, 0);
75
- return "rgba(255,255,255,0)";
75
+ return "rgb(255 255 255 / 0)";
76
76
  }
77
77
  function bgGradientColorValue(mode, cssColor, color, alpha) {
78
78
  if (cssColor) {
@@ -146,7 +146,7 @@ const backgroundStyles = [
146
146
  [/^(from|via|to)-([\d\.]+)%$/, bgGradientPositionResolver()],
147
147
  // images
148
148
  [/^bg-gradient-((?:repeating-)?(?:linear|radial|conic))$/, ([, s]) => ({
149
- "background-image": `${s}-gradient(var(--un-gradient, var(--un-gradient-stops, rgba(255, 255, 255, 0))))`
149
+ "background-image": `${s}-gradient(var(--un-gradient, var(--un-gradient-stops, rgb(255 255 255 / 0))))`
150
150
  }), { autocomplete: ["bg-gradient-repeating", "bg-gradient-(linear|radial|conic)", "bg-gradient-repeating-(linear|radial|conic)"] }],
151
151
  // ignore any center position
152
152
  [/^bg-gradient-to-([rltb]{1,2})$/, ([, d]) => {
@@ -334,8 +334,8 @@ const container = [
334
334
  if (isString(query)) {
335
335
  const match = query.match(queryMatcher)?.[1];
336
336
  if (match) {
337
- const bp = resolveBreakpoints(context) ?? {};
338
- const matchBp = Object.keys(bp).find((key) => bp[key] === match);
337
+ const bp = resolveBreakpoints(context) ?? [];
338
+ const matchBp = bp.find((i) => i.size === match)?.point;
339
339
  if (!themeMaxWidth)
340
340
  maxWidth = match;
341
341
  else if (matchBp)
@@ -365,7 +365,7 @@ const container = [
365
365
  ];
366
366
  const containerShortcuts = [
367
367
  [/^(?:(\w+)[:-])?container$/, ([, bp], context) => {
368
- let points = Object.keys(resolveBreakpoints(context) ?? {});
368
+ let points = (resolveBreakpoints(context) ?? []).map((i) => i.point);
369
369
  if (bp) {
370
370
  if (!points.includes(bp))
371
371
  return;
@@ -498,8 +498,8 @@ const filters = [
498
498
  ];
499
499
 
500
500
  const spaces = [
501
- [/^space-?([xy])-?(-?.+)$/, handlerSpace, { autocomplete: ["space-(x|y|block|inline)", "space-(x|y|block|inline)-reverse", "space-(x|y|block|inline)-$spacing"] }],
502
- [/^space-?([xy])-reverse$/, ([, d]) => ({ [`--un-space-${d}-reverse`]: 1 })],
501
+ [/^space-([xy])-(-?.+)$/, handlerSpace, { autocomplete: ["space-(x|y|block|inline)", "space-(x|y|block|inline)-reverse", "space-(x|y|block|inline)-$spacing"] }],
502
+ [/^space-([xy])-reverse$/, ([, d]) => ({ [`--un-space-${d}-reverse`]: 1 })],
503
503
  [/^space-(block|inline)-(-?.+)$/, handlerSpace],
504
504
  [/^space-(block|inline)-reverse$/, ([, d]) => ({ [`--un-space-${d}-reverse`]: 1 })]
505
505
  ];
@@ -1141,8 +1141,8 @@ const theme = {
1141
1141
  low_contrast: "(prefers-contrast: low)",
1142
1142
  opacity_ok: "(prefers-reduced-transparency: no-preference)",
1143
1143
  opacity_not_ok: "(prefers-reduced-transparency: reduce)",
1144
- useData_ok: "(prefers-reduced-data: no-preference)",
1145
- useData_not_ok: "(prefers-reduced-data: reduce)",
1144
+ use_data_ok: "(prefers-reduced-data: no-preference)",
1145
+ use_data_not_ok: "(prefers-reduced-data: reduce)",
1146
1146
  touch: "(hover: none) and (pointer: coarse)",
1147
1147
  stylus: "(hover: none) and (pointer: fine)",
1148
1148
  pointer: "(hover) and (pointer: coarse)",
@@ -1202,7 +1202,7 @@ const variantOrientations = [
1202
1202
  const variantSpaceAndDivide = (matcher) => {
1203
1203
  if (matcher.startsWith("_"))
1204
1204
  return;
1205
- if (/space-?([xy])-?(-?.+)$/.test(matcher) || /divide-/.test(matcher)) {
1205
+ if (/space-([xy])-(-?.+)$/.test(matcher) || /divide-/.test(matcher)) {
1206
1206
  return {
1207
1207
  matcher,
1208
1208
  selector: (input) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unocss/preset-wind",
3
- "version": "0.56.5",
3
+ "version": "0.57.0",
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.56.5",
39
- "@unocss/preset-mini": "0.56.5",
40
- "@unocss/rule-utils": "0.56.5"
38
+ "@unocss/core": "0.57.0",
39
+ "@unocss/preset-mini": "0.57.0",
40
+ "@unocss/rule-utils": "0.57.0"
41
41
  },
42
42
  "scripts": {
43
43
  "build": "unbuild",