@rogieking/figui3 8.4.0 → 8.4.1

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 (3) hide show
  1. package/dist/fig.js +1 -1
  2. package/fig.js +9 -1
  3. package/package.json +1 -1
package/fig.js CHANGED
@@ -8741,7 +8741,15 @@ class FigInputFill extends HTMLElement {
8741
8741
  })
8742
8742
  .join(", ");
8743
8743
  const interpolation = gradientInterpolationClause(this.#gradient);
8744
- return `linear-gradient(${this.#gradient.angle}deg${interpolation ? ` ${interpolation}` : ""}, ${stops})`;
8744
+ const interpolationSuffix = interpolation ? ` ${interpolation}` : "";
8745
+ switch (this.#gradient.type) {
8746
+ case "radial":
8747
+ return `radial-gradient(circle${interpolationSuffix}, ${stops})`;
8748
+ case "angular":
8749
+ return `conic-gradient(from ${this.#gradient.angle}deg${interpolationSuffix}, ${stops})`;
8750
+ default:
8751
+ return `linear-gradient(${this.#gradient.angle}deg${interpolationSuffix}, ${stops})`;
8752
+ }
8745
8753
  }
8746
8754
  case "image":
8747
8755
  return this.#image.url ? `url(${this.#image.url})` : "#D9D9D9";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rogieking/figui3",
3
- "version": "8.4.0",
3
+ "version": "8.4.1",
4
4
  "description": "A lightweight web components library for building Figma plugin and widget UIs with native look and feel",
5
5
  "author": "Rogie King",
6
6
  "license": "MIT",