@voxket-ai/voxket-live 1.0.21 → 1.0.22

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 (2) hide show
  1. package/README.md +21 -5
  2. package/package.json +4 -2
package/README.md CHANGED
@@ -29,14 +29,16 @@ npm install @voxket-ai/voxket-live@latest
29
29
 
30
30
  ## Usage
31
31
 
32
- Import the `Widget` component and its props type into your React application. The necessary CSS styles are bundled with the JavaScript, so no separate CSS import is required.
32
+ To use the Voxket Live widget in your React application, you need to import both the component and its styles:
33
33
 
34
34
  ```tsx
35
35
  import React from 'react';
36
- import Widget, { WidgetProps } from '@voxket-ai/voxket-live';
36
+ import VoxketWidget, { VoxketWidgetProps } from '@voxket-ai/voxket-live';
37
+ // Import the CSS styles - REQUIRED for proper styling
38
+ import '@voxket-ai/voxket-live/dist/index.css';
37
39
 
38
40
  const MyCustomApp = () => {
39
- const widgetProps: WidgetProps = {
41
+ const widgetProps: VoxketWidgetProps = {
40
42
  agentId: "your-unique-agent-id", // Replace with your actual Agent ID
41
43
  baseUrl: "https://your.voxket.api", // Replace with your Voxket instance base URL
42
44
  appId: "your-voxket-app-id", // Replace with your Voxket App ID
@@ -53,7 +55,7 @@ const MyCustomApp = () => {
53
55
  <div>
54
56
  <h1>My Application Integrating Voxket</h1>
55
57
  <p>The Voxket Live widget is displayed below:</p>
56
- <Widget {...widgetProps} />
58
+ <VoxketWidget {...widgetProps} />
57
59
  </div>
58
60
  );
59
61
  };
@@ -61,9 +63,23 @@ const MyCustomApp = () => {
61
63
  export default MyCustomApp;
62
64
  ```
63
65
 
66
+ ### Important Notes on CSS
67
+
68
+ 1. **CSS Import is Required**: You must import the CSS file for proper styling:
69
+ ```tsx
70
+ import '@voxket-ai/voxket-live/dist/index.css';
71
+ ```
72
+
73
+ 2. **Import Order**: Import the CSS after the component import for best practices.
74
+
75
+ 3. **Alternative CSS Import Methods**:
76
+ - In your main CSS file: `@import '@voxket-ai/voxket-live/dist/index.css';`
77
+ - In your application's entry point (e.g., `main.tsx` or `index.tsx`)
78
+ - Via your bundler's configuration (Webpack, Vite, etc.)
79
+
64
80
  ## Props
65
81
 
66
- The `Widget` component accepts the following props:
82
+ The `VoxketWidget` component accepts the following props:
67
83
 
68
84
  | Prop | Type | Required | Default | Description |
69
85
  |---------------------|--------------|----------|-------------|------------------------------------------------------------------------------------------------------------|
package/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "name": "@voxket-ai/voxket-live",
3
- "version": "1.0.21",
3
+ "version": "1.0.22",
4
4
  "description": "A React widget for embedding Voxket-powered audio/video/chat experiences.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
7
7
  "module": "./dist/index.js",
8
8
  "types": "./dist/index.d.ts",
9
+ "style": "./dist/index.css",
9
10
  "files": [
10
11
  "dist"
11
12
  ],
@@ -18,7 +19,8 @@
18
19
  "import": "./dist/index.js",
19
20
  "require": "./dist/index.cjs",
20
21
  "types": "./dist/index.d.ts"
21
- }
22
+ },
23
+ "./dist/index.css": "./dist/index.css"
22
24
  },
23
25
  "publishConfig": {
24
26
  "registry": "https://registry.npmjs.org/"