import { type ReactNode } from 'react'; import type { NavigationContextValue, NavigationGuardHandler } from './types'; export declare function NavigationProvider({ value, children, }: { value: NavigationContextValue; children: ReactNode; }): ReactNode; export declare function useNavigation(): NavigationContextValue; /** Imperative navigation to a shell route token with its typed search params. */ export declare function useAppNavigate(): NavigationContextValue['navigate']; /** Resolve a token + search to the href the shell would route to. */ export declare function useResolvePath(): NavigationContextValue['resolvePath']; /** * Block navigation away from the current page while `when` is true. `handler` is * consulted before any SDK-controlled navigation commits — a route-token navigate, * a plugin navigate, or a browser back/forward — and the navigation proceeds only if * it resolves `true`; a promise lets the handler drive a confirm dialog. A full-page * unload (tab close / refresh) is additionally covered by a native `beforeunload` * prompt that fires whenever any guard is armed. * * Guards compose against the provider's shared registry: a feature and a plugin page * may each arm one, and any veto blocks. */ export declare function useNavigationGuard(when: boolean, handler: NavigationGuardHandler): void; /** * Consult the armed navigation guards before a transition the shell drives itself * (a chrome link whose target is outside the route-token map). Resolves `true` when * the navigation may proceed. Token and plugin navigations already run this gate * inside {@link NavigationProvider}; this is the escape hatch for the shell's own * raw-path links, without which such a link would bypass every armed guard. */ export declare function useNavigationGate(): (href: string) => Promise; /** * Plugin-page navigation: `navigatePlugin` drives a client-side transition to a * runtime plugin path, `resolvePluginPath` yields its href. These are the ONLY * navigation methods a plugin page uses to reach its own deep-linkable sub-paths — * the token-typed {@link useAppNavigate}/{@link useResolvePath} address the shell's * compile-time routes and know nothing of plugin paths. */ export declare function usePluginNavigation(): Pick; /** * Plugin-page navigation WITH the per-history-entry state channel: * `navigatePluginWithOptions` navigates and writes a per-entry state slot, and * `updatePluginEntryState` checkpoints the CURRENT entry's slot in place (no * navigation). Both require a host that provides the channel; on an OLDER host that * predates it, this hook THROWS a loud, descriptive error rather than silently * degrading — the plugin then knows to fall back or the deployment knows to update the * host. A plugin that only navigates without carrying state should keep using * {@link usePluginNavigation}, which every host supports. */ export declare function usePluginEntryNavigation(): { navigatePluginWithOptions: NonNullable; updatePluginEntryState: NonNullable; }; //# sourceMappingURL=context.d.ts.map