mirror of
https://github.com/hanzoai/video.git
synced 2026-11-03 04:21:39 +00:00
Separates creative grammar (renderer_family) from technical engine (render_runtime) so HyperFrames can stand alongside Remotion as a first-class runtime instead of masquerading as a Remotion sub-case. Locks runtime choice at proposal stage and enforces it end-to-end: the schemas require it, video_compose routes by it, the reviewer fails closed on silent swaps, and a parametrized contract test walks every pipeline manifest to ensure each planning-stage skill explains the conversation to the user. Adds hyperframes_compose (scaffold/lint/ validate/render/doctor/add_block), a playbook -> CSS style bridge, and vendored HyperFrames Layer 3 skills from commit d291358, pinned via PROVENANCE.md for future re-sync. Final_review now records render_runtime_used and runtime_swap_detected so compose lies are catchable after the fact.
1.8 KiB
1.8 KiB
The demo.html Convention
Why components ship demo.html
Every component in the registry ships a companion demo.html file alongside its snippet. The demo serves two purposes:
-
Preview fixture — the CI preview pipeline renders the demo to generate thumbnail images and preview videos for the catalog docs page.
-
Usage example — the demo shows the component effect applied to representative content, serving as a working reference.
Demo structure
A demo is a complete, standalone HTML composition:
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=1920, height=1080" />
<title>Component Name — Demo</title>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/gsap.min.js"></script>
<style>
/* reset + canvas size */
</style>
</head>
<body>
<div data-composition-id="<name>-demo" data-width="1920" data-height="1080" data-duration="N">
<!-- Demo content showing the effect -->
<!-- Component snippet inlined here -->
</div>
<script>
// GSAP timeline demonstrating the effect
window.__timelines = window.__timelines || {};
window.__timelines["<name>-demo"] = tl;
</script>
</body>
</html>
Key conventions:
data-composition-idis<component-name>-demoto avoid collisions- The demo is self-contained — all CSS and JS from the snippet is inlined
- The GSAP timeline is registered on
window.__timelines - Duration should be long enough to showcase the effect (typically 5-8 seconds)
Blocks don't need demo.html
Blocks are already standalone compositions that can be rendered directly. Only components need the demo wrapper.
Demos are not installed
The demo.html is NOT installed by hyperframes add — it exists only in the registry for preview generation and as a reference.