@botpress/webchat 3.2.6 → 3.2.8
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/.storybook/preview.tsx +2 -13
- package/.turbo/turbo-build.log +7 -7
- package/dist/index.d.ts +22 -23
- package/dist/index.js +3230 -3238
- package/dist/index.umd.cjs +81 -81
- package/dist/style.css +1 -1
- package/package.json +4 -3
package/.storybook/preview.tsx
CHANGED
|
@@ -35,7 +35,6 @@ const colorMap = {
|
|
|
35
35
|
const preview: Preview = {
|
|
36
36
|
initialGlobals: {
|
|
37
37
|
themeMode: 'light',
|
|
38
|
-
fontFamily: 'inter',
|
|
39
38
|
radius: 'md',
|
|
40
39
|
variant: 'solid',
|
|
41
40
|
color: 'blue',
|
|
@@ -49,14 +48,6 @@ const preview: Preview = {
|
|
|
49
48
|
items: ['light', 'dark'],
|
|
50
49
|
},
|
|
51
50
|
},
|
|
52
|
-
fontFamily: {
|
|
53
|
-
toolbar: {
|
|
54
|
-
title: 'Font Family',
|
|
55
|
-
dynamicTitle: true,
|
|
56
|
-
icon: 'edit',
|
|
57
|
-
items: ['rubik', 'inter', 'ibm', 'fira'],
|
|
58
|
-
},
|
|
59
|
-
},
|
|
60
51
|
radius: {
|
|
61
52
|
toolbar: {
|
|
62
53
|
title: 'Radius',
|
|
@@ -92,16 +83,14 @@ const preview: Preview = {
|
|
|
92
83
|
},
|
|
93
84
|
decorators: [
|
|
94
85
|
(Story, context) => {
|
|
95
|
-
const { themeMode, variant, radius,
|
|
86
|
+
const { themeMode, variant, radius, color } = context.globals
|
|
96
87
|
return (
|
|
97
88
|
// TODO: These css hacks should not be required
|
|
98
89
|
<Container
|
|
99
90
|
className="bpReset bpContainer"
|
|
100
91
|
style={{ width: '400px', border: 'none', backgroundColor: 'transparent' }}
|
|
101
92
|
>
|
|
102
|
-
<StylesheetProvider
|
|
103
|
-
{...{ themeMode, variant, fontFamily, radius: radiusMap[radius], color: colorMap[color] }}
|
|
104
|
-
/>
|
|
93
|
+
<StylesheetProvider {...{ themeMode, variant, radius: radiusMap[radius], color: colorMap[color] }} />
|
|
105
94
|
<Story />
|
|
106
95
|
</Container>
|
|
107
96
|
)
|
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @botpress/webchat@3.2.
|
|
2
|
+
> @botpress/webchat@3.2.8 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
|
|
@@ -9,13 +9,13 @@ rendering chunks...
|
|
|
9
9
|
|
|
10
10
|
[vite:dts] Start generate declaration files...
|
|
11
11
|
computing gzip size...
|
|
12
|
-
[2mdist/[22m[35mstyle.css [39m[1m[2m
|
|
13
|
-
[2mdist/[22m[36mindex.js [39m[1m[
|
|
12
|
+
[2mdist/[22m[35mstyle.css [39m[1m[2m 46.91 kB[22m[1m[22m[2m │ gzip: 8.48 kB[22m
|
|
13
|
+
[2mdist/[22m[36mindex.js [39m[1m[33m782.76 kB[39m[22m[2m │ gzip: 218.39 kB[22m
|
|
14
14
|
[vite:dts] Start rollup declaration files...
|
|
15
15
|
Analysis will use the bundled TypeScript version 5.4.2
|
|
16
16
|
*** The target project appears to use TypeScript 5.6.2 which is newer than the bundled compiler engine; consider upgrading API Extractor.
|
|
17
|
-
[vite:dts] Declaration files built in
|
|
17
|
+
[vite:dts] Declaration files built in 19187ms.
|
|
18
18
|
|
|
19
|
-
[2mdist/[22m[35mstyle.css [39m[1m[2m
|
|
20
|
-
[2mdist/[22m[36mindex.umd.cjs [39m[1m[
|
|
21
|
-
[32m✓ built in 25.
|
|
19
|
+
[2mdist/[22m[35mstyle.css [39m[1m[2m 46.91 kB[22m[1m[22m[2m │ gzip: 8.48 kB[22m
|
|
20
|
+
[2mdist/[22m[36mindex.umd.cjs [39m[1m[33m525.97 kB[39m[22m[2m │ gzip: 179.27 kB[22m
|
|
21
|
+
[32m✓ built in 25.42s[39m
|
package/dist/index.d.ts
CHANGED
|
@@ -311,6 +311,20 @@ export declare type ImageBlock = {
|
|
|
311
311
|
url: string;
|
|
312
312
|
};
|
|
313
313
|
|
|
314
|
+
export declare type InputModalProps<T> = {
|
|
315
|
+
title?: string;
|
|
316
|
+
description?: string;
|
|
317
|
+
confirmButtonText: string;
|
|
318
|
+
cancelButtonText: string;
|
|
319
|
+
onConfirm?: () => void;
|
|
320
|
+
onCancel?: () => void;
|
|
321
|
+
initialValue?: T;
|
|
322
|
+
Content?: ({ setValue }: {
|
|
323
|
+
value: T | undefined;
|
|
324
|
+
setValue: (value: T) => void;
|
|
325
|
+
}) => ReactNode;
|
|
326
|
+
};
|
|
327
|
+
|
|
314
328
|
export declare type IntegrationMessage = Message_2;
|
|
315
329
|
|
|
316
330
|
export declare type IntegrationMessagePayloadByType = ByType<IntegrationMessage['payload']>;
|
|
@@ -412,34 +426,20 @@ export declare namespace Modal {
|
|
|
412
426
|
var Content: typeof ModalContent;
|
|
413
427
|
}
|
|
414
428
|
|
|
415
|
-
declare function ModalContent({
|
|
416
|
-
title
|
|
417
|
-
description
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
429
|
+
declare function ModalContent({ title, description, onConfirm, onCancel, confirmButtonText, cancelButtonText, children, }: {
|
|
430
|
+
title?: string;
|
|
431
|
+
description?: string;
|
|
432
|
+
onConfirm?: () => void;
|
|
433
|
+
onCancel?: () => void;
|
|
434
|
+
confirmButtonText?: string;
|
|
435
|
+
cancelButtonText?: string;
|
|
422
436
|
children: ReactNode;
|
|
423
437
|
}): JSX_3.Element;
|
|
424
438
|
|
|
425
439
|
export declare const ModalContext: Context<ModalContextValue>;
|
|
426
440
|
|
|
427
441
|
declare type ModalContextValue = {
|
|
428
|
-
|
|
429
|
-
showModal?: (props: {
|
|
430
|
-
title: string;
|
|
431
|
-
description: string;
|
|
432
|
-
confirmButton: string;
|
|
433
|
-
onConfirm: () => void;
|
|
434
|
-
cancelButton: string;
|
|
435
|
-
content?: ReactNode;
|
|
436
|
-
}) => void;
|
|
437
|
-
hideModal?: () => void;
|
|
438
|
-
};
|
|
439
|
-
|
|
440
|
-
export declare type ModalProps = {
|
|
441
|
-
title: string | null;
|
|
442
|
-
content: ReactNode | null;
|
|
442
|
+
showInputModal?: <T>(props: InputModalProps<T>) => Promise<T | undefined>;
|
|
443
443
|
};
|
|
444
444
|
|
|
445
445
|
export declare const ModalProvider: ({ children }: {
|
|
@@ -601,7 +601,6 @@ export declare type StyleOptions = {
|
|
|
601
601
|
|
|
602
602
|
/**
|
|
603
603
|
* StylesheetProvider component that manages theme styles and font loading
|
|
604
|
-
* Handles both default fonts and custom Google Fonts
|
|
605
604
|
*/
|
|
606
605
|
export declare const StylesheetProvider: ({ color, fontFamily, radius, themeMode, variant, headerVariant, additionalStylesheetUrl, }: Props_7) => JSX_3.Element;
|
|
607
606
|
|