/** * HMR handler for `czap:update` messages. * * Performs surgical DOM updates when `@quantize` CSS or shader * uniforms change during development, avoiding full page reloads. * * @module */ declare global { interface HTMLCanvasElement { /** * czap runtime-attached WebGL program for HMR uniform updates. * Set by the shader directive when a program is linked. */ __czapProgram?: WebGLProgram; } } /** * Shape of the HMR payload the czap Vite plugin ships over the Vite * dev-server WebSocket. Handled by {@link handleHMR} on the client. */ export interface HMRPayload { /** Message discriminator. Always `'czap:update'`. */ readonly type: 'czap:update'; /** Boundary id whose compiled output changed. */ readonly boundary: string; /** New compiled CSS (omitted when only uniforms changed). */ readonly css?: string; /** New shader-uniform values (omitted when only CSS changed). */ readonly uniforms?: Record; } /** * Handle a czap:update HMR payload. * Dispatches to CSS replacement or shader uniform updates based on payload content. */ export declare function handleHMR(payload: HMRPayload): void; //# sourceMappingURL=hmr.d.ts.map