@thi.ng/pixel-dominant-colors 2.0.6 → 2.0.8

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # Change Log
2
2
 
3
- - **Last updated**: 2025-07-21T08:21:58Z
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
  [![Mastodon Follow](https://img.shields.io/mastodon/follow/109331703950160316?domain=https%3A%2F%2Fmastodon.thi.ng&style=social)](https://mastodon.thi.ng/@toxi)
8
8
 
9
9
  > [!NOTE]
10
- > This is one of 209 standalone projects, maintained as part
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, NumericArray } from "@thi.ng/api";
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<NumericArray, number, boolean>;
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 | NumericArray[], num: number, opts?: Partial<DominantColorOpts>) => DominantColor[];
5
- export declare const dominantColorsMedianCut: (img: FloatBuffer | NumericArray[], num: number, opts?: Partial<DominantColorOpts>) => DominantColor[];
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.6",
3
+ "version": "2.0.8",
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.32",
43
- "@thi.ng/k-means": "^2.0.6",
44
- "@thi.ng/pixel": "^7.5.4",
45
- "@thi.ng/vectors": "^8.5.0"
42
+ "@thi.ng/api": "^8.11.33",
43
+ "@thi.ng/k-means": "^2.0.8",
44
+ "@thi.ng/pixel": "^7.5.5",
45
+ "@thi.ng/vectors": "^8.6.0"
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": "c5c6b895169788c7f8b3d6d61ff76c0c6e5d2c2a\n"
101
+ "gitHead": "1df8a3a9061257ea73ccf1ab9cdf63c81a9f519f\n"
102
102
  }
package/utils.d.ts CHANGED
@@ -1,4 +1,5 @@
1
- import type { Fn2, NumericArray } from "@thi.ng/api";
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<NumericArray, number, boolean>, img: Iterable<NumericArray>) => NumericArray[];
4
+ export declare const filterSamples: (pred: Fn2<ReadonlyVec, number, boolean>, img: Iterable<ReadonlyVec>) => ReadonlyVec[];
4
5
  //# sourceMappingURL=utils.d.ts.map