@botpress/webchat 1.0.23 → 1.0.25
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/dist/client/ChatClient/index.d.ts +29 -0
- package/dist/client/ChatClient/state-machine.d.ts +39 -0
- package/dist/client/index.d.ts +1 -0
- package/dist/index.js +29630 -25978
- package/dist/index.umd.cjs +151 -151
- package/dist/main.d.ts +0 -9
- package/dist/providers/WebchatProvider.d.ts +3 -3
- package/dist/schemas/theme.d.ts +108 -8
- package/dist/twind.d.ts +16 -0
- package/dist/utils/withBaseTheme.d.ts +11 -1
- package/package.json +2 -1
package/dist/main.d.ts
CHANGED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export declare const twObject: import("@twind/core").Twind<import("@twind/core").BaseTheme & import("@twind/preset-tailwind").TailwindTheme & import("@twind/preset-container-queries").ContainerQueriesTheme & {
|
|
2
|
-
fontFamily: {
|
|
3
|
-
sans: string[];
|
|
4
|
-
rubik: string[];
|
|
5
|
-
plex: string[];
|
|
6
|
-
mono: string[];
|
|
7
|
-
};
|
|
8
|
-
extend: never;
|
|
9
|
-
}, unknown>;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { ComponentProps, ReactNode } from 'react';
|
|
2
|
+
import { type WebChatClient } from '../client';
|
|
2
3
|
import { Configuration, Renderers, WebchatContext } from '../contexts';
|
|
3
4
|
import { Theme } from '../schemas';
|
|
4
|
-
import { type WebChatClient } from '../client';
|
|
5
5
|
type Props = {
|
|
6
|
-
|
|
6
|
+
theme?: Theme;
|
|
7
7
|
renderers?: Renderers;
|
|
8
8
|
client: WebChatClient;
|
|
9
9
|
configuration: Configuration;
|
|
10
10
|
children?: ReactNode | ((configuration: Configuration) => ReactNode);
|
|
11
11
|
} & Omit<ComponentProps<typeof WebchatContext.Provider>, 'value' | 'children'>;
|
|
12
|
-
export declare const WebchatProvider: ({
|
|
12
|
+
export declare const WebchatProvider: ({ theme: initialTheme, renderers, client, children, configuration, ...props }: Props) => JSX.Element;
|
|
13
13
|
export {};
|
package/dist/schemas/theme.d.ts
CHANGED
|
@@ -465,7 +465,7 @@ export declare const BlocksSchema: z.ZodObject<{
|
|
|
465
465
|
} | undefined;
|
|
466
466
|
}>>;
|
|
467
467
|
}, "strip", z.ZodTypeAny, {
|
|
468
|
-
text: Partial<Record<"link" | "pre" | "text" | "bold" | "italic" | "heading1" | "heading2" | "heading3" | "horizontalRule" | "orderedList" | "unorderedList" | "listItem"
|
|
468
|
+
text: Partial<Record<"link" | "pre" | "text" | "bold" | "lineBreak" | "italic" | "heading1" | "heading2" | "heading3" | "horizontalRule" | "orderedList" | "unorderedList" | "listItem", {
|
|
469
469
|
className?: string | undefined;
|
|
470
470
|
style?: CSSProperties | undefined;
|
|
471
471
|
} | undefined>>;
|
|
@@ -576,7 +576,7 @@ export declare const BlocksSchema: z.ZodObject<{
|
|
|
576
576
|
} | undefined;
|
|
577
577
|
} | undefined;
|
|
578
578
|
}, {
|
|
579
|
-
text: Partial<Record<"link" | "pre" | "text" | "bold" | "italic" | "heading1" | "heading2" | "heading3" | "horizontalRule" | "orderedList" | "unorderedList" | "listItem"
|
|
579
|
+
text: Partial<Record<"link" | "pre" | "text" | "bold" | "lineBreak" | "italic" | "heading1" | "heading2" | "heading3" | "horizontalRule" | "orderedList" | "unorderedList" | "listItem", {
|
|
580
580
|
className?: string | undefined;
|
|
581
581
|
style?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
582
582
|
} | undefined>>;
|
|
@@ -799,6 +799,46 @@ export declare const ThemeSchema: z.ZodObject<{
|
|
|
799
799
|
className?: string | undefined;
|
|
800
800
|
style?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
801
801
|
}>>;
|
|
802
|
+
newConversation: z.ZodOptional<z.ZodObject<{
|
|
803
|
+
text: z.ZodOptional<z.ZodObject<{
|
|
804
|
+
className: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, string | undefined>;
|
|
805
|
+
style: z.ZodEffects<z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>, CSSProperties | undefined, z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined>;
|
|
806
|
+
}, "strip", z.ZodTypeAny, {
|
|
807
|
+
className?: string | undefined;
|
|
808
|
+
style?: CSSProperties | undefined;
|
|
809
|
+
}, {
|
|
810
|
+
className?: string | undefined;
|
|
811
|
+
style?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
812
|
+
}>>;
|
|
813
|
+
button: z.ZodOptional<z.ZodObject<{
|
|
814
|
+
className: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, string | undefined>;
|
|
815
|
+
style: z.ZodEffects<z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>, CSSProperties | undefined, z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined>;
|
|
816
|
+
}, "strip", z.ZodTypeAny, {
|
|
817
|
+
className?: string | undefined;
|
|
818
|
+
style?: CSSProperties | undefined;
|
|
819
|
+
}, {
|
|
820
|
+
className?: string | undefined;
|
|
821
|
+
style?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
822
|
+
}>>;
|
|
823
|
+
}, "strip", z.ZodTypeAny, {
|
|
824
|
+
text?: {
|
|
825
|
+
className?: string | undefined;
|
|
826
|
+
style?: CSSProperties | undefined;
|
|
827
|
+
} | undefined;
|
|
828
|
+
button?: {
|
|
829
|
+
className?: string | undefined;
|
|
830
|
+
style?: CSSProperties | undefined;
|
|
831
|
+
} | undefined;
|
|
832
|
+
}, {
|
|
833
|
+
text?: {
|
|
834
|
+
className?: string | undefined;
|
|
835
|
+
style?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
836
|
+
} | undefined;
|
|
837
|
+
button?: {
|
|
838
|
+
className?: string | undefined;
|
|
839
|
+
style?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
840
|
+
} | undefined;
|
|
841
|
+
}>>;
|
|
802
842
|
}, "strip", z.ZodTypeAny, {
|
|
803
843
|
container?: {
|
|
804
844
|
className?: string | undefined;
|
|
@@ -822,6 +862,16 @@ export declare const ThemeSchema: z.ZodObject<{
|
|
|
822
862
|
className?: string | undefined;
|
|
823
863
|
style?: CSSProperties | undefined;
|
|
824
864
|
} | undefined;
|
|
865
|
+
newConversation?: {
|
|
866
|
+
text?: {
|
|
867
|
+
className?: string | undefined;
|
|
868
|
+
style?: CSSProperties | undefined;
|
|
869
|
+
} | undefined;
|
|
870
|
+
button?: {
|
|
871
|
+
className?: string | undefined;
|
|
872
|
+
style?: CSSProperties | undefined;
|
|
873
|
+
} | undefined;
|
|
874
|
+
} | undefined;
|
|
825
875
|
}, {
|
|
826
876
|
container?: {
|
|
827
877
|
className?: string | undefined;
|
|
@@ -845,6 +895,16 @@ export declare const ThemeSchema: z.ZodObject<{
|
|
|
845
895
|
className?: string | undefined;
|
|
846
896
|
style?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
847
897
|
} | undefined;
|
|
898
|
+
newConversation?: {
|
|
899
|
+
text?: {
|
|
900
|
+
className?: string | undefined;
|
|
901
|
+
style?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
902
|
+
} | undefined;
|
|
903
|
+
button?: {
|
|
904
|
+
className?: string | undefined;
|
|
905
|
+
style?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
906
|
+
} | undefined;
|
|
907
|
+
} | undefined;
|
|
848
908
|
}>>;
|
|
849
909
|
}, "strip", z.ZodTypeAny, {
|
|
850
910
|
overlay?: {
|
|
@@ -878,6 +938,16 @@ export declare const ThemeSchema: z.ZodObject<{
|
|
|
878
938
|
className?: string | undefined;
|
|
879
939
|
style?: CSSProperties | undefined;
|
|
880
940
|
} | undefined;
|
|
941
|
+
newConversation?: {
|
|
942
|
+
text?: {
|
|
943
|
+
className?: string | undefined;
|
|
944
|
+
style?: CSSProperties | undefined;
|
|
945
|
+
} | undefined;
|
|
946
|
+
button?: {
|
|
947
|
+
className?: string | undefined;
|
|
948
|
+
style?: CSSProperties | undefined;
|
|
949
|
+
} | undefined;
|
|
950
|
+
} | undefined;
|
|
881
951
|
} | undefined;
|
|
882
952
|
}, {
|
|
883
953
|
overlay?: {
|
|
@@ -911,6 +981,16 @@ export declare const ThemeSchema: z.ZodObject<{
|
|
|
911
981
|
className?: string | undefined;
|
|
912
982
|
style?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
913
983
|
} | undefined;
|
|
984
|
+
newConversation?: {
|
|
985
|
+
text?: {
|
|
986
|
+
className?: string | undefined;
|
|
987
|
+
style?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
988
|
+
} | undefined;
|
|
989
|
+
button?: {
|
|
990
|
+
className?: string | undefined;
|
|
991
|
+
style?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
992
|
+
} | undefined;
|
|
993
|
+
} | undefined;
|
|
914
994
|
} | undefined;
|
|
915
995
|
}>>;
|
|
916
996
|
notification: z.ZodOptional<z.ZodObject<{
|
|
@@ -2228,7 +2308,7 @@ export declare const ThemeSchema: z.ZodObject<{
|
|
|
2228
2308
|
} | undefined;
|
|
2229
2309
|
}>>;
|
|
2230
2310
|
}, "strip", z.ZodTypeAny, {
|
|
2231
|
-
text: Partial<Record<"link" | "pre" | "text" | "bold" | "italic" | "heading1" | "heading2" | "heading3" | "horizontalRule" | "orderedList" | "unorderedList" | "listItem"
|
|
2311
|
+
text: Partial<Record<"link" | "pre" | "text" | "bold" | "lineBreak" | "italic" | "heading1" | "heading2" | "heading3" | "horizontalRule" | "orderedList" | "unorderedList" | "listItem", {
|
|
2232
2312
|
className?: string | undefined;
|
|
2233
2313
|
style?: CSSProperties | undefined;
|
|
2234
2314
|
} | undefined>>;
|
|
@@ -2339,7 +2419,7 @@ export declare const ThemeSchema: z.ZodObject<{
|
|
|
2339
2419
|
} | undefined;
|
|
2340
2420
|
} | undefined;
|
|
2341
2421
|
}, {
|
|
2342
|
-
text: Partial<Record<"link" | "pre" | "text" | "bold" | "italic" | "heading1" | "heading2" | "heading3" | "horizontalRule" | "orderedList" | "unorderedList" | "listItem"
|
|
2422
|
+
text: Partial<Record<"link" | "pre" | "text" | "bold" | "lineBreak" | "italic" | "heading1" | "heading2" | "heading3" | "horizontalRule" | "orderedList" | "unorderedList" | "listItem", {
|
|
2343
2423
|
className?: string | undefined;
|
|
2344
2424
|
style?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
2345
2425
|
} | undefined>>;
|
|
@@ -2470,7 +2550,7 @@ export declare const ThemeSchema: z.ZodObject<{
|
|
|
2470
2550
|
} | undefined;
|
|
2471
2551
|
} | undefined;
|
|
2472
2552
|
blocks?: {
|
|
2473
|
-
text: Partial<Record<"link" | "pre" | "text" | "bold" | "italic" | "heading1" | "heading2" | "heading3" | "horizontalRule" | "orderedList" | "unorderedList" | "listItem"
|
|
2553
|
+
text: Partial<Record<"link" | "pre" | "text" | "bold" | "lineBreak" | "italic" | "heading1" | "heading2" | "heading3" | "horizontalRule" | "orderedList" | "unorderedList" | "listItem", {
|
|
2474
2554
|
className?: string | undefined;
|
|
2475
2555
|
style?: CSSProperties | undefined;
|
|
2476
2556
|
} | undefined>>;
|
|
@@ -2601,7 +2681,7 @@ export declare const ThemeSchema: z.ZodObject<{
|
|
|
2601
2681
|
} | undefined;
|
|
2602
2682
|
} | undefined;
|
|
2603
2683
|
blocks?: {
|
|
2604
|
-
text: Partial<Record<"link" | "pre" | "text" | "bold" | "italic" | "heading1" | "heading2" | "heading3" | "horizontalRule" | "orderedList" | "unorderedList" | "listItem"
|
|
2684
|
+
text: Partial<Record<"link" | "pre" | "text" | "bold" | "lineBreak" | "italic" | "heading1" | "heading2" | "heading3" | "horizontalRule" | "orderedList" | "unorderedList" | "listItem", {
|
|
2605
2685
|
className?: string | undefined;
|
|
2606
2686
|
style?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
2607
2687
|
} | undefined>>;
|
|
@@ -2790,6 +2870,16 @@ export declare const ThemeSchema: z.ZodObject<{
|
|
|
2790
2870
|
className?: string | undefined;
|
|
2791
2871
|
style?: CSSProperties | undefined;
|
|
2792
2872
|
} | undefined;
|
|
2873
|
+
newConversation?: {
|
|
2874
|
+
text?: {
|
|
2875
|
+
className?: string | undefined;
|
|
2876
|
+
style?: CSSProperties | undefined;
|
|
2877
|
+
} | undefined;
|
|
2878
|
+
button?: {
|
|
2879
|
+
className?: string | undefined;
|
|
2880
|
+
style?: CSSProperties | undefined;
|
|
2881
|
+
} | undefined;
|
|
2882
|
+
} | undefined;
|
|
2793
2883
|
} | undefined;
|
|
2794
2884
|
} | undefined;
|
|
2795
2885
|
notification?: {
|
|
@@ -2944,7 +3034,7 @@ export declare const ThemeSchema: z.ZodObject<{
|
|
|
2944
3034
|
} | undefined;
|
|
2945
3035
|
} | undefined;
|
|
2946
3036
|
blocks?: {
|
|
2947
|
-
text: Partial<Record<"link" | "pre" | "text" | "bold" | "italic" | "heading1" | "heading2" | "heading3" | "horizontalRule" | "orderedList" | "unorderedList" | "listItem"
|
|
3037
|
+
text: Partial<Record<"link" | "pre" | "text" | "bold" | "lineBreak" | "italic" | "heading1" | "heading2" | "heading3" | "horizontalRule" | "orderedList" | "unorderedList" | "listItem", {
|
|
2948
3038
|
className?: string | undefined;
|
|
2949
3039
|
style?: CSSProperties | undefined;
|
|
2950
3040
|
} | undefined>>;
|
|
@@ -3103,6 +3193,16 @@ export declare const ThemeSchema: z.ZodObject<{
|
|
|
3103
3193
|
className?: string | undefined;
|
|
3104
3194
|
style?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
3105
3195
|
} | undefined;
|
|
3196
|
+
newConversation?: {
|
|
3197
|
+
text?: {
|
|
3198
|
+
className?: string | undefined;
|
|
3199
|
+
style?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
3200
|
+
} | undefined;
|
|
3201
|
+
button?: {
|
|
3202
|
+
className?: string | undefined;
|
|
3203
|
+
style?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
3204
|
+
} | undefined;
|
|
3205
|
+
} | undefined;
|
|
3106
3206
|
} | undefined;
|
|
3107
3207
|
} | undefined;
|
|
3108
3208
|
notification?: {
|
|
@@ -3257,7 +3357,7 @@ export declare const ThemeSchema: z.ZodObject<{
|
|
|
3257
3357
|
} | undefined;
|
|
3258
3358
|
} | undefined;
|
|
3259
3359
|
blocks?: {
|
|
3260
|
-
text: Partial<Record<"link" | "pre" | "text" | "bold" | "italic" | "heading1" | "heading2" | "heading3" | "horizontalRule" | "orderedList" | "unorderedList" | "listItem"
|
|
3360
|
+
text: Partial<Record<"link" | "pre" | "text" | "bold" | "lineBreak" | "italic" | "heading1" | "heading2" | "heading3" | "horizontalRule" | "orderedList" | "unorderedList" | "listItem", {
|
|
3261
3361
|
className?: string | undefined;
|
|
3262
3362
|
style?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
3263
3363
|
} | undefined>>;
|
package/dist/twind.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare const tw: import("@twind/core").Twind<import("@twind/core").BaseTheme & import("@twind/preset-tailwind").TailwindTheme & import("@twind/preset-container-queries").ContainerQueriesTheme & {
|
|
2
|
+
fontFamily: {
|
|
3
|
+
sans: string[];
|
|
4
|
+
rubik: string[];
|
|
5
|
+
plex: string[];
|
|
6
|
+
mono: string[];
|
|
7
|
+
};
|
|
8
|
+
extend: never;
|
|
9
|
+
}, CSSStyleSheet>;
|
|
10
|
+
export declare const tx: import("@twind/core").TxFunction;
|
|
11
|
+
export declare const injectGlobal: import("@twind/core").InjectGlobalFunction;
|
|
12
|
+
export declare const keyframes: import("@twind/core").KeyframesFunction & {
|
|
13
|
+
[label: string]: import("@twind/core").KeyframesFunction;
|
|
14
|
+
} & {
|
|
15
|
+
[label: string]: import("@twind/core").KeyframesFunction;
|
|
16
|
+
};
|
|
@@ -37,6 +37,16 @@ export declare function withBaseTheme(theme: Theme): {
|
|
|
37
37
|
className?: string | undefined;
|
|
38
38
|
style?: import("react").CSSProperties | undefined;
|
|
39
39
|
} | undefined;
|
|
40
|
+
newConversation?: {
|
|
41
|
+
text?: {
|
|
42
|
+
className?: string | undefined;
|
|
43
|
+
style?: import("react").CSSProperties | undefined;
|
|
44
|
+
} | undefined;
|
|
45
|
+
button?: {
|
|
46
|
+
className?: string | undefined;
|
|
47
|
+
style?: import("react").CSSProperties | undefined;
|
|
48
|
+
} | undefined;
|
|
49
|
+
} | undefined;
|
|
40
50
|
} | undefined;
|
|
41
51
|
} | undefined;
|
|
42
52
|
notification?: {
|
|
@@ -191,7 +201,7 @@ export declare function withBaseTheme(theme: Theme): {
|
|
|
191
201
|
} | undefined;
|
|
192
202
|
} | undefined;
|
|
193
203
|
blocks?: {
|
|
194
|
-
text: Partial<Record<"link" | "pre" | "text" | "bold" | "italic" | "heading1" | "heading2" | "heading3" | "horizontalRule" | "orderedList" | "unorderedList" | "listItem"
|
|
204
|
+
text: Partial<Record<"link" | "pre" | "text" | "bold" | "lineBreak" | "italic" | "heading1" | "heading2" | "heading3" | "horizontalRule" | "orderedList" | "unorderedList" | "listItem", {
|
|
195
205
|
className?: string | undefined;
|
|
196
206
|
style?: import("react").CSSProperties | undefined;
|
|
197
207
|
} | undefined>>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@botpress/webchat",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.25",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "./dist/index.umd.cjs",
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
"@types/color-convert": "^2.0.1",
|
|
35
35
|
"@types/lodash": "^4.14.199",
|
|
36
36
|
"@types/uuid": "^9.0.3",
|
|
37
|
+
"@botpress/chat": "^0.0.1",
|
|
37
38
|
"classnames": "^2.3.2",
|
|
38
39
|
"clsx": "^2.0.0",
|
|
39
40
|
"color-convert": "^2.0.1",
|