@unocss/preset-wind 0.22.1 → 0.22.5

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
@@ -26,17 +26,17 @@ ${constructCSS({ animation: `${name}` })}`;
26
26
  ${constructCSS(Object.assign({ animation: `${name} ${duration} ${timing} infinite` }, props))}`;
27
27
  }
28
28
  }],
29
- [/^animate-(?:duration-)?(.+)$/, ([, d]) => ({ "animation-duration": utils.handler.bracket.time(d) })],
30
- [/^animate-delay-(.+)$/, ([, d]) => ({ "animation-delay": utils.handler.bracket.time(d) })],
29
+ [/^animate-(?:duration-)?(.+)$/, ([, d]) => ({ "animation-duration": utils.handler.bracket.cssvar.time(d) })],
30
+ [/^animate-delay-(.+)$/, ([, d]) => ({ "animation-delay": utils.handler.bracket.cssvar.time(d) })],
31
31
  [/^animate-(?:fill-)?mode-(forwards|backwards|both|inherit|initial|revert|unset)$/, ([, d]) => ({ "animation-fill-mode": d })],
32
32
  ["animate-mode-none", { "animation-fill-mode": "none" }],
33
33
  ["animate-fill-mode-none", { "animation-fill-mode": "none" }],
34
34
  [/^animate-(?:direction-)?(reverse|alternate|alternate-reverse|inherit|initial|revert|unset)$/, ([, d]) => ({ "animation-direction": d })],
35
35
  ["animate-normal", { "animation-direction": "normal" }],
36
36
  ["animate-direction-normal", { "animation-direction": "normal" }],
37
- [/^animate-(?:iteration-)?count-(.+)$/, ([, d]) => ({ "animation-iteration-count": utils.handler.bracket(d) ?? d.replace(/\-/g, ",") })],
37
+ [/^animate-(?:iteration-)?count-(.+)$/, ([, d]) => ({ "animation-iteration-count": utils.handler.bracket.cssvar(d) ?? d.replace(/\-/g, ",") })],
38
38
  [/^animate-name-(.+)/, ([, d]) => ({ "animation-name": d })],
39
- [/^animate-play(?:-state)?-(paused|running|inherit|initial|revert|unset)$/, ([, d]) => ({ "animation-play-state": d })],
39
+ [/^animate-play-(?:state-)?(paused|running|inherit|initial|revert|unset)$/, ([, d]) => ({ "animation-play-state": d })],
40
40
  ["animate-none", { animation: "none" }]
41
41
  ];
42
42
 
@@ -175,7 +175,7 @@ const scrollBehaviors = [
175
175
  ];
176
176
 
177
177
  const columns = [
178
- [/^columns-(.+)$/, ([, v]) => ({ column: utils.handler.bracket.global.number.auto.numberWithUnit(v) })],
178
+ [/^columns-(.+)$/, ([, v]) => ({ columns: utils.handler.bracket.global.number.auto.numberWithUnit(v) })],
179
179
  ["break-before-auto", { "break-before": "auto" }],
180
180
  ["break-before-avoid", { "break-before": "avoid" }],
181
181
  ["break-before-all", { "break-before": "all" }],
@@ -237,7 +237,6 @@ const filterBase = {
237
237
  "--un-brightness": rules$1.varEmpty,
238
238
  "--un-contrast": rules$1.varEmpty,
239
239
  "--un-drop-shadow": rules$1.varEmpty,
240
- "--un-drop-shadow-colored": rules$1.varEmpty,
241
240
  "--un-grayscale": rules$1.varEmpty,
242
241
  "--un-hue-rotate": rules$1.varEmpty,
243
242
  "--un-invert": rules$1.varEmpty,
@@ -260,7 +259,7 @@ const backdropFilterBase = {
260
259
  [core.CONTROL_SHORTCUT_NO_MERGE]: ""
261
260
  };
262
261
  const percentWithDefault = (str) => {
263
- let v = utils.handler.bracket(str || "");
262
+ let v = utils.handler.bracket.cssvar(str || "");
264
263
  if (v != null)
265
264
  return v;
266
265
  v = str ? utils.handler.percent(str) : "1";
@@ -293,18 +292,16 @@ const toFilter = (varName, resolver) => ([, b, s], { theme }) => {
293
292
  const dropShadowResolver = ([, s], { theme }) => {
294
293
  let v = theme.dropShadow?.[s || "DEFAULT"];
295
294
  if (v != null) {
296
- const shadow = core.toArray(v);
297
- const colored = shadow.map((s2) => s2.replace(/\s\S+$/, " var(--un-drop-shadow-color)"));
295
+ const shadows = rules$1.colorableShadows(v, "--un-drop-shadow-color");
298
296
  return [
299
297
  filterBase,
300
298
  {
301
- "--un-drop-shadow": `drop-shadow(${shadow.join(") drop-shadow(")})`,
302
- "--un-drop-shadow-colored": `drop-shadow(${colored.join(") drop-shadow(")})`,
299
+ "--un-drop-shadow": `drop-shadow(${shadows.join(") drop-shadow(")})`,
303
300
  "filter": "var(--un-filter)"
304
301
  }
305
302
  ];
306
303
  }
307
- v = utils.handler.bracket(s);
304
+ v = utils.handler.bracket.cssvar(s);
308
305
  if (v != null) {
309
306
  return [
310
307
  filterBase,
@@ -316,25 +313,17 @@ const dropShadowResolver = ([, s], { theme }) => {
316
313
  }
317
314
  };
318
315
  const filters = [
319
- [/^(?:(backdrop-)|filter-)?blur(?:-(.+))?$/, toFilter("blur", (s, theme) => theme.blur?.[s || "DEFAULT"] || utils.handler.bracket.px(s))],
320
- [/^(?:(backdrop-)|filter-)?brightness-(.+)$/, toFilter("brightness", (s) => utils.handler.bracket.percent(s))],
321
- [/^(?:(backdrop-)|filter-)?contrast-(.+)$/, toFilter("contrast", (s) => utils.handler.bracket.percent(s))],
316
+ [/^(?:(backdrop-)|filter-)?blur(?:-(.+))?$/, toFilter("blur", (s, theme) => theme.blur?.[s || "DEFAULT"] || utils.handler.bracket.cssvar.px(s))],
317
+ [/^(?:(backdrop-)|filter-)?brightness-(.+)$/, toFilter("brightness", (s) => utils.handler.bracket.cssvar.percent(s))],
318
+ [/^(?:(backdrop-)|filter-)?contrast-(.+)$/, toFilter("contrast", (s) => utils.handler.bracket.cssvar.percent(s))],
322
319
  [/^(?:filter-)?drop-shadow(?:-(.+))?$/, dropShadowResolver],
323
- [/^(?:filter-)?drop-shadow-color-(.+)$/, (m, ctx) => {
324
- const color = utils.colorResolver("--un-drop-shadow-color", "drop-shadow")(m, ctx);
325
- if (color) {
326
- return {
327
- ...color,
328
- "--un-drop-shadow": "var(--un-drop-shadow-colored)"
329
- };
330
- }
331
- }],
332
- [/^(?:filter-)?drop-shadow-color-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-drop-shadow-opacity": utils.handler.bracket.percent.cssvar(opacity) })],
320
+ [/^(?:filter-)?drop-shadow-color-(.+)$/, utils.colorResolver("--un-drop-shadow-color", "drop-shadow")],
321
+ [/^(?:filter-)?drop-shadow-color-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-drop-shadow-opacity": utils.handler.bracket.percent(opacity) })],
333
322
  [/^(?:(backdrop-)|filter-)?grayscale(?:-(.+))?$/, toFilter("grayscale", percentWithDefault)],
334
- [/^(?:(backdrop-)|filter-)?hue-rotate-(.+)$/, toFilter("hue-rotate", (s) => utils.handler.bracket.degree(s))],
323
+ [/^(?:(backdrop-)|filter-)?hue-rotate-(.+)$/, toFilter("hue-rotate", (s) => utils.handler.bracket.cssvar.degree(s))],
335
324
  [/^(?:(backdrop-)|filter-)?invert(?:-(.+))?$/, toFilter("invert", percentWithDefault)],
336
- [/^(backdrop-)opacity-(.+)$/, toFilter("opacity", (s) => utils.handler.bracket.percent(s))],
337
- [/^(?:(backdrop-)|filter-)?saturate-(.+)$/, toFilter("saturate", (s) => utils.handler.bracket.percent(s))],
325
+ [/^(backdrop-)opacity-(.+)$/, toFilter("opacity", (s) => utils.handler.bracket.cssvar.percent(s))],
326
+ [/^(?:(backdrop-)|filter-)?saturate-(.+)$/, toFilter("saturate", (s) => utils.handler.bracket.cssvar.percent(s))],
338
327
  [/^(?:(backdrop-)|filter-)?sepia(?:-(.+))?$/, toFilter("sepia", percentWithDefault)],
339
328
  [/^filter$/, () => [
340
329
  filterBase,
@@ -513,26 +502,27 @@ const tables = [
513
502
  ];
514
503
 
515
504
  const variablesAbbrMap = {
516
- "write": "writing-mode",
517
- "write-orient": "text-orientation",
518
505
  "bg-blend": "background-blend-mode",
519
506
  "bg-clip": "-webkit-background-clip",
520
507
  "bg-gradient": "linear-gradient",
521
- "bg-origin-border": "background-origin",
508
+ "bg-image": "background-image",
509
+ "bg-origin": "background-origin",
522
510
  "bg-position": "background-position",
523
511
  "bg-repeat": "background-repeat",
524
512
  "bg-size": "background-size",
525
513
  "mix-blend": "mix-blend-mode",
526
- "animate-speed": "animation-speed"
514
+ "object": "object-fit",
515
+ "object-position": "object-position",
516
+ "write": "writing-mode",
517
+ "write-orient": "text-orientation"
527
518
  };
528
- const cssVariables = [[
529
- /^(.+)-\$(.+)$/,
530
- ([, name, varname]) => {
519
+ const cssVariables = [
520
+ [/^(.+?)-\$(.+)$/, ([, name, varname]) => {
531
521
  const prop = variablesAbbrMap[name];
532
522
  if (prop)
533
523
  return { [prop]: `var(--${varname})` };
534
- }
535
- ]];
524
+ }]
525
+ ];
536
526
 
537
527
  const divides = [
538
528
  [/^divide-?([xy])$/, handlerDivide],
@@ -550,7 +540,7 @@ const divides = [
550
540
  ["divide-none", { "border-style": "none" }]
551
541
  ];
552
542
  function handlerDivide([, d, s = "1"]) {
553
- const v = utils.handler.bracket.px(s);
543
+ const v = utils.handler.bracket.cssvar.px(s);
554
544
  if (v != null) {
555
545
  const results = utils.directionMap[d].map((item) => {
556
546
  const key = `border${item}-width`;
@@ -671,7 +661,7 @@ const scrolls = [
671
661
 
672
662
  const placeholders = [
673
663
  [/^\$ placeholder-(.+)$/, utils.colorResolver("color", "placeholder")],
674
- [/^\$ placeholder-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-placeholder-opacity": utils.handler.bracket.percent.cssvar(opacity) })]
664
+ [/^\$ placeholder-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-placeholder-opacity": utils.handler.bracket.percent(opacity) })]
675
665
  ];
676
666
 
677
667
  const rules = [
@@ -931,7 +921,7 @@ const variantSpaceAndDivide = (matcher) => {
931
921
  };
932
922
 
933
923
  const placeholderModifier = (input, { theme }) => {
934
- const m = input.match(/^(.*)\b(placeholder-)(.+?)$/);
924
+ const m = input.match(/^(.*)\b(placeholder-)(.+)$/);
935
925
  if (m) {
936
926
  const [, pre = "", p, body] = m;
937
927
  if (hasColorValue(body, theme) || hasOpacityValue(body)) {
@@ -947,7 +937,7 @@ function hasColorValue(body, theme) {
947
937
  function hasOpacityValue(body) {
948
938
  const match = body.match(/^op(?:acity)?-?(.+)$/);
949
939
  if (match && match[1] != null)
950
- return utils.handler.bracket.percent.cssvar(match[1]) != null;
940
+ return utils.handler.bracket.percent(match[1]) != null;
951
941
  return false;
952
942
  }
953
943
 
package/dist/index.mjs CHANGED
@@ -2,7 +2,7 @@ import { variants } from '@unocss/preset-mini/variants';
2
2
  import { toArray, CONTROL_SHORTCUT_NO_MERGE } from '@unocss/core';
3
3
  import { theme as theme$1 } from '@unocss/preset-mini/theme';
4
4
  export { colors } from '@unocss/preset-mini';
5
- import { varEmpty, cssVariables as cssVariables$1, cssProperty, pointerEvents, appearances, positions, insets, zIndexes, orders, grids, floats, margins, boxSizing, displays, aspectRatio, sizes, flex, transforms, cursors, userSelects, resizes, appearance, placements, alignments, justifies, gaps, overflows, textOverflows, whitespaces, breaks, borders, bgColors, svgUtilities, paddings, textAligns, textIndents, verticalAligns, fonts, fontStyles, textColors, textDecorations, fontSmoothings, tabSizes, textStrokes, textShadows, opacity, boxShadows, outline, rings, transitions, willChange, contents, questionMark } from '@unocss/preset-mini/rules';
5
+ import { varEmpty, colorableShadows, cssVariables as cssVariables$1, cssProperty, pointerEvents, appearances, positions, insets, zIndexes, orders, grids, floats, margins, boxSizing, displays, aspectRatio, sizes, flex, transforms, cursors, userSelects, resizes, appearance, placements, alignments, justifies, gaps, overflows, textOverflows, whitespaces, breaks, borders, bgColors, svgUtilities, paddings, textAligns, textIndents, verticalAligns, fonts, fontStyles, textColors, textDecorations, fontSmoothings, tabSizes, textStrokes, textShadows, opacity, boxShadows, outline, rings, transitions, willChange, contents, questionMark } from '@unocss/preset-mini/rules';
6
6
  import { handler, positionMap, parseColor, colorResolver, directionSize, directionMap, variantMatcher, variantParentMatcher } from '@unocss/preset-mini/utils';
7
7
 
8
8
  const animations = [
@@ -22,17 +22,17 @@ ${constructCSS({ animation: `${name}` })}`;
22
22
  ${constructCSS(Object.assign({ animation: `${name} ${duration} ${timing} infinite` }, props))}`;
23
23
  }
24
24
  }],
25
- [/^animate-(?:duration-)?(.+)$/, ([, d]) => ({ "animation-duration": handler.bracket.time(d) })],
26
- [/^animate-delay-(.+)$/, ([, d]) => ({ "animation-delay": handler.bracket.time(d) })],
25
+ [/^animate-(?:duration-)?(.+)$/, ([, d]) => ({ "animation-duration": handler.bracket.cssvar.time(d) })],
26
+ [/^animate-delay-(.+)$/, ([, d]) => ({ "animation-delay": handler.bracket.cssvar.time(d) })],
27
27
  [/^animate-(?:fill-)?mode-(forwards|backwards|both|inherit|initial|revert|unset)$/, ([, d]) => ({ "animation-fill-mode": d })],
28
28
  ["animate-mode-none", { "animation-fill-mode": "none" }],
29
29
  ["animate-fill-mode-none", { "animation-fill-mode": "none" }],
30
30
  [/^animate-(?:direction-)?(reverse|alternate|alternate-reverse|inherit|initial|revert|unset)$/, ([, d]) => ({ "animation-direction": d })],
31
31
  ["animate-normal", { "animation-direction": "normal" }],
32
32
  ["animate-direction-normal", { "animation-direction": "normal" }],
33
- [/^animate-(?:iteration-)?count-(.+)$/, ([, d]) => ({ "animation-iteration-count": handler.bracket(d) ?? d.replace(/\-/g, ",") })],
33
+ [/^animate-(?:iteration-)?count-(.+)$/, ([, d]) => ({ "animation-iteration-count": handler.bracket.cssvar(d) ?? d.replace(/\-/g, ",") })],
34
34
  [/^animate-name-(.+)/, ([, d]) => ({ "animation-name": d })],
35
- [/^animate-play(?:-state)?-(paused|running|inherit|initial|revert|unset)$/, ([, d]) => ({ "animation-play-state": d })],
35
+ [/^animate-play-(?:state-)?(paused|running|inherit|initial|revert|unset)$/, ([, d]) => ({ "animation-play-state": d })],
36
36
  ["animate-none", { animation: "none" }]
37
37
  ];
38
38
 
@@ -171,7 +171,7 @@ const scrollBehaviors = [
171
171
  ];
172
172
 
173
173
  const columns = [
174
- [/^columns-(.+)$/, ([, v]) => ({ column: handler.bracket.global.number.auto.numberWithUnit(v) })],
174
+ [/^columns-(.+)$/, ([, v]) => ({ columns: handler.bracket.global.number.auto.numberWithUnit(v) })],
175
175
  ["break-before-auto", { "break-before": "auto" }],
176
176
  ["break-before-avoid", { "break-before": "avoid" }],
177
177
  ["break-before-all", { "break-before": "all" }],
@@ -233,7 +233,6 @@ const filterBase = {
233
233
  "--un-brightness": varEmpty,
234
234
  "--un-contrast": varEmpty,
235
235
  "--un-drop-shadow": varEmpty,
236
- "--un-drop-shadow-colored": varEmpty,
237
236
  "--un-grayscale": varEmpty,
238
237
  "--un-hue-rotate": varEmpty,
239
238
  "--un-invert": varEmpty,
@@ -256,7 +255,7 @@ const backdropFilterBase = {
256
255
  [CONTROL_SHORTCUT_NO_MERGE]: ""
257
256
  };
258
257
  const percentWithDefault = (str) => {
259
- let v = handler.bracket(str || "");
258
+ let v = handler.bracket.cssvar(str || "");
260
259
  if (v != null)
261
260
  return v;
262
261
  v = str ? handler.percent(str) : "1";
@@ -289,18 +288,16 @@ const toFilter = (varName, resolver) => ([, b, s], { theme }) => {
289
288
  const dropShadowResolver = ([, s], { theme }) => {
290
289
  let v = theme.dropShadow?.[s || "DEFAULT"];
291
290
  if (v != null) {
292
- const shadow = toArray(v);
293
- const colored = shadow.map((s2) => s2.replace(/\s\S+$/, " var(--un-drop-shadow-color)"));
291
+ const shadows = colorableShadows(v, "--un-drop-shadow-color");
294
292
  return [
295
293
  filterBase,
296
294
  {
297
- "--un-drop-shadow": `drop-shadow(${shadow.join(") drop-shadow(")})`,
298
- "--un-drop-shadow-colored": `drop-shadow(${colored.join(") drop-shadow(")})`,
295
+ "--un-drop-shadow": `drop-shadow(${shadows.join(") drop-shadow(")})`,
299
296
  "filter": "var(--un-filter)"
300
297
  }
301
298
  ];
302
299
  }
303
- v = handler.bracket(s);
300
+ v = handler.bracket.cssvar(s);
304
301
  if (v != null) {
305
302
  return [
306
303
  filterBase,
@@ -312,25 +309,17 @@ const dropShadowResolver = ([, s], { theme }) => {
312
309
  }
313
310
  };
314
311
  const filters = [
315
- [/^(?:(backdrop-)|filter-)?blur(?:-(.+))?$/, toFilter("blur", (s, theme) => theme.blur?.[s || "DEFAULT"] || handler.bracket.px(s))],
316
- [/^(?:(backdrop-)|filter-)?brightness-(.+)$/, toFilter("brightness", (s) => handler.bracket.percent(s))],
317
- [/^(?:(backdrop-)|filter-)?contrast-(.+)$/, toFilter("contrast", (s) => handler.bracket.percent(s))],
312
+ [/^(?:(backdrop-)|filter-)?blur(?:-(.+))?$/, toFilter("blur", (s, theme) => theme.blur?.[s || "DEFAULT"] || handler.bracket.cssvar.px(s))],
313
+ [/^(?:(backdrop-)|filter-)?brightness-(.+)$/, toFilter("brightness", (s) => handler.bracket.cssvar.percent(s))],
314
+ [/^(?:(backdrop-)|filter-)?contrast-(.+)$/, toFilter("contrast", (s) => handler.bracket.cssvar.percent(s))],
318
315
  [/^(?:filter-)?drop-shadow(?:-(.+))?$/, dropShadowResolver],
319
- [/^(?:filter-)?drop-shadow-color-(.+)$/, (m, ctx) => {
320
- const color = colorResolver("--un-drop-shadow-color", "drop-shadow")(m, ctx);
321
- if (color) {
322
- return {
323
- ...color,
324
- "--un-drop-shadow": "var(--un-drop-shadow-colored)"
325
- };
326
- }
327
- }],
328
- [/^(?:filter-)?drop-shadow-color-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-drop-shadow-opacity": handler.bracket.percent.cssvar(opacity) })],
316
+ [/^(?:filter-)?drop-shadow-color-(.+)$/, colorResolver("--un-drop-shadow-color", "drop-shadow")],
317
+ [/^(?:filter-)?drop-shadow-color-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-drop-shadow-opacity": handler.bracket.percent(opacity) })],
329
318
  [/^(?:(backdrop-)|filter-)?grayscale(?:-(.+))?$/, toFilter("grayscale", percentWithDefault)],
330
- [/^(?:(backdrop-)|filter-)?hue-rotate-(.+)$/, toFilter("hue-rotate", (s) => handler.bracket.degree(s))],
319
+ [/^(?:(backdrop-)|filter-)?hue-rotate-(.+)$/, toFilter("hue-rotate", (s) => handler.bracket.cssvar.degree(s))],
331
320
  [/^(?:(backdrop-)|filter-)?invert(?:-(.+))?$/, toFilter("invert", percentWithDefault)],
332
- [/^(backdrop-)opacity-(.+)$/, toFilter("opacity", (s) => handler.bracket.percent(s))],
333
- [/^(?:(backdrop-)|filter-)?saturate-(.+)$/, toFilter("saturate", (s) => handler.bracket.percent(s))],
321
+ [/^(backdrop-)opacity-(.+)$/, toFilter("opacity", (s) => handler.bracket.cssvar.percent(s))],
322
+ [/^(?:(backdrop-)|filter-)?saturate-(.+)$/, toFilter("saturate", (s) => handler.bracket.cssvar.percent(s))],
334
323
  [/^(?:(backdrop-)|filter-)?sepia(?:-(.+))?$/, toFilter("sepia", percentWithDefault)],
335
324
  [/^filter$/, () => [
336
325
  filterBase,
@@ -509,26 +498,27 @@ const tables = [
509
498
  ];
510
499
 
511
500
  const variablesAbbrMap = {
512
- "write": "writing-mode",
513
- "write-orient": "text-orientation",
514
501
  "bg-blend": "background-blend-mode",
515
502
  "bg-clip": "-webkit-background-clip",
516
503
  "bg-gradient": "linear-gradient",
517
- "bg-origin-border": "background-origin",
504
+ "bg-image": "background-image",
505
+ "bg-origin": "background-origin",
518
506
  "bg-position": "background-position",
519
507
  "bg-repeat": "background-repeat",
520
508
  "bg-size": "background-size",
521
509
  "mix-blend": "mix-blend-mode",
522
- "animate-speed": "animation-speed"
510
+ "object": "object-fit",
511
+ "object-position": "object-position",
512
+ "write": "writing-mode",
513
+ "write-orient": "text-orientation"
523
514
  };
524
- const cssVariables = [[
525
- /^(.+)-\$(.+)$/,
526
- ([, name, varname]) => {
515
+ const cssVariables = [
516
+ [/^(.+?)-\$(.+)$/, ([, name, varname]) => {
527
517
  const prop = variablesAbbrMap[name];
528
518
  if (prop)
529
519
  return { [prop]: `var(--${varname})` };
530
- }
531
- ]];
520
+ }]
521
+ ];
532
522
 
533
523
  const divides = [
534
524
  [/^divide-?([xy])$/, handlerDivide],
@@ -546,7 +536,7 @@ const divides = [
546
536
  ["divide-none", { "border-style": "none" }]
547
537
  ];
548
538
  function handlerDivide([, d, s = "1"]) {
549
- const v = handler.bracket.px(s);
539
+ const v = handler.bracket.cssvar.px(s);
550
540
  if (v != null) {
551
541
  const results = directionMap[d].map((item) => {
552
542
  const key = `border${item}-width`;
@@ -667,7 +657,7 @@ const scrolls = [
667
657
 
668
658
  const placeholders = [
669
659
  [/^\$ placeholder-(.+)$/, colorResolver("color", "placeholder")],
670
- [/^\$ placeholder-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-placeholder-opacity": handler.bracket.percent.cssvar(opacity) })]
660
+ [/^\$ placeholder-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-placeholder-opacity": handler.bracket.percent(opacity) })]
671
661
  ];
672
662
 
673
663
  const rules = [
@@ -927,7 +917,7 @@ const variantSpaceAndDivide = (matcher) => {
927
917
  };
928
918
 
929
919
  const placeholderModifier = (input, { theme }) => {
930
- const m = input.match(/^(.*)\b(placeholder-)(.+?)$/);
920
+ const m = input.match(/^(.*)\b(placeholder-)(.+)$/);
931
921
  if (m) {
932
922
  const [, pre = "", p, body] = m;
933
923
  if (hasColorValue(body, theme) || hasOpacityValue(body)) {
@@ -943,7 +933,7 @@ function hasColorValue(body, theme) {
943
933
  function hasOpacityValue(body) {
944
934
  const match = body.match(/^op(?:acity)?-?(.+)$/);
945
935
  if (match && match[1] != null)
946
- return handler.bracket.percent.cssvar(match[1]) != null;
936
+ return handler.bracket.percent(match[1]) != null;
947
937
  return false;
948
938
  }
949
939
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unocss/preset-wind",
3
- "version": "0.22.1",
3
+ "version": "0.22.5",
4
4
  "description": "Tailwind / Windi CSS compact preset for UnoCSS",
5
5
  "keywords": [
6
6
  "unocss",
@@ -35,8 +35,8 @@
35
35
  "*.css"
36
36
  ],
37
37
  "dependencies": {
38
- "@unocss/core": "0.22.1",
39
- "@unocss/preset-mini": "0.22.1"
38
+ "@unocss/core": "0.22.5",
39
+ "@unocss/preset-mini": "0.22.5"
40
40
  },
41
41
  "scripts": {
42
42
  "build": "unbuild",