@thi.ng/color 5.8.9 → 5.8.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/convert.js +2 -2
- package/css/parse-css.js +2 -2
- package/package.json +17 -16
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
[](https://mastodon.thi.ng/@toxi)
|
|
8
8
|
|
|
9
9
|
> [!NOTE]
|
|
10
|
-
> This is one of
|
|
10
|
+
> This is one of 214 standalone projects, maintained as part
|
|
11
11
|
> of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo
|
|
12
12
|
> and anti-framework.
|
|
13
13
|
>
|
|
@@ -800,7 +800,7 @@ For Node.js REPL:
|
|
|
800
800
|
const color = await import("@thi.ng/color");
|
|
801
801
|
```
|
|
802
802
|
|
|
803
|
-
Package sizes (brotli'd, pre-treeshake): ESM: 15.
|
|
803
|
+
Package sizes (brotli'd, pre-treeshake): ESM: 15.79 KB
|
|
804
804
|
|
|
805
805
|
## Dependencies
|
|
806
806
|
|
package/convert.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isArray } from "@thi.ng/checks/is-array";
|
|
2
2
|
import { assert } from "@thi.ng/errors/assert";
|
|
3
|
-
import {
|
|
3
|
+
import { unsupportedOp } from "@thi.ng/errors/unsupported";
|
|
4
4
|
const CONVERSIONS = {};
|
|
5
5
|
const defConversions = (mode, spec) => {
|
|
6
6
|
for (const id in spec) {
|
|
@@ -16,7 +16,7 @@ const convert = (res, src, destMode, srcMode) => {
|
|
|
16
16
|
const spec = CONVERSIONS[destMode];
|
|
17
17
|
assert(!!spec, `no conversions available for ${destMode}`);
|
|
18
18
|
let $convert = spec[srcMode];
|
|
19
|
-
return $convert ? $convert(res, src) : CONVERSIONS.rgb[srcMode] ? spec.rgb(res, CONVERSIONS.rgb[srcMode]([], src)) :
|
|
19
|
+
return $convert ? $convert(res, src) : CONVERSIONS.rgb[srcMode] ? spec.rgb(res, CONVERSIONS.rgb[srcMode]([], src)) : unsupportedOp(`can't convert: ${srcMode} -> ${destMode}`);
|
|
20
20
|
};
|
|
21
21
|
export {
|
|
22
22
|
CONVERSIONS,
|
package/css/parse-css.js
CHANGED
|
@@ -3,7 +3,7 @@ import { interleave4_12_24, interleave4_16_32 } from "@thi.ng/binary/splat";
|
|
|
3
3
|
import { isString } from "@thi.ng/checks/is-string";
|
|
4
4
|
import { assert } from "@thi.ng/errors/assert";
|
|
5
5
|
import { illegalArgs } from "@thi.ng/errors/illegal-arguments";
|
|
6
|
-
import {
|
|
6
|
+
import { unsupportedOp } from "@thi.ng/errors/unsupported";
|
|
7
7
|
import { TAU } from "@thi.ng/math/api";
|
|
8
8
|
import { clamp01 } from "@thi.ng/math/interval";
|
|
9
9
|
import { fract } from "@thi.ng/math/prec";
|
|
@@ -69,7 +69,7 @@ const parseCss = (src) => {
|
|
|
69
69
|
__alpha(d)
|
|
70
70
|
]);
|
|
71
71
|
default:
|
|
72
|
-
|
|
72
|
+
unsupportedOp(`color mode: ${mode}`);
|
|
73
73
|
}
|
|
74
74
|
};
|
|
75
75
|
const HUE_NORMS = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/color",
|
|
3
|
-
"version": "5.8.
|
|
3
|
+
"version": "5.8.12",
|
|
4
4
|
"description": "Array-based color types, CSS parsing, conversions, transformations, declarative theme generation, gradients, presets",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
"sideEffects": false,
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
11
|
-
"url": "https://github.com/thi-ng/umbrella.git"
|
|
11
|
+
"url": "git+https://github.com/thi-ng/umbrella.git",
|
|
12
|
+
"directory": "packages/color"
|
|
12
13
|
},
|
|
13
14
|
"homepage": "https://thi.ng/color",
|
|
14
15
|
"funding": [
|
|
@@ -43,19 +44,19 @@
|
|
|
43
44
|
"tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
|
|
44
45
|
},
|
|
45
46
|
"dependencies": {
|
|
46
|
-
"@thi.ng/api": "^8.12.
|
|
47
|
-
"@thi.ng/arrays": "^2.14.
|
|
48
|
-
"@thi.ng/binary": "^3.6.
|
|
49
|
-
"@thi.ng/checks": "^3.8.
|
|
50
|
-
"@thi.ng/compare": "^2.
|
|
51
|
-
"@thi.ng/compose": "^3.0.
|
|
52
|
-
"@thi.ng/defmulti": "^3.0.
|
|
53
|
-
"@thi.ng/errors": "^2.6.
|
|
54
|
-
"@thi.ng/math": "^5.15.
|
|
55
|
-
"@thi.ng/random": "^4.1.
|
|
56
|
-
"@thi.ng/strings": "^3.9.
|
|
57
|
-
"@thi.ng/transducers": "^9.6.
|
|
58
|
-
"@thi.ng/vectors": "^8.6.
|
|
47
|
+
"@thi.ng/api": "^8.12.15",
|
|
48
|
+
"@thi.ng/arrays": "^2.14.9",
|
|
49
|
+
"@thi.ng/binary": "^3.6.4",
|
|
50
|
+
"@thi.ng/checks": "^3.8.5",
|
|
51
|
+
"@thi.ng/compare": "^2.5.1",
|
|
52
|
+
"@thi.ng/compose": "^3.0.52",
|
|
53
|
+
"@thi.ng/defmulti": "^3.0.91",
|
|
54
|
+
"@thi.ng/errors": "^2.6.4",
|
|
55
|
+
"@thi.ng/math": "^5.15.4",
|
|
56
|
+
"@thi.ng/random": "^4.1.40",
|
|
57
|
+
"@thi.ng/strings": "^3.9.36",
|
|
58
|
+
"@thi.ng/transducers": "^9.6.25",
|
|
59
|
+
"@thi.ng/vectors": "^8.6.21"
|
|
59
60
|
},
|
|
60
61
|
"devDependencies": {
|
|
61
62
|
"esbuild": "^0.27.2",
|
|
@@ -446,5 +447,5 @@
|
|
|
446
447
|
"vectors"
|
|
447
448
|
]
|
|
448
449
|
},
|
|
449
|
-
"gitHead": "
|
|
450
|
+
"gitHead": "8f50352caab9ec7757d645c0afa605dfb5427abe\n"
|
|
450
451
|
}
|