Releases: adobe/leonardo
Releases · adobe/leonardo
@adobe/[email protected]
Changes
- 342c9ca: Migrated from Lerna to Moon for monorepo management.
- Setting up Changeset for release management
- Setting up automated releases on NPM
- Migrate from Jest to Ava for better module support
Graduated from alpha.
@adobe/[email protected]
✨ Refactored core functions into Classes ✨
Class functions allow us to generate color scales only when necessary, such as when key colors or interpolation space change. Previously, these scales would regenerate when any parameter is changed. When using "smooth" interpolation, this dramatically slows down color output.
This architecture makes modification to a theme more performant in that you can set parameters that only affect their dependent functionality, rather than re-running the entire generateAdaptiveTheme
function any time a change is made. This particularly is useful when setting lightness or the contrast of your theme.
This release includes:
- Replaced
generateContrastColors
,generateBaseScale
, andgenerateAdaptiveTheme
functions with new classes - Added classes
Color
,BackgroundColor
, andTheme
- Renamed
fixColorVaue
toconvertColorValue
since the function name did not match what it does. - Renamed
binarySearch
togetMatchingRatioIndex
since the function is more than just a binary search and specific to finding a matching ratio's index - Enhanced
getMatchingRatioIndex
to find next highest contrast value for positive contrasts and next smallest value for negative contrasts.
For more detail see PR #110