@zolaha/react-noto-animated-emoji 1.0.2 → 2.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.
- package/dist/AnimateEmojiModal.d.ts +37 -0
- package/dist/AnimatedEmoji.d.ts +21 -4
- package/dist/emoji-categories.d.ts +9 -0
- package/dist/index.cjs.js +6 -6
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +6 -0
- package/dist/index.es.js +4445 -3439
- package/dist/index.es.js.map +1 -1
- package/dist/skin-tones.d.ts +19 -0
- package/package.json +1 -1
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export type ModalPosition = 'center' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | {
|
|
4
|
+
top?: string;
|
|
5
|
+
left?: string;
|
|
6
|
+
right?: string;
|
|
7
|
+
bottom?: string;
|
|
8
|
+
};
|
|
9
|
+
export interface AnimateEmojiModalProps {
|
|
10
|
+
/** Controls modal visibility */
|
|
11
|
+
isOpen: boolean;
|
|
12
|
+
/** Called when the modal requests to close (Escape key, overlay click, X button) */
|
|
13
|
+
onClose: () => void;
|
|
14
|
+
/** Called with the selected emoji codepoint when the user clicks an emoji */
|
|
15
|
+
onEmojiSelect: (codepoint: string) => void;
|
|
16
|
+
/** Modal width (default: 480). Numbers are treated as px. */
|
|
17
|
+
width?: number | string;
|
|
18
|
+
/** Modal height (default: 520). Numbers are treated as px. */
|
|
19
|
+
height?: number | string;
|
|
20
|
+
/**
|
|
21
|
+
* Where to position the modal on screen (default: 'center').
|
|
22
|
+
* Pass a custom object for fine-grained control: `{ top: '80px', right: '20px' }`.
|
|
23
|
+
*/
|
|
24
|
+
position?: ModalPosition;
|
|
25
|
+
/** Loop mode for emojis in the modal grid (default: true) */
|
|
26
|
+
loop?: boolean | number;
|
|
27
|
+
/** 'dark' | 'light' (default: 'dark') */
|
|
28
|
+
theme?: 'dark' | 'light';
|
|
29
|
+
/** Extra class applied to the modal panel */
|
|
30
|
+
className?: string;
|
|
31
|
+
/** Extra inline styles applied to the modal panel */
|
|
32
|
+
style?: React.CSSProperties;
|
|
33
|
+
/** Size of each emoji in the picker grid in px (default: 36) */
|
|
34
|
+
emojiSize?: number;
|
|
35
|
+
}
|
|
36
|
+
declare const AnimateEmojiModal: React.FC<AnimateEmojiModalProps>;
|
|
37
|
+
export default AnimateEmojiModal;
|
package/dist/AnimatedEmoji.d.ts
CHANGED
|
@@ -19,15 +19,32 @@ export interface AnimatedEmojiProps {
|
|
|
19
19
|
*/
|
|
20
20
|
style?: React.CSSProperties;
|
|
21
21
|
/**
|
|
22
|
-
*
|
|
22
|
+
* Animation loop behaviour:
|
|
23
|
+
* - `true` → loop indefinitely
|
|
24
|
+
* - `false` → play once (default)
|
|
25
|
+
* - `number` → play exactly N times then stop
|
|
23
26
|
*/
|
|
24
|
-
loop?: boolean;
|
|
27
|
+
loop?: boolean | number;
|
|
25
28
|
/**
|
|
26
|
-
* Whether the animation should autoplay (default: true)
|
|
29
|
+
* Whether the animation should autoplay on mount (default: true)
|
|
27
30
|
*/
|
|
28
31
|
autoplay?: boolean;
|
|
29
32
|
/**
|
|
30
|
-
*
|
|
33
|
+
* Playback speed multiplier (default: 1)
|
|
34
|
+
*/
|
|
35
|
+
speed?: number;
|
|
36
|
+
/**
|
|
37
|
+
* When true, the animation resets to frame 0 after completing instead of
|
|
38
|
+
* staying on the last frame (default: false)
|
|
39
|
+
*/
|
|
40
|
+
resetOnEnd?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* When true, hovering over the emoji replays the animation from the start
|
|
43
|
+
* (default: false)
|
|
44
|
+
*/
|
|
45
|
+
replayOnHover?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Callback fired when the animation finishes (all loop cycles done)
|
|
31
48
|
*/
|
|
32
49
|
onComplete?: () => void;
|
|
33
50
|
/**
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface EmojiCategory {
|
|
2
|
+
id: string;
|
|
3
|
+
label: string;
|
|
4
|
+
/** A representative emoji char shown on the tab button */
|
|
5
|
+
icon: string;
|
|
6
|
+
/** Base codepoints (no skin-tone suffixes). Skin tones applied at runtime. */
|
|
7
|
+
emojis: string[];
|
|
8
|
+
}
|
|
9
|
+
export declare const EMOJI_CATEGORIES: EmojiCategory[];
|