@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.
Files changed (103) hide show
  1. package/CHANGELOG.md +56 -0
  2. package/LICENSE +21 -0
  3. package/README.md +374 -0
  4. package/dist/OrbitContext.d.ts +87 -0
  5. package/dist/OrbitProvider.d.ts +24 -0
  6. package/dist/api/client.d.ts +44 -0
  7. package/dist/api/index.d.ts +2 -0
  8. package/dist/bg.svg +1 -0
  9. package/dist/call/CallContext.d.ts +27 -0
  10. package/dist/call/CallProvider.d.ts +4 -0
  11. package/dist/components/call/CallControls.d.ts +18 -0
  12. package/dist/components/call/CallHistory.d.ts +22 -0
  13. package/dist/components/call/CallScreen.d.ts +11 -0
  14. package/dist/components/call/InCallChatPanel.d.ts +7 -0
  15. package/dist/components/call/IncomingCallModal.d.ts +8 -0
  16. package/dist/components/call/OutgoingCallScreen.d.ts +8 -0
  17. package/dist/components/call/VideoCallScreen.d.ts +23 -0
  18. package/dist/components/call/index.d.ts +11 -0
  19. package/dist/components/chat/AttachmentPicker.d.ts +23 -0
  20. package/dist/components/chat/AttachmentRenderer.d.ts +15 -0
  21. package/dist/components/chat/AudioRecorder.d.ts +6 -0
  22. package/dist/components/chat/BatchToolbar.d.ts +8 -0
  23. package/dist/components/chat/CallBanner.d.ts +14 -0
  24. package/dist/components/chat/ChatBox.d.ts +90 -0
  25. package/dist/components/chat/Composer.d.ts +15 -0
  26. package/dist/components/chat/ConversationList.d.ts +32 -0
  27. package/dist/components/chat/ConversationPicker.d.ts +7 -0
  28. package/dist/components/chat/ConversationProfile.d.ts +13 -0
  29. package/dist/components/chat/DocumentViewer.d.ts +2 -0
  30. package/dist/components/chat/EmojiPicker.d.ts +5 -0
  31. package/dist/components/chat/ImageViewer.d.ts +2 -0
  32. package/dist/components/chat/LinkPreview.d.ts +7 -0
  33. package/dist/components/chat/MediaMessage.d.ts +5 -0
  34. package/dist/components/chat/MediaViewer.d.ts +13 -0
  35. package/dist/components/chat/MessageActionMenu.d.ts +16 -0
  36. package/dist/components/chat/MessageBubble.d.ts +61 -0
  37. package/dist/components/chat/MessageInfoSheet.d.ts +7 -0
  38. package/dist/components/chat/MessageInput.d.ts +12 -0
  39. package/dist/components/chat/MessageList.d.ts +7 -0
  40. package/dist/components/chat/QuickMessages.d.ts +17 -0
  41. package/dist/components/chat/ReactionDialog.d.ts +6 -0
  42. package/dist/components/chat/ReplyComposer.d.ts +8 -0
  43. package/dist/components/chat/StickerPicker.d.ts +21 -0
  44. package/dist/components/chat/VideoViewer.d.ts +2 -0
  45. package/dist/components/chat/emojiData.d.ts +9 -0
  46. package/dist/components/chat/index.d.ts +44 -0
  47. package/dist/components/chat/mediaViewerRegistry.d.ts +22 -0
  48. package/dist/components/chat/urlUtils.d.ts +1 -0
  49. package/dist/components/index.d.ts +4 -0
  50. package/dist/components/meeting/MeetingControls.d.ts +15 -0
  51. package/dist/components/meeting/MeetingRoom.d.ts +27 -0
  52. package/dist/components/meeting/ParticipantGrid.d.ts +6 -0
  53. package/dist/components/meeting/ParticipantsPanel.d.ts +8 -0
  54. package/dist/components/meeting/ReactionBurst.d.ts +9 -0
  55. package/dist/components/meeting/ScreenShareView.d.ts +5 -0
  56. package/dist/components/meeting/WaitingRoom.d.ts +7 -0
  57. package/dist/components/meeting/index.d.ts +8 -0
  58. package/dist/components/ui/Avatar.d.ts +13 -0
  59. package/dist/components/ui/BottomNav.d.ts +8 -0
  60. package/dist/components/ui/EscalationButton.d.ts +12 -0
  61. package/dist/components/ui/IconBtn.d.ts +8 -0
  62. package/dist/components/ui/PoweredBy.d.ts +1 -0
  63. package/dist/components/ui/index.d.ts +5 -0
  64. package/dist/favicon.svg +1 -0
  65. package/dist/hooks/index.d.ts +20 -0
  66. package/dist/hooks/useAppBrand.d.ts +6 -0
  67. package/dist/hooks/useCall.d.ts +2 -0
  68. package/dist/hooks/useCallHistory.d.ts +5 -0
  69. package/dist/hooks/useConversations.d.ts +7 -0
  70. package/dist/hooks/useMedia.d.ts +19 -0
  71. package/dist/hooks/useMeeting.d.ts +22 -0
  72. package/dist/hooks/useMeetingWebRTC.d.ts +28 -0
  73. package/dist/hooks/useMessages.d.ts +11 -0
  74. package/dist/hooks/useNotifications.d.ts +19 -0
  75. package/dist/hooks/usePresence.d.ts +8 -0
  76. package/dist/hooks/usePushToken.d.ts +11 -0
  77. package/dist/hooks/useRealtime.d.ts +21 -0
  78. package/dist/hooks/useRecording.d.ts +16 -0
  79. package/dist/hooks/useSound.d.ts +9 -0
  80. package/dist/hooks/useWebRTC.d.ts +12 -0
  81. package/dist/icons.svg +24 -0
  82. package/dist/index.css +1 -0
  83. package/dist/index.d.ts +16 -0
  84. package/dist/index.js +12441 -0
  85. package/dist/meeting/MeetingContext.d.ts +19 -0
  86. package/dist/meeting/MeetingProvider.d.ts +4 -0
  87. package/dist/meeting/index.d.ts +3 -0
  88. package/dist/socket/OrbitListenerProvider.d.ts +14 -0
  89. package/dist/socket/OrbitSocket.d.ts +97 -0
  90. package/dist/socket/config.d.ts +10 -0
  91. package/dist/socket/context.d.ts +10 -0
  92. package/dist/socket/events.d.ts +283 -0
  93. package/dist/socket/index.d.ts +8 -0
  94. package/dist/socket/useOrbitEvent.d.ts +8 -0
  95. package/dist/theme/ThemeProvider.d.ts +17 -0
  96. package/dist/theme/defaults.d.ts +3 -0
  97. package/dist/theme/index.d.ts +3 -0
  98. package/dist/theme/types.d.ts +85 -0
  99. package/dist/widgets/Chat.d.ts +13 -0
  100. package/dist/widgets/MeetingWidget.d.ts +6 -0
  101. package/dist/widgets/VideoCall.d.ts +1 -0
  102. package/dist/widgets/index.d.ts +6 -0
  103. package/package.json +79 -0
@@ -0,0 +1,61 @@
1
+ import { type CallBannerData } from './CallBanner';
2
+ export type { CallBannerData };
3
+ export interface Attachment {
4
+ type: 'image' | 'video' | 'audio' | 'file' | 'location' | 'sticker';
5
+ url?: string;
6
+ name?: string;
7
+ size?: string;
8
+ duration?: string;
9
+ waveform?: number[];
10
+ lat?: number;
11
+ lng?: number;
12
+ label?: string;
13
+ }
14
+ export interface Reaction {
15
+ emoji: string;
16
+ count: number;
17
+ own?: boolean;
18
+ }
19
+ export interface ReplyPreview {
20
+ senderName: string;
21
+ text: string;
22
+ messageId?: string;
23
+ attachmentUrl?: string;
24
+ attachmentType?: string;
25
+ }
26
+ export interface MessageBubbleProps {
27
+ id: string;
28
+ content?: string;
29
+ sender: boolean;
30
+ time: string;
31
+ status?: 'sent' | 'delivered' | 'read';
32
+ avatarSrc?: string;
33
+ senderName?: string;
34
+ attachment?: Attachment;
35
+ callBanner?: CallBannerData;
36
+ onCallBack?: (callId: string, type: 'voice' | 'video') => void;
37
+ reply?: ReplyPreview;
38
+ reactions?: Reaction[];
39
+ isGrouped?: boolean;
40
+ updated_at?: string;
41
+ recalled?: boolean;
42
+ forwarded?: boolean;
43
+ edited?: boolean;
44
+ selectable?: boolean;
45
+ selected?: boolean;
46
+ onSelect?: () => void;
47
+ onReplyClick?: (replyToId: string) => void;
48
+ onReply?: () => void;
49
+ onReact?: (emoji: string) => void;
50
+ onEdit?: () => void;
51
+ onForward?: () => void;
52
+ onDelete?: () => void;
53
+ onRecall?: () => void;
54
+ onInfo?: () => void;
55
+ highlighted?: boolean;
56
+ pinned?: boolean;
57
+ onPin?: () => void;
58
+ onMediaOpen?: (attachment: Attachment, imageSet?: Attachment[]) => void;
59
+ imageSet?: Attachment[];
60
+ }
61
+ export declare function MessageBubble({ id, content, sender, time, status, avatarSrc, senderName, attachment, callBanner, onCallBack, reply, reactions, isGrouped, recalled, forwarded, edited, selectable, selected, onSelect, onReplyClick, onReply, onReact, onEdit, onForward, onDelete, onRecall, onInfo, highlighted, pinned, onPin, onMediaOpen, imageSet, }: MessageBubbleProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,7 @@
1
+ export interface MessageInfoSheetProps {
2
+ messageId: string;
3
+ apiBaseUrl: string;
4
+ authToken: string;
5
+ onClose: () => void;
6
+ }
7
+ export declare function MessageInfoSheet({ messageId, apiBaseUrl, authToken, onClose }: MessageInfoSheetProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,12 @@
1
+ import type { AttachmentResult } from './AttachmentPicker';
2
+ import type { StickerPack } from './StickerPicker';
3
+ import type { QuickMessage } from './QuickMessages';
4
+ export interface MessageInputProps {
5
+ onSend: (text: string, attachment?: AttachmentResult) => void;
6
+ onTyping?: () => void;
7
+ placeholder?: string;
8
+ stickerPacks?: StickerPack[];
9
+ tenorApiKey?: string;
10
+ defaultQuickMessages?: QuickMessage[];
11
+ }
12
+ export declare function MessageInput({ onSend, onTyping, placeholder, stickerPacks, tenorApiKey, defaultQuickMessages }: MessageInputProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { type MessageBubbleProps } from './MessageBubble';
2
+ export interface MessageListProps {
3
+ messages: MessageBubbleProps[];
4
+ typingUsers?: string[];
5
+ onCallBack?: (callId: string, type: 'voice' | 'video') => void;
6
+ }
7
+ export declare function MessageList({ messages, typingUsers, onCallBack }: MessageListProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,17 @@
1
+ export interface QuickMessage {
2
+ id: string;
3
+ label: string;
4
+ text: string;
5
+ }
6
+ interface QuickMessagePickerProps {
7
+ onSelect: (text: string) => void;
8
+ onClose: () => void;
9
+ onManage: () => void;
10
+ }
11
+ export declare function QuickMessagePicker({ onSelect, onClose, onManage }: QuickMessagePickerProps): import("react/jsx-runtime").JSX.Element;
12
+ interface QuickMessageManagerProps {
13
+ defaultMessages?: QuickMessage[];
14
+ onClose: () => void;
15
+ }
16
+ export declare function QuickMessageManager({ defaultMessages, onClose }: QuickMessageManagerProps): import("react/jsx-runtime").JSX.Element;
17
+ export {};
@@ -0,0 +1,6 @@
1
+ export interface ReactionDialogProps {
2
+ messageId: string;
3
+ onSelect: (emoji: string) => void;
4
+ onClose: () => void;
5
+ }
6
+ export declare function ReactionDialog({ onSelect, onClose }: ReactionDialogProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,8 @@
1
+ export interface ReplyComposerProps {
2
+ senderName: string;
3
+ content: string;
4
+ onDismiss: () => void;
5
+ attachmentUrl?: string;
6
+ attachmentType?: string;
7
+ }
8
+ export declare function ReplyComposer({ senderName, content, onDismiss, attachmentUrl, attachmentType }: ReplyComposerProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,21 @@
1
+ export interface StickerItem {
2
+ id: string;
3
+ url: string;
4
+ previewUrl: string;
5
+ title?: string;
6
+ }
7
+ export interface StickerPack {
8
+ id: string;
9
+ name: string;
10
+ thumbnail?: string;
11
+ stickers: StickerItem[];
12
+ }
13
+ export interface StickerPickerProps {
14
+ onSelect: (sticker: StickerItem) => void;
15
+ onClose?: () => void;
16
+ /** Custom sticker packs provided by the app developer */
17
+ customPacks?: StickerPack[];
18
+ /** Tenor API key — defaults to the anonymous key (limited rate) */
19
+ tenorApiKey?: string;
20
+ }
21
+ export declare function StickerPicker({ onSelect, onClose, customPacks, tenorApiKey }: StickerPickerProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import type { VideoViewerProps } from './mediaViewerRegistry';
2
+ export declare function VideoViewer({ attachment, onClose }: VideoViewerProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,9 @@
1
+ export interface EmojiCategory {
2
+ id: string;
3
+ label: string;
4
+ icon: string;
5
+ emojis: string[];
6
+ }
7
+ export declare const EMOJI_CATEGORIES: EmojiCategory[];
8
+ export declare function getRecent(): string[];
9
+ export declare function addRecent(emoji: string): void;
@@ -0,0 +1,44 @@
1
+ export { ConversationList } from './ConversationList';
2
+ export type { Conversation } from './ConversationList';
3
+ export { ChatBox } from './ChatBox';
4
+ export type { ChatBoxProps, ChatHeaderInfo } from './ChatBox';
5
+ export { MessageBubble } from './MessageBubble';
6
+ export type { MessageBubbleProps, Attachment, Reaction, ReplyPreview } from './MessageBubble';
7
+ export { Composer } from './Composer';
8
+ export { EmojiPicker } from './EmojiPicker';
9
+ export type { EmojiPickerProps } from './EmojiPicker';
10
+ export { ReactionDialog } from './ReactionDialog';
11
+ export type { ReactionDialogProps } from './ReactionDialog';
12
+ export { AttachmentPicker } from './AttachmentPicker';
13
+ export type { AttachmentPickerProps, AttachmentResult, AttachmentType } from './AttachmentPicker';
14
+ export { AttachmentRenderer } from './AttachmentRenderer';
15
+ export { AudioRecorder } from './AudioRecorder';
16
+ export type { AudioRecorderProps } from './AudioRecorder';
17
+ export { CallBanner } from './CallBanner';
18
+ export type { CallBannerData } from './CallBanner';
19
+ export { MessageList } from './MessageList';
20
+ export type { MessageListProps } from './MessageList';
21
+ export { MessageInput } from './MessageInput';
22
+ export type { MessageInputProps } from './MessageInput';
23
+ export { MediaMessage } from './MediaMessage';
24
+ export type { MediaMessageProps } from './MediaMessage';
25
+ export { MessageActionMenu } from './MessageActionMenu';
26
+ export type { MessageActionMenuProps } from './MessageActionMenu';
27
+ export { ReplyComposer } from './ReplyComposer';
28
+ export type { ReplyComposerProps } from './ReplyComposer';
29
+ export { MessageInfoSheet } from './MessageInfoSheet';
30
+ export type { MessageInfoSheetProps } from './MessageInfoSheet';
31
+ export { ConversationPicker } from './ConversationPicker';
32
+ export type { ConversationPickerProps } from './ConversationPicker';
33
+ export { BatchToolbar } from './BatchToolbar';
34
+ export type { BatchToolbarProps } from './BatchToolbar';
35
+ export { StickerPicker } from './StickerPicker';
36
+ export type { StickerPickerProps, StickerPack, StickerItem } from './StickerPicker';
37
+ export { LinkPreview, extractUrls } from './LinkPreview';
38
+ export type { LinkPreviewProps } from './LinkPreview';
39
+ export { MediaViewer } from './MediaViewer';
40
+ export type { MediaViewerProps, ActiveViewer, ViewerType } from './MediaViewer';
41
+ export { ImageViewer } from './ImageViewer';
42
+ export { VideoViewer } from './VideoViewer';
43
+ export { DocumentViewer } from './DocumentViewer';
44
+ export type { ImageViewerProps, VideoViewerProps, DocumentViewerProps } from './mediaViewerRegistry';
@@ -0,0 +1,22 @@
1
+ import type React from 'react';
2
+ import type { Attachment } from './MessageBubble';
3
+ export interface ImageViewerProps {
4
+ attachment: Attachment;
5
+ imageSet: Attachment[];
6
+ onClose: () => void;
7
+ }
8
+ export interface VideoViewerProps {
9
+ attachment: Attachment;
10
+ onClose: () => void;
11
+ }
12
+ export interface DocumentViewerProps {
13
+ attachment: Attachment;
14
+ onClose: () => void;
15
+ }
16
+ type ViewerRegistry = {
17
+ ImageViewer?: React.ComponentType<ImageViewerProps>;
18
+ VideoViewer?: React.ComponentType<VideoViewerProps>;
19
+ DocumentViewer?: React.ComponentType<DocumentViewerProps>;
20
+ };
21
+ export declare const viewerRegistry: ViewerRegistry;
22
+ export {};
@@ -0,0 +1 @@
1
+ export declare function extractUrls(text: string): string[];
@@ -0,0 +1,4 @@
1
+ export * from './ui';
2
+ export * from './chat';
3
+ export * from './call';
4
+ export * from './meeting';
@@ -0,0 +1,15 @@
1
+ export interface MeetingControlsProps {
2
+ muted: boolean;
3
+ cameraOff: boolean;
4
+ screenSharing: boolean;
5
+ handRaised: boolean;
6
+ participantCount: number;
7
+ onMute: (muted: boolean) => void;
8
+ onCamera: (off: boolean) => void;
9
+ onScreenShare: (sharing: boolean) => void;
10
+ onHandRaise: (raised: boolean) => void;
11
+ onReaction: (emoji: string) => void;
12
+ onParticipants: () => void;
13
+ onEnd: () => void;
14
+ }
15
+ export declare function MeetingControls({ muted, cameraOff, screenSharing, handRaised, participantCount, onMute, onCamera, onScreenShare, onHandRaise, onReaction, onParticipants, onEnd, }: MeetingControlsProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,27 @@
1
+ import { type ReactionEvent } from './ReactionBurst';
2
+ export interface MeetingParticipant {
3
+ id: string;
4
+ name: string;
5
+ avatarSrc?: string;
6
+ isMuted?: boolean;
7
+ isActiveSpeaker?: boolean;
8
+ isScreenSharing?: boolean;
9
+ videoStream?: MediaStream;
10
+ screenStream?: MediaStream;
11
+ }
12
+ export interface MeetingRoomProps {
13
+ title: string;
14
+ participants: MeetingParticipant[];
15
+ localParticipant: MeetingParticipant;
16
+ activeSpeakerId?: string;
17
+ handRaisedIds?: string[];
18
+ reactionEvents?: ReactionEvent[];
19
+ onEnd: () => void;
20
+ onMute: (muted: boolean) => void;
21
+ onCamera: (off: boolean) => void;
22
+ onScreenShare: (sharing: boolean) => void;
23
+ onHandRaise: (raised: boolean) => void;
24
+ onReaction: (emoji: string) => void;
25
+ onMinimize?: () => void;
26
+ }
27
+ export declare function MeetingRoom({ title, participants, localParticipant, activeSpeakerId, handRaisedIds, reactionEvents, onEnd, onMute, onCamera, onScreenShare, onHandRaise, onReaction, onMinimize, }: MeetingRoomProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import type { MeetingParticipant } from './MeetingRoom';
2
+ export interface ParticipantGridProps {
3
+ participants: MeetingParticipant[];
4
+ localParticipant: MeetingParticipant;
5
+ }
6
+ export declare function ParticipantGrid({ participants, localParticipant }: ParticipantGridProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import type { MeetingParticipant } from './MeetingRoom';
2
+ export interface ParticipantsPanelProps {
3
+ participants: MeetingParticipant[];
4
+ localParticipant: MeetingParticipant;
5
+ handRaisedIds: string[];
6
+ onClose: () => void;
7
+ }
8
+ export declare function ParticipantsPanel({ participants, localParticipant, handRaisedIds, onClose }: ParticipantsPanelProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,9 @@
1
+ export interface ReactionEvent {
2
+ id: string;
3
+ emoji: string;
4
+ name: string;
5
+ }
6
+ export interface ReactionBurstProps {
7
+ reactions: ReactionEvent[];
8
+ }
9
+ export declare function ReactionBurst({ reactions }: ReactionBurstProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ export interface ScreenShareViewProps {
2
+ stream: MediaStream;
3
+ presenterName: string;
4
+ }
5
+ export declare function ScreenShareView({ stream, presenterName }: ScreenShareViewProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,7 @@
1
+ export interface WaitingRoomProps {
2
+ title: string;
3
+ localStream?: MediaStream;
4
+ onEnd: () => void;
5
+ onMinimize?: () => void;
6
+ }
7
+ export declare function WaitingRoom({ title, localStream, onEnd, onMinimize }: WaitingRoomProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,8 @@
1
+ export { MeetingRoom } from './MeetingRoom';
2
+ export type { MeetingRoomProps, MeetingParticipant } from './MeetingRoom';
3
+ export { WaitingRoom } from './WaitingRoom';
4
+ export type { WaitingRoomProps } from './WaitingRoom';
5
+ export { ScreenShareView } from './ScreenShareView';
6
+ export type { ScreenShareViewProps } from './ScreenShareView';
7
+ export { ParticipantGrid } from './ParticipantGrid';
8
+ export type { ParticipantGridProps } from './ParticipantGrid';
@@ -0,0 +1,13 @@
1
+ export type PresenceStatus = 'online' | 'away' | 'offline';
2
+ interface AvatarProps {
3
+ src?: string;
4
+ name?: string;
5
+ size?: number;
6
+ /** Legacy boolean — kept for backwards compat, maps to 'online' */
7
+ online?: boolean;
8
+ /** Full presence status — takes precedence over `online` */
9
+ status?: PresenceStatus;
10
+ className?: string;
11
+ }
12
+ export declare function Avatar({ src, name, size, online, status, className }: AvatarProps): import("react/jsx-runtime").JSX.Element;
13
+ export {};
@@ -0,0 +1,8 @@
1
+ type Tab = 'chats' | 'calls' | 'meet';
2
+ interface BottomNavProps {
3
+ active: Tab;
4
+ onChange: (tab: Tab) => void;
5
+ unreadChats?: boolean;
6
+ }
7
+ export declare function BottomNav({ active, onChange, unreadChats }: BottomNavProps): import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,12 @@
1
+ import { type TransitionType } from '../../hooks/useRealtime';
2
+ export interface EscalationButtonProps {
3
+ transitionType: TransitionType;
4
+ contextId?: string;
5
+ label?: string;
6
+ className?: string;
7
+ }
8
+ /**
9
+ * A button that triggers a realtime session transition.
10
+ * Requires an active session from `useRealtime`.
11
+ */
12
+ export declare function EscalationButton({ transitionType, contextId, label, className }: EscalationButtonProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import type { ReactNode, ButtonHTMLAttributes } from 'react';
2
+ interface IconBtnProps extends ButtonHTMLAttributes<HTMLButtonElement> {
3
+ children: ReactNode;
4
+ variant?: 'ghost' | 'filled' | 'danger';
5
+ size?: number;
6
+ }
7
+ export declare function IconBtn({ children, variant, size, className, ...props }: IconBtnProps): import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1 @@
1
+ export declare function PoweredBy(): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,5 @@
1
+ export { Avatar } from './Avatar';
2
+ export { IconBtn } from './IconBtn';
3
+ export { BottomNav } from './BottomNav';
4
+ export { EscalationButton } from './EscalationButton';
5
+ export type { EscalationButtonProps } from './EscalationButton';
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="48" height="46" fill="none" viewBox="0 0 48 46"><path fill="#863bff" d="M25.946 44.938c-.664.845-2.021.375-2.021-.698V33.937a2.26 2.26 0 0 0-2.262-2.262H10.287c-.92 0-1.456-1.04-.92-1.788l7.48-10.471c1.07-1.497 0-3.578-1.842-3.578H1.237c-.92 0-1.456-1.04-.92-1.788L10.013.474c.214-.297.556-.474.92-.474h28.894c.92 0 1.456 1.04.92 1.788l-7.48 10.471c-1.07 1.498 0 3.579 1.842 3.579h11.377c.943 0 1.473 1.088.89 1.83L25.947 44.94z" style="fill:#863bff;fill:color(display-p3 .5252 .23 1);fill-opacity:1"/><mask id="a" width="48" height="46" x="0" y="0" maskUnits="userSpaceOnUse" style="mask-type:alpha"><path fill="#000" d="M25.842 44.938c-.664.844-2.021.375-2.021-.698V33.937a2.26 2.26 0 0 0-2.262-2.262H10.183c-.92 0-1.456-1.04-.92-1.788l7.48-10.471c1.07-1.498 0-3.579-1.842-3.579H1.133c-.92 0-1.456-1.04-.92-1.787L9.91.473c.214-.297.556-.474.92-.474h28.894c.92 0 1.456 1.04.92 1.788l-7.48 10.471c-1.07 1.498 0 3.578 1.842 3.578h11.377c.943 0 1.473 1.088.89 1.832L25.843 44.94z" style="fill:#000;fill-opacity:1"/></mask><g mask="url(#a)"><g filter="url(#b)"><ellipse cx="5.508" cy="14.704" fill="#ede6ff" rx="5.508" ry="14.704" style="fill:#ede6ff;fill:color(display-p3 .9275 .9033 1);fill-opacity:1" transform="matrix(.00324 1 1 -.00324 -4.47 31.516)"/></g><g filter="url(#c)"><ellipse cx="10.399" cy="29.851" fill="#ede6ff" rx="10.399" ry="29.851" style="fill:#ede6ff;fill:color(display-p3 .9275 .9033 1);fill-opacity:1" transform="matrix(.00324 1 1 -.00324 -39.328 7.883)"/></g><g filter="url(#d)"><ellipse cx="5.508" cy="30.487" fill="#7e14ff" rx="5.508" ry="30.487" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="rotate(89.814 -25.913 -14.639)scale(1 -1)"/></g><g filter="url(#e)"><ellipse cx="5.508" cy="30.599" fill="#7e14ff" rx="5.508" ry="30.599" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="rotate(89.814 -32.644 -3.334)scale(1 -1)"/></g><g filter="url(#f)"><ellipse cx="5.508" cy="30.599" fill="#7e14ff" rx="5.508" ry="30.599" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="matrix(.00324 1 1 -.00324 -34.34 30.47)"/></g><g filter="url(#g)"><ellipse cx="14.072" cy="22.078" fill="#ede6ff" rx="14.072" ry="22.078" style="fill:#ede6ff;fill:color(display-p3 .9275 .9033 1);fill-opacity:1" transform="rotate(93.35 24.506 48.493)scale(-1 1)"/></g><g filter="url(#h)"><ellipse cx="3.47" cy="21.501" fill="#7e14ff" rx="3.47" ry="21.501" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="rotate(89.009 28.708 47.59)scale(-1 1)"/></g><g filter="url(#i)"><ellipse cx="3.47" cy="21.501" fill="#7e14ff" rx="3.47" ry="21.501" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="rotate(89.009 28.708 47.59)scale(-1 1)"/></g><g filter="url(#j)"><ellipse cx=".387" cy="8.972" fill="#7e14ff" rx="4.407" ry="29.108" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="rotate(39.51 .387 8.972)"/></g><g filter="url(#k)"><ellipse cx="47.523" cy="-6.092" fill="#7e14ff" rx="4.407" ry="29.108" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="rotate(37.892 47.523 -6.092)"/></g><g filter="url(#l)"><ellipse cx="41.412" cy="6.333" fill="#47bfff" rx="5.971" ry="9.665" style="fill:#47bfff;fill:color(display-p3 .2799 .748 1);fill-opacity:1" transform="rotate(37.892 41.412 6.333)"/></g><g filter="url(#m)"><ellipse cx="-1.879" cy="38.332" fill="#7e14ff" rx="4.407" ry="29.108" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="rotate(37.892 -1.88 38.332)"/></g><g filter="url(#n)"><ellipse cx="-1.879" cy="38.332" fill="#7e14ff" rx="4.407" ry="29.108" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="rotate(37.892 -1.88 38.332)"/></g><g filter="url(#o)"><ellipse cx="35.651" cy="29.907" fill="#7e14ff" rx="4.407" ry="29.108" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="rotate(37.892 35.651 29.907)"/></g><g filter="url(#p)"><ellipse cx="38.418" cy="32.4" fill="#47bfff" rx="5.971" ry="15.297" style="fill:#47bfff;fill:color(display-p3 .2799 .748 1);fill-opacity:1" transform="rotate(37.892 38.418 32.4)"/></g></g><defs><filter id="b" width="60.045" height="41.654" x="-19.77" y="16.149" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="7.659"/></filter><filter id="c" width="90.34" height="51.437" x="-54.613" y="-7.533" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="7.659"/></filter><filter id="d" width="79.355" height="29.4" x="-49.64" y="2.03" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="e" width="79.579" height="29.4" x="-45.045" y="20.029" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="f" width="79.579" height="29.4" x="-43.513" y="21.178" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="g" width="74.749" height="58.852" x="15.756" y="-17.901" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="7.659"/></filter><filter id="h" width="61.377" height="25.362" x="23.548" y="2.284" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="i" width="61.377" height="25.362" x="23.548" y="2.284" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="j" width="56.045" height="63.649" x="-27.636" y="-22.853" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="k" width="54.814" height="64.646" x="20.116" y="-38.415" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="l" width="33.541" height="35.313" x="24.641" y="-11.323" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="m" width="54.814" height="64.646" x="-29.286" y="6.009" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="n" width="54.814" height="64.646" x="-29.286" y="6.009" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="o" width="54.814" height="64.646" x="8.244" y="-2.416" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="p" width="39.409" height="43.623" x="18.713" y="10.588" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter></defs></svg>
@@ -0,0 +1,20 @@
1
+ export { useMessages } from './useMessages';
2
+ export { useConversations } from './useConversations';
3
+ export { useCall } from './useCall';
4
+ export type { ActiveCall, CallState } from './useCall';
5
+ export { useMeeting } from './useMeeting';
6
+ export type { ActiveMeeting, MeetingState } from './useMeeting';
7
+ export { useMeetingWebRTC } from './useMeetingWebRTC';
8
+ export type { UseMeetingWebRTCOptions, RemoteStream } from './useMeetingWebRTC';
9
+ export { useCallHistory } from './useCallHistory';
10
+ export { useWebRTC } from './useWebRTC';
11
+ export type { UseWebRTCOptions } from './useWebRTC';
12
+ export { usePresence } from './usePresence';
13
+ export type { PresenceStatus } from './usePresence';
14
+ export { useRealtime } from './useRealtime';
15
+ export type { RealtimeSession, CreateSessionInput, TransitionType } from './useRealtime';
16
+ export { useMedia } from './useMedia';
17
+ export type { MediaObject } from './useMedia';
18
+ export { useNotifications } from './useNotifications';
19
+ export type { OrbitNotification } from './useNotifications';
20
+ export { usePushToken } from './usePushToken';
@@ -0,0 +1,6 @@
1
+ import type { ReactNode } from 'react';
2
+ /**
3
+ * Returns the resolved brand node to render in place of "OrbitConnect".
4
+ * Respects showNameOnly / showLogoOnly / showNameAndLogo flags.
5
+ */
6
+ export declare function useAppBrand(): ReactNode;
@@ -0,0 +1,2 @@
1
+ export { useCallContext as useCall } from '../call/CallContext';
2
+ export type { ActiveCall, CallState } from '../call/CallContext';
@@ -0,0 +1,5 @@
1
+ import type { CallRecord } from '../components/call/CallHistory';
2
+ export declare function useCallHistory(): {
3
+ records: CallRecord[];
4
+ loading: boolean;
5
+ };
@@ -0,0 +1,7 @@
1
+ import type { Conversation } from '../components/chat/ConversationList';
2
+ export declare function useConversations(): {
3
+ conversations: Conversation[];
4
+ loading: boolean;
5
+ createDirect: (participantId: string) => Promise<string>;
6
+ refresh: () => void;
7
+ };
@@ -0,0 +1,19 @@
1
+ export interface MediaObject {
2
+ id: string;
3
+ url: string;
4
+ type: 'image' | 'video' | 'audio' | 'document' | 'recording';
5
+ filename: string;
6
+ size: number;
7
+ mime_type?: string;
8
+ status?: 'uploaded' | 'processing' | 'ready' | 'failed';
9
+ created_at: string;
10
+ }
11
+ export declare function useMedia(): {
12
+ upload: (file: File) => Promise<MediaObject>;
13
+ uploadRecording: (file: File) => Promise<MediaObject>;
14
+ uploadAndWait: (file: File) => Promise<MediaObject>;
15
+ getMedia: (mediaId: string) => Promise<MediaObject>;
16
+ isUploading: boolean;
17
+ isProcessing: boolean;
18
+ error: string | null;
19
+ };
@@ -0,0 +1,22 @@
1
+ import type { MeetingParticipant } from '../components/meeting/MeetingRoom';
2
+ export type MeetingState = 'idle' | 'waiting' | 'active' | 'ended';
3
+ export interface ActiveMeeting {
4
+ meetingId: string;
5
+ title: string;
6
+ state: MeetingState;
7
+ participants: MeetingParticipant[];
8
+ activeSpeakerId?: string;
9
+ handRaisedIds: string[];
10
+ }
11
+ export declare function useMeeting(): {
12
+ meeting: ActiveMeeting | null;
13
+ joinMeeting: (meetingId: string, title: string) => Promise<void>;
14
+ leaveMeeting: () => Promise<void>;
15
+ muteSelf: () => void;
16
+ unmuteSelf: () => void;
17
+ startScreenShare: () => Promise<void>;
18
+ stopScreenShare: () => Promise<void>;
19
+ raiseHand: () => void;
20
+ lowerHand: () => void;
21
+ sendReaction: (emoji: string) => void;
22
+ };
@@ -0,0 +1,28 @@
1
+ export interface RemoteStream {
2
+ userId: string;
3
+ stream: MediaStream;
4
+ }
5
+ export interface UseMeetingWebRTCOptions {
6
+ meetingId: string | null;
7
+ onRemoteStream: (userId: string, stream: MediaStream) => void;
8
+ onRemoteStreamRemoved: (userId: string) => void;
9
+ }
10
+ /**
11
+ * Manages a mesh of RTCPeerConnections for a meeting.
12
+ * Each remote participant gets their own PeerConnection.
13
+ *
14
+ * Signaling flow:
15
+ * - When a new participant joins, the existing participants each send them an offer.
16
+ * - The new participant answers each offer.
17
+ * - ICE candidates are trickled directly to the target peer via the server relay.
18
+ */
19
+ export declare function useMeetingWebRTC({ meetingId, onRemoteStream, onRemoteStreamRemoved }: UseMeetingWebRTCOptions): {
20
+ localStreamRef: import("react").RefObject<MediaStream | null>;
21
+ peersRef: import("react").RefObject<Map<string, RTCPeerConnection>>;
22
+ startLocalMedia: (video?: boolean) => Promise<MediaStream>;
23
+ connectToPeer: (peerId: string) => Promise<void>;
24
+ disconnectPeer: (peerId: string) => void;
25
+ cleanup: () => void;
26
+ toggleMute: (muted: boolean) => void;
27
+ toggleCamera: (off: boolean) => void;
28
+ };
@@ -0,0 +1,11 @@
1
+ import type { MessageBubbleProps } from '../components/chat/MessageBubble';
2
+ export declare function useMessages(conversationId: string): {
3
+ messages: MessageBubbleProps[];
4
+ loading: boolean;
5
+ typingUsers: string[];
6
+ pinnedMessages: MessageBubbleProps[];
7
+ sendMessage: (text: string, mediaId?: string, attachmentMeta?: Record<string, unknown>) => Promise<void>;
8
+ sendTyping: () => void;
9
+ markRead: (messageId: string) => void;
10
+ editMessageLocally: (messageId: string, content: string) => void;
11
+ };
@@ -0,0 +1,19 @@
1
+ import type { NotificationReceivedPayload } from '../socket/events';
2
+ export interface OrbitNotification extends NotificationReceivedPayload {
3
+ id: string;
4
+ read: boolean;
5
+ }
6
+ /**
7
+ * Listens for `notification:received` events over the existing WebSocket
8
+ * connection and accumulates them in local state.
9
+ *
10
+ * @example
11
+ * const { notifications, unreadCount, markRead, clearAll } = useNotifications()
12
+ */
13
+ export declare function useNotifications(): {
14
+ notifications: OrbitNotification[];
15
+ unreadCount: number;
16
+ markRead: (id: string) => void;
17
+ markAllRead: () => void;
18
+ clearAll: () => void;
19
+ };
@@ -0,0 +1,8 @@
1
+ export type PresenceStatus = 'online' | 'away' | 'offline';
2
+ /**
3
+ * Returns the real-time presence status for a given app_user_id.
4
+ * Defaults to 'offline' for unknown users.
5
+ */
6
+ export declare function usePresence(appUserId: string): {
7
+ status: PresenceStatus;
8
+ };
@@ -0,0 +1,11 @@
1
+ /**
2
+ * usePushToken (web)
3
+ *
4
+ * Web push is not used for incoming call wakeup (browsers can't wake a killed tab
5
+ * for VoIP). This hook is a no-op placeholder so the API surface is consistent
6
+ * with the React Native SDK.
7
+ *
8
+ * If you want web push for general notifications (messages, etc.) you can
9
+ * implement it here using the Web Push API + your VAPID public key.
10
+ */
11
+ export declare function usePushToken(): void;
@@ -0,0 +1,21 @@
1
+ export type TransitionType = 'chat_to_call' | 'call_to_meeting' | 'meeting_to_chat' | string;
2
+ export interface RealtimeSession {
3
+ id: string;
4
+ type: 'chat_session' | 'call_session' | 'meeting_session';
5
+ context_id?: string;
6
+ transition_type?: string;
7
+ status: 'active' | 'ended';
8
+ created_at: string;
9
+ }
10
+ export interface CreateSessionInput {
11
+ type: RealtimeSession['type'];
12
+ context_id?: string;
13
+ }
14
+ export declare function useRealtime(): {
15
+ session: RealtimeSession | null;
16
+ createSession: (input: CreateSessionInput) => Promise<void>;
17
+ endSession: () => Promise<void>;
18
+ transition: (type: TransitionType, contextId?: string) => Promise<void>;
19
+ isLoading: boolean;
20
+ error: string | null;
21
+ };