@botpress/webchat 3.2.2 → 3.2.4
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/.turbo/turbo-build.log +7 -7
- package/dist/index.d.ts +23 -5
- package/dist/index.js +5690 -5585
- package/dist/index.umd.cjs +89 -89
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @botpress/webchat@3.2.
|
|
2
|
+
> @botpress/webchat@3.2.4 build /home/runner/work/genisys/genisys/packages/webchat-components
|
|
3
3
|
> vite build
|
|
4
4
|
|
|
5
5
|
[36mvite v5.4.8 [32mbuilding for production...[36m[39m
|
|
@@ -9,13 +9,13 @@ rendering chunks...
|
|
|
9
9
|
|
|
10
10
|
[vite:dts] Start generate declaration files...
|
|
11
11
|
computing gzip size...
|
|
12
|
-
[2mdist/[22m[35mstyle.css [39m[1m[2m 47.
|
|
13
|
-
[2mdist/[22m[36mindex.js [39m[1m[
|
|
12
|
+
[2mdist/[22m[35mstyle.css [39m[1m[2m 47.53 kB[22m[1m[22m[2m │ gzip: 8.72 kB[22m
|
|
13
|
+
[2mdist/[22m[36mindex.js [39m[1m[33m776.04 kB[39m[22m[2m │ gzip: 213.46 kB[22m
|
|
14
14
|
[vite:dts] Start rollup declaration files...
|
|
15
15
|
Analysis will use the bundled TypeScript version 5.4.2
|
|
16
16
|
*** The target project appears to use TypeScript 5.6.2 which is newer than the bundled compiler engine; consider upgrading API Extractor.
|
|
17
|
-
[vite:dts] Declaration files built in
|
|
17
|
+
[vite:dts] Declaration files built in 20058ms.
|
|
18
18
|
|
|
19
|
-
[2mdist/[22m[35mstyle.css [39m[1m[2m 47.
|
|
20
|
-
[2mdist/[22m[36mindex.umd.cjs [39m[1m[
|
|
21
|
-
[32m✓ built in
|
|
19
|
+
[2mdist/[22m[35mstyle.css [39m[1m[2m 47.53 kB[22m[1m[22m[2m │ gzip: 8.72 kB[22m
|
|
20
|
+
[2mdist/[22m[36mindex.umd.cjs [39m[1m[33m519.33 kB[39m[22m[2m │ gzip: 174.43 kB[22m
|
|
21
|
+
[32m✓ built in 26.42s[39m
|
package/dist/index.d.ts
CHANGED
|
@@ -128,7 +128,7 @@ export declare type CarouselBlock = {
|
|
|
128
128
|
blocks: GenericBlock[];
|
|
129
129
|
};
|
|
130
130
|
|
|
131
|
-
export declare const Chat: ({ connected, configuration, isTyping, messages, user, isLoading, renderers, isReadOnly, disableComposer, allowFileUpload, error, participants, closeWindow, sendMessage, uploadFile, addMessageFeedback, restartConversation, storageKey, ...props }: Props) => JSX_3.Element;
|
|
131
|
+
export declare const Chat: ({ connected, configuration, isTyping, messages, user, isLoading, renderers, isReadOnly, disableComposer, allowFileUpload, error, participants, closeWindow, sendMessage, uploadFile, addMessageFeedback, triggerNetworkError, restartConversation, storageKey, ...props }: Props) => JSX_3.Element;
|
|
132
132
|
|
|
133
133
|
export declare type ColumnBlock = {
|
|
134
134
|
type: 'column';
|
|
@@ -254,7 +254,7 @@ export declare const getUseWebchatClientStore: typeof WebchatClientStores.getIns
|
|
|
254
254
|
|
|
255
255
|
export declare const handleIntegrationError: (thrown: unknown) => WebchatError;
|
|
256
256
|
|
|
257
|
-
export declare const Header: ({ defaultOpen, closeWindow, configuration, restartConversation, disabled, ...props }: HeaderProps) => JSX_3.Element;
|
|
257
|
+
export declare const Header: ({ defaultOpen, closeWindow, configuration, restartConversation, triggerNetworkError, disabled, ...props }: HeaderProps) => JSX_3.Element;
|
|
258
258
|
|
|
259
259
|
declare type HeaderProps = {
|
|
260
260
|
defaultOpen?: boolean;
|
|
@@ -263,6 +263,7 @@ declare type HeaderProps = {
|
|
|
263
263
|
onOpenChange?(open: boolean): void;
|
|
264
264
|
restartConversation?: () => void;
|
|
265
265
|
closeWindow?: () => void;
|
|
266
|
+
triggerNetworkError?: (errorType?: 'network' | 'timeout' | 'server', delay?: number) => Promise<never>;
|
|
266
267
|
configuration: Pick<Configuration, 'email' | 'phone' | 'privacyPolicy' | 'website' | 'termsOfService' | 'botAvatar' | 'botDescription' | 'botName'>;
|
|
267
268
|
};
|
|
268
269
|
|
|
@@ -318,6 +319,7 @@ export declare const Message: MemoExoticComponent<ForwardRefExoticComponent<{
|
|
|
318
319
|
addMessageFeedback?: (messageId: string, feedback: Feedback) => void;
|
|
319
320
|
isReadOnly?: boolean;
|
|
320
321
|
isLastDeliveredMessage?: boolean;
|
|
322
|
+
showAvatar?: boolean;
|
|
321
323
|
} & BlockMessage<GenericBlock> & {
|
|
322
324
|
direction: "incoming" | "outgoing" | "system";
|
|
323
325
|
sender: {
|
|
@@ -326,7 +328,7 @@ export declare const Message: MemoExoticComponent<ForwardRefExoticComponent<{
|
|
|
326
328
|
};
|
|
327
329
|
} & RefAttributes<HTMLDivElement>>>;
|
|
328
330
|
|
|
329
|
-
export declare const MessageList: MemoExoticComponent<({ className, messages, isTyping, headerMessage, renderers, botAvatar, botDescription, botName, sendMessage, addMessageFeedback, showMarquee, ...props }: ComponentProps<"ul"> & MessageListProps) => JSX_3.Element>;
|
|
331
|
+
export declare const MessageList: MemoExoticComponent<({ className, messages, isTyping, headerMessage, renderers, botAvatar, botDescription, botName, sendMessage, addMessageFeedback, showMarquee, showDateSystemMessage, showMessageStatus, showIncomingMessageAvatar, showOutgoingMessageAvatar, ...props }: ComponentProps<"ul"> & MessageListProps) => JSX_3.Element>;
|
|
330
332
|
|
|
331
333
|
declare type MessageListProps = {
|
|
332
334
|
messages?: RichBlockMessage[];
|
|
@@ -339,6 +341,10 @@ declare type MessageListProps = {
|
|
|
339
341
|
sendMessage?: (payload: IntegrationMessage['payload']) => void;
|
|
340
342
|
addMessageFeedback?: (messageId: string, feedback: Feedback) => void;
|
|
341
343
|
showMarquee?: boolean;
|
|
344
|
+
showDateSystemMessage?: boolean;
|
|
345
|
+
showMessageStatus?: boolean;
|
|
346
|
+
showIncomingMessageAvatar?: boolean;
|
|
347
|
+
showOutgoingMessageAvatar?: boolean;
|
|
342
348
|
};
|
|
343
349
|
|
|
344
350
|
export declare const MISSING_API_URL = "The API url is required to initialize the webchat.";
|
|
@@ -414,6 +420,7 @@ export declare type Props = {
|
|
|
414
420
|
type: FileType;
|
|
415
421
|
}>;
|
|
416
422
|
addMessageFeedback?: (messageId: string, feedback: Feedback) => void;
|
|
423
|
+
triggerNetworkError?: (errorType?: 'network' | 'timeout' | 'server', delay?: number) => Promise<never>;
|
|
417
424
|
error?: WebchatError;
|
|
418
425
|
storageKey?: string;
|
|
419
426
|
};
|
|
@@ -510,6 +517,12 @@ declare type ScopedClient = {
|
|
|
510
517
|
addMessageFeedback: (messageId: string, feedback: Feedback) => Promise<void>;
|
|
511
518
|
getUser: () => Promise<UserResponse>;
|
|
512
519
|
updateUser: (user: UserProfile) => Promise<User>;
|
|
520
|
+
/**
|
|
521
|
+
* Development-only method to trigger network errors for testing purposes
|
|
522
|
+
* @param errorType - Type of error to simulate ('network', 'timeout', 'server')
|
|
523
|
+
* @param delay - Optional delay in milliseconds before throwing the error
|
|
524
|
+
*/
|
|
525
|
+
triggerNetworkError: (errorType?: 'network' | 'timeout' | 'server', delay?: number) => Promise<never>;
|
|
513
526
|
};
|
|
514
527
|
|
|
515
528
|
export declare const SSE_DISCONNECTED_ERROR = "You've been disconnected from the conversation.\nPlease refresh the page.";
|
|
@@ -525,7 +538,7 @@ export declare type StyleOptions = {
|
|
|
525
538
|
* StylesheetProvider component that manages theme styles and font loading
|
|
526
539
|
* Handles both default fonts and custom Google Fonts
|
|
527
540
|
*/
|
|
528
|
-
export declare const StylesheetProvider: ({ color, fontFamily, radius, themeMode, variant, headerVariant }: Props_7) => JSX_3.Element;
|
|
541
|
+
export declare const StylesheetProvider: ({ color, fontFamily, radius, themeMode, variant, headerVariant, additionalStylesheetUrl, }: Props_7) => JSX_3.Element;
|
|
529
542
|
|
|
530
543
|
export declare type TextBlock = {
|
|
531
544
|
type: 'text';
|
|
@@ -1035,7 +1048,12 @@ export declare const webchatClasses: {
|
|
|
1035
1048
|
readonly className: "bpErrorId";
|
|
1036
1049
|
};
|
|
1037
1050
|
readonly header: {
|
|
1038
|
-
readonly
|
|
1051
|
+
readonly container: {
|
|
1052
|
+
readonly className: "bpErrorHeader";
|
|
1053
|
+
};
|
|
1054
|
+
readonly actions: {
|
|
1055
|
+
readonly className: "bpErrorHeaderActions";
|
|
1056
|
+
};
|
|
1039
1057
|
};
|
|
1040
1058
|
readonly content: {
|
|
1041
1059
|
readonly className: "bpErrorContent";
|