import type { GraphStore } from '@astrale-os/sdk/client/store'; import type { ReactElement, ReactNode } from 'react'; import { NodePath } from '@astrale-os/sdk/graph/path'; import type { NavAdapter } from './adapters/adapter.js'; import type { NavSnapshot, SerializedLocation } from './history.js'; import type { NavLocation, PointResult } from './location.js'; import type { NavTarget } from './snapshot.js'; import { NavHistory } from './history.js'; export interface Navigate { (to: NavTarget, opts?: { replace?: boolean; }): void; back(): void; forward(): void; /** Unsupported until the caller supplies an explicit parent Edge Class. */ up(): never; readonly canBack: boolean; readonly canForward: boolean; } export interface MutableNavigate { (to: Parameters[0], opts?: Parameters[1]): void; back(): void; forward(): void; up(): never; canBack: boolean; canForward: boolean; } export interface NavCtx { readonly history: NavHistory; readonly store: GraphStore; readonly adapter: NavAdapter; readonly navigate: MutableNavigate; } export declare const NavContext: import("react").Context; export declare function useNavCtx(): NavCtx; export declare function useOptionalNavCtx(): NavCtx | null; export declare function useHistoryVersion(history: NavHistory | null): number; /** Caller-scoped canonical point read through the provider's one GraphStore. */ export declare function useGraphPoint(target: NodePath | null): PointResult | null; type MissingResolver = (location: NavLocation) => NavTarget | null; export type MissingPolicy = 'hold' | MissingResolver; export interface NavScopeProps { adapter?: NavAdapter; restore?: NavSnapshot; initial?: NavTarget; onChange?: (location: NavLocation, snapshot: NavSnapshot) => void; /** Default `hold`; parent fallback requires an explicit caller relationship. */ missing?: MissingPolicy; /** Closed codec admission applied before any history or adapter mutation. */ admit?: (location: SerializedLocation) => SerializedLocation | null; children: ReactNode; } export declare function NavScope(props: NavScopeProps): ReactElement; export {}; //# sourceMappingURL=scope.context.d.ts.map