* fix(studio): the copied render command carries no composition text a shell can run The Variables panel's "Copy render command" put every variable value inline, quoted for POSIX shells only. A shared project's author chooses those values, so in PowerShell, cmd.exe (including npx.cmd's re-parse) or fish a default such as `x'; calc.exe; '` ran as commands when the command was pasted. The command is now fixed text: `npx hyperframes render -c <composition> --variables-file .hyperframes/render-variables.json`. Copying it saves the previewed values to that file through a new PUT /projects/:id/render-variables route, which refuses a link standing in for .hyperframes and replaces, rather than writes through, a link at the file itself. A composition path that is not one plain word in every shell (letters, digits, `_ . / -`) gets no command. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(scripts): the comment checker skips a template nested in a substitution stripLiterals ended a template literal at the first backtick, including one that opens a nested template inside `${...}`. On a line such as `'${value.replace(/'/g, `'\\''`)}'` that left a backtick unmatched, so scanCLike read the rest of the file as one template and counted none of its comments. The ratchet then measured VariablesPanel.tsx on main at 1 comment line instead of 31 and failed any change that removed that line. A `${...}` is now scanned as code: strings, regexes and templates inside it are skipped, and its closing brace returns to the outer template. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(studio-server): read the replaced render-variables record through one no-follow descriptor The link test checked the record with lstat and then read it by path, two lookups CodeQL reports as a file-system race. Opening it once with O_NOFOLLOW fails if a link is still there and reads the file that open checked. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@hyperframes/core
Types, parsers, generators, compiler, linter, runtime, and frame adapters for the Hyperframes video framework.
Install
npm install @hyperframes/core
Most users don't need to install core directly — the CLI, producer, and studio packages depend on it internally.
What's inside
| Module | Description |
|---|---|
| Types | TimelineElement, CompositionSpec, Asset, canvas dimensions, defaults |
| Parsers | parseHtml — extract timeline elements from HTML; parseGsapScript — parse GSAP animations |
| Generators | generateHyperframesHtml — produce valid Hyperframes HTML from a composition spec |
| Compiler | compileTimingAttrs — resolve data-start / data-duration into absolute times |
| Linter | lintHyperframeHtml — validate Hyperframes HTML (missing attributes, overlapping tracks, etc.) |
| Runtime | IIFE script injected into the browser — manages seek, media playback, and the window.__hf protocol |
| Frame Adapters | Pluggable animation drivers (GSAP, Lottie, CSS, or custom) |
Generated composition trust
Composition generators require trusted authors for code-bearing inputs. styles and
generateHyperframesStyles preserve authored CSS, which can load external resources.
animations may contain __raw: values that are emitted as JavaScript;
includeScripts: true includes executable timeline code. serializeGsapAnimations
also accepts raw preamble, postamble, and a code-bearing timelineVar. Never fill
these inputs with untrusted data. Attribute encoding and closing-tag containment
are not a sandbox; render untrusted compositions in an appropriately isolated
execution environment and never serve them on a privileged origin.
Text content retains the supported inline-formatting sanitizer contract. The clip parser intentionally flattens inner formatting to text, so parse/generate is not a lossless replacement for editing the source HTML.
Frame Adapters
A frame adapter tells the engine how to seek your animation to a specific frame:
import { createGSAPFrameAdapter } from "@hyperframes/core";
const adapter = createGSAPFrameAdapter({
getTimeline: () => gsap.timeline(),
compositionId: "my-video",
});
Implement FrameAdapter for custom animation runtimes:
import type { FrameAdapter } from "@hyperframes/core";
const myAdapter: FrameAdapter = {
id: "my-adapter",
getDurationFrames: () => 300,
seekFrame: (frame) => {
/* seek your animation */
},
};
Parsing and generating HTML
import { parseHtml, generateHyperframesHtml } from "@hyperframes/core";
const { elements, metadata } = parseHtml(htmlString);
const html = generateHyperframesHtml(spec);
Linting
import { lintHyperframeHtml } from "@hyperframes/core/lint";
const result = lintHyperframeHtml(htmlString);
// result.findings: { severity, message, elementId }[]
Documentation
Full documentation: hyperframes.heygen.com/packages/core
Related packages
@hyperframes/engine— rendering engine that drives the browser@hyperframes/producer— full render pipeline (capture + encode)hyperframes— CLI