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.
Files changed (148) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +133 -0
  3. package/dist/components/Chat/Chat.d.ts +48 -0
  4. package/dist/components/Chat/Chat.d.ts.map +1 -0
  5. package/dist/components/Chat/ChatReplyContext.d.ts +22 -0
  6. package/dist/components/Chat/ChatReplyContext.d.ts.map +1 -0
  7. package/dist/components/Chat/DayDivider.d.ts +11 -0
  8. package/dist/components/Chat/DayDivider.d.ts.map +1 -0
  9. package/dist/components/Chat/Header.d.ts +16 -0
  10. package/dist/components/Chat/Header.d.ts.map +1 -0
  11. package/dist/components/Chat/Inputfield.d.ts +31 -0
  12. package/dist/components/Chat/Inputfield.d.ts.map +1 -0
  13. package/dist/components/Chat/InputfieldActions.d.ts +26 -0
  14. package/dist/components/Chat/InputfieldActions.d.ts.map +1 -0
  15. package/dist/components/Chat/MessageList.d.ts +11 -0
  16. package/dist/components/Chat/MessageList.d.ts.map +1 -0
  17. package/dist/components/Chat/index.d.ts +11 -0
  18. package/dist/components/Chat/index.d.ts.map +1 -0
  19. package/dist/components/Chat/index.parts.d.ts +13 -0
  20. package/dist/components/Chat/index.parts.d.ts.map +1 -0
  21. package/dist/components/Message/Audio/Audio.d.ts +13 -0
  22. package/dist/components/Message/Audio/Audio.d.ts.map +1 -0
  23. package/dist/components/Message/Audio/index.d.ts +3 -0
  24. package/dist/components/Message/Audio/index.d.ts.map +1 -0
  25. package/dist/components/Message/Contact/Contact.d.ts +9 -0
  26. package/dist/components/Message/Contact/Contact.d.ts.map +1 -0
  27. package/dist/components/Message/Contact/index.d.ts +3 -0
  28. package/dist/components/Message/Contact/index.d.ts.map +1 -0
  29. package/dist/components/Message/Emoji/Emoji.d.ts +16 -0
  30. package/dist/components/Message/Emoji/Emoji.d.ts.map +1 -0
  31. package/dist/components/Message/Emoji/index.d.ts +3 -0
  32. package/dist/components/Message/Emoji/index.d.ts.map +1 -0
  33. package/dist/components/Message/Event/Event.d.ts +9 -0
  34. package/dist/components/Message/Event/Event.d.ts.map +1 -0
  35. package/dist/components/Message/Event/index.d.ts +3 -0
  36. package/dist/components/Message/Event/index.d.ts.map +1 -0
  37. package/dist/components/Message/File/File.d.ts +9 -0
  38. package/dist/components/Message/File/File.d.ts.map +1 -0
  39. package/dist/components/Message/File/index.d.ts +3 -0
  40. package/dist/components/Message/File/index.d.ts.map +1 -0
  41. package/dist/components/Message/Gif/Gif.d.ts +9 -0
  42. package/dist/components/Message/Gif/Gif.d.ts.map +1 -0
  43. package/dist/components/Message/Gif/index.d.ts +3 -0
  44. package/dist/components/Message/Gif/index.d.ts.map +1 -0
  45. package/dist/components/Message/Image/Image.d.ts +15 -0
  46. package/dist/components/Message/Image/Image.d.ts.map +1 -0
  47. package/dist/components/Message/Image/index.d.ts +3 -0
  48. package/dist/components/Message/Image/index.d.ts.map +1 -0
  49. package/dist/components/Message/Location/Location.d.ts +9 -0
  50. package/dist/components/Message/Location/Location.d.ts.map +1 -0
  51. package/dist/components/Message/Location/index.d.ts +3 -0
  52. package/dist/components/Message/Location/index.d.ts.map +1 -0
  53. package/dist/components/Message/Message.d.ts +34 -0
  54. package/dist/components/Message/Message.d.ts.map +1 -0
  55. package/dist/components/Message/MessageContext.d.ts +32 -0
  56. package/dist/components/Message/MessageContext.d.ts.map +1 -0
  57. package/dist/components/Message/Poll/Poll.d.ts +9 -0
  58. package/dist/components/Message/Poll/Poll.d.ts.map +1 -0
  59. package/dist/components/Message/Poll/index.d.ts +3 -0
  60. package/dist/components/Message/Poll/index.d.ts.map +1 -0
  61. package/dist/components/Message/StatusIcon.d.ts +12 -0
  62. package/dist/components/Message/StatusIcon.d.ts.map +1 -0
  63. package/dist/components/Message/Sticker/Sticker.d.ts +13 -0
  64. package/dist/components/Message/Sticker/Sticker.d.ts.map +1 -0
  65. package/dist/components/Message/Sticker/index.d.ts +3 -0
  66. package/dist/components/Message/Sticker/index.d.ts.map +1 -0
  67. package/dist/components/Message/Text/Text.d.ts +11 -0
  68. package/dist/components/Message/Text/Text.d.ts.map +1 -0
  69. package/dist/components/Message/Text/index.d.ts +3 -0
  70. package/dist/components/Message/Text/index.d.ts.map +1 -0
  71. package/dist/components/Message/Video/Video.d.ts +9 -0
  72. package/dist/components/Message/Video/Video.d.ts.map +1 -0
  73. package/dist/components/Message/Video/index.d.ts +3 -0
  74. package/dist/components/Message/Video/index.d.ts.map +1 -0
  75. package/dist/components/Message/Voice/Voice.d.ts +13 -0
  76. package/dist/components/Message/Voice/Voice.d.ts.map +1 -0
  77. package/dist/components/Message/Voice/Waveform.d.ts +18 -0
  78. package/dist/components/Message/Voice/Waveform.d.ts.map +1 -0
  79. package/dist/components/Message/Voice/index.d.ts +3 -0
  80. package/dist/components/Message/Voice/index.d.ts.map +1 -0
  81. package/dist/components/Message/index.d.ts +31 -0
  82. package/dist/components/Message/index.d.ts.map +1 -0
  83. package/dist/components/Message/index.parts.d.ts +33 -0
  84. package/dist/components/Message/index.parts.d.ts.map +1 -0
  85. package/dist/components/Reply/Reply.d.ts +14 -0
  86. package/dist/components/Reply/Reply.d.ts.map +1 -0
  87. package/dist/components/Reply/index.d.ts +3 -0
  88. package/dist/components/Reply/index.d.ts.map +1 -0
  89. package/dist/hooks/useAudioPlayer.d.ts +26 -0
  90. package/dist/hooks/useAudioPlayer.d.ts.map +1 -0
  91. package/dist/hooks/useMessages.d.ts +13 -0
  92. package/dist/hooks/useMessages.d.ts.map +1 -0
  93. package/dist/hooks/useReply.d.ts +22 -0
  94. package/dist/hooks/useReply.d.ts.map +1 -0
  95. package/dist/icons/AttachIcon.d.ts +7 -0
  96. package/dist/icons/AttachIcon.d.ts.map +1 -0
  97. package/dist/icons/AudioFileIcon.d.ts +8 -0
  98. package/dist/icons/AudioFileIcon.d.ts.map +1 -0
  99. package/dist/icons/AvatarPlaceholderIcon.d.ts +7 -0
  100. package/dist/icons/AvatarPlaceholderIcon.d.ts.map +1 -0
  101. package/dist/icons/BubbleTailIcon.d.ts +4 -0
  102. package/dist/icons/BubbleTailIcon.d.ts.map +1 -0
  103. package/dist/icons/MicFillIcon.d.ts +7 -0
  104. package/dist/icons/MicFillIcon.d.ts.map +1 -0
  105. package/dist/icons/MicOutlineIcon.d.ts +7 -0
  106. package/dist/icons/MicOutlineIcon.d.ts.map +1 -0
  107. package/dist/icons/PauseIcon.d.ts +7 -0
  108. package/dist/icons/PauseIcon.d.ts.map +1 -0
  109. package/dist/icons/PlayIcon.d.ts +7 -0
  110. package/dist/icons/PlayIcon.d.ts.map +1 -0
  111. package/dist/icons/SendIcon.d.ts +7 -0
  112. package/dist/icons/SendIcon.d.ts.map +1 -0
  113. package/dist/icons/StatusDoubleCheckIcon.d.ts +7 -0
  114. package/dist/icons/StatusDoubleCheckIcon.d.ts.map +1 -0
  115. package/dist/icons/StatusSendingIcon.d.ts +7 -0
  116. package/dist/icons/StatusSendingIcon.d.ts.map +1 -0
  117. package/dist/icons/StatusSentIcon.d.ts +7 -0
  118. package/dist/icons/StatusSentIcon.d.ts.map +1 -0
  119. package/dist/icons/StickerIcon.d.ts +7 -0
  120. package/dist/icons/StickerIcon.d.ts.map +1 -0
  121. package/dist/icons/index.d.ts +14 -0
  122. package/dist/icons/index.d.ts.map +1 -0
  123. package/dist/index.cjs +4316 -0
  124. package/dist/index.cjs.map +1 -0
  125. package/dist/index.d.ts +11 -0
  126. package/dist/index.d.ts.map +1 -0
  127. package/dist/index.js +4315 -0
  128. package/dist/index.js.map +1 -0
  129. package/dist/tailwind.css +49 -0
  130. package/dist/utils/audio.d.ts +14 -0
  131. package/dist/utils/audio.d.ts.map +1 -0
  132. package/dist/utils/cn.d.ts +4 -0
  133. package/dist/utils/cn.d.ts.map +1 -0
  134. package/dist/utils/color.d.ts +3 -0
  135. package/dist/utils/color.d.ts.map +1 -0
  136. package/dist/utils/date.d.ts +5 -0
  137. package/dist/utils/date.d.ts.map +1 -0
  138. package/dist/utils/extractText.d.ts +7 -0
  139. package/dist/utils/extractText.d.ts.map +1 -0
  140. package/dist/utils/groupMessages.d.ts +24 -0
  141. package/dist/utils/groupMessages.d.ts.map +1 -0
  142. package/dist/utils/message.d.ts +5 -0
  143. package/dist/utils/message.d.ts.map +1 -0
  144. package/dist/utils/string.d.ts +3 -0
  145. package/dist/utils/string.d.ts.map +1 -0
  146. package/dist/utils/time.d.ts +8 -0
  147. package/dist/utils/time.d.ts.map +1 -0
  148. package/package.json +96 -0
package/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2026 2hoch1
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
package/README.md ADDED
@@ -0,0 +1,133 @@
1
+ # whatsapp-ui-react
2
+
3
+ React component library with a WhatsApp‑Web–inspired UI. Some components are still placeholders and may not be fully functional yet.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm install whatsapp-ui-react
9
+ ```
10
+
11
+ **Peer dependencies:** React 18+ and TailwindCSS v4.
12
+
13
+ ## Setup
14
+
15
+ Import the component styles into your CSS entry point:
16
+
17
+ ```css
18
+ @import 'tailwindcss';
19
+ @import 'whatsapp-ui-react/styles';
20
+ ```
21
+
22
+ ## Usage
23
+
24
+ ### Chat
25
+
26
+ ```tsx
27
+ import { Chat } from 'whatsapp-ui-react'
28
+ ;<Chat name="Alice" subtitle="online" />
29
+ ```
30
+
31
+ ### Messages
32
+
33
+ ```tsx
34
+ import { Chat, Message, Text } from 'whatsapp-ui-react'
35
+ import type { GroupedMessage } from 'whatsapp-ui-react'
36
+
37
+ const history: GroupedMessage[] = [
38
+ {
39
+ id: '1',
40
+ senderId: 'alice',
41
+ timestamp: new Date(),
42
+ node: (
43
+ <Message direction="in" mode="neutral" time="09:41">
44
+ <Text content="Hey! 👋" />
45
+ </Message>
46
+ ),
47
+ },
48
+ ]
49
+
50
+ <Chat name="Alice" messageHistory={history} />
51
+ ```
52
+
53
+ ### Content types
54
+
55
+ | Component | Description |
56
+ | ------------ | ----------------------------- |
57
+ | `<Text>` | Plain text |
58
+ | `<Image>` | Image with optional caption |
59
+ | `<Video>` | Video with thumbnail |
60
+ | `<Audio>` | Audio file attachment |
61
+ | `<Voice>` | Voice message with waveform |
62
+ | `<Sticker>` | Sticker (frameless image) |
63
+ | `<Gif>` | Animated GIF |
64
+ | `<File>` | Generic file attachment |
65
+ | `<Contact>` | Contact card |
66
+ | `<Location>` | Location pin with map preview |
67
+ | `<Poll>` | Poll with options |
68
+ | `<Emoji>` | Large emoji message |
69
+ | `<Event>` | Event card |
70
+
71
+ ### Reply rules
72
+
73
+ Automated replies that fire when an incoming message matches a trigger:
74
+
75
+ <!-- prettier-ignore -->
76
+ ```tsx
77
+ import { Chat, Message, Text, Reply } from 'whatsapp-ui-react';
78
+
79
+ <Chat
80
+ name="Support Bot"
81
+ onReply={
82
+ <Reply
83
+ once
84
+ from="bot"
85
+ onMessage={<Text content="!help" />}
86
+ replyMessage={
87
+ <Message direction="in" mode="neutral" time="now">
88
+ <Text content="Available commands: !help, !status" />
89
+ </Message>
90
+ }
91
+ />
92
+ }
93
+ />
94
+ ```
95
+
96
+ | Prop | Type | Default | Description |
97
+ | -------------- | ----------- | ------- | ---------------------------------------------------- |
98
+ | `onMessage` | `ReactNode` | | Message content to match against (text is extracted) |
99
+ | `replyMessage` | `ReactNode` | | `<Message>` to inject when the trigger matches |
100
+ | `from` | `string` | `'me'` | Only react to messages from this `senderId` |
101
+ | `once` | `boolean` | `false` | Fire at most once per component lifetime |
102
+
103
+ ### Locked chat
104
+
105
+ Set `locked` to disable sending while still allowing typing:
106
+
107
+ ```tsx
108
+ <Chat name="Read-only" locked />
109
+ ```
110
+
111
+ ## `<Chat>` props
112
+
113
+ | Prop | Type | Default | Description |
114
+ | -------------------- | --------------------- | -------------------- | ------------------------------------------------ |
115
+ | `name` | `string` | | Contact or group name |
116
+ | `avatarUrl` | `string` | | Avatar image URL |
117
+ | `subtitle` | `string` | | Status text below the name |
118
+ | `messageHistory` | `GroupedMessage[]` | `[]` | Initial message list |
119
+ | `showInputfield` | `boolean` | `true` | Show / hide the input bar |
120
+ | `locked` | `boolean` | `false` | Allow typing but disable sending |
121
+ | `inputPlaceholder` | `string` | `'Enter a message.'` | Textarea placeholder |
122
+ | `inputValue` | `string` | | Controlled input value |
123
+ | `defaultInputValue` | `string` | | Uncontrolled initial value |
124
+ | `onInputValueChange` | `(v: string) => void` | | Called on every keystroke |
125
+ | `onSendMessage` | `(v: string) => void` | | Called when a message is sent |
126
+ | `onReply` | `ReactNode` | | `<Reply>` rules rendered inside the chat context |
127
+ | `onEmojiClick` | `() => void` | | Emoji button click handler |
128
+ | `onAttachClick` | `() => void` | | Attach button click handler |
129
+ | `onMicClick` | `() => void` | | Mic button click handler |
130
+
131
+ ## License
132
+
133
+ Apache-2.0 © [2hoch1](https://github.com/2hoch1)
@@ -0,0 +1,48 @@
1
+ import { default as React } from 'react';
2
+ import { GroupedMessage } from './MessageList';
3
+ /** Props for the {@link Chat} component. */
4
+ export interface ChatProps {
5
+ /** Display name shown in the chat header. */
6
+ name: string;
7
+ /** URL of the avatar image. Falls back to initials derived from `name` when omitted. */
8
+ avatarUrl?: string;
9
+ /** Secondary line displayed below `name` in the header (e.g. `"online"` or `"typing..."`). */
10
+ subtitle?: string;
11
+ /** Rendered in the message area when no messages exist yet and `messageHistory` is empty. */
12
+ children?: React.ReactNode;
13
+ /** Additional CSS class names applied to the root element. */
14
+ className?: string;
15
+ /** Initial message list. Copied into internal state on mount; subsequent external changes are ignored. */
16
+ messageHistory?: GroupedMessage[];
17
+ /** Controls visibility of the input bar. @defaultValue `true` */
18
+ showInputfield?: boolean;
19
+ /** Disables the send action without removing the input field, preventing new messages from being added. @defaultValue `false` */
20
+ locked?: boolean;
21
+ /** Placeholder text for the textarea. @defaultValue `'Enter a message.'` */
22
+ inputPlaceholder?: string;
23
+ /** Controlled textarea value. When provided the component does not manage input state internally. */
24
+ inputValue?: string;
25
+ /** Uncontrolled initial textarea value. */
26
+ defaultInputValue?: string;
27
+ /** Fired on every textarea change with the current string value. */
28
+ onInputValueChange?: (value: string) => void;
29
+ /** Fired after a message is sent with the trimmed message text. The message is also appended to the internal list. */
30
+ onSendMessage?: (value: string) => void;
31
+ /** One or more `<Reply>` nodes rendered inside `ChatReplyContext` so they can subscribe to new messages. */
32
+ onReply?: React.ReactNode;
33
+ /** Handler for the emoji/sticker button in the input bar. */
34
+ onEmojiClick?: () => void;
35
+ /** Handler for the attachment button in the input bar. */
36
+ onAttachClick?: () => void;
37
+ /** Handler for the camera button in the input bar. */
38
+ onCameraClick?: () => void;
39
+ /** Handler for the microphone button in the input bar. */
40
+ onMicClick?: () => void;
41
+ }
42
+ /**
43
+ * Top-level chat component. Manages the message list state and composes
44
+ * the header, scrollable message list, and input bar.
45
+ */
46
+ declare function Chat({ name, avatarUrl, subtitle, children, className, messageHistory, showInputfield, locked, inputPlaceholder, inputValue, defaultInputValue, onInputValueChange, onSendMessage, onReply, onEmojiClick, onAttachClick, onCameraClick, onMicClick, }: ChatProps): React.JSX.Element;
47
+ export { Chat };
48
+ //# sourceMappingURL=Chat.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Chat.d.ts","sourceRoot":"","sources":["../../../src/components/Chat/Chat.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAKnD,4CAA4C;AAC5C,MAAM,WAAW,SAAS;IACxB,6CAA6C;IAC7C,IAAI,EAAE,MAAM,CAAA;IACZ,wFAAwF;IACxF,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,8FAA8F;IAC9F,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,6FAA6F;IAC7F,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,8DAA8D;IAC9D,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,0GAA0G;IAC1G,cAAc,CAAC,EAAE,cAAc,EAAE,CAAA;IACjC,iEAAiE;IACjE,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,iIAAiI;IACjI,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,4EAA4E;IAC5E,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,qGAAqG;IACrG,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,2CAA2C;IAC3C,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,oEAAoE;IACpE,kBAAkB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAC5C,sHAAsH;IACtH,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACvC,4GAA4G;IAC5G,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,6DAA6D;IAC7D,YAAY,CAAC,EAAE,MAAM,IAAI,CAAA;IACzB,0DAA0D;IAC1D,aAAa,CAAC,EAAE,MAAM,IAAI,CAAA;IAC1B,sDAAsD;IACtD,aAAa,CAAC,EAAE,MAAM,IAAI,CAAA;IAC1B,0DAA0D;IAC1D,UAAU,CAAC,EAAE,MAAM,IAAI,CAAA;CACxB;AAED;;;GAGG;AACH,iBAAS,IAAI,CAAC,EACZ,IAAI,EACJ,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,cAAc,EACd,cAAqB,EACrB,MAAc,EACd,gBAAgB,EAChB,UAAU,EACV,iBAAiB,EACjB,kBAAkB,EAClB,aAAa,EACb,OAAO,EACP,YAAY,EACZ,aAAa,EACb,aAAa,EACb,UAAU,GACX,EAAE,SAAS,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAqF/B;AAED,OAAO,EAAE,IAAI,EAAE,CAAA"}
@@ -0,0 +1,22 @@
1
+ import { default as React } from 'react';
2
+ import { GroupedMessage } from './MessageList';
3
+ /** Options for {@link ChatReplyContextValue.addMessage}. */
4
+ export interface AddMessageOptions {
5
+ /** The React node to render as the new message. */
6
+ node: React.ReactNode;
7
+ /** `senderId` stored on the resulting {@link GroupedMessage}. @defaultValue `'me'` */
8
+ senderId?: string;
9
+ }
10
+ /** Shape of the context provided by {@link Chat} to its descendants. */
11
+ export interface ChatReplyContextValue {
12
+ /** Current ordered list of all messages in the chat. */
13
+ messages: GroupedMessage[];
14
+ /** Sends a plain-text message as the local user (`senderId: 'me'`). */
15
+ sendMessage: (text: string) => void;
16
+ /** Programmatically appends an arbitrary message node to the chat. */
17
+ addMessage: (options: AddMessageOptions) => void;
18
+ /** @internal `true` only when a real `<Chat>` component provides this context. */
19
+ provided: boolean;
20
+ }
21
+ export declare const ChatReplyContext: React.Context<ChatReplyContextValue>;
22
+ //# sourceMappingURL=ChatReplyContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChatReplyContext.d.ts","sourceRoot":"","sources":["../../../src/components/Chat/ChatReplyContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAEnD,4DAA4D;AAC5D,MAAM,WAAW,iBAAiB;IAChC,mDAAmD;IACnD,IAAI,EAAE,KAAK,CAAC,SAAS,CAAA;IACrB,sFAAsF;IACtF,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAED,wEAAwE;AACxE,MAAM,WAAW,qBAAqB;IACpC,wDAAwD;IACxD,QAAQ,EAAE,cAAc,EAAE,CAAA;IAC1B,uEAAuE;IACvE,WAAW,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IACnC,sEAAsE;IACtE,UAAU,EAAE,CAAC,OAAO,EAAE,iBAAiB,KAAK,IAAI,CAAA;IAChD,kFAAkF;IAClF,QAAQ,EAAE,OAAO,CAAA;CAClB;AAED,eAAO,MAAM,gBAAgB,sCAK3B,CAAA"}
@@ -0,0 +1,11 @@
1
+ import { default as React } from 'react';
2
+ /** @internal */
3
+ interface DayDividerProps {
4
+ /** Additional CSS class names applied to the root element. */
5
+ className?: string;
6
+ /** The calendar day this divider represents; formatted to a human-readable label. */
7
+ date: Date;
8
+ }
9
+ declare function DayDivider({ className, date }: DayDividerProps): React.JSX.Element;
10
+ export { DayDivider, type DayDividerProps };
11
+ //# sourceMappingURL=DayDivider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DayDivider.d.ts","sourceRoot":"","sources":["../../../src/components/Chat/DayDivider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,gBAAgB;AAChB,UAAU,eAAe;IACvB,8DAA8D;IAC9D,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,qFAAqF;IACrF,IAAI,EAAE,IAAI,CAAA;CACX;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,eAAe,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAU3E;AAED,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,CAAA"}
@@ -0,0 +1,16 @@
1
+ import { default as React } from 'react';
2
+ /** @internal */
3
+ interface ChatHeaderProps {
4
+ /** Additional CSS class names applied to the root element. */
5
+ className?: string;
6
+ /** Display name rendered as the primary heading. */
7
+ name: string;
8
+ /** URL of the avatar image. Falls back to initials derived from `name` when omitted. */
9
+ avatarUrl?: string;
10
+ /** Secondary line displayed below `name` (e.g. `"online"` or last-seen text). */
11
+ subtitle?: string;
12
+ }
13
+ declare function ChatHeader({ className, name, avatarUrl, subtitle }: ChatHeaderProps): React.JSX.Element;
14
+ export { ChatHeader };
15
+ export type { ChatHeaderProps };
16
+ //# sourceMappingURL=Header.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Header.d.ts","sourceRoot":"","sources":["../../../src/components/Chat/Header.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,gBAAgB;AAChB,UAAU,eAAe;IACvB,8DAA8D;IAC9D,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,oDAAoD;IACpD,IAAI,EAAE,MAAM,CAAA;IACZ,wFAAwF;IACxF,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,iFAAiF;IACjF,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,eAAe,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CA4BhG;AAED,OAAO,EAAE,UAAU,EAAE,CAAA;AACrB,YAAY,EAAE,eAAe,EAAE,CAAA"}
@@ -0,0 +1,31 @@
1
+ import { default as React } from 'react';
2
+ /** Props for the {@link Inputfield} component. */
3
+ export interface InputfieldProps extends Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, 'value' | 'defaultValue'> {
4
+ /** Additional CSS class names applied to the outer wrapper. */
5
+ className?: string;
6
+ /** Additional CSS class names applied to the textarea element. */
7
+ textareaClassName?: string;
8
+ /** Additional CSS class names applied to the actions row. */
9
+ actionsClassName?: string;
10
+ /** Controlled textarea value. When provided, internal state is bypassed. */
11
+ value?: string;
12
+ /** Uncontrolled initial textarea value. */
13
+ defaultValue?: string;
14
+ /** Disables the send action without removing the input field. @defaultValue `false` */
15
+ locked?: boolean;
16
+ /** Fired on every textarea change with the current string value. */
17
+ onValueChange?: (value: string) => void;
18
+ /** Fired with the trimmed message string when the user sends; the field is cleared afterwards. */
19
+ onSend?: (value: string) => void;
20
+ /** Handler for the emoji/sticker button. */
21
+ onEmojiClick?: () => void;
22
+ /** Handler for the attachment button. */
23
+ onAttachClick?: () => void;
24
+ /** Handler for the camera button. */
25
+ onCameraClick?: () => void;
26
+ /** Handler for the microphone button. */
27
+ onMicClick?: () => void;
28
+ }
29
+ declare function Inputfield({ className, textareaClassName, actionsClassName, value, defaultValue, locked, onValueChange, onSend, onEmojiClick, onAttachClick, onCameraClick, onMicClick, onChange, onKeyDown, placeholder, ...props }: InputfieldProps): React.JSX.Element;
30
+ export { Inputfield };
31
+ //# sourceMappingURL=Inputfield.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Inputfield.d.ts","sourceRoot":"","sources":["../../../src/components/Chat/Inputfield.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,kDAAkD;AAClD,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAC3C,KAAK,CAAC,sBAAsB,CAAC,mBAAmB,CAAC,EACjD,OAAO,GAAG,cAAc,CACzB;IACC,+DAA+D;IAC/D,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,kEAAkE;IAClE,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,6DAA6D;IAC7D,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,4EAA4E;IAC5E,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,2CAA2C;IAC3C,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,uFAAuF;IACvF,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,oEAAoE;IACpE,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACvC,kGAAkG;IAClG,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAChC,4CAA4C;IAC5C,YAAY,CAAC,EAAE,MAAM,IAAI,CAAA;IACzB,yCAAyC;IACzC,aAAa,CAAC,EAAE,MAAM,IAAI,CAAA;IAC1B,qCAAqC;IACrC,aAAa,CAAC,EAAE,MAAM,IAAI,CAAA;IAC1B,yCAAyC;IACzC,UAAU,CAAC,EAAE,MAAM,IAAI,CAAA;CACxB;AAED,iBAAS,UAAU,CAAC,EAClB,SAAS,EACT,iBAAiB,EACjB,gBAAgB,EAChB,KAAK,EACL,YAAY,EACZ,MAAc,EACd,aAAa,EACb,MAAM,EACN,YAAY,EACZ,aAAa,EACb,aAAa,EACb,UAAU,EACV,QAAQ,EACR,SAAS,EACT,WAAgC,EAChC,GAAG,KAAK,EACT,EAAE,eAAe,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAgErC;AACD,OAAO,EAAE,UAAU,EAAE,CAAA"}
@@ -0,0 +1,26 @@
1
+ import { default as React } from 'react';
2
+ /** @internal */
3
+ interface InputfieldActionsProps {
4
+ /** Additional CSS class names applied to the root element. */
5
+ className?: string;
6
+ /** When `true` the send button is shown; when `false` the mic button is shown instead. @defaultValue `false` */
7
+ hasValue?: boolean;
8
+ /** Content rendered in the expanding textarea slot between the icon buttons and the send/mic button. */
9
+ textareaSlot?: React.ReactNode;
10
+ /** Handler for the emoji/sticker icon button. */
11
+ onEmojiClick?: () => void;
12
+ /** Handler for the attachment icon button. */
13
+ onAttachClick?: () => void;
14
+ /** Handler for the camera icon button (reserved, not yet rendered). */
15
+ onCameraClick?: () => void;
16
+ /** Handler for the mic icon button. */
17
+ onMicClick?: () => void;
18
+ /** Handler for the send button. */
19
+ onSendClick?: () => void;
20
+ /** When `true` the send button is rendered in a disabled state. @defaultValue `false` */
21
+ sendDisabled?: boolean;
22
+ }
23
+ declare function InputfieldActions({ className, hasValue, textareaSlot, onEmojiClick, onAttachClick, onCameraClick: _onCameraClick, onMicClick, onSendClick, sendDisabled, }: InputfieldActionsProps): React.JSX.Element;
24
+ export { InputfieldActions };
25
+ export type { InputfieldActionsProps };
26
+ //# sourceMappingURL=InputfieldActions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InputfieldActions.d.ts","sourceRoot":"","sources":["../../../src/components/Chat/InputfieldActions.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,gBAAgB;AAChB,UAAU,sBAAsB;IAC9B,8DAA8D;IAC9D,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,gHAAgH;IAChH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,wGAAwG;IACxG,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC9B,iDAAiD;IACjD,YAAY,CAAC,EAAE,MAAM,IAAI,CAAA;IACzB,8CAA8C;IAC9C,aAAa,CAAC,EAAE,MAAM,IAAI,CAAA;IAC1B,uEAAuE;IACvE,aAAa,CAAC,EAAE,MAAM,IAAI,CAAA;IAC1B,uCAAuC;IACvC,UAAU,CAAC,EAAE,MAAM,IAAI,CAAA;IACvB,mCAAmC;IACnC,WAAW,CAAC,EAAE,MAAM,IAAI,CAAA;IACxB,yFAAyF;IACzF,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB;AAuBD,iBAAS,iBAAiB,CAAC,EACzB,SAAS,EACT,QAAgB,EAChB,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,aAAa,EAAE,cAAc,EAC7B,UAAU,EACV,WAAW,EACX,YAAoB,GACrB,EAAE,sBAAsB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAsC5C;AAED,OAAO,EAAE,iBAAiB,EAAE,CAAA;AAC5B,YAAY,EAAE,sBAAsB,EAAE,CAAA"}
@@ -0,0 +1,11 @@
1
+ import { GroupedMessage } from '../../utils/groupMessages';
2
+ import { default as React } from 'react';
3
+ export type { GroupedMessage };
4
+ interface MessageListProps {
5
+ className?: string;
6
+ messages: GroupedMessage[];
7
+ }
8
+ declare function MessageList({ className, messages }: MessageListProps): React.JSX.Element;
9
+ export { MessageList };
10
+ export type { MessageListProps };
11
+ //# sourceMappingURL=MessageList.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MessageList.d.ts","sourceRoot":"","sources":["../../../src/components/Chat/MessageList.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAsB,KAAK,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAC/E,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,YAAY,EAAE,cAAc,EAAE,CAAA;AAE9B,UAAU,gBAAgB;IACxB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,EAAE,cAAc,EAAE,CAAA;CAC3B;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,gBAAgB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAmCjF;AAED,OAAO,EAAE,WAAW,EAAE,CAAA;AACtB,YAAY,EAAE,gBAAgB,EAAE,CAAA"}
@@ -0,0 +1,11 @@
1
+ import { Chat as ChatRoot } from './Chat';
2
+ import * as ChatParts from './index.parts';
3
+ declare const Chat: typeof ChatRoot & typeof ChatParts;
4
+ export { Chat };
5
+ export type * from './Chat';
6
+ export type * from './DayDivider';
7
+ export type * from './Header';
8
+ export type * from './Inputfield';
9
+ export type * from './InputfieldActions';
10
+ export type * from './MessageList';
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Chat/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,IAAI,QAAQ,EAAE,MAAM,QAAQ,CAAA;AACzC,OAAO,KAAK,SAAS,MAAM,eAAe,CAAA;AAE1C,QAAA,MAAM,IAAI,oCAAqC,CAAA;AAE/C,OAAO,EAAE,IAAI,EAAE,CAAA;AAEf,mBAAmB,QAAQ,CAAA;AAC3B,mBAAmB,cAAc,CAAA;AACjC,mBAAmB,UAAU,CAAA;AAC7B,mBAAmB,cAAc,CAAA;AACjC,mBAAmB,qBAAqB,CAAA;AACxC,mBAAmB,eAAe,CAAA"}
@@ -0,0 +1,13 @@
1
+ export { Chat as Root } from './Chat';
2
+ export type { ChatProps as RootProps } from './Chat';
3
+ export { ChatHeader as Header } from './Header';
4
+ export type { ChatHeaderProps as HeaderProps } from './Header';
5
+ export { MessageList as List } from './MessageList';
6
+ export type { GroupedMessage, MessageListProps as ListProps } from './MessageList';
7
+ export { Inputfield as Input } from './Inputfield';
8
+ export type { InputfieldProps as InputProps } from './Inputfield';
9
+ export { InputfieldActions as Actions } from './InputfieldActions';
10
+ export type { InputfieldActionsProps as ActionsProps } from './InputfieldActions';
11
+ export type * from './DayDivider';
12
+ export { DayDivider } from './DayDivider';
13
+ //# sourceMappingURL=index.parts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.parts.d.ts","sourceRoot":"","sources":["../../../src/components/Chat/index.parts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAA;AACrC,YAAY,EAAE,SAAS,IAAI,SAAS,EAAE,MAAM,QAAQ,CAAA;AAEpD,OAAO,EAAE,UAAU,IAAI,MAAM,EAAE,MAAM,UAAU,CAAA;AAC/C,YAAY,EAAE,eAAe,IAAI,WAAW,EAAE,MAAM,UAAU,CAAA;AAE9D,OAAO,EAAE,WAAW,IAAI,IAAI,EAAE,MAAM,eAAe,CAAA;AACnD,YAAY,EAAE,cAAc,EAAE,gBAAgB,IAAI,SAAS,EAAE,MAAM,eAAe,CAAA;AAElF,OAAO,EAAE,UAAU,IAAI,KAAK,EAAE,MAAM,cAAc,CAAA;AAClD,YAAY,EAAE,eAAe,IAAI,UAAU,EAAE,MAAM,cAAc,CAAA;AAEjE,OAAO,EAAE,iBAAiB,IAAI,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAClE,YAAY,EAAE,sBAAsB,IAAI,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAEjF,mBAAmB,cAAc,CAAA;AACjC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA"}
@@ -0,0 +1,13 @@
1
+ import { default as React } from 'react';
2
+ /** Props for the {@link Audio} component. */
3
+ export interface AudioProps {
4
+ /** URL of the audio file. Streamed via an `<audio>` element. */
5
+ src: string;
6
+ /** Fallback duration string (e.g. `'0:42'`) shown before audio metadata has loaded. */
7
+ duration?: string;
8
+ /** File name shown as the icon tooltip. */
9
+ fileName?: string;
10
+ }
11
+ declare function Audio({ src, duration, fileName }: AudioProps): React.JSX.Element;
12
+ export { Audio };
13
+ //# sourceMappingURL=Audio.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Audio.d.ts","sourceRoot":"","sources":["../../../../src/components/Message/Audio/Audio.tsx"],"names":[],"mappings":"AAIA,OAAO,KAA8B,MAAM,OAAO,CAAA;AAGlD,6CAA6C;AAC7C,MAAM,WAAW,UAAU;IACzB,gEAAgE;IAChE,GAAG,EAAE,MAAM,CAAA;IACX,uFAAuF;IACvF,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,2CAA2C;IAC3C,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAED,iBAAS,KAAK,CAAC,EAAE,GAAG,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,UAAU,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAyFzE;AAED,OAAO,EAAE,KAAK,EAAE,CAAA"}
@@ -0,0 +1,3 @@
1
+ export type * from './Audio';
2
+ export { Audio } from './Audio';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Message/Audio/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,SAAS,CAAA;AAC5B,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA"}
@@ -0,0 +1,9 @@
1
+ import { default as React } from 'react';
2
+ /** Props for the {@link Contact} component. */
3
+ export interface ContactProps {
4
+ /** Additional CSS class names applied to the root element. */
5
+ className?: string;
6
+ }
7
+ declare function Contact({ className }: ContactProps): React.JSX.Element;
8
+ export { Contact };
9
+ //# sourceMappingURL=Contact.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Contact.d.ts","sourceRoot":"","sources":["../../../../src/components/Message/Contact/Contact.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,+CAA+C;AAC/C,MAAM,WAAW,YAAY;IAC3B,8DAA8D;IAC9D,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,iBAAS,OAAO,CAAC,EAAE,SAAS,EAAE,EAAE,YAAY,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAE/D;AAED,OAAO,EAAE,OAAO,EAAE,CAAA"}
@@ -0,0 +1,3 @@
1
+ export type * from './Contact';
2
+ export { Contact } from './Contact';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Message/Contact/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,WAAW,CAAA;AAC9B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA"}