gentiq 0.7.30 → 0.7.32

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
@@ -150,6 +150,7 @@ Support multiple languages (including RTL) and customize your brand's unique loo
150
150
  ```tsx
151
151
  <GentiqProvider
152
152
  theme={{
153
+ defaultTheme: 'system',
153
154
  accent: '#6366f1',
154
155
  radius: 20,
155
156
  typography: {
@@ -170,6 +171,11 @@ Support multiple languages (including RTL) and customize your brand's unique loo
170
171
  </GentiqProvider>
171
172
  ```
172
173
 
174
+ `defaultTheme` accepts `system`, `light`, or `dark`. Appearance preferences are
175
+ resolved in this order: the user's saved preference, the defaults configured in
176
+ the admin settings page, the `theme` values passed to `GentiqProvider`, and
177
+ finally Gentiq's built-in defaults.
178
+
173
179
  ---
174
180
 
175
181
  ## 👥 Custom User Metadata Fields
@@ -208,6 +214,51 @@ Easily extend user profiles and signup forms with your own fields. Gentiq handle
208
214
  </GentiqProvider>
209
215
  ```
210
216
 
217
+ ## Personalized Greetings
218
+
219
+ Use a functional greeting to personalize the built-in welcome screen. Gentiq
220
+ loads and caches the authenticated profile for you:
221
+
222
+ ```tsx
223
+ <GentiqProvider
224
+ welcome={{
225
+ greeting: ({ firstName, t }) =>
226
+ t(firstName ? 'chat:welcome.named' : 'chat:welcome.default', {
227
+ firstName,
228
+ }),
229
+ }}
230
+ i18n={{
231
+ resources: {
232
+ en: {
233
+ chat: {
234
+ welcome: {
235
+ default: 'How can I help you today?',
236
+ named: 'Hi {{firstName}}, how can I help you today?',
237
+ },
238
+ },
239
+ },
240
+ },
241
+ }}
242
+ >
243
+ <ChatUI />
244
+ </GentiqProvider>
245
+ ```
246
+
247
+ For custom screens or other components, use the same profile data directly:
248
+
249
+ ```tsx
250
+ import { useGentiqUser } from 'gentiq';
251
+
252
+ function MyWelcomeScreen() {
253
+ const { user, firstName, isLoading, error } = useGentiqUser();
254
+
255
+ if (isLoading) return null;
256
+ if (error) return <h1>Welcome!</h1>;
257
+
258
+ return <h1>Welcome, {firstName || user?.phone}!</h1>;
259
+ }
260
+ ```
261
+
211
262
  ---
212
263
 
213
264
  ## 📄 License