zilmate 1.9.3 → 1.10.1
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.
- package/.agents/skills/ad-creative/SKILL.md +362 -0
- package/.agents/skills/ad-creative/evals/evals.json +90 -0
- package/.agents/skills/ad-creative/references/generative-tools.md +637 -0
- package/.agents/skills/ad-creative/references/platform-specs.md +213 -0
- package/.agents/skills/ai-seo/SKILL.md +489 -0
- package/.agents/skills/ai-seo/evals/evals.json +90 -0
- package/.agents/skills/ai-seo/references/content-patterns.md +285 -0
- package/.agents/skills/ai-seo/references/content-types.md +71 -0
- package/.agents/skills/ai-seo/references/okf.md +104 -0
- package/.agents/skills/ai-seo/references/platform-ranking-factors.md +154 -0
- package/.agents/skills/clerk-backend-api/SKILL.md +426 -0
- package/.agents/skills/clerk-backend-api/evals/evals.json +87 -0
- package/.agents/skills/clerk-backend-api/scripts/api-specs-context.sh +30 -0
- package/.agents/skills/clerk-backend-api/scripts/execute-request.sh +88 -0
- package/.agents/skills/clerk-backend-api/scripts/extract-endpoint-detail.sh +165 -0
- package/.agents/skills/clerk-backend-api/scripts/extract-tag-endpoints.sh +208 -0
- package/.agents/skills/clerk-backend-api/scripts/extract-tags.js +14 -0
- package/.agents/skills/copy-editing/SKILL.md +457 -0
- package/.agents/skills/copy-editing/evals/evals.json +89 -0
- package/.agents/skills/copy-editing/references/checklist.md +66 -0
- package/.agents/skills/copy-editing/references/content-refresh.md +38 -0
- package/.agents/skills/copy-editing/references/plain-english-alternatives.md +394 -0
- package/.agents/skills/hyperframes/SKILL.md +163 -0
- package/.agents/skills/hyperframes-cli/SKILL.md +109 -0
- package/.agents/skills/hyperframes-cli/references/doctor-browser.md +45 -0
- package/.agents/skills/hyperframes-cli/references/init-and-scaffold.md +51 -0
- package/.agents/skills/hyperframes-cli/references/lambda.md +132 -0
- package/.agents/skills/hyperframes-cli/references/lint-validate-inspect.md +121 -0
- package/.agents/skills/hyperframes-cli/references/preview-render.md +109 -0
- package/.agents/skills/hyperframes-cli/references/upgrade-info-misc.md +75 -0
- package/.agents/skills/hyperframes-media/SKILL.md +97 -0
- package/.agents/skills/hyperframes-media/assets/sfx/CREDITS.md +35 -0
- package/.agents/skills/hyperframes-media/assets/sfx/manifest.json +97 -0
- package/.agents/skills/hyperframes-media/references/bgm.md +72 -0
- package/.agents/skills/hyperframes-media/references/captions/authoring.md +159 -0
- package/.agents/skills/hyperframes-media/references/captions/motion.md +87 -0
- package/.agents/skills/hyperframes-media/references/captions/transcript-handling.md +97 -0
- package/.agents/skills/hyperframes-media/references/remove-background.md +143 -0
- package/.agents/skills/hyperframes-media/references/requirements.md +29 -0
- package/.agents/skills/hyperframes-media/references/sfx.md +42 -0
- package/.agents/skills/hyperframes-media/references/transcribe.md +52 -0
- package/.agents/skills/hyperframes-media/references/tts-to-captions.md +24 -0
- package/.agents/skills/hyperframes-media/references/tts.md +135 -0
- package/.agents/skills/hyperframes-media/scripts/audio.mjs +282 -0
- package/.agents/skills/hyperframes-media/scripts/heygen-tts.mjs +121 -0
- package/.agents/skills/hyperframes-media/scripts/lib/bgm.mjs +235 -0
- package/.agents/skills/hyperframes-media/scripts/lib/heygen.mjs +131 -0
- package/.agents/skills/hyperframes-media/scripts/lib/sfx.mjs +128 -0
- package/.agents/skills/hyperframes-media/scripts/lib/tts.mjs +220 -0
- package/.agents/skills/hyperframes-media/scripts/lyria-recipe.py +128 -0
- package/.agents/skills/hyperframes-media/scripts/wait-bgm.mjs +167 -0
- package/.agents/skills/hyperframes-registry/SKILL.md +101 -0
- package/.agents/skills/hyperframes-registry/examples/add-block.md +51 -0
- package/.agents/skills/hyperframes-registry/examples/add-component.md +73 -0
- package/.agents/skills/hyperframes-registry/references/contributing.md +166 -0
- package/.agents/skills/hyperframes-registry/references/demo-html-pattern.md +54 -0
- package/.agents/skills/hyperframes-registry/references/discovery.md +215 -0
- package/.agents/skills/hyperframes-registry/references/install-locations.md +45 -0
- package/.agents/skills/hyperframes-registry/references/templates.md +417 -0
- package/.agents/skills/hyperframes-registry/references/wiring-blocks.md +61 -0
- package/.agents/skills/hyperframes-registry/references/wiring-components.md +39 -0
- package/.agents/skills/marketing-psychology/SKILL.md +455 -0
- package/.agents/skills/marketing-psychology/evals/evals.json +88 -0
- package/.agents/skills/mintlify/SKILL.md +328 -0
- package/.agents/skills/product-launch-video/SKILL.md +206 -0
- package/.agents/skills/product-launch-video/references/cut-catalog.md +220 -0
- package/.agents/skills/product-launch-video/references/motion-language.md +156 -0
- package/.agents/skills/product-launch-video/references/story-design.md +373 -0
- package/.agents/skills/product-launch-video/references/visual-design.md +126 -0
- package/.agents/skills/product-launch-video/scripts/assemble-index.mjs +570 -0
- package/.agents/skills/product-launch-video/scripts/audio.mjs +253 -0
- package/.agents/skills/product-launch-video/scripts/build-frame.mjs +536 -0
- package/.agents/skills/product-launch-video/scripts/captions.mjs +508 -0
- package/.agents/skills/product-launch-video/scripts/lib/assets.mjs +55 -0
- package/.agents/skills/product-launch-video/scripts/lib/dimensions.mjs +45 -0
- package/.agents/skills/product-launch-video/scripts/lib/storyboard.mjs +249 -0
- package/.agents/skills/product-launch-video/scripts/lib/tokens.mjs +204 -0
- package/.agents/skills/product-launch-video/scripts/lib/transition-registry.mjs +38 -0
- package/.agents/skills/product-launch-video/scripts/lib/transitions.json +71 -0
- package/.agents/skills/product-launch-video/scripts/stage-assets.mjs +39 -0
- package/.agents/skills/product-launch-video/scripts/transitions.mjs +320 -0
- package/.agents/skills/product-launch-video/sub-agents/frame-worker.md +74 -0
- package/.agents/skills/prompt-engineering-patterns/SKILL.md +144 -0
- package/.agents/skills/prompt-engineering-patterns/assets/few-shot-examples.json +106 -0
- package/.agents/skills/prompt-engineering-patterns/assets/prompt-template-library.md +264 -0
- package/.agents/skills/prompt-engineering-patterns/references/chain-of-thought.md +412 -0
- package/.agents/skills/prompt-engineering-patterns/references/details.md +338 -0
- package/.agents/skills/prompt-engineering-patterns/references/few-shot-learning.md +386 -0
- package/.agents/skills/prompt-engineering-patterns/references/prompt-optimization.md +428 -0
- package/.agents/skills/prompt-engineering-patterns/references/prompt-templates.md +484 -0
- package/.agents/skills/prompt-engineering-patterns/references/system-prompts.md +195 -0
- package/.agents/skills/prompt-engineering-patterns/scripts/optimize-prompt.py +279 -0
- package/.agents/skills/remotion-to-hyperframes/SKILL.md +127 -0
- package/.agents/skills/remotion-to-hyperframes/assets/.gitkeep +0 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/run.sh +249 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-1-title-card/README.md +41 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-1-title-card/expected.json +26 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-1-title-card/hf-src/index.html +61 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-1-title-card/remotion-src/package.json +14 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-1-title-card/remotion-src/remotion.config.ts +13 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-1-title-card/remotion-src/src/Root.tsx +13 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-1-title-card/remotion-src/src/TitleCard.tsx +34 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-1-title-card/remotion-src/src/index.ts +4 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-1-title-card/remotion-src/tsconfig.json +15 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-2-multi-scene/README.md +54 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-2-multi-scene/expected.json +29 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-2-multi-scene/hf-src/index.html +118 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-2-multi-scene/remotion-src/package.json +14 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-2-multi-scene/remotion-src/remotion.config.ts +13 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-2-multi-scene/remotion-src/src/MultiScene.tsx +105 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-2-multi-scene/remotion-src/src/Root.tsx +13 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-2-multi-scene/remotion-src/src/index.ts +4 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-2-multi-scene/remotion-src/tsconfig.json +15 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-2-multi-scene/setup.sh +34 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-3-data-driven/README.md +85 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-3-data-driven/expected.json +41 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-3-data-driven/hf-src/index.html +269 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-3-data-driven/remotion-src/package.json +15 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-3-data-driven/remotion-src/remotion.config.ts +13 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-3-data-driven/remotion-src/src/Root.tsx +27 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-3-data-driven/remotion-src/src/Stargazed.tsx +37 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-3-data-driven/remotion-src/src/components/AnimatedNumber.tsx +23 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-3-data-driven/remotion-src/src/components/StatCard.tsx +59 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-3-data-driven/remotion-src/src/components/UnderlinedText.tsx +47 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-3-data-driven/remotion-src/src/index.ts +4 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-3-data-driven/remotion-src/src/scenes/OutroScene.tsx +18 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-3-data-driven/remotion-src/src/scenes/StatsScene.tsx +34 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-3-data-driven/remotion-src/src/scenes/TitleScene.tsx +55 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-3-data-driven/remotion-src/tsconfig.json +15 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-4-escape-hatch/README.md +51 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-4-escape-hatch/cases/01-use-state.tsx +29 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-4-escape-hatch/cases/02-use-effect-deps.tsx +29 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-4-escape-hatch/cases/03-async-metadata.tsx +39 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-4-escape-hatch/cases/04-third-party-react.tsx +30 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-4-escape-hatch/cases/05-lambda-config.tsx +38 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-4-escape-hatch/cases/06-warnings-only.tsx +36 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-4-escape-hatch/cases/07-custom-hook.tsx +28 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-4-escape-hatch/cases/08-mixed.tsx +41 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-4-escape-hatch/expected.json +85 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-4-escape-hatch/validate.sh +110 -0
- package/.agents/skills/remotion-to-hyperframes/references/api-map.md +142 -0
- package/.agents/skills/remotion-to-hyperframes/references/escape-hatch.md +115 -0
- package/.agents/skills/remotion-to-hyperframes/references/eval.md +140 -0
- package/.agents/skills/remotion-to-hyperframes/references/fonts.md +112 -0
- package/.agents/skills/remotion-to-hyperframes/references/limitations.md +136 -0
- package/.agents/skills/remotion-to-hyperframes/references/lottie.md +121 -0
- package/.agents/skills/remotion-to-hyperframes/references/media.md +149 -0
- package/.agents/skills/remotion-to-hyperframes/references/parameters.md +167 -0
- package/.agents/skills/remotion-to-hyperframes/references/sequencing.md +195 -0
- package/.agents/skills/remotion-to-hyperframes/references/timing.md +165 -0
- package/.agents/skills/remotion-to-hyperframes/references/transitions.md +114 -0
- package/.agents/skills/remotion-to-hyperframes/scripts/.gitkeep +0 -0
- package/.agents/skills/remotion-to-hyperframes/scripts/frame_strip.sh +107 -0
- package/.agents/skills/remotion-to-hyperframes/scripts/lint_source.py +358 -0
- package/.agents/skills/remotion-to-hyperframes/scripts/render_diff.sh +103 -0
- package/.agents/skills/remotion-to-hyperframes/scripts/tests/fixtures/blocker.tsx +50 -0
- package/.agents/skills/remotion-to-hyperframes/scripts/tests/fixtures/clean.tsx +46 -0
- package/.agents/skills/remotion-to-hyperframes/scripts/tests/smoke.sh +90 -0
- package/.agents/skills/seo-audit/SKILL.md +497 -0
- package/.agents/skills/seo-audit/evals/evals.json +136 -0
- package/.agents/skills/seo-audit/references/ai-writing-detection.md +200 -0
- package/.agents/skills/seo-audit/references/international-seo.md +230 -0
- package/README.md +4 -2
- package/SDK.md +64 -1
- package/dist/agents/coding.agent.d.ts +632 -0
- package/dist/agents/coding.agent.d.ts.map +1 -1
- package/dist/agents/coding.agent.js +11 -3
- package/dist/agents/coding.agent.js.map +1 -1
- package/dist/agents/developer-helper.agent.d.ts +704 -0
- package/dist/agents/developer-helper.agent.d.ts.map +1 -1
- package/dist/agents/developer-helper.agent.js +6 -0
- package/dist/agents/developer-helper.agent.js.map +1 -1
- package/dist/agents/manager.d.ts +1009 -4
- package/dist/agents/manager.d.ts.map +1 -1
- package/dist/agents/manager.js +16 -5
- package/dist/agents/manager.js.map +1 -1
- package/dist/agents/security.agent.d.ts +157 -3
- package/dist/agents/security.agent.d.ts.map +1 -1
- package/dist/agents/security.agent.js +3 -0
- package/dist/agents/security.agent.js.map +1 -1
- package/dist/agents/swarm/main.js +1 -1
- package/dist/agents/swarm/main.js.map +1 -1
- package/dist/agents/swarm/registry.d.ts.map +1 -1
- package/dist/agents/swarm/registry.js +232 -26
- package/dist/agents/swarm/registry.js.map +1 -1
- package/dist/cli/chat.d.ts +1 -1
- package/dist/cli/chat.d.ts.map +1 -1
- package/dist/cli/chat.js +32 -10
- package/dist/cli/chat.js.map +1 -1
- package/dist/cli/doctor.d.ts +14 -0
- package/dist/cli/doctor.d.ts.map +1 -1
- package/dist/cli/doctor.js +91 -0
- package/dist/cli/doctor.js.map +1 -1
- package/dist/cli/format.d.ts +1 -0
- package/dist/cli/format.d.ts.map +1 -1
- package/dist/cli/format.js +68 -14
- package/dist/cli/format.js.map +1 -1
- package/dist/cli/menu.d.ts.map +1 -1
- package/dist/cli/menu.js +102 -0
- package/dist/cli/menu.js.map +1 -1
- package/dist/cli/setup.d.ts +10 -0
- package/dist/cli/setup.d.ts.map +1 -1
- package/dist/cli/setup.js +187 -3
- package/dist/cli/setup.js.map +1 -1
- package/dist/cli/update.d.ts +2 -0
- package/dist/cli/update.d.ts.map +1 -1
- package/dist/cli/update.js +89 -1
- package/dist/cli/update.js.map +1 -1
- package/dist/config/env.d.ts +12 -0
- package/dist/config/env.d.ts.map +1 -1
- package/dist/config/env.js +19 -5
- package/dist/config/env.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +61 -5
- package/dist/index.js.map +1 -1
- package/dist/jobs/trigger-orchestrator.d.ts +5 -1
- package/dist/jobs/trigger-orchestrator.d.ts.map +1 -1
- package/dist/jobs/trigger-orchestrator.js +29 -9
- package/dist/jobs/trigger-orchestrator.js.map +1 -1
- package/dist/jobs/trigger-router.d.ts.map +1 -1
- package/dist/jobs/trigger-router.js +3 -2
- package/dist/jobs/trigger-router.js.map +1 -1
- package/dist/memory/corporate-wiki.d.ts +15 -0
- package/dist/memory/corporate-wiki.d.ts.map +1 -0
- package/dist/memory/corporate-wiki.js +152 -0
- package/dist/memory/corporate-wiki.js.map +1 -0
- package/dist/observability/doctor.d.ts.map +1 -1
- package/dist/observability/doctor.js +12 -4
- package/dist/observability/doctor.js.map +1 -1
- package/dist/pre-init.d.ts +2 -0
- package/dist/pre-init.d.ts.map +1 -0
- package/dist/pre-init.js +3 -0
- package/dist/pre-init.js.map +1 -0
- package/dist/runtime/chat-bridge.d.ts.map +1 -1
- package/dist/runtime/chat-bridge.js +33 -2
- package/dist/runtime/chat-bridge.js.map +1 -1
- package/dist/runtime/swarm.d.ts +0 -1
- package/dist/runtime/swarm.d.ts.map +1 -1
- package/dist/runtime/swarm.js +26 -15
- package/dist/runtime/swarm.js.map +1 -1
- package/dist/safety/approvals.d.ts +2 -2
- package/dist/safety/approvals.d.ts.map +1 -1
- package/dist/safety/approvals.js +47 -1
- package/dist/safety/approvals.js.map +1 -1
- package/dist/safety/redaction.d.ts.map +1 -1
- package/dist/safety/redaction.js +10 -0
- package/dist/safety/redaction.js.map +1 -1
- package/dist/server.d.ts +1 -0
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +1 -0
- package/dist/server.js.map +1 -1
- package/dist/tools/cloud.tool.d.ts +394 -0
- package/dist/tools/cloud.tool.d.ts.map +1 -0
- package/dist/tools/cloud.tool.js +784 -0
- package/dist/tools/cloud.tool.js.map +1 -0
- package/dist/tools/computer-use.tool.d.ts +6 -6
- package/dist/tools/corporate-wiki.tool.d.ts +22 -0
- package/dist/tools/corporate-wiki.tool.d.ts.map +1 -0
- package/dist/tools/corporate-wiki.tool.js +39 -0
- package/dist/tools/corporate-wiki.tool.js.map +1 -0
- package/dist/tools/desktop.tool.d.ts +96 -0
- package/dist/tools/desktop.tool.d.ts.map +1 -1
- package/dist/tools/desktop.tool.js +439 -0
- package/dist/tools/desktop.tool.js.map +1 -1
- package/dist/tools/devops.tool.d.ts +162 -0
- package/dist/tools/devops.tool.d.ts.map +1 -0
- package/dist/tools/devops.tool.js +377 -0
- package/dist/tools/devops.tool.js.map +1 -0
- package/dist/tools/multimedia.tool.d.ts +126 -0
- package/dist/tools/multimedia.tool.d.ts.map +1 -0
- package/dist/tools/multimedia.tool.js +533 -0
- package/dist/tools/multimedia.tool.js.map +1 -0
- package/dist/tools/osint.tool.d.ts +6 -6
- package/dist/tools/sandbox-dev.tool.d.ts +15 -0
- package/dist/tools/sandbox-dev.tool.d.ts.map +1 -0
- package/dist/tools/sandbox-dev.tool.js +139 -0
- package/dist/tools/sandbox-dev.tool.js.map +1 -0
- package/dist/tools/setup-assistant.tool.d.ts +1 -1
- package/dist/tools/shell.tool.d.ts +82 -0
- package/dist/tools/shell.tool.d.ts.map +1 -1
- package/dist/tools/shell.tool.js +192 -1
- package/dist/tools/shell.tool.js.map +1 -1
- package/dist/tools/swarm-ops.tool.d.ts +14 -0
- package/dist/tools/swarm-ops.tool.d.ts.map +1 -1
- package/dist/tools/swarm-ops.tool.js +44 -0
- package/dist/tools/swarm-ops.tool.js.map +1 -1
- package/dist/tools/sysops.tool.d.ts +157 -0
- package/dist/tools/sysops.tool.d.ts.map +1 -0
- package/dist/tools/sysops.tool.js +643 -0
- package/dist/tools/sysops.tool.js.map +1 -0
- package/dist/voice/cascade.d.ts +1 -0
- package/dist/voice/cascade.d.ts.map +1 -1
- package/dist/voice/cascade.js +16 -1
- package/dist/voice/cascade.js.map +1 -1
- package/dist/voice/deepgram.d.ts.map +1 -1
- package/dist/voice/deepgram.js +34 -2
- package/dist/voice/deepgram.js.map +1 -1
- package/dist/voice/terminal.d.ts +1 -0
- package/dist/voice/terminal.d.ts.map +1 -1
- package/dist/voice/terminal.js +28 -0
- package/dist/voice/terminal.js.map +1 -1
- package/dist/voice/types.d.ts +2 -0
- package/dist/voice/types.d.ts.map +1 -1
- package/package.json +9 -1
- package/scripts/release-github.mjs +23 -18
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
# Lottie translation: @remotion/lottie → HF lottie adapter
|
|
2
|
+
|
|
3
|
+
Lottie animations are a clean translation case — HF has a built-in
|
|
4
|
+
[Lottie adapter](https://github.com/heygen-com/hyperframes/blob/main/packages/core/src/runtime/adapters/lottie.ts)
|
|
5
|
+
that supports both `lottie-web` and `@lottiefiles/dotlottie-web`. The
|
|
6
|
+
adapter auto-discovers animations registered on `window.__hfLottie`
|
|
7
|
+
and seeks them per-frame via `goToAndStop`.
|
|
8
|
+
|
|
9
|
+
## Pattern
|
|
10
|
+
|
|
11
|
+
```tsx
|
|
12
|
+
import { Lottie } from "@remotion/lottie";
|
|
13
|
+
import animationData from "./hello.json";
|
|
14
|
+
|
|
15
|
+
export const MyComp = () => (
|
|
16
|
+
<AbsoluteFill>
|
|
17
|
+
<Lottie animationData={animationData} loop={false} />
|
|
18
|
+
</AbsoluteFill>
|
|
19
|
+
);
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Translates to:
|
|
23
|
+
|
|
24
|
+
```html
|
|
25
|
+
<div id="stage" ...>
|
|
26
|
+
<div id="lottie-anim" style="width:100%;height:100%"></div>
|
|
27
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/bodymovin/5.12.2/lottie.min.js"></script>
|
|
28
|
+
<script>
|
|
29
|
+
const anim = lottie.loadAnimation({
|
|
30
|
+
container: document.getElementById("lottie-anim"),
|
|
31
|
+
renderer: "svg",
|
|
32
|
+
loop: false,
|
|
33
|
+
autoplay: false,
|
|
34
|
+
path: "assets/hello.json",
|
|
35
|
+
});
|
|
36
|
+
window.__hfLottie = window.__hfLottie || [];
|
|
37
|
+
window.__hfLottie.push(anim);
|
|
38
|
+
</script>
|
|
39
|
+
</div>
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Key differences from a typical Lottie embed:
|
|
43
|
+
|
|
44
|
+
- `autoplay: false` — HF drives playback by seeking
|
|
45
|
+
- `loop: false` typically (unless Remotion's `loop={true}`)
|
|
46
|
+
- `window.__hfLottie.push(anim)` is what hooks the animation into HF's
|
|
47
|
+
per-frame seek
|
|
48
|
+
|
|
49
|
+
## Asset handling
|
|
50
|
+
|
|
51
|
+
Remotion bundles the animation JSON via webpack import. HF needs the JSON
|
|
52
|
+
on disk under `assets/` and references it via path:
|
|
53
|
+
|
|
54
|
+
1. Copy `hello.json` from the Remotion project into `hf-src/assets/`.
|
|
55
|
+
2. Reference as `path: "assets/hello.json"` in `loadAnimation`.
|
|
56
|
+
|
|
57
|
+
For dotlottie (binary) format, swap in `@lottiefiles/dotlottie-web`:
|
|
58
|
+
|
|
59
|
+
```html
|
|
60
|
+
<script src="https://unpkg.com/@lottiefiles/dotlottie-web"></script>
|
|
61
|
+
<canvas id="anim" style="width:100%;height:100%"></canvas>
|
|
62
|
+
<script>
|
|
63
|
+
const player = new DotLottie({
|
|
64
|
+
canvas: document.getElementById("anim"),
|
|
65
|
+
src: "assets/hello.lottie",
|
|
66
|
+
autoplay: false,
|
|
67
|
+
});
|
|
68
|
+
window.__hfLottie = window.__hfLottie || [];
|
|
69
|
+
window.__hfLottie.push(player);
|
|
70
|
+
</script>
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
The HF adapter handles both player APIs (it duck-types `goToAndStop`
|
|
74
|
+
vs `setCurrentRawFrameValue` / `seek`).
|
|
75
|
+
|
|
76
|
+
## Multiple Lottie animations
|
|
77
|
+
|
|
78
|
+
Multiple `<Lottie>` instances in one composition work — push each one
|
|
79
|
+
onto `window.__hfLottie` and the adapter will seek all of them in sync:
|
|
80
|
+
|
|
81
|
+
```js
|
|
82
|
+
window.__hfLottie.push(anim1);
|
|
83
|
+
window.__hfLottie.push(anim2);
|
|
84
|
+
window.__hfLottie.push(anim3);
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## Lottie source isn't actually translation-blocking
|
|
88
|
+
|
|
89
|
+
Lottie animations encode their own deterministic timeline. They're the
|
|
90
|
+
_easiest_ part of a Remotion composition to translate because the
|
|
91
|
+
animation logic is already self-contained — neither Remotion nor HF
|
|
92
|
+
"animate" them, both just seek them. Translation cost is near-zero.
|
|
93
|
+
|
|
94
|
+
## After Effects → Lottie limitations
|
|
95
|
+
|
|
96
|
+
Lottie supports a subset of After Effects features. Expressions, most
|
|
97
|
+
Effects (drop shadow, color overlay), all blend modes beyond Normal/Add/
|
|
98
|
+
Multiply, luma mattes, and most 3D parameters are not supported. If the
|
|
99
|
+
Remotion composition uses a Lottie file that depends on these, the
|
|
100
|
+
animation will break in BOTH Remotion and HF — this isn't a translation
|
|
101
|
+
problem, it's a Lottie limitation. See
|
|
102
|
+
[airbnb/lottie/after-effects.md](https://github.com/airbnb/lottie/blob/master/after-effects.md)
|
|
103
|
+
for the full supported feature list.
|
|
104
|
+
|
|
105
|
+
## Loop behavior
|
|
106
|
+
|
|
107
|
+
Remotion's `loop={true}` plays the animation continuously. Translate to
|
|
108
|
+
the player option only after checking the generated frames. The HF
|
|
109
|
+
adapter seeks absolute composition time; it does not add modulo looping
|
|
110
|
+
or playback-rate scaling on top of the player. For exact repeating
|
|
111
|
+
cycles or non-default playback rates, bake the timing into the Lottie
|
|
112
|
+
asset or author an explicit timeline around the Lottie layer and verify
|
|
113
|
+
the rendered output.
|
|
114
|
+
|
|
115
|
+
## Performance note
|
|
116
|
+
|
|
117
|
+
Per the [Lottie adapter](https://github.com/heygen-com/hyperframes/blob/main/packages/core/src/runtime/adapters/lottie.ts)
|
|
118
|
+
docs: lottie-web's `goToAndStop(time, isFrame=false)` takes time in ms;
|
|
119
|
+
the adapter passes `time * 1000` for precision. This is more accurate
|
|
120
|
+
than passing frame numbers (especially for animations whose internal
|
|
121
|
+
fps doesn't match the HF render fps).
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
# Media translation: Audio, Video, Img, IFrame, staticFile
|
|
2
|
+
|
|
3
|
+
## Asset paths
|
|
4
|
+
|
|
5
|
+
Remotion's `staticFile("x.png")` resolves to the project's `public/` directory.
|
|
6
|
+
HF uses relative paths from the composition's `index.html`, conventionally
|
|
7
|
+
`assets/`:
|
|
8
|
+
|
|
9
|
+
```tsx
|
|
10
|
+
<Img src={staticFile("logo.png")} />
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
```html
|
|
14
|
+
<img src="assets/logo.png" />
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
When translating, copy the asset from `remotion-src/public/x` to
|
|
18
|
+
`hf-src/assets/x`. Multiple files can be batched with a setup script;
|
|
19
|
+
see T2's `setup.sh` for an example pattern.
|
|
20
|
+
|
|
21
|
+
## `<Audio>`
|
|
22
|
+
|
|
23
|
+
```tsx
|
|
24
|
+
<Audio src={staticFile("music.wav")} volume={0.5} />
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
```html
|
|
28
|
+
<audio
|
|
29
|
+
data-start="0"
|
|
30
|
+
data-duration="6"
|
|
31
|
+
data-track-index="2"
|
|
32
|
+
data-volume="0.5"
|
|
33
|
+
src="assets/music.wav"
|
|
34
|
+
></audio>
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
`data-start` and `data-duration` are required — the runtime needs them to
|
|
38
|
+
schedule the audio. Default to the composition's full duration if Remotion
|
|
39
|
+
didn't specify trim.
|
|
40
|
+
|
|
41
|
+
### Volume ramps
|
|
42
|
+
|
|
43
|
+
```tsx
|
|
44
|
+
<Audio src={staticFile("music.wav")} volume={(f) => interpolate(f, [0, 30], [0, 1])} />
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
HF supports static `data-volume` only for now. Volume ramps need to be
|
|
48
|
+
applied to the audio file at translation time (with ffmpeg `afade`) or the
|
|
49
|
+
ramp is dropped with a translation note.
|
|
50
|
+
|
|
51
|
+
### Trim / playbackRate
|
|
52
|
+
|
|
53
|
+
```tsx
|
|
54
|
+
<Audio src={staticFile("music.wav")} startFrom={60} endAt={180} playbackRate={1.5} />
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
```html
|
|
58
|
+
<audio
|
|
59
|
+
data-start="0"
|
|
60
|
+
data-duration="<resolved from trim>"
|
|
61
|
+
data-trim-start="2"
|
|
62
|
+
data-trim-end="6"
|
|
63
|
+
data-playback-rate="1.5"
|
|
64
|
+
src="assets/music.wav"
|
|
65
|
+
></audio>
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
`startFrom` / `endAt` are frame indexes; convert to seconds.
|
|
69
|
+
|
|
70
|
+
## `<Video>` and `<OffthreadVideo>`
|
|
71
|
+
|
|
72
|
+
```tsx
|
|
73
|
+
<Video src={staticFile("intro.mp4")} muted playsInline />
|
|
74
|
+
<OffthreadVideo src={staticFile("intro.mp4")} muted />
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
```html
|
|
78
|
+
<video
|
|
79
|
+
muted
|
|
80
|
+
playsinline
|
|
81
|
+
data-start="0"
|
|
82
|
+
data-duration="5"
|
|
83
|
+
data-track-index="0"
|
|
84
|
+
src="assets/intro.mp4"
|
|
85
|
+
></video>
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
`<OffthreadVideo>` is a Remotion-specific optimization for headless
|
|
89
|
+
rendering. HF runs in headless Chrome already, so the off-thread variant
|
|
90
|
+
collapses to a regular `<video>`.
|
|
91
|
+
|
|
92
|
+
`muted` and `playsinline` are required for the runtime to autoplay
|
|
93
|
+
(browser policy). Always emit them.
|
|
94
|
+
|
|
95
|
+
## `<Img>`
|
|
96
|
+
|
|
97
|
+
```tsx
|
|
98
|
+
<Img src={staticFile("logo.png")} style={{ width: 200, height: 200 }} />
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
```html
|
|
102
|
+
<img src="assets/logo.png" style="width: 200px; height: 200px;" />
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Width/height get rounded to integer px. If the original style has
|
|
106
|
+
animated dimensions, the GSAP tween animates them — see [timing.md](timing.md).
|
|
107
|
+
|
|
108
|
+
## `<IFrame>`
|
|
109
|
+
|
|
110
|
+
```tsx
|
|
111
|
+
<IFrame src="https://example.com" />
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
```html
|
|
115
|
+
<iframe src="https://example.com"></iframe>
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
When HF detects a nested iframe in a composition, it auto-falls back to
|
|
119
|
+
**screenshot mode** rather than the deterministic BeginFrame mode. This
|
|
120
|
+
costs render performance but produces visibly-correct output. See
|
|
121
|
+
[hyperframes-vs-remotion.mdx](https://github.com/heygen-com/hyperframes/blob/main/docs/guides/hyperframes-vs-remotion.mdx)
|
|
122
|
+
for details.
|
|
123
|
+
|
|
124
|
+
## `delayRender()` / `continueRender()`
|
|
125
|
+
|
|
126
|
+
```tsx
|
|
127
|
+
const handle = delayRender();
|
|
128
|
+
useEffect(() => {
|
|
129
|
+
loadAsset().then(() => continueRender(handle));
|
|
130
|
+
}, []);
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
Drop. HF waits on asset readiness via the [Frame Adapter pattern](https://hyperframes.heygen.com/concepts/frame-adapters)
|
|
134
|
+
— images, videos, fonts, and Lottie animations all signal load
|
|
135
|
+
completion natively. There's nothing to do at the application level.
|
|
136
|
+
|
|
137
|
+
## When the asset isn't a file
|
|
138
|
+
|
|
139
|
+
If Remotion's media source is a Buffer, dataURL, or URL.createObjectURL,
|
|
140
|
+
the asset doesn't exist on disk and can't be copied via setup.sh. Two
|
|
141
|
+
options:
|
|
142
|
+
|
|
143
|
+
1. Materialize the asset at translation time — write the buffer to a file
|
|
144
|
+
in `hf-src/assets/`.
|
|
145
|
+
2. Embed as a data URL directly in the HTML (`src="data:image/png;base64,..."`)
|
|
146
|
+
for small assets (< 100 KB).
|
|
147
|
+
|
|
148
|
+
For audio/video Buffers, option 1 is preferred — base64-encoded media
|
|
149
|
+
bloats the HTML and slows the renderer.
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
# Parameter translation: Zod schemas, defaultProps, calculateMetadata
|
|
2
|
+
|
|
3
|
+
How a typed Remotion `<Composition schema={...} defaultProps={...} />`
|
|
4
|
+
turns into a parameterized HF composition.
|
|
5
|
+
|
|
6
|
+
## Sync calculateMetadata (translatable)
|
|
7
|
+
|
|
8
|
+
```tsx
|
|
9
|
+
<Composition
|
|
10
|
+
id="MyVideo"
|
|
11
|
+
component={MyVideo}
|
|
12
|
+
schema={z.object({ title: z.string(), duration: z.number() })}
|
|
13
|
+
defaultProps={{ title: "Hello", duration: 90 }}
|
|
14
|
+
calculateMetadata={({ props }) => ({
|
|
15
|
+
durationInFrames: props.duration,
|
|
16
|
+
fps: 30,
|
|
17
|
+
})}
|
|
18
|
+
/>
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
When `calculateMetadata` is synchronous and only uses `props`, **resolve
|
|
22
|
+
it at translation time** — call it with `defaultProps` (or whatever the
|
|
23
|
+
caller specifies) and write the concrete result into the HTML:
|
|
24
|
+
|
|
25
|
+
```html
|
|
26
|
+
<div
|
|
27
|
+
id="stage"
|
|
28
|
+
data-composition-id="MyVideo"
|
|
29
|
+
data-start="0"
|
|
30
|
+
data-duration="3" <!-- 90/30 -->
|
|
31
|
+
data-fps="30"
|
|
32
|
+
data-title="Hello"
|
|
33
|
+
></div>
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
The `data-title` attribute carries the value through. Code that originally
|
|
37
|
+
read `props.title` reads `document.getElementById("stage").dataset.title`
|
|
38
|
+
in HF.
|
|
39
|
+
|
|
40
|
+
## Async calculateMetadata (NOT translatable)
|
|
41
|
+
|
|
42
|
+
```tsx
|
|
43
|
+
<Composition
|
|
44
|
+
calculateMetadata={async ({ props }) => {
|
|
45
|
+
const res = await fetch(...);
|
|
46
|
+
return { durationInFrames: res.duration };
|
|
47
|
+
}}
|
|
48
|
+
/>
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
**Refuse + interop**. HF needs composition metadata up-front to seed the
|
|
52
|
+
HTML. Resolving network calls at translation time defeats the purpose
|
|
53
|
+
of having dynamic metadata. See [escape-hatch.md](escape-hatch.md).
|
|
54
|
+
|
|
55
|
+
The lint rule `r2hf/async-metadata` catches this. T4 case 03 tests it.
|
|
56
|
+
|
|
57
|
+
## Default props
|
|
58
|
+
|
|
59
|
+
```tsx
|
|
60
|
+
defaultProps={{
|
|
61
|
+
title: "Hello",
|
|
62
|
+
subtitle: "World",
|
|
63
|
+
count: 42,
|
|
64
|
+
}}
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Translate to `data-*` attributes on the root `#stage` div:
|
|
68
|
+
|
|
69
|
+
```html
|
|
70
|
+
<div id="stage" data-title="Hello" data-subtitle="World" data-count="42">...</div>
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Convention: `propName` → `data-prop-name` (kebab-case). Inside the GSAP
|
|
74
|
+
script, read via `document.getElementById("stage").dataset.propName`.
|
|
75
|
+
|
|
76
|
+
## Nested object / array props
|
|
77
|
+
|
|
78
|
+
```tsx
|
|
79
|
+
defaultProps={{
|
|
80
|
+
stats: [
|
|
81
|
+
{ label: "Stars", value: 1247, color: "#fbbf24" },
|
|
82
|
+
{ label: "Forks", value: 312, color: "#60a5fa" },
|
|
83
|
+
],
|
|
84
|
+
}}
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Don't try to encode the array as a JSON `data-` attribute — HF's runtime
|
|
88
|
+
doesn't parse those. Materialize the array as **repeated HTML markup**:
|
|
89
|
+
|
|
90
|
+
```html
|
|
91
|
+
<div id="scene-stats">
|
|
92
|
+
<div class="stat-card" data-stat-index="0" data-stat-value="1247" style="--card-color:#fbbf24">
|
|
93
|
+
<div class="number">0</div>
|
|
94
|
+
<div class="label">Stars</div>
|
|
95
|
+
</div>
|
|
96
|
+
<div class="stat-card" data-stat-index="1" data-stat-value="312" style="--card-color:#60a5fa">
|
|
97
|
+
<div class="number">0</div>
|
|
98
|
+
<div class="label">Forks</div>
|
|
99
|
+
</div>
|
|
100
|
+
</div>
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
The component template (`StatCard.tsx`) becomes the markup template;
|
|
104
|
+
each instance gets its scalar props rendered as `data-*` and CSS
|
|
105
|
+
custom properties.
|
|
106
|
+
|
|
107
|
+
Validated in T3 — three StatCards reused with different props,
|
|
108
|
+
mean SSIM 0.953.
|
|
109
|
+
|
|
110
|
+
## Numeric props that need typed parsing
|
|
111
|
+
|
|
112
|
+
`document.getElementById("stage").dataset.count` is a string. Convert at
|
|
113
|
+
read time:
|
|
114
|
+
|
|
115
|
+
```js
|
|
116
|
+
const count = Number(stage.dataset.count);
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Or inline values directly into the GSAP script when the data is known
|
|
120
|
+
at translation time and doesn't need to vary per render.
|
|
121
|
+
|
|
122
|
+
## Boolean props
|
|
123
|
+
|
|
124
|
+
```tsx
|
|
125
|
+
defaultProps={{ darkMode: true }}
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
Two conventions:
|
|
129
|
+
|
|
130
|
+
- `data-dark-mode="true"` — read as string, compare `=== "true"`
|
|
131
|
+
- `data-dark-mode` (presence/absence) — `<div data-dark-mode>` for true, omit for false
|
|
132
|
+
|
|
133
|
+
Pick one and be consistent. The presence/absence form is HTML-idiomatic
|
|
134
|
+
and pairs well with CSS attribute selectors:
|
|
135
|
+
|
|
136
|
+
```css
|
|
137
|
+
[data-dark-mode] .scene {
|
|
138
|
+
background: #000;
|
|
139
|
+
}
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
## Zod runtime validation
|
|
143
|
+
|
|
144
|
+
Remotion's `schema` validates props at composition load. HF doesn't have
|
|
145
|
+
an equivalent — by the time the HTML is in the renderer, the schema is
|
|
146
|
+
already gone.
|
|
147
|
+
|
|
148
|
+
Validate at translation time instead. If the user passes invalid data,
|
|
149
|
+
fail with a translation error before emitting HTML. This matches Zod's
|
|
150
|
+
"fail loud" intent without requiring the runtime dependency.
|
|
151
|
+
|
|
152
|
+
## When the composition uses props for computed prop derivation
|
|
153
|
+
|
|
154
|
+
```tsx
|
|
155
|
+
const Composition: React.FC<Props> = ({ stats }) => {
|
|
156
|
+
const total = stats.reduce((acc, s) => acc + s.value, 0);
|
|
157
|
+
return <div>{total}</div>;
|
|
158
|
+
};
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
Compute the derived value at translation time and bake it into the HTML
|
|
162
|
+
or a `data-` attribute. Don't try to express the computation in JS in the
|
|
163
|
+
HF composition — that adds runtime overhead and makes the HTML stateful
|
|
164
|
+
in ways that complicate human editing.
|
|
165
|
+
|
|
166
|
+
If the derivation is non-trivial (involves the array itself, not just
|
|
167
|
+
scalars), materialize it as static text in the HTML.
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
# Sequencing translation: Sequence, Series, Composition root
|
|
2
|
+
|
|
3
|
+
How Remotion's nested `Sequence` tree maps to HF's flat `data-start` /
|
|
4
|
+
`data-duration` markup with a single paused GSAP timeline.
|
|
5
|
+
|
|
6
|
+
## The core idea
|
|
7
|
+
|
|
8
|
+
Remotion's `<Sequence from={F} durationInFrames={D}>` is a coordinate
|
|
9
|
+
transform: it shifts `useCurrentFrame()` by `F` and clips the child
|
|
10
|
+
component to the window `[F, F+D]`. HF doesn't have a per-element
|
|
11
|
+
"current frame" — there's a single composition seek time and the
|
|
12
|
+
runtime hides/shows elements based on their `data-start` / `data-duration`.
|
|
13
|
+
|
|
14
|
+
Result: the nested tree flattens into a list of siblings on the same
|
|
15
|
+
parent, each with their own time window.
|
|
16
|
+
|
|
17
|
+
## `<Composition>` → root `#stage`
|
|
18
|
+
|
|
19
|
+
```tsx
|
|
20
|
+
<Composition
|
|
21
|
+
id="MyVideo"
|
|
22
|
+
component={MyVideo}
|
|
23
|
+
durationInFrames={300}
|
|
24
|
+
fps={30}
|
|
25
|
+
width={1280}
|
|
26
|
+
height={720}
|
|
27
|
+
/>
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
```html
|
|
31
|
+
<div
|
|
32
|
+
id="stage"
|
|
33
|
+
data-composition-id="MyVideo"
|
|
34
|
+
data-start="0"
|
|
35
|
+
data-duration="10" <!-- 300/30 -->
|
|
36
|
+
data-fps="30"
|
|
37
|
+
data-width="1280"
|
|
38
|
+
data-height="720"
|
|
39
|
+
>
|
|
40
|
+
<!-- composition content -->
|
|
41
|
+
</div>
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
`data-start="0"` is required on `#stage` (the runtime needs it to anchor
|
|
45
|
+
playback; missing it triggers a lint warning).
|
|
46
|
+
|
|
47
|
+
## `<AbsoluteFill>` → positioned div
|
|
48
|
+
|
|
49
|
+
```tsx
|
|
50
|
+
<AbsoluteFill style={{ backgroundColor: "#0a0a0a" }}>...children...</AbsoluteFill>
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
```html
|
|
54
|
+
<div style="position:absolute;inset:0;background-color:#0a0a0a;">...children...</div>
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
`AbsoluteFill` is just a styled div in Remotion. Translate to a div with
|
|
58
|
+
`position:absolute; inset:0` and copy through any other style props.
|
|
59
|
+
|
|
60
|
+
## `<Sequence>` → time-windowed div
|
|
61
|
+
|
|
62
|
+
```tsx
|
|
63
|
+
<Sequence from={0} durationInFrames={90}>
|
|
64
|
+
<TitleCard />
|
|
65
|
+
</Sequence>
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
```html
|
|
69
|
+
<div data-start="0" data-duration="3" data-track-index="0">
|
|
70
|
+
<!-- TitleCard children inlined -->
|
|
71
|
+
</div>
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Convert frames to seconds: `from/fps`, `durationInFrames/fps`. Pick a
|
|
75
|
+
`data-track-index` per parallel rendering layer (background = 0,
|
|
76
|
+
overlays = 1, audio = 2, etc.). Sequential scenes can share an index.
|
|
77
|
+
|
|
78
|
+
## Nested `<Sequence>` flattens
|
|
79
|
+
|
|
80
|
+
Remotion adds offsets when sequences nest:
|
|
81
|
+
|
|
82
|
+
```tsx
|
|
83
|
+
<Sequence from={60} durationInFrames={120}>
|
|
84
|
+
<Sequence from={30} durationInFrames={60}>
|
|
85
|
+
<ImageScene />
|
|
86
|
+
</Sequence>
|
|
87
|
+
</Sequence>
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
The inner sequence's effective window is `[60+30, 60+30+60] = [90, 150]`.
|
|
91
|
+
|
|
92
|
+
Translate by computing the sum and emitting one HF div with the resolved
|
|
93
|
+
window:
|
|
94
|
+
|
|
95
|
+
```html
|
|
96
|
+
<div data-start="3" data-duration="2" data-track-index="0">
|
|
97
|
+
<!-- ImageScene children -->
|
|
98
|
+
</div>
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## `<Series>` → siblings with sequential offsets
|
|
102
|
+
|
|
103
|
+
```tsx
|
|
104
|
+
<Series>
|
|
105
|
+
<Series.Sequence durationInFrames={60}>
|
|
106
|
+
<A />
|
|
107
|
+
</Series.Sequence>
|
|
108
|
+
<Series.Sequence durationInFrames={120}>
|
|
109
|
+
<B />
|
|
110
|
+
</Series.Sequence>
|
|
111
|
+
<Series.Sequence durationInFrames={90}>
|
|
112
|
+
<C />
|
|
113
|
+
</Series.Sequence>
|
|
114
|
+
</Series>
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Each `Sequence.Sequence` lives in the next time slot. Emit siblings
|
|
118
|
+
with `data-start` accumulating:
|
|
119
|
+
|
|
120
|
+
```html
|
|
121
|
+
<div data-start="0" data-duration="2" data-track-index="0">A</div>
|
|
122
|
+
<div data-start="2" data-duration="4" data-track-index="0">B</div>
|
|
123
|
+
<div data-start="6" data-duration="3" data-track-index="0">C</div>
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
## Crossfading scene boundaries
|
|
127
|
+
|
|
128
|
+
Remotion `<Sequence>` shows/hides at hard boundaries by default. HF does
|
|
129
|
+
the same — but if your composition needs a smooth fade between scenes,
|
|
130
|
+
you have to drive opacity explicitly with GSAP at the boundary:
|
|
131
|
+
|
|
132
|
+
```js
|
|
133
|
+
const tl = gsap.timeline({ paused: true });
|
|
134
|
+
tl.set(scene1, { opacity: 1 }, 0);
|
|
135
|
+
tl.set(scene1, { opacity: 0 }, 2); // hard cut at 2s
|
|
136
|
+
tl.set(scene2, { opacity: 1 }, 2);
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
For a 0.5 s crossfade:
|
|
140
|
+
|
|
141
|
+
```js
|
|
142
|
+
tl.to(scene1, { opacity: 0, duration: 0.5 }, 1.5);
|
|
143
|
+
tl.to(scene2, { opacity: 1, duration: 0.5 }, 1.5);
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
For Remotion `<TransitionSeries>` translations see [transitions.md](transitions.md).
|
|
147
|
+
|
|
148
|
+
## `<Loop>`
|
|
149
|
+
|
|
150
|
+
```tsx
|
|
151
|
+
<Loop durationInFrames={30}>
|
|
152
|
+
<Spinner />
|
|
153
|
+
</Loop>
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
HF doesn't have a `<Loop>` primitive. Translate to a GSAP timeline with
|
|
157
|
+
`repeat: -1`:
|
|
158
|
+
|
|
159
|
+
```js
|
|
160
|
+
const spinTl = gsap.timeline({ paused: true, repeat: -1, repeatRefresh: false });
|
|
161
|
+
spinTl.to(spinner, { rotate: 360, duration: 1.0, ease: "none" });
|
|
162
|
+
// Embed in the main composition timeline at the right offset:
|
|
163
|
+
mainTl.add(spinTl, 3);
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
This is fragile — Remotion's `<Loop>` resets internal state every iteration,
|
|
167
|
+
which GSAP repeat does too, but if the looped child has its own animation,
|
|
168
|
+
you need to be careful that GSAP's `repeatRefresh` is on or off as needed.
|
|
169
|
+
For most simple "spin forever" cases this is fine.
|
|
170
|
+
|
|
171
|
+
## `<Freeze>`
|
|
172
|
+
|
|
173
|
+
```tsx
|
|
174
|
+
<Freeze frame={30}>
|
|
175
|
+
<Animated />
|
|
176
|
+
</Freeze>
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
Drop the wrapper. `<Freeze>` pins `useCurrentFrame()` at a constant for
|
|
180
|
+
the children — but in HF, the children's animation is already driven by
|
|
181
|
+
explicit GSAP tweens, so freeze translates to "don't tween this element".
|
|
182
|
+
|
|
183
|
+
## Multiple parallel tracks
|
|
184
|
+
|
|
185
|
+
When you have a background video + overlay text + audio playing
|
|
186
|
+
simultaneously, use distinct `data-track-index` values:
|
|
187
|
+
|
|
188
|
+
```html
|
|
189
|
+
<div data-track-index="0">background video</div>
|
|
190
|
+
<div data-track-index="1">overlay text</div>
|
|
191
|
+
<audio data-track-index="2" ...></audio>
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
The runtime picks track ordering from the index. See [media.md](media.md)
|
|
195
|
+
for media-specific track conventions.
|