Skip to content

Write HTML. Render video. Built for agents.

fix(catalog): regenerating the texture-mask page no longer duplicates its section (#4302)

Miguel Ángelbc1c60ae5b6e
diff --git a/docs/catalog/components/texture-mask-text.mdx b/docs/catalog/components/texture-mask-text.mdx
index aeaf92116f..04674524d4 100644
--- a/docs/catalog/components/texture-mask-text.mdx
+++ b/docs/catalog/components/texture-mask-text.mdx
@@ -885,64 +885,6 @@ window.__timelines["my-composition"] = tl;
</div>
</div>
-## Texture masks
-
-<div className="hf-texture-preview-panel">
- <div className="hf-texture-preview-card" style={{ "--mask-url": "url('https://static.heygen.ai/hyperframes-oss/docs/images/catalog/components/texture-mask-text/masks/brick.png')" }}>
- <div className="hf-texture-preview-label">Brick</div>
- <div className="hf-texture-preview-shadow"><div className="hf-texture-preview-word">BRICK</div></div>
- </div>
- <div className="hf-texture-preview-card" style={{ "--mask-url": "url('https://static.heygen.ai/hyperframes-oss/docs/images/catalog/components/texture-mask-text/masks/rock.png')" }}>
- <div className="hf-texture-preview-label">Rock</div>
- <div className="hf-texture-preview-shadow"><div className="hf-texture-preview-word">ROCK</div></div>
- </div>
- <div className="hf-texture-preview-card" style={{ "--mask-url": "url('https://static.heygen.ai/hyperframes-oss/docs/images/catalog/components/texture-mask-text/masks/ground-103.png')" }}>
- <div className="hf-texture-preview-label">Ground 103</div>
- <div className="hf-texture-preview-shadow"><div className="hf-texture-preview-word">GROUND</div></div>
- </div>
- <div className="hf-texture-preview-card" style={{ "--mask-url": "url('https://static.heygen.ai/hyperframes-oss/docs/images/catalog/components/texture-mask-text/masks/wood.png')" }}>
- <div className="hf-texture-preview-label">Wood</div>
- <div className="hf-texture-preview-shadow"><div className="hf-texture-preview-word">WOOD</div></div>
- </div>
- <div className="hf-texture-preview-card" style={{ "--mask-url": "url('https://static.heygen.ai/hyperframes-oss/docs/images/catalog/components/texture-mask-text/masks/metal.png')" }}>
- <div className="hf-texture-preview-label">Metal</div>
- <div className="hf-texture-preview-shadow"><div className="hf-texture-preview-word">METAL</div></div>
- </div>
- <div className="hf-texture-preview-card" style={{ "--mask-url": "url('https://static.heygen.ai/hyperframes-oss/docs/images/catalog/components/texture-mask-text/masks/lava.png')" }}>
- <div className="hf-texture-preview-label">Lava</div>
- <div className="hf-texture-preview-shadow"><div className="hf-texture-preview-word">LAVA</div></div>
- </div>
-</div>
-
-## Texture masks
-
-<div className="hf-texture-preview-panel">
- <div className="hf-texture-preview-card" style={{ "--mask-url": "url('https://static.heygen.ai/hyperframes-oss/docs/images/catalog/components/texture-mask-text/masks/brick.png')" }}>
- <div className="hf-texture-preview-label">Brick</div>
- <div className="hf-texture-preview-shadow"><div className="hf-texture-preview-word">BRICK</div></div>
- </div>
- <div className="hf-texture-preview-card" style={{ "--mask-url": "url('https://static.heygen.ai/hyperframes-oss/docs/images/catalog/components/texture-mask-text/masks/rock.png')" }}>
- <div className="hf-texture-preview-label">Rock</div>
- <div className="hf-texture-preview-shadow"><div className="hf-texture-preview-word">ROCK</div></div>
- </div>
- <div className="hf-texture-preview-card" style={{ "--mask-url": "url('https://static.heygen.ai/hyperframes-oss/docs/images/catalog/components/texture-mask-text/masks/ground-103.png')" }}>
- <div className="hf-texture-preview-label">Ground 103</div>
- <div className="hf-texture-preview-shadow"><div className="hf-texture-preview-word">GROUND</div></div>
- </div>
- <div className="hf-texture-preview-card" style={{ "--mask-url": "url('https://static.heygen.ai/hyperframes-oss/docs/images/catalog/components/texture-mask-text/masks/wood.png')" }}>
- <div className="hf-texture-preview-label">Wood</div>
- <div className="hf-texture-preview-shadow"><div className="hf-texture-preview-word">WOOD</div></div>
- </div>
- <div className="hf-texture-preview-card" style={{ "--mask-url": "url('https://static.heygen.ai/hyperframes-oss/docs/images/catalog/components/texture-mask-text/masks/metal.png')" }}>
- <div className="hf-texture-preview-label">Metal</div>
- <div className="hf-texture-preview-shadow"><div className="hf-texture-preview-word">METAL</div></div>
- </div>
- <div className="hf-texture-preview-card" style={{ "--mask-url": "url('https://static.heygen.ai/hyperframes-oss/docs/images/catalog/components/texture-mask-text/masks/lava.png')" }}>
- <div className="hf-texture-preview-label">Lava</div>
- <div className="hf-texture-preview-shadow"><div className="hf-texture-preview-word">LAVA</div></div>
- </div>
-</div>
-
{/* hf:generated-footer */}
Tagged `text` `text-effect` `effect` `texture` `mask`.
diff --git a/packages/core/src/registry/catalogGeneratorInstructions.test.ts b/packages/core/src/registry/catalogGeneratorInstructions.test.ts
index 5de9dda7f6..29519bc686 100644
--- a/packages/core/src/registry/catalogGeneratorInstructions.test.ts
+++ b/packages/core/src/registry/catalogGeneratorInstructions.test.ts
@@ -86,6 +86,23 @@ describe("carriedSectionsFrom preserves hand-written sections", () => {
expect(joined).not.toContain("## Install");
});
+ it("does not carry the generated Texture masks section into the next run", () => {
+ const page = write(
+ "texture-masks.mdx",
+ [
+ "## Texture masks",
+ "",
+ '<div className="hf-texture-preview-panel">',
+ ' <div className="hf-texture-preview-label">Brick</div>',
+ "</div>",
+ "",
+ "{/* hf:generated-footer */}",
+ "",
+ ].join("\n"),
+ );
+ expect(carriedSectionsFrom(page).sections).toEqual([]);
+ });
+
it("keeps a hand-written section appended below the generated footer", () => {
const page = write(
"below-footer.mdx",
diff --git a/scripts/generate-catalog-pages.ts b/scripts/generate-catalog-pages.ts
index 17bf1691fd..bf435eb0af 100644
--- a/scripts/generate-catalog-pages.ts
+++ b/scripts/generate-catalog-pages.ts
@@ -166,6 +166,7 @@ const GENERATED_HEADINGS = new Set([
"ask an agent for it",
"make the texture move",
"every texture",
+ "texture masks",
// headings earlier revisions emitted — dropped on purpose, never carried.
// `usage` is deliberately NOT listed: the current template never emits it, and
// it is a heading a human might reasonably write, so ownership stays explicit