@vitessce/spatial-accelerated 3.9.1 → 3.9.2

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.
Files changed (2) hide show
  1. package/dist/index.js +28 -32
  2. package/package.json +11 -11
package/dist/index.js CHANGED
@@ -56647,21 +56647,20 @@ Popper.Utils = (typeof window !== "undefined" ? window : global).PopperUtils;
56647
56647
  Popper.placements = placements;
56648
56648
  Popper.Defaults = Defaults;
56649
56649
  function createChainedFunction(...funcs) {
56650
- return funcs.reduce((acc, func) => {
56651
- if (func == null) {
56652
- return acc;
56653
- }
56654
- {
56655
- if (typeof func !== "function") {
56656
- console.error("Material-UI: Invalid Argument Type, must only provide functions, undefined, or null.");
56657
- }
56650
+ return funcs.reduce(
56651
+ (acc, func) => {
56652
+ if (func == null) {
56653
+ return acc;
56654
+ }
56655
+ return function chainedFunction(...args) {
56656
+ acc.apply(this, args);
56657
+ func.apply(this, args);
56658
+ };
56659
+ },
56660
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
56661
+ () => {
56658
56662
  }
56659
- return function chainedFunction(...args) {
56660
- acc.apply(this, args);
56661
- func.apply(this, args);
56662
- };
56663
- }, () => {
56664
- });
56663
+ );
56665
56664
  }
56666
56665
  function setRef(ref, value) {
56667
56666
  if (typeof ref === "function") {
@@ -56700,7 +56699,7 @@ function flipPlacement(placement, theme) {
56700
56699
  }
56701
56700
  }
56702
56701
  function getAnchorEl(anchorEl) {
56703
- return typeof anchorEl === "function" ? anchorEl() : anchorEl;
56702
+ return typeof anchorEl === "function" ? anchorEl(document.body) : anchorEl;
56704
56703
  }
56705
56704
  const useEnhancedEffect = typeof window !== "undefined" ? React.useLayoutEffect : React.useEffect;
56706
56705
  const defaultPopperOptions = {};
@@ -56730,25 +56729,18 @@ React.forwardRef((props, ref) => {
56730
56729
  }
56731
56730
  if (popperRef.current) {
56732
56731
  popperRef.current.destroy();
56733
- handlePopperRefRef.current(null);
56732
+ if (handlePopperRefRef.current) {
56733
+ setRef(handlePopperRefRef.current, null);
56734
+ }
56734
56735
  }
56735
56736
  const handlePopperUpdate = (data) => {
56736
56737
  setPlacement(data.placement);
56737
56738
  };
56738
- const resolvedAnchorEl = getAnchorEl(anchorEl);
56739
- {
56740
- if (resolvedAnchorEl && resolvedAnchorEl.nodeType === 1) {
56741
- const box = resolvedAnchorEl.getBoundingClientRect();
56742
- if (box.top === 0 && box.left === 0 && box.right === 0 && box.bottom === 0) {
56743
- console.warn([
56744
- "Material-UI: The `anchorEl` prop provided to the component is invalid.",
56745
- "The anchor element should be part of the document layout.",
56746
- "Make sure the element is present in the document or that it's not display none."
56747
- ].join("\n"));
56748
- }
56749
- }
56739
+ const anchorElement = getAnchorEl(anchorEl);
56740
+ if (!anchorElement) {
56741
+ return;
56750
56742
  }
56751
- const popper = new Popper(getAnchorEl(anchorEl), tooltipRef.current, {
56743
+ const popper = new Popper(anchorElement, tooltipRef.current, {
56752
56744
  placement: rtlPlacement,
56753
56745
  ...popperOptions,
56754
56746
  modifiers: {
@@ -56766,7 +56758,9 @@ React.forwardRef((props, ref) => {
56766
56758
  onCreate: createChainedFunction(handlePopperUpdate, popperOptions.onCreate),
56767
56759
  onUpdate: createChainedFunction(handlePopperUpdate, popperOptions.onUpdate)
56768
56760
  });
56769
- handlePopperRefRef.current(popper);
56761
+ if (handlePopperRefRef.current) {
56762
+ setRef(handlePopperRefRef.current, popper);
56763
+ }
56770
56764
  }, [anchorEl, disablePortal, modifiers2, open, rtlPlacement, popperOptions]);
56771
56765
  const handleRef = React.useCallback((node2) => {
56772
56766
  setRef(ownRef, node2);
@@ -56780,7 +56774,9 @@ React.forwardRef((props, ref) => {
56780
56774
  return;
56781
56775
  }
56782
56776
  popperRef.current.destroy();
56783
- handlePopperRefRef.current(null);
56777
+ if (handlePopperRefRef.current) {
56778
+ setRef(handlePopperRefRef.current, null);
56779
+ }
56784
56780
  };
56785
56781
  const handleExited = () => {
56786
56782
  setExited(true);
@@ -56811,7 +56807,7 @@ React.forwardRef((props, ref) => {
56811
56807
  // Fix Popper.js display issue
56812
56808
  top: 0,
56813
56809
  left: 0,
56814
- display: !open && keepMounted && !transition ? "none" : null,
56810
+ display: !open && keepMounted && !transition ? "none" : void 0,
56815
56811
  ...style2
56816
56812
  }, children: typeof children === "function" ? children(childProps) : children }) });
56817
56813
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitessce/spatial-accelerated",
3
- "version": "3.9.1",
3
+ "version": "3.9.2",
4
4
  "author": "HIDIVE Lab at HMS",
5
5
  "homepage": "http://vitessce.io",
6
6
  "repository": {
@@ -28,16 +28,16 @@
28
28
  "short-number": "^1.0.6",
29
29
  "three": "^0.154.0",
30
30
  "zarrita": "0.5.4",
31
- "@vitessce/constants-internal": "3.9.1",
32
- "@vitessce/gl": "3.9.1",
33
- "@vitessce/sets-utils": "3.9.1",
34
- "@vitessce/legend": "3.9.1",
35
- "@vitessce/spatial-utils": "3.9.1",
36
- "@vitessce/tooltip": "3.9.1",
37
- "@vitessce/vit-s": "3.9.1",
38
- "@vitessce/styles": "3.9.1",
39
- "@vitessce/globals": "3.9.1",
40
- "@vitessce/utils": "3.9.1"
31
+ "@vitessce/gl": "3.9.2",
32
+ "@vitessce/legend": "3.9.2",
33
+ "@vitessce/sets-utils": "3.9.2",
34
+ "@vitessce/spatial-utils": "3.9.2",
35
+ "@vitessce/constants-internal": "3.9.2",
36
+ "@vitessce/tooltip": "3.9.2",
37
+ "@vitessce/utils": "3.9.2",
38
+ "@vitessce/vit-s": "3.9.2",
39
+ "@vitessce/globals": "3.9.2",
40
+ "@vitessce/styles": "3.9.2"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@types/three": "^0.154.0",