UNPKG

@juspay/neurolink

Version:

Universal AI Development Platform with working MCP integration, multi-provider support, voice (TTS/STT/realtime), and professional CLI. 58+ external MCP servers discoverable, multimodal file processing, RAG pipelines. Build, test, and deploy AI applicatio

122 lines (121 loc) 5.57 kB
/** * PPT Generation Constants * * Contains theme definitions, layout configs, and AI prompt templates * for presentation generation. */ import type { PromptTier, PPTModelInfo, BuildContentPlanningPromptOptions, BulletStyle, SlideFormattingConfig, PresentationTheme, SlideType, SlideLayout } from "../../types/index.js"; /** * Built-in theme registry * Each theme defines colors, fonts, and styling for the presentation */ export declare const THEMES: Record<string, PresentationTheme>; /** * Get theme by name with fallback to modern */ export declare function getTheme(themeName: string): PresentationTheme; /** * Map slide types to recommended layouts * First layout in array is the default */ export declare const SLIDE_TYPE_TO_LAYOUT: Record<SlideType, SlideLayout[]>; /** * Get recommended layout for slide type */ export declare function getLayoutForType(slideType: SlideType, hasImage?: boolean, preferredLayout?: SlideLayout): SlideLayout; /** * Slide type categories for AI content planning */ export declare const SLIDE_TYPE_CATEGORIES: { opening: SlideType[]; closing: SlideType[]; content: SlideType[]; visual: SlideType[]; data: SlideType[]; layout: SlideType[]; special: SlideType[]; }; /** * Slide types that use native pptxgenjs diagrams/shapes instead of AI-generated images. * These are rendered using addShape, addTable, addChart etc. - no image generation needed. * * The AI should set imagePrompt: null for these slide types. */ export declare const DIAGRAM_SLIDE_TYPES: Set<SlideType>; /** * Slide types that benefit from AI-generated background/decorative images */ export declare const IMAGE_SLIDE_TYPES: Set<SlideType>; /** * Check if a slide type should use native diagram rendering (no AI image needed) */ export declare function isDiagramSlideType(type: SlideType): boolean; /** * Check if a slide type benefits from AI image generation */ export declare function isImageSlideType(type: SlideType): boolean; /** * Theme-specific design guidelines for the AI */ export declare const THEME_GUIDELINES: Record<string, string>; /** * Audience-specific content guidelines for the AI */ export declare const AUDIENCE_GUIDELINES: Record<string, string>; /** * Tone-specific writing guidelines for the AI */ export declare const TONE_GUIDELINES: Record<string, string>; /** * Detect prompt tier based on model name */ export declare function getPromptTier(modelInfo: PPTModelInfo): PromptTier; /** * System prompt for content planning AI */ export declare const CONTENT_PLANNING_SYSTEM_PROMPT = "You are an expert presentation designer and content strategist. Your task is to create a detailed, structured content plan for a presentation based on the given topic and requirements.\n\nYou must output ONLY valid JSON with no additional text, markdown formatting, or explanation.\n\nCRITICAL RULES:\n1. Each slide MUST have a clear, specific title (not generic like \"Slide 2\")\n2. Content bullets should be concise (max 10 words each)\n3. Maximum 5-6 bullets per slide for readability\n4. Image prompts should describe VISUAL scenes without any text in the image\n5. Speaker notes should provide detailed talking points for the presenter\n6. First slide is always type \"title\", last slide is always type \"closing\"\n7. Include an \"agenda\" slide as slide 2 for presentations with 8+ slides\n8. Create visual variety: mix content, data, quote, and image slides\n9. For data slides, provide realistic sample data that matches the topic\n10. Use statistics slides for key metrics, chart slides for trends/comparisons\n11. Include at least one quote slide for impact\n12. Use section-header slides to break up long presentations (15+ slides)\n13. Title and closing slides should be clean and simple"; /** * Build the user prompt for content planning * Modular design: each section is a separate constant for easy debugging/changes */ export declare function buildContentPlanningPrompt(options: BuildContentPlanningPromptOptions): string; /** * Enhance an image prompt for better AI image generation */ export declare function enhanceImagePrompt(prompt: string, theme: string): string; export declare const MIN_PAGES = 5; export declare const MAX_PAGES = 50; export declare const MIN_TOPIC_LENGTH = 10; export declare const MAX_TOPIC_LENGTH = 5000; export declare const VALID_THEMES: string[]; export declare const VALID_AUDIENCES: string[]; export declare const VALID_TONES: string[]; export declare const VALID_ASPECT_RATIOS: string[]; /** * Default formatting config per slide type * AI can override these by specifying formatting in content */ export declare const SLIDE_TYPE_FORMATTING: Record<string, SlideFormattingConfig & { bulletStyle: BulletStyle; }>; /** * Get formatting config for a slide type */ export declare function getSlideTypeFormatting(slideType: string): SlideFormattingConfig & { bulletStyle: BulletStyle; }; /** * Map BulletStyle to pptxgenjs bullet options */ export declare function getBulletOptions(style: BulletStyle): { type?: "bullet" | "number"; code?: string; } | boolean; /** Timeout for content planning AI call (60 seconds) */ export declare const CONTENT_PLANNING_TIMEOUT_MS = 60000; /** Timeout for image generation per slide (30 seconds) */ export declare const IMAGE_GENERATION_TIMEOUT_MS = 30000; /** Maximum concurrent image generations */ export declare const MAX_CONCURRENT_IMAGE_GENERATIONS = 5; /** Total timeout for entire PPT generation (5 minutes) */ export declare const PPT_GENERATION_TIMEOUT_MS = 300000;