@botpress/webchat 3.2.0 → 3.2.2

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.0 build /home/runner/work/genisys/genisys/packages/webchat-components
2
+ > @botpress/webchat@3.2.2 build /home/runner/work/genisys/genisys/packages/webchat-components
3
3
  > vite build
4
4
 
5
5
  vite v5.4.8 building for production...
@@ -9,13 +9,13 @@ rendering chunks...
9
9
 
10
10
  [vite:dts] Start generate declaration files...
11
11
  computing gzip size...
12
- dist/style.css  47.29 kB │ gzip: 8.69 kB
13
- dist/index.js 771.34 kB │ gzip: 212.14 kB
12
+ dist/style.css  47.36 kB │ gzip: 8.71 kB
13
+ dist/index.js 772.87 kB │ gzip: 212.53 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 21868ms.
17
+ [vite:dts] Declaration files built in 23216ms.
18
18
 
19
- dist/style.css  47.29 kB │ gzip: 8.69 kB
20
- dist/index.umd.cjs 516.29 kB │ gzip: 173.38 kB
21
- ✓ built in 29.78s
19
+ dist/style.css  47.36 kB │ gzip: 8.71 kB
20
+ dist/index.umd.cjs 517.24 kB │ gzip: 173.70 kB
21
+ ✓ built in 31.52s
package/dist/index.d.ts CHANGED
@@ -128,7 +128,7 @@ export declare type CarouselBlock = {
128
128
  blocks: GenericBlock[];
129
129
  };
130
130
 
131
- export declare const Chat: ({ connected, configuration, isTyping, messages, user, isLoading, renderers, isReadOnly, disableComposer, allowFileUpload, error, participants, closeWindow, sendMessage, uploadFile, addMessageFeedback, restartConversation, ...props }: Props) => JSX_3.Element;
131
+ export declare const Chat: ({ connected, configuration, isTyping, messages, user, isLoading, renderers, isReadOnly, disableComposer, allowFileUpload, error, participants, closeWindow, sendMessage, uploadFile, addMessageFeedback, restartConversation, storageKey, ...props }: Props) => JSX_3.Element;
132
132
 
133
133
  export declare type ColumnBlock = {
134
134
  type: 'column';
@@ -165,7 +165,7 @@ export declare const CONFIG_ACCESS_DENIED = "Access denied to configuration file
165
165
  export { Configuration }
166
166
 
167
167
  export declare const Container: {
168
- ({ children, className, connected, uploadFile, allowFileUpload, ...props }: Props_4): JSX_3.Element;
168
+ ({ children, className, connected, uploadFile, allowFileUpload, storageKey, ...props }: Props_4): JSX_3.Element;
169
169
  displayName: string;
170
170
  };
171
171
 
@@ -211,9 +211,10 @@ export declare function enrichMessage(messages: BlockMessage[], participants: Us
211
211
  declare type ErrorProps = {
212
212
  error: WebchatError;
213
213
  restartConversation?: () => void;
214
+ closeWindow?: () => void;
214
215
  };
215
216
 
216
- export declare function ErrorState({ error, restartConversation }: ErrorProps): JSX_3.Element;
217
+ export declare function ErrorState({ error, restartConversation, closeWindow }: ErrorProps): JSX_3.Element;
217
218
 
218
219
  declare type EventError = Error & {
219
220
  type: 'error';
@@ -243,6 +244,8 @@ export declare type FileType = (typeof fileTypes)[number];
243
244
 
244
245
  export declare const fileTypes: readonly ["audio", "file", "image", "video"];
245
246
 
247
+ export declare function generateThemeOverride(theme: LatestWebchatTheme): Record<string, string>;
248
+
246
249
  export declare function generateThemeStylesheet(theme: LatestWebchatTheme): string;
247
250
 
248
251
  export declare type GenericBlock = AudioBlock | BubbleBlock | ButtonBlock | CarouselBlock | ColumnBlock | DropdownBlock | FileBlock | ImageBlock | LocationBlock | RowBlock | TextBlock | VideoBlock | CustomBlock;
@@ -412,9 +415,11 @@ export declare type Props = {
412
415
  }>;
413
416
  addMessageFeedback?: (messageId: string, feedback: Feedback) => void;
414
417
  error?: WebchatError;
418
+ storageKey?: string;
415
419
  };
416
420
 
417
421
  declare type Props_2 = {
422
+ adminKey?: string;
418
423
  user?: UserCredentials;
419
424
  conversationId?: string;
420
425
  clientId: string;
@@ -436,6 +441,7 @@ declare type Props_3 = ComponentProps<'div'> & {
436
441
  name: string;
437
442
  type: FileType;
438
443
  }>;
444
+ storageKey?: string;
439
445
  } & Pick<Configuration, 'composerPlaceholder' | 'footer'>;
440
446
 
441
447
  declare type Props_4 = ComponentProps<'div'> & {
@@ -446,6 +452,7 @@ declare type Props_4 = ComponentProps<'div'> & {
446
452
  type: FileType;
447
453
  }>;
448
454
  allowFileUpload?: boolean;
455
+ storageKey?: string;
449
456
  };
450
457
 
451
458
  declare type Props_5 = {
@@ -543,7 +550,7 @@ declare type UserProfile = Omit<User, 'id' | 'createdAt' | 'updatedAt'>;
543
550
 
544
551
  declare type UserResponse = Awaited<ReturnType<Client['getUser']>>['user'];
545
552
 
546
- export declare function useWebchat({ apiUrl, clientId, storageKey, storageLocation, ...props }: Props_2): UseWebchatReturn;
553
+ export declare function useWebchat({ apiUrl, clientId, storageKey, storageLocation, adminKey, ...props }: Props_2): UseWebchatReturn;
547
554
 
548
555
  declare type UseWebchatReturn = {
549
556
  clientState: 'connected' | 'disconnected' | 'error';