@vitessce/heatmap 3.6.13 → 3.6.15

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-CKyU9G5F.js";
2
+ import { B as BaseDecoder } from "./index-C1af7JPH.js";
3
3
  class DeflateDecoder extends BaseDecoder {
4
4
  decodeBlock(buffer) {
5
5
  return inflate_1(new Uint8Array(buffer)).buffer;
@@ -9617,6 +9617,7 @@ const FileType$1 = {
9617
9617
  OBS_SPOTS_SPATIALDATA_ZARR: "obsSpots.spatialdata.zarr",
9618
9618
  FEATURE_LABELS_SPATIALDATA_ZARR: "featureLabels.spatialdata.zarr",
9619
9619
  OBS_POINTS_SPATIALDATA_ZARR: "obsPoints.spatialdata.zarr",
9620
+ OBS_EMBEDDING_SPATIALDATA_ZARR: "obsEmbedding.spatialdata.zarr",
9620
9621
  // SpatialData - zipped
9621
9622
  IMAGE_SPATIALDATA_ZARR_ZIP: "image.spatialdata.zarr.zip",
9622
9623
  LABELS_SPATIALDATA_ZARR_ZIP: "labels.spatialdata.zarr.zip",
@@ -9626,6 +9627,7 @@ const FileType$1 = {
9626
9627
  OBS_SPOTS_SPATIALDATA_ZARR_ZIP: "obsSpots.spatialdata.zarr.zip",
9627
9628
  FEATURE_LABELS_SPATIALDATA_ZARR_ZIP: "featureLabels.spatialdata.zarr.zip",
9628
9629
  OBS_POINTS_SPATIALDATA_ZARR_ZIP: "obsPoints.spatialdata.zarr.zip",
9630
+ OBS_EMBEDDING_SPATIALDATA_ZARR_ZIP: "obsEmbedding.spatialdata.zarr.zip",
9629
9631
  // MuData
9630
9632
  OBS_FEATURE_MATRIX_MUDATA_ZARR: "obsFeatureMatrix.mudata.zarr",
9631
9633
  OBS_SETS_MUDATA_ZARR: "obsSets.mudata.zarr",
@@ -9876,6 +9878,7 @@ const ViewHelpMapping = {
9876
9878
  [FileType$1.OBS_SETS_SPATIALDATA_ZARR]: DataType$2.OBS_SETS,
9877
9879
  [FileType$1.FEATURE_LABELS_SPATIALDATA_ZARR]: DataType$2.FEATURE_LABELS,
9878
9880
  [FileType$1.OBS_POINTS_SPATIALDATA_ZARR]: DataType$2.OBS_POINTS,
9881
+ [FileType$1.OBS_EMBEDDING_SPATIALDATA_ZARR]: DataType$2.OBS_EMBEDDING,
9879
9882
  // For new file types to support old file types
9880
9883
  [FileType$1.OBS_EMBEDDING_CELLS_JSON]: DataType$2.OBS_EMBEDDING,
9881
9884
  [FileType$1.OBS_LOCATIONS_CELLS_JSON]: DataType$2.OBS_LOCATIONS,
@@ -10052,6 +10055,9 @@ const ViewHelpMapping = {
10052
10055
  },
10053
10056
  [FileType$1.OBS_POINTS_SPATIALDATA_ZARR]: {
10054
10057
  zip: FileType$1.OBS_POINTS_SPATIALDATA_ZARR_ZIP
10058
+ },
10059
+ [FileType$1.OBS_EMBEDDING_SPATIALDATA_ZARR]: {
10060
+ zip: FileType$1.OBS_EMBEDDING_SPATIALDATA_ZARR_ZIP
10055
10061
  }
10056
10062
  });
10057
10063
  [
@@ -11099,6 +11105,16 @@ const obsSetsSpatialdataSchema = z.object({
11099
11105
  tablePath: z.string().optional().describe("The path to a table which contains the index for the set values."),
11100
11106
  obsSets: annDataObsSetsArr
11101
11107
  });
11108
+ annDataObsEmbedding.extend({
11109
+ // We extend anndataObsEmbedding which already has properties like `dims` and `path`.
11110
+ region: z.string().describe("The name of a region to use to filter instances (i.e., rows) in the table").optional(),
11111
+ tablePath: z.string().optional().describe("The path to a table which contains the index for the set values.")
11112
+ });
11113
+ const obsEmbeddingSpatialdataSchemaConvenience = z.union([
11114
+ annDataObsEmbedding,
11115
+ // For convenience, allow an array of items with `embeddingType` properties.
11116
+ z.array(annDataConvenienceObsEmbeddingItem)
11117
+ ]);
11102
11118
  z.object({
11103
11119
  targetX: z.number(),
11104
11120
  targetY: z.number(),
@@ -11207,9 +11223,10 @@ z.object({
11207
11223
  // TODO: obsPoints
11208
11224
  // TODO: obsLocations
11209
11225
  obsSets: obsSetsSpatialdataSchema,
11210
- // TODO: obsEmbedding
11226
+ obsEmbedding: obsEmbeddingSpatialdataSchemaConvenience,
11211
11227
  // TODO: obsLabels
11212
11228
  // TODO: featureLabels
11229
+ // TODO: allow specifying tablePath and region at the top-level here.
11213
11230
  coordinateSystem: z.string().optional().describe("The name of a coordinate transformation output used to transform all elements which lack a per-element coordinateSystem property.")
11214
11231
  }).partial();
11215
11232
  z.object({
@@ -33712,6 +33729,8 @@ function Legend(props) {
33712
33729
  featureSelectionLabelRawStr = "Sum of features";
33713
33730
  } else if (featureAggregationStrategy === "mean") {
33714
33731
  featureSelectionLabelRawStr = "Mean of features";
33732
+ } else {
33733
+ featureSelectionLabelRawStr = featureSelectionLabelRaw == null ? void 0 : featureSelectionLabelRaw[0];
33715
33734
  }
33716
33735
  const combinedMissing = combineMissings(missing, featureAggregationStrategy);
33717
33736
  const featureSelectionLabel = combinedMissing ? `${featureSelectionLabelRawStr} (${Math.round(combinedMissing * 100)}% NaN)` : featureSelectionLabelRawStr;
@@ -137781,22 +137800,22 @@ function addDecoder(cases, importFn) {
137781
137800
  }
137782
137801
  cases.forEach((c) => registry$1.set(c, importFn));
137783
137802
  }
137784
- addDecoder([void 0, 1], () => import("./raw-D7AT3QBM.js").then((m) => m.default));
137785
- addDecoder(5, () => import("./lzw-B40RInbs.js").then((m) => m.default));
137803
+ addDecoder([void 0, 1], () => import("./raw-tr07gm2Y.js").then((m) => m.default));
137804
+ addDecoder(5, () => import("./lzw-CvkIL6nh.js").then((m) => m.default));
137786
137805
  addDecoder(6, () => {
137787
137806
  throw new Error("old style JPEG compression is not supported.");
137788
137807
  });
137789
- addDecoder(7, () => import("./jpeg-CZX-agQp.js").then((m) => m.default));
137790
- addDecoder([8, 32946], () => import("./deflate-5WdyZc_p.js").then((m) => m.default));
137791
- addDecoder(32773, () => import("./packbits-q39Eb8Qb.js").then((m) => m.default));
137808
+ addDecoder(7, () => import("./jpeg-CpmVJ42X.js").then((m) => m.default));
137809
+ addDecoder([8, 32946], () => import("./deflate-BPUN1lvi.js").then((m) => m.default));
137810
+ addDecoder(32773, () => import("./packbits-B-NeN4CG.js").then((m) => m.default));
137792
137811
  addDecoder(
137793
137812
  34887,
137794
- () => import("./lerc-IORPHcSy.js").then(async (m) => {
137813
+ () => import("./lerc-CPHfI-f2.js").then(async (m) => {
137795
137814
  await m.zstd.init();
137796
137815
  return m;
137797
137816
  }).then((m) => m.default)
137798
137817
  );
137799
- addDecoder(50001, () => import("./webimage-C8FEIC0H.js").then((m) => m.default));
137818
+ addDecoder(50001, () => import("./webimage-D-qAx2Yj.js").then((m) => m.default));
137800
137819
  function decodeRowAcc(row, stride) {
137801
137820
  let length2 = row.length - stride;
137802
137821
  let offset2 = 0;
@@ -147782,10 +147801,10 @@ function multiSetsToTextureData(multiFeatureValues, multiMatrixObsIndex, setColo
147782
147801
  channelIsSetColorMode.forEach((isSetColorMode, channelIndex) => {
147783
147802
  var _a3, _b2, _c, _d;
147784
147803
  if (isSetColorMode) {
147785
- totalColorsLength += (((_b2 = (_a3 = setColorValues[channelIndex]) == null ? void 0 : _a3.setColors) == null ? void 0 : _b2.length) || 0) * 3;
147804
+ totalColorsLength += (((_b2 = (_a3 = setColorValues[channelIndex]) == null ? void 0 : _a3.setColors) == null ? void 0 : _b2.length) ?? 0) * 3;
147786
147805
  totalValuesLength += ((_c = setColorValues[channelIndex]) == null ? void 0 : _c.obsIndex) ? max(setColorValues[channelIndex].obsIndex.map((d) => parseInt(d))) : 0;
147787
147806
  } else {
147788
- totalValuesLength += multiMatrixObsIndex[channelIndex] ? max(multiMatrixObsIndex[channelIndex].map((d) => parseInt(d))) : ((_d = multiFeatureValues[channelIndex]) == null ? void 0 : _d.length) || 0;
147807
+ totalValuesLength += multiMatrixObsIndex[channelIndex] ? max(multiMatrixObsIndex[channelIndex].map((d) => parseInt(d))) : ((_d = multiFeatureValues[channelIndex]) == null ? void 0 : _d.length) ?? 0;
147789
147808
  }
147790
147809
  });
147791
147810
  const valueTexHeight = Math.max(2, Math.ceil(totalValuesLength / texSize));
@@ -147806,7 +147825,7 @@ function multiSetsToTextureData(multiFeatureValues, multiMatrixObsIndex, setColo
147806
147825
  const matrixObsIndex = multiMatrixObsIndex[channelIndex];
147807
147826
  const bitmaskValueIsIndex = matrixObsIndex === null;
147808
147827
  if (isSetColorMode) {
147809
- const { setColorIndices, setColors, obsIndex } = setColorValues[channelIndex] || {};
147828
+ const { setColorIndices, setColors, obsIndex } = setColorValues[channelIndex] ?? {};
147810
147829
  if (setColorIndices && setColors && obsIndex) {
147811
147830
  for (let i2 = 0; i2 < obsIndex.length; i2++) {
147812
147831
  let obsId = String(i2 + 1);
@@ -147830,7 +147849,7 @@ function multiSetsToTextureData(multiFeatureValues, multiMatrixObsIndex, setColo
147830
147849
  indexOffset += (obsIndex == null ? void 0 : obsIndex.length) || 0;
147831
147850
  colorOffset += (setColors == null ? void 0 : setColors.length) || 0;
147832
147851
  } else {
147833
- const featureArr = multiFeatureValues[channelIndex];
147852
+ const featureArr = multiFeatureValues[channelIndex] ?? [];
147834
147853
  const normalizedFeatureArr = normalize(featureArr);
147835
147854
  if (!bitmaskValueIsIndex && matrixObsIndex) {
147836
147855
  for (let i2 = 0; i2 < matrixObsIndex.length; i2++) {
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { a, H } from "./index-CKyU9G5F.js";
1
+ import { a, H } from "./index-C1af7JPH.js";
2
2
  export {
3
3
  a as Heatmap,
4
4
  H as HeatmapSubscriber
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-CKyU9G5F.js";
1
+ import { B as BaseDecoder } from "./index-C1af7JPH.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 } from "./index-CKyU9G5F.js";
2
+ import { g as getDefaultExportFromCjs, B as BaseDecoder } from "./index-C1af7JPH.js";
3
3
  const LercParameters = {
4
4
  AddCompression: 1
5
5
  };
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-CKyU9G5F.js";
1
+ import { B as BaseDecoder } from "./index-C1af7JPH.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-CKyU9G5F.js";
1
+ import { B as BaseDecoder } from "./index-C1af7JPH.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-CKyU9G5F.js";
1
+ import { B as BaseDecoder } from "./index-C1af7JPH.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-CKyU9G5F.js";
1
+ import { B as BaseDecoder } from "./index-C1af7JPH.js";
2
2
  class WebImageDecoder extends BaseDecoder {
3
3
  constructor() {
4
4
  super();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitessce/heatmap",
3
- "version": "3.6.13",
3
+ "version": "3.6.15",
4
4
  "author": "HIDIVE Lab at HMS",
5
5
  "homepage": "http://vitessce.io",
6
6
  "repository": {
@@ -19,15 +19,15 @@
19
19
  "lodash-es": "^4.17.21",
20
20
  "uuid": "^9.0.0",
21
21
  "react-aria": "^3.28.0",
22
- "@vitessce/styles": "3.6.13",
23
- "@vitessce/constants-internal": "3.6.13",
24
- "@vitessce/gl": "3.6.13",
25
- "@vitessce/legend": "3.6.13",
26
- "@vitessce/sets-utils": "3.6.13",
27
- "@vitessce/tooltip": "3.6.13",
28
- "@vitessce/utils": "3.6.13",
29
- "@vitessce/vit-s": "3.6.13",
30
- "@vitessce/workers": "3.6.13"
22
+ "@vitessce/styles": "3.6.15",
23
+ "@vitessce/constants-internal": "3.6.15",
24
+ "@vitessce/gl": "3.6.15",
25
+ "@vitessce/legend": "3.6.15",
26
+ "@vitessce/sets-utils": "3.6.15",
27
+ "@vitessce/tooltip": "3.6.15",
28
+ "@vitessce/utils": "3.6.15",
29
+ "@vitessce/vit-s": "3.6.15",
30
+ "@vitessce/workers": "3.6.15"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@testing-library/jest-dom": "^6.6.3",