用途:HyperFrames Registry 提供可复用的区块(blocks)与组件(components),通过 hyperframes add <name> 安装,并接入 HyperFrames 合成。
主要能力:区块是独立子合成,拥有自己的尺寸、时长和时间线,通过宿主合成中的 data-composition-src 引入;组件是效果片段,没有独立尺寸,直接粘贴进宿主合成的 HTML。
使用方式:常用命令包括 hyperframes add data-chart(安装区块)、hyperframes add grain-overlay(安装组件)、hyperframes add shimmer-sweep --dir .(指定项目)、hyperframes add data-chart --json(机器可读输出)、hyperframes add data-chart --no-clipboard(跳过剪贴板,适用于 CI/无头环境)。安装后 CLI 会打印写入的文件路径和可粘贴到宿主合成的片段。接线区块时需补充 data-composition-id(须与区块内部 ID 一致)、data-start、data-track-index 等属性;接线组件时需把 HTML、CSS、JS 分别复制到合成对应位置,并按注释接入 GSAP 时间线。
安装位置:区块默认安装到 compositions/<name>.html,组件默认安装到 compositions/components/<name>.html,可在 hyperframes.json 中配置 registry 与 paths。
发现:可读取 registry manifest(curl -s https://raw.githubusercontent.com/heygen-com/hyperframes/main/registry/registry.json),每个条目的 registry-item.json 含 name、type、title、description、tags、dimensions(仅区块)、duration(仅区块)和文件列表。
限制:hyperframes add 仅适用于区块和组件;示例需使用 hyperframes init <dir> --example <name>。其余细节暂未提供。