@botpress/webchat 2.4.0 → 2.5.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 +9 -9
- package/dist/adapters/webchat.d.ts +1 -0
- package/dist/components/Composer/Composer.d.ts +2 -2
- package/dist/components/Composer/parts/FileAttachment.d.ts +11 -0
- package/dist/components/Composer/parts/FileInputButton.d.ts +7 -0
- package/dist/components/Composer/parts/SpeechRecognition.d.ts +6 -0
- package/dist/components/Composer/parts/TextInput.d.ts +13 -0
- package/dist/components/Composer/parts/index.d.ts +4 -0
- package/dist/components/Container/Container.d.ts +8 -1
- package/dist/gen/signals/index.d.ts +4 -4
- package/dist/gen/signals/webchatVisibility.z.d.ts +4 -4
- package/dist/index.js +16354 -14676
- package/dist/index.umd.cjs +83 -254
- package/dist/stores/composerFileStore.d.ts +21 -0
- package/dist/stores/index.d.ts +1 -0
- package/dist/stores/messagesStore.d.ts +2 -1
- package/dist/stores/webchatStore.d.ts +2 -1
- package/dist/stories/Messages/FileAttachmentCard.stories.d.ts +6 -0
- package/dist/style.css +1 -1
- package/dist/styles/classes.d.ts +50 -0
- package/dist/utils/index.d.ts +1 -0
- package/package.json +3 -3
- package/dist/services/clipboard.d.ts +0 -1
- package/dist/services/index.d.ts +0 -3
- package/dist/services/toast.d.ts +0 -17
- /package/dist/{services → utils}/images.d.ts +0 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
|
|
2
|
-
> @botpress/webchat@2.
|
|
2
|
+
> @botpress/webchat@2.5.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
|
-
[1m[33m[plugin:vite:resolve][39m[22m [33m[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.
|
|
8
|
-
[32m✓[39m
|
|
7
|
+
[1m[33m[plugin:vite:resolve][39m[22m [33m[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.5/node_modules/@bpinternal/webchat-http-client/dist/index.mjs". See https://vitejs.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.[39m
|
|
8
|
+
[32m✓[39m 2973 modules transformed.
|
|
9
9
|
rendering chunks...
|
|
10
10
|
|
|
11
11
|
[vite:dts] Start generate declaration files...
|
|
12
12
|
computing gzip size...
|
|
13
|
-
[2mdist/[22m[35mstyle.css [39m[1m[2m
|
|
14
|
-
[2mdist/[22m[36mindex.js [39m[1m[33m1,
|
|
15
|
-
[vite:dts] Declaration files built in
|
|
13
|
+
[2mdist/[22m[35mstyle.css [39m[1m[2m 35.95 kB[22m[1m[22m[2m │ gzip: 6.85 kB[22m
|
|
14
|
+
[2mdist/[22m[36mindex.js [39m[1m[33m1,091.73 kB[39m[22m[2m │ gzip: 282.03 kB[22m
|
|
15
|
+
[vite:dts] Declaration files built in 10684ms.
|
|
16
16
|
|
|
17
|
-
[2mdist/[22m[35mstyle.css [39m[1m[2m
|
|
18
|
-
[2mdist/[22m[36mindex.umd.cjs [39m[1m[
|
|
19
|
-
[32m✓ built in
|
|
17
|
+
[2mdist/[22m[35mstyle.css [39m[1m[2m 35.95 kB[22m[1m[22m[2m │ gzip: 6.85 kB[22m
|
|
18
|
+
[2mdist/[22m[36mindex.umd.cjs [39m[1m[33m744.85 kB[39m[22m[2m │ gzip: 233.89 kB[22m
|
|
19
|
+
[32m✓ built in 18.84s[39m
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ComponentProps,
|
|
2
|
-
import type { Configuration, FileType } from '../../types';
|
|
1
|
+
import { ComponentProps, Ref } from 'react';
|
|
3
2
|
import type { Message } from '../../adapters/webchat';
|
|
3
|
+
import type { Configuration, FileType } from '../../types';
|
|
4
4
|
type Props = ComponentProps<'div'> & {
|
|
5
5
|
inputRef?: Ref<HTMLTextAreaElement>;
|
|
6
6
|
disableComposer?: boolean;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type FC } from 'react';
|
|
2
|
+
import type { FileType } from '../../../types';
|
|
3
|
+
type FileAttachmentProps = {
|
|
4
|
+
name: string;
|
|
5
|
+
type: FileType;
|
|
6
|
+
instance: File;
|
|
7
|
+
status: string;
|
|
8
|
+
removeFile: (name: string) => void;
|
|
9
|
+
};
|
|
10
|
+
export declare const FileAttachment: FC<FileAttachmentProps>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
type SpeechRecognitionProps = {
|
|
2
|
+
textInput: string;
|
|
3
|
+
setTextInput: (value: string) => void;
|
|
4
|
+
};
|
|
5
|
+
export declare const SpeechRecognition: ({ textInput: value, setTextInput: setValue }: SpeechRecognitionProps) => import("react/jsx-runtime").JSX.Element | undefined;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Ref } from 'react';
|
|
2
|
+
type TextInputProps = {
|
|
3
|
+
inputRef?: Ref<HTMLTextAreaElement>;
|
|
4
|
+
composerPlaceholder: string | undefined;
|
|
5
|
+
composerDisabled: boolean;
|
|
6
|
+
textInput: string;
|
|
7
|
+
historyIndex: number;
|
|
8
|
+
setTextInput: (value: string) => void;
|
|
9
|
+
setHistoryIndex: (index: number) => void;
|
|
10
|
+
sendComposerMessage: () => void;
|
|
11
|
+
};
|
|
12
|
+
export declare const TextInput: ({ inputRef, composerPlaceholder, composerDisabled, textInput, historyIndex, setTextInput, setHistoryIndex, sendComposerMessage, }: TextInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import { ComponentProps } from 'react';
|
|
2
|
+
import { FileType } from '../../types';
|
|
2
3
|
type Props = ComponentProps<'div'> & {
|
|
3
4
|
connected?: boolean;
|
|
5
|
+
uploadFile?: (file: File) => Promise<{
|
|
6
|
+
fileUrl: string;
|
|
7
|
+
name: string;
|
|
8
|
+
type: FileType;
|
|
9
|
+
}>;
|
|
10
|
+
allowFileUpload?: boolean;
|
|
4
11
|
};
|
|
5
12
|
export declare const Container: {
|
|
6
|
-
({ children, className, connected, ...props }: Props): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
({ children, className, connected, uploadFile, allowFileUpload, ...props }: Props): import("react/jsx-runtime").JSX.Element;
|
|
7
14
|
displayName: string;
|
|
8
15
|
};
|
|
9
16
|
export {};
|
|
@@ -939,19 +939,19 @@ export declare const zod: {
|
|
|
939
939
|
data: import("zod").ZodObject<{
|
|
940
940
|
visibility: import("zod").ZodUnion<[import("zod").ZodLiteral<"show">, import("zod").ZodLiteral<"hide">, import("zod").ZodLiteral<"toggle">]>;
|
|
941
941
|
}, "strip", import("zod").ZodTypeAny, {
|
|
942
|
-
visibility: "
|
|
942
|
+
visibility: "toggle" | "show" | "hide";
|
|
943
943
|
}, {
|
|
944
|
-
visibility: "
|
|
944
|
+
visibility: "toggle" | "show" | "hide";
|
|
945
945
|
}>;
|
|
946
946
|
}, "strip", import("zod").ZodTypeAny, {
|
|
947
947
|
type: "webchat_visibility";
|
|
948
948
|
data: {
|
|
949
|
-
visibility: "
|
|
949
|
+
visibility: "toggle" | "show" | "hide";
|
|
950
950
|
};
|
|
951
951
|
}, {
|
|
952
952
|
type: "webchat_visibility";
|
|
953
953
|
data: {
|
|
954
|
-
visibility: "
|
|
954
|
+
visibility: "toggle" | "show" | "hide";
|
|
955
955
|
};
|
|
956
956
|
}>;
|
|
957
957
|
webchatConfig: import("zod").ZodObject<{
|
|
@@ -4,19 +4,19 @@ declare const _default: z.ZodObject<{
|
|
|
4
4
|
data: z.ZodObject<{
|
|
5
5
|
visibility: z.ZodUnion<[z.ZodLiteral<"show">, z.ZodLiteral<"hide">, z.ZodLiteral<"toggle">]>;
|
|
6
6
|
}, "strip", z.ZodTypeAny, {
|
|
7
|
-
visibility: "
|
|
7
|
+
visibility: "toggle" | "show" | "hide";
|
|
8
8
|
}, {
|
|
9
|
-
visibility: "
|
|
9
|
+
visibility: "toggle" | "show" | "hide";
|
|
10
10
|
}>;
|
|
11
11
|
}, "strip", z.ZodTypeAny, {
|
|
12
12
|
type: "webchat_visibility";
|
|
13
13
|
data: {
|
|
14
|
-
visibility: "
|
|
14
|
+
visibility: "toggle" | "show" | "hide";
|
|
15
15
|
};
|
|
16
16
|
}, {
|
|
17
17
|
type: "webchat_visibility";
|
|
18
18
|
data: {
|
|
19
|
-
visibility: "
|
|
19
|
+
visibility: "toggle" | "show" | "hide";
|
|
20
20
|
};
|
|
21
21
|
}>;
|
|
22
22
|
export default _default;
|