import React from 'react'; type ElementType = 'text' | 'image' | 'shape'; type ShapeType = 'rect' | 'ellipse' | 'triangle' | 'rightTriangle' | 'rhombus' | 'parallelogram' | 'trapezoid' | 'pentagon' | 'hexagon' | 'heptagon' | 'octagon' | 'heart' | 'smiley' | 'sun' | 'moon' | 'arrowRight' | 'arrowLeft' | 'arrowUp' | 'arrowDown' | 'arrowLeftRight' | 'arrowUpDown' | 'star4' | 'star5' | 'star6' | 'star8' | 'cloud' | 'lightning' | 'plus' | 'minus' | 'multiply' | 'divide' | 'equal' | 'line'; type PresentationSource = 'scratch' | 'uploaded' | 'url'; interface BaseElement { id: string; type: ElementType; x: number; y: number; width: number; height: number; zIndex: number; opacity?: number; } interface TextElement extends BaseElement { type: 'text'; content: string; fontSize: number; fontFamily: string; color: string; highlightColor?: string; isBold?: boolean; isItalic?: boolean; isUnderline?: boolean; isStrikethrough?: boolean; hasShadow?: boolean; charSpacing?: number; listType?: string; textAlign?: 'left' | 'center' | 'right' | 'justify'; isBulleted?: boolean; isNumbered?: boolean; } interface ImageElement extends BaseElement { type: 'image'; src: string; } interface ShapeElement extends BaseElement { type: 'shape'; shapeType: ShapeType; fill: string; stroke?: string; strokeWidth?: number; } type SlideElement = TextElement | ImageElement | ShapeElement; interface Slide { id: string; elements: SlideElement[]; } interface Presentation { slides: Slide[]; layout?: { width: number; height: number; }; } interface PptEditorProps { initialPresentation?: Presentation; url?: string; appName?: string; onChange?: (presentation: Presentation) => void; geminiApiKey?: string; width: number | string; height: number | string; appBgColor?: string; showHomeOnEmpty?: boolean; initialSource?: PresentationSource; onSourceChange?: (source: PresentationSource, url?: string) => void; proxyUrl?: string; onGenerateImage?: (prompt: string) => Promise; onGenerateInfographic?: (prompt: string) => Promise; onAiRewrite?: (text: string) => Promise; onAiGrammar?: (text: string) => Promise; onAiShorten?: (text: string) => Promise; onAiLengthen?: (text: string) => Promise; onAiContinue?: (text: string) => Promise; isTwoStepInfographicGeneration?: boolean; onRefineInfographicPrompt?: (text: string) => Promise; onRefineShorten?: (text: string) => Promise; onRefineReframe?: (text: string) => Promise; onRefineLengthen?: (text: string) => Promise; onAiEdit?: (text: string, prompt: string) => Promise; /** * Optional custom fetcher for presentation files. * Useful for fetching large files via pre-signed URLs to avoid 413 Payload Too Large errors. * If provided, this function handles the fetching instead of the default proxy/fetch logic. */ fetchPresentation?: (url: string) => Promise; } declare const PptEditor: React.FC; declare class PptxParser { private slideWidth; private slideHeight; private readonly CANVAS_WIDTH; private readonly CANVAS_HEIGHT; parse(input: File | Blob | ArrayBuffer | string): Promise; private getAttr; private findFirstByLocalName; private findAllByLocalName; private scaleX; private scaleY; private parseColor; private resolveImage; private parseSlide; } declare class PptxExporter { export(presentation: Presentation): Promise; } /** * A standalone service to convert a Presentation object into a .pptx Blob. * Use this for background processing, S3 uploads, or other non-UI tasks. * * This replicates the logic from PptxExporter but returns a Blob instead of * triggering a browser download. */ declare class PptxBlobExporter { /** * Converts a Presentation object into a .pptx Blob. * @param presentation The presentation data to export. * @returns A Promise that resolves to a Blob containing the .pptx file. */ exportToBlob(presentation: Presentation): Promise; } export { type BaseElement, type ElementType, type ImageElement, PptEditor, PptxBlobExporter, PptxExporter, PptxParser, type Presentation, type PresentationSource, type ShapeElement, type ShapeType, type Slide, type SlideElement, type TextElement };