export type RepairMarkdown = (text: string) => string; /** * Dependency-free, CJS-safe baseline. Only the unambiguous completion the headless * layer already ships (closing an unbalanced code fence). Conservative on purpose — * it never guesses at inline markers, so it can't corrupt ordinary prose (`2 * 3`). * Used whenever the richer `remend` repair can't be loaded. */ export declare const fallbackRepair: RepairMarkdown; /** * Lazily loads `remend` and returns a repair function. If the import rejects — e.g. * the CJS build downlevelled it to a `require()` of the ESM-only module, or a * consumer's bundler can't resolve the runtime specifier — it transparently degrades * to {@link fallbackRepair}. Cached after the first call. * * @param importer Injectable for tests; defaults to `() => import('remend')`. */ export declare function loadRemend(importer?: () => Promise): Promise; /** Resets the module-level cache. Test-only. */ export declare function resetRemendCache(): void; /** * Returns the best available markdown-repair function. Renders with the dep-free * {@link fallbackRepair} immediately (also the SSR/first-paint value, so there is no * hydration mismatch), then upgrades to `remend` once it has loaded. Re-rendering * with the same `fallbackRepair` reference is a no-op (React bails on `Object.is`), * so a missing/blocked `remend` costs nothing beyond the one import attempt. */ export declare function useStreamingMarkdownRepair(): RepairMarkdown;