@pipecat-ai/client-react 1.0.1 → 1.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.ts CHANGED
@@ -1,8 +1,109 @@
1
+ import React, { ReactNode } from "react";
1
2
  import { RTVIEvent, RTVIEventHandler, PipecatClient, Tracks, TransportState } from "@pipecat-ai/client-js";
2
3
  import { Provider } from "jotai/react";
3
- import React from "react";
4
4
  import { JSX } from "react/jsx-runtime";
5
+ /**
6
+ * Custom renderer for function call messages in the conversation.
7
+ * Receives the full FunctionCallData so developers can render differently
8
+ * based on function name, status, args, and result.
9
+ */
10
+ export type FunctionCallRenderer = (functionCall: FunctionCallData) => ReactNode;
11
+ /**
12
+ * BotOutput text structure for messages in BotOutput mode
13
+ */
14
+ export interface BotOutputText {
15
+ spoken: string;
16
+ unspoken: string;
17
+ }
18
+ /**
19
+ * Metadata for aggregation types to control rendering and speech progress behavior
20
+ */
21
+ export interface AggregationMetadata {
22
+ /**
23
+ * Whether the content of this aggregation type is expected to be spoken.
24
+ * If false, it will be skipped from karaoke-style highlighting and position-based splitting.
25
+ * @default true
26
+ */
27
+ isSpoken?: boolean;
28
+ /**
29
+ * How the aggregation should be rendered.
30
+ * - 'inline': Rendered inline with surrounding text
31
+ * - 'block': Rendered as a block element (e.g., code blocks)
32
+ * @default 'inline'
33
+ */
34
+ displayMode?: "inline" | "block";
35
+ }
36
+ /**
37
+ * Data associated with an LLM function call message.
38
+ * Present only when role === "function_call".
39
+ */
40
+ export interface FunctionCallData {
41
+ /** The name of the function being called */
42
+ function_name?: string;
43
+ /** Unique identifier for this tool call */
44
+ tool_call_id?: string;
45
+ /** Arguments passed to the function */
46
+ args?: Record<string, unknown>;
47
+ /** Result of the function call (populated when complete) */
48
+ result?: unknown;
49
+ /** Whether the function call was cancelled */
50
+ cancelled?: boolean;
51
+ /** Current status of the function call */
52
+ status: "started" | "in_progress" | "completed";
53
+ }
54
+ export interface ConversationMessagePart {
55
+ /**
56
+ * Text content for the message part.
57
+ * - BotOutputText: For assistant messages with spoken/unspoken text
58
+ * - ReactNode: For user messages (strings) or custom injected content
59
+ */
60
+ text: ReactNode | BotOutputText;
61
+ final: boolean;
62
+ createdAt: string;
63
+ /**
64
+ * Aggregation type for BotOutput content (e.g., "code", "link", "sentence", "word")
65
+ * Used to determine which custom renderer to use, if any
66
+ */
67
+ aggregatedBy?: string;
68
+ /**
69
+ * Display mode for BotOutput content.
70
+ * - "inline": Rendered inline with surrounding text (default for sentence-level)
71
+ * - "block": Rendered as a block element (e.g., code blocks)
72
+ * @default "inline"
73
+ */
74
+ displayMode?: "inline" | "block";
75
+ }
76
+ export interface ConversationMessage {
77
+ role: "user" | "assistant" | "system" | "function_call";
78
+ final?: boolean;
79
+ parts: ConversationMessagePart[];
80
+ createdAt: string;
81
+ updatedAt?: string;
82
+ /** Function call data, present only when role is "function_call" */
83
+ functionCall?: FunctionCallData;
84
+ }
85
+ export const sortByCreatedAt: (a: ConversationMessage, b: ConversationMessage) => number;
86
+ export const isMessageEmpty: (message: ConversationMessage) => boolean;
87
+ export const filterEmptyMessages: (messages: ConversationMessage[]) => ConversationMessage[];
88
+ export const mergeMessages: (messages: ConversationMessage[]) => ConversationMessage[];
89
+ /**
90
+ * Deduplicate function call messages that share the same tool_call_id,
91
+ * keeping the entry with the most advanced status.
92
+ */
93
+ export const deduplicateFunctionCalls: (messages: ConversationMessage[]) => ConversationMessage[];
5
94
  export const useRTVIClientEvent: <E extends RTVIEvent>(event: E, handler: RTVIEventHandler<E>) => void;
95
+ interface ConversationContextValue {
96
+ injectMessage: (message: {
97
+ role: "user" | "assistant" | "system";
98
+ parts: ConversationMessagePart[];
99
+ }) => void;
100
+ /**
101
+ * Whether BotOutput events are supported (RTVI 1.1.0+)
102
+ * null = unknown (before BotReady), true = supported, false = not supported
103
+ */
104
+ botOutputSupported: boolean | null;
105
+ }
106
+ export const useConversationContext: () => ConversationContextValue;
6
107
  interface Props {
7
108
  client: PipecatClient;
8
109
  jotaiStore?: React.ComponentProps<typeof Provider>["store"];
@@ -78,6 +179,39 @@ interface PipecatClientMicToggleProps {
78
179
  * Headless component for controlling microphone state
79
180
  */
80
181
  export const PipecatClientMicToggle: React.FC<PipecatClientMicToggleProps>;
182
+ /**
183
+ * Hook to control screen share state using React Context
184
+ * This provides a simpler interface for basic screen share control
185
+ * For more advanced state management with Jotai atoms, use usePipecatClientScreenShare
186
+ */
187
+ export const usePipecatClientScreenShareControl: () => {
188
+ enableScreenShare: (enabled: boolean) => void;
189
+ isScreenShareEnabled: boolean;
190
+ };
191
+ interface PipecatClientScreenShareToggleProps {
192
+ /**
193
+ * Callback when screen share state changes
194
+ */
195
+ onScreenShareEnabledChanged?: (enabled: boolean) => void;
196
+ /**
197
+ * Optional prop to disable the screen share toggle.
198
+ * When disabled, changes are not applied to the client.
199
+ * @default false
200
+ */
201
+ disabled?: boolean;
202
+ /**
203
+ * Render prop that provides state and handlers to the children
204
+ */
205
+ children: (props: {
206
+ disabled?: boolean;
207
+ isScreenShareEnabled: boolean;
208
+ onClick: () => void;
209
+ }) => React.ReactNode;
210
+ }
211
+ /**
212
+ * Headless component for controlling screen share state
213
+ */
214
+ export const PipecatClientScreenShareToggle: React.FC<PipecatClientScreenShareToggleProps>;
81
215
  interface PipecatClientVideoInterface {
82
216
  aspectRatio: number;
83
217
  height: number;
@@ -130,5 +264,55 @@ interface _Props2 {
130
264
  participantType: _ParticipantType1;
131
265
  }
132
266
  export const VoiceVisualizer: React.FC<_Props2>;
267
+ /**
268
+ * Options for `usePipecatConversation`.
269
+ */
270
+ interface _Props3 {
271
+ /**
272
+ * Called once when a brand-new message first enters the conversation.
273
+ * The message may or may not be complete at this point — check `message.final`.
274
+ */
275
+ onMessageCreated?: (message: ConversationMessage) => void;
276
+ /**
277
+ * Called whenever an existing message's content changes
278
+ * (e.g. streaming text appended, function call status changed, message finalized).
279
+ * Check `message.final` to detect finalization.
280
+ */
281
+ onMessageUpdated?: (message: ConversationMessage) => void;
282
+ /**
283
+ * @deprecated Use `onMessageCreated` instead. Will be removed in a future release.
284
+ */
285
+ onMessageAdded?: (message: ConversationMessage) => void;
286
+ /**
287
+ * Metadata for aggregation types to control rendering and speech progress behavior.
288
+ * Used to determine which aggregations should be excluded from position-based splitting.
289
+ */
290
+ aggregationMetadata?: Record<string, AggregationMetadata>;
291
+ }
292
+ /**
293
+ * React hook for accessing and subscribing to the current conversation stream.
294
+ *
295
+ * This hook provides:
296
+ * - The current list of conversation messages, ordered and merged for display.
297
+ * - An `injectMessage` function to programmatically add a message to the conversation.
298
+ * - Lifecycle callbacks: `onMessageCreated`, `onMessageUpdated`.
299
+ *
300
+ * Internally, this hook:
301
+ * - Subscribes to conversation state updates and merges/filters messages for UI consumption.
302
+ * - Ensures the provided callbacks are registered and unregistered as the component mounts/unmounts or the callbacks change.
303
+ *
304
+ * @param {Props} [options] - Optional configuration for the hook.
305
+ * @returns {{
306
+ * messages: ConversationMessage[];
307
+ * injectMessage: (message: { role: "user" | "assistant" | "system"; parts: any[] }) => void;
308
+ * }}
309
+ */
310
+ export const usePipecatConversation: ({ onMessageCreated, onMessageUpdated, onMessageAdded, aggregationMetadata, }?: _Props3) => {
311
+ messages: ConversationMessage[];
312
+ injectMessage: (message: {
313
+ role: "user" | "assistant" | "system";
314
+ parts: ConversationMessagePart[];
315
+ }) => void;
316
+ };
133
317
 
134
318
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"mappings":";;;;ACWA,OAAO,MAAM,qBAAsB,CAAC,SAAS,SAAS,EACpD,OAAO,CAAC,EACR,SAAS,iBAAiB,CAAC,CAAC,SAU7B,CAAC;AEAF;IACE,MAAM,EAAE,aAAa,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,cAAc,CAAC,eAAoB,CAAC,CAAC,OAAO,CAAC,CAAC;CAClE;AAYD,OAAO,MAAM,uBAAuB,MAAM,EAAE,CAC1C,MAAM,iBAAiB,CAAC,KAAK,CAAC,CAo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AM,CAAC;CACf;AAED,iBACE,SAAQ,IAAI,CAAC,MAAM,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,UAAU,CAAC;IACrE,WAAW,EAAE,OAAO,GAAG,KAAK,CAAC;IAE7B;;OAEG;IACH,SAAS,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC;IAEpC;;OAEG;IACH,GAAG,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;IAC1B;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB;;;OAGG;IACH,QAAQ,CAAC,CAAC,UAAU,EAAE,2BAA2B,GAAG,IAAI,CAAC;CAC1D;AAED,OAAO,MAAM,oGAwJZ,CAAC;ACrLF,+BAA+B,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;AASvE,OAAO,MAAM;;;;;;;oBAqFJ,MAAM;oBAMN,MAAM;wBAMN,MAAM;CAiBd,CAAC;AC9HF,OAAO,MAAM,oDACmC,CAAC;ACDjD,yBAAuB,UAAU,CAAC,iCAAiC,CAAC,CAAC,CAAC,CAAC,CAAC;AAExE;IACE,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;IAChC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,QAAQ,CAAC;IACxC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,eAAe,EAAE,iBAAe,CAAC;CAClC;AAED,OAAO,MAAM,iBAAiB,MAAM,EAAE,CAAC,OAAK,CAoR3C,CAAC","sources":["client-react/src/src/RTVIEventContext.ts","client-react/src/src/useRTVIClientEvent.ts","client-react/src/src/PipecatClientState.tsx","client-react/src/src/PipecatClientProvider.tsx","client-react/src/src/usePipecatClient.ts","client-react/src/src/usePipecatClientMediaTrack.ts","client-react/src/src/PipecatClientAudio.tsx","client-react/src/src/usePipecatClientCamControl.ts","client-react/src/src/PipecatClientCamToggle.tsx","client-react/src/src/usePipecatClientMicControl.ts","client-react/src/src/PipecatClientMicToggle.tsx","client-react/src/src/useMergedRef.ts","client-react/src/src/PipecatClientVideo.tsx","client-react/src/src/usePipecatClientMediaDevices.ts","client-react/src/src/usePipecatClientTransportState.ts","client-react/src/src/VoiceVisualizer.tsx","client-react/src/src/index.ts","client-react/src/index.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"/**\n * Copyright (c) 2024, Daily.\n *\n * SPDX-License-Identifier: BSD-2-Clause\n */\n\nimport { PipecatClientAudio } from \"./PipecatClientAudio\";\nimport { PipecatClientCamToggle } from \"./PipecatClientCamToggle\";\nimport { PipecatClientMicToggle } from \"./PipecatClientMicToggle\";\nimport { PipecatClientProvider } from \"./PipecatClientProvider\";\nimport { PipecatClientVideo } from \"./PipecatClientVideo\";\nimport { usePipecatClient } from \"./usePipecatClient\";\nimport { usePipecatClientCamControl } from \"./usePipecatClientCamControl\";\nimport { usePipecatClientMediaDevices } from \"./usePipecatClientMediaDevices\";\nimport { usePipecatClientMediaTrack } from \"./usePipecatClientMediaTrack\";\nimport { usePipecatClientMicControl } from \"./usePipecatClientMicControl\";\nimport { usePipecatClientTransportState } from \"./usePipecatClientTransportState\";\nimport { useRTVIClientEvent } from \"./useRTVIClientEvent\";\nimport { VoiceVisualizer } from \"./VoiceVisualizer\";\n\nexport {\n PipecatClientAudio,\n PipecatClientCamToggle,\n PipecatClientMicToggle,\n PipecatClientProvider,\n PipecatClientVideo,\n usePipecatClient,\n usePipecatClientCamControl,\n usePipecatClientMediaDevices,\n usePipecatClientMediaTrack,\n usePipecatClientMicControl,\n usePipecatClientTransportState,\n useRTVIClientEvent,\n VoiceVisualizer,\n};\n"],"names":[],"version":3,"file":"index.d.ts.map"}
1
+ {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,CAAC,OAAK,CAoR3C,CAAC;ACnRF;;GAEG;AACH;IACE;;;OAGG;IACH,gBAAgB,CAAC,EAAE,CAAC,OAAO,EAAE,mBAAmB,KAAK,IAAI,CAAC;IAC1D;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,CAAC,OAAO,EAAE,mBAAmB,KAAK,IAAI,CAAC;IAC1D;;OAEG;IACH,cAAc,CAAC,EAAE,CAAC,OAAO,EAAE,mBAAmB,KAAK,IAAI,CAAC;IACxD;;;OAGG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAC;CAC3D;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,MAAM,yBAA0B,+EAKpC,OAAU;;;;;;CA0IZ,CAAC","sources":["client-react/src/src/conversation/types.ts","client-react/src/src/conversation/botOutput.ts","client-react/src/src/conversation/conversationAtoms.ts","client-react/src/src/conversation/utils.ts","client-react/src/src/conversation/conversationActions.ts","client-react/src/src/RTVIEventContext.ts","client-react/src/src/useRTVIClientEvent.ts","client-react/src/src/conversation/useConversationEventWiring.ts","client-react/src/src/conversation/PipecatConversationProvider.tsx","client-react/src/src/PipecatClientState.tsx","client-react/src/src/PipecatClientProvider.tsx","client-react/src/src/usePipecatClient.ts","client-react/src/src/usePipecatClientMediaTrack.ts","client-react/src/src/PipecatClientAudio.tsx","client-react/src/src/usePipecatClientCamControl.ts","client-react/src/src/PipecatClientCamToggle.tsx","client-react/src/src/usePipecatClientMicControl.ts","client-react/src/src/PipecatClientMicToggle.tsx","client-react/src/src/usePipecatClientScreenShareControl.ts","client-react/src/src/PipecatClientScreenShareToggle.tsx","client-react/src/src/useMergedRef.ts","client-react/src/src/PipecatClientVideo.tsx","client-react/src/src/usePipecatClientMediaDevices.ts","client-react/src/src/usePipecatClientTransportState.ts","client-react/src/src/VoiceVisualizer.tsx","client-react/src/src/usePipecatConversation.ts","client-react/src/src/index.ts","client-react/src/index.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"/**\n * Copyright (c) 2024, Daily.\n *\n * SPDX-License-Identifier: BSD-2-Clause\n */\n\nimport { PipecatClientAudio } from \"./PipecatClientAudio\";\nimport { PipecatClientCamToggle } from \"./PipecatClientCamToggle\";\nimport { PipecatClientMicToggle } from \"./PipecatClientMicToggle\";\nimport { PipecatClientProvider } from \"./PipecatClientProvider\";\nimport { PipecatClientScreenShareToggle } from \"./PipecatClientScreenShareToggle\";\nimport { PipecatClientVideo } from \"./PipecatClientVideo\";\nimport { usePipecatClient } from \"./usePipecatClient\";\nimport { usePipecatClientCamControl } from \"./usePipecatClientCamControl\";\nimport { usePipecatClientMediaDevices } from \"./usePipecatClientMediaDevices\";\nimport { usePipecatClientMediaTrack } from \"./usePipecatClientMediaTrack\";\nimport { usePipecatClientMicControl } from \"./usePipecatClientMicControl\";\nimport { usePipecatClientScreenShareControl } from \"./usePipecatClientScreenShareControl\";\nimport { usePipecatClientTransportState } from \"./usePipecatClientTransportState\";\nimport { useRTVIClientEvent } from \"./useRTVIClientEvent\";\nimport { VoiceVisualizer } from \"./VoiceVisualizer\";\nimport {\n deduplicateFunctionCalls,\n filterEmptyMessages,\n isMessageEmpty,\n mergeMessages,\n sortByCreatedAt,\n} from \"./conversation/conversationActions\";\nimport { useConversationContext } from \"./conversation/PipecatConversationProvider\";\nimport { usePipecatConversation } from \"./usePipecatConversation\";\n\nexport {\n PipecatClientAudio,\n PipecatClientCamToggle,\n PipecatClientMicToggle,\n PipecatClientProvider,\n PipecatClientScreenShareToggle,\n PipecatClientVideo,\n usePipecatClient,\n usePipecatClientCamControl,\n usePipecatClientMediaDevices,\n usePipecatClientMediaTrack,\n usePipecatClientMicControl,\n usePipecatClientScreenShareControl,\n usePipecatClientTransportState,\n useRTVIClientEvent,\n VoiceVisualizer,\n // Conversation\n useConversationContext,\n usePipecatConversation,\n deduplicateFunctionCalls,\n filterEmptyMessages,\n isMessageEmpty,\n mergeMessages,\n sortByCreatedAt,\n};\n\n// Conversation types\nexport type {\n AggregationMetadata,\n BotOutputText,\n ConversationMessage,\n ConversationMessagePart,\n FunctionCallData,\n FunctionCallRenderer,\n} from \"./conversation/types\";\n"],"names":[],"version":3,"file":"index.d.ts.map"}