import * as BundledReact from "react"; import type { RuntimeAdapter } from "../platform/adapters/base.js"; import type { DependencyPinningSourceInput } from "../transforms/esm/package-registry.js"; import type { loadComponentFromSource } from "../modules/react-loader/component-loader.js"; import type { RenderModes } from "./context/render-context.js"; type ReservedComponent = BundledReact.ComponentType<{ error?: Error; reset?: () => void; }>; /** Test seam for the component loader that {@link loadReservedWithPath} imports lazily. */ export interface LoadReservedDeps { loadComponentFromSource: typeof loadComponentFromSource; } export declare const RESERVED_COMPONENTS: { loading: string; error: string; notFound: string; }; export declare function collectAncestorDirs(segmentDir: string, appRootDir: string): string[]; interface ErrorBoundaryState { hasError: boolean; error?: Error; } interface ErrorBoundaryProps { children?: BundledReact.ReactNode; } type ReactLike = { createElement: typeof BundledReact.createElement; }; export declare function createErrorBoundary(ErrorComponent: ReservedComponent, ReactLib?: ReactLike): typeof BundledReact.Component; /** * Like {@link tryLoadReservedInDirs}, but also returns the absolute source path * of the file that was loaded — the client hydration bundle needs the path (in * the same absolute form as `appPath`) to load the same component in the browser. */ export declare function loadReservedWithPath(dirs: string[], which: keyof typeof RESERVED_COMPONENTS, projectDir: string, modes: RenderModes, adapter: RuntimeAdapter, projectId?: string, contentSourceId?: string, reactVersion?: string, dependencyPinningCacheKey?: string, dependencyPinningDependencies?: Readonly>, dependencyPinningSource?: DependencyPinningSourceInput, moduleServerOrigin?: string, serverExternalPackages?: readonly string[], signal?: AbortSignal, deps?: LoadReservedDeps): Promise<{ component: ReservedComponent; filePath: string; } | null>; export declare function tryLoadReservedInDirs(dirs: string[], which: keyof typeof RESERVED_COMPONENTS, projectDir: string, modes: RenderModes, adapter: RuntimeAdapter, projectId?: string, contentSourceId?: string, reactVersion?: string, dependencyPinningCacheKey?: string, dependencyPinningDependencies?: Readonly>, dependencyPinningSource?: DependencyPinningSourceInput, moduleServerOrigin?: string, serverExternalPackages?: readonly string[], signal?: AbortSignal, deps?: LoadReservedDeps): Promise; export {}; //# sourceMappingURL=app-reserved.d.ts.map