@courseecho/ai-widget-react 1.0.11 → 1.0.12
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 +210 -281
- package/dist/hooks.d.ts.map +1 -1
- package/dist/hooks.js +1 -7
- package/dist/hooks.js.map +1 -1
- package/package.json +6 -4
package/README.md
CHANGED
|
@@ -1,282 +1,211 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
**React component for AI chat widget** - Drop-in AI assistance for your React app.
|
|
4
|
-
|
|
5
|
-
[](https://www.npmjs.com/package/@courseecho/ai-widget-react)
|
|
6
|
-
[](https://reactjs.org)
|
|
7
|
-
[](LICENSE)
|
|
8
|
-
|
|
9
|
-
##
|
|
10
|
-
|
|
11
|
-
A **production-ready React component** for integrating CourseEcho AI chat into your React applications.
|
|
12
|
-
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
-
|
|
18
|
-
|
|
19
|
-
##
|
|
20
|
-
|
|
21
|
-
### Installation
|
|
22
|
-
|
|
23
|
-
```bash
|
|
24
|
-
npm install @courseecho/ai-widget-react @courseecho/ai-core-sdk
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
### Basic Usage
|
|
28
|
-
|
|
29
|
-
```jsx
|
|
30
|
-
import { AiChatWidget } from '@courseecho/ai-widget-react';
|
|
31
|
-
|
|
32
|
-
export default function
|
|
33
|
-
return (
|
|
34
|
-
<AiChatWidget
|
|
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
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
<
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
```
|
|
169
|
-
|
|
170
|
-
###
|
|
171
|
-
|
|
172
|
-
```jsx
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
.ai-
|
|
210
|
-
|
|
211
|
-
}
|
|
212
|
-
```
|
|
213
|
-
|
|
214
|
-
Or use the className prop:
|
|
215
|
-
|
|
216
|
-
```jsx
|
|
217
|
-
<AiChatWidget
|
|
218
|
-
apiEndpoint="..."
|
|
219
|
-
context={{}}
|
|
220
|
-
className="my-custom-chat"
|
|
221
|
-
/>
|
|
222
|
-
```
|
|
223
|
-
|
|
224
|
-
## 🔐 Authentication
|
|
225
|
-
|
|
226
|
-
### Using JWT
|
|
227
|
-
|
|
228
|
-
```jsx
|
|
229
|
-
<AiChatWidget
|
|
230
|
-
apiEndpoint="..."
|
|
231
|
-
context={{}}
|
|
232
|
-
jwtToken={user.jwtToken}
|
|
233
|
-
/>
|
|
234
|
-
```
|
|
235
|
-
|
|
236
|
-
### Using API Key
|
|
237
|
-
|
|
238
|
-
```jsx
|
|
239
|
-
<AiChatWidget
|
|
240
|
-
apiEndpoint="..."
|
|
241
|
-
context={{}}
|
|
242
|
-
apiKey="sk-123456789..."
|
|
243
|
-
/>
|
|
244
|
-
```
|
|
245
|
-
|
|
246
|
-
## 📦 What's Included
|
|
247
|
-
|
|
248
|
-
```
|
|
249
|
-
dist/
|
|
250
|
-
├── index.mjs # ES Module
|
|
251
|
-
├── index.cjs # CommonJS
|
|
252
|
-
├── index.d.ts # TypeScript definitions
|
|
253
|
-
└── ...
|
|
254
|
-
```
|
|
255
|
-
|
|
256
|
-
## 🌍 About CourseEcho
|
|
257
|
-
|
|
258
|
-
[CourseEcho](https://courseecho.com) provides AI-powered educational assistance.
|
|
259
|
-
|
|
260
|
-
- 🌐 Website: https://courseecho.com
|
|
261
|
-
- 📧 Support: support@courseecho.com
|
|
262
|
-
- 📱 Product: https://courseecho.com/products/ai-widget
|
|
263
|
-
|
|
264
|
-
## 📄 License
|
|
265
|
-
|
|
266
|
-
MIT © 2026 CourseEcho
|
|
267
|
-
|
|
268
|
-
## 📞 Support
|
|
269
|
-
|
|
270
|
-
- 📖 Docs: https://courseecho.com/docs
|
|
271
|
-
- 🐛 Issues: [GitHub Issues](https://github.com/COURSEECHO/courseecho-ai-widget-sdk/issues)
|
|
272
|
-
- 💬 Chat: [Discord](https://discord.gg/courseecho)
|
|
273
|
-
- 📚 Full Guide: [Multi-Framework Integration](https://github.com/COURSEECHO/courseecho-ai-widget-sdk/blob/main/MULTI_FRAMEWORK_INTEGRATION_GUIDE.md)
|
|
274
|
-
|
|
275
|
-
---
|
|
276
|
-
|
|
277
|
-
**More integrations:**
|
|
278
|
-
- [Vue 3](https://www.npmjs.com/package/@courseecho/ai-widget-vue)
|
|
279
|
-
- [Angular 19+](https://www.npmjs.com/package/@courseecho/ai-widget-angular)
|
|
280
|
-
- [jQuery](https://cdn.courseecho.com/ai-widget-jquery.js)
|
|
281
|
-
- [Node.js](https://www.npmjs.com/package/@courseecho/ai-client-node)
|
|
1
|
+
# @courseecho/ai-widget-react
|
|
2
|
+
|
|
3
|
+
**React component for AI chat widget** - Drop-in AI assistance for your React app.
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/@courseecho/ai-widget-react)
|
|
6
|
+
[](https://reactjs.org)
|
|
7
|
+
[](LICENSE)
|
|
8
|
+
|
|
9
|
+
## Overview
|
|
10
|
+
|
|
11
|
+
A **production-ready React component** for integrating CourseEcho AI chat into your React applications.
|
|
12
|
+
|
|
13
|
+
- React 16.8+ (hooks support)
|
|
14
|
+
- TypeScript fully typed
|
|
15
|
+
- Zero external dependencies
|
|
16
|
+
- 15KB minified
|
|
17
|
+
- Works with Next.js, Vite, CRA
|
|
18
|
+
|
|
19
|
+
## Quick Start
|
|
20
|
+
|
|
21
|
+
### Installation
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npm install @courseecho/ai-widget-react @courseecho/ai-core-sdk
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### Basic Usage
|
|
28
|
+
|
|
29
|
+
```jsx
|
|
30
|
+
import { AiChatWidget } from '@courseecho/ai-widget-react';
|
|
31
|
+
|
|
32
|
+
export default function App() {
|
|
33
|
+
return (
|
|
34
|
+
<AiChatWidget
|
|
35
|
+
config={{
|
|
36
|
+
apiKey: 'your-api-key',
|
|
37
|
+
context: {
|
|
38
|
+
pageType: 'course',
|
|
39
|
+
entityId: 'course-123',
|
|
40
|
+
},
|
|
41
|
+
}}
|
|
42
|
+
/>
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
`apiEndpoint` defaults to `https://ai.courseecho.com` — no need to set it.
|
|
48
|
+
|
|
49
|
+
## Props
|
|
50
|
+
|
|
51
|
+
```typescript
|
|
52
|
+
interface AiChatWidgetProps {
|
|
53
|
+
config: AiContextConfig; // Required: apiKey + context minimum
|
|
54
|
+
jwtToken?: string; // Alternative auth: JWT token
|
|
55
|
+
apiKey?: string; // Alternative auth: prop override
|
|
56
|
+
title?: string; // Widget header title
|
|
57
|
+
subtitle?: string; // Widget header subtitle
|
|
58
|
+
placeholder?: string; // Input placeholder
|
|
59
|
+
poweredBy?: string; // Footer branding text
|
|
60
|
+
poweredByUrl?: string; // Footer branding link
|
|
61
|
+
className?: string; // Custom CSS class
|
|
62
|
+
defaultMinimized?: boolean; // Start collapsed (default: false)
|
|
63
|
+
expandedHeight?: string; // Widget height (default: '580px')
|
|
64
|
+
onError?: (error: string) => void;
|
|
65
|
+
onMessageReceived?: (message: AiMessage) => void;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// From @courseecho/ai-core-sdk
|
|
69
|
+
interface AiContextConfig {
|
|
70
|
+
apiKey?: string; // Your CourseEcho API key
|
|
71
|
+
context: AiContext; // Page context (required)
|
|
72
|
+
apiEndpoint?: string; // Override URL (optional, has default)
|
|
73
|
+
theme?: 'light' | 'dark';
|
|
74
|
+
position?: 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left';
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
interface AiContext {
|
|
78
|
+
pageType: string; // 'course', 'lesson', 'general', etc.
|
|
79
|
+
entityId?: string; // e.g. course ID
|
|
80
|
+
userId?: string;
|
|
81
|
+
customData?: Record<string, any>;
|
|
82
|
+
}
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## Examples
|
|
86
|
+
|
|
87
|
+
### Example 1: Course Page
|
|
88
|
+
|
|
89
|
+
```jsx
|
|
90
|
+
import { AiChatWidget } from '@courseecho/ai-widget-react';
|
|
91
|
+
import { useParams } from 'react-router-dom';
|
|
92
|
+
|
|
93
|
+
export function CoursePage() {
|
|
94
|
+
const { courseId } = useParams();
|
|
95
|
+
|
|
96
|
+
return (
|
|
97
|
+
<div>
|
|
98
|
+
<h1>Course Material</h1>
|
|
99
|
+
<main>{/* course content */}</main>
|
|
100
|
+
|
|
101
|
+
<AiChatWidget
|
|
102
|
+
config={{
|
|
103
|
+
apiKey: process.env.REACT_APP_AI_API_KEY,
|
|
104
|
+
context: {
|
|
105
|
+
pageType: 'course',
|
|
106
|
+
entityId: courseId,
|
|
107
|
+
userId: currentUser.id,
|
|
108
|
+
},
|
|
109
|
+
theme: 'light',
|
|
110
|
+
position: 'bottom-right',
|
|
111
|
+
}}
|
|
112
|
+
/>
|
|
113
|
+
</div>
|
|
114
|
+
);
|
|
115
|
+
}
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### Example 2: Dark Theme
|
|
119
|
+
|
|
120
|
+
```jsx
|
|
121
|
+
export function App() {
|
|
122
|
+
return (
|
|
123
|
+
<AiChatWidget
|
|
124
|
+
config={{
|
|
125
|
+
apiKey: 'your-api-key',
|
|
126
|
+
context: { pageType: 'app' },
|
|
127
|
+
theme: 'dark',
|
|
128
|
+
}}
|
|
129
|
+
/>
|
|
130
|
+
);
|
|
131
|
+
}
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
### Example 3: Custom Hook
|
|
135
|
+
|
|
136
|
+
```tsx
|
|
137
|
+
import { useAiWidget } from '@courseecho/ai-widget-react';
|
|
138
|
+
|
|
139
|
+
export function CustomChat() {
|
|
140
|
+
const { messages, isLoading, sendQuery } = useAiWidget({
|
|
141
|
+
apiKey: 'your-api-key',
|
|
142
|
+
context: { pageType: 'course' },
|
|
143
|
+
});
|
|
144
|
+
|
|
145
|
+
return (
|
|
146
|
+
<div>
|
|
147
|
+
{messages.map(msg => (
|
|
148
|
+
<p key={msg.id}>{msg.content}</p>
|
|
149
|
+
))}
|
|
150
|
+
{isLoading && <p>Loading...</p>}
|
|
151
|
+
<button onClick={() => sendQuery('Hello!')}>Send</button>
|
|
152
|
+
</div>
|
|
153
|
+
);
|
|
154
|
+
}
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
## Authentication
|
|
158
|
+
|
|
159
|
+
### API Key (Recommended)
|
|
160
|
+
|
|
161
|
+
```jsx
|
|
162
|
+
<AiChatWidget
|
|
163
|
+
config={{
|
|
164
|
+
apiKey: 'your-api-key',
|
|
165
|
+
context: { pageType: 'general' },
|
|
166
|
+
}}
|
|
167
|
+
/>
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
### JWT Token
|
|
171
|
+
|
|
172
|
+
```jsx
|
|
173
|
+
<AiChatWidget
|
|
174
|
+
config={{ context: { pageType: 'general' } }}
|
|
175
|
+
jwtToken={user.token}
|
|
176
|
+
/>
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
## What's Included
|
|
180
|
+
|
|
181
|
+
```
|
|
182
|
+
dist/
|
|
183
|
+
index.mjs # ES Module
|
|
184
|
+
index.cjs # CommonJS
|
|
185
|
+
index.d.ts # TypeScript definitions
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
## About CourseEcho
|
|
189
|
+
|
|
190
|
+
[CourseEcho](https://courseecho.com) provides AI-powered educational assistance.
|
|
191
|
+
|
|
192
|
+
- Website: https://courseecho.com
|
|
193
|
+
- Support: support@courseecho.com
|
|
194
|
+
|
|
195
|
+
## License
|
|
196
|
+
|
|
197
|
+
MIT 2026 CourseEcho
|
|
198
|
+
|
|
199
|
+
## Support
|
|
200
|
+
|
|
201
|
+
- Docs: https://courseecho.com/docs
|
|
202
|
+
- Issues: [GitHub Issues](https://github.com/COURSEECHO/courseecho-ai-widget-sdk/issues)
|
|
203
|
+
|
|
204
|
+
---
|
|
205
|
+
|
|
206
|
+
**More integrations:**
|
|
207
|
+
- [Vue 3](https://www.npmjs.com/package/@courseecho/ai-widget-vue)
|
|
208
|
+
- [Angular 19+](https://www.npmjs.com/package/@courseecho/ai-widget-angular)
|
|
209
|
+
- [jQuery](https://www.npmjs.com/package/@courseecho/ai-widget-jquery)
|
|
210
|
+
- [Node.js](https://www.npmjs.com/package/@courseecho/ai-client-node)
|
|
282
211
|
- [Core SDK](https://www.npmjs.com/package/@courseecho/ai-core-sdk)
|
package/dist/hooks.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../src/hooks.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EACL,WAAW,EACX,eAAe,EACf,SAAS,EACT,SAAS,EACT,YAAY,EACb,MAAM,yBAAyB,CAAC;AAEjC;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,eAAe,EAAE,QAAQ,CAAC,EAAE,MAAM;;
|
|
1
|
+
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../src/hooks.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EACL,WAAW,EACX,eAAe,EACf,SAAS,EACT,SAAS,EACT,YAAY,EACb,MAAM,yBAAyB,CAAC;AAEjC;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,eAAe,EAAE,QAAQ,CAAC,EAAE,MAAM;;uBAiClD,MAAM;oBAcZ,MAAM;;2BAaL,MAAM,GAAG,KAAK;;;EAgB1B;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,WAAW,eAY7C;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,WAAW,WAY5C;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,WAAW,iBAY1C;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,WAAW;;gCAY5B,OAAO,CAAC,SAAS,CAAC;iCAOzB,MAAM,SAAS,GAAG;EAW3B;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,WAAW;;+BAcrC,MAAM;EAOjB;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,eAAe,EAAE,QAAQ,CAAC,EAAE,MAAM;;;;;;uBAhKpD,MAAM;gCA+GP,OAAO,CAAC,SAAS,CAAC;iCAOzB,MAAM,SAAS,GAAG;;;;+BA8BhB,MAAM;EAsCjB"}
|
package/dist/hooks.js
CHANGED
|
@@ -17,13 +17,7 @@ export function useAiChat(config, jwtToken) {
|
|
|
17
17
|
// Initialize SDK on mount
|
|
18
18
|
useEffect(() => {
|
|
19
19
|
try {
|
|
20
|
-
|
|
21
|
-
const defaultEndpoint = 'https://ai.courseecho.com';
|
|
22
|
-
const configWithDefaults = {
|
|
23
|
-
...config,
|
|
24
|
-
apiEndpoint: config.apiEndpoint || defaultEndpoint
|
|
25
|
-
};
|
|
26
|
-
const sdk = new AiWidgetSDK(configWithDefaults);
|
|
20
|
+
const sdk = new AiWidgetSDK(config);
|
|
27
21
|
if (jwtToken) {
|
|
28
22
|
sdk.setJwtToken(jwtToken);
|
|
29
23
|
}
|
package/dist/hooks.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.js","sourceRoot":"","sources":["../src/hooks.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACjE,OAAO,EACL,WAAW,GAKZ,MAAM,yBAAyB,CAAC;AAEjC;;;;;GAKG;AACH,MAAM,UAAU,SAAS,CAAC,MAAuB,EAAE,QAAiB;IAClE,MAAM,MAAM,GAAG,MAAM,CAAqB,IAAI,CAAC,CAAC;IAChD,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IACtD,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAgB,IAAI,CAAC,CAAC;IAExD,0BAA0B;IAC1B,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,CAAC;YACH,
|
|
1
|
+
{"version":3,"file":"hooks.js","sourceRoot":"","sources":["../src/hooks.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACjE,OAAO,EACL,WAAW,GAKZ,MAAM,yBAAyB,CAAC;AAEjC;;;;;GAKG;AACH,MAAM,UAAU,SAAS,CAAC,MAAuB,EAAE,QAAiB;IAClE,MAAM,MAAM,GAAG,MAAM,CAAqB,IAAI,CAAC,CAAC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O,GAAG,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC;IACtC,CAAC,EACD,CAAC,GAAG,CAAC,CACN,CAAC;IAEF,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,CAAC;AAC5C,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,WAAW,CAAC,MAAuB,EAAE,QAAiB;IACpE,MAAM,EAAE,GAAG,EAAE,SAAS,EAAE,WAAW,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,SAAS,CACjE,MAAM,EACN,QAAQ,CACT,CAAC;IAEF,MAAM,QAAQ,GAAG,aAAa,CAAC,GAAG,CAAC,CAAC;IACpC,MAAM,SAAS,GAAG,YAAY,CAAC,GAAG,CAAC,CAAC;IACpC,MAAM,KAAK,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC;IAC9B,MAAM,EAAE,OAAO,EAAE,aAAa,EAAE,qBAAqB,EAAE,GAAG,YAAY,CAAC,GAAG,CAAC,CAAC;IAC5E,MAAM,EAAE,WAAW,EAAE,iBAAiB,EAAE,GAAG,gBAAgB,CAAC,GAAG,CAAC,CAAC;IAEjE,OAAO;QACL,GAAG;QACH,QAAQ;QACR,SAAS;QACT,KAAK;QACL,OAAO;QACP,SAAS;QACT,aAAa;QACb,qBAAqB;QACrB,WAAW;QACX,SAAS;QACT,WAAW;QACX,iBAAiB;KAClB,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@courseecho/ai-widget-react",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.12",
|
|
4
4
|
"description": "React component for AI chat widget. Use the SDK in any React app.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "CourseEcho",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"chat"
|
|
34
34
|
],
|
|
35
35
|
"peerDependencies": {
|
|
36
|
-
"@courseecho/ai-core-sdk": "
|
|
36
|
+
"@courseecho/ai-core-sdk": "^1.0.0",
|
|
37
37
|
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
|
|
38
38
|
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
|
|
39
39
|
},
|
|
@@ -52,7 +52,9 @@
|
|
|
52
52
|
"ts-jest": "^29.0.0",
|
|
53
53
|
"typescript": "^5.3.0"
|
|
54
54
|
},
|
|
55
|
-
"
|
|
56
|
-
"@courseecho/ai-core-sdk":
|
|
55
|
+
"peerDependenciesMeta": {
|
|
56
|
+
"@courseecho/ai-core-sdk": {
|
|
57
|
+
"optional": false
|
|
58
|
+
}
|
|
57
59
|
}
|
|
58
60
|
}
|