@broberg/bodymap 0.7.0 → 0.7.1

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.
package/README.md CHANGED
@@ -251,7 +251,22 @@ const [big, setBig] = useState(false);
251
251
  <button onClick={() => setBig(true)}>Se stor</button>
252
252
  ```
253
253
 
254
- `Escape` leaves it. The pain report is untouched by entering or leaving.
254
+ `Escape` leaves it **but a phone has no Escape**, so there must always be a
255
+ reachable control. That is why the built-in one exists and why switching it off is
256
+ a commitment to supplying your own.
257
+
258
+ ⚠️ **If you supply your own control, render it as a SIBLING of the fullscreen
259
+ surface — not as a child of a container beneath it.** The surface is
260
+ `position: fixed`, so a button positioned `absolute` inside your original box ends
261
+ up *underneath* it. A consumer hit exactly this: their × disappeared under the
262
+ overlay, and because they had already set `showFullscreenButton={false}` there was
263
+ no way out at all. Give yours `position: fixed` and a z-index above the overlay,
264
+ and assert with `document.elementFromPoint()` that the point you can see is the
265
+ button you think it is.
266
+
267
+ The control sits inside the safe area (`env(safe-area-inset-*)` on all four sides),
268
+ and becomes a compact × in fullscreen — a text pill is wide enough to cover half a
269
+ phone's status bar. The pain report is untouched by entering or leaving.
255
270
 
256
271
  **It is a viewport fill, not the browser Fullscreen API — deliberately.** iOS
257
272
  Safari does not support fullscreen on an arbitrary element at all, and a phone is
package/dist/three.cjs CHANGED
@@ -685,7 +685,17 @@ function BodyMap3D(props) {
685
685
  inset: 0,
686
686
  zIndex: 2147483e3,
687
687
  background: chrome.panelBg,
688
- padding: 12,
688
+ // F052.27 — a fixed inset:0 surface in a standalone/Capacitor
689
+ // webview covers the STATUS BAR too, so a control laid out at the
690
+ // top lands on the clock and the battery. Measured by fd-sundhed
691
+ // on a real iPhone: the owner could not read the button or get
692
+ // out, and Escape does not exist on a phone. Every side gets its
693
+ // safe-area inset, bottom included — the home indicator covers
694
+ // content just as effectively.
695
+ paddingTop: "calc(12px + env(safe-area-inset-top))",
696
+ paddingBottom: "calc(12px + env(safe-area-inset-bottom))",
697
+ paddingLeft: "calc(12px + env(safe-area-inset-left))",
698
+ paddingRight: "calc(12px + env(safe-area-inset-right))",
689
699
  display: "flex",
690
700
  flexDirection: "column",
691
701
  overflow: "auto"
@@ -706,8 +716,14 @@ function BodyMap3D(props) {
706
716
  "aria-pressed": isFullscreen,
707
717
  "aria-label": isFullscreen ? UI.collapse ?? "Close" : UI.expand ?? "Expand",
708
718
  onClick: () => setFullscreen(!isFullscreen),
709
- style: { ...btn, color: chrome.text, borderColor: chrome.border, background: chrome.panelBg },
710
- children: isFullscreen ? UI.collapse ?? "Close" : UI.expand ?? "Expand"
719
+ style: {
720
+ ...btn,
721
+ color: chrome.text,
722
+ borderColor: chrome.border,
723
+ background: chrome.panelBg,
724
+ ...isFullscreen ? { width: 40, height: 40, padding: 0, fontSize: 22, lineHeight: 1 } : null
725
+ },
726
+ children: isFullscreen ? "\xD7" : UI.expand ?? "Expand"
711
727
  }
712
728
  ) }),
713
729
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", gap: 18, alignItems: "flex-start", flexWrap: "wrap", ...isFullscreen ? { flex: "1 1 auto", minHeight: 0 } : null }, children: [