@botpress/webchat 2.1.10 → 2.2.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 +10 -14
- package/dist/client/types.d.ts +4 -0
- package/dist/components/Composer/Composer.d.ts +2 -0
- package/dist/components/Composer/index.d.ts +1 -0
- package/dist/components/Container/Container.d.ts +4 -0
- package/dist/components/Container/index.d.ts +1 -0
- package/dist/components/Fab/index.d.ts +1 -0
- package/dist/components/Header/Header.d.ts +8 -0
- package/dist/components/Header/index.d.ts +1 -0
- package/dist/components/Marquee/Marquee.d.ts +1 -0
- package/dist/components/Marquee/index.d.ts +1 -0
- package/dist/components/Message/Message.d.ts +6 -0
- package/dist/components/Message/index.d.ts +1 -0
- package/dist/components/{MessageList.d.ts → MessageList/MessageList.d.ts} +1 -1
- package/dist/components/MessageList/index.d.ts +1 -0
- package/dist/components/Modal/index.d.ts +1 -0
- package/dist/components/TypingIndicator/TypingIndicator.d.ts +2 -0
- package/dist/components/TypingIndicator/index.d.ts +1 -0
- package/dist/components/Webchat.d.ts +5 -1
- package/dist/components/index.d.ts +2 -2
- package/dist/components/renderers/Audio/Audio.d.ts +3 -0
- package/dist/components/renderers/Audio/index.d.ts +1 -0
- package/dist/components/renderers/{Bubble.d.ts → Bubble/Bubble.d.ts} +1 -1
- package/dist/components/renderers/Bubble/index.d.ts +1 -0
- package/dist/components/renderers/{Button.d.ts → Button/Button.d.ts} +1 -1
- package/dist/components/renderers/Button/index.d.ts +1 -0
- package/dist/components/renderers/Carousel/Carousel.d.ts +3 -0
- package/dist/components/renderers/Carousel/index.d.ts +1 -0
- package/dist/components/renderers/{Column.d.ts → Column/Column.d.ts} +1 -1
- package/dist/components/renderers/Column/index.d.ts +1 -0
- package/dist/components/renderers/{Dropdown.d.ts → Dropdown/Dropdown.d.ts} +1 -1
- package/dist/components/renderers/Dropdown/index.d.ts +1 -0
- package/dist/components/renderers/File/File.d.ts +3 -0
- package/dist/components/renderers/File/index.d.ts +1 -0
- package/dist/components/renderers/Image/Image.d.ts +3 -0
- package/dist/components/renderers/Image/index.d.ts +1 -0
- package/dist/components/renderers/Location/Location.d.ts +3 -0
- package/dist/components/renderers/Location/index.d.ts +1 -0
- package/dist/components/renderers/{Row.d.ts → Row/Row.d.ts} +1 -1
- package/dist/components/renderers/Row/index.d.ts +1 -0
- package/dist/components/renderers/{Text.d.ts → Text/Text.d.ts} +1 -1
- package/dist/components/renderers/Text/index.d.ts +1 -0
- package/dist/components/renderers/Video/Video.d.ts +3 -0
- package/dist/components/renderers/Video/index.d.ts +1 -0
- package/dist/contexts/index.d.ts +0 -1
- package/dist/gen/signals/index.d.ts +36 -0
- package/dist/gen/signals/typingStarted.j.d.ts +3 -0
- package/dist/gen/signals/typingStarted.t.d.ts +6 -0
- package/dist/gen/signals/typingStarted.z.d.ts +22 -0
- package/dist/gen/signals/typingStopped.j.d.ts +3 -0
- package/dist/gen/signals/typingStopped.t.d.ts +4 -0
- package/dist/gen/signals/typingStopped.z.d.ts +12 -0
- package/dist/index.js +42395 -41
- package/dist/index.umd.cjs +166 -243
- package/dist/stores/webchatStore.d.ts +4 -4
- package/dist/style.css +1 -0
- package/dist/styles/classes.d.ts +339 -0
- package/package.json +4 -1
- package/tailwind.config.js +0 -0
- package/dist/components/Composer.d.ts +0 -18
- package/dist/components/Container.d.ts +0 -2
- package/dist/components/Header.d.ts +0 -37
- package/dist/components/LoadingIndicator.d.ts +0 -2
- package/dist/components/Message.d.ts +0 -7
- package/dist/components/renderers/Audio.d.ts +0 -3
- package/dist/components/renderers/Carousel.d.ts +0 -3
- package/dist/components/renderers/File.d.ts +0 -3
- package/dist/components/renderers/Image.d.ts +0 -3
- package/dist/components/renderers/Location.d.ts +0 -3
- package/dist/components/renderers/Video.d.ts +0 -3
- package/dist/contexts/ComposerContext.d.ts +0 -11
- package/dist/index-4df6b320.js +0 -44762
- package/dist/index-5a1dccbb.js +0 -3240
- /package/dist/components/{Fab.d.ts → Fab/Fab.d.ts} +0 -0
- /package/dist/components/{Modal.d.ts → Modal/Modal.d.ts} +0 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,25 +1,21 @@
|
|
|
1
1
|
|
|
2
|
-
> @botpress/webchat@2.
|
|
2
|
+
> @botpress/webchat@2.2.0 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
|
-
[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.
|
|
8
|
-
[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.
|
|
7
|
+
[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
|
+
[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
9
|
[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
|
-
[
|
|
11
|
-
[1m[33m[plugin:vite:resolve][39m[22m [33mModule "path" has been externalized for browser compatibility, imported by "/home/runner/work/echo/echo/node_modules/.pnpm/@apidevtools+json-schema-ref-parser@11.6.1/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/convert-path-to-posix.js". See http://vitejs.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.[39m
|
|
12
|
-
[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/@jsdevtools+ono@7.1.3/node_modules/@jsdevtools/ono/esm/types.js". See http://vitejs.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.[39m
|
|
13
|
-
../../node_modules/.pnpm/@jsdevtools+ono@7.1.3/node_modules/@jsdevtools/ono/esm/types.js (1:9) "inspect" is not exported by "__vite-browser-external", imported by "../../node_modules/.pnpm/@jsdevtools+ono@7.1.3/node_modules/@jsdevtools/ono/esm/types.js".
|
|
14
|
-
[32m✓[39m 2442 modules transformed.
|
|
10
|
+
[32m✓[39m 2779 modules transformed.
|
|
15
11
|
rendering chunks...
|
|
16
12
|
[32m
|
|
17
13
|
[36m[vite:dts][32m Start generate declaration files...[39m
|
|
18
14
|
computing gzip size...
|
|
19
|
-
[
|
|
15
|
+
[2mdist/[22m[35mstyle.css [39m[1m[2m 25.49 kB[22m[1m[22m[2m │ gzip: 5.21 kB[22m
|
|
16
|
+
[2mdist/[22m[36mindex.js [39m[1m[33m1,401.63 kB[39m[22m[2m │ gzip: 352.59 kB[22m
|
|
17
|
+
[32m[36m[vite:dts][32m Declaration files built in 14199ms.
|
|
20
18
|
[39m
|
|
21
|
-
[2mdist/[22m[
|
|
22
|
-
[2mdist/[22m[36mindex
|
|
23
|
-
[
|
|
24
|
-
[2mdist/[22m[36mindex.umd.cjs [39m[1m[33m1,089.00 kB[39m[22m[2m │ gzip: 329.74 kB[22m
|
|
25
|
-
[32m✓ built in 26.66s[39m
|
|
19
|
+
[2mdist/[22m[35mstyle.css [39m[1m[2m 25.49 kB[22m[1m[22m[2m │ gzip: 5.21 kB[22m
|
|
20
|
+
[2mdist/[22m[36mindex.umd.cjs [39m[1m[33m979.10 kB[39m[22m[2m │ gzip: 296.21 kB[22m
|
|
21
|
+
[32m✓ built in 23.63s[39m
|
package/dist/client/types.d.ts
CHANGED
|
@@ -24,6 +24,10 @@ export type WebchatEvents = {
|
|
|
24
24
|
webchatVisibility: 'show' | 'hide' | 'toggle';
|
|
25
25
|
webchatConfig: Record<string, any>;
|
|
26
26
|
customEvent: Record<string, any>;
|
|
27
|
+
isTyping: {
|
|
28
|
+
isTyping: boolean;
|
|
29
|
+
timeout: number;
|
|
30
|
+
};
|
|
27
31
|
};
|
|
28
32
|
type ValueOf<T> = T[keyof T];
|
|
29
33
|
type AnyEvent = ValueOf<{
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const Composer: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Composer';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const Container: import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
|
|
3
|
+
themeOverrides: Record<`--${string}`, string>;
|
|
4
|
+
}, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Container';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Fab';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
type HeaderProps = {
|
|
2
|
+
defaultOpen?: boolean;
|
|
3
|
+
open?: boolean;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
onOpenChange?(open: boolean): void;
|
|
6
|
+
};
|
|
7
|
+
export declare const Header: ({ defaultOpen, disabled, onOpenChange, ...props }: HeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Header';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function Marquee(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Marquee';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import type { MessageObject } from '../../types';
|
|
3
|
+
export declare const Message: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<{
|
|
4
|
+
scroll: () => void;
|
|
5
|
+
children?: ReactNode;
|
|
6
|
+
} & Partial<MessageObject> & import("react").RefAttributes<HTMLDivElement>>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Message';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './MessageList';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Modal';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './TypingIndicator';
|
|
@@ -3,8 +3,8 @@ export * from './Block';
|
|
|
3
3
|
export * from './Composer';
|
|
4
4
|
export * from './Container';
|
|
5
5
|
export * from './Fab';
|
|
6
|
-
export * from './Header';
|
|
7
|
-
export * from './
|
|
6
|
+
export * from './Header/Header';
|
|
7
|
+
export * from './TypingIndicator';
|
|
8
8
|
export * from './Message';
|
|
9
9
|
export * from './MessageList';
|
|
10
10
|
export * from './Modal';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Audio';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentProps } from 'react';
|
|
2
|
-
import { BubbleBlock, CommonBlockProps } from '
|
|
2
|
+
import { BubbleBlock, CommonBlockProps } from '../../../types';
|
|
3
3
|
type Props = CommonBlockProps & BubbleBlock & ComponentProps<'div'>;
|
|
4
4
|
export declare const Bubble: import("react").ForwardRefExoticComponent<Omit<Props, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
5
5
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Bubble';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ButtonBlock, CommonBlockProps } from '
|
|
1
|
+
import { ButtonBlock, CommonBlockProps } from '../../../types';
|
|
2
2
|
type Props = CommonBlockProps & ButtonBlock;
|
|
3
3
|
export declare const Button: ({ text, buttonValue, type, styles, variant, groupId, reusable, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Button';
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { CommonBlockProps } from '../../../types';
|
|
3
|
+
export declare const Carousel: import("react").ForwardRefExoticComponent<CommonBlockProps & import("../../../adapters/target").CarouselMessage & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Carousel';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentProps } from 'react';
|
|
2
|
-
import { ColumnBlock, CommonBlockProps } from '
|
|
2
|
+
import { ColumnBlock, CommonBlockProps } from '../../../types';
|
|
3
3
|
type Props = CommonBlockProps & ColumnBlock & ComponentProps<'div'>;
|
|
4
4
|
export declare const Column: import("react").ForwardRefExoticComponent<Omit<Props, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
5
5
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Column';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CommonBlockProps, DropdownBlock } from '
|
|
1
|
+
import { CommonBlockProps, DropdownBlock } from '../../../types';
|
|
2
2
|
import { ComponentProps } from 'react';
|
|
3
3
|
type Props = CommonBlockProps & DropdownBlock & ComponentProps<'div'>;
|
|
4
4
|
export declare const Dropdown: ({ styles, type, options, label, reusable }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Dropdown';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './File';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Image';
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { CommonBlockProps } from '../../../types';
|
|
3
|
+
export declare const Location: import("react").ForwardRefExoticComponent<CommonBlockProps & import("../../../adapters/target").LocationMessage & import("react").RefAttributes<HTMLAnchorElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Location';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentProps } from 'react';
|
|
2
|
-
import { RowBlock, CommonBlockProps } from '
|
|
2
|
+
import { RowBlock, CommonBlockProps } from '../../../types';
|
|
3
3
|
type Props = CommonBlockProps & RowBlock & ComponentProps<'div'>;
|
|
4
4
|
export declare const Row: import("react").ForwardRefExoticComponent<Omit<Props, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
5
5
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Row';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CommonBlockProps, TextBlock } from '
|
|
1
|
+
import { CommonBlockProps, TextBlock } from '../../../types';
|
|
2
2
|
type Props = CommonBlockProps & TextBlock;
|
|
3
3
|
export declare const Text: ({ text, type, styles }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Text';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Video';
|
package/dist/contexts/index.d.ts
CHANGED
|
@@ -2,11 +2,15 @@ import type { MessageCreated } from './messageCreated.t';
|
|
|
2
2
|
import type { WebchatVisibility } from './webchatVisibility.t';
|
|
3
3
|
import type { WebchatConfig } from './webchatConfig.t';
|
|
4
4
|
import type { Custom } from './custom.t';
|
|
5
|
+
import type { TypingStarted } from './typingStarted.t';
|
|
6
|
+
import type { TypingStopped } from './typingStopped.t';
|
|
5
7
|
export declare const json: {
|
|
6
8
|
messageCreated: import("json-schema").JSONSchema7;
|
|
7
9
|
webchatVisibility: import("json-schema").JSONSchema7;
|
|
8
10
|
webchatConfig: import("json-schema").JSONSchema7;
|
|
9
11
|
custom: import("json-schema").JSONSchema7;
|
|
12
|
+
typingStarted: import("json-schema").JSONSchema7;
|
|
13
|
+
typingStopped: import("json-schema").JSONSchema7;
|
|
10
14
|
};
|
|
11
15
|
export declare const zod: {
|
|
12
16
|
messageCreated: import("zod").ZodObject<{
|
|
@@ -675,10 +679,42 @@ export declare const zod: {
|
|
|
675
679
|
event: Record<string, any>;
|
|
676
680
|
};
|
|
677
681
|
}>;
|
|
682
|
+
typingStarted: import("zod").ZodObject<{
|
|
683
|
+
type: import("zod").ZodLiteral<"typing_started">;
|
|
684
|
+
data: import("zod").ZodObject<{
|
|
685
|
+
timeout: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
686
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
687
|
+
timeout?: number | undefined;
|
|
688
|
+
}, {
|
|
689
|
+
timeout?: number | undefined;
|
|
690
|
+
}>;
|
|
691
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
692
|
+
type: "typing_started";
|
|
693
|
+
data: {
|
|
694
|
+
timeout?: number | undefined;
|
|
695
|
+
};
|
|
696
|
+
}, {
|
|
697
|
+
type: "typing_started";
|
|
698
|
+
data: {
|
|
699
|
+
timeout?: number | undefined;
|
|
700
|
+
};
|
|
701
|
+
}>;
|
|
702
|
+
typingStopped: import("zod").ZodObject<{
|
|
703
|
+
type: import("zod").ZodLiteral<"typing_stopped">;
|
|
704
|
+
data: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodNever>;
|
|
705
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
706
|
+
type: "typing_stopped";
|
|
707
|
+
data: Record<string, never>;
|
|
708
|
+
}, {
|
|
709
|
+
type: "typing_stopped";
|
|
710
|
+
data: Record<string, never>;
|
|
711
|
+
}>;
|
|
678
712
|
};
|
|
679
713
|
export type Types = {
|
|
680
714
|
messageCreated: MessageCreated;
|
|
681
715
|
webchatVisibility: WebchatVisibility;
|
|
682
716
|
webchatConfig: WebchatConfig;
|
|
683
717
|
custom: Custom;
|
|
718
|
+
typingStarted: TypingStarted;
|
|
719
|
+
typingStopped: TypingStopped;
|
|
684
720
|
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
declare const _default: z.ZodObject<{
|
|
3
|
+
type: z.ZodLiteral<"typing_started">;
|
|
4
|
+
data: z.ZodObject<{
|
|
5
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
6
|
+
}, "strip", z.ZodTypeAny, {
|
|
7
|
+
timeout?: number | undefined;
|
|
8
|
+
}, {
|
|
9
|
+
timeout?: number | undefined;
|
|
10
|
+
}>;
|
|
11
|
+
}, "strip", z.ZodTypeAny, {
|
|
12
|
+
type: "typing_started";
|
|
13
|
+
data: {
|
|
14
|
+
timeout?: number | undefined;
|
|
15
|
+
};
|
|
16
|
+
}, {
|
|
17
|
+
type: "typing_started";
|
|
18
|
+
data: {
|
|
19
|
+
timeout?: number | undefined;
|
|
20
|
+
};
|
|
21
|
+
}>;
|
|
22
|
+
export default _default;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
declare const _default: z.ZodObject<{
|
|
3
|
+
type: z.ZodLiteral<"typing_stopped">;
|
|
4
|
+
data: z.ZodRecord<z.ZodString, z.ZodNever>;
|
|
5
|
+
}, "strip", z.ZodTypeAny, {
|
|
6
|
+
type: "typing_stopped";
|
|
7
|
+
data: Record<string, never>;
|
|
8
|
+
}, {
|
|
9
|
+
type: "typing_stopped";
|
|
10
|
+
data: Record<string, never>;
|
|
11
|
+
}>;
|
|
12
|
+
export default _default;
|