@vitessce/scatterplot-embedding 3.8.10 → 3.8.13

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-BK98jzeZ.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
  }
@@ -9910,6 +9910,8 @@ const CoordinationType$1 = {
9910
9910
  // Per-spatial-layer
9911
9911
  SPATIAL_MAX_RESOLUTION: "spatialMaxResolution",
9912
9912
  // Per-image-channel (for spatial-accelerated)
9913
+ SPATIAL_LOD_FACTOR: "spatialLodFactor",
9914
+ // LOD factor for 3D volume rendering
9913
9915
  // For clipping plane sliders
9914
9916
  SPATIAL_SLICE_X: "spatialSliceX",
9915
9917
  SPATIAL_SLICE_Y: "spatialSliceY",
@@ -123401,22 +123403,22 @@ function addDecoder(cases, importFn) {
123401
123403
  }
123402
123404
  cases.forEach((c2) => registry$1.set(c2, importFn));
123403
123405
  }
123404
- addDecoder([void 0, 1], () => import("./raw-BJDJq5QK.js").then((m2) => m2.default));
123405
- addDecoder(5, () => import("./lzw-BwAlpbiv.js").then((m2) => m2.default));
123406
+ addDecoder([void 0, 1], () => import("./raw-CDyxv3KP.js").then((m2) => m2.default));
123407
+ addDecoder(5, () => import("./lzw--H4kL7kE.js").then((m2) => m2.default));
123406
123408
  addDecoder(6, () => {
123407
123409
  throw new Error("old style JPEG compression is not supported.");
123408
123410
  });
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));
123411
+ addDecoder(7, () => import("./jpeg-Ci-wqRKm.js").then((m2) => m2.default));
123412
+ addDecoder([8, 32946], () => import("./deflate-ClaAmriP.js").then((m2) => m2.default));
123413
+ addDecoder(32773, () => import("./packbits-zSU7Xz9P.js").then((m2) => m2.default));
123412
123414
  addDecoder(
123413
123415
  34887,
123414
- () => import("./lerc-LFwYjack.js").then(async (m2) => {
123416
+ () => import("./lerc-S2pXAGyz.js").then(async (m2) => {
123415
123417
  await m2.zstd.init();
123416
123418
  return m2;
123417
123419
  }).then((m2) => m2.default)
123418
123420
  );
123419
- addDecoder(50001, () => import("./webimage-6o_3zIHO.js").then((m2) => m2.default));
123421
+ addDecoder(50001, () => import("./webimage-dTZh6fML.js").then((m2) => m2.default));
123420
123422
  function decodeRowAcc(row, stride) {
123421
123423
  let length2 = row.length - stride;
123422
123424
  let offset2 = 0;
@@ -143466,11 +143468,6 @@ const { tss } = createTss({
143466
143468
  "usePlugin": useMuiThemeStyleOverridesPlugin
143467
143469
  });
143468
143470
  const useStyles$4 = tss.create({});
143469
- function chainPropTypes(propType1, propType2) {
143470
- return function validate2(...args) {
143471
- return propType1(...args) || propType2(...args);
143472
- };
143473
- }
143474
143471
  const memoTheme = unstable_memoTheme;
143475
143472
  ({
143476
143473
  // ┌────────────────────────────── Warning ──────────────────────────────┐
@@ -143489,332 +143486,6 @@ const memoTheme = unstable_memoTheme;
143489
143486
  function useDefaultProps(params) {
143490
143487
  return useDefaultProps$1(params);
143491
143488
  }
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
143489
  function getSvgIconUtilityClass(slot) {
143819
143490
  return generateUtilityClass("MuiSvgIcon", slot);
143820
143491
  }
@@ -144231,6 +143902,337 @@ function mergeSlotProps$1(externalSlotProps, defaultSlotProps) {
144231
143902
  }
144232
143903
  };
144233
143904
  }
143905
+ function chainPropTypes(propType1, propType2) {
143906
+ return function validate2(...args) {
143907
+ return propType1(...args) || propType2(...args);
143908
+ };
143909
+ }
143910
+ function _extends$1() {
143911
+ return _extends$1 = Object.assign ? Object.assign.bind() : function(n2) {
143912
+ for (var e3 = 1; e3 < arguments.length; e3++) {
143913
+ var t = arguments[e3];
143914
+ for (var r2 in t) ({}).hasOwnProperty.call(t, r2) && (n2[r2] = t[r2]);
143915
+ }
143916
+ return n2;
143917
+ }, _extends$1.apply(null, arguments);
143918
+ }
143919
+ function _objectWithoutPropertiesLoose(r2, e3) {
143920
+ if (null == r2) return {};
143921
+ var t = {};
143922
+ for (var n2 in r2) if ({}.hasOwnProperty.call(r2, n2)) {
143923
+ if (-1 !== e3.indexOf(n2)) continue;
143924
+ t[n2] = r2[n2];
143925
+ }
143926
+ return t;
143927
+ }
143928
+ function _setPrototypeOf(t, e3) {
143929
+ return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t2, e4) {
143930
+ return t2.__proto__ = e4, t2;
143931
+ }, _setPrototypeOf(t, e3);
143932
+ }
143933
+ function _inheritsLoose(t, o2) {
143934
+ t.prototype = Object.create(o2.prototype), t.prototype.constructor = t, _setPrototypeOf(t, o2);
143935
+ }
143936
+ const TransitionGroupContext = React__default.createContext(null);
143937
+ function _assertThisInitialized(e3) {
143938
+ if (void 0 === e3) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
143939
+ return e3;
143940
+ }
143941
+ function getChildMapping(children2, mapFn) {
143942
+ var mapper = function mapper2(child) {
143943
+ return mapFn && isValidElement(child) ? mapFn(child) : child;
143944
+ };
143945
+ var result = /* @__PURE__ */ Object.create(null);
143946
+ if (children2) Children.map(children2, function(c2) {
143947
+ return c2;
143948
+ }).forEach(function(child) {
143949
+ result[child.key] = mapper(child);
143950
+ });
143951
+ return result;
143952
+ }
143953
+ function mergeChildMappings(prev2, next2) {
143954
+ prev2 = prev2 || {};
143955
+ next2 = next2 || {};
143956
+ function getValueForKey(key) {
143957
+ return key in next2 ? next2[key] : prev2[key];
143958
+ }
143959
+ var nextKeysPending = /* @__PURE__ */ Object.create(null);
143960
+ var pendingKeys = [];
143961
+ for (var prevKey in prev2) {
143962
+ if (prevKey in next2) {
143963
+ if (pendingKeys.length) {
143964
+ nextKeysPending[prevKey] = pendingKeys;
143965
+ pendingKeys = [];
143966
+ }
143967
+ } else {
143968
+ pendingKeys.push(prevKey);
143969
+ }
143970
+ }
143971
+ var i2;
143972
+ var childMapping = {};
143973
+ for (var nextKey in next2) {
143974
+ if (nextKeysPending[nextKey]) {
143975
+ for (i2 = 0; i2 < nextKeysPending[nextKey].length; i2++) {
143976
+ var pendingNextKey = nextKeysPending[nextKey][i2];
143977
+ childMapping[nextKeysPending[nextKey][i2]] = getValueForKey(pendingNextKey);
143978
+ }
143979
+ }
143980
+ childMapping[nextKey] = getValueForKey(nextKey);
143981
+ }
143982
+ for (i2 = 0; i2 < pendingKeys.length; i2++) {
143983
+ childMapping[pendingKeys[i2]] = getValueForKey(pendingKeys[i2]);
143984
+ }
143985
+ return childMapping;
143986
+ }
143987
+ function getProp(child, prop, props) {
143988
+ return props[prop] != null ? props[prop] : child.props[prop];
143989
+ }
143990
+ function getInitialChildMapping(props, onExited) {
143991
+ return getChildMapping(props.children, function(child) {
143992
+ return cloneElement(child, {
143993
+ onExited: onExited.bind(null, child),
143994
+ in: true,
143995
+ appear: getProp(child, "appear", props),
143996
+ enter: getProp(child, "enter", props),
143997
+ exit: getProp(child, "exit", props)
143998
+ });
143999
+ });
144000
+ }
144001
+ function getNextChildMapping(nextProps, prevChildMapping, onExited) {
144002
+ var nextChildMapping = getChildMapping(nextProps.children);
144003
+ var children2 = mergeChildMappings(prevChildMapping, nextChildMapping);
144004
+ Object.keys(children2).forEach(function(key) {
144005
+ var child = children2[key];
144006
+ if (!isValidElement(child)) return;
144007
+ var hasPrev = key in prevChildMapping;
144008
+ var hasNext = key in nextChildMapping;
144009
+ var prevChild = prevChildMapping[key];
144010
+ var isLeaving = isValidElement(prevChild) && !prevChild.props.in;
144011
+ if (hasNext && (!hasPrev || isLeaving)) {
144012
+ children2[key] = cloneElement(child, {
144013
+ onExited: onExited.bind(null, child),
144014
+ in: true,
144015
+ exit: getProp(child, "exit", nextProps),
144016
+ enter: getProp(child, "enter", nextProps)
144017
+ });
144018
+ } else if (!hasNext && hasPrev && !isLeaving) {
144019
+ children2[key] = cloneElement(child, {
144020
+ in: false
144021
+ });
144022
+ } else if (hasNext && hasPrev && isValidElement(prevChild)) {
144023
+ children2[key] = cloneElement(child, {
144024
+ onExited: onExited.bind(null, child),
144025
+ in: prevChild.props.in,
144026
+ exit: getProp(child, "exit", nextProps),
144027
+ enter: getProp(child, "enter", nextProps)
144028
+ });
144029
+ }
144030
+ });
144031
+ return children2;
144032
+ }
144033
+ var values = Object.values || function(obj) {
144034
+ return Object.keys(obj).map(function(k) {
144035
+ return obj[k];
144036
+ });
144037
+ };
144038
+ var defaultProps = {
144039
+ component: "div",
144040
+ childFactory: function childFactory(child) {
144041
+ return child;
144042
+ }
144043
+ };
144044
+ var TransitionGroup = /* @__PURE__ */ function(_React$Component) {
144045
+ _inheritsLoose(TransitionGroup2, _React$Component);
144046
+ function TransitionGroup2(props, context) {
144047
+ var _this;
144048
+ _this = _React$Component.call(this, props, context) || this;
144049
+ var handleExited = _this.handleExited.bind(_assertThisInitialized(_this));
144050
+ _this.state = {
144051
+ contextValue: {
144052
+ isMounting: true
144053
+ },
144054
+ handleExited,
144055
+ firstRender: true
144056
+ };
144057
+ return _this;
144058
+ }
144059
+ var _proto = TransitionGroup2.prototype;
144060
+ _proto.componentDidMount = function componentDidMount() {
144061
+ this.mounted = true;
144062
+ this.setState({
144063
+ contextValue: {
144064
+ isMounting: false
144065
+ }
144066
+ });
144067
+ };
144068
+ _proto.componentWillUnmount = function componentWillUnmount() {
144069
+ this.mounted = false;
144070
+ };
144071
+ TransitionGroup2.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, _ref) {
144072
+ var prevChildMapping = _ref.children, handleExited = _ref.handleExited, firstRender = _ref.firstRender;
144073
+ return {
144074
+ children: firstRender ? getInitialChildMapping(nextProps, handleExited) : getNextChildMapping(nextProps, prevChildMapping, handleExited),
144075
+ firstRender: false
144076
+ };
144077
+ };
144078
+ _proto.handleExited = function handleExited(child, node2) {
144079
+ var currentChildMapping = getChildMapping(this.props.children);
144080
+ if (child.key in currentChildMapping) return;
144081
+ if (child.props.onExited) {
144082
+ child.props.onExited(node2);
144083
+ }
144084
+ if (this.mounted) {
144085
+ this.setState(function(state) {
144086
+ var children2 = _extends$1({}, state.children);
144087
+ delete children2[child.key];
144088
+ return {
144089
+ children: children2
144090
+ };
144091
+ });
144092
+ }
144093
+ };
144094
+ _proto.render = function render() {
144095
+ var _this$props = this.props, Component2 = _this$props.component, childFactory2 = _this$props.childFactory, props = _objectWithoutPropertiesLoose(_this$props, ["component", "childFactory"]);
144096
+ var contextValue = this.state.contextValue;
144097
+ var children2 = values(this.state.children).map(childFactory2);
144098
+ delete props.appear;
144099
+ delete props.enter;
144100
+ delete props.exit;
144101
+ if (Component2 === null) {
144102
+ return /* @__PURE__ */ React__default.createElement(TransitionGroupContext.Provider, {
144103
+ value: contextValue
144104
+ }, children2);
144105
+ }
144106
+ return /* @__PURE__ */ React__default.createElement(TransitionGroupContext.Provider, {
144107
+ value: contextValue
144108
+ }, /* @__PURE__ */ React__default.createElement(Component2, props, children2));
144109
+ };
144110
+ return TransitionGroup2;
144111
+ }(React__default.Component);
144112
+ TransitionGroup.propTypes = {
144113
+ /**
144114
+ * `<TransitionGroup>` renders a `<div>` by default. You can change this
144115
+ * behavior by providing a `component` prop.
144116
+ * If you use React v16+ and would like to avoid a wrapping `<div>` element
144117
+ * you can pass in `component={null}`. This is useful if the wrapping div
144118
+ * borks your css styles.
144119
+ */
144120
+ component: PropTypes.any,
144121
+ /**
144122
+ * A set of `<Transition>` components, that are toggled `in` and out as they
144123
+ * leave. the `<TransitionGroup>` will inject specific transition props, so
144124
+ * remember to spread them through if you are wrapping the `<Transition>` as
144125
+ * with our `<Fade>` example.
144126
+ *
144127
+ * While this component is meant for multiple `Transition` or `CSSTransition`
144128
+ * children, sometimes you may want to have a single transition child with
144129
+ * content that you want to be transitioned out and in when you change it
144130
+ * (e.g. routes, images etc.) In that case you can change the `key` prop of
144131
+ * the transition child as you change its content, this will cause
144132
+ * `TransitionGroup` to transition the child out and back in.
144133
+ */
144134
+ children: PropTypes.node,
144135
+ /**
144136
+ * A convenience prop that enables or disables appear animations
144137
+ * for all children. Note that specifying this will override any defaults set
144138
+ * on individual children Transitions.
144139
+ */
144140
+ appear: PropTypes.bool,
144141
+ /**
144142
+ * A convenience prop that enables or disables enter animations
144143
+ * for all children. Note that specifying this will override any defaults set
144144
+ * on individual children Transitions.
144145
+ */
144146
+ enter: PropTypes.bool,
144147
+ /**
144148
+ * A convenience prop that enables or disables exit animations
144149
+ * for all children. Note that specifying this will override any defaults set
144150
+ * on individual children Transitions.
144151
+ */
144152
+ exit: PropTypes.bool,
144153
+ /**
144154
+ * You may need to apply reactive updates to a child as it is exiting.
144155
+ * This is generally done by using `cloneElement` however in the case of an exiting
144156
+ * child the element has already been removed and not accessible to the consumer.
144157
+ *
144158
+ * If you do need to update a child as it leaves you can provide a `childFactory`
144159
+ * to wrap every child, even the ones that are leaving.
144160
+ *
144161
+ * @type Function(child: ReactElement) -> ReactElement
144162
+ */
144163
+ childFactory: PropTypes.func
144164
+ };
144165
+ TransitionGroup.defaultProps = defaultProps;
144166
+ const UNINITIALIZED = {};
144167
+ function useLazyRef(init, initArg) {
144168
+ const ref = React.useRef(UNINITIALIZED);
144169
+ if (ref.current === UNINITIALIZED) {
144170
+ ref.current = init(initArg);
144171
+ }
144172
+ return ref;
144173
+ }
144174
+ const EMPTY = [];
144175
+ function useOnMount(fn) {
144176
+ React.useEffect(fn, EMPTY);
144177
+ }
144178
+ class Timeout {
144179
+ constructor() {
144180
+ __publicField(this, "currentId", null);
144181
+ __publicField(this, "clear", () => {
144182
+ if (this.currentId !== null) {
144183
+ clearTimeout(this.currentId);
144184
+ this.currentId = null;
144185
+ }
144186
+ });
144187
+ __publicField(this, "disposeEffect", () => {
144188
+ return this.clear;
144189
+ });
144190
+ }
144191
+ static create() {
144192
+ return new Timeout();
144193
+ }
144194
+ /**
144195
+ * Executes `fn` after `delay`, clearing any previously scheduled call.
144196
+ */
144197
+ start(delay, fn) {
144198
+ this.clear();
144199
+ this.currentId = setTimeout(() => {
144200
+ this.currentId = null;
144201
+ fn();
144202
+ }, delay);
144203
+ }
144204
+ }
144205
+ function useTimeout() {
144206
+ const timeout2 = useLazyRef(Timeout.create).current;
144207
+ useOnMount(timeout2.disposeEffect);
144208
+ return timeout2;
144209
+ }
144210
+ function isClassComponent(elementType) {
144211
+ const {
144212
+ prototype = {}
144213
+ } = elementType;
144214
+ return Boolean(prototype.isReactComponent);
144215
+ }
144216
+ function elementTypeAcceptingRef(props, propName, componentName, location, propFullName) {
144217
+ const propValue = props[propName];
144218
+ const safePropName = propFullName || propName;
144219
+ if (propValue == null || // When server-side rendering React doesn't warn either.
144220
+ // This is not an accurate check for SSR.
144221
+ // This is only in place for emotion compat.
144222
+ // TODO: Revisit once https://github.com/facebook/react/issues/20047 is resolved.
144223
+ typeof window === "undefined") {
144224
+ return null;
144225
+ }
144226
+ let warningHint;
144227
+ if (typeof propValue === "function" && !isClassComponent(propValue)) {
144228
+ warningHint = "Did you accidentally provide a plain function component instead?";
144229
+ }
144230
+ if (warningHint !== void 0) {
144231
+ 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`);
144232
+ }
144233
+ return null;
144234
+ }
144235
+ const elementTypeAcceptingRef$1 = chainPropTypes(PropTypes.elementType, elementTypeAcceptingRef);
144234
144236
  function getTypeByValue(value) {
144235
144237
  const valueType = typeof value;
144236
144238
  switch (valueType) {
@@ -153498,7 +153500,7 @@ function Legend(props) {
153498
153500
  }
153499
153501
  }
153500
153502
  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]})`);
153503
+ 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
153504
  }
153503
153505
  if (isSetColor && obsSetSelection && obsSetColor) {
153504
153506
  const obsSetSelectionByLevelZero = {};
@@ -153532,9 +153534,17 @@ function Legend(props) {
153532
153534
  const i2 = featureAggregationStrategy;
153533
153535
  featureSelectionLabelRawStr = featureSelectionLabelRaw == null ? void 0 : featureSelectionLabelRaw[i2];
153534
153536
  } else if (featureAggregationStrategy === "sum") {
153535
- featureSelectionLabelRawStr = "Sum of features";
153537
+ if (Array.isArray(featureSelection) && featureSelection.length === 1) {
153538
+ featureSelectionLabelRawStr = featureSelectionLabelRaw == null ? void 0 : featureSelectionLabelRaw[0];
153539
+ } else {
153540
+ featureSelectionLabelRawStr = "Sum of features";
153541
+ }
153536
153542
  } else if (featureAggregationStrategy === "mean") {
153537
- featureSelectionLabelRawStr = "Mean of features";
153543
+ if (Array.isArray(featureSelection) && featureSelection.length === 1) {
153544
+ featureSelectionLabelRawStr = featureSelectionLabelRaw == null ? void 0 : featureSelectionLabelRaw[0];
153545
+ } else {
153546
+ featureSelectionLabelRawStr = "Mean of features";
153547
+ }
153538
153548
  } else {
153539
153549
  featureSelectionLabelRawStr = featureSelectionLabelRaw == null ? void 0 : featureSelectionLabelRaw[0];
153540
153550
  }
@@ -153548,7 +153558,7 @@ function Legend(props) {
153548
153558
  if (!isSetColor) {
153549
153559
  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
153560
  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);
153561
+ 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
153562
  }
153553
153563
  }
153554
153564
  }, [
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { D, E } from "./index-BgrJUaQb.js";
1
+ import { D, E } from "./index-BK98jzeZ.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-BK98jzeZ.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-BK98jzeZ.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-BK98jzeZ.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-BK98jzeZ.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-BK98jzeZ.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-BK98jzeZ.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.8.13",
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.8.13",
24
+ "@vitessce/constants-internal": "3.8.13",
25
+ "@vitessce/legend": "3.8.13",
26
+ "@vitessce/sets-utils": "3.8.13",
27
+ "@vitessce/utils": "3.8.13",
28
+ "@vitessce/vit-s": "3.8.13",
29
+ "@vitessce/scatterplot": "3.8.13"
30
30
  },
31
31
  "devDependencies": {
32
32
  "react": "18.3.1",