@botpress/webchat 3.2.11 → 4.0.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/.turbo/turbo-build.log +8 -8
- package/dist/index.d.ts +23 -12
- package/dist/index.js +8107 -11536
- package/dist/index.umd.cjs +110 -109
- package/dist/style.css +1 -1
- package/package.json +6 -3
- package/vitest.config.ts +3 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
|
|
2
|
-
> @botpress/webchat@
|
|
2
|
+
> @botpress/webchat@4.0.0 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
|
|
6
6
|
transforming...
|
|
7
|
-
[32m✓[39m
|
|
7
|
+
[32m✓[39m 2335 modules transformed.
|
|
8
8
|
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
|
|
13
|
-
[2mdist/[22m[36mindex.js [39m[1m[
|
|
12
|
+
[2mdist/[22m[35mstyle.css [39m[1m[2m 49.55 kB[22m[1m[22m[2m │ gzip: 8.84 kB[22m
|
|
13
|
+
[2mdist/[22m[36mindex.js [39m[1m[33m666.14 kB[39m[22m[2m │ gzip: 180.07 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 18818ms.
|
|
18
18
|
|
|
19
|
-
[2mdist/[22m[35mstyle.css [39m[1m[2m
|
|
20
|
-
[2mdist/[22m[36mindex.umd.cjs [39m[1m[
|
|
21
|
-
[32m✓ built in
|
|
19
|
+
[2mdist/[22m[35mstyle.css [39m[1m[2m 49.55 kB[22m[1m[22m[2m │ gzip: 8.84 kB[22m
|
|
20
|
+
[2mdist/[22m[36mindex.umd.cjs [39m[1m[2m443.57 kB[22m[1m[22m[2m │ gzip: 145.67 kB[22m
|
|
21
|
+
[32m✓ built in 23.18s[39m
|
package/dist/index.d.ts
CHANGED
|
@@ -182,7 +182,7 @@ export declare const CONFIG_ACCESS_DENIED = "Access denied to configuration file
|
|
|
182
182
|
export { Configuration }
|
|
183
183
|
|
|
184
184
|
export declare const Container: {
|
|
185
|
-
({ children, className, uploadFile, allowFileUpload, storageKey, ...props }: Props_4): JSX_3.Element;
|
|
185
|
+
({ children, className, uploadFile, allowFileUpload, storageKey, connected: _, ...props }: Props_4): JSX_3.Element;
|
|
186
186
|
displayName: string;
|
|
187
187
|
};
|
|
188
188
|
|
|
@@ -287,9 +287,7 @@ export declare const getUseChatSoundStore: typeof ChatSoundStores.getInstance;
|
|
|
287
287
|
|
|
288
288
|
export declare const getUseWebchatClientStore: typeof WebchatClientStores.getInstance;
|
|
289
289
|
|
|
290
|
-
export declare const
|
|
291
|
-
|
|
292
|
-
export declare const Header: ({ defaultOpen, closeWindow, configuration, restartConversation, disabled, soundOn, toggleSound, ...props }: HeaderProps) => JSX_3.Element;
|
|
290
|
+
export declare const Header: ({ defaultOpen, closeWindow, configuration, restartConversation, disabled, soundOn, toggleSound, clientId, ...props }: HeaderProps) => JSX_3.Element;
|
|
293
291
|
|
|
294
292
|
declare type HeaderProps = {
|
|
295
293
|
defaultOpen?: boolean;
|
|
@@ -301,7 +299,6 @@ declare type HeaderProps = {
|
|
|
301
299
|
clientId?: string;
|
|
302
300
|
soundOn?: boolean;
|
|
303
301
|
toggleSound?: () => void;
|
|
304
|
-
triggerNetworkError?: (errorType?: 'network' | 'timeout' | 'server', delay?: number) => Promise<never>;
|
|
305
302
|
configuration: Pick<Configuration, 'email' | 'phone' | 'privacyPolicy' | 'website' | 'termsOfService' | 'botAvatar' | 'botDescription' | 'botName' | 'soundEnabled'>;
|
|
306
303
|
};
|
|
307
304
|
|
|
@@ -364,6 +361,8 @@ export declare type LocationBlock = {
|
|
|
364
361
|
title?: string;
|
|
365
362
|
};
|
|
366
363
|
|
|
364
|
+
export declare const mapToWebchatError: (thrown: unknown) => WebchatError;
|
|
365
|
+
|
|
367
366
|
export declare const Message: MemoExoticComponent<ForwardRefExoticComponent<{
|
|
368
367
|
children?: ReactNode;
|
|
369
368
|
renderers?: Partial<Renderers>;
|
|
@@ -387,7 +386,7 @@ declare type MessageContextVaue = {
|
|
|
387
386
|
setIsLoading: Dispatch<SetStateAction<string[]>>;
|
|
388
387
|
};
|
|
389
388
|
|
|
390
|
-
export declare const MessageList: MemoExoticComponent<({ className, messages, isTyping, headerMessage, renderers, botAvatar, botDescription, botName, sendMessage, addMessageFeedback, showMarquee, showDateSystemMessage, showMessageStatus, showIncomingMessageAvatar, showOutgoingMessageAvatar, ...props }: ComponentProps<"
|
|
389
|
+
export declare const MessageList: MemoExoticComponent<({ className, messages, isTyping, headerMessage, renderers, botAvatar, botDescription, botName, sendMessage, addMessageFeedback, showMarquee, showDateSystemMessage, showMessageStatus, showIncomingMessageAvatar, showOutgoingMessageAvatar, ...props }: ComponentProps<"div"> & MessageListProps) => JSX_3.Element>;
|
|
391
390
|
|
|
392
391
|
declare type MessageListProps = {
|
|
393
392
|
messages?: RichBlockMessage[];
|
|
@@ -559,6 +558,8 @@ export declare const renderers: Renderers;
|
|
|
559
558
|
|
|
560
559
|
export declare const RestartConversationButton: ({ restartConversation, ...props }: Props_5) => JSX_3.Element;
|
|
561
560
|
|
|
561
|
+
export declare const retryWithBackoff: <T>(fn: () => Promise<T>, maxAttempts?: number, delayMs?: number) => Promise<T>;
|
|
562
|
+
|
|
562
563
|
export declare type RichBlockMessage<T = GenericBlock> = BlockMessage<T> & {
|
|
563
564
|
direction: 'incoming' | 'outgoing' | 'system';
|
|
564
565
|
sender: {
|
|
@@ -580,7 +581,10 @@ export declare type RowOf<T extends GenericBlock> = Omit<RowBlock, 'blocks'> & {
|
|
|
580
581
|
|
|
581
582
|
declare type ScopedClient = {
|
|
582
583
|
sendMessage: (payload: IntegrationMessage['payload']) => Promise<void>;
|
|
583
|
-
sendEvent: (event: Record<string, any
|
|
584
|
+
sendEvent: (event: Record<string, any>, options?: {
|
|
585
|
+
bindConversation?: boolean;
|
|
586
|
+
bindUser?: boolean;
|
|
587
|
+
}) => Promise<void>;
|
|
584
588
|
uploadFile: (file: File) => Promise<{
|
|
585
589
|
fileUrl: string;
|
|
586
590
|
name: string;
|
|
@@ -645,7 +649,6 @@ declare type UseWebchatReturn = {
|
|
|
645
649
|
messages: BlockMessage[];
|
|
646
650
|
conversationId: string;
|
|
647
651
|
newConversation: () => Promise<void>;
|
|
648
|
-
isFetchingMessages: boolean;
|
|
649
652
|
user?: UserCredentials;
|
|
650
653
|
isTyping: boolean;
|
|
651
654
|
participants: User[];
|
|
@@ -659,7 +662,6 @@ declare type UseWebchatReturn = {
|
|
|
659
662
|
messages: BlockMessage[];
|
|
660
663
|
conversationId: undefined;
|
|
661
664
|
newConversation: () => Promise<void>;
|
|
662
|
-
isFetchingMessages: boolean;
|
|
663
665
|
user: undefined;
|
|
664
666
|
isTyping: undefined;
|
|
665
667
|
participants: User[];
|
|
@@ -1059,6 +1061,9 @@ export declare const webchatClasses: {
|
|
|
1059
1061
|
readonly placeholder: {
|
|
1060
1062
|
readonly className: "bpMessageBlocksImagePlaceholder";
|
|
1061
1063
|
};
|
|
1064
|
+
readonly skeleton: {
|
|
1065
|
+
readonly className: "bpSkeleton";
|
|
1066
|
+
};
|
|
1062
1067
|
};
|
|
1063
1068
|
readonly video: {
|
|
1064
1069
|
readonly className: "bpMessageBlocksVideo";
|
|
@@ -1203,14 +1208,20 @@ export declare const webchatClasses: {
|
|
|
1203
1208
|
};
|
|
1204
1209
|
};
|
|
1205
1210
|
|
|
1206
|
-
declare type
|
|
1207
|
-
user?: UserCredentials;
|
|
1208
|
-
conversationId?: string;
|
|
1211
|
+
declare type WebchatClientActions = {
|
|
1209
1212
|
setUser: (userId?: UserCredentials) => void;
|
|
1210
1213
|
setConversationId: (conversationId: string) => void;
|
|
1214
|
+
clearConversationId: () => void;
|
|
1211
1215
|
clearAll: () => void;
|
|
1212
1216
|
};
|
|
1213
1217
|
|
|
1218
|
+
export declare type WebchatClientState = {
|
|
1219
|
+
user?: UserCredentials;
|
|
1220
|
+
conversationId?: string;
|
|
1221
|
+
};
|
|
1222
|
+
|
|
1223
|
+
declare type WebchatClientStore = WebchatClientState & WebchatClientActions;
|
|
1224
|
+
|
|
1214
1225
|
declare class WebchatClientStores {
|
|
1215
1226
|
private static _instances;
|
|
1216
1227
|
private constructor();
|