@orbitconnect/react 0.1.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/CHANGELOG.md +56 -0
- package/LICENSE +21 -0
- package/README.md +374 -0
- package/dist/OrbitContext.d.ts +87 -0
- package/dist/OrbitProvider.d.ts +24 -0
- package/dist/api/client.d.ts +44 -0
- package/dist/api/index.d.ts +2 -0
- package/dist/bg.svg +1 -0
- package/dist/call/CallContext.d.ts +27 -0
- package/dist/call/CallProvider.d.ts +4 -0
- package/dist/components/call/CallControls.d.ts +18 -0
- package/dist/components/call/CallHistory.d.ts +22 -0
- package/dist/components/call/CallScreen.d.ts +11 -0
- package/dist/components/call/InCallChatPanel.d.ts +7 -0
- package/dist/components/call/IncomingCallModal.d.ts +8 -0
- package/dist/components/call/OutgoingCallScreen.d.ts +8 -0
- package/dist/components/call/VideoCallScreen.d.ts +23 -0
- package/dist/components/call/index.d.ts +11 -0
- package/dist/components/chat/AttachmentPicker.d.ts +23 -0
- package/dist/components/chat/AttachmentRenderer.d.ts +15 -0
- package/dist/components/chat/AudioRecorder.d.ts +6 -0
- package/dist/components/chat/BatchToolbar.d.ts +8 -0
- package/dist/components/chat/CallBanner.d.ts +14 -0
- package/dist/components/chat/ChatBox.d.ts +90 -0
- package/dist/components/chat/Composer.d.ts +15 -0
- package/dist/components/chat/ConversationList.d.ts +32 -0
- package/dist/components/chat/ConversationPicker.d.ts +7 -0
- package/dist/components/chat/ConversationProfile.d.ts +13 -0
- package/dist/components/chat/DocumentViewer.d.ts +2 -0
- package/dist/components/chat/EmojiPicker.d.ts +5 -0
- package/dist/components/chat/ImageViewer.d.ts +2 -0
- package/dist/components/chat/LinkPreview.d.ts +7 -0
- package/dist/components/chat/MediaMessage.d.ts +5 -0
- package/dist/components/chat/MediaViewer.d.ts +13 -0
- package/dist/components/chat/MessageActionMenu.d.ts +16 -0
- package/dist/components/chat/MessageBubble.d.ts +61 -0
- package/dist/components/chat/MessageInfoSheet.d.ts +7 -0
- package/dist/components/chat/MessageInput.d.ts +12 -0
- package/dist/components/chat/MessageList.d.ts +7 -0
- package/dist/components/chat/QuickMessages.d.ts +17 -0
- package/dist/components/chat/ReactionDialog.d.ts +6 -0
- package/dist/components/chat/ReplyComposer.d.ts +8 -0
- package/dist/components/chat/StickerPicker.d.ts +21 -0
- package/dist/components/chat/VideoViewer.d.ts +2 -0
- package/dist/components/chat/emojiData.d.ts +9 -0
- package/dist/components/chat/index.d.ts +44 -0
- package/dist/components/chat/mediaViewerRegistry.d.ts +22 -0
- package/dist/components/chat/urlUtils.d.ts +1 -0
- package/dist/components/index.d.ts +4 -0
- package/dist/components/meeting/MeetingControls.d.ts +15 -0
- package/dist/components/meeting/MeetingRoom.d.ts +27 -0
- package/dist/components/meeting/ParticipantGrid.d.ts +6 -0
- package/dist/components/meeting/ParticipantsPanel.d.ts +8 -0
- package/dist/components/meeting/ReactionBurst.d.ts +9 -0
- package/dist/components/meeting/ScreenShareView.d.ts +5 -0
- package/dist/components/meeting/WaitingRoom.d.ts +7 -0
- package/dist/components/meeting/index.d.ts +8 -0
- package/dist/components/ui/Avatar.d.ts +13 -0
- package/dist/components/ui/BottomNav.d.ts +8 -0
- package/dist/components/ui/EscalationButton.d.ts +12 -0
- package/dist/components/ui/IconBtn.d.ts +8 -0
- package/dist/components/ui/PoweredBy.d.ts +1 -0
- package/dist/components/ui/index.d.ts +5 -0
- package/dist/favicon.svg +1 -0
- package/dist/hooks/index.d.ts +20 -0
- package/dist/hooks/useAppBrand.d.ts +6 -0
- package/dist/hooks/useCall.d.ts +2 -0
- package/dist/hooks/useCallHistory.d.ts +5 -0
- package/dist/hooks/useConversations.d.ts +7 -0
- package/dist/hooks/useMedia.d.ts +19 -0
- package/dist/hooks/useMeeting.d.ts +22 -0
- package/dist/hooks/useMeetingWebRTC.d.ts +28 -0
- package/dist/hooks/useMessages.d.ts +11 -0
- package/dist/hooks/useNotifications.d.ts +19 -0
- package/dist/hooks/usePresence.d.ts +8 -0
- package/dist/hooks/usePushToken.d.ts +11 -0
- package/dist/hooks/useRealtime.d.ts +21 -0
- package/dist/hooks/useRecording.d.ts +16 -0
- package/dist/hooks/useSound.d.ts +9 -0
- package/dist/hooks/useWebRTC.d.ts +12 -0
- package/dist/icons.svg +24 -0
- package/dist/index.css +1 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.js +12441 -0
- package/dist/meeting/MeetingContext.d.ts +19 -0
- package/dist/meeting/MeetingProvider.d.ts +4 -0
- package/dist/meeting/index.d.ts +3 -0
- package/dist/socket/OrbitListenerProvider.d.ts +14 -0
- package/dist/socket/OrbitSocket.d.ts +97 -0
- package/dist/socket/config.d.ts +10 -0
- package/dist/socket/context.d.ts +10 -0
- package/dist/socket/events.d.ts +283 -0
- package/dist/socket/index.d.ts +8 -0
- package/dist/socket/useOrbitEvent.d.ts +8 -0
- package/dist/theme/ThemeProvider.d.ts +17 -0
- package/dist/theme/defaults.d.ts +3 -0
- package/dist/theme/index.d.ts +3 -0
- package/dist/theme/types.d.ts +85 -0
- package/dist/widgets/Chat.d.ts +13 -0
- package/dist/widgets/MeetingWidget.d.ts +6 -0
- package/dist/widgets/VideoCall.d.ts +1 -0
- package/dist/widgets/index.d.ts +6 -0
- package/package.json +79 -0
package/dist/bg.svg
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1408 768" width="1408" height="768" fill="none"><defs><symbol id="n" viewBox="0 0 32 32"><rect width="32" height="22" rx="5" stroke="currentColor" stroke-width="1.5"/><path d="m6 22-4 8 12-8Z" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"/></symbol><symbol id="f" viewBox="0 0 32 32"><rect width="32" height="22" rx="5" stroke="currentColor" stroke-width="1.5"/><path d="m26 22 4 8-12-8Z" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"/></symbol><symbol id="p" viewBox="0 0 32 32"><ellipse cx="16" cy="12" rx="16" ry="12" stroke="currentColor" stroke-width="1.5"/><path d="m8 24-4 8 12-8Z" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"/></symbol><symbol id="h" viewBox="0 0 32 32"><ellipse cx="16" cy="12" rx="16" ry="12" stroke="currentColor" stroke-width="1.5"/><path d="m22 24 6 8-12-8Z" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"/></symbol><symbol id="q" viewBox="0 0 32 32"><rect x="4" width="28" height="16" rx="4" stroke="currentColor" stroke-width="1.5"/><rect y="12" width="28" height="16" rx="4" stroke="currentColor" stroke-width="1.5"/></symbol><symbol id="d" viewBox="0 0 32 32"><path d="M2 0Q0 0 0 2v18q0 2 2 2h12l-4 8 8-8h12q2 0 2-2V2q0-2-2-2Z" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"/></symbol><symbol id="t" viewBox="0 0 32 32"><rect y="8" width="32" height="22" rx="5" stroke="currentColor" stroke-width="1.5"/><path d="m24 8 6-8-10 8Z" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"/></symbol><symbol id="i" viewBox="0 0 32 32"><ellipse cx="16" cy="11" rx="14" ry="10" stroke="currentColor" stroke-width="1.5"/><circle cx="10" cy="24" r="2.5" stroke="currentColor" stroke-width="1.5"/><circle cx="6" cy="29" r="1.5" stroke="currentColor" stroke-width="1.5"/></symbol><symbol id="s" viewBox="0 0 32 32"><rect width="32" height="24" rx="3" stroke="currentColor" stroke-width="1.5"/><path stroke="currentColor" stroke-width="1.5" d="M8 8h16M8 14h12"/></symbol><symbol id="k" viewBox="0 0 32 32"><rect width="32" height="22" rx="11" stroke="currentColor" stroke-width="1.5"/><circle cx="9" cy="11" r="2" stroke="currentColor" stroke-width="1.2"/><circle cx="16" cy="11" r="2" stroke="currentColor" stroke-width="1.2"/><circle cx="23" cy="11" r="2" stroke="currentColor" stroke-width="1.2"/><path d="m6 22-4 8 12-8Z" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"/></symbol><symbol id="g" viewBox="0 0 32 32"><rect width="32" height="22" rx="5" stroke="currentColor" stroke-width="1.5"/><path d="M16 16q-6-6-6-9t3-3q2 0 3 2 1-2 3-2 3 0 3 3t-6 9Z" stroke="currentColor" stroke-width="1.2"/><path d="m26 22 4 8-12-8Z" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"/></symbol><symbol id="m" viewBox="0 0 32 32"><rect width="32" height="22" rx="5" stroke="currentColor" stroke-width="1.5"/><path d="M10 6q-1 2 0 4 3 4 6 5 2 1 4 0l2-2-3-3-2 2q-2-1-4-3l2-2Z" stroke="currentColor" stroke-width="1.2"/><path d="m6 22-4 8 12-8Z" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"/></symbol><symbol id="o" viewBox="0 0 32 32"><rect width="32" height="22" rx="5" stroke="currentColor" stroke-width="1.5"/><rect x="6" y="6" width="12" height="10" rx="2" stroke="currentColor" stroke-width="1.2"/><path d="m18 9 8-3v10l-8-3Z" stroke="currentColor" stroke-width="1.2" stroke-linejoin="round"/><path d="m26 22 4 8-12-8Z" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"/></symbol><symbol id="b" viewBox="0 0 32 32"><rect width="32" height="22" rx="5" stroke="currentColor" stroke-width="1.5"/><circle cx="16" cy="10" r="6" stroke="currentColor" stroke-width="1.2"/><path d="M13 11q3 3 6 0" stroke="currentColor" stroke-width="1.2"/><circle cx="14" cy="9" r=".8" fill="currentColor"/><circle cx="18" cy="9" r=".8" fill="currentColor"/><path d="m6 22-4 8 12-8Z" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"/></symbol><symbol id="j" viewBox="0 0 32 32"><rect width="32" height="22" rx="5" stroke="currentColor" stroke-width="1.5"/><path d="m16 4 1.5 5H22l-3.5 3 1.5 5-4-3-4 3 1.5-5L10 9h4.5Z" stroke="currentColor" stroke-width="1.2" stroke-linejoin="round"/><path d="m26 22 4 8-12-8Z" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"/></symbol><symbol id="r" viewBox="0 0 32 32"><rect width="32" height="22" rx="5" stroke="currentColor" stroke-width="1.5"/><rect x="5" y="4" width="22" height="14" rx="2" stroke="currentColor" stroke-width="1.2"/><circle cx="10" cy="9" r="2" stroke="currentColor"/><path d="m5 16 6-5 5 4 4-3 7 6" stroke="currentColor"/><path d="m6 22-4 8 12-8Z" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"/></symbol><symbol id="a" viewBox="0 0 32 32"><rect width="32" height="22" rx="5" stroke="currentColor" stroke-width="1.5"/><rect x="12" y="10" width="8" height="7" rx="1" stroke="currentColor" stroke-width="1.2"/><path d="M13 10V8q0-3 3-3t3 3v2" stroke="currentColor" stroke-width="1.2"/><path d="m26 22 4 8-12-8Z" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"/></symbol><symbol id="l" viewBox="0 0 32 32"><rect width="32" height="22" rx="5" stroke="currentColor" stroke-width="1.5"/><rect x="13" y="4" width="6" height="9" rx="3" stroke="currentColor" stroke-width="1.2"/><path d="M10 11q0 6 6 6t6-6m-6 6v3" stroke="currentColor" stroke-width="1.2"/><path d="m6 22-4 8 12-8Z" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"/></symbol><symbol id="c" viewBox="0 0 32 32"><rect width="32" height="22" rx="5" stroke="currentColor" stroke-width="1.5"/><path d="M16 17q-5-3-4-8 2 2 3 1-1-3 2-5 0 3 2 4t2 4-5 4Z" stroke="currentColor" stroke-width="1.2" stroke-linejoin="round"/><path d="m26 22 4 8-12-8Z" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"/></symbol><symbol id="e" viewBox="0 0 32 32"><rect width="32" height="22" rx="5" stroke="currentColor" stroke-width="1.5"/><path d="M14 17v-5q0-2 2-3l2-4q2 0 2 2v3h3q1 0 1 1l-1 6q0 1-1 1h-8Z" stroke="currentColor" stroke-width="1.2" stroke-linejoin="round"/><rect x="11" y="11" width="3" height="7" rx="1" stroke="currentColor" stroke-width="1.2"/><path d="m6 22-4 8 12-8Z" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"/></symbol></defs><use href="#a" x="10" y="-55" width="32" height="32" color="#6c2997" transform="rotate(14 26 -39)"/><use href="#b" x="90" y="-65" width="32" height="32" color="#523a94" transform="rotate(-9 106 -49)"/><use href="#c" x="170" y="-53" width="32" height="32" color="#4a328c" transform="rotate(20 186 -37)"/><use href="#d" x="250" y="-63" width="32" height="32" color="#6c2997" transform="rotate(-5 266 -47)"/><use href="#e" x="330" y="-53" width="32" height="32" color="#523a94" transform="rotate(11 346 -37)"/><use href="#f" x="410" y="-63" width="32" height="32" color="#4a328c" transform="rotate(-18 426 -47)"/><use href="#g" x="490" y="-53" width="32" height="32" color="#6c2997" transform="rotate(6 506 -37)"/><use href="#h" x="570" y="-65" width="32" height="32" color="#523a94" transform="rotate(-22 586 -49)"/><use href="#i" x="650" y="-53" width="32" height="32" color="#4a328c" transform="rotate(15 666 -37)"/><use href="#j" x="730" y="-63" width="32" height="32" color="#6c2997" transform="rotate(-7 746 -47)"/><use href="#k" x="810" y="-53" width="32" height="32" color="#523a94" transform="rotate(19 826 -37)"/><use href="#l" x="890" y="-65" width="32" height="32" color="#4a328c" transform="rotate(-3 906 -49)"/><use href="#m" x="970" y="-53" width="32" height="32" color="#6c2997" transform="rotate(13 986 -37)"/><use href="#n" x="1050" y="-63" width="32" height="32" color="#523a94" transform="rotate(-16 1066 -47)"/><use href="#o" x="1130" y="-53" width="32" height="32" color="#4a328c" transform="rotate(8 1146 -37)"/><use href="#p" x="1210" y="-65" width="32" height="32" color="#6c2997" transform="rotate(-21 1226 -49)"/><use href="#q" x="1290" y="-53" width="32" height="32" color="#523a94" transform="rotate(4 1306 -37)"/><use href="#r" x="1370" y="-63" width="32" height="32" color="#4a328c" transform="rotate(-12 1386 -47)"/><use href="#s" x="50" y="-10" width="32" height="32" color="#6c2997" transform="rotate(17 66 6)"/><use href="#t" x="130" y="-20" width="32" height="32" color="#523a94" transform="rotate(-8 146 -4)"/><use href="#e" x="210" y="-8" width="32" height="32" color="#4a328c" transform="rotate(22 226 8)"/><use href="#g" x="290" y="-18" width="32" height="32" color="#6c2997" transform="rotate(-14 306 -2)"/><use href="#b" x="370" y="-8" width="32" height="32" color="#523a94" transform="rotate(6 386 8)"/><use href="#a" x="450" y="-20" width="32" height="32" color="#4a328c" transform="rotate(-20 466 -4)"/><use href="#c" x="530" y="-8" width="32" height="32" color="#6c2997" transform="rotate(11 546 8)"/><use href="#f" x="610" y="-18" width="32" height="32" color="#523a94" transform="rotate(-4 626 -2)"/><use href="#h" x="690" y="-8" width="32" height="32" color="#4a328c" transform="rotate(18 706 8)"/><use href="#d" x="770" y="-20" width="32" height="32" color="#6c2997" transform="rotate(-10 786 -4)"/><use href="#i" x="850" y="-8" width="32" height="32" color="#523a94" transform="rotate(5 866 8)"/><use href="#k" x="930" y="-20" width="32" height="32" color="#4a328c" transform="rotate(-21 946 -4)"/><use href="#m" x="1010" y="-8" width="32" height="32" color="#6c2997" transform="rotate(13 1026 8)"/><use href="#j" x="1090" y="-20" width="32" height="32" color="#523a94" transform="rotate(-7 1106 -4)"/><use href="#l" x="1170" y="-8" width="32" height="32" color="#4a328c" transform="rotate(19 1186 8)"/><use href="#n" x="1250" y="-20" width="32" height="32" color="#6c2997" transform="rotate(-15 1266 -4)"/><use href="#p" x="1330" y="-8" width="32" height="32" color="#523a94" transform="rotate(9 1346 8)"/><use href="#n" x="10" y="15" width="32" height="32" color="#6c2997" transform="rotate(-15 26 31)"/><use href="#f" x="90" y="8" width="32" height="32" color="#523a94" transform="rotate(10 106 24)"/><use href="#p" x="170" y="18" width="32" height="32" color="#6c2997" transform="rotate(5 186 34)"/><use href="#h" x="250" y="6" width="32" height="32" color="#4a328c" transform="rotate(-12 266 22)"/><use href="#q" x="330" y="16" width="32" height="32" color="#6c2997" transform="rotate(18 346 32)"/><use href="#d" x="410" y="5" width="32" height="32" color="#523a94" transform="rotate(-8 426 21)"/><use href="#t" x="490" y="14" width="32" height="32" color="#4a328c" transform="rotate(14 506 30)"/><use href="#i" x="570" y="4" width="32" height="32" color="#6c2997" transform="rotate(-20 586 20)"/><use href="#s" x="650" y="16" width="32" height="32" color="#523a94" transform="rotate(7 666 32)"/><use href="#k" x="730" y="5" width="32" height="32" color="#4a328c" transform="rotate(-5 746 21)"/><use href="#g" x="810" y="15" width="32" height="32" color="#6c2997" transform="rotate(12 826 31)"/><use href="#m" x="890" y="4" width="32" height="32" color="#523a94" transform="rotate(-18 906 20)"/><use href="#o" x="970" y="16" width="32" height="32" color="#4a328c" transform="rotate(6 986 32)"/><use href="#b" x="1050" y="5" width="32" height="32" color="#6c2997" transform="rotate(-10 1066 21)"/><use href="#j" x="1130" y="15" width="32" height="32" color="#523a94" transform="rotate(20 1146 31)"/><use href="#r" x="1210" y="4" width="32" height="32" color="#4a328c" transform="rotate(-15 1226 20)"/><use href="#a" x="1290" y="16" width="32" height="32" color="#6c2997" transform="rotate(9 1306 32)"/><use href="#l" x="1370" y="5" width="32" height="32" color="#523a94" transform="rotate(-22 1386 21)"/><use href="#c" x="50" y="80" width="32" height="32" color="#4a328c" transform="rotate(16 66 96)"/><use href="#e" x="130" y="70" width="32" height="32" color="#6c2997" transform="rotate(-7 146 86)"/><use href="#n" x="210" y="82" width="32" height="32" color="#523a94" transform="rotate(22 226 98)"/><use href="#p" x="290" y="72" width="32" height="32" color="#4a328c" transform="rotate(-14 306 88)"/><use href="#q" x="370" y="82" width="32" height="32" color="#6c2997" transform="rotate(5 386 98)"/><use href="#t" x="450" y="70" width="32" height="32" color="#523a94" transform="rotate(-19 466 86)"/><use href="#k" x="530" y="82" width="32" height="32" color="#4a328c" transform="rotate(11 546 98)"/><use href="#g" x="610" y="72" width="32" height="32" color="#6c2997" transform="rotate(-8 626 88)"/><use href="#o" x="690" y="82" width="32" height="32" color="#523a94" transform="rotate(17 706 98)"/><use href="#b" x="770" y="70" width="32" height="32" color="#4a328c" transform="rotate(-12 786 86)"/><use href="#r" x="850" y="82" width="32" height="32" color="#6c2997" transform="rotate(3 866 98)"/><use href="#l" x="930" y="72" width="32" height="32" color="#523a94" transform="rotate(-21 946 88)"/><use href="#c" x="1010" y="82" width="32" height="32" color="#4a328c" transform="rotate(9 1026 98)"/><use href="#e" x="1090" y="70" width="32" height="32" color="#6c2997" transform="rotate(-6 1106 86)"/><use href="#f" x="1170" y="82" width="32" height="32" color="#523a94" transform="rotate(19 1186 98)"/><use href="#h" x="1250" y="72" width="32" height="32" color="#4a328c" transform="rotate(-13 1266 88)"/><use href="#d" x="1330" y="82" width="32" height="32" color="#6c2997" transform="rotate(8 1346 98)"/><use href="#i" x="10" y="148" width="32" height="32" color="#523a94" transform="rotate(-4 26 164)"/><use href="#s" x="90" y="138" width="32" height="32" color="#4a328c" transform="rotate(15 106 154)"/><use href="#m" x="170" y="150" width="32" height="32" color="#6c2997" transform="rotate(-20 186 166)"/><use href="#j" x="250" y="140" width="32" height="32" color="#523a94" transform="rotate(6 266 156)"/><use href="#a" x="330" y="150" width="32" height="32" color="#4a328c" transform="rotate(-11 346 166)"/><use href="#n" x="410" y="138" width="32" height="32" color="#6c2997" transform="rotate(21 426 154)"/><use href="#p" x="490" y="150" width="32" height="32" color="#523a94" transform="rotate(-7 506 166)"/><use href="#q" x="570" y="140" width="32" height="32" color="#4a328c" transform="rotate(13 586 156)"/><use href="#t" x="650" y="150" width="32" height="32" color="#6c2997" transform="rotate(-18 666 166)"/><use href="#k" x="730" y="138" width="32" height="32" color="#523a94" transform="rotate(4 746 154)"/><use href="#g" x="810" y="150" width="32" height="32" color="#4a328c" transform="rotate(-22 826 166)"/><use href="#o" x="890" y="140" width="32" height="32" color="#6c2997" transform="rotate(10 906 156)"/><use href="#b" x="970" y="150" width="32" height="32" color="#523a94" transform="rotate(-16 986 166)"/><use href="#r" x="1050" y="138" width="32" height="32" color="#4a328c" transform="rotate(7 1066 154)"/><use href="#l" x="1130" y="150" width="32" height="32" color="#6c2997" transform="rotate(-3 1146 166)"/><use href="#c" x="1210" y="140" width="32" height="32" color="#523a94" transform="rotate(18 1226 156)"/><use href="#e" x="1290" y="150" width="32" height="32" color="#4a328c" transform="rotate(-9 1306 166)"/><use href="#f" x="1370" y="138" width="32" height="32" color="#6c2997" transform="rotate(14 1386 154)"/><use href="#h" x="50" y="215" width="32" height="32" color="#523a94" transform="rotate(-17 66 231)"/><use href="#d" x="130" y="205" width="32" height="32" color="#4a328c" transform="rotate(12 146 221)"/><use href="#i" x="210" y="218" width="32" height="32" color="#6c2997" transform="rotate(-5 226 234)"/><use href="#s" x="290" y="207" width="32" height="32" color="#523a94" transform="rotate(22 306 223)"/><use href="#g" x="370" y="218" width="32" height="32" color="#4a328c" transform="rotate(-14 386 234)"/><use href="#m" x="450" y="207" width="32" height="32" color="#6c2997" transform="rotate(8 466 223)"/><use href="#b" x="530" y="218" width="32" height="32" color="#523a94" transform="rotate(-20 546 234)"/><use href="#j" x="610" y="207" width="32" height="32" color="#4a328c" transform="rotate(5 626 223)"/><use href="#a" x="690" y="218" width="32" height="32" color="#6c2997" transform="rotate(-11 706 234)"/><use href="#l" x="770" y="207" width="32" height="32" color="#523a94" transform="rotate(19 786 223)"/><use href="#c" x="850" y="218" width="32" height="32" color="#4a328c" transform="rotate(-8 866 234)"/><use href="#e" x="930" y="207" width="32" height="32" color="#6c2997" transform="rotate(16 946 223)"/><use href="#n" x="1010" y="218" width="32" height="32" color="#523a94" transform="rotate(-22 1026 234)"/><use href="#p" x="1090" y="207" width="32" height="32" color="#4a328c" transform="rotate(3 1106 223)"/><use href="#q" x="1170" y="218" width="32" height="32" color="#6c2997" transform="rotate(-15 1186 234)"/><use href="#t" x="1250" y="207" width="32" height="32" color="#523a94" transform="rotate(10 1266 223)"/><use href="#k" x="1330" y="218" width="32" height="32" color="#4a328c" transform="rotate(-6 1346 234)"/><use href="#o" x="10" y="283" width="32" height="32" color="#6c2997" transform="rotate(20 26 299)"/><use href="#r" x="90" y="273" width="32" height="32" color="#523a94" transform="rotate(-13 106 289)"/><use href="#f" x="170" y="285" width="32" height="32" color="#4a328c" transform="rotate(7 186 301)"/><use href="#h" x="250" y="275" width="32" height="32" color="#6c2997" transform="rotate(-19 266 291)"/><use href="#d" x="330" y="285" width="32" height="32" color="#523a94" transform="rotate(14 346 301)"/><use href="#i" x="410" y="275" width="32" height="32" color="#4a328c" transform="rotate(-4 426 291)"/><use href="#s" x="490" y="285" width="32" height="32" color="#6c2997" transform="rotate(21 506 301)"/><use href="#g" x="570" y="275" width="32" height="32" color="#523a94" transform="rotate(-10 586 291)"/><use href="#m" x="650" y="285" width="32" height="32" color="#4a328c" transform="rotate(6 666 301)"/><use href="#b" x="730" y="275" width="32" height="32" color="#6c2997" transform="rotate(-22 746 291)"/><use href="#j" x="810" y="285" width="32" height="32" color="#523a94" transform="rotate(11 826 301)"/><use href="#a" x="890" y="275" width="32" height="32" color="#4a328c" transform="rotate(-17 906 291)"/><use href="#l" x="970" y="285" width="32" height="32" color="#6c2997" transform="rotate(3 986 301)"/><use href="#c" x="1050" y="275" width="32" height="32" color="#523a94" transform="rotate(-8 1066 291)"/><use href="#e" x="1130" y="285" width="32" height="32" color="#4a328c" transform="rotate(18 1146 301)"/><use href="#n" x="1210" y="275" width="32" height="32" color="#6c2997" transform="rotate(-12 1226 291)"/><use href="#p" x="1290" y="285" width="32" height="32" color="#523a94" transform="rotate(9 1306 301)"/><use href="#q" x="1370" y="275" width="32" height="32" color="#4a328c" transform="rotate(-20 1386 291)"/><use href="#t" x="50" y="350" width="32" height="32" color="#6c2997" transform="rotate(15 66 366)"/><use href="#k" x="130" y="340" width="32" height="32" color="#523a94" transform="rotate(-6 146 356)"/><use href="#o" x="210" y="352" width="32" height="32" color="#4a328c" transform="rotate(22 226 368)"/><use href="#r" x="290" y="342" width="32" height="32" color="#6c2997" transform="rotate(-16 306 358)"/><use href="#f" x="370" y="352" width="32" height="32" color="#523a94" transform="rotate(5 386 368)"/><use href="#h" x="450" y="342" width="32" height="32" color="#4a328c" transform="rotate(-21 466 358)"/><use href="#d" x="530" y="352" width="32" height="32" color="#6c2997" transform="rotate(12 546 368)"/><use href="#i" x="610" y="342" width="32" height="32" color="#523a94" transform="rotate(-7 626 358)"/><use href="#s" x="690" y="352" width="32" height="32" color="#4a328c" transform="rotate(19 706 368)"/><use href="#g" x="770" y="342" width="32" height="32" color="#6c2997" transform="rotate(-3 786 358)"/><use href="#m" x="850" y="352" width="32" height="32" color="#523a94" transform="rotate(14 866 368)"/><use href="#b" x="930" y="342" width="32" height="32" color="#4a328c" transform="rotate(-18 946 358)"/><use href="#j" x="1010" y="352" width="32" height="32" color="#6c2997" transform="rotate(8 1026 368)"/><use href="#a" x="1090" y="342" width="32" height="32" color="#523a94" transform="rotate(-11 1106 358)"/><use href="#l" x="1170" y="352" width="32" height="32" color="#4a328c" transform="rotate(20 1186 368)"/><use href="#c" x="1250" y="342" width="32" height="32" color="#6c2997" transform="rotate(-4 1266 358)"/><use href="#e" x="1330" y="352" width="32" height="32" color="#523a94" transform="rotate(10 1346 368)"/><use href="#n" x="10" y="418" width="32" height="32" color="#4a328c" transform="rotate(-22 26 434)"/><use href="#p" x="90" y="408" width="32" height="32" color="#6c2997" transform="rotate(17 106 424)"/><use href="#q" x="170" y="420" width="32" height="32" color="#523a94" transform="rotate(-9 186 436)"/><use href="#t" x="250" y="410" width="32" height="32" color="#4a328c" transform="rotate(6 266 426)"/><use href="#k" x="330" y="420" width="32" height="32" color="#6c2997" transform="rotate(-15 346 436)"/><use href="#g" x="410" y="410" width="32" height="32" color="#523a94" transform="rotate(21 426 426)"/><use href="#o" x="490" y="420" width="32" height="32" color="#4a328c" transform="rotate(-5 506 436)"/><use href="#b" x="570" y="410" width="32" height="32" color="#6c2997" transform="rotate(13 586 426)"/><use href="#r" x="650" y="420" width="32" height="32" color="#523a94" transform="rotate(-19 666 436)"/><use href="#a" x="730" y="410" width="32" height="32" color="#4a328c" transform="rotate(4 746 426)"/><use href="#l" x="810" y="420" width="32" height="32" color="#6c2997" transform="rotate(-12 826 436)"/><use href="#c" x="890" y="410" width="32" height="32" color="#523a94" transform="rotate(22 906 426)"/><use href="#e" x="970" y="420" width="32" height="32" color="#4a328c" transform="rotate(-8 986 436)"/><use href="#f" x="1050" y="410" width="32" height="32" color="#6c2997" transform="rotate(16 1066 426)"/><use href="#h" x="1130" y="420" width="32" height="32" color="#523a94" transform="rotate(-3 1146 436)"/><use href="#d" x="1210" y="410" width="32" height="32" color="#4a328c" transform="rotate(11 1226 426)"/><use href="#i" x="1290" y="420" width="32" height="32" color="#6c2997" transform="rotate(-20 1306 436)"/><use href="#s" x="1370" y="410" width="32" height="32" color="#523a94" transform="rotate(7 1386 426)"/><use href="#m" x="50" y="485" width="32" height="32" color="#4a328c" transform="rotate(-14 66 501)"/><use href="#j" x="130" y="475" width="32" height="32" color="#6c2997" transform="rotate(9 146 491)"/><use href="#n" x="210" y="487" width="32" height="32" color="#523a94" transform="rotate(-21 226 503)"/><use href="#p" x="290" y="477" width="32" height="32" color="#4a328c" transform="rotate(5 306 493)"/><use href="#q" x="370" y="487" width="32" height="32" color="#6c2997" transform="rotate(-17 386 503)"/><use href="#t" x="450" y="477" width="32" height="32" color="#523a94" transform="rotate(12 466 493)"/><use href="#k" x="530" y="487" width="32" height="32" color="#4a328c" transform="rotate(-6 546 503)"/><use href="#g" x="610" y="477" width="32" height="32" color="#6c2997" transform="rotate(20 626 493)"/><use href="#o" x="690" y="487" width="32" height="32" color="#523a94" transform="rotate(-10 706 503)"/><use href="#b" x="770" y="477" width="32" height="32" color="#4a328c" transform="rotate(3 786 493)"/><use href="#r" x="850" y="487" width="32" height="32" color="#6c2997" transform="rotate(-22 866 503)"/><use href="#l" x="930" y="477" width="32" height="32" color="#523a94" transform="rotate(15 946 493)"/><use href="#c" x="1010" y="487" width="32" height="32" color="#4a328c" transform="rotate(-7 1026 503)"/><use href="#e" x="1090" y="477" width="32" height="32" color="#6c2997" transform="rotate(18 1106 493)"/><use href="#f" x="1170" y="487" width="32" height="32" color="#523a94" transform="rotate(-13 1186 503)"/><use href="#h" x="1250" y="477" width="32" height="32" color="#4a328c" transform="rotate(8 1266 493)"/><use href="#d" x="1330" y="487" width="32" height="32" color="#6c2997" transform="rotate(-19 1346 503)"/><use href="#i" x="10" y="553" width="32" height="32" color="#523a94" transform="rotate(11 26 569)"/><use href="#s" x="90" y="543" width="32" height="32" color="#4a328c" transform="rotate(-16 106 559)"/><use href="#m" x="170" y="555" width="32" height="32" color="#6c2997" transform="rotate(4 186 571)"/><use href="#j" x="250" y="545" width="32" height="32" color="#523a94" transform="rotate(-22 266 561)"/><use href="#a" x="330" y="555" width="32" height="32" color="#4a328c" transform="rotate(14 346 571)"/><use href="#n" x="410" y="545" width="32" height="32" color="#6c2997" transform="rotate(-8 426 561)"/><use href="#p" x="490" y="555" width="32" height="32" color="#523a94" transform="rotate(21 506 571)"/><use href="#q" x="570" y="545" width="32" height="32" color="#4a328c" transform="rotate(-3 586 561)"/><use href="#t" x="650" y="555" width="32" height="32" color="#6c2997" transform="rotate(17 666 571)"/><use href="#k" x="730" y="545" width="32" height="32" color="#523a94" transform="rotate(-12 746 561)"/><use href="#g" x="810" y="555" width="32" height="32" color="#4a328c" transform="rotate(6 826 571)"/><use href="#o" x="890" y="545" width="32" height="32" color="#6c2997" transform="rotate(-20 906 561)"/><use href="#b" x="970" y="555" width="32" height="32" color="#523a94" transform="rotate(10 986 571)"/><use href="#r" x="1050" y="545" width="32" height="32" color="#4a328c" transform="rotate(-5 1066 561)"/><use href="#l" x="1130" y="555" width="32" height="32" color="#6c2997" transform="rotate(19 1146 571)"/><use href="#c" x="1210" y="545" width="32" height="32" color="#523a94" transform="rotate(-9 1226 561)"/><use href="#e" x="1290" y="555" width="32" height="32" color="#4a328c" transform="rotate(13 1306 571)"/><use href="#f" x="1370" y="545" width="32" height="32" color="#6c2997" transform="rotate(-18 1386 561)"/><use href="#h" x="50" y="620" width="32" height="32" color="#523a94" transform="rotate(7 66 636)"/><use href="#d" x="130" y="610" width="32" height="32" color="#4a328c" transform="rotate(-15 146 626)"/><use href="#i" x="210" y="622" width="32" height="32" color="#6c2997" transform="rotate(22 226 638)"/><use href="#s" x="290" y="612" width="32" height="32" color="#523a94" transform="rotate(-4 306 628)"/><use href="#g" x="370" y="622" width="32" height="32" color="#4a328c" transform="rotate(16 386 638)"/><use href="#m" x="450" y="612" width="32" height="32" color="#6c2997" transform="rotate(-11 466 628)"/><use href="#b" x="530" y="622" width="32" height="32" color="#523a94" transform="rotate(5 546 638)"/><use href="#j" x="610" y="612" width="32" height="32" color="#4a328c" transform="rotate(-20 626 628)"/><use href="#a" x="690" y="622" width="32" height="32" color="#6c2997" transform="rotate(12 706 638)"/><use href="#l" x="770" y="612" width="32" height="32" color="#523a94" transform="rotate(-7 786 628)"/><use href="#c" x="850" y="622" width="32" height="32" color="#4a328c" transform="rotate(21 866 638)"/><use href="#e" x="930" y="612" width="32" height="32" color="#6c2997" transform="rotate(-13 946 628)"/><use href="#n" x="1010" y="622" width="32" height="32" color="#523a94" transform="rotate(8 1026 638)"/><use href="#p" x="1090" y="612" width="32" height="32" color="#4a328c" transform="rotate(-19 1106 628)"/><use href="#q" x="1170" y="622" width="32" height="32" color="#6c2997" transform="rotate(3 1186 638)"/><use href="#t" x="1250" y="612" width="32" height="32" color="#523a94" transform="rotate(-14 1266 628)"/><use href="#k" x="1330" y="622" width="32" height="32" color="#4a328c" transform="rotate(18 1346 638)"/><use href="#o" x="1370" y="700" width="32" height="32" color="#6c2997" transform="rotate(-6 1386 716)"/><use href="#r" x="10" y="688" width="32" height="32" color="#523a94" transform="rotate(14 26 704)"/><use href="#a" x="90" y="678" width="32" height="32" color="#4a328c" transform="rotate(-9 106 694)"/><use href="#l" x="170" y="690" width="32" height="32" color="#6c2997" transform="rotate(20 186 706)"/><use href="#c" x="250" y="680" width="32" height="32" color="#523a94" transform="rotate(-5 266 696)"/><use href="#e" x="330" y="690" width="32" height="32" color="#4a328c" transform="rotate(11 346 706)"/><use href="#f" x="410" y="680" width="32" height="32" color="#6c2997" transform="rotate(-18 426 696)"/><use href="#h" x="490" y="690" width="32" height="32" color="#523a94" transform="rotate(6 506 706)"/><use href="#d" x="570" y="680" width="32" height="32" color="#4a328c" transform="rotate(-22 586 696)"/><use href="#i" x="650" y="690" width="32" height="32" color="#6c2997" transform="rotate(15 666 706)"/><use href="#s" x="730" y="680" width="32" height="32" color="#523a94" transform="rotate(-7 746 696)"/><use href="#k" x="810" y="690" width="32" height="32" color="#4a328c" transform="rotate(19 826 706)"/><use href="#g" x="890" y="680" width="32" height="32" color="#6c2997" transform="rotate(-3 906 696)"/><use href="#m" x="970" y="690" width="32" height="32" color="#523a94" transform="rotate(13 986 706)"/><use href="#b" x="1050" y="680" width="32" height="32" color="#4a328c" transform="rotate(-16 1066 696)"/><use href="#j" x="1130" y="690" width="32" height="32" color="#6c2997" transform="rotate(8 1146 706)"/><use href="#n" x="1210" y="680" width="32" height="32" color="#523a94" transform="rotate(-21 1226 696)"/><use href="#p" x="1290" y="690" width="32" height="32" color="#4a328c" transform="rotate(4 1306 706)"/><use href="#q" x="1370" y="680" width="32" height="32" color="#6c2997" transform="rotate(-12 1386 696)"/><use href="#t" x="50" y="725" width="32" height="32" color="#4a328c" transform="rotate(17 66 741)"/><use href="#k" x="130" y="715" width="32" height="32" color="#6c2997" transform="rotate(-8 146 731)"/><use href="#o" x="210" y="727" width="32" height="32" color="#523a94" transform="rotate(22 226 743)"/><use href="#r" x="290" y="717" width="32" height="32" color="#4a328c" transform="rotate(-14 306 733)"/><use href="#l" x="370" y="727" width="32" height="32" color="#6c2997" transform="rotate(6 386 743)"/><use href="#c" x="450" y="717" width="32" height="32" color="#523a94" transform="rotate(-20 466 733)"/><use href="#e" x="530" y="727" width="32" height="32" color="#4a328c" transform="rotate(11 546 743)"/><use href="#f" x="610" y="717" width="32" height="32" color="#6c2997" transform="rotate(-4 626 733)"/><use href="#h" x="690" y="727" width="32" height="32" color="#523a94" transform="rotate(18 706 743)"/><use href="#d" x="770" y="717" width="32" height="32" color="#4a328c" transform="rotate(-10 786 733)"/><use href="#i" x="850" y="727" width="32" height="32" color="#6c2997" transform="rotate(5 866 743)"/><use href="#s" x="930" y="717" width="32" height="32" color="#523a94" transform="rotate(-21 946 733)"/><use href="#g" x="1010" y="727" width="32" height="32" color="#4a328c" transform="rotate(13 1026 743)"/><use href="#b" x="1090" y="717" width="32" height="32" color="#6c2997" transform="rotate(-7 1106 733)"/><use href="#j" x="1170" y="727" width="32" height="32" color="#523a94" transform="rotate(19 1186 743)"/><use href="#a" x="1250" y="717" width="32" height="32" color="#4a328c" transform="rotate(-15 1266 733)"/><use href="#n" x="1330" y="727" width="32" height="32" color="#6c2997" transform="rotate(9 1346 743)"/><use href="#p" x="10" y="760" width="32" height="32" color="#523a94" transform="rotate(-19 26 776)"/><use href="#m" x="90" y="750" width="32" height="32" color="#4a328c" transform="rotate(7 106 766)"/><use href="#q" x="170" y="762" width="32" height="32" color="#6c2997" transform="rotate(-12 186 778)"/><use href="#t" x="250" y="752" width="32" height="32" color="#523a94" transform="rotate(21 266 768)"/><use href="#k" x="330" y="762" width="32" height="32" color="#4a328c" transform="rotate(-5 346 778)"/><use href="#g" x="410" y="752" width="32" height="32" color="#6c2997" transform="rotate(16 426 768)"/><use href="#o" x="490" y="762" width="32" height="32" color="#523a94" transform="rotate(-22 506 778)"/><use href="#b" x="570" y="752" width="32" height="32" color="#4a328c" transform="rotate(10 586 768)"/><use href="#r" x="650" y="762" width="32" height="32" color="#6c2997" transform="rotate(-3 666 778)"/><use href="#l" x="730" y="752" width="32" height="32" color="#523a94" transform="rotate(14 746 768)"/><use href="#c" x="810" y="762" width="32" height="32" color="#4a328c" transform="rotate(-18 826 778)"/><use href="#e" x="890" y="752" width="32" height="32" color="#6c2997" transform="rotate(8 906 768)"/><use href="#f" x="970" y="762" width="32" height="32" color="#523a94" transform="rotate(-11 986 778)"/><use href="#h" x="1050" y="752" width="32" height="32" color="#4a328c" transform="rotate(20 1066 768)"/><use href="#d" x="1130" y="762" width="32" height="32" color="#6c2997" transform="rotate(-6 1146 778)"/><use href="#i" x="1210" y="752" width="32" height="32" color="#523a94" transform="rotate(15 1226 768)"/><use href="#s" x="1290" y="762" width="32" height="32" color="#4a328c" transform="rotate(-17 1306 778)"/><use href="#j" x="1370" y="752" width="32" height="32" color="#6c2997" transform="rotate(4 1386 768)"/></svg>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export type CallState = 'idle' | 'ringing' | 'incoming' | 'active' | 'ended';
|
|
2
|
+
export interface ActiveCall {
|
|
3
|
+
callId: string;
|
|
4
|
+
callType: 'voice' | 'video';
|
|
5
|
+
remoteUserId: string;
|
|
6
|
+
remoteUserName?: string;
|
|
7
|
+
remoteAvatarSrc?: string;
|
|
8
|
+
state: CallState;
|
|
9
|
+
remoteMuted?: boolean;
|
|
10
|
+
remoteOnHold?: boolean;
|
|
11
|
+
/** The conversation this call was initiated from — used for in-call chat */
|
|
12
|
+
conversationId?: string;
|
|
13
|
+
}
|
|
14
|
+
export interface CallContextValue {
|
|
15
|
+
call: ActiveCall | null;
|
|
16
|
+
localStream: MediaStream | null;
|
|
17
|
+
remoteStream: MediaStream | null;
|
|
18
|
+
initiateCall: (calleeId: string, callType: 'voice' | 'video', conversationId?: string) => Promise<string>;
|
|
19
|
+
acceptCall: () => Promise<void>;
|
|
20
|
+
rejectCall: () => Promise<void>;
|
|
21
|
+
endCall: () => Promise<void>;
|
|
22
|
+
dismissEnded: () => void;
|
|
23
|
+
toggleMute: (muted: boolean) => void;
|
|
24
|
+
toggleCamera: (off: boolean) => void;
|
|
25
|
+
}
|
|
26
|
+
export declare const CallContext: import("react").Context<CallContextValue | null>;
|
|
27
|
+
export declare function useCallContext(): CallContextValue;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface CallControlsProps {
|
|
2
|
+
muted: boolean;
|
|
3
|
+
cameraOff: boolean;
|
|
4
|
+
speakerOn: boolean;
|
|
5
|
+
participantCount?: number;
|
|
6
|
+
onMute: () => void;
|
|
7
|
+
onCamera: () => void;
|
|
8
|
+
onSpeaker?: () => void;
|
|
9
|
+
onScreen?: () => void;
|
|
10
|
+
onParticipants?: () => void;
|
|
11
|
+
onMore?: () => void;
|
|
12
|
+
/** Opens the in-call chat panel — only shown when a conversationId is linked */
|
|
13
|
+
onChat?: () => void;
|
|
14
|
+
onEnd: () => void;
|
|
15
|
+
showCamera?: boolean;
|
|
16
|
+
showScreen?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export declare function CallControls({ muted, cameraOff, speakerOn, participantCount, onMute, onCamera, onSpeaker, onScreen, onParticipants, onMore, onChat, onEnd, showCamera, showScreen, }: CallControlsProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export type CallDirection = 'incoming' | 'outgoing' | 'missed';
|
|
2
|
+
export type CallHistoryType = 'voice' | 'video';
|
|
3
|
+
export interface CallRecord {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
avatarSrc?: string;
|
|
7
|
+
direction: CallDirection;
|
|
8
|
+
callType: CallHistoryType;
|
|
9
|
+
time: string;
|
|
10
|
+
/** The remote user's app_user_id — used to call back */
|
|
11
|
+
remoteUserId: string;
|
|
12
|
+
isGroup?: boolean;
|
|
13
|
+
groupAvatars?: string[];
|
|
14
|
+
}
|
|
15
|
+
interface CallHistoryProps {
|
|
16
|
+
records: CallRecord[];
|
|
17
|
+
onCall: (id: string, type: CallHistoryType) => void;
|
|
18
|
+
activeTab?: 'chats' | 'calls' | 'meet';
|
|
19
|
+
onTabChange?: (tab: 'chats' | 'calls' | 'meet') => void;
|
|
20
|
+
}
|
|
21
|
+
export declare function CallHistory({ records, onCall, activeTab, onTabChange }: CallHistoryProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface CallScreenProps {
|
|
2
|
+
callerName: string;
|
|
3
|
+
callerAvatar?: string;
|
|
4
|
+
callType: 'voice' | 'video';
|
|
5
|
+
remoteStream?: MediaStream | null;
|
|
6
|
+
/** Conversation linked to this call — enables the in-call chat button */
|
|
7
|
+
conversationId?: string;
|
|
8
|
+
onEnd: () => void;
|
|
9
|
+
onMute?: (muted: boolean) => void;
|
|
10
|
+
}
|
|
11
|
+
export declare function CallScreen({ callerName, callerAvatar, remoteStream, conversationId, onEnd, onMute }: CallScreenProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
interface InCallChatPanelProps {
|
|
2
|
+
open: boolean;
|
|
3
|
+
conversationId: string | undefined;
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
}
|
|
6
|
+
export declare function InCallChatPanel({ open, conversationId, onClose }: InCallChatPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface IncomingCallModalProps {
|
|
2
|
+
callerName: string;
|
|
3
|
+
callerAvatar?: string;
|
|
4
|
+
callType: 'voice' | 'video';
|
|
5
|
+
onAccept: () => void;
|
|
6
|
+
onReject: () => void;
|
|
7
|
+
}
|
|
8
|
+
export declare function IncomingCallModal({ callerName, callerAvatar, callType, onAccept, onReject }: IncomingCallModalProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface OutgoingCallScreenProps {
|
|
2
|
+
calleeName: string;
|
|
3
|
+
calleeAvatar?: string;
|
|
4
|
+
callType: 'voice' | 'video';
|
|
5
|
+
state: 'ringing' | 'active';
|
|
6
|
+
onCancel: () => void;
|
|
7
|
+
}
|
|
8
|
+
export declare function OutgoingCallScreen({ calleeName, calleeAvatar, callType, state, onCancel }: OutgoingCallScreenProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export interface VideoParticipant {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
avatarSrc?: string;
|
|
5
|
+
isMuted?: boolean;
|
|
6
|
+
isActiveSpeaker?: boolean;
|
|
7
|
+
videoStream?: MediaStream;
|
|
8
|
+
}
|
|
9
|
+
export interface VideoCallScreenProps {
|
|
10
|
+
title: string;
|
|
11
|
+
participants: VideoParticipant[];
|
|
12
|
+
localParticipant: VideoParticipant;
|
|
13
|
+
remoteStream?: MediaStream | null;
|
|
14
|
+
/** Conversation linked to this call — enables the in-call chat button */
|
|
15
|
+
conversationId?: string;
|
|
16
|
+
onEnd: () => void;
|
|
17
|
+
onMute?: (muted: boolean) => void;
|
|
18
|
+
onCamera?: (off: boolean) => void;
|
|
19
|
+
onParticipants?: () => void;
|
|
20
|
+
onMore?: () => void;
|
|
21
|
+
onMinimize?: () => void;
|
|
22
|
+
}
|
|
23
|
+
export declare function VideoCallScreen({ title, participants, localParticipant, remoteStream, conversationId, onEnd, onMute, onCamera, onParticipants, onMore, onMinimize, }: VideoCallScreenProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { CallScreen } from './CallScreen';
|
|
2
|
+
export type { CallScreenProps } from './CallScreen';
|
|
3
|
+
export { VideoCallScreen } from './VideoCallScreen';
|
|
4
|
+
export type { VideoCallScreenProps, VideoParticipant } from './VideoCallScreen';
|
|
5
|
+
export { IncomingCallModal } from './IncomingCallModal';
|
|
6
|
+
export type { IncomingCallModalProps } from './IncomingCallModal';
|
|
7
|
+
export { CallHistory } from './CallHistory';
|
|
8
|
+
export type { CallRecord, CallDirection, CallHistoryType } from './CallHistory';
|
|
9
|
+
export { CallControls } from './CallControls';
|
|
10
|
+
export type { CallControlsProps } from './CallControls';
|
|
11
|
+
export { InCallChatPanel } from './InCallChatPanel';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export type AttachmentType = 'image' | 'video' | 'audio' | 'document' | 'location';
|
|
2
|
+
export interface AttachmentResult {
|
|
3
|
+
type: AttachmentType;
|
|
4
|
+
mediaId?: string;
|
|
5
|
+
url?: string;
|
|
6
|
+
filename?: string;
|
|
7
|
+
size?: number;
|
|
8
|
+
mimeType?: string;
|
|
9
|
+
waveform?: number[];
|
|
10
|
+
duration?: string;
|
|
11
|
+
location?: {
|
|
12
|
+
lat: number;
|
|
13
|
+
lng: number;
|
|
14
|
+
label?: string;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
export interface AttachmentPickerProps {
|
|
18
|
+
onSelect: (attachment: AttachmentResult) => void;
|
|
19
|
+
onClose?: () => void;
|
|
20
|
+
/** Restrict which tabs are shown. Defaults to all. */
|
|
21
|
+
allow?: AttachmentType[];
|
|
22
|
+
}
|
|
23
|
+
export declare function AttachmentPicker({ onSelect, onClose, allow }: AttachmentPickerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Attachment } from './MessageBubble';
|
|
2
|
+
interface RendererProps {
|
|
3
|
+
attachment: Attachment;
|
|
4
|
+
sender: boolean;
|
|
5
|
+
/** Caption text to overlay (message content) */
|
|
6
|
+
caption?: string;
|
|
7
|
+
/** Bubble border-radius so media clips to the same shape */
|
|
8
|
+
borderRadius: string;
|
|
9
|
+
/** Called when the user clicks a media/file attachment to open the viewer */
|
|
10
|
+
onMediaOpen?: (attachment: Attachment, imageSet?: Attachment[]) => void;
|
|
11
|
+
/** All image attachments in the current conversation (for lightbox navigation) */
|
|
12
|
+
imageSet?: Attachment[];
|
|
13
|
+
}
|
|
14
|
+
export declare function AttachmentRenderer(props: RendererProps): import("react/jsx-runtime").JSX.Element | null;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { AttachmentResult } from './AttachmentPicker';
|
|
2
|
+
export interface AudioRecorderProps {
|
|
3
|
+
onSend: (attachment: AttachmentResult) => void;
|
|
4
|
+
onCancel: () => void;
|
|
5
|
+
}
|
|
6
|
+
export declare function AudioRecorder({ onSend, onCancel }: AudioRecorderProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface BatchToolbarProps {
|
|
2
|
+
selectedCount: number;
|
|
3
|
+
onDelete: () => void;
|
|
4
|
+
onRecall: () => void;
|
|
5
|
+
onForward: () => void;
|
|
6
|
+
onCancel: () => void;
|
|
7
|
+
}
|
|
8
|
+
export declare function BatchToolbar({ selectedCount, onDelete, onRecall, onForward, onCancel }: BatchToolbarProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface CallBannerData {
|
|
2
|
+
callType: 'voice' | 'video';
|
|
3
|
+
callStatus: 'ended' | 'missed';
|
|
4
|
+
durationSeconds: number;
|
|
5
|
+
callId: string;
|
|
6
|
+
}
|
|
7
|
+
interface CallBannerProps {
|
|
8
|
+
data: CallBannerData;
|
|
9
|
+
sender: boolean;
|
|
10
|
+
time: string;
|
|
11
|
+
onCallBack?: (callId: string, type: 'voice' | 'video') => void;
|
|
12
|
+
}
|
|
13
|
+
export declare function CallBanner({ data, sender, time, onCallBack }: CallBannerProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import { type MessageBubbleProps, type Attachment } from './MessageBubble';
|
|
3
|
+
import type { AttachmentResult } from './AttachmentPicker';
|
|
4
|
+
import type { StickerPack } from './StickerPicker';
|
|
5
|
+
/** Info passed to the renderHeader render prop */
|
|
6
|
+
export interface ChatHeaderInfo {
|
|
7
|
+
conversationName: string;
|
|
8
|
+
avatarSrc?: string;
|
|
9
|
+
isOnline?: boolean;
|
|
10
|
+
conversationId?: string;
|
|
11
|
+
otherUserId?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface ChatBoxProps {
|
|
14
|
+
conversationName: string;
|
|
15
|
+
avatarSrc?: string;
|
|
16
|
+
isOnline?: boolean;
|
|
17
|
+
/** Full presence status of the other participant */
|
|
18
|
+
presenceStatus?: 'online' | 'away' | 'offline';
|
|
19
|
+
/**
|
|
20
|
+
* Replace the default header identity section (avatar + name + status) with
|
|
21
|
+
* your own component. Receives the current conversation info as props.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* renderHeader={({ conversationName, avatarSrc, isOnline }) => (
|
|
25
|
+
* <div className="flex items-center gap-2">
|
|
26
|
+
* <img src={avatarSrc} className="w-10 h-10 rounded-full" />
|
|
27
|
+
* <div>
|
|
28
|
+
* <p className="font-semibold">{conversationName}</p>
|
|
29
|
+
* <p className="text-xs text-green-400">{isOnline ? 'Online' : 'Offline'}</p>
|
|
30
|
+
* </div>
|
|
31
|
+
* </div>
|
|
32
|
+
* )}
|
|
33
|
+
*/
|
|
34
|
+
renderHeader?: (info: ChatHeaderInfo) => ReactNode;
|
|
35
|
+
/** A React node rendered at the very top of the message list, before any messages.
|
|
36
|
+
* Only rendered when provided. Useful for announcements, warnings, pinned info, etc. */
|
|
37
|
+
chatBanner?: ReactNode;
|
|
38
|
+
messages: MessageBubbleProps[];
|
|
39
|
+
typingUsers?: string[];
|
|
40
|
+
onBack?: () => void;
|
|
41
|
+
onCall?: () => void;
|
|
42
|
+
onVideoCall?: () => void;
|
|
43
|
+
onSend: (text: string, attachment?: AttachmentResult) => void;
|
|
44
|
+
onTyping?: () => void;
|
|
45
|
+
onCallBack?: (callId: string, type: 'voice' | 'video') => void;
|
|
46
|
+
replyingTo?: {
|
|
47
|
+
messageId: string;
|
|
48
|
+
senderName: string;
|
|
49
|
+
content: string;
|
|
50
|
+
attachmentUrl?: string;
|
|
51
|
+
attachmentType?: string;
|
|
52
|
+
} | null;
|
|
53
|
+
onDismissReply?: () => void;
|
|
54
|
+
onReplyMessage?: (msg: MessageBubbleProps) => void;
|
|
55
|
+
batchMode?: boolean;
|
|
56
|
+
batchSelectedCount?: number;
|
|
57
|
+
batchSelectedIds?: string[];
|
|
58
|
+
onToggleBatchSelect?: (messageId: string) => void;
|
|
59
|
+
onBatchDelete?: () => void;
|
|
60
|
+
onBatchRecall?: () => void;
|
|
61
|
+
onBatchForward?: () => void;
|
|
62
|
+
onBatchCancel?: () => void;
|
|
63
|
+
searchActive?: boolean;
|
|
64
|
+
searchQuery?: string;
|
|
65
|
+
onSearchToggle?: () => void;
|
|
66
|
+
onSearchChange?: (query: string) => void;
|
|
67
|
+
searchResultIds?: string[];
|
|
68
|
+
searchCurrentIndex?: number;
|
|
69
|
+
onSearchNext?: () => void;
|
|
70
|
+
onSearchPrev?: () => void;
|
|
71
|
+
onForwardMessage?: (messageId: string) => void;
|
|
72
|
+
onRecallMessage?: (messageId: string) => void;
|
|
73
|
+
onDeleteMessage?: (messageId: string) => void;
|
|
74
|
+
onInfoMessage?: (messageId: string) => void;
|
|
75
|
+
onEditMessage?: (messageId: string) => void;
|
|
76
|
+
onReactMessage?: (messageId: string, emoji: string) => void;
|
|
77
|
+
onPinMessage?: (messageId: string, isPinned: boolean) => void;
|
|
78
|
+
/** Pinned messages to show in the pinned bar above the message list */
|
|
79
|
+
pinnedMessages?: MessageBubbleProps[];
|
|
80
|
+
/** Whether the conversation is a group */
|
|
81
|
+
isGroup?: boolean;
|
|
82
|
+
/** The other participant's app_user_id — used for live presence updates */
|
|
83
|
+
otherUserId?: string;
|
|
84
|
+
stickerPacks?: StickerPack[];
|
|
85
|
+
tenorApiKey?: string;
|
|
86
|
+
defaultQuickMessages?: import('./QuickMessages').QuickMessage[];
|
|
87
|
+
onMediaOpen?: (attachment: Attachment, imageSet?: Attachment[]) => void;
|
|
88
|
+
imageSet?: Attachment[];
|
|
89
|
+
}
|
|
90
|
+
export declare function ChatBox({ conversationName, avatarSrc, isOnline, presenceStatus, renderHeader, chatBanner, messages, typingUsers, onBack, onCall, onVideoCall, onSend, onTyping, onCallBack, replyingTo, onDismissReply, onReplyMessage, batchMode, batchSelectedCount, batchSelectedIds, onToggleBatchSelect, onBatchDelete, onBatchRecall, onBatchForward, onBatchCancel, searchActive, searchQuery, onSearchToggle, onSearchChange, searchResultIds, searchCurrentIndex, onSearchNext, onSearchPrev, onForwardMessage, onRecallMessage, onDeleteMessage, onInfoMessage, onEditMessage, onReactMessage, onPinMessage, pinnedMessages, isGroup, otherUserId, stickerPacks, tenorApiKey, defaultQuickMessages, onMediaOpen, imageSet, }: ChatBoxProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type AttachmentResult } from './AttachmentPicker';
|
|
2
|
+
import type { StickerPack } from './StickerPicker';
|
|
3
|
+
import type { QuickMessage } from './QuickMessages';
|
|
4
|
+
interface ComposerProps {
|
|
5
|
+
onSend: (text: string) => void;
|
|
6
|
+
onAttach?: (attachment: AttachmentResult) => void;
|
|
7
|
+
onTyping?: () => void;
|
|
8
|
+
placeholder?: string;
|
|
9
|
+
stickerPacks?: StickerPack[];
|
|
10
|
+
tenorApiKey?: string;
|
|
11
|
+
/** Default quick messages seeded into localStorage if none exist yet */
|
|
12
|
+
defaultQuickMessages?: QuickMessage[];
|
|
13
|
+
}
|
|
14
|
+
export declare function Composer({ onSend, onAttach, onTyping, placeholder, stickerPacks, tenorApiKey, defaultQuickMessages }: ComposerProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export interface Conversation {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
avatarSrc?: string;
|
|
5
|
+
lastMessage?: string;
|
|
6
|
+
lastMessageId?: string;
|
|
7
|
+
senderPrefix?: string;
|
|
8
|
+
lastMessageStatus?: 'sent' | 'delivered' | 'read';
|
|
9
|
+
time: string;
|
|
10
|
+
unreadCount?: number;
|
|
11
|
+
isTyping?: boolean;
|
|
12
|
+
typingName?: string;
|
|
13
|
+
isMuted?: boolean;
|
|
14
|
+
isGroup?: boolean;
|
|
15
|
+
groupAvatars?: string[];
|
|
16
|
+
online?: boolean;
|
|
17
|
+
presenceStatus?: 'online' | 'away' | 'offline';
|
|
18
|
+
/** For direct conversations — the other participant's app_user_id, used to initiate calls */
|
|
19
|
+
otherUserId?: string;
|
|
20
|
+
}
|
|
21
|
+
interface ConversationListProps {
|
|
22
|
+
conversations: Conversation[];
|
|
23
|
+
onSelect: (id: string) => void;
|
|
24
|
+
onNewChat?: () => void;
|
|
25
|
+
activeTab?: 'chats' | 'calls' | 'meet';
|
|
26
|
+
onTabChange?: (tab: 'chats' | 'calls' | 'meet') => void;
|
|
27
|
+
globalSearchApiUrl?: string;
|
|
28
|
+
authToken?: string;
|
|
29
|
+
onNavigateToMessage?: (conversationId: string, messageId: string) => void;
|
|
30
|
+
}
|
|
31
|
+
export declare function ConversationList({ conversations, onSelect, onNewChat, activeTab, onTabChange, globalSearchApiUrl, authToken, onNavigateToMessage }: ConversationListProps): import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Conversation } from './ConversationList';
|
|
2
|
+
export interface ConversationPickerProps {
|
|
3
|
+
conversations: Array<Pick<Conversation, 'id' | 'name' | 'avatarSrc'>>;
|
|
4
|
+
onConfirm: (selectedIds: string[]) => void;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
}
|
|
7
|
+
export declare function ConversationPicker({ conversations, onConfirm, onClose }: ConversationPickerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { MessageBubbleProps } from './MessageBubble';
|
|
2
|
+
export interface ConversationProfileProps {
|
|
3
|
+
name: string;
|
|
4
|
+
avatarSrc?: string;
|
|
5
|
+
isOnline?: boolean;
|
|
6
|
+
isGroup?: boolean;
|
|
7
|
+
otherUserId?: string;
|
|
8
|
+
messages: MessageBubbleProps[];
|
|
9
|
+
pinnedMessages: MessageBubbleProps[];
|
|
10
|
+
onClose: () => void;
|
|
11
|
+
onUnpin?: (messageId: string) => void;
|
|
12
|
+
}
|
|
13
|
+
export declare function ConversationProfile({ name, avatarSrc, isOnline, otherUserId, messages, pinnedMessages, onClose, onUnpin, }: ConversationProfileProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { Attachment } from './MessageBubble';
|
|
3
|
+
export type ViewerType = 'image' | 'video' | 'document';
|
|
4
|
+
export interface ActiveViewer {
|
|
5
|
+
type: ViewerType;
|
|
6
|
+
attachment: Attachment;
|
|
7
|
+
imageSet?: Attachment[];
|
|
8
|
+
}
|
|
9
|
+
export interface MediaViewerProps {
|
|
10
|
+
active: ActiveViewer | null;
|
|
11
|
+
onClose: () => void;
|
|
12
|
+
}
|
|
13
|
+
export declare function MediaViewer({ active, onClose }: MediaViewerProps): React.ReactPortal | null;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface MessageActionMenuProps {
|
|
2
|
+
messageId: string;
|
|
3
|
+
isSender: boolean;
|
|
4
|
+
isPinned?: boolean;
|
|
5
|
+
onReply: () => void;
|
|
6
|
+
onReact: () => void;
|
|
7
|
+
onEdit?: () => void;
|
|
8
|
+
onForward: () => void;
|
|
9
|
+
onDelete: () => void;
|
|
10
|
+
onRecall?: () => void;
|
|
11
|
+
onInfo?: () => void;
|
|
12
|
+
onSelect: () => void;
|
|
13
|
+
onPin?: () => void;
|
|
14
|
+
onClose: () => void;
|
|
15
|
+
}
|
|
16
|
+
export declare function MessageActionMenu({ isSender, isPinned, onReply, onReact, onEdit, onForward, onDelete, onRecall, onInfo, onSelect, onPin, onClose, }: MessageActionMenuProps): import("react/jsx-runtime").JSX.Element;
|