From f50c2b8ec25c0172e65df833f988675119aa4cbd Mon Sep 17 00:00:00 2001 From: shiva raj badu Date: Wed, 16 Jul 2025 17:36:29 +0545 Subject: [PATCH 1/2] build(Nextjs): Zod version 4 in use & refactor(nextjs): layouts & schemas --- .../hooks/useLayoutSchema.ts | 37 +- .../outline/components/OutlinePage.tsx | 2 +- .../components/PresentationPage.tsx | 2 +- .../presentation/components/SlideContent.tsx | 48 +- .../layouts/BulletPointSlideLayout.tsx | 36 +- .../layouts/ConclusionSlideLayout.tsx | 36 +- .../components/layouts/ContentSlideLayout.tsx | 16 +- .../components/layouts/FirstSlideLayout.tsx | 24 +- .../components/layouts/ImageSlideLayout.tsx | 24 +- .../components/layouts/ProcessSlideLayout.tsx | 24 +- .../components/layouts/QuoteSlideLayout.tsx | 32 +- .../layouts/StatisticsSlideLayout.tsx | 28 +- .../components/layouts/TeamSlideLayout.tsx | 32 +- .../layouts/TimelineSlideLayout.tsx | 32 +- .../layouts/TwoColumnSlideLayout.tsx | 28 +- servers/nextjs/package-lock.json | 869 +++++++++++++++++- servers/nextjs/package.json | 7 +- 17 files changed, 1115 insertions(+), 162 deletions(-) diff --git a/servers/nextjs/app/(presentation-generator)/hooks/useLayoutSchema.ts b/servers/nextjs/app/(presentation-generator)/hooks/useLayoutSchema.ts index abc7f494..e019d078 100644 --- a/servers/nextjs/app/(presentation-generator)/hooks/useLayoutSchema.ts +++ b/servers/nextjs/app/(presentation-generator)/hooks/useLayoutSchema.ts @@ -1,7 +1,6 @@ import { useState, useEffect } from "react"; import { toast } from "@/hooks/use-toast"; -import { zodToJsonSchema } from "zod-to-json-schema"; - +import * as z from 'zod'; interface LayoutInfo { id: string; name?: string; @@ -17,6 +16,8 @@ interface LayoutInfo { const useLayoutSchema = () => { const [layoutSchema, setLayoutSchema] = useState(null); + const [idMapFileNames, setIdMapFileNames] = useState>({}); + const [idMapSchema, setIdMapSchema] = useState>({}); const [loading, setLoading] = useState(false); const [error, setError] = useState(null); @@ -24,11 +25,13 @@ const useLayoutSchema = () => { try { setLoading(true); setError(null); - const response = await fetch('/api/layouts'); - const layoutFiles = await response.json(); - const layouts = await extractSchema(layoutFiles); - // console.log(layouts); - setLayoutSchema(layouts || []); + const layoutResponse = await fetch('/api/layouts'); + const layoutFiles = await layoutResponse.json(); + const response = await extractSchema(layoutFiles); + + setLayoutSchema(response?.layouts || []); + setIdMapFileNames(response?.idMapFileNames || {}); + setIdMapSchema(response?.idMapSchema || {}); } catch (err: unknown) { const errorMessage = err instanceof Error ? err.message : 'Failed to load layouts'; setError(errorMessage); @@ -38,6 +41,8 @@ const useLayoutSchema = () => { } }; + + // Auto-load layouts on mount useEffect(() => { loadLayouts(); @@ -48,7 +53,9 @@ const useLayoutSchema = () => { setLayoutSchema, loading, error, - refetch: loadLayouts + refetch: loadLayouts, + idMapFileNames, + idMapSchema }; }; @@ -57,6 +64,8 @@ export default useLayoutSchema; const extractSchema = async (layoutFiles: string[]) => { const layouts: LayoutInfo[] = []; + const idMapFileNames: Record = {}; + const idMapSchema: Record = {}; for (const fileName of layoutFiles) { try { const file = fileName.replace('.tsx', '').replace('.ts', '') @@ -88,18 +97,24 @@ const extractSchema = async (layoutFiles: string[]) => { } const layoutName = module.layoutName const layoutDescription = module.layoutDescription - const jsonSchema = zodToJsonSchema(module.Schema) + const jsonSchema = z.toJSONSchema(module.Schema,{ + override :(ctx)=>{ + delete ctx.jsonSchema.default + }, + }) const layout = { id: layoutId, name: layoutName, description: layoutDescription, - json_schema: jsonSchema + json_schema: jsonSchema, } + idMapFileNames[layoutId] = fileName + idMapSchema[layoutId] = module.Schema layouts.push(layout) } catch (error) { console.error(`Error extracting schema for ${fileName}:`, error) return null } } - return layouts + return {layouts, idMapFileNames, idMapSchema} }; diff --git a/servers/nextjs/app/(presentation-generator)/outline/components/OutlinePage.tsx b/servers/nextjs/app/(presentation-generator)/outline/components/OutlinePage.tsx index e90f530f..33a7104b 100644 --- a/servers/nextjs/app/(presentation-generator)/outline/components/OutlinePage.tsx +++ b/servers/nextjs/app/(presentation-generator)/outline/components/OutlinePage.tsx @@ -73,7 +73,7 @@ const OutlinePage = () => { ); evtSource.onopen = () => { - console.log('connection open'); + }; evtSource.addEventListener("response", (event) => { diff --git a/servers/nextjs/app/(presentation-generator)/presentation/components/PresentationPage.tsx b/servers/nextjs/app/(presentation-generator)/presentation/components/PresentationPage.tsx index 34e52124..dde9eebc 100644 --- a/servers/nextjs/app/(presentation-generator)/presentation/components/PresentationPage.tsx +++ b/servers/nextjs/app/(presentation-generator)/presentation/components/PresentationPage.tsx @@ -147,7 +147,7 @@ const PresentationPage = ({ presentation_id }: { presentation_id: string }) => { try { const repairedJson = jsonrepair(accumulatedChunks); const partialData = JSON.parse(repairedJson); - console.log(partialData); + if (partialData.slides) { // Check if the length of slides has changed if ( diff --git a/servers/nextjs/app/(presentation-generator)/presentation/components/SlideContent.tsx b/servers/nextjs/app/(presentation-generator)/presentation/components/SlideContent.tsx index 987e2257..15f05784 100644 --- a/servers/nextjs/app/(presentation-generator)/presentation/components/SlideContent.tsx +++ b/servers/nextjs/app/(presentation-generator)/presentation/components/SlideContent.tsx @@ -1,6 +1,5 @@ import React, { useEffect, useState } from "react"; import { Slide } from "../../types/slide"; -import { renderSlideContent } from "../../components/slide_config"; import { Loader2, PlusIcon, Trash2, WandSparkles } from "lucide-react"; import { Popover, @@ -17,6 +16,9 @@ import { useDispatch, useSelector } from "react-redux"; import { addSlide, updateSlide } from "@/store/slices/presentationGeneration"; import NewSlide from "../../components/slide_layouts/NewSlide"; import { getEmptySlideContent } from "../../utils/NewSlideContent"; +import useLayoutSchema from "../../hooks/useLayoutSchema"; +import dynamic from "next/dynamic"; +import FirstSlideLayout from "@/components/layouts/FirstSlideLayout"; interface SlideContentProps { slide: Slide; @@ -27,6 +29,7 @@ interface SlideContentProps { onDeleteSlide: (index: number) => void; } + const SlideContent = ({ slide, index, @@ -40,6 +43,7 @@ const SlideContent = ({ const { presentationData, isStreaming } = useSelector( (state: RootState) => state.presentationGeneration ); + const { idMapFileNames, idMapSchema } = useLayoutSchema(); const handleSubmit = async () => { const element = document.getElementById( @@ -94,24 +98,29 @@ const SlideContent = ({ setShowNewSlideSelection(false); }; // Scroll to the new slide when the presentationData is updated - useEffect(() => { - if ( - presentationData && - presentationData?.slides && - presentationData.slides.length > 1 && - isStreaming - ) { - const slideElement = document.getElementById(`slide-${index}`); - if (slideElement) { - slideElement.scrollIntoView({ - behavior: "smooth", - block: "center", - }); - } - } - }, [presentationData?.slides, isStreaming]); + // useEffect(() => { + // if ( + // presentationData && + // presentationData?.slides && + // presentationData.slides.length > 1 && + // isStreaming + // ) { + // const slideElement = document.getElementById(`slide-${index}`); + // if (slideElement) { + // slideElement.scrollIntoView({ + // behavior: "smooth", + // block: "center", + // }); + // } + // } + // }, [presentationData?.slides, isStreaming]); + + const renderLayout = (slide: any) => { + const layoutName = idMapFileNames[slide.layoutId]; + const Layout = dynamic(() => import(`@/components/layouts/${layoutName}.tsx`)); + return + }; - const language = presentationData?.presentation?.language || "English"; return ( <>
)}
- {renderSlideContent(slide, language)} + {/* render slides */} + {renderLayout(slide)} {!showNewSlideSelection && (
diff --git a/servers/nextjs/components/layouts/BulletPointSlideLayout.tsx b/servers/nextjs/components/layouts/BulletPointSlideLayout.tsx index 584ec1dd..22ecf543 100644 --- a/servers/nextjs/components/layouts/BulletPointSlideLayout.tsx +++ b/servers/nextjs/components/layouts/BulletPointSlideLayout.tsx @@ -1,5 +1,4 @@ import React from 'react' -import { zodToJsonSchema } from "zod-to-json-schema"; import * as z from "zod"; export const layoutId = 'bullet-point-slide' @@ -7,29 +6,40 @@ 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.string().url().describe('URL to image'), - prompt: z.string().describe('Prompt used to generate the image'), + 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').describe('Title of the slide'), - subtitle: z.string().min(3).max(150).optional().describe('Optional subtitle or description'), - icon: z.string().optional().describe('Icon to display in the slide'), + 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", + }), + icon: z.string().optional().meta({ + description: "Icon to display in the slide", + }), bulletPoints: z.array(z.string().min(5).max(200)).min(2).max(8).default([ 'First key point that highlights important information', 'Second bullet point with valuable insights', 'Third point demonstrating clear benefits', 'Fourth item showcasing key features' - ]).describe('List of bullet points (2-8 items)'), - backgroundImage: imageSchema.optional().describe('Background image for the slide'), + ]).meta({ + description: "List of bullet points (2-8 items)", + }), + backgroundImage: imageSchema.optional().meta({ + description: "Background image for the slide", + }), }) - - export const Schema = bulletPointSlideSchema -console.log(zodToJsonSchema(Schema, { - removeAdditionalStrategy: 'strict', -})) +console.log(z.toJSONSchema(Schema)) export type BulletPointSlideData = z.infer diff --git a/servers/nextjs/components/layouts/ConclusionSlideLayout.tsx b/servers/nextjs/components/layouts/ConclusionSlideLayout.tsx index 667c5f73..a095f015 100644 --- a/servers/nextjs/components/layouts/ConclusionSlideLayout.tsx +++ b/servers/nextjs/components/layouts/ConclusionSlideLayout.tsx @@ -6,21 +6,39 @@ export const layoutName = 'Conclusion Slide' export const layoutDescription = 'A slide with a title, subtitle, key takeaways, call to action, and contact information' const conclusionSlideSchema = z.object({ - title: z.string().min(3).max(100).default('Conclusion').describe('Title of the slide'), - subtitle: z.string().min(3).max(150).optional().describe('Optional subtitle or description'), + title: z.string().min(3).max(100).default('Conclusion').meta({ + description: "Title of the slide", + }), + subtitle: z.string().min(3).max(150).optional().meta({ + description: "Optional subtitle or description", + }), keyTakeaways: z.array(z.string().min(5).max(200)).min(2).max(6).default([ 'Successfully achieved our primary objectives', 'Demonstrated significant value and impact', 'Established clear next steps for continued success', 'Built strong foundation for future growth' - ]).describe('Key takeaways or summary points (2-6 items)'), - callToAction: z.string().min(5).max(150).optional().describe('Optional call to action or next steps'), + ]).meta({ + description: "Key takeaways or summary points (2-6 items)", + }), + callToAction: z.string().min(5).max(150).optional().meta({ + description: "Optional call to action or next steps", + }), contactInfo: z.object({ - email: z.string().email().optional().describe('Contact email'), - phone: z.string().min(5).max(50).optional().describe('Contact phone number'), - website: z.string().url().optional().describe('Website URL') - }).optional().describe('Optional contact information'), - backgroundImage: z.string().optional().describe('URL to background image for the slide') + email: z.string().email().optional().meta({ + description: "Contact email", + }), + phone: z.string().min(5).max(50).optional().meta({ + description: "Contact phone number", + }), + website: z.string().url().optional().meta({ + description: "Website URL", + }) + }).optional().meta({ + description: "Optional contact information", + }), + backgroundImage: z.string().optional().meta({ + description: "URL to background image for the slide", + }) }) export const Schema = conclusionSlideSchema diff --git a/servers/nextjs/components/layouts/ContentSlideLayout.tsx b/servers/nextjs/components/layouts/ContentSlideLayout.tsx index 56ccfaf3..c862f152 100644 --- a/servers/nextjs/components/layouts/ContentSlideLayout.tsx +++ b/servers/nextjs/components/layouts/ContentSlideLayout.tsx @@ -7,10 +7,18 @@ export const layoutName = 'Content Slide' export const layoutDescription = 'A slide with a title, subtitle, and content' const contentSlideSchema = z.object({ - title: z.string().min(3).max(100).default('Slide Title').describe('Title of the slide'), - subtitle: z.string().min(3).max(150).optional().describe('Optional subtitle or description'), - 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.').describe('Main content text'), - backgroundImage: z.string().optional().describe('URL to background image for the slide') + title: z.string().min(3).max(100).default('Slide Title').meta({ + description: "Title of the slide", + }), + subtitle: z.string().min(3).max(150).optional().meta({ + description: "Optional subtitle or description", + }), + 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", + }) }) export const Schema = contentSlideSchema diff --git a/servers/nextjs/components/layouts/FirstSlideLayout.tsx b/servers/nextjs/components/layouts/FirstSlideLayout.tsx index 04519467..fcb87d57 100644 --- a/servers/nextjs/components/layouts/FirstSlideLayout.tsx +++ b/servers/nextjs/components/layouts/FirstSlideLayout.tsx @@ -7,12 +7,24 @@ export const layoutName = 'First Slide' export const layoutDescription = 'A slide with a title, subtitle, author, date, company, and background image' const firstSlideSchema = z.object({ - title: z.string().min(3).max(100).default('Welcome to Our Presentation').describe('Main title of the presentation'), - subtitle: z.string().min(10).max(200).default('Subtitle for the slide').optional().describe('Optional subtitle or tagline'), - author: z.string().min(2).max(100).default('John Doe').optional().describe('Author or presenter name'), - date: z.string().optional().describe('Presentation date'), - company: z.string().min(2).max(100).default('Company Name').optional().describe('Company or organization name'), - backgroundImage: z.string().optional().describe('URL to background image for the slide') + title: z.string().min(3).max(100).default('Welcome to Our Presentation').meta({ + description: "Main title of the presentation", + }), + subtitle: z.string().min(10).max(200).default('Subtitle for the slide').optional().meta({ + description: "Optional subtitle or tagline", + }), + author: z.string().min(2).max(100).default('John Doe').optional().meta({ + description: "Author or presenter name", + }), + date: z.string().optional().meta({ + description: "Presentation date", + }), + company: z.string().min(2).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", + }) }) export const Schema = firstSlideSchema diff --git a/servers/nextjs/components/layouts/ImageSlideLayout.tsx b/servers/nextjs/components/layouts/ImageSlideLayout.tsx index d37e1e96..ffa65293 100644 --- a/servers/nextjs/components/layouts/ImageSlideLayout.tsx +++ b/servers/nextjs/components/layouts/ImageSlideLayout.tsx @@ -7,12 +7,24 @@ 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').describe('Title of the slide'), - subtitle: z.string().min(3).max(150).default('Subtitle for the slide').optional().describe('Optional subtitle or description'), - image: z.string().default('https://images.unsplash.com/photo-1460925895917-afdab827c52f?w=800&h=600&fit=crop').describe('Main image URL'), - imageCaption: z.string().min(5).max(200).default('Image caption').optional().describe('Optional image caption or description'), - content: z.string().min(10).max(600).optional().describe('Optional supporting content text'), - backgroundImage: z.string().optional().describe('URL to background image for the slide') + 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 diff --git a/servers/nextjs/components/layouts/ProcessSlideLayout.tsx b/servers/nextjs/components/layouts/ProcessSlideLayout.tsx index f775f907..ec342e76 100644 --- a/servers/nextjs/components/layouts/ProcessSlideLayout.tsx +++ b/servers/nextjs/components/layouts/ProcessSlideLayout.tsx @@ -7,12 +7,22 @@ export const layoutName = 'Process Slide' export const layoutDescription = 'A slide with a title, subtitle, and process steps' const processSlideSchema = z.object({ - title: z.string().min(3).max(100).default('Our Process').describe('Title of the slide'), - subtitle: z.string().min(3).max(150).optional().describe('Optional subtitle or description'), + title: z.string().min(3).max(100).default('Our Process').meta({ + description: "Title of the slide", + }), + subtitle: z.string().min(3).max(150).optional().meta({ + description: "Optional subtitle or description", + }), processSteps: z.array(z.object({ - step: z.number().min(1).max(10).describe('Step number'), - title: z.string().min(3).max(100).describe('Step title'), - description: z.string().min(10).max(200).describe('Step description') + step: z.number().min(1).max(10).meta({ + description: "Step number", + }), + title: z.string().min(3).max(100).meta({ + description: "Step title", + }), + description: z.string().min(10).max(200).meta({ + description: "Step description", + }) })).min(2).max(6).default([ { step: 1, @@ -35,7 +45,9 @@ const processSlideSchema = z.object({ description: 'Final delivery and ongoing support' } ]).describe('Process steps (2-6 items)'), - backgroundImage: z.string().optional().describe('URL to background image for the slide') + backgroundImage: z.string().optional().meta({ + description: "URL to background image for the slide", + }) }) export const Schema = processSlideSchema diff --git a/servers/nextjs/components/layouts/QuoteSlideLayout.tsx b/servers/nextjs/components/layouts/QuoteSlideLayout.tsx index 4d89a999..634756f4 100644 --- a/servers/nextjs/components/layouts/QuoteSlideLayout.tsx +++ b/servers/nextjs/components/layouts/QuoteSlideLayout.tsx @@ -7,14 +7,30 @@ export const layoutName = 'Quote Slide' export const layoutDescription = 'A slide with a title, subtitle, quote, author, author title, company, and author image' const quoteSlideSchema = z.object({ - title: z.string().min(3).max(100).default('Testimonials').describe('Title of the slide'), - subtitle: z.string().min(3).max(150).optional().describe('Optional subtitle or description'), - quote: z.string().min(10).max(500).default('This solution has transformed our business operations and exceeded all expectations.').describe('The main quote or testimonial'), - author: z.string().min(2).max(100).default('John Smith').describe('Quote author name'), - authorTitle: z.string().min(2).max(100).optional().describe('Author job title or position'), - company: z.string().min(2).max(100).optional().describe('Author company or organization'), - authorImage: z.string().optional().describe('URL to author photo'), - backgroundImage: z.string().optional().describe('URL to background image for the slide') + title: z.string().min(3).max(100).default('Testimonials').meta({ + description: "Title of the slide", + }), + subtitle: z.string().min(3).max(150).optional().meta({ + description: "Optional subtitle or description", + }), + quote: z.string().min(10).max(500).default('This solution has transformed our business operations and exceeded all expectations.').meta({ + description: "The main quote or testimonial", + }), + author: z.string().min(2).max(100).default('John Smith').meta({ + description: "Quote author name", + }), + authorTitle: z.string().min(2).max(100).optional().meta({ + description: "Author job title or position", + }), + company: z.string().min(2).max(100).optional().meta({ + description: "Author company or organization", + }), + authorImage: z.string().optional().meta({ + description: "URL to author photo", + }), + backgroundImage: z.string().optional().meta({ + description: "URL to background image for the slide", + }) }) export const Schema = quoteSlideSchema diff --git a/servers/nextjs/components/layouts/StatisticsSlideLayout.tsx b/servers/nextjs/components/layouts/StatisticsSlideLayout.tsx index e040726f..da7498f2 100644 --- a/servers/nextjs/components/layouts/StatisticsSlideLayout.tsx +++ b/servers/nextjs/components/layouts/StatisticsSlideLayout.tsx @@ -7,13 +7,25 @@ export const layoutName = 'Statistics Slide' export const layoutDescription = 'A slide with a title, subtitle, and statistics' const statisticsSlideSchema = z.object({ - title: z.string().min(3).max(100).default('Key Statistics').describe('Title of the slide'), - subtitle: z.string().min(3).max(150).optional().describe('Optional subtitle or description'), + title: z.string().min(3).max(100).default('Key Statistics').meta({ + description: "Title of the slide", + }), + subtitle: z.string().min(3).max(150).optional().meta({ + description: "Optional subtitle or description", + }), statistics: z.array(z.object({ - value: z.string().min(1).max(20).describe('Statistical value (e.g., "250%", "$1.2M", "99.9%")'), - label: z.string().min(3).max(100).describe('Description of the statistic'), - trend: z.enum(['up', 'down', 'neutral']).optional().describe('Trend direction indicator'), - context: z.string().min(5).max(200).optional().describe('Additional context or time period') + value: z.string().min(1).max(20).meta({ + description: "Statistical value (e.g., '250%', '$1.2M', '99.9%')", + }), + label: z.string().min(3).max(100).meta({ + description: "Description of the statistic", + }), + trend: z.enum(['up', 'down', 'neutral']).optional().meta({ + description: "Trend direction indicator", + }), + context: z.string().min(5).max(200).optional().meta({ + description: "Additional context or time period", + }) })).min(2).max(6).default([ { value: '250%', @@ -40,7 +52,9 @@ const statisticsSlideSchema = z.object({ context: 'Customer service' } ]).describe('List of statistics (2-6 items)'), - backgroundImage: z.string().optional().describe('URL to background image for the slide') + backgroundImage: z.string().optional().meta({ + description: "URL to background image for the slide", + }) }) export const Schema = statisticsSlideSchema diff --git a/servers/nextjs/components/layouts/TeamSlideLayout.tsx b/servers/nextjs/components/layouts/TeamSlideLayout.tsx index e9b2beca..cfcc52e3 100644 --- a/servers/nextjs/components/layouts/TeamSlideLayout.tsx +++ b/servers/nextjs/components/layouts/TeamSlideLayout.tsx @@ -6,15 +6,31 @@ export const layoutName = 'Team Slide' export const layoutDescription = 'A slide with a title, subtitle, and team members' const teamSlideSchema = z.object({ - title: z.string().min(3).max(100).default('Meet Our Team').describe('Title of the slide'), - subtitle: z.string().min(3).max(150).optional().describe('Optional subtitle or team description'), + title: z.string().min(3).max(100).default('Meet Our Team').meta({ + description: "Title of the slide", + }), + subtitle: z.string().min(3).max(150).optional().meta({ + description: "Optional subtitle or team description", + }), teamMembers: z.array(z.object({ - name: z.string().min(2).max(100).describe('Team member name'), - title: z.string().min(2).max(100).describe('Job title or role'), - image: z.string().optional().describe('URL to team member photo'), - bio: z.string().min(10).max(300).optional().describe('Brief biography or description'), - email: z.string().email().optional().describe('Contact email'), - linkedin: z.string().url().optional().describe('LinkedIn profile URL') + name: z.string().min(2).max(100).meta({ + description: "Team member name", + }), + title: z.string().min(2).max(100).meta({ + description: "Job title or role", + }), + image: z.string().optional().meta({ + description: "URL to team member photo", + }), + bio: z.string().min(10).max(300).optional().meta({ + description: "Brief biography or description", + }), + email: z.email().optional().meta({ + description: "Contact email", + }), + linkedin: z.url().optional().meta({ + description: "LinkedIn profile URL", + }) })).min(1).max(6).default([ { name: 'Sarah Johnson', diff --git a/servers/nextjs/components/layouts/TimelineSlideLayout.tsx b/servers/nextjs/components/layouts/TimelineSlideLayout.tsx index cbf86971..471d7733 100644 --- a/servers/nextjs/components/layouts/TimelineSlideLayout.tsx +++ b/servers/nextjs/components/layouts/TimelineSlideLayout.tsx @@ -7,13 +7,25 @@ export const layoutName = 'Timeline Slide' export const layoutDescription = 'A slide with a title, subtitle, and timeline items' const timelineSlideSchema = z.object({ - title: z.string().min(3).max(100).default('Project Timeline').describe('Title of the slide'), - subtitle: z.string().min(3).max(150).optional().describe('Optional subtitle or description'), + title: z.string().min(3).max(100).default('Project Timeline').meta({ + description: "Title of the slide", + }), + subtitle: z.string().min(3).max(150).optional().meta({ + description: "Optional subtitle or description", + }), timelineItems: z.array(z.object({ - date: z.string().min(2).max(50).describe('Date or time period'), - title: z.string().min(3).max(100).describe('Event or milestone title'), - description: z.string().min(10).max(300).describe('Event description'), - status: z.enum(['completed', 'current', 'upcoming']).default('upcoming').describe('Timeline item status') + date: z.string().min(2).max(50).meta({ + description: "Date or time period", + }), + title: z.string().min(3).max(100).meta({ + description: "Event or milestone title", + }), + description: z.string().min(10).max(300).meta({ + description: "Event description", + }), + status: z.enum(['completed', 'current', 'upcoming']).default('upcoming').meta({ + description: "Timeline item status", + }) })).min(2).max(6).default([ { date: 'Q1 2024', @@ -39,8 +51,12 @@ const timelineSlideSchema = z.object({ description: 'Final deployment, go-live activities, and post-launch monitoring', status: 'upcoming' } - ]).describe('Timeline events (2-6 items)'), - backgroundImage: z.string().optional().describe('URL to background image for the slide') + ]).meta({ + description: "Timeline events (2-6 items)", + }), + backgroundImage: z.string().optional().meta({ + description: "URL to background image for the slide", + }) }) export const Schema = timelineSlideSchema diff --git a/servers/nextjs/components/layouts/TwoColumnSlideLayout.tsx b/servers/nextjs/components/layouts/TwoColumnSlideLayout.tsx index cc43740a..6501cc31 100644 --- a/servers/nextjs/components/layouts/TwoColumnSlideLayout.tsx +++ b/servers/nextjs/components/layouts/TwoColumnSlideLayout.tsx @@ -7,23 +7,37 @@ 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').describe('Title of the slide'), - subtitle: z.string().min(3).max(150).optional().describe('Optional subtitle or description'), + 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').describe('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.').describe('Left column content') + 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').describe('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.').describe('Right column content') + 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().describe('URL to background image for the slide') + backgroundImage: z.string().optional().meta({ + description: "URL to background image for the slide", + }) }) export const Schema = twoColumnSlideSchema diff --git a/servers/nextjs/package-lock.json b/servers/nextjs/package-lock.json index 18a70919..c0ae3778 100644 --- a/servers/nextjs/package-lock.json +++ b/servers/nextjs/package-lock.json @@ -44,6 +44,7 @@ "marked": "^15.0.11", "next": "^14.2.14", "next-themes": "^0.4.6", + "puppeteer": "^24.13.0", "react": "^18", "react-dom": "^18", "react-redux": "^9.1.2", @@ -53,8 +54,7 @@ "tailwind-scrollbar-hide": "^2.0.0", "tailwindcss-animate": "^1.0.7", "tiptap-markdown": "^0.8.10", - "zod": "^3.25.76", - "zod-to-json-schema": "^3.24.6" + "zod": "^4.0.5" }, "devDependencies": { "@types/animejs": "^3.1.12", @@ -65,6 +65,9 @@ "cypress": "^14.3.3", "tailwindcss": "^3.4.1", "typescript": "^5" + }, + "peerDependencies": { + "zod": "^4.0.5" } }, "node_modules/@alloc/quick-lru": { @@ -79,6 +82,29 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/@babel/code-frame": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.27.1.tgz", + "integrity": "sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==", + "license": "MIT", + "dependencies": { + "@babel/helper-validator-identifier": "^7.27.1", + "js-tokens": "^4.0.0", + "picocolors": "^1.1.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.27.1.tgz", + "integrity": "sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow==", + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/@babel/runtime": { "version": "7.27.6", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.27.6.tgz", @@ -566,6 +592,27 @@ "url": "https://opencollective.com/popperjs" } }, + "node_modules/@puppeteer/browsers": { + "version": "2.10.5", + "resolved": "https://registry.npmjs.org/@puppeteer/browsers/-/browsers-2.10.5.tgz", + "integrity": "sha512-eifa0o+i8dERnngJwKrfp3dEq7ia5XFyoqB17S4gK8GhsQE4/P8nxOfQSE0zQHxzzLo/cmF+7+ywEQ7wK7Fb+w==", + "license": "Apache-2.0", + "dependencies": { + "debug": "^4.4.1", + "extract-zip": "^2.0.1", + "progress": "^2.0.3", + "proxy-agent": "^6.5.0", + "semver": "^7.7.2", + "tar-fs": "^3.0.8", + "yargs": "^17.7.2" + }, + "bin": { + "browsers": "lib/cjs/main-cli.js" + }, + "engines": { + "node": ">=18" + } + }, "node_modules/@radix-ui/number": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/@radix-ui/number/-/number-1.1.1.tgz", @@ -2165,6 +2212,12 @@ "url": "https://github.com/sponsors/ueberdosis" } }, + "node_modules/@tootallnate/quickjs-emscripten": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@tootallnate/quickjs-emscripten/-/quickjs-emscripten-0.23.0.tgz", + "integrity": "sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA==", + "license": "MIT" + }, "node_modules/@types/animejs": { "version": "3.1.13", "resolved": "https://registry.npmjs.org/@types/animejs/-/animejs-3.1.13.tgz", @@ -2258,10 +2311,10 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "20.19.7", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.7.tgz", - "integrity": "sha512-1GM9z6BJOv86qkPvzh2i6VW5+VVrXxCLknfmTkWEqz+6DqosiY28XUWCTmBcJ0ACzKqx/iwdIREfo1fwExIlkA==", - "dev": true, + "version": "20.19.8", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.8.tgz", + "integrity": "sha512-HzbgCY53T6bfu4tT7Aq3TvViJyHjLjPNaAS3HOuMc9pw97KHsUtXNX4L+wu59g1WnjsZSko35MbEqnO58rihhw==", + "devOptional": true, "license": "MIT", "dependencies": { "undici-types": "~6.21.0" @@ -2329,13 +2382,21 @@ "version": "2.10.3", "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.3.tgz", "integrity": "sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==", - "dev": true, "license": "MIT", "optional": true, "dependencies": { "@types/node": "*" } }, + "node_modules/agent-base": { + "version": "7.1.4", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.4.tgz", + "integrity": "sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==", + "license": "MIT", + "engines": { + "node": ">= 14" + } + }, "node_modules/aggregate-error": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", @@ -2503,6 +2564,18 @@ "node": ">=0.8" } }, + "node_modules/ast-types": { + "version": "0.13.4", + "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.13.4.tgz", + "integrity": "sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w==", + "license": "MIT", + "dependencies": { + "tslib": "^2.0.1" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/astral-regex": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", @@ -2554,12 +2627,90 @@ "dev": true, "license": "MIT" }, + "node_modules/b4a": { + "version": "1.6.7", + "resolved": "https://registry.npmjs.org/b4a/-/b4a-1.6.7.tgz", + "integrity": "sha512-OnAYlL5b7LEkALw87fUVafQw5rVR9RjwGd4KUwNQ6DrrNmaVaUCgLipfVlzrPQ4tWOR9P0IXGNOx50jYCCdSJg==", + "license": "Apache-2.0" + }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "license": "MIT" }, + "node_modules/bare-events": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/bare-events/-/bare-events-2.6.0.tgz", + "integrity": "sha512-EKZ5BTXYExaNqi3I3f9RtEsaI/xBSGjE0XZCZilPzFAV/goswFHuPd9jEZlPIZ/iNZJwDSao9qRiScySz7MbQg==", + "license": "Apache-2.0", + "optional": true + }, + "node_modules/bare-fs": { + "version": "4.1.6", + "resolved": "https://registry.npmjs.org/bare-fs/-/bare-fs-4.1.6.tgz", + "integrity": "sha512-25RsLF33BqooOEFNdMcEhMpJy8EoR88zSMrnOQOaM3USnOK2VmaJ1uaQEwPA6AQjrv1lXChScosN6CzbwbO9OQ==", + "license": "Apache-2.0", + "optional": true, + "dependencies": { + "bare-events": "^2.5.4", + "bare-path": "^3.0.0", + "bare-stream": "^2.6.4" + }, + "engines": { + "bare": ">=1.16.0" + }, + "peerDependencies": { + "bare-buffer": "*" + }, + "peerDependenciesMeta": { + "bare-buffer": { + "optional": true + } + } + }, + "node_modules/bare-os": { + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/bare-os/-/bare-os-3.6.1.tgz", + "integrity": "sha512-uaIjxokhFidJP+bmmvKSgiMzj2sV5GPHaZVAIktcxcpCyBFFWO+YlikVAdhmUo2vYFvFhOXIAlldqV29L8126g==", + "license": "Apache-2.0", + "optional": true, + "engines": { + "bare": ">=1.14.0" + } + }, + "node_modules/bare-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bare-path/-/bare-path-3.0.0.tgz", + "integrity": "sha512-tyfW2cQcB5NN8Saijrhqn0Zh7AnFNsnczRcuWODH0eYAXBsJ5gVxAUuNr7tsHSC6IZ77cA0SitzT+s47kot8Mw==", + "license": "Apache-2.0", + "optional": true, + "dependencies": { + "bare-os": "^3.0.1" + } + }, + "node_modules/bare-stream": { + "version": "2.6.5", + "resolved": "https://registry.npmjs.org/bare-stream/-/bare-stream-2.6.5.tgz", + "integrity": "sha512-jSmxKJNJmHySi6hC42zlZnq00rga4jjxcgNZjY9N5WlOe/iOoGRtdwGsHzQv2RlH2KOYMwGUXhf2zXd32BA9RA==", + "license": "Apache-2.0", + "optional": true, + "dependencies": { + "streamx": "^2.21.0" + }, + "peerDependencies": { + "bare-buffer": "*", + "bare-events": "*" + }, + "peerDependenciesMeta": { + "bare-buffer": { + "optional": true + }, + "bare-events": { + "optional": true + } + } + }, "node_modules/base64-js": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", @@ -2581,6 +2732,15 @@ ], "license": "MIT" }, + "node_modules/basic-ftp": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/basic-ftp/-/basic-ftp-5.0.5.tgz", + "integrity": "sha512-4Bcg1P8xhUuqcii/S0Z9wiHIrQVPMermM1any+MX5GeGD7faD3/msQUDGLol9wOcz4/jbg/WJnGqoJF6LiBdtg==", + "license": "MIT", + "engines": { + "node": ">=10.0.0" + } + }, "node_modules/bcrypt-pbkdf": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", @@ -2667,7 +2827,6 @@ "version": "0.2.13", "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", - "dev": true, "license": "MIT", "engines": { "node": "*" @@ -2725,6 +2884,15 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/camelcase-css": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/camelcase-css/-/camelcase-css-2.0.1.tgz", @@ -2837,6 +3005,28 @@ "node": ">= 6" } }, + "node_modules/chromium-bidi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/chromium-bidi/-/chromium-bidi-7.1.0.tgz", + "integrity": "sha512-UVYuuZfwi7AIiV+OWIRePZD6kX1bSNxoWjEsYG+Xkb97hzQIt9qnV662I5A6BAcdKO4bcZQVrkK/VhNHzFjNDg==", + "license": "Apache-2.0", + "dependencies": { + "mitt": "^3.0.1", + "zod": "^3.24.1" + }, + "peerDependencies": { + "devtools-protocol": "*" + } + }, + "node_modules/chromium-bidi/node_modules/zod": { + "version": "3.25.76", + "resolved": "https://registry.npmjs.org/zod/-/zod-3.25.76.tgz", + "integrity": "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/colinhacks" + } + }, "node_modules/ci-info": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-4.3.0.tgz", @@ -2927,6 +3117,20 @@ "integrity": "sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==", "license": "MIT" }, + "node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, "node_modules/clsx": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz", @@ -3028,6 +3232,32 @@ "dev": true, "license": "MIT" }, + "node_modules/cosmiconfig": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-9.0.0.tgz", + "integrity": "sha512-itvL5h8RETACmOTFc4UfIyB2RfEHi71Ax6E/PivVxq9NseKbOWpeyHEOIbmAw1rs8Ak0VursQNww7lf7YtUwzg==", + "license": "MIT", + "dependencies": { + "env-paths": "^2.2.1", + "import-fresh": "^3.3.0", + "js-yaml": "^4.1.0", + "parse-json": "^5.2.0" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/d-fischer" + }, + "peerDependencies": { + "typescript": ">=4.9.5" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, "node_modules/crelt": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/crelt/-/crelt-1.0.6.tgz", @@ -3067,9 +3297,9 @@ "license": "MIT" }, "node_modules/cypress": { - "version": "14.5.1", - "resolved": "https://registry.npmjs.org/cypress/-/cypress-14.5.1.tgz", - "integrity": "sha512-vYBeZKW3UAtxwv5mFuSlOBCYhyO0H86TeDKRJ7TgARyHiREIaiDjeHtqjzrXRFrdz9KnNavqlm+z+hklC7v8XQ==", + "version": "14.5.2", + "resolved": "https://registry.npmjs.org/cypress/-/cypress-14.5.2.tgz", + "integrity": "sha512-O4E4CEBqDHLDrJD/dfStHPcM+8qFgVVZ89Li7xDU0yL/JxO/V0PEcfF2I8aGa7uA2MGNLkNUAnghPM83UcHOJw==", "dev": true, "hasInstallScript": true, "license": "MIT", @@ -3260,6 +3490,15 @@ "node": ">=0.10" } }, + "node_modules/data-uri-to-buffer": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-6.0.2.tgz", + "integrity": "sha512-7hvf7/GW8e86rW0ptuwS3OcBGDjIi6SZva7hCyWC0yYry2cOPmLIjXAUHI6DK2HsnwJd9ifmt57i8eV2n4YNpw==", + "license": "MIT", + "engines": { + "node": ">= 14" + } + }, "node_modules/dayjs": { "version": "1.11.13", "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.13.tgz", @@ -3271,7 +3510,6 @@ "version": "4.4.1", "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz", "integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==", - "dev": true, "license": "MIT", "dependencies": { "ms": "^2.1.3" @@ -3291,6 +3529,20 @@ "integrity": "sha512-qIMFpTMZmny+MMIitAB6D7iVPEorVw6YQRWkvarTkT4tBeSLLiHzcwj6q0MmYSFCiVpiqPJTJEYIrpcPzVEIvg==", "license": "MIT" }, + "node_modules/degenerator": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/degenerator/-/degenerator-5.0.1.tgz", + "integrity": "sha512-TllpMR/t0M5sqCXfj85i4XaAzxmS5tVA16dqvdkMwGmzI+dXLXnw3J+3Vdv7VKw+ThlTMboK6i9rnZ6Nntj5CQ==", + "license": "MIT", + "dependencies": { + "ast-types": "^0.13.4", + "escodegen": "^2.1.0", + "esprima": "^4.0.1" + }, + "engines": { + "node": ">= 14" + } + }, "node_modules/delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", @@ -3307,6 +3559,12 @@ "integrity": "sha512-ypdmJU/TbBby2Dxibuv7ZLW3Bs1QEmM7nHjEANfohJLvE0XVujisn1qPJcZxg+qDucsr+bP6fLD1rPS3AhJ7EQ==", "license": "MIT" }, + "node_modules/devtools-protocol": { + "version": "0.0.1464554", + "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1464554.tgz", + "integrity": "sha512-CAoP3lYfwAGQTaAXYvA6JZR0fjGUb7qec1qf4mToyoH2TZgUFeIqYcjh6f9jNuhHfuZiEdH+PONHYrLhRQX6aw==", + "license": "BSD-3-Clause" + }, "node_modules/didyoumean": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.2.tgz", @@ -3361,6 +3619,13 @@ "safer-buffer": "^2.1.0" } }, + "node_modules/ecc-jsbn/node_modules/jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==", + "dev": true, + "license": "MIT" + }, "node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", @@ -3371,7 +3636,6 @@ "version": "1.4.5", "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.5.tgz", "integrity": "sha512-ooEGc6HP26xXq/N+GCGOT0JKCLDGrq2bQUZrQ7gyrJiZANJ/8YDTxTpQBXGMn+WbIQXNVpyWymm7KYVICQnyOg==", - "dev": true, "license": "MIT", "dependencies": { "once": "^1.4.0" @@ -3403,6 +3667,24 @@ "url": "https://github.com/fb55/entities?sponsor=1" } }, + "node_modules/env-paths": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz", + "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "license": "MIT", + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, "node_modules/es-define-property": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", @@ -3452,6 +3734,15 @@ "node": ">= 0.4" } }, + "node_modules/escalade": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", @@ -3462,6 +3753,58 @@ "node": ">=0.8.0" } }, + "node_modules/escodegen": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.1.0.tgz", + "integrity": "sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==", + "license": "BSD-2-Clause", + "dependencies": { + "esprima": "^4.0.1", + "estraverse": "^5.2.0", + "esutils": "^2.0.2" + }, + "bin": { + "escodegen": "bin/escodegen.js", + "esgenerate": "bin/esgenerate.js" + }, + "engines": { + "node": ">=6.0" + }, + "optionalDependencies": { + "source-map": "~0.6.1" + } + }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "license": "BSD-2-Clause", + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/eventemitter2": { "version": "6.4.7", "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-6.4.7.tgz", @@ -3523,7 +3866,6 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz", "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==", - "dev": true, "license": "BSD-2-Clause", "dependencies": { "debug": "^4.1.1", @@ -3565,6 +3907,12 @@ "node": ">=6.0.0" } }, + "node_modules/fast-fifo": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/fast-fifo/-/fast-fifo-1.3.2.tgz", + "integrity": "sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ==", + "license": "MIT" + }, "node_modules/fast-glob": { "version": "3.3.3", "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", @@ -3606,7 +3954,6 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==", - "dev": true, "license": "MIT", "dependencies": { "pend": "~1.2.0" @@ -3734,6 +4081,15 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "license": "ISC", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, "node_modules/get-intrinsic": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", @@ -3786,7 +4142,6 @@ "version": "5.2.0", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", - "dev": true, "license": "MIT", "dependencies": { "pump": "^3.0.0" @@ -3798,6 +4153,20 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/get-uri": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/get-uri/-/get-uri-6.0.5.tgz", + "integrity": "sha512-b1O07XYq8eRuVzBNgJLstU6FYc1tS6wnMtF1I1D9lE8LxZSOGZ7LhxN54yPP6mGw5f2CkXY2BQUL9Fx41qvcIg==", + "license": "MIT", + "dependencies": { + "basic-ftp": "^5.0.2", + "data-uri-to-buffer": "^6.0.2", + "debug": "^4.3.4" + }, + "engines": { + "node": ">= 14" + } + }, "node_modules/getos": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/getos/-/getos-3.2.1.tgz", @@ -3953,6 +4322,19 @@ "node": ">= 0.4" } }, + "node_modules/http-proxy-agent": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", + "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==", + "license": "MIT", + "dependencies": { + "agent-base": "^7.1.0", + "debug": "^4.3.4" + }, + "engines": { + "node": ">= 14" + } + }, "node_modules/http-signature": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.4.0.tgz", @@ -3968,6 +4350,19 @@ "node": ">=0.10" } }, + "node_modules/https-proxy-agent": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz", + "integrity": "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==", + "license": "MIT", + "dependencies": { + "agent-base": "^7.1.2", + "debug": "4" + }, + "engines": { + "node": ">= 14" + } + }, "node_modules/human-signals": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-1.1.1.tgz", @@ -4009,6 +4404,22 @@ "url": "https://opencollective.com/immer" } }, + "node_modules/import-fresh": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz", + "integrity": "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==", + "license": "MIT", + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/indent-string": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", @@ -4038,6 +4449,25 @@ "node": ">=12" } }, + "node_modules/ip-address": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-9.0.5.tgz", + "integrity": "sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g==", + "license": "MIT", + "dependencies": { + "jsbn": "1.1.0", + "sprintf-js": "^1.1.3" + }, + "engines": { + "node": ">= 12" + } + }, + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", + "license": "MIT" + }, "node_modules/is-binary-path": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", @@ -4207,11 +4637,28 @@ "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", "license": "MIT" }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, "node_modules/jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==", - "dev": true, + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-1.1.0.tgz", + "integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==", + "license": "MIT" + }, + "node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", "license": "MIT" }, "node_modules/json-schema": { @@ -4444,10 +4891,13 @@ } }, "node_modules/lru-cache": { - "version": "10.4.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", - "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", - "license": "ISC" + "version": "7.18.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", + "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", + "license": "ISC", + "engines": { + "node": ">=12" + } }, "node_modules/lucide-react": { "version": "0.447.0", @@ -4605,11 +5055,16 @@ "node": ">=16 || 14 >=14.17" } }, + "node_modules/mitt": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/mitt/-/mitt-3.0.1.tgz", + "integrity": "sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==", + "license": "MIT" + }, "node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true, "license": "MIT" }, "node_modules/mz": { @@ -4641,6 +5096,15 @@ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" } }, + "node_modules/netmask": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/netmask/-/netmask-2.0.2.tgz", + "integrity": "sha512-dBpDMdxv9Irdq66304OLfEmQ9tbNRFnFTuZiLo+bD+r332bBmMJ8GBLXklIXXgxd3+v9+KUnZaUR5PJMa75Gsg==", + "license": "MIT", + "engines": { + "node": ">= 0.4.0" + } + }, "node_modules/next": { "version": "14.2.30", "resolved": "https://registry.npmjs.org/next/-/next-14.2.30.tgz", @@ -4758,7 +5222,6 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "dev": true, "license": "ISC", "dependencies": { "wrappy": "1" @@ -4809,12 +5272,74 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/pac-proxy-agent": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/pac-proxy-agent/-/pac-proxy-agent-7.2.0.tgz", + "integrity": "sha512-TEB8ESquiLMc0lV8vcd5Ql/JAKAoyzHFXaStwjkzpOpC5Yv+pIzLfHvjTSdf3vpa2bMiUQrg9i6276yn8666aA==", + "license": "MIT", + "dependencies": { + "@tootallnate/quickjs-emscripten": "^0.23.0", + "agent-base": "^7.1.2", + "debug": "^4.3.4", + "get-uri": "^6.0.1", + "http-proxy-agent": "^7.0.0", + "https-proxy-agent": "^7.0.6", + "pac-resolver": "^7.0.1", + "socks-proxy-agent": "^8.0.5" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/pac-resolver": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/pac-resolver/-/pac-resolver-7.0.1.tgz", + "integrity": "sha512-5NPgf87AT2STgwa2ntRMr45jTKrYBGkVU36yT0ig/n/GMAa3oPqhZfIQ2kMEimReg0+t9kZViDVZ83qfVUlckg==", + "license": "MIT", + "dependencies": { + "degenerator": "^5.0.0", + "netmask": "^2.0.2" + }, + "engines": { + "node": ">= 14" + } + }, "node_modules/package-json-from-dist": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", "license": "BlueOak-1.0.0" }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "license": "MIT", + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/path-key": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", @@ -4846,11 +5371,16 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/path-scurry/node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "license": "ISC" + }, "node_modules/pend": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==", - "dev": true, "license": "MIT" }, "node_modules/performance-now": { @@ -5040,6 +5570,15 @@ "node": ">= 0.6.0" } }, + "node_modules/progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/prop-types": { "version": "15.8.1", "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", @@ -5264,6 +5803,31 @@ "prosemirror-transform": "^1.1.0" } }, + "node_modules/proxy-agent": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-6.5.0.tgz", + "integrity": "sha512-TmatMXdr2KlRiA2CyDu8GqR8EjahTG3aY3nXjdzFyoZbmB8hrBsTyMezhULIXKnC0jpfjlmiZ3+EaCzoInSu/A==", + "license": "MIT", + "dependencies": { + "agent-base": "^7.1.2", + "debug": "^4.3.4", + "http-proxy-agent": "^7.0.1", + "https-proxy-agent": "^7.0.6", + "lru-cache": "^7.14.1", + "pac-proxy-agent": "^7.1.0", + "proxy-from-env": "^1.1.0", + "socks-proxy-agent": "^8.0.5" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/proxy-agent/node_modules/proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", + "license": "MIT" + }, "node_modules/proxy-from-env": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.0.0.tgz", @@ -5275,7 +5839,6 @@ "version": "3.0.3", "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.3.tgz", "integrity": "sha512-todwxLMY7/heScKmntwQG8CXVkWUOdYxIvY2s0VWAAMh/nd8SoYiRaKjlr7+iCs984f2P8zvrfWcDDYVb73NfA==", - "dev": true, "license": "MIT", "dependencies": { "end-of-stream": "^1.1.0", @@ -5291,6 +5854,44 @@ "node": ">=6" } }, + "node_modules/puppeteer": { + "version": "24.13.0", + "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-24.13.0.tgz", + "integrity": "sha512-3dpT7LIdlRBJBGKb7SjJeno/C3cl0bBpgwie+cxvf8PKmK502QdRU9TT/hvfchyFG7BzJKBHPxK5Boholx7zow==", + "hasInstallScript": true, + "license": "Apache-2.0", + "dependencies": { + "@puppeteer/browsers": "2.10.5", + "chromium-bidi": "7.1.0", + "cosmiconfig": "^9.0.0", + "devtools-protocol": "0.0.1464554", + "puppeteer-core": "24.13.0", + "typed-query-selector": "^2.12.0" + }, + "bin": { + "puppeteer": "lib/cjs/puppeteer/node/cli.js" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/puppeteer-core": { + "version": "24.13.0", + "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-24.13.0.tgz", + "integrity": "sha512-2Mr1zFCMfAJpKN5mRGqDAmwVEtS6qsalLnUZJn1uJxMdbZLMiqNuMf12gDmZGizg0CjvcfXxoaJhEZB8W0DXlw==", + "license": "Apache-2.0", + "dependencies": { + "@puppeteer/browsers": "2.10.5", + "chromium-bidi": "7.1.0", + "debug": "^4.4.1", + "devtools-protocol": "0.0.1464554", + "typed-query-selector": "^2.12.0", + "ws": "^8.18.3" + }, + "engines": { + "node": ">=18" + } + }, "node_modules/qs": { "version": "6.14.0", "resolved": "https://registry.npmjs.org/qs/-/qs-6.14.0.tgz", @@ -5559,6 +6160,15 @@ "throttleit": "^1.0.0" } }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/reselect": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/reselect/-/reselect-5.1.1.tgz", @@ -5585,6 +6195,15 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, "node_modules/restore-cursor": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", @@ -5696,7 +6315,6 @@ "version": "7.7.2", "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", - "dev": true, "license": "ISC", "bin": { "semver": "bin/semver.js" @@ -5824,6 +6442,44 @@ "node": ">=8" } }, + "node_modules/smart-buffer": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", + "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", + "license": "MIT", + "engines": { + "node": ">= 6.0.0", + "npm": ">= 3.0.0" + } + }, + "node_modules/socks": { + "version": "2.8.6", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.6.tgz", + "integrity": "sha512-pe4Y2yzru68lXCb38aAqRf5gvN8YdjP1lok5o0J7BOHljkyCGKVz7H3vpVIXKD27rj2giOJ7DwVyk/GWrPHDWA==", + "license": "MIT", + "dependencies": { + "ip-address": "^9.0.5", + "smart-buffer": "^4.2.0" + }, + "engines": { + "node": ">= 10.0.0", + "npm": ">= 3.0.0" + } + }, + "node_modules/socks-proxy-agent": { + "version": "8.0.5", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-8.0.5.tgz", + "integrity": "sha512-HehCEsotFqbPW9sJ8WVYB6UbmIMv7kUUORIF2Nncq4VQvBfNBLibW9YZR5dlYCSUhwcD628pRllm7n+E+YTzJw==", + "license": "MIT", + "dependencies": { + "agent-base": "^7.1.2", + "debug": "^4.3.4", + "socks": "^2.8.3" + }, + "engines": { + "node": ">= 14" + } + }, "node_modules/sonner": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/sonner/-/sonner-2.0.6.tgz", @@ -5834,6 +6490,16 @@ "react-dom": "^18.0.0 || ^19.0.0 || ^19.0.0-rc" } }, + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "license": "BSD-3-Clause", + "optional": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/source-map-js": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", @@ -5843,6 +6509,12 @@ "node": ">=0.10.0" } }, + "node_modules/sprintf-js": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz", + "integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==", + "license": "BSD-3-Clause" + }, "node_modules/sshpk": { "version": "1.18.0", "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.18.0.tgz", @@ -5869,6 +6541,13 @@ "node": ">=0.10.0" } }, + "node_modules/sshpk/node_modules/jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==", + "dev": true, + "license": "MIT" + }, "node_modules/streamsearch": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz", @@ -5877,6 +6556,19 @@ "node": ">=10.0.0" } }, + "node_modules/streamx": { + "version": "2.22.1", + "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.22.1.tgz", + "integrity": "sha512-znKXEBxfatz2GBNK02kRnCXjV+AA4kjZIUxeWSr3UGirZMJfTE9uiwKHobnbgxWyL/JWro8tTq+vOqAK1/qbSA==", + "license": "MIT", + "dependencies": { + "fast-fifo": "^1.3.2", + "text-decoder": "^1.1.0" + }, + "optionalDependencies": { + "bare-events": "^2.2.0" + } + }, "node_modules/string-width": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", @@ -6164,6 +6856,40 @@ "node": ">=4" } }, + "node_modules/tar-fs": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.1.0.tgz", + "integrity": "sha512-5Mty5y/sOF1YWj1J6GiBodjlDc05CUR8PKXrsnFAiSG0xA+GHeWLovaZPYUDXkH/1iKRf2+M5+OrRgzC7O9b7w==", + "license": "MIT", + "dependencies": { + "pump": "^3.0.0", + "tar-stream": "^3.1.5" + }, + "optionalDependencies": { + "bare-fs": "^4.0.1", + "bare-path": "^3.0.0" + } + }, + "node_modules/tar-stream": { + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-3.1.7.tgz", + "integrity": "sha512-qJj60CXt7IU1Ffyc3NJMjh6EkuCFej46zUqJ4J7pqYlThyd9bO0XBTmcOIhSzZJVWfsLks0+nle/j538YAW9RQ==", + "license": "MIT", + "dependencies": { + "b4a": "^1.6.4", + "fast-fifo": "^1.2.0", + "streamx": "^2.15.0" + } + }, + "node_modules/text-decoder": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/text-decoder/-/text-decoder-1.2.3.tgz", + "integrity": "sha512-3/o9z3X0X0fTupwsYvR03pJ/DjWuqqrfwBgTQzdWDiQSm9KitAyz/9WqsT2JQW7KV2m+bC2ol/zqpW37NHxLaA==", + "license": "Apache-2.0", + "dependencies": { + "b4a": "^1.6.4" + } + }, "node_modules/thenify": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", @@ -6364,11 +7090,17 @@ "node": ">=8" } }, + "node_modules/typed-query-selector": { + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/typed-query-selector/-/typed-query-selector-2.12.0.tgz", + "integrity": "sha512-SbklCd1F0EiZOyPiW192rrHZzZ5sBijB6xM+cpmrwDqObvdtunOHHIk9fCGsoK5JVIYXoyEp4iEdE3upFH3PAg==", + "license": "MIT" + }, "node_modules/typescript": { "version": "5.8.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz", "integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==", - "dev": true, + "devOptional": true, "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", @@ -6388,7 +7120,7 @@ "version": "6.21.0", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", - "dev": true, + "devOptional": true, "license": "MIT" }, "node_modules/universalify": { @@ -6541,7 +7273,6 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, "license": "MIT", "dependencies": { "ansi-styles": "^4.0.0", @@ -6577,9 +7308,38 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "dev": true, "license": "ISC" }, + "node_modules/ws": { + "version": "8.18.3", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.3.tgz", + "integrity": "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg==", + "license": "MIT", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "license": "ISC", + "engines": { + "node": ">=10" + } + }, "node_modules/yaml": { "version": "2.8.0", "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.0.tgz", @@ -6592,11 +7352,37 @@ "node": ">= 14.6" } }, + "node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "license": "MIT", + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, "node_modules/yauzl": { "version": "2.10.0", "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", - "dev": true, "license": "MIT", "dependencies": { "buffer-crc32": "~0.2.3", @@ -6604,22 +7390,13 @@ } }, "node_modules/zod": { - "version": "3.25.76", - "resolved": "https://registry.npmjs.org/zod/-/zod-3.25.76.tgz", - "integrity": "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==", + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/zod/-/zod-4.0.5.tgz", + "integrity": "sha512-/5UuuRPStvHXu7RS+gmvRf4NXrNxpSllGwDnCBcJZtQsKrviYXm54yDGV2KYNLT5kq0lHGcl7lqWJLgSaG+tgA==", "license": "MIT", "funding": { "url": "https://github.com/sponsors/colinhacks" } - }, - "node_modules/zod-to-json-schema": { - "version": "3.24.6", - "resolved": "https://registry.npmjs.org/zod-to-json-schema/-/zod-to-json-schema-3.24.6.tgz", - "integrity": "sha512-h/z3PKvcTcTetyjl1fkj79MHNEjm+HpD6NXheWjzOekY7kV+lwDYnHw+ivHkijnCSMz1yJaWBD9vu/Fcmk+vEg==", - "license": "ISC", - "peerDependencies": { - "zod": "^3.24.1" - } } } } diff --git a/servers/nextjs/package.json b/servers/nextjs/package.json index f25ec232..972ab49a 100644 --- a/servers/nextjs/package.json +++ b/servers/nextjs/package.json @@ -47,6 +47,7 @@ "marked": "^15.0.11", "next": "^14.2.14", "next-themes": "^0.4.6", + "puppeteer": "^24.13.0", "react": "^18", "react-dom": "^18", "react-redux": "^9.1.2", @@ -56,8 +57,7 @@ "tailwind-scrollbar-hide": "^2.0.0", "tailwindcss-animate": "^1.0.7", "tiptap-markdown": "^0.8.10", - "zod": "^3.25.76", - "zod-to-json-schema": "^3.24.6" + "zod": "^4.0.5" }, "devDependencies": { "@types/animejs": "^3.1.12", @@ -71,5 +71,8 @@ }, "overrides": { "brace-expansion": "2.0.2" + }, + "peerDependencies": { + "zod": "^4.0.5" } } From e6b69229e3badce376c7886766b3fadc5c350826 Mon Sep 17 00:00:00 2001 From: shiva raj badu Date: Wed, 16 Jul 2025 18:09:41 +0545 Subject: [PATCH 2/2] fix(Nextjs/outlines): Outline body streaming --- .../components/MarkdownEditor.tsx | 9 +++++++++ .../outline/components/OutlineItem.tsx | 1 + .../outline/components/OutlinePage.tsx | 1 - 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/servers/nextjs/app/(presentation-generator)/components/MarkdownEditor.tsx b/servers/nextjs/app/(presentation-generator)/components/MarkdownEditor.tsx index 545aa09b..556e207d 100644 --- a/servers/nextjs/app/(presentation-generator)/components/MarkdownEditor.tsx +++ b/servers/nextjs/app/(presentation-generator)/components/MarkdownEditor.tsx @@ -1,8 +1,10 @@ import { useEditor, EditorContent } from "@tiptap/react" import StarterKit from "@tiptap/starter-kit" import { Markdown } from "tiptap-markdown" +import { useEffect } from "react" export default function MarkdownEditor({ content, onChange }: { content: string; onChange: (content: string) => void }) { + const editor = useEditor({ extensions: [StarterKit, Markdown], content: content, @@ -18,6 +20,13 @@ export default function MarkdownEditor({ content, onChange }: { content: string; immediatelyRender: false, }); + // Update editor content when the content prop changes (for streaming) + useEffect(() => { + if (editor && content !== editor.storage.markdown.getMarkdown()) { + editor.commands.setContent(content); + } + }, [content, editor]); + return (
diff --git a/servers/nextjs/app/(presentation-generator)/outline/components/OutlineItem.tsx b/servers/nextjs/app/(presentation-generator)/outline/components/OutlineItem.tsx index 1c18a134..d9283452 100644 --- a/servers/nextjs/app/(presentation-generator)/outline/components/OutlineItem.tsx +++ b/servers/nextjs/app/(presentation-generator)/outline/components/OutlineItem.tsx @@ -95,6 +95,7 @@ export function OutlineItem({ {/* Editable Markdown Content */} handleSlideChange({ ...slideOutline, body: content })} /> diff --git a/servers/nextjs/app/(presentation-generator)/outline/components/OutlinePage.tsx b/servers/nextjs/app/(presentation-generator)/outline/components/OutlinePage.tsx index 33a7104b..2e72dac4 100644 --- a/servers/nextjs/app/(presentation-generator)/outline/components/OutlinePage.tsx +++ b/servers/nextjs/app/(presentation-generator)/outline/components/OutlinePage.tsx @@ -85,7 +85,6 @@ const OutlinePage = () => { try { const repairedJson = jsonrepair(accumulatedChunks); const partialData = JSON.parse(repairedJson); - if (partialData.slides) { dispatch(setOutlines(partialData.slides)); setLoading(false);