Skip to content

Commit

Permalink
Merge pull request #105 from prjctimg/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
prjctimg authored Jan 9, 2024
2 parents 4cbe5c9 + 4cc5107 commit befbe00
Show file tree
Hide file tree
Showing 218 changed files with 30,544 additions and 3,434 deletions.
1 change: 0 additions & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

git add . && npm run lint



2 changes: 1 addition & 1 deletion .husky/pre-push
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
. "$(dirname -- "$0")/_/husky.sh"

# We cant push code that doesn't build.
npm test && npm run format
# npm run format
28 changes: 21 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,25 +32,39 @@ All utilities guarded to convert all input to hex
Added better type definitions for richer IntelliSense in the editor
Changed docs to docsify

### 1.8.0 (stable)
### 1.7.9 (unstable)

- Fully treeshakable
- Core-utils directory was split to submodules.
- Added the `load()` utility to create read-manipulate-output chain with all the utilities that take a collection of colos as first input. The chain is lazy.
- Added the Color class which is aliased as `color()` which has all the utilities that take a color as the first argument bound to its prototype as methods. Calling color() simply calls `new IColor()` under the hood.
- Added the `toHex` utility which parses all known color tokens similar to chroma-js
- Added the Color class which is aliased as `color()` which has all the utilities that take a color as the first argument bound to its prototype as methods. Calling color() simply calls `new Color()` under the hood.
- Added the `toHex` utility which parses all known color tokens similar to chroma-js `chroma()` constructor.
- Eliminated dependancy on lodash.
- Used treeshaken Culori modules to reduce bundle size. Only 20KB when minified!
- Created the `fp` directory with helper functions used in the library grouped by input type.
- More modular codebase
- Simplified code to make it more readable and easier to understand for other developers who may want to contribute
Over 50 utilities in the API now!
- All palette functions have easings for internal computations
- All palette functions (generators) have easing function support.
Updated the docs!
- Improved the accuracy of temperature based utilities.
- Rewrote the type declarations to make them simpler and more generic.
- All palette functions now take an optional overrides object to fine tune parameters like easing methods, fixups etc.
- Temperature utilities are marked as experiental until a more effecient way of predicting color temperature is discovered
- Rewrote the README and CONTRIBUTING. Added missing licenses for borrowed code.

### 1.79.91 (stable)

- Deprecated temperature based utilities due to inconsistent results.
- Rewrote the type declarations to make them simpler and more generic.
- Lightness and chroma channels are now normalized against passed in extremums in the filtering utilities.
- `toHex` now supports RGB channel in the [0,255] range and [0,1] as well. Values above 1 are normalized using a simple formula. `ch / 255`.
- Removed unnecessary submodules and joined them into grouped modules
- Added Typedoc as the documentation generator of choice.
- New simpler docs writen in GFM.
- Added `getNearestColor` which uses the differenceHyab metric to get the nearest color against a collection.
- Collection based utilities that took arrays of colors are now generic! If an object is passed its keys are passsed as an index and the values are treated as valid color tokens. Objects can only have a depth of 1 ie nested properties are not supported (yet).
- Added color vision deficiency simulation support (stable)
- Added a ColorArray class that has all collection based methods on its prototype as methods. The chain is lazy and requires `output()` to be called to retun the final result. Its aliased as `load()` which simply wraps around the class and invoking a new instance under the hood.
-Added some notes to the docs explaining how some of the utilities work as well as other behaviours of the library.
- Slimmer bundle size.
- Fixed import errors. The library is now fully ESM with a UMD build for CDN and minified version for browser.
- Added support for more uniform colorspaces in hueShift. Jch is currently unsupported because of lightness mapping issues. Support is coming soon though.
- Removed cyclic dependencies that caused a stackoverflow error.
Loading

0 comments on commit befbe00

Please sign in to comment.