123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- import React from 'react';
- import type { FocusAndScrollRef } from '../../client/components/reducer';
- import type { FlightRouterState, FlightData } from '../../server/app-render';
- export declare type ChildSegmentMap = Map<string, CacheNode>;
- export declare type CacheNode = {
-
- data: ReturnType<typeof import('../../client/components/app-router.client').fetchServerResponse> | null;
-
- subTreeData: React.ReactNode | null;
-
- parallelRoutes: Map<string, ChildSegmentMap>;
- };
- interface NavigateOptions {
- forceOptimisticNavigation?: boolean;
- }
- export interface AppRouterInstance {
-
- reload(): void;
-
- push(href: string, options: NavigateOptions): void;
-
- replace(href: string, options: NavigateOptions): void;
-
- prefetch(href: string): void;
- }
- export declare const AppRouterContext: React.Context<AppRouterInstance>;
- export declare const LayoutRouterContext: React.Context<{
- childNodes: CacheNode['parallelRoutes'];
- tree: FlightRouterState;
- url: string;
- }>;
- export declare const GlobalLayoutRouterContext: React.Context<{
- tree: FlightRouterState;
- changeByServerResponse: (previousTree: FlightRouterState, flightData: FlightData) => void;
- focusAndScrollRef: FocusAndScrollRef;
- }>;
- export declare const TemplateContext: React.Context<React.ReactNode>;
- export {};
|