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