@sproutsocial/seeds-react-menu 1.16.5 → 1.16.6

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.
@@ -9,27 +9,27 @@ $ tsup --dts
9
9
  CJS Build start
10
10
  ESM Build start
11
11
  CJS dist/index.js 92.65 KB
12
- CJS dist/v3/index.js 121.28 KB
13
12
  CJS dist/v2/index.js 73.18 KB
13
+ CJS dist/v3/index.js 121.51 KB
14
14
  CJS dist/index.js.map 180.28 KB
15
- CJS dist/v3/index.js.map 212.15 KB
16
15
  CJS dist/v2/index.js.map 152.19 KB
17
- CJS ⚡️ Build success in 102ms
16
+ CJS dist/v3/index.js.map 213.07 KB
17
+ CJS ⚡️ Build success in 92ms
18
18
  ESM dist/esm/index.js 73.60 KB
19
- ESM dist/esm/chunk-ROQATIB7.js 9.15 KB
20
19
  ESM dist/esm/v2/index.js 62.63 KB
21
- ESM dist/esm/v3/index.js 107.78 KB
20
+ ESM dist/esm/v3/index.js 108.01 KB
21
+ ESM dist/esm/chunk-ROQATIB7.js 9.15 KB
22
+ ESM dist/esm/v2/index.js.map 132.57 KB
22
23
  ESM dist/esm/index.js.map 156.29 KB
23
24
  ESM dist/esm/chunk-ROQATIB7.js.map 22.93 KB
24
- ESM dist/esm/v2/index.js.map 132.57 KB
25
- ESM dist/esm/v3/index.js.map 212.20 KB
26
- ESM ⚡️ Build success in 103ms
25
+ ESM dist/esm/v3/index.js.map 213.12 KB
26
+ ESM ⚡️ Build success in 94ms
27
27
  DTS Build start
28
- DTS ⚡️ Build success in 7288ms
28
+ DTS ⚡️ Build success in 7359ms
29
29
  DTS dist/index.d.ts 39.12 KB
30
30
  DTS dist/v2/index.d.ts 5.55 KB
31
31
  DTS dist/v3/index.d.ts 23.92 KB
32
32
  DTS dist/index.d.mts 39.12 KB
33
33
  DTS dist/v2/index.d.mts 5.55 KB
34
34
  DTS dist/v3/index.d.mts 23.92 KB
35
- Done in 8.03s.
35
+ Done in 8.15s.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @sproutsocial/seeds-react-menu
2
2
 
3
+ ## 1.16.6
4
+
5
+ ### Patch Changes
6
+
7
+ - 42605a5: Fix ActionMenu portal container in webpack Module Federation (MFE) contexts.
8
+
9
+ When a remote MFE chunk loads its own copy of `seeds-react-portal`, the
10
+ `DisablePortalToBodyContext` object identity differs from the host's copy.
11
+ This caused `useSeedsPortalContainer` to always read `false` even when a
12
+ Modal/Drawer/PeekIn had provided `true`, so the menu portaled to
13
+ `document.body` and escaped the dialog's focus/pointer-events boundary.
14
+
15
+ The hook now falls back to a DOM walk (`closest("[role='dialog']")`) from
16
+ the anchor ref when the context value is false, matching the same behaviour
17
+ the context would have triggered.
18
+
3
19
  ## 1.16.5
4
20
 
5
21
  ### Patch Changes
@@ -11,7 +11,11 @@ function useSeedsPortalContainer() {
11
11
  const containerRef = React.useRef(null);
12
12
  const [portalContainer, setPortalContainer] = React.useState(void 0);
13
13
  React.useEffect(() => {
14
- if (disablePortalToBody && containerRef.current) {
14
+ if (!containerRef.current) return;
15
+ const insideDialog = disablePortalToBody || // Fallback for cross-chunk MFE scenarios where context identity differs:
16
+ // detect the dialog boundary directly from the DOM.
17
+ !!containerRef.current.closest("[role='dialog']");
18
+ if (insideDialog) {
15
19
  const dialogContent = containerRef.current.closest("[role='dialog']");
16
20
  setPortalContainer(dialogContent ?? containerRef.current);
17
21
  }