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/gradientsimplementations were removed. - Gradient classes now follow the new naming style:
GradientLinearGradientRadialGradientDiamondGradientConicGradientMesh
- Public usage should prefer
parse()andtransformTo()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.