@useknest/widget-react 0.1.0-beta.1 → 0.1.0-beta.3

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 +6 -22
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -22,7 +22,7 @@ import { ChatWidget } from '@useknest/widget-react';
22
22
  function App() {
23
23
  return (
24
24
  <div>
25
- <ChatWidget publishableApiKey="pk_your_key_here" />
25
+ <ChatWidget publishableApiKey="pk_your_public_key_here" />
26
26
  </div>
27
27
  );
28
28
  }
@@ -44,7 +44,7 @@ function App() {
44
44
  - ✅ **Streaming Support** - Real-time message streaming via Server-Sent Events (SSE)
45
45
  - ✅ **TypeScript** - Full TypeScript support with exported types
46
46
  - ✅ **Customizable** - Fetches branding (avatar, colors, welcome message) from your project config
47
- - ✅ **Lightweight** - ~28KB minified (~8.5KB gzipped)
47
+ - ✅ **Lightweight** - ~17KB minified (~4.4KB gzipped)
48
48
  - ✅ **Framework-Agnostic Core** - Shares business logic with other platform packages
49
49
 
50
50
  ## TypeScript
@@ -57,7 +57,7 @@ import { ChatWidget, type ChatWidgetProps, type Message } from '@useknest/widget
57
57
 
58
58
  ## Customization
59
59
 
60
- The widget automatically loads customization from your project's configuration:
60
+ The widget automatically loads customization from your project's configuration at useknest.com:
61
61
 
62
62
  - Avatar image
63
63
  - Brand color
@@ -89,12 +89,11 @@ This package uses `@useknest/widget-core` for all business logic (API calls, str
89
89
 
90
90
  ```tsx
91
91
  import { ChatWidget } from '@useknest/widget-react';
92
- import '@useknest/widget-react/dist/widget-react.css';
93
92
 
94
93
  function FullPageChat() {
95
94
  return (
96
95
  <div style={{ height: '100vh', width: '100vw' }}>
97
- <ChatWidget publishableApiKey="pk_your_key_here" />
96
+ <ChatWidget publishableApiKey="pk_your_public_key_here" />
98
97
  </div>
99
98
  );
100
99
  }
@@ -104,35 +103,20 @@ function FullPageChat() {
104
103
 
105
104
  ```tsx
106
105
  import { ChatWidget } from '@useknest/widget-react';
107
- import '@useknest/widget-react/dist/widget-react.css';
108
106
 
109
107
  function ChatContainer() {
110
108
  return (
111
109
  <div style={{ maxWidth: '900px', height: '600px', margin: '0 auto' }}>
112
- <ChatWidget publishableApiKey="pk_your_key_here" />
110
+ <ChatWidget publishableApiKey="pk_your_public_key_here" />
113
111
  </div>
114
112
  );
115
113
  }
116
114
  ```
117
115
 
118
- ## Troubleshooting
119
-
120
- ### Streaming not working
121
-
122
- **Solution:** Check that your backend API is running and accessible. The widget defaults to `http://localhost:5173/api/v1` for local development.
123
-
124
- ### TypeScript errors
125
-
126
- **Solution:** Make sure you have React types installed:
127
-
128
- ```bash
129
- npm install --save-dev @types/react @types/react-dom
130
- ```
131
-
132
116
  ## License
133
117
 
134
118
  MIT
135
119
 
136
120
  ## Support
137
121
 
138
- For issues and questions, please visit [GitHub Issues](https://github.com/your-repo/issues).
122
+ For issues and questions, please email us at useknest@gmail.com
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@useknest/widget-react",
3
- "version": "0.1.0-beta.1",
3
+ "version": "0.1.0-beta.3",
4
4
  "type": "module",
5
5
  "description": "Native React component for Knest chat widget",
6
6
  "files": [
@@ -22,7 +22,7 @@
22
22
  "react-dom": "^18.0.0 || ^19.0.0"
23
23
  },
24
24
  "dependencies": {
25
- "@useknest/widget-core": "0.1.0-beta.1"
25
+ "@useknest/widget-core": "0.1.0-beta.3"
26
26
  },
27
27
  "devDependencies": {
28
28
  "@types/react": "^18.3.3",