@unocss/preset-wind 0.15.3 → 0.16.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 +92 -82
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +92 -83
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -2,18 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const
|
|
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
|
|
8
|
+
const presetMini = require('@unocss/preset-mini');
|
|
8
9
|
const rules$1 = require('@unocss/preset-mini/rules');
|
|
9
|
-
const
|
|
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
|
|
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,20 +274,16 @@ 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
|
-
["bg-cover", { "background-
|
|
296
|
-
["bg-contain", { "background-
|
|
285
|
+
["bg-cover", { "background-size": "cover" }],
|
|
286
|
+
["bg-contain", { "background-size": "contain" }]
|
|
297
287
|
];
|
|
298
288
|
|
|
299
289
|
const listStyleProps = ["none", "disc", "circle", "square", "decimal", "zero-decimal", "greek", "roman", "upper-roman", "alpha", "upper-alpha"];
|
|
@@ -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
|
};
|
|
@@ -717,49 +682,94 @@ const fontVariantNumeric = [
|
|
|
717
682
|
const rules = [
|
|
718
683
|
screenReadersAccess,
|
|
719
684
|
cssVariables,
|
|
685
|
+
rules$1.cssVariables,
|
|
686
|
+
rules$1.paddings,
|
|
687
|
+
rules$1.margins,
|
|
720
688
|
spaces,
|
|
721
689
|
lineClamps,
|
|
722
690
|
isolations,
|
|
723
691
|
container,
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
bgPositions,
|
|
731
|
-
bgSizes,
|
|
732
|
-
bgRepeats,
|
|
692
|
+
rules$1.displays,
|
|
693
|
+
rules$1.opacity,
|
|
694
|
+
backgroundStyles,
|
|
695
|
+
rules$1.bgColors,
|
|
696
|
+
rules$1.fillColors,
|
|
697
|
+
rules$1.borders,
|
|
733
698
|
divides,
|
|
699
|
+
rules$1.contents,
|
|
700
|
+
rules$1.fonts,
|
|
701
|
+
rules$1.tabSizes,
|
|
702
|
+
rules$1.textIndents,
|
|
703
|
+
rules$1.textOverflows,
|
|
704
|
+
rules$1.textDecorations,
|
|
705
|
+
rules$1.textStrokes,
|
|
706
|
+
rules$1.textShadows,
|
|
734
707
|
textTransforms,
|
|
708
|
+
rules$1.textAligns,
|
|
709
|
+
rules$1.textColors,
|
|
710
|
+
fontVariantNumeric,
|
|
711
|
+
rules$1.fontStyles,
|
|
712
|
+
rules$1.fontSmoothings,
|
|
735
713
|
hyphens,
|
|
736
714
|
writingModes,
|
|
737
715
|
writingOrientations,
|
|
738
716
|
mixBlendModes,
|
|
717
|
+
rules$1.boxShadows,
|
|
718
|
+
rules$1.rings,
|
|
719
|
+
rules$1.flex,
|
|
720
|
+
rules$1.grids,
|
|
721
|
+
rules$1.gaps,
|
|
722
|
+
rules$1.sizes,
|
|
723
|
+
rules$1.aspectRatio,
|
|
724
|
+
rules$1.cursors,
|
|
725
|
+
rules$1.appearances,
|
|
726
|
+
rules$1.pointerEvents,
|
|
727
|
+
rules$1.resizes,
|
|
728
|
+
rules$1.verticalAligns,
|
|
729
|
+
rules$1.userSelects,
|
|
730
|
+
rules$1.whitespaces,
|
|
739
731
|
listStyle,
|
|
740
732
|
caretColors,
|
|
741
733
|
boxDecorationBreaks,
|
|
742
734
|
caretOpacity,
|
|
743
735
|
imageRenderings,
|
|
736
|
+
rules$1.breaks,
|
|
737
|
+
rules$1.overflows,
|
|
738
|
+
rules$1.outline,
|
|
739
|
+
rules$1.appearance,
|
|
740
|
+
rules$1.placeholder,
|
|
744
741
|
overscrolls,
|
|
745
|
-
|
|
746
|
-
|
|
742
|
+
rules$1.positions,
|
|
743
|
+
rules$1.orders,
|
|
744
|
+
rules$1.justifies,
|
|
745
|
+
rules$1.placements,
|
|
746
|
+
rules$1.alignments,
|
|
747
747
|
animations,
|
|
748
|
+
rules$1.insets,
|
|
749
|
+
rules$1.floats,
|
|
750
|
+
rules$1.zIndexes,
|
|
751
|
+
objectPositions,
|
|
752
|
+
rules$1.boxSizing,
|
|
753
|
+
rules$1.transitions,
|
|
748
754
|
filters,
|
|
749
|
-
tables
|
|
755
|
+
tables,
|
|
756
|
+
rules$1.transforms,
|
|
757
|
+
rules$1.questionMark
|
|
750
758
|
].flat(1);
|
|
751
759
|
|
|
752
|
-
const presetWind = (options = {}) =>
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
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
package/dist/index.mjs
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
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, paddings, margins, displays, opacity, bgColors, fillColors, borders, contents, fonts, tabSizes, textIndents, textOverflows, textDecorations, textStrokes, textShadows, textAligns, textColors, fontStyles, fontSmoothings, boxShadows, rings, flex, grids, gaps, sizes, aspectRatio, cursors, appearances, pointerEvents, resizes, verticalAligns, userSelects, whitespaces, breaks, overflows, outline, appearance, placeholder, positions, orders, justifies, placements, alignments, insets, floats, zIndexes, boxSizing, transitions, transforms, 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
|
|
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,20 +270,16 @@ 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
|
-
["bg-cover", { "background-
|
|
293
|
-
["bg-contain", { "background-
|
|
281
|
+
["bg-cover", { "background-size": "cover" }],
|
|
282
|
+
["bg-contain", { "background-size": "contain" }]
|
|
294
283
|
];
|
|
295
284
|
|
|
296
285
|
const listStyleProps = ["none", "disc", "circle", "square", "decimal", "zero-decimal", "greek", "roman", "upper-roman", "alpha", "upper-alpha"];
|
|
@@ -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
|
};
|
|
@@ -714,48 +678,93 @@ const fontVariantNumeric = [
|
|
|
714
678
|
const rules = [
|
|
715
679
|
screenReadersAccess,
|
|
716
680
|
cssVariables,
|
|
681
|
+
cssVariables$1,
|
|
682
|
+
paddings,
|
|
683
|
+
margins,
|
|
717
684
|
spaces,
|
|
718
685
|
lineClamps,
|
|
719
686
|
isolations,
|
|
720
687
|
container,
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
bgPositions,
|
|
728
|
-
bgSizes,
|
|
729
|
-
bgRepeats,
|
|
688
|
+
displays,
|
|
689
|
+
opacity,
|
|
690
|
+
backgroundStyles,
|
|
691
|
+
bgColors,
|
|
692
|
+
fillColors,
|
|
693
|
+
borders,
|
|
730
694
|
divides,
|
|
695
|
+
contents,
|
|
696
|
+
fonts,
|
|
697
|
+
tabSizes,
|
|
698
|
+
textIndents,
|
|
699
|
+
textOverflows,
|
|
700
|
+
textDecorations,
|
|
701
|
+
textStrokes,
|
|
702
|
+
textShadows,
|
|
731
703
|
textTransforms,
|
|
704
|
+
textAligns,
|
|
705
|
+
textColors,
|
|
706
|
+
fontVariantNumeric,
|
|
707
|
+
fontStyles,
|
|
708
|
+
fontSmoothings,
|
|
732
709
|
hyphens,
|
|
733
710
|
writingModes,
|
|
734
711
|
writingOrientations,
|
|
735
712
|
mixBlendModes,
|
|
713
|
+
boxShadows,
|
|
714
|
+
rings,
|
|
715
|
+
flex,
|
|
716
|
+
grids,
|
|
717
|
+
gaps,
|
|
718
|
+
sizes,
|
|
719
|
+
aspectRatio,
|
|
720
|
+
cursors,
|
|
721
|
+
appearances,
|
|
722
|
+
pointerEvents,
|
|
723
|
+
resizes,
|
|
724
|
+
verticalAligns,
|
|
725
|
+
userSelects,
|
|
726
|
+
whitespaces,
|
|
736
727
|
listStyle,
|
|
737
728
|
caretColors,
|
|
738
729
|
boxDecorationBreaks,
|
|
739
730
|
caretOpacity,
|
|
740
731
|
imageRenderings,
|
|
732
|
+
breaks,
|
|
733
|
+
overflows,
|
|
734
|
+
outline,
|
|
735
|
+
appearance,
|
|
736
|
+
placeholder,
|
|
741
737
|
overscrolls,
|
|
742
|
-
|
|
743
|
-
|
|
738
|
+
positions,
|
|
739
|
+
orders,
|
|
740
|
+
justifies,
|
|
741
|
+
placements,
|
|
742
|
+
alignments,
|
|
744
743
|
animations,
|
|
744
|
+
insets,
|
|
745
|
+
floats,
|
|
746
|
+
zIndexes,
|
|
747
|
+
objectPositions,
|
|
748
|
+
boxSizing,
|
|
749
|
+
transitions,
|
|
745
750
|
filters,
|
|
746
|
-
tables
|
|
751
|
+
tables,
|
|
752
|
+
transforms,
|
|
753
|
+
questionMark
|
|
747
754
|
].flat(1);
|
|
748
755
|
|
|
749
|
-
const presetWind = (options = {}) =>
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
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.
|
|
3
|
+
"version": "0.16.0",
|
|
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.
|
|
39
|
-
"@unocss/preset-mini": "0.
|
|
38
|
+
"@unocss/core": "0.16.0",
|
|
39
|
+
"@unocss/preset-mini": "0.16.0"
|
|
40
40
|
},
|
|
41
41
|
"scripts": {
|
|
42
42
|
"build": "unbuild",
|