mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-03 23:03:09 +00:00
## What PR 2/17 of the catalog system rollout. **Physical directory rename.** Stacks on #252. - `git mv templates/ registry/examples/` — all 8 example directories (`decision-tree`, `kinetic-type`, `nyt-graph`, `play-mode`, `product-promo`, `swiss-grid`, `vignelli`, `warm-grain`) plus `templates.json` - `packages/cli/src/templates/remote.ts` — `TEMPLATES_DIR` constant from `"templates"` → `"registry/examples"`, exported for regression testing - `scripts/generate-template-previews.ts` — `remoteTemplatesDir` resolved to the new path - Comment updates in `packages/cli/src/templates/generators.ts` and `packages/cli/src/commands/init.ts` - New regression test `packages/cli/src/templates/remote.test.ts` pinning the path constants so future reverts fail a test instead of silently breaking installed CLIs Design doc: [Hyperframes Catalog System](https://www.notion.so/heygen/Hyperframes-Catalog-System-Design-Plan-341449792c69813f899dcd53b4c0383a). ## Why The current `templates/` directory is a flat "things that scaffold projects" bucket. The catalog model splits content into three tiers: **examples** (full projects — what today's templates are), **blocks** (sub-compositions), and **components** (effect snippets). `registry/examples/` is the canonical home for what was previously at `templates/`, and this PR makes room for `registry/blocks/` and `registry/components/` in future PRs without top-level clutter. ## How - `git mv` preserves file history — GitHub renders these as renames, not deletions + additions. - Remote template fetch via giget reads `TEMPLATES_DIR`, so updating that one constant is sufficient for the CLI's remote code path. - The CLI's **internal** `packages/cli/src/templates/` directory (which holds the `blank` and `_shared` bundled assets plus `generators.ts`/`remote.ts`) is a separate concept and is **not** touched here. Renaming that module belongs to PR 3 where the abstraction changes to a registry resolver. - `templates.json` keeps its existing shape and location (now at `registry/examples/templates.json`). **PR 3 will transform it** to the new `registry.json` shape introduced in PR 1 and generate a per-item `registry-item.json` for each example. Leaving the shape change to PR 3 keeps this PR a pure physical move. ## ⚠️ Breaking change for previously-installed CLIs (`hyperframes@0.1.0` – `0.3.0`) **What happens:** every published CLI version has `TEMPLATES_DIR = "templates"` baked in. After this PR lands on `main`, those CLIs will 404 on: - `raw.githubusercontent.com/heygen-com/hyperframes/main/templates/templates.json` (manifest list) — caught silently in `listRemoteTemplates`, so the template picker falls back to showing only `blank` - `github:heygen-com/hyperframes/templates/<id>#main` (giget download) — raises "Template downloaded but missing index.html" **Decision: accept the break.** Hyperframes is pre-1.0 OSS with a small installed base; complex mitigations (dual-path fetch, redirect stubs, manifest-at-old-path with empty array) add permanent maintenance cost for a one-time rename. **Rollout plan:** 1. Merge #252 (PR 1 — types & schemas) first 2. Merge this PR (#253) 3. Ship a patched CLI release (`hyperframes@0.3.1`) in the same work-day. Already-pinned old CLIs break on remote examples, but upgrading restores full functionality 4. Note the break in release notes + `CHANGELOG.md` under the `0.3.1` entry Users still on an older CLI will see the failure only if they invoke `hyperframes init` with `--template <non-blank>`; `--template blank` (bundled) continues to work offline on every version. ## Test plan - [x] `bun run test` in `packages/cli`: **57 passed** (was 55 on main, +2 regression tests for the path constants). Same 4 pre-existing failures (SRT/VTT whisper normalizer + `lintProject` clean-project test) — unchanged from main. No regressions - [x] **Manual smoke test**: `hyperframes init /tmp/x --template blank` works (bundled code path, unchanged) - [x] `bunx oxfmt --check` + `bunx oxlint`: clean - [x] `bun run typecheck` (core + studio, pre-commit hook): clean - [ ] **Manual smoke test for remote fetch (`--template warm-grain`)** — not verifiable locally before merge. Remote fetch resolves `github:heygen-com/hyperframes/registry/examples/<id>#main`, which doesn't exist until this PR lands. Will work on `main` immediately after merge. ## Breaking / migration - Internal repo path changes only. `--template` CLI flag continues to accept the same template names. - See "Breaking change for previously-installed CLIs" above — decision is to ship a simultaneous CLI release rather than add a compat shim. ## Commits 1. `d691bd1` — initial rename + CLI path constant update 2. `fc0c642` — review feedback: docstring fix, regression tests, clarifying comment in `init.ts`, export constants for testing ## Stacks on #252 — base branch. When #252 merges, this rebases onto `main`. ## Next in stack PR 3 — `feat(cli): registry resolver + installer`. Transforms `templates.json` to the new `registry.json` shape (from PR 1's schema), generates `registry-item.json` for every existing example, introduces `packages/cli/src/registry/{resolver,installer,remote}.ts`, renames the `packages/cli/src/templates/` CLI module, and refactors `init` to call through the new abstraction. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
325 lines
11 KiB
HTML
Vendored
325 lines
11 KiB
HTML
Vendored
<template id="overlays-template">
|
|
<div data-composition-id="overlays" data-width="1080" data-height="1920" data-duration="16.88">
|
|
<!-- 6-Column Grid Overlay (for visual reference during development, hidden by default) -->
|
|
<div class="vignelli-grid">
|
|
<div class="col"></div>
|
|
<div class="col"></div>
|
|
<div class="col"></div>
|
|
<div class="col"></div>
|
|
<div class="col"></div>
|
|
<div class="col"></div>
|
|
</div>
|
|
|
|
<!-- 1. 47% Motion Graphics -->
|
|
<div class="overlay-item motion-graphics-stat" id="stat-47">
|
|
<div class="red-bar"></div>
|
|
<div class="stat-content">
|
|
<div class="number">47%</div>
|
|
<div class="label">Motion Graphics</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 2. 62% Static Content (Full Canvas) -->
|
|
<div class="overlay-item static-content-stat" id="stat-62">
|
|
<div class="bg-charcoal"></div>
|
|
<div class="full-content">
|
|
<div class="large-number">62%</div>
|
|
<div class="large-label">Static Content</div>
|
|
<div class="red-accent"></div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 3. 3 out of 4 lack editing skills -->
|
|
<div class="overlay-item editing-skills-stat" id="stat-3-4">
|
|
<div class="text-block">
|
|
<span class="highlight">3 out of 4</span>
|
|
<br />lack editing skills
|
|
</div>
|
|
<div class="side-bar"></div>
|
|
</div>
|
|
|
|
<!-- 4. Hyperframes Branding -->
|
|
<div class="overlay-item branding-reveal" id="branding">
|
|
<div class="logo-container">
|
|
<div class="logo-text"><span class="heavy">HYPERFRAMES</span></div>
|
|
<div class="logo-underline"></div>
|
|
</div>
|
|
</div>
|
|
|
|
<style>
|
|
[data-composition-id="overlays"] {
|
|
position: relative;
|
|
width: 1080px;
|
|
height: 1920px;
|
|
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
color: #000000;
|
|
overflow: hidden;
|
|
pointer-events: none;
|
|
}
|
|
|
|
/* Grid System */
|
|
[data-composition-id="overlays"] .vignelli-grid {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
display: grid;
|
|
grid-template-columns: repeat(6, 1fr);
|
|
pointer-events: none;
|
|
z-index: 100;
|
|
opacity: 0; /* Hidden */
|
|
}
|
|
[data-composition-id="overlays"] .vignelli-grid .col {
|
|
border-right: 1px solid rgba(204, 0, 0, 0.1);
|
|
}
|
|
|
|
[data-composition-id="overlays"] .overlay-item {
|
|
position: absolute;
|
|
opacity: 0;
|
|
display: flex;
|
|
z-index: 10;
|
|
}
|
|
|
|
/* 1. 47% Stat Styles */
|
|
[data-composition-id="overlays"] #stat-47 {
|
|
bottom: 200px;
|
|
left: 0;
|
|
width: 540px; /* 3 columns */
|
|
height: 240px;
|
|
background: #ffffff;
|
|
flex-direction: row;
|
|
align-items: stretch;
|
|
}
|
|
[data-composition-id="overlays"] #stat-47 .red-bar {
|
|
width: 20px;
|
|
background: #cc0000;
|
|
}
|
|
[data-composition-id="overlays"] #stat-47 .stat-content {
|
|
padding: 40px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: center;
|
|
}
|
|
[data-composition-id="overlays"] #stat-47 .number {
|
|
font-size: 120px;
|
|
font-weight: 900;
|
|
line-height: 1;
|
|
letter-spacing: -2px;
|
|
}
|
|
[data-composition-id="overlays"] #stat-47 .label {
|
|
font-size: 32px;
|
|
font-weight: 700;
|
|
text-transform: uppercase;
|
|
margin-top: 10px;
|
|
}
|
|
|
|
/* 2. 62% Stat Styles (Full Canvas) */
|
|
[data-composition-id="overlays"] #stat-62 {
|
|
top: 0;
|
|
left: 0;
|
|
width: 1080px;
|
|
height: 1920px;
|
|
z-index: 50;
|
|
}
|
|
[data-composition-id="overlays"] #stat-62 .bg-charcoal {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
background: #1a1a1a;
|
|
}
|
|
[data-composition-id="overlays"] #stat-62 .full-content {
|
|
position: relative;
|
|
width: 100%;
|
|
height: 100%;
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: center;
|
|
padding: 0 90px; /* Align with grid */
|
|
}
|
|
[data-composition-id="overlays"] #stat-62 .large-number {
|
|
font-size: 400px;
|
|
font-weight: 900;
|
|
color: #ffffff;
|
|
line-height: 0.8;
|
|
letter-spacing: -10px;
|
|
}
|
|
[data-composition-id="overlays"] #stat-62 .large-label {
|
|
font-size: 80px;
|
|
font-weight: 700;
|
|
color: #ffffff;
|
|
text-transform: uppercase;
|
|
margin-top: 20px;
|
|
max-width: 600px;
|
|
}
|
|
[data-composition-id="overlays"] #stat-62 .red-accent {
|
|
position: absolute;
|
|
top: 0;
|
|
right: 0;
|
|
width: 180px; /* 1 column */
|
|
height: 100%;
|
|
background: #cc0000;
|
|
}
|
|
|
|
/* 3. 3 out of 4 Stat Styles */
|
|
[data-composition-id="overlays"] #stat-3-4 {
|
|
top: 400px;
|
|
right: 0;
|
|
width: 360px; /* 2 columns */
|
|
background: #ffffff;
|
|
padding: 40px;
|
|
flex-direction: row-reverse;
|
|
}
|
|
[data-composition-id="overlays"] #stat-3-4 .text-block {
|
|
font-size: 48px;
|
|
font-weight: 700;
|
|
line-height: 1.1;
|
|
text-align: right;
|
|
}
|
|
[data-composition-id="overlays"] #stat-3-4 .highlight {
|
|
color: #cc0000;
|
|
font-size: 64px;
|
|
font-weight: 900;
|
|
}
|
|
[data-composition-id="overlays"] #stat-3-4 .side-bar {
|
|
width: 10px;
|
|
background: #000000;
|
|
margin-left: 20px;
|
|
}
|
|
|
|
/* 4. Branding Styles */
|
|
[data-composition-id="overlays"] #branding {
|
|
bottom: 100px;
|
|
left: 90px;
|
|
width: 900px;
|
|
justify-content: center;
|
|
z-index: 60;
|
|
}
|
|
[data-composition-id="overlays"] #branding .logo-container {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
}
|
|
[data-composition-id="overlays"] #branding .logo-text {
|
|
font-size: 64px;
|
|
letter-spacing: 10px;
|
|
color: #000000;
|
|
}
|
|
[data-composition-id="overlays"] #branding .logo-text .heavy {
|
|
font-weight: 900;
|
|
}
|
|
[data-composition-id="overlays"] #branding .logo-text .light {
|
|
font-weight: 300;
|
|
}
|
|
[data-composition-id="overlays"] #branding .logo-underline {
|
|
width: 100%;
|
|
height: 8px;
|
|
background: #cc0000;
|
|
margin-top: 10px;
|
|
transform-origin: left;
|
|
}
|
|
</style>
|
|
|
|
<script src="https://cdn.jsdelivr.net/npm/gsap@3.14.2/dist/gsap.min.js"></script>
|
|
<script>
|
|
const tl = gsap.timeline({ paused: true });
|
|
const TRANSCRIPT = [
|
|
{ text: "We", start: 0.14, end: 0.239 },
|
|
{ text: "asked", start: 0.28, end: 0.459 },
|
|
{ text: "what", start: 0.5, end: 0.619 },
|
|
{ text: "you", start: 0.659, end: 0.779 },
|
|
{ text: "needed.", start: 0.8, end: 1.179 },
|
|
{ text: "Forty-seven", start: 1.199, end: 1.619 },
|
|
{ text: "percent", start: 1.699, end: 1.96 },
|
|
{ text: "of", start: 1.979, end: 2.059 },
|
|
{ text: "you", start: 2.099, end: 2.299 },
|
|
{ text: "said", start: 2.319, end: 2.499 },
|
|
{ text: "motion", start: 2.559, end: 2.839 },
|
|
{ text: "graphics,", start: 2.899, end: 3.759 },
|
|
{ text: "sixty-two", start: 3.799, end: 4.159 },
|
|
{ text: "percent", start: 4.239, end: 4.559 },
|
|
{ text: "said", start: 4.639, end: 4.799 },
|
|
{ text: "static", start: 4.859, end: 5.199 },
|
|
{ text: "content", start: 5.239, end: 5.639 },
|
|
{ text: "was", start: 5.679, end: 5.779 },
|
|
{ text: "costing", start: 5.859, end: 6.219 },
|
|
{ text: "you", start: 6.259, end: 6.339 },
|
|
{ text: "attention,", start: 6.379, end: 7.299 },
|
|
{ text: "and", start: 7.319, end: 7.439 },
|
|
{ text: "three", start: 7.48, end: 7.599 },
|
|
{ text: "out", start: 7.679, end: 7.779 },
|
|
{ text: "of", start: 7.799, end: 7.879 },
|
|
{ text: "four", start: 7.94, end: 8.139 },
|
|
{ text: "said", start: 8.279, end: 8.46 },
|
|
{ text: "you", start: 8.519, end: 8.6 },
|
|
{ text: "know", start: 8.619, end: 8.739 },
|
|
{ text: "the", start: 8.8, end: 8.88 },
|
|
{ text: "look", start: 8.92, end: 9.079 },
|
|
{ text: "you", start: 9.119, end: 9.259 },
|
|
{ text: "want", start: 9.279, end: 9.619 },
|
|
{ text: "but", start: 9.779, end: 9.88 },
|
|
{ text: "don't", start: 9.92, end: 10.1 },
|
|
{ text: "have", start: 10.159, end: 10.3 },
|
|
{ text: "the", start: 10.3, end: 10.42 },
|
|
{ text: "editing", start: 10.5, end: 10.779 },
|
|
{ text: "skills", start: 10.86, end: 11.139 },
|
|
{ text: "to", start: 11.159, end: 11.239 },
|
|
{ text: "get", start: 11.279, end: 11.439 },
|
|
{ text: "there.", start: 11.46, end: 12.239 },
|
|
{ text: "So", start: 12.3, end: 12.38 },
|
|
{ text: "we", start: 12.399, end: 12.519 },
|
|
{ text: "built", start: 12.539, end: 12.759 },
|
|
{ text: "Hyperframes", start: 12.84, end: 13.119 },
|
|
];
|
|
|
|
// Requirement 1: "47% Motion Graphics" (Start: 1.199, End: 3.759)
|
|
// Positioned in bottom half, columns 1-3.
|
|
tl.fromTo(
|
|
"#stat-47",
|
|
{ x: -540, opacity: 1 },
|
|
{ x: 0, duration: 0.8, ease: "expo.out" },
|
|
1.199,
|
|
);
|
|
tl.to("#stat-47", { x: -540, duration: 0.6, ease: "expo.in" }, 3.759 - 0.6);
|
|
|
|
// Requirement 2: "62% Static Content" (Start: 3.799, End: 7.299)
|
|
// Full canvas moment. Large bold typography across columns.
|
|
tl.set("#stat-62", { opacity: 1 }, 3.799);
|
|
tl.from("#stat-62 .bg-charcoal", { x: "100%", duration: 0.8, ease: "expo.out" }, 3.799);
|
|
tl.from("#stat-62 .red-accent", { x: "100%", duration: 0.8, ease: "expo.out" }, 3.899);
|
|
tl.from(
|
|
"#stat-62 .large-number",
|
|
{ y: 100, opacity: 0, duration: 1, ease: "expo.out" },
|
|
4.099,
|
|
);
|
|
tl.from("#stat-62 .large-label", { y: 50, opacity: 0, duration: 1, ease: "expo.out" }, 4.299);
|
|
|
|
tl.to("#stat-62", { x: "-100%", duration: 0.8, ease: "expo.in" }, 7.299 - 0.8);
|
|
|
|
// Requirement 3: "3 out of 4 lack editing skills" (Start: 7.319, End: 12.239)
|
|
// Positioned in columns 5-6 (right side) to avoid face (x: 300-776)
|
|
tl.fromTo(
|
|
"#stat-3-4",
|
|
{ x: 360, opacity: 1 },
|
|
{ x: 0, duration: 0.8, ease: "expo.out" },
|
|
7.319,
|
|
);
|
|
tl.to("#stat-3-4", { x: 360, duration: 0.6, ease: "expo.in" }, 12.239 - 0.6);
|
|
|
|
// Requirement 4: "Hyperframes" (Start: 12.84, End: 13.84)
|
|
tl.set("#branding", { opacity: 1 }, 12.84);
|
|
tl.from(
|
|
"#branding .logo-text",
|
|
{ y: 20, opacity: 0, duration: 0.6, ease: "expo.out" },
|
|
12.84,
|
|
);
|
|
tl.from("#branding .logo-underline", { scaleX: 0, duration: 0.8, ease: "expo.out" }, 13.04);
|
|
|
|
window.__timelines = window.__timelines || {};
|
|
window.__timelines["overlays"] = tl;
|
|
</script>
|
|
</div>
|
|
</template>
|