import React, { createContext } from 'react'; import type { ISafeAreaProvider, SafeAreaContextType, SafeAreaInsets } from '../type'; export const DEFAULT_INSETS: SafeAreaInsets = {}; export const SafeAreaContext = createContext({ insets: DEFAULT_INSETS }); /** * Web build of SafeAreaProvider. * * The web target does not have a real safe-area primitive, so we lean * on React Native's `SafeAreaView` (which is rendered as a plain * `` on web via react-native-web) purely to preserve the API * shape. The `SafeAreaContext.Provider` is the part that actually * matters: descendants rely on it for read/write access to the * in-memory inset object. */ export const SafeAreaProvider: React.FC = ({ children }) => { return children; }; export { useSafeArea, useGetSafeAreaInsets, useHandleSafeAreaInsets, useSetSafeAreaInsets } from './hooks';