@ringg/react-native 0.0.1-alpha.6 → 0.0.1-alpha.8

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.
Files changed (28) hide show
  1. package/lib/module/components/RinggWidget.js +47 -12
  2. package/lib/module/components/RinggWidget.js.map +1 -1
  3. package/lib/module/components/steps/ButtonsStep.js +146 -0
  4. package/lib/module/components/steps/ButtonsStep.js.map +1 -0
  5. package/lib/module/components/steps/CalendarStep.js +190 -0
  6. package/lib/module/components/steps/CalendarStep.js.map +1 -0
  7. package/lib/module/components/steps/ConfirmationStep.js +175 -0
  8. package/lib/module/components/steps/ConfirmationStep.js.map +1 -0
  9. package/lib/module/components/steps/FormStep.js +346 -0
  10. package/lib/module/components/steps/FormStep.js.map +1 -0
  11. package/lib/module/components/steps/InteractiveFlow.js +249 -0
  12. package/lib/module/components/steps/InteractiveFlow.js.map +1 -0
  13. package/lib/module/index.js +7 -0
  14. package/lib/module/index.js.map +1 -1
  15. package/lib/typescript/components/RinggWidget.d.ts.map +1 -1
  16. package/lib/typescript/components/steps/ButtonsStep.d.ts +17 -0
  17. package/lib/typescript/components/steps/ButtonsStep.d.ts.map +1 -0
  18. package/lib/typescript/components/steps/CalendarStep.d.ts +16 -0
  19. package/lib/typescript/components/steps/CalendarStep.d.ts.map +1 -0
  20. package/lib/typescript/components/steps/ConfirmationStep.d.ts +16 -0
  21. package/lib/typescript/components/steps/ConfirmationStep.d.ts.map +1 -0
  22. package/lib/typescript/components/steps/FormStep.d.ts +17 -0
  23. package/lib/typescript/components/steps/FormStep.d.ts.map +1 -0
  24. package/lib/typescript/components/steps/InteractiveFlow.d.ts +23 -0
  25. package/lib/typescript/components/steps/InteractiveFlow.d.ts.map +1 -0
  26. package/lib/typescript/index.d.ts +5 -0
  27. package/lib/typescript/index.d.ts.map +1 -1
  28. package/package.json +2 -2
@@ -0,0 +1,249 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * InteractiveFlow — orchestrator for interactive components.
5
+ *
6
+ * Handles:
7
+ * - Single components (calendar, form, buttons, confirmation)
8
+ * - Multi-step interactive flows with back/forward navigation
9
+ * - Step progress indicator
10
+ * - Post-completion confirmation screen
11
+ * - RPC response sending via onSendResponse callback
12
+ *
13
+ * Matches CDN interactive-flow.tsx behavior.
14
+ */
15
+
16
+ import React, { useState, useCallback, useMemo } from "react";
17
+ import { View, Text, TouchableOpacity, StyleSheet } from "react-native";
18
+ import { isCalendarBooking, isForm, isButtons, isConfirmation, formatSlotTime, formatSlotDate, colorToSolid } from "@ringg/core";
19
+ import { CalendarStep } from "./CalendarStep.js";
20
+ import { FormStep } from "./FormStep.js";
21
+ import { ButtonsStep } from "./ButtonsStep.js";
22
+ import { ConfirmationStep } from "./ConfirmationStep.js";
23
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
24
+ function isInteractiveFlow(payload) {
25
+ return payload.component_type === "interactive_flow";
26
+ }
27
+ export function InteractiveFlow({
28
+ initialComponent,
29
+ theme,
30
+ onSendResponse,
31
+ onComplete
32
+ }) {
33
+ const isMultiStepFlow = isInteractiveFlow(initialComponent);
34
+ const primarySolid = colorToSolid(theme.primaryColor);
35
+ const flowSteps = useMemo(() => isMultiStepFlow ? initialComponent.data.steps : [{
36
+ id: "single",
37
+ title: "",
38
+ component: initialComponent
39
+ }], [isMultiStepFlow, initialComponent]);
40
+ const totalSteps = flowSteps.length;
41
+ const [currentStepIndex, setCurrentStepIndex] = useState(0);
42
+ const [isProcessing, setIsProcessing] = useState(false);
43
+ const [allCollectedData, setAllCollectedData] = useState({});
44
+ const [confirmation, setConfirmation] = useState(null);
45
+ const [stepCompleted, setStepCompleted] = useState(new Array(totalSteps).fill(false));
46
+ const currentStep = flowSteps[currentStepIndex];
47
+ const showStepper = totalSteps > 1;
48
+ const handleBack = useCallback(() => {
49
+ if (currentStepIndex > 0) {
50
+ setCurrentStepIndex(prev => prev - 1);
51
+ }
52
+ }, [currentStepIndex]);
53
+ const handleStepComplete = useCallback(async stepData => {
54
+ setIsProcessing(true);
55
+ const newAllData = {
56
+ ...allCollectedData,
57
+ ...stepData
58
+ };
59
+ setAllCollectedData(newAllData);
60
+ setStepCompleted(prev => {
61
+ const updated = [...prev];
62
+ updated[currentStepIndex] = true;
63
+ return updated;
64
+ });
65
+ try {
66
+ const isLastStep = currentStepIndex === totalSteps - 1;
67
+ if (onSendResponse) {
68
+ await onSendResponse(initialComponent.component_id, {
69
+ step_index: currentStepIndex,
70
+ step_data: stepData,
71
+ all_data: newAllData,
72
+ is_final_step: isLastStep
73
+ });
74
+ if (isLastStep) {
75
+ setConfirmation({
76
+ title: "Success!",
77
+ message: "Your selection has been submitted.",
78
+ icon: "success"
79
+ });
80
+ onComplete?.(newAllData);
81
+ } else {
82
+ setCurrentStepIndex(prev => prev + 1);
83
+ }
84
+ } else {
85
+ // No RPC handler — just advance steps
86
+ if (isLastStep) {
87
+ setConfirmation({
88
+ title: "Success!",
89
+ message: "Completed.",
90
+ icon: "success"
91
+ });
92
+ onComplete?.(newAllData);
93
+ } else {
94
+ setCurrentStepIndex(prev => prev + 1);
95
+ }
96
+ }
97
+ } catch (error) {
98
+ setConfirmation({
99
+ title: "Something went wrong",
100
+ message: error.message || "Please try again.",
101
+ icon: "error"
102
+ });
103
+ } finally {
104
+ setIsProcessing(false);
105
+ }
106
+ }, [allCollectedData, currentStepIndex, totalSteps, initialComponent, onSendResponse, onComplete]);
107
+ const handleButtonClick = useCallback((buttonId, action) => {
108
+ // Navigate is handled inside ButtonsStep (Linking.openURL)
109
+ // For all other actions, just send the selection
110
+ handleStepComplete({
111
+ selected_button: buttonId
112
+ });
113
+ }, [handleStepComplete]);
114
+ return /*#__PURE__*/_jsxs(View, {
115
+ style: [styles.container, {
116
+ backgroundColor: theme.surfaceColor
117
+ }],
118
+ children: [showStepper && !confirmation ? /*#__PURE__*/_jsxs(View, {
119
+ style: styles.stepperContainer,
120
+ children: [/*#__PURE__*/_jsx(View, {
121
+ style: styles.stepperRow,
122
+ children: flowSteps.map((step, index) => /*#__PURE__*/_jsxs(View, {
123
+ style: styles.stepIndicatorGroup,
124
+ children: [/*#__PURE__*/_jsx(View, {
125
+ style: [styles.stepCircle, {
126
+ backgroundColor: stepCompleted[index] ? theme.successColor : index === currentStepIndex ? primarySolid : theme.borderColor
127
+ }],
128
+ children: /*#__PURE__*/_jsx(Text, {
129
+ style: [styles.stepCircleText, {
130
+ color: stepCompleted[index] || index === currentStepIndex ? theme.primaryTextColor : theme.mutedTextColor
131
+ }],
132
+ children: stepCompleted[index] ? "✓" : index + 1
133
+ })
134
+ }), index < flowSteps.length - 1 ? /*#__PURE__*/_jsx(View, {
135
+ style: [styles.stepConnector, {
136
+ backgroundColor: stepCompleted[index] ? theme.successColor : theme.borderColor
137
+ }]
138
+ }) : null]
139
+ }, step.id))
140
+ }), /*#__PURE__*/_jsx(Text, {
141
+ style: [styles.stepTitle, {
142
+ color: theme.textColor
143
+ }],
144
+ numberOfLines: 1,
145
+ children: currentStep.title || `Step ${currentStepIndex + 1} of ${totalSteps}`
146
+ })]
147
+ }) : null, /*#__PURE__*/_jsxs(View, {
148
+ style: styles.content,
149
+ children: [currentStepIndex > 0 && !confirmation ? /*#__PURE__*/_jsx(TouchableOpacity, {
150
+ onPress: handleBack,
151
+ style: styles.backButton,
152
+ activeOpacity: 0.7,
153
+ children: /*#__PURE__*/_jsx(Text, {
154
+ style: [styles.backText, {
155
+ color: theme.mutedTextColor
156
+ }],
157
+ children: "\u2190 Back"
158
+ })
159
+ }) : null, confirmation ? /*#__PURE__*/_jsx(ConfirmationStep, {
160
+ data: confirmation,
161
+ theme: theme,
162
+ collectedData: allCollectedData
163
+ }) : /*#__PURE__*/_jsxs(View, {
164
+ children: [isCalendarBooking(currentStep.component) ? /*#__PURE__*/_jsx(CalendarStep, {
165
+ payload: currentStep.component,
166
+ theme: theme,
167
+ isProcessing: isProcessing,
168
+ onComplete: (slotId, slotDatetime) => {
169
+ const tz = currentStep.component.data.timezone;
170
+ handleStepComplete({
171
+ slot_id: slotId,
172
+ slot_datetime: slotDatetime,
173
+ slot_time: formatSlotTime(slotDatetime, tz),
174
+ slot_date: formatSlotDate(slotDatetime, tz)
175
+ });
176
+ }
177
+ }) : null, isForm(currentStep.component) ? /*#__PURE__*/_jsx(FormStep, {
178
+ payload: currentStep.component,
179
+ theme: theme,
180
+ isProcessing: isProcessing,
181
+ onComplete: formData => handleStepComplete(formData)
182
+ }) : null, isButtons(currentStep.component) ? /*#__PURE__*/_jsx(ButtonsStep, {
183
+ payload: currentStep.component,
184
+ theme: theme,
185
+ isProcessing: isProcessing,
186
+ onButtonClick: handleButtonClick
187
+ }) : null, isConfirmation(currentStep.component) ? /*#__PURE__*/_jsx(ConfirmationStep, {
188
+ data: currentStep.component.data,
189
+ theme: theme
190
+ }) : null]
191
+ })]
192
+ })]
193
+ });
194
+ }
195
+ const styles = StyleSheet.create({
196
+ container: {
197
+ borderRadius: 12,
198
+ overflow: "hidden"
199
+ },
200
+ stepperContainer: {
201
+ paddingHorizontal: 14,
202
+ paddingTop: 14,
203
+ paddingBottom: 10
204
+ },
205
+ stepperRow: {
206
+ flexDirection: "row",
207
+ alignItems: "center",
208
+ gap: 4
209
+ },
210
+ stepIndicatorGroup: {
211
+ flexDirection: "row",
212
+ alignItems: "center",
213
+ flex: 1,
214
+ minWidth: 0
215
+ },
216
+ stepCircle: {
217
+ width: 24,
218
+ height: 24,
219
+ borderRadius: 12,
220
+ alignItems: "center",
221
+ justifyContent: "center"
222
+ },
223
+ stepCircleText: {
224
+ fontSize: 11,
225
+ fontWeight: "600"
226
+ },
227
+ stepConnector: {
228
+ flex: 1,
229
+ height: 2,
230
+ borderRadius: 1,
231
+ marginLeft: 4
232
+ },
233
+ stepTitle: {
234
+ fontSize: 11,
235
+ fontWeight: "500",
236
+ marginTop: 8
237
+ },
238
+ content: {
239
+ paddingHorizontal: 14,
240
+ paddingBottom: 14
241
+ },
242
+ backButton: {
243
+ marginBottom: 8
244
+ },
245
+ backText: {
246
+ fontSize: 12
247
+ }
248
+ });
249
+ //# sourceMappingURL=InteractiveFlow.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","useState","useCallback","useMemo","View","Text","TouchableOpacity","StyleSheet","isCalendarBooking","isForm","isButtons","isConfirmation","formatSlotTime","formatSlotDate","colorToSolid","CalendarStep","FormStep","ButtonsStep","ConfirmationStep","jsx","_jsx","jsxs","_jsxs","isInteractiveFlow","payload","component_type","InteractiveFlow","initialComponent","theme","onSendResponse","onComplete","isMultiStepFlow","primarySolid","primaryColor","flowSteps","data","steps","id","title","component","totalSteps","length","currentStepIndex","setCurrentStepIndex","isProcessing","setIsProcessing","allCollectedData","setAllCollectedData","confirmation","setConfirmation","stepCompleted","setStepCompleted","Array","fill","currentStep","showStepper","handleBack","prev","handleStepComplete","stepData","newAllData","updated","isLastStep","component_id","step_index","step_data","all_data","is_final_step","message","icon","error","handleButtonClick","buttonId","action","selected_button","style","styles","container","backgroundColor","surfaceColor","children","stepperContainer","stepperRow","map","step","index","stepIndicatorGroup","stepCircle","successColor","borderColor","stepCircleText","color","primaryTextColor","mutedTextColor","stepConnector","stepTitle","textColor","numberOfLines","content","onPress","backButton","activeOpacity","backText","collectedData","slotId","slotDatetime","tz","timezone","slot_id","slot_datetime","slot_time","slot_date","formData","onButtonClick","create","borderRadius","overflow","paddingHorizontal","paddingTop","paddingBottom","flexDirection","alignItems","gap","flex","minWidth","width","height","justifyContent","fontSize","fontWeight","marginLeft","marginTop","marginBottom"],"sourceRoot":"../../../../src","sources":["components/steps/InteractiveFlow.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,KAAK,IAAIC,QAAQ,EAAEC,WAAW,EAAEC,OAAO,QAAQ,OAAO;AAC7D,SAASC,IAAI,EAAEC,IAAI,EAAEC,gBAAgB,EAAEC,UAAU,QAAQ,cAAc;AAGvE,SAASC,iBAAiB,EAAEC,MAAM,EAAEC,S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QAAQ,EAAE;EACZ,CAAC;EACDrC,UAAU,EAAE;IACVsC,KAAK,EAAE,EAAE;IACTC,MAAM,EAAE,EAAE;IACVX,YAAY,EAAE,EAAE;IAChBM,UAAU,EAAE,QAAQ;IACpBM,cAAc,EAAE;EAClB,CAAC;EACDrC,cAAc,EAAE;IACdsC,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE;EACd,CAAC;EACDnC,aAAa,EAAE;IACb6B,IAAI,EAAE,CAAC;IACPG,MAAM,EAAE,CAAC;IACTX,YAAY,EAAE,CAAC;IACfe,UAAU,EAAE;EACd,CAAC;EACDnC,SAAS,EAAE;IACTiC,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,KAAK;IACjBE,SAAS,EAAE;EACb,CAAC;EACDjC,OAAO,EAAE;IACPmB,iBAAiB,EAAE,EAAE;IACrBE,aAAa,EAAE;EACjB,CAAC;EACDnB,UAAU,EAAE;IACVgC,YAAY,EAAE;EAChB,CAAC;EACD9B,QAAQ,EAAE;IACR0B,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC","ignoreList":[]}
@@ -44,6 +44,13 @@ export { CallControls } from "./components/ui/CallControls.js";
44
44
  export { FeedbackScreen } from "./components/ui/FeedbackScreen.js";
45
45
  export { TabSelector } from "./components/ui/TabSelector.js";
46
46
 
47
+ // ─── Interactive Step Components (for composition) ───────────────────────────
48
+ export { InteractiveFlow } from "./components/steps/InteractiveFlow.js";
49
+ export { CalendarStep } from "./components/steps/CalendarStep.js";
50
+ export { FormStep } from "./components/steps/FormStep.js";
51
+ export { ButtonsStep } from "./components/steps/ButtonsStep.js";
52
+ export { ConfirmationStep } from "./components/steps/ConfirmationStep.js";
53
+
47
54
  // ─── Icons (uses @expo/vector-icons — ships with every Expo project) ─────────
48
55
  export { PhoneCallRingIcon, PhoneCallIcon, PhoneEndCallIcon, MicrophoneIcon, MicOffIcon, ChatIcon, SendIcon, StarIcon, CloseIcon, MinusIcon, WidgetPhoneIcon } from "./components/ui/Icons.js";
49
56
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["RinggWidget","RinggProvider","useRinggContext","useRinggCall","useRinggChat","useRinggTranscripts","useRinggComponents","useRinggWidgetState","useRinggFeedback","useRinggTheme","LiveKitRNAdapter","DEFAULT_CONFIG","DEFAULT_WIDGET_THEME","WIDGET_PRESET_THEMES","mergeWidgetTheme","getButtonRadius","colorToSolid","isGradient","formatTimestamp","groupSlotsByDate","formatSlotTime","formatSlotDate","isAgentIdentity","filterSlashCommands","MessageBubble","WidgetHeader","ActionButton","CallControls","FeedbackScreen","TabSelector","PhoneCallRingIcon","PhoneCallIcon","PhoneEndCallIcon","MicrophoneIcon","MicOffIcon","ChatIcon","SendIcon","StarIcon","CloseIcon","MinusIcon","WidgetPhoneIcon"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,SAASA,WAAW,QAAQ,6BAA0B;AAGtD;AACA,SAASC,aAAa,EAAEC,eAAe,QAAQ,oBAAW;AAG1D;AACA,SAASC,YAAY,EAAEC,YAAY,EAAEC,mBAAmB,EAAEC,kBAAkB,EAAEC,mBAAmB,EAAEC,gBAAgB,EAAEC,aAAa,QAAQ,kBAAS;AAInJ;AACA,SAASC,gBAAgB,QAAQ,qBAAY;;AAE7C;;AAwBA,SACEC,cAAc,EACdC,oBAAoB,EACpBC,oBAAoB,EACpBC,gBAAgB,EAChBC,eAAe,EACfC,YAAY,EACZC,UAAU,EACVC,eAAe,EACfC,gBAAgB,EAChBC,cAAc,EACdC,cAAc,EACdC,eAAe,EACfC,mBAAmB,QACd,aAAa;;AAEpB;AACA,SAASC,aAAa,QAAQ,kCAA+B;AAC7D,SAASC,YAAY,QAAQ,iCAA8B;AAC3D,SAASC,YAAY,QAAQ,iCAA8B;AAC3D,SAASC,YAAY,QAAQ,iCAA8B;AAC3D,SAASC,cAAc,QAAQ,mCAAgC;AAC/D,SAASC,WAAW,QAAQ,gCAA6B;;AAEzD;AACA,SAASC,iBAAiB,EAAEC,aAAa,EAAEC,gBAAgB,EAAEC,cAAc,EAAEC,UAAU,EAAEC,QAAQ,EAAEC,QAAQ,EAAEC,QAAQ,EAAEC,SAAS,EAAEC,SAAS,EAAEC,eAAe,QAAQ,0BAAuB","ignoreList":[]}
1
+ {"version":3,"names":["RinggWidget","RinggProvider","useRinggContext","useRinggCall","useRinggChat","useRinggTranscripts","useRinggComponents","useRinggWidgetState","useRinggFeedback","useRinggTheme","LiveKitRNAdapter","DEFAULT_CONFIG","DEFAULT_WIDGET_THEME","WIDGET_PRESET_THEMES","mergeWidgetTheme","getButtonRadius","colorToSolid","isGradient","formatTimestamp","groupSlotsByDate","formatSlotTime","formatSlotDate","isAgentIdentity","filterSlashCommands","MessageBubble","WidgetHeader","ActionButton","CallControls","FeedbackScreen","TabSelector","InteractiveFlow","CalendarStep","FormStep","ButtonsStep","ConfirmationStep","PhoneCallRingIcon","PhoneCallIcon","PhoneEndCallIcon","MicrophoneIcon","MicOffIcon","ChatIcon","SendIcon","StarIcon","CloseIcon","MinusIcon","WidgetPhoneIcon"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,SAASA,WAAW,QAAQ,6BAA0B;AAGtD;AACA,SAASC,aAAa,EAAEC,eAAe,QAAQ,oBAAW;AAG1D;AACA,SAASC,YAAY,EAAEC,YAAY,EAAEC,mBAAmB,EAAEC,kBAAkB,EAAEC,mBAAmB,EAAEC,gBAAgB,EAAEC,aAAa,QAAQ,kBAAS;AAInJ;AACA,SAASC,gBAAgB,QAAQ,qBAAY;;AAE7C;;AAwBA,SACEC,cAAc,EACdC,oBAAoB,EACpBC,oBAAoB,E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AAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,WAAgB,EAAE,EAAE,gBAAgB,2CAMrG"}
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"}
@@ -0,0 +1,17 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,16 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,16 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,17 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,23 @@
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
@@ -0,0 +1 @@
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"}
@@ -35,5 +35,10 @@ export { ActionButton } from "./components/ui/ActionButton";
35
35
  export { CallControls } from "./components/ui/CallControls";
36
36
  export { FeedbackScreen } from "./components/ui/FeedbackScreen";
37
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";
38
43
  export { PhoneCallRingIcon, PhoneCallIcon, PhoneEndCallIcon, MicrophoneIcon, MicOffIcon, ChatIcon, SendIcon, StarIcon, CloseIcon, MinusIcon, WidgetPhoneIcon } from "./components/ui/Icons";
39
44
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
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,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAG9C,YAAY,EACV,iBAAiB,EACjB,SAAS,EACT,WAAW,EACX,mBAAmB,EACnB,cAAc,EACd,WAAW,EACX,YAAY,EACZ,sBAAsB,EACtB,WAAW,EACX,cAAc,EACd,mBAAmB,EACnB,sBAAsB,E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C7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AAGvE,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,gBAAgB,EAAE,cAAc,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ringg/react-native",
3
- "version": "0.0.1-alpha.6",
3
+ "version": "0.0.1-alpha.8",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "description": "Ringg AI widget for React Native — drop-in component and headless hooks for voice/text AI agents",
@@ -47,7 +47,7 @@
47
47
  "@livekit/react-native-expo-plugin": ">=1.0.0",
48
48
  "@config-plugins/react-native-webrtc": ">=9.0.0",
49
49
  "livekit-client": ">=2.0.0",
50
- "@ringg/core": "0.0.1-alpha.6"
50
+ "@ringg/core": "0.0.1-alpha.8"
51
51
  },
52
52
  "devDependencies": {
53
53
  "@types/react": "^18.3.10",