Files
IdP/apps/frontend/lib/emoji-native-map.ts
2026-06-25 23:48:57 +03:00

134 lines
3.1 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
export const EMOJI_NATIVE_MAP: Record<string, string> = {
'e-grinning': '😀',
'e-smile': '😊',
'e-laugh': '😄',
'e-rofl': '🤣',
'e-wink': '😉',
'e-blush': '😊',
'e-innocent': '😇',
'e-slight-smile': '🙂',
'e-thinking': '🤔',
'e-neutral': '😐',
'e-expressionless': '😑',
'e-sleeping': '😴',
'e-tired': '😫',
'e-cry': '😢',
'e-sob': '😭',
'e-angry': '😠',
'e-rage': '😡',
'e-shock': '😮',
'e-fear': '😨',
'e-cool': '😎',
'e-nerd': '🤓',
'e-sick': '🤒',
'e-mask': '😷',
'e-party': '🥳',
'e-star-eyes': '🤩',
'e-heart-eyes': '😍',
'e-kiss': '😘',
'e-tongue': '😛',
'e-sweat': '😅',
'e-dizzy': '😵',
'e-thumbs-up': '👍',
'e-thumbs-down': '👎',
'e-clap': '👏',
'e-wave': '👋',
'e-pray': '🙏',
'e-muscle': '💪',
'e-ok-hand': '👌',
'e-victory': '✌️',
'e-crossed-fingers': '🤞',
'e-point-up': '☝️',
'e-point-down': '👇',
'e-raised-hand': '✋',
'e-fist': '✊',
'e-handshake': '🤝',
'e-writing': '✍️',
'e-red-heart': '❤️',
'e-orange-heart': '🧡',
'e-yellow-heart': '💛',
'e-green-heart': '💚',
'e-blue-heart': '💙',
'e-purple-heart': '💜',
'e-black-heart': '🖤',
'e-white-heart': '🤍',
'e-broken-heart': '💔',
'e-sparkling-heart': '💖',
'e-two-hearts': '💕',
'e-revolving-hearts': '💞',
'e-dog': '🐶',
'e-cat': '🐱',
'e-mouse': '🐭',
'e-rabbit': '🐰',
'e-bear': '🐻',
'e-panda': '🐼',
'e-lion': '🦁',
'e-tiger': '🐯',
'e-fox': '🦊',
'e-wolf': '🦊',
'e-monkey': '🐵',
'e-chicken': '🐔',
'e-penguin': '🐧',
'e-unicorn': '🦄',
'e-butterfly': '🦋',
'e-pizza': '🍕',
'e-burger': '🍔',
'e-fries': '🍟',
'e-hotdog': '🌭',
'e-cake': '🎂',
'e-cookie': '🍪',
'e-coffee': '☕',
'e-beer': '🍺',
'e-wine': '🍷',
'e-apple': '🍎',
'e-banana': '🍌',
'e-grape': '🍇',
'e-watermelon': '🍉',
'e-egg': '🥚',
'e-bread': '🍞',
'e-car': '🚗',
'e-bus': '🚌',
'e-train': '🚆',
'e-airplane': '✈️',
'e-rocket': '🚀',
'e-ship': '🚢',
'e-bike': '🚲',
'e-house': '🏠',
'e-mountain': '⛰️',
'e-beach': '🏖️',
'e-bulb': '💡',
'e-phone': '📱',
'e-laptop': '💻',
'e-camera': '📷',
'e-gift': '🎁',
'e-balloon': '🎈',
'e-book': '📚',
'e-key': '🔑',
'e-lock': '🔒',
'e-clock': '🕐',
'e-music': '🎵',
'e-game': '🎮',
'e-check': '✅',
'e-cross': '❌',
'e-exclamation': '❗',
'e-question': '❓',
'e-fire': '🔥',
'e-star': '⭐',
'e-sparkles': '✨',
'e-100': '💯',
'e-plus': '',
'e-minus': '',
'e-warning': '⚠️',
'e-recycle': '♻️'
};
export function emojiIdToNative(id: string): string | null {
return EMOJI_NATIVE_MAP[id] ?? null;
}
export function resolveNativeEmojiContent(content?: string | null): string {
if (!content) return '';
if (EMOJI_NATIVE_MAP[content]) return EMOJI_NATIVE_MAP[content]!;
return content.replace(/:([a-z0-9-]+):/g, (match, slug) => EMOJI_NATIVE_MAP[`e-${slug}`] ?? match);
}