Skip to content

🎥 Make videos programmatically with React

Adjust code examples and prompts folder structure

ASchwad05d57e2b41dd
diff --git a/packages/template-prompt-to-motion-graphics/src/app/code-examples/page.tsx b/packages/template-prompt-to-motion-graphics/src/app/code-examples/page.tsx
index 3e22ee92b4..ff63208222 100644
--- a/packages/template-prompt-to-motion-graphics/src/app/code-examples/page.tsx
+++ b/packages/template-prompt-to-motion-graphics/src/app/code-examples/page.tsx
@@ -11,7 +11,7 @@ import {
import Link from "next/link";
import { useSearchParams, useRouter } from "next/navigation";
import { ArrowLeft, PanelLeftClose, PanelLeft } from "lucide-react";
-import { examples, getExampleById } from "../../templates";
+import { examples, getExampleById } from "../../examples/code";
import { useAnimationState } from "../../hooks/useAnimationState";
import { CodeEditor } from "../../components/CodeEditor";
import { AnimationPlayer } from "../../components/AnimationPlayer";
diff --git a/packages/template-prompt-to-motion-graphics/src/app/generate/page.tsx b/packages/template-prompt-to-motion-graphics/src/app/generate/page.tsx
index af64ca69dc..33b7974f22 100644
--- a/packages/template-prompt-to-motion-graphics/src/app/generate/page.tsx
+++ b/packages/template-prompt-to-motion-graphics/src/app/generate/page.tsx
@@ -12,7 +12,7 @@ import {
type StreamPhase,
type PromptInputRef,
} from "../../components/PromptInput";
-import { examples } from "../../templates";
+import { examples } from "../../examples/code";
import { useAnimationState } from "../../hooks/useAnimationState";
function GeneratePageContent() {
diff --git a/packages/template-prompt-to-motion-graphics/src/components/PromptInput.tsx b/packages/template-prompt-to-motion-graphics/src/components/PromptInput.tsx
index 4b3794578e..a0f0a057b7 100644
--- a/packages/template-prompt-to-motion-graphics/src/components/PromptInput.tsx
+++ b/packages/template-prompt-to-motion-graphics/src/components/PromptInput.tsx
@@ -20,7 +20,7 @@ import {
SelectValue,
} from "@/components/ui/select";
import { Button } from "@/components/ui/button";
-import { examplePrompts } from "@/data/examplePrompts";
+import { examplePrompts } from "@/examples/prompts";
const iconMap: Record<string, LucideIcon> = {
Type,
diff --git a/packages/template-prompt-to-motion-graphics/src/templates/animated-shapes.ts b/packages/template-prompt-to-motion-graphics/src/examples/code/animated-shapes.ts
similarity index 100%
rename from packages/template-prompt-to-motion-graphics/src/templates/animated-shapes.ts
rename to packages/template-prompt-to-motion-graphics/src/examples/code/animated-shapes.ts
diff --git a/packages/template-prompt-to-motion-graphics/src/templates/chat-messages.ts b/packages/template-prompt-to-motion-graphics/src/examples/code/chat-messages.ts
similarity index 100%
rename from packages/template-prompt-to-motion-graphics/src/templates/chat-messages.ts
rename to packages/template-prompt-to-motion-graphics/src/examples/code/chat-messages.ts
diff --git a/packages/template-prompt-to-motion-graphics/src/templates/counter-animation.ts b/packages/template-prompt-to-motion-graphics/src/examples/code/counter-animation.ts
similarity index 100%
rename from packages/template-prompt-to-motion-graphics/src/templates/counter-animation.ts
rename to packages/template-prompt-to-motion-graphics/src/examples/code/counter-animation.ts
diff --git a/packages/template-prompt-to-motion-graphics/src/templates/falling-spheres.ts b/packages/template-prompt-to-motion-graphics/src/examples/code/falling-spheres.ts
similarity index 100%
rename from packages/template-prompt-to-motion-graphics/src/templates/falling-spheres.ts
rename to packages/template-prompt-to-motion-graphics/src/examples/code/falling-spheres.ts
diff --git a/packages/template-prompt-to-motion-graphics/src/templates/histogram.ts b/packages/template-prompt-to-motion-graphics/src/examples/code/histogram.ts
similarity index 100%
rename from packages/template-prompt-to-motion-graphics/src/templates/histogram.ts
rename to packages/template-prompt-to-motion-graphics/src/examples/code/histogram.ts
diff --git a/packages/template-prompt-to-motion-graphics/src/templates/index.ts b/packages/template-prompt-to-motion-graphics/src/examples/code/index.ts
similarity index 100%
rename from packages/template-prompt-to-motion-graphics/src/templates/index.ts
rename to packages/template-prompt-to-motion-graphics/src/examples/code/index.ts
diff --git a/packages/template-prompt-to-motion-graphics/src/templates/lottie-animation.ts b/packages/template-prompt-to-motion-graphics/src/examples/code/lottie-animation.ts
similarity index 100%
rename from packages/template-prompt-to-motion-graphics/src/templates/lottie-animation.ts
rename to packages/template-prompt-to-motion-graphics/src/examples/code/lottie-animation.ts
diff --git a/packages/template-prompt-to-motion-graphics/src/templates/morphing-hexagons.ts b/packages/template-prompt-to-motion-graphics/src/examples/code/morphing-hexagons.ts
similarity index 100%
rename from packages/template-prompt-to-motion-graphics/src/templates/morphing-hexagons.ts
rename to packages/template-prompt-to-motion-graphics/src/examples/code/morphing-hexagons.ts
diff --git a/packages/template-prompt-to-motion-graphics/src/templates/progress-bar.ts b/packages/template-prompt-to-motion-graphics/src/examples/code/progress-bar.ts
similarity index 100%
rename from packages/template-prompt-to-motion-graphics/src/templates/progress-bar.ts
rename to packages/template-prompt-to-motion-graphics/src/examples/code/progress-bar.ts
diff --git a/packages/template-prompt-to-motion-graphics/src/templates/text-rotation.ts b/packages/template-prompt-to-motion-graphics/src/examples/code/text-rotation.ts
similarity index 100%
rename from packages/template-prompt-to-motion-graphics/src/templates/text-rotation.ts
rename to packages/template-prompt-to-motion-graphics/src/examples/code/text-rotation.ts
diff --git a/packages/template-prompt-to-motion-graphics/src/data/examplePrompts.ts b/packages/template-prompt-to-motion-graphics/src/examples/prompts.ts
similarity index 100%
rename from packages/template-prompt-to-motion-graphics/src/data/examplePrompts.ts
rename to packages/template-prompt-to-motion-graphics/src/examples/prompts.ts