UNPKG

expo-router

Version:

Expo Router is a file-based router for React Native and web applications.

205 lines (203 loc) • 5.86 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); 0 && (module.exports = { ErrorBoundary: null, ExpoRoot: null, Link: null, Navigator: null, Redirect: null, Slot: null, Stack: null, Tabs: null, Unmatched: null, router: null, unstable_useReconcileTabHistory: null, useCanDismiss: null, useCanGoBack: null, useFocusEffect: null, useGlobalSearchParams: null, useLocalSearchParams: null, useNavigation: null, useNavigationContainerRef: null, usePathname: null, useRootNavigation: null, useRootNavigationState: null, useRouter: null, useSegments: null, useUnstableGlobalHref: null, withLayoutContext: null }); function _export(target, all) { for(var name in all)Object.defineProperty(target, name, { enumerable: true, get: Object.getOwnPropertyDescriptor(all, name).get }); } _export(exports, { get ErrorBoundary () { return _ErrorBoundary.ErrorBoundary; }, get ExpoRoot () { return ExpoRoot; }, get Link () { return _client.Link; }, get Navigator () { return Navigator; }, get Redirect () { return Redirect; }, get Slot () { return Slot; }, get Stack () { return Stack; }, get Tabs () { return Tabs; }, get Unmatched () { return _Unmatched.Unmatched; }, get router () { return router; }, get unstable_useReconcileTabHistory () { return unstable_useReconcileTabHistory; }, get useCanDismiss () { return useCanDismiss; }, get useCanGoBack () { return useCanGoBack; }, get useFocusEffect () { return useFocusEffect; }, get useGlobalSearchParams () { return useGlobalSearchParams; }, get useLocalSearchParams () { return useLocalSearchParams; }, get useNavigation () { return useNavigation; }, get useNavigationContainerRef () { return useNavigationContainerRef; }, get usePathname () { return usePathname; }, get useRootNavigation () { return useRootNavigation; }, get useRootNavigationState () { return useRootNavigationState; }, get useRouter () { return _client.useRouter_UNSTABLE; }, get useSegments () { return useSegments; }, get useUnstableGlobalHref () { return useUnstableGlobalHref; }, get withLayoutContext () { return withLayoutContext; } }); function _jsxruntime() { const data = require("react/jsx-runtime"); _jsxruntime = function() { return data; }; return data; } const _client = require("./router/client"); const _host = require("./router/host"); const _Unmatched = require("../views/Unmatched"); const _ErrorBoundary = require("../views/ErrorBoundary"); function usePathname() { const router = (0, _client.useRouter_UNSTABLE)(); return router.path; } function useLocalSearchParams() { const router = (0, _client.useRouter_UNSTABLE)(); return Object.fromEntries([ ...new URLSearchParams(router.query).entries() ]); } function useGlobalSearchParams() { const router = (0, _client.useRouter_UNSTABLE)(); return Object.fromEntries([ ...new URLSearchParams(router.query).entries() ]); } function Slot() { return /*#__PURE__*/ (0, _jsxruntime().jsx)(_host.Children, {}); } function Stack() { console.warn('Stack is not implemented in React Server Components yet'); return /*#__PURE__*/ (0, _jsxruntime().jsx)(_host.Children, {}); } function Tabs() { console.warn('Tabs is not implemented in React Server Components yet'); return /*#__PURE__*/ (0, _jsxruntime().jsx)(_host.Children, {}); } function Navigator() { throw new Error('Navigator is not implemented in React Server Components yet'); } function Redirect({ href }) { const router = (0, _client.useRouter_UNSTABLE)(); router.replace(href); return null; } function ExpoRoot() { throw new Error('ExpoRoot is not implemented in React Server Components yet'); } function useFocusEffect() { console.warn('useFocusEffect is not implemented in React Server Components yet'); } function useNavigation() { console.warn('useNavigation is not implemented in React Server Components yet'); } function withLayoutContext() { throw new Error('withLayoutContext is not implemented in React Server Components yet'); } function useNavigationContainerRef() { throw new Error('useNavigationContainerRef is not implemented in React Server Components yet'); } function useSegments() { throw new Error('useSegments is not implemented in React Server Components yet'); } function useRootNavigation() { throw new Error('useRootNavigation is not implemented in React Server Components yet'); } function useRootNavigationState() { throw new Error('useRootNavigationState is not implemented in React Server Components yet'); } function unstable_useReconcileTabHistory() { throw new Error('unstable_useReconcileTabHistory is not implemented in React Server Components yet'); } function useCanGoBack() { throw new Error('useCanGoBack is not implemented in React Server Components yet'); } function useCanDismiss() { throw new Error('useCanDismiss is not implemented in React Server Components yet'); } function useUnstableGlobalHref() { throw new Error('useUnstableGlobalHref is not implemented in React Server Components yet'); } const router = new Proxy({}, { get (target, prop, receiver) { throw new Error(`The router object is not available in React Server Components. Use the useRouter hook instead.`); } }); // TODO: // export { Redirect } from './link/Link'; //# sourceMappingURL=exports.js.map