@botpress/webchat 2.4.0-beta.2 → 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,21 +1,19 @@
1
1
 
2
- > @botpress/webchat@2.4.0-beta.2 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
- src/stories/utils.ts(4,14): error TS2742: The inferred type of 'mockBlockArgs' cannot be named without a reference to '.pnpm/@vitest+spy@2.0.5/node_modules/@vitest/spy'. This is likely not portable. A type annotation is necessary.
7
-
8
6
  transforming...
9
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.
10
- ✓ 3103 modules transformed.
8
+ ✓ 3110 modules transformed.
11
9
  rendering chunks...
12
10
 
13
11
  [vite:dts] Start generate declaration files...
14
12
  computing gzip size...
15
- dist/style.css  32.56 kB │ gzip: 6.24 kB
16
- dist/index.js 1,023.92 kB │ gzip: 267.60 kB
17
- [vite:dts] Declaration files built in 11966ms.
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.
18
16
 
19
- dist/style.css  32.56 kB │ gzip: 6.24 kB
20
- dist/index.umd.cjs 701.90 kB │ gzip: 223.00 kB
21
- ✓ built in 20.48s
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, }: 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';