import { DarkTheme, DefaultTheme, Stack, ThemeProvider } from 'expo-router'; import { useColorScheme } from 'react-native'; import { GestureHandlerRootView } from 'react-native-gesture-handler'; import { AuthenticatedConvexSync, ClerkAuthProvider, StarterTaskSeed } from '@/auth/clerk'; import { Colors } from '@/constants/theme'; import { FreeSyncBridge } from '@/data/sync/free-sync'; import { RevenueCatBridge } from '@/data/sync/revenuecat'; import { useGlideWidgetSync } from '@/widget'; /** * Keeps the home-screen widget in sync with the local task board. Renders * nothing; reads the store directly. No-op off iOS. */ function WidgetSync() { useGlideWidgetSync(); return null; } export default function RootLayout() { const scheme = useColorScheme() === 'dark' ? 'dark' : 'light'; const palette = Colors[scheme]; const base = scheme === 'dark' ? DarkTheme : DefaultTheme; const navTheme = { ...base, colors: { ...base.colors, background: palette.background, card: palette.surface, text: palette.text, border: palette.border, primary: palette.accent, notification: palette.resistance, }, }; return ( {/* Planning is a focused session — full screen, but slides up like the capture sheet. */} {/* Capture is a quick sheet. */} {/* Glide-owned auth surface. */} {/* Glide-owned signed-in account surface. */} {/* Subscription paywall flow: plan → auth → StoreKit payment. */} ); }