@chatsystem/client 1.0.9 → 1.0.11
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/.env.sample +1 -0
- package/README.md +21 -4
- package/dist/index.d.ts +7 -1
- package/dist/index.js +1951 -1933
- package/package.json +3 -3
- package/tsconfig.json +6 -2
- package/tsconfig.node.json +1 -0
- package/tsconfig.node.tsbuildinfo +1 -0
- package/tsconfig.tsbuildinfo +1 -0
- package/vite.config.d.ts +2 -0
- package/vite.config.js +38 -0
- package/vite.config.ts +6 -0
package/.env.sample
CHANGED
package/README.md
CHANGED
|
@@ -1,7 +1,24 @@
|
|
|
1
|
-
|
|
1
|
+
# Use the client
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
## Use it as a react package
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
- ```js
|
|
6
|
+
import { App } from "@chatsystem/client";
|
|
7
|
+
<App appToken="YOUR_TOKEN_ID" displayMode="chatbox" />;
|
|
8
|
+
```
|
|
6
9
|
|
|
7
|
-
|
|
10
|
+
## Use it as a bundled JS script
|
|
11
|
+
|
|
12
|
+
- ```js
|
|
13
|
+
<script
|
|
14
|
+
type="text/javascript"
|
|
15
|
+
src="https://chatsystem.s3.eu-west-3.amazonaws.com/index.js"
|
|
16
|
+
data-appToken="YOUR_TOKEN_ID"
|
|
17
|
+
data-displayMode="chatbox"
|
|
18
|
+
></script>
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### Env variable
|
|
22
|
+
|
|
23
|
+
- appToken: your appToken, delivered on chatsystem.ai
|
|
24
|
+
- displayMode?: either `bubble` if you want the bubble to display, or `chatbox` if you want to see directly the chatbox. Css is overridable.
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
2
2
|
|
|
3
|
-
export declare function App({ appToken }: AppProps): JSX_2.Element;
|
|
3
|
+
export declare function App({ appToken, displayMode }: AppProps): JSX_2.Element;
|
|
4
4
|
|
|
5
5
|
declare type AppProps = {
|
|
6
6
|
appToken: string;
|
|
7
|
+
displayMode?: DisplayModeEnum;
|
|
7
8
|
};
|
|
8
9
|
|
|
10
|
+
declare enum DisplayModeEnum {
|
|
11
|
+
BUBBLE = "bubble",
|
|
12
|
+
CHATBOX = "chatbox"
|
|
13
|
+
}
|
|
14
|
+
|
|
9
15
|
export { }
|