Skip to content

Commit

Permalink
Merge pull request #106 from prjctimg/dev
Browse files Browse the repository at this point in the history
Release v1.79.94
  • Loading branch information
prjctimg authored Jan 13, 2024
2 parents 189fec4 + de6d3da commit 1c79c2c
Show file tree
Hide file tree
Showing 304 changed files with 38,301 additions and 5,431 deletions.
5 changes: 2 additions & 3 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
node_modules
dist
*.js
*.cjs
*.cjs

20 changes: 0 additions & 20 deletions .eslintrc.json

This file was deleted.

15 changes: 11 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,21 @@
/.pnp
.pnp.js

lodash-main
lessons-learnt-from-my-first-open-source-project.md
emoji.md
# testing

/temp
/color-thief
/coverage
/experimental
# next.js
/.next/
/out/

source/lib
# production
/build
/dist
lib

# misc
.DS_Store
Expand All @@ -40,5 +43,9 @@ debug.log
next-env.d.ts
/_site



app.js
*.code-worspace
*.code-worspace
/leonardo-main
source/lib
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@




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 run lint && npm run format
# npm run format
6 changes: 6 additions & 0 deletions .markdownlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"MD013": false,
"MD001": false,
"MD0026": true,
"MD0009": false
}
1 change: 0 additions & 1 deletion .prettierignore

This file was deleted.

9 changes: 0 additions & 9 deletions .prettierrc.json

This file was deleted.

9 changes: 9 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"recommendations": [
"github.vscode-pull-request-github",
"github.remotehub",
"ms-vscode.remote-repositories",
"esbenp.prettier-vscode",
"dbaeumer.vscode-eslint"
]
}
30 changes: 23 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,23 +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()` to create read-manipulate-output chains like the one presented by the `chroma()` constructor in chroma-js
- Added the `toHex` utility which parses all known color tokens similar to chroma-js
- 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 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.
- All palette functions now take an optional overrides object to fine tune parameters like easing methods, fixups etc.
- Added introduction guides to help users understand the project
- Rewrote the README and CONTRIBUTING. Added missing licenses for borrowed code.
Special thanks to our [contributors!]()

### 1.79.92

- 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.
33 changes: 16 additions & 17 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,28 @@
# Contributing
# Contributing👐🏾🤝

Thank you for empowering💪🏾🏋🏽‍♂️ open source by using our project! It's people like you that keep the software community thriving🌱 and relevant. Your contribution means a lot to us💙!

Our documentation site runs on NextJS and uses TailwindCSS for styling.

Thank you for empowering open source by using our project! It's people like you that keep the software community thriving and relevant. Your contribution means a lot to us!
## Getting started⛳


## Getting started

Assuming you already have Node installed on your machine run the following commands in your working directory:
Assuming you already have Node installed on your machine💻 run the following commands in your working directory📁:

```bash
# Creating our working directory
mkdir huetiful && cd huetiful

```

On this step its a matter of preference to either use git clone for cloning the repository. Personally, I prefer `npx degit` because it is simpler:
On this step its a matter of preference💁🏽‍♂️ to either use git clone for cloning the repository. Personally, I prefer `npx degit` because it is simpler:

```bash
# Cloning the repository. It will populate your current working directory with all the files in the repository
npx degit prjctimg:huetiful
npx degit prjctimg/huetiful

```

Install the necessary dependencies needed to setup the development environment and then run the build script to have the current builds added to a `dist/` folder
Install the necessary dependencies📦 needed to setup the development environment and then run the build👷🏾‍♂️ script to have the current builds added to a `dist/` folder

```bash
npm install --save-dev
Expand All @@ -32,18 +31,18 @@ npm run build

```

If you want to contribute to the documentation, [see the guidelines at the docs repository here]()
If you want to contribute to the documentation📜, [see the guidelines at the docs repository here]()

## Coding conventions and task automation
## Coding conventions📐 and task automation🤖

This project uses [Husky]() for Git hooks. For example, the code can only be committed if it passes linting tests which are done using [ESLint](). For the code to be pushed to the remote branch it must build without errors on your local machine. This helps maintain sanity and reduce chances of introducing buggy code o the project. All code is automatically formatted when you run `git push` as a pre-push hook.
This project uses Husky🐶 for Git hooks. For example, the code can only be committed if it passes linting tests which are done using 🧐ESLint. For the code to be pushed to the remote branch it must build without errors‼️ on your local machine. This helps maintain sanity🧠 and reduce chances of introducing buggy🐞 code o the project. All code is automatically formatted when you run `git push` as a pre-push hook.

## Issue tracking
## Issue tracking🙋🏽‍♂️

Our issues are partly managed by GitHub Actions. For example when you open a new issue an automated response is sent to you telling you how to proceed. You can also self assign yourself an issue or task if you want to work on it. This helps other maintainers focus on improving other aspects of the project.
Our issues are partly managed by GitHub Actions. For example when you open a new issue an automated🤖 response is sent to you telling you how to proceed🚦. You can also self assign yourself an issue or task if you want to work on it👐🏾. This helps other maintainers focus on improving other aspects of the project.

## Discussions
## Discussions🗣️💭

If you have a topic you wish to discuss about feel free to checkout our [discussions on GitHub] and join in the chat!
If you have a topic you wish to discuss about feel free to checkout our [discussions on GitHub] and join in the chat😀!

Happy hacking!
Happy hacking 🚀!
113 changes: 12 additions & 101 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,4 @@
Copyright (c) 2023
huetiful-js Javascript library for general purpose color manipulations
Dean Tarisai and contributors


http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.


Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
Expand Down Expand Up @@ -200,94 +187,18 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

(c) 2023 Dean Tarisai
huetiful-js
-> Open source TypeScript library for general purpose color manipulations.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

Copyright OpenJS Foundation and other contributors <https://openjsf.org/>

Based on Underscore.js, copyright Jeremy Ashkenas,
DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>

This software consists of voluntary contributions made by many
individuals. For exact contribution history, see the revision history
available at https://github.com/lodash/lodash

The following license applies to all parts of this software except as
documented below:

====

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

====

Copyright and related rights for sample code are waived via CC0. Sample
code is defined as all source code displayed within the prose of the
documentation.

CC0: http://creativecommons.org/publicdomain/zero/1.0/
http://www.apache.org/licenses/LICENSE-2.0

====

Files located in the node_modules and vendor directories are externally
maintained libraries used by this software which have their own
licenses; we recommend you read them, as their terms may differ from the
terms above.


MIT License

Copyright (c) 2018 Dan Burzo
Culori - JavaScript library for general purpose color manipulations.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


/**
ColorBrewer colors for chroma.js

Copyright (c) 2002 Cynthia Brewer, Mark Harrower, and The
Pennsylvania State University.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License.
*/
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Loading

0 comments on commit 1c79c2c

Please sign in to comment.