* Commit updated Javascript packages * Bump preact from 10.5.4 to 10.5.5 in /build/javascript (#265) * Trying a new github workflow to install javascript packages * Bump tailwindcss from 1.9.2 to 1.9.4 in /build/javascript (#266) Bumps [tailwindcss](https://github.com/tailwindlabs/tailwindcss) from 1.9.2 to 1.9.4. - [Release notes](https://github.com/tailwindlabs/tailwindcss/releases) - [Changelog](https://github.com/tailwindlabs/tailwindcss/blob/master/CHANGELOG.md) - [Commits](https://github.com/tailwindlabs/tailwindcss/compare/v1.9.2...v1.9.4) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Commit updated Javascript packages * Bump preact from 10.5.4 to 10.5.5 in /build/javascript Bumps [preact](https://github.com/preactjs/preact) from 10.5.4 to 10.5.5. - [Release notes](https://github.com/preactjs/preact/releases) - [Commits](https://github.com/preactjs/preact/compare/10.5.4...10.5.5) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Gabe Kangas <gabek@real-ity.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Owncast <owncast@owncast.online> * Bump @justinribeiro/lite-youtube in /build/javascript Bumps [@justinribeiro/lite-youtube](https://github.com/justinribeiro/lite-youtube) from 0.9.0 to 0.9.1. - [Release notes](https://github.com/justinribeiro/lite-youtube/releases) - [Commits](https://github.com/justinribeiro/lite-youtube/commits) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Owncast <owncast@owncast.online> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Gabe Kangas <gabek@real-ity.com>
143 lines
2.8 KiB
TypeScript
143 lines
2.8 KiB
TypeScript
export as namespace EmojiButton;
|
|
|
|
export = EmojiButton;
|
|
|
|
declare namespace EmojiButton {
|
|
export class EmojiButton {
|
|
constructor(options?: EmojiButton.Options);
|
|
on(event: Event, callback: (selection: EmojiSelection) => void): void;
|
|
off(event: Event, callback: (selection: EmojiSelection) => void): void;
|
|
hidePicker(): void;
|
|
destroyPicker(): void;
|
|
showPicker(referenceEl: HTMLElement): void;
|
|
togglePicker(referenceEl: HTMLElement): void;
|
|
isPickerVisible(): boolean;
|
|
setTheme(theme: EmojiTheme): void;
|
|
}
|
|
|
|
export interface Options {
|
|
position?: Placement | FixedPosition;
|
|
autoHide?: boolean;
|
|
autoFocusSearch?: boolean;
|
|
showAnimation?: 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;
|
|
initialCategory?: Category | 'recents';
|
|
custom?: CustomEmoji[];
|
|
plugins?: Plugin[];
|
|
icons?: Icons;
|
|
rootElement?: HTMLElement;
|
|
}
|
|
|
|
export interface FixedPosition {
|
|
top?: string;
|
|
bottom?: string;
|
|
left?: string;
|
|
right?: string;
|
|
}
|
|
|
|
export interface Plugin {
|
|
render(picker: EmojiButton): HTMLElement;
|
|
destroy?(): void;
|
|
}
|
|
|
|
export interface EmojiSelection {
|
|
name: string;
|
|
custom?: boolean;
|
|
emoji?: string;
|
|
url?: string;
|
|
}
|
|
|
|
export interface CustomEmoji {
|
|
name: string;
|
|
emoji: string;
|
|
}
|
|
|
|
export type EmojiStyle = 'native' | 'twemoji';
|
|
|
|
export type EmojiTheme = 'dark' | 'light' | 'auto';
|
|
|
|
export type Event = 'emoji' | 'hidden';
|
|
|
|
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'
|
|
| 'custom';
|
|
|
|
export interface I18NStrings {
|
|
search: string;
|
|
categories: {
|
|
[key in I18NCategory]: string;
|
|
};
|
|
notFound: string;
|
|
}
|
|
|
|
export interface Icons {
|
|
search?: string;
|
|
clearSearch?: string;
|
|
categories?: {
|
|
[key in I18NCategory]?: string;
|
|
};
|
|
notFound?: string;
|
|
}
|
|
}
|