Files
hyperframes/packages/studio
Miguel Angel Simon Sierra 38768e1456 feat(studio): edit and style text in the preview
Double-press a text element in the canvas and the caret opens where you
pressed, in the element itself rather than in a panel. Select characters
and a small toolbar offers colour, bold, italic and underline, applied to
exactly those characters.

Styling text needed a capability Studio did not have. The patch vocabulary
was inline-style, attribute, html-attribute and text-content, and
text-content assigns textContent; the text-field model escapes markup on
the way out and refuses a change in child structure. No route existed for
a span to reach a composition file.

Adds a rich-text operation that has one, guarded by a single sanitiser in
packages/core called on both ends of the trip: in the browser so the
preview shows what will be saved, and on the server because that is where
the file is written. Tags and style properties are a small allowlist, and
an unexpected tag loses its formatting rather than its words.

Styling is applied by reading the element into a flat list of runs and
rebuilding it, not by wrapping a DOM range. Replacing a colour, removing
one, and styling across an existing run stop being special cases, and the
markup cannot grow with repeated edits. In a flex or grid container the
runs go inside one wrapper so a coloured word cannot reflow the element.

Also fixes the keyboard: the shortcut guards matched contenteditable=true
only, so playback shortcuts ate letters typed into the composition.
2026-08-07 12:01:57 -07:00
..
2026-08-07 15:31:57 +00:00
…

@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