/** * Presentation Domain Types * Defines presentation-specific data structures for slides, layouts, and animations */ import type { Timestamp, UUID } from './common'; /** * Presentation document */ export interface Presentation { id: UUID; documentId: UUID; slides: Slide[]; theme: Theme; masterSlides: MasterSlide[]; transitionSettings: TransitionSettings; slideShowSettings: SlideShowSettings; } /** * Slide in presentation */ export interface Slide { id: UUID; presentationId: UUID; order: number; layout: SlideLayout; masterSlideId?: UUID; elements: SlideElement[]; notes?: SlideNotes; speaker?: SpeakerNotes; background?: SlideBackground; transitions?: SlideTransition[]; animationOrder?: UUID[]; hidden: boolean; duration?: number; } /** * Slide layout type */ export type SlideLayout = 'blank' | 'title' | 'title-and-content' | 'title-only' | 'two-column' | 'comparison' | 'section' | 'custom'; /** * Master slide template */ export interface MasterSlide { id: UUID; presentationId: UUID; name: string; layout: SlideLayout; elements: SlideElement[]; placeholders: Placeholder[]; } /** * Placeholder on master slide */ export interface Placeholder { id: UUID; type: 'title' | 'subtitle' | 'body' | 'date' | 'slide-number' | 'footer' | 'custom'; x: number; y: number; width: number; height: number; format?: TextFormat; } /** * Element on slide (shape, text, image, video, etc) */ export type SlideElement = TextElement | ShapeElement | ImageElement | VideoElement | TableElement | ChartElement | OleObjectElement; /** * Text element */ export interface TextElement { id: UUID; type: 'text'; text: string; position: Position; size: Size; format: TextFormat; rotation: number; shadow?: Shadow; reflection?: Reflection; glowEffect?: GlowEffect; zIndex: number; locked: boolean; } /** * Shape element */ export interface ShapeElement { id: UUID; type: 'shape'; shape: ShapeType; position: Position; size: Size; fill: Fill; stroke: Stroke; rotation: number; shadow?: Shadow; reflection?: Reflection; glowEffect?: GlowEffect; text?: string; textFormat?: TextFormat; zIndex: number; locked: boolean; } /** * Shape type */ export type ShapeType = 'rectangle' | 'rounded-rectangle' | 'circle' | 'ellipse' | 'triangle' | 'pentagon' | 'hexagon' | 'octagon' | 'line' | 'arrow' | 'double-arrow' | 'connector' | 'callout' | 'banner' | 'star' | 'wave' | 'custom'; /** * Image element */ export interface ImageElement { id: UUID; type: 'image'; url: string; position: Position; size: Size; altText?: string; rotation: number; shadow?: Shadow; reflection?: Reflection; glowEffect?: GlowEffect; crop?: ImageCrop; filters?: ImageFilter[]; zIndex: number; locked: boolean; } /** * Image crop configuration */ export interface ImageCrop { left: number; top: number; right: number; bottom: number; } /** * Image filter (effect) */ export interface ImageFilter { type: 'brightness' | 'contrast' | 'saturation' | 'blur' | 'grayscale' | 'sepia'; value: number; } /** * Video element */ export interface VideoElement { id: UUID; type: 'video'; url: string; position: Position; size: Size; thumbnail?: string; autoPlay: boolean; loop: boolean; muted: boolean; volume: number; startTime: number; endTime: number; zIndex: number; locked: boolean; } /** * Table element */ export interface TableElement { id: UUID; type: 'table'; position: Position; rows: TableRow[]; columns: number; cellStyle?: TableCellStyle; headerStyle?: TableCellStyle; alternateRowColor?: boolean; zIndex: number; locked: boolean; } /** * Table row */ export interface TableRow { cells: TableCell[]; height: number; } /** * Table cell */ export interface TableCell { content: string; format?: TextFormat; columnSpan?: number; rowSpan?: number; } /** * Table cell styling */ export interface TableCellStyle { backgroundColor: string; borderColor: string; borderWidth: number; padding: number; textFormat?: TextFormat; } /** * Chart element */ export interface ChartElement { id: UUID; type: 'chart'; position: Position; size: Size; chartType: 'bar' | 'line' | 'pie' | 'area' | 'scatter' | 'column'; data: ChartData[]; title?: string; legend?: boolean; zIndex: number; locked: boolean; } /** * Chart data series */ export interface ChartData { name: string; values: number[]; } /** * OLE Object (embedded object like Excel) */ export interface OleObjectElement { id: UUID; type: 'ole-object'; position: Position; size: Size; objectType: string; data: Blob; zIndex: number; locked: boolean; } /** * Position on slide */ export interface Position { x: number; y: number; } /** * Size dimensions */ export interface Size { width: number; height: number; } /** * Text formatting */ export interface TextFormat { fontFamily: string; fontSize: number; fontWeight: 'normal' | 'bold'; fontStyle: 'normal' | 'italic'; textDecoration: 'none' | 'underline' | 'line-through'; color: string; backgroundColor?: string; alignment: 'left' | 'center' | 'right' | 'justify'; lineHeight: number; letterSpacing: number; } /** * Fill style */ export interface Fill { type: 'solid' | 'gradient' | 'pattern' | 'image' | 'none'; color?: string; gradient?: Gradient; image?: string; transparency: number; } /** * Gradient fill */ export interface Gradient { type: 'linear' | 'radial' | 'path'; angle: number; stops: GradientStop[]; } /** * Gradient stop */ export interface GradientStop { position: number; color: string; } /** * Stroke (border/outline) */ export interface Stroke { width: number; color: string; style: 'solid' | 'dashed' | 'dotted' | 'double'; dashPattern?: number[]; } /** * Shadow effect */ export interface Shadow { type: 'drop' | 'inner' | 'perspective' | 'reflection'; offsetX: number; offsetY: number; blur: number; color: string; opacity: number; } /** * Reflection effect */ export interface Reflection { transparency: number; distance: number; blur: number; intensity: number; } /** * Glow effect */ export interface GlowEffect { color: string; blur: number; opacity: number; } /** * Slide notes */ export interface SlideNotes { content: string; format: 'plain-text' | 'rich-text'; createdAt: Timestamp; updatedAt: Timestamp; } /** * Speaker notes */ export interface SpeakerNotes { content: string; hiddenFromViewer: boolean; } /** * Slide background */ export interface SlideBackground { type: 'color' | 'gradient' | 'image' | 'master'; color?: string; gradient?: Gradient; image?: string; } /** * Slide transition */ export interface SlideTransition { id: UUID; type: TransitionType; duration: number; delay: number; direction?: TransitionDirection; speed: 'slow' | 'medium' | 'fast'; } /** * Transition type */ export type TransitionType = 'none' | 'fade' | 'push' | 'wipe' | 'cover' | 'uncover' | 'split' | 'wheel' | 'clock' | 'zoom' | 'checkerboard' | 'comb' | 'random'; /** * Transition direction */ export type TransitionDirection = 'up' | 'down' | 'left' | 'right' | 'up-left' | 'up-right' | 'down-left' | 'down-right'; /** * Animation on element */ export interface Animation { id: UUID; elementId: UUID; type: AnimationType; duration: number; delay: number; repeatCount: number; autoReverse: boolean; easing: EasingFunction; properties: Record; } /** * Animation type */ export type AnimationType = 'entrance' | 'emphasis' | 'exit' | 'motion-path' | 'custom'; /** * Specific animation effects */ export type AnimationEffect = 'appear' | 'fade-in' | 'fly-in' | 'slide-in' | 'grow' | 'split' | 'wheel' | 'wipe' | 'zoom' | 'pulse' | 'color-pulse' | 'spin' | 'glow' | 'shine' | 'disappear' | 'fade-out' | 'fly-out' | 'slide-out' | 'shrink'; /** * Easing function */ export type EasingFunction = 'linear' | 'ease-in' | 'ease-out' | 'ease-in-out' | 'cubic-bezier'; /** * Presentation theme */ export interface Theme { id: UUID; name: string; colors: ThemeColors; fonts: ThemeFonts; effects: ThemeEffects; } /** * Theme color palette */ export interface ThemeColors { primary: string; secondary: string; accent1: string; accent2: string; accent3: string; accent4: string; accent5: string; accent6: string; dark1: string; dark2: string; light1: string; light2: string; } /** * Theme fonts */ export interface ThemeFonts { titleFont: string; bodyFont: string; accentFont?: string; } /** * Theme effects */ export interface ThemeEffects { shadow?: Shadow; reflection?: Reflection; glow?: GlowEffect; } /** * Transition settings for presentation */ export interface TransitionSettings { defaultTransition: TransitionType; defaultDuration: number; applyToAllSlides: boolean; advanceSlideManually: boolean; advanceSlideAfter?: number; } /** * Slide show settings */ export interface SlideShowSettings { startFrom: number; endWith: number; loop: boolean; showNotes: boolean; advanceSlideManually: boolean; useTimings: boolean; fullScreen: boolean; showMousePointer: boolean; penColor?: string; laserColor?: string; } /** * Type guard for text element */ export declare function isTextElement(element: SlideElement): element is TextElement; /** * Type guard for shape element */ export declare function isShapeElement(element: SlideElement): element is ShapeElement; /** * Type guard for image element */ export declare function isImageElement(element: SlideElement): element is ImageElement; /** * Type guard for video element */ export declare function isVideoElement(element: SlideElement): element is VideoElement; //# sourceMappingURL=presentation.d.ts.map