@botpress/webchat 2.2.0 → 2.2.2
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 +13 -8
- package/dist/components/Container/Container.d.ts +1 -3
- package/dist/components/Webchat.d.ts +1 -5
- package/dist/contexts/WebchatContext.d.ts +63 -34
- package/dist/index.d.ts +1 -0
- package/dist/index.js +22320 -22190
- package/dist/index.umd.cjs +93 -93
- package/dist/schemas/configuration.d.ts +34 -0
- package/dist/schemas/init.d.ts +168 -128
- package/dist/stores/webchatStore.d.ts +0 -1
- package/dist/style.css +1 -1
- package/dist/types/configuration.d.ts +1 -0
- package/dist/utils/colors.d.ts +20 -0
- package/dist/utils/generateCSS.d.ts +1 -0
- package/dist/utils/index.d.ts +4 -0
- package/dist/utils/theme.d.ts +2 -0
- package/package.json +2 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,21 +1,26 @@
|
|
|
1
1
|
|
|
2
|
-
> @botpress/webchat@2.2.
|
|
2
|
+
> @botpress/webchat@2.2.2 build /home/runner/work/echo/echo/packages/webchat-frontend
|
|
3
3
|
> vite build
|
|
4
4
|
|
|
5
5
|
[36mvite v4.4.11 [32mbuilding for production...[36m[39m
|
|
6
6
|
transforming...
|
|
7
|
+
[33m[vite:css] /home/runner/work/echo/echo/packages/webchat-frontend/src/components/renderers/Audio/styles.css is empty
|
|
8
|
+
1 | @import './resets.css';
|
|
9
|
+
| ^
|
|
10
|
+
2 | @import './theme.css';
|
|
11
|
+
3 | @import '../components/index.css'[39m
|
|
7
12
|
[1m[33m[plugin:vite:resolve][39m[22m [33mModule "node:http" has been externalized for browser compatibility, imported by "/home/runner/work/echo/echo/node_modules/.pnpm/@botpress+sdk@0.10.13_react@18.2.0/node_modules/@botpress/sdk/dist/index.js". See http://vitejs.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.[39m
|
|
8
13
|
[1m[33m[plugin:vite:resolve][39m[22m [33mModule "util" has been externalized for browser compatibility, imported by "/home/runner/work/echo/echo/node_modules/.pnpm/@botpress+sdk@0.10.13_react@18.2.0/node_modules/@botpress/sdk/dist/index.js". See http://vitejs.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.[39m
|
|
9
14
|
[1m[33m[plugin:vite:resolve][39m[22m [33mModule "crypto" has been externalized for browser compatibility, imported by "/home/runner/work/echo/echo/packages/webchat-frontend/src/gen/client/errors.ts". See http://vitejs.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.[39m
|
|
10
|
-
[32m✓[39m
|
|
15
|
+
[32m✓[39m 2763 modules transformed.
|
|
11
16
|
rendering chunks...
|
|
12
17
|
[32m
|
|
13
18
|
[36m[vite:dts][32m Start generate declaration files...[39m
|
|
14
19
|
computing gzip size...
|
|
15
|
-
[2mdist/[22m[35mstyle.css [39m[1m[2m
|
|
16
|
-
[2mdist/[22m[36mindex.js [39m[1m[33m1,
|
|
17
|
-
[32m[36m[vite:dts][32m Declaration files built in
|
|
20
|
+
[2mdist/[22m[35mstyle.css [39m[1m[2m 26.60 kB[22m[1m[22m[2m │ gzip: 5.29 kB[22m
|
|
21
|
+
[2mdist/[22m[36mindex.js [39m[1m[33m1,406.59 kB[39m[22m[2m │ gzip: 354.04 kB[22m
|
|
22
|
+
[32m[36m[vite:dts][32m Declaration files built in 15384ms.
|
|
18
23
|
[39m
|
|
19
|
-
[2mdist/[22m[35mstyle.css [39m[1m[2m
|
|
20
|
-
[2mdist/[22m[36mindex.umd.cjs [39m[1m[
|
|
21
|
-
[32m✓ built in
|
|
24
|
+
[2mdist/[22m[35mstyle.css [39m[1m[2m 26.60 kB[22m[1m[22m[2m │ gzip: 5.29 kB[22m
|
|
25
|
+
[2mdist/[22m[36mindex.umd.cjs [39m[1m[33m982.92 kB[39m[22m[2m │ gzip: 297.31 kB[22m
|
|
26
|
+
[32m✓ built in 25.44s[39m
|
|
@@ -1,4 +1,2 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const Container: import("react").ForwardRefExoticComponent<Omit<import("react").
|
|
3
|
-
themeOverrides: Record<`--${string}`, string>;
|
|
4
|
-
}, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
2
|
+
export declare const Container: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { CSSProperties, FC
|
|
2
|
-
import {
|
|
3
|
-
import { EventEmitter, Events } from '../utils';
|
|
4
|
-
import { WebchatClient } from '../client';
|
|
1
|
+
import { CSSProperties, FC } from 'react';
|
|
2
|
+
import { BlockObjects, CommonBlockProps, BlockType } from '../types';
|
|
5
3
|
export type StyleOptions = {
|
|
6
4
|
className?: string;
|
|
7
5
|
style?: CSSProperties;
|
|
@@ -9,34 +7,65 @@ export type StyleOptions = {
|
|
|
9
7
|
export type Renderers = {
|
|
10
8
|
[T in BlockType]: FC<CommonBlockProps & BlockObjects[T]>;
|
|
11
9
|
};
|
|
12
|
-
export
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
export declare const WebchatConfigContext: import("react").Context<{
|
|
11
|
+
composerPlaceholder?: string | undefined;
|
|
12
|
+
botName?: string | undefined;
|
|
13
|
+
botAvatar?: string | undefined;
|
|
14
|
+
botDescription?: string | undefined;
|
|
15
|
+
website?: {
|
|
16
|
+
title: string;
|
|
17
|
+
link?: string | undefined;
|
|
18
|
+
} | undefined;
|
|
19
|
+
email?: {
|
|
20
|
+
title: string;
|
|
21
|
+
link?: string | undefined;
|
|
22
|
+
} | undefined;
|
|
23
|
+
phone?: {
|
|
24
|
+
title: string;
|
|
25
|
+
link?: string | undefined;
|
|
26
|
+
} | undefined;
|
|
27
|
+
privacyPolicy?: {
|
|
28
|
+
title: string;
|
|
29
|
+
link?: string | undefined;
|
|
30
|
+
} | undefined;
|
|
31
|
+
termsOfService?: {
|
|
32
|
+
title: string;
|
|
33
|
+
link?: string | undefined;
|
|
34
|
+
} | undefined;
|
|
35
|
+
color?: string | undefined;
|
|
36
|
+
variant?: "soft" | "solid" | undefined;
|
|
37
|
+
theme?: "light" | "dark" | undefined;
|
|
38
|
+
fontFamily?: "rubik" | "inter" | "ibm" | "fira" | undefined;
|
|
39
|
+
radius?: number | undefined;
|
|
40
|
+
} | null>;
|
|
41
|
+
export declare function useWebchatConfig(): {
|
|
42
|
+
composerPlaceholder?: string | undefined;
|
|
43
|
+
botName?: string | undefined;
|
|
44
|
+
botAvatar?: string | undefined;
|
|
45
|
+
botDescription?: string | undefined;
|
|
46
|
+
website?: {
|
|
47
|
+
title: string;
|
|
48
|
+
link?: string | undefined;
|
|
49
|
+
} | undefined;
|
|
50
|
+
email?: {
|
|
51
|
+
title: string;
|
|
52
|
+
link?: string | undefined;
|
|
53
|
+
} | undefined;
|
|
54
|
+
phone?: {
|
|
55
|
+
title: string;
|
|
56
|
+
link?: string | undefined;
|
|
57
|
+
} | undefined;
|
|
58
|
+
privacyPolicy?: {
|
|
59
|
+
title: string;
|
|
60
|
+
link?: string | undefined;
|
|
61
|
+
} | undefined;
|
|
62
|
+
termsOfService?: {
|
|
63
|
+
title: string;
|
|
64
|
+
link?: string | undefined;
|
|
65
|
+
} | undefined;
|
|
66
|
+
color?: string | undefined;
|
|
67
|
+
variant?: "soft" | "solid" | undefined;
|
|
68
|
+
theme?: "light" | "dark" | undefined;
|
|
69
|
+
fontFamily?: "rubik" | "inter" | "ibm" | "fira" | undefined;
|
|
70
|
+
radius?: number | undefined;
|
|
15
71
|
};
|
|
16
|
-
export type ContextVaue = {
|
|
17
|
-
theme: Theme;
|
|
18
|
-
messageContainerRef: RefObject<HTMLDivElement>;
|
|
19
|
-
renderers: Renderers;
|
|
20
|
-
messages: MessageObject[];
|
|
21
|
-
setMessages: React.Dispatch<React.SetStateAction<MessageObject[]>>;
|
|
22
|
-
eventEmitter: EventEmitter<Events>;
|
|
23
|
-
configuration: Configuration;
|
|
24
|
-
setConfiguration: React.Dispatch<React.SetStateAction<Configuration>>;
|
|
25
|
-
state: {
|
|
26
|
-
connected: boolean;
|
|
27
|
-
disableComposer: boolean;
|
|
28
|
-
/**
|
|
29
|
-
* Disables interactions on buttons, inputs, etc.
|
|
30
|
-
*/
|
|
31
|
-
isReadOnly?: boolean;
|
|
32
|
-
};
|
|
33
|
-
client?: {
|
|
34
|
-
on: WebchatClient['on'];
|
|
35
|
-
sendMessage: WebchatClient['sendMessage'];
|
|
36
|
-
restartConversation: () => void;
|
|
37
|
-
} & Pick<WebchatClient, 'userId' | 'conversationId' | 'clientId' | 'sendFile'>;
|
|
38
|
-
closeWindow?: () => void;
|
|
39
|
-
setState: (state: Partial<ContextVaue['state']>) => void;
|
|
40
|
-
setTheme: (styles: Partial<Theme>) => void;
|
|
41
|
-
};
|
|
42
|
-
export declare const WebchatContext: import("react").Context<ContextVaue | null>;
|
package/dist/index.d.ts
CHANGED