import type { RuntimeModulesContract } from '../../../mini-contract.ts'; import type { MiniHmrMode } from '../../hmr-mode.ts'; import type { PatchUpdate } from '../../hmr-protocol.ts'; export declare const devtoolsPatchesFileName = "hmr/patches.js"; /** * Collects behavior that depends on native development-tool project-file compilation. * * Runtime entry, Page transform, entry banners, and patch delivery stay in one descriptor because they implement one protocol: * DevTools observes a changed Page dependency, re-executes the Page shell, and that shell synchronously gives the cumulative * native factory payload to the persistent App runtime. Mixing any one of these pieces with another mode would break that chain. */ export declare function createDevtoolsHmrMode(modules: RuntimeModulesContract): MiniHmrMode; /** Provides a valid, inert CommonJS dependency before the host has a patch range to publish. */ export declare function renderInitialDevtoolsPatches(): string; /** * Renders the cumulative patch suffix as inert CommonJS data. * * DevTools re-executes a live Page because this physical dependency changed. The Page banner passes the exported payload to the * persistent App runtime before importing its capsule. Keeping the module inert—rather than applying factories at top level— * makes that ordering explicit, lets the runtime reject stale build IDs, and makes replay by several live Pages safe. * The caller-supplied parameter binds every generated runtime reference, including closures retained for lazy modules. */ export declare function renderDevtoolsPatches(buildId: string, patches: readonly PatchUpdate[]): string; /** * Injects Page handoff at the exact native registration edge rather than wrapping arbitrary user `Page` calls. * * The native shell has one stable `Page(pageConfig)` contract. Failing when that contract changes is intentional: silently * skipping this transform would let DevTools unload the live Taro Page and destroy React state while appearing to support HMR. */ export declare function injectPageShellHmr(code: string): { code: string; map: null; };