* feat(studio): layers panel and marquee read an opaque preview over its channel The runtime answers a new layers request with the Layers walk: each layer's handle, depth, child count, z-index and kind, by the rules Studio walks a scriptable frame with, which move to core. On an opaque frame the Layers panel lists, selects and drills in from it, and the marquee measures its candidates over the channel and selects from their descriptions. An opaque selection maps to a timeline clip known only by its clip id, so a marquee's picks survive the timeline sync. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(studio): opaque preview hover, layers drill-in, marquee paging and delete path Review follow-ups for the opaque-preview Layers panel and marquee: - Delete on an opaque selection runs the DOM delete again. The clip-id match that lets a selection find a row known only by its clip id is now opt-in (`clipIdScope`), passed only by selection sync and the Layers seek, never by delete or group commits, which need a patch target that row lacks. A row with no file reads as in the open composition, as the forward lookup does. - The runtime's `layers` reports a drill-in group it no longer has (`missingGroup`) and lists nothing, so the panel leaves the drill-in after a reload as the same-origin branch does, rather than list the whole page. - `layers` takes an `offset`, and the marquee pages through every layer, so elements past one reply's 2,048 cap still band-select. - A Layers refresh that lands while an opaque read is in flight runs once more when it settles, instead of being dropped. - A hover resolved for a pointer move that a leave or newer move superseded is dropped. - `pointer-targets` reads the hit stack once per request. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(core): keep the layers paging test inside the Windows runner's timeout The paging test walked the 2,051-layer page three times with every row mapped, which ran past 5 s on windows-latest. It now maps only the last page's rows and has its own 20 s timeout. 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