thub-embed 1.5.8 → 2.0.6

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 (56) hide show
  1. package/dist/components/Bot.d.ts +115 -81
  2. package/dist/components/Bot.d.ts.map +1 -1
  3. package/dist/components/bubbles/AgentReasoningBubble.d.ts +15 -9
  4. package/dist/components/bubbles/AgentReasoningBubble.d.ts.map +1 -1
  5. package/dist/components/bubbles/BotBubble.d.ts +26 -19
  6. package/dist/components/bubbles/BotBubble.d.ts.map +1 -1
  7. package/dist/components/bubbles/FollowUpPromptBubble.d.ts +8 -0
  8. package/dist/components/bubbles/FollowUpPromptBubble.d.ts.map +1 -0
  9. package/dist/components/bubbles/GuestBubble.d.ts +15 -14
  10. package/dist/components/bubbles/GuestBubble.d.ts.map +1 -1
  11. package/dist/components/bubbles/StarterPromptBubble.d.ts +7 -6
  12. package/dist/components/bubbles/StarterPromptBubble.d.ts.map +1 -1
  13. package/dist/components/buttons/AttachmentUploadButton.d.ts +11 -0
  14. package/dist/components/buttons/AttachmentUploadButton.d.ts.map +1 -0
  15. package/dist/components/icons/AttachmentIcon.d.ts +3 -0
  16. package/dist/components/icons/AttachmentIcon.d.ts.map +1 -0
  17. package/dist/components/icons/SparklesIcon.d.ts +3 -0
  18. package/dist/components/icons/SparklesIcon.d.ts.map +1 -0
  19. package/dist/components/icons/TickIcon.d.ts +2 -0
  20. package/dist/components/icons/TickIcon.d.ts.map +1 -0
  21. package/dist/components/icons/XIcon.d.ts +4 -2
  22. package/dist/components/icons/XIcon.d.ts.map +1 -1
  23. package/dist/components/icons/index.d.ts +13 -10
  24. package/dist/components/icons/index.d.ts.map +1 -1
  25. package/dist/components/inputs/textInput/components/FilePreview.d.ts +12 -0
  26. package/dist/components/inputs/textInput/components/FilePreview.d.ts.map +1 -0
  27. package/dist/components/inputs/textInput/components/TextInput.d.ts +27 -23
  28. package/dist/components/inputs/textInput/components/TextInput.d.ts.map +1 -1
  29. package/dist/components/inputs/textInput/index.d.ts +2 -1
  30. package/dist/components/inputs/textInput/index.d.ts.map +1 -1
  31. package/dist/constants.d.ts.map +1 -1
  32. package/dist/features/bubble/components/Bubble.d.ts.map +1 -1
  33. package/dist/features/bubble/components/BubbleButton.d.ts +15 -12
  34. package/dist/features/bubble/components/BubbleButton.d.ts.map +1 -1
  35. package/dist/features/bubble/components/Tooltip.d.ts +14 -14
  36. package/dist/features/bubble/types.d.ts +100 -77
  37. package/dist/features/bubble/types.d.ts.map +1 -1
  38. package/dist/features/full/components/Full.d.ts.map +1 -1
  39. package/dist/features/popup/components/DisclaimerPopup.d.ts +9 -0
  40. package/dist/features/popup/components/DisclaimerPopup.d.ts.map +1 -0
  41. package/dist/features/popup/components/index.d.ts +2 -1
  42. package/dist/features/popup/components/index.d.ts.map +1 -1
  43. package/dist/queries/sendMessageQuery.d.ts +86 -71
  44. package/dist/queries/sendMessageQuery.d.ts.map +1 -1
  45. package/dist/utils/chatInputHistory.d.ts +22 -0
  46. package/dist/utils/chatInputHistory.d.ts.map +1 -0
  47. package/dist/utils/index.d.ts +22 -17
  48. package/dist/utils/index.d.ts.map +1 -1
  49. package/dist/web.d.ts +22 -18
  50. package/dist/web.d.ts.map +1 -1
  51. package/dist/web.js +1 -1
  52. package/dist/window.d.ts +29 -26
  53. package/dist/window.d.ts.map +1 -1
  54. package/package.json +64 -65
  55. package/dist/features/bubble/components/ExpandButton.d.ts +0 -18
  56. package/dist/features/bubble/components/ExpandButton.d.ts.map +0 -1
package/dist/window.d.ts CHANGED
@@ -1,27 +1,30 @@
1
- import { observersConfigType } from './components/Bot';
2
- type BotProps = {
3
- chatflowid: string;
4
- apiHost?: string;
5
- chatflowConfig?: Record<string, unknown>;
6
- observersConfig?: observersConfigType;
7
- };
8
- export declare const initFull: (props: BotProps & {
9
- id?: string;
10
- }) => void;
11
- export declare const init: (props: BotProps) => void;
12
- export declare const destroy: () => void;
13
- type Chatbot = {
14
- initFull: typeof initFull;
15
- init: typeof init;
16
- destroy: typeof destroy;
17
- };
18
- export declare const parseChatbot: () => {
19
- initFull: (props: BotProps & {
20
- id?: string;
21
- }) => void;
22
- init: (props: BotProps) => void;
23
- destroy: () => void;
24
- };
25
- export declare const injectChatbotInWindow: (bot: Chatbot) => void;
26
- export {};
1
+ import { observersConfigType } from './components/Bot';
2
+ import { BubbleTheme } from './features/bubble/types';
3
+ type BotProps = {
4
+ chatflowid: string;
5
+ apiHost?: string;
6
+ onRequest?: (request: RequestInit) => Promise<void>;
7
+ chatflowConfig?: Record<string, unknown>;
8
+ observersConfig?: observersConfigType;
9
+ theme?: BubbleTheme;
10
+ };
11
+ export declare const initFull: (props: BotProps & {
12
+ id?: string;
13
+ }) => void;
14
+ export declare const init: (props: BotProps) => void;
15
+ export declare const destroy: () => void;
16
+ type Chatbot = {
17
+ initFull: typeof initFull;
18
+ init: typeof init;
19
+ destroy: typeof destroy;
20
+ };
21
+ export declare const parseChatbot: () => {
22
+ initFull: (props: BotProps & {
23
+ id?: string;
24
+ }) => void;
25
+ init: (props: BotProps) => void;
26
+ destroy: () => void;
27
+ };
28
+ export declare const injectChatbotInWindow: (bot: Chatbot) => void;
29
+ export {};
27
30
  //# sourceMappingURL=window.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"window.d.ts","sourceRoot":"","sources":["../src/window.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAGvD,KAAK,QAAQ,GAAG;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACzC,eAAe,CAAC,EAAE,mBAAmB,CAAC;CACvC,CAAC;AAIF,eAAO,MAAM,QAAQ,UAAW,QAAQ,GAAG;IAAE,EAAE,CAAC,EAAE,MAAM,CAAA;CAAE,SAMzD,CAAC;AAEF,eAAO,MAAM,IAAI,UAAW,QA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sBAhCO,QAAQ,GAAG;QAAE,EAAE,CAAC,EAAE,MAAM,CAAA;KAAE;kBAQ9B,QAAQ;;CA4BlC,CAAC;AAEH,eAAO,MAAM,qBAAqB,QAAS,OAAO,SAGjD,CAAC"}
package/package.json CHANGED
@@ -1,65 +1,64 @@
1
- {
2
- "name": "thub-embed",
3
- "version": "1.5.8",
4
- "description": "Javascript library to display thub chatbot on your website",
5
- "type": "module",
6
- "main": "dist/index.js",
7
- "types": "dist/index.d.ts",
8
- "scripts": {
9
- "dev": "rollup --watch --config rollup.config.js",
10
- "build": "rollup --config rollup.config.js",
11
- "lint": "eslint \"src/**/*.ts*\"",
12
- "lint-fix": "eslint --fix \"src/**/*.ts*\"",
13
- "format": "prettier --write \"**/*.{js,jsx,ts,tsx,md,mdx}\"",
14
- "format:check": "prettier --check \"**/*.{js,jsx,ts,tsx,md,mdx}\"",
15
- "prepare": "husky install"
16
- },
17
- "license": "MIT",
18
- "dependencies": {
19
- "@babel/core": "^7.22.1",
20
- "@ts-stack/markdown": "^1.4.0",
21
- "device-detector-js": "^3.0.3",
22
- "lodash": "^4.17.21",
23
- "prettier": "^3.1.0",
24
- "socket.io-client": "^4.6.2",
25
- "solid-element": "1.7.0",
26
- "solid-js": "1.7.1",
27
- "zod": "^3.22.4"
28
- },
29
- "devDependencies": {
30
- "@babel/preset-typescript": "7.21.4",
31
- "@rollup/plugin-babel": "6.0.3",
32
- "@rollup/plugin-commonjs": "^25.0.0",
33
- "@rollup/plugin-json": "^6.1.0",
34
- "@rollup/plugin-node-resolve": "15.0.1",
35
- "@rollup/plugin-terser": "0.4.0",
36
- "@rollup/plugin-typescript": "11.0.0",
37
- "@tailwindcss/typography": "^0.5.10",
38
- "@types/lodash": "^4.14.195",
39
- "@types/node": "18.15.11",
40
- "@types/uuid": "^8.3.4",
41
- "@typescript-eslint/eslint-plugin": "^5.57.0",
42
- "@typescript-eslint/parser": "^5.57.0",
43
- "autoprefixer": "10.4.14",
44
- "babel-plugin-lodash": "^3.3.4",
45
- "babel-preset-solid": "1.7.1",
46
- "eslint": "^8.24.0",
47
- "eslint-config-next": "13.2.4",
48
- "eslint-config-prettier": "^9.0.0",
49
- "eslint-plugin-prettier": "^5.0.1",
50
- "eslint-plugin-react": "^7.26.1",
51
- "eslint-plugin-solid": "0.12.0",
52
- "husky": "^8.0.0",
53
- "postcss": "8.4.21",
54
- "react": "18.2.0",
55
- "rollup": "3.23.0",
56
- "rollup-plugin-livereload": "2.0.5",
57
- "rollup-plugin-postcss": "4.0.2",
58
- "rollup-plugin-serve": "2.0.2",
59
- "rollup-plugin-typescript-paths": "1.4.0",
60
- "rollup-plugin-uglify": "^6.0.4",
61
- "tailwindcss": "3.3.1",
62
- "typescript": "5.0.3",
63
- "uuid": "^9.0.1"
64
- }
65
- }
1
+ {
2
+ "name": "thub-embed",
3
+ "version": "2.0.6",
4
+ "description": "Javascript library to display THub chatbot on your website",
5
+ "type": "module",
6
+ "main": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "license": "MIT",
9
+ "dependencies": {
10
+ "@babel/core": "^7.22.1",
11
+ "@microsoft/fetch-event-source": "^2.0.1",
12
+ "@ts-stack/markdown": "^1.4.0",
13
+ "device-detector-js": "^3.0.3",
14
+ "lodash": "^4.17.21",
15
+ "prettier": "^3.1.0",
16
+ "solid-element": "1.7.0",
17
+ "solid-js": "1.7.1",
18
+ "zod": "^3.22.4"
19
+ },
20
+ "devDependencies": {
21
+ "@babel/preset-typescript": "7.21.4",
22
+ "@rollup/plugin-babel": "6.0.3",
23
+ "@rollup/plugin-commonjs": "^25.0.0",
24
+ "@rollup/plugin-json": "^6.1.0",
25
+ "@rollup/plugin-node-resolve": "15.0.1",
26
+ "@rollup/plugin-terser": "0.4.0",
27
+ "@rollup/plugin-typescript": "11.0.0",
28
+ "@tailwindcss/typography": "^0.5.10",
29
+ "@types/lodash": "^4.14.195",
30
+ "@types/node": "18.15.11",
31
+ "@types/uuid": "^8.3.4",
32
+ "@typescript-eslint/eslint-plugin": "^5.57.0",
33
+ "@typescript-eslint/parser": "^5.57.0",
34
+ "autoprefixer": "10.4.14",
35
+ "babel-plugin-lodash": "^3.3.4",
36
+ "babel-preset-solid": "1.7.1",
37
+ "eslint": "^8.24.0",
38
+ "eslint-config-next": "13.2.4",
39
+ "eslint-config-prettier": "^9.0.0",
40
+ "eslint-plugin-prettier": "^5.0.1",
41
+ "eslint-plugin-react": "^7.26.1",
42
+ "eslint-plugin-solid": "0.12.0",
43
+ "husky": "^8.0.0",
44
+ "postcss": "8.4.21",
45
+ "react": "18.2.0",
46
+ "rollup": "3.23.0",
47
+ "rollup-plugin-livereload": "2.0.5",
48
+ "rollup-plugin-postcss": "4.0.2",
49
+ "rollup-plugin-serve": "2.0.2",
50
+ "rollup-plugin-typescript-paths": "1.4.0",
51
+ "rollup-plugin-uglify": "^6.0.4",
52
+ "tailwindcss": "3.3.1",
53
+ "typescript": "5.0.3",
54
+ "uuid": "^9.0.1"
55
+ },
56
+ "scripts": {
57
+ "dev": "rollup --watch --config rollup.config.js",
58
+ "build": "rollup --config rollup.config.js",
59
+ "lint": "eslint \"src/**/*.ts*\"",
60
+ "lint-fix": "eslint --fix \"src/**/*.ts*\"",
61
+ "format": "prettier --write \"**/*.{js,jsx,ts,tsx,md,mdx}\"",
62
+ "format:check": "prettier --check \"**/*.{js,jsx,ts,tsx,md,mdx}\""
63
+ }
64
+ }
@@ -1,18 +0,0 @@
1
- type Props = {
2
- isExpanded: boolean;
3
- toggleExpand: () => void;
4
- setPosition: (position: {
5
- top: number;
6
- left: number;
7
- }) => void;
8
- position: {
9
- top: number;
10
- left: number;
11
- };
12
- size?: number | 'small' | 'medium' | 'large' | undefined;
13
- backgroundColor?: string;
14
- iconColor?: string;
15
- };
16
- export declare const ExpandButton: (props: Props) => import("solid-js").JSX.Element;
17
- export {};
18
- //# sourceMappingURL=ExpandButton.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ExpandButton.d.ts","sourceRoot":"","sources":["../../../../src/features/bubble/components/ExpandButton.tsx"],"names":[],"mappings":"AAEA,KAAK,KAAK,GAAG;IACX,UAAU,EAAE,OAAO,CAAC;IACpB,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,WAAW,EAAE,CAAC,QAAQ,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IAC/D,QAAQ,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IACxC,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,CAAC;IACzD,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAOF,eAAO,MAAM,YAAY,UAAW,KAAK,mCAyCxC,CAAC"}