@vitessce/vit-s 3.3.5 → 3.3.7

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
@@ -27788,11 +27788,14 @@ const DataType$1 = {
27788
27788
  GENOMIC_PROFILES: "genomic-profiles",
27789
27789
  OBS_SPOTS: "obsSpots",
27790
27790
  OBS_POINTS: "obsPoints",
27791
- OBS_LOCATIONS: "obsLocations"
27791
+ OBS_LOCATIONS: "obsLocations",
27792
+ SAMPLE_SETS: "sampleSets",
27793
+ SAMPLE_EDGES: "sampleEdges"
27792
27794
  };
27793
27795
  const FileType$1 = {
27794
27796
  // Joint file types
27795
27797
  ANNDATA_ZARR: "anndata.zarr",
27798
+ ANNDATA_ZARR_ZIP: "anndata.zarr.zip",
27796
27799
  SPATIALDATA_ZARR: "spatialdata.zarr",
27797
27800
  // Atomic file types
27798
27801
  OBS_EMBEDDING_CSV: "obsEmbedding.csv",
@@ -27805,6 +27808,7 @@ const FileType$1 = {
27805
27808
  OBS_SEGMENTATIONS_JSON: "obsSegmentations.json",
27806
27809
  OBS_SETS_CSV: "obsSets.csv",
27807
27810
  OBS_SETS_JSON: "obsSets.json",
27811
+ SAMPLE_SETS_CSV: "sampleSets.csv",
27808
27812
  // OME-Zarr
27809
27813
  IMAGE_OME_ZARR: "image.ome-zarr",
27810
27814
  OBS_SEGMENTATIONS_OME_ZARR: "obsSegmentations.ome-zarr",
@@ -27819,6 +27823,19 @@ const FileType$1 = {
27819
27823
  OBS_SEGMENTATIONS_ANNDATA_ZARR: "obsSegmentations.anndata.zarr",
27820
27824
  OBS_LABELS_ANNDATA_ZARR: "obsLabels.anndata.zarr",
27821
27825
  FEATURE_LABELS_ANNDATA_ZARR: "featureLabels.anndata.zarr",
27826
+ SAMPLE_EDGES_ANNDATA_ZARR: "sampleEdges.anndata.zarr",
27827
+ // AnnData - zipped
27828
+ OBS_FEATURE_MATRIX_ANNDATA_ZARR_ZIP: "obsFeatureMatrix.anndata.zarr.zip",
27829
+ OBS_FEATURE_COLUMNS_ANNDATA_ZARR_ZIP: "obsFeatureColumns.anndata.zarr.zip",
27830
+ OBS_SETS_ANNDATA_ZARR_ZIP: "obsSets.anndata.zarr.zip",
27831
+ OBS_EMBEDDING_ANNDATA_ZARR_ZIP: "obsEmbedding.anndata.zarr.zip",
27832
+ OBS_SPOTS_ANNDATA_ZARR_ZIP: "obsSpots.anndata.zarr.zip",
27833
+ OBS_POINTS_ANNDATA_ZARR_ZIP: "obsPoints.anndata.zarr.zip",
27834
+ OBS_LOCATIONS_ANNDATA_ZARR_ZIP: "obsLocations.anndata.zarr.zip",
27835
+ OBS_SEGMENTATIONS_ANNDATA_ZARR_ZIP: "obsSegmentations.anndata.zarr.zip",
27836
+ OBS_LABELS_ANNDATA_ZARR_ZIP: "obsLabels.anndata.zarr.zip",
27837
+ FEATURE_LABELS_ANNDATA_ZARR_ZIP: "featureLabels.anndata.zarr.zip",
27838
+ SAMPLE_EDGES_ANNDATA_ZARR_ZIP: "sampleEdges.anndata.zarr.zip",
27822
27839
  // SpatialData
27823
27840
  IMAGE_SPATIALDATA_ZARR: "image.spatialdata.zarr",
27824
27841
  LABELS_SPATIALDATA_ZARR: "labels.spatialdata.zarr",
@@ -27826,6 +27843,7 @@ const FileType$1 = {
27826
27843
  OBS_FEATURE_MATRIX_SPATIALDATA_ZARR: "obsFeatureMatrix.spatialdata.zarr",
27827
27844
  OBS_SETS_SPATIALDATA_ZARR: "obsSets.spatialdata.zarr",
27828
27845
  OBS_SPOTS_SPATIALDATA_ZARR: "obsSpots.spatialdata.zarr",
27846
+ FEATURE_LABELS_SPATIALDATA_ZARR: "featureLabels.spatialdata.zarr",
27829
27847
  // TODO:
27830
27848
  // OBS_POINTS_SPATIALDATA_ZARR: 'obsPoints.spatialdata.zarr',
27831
27849
  // OBS_LOCATIONS_SPATIALDATA_ZARR: 'obsLocations.spatialdata.zarr',
@@ -27982,7 +28000,10 @@ const CoordinationType$1 = {
27982
28000
  LEGEND_VISIBLE: "legendVisible",
27983
28001
  SPATIAL_CHANNEL_LABELS_VISIBLE: "spatialChannelLabelsVisible",
27984
28002
  SPATIAL_CHANNEL_LABELS_ORIENTATION: "spatialChannelLabelsOrientation",
27985
- SPATIAL_CHANNEL_LABEL_SIZE: "spatialChannelLabelSize"
28003
+ SPATIAL_CHANNEL_LABEL_SIZE: "spatialChannelLabelSize",
28004
+ // Multi-sample / comparative
28005
+ SAMPLE_TYPE: "sampleType",
28006
+ SAMPLE_SET_SELECTION: "sampleSetSelection"
27986
28007
  };
27987
28008
  const STATUS = {
27988
28009
  LOADING: "loading",
@@ -28026,7 +28047,14 @@ const DATA_TYPE_COORDINATION_VALUE_USAGE = {
28026
28047
  [DataType$1.IMAGE]: [
28027
28048
  CoordinationType$1.FILE_UID
28028
28049
  ],
28029
- [DataType$1.NEIGHBORHOODS]: []
28050
+ [DataType$1.NEIGHBORHOODS]: [],
28051
+ [DataType$1.SAMPLE_SETS]: [
28052
+ CoordinationType$1.SAMPLE_TYPE
28053
+ ],
28054
+ [DataType$1.SAMPLE_EDGES]: [
28055
+ CoordinationType$1.OBS_TYPE,
28056
+ CoordinationType$1.SAMPLE_TYPE
28057
+ ]
28030
28058
  };
28031
28059
  const AUTO_INDEPENDENT_COORDINATION_TYPES = [
28032
28060
  CoordinationType$1.HEATMAP_ZOOM_X,
@@ -28044,10 +28072,10 @@ const AUTO_INDEPENDENT_COORDINATION_TYPES = [
28044
28072
  CoordinationType$1.EMBEDDING_OBS_OPACITY
28045
28073
  ];
28046
28074
  const note = "This file is autogenerated by .changeset/post-changelog.mjs.";
28047
- const version = "3.3.5";
28048
- const date = "2024-02-21";
28075
+ const version = "3.3.7";
28076
+ const date = "2024-03-04";
28049
28077
  const branch = "changeset-release/main";
28050
- const hash = "effc2322";
28078
+ const hash = "c82b4395";
28051
28079
  const META_VERSION = {
28052
28080
  note,
28053
28081
  version,
@@ -28481,6 +28509,17 @@ z.object({
28481
28509
  scoreColumn: z.string().optional()
28482
28510
  }))
28483
28511
  });
28512
+ z.object({
28513
+ sampleIndex: z.string(),
28514
+ sampleSets: z.array(z.object({
28515
+ name: z.string(),
28516
+ column: z.union([
28517
+ z.string(),
28518
+ z.array(z.string())
28519
+ ]),
28520
+ scoreColumn: z.string().optional()
28521
+ }))
28522
+ });
28484
28523
  z.object({
28485
28524
  obsLabels: z.union([
28486
28525
  annDataObsLabels,
@@ -36754,6 +36793,7 @@ function createLoaders(datasets, configDescription, fileTypes, coordinationTypes
36754
36793
  if (!dataSources.has(dataSourceKey)) {
36755
36794
  dataSources.set(dataSourceKey, new DataSourceClass({
36756
36795
  url,
36796
+ fileType,
36757
36797
  requestInit: requestInit2,
36758
36798
  // Optionally, pass a Zarrita store to the data source,
36759
36799
  // if one was mapped to this URL.
@@ -37729,6 +37769,7 @@ function VitS(props) {
37729
37769
  validateOnConfigChange = false,
37730
37770
  isBounded = false,
37731
37771
  uid = null,
37772
+ remountOnUidChange = true,
37732
37773
  viewTypes: viewTypesProp,
37733
37774
  fileTypes: fileTypesProp,
37734
37775
  jointFileTypes: jointFileTypesProp,
@@ -37833,34 +37874,41 @@ function VitS(props) {
37833
37874
  }
37834
37875
  return createViewConfigStore(null, null);
37835
37876
  }, [success, configKey]);
37836
- return success ? /* @__PURE__ */ jsxRuntimeExports.jsx(StylesProvider, { generateClassName: generateClassName2, children: /* @__PURE__ */ jsxRuntimeExports.jsx(ThemeProvider, { theme: muiTheme[theme], children: /* @__PURE__ */ jsxRuntimeExports.jsx(QueryClientProvider, { client: queryClient, children: /* @__PURE__ */ jsxRuntimeExports.jsx(ViewConfigProvider, { createStore: createViewConfigStoreClosure, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(AuxiliaryProvider, { createStore: createAuxiliaryStore, children: [
37837
- /* @__PURE__ */ jsxRuntimeExports.jsx(
37838
- VitessceGrid,
37839
- {
37840
- success,
37841
- configKey,
37842
- viewTypes,
37843
- fileTypes,
37844
- coordinationTypes,
37845
- config: configOrWarning,
37846
- rowHeight,
37847
- height: height2,
37848
- theme,
37849
- isBounded,
37850
- stores
37851
- }
37852
- ),
37853
- /* @__PURE__ */ jsxRuntimeExports.jsx(
37854
- CallbackPublisher,
37855
- {
37856
- onWarn,
37857
- onConfigChange,
37858
- onLoaderChange,
37859
- validateOnConfigChange,
37860
- pluginSpecificConfigSchema
37861
- }
37862
- )
37863
- ] }) }, configKey) }) }) }) : /* @__PURE__ */ jsxRuntimeExports.jsx(StylesProvider, { generateClassName: generateClassName2, children: /* @__PURE__ */ jsxRuntimeExports.jsx(ThemeProvider, { theme: muiTheme[theme], children: /* @__PURE__ */ jsxRuntimeExports.jsx(Warning, { ...configOrWarning }) }) });
37877
+ return success ? /* @__PURE__ */ jsxRuntimeExports.jsx(StylesProvider, { generateClassName: generateClassName2, children: /* @__PURE__ */ jsxRuntimeExports.jsx(ThemeProvider, { theme: muiTheme[theme], children: /* @__PURE__ */ jsxRuntimeExports.jsx(QueryClientProvider, { client: queryClient, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
37878
+ ViewConfigProvider,
37879
+ {
37880
+ createStore: createViewConfigStoreClosure,
37881
+ ...remountOnUidChange ? { key: configKey } : {},
37882
+ children: /* @__PURE__ */ jsxRuntimeExports.jsxs(AuxiliaryProvider, { createStore: createAuxiliaryStore, children: [
37883
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
37884
+ VitessceGrid,
37885
+ {
37886
+ success,
37887
+ configKey,
37888
+ viewTypes,
37889
+ fileTypes,
37890
+ coordinationTypes,
37891
+ config: configOrWarning,
37892
+ rowHeight,
37893
+ height: height2,
37894
+ theme,
37895
+ isBounded,
37896
+ stores
37897
+ }
37898
+ ),
37899
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
37900
+ CallbackPublisher,
37901
+ {
37902
+ onWarn,
37903
+ onConfigChange,
37904
+ onLoaderChange,
37905
+ validateOnConfigChange,
37906
+ pluginSpecificConfigSchema
37907
+ }
37908
+ )
37909
+ ] })
37910
+ }
37911
+ ) }) }) }) : /* @__PURE__ */ jsxRuntimeExports.jsx(StylesProvider, { generateClassName: generateClassName2, children: /* @__PURE__ */ jsxRuntimeExports.jsx(ThemeProvider, { theme: muiTheme[theme], children: /* @__PURE__ */ jsxRuntimeExports.jsx(Warning, { ...configOrWarning }) }) });
37864
37912
  }
37865
37913
  const ArrowDropDownIcon = createSvgIcon(/* @__PURE__ */ React$6.createElement("path", {
37866
37914
  d: "M7 10l5 5 5-5z"
@@ -38458,6 +38506,28 @@ function useObsSetsData(loaders, dataset, isRequired, coordinationSetters, initi
38458
38506
  matchOn
38459
38507
  );
38460
38508
  }
38509
+ function useSampleSetsData(loaders, dataset, isRequired, coordinationSetters, initialCoordinationValues, matchOn) {
38510
+ return useDataType(
38511
+ DataType$1.SAMPLE_SETS,
38512
+ loaders,
38513
+ dataset,
38514
+ isRequired,
38515
+ coordinationSetters,
38516
+ initialCoordinationValues,
38517
+ matchOn
38518
+ );
38519
+ }
38520
+ function useSampleEdgesData(loaders, dataset, isRequired, coordinationSetters, initialCoordinationValues, matchOn) {
38521
+ return useDataType(
38522
+ DataType$1.SAMPLE_EDGES,
38523
+ loaders,
38524
+ dataset,
38525
+ isRequired,
38526
+ coordinationSetters,
38527
+ initialCoordinationValues,
38528
+ matchOn
38529
+ );
38530
+ }
38461
38531
  function useObsFeatureMatrixData(loaders, dataset, isRequired, coordinationSetters, initialCoordinationValues, matchOn) {
38462
38532
  return useDataType(
38463
38533
  DataType$1.OBS_FEATURE_MATRIX,
@@ -38733,6 +38803,33 @@ function useSpotMultiObsSets(coordinationScopes, coordinationScopesBy, loaders,
38733
38803
  );
38734
38804
  return [obsSetsData, obsSetsDataStatus, obsSetsUrls];
38735
38805
  }
38806
+ function useSpotMultiFeatureLabels(coordinationScopes, coordinationScopesBy, loaders, dataset) {
38807
+ const featureTypeCoordination = useComplexCoordination(
38808
+ [
38809
+ CoordinationType$1.FEATURE_TYPE
38810
+ ],
38811
+ coordinationScopes,
38812
+ coordinationScopesBy,
38813
+ CoordinationType$1.SPOT_LAYER
38814
+ );
38815
+ const matchOnObj = useMemo(
38816
+ () => featureTypeCoordination[0],
38817
+ // imageCoordination reference changes each render,
38818
+ // use coordinationScopes and coordinationScopesBy which are
38819
+ // indirect dependencies here.
38820
+ [coordinationScopes, coordinationScopesBy]
38821
+ );
38822
+ const [featureLabelsData, featureLabelsStatus, featureLabelsUrls] = useDataTypeMulti(
38823
+ DataType$1.FEATURE_LABELS,
38824
+ loaders,
38825
+ dataset,
38826
+ false,
38827
+ {},
38828
+ {},
38829
+ matchOnObj
38830
+ );
38831
+ return [featureLabelsData, featureLabelsStatus, featureLabelsUrls];
38832
+ }
38736
38833
  function useMultiObsLabels(coordinationScopes, obsType, loaders, dataset) {
38737
38834
  const obsLabelsTypes = useMultiCoordinationValues(
38738
38835
  CoordinationType$1.OBS_LABELS_TYPE,
@@ -39810,6 +39907,8 @@ export {
39810
39907
  usePointMultiObsLabels,
39811
39908
  useReady,
39812
39909
  useRemoveImageChannelInMetaCoordinationScopes,
39910
+ useSampleEdgesData,
39911
+ useSampleSetsData,
39813
39912
  useSegmentationMultiFeatureSelection,
39814
39913
  useSegmentationMultiObsFeatureMatrixIndices,
39815
39914
  useSegmentationMultiObsLocations,
@@ -39817,6 +39916,7 @@ export {
39817
39916
  useSetComponentHover,
39818
39917
  useSetComponentViewInfo,
39819
39918
  useSetWarning,
39919
+ useSpotMultiFeatureLabels,
39820
39920
  useSpotMultiFeatureSelection,
39821
39921
  useSpotMultiObsFeatureMatrixIndices,
39822
39922
  useSpotMultiObsSets,
@@ -23,6 +23,8 @@
23
23
  * @param {null|string} props.uid A unique identifier for this Vitessce instance,
24
24
  * for the purpose of avoiding CSS autogenerated class name conflicts. Must be valid as part
25
25
  * of a CSS class name string.
26
+ * @param {boolean} props.remountOnUidChange Whether to remount the coordination provider
27
+ * upon changes to config.uid. By default, true.
26
28
  * @param {array} props.viewTypes Plugin view types.
27
29
  * @param {array} props.fileTypes Plugin file types.
28
30
  * @param {array} props.jointFileTypes Plugin joint file types.
@@ -41,6 +43,7 @@ export function VitS(props: {
41
43
  validateConfig: boolean;
42
44
  validateOnConfigChange: boolean;
43
45
  uid: null | string;
46
+ remountOnUidChange: boolean;
44
47
  viewTypes: array;
45
48
  fileTypes: array;
46
49
  jointFileTypes: array;
@@ -1 +1 @@
1
- {"version":3,"file":"VitS.d.ts","sourceRoot":"","sources":["../src/VitS.js"],"names":[],"mappings":"AA8BA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH;IA7ByB,MAAM,EAApB,MAAM;IAGkB,SAAS,EAAjC,SAAS,GAAC,MAAM;IACF,MAAM,EAApB,MAAM;IACQ,KAAK,EAAnB,MAAM;IAEU,MAAM;IACN,cAAc;IAEd,cAAc;IAEf,cAAc,EAA7B,OAAO;IAIQ,sBAAsB,EAArC,OAAO;IAGY,GAAG,EAAtB,IAAI,GAAC,MAAM;IAGE,SAAS;IACT,SAAS;IACT,cAAc;IACd,iBAAiB;IACX,OAAO,EAA1B,IAAI,GAAC,MAAM;gBA4LrB"}
1
+ {"version":3,"file":"VitS.d.ts","sourceRoot":"","sources":["../src/VitS.js"],"names":[],"mappings":"AA8BA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH;IA/ByB,MAAM,EAApB,MAAM;IAGkB,SAAS,EAAjC,SAAS,GAAC,MAAM;IACF,MAAM,EAApB,MAAM;IACQ,KAAK,EAAnB,MAAM;IAEU,MAAM;IACN,cAAc;IAEd,cAAc;IAEf,cAAc,EAA7B,OAAO;IAIQ,sBAAsB,EAArC,OAAO;IAGY,GAAG,EAAtB,IAAI,GAAC,MAAM;IAGI,kBAAkB,EAAjC,OAAO;IAEM,SAAS;IACT,SAAS;IACT,cAAc;IACd,iBAAiB;IACX,OAAO,EAA1B,IAAI,GAAC,MAAM;gBAgMrB"}
package/dist-tsc/VitS.js CHANGED
@@ -37,6 +37,8 @@ import { createGenerateClassName } from './mui-utils.js';
37
37
  * @param {null|string} props.uid A unique identifier for this Vitessce instance,
38
38
  * for the purpose of avoiding CSS autogenerated class name conflicts. Must be valid as part
39
39
  * of a CSS class name string.
40
+ * @param {boolean} props.remountOnUidChange Whether to remount the coordination provider
41
+ * upon changes to config.uid. By default, true.
40
42
  * @param {array} props.viewTypes Plugin view types.
41
43
  * @param {array} props.fileTypes Plugin file types.
42
44
  * @param {array} props.jointFileTypes Plugin joint file types.
@@ -45,7 +47,7 @@ import { createGenerateClassName } from './mui-utils.js';
45
47
  * provided by the parent.
46
48
  */
47
49
  export function VitS(props) {
48
- const { config, stores, rowHeight, height, theme, onWarn, onConfigChange, onLoaderChange, validateConfig = true, validateOnConfigChange = false, isBounded = false, uid = null, viewTypes: viewTypesProp, fileTypes: fileTypesProp, jointFileTypes: jointFileTypesProp, coordinationTypes: coordinationTypesProp, warning, } = props;
50
+ const { config, stores, rowHeight, height, theme, onWarn, onConfigChange, onLoaderChange, validateConfig = true, validateOnConfigChange = false, isBounded = false, uid = null, remountOnUidChange = true, viewTypes: viewTypesProp, fileTypes: fileTypesProp, jointFileTypes: jointFileTypesProp, coordinationTypes: coordinationTypesProp, warning, } = props;
49
51
  const viewTypes = useMemo(() => (viewTypesProp || []), [viewTypesProp]);
50
52
  const fileTypes = useMemo(() => (fileTypesProp || []), [fileTypesProp]);
51
53
  const jointFileTypes = useMemo(() => (jointFileTypesProp || []), [jointFileTypesProp]);
@@ -142,5 +144,5 @@ export function VitS(props) {
142
144
  return createViewConfigStore(null, null);
143
145
  // eslint-disable-next-line react-hooks/exhaustive-deps
144
146
  }, [success, configKey]);
145
- return success ? (_jsx(StylesProvider, { generateClassName: generateClassName, children: _jsx(ThemeProvider, { theme: muiTheme[theme], children: _jsx(QueryClientProvider, { client: queryClient, children: _jsx(ViewConfigProvider, { createStore: createViewConfigStoreClosure, children: _jsxs(AuxiliaryProvider, { createStore: createAuxiliaryStore, children: [_jsx(VitessceGrid, { success: success, configKey: configKey, viewTypes: viewTypes, fileTypes: fileTypes, coordinationTypes: coordinationTypes, config: configOrWarning, rowHeight: rowHeight, height: height, theme: theme, isBounded: isBounded, stores: stores }), _jsx(CallbackPublisher, { onWarn: onWarn, onConfigChange: onConfigChange, onLoaderChange: onLoaderChange, validateOnConfigChange: validateOnConfigChange, pluginSpecificConfigSchema: pluginSpecificConfigSchema })] }) }, configKey) }) }) })) : (_jsx(StylesProvider, { generateClassName: generateClassName, children: _jsx(ThemeProvider, { theme: muiTheme[theme], children: _jsx(Warning, { ...configOrWarning }) }) }));
147
+ return success ? (_jsx(StylesProvider, { generateClassName: generateClassName, children: _jsx(ThemeProvider, { theme: muiTheme[theme], children: _jsx(QueryClientProvider, { client: queryClient, children: _jsx(ViewConfigProvider, { createStore: createViewConfigStoreClosure, ...(remountOnUidChange ? ({ key: configKey }) : {}), children: _jsxs(AuxiliaryProvider, { createStore: createAuxiliaryStore, children: [_jsx(VitessceGrid, { success: success, configKey: configKey, viewTypes: viewTypes, fileTypes: fileTypes, coordinationTypes: coordinationTypes, config: configOrWarning, rowHeight: rowHeight, height: height, theme: theme, isBounded: isBounded, stores: stores }), _jsx(CallbackPublisher, { onWarn: onWarn, onConfigChange: onConfigChange, onLoaderChange: onLoaderChange, validateOnConfigChange: validateOnConfigChange, pluginSpecificConfigSchema: pluginSpecificConfigSchema })] }) }) }) }) })) : (_jsx(StylesProvider, { generateClassName: generateClassName, children: _jsx(ThemeProvider, { theme: muiTheme[theme], children: _jsx(Warning, { ...configOrWarning }) }) }));
146
148
  }
@@ -36,6 +36,8 @@ export function useObsLocationsData(loaders: any, dataset: any, isRequired: any,
36
36
  export function useObsLabelsData(loaders: any, dataset: any, isRequired: any, coordinationSetters: any, initialCoordinationValues: any, matchOn: any): array;
37
37
  export function useObsSegmentationsData(loaders: any, dataset: any, isRequired: any, coordinationSetters: any, initialCoordinationValues: any, matchOn: any): array;
38
38
  export function useObsSetsData(loaders: any, dataset: any, isRequired: any, coordinationSetters: any, initialCoordinationValues: any, matchOn: any): array;
39
+ export function useSampleSetsData(loaders: any, dataset: any, isRequired: any, coordinationSetters: any, initialCoordinationValues: any, matchOn: any): array;
40
+ export function useSampleEdgesData(loaders: any, dataset: any, isRequired: any, coordinationSetters: any, initialCoordinationValues: any, matchOn: any): array;
39
41
  export function useObsFeatureMatrixData(loaders: any, dataset: any, isRequired: any, coordinationSetters: any, initialCoordinationValues: any, matchOn: any): array;
40
42
  export function useFeatureLabelsData(loaders: any, dataset: any, isRequired: any, coordinationSetters: any, initialCoordinationValues: any, matchOn: any): array;
41
43
  export function useImageData(loaders: any, dataset: any, isRequired: any, coordinationSetters: any, initialCoordinationValues: any, matchOn: any): array;
@@ -74,6 +76,7 @@ export function useObsFeatureMatrixIndices(loaders: object, dataset: string, isR
74
76
  export function useMultiObsPoints(coordinationScopes: any, coordinationScopesBy: any, loaders: any, dataset: any, mergeCoordination: any, viewUid: any): any[];
75
77
  export function useMultiObsSpots(coordinationScopes: any, coordinationScopesBy: any, loaders: any, dataset: any, mergeCoordination: any, viewUid: any): any[];
76
78
  export function useSpotMultiObsSets(coordinationScopes: any, coordinationScopesBy: any, loaders: any, dataset: any): any[];
79
+ export function useSpotMultiFeatureLabels(coordinationScopes: any, coordinationScopesBy: any, loaders: any, dataset: any): any[];
77
80
  export function useMultiObsLabels(coordinationScopes: any, obsType: any, loaders: any, dataset: any): any[];
78
81
  export function useMultiObsSegmentations(coordinationScopes: any, coordinationScopesBy: any, loaders: any, dataset: any, mergeCoordination: any, viewUid: any): any[];
79
82
  export function useMultiImages(coordinationScopes: any, coordinationScopesBy: any, loaders: any, dataset: any, mergeCoordination: any, viewUid: any): any[];
@@ -1 +1 @@
1
- {"version":3,"file":"data-hooks.d.ts","sourceRoot":"","sources":["../src/data-hooks.js"],"names":[],"mappings":"AAkBA;;;;;;;;GAQG;AACH,wCAPW,MAAM,WAEN,MAAM,SAsBhB;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,6CAhBW,MAAM,WAEN,MAAM,cAEN,OAAO,uBAEP,MAAM,6BAGN,MAAM,uBAgBhB;AAED,4JASC;AAED,6JASC;AAED,gKASC;AAED,6JASC;AAED,oKASC;AAED,2JASC;AAED,oKASC;AAED,iKASC;AAED,yJASC;AAED,mKASC;AAED,iKASC;AAED;;;;;;;;;;;;;GAaG;AACH,6CAVW,MAAM,WAEN,MAAM,cAEN,OAAO,aAEP,OAAO,uBA4EjB;AAED;;;;;;;;;;;;;GAaG;AACH,oDARW,MAAM,WAEN,MAAM,cAEN,OAAO,iBAEL,MAAM,CA2ElB;AAED,+JAuBC;AAED,8JAuBC;AAED,2HAsBC;AAED,4GAmBC;AAED,sKA2BC;AAED,4JAyBC"}
1
+ {"version":3,"file":"data-hooks.d.ts","sourceRoot":"","sources":["../src/data-hooks.js"],"names":[],"mappings":"AAkBA;;;;;;;;GAQG;AACH,wCAPW,MAAM,WAEN,MAAM,SAsBhB;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,6CAhBW,MAAM,WAEN,MAAM,cAEN,OAAO,uBAEP,MAAM,6BAGN,MAAM,uBAgBhB;AAED,4JASC;AAED,6JASC;AAED,gKASC;AAED,6JASC;AAED,oKASC;AAED,2JASC;AAED,8JASC;AAED,+JASC;AAED,oKASC;AAED,iKASC;AAED,yJASC;AAED,mKASC;AAED,iKASC;AAED;;;;;;;;;;;;;GAaG;AACH,6CAVW,MAAM,WAEN,MAAM,cAEN,OAAO,aAEP,OAAO,uBA4EjB;AAED;;;;;;;;;;;;;GAaG;AACH,oDARW,MAAM,WAEN,MAAM,cAEN,OAAO,iBAEL,MAAM,CA2ElB;AAED,+JAuBC;AAED,8JAuBC;AAED,2HAsBC;AAGD,iIAsBC;AAGD,4GAmBC;AAED,sKA2BC;AAED,4JAyBC"}
@@ -71,6 +71,12 @@ export function useObsSegmentationsData(loaders, dataset, isRequired, coordinati
71
71
  export function useObsSetsData(loaders, dataset, isRequired, coordinationSetters, initialCoordinationValues, matchOn) {
72
72
  return useDataType(DataType.OBS_SETS, loaders, dataset, isRequired, coordinationSetters, initialCoordinationValues, matchOn);
73
73
  }
74
+ export function useSampleSetsData(loaders, dataset, isRequired, coordinationSetters, initialCoordinationValues, matchOn) {
75
+ return useDataType(DataType.SAMPLE_SETS, loaders, dataset, isRequired, coordinationSetters, initialCoordinationValues, matchOn);
76
+ }
77
+ export function useSampleEdgesData(loaders, dataset, isRequired, coordinationSetters, initialCoordinationValues, matchOn) {
78
+ return useDataType(DataType.SAMPLE_EDGES, loaders, dataset, isRequired, coordinationSetters, initialCoordinationValues, matchOn);
79
+ }
74
80
  export function useObsFeatureMatrixData(loaders, dataset, isRequired, coordinationSetters, initialCoordinationValues, matchOn) {
75
81
  return useDataType(DataType.OBS_FEATURE_MATRIX, loaders, dataset, isRequired, coordinationSetters, initialCoordinationValues, matchOn);
76
82
  }
@@ -285,6 +291,18 @@ export function useSpotMultiObsSets(coordinationScopes, coordinationScopesBy, lo
285
291
  const [obsSetsData, obsSetsDataStatus, obsSetsUrls] = useDataTypeMulti(DataType.OBS_SETS, loaders, dataset, false, {}, {}, matchOnObj);
286
292
  return [obsSetsData, obsSetsDataStatus, obsSetsUrls];
287
293
  }
294
+ export function useSpotMultiFeatureLabels(coordinationScopes, coordinationScopesBy, loaders, dataset) {
295
+ const featureTypeCoordination = useComplexCoordination([
296
+ CoordinationType.FEATURE_TYPE,
297
+ ], coordinationScopes, coordinationScopesBy, CoordinationType.SPOT_LAYER);
298
+ const matchOnObj = useMemo(() => featureTypeCoordination[0],
299
+ // imageCoordination reference changes each render,
300
+ // use coordinationScopes and coordinationScopesBy which are
301
+ // indirect dependencies here.
302
+ [coordinationScopes, coordinationScopesBy]);
303
+ const [featureLabelsData, featureLabelsStatus, featureLabelsUrls] = useDataTypeMulti(DataType.FEATURE_LABELS, loaders, dataset, false, {}, {}, matchOnObj);
304
+ return [featureLabelsData, featureLabelsStatus, featureLabelsUrls];
305
+ }
288
306
  export function useMultiObsLabels(coordinationScopes, obsType, loaders, dataset) {
289
307
  const obsLabelsTypes = useMultiCoordinationValues(CoordinationType.OBS_LABELS_TYPE, coordinationScopes);
290
308
  const obsLabelsMatchOnObj = useMemo(() => Object.fromEntries(Object.entries(obsLabelsTypes).map(([scope, obsLabelsType]) => ([
@@ -5,7 +5,7 @@ export { useHasLoader } from "./data-hook-utils.js";
5
5
  export { logConfig } from "./view-config-utils.js";
6
6
  export { useReady, useUrls, useVitessceContainer, useDeckCanvasSize, useUint8ObsFeatureMatrix, useUint8FeatureSelection, useExpressionValueGetter, useGetObsMembership, useGetObsInfo, useClosestVitessceContainerSize, useWindowDimensions, useGridItemSize } from "./hooks.js";
7
7
  export { useCoordinationScopes, useCoordinationScopesBy, useInitialCoordination, useCoordination, useComplexCoordination, useComplexCoordinationSecondary, useMultiCoordinationScopes, useMultiCoordinationScopesNonNull, useMultiCoordinationScopesSecondary, useMultiCoordinationScopesSecondaryNonNull, useMultiCoordinationValues, useMultiDatasetCoordination, useDatasetUids, useLoaders, useMergeCoordination, useMatchingLoader, useViewConfigStore, useViewConfigStoreApi, useComponentHover, useSetComponentHover, useComponentViewInfo, useSetComponentViewInfo, useWarning, useSetWarning, useAuxiliaryCoordination, useComponentLayout, useRemoveImageChannelInMetaCoordinationScopes, useAddImageChannelInMetaCoordinationScopes } from "./state/hooks.js";
8
- export { useDescription, useImageData, useObsSetsData, useObsEmbeddingData, useFeatureSelection, useObsFeatureMatrixIndices, useMultiObsLabels, useMultiObsSpots, useMultiObsPoints, useSpotMultiObsSets, useMultiObsSegmentations, useMultiImages, useObsSpotsData, useObsPointsData, useObsLocationsData, useObsSegmentationsData, useNeighborhoodsData, useObsLabelsData, useObsFeatureMatrixData, useFeatureLabelsData, useGenomicProfilesData } from "./data-hooks.js";
8
+ export { useDescription, useImageData, useObsSetsData, useObsEmbeddingData, useFeatureSelection, useObsFeatureMatrixIndices, useSampleSetsData, useSampleEdgesData, useMultiObsLabels, useMultiObsSpots, useMultiObsPoints, useSpotMultiObsSets, useSpotMultiFeatureLabels, useMultiObsSegmentations, useMultiImages, useObsSpotsData, useObsPointsData, useObsLocationsData, useObsSegmentationsData, useNeighborhoodsData, useObsLabelsData, useObsFeatureMatrixData, useFeatureLabelsData, useGenomicProfilesData } from "./data-hooks.js";
9
9
  export { usePointMultiObsLabels, useSpotMultiFeatureSelection, useSpotMultiObsFeatureMatrixIndices, useSegmentationMultiFeatureSelection, useSegmentationMultiObsFeatureMatrixIndices, useSegmentationMultiObsLocations, useSegmentationMultiObsSets } from "./data-hooks-multilevel.js";
10
10
  export { AbstractLoader, AbstractTwoStepLoader, LoaderResult } from "./data/index.js";
11
11
  export { AbstractLoaderError, DatasetNotFoundError, LoaderNotFoundError, LoaderValidationError, DataSourceFetchError } from "./errors/index.js";
package/dist-tsc/index.js CHANGED
@@ -4,7 +4,7 @@ export { PopperMenu } from './shared-mui/components.js';
4
4
  // For plugin view types:
5
5
  export { useReady, useUrls, useVitessceContainer, useDeckCanvasSize, useUint8ObsFeatureMatrix, useUint8FeatureSelection, useExpressionValueGetter, useGetObsMembership, useGetObsInfo, useClosestVitessceContainerSize, useWindowDimensions, useGridItemSize, } from './hooks.js';
6
6
  export { useCoordinationScopes, useCoordinationScopesBy, useInitialCoordination, useCoordination, useComplexCoordination, useComplexCoordinationSecondary, useMultiCoordinationScopes, useMultiCoordinationScopesNonNull, useMultiCoordinationScopesSecondary, useMultiCoordinationScopesSecondaryNonNull, useMultiCoordinationValues, useMultiDatasetCoordination, useDatasetUids, useLoaders, useMergeCoordination, useMatchingLoader, useViewConfigStore, useViewConfigStoreApi, useComponentHover, useSetComponentHover, useComponentViewInfo, useSetComponentViewInfo, useWarning, useSetWarning, useAuxiliaryCoordination, useComponentLayout, useRemoveImageChannelInMetaCoordinationScopes, useAddImageChannelInMetaCoordinationScopes, } from './state/hooks.js';
7
- export { useDescription, useImageData, useObsSetsData, useObsEmbeddingData, useFeatureSelection, useObsFeatureMatrixIndices, useMultiObsLabels, useMultiObsSpots, useMultiObsPoints, useSpotMultiObsSets, useMultiObsSegmentations, useMultiImages, useObsSpotsData, useObsPointsData, useObsLocationsData, useObsSegmentationsData, useNeighborhoodsData, useObsLabelsData, useObsFeatureMatrixData, useFeatureLabelsData, useGenomicProfilesData, } from './data-hooks.js';
7
+ export { useDescription, useImageData, useObsSetsData, useObsEmbeddingData, useFeatureSelection, useObsFeatureMatrixIndices, useSampleSetsData, useSampleEdgesData, useMultiObsLabels, useMultiObsSpots, useMultiObsPoints, useSpotMultiObsSets, useSpotMultiFeatureLabels, useMultiObsSegmentations, useMultiImages, useObsSpotsData, useObsPointsData, useObsLocationsData, useObsSegmentationsData, useNeighborhoodsData, useObsLabelsData, useObsFeatureMatrixData, useFeatureLabelsData, useGenomicProfilesData, } from './data-hooks.js';
8
8
  export { usePointMultiObsLabels, useSpotMultiFeatureSelection, useSpotMultiObsFeatureMatrixIndices, useSegmentationMultiFeatureSelection, useSegmentationMultiObsFeatureMatrixIndices, useSegmentationMultiObsLocations, useSegmentationMultiObsSets, } from './data-hooks-multilevel.js';
9
9
  export { useHasLoader, } from './data-hook-utils.js';
10
10
  export { AbstractLoader, AbstractTwoStepLoader, LoaderResult, } from './data/index.js';
@@ -1 +1 @@
1
- {"version":3,"file":"vitessce-grid-utils.d.ts","sourceRoot":"","sources":["../src/vitessce-grid-utils.js"],"names":[],"mappings":"AAyCA,gHA6CC;AA4BD;;;;;;;;;;GAUG;AACH,wCATW,MAAM,EAAE,qBACR,MAAM,aAEN,gBAAgB,qBAChB,wBAAwB,UACxB,MAAM,GACJ,MAAM,CA4DlB"}
1
+ {"version":3,"file":"vitessce-grid-utils.d.ts","sourceRoot":"","sources":["../src/vitessce-grid-utils.js"],"names":[],"mappings":"AAyCA,gHA6CC;AA4BD;;;;;;;;;;GAUG;AACH,wCATW,MAAM,EAAE,qBACR,MAAM,aAEN,gBAAgB,qBAChB,wBAAwB,UACxB,MAAM,GACJ,MAAM,CA6DlB"}
@@ -130,6 +130,7 @@ export function createLoaders(datasets, configDescription, fileTypes, coordinati
130
130
  if (!dataSources.has(dataSourceKey)) {
131
131
  dataSources.set(dataSourceKey, new DataSourceClass({
132
132
  url,
133
+ fileType,
133
134
  requestInit,
134
135
  // Optionally, pass a Zarrita store to the data source,
135
136
  // if one was mapped to this URL.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitessce/vit-s",
3
- "version": "3.3.5",
3
+ "version": "3.3.7",
4
4
  "author": "Gehlenborg Lab",
5
5
  "homepage": "http://vitessce.io",
6
6
  "repository": {
@@ -29,11 +29,11 @@
29
29
  "uuid": "^9.0.0",
30
30
  "zustand": "^3.5.10",
31
31
  "react-aria": "^3.28.0",
32
- "@vitessce/plugins": "3.3.5",
33
- "@vitessce/schemas": "3.3.5",
34
- "@vitessce/constants-internal": "3.3.5",
35
- "@vitessce/utils": "3.3.5",
36
- "@vitessce/config": "3.3.5"
32
+ "@vitessce/constants-internal": "3.3.7",
33
+ "@vitessce/plugins": "3.3.7",
34
+ "@vitessce/schemas": "3.3.7",
35
+ "@vitessce/utils": "3.3.7",
36
+ "@vitessce/config": "3.3.7"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@testing-library/jest-dom": "^5.16.4",
package/src/VitS.js CHANGED
@@ -53,6 +53,8 @@ import { createGenerateClassName } from './mui-utils.js';
53
53
  * @param {null|string} props.uid A unique identifier for this Vitessce instance,
54
54
  * for the purpose of avoiding CSS autogenerated class name conflicts. Must be valid as part
55
55
  * of a CSS class name string.
56
+ * @param {boolean} props.remountOnUidChange Whether to remount the coordination provider
57
+ * upon changes to config.uid. By default, true.
56
58
  * @param {array} props.viewTypes Plugin view types.
57
59
  * @param {array} props.fileTypes Plugin file types.
58
60
  * @param {array} props.jointFileTypes Plugin joint file types.
@@ -74,6 +76,7 @@ export function VitS(props) {
74
76
  validateOnConfigChange = false,
75
77
  isBounded = false,
76
78
  uid = null,
79
+ remountOnUidChange = true,
77
80
  viewTypes: viewTypesProp,
78
81
  fileTypes: fileTypesProp,
79
82
  jointFileTypes: jointFileTypesProp,
@@ -211,7 +214,10 @@ export function VitS(props) {
211
214
  <StylesProvider generateClassName={generateClassName}>
212
215
  <ThemeProvider theme={muiTheme[theme]}>
213
216
  <QueryClientProvider client={queryClient}>
214
- <ViewConfigProvider key={configKey} createStore={createViewConfigStoreClosure}>
217
+ <ViewConfigProvider
218
+ createStore={createViewConfigStoreClosure}
219
+ {...(remountOnUidChange ? ({ key: configKey }) : {})}
220
+ >
215
221
  <AuxiliaryProvider createStore={createAuxiliaryStore}>
216
222
  <VitessceGrid
217
223
  success={success}
package/src/data-hooks.js CHANGED
@@ -142,6 +142,28 @@ export function useObsSetsData(
142
142
  );
143
143
  }
144
144
 
145
+ export function useSampleSetsData(
146
+ loaders, dataset, isRequired,
147
+ coordinationSetters, initialCoordinationValues, matchOn,
148
+ ) {
149
+ return useDataType(
150
+ DataType.SAMPLE_SETS,
151
+ loaders, dataset, isRequired,
152
+ coordinationSetters, initialCoordinationValues, matchOn,
153
+ );
154
+ }
155
+
156
+ export function useSampleEdgesData(
157
+ loaders, dataset, isRequired,
158
+ coordinationSetters, initialCoordinationValues, matchOn,
159
+ ) {
160
+ return useDataType(
161
+ DataType.SAMPLE_EDGES,
162
+ loaders, dataset, isRequired,
163
+ coordinationSetters, initialCoordinationValues, matchOn,
164
+ );
165
+ }
166
+
145
167
  export function useObsFeatureMatrixData(
146
168
  loaders, dataset, isRequired,
147
169
  coordinationSetters, initialCoordinationValues, matchOn,
@@ -448,6 +470,32 @@ export function useSpotMultiObsSets(
448
470
  return [obsSetsData, obsSetsDataStatus, obsSetsUrls];
449
471
  }
450
472
 
473
+
474
+ export function useSpotMultiFeatureLabels(
475
+ coordinationScopes, coordinationScopesBy, loaders, dataset,
476
+ ) {
477
+ const featureTypeCoordination = useComplexCoordination(
478
+ [
479
+ CoordinationType.FEATURE_TYPE,
480
+ ],
481
+ coordinationScopes,
482
+ coordinationScopesBy,
483
+ CoordinationType.SPOT_LAYER,
484
+ );
485
+ const matchOnObj = useMemo(() => featureTypeCoordination[0],
486
+ // imageCoordination reference changes each render,
487
+ // use coordinationScopes and coordinationScopesBy which are
488
+ // indirect dependencies here.
489
+ [coordinationScopes, coordinationScopesBy]);
490
+ const [featureLabelsData, featureLabelsStatus, featureLabelsUrls] = useDataTypeMulti(
491
+ DataType.FEATURE_LABELS, loaders, dataset,
492
+ false, {}, {},
493
+ matchOnObj,
494
+ );
495
+ return [featureLabelsData, featureLabelsStatus, featureLabelsUrls];
496
+ }
497
+
498
+
451
499
  export function useMultiObsLabels(
452
500
  coordinationScopes, obsType, loaders, dataset,
453
501
  ) {
package/src/index.js CHANGED
@@ -53,10 +53,13 @@ export {
53
53
  useObsEmbeddingData,
54
54
  useFeatureSelection,
55
55
  useObsFeatureMatrixIndices,
56
+ useSampleSetsData,
57
+ useSampleEdgesData,
56
58
  useMultiObsLabels,
57
59
  useMultiObsSpots,
58
60
  useMultiObsPoints,
59
61
  useSpotMultiObsSets,
62
+ useSpotMultiFeatureLabels,
60
63
  useMultiObsSegmentations,
61
64
  useMultiImages,
62
65
 
@@ -162,6 +162,7 @@ export function createLoaders(datasets, configDescription, fileTypes, coordinati
162
162
  if (!dataSources.has(dataSourceKey)) {
163
163
  dataSources.set(dataSourceKey, new DataSourceClass({
164
164
  url,
165
+ fileType,
165
166
  requestInit,
166
167
  // Optionally, pass a Zarrita store to the data source,
167
168
  // if one was mapped to this URL.