@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/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-20c94d37.js";
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,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-20c94d37.js";
1
+ import { B as BaseDecoder } from "./index-ecfc14b5.js";
2
2
  import "react";
3
3
  const dctZigZag = new Int32Array([
4
4
  0,
@@ -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-20c94d37.js";
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,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-20c94d37.js";
1
+ import { B as BaseDecoder } from "./index-ecfc14b5.js";
2
2
  import "react";
3
3
  const MIN_BITS = 9;
4
4
  const CLEAR_CODE = 256;
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-20c94d37.js";
1
+ import { B as BaseDecoder } from "./index-ecfc14b5.js";
2
2
  import "react";
3
3
  class PackbitsDecoder extends BaseDecoder {
4
4
  decodeBlock(buffer) {
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-20c94d37.js";
1
+ import { B as BaseDecoder } from "./index-ecfc14b5.js";
2
2
  import "react";
3
3
  class RawDecoder extends BaseDecoder {
4
4
  decodeBlock(buffer) {
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-20c94d37.js";
1
+ import { B as BaseDecoder } from "./index-ecfc14b5.js";
2
2
  import "react";
3
3
  class WebImageDecoder extends BaseDecoder {
4
4
  constructor() {
@@ -1 +1 @@
1
- {"version":3,"file":"layer-controller.d.ts","sourceRoot":"","sources":["../src/layer-controller.js"],"names":[],"mappings":"AAaA;;;;;;;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
+ {"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 === 'light' && arr?.every(i => i === 255))
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",
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.3",
24
- "@vitessce/utils": "3.3.3",
25
- "@vitessce/zarr-utils": "3.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",
@@ -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 === 'light' && arr?.every(i => i === 255))
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 }) {