@vitessce/scatterplot-embedding 3.8.3 → 3.8.5

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-BUnpJvPA.js";
2
+ import { B as BaseDecoder } from "./index-DXCCF6LM.js";
3
3
  class DeflateDecoder extends BaseDecoder {
4
4
  decodeBlock(buffer) {
5
5
  return inflate_1(new Uint8Array(buffer)).buffer;
@@ -10715,6 +10715,7 @@ const COMPONENT_COORDINATION_TYPES = {
10715
10715
  CoordinationType$1.FEATURE_SELECTION,
10716
10716
  CoordinationType$1.FEATURE_VALUE_COLORMAP,
10717
10717
  CoordinationType$1.FEATURE_VALUE_COLORMAP_RANGE,
10718
+ CoordinationType$1.FEATURE_AGGREGATION_STRATEGY,
10718
10719
  // TODO: CoordinationType.FEATURE_COLOR_ENCODING,
10719
10720
  // TODO: CoordinationType.ADDITIONAL_FEATURE_SETS,
10720
10721
  CoordinationType$1.TOOLTIPS_VISIBLE,
@@ -11314,7 +11315,10 @@ z.object({
11314
11315
  obsSets: obsSetsSpatialdataSchema,
11315
11316
  obsEmbedding: obsEmbeddingSpatialdataSchemaConvenience,
11316
11317
  // TODO: obsLabels
11317
- // TODO: featureLabels
11318
+ featureLabels: z.union([
11319
+ annDataFeatureLabels,
11320
+ z.array(annDataConvenienceFeatureLabelsItem)
11321
+ ]),
11318
11322
  // TODO: allow specifying tablePath and region at the top-level here.
11319
11323
  coordinateSystem: z.string().optional().describe("The name of a coordinate transformation output used to transform all elements which lack a per-element coordinateSystem property.")
11320
11324
  }).partial();
@@ -123344,22 +123348,22 @@ function addDecoder(cases, importFn) {
123344
123348
  }
123345
123349
  cases.forEach((c2) => registry$1.set(c2, importFn));
123346
123350
  }
123347
- addDecoder([void 0, 1], () => import("./raw-CYgoEHqR.js").then((m2) => m2.default));
123348
- addDecoder(5, () => import("./lzw-C3MiI_oL.js").then((m2) => m2.default));
123351
+ addDecoder([void 0, 1], () => import("./raw-CBdLq0ga.js").then((m2) => m2.default));
123352
+ addDecoder(5, () => import("./lzw-Dbo7OpaS.js").then((m2) => m2.default));
123349
123353
  addDecoder(6, () => {
123350
123354
  throw new Error("old style JPEG compression is not supported.");
123351
123355
  });
123352
- addDecoder(7, () => import("./jpeg-HkMzLFbL.js").then((m2) => m2.default));
123353
- addDecoder([8, 32946], () => import("./deflate-BPNH0-gs.js").then((m2) => m2.default));
123354
- addDecoder(32773, () => import("./packbits-CtWmjnkM.js").then((m2) => m2.default));
123356
+ addDecoder(7, () => import("./jpeg-UKzKGs1t.js").then((m2) => m2.default));
123357
+ addDecoder([8, 32946], () => import("./deflate-Dr6bxD0w.js").then((m2) => m2.default));
123358
+ addDecoder(32773, () => import("./packbits-0X-GrQId.js").then((m2) => m2.default));
123355
123359
  addDecoder(
123356
123360
  34887,
123357
- () => import("./lerc-BL5Xy_sd.js").then(async (m2) => {
123361
+ () => import("./lerc-D62tGpqi.js").then(async (m2) => {
123358
123362
  await m2.zstd.init();
123359
123363
  return m2;
123360
123364
  }).then((m2) => m2.default)
123361
123365
  );
123362
- addDecoder(50001, () => import("./webimage-yN7Q3b16.js").then((m2) => m2.default));
123366
+ addDecoder(50001, () => import("./webimage-C2vUudNG.js").then((m2) => m2.default));
123363
123367
  function decodeRowAcc(row, stride) {
123364
123368
  let length2 = row.length - stride;
123365
123369
  let offset2 = 0;
@@ -153409,7 +153413,9 @@ function EmbeddingScatterplotSubscriber(props) {
153409
153413
  // Average fill density for dynamic opacity calculation.
153410
153414
  averageFillDensity,
153411
153415
  // For the dual scatterplot:
153412
- sampleSetSelection: sampleSetSelectionFromProps
153416
+ sampleSetSelection: sampleSetSelectionFromProps,
153417
+ // Circle scale factor:
153418
+ circleScaleFactor = 0.8
153413
153419
  } = props;
153414
153420
  const loaders = useLoaders();
153415
153421
  const coordinationScopes = useCoordinationScopes(coordinationScopesRaw);
@@ -153799,7 +153805,7 @@ function EmbeddingScatterplotSubscriber(props) {
153799
153805
  return null;
153800
153806
  }
153801
153807
  const size = Math.max(xRange, yRange);
153802
- const radius = size * Math.sqrt(2) / 2 * 0.8;
153808
+ const radius = size * Math.sqrt(2) / 2 * circleScaleFactor;
153803
153809
  const numPoints = 96;
153804
153810
  const options = { steps: numPoints, units: "degrees" };
153805
153811
  const circlePolygon = circle$2(center2, radius, options);
@@ -153809,7 +153815,7 @@ function EmbeddingScatterplotSubscriber(props) {
153809
153815
  polygon: circlePolygon,
153810
153816
  steps: numPoints
153811
153817
  };
153812
- }, [originalViewState, width2, height2, xRange, yRange]);
153818
+ }, [originalViewState, width2, height2, xRange, yRange, circleScaleFactor]);
153813
153819
  const [alignedEmbeddingIndex, alignedEmbeddingData] = useMemo(() => {
153814
153820
  if ((obsEmbedding == null ? void 0 : obsEmbedding.data) && obsEmbeddingIndex && matrixObsIndex) {
153815
153821
  const matrixIndexMap = new Map(matrixObsIndex.map((key, i2) => [key, i2]));
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { D, E } from "./index-BUnpJvPA.js";
1
+ import { D, E } from "./index-DXCCF6LM.js";
2
2
  export {
3
3
  D as DualEmbeddingScatterplotSubscriber,
4
4
  E as EmbeddingScatterplotSubscriber
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-BUnpJvPA.js";
1
+ import { B as BaseDecoder } from "./index-DXCCF6LM.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-BUnpJvPA.js";
2
+ import { g as getDefaultExportFromCjs, B as BaseDecoder } from "./index-DXCCF6LM.js";
3
3
  const LercParameters = {
4
4
  AddCompression: 1
5
5
  };
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-BUnpJvPA.js";
1
+ import { B as BaseDecoder } from "./index-DXCCF6LM.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-BUnpJvPA.js";
1
+ import { B as BaseDecoder } from "./index-DXCCF6LM.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-BUnpJvPA.js";
1
+ import { B as BaseDecoder } from "./index-DXCCF6LM.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-BUnpJvPA.js";
1
+ import { B as BaseDecoder } from "./index-DXCCF6LM.js";
2
2
  class WebImageDecoder extends BaseDecoder {
3
3
  constructor() {
4
4
  super();
@@ -1 +1 @@
1
- {"version":3,"file":"EmbeddingScatterplotSubscriber.d.ts","sourceRoot":"","sources":["../src/EmbeddingScatterplotSubscriber.js"],"names":[],"mappings":"AA6CA;;;;;;;;;;;;GAYG;AACH,sDAVG;IAAsB,IAAI,EAAlB,MAAM;IACQ,KAAK,EAAnB,MAAM;IACQ,kBAAkB,EAAhC,MAAM;IAEU,mBAAmB;IAErB,KAAK,EAAnB,MAAM;IACQ,kBAAkB,EAAhC,MAAM;CAEhB,eAgmBA"}
1
+ {"version":3,"file":"EmbeddingScatterplotSubscriber.d.ts","sourceRoot":"","sources":["../src/EmbeddingScatterplotSubscriber.js"],"names":[],"mappings":"AA6CA;;;;;;;;;;;;GAYG;AACH,sDAVG;IAAsB,IAAI,EAAlB,MAAM;IACQ,KAAK,EAAnB,MAAM;IACQ,kBAAkB,EAAhC,MAAM;IAEU,mBAAmB;IAErB,KAAK,EAAnB,MAAM;IACQ,kBAAkB,EAAhC,MAAM;CAEhB,eAimBA"}
@@ -29,7 +29,9 @@ export function EmbeddingScatterplotSubscriber(props) {
29
29
  // Average fill density for dynamic opacity calculation.
30
30
  averageFillDensity,
31
31
  // For the dual scatterplot:
32
- sampleSetSelection: sampleSetSelectionFromProps, } = props;
32
+ sampleSetSelection: sampleSetSelectionFromProps,
33
+ // Circle scale factor:
34
+ circleScaleFactor = 0.8, } = props;
33
35
  const loaders = useLoaders();
34
36
  const coordinationScopes = useCoordinationScopes(coordinationScopesRaw);
35
37
  const setComponentHover = useSetComponentHover();
@@ -226,7 +228,7 @@ export function EmbeddingScatterplotSubscriber(props) {
226
228
  const size = Math.max(xRange, yRange);
227
229
  // TODO: figure out a better solution than
228
230
  // scaling the radius by the arbitrary 0.8?
229
- const radius = ((size * Math.sqrt(2)) / 2) * 0.8;
231
+ const radius = ((size * Math.sqrt(2)) / 2) * circleScaleFactor;
230
232
  const numPoints = 96;
231
233
  const options = { steps: numPoints, units: 'degrees' };
232
234
  const circlePolygon = circle(center, radius, options);
@@ -236,7 +238,7 @@ export function EmbeddingScatterplotSubscriber(props) {
236
238
  polygon: circlePolygon,
237
239
  steps: numPoints,
238
240
  };
239
- }, [originalViewState, width, height, xRange, yRange]);
241
+ }, [originalViewState, width, height, xRange, yRange, circleScaleFactor]);
240
242
  // It is possible for the embedding index+data to be out of order
241
243
  // with respect to the matrix index+data. Here, we align the embedding
242
244
  // data so that the rows are ordered the same as the matrix rows.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitessce/scatterplot-embedding",
3
- "version": "3.8.3",
3
+ "version": "3.8.5",
4
4
  "author": "HIDIVE Lab at HMS",
5
5
  "homepage": "http://vitessce.io",
6
6
  "repository": {
@@ -20,13 +20,13 @@
20
20
  "lodash-es": "^4.17.21",
21
21
  "react-aria": "^3.28.0",
22
22
  "@turf/circle": "^7.2.0",
23
- "@vitessce/styles": "3.8.3",
24
- "@vitessce/constants-internal": "3.8.3",
25
- "@vitessce/legend": "3.8.3",
26
- "@vitessce/scatterplot": "3.8.3",
27
- "@vitessce/sets-utils": "3.8.3",
28
- "@vitessce/utils": "3.8.3",
29
- "@vitessce/vit-s": "3.8.3"
23
+ "@vitessce/styles": "3.8.5",
24
+ "@vitessce/constants-internal": "3.8.5",
25
+ "@vitessce/legend": "3.8.5",
26
+ "@vitessce/scatterplot": "3.8.5",
27
+ "@vitessce/sets-utils": "3.8.5",
28
+ "@vitessce/utils": "3.8.5",
29
+ "@vitessce/vit-s": "3.8.5"
30
30
  },
31
31
  "devDependencies": {
32
32
  "react": "18.3.1",
@@ -69,9 +69,10 @@ export function EmbeddingScatterplotSubscriber(props) {
69
69
  helpText = ViewHelpMapping.SCATTERPLOT,
70
70
  // Average fill density for dynamic opacity calculation.
71
71
  averageFillDensity,
72
-
73
72
  // For the dual scatterplot:
74
73
  sampleSetSelection: sampleSetSelectionFromProps,
74
+ // Circle scale factor:
75
+ circleScaleFactor = 0.8,
75
76
  } = props;
76
77
 
77
78
  const loaders = useLoaders();
@@ -434,7 +435,7 @@ export function EmbeddingScatterplotSubscriber(props) {
434
435
  const size = Math.max(xRange, yRange);
435
436
  // TODO: figure out a better solution than
436
437
  // scaling the radius by the arbitrary 0.8?
437
- const radius = ((size * Math.sqrt(2)) / 2) * 0.8;
438
+ const radius = ((size * Math.sqrt(2)) / 2) * circleScaleFactor;
438
439
  const numPoints = 96;
439
440
  const options = { steps: numPoints, units: 'degrees' };
440
441
  const circlePolygon = circle(center, radius, options);
@@ -444,7 +445,7 @@ export function EmbeddingScatterplotSubscriber(props) {
444
445
  polygon: circlePolygon,
445
446
  steps: numPoints,
446
447
  };
447
- }, [originalViewState, width, height, xRange, yRange]);
448
+ }, [originalViewState, width, height, xRange, yRange, circleScaleFactor]);
448
449
 
449
450
  // It is possible for the embedding index+data to be out of order
450
451
  // with respect to the matrix index+data. Here, we align the embedding