@revrag-ai/embed-react-native 1.0.9 → 1.0.11
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/dist/commonjs/NativeEmbedReactNative.js.map +1 -0
- package/dist/commonjs/api/api.js.map +1 -0
- package/dist/commonjs/api/types/embed.api.types.js.map +1 -0
- package/dist/commonjs/components/Embed/EmbedAudioWave.js.map +1 -0
- package/dist/commonjs/components/Embed/EmbedButton.js.map +1 -0
- package/dist/commonjs/components/Embed/EmbedVoice.js.map +1 -0
- package/dist/commonjs/components/styles/EmbedButton.style.js.map +1 -0
- package/dist/commonjs/events/embed.event.js.map +1 -0
- package/dist/commonjs/hooks/initialize.js.map +1 -0
- package/dist/commonjs/hooks/initialize.livekit.js.map +1 -0
- package/dist/commonjs/hooks/types/initialize.types.js.map +1 -0
- package/dist/commonjs/hooks/types/voiceAgent.types.js.map +1 -0
- package/dist/commonjs/hooks/voiceagent.js.map +1 -0
- package/dist/commonjs/index.js.map +1 -0
- package/dist/commonjs/index.types.js.map +1 -0
- package/dist/commonjs/store/store.key.js.map +1 -0
- package/dist/commonjs/utils/reanimated.helper.js.map +1 -0
- package/dist/module/NativeEmbedReactNative.js.map +1 -0
- package/dist/module/api/api.js.map +1 -0
- package/dist/module/api/types/embed.api.types.js.map +1 -0
- package/dist/module/components/Embed/EmbedAudioWave.js.map +1 -0
- package/dist/module/components/Embed/EmbedButton.js.map +1 -0
- package/dist/module/components/Embed/EmbedVoice.js.map +1 -0
- package/dist/module/components/styles/EmbedButton.style.js.map +1 -0
- package/dist/module/events/embed.event.js.map +1 -0
- package/dist/module/hooks/initialize.js.map +1 -0
- package/dist/module/hooks/initialize.livekit.js.map +1 -0
- package/dist/module/hooks/types/initialize.types.js.map +1 -0
- package/dist/module/hooks/types/voiceAgent.types.js.map +1 -0
- package/dist/module/hooks/voiceagent.js.map +1 -0
- package/dist/module/index.js.map +1 -0
- package/dist/module/index.types.js.map +1 -0
- package/dist/module/store/store.key.js.map +1 -0
- package/dist/module/utils/reanimated.helper.js.map +1 -0
- package/dist/typescript/src/NativeEmbedReactNative.d.ts +7 -0
- package/dist/typescript/src/NativeEmbedReactNative.d.ts.map +1 -0
- package/dist/typescript/src/__tests__/index.test.d.ts +1 -0
- package/dist/typescript/src/__tests__/index.test.d.ts.map +1 -0
- package/dist/typescript/src/api/api.d.ts +54 -0
- package/dist/typescript/src/api/api.d.ts.map +1 -0
- package/dist/typescript/src/api/types/embed.api.types.d.ts +21 -0
- package/dist/typescript/src/api/types/embed.api.types.d.ts.map +1 -0
- package/dist/typescript/src/components/Embed/EmbedAudioWave.d.ts +7 -0
- package/dist/typescript/src/components/Embed/EmbedAudioWave.d.ts.map +1 -0
- package/dist/typescript/src/components/Embed/EmbedButton.d.ts +29 -0
- package/dist/typescript/src/components/Embed/EmbedButton.d.ts.map +1 -0
- package/dist/typescript/src/components/Embed/EmbedVoice.d.ts +16 -0
- package/dist/typescript/src/components/Embed/EmbedVoice.d.ts.map +1 -0
- package/dist/typescript/src/components/styles/EmbedButton.style.d.ts +99 -0
- package/dist/typescript/src/components/styles/EmbedButton.style.d.ts.map +1 -0
- package/dist/typescript/src/events/embed.event.d.ts +14 -0
- package/dist/typescript/src/events/embed.event.d.ts.map +1 -0
- package/dist/typescript/src/hooks/initialize.d.ts +3 -0
- package/dist/typescript/src/hooks/initialize.d.ts.map +1 -0
- package/dist/typescript/src/hooks/initialize.livekit.d.ts +4 -0
- package/dist/typescript/src/hooks/initialize.livekit.d.ts.map +1 -0
- package/dist/typescript/src/hooks/types/initialize.types.d.ts +5 -0
- package/dist/typescript/src/hooks/types/initialize.types.d.ts.map +1 -0
- package/dist/typescript/src/hooks/types/voiceAgent.types.d.ts +17 -0
- package/dist/typescript/src/hooks/types/voiceAgent.types.d.ts.map +1 -0
- package/dist/typescript/src/hooks/voiceagent.d.ts +3 -0
- package/dist/typescript/src/hooks/voiceagent.d.ts.map +1 -0
- package/dist/typescript/src/index.d.ts +12 -0
- package/dist/typescript/src/index.d.ts.map +1 -0
- package/dist/typescript/src/index.types.d.ts +58 -0
- package/dist/typescript/src/index.types.d.ts.map +1 -0
- package/dist/typescript/src/store/store.key.d.ts +4 -0
- package/dist/typescript/src/store/store.key.d.ts.map +1 -0
- package/dist/typescript/src/utils/reanimated.helper.d.ts +30 -0
- package/dist/typescript/src/utils/reanimated.helper.d.ts.map +1 -0
- package/package.json +23 -32
- /package/{lib → dist}/commonjs/NativeEmbedReactNative.js +0 -0
- /package/{lib → dist}/commonjs/api/api.js +0 -0
- /package/{lib → dist}/commonjs/api/types/embed.api.types.js +0 -0
- /package/{lib → dist}/commonjs/components/Embed/EmbedAudioWave.js +0 -0
- /package/{lib → dist}/commonjs/components/Embed/EmbedButton.js +0 -0
- /package/{lib → dist}/commonjs/components/Embed/EmbedVoice.js +0 -0
- /package/{lib → dist}/commonjs/components/styles/EmbedButton.style.js +0 -0
- /package/{lib → dist}/commonjs/events/embed.event.js +0 -0
- /package/{lib → dist}/commonjs/hooks/initialize.js +0 -0
- /package/{lib → dist}/commonjs/hooks/initialize.livekit.js +0 -0
- /package/{lib → dist}/commonjs/hooks/types/initialize.types.js +0 -0
- /package/{lib → dist}/commonjs/hooks/types/voiceAgent.types.js +0 -0
- /package/{lib → dist}/commonjs/hooks/voiceagent.js +0 -0
- /package/{lib → dist}/commonjs/index.js +0 -0
- /package/{lib → dist}/commonjs/index.types.js +0 -0
- /package/{lib → dist}/commonjs/store/store.key.js +0 -0
- /package/{lib → dist}/commonjs/utils/reanimated.helper.js +0 -0
- /package/{lib → dist}/module/NativeEmbedReactNative.js +0 -0
- /package/{lib → dist}/module/api/api.js +0 -0
- /package/{lib → dist}/module/api/types/embed.api.types.js +0 -0
- /package/{lib → dist}/module/components/Embed/EmbedAudioWave.js +0 -0
- /package/{lib → dist}/module/components/Embed/EmbedButton.js +0 -0
- /package/{lib → dist}/module/components/Embed/EmbedVoice.js +0 -0
- /package/{lib → dist}/module/components/styles/EmbedButton.style.js +0 -0
- /package/{lib → dist}/module/events/embed.event.js +0 -0
- /package/{lib → dist}/module/hooks/initialize.js +0 -0
- /package/{lib → dist}/module/hooks/initialize.livekit.js +0 -0
- /package/{lib → dist}/module/hooks/types/initialize.types.js +0 -0
- /package/{lib → dist}/module/hooks/types/voiceAgent.types.js +0 -0
- /package/{lib → dist}/module/hooks/voiceagent.js +0 -0
- /package/{lib → dist}/module/index.js +0 -0
- /package/{lib → dist}/module/index.types.js +0 -0
- /package/{lib → dist}/module/store/store.key.js +0 -0
- /package/{lib → dist}/module/utils/reanimated.helper.js +0 -0
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { type ViewStyle, type TextStyle, type ImageStyle } from 'react-native';
|
|
2
|
+
export declare const BUTTON_WIDTH: number;
|
|
3
|
+
export declare const EXPANDED_WIDTH: number;
|
|
4
|
+
export declare const BUTTON_HEIGHT: number;
|
|
5
|
+
type SpacingType = {
|
|
6
|
+
SMALL: number;
|
|
7
|
+
MEDIUM: number;
|
|
8
|
+
LARGE: number;
|
|
9
|
+
};
|
|
10
|
+
type CustomStyles = {
|
|
11
|
+
buttonWidth?: number;
|
|
12
|
+
buttonHeight?: number;
|
|
13
|
+
backgroundColor?: string;
|
|
14
|
+
borderRadius?: number;
|
|
15
|
+
marginBottom?: number;
|
|
16
|
+
spacing?: SpacingType;
|
|
17
|
+
};
|
|
18
|
+
export declare const createEmbedButtonStyles: (customStyles?: CustomStyles) => {
|
|
19
|
+
container: ViewStyle;
|
|
20
|
+
button: ViewStyle;
|
|
21
|
+
pressable: ViewStyle;
|
|
22
|
+
menu: ViewStyle;
|
|
23
|
+
menuLeft: ViewStyle;
|
|
24
|
+
menuRight: ViewStyle;
|
|
25
|
+
iconText: TextStyle;
|
|
26
|
+
buttonContent: ViewStyle;
|
|
27
|
+
iconImage: ImageStyle;
|
|
28
|
+
startCallButton: ViewStyle;
|
|
29
|
+
startCallText: TextStyle;
|
|
30
|
+
rowContainer: ViewStyle;
|
|
31
|
+
linearGradient: ViewStyle;
|
|
32
|
+
buttonContainer: ViewStyle;
|
|
33
|
+
endCallButton: ViewStyle;
|
|
34
|
+
muteButton: ViewStyle;
|
|
35
|
+
micIcon: {
|
|
36
|
+
width: number;
|
|
37
|
+
height: number;
|
|
38
|
+
tintColor: string;
|
|
39
|
+
};
|
|
40
|
+
endCallIcon: {
|
|
41
|
+
width: number;
|
|
42
|
+
height: number;
|
|
43
|
+
tintColor: string;
|
|
44
|
+
};
|
|
45
|
+
buttonImage: ImageStyle;
|
|
46
|
+
expandedContent: ViewStyle;
|
|
47
|
+
leftSection: ViewStyle;
|
|
48
|
+
centerSection: ViewStyle;
|
|
49
|
+
rightSection: ViewStyle;
|
|
50
|
+
agentInfoContainer: ViewStyle;
|
|
51
|
+
agentTextContainer: ViewStyle;
|
|
52
|
+
agentNameText: TextStyle;
|
|
53
|
+
statusText: TextStyle;
|
|
54
|
+
chip: ViewStyle;
|
|
55
|
+
chipGradient: ViewStyle;
|
|
56
|
+
chipText: TextStyle;
|
|
57
|
+
};
|
|
58
|
+
export declare const onwidButtonStyles: {
|
|
59
|
+
container: ViewStyle;
|
|
60
|
+
button: ViewStyle;
|
|
61
|
+
pressable: ViewStyle;
|
|
62
|
+
menu: ViewStyle;
|
|
63
|
+
menuLeft: ViewStyle;
|
|
64
|
+
menuRight: ViewStyle;
|
|
65
|
+
iconText: TextStyle;
|
|
66
|
+
buttonContent: ViewStyle;
|
|
67
|
+
iconImage: ImageStyle;
|
|
68
|
+
startCallButton: ViewStyle;
|
|
69
|
+
startCallText: TextStyle;
|
|
70
|
+
rowContainer: ViewStyle;
|
|
71
|
+
linearGradient: ViewStyle;
|
|
72
|
+
buttonContainer: ViewStyle;
|
|
73
|
+
endCallButton: ViewStyle;
|
|
74
|
+
muteButton: ViewStyle;
|
|
75
|
+
micIcon: {
|
|
76
|
+
width: number;
|
|
77
|
+
height: number;
|
|
78
|
+
tintColor: string;
|
|
79
|
+
};
|
|
80
|
+
endCallIcon: {
|
|
81
|
+
width: number;
|
|
82
|
+
height: number;
|
|
83
|
+
tintColor: string;
|
|
84
|
+
};
|
|
85
|
+
buttonImage: ImageStyle;
|
|
86
|
+
expandedContent: ViewStyle;
|
|
87
|
+
leftSection: ViewStyle;
|
|
88
|
+
centerSection: ViewStyle;
|
|
89
|
+
rightSection: ViewStyle;
|
|
90
|
+
agentInfoContainer: ViewStyle;
|
|
91
|
+
agentTextContainer: ViewStyle;
|
|
92
|
+
agentNameText: TextStyle;
|
|
93
|
+
statusText: TextStyle;
|
|
94
|
+
chip: ViewStyle;
|
|
95
|
+
chipGradient: ViewStyle;
|
|
96
|
+
chipText: TextStyle;
|
|
97
|
+
};
|
|
98
|
+
export {};
|
|
99
|
+
//# sourceMappingURL=EmbedButton.style.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EmbedButton.style.d.ts","sourceRoot":"","sources":["../../../../../src/components/styles/EmbedButton.style.ts"],"names":[],"mappings":"AAAA,OAAO,EAGH,KAAK,SAAS,EACd,KAAK,SAAS,EACd,KAAK,UAAU,EAChB,MAAM,cAAc,CAAC;AA6BtB,eAAO,MAAM,YAAY,QAA0B,CAAC;AACpD,eAAO,MAAM,cAAc,QAA4B,CAAC;AACxD,eAAO,MAAM,aAAa,QAA2B,CAAC;AAEtD,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,KAAK,YAAY,GAAG;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,EAAE,WAAW,CAAC;CACvB,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAAI,eAAe,YAAY;eAuB1D,SAAS;YAOT,SAAS;eAST,SAAS;UAOT,SAAS;cAIT,SAAS;eAIT,SAAS;cAIT,SAAS;mBAKT,SAAS;eAUT,UAAU;qBAUV,SAAS;mBAKT,SAAS;kBAQT,SAAS;oBAMT,SAAS;qBAKT,SAAS;mBAMT,SAAS;gBAOT,SAAS;;;;;;;;;;;iBAeT,UAAU;qBAQV,SAAS;iBAGT,SAAS;mBAIT,SAAS;kBAIT,SAAS;wBAMT,SAAS;wBAKT,SAAS;mBAMT,SAAS;gBAMT,SAAS;UAaT,SAAS;kBAQT,SAAS;cAKT,SAAS;CAEjB,CAAC;AAGF,eAAO,MAAM,iBAAiB;eAzLrB,SAAS;YAOT,SAAS;eAST,SAAS;UAOT,SAAS;cAIT,SAAS;eAIT,SAAS;cAIT,SAAS;mBAKT,SAAS;eAUT,UAAU;qBAUV,SAAS;mBAKT,SAAS;kBAQT,SAAS;oBAMT,SAAS;qBAKT,SAAS;mBAMT,SAAS;gBAOT,SAAS;;;;;;;;;;;iBAeT,UAAU;qBAQV,SAAS;iBAGT,SAAS;mBAIT,SAAS;kBAIT,SAAS;wBAMT,SAAS;wBAKT,SAAS;mBAMT,SAAS;gBAMT,SAAS;UAaT,SAAS;kBAQT,SAAS;cAKT,SAAS;CAKwC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
type EventCallback = (data: any) => void;
|
|
2
|
+
export declare enum EventKeys {
|
|
3
|
+
USER_DATA = "user_data",
|
|
4
|
+
SCREEN_STATE = "state_data"
|
|
5
|
+
}
|
|
6
|
+
declare class Embed {
|
|
7
|
+
private events;
|
|
8
|
+
private ensureDefaultListener;
|
|
9
|
+
Event(eventKey: string, data: any): Promise<void>;
|
|
10
|
+
on(eventKey: EventKeys, callback: EventCallback): void;
|
|
11
|
+
}
|
|
12
|
+
declare const embed: Embed;
|
|
13
|
+
export default embed;
|
|
14
|
+
//# sourceMappingURL=embed.event.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"embed.event.d.ts","sourceRoot":"","sources":["../../../../src/events/embed.event.ts"],"names":[],"mappings":"AAGA,KAAK,aAAa,GAAG,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,CAAC;AAGzC,oBAAY,SAAS;IACnB,SAAS,cAAc;IACvB,YAAY,eAAe;CAC5B;AAED,cAAM,KAAK;IACT,OAAO,CAAC,MAAM,CAAgD;IAG9D,OAAO,CAAC,qBAAqB;IAUvB,KAAK,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG;IA8CvC,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,aAAa;CAMhD;AAED,QAAA,MAAM,KAAK,OAAc,CAAC;AAC1B,eAAe,KAAK,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"initialize.d.ts","sourceRoot":"","sources":["../../../../src/hooks/initialize.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAInE,wBAAgB,aAAa,CAAC,EAC5B,MAAM,EACN,QAAQ,GACT,EAAE,kBAAkB,GAAG,IAAI,CAoF3B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"initialize.livekit.d.ts","sourceRoot":"","sources":["../../../../src/hooks/initialize.livekit.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAIxD,QAAA,MAAM,aAAa,wBAAkB,CAAC;AAEtC,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"initialize.types.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/types/initialize.types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,kBAAkB,GAAG;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ConnectionState, Room } from 'livekit-client';
|
|
2
|
+
import { type RefObject } from 'react';
|
|
3
|
+
export type UseVoiceAgentReturn = {
|
|
4
|
+
initializeVoiceAgent: () => Promise<void>;
|
|
5
|
+
isLoading: boolean;
|
|
6
|
+
error: string | null;
|
|
7
|
+
tokenDetails: any;
|
|
8
|
+
endCall: () => Promise<void>;
|
|
9
|
+
room: Room;
|
|
10
|
+
roomRef: RefObject<Room>;
|
|
11
|
+
isMicMuted: boolean;
|
|
12
|
+
muteMic: () => void;
|
|
13
|
+
unmuteMic: () => void;
|
|
14
|
+
connectionState: ConnectionState;
|
|
15
|
+
cleanup: () => void;
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=voiceAgent.types.d.ts.map
|
|
@@ -0,0 +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;AAEvC,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,GAAG,CAAC;IAClB,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;CACrB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"voiceagent.d.ts","sourceRoot":"","sources":["../../../../src/hooks/voiceagent.ts"],"names":[],"mappings":"AAUE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAoEpE,eAAO,MAAM,aAAa,QAAO,mBAwThC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { EmbedButton } from './components/Embed/EmbedButton';
|
|
2
|
+
import { useInitialize } from './hooks/initialize';
|
|
3
|
+
import Embed, { EventKeys } from './events/embed.event';
|
|
4
|
+
import type { RegisterRequest } from './api/types/embed.api.types';
|
|
5
|
+
import type { UpdateDataRequest } from './api/types/embed.api.types';
|
|
6
|
+
import type { TokenDetails } from './api/types/embed.api.types';
|
|
7
|
+
import type { UseInitializeProps } from './hooks/types/initialize.types';
|
|
8
|
+
import type { UseVoiceAgentReturn } from './hooks/types/voiceAgent.types';
|
|
9
|
+
import type { ApiResponse } from './api/types/embed.api.types';
|
|
10
|
+
export { EmbedButton, useInitialize, Embed, EventKeys as EmbedEventKeys };
|
|
11
|
+
export type { UseInitializeProps, UseVoiceAgentReturn, ApiResponse, RegisterRequest, TokenDetails, UpdateDataRequest };
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACzE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAC1E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAE/D,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,KAAK,EAAE,SAAS,IAAI,cAAc,EAAE,CAAC;AAE1E,YAAY,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,WAAW,EAAE,eAAe,EAAE,YAAY,EAAE,iBAAiB,EAAE,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file index.d.ts
|
|
3
|
+
* @description TypeScript declarations for the Onwid React Native library.
|
|
4
|
+
*/
|
|
5
|
+
import { ConnectionState, Room } from 'livekit-client';
|
|
6
|
+
import { type RefObject } from 'react';
|
|
7
|
+
export declare function OnwidButton(): JSX.Element;
|
|
8
|
+
export interface UseInitializeProps {
|
|
9
|
+
apiKey: string;
|
|
10
|
+
embedUrl?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface UseVoiceAgentReturn {
|
|
13
|
+
initializeVoiceAgent: () => Promise<void>;
|
|
14
|
+
isLoading: boolean;
|
|
15
|
+
error: string | null;
|
|
16
|
+
tokenDetails: any;
|
|
17
|
+
endCall: () => Promise<void>;
|
|
18
|
+
room: Room;
|
|
19
|
+
roomRef: RefObject<Room>;
|
|
20
|
+
isMicMuted: boolean;
|
|
21
|
+
muteMic: () => void;
|
|
22
|
+
unmuteMic: () => void;
|
|
23
|
+
connectionState: ConnectionState;
|
|
24
|
+
cleanup: () => void;
|
|
25
|
+
}
|
|
26
|
+
export declare const useInitialize: (props: UseInitializeProps) => void;
|
|
27
|
+
export declare const useVoiceAgent: () => UseVoiceAgentReturn;
|
|
28
|
+
export interface ApiResponse<T> {
|
|
29
|
+
success: boolean;
|
|
30
|
+
data?: T;
|
|
31
|
+
error?: string;
|
|
32
|
+
}
|
|
33
|
+
export interface RegisterRequest {
|
|
34
|
+
apiKey: string;
|
|
35
|
+
embedUrl: string;
|
|
36
|
+
}
|
|
37
|
+
export interface TokenDetails {
|
|
38
|
+
token: string;
|
|
39
|
+
expiresAt: number;
|
|
40
|
+
apiKey: string;
|
|
41
|
+
config: Record<string, any>;
|
|
42
|
+
server_url: string;
|
|
43
|
+
}
|
|
44
|
+
export interface UpdateDataRequest {
|
|
45
|
+
eventKey: string;
|
|
46
|
+
data: Record<string, any>;
|
|
47
|
+
}
|
|
48
|
+
export declare enum EventKeys {
|
|
49
|
+
USER_DATA = "user_data",
|
|
50
|
+
SCREEN_STATE = "state_data"
|
|
51
|
+
}
|
|
52
|
+
export declare class OnWid {
|
|
53
|
+
Event(eventKey: string, data: any): Promise<void>;
|
|
54
|
+
on(eventKey: EventKeys, callback: (data: any) => void): void;
|
|
55
|
+
}
|
|
56
|
+
export declare const onwid: OnWid;
|
|
57
|
+
export declare const registerAgent: any;
|
|
58
|
+
//# sourceMappingURL=index.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.types.d.ts","sourceRoot":"","sources":["../../../src/index.types.ts"],"names":[],"mappings":"AACA;;;GAGG;AAEH,OAAO,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,MAAM,CAAC,OAAO,UAAU,WAAW,IAAI,GAAG,CAAC,OAAO,CAAC;AAGnD,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,mBAAmB;IAClC,oBAAoB,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1C,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,YAAY,EAAE,GAAG,CAAC;IAClB,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;CACrB;AAGD,MAAM,CAAC,OAAO,CAAC,MAAM,aAAa,EAAE,CAAC,KAAK,EAAE,kBAAkB,KAAK,IAAI,CAAC;AACxE,MAAM,CAAC,OAAO,CAAC,MAAM,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAG9D,MAAM,WAAW,WAAW,CAAC,CAAC;IAC5B,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,CAAC,CAAC;IACT,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC5B,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC3B;AAGD,oBAAY,SAAS;IACnB,SAAS,cAAc;IACvB,YAAY,eAAe;CAC5B;AAED,MAAM,CAAC,OAAO,OAAO,KAAK;IACxB,KAAK,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC;IACjD,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,GAAG,IAAI;CAC7D;AAED,MAAM,CAAC,OAAO,CAAC,MAAM,KAAK,EAAE,KAAK,CAAC;AAClC,MAAM,CAAC,OAAO,CAAC,MAAM,aAAa,EAAE,GAAG,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const setAgentData: (data: Record<string, any>, key?: string) => Promise<void>;
|
|
2
|
+
export declare const getAgentData: (key?: string) => Promise<any>;
|
|
3
|
+
export declare const deleteFromDetail: (key: string) => Promise<void>;
|
|
4
|
+
//# sourceMappingURL=store.key.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store.key.d.ts","sourceRoot":"","sources":["../../../../src/store/store.key.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,YAAY,GACvB,MAAM,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACzB,MAAK,MAAoB,kBAU1B,CAAC;AAEF,eAAO,MAAM,YAAY,GAAU,MAAK,MAAoB,iBAa3D,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAU,KAAK,MAAM,kBAQjD,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file reanimatedHelpers.ts
|
|
3
|
+
* @description Utility functions to handle react-native-reanimated configuration and provide fallbacks
|
|
4
|
+
*/
|
|
5
|
+
interface ReanimatedAPI {
|
|
6
|
+
useSharedValue: any;
|
|
7
|
+
useAnimatedStyle: any;
|
|
8
|
+
withTiming: any;
|
|
9
|
+
withSpring: any;
|
|
10
|
+
withRepeat: any;
|
|
11
|
+
withSequence: any;
|
|
12
|
+
runOnJS: any;
|
|
13
|
+
Easing: any;
|
|
14
|
+
Animated: any;
|
|
15
|
+
isAvailable: boolean;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Safely loads react-native-reanimated and provides fallbacks if not available
|
|
19
|
+
*/
|
|
20
|
+
export declare function getReanimatedAPI(): ReanimatedAPI;
|
|
21
|
+
/**
|
|
22
|
+
* Check if react-native-reanimated is properly configured
|
|
23
|
+
*/
|
|
24
|
+
export declare function checkReanimatedSetup(): boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Display a helpful error message if reanimated is not configured
|
|
27
|
+
*/
|
|
28
|
+
export declare function showReanimatedSetupError(): void;
|
|
29
|
+
export {};
|
|
30
|
+
//# sourceMappingURL=reanimated.helper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reanimated.helper.d.ts","sourceRoot":"","sources":["../../../../src/utils/reanimated.helper.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,UAAU,aAAa;IACnB,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,CA4DhD;AAED;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,OAAO,CAG9C;AAED;;GAEG;AACH,wBAAgB,wBAAwB,IAAI,IAAI,CAe/C"}
|
package/package.json
CHANGED
|
@@ -1,56 +1,47 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@revrag-ai/embed-react-native",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.11",
|
|
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
|
-
"main": "./
|
|
7
|
-
"module": "./
|
|
8
|
-
"types": "./
|
|
6
|
+
"main": "./dist/commonjs/index.js",
|
|
7
|
+
"module": "./dist/module/index.js",
|
|
8
|
+
"types": "./dist/typescript/src/index.d.ts",
|
|
9
9
|
"typesVersions": {
|
|
10
10
|
"*": {
|
|
11
11
|
"*": [
|
|
12
|
-
"./
|
|
12
|
+
"./dist/typescript/src/*"
|
|
13
13
|
]
|
|
14
14
|
}
|
|
15
15
|
},
|
|
16
16
|
"exports": {
|
|
17
17
|
".": {
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
18
|
+
"types": "./dist/typescript/src/index.d.ts",
|
|
19
|
+
"import": "./dist/module/index.js",
|
|
20
|
+
"require": "./dist/commonjs/index.js",
|
|
21
|
+
"default": "./dist/module/index.js"
|
|
21
22
|
},
|
|
22
23
|
"./package.json": "./package.json"
|
|
23
24
|
},
|
|
24
25
|
"files": [
|
|
25
|
-
"
|
|
26
|
-
"android",
|
|
27
|
-
"
|
|
26
|
+
"dist",
|
|
27
|
+
"android/build.gradle",
|
|
28
|
+
"android/CMakeLists.txt",
|
|
29
|
+
"android/cpp-adapter.cpp",
|
|
30
|
+
"android/gradle.properties",
|
|
31
|
+
"android/generated",
|
|
32
|
+
"ios/*.h",
|
|
33
|
+
"ios/*.mm",
|
|
34
|
+
"ios/generated",
|
|
28
35
|
"cpp",
|
|
29
|
-
"assets",
|
|
30
|
-
"scripts",
|
|
31
36
|
"*.podspec",
|
|
32
|
-
"react-native.config.js"
|
|
33
|
-
"!lib/**/*.map",
|
|
34
|
-
"!lib/**/*.test.*",
|
|
35
|
-
"!lib/**/*.spec.*",
|
|
36
|
-
"!ios/build",
|
|
37
|
-
"!android/build",
|
|
38
|
-
"!android/gradle",
|
|
39
|
-
"!android/gradlew",
|
|
40
|
-
"!android/gradlew.bat",
|
|
41
|
-
"!android/local.properties",
|
|
42
|
-
"!**/__tests__",
|
|
43
|
-
"!**/__fixtures__",
|
|
44
|
-
"!**/__mocks__",
|
|
45
|
-
"!**/.*",
|
|
46
|
-
"!src"
|
|
37
|
+
"react-native.config.js"
|
|
47
38
|
],
|
|
48
39
|
"scripts": {
|
|
49
40
|
"example": "yarn workspace embed-react-native-example",
|
|
50
41
|
"test": "jest",
|
|
51
42
|
"typecheck": "tsc",
|
|
52
43
|
"lint": "eslint \"**/*.{js,ts,tsx}\"",
|
|
53
|
-
"clean": "del-cli android/build example/android/build example/android/app/build example/ios/build
|
|
44
|
+
"clean": "del-cli android/build example/android/build example/android/app/build example/ios/build dist",
|
|
54
45
|
"prepare": "bob build",
|
|
55
46
|
"build": "bob build",
|
|
56
47
|
"fix-js": "node fix-js-files.js",
|
|
@@ -145,7 +136,7 @@
|
|
|
145
136
|
"preset": "react-native",
|
|
146
137
|
"modulePathIgnorePatterns": [
|
|
147
138
|
"<rootDir>/example/node_modules",
|
|
148
|
-
"<rootDir>/
|
|
139
|
+
"<rootDir>/dist/"
|
|
149
140
|
]
|
|
150
141
|
},
|
|
151
142
|
"commitlint": {
|
|
@@ -192,7 +183,7 @@
|
|
|
192
183
|
},
|
|
193
184
|
"eslintIgnore": [
|
|
194
185
|
"node_modules/",
|
|
195
|
-
"
|
|
186
|
+
"dist/"
|
|
196
187
|
],
|
|
197
188
|
"prettier": {
|
|
198
189
|
"quoteProps": "consistent",
|
|
@@ -203,7 +194,7 @@
|
|
|
203
194
|
},
|
|
204
195
|
"react-native-builder-bob": {
|
|
205
196
|
"source": "src",
|
|
206
|
-
"output": "
|
|
197
|
+
"output": "dist",
|
|
207
198
|
"targets": [
|
|
208
199
|
"codegen",
|
|
209
200
|
[
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|