/** * A generic render-error boundary: it contains a throw from its subtree and shows * a loud `role="alert"` panel in its place, so one failing region never blanks the * page around it. `label` prefixes the caught message to name the contained region * (e.g. the plugin whose content threw); `onError` observes the error for logging. * There is no in-place retry — the boundary resets by remounting, so callers that * want a reset give it a fresh `key`. * * The fallback is the design system's `ErrorState`, so a contained render error * looks exactly like a failed fetch: one `role="alert"` surface headed by a mark * and words, never color alone. It is rendered without a retry, since the * boundary resets by remounting. */ import { Component, type ErrorInfo, type ReactNode } from 'react'; export interface ErrorBoundaryProps { readonly children: ReactNode; /** Prefixed to the caught error message, naming the contained region. */ readonly label?: string; /** Called with the caught error and React's component stack, for logging. */ readonly onError?: (error: unknown, info: ErrorInfo) => void; } interface ErrorBoundaryState { readonly hasError: boolean; readonly error: unknown; } export declare class ErrorBoundary extends Component { state: ErrorBoundaryState; static getDerivedStateFromError(error: unknown): ErrorBoundaryState; componentDidCatch(error: unknown, info: ErrorInfo): void; render(): ReactNode; } export {}; //# sourceMappingURL=error-boundary.d.ts.map