Finding
Several core APIs publish imperative hooks through window.__frameScript. This makes renderer automation convenient but spreads mutable global state across frame, image, audio waveform, and animation modules.
Evidence
- src/lib/frame.tsx, src/lib/image.tsx, src/lib/audio-waveform.ts, and src/lib/animation.ts write to window.__frameScript.
Acceptance criteria
- Define a typed FrameScript bridge interface in one module.
- Centralize registration/cleanup behavior.
- Preserve the current render automation API.
Finding
Several core APIs publish imperative hooks through window.__frameScript. This makes renderer automation convenient but spreads mutable global state across frame, image, audio waveform, and animation modules.
Evidence
Acceptance criteria