@botpress/webchat 3.2.6 → 3.2.7

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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @botpress/webchat@3.2.6 build /home/runner/work/genisys/genisys/packages/webchat-components
2
+ > @botpress/webchat@3.2.7 build /home/runner/work/genisys/genisys/packages/webchat-components
3
3
  > vite build
4
4
 
5
5
  vite v5.4.8 building for production...
@@ -10,12 +10,12 @@ rendering chunks...
10
10
  [vite:dts] Start generate declaration files...
11
11
  computing gzip size...
12
12
  dist/style.css  47.46 kB │ gzip: 8.72 kB
13
- dist/index.js 783.42 kB │ gzip: 218.64 kB
13
+ dist/index.js 783.77 kB │ gzip: 218.73 kB
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 19084ms.
17
+ [vite:dts] Declaration files built in 20312ms.
18
18
 
19
19
  dist/style.css  47.46 kB │ gzip: 8.72 kB
20
- dist/index.umd.cjs 526.62 kB │ gzip: 179.50 kB
21
- ✓ built in 25.16s
20
+ dist/index.umd.cjs 526.79 kB │ gzip: 179.57 kB
21
+ ✓ built in 26.59s
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({ children, title, description, confirmButton, onConfirm, cancelButton, hideModal, }: {
416
- title: string;
417
- description: string;
418
- confirmButton: string;
419
- onConfirm: () => void;
420
- cancelButton: string;
421
- hideModal: () => void;
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
- open?: boolean;
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 }: {