diff --git a/servers/nextjs/presentation-templates/classic-dark/1-TitleSlide.tsx b/servers/nextjs/presentation-templates/classic-dark/1-TitleSlide.tsx deleted file mode 100644 index 6f7846db..00000000 --- a/servers/nextjs/presentation-templates/classic-dark/1-TitleSlide.tsx +++ /dev/null @@ -1,87 +0,0 @@ -import React from 'react' -import * as z from "zod"; -import { ImageSchema } from '@/presentation-templates/defaultSchemes'; - -export const layoutId = 'classic-dark-title-slide' -export const layoutName = 'Classic Dark Title Slide' -export const layoutDescription = 'A modern title slide with dark gradient background, gradient text, and geographical elements.' - -const titleSlideSchema = z.object({ - title: z.string().min(3).max(100).default('Nepal\'s Imports and\nExports: A Data-Driven\nOverview').meta({ - description: "Main title of the slide", - }), - subtitle: z.string().min(3).max(100).default('Key Trade Statistics and Trends (2022–2025)').meta({ - description: "Subtitle text", - }), - presenter: z.string().min(3).max(50).default('[Your Name]').meta({ - description: "Presenter name", - }), - date: z.string().min(3).max(50).default('April 13, 2025').meta({ - description: "Presentation date", - }), - image: ImageSchema.default({ - __image_url__: 'https://images.pexels.com/photos/9669089/pexels-photo-9669089.jpeg', - __image_prompt__: 'Map of Nepal with gradient coloring from orange to red-brown' - }).meta({ - description: "Image of the title slide of the presentation", - }), -}) - -export const Schema = titleSlideSchema - -export type TitleSlideData = z.infer - -interface TitleSlideLayoutProps { - data: Partial -} - -const TitleSlideLayout: React.FC = ({ data: slideData }) => { - const { title, subtitle, presenter, date, image } = slideData; - - return ( -
- -
- {/* Left side - Text content */} -
- {/* Title */} - {title && ( -

- {title} -

- )} - - {/* Subtitle */} - {subtitle && ( -

- {subtitle} -

- )} - - {/* Presenter and date */} -
- Presenter: {presenter} | {date} -
-
- - {/* Right side - Visual elements */} -
- {image && ( -
- {image.__image_prompt__} -
- )} -
-
-
- ) -} - -export default TitleSlideLayout diff --git a/servers/nextjs/presentation-templates/classic-dark/2-ChartAndMetrics.tsx b/servers/nextjs/presentation-templates/classic-dark/2-ChartAndMetrics.tsx deleted file mode 100644 index c266bbe3..00000000 --- a/servers/nextjs/presentation-templates/classic-dark/2-ChartAndMetrics.tsx +++ /dev/null @@ -1,154 +0,0 @@ -import React from 'react' -import * as z from "zod"; -import { ChartContainer, ChartLegend, ChartLegendContent, ChartTooltip, ChartTooltipContent } from '@/components/ui/chart'; -import { PieChart, Pie, Cell } from "recharts"; - -export const layoutId = 'classic-dark-piechart-and-metrics' -export const layoutName = 'Classic Dark Pie Chart and Metrics' -export const layoutDescription = 'A modern slide with dark background, metrics on the left, and pie chart visualization on the right.' - -const chartDataSchema = z.object({ - name: z.string().min(2).max(30).meta({ description: "Data point name" }), - value: z.number().meta({ description: "Data point value" }), -}); - -const pieChartAndMetricsSchema = z.object({ - title: z.string().min(3).max(80).default('Introduction to Nepal\'s Trade').meta({ - description: "Main title of the slide", - }), - description: z.string().min(10).max(100).default('Nepal\'s landlocked geography heavily influences its trade, fostering reliance on India and China.').meta({ - description: "Description text", - }), - metrics: z.array(z.object({ - label: z.string().meta({ description: "Metric label" }), - value: z.string().meta({ description: "Metric value" }), - percentage: z.string().optional().meta({ description: "Optional percentage" }), - })).min(2).max(4).default([ - { label: 'Exports (2023)', value: '$2.85 billion', percentage: '6.76% of GDP' }, - { label: 'Imports (2023)', value: '$17.39 billion', percentage: '42.64% of GDP' }, - { label: 'GDP (2022)', value: '$40.83 billion' }, - { label: 'Trade Deficit (2022)', value: '-$12.44 billion' }, - ]).meta({ - description: "List of key metrics", - }), - chartData: z.array(chartDataSchema).min(2).max(4).default([ - { name: 'Imports', value: 42.64 }, - { name: 'Exports', value: 6.76 }, - { name: 'Other GDP', value: 50.6 }, - ]).meta({ - description: "Pie chart data", - }) -}) - -const chartConfig = { - value: { - label: "Value", - }, - name: { - label: "Name", - }, -}; - -const CHART_COLORS = [ - '#8b5cf6', - '#3b82f6', - '#a855f7', -]; - -export const Schema = pieChartAndMetricsSchema - -export type PieChartAndMetricsData = z.infer - -interface PieChartAndMetricsLayoutProps { - data: Partial -} - -const PieChartAndMetricsLayout: React.FC = ({ data: slideData }) => { - const { title, description, metrics, chartData } = slideData; - - const CustomLegend = () => ( -
- {chartData?.map((entry, index) => ( -
-
- {entry.name} -
- ))} -
- ); - - const renderPieChart = () => { - return ( - - } /> - `${name} ${(percent * 100).toFixed(0)}%`} - labelLine={false} - fontSize={18} - > - {chartData?.map((entry, index) => ( - - ))} - - - ); - }; - - return ( -
- -
- {/* Left side - Text content and metrics */} -
- {/* Title */} - {title && ( -

- {title} -

- )} - - {/* Description */} - {description && ( -

- {description} -

- )} - - {/* Metrics */} - {metrics && metrics.length > 0 && ( -
- {metrics.map((metric, index) => ( -
- • {metric.label}: - {metric.value} - {metric.percentage && ( - ({metric.percentage}) - )} -
- ))} -
- )} -
- - {/* Right side - Chart */} -
-
- - {renderPieChart()} - - -
-
-
-
- ) -} - -export default PieChartAndMetricsLayout \ No newline at end of file diff --git a/servers/nextjs/presentation-templates/classic-dark/3-BarGraph.tsx b/servers/nextjs/presentation-templates/classic-dark/3-BarGraph.tsx deleted file mode 100644 index 2e77ee86..00000000 --- a/servers/nextjs/presentation-templates/classic-dark/3-BarGraph.tsx +++ /dev/null @@ -1,146 +0,0 @@ -import React from 'react' -import * as z from "zod"; -import { ChartContainer, ChartLegend, ChartLegendContent, ChartTooltip, ChartTooltipContent } from '@/components/ui/chart'; -import { BarChart, Bar, XAxis, YAxis, CartesianGrid, Cell } from "recharts"; - -export const layoutId = 'classic-dark-bar-graph' -export const layoutName = 'Classic Dark Bar Graph' -export const layoutDescription = 'A modern slide with dark background, gradient title, bar chart visualization, and footer text.' - -const barDataSchema = z.object({ - name: z.string().min(2).max(30).meta({ description: "Product name" }), - value: z.number().meta({ description: "Export value in millions" }), -}); - -const barGraphSchema = z.object({ - title: z.string().min(3).max(80).default('Export Overview: Key Products').meta({ - description: "Main title of the slide", - }), - description: z.string().min(10).max(120).default('Nepal\'s total exports were $1.3 billion in 2022, a 21% decrease from 2021, but showed a 47.5% YoY increase by Nov 2024.').meta({ - description: "Description text", - }), - chartData: z.array(barDataSchema).min(2).max(6).default([ - { name: 'Soybean Oil (non-crude)', value: 180 }, - { name: 'Palm Oil (non-crude)', value: 180 }, - { name: 'Carpets/Textile Floor...', value: 80 }, - { name: 'Cardamom', value: 50 }, - { name: 'Felt Products', value: 40 }, - ]).meta({ - description: "Bar chart data", - }), -}) - -const chartConfig = { - value: { - label: "Value ($M)", - }, - name: { - label: "Product", - }, -}; - -const BAR_COLORS = [ - '#8b5cf6', // Dark purple for top products - '#8b5cf6', // Dark purple for top products - '#a855f7', // Light purple for other products - '#a855f7', // Light purple for other products - '#a855f7', // Light purple for other products -]; - -export const Schema = barGraphSchema - -export type BarGraphData = z.infer - -interface BarGraphLayoutProps { - data: Partial -} - -const BarGraphLayout: React.FC = ({ data: slideData }) => { - const { title, description, chartData } = slideData; - - const CustomLegend = () => ( -
- {chartData?.map((entry, index) => ( -
-
- {entry.name} -
- ))} -
- ); - - const renderBarChart = () => { - return ( - - - { - if (value.length > 15) { - return value.substring(0, 15) + '...'; - } - return value; - }} - /> - value.toFixed(0)} - /> - } /> - - {chartData?.map((entry, index) => ( - - ))} - - - ); - }; - - return ( -
- -
- {/* Header section */} -
- {/* Title */} - {title && ( -

- {title} -

- )} - - {/* Description */} - {description && ( -

- {description} -

- )} -
- - {/* Chart section */} -
-
- - {renderBarChart()} - - -
-
-
-
- ) -} - -export default BarGraphLayout \ No newline at end of file diff --git a/servers/nextjs/presentation-templates/classic-dark/4-Comparison.tsx b/servers/nextjs/presentation-templates/classic-dark/4-Comparison.tsx deleted file mode 100644 index fa928f69..00000000 --- a/servers/nextjs/presentation-templates/classic-dark/4-Comparison.tsx +++ /dev/null @@ -1,120 +0,0 @@ -import React from 'react' -import * as z from "zod"; -import { ImageSchema } from '@/presentation-templates/defaultSchemes'; - -export const layoutId = 'classic-dark-comparison' -export const layoutName = 'Classic Dark Comparison' -export const layoutDescription = 'A modern slide with dark background, image on the left (2/5), and comparison content on the right (3/5).' - -const comparisonItemSchema = z.object({ - name: z.string().min(3).max(30).meta({ description: "Commodity name" }), - value: z.string().min(3).max(30).meta({ description: "Value" }), - when: z.string().min(3).max(30).meta({ description: "When the value was recorded" }), - details: z.string().min(3).max(50).optional().meta({ description: "Additional details" }), -}); - -const comparisonSectionSchema = z.object({ - title: z.string().min(3).max(50).meta({ description: "Section title" }), - items: z.array(comparisonItemSchema).min(1).max(3).meta({ description: "List of items in the section" }), -}); - -const comparisonSchema = z.object({ - title: z.string().min(3).max(80).default('Key Commodities in Focus').meta({ - description: "Main title of the slide", - }), - comparisonSections: z.array(comparisonSectionSchema).min(2).max(2).default([ - { - title: 'Exports', - items: [ - { name: 'Soybean Oil', value: '$186.91 million', when: '2022' }, - { name: 'Cardamom', value: '$46.64 million', when: '2022', details: 'primarily to India' }, - ] - }, - { - title: 'Imports', - items: [ - { name: 'Crude Soybean Oil', value: '$347.77 million', when: '2022' }, - { name: 'Petroleum Products', value: '$3.15 billion', when: '2022', details: '22% of total imports' }, - { name: 'Vehicles/Parts', value: '$526 million', when: '2022', details: 'down 45% from 2021' }, - ] - } - ]).meta({ - description: "Comparison sections with title and data items", - }), - image: ImageSchema.default({ - __image_url__: 'https://images.pexels.com/photos/9669089/pexels-photo-9669089.jpeg', - __image_prompt__: 'Map of South Asia showing Nepal and neighboring countries with trade routes highlighted' - }).meta({ - description: "Comparison visualization image", - }), -}) - -export const Schema = comparisonSchema - -export type ComparisonData = z.infer - -interface ComparisonLayoutProps { - data: Partial -} - -const ComparisonLayout: React.FC = ({ data: slideData }) => { - const { title, comparisonSections, image } = slideData; - - return ( -
- -
- {/* Left side - Image (2/5) */} -
- {image && ( -
- {image.__image_prompt__} -
- )} -
- - {/* Right side - Content (3/5) */} -
- {/* Title */} - {title && ( -

- {title} -

- )} - - {/* Comparison Sections */} -
- {comparisonSections && comparisonSections.map((section, sectionIndex) => ( -
-

- {section.title} -

- {section.items && section.items.length > 0 && ( -
- {section.items.map((item, index) => ( -
- {item.name}: {item.value} ({item.when}) - {item.details && ( - , {item.details} - )} -
- ))} -
- )} -
- ))} -
-
-
-
- ) -} - -export default ComparisonLayout \ No newline at end of file diff --git a/servers/nextjs/presentation-templates/classic-dark/5-Metrics.tsx b/servers/nextjs/presentation-templates/classic-dark/5-Metrics.tsx deleted file mode 100644 index 397eef25..00000000 --- a/servers/nextjs/presentation-templates/classic-dark/5-Metrics.tsx +++ /dev/null @@ -1,141 +0,0 @@ -import React from 'react' -import * as z from "zod"; -import { IconSchema } from '@/presentation-templates/defaultSchemes'; - -export const layoutId = 'classic-dark-metrics' -export const layoutName = 'Classic Dark Metrics' -export const layoutDescription = 'A modern slide with dark background, metric cards arranged in a grid with icons and data.' - -const metricItemSchema = z.object({ - title: z.string().min(3).max(50).meta({ description: "Metric title" }), - value: z.string().min(3).max(30).meta({ description: "Metric value" }), - percentage: z.string().min(3).max(30).meta({ description: "Percentage value" }), - icon: IconSchema.meta({ description: "Icon for the metric" }), -}); - -const metricsSchema = z.object({ - title: z.string().min(3).max(80).default('Top Export Destinations').meta({ - description: "Main title of the slide", - }), - description: z.string().min(10).max(120).default('Nepal exports 760 products to 132 countries, with a strong focus on regional trade.').meta({ - description: "Description text", - }), - metrics: z.array(metricItemSchema).min(2).max(6).default([ - { - title: 'India', - value: '$935 million', - percentage: '71.93%', - icon: { - __icon_url__: '/static/icons/placeholder.png', - __icon_query__: 'star rating' - } - }, - { - title: 'United States', - value: '$147 million', - percentage: '11.32%', - icon: { - __icon_url__: '/static/icons/placeholder.png', - __icon_query__: 'flag country' - } - }, - { - title: 'Germany', - value: '$33 million', - percentage: '2.51%', - icon: { - __icon_url__: '/static/icons/placeholder.png', - __icon_query__: 'user person' - } - }, - { - title: 'Turkey', - value: '$26 million', - percentage: '2.01%', - icon: { - __icon_url__: '/static/icons/placeholder.png', - __icon_query__: 'pen tool' - } - }, - { - title: 'United Kingdom', - value: '$24 million', - percentage: '1.83%', - icon: { - __icon_url__: '/static/icons/placeholder.png', - __icon_query__: 'message chat' - } - }, - ]).meta({ - description: "Metric cards data", - }), -}) - -export const Schema = metricsSchema - -export type MetricsData = z.infer - -interface MetricsLayoutProps { - data: Partial -} - -const MetricsLayout: React.FC = ({ data: slideData }) => { - const { title, description, metrics } = slideData; - - return ( -
- -
- {/* Header section */} -
- {/* Title */} - {title && ( -

- {title} -

- )} - - {/* Description */} - {description && ( -

- {description} -

- )} -
- - {/* Metrics Cards Grid */} -
-
- {metrics && metrics.map((metric, index) => ( -
- {/* Metric Card with overlapping icon */} -
- {/* Icon overlapping the top */} -
- {metric.icon.__icon_query__} -
- - {/* Content with top padding for icon space */} -
-

- {metric.title} -

-

- {metric.value} ({metric.percentage}) -

-
-
-
- ))} -
-
-
-
- ) -} - -export default MetricsLayout \ No newline at end of file diff --git a/servers/nextjs/presentation-templates/classic-dark/6-BulletPointWithDescription.tsx b/servers/nextjs/presentation-templates/classic-dark/6-BulletPointWithDescription.tsx deleted file mode 100644 index 64b9f292..00000000 --- a/servers/nextjs/presentation-templates/classic-dark/6-BulletPointWithDescription.tsx +++ /dev/null @@ -1,103 +0,0 @@ -import React from 'react' -import * as z from "zod"; -import { ImageSchema } from '@/presentation-templates/defaultSchemes'; - -export const layoutId = 'classic-dark-bullet-point-with-description' -export const layoutName = 'Classic Dark Bullet Point with Description' -export const layoutDescription = 'A modern slide with dark background, image on the left (2/5), and bullet points with descriptions in boxes on the right (3/5).' - -const bulletPointSchema = z.object({ - title: z.string().min(3).max(60).meta({ description: "Bullet point title" }), - content: z.string().min(10).max(120).meta({ description: "Bullet point content (max 150 characters)" }), -}); - -const bulletPointWithDescriptionSchema = z.object({ - title: z.string().min(3).max(80).default('Trade Policies and Challenges').meta({ - description: "Main title of the slide", - }), - bulletPoints: z.array(bulletPointSchema).min(2).max(3).default([ - { - title: 'Tariffs', - content: 'Effectively Applied Tariff (2022): 11.59%. Most Favored Nation Tariff (2022): 12.87%. Duty-free imports: $412.11 million.' - }, - { - title: 'Forex Reserves', - content: '$8.18 billion in 2019, covering 8 months of imports.' - }, - { - title: 'Import Ban Impact', - content: 'Luxury goods ban (Apr-Dec 2022) cut deficit by 15.45% but reduced export earnings by 21.44%.' - } - ]).meta({ - description: "Bullet points with descriptions (max 3 items)", - }), - image: ImageSchema.default({ - __image_url__: 'https://images.pexels.com/photos/9669089/pexels-photo-9669089.jpeg', - __image_prompt__: 'Stylized mountainous landscape with trade arrows and network connections, dark gradient background with orange sun and purple mountains' - }).meta({ - description: "Visual representation image", - }), -}) - -export const Schema = bulletPointWithDescriptionSchema - -export type BulletPointWithDescriptionData = z.infer - -interface BulletPointWithDescriptionLayoutProps { - data: Partial -} - -const BulletPointWithDescriptionLayout: React.FC = ({ data: slideData }) => { - const { title, bulletPoints, image } = slideData; - - return ( -
- -
- {/* Left side - Image (2/5) */} -
- {image && ( -
- {image.__image_prompt__} -
- )} -
- - {/* Right side - Content (3/5) */} -
- {/* Title */} - {title && ( -

- {title} -

- )} - - {/* Bullet Points */} - {bulletPoints && bulletPoints.length > 0 && ( -
- {bulletPoints.map((point, index) => ( -
-

- {point.title} -

-

- {point.content} -

-
- ))} -
- )} -
-
-
- ) -} - -export default BulletPointWithDescriptionLayout \ No newline at end of file diff --git a/servers/nextjs/presentation-templates/classic-dark/settings.json b/servers/nextjs/presentation-templates/classic-dark/settings.json deleted file mode 100644 index 2e888eab..00000000 --- a/servers/nextjs/presentation-templates/classic-dark/settings.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "Classic dark layout for presentations", - "ordered": false, - "default": false -} \ No newline at end of file diff --git a/servers/nextjs/presentation-templates/classic/Type10SlideLayout.tsx b/servers/nextjs/presentation-templates/classic/Type10SlideLayout.tsx deleted file mode 100644 index 5acad87d..00000000 --- a/servers/nextjs/presentation-templates/classic/Type10SlideLayout.tsx +++ /dev/null @@ -1,269 +0,0 @@ -import { ChartContainer, ChartLegend, ChartLegendContent, ChartTooltip, ChartTooltipContent } from '@/components/ui/chart'; -import React from 'react' -import { BarChart, Bar, LineChart, Line, PieChart, Pie, AreaChart, Area, ScatterChart, Scatter, XAxis, YAxis, CartesianGrid, Cell, ResponsiveContainer } from "recharts"; -import * as z from "zod"; -import { IconSchema } from '../defaultSchemes'; - -export const layoutId = 'type4-slide' -export const layoutName = 'Type4 Slide' -export const layoutDescription = 'A chart-focused layout with title, chart visualization, and description text.' - -const chartDataSchema = z.object({ - name: z.string().meta({ description: "Data point name" }), - value: z.number().meta({ description: "Data point value" }), - category: z.string().optional().meta({ description: "Category for grouping" }), - x: z.number().optional().meta({ description: "X coordinate for scatter plots" }), - y: z.number().optional().meta({ description: "Y coordinate for scatter plots" }), -}); - - -const type10SlideSchema = z.object({ - title: z.string().min(3).max(50).default('Chart Analysis').meta({ - description: "Main title of the slide", - }), - description: z.string().min(8).max(40).default('This is a description of the chart analysis').meta({ - description: " Short description of the chart analysis", - }), - items: z.array(z.object({ - icon: IconSchema.meta({ - description: "Item icon", - }), - heading: z.string().min(2).max(50).meta({ - description: "Item heading", - }), - description: z.string().min(10).max(130).meta({ - description: "Item description", - }) - })).min(2).max(3).default(() => [ - { - icon: { - __icon_url__: '/static/icons/placeholder.png', - __icon_query__: 'A beautiful road in the mountains' - }, - heading: 'First Key Point', - description: 'Detailed explanation of the first important point that supports the main topic' - }, - { - icon: { - __icon_url__: '/static/icons/placeholder.png', - __icon_query__: 'A beautiful road in the mountains' - }, - heading: 'Second Key Point', - description: 'Detailed explanation of the second important point with relevant information' - } - ]).meta({ - description: "List of numbered items (2-3 items)", - }), - chartData: z.any().optional().meta({ - description: "Chart data object", - }), - isFullSizeChart: z.boolean().default(false).meta({ - description: "Whether to display chart in full size mode", - }), - chartType: z.enum(['bar', 'line', 'pie', 'area', 'scatter']).default('line').meta({ - description: "Type of chart to display", - }), - data: z.array(chartDataSchema).min(2).max(10).default([ - { name: '2021', value: 5 }, - { name: '2022', value: 12 }, - { name: '2023', value: 18 }, - { name: '2024', value: 23 }, - { name: '2025', value: 26 }, - ]).meta({ - description: "Chart data points", - }), - dataKey: z.string().default('value').meta({ - description: "Key field for chart values", - }), - categoryKey: z.string().default('name').meta({ - description: "Key field for chart categories", - }), - color: z.string().default('#3b82f6').meta({ - description: "Primary color for chart elements", - }), - showLegend: z.boolean().default(false).meta({ - description: "Whether to show chart legend", - }), - showTooltip: z.boolean().default(true).meta({ - description: "Whether to show chart tooltip", - }), -}) - - -const chartConfig = { - value: { - label: "Value", - }, - name: { - label: "Name", - }, -}; -const CHART_COLORS = [ - '#3b82f6', '#ef4444', '#10b981', '#f59e0b', '#8b5cf6', - '#06b6d4', '#84cc16', '#f97316', '#ec4899', '#6366f1' -]; - -export const Schema = type10SlideSchema - -export type Type10SlideData = z.infer - -interface Type10SlideLayoutProps { - data: Partial -} - -const Type10SlideLayout: React.FC = ({ data: slideData }) => { - const { title, items, data, chartType = 'line', color = '#3b82f6', dataKey = 'value', categoryKey = 'name', showLegend = false, showTooltip = true } = slideData; - const chartData = data || []; - const renderChart = () => { - const commonProps = { - data: chartData, - margin: { top: 10, right: 20, left: 0, bottom: 30 }, - }; - - switch (chartType) { - case 'bar': - return ( - - - - - {showTooltip && } />} - {showLegend && } />} - - - ); - - case 'line': - return ( - - - - - {showTooltip && } />} - {showLegend && } />} - - - ); - - case 'area': - return ( - - - - - {showTooltip && } />} - {showLegend && } />} - - - ); - - case 'pie': - return ( - - {showTooltip && } />} - {showLegend && } />} - `${name} ${(percent * 100).toFixed(0)}%`} - > - {chartData.map((entry: any, index: number) => ( - - ))} - - - ); - - case 'scatter': - return ( - - - - - {showTooltip && } />} - {showLegend && } />} - - - ); - - default: - return
Unsupported chart type
; - } - }; - - return ( -
-
- - {title &&

- {title || 'Chart Analysis'} -

} - -
-
-
-
- - {renderChart()} - -
-
-
-
- {items && items.map((item, index) => ( -
-
-
-
- {item.icon?.__icon_url__ && {item.icon?.__icon_query__} -
-
-
- {item.heading &&

- {item.heading} -

} - {item.description &&

- {item.description} -

} -
-
-
- ))} -
-
-
-
- ) -} - -export default Type10SlideLayout - diff --git a/servers/nextjs/presentation-templates/classic/Type1SlideLayout.tsx b/servers/nextjs/presentation-templates/classic/Type1SlideLayout.tsx deleted file mode 100644 index cbbaaa0c..00000000 --- a/servers/nextjs/presentation-templates/classic/Type1SlideLayout.tsx +++ /dev/null @@ -1,65 +0,0 @@ -import React from 'react' -import * as z from "zod"; -import { ImageSchema } from '@/presentation-templates/defaultSchemes'; - -export const layoutId = 'type1-slide' -export const layoutName = 'Type1 Slide' -export const layoutDescription = 'A clean two-column layout with title and description on the left and a featured image on the right.' - -const type1SlideSchema = z.object({ - title: z.string().min(3).max(50).default('Hot NOT Reload Working!').meta({ - description: "Main title of the slide", - }), - description: z.string().min(10).max(130).default('This is a test of the hot reload system! If you can see this text, hot reload is working perfectly. Changes should appear instantly without page refresh.').meta({ - description: "Main description text", - }), - image: ImageSchema.default({ - __image_url__: 'https://cdn.pixabay.com/photo/2015/12/01/20/28/road-1072823_1280.jpg', - __image_prompt__: 'A beautiful road in the mountains' - }).meta({ - description: "Main slide image", - }) -}) - -export const Schema = type1SlideSchema - -export type Type1SlideData = z.infer - -interface Type1SlideLayoutProps { - data: Partial -} - -const Type1SlideLayout: React.FC = ({ data: slideData }) => { - const { title, description, image } = slideData; - return ( -
-
-
- {/* Title */} - {title &&

- {title} -

} - - {/* Description */} - {description &&

- {description} -

} -
- - {/* Image */} -
- {image && {image?.__image_prompt__} -
-
-
- ) -} - -export default Type1SlideLayout \ No newline at end of file diff --git a/servers/nextjs/presentation-templates/classic/Type2NumberedSlideLayout.tsx b/servers/nextjs/presentation-templates/classic/Type2NumberedSlideLayout.tsx deleted file mode 100644 index 76457ca6..00000000 --- a/servers/nextjs/presentation-templates/classic/Type2NumberedSlideLayout.tsx +++ /dev/null @@ -1,124 +0,0 @@ -import React from 'react' -import * as z from "zod"; - -export const layoutId = 'type2-numbered-slide' -export const layoutName = 'Type2 Numbered Slide' -export const layoutDescription = 'A content layout with title and numbered content items with large numerals and shadow boxes.' - -const type2NumberedSlideSchema = z.object({ - title: z.string().min(3).max(50).default('Main Title').meta({ - description: "Main title of the slide", - }), - items: z.array(z.object({ - heading: z.string().min(2).max(100).meta({ - description: "Item heading", - }), - description: z.string().min(10).max(130).meta({ - description: "Item description", - }) - })).min(2).max(3).default([ - { - heading: 'First Point', - description: 'Description for the first key point that explains important details' - }, - { - heading: 'Second Point', - description: 'Description for the second key point with relevant information' - }, - { - heading: 'Third Point', - description: 'Description for the third key point highlighting crucial aspects' - } - ]).meta({ - description: "List of content items (2-4 items)", - }) -}) - -export const Schema = type2NumberedSlideSchema - -export type Type2NumberedSlideData = z.infer - -interface Type2NumberedSlideLayoutProps { - data: Partial -} - -const Type2NumberedSlideLayout: React.FC = ({ data: slideData }) => { - const { title, items } = slideData; - const isGridLayout = items?.length && items?.length >= 4 - const numberTranslations: string[] = ['01', '02', '03', '04', '05', '06'] - - const renderGridContent = () => { - return ( -
- {items?.map((item, index) => ( -
-
-
- {numberTranslations[index] || `0${index + 1}`} -
-
- {item.heading &&

- {item.heading} -

} - {item.description &&

- {item.description} -

} -
-
-
- ))} -
- ) - } - - const renderHorizontalContent = () => { - return ( -
- {items?.map((item, index) => ( -
-
- {numberTranslations[index] || `0${index + 1}`} -
-
- {item.heading &&

- {item.heading} -

} - {item.description &&

- {item.description} -

} -
-
- ))} -
- ) - } - - return ( -
-
- {title &&

- {title} -

} -
- - {isGridLayout ? renderGridContent() : renderHorizontalContent()} -
- ) -} - -export default Type2NumberedSlideLayout \ No newline at end of file diff --git a/servers/nextjs/presentation-templates/classic/Type2SlideLayout.tsx b/servers/nextjs/presentation-templates/classic/Type2SlideLayout.tsx deleted file mode 100644 index 275a6fe7..00000000 --- a/servers/nextjs/presentation-templates/classic/Type2SlideLayout.tsx +++ /dev/null @@ -1,111 +0,0 @@ -import React from 'react' -import * as z from "zod"; - -export const layoutId = 'type2-slide' -export const layoutName = 'Type2 Slide' -export const layoutDescription = 'A flexible content layout with title and multiple content items in default presentation style.' - -const type2SlideSchema = z.object({ - title: z.string().min(3).max(50).default('Main Title').meta({ - description: "Main title of the slide", - }), - items: z.array(z.object({ - heading: z.string().min(2).max(50).meta({ - description: "Item heading", - }), - description: z.string().min(10).max(130).meta({ - description: "Item description", - }) - })).min(2).max(3).default([ - { - heading: 'First Point', - description: 'Description for the first key point that explains important details' - }, - { - heading: 'Second Point', - description: 'Description for the second key point with relevant information' - }, - { - heading: 'Third Point', - description: 'Description for the third key point highlighting crucial aspects' - } - ]).meta({ - description: "List of content items (2-4 items)", - }) -}) - -export const Schema = type2SlideSchema - -export type Type2SlideData = z.infer - -interface Type2SlideLayoutProps { - data: Partial -} - -const Type2SlideLayout: React.FC = ({ data: slideData }) => { - const { title, items } = slideData; - const isGridLayout = items?.length && items?.length >= 4 - - const renderGridContent = () => { - return ( -
- {items?.map((item, index) => ( -
-
- {item.heading &&

- {item.heading} -

} - {item.description &&

- {item.description} -

} -
-
- ))} -
- ) - } - - const renderHorizontalContent = () => { - return ( -
- {items?.map((item, index) => ( -
-
- {item.heading &&

- {item.heading} -

} - {item.description &&

- {item.description} -

} -
-
- ))} -
- ) - } - - return ( -
-
- {title &&

- {title} -

} -
- - {isGridLayout ? renderGridContent() : renderHorizontalContent()} -
- ) -} - -export default Type2SlideLayout \ No newline at end of file diff --git a/servers/nextjs/presentation-templates/classic/Type2TimelineSlideLayout.tsx b/servers/nextjs/presentation-templates/classic/Type2TimelineSlideLayout.tsx deleted file mode 100644 index 0a62e82a..00000000 --- a/servers/nextjs/presentation-templates/classic/Type2TimelineSlideLayout.tsx +++ /dev/null @@ -1,101 +0,0 @@ -import React from 'react' -import * as z from "zod"; - -export const layoutId = 'type2-timeline-slide' -export const layoutName = 'Type2 Timeline Slide' -export const layoutDescription = 'A timeline layout with title and content items arranged horizontally with numbered circles and connecting line.' - -const type2TimelineSlideSchema = z.object({ - title: z.string().min(3).max(50).default('Main Title').meta({ - description: "Main title of the slide", - }), - items: z.array(z.object({ - heading: z.string().min(2).max(50).meta({ - description: "Item heading", - }), - description: z.string().min(10).max(130).meta({ - description: "Item description", - }) - })).min(2).max(3).default([ - { - heading: 'First Point', - description: 'Description for the first key point that explains important details' - }, - { - heading: 'Second Point', - description: 'Description for the second key point with relevant information' - }, - { - heading: 'Third Point', - description: 'Description for the third key point highlighting crucial aspects' - } - ]).meta({ - description: "List of content items (2-4 items)", - }) -}) - -export const Schema = type2TimelineSlideSchema - -export type Type2TimelineSlideData = z.infer - -interface Type2TimelineSlideLayoutProps { - data: Partial -} - -const Type2TimelineSlideLayout: React.FC = ({ data: slideData }) => { - const { title, items } = slideData; - - const renderTimelineContent = () => { - return ( -
- {/* Timeline Header with Numbers and Line */} -
- {/* Horizontal Line */} -
- - {/* Timeline Numbers */} - {items && items.map((_, index) => ( -
- {index + 1} -
- ))} -
- - {/* Timeline Content */} -
- {items && items.map((item, index) => ( -
-
- {item.heading &&

- {item.heading} -

} - {item.description &&

- {item.description} -

} -
-
- ))} -
-
- ) - } - - return ( -
-
- {title &&

- {title} -

} -
- - {renderTimelineContent()} -
- ) -} - -export default Type2TimelineSlideLayout \ No newline at end of file diff --git a/servers/nextjs/presentation-templates/classic/Type3SlideLayout.tsx b/servers/nextjs/presentation-templates/classic/Type3SlideLayout.tsx deleted file mode 100644 index af26d279..00000000 --- a/servers/nextjs/presentation-templates/classic/Type3SlideLayout.tsx +++ /dev/null @@ -1,119 +0,0 @@ -import React from 'react' -import * as z from "zod"; -import { ImageSchema } from '@/presentation-templates/defaultSchemes'; - -export const layoutId = 'type3-slide' -export const layoutName = 'Type3 Slide' -export const layoutDescription = 'A centered title with a grid of image cards, each containing a heading and description.' - -const type3SlideSchema = z.object({ - title: z.string().min(3).max(50).default('Featured Content').meta({ - description: "Main title of the slide", - }), - items: z.array(z.object({ - heading: z.string().min(2).max(50).meta({ - description: "Item heading", - }), - description: z.string().min(10).max(130).meta({ - description: "Item description", - }), - image: ImageSchema.meta({ - description: "Item image", - }) - })).min(2).max(3).default([ - { - heading: 'First Feature', - description: 'Description for the first featured item with detailed information', - image: { - __image_url__: 'https://cdn.pixabay.com/photo/2015/12/01/20/28/road-1072823_1280.jpg', - __image_prompt__: 'A beautiful road in the mountains' - } - }, - { - heading: 'Second Feature', - description: 'Description for the second featured item with relevant details', - image: { - __image_url__: 'https://cdn.pixabay.com/photo/2016/02/19/11/19/office-1209640_1280.jpg', - __image_prompt__: 'Modern office workspace' - } - }, - { - heading: 'Third Feature', - description: 'Description for the third featured item with important points', - image: { - __image_url__: 'https://cdn.pixabay.com/photo/2017/08/10/08/47/laptop-2619235_1280.jpg', - __image_prompt__: 'Laptop with code on screen' - } - } - ]).meta({ - description: "List of featured items (2-4 items)", - }) -}) - -export const Schema = type3SlideSchema - -export type Type3SlideData = z.infer - -interface Type3SlideLayoutProps { - data: Partial -} - -const Type3SlideLayout: React.FC = ({ data: slideData }) => { - const { title, items } = slideData; - - const getGridCols = (length: number) => { - switch (length) { - case 1: return 'lg:grid-cols-1'; - case 2: return 'lg:grid-cols-2'; - case 3: return 'lg:grid-cols-3'; - case 4: return 'lg:grid-cols-4'; - default: return 'lg:grid-cols-1'; - } - } - - return ( -
-
- {title &&

- {title} -

} -
- -
- {items && items.map((item, index) => ( -
- {/* Image */} -
- {item.image?.__image_prompt__ -
- - {/* Content */} -
- {item.heading &&

- {item.heading} -

} - {item.description &&

- {item.description} -

} -
-
- ))} -
-
- ) -} - -export default Type3SlideLayout \ No newline at end of file diff --git a/servers/nextjs/presentation-templates/classic/Type4SlideLayout.tsx b/servers/nextjs/presentation-templates/classic/Type4SlideLayout.tsx deleted file mode 100644 index da9ac603..00000000 --- a/servers/nextjs/presentation-templates/classic/Type4SlideLayout.tsx +++ /dev/null @@ -1,209 +0,0 @@ -import { ChartContainer, ChartLegend, ChartLegendContent, ChartTooltip, ChartTooltipContent } from '@/components/ui/chart'; -import React from 'react' -import { BarChart, Bar, LineChart, Line, PieChart, Pie, AreaChart, Area, ScatterChart, Scatter, XAxis, YAxis, CartesianGrid, Cell } from "recharts"; -import * as z from "zod"; - -export const layoutId = 'type4-slide' -export const layoutName = 'Type4 Slide' -export const layoutDescription = 'A chart-focused layout with title, chart visualization, and description text.' - -const chartDataSchema = z.object({ - name: z.string().meta({ description: "Data point name" }), - value: z.number().meta({ description: "Data point value" }), - category: z.string().optional().meta({ description: "Category for grouping" }), - x: z.number().optional().meta({ description: "X coordinate for scatter plots" }), - y: z.number().optional().meta({ description: "Y coordinate for scatter plots" }), -}); - - -const type4SlideSchema = z.object({ - title: z.string().min(3).max(50).default('Chart Analysis').meta({ - description: "Main title of the slide", - }), - description: z.string().min(10).max(130).default('This chart shows important data trends and insights that help understand the current situation and make informed decisions.').meta({ - description: "Description text for the chart", - }), - chartData: z.any().optional().meta({ - description: "Chart data object", - }), - isFullSizeChart: z.boolean().default(false).meta({ - description: "Whether to display chart in full size mode", - }), - chartType: z.enum(['bar', 'line', 'pie', 'area', 'scatter']).default('bar').meta({ - description: "Type of chart to display", - }), - data: z.array(chartDataSchema).min(2).max(10).default([ - { name: '2021', value: 5 }, - { name: '2022', value: 12 }, - { name: '2023', value: 18 }, - { name: '2024', value: 23 }, - { name: '2025', value: 26 }, - ]).meta({ - description: "Chart data points", - }), - dataKey: z.string().default('value').meta({ - description: "Key field for chart values", - }), - categoryKey: z.string().default('name').meta({ - description: "Key field for chart categories", - }), - color: z.string().default('#3b82f6').meta({ - description: "Primary color for chart elements", - }), - showLegend: z.boolean().default(false).meta({ - description: "Whether to show chart legend", - }), - showTooltip: z.boolean().default(true).meta({ - description: "Whether to show chart tooltip", - }), -}) - - -const chartConfig = { - value: { - label: "Value", - }, - name: { - label: "Name", - }, -}; -const CHART_COLORS = [ - '#3b82f6', '#ef4444', '#10b981', '#f59e0b', '#8b5cf6', - '#06b6d4', '#84cc16', '#f97316', '#ec4899', '#6366f1' -]; - -export const Schema = type4SlideSchema - -export type Type4SlideData = z.infer - -interface Type4SlideLayoutProps { - data: Partial -} - -const Type4SlideLayout: React.FC = ({ data: slideData }) => { - - const { title, description, data, dataKey, categoryKey, color, showLegend = false, showTooltip = true, chartType = 'bar' } = slideData; - - const chartData = data || []; - const renderChart = () => { - const commonProps = { - data: chartData, - margin: { top: 10, right: 20, left: 0, bottom: 30 }, - }; - - switch (chartType) { - case 'bar': - return ( - - - - - {showTooltip && } />} - {showLegend && } />} - - - ); - - case 'line': - return ( - - - - - {showTooltip && } />} - {showLegend && } />} - - - ); - - case 'area': - return ( - - - - - {showTooltip && } />} - {showLegend && } />} - - - ); - - case 'pie': - return ( - - {showTooltip && } />} - {showLegend && } />} - `${name} ${(percent * 100).toFixed(0)}%`} - > - {chartData.map((entry, index) => ( - - ))} - - - ); - - case 'scatter': - return ( - - - - - {showTooltip && } />} - {showLegend && } />} - - - ); - - default: - return
Unsupported chart type
; - } - }; - - return ( -
- {title &&

- {title} -

} - -
-
-
- - {renderChart()} - -
-
-
- {description &&

- {description} -

} -
-
-
- ) -} - -export default Type4SlideLayout - diff --git a/servers/nextjs/presentation-templates/classic/Type5SlideLayout.tsx b/servers/nextjs/presentation-templates/classic/Type5SlideLayout.tsx deleted file mode 100644 index 75fc2daa..00000000 --- a/servers/nextjs/presentation-templates/classic/Type5SlideLayout.tsx +++ /dev/null @@ -1,101 +0,0 @@ -import React from 'react' -import * as z from "zod"; - -export const layoutId = 'type5-slide' -export const layoutName = 'Type5 Slide' -export const layoutDescription = 'A two-column layout with title and description on the left, and numbered items with large numerals on the right.' - -const type5SlideSchema = z.object({ - title: z.string().min(3).max(50).default('Key Points').meta({ - description: "Main title of the slide", - }), - description: z.string().min(10).max(130).default('Here is the main description that provides context and introduction to the numbered points on the right side.').meta({ - description: "Main description text", - }), - items: z.array(z.object({ - heading: z.string().min(2).max(50).meta({ - description: "Item heading", - }), - description: z.string().min(10).max(130).meta({ - description: "Item description", - }) - })).min(2).max(3).default([ - { - heading: 'First Key Point', - description: 'Detailed explanation of the first important point that supports the main topic' - }, - { - heading: 'Second Key Point', - description: 'Detailed explanation of the second important point with relevant information' - }, - { - heading: 'Third Key Point', - description: 'Detailed explanation of the third important point that concludes the discussion' - } - ]).meta({ - description: "List of numbered items (2-3 items)", - }) -}) - -export const Schema = type5SlideSchema - -export type Type5SlideData = z.infer - -interface Type5SlideLayoutProps { - data: Partial -} - -const Type5SlideLayout: React.FC = ({ data: slideData }) => { - - const { title, description, items } = slideData; - return ( -
-
- {/* Left section - Title and Description */} -
- {title &&

- {title} -

} - - {description &&

- {description} -

} -
- - {/* Right section - Numbered items */} -
-
- {slideData?.items?.map((item, index) => ( -
-
-
- {`0${index + 1}`} -
-
- {item.heading &&

- {item.heading} -

} - {item.description &&

- {item.description} -

} -
-
-
- ))} -
-
-
-
- ) -} - -export default Type5SlideLayout \ No newline at end of file diff --git a/servers/nextjs/presentation-templates/classic/Type6SlideLayout.tsx b/servers/nextjs/presentation-templates/classic/Type6SlideLayout.tsx deleted file mode 100644 index c35e0042..00000000 --- a/servers/nextjs/presentation-templates/classic/Type6SlideLayout.tsx +++ /dev/null @@ -1,161 +0,0 @@ -import React from 'react' -import * as z from "zod"; -import { IconSchema } from '@/presentation-templates/defaultSchemes'; - -export const layoutId = 'type6-slide' -export const layoutName = 'Type6 Slide' -export const layoutDescription = 'A centered title with a flexible grid of icon-based content items, adapting layout based on item count.' - -const type6SlideSchema = z.object({ - title: z.string().min(3).max(50).default('Our Services').meta({ - description: "Main title of the slide", - }), - items: z.array(z.object({ - heading: z.string().min(2).max(50).meta({ - description: "Item heading", - }), - description: z.string().min(10).max(130).meta({ - description: "Item description", - }), - icon: IconSchema, - })).min(2).max(6).default([ - { - heading: 'Professional Service', - description: 'High-quality professional services tailored to your specific needs and requirements', - icon: { - __icon_url__: '/static/icons/placeholder.png', - __icon_query__: 'Professional Service' - } - }, - { - heading: 'Expert Consultation', - description: 'Expert advice and consultation from experienced professionals in the field', - icon: { - __icon_url__: '/static/icons/placeholder.png', - __icon_query__: 'Expert Consultation' - } - }, - { - heading: 'Quality Assurance', - description: 'Comprehensive quality assurance processes to ensure excellent results', - icon: { - __icon_url__: '/static/icons/placeholder.png', - __icon_query__: 'Quality Assurance' - } - }, - { - heading: 'Customer Support', - description: 'Dedicated customer support available to assist you throughout the process', - icon: { - __icon_url__: '/static/icons/placeholder.png', - __icon_query__: 'Customer Support' - } - } - ]).meta({ - description: "List of service items (2-6 items)", - }) -}) - -export const Schema = type6SlideSchema - -export type Type6SlideData = z.infer - -interface Type6SlideLayoutProps { - data: Partial -} - -const Type6SlideLayout: React.FC = ({ data: slideData }) => { - const { title, items } = slideData; - const isGridLayout = items && items.length >= 4 - - const getGridCols = (length: number) => { - switch (length) { - case 1: return 'lg:grid-cols-1'; - case 2: return 'lg:grid-cols-2'; - case 3: return 'lg:grid-cols-3'; - case 4: return 'lg:grid-cols-4'; - case 5: return 'lg:grid-cols-5'; - case 6: return 'lg:grid-cols-6'; - default: return 'lg:grid-cols-1'; - } - } - - const renderGridContent = () => { - return ( -
4 ? 'md:grid-cols-3' : 'md:grid-cols-2'} gap-4 sm:gap-6 lg:gap-8 mt-4 lg:mt-12 w-full`}> - {items && items.map((item, index) => ( -
-
-
-
- {item.icon.__icon_query__} -
-
-
-

- {item.heading} -

-

- {item.description} -

-
-
-
- ))} -
- ) - } - - const renderHorizontalContent = () => { - return ( -
- {items && items.map((item, index) => ( -
-
-
- {item.icon.__icon_query__} -
-
-
- {item.heading &&

- {item.heading} -

} - {item.description &&

- {item.description} -

} -
-
- ))} -
- ) - } - - return ( -
-
- {title &&

- {title} -

} -
- - {isGridLayout ? renderGridContent() : renderHorizontalContent()} -
- ) -} - -export default Type6SlideLayout \ No newline at end of file diff --git a/servers/nextjs/presentation-templates/classic/Type7SlideLayout.tsx b/servers/nextjs/presentation-templates/classic/Type7SlideLayout.tsx deleted file mode 100644 index 95c87df3..00000000 --- a/servers/nextjs/presentation-templates/classic/Type7SlideLayout.tsx +++ /dev/null @@ -1,173 +0,0 @@ -import React from 'react' -import * as z from "zod"; -import { IconSchema } from '@/presentation-templates/defaultSchemes'; - -export const layoutId = 'type7-slide' -export const layoutName = 'Type7 Slide' -export const layoutDescription = 'A centered title with a flexible grid of icon-based content items, adapting layout based on item count.' - -const type7SlideSchema = z.object({ - title: z.string().min(3).max(50).default('Our Services').meta({ - description: "Main title of the slide", - }), - items: z.array(z.object({ - heading: z.string().min(2).max(50).meta({ - description: "Item heading", - }), - description: z.string().min(10).max(130).meta({ - description: "Item description", - }), - icon: IconSchema.default({ - __icon_url__: '/static/icons/placeholder.png', - __icon_query__: 'Default icon' - }).meta({ - description: "Icon for the item", - }) - })).min(2).max(6).default([ - { - heading: 'Professional Service', - description: 'High-quality professional services tailored to your specific needs and requirements', - icon: { - __icon_url__: '/static/icons/placeholder.png', - __icon_query__: 'Professional service icon' - } - }, - { - heading: 'Expert Consultation', - description: 'Expert advice and consultation from experienced professionals in the field', - icon: { - __icon_url__: '/static/icons/placeholder.png', - __icon_query__: 'Expert consultation icon' - } - }, - { - heading: 'Quality Assurance', - description: 'Comprehensive quality assurance processes to ensure excellent results', - icon: { - __icon_url__: '/static/icons/placeholder.png', - __icon_query__: 'Quality assurance icon' - } - }, - { - heading: 'Customer Support', - description: 'Dedicated customer support available to assist you throughout the process', - icon: { - __icon_url__: '/static/icons/placeholder.png', - __icon_query__: 'Customer support icon' - } - } - ]).meta({ - description: "List of service items (2-6 items)", - }) -}) - -export const Schema = type7SlideSchema - -export type Type7SlideData = z.infer - -interface Type7SlideLayoutProps { - data: Partial -} - -const Type7SlideLayout: React.FC = ({ data: slideData }) => { - const { title, items } = slideData; - const isGridLayout = items && items.length >= 4 - - const getGridCols = (length: number) => { - switch (length) { - case 1: return 'lg:grid-cols-1'; - case 2: return 'lg:grid-cols-2'; - case 3: return 'lg:grid-cols-3'; - case 4: return 'lg:grid-cols-4'; - case 5: return 'lg:grid-cols-5'; - case 6: return 'lg:grid-cols-6'; - default: return 'lg:grid-cols-1'; - } - } - - const renderGridContent = () => { - return ( -
4 ? 'md:grid-cols-3' : 'md:grid-cols-2'} gap-4 sm:gap-6 lg:gap-8 mt-4 lg:mt-12 w-full`}> - {items && items.map((item, index) => ( -
-
-
-
- {item.icon?.__icon_query__ -
-
-
- {item.heading &&

- {item.heading} -

} - {item.description &&

- {item.description} -

} -
-
-
- ))} -
- ) - } - - const renderHorizontalContent = () => { - return ( -
- {items && items.map((item, index) => ( -
-
-
- {item.icon?.__icon_url__ && {item.icon?.__icon_query__} -
-
-
- {item.heading &&

- {item.heading} -

} - {item.description &&

- {item.description} -

} -
-
- ))} -
- ) - } - - return ( -
-
- {title &&

- {title} -

} -
- - {isGridLayout ? renderGridContent() : renderHorizontalContent()} -
- ) -} - -export default Type7SlideLayout \ No newline at end of file diff --git a/servers/nextjs/presentation-templates/classic/Type8SlideLayout.tsx b/servers/nextjs/presentation-templates/classic/Type8SlideLayout.tsx deleted file mode 100644 index c6f7453d..00000000 --- a/servers/nextjs/presentation-templates/classic/Type8SlideLayout.tsx +++ /dev/null @@ -1,167 +0,0 @@ -import React from 'react' -import * as z from "zod"; -import { IconSchema } from '@/presentation-templates/defaultSchemes'; - -export const layoutId = 'type8-slide' -export const layoutName = 'Type8 Slide' -export const layoutDescription = 'A two-column layout with title and description on the left, and icon-based items on the right.' - -const type8SlideSchema = z.object({ - title: z.string().min(3).max(50).default('Key Features').meta({ - description: "Main title of the slide", - }), - description: z.string().min(10).max(130).default('Here is the main description that provides context and introduces the key features outlined on the right side.').meta({ - description: "Main description text", - }), - items: z.array(z.object({ - heading: z.string().min(2).max(50).meta({ - description: "Item heading", - }), - description: z.string().min(10).max(130).meta({ - description: "Item description", - }), - icon: IconSchema.default({ - __icon_url__: '/static/icons/placeholder.png', - __icon_query__: 'Default icon' - }).meta({ - description: "Icon for the item", - }) - })).min(2).max(3).default([ - { - heading: 'Advanced Features', - description: 'Cutting-edge functionality designed to enhance productivity and user experience', - icon: { - __icon_url__: '/static/icons/placeholder.png', - __icon_query__: 'Advanced features icon' - } - }, - { - heading: 'Reliable Performance', - description: 'Consistent and dependable performance across all platforms and devices', - icon: { - __icon_url__: '/static/icons/placeholder.png', - __icon_query__: 'Reliable performance icon' - } - }, - { - heading: 'Secure Environment', - description: 'Enterprise-grade security measures to protect your data and privacy', - icon: { - __icon_url__: '/static/icons/placeholder.png', - __icon_query__: 'Secure environment icon' - } - } - ]).meta({ - description: "List of featured items (2-3 items)", - }) -}) - -export const Schema = type8SlideSchema - -export type Type8SlideData = z.infer - -interface Type8SlideLayoutProps { - data: Partial -} - -const Type8SlideLayout: React.FC = ({ data: slideData }) => { - const { title, description, items } = slideData; - - const renderItems = () => { - if (items && items.length === 2) { - // Vertical stacked layout for 2 items - return ( -
- {items && items.map((item, index) => ( -
-
-
- {item.icon?.__icon_url__ && {item.icon?.__icon_query__} -
-
-
- {item.heading &&

- {item.heading} -

} - {item.description &&

- {item.description} -

} -
-
- ))} -
- ) - } else { - // Horizontal layout with side icons for 3+ items - return ( -
- {items && items.map((item, index) => ( -
-
-
-
- {item.icon?.__icon_url__ && {item.icon?.__icon_query__} -
-
-
- {item.heading &&

- {item.heading} -

} - {item.description &&

- {item.description} -

} -
-
-
- ))} -
- ) - } - } - - return ( -
-
- {/* Left section - Title and Description */} -
- {title &&

- {title} -

} - - {description &&

- {description} -

} -
- - {/* Right section - Items */} -
- {renderItems()} -
-
-
- ) -} - -export default Type8SlideLayout \ No newline at end of file diff --git a/servers/nextjs/presentation-templates/classic/Type9SlideLayout.tsx b/servers/nextjs/presentation-templates/classic/Type9SlideLayout.tsx deleted file mode 100644 index bdb8e29a..00000000 --- a/servers/nextjs/presentation-templates/classic/Type9SlideLayout.tsx +++ /dev/null @@ -1,253 +0,0 @@ -import { ChartContainer, ChartLegend, ChartLegendContent, ChartTooltip, ChartTooltipContent } from '@/components/ui/chart'; -import React from 'react' -import { BarChart, Bar, LineChart, Line, PieChart, Pie, AreaChart, Area, ScatterChart, Scatter, XAxis, YAxis, CartesianGrid, Cell, ResponsiveContainer } from "recharts"; -import * as z from "zod"; - -export const layoutId = 'type4-slide' -export const layoutName = 'Type4 Slide' -export const layoutDescription = 'A chart-focused layout with title, chart visualization, and description text.' - -const chartDataSchema = z.object({ - name: z.string().meta({ description: "Data point name" }), - value: z.number().meta({ description: "Data point value" }), - category: z.string().optional().meta({ description: "Category for grouping" }), - x: z.number().optional().meta({ description: "X coordinate for scatter plots" }), - y: z.number().optional().meta({ description: "Y coordinate for scatter plots" }), -}); - - -const type9SlideSchema = z.object({ - title: z.string().min(3).max(50).default('Chart Analysis').meta({ - description: "Main title of the slide", - }), - items: z.array(z.object({ - heading: z.string().min(2).max(50).meta({ - description: "Item heading", - }), - description: z.string().min(10).max(130).meta({ - description: "Item description", - }) - })).min(2).max(3).default([ - { - heading: 'First Key Point', - description: 'Detailed explanation of the first important point that supports the main topic' - }, - { - heading: 'Second Key Point', - description: 'Detailed explanation of the second important point with relevant information' - }, - { - heading: 'Third Key Point', - description: 'Detailed explanation of the third important point that concludes the discussion' - } - ]).meta({ - description: "List of numbered items (2-3 items)", - }), - chartData: z.any().optional().meta({ - description: "Chart data object", - }), - isFullSizeChart: z.boolean().default(false).meta({ - description: "Whether to display chart in full size mode", - }), - chartType: z.enum(['bar', 'line', 'pie', 'area', 'scatter']).default('pie').meta({ - description: "Type of chart to display", - }), - data: z.array(chartDataSchema).min(2).max(10).default([ - { name: '2021', value: 5 }, - { name: '2022', value: 12 }, - { name: '2023', value: 18 }, - { name: '2024', value: 23 }, - { name: '2025', value: 26 }, - ]).meta({ - description: "Chart data points", - }), - dataKey: z.string().default('value').meta({ - description: "Key field for chart values", - }), - categoryKey: z.string().default('name').meta({ - description: "Key field for chart categories", - }), - color: z.string().default('#3b82f6').meta({ - description: "Primary color for chart elements", - }), - showLegend: z.boolean().default(false).meta({ - description: "Whether to show chart legend", - }), - showTooltip: z.boolean().default(true).meta({ - description: "Whether to show chart tooltip", - }), -}) - - -const chartConfig = { - value: { - label: "Value", - }, - name: { - label: "Name", - }, -}; -const CHART_COLORS = [ - '#3b82f6', '#ef4444', '#10b981', '#f59e0b', '#8b5cf6', - '#06b6d4', '#84cc16', '#f97316', '#ec4899', '#6366f1' -]; - -export const Schema = type9SlideSchema - -export type Type9SlideData = z.infer - -interface Type9SlideLayoutProps { - data: Partial -} - -const Type9SlideLayout: React.FC = ({ data: slideData }) => { - const { title, items, data, chartType = 'line', color = '#3b82f6', dataKey = 'value', categoryKey = 'name', showLegend = false, showTooltip = true } = slideData; - const chartData = data || []; - const renderChart = () => { - const commonProps = { - data: chartData, - margin: { top: 10, right: 20, left: 0, bottom: 30 }, - }; - - switch (chartType) { - case 'bar': - return ( - - - - - {showTooltip && } />} - {showLegend && } />} - - - ); - - case 'line': - return ( - - - - - {showTooltip && } />} - {showLegend && } />} - - - ); - - case 'area': - return ( - - - - - {showTooltip && } />} - {showLegend && } />} - - - ); - - case 'pie': - return ( - - - {showTooltip && } />} - {showLegend && } />} - `${name} ${(percent * 100).toFixed(0)}%`} - > - {chartData && chartData.map((entry: any, index: number) => ( - - ))} - - - - ); - - case 'scatter': - return ( - - - - - {showTooltip && } />} - {showLegend && } />} - - - ); - - default: - return
Unsupported chart type
; - } - }; - - return ( -
- {title &&

- {title} -

} - -
-
-
- - {renderChart()} - -
-
-
-
- {items && items.map((item, index) => ( -
-
-
- {`0${index + 1}`} -
-
- {item.heading &&

- {item.heading} -

} - {item.description &&

- {item.description} -

} -
-
-
- ))} -
-
-
-
- ) -} - -export default Type9SlideLayout - diff --git a/servers/nextjs/presentation-templates/classic/TypeMermaidSlideLayout.tsx b/servers/nextjs/presentation-templates/classic/TypeMermaidSlideLayout.tsx deleted file mode 100644 index 7f97809a..00000000 --- a/servers/nextjs/presentation-templates/classic/TypeMermaidSlideLayout.tsx +++ /dev/null @@ -1,136 +0,0 @@ -import React, { useEffect, useRef } from 'react' -import * as z from "zod"; - -export const layoutId = 'type-mermaid-slide' -export const layoutName = 'Mermaid Chart Slide' -export const layoutDescription = 'A clean layout for displaying Mermaid diagrams with title and optional description.' - -const typeMermaidSlideSchema = z.object({ - title: z.string().min(3).max(50).default('Process Flow').meta({ - description: "Main title of the slide", - }), - description: z.string().min(10).max(200).optional().meta({ - description: "Optional description text to provide context for the diagram", - }), - mermaidCode: z.string().min(10).default(`graph LR - A[Start] --> B{Is it working?} - B -->|Yes| C[Great!] - B -->|No| D[Fix it] - D --> B - C --> E[End]`).meta({ - description: "Mermaid diagram code, and it must be a graph LR", - }), - theme: z.enum(['default', 'dark', 'forest', 'neutral']).default('default').meta({ - description: "Mermaid theme to use", - }) -}) - -export const Schema = typeMermaidSlideSchema - -export type TypeMermaidSlideData = z.infer - -interface TypeMermaidSlideLayoutProps { - data: Partial -} - -const TypeMermaidSlideLayout: React.FC = ({ data: slideData }) => { - const { title, description, mermaidCode, theme } = slideData; - const mermaidRef = useRef(null); - - useEffect(() => { - const loadMermaid = async () => { - try { - // Dynamically import mermaid - const mermaid = (await import('mermaid')).default; - - // Initialize mermaid with the selected theme - mermaid.initialize({ - startOnLoad: true, - theme: theme || 'default', - themeVariables: { - primaryColor: '#3b82f6', - primaryTextColor: '#1f2937', - primaryBorderColor: '#e5e7eb', - lineColor: '#6b7280', - secondaryColor: '#f3f4f6', - tertiaryColor: '#ffffff' - }, - flowchart: { - useMaxWidth: true, - htmlLabels: true, - curve: 'basis' - } - }); - - if (mermaidRef.current && mermaidCode) { - // Clear previous content - mermaidRef.current.innerHTML = ''; - - // Create a unique ID for this diagram - const diagramId = `mermaid-${Date.now()}`; - - // Render the diagram - const { svg } = await mermaid.render(diagramId, mermaidCode); - mermaidRef.current.innerHTML = svg; - } - } catch (error) { - console.error('Error loading or rendering mermaid:', error); - if (mermaidRef.current) { - mermaidRef.current.innerHTML = ` -
-
-

Error rendering diagram

-

Please check your Mermaid syntax

-
-
- `; - } - } - }; - - loadMermaid(); - }, [mermaidCode, theme]); - - return ( -
- {/* Title */} - {title && ( -

- {title} -

- )} - - {/* Description */} - {description && ( -

- {description} -

- )} - - {/* Mermaid Diagram Container */} -
-
-
- - {/* Fallback content if no mermaid code is provided */} - {!mermaidCode && ( -
-
-

No diagram to display

-

Please provide Mermaid diagram code

-
-
- )} -
- ) -} - -export default TypeMermaidSlideLayout \ No newline at end of file diff --git a/servers/nextjs/presentation-templates/classic/settings.json b/servers/nextjs/presentation-templates/classic/settings.json deleted file mode 100644 index af6e3e7d..00000000 --- a/servers/nextjs/presentation-templates/classic/settings.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "Default layout for presentations", - "ordered": false, - "default": false -} \ No newline at end of file