@vitessce/description 3.4.10 → 3.4.12
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
|
@@ -917,6 +917,7 @@ const CoordinationType = {
|
|
|
917
917
|
FEATURE_TYPE: "featureType",
|
|
918
918
|
FEATURE_VALUE_TYPE: "featureValueType",
|
|
919
919
|
OBS_LABELS_TYPE: "obsLabelsType",
|
|
920
|
+
FEATURE_LABELS_TYPE: "featureLabelsType",
|
|
920
921
|
// Other types
|
|
921
922
|
EMBEDDING_TYPE: "embeddingType",
|
|
922
923
|
EMBEDDING_ZOOM: "embeddingZoom",
|
|
@@ -1035,6 +1036,23 @@ const DescriptionType = {
|
|
|
1035
1036
|
PLAIN: "plain",
|
|
1036
1037
|
MARKDOWN: "markdown"
|
|
1037
1038
|
};
|
|
1039
|
+
const ViewHelpMapping = {
|
|
1040
|
+
SCATTERPLOT: "The scatterplot displays two-dimensional (pre-computed) dimensionality reduction results (such as from t-SNE or UMAP). Each point on the scatterplot represents an observation (e.g., cell).",
|
|
1041
|
+
HEATMAP: "The heatmap displays an observation-by-feature (e.g., cell-by-gene) matrix, typically with transformed (e.g., normalized or standardized) values.",
|
|
1042
|
+
SPATIAL: "The spatial view displays (potentially layered) spatially-resolved data including RGB or multiplexed images, segmentations of observations (bitmask- or polygon-based), and/or points (e.g., representing FISH transcripts).",
|
|
1043
|
+
DESCRIPTION: "The description view displays additional information about a dataset. When images are included in a dataset, the description view also includes image metadata (if contained in the image files).",
|
|
1044
|
+
STATUS: "The status view displays debugging messages, including app-wide error messages when datasets fail to load or when schemas fail to validate. Details about the entity under the mouse cursor (cell, gene, and/or molecule) are displayed during hover interactions.",
|
|
1045
|
+
LAYER_CONTROLLER: "The spatial layer controller provides an interface for manipulating the visualization layers displayed in the spatial view.",
|
|
1046
|
+
GENOMIC_PROFILES: "The genomic profiles view displays genome browser tracks (using the genomic-profiles data type) containing bar plots, where the genome is along the x-axis and the value at each genome position is encoded with a bar along the y-axis.",
|
|
1047
|
+
GATING: "The gating scatterplot displays expression data for two genes (along the X and Y axes). Users can select two genes, and the scatterplot is dynamically generated using observation-by-feature matrix data. Gating can then be performed by using the lasso or box select tools.",
|
|
1048
|
+
FEATURE_LIST: "The feature list controller displays an interactive list of features (e.g., genes).",
|
|
1049
|
+
OBS_SETS: "The observation sets controller displays an interactive list of (potentially hierarchical) observation sets (e.g., cell clusters or cell type annotations).",
|
|
1050
|
+
OBS_SET_SIZES: "The observation set sizes view displays a bar plot with the currently-selected observation sets (e.g., cell types) on the x-axis and bars representing their size (e.g., number of cells) on the y-axis.",
|
|
1051
|
+
OBS_SET_FEATURE_VALUE_DISTRIBUTION: "The observation set feature value distribution view displays a violin plot with values (e.g., expression values) per set (e.g., cell type) for the selected feature (e.g., gene).",
|
|
1052
|
+
FEATURE_VALUE_HISTOGRAM: "The feature value histogram displays the distribution of values (e.g., expression) for the selected feature (e.g., gene).",
|
|
1053
|
+
DOT_PLOT: "The dot plot displays summary information about expression of the selected features (e.g., genes) for each selected observation set (e.g., cell type).",
|
|
1054
|
+
FEATURE_BAR_PLOT: "The feature bar plot displays one bar per observation (e.g., cell) along the x-axis, where the value of a selected feature (e.g., gene) is encoded along the y-axis."
|
|
1055
|
+
};
|
|
1038
1056
|
const COMPONENT_COORDINATION_TYPES = {
|
|
1039
1057
|
[ViewType.SCATTERPLOT]: [
|
|
1040
1058
|
CoordinationType.DATASET,
|
|
@@ -15943,7 +15961,8 @@ function DescriptionSubscriber(props) {
|
|
|
15943
15961
|
removeGridComponent,
|
|
15944
15962
|
theme,
|
|
15945
15963
|
title = "Description",
|
|
15946
|
-
closeButtonVisible
|
|
15964
|
+
closeButtonVisible,
|
|
15965
|
+
helpText = ViewHelpMapping.DESCRIPTION
|
|
15947
15966
|
} = props;
|
|
15948
15967
|
const loaders = useLoaders();
|
|
15949
15968
|
const [{
|
|
@@ -15986,6 +16005,7 @@ function DescriptionSubscriber(props) {
|
|
|
15986
16005
|
isScroll: true,
|
|
15987
16006
|
theme,
|
|
15988
16007
|
isReady,
|
|
16008
|
+
helpText,
|
|
15989
16009
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
15990
16010
|
Description,
|
|
15991
16011
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DescriptionSubscriber.d.ts","sourceRoot":"","sources":["../src/DescriptionSubscriber.js"],"names":[],"mappings":"AAUA;;;;;;;;;;GAUG;AACH,6CAPG;IAAsB,KAAK,EAAnB,MAAM;IACQ,kBAAkB,EAAhC,MAAM;IAEU,mBAAmB;IAErB,KAAK,EAAnB,MAAM;CAChB,
|
|
1
|
+
{"version":3,"file":"DescriptionSubscriber.d.ts","sourceRoot":"","sources":["../src/DescriptionSubscriber.js"],"names":[],"mappings":"AAUA;;;;;;;;;;GAUG;AACH,6CAPG;IAAsB,KAAK,EAAnB,MAAM;IACQ,kBAAkB,EAAhC,MAAM;IAEU,mBAAmB;IAErB,KAAK,EAAnB,MAAM;CAChB,eAiEA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import React, { useMemo } from 'react';
|
|
3
3
|
import { TitleInfo, useReady, useCoordination, useLoaders, useDescription, useImageData, } from '@vitessce/vit-s';
|
|
4
|
-
import { ViewType, COMPONENT_COORDINATION_TYPES } from '@vitessce/constants-internal';
|
|
4
|
+
import { ViewType, COMPONENT_COORDINATION_TYPES, ViewHelpMapping } from '@vitessce/constants-internal';
|
|
5
5
|
import Description from './Description.js';
|
|
6
6
|
/**
|
|
7
7
|
* A subscriber component for a text description component.
|
|
@@ -15,7 +15,7 @@ import Description from './Description.js';
|
|
|
15
15
|
* @param {string} props.title The component title.
|
|
16
16
|
*/
|
|
17
17
|
export function DescriptionSubscriber(props) {
|
|
18
|
-
const { coordinationScopes, description: descriptionOverride, descriptionType, removeGridComponent, theme, title = 'Description', closeButtonVisible, } = props;
|
|
18
|
+
const { coordinationScopes, description: descriptionOverride, descriptionType, removeGridComponent, theme, title = 'Description', closeButtonVisible, helpText = ViewHelpMapping.DESCRIPTION, } = props;
|
|
19
19
|
const loaders = useLoaders();
|
|
20
20
|
// Get "props" from the coordination space.
|
|
21
21
|
const [{ dataset, spatialImageLayer: rasterLayers, }] = useCoordination(COMPONENT_COORDINATION_TYPES[ViewType.DESCRIPTION], coordinationScopes);
|
|
@@ -40,5 +40,5 @@ export function DescriptionSubscriber(props) {
|
|
|
40
40
|
}
|
|
41
41
|
return result;
|
|
42
42
|
}, [rasterLayers, imageLayerMeta, imageLayerLoaders]);
|
|
43
|
-
return (_jsx(TitleInfo, { title: title, closeButtonVisible: closeButtonVisible, removeGridComponent: removeGridComponent, isScroll: true, theme: theme, isReady: isReady, children: _jsx(Description, { description: descriptionOverride || description, descriptionType: descriptionType, metadata: metadata }) }));
|
|
43
|
+
return (_jsx(TitleInfo, { title: title, closeButtonVisible: closeButtonVisible, removeGridComponent: removeGridComponent, isScroll: true, theme: theme, isReady: isReady, helpText: helpText, children: _jsx(Description, { description: descriptionOverride || description, descriptionType: descriptionType, metadata: metadata }) }));
|
|
44
44
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitessce/description",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.12",
|
|
4
4
|
"author": "Gehlenborg Lab",
|
|
5
5
|
"homepage": "http://vitessce.io",
|
|
6
6
|
"repository": {
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"@material-ui/core": "~4.12.3",
|
|
20
20
|
"react-markdown": "^9.0.1",
|
|
21
|
-
"@vitessce/constants-internal": "3.4.
|
|
22
|
-
"@vitessce/vit-s": "3.4.
|
|
21
|
+
"@vitessce/constants-internal": "3.4.12",
|
|
22
|
+
"@vitessce/vit-s": "3.4.12"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@testing-library/jest-dom": "^5.16.4",
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
useCoordination, useLoaders,
|
|
6
6
|
useDescription, useImageData,
|
|
7
7
|
} from '@vitessce/vit-s';
|
|
8
|
-
import { ViewType, COMPONENT_COORDINATION_TYPES } from '@vitessce/constants-internal';
|
|
8
|
+
import { ViewType, COMPONENT_COORDINATION_TYPES, ViewHelpMapping } from '@vitessce/constants-internal';
|
|
9
9
|
import Description from './Description.js';
|
|
10
10
|
|
|
11
11
|
/**
|
|
@@ -28,6 +28,7 @@ export function DescriptionSubscriber(props) {
|
|
|
28
28
|
theme,
|
|
29
29
|
title = 'Description',
|
|
30
30
|
closeButtonVisible,
|
|
31
|
+
helpText = ViewHelpMapping.DESCRIPTION,
|
|
31
32
|
} = props;
|
|
32
33
|
|
|
33
34
|
const loaders = useLoaders();
|
|
@@ -73,6 +74,7 @@ export function DescriptionSubscriber(props) {
|
|
|
73
74
|
isScroll
|
|
74
75
|
theme={theme}
|
|
75
76
|
isReady={isReady}
|
|
77
|
+
helpText={helpText}
|
|
76
78
|
>
|
|
77
79
|
<Description
|
|
78
80
|
description={descriptionOverride || description}
|