import type { HtmdxDiagnostic } from './diagnostics'; export declare const COPY_LABEL = "Copy fix request"; export type FailedStep = 'load' | 'compile' | 'render'; export type BodyContractDiagnostics = { component: string; expectedShape: string; minimalValidExample: string; /** The offending row, bounded and untrusted. */ receivedInput?: string; componentBodyLine?: number; artifactLine?: number; artifactColumn?: number; }; export type ErrorDiagnostics = { failedStep: FailedStep; message: string; javascriptStack?: string; reactComponentStack?: string; bodyContract?: BodyContractDiagnostics; }; export type ErrorContext = { reactComponentStack?: string; /** Every diagnostic a static scan of the same source reported. */ artifactDiagnostics?: HtmdxDiagnostic[]; }; export type FixRequestContext = { pageTitle: string; pageLocation: string; baseUrl: string; artifactSrc?: string | null; runtimeScriptPath: string; version: string; source: string; artifactDiagnostics: HtmdxDiagnostic[]; }; export declare function errorDiagnostics(failedStep: FailedStep, error: unknown, { reactComponentStack, artifactDiagnostics }?: ErrorContext): ErrorDiagnostics; export declare function buildFixRequest(diagnostics: ErrorDiagnostics, context: FixRequestContext): string; export declare function formatErrorDetails(diagnostics: ErrorDiagnostics): string; export declare function cleanDiagnosticText(value: string): string; export declare function cleanUrl(value: string, base?: string): string;