-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
236 changed files
with
6,743 additions
and
3,284 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
{ | ||
"printWidth": 100, | ||
"printWidth": 80, | ||
"tabWidth": 4, | ||
"trailingComma": "all", | ||
"proseWrap": "always", | ||
"experimentalTernaries": true | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
diff --git a/fn/index.d.ts b/fn/index.d.ts | ||
index d8427ad5732c487b7e078763bdafc2f2aa19789c..a080370ccc06ee22182f58fafebdd2203e1389a2 100644 | ||
--- a/fn/index.d.ts | ||
+++ b/fn/index.d.ts | ||
@@ -70,7 +70,7 @@ export { | ||
interpolatorSplineMonotoneClosed, | ||
} from "../src/interpolate/splineMonotone"; | ||
|
||
-export { clampChroma, clampRgb } from "../src/clamp"; | ||
+export { clampChroma, clampRgb, toGamut, clampGamut } from "../src/clamp"; | ||
export { default as displayable } from "../src/displayable"; | ||
export { default as lerp } from "../src/interpolate/lerp"; | ||
export { getMode, removeParser, useMode, useParser } from "../src/modes"; | ||
diff --git a/index.d.ts b/index.d.ts | ||
index c71d73f7b6c809029b35da1af2b0ac2afe9179d1..7a3dabd695c96253c661a593dcde72008c31188c 100644 | ||
--- a/index.d.ts | ||
+++ b/index.d.ts | ||
@@ -72,7 +72,7 @@ export { | ||
interpolatorSplineMonotoneClosed, | ||
} from "./src/interpolate/splineMonotone"; | ||
|
||
-export { clampChroma, clampRgb } from "./src/clamp"; | ||
+export { clampChroma, clampRgb, toGamut, clampGamut } from "./src/clamp"; | ||
export { default as displayable } from "./src/displayable"; | ||
export { default as lerp } from "./src/interpolate/lerp"; | ||
export { getMode, removeParser, useMode, useParser } from "./src/modes"; | ||
diff --git a/src/clamp.d.ts b/src/clamp.d.ts | ||
index e61d3a09805f62d6ce3bc2e8e2c2e3d687db92ec..3ed62131fd731998cd549b4e7273e5208e241c6a 100644 | ||
--- a/src/clamp.d.ts | ||
+++ b/src/clamp.d.ts | ||
@@ -1,7 +1,16 @@ | ||
import { Color, Mode } from "./common"; | ||
+import { DiffFn } from "./difference"; | ||
|
||
export function clampRgb(color: string): Color | undefined; | ||
export function clampRgb<C extends Color>(color: C): C; | ||
|
||
export function clampChroma(color: string, mode?: Mode): Color | undefined; | ||
export function clampChroma<C extends Color>(color: C, mode?: Mode): C; | ||
+ | ||
+export function toGamut( | ||
+ dest?: Mode, | ||
+ mode?: Mode, | ||
+ delta?: DiffFn, | ||
+ jnd?: number | ||
+): (color: string | Color) => Color; | ||
+export function clampGamut(mode?: Mode): (color: string | Color) => Color; | ||
\ No newline at end of file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,58 +16,59 @@ | |
"format": "git ls-files | grep -E '.*\\.(js|mjs|cjs|ts|jsx|tsx|html|css|json|yml|md)$' | xargs prettier --write" | ||
}, | ||
"devDependencies": { | ||
"@babel/plugin-proposal-decorators": "^7.22.10", | ||
"@headlessui/tailwindcss": "^0.1.3", | ||
"@babel/plugin-proposal-decorators": "^7.23.5", | ||
"@headlessui/tailwindcss": "^0.2.0", | ||
"@types/classnames": "^2.3.1", | ||
"@types/dat.gui": "^0.7.7", | ||
"@types/diff": "^5.0.2", | ||
"@types/dat.gui": "^0.7.12", | ||
"@types/diff": "^5.0.9", | ||
"@types/glob": "^8.1.0", | ||
"@types/pixi.js": "^5.0.0", | ||
"@types/react": "^18.2.21", | ||
"@types/react-dom": "^18.2.7", | ||
"@types/react-transition-group": "^4.4.6", | ||
"@types/three": "^0.132.0", | ||
"@types/use-subscription": "^1.0.0", | ||
"@typescript-eslint/eslint-plugin": "^5.62.0", | ||
"@typescript-eslint/parser": "^5.62.0", | ||
"@vitejs/plugin-react": "^3.1.0", | ||
"autoprefixer": "^10.4.15", | ||
"eslint": "^8.48.0", | ||
"eslint-plugin-no-relative-import-paths": "^1.5.2", | ||
"@types/react": "^18.2.43", | ||
"@types/react-dom": "^18.2.17", | ||
"@types/react-transition-group": "^4.4.10", | ||
"@types/three": "^0.132.2", | ||
"@types/use-subscription": "^1.0.2", | ||
"@typescript-eslint/eslint-plugin": "^6.13.2", | ||
"@typescript-eslint/parser": "^6.13.2", | ||
"@vitejs/plugin-react": "^4.2.1", | ||
"autoprefixer": "^10.4.16", | ||
"eslint": "^8.55.0", | ||
"eslint-plugin-no-relative-import-paths": "^1.5.3", | ||
"eslint-plugin-react": "^7.33.2", | ||
"eslint-plugin-react-hooks": "^4.6.0", | ||
"glob": "^8.1.0", | ||
"postcss": "^8.4.29", | ||
"prettier": "^2.8.8", | ||
"prettier-plugin-organize-imports": "^3.2.3", | ||
"postcss": "^8.4.32", | ||
"prettier": "^3.1.0", | ||
"prettier-plugin-organize-imports": "^3.2.4", | ||
"rimraf": "^3.0.2", | ||
"typescript": "^5.2.2", | ||
"vite": "^4.4.9", | ||
"vite-plugin-dts": "^2.3.0", | ||
"vite-plugin-glsl": "^1.1.2", | ||
"vitest": "^0.29.8", | ||
"typescript": "^5.3.3", | ||
"vite": "^5.0.7", | ||
"vite-plugin-dts": "^3.6.4", | ||
"vite-plugin-glsl": "^1.2.0", | ||
"vitest": "^1.0.3", | ||
"webgl-strict-types": "^1.0.5" | ||
}, | ||
"dependencies": { | ||
"@babel/generator": "^7.22.10", | ||
"@babel/types": "^7.22.11", | ||
"@headlessui/react": "^1.7.17", | ||
"@babel/generator": "^7.23.5", | ||
"@babel/types": "^7.23.5", | ||
"@headlessui/react": "^1.7.2", | ||
"@juggle/resize-observer": "^3.4.0", | ||
"@radix-ui/react-slot": "^1.0.2", | ||
"@tldraw/state": "2.0.0-alpha.14", | ||
"@tldraw/store": "2.0.0-alpha.14", | ||
"@types/babel__core": "^7.20.1", | ||
"@types/babel__generator": "^7.6.4", | ||
"@types/color": "^3.0.3", | ||
"@types/culori": "2.0.0", | ||
"@types/d3-color": "^3.1.0", | ||
"@types/d3-interpolate": "^3.0.1", | ||
"@types/d3-quadtree": "^3.0.2", | ||
"@types/d3-scale-chromatic": "^3.0.0", | ||
"@types/delaunator": "^5.0.0", | ||
"@types/node": "^16.x.x", | ||
"@types/babel__generator": "^7.6.7", | ||
"@types/color": "^3.0.6", | ||
"@types/culori": "patch:@types/culori@npm%3A2.0.4#~/.yarn/patches/@types-culori-npm-2.0.4-129982cb7c.patch", | ||
"@types/d3-color": "^3.1.3", | ||
"@types/d3-interpolate": "^3.0.4", | ||
"@types/d3-quadtree": "^3.0.6", | ||
"@types/d3-scale-chromatic": "^3.0.3", | ||
"@types/delaunator": "^5.0.2", | ||
"@types/node": "^16.18.68", | ||
"classnames": "^2.3.2", | ||
"color": "^4.2.3", | ||
"culori": "^3.2.0", | ||
"culori": "^3.3.0", | ||
"d3-color": "^3.1.0", | ||
"d3-interpolate": "^3.0.1", | ||
"d3-quadtree": "^3.0.1", | ||
|
@@ -78,28 +79,27 @@ | |
"diff": "^5.1.0", | ||
"fast-deep-equal": "^3.1.3", | ||
"immutable": "^4.3.4", | ||
"jest-diff": "^29.6.4", | ||
"jest-diff": "^29.7.0", | ||
"leva": "^0.9.35", | ||
"open-simplex-noise": "^2.5.0", | ||
"pixi.js": "^6.5.10", | ||
"react": "^18.2.0", | ||
"react-dom": "^18.2.0", | ||
"react-icons": "^4.10.1", | ||
"react-icons": "^4.12.0", | ||
"react-transition-group": "^4.4.5", | ||
"rebound": "^0.1.0", | ||
"regenerator-runtime": "^0.14.0", | ||
"tailwindcss": "^3.3.3", | ||
"tailwindcss": "^3.3.6", | ||
"three": "^0.132.2", | ||
"use-resize-observer": "^9.1.0", | ||
"use-subscription": "^1.8.0", | ||
"utility-types": "^3.10.0", | ||
"vite-plugin-html": "^3.2.0", | ||
"webmidi": "^3.1.5" | ||
"webmidi": "^3.1.7" | ||
}, | ||
"browserslist": "> 0.5%, last 2 versions, not dead", | ||
"packageManager": "[email protected]", | ||
"resolutions": { | ||
"@headlessui/[email protected]": "patch:@headlessui/react@npm:1.7.2#.yarn/patches/@headlessui-react-npm-1.7.2-149c706e3c.patch", | ||
"@types/[email protected]": "patch:@types/culori@npm%3A2.0.0#./.yarn/patches/@types-culori-npm-2.0.0-c062b73b4e.patch" | ||
"@headlessui/[email protected]": "patch:@headlessui/react@npm:1.7.2#.yarn/patches/@headlessui-react-npm-1.7.2-149c706e3c.patch" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
module.exports = { | ||
plugins: [require("tailwindcss")("./tailwind.config.js"), require("autoprefixer")], | ||
plugins: [ | ||
require("tailwindcss")("./tailwind.config.js"), | ||
require("autoprefixer"), | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.