export type NavigateMode = 'push' | 'replace'; export type NavigateDetail = { /** Absolute path (pathname + optional search/hash). Example: "/dashboard/settings?tab=a#top" */ to: string; mode?: NavigateMode; /** Optional state stored via history.pushState/replaceState */ state?: any; }; export declare const JORVEL_NAVIGATE_EVENT = "jorvel:navigate"; export declare function dispatchJorvelNavigate(detail: NavigateDetail): void; export type Router = { /** Current path as pathname + search + hash */ getPath(): string; /** Subscribe to location changes (popstate + internal navigate()) */ subscribe(cb: (path: string) => void): () => void; /** Imperative navigation */ navigate(detail: NavigateDetail): void; /** Destroy event listeners */ destroy(): void; }; export type RouterOptions = { /** When set, router only reacts to paths under this base ("/dashboard"). */ basePath?: string; /** Listen for cross-app navigation events (default: true). */ listenToNavigateEvents?: boolean; }; export declare function createRouter(opts?: RouterOptions): Router; /** * Convenience: attach a shell listener that converts jorvel:navigate events into history updates. * * Use this in the host if you want remotes to be able to navigate without importing the router. */ export declare function attachJorvelNavigateListener(): () => void; //# sourceMappingURL=router.d.ts.map