/** * The pure HTML surgery of §4d (docs/ios-export-design.md): given the pro-lane bundle, produce * the payload page. Two deliberately redundant mechanisms: * * - the `bm-bundled-assets` map (original URL → relative vendor path), which the engine's own * ASSET_MAP mechanism resolves through — every three.js loader plus the explicit * `ASSET_MAP.get` fetch sites; * - a literal rewrite of every vendored URL AND the animation base-URL constants, which fixes * the sites that bypass the map (raw fetch in PlacedObjectSystem/HeightmapSystem/physics2d/ * splat loaders, and the StartScreen/SelectionSteps/AchievementToast DOM urls): the world * data is inlined in this HTML, so rewriting the literals fixes what those sites read. * * No DOM parser — the bundle is one multi-MB HTML string and the three edits are anchored on * markers the scaffold's own template guarantees (``, ``). */ export interface TransformOptions { html: string; /** Original absolute URL → document-relative vendor path (`vendor//`). */ assetMap: ReadonlyMap; /** Base-URL constant → relative base (see vendor.ts vendorBasePathFor). */ baseRewrites: ReadonlyMap; } export interface TransformResult { html: string; /** How many URL literals were rewritten, for the build's notes. */ rewrites: number; } export declare const DISTRIBUTION_META = ""; export declare const BUNDLED_ASSETS_ID = "bm-bundled-assets"; /** * Rewrite every occurrence of the given URLs/bases in one pass. Longest key first, so an exact * asset URL wins over a base that prefixes it — both rewrite into the same vendor layout, but * the ordering keeps the replacement deterministic. */ export declare function rewriteUrlLiterals(html: string, replacements: ReadonlyMap): { html: string; rewrites: number; }; /** Serialize the asset map for the inline block. `<` is escaped so no URL can ever terminate * the script element early — standard inline-JSON hygiene, and still valid JSON. */ export declare function renderAssetMapJson(assetMap: ReadonlyMap): string; /** * The full §4d transform. Throws when the bundle carries no ``/`` markers — that * is not a page this lane understands, and silently skipping the injection would ship an app * that fetches from the network. */ export declare function transformBundleHtml(options: TransformOptions): TransformResult;