@botpress/webchat 3.2.7 → 3.2.9

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.
@@ -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, fontFamily, color } = context.globals
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
  )
@@ -1,21 +1,21 @@
1
1
 
2
- > @botpress/webchat@3.2.7 build /home/runner/work/genisys/genisys/packages/webchat-components
2
+ > @botpress/webchat@3.2.9 build /home/runner/work/genisys/genisys/packages/webchat-components
3
3
  > vite build
4
4
 
5
5
  vite v5.4.8 building for production...
6
6
  transforming...
7
- ✓ 3182 modules transformed.
7
+ ✓ 3184 modules transformed.
8
8
  rendering chunks...
9
9
 
10
10
  [vite:dts] Start generate declaration files...
11
11
  computing gzip size...
12
- dist/style.css  47.46 kB │ gzip: 8.72 kB
13
- dist/index.js 783.77 kB │ gzip: 218.73 kB
12
+ dist/style.css  48.61 kB │ gzip: 8.67 kB
13
+ dist/index.js 784.13 kB │ gzip: 218.67 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 20312ms.
17
+ [vite:dts] Declaration files built in 19195ms.
18
18
 
19
- dist/style.css  47.46 kB │ gzip: 8.72 kB
20
- dist/index.umd.cjs 526.79 kB │ gzip: 179.57 kB
21
- ✓ built in 26.59s
19
+ dist/style.css  48.61 kB │ gzip: 8.67 kB
20
+ dist/index.umd.cjs 526.92 kB │ gzip: 179.51 kB
21
+ ✓ built in 25.31s
package/dist/index.d.ts CHANGED
@@ -406,6 +406,13 @@ declare type MessageListProps = {
406
406
  showOutgoingMessageAvatar?: boolean;
407
407
  };
408
408
 
409
+ export declare const MessagePreview: ForwardRefExoticComponent<Omit<ClassAttributes<HTMLDivElement> & HTMLAttributes<HTMLDivElement> & {
410
+ avatarUrl?: string;
411
+ botName?: string;
412
+ description?: string;
413
+ onClose?: () => void;
414
+ }, "ref"> & RefAttributes<HTMLDivElement>>;
415
+
409
416
  export declare const MISSING_API_URL = "The API url is required to initialize the webchat.";
410
417
 
411
418
  export declare const MISSING_BOT_ID = "The Bot ID is required to initialize the webchat.";
@@ -488,7 +495,7 @@ export declare type Props = {
488
495
  };
489
496
 
490
497
  declare type Props_2 = {
491
- adminKey?: string;
498
+ adminSecret?: string;
492
499
  user?: UserCredentials;
493
500
  conversationId?: string;
494
501
  clientId: string;
@@ -601,7 +608,6 @@ export declare type StyleOptions = {
601
608
 
602
609
  /**
603
610
  * StylesheetProvider component that manages theme styles and font loading
604
- * Handles both default fonts and custom Google Fonts
605
611
  */
606
612
  export declare const StylesheetProvider: ({ color, fontFamily, radius, themeMode, variant, headerVariant, additionalStylesheetUrl, }: Props_7) => JSX_3.Element;
607
613
 
@@ -632,7 +638,7 @@ declare type UserProfile = Omit<User, 'id' | 'createdAt' | 'updatedAt'>;
632
638
 
633
639
  declare type UserResponse = Awaited<ReturnType<Client['getUser']>>['user'];
634
640
 
635
- export declare function useWebchat({ apiUrl, clientId, storageKey, storageLocation, adminKey, soundEnabled, ...props }: Props_2): UseWebchatReturn;
641
+ export declare function useWebchat({ apiUrl, clientId, storageKey, storageLocation, adminSecret, soundEnabled, ...props }: Props_2): UseWebchatReturn;
636
642
 
637
643
  declare type UseWebchatReturn = {
638
644
  clientState: 'connected';
@@ -726,6 +732,31 @@ export declare const webchatClasses: {
726
732
  };
727
733
  };
728
734
  };
735
+ readonly messagePreview: {
736
+ readonly container: {
737
+ readonly className: "bpMessagePreviewContainer";
738
+ };
739
+ readonly message: {
740
+ readonly className: "bpMessagePreviewMessage";
741
+ };
742
+ readonly description: {
743
+ readonly className: "bpMessagePreviewDescription";
744
+ };
745
+ readonly closeButton: {
746
+ readonly className: "bpMessagePreviewCloseButton";
747
+ };
748
+ readonly avatar: {
749
+ readonly container: {
750
+ readonly className: "bpMessagePreviewAvatarContainer";
751
+ };
752
+ readonly image: {
753
+ readonly className: "bpMessagePreviewAvatarImage";
754
+ };
755
+ readonly fallback: {
756
+ readonly className: "bpMessagePreviewAvatarFallback";
757
+ };
758
+ };
759
+ };
729
760
  readonly fab: {
730
761
  readonly container: {
731
762
  readonly className: "bpReset bpFabContainer";