@thi.ng/pixel-dominant-colors 2.0.7 → 2.0.9
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/CHANGELOG.md +8 -1
- package/README.md +1 -1
- package/api.d.ts +3 -2
- package/mean-cut.d.ts +3 -3
- package/package.json +6 -6
- package/utils.d.ts +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
-
- **Last updated**: 2025-07-
|
|
3
|
+
- **Last updated**: 2025-07-30T22:32:35Z
|
|
4
4
|
- **Generator**: [thi.ng/monopub](https://thi.ng/monopub)
|
|
5
5
|
|
|
6
6
|
All notable changes to this project will be documented in this file.
|
|
@@ -11,6 +11,13 @@ See [Conventional Commits](https://conventionalcommits.org/) for commit guidelin
|
|
|
11
11
|
**Note:** Unlisted _patch_ versions only involve non-code or otherwise excluded changes
|
|
12
12
|
and/or version bumps of transitive dependencies.
|
|
13
13
|
|
|
14
|
+
### [2.0.8](https://github.com/thi-ng/umbrella/tree/@thi.ng/pixel-dominant-colors@2.0.8) (2025-07-30)
|
|
15
|
+
|
|
16
|
+
#### ♻️ Refactoring
|
|
17
|
+
|
|
18
|
+
- update arg types ([80826ff](https://github.com/thi-ng/umbrella/commit/80826ff))
|
|
19
|
+
- use `NumericArray` => `ReadonlyVec`
|
|
20
|
+
|
|
14
21
|
# [2.0.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/pixel-dominant-colors@2.0.0) (2025-06-24)
|
|
15
22
|
|
|
16
23
|
#### 🛑 Breaking changes
|
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 210 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
|
>
|
package/api.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { Fn2
|
|
1
|
+
import type { Fn2 } from "@thi.ng/api";
|
|
2
|
+
import type { ReadonlyVec } from "@thi.ng/vectors";
|
|
2
3
|
/**
|
|
3
4
|
* Options for {@link dominantColors}, an extension of
|
|
4
5
|
* [KMeansOpts](https://docs.thi.ng/umbrella/k-means/interfaces/KMeansOpts.html).
|
|
@@ -12,7 +13,7 @@ export interface DominantColorOpts {
|
|
|
12
13
|
*
|
|
13
14
|
* If omitted, all pixels will be included (default).
|
|
14
15
|
*/
|
|
15
|
-
filter: Fn2<
|
|
16
|
+
filter: Fn2<ReadonlyVec, number, boolean>;
|
|
16
17
|
}
|
|
17
18
|
/**
|
|
18
19
|
* Result type for dominant color extraction functions
|
package/mean-cut.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { NumericArray } from "@thi.ng/api";
|
|
2
1
|
import type { FloatBuffer } from "@thi.ng/pixel/float";
|
|
2
|
+
import type { ReadonlyVec } from "@thi.ng/vectors";
|
|
3
3
|
import type { DominantColor, DominantColorOpts } from "./api.js";
|
|
4
|
-
export declare const dominantColorsMeanCut: (img: FloatBuffer |
|
|
5
|
-
export declare const dominantColorsMedianCut: (img: FloatBuffer |
|
|
4
|
+
export declare const dominantColorsMeanCut: (img: FloatBuffer | ReadonlyVec[], num: number, opts?: Partial<DominantColorOpts>) => DominantColor[];
|
|
5
|
+
export declare const dominantColorsMedianCut: (img: FloatBuffer | ReadonlyVec[], num: number, opts?: Partial<DominantColorOpts>) => DominantColor[];
|
|
6
6
|
//# sourceMappingURL=mean-cut.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/pixel-dominant-colors",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.9",
|
|
4
4
|
"description": "k-means based dominant color extraction from images/pixel buffers",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -39,10 +39,10 @@
|
|
|
39
39
|
"tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@thi.ng/api": "^8.11.
|
|
43
|
-
"@thi.ng/k-means": "^2.0.
|
|
44
|
-
"@thi.ng/pixel": "^7.5.
|
|
45
|
-
"@thi.ng/vectors": "^8.
|
|
42
|
+
"@thi.ng/api": "^8.11.33",
|
|
43
|
+
"@thi.ng/k-means": "^2.0.9",
|
|
44
|
+
"@thi.ng/pixel": "^7.5.5",
|
|
45
|
+
"@thi.ng/vectors": "^8.6.1"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"esbuild": "^0.25.8",
|
|
@@ -98,5 +98,5 @@
|
|
|
98
98
|
"year": 2021,
|
|
99
99
|
"screenshot": "pixel/dominant-colors-01.jpg"
|
|
100
100
|
},
|
|
101
|
-
"gitHead": "
|
|
101
|
+
"gitHead": "76ffdc6e27bced158471ed47700919e7079956ca\n"
|
|
102
102
|
}
|
package/utils.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { Fn2
|
|
1
|
+
import type { Fn2 } from "@thi.ng/api";
|
|
2
|
+
import type { ReadonlyVec } from "@thi.ng/vectors";
|
|
2
3
|
/** @internal */
|
|
3
|
-
export declare const filterSamples: (pred: Fn2<
|
|
4
|
+
export declare const filterSamples: (pred: Fn2<ReadonlyVec, number, boolean>, img: Iterable<ReadonlyVec>) => ReadonlyVec[];
|
|
4
5
|
//# sourceMappingURL=utils.d.ts.map
|