Write HTML. Render video. Built for agents.
JavaScript aiai-agentsanimationclaude-codeffmpegframeworkgsaphtmlhtml-to-videomcpmotion-graphicspuppeteerrenderingtypescriptvideo-editor
fix(registry): position flowchart typing beats with label-relative offsets (#2549)
Pawełb44bc4ffafb2
diff --git a/registry/blocks/flowchart-vertical/flowchart-vertical.html b/registry/blocks/flowchart-vertical/flowchart-vertical.htmlindex 872a16d07e..5f94cd4d3f 100644--- a/registry/blocks/flowchart-vertical/flowchart-vertical.html+++ b/registry/blocks/flowchart-vertical/flowchart-vertical.html@@ -414,8 +414,10 @@// 13. Holdtl.addLabel("hold5", "+=0.2");- // 14. Type correction: "Pythom" → "Python"- const typingStart = tl.labels["hold5"];+ // 14. Type correction: "Pythom" → "Python" — positioned relative to the "hold5"+ // label. Reading tl.labels back is unavailable under the render compiler's GSAP+ // proxy (it throws before the timeline is registered, leaving the block blank),+ // so use GSAP's own label-relative position syntax instead.const words = ["P", "Py", "Pyt", "Pyth", "Pytho", "Python"];words.forEach((word, i) => {tl.add(@@ -423,18 +425,18 @@if (pythonText)pythonText.innerHTML = `Start with <span class="text-highlight">${word}</span>`;},- typingStart + i * 0.05,+ `hold5+=${i * 0.05}`,);});- const typingEnd = typingStart + words.length * 0.05;+ const typingEnd = words.length * 0.05;tl.add(() => {if (pythonText) pythonText.innerHTML = "Start with Python";gsap.set(S + " .squiggle-container", { opacity: 0 });- }, typingEnd);+ }, `hold5+=${typingEnd}`);// 15. Hold- tl.addLabel("hold6", typingEnd + 0.5);+ tl.addLabel("hold6", `hold5+=${typingEnd + 0.5}`);// 16. Cursor clicks away to deselecttl.to(S + " #cursor", { x: -1050, y: -1520, duration: 0.3, overwrite: "auto" }, "hold6");diff --git a/registry/blocks/flowchart/flowchart.html b/registry/blocks/flowchart/flowchart.htmlindex da31cbcac5..93941217a6 100644--- a/registry/blocks/flowchart/flowchart.html+++ b/registry/blocks/flowchart/flowchart.html@@ -414,8 +414,10 @@// 13. Holdtl.addLabel("hold5", "+=0.2");- // 14. Type correction: "Pythom" → "Python"- const typingStart = tl.labels["hold5"];+ // 14. Type correction: "Pythom" → "Python" — positioned relative to the "hold5"+ // label. Reading tl.labels back is unavailable under the render compiler's GSAP+ // proxy (it throws before the timeline is registered, leaving the block blank),+ // so use GSAP's own label-relative position syntax instead.const words = ["P", "Py", "Pyt", "Pyth", "Pytho", "Python"];words.forEach((word, i) => {tl.add(@@ -423,18 +425,18 @@if (pythonText)pythonText.innerHTML = `Start with <span class="text-highlight">${word}</span>`;},- typingStart + i * 0.05,+ `hold5+=${i * 0.05}`,);});- const typingEnd = typingStart + words.length * 0.05;+ const typingEnd = words.length * 0.05;tl.add(() => {if (pythonText) pythonText.innerHTML = "Start with Python";gsap.set(S + " .squiggle-container", { opacity: 0 });- }, typingEnd);+ }, `hold5+=${typingEnd}`);// 15. Hold- tl.addLabel("hold6", typingEnd + 0.5);+ tl.addLabel("hold6", `hold5+=${typingEnd + 0.5}`);// 16. Cursor clicks away to deselecttl.to(S + " #cursor", { x: -1420, y: -500, duration: 0.3, overwrite: "auto" }, "hold6");