Skip to content

Write HTML. Render video. Built for agents.

fix(studio): fix catalog Add button per category, search by tags

Miguel Ángel76d2c6af5dfb
diff --git a/packages/studio/src/components/sidebar/BlocksTab.tsx b/packages/studio/src/components/sidebar/BlocksTab.tsx
index f61eecf2ec..46a4a734c5 100644
--- a/packages/studio/src/components/sidebar/BlocksTab.tsx
+++ b/packages/studio/src/components/sidebar/BlocksTab.tsx
@@ -119,7 +119,9 @@ export const BlocksTab = memo(function BlocksTab({ onAddBlock, onPreviewBlock }:
videoUrl={block.preview?.video}
onPreview={onPreviewBlock}
onAdd={
- block.type === "hyperframes:component"
+ block.category === "vfx" ||
+ block.category === "social" ||
+ block.category === "scenes"
? () => onAddBlock?.(block.name)
: undefined
}
diff --git a/packages/studio/src/hooks/useBlockCatalog.ts b/packages/studio/src/hooks/useBlockCatalog.ts
index f11454c0f5..83ea930ed3 100644
--- a/packages/studio/src/hooks/useBlockCatalog.ts
+++ b/packages/studio/src/hooks/useBlockCatalog.ts
@@ -56,7 +56,11 @@ export function useBlockCatalog() {
if (search.trim()) {
const q = search.toLowerCase();
result = result.filter(
- (b) => b.title.toLowerCase().includes(q) || b.description.toLowerCase().includes(q),
+ (b) =>
+ b.title.toLowerCase().includes(q) ||
+ b.description.toLowerCase().includes(q) ||
+ b.category.toLowerCase().includes(q) ||
+ b.tags?.some((t) => t.toLowerCase().includes(q)),
);
}
return result;