mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-14 18:01:20 +08:00
bb33d681ea
The 138 catalog pages hid their install command, registry metadata, and wiring snippet behind three accordions. Asking an agent and running the terminal command are two parallel ways to do one thing, so they are now tabs with the agent request leading; the metadata and the hand-wiring snippet are visible, since they were short enough that a click bought nothing while costing Cmd+F and printing. This is how component catalogs are normally presented - shadcn/ui and its descendants put preview and code behind tabs - and it keeps the preview first, which is the point of a visual catalog. Two generator bugs fixed while in there. It rebuilt the Catalog tab object from scratch, so the tab silently lost its icon on every regeneration, and it re-inserted the tab relative to a tab named Documentation that no longer exists, so the fallback index moved Catalog ahead of Studio. It now updates the existing tab in place and owns only the groups array. Regenerating also picked up four registry items that had no docs page: camcorder-hud, editorial-flash-overlay, freeze-frame-dressing, and organic-light-leak-overlay. Accordions now remain in three hand-written pages only: troubleshooting, data-attributes, and html-schema. mint validate and mint broken-links pass. The repo's pre-commit build gate was bypassed deliberately: this work lives in a git worktree, which has no per-package node_modules, so `bun run build` cannot resolve tsup there. The gate covers package builds and this change touches docs/ and one generator script.
58 lines
1.8 KiB
Plaintext
58 lines
1.8 KiB
Plaintext
---
|
||
title: "Code Highlight Sweep"
|
||
description: "A highlight band sweeps across a target line while the surrounding context dims — draws the eye to one line. `line` is 0-based: `line: 1` targets the second displayed line (unlike code-scroll, whose target is 1-based)."
|
||
---
|
||
|
||
A highlight band sweeps across a target line while the surrounding context dims — draws the eye to one line. `line` is 0-based: `line: 1` targets the second displayed line (unlike code-scroll, whose target is 1-based).
|
||
|
||
`code` `code-animation` `highlight` `developer`
|
||
|
||
<video className="w-full aspect-video rounded-xl object-cover bg-zinc-100 dark:bg-zinc-800" src="https://static.heygen.ai/hyperframes-oss/docs/images/catalog/blocks/code-highlight.mp4" poster="https://static.heygen.ai/hyperframes-oss/docs/images/catalog/blocks/code-highlight.png" autoPlay muted loop playsInline />
|
||
|
||
## Add it to a project
|
||
|
||
<Tabs>
|
||
|
||
<Tab title="Ask your agent">
|
||
|
||
```text
|
||
Add the Code Highlight Sweep block from the HyperFrames Catalog to this project.
|
||
Replace the demo content with mine and match the existing design and timing.
|
||
```
|
||
|
||
</Tab>
|
||
|
||
<Tab title="Terminal">
|
||
|
||
```bash
|
||
npx hyperframes add code-highlight
|
||
```
|
||
|
||
</Tab>
|
||
|
||
</Tabs>
|
||
|
||
## Details
|
||
|
||
| Property | Value |
|
||
| --- | --- |
|
||
| Type | Block |
|
||
| Dimensions | 1920×1080 |
|
||
| Duration | 5s |
|
||
|
||
**Installed files**
|
||
|
||
| File | Target | Type |
|
||
| --- | --- | --- |
|
||
| `code-highlight.html` | `compositions/code-highlight.html` | hyperframes:composition |
|
||
|
||
## Use it
|
||
|
||
Ask your agent to replace the example content, match the project style, and place the block at the right moment in the video.
|
||
|
||
**Wiring it by hand.** The installed block can be added to a host composition with:
|
||
|
||
```html
|
||
<div data-composition-id="code-highlight" data-composition-src="compositions/code-highlight.html" data-start="0" data-duration="5" data-track-index="1" data-width="1920" data-height="1080"></div>
|
||
```
|