@unocss/preset-mini 0.55.0 → 0.55.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.
Files changed (56) hide show
  1. package/dist/colors.cjs +360 -6
  2. package/dist/{colors-dabdd21f.d.ts → colors.d.cts} +3 -2
  3. package/dist/colors.d.mts +354 -0
  4. package/dist/colors.d.ts +353 -2
  5. package/dist/colors.mjs +361 -1
  6. package/dist/index.cjs +12 -12
  7. package/dist/index.d.cts +69 -0
  8. package/dist/index.d.mts +69 -0
  9. package/dist/index.d.ts +6 -6
  10. package/dist/index.mjs +9 -10
  11. package/dist/rules.cjs +928 -48
  12. package/dist/rules.d.cts +133 -0
  13. package/dist/rules.d.mts +133 -0
  14. package/dist/rules.d.ts +1 -1
  15. package/dist/rules.mjs +891 -4
  16. package/dist/{default-1f25a0ae.d.ts → shared/preset-mini.024bdcea.d.ts} +1 -1
  17. package/dist/shared/preset-mini.0a9763df.d.mts +721 -0
  18. package/dist/shared/preset-mini.0fac4963.mjs +320 -0
  19. package/dist/shared/preset-mini.5bfee53b.cjs +344 -0
  20. package/dist/shared/preset-mini.5f54784f.d.mts +71 -0
  21. package/dist/shared/preset-mini.5f54784f.d.ts +71 -0
  22. package/dist/shared/preset-mini.aa3a264b.d.cts +67 -0
  23. package/dist/shared/{preset-mini.a21c5071.cjs → preset-mini.b4ad509c.cjs} +12 -8
  24. package/dist/shared/preset-mini.d69a12a5.d.cts +721 -0
  25. package/dist/{utilities-d496540e.d.ts → shared/preset-mini.e93c20db.d.ts} +1 -1
  26. package/dist/shared/{preset-mini.6c1c8016.mjs → preset-mini.f1fe435e.mjs} +13 -9
  27. package/dist/shared/preset-mini.fc26b619.d.mts +67 -0
  28. package/dist/theme.cjs +308 -34
  29. package/dist/theme.d.cts +264 -0
  30. package/dist/theme.d.mts +264 -0
  31. package/dist/theme.d.ts +5 -5
  32. package/dist/theme.mjs +284 -4
  33. package/dist/utils.cjs +81 -10
  34. package/dist/utils.d.cts +83 -0
  35. package/dist/utils.d.mts +83 -0
  36. package/dist/utils.d.ts +18 -18
  37. package/dist/utils.mjs +81 -3
  38. package/dist/variants.cjs +737 -33
  39. package/dist/variants.d.cts +46 -0
  40. package/dist/variants.d.mts +46 -0
  41. package/dist/variants.d.ts +4 -4
  42. package/dist/variants.mjs +714 -4
  43. package/package.json +3 -3
  44. package/dist/shared/preset-mini.0131b915.mjs +0 -704
  45. package/dist/shared/preset-mini.1c66bf79.mjs +0 -361
  46. package/dist/shared/preset-mini.74f9d55e.mjs +0 -80
  47. package/dist/shared/preset-mini.811eb23d.mjs +0 -681
  48. package/dist/shared/preset-mini.8dd73081.mjs +0 -452
  49. package/dist/shared/preset-mini.9d93761b.cjs +0 -729
  50. package/dist/shared/preset-mini.b8d9397e.cjs +0 -471
  51. package/dist/shared/preset-mini.ce5169f2.cjs +0 -730
  52. package/dist/shared/preset-mini.d778b487.cjs +0 -85
  53. package/dist/shared/preset-mini.de3bd9f7.mjs +0 -284
  54. package/dist/shared/preset-mini.e078d7da.cjs +0 -313
  55. package/dist/shared/preset-mini.f3fc54d2.cjs +0 -363
  56. /package/dist/{types-d991ba46.d.ts → shared/preset-mini.5f54784f.d.cts} +0 -0
package/dist/utils.mjs CHANGED
@@ -1,3 +1,81 @@
1
- export { C as CONTROL_MINI_NO_NEGATIVE, f as colorOpacityToString, c as colorResolver, e as colorToString, j as colorableShadows, b as cornerMap, d as directionMap, o as directionSize, q as getBracket, t as getComponent, z as getComponents, g as globalKeywords, h, w as handler, a as hasParseableColor, u as hex2rgba, i as insetMap, m as makeGlobalStaticRules, p as parseColor, v as parseCssColor, k as positionMap, l as resolveBreakpoints, r as resolveVerticalBreakpoints, s as splitShorthand, y as valueHandlers, x as xyzMap } from './shared/preset-mini.6c1c8016.mjs';
2
- export { a as variantGetBracket, v as variantGetParameter, b as variantMatcher, c as variantParentMatcher } from './shared/preset-mini.74f9d55e.mjs';
3
- import '@unocss/core';
1
+ import { e as getBracket } from './shared/preset-mini.f1fe435e.mjs';
2
+ export { C as CONTROL_MINI_NO_NEGATIVE, j as colorOpacityToString, c as colorResolver, k as colorToString, b as colorableShadows, o as cornerMap, l as directionMap, r as directionSize, w as getComponent, y as getComponents, g as globalKeywords, h, q as handler, a as hasParseableColor, f as hex2rgba, n as insetMap, m as makeGlobalStaticRules, p as parseColor, i as parseCssColor, d as positionMap, t as resolveBreakpoints, u as resolveVerticalBreakpoints, s as splitShorthand, v as valueHandlers, x as xyzMap } from './shared/preset-mini.f1fe435e.mjs';
3
+ import { escapeRegExp } from '@unocss/core';
4
+
5
+ function variantMatcher(name, handler) {
6
+ let re;
7
+ return {
8
+ name,
9
+ match(input, ctx) {
10
+ if (!re)
11
+ re = new RegExp(`^${escapeRegExp(name)}(?:${ctx.generator.config.separators.join("|")})`);
12
+ const match = input.match(re);
13
+ if (match) {
14
+ return {
15
+ matcher: input.slice(match[0].length),
16
+ handle: (input2, next) => next({
17
+ ...input2,
18
+ ...handler(input2)
19
+ })
20
+ };
21
+ }
22
+ },
23
+ autocomplete: `${name}:`
24
+ };
25
+ }
26
+ function variantParentMatcher(name, parent) {
27
+ let re;
28
+ return {
29
+ name,
30
+ match(input, ctx) {
31
+ if (!re)
32
+ re = new RegExp(`^${escapeRegExp(name)}(?:${ctx.generator.config.separators.join("|")})`);
33
+ const match = input.match(re);
34
+ if (match) {
35
+ return {
36
+ matcher: input.slice(match[0].length),
37
+ handle: (input2, next) => next({
38
+ ...input2,
39
+ parent: `${input2.parent ? `${input2.parent} $$ ` : ""}${parent}`
40
+ })
41
+ };
42
+ }
43
+ },
44
+ autocomplete: `${name}:`
45
+ };
46
+ }
47
+ function variantGetBracket(prefix, matcher, separators) {
48
+ if (matcher.startsWith(`${prefix}[`)) {
49
+ const [match, rest] = getBracket(matcher.slice(prefix.length), "[", "]") ?? [];
50
+ if (match && rest) {
51
+ for (const separator of separators) {
52
+ if (rest.startsWith(separator))
53
+ return [match, rest.slice(separator.length), separator];
54
+ }
55
+ return [match, rest, ""];
56
+ }
57
+ }
58
+ }
59
+ function variantGetParameter(prefix, matcher, separators) {
60
+ if (matcher.startsWith(prefix)) {
61
+ const body = variantGetBracket(prefix, matcher, separators);
62
+ if (body) {
63
+ const [label = "", rest = body[1]] = variantGetParameter("/", body[1], separators) ?? [];
64
+ return [body[0], rest, label];
65
+ }
66
+ for (const separator of separators.filter((x) => x !== "/")) {
67
+ const pos = matcher.indexOf(separator, prefix.length);
68
+ if (pos !== -1) {
69
+ const labelPos = matcher.indexOf("/", prefix.length);
70
+ const unlabelled = labelPos === -1 || pos <= labelPos;
71
+ return [
72
+ matcher.slice(prefix.length, unlabelled ? pos : labelPos),
73
+ matcher.slice(pos + separator.length),
74
+ unlabelled ? "" : matcher.slice(labelPos + 1, pos)
75
+ ];
76
+ }
77
+ }
78
+ }
79
+ }
80
+
81
+ export { getBracket, variantGetBracket, variantGetParameter, variantMatcher, variantParentMatcher };