Overlay host
Shared modal compositor with scoped hosts, exit retention, topmost dismissal and focus restoration.
Setup
Place OverlayProvider inside SafeAreaProvider near the application root. Register OverlayScope inside each native modal screen or native sheet content. Root absolute views alone cannot establish layering across native windows. Native cross-window presentation remains unverified.
Use one root provider. OverlayPortal registers declarative content, while the host retains closing entries until the exit completes. Only the topmost modal receives dismissal. Focus moves to initialFocusRef and restores to returnFocusRef; toast/hint entries are non-modal. OverlayScope registers content in each native presentation.
Same-window gesture panels
OverlayPortal defaults to presentation="window". A continuous held gesture can opt into presentation="inline" to keep its panel in the current scope's window from opening through release. This is independent of modal (default true): modal accessibility, backdrop, initial/return focus, Escape and Android back dismissal remain available. An existing native modal window in the scope stays mounted when an inline panel is added above it.
Wrap native presentation content in OverlayScope. Inline presentation cannot cross into another native window. Device accessibility and gesture arbitration remain pending verification.