UNPKG

@juspay/neurolink

Version:

The pipe layer of an AI nervous system: one interface connecting provider neurons to your application, across three inference types — generate, stream and decide. `decide` returns typed, calibrated judgements from a non-generative model (~400ms, ~$0.00002

57 lines (56 loc) • 2.06 kB
/** * PPT Slide Generator * * Generates individual complete slides with content, images, and layout. * Uses existing NeuroLink image generation capabilities and pptxgenjs for slide creation. * * Architecture: * - Receives SlideSchema from ContentPlanner * - Generates AI images for applicable slide types * - Creates pptxgenjs slides with proper layouts * - Returns CompleteSlide objects ready for assembly * * @module presentation/slideGenerator */ import type { SlideSchema, CompleteSlide, PptxPresentation, PptxSlide, SlideGeneratorConfig, SlideGenerationBatchResult } from "../../types/index.js"; export declare function loadPptxGenJS(): Promise<new () => PptxPresentation>; /** * Generates individual slides with content, images, and proper layouts */ export declare class SlideGenerator { private theme; private config; private neurolink; private imageLimit; private userImageIndex; constructor(config: SlideGeneratorConfig); /** * Get next user-provided image (cycles through available images) */ private getNextUserImage; /** * Load user image to Buffer */ private loadUserImage; /** * Generate a single complete slide */ generateSlide(slideSchema: SlideSchema): Promise<CompleteSlide>; /** * Generate multiple slides in parallel (with concurrency limit) */ generateSlides(schemas: SlideSchema[]): Promise<SlideGenerationBatchResult>; /** * Render a CompleteSlide to a pptxgenjs slide */ renderSlide(ppt: PptxPresentation, completeSlide: CompleteSlide, slideNumber: number, totalSlides: number): PptxSlide; private generateImage; private applyBackground; private applyLayout; private getLogoConfig; private getLogoDataUri; private addLogo; private addSlideNumber; } export declare function createSlideGenerator(config: SlideGeneratorConfig): SlideGenerator; export declare function generateSlidesFromPlan(schemas: SlideSchema[], config: SlideGeneratorConfig): Promise<SlideGenerationBatchResult>;