@revrag-ai/embed-react-native 1.0.26 → 1.0.28
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/README.md +5 -0
- package/android/build.gradle +1 -0
- package/dist/commonjs/api/api.js.map +1 -1
- package/dist/commonjs/assets/fonts/PlaywriteNZBasic-ExtraLight.ttf +0 -0
- package/dist/commonjs/assets/fonts/PlaywriteNZBasic-Light.ttf +0 -0
- package/dist/commonjs/assets/fonts/PlaywriteNZBasic-Regular.ttf +0 -0
- package/dist/commonjs/assets/fonts/PlaywriteNZBasic-Thin.ttf +0 -0
- package/dist/commonjs/components/DynamicComponent/Typewriter.js +124 -0
- package/dist/commonjs/components/DynamicComponent/Typewriter.js.map +1 -0
- package/dist/commonjs/components/Embed/EmbedButton.js +362 -113
- package/dist/commonjs/components/Embed/EmbedButton.js.map +1 -1
- package/dist/commonjs/components/styles/EmbedButton.style.js +112 -158
- package/dist/commonjs/components/styles/EmbedButton.style.js.map +1 -1
- package/dist/commonjs/context/EmbedProvider.js +187 -14
- package/dist/commonjs/context/EmbedProvider.js.map +1 -1
- package/dist/commonjs/events/clickEventTracker.js +210 -0
- package/dist/commonjs/events/clickEventTracker.js.map +1 -0
- package/dist/commonjs/events/embed.event.js +11 -3
- package/dist/commonjs/events/embed.event.js.map +1 -1
- package/dist/commonjs/hooks/EmbedButton.animations.js +115 -15
- package/dist/commonjs/hooks/EmbedButton.animations.js.map +1 -1
- package/dist/commonjs/hooks/EmbedButton.helpers.js +11 -3
- package/dist/commonjs/hooks/EmbedButton.helpers.js.map +1 -1
- package/dist/commonjs/hooks/EmbedButton.hooks.js +17 -11
- package/dist/commonjs/hooks/EmbedButton.hooks.js.map +1 -1
- package/dist/commonjs/hooks/voiceagent.js +34 -12
- package/dist/commonjs/hooks/voiceagent.js.map +1 -1
- package/dist/commonjs/index.js +6 -2
- package/dist/commonjs/index.js.map +1 -1
- package/dist/commonjs/utils/constant.js +6 -1
- package/dist/commonjs/utils/constant.js.map +1 -1
- package/dist/commonjs/utils/permision.js +42 -1
- package/dist/commonjs/utils/permision.js.map +1 -1
- package/dist/commonjs/utils/reanimated.helper.js +4 -0
- package/dist/commonjs/utils/reanimated.helper.js.map +1 -1
- package/dist/module/api/api.js.map +1 -1
- package/dist/module/assets/fonts/PlaywriteNZBasic-ExtraLight.ttf +0 -0
- package/dist/module/assets/fonts/PlaywriteNZBasic-Light.ttf +0 -0
- package/dist/module/assets/fonts/PlaywriteNZBasic-Regular.ttf +0 -0
- package/dist/module/assets/fonts/PlaywriteNZBasic-Thin.ttf +0 -0
- package/dist/module/components/DynamicComponent/Typewriter.js +122 -0
- package/dist/module/components/DynamicComponent/Typewriter.js.map +1 -0
- package/dist/module/components/Embed/EmbedButton.js +367 -118
- package/dist/module/components/Embed/EmbedButton.js.map +1 -1
- package/dist/module/components/styles/EmbedButton.style.js +111 -157
- package/dist/module/components/styles/EmbedButton.style.js.map +1 -1
- package/dist/module/context/EmbedProvider.js +187 -14
- package/dist/module/context/EmbedProvider.js.map +1 -1
- package/dist/module/events/clickEventTracker.js +199 -0
- package/dist/module/events/clickEventTracker.js.map +1 -0
- package/dist/module/events/embed.event.js +11 -3
- package/dist/module/events/embed.event.js.map +1 -1
- package/dist/module/hooks/EmbedButton.animations.js +109 -13
- package/dist/module/hooks/EmbedButton.animations.js.map +1 -1
- package/dist/module/hooks/EmbedButton.helpers.js +10 -2
- package/dist/module/hooks/EmbedButton.helpers.js.map +1 -1
- package/dist/module/hooks/EmbedButton.hooks.js +17 -11
- package/dist/module/hooks/EmbedButton.hooks.js.map +1 -1
- package/dist/module/hooks/voiceagent.js +34 -12
- package/dist/module/hooks/voiceagent.js.map +1 -1
- package/dist/module/index.js +8 -3
- package/dist/module/index.js.map +1 -1
- package/dist/module/utils/constant.js +6 -1
- package/dist/module/utils/constant.js.map +1 -1
- package/dist/module/utils/permision.js +42 -1
- package/dist/module/utils/permision.js.map +1 -1
- package/dist/module/utils/reanimated.helper.js +4 -0
- package/dist/module/utils/reanimated.helper.js.map +1 -1
- package/dist/typescript/src/api/api.d.ts.map +1 -1
- package/dist/typescript/src/components/DynamicComponent/Typewriter.d.ts +15 -0
- package/dist/typescript/src/components/DynamicComponent/Typewriter.d.ts.map +1 -0
- package/dist/typescript/src/components/Embed/EmbedButton.d.ts +7 -1
- package/dist/typescript/src/components/Embed/EmbedButton.d.ts.map +1 -1
- package/dist/typescript/src/components/styles/EmbedButton.style.d.ts +22 -114
- package/dist/typescript/src/components/styles/EmbedButton.style.d.ts.map +1 -1
- package/dist/typescript/src/context/EmbedProvider.d.ts +30 -0
- package/dist/typescript/src/context/EmbedProvider.d.ts.map +1 -1
- package/dist/typescript/src/events/__tests__/agent-event-emitter.test.d.ts +5 -0
- package/dist/typescript/src/events/__tests__/agent-event-emitter.test.d.ts.map +1 -0
- package/dist/typescript/src/events/__tests__/clickEventTracker.test.d.ts +5 -0
- package/dist/typescript/src/events/__tests__/clickEventTracker.test.d.ts.map +1 -0
- package/dist/typescript/src/events/__tests__/embed.event.test.d.ts +5 -0
- package/dist/typescript/src/events/__tests__/embed.event.test.d.ts.map +1 -0
- package/dist/typescript/src/events/__tests__/embed.validators.test.d.ts +5 -0
- package/dist/typescript/src/events/__tests__/embed.validators.test.d.ts.map +1 -0
- package/dist/typescript/src/events/clickEventTracker.d.ts +70 -0
- package/dist/typescript/src/events/clickEventTracker.d.ts.map +1 -0
- package/dist/typescript/src/events/embed.event.d.ts.map +1 -1
- package/dist/typescript/src/hooks/EmbedButton.animations.d.ts +29 -6
- package/dist/typescript/src/hooks/EmbedButton.animations.d.ts.map +1 -1
- package/dist/typescript/src/hooks/EmbedButton.helpers.d.ts +60 -8
- package/dist/typescript/src/hooks/EmbedButton.helpers.d.ts.map +1 -1
- package/dist/typescript/src/hooks/EmbedButton.hooks.d.ts +4 -2
- package/dist/typescript/src/hooks/EmbedButton.hooks.d.ts.map +1 -1
- package/dist/typescript/src/hooks/types/voiceAgent.types.d.ts +2 -0
- package/dist/typescript/src/hooks/types/voiceAgent.types.d.ts.map +1 -1
- package/dist/typescript/src/hooks/voiceagent.d.ts.map +1 -1
- package/dist/typescript/src/index.d.ts +8 -9
- package/dist/typescript/src/index.d.ts.map +1 -1
- package/dist/typescript/src/utils/constant.d.ts +1 -1
- package/dist/typescript/src/utils/constant.d.ts.map +1 -1
- package/dist/typescript/src/utils/permision.d.ts.map +1 -1
- package/dist/typescript/src/utils/reanimated.helper.d.ts +2 -0
- package/dist/typescript/src/utils/reanimated.helper.d.ts.map +1 -1
- package/package.json +3 -8
- package/react-native.config.js +1 -0
- package/revrag-ai-embed-react-native.podspec +1 -0
- package/src/assets/fonts/PlaywriteNZBasic-ExtraLight.ttf +0 -0
- package/src/assets/fonts/PlaywriteNZBasic-Light.ttf +0 -0
- package/src/assets/fonts/PlaywriteNZBasic-Regular.ttf +0 -0
- package/src/assets/fonts/PlaywriteNZBasic-Thin.ttf +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmbedButton.animations.d.ts","sourceRoot":"","sources":["../../../../src/hooks/EmbedButton.animations.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"EmbedButton.animations.d.ts","sourceRoot":"","sources":["../../../../src/hooks/EmbedButton.animations.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAoBH,QAAA,MASE,QAAQ,KAGY,CAAC;AAQvB,OAAO,EAAE,QAAQ,EAAE,CAAC;AAGpB;;GAEG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;CAoB9B,CAAC;AAGF;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,GAC9B,QAAQ,OAAO,EACf,eAAe,GAAG,EAClB,aAAa,GAAG,EAChB,QAAQ,GAAG,EACX,OAAO,GAAG,EACV,iBAAiB,MAAM,GAAG,OAAO,SA0BlC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,yBAAyB,GACpC,kBAAkB,OAAO,EACzB,sBAAsB,GAAG,EACzB,cAAc,GAAG,SAYlB,CAAC;AAGF;;GAEG;AACH,eAAO,MAAM,qBAAqB,GAChC,QAAQ,OAAO,EACf,YAAY,OAAO,EACnB,aAAa,GAAG,SAwBjB,CAAC;AAGF;;GAEG;AACH,eAAO,MAAM,uBAAuB,GAClC,QAAQ,OAAO,EACf,QAAQ,GAAG,EACX,aAAa,GAAG,EAChB,WAAW,GAAG,EACd,aAAa,GAAG,EAChB,cAAc,GAAG,QAoBlB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,gCAAgC,GAAI,eAAe,GAAG,QAKlE,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,6BAA6B,GAAI,sBAAsB,GAAG,QActE,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,GACjC,QAAQ,GAAG,EACX,WAAW,GAAG,EACd,iBAAiB,MAAM,GAAG,OAAO,QAmBlC,CAAC;AAGF;;GAEG;AACH,eAAO,MAAM,gBAAgB,GAC3B,WAAW,GAAG,EACd,QAAQ,GAAG,EACX,OAAO,GAAG,EACV,QAAQ,OAAO,EACf,eAAe,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,EACvC,oBAAoB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,KAAK,IAAI,kGAkCpD,CAAC"}
|
|
@@ -3,28 +3,80 @@
|
|
|
3
3
|
* @description Helper functions and utilities for the EmbedButton component
|
|
4
4
|
*/
|
|
5
5
|
export declare const SCREEN_WIDTH: number, SCREEN_HEIGHT: number;
|
|
6
|
+
/** Bottom inset when expanded so host app footer remains visible */
|
|
7
|
+
export declare const FOOTER_SAFE_INSET = 80;
|
|
6
8
|
export declare const BUTTON_DIMENSIONS: {
|
|
7
9
|
readonly WIDTH: 60;
|
|
8
10
|
readonly HEIGHT: 60;
|
|
9
11
|
readonly EXPANDED_WIDTH: number;
|
|
12
|
+
/** Height of the card when input section is expanded (connected state) */
|
|
13
|
+
readonly EXPANDED_VERTICAL_HEIGHT: 520;
|
|
14
|
+
/** Height of the input area when expanded */
|
|
15
|
+
readonly INPUT_SECTION_HEIGHT: 280;
|
|
10
16
|
};
|
|
11
17
|
export declare const ICON_URLS: {
|
|
12
18
|
readonly MIC_ON: "https://revrag-dev.s3.ap-south-1.amazonaws.com/Avatars/Mute+button.png";
|
|
13
19
|
readonly MIC_OFF: "https://revrag-dev.s3.ap-south-1.amazonaws.com/Avatars/unmute.png";
|
|
14
20
|
readonly END_CALL: "https://revrag-dev.s3.ap-south-1.amazonaws.com/Avatars/end+button.png";
|
|
15
21
|
readonly AMPLIFY_ANIMATION: "https://revrag-dev.s3.ap-south-1.amazonaws.com/Avatars/amplify.json";
|
|
22
|
+
readonly CLOSE_ICON: "https://revrag-dev.s3.ap-south-1.amazonaws.com/Avatars/close.png";
|
|
16
23
|
};
|
|
17
24
|
export declare const DEFAULT_GRADIENT_COLORS: string[];
|
|
18
25
|
export declare const DEFAULT_POPUP_DELAY_MS = 15000;
|
|
26
|
+
export interface AgentAvatarConfig {
|
|
27
|
+
avatarImage: string;
|
|
28
|
+
avatarType: string;
|
|
29
|
+
}
|
|
30
|
+
export interface AgentTextContentConfig {
|
|
31
|
+
agentName: string;
|
|
32
|
+
agentType: string;
|
|
33
|
+
buttonText: string;
|
|
34
|
+
}
|
|
35
|
+
export interface CollapsedViewConfig {
|
|
36
|
+
isCollapsed: boolean;
|
|
37
|
+
inactivityBehavior: 'show_popup' | 'auto_trigger' | 'none';
|
|
38
|
+
tooltipMessage: string;
|
|
39
|
+
nudgeDelay: number;
|
|
40
|
+
}
|
|
41
|
+
export interface ColorPaletteConfig {
|
|
42
|
+
backgroundColor: string;
|
|
43
|
+
borderColor: string;
|
|
44
|
+
borderRadius: number;
|
|
45
|
+
buttonColor: string;
|
|
46
|
+
buttonTextColor: string;
|
|
47
|
+
fillType: string;
|
|
48
|
+
grad1: string;
|
|
49
|
+
grad2: string;
|
|
50
|
+
textColor: string;
|
|
51
|
+
tooltipBackgroundColor: string;
|
|
52
|
+
tooltipTextColor: string;
|
|
53
|
+
}
|
|
54
|
+
export interface FieldError {
|
|
55
|
+
hasError: boolean;
|
|
56
|
+
message: string;
|
|
57
|
+
}
|
|
58
|
+
export interface ErrorsConfig {
|
|
59
|
+
agentName: FieldError;
|
|
60
|
+
agentType: FieldError;
|
|
61
|
+
borderRadius: FieldError;
|
|
62
|
+
buttonText: FieldError;
|
|
63
|
+
}
|
|
64
|
+
export interface PositionConfig {
|
|
65
|
+
bottomPadding: number;
|
|
66
|
+
rightPadding: number;
|
|
67
|
+
widgetPosition: string;
|
|
68
|
+
}
|
|
69
|
+
export interface AgentAvatarConfig {
|
|
70
|
+
avatarUrl: string;
|
|
71
|
+
avatarType: string;
|
|
72
|
+
}
|
|
19
73
|
export interface ConfigData {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
agent_type?: string;
|
|
27
|
-
connect_button_title?: string;
|
|
74
|
+
agentAvatar?: AgentAvatarConfig;
|
|
75
|
+
agentTextContent?: AgentTextContentConfig;
|
|
76
|
+
collapsedView?: CollapsedViewConfig;
|
|
77
|
+
colorPalette?: ColorPaletteConfig;
|
|
78
|
+
errors?: ErrorsConfig;
|
|
79
|
+
position?: PositionConfig;
|
|
28
80
|
}
|
|
29
81
|
/**
|
|
30
82
|
* Safely parse delay value to ensure it's a valid number
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmbedButton.helpers.d.ts","sourceRoot":"","sources":["../../../../src/hooks/EmbedButton.helpers.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,eAAO,MAAe,YAAY,UAAU,aAAa,QAC/B,CAAC;AAE3B,eAAO,MAAM,iBAAiB;;;;
|
|
1
|
+
{"version":3,"file":"EmbedButton.helpers.d.ts","sourceRoot":"","sources":["../../../../src/hooks/EmbedButton.helpers.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,eAAO,MAAe,YAAY,UAAU,aAAa,QAC/B,C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,UAAU,EAAE,UAAU,CAAC;CACxB;AAED,MAAM,WAAW,cAAc;IAC7B,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;CACxB;AACD,MAAM,WAAW,iBAAiB;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,UAAU;IACzB,WAAW,CAAC,EAAE,iBAAiB,CAAC;IAChC,gBAAgB,CAAC,EAAE,sBAAsB,CAAC;IAC1C,aAAa,CAAC,EAAE,mBAAmB,CAAC;IACpC,YAAY,CAAC,EAAE,kBAAkB,CAAC;IAClC,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,QAAQ,CAAC,EAAE,cAAc,CAAC;CAS3B;AAID;;GAEG;AACH,eAAO,MAAM,YAAY,GAAI,OAAO,MAAM,GAAG,MAAM,GAAG,SAAS,KAAG,MAOjE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,cAAc,GAAI,SAAS,MAAM,KAAG,MAMhD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,aAAa,GAAI,QAAQ,OAAO,KAAG,MAM/C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,aAAa,QAAO,MAGhC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,KAAK,GAAI,OAAO,MAAM,EAAE,KAAK,MAAM,EAAE,KAAK,MAAM,KAAG,MAG/D,CAAC"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* @file EmbedButton.hooks.ts
|
|
3
3
|
* @description Custom hooks for the EmbedButton component
|
|
4
4
|
*/
|
|
5
|
+
import { ConnectionState } from 'livekit-client';
|
|
5
6
|
import type { ConfigData } from './EmbedButton.helpers';
|
|
6
7
|
/**
|
|
7
8
|
* Hook to fetch and manage agent configuration data
|
|
@@ -10,7 +11,7 @@ export declare const useConfigData: () => ConfigData | null;
|
|
|
10
11
|
/**
|
|
11
12
|
* Hook to track call duration when connected
|
|
12
13
|
*/
|
|
13
|
-
export declare const useCallDuration: (connectionState:
|
|
14
|
+
export declare const useCallDuration: (connectionState: ConnectionState) => {
|
|
14
15
|
callDuration: number;
|
|
15
16
|
resetDuration: () => void;
|
|
16
17
|
};
|
|
@@ -32,6 +33,7 @@ export declare const useInactivityBehavior: ({ configData, isOpen, isLoading, ha
|
|
|
32
33
|
* Hook to manage call lifecycle (start, end, mute)
|
|
33
34
|
*/
|
|
34
35
|
interface UseCallManagementParams {
|
|
36
|
+
isOpen: boolean;
|
|
35
37
|
initializeVoiceAgent: () => Promise<void>;
|
|
36
38
|
endCall: () => Promise<void>;
|
|
37
39
|
muteMic: () => void;
|
|
@@ -40,7 +42,7 @@ interface UseCallManagementParams {
|
|
|
40
42
|
resetDuration: () => void;
|
|
41
43
|
setIsOpen: (open: boolean) => void;
|
|
42
44
|
}
|
|
43
|
-
export declare const useCallManagement: ({ initializeVoiceAgent, endCall, muteMic, unmuteMic, isMicMuted, resetDuration, setIsOpen, }: UseCallManagementParams) => {
|
|
45
|
+
export declare const useCallManagement: ({ isOpen, initializeVoiceAgent, endCall, muteMic, unmuteMic, isMicMuted, resetDuration, setIsOpen, }: UseCallManagementParams) => {
|
|
44
46
|
handleStartCall: () => Promise<void>;
|
|
45
47
|
handleEndCall: () => Promise<void>;
|
|
46
48
|
handleMicToggle: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmbedButton.hooks.d.ts","sourceRoot":"","sources":["../../../../src/hooks/EmbedButton.hooks.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"EmbedButton.hooks.d.ts","sourceRoot":"","sources":["../../../../src/hooks/EmbedButton.hooks.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAGjD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAIxD;;GAEG;AACH,eAAO,MAAM,aAAa,yBAiBzB,CAAC;AAGF;;GAEG;AACH,eAAO,MAAM,eAAe,GAAI,iBAAiB,eAAe;;;CAoC/D,CAAC;AAGF;;GAEG;AACH,UAAU,2BAA2B;IACnC,UAAU,EAAE,UAAU,GAAG,IAAI,CAAC;IAC9B,MAAM,EAAE,OAAO,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;IACnB,cAAc,EAAE,OAAO,CAAC;IACxB,WAAW,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAClC;AAED,eAAO,MAAM,qBAAqB,GAAI,iEAMnC,2BAA2B;;;CAqD7B,CAAC;AAGF;;GAEG;AACH,UAAU,uBAAuB;IAC/B,MAAM,EAAE,OAAO,CAAC;IAChB,oBAAoB,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1C,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7B,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,UAAU,EAAE,OAAO,CAAC;IACpB,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B,SAAS,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CACpC;AAED,eAAO,MAAM,iBAAiB,GAAI,sGAS/B,uBAAuB;;;;CA6BzB,CAAC"}
|
|
@@ -10,10 +10,12 @@ export type UseVoiceAgentReturn = {
|
|
|
10
10
|
room: Room;
|
|
11
11
|
roomRef: RefObject<Room>;
|
|
12
12
|
isMicMuted: boolean;
|
|
13
|
+
dataTranscription: Record<string, any>;
|
|
13
14
|
muteMic: () => void;
|
|
14
15
|
unmuteMic: () => void;
|
|
15
16
|
connectionState: ConnectionState;
|
|
16
17
|
cleanup: () => void;
|
|
18
|
+
clearDataReceived: () => void;
|
|
17
19
|
getPopupDescription: () => Promise<string>;
|
|
18
20
|
};
|
|
19
21
|
//# sourceMappingURL=voiceAgent.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"voiceAgent.types.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/types/voiceAgent.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEtD,MAAM,MAAM,mBAAmB,GAAG;IAChC,oBAAoB,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1C,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,YAAY,EAAE,YAAY,GAAG,IAAI,CAAC;IAClC,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7B,IAAI,EAAE,IAAI,CAAC;IACX,OAAO,EAAE,SAAS,CAAC,IAAI,CAAC,CAAC;IACzB,UAAU,EAAE,OAAO,CAAC;IACpB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,eAAe,EAAE,eAAe,CAAC;IACjC,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,mBAAmB,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,CAAC;CAC5C,CAAC"}
|
|
1
|
+
{"version":3,"file":"voiceAgent.types.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/types/voiceAgent.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEtD,MAAM,MAAM,mBAAmB,GAAG;IAChC,oBAAoB,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1C,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,YAAY,EAAE,YAAY,GAAG,IAAI,CAAC;IAClC,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7B,IAAI,EAAE,IAAI,CAAC;IACX,OAAO,EAAE,SAAS,CAAC,IAAI,CAAC,CAAC;IACzB,UAAU,EAAE,OAAO,CAAC;IACpB,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACvC,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,eAAe,EAAE,eAAe,CAAC;IACjC,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,iBAAiB,EAAE,MAAM,IAAI,CAAC;IAC9B,mBAAmB,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,CAAC;CAC5C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"voiceagent.d.ts","sourceRoot":"","sources":["../../../../src/hooks/voiceagent.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"voiceagent.d.ts","sourceRoot":"","sources":["../../../../src/hooks/voiceagent.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AA+IpE,eAAO,MAAM,aAAa,QAAO,mBAuYhC,CAAC"}
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { ApiResponse, RegisterRequest, TokenDetails, UpdateDataRequest } from './api/types/embed.api.types';
|
|
2
2
|
import { EmbedButton } from './components/Embed/EmbedButton';
|
|
3
|
+
import type { EmbedButtonInset } from './components/styles/EmbedButton.style';
|
|
4
|
+
import type { EmbedButtonContinuity, EmbedButtonDelayPolicy, EmbedButtonGroupConfig, EmbedButtonVisibilityConfig } from './context/EmbedProvider';
|
|
5
|
+
import EmbedProvider from './context/EmbedProvider';
|
|
6
|
+
import type { AgentConnectedData, AgentDisconnectedData, PopupMessageVisibleData } from './events/embed.event';
|
|
7
|
+
import Embed, { AgentEvent, EventKeys } from './events/embed.event';
|
|
3
8
|
import { useInitialize } from './hooks/initialize';
|
|
4
|
-
import Embed, { EventKeys, AgentEvent } from './events/embed.event';
|
|
5
|
-
import type { RegisterRequest } from './api/types/embed.api.types';
|
|
6
|
-
import type { UpdateDataRequest } from './api/types/embed.api.types';
|
|
7
|
-
import type { TokenDetails } from './api/types/embed.api.types';
|
|
8
9
|
import type { UseInitializeProps } from './hooks/types/initialize.types';
|
|
9
10
|
import type { UseVoiceAgentReturn } from './hooks/types/voiceAgent.types';
|
|
10
|
-
import type { ApiResponse } from './api/types/embed.api.types';
|
|
11
11
|
import { checkPermissions } from './utils/permision';
|
|
12
|
-
|
|
13
|
-
export {
|
|
14
|
-
export type { UseInitializeProps, UseVoiceAgentReturn, ApiResponse, RegisterRequest, TokenDetails, UpdateDataRequest, AgentConnectedData, AgentDisconnectedData, PopupMessageVisibleData, };
|
|
12
|
+
export { AgentEvent, checkPermissions, Embed, EmbedButton, EventKeys as EmbedEventKeys, EmbedProvider, useInitialize, };
|
|
13
|
+
export type { AgentConnectedData, AgentDisconnectedData, ApiResponse, EmbedButtonContinuity, EmbedButtonDelayPolicy, EmbedButtonGroupConfig, EmbedButtonInset, EmbedButtonVisibilityConfig, PopupMessageVisibleData, RegisterRequest, TokenDetails, UpdateDataRequest, UseInitializeProps, UseVoiceAgentReturn, };
|
|
15
14
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EACV,WAAW,EACX,eAAe,EACf,YAAY,EACZ,iBAAiB,EAClB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AAC9E,OAAO,KAAK,EACV,qBAAqB,EACrB,sBAAsB,EACtB,sBAAsB,EACtB,2BAA2B,EAC5B,MAAM,yBAAyB,CAAC;AACjC,OAAO,aAAa,MAAM,yBAAyB,CAAC;AACpD,OAAO,KAAK,EACV,kBAAkB,EAClB,qBAAqB,EACrB,uBAAuB,EACxB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACzE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAC1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAErD,OAAO,EACL,UAAU,EACV,gBAAgB,EAChB,KAAK,EACL,WAAW,EACX,SAAS,IAAI,cAAc,EAC3B,aAAa,EACb,aAAa,GACd,CAAC;AAEF,YAAY,EACV,kBAAkB,EAClB,qBAAqB,EACrB,WAAW,EACX,qBAAqB,EACrB,sBAAsB,EACtB,sBAAsB,EACtB,gBAAgB,EAChB,2BAA2B,EAC3B,uBAAuB,EACvB,eAAe,EACf,YAAY,EACZ,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,GACpB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const SDK_NAME = "embed_react_native";
|
|
2
|
-
export declare const SDK_VERSION = "1.0.
|
|
2
|
+
export declare const SDK_VERSION = "1.0.28";
|
|
3
3
|
export declare const SDK_PLATFORM = "react_native";
|
|
4
4
|
export declare const DEFAULT_EMBED_URL = "https://embed.revrag.ai";
|
|
5
5
|
/**
|
|
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rB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACpC,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAE5B;;GAEG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,uBAAuB,GAC9B,YAAY,CAsFd"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"permision.d.ts","sourceRoot":"","sources":["../../../../src/utils/permision.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,gBAAgB,QAAa,OAAO,CAAC,IAAI,
|
|
1
|
+
{"version":3,"file":"permision.d.ts","sourceRoot":"","sources":["../../../../src/utils/permision.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,gBAAgB,QAAa,OAAO,CAAC,IAAI,CA0CrD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reanimated.helper.d.ts","sourceRoot":"","sources":["../../../../src/utils/reanimated.helper.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,UAAU,aAAa;IACrB,cAAc,EAAE,GAAG,CAAC;IACpB,gBAAgB,EAAE,GAAG,CAAC;IACtB,UAAU,EAAE,GAAG,CAAC;IAChB,UAAU,EAAE,GAAG,CAAC;IAChB,UAAU,EAAE,GAAG,CAAC;IAChB,YAAY,EAAE,GAAG,CAAC;IAClB,OAAO,EAAE,GAAG,CAAC;IACb,MAAM,EAAE,GAAG,CAAC;IACZ,QAAQ,EAAE,GAAG,CAAC;IACd,WAAW,EAAE,OAAO,CAAC;CACtB;AAID;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,aAAa,
|
|
1
|
+
{"version":3,"file":"reanimated.helper.d.ts","sourceRoot":"","sources":["../../../../src/utils/reanimated.helper.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,UAAU,aAAa;IACrB,cAAc,EAAE,GAAG,CAAC;IACpB,gBAAgB,EAAE,GAAG,CAAC;IACtB,UAAU,EAAE,GAAG,CAAC;IAChB,UAAU,EAAE,GAAG,CAAC;IAChB,UAAU,EAAE,GAAG,CAAC;IAChB,YAAY,EAAE,GAAG,CAAC;IAClB,SAAS,EAAE,GAAG,CAAC;IACf,WAAW,EAAE,GAAG,CAAC;IACjB,OAAO,EAAE,GAAG,CAAC;IACb,MAAM,EAAE,GAAG,CAAC;IACZ,QAAQ,EAAE,GAAG,CAAC;IACd,WAAW,EAAE,OAAO,CAAC;CACtB;AAID;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,aAAa,CAwDhD;AAED;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,OAAO,CAG9C;AAED;;GAEG;AACH,wBAAgB,wBAAwB,IAAI,IAAI,CAe/C"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@revrag-ai/embed-react-native",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.28",
|
|
4
4
|
"source": "./src/index.tsx",
|
|
5
5
|
"description": "A powerful React Native library for integrating AI-powered voice agents into mobile applications. Features real-time voice communication, intelligent speech processing, customizable UI components, and comprehensive event handling for building conversational AI experiences.",
|
|
6
6
|
"main": "./dist/commonjs/index.js",
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
},
|
|
25
25
|
"files": [
|
|
26
26
|
"dist",
|
|
27
|
+
"src/assets",
|
|
27
28
|
"android/build.gradle",
|
|
28
29
|
"android/CMakeLists.txt",
|
|
29
30
|
"android/cpp-adapter.cpp",
|
|
@@ -118,6 +119,7 @@
|
|
|
118
119
|
"react-native-reanimated": "~3.15.1",
|
|
119
120
|
"react-native-safe-area-context": "^4.12.0",
|
|
120
121
|
"release-it": "^15.0.0",
|
|
122
|
+
"ts-jest": "^29.4.6",
|
|
121
123
|
"typescript": "^5.2.2"
|
|
122
124
|
},
|
|
123
125
|
"resolutions": {
|
|
@@ -139,13 +141,6 @@
|
|
|
139
141
|
"example"
|
|
140
142
|
],
|
|
141
143
|
"packageManager": "yarn@3.6.1",
|
|
142
|
-
"jest": {
|
|
143
|
-
"preset": "react-native",
|
|
144
|
-
"modulePathIgnorePatterns": [
|
|
145
|
-
"<rootDir>/example/node_modules",
|
|
146
|
-
"<rootDir>/dist/"
|
|
147
|
-
]
|
|
148
|
-
},
|
|
149
144
|
"commitlint": {
|
|
150
145
|
"extends": [
|
|
151
146
|
"@commitlint/config-conventional"
|
package/react-native.config.js
CHANGED
|
@@ -15,6 +15,7 @@ Pod::Spec.new do |s|
|
|
|
15
15
|
s.source = { :git => "https://github.com/orgs/RevRag-ai/dashboard.git", :tag => "#{s.version}" }
|
|
16
16
|
|
|
17
17
|
s.source_files = "ios/**/*.{h,m,mm}", "cpp/**/*.{hpp,cpp,c,h}"
|
|
18
|
+
s.resources = "src/assets/fonts/**/*.ttf"
|
|
18
19
|
|
|
19
20
|
# Use install_modules_dependencies helper to install the dependencies if React Native version >=0.71.0.
|
|
20
21
|
# See https://github.com/facebook/react-native/blob/febf6b7f33fdb4904669f99d795eba4c0f95d7bf/scripts/cocoapods/new_architecture.rb#L79.
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|