@ringg/react-native 0.0.1-alpha.9 → 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 -554
- 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 -236
- 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,44 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* RinggWidget — the pre-built drop-in widget for React Native.
|
|
3
|
-
*
|
|
4
|
-
* Renders a floating action button (FAB) that opens a modal with
|
|
5
|
-
* voice call or text chat capabilities. Mirrors the web CDN widget
|
|
6
|
-
* pixel-for-pixel.
|
|
7
|
-
*
|
|
8
|
-
* Usage:
|
|
9
|
-
* ```tsx
|
|
10
|
-
* import { RinggWidget } from "@ringg/react-native";
|
|
11
|
-
*
|
|
12
|
-
* function App() {
|
|
13
|
-
* return (
|
|
14
|
-
* <View style={{ flex: 1 }}>
|
|
15
|
-
* <YourApp />
|
|
16
|
-
* <RinggWidget
|
|
17
|
-
* config={{
|
|
18
|
-
* agentId: "your-agent-id",
|
|
19
|
-
* xApiKey: "your-api-key",
|
|
20
|
-
* variables: { callee_name: "John" },
|
|
21
|
-
* }}
|
|
22
|
-
* onEvent={(event, payload) => console.log(event, payload)}
|
|
23
|
-
* />
|
|
24
|
-
* </View>
|
|
25
|
-
* );
|
|
26
|
-
* }
|
|
27
|
-
* ```
|
|
28
|
-
*
|
|
29
|
-
* For custom UI, use <RinggProvider> with individual hooks instead.
|
|
30
|
-
*/
|
|
31
|
-
import { type ImageSourcePropType } from "react-native";
|
|
32
|
-
import { type RinggProviderProps } from "../context/RinggProvider";
|
|
33
|
-
export interface RinggWidgetProps extends Omit<RinggProviderProps, "children"> {
|
|
34
|
-
/** Custom FAB icon component or image source */
|
|
35
|
-
triggerIcon?: ImageSourcePropType;
|
|
36
|
-
/** Size of the FAB trigger button (default 56) */
|
|
37
|
-
triggerSize?: number;
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* Drop-in widget — wraps RinggProvider + WidgetInner.
|
|
41
|
-
* This is the highest-level component consumers use.
|
|
42
|
-
*/
|
|
43
|
-
export declare function RinggWidget({ config, urls, onEvent, triggerIcon, triggerSize }: RinggWidgetProps): import("react/jsx-runtime").JSX.Element;
|
|
44
|
-
//# sourceMappingURL=RinggWidget.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RinggWidget.d.ts","sourceRoot":"","sources":["../../../src/components/RinggWidget.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAGH,OAAO,EAA4F,KAAK,mBAAmB,EAAqD,MAAM,cAAc,CAAC;AAKrM,OAAO,EAAkC,KAAK,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAuBnG,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAAC,kBAAkB,EAAE,UAAU,CAAC;IAC5E,gDAAgD;IAChD,WAAW,CAAC,EAAE,mBAAmB,CAAC;IAElC,kDAAkD;IAClD,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,WAAgB,EAAE,EAAE,gBAAgB,2CAMrG"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ButtonsStep — renders a group of action buttons.
|
|
3
|
-
*
|
|
4
|
-
* 4 button styles: primary, secondary, outline, destructive.
|
|
5
|
-
* Supports navigate (external link) and api_call actions.
|
|
6
|
-
* Matches CDN buttons-step.tsx behavior.
|
|
7
|
-
*/
|
|
8
|
-
import type { ButtonsPayload, ButtonItem, ResolvedWidgetTheme } from "@ringg/core";
|
|
9
|
-
interface ButtonsStepProps {
|
|
10
|
-
payload: ButtonsPayload;
|
|
11
|
-
theme: ResolvedWidgetTheme;
|
|
12
|
-
isProcessing?: boolean;
|
|
13
|
-
onButtonClick: (buttonId: string, action: ButtonItem["action"]) => void;
|
|
14
|
-
}
|
|
15
|
-
export declare function ButtonsStep({ payload, theme, isProcessing, onButtonClick }: ButtonsStepProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
-
export {};
|
|
17
|
-
//# sourceMappingURL=ButtonsStep.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonsStep.d.ts","sourceRoot":"","sources":["../../../../src/components/steps/ButtonsStep.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAGnF,UAAU,gBAAgB;IACxB,OAAO,EAAE,cAAc,CAAC;IACxB,KAAK,EAAE,mBAAmB,CAAC;IAC3B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,aAAa,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,CAAC,QAAQ,CAAC,KAAK,IAAI,CAAC;CACzE;AAED,wBAAgB,WAAW,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,EAAE,gBAAgB,2CAoG5F"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CalendarStep — date & time slot picker for calendar_booking components.
|
|
3
|
-
*
|
|
4
|
-
* Displays available dates as horizontal pills, time slots in a 3-column grid,
|
|
5
|
-
* and a confirm button. Matches CDN calendar-step.tsx behavior.
|
|
6
|
-
*/
|
|
7
|
-
import type { CalendarBookingPayload, ResolvedWidgetTheme } from "@ringg/core";
|
|
8
|
-
interface CalendarStepProps {
|
|
9
|
-
payload: CalendarBookingPayload;
|
|
10
|
-
theme: ResolvedWidgetTheme;
|
|
11
|
-
isProcessing?: boolean;
|
|
12
|
-
onComplete: (slotId: string, slotDatetime: string) => void;
|
|
13
|
-
}
|
|
14
|
-
export declare function CalendarStep({ payload, theme, isProcessing, onComplete }: CalendarStepProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
-
export {};
|
|
16
|
-
//# sourceMappingURL=CalendarStep.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CalendarStep.d.ts","sourceRoot":"","sources":["../../../../src/components/steps/CalendarStep.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,KAAK,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAG/E,UAAU,iBAAiB;IACzB,OAAO,EAAE,sBAAsB,CAAC;IAChC,KAAK,EAAE,mBAAmB,CAAC;IAC3B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,UAAU,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,KAAK,IAAI,CAAC;CAC5D;AAED,wBAAgB,YAAY,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,EAAE,iBAAiB,2CAiI3F"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ConfirmationStep — displays a success/info/warning/error confirmation.
|
|
3
|
-
*
|
|
4
|
-
* Shows an icon badge, title, message, and optional detail rows.
|
|
5
|
-
* Matches CDN confirmation-step.tsx behavior.
|
|
6
|
-
*/
|
|
7
|
-
import type { ConfirmationData, ResolvedWidgetTheme } from "@ringg/core";
|
|
8
|
-
type FormValue = string | number | boolean | string[];
|
|
9
|
-
interface ConfirmationStepProps {
|
|
10
|
-
data: ConfirmationData;
|
|
11
|
-
theme: ResolvedWidgetTheme;
|
|
12
|
-
collectedData?: Record<string, FormValue>;
|
|
13
|
-
}
|
|
14
|
-
export declare function ConfirmationStep({ data, theme, collectedData }: ConfirmationStepProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
-
export {};
|
|
16
|
-
//# sourceMappingURL=ConfirmationStep.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ConfirmationStep.d.ts","sourceRoot":"","sources":["../../../../src/components/steps/ConfirmationStep.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,KAAK,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAGzE,KAAK,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,EAAE,CAAC;AAEtD,UAAU,qBAAqB;IAC7B,IAAI,EAAE,gBAAgB,CAAC;IACvB,KAAK,EAAE,mBAAmB,CAAC;IAC3B,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;CAC3C;AAED,wBAAgB,gBAAgB,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,aAAa,EAAE,EAAE,qBAAqB,2CAyFrF"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* FormStep — dynamic form renderer supporting 9 field types with validation.
|
|
3
|
-
*
|
|
4
|
-
* Field types: text, email, tel, number, select, multiselect, textarea, date, boolean.
|
|
5
|
-
* Matches CDN form-step.tsx behavior.
|
|
6
|
-
*/
|
|
7
|
-
import type { FormPayload, ResolvedWidgetTheme } from "@ringg/core";
|
|
8
|
-
type FormValue = string | number | boolean | string[];
|
|
9
|
-
interface FormStepProps {
|
|
10
|
-
payload: FormPayload;
|
|
11
|
-
theme: ResolvedWidgetTheme;
|
|
12
|
-
isProcessing?: boolean;
|
|
13
|
-
onComplete: (formData: Record<string, FormValue>) => void;
|
|
14
|
-
}
|
|
15
|
-
export declare function FormStep({ payload, theme, isProcessing, onComplete }: FormStepProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
-
export {};
|
|
17
|
-
//# sourceMappingURL=FormStep.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FormStep.d.ts","sourceRoot":"","sources":["../../../../src/components/steps/FormStep.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,KAAK,EAAE,WAAW,EAAa,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAG/E,KAAK,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,EAAE,CAAC;AAEtD,UAAU,aAAa;IACrB,OAAO,EAAE,WAAW,CAAC;IACrB,KAAK,EAAE,mBAAmB,CAAC;IAC3B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,UAAU,EAAE,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,KAAK,IAAI,CAAC;CAC3D;AAED,wBAAgB,QAAQ,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,EAAE,aAAa,2CAgSnF"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* InteractiveFlow — orchestrator for interactive components.
|
|
3
|
-
*
|
|
4
|
-
* Handles:
|
|
5
|
-
* - Single components (calendar, form, buttons, confirmation)
|
|
6
|
-
* - Multi-step interactive flows with back/forward navigation
|
|
7
|
-
* - Step progress indicator
|
|
8
|
-
* - Post-completion confirmation screen
|
|
9
|
-
* - RPC response sending via onSendResponse callback
|
|
10
|
-
*
|
|
11
|
-
* Matches CDN interactive-flow.tsx behavior.
|
|
12
|
-
*/
|
|
13
|
-
import type { SimpleComponentPayload, InteractiveFlowPayload, ResolvedWidgetTheme } from "@ringg/core";
|
|
14
|
-
type FormValue = string | number | boolean | string[];
|
|
15
|
-
interface InteractiveFlowProps {
|
|
16
|
-
initialComponent: SimpleComponentPayload | InteractiveFlowPayload;
|
|
17
|
-
theme: ResolvedWidgetTheme;
|
|
18
|
-
onSendResponse?: (componentId: string, responseData: Record<string, unknown>) => Promise<void>;
|
|
19
|
-
onComplete?: (allData: Record<string, FormValue>) => void;
|
|
20
|
-
}
|
|
21
|
-
export declare function InteractiveFlow({ initialComponent, theme, onSendResponse, onComplete }: InteractiveFlowProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
-
export {};
|
|
23
|
-
//# sourceMappingURL=InteractiveFlow.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"InteractiveFlow.d.ts","sourceRoot":"","sources":["../../../../src/components/steps/InteractiveFlow.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAKH,OAAO,KAAK,EAAE,sBAAsB,EAAE,sBAAsB,EAAoB,mBAAmB,EAAc,MAAM,aAAa,CAAC;AAQrI,KAAK,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,EAAE,CAAC;AAEtD,UAAU,oBAAoB;IAC5B,gBAAgB,EAAE,sBAAsB,GAAG,sBAAsB,CAAC;IAClE,KAAK,EAAE,mBAAmB,CAAC;IAC3B,cAAc,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/F,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,KAAK,IAAI,CAAC;CAC3D;AAMD,wBAAgB,eAAe,CAAC,EAAE,gBAAgB,EAAE,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,EAAE,oBAAoB,2CAqM5G"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ActionButton — the "Start Call" / "Start Chat" button.
|
|
3
|
-
*
|
|
4
|
-
* CDN widget behavior:
|
|
5
|
-
* - Full width, h-12 (48px)
|
|
6
|
-
* - Primary color background, primary text color
|
|
7
|
-
* - Icon + text label ("Start Call" / "Start Chat")
|
|
8
|
-
* - Loading state shows spinner + "Connecting..."
|
|
9
|
-
* - Uses theme buttonStyle for border radius ("pill" = 9999px)
|
|
10
|
-
*/
|
|
11
|
-
import type { MediaType, ResolvedWidgetTheme, ButtonsConfig } from "@ringg/core";
|
|
12
|
-
interface ActionButtonProps {
|
|
13
|
-
callMode: MediaType;
|
|
14
|
-
isLoading: boolean;
|
|
15
|
-
isConnected: boolean;
|
|
16
|
-
buttonConfig?: ButtonsConfig;
|
|
17
|
-
theme: ResolvedWidgetTheme;
|
|
18
|
-
onPress: (mode: MediaType) => void;
|
|
19
|
-
}
|
|
20
|
-
export declare function ActionButton({ callMode, isLoading, isConnected, buttonConfig, theme, onPress }: ActionButtonProps): import("react/jsx-runtime").JSX.Element | null;
|
|
21
|
-
export {};
|
|
22
|
-
//# sourceMappingURL=ActionButton.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ActionButton.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/ActionButton.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAKH,OAAO,KAAK,EAAE,SAAS,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAKjF,UAAU,iBAAiB;IACzB,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,WAAW,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,aAAa,CAAC;IAC7B,KAAK,EAAE,mBAAmB,CAAC;IAC3B,OAAO,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,IAAI,CAAC;CACpC;AAED,wBAAgB,YAAY,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,EAAE,YAAY,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,iBAAiB,kDAmCjH"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CallControls — mic toggle, end call, and text input during a call.
|
|
3
|
-
*
|
|
4
|
-
* CDN widget behavior:
|
|
5
|
-
* - Audio mode: Two circular buttons side-by-side (mic toggle + end call), each with label below
|
|
6
|
-
* - Mic: surfaceColor bg, round (h-12 w-12), mic SVG icon, "Mute"/"Un-Mute" label below
|
|
7
|
-
* - End: errorColor bg, round (h-12 w-12), phone end call icon, "End Call" label below
|
|
8
|
-
* - Text mode: Pill-shaped input with circular send button (arrow icon) inside
|
|
9
|
-
*/
|
|
10
|
-
import type { MediaType, ResolvedWidgetTheme } from "@ringg/core";
|
|
11
|
-
interface CallControlsProps {
|
|
12
|
-
callMode: MediaType;
|
|
13
|
-
isConnected: boolean;
|
|
14
|
-
isMicEnabled: boolean;
|
|
15
|
-
theme: ResolvedWidgetTheme;
|
|
16
|
-
onToggleMic: () => void;
|
|
17
|
-
onEndCall: () => void;
|
|
18
|
-
onSendMessage: (text: string) => void;
|
|
19
|
-
}
|
|
20
|
-
export declare function CallControls({ callMode, isConnected, isMicEnabled, theme, onToggleMic, onEndCall, onSendMessage }: CallControlsProps): import("react/jsx-runtime").JSX.Element | null;
|
|
21
|
-
export {};
|
|
22
|
-
//# sourceMappingURL=CallControls.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CallControls.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/CallControls.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAKH,OAAO,KAAK,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAKlE,UAAU,iBAAiB;IACzB,QAAQ,EAAE,SAAS,CAAC;IACpB,WAAW,EAAE,OAAO,CAAC;IACrB,YAAY,EAAE,OAAO,CAAC;IACtB,KAAK,EAAE,mBAAmB,CAAC;IAC3B,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,aAAa,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACvC;AAED,wBAAgB,YAAY,CAAC,EAAE,QAAQ,EAAE,WAAW,EAAE,YAAY,EAAE,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,aAAa,EAAE,EAAE,iBAAiB,kDA8DpI"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* FeedbackScreen — post-call star rating and comment form.
|
|
3
|
-
*
|
|
4
|
-
* CDN widget behavior:
|
|
5
|
-
* - Centered layout with p-6, h-full
|
|
6
|
-
* - Title: "How was your call/chat?" (lg, font-semibold)
|
|
7
|
-
* - Description: "Your feedback helps us improve!" (sm, muted)
|
|
8
|
-
* - SVG stars with filled/empty state + hover colors
|
|
9
|
-
* - Textarea: min-h-[80px], surface bg, border, resizable
|
|
10
|
-
* - Submit button: full width, primary color, button radius
|
|
11
|
-
* - Skip link: text button below, muted color
|
|
12
|
-
*/
|
|
13
|
-
import type { ResolvedWidgetTheme, FeedbackScreenConfig } from "@ringg/core";
|
|
14
|
-
interface FeedbackScreenProps {
|
|
15
|
-
theme: ResolvedWidgetTheme;
|
|
16
|
-
feedbackConfig?: FeedbackScreenConfig;
|
|
17
|
-
callMode?: "audio" | "text";
|
|
18
|
-
isSubmitting: boolean;
|
|
19
|
-
onSubmit: (rating: number, comment: string) => void;
|
|
20
|
-
onSkip: () => void;
|
|
21
|
-
}
|
|
22
|
-
export declare function FeedbackScreen({ theme, feedbackConfig, callMode, isSubmitting, onSubmit, onSkip }: FeedbackScreenProps): import("react/jsx-runtime").JSX.Element;
|
|
23
|
-
export {};
|
|
24
|
-
//# sourceMappingURL=FeedbackScreen.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FeedbackScreen.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/FeedbackScreen.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAKH,OAAO,KAAK,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAK7E,UAAU,mBAAmB;IAC3B,KAAK,EAAE,mBAAmB,CAAC;IAC3B,cAAc,CAAC,EAAE,oBAAoB,CAAC;IACtC,QAAQ,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC5B,YAAY,EAAE,OAAO,CAAC;IACtB,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACpD,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB;AAED,wBAAgB,cAAc,CAAC,EAAE,KAAK,EAAE,cAAc,EAAE,QAAkB,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,mBAAmB,2CAkFhI"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Icons — using @expo/vector-icons (Feather + MaterialIcons).
|
|
3
|
-
*
|
|
4
|
-
* @expo/vector-icons ships with every Expo project — zero extra install.
|
|
5
|
-
* Falls back to text characters if the icon sets aren't available.
|
|
6
|
-
*/
|
|
7
|
-
interface IconProps {
|
|
8
|
-
size?: number;
|
|
9
|
-
color?: string;
|
|
10
|
-
style?: object;
|
|
11
|
-
}
|
|
12
|
-
export declare function PhoneCallRingIcon({ size, color, style }: IconProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
-
export declare function PhoneCallIcon({ size, color, style }: IconProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
-
export declare function PhoneEndCallIcon({ size, color, style }: IconProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
-
export declare function MicrophoneIcon({ size, color, style }: IconProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
-
export declare function MicOffIcon({ size, color, style }: IconProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
-
export declare function ChatIcon({ size, color, style }: IconProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
-
export declare function SendIcon({ size, color, style }: IconProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
-
export declare function StarIcon({ size, filled, filledColor, emptyColor, style, }: IconProps & {
|
|
20
|
-
filled?: boolean;
|
|
21
|
-
filledColor?: string;
|
|
22
|
-
emptyColor?: string;
|
|
23
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
24
|
-
export declare function CloseIcon({ size, color, style }: IconProps): import("react/jsx-runtime").JSX.Element;
|
|
25
|
-
export declare function MinusIcon({ size, color, style }: IconProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
-
export declare function WidgetPhoneIcon({ size, color, style }: IconProps): import("react/jsx-runtime").JSX.Element;
|
|
27
|
-
export {};
|
|
28
|
-
//# sourceMappingURL=Icons.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Icons.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/Icons.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAOH,UAAU,SAAS;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAmCD,wBAAgB,iBAAiB,CAAC,EAAE,IAAS,EAAE,KAAc,EAAE,KAAK,EAAE,EAAE,SAAS,2CAGhF;AAKD,wBAAgB,aAAa,CAAC,EAAE,IAAS,EAAE,KAAc,EAAE,KAAK,EAAE,EAAE,SAAS,2CAG5E;AAID,wBAAgB,gBAAgB,CAAC,EAAE,IAAS,EAAE,KAAiB,EAAE,KAAK,EAAE,EAAE,SAAS,2CAGlF;AAID,wBAAgB,cAAc,CAAC,EAAE,IAAS,EAAE,KAAc,EAAE,KAAK,EAAE,EAAE,SAAS,2CAG7E;AAID,wBAAgB,UAAU,CAAC,EAAE,IAAS,EAAE,KAAc,EAAE,KAAK,EAAE,EAAE,SAAS,2CAGzE;AAID,wBAAgB,QAAQ,CAAC,EAAE,IAAS,EAAE,KAAc,EAAE,KAAK,EAAE,EAAE,SAAS,2CAGvE;AAID,wBAAgB,QAAQ,CAAC,EAAE,IAAS,EAAE,KAAc,EAAE,KAAK,EAAE,EAAE,SAAS,2CAGvE;AAID,wBAAgB,QAAQ,CAAC,EACvB,IAAS,EACT,MAAc,EACd,WAAuB,EACvB,UAAsB,EACtB,KAAK,GACN,EAAE,SAAS,GAAG;IACb,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,2CAMA;AAID,wBAAgB,SAAS,CAAC,EAAE,IAAS,EAAE,KAAc,EAAE,KAAK,EAAE,EAAE,SAAS,2CAGxE;AAID,wBAAgB,SAAS,CAAC,EAAE,IAAS,EAAE,KAAc,EAAE,KAAK,EAAE,EAAE,SAAS,2CAGxE;AAID,wBAAgB,eAAe,CAAC,EAAE,IAAS,EAAE,KAAc,EAAE,KAAK,EAAE,EAAE,SAAS,2CAG9E"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* MessageBubble — renders a single chat message matching the CDN widget style.
|
|
3
|
-
*
|
|
4
|
-
* CDN styling:
|
|
5
|
-
* - Agent: bg=surfaceColor, left-aligned, rounded-xl with rounded-bl-none
|
|
6
|
-
* - User: bg=primaryColor, right-aligned, rounded-xl with rounded-br-none
|
|
7
|
-
* - px-4 py-2, max-w-90%, no visible timestamp
|
|
8
|
-
* - Text color: agent=textColor, user=primaryTextColor
|
|
9
|
-
*/
|
|
10
|
-
import type { ChatMessage, ResolvedWidgetTheme } from "@ringg/core";
|
|
11
|
-
interface MessageBubbleProps {
|
|
12
|
-
message: ChatMessage;
|
|
13
|
-
theme: ResolvedWidgetTheme;
|
|
14
|
-
}
|
|
15
|
-
export declare function MessageBubble({ message, theme }: MessageBubbleProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
-
export {};
|
|
17
|
-
//# sourceMappingURL=MessageBubble.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MessageBubble.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/MessageBubble.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAKH,OAAO,KAAK,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAGpE,UAAU,kBAAkB;IAC1B,OAAO,EAAE,WAAW,CAAC;IACrB,KAAK,EAAE,mBAAmB,CAAC;CAC5B;AAED,wBAAgB,aAAa,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,kBAAkB,2CAoBnE"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* TabSelector — audio/text mode switcher at the bottom of the widget.
|
|
3
|
-
*
|
|
4
|
-
* CDN widget behavior:
|
|
5
|
-
* - Full width, border-top
|
|
6
|
-
* - Two tabs: "Chat" (ChatIcon) and "Voice Call" (PhoneCallIcon)
|
|
7
|
-
* - Each tab: flex-1, icon + label stacked, py-3
|
|
8
|
-
* - Active tab: top border in primaryColor, icon+text in primaryColor
|
|
9
|
-
* - Inactive tab: transparent top border, icon+text in mutedTextColor
|
|
10
|
-
* - Tab order: Chat first, Voice Call second (matching CDN APP_TABS)
|
|
11
|
-
*/
|
|
12
|
-
import type { MediaType, ResolvedWidgetTheme } from "@ringg/core";
|
|
13
|
-
interface TabSelectorProps {
|
|
14
|
-
activeTab: MediaType;
|
|
15
|
-
onTabChange: (tab: MediaType) => void;
|
|
16
|
-
theme: ResolvedWidgetTheme;
|
|
17
|
-
hidden?: boolean;
|
|
18
|
-
}
|
|
19
|
-
export declare function TabSelector({ activeTab, onTabChange, theme, hidden }: TabSelectorProps): import("react/jsx-runtime").JSX.Element | null;
|
|
20
|
-
export {};
|
|
21
|
-
//# sourceMappingURL=TabSelector.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TabSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/TabSelector.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAKH,OAAO,KAAK,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAKlE,UAAU,gBAAgB;IACxB,SAAS,EAAE,SAAS,CAAC;IACrB,WAAW,EAAE,CAAC,GAAG,EAAE,SAAS,KAAK,IAAI,CAAC;IACtC,KAAK,EAAE,mBAAmB,CAAC;IAC3B,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAOD,wBAAgB,WAAW,CAAC,EAAE,SAAS,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,gBAAgB,kDA4BtF"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WidgetHeader — displays the agent logo, title, and description.
|
|
3
|
-
*
|
|
4
|
-
* Two modes matching the CDN widget:
|
|
5
|
-
* 1. Pre-call: Centered 70px round logo with primary color bg, centered title + description
|
|
6
|
-
* 2. In-call: Sticky top bar with 48px logo, left-aligned title + green status
|
|
7
|
-
*/
|
|
8
|
-
import type { ResolvedWidgetTheme, PortableStyles } from "@ringg/core";
|
|
9
|
-
interface WidgetHeaderProps {
|
|
10
|
-
title: string;
|
|
11
|
-
description: string;
|
|
12
|
-
logoUrl?: string;
|
|
13
|
-
logoStyles?: PortableStyles;
|
|
14
|
-
isConnected: boolean;
|
|
15
|
-
isLoading: boolean;
|
|
16
|
-
theme: ResolvedWidgetTheme;
|
|
17
|
-
}
|
|
18
|
-
export declare function WidgetHeader({ title, description, logoUrl, logoStyles, isConnected, isLoading, theme }: WidgetHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
-
export {};
|
|
20
|
-
//# sourceMappingURL=WidgetHeader.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"WidgetHeader.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/WidgetHeader.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH,OAAO,KAAK,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAGvE,UAAU,iBAAiB;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,cAAc,CAAC;IAC5B,WAAW,EAAE,OAAO,CAAC;IACrB,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,mBAAmB,CAAC;CAC5B;AAID,wBAAgB,YAAY,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,OAAsB,EAAE,UAAU,EAAE,WAAW,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,iBAAiB,2CAyCxI"}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* RinggProvider — top-level context that holds all core instances.
|
|
3
|
-
*
|
|
4
|
-
* Wraps the widget tree and provides:
|
|
5
|
-
* - LiveKitRNAdapter (room connection, RPC, transcriptions)
|
|
6
|
-
* - RinggApiClient (backend calls)
|
|
7
|
-
* - WidgetStateController (open/close/feedback state machine)
|
|
8
|
-
* - EventBus (host app event dispatch)
|
|
9
|
-
*
|
|
10
|
-
* Consumers can either:
|
|
11
|
-
* 1. Use the pre-built <RinggWidget /> which wraps this automatically
|
|
12
|
-
* 2. Use <RinggProvider> directly with headless hooks for custom UI
|
|
13
|
-
*/
|
|
14
|
-
import { type ReactNode } from "react";
|
|
15
|
-
import { RinggApiClient, WidgetStateController, type RinggWidgetConfig, type EventBus, type ResolvedWidgetTheme, type EnvironmentUrls, type EnvironmentMode } from "@ringg/core";
|
|
16
|
-
import { LiveKitRNAdapter } from "../adapters/livekit-rn-adapter";
|
|
17
|
-
export interface RinggContextValue {
|
|
18
|
-
/** Resolved widget configuration */
|
|
19
|
-
config: RinggWidgetConfig;
|
|
20
|
-
/** LiveKit adapter for room operations */
|
|
21
|
-
livekit: LiveKitRNAdapter;
|
|
22
|
-
/** Backend API client */
|
|
23
|
-
api: RinggApiClient;
|
|
24
|
-
/** Event bus for host app communication */
|
|
25
|
-
eventBus: EventBus;
|
|
26
|
-
/** Widget state machine (open/close/feedback) */
|
|
27
|
-
widgetState: WidgetStateController;
|
|
28
|
-
/** Fully resolved theme */
|
|
29
|
-
theme: ResolvedWidgetTheme;
|
|
30
|
-
/** Resolved LiveKit WebSocket URL for the current mode */
|
|
31
|
-
livekitUrl: string;
|
|
32
|
-
}
|
|
33
|
-
export declare function useRinggContext(): RinggContextValue;
|
|
34
|
-
export interface RinggProviderProps {
|
|
35
|
-
/**
|
|
36
|
-
* Widget configuration — same shape as web's LoadAgentConfig.
|
|
37
|
-
* Required fields: agentId, xApiKey, variables
|
|
38
|
-
*/
|
|
39
|
-
config: RinggWidgetConfig;
|
|
40
|
-
/**
|
|
41
|
-
* Backend/LiveKit URL overrides per environment mode.
|
|
42
|
-
* If not provided, uses the default Ringg production URLs.
|
|
43
|
-
*/
|
|
44
|
-
urls?: Partial<Record<EnvironmentMode, EnvironmentUrls>>;
|
|
45
|
-
/**
|
|
46
|
-
* Event handlers — called when widget lifecycle events fire.
|
|
47
|
-
* Alternative to subscribing via eventBus.on().
|
|
48
|
-
*/
|
|
49
|
-
onEvent?: (event: string, payload: unknown) => void;
|
|
50
|
-
children: ReactNode;
|
|
51
|
-
}
|
|
52
|
-
export declare function RinggProvider({ config, urls, onEvent, children }: RinggProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
53
|
-
//# sourceMappingURL=RinggProvider.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RinggProvider.d.ts","sourceRoot":"","sources":["../../../src/context/RinggProvider.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAc,EAAyD,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAErG,OAAO,EAAE,cAAc,EAAuC,qBAAqB,EAAoB,KAAK,iBAAiB,EAAE,KAAK,QAAQ,EAAE,KAAK,mBAAmB,EAAE,KAAK,eAAe,EAAE,KAAK,eAAe,EAAE,MAAM,aAAa,CAAC;AAExO,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAIlE,MAAM,WAAW,iBAAiB;IAChC,oCAAoC;IACpC,MAAM,EAAE,iBAAiB,CAAC;IAE1B,0CAA0C;IAC1C,OAAO,EAAE,gBAAgB,CAAC;IAE1B,yBAAyB;IACzB,GAAG,EAAE,cAAc,CAAC;IAEpB,2CAA2C;IAC3C,QAAQ,EAAE,QAAQ,CAAC;IAEnB,iDAAiD;IACjD,WAAW,EAAE,qBAAqB,CAAC;IAEnC,2BAA2B;IAC3B,KAAK,EAAE,mBAAmB,CAAC;IAE3B,0DAA0D;IAC1D,UAAU,EAAE,MAAM,CAAC;CACpB;AAMD,wBAAgB,eAAe,IAAI,iBAAiB,CAMnD;AAID,MAAM,WAAW,kBAAkB;IACjC;;;OAGG;IACH,MAAM,EAAE,iBAAiB,CAAC;IAE1B;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,eAAe,EAAE,eAAe,CAAC,CAAC,CAAC;IAEzD;;;OAGG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAEpD,QAAQ,EAAE,SAAS,CAAC;CACrB;AAqBD,wBAAgB,aAAa,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,kBAAkB,2CAwEpF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/context/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACjE,YAAY,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export { useRinggCall } from "./useRinggCall";
|
|
2
|
-
export type { UseRinggCallReturn } from "./useRinggCall";
|
|
3
|
-
export { useRinggChat } from "./useRinggChat";
|
|
4
|
-
export type { UseRinggChatReturn } from "./useRinggChat";
|
|
5
|
-
export { useRinggTranscripts } from "./useRinggTranscripts";
|
|
6
|
-
export type { UseRinggTranscriptsReturn } from "./useRinggTranscripts";
|
|
7
|
-
export { useRinggComponents } from "./useRinggComponents";
|
|
8
|
-
export type { UseRinggComponentsReturn } from "./useRinggComponents";
|
|
9
|
-
export { useRinggWidgetState } from "./useRinggWidgetState";
|
|
10
|
-
export type { UseRinggWidgetStateReturn } from "./useRinggWidgetState";
|
|
11
|
-
export { useRinggFeedback } from "./useRinggFeedback";
|
|
12
|
-
export type { UseRinggFeedbackReturn } from "./useRinggFeedback";
|
|
13
|
-
export { useRinggTheme } from "./useRinggTheme";
|
|
14
|
-
export type { UseRinggThemeReturn } from "./useRinggTheme";
|
|
15
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,YAAY,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAEzD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,YAAY,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAEzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,YAAY,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AAEvE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,YAAY,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAErE,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,YAAY,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AAEvE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,YAAY,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAEjE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,YAAY,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* useRinggCall — headless hook to start/end calls with Ringg AI agents.
|
|
3
|
-
*
|
|
4
|
-
* Usage:
|
|
5
|
-
* ```tsx
|
|
6
|
-
* const { startCall, endCall, isConnected, isMicEnabled, toggleMic } = useRinggCall();
|
|
7
|
-
*
|
|
8
|
-
* <Button onPress={() => startCall("audio")} title="Call Agent" />
|
|
9
|
-
* <Button onPress={toggleMic} title={isMicEnabled ? "Mute" : "Unmute"} />
|
|
10
|
-
* <Button onPress={endCall} title="Hang Up" />
|
|
11
|
-
* ```
|
|
12
|
-
*/
|
|
13
|
-
import type { MediaType, ConnectionState, SlashCommand } from "@ringg/core";
|
|
14
|
-
export interface UseRinggCallReturn {
|
|
15
|
-
/** Start a call/chat session */
|
|
16
|
-
startCall: (mediaType: MediaType) => Promise<void>;
|
|
17
|
-
/** End the current call/chat session */
|
|
18
|
-
endCall: () => Promise<void>;
|
|
19
|
-
/** Current LiveKit connection state */
|
|
20
|
-
connectionState: ConnectionState;
|
|
21
|
-
/** Whether the widget is actively connected */
|
|
22
|
-
isConnected: boolean;
|
|
23
|
-
/** Loading state during call start/end */
|
|
24
|
-
isLoading: boolean;
|
|
25
|
-
/** Current call mode (audio or text) */
|
|
26
|
-
callMode: MediaType;
|
|
27
|
-
/** Current call ID (null if not in a call) */
|
|
28
|
-
callId: string | null;
|
|
29
|
-
/** Whether the microphone is currently enabled */
|
|
30
|
-
isMicEnabled: boolean;
|
|
31
|
-
/** Toggle microphone on/off */
|
|
32
|
-
toggleMic: () => Promise<void>;
|
|
33
|
-
/** Error message if call failed */
|
|
34
|
-
error: string | null;
|
|
35
|
-
/** Clear the error state */
|
|
36
|
-
clearError: () => void;
|
|
37
|
-
/** Slash commands received from the backend for this call */
|
|
38
|
-
runtimeSlashCommands: SlashCommand[];
|
|
39
|
-
}
|
|
40
|
-
export declare function useRinggCall(): UseRinggCallReturn;
|
|
41
|
-
//# sourceMappingURL=useRinggCall.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useRinggCall.d.ts","sourceRoot":"","sources":["../../../src/hooks/useRinggCall.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAKH,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AA8D5E,MAAM,WAAW,kBAAkB;IACjC,gCAAgC;IAChC,SAAS,EAAE,CAAC,SAAS,EAAE,SAAS,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAEnD,wCAAwC;IACxC,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAE7B,uCAAuC;IACvC,eAAe,EAAE,eAAe,CAAC;IAEjC,+CAA+C;IAC/C,WAAW,EAAE,OAAO,CAAC;IAErB,0CAA0C;IAC1C,SAAS,EAAE,OAAO,CAAC;IAEnB,wCAAwC;IACxC,QAAQ,EAAE,SAAS,CAAC;IAEpB,8CAA8C;IAC9C,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAEtB,kDAAkD;IAClD,YAAY,EAAE,OAAO,CAAC;IAEtB,+BAA+B;IAC/B,SAAS,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAE/B,mCAAmC;IACnC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAErB,4BAA4B;IAC5B,UAAU,EAAE,MAAM,IAAI,CAAC;IAEvB,6DAA6D;IAC7D,oBAAoB,EAAE,YAAY,EAAE,CAAC;CACtC;AAED,wBAAgB,YAAY,IAAI,kBAAkB,CAkMjD"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* useRinggChat — headless hook for text chat with the AI agent.
|
|
3
|
-
*
|
|
4
|
-
* Handles:
|
|
5
|
-
* - Receiving messages from the agent via LiveKit text streams
|
|
6
|
-
* - Sending messages from the user via LiveKit chat
|
|
7
|
-
* - Message history management
|
|
8
|
-
*
|
|
9
|
-
* Usage:
|
|
10
|
-
* ```tsx
|
|
11
|
-
* const { messages, sendMessage } = useRinggChat();
|
|
12
|
-
*
|
|
13
|
-
* <FlatList data={messages} renderItem={({ item }) => <MessageBubble message={item} />} />
|
|
14
|
-
* <TextInput onSubmitEditing={(e) => sendMessage(e.nativeEvent.text)} />
|
|
15
|
-
* ```
|
|
16
|
-
*/
|
|
17
|
-
import type { ChatMessage } from "@ringg/core";
|
|
18
|
-
export interface UseRinggChatReturn {
|
|
19
|
-
/** All messages in the current conversation (sorted chronologically) */
|
|
20
|
-
messages: ChatMessage[];
|
|
21
|
-
/** Send a text message to the agent */
|
|
22
|
-
sendMessage: (text: string) => Promise<void>;
|
|
23
|
-
/** Clear all messages (e.g., after call ends) */
|
|
24
|
-
clearMessages: () => void;
|
|
25
|
-
/** Add a component message (used internally for interactive flows) */
|
|
26
|
-
addComponentMessage: (message: ChatMessage) => void;
|
|
27
|
-
}
|
|
28
|
-
export declare function useRinggChat(): UseRinggChatReturn;
|
|
29
|
-
//# sourceMappingURL=useRinggChat.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useRinggChat.d.ts","sourceRoot":"","sources":["../../../src/hooks/useRinggChat.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAIH,OAAO,KAAK,EAAE,WAAW,EAAmB,MAAM,aAAa,CAAC;AAKhE,MAAM,WAAW,kBAAkB;IACjC,wEAAwE;IACxE,QAAQ,EAAE,WAAW,EAAE,CAAC;IAExB,uCAAuC;IACvC,WAAW,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAE7C,iDAAiD;IACjD,aAAa,EAAE,MAAM,IAAI,CAAC;IAE1B,sEAAsE;IACtE,mBAAmB,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,IAAI,CAAC;CACrD;AAED,wBAAgB,YAAY,IAAI,kBAAkB,CA6HjD"}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* useRinggComponents — headless hook for receiving interactive components from the agent.
|
|
3
|
-
*
|
|
4
|
-
* During a call, the backend can push interactive UI components
|
|
5
|
-
* (calendar, form, buttons, confirmation, multi-step flows)
|
|
6
|
-
* via LiveKit RPC. This hook handles:
|
|
7
|
-
*
|
|
8
|
-
* - Registering RPC handlers for component delivery
|
|
9
|
-
* - Transforming backend RPC format to internal component format
|
|
10
|
-
* - Tracking pending component responses
|
|
11
|
-
* - Sending user responses back to the agent
|
|
12
|
-
*
|
|
13
|
-
* Usage:
|
|
14
|
-
* ```tsx
|
|
15
|
-
* const { components, respondToComponent } = useRinggComponents();
|
|
16
|
-
*
|
|
17
|
-
* {components.map(comp => (
|
|
18
|
-
* <InteractiveComponent
|
|
19
|
-
* key={comp.component_id}
|
|
20
|
-
* data={comp}
|
|
21
|
-
* onSubmit={(response) => respondToComponent(comp.component_id, response)}
|
|
22
|
-
* />
|
|
23
|
-
* ))}
|
|
24
|
-
* ```
|
|
25
|
-
*/
|
|
26
|
-
import type { SimpleComponentPayload, InteractiveFlowPayload, DiseaseOption } from "@ringg/core";
|
|
27
|
-
type ComponentPayload = SimpleComponentPayload | InteractiveFlowPayload;
|
|
28
|
-
export interface UseRinggComponentsReturn {
|
|
29
|
-
/** Components received from the agent, in order */
|
|
30
|
-
components: ComponentPayload[];
|
|
31
|
-
/** Send a user's response to a component back to the agent */
|
|
32
|
-
respondToComponent: (componentId: string, responseData: Record<string, unknown>) => Promise<void>;
|
|
33
|
-
/** Search diseases (for policy finder widget) */
|
|
34
|
-
searchDiseases: (query: string) => Promise<DiseaseOption[]>;
|
|
35
|
-
/** Submit disease widget data */
|
|
36
|
-
submitDiseaseWidget: (componentId: string, selections: Array<{
|
|
37
|
-
disease_name: string;
|
|
38
|
-
sub_questions: Array<{
|
|
39
|
-
question_id: string;
|
|
40
|
-
answer: string;
|
|
41
|
-
}>;
|
|
42
|
-
}>) => Promise<void>;
|
|
43
|
-
/** Send a slash command to the agent */
|
|
44
|
-
sendSlashCommand: (command: string) => Promise<void>;
|
|
45
|
-
/** Clear all components (e.g., after call ends) */
|
|
46
|
-
clearComponents: () => void;
|
|
47
|
-
/** Reference URLs received from the agent */
|
|
48
|
-
lastSourceUrl: string;
|
|
49
|
-
}
|
|
50
|
-
export declare function useRinggComponents(): UseRinggComponentsReturn;
|
|
51
|
-
export {};
|
|
52
|
-
//# sourceMappingURL=useRinggComponents.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useRinggComponents.d.ts","sourceRoot":"","sources":["../../../src/hooks/useRinggComponents.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAIH,OAAO,KAAK,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,aAAa,EAAkC,MAAM,aAAa,CAAC;AAKjI,KAAK,gBAAgB,GAAG,sBAAsB,GAAG,sBAAsB,CAAC;AAOxE,MAAM,WAAW,wBAAwB;IACvC,mDAAmD;IACnD,UAAU,EAAE,gBAAgB,EAAE,CAAC;IAE/B,8DAA8D;IAC9D,kBAAkB,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAElG,iDAAiD;IACjD,cAAc,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,aAAa,EAAE,CAAC,CAAC;IAE5D,iCAAiC;IACjC,mBAAmB,EAAE,CACnB,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,KAAK,CAAC;QAChB,YAAY,EAAE,MAAM,CAAC;QACrB,aAAa,EAAE,KAAK,CAAC;YAAE,WAAW,EAAE,MAAM,CAAC;YAAC,MAAM,EAAE,MAAM,CAAA;SAAE,CAAC,CAAC;KAC/D,CAAC,KACC,OAAO,CAAC,IAAI,CAAC,CAAC;IAEnB,wCAAwC;IACxC,gBAAgB,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAErD,mDAAmD;IACnD,eAAe,EAAE,MAAM,IAAI,CAAC;IAE5B,6CAA6C;IAC7C,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,wBAAgB,kBAAkB,IAAI,wBAAwB,CAyN7D"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* useRinggFeedback — headless hook for post-call feedback submission.
|
|
3
|
-
*
|
|
4
|
-
* Usage:
|
|
5
|
-
* ```tsx
|
|
6
|
-
* const { submitFeedback, skipFeedback, isSubmitting } = useRinggFeedback();
|
|
7
|
-
*
|
|
8
|
-
* <StarRating onRate={(rating) => setRating(rating)} />
|
|
9
|
-
* <TextInput onChangeText={setComment} />
|
|
10
|
-
* <Button onPress={() => submitFeedback(rating, comment)} title="Submit" />
|
|
11
|
-
* <Button onPress={skipFeedback} title="Skip" />
|
|
12
|
-
* ```
|
|
13
|
-
*/
|
|
14
|
-
export interface UseRinggFeedbackReturn {
|
|
15
|
-
/** Submit feedback for the last call */
|
|
16
|
-
submitFeedback: (rating: number, comment: string) => Promise<void>;
|
|
17
|
-
/** Skip feedback */
|
|
18
|
-
skipFeedback: () => void;
|
|
19
|
-
/** Whether feedback is currently being submitted */
|
|
20
|
-
isSubmitting: boolean;
|
|
21
|
-
}
|
|
22
|
-
export declare function useRinggFeedback(): UseRinggFeedbackReturn;
|
|
23
|
-
//# sourceMappingURL=useRinggFeedback.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useRinggFeedback.d.ts","sourceRoot":"","sources":["../../../src/hooks/useRinggFeedback.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAMH,MAAM,WAAW,sBAAsB;IACrC,wCAAwC;IACxC,cAAc,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAEnE,oBAAoB;IACpB,YAAY,EAAE,MAAM,IAAI,CAAC;IAEzB,oDAAoD;IACpD,YAAY,EAAE,OAAO,CAAC;CACvB;AAED,wBAAgB,gBAAgB,IAAI,sBAAsB,CA+CzD"}
|