-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathtypes.ts
More file actions
73 lines (65 loc) · 2.23 KB
/
Copy pathtypes.ts
File metadata and controls
73 lines (65 loc) · 2.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
export interface KnowledgeCardData {
id: string;
title: string;
goldSentence: string;
originalContext: string;
chapterId: string; // Link to the chapter
chapterTitle?: string; // Display name
aiImageUrl?: string; // If a custom AI image is generated
podcastScript?: string; // Xiaohongshu style note/script
podcastAudioUrl?: string; // Blob URL for the generated audio (Runtime only)
audioBase64?: string; // Persisted base64 string of the WAV file
}
export interface Chapter {
id: string;
title: string; // e.g., "Chapter 1: The Beginning"
startPage: number;
endPage: number;
summary?: string; // Short summary of the chapter
}
export interface AddCardResult {
success: boolean;
card?: KnowledgeCardData;
reason?: string; // Why it failed (e.g., "Content exhausted")
}
export interface SavedProject {
id: string;
title: string;
lastModified: number;
cards: KnowledgeCardData[];
chapters: Chapter[];
fullText: string; // We save the text so we can add cards later without re-uploading
bookSummary?: string; // Persisted Whole Book Note
bookSummaryAudioBase64?: string; // Persisted Whole Book Audio
viralTitles?: string[]; // Persisted list of viral titles
}
export enum StyleType {
MINIMALIST_WHITE = 'MINIMALIST_WHITE',
MAGAZINE_EDITORIAL = 'MAGAZINE_EDITORIAL',
LUXURY_GOLD = 'LUXURY_GOLD',
SWISS_GRID = 'SWISS_GRID',
DARK_ELEGANCE = 'DARK_ELEGANCE',
GRADIENT_AURA = 'GRADIENT_AURA',
KRAFT_PAPER = 'KRAFT_PAPER',
RETRO_FILM = 'RETRO_FILM',
NEON_CYBER = 'NEON_CYBER',
TYPEWRITER = 'TYPEWRITER',
// New Feminine Styles
CREAM_DREAM = 'CREAM_DREAM', // Gentle Latte/Cream
HEALING_SAGE = 'HEALING_SAGE', // Morandi Green/Nature
FRENCH_ROSE = 'FRENCH_ROSE', // Romantic Pink/Serif
FROSTED_GLASS = 'FROSTED_GLASS', // Trendy Glassmorphism
AI_MALE_TARGET = 'AI_MALE_TARGET', // Japanese female idol style
AI_FEMALE_TARGET = 'AI_FEMALE_TARGET', // Thai male idol style
}
export interface StyleConfig {
id: StyleType;
label: string;
description: string;
isAi: boolean;
}
export interface ProcessingStatus {
step: 'idle' | 'reading_pdf' | 'analyzing_structure' | 'extracting_cards' | 'generating_images' | 'complete' | 'error';
message: string;
progress?: number; // 0 to 100
}