-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtypes.ts
More file actions
49 lines (43 loc) · 1.1 KB
/
Copy pathtypes.ts
File metadata and controls
49 lines (43 loc) · 1.1 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
export type ChartType = 'bar' | 'line' | 'pie' | 'area' | 'horizontalBar' | 'radar' | 'funnel' | 'radialBar';
export interface User {
id: string;
name: string;
email: string;
password: string; // In a real app, this would be hashed. For MVP/Local, we store as is.
}
export interface ChartDataPoint {
name: string;
value: number;
[key: string]: string | number;
}
export interface ChartConfig {
title: string;
description: string;
type: ChartType;
xAxisLabel: string;
yAxisLabel: string;
data: ChartDataPoint[];
color?: string;
}
export interface ContentBlock {
id: string;
type: 'text' | 'chart';
content?: string; // For text blocks
chartConfig?: ChartConfig; // For chart blocks
}
export interface AnalysisState {
status: 'idle' | 'analyzing' | 'complete' | 'error';
blocks: ContentBlock[];
error?: string;
}
export interface SavedDocument {
id: string;
userId: string; // Link document to a specific user
title: string;
excerpt: string;
createdAt: number; // timestamp
blocks: ContentBlock[];
originalText: string;
chartCount: number;
direction: 'ltr' | 'rtl';
}