agglomerative-clustering 4.0.0-beta.2 → 4.0.0-beta.4
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 +5 -5
- package/dist/clustering.wasm +0 -0
- package/dist/index.cjs +40 -238
- package/dist/index.d.cts +15 -76
- package/dist/index.d.ts +15 -76
- package/dist/index.mjs +28 -221
- package/dist/shared.cjs +244 -84
- package/dist/shared.mjs +235 -78
- package/dist/worker-thread.mjs +16 -19
- package/dist/worker.cjs +235 -136
- package/dist/worker.d.cts +0 -32
- package/dist/worker.d.ts +0 -32
- package/dist/worker.mjs +234 -130
- package/package.json +2 -2
package/dist/worker.d.cts
CHANGED
|
@@ -127,29 +127,13 @@ export interface AgglomerativeWorker {
|
|
|
127
127
|
init(options?: InitOptions): Promise<void>;
|
|
128
128
|
/** The main entry's `buildClustering`, run in this worker. */
|
|
129
129
|
buildClustering(image: ImageLike, options?: ClusteringOptions): Promise<Clustering>;
|
|
130
|
-
/** @deprecated Renamed {@link AgglomerativeWorker.buildClustering} in 3.4.0 (the same function). Removed in 4.0. */
|
|
131
|
-
getClustering(image: ImageLike, options?: ClusteringOptions): Promise<Clustering>;
|
|
132
130
|
/** The main entry's `buildPalette`, run in this worker. */
|
|
133
131
|
buildPalette(image: ImageLike, k: number, options?: ClusteringOptions): Promise<Palette>;
|
|
134
|
-
/** @deprecated Renamed {@link AgglomerativeWorker.buildPalette} in 3.4.0 (the same function). Removed in 4.0. */
|
|
135
|
-
getPalette(image: ImageLike, k: number, options?: ClusteringOptions): Promise<Palette>;
|
|
136
|
-
/** @deprecated Use `clustering.getPalette(k)`; off the main thread, `(await worker.load(clustering)).getPalette(k)` (`worker.load` is in the worker entry). Deprecated in 3.8, removed in 4.0; no warning at run time. */
|
|
137
|
-
getPaletteFromClustering(clustering: Clustering, k: number): Promise<Palette>;
|
|
138
132
|
/** The main entry's `buildSwatches`, run in this worker. */
|
|
139
133
|
buildSwatches(image: ImageLike, k: number, options?: ClusteringOptions): Promise<Swatches>;
|
|
140
|
-
/** @deprecated Renamed {@link AgglomerativeWorker.buildSwatches} in 3.4.0 (the same function). Removed in 4.0. */
|
|
141
|
-
getSwatches(image: ImageLike, k: number, options?: ClusteringOptions): Promise<Swatches>;
|
|
142
|
-
/** @deprecated Use `clustering.getSwatches(k)`; off the main thread, `(await worker.load(clustering)).getSwatches(k)` (`worker.load` is in the worker entry). Deprecated in 3.8, removed in 4.0; no warning at run time. */
|
|
143
|
-
getSwatchesFromClustering(clustering: Clustering, k: number): Promise<Swatches>;
|
|
144
|
-
/** @deprecated Use `clustering.getClusteringInfo()`; off the main thread, `(await worker.load(clustering)).getClusteringInfo()` (`worker.load` is in the worker entry). Deprecated in 3.8, removed in 4.0; no warning at run time. */
|
|
145
|
-
getClusteringInfo(clustering: Clustering): Promise<ClusteringInfo>;
|
|
146
134
|
quantize<Image extends ImageLike>(image: Image, k: number, options?: QuantizeOptions): Promise<ImageResult<Image>>;
|
|
147
|
-
/** @deprecated Use `clustering.quantize(image, k, options)`; off the main thread, `(await worker.load(clustering)).quantize(image, k, options)` (`worker.load` is in the worker entry). Deprecated in 3.8, removed in 4.0; no warning at run time. */
|
|
148
|
-
quantizeFromClustering<Image extends ImageLike>(image: Image, clustering: Clustering, k: number, options?: MappingOptions): Promise<ImageResult<Image>>;
|
|
149
135
|
quantizeWithPalette<Image extends ImageLike>(image: Image, palette: PaletteLike, options?: MappingOptions): Promise<ImageResult<Image>>;
|
|
150
136
|
quantizeToIndices(image: ImageLike, k: number, options?: QuantizeIndexOptions): Promise<IndexedImage>;
|
|
151
|
-
/** @deprecated Use `clustering.quantizeToIndices(image, k, options)`; off the main thread, `(await worker.load(clustering)).quantizeToIndices(image, k, options)` (`worker.load` is in the worker entry). Deprecated in 3.8, removed in 4.0; no warning at run time. */
|
|
152
|
-
quantizeToIndicesFromClustering(image: ImageLike, clustering: Clustering, k: number, options?: MappingIndexOptions): Promise<IndexedImage>;
|
|
153
137
|
quantizeToIndicesWithPalette(image: ImageLike, palette: PaletteLike, options?: MappingIndexOptions): Promise<IndexedImage>;
|
|
154
138
|
/** Clusters `image` and keeps it, with its clustering, in the worker. */
|
|
155
139
|
cluster<Image extends ImageLike>(image: Image, options?: ClusteringOptions): Promise<ClusteringHandle<ImageResult<Image>>>;
|
|
@@ -183,31 +167,15 @@ export function terminate(): Promise<void>;
|
|
|
183
167
|
export function init(options?: SharedInitOptions): Promise<void>;
|
|
184
168
|
/** The main entry's `buildClustering`, run in the shared worker (see `createWorker` for a worker of your own). */
|
|
185
169
|
export const buildClustering: AgglomerativeWorker['buildClustering'];
|
|
186
|
-
/** @deprecated Renamed {@link buildClustering} in 3.4.0 (the same function). Removed in 4.0. */
|
|
187
|
-
export const getClustering: AgglomerativeWorker['getClustering'];
|
|
188
170
|
/** The main entry's `buildPalette`, run in the shared worker (see `createWorker` for a worker of your own). */
|
|
189
171
|
export const buildPalette: AgglomerativeWorker['buildPalette'];
|
|
190
|
-
/** @deprecated Renamed {@link buildPalette} in 3.4.0 (the same function). Removed in 4.0. */
|
|
191
|
-
export const getPalette: AgglomerativeWorker['getPalette'];
|
|
192
|
-
/** @deprecated Use `clustering.getPalette(k)`; off the main thread, `(await worker.load(clustering)).getPalette(k)` (`worker.load` is in the worker entry). Deprecated in 3.8, removed in 4.0; no warning at run time. */
|
|
193
|
-
export const getPaletteFromClustering: AgglomerativeWorker['getPaletteFromClustering'];
|
|
194
172
|
/** The main entry's `buildSwatches`, run in the shared worker (see `createWorker` for a worker of your own). */
|
|
195
173
|
export const buildSwatches: AgglomerativeWorker['buildSwatches'];
|
|
196
|
-
/** @deprecated Renamed {@link buildSwatches} in 3.4.0 (the same function). Removed in 4.0. */
|
|
197
|
-
export const getSwatches: AgglomerativeWorker['getSwatches'];
|
|
198
|
-
/** @deprecated Use `clustering.getSwatches(k)`; off the main thread, `(await worker.load(clustering)).getSwatches(k)` (`worker.load` is in the worker entry). Deprecated in 3.8, removed in 4.0; no warning at run time. */
|
|
199
|
-
export const getSwatchesFromClustering: AgglomerativeWorker['getSwatchesFromClustering'];
|
|
200
|
-
/** @deprecated Use `clustering.getClusteringInfo()`; off the main thread, `(await worker.load(clustering)).getClusteringInfo()` (`worker.load` is in the worker entry). Deprecated in 3.8, removed in 4.0; no warning at run time. */
|
|
201
|
-
export const getClusteringInfo: AgglomerativeWorker['getClusteringInfo'];
|
|
202
174
|
/** The main entry's `quantize`, run in the shared worker (see `createWorker` for a worker of your own). */
|
|
203
175
|
export const quantize: AgglomerativeWorker['quantize'];
|
|
204
|
-
/** @deprecated Use `clustering.quantize(image, k, options)`; off the main thread, `(await worker.load(clustering)).quantize(image, k, options)` (`worker.load` is in the worker entry). Deprecated in 3.8, removed in 4.0; no warning at run time. */
|
|
205
|
-
export const quantizeFromClustering: AgglomerativeWorker['quantizeFromClustering'];
|
|
206
176
|
/** The main entry's `quantizeWithPalette`, run in the shared worker (see `createWorker` for a worker of your own). */
|
|
207
177
|
export const quantizeWithPalette: AgglomerativeWorker['quantizeWithPalette'];
|
|
208
178
|
/** The main entry's `quantizeToIndices`, run in the shared worker (see `createWorker` for a worker of your own). */
|
|
209
179
|
export const quantizeToIndices: AgglomerativeWorker['quantizeToIndices'];
|
|
210
|
-
/** @deprecated Use `clustering.quantizeToIndices(image, k, options)`; off the main thread, `(await worker.load(clustering)).quantizeToIndices(image, k, options)` (`worker.load` is in the worker entry). Deprecated in 3.8, removed in 4.0; no warning at run time. */
|
|
211
|
-
export const quantizeToIndicesFromClustering: AgglomerativeWorker['quantizeToIndicesFromClustering'];
|
|
212
180
|
/** The main entry's `quantizeToIndicesWithPalette`, run in the shared worker (see `createWorker` for a worker of your own). */
|
|
213
181
|
export const quantizeToIndicesWithPalette: AgglomerativeWorker['quantizeToIndicesWithPalette'];
|
package/dist/worker.d.ts
CHANGED
|
@@ -127,29 +127,13 @@ export interface AgglomerativeWorker {
|
|
|
127
127
|
init(options?: InitOptions): Promise<void>;
|
|
128
128
|
/** The main entry's `buildClustering`, run in this worker. */
|
|
129
129
|
buildClustering(image: ImageLike, options?: ClusteringOptions): Promise<Clustering>;
|
|
130
|
-
/** @deprecated Renamed {@link AgglomerativeWorker.buildClustering} in 3.4.0 (the same function). Removed in 4.0. */
|
|
131
|
-
getClustering(image: ImageLike, options?: ClusteringOptions): Promise<Clustering>;
|
|
132
130
|
/** The main entry's `buildPalette`, run in this worker. */
|
|
133
131
|
buildPalette(image: ImageLike, k: number, options?: ClusteringOptions): Promise<Palette>;
|
|
134
|
-
/** @deprecated Renamed {@link AgglomerativeWorker.buildPalette} in 3.4.0 (the same function). Removed in 4.0. */
|
|
135
|
-
getPalette(image: ImageLike, k: number, options?: ClusteringOptions): Promise<Palette>;
|
|
136
|
-
/** @deprecated Use `clustering.getPalette(k)`; off the main thread, `(await worker.load(clustering)).getPalette(k)` (`worker.load` is in the worker entry). Deprecated in 3.8, removed in 4.0; no warning at run time. */
|
|
137
|
-
getPaletteFromClustering(clustering: Clustering, k: number): Promise<Palette>;
|
|
138
132
|
/** The main entry's `buildSwatches`, run in this worker. */
|
|
139
133
|
buildSwatches(image: ImageLike, k: number, options?: ClusteringOptions): Promise<Swatches>;
|
|
140
|
-
/** @deprecated Renamed {@link AgglomerativeWorker.buildSwatches} in 3.4.0 (the same function). Removed in 4.0. */
|
|
141
|
-
getSwatches(image: ImageLike, k: number, options?: ClusteringOptions): Promise<Swatches>;
|
|
142
|
-
/** @deprecated Use `clustering.getSwatches(k)`; off the main thread, `(await worker.load(clustering)).getSwatches(k)` (`worker.load` is in the worker entry). Deprecated in 3.8, removed in 4.0; no warning at run time. */
|
|
143
|
-
getSwatchesFromClustering(clustering: Clustering, k: number): Promise<Swatches>;
|
|
144
|
-
/** @deprecated Use `clustering.getClusteringInfo()`; off the main thread, `(await worker.load(clustering)).getClusteringInfo()` (`worker.load` is in the worker entry). Deprecated in 3.8, removed in 4.0; no warning at run time. */
|
|
145
|
-
getClusteringInfo(clustering: Clustering): Promise<ClusteringInfo>;
|
|
146
134
|
quantize<Image extends ImageLike>(image: Image, k: number, options?: QuantizeOptions): Promise<ImageResult<Image>>;
|
|
147
|
-
/** @deprecated Use `clustering.quantize(image, k, options)`; off the main thread, `(await worker.load(clustering)).quantize(image, k, options)` (`worker.load` is in the worker entry). Deprecated in 3.8, removed in 4.0; no warning at run time. */
|
|
148
|
-
quantizeFromClustering<Image extends ImageLike>(image: Image, clustering: Clustering, k: number, options?: MappingOptions): Promise<ImageResult<Image>>;
|
|
149
135
|
quantizeWithPalette<Image extends ImageLike>(image: Image, palette: PaletteLike, options?: MappingOptions): Promise<ImageResult<Image>>;
|
|
150
136
|
quantizeToIndices(image: ImageLike, k: number, options?: QuantizeIndexOptions): Promise<IndexedImage>;
|
|
151
|
-
/** @deprecated Use `clustering.quantizeToIndices(image, k, options)`; off the main thread, `(await worker.load(clustering)).quantizeToIndices(image, k, options)` (`worker.load` is in the worker entry). Deprecated in 3.8, removed in 4.0; no warning at run time. */
|
|
152
|
-
quantizeToIndicesFromClustering(image: ImageLike, clustering: Clustering, k: number, options?: MappingIndexOptions): Promise<IndexedImage>;
|
|
153
137
|
quantizeToIndicesWithPalette(image: ImageLike, palette: PaletteLike, options?: MappingIndexOptions): Promise<IndexedImage>;
|
|
154
138
|
/** Clusters `image` and keeps it, with its clustering, in the worker. */
|
|
155
139
|
cluster<Image extends ImageLike>(image: Image, options?: ClusteringOptions): Promise<ClusteringHandle<ImageResult<Image>>>;
|
|
@@ -183,31 +167,15 @@ export function terminate(): Promise<void>;
|
|
|
183
167
|
export function init(options?: SharedInitOptions): Promise<void>;
|
|
184
168
|
/** The main entry's `buildClustering`, run in the shared worker (see `createWorker` for a worker of your own). */
|
|
185
169
|
export const buildClustering: AgglomerativeWorker['buildClustering'];
|
|
186
|
-
/** @deprecated Renamed {@link buildClustering} in 3.4.0 (the same function). Removed in 4.0. */
|
|
187
|
-
export const getClustering: AgglomerativeWorker['getClustering'];
|
|
188
170
|
/** The main entry's `buildPalette`, run in the shared worker (see `createWorker` for a worker of your own). */
|
|
189
171
|
export const buildPalette: AgglomerativeWorker['buildPalette'];
|
|
190
|
-
/** @deprecated Renamed {@link buildPalette} in 3.4.0 (the same function). Removed in 4.0. */
|
|
191
|
-
export const getPalette: AgglomerativeWorker['getPalette'];
|
|
192
|
-
/** @deprecated Use `clustering.getPalette(k)`; off the main thread, `(await worker.load(clustering)).getPalette(k)` (`worker.load` is in the worker entry). Deprecated in 3.8, removed in 4.0; no warning at run time. */
|
|
193
|
-
export const getPaletteFromClustering: AgglomerativeWorker['getPaletteFromClustering'];
|
|
194
172
|
/** The main entry's `buildSwatches`, run in the shared worker (see `createWorker` for a worker of your own). */
|
|
195
173
|
export const buildSwatches: AgglomerativeWorker['buildSwatches'];
|
|
196
|
-
/** @deprecated Renamed {@link buildSwatches} in 3.4.0 (the same function). Removed in 4.0. */
|
|
197
|
-
export const getSwatches: AgglomerativeWorker['getSwatches'];
|
|
198
|
-
/** @deprecated Use `clustering.getSwatches(k)`; off the main thread, `(await worker.load(clustering)).getSwatches(k)` (`worker.load` is in the worker entry). Deprecated in 3.8, removed in 4.0; no warning at run time. */
|
|
199
|
-
export const getSwatchesFromClustering: AgglomerativeWorker['getSwatchesFromClustering'];
|
|
200
|
-
/** @deprecated Use `clustering.getClusteringInfo()`; off the main thread, `(await worker.load(clustering)).getClusteringInfo()` (`worker.load` is in the worker entry). Deprecated in 3.8, removed in 4.0; no warning at run time. */
|
|
201
|
-
export const getClusteringInfo: AgglomerativeWorker['getClusteringInfo'];
|
|
202
174
|
/** The main entry's `quantize`, run in the shared worker (see `createWorker` for a worker of your own). */
|
|
203
175
|
export const quantize: AgglomerativeWorker['quantize'];
|
|
204
|
-
/** @deprecated Use `clustering.quantize(image, k, options)`; off the main thread, `(await worker.load(clustering)).quantize(image, k, options)` (`worker.load` is in the worker entry). Deprecated in 3.8, removed in 4.0; no warning at run time. */
|
|
205
|
-
export const quantizeFromClustering: AgglomerativeWorker['quantizeFromClustering'];
|
|
206
176
|
/** The main entry's `quantizeWithPalette`, run in the shared worker (see `createWorker` for a worker of your own). */
|
|
207
177
|
export const quantizeWithPalette: AgglomerativeWorker['quantizeWithPalette'];
|
|
208
178
|
/** The main entry's `quantizeToIndices`, run in the shared worker (see `createWorker` for a worker of your own). */
|
|
209
179
|
export const quantizeToIndices: AgglomerativeWorker['quantizeToIndices'];
|
|
210
|
-
/** @deprecated Use `clustering.quantizeToIndices(image, k, options)`; off the main thread, `(await worker.load(clustering)).quantizeToIndices(image, k, options)` (`worker.load` is in the worker entry). Deprecated in 3.8, removed in 4.0; no warning at run time. */
|
|
211
|
-
export const quantizeToIndicesFromClustering: AgglomerativeWorker['quantizeToIndicesFromClustering'];
|
|
212
180
|
/** The main entry's `quantizeToIndicesWithPalette`, run in the shared worker (see `createWorker` for a worker of your own). */
|
|
213
181
|
export const quantizeToIndicesWithPalette: AgglomerativeWorker['quantizeToIndicesWithPalette'];
|