@unocss/preset-wind 0.15.5 → 0.16.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 CHANGED
@@ -2,18 +2,21 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const presetMini = require('@unocss/preset-mini');
5
+ const theme = require('@unocss/preset-mini/theme');
6
+ const variants = require('@unocss/preset-mini/variants');
6
7
  const core = require('@unocss/core');
7
- const utils = require('@unocss/preset-mini/utils');
8
+ const presetMini = require('@unocss/preset-mini');
8
9
  const rules$1 = require('@unocss/preset-mini/rules');
9
- const variants = require('@unocss/preset-mini/variants');
10
+ const utils = require('@unocss/preset-mini/utils');
10
11
 
11
12
  const keyframes = {
13
+ "pulse": "{0%, 100% {opacity:1} 50% {opacity:.5}}",
14
+ "bounce": "{0%, 100% {transform:translateY(-25%);animation-timing-function:cubic-bezier(0.8,0,1,1)} 50% {transform:translateY(0);animation-timing-function:cubic-bezier(0,0,0.2,1)}}",
12
15
  "spin": "{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}",
13
16
  "ping": "{0%{transform:scale(1);opacity:1}75%,100%{transform:scale(2);opacity:0}}",
14
- "bounce": "{from,20%,53%,80%,to{animation-timing-function:cubic-bezier(0.215,0.61,0.355,1);transform:translate3d(0,0,0)}40%,43%{animation-timing-function:cubic-bezier(0.755,0.05,0.855,0.06);transform:translate3d(0,-30px,0)}70%{animation-timing-function:cubic-bezier(0.755,0.05,0.855,0.06);transform:translate3d(0,-15px,0)}90%{transform:translate3d(0,-4px,0)}}",
17
+ "bounce-alt": "{from,20%,53%,80%,to{animation-timing-function:cubic-bezier(0.215,0.61,0.355,1);transform:translate3d(0,0,0)}40%,43%{animation-timing-function:cubic-bezier(0.755,0.05,0.855,0.06);transform:translate3d(0,-30px,0)}70%{animation-timing-function:cubic-bezier(0.755,0.05,0.855,0.06);transform:translate3d(0,-15px,0)}90%{transform:translate3d(0,-4px,0)}}",
15
18
  "flash": "{from,50%,to{opacity:1}25%,75%{opacity:0}}",
16
- "pulse": "{from{transform:scale3d(1,1,1)}50%{transform:scale3d(1.05,1.05,1.05)}to{transform:scale3d(1,1,1)}}",
19
+ "pulse-alt": "{from{transform:scale3d(1,1,1)}50%{transform:scale3d(1.05,1.05,1.05)}to{transform:scale3d(1,1,1)}}",
17
20
  "rubber-band": "{from{transform:scale3d(1,1,1)}30%{transform:scale3d(1.25,0.75,1)}40%{transform:scale3d(0.75,1.25,1)}50%{transform:scale3d(1.15,0.85,1)}65%{transform:scale3d(0.95,1.05,1)}75%{transform:scale3d(1.05,0.95,1)}to{transform:scale3d(1,1,1)}}",
18
21
  "shake-x": "{from,to{transform:translate3d(0,0,0)}10%,30%,50%,70%,90%{transform:translate3d(-10px,0,0)}20%,40%,60%,80%{transform:translate3d(10px,0,0)}}",
19
22
  "shake-y": "{from,to{transform:translate3d(0,0,0)}10%,30%,50%,70%,90%{transform:translate3d(0,-10px,0)}20%,40%,60%,80%{transform:translate3d(0,10px,0)}}",
@@ -110,6 +113,7 @@ const keyframes = {
110
113
  "back-out-left": "{0%{opacity:1;transform:scale(1)}80%{opacity:0.7;transform:translateX(-2000px) scale(0.7)}100%{opacity:0.7;transform:translateY(-700px) scale(0.7)}}"
111
114
  };
112
115
  const durations = {
116
+ "pulse": "2s",
113
117
  "heart-beat": "1.3s",
114
118
  "bounce-in": "0.75s",
115
119
  "bounce-out": "0.75s",
@@ -118,16 +122,18 @@ const durations = {
118
122
  "hinge": "2s"
119
123
  };
120
124
  const timingFns = {
125
+ "pulse": "cubic-bezier(0.4,0,.6,1)",
126
+ "ping": "cubic-bezier(0,0,.2,1)",
121
127
  "head-shake": "ease-in-out",
122
128
  "heart-beat": "ease-in-out",
123
- "pulse": "ease-in-out",
129
+ "pulse-alt": "ease-in-out",
124
130
  "light-speed-in-left": "ease-out",
125
131
  "light-speed-in-right": "ease-out",
126
132
  "light-speed-out-left": "ease-in",
127
133
  "light-speed-out-right": "ease-in"
128
134
  };
129
135
  const properties = {
130
- "bounce": { "transform-origin": "center bottom" },
136
+ "bounce-alt": { "transform-origin": "center bottom" },
131
137
  "jello": { "transform-origin": "center" },
132
138
  "swing": { "transform-origin": "top center" },
133
139
  "flip": { "backface-visibility": "visible" },
@@ -202,12 +208,10 @@ const colorResolver = (mode) => ([, body], { theme }) => {
202
208
  };
203
209
  }
204
210
  };
205
- const bgAttachments = [
211
+ const backgroundStyles = [
206
212
  ["bg-fixed", { "background-attachment": "fixed" }],
207
213
  ["bg-local", { "background-attachment": "local" }],
208
- ["bg-scroll", { "background-attachment": "scroll" }]
209
- ];
210
- const bgBlendModes = [
214
+ ["bg-scroll", { "background-attachment": "scroll" }],
211
215
  ["bg-blend-normal", { "background-blend-mode": "normal" }],
212
216
  ["bg-blend-multiply", { "background-blend-mode": "multiply" }],
213
217
  ["bg-blend-screen", { "background-blend-mode": "screen" }],
@@ -223,23 +227,17 @@ const bgBlendModes = [
223
227
  ["bg-blend-hue", { "background-blend-mode": "hue" }],
224
228
  ["bg-blend-saturation", { "background-blend-mode": "saturation" }],
225
229
  ["bg-blend-color", { "background-blend-mode": "color" }],
226
- ["bg-blend-luminosity", { "background-blend-mode": "luminosity" }]
227
- ];
228
- const bgClips = [
230
+ ["bg-blend-luminosity", { "background-blend-mode": "luminosity" }],
229
231
  ["bg-clip-border", { "-webkit-background-clip": "border-box", "background-attachment": "border-box" }],
230
232
  ["bg-clip-content", { "-webkit-background-clip": "content-box", "background-attachment": "content-box" }],
231
233
  ["bg-clip-padding", { "-webkit-background-clip": "padding-box", "background-attachment": "padding-box" }],
232
- ["bg-clip-text", { "-webkit-background-clip": "text", "background-attachment": "text" }]
233
- ];
234
- const bgGradients = [
234
+ ["bg-clip-text", { "-webkit-background-clip": "text", "background-attachment": "text" }],
235
235
  [/^from-(.+)$/, colorResolver("from")],
236
236
  [/^to-(.+)$/, colorResolver("to")],
237
237
  [/^via-(.+)$/, colorResolver("via")],
238
238
  [/^from-op(?:acity)?-?(.+)$/m, ([, opacity]) => ({ "--un-from-opacity": utils.handler.bracket.percent(opacity) })],
239
239
  [/^to-op(?:acity)?-?(.+)$/m, ([, opacity]) => ({ "--un-to-opacity": utils.handler.bracket.percent(opacity) })],
240
- [/^via-op(?:acity)?-?(.+)$/m, ([, opacity]) => ({ "--un-via-opacity": utils.handler.bracket.percent(opacity) })]
241
- ];
242
- const bgImages = [
240
+ [/^via-op(?:acity)?-?(.+)$/m, ([, opacity]) => ({ "--un-via-opacity": utils.handler.bracket.percent(opacity) })],
243
241
  ["bg-none", { "background-image": "none" }],
244
242
  ["bg-gradient-to-t", {
245
243
  "background-image": "linear-gradient(to top, var(--un-gradient-stops))"
@@ -264,14 +262,10 @@ const bgImages = [
264
262
  }],
265
263
  ["bg-gradient-to-tl", {
266
264
  "background-image": "linear-gradient(to top left, var(--un-gradient-stops))"
267
- }]
268
- ];
269
- const bgOrigins = [
265
+ }],
270
266
  ["bg-origin-border", { "background-origin": "border-box" }],
271
267
  ["bg-origin-padding", { "background-origin": "padding-box" }],
272
- ["bg-origin-content", { "background-origin": "content-box" }]
273
- ];
274
- const bgPositions = [
268
+ ["bg-origin-content", { "background-origin": "content-box" }],
275
269
  ["bg-bottom", { "background-position": "bottom" }],
276
270
  ["bg-center", { "background-position": "center" }],
277
271
  ["bg-left", { "background-position": "left" }],
@@ -280,17 +274,13 @@ const bgPositions = [
280
274
  ["bg-right", { "background-position": "right" }],
281
275
  ["bg-right-bottom", { "background-position": "right bottom" }],
282
276
  ["bg-right-top", { "background-position": "right top" }],
283
- ["bg-top", { "background-position": "top" }]
284
- ];
285
- const bgRepeats = [
277
+ ["bg-top", { "background-position": "top" }],
286
278
  ["bg-repeat", { "background-repeat": "repeat" }],
287
279
  ["bg-no-repeat", { "background-repeat": "no-repeat" }],
288
280
  ["bg-repeat-x", { "background-position": "repeat-x" }],
289
281
  ["bg-repeat-y", { "background-position": "repeat-y" }],
290
282
  ["bg-repeat-round", { "background-position": "round" }],
291
- ["bg-repeat-space", { "background-position": "space" }]
292
- ];
293
- const bgSizes = [
283
+ ["bg-repeat-space", { "background-position": "space" }],
294
284
  ["bg-auto", { "background-size": "auto" }],
295
285
  ["bg-cover", { "background-size": "cover" }],
296
286
  ["bg-contain", { "background-size": "contain" }]
@@ -599,18 +589,8 @@ const tables = [
599
589
  ];
600
590
 
601
591
  const variablesAbbrMap = {
602
- "visible": "visibility",
603
- "select": "user-select",
604
- "vertical": "vertical-align",
605
- "backface": "backface-visibility",
606
- "whitespace": "white-space",
607
- "break": "word-break",
608
- "color": "color",
609
- "case": "text-transform",
610
592
  "write": "writing-mode",
611
593
  "write-orient": "text-orientation",
612
- "origin": "transform-origin",
613
- "bg": "background-color",
614
594
  "bg-blend": "background-blend-mode",
615
595
  "bg-clip": "-webkit-background-clip",
616
596
  "bg-gradient": "linear-gradient",
@@ -618,21 +598,6 @@ const variablesAbbrMap = {
618
598
  "bg-position": "background-position",
619
599
  "bg-repeat": "background-repeat",
620
600
  "bg-size": "background-size",
621
- "bg-opacity": "background-opacity",
622
- "tab": "tab-size",
623
- "underline": "text-decoration-thickness",
624
- "underline-offset": "text-underline-offset",
625
- "text": "color",
626
- "grid-cols": "grid-template-columns",
627
- "grid-rows": "grid-template-rows",
628
- "auto-flow": "grid-auto-flow",
629
- "row-start": "grid-row-start",
630
- "row-end": "grid-row-end",
631
- "justify": "justify-content",
632
- "content": "align-content",
633
- "items": "align-items",
634
- "self": "align-self",
635
- "object": "object-fit",
636
601
  "mix-blend": "mix-blend-mode",
637
602
  "animate-speed": "animation-speed"
638
603
  };
@@ -715,51 +680,96 @@ const fontVariantNumeric = [
715
680
  ];
716
681
 
717
682
  const rules = [
718
- screenReadersAccess,
683
+ rules$1.cssVariables,
719
684
  cssVariables,
720
- spaces,
685
+ container,
686
+ screenReadersAccess,
687
+ rules$1.pointerEvents,
688
+ rules$1.appearances,
689
+ rules$1.positions,
690
+ rules$1.insets,
721
691
  lineClamps,
722
692
  isolations,
723
- container,
724
- bgAttachments,
725
- bgBlendModes,
726
- bgClips,
727
- bgGradients,
728
- bgImages,
729
- bgOrigins,
730
- bgPositions,
731
- bgSizes,
732
- bgRepeats,
693
+ rules$1.zIndexes,
694
+ rules$1.orders,
695
+ rules$1.grids,
696
+ rules$1.floats,
697
+ rules$1.margins,
698
+ rules$1.boxSizing,
699
+ rules$1.displays,
700
+ rules$1.aspectRatio,
701
+ rules$1.sizes,
702
+ rules$1.flex,
703
+ tables,
704
+ rules$1.transforms,
705
+ animations,
706
+ rules$1.cursors,
707
+ rules$1.userSelects,
708
+ rules$1.resizes,
709
+ listStyle,
710
+ rules$1.appearance,
711
+ rules$1.placements,
712
+ rules$1.alignments,
713
+ rules$1.justifies,
714
+ rules$1.gaps,
715
+ spaces,
733
716
  divides,
717
+ rules$1.overflows,
718
+ overscrolls,
719
+ rules$1.textOverflows,
720
+ rules$1.whitespaces,
721
+ rules$1.breaks,
722
+ rules$1.borders,
723
+ rules$1.bgColors,
724
+ boxDecorationBreaks,
725
+ backgroundStyles,
726
+ rules$1.fillColors,
727
+ objectPositions,
728
+ rules$1.paddings,
729
+ rules$1.textAligns,
730
+ rules$1.textIndents,
731
+ rules$1.verticalAligns,
732
+ rules$1.fonts,
734
733
  textTransforms,
734
+ rules$1.fontStyles,
735
+ fontVariantNumeric,
736
+ rules$1.textColors,
737
+ rules$1.textDecorations,
738
+ rules$1.fontSmoothings,
739
+ rules$1.tabSizes,
740
+ rules$1.textStrokes,
741
+ rules$1.textShadows,
735
742
  hyphens,
736
743
  writingModes,
737
744
  writingOrientations,
738
- mixBlendModes,
739
- listStyle,
745
+ rules$1.placeholder,
740
746
  caretColors,
741
- boxDecorationBreaks,
742
747
  caretOpacity,
748
+ rules$1.opacity,
749
+ mixBlendModes,
750
+ rules$1.boxShadows,
751
+ rules$1.outline,
752
+ rules$1.rings,
743
753
  imageRenderings,
744
- overscrolls,
745
- fontVariantNumeric,
746
- objectPositions,
747
- animations,
748
754
  filters,
749
- tables
755
+ rules$1.transitions,
756
+ rules$1.contents,
757
+ rules$1.questionMark
750
758
  ].flat(1);
751
759
 
752
- const presetWind = (options = {}) => [
753
- presetMini.presetMini(),
754
- {
755
- name: "@unocss/preset-wind",
756
- rules,
757
- shortcuts: [
758
- ...containerShortcuts
759
- ],
760
- options
761
- }
762
- ];
760
+ const presetWind = (options = {}) => ({
761
+ name: "@unocss/preset-wind",
762
+ theme: theme.theme,
763
+ rules,
764
+ shortcuts: [
765
+ ...containerShortcuts
766
+ ],
767
+ variants: [
768
+ ...variants.variants,
769
+ ...options.dark === "media" ? variants.variantColorsMedia : variants.variantColorsClass
770
+ ],
771
+ options
772
+ });
763
773
 
764
774
  exports.colors = presetMini.colors;
765
775
  exports.theme = presetMini.theme;
package/dist/index.d.ts CHANGED
@@ -8,6 +8,6 @@ interface UnoOptions {
8
8
  */
9
9
  dark?: 'class' | 'media';
10
10
  }
11
- declare const presetWind: (options?: UnoOptions) => Preset<Theme>[];
11
+ declare const presetWind: (options?: UnoOptions) => Preset<Theme>;
12
12
 
13
13
  export { UnoOptions, presetWind as default, presetWind };
package/dist/index.mjs CHANGED
@@ -1,16 +1,18 @@
1
- import { presetMini } from '@unocss/preset-mini';
2
- export { colors, theme } from '@unocss/preset-mini';
1
+ import { theme } from '@unocss/preset-mini/theme';
2
+ import { CONTROL_BYPASS_PSEUDO, variants, variantColorsMedia, variantColorsClass } from '@unocss/preset-mini/variants';
3
3
  import { toArray } from '@unocss/core';
4
+ export { colors, theme } from '@unocss/preset-mini';
5
+ import { parseColorUtil, colorResolver as colorResolver$1, varEmpty as varEmpty$1, cssVariables as cssVariables$1, 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, fillColors, paddings, textAligns, textIndents, verticalAligns, fonts, fontStyles, textColors, textDecorations, fontSmoothings, tabSizes, textStrokes, textShadows, placeholder, opacity, boxShadows, outline, rings, transitions, contents, questionMark } from '@unocss/preset-mini/rules';
4
6
  import { handler, directionMap } from '@unocss/preset-mini/utils';
5
- import { parseColorUtil, colorResolver as colorResolver$1, varEmpty as varEmpty$1 } from '@unocss/preset-mini/rules';
6
- import { CONTROL_BYPASS_PSEUDO } from '@unocss/preset-mini/variants';
7
7
 
8
8
  const keyframes = {
9
+ "pulse": "{0%, 100% {opacity:1} 50% {opacity:.5}}",
10
+ "bounce": "{0%, 100% {transform:translateY(-25%);animation-timing-function:cubic-bezier(0.8,0,1,1)} 50% {transform:translateY(0);animation-timing-function:cubic-bezier(0,0,0.2,1)}}",
9
11
  "spin": "{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}",
10
12
  "ping": "{0%{transform:scale(1);opacity:1}75%,100%{transform:scale(2);opacity:0}}",
11
- "bounce": "{from,20%,53%,80%,to{animation-timing-function:cubic-bezier(0.215,0.61,0.355,1);transform:translate3d(0,0,0)}40%,43%{animation-timing-function:cubic-bezier(0.755,0.05,0.855,0.06);transform:translate3d(0,-30px,0)}70%{animation-timing-function:cubic-bezier(0.755,0.05,0.855,0.06);transform:translate3d(0,-15px,0)}90%{transform:translate3d(0,-4px,0)}}",
13
+ "bounce-alt": "{from,20%,53%,80%,to{animation-timing-function:cubic-bezier(0.215,0.61,0.355,1);transform:translate3d(0,0,0)}40%,43%{animation-timing-function:cubic-bezier(0.755,0.05,0.855,0.06);transform:translate3d(0,-30px,0)}70%{animation-timing-function:cubic-bezier(0.755,0.05,0.855,0.06);transform:translate3d(0,-15px,0)}90%{transform:translate3d(0,-4px,0)}}",
12
14
  "flash": "{from,50%,to{opacity:1}25%,75%{opacity:0}}",
13
- "pulse": "{from{transform:scale3d(1,1,1)}50%{transform:scale3d(1.05,1.05,1.05)}to{transform:scale3d(1,1,1)}}",
15
+ "pulse-alt": "{from{transform:scale3d(1,1,1)}50%{transform:scale3d(1.05,1.05,1.05)}to{transform:scale3d(1,1,1)}}",
14
16
  "rubber-band": "{from{transform:scale3d(1,1,1)}30%{transform:scale3d(1.25,0.75,1)}40%{transform:scale3d(0.75,1.25,1)}50%{transform:scale3d(1.15,0.85,1)}65%{transform:scale3d(0.95,1.05,1)}75%{transform:scale3d(1.05,0.95,1)}to{transform:scale3d(1,1,1)}}",
15
17
  "shake-x": "{from,to{transform:translate3d(0,0,0)}10%,30%,50%,70%,90%{transform:translate3d(-10px,0,0)}20%,40%,60%,80%{transform:translate3d(10px,0,0)}}",
16
18
  "shake-y": "{from,to{transform:translate3d(0,0,0)}10%,30%,50%,70%,90%{transform:translate3d(0,-10px,0)}20%,40%,60%,80%{transform:translate3d(0,10px,0)}}",
@@ -107,6 +109,7 @@ const keyframes = {
107
109
  "back-out-left": "{0%{opacity:1;transform:scale(1)}80%{opacity:0.7;transform:translateX(-2000px) scale(0.7)}100%{opacity:0.7;transform:translateY(-700px) scale(0.7)}}"
108
110
  };
109
111
  const durations = {
112
+ "pulse": "2s",
110
113
  "heart-beat": "1.3s",
111
114
  "bounce-in": "0.75s",
112
115
  "bounce-out": "0.75s",
@@ -115,16 +118,18 @@ const durations = {
115
118
  "hinge": "2s"
116
119
  };
117
120
  const timingFns = {
121
+ "pulse": "cubic-bezier(0.4,0,.6,1)",
122
+ "ping": "cubic-bezier(0,0,.2,1)",
118
123
  "head-shake": "ease-in-out",
119
124
  "heart-beat": "ease-in-out",
120
- "pulse": "ease-in-out",
125
+ "pulse-alt": "ease-in-out",
121
126
  "light-speed-in-left": "ease-out",
122
127
  "light-speed-in-right": "ease-out",
123
128
  "light-speed-out-left": "ease-in",
124
129
  "light-speed-out-right": "ease-in"
125
130
  };
126
131
  const properties = {
127
- "bounce": { "transform-origin": "center bottom" },
132
+ "bounce-alt": { "transform-origin": "center bottom" },
128
133
  "jello": { "transform-origin": "center" },
129
134
  "swing": { "transform-origin": "top center" },
130
135
  "flip": { "backface-visibility": "visible" },
@@ -199,12 +204,10 @@ const colorResolver = (mode) => ([, body], { theme }) => {
199
204
  };
200
205
  }
201
206
  };
202
- const bgAttachments = [
207
+ const backgroundStyles = [
203
208
  ["bg-fixed", { "background-attachment": "fixed" }],
204
209
  ["bg-local", { "background-attachment": "local" }],
205
- ["bg-scroll", { "background-attachment": "scroll" }]
206
- ];
207
- const bgBlendModes = [
210
+ ["bg-scroll", { "background-attachment": "scroll" }],
208
211
  ["bg-blend-normal", { "background-blend-mode": "normal" }],
209
212
  ["bg-blend-multiply", { "background-blend-mode": "multiply" }],
210
213
  ["bg-blend-screen", { "background-blend-mode": "screen" }],
@@ -220,23 +223,17 @@ const bgBlendModes = [
220
223
  ["bg-blend-hue", { "background-blend-mode": "hue" }],
221
224
  ["bg-blend-saturation", { "background-blend-mode": "saturation" }],
222
225
  ["bg-blend-color", { "background-blend-mode": "color" }],
223
- ["bg-blend-luminosity", { "background-blend-mode": "luminosity" }]
224
- ];
225
- const bgClips = [
226
+ ["bg-blend-luminosity", { "background-blend-mode": "luminosity" }],
226
227
  ["bg-clip-border", { "-webkit-background-clip": "border-box", "background-attachment": "border-box" }],
227
228
  ["bg-clip-content", { "-webkit-background-clip": "content-box", "background-attachment": "content-box" }],
228
229
  ["bg-clip-padding", { "-webkit-background-clip": "padding-box", "background-attachment": "padding-box" }],
229
- ["bg-clip-text", { "-webkit-background-clip": "text", "background-attachment": "text" }]
230
- ];
231
- const bgGradients = [
230
+ ["bg-clip-text", { "-webkit-background-clip": "text", "background-attachment": "text" }],
232
231
  [/^from-(.+)$/, colorResolver("from")],
233
232
  [/^to-(.+)$/, colorResolver("to")],
234
233
  [/^via-(.+)$/, colorResolver("via")],
235
234
  [/^from-op(?:acity)?-?(.+)$/m, ([, opacity]) => ({ "--un-from-opacity": handler.bracket.percent(opacity) })],
236
235
  [/^to-op(?:acity)?-?(.+)$/m, ([, opacity]) => ({ "--un-to-opacity": handler.bracket.percent(opacity) })],
237
- [/^via-op(?:acity)?-?(.+)$/m, ([, opacity]) => ({ "--un-via-opacity": handler.bracket.percent(opacity) })]
238
- ];
239
- const bgImages = [
236
+ [/^via-op(?:acity)?-?(.+)$/m, ([, opacity]) => ({ "--un-via-opacity": handler.bracket.percent(opacity) })],
240
237
  ["bg-none", { "background-image": "none" }],
241
238
  ["bg-gradient-to-t", {
242
239
  "background-image": "linear-gradient(to top, var(--un-gradient-stops))"
@@ -261,14 +258,10 @@ const bgImages = [
261
258
  }],
262
259
  ["bg-gradient-to-tl", {
263
260
  "background-image": "linear-gradient(to top left, var(--un-gradient-stops))"
264
- }]
265
- ];
266
- const bgOrigins = [
261
+ }],
267
262
  ["bg-origin-border", { "background-origin": "border-box" }],
268
263
  ["bg-origin-padding", { "background-origin": "padding-box" }],
269
- ["bg-origin-content", { "background-origin": "content-box" }]
270
- ];
271
- const bgPositions = [
264
+ ["bg-origin-content", { "background-origin": "content-box" }],
272
265
  ["bg-bottom", { "background-position": "bottom" }],
273
266
  ["bg-center", { "background-position": "center" }],
274
267
  ["bg-left", { "background-position": "left" }],
@@ -277,17 +270,13 @@ const bgPositions = [
277
270
  ["bg-right", { "background-position": "right" }],
278
271
  ["bg-right-bottom", { "background-position": "right bottom" }],
279
272
  ["bg-right-top", { "background-position": "right top" }],
280
- ["bg-top", { "background-position": "top" }]
281
- ];
282
- const bgRepeats = [
273
+ ["bg-top", { "background-position": "top" }],
283
274
  ["bg-repeat", { "background-repeat": "repeat" }],
284
275
  ["bg-no-repeat", { "background-repeat": "no-repeat" }],
285
276
  ["bg-repeat-x", { "background-position": "repeat-x" }],
286
277
  ["bg-repeat-y", { "background-position": "repeat-y" }],
287
278
  ["bg-repeat-round", { "background-position": "round" }],
288
- ["bg-repeat-space", { "background-position": "space" }]
289
- ];
290
- const bgSizes = [
279
+ ["bg-repeat-space", { "background-position": "space" }],
291
280
  ["bg-auto", { "background-size": "auto" }],
292
281
  ["bg-cover", { "background-size": "cover" }],
293
282
  ["bg-contain", { "background-size": "contain" }]
@@ -596,18 +585,8 @@ const tables = [
596
585
  ];
597
586
 
598
587
  const variablesAbbrMap = {
599
- "visible": "visibility",
600
- "select": "user-select",
601
- "vertical": "vertical-align",
602
- "backface": "backface-visibility",
603
- "whitespace": "white-space",
604
- "break": "word-break",
605
- "color": "color",
606
- "case": "text-transform",
607
588
  "write": "writing-mode",
608
589
  "write-orient": "text-orientation",
609
- "origin": "transform-origin",
610
- "bg": "background-color",
611
590
  "bg-blend": "background-blend-mode",
612
591
  "bg-clip": "-webkit-background-clip",
613
592
  "bg-gradient": "linear-gradient",
@@ -615,21 +594,6 @@ const variablesAbbrMap = {
615
594
  "bg-position": "background-position",
616
595
  "bg-repeat": "background-repeat",
617
596
  "bg-size": "background-size",
618
- "bg-opacity": "background-opacity",
619
- "tab": "tab-size",
620
- "underline": "text-decoration-thickness",
621
- "underline-offset": "text-underline-offset",
622
- "text": "color",
623
- "grid-cols": "grid-template-columns",
624
- "grid-rows": "grid-template-rows",
625
- "auto-flow": "grid-auto-flow",
626
- "row-start": "grid-row-start",
627
- "row-end": "grid-row-end",
628
- "justify": "justify-content",
629
- "content": "align-content",
630
- "items": "align-items",
631
- "self": "align-self",
632
- "object": "object-fit",
633
597
  "mix-blend": "mix-blend-mode",
634
598
  "animate-speed": "animation-speed"
635
599
  };
@@ -712,50 +676,95 @@ const fontVariantNumeric = [
712
676
  ];
713
677
 
714
678
  const rules = [
715
- screenReadersAccess,
679
+ cssVariables$1,
716
680
  cssVariables,
717
- spaces,
681
+ container,
682
+ screenReadersAccess,
683
+ pointerEvents,
684
+ appearances,
685
+ positions,
686
+ insets,
718
687
  lineClamps,
719
688
  isolations,
720
- container,
721
- bgAttachments,
722
- bgBlendModes,
723
- bgClips,
724
- bgGradients,
725
- bgImages,
726
- bgOrigins,
727
- bgPositions,
728
- bgSizes,
729
- bgRepeats,
689
+ zIndexes,
690
+ orders,
691
+ grids,
692
+ floats,
693
+ margins,
694
+ boxSizing,
695
+ displays,
696
+ aspectRatio,
697
+ sizes,
698
+ flex,
699
+ tables,
700
+ transforms,
701
+ animations,
702
+ cursors,
703
+ userSelects,
704
+ resizes,
705
+ listStyle,
706
+ appearance,
707
+ placements,
708
+ alignments,
709
+ justifies,
710
+ gaps,
711
+ spaces,
730
712
  divides,
713
+ overflows,
714
+ overscrolls,
715
+ textOverflows,
716
+ whitespaces,
717
+ breaks,
718
+ borders,
719
+ bgColors,
720
+ boxDecorationBreaks,
721
+ backgroundStyles,
722
+ fillColors,
723
+ objectPositions,
724
+ paddings,
725
+ textAligns,
726
+ textIndents,
727
+ verticalAligns,
728
+ fonts,
731
729
  textTransforms,
730
+ fontStyles,
731
+ fontVariantNumeric,
732
+ textColors,
733
+ textDecorations,
734
+ fontSmoothings,
735
+ tabSizes,
736
+ textStrokes,
737
+ textShadows,
732
738
  hyphens,
733
739
  writingModes,
734
740
  writingOrientations,
735
- mixBlendModes,
736
- listStyle,
741
+ placeholder,
737
742
  caretColors,
738
- boxDecorationBreaks,
739
743
  caretOpacity,
744
+ opacity,
745
+ mixBlendModes,
746
+ boxShadows,
747
+ outline,
748
+ rings,
740
749
  imageRenderings,
741
- overscrolls,
742
- fontVariantNumeric,
743
- objectPositions,
744
- animations,
745
750
  filters,
746
- tables
751
+ transitions,
752
+ contents,
753
+ questionMark
747
754
  ].flat(1);
748
755
 
749
- const presetWind = (options = {}) => [
750
- presetMini(),
751
- {
752
- name: "@unocss/preset-wind",
753
- rules,
754
- shortcuts: [
755
- ...containerShortcuts
756
- ],
757
- options
758
- }
759
- ];
756
+ const presetWind = (options = {}) => ({
757
+ name: "@unocss/preset-wind",
758
+ theme,
759
+ rules,
760
+ shortcuts: [
761
+ ...containerShortcuts
762
+ ],
763
+ variants: [
764
+ ...variants,
765
+ ...options.dark === "media" ? variantColorsMedia : variantColorsClass
766
+ ],
767
+ options
768
+ });
760
769
 
761
770
  export { presetWind as default, presetWind };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unocss/preset-wind",
3
- "version": "0.15.5",
3
+ "version": "0.16.2",
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.15.5",
39
- "@unocss/preset-mini": "0.15.5"
38
+ "@unocss/core": "0.16.2",
39
+ "@unocss/preset-mini": "0.16.2"
40
40
  },
41
41
  "scripts": {
42
42
  "build": "unbuild",