@botpress/webchat 2.4.0-beta.3 → 2.4.0-beta.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.
@@ -1,19 +1,19 @@
1
1
 
2
- > @botpress/webchat@2.4.0-beta.3 build /home/runner/work/genisys/genisys/packages/webchat-components
2
+ > @botpress/webchat@2.4.0-beta.4 build /home/runner/work/genisys/genisys/packages/webchat-components
3
3
  > vite build
4
4
 
5
5
  vite v5.4.8 building for production...
6
6
  transforming...
7
7
  [plugin:vite:resolve] [plugin vite:resolve] Module "crypto" has been externalized for browser compatibility, imported by "/home/runner/work/genisys/genisys/node_modules/.pnpm/@bpinternal+webchat-http-client@0.2.3/node_modules/@bpinternal/webchat-http-client/dist/index.mjs". See https://vitejs.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.
8
- ✓ 3105 modules transformed.
8
+ ✓ 3110 modules transformed.
9
9
  rendering chunks...
10
10
 
11
11
  [vite:dts] Start generate declaration files...
12
12
  computing gzip size...
13
- dist/style.css  32.56 kB │ gzip: 6.24 kB
14
- dist/index.js 1,024.28 kB │ gzip: 267.68 kB
15
- [vite:dts] Declaration files built in 10856ms.
13
+ dist/style.css  32.68 kB │ gzip: 6.26 kB
14
+ dist/index.js 1,026.67 kB │ gzip: 268.16 kB
15
+ [vite:dts] Declaration files built in 11632ms.
16
16
 
17
- dist/style.css  32.56 kB │ gzip: 6.24 kB
18
- dist/index.umd.cjs 702.08 kB │ gzip: 223.03 kB
19
- ✓ built in 19.52s
17
+ dist/style.css  32.68 kB │ gzip: 6.26 kB
18
+ dist/index.umd.cjs 703.78 kB │ gzip: 223.45 kB
19
+ ✓ built in 20.25s
@@ -0,0 +1,30 @@
1
+ import type { Configuration, FileType, MessageObject, Renderers } from '../types';
2
+ import type { Message } from '../adapters/webchat';
3
+ export type Props = {
4
+ className?: string;
5
+ renderers?: Partial<Renderers>;
6
+ configuration: Configuration;
7
+ messages: MessageObject[];
8
+ connected?: boolean;
9
+ disableComposer?: boolean;
10
+ isReadOnly?: boolean;
11
+ isLoading?: boolean;
12
+ isTyping?: boolean;
13
+ lastTypingHeartbeat?: Date | null;
14
+ allowFileUpload?: boolean;
15
+ clientId?: string;
16
+ closeWindow?: () => void;
17
+ restartConversation?: () => void;
18
+ user: {
19
+ id: string;
20
+ name?: string;
21
+ pictureUrl?: string;
22
+ } & Record<string, unknown>;
23
+ sendMessage?: (payload: Message) => void;
24
+ uploadFile?: (file: File) => Promise<{
25
+ fileUrl: string;
26
+ name: string;
27
+ type: FileType;
28
+ }>;
29
+ };
30
+ export declare const Chat: ({ connected, configuration, closeWindow, isTyping, messages, user, sendMessage, uploadFile, isLoading, renderers, isReadOnly, disableComposer, restartConversation, allowFileUpload, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
@@ -1,29 +1,13 @@
1
- import type { Configuration, FileType, MessageObject, Renderers } from '../types';
2
- import type { Message } from '../adapters/webchat';
3
- export type Props = {
4
- renderers?: Partial<Renderers>;
5
- configuration: Configuration;
6
- messages: MessageObject[];
7
- connected?: boolean;
8
- disableComposer?: boolean;
9
- isReadOnly?: boolean;
10
- isLoading?: boolean;
11
- isTyping?: boolean;
12
- lastTypingHeartbeat?: Date | null;
13
- allowFileUpload?: boolean;
14
- clientId?: string;
15
- closeWindow?: () => void;
16
- restartConversation?: () => void;
17
- user: {
18
- id: string;
19
- name?: string;
20
- pictureUrl?: string;
21
- } & Record<string, unknown>;
22
- sendMessage?: (payload: Message) => void;
23
- uploadFile?: (file: File) => Promise<{
24
- fileUrl: string;
25
- name: string;
26
- type: FileType;
27
- }>;
28
- };
29
- export declare const Webchat: ({ connected, configuration, closeWindow, isTyping, messages, user, sendMessage, uploadFile, isLoading, renderers, isReadOnly, disableComposer, restartConversation, allowFileUpload, }: Props) => import("react/jsx-runtime").JSX.Element;
1
+ import { type ComponentProps } from 'react';
2
+ import { Chat } from './Chat';
3
+ type configuration = ComponentProps<typeof Chat>['configuration'];
4
+ type Props = {
5
+ clientId: string;
6
+ apiUrl?: string;
7
+ storageKey?: string;
8
+ userKey?: string;
9
+ conversationId?: string;
10
+ configuration?: configuration;
11
+ } & Pick<ComponentProps<typeof Chat>, 'allowFileUpload' | 'renderers'> & ComponentProps<'div'>;
12
+ export declare const Webchat: ({ clientId, storageKey, configuration, allowFileUpload, apiUrl, userKey, conversationId, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
13
+ export {};
@@ -9,5 +9,6 @@ export * from './Message';
9
9
  export * from './MessageList';
10
10
  export * from './Modal';
11
11
  export * from './RestartConversationButton';
12
+ export * from './Chat';
12
13
  export * from './Webchat';
13
14
  export * from './renderers';