whatsapp-ui-react 0.0.1
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/LICENSE +201 -0
- package/README.md +133 -0
- package/dist/components/Chat/Chat.d.ts +48 -0
- package/dist/components/Chat/Chat.d.ts.map +1 -0
- package/dist/components/Chat/ChatReplyContext.d.ts +22 -0
- package/dist/components/Chat/ChatReplyContext.d.ts.map +1 -0
- package/dist/components/Chat/DayDivider.d.ts +11 -0
- package/dist/components/Chat/DayDivider.d.ts.map +1 -0
- package/dist/components/Chat/Header.d.ts +16 -0
- package/dist/components/Chat/Header.d.ts.map +1 -0
- package/dist/components/Chat/Inputfield.d.ts +31 -0
- package/dist/components/Chat/Inputfield.d.ts.map +1 -0
- package/dist/components/Chat/InputfieldActions.d.ts +26 -0
- package/dist/components/Chat/InputfieldActions.d.ts.map +1 -0
- package/dist/components/Chat/MessageList.d.ts +11 -0
- package/dist/components/Chat/MessageList.d.ts.map +1 -0
- package/dist/components/Chat/index.d.ts +11 -0
- package/dist/components/Chat/index.d.ts.map +1 -0
- package/dist/components/Chat/index.parts.d.ts +13 -0
- package/dist/components/Chat/index.parts.d.ts.map +1 -0
- package/dist/components/Message/Audio/Audio.d.ts +13 -0
- package/dist/components/Message/Audio/Audio.d.ts.map +1 -0
- package/dist/components/Message/Audio/index.d.ts +3 -0
- package/dist/components/Message/Audio/index.d.ts.map +1 -0
- package/dist/components/Message/Contact/Contact.d.ts +9 -0
- package/dist/components/Message/Contact/Contact.d.ts.map +1 -0
- package/dist/components/Message/Contact/index.d.ts +3 -0
- package/dist/components/Message/Contact/index.d.ts.map +1 -0
- package/dist/components/Message/Emoji/Emoji.d.ts +16 -0
- package/dist/components/Message/Emoji/Emoji.d.ts.map +1 -0
- package/dist/components/Message/Emoji/index.d.ts +3 -0
- package/dist/components/Message/Emoji/index.d.ts.map +1 -0
- package/dist/components/Message/Event/Event.d.ts +9 -0
- package/dist/components/Message/Event/Event.d.ts.map +1 -0
- package/dist/components/Message/Event/index.d.ts +3 -0
- package/dist/components/Message/Event/index.d.ts.map +1 -0
- package/dist/components/Message/File/File.d.ts +9 -0
- package/dist/components/Message/File/File.d.ts.map +1 -0
- package/dist/components/Message/File/index.d.ts +3 -0
- package/dist/components/Message/File/index.d.ts.map +1 -0
- package/dist/components/Message/Gif/Gif.d.ts +9 -0
- package/dist/components/Message/Gif/Gif.d.ts.map +1 -0
- package/dist/components/Message/Gif/index.d.ts +3 -0
- package/dist/components/Message/Gif/index.d.ts.map +1 -0
- package/dist/components/Message/Image/Image.d.ts +15 -0
- package/dist/components/Message/Image/Image.d.ts.map +1 -0
- package/dist/components/Message/Image/index.d.ts +3 -0
- package/dist/components/Message/Image/index.d.ts.map +1 -0
- package/dist/components/Message/Location/Location.d.ts +9 -0
- package/dist/components/Message/Location/Location.d.ts.map +1 -0
- package/dist/components/Message/Location/index.d.ts +3 -0
- package/dist/components/Message/Location/index.d.ts.map +1 -0
- package/dist/components/Message/Message.d.ts +34 -0
- package/dist/components/Message/Message.d.ts.map +1 -0
- package/dist/components/Message/MessageContext.d.ts +32 -0
- package/dist/components/Message/MessageContext.d.ts.map +1 -0
- package/dist/components/Message/Poll/Poll.d.ts +9 -0
- package/dist/components/Message/Poll/Poll.d.ts.map +1 -0
- package/dist/components/Message/Poll/index.d.ts +3 -0
- package/dist/components/Message/Poll/index.d.ts.map +1 -0
- package/dist/components/Message/StatusIcon.d.ts +12 -0
- package/dist/components/Message/StatusIcon.d.ts.map +1 -0
- package/dist/components/Message/Sticker/Sticker.d.ts +13 -0
- package/dist/components/Message/Sticker/Sticker.d.ts.map +1 -0
- package/dist/components/Message/Sticker/index.d.ts +3 -0
- package/dist/components/Message/Sticker/index.d.ts.map +1 -0
- package/dist/components/Message/Text/Text.d.ts +11 -0
- package/dist/components/Message/Text/Text.d.ts.map +1 -0
- package/dist/components/Message/Text/index.d.ts +3 -0
- package/dist/components/Message/Text/index.d.ts.map +1 -0
- package/dist/components/Message/Video/Video.d.ts +9 -0
- package/dist/components/Message/Video/Video.d.ts.map +1 -0
- package/dist/components/Message/Video/index.d.ts +3 -0
- package/dist/components/Message/Video/index.d.ts.map +1 -0
- package/dist/components/Message/Voice/Voice.d.ts +13 -0
- package/dist/components/Message/Voice/Voice.d.ts.map +1 -0
- package/dist/components/Message/Voice/Waveform.d.ts +18 -0
- package/dist/components/Message/Voice/Waveform.d.ts.map +1 -0
- package/dist/components/Message/Voice/index.d.ts +3 -0
- package/dist/components/Message/Voice/index.d.ts.map +1 -0
- package/dist/components/Message/index.d.ts +31 -0
- package/dist/components/Message/index.d.ts.map +1 -0
- package/dist/components/Message/index.parts.d.ts +33 -0
- package/dist/components/Message/index.parts.d.ts.map +1 -0
- package/dist/components/Reply/Reply.d.ts +14 -0
- package/dist/components/Reply/Reply.d.ts.map +1 -0
- package/dist/components/Reply/index.d.ts +3 -0
- package/dist/components/Reply/index.d.ts.map +1 -0
- package/dist/hooks/useAudioPlayer.d.ts +26 -0
- package/dist/hooks/useAudioPlayer.d.ts.map +1 -0
- package/dist/hooks/useMessages.d.ts +13 -0
- package/dist/hooks/useMessages.d.ts.map +1 -0
- package/dist/hooks/useReply.d.ts +22 -0
- package/dist/hooks/useReply.d.ts.map +1 -0
- package/dist/icons/AttachIcon.d.ts +7 -0
- package/dist/icons/AttachIcon.d.ts.map +1 -0
- package/dist/icons/AudioFileIcon.d.ts +8 -0
- package/dist/icons/AudioFileIcon.d.ts.map +1 -0
- package/dist/icons/AvatarPlaceholderIcon.d.ts +7 -0
- package/dist/icons/AvatarPlaceholderIcon.d.ts.map +1 -0
- package/dist/icons/BubbleTailIcon.d.ts +4 -0
- package/dist/icons/BubbleTailIcon.d.ts.map +1 -0
- package/dist/icons/MicFillIcon.d.ts +7 -0
- package/dist/icons/MicFillIcon.d.ts.map +1 -0
- package/dist/icons/MicOutlineIcon.d.ts +7 -0
- package/dist/icons/MicOutlineIcon.d.ts.map +1 -0
- package/dist/icons/PauseIcon.d.ts +7 -0
- package/dist/icons/PauseIcon.d.ts.map +1 -0
- package/dist/icons/PlayIcon.d.ts +7 -0
- package/dist/icons/PlayIcon.d.ts.map +1 -0
- package/dist/icons/SendIcon.d.ts +7 -0
- package/dist/icons/SendIcon.d.ts.map +1 -0
- package/dist/icons/StatusDoubleCheckIcon.d.ts +7 -0
- package/dist/icons/StatusDoubleCheckIcon.d.ts.map +1 -0
- package/dist/icons/StatusSendingIcon.d.ts +7 -0
- package/dist/icons/StatusSendingIcon.d.ts.map +1 -0
- package/dist/icons/StatusSentIcon.d.ts +7 -0
- package/dist/icons/StatusSentIcon.d.ts.map +1 -0
- package/dist/icons/StickerIcon.d.ts +7 -0
- package/dist/icons/StickerIcon.d.ts.map +1 -0
- package/dist/icons/index.d.ts +14 -0
- package/dist/icons/index.d.ts.map +1 -0
- package/dist/index.cjs +4316 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4315 -0
- package/dist/index.js.map +1 -0
- package/dist/tailwind.css +49 -0
- package/dist/utils/audio.d.ts +14 -0
- package/dist/utils/audio.d.ts.map +1 -0
- package/dist/utils/cn.d.ts +4 -0
- package/dist/utils/cn.d.ts.map +1 -0
- package/dist/utils/color.d.ts +3 -0
- package/dist/utils/color.d.ts.map +1 -0
- package/dist/utils/date.d.ts +5 -0
- package/dist/utils/date.d.ts.map +1 -0
- package/dist/utils/extractText.d.ts +7 -0
- package/dist/utils/extractText.d.ts.map +1 -0
- package/dist/utils/groupMessages.d.ts +24 -0
- package/dist/utils/groupMessages.d.ts.map +1 -0
- package/dist/utils/message.d.ts +5 -0
- package/dist/utils/message.d.ts.map +1 -0
- package/dist/utils/string.d.ts +3 -0
- package/dist/utils/string.d.ts.map +1 -0
- package/dist/utils/time.d.ts +8 -0
- package/dist/utils/time.d.ts.map +1 -0
- package/package.json +96 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { MessageStatus } from '../MessageContext';
|
|
3
|
+
/** Props for the {@link Emoji} component. */
|
|
4
|
+
export interface EmojiProps {
|
|
5
|
+
/** The emoji character(s) to display at large size. */
|
|
6
|
+
content: string;
|
|
7
|
+
/** Formatted time string rendered in the bottom-right corner overlay. */
|
|
8
|
+
time: string;
|
|
9
|
+
/** Delivery status icon shown on outgoing messages. */
|
|
10
|
+
status?: MessageStatus;
|
|
11
|
+
/** Additional CSS class names applied to the root element. */
|
|
12
|
+
className?: string;
|
|
13
|
+
}
|
|
14
|
+
declare function Emoji({ content, time, status, className }: EmojiProps): React.JSX.Element;
|
|
15
|
+
export { Emoji };
|
|
16
|
+
//# sourceMappingURL=Emoji.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Emoji.d.ts","sourceRoot":"","sources":["../../../../src/components/Message/Emoji/Emoji.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAItD,6CAA6C;AAC7C,MAAM,WAAW,UAAU;IACzB,uDAAuD;IACvD,OAAO,EAAE,MAAM,CAAA;IACf,yEAAyE;IACzE,IAAI,EAAE,MAAM,CAAA;IACZ,uDAAuD;IACvD,MAAM,CAAC,EAAE,aAAa,CAAA;IACtB,8DAA8D;IAC9D,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,iBAAS,KAAK,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE,UAAU,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAoBlF;AAED,OAAO,EAAE,KAAK,EAAE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Message/Emoji/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAC/B,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
/** Props for the {@link Event} component. */
|
|
3
|
+
export interface EventProps {
|
|
4
|
+
/** Additional CSS class names applied to the root element. */
|
|
5
|
+
className?: string;
|
|
6
|
+
}
|
|
7
|
+
declare function Event({ className }: EventProps): React.JSX.Element;
|
|
8
|
+
export { Event };
|
|
9
|
+
//# sourceMappingURL=Event.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Event.d.ts","sourceRoot":"","sources":["../../../../src/components/Message/Event/Event.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,6CAA6C;AAC7C,MAAM,WAAW,UAAU;IACzB,8DAA8D;IAC9D,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,iBAAS,KAAK,CAAC,EAAE,SAAS,EAAE,EAAE,UAAU,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAE3D;AAED,OAAO,EAAE,KAAK,EAAE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Message/Event/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAC/B,mBAAmB,SAAS,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
/** Props for the {@link File} component. */
|
|
3
|
+
export interface FileProps {
|
|
4
|
+
/** Additional CSS class names applied to the root element. */
|
|
5
|
+
className?: string;
|
|
6
|
+
}
|
|
7
|
+
declare function File({ className }: FileProps): React.JSX.Element;
|
|
8
|
+
export { File };
|
|
9
|
+
//# sourceMappingURL=File.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"File.d.ts","sourceRoot":"","sources":["../../../../src/components/Message/File/File.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,4CAA4C;AAC5C,MAAM,WAAW,SAAS;IACxB,8DAA8D;IAC9D,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,iBAAS,IAAI,CAAC,EAAE,SAAS,EAAE,EAAE,SAAS,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAEzD;AAED,OAAO,EAAE,IAAI,EAAE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Message/File/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,QAAQ,CAAA;AAC3B,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
/** Props for the {@link Gif} component. */
|
|
3
|
+
export interface GifProps {
|
|
4
|
+
/** Additional CSS class names applied to the root element. */
|
|
5
|
+
className?: string;
|
|
6
|
+
}
|
|
7
|
+
declare function Gif({ className }: GifProps): React.JSX.Element;
|
|
8
|
+
export { Gif };
|
|
9
|
+
//# sourceMappingURL=Gif.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Gif.d.ts","sourceRoot":"","sources":["../../../../src/components/Message/Gif/Gif.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,2CAA2C;AAC3C,MAAM,WAAW,QAAQ;IACvB,8DAA8D;IAC9D,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,iBAAS,GAAG,CAAC,EAAE,SAAS,EAAE,EAAE,QAAQ,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAEvD;AAED,OAAO,EAAE,GAAG,EAAE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Message/Gif/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAC3B,mBAAmB,OAAO,CAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
/** Props for the {@link Image} component. */
|
|
3
|
+
export interface ImageProps {
|
|
4
|
+
/** URL of the image to display. */
|
|
5
|
+
src: string;
|
|
6
|
+
/** Accessible alt text for the image. @defaultValue `''` */
|
|
7
|
+
alt?: string;
|
|
8
|
+
/** Reserved for the overlaid timestamp string; not rendered by this component directly. */
|
|
9
|
+
time?: string;
|
|
10
|
+
/** Additional CSS class names applied to the root element. */
|
|
11
|
+
className?: string;
|
|
12
|
+
}
|
|
13
|
+
declare function Image({ src, alt, className }: ImageProps): React.JSX.Element;
|
|
14
|
+
export { Image };
|
|
15
|
+
//# sourceMappingURL=Image.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Image.d.ts","sourceRoot":"","sources":["../../../../src/components/Message/Image/Image.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,6CAA6C;AAC7C,MAAM,WAAW,UAAU;IACzB,mCAAmC;IACnC,GAAG,EAAE,MAAM,CAAA;IACX,4DAA4D;IAC5D,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,2FAA2F;IAC3F,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,8DAA8D;IAC9D,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,iBAAS,KAAK,CAAC,EAAE,GAAG,EAAE,GAAQ,EAAE,SAAS,EAAE,EAAE,UAAU,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAM1E;AAED,OAAO,EAAE,KAAK,EAAE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Message/Image/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAC/B,mBAAmB,SAAS,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
/** Props for the {@link Location} component. */
|
|
3
|
+
export interface LocationProps {
|
|
4
|
+
/** Additional CSS class names applied to the root element. */
|
|
5
|
+
className?: string;
|
|
6
|
+
}
|
|
7
|
+
declare function Location({ className }: LocationProps): React.JSX.Element;
|
|
8
|
+
export { Location };
|
|
9
|
+
//# sourceMappingURL=Location.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Location.d.ts","sourceRoot":"","sources":["../../../../src/components/Message/Location/Location.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,gDAAgD;AAChD,MAAM,WAAW,aAAa;IAC5B,8DAA8D;IAC9D,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,iBAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,EAAE,aAAa,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAEjE;AAED,OAAO,EAAE,QAAQ,EAAE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Message/Location/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,YAAY,CAAA;AAC/B,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { MessageDirection, MessageStatus } from './MessageContext';
|
|
3
|
+
/** Props for the {@link Message} component. */
|
|
4
|
+
export interface MessageProps {
|
|
5
|
+
/** `'in'` for received messages, `'out'` for sent. */
|
|
6
|
+
direction: MessageDirection;
|
|
7
|
+
/** First message in a consecutive run — renders the bubble tail. @defaultValue `false` */
|
|
8
|
+
top?: boolean;
|
|
9
|
+
/** Part of a group chat — renders the sender avatar when `top` is `true`. @defaultValue `false` */
|
|
10
|
+
group?: boolean;
|
|
11
|
+
/** Sender avatar URL (group chats). */
|
|
12
|
+
avatarUrl?: string;
|
|
13
|
+
/** Sender display name (group chats). */
|
|
14
|
+
senderName?: string;
|
|
15
|
+
/** Message content — typically one of the content components (`<Text>`, `<Image>`, etc.). */
|
|
16
|
+
children: React.ReactNode;
|
|
17
|
+
/** Additional CSS class names applied to the root element. */
|
|
18
|
+
className?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Layout mode.
|
|
21
|
+
* - `'neutral'` — standard bubble with overlaid timestamp
|
|
22
|
+
* - `'free'` — content fills the bubble, timestamp floats below
|
|
23
|
+
* - `'custom'` — children render directly with no wrapper
|
|
24
|
+
* @defaultValue `'custom'`
|
|
25
|
+
*/
|
|
26
|
+
mode?: 'neutral' | 'free' | 'custom';
|
|
27
|
+
/** Formatted time string shown in the bubble footer. */
|
|
28
|
+
time?: string;
|
|
29
|
+
/** Delivery status icon shown on outgoing messages. */
|
|
30
|
+
status?: MessageStatus;
|
|
31
|
+
}
|
|
32
|
+
declare function Message({ direction, top, group, avatarUrl, senderName, children, className, mode, time, status, }: MessageProps): React.JSX.Element;
|
|
33
|
+
export { Message };
|
|
34
|
+
//# sourceMappingURL=Message.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Message.d.ts","sourceRoot":"","sources":["../../../src/components/Message/Message.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,KAAK,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAIvE,+CAA+C;AAC/C,MAAM,WAAW,YAAY;IAC3B,sDAAsD;IACtD,SAAS,EAAE,gBAAgB,CAAA;IAC3B,0FAA0F;IAC1F,GAAG,CAAC,EAAE,OAAO,CAAA;IACb,mGAAmG;IACnG,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,uCAAuC;IACvC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,yCAAyC;IACzC,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,6FAA6F;IAC7F,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,8DAA8D;IAC9D,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,SAAS,GAAG,MAAM,GAAG,QAAQ,CAAA;IACpC,wDAAwD;IACxD,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,uDAAuD;IACvD,MAAM,CAAC,EAAE,aAAa,CAAA;CACvB;AAED,iBAAS,OAAO,CAAC,EACf,SAAS,EACT,GAAW,EACX,KAAa,EACb,SAAS,EACT,UAAU,EACV,QAAQ,EACR,SAAS,EACT,IAAe,EACf,IAAI,EACJ,MAAM,GACP,EAAE,YAAY,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CA6FlC;AAED,OAAO,EAAE,OAAO,EAAE,CAAA"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
/** Direction of a message bubble. */
|
|
3
|
+
export type MessageDirection = 'in' | 'out';
|
|
4
|
+
/** Delivery status of an outgoing message. */
|
|
5
|
+
export type MessageStatus = 'sending' | 'sent' | 'delivered' | 'read';
|
|
6
|
+
/** Discriminates the rendered content type. */
|
|
7
|
+
export type MessageType = 'text' | 'image' | 'gif' | 'audio' | 'video' | 'sticker' | 'file' | 'custom';
|
|
8
|
+
/** Context value provided by {@link Message} to its children. */
|
|
9
|
+
export interface MessageContextValue {
|
|
10
|
+
/** Render direction of this message bubble. */
|
|
11
|
+
direction: MessageDirection;
|
|
12
|
+
/** `true` for the first message in a consecutive sender run; controls bubble tail rendering. */
|
|
13
|
+
top: boolean;
|
|
14
|
+
/** `true` when rendered inside a group chat; enables avatar and sender name display. */
|
|
15
|
+
group: boolean;
|
|
16
|
+
/** Display name of the sender (group chats only). */
|
|
17
|
+
senderName?: string;
|
|
18
|
+
/** Avatar URL of the sender (group chats only). */
|
|
19
|
+
avatarUrl?: string;
|
|
20
|
+
/** Formatted send-time string. */
|
|
21
|
+
time?: string;
|
|
22
|
+
/** Delivery status. */
|
|
23
|
+
status?: MessageStatus;
|
|
24
|
+
}
|
|
25
|
+
declare const MessageContext: React.Context<MessageContextValue>;
|
|
26
|
+
/**
|
|
27
|
+
* Returns the context provided by the nearest ancestor {@link Message}.
|
|
28
|
+
* Use inside custom message content components.
|
|
29
|
+
*/
|
|
30
|
+
declare function useMessage(): MessageContextValue;
|
|
31
|
+
export { MessageContext, useMessage };
|
|
32
|
+
//# sourceMappingURL=MessageContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MessageContext.d.ts","sourceRoot":"","sources":["../../../src/components/Message/MessageContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,qCAAqC;AACrC,MAAM,MAAM,gBAAgB,GAAG,IAAI,GAAG,KAAK,CAAA;AAE3C,8CAA8C;AAC9C,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,MAAM,GAAG,WAAW,GAAG,MAAM,CAAA;AAErE,+CAA+C;AAC/C,MAAM,MAAM,WAAW,GACnB,MAAM,GACN,OAAO,GACP,KAAK,GACL,OAAO,GACP,OAAO,GACP,SAAS,GACT,MAAM,GACN,QAAQ,CAAA;AAEZ,iEAAiE;AACjE,MAAM,WAAW,mBAAmB;IAClC,+CAA+C;IAC/C,SAAS,EAAE,gBAAgB,CAAA;IAC3B,gGAAgG;IAChG,GAAG,EAAE,OAAO,CAAA;IACZ,wFAAwF;IACxF,KAAK,EAAE,OAAO,CAAA;IACd,qDAAqD;IACrD,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,mDAAmD;IACnD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,kCAAkC;IAClC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,uBAAuB;IACvB,MAAM,CAAC,EAAE,aAAa,CAAA;CACvB;AAED,QAAA,MAAM,cAAc,oCAIlB,CAAA;AAEF;;;GAGG;AACH,iBAAS,UAAU,IAAI,mBAAmB,CAEzC;AAED,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
/** Props for the {@link Poll} component. */
|
|
3
|
+
export interface PollProps {
|
|
4
|
+
/** Additional CSS class names applied to the root element. */
|
|
5
|
+
className?: string;
|
|
6
|
+
}
|
|
7
|
+
declare function Poll({ className }: PollProps): React.JSX.Element;
|
|
8
|
+
export { Poll };
|
|
9
|
+
//# sourceMappingURL=Poll.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Poll.d.ts","sourceRoot":"","sources":["../../../../src/components/Message/Poll/Poll.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,4CAA4C;AAC5C,MAAM,WAAW,SAAS;IACxB,8DAA8D;IAC9D,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,iBAAS,IAAI,CAAC,EAAE,SAAS,EAAE,EAAE,SAAS,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAEzD;AAED,OAAO,EAAE,IAAI,EAAE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Message/Poll/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAC7B,mBAAmB,QAAQ,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { MessageStatus } from './MessageContext';
|
|
3
|
+
/** @internal */
|
|
4
|
+
export interface StatusIconProps {
|
|
5
|
+
/** Delivery status to visualise. */
|
|
6
|
+
status: MessageStatus;
|
|
7
|
+
/** Additional CSS class names applied to the icon. */
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
declare function StatusIcon({ status, className }: StatusIconProps): React.JSX.Element;
|
|
11
|
+
export { StatusIcon };
|
|
12
|
+
//# sourceMappingURL=StatusIcon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StatusIcon.d.ts","sourceRoot":"","sources":["../../../src/components/Message/StatusIcon.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAErD,gBAAgB;AAChB,MAAM,WAAW,eAAe;IAC9B,oCAAoC;IACpC,MAAM,EAAE,aAAa,CAAA;IACrB,sDAAsD;IACtD,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,iBAAS,UAAU,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE,eAAe,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAY7E;AAED,OAAO,EAAE,UAAU,EAAE,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
/** Props for the {@link Sticker} component. */
|
|
3
|
+
export interface StickerProps {
|
|
4
|
+
/** URL of the sticker image. */
|
|
5
|
+
src: string;
|
|
6
|
+
/** Accessible alt text for the sticker image. @defaultValue `''` */
|
|
7
|
+
alt?: string;
|
|
8
|
+
/** Additional CSS class names applied to the root element. */
|
|
9
|
+
className?: string;
|
|
10
|
+
}
|
|
11
|
+
declare function Sticker({ src, alt, className }: StickerProps): React.JSX.Element;
|
|
12
|
+
export { Sticker };
|
|
13
|
+
//# sourceMappingURL=Sticker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Sticker.d.ts","sourceRoot":"","sources":["../../../../src/components/Message/Sticker/Sticker.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,+CAA+C;AAC/C,MAAM,WAAW,YAAY;IAC3B,gCAAgC;IAChC,GAAG,EAAE,MAAM,CAAA;IACX,oEAAoE;IACpE,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,8DAA8D;IAC9D,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,iBAAS,OAAO,CAAC,EAAE,GAAG,EAAE,GAAQ,EAAE,SAAS,EAAE,EAAE,YAAY,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAW9E;AAED,OAAO,EAAE,OAAO,EAAE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Message/Sticker/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,WAAW,CAAA;AAC9B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
/** Props for the {@link Text} component. */
|
|
3
|
+
export interface TextProps {
|
|
4
|
+
/** Plain text content to render. Whitespace and line breaks are preserved. */
|
|
5
|
+
content: string;
|
|
6
|
+
/** Additional CSS class names applied to the root element. */
|
|
7
|
+
className?: string;
|
|
8
|
+
}
|
|
9
|
+
declare function Text({ content, className }: TextProps): React.JSX.Element;
|
|
10
|
+
export { Text };
|
|
11
|
+
//# sourceMappingURL=Text.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../../../../src/components/Message/Text/Text.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,4CAA4C;AAC5C,MAAM,WAAW,SAAS;IACxB,8EAA8E;IAC9E,OAAO,EAAE,MAAM,CAAA;IACf,8DAA8D;IAC9D,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AACD,iBAAS,IAAI,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE,SAAS,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CA2BlE;AAED,OAAO,EAAE,IAAI,EAAE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Message/Text/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,QAAQ,CAAA;AAC3B,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
/** Props for the {@link Video} component. */
|
|
3
|
+
export interface VideoProps {
|
|
4
|
+
/** Additional CSS class names applied to the root element. */
|
|
5
|
+
className?: string;
|
|
6
|
+
}
|
|
7
|
+
declare function Video({ className }: VideoProps): React.JSX.Element;
|
|
8
|
+
export { Video };
|
|
9
|
+
//# sourceMappingURL=Video.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Video.d.ts","sourceRoot":"","sources":["../../../../src/components/Message/Video/Video.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,6CAA6C;AAC7C,MAAM,WAAW,UAAU;IACzB,8DAA8D;IAC9D,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,iBAAS,KAAK,CAAC,EAAE,SAAS,EAAE,EAAE,UAAU,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAE3D;AAED,OAAO,EAAE,KAAK,EAAE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Message/Video/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,SAAS,CAAA;AAC5B,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
/** Props for the {@link Voice} component. */
|
|
3
|
+
export interface VoiceProps {
|
|
4
|
+
/** URL of the voice message audio file. Streamed via an `<audio>` element. */
|
|
5
|
+
src: string;
|
|
6
|
+
/** Fallback duration string (e.g. `'0:07'`) shown before audio metadata has loaded. */
|
|
7
|
+
duration?: string;
|
|
8
|
+
/** Avatar URL displayed next to the waveform. Falls back to the sender avatar from `MessageContext`. */
|
|
9
|
+
avatarUrl?: string;
|
|
10
|
+
}
|
|
11
|
+
declare function Voice({ src, duration, avatarUrl: avatarProp }: VoiceProps): React.JSX.Element;
|
|
12
|
+
export { Voice };
|
|
13
|
+
//# sourceMappingURL=Voice.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Voice.d.ts","sourceRoot":"","sources":["../../../../src/components/Message/Voice/Voice.tsx"],"names":[],"mappings":"AAGA,OAAO,KAA8B,MAAM,OAAO,CAAA;AAIlD,6CAA6C;AAC7C,MAAM,WAAW,UAAU;IACzB,8EAA8E;IAC9E,GAAG,EAAE,MAAM,CAAA;IACX,uFAAuF;IACvF,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,wGAAwG;IACxG,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,iBAAS,KAAK,CAAC,EAAE,GAAG,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAE,EAAE,UAAU,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAgFtF;AAED,OAAO,EAAE,KAAK,EAAE,CAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export declare const CANVAS_WIDTH = 200;
|
|
3
|
+
/** @internal */
|
|
4
|
+
export interface WaveformProps {
|
|
5
|
+
/** Amplitude bars to render — array of `BAR_COUNT` values in the range `0`–`10`. */
|
|
6
|
+
bars: number[];
|
|
7
|
+
/** Playback progress in the range `0`–`1`; determines the played/unplayed colour split. */
|
|
8
|
+
progress: number;
|
|
9
|
+
/** `true` for outgoing messages; controls which CSS colour variables are used. */
|
|
10
|
+
isOut: boolean;
|
|
11
|
+
/** `true` once the user has started playback; affects the unplayed colour. */
|
|
12
|
+
hasPlayed: boolean;
|
|
13
|
+
/** Callback invoked with a fractional position (`0`–`1`) when the user clicks the waveform. */
|
|
14
|
+
seek: (fraction: number) => void;
|
|
15
|
+
}
|
|
16
|
+
declare function Waveform({ bars, progress, isOut, hasPlayed, seek }: WaveformProps): React.JSX.Element;
|
|
17
|
+
export { Waveform };
|
|
18
|
+
//# sourceMappingURL=Waveform.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Waveform.d.ts","sourceRoot":"","sources":["../../../../src/components/Message/Voice/Waveform.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA4B,MAAM,OAAO,CAAA;AAGhD,eAAO,MAAM,YAAY,MAAM,CAAA;AAW/B,gBAAgB;AAChB,MAAM,WAAW,aAAa;IAC5B,oFAAoF;IACpF,IAAI,EAAE,MAAM,EAAE,CAAA;IACd,2FAA2F;IAC3F,QAAQ,EAAE,MAAM,CAAA;IAChB,kFAAkF;IAClF,KAAK,EAAE,OAAO,CAAA;IACd,8EAA8E;IAC9E,SAAS,EAAE,OAAO,CAAA;IAClB,+FAA+F;IAC/F,IAAI,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAA;CACjC;AAED,iBAAS,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,aAAa,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CA8D9F;AAED,OAAO,EAAE,QAAQ,EAAE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Message/Voice/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,SAAS,CAAA;AAC5B,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export type * from './Message';
|
|
2
|
+
export { Message } from './Message';
|
|
3
|
+
export type * from './Text';
|
|
4
|
+
export { Text } from './Text';
|
|
5
|
+
export type * from './Emoji';
|
|
6
|
+
export { Emoji } from './Emoji';
|
|
7
|
+
export type * from './Audio';
|
|
8
|
+
export { Audio } from './Audio';
|
|
9
|
+
export type * from './Voice';
|
|
10
|
+
export { Voice } from './Voice';
|
|
11
|
+
export type * from './Sticker';
|
|
12
|
+
export { Sticker } from './Sticker';
|
|
13
|
+
export type * from './Video';
|
|
14
|
+
export { Video } from './Video';
|
|
15
|
+
export type * from './File';
|
|
16
|
+
export { File } from './File';
|
|
17
|
+
export type * from './Location';
|
|
18
|
+
export { Location } from './Location';
|
|
19
|
+
export type * from './Contact';
|
|
20
|
+
export { Contact } from './Contact';
|
|
21
|
+
export type * from './Poll';
|
|
22
|
+
export { Poll } from './Poll';
|
|
23
|
+
export type * from './Event';
|
|
24
|
+
export { Event } from './Event';
|
|
25
|
+
export type * from './Gif';
|
|
26
|
+
export { Gif } from './Gif';
|
|
27
|
+
export type * from './Image';
|
|
28
|
+
export { Image } from './Image';
|
|
29
|
+
export type * from './MessageContext';
|
|
30
|
+
export { useMessage } from './MessageContext';
|
|
31
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Message/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,WAAW,CAAA;AAC9B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAEnC,mBAAmB,QAAQ,CAAA;AAC3B,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAE7B,mBAAmB,SAAS,CAAA;AAC5B,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAE/B,mBAAmB,SAAS,CAAA;AAC5B,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAE/B,mBAAmB,SAAS,CAAA;AAC5B,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAE/B,mBAAmB,WAAW,CAAA;AAC9B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAEnC,mBAAmB,SAAS,CAAA;AAC5B,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAE/B,mBAAmB,QAAQ,CAAA;AAC3B,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAE7B,mBAAmB,YAAY,CAAA;AAC/B,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAErC,mBAAmB,WAAW,CAAA;AAC9B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAEnC,mBAAmB,QAAQ,CAAA;AAC3B,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAE7B,mBAAmB,SAAS,CAAA;AAC5B,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAE/B,mBAAmB,OAAO,CAAA;AAC1B,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAE3B,mBAAmB,SAAS,CAAA;AAC5B,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAE/B,mBAAmB,kBAAkB,CAAA;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export { Message as Root } from './Message';
|
|
2
|
+
export type { MessageProps as RootProps } from './Message';
|
|
3
|
+
export { Text } from './Text';
|
|
4
|
+
export type * from './Text';
|
|
5
|
+
export { Emoji } from './Emoji';
|
|
6
|
+
export type * from './Emoji';
|
|
7
|
+
export { Audio } from './Audio';
|
|
8
|
+
export type * from './Audio';
|
|
9
|
+
export { Voice } from './Voice';
|
|
10
|
+
export type * from './Voice';
|
|
11
|
+
export { Sticker } from './Sticker';
|
|
12
|
+
export type * from './Sticker';
|
|
13
|
+
export { Video } from './Video';
|
|
14
|
+
export type * from './Video';
|
|
15
|
+
export { File } from './File';
|
|
16
|
+
export type * from './File';
|
|
17
|
+
export { Location } from './Location';
|
|
18
|
+
export type * from './Location';
|
|
19
|
+
export { Contact } from './Contact';
|
|
20
|
+
export type * from './Contact';
|
|
21
|
+
export { Poll } from './Poll';
|
|
22
|
+
export type * from './Poll';
|
|
23
|
+
export { Event } from './Event';
|
|
24
|
+
export type * from './Event';
|
|
25
|
+
export { Gif } from './Gif';
|
|
26
|
+
export type * from './Gif';
|
|
27
|
+
export { Image } from './Image';
|
|
28
|
+
export type * from './Image';
|
|
29
|
+
export { StatusIcon } from './StatusIcon';
|
|
30
|
+
export type * from './StatusIcon';
|
|
31
|
+
export { useMessage } from './MessageContext';
|
|
32
|
+
export type * from './MessageContext';
|
|
33
|
+
//# sourceMappingURL=index.parts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.parts.d.ts","sourceRoot":"","sources":["../../../src/components/Message/index.parts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,WAAW,CAAA;AAC3C,YAAY,EAAE,YAAY,IAAI,SAAS,EAAE,MAAM,WAAW,CAAA;AAE1D,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAC7B,mBAAmB,QAAQ,CAAA;AAE3B,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAC/B,mBAAmB,SAAS,CAAA;AAE5B,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAC/B,mBAAmB,SAAS,CAAA;AAE5B,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAC/B,mBAAmB,SAAS,CAAA;AAE5B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,mBAAmB,WAAW,CAAA;AAE9B,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAC/B,mBAAmB,SAAS,CAAA;AAE5B,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAC7B,mBAAmB,QAAQ,CAAA;AAE3B,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,mBAAmB,YAAY,CAAA;AAE/B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,mBAAmB,WAAW,CAAA;AAE9B,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAC7B,mBAAmB,QAAQ,CAAA;AAE3B,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAC/B,mBAAmB,SAAS,CAAA;AAE5B,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAC3B,mBAAmB,OAAO,CAAA;AAE1B,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAC/B,mBAAmB,SAAS,CAAA;AAE5B,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,mBAAmB,cAAc,CAAA;AAEjC,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAC7C,mBAAmB,kBAAkB,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
/** Props for the {@link Reply} component. */
|
|
3
|
+
export interface ReplyProps {
|
|
4
|
+
/** React node whose extracted text is used as the match trigger. Compared case-insensitively against incoming message text. */
|
|
5
|
+
onMessage: React.ReactNode;
|
|
6
|
+
/** React node appended to the chat when a match is found. Should be a fully-formed `<Message>` tree. */
|
|
7
|
+
replyMessage: React.ReactNode;
|
|
8
|
+
/** Only match messages whose `senderId` equals this value. @defaultValue `'me'` */
|
|
9
|
+
from?: string;
|
|
10
|
+
/** Limits the rule to fire at most once per component lifetime. @defaultValue `false` */
|
|
11
|
+
once?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare function Reply({ onMessage, replyMessage, from, once }: ReplyProps): null;
|
|
14
|
+
//# sourceMappingURL=Reply.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Reply.d.ts","sourceRoot":"","sources":["../../../src/components/Reply/Reply.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,6CAA6C;AAC7C,MAAM,WAAW,UAAU;IACzB,+HAA+H;IAC/H,SAAS,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,wGAAwG;IACxG,YAAY,EAAE,KAAK,CAAC,SAAS,CAAA;IAC7B,mFAAmF;IACnF,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,yFAAyF;IACzF,IAAI,CAAC,EAAE,OAAO,CAAA;CACf;AAED,wBAAgB,KAAK,CAAC,EAAE,SAAS,EAAE,YAAY,EAAE,IAAW,EAAE,IAAI,EAAE,EAAE,UAAU,GAAG,IAAI,CAQtF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Reply/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAC/B,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
/** State returned by {@link useAudioPlayer}. */
|
|
3
|
+
export interface AudioPlayerState {
|
|
4
|
+
/** Ref to attach to an `<audio>` element. */
|
|
5
|
+
audioRef: React.RefObject<HTMLAudioElement>;
|
|
6
|
+
/** Whether the audio is currently playing. */
|
|
7
|
+
playing: boolean;
|
|
8
|
+
/** Current playback position in seconds. */
|
|
9
|
+
currentTime: number;
|
|
10
|
+
/** Total audio duration in seconds. */
|
|
11
|
+
totalDuration: number;
|
|
12
|
+
/** Playback progress in the range `0`–`1`. */
|
|
13
|
+
progress: number;
|
|
14
|
+
/** Remaining playback time in seconds. */
|
|
15
|
+
remaining: number;
|
|
16
|
+
/** Toggles between play and pause. */
|
|
17
|
+
toggle: () => void;
|
|
18
|
+
/** Seeks to a fractional position (`0`–`1`). */
|
|
19
|
+
seek: (fraction: number) => void;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Manages playback state for an audio element.
|
|
23
|
+
* Attach `audioRef` to an `<audio src={src}>` element.
|
|
24
|
+
*/
|
|
25
|
+
export declare function useAudioPlayer(src: string): AudioPlayerState;
|
|
26
|
+
//# sourceMappingURL=useAudioPlayer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAudioPlayer.d.ts","sourceRoot":"","sources":["../../src/hooks/useAudioPlayer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,gDAAgD;AAChD,MAAM,WAAW,gBAAgB;IAC/B,6CAA6C;IAC7C,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAA;IAC3C,8CAA8C;IAC9C,OAAO,EAAE,OAAO,CAAA;IAChB,4CAA4C;IAC5C,WAAW,EAAE,MAAM,CAAA;IACnB,uCAAuC;IACvC,aAAa,EAAE,MAAM,CAAA;IACrB,8CAA8C;IAC9C,QAAQ,EAAE,MAAM,CAAA;IAChB,0CAA0C;IAC1C,SAAS,EAAE,MAAM,CAAA;IACjB,sCAAsC;IACtC,MAAM,EAAE,MAAM,IAAI,CAAA;IAClB,gDAAgD;IAChD,IAAI,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAA;CACjC;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,gBAAgB,CA0E5D"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { GroupedMessage } from '../utils/groupMessages';
|
|
2
|
+
/**
|
|
3
|
+
* Event-listener hook — calls `callback` for every new message that arrives
|
|
4
|
+
* in the nearest <Chat>.
|
|
5
|
+
*
|
|
6
|
+
* Must be rendered inside a component that is a descendant of <Chat>
|
|
7
|
+
* (i.e. inside the `onReply` prop or any other child rendered in context).
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* useMessages(msg => console.log(msg.senderId, msg.node))
|
|
11
|
+
*/
|
|
12
|
+
export declare function useMessages(callback: (message: GroupedMessage) => void): void;
|
|
13
|
+
//# sourceMappingURL=useMessages.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useMessages.d.ts","sourceRoot":"","sources":["../../src/hooks/useMessages.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAI3D;;;;;;;;;GASG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,CAAC,OAAO,EAAE,cAAc,KAAK,IAAI,GAAG,IAAI,CAW7E"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
/** Options for {@link useReply}. */
|
|
3
|
+
export interface UseReplyOptions {
|
|
4
|
+
/** React node whose extracted text is used as the match trigger. Compared case-insensitively against incoming message text. */
|
|
5
|
+
onMessage: React.ReactNode;
|
|
6
|
+
/** React node appended to the chat when a match is found. Should be a fully-formed `<Message>` tree. */
|
|
7
|
+
replyMessage: React.ReactNode;
|
|
8
|
+
/** Only match messages whose `senderId` equals this value. When omitted, messages from all senders are matched. */
|
|
9
|
+
from?: string;
|
|
10
|
+
/** Limits the rule to fire at most once per hook lifetime. @defaultValue `false` */
|
|
11
|
+
once?: boolean;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Subscribes to new messages in the nearest `<Chat>` and calls
|
|
15
|
+
* {@link ChatReplyContextValue.addMessage} whenever an incoming message
|
|
16
|
+
* matches the text extracted from `onMessage`.
|
|
17
|
+
*
|
|
18
|
+
* Must be rendered as a descendant of `<Chat>` (e.g. via the `onReply` prop).
|
|
19
|
+
* The {@link Reply} component is the declarative wrapper for this hook.
|
|
20
|
+
*/
|
|
21
|
+
export declare function useReply({ onMessage, replyMessage, from, once }: UseReplyOptions): void;
|
|
22
|
+
//# sourceMappingURL=useReply.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useReply.d.ts","sourceRoot":"","sources":["../../src/hooks/useReply.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,oCAAoC;AACpC,MAAM,WAAW,eAAe;IAC9B,+HAA+H;IAC/H,SAAS,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,wGAAwG;IACxG,YAAY,EAAE,KAAK,CAAC,SAAS,CAAA;IAC7B,mHAAmH;IACnH,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,oFAAoF;IACpF,IAAI,CAAC,EAAE,OAAO,CAAA;CACf;AAED;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CAAC,EAAE,SAAS,EAAE,YAAY,EAAE,IAAI,EAAE,IAAY,EAAE,EAAE,eAAe,GAAG,IAAI,CA8B/F"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AttachIcon.d.ts","sourceRoot":"","sources":["../../src/icons/AttachIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,UAAU,eAAe;IACvB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,EAAE,eAAe,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CASrE;AAED,OAAO,EAAE,UAAU,EAAE,CAAA"}
|