mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-18 16:08:56 +00:00
* feat(studio): drag and resize on an opaque preview start from one gesture-start read A gesture on a preview frame Studio cannot script read nothing from the frame as it started. A drag snapped to nothing; a layer GSAP holds moved by a CSS translate that its save then dropped; a resize grew from the overlay rect, the layer's GSAP scale included; and the pointer reached the element only through the canvas zoom. The runtime answers a new `gesture-start` request. For each pressed element it gives the overlay geometry, the transform-free layout size, how far the centre moves per px of translate (probed the way a draft draws it, every transform above it applied), and GSAP's x/y when GSAP owns its position, with whether a tween moves it. It also lists the boxes of the page the gesture can snap to, walked by the rule Studio's own snap collection now takes from core. On an opaque preview every press waits for that one read, on the existing waiting-press path, and the gesture starts from it: the snap targets, the move route and GSAP base (so the save writes GSAP's x plus the drag, not the drag alone), the pointer-to-offset matrix, and the resize's base size. A layer a tween moves is refused with a notice, since saving that move still reads the frame. Same-origin frames do not change: their presses start at once from the element, and their snap collection walks the same elements by the same rule. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore(inspector): raise the packed size budget for the gesture-start runtime The inspector bundles core's preview runtime. Main alone packs to 866206 bytes, 420 under the 1% tolerance on the old 858046 budget; the gesture-start request adds 713 bytes (866919), which tipped the merge queue's Build over. Set the budget to 880000 to leave room for the remaining opaque-preview requests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@hyperframes/studio
Browser-based composition editor UI for Hyperframes. Provides a visual timeline, code editor, and live preview for building video compositions.
Install
npm install @hyperframes/studio
What it does
The studio is a React application with:
- Visual timeline — drag, resize, and arrange elements on tracks
- Code editor — edit HTML and GSAP scripts with CodeMirror (syntax highlighting, autocomplete)
- Live preview — see changes in real time as you edit
- Composition inspector — view and modify element properties
Development
The studio is embedded in the hyperframes preview command. To develop the studio UI itself:
cd packages/studio
bun run dev # Start Vite dev server
bun run build # Build for production
bun run typecheck # Type-check
Tech stack
- React 19, Zustand 4/5 (state management; development uses Zustand 5)
- CodeMirror 6 (editor)
- Tailwind CSS (styling)
- Vite (bundler)
- Phosphor Icons
Documentation
Full documentation: hyperframes.heygen.com/packages/studio
Related packages
@hyperframes/core— types and parsers used by the editorhyperframes— CLI that serves the studio viahyperframes preview