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.
- package/dist/components/Bot.d.ts +115 -81
- package/dist/components/Bot.d.ts.map +1 -1
- package/dist/components/bubbles/AgentReasoningBubble.d.ts +15 -9
- package/dist/components/bubbles/AgentReasoningBubble.d.ts.map +1 -1
- package/dist/components/bubbles/BotBubble.d.ts +26 -19
- package/dist/components/bubbles/BotBubble.d.ts.map +1 -1
- package/dist/components/bubbles/FollowUpPromptBubble.d.ts +8 -0
- package/dist/components/bubbles/FollowUpPromptBubble.d.ts.map +1 -0
- package/dist/components/bubbles/GuestBubble.d.ts +15 -14
- package/dist/components/bubbles/GuestBubble.d.ts.map +1 -1
- package/dist/components/bubbles/StarterPromptBubble.d.ts +7 -6
- package/dist/components/bubbles/StarterPromptBubble.d.ts.map +1 -1
- package/dist/components/buttons/AttachmentUploadButton.d.ts +11 -0
- package/dist/components/buttons/AttachmentUploadButton.d.ts.map +1 -0
- package/dist/components/icons/AttachmentIcon.d.ts +3 -0
- package/dist/components/icons/AttachmentIcon.d.ts.map +1 -0
- package/dist/components/icons/SparklesIcon.d.ts +3 -0
- package/dist/components/icons/SparklesIcon.d.ts.map +1 -0
- package/dist/components/icons/TickIcon.d.ts +2 -0
- package/dist/components/icons/TickIcon.d.ts.map +1 -0
- package/dist/components/icons/XIcon.d.ts +4 -2
- package/dist/components/icons/XIcon.d.ts.map +1 -1
- package/dist/components/icons/index.d.ts +13 -10
- package/dist/components/icons/index.d.ts.map +1 -1
- package/dist/components/inputs/textInput/components/FilePreview.d.ts +12 -0
- package/dist/components/inputs/textInput/components/FilePreview.d.ts.map +1 -0
- package/dist/components/inputs/textInput/components/TextInput.d.ts +27 -23
- package/dist/components/inputs/textInput/components/TextInput.d.ts.map +1 -1
- package/dist/components/inputs/textInput/index.d.ts +2 -1
- package/dist/components/inputs/textInput/index.d.ts.map +1 -1
- package/dist/constants.d.ts.map +1 -1
- package/dist/features/bubble/components/Bubble.d.ts.map +1 -1
- package/dist/features/bubble/components/BubbleButton.d.ts +15 -12
- package/dist/features/bubble/components/BubbleButton.d.ts.map +1 -1
- package/dist/features/bubble/components/Tooltip.d.ts +14 -14
- package/dist/features/bubble/types.d.ts +100 -77
- package/dist/features/bubble/types.d.ts.map +1 -1
- package/dist/features/full/components/Full.d.ts.map +1 -1
- package/dist/features/popup/components/DisclaimerPopup.d.ts +9 -0
- package/dist/features/popup/components/DisclaimerPopup.d.ts.map +1 -0
- package/dist/features/popup/components/index.d.ts +2 -1
- package/dist/features/popup/components/index.d.ts.map +1 -1
- package/dist/queries/sendMessageQuery.d.ts +86 -71
- package/dist/queries/sendMessageQuery.d.ts.map +1 -1
- package/dist/utils/chatInputHistory.d.ts +22 -0
- package/dist/utils/chatInputHistory.d.ts.map +1 -0
- package/dist/utils/index.d.ts +22 -17
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/web.d.ts +22 -18
- package/dist/web.d.ts.map +1 -1
- package/dist/web.js +1 -1
- package/dist/window.d.ts +29 -26
- package/dist/window.d.ts.map +1 -1
- package/package.json +64 -65
- package/dist/features/bubble/components/ExpandButton.d.ts +0 -18
- 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
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
export declare const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
|
|
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
|
package/dist/window.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"window.d.ts","sourceRoot":"","sources":["../src/window.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"window.d.ts","sourceRoot":"","sources":["../src/window.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAGtD,KAAK,QAAQ,GAAG;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACpD,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACzC,eAAe,CAAC,EAAE,mBAAmB,CAAC;IACtC,KAAK,CAAC,EAAE,WAAW,CAAC;CACrB,CAAC;AAIF,eAAO,MAAM,QAAQ,UAAW,QAAQ,GAAG;IAAE,EAAE,CAAC,EAAE,MAAM,CAAA;CAAE,SAMzD,CAAC;AAEF,eAAO,MAAM,IAAI,UAAW,QAAQ,SAMnC,CAAC;AAEF,eAAO,MAAM,OAAO,YAEnB,CAAC;AAEF,KAAK,OAAO,GAAG;IACb,QAAQ,EAAE,OAAO,QAAQ,CAAC;IAC1B,IAAI,EAAE,OAAO,IAAI,CAAC;IAClB,OAAO,EAAE,OAAO,OAAO,CAAC;CACzB,CAAC;AAQF,eAAO,MAAM,YAAY;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": "
|
|
4
|
-
"description": "Javascript library to display
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "dist/index.js",
|
|
7
|
-
"types": "dist/index.d.ts",
|
|
8
|
-
"
|
|
9
|
-
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
"@
|
|
31
|
-
"@
|
|
32
|
-
"@
|
|
33
|
-
"@
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
|
|
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"}
|