Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

Releases: adobe/leonardo

@adobe/[email protected]

18 Feb 01:24
ed980a1

Choose a tag to compare

Minor Changes

  • 7385295: Add colorSpace as the canonical property name and deprecate colorspace (non-breaking). The constructor, Theme.updateColor, and createScale() accept both names; colorSpace takes precedence. The old colorspace getter/setter remain as deprecated aliases and emit a console warning. TypeScript types include colorSpace and mark colorspace as @deprecated. Existing code continues to work.

@adobe/[email protected]

18 Feb 00:27
80ea5c1

Choose a tag to compare

Patch Changes

  • 35073e8: Upgrade chroma-js from ^2 to ^3 and hsluv from ^0.1 to ^1.0. The hsluv 1.0 class-based API is wrapped internally so the public interface is unchanged. Color output for HSLuv-interpolated scales may differ by a small precision amount due to updated interpolation in the new libraries.

@adobe/[email protected]

15 Mar 19:08

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

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