thub-embed-react 1.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/README.md ADDED
@@ -0,0 +1,48 @@
1
+ <!-- markdownlint-disable MD030 -->
2
+
3
+ # THub Embed React
4
+
5
+ React library to display thub chatbot on your website
6
+
7
+ ![THub](https://thub.tech/assets/THub-CPsX7H9O.svg)
8
+
9
+ ## Install
10
+
11
+ ```bash
12
+ npm install thub-embed thub-embed-react
13
+ ```
14
+
15
+ or
16
+
17
+ ```bash
18
+ yarn add thub-embed thub-embed-react
19
+ ```
20
+
21
+ ## Import
22
+
23
+ Full Page Chat
24
+
25
+ ```tsx
26
+ import { FullPageChat } from "thub-embed-react";
27
+
28
+ const App = () => {
29
+ return (
30
+ <FullPageChat
31
+ workflowid="your-workflow-id"
32
+ apiHost="http://localhost:3000"
33
+ />
34
+ );
35
+ };
36
+ ```
37
+
38
+ Popup Chat
39
+
40
+ ```tsx
41
+ import { BubbleChat } from "thub-embed-react";
42
+
43
+ const App = () => {
44
+ return (
45
+ <BubbleChat workflowid="your-workflow-id" apiHost="http://localhost:3000" />
46
+ );
47
+ };
48
+ ```
package/base.json ADDED
@@ -0,0 +1,21 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/tsconfig",
3
+ "display": "Default",
4
+ "compilerOptions": {
5
+ "composite": false,
6
+ "declaration": true,
7
+ "declarationMap": true,
8
+ "esModuleInterop": true,
9
+ "forceConsistentCasingInFileNames": true,
10
+ "inlineSources": false,
11
+ "isolatedModules": true,
12
+ "moduleResolution": "node",
13
+ "noUnusedLocals": false,
14
+ "noUnusedParameters": false,
15
+ "preserveWatchOutput": true,
16
+ "skipLibCheck": true,
17
+ "strict": true,
18
+ "downlevelIteration": true
19
+ },
20
+ "exclude": ["node_modules"]
21
+ }
package/package.json ADDED
@@ -0,0 +1,40 @@
1
+ {
2
+ "name": "thub-embed-react",
3
+ "version": "1.0.6",
4
+ "description": "React library to display thub chatbot on your website",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "type": "module",
8
+ "scripts": {
9
+ "dev": "rollup --watch --config rollup.config.js",
10
+ "build": "rollup --config rollup.config.js",
11
+ "lint": "eslint --fix \"src/**/*.ts*\""
12
+ },
13
+ "keywords": [],
14
+ "license": "MIT",
15
+ "dependencies": {
16
+ "@ladle/react": "2.5.1"
17
+ },
18
+ "devDependencies": {
19
+ "@babel/preset-react": "7.18.6",
20
+ "@babel/preset-typescript": "7.21.4",
21
+ "@rollup/plugin-babel": "6.0.3",
22
+ "@rollup/plugin-node-resolve": "15.0.1",
23
+ "@rollup/plugin-terser": "0.4.0",
24
+ "@rollup/plugin-typescript": "11.0.0",
25
+ "@types/node": "18.15.11",
26
+ "@types/react": "18.0.32",
27
+ "eslint": "8.37.0",
28
+ "flowise-embed": "latest",
29
+ "react": "18.2.0",
30
+ "rollup": "3.20.2",
31
+ "rollup-plugin-typescript-paths": "1.4.0",
32
+ "tslib": "2.5.0",
33
+ "tsx": "3.12.6",
34
+ "typescript": "5.0.3"
35
+ },
36
+ "peerDependencies": {
37
+ "flowise-embed": "*",
38
+ "react": "18.x"
39
+ }
40
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/tsconfig",
3
+ "display": "React Library",
4
+ "extends": "./base.json",
5
+ "compilerOptions": {
6
+ "jsx": "react-jsx",
7
+ "lib": ["ES2015", "dom", "dom.iterable"],
8
+ "module": "ESNext",
9
+ "target": "es6"
10
+ }
11
+ }
12
+