@ringg/react-native 0.3.0 → 0.4.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/README.md +90 -80
- package/app.plugin.js +73 -0
- package/dist/index.d.mts +267 -2
- package/dist/index.d.ts +267 -2
- package/dist/index.js +825 -412
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +797 -431
- package/dist/index.mjs.map +1 -1
- package/package.json +12 -3
package/dist/index.d.ts
CHANGED
|
@@ -81,6 +81,28 @@ interface SlashCommand {
|
|
|
81
81
|
description: string;
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
+
/**
|
|
85
|
+
* GENERATED FILE — DO NOT EDIT.
|
|
86
|
+
* Source: tokens/tokens.json + tokens/defaults.json
|
|
87
|
+
* Regenerate: node scripts/generate-tokens.mjs
|
|
88
|
+
*/
|
|
89
|
+
|
|
90
|
+
declare const DEFAULT_WIDGET_THEME: ResolvedWidgetTheme;
|
|
91
|
+
declare const WIDGET_PRESET_THEMES: Record<string, WidgetTheme>;
|
|
92
|
+
declare const WIDGET_DEFAULTS: {
|
|
93
|
+
readonly mode: "prod";
|
|
94
|
+
readonly title: "Ringg AI Support";
|
|
95
|
+
readonly description: "Ringg AI offers 24/7 voice support to handle your business calls efficiently and professionally";
|
|
96
|
+
readonly defaultTab: "audio";
|
|
97
|
+
readonly hideTabSelector: false;
|
|
98
|
+
readonly defaultExpanded: false;
|
|
99
|
+
readonly bypassStartScreen: false;
|
|
100
|
+
readonly bypassFeedbackScreen: false;
|
|
101
|
+
readonly voiceCallShowAnimation: false;
|
|
102
|
+
readonly voiceCallShowTranscript: true;
|
|
103
|
+
readonly notificationTuneUrl: "https://assets.ringg.ai/audios/misc/widget_notification.mp3";
|
|
104
|
+
};
|
|
105
|
+
|
|
84
106
|
/**
|
|
85
107
|
* Widget configuration types.
|
|
86
108
|
* These define the public API surface for consumers initializing the widget.
|
|
@@ -263,6 +285,11 @@ interface CalendarBookingPayload extends BaseComponent {
|
|
|
263
285
|
component_type: "calendar_booking";
|
|
264
286
|
data: CalendarBookingData;
|
|
265
287
|
}
|
|
288
|
+
interface GroupedSlots {
|
|
289
|
+
date: string;
|
|
290
|
+
dateLabel: string;
|
|
291
|
+
slots: CalendarSlot[];
|
|
292
|
+
}
|
|
266
293
|
type FormFieldType = "text" | "email" | "tel" | "number" | "select" | "multiselect" | "textarea" | "date" | "boolean";
|
|
267
294
|
interface FormFieldOption {
|
|
268
295
|
value: string;
|
|
@@ -561,6 +588,8 @@ interface EventBus {
|
|
|
561
588
|
/** Remove all listeners for one event, or all events if omitted. */
|
|
562
589
|
off(event?: WidgetEventName): void;
|
|
563
590
|
}
|
|
591
|
+
/** Web implementation — dispatches/listens via DOM CustomEvents on `window`. */
|
|
592
|
+
declare function createDomEventBus(): EventBus;
|
|
564
593
|
/** In-memory event bus — for React Native or testing. */
|
|
565
594
|
declare function createCallbackEventBus(): EventBus;
|
|
566
595
|
|
|
@@ -578,6 +607,7 @@ interface Clock {
|
|
|
578
607
|
setTimeout(fn: () => void, ms: number): TimerHandle;
|
|
579
608
|
clearTimeout(handle: TimerHandle): void;
|
|
580
609
|
}
|
|
610
|
+
declare function createSystemClock(): Clock;
|
|
581
611
|
|
|
582
612
|
/**
|
|
583
613
|
* Small platform ports — capabilities core needs but cannot implement
|
|
@@ -594,6 +624,9 @@ interface NotificationPlayer {
|
|
|
594
624
|
/** Best-effort playback; must never throw (autoplay policies etc.) */
|
|
595
625
|
play(): void;
|
|
596
626
|
}
|
|
627
|
+
/** No-op defaults for platforms/tests that don't wire these up */
|
|
628
|
+
declare const grantedMicPermission: MicPermissionPort;
|
|
629
|
+
declare const silentNotificationPlayer: NotificationPlayer;
|
|
597
630
|
|
|
598
631
|
/**
|
|
599
632
|
* API client for the Ringg backend.
|
|
@@ -609,6 +642,101 @@ interface EnvironmentUrls {
|
|
|
609
642
|
interface UrlResolver {
|
|
610
643
|
resolve(mode: EnvironmentMode): EnvironmentUrls;
|
|
611
644
|
}
|
|
645
|
+
declare function createStaticUrlResolver(urls: Record<EnvironmentMode, EnvironmentUrls>): UrlResolver;
|
|
646
|
+
interface WebcallResponse {
|
|
647
|
+
call_id: string;
|
|
648
|
+
user_token: string;
|
|
649
|
+
enabled_slash_commands?: SlashCommand[];
|
|
650
|
+
}
|
|
651
|
+
interface FeedbackPayload {
|
|
652
|
+
rating: number;
|
|
653
|
+
comment: string;
|
|
654
|
+
}
|
|
655
|
+
interface ApiClientConfig {
|
|
656
|
+
urlResolver: UrlResolver;
|
|
657
|
+
mode: EnvironmentMode;
|
|
658
|
+
/** Sent as X-API-KEY */
|
|
659
|
+
xApiKey?: string;
|
|
660
|
+
/** Sent as Authorization; wins over xApiKey when both are set */
|
|
661
|
+
authorization?: string;
|
|
662
|
+
/** Sent as `Origin`. Omitted entirely when unset — see RinggWidgetConfig. */
|
|
663
|
+
clientOrigin?: string;
|
|
664
|
+
}
|
|
665
|
+
interface RinggApiClient {
|
|
666
|
+
readonly backendUrl: string;
|
|
667
|
+
readonly livekitUrl: string;
|
|
668
|
+
/** Initiate a webcall — returns the LiveKit token and call ID. */
|
|
669
|
+
startWebcall(params: {
|
|
670
|
+
agentId: string;
|
|
671
|
+
variables: WidgetVariables;
|
|
672
|
+
mediaType: "audio" | "text";
|
|
673
|
+
}): Promise<WebcallResponse>;
|
|
674
|
+
/** Submit post-call feedback. Best-effort — callers decide error handling. */
|
|
675
|
+
submitFeedback(callId: string, feedback: FeedbackPayload): Promise<void>;
|
|
676
|
+
/** Call a component API endpoint (for interactive flow on_complete actions). */
|
|
677
|
+
callComponentApi(method: "POST" | "GET", endpoint: string, payload: Record<string, string>): Promise<ComponentActionResponse>;
|
|
678
|
+
}
|
|
679
|
+
declare function createRinggApiClient(config: ApiClientConfig): RinggApiClient;
|
|
680
|
+
|
|
681
|
+
/**
|
|
682
|
+
* Theme engine — resolves, merges, and provides theme values.
|
|
683
|
+
* Pure functions with no framework dependency.
|
|
684
|
+
*
|
|
685
|
+
* Default and preset theme VALUES live in tokens/tokens.json (shared across
|
|
686
|
+
* all implementations via codegen) — only merging/contrast LOGIC lives here.
|
|
687
|
+
*/
|
|
688
|
+
|
|
689
|
+
/** Merge a partial user theme with the defaults. Returns a fully resolved theme. */
|
|
690
|
+
declare function mergeWidgetTheme(theme?: WidgetTheme): ResolvedWidgetTheme;
|
|
691
|
+
/** Merge a component-level theme with the widget theme as fallback. */
|
|
692
|
+
declare function mergeComponentTheme(componentTheme?: ComponentTheme, widgetTheme?: ResolvedWidgetTheme): ComponentTheme;
|
|
693
|
+
/** Get button border radius based on style */
|
|
694
|
+
declare function getButtonRadius(style?: ButtonStyle): string;
|
|
695
|
+
/** Check if a color is considered "light" (for auto-contrast) */
|
|
696
|
+
declare function isLightColor(hexColor: string): boolean;
|
|
697
|
+
/** Get a contrasting text color (black or white) for a given background */
|
|
698
|
+
declare function getContrastingTextColor(bgColor: string): string;
|
|
699
|
+
|
|
700
|
+
/**
|
|
701
|
+
* Gradient-aware style utilities for the widget theme system.
|
|
702
|
+
*
|
|
703
|
+
* CSS `backgroundColor` does not support gradient values — only the
|
|
704
|
+
* `background` shorthand does. These helpers detect whether a color value is
|
|
705
|
+
* a solid hex/rgb or a CSS gradient string, and extract a solid fallback
|
|
706
|
+
* color for surfaces that can't render gradients (borders, React Native).
|
|
707
|
+
*
|
|
708
|
+
* Parsing is deliberately explicit — small named steps instead of regexes —
|
|
709
|
+
* so a bad input can be walked through in a debugger function by function.
|
|
710
|
+
*/
|
|
711
|
+
/** Detect whether a CSS color value is a gradient string. */
|
|
712
|
+
declare function isGradient(color: string): boolean;
|
|
713
|
+
/** Extract all color stops from a gradient string, in order. */
|
|
714
|
+
declare function extractColorsFromGradient(gradient: string): string[];
|
|
715
|
+
/**
|
|
716
|
+
* Return the dominant (first) color from a gradient, or the color as-is for
|
|
717
|
+
* solid values. Falls back to the original string if no colors can be extracted.
|
|
718
|
+
*/
|
|
719
|
+
declare function getDominantColor(color: string): string;
|
|
720
|
+
/**
|
|
721
|
+
* Determine the correct CSS properties for a background color.
|
|
722
|
+
* Returns `{ backgroundColor }` for solid colors, `{ background }` for gradients.
|
|
723
|
+
* On React Native, gradients aren't natively supported — use `getDominantColor()`
|
|
724
|
+
* to fall back to a solid color.
|
|
725
|
+
*/
|
|
726
|
+
declare function colorToBackground(color: string): {
|
|
727
|
+
backgroundColor?: string;
|
|
728
|
+
background?: string;
|
|
729
|
+
};
|
|
730
|
+
/**
|
|
731
|
+
* Always return a solid hex/rgb color string. Use for properties that don't
|
|
732
|
+
* support gradients: border, box-shadow, accent-color.
|
|
733
|
+
*/
|
|
734
|
+
declare function colorToSolid(color: string): string;
|
|
735
|
+
/**
|
|
736
|
+
* Return the correct CSS properties for a border color.
|
|
737
|
+
* Solid colors -> `{ borderColor }`, gradients -> `{ borderImage, borderStyle }`.
|
|
738
|
+
*/
|
|
739
|
+
declare function colorToBorder(color: string): Record<string, string>;
|
|
612
740
|
|
|
613
741
|
/**
|
|
614
742
|
* RPC message formatting — transforms between backend RPC format and internal
|
|
@@ -622,12 +750,61 @@ interface UrlResolver {
|
|
|
622
750
|
* This module handles both directions.
|
|
623
751
|
*/
|
|
624
752
|
|
|
753
|
+
/**
|
|
754
|
+
* Transform a backend RPC payload into the internal component format.
|
|
755
|
+
* Returns null if the component type is unknown.
|
|
756
|
+
*/
|
|
757
|
+
declare function transformRpcToComponent(componentName: string, rpcPayload: Record<string, unknown>): SimpleComponentPayload | InteractiveFlowPayload | null;
|
|
758
|
+
interface RpcMessage {
|
|
759
|
+
method: string;
|
|
760
|
+
payload: string;
|
|
761
|
+
}
|
|
762
|
+
/**
|
|
763
|
+
* Format a component response payload for sending back to the backend via RPC.
|
|
764
|
+
* Used when the user interacts with a component (selects a slot, submits a
|
|
765
|
+
* form, taps a button).
|
|
766
|
+
*/
|
|
767
|
+
declare function formatComponentResponse(componentName: string, componentId: string, responseData: Record<string, unknown>, originalConfig: unknown): RpcMessage;
|
|
768
|
+
/** Format a slash command for sending via RPC. */
|
|
769
|
+
declare function formatSlashCommand(command: string): RpcMessage;
|
|
625
770
|
/** A Block Kit action as it goes on the wire (the UI-only `label` never does). */
|
|
626
771
|
interface BlocksActionWire {
|
|
627
772
|
action_id: string;
|
|
628
773
|
value?: unknown;
|
|
629
774
|
values: Record<string, unknown>;
|
|
630
775
|
}
|
|
776
|
+
/**
|
|
777
|
+
* Format a Block Kit interaction for the agent. Envelope mirrors the dashboard
|
|
778
|
+
* test widget the bot bridge was tested against: `component_id` and `values`
|
|
779
|
+
* are always present; `tool_id` is omitted when falsy and `value` when
|
|
780
|
+
* undefined (never sent as null/empty keys).
|
|
781
|
+
*/
|
|
782
|
+
declare function formatBlocksAction(toolId: string | undefined, componentId: string, action: BlocksActionWire): RpcMessage;
|
|
783
|
+
/**
|
|
784
|
+
* Format a raw dynamic-data payload (client packs: disease search/submit).
|
|
785
|
+
* The payload already carries its own `component_type` envelope.
|
|
786
|
+
*/
|
|
787
|
+
declare function formatDynamicData(payload: Record<string, unknown>): RpcMessage;
|
|
788
|
+
|
|
789
|
+
/**
|
|
790
|
+
* Component data helpers — pure functions for working with interactive
|
|
791
|
+
* component data. Shared across web and React Native renderers.
|
|
792
|
+
*/
|
|
793
|
+
|
|
794
|
+
/** Group calendar slots by date for display */
|
|
795
|
+
declare function groupSlotsByDate(slots: CalendarSlot[]): GroupedSlots[];
|
|
796
|
+
/** Format a slot time for display */
|
|
797
|
+
declare function formatSlotTime(datetime: string, timezone?: string): string;
|
|
798
|
+
/** Format a slot date for display */
|
|
799
|
+
declare function formatSlotDate(datetime: string, timezone?: string): string;
|
|
800
|
+
/** Interpolate a payload template with collected values */
|
|
801
|
+
declare function buildPayload(template: Record<string, string>, values: Record<string, string>): Record<string, string>;
|
|
802
|
+
declare function isCalendarBooking(payload: ComponentPayload): payload is CalendarBookingPayload;
|
|
803
|
+
declare function isForm(payload: ComponentPayload): payload is FormPayload;
|
|
804
|
+
declare function isButtons(payload: ComponentPayload): payload is ButtonsPayload;
|
|
805
|
+
declare function isConfirmation(payload: ComponentPayload): payload is ConfirmationPayload;
|
|
806
|
+
declare function isInteractiveFlow(payload: ComponentPayload): payload is InteractiveFlowPayload;
|
|
807
|
+
declare function isBlocks(payload: ComponentPayload): payload is BlocksPayload;
|
|
631
808
|
|
|
632
809
|
/**
|
|
633
810
|
* Base store — the one state-sharing primitive in core.
|
|
@@ -645,6 +822,14 @@ interface Store<T> {
|
|
|
645
822
|
getSnapshot(): T;
|
|
646
823
|
subscribe(listener: (snapshot: T) => void): () => void;
|
|
647
824
|
}
|
|
825
|
+
/** Internal store handle: the public read API plus commit/dispose. */
|
|
826
|
+
interface StoreHandle<T> extends Store<T> {
|
|
827
|
+
/** Rebuild the immutable snapshot from current state and notify subscribers. */
|
|
828
|
+
commit(): void;
|
|
829
|
+
/** Drop all subscribers. */
|
|
830
|
+
dispose(): void;
|
|
831
|
+
}
|
|
832
|
+
declare function createStore<T>(build: () => T): StoreHandle<T>;
|
|
648
833
|
|
|
649
834
|
/**
|
|
650
835
|
* Shell store — widget open/close/feedback lifecycle and the active call id.
|
|
@@ -677,6 +862,7 @@ interface ShellStore extends Store<ShellSnapshot> {
|
|
|
677
862
|
setCurrentCallId(callId: string | null): void;
|
|
678
863
|
dispose(): void;
|
|
679
864
|
}
|
|
865
|
+
declare function createShellStore(eventBus: EventBus, initialCallMode?: MediaType, defaultExpanded?: boolean): ShellStore;
|
|
680
866
|
|
|
681
867
|
/**
|
|
682
868
|
* Session store — the call lifecycle state machine.
|
|
@@ -724,6 +910,7 @@ interface SessionStore extends Store<SessionSnapshot> {
|
|
|
724
910
|
clearError(): void;
|
|
725
911
|
dispose(): void;
|
|
726
912
|
}
|
|
913
|
+
declare function createSessionStore(api: RinggApiClient, transport: TransportAdapter, mic: MicPermissionPort): SessionStore;
|
|
727
914
|
|
|
728
915
|
/**
|
|
729
916
|
* Message store — the single ordered conversation timeline.
|
|
@@ -782,6 +969,7 @@ interface MessageStore extends Store<MessageSnapshot> {
|
|
|
782
969
|
reset(): void;
|
|
783
970
|
dispose(): void;
|
|
784
971
|
}
|
|
972
|
+
declare function createMessageStore(clock: Clock): MessageStore;
|
|
785
973
|
|
|
786
974
|
/**
|
|
787
975
|
* Typing store — drives the "agent is typing" indicator (text mode).
|
|
@@ -812,6 +1000,7 @@ interface TypingStore extends Store<TypingSnapshot> {
|
|
|
812
1000
|
waitMinDuration(): Promise<void>;
|
|
813
1001
|
dispose(): void;
|
|
814
1002
|
}
|
|
1003
|
+
declare function createTypingStore(clock: Clock): TypingStore;
|
|
815
1004
|
|
|
816
1005
|
/**
|
|
817
1006
|
* Component store — interactive components pushed by the backend mid-call.
|
|
@@ -859,6 +1048,9 @@ interface ComponentStore extends Store<ComponentSnapshot> {
|
|
|
859
1048
|
reset(): void;
|
|
860
1049
|
dispose(): void;
|
|
861
1050
|
}
|
|
1051
|
+
declare function createComponentStore(clock: Clock,
|
|
1052
|
+
/** Commits a component to the timeline — wired to MessageStore + host events by the controller */
|
|
1053
|
+
commitComponent: (component: ComponentPayload) => void): ComponentStore;
|
|
862
1054
|
|
|
863
1055
|
/**
|
|
864
1056
|
* Slash command store — merges commands declared in config with commands the
|
|
@@ -874,6 +1066,22 @@ interface SlashCommandStore extends Store<SlashCommandSnapshot> {
|
|
|
874
1066
|
reset(): void;
|
|
875
1067
|
dispose(): void;
|
|
876
1068
|
}
|
|
1069
|
+
declare function createSlashCommandStore(configCommands?: SlashCommand[]): SlashCommandStore;
|
|
1070
|
+
|
|
1071
|
+
/**
|
|
1072
|
+
* Timing constants — every value encodes a UX bug that was found and fixed in
|
|
1073
|
+
* the production widget. Values live in tokens/defaults.json (shared across
|
|
1074
|
+
* all implementations via codegen); change them there, never here.
|
|
1075
|
+
*/
|
|
1076
|
+
/** Chat-widget RPCs land before the agent's text streams in; buffer them this
|
|
1077
|
+
* long waiting for the text so the widget sorts below it. */
|
|
1078
|
+
declare const CHAT_WIDGET_GRACE_MS: number;
|
|
1079
|
+
/** Once the agent text lands, release buffered widgets after this beat so the
|
|
1080
|
+
* message paints first. */
|
|
1081
|
+
declare const CHAT_WIDGET_AFTER_TEXT_MS: number;
|
|
1082
|
+
/** Keep the typing dots visible at least this long — instant replies
|
|
1083
|
+
* otherwise make the indicator flash. */
|
|
1084
|
+
declare const MIN_TYPING_INDICATOR_MS: number;
|
|
877
1085
|
|
|
878
1086
|
/**
|
|
879
1087
|
* RinggWidgetController — the composition root of the widget brain.
|
|
@@ -999,7 +1207,39 @@ declare const useRinggSlashCommands: (controller: RinggWidgetController) => Slas
|
|
|
999
1207
|
* reply arriving does not yank the view while the user is reading.
|
|
1000
1208
|
*/
|
|
1001
1209
|
|
|
1002
|
-
|
|
1210
|
+
/**
|
|
1211
|
+
* The managed form: hand it a config and it owns everything underneath.
|
|
1212
|
+
*
|
|
1213
|
+
* This is the RN counterpart of web's `loadAgent({ agentId, authorization })`.
|
|
1214
|
+
* The transport, the endpoint table and the microphone port are ours, not the
|
|
1215
|
+
* integrator's, so the app does not carry our infrastructure in its source.
|
|
1216
|
+
*/
|
|
1217
|
+
interface ManagedRinggWidgetProps {
|
|
1218
|
+
config: RinggWidgetConfig;
|
|
1219
|
+
/**
|
|
1220
|
+
* Overrides for the ports the widget wires by default. Supply `transport` to
|
|
1221
|
+
* bring your own (a mock in tests, a shared room), `urlResolver` to point at
|
|
1222
|
+
* something other than the Ringg endpoints, `notification` to give the widget
|
|
1223
|
+
* a sound, or `onDomAction` to handle agent-triggered app actions.
|
|
1224
|
+
*/
|
|
1225
|
+
ports?: Partial<ControllerPorts>;
|
|
1226
|
+
/**
|
|
1227
|
+
* Called once with the controller the widget built, for hosts that want to
|
|
1228
|
+
* listen for events or drive the panel imperatively without owning its
|
|
1229
|
+
* lifecycle. The controller is destroyed on unmount — do not keep using it.
|
|
1230
|
+
*/
|
|
1231
|
+
onReady?: (controller: RinggWidgetController) => void;
|
|
1232
|
+
controller?: never;
|
|
1233
|
+
room?: never;
|
|
1234
|
+
}
|
|
1235
|
+
/**
|
|
1236
|
+
* The controlled form: you built the controller, you own its lifecycle.
|
|
1237
|
+
*
|
|
1238
|
+
* Reach for it when the widget cannot own the transport — a custom adapter, a
|
|
1239
|
+
* room shared with the rest of the app, or a headless setup where the widget is
|
|
1240
|
+
* one of several views on one controller.
|
|
1241
|
+
*/
|
|
1242
|
+
interface ControlledRinggWidgetProps {
|
|
1003
1243
|
controller: RinggWidgetController;
|
|
1004
1244
|
/**
|
|
1005
1245
|
* The LiveKit room from `createLiveKitTransport()`. Optional: it only powers
|
|
@@ -1007,7 +1247,15 @@ interface RinggWidgetProps {
|
|
|
1007
1247
|
* fully functional and the visualizer shows its ambient idle animation.
|
|
1008
1248
|
*/
|
|
1009
1249
|
room?: Room;
|
|
1250
|
+
config?: never;
|
|
1251
|
+
ports?: never;
|
|
1252
|
+
onReady?: never;
|
|
1010
1253
|
}
|
|
1254
|
+
type RinggWidgetProps = ManagedRinggWidgetProps | ControlledRinggWidgetProps;
|
|
1255
|
+
/**
|
|
1256
|
+
* The widget. Pass `config` and it owns the transport, endpoints and
|
|
1257
|
+
* microphone; pass `controller` when you built those yourself.
|
|
1258
|
+
*/
|
|
1011
1259
|
declare const RinggWidget: FC<RinggWidgetProps>;
|
|
1012
1260
|
|
|
1013
1261
|
/**
|
|
@@ -1064,6 +1312,23 @@ interface LiveKitTransport {
|
|
|
1064
1312
|
}
|
|
1065
1313
|
declare const createLiveKitTransport: (options?: LiveKitTransportOptions) => LiveKitTransport;
|
|
1066
1314
|
|
|
1315
|
+
/**
|
|
1316
|
+
* The Ringg-hosted endpoints, baked into the platform entry point.
|
|
1317
|
+
*
|
|
1318
|
+
* Core deliberately embeds no URLs — they arrive through a `UrlResolver` the
|
|
1319
|
+
* entry point supplies. Every other entry point already carries this table:
|
|
1320
|
+
* web bundles it in `cdn.tsx` so `loadAgent({ agentId, authorization })` needs
|
|
1321
|
+
* nothing else, and Flutter exposes it as `defaultUrlResolver`. React Native
|
|
1322
|
+
* was the only one asking integrators to type endpoints into their own app,
|
|
1323
|
+
* which leaked our infrastructure into their source for no benefit.
|
|
1324
|
+
*
|
|
1325
|
+
* `mode` selects the row; it defaults to `prod`.
|
|
1326
|
+
*/
|
|
1327
|
+
|
|
1328
|
+
declare const DEFAULT_ENVIRONMENT_URLS: Record<EnvironmentMode, EnvironmentUrls>;
|
|
1329
|
+
/** `ControllerPorts.urlResolver` default for the managed `<RinggWidget config />`. */
|
|
1330
|
+
declare const defaultUrlResolver: UrlResolver;
|
|
1331
|
+
|
|
1067
1332
|
/**
|
|
1068
1333
|
* Native audio session — React Native's replacement for the web adapter's
|
|
1069
1334
|
* hidden `<audio>` elements.
|
|
@@ -1352,4 +1617,4 @@ declare const Markdown: FC<MarkdownProps>;
|
|
|
1352
1617
|
/** `"header-title"` → `"ringg-header-title"`. */
|
|
1353
1618
|
declare const ringgId: (name: string) => string;
|
|
1354
1619
|
|
|
1355
|
-
export { type AudioSessionPort, type ControllerPorts, GradientFill, type HostAction, type HostActionHandler, type LiveKitTransport, type LiveKitTransportOptions, Markdown, type PlayTune, RinggWidget, type RinggWidgetConfig, type RinggWidgetController, type RinggWidgetProps, type TransportAdapter, WidgetThemeProvider, appOrigin, createAudioSession, createCallbackEventBus, createHostActionDispatcher, createLiveKitTransport, createNativeMicPermission, createNotificationPlayer, createRinggWidgetController, createSilentNotificationPlayer, resolveButtonRadius, resolveFontFamily, resolveRadius, ringgId, solidColor, toSize, toViewStyle, useRinggComponents, useRinggMessages, useRinggSession, useRinggShell, useRinggSlashCommands, useRinggTyping, useStoreSnapshot, useWidgetTheme };
|
|
1620
|
+
export { type ApiClientConfig, type AudioSessionPort, type BaseComponent, type BlocksActionWire, type BlocksData, type BlocksPayload, type ButtonAction, type ButtonIconConfig, type ButtonItem, type ButtonSize, type ButtonStyle, type ButtonsConfig, type ButtonsData, type ButtonsPayload, CHAT_WIDGET_AFTER_TEXT_MS, CHAT_WIDGET_GRACE_MS, type CalendarBookingData, type CalendarBookingEventPayload, type CalendarBookingPayload, type CalendarSlot, type ChatMessage, type Clock, type ComponentAcknowledgementPayload, type ComponentActionResponse, type ComponentPayload, type ComponentSnapshot, type ComponentStore, type ComponentTheme, type ConfirmationData, type ConfirmationPayload, type ConnectionState, type ControlledRinggWidgetProps, type ControllerPorts, type ConversationStatusPayload, type CustomComponentPayload, WIDGET_DEFAULTS as DEFAULT_CONFIG, DEFAULT_ENVIRONMENT_URLS, DEFAULT_WIDGET_THEME, type DomAction, type DomActionKind, type DomActionLogEntry, type DomActionLogger, type DynamicDataExtension, type EnvironmentMode, type EnvironmentUrls, type ErrorState, type EventBus, type EventLogsConfig, type FeedbackPayload, type FeedbackScreenConfig, type FeedbackStatusPayload, type FlowStep, type FormData, type FormField, type FormFieldOption, type FormFieldType, type FormPayload, GradientFill, type GroupedSlots, type HostAction, type HostActionHandler, type IncomingChatMessage, type IncomingTextStream, type InnerWindowConfig, type InteractiveFlowData, type InteractiveFlowPayload, type LegalDisclaimerConfig, type LiveKitTransport, type LiveKitTransportOptions, MIN_TYPING_INDICATOR_MS, type ManagedRinggWidgetProps, Markdown, type MediaType, type MessageSnapshot, type MessageStore, type MicPermissionPort, type NotificationPlayer, type PendingResponse, type PlayTune, type PortableStyles, type ResolvedWidgetTheme, type RinggApiClient, RinggWidget, type RinggWidgetConfig, type RinggWidgetController, type RinggWidgetProps, type RpcInvocation, type RpcMessage, type SessionPhase, type SessionSnapshot, type SessionStartResult, type SessionStore, type ShellSnapshot, type ShellStore, type SimpleComponentPayload, type SlashCommand, type SlashCommandSnapshot, type SlashCommandStore, type SlashCommandToolType, type Store, type StoreHandle, type TimerHandle, type TranscriptionSegment, type TransportAdapter, type TriggerAlignment, type TriggerPlacement, type TypingSnapshot, type TypingStore, type UrlResolver, type VoiceCallConfig, WIDGET_PRESET_THEMES, type WebcallResponse, type WidgetAlignment, type WidgetEventMap, type WidgetEventName, type WidgetPositionConfig, type WidgetStatusPayload, type WidgetTheme, WidgetThemeProvider, type WidgetVariables, type WidgetViewState, appOrigin, buildPayload, colorToBackground, colorToBorder, colorToSolid, createAudioSession, createCallbackEventBus, createComponentStore, createDomEventBus, createHostActionDispatcher, createLiveKitTransport, createMessageStore, createNativeMicPermission, createNotificationPlayer, createRinggApiClient, createRinggWidgetController, createSessionStore, createShellStore, createSilentNotificationPlayer, createSlashCommandStore, createStaticUrlResolver, createStore, createSystemClock, createTypingStore, defaultUrlResolver, extractColorsFromGradient, formatBlocksAction, formatComponentResponse, formatDynamicData, formatSlashCommand, formatSlotDate, formatSlotTime, getButtonRadius, getContrastingTextColor, getDominantColor, grantedMicPermission, groupSlotsByDate, isBlocks, isButtons, isCalendarBooking, isConfirmation, isForm, isGradient, isInteractiveFlow, isLightColor, mergeComponentTheme, mergeWidgetTheme, resolveButtonRadius, resolveFontFamily, resolveRadius, ringgId, silentNotificationPlayer, solidColor, toSize, toViewStyle, transformRpcToComponent, useRinggComponents, useRinggMessages, useRinggSession, useRinggShell, useRinggSlashCommands, useRinggTyping, useStoreSnapshot, useWidgetTheme };
|