import type { CredentialSnapshot } from '@astrale-os/shell'; import type { ReactElement, ReactNode } from 'react'; import { Component } from 'react'; import type { GraphResource } from '../graph/resource.js'; import { useConnection } from '../session/connection/connection.hook.js'; export declare function ViewBoundary(props: { readonly resource: GraphResource; readonly children: (value: T) => ReactNode; readonly loading?: ReactNode; readonly empty?: ReactNode; readonly error?: (error: unknown) => ReactNode; }): ReactElement; export declare const GraphBoundary: typeof ViewBoundary; export interface ViewErrorBoundaryProps { /** A render function receives the retry generation and can recreate rejected lazy resources. */ readonly children: ReactNode | ((generation: number) => ReactNode); readonly fallback?: (error: unknown, retry: () => void) => ReactNode; readonly onError?: (error: unknown) => void; } /** Catch Shell View render/lazy failures and remount the failed subtree on explicit retry. */ export declare class ViewErrorBoundary extends Component { state: { error: unknown; generation: number; }; static getDerivedStateFromError(error: unknown): { error: unknown; }; componentDidCatch(error: unknown): void; private readonly retry; render(): ReactNode; } export declare function defaultViewLoading(): ReactElement; export declare function defaultViewError(_error: unknown, retry: () => void): ReactElement; export declare function ConnectionBoundary(props: { readonly children: ReactNode; readonly fallback?: (status: ReturnType) => ReactNode; }): ReactElement; export declare function CredentialBoundary(props: { readonly credential: CredentialSnapshot; readonly children: ReactNode; readonly fallback?: (credential: CredentialSnapshot) => ReactNode; }): ReactElement; //# sourceMappingURL=boundaries.d.ts.map