The best way to control Claude Code, Codex and more from any computer or phone
| 1 | // Avoid RN/navigation imports so node checks do not load their untranspiled Flow. |
| 2 | |
| 3 | export type NativeTopScrollEdgeEffect = "automatic" | "soft"; |
| 4 | export type NativeHeaderScrollEdgeEffects = { |
| 5 | readonly top: NativeTopScrollEdgeEffect; |
| 6 | readonly bottom: "hidden"; |
| 7 | readonly left: "hidden"; |
| 8 | readonly right: "hidden"; |
| 9 | }; |
| 10 | |
| 11 | function nativeTopScrollEdgeEffect( |
| 12 | os: string, |
| 13 | _version: number | string, |
| 14 | ): NativeTopScrollEdgeEffect { |
| 15 | if (os !== "ios") { |
| 16 | return "automatic"; |
| 17 | } |
| 18 | |
| 19 | // On iOS 27, soft uses a local overlay rather than sampling edge-to-edge app content. |
| 20 | return "automatic"; |
| 21 | } |
| 22 | |
| 23 | export function nativeHeaderScrollEdgeEffects( |
| 24 | os: string, |
| 25 | version: number | string, |
| 26 | ): NativeHeaderScrollEdgeEffects { |
| 27 | return { |
| 28 | top: nativeTopScrollEdgeEffect(os, version), |
| 29 | bottom: "hidden", |
| 30 | left: "hidden", |
| 31 | right: "hidden", |
| 32 | }; |
| 33 | } |