soapbox/types/emoji-mart/index.d.ts

109 wiersze
1.8 KiB
TypeScript
Czysty Zwykły widok Historia

2022-07-05 02:08:47 +00:00
2022-06-26 03:55:17 +00:00
declare module 'emoji-mart' {
2022-07-05 02:08:47 +00:00
export interface NativeEmoji {
unified: string
native: string
x: number
y: number
2022-07-05 02:08:47 +00:00
}
export interface CustomEmoji {
2022-07-04 20:30:35 +00:00
src: string
}
2022-07-05 02:08:47 +00:00
export interface Emoji<T> {
id: string
name: string
keywords: string[]
skins: T[]
version?: number
2022-07-04 20:30:35 +00:00
}
2022-07-05 03:45:01 +00:00
export interface EmojiPick {
id: string
name: string
native?: string
unified?: string
keywords: string[]
shortcodes: string
emoticons: string[]
src?: string
2022-07-05 03:45:01 +00:00
}
2022-07-04 20:30:35 +00:00
export interface PickerProps {
custom?: { emojis: Emoji<CustomEmoji> }[]
set?: string
title?: string
theme?: string
onEmojiSelect?: (emoji: EmojiPick) => void
recent?: any
skin?: any
perLine?: number
emojiSize?: number
emojiButtonSize?: number
navPosition?: string
autoFocus?: boolean
i18n?: any
getImageURL: (set: string, name: string) => string
getSpritesheetURL: (set: string) => string
2022-06-26 03:55:17 +00:00
}
export class Picker {
constructor(props: PickerProps);
}
}
2022-07-03 08:12:57 +00:00
2022-07-04 23:07:04 +00:00
declare module '@emoji-mart/data/sets/14/twitter.json' {
2022-07-05 02:08:47 +00:00
export interface NativeEmoji {
unified: string
native: string
x: number
y: number
2022-07-04 23:07:04 +00:00
}
2022-07-05 02:08:47 +00:00
export interface CustomEmoji {
src: string
2022-07-04 23:07:04 +00:00
}
2022-07-05 02:08:47 +00:00
export interface Emoji<T> {
id: string
name: string
keywords: string[]
skins: T[]
version?: number
2022-07-05 02:08:47 +00:00
}
export interface EmojiCategory {
id: string
emojis: string[]
2022-07-03 08:12:57 +00:00
}
2022-07-04 23:07:04 +00:00
export interface EmojiMap {
[s: string]: Emoji<NativeEmoji>
2022-07-04 23:07:04 +00:00
}
export interface EmojiAlias {
[s: string]: string
2022-07-04 23:07:04 +00:00
}
export interface EmojiSheet {
cols: number
rows: number
2022-07-04 23:07:04 +00:00
}
export interface EmojiData {
categories: EmojiCategory[]
emojis: EmojiMap
aliases: EmojiAlias
sheet: EmojiSheet
2022-07-04 23:07:04 +00:00
}
const data: EmojiData;
export default data;
2022-07-03 08:12:57 +00:00
}