/** * classifyStitchError — map a raw native stitch-failure message to a * `CameraErrorCode`. * * This is the load-bearing C++↔JS contract: the native pipeline reports * failures only as exception strings (see cpp/stitcher.cpp — the warp / * cumulative-canvas guards throw "warpRoi too large … degenerate camera * params", cv::Stitcher reports "need more images", etc.), and this * function is the single place that turns those strings into the typed * codes `` surfaces. The code then drives the friendly * copy in {@link userFacingStitchError} (cameraErrorMessages.ts) — e.g. * STITCH_CAMERA_PARAMS_FAIL → "Please pan more slowly". * * Extracted from the inline chain in Camera.tsx so the contract is * unit-testable against the actual native strings (the lib's jest config * is pure-TS and can't mount ). * * Ordering matters — the branches are checked top-to-bottom and the first * match wins: * 1. need-more-images (insufficient overlap) — most specific. * 2. homography estimation. * 3. degenerate camera params / warp-canvas guard (the divergent-warp * OOM path, now converted to a clean throw by the canvas guard). * 4. low-quality / disjoint output (the post-stitch validator, v0.16). * 5. out-of-memory (incl. the pre-stitch memory abort). * 6. fallback — an unclassified finalize failure. */ import type { CameraErrorCode } from './Camera'; export declare function classifyStitchError(message: string): CameraErrorCode; //# sourceMappingURL=classifyStitchError.d.ts.map