-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.ts
More file actions
56 lines (49 loc) · 1.04 KB
/
types.ts
File metadata and controls
56 lines (49 loc) · 1.04 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
export interface ITrack {
id: string;
title: string;
color: string;
order: number;
}
export interface IEvent {
id: string;
trackId: string;
title: string;
description?: string;
startDate: string; // ISO Date string YYYY-MM-DD
endDate: string; // ISO Date string YYYY-MM-DD (same as startDate for single-day events)
color?: string;
}
export interface ITimelineData {
tracks: ITrack[];
events: IEvent[];
}
export interface IViewSettings {
zoom: number; // Pixels per day
minDate: Date;
maxDate: Date;
}
export interface IViewBounds {
minYear: number;
maxYear: number;
}
export enum ModalType {
NONE,
EDIT_TRACK,
EDIT_EVENT,
AI_GENERATE,
IMPORT_EXPORT
}
export type DragMode = 'move' | 'resize-start' | 'resize-end';
export interface IDragState {
isDragging: boolean;
eventId: string | null;
mode: DragMode | null;
startX: number;
startY: number;
currentX: number;
currentY: number;
initialStartDate: string;
initialEndDate: string;
initialTrackId: string;
targetTrackId: string | null;
}