@vitessce/gl 3.6.14 → 3.6.16

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.
@@ -1,5 +1,5 @@
1
1
  import { i as inflate_1 } from "./pako.esm-SxljTded.js";
2
- import { B as BaseDecoder } from "./index-a7_YaihO.js";
2
+ import { B as BaseDecoder } from "./index-BDUyhk4k.js";
3
3
  class DeflateDecoder extends BaseDecoder {
4
4
  decodeBlock(buffer) {
5
5
  return inflate_1(new Uint8Array(buffer)).buffer;
@@ -105575,22 +105575,22 @@ async function getDecoder(fileDirectory) {
105575
105575
  const Decoder = await importFn();
105576
105576
  return new Decoder(fileDirectory);
105577
105577
  }
105578
- addDecoder([void 0, 1], () => import("./raw-DPrnB5GX.js").then((m) => m.default));
105579
- addDecoder(5, () => import("./lzw-D4Qwk2Te.js").then((m) => m.default));
105578
+ addDecoder([void 0, 1], () => import("./raw-DsWQQPj3.js").then((m) => m.default));
105579
+ addDecoder(5, () => import("./lzw-DciTuXP7.js").then((m) => m.default));
105580
105580
  addDecoder(6, () => {
105581
105581
  throw new Error("old style JPEG compression is not supported.");
105582
105582
  });
105583
- addDecoder(7, () => import("./jpeg-BwVvOAA3.js").then((m) => m.default));
105584
- addDecoder([8, 32946], () => import("./deflate-cvpHBVjf.js").then((m) => m.default));
105585
- addDecoder(32773, () => import("./packbits-DxtUONVW.js").then((m) => m.default));
105583
+ addDecoder(7, () => import("./jpeg-C1pGAkrD.js").then((m) => m.default));
105584
+ addDecoder([8, 32946], () => import("./deflate-CdqU3BKr.js").then((m) => m.default));
105585
+ addDecoder(32773, () => import("./packbits-v_UTB8wP.js").then((m) => m.default));
105586
105586
  addDecoder(
105587
105587
  34887,
105588
- () => import("./lerc-BYupqDZR.js").then(async (m) => {
105588
+ () => import("./lerc-DJ_lNURz.js").then(async (m) => {
105589
105589
  await m.zstd.init();
105590
105590
  return m;
105591
105591
  }).then((m) => m.default)
105592
105592
  );
105593
- addDecoder(50001, () => import("./webimage-CneQn29x.js").then((m) => m.default));
105593
+ addDecoder(50001, () => import("./webimage-BnADAK1o.js").then((m) => m.default));
105594
105594
  function copyNewSize(array, width, height, samplesPerPixel = 1) {
105595
105595
  return new (Object.getPrototypeOf(array)).constructor(width * height * samplesPerPixel);
105596
105596
  }
@@ -122925,10 +122925,10 @@ function multiSetsToTextureData(multiFeatureValues, multiMatrixObsIndex, setColo
122925
122925
  channelIsSetColorMode.forEach((isSetColorMode, channelIndex) => {
122926
122926
  var _a3, _b2, _c, _d;
122927
122927
  if (isSetColorMode) {
122928
- totalColorsLength += (((_b2 = (_a3 = setColorValues[channelIndex]) == null ? void 0 : _a3.setColors) == null ? void 0 : _b2.length) || 0) * 3;
122928
+ totalColorsLength += (((_b2 = (_a3 = setColorValues[channelIndex]) == null ? void 0 : _a3.setColors) == null ? void 0 : _b2.length) ?? 0) * 3;
122929
122929
  totalValuesLength += ((_c = setColorValues[channelIndex]) == null ? void 0 : _c.obsIndex) ? max(setColorValues[channelIndex].obsIndex.map((d) => parseInt(d))) : 0;
122930
122930
  } else {
122931
- totalValuesLength += multiMatrixObsIndex[channelIndex] ? max(multiMatrixObsIndex[channelIndex].map((d) => parseInt(d))) : ((_d = multiFeatureValues[channelIndex]) == null ? void 0 : _d.length) || 0;
122931
+ totalValuesLength += multiMatrixObsIndex[channelIndex] ? max(multiMatrixObsIndex[channelIndex].map((d) => parseInt(d))) : ((_d = multiFeatureValues[channelIndex]) == null ? void 0 : _d.length) ?? 0;
122932
122932
  }
122933
122933
  });
122934
122934
  const valueTexHeight = Math.max(2, Math.ceil(totalValuesLength / texSize));
@@ -122949,7 +122949,7 @@ function multiSetsToTextureData(multiFeatureValues, multiMatrixObsIndex, setColo
122949
122949
  const matrixObsIndex = multiMatrixObsIndex[channelIndex];
122950
122950
  const bitmaskValueIsIndex = matrixObsIndex === null;
122951
122951
  if (isSetColorMode) {
122952
- const { setColorIndices, setColors, obsIndex } = setColorValues[channelIndex] || {};
122952
+ const { setColorIndices, setColors, obsIndex } = setColorValues[channelIndex] ?? {};
122953
122953
  if (setColorIndices && setColors && obsIndex) {
122954
122954
  for (let i2 = 0; i2 < obsIndex.length; i2++) {
122955
122955
  let obsId = String(i2 + 1);
@@ -122973,7 +122973,7 @@ function multiSetsToTextureData(multiFeatureValues, multiMatrixObsIndex, setColo
122973
122973
  indexOffset += (obsIndex == null ? void 0 : obsIndex.length) || 0;
122974
122974
  colorOffset += (setColors == null ? void 0 : setColors.length) || 0;
122975
122975
  } else {
122976
- const featureArr = multiFeatureValues[channelIndex];
122976
+ const featureArr = multiFeatureValues[channelIndex] ?? [];
122977
122977
  const normalizedFeatureArr = normalize(featureArr);
122978
122978
  if (!bitmaskValueIsIndex && matrixObsIndex) {
122979
122979
  for (let i2 = 0; i2 < matrixObsIndex.length; i2++) {
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { f as distEs6Exports } from "./index-a7_YaihO.js";
2
- import { p, o, A, s, r, q, i, j, l, C, m, D, G, e, H, c, M, k, n, d, P, S, h, T, u, b, t, w, v } from "./index-a7_YaihO.js";
1
+ import { f as distEs6Exports } from "./index-BDUyhk4k.js";
2
+ import { p, o, A, s, r, q, i, j, l, C, m, D, G, e, H, c, M, k, n, d, P, S, h, T, u, b, t, w, v } from "./index-BDUyhk4k.js";
3
3
  const SELECTION_TYPE = distEs6Exports.SELECTION_TYPE;
4
4
  export {
5
5
  p as AXIS_FONT_FAMILY,
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-a7_YaihO.js";
1
+ import { B as BaseDecoder } from "./index-BDUyhk4k.js";
2
2
  const dctZigZag = new Int32Array([
3
3
  0,
4
4
  1,
@@ -1,5 +1,5 @@
1
1
  import { i as inflate_1 } from "./pako.esm-SxljTded.js";
2
- import { g as getDefaultExportFromCjs, B as BaseDecoder, L as LercParameters, a as LercAddCompression } from "./index-a7_YaihO.js";
2
+ import { g as getDefaultExportFromCjs, B as BaseDecoder, L as LercParameters, a as LercAddCompression } from "./index-BDUyhk4k.js";
3
3
  var LercDecode = { exports: {} };
4
4
  var hasRequiredLercDecode;
5
5
  function requireLercDecode() {
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-a7_YaihO.js";
1
+ import { B as BaseDecoder } from "./index-BDUyhk4k.js";
2
2
  const MIN_BITS = 9;
3
3
  const CLEAR_CODE = 256;
4
4
  const EOI_CODE = 257;
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-a7_YaihO.js";
1
+ import { B as BaseDecoder } from "./index-BDUyhk4k.js";
2
2
  class PackbitsDecoder extends BaseDecoder {
3
3
  decodeBlock(buffer) {
4
4
  const dataView = new DataView(buffer);
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-a7_YaihO.js";
1
+ import { B as BaseDecoder } from "./index-BDUyhk4k.js";
2
2
  class RawDecoder extends BaseDecoder {
3
3
  decodeBlock(buffer) {
4
4
  return buffer;
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-a7_YaihO.js";
1
+ import { B as BaseDecoder } from "./index-BDUyhk4k.js";
2
2
  class WebImageDecoder extends BaseDecoder {
3
3
  constructor() {
4
4
  super();
@@ -24,7 +24,7 @@ export function multiSetsToTextureData(multiFeatureValues, multiMatrixObsIndex,
24
24
  channelIsSetColorMode.forEach((isSetColorMode, channelIndex) => {
25
25
  if (isSetColorMode) {
26
26
  // totalValuesLength += setColorValues[channelIndex]?.obsIndex?.length || 0;
27
- totalColorsLength += (setColorValues[channelIndex]?.setColors?.length || 0) * 3;
27
+ totalColorsLength += (setColorValues[channelIndex]?.setColors?.length ?? 0) * 3;
28
28
  // TODO: if we can assume values are monotonically increasing,
29
29
  // we can just use the final array value arr[-1] directly as the max.
30
30
  totalValuesLength += (setColorValues[channelIndex]?.obsIndex
@@ -37,7 +37,7 @@ export function multiSetsToTextureData(multiFeatureValues, multiMatrixObsIndex,
37
37
  // we can just use the final array value arr[-1] directly as the max.
38
38
  totalValuesLength += (multiMatrixObsIndex[channelIndex]
39
39
  ? d3_max(multiMatrixObsIndex[channelIndex].map(d => parseInt(d)))
40
- : (multiFeatureValues[channelIndex]?.length || 0));
40
+ : (multiFeatureValues[channelIndex]?.length ?? 0));
41
41
  }
42
42
  });
43
43
  const valueTexHeight = Math.max(2, Math.ceil(totalValuesLength / texSize));
@@ -63,7 +63,7 @@ export function multiSetsToTextureData(multiFeatureValues, multiMatrixObsIndex,
63
63
  // Assume the bitmask values correspond to the values in the matrixObsIndex (off by one).
64
64
  const bitmaskValueIsIndex = matrixObsIndex === null;
65
65
  if (isSetColorMode) {
66
- const { setColorIndices, setColors, obsIndex } = setColorValues[channelIndex] || {};
66
+ const { setColorIndices, setColors, obsIndex } = setColorValues[channelIndex] ?? {};
67
67
  if (setColorIndices && setColors && obsIndex) {
68
68
  for (let i = 0; i < obsIndex.length; i++) {
69
69
  let obsId = String(i + 1);
@@ -94,7 +94,7 @@ export function multiSetsToTextureData(multiFeatureValues, multiMatrixObsIndex,
94
94
  colorOffset += (setColors?.length || 0);
95
95
  }
96
96
  else {
97
- const featureArr = multiFeatureValues[channelIndex];
97
+ const featureArr = multiFeatureValues[channelIndex] ?? [];
98
98
  const normalizedFeatureArr = normalize(featureArr);
99
99
  if (!bitmaskValueIsIndex && matrixObsIndex) {
100
100
  // We cannot assume that the values in the bitmask
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitessce/gl",
3
- "version": "3.6.14",
3
+ "version": "3.6.16",
4
4
  "author": "HIDIVE Lab at HMS",
5
5
  "homepage": "http://vitessce.io",
6
6
  "repository": {
@@ -56,8 +56,8 @@
56
56
  "math.gl": "^3.5.6",
57
57
  "mathjs": "^9.2.0",
58
58
  "nebula.gl": "0.23.8",
59
- "@vitessce/utils": "3.6.14",
60
- "@vitessce/globals": "3.6.14"
59
+ "@vitessce/utils": "3.6.16",
60
+ "@vitessce/globals": "3.6.16"
61
61
  },
62
62
  "devDependencies": {
63
63
  "glsl-colormap": "^1.0.1",
@@ -32,7 +32,7 @@ export function multiSetsToTextureData(
32
32
  channelIsSetColorMode.forEach((isSetColorMode, channelIndex) => {
33
33
  if (isSetColorMode) {
34
34
  // totalValuesLength += setColorValues[channelIndex]?.obsIndex?.length || 0;
35
- totalColorsLength += (setColorValues[channelIndex]?.setColors?.length || 0) * 3;
35
+ totalColorsLength += (setColorValues[channelIndex]?.setColors?.length ?? 0) * 3;
36
36
 
37
37
  // TODO: if we can assume values are monotonically increasing,
38
38
  // we can just use the final array value arr[-1] directly as the max.
@@ -49,7 +49,7 @@ export function multiSetsToTextureData(
49
49
  totalValuesLength += (
50
50
  multiMatrixObsIndex[channelIndex]
51
51
  ? d3_max(multiMatrixObsIndex[channelIndex].map(d => parseInt(d)))
52
- : (multiFeatureValues[channelIndex]?.length || 0)
52
+ : (multiFeatureValues[channelIndex]?.length ?? 0)
53
53
  );
54
54
  }
55
55
  });
@@ -79,7 +79,7 @@ export function multiSetsToTextureData(
79
79
  // Assume the bitmask values correspond to the values in the matrixObsIndex (off by one).
80
80
  const bitmaskValueIsIndex = matrixObsIndex === null;
81
81
  if (isSetColorMode) {
82
- const { setColorIndices, setColors, obsIndex } = setColorValues[channelIndex] || {};
82
+ const { setColorIndices, setColors, obsIndex } = setColorValues[channelIndex] ?? {};
83
83
  if (setColorIndices && setColors && obsIndex) {
84
84
  for (let i = 0; i < obsIndex.length; i++) {
85
85
  let obsId = String(i + 1);
@@ -109,7 +109,7 @@ export function multiSetsToTextureData(
109
109
  indexOffset += (obsIndex?.length || 0);
110
110
  colorOffset += (setColors?.length || 0);
111
111
  } else {
112
- const featureArr = multiFeatureValues[channelIndex];
112
+ const featureArr = multiFeatureValues[channelIndex] ?? [];
113
113
  const normalizedFeatureArr = normalize(featureArr);
114
114
 
115
115
  if (!bitmaskValueIsIndex && matrixObsIndex) {