@vitessce/scatterplot-embedding 3.2.2 → 3.3.0

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-68f84e2a.js";
2
- import { B as BaseDecoder } from "./index-c4323615.js";
2
+ import { B as BaseDecoder } from "./index-87e09f29.js";
3
3
  import "react";
4
4
  import "@vitessce/vit-s";
5
5
  import "react-dom";
@@ -4462,9 +4462,9 @@ const schemePlasma = [[13, 8, 135], [16, 7, 136], [19, 7, 137], [22, 7, 138], [2
4462
4462
  function rgbSpline(spline) {
4463
4463
  return (colors) => {
4464
4464
  const n2 = colors.length;
4465
- let r2 = new Array(n2);
4466
- let g2 = new Array(n2);
4467
- let b = new Array(n2);
4465
+ const r2 = new Array(n2);
4466
+ const g2 = new Array(n2);
4467
+ const b = new Array(n2);
4468
4468
  let i2;
4469
4469
  let color2;
4470
4470
  for (i2 = 0; i2 < n2; ++i2) {
@@ -4473,10 +4473,10 @@ function rgbSpline(spline) {
4473
4473
  g2[i2] = color2[1] || 0;
4474
4474
  b[i2] = color2[2] || 0;
4475
4475
  }
4476
- r2 = spline(r2);
4477
- g2 = spline(g2);
4478
- b = spline(b);
4479
- return (t2) => [r2(t2), g2(t2), b(t2)];
4476
+ const rFunc = spline(r2);
4477
+ const gFunc = spline(g2);
4478
+ const bFunc = spline(b);
4479
+ return (t2) => [rFunc(t2), gFunc(t2), bFunc(t2)];
4480
4480
  };
4481
4481
  }
4482
4482
  function basis(values2) {
@@ -11068,6 +11068,7 @@ const DataType$2 = {
11068
11068
  const FileType$1 = {
11069
11069
  // Joint file types
11070
11070
  ANNDATA_ZARR: "anndata.zarr",
11071
+ SPATIALDATA_ZARR: "spatialdata.zarr",
11071
11072
  // Atomic file types
11072
11073
  OBS_EMBEDDING_CSV: "obsEmbedding.csv",
11073
11074
  OBS_SPOTS_CSV: "obsSpots.csv",
@@ -11090,6 +11091,16 @@ const FileType$1 = {
11090
11091
  OBS_SEGMENTATIONS_ANNDATA_ZARR: "obsSegmentations.anndata.zarr",
11091
11092
  OBS_LABELS_ANNDATA_ZARR: "obsLabels.anndata.zarr",
11092
11093
  FEATURE_LABELS_ANNDATA_ZARR: "featureLabels.anndata.zarr",
11094
+ // SpatialData
11095
+ IMAGE_SPATIALDATA_ZARR: "image.spatialdata.zarr",
11096
+ LABELS_SPATIALDATA_ZARR: "labels.spatialdata.zarr",
11097
+ SHAPES_SPATIALDATA_ZARR: "shapes.spatialdata.zarr",
11098
+ OBS_FEATURE_MATRIX_SPATIALDATA_ZARR: "obsFeatureMatrix.spatialdata.zarr",
11099
+ OBS_SETS_SPATIALDATA_ZARR: "obsSets.spatialdata.zarr",
11100
+ OBS_SPOTS_SPATIALDATA_ZARR: "obsSpots.spatialdata.zarr",
11101
+ // TODO:
11102
+ // OBS_POINTS_SPATIALDATA_ZARR: 'obsPoints.spatialdata.zarr',
11103
+ // OBS_LOCATIONS_SPATIALDATA_ZARR: 'obsLocations.spatialdata.zarr',
11093
11104
  // MuData
11094
11105
  OBS_FEATURE_MATRIX_MUDATA_ZARR: "obsFeatureMatrix.mudata.zarr",
11095
11106
  OBS_SETS_MUDATA_ZARR: "obsSets.mudata.zarr",
@@ -11891,9 +11902,30 @@ z.object({
11891
11902
  offsetsUrl: z.string().optional(),
11892
11903
  coordinateTransformations: omeCoordinateTransformations.optional()
11893
11904
  });
11894
- z.object({
11905
+ const imageOmeZarrSchema = z.object({
11895
11906
  coordinateTransformations: omeCoordinateTransformations.optional()
11896
11907
  });
11908
+ imageOmeZarrSchema.extend({
11909
+ path: z.string()
11910
+ });
11911
+ z.object({
11912
+ path: z.string()
11913
+ });
11914
+ z.object({
11915
+ path: z.string()
11916
+ });
11917
+ z.object({
11918
+ path: z.string(),
11919
+ tablePath: z.string().optional().describe("The path to a table which annotates the spots. If available but not specified, the spot identifiers may not be aligned with associated tabular data as expected.")
11920
+ });
11921
+ annDataObsFeatureMatrix.extend({
11922
+ region: z.string().describe("The name of a region to use to filter instances (i.e., rows) in the table").optional()
11923
+ });
11924
+ z.object({
11925
+ region: z.string().describe("The name of a region to use to filter instances (i.e., rows) in the table").optional(),
11926
+ tablePath: z.string().optional().describe("The path to a table which contains the index for the set values."),
11927
+ obsSets: annDataObsSets
11928
+ });
11897
11929
  z.object({
11898
11930
  obsIndex: z.string(),
11899
11931
  obsEmbedding: z.array(z.string()).length(2)
@@ -121180,16 +121212,16 @@ function addDecoder(cases, importFn) {
121180
121212
  }
121181
121213
  cases.forEach((c2) => registry$1.set(c2, importFn));
121182
121214
  }
121183
- addDecoder([void 0, 1], () => import("./raw-562e7d1c.js").then((m2) => m2.default));
121184
- addDecoder(5, () => import("./lzw-0659de0e.js").then((m2) => m2.default));
121215
+ addDecoder([void 0, 1], () => import("./raw-12234337.js").then((m2) => m2.default));
121216
+ addDecoder(5, () => import("./lzw-9f579219.js").then((m2) => m2.default));
121185
121217
  addDecoder(6, () => {
121186
121218
  throw new Error("old style JPEG compression is not supported.");
121187
121219
  });
121188
- addDecoder(7, () => import("./jpeg-0c6f4d5b.js").then((m2) => m2.default));
121189
- addDecoder([8, 32946], () => import("./deflate-49eb8bd8.js").then((m2) => m2.default));
121190
- addDecoder(32773, () => import("./packbits-f0484b5e.js").then((m2) => m2.default));
121191
- addDecoder(34887, () => import("./lerc-157806a7.js").then((m2) => m2.default));
121192
- addDecoder(50001, () => import("./webimage-ab07cd7f.js").then((m2) => m2.default));
121220
+ addDecoder(7, () => import("./jpeg-418390c5.js").then((m2) => m2.default));
121221
+ addDecoder([8, 32946], () => import("./deflate-bd431815.js").then((m2) => m2.default));
121222
+ addDecoder(32773, () => import("./packbits-81f5fada.js").then((m2) => m2.default));
121223
+ addDecoder(34887, () => import("./lerc-f1c20446.js").then((m2) => m2.default));
121224
+ addDecoder(50001, () => import("./webimage-6ef04827.js").then((m2) => m2.default));
121193
121225
  function decodeRowAcc(row, stride) {
121194
121226
  let length2 = row.length - stride;
121195
121227
  let offset5 = 0;
@@ -145530,9 +145562,9 @@ function Legend(props2) {
145530
145562
  const hasSubLabel = subLabel !== null;
145531
145563
  if (!isSetColor) {
145532
145564
  g2.append("text").attr("text-anchor", hasSubLabel ? "start" : "end").attr("dominant-baseline", "hanging").attr("x", hasSubLabel ? 0 : width).attr("y", 0).text(mainLabel).style("font-size", "10px").style("fill", foregroundColor);
145533
- }
145534
- if (hasSubLabel) {
145535
- g2.append("text").attr("text-anchor", "end").attr("dominant-baseline", "hanging").attr("x", width).attr("y", titleHeight).text(subLabel).style("font-size", "9px").style("fill", foregroundColor);
145565
+ if (hasSubLabel) {
145566
+ g2.append("text").attr("text-anchor", "end").attr("dominant-baseline", "hanging").attr("x", width).attr("y", titleHeight).text(subLabel).style("font-size", "9px").style("fill", foregroundColor);
145567
+ }
145536
145568
  }
145537
145569
  }, [
145538
145570
  width,
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { E } from "./index-c4323615.js";
1
+ import { E } from "./index-87e09f29.js";
2
2
  import "react";
3
3
  import "@vitessce/vit-s";
4
4
  import "react-dom";
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-c4323615.js";
1
+ import { B as BaseDecoder } from "./index-87e09f29.js";
2
2
  import "react";
3
3
  import "@vitessce/vit-s";
4
4
  import "react-dom";
@@ -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-c4323615.js";
2
+ import { g as getDefaultExportFromCjs, B as BaseDecoder } from "./index-87e09f29.js";
3
3
  import "react";
4
4
  import "@vitessce/vit-s";
5
5
  import "react-dom";
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-c4323615.js";
1
+ import { B as BaseDecoder } from "./index-87e09f29.js";
2
2
  import "react";
3
3
  import "@vitessce/vit-s";
4
4
  import "react-dom";
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-c4323615.js";
1
+ import { B as BaseDecoder } from "./index-87e09f29.js";
2
2
  import "react";
3
3
  import "@vitessce/vit-s";
4
4
  import "react-dom";
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-c4323615.js";
1
+ import { B as BaseDecoder } from "./index-87e09f29.js";
2
2
  import "react";
3
3
  import "@vitessce/vit-s";
4
4
  import "react-dom";
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-c4323615.js";
1
+ import { B as BaseDecoder } from "./index-87e09f29.js";
2
2
  import "react";
3
3
  import "@vitessce/vit-s";
4
4
  import "react-dom";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitessce/scatterplot-embedding",
3
- "version": "3.2.2",
3
+ "version": "3.3.0",
4
4
  "author": "Gehlenborg Lab",
5
5
  "homepage": "http://vitessce.io",
6
6
  "repository": {
@@ -20,12 +20,12 @@
20
20
  "d3-array": "^2.4.0",
21
21
  "lodash-es": "^4.17.21",
22
22
  "react-aria": "^3.28.0",
23
- "@vitessce/constants-internal": "3.2.2",
24
- "@vitessce/legend": "3.2.2",
25
- "@vitessce/scatterplot": "3.2.2",
26
- "@vitessce/sets-utils": "3.2.2",
27
- "@vitessce/utils": "3.2.2",
28
- "@vitessce/vit-s": "3.2.2"
23
+ "@vitessce/constants-internal": "3.3.0",
24
+ "@vitessce/legend": "3.3.0",
25
+ "@vitessce/scatterplot": "3.3.0",
26
+ "@vitessce/sets-utils": "3.3.0",
27
+ "@vitessce/utils": "3.3.0",
28
+ "@vitessce/vit-s": "3.3.0"
29
29
  },
30
30
  "devDependencies": {
31
31
  "react": "^18.0.0",