@vitessce/heatmap 3.3.3 → 3.3.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/dist/{deflate-ca3a4331.js → deflate-05e3ee40.js} +1 -1
- package/dist/{index-98499b51.js → index-edc6cc12.js} +63 -57
- package/dist/index.js +1 -1
- package/dist/{jpeg-de3f5fd6.js → jpeg-a2f977d0.js} +1 -1
- package/dist/{lerc-1f658a8e.js → lerc-0d65f0a5.js} +1 -1
- package/dist/{lzw-85a51820.js → lzw-5206f32d.js} +1 -1
- package/dist/{packbits-e923ce89.js → packbits-5812e06c.js} +1 -1
- package/dist/{raw-0da61dee.js → raw-1b039310.js} +1 -1
- package/dist/{webimage-dc2efc6c.js → webimage-199d4de9.js} +1 -1
- package/dist-tsc/HeatmapSubscriber.js +2 -2
- package/package.json +9 -9
- package/src/HeatmapSubscriber.js +2 -2
|
@@ -1371,6 +1371,55 @@ function copyUint8Array(arr) {
|
|
|
1371
1371
|
newArr.set(arr);
|
|
1372
1372
|
return newArr;
|
|
1373
1373
|
}
|
|
1374
|
+
const defaultPoolSize = typeof navigator !== "undefined" ? navigator.hardwareConcurrency || 4 : 1;
|
|
1375
|
+
class Pool {
|
|
1376
|
+
/**
|
|
1377
|
+
* @constructor
|
|
1378
|
+
* @param {object} Worker The worker class to be used for processing.
|
|
1379
|
+
*/
|
|
1380
|
+
constructor(createWorker2) {
|
|
1381
|
+
__publicField(this, "workers");
|
|
1382
|
+
__publicField(this, "idleWorkers");
|
|
1383
|
+
__publicField(this, "waitQueue");
|
|
1384
|
+
this.workers = [];
|
|
1385
|
+
this.idleWorkers = [];
|
|
1386
|
+
this.waitQueue = [];
|
|
1387
|
+
for (let i2 = 0; i2 < defaultPoolSize; ++i2) {
|
|
1388
|
+
const w2 = createWorker2();
|
|
1389
|
+
this.workers.push(w2);
|
|
1390
|
+
this.idleWorkers.push(w2);
|
|
1391
|
+
}
|
|
1392
|
+
}
|
|
1393
|
+
// eslint-disable-next-line class-methods-use-this
|
|
1394
|
+
async process() {
|
|
1395
|
+
throw new Error('Pool needs to implement "process" method');
|
|
1396
|
+
}
|
|
1397
|
+
async waitForWorker() {
|
|
1398
|
+
const idleWorker = this.idleWorkers.pop();
|
|
1399
|
+
if (idleWorker) {
|
|
1400
|
+
return idleWorker;
|
|
1401
|
+
}
|
|
1402
|
+
const waiter = {};
|
|
1403
|
+
const promise = new Promise((resolve) => {
|
|
1404
|
+
waiter.resolve = resolve;
|
|
1405
|
+
});
|
|
1406
|
+
this.waitQueue.push(waiter);
|
|
1407
|
+
return promise;
|
|
1408
|
+
}
|
|
1409
|
+
async finishTask(currentWorker) {
|
|
1410
|
+
const waiter = this.waitQueue.pop();
|
|
1411
|
+
if (waiter && waiter.resolve) {
|
|
1412
|
+
waiter.resolve(currentWorker);
|
|
1413
|
+
} else {
|
|
1414
|
+
this.idleWorkers.push(currentWorker);
|
|
1415
|
+
}
|
|
1416
|
+
}
|
|
1417
|
+
destroy() {
|
|
1418
|
+
for (let i2 = 0; i2 < this.workers.length; ++i2) {
|
|
1419
|
+
this.workers[i2].terminate();
|
|
1420
|
+
}
|
|
1421
|
+
}
|
|
1422
|
+
}
|
|
1374
1423
|
let getRandomValues$1;
|
|
1375
1424
|
const rnds8$1 = new Uint8Array(16);
|
|
1376
1425
|
function rng$1() {
|
|
@@ -18464,62 +18513,19 @@ interpolateSequentialMulti(schemePlasma);
|
|
|
18464
18513
|
function getCellColors(params) {
|
|
18465
18514
|
const { cellSets, cellSetSelection, cellSetColor, obsIndex, theme } = params;
|
|
18466
18515
|
if (cellSetSelection && cellSets) {
|
|
18467
|
-
return treeToCellColorsBySetNames(
|
|
18516
|
+
return treeToCellColorsBySetNames(
|
|
18517
|
+
cellSets,
|
|
18518
|
+
cellSetSelection,
|
|
18519
|
+
cellSetColor,
|
|
18520
|
+
theme
|
|
18521
|
+
/* as string */
|
|
18522
|
+
);
|
|
18468
18523
|
}
|
|
18469
18524
|
if (obsIndex && theme) {
|
|
18470
18525
|
return new Map(obsIndex.map((o2) => [o2, getDefaultColor(theme)]));
|
|
18471
18526
|
}
|
|
18472
18527
|
return /* @__PURE__ */ new Map();
|
|
18473
18528
|
}
|
|
18474
|
-
const defaultPoolSize = typeof navigator !== "undefined" ? navigator.hardwareConcurrency || 4 : 1;
|
|
18475
|
-
class Pool {
|
|
18476
|
-
/**
|
|
18477
|
-
* @constructor
|
|
18478
|
-
* @param {object} Worker The worker class to be used for processing.
|
|
18479
|
-
*/
|
|
18480
|
-
constructor(createWorker2) {
|
|
18481
|
-
__publicField(this, "workers");
|
|
18482
|
-
__publicField(this, "idleWorkers");
|
|
18483
|
-
__publicField(this, "waitQueue");
|
|
18484
|
-
this.workers = [];
|
|
18485
|
-
this.idleWorkers = [];
|
|
18486
|
-
this.waitQueue = [];
|
|
18487
|
-
for (let i2 = 0; i2 < defaultPoolSize; ++i2) {
|
|
18488
|
-
const w2 = createWorker2();
|
|
18489
|
-
this.workers.push(w2);
|
|
18490
|
-
this.idleWorkers.push(w2);
|
|
18491
|
-
}
|
|
18492
|
-
}
|
|
18493
|
-
// eslint-disable-next-line class-methods-use-this
|
|
18494
|
-
async process() {
|
|
18495
|
-
throw new Error('Pool needs to implement "process" method');
|
|
18496
|
-
}
|
|
18497
|
-
async waitForWorker() {
|
|
18498
|
-
const idleWorker = this.idleWorkers.pop();
|
|
18499
|
-
if (idleWorker) {
|
|
18500
|
-
return idleWorker;
|
|
18501
|
-
}
|
|
18502
|
-
const waiter = {};
|
|
18503
|
-
const promise = new Promise((resolve) => {
|
|
18504
|
-
waiter.resolve = resolve;
|
|
18505
|
-
});
|
|
18506
|
-
this.waitQueue.push(waiter);
|
|
18507
|
-
return promise;
|
|
18508
|
-
}
|
|
18509
|
-
async finishTask(currentWorker) {
|
|
18510
|
-
const waiter = this.waitQueue.pop();
|
|
18511
|
-
if (waiter && waiter.resolve) {
|
|
18512
|
-
waiter.resolve(currentWorker);
|
|
18513
|
-
} else {
|
|
18514
|
-
this.idleWorkers.push(currentWorker);
|
|
18515
|
-
}
|
|
18516
|
-
}
|
|
18517
|
-
destroy() {
|
|
18518
|
-
for (let i2 = 0; i2 < this.workers.length; ++i2) {
|
|
18519
|
-
this.workers[i2].terminate();
|
|
18520
|
-
}
|
|
18521
|
-
}
|
|
18522
|
-
}
|
|
18523
18529
|
function r$1(e3) {
|
|
18524
18530
|
var t2, f2, n2 = "";
|
|
18525
18531
|
if ("string" == typeof e3 || "number" == typeof e3)
|
|
@@ -132657,16 +132663,16 @@ function addDecoder(cases, importFn) {
|
|
|
132657
132663
|
}
|
|
132658
132664
|
cases.forEach((c) => registry$1.set(c, importFn));
|
|
132659
132665
|
}
|
|
132660
|
-
addDecoder([void 0, 1], () => import("./raw-
|
|
132661
|
-
addDecoder(5, () => import("./lzw-
|
|
132666
|
+
addDecoder([void 0, 1], () => import("./raw-1b039310.js").then((m) => m.default));
|
|
132667
|
+
addDecoder(5, () => import("./lzw-5206f32d.js").then((m) => m.default));
|
|
132662
132668
|
addDecoder(6, () => {
|
|
132663
132669
|
throw new Error("old style JPEG compression is not supported.");
|
|
132664
132670
|
});
|
|
132665
|
-
addDecoder(7, () => import("./jpeg-
|
|
132666
|
-
addDecoder([8, 32946], () => import("./deflate-
|
|
132667
|
-
addDecoder(32773, () => import("./packbits-
|
|
132668
|
-
addDecoder(34887, () => import("./lerc-
|
|
132669
|
-
addDecoder(50001, () => import("./webimage-
|
|
132671
|
+
addDecoder(7, () => import("./jpeg-a2f977d0.js").then((m) => m.default));
|
|
132672
|
+
addDecoder([8, 32946], () => import("./deflate-05e3ee40.js").then((m) => m.default));
|
|
132673
|
+
addDecoder(32773, () => import("./packbits-5812e06c.js").then((m) => m.default));
|
|
132674
|
+
addDecoder(34887, () => import("./lerc-0d65f0a5.js").then((m) => m.default));
|
|
132675
|
+
addDecoder(50001, () => import("./webimage-199d4de9.js").then((m) => m.default));
|
|
132670
132676
|
function decodeRowAcc(row, stride) {
|
|
132671
132677
|
let length2 = row.length - stride;
|
|
132672
132678
|
let offset5 = 0;
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as inflate_1 } from "./pako.esm-68f84e2a.js";
|
|
2
|
-
import { g as getDefaultExportFromCjs, B as BaseDecoder } from "./index-
|
|
2
|
+
import { g as getDefaultExportFromCjs, B as BaseDecoder } from "./index-edc6cc12.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "@vitessce/vit-s";
|
|
5
5
|
import "react-dom";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import React, { useState, useCallback, useMemo, } from 'react';
|
|
3
3
|
import { TitleInfo, useDeckCanvasSize, useGetObsMembership, useGetObsInfo, useReady, useUrls, useObsSetsData, useObsFeatureMatrixData, useUint8ObsFeatureMatrix, useMultiObsLabels, useFeatureLabelsData, useCoordination, useLoaders, useSetComponentHover, useSetComponentViewInfo, } from '@vitessce/vit-s';
|
|
4
|
-
import { pluralize as plur, capitalize, commaNumber
|
|
5
|
-
import { mergeObsSets, findLongestCommonPath } from '@vitessce/sets-utils';
|
|
4
|
+
import { pluralize as plur, capitalize, commaNumber } from '@vitessce/utils';
|
|
5
|
+
import { mergeObsSets, findLongestCommonPath, getCellColors } from '@vitessce/sets-utils';
|
|
6
6
|
import { COMPONENT_COORDINATION_TYPES, ViewType } from '@vitessce/constants-internal';
|
|
7
7
|
import { Legend } from '@vitessce/legend';
|
|
8
8
|
import Heatmap from './Heatmap.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitessce/heatmap",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.4",
|
|
4
4
|
"author": "Gehlenborg Lab",
|
|
5
5
|
"homepage": "http://vitessce.io",
|
|
6
6
|
"repository": {
|
|
@@ -20,14 +20,14 @@
|
|
|
20
20
|
"lodash-es": "^4.17.21",
|
|
21
21
|
"uuid": "^9.0.0",
|
|
22
22
|
"react-aria": "^3.28.0",
|
|
23
|
-
"@vitessce/constants-internal": "3.3.
|
|
24
|
-
"@vitessce/
|
|
25
|
-
"@vitessce/legend": "3.3.
|
|
26
|
-
"@vitessce/tooltip": "3.3.
|
|
27
|
-
"@vitessce/
|
|
28
|
-
"@vitessce/
|
|
29
|
-
"@vitessce/
|
|
30
|
-
"@vitessce/
|
|
23
|
+
"@vitessce/constants-internal": "3.3.4",
|
|
24
|
+
"@vitessce/gl": "3.3.4",
|
|
25
|
+
"@vitessce/legend": "3.3.4",
|
|
26
|
+
"@vitessce/tooltip": "3.3.4",
|
|
27
|
+
"@vitessce/sets-utils": "3.3.4",
|
|
28
|
+
"@vitessce/utils": "3.3.4",
|
|
29
|
+
"@vitessce/vit-s": "3.3.4",
|
|
30
|
+
"@vitessce/workers": "3.3.4"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@testing-library/jest-dom": "^5.16.4",
|
package/src/HeatmapSubscriber.js
CHANGED
|
@@ -16,8 +16,8 @@ import {
|
|
|
16
16
|
useCoordination, useLoaders,
|
|
17
17
|
useSetComponentHover, useSetComponentViewInfo,
|
|
18
18
|
} from '@vitessce/vit-s';
|
|
19
|
-
import { pluralize as plur, capitalize, commaNumber
|
|
20
|
-
import { mergeObsSets, findLongestCommonPath } from '@vitessce/sets-utils';
|
|
19
|
+
import { pluralize as plur, capitalize, commaNumber } from '@vitessce/utils';
|
|
20
|
+
import { mergeObsSets, findLongestCommonPath, getCellColors } from '@vitessce/sets-utils';
|
|
21
21
|
import { COMPONENT_COORDINATION_TYPES, ViewType } from '@vitessce/constants-internal';
|
|
22
22
|
import { Legend } from '@vitessce/legend';
|
|
23
23
|
import Heatmap from './Heatmap.js';
|