@vitessce/statistical-plots 4.0.0-test.0 → 4.0.0-test.2

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.
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-CbgHjvsF.js";
1
+ import { b, f, C, e, a, i, D, h, E, F, c, d, T, V } from "./index-DXP6eIPs.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-CbgHjvsF.js";
1
+ import { B as BaseDecoder } from "./index-DXP6eIPs.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-CbgHjvsF.js";
2
+ import { g as getDefaultExportFromCjs, B as BaseDecoder } from "./index-DXP6eIPs.js";
3
3
  const LercParameters = {
4
4
  AddCompression: 1
5
5
  };
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-CbgHjvsF.js";
1
+ import { B as BaseDecoder } from "./index-DXP6eIPs.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-CbgHjvsF.js";
1
+ import { B as BaseDecoder } from "./index-DXP6eIPs.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-CbgHjvsF.js";
1
+ import { B as BaseDecoder } from "./index-DXP6eIPs.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-CbgHjvsF.js";
1
+ import { B as BaseDecoder } from "./index-DXP6eIPs.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,OAgZA"}
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,OA8YA"}
@@ -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": "4.0.0-test.0",
3
+ "version": "4.0.0-test.2",
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.47.0",
29
29
  "internmap": "^2.0.3",
30
30
  "uuid": "^9.0.0",
31
- "@vitessce/styles": "4.0.0-test.0",
32
- "@vitessce/sets-utils": "4.0.0-test.0",
33
- "@vitessce/constants-internal": "4.0.0-test.0",
34
- "@vitessce/vit-s": "4.0.0-test.0",
35
- "@vitessce/gl": "4.0.0-test.0",
36
- "@vitessce/utils": "4.0.0-test.0",
37
- "@vitessce/vega": "4.0.0-test.0"
31
+ "@vitessce/styles": "4.0.0-test.2",
32
+ "@vitessce/constants-internal": "4.0.0-test.2",
33
+ "@vitessce/sets-utils": "4.0.0-test.2",
34
+ "@vitessce/utils": "4.0.0-test.2",
35
+ "@vitessce/vit-s": "4.0.0-test.2",
36
+ "@vitessce/vega": "4.0.0-test.2",
37
+ "@vitessce/gl": "4.0.0-test.2"
38
38
  },
39
39
  "devDependencies": {
40
40
  "react": "19.1.0",
@@ -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')