@unocss/preset-wind3 66.5.10 → 66.5.12

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/colors.d.mts CHANGED
@@ -1,2 +1,362 @@
1
- export * from '@unocss/preset-mini/colors';
2
- import '@unocss/rule-utils';
1
+ import "@unocss/core";
2
+
3
+ //#region ../preset-mini/src/_theme/types.d.ts
4
+
5
+ interface Colors {
6
+ [key: string]: Colors & {
7
+ DEFAULT?: string;
8
+ } | string;
9
+ }
10
+ //#endregion
11
+ //#region ../preset-mini/src/_theme/colors.d.ts
12
+ declare const colors: {
13
+ inherit: string;
14
+ current: string;
15
+ transparent: string;
16
+ black: string;
17
+ white: string;
18
+ rose: {
19
+ 50: string;
20
+ 100: string;
21
+ 200: string;
22
+ 300: string;
23
+ 400: string;
24
+ 500: string;
25
+ 600: string;
26
+ 700: string;
27
+ 800: string;
28
+ 900: string;
29
+ 950: string;
30
+ };
31
+ pink: {
32
+ 50: string;
33
+ 100: string;
34
+ 200: string;
35
+ 300: string;
36
+ 400: string;
37
+ 500: string;
38
+ 600: string;
39
+ 700: string;
40
+ 800: string;
41
+ 900: string;
42
+ 950: string;
43
+ };
44
+ fuchsia: {
45
+ 50: string;
46
+ 100: string;
47
+ 200: string;
48
+ 300: string;
49
+ 400: string;
50
+ 500: string;
51
+ 600: string;
52
+ 700: string;
53
+ 800: string;
54
+ 900: string;
55
+ 950: string;
56
+ };
57
+ purple: {
58
+ 50: string;
59
+ 100: string;
60
+ 200: string;
61
+ 300: string;
62
+ 400: string;
63
+ 500: string;
64
+ 600: string;
65
+ 700: string;
66
+ 800: string;
67
+ 900: string;
68
+ 950: string;
69
+ };
70
+ violet: {
71
+ 50: string;
72
+ 100: string;
73
+ 200: string;
74
+ 300: string;
75
+ 400: string;
76
+ 500: string;
77
+ 600: string;
78
+ 700: string;
79
+ 800: string;
80
+ 900: string;
81
+ 950: string;
82
+ };
83
+ indigo: {
84
+ 50: string;
85
+ 100: string;
86
+ 200: string;
87
+ 300: string;
88
+ 400: string;
89
+ 500: string;
90
+ 600: string;
91
+ 700: string;
92
+ 800: string;
93
+ 900: string;
94
+ 950: string;
95
+ };
96
+ blue: {
97
+ 50: string;
98
+ 100: string;
99
+ 200: string;
100
+ 300: string;
101
+ 400: string;
102
+ 500: string;
103
+ 600: string;
104
+ 700: string;
105
+ 800: string;
106
+ 900: string;
107
+ 950: string;
108
+ };
109
+ sky: {
110
+ 50: string;
111
+ 100: string;
112
+ 200: string;
113
+ 300: string;
114
+ 400: string;
115
+ 500: string;
116
+ 600: string;
117
+ 700: string;
118
+ 800: string;
119
+ 900: string;
120
+ 950: string;
121
+ };
122
+ cyan: {
123
+ 50: string;
124
+ 100: string;
125
+ 200: string;
126
+ 300: string;
127
+ 400: string;
128
+ 500: string;
129
+ 600: string;
130
+ 700: string;
131
+ 800: string;
132
+ 900: string;
133
+ 950: string;
134
+ };
135
+ teal: {
136
+ 50: string;
137
+ 100: string;
138
+ 200: string;
139
+ 300: string;
140
+ 400: string;
141
+ 500: string;
142
+ 600: string;
143
+ 700: string;
144
+ 800: string;
145
+ 900: string;
146
+ 950: string;
147
+ };
148
+ emerald: {
149
+ 50: string;
150
+ 100: string;
151
+ 200: string;
152
+ 300: string;
153
+ 400: string;
154
+ 500: string;
155
+ 600: string;
156
+ 700: string;
157
+ 800: string;
158
+ 900: string;
159
+ 950: string;
160
+ };
161
+ green: {
162
+ 50: string;
163
+ 100: string;
164
+ 200: string;
165
+ 300: string;
166
+ 400: string;
167
+ 500: string;
168
+ 600: string;
169
+ 700: string;
170
+ 800: string;
171
+ 900: string;
172
+ 950: string;
173
+ };
174
+ lime: {
175
+ 50: string;
176
+ 100: string;
177
+ 200: string;
178
+ 300: string;
179
+ 400: string;
180
+ 500: string;
181
+ 600: string;
182
+ 700: string;
183
+ 800: string;
184
+ 900: string;
185
+ 950: string;
186
+ };
187
+ yellow: {
188
+ 50: string;
189
+ 100: string;
190
+ 200: string;
191
+ 300: string;
192
+ 400: string;
193
+ 500: string;
194
+ 600: string;
195
+ 700: string;
196
+ 800: string;
197
+ 900: string;
198
+ 950: string;
199
+ };
200
+ amber: {
201
+ 50: string;
202
+ 100: string;
203
+ 200: string;
204
+ 300: string;
205
+ 400: string;
206
+ 500: string;
207
+ 600: string;
208
+ 700: string;
209
+ 800: string;
210
+ 900: string;
211
+ 950: string;
212
+ };
213
+ orange: {
214
+ 50: string;
215
+ 100: string;
216
+ 200: string;
217
+ 300: string;
218
+ 400: string;
219
+ 500: string;
220
+ 600: string;
221
+ 700: string;
222
+ 800: string;
223
+ 900: string;
224
+ 950: string;
225
+ };
226
+ red: {
227
+ 50: string;
228
+ 100: string;
229
+ 200: string;
230
+ 300: string;
231
+ 400: string;
232
+ 500: string;
233
+ 600: string;
234
+ 700: string;
235
+ 800: string;
236
+ 900: string;
237
+ 950: string;
238
+ };
239
+ gray: {
240
+ 50: string;
241
+ 100: string;
242
+ 200: string;
243
+ 300: string;
244
+ 400: string;
245
+ 500: string;
246
+ 600: string;
247
+ 700: string;
248
+ 800: string;
249
+ 900: string;
250
+ 950: string;
251
+ };
252
+ slate: {
253
+ 50: string;
254
+ 100: string;
255
+ 200: string;
256
+ 300: string;
257
+ 400: string;
258
+ 500: string;
259
+ 600: string;
260
+ 700: string;
261
+ 800: string;
262
+ 900: string;
263
+ 950: string;
264
+ };
265
+ zinc: {
266
+ 50: string;
267
+ 100: string;
268
+ 200: string;
269
+ 300: string;
270
+ 400: string;
271
+ 500: string;
272
+ 600: string;
273
+ 700: string;
274
+ 800: string;
275
+ 900: string;
276
+ 950: string;
277
+ };
278
+ neutral: {
279
+ 50: string;
280
+ 100: string;
281
+ 200: string;
282
+ 300: string;
283
+ 400: string;
284
+ 500: string;
285
+ 600: string;
286
+ 700: string;
287
+ 800: string;
288
+ 900: string;
289
+ 950: string;
290
+ };
291
+ stone: {
292
+ 50: string;
293
+ 100: string;
294
+ 200: string;
295
+ 300: string;
296
+ 400: string;
297
+ 500: string;
298
+ 600: string;
299
+ 700: string;
300
+ 800: string;
301
+ 900: string;
302
+ 950: string;
303
+ };
304
+ light: {
305
+ 50: string;
306
+ 100: string;
307
+ 200: string;
308
+ 300: string;
309
+ 400: string;
310
+ 500: string;
311
+ 600: string;
312
+ 700: string;
313
+ 800: string;
314
+ 900: string;
315
+ 950: string;
316
+ };
317
+ dark: {
318
+ 50: string;
319
+ 100: string;
320
+ 200: string;
321
+ 300: string;
322
+ 400: string;
323
+ 500: string;
324
+ 600: string;
325
+ 700: string;
326
+ 800: string;
327
+ 900: string;
328
+ 950: string;
329
+ };
330
+ readonly lightblue: string | (Colors & {
331
+ DEFAULT?: string;
332
+ });
333
+ readonly lightBlue: string | (Colors & {
334
+ DEFAULT?: string;
335
+ });
336
+ readonly warmgray: string | (Colors & {
337
+ DEFAULT?: string;
338
+ });
339
+ readonly warmGray: string | (Colors & {
340
+ DEFAULT?: string;
341
+ });
342
+ readonly truegray: string | (Colors & {
343
+ DEFAULT?: string;
344
+ });
345
+ readonly trueGray: string | (Colors & {
346
+ DEFAULT?: string;
347
+ });
348
+ readonly coolgray: string | (Colors & {
349
+ DEFAULT?: string;
350
+ });
351
+ readonly coolGray: string | (Colors & {
352
+ DEFAULT?: string;
353
+ });
354
+ readonly bluegray: string | (Colors & {
355
+ DEFAULT?: string;
356
+ });
357
+ readonly blueGray: string | (Colors & {
358
+ DEFAULT?: string;
359
+ });
360
+ };
361
+ //#endregion
362
+ export { colors };
package/dist/colors.mjs CHANGED
@@ -1 +1,3 @@
1
- export * from '@unocss/preset-mini/colors';
1
+ export * from "@unocss/preset-mini/colors"
2
+
3
+ export { };
@@ -0,0 +1,54 @@
1
+ import { isString } from "@unocss/core";
2
+ import { resolveBreakpoints } from "@unocss/preset-mini/utils";
3
+
4
+ //#region src/rules/container.ts
5
+ const queryMatcher = /@media \(min-width: (.+)\)/;
6
+ const container = [[
7
+ /^__container$/,
8
+ (m, context) => {
9
+ const { theme, variantHandlers } = context;
10
+ const themePadding = theme.container?.padding;
11
+ let padding;
12
+ if (isString(themePadding)) padding = themePadding;
13
+ else padding = themePadding?.DEFAULT;
14
+ const themeMaxWidth = theme.container?.maxWidth;
15
+ let maxWidth;
16
+ for (const v of variantHandlers) {
17
+ const query = v.handle?.({}, (x) => x)?.parent;
18
+ if (isString(query)) {
19
+ const match = query.match(queryMatcher)?.[1];
20
+ if (match) {
21
+ const matchBp = (resolveBreakpoints(context) ?? []).find((i) => i.size === match)?.point;
22
+ if (!themeMaxWidth) maxWidth = match;
23
+ else if (matchBp) maxWidth = themeMaxWidth?.[matchBp];
24
+ if (matchBp && !isString(themePadding)) padding = themePadding?.[matchBp] ?? padding;
25
+ }
26
+ }
27
+ }
28
+ const css = { "max-width": maxWidth };
29
+ if (!variantHandlers.length) css.width = "100%";
30
+ if (theme.container?.center) {
31
+ css["margin-left"] = "auto";
32
+ css["margin-right"] = "auto";
33
+ }
34
+ if (themePadding) {
35
+ css["padding-left"] = padding;
36
+ css["padding-right"] = padding;
37
+ }
38
+ return css;
39
+ },
40
+ { internal: true }
41
+ ]];
42
+ const containerShortcuts = [[/^(?:(\w+)[:-])?container$/, ([, bp], context) => {
43
+ let points = (resolveBreakpoints(context) ?? []).map((i) => i.point);
44
+ if (bp) {
45
+ if (!points.includes(bp)) return;
46
+ points = points.slice(points.indexOf(bp));
47
+ }
48
+ const shortcuts = points.map((p) => `${p}:__container`);
49
+ if (!bp) shortcuts.unshift("__container");
50
+ return shortcuts;
51
+ }]];
52
+
53
+ //#endregion
54
+ export { containerShortcuts as n, container as t };
@@ -0,0 +1,57 @@
1
+ import * as _unocss_core0 from "@unocss/core";
2
+ import { Variant, VariantFunction, VariantObject } from "@unocss/core";
3
+ import * as _unocss_preset_mini0 from "@unocss/preset-mini";
4
+ import { PresetMiniOptions, Theme as Theme$1, colors, preflights } from "@unocss/preset-mini";
5
+
6
+ //#region src/variants/combinators.d.ts
7
+ declare const variantCombinators: Variant[];
8
+ //#endregion
9
+ //#region src/variants/dark.d.ts
10
+ declare const variantColorsScheme: Variant[];
11
+ //#endregion
12
+ //#region src/variants/default.d.ts
13
+ declare function variants(options: PresetWind3Options): Variant<Theme$1>[];
14
+ //#endregion
15
+ //#region src/variants/media.d.ts
16
+ declare const variantContrasts: Variant[];
17
+ declare const variantMotions: Variant[];
18
+ declare const variantOrientations: Variant[];
19
+ //#endregion
20
+ //#region src/variants/misc.d.ts
21
+ declare const variantSpaceAndDivide: Variant;
22
+ declare const variantStickyHover: Variant[];
23
+ //#endregion
24
+ //#region src/variants/mix.d.ts
25
+ /**
26
+ * Shade the color if the weight is positive, tint the color otherwise.
27
+ * Shading mixes the color with black, Tinting mixes the color with white.
28
+ * @see {@link mixColor}
29
+ */
30
+ declare function variantColorMix<Theme$2 extends object>(): VariantObject<Theme$2>;
31
+ //#endregion
32
+ //#region src/variants/placeholder.d.ts
33
+ declare const placeholderModifier: VariantFunction;
34
+ //#endregion
35
+ //#region src/index.d.ts
36
+ interface PresetWind3Options extends PresetMiniOptions {
37
+ /**
38
+ * The important option lets you control whether UnoCSS’s utilities should be marked with `!important`.
39
+ *
40
+ * This can be really useful when using UnoCSS with existing CSS that has high specificity selectors.
41
+ *
42
+ * You can also set `important` to a selector like `#app` instead, which will generate `#app :is(.m-1) { ... }`
43
+ *
44
+ * Also check out the compatibility with [:is()](https://caniuse.com/?search=%3Ais())
45
+ *
46
+ * @default false
47
+ */
48
+ important?: boolean | string;
49
+ }
50
+ /**
51
+ * The Tailwind CSS v3 / Windi CSS compact preset for UnoCSS.
52
+ *
53
+ * @see https://unocss.dev/presets/wind3
54
+ */
55
+ declare const presetWind3: _unocss_core0.PresetFactory<_unocss_preset_mini0.Theme, PresetWind3Options>;
56
+ //#endregion
57
+ export { presetWind3 as a, variantSpaceAndDivide as c, variantMotions as d, variantOrientations as f, variantCombinators as h, preflights as i, variantStickyHover as l, variantColorsScheme as m, Theme$1 as n, placeholderModifier as o, variants as p, colors as r, variantColorMix as s, PresetWind3Options as t, variantContrasts as u };
package/dist/index.d.mts CHANGED
@@ -1,34 +1,5 @@
1
- import * as _unocss_core from '@unocss/core';
2
- import { Variant } from '@unocss/core';
3
- import * as _unocss_preset_mini from '@unocss/preset-mini';
4
- import { Theme, PresetMiniOptions } from '@unocss/preset-mini';
5
- export { Theme, colors, preflights } from '@unocss/preset-mini';
6
- export { shortcuts } from './shortcuts.mjs';
7
- export { theme } from './theme.mjs';
8
- export { r as rules } from './shared/preset-wind3.DRADYSMV.mjs';
9
-
10
- declare function variants(options: PresetWind3Options): Variant<Theme>[];
11
-
12
- interface PresetWind3Options extends PresetMiniOptions {
13
- /**
14
- * The important option lets you control whether UnoCSS’s utilities should be marked with `!important`.
15
- *
16
- * This can be really useful when using UnoCSS with existing CSS that has high specificity selectors.
17
- *
18
- * You can also set `important` to a selector like `#app` instead, which will generate `#app :is(.m-1) { ... }`
19
- *
20
- * Also check out the compatibility with [:is()](https://caniuse.com/?search=%3Ais())
21
- *
22
- * @default false
23
- */
24
- important?: boolean | string;
25
- }
26
- /**
27
- * The Tailwind CSS v3 / Windi CSS compact preset for UnoCSS.
28
- *
29
- * @see https://unocss.dev/presets/wind3
30
- */
31
- declare const presetWind3: _unocss_core.PresetFactory<_unocss_preset_mini.Theme, PresetWind3Options>;
32
-
33
- export { presetWind3 as default, presetWind3 as presetWind, presetWind3, variants };
34
- export type { PresetWind3Options };
1
+ import { O as rules } from "./rules-Dd5IWQsx.mjs";
2
+ import { t as shortcuts } from "./shortcuts-DRxVPoH8.mjs";
3
+ import { t as theme } from "./theme-D8rOP0iB.mjs";
4
+ import { a as presetWind3, i as preflights, n as Theme, p as variants, r as colors, t as PresetWind3Options } from "./index-hA29nYTP.mjs";
5
+ export { PresetWind3Options, Theme, colors, presetWind3 as default, presetWind3 as presetWind, presetWind3, preflights, rules, shortcuts, theme, variants };
package/dist/index.mjs CHANGED
@@ -1,59 +1,53 @@
1
- import { toArray, definePreset } from '@unocss/core';
2
- import presetMini, { presetMini as presetMini$1 } from '@unocss/preset-mini';
3
- export { colors, preflights } from '@unocss/preset-mini';
4
- import { shortcuts } from './shortcuts.mjs';
5
- import { theme } from './theme.mjs';
6
- import { b as variants } from './shared/preset-wind3.DIaVUBWk.mjs';
7
- import { r as rules } from './shared/preset-wind3.B6YTuXU2.mjs';
8
- import './shared/preset-wind3.BzmnsdqZ.mjs';
9
- import '@unocss/preset-mini/utils';
10
- import '@unocss/preset-mini/rules';
11
- import '@unocss/preset-mini/theme';
12
- import './shared/preset-wind3.DjKJQ_OR.mjs';
13
- import '@unocss/preset-mini/variants';
14
- import '@unocss/rule-utils';
1
+ import { rules } from "./rules.mjs";
2
+ import { shortcuts } from "./shortcuts.mjs";
3
+ import { theme } from "./theme.mjs";
4
+ import { variants } from "./variants.mjs";
5
+ import { definePreset, toArray } from "@unocss/core";
6
+ import presetMini$1, { colors, preflights, presetMini } from "@unocss/preset-mini";
15
7
 
8
+ //#region src/postprocessors/important.ts
16
9
  function important(option) {
17
- if (option == null || option === false)
18
- return [];
19
- const wrapWithIs = (selector) => {
20
- if (selector.startsWith(":is(") && selector.endsWith(")"))
21
- return selector;
22
- if (selector.includes("::"))
23
- return selector.replace(/(.*?)((?:\s\*)?::.*)/, ":is($1)$2");
24
- return `:is(${selector})`;
25
- };
26
- return [
27
- option === true ? (util) => {
28
- util.entries.forEach((i) => {
29
- if (i[1] != null && !String(i[1]).endsWith("!important"))
30
- i[1] += " !important";
31
- });
32
- } : (util) => {
33
- if (!util.selector.startsWith(option))
34
- util.selector = `${option} ${wrapWithIs(util.selector)}`;
35
- }
36
- ];
10
+ if (option == null || option === false) return [];
11
+ const wrapWithIs = (selector) => {
12
+ if (selector.startsWith(":is(") && selector.endsWith(")")) return selector;
13
+ if (selector.includes("::")) return selector.replace(/(.*?)((?:\s\*)?::.*)/, ":is($1)$2");
14
+ return `:is(${selector})`;
15
+ };
16
+ return [option === true ? (util) => {
17
+ util.entries.forEach((i) => {
18
+ if (i[1] != null && !String(i[1]).endsWith("!important")) i[1] += " !important";
19
+ });
20
+ } : (util) => {
21
+ if (!util.selector.startsWith(option)) util.selector = `${option} ${wrapWithIs(util.selector)}`;
22
+ }];
37
23
  }
38
24
 
25
+ //#endregion
26
+ //#region src/postprocessors/default.ts
39
27
  function postprocessors(options) {
40
- return [
41
- ...toArray(presetMini(options).postprocess),
42
- ...important(options.important)
43
- ];
28
+ return [...toArray(presetMini$1(options).postprocess), ...important(options.important)];
44
29
  }
45
30
 
31
+ //#endregion
32
+ //#region src/index.ts
33
+ /**
34
+ * The Tailwind CSS v3 / Windi CSS compact preset for UnoCSS.
35
+ *
36
+ * @see https://unocss.dev/presets/wind3
37
+ */
46
38
  const presetWind3 = definePreset((options = {}) => {
47
- options.important = options.important ?? false;
48
- return {
49
- ...presetMini$1(options),
50
- name: "@unocss/preset-wind3",
51
- theme,
52
- rules,
53
- shortcuts,
54
- variants: variants(options),
55
- postprocess: postprocessors(options)
56
- };
39
+ options.important = options.important ?? false;
40
+ return {
41
+ ...presetMini(options),
42
+ name: "@unocss/preset-wind3",
43
+ theme,
44
+ rules,
45
+ shortcuts,
46
+ variants: variants(options),
47
+ postprocess: postprocessors(options)
48
+ };
57
49
  });
50
+ var src_default = presetWind3;
58
51
 
59
- export { presetWind3 as default, presetWind3 as presetWind, presetWind3, rules, shortcuts, theme, variants };
52
+ //#endregion
53
+ export { colors, src_default as default, preflights, presetWind3 as presetWind, presetWind3, rules, shortcuts, theme, variants };