@kimo-emoji/core 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,80 @@
1
+ /**
2
+ * Generated by scripts/generate.ts - DO NOT EDIT MANUALLY
3
+ * Source of truth: packages/assets/svg & metadata/emojis.json
4
+ */
5
+ type EmojiName = 'angel' | 'angry' | 'applause' | 'avocado' | 'balloon' | 'bear' | 'boba' | 'bunny' | 'cake' | 'cat-cry' | 'cat-happy' | 'cat-love' | 'celebrate' | 'cherry-blossom' | 'clown' | 'coffee' | 'confused' | 'cool' | 'cry' | 'cute-poop' | 'devil' | 'diamond' | 'dizzy' | 'dog-puppy' | 'drool' | 'duck' | 'excited' | 'fingers-crossed' | 'fire' | 'fist-bump' | 'frog-coffee' | 'frog-cry' | 'frog-dance' | 'frog-happy' | 'frog-love' | 'ghost' | 'gift' | 'handshake' | 'happy' | 'heart-hands' | 'heart' | 'hundred' | 'ice-cream' | 'laugh' | 'love' | 'mind-blown' | 'money-face' | 'moon' | 'music-note' | 'panda' | 'party' | 'peace' | 'piggy' | 'pizza' | 'pleading' | 'pointing-right' | 'pray' | 'puke' | 'rainbow' | 'ramen' | 'rocket' | 'rolling-eyes' | 'sad' | 'scream' | 'shy' | 'skull' | 'sleepy' | 'smug' | 'sparkles' | 'starry' | 'sun' | 'surprised' | 'sweat-smile' | 'thinking' | 'thumbs-down' | 'thumbs-up' | 'wave' | 'wink' | 'yawn';
6
+ type EmojiCategory = 'faces' | 'emotions' | 'reactions' | 'people' | 'gestures' | 'love' | 'fun' | 'objects' | 'animals' | 'food' | 'symbols' | 'miscellaneous';
7
+ interface EmojiMetadata {
8
+ name: EmojiName;
9
+ label: string;
10
+ category: EmojiCategory;
11
+ keywords: string[];
12
+ unicode?: string;
13
+ version: string;
14
+ }
15
+ interface EmojiData extends EmojiMetadata {
16
+ svg: string;
17
+ viewBox: string;
18
+ }
19
+ interface SearchOptions {
20
+ category?: EmojiCategory;
21
+ limit?: number;
22
+ exact?: boolean;
23
+ }
24
+ interface SvgRenderOptions {
25
+ size?: number | string;
26
+ width?: number | string;
27
+ height?: number | string;
28
+ className?: string;
29
+ ariaLabel?: string;
30
+ ariaHidden?: boolean;
31
+ title?: string;
32
+ style?: Record<string, string | number> | string;
33
+ }
34
+ interface CreateEmojiOptions extends SvgRenderOptions {
35
+ onClick?: (event: MouseEvent) => void;
36
+ }
37
+
38
+ /**
39
+ * Generated by scripts/generate.ts - DO NOT EDIT MANUALLY
40
+ */
41
+
42
+ declare const EMOJI_REGISTRY: Record<EmojiName, EmojiData>;
43
+ declare const EMOJI_LIST: EmojiData[];
44
+ declare const EMOJI_NAMES: EmojiName[];
45
+
46
+ /**
47
+ * Retrieve the full emoji data (including SVG and metadata) by name.
48
+ */
49
+ declare function getEmoji(name: EmojiName | string): EmojiData | null;
50
+ /**
51
+ * Retrieve only the metadata for a given emoji name.
52
+ */
53
+ declare function getEmojiMetadata(name: EmojiName | string): EmojiMetadata | null;
54
+ /**
55
+ * List all available emojis in the library.
56
+ */
57
+ declare function listEmojis(): EmojiData[];
58
+ /**
59
+ * List all valid emoji names for autocomplete or validation.
60
+ */
61
+ declare function listEmojiNames(): EmojiName[];
62
+ /**
63
+ * Search emojis by keyword, label, name, or category.
64
+ */
65
+ declare function searchEmojis(query: string, options?: SearchOptions): EmojiData[];
66
+ /**
67
+ * Retrieve all emojis within a specific category.
68
+ */
69
+ declare function getEmojisByCategory(category: EmojiCategory): EmojiData[];
70
+ /**
71
+ * Generate a standalone SVG markup string with applied sizing, accessibility, and styling options.
72
+ */
73
+ declare function getEmojiSvg(name: EmojiName | string, options?: SvgRenderOptions): string;
74
+ /**
75
+ * Vanilla JavaScript helper: create a DOM element for the emoji.
76
+ * Works without React in pure JS / Vanilla DOM / SSR environments.
77
+ */
78
+ declare function createEmoji(name: EmojiName | string, options?: CreateEmojiOptions): HTMLElement;
79
+
80
+ export { type CreateEmojiOptions, EMOJI_LIST, EMOJI_NAMES, EMOJI_REGISTRY, type EmojiCategory, type EmojiData, type EmojiMetadata, type EmojiName, type SearchOptions, type SvgRenderOptions, createEmoji, getEmoji, getEmojiMetadata, getEmojiSvg, getEmojisByCategory, listEmojiNames, listEmojis, searchEmojis };
@@ -0,0 +1,80 @@
1
+ /**
2
+ * Generated by scripts/generate.ts - DO NOT EDIT MANUALLY
3
+ * Source of truth: packages/assets/svg & metadata/emojis.json
4
+ */
5
+ type EmojiName = 'angel' | 'angry' | 'applause' | 'avocado' | 'balloon' | 'bear' | 'boba' | 'bunny' | 'cake' | 'cat-cry' | 'cat-happy' | 'cat-love' | 'celebrate' | 'cherry-blossom' | 'clown' | 'coffee' | 'confused' | 'cool' | 'cry' | 'cute-poop' | 'devil' | 'diamond' | 'dizzy' | 'dog-puppy' | 'drool' | 'duck' | 'excited' | 'fingers-crossed' | 'fire' | 'fist-bump' | 'frog-coffee' | 'frog-cry' | 'frog-dance' | 'frog-happy' | 'frog-love' | 'ghost' | 'gift' | 'handshake' | 'happy' | 'heart-hands' | 'heart' | 'hundred' | 'ice-cream' | 'laugh' | 'love' | 'mind-blown' | 'money-face' | 'moon' | 'music-note' | 'panda' | 'party' | 'peace' | 'piggy' | 'pizza' | 'pleading' | 'pointing-right' | 'pray' | 'puke' | 'rainbow' | 'ramen' | 'rocket' | 'rolling-eyes' | 'sad' | 'scream' | 'shy' | 'skull' | 'sleepy' | 'smug' | 'sparkles' | 'starry' | 'sun' | 'surprised' | 'sweat-smile' | 'thinking' | 'thumbs-down' | 'thumbs-up' | 'wave' | 'wink' | 'yawn';
6
+ type EmojiCategory = 'faces' | 'emotions' | 'reactions' | 'people' | 'gestures' | 'love' | 'fun' | 'objects' | 'animals' | 'food' | 'symbols' | 'miscellaneous';
7
+ interface EmojiMetadata {
8
+ name: EmojiName;
9
+ label: string;
10
+ category: EmojiCategory;
11
+ keywords: string[];
12
+ unicode?: string;
13
+ version: string;
14
+ }
15
+ interface EmojiData extends EmojiMetadata {
16
+ svg: string;
17
+ viewBox: string;
18
+ }
19
+ interface SearchOptions {
20
+ category?: EmojiCategory;
21
+ limit?: number;
22
+ exact?: boolean;
23
+ }
24
+ interface SvgRenderOptions {
25
+ size?: number | string;
26
+ width?: number | string;
27
+ height?: number | string;
28
+ className?: string;
29
+ ariaLabel?: string;
30
+ ariaHidden?: boolean;
31
+ title?: string;
32
+ style?: Record<string, string | number> | string;
33
+ }
34
+ interface CreateEmojiOptions extends SvgRenderOptions {
35
+ onClick?: (event: MouseEvent) => void;
36
+ }
37
+
38
+ /**
39
+ * Generated by scripts/generate.ts - DO NOT EDIT MANUALLY
40
+ */
41
+
42
+ declare const EMOJI_REGISTRY: Record<EmojiName, EmojiData>;
43
+ declare const EMOJI_LIST: EmojiData[];
44
+ declare const EMOJI_NAMES: EmojiName[];
45
+
46
+ /**
47
+ * Retrieve the full emoji data (including SVG and metadata) by name.
48
+ */
49
+ declare function getEmoji(name: EmojiName | string): EmojiData | null;
50
+ /**
51
+ * Retrieve only the metadata for a given emoji name.
52
+ */
53
+ declare function getEmojiMetadata(name: EmojiName | string): EmojiMetadata | null;
54
+ /**
55
+ * List all available emojis in the library.
56
+ */
57
+ declare function listEmojis(): EmojiData[];
58
+ /**
59
+ * List all valid emoji names for autocomplete or validation.
60
+ */
61
+ declare function listEmojiNames(): EmojiName[];
62
+ /**
63
+ * Search emojis by keyword, label, name, or category.
64
+ */
65
+ declare function searchEmojis(query: string, options?: SearchOptions): EmojiData[];
66
+ /**
67
+ * Retrieve all emojis within a specific category.
68
+ */
69
+ declare function getEmojisByCategory(category: EmojiCategory): EmojiData[];
70
+ /**
71
+ * Generate a standalone SVG markup string with applied sizing, accessibility, and styling options.
72
+ */
73
+ declare function getEmojiSvg(name: EmojiName | string, options?: SvgRenderOptions): string;
74
+ /**
75
+ * Vanilla JavaScript helper: create a DOM element for the emoji.
76
+ * Works without React in pure JS / Vanilla DOM / SSR environments.
77
+ */
78
+ declare function createEmoji(name: EmojiName | string, options?: CreateEmojiOptions): HTMLElement;
79
+
80
+ export { type CreateEmojiOptions, EMOJI_LIST, EMOJI_NAMES, EMOJI_REGISTRY, type EmojiCategory, type EmojiData, type EmojiMetadata, type EmojiName, type SearchOptions, type SvgRenderOptions, createEmoji, getEmoji, getEmojiMetadata, getEmojiSvg, getEmojisByCategory, listEmojiNames, listEmojis, searchEmojis };