🎥 Make videos programmatically with React
add new routes
JonnyBurger1b0727cf4033
diff --git a/packages/convert/app/components/get-supported-configs.tsx b/packages/convert/app/components/get-supported-configs.tsxindex bc74379d26..288bf785c7 100644--- a/packages/convert/app/components/get-supported-configs.tsx+++ b/packages/convert/app/components/get-supported-configs.tsx@@ -82,6 +82,14 @@ const shouldPrioritizeVideoCopyOverReencode = (routeAction: RouteAction) => {return true;}+ if (routeAction.type === 'prompt-showcase') {+ return false;+ }++ if (routeAction.type === 'prompt-showcase-detail') {+ return false;+ }+throw new Error('Unsupported route action' + (routeAction satisfies never));};diff --git a/packages/convert/app/lib/default-ui.ts b/packages/convert/app/lib/default-ui.tsindex f0f589dd9d..cde7b5baf4 100644--- a/packages/convert/app/lib/default-ui.ts+++ b/packages/convert/app/lib/default-ui.ts@@ -61,6 +61,14 @@ export const defaultRotateOrMirorState = (return null;}+ if (action.type === 'prompt-showcase') {+ return null;+ }++ if (action.type === 'prompt-showcase-detail') {+ return null;+ }+throw new Error('Rotate is not enabled by default ' + (action satisfies never),);@@ -123,6 +131,14 @@ export const isConvertEnabledByDefault = (action: RouteAction) => {return true;}+ if (action.type === 'prompt-showcase') {+ return true;+ }++ if (action.type === 'prompt-showcase-detail') {+ return true;+ }+throw new Error('Convert is not enabled by default ' + (action satisfies never),);@@ -199,7 +215,9 @@ export const getOrderOfSections = (action.type === 'resize-format' ||action.type === 'report' ||action.type === 'transcribe' ||- action.type === 'timing-editor'+ action.type === 'timing-editor' ||+ action.type === 'prompt-showcase' ||+ action.type === 'prompt-showcase-detail') {return {resize: 0,diff --git a/packages/convert/app/seo.ts b/packages/convert/app/seo.tsindex 0c3226a355..e3d42f5439 100644--- a/packages/convert/app/seo.ts+++ b/packages/convert/app/seo.ts@@ -78,6 +78,12 @@ export type RouteAction =}| {type: 'timing-editor';+ }+ | {+ type: 'prompt-showcase';+ }+ | {+ type: 'prompt-showcase-detail';};export const getHeaderTitle = (routeAction: RouteAction) => {@@ -137,6 +143,14 @@ export const getHeaderTitle = (routeAction: RouteAction) => {return `Fast ${renderHumanReadableContainer(routeAction.format)} cropping in the browser`;}+ if (routeAction.type === 'prompt-showcase') {+ return 'Prompt Gallery';+ }++ if (routeAction.type === 'prompt-showcase-detail') {+ return 'Prompt Gallery';+ }+throw new Error(`Invalid route action ${routeAction satisfies never}`);};@@ -197,6 +211,14 @@ export const getPageTitle = (routeAction: RouteAction) => {return `Online ${renderHumanReadableContainer(routeAction.format)} Cropper - Remotion Convert`;}+ if (routeAction.type === 'prompt-showcase') {+ return 'Prompt Gallery - Remotion';+ }++ if (routeAction.type === 'prompt-showcase-detail') {+ return 'Prompt Gallery - Remotion';+ }+throw new Error(`Invalid route action ${routeAction satisfies never}`);};@@ -263,6 +285,14 @@ export const getDescription = (routeAction: RouteAction) => {return `The fastest online ${renderHumanReadableContainer(routeAction.format)} cropper, powered by WebCodecs. No upload required, no watermarks, no limits.`;}+ if (routeAction.type === 'prompt-showcase') {+ return 'Browse AI-generated video prompts created with Remotion Skills. Get inspired and create your own.';+ }++ if (routeAction.type === 'prompt-showcase-detail') {+ return 'Browse AI-generated video prompts created with Remotion Skills. Get inspired and create your own.';+ }+throw new Error(`Invalid route action ${routeAction satisfies never}`);};@@ -323,5 +353,13 @@ export const makeSlug = (routeAction: RouteAction) => {return `/crop/${routeAction.format}`;}+ if (routeAction.type === 'prompt-showcase') {+ return '/prompts';+ }++ if (routeAction.type === 'prompt-showcase-detail') {+ return '/prompts/show';+ }+throw new Error(`Invalid route action ${routeAction satisfies never}`);};diff --git a/packages/docs/copy-convert.ts b/packages/docs/copy-convert.tsindex 5e33bab18e..91c6d2e2e6 100644--- a/packages/docs/copy-convert.ts+++ b/packages/docs/copy-convert.ts@@ -107,6 +107,14 @@ extraPages.push({type: 'timing-editor',});+extraPages.push({+ type: 'prompt-showcase',+});++extraPages.push({+ type: 'prompt-showcase-detail',+});+for (const page of extraPages) {const slug = seo.makeSlug(page);const pageTitle = seo.getPageTitle(page);