@vitessce/feature-list 3.1.3 → 3.2.1

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,5 +1,5 @@
1
1
  import * as React from "react";
2
- import React__default, { Children, isValidElement, cloneElement, useState, useEffect, useCallback, useMemo, useId } from "react";
2
+ import React__default, { Children, isValidElement, cloneElement, useState, useEffect, useCallback, useMemo, useContext, useRef } from "react";
3
3
  import { usePlotOptionsStyles, OptionsContainer, OptionSelect, useLoaders, useCoordination, useFeatureLabelsData, useObsFeatureMatrixIndices, useReady, useUrls, TitleInfo } from "@vitessce/vit-s";
4
4
  import * as ReactDOM from "react-dom";
5
5
  import ReactDOM__default from "react-dom";
@@ -10139,8 +10139,10 @@ const ViewType$1 = {
10139
10139
  STATUS: "status",
10140
10140
  SCATTERPLOT: "scatterplot",
10141
10141
  SPATIAL: "spatial",
10142
+ SPATIAL_BETA: "spatialBeta",
10142
10143
  HEATMAP: "heatmap",
10143
10144
  LAYER_CONTROLLER: "layerController",
10145
+ LAYER_CONTROLLER_BETA: "layerControllerBeta",
10144
10146
  GENOMIC_PROFILES: "genomicProfiles",
10145
10147
  GATING: "gating",
10146
10148
  FEATURE_LIST: "featureList",
@@ -10152,20 +10154,24 @@ const ViewType$1 = {
10152
10154
  const DataType$1 = {
10153
10155
  OBS_LABELS: "obsLabels",
10154
10156
  OBS_EMBEDDING: "obsEmbedding",
10155
- OBS_LOCATIONS: "obsLocations",
10156
10157
  OBS_FEATURE_MATRIX: "obsFeatureMatrix",
10157
10158
  OBS_SETS: "obsSets",
10158
10159
  FEATURE_LABELS: "featureLabels",
10159
10160
  IMAGE: "image",
10160
10161
  OBS_SEGMENTATIONS: "obsSegmentations",
10161
10162
  NEIGHBORHOODS: "neighborhoods",
10162
- GENOMIC_PROFILES: "genomic-profiles"
10163
+ GENOMIC_PROFILES: "genomic-profiles",
10164
+ OBS_SPOTS: "obsSpots",
10165
+ OBS_POINTS: "obsPoints",
10166
+ OBS_LOCATIONS: "obsLocations"
10163
10167
  };
10164
10168
  const FileType$1 = {
10165
10169
  // Joint file types
10166
10170
  ANNDATA_ZARR: "anndata.zarr",
10167
10171
  // Atomic file types
10168
10172
  OBS_EMBEDDING_CSV: "obsEmbedding.csv",
10173
+ OBS_SPOTS_CSV: "obsSpots.csv",
10174
+ OBS_POINTS_CSV: "obsPoints.csv",
10169
10175
  OBS_LOCATIONS_CSV: "obsLocations.csv",
10170
10176
  OBS_LABELS_CSV: "obsLabels.csv",
10171
10177
  FEATURE_LABELS_CSV: "featureLabels.csv",
@@ -10178,6 +10184,8 @@ const FileType$1 = {
10178
10184
  OBS_FEATURE_MATRIX_ANNDATA_ZARR: "obsFeatureMatrix.anndata.zarr",
10179
10185
  OBS_SETS_ANNDATA_ZARR: "obsSets.anndata.zarr",
10180
10186
  OBS_EMBEDDING_ANNDATA_ZARR: "obsEmbedding.anndata.zarr",
10187
+ OBS_SPOTS_ANNDATA_ZARR: "obsSpots.anndata.zarr",
10188
+ OBS_POINTS_ANNDATA_ZARR: "obsPoints.anndata.zarr",
10181
10189
  OBS_LOCATIONS_ANNDATA_ZARR: "obsLocations.anndata.zarr",
10182
10190
  OBS_SEGMENTATIONS_ANNDATA_ZARR: "obsSegmentations.anndata.zarr",
10183
10191
  OBS_LABELS_ANNDATA_ZARR: "obsLabels.anndata.zarr",
@@ -10186,6 +10194,8 @@ const FileType$1 = {
10186
10194
  OBS_FEATURE_MATRIX_MUDATA_ZARR: "obsFeatureMatrix.mudata.zarr",
10187
10195
  OBS_SETS_MUDATA_ZARR: "obsSets.mudata.zarr",
10188
10196
  OBS_EMBEDDING_MUDATA_ZARR: "obsEmbedding.mudata.zarr",
10197
+ OBS_SPOTS_MUDATA_ZARR: "obsSpots.mudata.zarr",
10198
+ OBS_POINTS_MUDATA_ZARR: "obsPoints.mudata.zarr",
10189
10199
  OBS_LOCATIONS_MUDATA_ZARR: "obsLocations.mudata.zarr",
10190
10200
  OBS_SEGMENTATIONS_MUDATA_ZARR: "obsSegmentations.mudata.zarr",
10191
10201
  OBS_LABELS_MUDATA_ZARR: "obsLabels.mudata.zarr",
@@ -10229,10 +10239,8 @@ const FileType$1 = {
10229
10239
  ANNDATA_EXPRESSION_MATRIX_ZARR: "anndata-expression-matrix.zarr"
10230
10240
  };
10231
10241
  const CoordinationType$1 = {
10232
- // Meta coordination scopes
10233
10242
  META_COORDINATION_SCOPES: "metaCoordinationScopes",
10234
10243
  META_COORDINATION_SCOPES_BY: "metaCoordinationScopesBy",
10235
- // Other coordination scopes
10236
10244
  DATASET: "dataset",
10237
10245
  // Entity types
10238
10246
  OBS_TYPE: "obsType",
@@ -10258,6 +10266,7 @@ const CoordinationType$1 = {
10258
10266
  SPATIAL_TARGET_X: "spatialTargetX",
10259
10267
  SPATIAL_TARGET_Y: "spatialTargetY",
10260
10268
  SPATIAL_TARGET_Z: "spatialTargetZ",
10269
+ SPATIAL_TARGET_T: "spatialTargetT",
10261
10270
  SPATIAL_ROTATION_X: "spatialRotationX",
10262
10271
  SPATIAL_ROTATION_Y: "spatialRotationY",
10263
10272
  SPATIAL_ROTATION_Z: "spatialRotationZ",
@@ -10295,7 +10304,46 @@ const CoordinationType$1 = {
10295
10304
  GATING_FEATURE_SELECTION_X: "gatingFeatureSelectionX",
10296
10305
  GATING_FEATURE_SELECTION_Y: "gatingFeatureSelectionY",
10297
10306
  FEATURE_VALUE_TRANSFORM_COEFFICIENT: "featureValueTransformCoefficient",
10298
- TOOLTIPS_VISIBLE: "tooltipsVisible"
10307
+ TOOLTIPS_VISIBLE: "tooltipsVisible",
10308
+ FILE_UID: "fileUid",
10309
+ IMAGE_LAYER: "imageLayer",
10310
+ IMAGE_CHANNEL: "imageChannel",
10311
+ SEGMENTATION_LAYER: "segmentationLayer",
10312
+ SEGMENTATION_CHANNEL: "segmentationChannel",
10313
+ SPATIAL_TARGET_C: "spatialTargetC",
10314
+ SPATIAL_LAYER_VISIBLE: "spatialLayerVisible",
10315
+ SPATIAL_LAYER_OPACITY: "spatialLayerOpacity",
10316
+ SPATIAL_LAYER_COLORMAP: "spatialLayerColormap",
10317
+ SPATIAL_LAYER_TRANSPARENT_COLOR: "spatialLayerTransparentColor",
10318
+ SPATIAL_LAYER_MODEL_MATRIX: "spatialLayerModelMatrix",
10319
+ SPATIAL_SEGMENTATION_FILLED: "spatialSegmentationFilled",
10320
+ SPATIAL_SEGMENTATION_STROKE_WIDTH: "spatialSegmentationStrokeWidth",
10321
+ SPATIAL_CHANNEL_COLOR: "spatialChannelColor",
10322
+ SPATIAL_CHANNEL_VISIBLE: "spatialChannelVisible",
10323
+ SPATIAL_CHANNEL_OPACITY: "spatialChannelOpacity",
10324
+ SPATIAL_CHANNEL_WINDOW: "spatialChannelWindow",
10325
+ PHOTOMETRIC_INTERPRETATION: "photometricInterpretation",
10326
+ // For 3D volume rendering
10327
+ SPATIAL_RENDERING_MODE: "spatialRenderingMode",
10328
+ VOLUMETRIC_RENDERING_ALGORITHM: "volumetricRenderingAlgorithm",
10329
+ SPATIAL_TARGET_RESOLUTION: "spatialTargetResolution",
10330
+ // For clipping plane sliders
10331
+ SPATIAL_SLICE_X: "spatialSliceX",
10332
+ SPATIAL_SLICE_Y: "spatialSliceY",
10333
+ SPATIAL_SLICE_Z: "spatialSliceZ",
10334
+ // For spatial spot and point layers
10335
+ SPOT_LAYER: "spotLayer",
10336
+ POINT_LAYER: "pointLayer",
10337
+ SPATIAL_SPOT_RADIUS: "spatialSpotRadius",
10338
+ SPATIAL_SPOT_FILLED: "spatialSpotFilled",
10339
+ SPATIAL_SPOT_STROKE_WIDTH: "spatialSpotStrokeWidth",
10340
+ SPATIAL_LAYER_COLOR: "spatialLayerColor",
10341
+ PIXEL_HIGHLIGHT: "pixelHighlight",
10342
+ TOOLTIP_CROSSHAIRS_VISIBLE: "tooltipCrosshairsVisible",
10343
+ LEGEND_VISIBLE: "legendVisible",
10344
+ SPATIAL_CHANNEL_LABELS_VISIBLE: "spatialChannelLabelsVisible",
10345
+ SPATIAL_CHANNEL_LABELS_ORIENTATION: "spatialChannelLabelsOrientation",
10346
+ SPATIAL_CHANNEL_LABEL_SIZE: "spatialChannelLabelSize"
10299
10347
  };
10300
10348
  const COMPONENT_COORDINATION_TYPES = {
10301
10349
  [ViewType$1.SCATTERPLOT]: [
@@ -10399,6 +10447,77 @@ const COMPONENT_COORDINATION_TYPES = {
10399
10447
  CoordinationType$1.MOLECULE_HIGHLIGHT,
10400
10448
  CoordinationType$1.TOOLTIPS_VISIBLE
10401
10449
  ],
10450
+ [ViewType$1.SPATIAL_BETA]: [
10451
+ CoordinationType$1.META_COORDINATION_SCOPES,
10452
+ CoordinationType$1.META_COORDINATION_SCOPES_BY,
10453
+ CoordinationType$1.DATASET,
10454
+ CoordinationType$1.OBS_TYPE,
10455
+ CoordinationType$1.OBS_LABELS_TYPE,
10456
+ CoordinationType$1.FEATURE_TYPE,
10457
+ CoordinationType$1.FEATURE_VALUE_TYPE,
10458
+ CoordinationType$1.SPATIAL_ZOOM,
10459
+ CoordinationType$1.SPATIAL_ROTATION,
10460
+ CoordinationType$1.SPATIAL_POINT_LAYER,
10461
+ CoordinationType$1.SPATIAL_NEIGHBORHOOD_LAYER,
10462
+ CoordinationType$1.SPATIAL_TARGET_X,
10463
+ CoordinationType$1.SPATIAL_TARGET_Y,
10464
+ CoordinationType$1.SPATIAL_TARGET_Z,
10465
+ CoordinationType$1.SPATIAL_TARGET_T,
10466
+ CoordinationType$1.SPATIAL_ROTATION_X,
10467
+ CoordinationType$1.SPATIAL_ROTATION_Y,
10468
+ CoordinationType$1.SPATIAL_ROTATION_Z,
10469
+ CoordinationType$1.SPATIAL_ROTATION_ORBIT,
10470
+ CoordinationType$1.SPATIAL_ORBIT_AXIS,
10471
+ CoordinationType$1.SPATIAL_AXIS_FIXED,
10472
+ CoordinationType$1.OBS_FILTER,
10473
+ CoordinationType$1.OBS_HIGHLIGHT,
10474
+ CoordinationType$1.OBS_SET_SELECTION,
10475
+ CoordinationType$1.OBS_SET_HIGHLIGHT,
10476
+ CoordinationType$1.OBS_SET_COLOR,
10477
+ CoordinationType$1.FEATURE_HIGHLIGHT,
10478
+ CoordinationType$1.FEATURE_SELECTION,
10479
+ CoordinationType$1.FEATURE_VALUE_COLORMAP,
10480
+ CoordinationType$1.FEATURE_VALUE_COLORMAP_RANGE,
10481
+ CoordinationType$1.OBS_COLOR_ENCODING,
10482
+ CoordinationType$1.ADDITIONAL_OBS_SETS,
10483
+ CoordinationType$1.MOLECULE_HIGHLIGHT,
10484
+ CoordinationType$1.TOOLTIPS_VISIBLE,
10485
+ CoordinationType$1.FILE_UID,
10486
+ CoordinationType$1.SPATIAL_TARGET_C,
10487
+ CoordinationType$1.SPATIAL_LAYER_VISIBLE,
10488
+ CoordinationType$1.SPATIAL_LAYER_OPACITY,
10489
+ CoordinationType$1.SPATIAL_LAYER_COLORMAP,
10490
+ CoordinationType$1.SPATIAL_LAYER_TRANSPARENT_COLOR,
10491
+ CoordinationType$1.SPATIAL_LAYER_MODEL_MATRIX,
10492
+ CoordinationType$1.SPATIAL_CHANNEL_COLOR,
10493
+ CoordinationType$1.SPATIAL_SEGMENTATION_FILLED,
10494
+ CoordinationType$1.SPATIAL_SEGMENTATION_STROKE_WIDTH,
10495
+ CoordinationType$1.IMAGE_LAYER,
10496
+ CoordinationType$1.SEGMENTATION_LAYER,
10497
+ CoordinationType$1.IMAGE_CHANNEL,
10498
+ CoordinationType$1.SEGMENTATION_CHANNEL,
10499
+ CoordinationType$1.SPATIAL_CHANNEL_VISIBLE,
10500
+ CoordinationType$1.SPATIAL_CHANNEL_OPACITY,
10501
+ CoordinationType$1.SPATIAL_CHANNEL_WINDOW,
10502
+ CoordinationType$1.SPATIAL_RENDERING_MODE,
10503
+ CoordinationType$1.VOLUMETRIC_RENDERING_ALGORITHM,
10504
+ CoordinationType$1.SPATIAL_TARGET_RESOLUTION,
10505
+ CoordinationType$1.SPATIAL_SLICE_X,
10506
+ CoordinationType$1.SPATIAL_SLICE_Y,
10507
+ CoordinationType$1.SPATIAL_SLICE_Z,
10508
+ CoordinationType$1.SPOT_LAYER,
10509
+ CoordinationType$1.POINT_LAYER,
10510
+ CoordinationType$1.SPATIAL_SPOT_RADIUS,
10511
+ CoordinationType$1.SPATIAL_SPOT_FILLED,
10512
+ CoordinationType$1.SPATIAL_SPOT_STROKE_WIDTH,
10513
+ CoordinationType$1.SPATIAL_LAYER_COLOR,
10514
+ CoordinationType$1.PIXEL_HIGHLIGHT,
10515
+ CoordinationType$1.TOOLTIP_CROSSHAIRS_VISIBLE,
10516
+ CoordinationType$1.LEGEND_VISIBLE,
10517
+ CoordinationType$1.SPATIAL_CHANNEL_LABELS_VISIBLE,
10518
+ CoordinationType$1.SPATIAL_CHANNEL_LABELS_ORIENTATION,
10519
+ CoordinationType$1.SPATIAL_CHANNEL_LABEL_SIZE
10520
+ ],
10402
10521
  [ViewType$1.HEATMAP]: [
10403
10522
  CoordinationType$1.DATASET,
10404
10523
  CoordinationType$1.OBS_TYPE,
@@ -10504,6 +10623,61 @@ const COMPONENT_COORDINATION_TYPES = {
10504
10623
  CoordinationType$1.SPATIAL_ROTATION_ORBIT,
10505
10624
  CoordinationType$1.SPATIAL_ORBIT_AXIS
10506
10625
  ],
10626
+ [ViewType$1.LAYER_CONTROLLER_BETA]: [
10627
+ CoordinationType$1.META_COORDINATION_SCOPES,
10628
+ CoordinationType$1.META_COORDINATION_SCOPES_BY,
10629
+ CoordinationType$1.DATASET,
10630
+ CoordinationType$1.OBS_TYPE,
10631
+ CoordinationType$1.FEATURE_TYPE,
10632
+ CoordinationType$1.FEATURE_VALUE_TYPE,
10633
+ CoordinationType$1.SPATIAL_POINT_LAYER,
10634
+ CoordinationType$1.SPATIAL_NEIGHBORHOOD_LAYER,
10635
+ CoordinationType$1.SPATIAL_ZOOM,
10636
+ CoordinationType$1.SPATIAL_TARGET_X,
10637
+ CoordinationType$1.SPATIAL_TARGET_Y,
10638
+ CoordinationType$1.SPATIAL_TARGET_Z,
10639
+ CoordinationType$1.SPATIAL_TARGET_T,
10640
+ CoordinationType$1.SPATIAL_ROTATION_X,
10641
+ CoordinationType$1.SPATIAL_ROTATION_Y,
10642
+ CoordinationType$1.SPATIAL_ROTATION_Z,
10643
+ CoordinationType$1.SPATIAL_ROTATION_ORBIT,
10644
+ CoordinationType$1.SPATIAL_ORBIT_AXIS,
10645
+ CoordinationType$1.FILE_UID,
10646
+ CoordinationType$1.SPATIAL_TARGET_C,
10647
+ CoordinationType$1.SPATIAL_LAYER_VISIBLE,
10648
+ CoordinationType$1.SPATIAL_LAYER_OPACITY,
10649
+ CoordinationType$1.SPATIAL_LAYER_COLORMAP,
10650
+ CoordinationType$1.SPATIAL_LAYER_TRANSPARENT_COLOR,
10651
+ CoordinationType$1.SPATIAL_LAYER_MODEL_MATRIX,
10652
+ CoordinationType$1.SPATIAL_CHANNEL_COLOR,
10653
+ CoordinationType$1.SPATIAL_SEGMENTATION_FILLED,
10654
+ CoordinationType$1.SPATIAL_SEGMENTATION_STROKE_WIDTH,
10655
+ CoordinationType$1.IMAGE_CHANNEL,
10656
+ CoordinationType$1.SEGMENTATION_CHANNEL,
10657
+ CoordinationType$1.SPATIAL_CHANNEL_VISIBLE,
10658
+ CoordinationType$1.SPATIAL_CHANNEL_OPACITY,
10659
+ CoordinationType$1.SPATIAL_CHANNEL_WINDOW,
10660
+ CoordinationType$1.PHOTOMETRIC_INTERPRETATION,
10661
+ CoordinationType$1.SPATIAL_RENDERING_MODE,
10662
+ CoordinationType$1.VOLUMETRIC_RENDERING_ALGORITHM,
10663
+ CoordinationType$1.SPATIAL_TARGET_RESOLUTION,
10664
+ CoordinationType$1.SPATIAL_SLICE_X,
10665
+ CoordinationType$1.SPATIAL_SLICE_Y,
10666
+ CoordinationType$1.SPATIAL_SLICE_Z,
10667
+ CoordinationType$1.SPOT_LAYER,
10668
+ CoordinationType$1.POINT_LAYER,
10669
+ CoordinationType$1.SPATIAL_SPOT_RADIUS,
10670
+ CoordinationType$1.SPATIAL_SPOT_FILLED,
10671
+ CoordinationType$1.SPATIAL_SPOT_STROKE_WIDTH,
10672
+ CoordinationType$1.SPATIAL_LAYER_COLOR,
10673
+ CoordinationType$1.OBS_COLOR_ENCODING,
10674
+ CoordinationType$1.TOOLTIPS_VISIBLE,
10675
+ CoordinationType$1.TOOLTIP_CROSSHAIRS_VISIBLE,
10676
+ CoordinationType$1.LEGEND_VISIBLE,
10677
+ CoordinationType$1.SPATIAL_CHANNEL_LABELS_VISIBLE,
10678
+ CoordinationType$1.SPATIAL_CHANNEL_LABELS_ORIENTATION,
10679
+ CoordinationType$1.SPATIAL_CHANNEL_LABEL_SIZE
10680
+ ],
10507
10681
  [ViewType$1.GENOMIC_PROFILES]: [
10508
10682
  CoordinationType$1.DATASET,
10509
10683
  CoordinationType$1.OBS_TYPE,
@@ -10795,6 +10969,8 @@ const annDataObsSets = z.array(z.object({
10795
10969
  ]),
10796
10970
  scorePath: z.string().optional().describe("The location in the AnnData store for the set confidence scores, like 'obs/celltype_prediction_score.'")
10797
10971
  }));
10972
+ const annDataObsSpots = annDataObsm;
10973
+ const annDataObsPoints = annDataObsm;
10798
10974
  const annDataObsLocations = annDataObsm;
10799
10975
  const annDataObsEmbedding = annDataObsm;
10800
10976
  const annDataObsSegmentations = annDataObs;
@@ -10821,10 +10997,21 @@ z.object({
10821
10997
  z.object({
10822
10998
  obsIndex: z.string(),
10823
10999
  obsEmbedding: z.array(z.string()).length(2)
11000
+ // TODO: support 3D?
11001
+ });
11002
+ z.object({
11003
+ obsIndex: z.string(),
11004
+ obsSpots: z.array(z.string()).length(2)
11005
+ // TODO: support 3D?
11006
+ });
11007
+ z.object({
11008
+ obsIndex: z.string(),
11009
+ obsPoints: z.array(z.string()).length(3)
10824
11010
  });
10825
11011
  z.object({
10826
11012
  obsIndex: z.string(),
10827
11013
  obsLocations: z.array(z.string()).length(2)
11014
+ // TODO: support 3D?
10828
11015
  });
10829
11016
  z.object({
10830
11017
  obsIndex: z.string(),
@@ -10856,6 +11043,8 @@ z.object({
10856
11043
  ]),
10857
11044
  obsFeatureMatrix: annDataObsFeatureMatrix,
10858
11045
  obsSets: annDataObsSets,
11046
+ obsSpots: annDataObsSpots,
11047
+ obsPoints: annDataObsPoints,
10859
11048
  obsLocations: annDataObsLocations,
10860
11049
  obsSegmentations: annDataObsSegmentations,
10861
11050
  obsEmbedding: z.union([
@@ -29114,6 +29303,132 @@ function FeatureList(props) {
29114
29303
  )
29115
29304
  ] });
29116
29305
  }
29306
+ const $b5e257d569688ac6$var$defaultContext = {
29307
+ prefix: String(Math.round(Math.random() * 1e10)),
29308
+ current: 0
29309
+ };
29310
+ const $b5e257d569688ac6$var$SSRContext = /* @__PURE__ */ React__default.createContext($b5e257d569688ac6$var$defaultContext);
29311
+ const $b5e257d569688ac6$var$IsSSRContext = /* @__PURE__ */ React__default.createContext(false);
29312
+ let $b5e257d569688ac6$var$canUseDOM = Boolean(typeof window !== "undefined" && window.document && window.document.createElement);
29313
+ let $b5e257d569688ac6$var$componentIds = /* @__PURE__ */ new WeakMap();
29314
+ function $b5e257d569688ac6$var$useCounter(isDisabled = false) {
29315
+ let ctx = useContext($b5e257d569688ac6$var$SSRContext);
29316
+ let ref = useRef(null);
29317
+ if (ref.current === null && !isDisabled) {
29318
+ var _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner;
29319
+ let currentOwner = (_React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = React__default.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED) === null || _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED === void 0 ? void 0 : (_React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner = _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner) === null || _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner === void 0 ? void 0 : _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner.current;
29320
+ if (currentOwner) {
29321
+ let prevComponentValue = $b5e257d569688ac6$var$componentIds.get(currentOwner);
29322
+ if (prevComponentValue == null)
29323
+ $b5e257d569688ac6$var$componentIds.set(currentOwner, {
29324
+ id: ctx.current,
29325
+ state: currentOwner.memoizedState
29326
+ });
29327
+ else if (currentOwner.memoizedState !== prevComponentValue.state) {
29328
+ ctx.current = prevComponentValue.id;
29329
+ $b5e257d569688ac6$var$componentIds.delete(currentOwner);
29330
+ }
29331
+ }
29332
+ ref.current = ++ctx.current;
29333
+ }
29334
+ return ref.current;
29335
+ }
29336
+ function $b5e257d569688ac6$var$useLegacySSRSafeId(defaultId) {
29337
+ let ctx = useContext($b5e257d569688ac6$var$SSRContext);
29338
+ if (ctx === $b5e257d569688ac6$var$defaultContext && !$b5e257d569688ac6$var$canUseDOM)
29339
+ console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");
29340
+ let counter = $b5e257d569688ac6$var$useCounter(!!defaultId);
29341
+ let prefix2 = ctx === $b5e257d569688ac6$var$defaultContext && false ? "react-aria" : `react-aria${ctx.prefix}`;
29342
+ return defaultId || `${prefix2}-${counter}`;
29343
+ }
29344
+ function $b5e257d569688ac6$var$useModernSSRSafeId(defaultId) {
29345
+ let id = React__default.useId();
29346
+ let [didSSR] = useState($b5e257d569688ac6$export$535bd6ca7f90a273());
29347
+ let prefix2 = didSSR || false ? "react-aria" : `react-aria${$b5e257d569688ac6$var$defaultContext.prefix}`;
29348
+ return defaultId || `${prefix2}-${id}`;
29349
+ }
29350
+ const $b5e257d569688ac6$export$619500959fc48b26 = typeof React__default["useId"] === "function" ? $b5e257d569688ac6$var$useModernSSRSafeId : $b5e257d569688ac6$var$useLegacySSRSafeId;
29351
+ function $b5e257d569688ac6$var$getSnapshot() {
29352
+ return false;
29353
+ }
29354
+ function $b5e257d569688ac6$var$getServerSnapshot() {
29355
+ return true;
29356
+ }
29357
+ function $b5e257d569688ac6$var$subscribe(onStoreChange) {
29358
+ return () => {
29359
+ };
29360
+ }
29361
+ function $b5e257d569688ac6$export$535bd6ca7f90a273() {
29362
+ if (typeof React__default["useSyncExternalStore"] === "function")
29363
+ return React__default["useSyncExternalStore"]($b5e257d569688ac6$var$subscribe, $b5e257d569688ac6$var$getSnapshot, $b5e257d569688ac6$var$getServerSnapshot);
29364
+ return useContext($b5e257d569688ac6$var$IsSSRContext);
29365
+ }
29366
+ const $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c = typeof document !== "undefined" ? React__default.useLayoutEffect : () => {
29367
+ };
29368
+ let $bdb11010cef70236$var$idsUpdaterMap = /* @__PURE__ */ new Map();
29369
+ function $bdb11010cef70236$export$f680877a34711e37(defaultId) {
29370
+ let [value, setValue] = useState(defaultId);
29371
+ let nextId = useRef(null);
29372
+ let res = $b5e257d569688ac6$export$619500959fc48b26(value);
29373
+ let updateValue = useCallback((val) => {
29374
+ nextId.current = val;
29375
+ }, []);
29376
+ $bdb11010cef70236$var$idsUpdaterMap.set(res, updateValue);
29377
+ $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
29378
+ let r2 = res;
29379
+ return () => {
29380
+ $bdb11010cef70236$var$idsUpdaterMap.delete(r2);
29381
+ };
29382
+ }, [
29383
+ res
29384
+ ]);
29385
+ useEffect(() => {
29386
+ let newId = nextId.current;
29387
+ if (newId) {
29388
+ nextId.current = null;
29389
+ setValue(newId);
29390
+ }
29391
+ });
29392
+ return res;
29393
+ }
29394
+ let $bbed8b41f857bcc0$var$transitionsByElement = /* @__PURE__ */ new Map();
29395
+ let $bbed8b41f857bcc0$var$transitionCallbacks = /* @__PURE__ */ new Set();
29396
+ function $bbed8b41f857bcc0$var$setupGlobalEvents() {
29397
+ if (typeof window === "undefined")
29398
+ return;
29399
+ let onTransitionStart = (e) => {
29400
+ let transitions2 = $bbed8b41f857bcc0$var$transitionsByElement.get(e.target);
29401
+ if (!transitions2) {
29402
+ transitions2 = /* @__PURE__ */ new Set();
29403
+ $bbed8b41f857bcc0$var$transitionsByElement.set(e.target, transitions2);
29404
+ e.target.addEventListener("transitioncancel", onTransitionEnd);
29405
+ }
29406
+ transitions2.add(e.propertyName);
29407
+ };
29408
+ let onTransitionEnd = (e) => {
29409
+ let properties = $bbed8b41f857bcc0$var$transitionsByElement.get(e.target);
29410
+ if (!properties)
29411
+ return;
29412
+ properties.delete(e.propertyName);
29413
+ if (properties.size === 0) {
29414
+ e.target.removeEventListener("transitioncancel", onTransitionEnd);
29415
+ $bbed8b41f857bcc0$var$transitionsByElement.delete(e.target);
29416
+ }
29417
+ if ($bbed8b41f857bcc0$var$transitionsByElement.size === 0) {
29418
+ for (let cb of $bbed8b41f857bcc0$var$transitionCallbacks)
29419
+ cb();
29420
+ $bbed8b41f857bcc0$var$transitionCallbacks.clear();
29421
+ }
29422
+ };
29423
+ document.body.addEventListener("transitionrun", onTransitionStart);
29424
+ document.body.addEventListener("transitionend", onTransitionEnd);
29425
+ }
29426
+ if (typeof document !== "undefined") {
29427
+ if (document.readyState !== "loading")
29428
+ $bbed8b41f857bcc0$var$setupGlobalEvents();
29429
+ else
29430
+ document.addEventListener("DOMContentLoaded", $bbed8b41f857bcc0$var$setupGlobalEvents);
29431
+ }
29117
29432
  function FeatureListOptions(props) {
29118
29433
  const {
29119
29434
  children,
@@ -29126,7 +29441,7 @@ function FeatureListOptions(props) {
29126
29441
  hasFeatureLabels,
29127
29442
  primaryColumnName
29128
29443
  } = props;
29129
- const featureListId = useId();
29444
+ const featureListId = $bdb11010cef70236$export$f680877a34711e37();
29130
29445
  function handleFeatureListSortChange(event) {
29131
29446
  setFeatureListSort(event.target.value);
29132
29447
  }
@@ -29210,6 +29525,7 @@ function FeatureListSubscriber(props) {
29210
29525
  const loaders = useLoaders();
29211
29526
  const [{
29212
29527
  dataset,
29528
+ obsType,
29213
29529
  featureType,
29214
29530
  featureSelection: geneSelection,
29215
29531
  featureFilter: geneFilter,
@@ -29234,7 +29550,7 @@ function FeatureListSubscriber(props) {
29234
29550
  loaders,
29235
29551
  dataset,
29236
29552
  true,
29237
- { featureType }
29553
+ { obsType, featureType }
29238
29554
  );
29239
29555
  const isReady = useReady([
29240
29556
  featureLabelsStatus,
@@ -1 +1 @@
1
- {"version":3,"file":"FeatureListOptions.d.ts","sourceRoot":"","sources":["../src/FeatureListOptions.js"],"names":[],"mappings":"AAMA,oEAqGC"}
1
+ {"version":3,"file":"FeatureListOptions.d.ts","sourceRoot":"","sources":["../src/FeatureListOptions.js"],"names":[],"mappings":"AAOA,oEAqGC"}
@@ -1,5 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- import React, { useId } from 'react';
2
+ import React from 'react';
3
+ import { useId } from 'react-aria';
3
4
  import { OptionsContainer, OptionSelect, usePlotOptionsStyles } from '@vitessce/vit-s';
4
5
  import { TableCell, TableRow, Checkbox } from '@material-ui/core';
5
6
  import { FEATURELIST_SORT_OPTIONS, ALT_COLNAME } from './constants.js';
@@ -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;gBAgH7C"}
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"}
@@ -30,13 +30,13 @@ export function FeatureListSubscriber(props) {
30
30
  const { coordinationScopes, removeGridComponent, variablesLabelOverride, theme, title: titleOverride, enableMultiSelect = false, showTable = false, sort = 'alphabetical', sortKey = null, } = props;
31
31
  const loaders = useLoaders();
32
32
  // Get "props" from the coordination space.
33
- const [{ dataset, featureType, featureSelection: geneSelection, featureFilter: geneFilter, obsColorEncoding: cellColorEncoding, }, { setFeatureSelection: setGeneSelection, setFeatureFilter: setGeneFilter, setFeatureHighlight: setGeneHighlight, setObsColorEncoding: setCellColorEncoding, }] = useCoordination(COMPONENT_COORDINATION_TYPES[ViewType.FEATURE_LIST], coordinationScopes);
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);
34
34
  const variablesLabel = variablesLabelOverride || featureType;
35
35
  const title = titleOverride || `${capitalize(variablesLabel)} List`;
36
36
  // Get data from loaders using the data hooks.
37
37
  // TODO: support multiple feature labels using featureLabelsType coordination values.
38
38
  const [{ featureLabelsMap }, featureLabelsStatus, featureLabelsUrls] = useFeatureLabelsData(loaders, dataset, false, {}, {}, { featureType });
39
- const [{ featureIndex }, matrixIndicesStatus, obsFeatureMatrixUrls] = useObsFeatureMatrixIndices(loaders, dataset, true, { featureType });
39
+ const [{ featureIndex }, matrixIndicesStatus, obsFeatureMatrixUrls] = useObsFeatureMatrixIndices(loaders, dataset, true, { obsType, featureType });
40
40
  const isReady = useReady([
41
41
  featureLabelsStatus,
42
42
  matrixIndicesStatus,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitessce/feature-list",
3
- "version": "3.1.3",
3
+ "version": "3.2.1",
4
4
  "author": "Gehlenborg Lab",
5
5
  "homepage": "http://vitessce.io",
6
6
  "repository": {
@@ -21,9 +21,10 @@
21
21
  "lodash-es": "^4.17.21",
22
22
  "react-virtualized": "^9.22.2",
23
23
  "uuid": "^9.0.0",
24
- "@vitessce/constants-internal": "3.1.3",
25
- "@vitessce/utils": "3.1.3",
26
- "@vitessce/vit-s": "3.1.3"
24
+ "react-aria": "^3.28.0",
25
+ "@vitessce/constants-internal": "3.2.1",
26
+ "@vitessce/utils": "3.2.1",
27
+ "@vitessce/vit-s": "3.2.1"
27
28
  },
28
29
  "devDependencies": {
29
30
  "@testing-library/jest-dom": "^5.16.4",
@@ -1,4 +1,5 @@
1
- import React, { useId } from 'react';
1
+ import React from 'react';
2
+ import { useId } from 'react-aria';
2
3
  import { OptionsContainer, OptionSelect, usePlotOptionsStyles } from '@vitessce/vit-s';
3
4
  import { TableCell, TableRow, Checkbox } from '@material-ui/core';
4
5
  import { FEATURELIST_SORT_OPTIONS, ALT_COLNAME } from './constants.js';
@@ -50,6 +50,7 @@ export function FeatureListSubscriber(props) {
50
50
  // Get "props" from the coordination space.
51
51
  const [{
52
52
  dataset,
53
+ obsType,
53
54
  featureType,
54
55
  featureSelection: geneSelection,
55
56
  featureFilter: geneFilter,
@@ -73,7 +74,7 @@ export function FeatureListSubscriber(props) {
73
74
  );
74
75
  const [{ featureIndex }, matrixIndicesStatus, obsFeatureMatrixUrls] = useObsFeatureMatrixIndices(
75
76
  loaders, dataset, true,
76
- { featureType },
77
+ { obsType, featureType },
77
78
  );
78
79
  const isReady = useReady([
79
80
  featureLabelsStatus,