windrunner 1.1.3 → 1.1.4

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/react.js CHANGED
@@ -53,14 +53,14 @@ var theme = {
53
53
  backgroundColor: ({ theme: theme2 }) => theme2("colors"),
54
54
  backgroundImage: {
55
55
  none: "none",
56
- "linear-to-t": "linear-gradient(to top, var(--tw-gradient-stops))",
57
- "linear-to-tr": "linear-gradient(to top right, var(--tw-gradient-stops))",
58
- "linear-to-r": "linear-gradient(to right, var(--tw-gradient-stops))",
59
- "linear-to-br": "linear-gradient(to bottom right, var(--tw-gradient-stops))",
60
- "linear-to-b": "linear-gradient(to bottom, var(--tw-gradient-stops))",
61
- "linear-to-bl": "linear-gradient(to bottom left, var(--tw-gradient-stops))",
62
- "linear-to-l": "linear-gradient(to left, var(--tw-gradient-stops))",
63
- "linear-to-tl": "linear-gradient(to top left, var(--tw-gradient-stops))"
56
+ "gradient-to-t": "linear-gradient(to top, var(--tw-gradient-stops))",
57
+ "gradient-to-tr": "linear-gradient(to top right, var(--tw-gradient-stops))",
58
+ "gradient-to-r": "linear-gradient(to right, var(--tw-gradient-stops))",
59
+ "gradient-to-br": "linear-gradient(to bottom right, var(--tw-gradient-stops))",
60
+ "gradient-to-b": "linear-gradient(to bottom, var(--tw-gradient-stops))",
61
+ "gradient-to-bl": "linear-gradient(to bottom left, var(--tw-gradient-stops))",
62
+ "gradient-to-l": "linear-gradient(to left, var(--tw-gradient-stops))",
63
+ "gradient-to-tl": "linear-gradient(to top left, var(--tw-gradient-stops))"
64
64
  },
65
65
  backgroundPosition: {
66
66
  bottom: "bottom",
@@ -2795,23 +2795,33 @@ function buildGradientDeclaration(baseToken, theme2) {
2795
2795
  const colors = theme2.gradientColorStops || theme2.colors || {};
2796
2796
  if (baseToken.startsWith("from-")) {
2797
2797
  const key = baseToken.slice(5);
2798
- if (key.endsWith("%")) return `--tw-gradient-from-position: ${key};`;
2798
+ if (key.endsWith("%") || /^\d+$/.test(key)) {
2799
+ return `--tw-gradient-from-position: ${key.endsWith("%") ? key : key + "%"};`;
2800
+ }
2799
2801
  const color = resolveColorWithOpacity(colors, key);
2800
2802
  if (color !== void 0) {
2801
- return `--tw-gradient-from: ${color}; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-via, transparent), var(--tw-gradient-to, transparent);`;
2803
+ return `--tw-gradient-from: ${color} var(--tw-gradient-from-position, 0%); --tw-gradient-to: transparent var(--tw-gradient-to-position, 100%); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);`;
2802
2804
  }
2803
2805
  }
2804
2806
  if (baseToken.startsWith("via-")) {
2805
2807
  const key = baseToken.slice(4);
2806
- if (key.endsWith("%")) return `--tw-gradient-via-position: ${key};`;
2808
+ if (key.endsWith("%") || /^\d+$/.test(key)) {
2809
+ return `--tw-gradient-via-position: ${key.endsWith("%") ? key : key + "%"};`;
2810
+ }
2807
2811
  const color = resolveColorWithOpacity(colors, key);
2808
- if (color !== void 0) return `--tw-gradient-via: ${color};`;
2812
+ if (color !== void 0) {
2813
+ return `--tw-gradient-to: transparent var(--tw-gradient-to-position, 100%); --tw-gradient-stops: var(--tw-gradient-from), ${color} var(--tw-gradient-via-position, 50%), var(--tw-gradient-to);`;
2814
+ }
2809
2815
  }
2810
2816
  if (baseToken.startsWith("to-")) {
2811
2817
  const key = baseToken.slice(3);
2812
- if (key.endsWith("%")) return `--tw-gradient-to-position: ${key};`;
2818
+ if (key.endsWith("%") || /^\d+$/.test(key)) {
2819
+ return `--tw-gradient-to-position: ${key.endsWith("%") ? key : key + "%"};`;
2820
+ }
2813
2821
  const color = resolveColorWithOpacity(colors, key);
2814
- if (color !== void 0) return `--tw-gradient-to: ${color};`;
2822
+ if (color !== void 0) {
2823
+ return `--tw-gradient-to: ${color} var(--tw-gradient-to-position, 100%);`;
2824
+ }
2815
2825
  }
2816
2826
  return void 0;
2817
2827
  }