@emblemvault/hustle-react 1.4.7 → 1.4.8

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
@@ -10,7 +10,9 @@ npm install @emblemvault/hustle-react
10
10
 
11
11
  ## Quick Start
12
12
 
13
- ### With Auth SDK (Recommended)
13
+ ### Web Application (Recommended)
14
+
15
+ Use the React component with Emblem Auth for a complete authentication experience:
14
16
 
15
17
  ```tsx
16
18
  import { EmblemAuthProvider, ConnectButton } from '@emblemvault/emblem-auth-react';
@@ -28,7 +30,9 @@ function App() {
28
30
  }
29
31
  ```
30
32
 
31
- ### With API Key (Standalone)
33
+ ### With API Key (Deprecated)
34
+
35
+ > ⚠️ **Deprecated:** API key authentication is deprecated and will be removed in a future version. Please migrate to the Emblem Auth React component for better security and user experience.
32
36
 
33
37
  ```tsx
34
38
  import { HustleProvider, HustleChat } from '@emblemvault/hustle-react';
@@ -50,13 +54,9 @@ Provides chat context to your app.
50
54
 
51
55
  ```tsx
52
56
  <HustleProvider
53
- // With auth SDK (default) - uses EmblemAuthProvider context
57
+ // With EmblemAuthProvider (recommended) - uses authentication context
54
58
  hustleApiUrl="https://agenthustle.ai" // optional
55
59
 
56
- // OR with API key (standalone)
57
- apiKey="your-key"
58
- vaultId="your-vault"
59
-
60
60
  // Multi-instance support
61
61
  instanceId="unique-id" // Scopes settings per instance
62
62
  >
@@ -64,6 +64,12 @@ Provides chat context to your app.
64
64
  </HustleProvider>
65
65
  ```
66
66
 
67
+ **Props:**
68
+ - `hustleApiUrl` (optional) - Hustle API endpoint URL. Defaults to `https://agenthustle.ai`
69
+ - `instanceId` (optional) - Unique identifier for multi-instance setups. Scopes settings and plugins per instance.
70
+ - ~~`apiKey`~~ (deprecated) - API key for standalone auth. **Deprecated:** Use `EmblemAuthProvider` instead.
71
+ - ~~`vaultId`~~ (deprecated) - Vault ID for standalone auth. **Deprecated:** Use `EmblemAuthProvider` instead.
72
+
67
73
  ### useHustle
68
74
 
69
75
  Access chat state and methods.
@@ -116,6 +122,7 @@ Complete chat UI component.
116
122
  Floating chat widget for site-wide chatbot integration. Perfect for customer support or AI assistants that persist across page navigations.
117
123
 
118
124
  ```tsx
125
+ import { EmblemAuthProvider } from '@emblemvault/emblem-auth-react';
119
126
  import { HustleProvider, HustleChatWidget } from '@emblemvault/hustle-react';
120
127
 
121
128
  // Add to your Next.js layout for site-wide availability
@@ -123,25 +130,27 @@ export default function RootLayout({ children }) {
123
130
  return (
124
131
  <html>
125
132
  <body>
126
- <HustleProvider>
127
- {children}
128
- <HustleChatWidget
129
- config={{
130
- position: 'bottom-right', // 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left'
131
- size: 'md', // 'sm' | 'md' | 'lg' | 'xl' | 'full'
132
- title: 'Support', // Header title
133
- defaultOpen: false, // Start open?
134
- offset: { x: 24, y: 24 }, // Edge offset in pixels
135
- storageKey: 'chat-open', // localStorage key for persistence (false to disable)
136
- showBadge: true, // Show notification badge
137
- badgeContent: 3, // Badge content
138
- onOpen: () => {}, // Called when widget opens
139
- onClose: () => {}, // Called when widget closes
140
- }}
141
- placeholder="How can we help?"
142
- showSettings
143
- />
144
- </HustleProvider>
133
+ <EmblemAuthProvider appId="your-app-id">
134
+ <HustleProvider>
135
+ {children}
136
+ <HustleChatWidget
137
+ config={{
138
+ position: 'bottom-right', // 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left'
139
+ size: 'md', // 'sm' | 'md' | 'lg' | 'xl' | 'full'
140
+ title: 'Support', // Header title
141
+ defaultOpen: false, // Start open?
142
+ offset: { x: 24, y: 24 }, // Edge offset in pixels
143
+ storageKey: 'chat-open', // localStorage key for persistence (false to disable)
144
+ showBadge: true, // Show notification badge
145
+ badgeContent: 3, // Badge content
146
+ onOpen: () => {}, // Called when widget opens
147
+ onClose: () => {}, // Called when widget closes
148
+ }}
149
+ placeholder="How can we help?"
150
+ showSettings
151
+ />
152
+ </HustleProvider>
153
+ </EmblemAuthProvider>
145
154
  </body>
146
155
  </html>
147
156
  );
@@ -251,19 +260,28 @@ const plugin: HustlePlugin = {
251
260
 
252
261
  ## Multi-Instance Support
253
262
 
254
- Run multiple isolated chat instances:
263
+ Run multiple isolated chat instances with separate settings and plugins:
255
264
 
256
265
  ```tsx
257
- <HustleProvider instanceId="trading-bot">
258
- <HustleChat />
259
- </HustleProvider>
266
+ import { EmblemAuthProvider } from '@emblemvault/emblem-auth-react';
267
+ import { HustleProvider, HustleChat } from '@emblemvault/hustle-react';
260
268
 
261
- <HustleProvider instanceId="support-bot">
262
- <HustleChat />
263
- </HustleProvider>
269
+ function App() {
270
+ return (
271
+ <EmblemAuthProvider appId="your-app-id">
272
+ <HustleProvider instanceId="trading-bot">
273
+ <HustleChat />
274
+ </HustleProvider>
275
+
276
+ <HustleProvider instanceId="support-bot">
277
+ <HustleChat />
278
+ </HustleProvider>
279
+ </EmblemAuthProvider>
280
+ );
281
+ }
264
282
  ```
265
283
 
266
- Each instance has separate settings and plugins stored under its ID.
284
+ Each instance has separate settings and plugins stored under its unique `instanceId`.
267
285
 
268
286
  ## Underlying SDK
269
287
 
@@ -15840,7 +15840,7 @@ var widgetStyles = {
15840
15840
  width: "56px",
15841
15841
  height: "56px",
15842
15842
  borderRadius: tokens.radius.full,
15843
- background: `linear-gradient(135deg, ${tokens.colors.accentPrimary} 0%, #2d7dd2 100%)`,
15843
+ background: `linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%)`,
15844
15844
  border: "none",
15845
15845
  cursor: "pointer",
15846
15846
  display: "flex",