/** Shields non-code spans from the regex/text-based import rewriters. * * The import rewriters (rewriteReactImports, rewriteImportsPlugin, the native * Zig scanner, and compile's runtime-specifier rewrite) replace `from "X"` / * `import "X"` / `import("X")` / `require("X")` across the whole file text. That * text scan can't tell a real import from the *text* `from 'X'` sitting inside a * template literal / data string (an example-code snippet a page renders) or a * comment — so it rewrites the snippet's specifier too. The browser bundle then * diverges from the SSR pre-render → React hydration mismatch on the code block. * * Fix: before rewriting, replace template literals and comments with opaque * placeholders, plus any string literal whose *own text* contains an * import-like sequence (`from`/`import`/`require` + quote); rewrite; then * restore them verbatim. A real import specifier string (e.g. * "react/jsx-runtime") never contains that sequence, so it is left untouched * and always gets rewritten — no matter what token precedes it. Regex literals * are skipped (copied verbatim) so their contents can't be misread as * strings/templates. * * Usage: `const { masked, restore } = maskLiterals(src)`, run the existing * rewriter on `masked`, then `restore(rewritten)`. */ export declare const SENTINEL: string; export type MaskedSource = { masked: string; restore: (rewritten: string) => string; }; export declare const maskLiterals: (src: string) => MaskedSource;