You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs(contributing): refresh the catalog contribution guide (#2954)
The guide still described a 52-block registry, told contributors to run the
deprecated `validate` command, and listed gaps that have since shipped.
- Correct the counts: 113 blocks, 25 components
- `validate` -> `check` in the quick version
- Document the `demo.html` requirement for components (CI fails without it)
- Document `params` (drives the Studio customization panel) and the other
optional registry-item fields
- Add the monospace caption floor and `fitTextFontSize()` to the quality bar
- Add a motion-review checklist: rules paired with a self-check question
- Replace the manual preview-MP4 step with what catalog-previews CI does
- Rewrite "What's Needed Right Now" by the job a shot does in a video, and
drop the gaps that have shipped (karaoke, lower thirds, maps, news ticker)
Copy file name to clipboardExpand all lines: docs/contributing/catalog.mdx
+90-15Lines changed: 90 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,12 +3,12 @@ title: Contributing to the Catalog
3
3
description: How to add blocks and components to the HyperFrames registry.
4
4
---
5
5
6
-
Your agent already knows how to build video components. It writes HTML. HyperFrames renders it. The registry is the collection of everything that's been built — 52 blocks and counting.
6
+
Your agent already knows how to build video components. It writes HTML. HyperFrames renders it. The registry is the collection of everything that's been built — 113 blocks and 25 components.
7
7
8
8
This guide shows you how to add to it.
9
9
10
10
<Info>
11
-
**Quick version** — Fork the repo. Write one HTML file with a paused GSAP timeline. Add `registry-item.json`. Run `hyperframes lint` + `validate`. Publish with `npx hyperframes publish`. Open a PR.
11
+
**Quick version** — Fork the repo. Write one HTML file with a paused GSAP timeline. Add `registry-item.json`. Run `hyperframes lint` + `hyperframes check`. Publish with `npx hyperframes publish`. Open a PR.
12
12
</Info>
13
13
14
14
## Why Contribute?
@@ -53,12 +53,23 @@ The `/hyperframes-registry` skill scaffolds the structure, validates, renders a
53
53
54
54
### Structure
55
55
56
+
A block is two files. A component is three, because it also ships the demo the catalog renders it inside.
57
+
56
58
```
57
59
registry/blocks/my-block/
58
60
my-block.html ← the composition
59
61
registry-item.json ← metadata
62
+
63
+
registry/components/my-effect/
64
+
my-effect.html ← the snippet
65
+
demo.html ← the composition the catalog previews it in
66
+
registry-item.json ← metadata
60
67
```
61
68
69
+
<Warning>
70
+
`demo.html` is required for components. Preview generation skips any component without one, which fails the catalog CI job for your item.
Declare `params` and Studio opens a live customization panel the moment someone adds your block. Each entry maps a label to a CSS variable your composition reads, so a user can restyle it without editing HTML.
Types are `color`, `text`, `number`, and `select` (which takes an `options` array).
111
+
112
+
<Tip>
113
+
If your block has any brand surface — a color, a headline, a logo slot — expose it as a param. A block nobody can restyle gets forked instead of reused.
114
+
</Tip>
115
+
116
+
#### Other optional fields
117
+
118
+
| Field | What it does |
119
+
|-------|--------------|
120
+
|`author` / `authorUrl`| Credits you on the catalog page |
121
+
|`relatedSkill`| Links the catalog page to the skill that authors this kind of block |
122
+
|`registryDependencies`| Other registry items installed alongside yours |
123
+
|`license`| SPDX identifier, if yours differs from the repo's |
124
+
|`sourcePrompt`| The prompt that produced the block, for people remixing it |
125
+
|`minCliVersion`| Guards against installing into a CLI too old to run it |
126
+
|`deprecated`| Marks the item superseded, with the migration note as the value |
127
+
84
128
## The Rules
85
129
86
130
Five things that must be true for every registry item:
@@ -107,24 +151,39 @@ Five things that must be true for every registry item:
107
151
Break any of these and renders won't be reproducible. The renderer captures every frame by seeking the timeline — if your animation depends on real time or random state, it breaks.
108
152
</Warning>
109
153
154
+
Prefix every element ID with a 2-3 letter abbreviation of your item's name (`hz-cg-0`, `vc-canvas`). Unprefixed IDs collide when your block is used as a sub-composition.
155
+
110
156
## Quality Bar
111
157
112
158
Not everything belongs in the registry. The bar is production quality.
| Captions | 96px+ font (64-72px for monospace), text-stroke or shadow, `window.__hyperframes.fitTextFontSize()` on every group|
117
163
| VFX | Solves a problem that takes 4+ hours from scratch |
118
164
| Transitions | Smoother than CSS — if opacity 0→1 works, it's not a transition |
119
165
| Blocks | Would a professional use this in a client project? |
120
166
167
+
### Motion review
168
+
169
+
Passing `check` isn't the same as the motion being good. Watch your rendered preview once at full speed and answer these:
170
+
171
+
| Rule | Ask yourself |
172
+
|------|-------------|
173
+
| Key information holds still before the block ends | Does the headline or number sit motionless for at least a second after it lands, or is it still drifting at the cut? |
174
+
| Speed comes from acceleration, not constant velocity | Is anything moving at a constant rate? Linear motion reads as a slide deck. |
175
+
| Default one notch slower than feels right | Was there anything you couldn't read on the first watch? |
176
+
| One hero per block | Count what's animating in the first second. More than one and the eye has nowhere to land. |
177
+
| Light effects aren't sprayed | Count the glints and sweeps. More than one, or any that spills past a rounded corner, is a cut. |
178
+
121
179
### Common rejection reasons
122
180
123
181
1.**"Looks like a demo"** — a spinning cube is not a component
124
182
2.**"Text unreadable"** — font too small, no contrast treatment
125
183
3.**"Non-deterministic"** — `Math.random()` or `Date.now()`
126
184
4.**"Timeline not found"** — ID mismatch between HTML and JS
127
185
5.**"Breaks as sub-composition"** — element IDs collide (prefix everything)
186
+
6.**"Nothing to tune"** — a branded block with no `params`
128
187
129
188
## Workflow
130
189
@@ -136,13 +195,13 @@ Not everything belongs in the registry. The bar is production quality.
136
195
```
137
196
</Step>
138
197
<Steptitle="Write your block">
139
-
Create the HTML composition and `registry-item.json`. Use the templates above.
198
+
Create the HTML composition and `registry-item.json`. Use the templates above. For a component, add `demo.html` too.
140
199
</Step>
141
200
<Steptitle="Validate">
142
201
```bash
143
202
hyperframes lint
144
203
hyperframes check
145
-
npx oxfmt your-block.html
204
+
npx oxfmt registry/blocks/your-block/*.html
146
205
```
147
206
</Step>
148
207
<Steptitle="Update registry">
@@ -161,26 +220,42 @@ Not everything belongs in the registry. The bar is production quality.
161
220
```bash
162
221
npx hyperframes publish
163
222
```
164
-
Open a PR with your [hyperframes.dev](https://hyperframes.dev) preview link.
223
+
Open a PR with your [hyperframes.dev](https://hyperframes.dev) preview link. Commit your item directory, `registry/registry.json`, and the generated `docs/catalog/` page.
165
224
</Step>
166
225
</Steps>
167
226
168
-
**External contributors:** attach the preview MP4 to your PR. A maintainer handles the catalog image.
227
+
CI renders the catalog PNG and MP4 for every block or component your PR touches, so there's nothing to attach by hand. A maintainer publishes the final catalog image before merge.
228
+
229
+
### What to write in the PR body
230
+
231
+
The one-line `description` tells a reader what your block looks like. It doesn't tell them when to reach for it, which is what decides whether it gets used. Three lines in the PR body:
232
+
233
+
-**When to use it** — name the moment, e.g. "second beat of a product promo, right after the hero card lands"
234
+
-**Duration range** — your block has a fixed `duration`; say what range still reads correctly
235
+
-**Known pitfalls** — a font that must be loaded, a background it needs contrast against, a length past which it stops working
169
236
170
237
**HeyGen internal:** run `scripts/upload-docs-images.sh` to push catalog PNGs.
171
238
172
239
## What's Needed Right Now
173
240
174
-
These are gaps in the registry. If you're looking for something to build, start here.
241
+
The catalog is lopsided. It has 29 transitions and 33 code blocks, and almost nothing for the moments that carry a video's shape. These gaps are sorted by the job the shot does, not by the technique it uses.
242
+
243
+
| Job in the video | Blocks today | Gap |
244
+
|------------------|--------------|-----|
245
+
| Opening / hero reveal | 2 | The most-used moment in any promo has two options |
0 commit comments