@robylon/web-react-sdk 1.1.38-staging.8 → 1.1.40-staging.1

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.
Files changed (30) hide show
  1. package/README.md +52 -9
  2. package/dist/cjs/index.js +1 -1
  3. package/dist/cjs/index.js.map +1 -1
  4. package/dist/cjs/types/components/ChatbotContainer/ChatbotContainer.d.ts +3 -0
  5. package/dist/cjs/types/components/ChatbotFloatingButton.d.ts +3 -0
  6. package/dist/cjs/types/components/RobylonChatbot.d.ts +3 -0
  7. package/dist/cjs/types/constants/fontStyles.d.ts +2 -0
  8. package/dist/cjs/types/types.d.ts +14 -0
  9. package/dist/cjs/types/utils/fetchData.d.ts +16 -0
  10. package/dist/cjs/types/vanilla/components/ChatbotFloatingButton.d.ts +6 -0
  11. package/dist/esm/index.js +1 -1
  12. package/dist/esm/index.js.map +1 -1
  13. package/dist/esm/types/components/ChatbotContainer/ChatbotContainer.d.ts +3 -0
  14. package/dist/esm/types/components/ChatbotFloatingButton.d.ts +3 -0
  15. package/dist/esm/types/components/RobylonChatbot.d.ts +3 -0
  16. package/dist/esm/types/constants/fontStyles.d.ts +2 -0
  17. package/dist/esm/types/types.d.ts +14 -0
  18. package/dist/esm/types/utils/fetchData.d.ts +16 -0
  19. package/dist/esm/types/vanilla/components/ChatbotFloatingButton.d.ts +6 -0
  20. package/dist/index.d.ts +18 -1
  21. package/dist/umd/robylon-chatbot.js +1 -1
  22. package/dist/umd/robylon-chatbot.js.map +1 -1
  23. package/dist/umd/types/components/ChatbotContainer/ChatbotContainer.d.ts +3 -0
  24. package/dist/umd/types/components/ChatbotFloatingButton.d.ts +3 -0
  25. package/dist/umd/types/components/RobylonChatbot.d.ts +3 -0
  26. package/dist/umd/types/constants/fontStyles.d.ts +2 -0
  27. package/dist/umd/types/types.d.ts +14 -0
  28. package/dist/umd/types/utils/fetchData.d.ts +16 -0
  29. package/dist/umd/types/vanilla/components/ChatbotFloatingButton.d.ts +6 -0
  30. package/package.json +1 -1
@@ -6,6 +6,9 @@ interface ChatbotProps {
6
6
  user_token?: string;
7
7
  user_profile?: Record<string, any>;
8
8
  onEvent?: ChatbotEventHandler;
9
+ position?: "Left" | "Right";
10
+ sideSpacing?: number;
11
+ bottomSpacing?: number;
9
12
  }
10
13
  declare const RobylonChatbot: React.FC<ChatbotProps>;
11
14
  export { RobylonChatbot as Chatbot };
@@ -0,0 +1,2 @@
1
+ export declare const FONT_FAMILY = "system-ui, Inter, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'";
2
+ export declare const FONT_LINE_HEIGHT = "21px";
@@ -12,6 +12,11 @@ export interface WidgetInterfaceProperties {
12
12
  side_spacing?: number;
13
13
  bottom_spacing?: number;
14
14
  }
15
+ export declare enum LauncherType {
16
+ TEXT = "TEXT",
17
+ IMAGE = "IMAGE",
18
+ TEXTUAL_IMAGE = "TEXTUAL_IMAGE"
19
+ }
15
20
  export interface ChatbotConfig {
16
21
  chatbotId: string;
17
22
  userId: string | null | number;
@@ -29,6 +34,15 @@ export interface ChatbotConfig {
29
34
  isAnonymous?: boolean;
30
35
  interface_type?: ChatbotInterfaceType;
31
36
  interface_properties?: WidgetInterfaceProperties;
37
+ launcher_type: LauncherType;
38
+ launcher_properties: {
39
+ text?: string;
40
+ };
41
+ images: {
42
+ launcher_image_url?: {
43
+ url: string;
44
+ };
45
+ };
32
46
  }
33
47
  interface RobylonSdkConfig {
34
48
  chatbot_id: string;
@@ -1,3 +1,4 @@
1
+ import { ChatbotInterfaceType, LauncherType, WidgetPositionEnums } from "../types";
1
2
  interface ChatbotResponse {
2
3
  user: {
3
4
  token: string;
@@ -22,6 +23,21 @@ interface ChatbotResponse {
22
23
  launcher_logo_url?: string;
23
24
  welcome_message: string;
24
25
  image_url: string;
26
+ interface_properties: {
27
+ position: WidgetPositionEnums;
28
+ side_spacing: number;
29
+ bottom_spacing: number;
30
+ };
31
+ interface_type: ChatbotInterfaceType;
32
+ launcher_type: LauncherType;
33
+ launcher_properties: {
34
+ text: string;
35
+ };
36
+ images: {
37
+ launcher_image_url: {
38
+ url: string;
39
+ };
40
+ };
25
41
  };
26
42
  };
27
43
  };
@@ -13,6 +13,9 @@ interface ChatbotFloatingButtonConfig {
13
13
  data?: any;
14
14
  }) => void;
15
15
  onInternalEvent: (eventType: AllEventTypes, additionalData?: Record<string, any>) => void;
16
+ position?: "Left" | "Right";
17
+ sideSpacing?: number;
18
+ bottomSpacing?: number;
16
19
  }
17
20
  /**
18
21
  * Class representing the ChatbotFloatingButton component
@@ -31,6 +34,9 @@ export declare class ChatbotFloatingButton {
31
34
  * Renders the button element
32
35
  */
33
36
  private render;
37
+ private createLauncherElement;
38
+ private createTextLauncher;
39
+ private createTextualImageLauncher;
34
40
  /**
35
41
  * Apply responsive styles based on screen width
36
42
  * @param baseStyles The base styles to apply
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@robylon/web-react-sdk",
3
- "version": "1.1.38-staging.8",
3
+ "version": "1.1.40-staging.1",
4
4
  "description": "React SDK for Robylon AI Chatbot",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",