@vitessce/scatterplot-embedding 3.8.10 → 3.9.0

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-BgrJUaQb.js";
2
+ import { B as BaseDecoder } from "./index-Bxpb2AKZ.js";
3
3
  class DeflateDecoder extends BaseDecoder {
4
4
  decodeBlock(buffer) {
5
5
  return inflate_1(new Uint8Array(buffer)).buffer;
@@ -3134,7 +3134,7 @@ function aggregateFeatureArrays(arrays, strategy) {
3134
3134
  resultArray[i2] /= numArrays;
3135
3135
  }
3136
3136
  }
3137
- return resultArray;
3137
+ return Array.from(resultArray);
3138
3138
  }
3139
3139
  if (strategy === "difference") {
3140
3140
  if (numArrays !== 2) {
@@ -3147,7 +3147,7 @@ function aggregateFeatureArrays(arrays, strategy) {
3147
3147
  for (let i2 = 0; i2 < firstArrayLength; i2++) {
3148
3148
  resultArray[i2] = arr0[i2] - arr1[i2];
3149
3149
  }
3150
- return resultArray;
3150
+ return Array.from(resultArray);
3151
3151
  }
3152
3152
  throw new Error(`Unknown aggregation strategy: ${strategy}`);
3153
3153
  }
@@ -9855,6 +9855,7 @@ const CoordinationType$1 = {
9855
9855
  OBS_SET_HIGHLIGHT: "obsSetHighlight",
9856
9856
  OBS_SET_EXPANSION: "obsSetExpansion",
9857
9857
  OBS_SET_COLOR: "obsSetColor",
9858
+ FEATURE_COLOR: "featureColor",
9858
9859
  FEATURE_HIGHLIGHT: "featureHighlight",
9859
9860
  FEATURE_SELECTION: "featureSelection",
9860
9861
  FEATURE_SET_SELECTION: "featureSetSelection",
@@ -9910,6 +9911,8 @@ const CoordinationType$1 = {
9910
9911
  // Per-spatial-layer
9911
9912
  SPATIAL_MAX_RESOLUTION: "spatialMaxResolution",
9912
9913
  // Per-image-channel (for spatial-accelerated)
9914
+ SPATIAL_LOD_FACTOR: "spatialLodFactor",
9915
+ // LOD factor for 3D volume rendering
9913
9916
  // For clipping plane sliders
9914
9917
  SPATIAL_SLICE_X: "spatialSliceX",
9915
9918
  SPATIAL_SLICE_Y: "spatialSliceY",
@@ -10430,6 +10433,8 @@ const COMPONENT_COORDINATION_TYPES = {
10430
10433
  CoordinationType$1.OBS_SET_FILTER,
10431
10434
  CoordinationType$1.OBS_SET_HIGHLIGHT,
10432
10435
  CoordinationType$1.OBS_SET_COLOR,
10436
+ CoordinationType$1.FEATURE_COLOR,
10437
+ CoordinationType$1.FEATURE_FILTER_MODE,
10433
10438
  CoordinationType$1.FEATURE_HIGHLIGHT,
10434
10439
  CoordinationType$1.FEATURE_SELECTION,
10435
10440
  CoordinationType$1.FEATURE_VALUE_COLORMAP,
@@ -10644,6 +10649,8 @@ const COMPONENT_COORDINATION_TYPES = {
10644
10649
  CoordinationType$1.SPATIAL_SPOT_STROKE_WIDTH,
10645
10650
  CoordinationType$1.SPATIAL_LAYER_COLOR,
10646
10651
  CoordinationType$1.OBS_COLOR_ENCODING,
10652
+ CoordinationType$1.FEATURE_COLOR,
10653
+ CoordinationType$1.FEATURE_FILTER_MODE,
10647
10654
  CoordinationType$1.FEATURE_VALUE_COLORMAP,
10648
10655
  CoordinationType$1.FEATURE_VALUE_COLORMAP_RANGE,
10649
10656
  CoordinationType$1.FEATURE_SELECTION,
@@ -123401,22 +123408,22 @@ function addDecoder(cases, importFn) {
123401
123408
  }
123402
123409
  cases.forEach((c2) => registry$1.set(c2, importFn));
123403
123410
  }
123404
- addDecoder([void 0, 1], () => import("./raw-BJDJq5QK.js").then((m2) => m2.default));
123405
- addDecoder(5, () => import("./lzw-BwAlpbiv.js").then((m2) => m2.default));
123411
+ addDecoder([void 0, 1], () => import("./raw-DSxiAWgk.js").then((m2) => m2.default));
123412
+ addDecoder(5, () => import("./lzw-BUVadDKF.js").then((m2) => m2.default));
123406
123413
  addDecoder(6, () => {
123407
123414
  throw new Error("old style JPEG compression is not supported.");
123408
123415
  });
123409
- addDecoder(7, () => import("./jpeg-V5Wg0DTH.js").then((m2) => m2.default));
123410
- addDecoder([8, 32946], () => import("./deflate-DV84laLg.js").then((m2) => m2.default));
123411
- addDecoder(32773, () => import("./packbits-BzaxDQbT.js").then((m2) => m2.default));
123416
+ addDecoder(7, () => import("./jpeg-DrCLRsoT.js").then((m2) => m2.default));
123417
+ addDecoder([8, 32946], () => import("./deflate-CcLuHSgx.js").then((m2) => m2.default));
123418
+ addDecoder(32773, () => import("./packbits-CaNBbQQ0.js").then((m2) => m2.default));
123412
123419
  addDecoder(
123413
123420
  34887,
123414
- () => import("./lerc-LFwYjack.js").then(async (m2) => {
123421
+ () => import("./lerc-B9rIwWOn.js").then(async (m2) => {
123415
123422
  await m2.zstd.init();
123416
123423
  return m2;
123417
123424
  }).then((m2) => m2.default)
123418
123425
  );
123419
- addDecoder(50001, () => import("./webimage-6o_3zIHO.js").then((m2) => m2.default));
123426
+ addDecoder(50001, () => import("./webimage-Bg7AiNmf.js").then((m2) => m2.default));
123420
123427
  function decodeRowAcc(row, stride) {
123421
123428
  let length2 = row.length - stride;
123422
123429
  let offset2 = 0;
@@ -143466,11 +143473,6 @@ const { tss } = createTss({
143466
143473
  "usePlugin": useMuiThemeStyleOverridesPlugin
143467
143474
  });
143468
143475
  const useStyles$4 = tss.create({});
143469
- function chainPropTypes(propType1, propType2) {
143470
- return function validate2(...args) {
143471
- return propType1(...args) || propType2(...args);
143472
- };
143473
- }
143474
143476
  const memoTheme = unstable_memoTheme;
143475
143477
  ({
143476
143478
  // ┌────────────────────────────── Warning ──────────────────────────────┐
@@ -143489,332 +143491,6 @@ const memoTheme = unstable_memoTheme;
143489
143491
  function useDefaultProps(params) {
143490
143492
  return useDefaultProps$1(params);
143491
143493
  }
143492
- function _extends$1() {
143493
- return _extends$1 = Object.assign ? Object.assign.bind() : function(n2) {
143494
- for (var e3 = 1; e3 < arguments.length; e3++) {
143495
- var t = arguments[e3];
143496
- for (var r2 in t) ({}).hasOwnProperty.call(t, r2) && (n2[r2] = t[r2]);
143497
- }
143498
- return n2;
143499
- }, _extends$1.apply(null, arguments);
143500
- }
143501
- function _objectWithoutPropertiesLoose(r2, e3) {
143502
- if (null == r2) return {};
143503
- var t = {};
143504
- for (var n2 in r2) if ({}.hasOwnProperty.call(r2, n2)) {
143505
- if (-1 !== e3.indexOf(n2)) continue;
143506
- t[n2] = r2[n2];
143507
- }
143508
- return t;
143509
- }
143510
- function _setPrototypeOf(t, e3) {
143511
- return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t2, e4) {
143512
- return t2.__proto__ = e4, t2;
143513
- }, _setPrototypeOf(t, e3);
143514
- }
143515
- function _inheritsLoose(t, o2) {
143516
- t.prototype = Object.create(o2.prototype), t.prototype.constructor = t, _setPrototypeOf(t, o2);
143517
- }
143518
- const TransitionGroupContext = React__default.createContext(null);
143519
- function _assertThisInitialized(e3) {
143520
- if (void 0 === e3) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
143521
- return e3;
143522
- }
143523
- function getChildMapping(children2, mapFn) {
143524
- var mapper = function mapper2(child) {
143525
- return mapFn && isValidElement(child) ? mapFn(child) : child;
143526
- };
143527
- var result = /* @__PURE__ */ Object.create(null);
143528
- if (children2) Children.map(children2, function(c2) {
143529
- return c2;
143530
- }).forEach(function(child) {
143531
- result[child.key] = mapper(child);
143532
- });
143533
- return result;
143534
- }
143535
- function mergeChildMappings(prev2, next2) {
143536
- prev2 = prev2 || {};
143537
- next2 = next2 || {};
143538
- function getValueForKey(key) {
143539
- return key in next2 ? next2[key] : prev2[key];
143540
- }
143541
- var nextKeysPending = /* @__PURE__ */ Object.create(null);
143542
- var pendingKeys = [];
143543
- for (var prevKey in prev2) {
143544
- if (prevKey in next2) {
143545
- if (pendingKeys.length) {
143546
- nextKeysPending[prevKey] = pendingKeys;
143547
- pendingKeys = [];
143548
- }
143549
- } else {
143550
- pendingKeys.push(prevKey);
143551
- }
143552
- }
143553
- var i2;
143554
- var childMapping = {};
143555
- for (var nextKey in next2) {
143556
- if (nextKeysPending[nextKey]) {
143557
- for (i2 = 0; i2 < nextKeysPending[nextKey].length; i2++) {
143558
- var pendingNextKey = nextKeysPending[nextKey][i2];
143559
- childMapping[nextKeysPending[nextKey][i2]] = getValueForKey(pendingNextKey);
143560
- }
143561
- }
143562
- childMapping[nextKey] = getValueForKey(nextKey);
143563
- }
143564
- for (i2 = 0; i2 < pendingKeys.length; i2++) {
143565
- childMapping[pendingKeys[i2]] = getValueForKey(pendingKeys[i2]);
143566
- }
143567
- return childMapping;
143568
- }
143569
- function getProp(child, prop, props) {
143570
- return props[prop] != null ? props[prop] : child.props[prop];
143571
- }
143572
- function getInitialChildMapping(props, onExited) {
143573
- return getChildMapping(props.children, function(child) {
143574
- return cloneElement(child, {
143575
- onExited: onExited.bind(null, child),
143576
- in: true,
143577
- appear: getProp(child, "appear", props),
143578
- enter: getProp(child, "enter", props),
143579
- exit: getProp(child, "exit", props)
143580
- });
143581
- });
143582
- }
143583
- function getNextChildMapping(nextProps, prevChildMapping, onExited) {
143584
- var nextChildMapping = getChildMapping(nextProps.children);
143585
- var children2 = mergeChildMappings(prevChildMapping, nextChildMapping);
143586
- Object.keys(children2).forEach(function(key) {
143587
- var child = children2[key];
143588
- if (!isValidElement(child)) return;
143589
- var hasPrev = key in prevChildMapping;
143590
- var hasNext = key in nextChildMapping;
143591
- var prevChild = prevChildMapping[key];
143592
- var isLeaving = isValidElement(prevChild) && !prevChild.props.in;
143593
- if (hasNext && (!hasPrev || isLeaving)) {
143594
- children2[key] = cloneElement(child, {
143595
- onExited: onExited.bind(null, child),
143596
- in: true,
143597
- exit: getProp(child, "exit", nextProps),
143598
- enter: getProp(child, "enter", nextProps)
143599
- });
143600
- } else if (!hasNext && hasPrev && !isLeaving) {
143601
- children2[key] = cloneElement(child, {
143602
- in: false
143603
- });
143604
- } else if (hasNext && hasPrev && isValidElement(prevChild)) {
143605
- children2[key] = cloneElement(child, {
143606
- onExited: onExited.bind(null, child),
143607
- in: prevChild.props.in,
143608
- exit: getProp(child, "exit", nextProps),
143609
- enter: getProp(child, "enter", nextProps)
143610
- });
143611
- }
143612
- });
143613
- return children2;
143614
- }
143615
- var values = Object.values || function(obj) {
143616
- return Object.keys(obj).map(function(k) {
143617
- return obj[k];
143618
- });
143619
- };
143620
- var defaultProps = {
143621
- component: "div",
143622
- childFactory: function childFactory(child) {
143623
- return child;
143624
- }
143625
- };
143626
- var TransitionGroup = /* @__PURE__ */ function(_React$Component) {
143627
- _inheritsLoose(TransitionGroup2, _React$Component);
143628
- function TransitionGroup2(props, context) {
143629
- var _this;
143630
- _this = _React$Component.call(this, props, context) || this;
143631
- var handleExited = _this.handleExited.bind(_assertThisInitialized(_this));
143632
- _this.state = {
143633
- contextValue: {
143634
- isMounting: true
143635
- },
143636
- handleExited,
143637
- firstRender: true
143638
- };
143639
- return _this;
143640
- }
143641
- var _proto = TransitionGroup2.prototype;
143642
- _proto.componentDidMount = function componentDidMount() {
143643
- this.mounted = true;
143644
- this.setState({
143645
- contextValue: {
143646
- isMounting: false
143647
- }
143648
- });
143649
- };
143650
- _proto.componentWillUnmount = function componentWillUnmount() {
143651
- this.mounted = false;
143652
- };
143653
- TransitionGroup2.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, _ref) {
143654
- var prevChildMapping = _ref.children, handleExited = _ref.handleExited, firstRender = _ref.firstRender;
143655
- return {
143656
- children: firstRender ? getInitialChildMapping(nextProps, handleExited) : getNextChildMapping(nextProps, prevChildMapping, handleExited),
143657
- firstRender: false
143658
- };
143659
- };
143660
- _proto.handleExited = function handleExited(child, node2) {
143661
- var currentChildMapping = getChildMapping(this.props.children);
143662
- if (child.key in currentChildMapping) return;
143663
- if (child.props.onExited) {
143664
- child.props.onExited(node2);
143665
- }
143666
- if (this.mounted) {
143667
- this.setState(function(state) {
143668
- var children2 = _extends$1({}, state.children);
143669
- delete children2[child.key];
143670
- return {
143671
- children: children2
143672
- };
143673
- });
143674
- }
143675
- };
143676
- _proto.render = function render() {
143677
- var _this$props = this.props, Component2 = _this$props.component, childFactory2 = _this$props.childFactory, props = _objectWithoutPropertiesLoose(_this$props, ["component", "childFactory"]);
143678
- var contextValue = this.state.contextValue;
143679
- var children2 = values(this.state.children).map(childFactory2);
143680
- delete props.appear;
143681
- delete props.enter;
143682
- delete props.exit;
143683
- if (Component2 === null) {
143684
- return /* @__PURE__ */ React__default.createElement(TransitionGroupContext.Provider, {
143685
- value: contextValue
143686
- }, children2);
143687
- }
143688
- return /* @__PURE__ */ React__default.createElement(TransitionGroupContext.Provider, {
143689
- value: contextValue
143690
- }, /* @__PURE__ */ React__default.createElement(Component2, props, children2));
143691
- };
143692
- return TransitionGroup2;
143693
- }(React__default.Component);
143694
- TransitionGroup.propTypes = {
143695
- /**
143696
- * `<TransitionGroup>` renders a `<div>` by default. You can change this
143697
- * behavior by providing a `component` prop.
143698
- * If you use React v16+ and would like to avoid a wrapping `<div>` element
143699
- * you can pass in `component={null}`. This is useful if the wrapping div
143700
- * borks your css styles.
143701
- */
143702
- component: PropTypes.any,
143703
- /**
143704
- * A set of `<Transition>` components, that are toggled `in` and out as they
143705
- * leave. the `<TransitionGroup>` will inject specific transition props, so
143706
- * remember to spread them through if you are wrapping the `<Transition>` as
143707
- * with our `<Fade>` example.
143708
- *
143709
- * While this component is meant for multiple `Transition` or `CSSTransition`
143710
- * children, sometimes you may want to have a single transition child with
143711
- * content that you want to be transitioned out and in when you change it
143712
- * (e.g. routes, images etc.) In that case you can change the `key` prop of
143713
- * the transition child as you change its content, this will cause
143714
- * `TransitionGroup` to transition the child out and back in.
143715
- */
143716
- children: PropTypes.node,
143717
- /**
143718
- * A convenience prop that enables or disables appear animations
143719
- * for all children. Note that specifying this will override any defaults set
143720
- * on individual children Transitions.
143721
- */
143722
- appear: PropTypes.bool,
143723
- /**
143724
- * A convenience prop that enables or disables enter animations
143725
- * for all children. Note that specifying this will override any defaults set
143726
- * on individual children Transitions.
143727
- */
143728
- enter: PropTypes.bool,
143729
- /**
143730
- * A convenience prop that enables or disables exit animations
143731
- * for all children. Note that specifying this will override any defaults set
143732
- * on individual children Transitions.
143733
- */
143734
- exit: PropTypes.bool,
143735
- /**
143736
- * You may need to apply reactive updates to a child as it is exiting.
143737
- * This is generally done by using `cloneElement` however in the case of an exiting
143738
- * child the element has already been removed and not accessible to the consumer.
143739
- *
143740
- * If you do need to update a child as it leaves you can provide a `childFactory`
143741
- * to wrap every child, even the ones that are leaving.
143742
- *
143743
- * @type Function(child: ReactElement) -> ReactElement
143744
- */
143745
- childFactory: PropTypes.func
143746
- };
143747
- TransitionGroup.defaultProps = defaultProps;
143748
- const UNINITIALIZED = {};
143749
- function useLazyRef(init, initArg) {
143750
- const ref = React.useRef(UNINITIALIZED);
143751
- if (ref.current === UNINITIALIZED) {
143752
- ref.current = init(initArg);
143753
- }
143754
- return ref;
143755
- }
143756
- const EMPTY = [];
143757
- function useOnMount(fn) {
143758
- React.useEffect(fn, EMPTY);
143759
- }
143760
- class Timeout {
143761
- constructor() {
143762
- __publicField(this, "currentId", null);
143763
- __publicField(this, "clear", () => {
143764
- if (this.currentId !== null) {
143765
- clearTimeout(this.currentId);
143766
- this.currentId = null;
143767
- }
143768
- });
143769
- __publicField(this, "disposeEffect", () => {
143770
- return this.clear;
143771
- });
143772
- }
143773
- static create() {
143774
- return new Timeout();
143775
- }
143776
- /**
143777
- * Executes `fn` after `delay`, clearing any previously scheduled call.
143778
- */
143779
- start(delay, fn) {
143780
- this.clear();
143781
- this.currentId = setTimeout(() => {
143782
- this.currentId = null;
143783
- fn();
143784
- }, delay);
143785
- }
143786
- }
143787
- function useTimeout() {
143788
- const timeout2 = useLazyRef(Timeout.create).current;
143789
- useOnMount(timeout2.disposeEffect);
143790
- return timeout2;
143791
- }
143792
- function isClassComponent(elementType) {
143793
- const {
143794
- prototype = {}
143795
- } = elementType;
143796
- return Boolean(prototype.isReactComponent);
143797
- }
143798
- function elementTypeAcceptingRef(props, propName, componentName, location, propFullName) {
143799
- const propValue = props[propName];
143800
- const safePropName = propFullName || propName;
143801
- if (propValue == null || // When server-side rendering React doesn't warn either.
143802
- // This is not an accurate check for SSR.
143803
- // This is only in place for emotion compat.
143804
- // TODO: Revisit once https://github.com/facebook/react/issues/20047 is resolved.
143805
- typeof window === "undefined") {
143806
- return null;
143807
- }
143808
- let warningHint;
143809
- if (typeof propValue === "function" && !isClassComponent(propValue)) {
143810
- warningHint = "Did you accidentally provide a plain function component instead?";
143811
- }
143812
- if (warningHint !== void 0) {
143813
- return new Error(`Invalid ${location} \`${safePropName}\` supplied to \`${componentName}\`. Expected an element type that can hold a ref. ${warningHint} For more information see https://mui.com/r/caveat-with-refs-guide`);
143814
- }
143815
- return null;
143816
- }
143817
- const elementTypeAcceptingRef$1 = chainPropTypes(PropTypes.elementType, elementTypeAcceptingRef);
143818
143494
  function getSvgIconUtilityClass(slot) {
143819
143495
  return generateUtilityClass("MuiSvgIcon", slot);
143820
143496
  }
@@ -144231,6 +143907,337 @@ function mergeSlotProps$1(externalSlotProps, defaultSlotProps) {
144231
143907
  }
144232
143908
  };
144233
143909
  }
143910
+ function chainPropTypes(propType1, propType2) {
143911
+ return function validate2(...args) {
143912
+ return propType1(...args) || propType2(...args);
143913
+ };
143914
+ }
143915
+ function _extends$1() {
143916
+ return _extends$1 = Object.assign ? Object.assign.bind() : function(n2) {
143917
+ for (var e3 = 1; e3 < arguments.length; e3++) {
143918
+ var t = arguments[e3];
143919
+ for (var r2 in t) ({}).hasOwnProperty.call(t, r2) && (n2[r2] = t[r2]);
143920
+ }
143921
+ return n2;
143922
+ }, _extends$1.apply(null, arguments);
143923
+ }
143924
+ function _objectWithoutPropertiesLoose(r2, e3) {
143925
+ if (null == r2) return {};
143926
+ var t = {};
143927
+ for (var n2 in r2) if ({}.hasOwnProperty.call(r2, n2)) {
143928
+ if (-1 !== e3.indexOf(n2)) continue;
143929
+ t[n2] = r2[n2];
143930
+ }
143931
+ return t;
143932
+ }
143933
+ function _setPrototypeOf(t, e3) {
143934
+ return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t2, e4) {
143935
+ return t2.__proto__ = e4, t2;
143936
+ }, _setPrototypeOf(t, e3);
143937
+ }
143938
+ function _inheritsLoose(t, o2) {
143939
+ t.prototype = Object.create(o2.prototype), t.prototype.constructor = t, _setPrototypeOf(t, o2);
143940
+ }
143941
+ const TransitionGroupContext = React__default.createContext(null);
143942
+ function _assertThisInitialized(e3) {
143943
+ if (void 0 === e3) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
143944
+ return e3;
143945
+ }
143946
+ function getChildMapping(children2, mapFn) {
143947
+ var mapper = function mapper2(child) {
143948
+ return mapFn && isValidElement(child) ? mapFn(child) : child;
143949
+ };
143950
+ var result = /* @__PURE__ */ Object.create(null);
143951
+ if (children2) Children.map(children2, function(c2) {
143952
+ return c2;
143953
+ }).forEach(function(child) {
143954
+ result[child.key] = mapper(child);
143955
+ });
143956
+ return result;
143957
+ }
143958
+ function mergeChildMappings(prev2, next2) {
143959
+ prev2 = prev2 || {};
143960
+ next2 = next2 || {};
143961
+ function getValueForKey(key) {
143962
+ return key in next2 ? next2[key] : prev2[key];
143963
+ }
143964
+ var nextKeysPending = /* @__PURE__ */ Object.create(null);
143965
+ var pendingKeys = [];
143966
+ for (var prevKey in prev2) {
143967
+ if (prevKey in next2) {
143968
+ if (pendingKeys.length) {
143969
+ nextKeysPending[prevKey] = pendingKeys;
143970
+ pendingKeys = [];
143971
+ }
143972
+ } else {
143973
+ pendingKeys.push(prevKey);
143974
+ }
143975
+ }
143976
+ var i2;
143977
+ var childMapping = {};
143978
+ for (var nextKey in next2) {
143979
+ if (nextKeysPending[nextKey]) {
143980
+ for (i2 = 0; i2 < nextKeysPending[nextKey].length; i2++) {
143981
+ var pendingNextKey = nextKeysPending[nextKey][i2];
143982
+ childMapping[nextKeysPending[nextKey][i2]] = getValueForKey(pendingNextKey);
143983
+ }
143984
+ }
143985
+ childMapping[nextKey] = getValueForKey(nextKey);
143986
+ }
143987
+ for (i2 = 0; i2 < pendingKeys.length; i2++) {
143988
+ childMapping[pendingKeys[i2]] = getValueForKey(pendingKeys[i2]);
143989
+ }
143990
+ return childMapping;
143991
+ }
143992
+ function getProp(child, prop, props) {
143993
+ return props[prop] != null ? props[prop] : child.props[prop];
143994
+ }
143995
+ function getInitialChildMapping(props, onExited) {
143996
+ return getChildMapping(props.children, function(child) {
143997
+ return cloneElement(child, {
143998
+ onExited: onExited.bind(null, child),
143999
+ in: true,
144000
+ appear: getProp(child, "appear", props),
144001
+ enter: getProp(child, "enter", props),
144002
+ exit: getProp(child, "exit", props)
144003
+ });
144004
+ });
144005
+ }
144006
+ function getNextChildMapping(nextProps, prevChildMapping, onExited) {
144007
+ var nextChildMapping = getChildMapping(nextProps.children);
144008
+ var children2 = mergeChildMappings(prevChildMapping, nextChildMapping);
144009
+ Object.keys(children2).forEach(function(key) {
144010
+ var child = children2[key];
144011
+ if (!isValidElement(child)) return;
144012
+ var hasPrev = key in prevChildMapping;
144013
+ var hasNext = key in nextChildMapping;
144014
+ var prevChild = prevChildMapping[key];
144015
+ var isLeaving = isValidElement(prevChild) && !prevChild.props.in;
144016
+ if (hasNext && (!hasPrev || isLeaving)) {
144017
+ children2[key] = cloneElement(child, {
144018
+ onExited: onExited.bind(null, child),
144019
+ in: true,
144020
+ exit: getProp(child, "exit", nextProps),
144021
+ enter: getProp(child, "enter", nextProps)
144022
+ });
144023
+ } else if (!hasNext && hasPrev && !isLeaving) {
144024
+ children2[key] = cloneElement(child, {
144025
+ in: false
144026
+ });
144027
+ } else if (hasNext && hasPrev && isValidElement(prevChild)) {
144028
+ children2[key] = cloneElement(child, {
144029
+ onExited: onExited.bind(null, child),
144030
+ in: prevChild.props.in,
144031
+ exit: getProp(child, "exit", nextProps),
144032
+ enter: getProp(child, "enter", nextProps)
144033
+ });
144034
+ }
144035
+ });
144036
+ return children2;
144037
+ }
144038
+ var values = Object.values || function(obj) {
144039
+ return Object.keys(obj).map(function(k) {
144040
+ return obj[k];
144041
+ });
144042
+ };
144043
+ var defaultProps = {
144044
+ component: "div",
144045
+ childFactory: function childFactory(child) {
144046
+ return child;
144047
+ }
144048
+ };
144049
+ var TransitionGroup = /* @__PURE__ */ function(_React$Component) {
144050
+ _inheritsLoose(TransitionGroup2, _React$Component);
144051
+ function TransitionGroup2(props, context) {
144052
+ var _this;
144053
+ _this = _React$Component.call(this, props, context) || this;
144054
+ var handleExited = _this.handleExited.bind(_assertThisInitialized(_this));
144055
+ _this.state = {
144056
+ contextValue: {
144057
+ isMounting: true
144058
+ },
144059
+ handleExited,
144060
+ firstRender: true
144061
+ };
144062
+ return _this;
144063
+ }
144064
+ var _proto = TransitionGroup2.prototype;
144065
+ _proto.componentDidMount = function componentDidMount() {
144066
+ this.mounted = true;
144067
+ this.setState({
144068
+ contextValue: {
144069
+ isMounting: false
144070
+ }
144071
+ });
144072
+ };
144073
+ _proto.componentWillUnmount = function componentWillUnmount() {
144074
+ this.mounted = false;
144075
+ };
144076
+ TransitionGroup2.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, _ref) {
144077
+ var prevChildMapping = _ref.children, handleExited = _ref.handleExited, firstRender = _ref.firstRender;
144078
+ return {
144079
+ children: firstRender ? getInitialChildMapping(nextProps, handleExited) : getNextChildMapping(nextProps, prevChildMapping, handleExited),
144080
+ firstRender: false
144081
+ };
144082
+ };
144083
+ _proto.handleExited = function handleExited(child, node2) {
144084
+ var currentChildMapping = getChildMapping(this.props.children);
144085
+ if (child.key in currentChildMapping) return;
144086
+ if (child.props.onExited) {
144087
+ child.props.onExited(node2);
144088
+ }
144089
+ if (this.mounted) {
144090
+ this.setState(function(state) {
144091
+ var children2 = _extends$1({}, state.children);
144092
+ delete children2[child.key];
144093
+ return {
144094
+ children: children2
144095
+ };
144096
+ });
144097
+ }
144098
+ };
144099
+ _proto.render = function render() {
144100
+ var _this$props = this.props, Component2 = _this$props.component, childFactory2 = _this$props.childFactory, props = _objectWithoutPropertiesLoose(_this$props, ["component", "childFactory"]);
144101
+ var contextValue = this.state.contextValue;
144102
+ var children2 = values(this.state.children).map(childFactory2);
144103
+ delete props.appear;
144104
+ delete props.enter;
144105
+ delete props.exit;
144106
+ if (Component2 === null) {
144107
+ return /* @__PURE__ */ React__default.createElement(TransitionGroupContext.Provider, {
144108
+ value: contextValue
144109
+ }, children2);
144110
+ }
144111
+ return /* @__PURE__ */ React__default.createElement(TransitionGroupContext.Provider, {
144112
+ value: contextValue
144113
+ }, /* @__PURE__ */ React__default.createElement(Component2, props, children2));
144114
+ };
144115
+ return TransitionGroup2;
144116
+ }(React__default.Component);
144117
+ TransitionGroup.propTypes = {
144118
+ /**
144119
+ * `<TransitionGroup>` renders a `<div>` by default. You can change this
144120
+ * behavior by providing a `component` prop.
144121
+ * If you use React v16+ and would like to avoid a wrapping `<div>` element
144122
+ * you can pass in `component={null}`. This is useful if the wrapping div
144123
+ * borks your css styles.
144124
+ */
144125
+ component: PropTypes.any,
144126
+ /**
144127
+ * A set of `<Transition>` components, that are toggled `in` and out as they
144128
+ * leave. the `<TransitionGroup>` will inject specific transition props, so
144129
+ * remember to spread them through if you are wrapping the `<Transition>` as
144130
+ * with our `<Fade>` example.
144131
+ *
144132
+ * While this component is meant for multiple `Transition` or `CSSTransition`
144133
+ * children, sometimes you may want to have a single transition child with
144134
+ * content that you want to be transitioned out and in when you change it
144135
+ * (e.g. routes, images etc.) In that case you can change the `key` prop of
144136
+ * the transition child as you change its content, this will cause
144137
+ * `TransitionGroup` to transition the child out and back in.
144138
+ */
144139
+ children: PropTypes.node,
144140
+ /**
144141
+ * A convenience prop that enables or disables appear animations
144142
+ * for all children. Note that specifying this will override any defaults set
144143
+ * on individual children Transitions.
144144
+ */
144145
+ appear: PropTypes.bool,
144146
+ /**
144147
+ * A convenience prop that enables or disables enter animations
144148
+ * for all children. Note that specifying this will override any defaults set
144149
+ * on individual children Transitions.
144150
+ */
144151
+ enter: PropTypes.bool,
144152
+ /**
144153
+ * A convenience prop that enables or disables exit animations
144154
+ * for all children. Note that specifying this will override any defaults set
144155
+ * on individual children Transitions.
144156
+ */
144157
+ exit: PropTypes.bool,
144158
+ /**
144159
+ * You may need to apply reactive updates to a child as it is exiting.
144160
+ * This is generally done by using `cloneElement` however in the case of an exiting
144161
+ * child the element has already been removed and not accessible to the consumer.
144162
+ *
144163
+ * If you do need to update a child as it leaves you can provide a `childFactory`
144164
+ * to wrap every child, even the ones that are leaving.
144165
+ *
144166
+ * @type Function(child: ReactElement) -> ReactElement
144167
+ */
144168
+ childFactory: PropTypes.func
144169
+ };
144170
+ TransitionGroup.defaultProps = defaultProps;
144171
+ const UNINITIALIZED = {};
144172
+ function useLazyRef(init, initArg) {
144173
+ const ref = React.useRef(UNINITIALIZED);
144174
+ if (ref.current === UNINITIALIZED) {
144175
+ ref.current = init(initArg);
144176
+ }
144177
+ return ref;
144178
+ }
144179
+ const EMPTY = [];
144180
+ function useOnMount(fn) {
144181
+ React.useEffect(fn, EMPTY);
144182
+ }
144183
+ class Timeout {
144184
+ constructor() {
144185
+ __publicField(this, "currentId", null);
144186
+ __publicField(this, "clear", () => {
144187
+ if (this.currentId !== null) {
144188
+ clearTimeout(this.currentId);
144189
+ this.currentId = null;
144190
+ }
144191
+ });
144192
+ __publicField(this, "disposeEffect", () => {
144193
+ return this.clear;
144194
+ });
144195
+ }
144196
+ static create() {
144197
+ return new Timeout();
144198
+ }
144199
+ /**
144200
+ * Executes `fn` after `delay`, clearing any previously scheduled call.
144201
+ */
144202
+ start(delay, fn) {
144203
+ this.clear();
144204
+ this.currentId = setTimeout(() => {
144205
+ this.currentId = null;
144206
+ fn();
144207
+ }, delay);
144208
+ }
144209
+ }
144210
+ function useTimeout() {
144211
+ const timeout2 = useLazyRef(Timeout.create).current;
144212
+ useOnMount(timeout2.disposeEffect);
144213
+ return timeout2;
144214
+ }
144215
+ function isClassComponent(elementType) {
144216
+ const {
144217
+ prototype = {}
144218
+ } = elementType;
144219
+ return Boolean(prototype.isReactComponent);
144220
+ }
144221
+ function elementTypeAcceptingRef(props, propName, componentName, location, propFullName) {
144222
+ const propValue = props[propName];
144223
+ const safePropName = propFullName || propName;
144224
+ if (propValue == null || // When server-side rendering React doesn't warn either.
144225
+ // This is not an accurate check for SSR.
144226
+ // This is only in place for emotion compat.
144227
+ // TODO: Revisit once https://github.com/facebook/react/issues/20047 is resolved.
144228
+ typeof window === "undefined") {
144229
+ return null;
144230
+ }
144231
+ let warningHint;
144232
+ if (typeof propValue === "function" && !isClassComponent(propValue)) {
144233
+ warningHint = "Did you accidentally provide a plain function component instead?";
144234
+ }
144235
+ if (warningHint !== void 0) {
144236
+ return new Error(`Invalid ${location} \`${safePropName}\` supplied to \`${componentName}\`. Expected an element type that can hold a ref. ${warningHint} For more information see https://mui.com/r/caveat-with-refs-guide`);
144237
+ }
144238
+ return null;
144239
+ }
144240
+ const elementTypeAcceptingRef$1 = chainPropTypes(PropTypes.elementType, elementTypeAcceptingRef);
144234
144241
  function getTypeByValue(value) {
144235
144242
  const valueType = typeof value;
144236
144243
  switch (valueType) {
@@ -153366,6 +153373,7 @@ function Legend(props) {
153366
153373
  positionRelative = false,
153367
153374
  highContrast = false,
153368
153375
  obsType,
153376
+ isPointsLayer = false,
153369
153377
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
153370
153378
  featureType: _featureType = void 0,
153371
153379
  // Unused but accepted for API compatibility
@@ -153373,6 +153381,9 @@ function Legend(props) {
153373
153381
  considerSelections = true,
153374
153382
  obsColorEncoding,
153375
153383
  featureSelection,
153384
+ featureFilterMode,
153385
+ featureColor,
153386
+ featureIndex,
153376
153387
  featureLabelsMap,
153377
153388
  featureValueColormap,
153378
153389
  featureValueColormapRange,
@@ -153416,15 +153427,95 @@ function Legend(props) {
153416
153427
  debouncedSetRange(rangeValue);
153417
153428
  }
153418
153429
  }, [debouncedSetRange]);
153430
+ const obsLabel = capitalize$2(obsType ?? null);
153419
153431
  const isDarkTheme = theme === "dark";
153420
- const isStaticColor = obsColorEncoding === "spatialChannelColor" || obsColorEncoding === "spatialLayerColor";
153421
- const isSetColor = obsColorEncoding === "cellSetSelection";
153432
+ const isStaticColor = !isPointsLayer && (obsColorEncoding === "spatialChannelColor" || obsColorEncoding === "spatialLayerColor");
153433
+ const isSetColor = !isPointsLayer && obsColorEncoding === "cellSetSelection";
153422
153434
  const layerColor = Array.isArray(spatialLayerColor) && spatialLayerColor.length === 3 ? spatialLayerColor : getDefaultColor(theme ?? "light");
153423
153435
  const channelColor = Array.isArray(spatialChannelColor) && spatialChannelColor.length === 3 ? spatialChannelColor : getDefaultColor(theme ?? "light");
153424
153436
  const staticColor = obsColorEncoding === "spatialChannelColor" ? channelColor : layerColor;
153425
- const visible = visibleProp && (!considerSelections || ["geneSelection", "geneExpression"].includes(obsColorEncoding ?? "") && featureSelection && Array.isArray(featureSelection) && featureSelection.length >= 1 || isSetColor && ((obsSetSelection == null ? void 0 : obsSetSelection.length) ?? 0) > 0 && ((obsSetColor == null ? void 0 : obsSetColor.length) ?? 0) > 0 || isStaticColor);
153437
+ const visible = visibleProp && (!considerSelections || ["geneSelection", "geneExpression"].includes(obsColorEncoding ?? "") && featureSelection && Array.isArray(featureSelection) && featureSelection.length >= 1 || isSetColor && ((obsSetSelection == null ? void 0 : obsSetSelection.length) ?? 0) > 0 && ((obsSetColor == null ? void 0 : obsSetColor.length) ?? 0) > 0 || isStaticColor || isPointsLayer);
153438
+ const pointsLegendElements = [];
153439
+ if (isPointsLayer) {
153440
+ const MAX_NUM_COLORS = 10;
153441
+ const hasFeatureSelection = Array.isArray(featureSelection) && featureSelection.length > 0;
153442
+ const showUnselected = featureFilterMode !== "featureSelection";
153443
+ if (obsColorEncoding === "spatialLayerColor") {
153444
+ if (!hasFeatureSelection) {
153445
+ pointsLegendElements.push({
153446
+ name: obsLabel,
153447
+ color: staticColor
153448
+ });
153449
+ } else {
153450
+ const limitedFeatureSelection = featureSelection.slice(0, MAX_NUM_COLORS);
153451
+ limitedFeatureSelection.forEach((featureName) => {
153452
+ pointsLegendElements.push({
153453
+ name: featureName,
153454
+ color: staticColor
153455
+ });
153456
+ });
153457
+ }
153458
+ } else if (obsColorEncoding === "geneSelection") {
153459
+ if (!hasFeatureSelection) {
153460
+ pointsLegendElements.push({
153461
+ name: obsLabel,
153462
+ color: staticColor
153463
+ });
153464
+ } else {
153465
+ const limitedFeatureSelection = featureSelection.slice(0, MAX_NUM_COLORS);
153466
+ limitedFeatureSelection.forEach((featureName) => {
153467
+ var _a3;
153468
+ const featureColorMatch = Array.isArray(featureColor) ? (_a3 = featureColor.find((fc) => fc.name === featureName)) == null ? void 0 : _a3.color : null;
153469
+ pointsLegendElements.push({
153470
+ name: featureName,
153471
+ // If no color is specified for this feature, use staticColor.
153472
+ color: featureColorMatch ?? staticColor
153473
+ });
153474
+ });
153475
+ }
153476
+ } else if (obsColorEncoding === "randomByFeature") {
153477
+ if (!hasFeatureSelection) {
153478
+ pointsLegendElements.push({
153479
+ name: obsLabel,
153480
+ // For now, using black and white for this.
153481
+ // (It should not match any color in PALETTE)
153482
+ color: isDarkTheme ? [255, 255, 255] : [0, 0, 0]
153483
+ });
153484
+ } else {
153485
+ const limitedFeatureSelection = featureSelection.slice(0, MAX_NUM_COLORS);
153486
+ limitedFeatureSelection.forEach((featureName) => {
153487
+ const varIndex = (featureIndex ?? []).indexOf(featureName);
153488
+ const featureColorMatch = varIndex >= 0 ? PALETTE[varIndex % PALETTE.length] : null;
153489
+ pointsLegendElements.push({
153490
+ name: featureName,
153491
+ // If no color is specified for this feature, use staticColor.
153492
+ color: featureColorMatch ?? staticColor
153493
+ });
153494
+ });
153495
+ }
153496
+ } else if (obsColorEncoding === "random") {
153497
+ pointsLegendElements.push({
153498
+ name: obsLabel,
153499
+ // For now, using black and white for this.
153500
+ // (It should not match any color in PALETTE)
153501
+ color: isDarkTheme ? [255, 255, 255] : [0, 0, 0]
153502
+ });
153503
+ }
153504
+ if (showUnselected) {
153505
+ pointsLegendElements.push({
153506
+ name: "Unselected",
153507
+ color: getDefaultColor(theme ?? "light")
153508
+ });
153509
+ }
153510
+ }
153426
153511
  const levelZeroNames = useMemo(() => Array.from(new Set((obsSetSelection == null ? void 0 : obsSetSelection.map((setPath) => setPath[0])) || [])), [obsSetSelection]);
153427
- const dynamicHeight = isSetColor && obsSetSelection ? levelZeroNames.length * titleHeight + ((obsSetSelection == null ? void 0 : obsSetSelection.length) ?? 0) * (rectHeight + rectMarginY) : height2 + (!pointsVisible && contoursVisible ? 25 : 0);
153512
+ const dynamicHeight = isPointsLayer ? (
153513
+ // Height logic for points layers.
153514
+ pointsLegendElements.length * (rectHeight + rectMarginY) + titleHeight
153515
+ ) : (
153516
+ // Height logic for non-points layers.
153517
+ isSetColor && obsSetSelection ? levelZeroNames.length * titleHeight + ((obsSetSelection == null ? void 0 : obsSetSelection.length) ?? 0) * (rectHeight + rectMarginY) : height2 + (!pointsVisible && contoursVisible ? 25 : 0)
153518
+ );
153428
153519
  const availHeight = maxHeight2 !== null ? Math.max(0, maxHeight2 - 4) : Infinity;
153429
153520
  const needsScroll = Number.isFinite(availHeight) && dynamicHeight > availHeight + 1;
153430
153521
  useEffect(() => {
@@ -153436,8 +153527,8 @@ function Legend(props) {
153436
153527
  svg.selectAll("g").remove();
153437
153528
  svg.attr("width", width2).attr("height", dynamicHeight);
153438
153529
  const g2 = svg.append("g").attr("width", width2).attr("height", dynamicHeight);
153439
- const showInteractiveSlider2 = setFeatureValueColormapRange && ["geneSelection", "geneExpression"].includes(obsColorEncoding ?? "") && pointsVisible && featureValueColormap;
153440
- if (!considerSelections || ["geneSelection", "geneExpression"].includes(obsColorEncoding ?? "")) {
153530
+ const showInteractiveSlider2 = !isPointsLayer && setFeatureValueColormapRange && ["geneSelection", "geneExpression"].includes(obsColorEncoding ?? "") && pointsVisible && featureValueColormap;
153531
+ if (!isPointsLayer && (!considerSelections || ["geneSelection", "geneExpression"].includes(obsColorEncoding ?? ""))) {
153441
153532
  const combinedExtent = combineExtents(extent2 ?? null, featureAggregationStrategy ?? null) || [0, 1];
153442
153533
  const [xMin, xMax] = combinedExtent;
153443
153534
  if (featureValueColormap && pointsVisible) {
@@ -153497,10 +153588,10 @@ function Legend(props) {
153497
153588
  });
153498
153589
  }
153499
153590
  }
153500
- if (isStaticColor) {
153501
- g2.append("rect").attr("x", 0).attr("y", titleHeight).attr("width", width2).attr("height", rectHeight).attr("fill", `rgb(${staticColor[0]},${staticColor[1]},${staticColor[2]})`);
153591
+ if (!isPointsLayer && isStaticColor) {
153592
+ g2.append("rect").attr("x", 0).attr("y", titleHeight).attr("width", width2 - 4).attr("height", rectHeight).attr("fill", `rgb(${staticColor[0]},${staticColor[1]},${staticColor[2]})`);
153502
153593
  }
153503
- if (isSetColor && obsSetSelection && obsSetColor) {
153594
+ if (!isPointsLayer && isSetColor && obsSetSelection && obsSetColor) {
153504
153595
  const obsSetSelectionByLevelZero = {};
153505
153596
  obsSetSelection.forEach((setPath) => {
153506
153597
  const levelZeroName = setPath[0];
@@ -153522,6 +153613,16 @@ function Legend(props) {
153522
153613
  });
153523
153614
  });
153524
153615
  }
153616
+ if (isPointsLayer) {
153617
+ let y = 0;
153618
+ g2.append("text").attr("text-anchor", "start").attr("dominant-baseline", "hanging").attr("x", 0).attr("y", y).text("Points").style("font-size", "9px").style("fill", foregroundColor);
153619
+ y += titleHeight;
153620
+ pointsLegendElements.forEach(({ name: name2, color: color2 }) => {
153621
+ g2.append("rect").attr("x", 0).attr("y", y).attr("width", rectHeight).attr("height", rectHeight).attr("fill", `rgb(${color2[0]},${color2[1]},${color2[2]})`);
153622
+ g2.append("text").attr("text-anchor", "start").attr("dominant-baseline", "hanging").attr("x", rectHeight + rectMarginX).attr("y", y).text(name2).style("font-size", "9px").style("fill", foregroundColor);
153623
+ y += rectHeight + rectMarginY;
153624
+ });
153625
+ }
153525
153626
  const featureSelectionLabelRaw = featureSelection && featureSelection.length >= 1 && !isStaticColor ? featureSelection.map((geneName) => (featureLabelsMap == null ? void 0 : featureLabelsMap.get(geneName)) || (featureLabelsMap == null ? void 0 : featureLabelsMap.get(cleanFeatureId(geneName))) || geneName) : null;
153526
153627
  let featureSelectionLabelRawStr = "";
153527
153628
  if (featureAggregationStrategy === "first") {
@@ -153532,23 +153633,30 @@ function Legend(props) {
153532
153633
  const i2 = featureAggregationStrategy;
153533
153634
  featureSelectionLabelRawStr = featureSelectionLabelRaw == null ? void 0 : featureSelectionLabelRaw[i2];
153534
153635
  } else if (featureAggregationStrategy === "sum") {
153535
- featureSelectionLabelRawStr = "Sum of features";
153636
+ if (Array.isArray(featureSelection) && featureSelection.length === 1) {
153637
+ featureSelectionLabelRawStr = featureSelectionLabelRaw == null ? void 0 : featureSelectionLabelRaw[0];
153638
+ } else {
153639
+ featureSelectionLabelRawStr = "Sum of features";
153640
+ }
153536
153641
  } else if (featureAggregationStrategy === "mean") {
153537
- featureSelectionLabelRawStr = "Mean of features";
153642
+ if (Array.isArray(featureSelection) && featureSelection.length === 1) {
153643
+ featureSelectionLabelRawStr = featureSelectionLabelRaw == null ? void 0 : featureSelectionLabelRaw[0];
153644
+ } else {
153645
+ featureSelectionLabelRawStr = "Mean of features";
153646
+ }
153538
153647
  } else {
153539
153648
  featureSelectionLabelRawStr = featureSelectionLabelRaw == null ? void 0 : featureSelectionLabelRaw[0];
153540
153649
  }
153541
153650
  const combinedMissing = combineMissings(missing ?? null, featureAggregationStrategy ?? null);
153542
153651
  const featureSelectionLabel = combinedMissing ? `${featureSelectionLabelRawStr} (${Math.round(combinedMissing * 100)}% NaN)` : featureSelectionLabelRawStr;
153543
- const obsLabel = capitalize$2(obsType ?? null);
153544
153652
  const featureLabel = considerSelections ? featureSelectionLabel || capitalize$2(featureValueType ?? null) : capitalize$2(featureValueType ?? null);
153545
153653
  const mainLabel = showObsLabel ? obsLabel : featureLabel;
153546
153654
  const subLabel = showObsLabel ? featureLabel : null;
153547
153655
  const hasSubLabel = subLabel !== null;
153548
- if (!isSetColor) {
153656
+ if (!isPointsLayer && !isSetColor) {
153549
153657
  g2.append("text").attr("text-anchor", hasSubLabel ? "start" : "end").attr("dominant-baseline", "hanging").attr("x", hasSubLabel ? 0 : width2 - 4).attr("y", 0).text(mainLabel ?? "").style("font-size", "10px").style("fill", foregroundColor);
153550
153658
  if (hasSubLabel) {
153551
- g2.append("text").attr("text-anchor", "end").attr("dominant-baseline", "hanging").attr("x", width2).attr("y", titleHeight + rectHeight).text(subLabel ?? "").style("font-size", "9px").style("fill", foregroundColor);
153659
+ g2.append("text").attr("text-anchor", "end").attr("dominant-baseline", "hanging").attr("x", width2 - 5).attr("y", titleHeight + rectHeight).text(subLabel ?? "").style("font-size", "9px").style("fill", foregroundColor);
153552
153660
  }
153553
153661
  }
153554
153662
  }, [
@@ -153584,7 +153692,7 @@ function Legend(props) {
153584
153692
  showObsLabel,
153585
153693
  staticColor
153586
153694
  ]);
153587
- const showInteractiveSlider = setFeatureValueColormapRange && ["geneSelection", "geneExpression"].includes(obsColorEncoding ?? "") && pointsVisible && featureValueColormap;
153695
+ const showInteractiveSlider = !isPointsLayer && setFeatureValueColormapRange && ["geneSelection", "geneExpression"].includes(obsColorEncoding ?? "") && pointsVisible && featureValueColormap;
153588
153696
  const globalExtent = useMemo(() => {
153589
153697
  const combined = combineExtents(extent2 ?? null, featureAggregationStrategy ?? null);
153590
153698
  return combined || [0, 1];
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { D, E } from "./index-BgrJUaQb.js";
1
+ import { D, E } from "./index-Bxpb2AKZ.js";
2
2
  export {
3
3
  D as DualEmbeddingScatterplotSubscriber,
4
4
  E as EmbeddingScatterplotSubscriber
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-BgrJUaQb.js";
1
+ import { B as BaseDecoder } from "./index-Bxpb2AKZ.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-BgrJUaQb.js";
2
+ import { g as getDefaultExportFromCjs, B as BaseDecoder } from "./index-Bxpb2AKZ.js";
3
3
  const LercParameters = {
4
4
  AddCompression: 1
5
5
  };
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-BgrJUaQb.js";
1
+ import { B as BaseDecoder } from "./index-Bxpb2AKZ.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-BgrJUaQb.js";
1
+ import { B as BaseDecoder } from "./index-Bxpb2AKZ.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-BgrJUaQb.js";
1
+ import { B as BaseDecoder } from "./index-Bxpb2AKZ.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-BgrJUaQb.js";
1
+ import { B as BaseDecoder } from "./index-Bxpb2AKZ.js";
2
2
  class WebImageDecoder extends BaseDecoder {
3
3
  constructor() {
4
4
  super();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitessce/scatterplot-embedding",
3
- "version": "3.8.10",
3
+ "version": "3.9.0",
4
4
  "author": "HIDIVE Lab at HMS",
5
5
  "homepage": "http://vitessce.io",
6
6
  "repository": {
@@ -20,13 +20,13 @@
20
20
  "lodash-es": "^4.17.21",
21
21
  "react-aria": "^3.28.0",
22
22
  "@turf/circle": "^7.2.0",
23
- "@vitessce/styles": "3.8.10",
24
- "@vitessce/constants-internal": "3.8.10",
25
- "@vitessce/legend": "3.8.10",
26
- "@vitessce/scatterplot": "3.8.10",
27
- "@vitessce/sets-utils": "3.8.10",
28
- "@vitessce/utils": "3.8.10",
29
- "@vitessce/vit-s": "3.8.10"
23
+ "@vitessce/styles": "3.9.0",
24
+ "@vitessce/constants-internal": "3.9.0",
25
+ "@vitessce/legend": "3.9.0",
26
+ "@vitessce/scatterplot": "3.9.0",
27
+ "@vitessce/sets-utils": "3.9.0",
28
+ "@vitessce/utils": "3.9.0",
29
+ "@vitessce/vit-s": "3.9.0"
30
30
  },
31
31
  "devDependencies": {
32
32
  "react": "18.3.1",