@ethora/chat-component 26.5.8 → 26.5.9

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.
@@ -23,6 +23,18 @@ export declare const SearchIcon: ({ color, ...props }: {
23
23
  [x: string]: any;
24
24
  color?: string;
25
25
  }) => import("react/jsx-runtime").JSX.Element;
26
+ export declare const VideoCallIcon: ({ color, ...props }: {
27
+ [x: string]: any;
28
+ color?: string;
29
+ }) => import("react/jsx-runtime").JSX.Element;
30
+ export declare const AudioCallIcon: ({ color, ...props }: {
31
+ [x: string]: any;
32
+ color?: string;
33
+ }) => import("react/jsx-runtime").JSX.Element;
34
+ export declare const HangUpIcon: ({ color, ...props }: {
35
+ [x: string]: any;
36
+ color?: string;
37
+ }) => import("react/jsx-runtime").JSX.Element;
26
38
  export declare const ReferalsIcon: ({ color, ...props }: {
27
39
  [x: string]: any;
28
40
  color?: string;
@@ -0,0 +1,2 @@
1
+ import { default as React } from 'react';
2
+ export declare const VideoCallOverlay: React.FC;
@@ -0,0 +1,25 @@
1
+ import { default as React } from 'react';
2
+ import { VideoCallIcons } from '../../types/models/config.model';
3
+ interface VideoCallSessionProps {
4
+ token: string;
5
+ livekitUrl: string;
6
+ kind?: 'audio' | 'video';
7
+ primaryColor?: string;
8
+ /** Host icon overrides for the control bar. */
9
+ icons?: VideoCallIcons;
10
+ /** Start with the camera on (video calls). Default true. */
11
+ startWithCameraOn?: boolean;
12
+ /** Start with the microphone on. Default true. */
13
+ startWithMicOn?: boolean;
14
+ /** Show the screen-share control. Default true. */
15
+ showScreenShare?: boolean;
16
+ /** Render the compact floating-panel layout instead of the full screen. */
17
+ minimized?: boolean;
18
+ /** Toggle between full and minimized layouts (keeps the session mounted). */
19
+ onToggleMinimize?: () => void;
20
+ onConnected?: () => void;
21
+ onError?: (message: string) => void;
22
+ onHangup: () => void;
23
+ }
24
+ export declare const VideoCallSession: React.FC<VideoCallSessionProps>;
25
+ export {};
@@ -0,0 +1,11 @@
1
+ import { IMessage } from '../types/types';
2
+ export interface CallLogMeta {
3
+ callId: string;
4
+ direction: 'outgoing' | 'incoming';
5
+ durationMs: number;
6
+ missed: boolean;
7
+ kind: 'audio' | 'video';
8
+ }
9
+ export declare const isCallLogMessage: (message: unknown) => boolean;
10
+ export declare const callStateHasLogData: (attrs: Record<string, any>) => boolean;
11
+ export declare const transformCallLogMessage: (message: IMessage, selfXmppUsername: string) => IMessage;
@@ -0,0 +1,22 @@
1
+ export interface ParsedCallPush {
2
+ callId: string | null;
3
+ /** LiveKit token, if the push carried one (lets us ring + accept offline). */
4
+ token: string | null;
5
+ kind: 'audio' | 'video';
6
+ /** Bare room name (JID localpart) the call belongs to. */
7
+ roomBareName: string | null;
8
+ /** Raw room reference from the payload (full JID or bare name). */
9
+ roomRef: string | null;
10
+ /** Display name for the ring screen (caller). */
11
+ callerName: string | null;
12
+ /** Caller's xmpp localpart, when provided. */
13
+ callerXmppUsername: string | null;
14
+ }
15
+ /**
16
+ * True when a push `data` payload represents an incoming call. Matches on an
17
+ * explicit call marker (`type`/`pushType`/`category`/`event` === "call"-ish)
18
+ * or on a callId paired with a call-specific field, so a normal message push
19
+ * is never misread as a call.
20
+ */
21
+ export declare const isCallPush: (data: Record<string, any> | null | undefined) => boolean;
22
+ export declare const parseCallPush: (data: Record<string, any> | null | undefined) => ParsedCallPush;
@@ -2,4 +2,5 @@ export declare const useStoreConsole: () => {
2
2
  chatSettingStore: any;
3
3
  rooms: any;
4
4
  roomHeapSlice: import('../roomStore/roomHeapSlice').roomHeapSliceState;
5
+ call: import('immer').WritableDraft<import('../roomStore/callSlice').CallState>;
5
6
  };
@@ -0,0 +1,18 @@
1
+ export interface DraggablePosition {
2
+ x: number;
3
+ y: number;
4
+ }
5
+ /**
6
+ * Minimal pointer-based drag hook (no deps). Returns the current offset and a
7
+ * pointer-down handler to attach to a drag handle. The consumer decides how to
8
+ * apply `pos` (e.g. as `left/top`, or as a delta from a default corner).
9
+ *
10
+ * `onChange` fires while dragging so callers can clamp to bounds. Works with
11
+ * mouse and touch via Pointer Events. `null` position means "not yet dragged"
12
+ * (use your default layout until the user moves it).
13
+ */
14
+ export declare const useDraggable: (clamp?: (pos: DraggablePosition) => DraggablePosition) => {
15
+ pos: DraggablePosition;
16
+ onPointerDown: (e: React.PointerEvent) => void;
17
+ setPos: import('react').Dispatch<import('react').SetStateAction<DraggablePosition>>;
18
+ };