@vitessce/spatial-utils 3.3.3 → 3.3.5
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-f0db96f7.js → deflate-91360e96.js} +1 -1
- package/dist/{index-20c94d37.js → index-ecfc14b5.js} +7184 -21705
- package/dist/index.js +1 -1
- package/dist/{jpeg-a983c5fa.js → jpeg-8a56f635.js} +1 -1
- package/dist/{lerc-302d4191.js → lerc-cafe8298.js} +1 -1
- package/dist/{lzw-e7880394.js → lzw-a029f738.js} +1 -1
- package/dist/{packbits-17057e1d.js → packbits-1048f7af.js} +1 -1
- package/dist/{raw-e5bd3ae5.js → raw-862c78b4.js} +1 -1
- package/dist/{webimage-c3b216cf.js → webimage-452cf0ca.js} +1 -1
- package/dist-tsc/layer-controller.d.ts.map +1 -1
- package/dist-tsc/layer-controller.js +2 -3
- package/package.json +4 -4
- package/src/layer-controller.js +2 -3
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D, e, a, b, c, d, F, G, Z, C, r, n, E, A, y, l, m, z, x, h, q, v, o, i, f, j, k, u, t, p, s, w } from "./index-
|
|
1
|
+
import { D, e, a, b, c, d, F, G, Z, C, r, n, E, A, y, l, m, z, x, h, q, v, o, i, f, j, k, u, t, p, s, w } from "./index-ecfc14b5.js";
|
|
2
2
|
import "react";
|
|
3
3
|
export {
|
|
4
4
|
D as DEFAULT_CELLS_LAYER,
|
|
@@ -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-ecfc14b5.js";
|
|
3
3
|
import "react";
|
|
4
4
|
const LercParameters = {
|
|
5
5
|
Version: 0,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layer-controller.d.ts","sourceRoot":"","sources":["../src/layer-controller.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"layer-controller.d.ts","sourceRoot":"","sources":["../src/layer-controller.js"],"names":[],"mappings":"AAYA;;;;;;;GAOG;AACH,wDAHW,MAAM,GACJ,MAAM,CASlB;AAwED;;;;GAIG;AACH,qDAHW,MAAM,GACJ,MAAM,CAUlB;AAED;;;;GAIG;AACH,wCAHW,MAAM,SAchB;AAED,kDAwBC;AAvJM,qEAKN;AAyEM,sEALI,MAAM,GAGJ,MAAM,CAOlB;AAEM;;;;;;;GAON"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { viv } from '@vitessce/gl';
|
|
2
|
-
import { fromEntries } from '@vitessce/utils';
|
|
3
2
|
import { Matrix4 } from 'math.gl';
|
|
4
3
|
// Returns an rgb string for display, and changes the color (arr)
|
|
5
4
|
// to use a grey for light theme + white color or if the colormap is on.
|
|
6
5
|
export const toRgbUIString = (on, arr, theme) => {
|
|
7
|
-
const color = on || (theme
|
|
6
|
+
const color = on || (theme !== 'dark' && arr?.every(i => i === 255))
|
|
8
7
|
? [220, 220, 220]
|
|
9
8
|
: arr;
|
|
10
9
|
return `rgb(${color})`;
|
|
@@ -23,7 +22,7 @@ export function filterSelection(loader, selection) {
|
|
|
23
22
|
}
|
|
24
23
|
const data = Array.isArray(loader) ? loader[loader.length - 1] : loader;
|
|
25
24
|
const { labels } = data;
|
|
26
|
-
return fromEntries(Object.entries(selection).filter(([key]) => labels.includes(key)));
|
|
25
|
+
return Object.fromEntries(Object.entries(selection).filter(([key]) => labels.includes(key)));
|
|
27
26
|
}
|
|
28
27
|
async function getSingleSelectionStats2D({ loader, selection }) {
|
|
29
28
|
const data = Array.isArray(loader) ? loader[loader.length - 1] : loader;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitessce/spatial-utils",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.5",
|
|
4
4
|
"author": "Gehlenborg Lab",
|
|
5
5
|
"homepage": "http://vitessce.io",
|
|
6
6
|
"repository": {
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
"zarrita": "0.4.0-next.4",
|
|
21
21
|
"math.gl": "^3.5.6",
|
|
22
22
|
"mathjs": "^9.2.0",
|
|
23
|
-
"@vitessce/gl": "3.3.
|
|
24
|
-
"@vitessce/utils": "3.3.
|
|
25
|
-
"@vitessce/zarr-utils": "3.3.
|
|
23
|
+
"@vitessce/gl": "3.3.5",
|
|
24
|
+
"@vitessce/utils": "3.3.5",
|
|
25
|
+
"@vitessce/zarr-utils": "3.3.5"
|
|
26
26
|
},
|
|
27
27
|
"scripts": {
|
|
28
28
|
"bundle": "pnpm exec vite build -c ../../../scripts/vite.config.js",
|
package/src/layer-controller.js
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { viv } from '@vitessce/gl';
|
|
2
|
-
import { fromEntries } from '@vitessce/utils';
|
|
3
2
|
import { Matrix4 } from 'math.gl';
|
|
4
3
|
|
|
5
4
|
// Returns an rgb string for display, and changes the color (arr)
|
|
6
5
|
// to use a grey for light theme + white color or if the colormap is on.
|
|
7
6
|
export const toRgbUIString = (on, arr, theme) => {
|
|
8
|
-
const color = on || (theme
|
|
7
|
+
const color = on || (theme !== 'dark' && arr?.every(i => i === 255))
|
|
9
8
|
? [220, 220, 220]
|
|
10
9
|
: arr;
|
|
11
10
|
return `rgb(${color})`;
|
|
@@ -25,7 +24,7 @@ export function filterSelection(loader, selection) {
|
|
|
25
24
|
}
|
|
26
25
|
const data = Array.isArray(loader) ? loader[loader.length - 1] : loader;
|
|
27
26
|
const { labels } = data;
|
|
28
|
-
return fromEntries(Object.entries(selection).filter(([key]) => labels.includes(key)));
|
|
27
|
+
return Object.fromEntries(Object.entries(selection).filter(([key]) => labels.includes(key)));
|
|
29
28
|
}
|
|
30
29
|
|
|
31
30
|
async function getSingleSelectionStats2D({ loader, selection }) {
|