@vitessce/feature-list 3.3.1 → 3.3.3

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
@@ -10180,7 +10180,9 @@ const FileType$1 = {
10180
10180
  OBS_SEGMENTATIONS_JSON: "obsSegmentations.json",
10181
10181
  OBS_SETS_CSV: "obsSets.csv",
10182
10182
  OBS_SETS_JSON: "obsSets.json",
10183
+ // OME-Zarr
10183
10184
  IMAGE_OME_ZARR: "image.ome-zarr",
10185
+ OBS_SEGMENTATIONS_OME_ZARR: "obsSegmentations.ome-zarr",
10184
10186
  // AnnData
10185
10187
  OBS_FEATURE_MATRIX_ANNDATA_ZARR: "obsFeatureMatrix.anndata.zarr",
10186
10188
  OBS_SETS_ANNDATA_ZARR: "obsSets.anndata.zarr",
@@ -10664,7 +10666,9 @@ const COMPONENT_COORDINATION_TYPES = {
10664
10666
  CoordinationType$1.SPATIAL_SEGMENTATION_FILLED,
10665
10667
  CoordinationType$1.SPATIAL_SEGMENTATION_STROKE_WIDTH,
10666
10668
  CoordinationType$1.IMAGE_CHANNEL,
10669
+ CoordinationType$1.IMAGE_LAYER,
10667
10670
  CoordinationType$1.SEGMENTATION_CHANNEL,
10671
+ CoordinationType$1.SEGMENTATION_LAYER,
10668
10672
  CoordinationType$1.SPATIAL_CHANNEL_VISIBLE,
10669
10673
  CoordinationType$1.SPATIAL_CHANNEL_OPACITY,
10670
10674
  CoordinationType$1.SPATIAL_CHANNEL_WINDOW,
@@ -10682,6 +10686,9 @@ const COMPONENT_COORDINATION_TYPES = {
10682
10686
  CoordinationType$1.SPATIAL_SPOT_STROKE_WIDTH,
10683
10687
  CoordinationType$1.SPATIAL_LAYER_COLOR,
10684
10688
  CoordinationType$1.OBS_COLOR_ENCODING,
10689
+ CoordinationType$1.FEATURE_VALUE_COLORMAP,
10690
+ CoordinationType$1.FEATURE_VALUE_COLORMAP_RANGE,
10691
+ CoordinationType$1.FEATURE_SELECTION,
10685
10692
  CoordinationType$1.TOOLTIPS_VISIBLE,
10686
10693
  CoordinationType$1.TOOLTIP_CROSSHAIRS_VISIBLE,
10687
10694
  CoordinationType$1.LEGEND_VISIBLE,
@@ -10998,30 +11005,39 @@ const omeCoordinateTransformations = z.array(z.union([
10998
11005
  scale: z.array(z.number())
10999
11006
  })
11000
11007
  ]));
11001
- z.object({
11008
+ const imageOmeTiffSchema = z.object({
11002
11009
  offsetsUrl: z.string().optional(),
11003
11010
  coordinateTransformations: omeCoordinateTransformations.optional()
11004
11011
  });
11012
+ imageOmeTiffSchema.extend({
11013
+ obsTypesFromChannelNames: z.boolean().optional()
11014
+ });
11005
11015
  const imageOmeZarrSchema = z.object({
11006
11016
  coordinateTransformations: omeCoordinateTransformations.optional()
11007
11017
  });
11008
11018
  imageOmeZarrSchema.extend({
11019
+ obsTypesFromChannelNames: z.boolean().optional()
11020
+ });
11021
+ const imageSpatialdataSchema = imageOmeZarrSchema.extend({
11009
11022
  path: z.string()
11010
11023
  });
11011
- z.object({
11024
+ const obsSegmentationsSpatialdataSchema = z.object({
11025
+ // TODO: should this also extend the imageOmeZarrSchema?
11026
+ // TODO: should this be renamed labelsSpatialdataSchema?
11027
+ // TODO: support obsTypesFromChannelNames?
11012
11028
  path: z.string()
11013
11029
  });
11014
11030
  z.object({
11015
11031
  path: z.string()
11016
11032
  });
11017
- z.object({
11033
+ const obsSpotsSpatialdataSchema = z.object({
11018
11034
  path: z.string(),
11019
11035
  tablePath: z.string().optional().describe("The path to a table which annotates the spots. If available but not specified, the spot identifiers may not be aligned with associated tabular data as expected.")
11020
11036
  });
11021
- annDataObsFeatureMatrix.extend({
11037
+ const obsFeatureMatrixSpatialdataSchema = annDataObsFeatureMatrix.extend({
11022
11038
  region: z.string().describe("The name of a region to use to filter instances (i.e., rows) in the table").optional()
11023
11039
  });
11024
- z.object({
11040
+ const obsSetsSpatialdataSchema = z.object({
11025
11041
  region: z.string().describe("The name of a region to use to filter instances (i.e., rows) in the table").optional(),
11026
11042
  tablePath: z.string().optional().describe("The path to a table which contains the index for the set values."),
11027
11043
  obsSets: annDataObsSets
@@ -11084,6 +11100,19 @@ z.object({
11084
11100
  z.array(annDataConvenienceObsEmbeddingItem)
11085
11101
  ])
11086
11102
  }).partial();
11103
+ z.object({
11104
+ // TODO: should `image` be a special schema
11105
+ // to allow specifying fileUid (like for embeddingType)?
11106
+ image: imageSpatialdataSchema,
11107
+ // TODO: should this be a special schema
11108
+ // to allow specifying fileUid (like for embeddingType)?
11109
+ labels: obsSegmentationsSpatialdataSchema,
11110
+ obsFeatureMatrix: obsFeatureMatrixSpatialdataSchema,
11111
+ obsSpots: obsSpotsSpatialdataSchema,
11112
+ // TODO: obsPoints
11113
+ // TODO: obsLocations
11114
+ obsSets: obsSetsSpatialdataSchema
11115
+ }).partial();
11087
11116
  z.object({
11088
11117
  obsLabelsTypes: z.array(z.string()).optional(),
11089
11118
  embeddingTypes: z.array(z.string()).optional()
@@ -29552,7 +29581,9 @@ function FeatureListSubscriber(props) {
29552
29581
  enableMultiSelect = false,
29553
29582
  showTable = false,
29554
29583
  sort: sort2 = "alphabetical",
29555
- sortKey = null
29584
+ sortKey = null,
29585
+ closeButtonVisible,
29586
+ downloadButtonVisible
29556
29587
  } = props;
29557
29588
  const loaders = useLoaders();
29558
29589
  const [{
@@ -29611,6 +29642,8 @@ function FeatureListSubscriber(props) {
29611
29642
  info: `${commaNumber(numGenes)} ${pluralize(variablesLabel, numGenes)}`,
29612
29643
  theme,
29613
29644
  isScroll: true,
29645
+ closeButtonVisible,
29646
+ downloadButtonVisible,
29614
29647
  removeGridComponent,
29615
29648
  isReady,
29616
29649
  urls,
@@ -1 +1 @@
1
- {"version":3,"file":"FeatureListSubscriber.d.ts","sourceRoot":"","sources":["../src/FeatureListSubscriber.js"],"names":[],"mappings":"AAaA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH;IAlByB,KAAK,EAAnB,MAAM;IACQ,kBAAkB,EAAhC,MAAM;IAEU,mBAAmB;IAErB,KAAK,EAAnB,MAAM;IACQ,sBAAsB,EAApC,MAAM;IAEQ,4BAA4B,EAA1C,MAAM;IAES,iBAAiB,EAAhC,OAAO;IAEQ,SAAS,EAAxB,OAAO;IAC0B,IAAI,EAArC,cAAc,GAAC,UAAU;IAGkB,OAAO,EAAlD,cAAc,GAAC,eAAe,GAAC,IAAI;gBAiH7C"}
1
+ {"version":3,"file":"FeatureListSubscriber.d.ts","sourceRoot":"","sources":["../src/FeatureListSubscriber.js"],"names":[],"mappings":"AAaA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH;IAlByB,KAAK,EAAnB,MAAM;IACQ,kBAAkB,EAAhC,MAAM;IAEU,mBAAmB;IAErB,KAAK,EAAnB,MAAM;IACQ,sBAAsB,EAApC,MAAM;IAEQ,4BAA4B,EAA1C,MAAM;IAES,iBAAiB,EAAhC,OAAO;IAEQ,SAAS,EAAxB,OAAO;IAC0B,IAAI,EAArC,cAAc,GAAC,UAAU;IAGkB,OAAO,EAAlD,cAAc,GAAC,eAAe,GAAC,IAAI;gBAqH7C"}
@@ -27,7 +27,7 @@ import FeatureListOptions from './FeatureListOptions.js';
27
27
  * @param {'featureIndex'|'featureLabels'|null} props.sortKey The information to use for sorting.
28
28
  */
29
29
  export function FeatureListSubscriber(props) {
30
- const { coordinationScopes, removeGridComponent, variablesLabelOverride, theme, title: titleOverride, enableMultiSelect = false, showTable = false, sort = 'alphabetical', sortKey = null, } = props;
30
+ const { coordinationScopes, removeGridComponent, variablesLabelOverride, theme, title: titleOverride, enableMultiSelect = false, showTable = false, sort = 'alphabetical', sortKey = null, closeButtonVisible, downloadButtonVisible, } = props;
31
31
  const loaders = useLoaders();
32
32
  // Get "props" from the coordination space.
33
33
  const [{ dataset, obsType, featureType, featureSelection: geneSelection, featureFilter: geneFilter, obsColorEncoding: cellColorEncoding, }, { setFeatureSelection: setGeneSelection, setFeatureFilter: setGeneFilter, setFeatureHighlight: setGeneHighlight, setObsColorEncoding: setCellColorEncoding, }] = useCoordination(COMPONENT_COORDINATION_TYPES[ViewType.FEATURE_LIST], coordinationScopes);
@@ -61,5 +61,5 @@ export function FeatureListSubscriber(props) {
61
61
  // Virtual scroll is used but this allows for the same styling as a scroll component
62
62
  // even though this no longer uses the TitleInfo component's
63
63
  // scroll css (SelectableTable is virtual scroll).
64
- isScroll: true, removeGridComponent: removeGridComponent, isReady: isReady, urls: urls, options: (_jsx(FeatureListOptions, { featureListSort: featureListSort, setFeatureListSort: setFeatureListSort, featureListSortKey: featureListSortKey || initialSortKey, setFeatureListSortKey: setFeatureListSortKey, showFeatureTable: showFeatureTable, setShowFeatureTable: setShowFeatureTable, hasFeatureLabels: Boolean(featureLabelsMap), primaryColumnName: primaryColumnName })), children: _jsx(FeatureList, { hasColorEncoding: cellColorEncoding === 'geneSelection', showFeatureTable: showFeatureTable, geneList: geneList, featureListSort: featureListSort, featureListSortKey: featureListSortKey || initialSortKey, featureLabelsMap: featureLabelsMap, featureType: featureType, geneSelection: geneSelection, geneFilter: geneFilter, setGeneSelection: setGeneSelectionAndColorEncoding, setGeneFilter: setGeneFilter, setGeneHighlight: setGeneHighlight, enableMultiSelect: enableMultiSelect, hasFeatureLabels: Boolean(featureLabelsMap), primaryColumnName: primaryColumnName }) }));
64
+ isScroll: true, closeButtonVisible: closeButtonVisible, downloadButtonVisible: downloadButtonVisible, removeGridComponent: removeGridComponent, isReady: isReady, urls: urls, options: (_jsx(FeatureListOptions, { featureListSort: featureListSort, setFeatureListSort: setFeatureListSort, featureListSortKey: featureListSortKey || initialSortKey, setFeatureListSortKey: setFeatureListSortKey, showFeatureTable: showFeatureTable, setShowFeatureTable: setShowFeatureTable, hasFeatureLabels: Boolean(featureLabelsMap), primaryColumnName: primaryColumnName })), children: _jsx(FeatureList, { hasColorEncoding: cellColorEncoding === 'geneSelection', showFeatureTable: showFeatureTable, geneList: geneList, featureListSort: featureListSort, featureListSortKey: featureListSortKey || initialSortKey, featureLabelsMap: featureLabelsMap, featureType: featureType, geneSelection: geneSelection, geneFilter: geneFilter, setGeneSelection: setGeneSelectionAndColorEncoding, setGeneFilter: setGeneFilter, setGeneHighlight: setGeneHighlight, enableMultiSelect: enableMultiSelect, hasFeatureLabels: Boolean(featureLabelsMap), primaryColumnName: primaryColumnName }) }));
65
65
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitessce/feature-list",
3
- "version": "3.3.1",
3
+ "version": "3.3.3",
4
4
  "author": "Gehlenborg Lab",
5
5
  "homepage": "http://vitessce.io",
6
6
  "repository": {
@@ -22,9 +22,9 @@
22
22
  "react-virtualized": "^9.22.2",
23
23
  "uuid": "^9.0.0",
24
24
  "react-aria": "^3.28.0",
25
- "@vitessce/constants-internal": "3.3.1",
26
- "@vitessce/utils": "3.3.1",
27
- "@vitessce/vit-s": "3.3.1"
25
+ "@vitessce/constants-internal": "3.3.3",
26
+ "@vitessce/utils": "3.3.3",
27
+ "@vitessce/vit-s": "3.3.3"
28
28
  },
29
29
  "devDependencies": {
30
30
  "@testing-library/jest-dom": "^5.16.4",
@@ -43,6 +43,8 @@ export function FeatureListSubscriber(props) {
43
43
  showTable = false,
44
44
  sort = 'alphabetical',
45
45
  sortKey = null,
46
+ closeButtonVisible,
47
+ downloadButtonVisible,
46
48
  } = props;
47
49
 
48
50
  const loaders = useLoaders();
@@ -108,6 +110,8 @@ export function FeatureListSubscriber(props) {
108
110
  // even though this no longer uses the TitleInfo component's
109
111
  // scroll css (SelectableTable is virtual scroll).
110
112
  isScroll
113
+ closeButtonVisible={closeButtonVisible}
114
+ downloadButtonVisible={downloadButtonVisible}
111
115
  removeGridComponent={removeGridComponent}
112
116
  isReady={isReady}
113
117
  urls={urls}