mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-14 13:27:13 +00:00
Walks a Chrome page's DOM via Puppeteer and extracts a scene graph as JSON matching the Rust parse_scene_json() format. Uses kind nested-object structure with serde-compatible internally-tagged enum discriminator for Container/Text/Image/Video. Extracts bounds, computed styles (background, opacity, border-radius, overflow, transform, visibility, font properties, color), and recurses through children. Text detection based on text-only child nodes, image and video detection based on element tag. Tests verify JSON round-trip compatibility with the Rust scene types including all element kinds, nested children, and transform serialization.