mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-11 14:50:02 +00:00
feat(registry): add Code Animations catalog section (9 blocks, incl. GPU)
Adds a Code Animations catalog section — 9 self-contained, installable blocks: morph, snippet-flight, typing, diff, highlight, scroll (DOM/GSAP) and 3d-extrude, shader-dissolve, particle-assemble (WebGL). Each block ships only its own effect and renders deterministically (paused GSAP timeline seeked per frame, seeded RNG, no render-time data fetch). Wires the catalog nav, registry.json, a new code-animation Studio category, and preview assets.
This commit is contained in:
@@ -182,7 +182,8 @@ export type BlockCategory =
|
||||
| "scenes"
|
||||
| "captions"
|
||||
| "effects"
|
||||
| "text-effects";
|
||||
| "text-effects"
|
||||
| "code-animation";
|
||||
|
||||
export interface BlockCategoryMeta {
|
||||
id: BlockCategory;
|
||||
@@ -192,6 +193,7 @@ export interface BlockCategoryMeta {
|
||||
|
||||
export const BLOCK_CATEGORIES: BlockCategoryMeta[] = [
|
||||
{ id: "captions", label: "Captions", color: "cyan" },
|
||||
{ id: "code-animation", label: "Code Animations", color: "emerald" },
|
||||
{ id: "vfx", label: "VFX", color: "purple" },
|
||||
{ id: "transitions", label: "Transitions", color: "blue" },
|
||||
{ id: "effects", label: "Effects", color: "rose" },
|
||||
@@ -205,6 +207,7 @@ export function resolveBlockCategory(tags: string[] | undefined): BlockCategory
|
||||
if (!tags || tags.length === 0) return "scenes";
|
||||
const set = new Set(tags);
|
||||
if (set.has("captions") || set.has("caption-style")) return "captions";
|
||||
if (set.has("code-animation")) return "code-animation";
|
||||
if (set.has("transition")) return "transitions";
|
||||
if (set.has("social") || set.has("overlay")) return "social";
|
||||
if (set.has("data") || set.has("chart") || set.has("map")) return "data";
|
||||
|
||||
Reference in New Issue
Block a user