import { type HydrationDataDocumentLike } from "../../html/hydration-data-element.js"; export type { ClientRouteHeadEntry, ComponentMap, FrontmatterData, LayoutInfo, PageData, RouteData, SpaPageData, } from "./types.js"; import type { RouteData, SpaPageData } from "./types.js"; type HydrationDocument = HydrationDataDocumentLike; type DocumentReloader = (url: string) => void; export declare class PageLoader { private cache; private spaCache; private pendingRequests; private pendingSpaRequests; /** * A loader belongs to the dependency snapshot of the document that created it. * Keeping this immutable also prevents cached or in-flight route data from * crossing snapshot boundaries if the hydration element is later replaced. */ private readonly dependencyPinningCacheKey; private readonly reloadDocument; private snapshotRecoveryStarted; constructor(doc?: HydrationDocument | undefined, reloadDocument?: DocumentReloader); private evictIfFull; getCached(path: string): RouteData | undefined; isCached(path: string): boolean; setCache(path: string, data: RouteData): void; clearCache(): void; getSpaCached(path: string): SpaPageData | undefined; isSpaDataCached(path: string): boolean; setSpaCache(path: string, data: SpaPageData): void; fetchPageData(path: string, reloadOnSnapshotFailure?: boolean): Promise; private tryFetchJSON; private fetchAndParseHTML; loadPage(path: string): Promise; private loadPageWithSnapshotRecovery; prefetch(path: string): Promise; fetchSpaPageData(path: string, reloadOnSnapshotFailure?: boolean): Promise; loadSpaPageData(path: string): Promise; private loadSpaPageDataWithSnapshotRecovery; prefetchSpaPageData(path: string): Promise; private createPendingRequest; private snapshotScopedPath; private navigationHeaders; private assertDependencySnapshot; private failDependencySnapshot; private withSnapshotRecovery; private recoverSnapshotFailure; } //# sourceMappingURL=page-loader.d.ts.map