@ringg/react-native 0.0.1-alpha.8 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +964 -0
- package/dist/index.d.ts +964 -0
- package/dist/index.js +1164 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +1129 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +24 -66
- package/LICENSE +0 -21
- package/README.md +0 -250
- package/app.plugin.js +0 -51
- package/lib/module/adapters/index.js +0 -4
- package/lib/module/adapters/index.js.map +0 -1
- package/lib/module/adapters/livekit-rn-adapter.js +0 -216
- package/lib/module/adapters/livekit-rn-adapter.js.map +0 -1
- package/lib/module/components/RinggWidget.js +0 -550
- package/lib/module/components/RinggWidget.js.map +0 -1
- package/lib/module/components/steps/ButtonsStep.js +0 -146
- package/lib/module/components/steps/ButtonsStep.js.map +0 -1
- package/lib/module/components/steps/CalendarStep.js +0 -190
- package/lib/module/components/steps/CalendarStep.js.map +0 -1
- package/lib/module/components/steps/ConfirmationStep.js +0 -175
- package/lib/module/components/steps/ConfirmationStep.js.map +0 -1
- package/lib/module/components/steps/FormStep.js +0 -346
- package/lib/module/components/steps/FormStep.js.map +0 -1
- package/lib/module/components/steps/InteractiveFlow.js +0 -249
- package/lib/module/components/steps/InteractiveFlow.js.map +0 -1
- package/lib/module/components/ui/ActionButton.js +0 -92
- package/lib/module/components/ui/ActionButton.js.map +0 -1
- package/lib/module/components/ui/CallControls.js +0 -168
- package/lib/module/components/ui/CallControls.js.map +0 -1
- package/lib/module/components/ui/FeedbackScreen.js +0 -180
- package/lib/module/components/ui/FeedbackScreen.js.map +0 -1
- package/lib/module/components/ui/Icons.js +0 -294
- package/lib/module/components/ui/Icons.js.map +0 -1
- package/lib/module/components/ui/MessageBubble.js +0 -80
- package/lib/module/components/ui/MessageBubble.js.map +0 -1
- package/lib/module/components/ui/TabSelector.js +0 -80
- package/lib/module/components/ui/TabSelector.js.map +0 -1
- package/lib/module/components/ui/WidgetHeader.js +0 -168
- package/lib/module/components/ui/WidgetHeader.js.map +0 -1
- package/lib/module/context/RinggProvider.js +0 -134
- package/lib/module/context/RinggProvider.js.map +0 -1
- package/lib/module/context/index.js +0 -4
- package/lib/module/context/index.js.map +0 -1
- package/lib/module/globals.d.js +0 -2
- package/lib/module/globals.d.js.map +0 -1
- package/lib/module/hooks/index.js +0 -10
- package/lib/module/hooks/index.js.map +0 -1
- package/lib/module/hooks/useRinggCall.js +0 -259
- package/lib/module/hooks/useRinggCall.js.map +0 -1
- package/lib/module/hooks/useRinggChat.js +0 -141
- package/lib/module/hooks/useRinggChat.js.map +0 -1
- package/lib/module/hooks/useRinggComponents.js +0 -226
- package/lib/module/hooks/useRinggComponents.js.map +0 -1
- package/lib/module/hooks/useRinggFeedback.js +0 -66
- package/lib/module/hooks/useRinggFeedback.js.map +0 -1
- package/lib/module/hooks/useRinggTheme.js +0 -39
- package/lib/module/hooks/useRinggTheme.js.map +0 -1
- package/lib/module/hooks/useRinggTranscripts.js +0 -70
- package/lib/module/hooks/useRinggTranscripts.js.map +0 -1
- package/lib/module/hooks/useRinggWidgetState.js +0 -51
- package/lib/module/hooks/useRinggWidgetState.js.map +0 -1
- package/lib/module/index.js +0 -56
- package/lib/module/index.js.map +0 -1
- package/lib/module/package.json +0 -1
- package/lib/typescript/adapters/index.d.ts +0 -2
- package/lib/typescript/adapters/index.d.ts.map +0 -1
- package/lib/typescript/adapters/livekit-rn-adapter.d.ts +0 -38
- package/lib/typescript/adapters/livekit-rn-adapter.d.ts.map +0 -1
- package/lib/typescript/components/RinggWidget.d.ts +0 -44
- package/lib/typescript/components/RinggWidget.d.ts.map +0 -1
- package/lib/typescript/components/steps/ButtonsStep.d.ts +0 -17
- package/lib/typescript/components/steps/ButtonsStep.d.ts.map +0 -1
- package/lib/typescript/components/steps/CalendarStep.d.ts +0 -16
- package/lib/typescript/components/steps/CalendarStep.d.ts.map +0 -1
- package/lib/typescript/components/steps/ConfirmationStep.d.ts +0 -16
- package/lib/typescript/components/steps/ConfirmationStep.d.ts.map +0 -1
- package/lib/typescript/components/steps/FormStep.d.ts +0 -17
- package/lib/typescript/components/steps/FormStep.d.ts.map +0 -1
- package/lib/typescript/components/steps/InteractiveFlow.d.ts +0 -23
- package/lib/typescript/components/steps/InteractiveFlow.d.ts.map +0 -1
- package/lib/typescript/components/ui/ActionButton.d.ts +0 -22
- package/lib/typescript/components/ui/ActionButton.d.ts.map +0 -1
- package/lib/typescript/components/ui/CallControls.d.ts +0 -22
- package/lib/typescript/components/ui/CallControls.d.ts.map +0 -1
- package/lib/typescript/components/ui/FeedbackScreen.d.ts +0 -24
- package/lib/typescript/components/ui/FeedbackScreen.d.ts.map +0 -1
- package/lib/typescript/components/ui/Icons.d.ts +0 -28
- package/lib/typescript/components/ui/Icons.d.ts.map +0 -1
- package/lib/typescript/components/ui/MessageBubble.d.ts +0 -17
- package/lib/typescript/components/ui/MessageBubble.d.ts.map +0 -1
- package/lib/typescript/components/ui/TabSelector.d.ts +0 -21
- package/lib/typescript/components/ui/TabSelector.d.ts.map +0 -1
- package/lib/typescript/components/ui/WidgetHeader.d.ts +0 -20
- package/lib/typescript/components/ui/WidgetHeader.d.ts.map +0 -1
- package/lib/typescript/context/RinggProvider.d.ts +0 -53
- package/lib/typescript/context/RinggProvider.d.ts.map +0 -1
- package/lib/typescript/context/index.d.ts +0 -3
- package/lib/typescript/context/index.d.ts.map +0 -1
- package/lib/typescript/hooks/index.d.ts +0 -15
- package/lib/typescript/hooks/index.d.ts.map +0 -1
- package/lib/typescript/hooks/useRinggCall.d.ts +0 -41
- package/lib/typescript/hooks/useRinggCall.d.ts.map +0 -1
- package/lib/typescript/hooks/useRinggChat.d.ts +0 -29
- package/lib/typescript/hooks/useRinggChat.d.ts.map +0 -1
- package/lib/typescript/hooks/useRinggComponents.d.ts +0 -52
- package/lib/typescript/hooks/useRinggComponents.d.ts.map +0 -1
- package/lib/typescript/hooks/useRinggFeedback.d.ts +0 -23
- package/lib/typescript/hooks/useRinggFeedback.d.ts.map +0 -1
- package/lib/typescript/hooks/useRinggTheme.d.ts +0 -40
- package/lib/typescript/hooks/useRinggTheme.d.ts.map +0 -1
- package/lib/typescript/hooks/useRinggTranscripts.d.ts +0 -30
- package/lib/typescript/hooks/useRinggTranscripts.d.ts.map +0 -1
- package/lib/typescript/hooks/useRinggWidgetState.d.ts +0 -38
- package/lib/typescript/hooks/useRinggWidgetState.d.ts.map +0 -1
- package/lib/typescript/index.d.ts +0 -44
- package/lib/typescript/index.d.ts.map +0 -1
- package/lib/typescript/package.json +0 -1
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* useRinggTranscripts — headless hook for live audio transcription.
|
|
3
|
-
*
|
|
4
|
-
* During a voice call, the AI agent's speech and the user's speech
|
|
5
|
-
* are transcribed in real-time. This hook provides those transcripts
|
|
6
|
-
* as a sorted message list.
|
|
7
|
-
*
|
|
8
|
-
* Usage:
|
|
9
|
-
* ```tsx
|
|
10
|
-
* const { transcripts } = useRinggTranscripts();
|
|
11
|
-
*
|
|
12
|
-
* <FlatList
|
|
13
|
-
* data={transcripts}
|
|
14
|
-
* renderItem={({ item }) => (
|
|
15
|
-
* <Text style={{ color: item.isSelf ? 'blue' : 'black' }}>
|
|
16
|
-
* {item.name}: {item.message}
|
|
17
|
-
* </Text>
|
|
18
|
-
* )}
|
|
19
|
-
* />
|
|
20
|
-
* ```
|
|
21
|
-
*/
|
|
22
|
-
import type { ChatMessage } from "@ringg/core";
|
|
23
|
-
export interface UseRinggTranscriptsReturn {
|
|
24
|
-
/** Live transcripts sorted chronologically */
|
|
25
|
-
transcripts: ChatMessage[];
|
|
26
|
-
/** Clear all transcripts (e.g., after call ends) */
|
|
27
|
-
clearTranscripts: () => void;
|
|
28
|
-
}
|
|
29
|
-
export declare function useRinggTranscripts(): UseRinggTranscriptsReturn;
|
|
30
|
-
//# sourceMappingURL=useRinggTranscripts.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useRinggTranscripts.d.ts","sourceRoot":"","sources":["../../../src/hooks/useRinggTranscripts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAIH,OAAO,KAAK,EAAE,WAAW,EAAyC,MAAM,aAAa,CAAC;AAItF,MAAM,WAAW,yBAAyB;IACxC,8CAA8C;IAC9C,WAAW,EAAE,WAAW,EAAE,CAAC;IAE3B,oDAAoD;IACpD,gBAAgB,EAAE,MAAM,IAAI,CAAC;CAC9B;AAED,wBAAgB,mBAAmB,IAAI,yBAAyB,CAgD/D"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* useRinggWidgetState — hook to observe the widget's open/close/feedback state.
|
|
3
|
-
*
|
|
4
|
-
* Subscribes to the WidgetStateController from @ringg/core and
|
|
5
|
-
* re-renders when the state changes.
|
|
6
|
-
*
|
|
7
|
-
* Usage:
|
|
8
|
-
* ```tsx
|
|
9
|
-
* const { isOpen, isShowingFeedback, toggle, open, close } = useRinggWidgetState();
|
|
10
|
-
*
|
|
11
|
-
* <TouchableOpacity onPress={toggle}>
|
|
12
|
-
* <PhoneIcon />
|
|
13
|
-
* </TouchableOpacity>
|
|
14
|
-
*
|
|
15
|
-
* {isOpen && <WidgetPanel />}
|
|
16
|
-
* {isShowingFeedback && <FeedbackScreen />}
|
|
17
|
-
* ```
|
|
18
|
-
*/
|
|
19
|
-
export interface UseRinggWidgetStateReturn {
|
|
20
|
-
/** Whether the widget panel is currently visible */
|
|
21
|
-
isOpen: boolean;
|
|
22
|
-
/** Whether the feedback screen is showing */
|
|
23
|
-
isShowingFeedback: boolean;
|
|
24
|
-
/** Current call ID (null if not in a call) */
|
|
25
|
-
currentCallId: string | null;
|
|
26
|
-
/** Open the widget panel */
|
|
27
|
-
open: () => void;
|
|
28
|
-
/** Minimize (close) the widget panel */
|
|
29
|
-
minimize: () => void;
|
|
30
|
-
/** Close and reset (clears call ID, hides feedback) */
|
|
31
|
-
close: () => void;
|
|
32
|
-
/** Toggle the widget open/closed */
|
|
33
|
-
toggle: () => void;
|
|
34
|
-
/** Show the feedback screen */
|
|
35
|
-
showFeedback: () => void;
|
|
36
|
-
}
|
|
37
|
-
export declare function useRinggWidgetState(): UseRinggWidgetStateReturn;
|
|
38
|
-
//# sourceMappingURL=useRinggWidgetState.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useRinggWidgetState.d.ts","sourceRoot":"","sources":["../../../src/hooks/useRinggWidgetState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAQH,MAAM,WAAW,yBAAyB;IACxC,oDAAoD;IACpD,MAAM,EAAE,OAAO,CAAC;IAEhB,6CAA6C;IAC7C,iBAAiB,EAAE,OAAO,CAAC;IAE3B,8CAA8C;IAC9C,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAE7B,4BAA4B;IAC5B,IAAI,EAAE,MAAM,IAAI,CAAC;IAEjB,wCAAwC;IACxC,QAAQ,EAAE,MAAM,IAAI,CAAC;IAErB,uDAAuD;IACvD,KAAK,EAAE,MAAM,IAAI,CAAC;IAElB,oCAAoC;IACpC,MAAM,EAAE,MAAM,IAAI,CAAC;IAEnB,+BAA+B;IAC/B,YAAY,EAAE,MAAM,IAAI,CAAC;CAC1B;AAED,wBAAgB,mBAAmB,IAAI,yBAAyB,CA4B/D"}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @ringg/react-native
|
|
3
|
-
*
|
|
4
|
-
* Ringg AI widget for React Native apps.
|
|
5
|
-
*
|
|
6
|
-
* Provides two consumption modes:
|
|
7
|
-
*
|
|
8
|
-
* 1. DROP-IN WIDGET — pre-built UI with FAB trigger + chat panel:
|
|
9
|
-
* ```tsx
|
|
10
|
-
* import { RinggWidget } from "@ringg/react-native";
|
|
11
|
-
* <RinggWidget config={{ agentId: "...", xApiKey: "...", variables: {} }} />
|
|
12
|
-
* ```
|
|
13
|
-
*
|
|
14
|
-
* 2. HEADLESS HOOKS — build your own UI:
|
|
15
|
-
* ```tsx
|
|
16
|
-
* import { RinggProvider, useRinggCall, useRinggChat } from "@ringg/react-native";
|
|
17
|
-
*
|
|
18
|
-
* <RinggProvider config={{ agentId: "...", xApiKey: "...", variables: {} }}>
|
|
19
|
-
* <YourCustomUI />
|
|
20
|
-
* </RinggProvider>
|
|
21
|
-
* ```
|
|
22
|
-
*/
|
|
23
|
-
export { RinggWidget } from "./components/RinggWidget";
|
|
24
|
-
export type { RinggWidgetProps } from "./components/RinggWidget";
|
|
25
|
-
export { RinggProvider, useRinggContext } from "./context";
|
|
26
|
-
export type { RinggProviderProps, RinggContextValue } from "./context";
|
|
27
|
-
export { useRinggCall, useRinggChat, useRinggTranscripts, useRinggComponents, useRinggWidgetState, useRinggFeedback, useRinggTheme } from "./hooks";
|
|
28
|
-
export type { UseRinggCallReturn, UseRinggChatReturn, UseRinggTranscriptsReturn, UseRinggComponentsReturn, UseRinggWidgetStateReturn, UseRinggFeedbackReturn, UseRinggThemeReturn } from "./hooks";
|
|
29
|
-
export { LiveKitRNAdapter } from "./adapters";
|
|
30
|
-
export type { RinggWidgetConfig, MediaType, WidgetTheme, ResolvedWidgetTheme, ComponentTheme, ChatMessage, CalendarSlot, CalendarBookingPayload, FormPayload, ButtonsPayload, ConfirmationPayload, InteractiveFlowPayload, SimpleComponentPayload, ComponentPayload, ComponentActionResponse, SlashCommand, DiseaseOption, WidgetEventName, WidgetEventMap, ConnectionState, } from "@ringg/core";
|
|
31
|
-
export { DEFAULT_CONFIG, DEFAULT_WIDGET_THEME, WIDGET_PRESET_THEMES, mergeWidgetTheme, getButtonRadius, colorToSolid, isGradient, formatTimestamp, groupSlotsByDate, formatSlotTime, formatSlotDate, isAgentIdentity, filterSlashCommands, } from "@ringg/core";
|
|
32
|
-
export { MessageBubble } from "./components/ui/MessageBubble";
|
|
33
|
-
export { WidgetHeader } from "./components/ui/WidgetHeader";
|
|
34
|
-
export { ActionButton } from "./components/ui/ActionButton";
|
|
35
|
-
export { CallControls } from "./components/ui/CallControls";
|
|
36
|
-
export { FeedbackScreen } from "./components/ui/FeedbackScreen";
|
|
37
|
-
export { TabSelector } from "./components/ui/TabSelector";
|
|
38
|
-
export { InteractiveFlow } from "./components/steps/InteractiveFlow";
|
|
39
|
-
export { CalendarStep } from "./components/steps/CalendarStep";
|
|
40
|
-
export { FormStep } from "./components/steps/FormStep";
|
|
41
|
-
export { ButtonsStep } from "./components/steps/ButtonsStep";
|
|
42
|
-
export { ConfirmationStep } from "./components/steps/ConfirmationStep";
|
|
43
|
-
export { PhoneCallRingIcon, PhoneCallIcon, PhoneEndCallIcon, MicrophoneIcon, MicOffIcon, ChatIcon, SendIcon, StarIcon, CloseIcon, MinusIcon, WidgetPhoneIcon } from "./components/ui/Icons";
|
|
44
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAGH,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,YAAY,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAGjE,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC3D,YAAY,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAGvE,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAEpJ,YAAY,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,yBAAyB,EAAE,wBAAwB,EAAE,yBAAyB,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAGnM,OAAO,EAAE,gBA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