Skip to content

v3.0.0

Latest

Choose a tag to compare

@NiceArti NiceArti released this 07 Jun 21:53
· 5 commits to main since this release

Gradiente 3.0.0

gradiente 3.0 is a major refactor of the library core. This release replaces the old gradient classes with a new typed internal model, adds a cleaner public API, and improves renderer support across CSS, Canvas 2D, WebGL, and SVG.

Highlights

  • New gradient model under gradient/kind
  • New transformer system under gradient/transformer
  • Rebuilt Linear, Radial, Diamond, Conic, and Mesh gradient implementations
  • Improved mesh gradients with bicubic sampling and color interpolation
  • Better color hint handling across renderers
  • Reduced duplicated renderer logic with shared helpers
  • Updated tests for the new architecture

Breaking Changes

  • Old src/gradients implementations were removed.
  • Gradient classes now follow the new naming style:
    • GradientLinear
    • GradientRadial
    • GradientDiamond
    • GradientConic
    • GradientMesh
  • Public usage should prefer parse() and transformTo() instead of directly working with old class APIs.

Example

import { parse, transformTo } from 'gradiente'

const gradient = parse('linear-gradient(to right, red, blue)')
const css = transformTo('css', gradient)

Notes

This release is focused on making gradiente a stronger foundation for future renderer integrations, editors, and custom gradient tooling.