@botpress/webchat 3.2.12 → 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 +11 -8
- package/dist/index.js +8058 -11512
- package/dist/index.umd.cjs +110 -109
- package/dist/style.css +1 -1
- package/package.json +2 -2
- 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: {
|
|
@@ -648,7 +649,6 @@ declare type UseWebchatReturn = {
|
|
|
648
649
|
messages: BlockMessage[];
|
|
649
650
|
conversationId: string;
|
|
650
651
|
newConversation: () => Promise<void>;
|
|
651
|
-
isFetchingMessages: boolean;
|
|
652
652
|
user?: UserCredentials;
|
|
653
653
|
isTyping: boolean;
|
|
654
654
|
participants: User[];
|
|
@@ -662,7 +662,6 @@ declare type UseWebchatReturn = {
|
|
|
662
662
|
messages: BlockMessage[];
|
|
663
663
|
conversationId: undefined;
|
|
664
664
|
newConversation: () => Promise<void>;
|
|
665
|
-
isFetchingMessages: boolean;
|
|
666
665
|
user: undefined;
|
|
667
666
|
isTyping: undefined;
|
|
668
667
|
participants: User[];
|
|
@@ -1062,6 +1061,9 @@ export declare const webchatClasses: {
|
|
|
1062
1061
|
readonly placeholder: {
|
|
1063
1062
|
readonly className: "bpMessageBlocksImagePlaceholder";
|
|
1064
1063
|
};
|
|
1064
|
+
readonly skeleton: {
|
|
1065
|
+
readonly className: "bpSkeleton";
|
|
1066
|
+
};
|
|
1065
1067
|
};
|
|
1066
1068
|
readonly video: {
|
|
1067
1069
|
readonly className: "bpMessageBlocksVideo";
|
|
@@ -1209,6 +1211,7 @@ export declare const webchatClasses: {
|
|
|
1209
1211
|
declare type WebchatClientActions = {
|
|
1210
1212
|
setUser: (userId?: UserCredentials) => void;
|
|
1211
1213
|
setConversationId: (conversationId: string) => void;
|
|
1214
|
+
clearConversationId: () => void;
|
|
1212
1215
|
clearAll: () => void;
|
|
1213
1216
|
};
|
|
1214
1217
|
|