import { createBrowserRouter, RouteObject } from 'react-router-dom'; import { default as React, ReactNode, ComponentType } from 'react'; import { CreateRouterOptions, RouteModule } from './types'; /** * Default loading spinner component */ declare function DefaultLoading(): ReactNode; /** * Default error fallback component */ declare function DefaultError(): ReactNode; /** * Default 404 Not Found component */ declare function DefaultNotFound(): ReactNode; /** * Wrap a lazy component with Suspense */ declare function withSuspense(Component: React.LazyExoticComponent>, fallback: ReactNode): ReactNode; /** * Set up route prefetching on link hover/focus */ declare function setupPrefetching(preloadMap: Record Promise>, options: { delay: number; onHover: boolean; onFocus: boolean; }): () => void; /** * Route configuration for creating the router */ export interface RouteConfig { /** Route path pattern */ path: string; /** Dynamic import function for the route component */ importFn: () => Promise; /** Whether this is an index route */ index?: boolean; /** Whether this is a layout route */ isLayout?: boolean; /** Child routes */ children?: RouteConfig[]; } /** * Create a router from route configurations */ export declare function createRouter(routes: RouteConfig[], options?: CreateRouterOptions): ReturnType; /** * Create a simple router from manual route definitions * * This is a simpler alternative to the full auto-discovery system * for projects that prefer explicit route configuration. */ export declare function createSimpleRouter(routeTree: RouteObject[], options?: Omit): ReturnType; export { DefaultLoading, DefaultError, DefaultNotFound, withSuspense, setupPrefetching };