mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-04 16:42:27 +00:00
feat(studio): add storyboard manifest contract, parser, and read API (#1528)
First PR in the Studio storyboarding stack. Establishes the parseable contract the storyboard UI reads from; no UI yet. - core/storyboard: StoryboardManifest/Frame/Globals types + a lenient STORYBOARD.md parser (frontmatter + status/src/duration/transition_in, freeform narrative tolerated, never throws, records warnings). Exposed as @hyperframes/core/storyboard (browser-safe). - studio-api: GET /projects/:id/storyboard returns the normalized manifest with per-frame srcExists; missing file -> exists:false, not 404. - fixture: packages/studio/fixtures/storyboard-sample for dogfooding the storyboard view in later PRs (built/animated frames + one outline). Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
f72ea25b3b
commit
8a13a07074
@@ -0,0 +1,50 @@
|
||||
<template id="frame-01-hook-template">
|
||||
<div data-composition-id="frame-01-hook" data-width="1920" data-height="1080" data-duration="3">
|
||||
<div class="canvas">
|
||||
<h1 class="headline">Ship a launch video<br /><em>in an afternoon</em></h1>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
[data-composition-id="frame-01-hook"] .canvas {
|
||||
width: 1920px;
|
||||
height: 1080px;
|
||||
background: radial-gradient(circle at 50% 40%, #1b1140 0%, #07060f 70%);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-family: "Inter", system-ui, sans-serif;
|
||||
overflow: hidden;
|
||||
}
|
||||
[data-composition-id="frame-01-hook"] .headline {
|
||||
color: #fff;
|
||||
font-size: 120px;
|
||||
font-weight: 800;
|
||||
line-height: 1.05;
|
||||
letter-spacing: -0.03em;
|
||||
text-align: center;
|
||||
opacity: 0;
|
||||
}
|
||||
[data-composition-id="frame-01-hook"] .headline em {
|
||||
color: #8b7bff;
|
||||
font-style: normal;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/gsap@3.14.2/dist/gsap.min.js"></script>
|
||||
<script>
|
||||
(function () {
|
||||
const tl = gsap.timeline({ paused: true });
|
||||
const h = '[data-composition-id="frame-01-hook"] .headline';
|
||||
tl.fromTo(
|
||||
h,
|
||||
{ opacity: 0, scale: 0.86 },
|
||||
{ opacity: 1, scale: 1, duration: 0.6, ease: "back.out(1.4)" },
|
||||
0.1,
|
||||
);
|
||||
tl.to(h, { scale: 1.04, duration: 2, ease: "none" }, 0.7);
|
||||
window.__timelines = window.__timelines || {};
|
||||
window.__timelines["frame-01-hook"] = tl;
|
||||
})();
|
||||
</script>
|
||||
</div>
|
||||
</template>
|
||||
@@ -0,0 +1,62 @@
|
||||
<template id="frame-02-problem-template">
|
||||
<div
|
||||
data-composition-id="frame-02-problem"
|
||||
data-width="1920"
|
||||
data-height="1080"
|
||||
data-duration="4"
|
||||
>
|
||||
<div class="canvas">
|
||||
<div class="spinner"></div>
|
||||
<div class="timer">20:00</div>
|
||||
<div class="label">prompt · wait · miss · repeat</div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
[data-composition-id="frame-02-problem"] .canvas {
|
||||
width: 1920px;
|
||||
height: 1080px;
|
||||
background: #0c0a14;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 40px;
|
||||
font-family: "Inter", system-ui, sans-serif;
|
||||
overflow: hidden;
|
||||
}
|
||||
[data-composition-id="frame-02-problem"] .spinner {
|
||||
width: 180px;
|
||||
height: 180px;
|
||||
border-radius: 50%;
|
||||
border: 14px solid #2a2342;
|
||||
border-top-color: #8b7bff;
|
||||
}
|
||||
[data-composition-id="frame-02-problem"] .timer {
|
||||
color: #fff;
|
||||
font-size: 96px;
|
||||
font-weight: 700;
|
||||
font-variant-numeric: tabular-nums;
|
||||
letter-spacing: 0.02em;
|
||||
}
|
||||
[data-composition-id="frame-02-problem"] .label {
|
||||
color: #6f6790;
|
||||
font-size: 34px;
|
||||
letter-spacing: 0.08em;
|
||||
text-transform: uppercase;
|
||||
opacity: 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/gsap@3.14.2/dist/gsap.min.js"></script>
|
||||
<script>
|
||||
(function () {
|
||||
const id = '[data-composition-id="frame-02-problem"]';
|
||||
const tl = gsap.timeline({ paused: true });
|
||||
tl.to(id + " .spinner", { rotation: 720, duration: 4, ease: "none" }, 0);
|
||||
tl.to(id + " .label", { opacity: 1, duration: 0.5, ease: "power2.out" }, 0.8);
|
||||
window.__timelines = window.__timelines || {};
|
||||
window.__timelines["frame-02-problem"] = tl;
|
||||
})();
|
||||
</script>
|
||||
</div>
|
||||
</template>
|
||||
@@ -0,0 +1,84 @@
|
||||
<template id="frame-03-feature-template">
|
||||
<div
|
||||
data-composition-id="frame-03-feature"
|
||||
data-width="1920"
|
||||
data-height="1080"
|
||||
data-duration="5"
|
||||
>
|
||||
<div class="canvas">
|
||||
<div class="sheet">
|
||||
<div class="tile t1"></div>
|
||||
<div class="tile t2"></div>
|
||||
<div class="tile t3"></div>
|
||||
<div class="tile t4"></div>
|
||||
</div>
|
||||
<div class="cap">Lock the story first. Then it animates.</div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
[data-composition-id="frame-03-feature"] .canvas {
|
||||
width: 1920px;
|
||||
height: 1080px;
|
||||
background: #f5f3ec;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 56px;
|
||||
font-family: "Inter", system-ui, sans-serif;
|
||||
overflow: hidden;
|
||||
}
|
||||
[data-composition-id="frame-03-feature"] .sheet {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 360px);
|
||||
grid-auto-rows: 202px;
|
||||
gap: 28px;
|
||||
}
|
||||
[data-composition-id="frame-03-feature"] .tile {
|
||||
border-radius: 18px;
|
||||
opacity: 0;
|
||||
}
|
||||
[data-composition-id="frame-03-feature"] .t1 {
|
||||
background: #8b7bff;
|
||||
}
|
||||
[data-composition-id="frame-03-feature"] .t2 {
|
||||
background: #ff7262;
|
||||
}
|
||||
[data-composition-id="frame-03-feature"] .t3 {
|
||||
background: #1abcfe;
|
||||
}
|
||||
[data-composition-id="frame-03-feature"] .t4 {
|
||||
background: #0acf83;
|
||||
}
|
||||
[data-composition-id="frame-03-feature"] .cap {
|
||||
color: #1a1726;
|
||||
font-size: 44px;
|
||||
font-weight: 600;
|
||||
letter-spacing: -0.01em;
|
||||
opacity: 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/gsap@3.14.2/dist/gsap.min.js"></script>
|
||||
<script>
|
||||
(function () {
|
||||
const id = '[data-composition-id="frame-03-feature"]';
|
||||
const tl = gsap.timeline({ paused: true });
|
||||
tl.to(
|
||||
id + " .tile",
|
||||
{ opacity: 1, y: 0, duration: 0.5, stagger: 0.18, ease: "back.out(1.3)" },
|
||||
0.2,
|
||||
);
|
||||
tl.fromTo(
|
||||
id + " .tile",
|
||||
{ y: 30 },
|
||||
{ y: 0, duration: 0.5, stagger: 0.18, ease: "back.out(1.3)" },
|
||||
0.2,
|
||||
);
|
||||
tl.to(id + " .cap", { opacity: 1, duration: 0.6, ease: "power2.out" }, 1.4);
|
||||
window.__timelines = window.__timelines || {};
|
||||
window.__timelines["frame-03-feature"] = tl;
|
||||
})();
|
||||
</script>
|
||||
</div>
|
||||
</template>
|
||||
@@ -0,0 +1,68 @@
|
||||
<template id="frame-04-proof-template">
|
||||
<div data-composition-id="frame-04-proof" data-width="1920" data-height="1080" data-duration="4">
|
||||
<div class="canvas">
|
||||
<div class="stat"><span class="num">0</span><span class="unit">%</span></div>
|
||||
<div class="cap">fewer re-renders per finished video</div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
[data-composition-id="frame-04-proof"] .canvas {
|
||||
width: 1920px;
|
||||
height: 1080px;
|
||||
background: linear-gradient(160deg, #07060f 0%, #161033 100%);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 24px;
|
||||
font-family: "Inter", system-ui, sans-serif;
|
||||
overflow: hidden;
|
||||
}
|
||||
[data-composition-id="frame-04-proof"] .stat {
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
color: #8b7bff;
|
||||
font-weight: 800;
|
||||
letter-spacing: -0.04em;
|
||||
}
|
||||
[data-composition-id="frame-04-proof"] .num {
|
||||
font-size: 320px;
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
[data-composition-id="frame-04-proof"] .unit {
|
||||
font-size: 160px;
|
||||
}
|
||||
[data-composition-id="frame-04-proof"] .cap {
|
||||
color: #cfc9ec;
|
||||
font-size: 44px;
|
||||
font-weight: 500;
|
||||
opacity: 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/gsap@3.14.2/dist/gsap.min.js"></script>
|
||||
<script>
|
||||
(function () {
|
||||
const id = '[data-composition-id="frame-04-proof"]';
|
||||
const numEl = document.querySelector(id + " .num");
|
||||
const tl = gsap.timeline({ paused: true });
|
||||
const counter = { v: 0 };
|
||||
tl.to(
|
||||
counter,
|
||||
{
|
||||
v: 41,
|
||||
duration: 1.6,
|
||||
ease: "power2.out",
|
||||
onUpdate() {
|
||||
if (numEl) numEl.textContent = String(Math.round(counter.v));
|
||||
},
|
||||
},
|
||||
0.3,
|
||||
);
|
||||
tl.to(id + " .cap", { opacity: 1, duration: 0.6, ease: "power2.out" }, 1.4);
|
||||
window.__timelines = window.__timelines || {};
|
||||
window.__timelines["frame-04-proof"] = tl;
|
||||
})();
|
||||
</script>
|
||||
</div>
|
||||
</template>
|
||||
Reference in New Issue
Block a user