@vitessce/heatmap 3.6.7 → 3.6.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-BKr-5yyI.js";
2
+ import { B as BaseDecoder } from "./index-B0L-VWVv.js";
3
3
  class DeflateDecoder extends BaseDecoder {
4
4
  decodeBlock(buffer) {
5
5
  return inflate_1(new Uint8Array(buffer)).buffer;
@@ -7007,6 +7007,9 @@ const configSchema1_0_16 = configSchema1_0_13.extend({
7007
7007
  const configSchema1_0_17 = configSchema1_0_16.extend({
7008
7008
  version: z.literal("1.0.17")
7009
7009
  });
7010
+ const configSchema1_0_18 = configSchema1_0_17.extend({
7011
+ version: z.literal("1.0.18")
7012
+ });
7010
7013
  configSchema1_0_0.shape.coordinationSpace.unwrap();
7011
7014
  configSchema1_0_0.shape.layout.element.shape.coordinationScopes.unwrap();
7012
7015
  function upgradeReplaceViewProp(prefix2, view, coordinationSpace) {
@@ -7514,7 +7517,54 @@ function upgradeFrom1_0_16(config2) {
7514
7517
  version: "1.0.17"
7515
7518
  };
7516
7519
  }
7517
- const latestConfigSchema = configSchema1_0_17;
7520
+ function upgradeFrom1_0_17(config2) {
7521
+ const newConfig = cloneDeep(config2);
7522
+ const { datasets } = newConfig;
7523
+ const newDatasets = datasets.map((datasetDef) => {
7524
+ const { files } = datasetDef;
7525
+ const newFiles = files.map((fileDef) => {
7526
+ const { fileType, options } = fileDef;
7527
+ if (fileType === "spatialdata.zarr" || fileType === "spatialdata.zarr.zip") {
7528
+ if (options.labels && options.shapes) {
7529
+ throw new Error("Cannot upgrade both labels and shapes at the same time. For now, a workaround is to include two separate spatialdata.zarr file definitions, one for labels and one for shapes.");
7530
+ }
7531
+ if (options.labels) {
7532
+ const newOptions = {
7533
+ ...options,
7534
+ obsSegmentations: options.labels
7535
+ };
7536
+ delete newOptions.labels;
7537
+ return {
7538
+ ...fileDef,
7539
+ options: newOptions
7540
+ };
7541
+ }
7542
+ if (options.shapes) {
7543
+ const newOptions = {
7544
+ ...options,
7545
+ obsSegmentations: options.shapes
7546
+ };
7547
+ delete newOptions.shapes;
7548
+ return {
7549
+ ...fileDef,
7550
+ options: newOptions
7551
+ };
7552
+ }
7553
+ }
7554
+ return fileDef;
7555
+ });
7556
+ return {
7557
+ ...datasetDef,
7558
+ files: newFiles
7559
+ };
7560
+ });
7561
+ return {
7562
+ ...newConfig,
7563
+ datasets: newDatasets,
7564
+ version: "1.0.18"
7565
+ };
7566
+ }
7567
+ const latestConfigSchema = configSchema1_0_18;
7518
7568
  const SCHEMA_HANDLERS = [
7519
7569
  [configSchema0_1_0, upgradeFrom0_1_0],
7520
7570
  [configSchema1_0_0, upgradeFrom1_0_0],
@@ -7533,7 +7583,8 @@ const SCHEMA_HANDLERS = [
7533
7583
  [configSchema1_0_13, upgradeFrom1_0_13],
7534
7584
  [configSchema1_0_14, upgradeFrom1_0_14],
7535
7585
  [configSchema1_0_15, upgradeFrom1_0_15],
7536
- [configSchema1_0_16, upgradeFrom1_0_16]
7586
+ [configSchema1_0_16, upgradeFrom1_0_16],
7587
+ [configSchema1_0_17, upgradeFrom1_0_17]
7537
7588
  ];
7538
7589
  var re$1 = { exports: {} };
7539
7590
  var constants$2;
@@ -9565,9 +9616,7 @@ const FileType$1 = {
9565
9616
  OBS_SETS_SPATIALDATA_ZARR: "obsSets.spatialdata.zarr",
9566
9617
  OBS_SPOTS_SPATIALDATA_ZARR: "obsSpots.spatialdata.zarr",
9567
9618
  FEATURE_LABELS_SPATIALDATA_ZARR: "featureLabels.spatialdata.zarr",
9568
- // TODO:
9569
- // OBS_POINTS_SPATIALDATA_ZARR: 'obsPoints.spatialdata.zarr',
9570
- // OBS_LOCATIONS_SPATIALDATA_ZARR: 'obsLocations.spatialdata.zarr',
9619
+ OBS_POINTS_SPATIALDATA_ZARR: "obsPoints.spatialdata.zarr",
9571
9620
  // SpatialData - zipped
9572
9621
  IMAGE_SPATIALDATA_ZARR_ZIP: "image.spatialdata.zarr.zip",
9573
9622
  LABELS_SPATIALDATA_ZARR_ZIP: "labels.spatialdata.zarr.zip",
@@ -9576,6 +9625,7 @@ const FileType$1 = {
9576
9625
  OBS_SETS_SPATIALDATA_ZARR_ZIP: "obsSets.spatialdata.zarr.zip",
9577
9626
  OBS_SPOTS_SPATIALDATA_ZARR_ZIP: "obsSpots.spatialdata.zarr.zip",
9578
9627
  FEATURE_LABELS_SPATIALDATA_ZARR_ZIP: "featureLabels.spatialdata.zarr.zip",
9628
+ OBS_POINTS_SPATIALDATA_ZARR_ZIP: "obsPoints.spatialdata.zarr.zip",
9579
9629
  // MuData
9580
9630
  OBS_FEATURE_MATRIX_MUDATA_ZARR: "obsFeatureMatrix.mudata.zarr",
9581
9631
  OBS_SETS_MUDATA_ZARR: "obsSets.mudata.zarr",
@@ -9825,6 +9875,7 @@ const ViewHelpMapping = {
9825
9875
  [FileType$1.OBS_FEATURE_MATRIX_SPATIALDATA_ZARR]: DataType$2.OBS_FEATURE_MATRIX,
9826
9876
  [FileType$1.OBS_SETS_SPATIALDATA_ZARR]: DataType$2.OBS_SETS,
9827
9877
  [FileType$1.FEATURE_LABELS_SPATIALDATA_ZARR]: DataType$2.FEATURE_LABELS,
9878
+ [FileType$1.OBS_POINTS_SPATIALDATA_ZARR]: DataType$2.OBS_POINTS,
9828
9879
  // For new file types to support old file types
9829
9880
  [FileType$1.OBS_EMBEDDING_CELLS_JSON]: DataType$2.OBS_EMBEDDING,
9830
9881
  [FileType$1.OBS_LOCATIONS_CELLS_JSON]: DataType$2.OBS_LOCATIONS,
@@ -9998,6 +10049,9 @@ const ViewHelpMapping = {
9998
10049
  },
9999
10050
  [FileType$1.FEATURE_LABELS_SPATIALDATA_ZARR]: {
10000
10051
  zip: FileType$1.FEATURE_LABELS_SPATIALDATA_ZARR_ZIP
10052
+ },
10053
+ [FileType$1.OBS_POINTS_SPATIALDATA_ZARR]: {
10054
+ zip: FileType$1.OBS_POINTS_SPATIALDATA_ZARR_ZIP
10001
10055
  }
10002
10056
  });
10003
10057
  [
@@ -11017,10 +11071,14 @@ const imageSpatialdataSchema = z.object({
11017
11071
  coordinateSystem: z.string().optional().describe('The name of a coordinate transformation output used to transform the image. If not provided, the "global" coordinate system is assumed.')
11018
11072
  });
11019
11073
  const obsSegmentationsSpatialdataSchema = z.object({
11020
- // TODO: should this be renamed labelsSpatialdataSchema?
11021
- // TODO: support obsTypesFromChannelNames?
11022
- path: z.string(),
11023
- tablePath: z.string().optional().describe("The path to a table which annotates the labels. If available but not specified, the spot identifiers may not be aligned with associated tabular data as expected."),
11074
+ // TODO: support obsTypesFromElementNames?
11075
+ path: z.string().describe("The path to the segmentation data, stored in either shapes/ or labels/."),
11076
+ tablePath: z.string().optional().describe("The path to a table which annotates the labels or shapes. If available but not specified, the spot identifiers may not be aligned with associated tabular data as expected."),
11077
+ coordinateSystem: z.string().optional().describe('The name of a coordinate transformation output used to transform the image. If not provided, the "global" coordinate system is assumed.')
11078
+ });
11079
+ const obsPointsSpatialdataSchema = z.object({
11080
+ path: z.string().describe("The path to the point data."),
11081
+ tablePath: z.string().optional().describe("The path to a table which annotates the points. If available but not specified, the spot identifiers may not be aligned with associated tabular data as expected."),
11024
11082
  coordinateSystem: z.string().optional().describe('The name of a coordinate transformation output used to transform the image. If not provided, the "global" coordinate system is assumed.')
11025
11083
  });
11026
11084
  z.object({
@@ -11140,13 +11198,10 @@ z.object({
11140
11198
  image: imageSpatialdataSchema,
11141
11199
  // TODO: should this be a special schema
11142
11200
  // to allow specifying fileUid (like for embeddingType)?
11143
- // TODO: allow multiple labels?
11144
- labels: obsSegmentationsSpatialdataSchema,
11201
+ // TODO: allow multiple labels/shapes?
11202
+ obsSegmentations: obsSegmentationsSpatialdataSchema,
11203
+ obsPoints: obsPointsSpatialdataSchema,
11145
11204
  // TODO: allow multiple shapes?
11146
- // TODO: unify labels and shapes to obsSegmentations,
11147
- // then distinguish in expand function based on
11148
- // "labels/*" vs. "shapes/*" in path?
11149
- shapes: obsSegmentationsSpatialdataSchema,
11150
11205
  obsFeatureMatrix: obsFeatureMatrixSpatialdataSchema,
11151
11206
  obsSpots: obsSpotsSpatialdataSchema,
11152
11207
  // TODO: obsPoints
@@ -26982,6 +27037,23 @@ ButtonBase.propTypes = {
26982
27037
  */
26983
27038
  type: PropTypes.oneOfType([PropTypes.oneOf(["button", "reset", "submit"]), PropTypes.string])
26984
27039
  };
27040
+ function hasCorrectMainProperty(obj) {
27041
+ return typeof obj.main === "string";
27042
+ }
27043
+ function checkSimplePaletteColorValues(obj, additionalPropertiesToCheck = []) {
27044
+ if (!hasCorrectMainProperty(obj)) {
27045
+ return false;
27046
+ }
27047
+ for (const value of additionalPropertiesToCheck) {
27048
+ if (!obj.hasOwnProperty(value) || typeof obj[value] !== "string") {
27049
+ return false;
27050
+ }
27051
+ }
27052
+ return true;
27053
+ }
27054
+ function createSimplePaletteValueFilter(additionalPropertiesToCheck = []) {
27055
+ return ([, value]) => value && checkSimplePaletteColorValues(value, additionalPropertiesToCheck);
27056
+ }
26985
27057
  function HTMLElementType(props, propName, componentName, location, propFullName) {
26986
27058
  const propValue = props[propName];
26987
27059
  const safePropName = propFullName || propName;
@@ -27089,23 +27161,6 @@ Portal.propTypes = {
27089
27161
  {
27090
27162
  Portal["propTypes"] = exactProp(Portal.propTypes);
27091
27163
  }
27092
- function hasCorrectMainProperty(obj) {
27093
- return typeof obj.main === "string";
27094
- }
27095
- function checkSimplePaletteColorValues(obj, additionalPropertiesToCheck = []) {
27096
- if (!hasCorrectMainProperty(obj)) {
27097
- return false;
27098
- }
27099
- for (const value of additionalPropertiesToCheck) {
27100
- if (!obj.hasOwnProperty(value) || typeof obj[value] !== "string") {
27101
- return false;
27102
- }
27103
- }
27104
- return true;
27105
- }
27106
- function createSimplePaletteValueFilter(additionalPropertiesToCheck = []) {
27107
- return ([, value]) => value && checkSimplePaletteColorValues(value, additionalPropertiesToCheck);
27108
- }
27109
27164
  function isHostComponent(element) {
27110
27165
  return typeof element === "string";
27111
27166
  }
@@ -137722,22 +137777,22 @@ function addDecoder(cases, importFn) {
137722
137777
  }
137723
137778
  cases.forEach((c) => registry$1.set(c, importFn));
137724
137779
  }
137725
- addDecoder([void 0, 1], () => import("./raw-U8M4JJZ-.js").then((m) => m.default));
137726
- addDecoder(5, () => import("./lzw-CiiV86Ur.js").then((m) => m.default));
137780
+ addDecoder([void 0, 1], () => import("./raw-BjMoBSb_.js").then((m) => m.default));
137781
+ addDecoder(5, () => import("./lzw-mnIGkDYD.js").then((m) => m.default));
137727
137782
  addDecoder(6, () => {
137728
137783
  throw new Error("old style JPEG compression is not supported.");
137729
137784
  });
137730
- addDecoder(7, () => import("./jpeg-Cm1shyEL.js").then((m) => m.default));
137731
- addDecoder([8, 32946], () => import("./deflate-Ba7ZjAWb.js").then((m) => m.default));
137732
- addDecoder(32773, () => import("./packbits-C2jGKqua.js").then((m) => m.default));
137785
+ addDecoder(7, () => import("./jpeg-CVofsHGA.js").then((m) => m.default));
137786
+ addDecoder([8, 32946], () => import("./deflate-7acU01X0.js").then((m) => m.default));
137787
+ addDecoder(32773, () => import("./packbits-CYaZXwaR.js").then((m) => m.default));
137733
137788
  addDecoder(
137734
137789
  34887,
137735
- () => import("./lerc-Dx1Y-w9t.js").then(async (m) => {
137790
+ () => import("./lerc-BH5xK4HA.js").then(async (m) => {
137736
137791
  await m.zstd.init();
137737
137792
  return m;
137738
137793
  }).then((m) => m.default)
137739
137794
  );
137740
- addDecoder(50001, () => import("./webimage-Ct76zRHV.js").then((m) => m.default));
137795
+ addDecoder(50001, () => import("./webimage-CRtplJ4s.js").then((m) => m.default));
137741
137796
  function decodeRowAcc(row, stride) {
137742
137797
  let length2 = row.length - stride;
137743
137798
  let offset2 = 0;
@@ -152512,13 +152567,25 @@ function HeatmapSubscriber(props) {
152512
152567
  const [isRendering, setIsRendering] = useState(false);
152513
152568
  const [hoveredColorEncoding, setHoveredColorEncoding] = useState("geneSelection");
152514
152569
  const [width2, height2, deckRef] = useDeckCanvasSize();
152515
- const [obsLabelsTypes, obsLabelsData] = useMultiObsLabels(
152570
+ const [
152571
+ // eslint-disable-next-line no-unused-vars
152572
+ obsLabelsTypes,
152573
+ obsLabelsData,
152574
+ obsLabelsStatus,
152575
+ obsLabelsUrls,
152576
+ obsLabelsErrors
152577
+ ] = useMultiObsLabels(
152516
152578
  coordinationScopes,
152517
152579
  obsType,
152518
152580
  loaders,
152519
152581
  dataset
152520
152582
  );
152521
- const [{ featureLabelsMap: featureLabelsMapOrig }, featureLabelsStatus, featureLabelsUrls] = useFeatureLabelsData(
152583
+ const [
152584
+ { featureLabelsMap: featureLabelsMapOrig },
152585
+ featureLabelsStatus,
152586
+ featureLabelsUrls,
152587
+ featureLabelsError
152588
+ ] = useFeatureLabelsData(
152522
152589
  loaders,
152523
152590
  dataset,
152524
152591
  false,
@@ -152534,7 +152601,8 @@ function HeatmapSubscriber(props) {
152534
152601
  const [
152535
152602
  { obsIndex, featureIndex, obsFeatureMatrix },
152536
152603
  matrixStatus,
152537
- matrixUrls
152604
+ matrixUrls,
152605
+ matrixError
152538
152606
  ] = useObsFeatureMatrixData(
152539
152607
  loaders,
152540
152608
  dataset,
@@ -152543,7 +152611,12 @@ function HeatmapSubscriber(props) {
152543
152611
  {},
152544
152612
  { obsType, featureType, featureValueType }
152545
152613
  );
152546
- const [{ obsSets: cellSets, obsSetsMembership }, obsSetsStatus, obsSetsUrls] = useObsSetsData(
152614
+ const [
152615
+ { obsSets: cellSets, obsSetsMembership },
152616
+ obsSetsStatus,
152617
+ obsSetsUrls,
152618
+ obsSetsError
152619
+ ] = useObsSetsData(
152547
152620
  loaders,
152548
152621
  dataset,
152549
152622
  false,
@@ -152551,6 +152624,12 @@ function HeatmapSubscriber(props) {
152551
152624
  { obsSetSelection: cellSetSelection, obsSetColor: cellSetColor },
152552
152625
  { obsType }
152553
152626
  );
152627
+ const errors = [
152628
+ ...obsLabelsErrors,
152629
+ featureLabelsError,
152630
+ matrixError,
152631
+ obsSetsError
152632
+ ];
152554
152633
  const isReady = useReady([
152555
152634
  featureLabelsStatus,
152556
152635
  expandedFeatureLabelsStatus,
@@ -152624,6 +152703,7 @@ function HeatmapSubscriber(props) {
152624
152703
  {
152625
152704
  title,
152626
152705
  helpText,
152706
+ errors,
152627
152707
  info: `${commaNumber(cellsCount)} ${pluralize(observationsLabel, cellsCount)} × ${commaNumber(genesCount)} ${pluralize(variablesLabel, genesCount)},
152628
152708
  with ${commaNumber(selectedCount)} ${pluralize(observationsLabel, selectedCount)} selected`,
152629
152709
  urls,
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { a, H } from "./index-BKr-5yyI.js";
1
+ import { a, H } from "./index-B0L-VWVv.js";
2
2
  export {
3
3
  a as Heatmap,
4
4
  H as HeatmapSubscriber
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-BKr-5yyI.js";
1
+ import { B as BaseDecoder } from "./index-B0L-VWVv.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-BKr-5yyI.js";
2
+ import { g as getDefaultExportFromCjs, B as BaseDecoder } from "./index-B0L-VWVv.js";
3
3
  const LercParameters = {
4
4
  AddCompression: 1
5
5
  };
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-BKr-5yyI.js";
1
+ import { B as BaseDecoder } from "./index-B0L-VWVv.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-BKr-5yyI.js";
1
+ import { B as BaseDecoder } from "./index-B0L-VWVv.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-BKr-5yyI.js";
1
+ import { B as BaseDecoder } from "./index-B0L-VWVv.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-BKr-5yyI.js";
1
+ import { B as BaseDecoder } from "./index-B0L-VWVv.js";
2
2
  class WebImageDecoder extends BaseDecoder {
3
3
  constructor() {
4
4
  super();
@@ -1 +1 @@
1
- {"version":3,"file":"HeatmapSubscriber.d.ts","sourceRoot":"","sources":["../src/HeatmapSubscriber.js"],"names":[],"mappings":"AA4BA;;;;;;;;;;GAUG;AACH,yCATG;IAAsB,IAAI,EAAlB,MAAM;IACQ,kBAAkB,EAAhC,MAAM;IAEU,mBAAmB;IAErB,KAAK,EAAnB,MAAM;IACS,SAAS,EAAxB,OAAO;CAEjB,eAuQA"}
1
+ {"version":3,"file":"HeatmapSubscriber.d.ts","sourceRoot":"","sources":["../src/HeatmapSubscriber.js"],"names":[],"mappings":"AA4BA;;;;;;;;;;GAUG;AACH,yCATG;IAAsB,IAAI,EAAlB,MAAM;IACQ,kBAAkB,EAAhC,MAAM;IAEU,mBAAmB;IAErB,KAAK,EAAnB,MAAM;IACS,SAAS,EAAxB,OAAO;CAEjB,eAyRA"}
@@ -39,13 +39,21 @@ export function HeatmapSubscriber(props) {
39
39
  const [hoveredColorEncoding, setHoveredColorEncoding] = useState('geneSelection');
40
40
  const [width, height, deckRef] = useDeckCanvasSize();
41
41
  // Get data from loaders using the data hooks.
42
- const [obsLabelsTypes, obsLabelsData] = useMultiObsLabels(coordinationScopes, obsType, loaders, dataset);
42
+ const [
43
+ // eslint-disable-next-line no-unused-vars
44
+ obsLabelsTypes, obsLabelsData, obsLabelsStatus, obsLabelsUrls, obsLabelsErrors,] = useMultiObsLabels(coordinationScopes, obsType, loaders, dataset);
43
45
  // TODO: support multiple feature labels using featureLabelsType coordination values.
44
46
  // eslint-disable-next-line max-len
45
- const [{ featureLabelsMap: featureLabelsMapOrig }, featureLabelsStatus, featureLabelsUrls] = useFeatureLabelsData(loaders, dataset, false, {}, {}, { featureType });
47
+ const [{ featureLabelsMap: featureLabelsMapOrig }, featureLabelsStatus, featureLabelsUrls, featureLabelsError,] = useFeatureLabelsData(loaders, dataset, false, {}, {}, { featureType });
46
48
  const [featureLabelsMap, expandedFeatureLabelsStatus] = useExpandedFeatureLabelsMap(featureType, featureLabelsMapOrig, { stripCuriePrefixes: true });
47
- const [{ obsIndex, featureIndex, obsFeatureMatrix }, matrixStatus, matrixUrls,] = useObsFeatureMatrixData(loaders, dataset, true, {}, {}, { obsType, featureType, featureValueType });
48
- const [{ obsSets: cellSets, obsSetsMembership }, obsSetsStatus, obsSetsUrls] = useObsSetsData(loaders, dataset, false, { setObsSetSelection: setCellSetSelection, setObsSetColor: setCellSetColor }, { obsSetSelection: cellSetSelection, obsSetColor: cellSetColor }, { obsType });
49
+ const [{ obsIndex, featureIndex, obsFeatureMatrix }, matrixStatus, matrixUrls, matrixError,] = useObsFeatureMatrixData(loaders, dataset, true, {}, {}, { obsType, featureType, featureValueType });
50
+ const [{ obsSets: cellSets, obsSetsMembership }, obsSetsStatus, obsSetsUrls, obsSetsError,] = useObsSetsData(loaders, dataset, false, { setObsSetSelection: setCellSetSelection, setObsSetColor: setCellSetColor }, { obsSetSelection: cellSetSelection, obsSetColor: cellSetColor }, { obsType });
51
+ const errors = [
52
+ ...obsLabelsErrors,
53
+ featureLabelsError,
54
+ matrixError,
55
+ obsSetsError,
56
+ ];
49
57
  const isReady = useReady([
50
58
  featureLabelsStatus,
51
59
  expandedFeatureLabelsStatus,
@@ -104,7 +112,7 @@ export function HeatmapSubscriber(props) {
104
112
  `${capitalize(observationsLabel)} Set`,
105
113
  ]), [observationsLabel]);
106
114
  const selectedCount = cellColors.size;
107
- return (_jsxs(TitleInfo, { title: title, helpText: helpText, info: `${commaNumber(cellsCount)} ${plur(observationsLabel, cellsCount)} × ${commaNumber(genesCount)} ${plur(variablesLabel, genesCount)},
115
+ return (_jsxs(TitleInfo, { title: title, helpText: helpText, errors: errors, info: `${commaNumber(cellsCount)} ${plur(observationsLabel, cellsCount)} × ${commaNumber(genesCount)} ${plur(variablesLabel, genesCount)},
108
116
  with ${commaNumber(selectedCount)} ${plur(observationsLabel, selectedCount)} selected`, urls: urls, theme: theme, closeButtonVisible: closeButtonVisible, downloadButtonVisible: downloadButtonVisible, removeGridComponent: removeGridComponent, isReady: isReady && !isRendering, options: (_jsx(HeatmapOptions, { geneExpressionColormap: geneExpressionColormap, setGeneExpressionColormap: setGeneExpressionColormap, geneExpressionColormapRange: geneExpressionColormapRange, setGeneExpressionColormapRange: setGeneExpressionColormapRange, tooltipsVisible: tooltipsVisible, setTooltipsVisible: setTooltipsVisible })), children: [_jsx(Heatmap, { ref: deckRef, transpose: transpose, viewState: { zoom: zoomX, target: [targetX, targetY] }, setViewState: ({ zoom, target }) => {
109
117
  setZoomX(zoom);
110
118
  setZoomY(zoom);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitessce/heatmap",
3
- "version": "3.6.7",
3
+ "version": "3.6.8",
4
4
  "author": "HIDIVE Lab at HMS",
5
5
  "homepage": "http://vitessce.io",
6
6
  "repository": {
@@ -19,15 +19,15 @@
19
19
  "lodash-es": "^4.17.21",
20
20
  "uuid": "^9.0.0",
21
21
  "react-aria": "^3.28.0",
22
- "@vitessce/styles": "3.6.7",
23
- "@vitessce/constants-internal": "3.6.7",
24
- "@vitessce/gl": "3.6.7",
25
- "@vitessce/legend": "3.6.7",
26
- "@vitessce/sets-utils": "3.6.7",
27
- "@vitessce/tooltip": "3.6.7",
28
- "@vitessce/utils": "3.6.7",
29
- "@vitessce/vit-s": "3.6.7",
30
- "@vitessce/workers": "3.6.7"
22
+ "@vitessce/styles": "3.6.8",
23
+ "@vitessce/constants-internal": "3.6.8",
24
+ "@vitessce/gl": "3.6.8",
25
+ "@vitessce/legend": "3.6.8",
26
+ "@vitessce/sets-utils": "3.6.8",
27
+ "@vitessce/tooltip": "3.6.8",
28
+ "@vitessce/utils": "3.6.8",
29
+ "@vitessce/vit-s": "3.6.8",
30
+ "@vitessce/workers": "3.6.8"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@testing-library/jest-dom": "^6.6.3",
@@ -107,12 +107,20 @@ export function HeatmapSubscriber(props) {
107
107
  const [width, height, deckRef] = useDeckCanvasSize();
108
108
 
109
109
  // Get data from loaders using the data hooks.
110
- const [obsLabelsTypes, obsLabelsData] = useMultiObsLabels(
110
+ const [
111
+ // eslint-disable-next-line no-unused-vars
112
+ obsLabelsTypes, obsLabelsData, obsLabelsStatus, obsLabelsUrls, obsLabelsErrors,
113
+ ] = useMultiObsLabels(
111
114
  coordinationScopes, obsType, loaders, dataset,
112
115
  );
113
116
  // TODO: support multiple feature labels using featureLabelsType coordination values.
114
117
  // eslint-disable-next-line max-len
115
- const [{ featureLabelsMap: featureLabelsMapOrig }, featureLabelsStatus, featureLabelsUrls] = useFeatureLabelsData(
118
+ const [
119
+ { featureLabelsMap: featureLabelsMapOrig },
120
+ featureLabelsStatus,
121
+ featureLabelsUrls,
122
+ featureLabelsError,
123
+ ] = useFeatureLabelsData(
116
124
  loaders, dataset, false, {}, {},
117
125
  { featureType },
118
126
  );
@@ -121,17 +129,26 @@ export function HeatmapSubscriber(props) {
121
129
  );
122
130
 
123
131
  const [
124
- { obsIndex, featureIndex, obsFeatureMatrix }, matrixStatus, matrixUrls,
132
+ { obsIndex, featureIndex, obsFeatureMatrix }, matrixStatus, matrixUrls, matrixError,
125
133
  ] = useObsFeatureMatrixData(
126
134
  loaders, dataset, true, {}, {},
127
135
  { obsType, featureType, featureValueType },
128
136
  );
129
- const [{ obsSets: cellSets, obsSetsMembership }, obsSetsStatus, obsSetsUrls] = useObsSetsData(
137
+ const [
138
+ { obsSets: cellSets, obsSetsMembership }, obsSetsStatus, obsSetsUrls, obsSetsError,
139
+ ] = useObsSetsData(
130
140
  loaders, dataset, false,
131
141
  { setObsSetSelection: setCellSetSelection, setObsSetColor: setCellSetColor },
132
142
  { obsSetSelection: cellSetSelection, obsSetColor: cellSetColor },
133
143
  { obsType },
134
144
  );
145
+
146
+ const errors = [
147
+ ...obsLabelsErrors,
148
+ featureLabelsError,
149
+ matrixError,
150
+ obsSetsError,
151
+ ];
135
152
  const isReady = useReady([
136
153
  featureLabelsStatus,
137
154
  expandedFeatureLabelsStatus,
@@ -212,6 +229,7 @@ export function HeatmapSubscriber(props) {
212
229
  <TitleInfo
213
230
  title={title}
214
231
  helpText={helpText}
232
+ errors={errors}
215
233
  info={`${commaNumber(cellsCount)} ${plur(observationsLabel, cellsCount)} × ${commaNumber(genesCount)} ${plur(variablesLabel, genesCount)},
216
234
  with ${commaNumber(selectedCount)} ${plur(observationsLabel, selectedCount)} selected`}
217
235
  urls={urls}