@vitessce/scatterplot-gating 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-Dx1L1ee_.js";
2
+ import { B as BaseDecoder } from "./index-DNmU76cL.js";
3
3
  class DeflateDecoder extends BaseDecoder {
4
4
  decodeBlock(buffer) {
5
5
  return inflate_1(new Uint8Array(buffer)).buffer;
@@ -9621,6 +9621,7 @@ const FileType$1 = {
9621
9621
  OBS_SPOTS_SPATIALDATA_ZARR: "obsSpots.spatialdata.zarr",
9622
9622
  FEATURE_LABELS_SPATIALDATA_ZARR: "featureLabels.spatialdata.zarr",
9623
9623
  OBS_POINTS_SPATIALDATA_ZARR: "obsPoints.spatialdata.zarr",
9624
+ OBS_EMBEDDING_SPATIALDATA_ZARR: "obsEmbedding.spatialdata.zarr",
9624
9625
  // SpatialData - zipped
9625
9626
  IMAGE_SPATIALDATA_ZARR_ZIP: "image.spatialdata.zarr.zip",
9626
9627
  LABELS_SPATIALDATA_ZARR_ZIP: "labels.spatialdata.zarr.zip",
@@ -9630,6 +9631,7 @@ const FileType$1 = {
9630
9631
  OBS_SPOTS_SPATIALDATA_ZARR_ZIP: "obsSpots.spatialdata.zarr.zip",
9631
9632
  FEATURE_LABELS_SPATIALDATA_ZARR_ZIP: "featureLabels.spatialdata.zarr.zip",
9632
9633
  OBS_POINTS_SPATIALDATA_ZARR_ZIP: "obsPoints.spatialdata.zarr.zip",
9634
+ OBS_EMBEDDING_SPATIALDATA_ZARR_ZIP: "obsEmbedding.spatialdata.zarr.zip",
9633
9635
  // MuData
9634
9636
  OBS_FEATURE_MATRIX_MUDATA_ZARR: "obsFeatureMatrix.mudata.zarr",
9635
9637
  OBS_SETS_MUDATA_ZARR: "obsSets.mudata.zarr",
@@ -9880,6 +9882,7 @@ const ViewHelpMapping = {
9880
9882
  [FileType$1.OBS_SETS_SPATIALDATA_ZARR]: DataType$2.OBS_SETS,
9881
9883
  [FileType$1.FEATURE_LABELS_SPATIALDATA_ZARR]: DataType$2.FEATURE_LABELS,
9882
9884
  [FileType$1.OBS_POINTS_SPATIALDATA_ZARR]: DataType$2.OBS_POINTS,
9885
+ [FileType$1.OBS_EMBEDDING_SPATIALDATA_ZARR]: DataType$2.OBS_EMBEDDING,
9883
9886
  // For new file types to support old file types
9884
9887
  [FileType$1.OBS_EMBEDDING_CELLS_JSON]: DataType$2.OBS_EMBEDDING,
9885
9888
  [FileType$1.OBS_LOCATIONS_CELLS_JSON]: DataType$2.OBS_LOCATIONS,
@@ -10056,6 +10059,9 @@ const ViewHelpMapping = {
10056
10059
  },
10057
10060
  [FileType$1.OBS_POINTS_SPATIALDATA_ZARR]: {
10058
10061
  zip: FileType$1.OBS_POINTS_SPATIALDATA_ZARR_ZIP
10062
+ },
10063
+ [FileType$1.OBS_EMBEDDING_SPATIALDATA_ZARR]: {
10064
+ zip: FileType$1.OBS_EMBEDDING_SPATIALDATA_ZARR_ZIP
10059
10065
  }
10060
10066
  });
10061
10067
  [
@@ -11103,6 +11109,16 @@ const obsSetsSpatialdataSchema = z.object({
11103
11109
  tablePath: z.string().optional().describe("The path to a table which contains the index for the set values."),
11104
11110
  obsSets: annDataObsSetsArr
11105
11111
  });
11112
+ annDataObsEmbedding.extend({
11113
+ // We extend anndataObsEmbedding which already has properties like `dims` and `path`.
11114
+ region: z.string().describe("The name of a region to use to filter instances (i.e., rows) in the table").optional(),
11115
+ tablePath: z.string().optional().describe("The path to a table which contains the index for the set values.")
11116
+ });
11117
+ const obsEmbeddingSpatialdataSchemaConvenience = z.union([
11118
+ annDataObsEmbedding,
11119
+ // For convenience, allow an array of items with `embeddingType` properties.
11120
+ z.array(annDataConvenienceObsEmbeddingItem)
11121
+ ]);
11106
11122
  z.object({
11107
11123
  targetX: z.number(),
11108
11124
  targetY: z.number(),
@@ -11211,9 +11227,10 @@ z.object({
11211
11227
  // TODO: obsPoints
11212
11228
  // TODO: obsLocations
11213
11229
  obsSets: obsSetsSpatialdataSchema,
11214
- // TODO: obsEmbedding
11230
+ obsEmbedding: obsEmbeddingSpatialdataSchemaConvenience,
11215
11231
  // TODO: obsLabels
11216
11232
  // TODO: featureLabels
11233
+ // TODO: allow specifying tablePath and region at the top-level here.
11217
11234
  coordinateSystem: z.string().optional().describe("The name of a coordinate transformation output used to transform all elements which lack a per-element coordinateSystem property.")
11218
11235
  }).partial();
11219
11236
  z.object({
@@ -123107,22 +123124,22 @@ function addDecoder(cases, importFn) {
123107
123124
  }
123108
123125
  cases.forEach((c2) => registry$1.set(c2, importFn));
123109
123126
  }
123110
- addDecoder([void 0, 1], () => import("./raw-BrW6Bfqo.js").then((m2) => m2.default));
123111
- addDecoder(5, () => import("./lzw-COJGKINN.js").then((m2) => m2.default));
123127
+ addDecoder([void 0, 1], () => import("./raw-BVRj2spn.js").then((m2) => m2.default));
123128
+ addDecoder(5, () => import("./lzw-DurWd6oh.js").then((m2) => m2.default));
123112
123129
  addDecoder(6, () => {
123113
123130
  throw new Error("old style JPEG compression is not supported.");
123114
123131
  });
123115
- addDecoder(7, () => import("./jpeg-D-THLI_r.js").then((m2) => m2.default));
123116
- addDecoder([8, 32946], () => import("./deflate-Dsbsz95r.js").then((m2) => m2.default));
123117
- addDecoder(32773, () => import("./packbits-if3tYhOR.js").then((m2) => m2.default));
123132
+ addDecoder(7, () => import("./jpeg-DVzsG58A.js").then((m2) => m2.default));
123133
+ addDecoder([8, 32946], () => import("./deflate-DxHXH5xg.js").then((m2) => m2.default));
123134
+ addDecoder(32773, () => import("./packbits-Wx1kBQ0B.js").then((m2) => m2.default));
123118
123135
  addDecoder(
123119
123136
  34887,
123120
- () => import("./lerc-CaY4W1p9.js").then(async (m2) => {
123137
+ () => import("./lerc-DDH4E1vF.js").then(async (m2) => {
123121
123138
  await m2.zstd.init();
123122
123139
  return m2;
123123
123140
  }).then((m2) => m2.default)
123124
123141
  );
123125
- addDecoder(50001, () => import("./webimage-CSiT1ArN.js").then((m2) => m2.default));
123142
+ addDecoder(50001, () => import("./webimage-D9sKJsjg.js").then((m2) => m2.default));
123126
123143
  function decodeRowAcc(row, stride) {
123127
123144
  let length2 = row.length - stride;
123128
123145
  let offset2 = 0;
@@ -133080,10 +133097,10 @@ function multiSetsToTextureData(multiFeatureValues, multiMatrixObsIndex, setColo
133080
133097
  channelIsSetColorMode.forEach((isSetColorMode, channelIndex) => {
133081
133098
  var _a3, _b2, _c, _d;
133082
133099
  if (isSetColorMode) {
133083
- totalColorsLength += (((_b2 = (_a3 = setColorValues[channelIndex]) == null ? void 0 : _a3.setColors) == null ? void 0 : _b2.length) || 0) * 3;
133100
+ totalColorsLength += (((_b2 = (_a3 = setColorValues[channelIndex]) == null ? void 0 : _a3.setColors) == null ? void 0 : _b2.length) ?? 0) * 3;
133084
133101
  totalValuesLength += ((_c = setColorValues[channelIndex]) == null ? void 0 : _c.obsIndex) ? max(setColorValues[channelIndex].obsIndex.map((d) => parseInt(d))) : 0;
133085
133102
  } else {
133086
- totalValuesLength += multiMatrixObsIndex[channelIndex] ? max(multiMatrixObsIndex[channelIndex].map((d) => parseInt(d))) : ((_d = multiFeatureValues[channelIndex]) == null ? void 0 : _d.length) || 0;
133103
+ totalValuesLength += multiMatrixObsIndex[channelIndex] ? max(multiMatrixObsIndex[channelIndex].map((d) => parseInt(d))) : ((_d = multiFeatureValues[channelIndex]) == null ? void 0 : _d.length) ?? 0;
133087
133104
  }
133088
133105
  });
133089
133106
  const valueTexHeight = Math.max(2, Math.ceil(totalValuesLength / texSize));
@@ -133104,7 +133121,7 @@ function multiSetsToTextureData(multiFeatureValues, multiMatrixObsIndex, setColo
133104
133121
  const matrixObsIndex = multiMatrixObsIndex[channelIndex];
133105
133122
  const bitmaskValueIsIndex = matrixObsIndex === null;
133106
133123
  if (isSetColorMode) {
133107
- const { setColorIndices, setColors, obsIndex } = setColorValues[channelIndex] || {};
133124
+ const { setColorIndices, setColors, obsIndex } = setColorValues[channelIndex] ?? {};
133108
133125
  if (setColorIndices && setColors && obsIndex) {
133109
133126
  for (let i2 = 0; i2 < obsIndex.length; i2++) {
133110
133127
  let obsId = String(i2 + 1);
@@ -133128,7 +133145,7 @@ function multiSetsToTextureData(multiFeatureValues, multiMatrixObsIndex, setColo
133128
133145
  indexOffset += (obsIndex == null ? void 0 : obsIndex.length) || 0;
133129
133146
  colorOffset += (setColors == null ? void 0 : setColors.length) || 0;
133130
133147
  } else {
133131
- const featureArr = multiFeatureValues[channelIndex];
133148
+ const featureArr = multiFeatureValues[channelIndex] ?? [];
133132
133149
  const normalizedFeatureArr = normalize(featureArr);
133133
133150
  if (!bitmaskValueIsIndex && matrixObsIndex) {
133134
133151
  for (let i2 = 0; i2 < matrixObsIndex.length; i2++) {
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { G } from "./index-Dx1L1ee_.js";
1
+ import { G } from "./index-DNmU76cL.js";
2
2
  export {
3
3
  G as GatingSubscriber
4
4
  };
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-Dx1L1ee_.js";
1
+ import { B as BaseDecoder } from "./index-DNmU76cL.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-Dx1L1ee_.js";
2
+ import { g as getDefaultExportFromCjs, B as BaseDecoder } from "./index-DNmU76cL.js";
3
3
  const LercParameters = {
4
4
  AddCompression: 1
5
5
  };
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-Dx1L1ee_.js";
1
+ import { B as BaseDecoder } from "./index-DNmU76cL.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-Dx1L1ee_.js";
1
+ import { B as BaseDecoder } from "./index-DNmU76cL.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-Dx1L1ee_.js";
1
+ import { B as BaseDecoder } from "./index-DNmU76cL.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-Dx1L1ee_.js";
1
+ import { B as BaseDecoder } from "./index-DNmU76cL.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/scatterplot-gating",
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,12 +19,12 @@
19
19
  "d3-array": "^2.4.0",
20
20
  "lodash-es": "^4.17.21",
21
21
  "react-aria": "^3.28.0",
22
- "@vitessce/styles": "3.6.13",
23
- "@vitessce/constants-internal": "3.6.13",
24
- "@vitessce/scatterplot": "3.6.13",
25
- "@vitessce/sets-utils": "3.6.13",
26
- "@vitessce/utils": "3.6.13",
27
- "@vitessce/vit-s": "3.6.13"
22
+ "@vitessce/styles": "3.6.15",
23
+ "@vitessce/constants-internal": "3.6.15",
24
+ "@vitessce/scatterplot": "3.6.15",
25
+ "@vitessce/sets-utils": "3.6.15",
26
+ "@vitessce/utils": "3.6.15",
27
+ "@vitessce/vit-s": "3.6.15"
28
28
  },
29
29
  "devDependencies": {
30
30
  "react": "^18.0.0",