@vitessce/statistical-plots 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-CIqXsmFh.js";
2
+ import { B as BaseDecoder } from "./index-jTgzybKh.js";
3
3
  class DeflateDecoder extends BaseDecoder {
4
4
  decodeBlock(buffer) {
5
5
  return inflate_1(new Uint8Array(buffer)).buffer;
@@ -164,6 +164,7 @@ const FileType$1 = {
164
164
  OBS_SPOTS_SPATIALDATA_ZARR: "obsSpots.spatialdata.zarr",
165
165
  FEATURE_LABELS_SPATIALDATA_ZARR: "featureLabels.spatialdata.zarr",
166
166
  OBS_POINTS_SPATIALDATA_ZARR: "obsPoints.spatialdata.zarr",
167
+ OBS_EMBEDDING_SPATIALDATA_ZARR: "obsEmbedding.spatialdata.zarr",
167
168
  // SpatialData - zipped
168
169
  IMAGE_SPATIALDATA_ZARR_ZIP: "image.spatialdata.zarr.zip",
169
170
  LABELS_SPATIALDATA_ZARR_ZIP: "labels.spatialdata.zarr.zip",
@@ -173,6 +174,7 @@ const FileType$1 = {
173
174
  OBS_SPOTS_SPATIALDATA_ZARR_ZIP: "obsSpots.spatialdata.zarr.zip",
174
175
  FEATURE_LABELS_SPATIALDATA_ZARR_ZIP: "featureLabels.spatialdata.zarr.zip",
175
176
  OBS_POINTS_SPATIALDATA_ZARR_ZIP: "obsPoints.spatialdata.zarr.zip",
177
+ OBS_EMBEDDING_SPATIALDATA_ZARR_ZIP: "obsEmbedding.spatialdata.zarr.zip",
176
178
  // MuData
177
179
  OBS_FEATURE_MATRIX_MUDATA_ZARR: "obsFeatureMatrix.mudata.zarr",
178
180
  OBS_SETS_MUDATA_ZARR: "obsSets.mudata.zarr",
@@ -432,6 +434,7 @@ const ViewHelpMapping = {
432
434
  [FileType$1.OBS_SETS_SPATIALDATA_ZARR]: DataType$2.OBS_SETS,
433
435
  [FileType$1.FEATURE_LABELS_SPATIALDATA_ZARR]: DataType$2.FEATURE_LABELS,
434
436
  [FileType$1.OBS_POINTS_SPATIALDATA_ZARR]: DataType$2.OBS_POINTS,
437
+ [FileType$1.OBS_EMBEDDING_SPATIALDATA_ZARR]: DataType$2.OBS_EMBEDDING,
435
438
  // For new file types to support old file types
436
439
  [FileType$1.OBS_EMBEDDING_CELLS_JSON]: DataType$2.OBS_EMBEDDING,
437
440
  [FileType$1.OBS_LOCATIONS_CELLS_JSON]: DataType$2.OBS_LOCATIONS,
@@ -608,6 +611,9 @@ const ViewHelpMapping = {
608
611
  },
609
612
  [FileType$1.OBS_POINTS_SPATIALDATA_ZARR]: {
610
613
  zip: FileType$1.OBS_POINTS_SPATIALDATA_ZARR_ZIP
614
+ },
615
+ [FileType$1.OBS_EMBEDDING_SPATIALDATA_ZARR]: {
616
+ zip: FileType$1.OBS_EMBEDDING_SPATIALDATA_ZARR_ZIP
611
617
  }
612
618
  });
613
619
  [
@@ -11092,6 +11098,16 @@ const obsSetsSpatialdataSchema = z.object({
11092
11098
  tablePath: z.string().optional().describe("The path to a table which contains the index for the set values."),
11093
11099
  obsSets: annDataObsSetsArr
11094
11100
  });
11101
+ annDataObsEmbedding.extend({
11102
+ // We extend anndataObsEmbedding which already has properties like `dims` and `path`.
11103
+ region: z.string().describe("The name of a region to use to filter instances (i.e., rows) in the table").optional(),
11104
+ tablePath: z.string().optional().describe("The path to a table which contains the index for the set values.")
11105
+ });
11106
+ const obsEmbeddingSpatialdataSchemaConvenience = z.union([
11107
+ annDataObsEmbedding,
11108
+ // For convenience, allow an array of items with `embeddingType` properties.
11109
+ z.array(annDataConvenienceObsEmbeddingItem)
11110
+ ]);
11095
11111
  z.object({
11096
11112
  targetX: z.number(),
11097
11113
  targetY: z.number(),
@@ -11200,9 +11216,10 @@ z.object({
11200
11216
  // TODO: obsPoints
11201
11217
  // TODO: obsLocations
11202
11218
  obsSets: obsSetsSpatialdataSchema,
11203
- // TODO: obsEmbedding
11219
+ obsEmbedding: obsEmbeddingSpatialdataSchemaConvenience,
11204
11220
  // TODO: obsLabels
11205
11221
  // TODO: featureLabels
11222
+ // TODO: allow specifying tablePath and region at the top-level here.
11206
11223
  coordinateSystem: z.string().optional().describe("The name of a coordinate transformation output used to transform all elements which lack a per-element coordinateSystem property.")
11207
11224
  }).partial();
11208
11225
  z.object({
@@ -178720,22 +178737,22 @@ function addDecoder(cases2, importFn) {
178720
178737
  }
178721
178738
  cases2.forEach((c2) => registry$1.set(c2, importFn));
178722
178739
  }
178723
- addDecoder([void 0, 1], () => import("./raw-BMmSKVDS.js").then((m2) => m2.default));
178724
- addDecoder(5, () => import("./lzw-DdkwQP4Y.js").then((m2) => m2.default));
178740
+ addDecoder([void 0, 1], () => import("./raw-DDZdro0w.js").then((m2) => m2.default));
178741
+ addDecoder(5, () => import("./lzw-BeELIhvX.js").then((m2) => m2.default));
178725
178742
  addDecoder(6, () => {
178726
178743
  throw new Error("old style JPEG compression is not supported.");
178727
178744
  });
178728
- addDecoder(7, () => import("./jpeg-B_rzx3DO.js").then((m2) => m2.default));
178729
- addDecoder([8, 32946], () => import("./deflate-Dm0PZc2F.js").then((m2) => m2.default));
178730
- addDecoder(32773, () => import("./packbits-kigCEjo4.js").then((m2) => m2.default));
178745
+ addDecoder(7, () => import("./jpeg-CKLZ6Ujk.js").then((m2) => m2.default));
178746
+ addDecoder([8, 32946], () => import("./deflate-CWzHkMt8.js").then((m2) => m2.default));
178747
+ addDecoder(32773, () => import("./packbits-Dt1MSk9z.js").then((m2) => m2.default));
178731
178748
  addDecoder(
178732
178749
  34887,
178733
- () => import("./lerc-DtYkE7gf.js").then(async (m2) => {
178750
+ () => import("./lerc-Bg8_SUgD.js").then(async (m2) => {
178734
178751
  await m2.zstd.init();
178735
178752
  return m2;
178736
178753
  }).then((m2) => m2.default)
178737
178754
  );
178738
- addDecoder(50001, () => import("./webimage-Ba4jGxpB.js").then((m2) => m2.default));
178755
+ addDecoder(50001, () => import("./webimage-rE8shGdx.js").then((m2) => m2.default));
178739
178756
  function decodeRowAcc(row, stride) {
178740
178757
  let length2 = row.length - stride;
178741
178758
  let offset2 = 0;
@@ -189026,10 +189043,10 @@ function multiSetsToTextureData(multiFeatureValues, multiMatrixObsIndex, setColo
189026
189043
  channelIsSetColorMode.forEach((isSetColorMode, channelIndex) => {
189027
189044
  var _a3, _b2, _c2, _d2;
189028
189045
  if (isSetColorMode) {
189029
- totalColorsLength += (((_b2 = (_a3 = setColorValues[channelIndex]) == null ? void 0 : _a3.setColors) == null ? void 0 : _b2.length) || 0) * 3;
189046
+ totalColorsLength += (((_b2 = (_a3 = setColorValues[channelIndex]) == null ? void 0 : _a3.setColors) == null ? void 0 : _b2.length) ?? 0) * 3;
189030
189047
  totalValuesLength += ((_c2 = setColorValues[channelIndex]) == null ? void 0 : _c2.obsIndex) ? max$3(setColorValues[channelIndex].obsIndex.map((d) => parseInt(d))) : 0;
189031
189048
  } else {
189032
- totalValuesLength += multiMatrixObsIndex[channelIndex] ? max$3(multiMatrixObsIndex[channelIndex].map((d) => parseInt(d))) : ((_d2 = multiFeatureValues[channelIndex]) == null ? void 0 : _d2.length) || 0;
189049
+ totalValuesLength += multiMatrixObsIndex[channelIndex] ? max$3(multiMatrixObsIndex[channelIndex].map((d) => parseInt(d))) : ((_d2 = multiFeatureValues[channelIndex]) == null ? void 0 : _d2.length) ?? 0;
189033
189050
  }
189034
189051
  });
189035
189052
  const valueTexHeight = Math.max(2, Math.ceil(totalValuesLength / texSize));
@@ -189050,7 +189067,7 @@ function multiSetsToTextureData(multiFeatureValues, multiMatrixObsIndex, setColo
189050
189067
  const matrixObsIndex = multiMatrixObsIndex[channelIndex];
189051
189068
  const bitmaskValueIsIndex = matrixObsIndex === null;
189052
189069
  if (isSetColorMode) {
189053
- const { setColorIndices, setColors, obsIndex } = setColorValues[channelIndex] || {};
189070
+ const { setColorIndices, setColors, obsIndex } = setColorValues[channelIndex] ?? {};
189054
189071
  if (setColorIndices && setColors && obsIndex) {
189055
189072
  for (let i2 = 0; i2 < obsIndex.length; i2++) {
189056
189073
  let obsId = String(i2 + 1);
@@ -189074,7 +189091,7 @@ function multiSetsToTextureData(multiFeatureValues, multiMatrixObsIndex, setColo
189074
189091
  indexOffset += (obsIndex == null ? void 0 : obsIndex.length) || 0;
189075
189092
  colorOffset += (setColors == null ? void 0 : setColors.length) || 0;
189076
189093
  } else {
189077
- const featureArr = multiFeatureValues[channelIndex];
189094
+ const featureArr = multiFeatureValues[channelIndex] ?? [];
189078
189095
  const normalizedFeatureArr = normalize$3(featureArr);
189079
189096
  if (!bitmaskValueIsIndex && matrixObsIndex) {
189080
189097
  for (let i2 = 0; i2 < matrixObsIndex.length; i2++) {
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { b, f, C, e, a, i, D, h, E, F, c, d, T, V } from "./index-CIqXsmFh.js";
1
+ import { b, f, C, e, a, i, D, h, E, F, c, d, T, V } from "./index-jTgzybKh.js";
2
2
  export {
3
3
  b as CellSetCompositionBarPlotSubscriber,
4
4
  f as CellSetExpressionPlot,
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-CIqXsmFh.js";
1
+ import { B as BaseDecoder } from "./index-jTgzybKh.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-CIqXsmFh.js";
2
+ import { g as getDefaultExportFromCjs, B as BaseDecoder } from "./index-jTgzybKh.js";
3
3
  const LercParameters = {
4
4
  AddCompression: 1
5
5
  };
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-CIqXsmFh.js";
1
+ import { B as BaseDecoder } from "./index-jTgzybKh.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-CIqXsmFh.js";
1
+ import { B as BaseDecoder } from "./index-jTgzybKh.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-CIqXsmFh.js";
1
+ import { B as BaseDecoder } from "./index-jTgzybKh.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-CIqXsmFh.js";
1
+ import { B as BaseDecoder } from "./index-jTgzybKh.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/statistical-plots",
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": {
@@ -28,13 +28,13 @@
28
28
  "react-aria": "^3.28.0",
29
29
  "internmap": "^2.0.3",
30
30
  "uuid": "^9.0.0",
31
- "@vitessce/styles": "3.6.13",
32
- "@vitessce/constants-internal": "3.6.13",
33
- "@vitessce/sets-utils": "3.6.13",
34
- "@vitessce/utils": "3.6.13",
35
- "@vitessce/vega": "3.6.13",
36
- "@vitessce/vit-s": "3.6.13",
37
- "@vitessce/gl": "3.6.13"
31
+ "@vitessce/styles": "3.6.15",
32
+ "@vitessce/constants-internal": "3.6.15",
33
+ "@vitessce/sets-utils": "3.6.15",
34
+ "@vitessce/utils": "3.6.15",
35
+ "@vitessce/vega": "3.6.15",
36
+ "@vitessce/vit-s": "3.6.15",
37
+ "@vitessce/gl": "3.6.15"
38
38
  },
39
39
  "devDependencies": {
40
40
  "react": "^18.0.0",