@vitessce/statistical-plots 3.9.7 → 3.9.8

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-C1rdPiFE.js";
2
+ import { B as BaseDecoder } from "./index-D7d5WNOv.js";
3
3
  class DeflateDecoder extends BaseDecoder {
4
4
  decodeBlock(buffer) {
5
5
  return inflate_1(new Uint8Array(buffer)).buffer;
@@ -323,6 +323,7 @@ const CoordinationType$1 = {
323
323
  SPATIAL_LAYER_MODEL_MATRIX: "spatialLayerModelMatrix",
324
324
  SPATIAL_SEGMENTATION_FILLED: "spatialSegmentationFilled",
325
325
  SPATIAL_SEGMENTATION_STROKE_WIDTH: "spatialSegmentationStrokeWidth",
326
+ SPATIAL_POINT_STROKE_WIDTH: "spatialPointStrokeWidth",
326
327
  SPATIAL_CHANNEL_COLOR: "spatialChannelColor",
327
328
  SPATIAL_CHANNEL_VISIBLE: "spatialChannelVisible",
328
329
  SPATIAL_CHANNEL_OPACITY: "spatialChannelOpacity",
@@ -700,7 +701,8 @@ const COMPONENT_COORDINATION_TYPES = {
700
701
  CoordinationType$1.SPATIAL_CHANNEL_COLOR,
701
702
  CoordinationType$1.SPATIAL_CHANNEL_OPACITY,
702
703
  CoordinationType$1.SPATIAL_CHANNEL_VISIBLE,
703
- CoordinationType$1.LEGEND_VISIBLE
704
+ CoordinationType$1.LEGEND_VISIBLE,
705
+ CoordinationType$1.SPATIAL_POINT_STROKE_WIDTH
704
706
  ],
705
707
  [ViewType$1.SCATTERPLOT]: [
706
708
  CoordinationType$1.DATASET,
@@ -1084,6 +1086,7 @@ const COMPONENT_COORDINATION_TYPES = {
1084
1086
  CoordinationType$1.SPATIAL_CHANNEL_COLOR,
1085
1087
  CoordinationType$1.SPATIAL_SEGMENTATION_FILLED,
1086
1088
  CoordinationType$1.SPATIAL_SEGMENTATION_STROKE_WIDTH,
1089
+ CoordinationType$1.SPATIAL_POINT_STROKE_WIDTH,
1087
1090
  CoordinationType$1.IMAGE_CHANNEL,
1088
1091
  CoordinationType$1.IMAGE_LAYER,
1089
1092
  CoordinationType$1.SEGMENTATION_CHANNEL,
@@ -11579,6 +11582,8 @@ z.object({
11579
11582
  // projectionScale: z.number(),
11580
11583
  // position: z.array(z.number()).length(3),
11581
11584
  // projectionOrientation: z.array(z.number()).length(4),
11585
+ subsources: z.record(z.boolean()).describe("Subsources are the individual data components of a source (e.g. meshes, skeletons, etc.). Each entry explicitly enables or disables a subsource.").optional(),
11586
+ enableDefaultSubsources: z.boolean().describe("When true (default), automatically loads all subsources (defined in mesh metadata), when false loads what is explicitly enabled in `subsources`.").optional()
11582
11587
  }).partial().nullable();
11583
11588
  z.object({
11584
11589
  projectionAnnotationSpacing: z.number(),
@@ -179859,22 +179864,22 @@ function addDecoder(cases2, importFn) {
179859
179864
  }
179860
179865
  cases2.forEach((c2) => registry$1.set(c2, importFn));
179861
179866
  }
179862
- addDecoder([void 0, 1], () => import("./raw-BD6IgsG_.js").then((m2) => m2.default));
179863
- addDecoder(5, () => import("./lzw-DKcG65Pr.js").then((m2) => m2.default));
179867
+ addDecoder([void 0, 1], () => import("./raw-D97jhkxP.js").then((m2) => m2.default));
179868
+ addDecoder(5, () => import("./lzw-C4i4oRdZ.js").then((m2) => m2.default));
179864
179869
  addDecoder(6, () => {
179865
179870
  throw new Error("old style JPEG compression is not supported.");
179866
179871
  });
179867
- addDecoder(7, () => import("./jpeg-C04l-b7s.js").then((m2) => m2.default));
179868
- addDecoder([8, 32946], () => import("./deflate-ld0vMy9u.js").then((m2) => m2.default));
179869
- addDecoder(32773, () => import("./packbits-yEiLjB_6.js").then((m2) => m2.default));
179872
+ addDecoder(7, () => import("./jpeg-w3w8_kcX.js").then((m2) => m2.default));
179873
+ addDecoder([8, 32946], () => import("./deflate-B8I9kgCe.js").then((m2) => m2.default));
179874
+ addDecoder(32773, () => import("./packbits-OljjKWok.js").then((m2) => m2.default));
179870
179875
  addDecoder(
179871
179876
  34887,
179872
- () => import("./lerc-CwNw9uz4.js").then(async (m2) => {
179877
+ () => import("./lerc-BMgRAz-O.js").then(async (m2) => {
179873
179878
  await m2.zstd.init();
179874
179879
  return m2;
179875
179880
  }).then((m2) => m2.default)
179876
179881
  );
179877
- addDecoder(50001, () => import("./webimage-B5WMLVfj.js").then((m2) => m2.default));
179882
+ addDecoder(50001, () => import("./webimage-C2MS8rKP.js").then((m2) => m2.default));
179878
179883
  function decodeRowAcc(row, stride) {
179879
179884
  let length2 = row.length - stride;
179880
179885
  let offset2 = 0;
@@ -199178,10 +199183,10 @@ function CellSetExpressionPlot(props) {
199178
199183
  if (!obsSetSelection) {
199179
199184
  return 0;
199180
199185
  }
199181
- const cellSetNames = obsSetSelection.map((d) => d.at(-1));
199182
- return cellSetNames.reduce((acc, name2) => {
199183
- acc = acc === void 0 || name2.length > acc ? name2.length : acc;
199184
- return acc;
199186
+ return obsSetSelection.reduce((acc, path2) => {
199187
+ var _a3;
199188
+ const nameLength = ((_a3 = path2 == null ? void 0 : path2.at(-1)) == null ? void 0 : _a3.length) ?? 0;
199189
+ return nameLength > acc ? nameLength : acc;
199185
199190
  }, 0);
199186
199191
  }, [obsSetSelection]);
199187
199192
  const isStratified = Array.isArray(sampleSetSelection) && sampleSetSelection.length === 2;
@@ -199263,7 +199268,7 @@ function CellSetExpressionPlot(props) {
199263
199268
  }
199264
199269
  g2.append("g").attr("transform", `translate(${marginLeft},0)`).call(axisLeft(y2)).selectAll("text").style("font-size", "11px");
199265
199270
  const xTickG = g2.append("g").attr("transform", `translate(0,${innerHeight})`).style("font-size", "14px");
199266
- xTickG.call(axisBottom(xGroup).tickFormat((d) => d.at(-1))).selectAll("text").style("font-size", "11px").attr("dx", "-6px").attr("dy", "6px").attr("transform", "rotate(-45)").style("text-anchor", "end");
199271
+ xTickG.call(axisBottom(xGroup).tickFormat((d) => (d == null ? void 0 : d.at(-1)) ?? "")).selectAll("text").style("font-size", "11px").attr("dx", "-6px").attr("dy", "6px").attr("transform", "rotate(-45)").style("text-anchor", "end");
199267
199272
  if (isStratified) {
199268
199273
  const tickWidth = xGroup.bandwidth();
199269
199274
  xTickG.selectAll(".tick").append("rect").attr("x", -tickWidth / 2).attr("width", tickWidth).attr("height", 4).style("fill", (d) => obsSetColorScale(d));
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-C1rdPiFE.js";
1
+ import { b, f, C, e, a, i, D, h, E, F, c, d, T, V } from "./index-D7d5WNOv.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-C1rdPiFE.js";
1
+ import { B as BaseDecoder } from "./index-D7d5WNOv.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-C1rdPiFE.js";
2
+ import { g as getDefaultExportFromCjs, B as BaseDecoder } from "./index-D7d5WNOv.js";
3
3
  const LercParameters = {
4
4
  AddCompression: 1
5
5
  };
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-C1rdPiFE.js";
1
+ import { B as BaseDecoder } from "./index-D7d5WNOv.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-C1rdPiFE.js";
1
+ import { B as BaseDecoder } from "./index-D7d5WNOv.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-C1rdPiFE.js";
1
+ import { B as BaseDecoder } from "./index-D7d5WNOv.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-C1rdPiFE.js";
1
+ import { B as BaseDecoder } from "./index-D7d5WNOv.js";
2
2
  class WebImageDecoder extends BaseDecoder {
3
3
  constructor() {
4
4
  super();
@@ -1 +1 @@
1
- {"version":3,"file":"CellSetExpressionPlot.d.ts","sourceRoot":"","sources":["../src/CellSetExpressionPlot.js"],"names":[],"mappings":"AAcA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,qDAjBG;IAAwB,IAAI,EAApB,MAAM,EAAE;IAEM,SAAS,EAAvB,MAAM;IACU,MAAM,EAAtB,MAAM,EAAE;IAEM,KAAK,EAAnB,MAAM;IACQ,KAAK,EAAnB,MAAM;IACQ,MAAM,EAApB,MAAM;IACQ,WAAW,EAAzB,MAAM;IAGQ,YAAY,EAA1B,MAAM;IAGa,yBAAyB,EAA5C,MAAM,GAAC,IAAI;CAErB,eAgZA"}
1
+ {"version":3,"file":"CellSetExpressionPlot.d.ts","sourceRoot":"","sources":["../src/CellSetExpressionPlot.js"],"names":[],"mappings":"AAcA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,qDAjBG;IAAwB,IAAI,EAApB,MAAM,EAAE;IAEM,SAAS,EAAvB,MAAM;IACU,MAAM,EAAtB,MAAM,EAAE;IAEM,KAAK,EAAnB,MAAM;IACQ,KAAK,EAAnB,MAAM;IACQ,MAAM,EAApB,MAAM;IACQ,WAAW,EAAzB,MAAM;IAGQ,YAAY,EAA1B,MAAM;IAGa,yBAAyB,EAA5C,MAAM,GAAC,IAAI;CAErB,eA8YA"}
@@ -41,11 +41,9 @@ export default function CellSetExpressionPlot(props) {
41
41
  if (!obsSetSelection) {
42
42
  return 0;
43
43
  }
44
- const cellSetNames = obsSetSelection.map(d => d.at(-1));
45
- return cellSetNames.reduce((acc, name) => {
46
- // eslint-disable-next-line no-param-reassign
47
- acc = acc === undefined || name.length > acc ? name.length : acc;
48
- return acc;
44
+ return obsSetSelection.reduce((acc, path) => {
45
+ const nameLength = path?.at(-1)?.length ?? 0;
46
+ return nameLength > acc ? nameLength : acc;
49
47
  }, 0);
50
48
  }, [obsSetSelection]);
51
49
  const isStratified = (Array.isArray(sampleSetSelection) && sampleSetSelection.length === 2);
@@ -262,7 +260,7 @@ export default function CellSetExpressionPlot(props) {
262
260
  .append('g')
263
261
  .attr('transform', `translate(0,${innerHeight})`)
264
262
  .style('font-size', '14px');
265
- xTickG.call(axisBottom(xGroup).tickFormat(d => d.at(-1)))
263
+ xTickG.call(axisBottom(xGroup).tickFormat(d => d?.at(-1) ?? ''))
266
264
  .selectAll('text')
267
265
  .style('font-size', '11px')
268
266
  .attr('dx', '-6px')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitessce/statistical-plots",
3
- "version": "3.9.7",
3
+ "version": "3.9.8",
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.9.7",
32
- "@vitessce/constants-internal": "3.9.7",
33
- "@vitessce/sets-utils": "3.9.7",
34
- "@vitessce/utils": "3.9.7",
35
- "@vitessce/vega": "3.9.7",
36
- "@vitessce/vit-s": "3.9.7",
37
- "@vitessce/gl": "3.9.7"
31
+ "@vitessce/styles": "3.9.8",
32
+ "@vitessce/constants-internal": "3.9.8",
33
+ "@vitessce/sets-utils": "3.9.8",
34
+ "@vitessce/vega": "3.9.8",
35
+ "@vitessce/vit-s": "3.9.8",
36
+ "@vitessce/utils": "3.9.8",
37
+ "@vitessce/gl": "3.9.8"
38
38
  },
39
39
  "devDependencies": {
40
40
  "react": "18.3.1",
@@ -69,11 +69,9 @@ export default function CellSetExpressionPlot(props) {
69
69
  if (!obsSetSelection) {
70
70
  return 0;
71
71
  }
72
- const cellSetNames = obsSetSelection.map(d => d.at(-1));
73
- return cellSetNames.reduce((acc, name) => {
74
- // eslint-disable-next-line no-param-reassign
75
- acc = acc === undefined || name.length > acc ? name.length : acc;
76
- return acc;
72
+ return obsSetSelection.reduce((acc, path) => {
73
+ const nameLength = path?.at(-1)?.length ?? 0;
74
+ return nameLength > acc ? nameLength : acc;
77
75
  }, 0);
78
76
  }, [obsSetSelection]);
79
77
 
@@ -326,7 +324,7 @@ export default function CellSetExpressionPlot(props) {
326
324
  .attr('transform', `translate(0,${innerHeight})`)
327
325
  .style('font-size', '14px');
328
326
 
329
- xTickG.call(axisBottom(xGroup).tickFormat(d => d.at(-1)))
327
+ xTickG.call(axisBottom(xGroup).tickFormat(d => d?.at(-1) ?? ''))
330
328
  .selectAll('text')
331
329
  .style('font-size', '11px')
332
330
  .attr('dx', '-6px')