mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-03 12:54:29 +00:00
FxCarveModule was the branch's worst fallow finding: 246 lines at 25 cyclomatic / 45 cognitive, CRITICAL. It held four separate things — the head, the "listen to" row, the strength knob and the analysis result — plus two derived values whose nested ternaries were most of the cognitive load. Now: soleCarveVoice and carveSummary as named functions with the reasoning that was inline attached to them, and CarveSourceRow / CarveAnalysis as components. CarveAnalysis in particular reads as the three states it is (analysing, nothing analysed, the filters) rather than a two-deep ternary in JSX. FxCarveModule itself is 5/2/85 and is now the shell it always described itself as. All four sit BELOW the component so nothing above them re-fingerprints. With this the branch's fallow audit is CLEAN: 0 complexity findings, 0 dead code, duplication warn-only, exit 0. All nine gated findings the branch had are gone, and no file in this stack is over the 600-line cap any more -- so commits from here need no --no-verify. studio's editor suite (102 files, 1269 tests) passes unchanged.
@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 18/19, Zustand (state management)
- 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