export type AppId = "word" | "sheets" | "slides" | "mail"; export interface WordDocument { id: string; title: string; updatedAt: string; html: string; } export interface Workbook { id: string; title: string; updatedAt: string; activeSheet: string; sheets: Sheet[]; } export interface Sheet { id: string; name: string; cells: Record; mergedCells?: MergedCellRange[]; hyperlinks?: Record; cellFormats?: Record; charts?: SheetChart[]; } export interface CellFormat { bold?: boolean; italics?: boolean; underline?: boolean; fontSize?: number; textColor?: string; fillColor?: string; horizontalAlign?: "left" | "center" | "right"; numberFormat?: string; } export interface MergedCellRange { start: string; end: string; } export type SheetChartType = "bar" | "line" | "pie"; export interface SheetChart { id: string; type: SheetChartType; title: string; labelRange: string; valueRange: string; } export interface SlideDeck { id: string; title: string; updatedAt: string; activeSlideId: string; slides: Slide[]; } export interface Slide { id: string; title: string; subtitle: string; notes: string; theme: "classic" | "ocean" | "graphite"; backgroundColor?: string; titleColor?: string; titleFontSize?: number; subtitleColor?: string; subtitleFontSize?: number; images?: SlideImage[]; } export interface SlideImage { id: string; src: string; alt?: string; x: number; y: number; width: number; height: number; } export interface MailAttachment { id: string; fileName: string; contentType: string; size: number; contentBase64: string; disposition: "attachment" | "inline"; contentId?: string; } export interface MailMessage { id: string; folder: "inbox" | "sent" | "drafts" | "archive"; from: string; to: string; cc?: string; bcc?: string; subject: string; body: string; time: string; read: boolean; flagged: boolean; attachments?: MailAttachment[]; } export interface QOfficeState { activeApp: AppId; word: WordDocument; workbook: Workbook; deck: SlideDeck; mail: { activeFolder: MailMessage["folder"]; activeMessageId: string; messages: MailMessage[]; }; }