import type { Mapping } from "./types.js"; /** * `build` — idempotent encoder for HTML files containing shield markers. * * Behavior: * 1. Find every `...` block; * re-encode SOURCE with the mapping and replace the visible text. * Idempotent — re-running on already-built files is a no-op. * 2. Find every `...` block; * walk the inner HTML, encode each non-skip text segment, and wrap * it with a `ENCODED` marker. * Block markers are removed (they exist only for first-time setup). */ export declare function buildHtml(html: string, mapping: Mapping): string; /** * `ship` — strip every shield-related comment marker, leaving only the * already-encoded visible text. Run as the last step before deploying. * The output is camouflage-clean: zero on-page signal that ShieldFont * was used. * * Idempotent: re-running on already-shipped HTML is a no-op. */ export declare function shipHtml(html: string): string; /** * `check` — verify every shield marker's visible text matches what we'd * get by encoding the SOURCE comment with the given mapping. Returns a * report of every marker checked plus a list of mismatches. */ export interface CheckResult { total: number; passed: number; failed: number; mismatches: Array<{ source: string; expected: string; actual: string; }>; /** * Unpaired `shield-on` / `shield-off` markers. * * `BLOCK_RE` needs both halves, so a block missing its `shield-off` is never * encoded at all — and `total` counts markers, not intentions, so it reported * a clean `0` for a page whose every word was still in plain English. Treat * any non-zero value here as a failure even when `failed` is 0. */ unpairedBlocks: number; } export declare function checkHtml(html: string, mapping: Mapping): CheckResult; /** * `assertShipped` — the last gate before deploy. Throws if any shield marker * survived, which is the difference between a protected page and a page that * publishes your plain text next to its own decoy. * * Call it on every file you are about to write, after `shipHtml`: * * ```js * const shipped = shipHtml(buildHtml(raw, alpha)); * assertShipped(shipped); // throws rather than deploying plain text * writeFileSync(file, shipped); * ``` * * `checkHtml` cannot do this job: it verifies the markers it *finds*, so a page * that was never built and a page shipped correctly both come back * `{ total: 0, failed: 0 }` — success and total failure, spelled identically. */ export declare function assertShipped(html: string): void; //# sourceMappingURL=markers.d.ts.map