@botpress/webchat 4.5.2 → 5.3.2

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
@@ -3,43 +3,53 @@ import { ClassAttributes } from '../../../node_modules/@types/react';
3
3
  import { Client } from '@botpress/webchat-client';
4
4
  import { ComponentProps } from '../../../node_modules/@types/react';
5
5
  import { ComponentProps as ComponentProps_2 } from '../../node_modules/@types/react';
6
- import { ComponentPropsWithRef } from '../../node_modules/@types/react';
7
6
  import { LatestWebchatConfig as Configuration } from '@bpinternal/shared';
8
7
  import { Context } from '../../node_modules/@types/react';
8
+ import { ConversationStarter } from '@bpinternal/shared';
9
+ import { ConversationStarterDisplayStyle } from '@bpinternal/shared';
9
10
  import { createEventEmitter } from '@bpinternal/shared';
10
11
  import { CSSProperties } from '../../node_modules/@types/react';
11
12
  import * as Dialog from '@radix-ui/react-dialog';
12
13
  import { Dispatch } from '../../node_modules/@types/react';
13
14
  import { EventEmitter } from '@bpinternal/shared';
14
- import { FC } from '../../node_modules/@types/react';
15
- import { ForwardRefExoticComponent } from '../../node_modules/@types/react';
16
- import { ForwardRefExoticComponent as ForwardRefExoticComponent_2 } from '../../../node_modules/@types/react';
17
- import { ForwardRefExoticComponent as ForwardRefExoticComponent_3 } from 'react';
15
+ import { ForwardRefExoticComponent } from '../../../node_modules/@types/react';
16
+ import { ForwardRefExoticComponent as ForwardRefExoticComponent_2 } from 'react';
17
+ import { ForwardRefExoticComponent as ForwardRefExoticComponent_3 } from '../../../../node_modules/@types/react';
18
18
  import { HTMLAttributes } from '../../../node_modules/@types/react';
19
19
  import { IntegrationError } from '@botpress/webchat-client';
20
- import { JSX } from '../../node_modules/@types/react';
21
- import { JSX as JSX_2 } from 'react/jsx-runtime';
20
+ import { JSX } from 'react/jsx-runtime';
21
+ import { JSX as JSX_2 } from '../../node_modules/@types/react';
22
22
  import { LatestWebchatTheme } from '@bpinternal/shared';
23
23
  import { ListConversationsResponse } from '@botpress/webchat-client';
24
+ import { LucideIcon } from 'lucide-react';
24
25
  import { MemoExoticComponent } from '../../../node_modules/@types/react';
25
26
  import { Message as Message_2 } from '@botpress/webchat-client';
26
27
  import { NamedExoticComponent } from '../../../node_modules/@types/react';
27
28
  import { PersistOptions } from 'zustand/middleware';
28
- import { Provider } from '../../node_modules/@types/react';
29
- import { ReactNode } from '../../../node_modules/@types/react';
30
- import { ReactNode as ReactNode_2 } from '../../node_modules/@types/react';
29
+ import { ReactNode } from '../../node_modules/@types/react';
30
+ import { ReactNode as ReactNode_2 } from '../../../node_modules/@types/react';
31
31
  import { Ref } from '../../../node_modules/@types/react';
32
- import { RefAttributes } from '../../node_modules/@types/react';
33
- import { RefAttributes as RefAttributes_2 } from '../../../node_modules/@types/react';
34
- import { RefAttributes as RefAttributes_3 } from 'react';
32
+ import { RefAttributes } from '../../../node_modules/@types/react';
33
+ import { RefAttributes as RefAttributes_2 } from 'react';
34
+ import { RefAttributes as RefAttributes_3 } from '../../../../node_modules/@types/react';
35
35
  import { RefObject } from '../../node_modules/@types/react';
36
- import { RotateCcw } from 'lucide-react';
37
36
  import { SetStateAction } from '../../node_modules/@types/react';
37
+ import { StateStorage } from 'zustand/middleware';
38
38
  import { StoreApi } from 'zustand';
39
39
  import { UseBoundStore } from 'zustand';
40
40
  import { User } from '@botpress/webchat-client';
41
41
  import { UserCredentials } from '@botpress/webchat-client';
42
42
 
43
+ declare type Action = {
44
+ label: string;
45
+ value: string;
46
+ variant: 'action' | 'link';
47
+ };
48
+
49
+ export declare const ActionButton: ({ text, buttonValue, variant, groupId, reusable, sendMessage, isReadOnly }: Props_7) => JSX.Element;
50
+
51
+ export declare const ActionButtons: ({ actions, groupId, reusable, sendMessage, isReadOnly }: Props_8) => JSX.Element | null;
52
+
43
53
  declare type AnyEvent = ValueOf<{
44
54
  [K in keyof WebchatEvents]: {
45
55
  type: K;
@@ -49,63 +59,66 @@ declare type AnyEvent = ValueOf<{
49
59
 
50
60
  export declare const ar: WebchatTranslations;
51
61
 
62
+ declare const Audio_2: ({ url, isReadOnly }: Props_12) => JSX.Element;
63
+ export { Audio_2 as Audio }
64
+
52
65
  export declare type AudioBlock = {
53
66
  type: 'audio';
54
67
  url: string;
55
68
  };
56
69
 
57
- export declare const Avatar: ForwardRefExoticComponent<Omit<AvatarProps, "ref"> & RefAttributes<HTMLSpanElement>>;
70
+ export declare const Avatar: ({ userId, src, containerClassName, imageClassName, fallbackClassName, children, }: AvatarProps) => JSX.Element;
58
71
 
59
72
  declare type AvatarProps = {
60
73
  userId?: string;
61
74
  src?: string;
62
- container: {
63
- className?: string;
64
- };
65
- image: {
66
- className?: string;
67
- };
68
- fallback: {
69
- className?: string;
70
- };
71
- } & Omit<ComponentPropsWithRef<'span'>, 'className' | 'style'>;
75
+ containerClassName?: string;
76
+ imageClassName?: string;
77
+ fallbackClassName?: string;
78
+ children?: ReactNode;
79
+ };
80
+
81
+ export declare const Bloc: ({ items, ctx }: Props_19) => JSX.Element;
82
+
83
+ export declare type BlocBlock = {
84
+ type: 'bloc';
85
+ items: LeafBlock[];
86
+ };
72
87
 
73
88
  export declare type BlocIntegrationMessageItems = Extract<IntegrationMessage['payload'], {
74
89
  type: 'bloc';
75
90
  }>['items'];
76
91
 
77
- export declare const Block: <T extends GenericBlock["type"]>({ block, renderers, ...props }: BlockProps<T>) => JSX.Element;
92
+ /** Context passed through the block rendering tree */
93
+ export declare type BlockContext = {
94
+ direction: 'incoming' | 'outgoing' | 'system';
95
+ messageId: string;
96
+ isReadOnly?: boolean;
97
+ sendMessage?: ScopedClient['sendMessage'];
98
+ /** All citation entries on the message (`metadata.citations`); renderers pick
99
+ * the entries whose `path` matches their own field via `citationPath`. */
100
+ citations?: CitationEntry[];
101
+ /** Pre-built Sources footer for cited messages. Renderers that carry both
102
+ * prompt text AND interactive controls (choice, dropdown) place this between
103
+ * the text and the controls so Sources sits under the answer, above the
104
+ * pills; other blocks let `Message` append it after the content. */
105
+ footer?: ReactNode;
106
+ };
78
107
 
79
- export declare type BlockMessage<T = GenericBlock> = {
108
+ export declare type BlockMessage = {
80
109
  id: string;
81
110
  timestamp: Date;
82
- block: T;
111
+ block: MessageBlock;
83
112
  conversationId?: string;
84
113
  authorId?: string;
85
114
  disableInput?: boolean;
86
115
  status?: 'pending' | 'processing' | 'processed' | 'failed' | 'skipped';
116
+ feedback?: 'positive' | 'negative';
87
117
  metadata?: {
88
118
  clientMessageId?: string;
89
119
  delivered?: boolean;
90
120
  [k: string]: any;
91
121
  };
92
- feedback?: Feedback['value'];
93
- };
94
-
95
- declare type BlockMessagePayload = {
96
- payload: GenericBlock;
97
- disableInput?: boolean;
98
- };
99
-
100
- export declare type BlockObjects = {
101
- [T in GenericBlock['type']]: Extract<GenericBlock, {
102
- type: T;
103
- }> & CommonBlockProps;
104
- };
105
-
106
- declare type BlockProps<T extends GenericBlock['type']> = {
107
- block: BlockObjects[T];
108
- renderers?: Partial<Renderers>;
109
122
  };
110
123
 
111
124
  export declare const BOT_IS_BLOCKED = "This bot has temporarily paused.\nPlease check back later.";
@@ -114,23 +127,10 @@ declare type BoundChatSoundStore = ReturnType<typeof createChatSoundStore>;
114
127
 
115
128
  declare type BoundWebchatClientStore = ReturnType<typeof createWebchatClientStore>;
116
129
 
117
- export declare type BubbleBlock = {
118
- type: 'bubble';
119
- block: GenericBlock;
120
- };
130
+ export declare const Bubble: ({ ctx, children }: Props_9) => JSX.Element;
121
131
 
122
- export declare type BubbleOf<T extends GenericBlock> = Omit<BubbleBlock, 'block'> & {
123
- block: T;
124
- };
125
-
126
- export declare type ButtonBlock = {
127
- type: 'button';
128
- variant: 'action' | 'link';
129
- reusable?: boolean;
130
- groupId?: string;
131
- text: string;
132
- buttonValue: string;
133
- };
132
+ /** @deprecated Use ActionButton */
133
+ export declare const Button: ({ text, buttonValue, variant, groupId, reusable, sendMessage, isReadOnly }: Props_7) => JSX.Element;
134
134
 
135
135
  declare type ByType<M extends {
136
136
  type: string;
@@ -140,12 +140,62 @@ declare type ByType<M extends {
140
140
  }>;
141
141
  };
142
142
 
143
+ export declare const Card: ({ imageUrl, title, subtitle, actions, ctx, citationBasePath }: Props_17) => JSX.Element;
144
+
145
+ export declare type CardAction = {
146
+ label: string;
147
+ value: string;
148
+ variant: 'action' | 'link';
149
+ };
150
+
151
+ export declare type CardBlock = {
152
+ type: 'card';
153
+ imageUrl?: string;
154
+ title?: string;
155
+ subtitle?: string;
156
+ actions: CardAction[];
157
+ /** Payload dot-path of this card ("root" for a standalone card,
158
+ * "root.items.N" inside a carousel) — citation paths derive from it. */
159
+ citationBasePath?: string;
160
+ };
161
+
162
+ export declare const Carousel: ({ cards, ctx }: Props_14) => JSX.Element;
163
+
143
164
  export declare type CarouselBlock = {
144
165
  type: 'carousel';
145
- blocks: GenericBlock[];
166
+ cards: CardBlock[];
146
167
  };
147
168
 
148
- export declare const Chat: ({ connected, configuration, isTyping, messages, user, isLoading, renderers, isReadOnly, disableComposer, error, participants, closeWindow, sendMessage, uploadFile, addMessageFeedback, listConversations, restartConversation, clientId, storageKey, soundOn, toggleSound, disableSendButton, conversationId, locale, isOpen, ...props }: Props) => JSX_2.Element;
169
+ export declare const Chat: ({ connected, configuration, isTyping, messages, user, isLoading, isReadOnly, disableComposer, error, participants, closeWindow, sendMessage, addMessageFeedback, uploadFile, listConversations, restartConversation, clientId, storageKey, soundOn, toggleSound, disableSendButton, conversationId, expanded, onToggleExpand, locale, ...props }: ChatProps) => JSX.Element;
170
+
171
+ export declare type ChatProps = {
172
+ className?: string;
173
+ configuration: Configuration;
174
+ messages: BlockMessage[];
175
+ participants: User[];
176
+ connected?: boolean;
177
+ disableComposer?: boolean;
178
+ isReadOnly?: boolean;
179
+ isLoading?: boolean;
180
+ isTyping?: boolean;
181
+ clientId?: string;
182
+ closeWindow?: () => void;
183
+ restartConversation?: (conversationid?: string) => void;
184
+ user?: UserCredentials;
185
+ sendMessage?: ScopedClient['sendMessage'];
186
+ addMessageFeedback?: (messageId: string, feedback: Feedback) => Promise<void>;
187
+ uploadFile?: ScopedClient['uploadFile'];
188
+ listConversations?: ScopedClient['listConversations'];
189
+ error?: WebchatError;
190
+ soundOn?: boolean;
191
+ toggleSound?: () => void;
192
+ storageKey?: string;
193
+ disableSendButton?: boolean;
194
+ conversationId?: string;
195
+ expanded?: boolean;
196
+ onToggleExpand?: () => void;
197
+ locale?: Partial<WebchatTranslations>;
198
+ };
149
199
 
150
200
  declare type ChatSoundStore = {
151
201
  soundOn: boolean;
@@ -153,32 +203,47 @@ declare type ChatSoundStore = {
153
203
  toggleSound: () => void;
154
204
  };
155
205
 
156
- export declare type ClientStates = 'connecting' | 'connected' | 'error' | 'disconnected';
206
+ export declare const Choice: ({ text, options, groupId, ctx }: Props_18) => JSX.Element;
157
207
 
158
- declare type ClientStates_2 = 'connecting' | 'connected' | 'error' | 'disconnected';
208
+ export declare type ChoiceBlock = {
209
+ type: 'choice';
210
+ text: string;
211
+ options: {
212
+ label: string;
213
+ value: string;
214
+ }[];
215
+ groupId: string;
216
+ disableFreeText?: boolean;
217
+ };
159
218
 
160
- export declare type ColumnBlock = {
161
- type: 'column';
162
- blocks: GenericBlock[];
163
- horizontalAlignment?: 'left' | 'center' | 'right';
164
- verticalAlignment?: 'top' | 'center' | 'bottom' | 'stretch';
219
+ declare type Citation = {
220
+ id: number;
221
+ source: CitationSource;
222
+ tag?: string;
223
+ offset?: number;
165
224
  };
166
225
 
167
- export declare type ColumnOf<T extends GenericBlock> = Omit<ColumnBlock, 'blocks'> & {
168
- blocks: T[];
226
+ /** One entry of `metadata.citations`. */
227
+ declare type CitationEntry = {
228
+ path: string;
229
+ citation: Citation;
169
230
  };
170
231
 
171
- export declare const commonApiErrorMap: {
172
- [key in 'MethodNotFound' | 'QuotaExceeded' | 'Forbidden']: WebchatError;
232
+ declare type CitationSource = {
233
+ url?: string;
234
+ title?: string;
235
+ favicon?: string;
236
+ file?: string;
237
+ knowledgeBase?: string;
238
+ [k: string]: unknown;
173
239
  };
174
240
 
175
- export declare type CommonBlockProps = Pick<RichBlockMessage, 'direction' | 'sender' | 'timestamp' | 'feedback'> & {
176
- messageId: string;
177
- metadata?: Record<string, any>;
178
- isReadOnly?: boolean;
179
- status?: BlockMessage['status'];
180
- sendMessage?: (payload: IntegrationMessage['payload']) => void;
181
- addMessageFeedback?: (messageId: string, feedback: Feedback) => void;
241
+ export declare type ClientStates = 'connecting' | 'connected' | 'error' | 'disconnected';
242
+
243
+ declare type ClientStates_2 = 'connecting' | 'connected' | 'error' | 'disconnected';
244
+
245
+ export declare const commonApiErrorMap: {
246
+ [key in 'MethodNotFound' | 'QuotaExceeded' | 'Forbidden']: WebchatError;
182
247
  };
183
248
 
184
249
  declare type CommonWebchatProps = {
@@ -196,19 +261,19 @@ export declare type ComposableIntegrationMessagePayload = Extract<IntegrationMes
196
261
 
197
262
  declare type ComposableIntegrationMessageTypes = 'audio' | 'bloc' | 'file' | 'image' | 'location' | 'markdown' | 'text' | 'video';
198
263
 
199
- export declare const Composer: NamedExoticComponent<Omit<Props_3, "ref"> & RefAttributes_2<HTMLDivElement>>;
264
+ export declare const Composer: NamedExoticComponent<Omit<Props_2, "ref"> & RefAttributes<HTMLDivElement>>;
200
265
 
201
266
  export declare const CONFIG_ACCESS_DENIED = "Access denied to configuration file. Please check your credentials or your configuration URL and try again.";
202
267
 
203
268
  export { Configuration }
204
269
 
205
270
  export declare const Container: {
206
- ({ children, className, uploadFile, allowFileUpload, storageKey, conversationId, ...props }: Props_4): JSX_2.Element;
271
+ ({ children, className, uploadFile, allowFileUpload, storageKey, conversationId, ...props }: Props_3): JSX.Element;
207
272
  displayName: string;
208
273
  };
209
274
 
210
275
  export declare const ConversationHistory: {
211
- ({ className, onConversationClick, onNewConversation, onClose, currentConversationId, isLoading, conversations, botAvatar, botName, ...props }: ComponentProps<"div"> & ConversationHistoryProps): JSX_2.Element;
276
+ ({ className, onConversationClick, onNewConversation, onClose, isLoading, conversations, botAvatar, botName, ...props }: ComponentProps<"div"> & ConversationHistoryProps): JSX.Element;
212
277
  displayName: string;
213
278
  };
214
279
 
@@ -216,7 +281,6 @@ declare type ConversationHistoryProps = {
216
281
  onConversationClick?: (conversationId: string) => void;
217
282
  onNewConversation?: () => void;
218
283
  onClose?: () => void;
219
- currentConversationId?: string;
220
284
  isLoading?: boolean;
221
285
  conversations: Conversations;
222
286
  botAvatar?: string;
@@ -233,42 +297,97 @@ declare type ConversationWithLastMessage = ListConversationsResponse['conversati
233
297
  };
234
298
  };
235
299
 
236
- declare const createChatSoundStore: (storeName: string) => UseBoundStore<Omit<Omit<StoreApi<ChatSoundStore>, "setState"> & {
237
- setState<A extends string | {
238
- type: unknown;
239
- }>(partial: ChatSoundStore | Partial<ChatSoundStore> | ((state: ChatSoundStore) => ChatSoundStore | Partial<ChatSoundStore>), replace?: boolean | undefined, action?: A | undefined): void;
240
- }, "persist"> & {
300
+ declare const createChatSoundStore: (storeName: string) => UseBoundStore<Omit<Omit<StoreApi<ChatSoundStore>, "setState" | "devtools"> & {
301
+ setState(partial: ChatSoundStore | Partial<ChatSoundStore> | ((state: ChatSoundStore) => ChatSoundStore | Partial<ChatSoundStore>), replace?: false | undefined, action?: (string | {
302
+ [x: string]: unknown;
303
+ [x: number]: unknown;
304
+ [x: symbol]: unknown;
305
+ type: string;
306
+ }) | undefined): void;
307
+ setState(state: ChatSoundStore | ((state: ChatSoundStore) => ChatSoundStore), replace: true, action?: (string | {
308
+ [x: string]: unknown;
309
+ [x: number]: unknown;
310
+ [x: symbol]: unknown;
311
+ type: string;
312
+ }) | undefined): void;
313
+ devtools: {
314
+ cleanup: () => void;
315
+ };
316
+ }, "setState" | "persist"> & {
317
+ setState(partial: ChatSoundStore | Partial<ChatSoundStore> | ((state: ChatSoundStore) => ChatSoundStore | Partial<ChatSoundStore>), replace?: false | undefined, action?: (string | {
318
+ [x: string]: unknown;
319
+ [x: number]: unknown;
320
+ [x: symbol]: unknown;
321
+ type: string;
322
+ }) | undefined): unknown;
323
+ setState(state: ChatSoundStore | ((state: ChatSoundStore) => ChatSoundStore), replace: true, action?: (string | {
324
+ [x: string]: unknown;
325
+ [x: number]: unknown;
326
+ [x: symbol]: unknown;
327
+ type: string;
328
+ }) | undefined): unknown;
241
329
  persist: {
242
- setOptions: (options: Partial<PersistOptions<ChatSoundStore, ChatSoundStore>>) => void;
330
+ setOptions: (options: Partial<PersistOptions<ChatSoundStore, ChatSoundStore, unknown>>) => void;
243
331
  clearStorage: () => void;
244
332
  rehydrate: () => Promise<void> | void;
245
333
  hasHydrated: () => boolean;
246
334
  onHydrate: (fn: (state: ChatSoundStore) => void) => () => void;
247
335
  onFinishHydration: (fn: (state: ChatSoundStore) => void) => () => void;
248
- getOptions: () => Partial<PersistOptions<ChatSoundStore, ChatSoundStore>>;
336
+ getOptions: () => Partial<PersistOptions<ChatSoundStore, ChatSoundStore, unknown>>;
249
337
  };
250
338
  }>;
251
339
 
252
- declare const createWebchatClientStore: (storeName: string, storageLocation?: StorageLocation) => UseBoundStore<Omit<Omit<StoreApi<WebchatClientStore>, "setState"> & {
253
- setState<A extends string | {
254
- type: unknown;
255
- }>(partial: WebchatClientStore | Partial<WebchatClientStore> | ((state: WebchatClientStore) => WebchatClientStore | Partial<WebchatClientStore>), replace?: boolean | undefined, action?: A | undefined): void;
256
- }, "persist"> & {
340
+ export declare const createCookieStorage: (cookieDomain?: string) => StateStorage;
341
+
342
+ declare const createWebchatClientStore: (storeName: string, storageLocation?: StorageLocation, cookieDomain?: string) => UseBoundStore<Omit<Omit<StoreApi<WebchatClientStore>, "setState" | "devtools"> & {
343
+ setState(partial: WebchatClientStore | Partial<WebchatClientStore> | ((state: WebchatClientStore) => WebchatClientStore | Partial<WebchatClientStore>), replace?: false | undefined, action?: (string | {
344
+ [x: string]: unknown;
345
+ [x: number]: unknown;
346
+ [x: symbol]: unknown;
347
+ type: string;
348
+ }) | undefined): void;
349
+ setState(state: WebchatClientStore | ((state: WebchatClientStore) => WebchatClientStore), replace: true, action?: (string | {
350
+ [x: string]: unknown;
351
+ [x: number]: unknown;
352
+ [x: symbol]: unknown;
353
+ type: string;
354
+ }) | undefined): void;
355
+ devtools: {
356
+ cleanup: () => void;
357
+ };
358
+ }, "setState" | "persist"> & {
359
+ setState(partial: WebchatClientStore | Partial<WebchatClientStore> | ((state: WebchatClientStore) => WebchatClientStore | Partial<WebchatClientStore>), replace?: false | undefined, action?: (string | {
360
+ [x: string]: unknown;
361
+ [x: number]: unknown;
362
+ [x: symbol]: unknown;
363
+ type: string;
364
+ }) | undefined): unknown;
365
+ setState(state: WebchatClientStore | ((state: WebchatClientStore) => WebchatClientStore), replace: true, action?: (string | {
366
+ [x: string]: unknown;
367
+ [x: number]: unknown;
368
+ [x: symbol]: unknown;
369
+ type: string;
370
+ }) | undefined): unknown;
257
371
  persist: {
258
- setOptions: (options: Partial<PersistOptions<WebchatClientStore, unknown>>) => void;
372
+ setOptions: (options: Partial<PersistOptions<WebchatClientStore, unknown, unknown>>) => void;
259
373
  clearStorage: () => void;
260
374
  rehydrate: () => Promise<void> | void;
261
375
  hasHydrated: () => boolean;
262
376
  onHydrate: (fn: (state: WebchatClientStore) => void) => () => void;
263
377
  onFinishHydration: (fn: (state: WebchatClientStore) => void) => () => void;
264
- getOptions: () => Partial<PersistOptions<WebchatClientStore, unknown>>;
378
+ getOptions: () => Partial<PersistOptions<WebchatClientStore, unknown, unknown>>;
265
379
  };
266
380
  }>;
267
381
 
268
382
  export declare type CustomBlock = {
269
383
  type: 'custom';
270
- url: string;
271
384
  name: string;
385
+ url: string;
386
+ data?: unknown;
387
+ };
388
+
389
+ export declare type CustomRendererProps = CustomBlock & {
390
+ direction: 'incoming' | 'outgoing' | 'system';
272
391
  };
273
392
 
274
393
  export declare const de: WebchatTranslations;
@@ -279,6 +398,7 @@ export declare const defaultTranslations: {
279
398
  readonly 'composer.voiceButton.ariaLabel': "Voice Input Button";
280
399
  readonly 'composer.fileButton.ariaLabel': "Upload File Button";
281
400
  readonly 'composer.messageInput.ariaLabel': "Message Input";
401
+ readonly 'composer.emojiButton.ariaLabel': "Emoji Picker Button";
282
402
  readonly 'fileAttachment.uploadError': "Upload Error";
283
403
  readonly 'fileAttachment.fallbackExtension': "File";
284
404
  readonly 'fileAttachment.removeButton.ariaLabel': "Remove File Button";
@@ -286,6 +406,11 @@ export declare const defaultTranslations: {
286
406
  readonly 'header.expandButton.ariaLabel': "Expand Header Button";
287
407
  readonly 'header.sound.enable': "Enable chat sounds";
288
408
  readonly 'header.sound.disable': "Disable chat sounds";
409
+ readonly 'header.menu.ariaLabel': "More options";
410
+ readonly 'header.expand': "Expand window";
411
+ readonly 'header.collapse': "Collapse window";
412
+ readonly 'header.mute': "Mute";
413
+ readonly 'header.unmute': "Unmute";
289
414
  readonly 'conversationHistory.title': "Conversations";
290
415
  readonly 'conversationHistory.empty': "No conversation started yet";
291
416
  readonly 'conversationHistory.newConversation': "New conversation";
@@ -311,6 +436,26 @@ export declare const defaultTranslations: {
311
436
  readonly 'message.status.delivered': "Delivered";
312
437
  readonly 'date.today': "Today";
313
438
  readonly 'date.yesterday': "Yesterday";
439
+ readonly 'hitl.passedToTeam': "Passed to the support team";
440
+ readonly 'hitl.findingAgent': "Finding you an agent…";
441
+ readonly 'hitl.supportAgent': "Support agent";
442
+ readonly 'hitl.defaultAgentName': "An agent";
443
+ readonly 'hitl.agentJoined': "{name} joined the conversation";
444
+ readonly 'hitl.agentTransferred': "Transferred to {name}";
445
+ readonly 'hitl.agentLabel': "{name} · Support";
446
+ readonly 'hitl.ticketClosedBy': "{name} closed the ticket";
447
+ readonly 'hitl.ticketClosed': "Ticket closed";
448
+ readonly 'hitl.waiting.title': "Waiting for an agent…";
449
+ readonly 'hitl.waiting.sub': "Usually a few minutes. Replies arrive here.";
450
+ readonly 'hitl.waiting.longTitle': "Still waiting — this is taking longer than usual";
451
+ readonly 'hitl.waiting.longSub': "You can close this window — the reply will land right here.";
452
+ readonly 'csat.question': "How did {name} do?";
453
+ readonly 'csat.questionGeneric': "How did we do?";
454
+ readonly 'csat.sub': "One tap — optional. You can keep typing below.";
455
+ readonly 'csat.rate': "Rate this chat";
456
+ readonly 'csat.commentPlaceholder': "Add a comment — optional";
457
+ readonly 'csat.sendComment': "Send comment";
458
+ readonly 'csat.thanks': "Thanks — sent to the team";
314
459
  };
315
460
 
316
461
  export declare function detectLocale(language?: string): WebchatTranslations;
@@ -320,14 +465,16 @@ export declare type Dimensions = {
320
465
  height: number;
321
466
  };
322
467
 
468
+ export declare const Dropdown: ({ text, options, reusable, ctx }: Props_15) => JSX.Element;
469
+
323
470
  export declare type DropdownBlock = {
324
- label?: string;
325
471
  type: 'dropdown';
326
- reusable?: boolean;
472
+ text?: string;
327
473
  options: {
328
474
  label: string;
329
475
  value: string;
330
476
  }[];
477
+ reusable?: boolean;
331
478
  };
332
479
 
333
480
  export declare function enrichMessage(messages: BlockMessage[], participants: User[], currentUserId: string, botName?: string, botAvatar?: string): RichBlockMessage[];
@@ -338,7 +485,7 @@ declare type ErrorProps = {
338
485
  closeWindow?: () => void;
339
486
  };
340
487
 
341
- export declare function ErrorState({ error, restartConversation, closeWindow }: ErrorProps): JSX_2.Element;
488
+ export declare function ErrorState({ error, restartConversation, closeWindow }: ErrorProps): JSX.Element;
342
489
 
343
490
  export declare const es: WebchatTranslations;
344
491
 
@@ -354,12 +501,15 @@ declare type Events_2 = {
354
501
  [key: string]: string;
355
502
  };
356
503
 
357
- export declare const Fab: ForwardRefExoticComponent_2<Omit<ClassAttributes<HTMLDivElement> & HTMLAttributes<HTMLDivElement> & {
504
+ export declare const Fab: ForwardRefExoticComponent<Omit<ClassAttributes<HTMLDivElement> & HTMLAttributes<HTMLDivElement> & {
358
505
  imgUrl?: string;
359
- }, "ref"> & RefAttributes_2<HTMLDivElement>>;
506
+ }, "ref"> & RefAttributes<HTMLDivElement>>;
360
507
 
361
508
  export declare type Feedback = AddMessageFeedbackBody;
362
509
 
510
+ declare const File_2: ({ title, url, isReadOnly }: Props_16) => JSX.Element;
511
+ export { File_2 as File }
512
+
363
513
  export declare type FileBlock = {
364
514
  type: 'file';
365
515
  url: string;
@@ -376,34 +526,57 @@ export declare function generateThemeOverride(theme: LatestWebchatTheme): Record
376
526
 
377
527
  export declare function generateThemeStylesheet(theme: LatestWebchatTheme): string;
378
528
 
379
- export declare type GenericBlock = AudioBlock | BubbleBlock | ButtonBlock | CarouselBlock | ColumnBlock | DropdownBlock | FileBlock | ImageBlock | LocationBlock | RowBlock | TextBlock | VideoBlock | CustomBlock;
380
-
381
529
  export declare const getUseChatSoundStore: (name?: string) => BoundChatSoundStore;
382
530
 
383
- export declare const getUseWebchatClientStore: (name?: string, storageLocation?: StorageLocation) => BoundWebchatClientStore;
531
+ export declare const getUseWebchatClientStore: (name?: string, storageLocation?: StorageLocation, cookieDomain?: string) => BoundWebchatClientStore;
384
532
 
385
- export declare const Header: ({ defaultOpen, closeWindow, configuration, restartConversation, showConversationHistory, disabled, soundOn, toggleSound, clientId, ...props }: HeaderProps) => JSX_2.Element;
533
+ export declare const Header: ({ closeWindow, configuration, showConversationHistory, soundOn, toggleSound, clientId, expanded, onToggleExpand, hitlStatus, }: HeaderProps) => JSX.Element;
386
534
 
387
535
  declare type HeaderProps = {
388
- defaultOpen?: boolean;
389
- open?: boolean;
390
- disabled?: boolean;
391
536
  showConversationHistory?: () => void;
392
- onOpenChange?(open: boolean): void;
393
- restartConversation?: () => void;
394
537
  closeWindow?: () => void;
395
538
  clientId?: string;
396
539
  soundOn?: boolean;
397
540
  toggleSound?: () => void;
398
- configuration: Pick<Configuration, 'email' | 'phone' | 'privacyPolicy' | 'website' | 'termsOfService' | 'botAvatar' | 'botDescription' | 'botName' | 'soundEnabled'>;
541
+ configuration: Pick<Configuration, 'botAvatar' | 'botName' | 'botDescription' | 'soundEnabled'>;
542
+ expanded?: boolean;
543
+ onToggleExpand?: () => void;
544
+ /** Live handoff state: 'waiting' pulses an amber "finding you an agent"
545
+ * status line; 'agent' swaps the header identity to the assigned agent
546
+ * while the ticket is active. */
547
+ hitlStatus?: HitlStatus;
399
548
  };
400
549
 
550
+ /**
551
+ * The widget's live handoff state, derived from the lifecycle markers in the
552
+ * message stream (in order):
553
+ * ticket_opened → waiting · agent_assigned → agent · ticket_closed → bot.
554
+ * Drives the header (amber "finding an agent" pulse / agent identity) and the
555
+ * in-stream waiting block.
556
+ */
557
+ declare type HitlStatus = {
558
+ mode: 'bot';
559
+ } | {
560
+ mode: 'waiting';
561
+ since: Date;
562
+ message?: string;
563
+ hidden?: boolean;
564
+ } | {
565
+ mode: 'agent';
566
+ agentName?: string;
567
+ agentAvatarUrl?: string;
568
+ };
569
+
570
+ export declare const IconButton: ({ icon: Icon, label, onClick, className, style, size }: Props_4) => JSX.Element;
571
+
401
572
  export declare type ImageBlock = {
402
573
  type: 'image';
403
- orientation?: 'portrait' | 'landscape' | 'square' | 'auto';
404
574
  url: string;
575
+ orientation?: 'portrait' | 'landscape' | 'square' | 'auto';
405
576
  };
406
577
 
578
+ export declare const ImageComponent: ForwardRefExoticComponent_3<Props_10 & RefAttributes_3<HTMLImageElement>>;
579
+
407
580
  export declare type InputModalProps<T> = {
408
581
  title?: string;
409
582
  description?: string;
@@ -415,15 +588,13 @@ export declare type InputModalProps<T> = {
415
588
  Content?: ({ setValue }: {
416
589
  value: T | undefined;
417
590
  setValue: (value: T) => void;
418
- }) => ReactNode_2;
591
+ }) => ReactNode;
419
592
  };
420
593
 
421
594
  export declare type IntegrationMessage = Message_2;
422
595
 
423
596
  export declare type IntegrationMessagePayloadByType = ByType<IntegrationMessage['payload']>;
424
597
 
425
- export declare const integrationMessagePayloadToBlockPayload: (message: IntegrationMessage["payload"]) => BlockMessagePayload;
426
-
427
598
  export declare function integrationMessageToBlockMessage(message: IntegrationMessage): BlockMessage;
428
599
 
429
600
  declare type IntegrationMessageTypes = IntegrationMessage['payload']['type'];
@@ -456,6 +627,12 @@ export declare const ja: WebchatTranslations;
456
627
 
457
628
  export declare const ko: WebchatTranslations;
458
629
 
630
+ /** Leaf block types that can appear inside a bloc */
631
+ export declare type LeafBlock = TextBlock | ImageBlock | VideoBlock | AudioBlock | FileBlock | LocationBlock;
632
+
633
+ declare const Location_2: ({ latitude, longitude, title, isReadOnly }: Props_13) => JSX.Element;
634
+ export { Location_2 as Location }
635
+
459
636
  export declare type LocationBlock = {
460
637
  type: 'location';
461
638
  latitude: number;
@@ -463,23 +640,21 @@ export declare type LocationBlock = {
463
640
  title?: string;
464
641
  };
465
642
 
643
+ export declare const MainCard: ({ title, subtitle, botAvatar, botName, onClick }: MainCardProps) => JSX.Element;
644
+
645
+ declare type MainCardProps = {
646
+ title: string;
647
+ subtitle?: string;
648
+ botAvatar?: string;
649
+ botName?: string;
650
+ onClick?: () => void;
651
+ };
652
+
466
653
  export declare const mapToWebchatError: (thrown: unknown) => WebchatError;
467
654
 
468
- export declare const Message: NamedExoticComponent< {
469
- children?: ReactNode;
470
- renderers?: Partial<Renderers>;
471
- sendMessage?: (payload: IntegrationMessage["payload"]) => void;
472
- addMessageFeedback?: (messageId: string, feedback: Feedback) => void;
473
- isReadOnly?: boolean;
474
- isLastDeliveredMessage?: boolean;
475
- showAvatar?: boolean;
476
- } & BlockMessage<GenericBlock> & {
477
- direction: "incoming" | "outgoing" | "system";
478
- sender: {
479
- name: string;
480
- avatar?: string;
481
- };
482
- } & RefAttributes_2<HTMLDivElement>>;
655
+ export declare const Message: ({ direction, block, disableInput, children, sender, id, authorId, isReadOnly, isLastDeliveredMessage, isLastMessage, sendMessage, showAvatar, renderers, addMessageFeedback, feedback, timestamp, metadata, citationsEnabled, }: MessageProps) => JSX.Element;
656
+
657
+ export declare type MessageBlock = TextBlock | ImageBlock | VideoBlock | AudioBlock | FileBlock | LocationBlock | CardBlock | CarouselBlock | ChoiceBlock | DropdownBlock | BlocBlock | CustomBlock;
483
658
 
484
659
  export declare const MessageContext: Context<MessageContextVaue | null>;
485
660
 
@@ -488,32 +663,70 @@ declare type MessageContextVaue = {
488
663
  setIsLoading: Dispatch<SetStateAction<string[]>>;
489
664
  };
490
665
 
491
- export declare const MessageList: MemoExoticComponent<({ className, messages, isTyping, headerMessage, renderers, botAvatar, botDescription, botName, sendMessage, addMessageFeedback, showMarquee, showDateSystemMessage, showMessageStatus, showIncomingMessageAvatar, showOutgoingMessageAvatar, isOpen, ...props }: ComponentProps<"div"> & MessageListProps) => JSX_2.Element>;
666
+ export declare const MessageList: MemoExoticComponent<({ className, messages, isTyping, botAvatar, botName, botDescription, sendMessage, hitlWaiting, addMessageFeedback, citationsEnabled, showMarquee, showDateSystemMessage, showMessageStatus, showIncomingMessageAvatar, showOutgoingMessageAvatar, homePageEnabled, welcomeHeading, welcomeSubtitle, mainCardEnabled, mainCardTitle, mainCardSubtitle, onMainCardClick, conversationStartersEnabled, conversationStarters, conversationStartersDisplayStyle, renderers, ...props }: ComponentProps<"div"> & MessageListProps) => JSX.Element>;
492
667
 
493
668
  declare type MessageListProps = {
494
669
  messages?: RichBlockMessage[];
495
670
  isTyping?: boolean;
496
- headerMessage?: string;
497
- renderers?: Partial<Renderers>;
498
671
  botAvatar?: string;
499
- botDescription?: string;
500
672
  botName?: string;
501
- sendMessage?: (payload: IntegrationMessage['payload']) => void;
502
- addMessageFeedback?: (messageId: string, feedback: Feedback) => void;
673
+ botDescription?: string;
674
+ sendMessage?: ScopedClient['sendMessage'];
675
+ /** Set while a HITL ticket is waiting for an agent — renders the in-stream
676
+ * waiting block under the messages (dots + "you're in line"). */
677
+ hitlWaiting?: {
678
+ since: Date;
679
+ message?: string;
680
+ };
681
+ addMessageFeedback?: (messageId: string, feedback: Feedback) => Promise<void>;
682
+ /** Inline citation pills + Sources footer (undefined = enabled). */
683
+ citationsEnabled?: boolean;
503
684
  showMarquee?: boolean;
504
685
  showDateSystemMessage?: boolean;
505
686
  showMessageStatus?: boolean;
506
687
  showIncomingMessageAvatar?: boolean;
507
688
  showOutgoingMessageAvatar?: boolean;
508
- isOpen?: boolean;
509
- };
510
-
511
- export declare const MessagePreview: ForwardRefExoticComponent_2<Omit<ClassAttributes<HTMLDivElement> & HTMLAttributes<HTMLDivElement> & {
689
+ homePageEnabled?: boolean;
690
+ welcomeHeading?: string;
691
+ welcomeSubtitle?: string;
692
+ mainCardEnabled?: boolean;
693
+ mainCardTitle?: string;
694
+ mainCardSubtitle?: string;
695
+ onMainCardClick?: () => void;
696
+ conversationStartersEnabled?: boolean;
697
+ conversationStarters?: ConversationStarter[];
698
+ conversationStartersDisplayStyle?: ConversationStarterDisplayStyle;
699
+ renderers?: MessageRenderers;
700
+ };
701
+
702
+ export declare const MessagePreview: ForwardRefExoticComponent<Omit<ClassAttributes<HTMLDivElement> & HTMLAttributes<HTMLDivElement> & {
512
703
  avatarUrl?: string;
513
704
  botName?: string;
514
705
  description?: string;
515
706
  onClose?: () => void;
516
- }, "ref"> & RefAttributes_2<HTMLDivElement>>;
707
+ }, "ref"> & RefAttributes<HTMLDivElement>>;
708
+
709
+ declare type MessageProps = {
710
+ children?: ReactNode_2;
711
+ sendMessage?: ScopedClient['sendMessage'];
712
+ isReadOnly?: boolean;
713
+ isLastDeliveredMessage?: boolean;
714
+ /** False when a newer message exists — an unanswered CSAT card collapses to its quiet row. */
715
+ isLastMessage?: boolean;
716
+ showAvatar?: boolean;
717
+ renderers?: MessageRenderers;
718
+ addMessageFeedback?: (messageId: string, feedback: Feedback) => Promise<void>;
719
+ /** Inline citation pills + Sources footer. Undefined = enabled at the
720
+ * component level; Chat passes the config gate (`citationsEnabled === true`,
721
+ * off by default so unversioned existing bots keep their behavior). */
722
+ citationsEnabled?: boolean;
723
+ } & Omit<RichBlockMessage, 'block'> & {
724
+ block?: RichBlockMessage['block'];
725
+ };
726
+
727
+ export declare type MessageRenderers = {
728
+ custom?: React.FC<CustomRendererProps>;
729
+ };
517
730
 
518
731
  export declare const MISSING_API_URL = "The API url is required to initialize the webchat.";
519
732
 
@@ -526,12 +739,12 @@ export declare const MISSING_CONFIG_URL = "No config URL provided.";
526
739
  export declare function Modal({ open, onOpenChange, children, }: {
527
740
  open?: boolean;
528
741
  onOpenChange?: (open: boolean) => void;
529
- children: ReactNode;
530
- }): JSX_2.Element;
742
+ children: ReactNode_2;
743
+ }): JSX.Element;
531
744
 
532
745
  export declare namespace Modal {
533
- var Button: ForwardRefExoticComponent_3<Dialog.DialogTriggerProps & RefAttributes_3<HTMLButtonElement>>;
534
- var Close: ForwardRefExoticComponent_3<Dialog.DialogCloseProps & RefAttributes_3<HTMLButtonElement>>;
746
+ var Button: ForwardRefExoticComponent_2<Dialog.DialogTriggerProps & RefAttributes_2<HTMLButtonElement>>;
747
+ var Close: ForwardRefExoticComponent_2<Dialog.DialogCloseProps & RefAttributes_2<HTMLButtonElement>>;
535
748
  var Content: typeof ModalContent;
536
749
  }
537
750
 
@@ -542,8 +755,8 @@ declare function ModalContent({ title, description, onConfirm, onCancel, confirm
542
755
  onCancel?: () => void;
543
756
  confirmButtonText?: string;
544
757
  cancelButtonText?: string;
545
- children: ReactNode;
546
- }): JSX_2.Element;
758
+ children: ReactNode_2;
759
+ }): JSX.Element;
547
760
 
548
761
  export declare const ModalContext: Context<ModalContextValue>;
549
762
 
@@ -552,8 +765,12 @@ declare type ModalContextValue = {
552
765
  };
553
766
 
554
767
  export declare const ModalProvider: ({ children }: {
555
- children: ReactNode_2;
556
- }) => JSX_2.Element;
768
+ children: ReactNode;
769
+ }) => JSX.Element;
770
+
771
+ export declare const MotionProvider: ({ children }: {
772
+ children: ReactNode;
773
+ }) => JSX.Element;
557
774
 
558
775
  export declare const NETWORK_ERROR = "Please check your internet connection and refresh the page.";
559
776
 
@@ -563,36 +780,7 @@ export declare type Options = {
563
780
  timeout?: number;
564
781
  };
565
782
 
566
- export declare type Props = {
567
- className?: string;
568
- renderers?: Partial<Renderers>;
569
- configuration: Configuration;
570
- messages: BlockMessage[];
571
- participants: User[];
572
- connected?: boolean;
573
- disableComposer?: boolean;
574
- isReadOnly?: boolean;
575
- isLoading?: boolean;
576
- isTyping?: boolean;
577
- clientId?: string;
578
- closeWindow?: () => void;
579
- restartConversation?: (conversationid?: string) => void;
580
- user?: UserCredentials;
581
- sendMessage?: ScopedClient['sendMessage'];
582
- uploadFile?: ScopedClient['uploadFile'];
583
- addMessageFeedback?: ScopedClient['addMessageFeedback'];
584
- listConversations?: ScopedClient['listConversations'];
585
- error?: WebchatError;
586
- soundOn?: boolean;
587
- toggleSound?: () => void;
588
- storageKey?: string;
589
- disableSendButton?: boolean;
590
- conversationId?: string;
591
- locale?: Partial<WebchatTranslations>;
592
- isOpen?: boolean;
593
- };
594
-
595
- declare type Props_2 = {
783
+ declare type Props = {
596
784
  adminSecret?: string;
597
785
  user?: UserCredentials;
598
786
  conversationId?: string;
@@ -605,7 +793,63 @@ declare type Props_2 = {
605
793
  clientHeaders?: Record<string, string>;
606
794
  };
607
795
 
608
- declare type Props_3 = ComponentProps<'div'> & {
796
+ declare type Props_10 = {
797
+ url: string;
798
+ orientation?: ImageBlock['orientation'];
799
+ };
800
+
801
+ declare type Props_11 = {
802
+ url: string;
803
+ isReadOnly?: boolean;
804
+ };
805
+
806
+ declare type Props_12 = {
807
+ url: string;
808
+ isReadOnly?: boolean;
809
+ };
810
+
811
+ declare type Props_13 = {
812
+ latitude: number;
813
+ longitude: number;
814
+ title?: string;
815
+ isReadOnly?: boolean;
816
+ };
817
+
818
+ declare type Props_14 = {
819
+ cards: CardBlock[];
820
+ ctx: BlockContext;
821
+ };
822
+
823
+ declare type Props_15 = {
824
+ text?: string;
825
+ options: {
826
+ label: string;
827
+ value: string;
828
+ }[];
829
+ reusable?: boolean;
830
+ ctx: BlockContext;
831
+ };
832
+
833
+ declare type Props_16 = {
834
+ url: string;
835
+ title?: string;
836
+ isReadOnly?: boolean;
837
+ };
838
+
839
+ declare type Props_17 = CardBlock & {
840
+ ctx: BlockContext;
841
+ };
842
+
843
+ declare type Props_18 = ChoiceBlock & {
844
+ ctx: BlockContext;
845
+ };
846
+
847
+ declare type Props_19 = {
848
+ items: LeafBlock[];
849
+ ctx: BlockContext;
850
+ };
851
+
852
+ declare type Props_2 = ComponentProps<'div'> & {
609
853
  inputRef?: Ref<HTMLTextAreaElement>;
610
854
  disableComposer?: boolean;
611
855
  isReadOnly?: boolean;
@@ -616,52 +860,84 @@ declare type Props_3 = ComponentProps<'div'> & {
616
860
  uploadFile?: ScopedClient['uploadFile'];
617
861
  storageKey?: string;
618
862
  conversationId?: string;
863
+ onTextChange?: (text: string) => void;
864
+ statusText?: ReactNode_2;
619
865
  } & Pick<Configuration, 'composerPlaceholder' | 'footer'>;
620
866
 
621
- declare type Props_4 = ComponentProps<'div'> & {
622
- connected?: boolean;
867
+ declare type Props_20 = Partial<LatestWebchatTheme>;
868
+
869
+ declare type Props_3 = ComponentProps<'div'> & {
623
870
  uploadFile?: ScopedClient['uploadFile'];
624
871
  allowFileUpload?: boolean;
625
872
  storageKey?: string;
626
873
  conversationId?: string;
627
874
  };
628
875
 
629
- declare type Props_5 = {
630
- restartConversation: () => void;
631
- } & ComponentProps_2<typeof RotateCcw>;
876
+ declare type Props_4 = {
877
+ icon: LucideIcon;
878
+ label: string;
879
+ onClick?: (e: React.SyntheticEvent) => void;
880
+ className?: string;
881
+ style?: React.CSSProperties;
882
+ size?: number;
883
+ };
632
884
 
633
- declare type Props_6 = {
885
+ declare type Props_5 = {
634
886
  clientId: string;
635
887
  apiUrl?: string;
636
888
  storageKey?: string;
637
889
  user?: UserCredentials;
638
890
  conversationId?: string;
639
891
  configuration?: Configuration;
640
- soundOn?: boolean;
641
- toggleSound?: () => void;
642
- /** @deprecated This prop is no longer used, pass the allowFileUpload via the configuration object */
643
- allowFileUpload?: boolean;
644
- renderers?: Partial<Renderers>;
645
- locale?: Partial<WebchatTranslations>;
646
892
  } & ComponentProps_2<'div'>;
647
893
 
648
- declare type Props_7 = Partial<LatestWebchatTheme>;
894
+ declare type Props_6 = {
895
+ text: string;
896
+ ctx: BlockContext;
897
+ /** When true, render without bubble wrapper (used inside Card/Choice) */
898
+ bare?: boolean;
899
+ /** Payload dot-path of this text (e.g. "root.text") — selects the citation
900
+ * entries from `ctx.citations` whose pills splice into THIS text. */
901
+ citationPath?: string;
902
+ /** Added to citation offsets when the rendered text was prefixed after the
903
+ * offsets were recorded (e.g. a card title rendered as `#### ${title}`). */
904
+ citationOffsetShift?: number;
905
+ };
906
+
907
+ declare type Props_7 = {
908
+ text: string;
909
+ buttonValue: string;
910
+ variant: 'action' | 'link';
911
+ reusable?: boolean;
912
+ groupId?: string;
913
+ sendMessage?: ScopedClient['sendMessage'];
914
+ isReadOnly?: boolean;
915
+ };
916
+
917
+ declare type Props_8 = {
918
+ actions: Action[];
919
+ groupId?: string;
920
+ reusable?: boolean;
921
+ sendMessage?: ScopedClient['sendMessage'];
922
+ isReadOnly?: boolean;
923
+ };
924
+
925
+ declare type Props_9 = {
926
+ ctx: BlockContext;
927
+ children: ReactNode_2;
928
+ };
649
929
 
650
930
  export declare const pt: WebchatTranslations;
651
931
 
652
932
  export declare const QUOTA_EXCEEDED = "This bot has temporarily paused.\nPlease check back later.";
653
933
 
654
- export declare type Renderers = {
655
- [T in GenericBlock['type']]: FC<BlockObjects[T]>;
656
- };
657
-
658
- export declare const renderers: Renderers;
934
+ export declare function renderBlock(block: MessageBlock, ctx: BlockContext): JSX_2.Element;
659
935
 
660
- export declare const RestartConversationButton: ({ restartConversation, ...props }: Props_5) => JSX_2.Element;
936
+ export declare const resolveStarterIcon: (icon?: string) => LucideIcon;
661
937
 
662
938
  export declare const retryWithBackoff: <T>(fn: () => Promise<T>, maxAttempts?: number, delayMs?: number) => Promise<T>;
663
939
 
664
- export declare type RichBlockMessage<T = GenericBlock> = BlockMessage<T> & {
940
+ export declare type RichBlockMessage = BlockMessage & {
665
941
  direction: 'incoming' | 'outgoing' | 'system';
666
942
  sender: {
667
943
  name: string;
@@ -669,19 +945,8 @@ export declare type RichBlockMessage<T = GenericBlock> = BlockMessage<T> & {
669
945
  };
670
946
  };
671
947
 
672
- export declare type RowBlock = {
673
- type: 'row';
674
- blocks: GenericBlock[];
675
- horizontalAlignment?: 'left' | 'center' | 'right' | 'stretch';
676
- verticalAlignment?: 'top' | 'center' | 'bottom';
677
- };
678
-
679
- export declare type RowOf<T extends GenericBlock> = Omit<RowBlock, 'blocks'> & {
680
- blocks: T[];
681
- };
682
-
683
948
  export declare type ScopedClient = {
684
- sendMessage: (payload: IntegrationMessage['payload']) => Promise<void>;
949
+ sendMessage: (payload: IntegrationMessage['payload'], metadata?: Record<string, string>) => Promise<void>;
685
950
  sendEvent: (event: Record<string, any>, options?: {
686
951
  bindConversation?: boolean;
687
952
  bindUser?: boolean;
@@ -692,7 +957,6 @@ export declare type ScopedClient = {
692
957
  type: FileType;
693
958
  fileId: string;
694
959
  }>;
695
- addMessageFeedback: (messageId: string, feedback: Feedback) => Promise<void>;
696
960
  getUser: () => Promise<UserResponse>;
697
961
  updateUser: (user: UserProfile) => Promise<User>;
698
962
  listConversations: () => ReturnType<Client['listConversations']>;
@@ -708,7 +972,18 @@ export declare const SOUND_EFFECTS: {
708
972
 
709
973
  export declare const SSE_DISCONNECTED_ERROR = "You've been disconnected from the conversation.\nPlease refresh the page.";
710
974
 
711
- export declare type StorageLocation = 'sessionStorage' | 'localStorage';
975
+ export declare const STARTER_ICON_NAMES: string[];
976
+
977
+ export declare const Starters: MemoExoticComponent<({ enabled, starters, displayStyle, sendMessage }: StartersProps) => JSX.Element | null>;
978
+
979
+ declare type StartersProps = {
980
+ enabled?: boolean;
981
+ starters?: ConversationStarter[];
982
+ displayStyle?: ConversationStarterDisplayStyle;
983
+ sendMessage?: ScopedClient['sendMessage'];
984
+ };
985
+
986
+ export declare type StorageLocation = 'sessionStorage' | 'localStorage' | 'cookieStorage';
712
987
 
713
988
  export declare type StyleOptions = {
714
989
  className?: string;
@@ -718,12 +993,18 @@ export declare type StyleOptions = {
718
993
  /**
719
994
  * StylesheetProvider component that manages theme styles and font loading
720
995
  */
721
- export declare const StylesheetProvider: ({ color, fontFamily, radius, themeMode, variant, headerVariant, additionalStylesheet, additionalStylesheetUrl, }: Props_7) => JSX_2.Element;
996
+ export declare const StylesheetProvider: ({ color, fontFamily, themeMode }: Props_20) => JSX.Element;
997
+
998
+ declare const Text_2: ({ text, ctx, bare, citationPath, citationOffsetShift }: Props_6) => JSX.Element;
999
+ export { Text_2 as Text }
722
1000
 
723
1001
  export declare type TextBlock = {
724
1002
  type: 'text';
725
1003
  text: string;
726
1004
  value?: string;
1005
+ /** Dot-path of this text in the original message payload (e.g. "root.text",
1006
+ * "root.markdown", "root.items.0.payload.text") — matches citation entries. */
1007
+ citationPath?: string;
727
1008
  };
728
1009
 
729
1010
  declare type ToPayloadType<T extends IntegrationMessageTypes> = {
@@ -734,9 +1015,7 @@ declare type ToPayloadType<T extends IntegrationMessageTypes> = {
734
1015
 
735
1016
  declare let _trackFn: ((event: string, properties?: Record<string, unknown>) => void) | null;
736
1017
 
737
- export declare const TranslationProvider: Provider<WebchatTranslations>;
738
-
739
- export declare const TypingIndicator: MemoExoticComponent<({ ...props }: ComponentProps<"div">) => JSX_2.Element>;
1018
+ export declare const TypingIndicator: MemoExoticComponent<({ ...props }: ComponentProps<"div">) => JSX.Element>;
740
1019
 
741
1020
  export declare function useActiveConversation(): UseActiveConversationReturn;
742
1021
 
@@ -744,18 +1023,10 @@ declare type UseActiveConversationReturn = {
744
1023
  conversationId?: string;
745
1024
  messages: BlockMessage[];
746
1025
  participants: User[];
747
- sendMessage: (payload: IntegrationMessage['payload']) => Promise<void>;
1026
+ sendMessage: ScopedClient['sendMessage'];
748
1027
  saveMessageFeedback: (messageId: string, feedback: Feedback) => Promise<void>;
749
- sendEvent: (event: Record<string, unknown>, options?: {
750
- bindConversation?: boolean;
751
- bindUser?: boolean;
752
- }) => Promise<void>;
753
- uploadFile: (file: File) => Promise<{
754
- fileUrl: string;
755
- name: string;
756
- type: FileType;
757
- fileId: string;
758
- }>;
1028
+ sendEvent: ScopedClient['sendEvent'];
1029
+ uploadFile: ScopedClient['uploadFile'];
759
1030
  status: ClientStates;
760
1031
  on: ReturnType<typeof createEventEmitter<Events>>['on'];
761
1032
  error?: WebchatError;
@@ -796,11 +1067,26 @@ export declare function useModalContext(): ModalContextValue;
796
1067
 
797
1068
  export { User }
798
1069
 
1070
+ export declare function useReadIndicator(): {
1071
+ onMessageReceived: (messageId: string) => void;
1072
+ };
1073
+
799
1074
  export declare type UserProfile = Omit<User, 'id' | 'createdAt' | 'updatedAt'>;
800
1075
 
801
1076
  export declare type UserResponse = Awaited<ReturnType<Client['getUser']>>['user'];
802
1077
 
803
- export declare function useTranslations(): WebchatTranslations;
1078
+ export declare function useSound({ storageKey, soundEnabled }: UseSoundProps): UseSoundReturn;
1079
+
1080
+ declare type UseSoundProps = {
1081
+ storageKey?: string;
1082
+ soundEnabled?: boolean;
1083
+ };
1084
+
1085
+ declare type UseSoundReturn = {
1086
+ soundOn: boolean;
1087
+ toggleSound: () => void;
1088
+ playNotificationSound: () => void;
1089
+ };
804
1090
 
805
1091
  export declare const useUser: () => UseUserReturn;
806
1092
 
@@ -826,7 +1112,7 @@ declare type UseUserReturn = {
826
1112
  * </WebchatProvider>
827
1113
  * ```
828
1114
  */
829
- export declare function useWebchat({ apiUrl, clientId, storageKey, storageLocation, adminSecret, soundEnabled, clientHeaders, ...props }: Props_2): UseWebchatReturn;
1115
+ export declare function useWebchat({ apiUrl, clientId, storageKey, storageLocation, adminSecret, soundEnabled, clientHeaders, ...props }: Props): UseWebchatReturn;
830
1116
 
831
1117
  export declare function useWebchatContext(): WebchatContextValue;
832
1118
 
@@ -847,610 +1133,34 @@ declare type UseWebchatReturn = (CommonWebchatProps & {
847
1133
  isTyping: undefined;
848
1134
  });
849
1135
 
850
- export declare const useWebchatStore: UseBoundStore<Omit<StoreApi<WebchatStore>, "setState"> & {
851
- setState<A extends string | {
852
- type: unknown;
853
- }>(partial: WebchatStore | Partial<WebchatStore> | ((state: WebchatStore) => WebchatStore | Partial<WebchatStore>), replace?: boolean | undefined, action?: A | undefined): void;
1136
+ export declare const useWebchatStore: UseBoundStore<Omit<StoreApi<WebchatStore>, "setState" | "devtools"> & {
1137
+ setState(partial: WebchatStore | Partial<WebchatStore> | ((state: WebchatStore) => WebchatStore | Partial<WebchatStore>), replace?: false | undefined, action?: (string | {
1138
+ [x: string]: unknown;
1139
+ [x: number]: unknown;
1140
+ [x: symbol]: unknown;
1141
+ type: string;
1142
+ }) | undefined): void;
1143
+ setState(state: WebchatStore | ((state: WebchatStore) => WebchatStore), replace: true, action?: (string | {
1144
+ [x: string]: unknown;
1145
+ [x: number]: unknown;
1146
+ [x: symbol]: unknown;
1147
+ type: string;
1148
+ }) | undefined): void;
1149
+ devtools: {
1150
+ cleanup: () => void;
1151
+ };
854
1152
  }>;
855
1153
 
856
1154
  declare type ValueOf<T> = T[keyof T];
857
1155
 
1156
+ export declare const Video: ({ url, isReadOnly }: Props_11) => JSX.Element;
1157
+
858
1158
  export declare type VideoBlock = {
859
1159
  type: 'video';
860
1160
  url: string;
861
1161
  };
862
1162
 
863
- export declare const Webchat: ({ clientId, storageKey, configuration, apiUrl, user: userCredentials, conversationId, ...props }: Props_6) => JSX_2.Element;
864
-
865
- export declare const webchatClasses: {
866
- readonly container: {
867
- readonly className: "bpReset bpContainer bpFont";
868
- readonly dropzone: {
869
- readonly overlay: {
870
- readonly className: "bpDropzoneOverlay";
871
- };
872
- };
873
- };
874
- readonly loader: {
875
- readonly className: "bpReset bpLoader";
876
- };
877
- readonly modal: {
878
- readonly overlay: {
879
- readonly className: "bpModalOverlay";
880
- };
881
- readonly dialog: {
882
- readonly container: {
883
- readonly className: "bpReset bpModalContainer";
884
- };
885
- readonly title: {
886
- readonly className: "bpModalTitle";
887
- };
888
- readonly description: {
889
- readonly className: "bpModalDescription";
890
- };
891
- readonly content: {
892
- readonly container: {
893
- readonly className: "bpModalContentContainer";
894
- };
895
- readonly textarea: {
896
- readonly className: "bpModalContentTextArea";
897
- };
898
- };
899
- readonly button: {
900
- readonly container: {
901
- readonly className: "bpModalButtonContainer";
902
- };
903
- readonly confirm: {
904
- readonly className: "bpModalButtonConfirm";
905
- };
906
- readonly cancel: {
907
- readonly className: "bpModalButtonCancel";
908
- };
909
- };
910
- };
911
- };
912
- readonly messagePreview: {
913
- readonly container: {
914
- readonly className: "bpMessagePreviewContainer";
915
- };
916
- readonly message: {
917
- readonly className: "bpMessagePreviewMessage";
918
- };
919
- readonly description: {
920
- readonly className: "bpMessagePreviewDescription";
921
- };
922
- readonly closeButton: {
923
- readonly className: "bpMessagePreviewCloseButton";
924
- };
925
- readonly avatar: {
926
- readonly container: {
927
- readonly className: "bpMessagePreviewAvatarContainer";
928
- };
929
- readonly image: {
930
- readonly className: "bpMessagePreviewAvatarImage";
931
- };
932
- readonly fallback: {
933
- readonly className: "bpMessagePreviewAvatarFallback";
934
- };
935
- };
936
- };
937
- readonly fab: {
938
- readonly container: {
939
- readonly className: "bpReset bpFabContainer";
940
- };
941
- readonly icon: {
942
- readonly className: "bpFabIcon";
943
- };
944
- readonly image: {
945
- readonly className: "bpFabImage";
946
- };
947
- };
948
- readonly notification: {
949
- readonly container: {
950
- readonly className: "bpReset bpNotificationContainer";
951
- };
952
- readonly title: {
953
- readonly className: "bpNotificationTitle";
954
- };
955
- readonly description: {
956
- readonly className: "bpNotificationDescription";
957
- };
958
- readonly icon: {
959
- readonly className: "bpNotificationIcon";
960
- };
961
- readonly closeIcon: {
962
- readonly className: "bpNotificationCloseIcon";
963
- };
964
- };
965
- readonly header: {
966
- readonly container: {
967
- readonly className: "bpReset bpHeaderContainer bpFont";
968
- };
969
- readonly content: {
970
- readonly container: {
971
- readonly className: "bpReset bpHeaderContentContainer";
972
- };
973
- readonly conversationHistory: {
974
- readonly className: "bpHeaderConversationHistoryButton";
975
- };
976
- readonly title: {
977
- readonly className: "bpHeaderContentTitle";
978
- };
979
- readonly description: {
980
- readonly className: "bpHeaderContentDescription";
981
- };
982
- readonly avatar: {
983
- readonly container: {
984
- readonly className: "bpReset bpHeaderContentAvatarContainer";
985
- };
986
- readonly image: {
987
- readonly className: "bpHeaderContentAvatarImage";
988
- };
989
- readonly fallback: {
990
- readonly className: "bpHeaderContentAvatarFallback";
991
- };
992
- };
993
- readonly toggleSound: {
994
- readonly className: "bpHeaderSoundToggleButton";
995
- };
996
- readonly actions: {
997
- readonly container: {
998
- readonly className: "bpReset bpHeaderContentActionsContainer";
999
- };
1000
- readonly icons: {
1001
- readonly className: "bpHeaderContentActionsIcons";
1002
- };
1003
- };
1004
- };
1005
- readonly expandedContent: {
1006
- readonly container: {
1007
- readonly className: "bpReset bpHeaderExpandedContentContainer";
1008
- };
1009
- readonly descriptionItems: {
1010
- readonly container: {
1011
- readonly className: "bpReset bpHeaderExpandedContentDescriptionItemsContainer";
1012
- };
1013
- readonly icon: {
1014
- readonly className: "bpHeaderExpandedContentDescriptionItemsIcon";
1015
- };
1016
- readonly text: {
1017
- readonly className: "bpHeaderExpandedContentDescriptionItemsText";
1018
- };
1019
- readonly link: {
1020
- readonly className: "bpHeaderExpandedContentDescriptionItemsLink";
1021
- };
1022
- };
1023
- readonly group: {
1024
- readonly className: "bpHeaderExpandedContentGroup";
1025
- };
1026
- };
1027
- readonly newConversationIcon: {
1028
- readonly className: "bpHeaderNewConversationIcon";
1029
- };
1030
- };
1031
- readonly composer: {
1032
- readonly wrapper: {
1033
- readonly className: "bpReset bpComposerWrapper";
1034
- };
1035
- readonly container: {
1036
- readonly className: "bpReset bpComposerContainer bpFont";
1037
- };
1038
- readonly footer: {
1039
- readonly className: "bpComposerFooter";
1040
- };
1041
- readonly inputContainer: {
1042
- readonly className: "bpComposerInputContainer";
1043
- };
1044
- readonly input: {
1045
- readonly className: "bpComposerInput";
1046
- };
1047
- readonly inputLoader: {
1048
- readonly className: "bpComposerInputLoader";
1049
- };
1050
- readonly sendbutton: {
1051
- readonly className: "bpComposerSendButton";
1052
- };
1053
- readonly uploadButton: {
1054
- readonly className: "bpComposerUploadButton";
1055
- };
1056
- readonly voiceButton: {
1057
- readonly className: "bpComposerVoiceButton";
1058
- };
1059
- readonly fileContainer: {
1060
- readonly className: "bpComposerFileContainer";
1061
- };
1062
- readonly fileWidget: {
1063
- readonly container: {
1064
- readonly className: "bpComposerFileAttachement";
1065
- };
1066
- readonly loader: {
1067
- readonly className: "bpComposerFileLoader";
1068
- };
1069
- readonly fileIcon: {
1070
- readonly container: {
1071
- readonly className: "bpComposerFileIconWrapper";
1072
- };
1073
- readonly icon: {
1074
- readonly className: "bpComposerFileIcon";
1075
- };
1076
- };
1077
- readonly metadata: {
1078
- readonly container: {
1079
- readonly className: "bpComposerFileMetadata";
1080
- };
1081
- readonly name: {
1082
- readonly className: "bpComposerFileName";
1083
- };
1084
- readonly type: {
1085
- readonly className: "bpComposerFileExtension";
1086
- };
1087
- };
1088
- readonly removeIcon: {
1089
- readonly className: "bpComposerFileRemoveIcon";
1090
- };
1091
- readonly errorIcon: {
1092
- readonly className: "bpComposerFileErrorIcon";
1093
- };
1094
- readonly previewImage: {
1095
- readonly className: "bpComposerFilePreviewImage";
1096
- };
1097
- };
1098
- };
1099
- readonly messageList: {
1100
- readonly scrollDownButton: {
1101
- readonly className: "bpMessageListScrollDownButton";
1102
- };
1103
- readonly container: {
1104
- readonly className: "bpReset bpMessageListContainer bpFont";
1105
- };
1106
- readonly viewPort: {
1107
- readonly className: "bpMessageListViewport";
1108
- };
1109
- readonly marquee: {
1110
- readonly container: {
1111
- readonly className: "bpReset bpMessageListMarqueeContainer";
1112
- };
1113
- readonly content: {
1114
- readonly className: "bpMessageListMarqueeContent";
1115
- };
1116
- readonly title: {
1117
- readonly className: "bpMessageListMarqueeTitle";
1118
- };
1119
- readonly description: {
1120
- readonly className: "bpMessageListMarqueeDescription";
1121
- };
1122
- readonly avatar: {
1123
- readonly container: {
1124
- readonly className: "bpReset bpMessageListMarqueeAvatarContainer";
1125
- };
1126
- readonly image: {
1127
- readonly className: "bpMessageListMarqueeAvatarImage";
1128
- };
1129
- readonly fallback: {
1130
- readonly className: "bpMessageListMarqueeAvatarFallback";
1131
- };
1132
- };
1133
- };
1134
- readonly headerMessage: {
1135
- readonly className: "bpMessageListHeaderMessage";
1136
- };
1137
- };
1138
- readonly message: {
1139
- readonly container: {
1140
- readonly className: "bpReset bpMessageContainer";
1141
- };
1142
- readonly avatar: {
1143
- readonly container: {
1144
- readonly className: "bpReset bpMessageAvatarContainer";
1145
- };
1146
- readonly image: {
1147
- readonly className: "bpMessageAvatarImage";
1148
- };
1149
- readonly fallback: {
1150
- readonly className: "bpMessageAvatarFallback";
1151
- };
1152
- };
1153
- readonly deliveryStatus: {
1154
- readonly className: "bpMessageDeliveryStatus";
1155
- };
1156
- readonly deliveryStatusLabel: {
1157
- readonly className: "bpMessageDeliveryStatusLabel";
1158
- };
1159
- readonly blocks: {
1160
- readonly text: {
1161
- readonly heading1: {
1162
- readonly className: "bpMessageBlocksTextHeading1";
1163
- };
1164
- readonly heading2: {
1165
- readonly className: "bpMessageBlocksTextHeading2";
1166
- };
1167
- readonly heading3: {
1168
- readonly className: "bpMessageBlocksTextHeading3";
1169
- };
1170
- readonly heading4: {
1171
- readonly className: "bpMessageBlocksTextHeading4";
1172
- };
1173
- readonly unorderedList: {
1174
- readonly className: "bpMessageBlocksTextUnorderedList";
1175
- };
1176
- readonly orderedList: {
1177
- readonly className: "bpMessageBlocksTextOrderedList";
1178
- };
1179
- readonly listItem: {
1180
- readonly className: "bpMessageBlocksTextListItem";
1181
- };
1182
- readonly link: {
1183
- readonly className: "bpMessageBlocksTextLink";
1184
- };
1185
- readonly italic: {
1186
- readonly className: "bpMessageBlocksTextItalic";
1187
- };
1188
- readonly bold: {
1189
- readonly className: "bpMessageBlocksTextBold";
1190
- };
1191
- readonly text: {
1192
- readonly className: "bpMessageBlocksTextText";
1193
- };
1194
- readonly image: {
1195
- readonly className: "bpMessageBlocksTextImage";
1196
- };
1197
- readonly imageError: {
1198
- readonly className: "bpMessageBlocksTextImageError";
1199
- };
1200
- readonly horizontalRule: {
1201
- readonly className: "bpMessageBlocksTextHorizontalRule";
1202
- };
1203
- readonly lineBreak: {
1204
- readonly className: "bpMessageBlocksTextLineBreak";
1205
- };
1206
- readonly input: {
1207
- readonly className: "bpMessageBlocksTextInput";
1208
- };
1209
- readonly codeBlockContainer: {
1210
- readonly className: "bpMessageBlocksTextCodeBlockContainer";
1211
- };
1212
- readonly codeBlockTitle: {
1213
- readonly className: "bpMessageBlocksTextCodeBlockTitle";
1214
- };
1215
- readonly codeBlockCopyIcon: {
1216
- readonly className: "bpMessageBlocksTextCodeBlockCopyIcon";
1217
- };
1218
- readonly codeBlock: {
1219
- readonly className: "bpMessageBlocksTextCodeBlock";
1220
- };
1221
- readonly code: {
1222
- readonly className: "bpMessageBlocksTextCode";
1223
- };
1224
- readonly tableContainer: {
1225
- readonly className: "bpMessageBlocksTextTableContainer";
1226
- };
1227
- readonly table: {
1228
- readonly className: "bpMessageBlocksTextTable";
1229
- };
1230
- readonly tableHeader: {
1231
- readonly className: "bpMessageBlocksTextTableHeader";
1232
- };
1233
- readonly tableData: {
1234
- readonly className: "bpMessageBlocksTextTableData";
1235
- };
1236
- readonly tableRow: {
1237
- readonly className: "bpMessageBlocksTextTableRow";
1238
- };
1239
- };
1240
- readonly audio: {
1241
- readonly className: "bpMessageBlocksAudio";
1242
- };
1243
- readonly image: {
1244
- readonly image: {
1245
- readonly className: "bpMessageBlocksImageImage";
1246
- };
1247
- readonly placeholder: {
1248
- readonly className: "bpMessageBlocksImagePlaceholder";
1249
- };
1250
- readonly skeleton: {
1251
- readonly className: "bpSkeleton";
1252
- };
1253
- };
1254
- readonly video: {
1255
- readonly className: "bpMessageBlocksVideo";
1256
- };
1257
- readonly location: {
1258
- readonly container: {
1259
- readonly className: "bpMessageBlocksLocationContainer";
1260
- };
1261
- readonly title: {
1262
- readonly className: "bpMessageBlocksLocationTitle";
1263
- };
1264
- readonly icon: {
1265
- readonly className: "bpMessageBlocksLocationIcon";
1266
- };
1267
- };
1268
- readonly file: {
1269
- readonly container: {
1270
- readonly className: "bpMessageBlocksFileContainer";
1271
- };
1272
- readonly title: {
1273
- readonly className: "bpMessageBlocksFileTitle";
1274
- };
1275
- readonly icon: {
1276
- readonly className: "bpMessageBlocksFileIcon";
1277
- };
1278
- };
1279
- readonly row: {
1280
- readonly className: "bpMessageBlocksRow";
1281
- };
1282
- readonly column: {
1283
- readonly className: "bpMessageBlocksColumn";
1284
- };
1285
- readonly bubble: {
1286
- readonly container: {
1287
- readonly className: "bpMessageBlocksBubble";
1288
- };
1289
- readonly feedbackContainer: {
1290
- readonly className: "bpMessageBlocksBubbleFeedbackContainer";
1291
- };
1292
- readonly feedbackIcon: {
1293
- readonly className: "bpMessageBlocksBubbleFeedbackIcon";
1294
- };
1295
- };
1296
- readonly carousel: {
1297
- readonly container: {
1298
- readonly className: "bpMessageBlocksCarouselContainer";
1299
- };
1300
- readonly slidesContainer: {
1301
- readonly className: "bpMessageBlocksCarouselSlidesContainer";
1302
- };
1303
- readonly backButton: {
1304
- readonly className: "bpMessageBlocksCarouselBackButton";
1305
- };
1306
- readonly nextButton: {
1307
- readonly className: "bpMessageBlocksCarouselNextButton";
1308
- };
1309
- };
1310
- readonly dropdown: {
1311
- readonly button: {
1312
- readonly container: {
1313
- readonly className: "bpMessageBlocksDropdownButtonContainer";
1314
- };
1315
- readonly text: {
1316
- readonly className: "bpMessageBlocksDropdownButtonText";
1317
- };
1318
- readonly icon: {
1319
- readonly className: "bpMessageBlocksDropdownButtonIcon";
1320
- };
1321
- };
1322
- readonly content: {
1323
- readonly container: {
1324
- readonly className: "bpMessageBlocksDropdownContentContainer";
1325
- };
1326
- readonly item: {
1327
- readonly className: "bpMessageBlocksDropdownContentItem";
1328
- };
1329
- };
1330
- };
1331
- readonly button: {
1332
- readonly className: "bpMessageBlocksButton";
1333
- };
1334
- };
1335
- };
1336
- readonly error: {
1337
- readonly container: {
1338
- readonly className: "bpReset bpErrorContainer";
1339
- };
1340
- readonly id: {
1341
- readonly className: "bpErrorId";
1342
- };
1343
- readonly header: {
1344
- readonly container: {
1345
- readonly className: "bpErrorHeader";
1346
- };
1347
- readonly actions: {
1348
- readonly className: "bpErrorHeaderActions";
1349
- };
1350
- };
1351
- readonly content: {
1352
- readonly className: "bpErrorContent";
1353
- };
1354
- readonly errorTitle: {
1355
- readonly className: "bpErrorTitle";
1356
- };
1357
- readonly errorMessage: {
1358
- readonly className: "bpErrorMessage";
1359
- };
1360
- readonly icon: {
1361
- readonly className: "bpErrorIcon";
1362
- };
1363
- };
1364
- readonly typingIndicator: {
1365
- readonly container: {
1366
- readonly className: "bpTypingIndicatorContainer";
1367
- };
1368
- readonly loader: {
1369
- readonly className: "bpTypingIndicatorLoader";
1370
- };
1371
- };
1372
- readonly proactiveBubble: {
1373
- readonly container: {
1374
- readonly className: "bpProactiveBubbleContainer";
1375
- };
1376
- readonly content: {
1377
- readonly className: "bpProactiveBubbleContent";
1378
- };
1379
- readonly layout: {
1380
- readonly className: "bpProactiveBubbleLayout";
1381
- };
1382
- readonly icon: {
1383
- readonly className: "bpProactiveBubbleIcon";
1384
- };
1385
- readonly message: {
1386
- readonly className: "bpProactiveBubbleMessage";
1387
- };
1388
- readonly closeButton: {
1389
- readonly className: "bpProactiveBubbleCloseButton";
1390
- };
1391
- readonly arrow: {
1392
- readonly className: "bpProactiveBubbleArrow";
1393
- };
1394
- };
1395
- readonly conversationHistory: {
1396
- readonly container: {
1397
- readonly className: "bpReset bpConversationHistoryContainer bpFont";
1398
- };
1399
- readonly header: {
1400
- readonly className: "bpConversationHistoryHeader";
1401
- };
1402
- readonly closeButton: {
1403
- readonly className: "bpConversationHistoryCloseButton";
1404
- };
1405
- readonly scrollContainer: {
1406
- readonly className: "bpConversationHistoryScrollContainer";
1407
- };
1408
- readonly loaderContainer: {
1409
- readonly className: "bpConversationHistoryLoaderContainer";
1410
- };
1411
- readonly conversation: {
1412
- readonly container: {
1413
- readonly className: "bpConversationHistoryConversationContainer";
1414
- };
1415
- readonly chevron: {
1416
- readonly className: "bpConversationHistoryConversationChevron";
1417
- };
1418
- readonly userAvatar: {
1419
- readonly className: {
1420
- readonly className: "bpConversationHistoryConversationUserAvatarFallback";
1421
- };
1422
- };
1423
- readonly avatar: {
1424
- readonly container: {
1425
- readonly className: "bpReset bpConversationHistoryConversationAvatarContainer";
1426
- };
1427
- readonly image: {
1428
- readonly className: "bpConversationHistoryConversationAvatarImage";
1429
- };
1430
- readonly fallback: {
1431
- readonly className: "bpConversationHistoryConversationAvatarFallback";
1432
- };
1433
- };
1434
- readonly content: {
1435
- readonly className: "bpConversationHistoryConversationContent";
1436
- };
1437
- readonly name: {
1438
- readonly className: "bpConversationHistoryConversationName";
1439
- };
1440
- readonly timestamp: {
1441
- readonly className: "bpConversationHistoryConversationTimestamp";
1442
- };
1443
- };
1444
- readonly newConversation: {
1445
- readonly button: {
1446
- readonly className: "bpConversationHistoryNewConversationButton";
1447
- };
1448
- readonly icon: {
1449
- readonly className: "bpConversationHistoryNewConversationButtonIcon";
1450
- };
1451
- };
1452
- };
1453
- };
1163
+ export declare const Webchat: ({ clientId, storageKey, configuration, apiUrl, user: userCredentials, conversationId, ...props }: Props_5) => JSX.Element;
1454
1164
 
1455
1165
  declare type WebchatClientActions = {
1456
1166
  setUser: (userId?: UserCredentials) => void;
@@ -1502,6 +1212,7 @@ export declare type WebchatError = ({
1502
1212
  export declare type WebchatEvents = {
1503
1213
  conversation: string | undefined;
1504
1214
  message: BlockMessage;
1215
+ messageUpdated: BlockMessage;
1505
1216
  messageSent: IntegrationMessage['payload'];
1506
1217
  error: Error;
1507
1218
  webchatVisibility: 'show' | 'hide' | 'toggle';
@@ -1515,7 +1226,7 @@ export declare type WebchatEvents = {
1515
1226
  participantRemoved: string;
1516
1227
  };
1517
1228
 
1518
- export declare function WebchatProvider({ clientId, apiUrl, storageKey, storageLocation, adminSecret, clientHeaders, children, ...props }: WebchatProviderProps): JSX_2.Element;
1229
+ export declare function WebchatProvider({ clientId, apiUrl, storageKey, storageLocation, adminSecret, clientHeaders, children, ...props }: WebchatProviderProps): JSX.Element;
1519
1230
 
1520
1231
  declare type WebchatProviderProps = {
1521
1232
  clientId: string;
@@ -1526,7 +1237,7 @@ declare type WebchatProviderProps = {
1526
1237
  storageKey?: string;
1527
1238
  storageLocation?: StorageLocation;
1528
1239
  clientHeaders?: Record<string, string>;
1529
- children: ReactNode_2;
1240
+ children: ReactNode;
1530
1241
  };
1531
1242
 
1532
1243
  declare type WebchatStore = {
@@ -1545,4 +1256,11 @@ export declare const webhookHandlerErrorMap: {
1545
1256
  [key in 'ResourceNotFound' | 'Forbidden']: WebchatError;
1546
1257
  };
1547
1258
 
1259
+ export declare const WelcomeHero: ({ heading, subtitle }: WelcomeHeroProps) => JSX.Element;
1260
+
1261
+ declare type WelcomeHeroProps = {
1262
+ heading: string;
1263
+ subtitle?: string;
1264
+ };
1265
+
1548
1266
  export { }