@vitessce/spatial-utils 3.3.4 → 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-25daa8b4.js → deflate-91360e96.js} +1 -1
- package/dist/{index-a2ef4feb.js → index-ecfc14b5.js} +12 -14
- package/dist/index.js +1 -1
- package/dist/{jpeg-e9fb8e9a.js → jpeg-8a56f635.js} +1 -1
- package/dist/{lerc-5efebb70.js → lerc-cafe8298.js} +1 -1
- package/dist/{lzw-08382ca6.js → lzw-a029f738.js} +1 -1
- package/dist/{packbits-a59501fd.js → packbits-1048f7af.js} +1 -1
- package/dist/{raw-452825c1.js → raw-862c78b4.js} +1 -1
- package/dist/{webimage-3bd5a0ac.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
|
@@ -19937,9 +19937,6 @@ var pluralizeExports = pluralize.exports;
|
|
|
19937
19937
|
const plur = /* @__PURE__ */ getDefaultExportFromCjs(pluralizeExports);
|
|
19938
19938
|
plur.addPluralRule("glomerulus", "glomeruli");
|
|
19939
19939
|
plur.addPluralRule("interstitium", "interstitia");
|
|
19940
|
-
function fromEntries(iterable) {
|
|
19941
|
-
return [...iterable].reduce((obj, { 0: key, 1: val }) => Object.assign(obj, { [key]: val }), {});
|
|
19942
|
-
}
|
|
19943
19940
|
const VIEWER_PALETTE = [
|
|
19944
19941
|
[0, 0, 255],
|
|
19945
19942
|
[0, 255, 0],
|
|
@@ -117965,7 +117962,8 @@ const AXIS_TITLE_TEXT_SIZE = 15;
|
|
|
117965
117962
|
const AXIS_MARGIN = 3;
|
|
117966
117963
|
const THEME_TO_TEXT_COLOR = {
|
|
117967
117964
|
dark: [224, 224, 224],
|
|
117968
|
-
light: [64, 64, 64]
|
|
117965
|
+
light: [64, 64, 64],
|
|
117966
|
+
light2: [64, 64, 64]
|
|
117969
117967
|
};
|
|
117970
117968
|
const AXIS_FONT_FAMILY = "-apple-system, 'Helvetica Neue', Arial, sans-serif";
|
|
117971
117969
|
const PIXELATED_TEXTURE_PARAMETERS = {
|
|
@@ -119068,16 +119066,16 @@ function addDecoder(cases, importFn) {
|
|
|
119068
119066
|
}
|
|
119069
119067
|
cases.forEach((c) => registry$2.set(c, importFn));
|
|
119070
119068
|
}
|
|
119071
|
-
addDecoder([void 0, 1], () => import("./raw-
|
|
119072
|
-
addDecoder(5, () => import("./lzw-
|
|
119069
|
+
addDecoder([void 0, 1], () => import("./raw-862c78b4.js").then((m) => m.default));
|
|
119070
|
+
addDecoder(5, () => import("./lzw-a029f738.js").then((m) => m.default));
|
|
119073
119071
|
addDecoder(6, () => {
|
|
119074
119072
|
throw new Error("old style JPEG compression is not supported.");
|
|
119075
119073
|
});
|
|
119076
|
-
addDecoder(7, () => import("./jpeg-
|
|
119077
|
-
addDecoder([8, 32946], () => import("./deflate-
|
|
119078
|
-
addDecoder(32773, () => import("./packbits-
|
|
119079
|
-
addDecoder(34887, () => import("./lerc-
|
|
119080
|
-
addDecoder(50001, () => import("./webimage-
|
|
119074
|
+
addDecoder(7, () => import("./jpeg-8a56f635.js").then((m) => m.default));
|
|
119075
|
+
addDecoder([8, 32946], () => import("./deflate-91360e96.js").then((m) => m.default));
|
|
119076
|
+
addDecoder(32773, () => import("./packbits-1048f7af.js").then((m) => m.default));
|
|
119077
|
+
addDecoder(34887, () => import("./lerc-cafe8298.js").then((m) => m.default));
|
|
119078
|
+
addDecoder(50001, () => import("./webimage-452cf0ca.js").then((m) => m.default));
|
|
119081
119079
|
function decodeRowAcc(row, stride) {
|
|
119082
119080
|
let length2 = row.length - stride;
|
|
119083
119081
|
let offset = 0;
|
|
@@ -130623,7 +130621,7 @@ class BitmaskLayer2 extends XRLayer {
|
|
|
130623
130621
|
} = this.state;
|
|
130624
130622
|
if (textures && model) {
|
|
130625
130623
|
const scaleFactor = 1 / 2 ** (maxZoom - zoom);
|
|
130626
|
-
const colors = fromEntries(range$5(MAX_CHANNELS).map((i2) => [`color${i2}`, getColor(channelColors[i2])]));
|
|
130624
|
+
const colors = Object.fromEntries(range$5(MAX_CHANNELS).map((i2) => [`color${i2}`, getColor(channelColors[i2])]));
|
|
130627
130625
|
model.setUniforms(Object.assign({}, uniforms, {
|
|
130628
130626
|
...colors,
|
|
130629
130627
|
// Bitmask image channel data textures
|
|
@@ -130775,7 +130773,7 @@ class BitmaskLayer2 extends XRLayer {
|
|
|
130775
130773
|
BitmaskLayer2.layerName = "BitmaskLayer";
|
|
130776
130774
|
BitmaskLayer2.defaultProps = defaultProps;
|
|
130777
130775
|
const toRgbUIString = (on, arr, theme) => {
|
|
130778
|
-
const color = on || theme
|
|
130776
|
+
const color = on || theme !== "dark" && (arr == null ? void 0 : arr.every((i2) => i2 === 255)) ? [220, 220, 220] : arr;
|
|
130779
130777
|
return `rgb(${color})`;
|
|
130780
130778
|
};
|
|
130781
130779
|
function filterSelection(loader, selection) {
|
|
@@ -130784,7 +130782,7 @@ function filterSelection(loader, selection) {
|
|
|
130784
130782
|
}
|
|
130785
130783
|
const data = Array.isArray(loader) ? loader[loader.length - 1] : loader;
|
|
130786
130784
|
const { labels } = data;
|
|
130787
|
-
return fromEntries(Object.entries(selection).filter(([key]) => labels.includes(key)));
|
|
130785
|
+
return Object.fromEntries(Object.entries(selection).filter(([key]) => labels.includes(key)));
|
|
130788
130786
|
}
|
|
130789
130787
|
async function getSingleSelectionStats2D({ loader, selection }) {
|
|
130790
130788
|
const data = Array.isArray(loader) ? loader[loader.length - 1] : loader;
|
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/
|
|
25
|
-
"@vitessce/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 }) {
|