forked from clairefro/obsidian-plugin-chronos
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.d.ts
More file actions
81 lines (71 loc) · 1.86 KB
/
types.d.ts
File metadata and controls
81 lines (71 loc) · 1.86 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
74
75
76
77
78
79
80
81
// shim
import { DataItem } from "vis-timeline";
export interface Marker {
start: string;
content: string;
}
interface ChronosDataItem extends DataItem {
cDescription?: string; // prefixed c for chronos - special prop for event tooltips
cLink?: string; // optional link
align?: "left" | "center" | "right";
}
export interface ChronosDataSetDataItem {
content: string;
start: Date;
end: Date;
cDescription?: string; // prefixed c for chronos - special prop for event tooltips
}
export interface ChronosPluginSettings {
key?: string; // LEGACY - DEPRECATED
aiKeys?: Record<string, string>; // LEGACY - DEPRECATED
selectedLocale: string;
aiProvider?: string;
openaiSecretName?: string;
geminiSecretName?: string;
aiModels?: Record<string, string>;
align: "left" | "center" | "right";
clickToUse: boolean;
roundRanges: boolean;
useUtc: boolean;
useAI: boolean;
lastSeenVersion?: string;
showChangelogOnUpdate?: boolean;
enableCaching?: boolean;
}
export type Group = { id: number; content: string };
export type Flags = {
orderBy?: string[];
defaultView?: {
start?: string;
end?: string;
};
noToday?: boolean;
height?: number;
};
export interface ParseResult {
items: ChronosDataItem[];
markers: Marker[];
groups: Group[];
flags: Flags;
}
interface ConstructItemParams {
content: string;
start: string;
separator: string | undefined;
end: string | undefined;
groupName: string | undefined;
color: string | undefined;
lineNumber: number;
type: "default" | "background" | "point";
cLink?: string;
}
interface ChronosTimelineConstructor {
container: HTMLElement;
settings: ChronosPluginSettings;
}
declare module "vis-timeline" {
/** Add method override bc this method exists and is documented, but not registered in type definitions from library */
interface Timeline {
setCustomTimeMarker(content: string, id: string, show: boolean): void;
}
}