@cuekit-ai/react 1.2.0 → 1.2.2

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 CHANGED
@@ -190,6 +190,7 @@ The SDK can integrate with your application's router via the `navigationHandler`
190
190
  ```tsx
191
191
  import { useNavigate } from 'react-router-dom'
192
192
  import { CuekitProvider } from '@cuekit-ai/react'
193
+ import '@cuekit-ai/react/styles.css'
193
194
 
194
195
  function AppProviders({ children }) {
195
196
  const navigate = useNavigate()
@@ -208,6 +209,41 @@ function AppProviders({ children }) {
208
209
  }
209
210
  ```
210
211
 
212
+ **Next.js Example**:
213
+
214
+ ```tsx
215
+ 'use client'
216
+
217
+ import { CuekitProvider } from '@cuekit-ai/react'
218
+ import { useRouter } from 'next/navigation'
219
+ import dynamic from 'next/dynamic'
220
+ import React from 'react'
221
+ import '@cuekit-ai/react/styles.css'
222
+
223
+ const DynamicCuekitProvider = dynamic(
224
+ () => import('@/providers/cuekit-provider').then((mod) => mod.CuekitProvider),
225
+ {
226
+ ssr: false,
227
+ }
228
+ )
229
+
230
+ export default function AppProviders({ children }: { children: React.ReactNode }) {
231
+ const router = useRouter()
232
+ return (
233
+ <DynamicCuekitProvider
234
+ apiKey="YOUR_API_KEY"
235
+ appId="YOUR_APP_ID"
236
+ navigationHandler={(path, params) => {
237
+ const qs = params ? `?${new URLSearchParams(params).toString()}` : ''
238
+ router.push(`${path}${qs}`)
239
+ }}
240
+ >
241
+ {children}
242
+ </DynamicCuekitProvider>
243
+ )
244
+ }
245
+ ```
246
+
211
247
  ## 🐛 Troubleshooting
212
248
 
213
249
  If you're having trouble, here are a few things to check:
@@ -215,7 +251,6 @@ If you're having trouble, here are a few things to check:
215
251
  - **Microphone Not Working**: Ensure that you've granted microphone permissions to your site. Also, the SDK requires a secure (HTTPS) connection to function.
216
252
  - **Voice Commands Not Recognized**: Check your internet connection and ensure that you've provided a valid API key and app ID to the `CuekitProvider`.
217
253
  - **Styling Issues**: Make sure you've imported the CSS file as described in the [Installation](#-installation) section.
218
- - **WebRTC Connection Issues**: Check your browser's console for any error messages related to WebRTC. Ensure your network doesn't block the necessary ports.
219
254
 
220
255
  ---
221
256
 
package/dist/cuekit.css CHANGED
@@ -203,9 +203,6 @@
203
203
  max-width: 96rem;
204
204
  }
205
205
  }
206
- .block {
207
- display: block;
208
- }
209
206
  .flex {
210
207
  display: flex;
211
208
  }
package/package.json CHANGED
@@ -1,18 +1,16 @@
1
1
  {
2
2
  "name": "@cuekit-ai/react",
3
- "version": "1.2.0",
3
+ "version": "1.2.2",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "exports": {
7
7
  ".": {
8
+ "types": "./dist/index.d.ts",
8
9
  "import": "./dist/index.mjs",
9
10
  "require": "./dist/index.js"
10
11
  },
11
12
  "./babel": "./babel/index.js",
12
- "./styles.css": {
13
- "import": "./dist/cuekit.css",
14
- "require": "./dist/cuekit.css"
15
- }
13
+ "./styles.css": "./dist/cuekit.css"
16
14
  },
17
15
  "files": [
18
16
  "dist",