@botpress/webchat 4.1.0 → 4.2.1
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 +6 -6
- package/dist/index.d.ts +21 -20
- package/dist/index.js +6754 -6648
- package/dist/index.umd.cjs +151 -135
- package/package.json +12 -12
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
|
|
2
|
-
> @botpress/webchat@4.1
|
|
2
|
+
> @botpress/webchat@4.2.1 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 2383 modules transformed.
|
|
8
8
|
rendering chunks...
|
|
9
9
|
|
|
10
10
|
[vite:dts] Start generate declaration files...
|
|
11
11
|
computing gzip size...
|
|
12
12
|
[2mdist/[22m[35mstyle.css [39m[1m[2m 54.01 kB[22m[1m[22m[2m │ gzip: 9.07 kB[22m
|
|
13
|
-
[2mdist/[22m[36mindex.js [39m[1m[
|
|
13
|
+
[2mdist/[22m[36mindex.js [39m[1m[33m679.73 kB[39m[22m[2m │ gzip: 183.94 kB[22m
|
|
14
14
|
[vite:dts] Start rollup declaration files...
|
|
15
15
|
Analysis will use the bundled TypeScript version 5.8.2
|
|
16
16
|
*** The target project appears to use TypeScript 5.9.3 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 19038ms.
|
|
18
18
|
|
|
19
19
|
[2mdist/[22m[35mstyle.css [39m[1m[2m 54.01 kB[22m[1m[22m[2m │ gzip: 9.07 kB[22m
|
|
20
|
-
[2mdist/[22m[36mindex.umd.cjs [39m[1m[
|
|
21
|
-
[32m✓ built in
|
|
20
|
+
[2mdist/[22m[36mindex.umd.cjs [39m[1m[2m451.76 kB[22m[1m[22m[2m │ gzip: 148.76 kB[22m
|
|
21
|
+
[32m✓ built in 23.74s[39m
|
package/dist/index.d.ts
CHANGED
|
@@ -13,11 +13,12 @@ import type { FC } from 'react';
|
|
|
13
13
|
import { ForwardRefExoticComponent } from 'react';
|
|
14
14
|
import { HTMLAttributes } from 'react';
|
|
15
15
|
import { IntegrationError } from '@botpress/webchat-client';
|
|
16
|
-
import { JSX
|
|
17
|
-
import { JSX as
|
|
16
|
+
import { JSX } from 'react';
|
|
17
|
+
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
18
18
|
import { LatestWebchatTheme } from '@bpinternal/shared';
|
|
19
19
|
import { MemoExoticComponent } from 'react';
|
|
20
20
|
import { Message as Message_2 } from '@botpress/webchat-client';
|
|
21
|
+
import { NamedExoticComponent } from 'react';
|
|
21
22
|
import { PersistOptions } from 'zustand/middleware';
|
|
22
23
|
import { ReactNode } from 'react';
|
|
23
24
|
import { Ref } from 'react';
|
|
@@ -62,7 +63,7 @@ export declare type BlocIntegrationMessageItems = Extract<IntegrationMessage['pa
|
|
|
62
63
|
type: 'bloc';
|
|
63
64
|
}>['items'];
|
|
64
65
|
|
|
65
|
-
export declare const Block: <T extends GenericBlock["type"]>({ block, renderers, ...props }: BlockProps<T>) =>
|
|
66
|
+
export declare const Block: <T extends GenericBlock["type"]>({ block, renderers, ...props }: BlockProps<T>) => JSX.Element;
|
|
66
67
|
|
|
67
68
|
export declare type BlockMessage<T = GenericBlock> = {
|
|
68
69
|
id: string;
|
|
@@ -133,7 +134,7 @@ export declare type CarouselBlock = {
|
|
|
133
134
|
blocks: GenericBlock[];
|
|
134
135
|
};
|
|
135
136
|
|
|
136
|
-
export declare const Chat: ({ connected, configuration, isTyping, messages, user, isLoading, renderers, isReadOnly, disableComposer, allowFileUpload, error, participants, closeWindow, sendMessage, uploadFile, addMessageFeedback, restartConversation, clientId, storageKey, soundOn, toggleSound, disableSendButton, ...props }: Props) =>
|
|
137
|
+
export declare const Chat: ({ connected, configuration, isTyping, messages, user, isLoading, renderers, isReadOnly, disableComposer, allowFileUpload, error, participants, closeWindow, sendMessage, uploadFile, addMessageFeedback, restartConversation, clientId, storageKey, soundOn, toggleSound, disableSendButton, ...props }: Props) => JSX_2.Element;
|
|
137
138
|
|
|
138
139
|
declare type ChatSoundStore = {
|
|
139
140
|
soundOn: boolean;
|
|
@@ -175,14 +176,14 @@ export declare type ComposableIntegrationMessagePayload = Extract<IntegrationMes
|
|
|
175
176
|
|
|
176
177
|
declare type ComposableIntegrationMessageTypes = 'audio' | 'bloc' | 'file' | 'image' | 'location' | 'markdown' | 'text' | 'video';
|
|
177
178
|
|
|
178
|
-
export declare const Composer:
|
|
179
|
+
export declare const Composer: NamedExoticComponent<Omit<Props_3, "ref"> & RefAttributes<HTMLDivElement>>;
|
|
179
180
|
|
|
180
181
|
export declare const CONFIG_ACCESS_DENIED = "Access denied to configuration file. Please check your credentials or your configuration URL and try again.";
|
|
181
182
|
|
|
182
183
|
export { Configuration }
|
|
183
184
|
|
|
184
185
|
export declare const Container: {
|
|
185
|
-
({ children, className, uploadFile, allowFileUpload, storageKey, connected: _, ...props }: Props_4):
|
|
186
|
+
({ children, className, uploadFile, allowFileUpload, storageKey, connected: _, ...props }: Props_4): JSX_2.Element;
|
|
186
187
|
displayName: string;
|
|
187
188
|
};
|
|
188
189
|
|
|
@@ -247,7 +248,7 @@ declare type ErrorProps = {
|
|
|
247
248
|
closeWindow?: () => void;
|
|
248
249
|
};
|
|
249
250
|
|
|
250
|
-
export declare function ErrorState({ error, restartConversation, closeWindow }: ErrorProps):
|
|
251
|
+
export declare function ErrorState({ error, restartConversation, closeWindow }: ErrorProps): JSX_2.Element;
|
|
251
252
|
|
|
252
253
|
declare type EventError = Error & {
|
|
253
254
|
type: 'error';
|
|
@@ -287,7 +288,7 @@ export declare const getUseChatSoundStore: typeof ChatSoundStores.getInstance;
|
|
|
287
288
|
|
|
288
289
|
export declare const getUseWebchatClientStore: typeof WebchatClientStores.getInstance;
|
|
289
290
|
|
|
290
|
-
export declare const Header: ({ defaultOpen, closeWindow, configuration, restartConversation, disabled, soundOn, toggleSound, clientId, ...props }: HeaderProps) =>
|
|
291
|
+
export declare const Header: ({ defaultOpen, closeWindow, configuration, restartConversation, disabled, soundOn, toggleSound, clientId, ...props }: HeaderProps) => JSX_2.Element;
|
|
291
292
|
|
|
292
293
|
declare type HeaderProps = {
|
|
293
294
|
defaultOpen?: boolean;
|
|
@@ -363,7 +364,7 @@ export declare type LocationBlock = {
|
|
|
363
364
|
|
|
364
365
|
export declare const mapToWebchatError: (thrown: unknown) => WebchatError;
|
|
365
366
|
|
|
366
|
-
export declare const Message:
|
|
367
|
+
export declare const Message: NamedExoticComponent<{
|
|
367
368
|
children?: ReactNode;
|
|
368
369
|
renderers?: Partial<Renderers>;
|
|
369
370
|
sendMessage?: (payload: IntegrationMessage["payload"]) => void;
|
|
@@ -377,7 +378,7 @@ export declare const Message: MemoExoticComponent<ForwardRefExoticComponent<{
|
|
|
377
378
|
name: string;
|
|
378
379
|
avatar?: string;
|
|
379
380
|
};
|
|
380
|
-
} & RefAttributes<HTMLDivElement
|
|
381
|
+
} & RefAttributes<HTMLDivElement>>;
|
|
381
382
|
|
|
382
383
|
export declare const MessageContext: Context<MessageContextVaue | null>;
|
|
383
384
|
|
|
@@ -386,7 +387,7 @@ declare type MessageContextVaue = {
|
|
|
386
387
|
setIsLoading: Dispatch<SetStateAction<string[]>>;
|
|
387
388
|
};
|
|
388
389
|
|
|
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) =>
|
|
390
|
+
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_2.Element>;
|
|
390
391
|
|
|
391
392
|
declare type MessageListProps = {
|
|
392
393
|
messages?: RichBlockMessage[];
|
|
@@ -424,7 +425,7 @@ export declare function Modal({ open, onOpenChange, children, }: {
|
|
|
424
425
|
open?: boolean;
|
|
425
426
|
onOpenChange?: (open: boolean) => void;
|
|
426
427
|
children: ReactNode;
|
|
427
|
-
}):
|
|
428
|
+
}): JSX_2.Element;
|
|
428
429
|
|
|
429
430
|
export declare namespace Modal {
|
|
430
431
|
var Button: ForwardRefExoticComponent<Dialog.DialogTriggerProps & RefAttributes<HTMLButtonElement>>;
|
|
@@ -440,7 +441,7 @@ declare function ModalContent({ title, description, onConfirm, onCancel, confirm
|
|
|
440
441
|
confirmButtonText?: string;
|
|
441
442
|
cancelButtonText?: string;
|
|
442
443
|
children: ReactNode;
|
|
443
|
-
}):
|
|
444
|
+
}): JSX_2.Element;
|
|
444
445
|
|
|
445
446
|
export declare const ModalContext: Context<ModalContextValue>;
|
|
446
447
|
|
|
@@ -450,7 +451,7 @@ declare type ModalContextValue = {
|
|
|
450
451
|
|
|
451
452
|
export declare const ModalProvider: ({ children }: {
|
|
452
453
|
children: ReactNode;
|
|
453
|
-
}) =>
|
|
454
|
+
}) => JSX_2.Element;
|
|
454
455
|
|
|
455
456
|
export declare const NETWORK_ERROR = "Please check your internet connection and refresh the page.";
|
|
456
457
|
|
|
@@ -558,7 +559,7 @@ export declare type Renderers = {
|
|
|
558
559
|
|
|
559
560
|
export declare const renderers: Renderers;
|
|
560
561
|
|
|
561
|
-
export declare const RestartConversationButton: ({ restartConversation, ...props }: Props_5) =>
|
|
562
|
+
export declare const RestartConversationButton: ({ restartConversation, ...props }: Props_5) => JSX_2.Element;
|
|
562
563
|
|
|
563
564
|
export declare const retryWithBackoff: <T>(fn: () => Promise<T>, maxAttempts?: number, delayMs?: number) => Promise<T>;
|
|
564
565
|
|
|
@@ -613,7 +614,7 @@ export declare type StyleOptions = {
|
|
|
613
614
|
/**
|
|
614
615
|
* StylesheetProvider component that manages theme styles and font loading
|
|
615
616
|
*/
|
|
616
|
-
export declare const StylesheetProvider: ({ color, fontFamily, radius, themeMode, variant, headerVariant, additionalStylesheetUrl, }: Props_7) =>
|
|
617
|
+
export declare const StylesheetProvider: ({ color, fontFamily, radius, themeMode, variant, headerVariant, additionalStylesheetUrl, }: Props_7) => JSX_2.Element;
|
|
617
618
|
|
|
618
619
|
export declare type TextBlock = {
|
|
619
620
|
type: 'text';
|
|
@@ -627,7 +628,7 @@ declare type ToPayloadType<T extends IntegrationMessageTypes> = {
|
|
|
627
628
|
};
|
|
628
629
|
}[T];
|
|
629
630
|
|
|
630
|
-
export declare const TypingIndicator: MemoExoticComponent<({ ...props }: ComponentProps<"div">) =>
|
|
631
|
+
export declare const TypingIndicator: MemoExoticComponent<({ ...props }: ComponentProps<"div">) => JSX_2.Element>;
|
|
631
632
|
|
|
632
633
|
export declare type UseImageSizeResult = [Dimensions | null, {
|
|
633
634
|
loading: boolean;
|
|
@@ -687,7 +688,7 @@ export declare type VideoBlock = {
|
|
|
687
688
|
url: string;
|
|
688
689
|
};
|
|
689
690
|
|
|
690
|
-
export declare const Webchat: ({ clientId, storageKey, configuration, allowFileUpload, apiUrl, user, conversationId, ...props }: Props_6) =>
|
|
691
|
+
export declare const Webchat: ({ clientId, storageKey, configuration, allowFileUpload, apiUrl, user, conversationId, ...props }: Props_6) => JSX_2.Element;
|
|
691
692
|
|
|
692
693
|
export declare const webchatClasses: {
|
|
693
694
|
readonly container: {
|
|
@@ -1268,8 +1269,8 @@ export declare type WebchatEvents = {
|
|
|
1268
1269
|
};
|
|
1269
1270
|
|
|
1270
1271
|
declare type WebchatStore = {
|
|
1271
|
-
messageContainerRef: RefObject<HTMLDivElement>;
|
|
1272
|
-
setMessageContainerRef: (ref: RefObject<HTMLDivElement>) => void;
|
|
1272
|
+
messageContainerRef: RefObject<HTMLDivElement | null>;
|
|
1273
|
+
setMessageContainerRef: (ref: RefObject<HTMLDivElement | null>) => void;
|
|
1273
1274
|
portalContainer: HTMLElement | null;
|
|
1274
1275
|
setPortalContainer: (container: HTMLElement | null) => void;
|
|
1275
1276
|
eventEmitter: EventEmitter<Events_2>;
|