dsh-hyperframes 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/README.en.md +35 -0
  2. package/README.md +35 -0
  3. package/cordis.patch.yml +7 -0
  4. package/lib/index.d.ts +35 -0
  5. package/lib/index.js +74 -0
  6. package/package.json +63 -0
  7. package/skills/gsap/SKILL.md +213 -0
  8. package/skills/gsap/references/effects.md +297 -0
  9. package/skills/gsap/scripts/extract-audio-data.py +188 -0
  10. package/skills/hyperframes/SKILL.md +366 -0
  11. package/skills/hyperframes/data-in-motion.md +19 -0
  12. package/skills/hyperframes/house-style.md +71 -0
  13. package/skills/hyperframes/palettes/bold-energetic.md +14 -0
  14. package/skills/hyperframes/palettes/clean-corporate.md +14 -0
  15. package/skills/hyperframes/palettes/dark-premium.md +14 -0
  16. package/skills/hyperframes/palettes/jewel-rich.md +14 -0
  17. package/skills/hyperframes/palettes/monochrome.md +14 -0
  18. package/skills/hyperframes/palettes/nature-earth.md +14 -0
  19. package/skills/hyperframes/palettes/neon-electric.md +14 -0
  20. package/skills/hyperframes/palettes/pastel-soft.md +14 -0
  21. package/skills/hyperframes/palettes/warm-editorial.md +14 -0
  22. package/skills/hyperframes/patterns.md +118 -0
  23. package/skills/hyperframes/references/audio-reactive.md +76 -0
  24. package/skills/hyperframes/references/captions.md +132 -0
  25. package/skills/hyperframes/references/css-patterns.md +373 -0
  26. package/skills/hyperframes/references/dynamic-techniques.md +90 -0
  27. package/skills/hyperframes/references/motion-principles.md +69 -0
  28. package/skills/hyperframes/references/transcript-guide.md +151 -0
  29. package/skills/hyperframes/references/transitions/catalog.md +117 -0
  30. package/skills/hyperframes/references/transitions/css-3d.md +12 -0
  31. package/skills/hyperframes/references/transitions/css-blur.md +51 -0
  32. package/skills/hyperframes/references/transitions/css-cover.md +43 -0
  33. package/skills/hyperframes/references/transitions/css-destruction.md +95 -0
  34. package/skills/hyperframes/references/transitions/css-dissolve.md +66 -0
  35. package/skills/hyperframes/references/transitions/css-distortion.md +45 -0
  36. package/skills/hyperframes/references/transitions/css-grid.md +10 -0
  37. package/skills/hyperframes/references/transitions/css-light.md +49 -0
  38. package/skills/hyperframes/references/transitions/css-mechanical.md +30 -0
  39. package/skills/hyperframes/references/transitions/css-other.md +25 -0
  40. package/skills/hyperframes/references/transitions/css-push.md +41 -0
  41. package/skills/hyperframes/references/transitions/css-radial.md +37 -0
  42. package/skills/hyperframes/references/transitions/css-scale.md +24 -0
  43. package/skills/hyperframes/references/transitions.md +112 -0
  44. package/skills/hyperframes/references/tts.md +75 -0
  45. package/skills/hyperframes/references/typography.md +175 -0
  46. package/skills/hyperframes/scripts/animation-map.mjs +596 -0
  47. package/skills/hyperframes/scripts/contrast-report.mjs +335 -0
  48. package/skills/hyperframes/visual-styles.md +211 -0
  49. package/skills/hyperframes-cli/SKILL.md +152 -0
  50. package/skills/hyperframes-registry/SKILL.md +106 -0
  51. package/skills/hyperframes-registry/examples/add-block.md +51 -0
  52. package/skills/hyperframes-registry/examples/add-component.md +73 -0
  53. package/skills/hyperframes-registry/references/demo-html-pattern.md +54 -0
  54. package/skills/hyperframes-registry/references/discovery.md +53 -0
  55. package/skills/hyperframes-registry/references/install-locations.md +45 -0
  56. package/skills/hyperframes-registry/references/wiring-blocks.md +91 -0
  57. package/skills/hyperframes-registry/references/wiring-components.md +77 -0
  58. package/skills/website-to-hyperframes/SKILL.md +125 -0
  59. package/skills/website-to-hyperframes/references/step-1-capture.md +74 -0
  60. package/skills/website-to-hyperframes/references/step-2-design.md +178 -0
  61. package/skills/website-to-hyperframes/references/step-3-script.md +96 -0
  62. package/skills/website-to-hyperframes/references/step-4-storyboard.md +246 -0
  63. package/skills/website-to-hyperframes/references/step-5-vo.md +42 -0
  64. package/skills/website-to-hyperframes/references/step-6-build.md +229 -0
  65. package/skills/website-to-hyperframes/references/step-7-validate.md +114 -0
  66. package/skills/website-to-hyperframes/references/techniques.md +387 -0
@@ -0,0 +1,152 @@
1
+ ---
2
+ name: hyperframes-cli
3
+ description: "HyperFrames CLI tool — hyperframes init, lint, inspect, preview, render, transcribe, tts, doctor, browser, info, upgrade, compositions, docs, benchmark. Use when scaffolding a project, linting, validating, inspecting visual layout in compositions, previewing in the studio, rendering to video, transcribing audio, generating TTS, or troubleshooting the HyperFrames environment. 中文:使用 hyperframes 命令行(初始化/校验/预览/渲染/转写/配音/环境诊断)时使用。"
4
+ compatibility: Requires Node.js >= 22 and FFmpeg on PATH; the CLI runs via `npx hyperframes`.
5
+ allowed-tools: Bash
6
+ ---
7
+
8
+ # HyperFrames CLI
9
+
10
+ Everything runs through `npx hyperframes`. Requires Node.js >= 22 and FFmpeg.
11
+
12
+ ## Workflow
13
+
14
+ 1. **Scaffold** — `npx hyperframes init my-video`
15
+ 2. **Write** — author HTML composition (see the `hyperframes` skill)
16
+ 3. **Lint** — `npx hyperframes lint`
17
+ 4. **Visual inspect** — `npx hyperframes inspect`
18
+ 5. **Preview** — `npx hyperframes preview`
19
+ 6. **Render** — `npx hyperframes render`
20
+
21
+ Lint and inspect before preview. `lint` catches missing `data-composition-id`, overlapping tracks, and unregistered timelines. `inspect` opens the rendered composition in headless Chrome, seeks through the timeline, and reports text spilling out of bubbles/containers or off the canvas.
22
+
23
+ ## Scaffolding
24
+
25
+ ```bash
26
+ npx hyperframes init my-video # interactive wizard
27
+ npx hyperframes init my-video --example warm-grain # pick an example
28
+ npx hyperframes init my-video --video clip.mp4 # with video file
29
+ npx hyperframes init my-video --audio track.mp3 # with audio file
30
+ npx hyperframes init my-video --non-interactive # skip prompts (CI/agents)
31
+ ```
32
+
33
+ Templates: `blank`, `warm-grain`, `play-mode`, `swiss-grid`, `vignelli`, `decision-tree`, `kinetic-type`, `product-promo`, `nyt-graph`.
34
+
35
+ `init` creates the right file structure, copies media, transcribes audio with Whisper, and installs AI coding skills. Use it instead of creating files by hand.
36
+
37
+ ## Linting
38
+
39
+ ```bash
40
+ npx hyperframes lint # current directory
41
+ npx hyperframes lint ./my-project # specific project
42
+ npx hyperframes lint --verbose # info-level findings
43
+ npx hyperframes lint --json # machine-readable
44
+ ```
45
+
46
+ Lints `index.html` and all files in `compositions/`. Reports errors (must fix), warnings (should fix), and info (with `--verbose`).
47
+
48
+ ## Visual Inspect
49
+
50
+ ```bash
51
+ npx hyperframes inspect # inspect rendered layout over the timeline
52
+ npx hyperframes inspect ./my-project # specific project
53
+ npx hyperframes inspect --json # agent-readable findings
54
+ npx hyperframes inspect --samples 15 # denser timeline sweep
55
+ npx hyperframes inspect --at 1.5,4,7.25 # explicit hero-frame timestamps
56
+ ```
57
+
58
+ Use this after `lint` and `validate`, especially for compositions with speech bubbles, cards, captions, or tight typography. It reports:
59
+
60
+ - Text extending outside the nearest visual container or bubble
61
+ - Text clipped by its own fixed-width/fixed-height box
62
+ - Text extending outside the composition canvas
63
+ - Children escaping clipping containers
64
+
65
+ Errors should be fixed before rendering. Warnings are surfaced for agent review; add `--strict` to fail on warnings too. Repeated static issues are collapsed by default so JSON output stays compact for LLM context windows. If overflow is intentional for an entrance/exit animation, mark the element or ancestor with `data-layout-allow-overflow`. If a decorative element should never be audited, mark it with `data-layout-ignore`.
66
+
67
+ `npx hyperframes layout` remains available as a compatibility alias for the same visual inspection pass.
68
+
69
+ ## Previewing
70
+
71
+ ```bash
72
+ npx hyperframes preview # serve current directory
73
+ npx hyperframes preview --port 4567 # custom port (default 3002)
74
+ ```
75
+
76
+ Hot-reloads on file changes. Opens the studio in your browser automatically.
77
+
78
+ When handing a project back to the user, use the Studio project URL, not the
79
+ source `index.html` path:
80
+
81
+ ```text
82
+ http://localhost:<port>/#project/<project-name>
83
+ ```
84
+
85
+ Use the actual port from the preview output and the project directory name. For
86
+ example, after `npx hyperframes preview --port 3017` in `hyperframes-video`,
87
+ report `http://localhost:3017/#project/hyperframes-video`.
88
+
89
+ Treat `index.html` as source-code context only. It is fine to link it as an
90
+ implementation file, but do not label it as the project or preview surface.
91
+
92
+ ## Rendering
93
+
94
+ ```bash
95
+ npx hyperframes render # standard MP4
96
+ npx hyperframes render --output final.mp4 # named output
97
+ npx hyperframes render --quality draft # fast iteration
98
+ npx hyperframes render --fps 60 --quality high # final delivery
99
+ npx hyperframes render --format webm # transparent WebM
100
+ npx hyperframes render --docker # byte-identical
101
+ ```
102
+
103
+ | Flag | Options | Default | Notes |
104
+ | -------------- | --------------------- | -------------------------- | --------------------------- |
105
+ | `--output` | path | renders/name_timestamp.mp4 | Output path |
106
+ | `--fps` | 24, 30, 60 | 30 | 60fps doubles render time |
107
+ | `--quality` | draft, standard, high | standard | draft for iterating |
108
+ | `--format` | mp4, webm | mp4 | WebM supports transparency |
109
+ | `--workers` | 1-8 or auto | auto | Each spawns Chrome |
110
+ | `--docker` | flag | off | Reproducible output |
111
+ | `--gpu` | flag | off | GPU-accelerated encoding |
112
+ | `--strict` | flag | off | Fail on lint errors |
113
+ | `--strict-all` | flag | off | Fail on errors AND warnings |
114
+
115
+ **Quality guidance:** `draft` while iterating, `standard` for review, `high` for final delivery.
116
+
117
+ ## Transcription
118
+
119
+ ```bash
120
+ npx hyperframes transcribe audio.mp3
121
+ npx hyperframes transcribe video.mp4 --model medium.en --language en
122
+ npx hyperframes transcribe subtitles.srt # import existing
123
+ npx hyperframes transcribe subtitles.vtt
124
+ npx hyperframes transcribe openai-response.json
125
+ ```
126
+
127
+ ## Text-to-Speech
128
+
129
+ ```bash
130
+ npx hyperframes tts "Text here" --voice af_nova --output narration.wav
131
+ npx hyperframes tts script.txt --voice bf_emma
132
+ npx hyperframes tts --list # show all voices
133
+ ```
134
+
135
+ ## Troubleshooting
136
+
137
+ ```bash
138
+ npx hyperframes doctor # check environment (Chrome, FFmpeg, Node, memory)
139
+ npx hyperframes browser # manage bundled Chrome
140
+ npx hyperframes info # version and environment details
141
+ npx hyperframes upgrade # check for updates
142
+ ```
143
+
144
+ Run `doctor` first if rendering fails. Common issues: missing FFmpeg, missing Chrome, low memory.
145
+
146
+ ## Other
147
+
148
+ ```bash
149
+ npx hyperframes compositions # list compositions in project
150
+ npx hyperframes docs # open documentation
151
+ npx hyperframes benchmark . # benchmark render performance
152
+ ```
@@ -0,0 +1,106 @@
1
+ ---
2
+ name: hyperframes-registry
3
+ description: "Install and wire registry blocks and components into HyperFrames compositions. Use when running hyperframes add, installing a block or component, wiring an installed item into index.html, or working with hyperframes.json. Covers the add command, install locations, block sub-composition wiring, component snippet merging, and registry discovery. 中文:安装/接线 HyperFrames 注册表组件(hyperframes add)时使用。"
4
+ compatibility: Requires Node.js >= 22; the `hyperframes add` command needs network access to the registry.
5
+ allowed-tools: Bash
6
+ ---
7
+
8
+ # HyperFrames Registry
9
+
10
+ The registry provides reusable blocks and components installable via `hyperframes add <name>`.
11
+
12
+ - **Blocks** — standalone sub-compositions (own dimensions, duration, timeline). Included via `data-composition-src` in a host composition.
13
+ - **Components** — effect snippets (no own dimensions). Pasted directly into a host composition's HTML.
14
+
15
+ ## When to use this skill
16
+
17
+ - User mentions `hyperframes add`, "block", "component", or `hyperframes.json`
18
+ - Output from `hyperframes add` appears in the session (file paths, clipboard snippet)
19
+ - You need to wire an installed item into an existing composition
20
+ - You want to discover what's available in the registry
21
+
22
+ ## Quick reference
23
+
24
+ ```bash
25
+ hyperframes add data-chart # install a block
26
+ hyperframes add grain-overlay # install a component
27
+ hyperframes add shimmer-sweep --dir . # target a specific project
28
+ hyperframes add data-chart --json # machine-readable output
29
+ hyperframes add data-chart --no-clipboard # skip clipboard (CI/headless)
30
+ ```
31
+
32
+ After install, the CLI prints which files were written and a snippet to paste into your host composition. The snippet is a starting point — you'll need to add `data-composition-id` (must match the block's internal composition ID), `data-start`, and `data-track-index` attributes when wiring blocks.
33
+
34
+ Note: `hyperframes add` only works for blocks and components. For examples, use `hyperframes init <dir> --example <name>` instead.
35
+
36
+ ## Install locations
37
+
38
+ Blocks install to `compositions/<name>.html` by default.
39
+ Components install to `compositions/components/<name>.html` by default.
40
+
41
+ These paths are configurable in `hyperframes.json`:
42
+
43
+ ```json
44
+ {
45
+ "registry": "https://raw.githubusercontent.com/heygen-com/hyperframes/main/registry",
46
+ "paths": {
47
+ "blocks": "compositions",
48
+ "components": "compositions/components",
49
+ "assets": "assets"
50
+ }
51
+ }
52
+ ```
53
+
54
+ See [install-locations.md](./references/install-locations.md) for full details.
55
+
56
+ ## Wiring blocks
57
+
58
+ Blocks are standalone compositions — include them via `data-composition-src` in your host `index.html`:
59
+
60
+ ```html
61
+ <div
62
+ data-composition-id="data-chart"
63
+ data-composition-src="compositions/data-chart.html"
64
+ data-start="2"
65
+ data-duration="15"
66
+ data-track-index="1"
67
+ data-width="1920"
68
+ data-height="1080"
69
+ ></div>
70
+ ```
71
+
72
+ Key attributes:
73
+
74
+ - `data-composition-src` — path to the block HTML file
75
+ - `data-composition-id` — must match the block's internal ID
76
+ - `data-start` — when the block appears in the host timeline (seconds)
77
+ - `data-duration` — how long the block plays
78
+ - `data-width` / `data-height` — block canvas dimensions
79
+ - `data-track-index` — layer ordering (higher = in front)
80
+
81
+ See [wiring-blocks.md](./references/wiring-blocks.md) for full details.
82
+
83
+ ## Wiring components
84
+
85
+ Components are snippets — paste their HTML into your composition's markup, their CSS into your style block, and their JS into your script (if any):
86
+
87
+ 1. Read the installed file (e.g., `compositions/components/grain-overlay.html`)
88
+ 2. Copy the HTML elements into your composition's `<div data-composition-id="...">`
89
+ 3. Copy the `<style>` block into your composition's styles
90
+ 4. Copy any `<script>` content into your composition's script (before your timeline code)
91
+ 5. If the component exposes GSAP timeline integration (see the comment block in the snippet), add those calls to your timeline
92
+
93
+ See [wiring-components.md](./references/wiring-components.md) for full details.
94
+
95
+ ## Discovery
96
+
97
+ Browse available items:
98
+
99
+ ```bash
100
+ # Read the registry manifest
101
+ curl -s https://raw.githubusercontent.com/heygen-com/hyperframes/main/registry/registry.json
102
+ ```
103
+
104
+ Each item's `registry-item.json` contains: name, type, title, description, tags, dimensions (blocks only), duration (blocks only), and file list.
105
+
106
+ See [discovery.md](./references/discovery.md) for details on filtering by type and tags.
@@ -0,0 +1,51 @@
1
+ # Worked Example: Adding a Block
2
+
3
+ ## Scenario
4
+
5
+ User has an existing HyperFrames project and wants to add an animated chart alongside their video content.
6
+
7
+ ## Steps
8
+
9
+ ### 1. Install the block
10
+
11
+ ```bash
12
+ hyperframes add data-chart
13
+ ```
14
+
15
+ ### 2. Wire into index.html
16
+
17
+ ```html
18
+ <div id="stage" data-composition-id="main" data-width="1920" data-height="1080" data-duration="30">
19
+ <video
20
+ id="speaker"
21
+ src="speaker.mp4"
22
+ data-start="0"
23
+ data-duration="30"
24
+ data-track-index="0"
25
+ style="position: absolute; width: 60%; height: 100%; left: 0; top: 0; object-fit: cover;"
26
+ ></video>
27
+
28
+ <!-- Data chart appears at 5s in the right 40% of the screen -->
29
+ <div
30
+ data-composition-id="data-chart"
31
+ data-composition-src="compositions/data-chart.html"
32
+ data-start="5"
33
+ data-duration="15"
34
+ data-track-index="1"
35
+ data-width="1920"
36
+ data-height="1080"
37
+ style="position: absolute; right: 0; top: 0; width: 40%; height: 100%;"
38
+ ></div>
39
+ </div>
40
+ ```
41
+
42
+ ### 3. Lint and preview
43
+
44
+ ```bash
45
+ hyperframes lint
46
+ hyperframes preview
47
+ ```
48
+
49
+ ### 4. Customize (optional)
50
+
51
+ Edit `compositions/data-chart.html` — data arrays are at the top of the script, colors are in the CSS rules scoped under `[data-composition-id="data-chart"]`.
@@ -0,0 +1,73 @@
1
+ # Worked Example: Adding a Component
2
+
3
+ ## Scenario
4
+
5
+ User wants to add a shimmer light sweep effect to their title text.
6
+
7
+ ## Steps
8
+
9
+ ### 1. Install the component
10
+
11
+ ```bash
12
+ hyperframes add shimmer-sweep
13
+ ```
14
+
15
+ ### 2. Read the snippet
16
+
17
+ Open `compositions/components/shimmer-sweep.html` and read the comment header.
18
+
19
+ ### 3. Wire into your composition
20
+
21
+ **HTML** — wrap target elements:
22
+
23
+ ```html
24
+ <div class="shimmer-sweep-target" style="--shimmer-color: rgba(255, 255, 255, 0.5)">
25
+ <h1 class="title">AI-Powered Video</h1>
26
+ </div>
27
+ ```
28
+
29
+ **CSS** — paste the `.shimmer-sweep-target` and `.shimmer-mask` rules from the snippet.
30
+
31
+ **JS** — paste the auto-injection script (before timeline code):
32
+
33
+ ```js
34
+ document.querySelectorAll(".shimmer-sweep-target").forEach((el) => {
35
+ if (!el.querySelector(".shimmer-mask")) {
36
+ const mask = document.createElement("div");
37
+ mask.className = "shimmer-mask";
38
+ el.appendChild(mask);
39
+ }
40
+ });
41
+ ```
42
+
43
+ **Timeline** — add the sweep:
44
+
45
+ ```js
46
+ tl.fromTo(
47
+ ".shimmer-sweep-target",
48
+ {
49
+ "--shimmer-pos": "-20%",
50
+ },
51
+ {
52
+ "--shimmer-pos": "120%",
53
+ duration: 1.2,
54
+ ease: "power2.inOut",
55
+ stagger: 0.15,
56
+ },
57
+ 1.5,
58
+ );
59
+ ```
60
+
61
+ ### 4. Lint and preview
62
+
63
+ ```bash
64
+ hyperframes lint
65
+ hyperframes preview
66
+ ```
67
+
68
+ ### 5. Customize
69
+
70
+ - `--shimmer-color`: highlight color per element
71
+ - `--shimmer-width`: light band width (default 20%)
72
+ - `--shimmer-angle`: sweep direction (default 120deg)
73
+ - Timeline `duration`, `ease`, `stagger`: control speed and feel
@@ -0,0 +1,54 @@
1
+ # The demo.html Convention
2
+
3
+ ## Why components ship demo.html
4
+
5
+ Every component in the registry ships a companion `demo.html` file alongside its snippet. The demo serves two purposes:
6
+
7
+ 1. **Preview fixture** — the CI preview pipeline renders the demo to generate thumbnail images and preview videos for the catalog docs page.
8
+
9
+ 2. **Usage example** — the demo shows the component effect applied to representative content, serving as a working reference.
10
+
11
+ ## Demo structure
12
+
13
+ A demo is a complete, standalone HTML composition:
14
+
15
+ ```html
16
+ <!doctype html>
17
+ <html lang="en">
18
+ <head>
19
+ <meta charset="UTF-8" />
20
+ <meta name="viewport" content="width=1920, height=1080" />
21
+ <title>Component Name — Demo</title>
22
+ <script src="https://cdn.jsdelivr.net/npm/gsap@3.14.2/dist/gsap.min.js"></script>
23
+ <style>
24
+ /* reset + canvas size */
25
+ </style>
26
+ </head>
27
+ <body>
28
+ <div data-composition-id="<name>-demo" data-width="1920" data-height="1080" data-duration="N">
29
+ <!-- Demo content showing the effect -->
30
+ <!-- Component snippet inlined here -->
31
+ </div>
32
+ <script>
33
+ // GSAP timeline demonstrating the effect
34
+ window.__timelines = window.__timelines || {};
35
+ window.__timelines["<name>-demo"] = tl;
36
+ </script>
37
+ </body>
38
+ </html>
39
+ ```
40
+
41
+ Key conventions:
42
+
43
+ - `data-composition-id` is `<component-name>-demo` to avoid collisions
44
+ - The demo is self-contained — all CSS and JS from the snippet is inlined
45
+ - The GSAP timeline is registered on `window.__timelines`
46
+ - Duration should be long enough to showcase the effect (typically 5-8 seconds)
47
+
48
+ ## Blocks don't need demo.html
49
+
50
+ Blocks are already standalone compositions that can be rendered directly. Only components need the demo wrapper.
51
+
52
+ ## Demos are not installed
53
+
54
+ The `demo.html` is NOT installed by `hyperframes add` — it exists only in the registry for preview generation and as a reference.
@@ -0,0 +1,53 @@
1
+ # Registry Discovery
2
+
3
+ ## Reading the registry manifest
4
+
5
+ The top-level `registry.json` lists all available items:
6
+
7
+ ```bash
8
+ curl -s https://raw.githubusercontent.com/heygen-com/hyperframes/main/registry/registry.json
9
+ ```
10
+
11
+ Each entry has `name` and `type` (`hyperframes:example`, `hyperframes:block`, or `hyperframes:component`).
12
+
13
+ ## Reading an item's manifest
14
+
15
+ Each item has a `registry-item.json` with full metadata:
16
+
17
+ ```
18
+ <base>/<type-dir>/<name>/registry-item.json
19
+ ```
20
+
21
+ Where `<type-dir>` is `examples`, `blocks`, or `components`.
22
+
23
+ ## Item manifest fields
24
+
25
+ | Field | Type | Required | Description |
26
+ | ---------------------- | -------- | -------- | ---------------------------------------------- |
27
+ | `name` | string | yes | Kebab-case identifier |
28
+ | `type` | string | yes | `hyperframes:block` or `hyperframes:component` |
29
+ | `title` | string | yes | Human-readable title |
30
+ | `description` | string | yes | One-line description |
31
+ | `tags` | string[] | no | Filter tags (e.g., `["data", "chart"]`) |
32
+ | `dimensions` | object | blocks | `{ width, height }` — blocks only |
33
+ | `duration` | number | blocks | Duration in seconds — blocks only |
34
+ | `files` | array | yes | Files to install (`path`, `target`, `type`) |
35
+ | `registryDependencies` | string[] | no | Other registry items this depends on |
36
+
37
+ ## Available items
38
+
39
+ ### Blocks
40
+
41
+ | Name | Description | Tags |
42
+ | ------------ | ----------------------------------------------- | ------------------------------- |
43
+ | `data-chart` | Animated bar + line chart with staggered reveal | data, chart, statistics |
44
+ | `flowchart` | Decision tree with SVG connectors and cursor | diagram, flowchart, interactive |
45
+ | `logo-outro` | Cinematic logo reveal with tagline | branding, outro, logo |
46
+
47
+ ### Components
48
+
49
+ | Name | Description | Tags |
50
+ | -------------------- | --------------------------------------- | -------------------------------- |
51
+ | `grain-overlay` | Animated film grain texture overlay | texture, grain, overlay, film |
52
+ | `shimmer-sweep` | CSS gradient light sweep for AI accents | text, shimmer, highlight, effect |
53
+ | `grid-pixelate-wipe` | Grid dissolve transition between scenes | transition, wipe, grid, pixelate |
@@ -0,0 +1,45 @@
1
+ # Install Locations
2
+
3
+ ## Default paths
4
+
5
+ | Item type | Default install path | Configured by |
6
+ | --------- | ------------------------------------- | ----------------------------------- |
7
+ | Block | `compositions/<name>.html` | `hyperframes.json#paths.blocks` |
8
+ | Component | `compositions/components/<name>.html` | `hyperframes.json#paths.components` |
9
+
10
+ ## How path remapping works
11
+
12
+ The `target` field in each item's `registry-item.json` specifies a default install path. The `add` command remaps the prefix based on `hyperframes.json#paths`:
13
+
14
+ - Block targets starting with `compositions/` get remapped to `<paths.blocks>/`
15
+ - Component targets starting with `compositions/components/` get remapped to `<paths.components>/`
16
+
17
+ ## hyperframes.json
18
+
19
+ Created automatically by `hyperframes init`. If it doesn't exist when you run `add`, the CLI creates it with defaults:
20
+
21
+ ```json
22
+ {
23
+ "$schema": "https://hyperframes.heygen.com/schema/hyperframes.json",
24
+ "registry": "https://raw.githubusercontent.com/heygen-com/hyperframes/main/registry",
25
+ "paths": {
26
+ "blocks": "compositions",
27
+ "components": "compositions/components",
28
+ "assets": "assets"
29
+ }
30
+ }
31
+ ```
32
+
33
+ ## Custom layouts
34
+
35
+ To install blocks into a `scenes/` directory instead of `compositions/`:
36
+
37
+ ```json
38
+ {
39
+ "paths": {
40
+ "blocks": "scenes"
41
+ }
42
+ }
43
+ ```
44
+
45
+ Then `hyperframes add data-chart` writes to `scenes/data-chart.html` instead of `compositions/data-chart.html`. The snippet output reflects the remapped path.
@@ -0,0 +1,91 @@
1
+ # Wiring Blocks
2
+
3
+ Blocks are standalone compositions with their own `data-composition-id`, dimensions, duration, and GSAP timeline. Include them in a host composition using `data-composition-src` on a `<div>`.
4
+
5
+ ## Basic wiring
6
+
7
+ After `hyperframes add data-chart`, wire it into your `index.html`:
8
+
9
+ ```html
10
+ <div id="stage" data-composition-id="main" data-width="1920" data-height="1080" data-duration="20">
11
+ <video id="a-roll" src="video.mp4" data-start="0" data-duration="20" data-track-index="0"></video>
12
+
13
+ <!-- Block: appears at 2s, plays for 15s, on layer 1 -->
14
+ <div
15
+ data-composition-id="data-chart"
16
+ data-composition-src="compositions/data-chart.html"
17
+ data-start="2"
18
+ data-duration="15"
19
+ data-track-index="1"
20
+ data-width="1920"
21
+ data-height="1080"
22
+ ></div>
23
+ </div>
24
+ ```
25
+
26
+ ## Required attributes
27
+
28
+ | Attribute | Description |
29
+ | ---------------------- | -------------------------------------------------------------------- |
30
+ | `data-composition-src` | Path to the block HTML file (relative to index.html) |
31
+ | `data-composition-id` | Unique ID matching the block's internal composition ID |
32
+ | `data-start` | When the block appears in the host timeline (seconds) |
33
+ | `data-duration` | How long the block plays (seconds, at most the block's own duration) |
34
+ | `data-track-index` | Layer ordering — higher numbers render in front |
35
+ | `data-width` | Block canvas width (match the block's dimensions) |
36
+ | `data-height` | Block canvas height (match the block's dimensions) |
37
+
38
+ ## Timeline coordination
39
+
40
+ The block's internal GSAP timeline runs independently from the host timeline. The HyperFrames runtime loads the sub-composition, finds its `window.__timelines` registration, and seeks the block in sync with the host, offset by `data-start`. You do NOT need to reference the block's timeline in your host's GSAP code.
41
+
42
+ ## Positioning blocks
43
+
44
+ To position a block in a specific area of the screen, add CSS:
45
+
46
+ ```html
47
+ <div
48
+ data-composition-id="data-chart"
49
+ data-composition-src="compositions/data-chart.html"
50
+ data-start="2"
51
+ data-duration="15"
52
+ data-track-index="1"
53
+ data-width="1920"
54
+ data-height="1080"
55
+ style="position: absolute; right: 0; top: 0; width: 40%; height: 100%;"
56
+ ></div>
57
+ ```
58
+
59
+ ## Multiple blocks
60
+
61
+ Include multiple blocks sequentially or overlapping:
62
+
63
+ ```html
64
+ <div
65
+ data-composition-id="data-chart"
66
+ data-composition-src="compositions/data-chart.html"
67
+ data-start="0"
68
+ data-duration="15"
69
+ data-track-index="1"
70
+ data-width="1920"
71
+ data-height="1080"
72
+ ></div>
73
+ <div
74
+ data-composition-id="flowchart"
75
+ data-composition-src="compositions/flowchart.html"
76
+ data-start="15"
77
+ data-duration="12"
78
+ data-track-index="1"
79
+ data-width="1920"
80
+ data-height="1080"
81
+ ></div>
82
+ <div
83
+ data-composition-id="logo-outro"
84
+ data-composition-src="compositions/logo-outro.html"
85
+ data-start="27"
86
+ data-duration="6"
87
+ data-track-index="1"
88
+ data-width="1920"
89
+ data-height="1080"
90
+ ></div>
91
+ ```