forked from joeattardi/picmo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
98 lines (88 loc) · 1.89 KB
/
index.d.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
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
export as namespace EmojiButton;
export = EmojiButton;
declare class EmojiButton {
constructor(options?: EmojiButton.Options);
on(event: string, callback: (emoji: string) => void): void;
off(event: string, callback: (emoji: string) => void): void;
hidePicker(): void;
showPicker(referenceEl: HTMLElement, options?: EmojiButton.Options): void;
togglePicker(referenceEl: HTMLElement, options?: EmojiButton.Options): void;
pickerVisible: boolean;
}
declare namespace EmojiButton {
export interface Options {
position?: Placement;
autoHide?: boolean;
autoFocusSearch?: boolean;
showPreview?: boolean;
showSearch?: boolean;
showRecents?: boolean;
showVariants?: boolean;
showCategoryButtons?: boolean;
recentsCount?: number;
emojiVersion?: EmojiVersion;
i18n?: I18NStrings;
zIndex?: number;
theme?: EmojiTheme;
categories?: Category[];
style?: EmojiStyle;
emojisPerRow?: number;
rows?: number;
emojiSize?: string;
}
export type EmojiStyle = 'native' | 'twemoji';
export type EmojiTheme = 'dark' | 'light' | 'auto';
export type Placement =
| 'auto'
| 'auto-start'
| 'auto-end'
| 'top'
| 'top-start'
| 'top-end'
| 'bottom'
| 'bottom-start'
| 'bottom-end'
| 'right'
| 'right-start'
| 'right-end'
| 'left'
| 'left-start'
| 'left-end';
export type EmojiVersion =
| '1.0'
| '2.0'
| '3.0'
| '4.0'
| '5.0'
| '11.0'
| '12.0'
| '12.1';
export type Category =
| 'smileys'
| 'people'
| 'animals'
| 'food'
| 'activities'
| 'travel'
| 'objects'
| 'symbols'
| 'flags';
export type I18NCategory =
| 'recents'
| 'smileys'
| 'people'
| 'animals'
| 'food'
| 'activities'
| 'travel'
| 'objects'
| 'symbols'
| 'flags';
export interface I18NStrings {
search: string;
categories: {
[key in I18NCategory]: string;
};
notFound: string;
}
}