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/README.md CHANGED
@@ -30,9 +30,9 @@ npm install windrunner
30
30
  windrunner({ autoStart: true });
31
31
  </script>
32
32
 
33
- <div class="flex items-center gap-4 p-6 bg-blue-50 rounded-xl">
34
- <h1 class="text-2xl font-bold text-slate-900">Hello</h1>
35
- <button class="px-4 py-2 bg-blue-500 text-white rounded-lg hover:bg-blue-600 transition-colors duration-200">
33
+ <div class="flex items-center gap-4 p-6 bg-gradient-to-r from-blue-500 to-purple-600 rounded-xl">
34
+ <h1 class="text-2xl font-bold text-white">Hello Windrunner</h1>
35
+ <button class="px-4 py-2 bg-white text-blue-600 rounded-lg hover:bg-blue-50 transition-colors duration-200">
36
36
  Click me
37
37
  </button>
38
38
  </div>
@@ -42,7 +42,7 @@ npm install windrunner
42
42
 
43
43
  ```html
44
44
  <script type="module">
45
- import { windrunner } from "https://cdn.jsdelivr.net/npm/windrunner@1.1.2/dist/index.min.js";
45
+ import { windrunner } from "https://cdn.jsdelivr.net/npm/windrunner@latest/dist/index.min.js";
46
46
  windrunner({ autoStart: true });
47
47
  </script>
48
48
  ```
@@ -203,7 +203,7 @@ Full Tailwind v4 coverage including:
203
203
  - **Grid** — grid-cols/rows, col/row-span, grid-flow, auto-cols/rows, place-*
204
204
  - **Typography** — font-size, font-weight, line-height, letter-spacing, text-align, text-color, text-decoration, text-transform, text-overflow, whitespace, word-break, list-style
205
205
  - **Colors** — all OKLCH P3 Tailwind v4 palette + mauve/olive/mist/taupe, opacity modifier (`bg-blue-500/50`)
206
- - **Backgrounds** — bg-color, bg-linear-to-* (v4), gradient stops (from/via/to), bg-size/position/repeat/attachment/clip/origin
206
+ - **Backgrounds** — bg-color, bg-gradient-to-* with gradient stops (from/via/to), bg-size/position/repeat/attachment/clip/origin
207
207
  - **Borders** — border-width/style/color/radius (all sides + logical)
208
208
  - **Effects** — shadow, opacity, inset-shadow-* (v4), ring, inset-ring-* (v4)
209
209
  - **Transforms** — rotate, scale, translate (2D + 3D), skew, origin, perspective, backface, transform-style
package/dist/index.esm.js CHANGED
@@ -21,14 +21,14 @@ var theme = {
21
21
  backgroundColor: ({ theme: theme2 }) => theme2("colors"),
22
22
  backgroundImage: {
23
23
  none: "none",
24
- "linear-to-t": "linear-gradient(to top, var(--tw-gradient-stops))",
25
- "linear-to-tr": "linear-gradient(to top right, var(--tw-gradient-stops))",
26
- "linear-to-r": "linear-gradient(to right, var(--tw-gradient-stops))",
27
- "linear-to-br": "linear-gradient(to bottom right, var(--tw-gradient-stops))",
28
- "linear-to-b": "linear-gradient(to bottom, var(--tw-gradient-stops))",
29
- "linear-to-bl": "linear-gradient(to bottom left, var(--tw-gradient-stops))",
30
- "linear-to-l": "linear-gradient(to left, var(--tw-gradient-stops))",
31
- "linear-to-tl": "linear-gradient(to top left, var(--tw-gradient-stops))"
24
+ "gradient-to-t": "linear-gradient(to top, var(--tw-gradient-stops))",
25
+ "gradient-to-tr": "linear-gradient(to top right, var(--tw-gradient-stops))",
26
+ "gradient-to-r": "linear-gradient(to right, var(--tw-gradient-stops))",
27
+ "gradient-to-br": "linear-gradient(to bottom right, var(--tw-gradient-stops))",
28
+ "gradient-to-b": "linear-gradient(to bottom, var(--tw-gradient-stops))",
29
+ "gradient-to-bl": "linear-gradient(to bottom left, var(--tw-gradient-stops))",
30
+ "gradient-to-l": "linear-gradient(to left, var(--tw-gradient-stops))",
31
+ "gradient-to-tl": "linear-gradient(to top left, var(--tw-gradient-stops))"
32
32
  },
33
33
  backgroundPosition: {
34
34
  bottom: "bottom",
@@ -2763,23 +2763,33 @@ function buildGradientDeclaration(baseToken, theme2) {
2763
2763
  const colors = theme2.gradientColorStops || theme2.colors || {};
2764
2764
  if (baseToken.startsWith("from-")) {
2765
2765
  const key = baseToken.slice(5);
2766
- if (key.endsWith("%")) return `--tw-gradient-from-position: ${key};`;
2766
+ if (key.endsWith("%") || /^\d+$/.test(key)) {
2767
+ return `--tw-gradient-from-position: ${key.endsWith("%") ? key : key + "%"};`;
2768
+ }
2767
2769
  const color = resolveColorWithOpacity(colors, key);
2768
2770
  if (color !== void 0) {
2769
- return `--tw-gradient-from: ${color}; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-via, transparent), var(--tw-gradient-to, transparent);`;
2771
+ 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);`;
2770
2772
  }
2771
2773
  }
2772
2774
  if (baseToken.startsWith("via-")) {
2773
2775
  const key = baseToken.slice(4);
2774
- if (key.endsWith("%")) return `--tw-gradient-via-position: ${key};`;
2776
+ if (key.endsWith("%") || /^\d+$/.test(key)) {
2777
+ return `--tw-gradient-via-position: ${key.endsWith("%") ? key : key + "%"};`;
2778
+ }
2775
2779
  const color = resolveColorWithOpacity(colors, key);
2776
- if (color !== void 0) return `--tw-gradient-via: ${color};`;
2780
+ if (color !== void 0) {
2781
+ 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);`;
2782
+ }
2777
2783
  }
2778
2784
  if (baseToken.startsWith("to-")) {
2779
2785
  const key = baseToken.slice(3);
2780
- if (key.endsWith("%")) return `--tw-gradient-to-position: ${key};`;
2786
+ if (key.endsWith("%") || /^\d+$/.test(key)) {
2787
+ return `--tw-gradient-to-position: ${key.endsWith("%") ? key : key + "%"};`;
2788
+ }
2781
2789
  const color = resolveColorWithOpacity(colors, key);
2782
- if (color !== void 0) return `--tw-gradient-to: ${color};`;
2790
+ if (color !== void 0) {
2791
+ return `--tw-gradient-to: ${color} var(--tw-gradient-to-position, 100%);`;
2792
+ }
2783
2793
  }
2784
2794
  return void 0;
2785
2795
  }