Skip to content

Releases: adobe/leonardo

@adobe/[email protected]

15 Mar 19:08
Compare
Choose a tag to compare

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]

20 Aug 20:51
Compare
Choose a tag to compare
Pre-release

✨ 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, and generateAdaptiveTheme functions with new classes
  • Added classes Color, BackgroundColor, and Theme
  • Renamed fixColorVaue to convertColorValue since the function name did not match what it does.
  • Renamed binarySearch to getMatchingRatioIndex 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