@loomhq/lens 10.32.4 → 10.32.5

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.
@@ -40,7 +40,7 @@ const Popover = (_a) => {
40
40
  const unitOffset = offset * unit;
41
41
  const unitBoundaryOffset = boundaryOffset * unit;
42
42
  const [bodyElement, setBodyElement] = useState(null);
43
- const { stage } = useTransition(isOpen, transitionDuration);
43
+ const { stage, shouldMount } = useTransition(isOpen, transitionDuration);
44
44
  useEffect(() => {
45
45
  setBodyElement(document === null || document === void 0 ? void 0 : document.querySelector('body'));
46
46
  }, []);
@@ -83,7 +83,7 @@ const Popover = (_a) => {
83
83
  parent.removeEventListener('resize', update);
84
84
  });
85
85
  };
86
- }, [refs.reference, refs.floating, update, isOpen]);
86
+ }, [refs.reference, refs.floating, update, isOpen, shouldMount]);
87
87
  const [rootNode, setRootNode] = useState(null);
88
88
  useEffect(() => {
89
89
  if (rootId) {
@@ -103,7 +103,7 @@ const Popover = (_a) => {
103
103
  };
104
104
  return (React.createElement(Wrapper, Object.assign({ ref: reference }, props),
105
105
  children,
106
- isOpen && (React.createElement(React.Fragment, null,
106
+ shouldMount && (React.createElement(React.Fragment, null,
107
107
  !rootNode && (React.createElement(ContentWrapper, Object.assign({}, contentProps), content)),
108
108
  rootNode &&
109
109
  ReactDOM.createPortal(React.createElement(ContentWrapper, Object.assign({}, contentProps), content), rootNode)))));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loomhq/lens",
3
- "version": "10.32.4",
3
+ "version": "10.32.5",
4
4
  "scripts": {
5
5
  "dev": "next",
6
6
  "build:next": "next build",