-
Notifications
You must be signed in to change notification settings - Fork 4
/
shared-types.ts
52 lines (45 loc) · 1002 Bytes
/
shared-types.ts
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
export interface RimeSchema {
id: string;
name: string;
}
export interface RimeContext {
composition: {
length: number;
cursorPosition: number;
selectionStart: number;
selectionEnd: number;
preedit: string;
};
menu: {
pageSize: number;
pageNumber: number;
isLastPage: boolean;
highlightedCandidateIndex: number;
candidates: Array<{
text: string;
comment: string;
}>
};
selectKeys: string;
commitTextPreview: string;
selectLabels: string[];
}
export interface RimeCommit {
text: string;
}
export interface RimeStatus {
schemaId: string;
schemaName: string;
isDisabled: boolean;
isComposing: boolean;
isAsciiMode: boolean;
isFullShape: boolean;
isSimplified: boolean;
isTraditional: boolean;
isAsciiPunct: boolean;
}
export interface RimeCandidate {
index: number;
text: string;
comment: string;
}