diff --git a/servers/nextjs/components/layouts/BulletPointSlideLayout.tsx b/servers/nextjs/components/layouts/BulletPointSlideLayout.tsx index 58f7b8b9..b44e039b 100644 --- a/servers/nextjs/components/layouts/BulletPointSlideLayout.tsx +++ b/servers/nextjs/components/layouts/BulletPointSlideLayout.tsx @@ -1,23 +1,16 @@ import React from 'react' import * as z from "zod"; +import { imageSchema } from './defaultSchemes'; export const layoutId = 'bullet-point-slide' export const layoutName = 'Bullet Point Slide' export const layoutDescription = 'A slide with a title, subtitle, and a list of bullet points.' -const imageSchema = z.object({ - url: z.url().meta({ - description: "URL to image", - }), - prompt: z.string().meta({ - description: "Prompt used to generate the image", - }), -}) const bulletPointSlideSchema = z.object({ title: z.string().min(3).max(100).default('Key Points').meta({ description: "Title of the slide", - badu: "'badf" + }), subtitle: z.string().min(3).max(150).optional().meta({ description: "Optional subtitle or description", diff --git a/servers/nextjs/components/layouts/ConclusionSlideLayout.tsx b/servers/nextjs/components/layouts/ConclusionSlideLayout.tsx index 6d03dab5..9d7e4a3e 100644 --- a/servers/nextjs/components/layouts/ConclusionSlideLayout.tsx +++ b/servers/nextjs/components/layouts/ConclusionSlideLayout.tsx @@ -1,5 +1,6 @@ import React from 'react' import * as z from "zod"; +import { imageSchema } from './defaultSchemes'; export const layoutId = 'conclusion-slide' export const layoutName = 'Conclusion Slide' @@ -36,8 +37,8 @@ const conclusionSlideSchema = z.object({ }).optional().meta({ description: "Optional contact information", }), - backgroundImage: z.string().optional().meta({ - description: "URL to background image for the slide", + backgroundImage: imageSchema.optional().meta({ + description: "Background image for the slide", }) }) diff --git a/servers/nextjs/components/layouts/ContentSlideLayout.tsx b/servers/nextjs/components/layouts/ContentSlideLayout.tsx index 25695596..5ad058d8 100644 --- a/servers/nextjs/components/layouts/ContentSlideLayout.tsx +++ b/servers/nextjs/components/layouts/ContentSlideLayout.tsx @@ -1,5 +1,6 @@ import React from 'react' import * as z from "zod"; +import { imageSchema } from './defaultSchemes'; export const layoutId = 'content-slide' @@ -16,8 +17,8 @@ const contentSlideSchema = z.object({ content: z.string().min(10).max(1000).default('Your slide content goes here. This is where you can add detailed information, explanations, or any other text content that supports your presentation.').meta({ description: "Main content text", }), - backgroundImage: z.string().optional().meta({ - description: "URL to background image for the slide", + backgroundImage: imageSchema.optional().meta({ + description: "Background image for the slide", }) }) diff --git a/servers/nextjs/components/layouts/FirstSlideLayout.tsx b/servers/nextjs/components/layouts/FirstSlideLayout.tsx index 3c1409ca..a65f8d8e 100644 --- a/servers/nextjs/components/layouts/FirstSlideLayout.tsx +++ b/servers/nextjs/components/layouts/FirstSlideLayout.tsx @@ -1,5 +1,6 @@ import React from 'react' import * as z from "zod"; +import { imageSchema } from './defaultSchemes'; export const layoutId = 'first-slide' @@ -22,8 +23,8 @@ const firstSlideSchema = z.object({ company: z.string().max(100).default('Company Name').optional().meta({ description: "Company or organization name", }), - backgroundImage: z.string().optional().meta({ - description: "URL to background image for the slide", + backgroundImage: imageSchema.optional().meta({ + description: "Background image for the slide", }) }) diff --git a/servers/nextjs/components/layouts/ImageSlideLayout.tsx b/servers/nextjs/components/layouts/ImageSlideLayout.tsx deleted file mode 100644 index 91b7f794..00000000 --- a/servers/nextjs/components/layouts/ImageSlideLayout.tsx +++ /dev/null @@ -1,156 +0,0 @@ -import React from 'react' -import * as z from "zod"; - - -export const layoutId = 'image-slide' -export const layoutName = 'Image Slide' -export const layoutDescription = 'A slide with a title, subtitle, image, and content' - -const imageSlideSchema = z.object({ - title: z.string().min(3).max(100).default('Image Showcase').meta({ - description: "Title of the slide", - }), - subtitle: z.string().min(3).max(150).default('Subtitle for the slide').optional().meta({ - description: "Optional subtitle or description", - }), - image: z.string().default('https://images.unsplash.com/photo-1460925895917-afdab827c52f?w=800&h=600&fit=crop').meta({ - description: "Main image URL", - }), - imageCaption: z.string().min(5).max(200).default('Image caption').optional().meta({ - description: "Optional image caption or description", - }), - content: z.string().min(10).max(600).optional().meta({ - description: "Optional supporting content text", - }), - backgroundImage: z.string().optional().meta({ - description: "URL to background image for the slide", - }) -}) - -export const Schema = imageSlideSchema - -export type ImageSlideData = z.infer - -interface ImageSlideLayoutProps { - data?: Partial - accentColor?: 'blue' | 'green' | 'purple' | 'orange' | 'red' -} - -const ImageSlideLayout: React.FC = ({ data: slideData, accentColor = 'blue' }) => { - - - const accentColors = { - blue: 'from-blue-600 to-blue-800', - green: 'from-emerald-600 to-emerald-800', - purple: 'from-violet-600 to-violet-800', - orange: 'from-orange-600 to-orange-800', - red: 'from-red-600 to-red-800' - } - - const accentSolids = { - blue: 'bg-blue-600', - green: 'bg-emerald-600', - purple: 'bg-violet-600', - orange: 'bg-orange-600', - red: 'bg-red-600' - } - - - - return ( -
- {/* Enhanced geometric background decoration */} -
-
-
-
- -
- {/* Professional Header */} -
-

- - {slideData?.title} - -

- - {slideData?.subtitle && ( -

- {slideData?.subtitle} -

- )} - -
-
-
-
-
- - {/* Enhanced Content Layout */} -
-
- - -
- {slideData?.content?.split('\n').map((paragraph, index) => ( - paragraph.trim() && ( -

- {paragraph} -

- ) - ))} -
- - {/* Background decoration */} -
-
-
-
- {slideData?.imageCaption -
-
- {slideData?.imageCaption && ( -

- {slideData?.imageCaption} -

- )} -
-
-
- - {/* Enhanced decorative accent */} -
-
-
-
- - {/* Professional corner accents */} -
-
- ) -} - -export default ImageSlideLayout \ No newline at end of file diff --git a/servers/nextjs/components/layouts/ProcessSlideLayout.tsx b/servers/nextjs/components/layouts/ProcessSlideLayout.tsx index 4d45a510..2bb03eae 100644 --- a/servers/nextjs/components/layouts/ProcessSlideLayout.tsx +++ b/servers/nextjs/components/layouts/ProcessSlideLayout.tsx @@ -1,5 +1,6 @@ import React from 'react' import * as z from "zod"; +import { imageSchema } from './defaultSchemes'; export const layoutId = 'process-slide' @@ -45,8 +46,8 @@ const processSlideSchema = z.object({ description: 'Final delivery and ongoing support' } ]).describe('Process steps (2-6 items)'), - backgroundImage: z.string().optional().meta({ - description: "URL to background image for the slide", + backgroundImage: imageSchema.optional().meta({ + description: "Background image for the slide", }) }) diff --git a/servers/nextjs/components/layouts/QuoteSlideLayout.tsx b/servers/nextjs/components/layouts/QuoteSlideLayout.tsx index 319a8feb..0f1f5715 100644 --- a/servers/nextjs/components/layouts/QuoteSlideLayout.tsx +++ b/servers/nextjs/components/layouts/QuoteSlideLayout.tsx @@ -1,5 +1,6 @@ import React from 'react' import * as z from "zod"; +import { imageSchema } from './defaultSchemes'; export const layoutId = 'quote-slide' @@ -28,8 +29,8 @@ const quoteSlideSchema = z.object({ authorImage: z.string().optional().meta({ description: "URL to author photo", }), - backgroundImage: z.string().optional().meta({ - description: "URL to background image for the slide", + backgroundImage: imageSchema.optional().meta({ + description: "Background image for the slide", }) }) diff --git a/servers/nextjs/components/layouts/StatisticsSlideLayout.tsx b/servers/nextjs/components/layouts/StatisticsSlideLayout.tsx index 478222e5..d9eea523 100644 --- a/servers/nextjs/components/layouts/StatisticsSlideLayout.tsx +++ b/servers/nextjs/components/layouts/StatisticsSlideLayout.tsx @@ -1,5 +1,6 @@ import React from 'react' import * as z from "zod"; +import { imageSchema } from './defaultSchemes'; export const layoutId = 'statistics-slide' @@ -52,8 +53,8 @@ const statisticsSlideSchema = z.object({ context: 'Customer service' } ]).describe('List of statistics (2-6 items)'), - backgroundImage: z.string().optional().meta({ - description: "URL to background image for the slide", + backgroundImage: imageSchema.optional().meta({ + description: "Background image for the slide", }) }) diff --git a/servers/nextjs/components/layouts/TeamSlideLayout.tsx b/servers/nextjs/components/layouts/TeamSlideLayout.tsx index 14eaa136..dbf018eb 100644 --- a/servers/nextjs/components/layouts/TeamSlideLayout.tsx +++ b/servers/nextjs/components/layouts/TeamSlideLayout.tsx @@ -1,5 +1,6 @@ import React from 'react' import * as z from "zod"; +import { imageSchema } from './defaultSchemes'; export const layoutId = 'team-slide' export const layoutName = 'Team Slide' @@ -57,7 +58,9 @@ const teamSlideSchema = z.object({ linkedin: 'https://linkedin.com/in/emmarodriguez' } ]).describe('Team members (1-6 people)'), - backgroundImage: z.string().optional().describe('URL to background image for the slide') + backgroundImage: imageSchema.optional().meta({ + description: "Background image for the slide", + }), }) export const Schema = teamSlideSchema diff --git a/servers/nextjs/components/layouts/TimelineSlideLayout.tsx b/servers/nextjs/components/layouts/TimelineSlideLayout.tsx index a7fc8081..aca68146 100644 --- a/servers/nextjs/components/layouts/TimelineSlideLayout.tsx +++ b/servers/nextjs/components/layouts/TimelineSlideLayout.tsx @@ -1,5 +1,6 @@ import React from 'react' import * as z from "zod"; +import { imageSchema } from './defaultSchemes'; export const layoutId = 'timeline-slide' @@ -54,8 +55,8 @@ const timelineSlideSchema = z.object({ ]).meta({ description: "Timeline events (2-6 items)", }), - backgroundImage: z.string().optional().meta({ - description: "URL to background image for the slide", + backgroundImage: imageSchema.optional().meta({ + description: "Background image for the slide", }) }) diff --git a/servers/nextjs/components/layouts/TwoColumnSlideLayout.tsx b/servers/nextjs/components/layouts/TwoColumnSlideLayout.tsx deleted file mode 100644 index 1f77dbaa..00000000 --- a/servers/nextjs/components/layouts/TwoColumnSlideLayout.tsx +++ /dev/null @@ -1,180 +0,0 @@ -import React from 'react' -import * as z from "zod"; - - -export const layoutId = 'two-column-slide' -export const layoutName = 'Two Column Slide' -export const layoutDescription = 'A slide with a title, subtitle, and two columns of content' - -const twoColumnSlideSchema = z.object({ - title: z.string().min(3).max(100).default('Two Column Layout').meta({ - description: "Title of the slide", - }), - subtitle: z.string().min(3).max(150).optional().meta({ - description: "Optional subtitle or description", - }), - leftColumn: z.object({ - title: z.string().min(3).max(100).default('Left Column').meta({ - description: "Left column title", - }), - content: z.string().min(10).max(800).default('Content for the left column goes here. This can include detailed information, explanations, or supporting details.').meta({ - description: "Left column content", - }) - }).default({ - title: 'Left Column', - content: 'Content for the left column goes here. This can include detailed information, explanations, or supporting details.' - }), - rightColumn: z.object({ - title: z.string().min(3).max(100).default('Right Column').meta({ - description: "Right column title", - }), - content: z.string().min(10).max(800).default('Content for the right column goes here. This can include additional information, comparisons, or contrasting details.').meta({ - description: "Right column content", - }) - }).default({ - title: 'Right Column', - content: 'Content for the right column goes here. This can include additional information, comparisons, or contrasting details.' - }), - backgroundImage: z.string().optional().meta({ - description: "URL to background image for the slide", - }) -}) - -export const Schema = twoColumnSlideSchema - - -export type TwoColumnSlideData = z.infer - -interface TwoColumnSlideLayoutProps { - data?: Partial - accentColor?: 'blue' | 'green' | 'purple' | 'orange' | 'red' -} - -const TwoColumnSlideLayout: React.FC = ({ data: slideData, accentColor = 'blue' }) => { - - - const accentColors = { - blue: 'from-blue-600 to-blue-800', - green: 'from-emerald-600 to-emerald-800', - purple: 'from-violet-600 to-violet-800', - orange: 'from-orange-600 to-orange-800', - red: 'from-red-600 to-red-800' - } - - const accentSolids = { - blue: 'bg-blue-600', - green: 'bg-emerald-600', - purple: 'bg-violet-600', - orange: 'bg-orange-600', - red: 'bg-red-600' - } - - return ( -
- {/* Enhanced geometric background decoration */} -
-
-
-
- -
- {/* Professional Header */} -
-

- - {slideData?.title} - -

- - {slideData?.subtitle && ( -

- {slideData?.subtitle} -

- )} - -
-
-
-
-
- - {/* Two Column Content with Enhanced Styling */} -
- {/* Left Column */} -
- {/* Column accent */} -
- -

- {slideData?.leftColumn?.title} -

-
- {slideData?.leftColumn?.content?.split('\n').map((paragraph, index) => ( - paragraph.trim() && ( -

- {paragraph} -

- ) - ))} -
-
- - {/* Right Column */} -
- {/* Column accent */} -
- -

- {slideData?.rightColumn?.title} -

-
- {slideData?.rightColumn?.content?.split('\n').map((paragraph, index) => ( - paragraph.trim() && ( -

- {paragraph} -

- ) - ))} -
-
-
-
- - {/* Enhanced decorative accent */} -
-
-
-
- - {/* Professional corner accents */} -
-
- ) -} - -export default TwoColumnSlideLayout \ No newline at end of file diff --git a/servers/nextjs/components/layouts/defaultSchemes.ts b/servers/nextjs/components/layouts/defaultSchemes.ts new file mode 100644 index 00000000..c6ea594b --- /dev/null +++ b/servers/nextjs/components/layouts/defaultSchemes.ts @@ -0,0 +1,23 @@ +import * as z from "zod"; + +export const imageSchema = z.object({ + url: z.url().meta({ + description: "URL to image", + }), + prompt: z.string().meta({ + description: "Prompt used to generate the image", + }), +}).meta({ + imageType: 'image', +}) + +export const IconSchema = z.object({ + url: z.string().meta({ + description: "URL to icon", + }), + prompt: z.string().meta({ + description: "Prompt used to generate the icon", + }), +}).meta({ + imageType: 'icon', +}) \ No newline at end of file