@ibti-tech/chatbot 0.5.6 → 0.5.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
@@ -276,12 +276,186 @@ npm install react react-dom lodash nookies
276
276
 
277
277
  ## 📡 Backend API
278
278
 
279
- The chatbot expects the backend API to be configured and accessible at the provided URL. The API must implement the necessary endpoints for:
279
+ The chatbot expects the backend API to be configured and accessible at the provided URL. The API must implement the following endpoints:
280
280
 
281
- - Sending messages
282
- - Receiving responses
283
- - Managing conversation history
284
- - Suggested questions
281
+ ### Required Endpoints
282
+
283
+ #### 1. `GET /chat/welcome?locale={locale}`
284
+
285
+ **Purpose**: Retrieves the welcome message and checks API health/availability.
286
+
287
+ **Query Parameters**:
288
+ - `locale` (required): The locale code (`'pt-BR'` or `'en'`)
289
+
290
+ **Response**:
291
+ ```json
292
+ {
293
+ "welcomeMessage": "Hello! How can I help you today?"
294
+ }
295
+ ```
296
+
297
+ **Status Codes**:
298
+ - `200 OK`: API is available and welcome message is returned
299
+ - `4xx/5xx`: API is considered unavailable
300
+
301
+ **Notes**:
302
+ - This endpoint is used for health checks (via `HEAD` or `GET` requests)
303
+ - The chatbot uses this to determine connection status
304
+ - Should return a welcome message appropriate for the specified locale
305
+
306
+ ---
307
+
308
+ #### 2. `POST /chat/completion?locale={locale}`
309
+
310
+ **Purpose**: Sends a chat message and receives a streaming response from the AI assistant.
311
+
312
+ **Query Parameters**:
313
+ - `locale` (required): The locale code (`'pt-BR'` or `'en'`)
314
+
315
+ **Request Body**:
316
+ ```json
317
+ {
318
+ "context": [
319
+ {
320
+ "role": "user",
321
+ "content": "What is artificial intelligence?"
322
+ },
323
+ {
324
+ "role": "assistant",
325
+ "content": "Artificial intelligence (AI) is..."
326
+ },
327
+ {
328
+ "role": "user",
329
+ "content": "Tell me more about machine learning"
330
+ }
331
+ ]
332
+ }
333
+ ```
334
+
335
+ **Request Body Schema**:
336
+ - `context` (required, array): Array of chat messages representing the conversation history
337
+ - Each item must have:
338
+ - `role` (required, string): Either `"user"` or `"assistant"`
339
+ - `content` (required, string): The message content
340
+ - The array must not be empty
341
+ - The last message should typically be from the `"user"` role
342
+
343
+ **Response**:
344
+ - **Content-Type**: `text/event-stream`
345
+ - **Format**: Server-Sent Events (SSE) stream
346
+ - **Body**: Plain text chunks that are concatenated to form the complete response
347
+
348
+ **Response Headers**:
349
+ ```
350
+ Content-Type: text/event-stream
351
+ Cache-Control: no-cache
352
+ Connection: keep-alive
353
+ ```
354
+
355
+ **Status Codes**:
356
+ - `200 OK`: Stream started successfully
357
+ - `429 Too Many Requests`: Rate limit exceeded (should send error message via stream before closing)
358
+ - `4xx/5xx`: Error occurred
359
+
360
+ **Streaming Behavior**:
361
+ - The response is sent as a continuous stream of text chunks
362
+ - Each chunk is immediately displayed to the user as it arrives
363
+ - The stream ends when the complete response is sent
364
+ - The chatbot accumulates all chunks to form the final message
365
+
366
+ **Error Handling**:
367
+ - For `429` errors, the API should send a friendly error message via the stream before closing:
368
+ ```json
369
+ {"error": "Sorry, too many requests were made. Please try again in a few moments. 😊"}
370
+ ```
371
+ - For other errors, the stream should be closed and an appropriate HTTP status code returned
372
+
373
+ **Example Flow**:
374
+ 1. Frontend sends POST request with conversation context
375
+ 2. Backend starts streaming response chunks
376
+ 3. Frontend receives chunks and displays them incrementally
377
+ 4. Stream completes when response is finished
378
+ 5. Frontend saves the complete message to conversation history
379
+
380
+ ---
381
+
382
+ #### 3. `POST /chat/feedback`
383
+
384
+ **Purpose**: Submits user feedback about a chatbot response (rating and optional message).
385
+
386
+ **Request Body**:
387
+ ```json
388
+ {
389
+ "rating_score": 5,
390
+ "chat_context": [
391
+ {
392
+ "role": "user",
393
+ "content": "What is AI?"
394
+ },
395
+ {
396
+ "role": "assistant",
397
+ "content": "Artificial intelligence is..."
398
+ }
399
+ ],
400
+ "locale": "pt-BR",
401
+ "message": "Very helpful response!"
402
+ }
403
+ ```
404
+
405
+ **Request Body Schema**:
406
+ - `rating_score` (required, number): Rating from 1 to 5 (inclusive)
407
+ - Valid values: `1`, `2`, `3`, `4`, `5`
408
+ - `chat_context` (required, array): The conversation context that was rated
409
+ - Same structure as in `/chat/completion` endpoint
410
+ - Must not be empty
411
+ - `locale` (required, string): The locale code (`'pt-BR'` or `'en'`)
412
+ - `message` (optional, string): Optional feedback message from the user
413
+
414
+ **Response**:
415
+ - **Status Code**: `200 OK` or `201 Created` (implementation dependent)
416
+ - **Body**: Typically empty or a success confirmation
417
+
418
+ **Status Codes**:
419
+ - `200 OK` / `201 Created`: Feedback submitted successfully
420
+ - `400 Bad Request`: Invalid request body (invalid rating, missing fields, etc.)
421
+ - `4xx/5xx`: Other errors
422
+
423
+ **Notes**:
424
+ - This endpoint is called when a user rates a chatbot response
425
+ - The feedback is typically stored for analytics and improvement purposes
426
+ - The endpoint should handle the request asynchronously if possible to avoid blocking the UI
427
+
428
+ ---
429
+
430
+ ### API Requirements Summary
431
+
432
+ | Endpoint | Method | Purpose | Streaming | Required |
433
+ |----------|--------|---------|-----------|----------|
434
+ | `/chat/welcome` | `GET` | Health check & welcome message | ❌ | ✅ |
435
+ | `/chat/completion` | `POST` | Send message & receive response | ✅ | ✅ |
436
+ | `/chat/feedback` | `POST` | Submit user feedback | ❌ | ✅ |
437
+
438
+ ### Implementation Notes
439
+
440
+ 1. **CORS**: The API must allow cross-origin requests from the frontend domain
441
+ 2. **Locale Support**: All endpoints should respect the `locale` parameter and return appropriate content
442
+ 3. **Error Handling**: Provide clear error messages in the appropriate locale
443
+ 4. **Streaming**: The `/chat/completion` endpoint must support Server-Sent Events (SSE) for real-time response streaming
444
+ 5. **Rate Limiting**: Consider implementing rate limiting and return `429` status when exceeded
445
+ 6. **Content-Type**:
446
+ - Use `application/json` for JSON endpoints
447
+ - Use `text/event-stream` for streaming endpoints
448
+
449
+ ### Example API Base URL
450
+
451
+ ```jsx
452
+ <ChatbotProvider
453
+ apiURL="https://api.example.com" // Base URL without trailing slash
454
+ // ...
455
+ />
456
+ ```
457
+
458
+ The chatbot will automatically append the endpoint paths (e.g., `/chat/welcome`, `/chat/completion`, `/chat/feedback`) to this base URL.
285
459
 
286
460
  ## 🐛 Issues and Support
287
461
 
package/dist/index.d.ts CHANGED
@@ -37,7 +37,7 @@ declare module '@ibti-tech/chatbot/components/ChatUserFeedbackRating/styles' {
37
37
  //# sourceMappingURL=styles.d.ts.map
38
38
  }
39
39
  declare module '@ibti-tech/chatbot/components/ChatUserFeedbackRating/styles.d.ts' {
40
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../home/runner/work/ibti-chatbot/ibti-chatbot/src/components/ChatUserFeedbackRating/styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,aAAa,6NAWzB,CAAA;AAED,eAAO,MAAM,IAAI,mOA+ChB,CAAA;AAED,eAAO,MAAM,WAAW,6NAIvB,CAAA;AAED,eAAO,MAAM,KAAK,+NAKjB,CAAA;AAED,eAAO,MAAM,GAAG;;;;;;;wRAKf,CAAA;AAED,eAAO,MAAM,OAAO;aAAyB,OAAO;YA4BnD,CAAA"}
40
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../home/runner/work/ibti-chatbot/ibti-chatbot/src/components/ChatUserFeedbackRating/styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,aAAa,6NAWzB,CAAA;AAED,eAAO,MAAM,IAAI,mOAkDhB,CAAA;AAED,eAAO,MAAM,WAAW,6NAKvB,CAAA;AAED,eAAO,MAAM,KAAK,+NAKjB,CAAA;AAED,eAAO,MAAM,GAAG;;;;;;;wRAef,CAAA;AAED,eAAO,MAAM,OAAO;aAAyB,OAAO;YA4BnD,CAAA"}
41
41
  }
42
42
  declare module '@ibti-tech/chatbot/components/ChatbotBar/index' {
43
43
  import React from 'react';
@@ -69,7 +69,7 @@ declare module '@ibti-tech/chatbot/components/ChatbotBar/styles' {
69
69
  //# sourceMappingURL=styles.d.ts.map
70
70
  }
71
71
  declare module '@ibti-tech/chatbot/components/ChatbotBar/styles.d.ts' {
72
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../home/runner/work/ibti-chatbot/ibti-chatbot/src/components/ChatbotBar/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAW,MAAM,eAAe,CAAA;AAIpD,eAAO,MAAM,YAAY;;oBAGH,kBACnB;;yBAHoB,MAAM,GAAG,OAAO;aAC5B,OAAO;uBACG,KAAK,GAAG,QAAQ;iMAqBpC,CAAA;AAED,eAAO,MAAM,OAAO;uBACC,KAAK,GAAG,QAAQ;yBACd,MAAM,GAAG,OAAO;aAC5B,OAAO;YAwCjB,CAAA"}
72
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../home/runner/work/ibti-chatbot/ibti-chatbot/src/components/ChatbotBar/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAW,MAAM,eAAe,CAAA;AAIpD,eAAO,MAAM,YAAY;;oBAGH,kBACnB;;yBAHoB,MAAM,GAAG,OAAO;aAC5B,OAAO;uBACG,KAAK,GAAG,QAAQ;iMAgCpC,CAAA;AAED,eAAO,MAAM,OAAO;uBACC,KAAK,GAAG,QAAQ;yBACd,MAAM,GAAG,OAAO;aAC5B,OAAO;YAwCjB,CAAA"}
73
73
  }
74
74
  declare module '@ibti-tech/chatbot/components/ChatbotBody/index' {
75
75
  import React from 'react';
@@ -88,7 +88,7 @@ declare module '@ibti-tech/chatbot/components/ChatbotBody/styles' {
88
88
  //# sourceMappingURL=styles.d.ts.map
89
89
  }
90
90
  declare module '@ibti-tech/chatbot/components/ChatbotBody/styles.d.ts' {
91
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../home/runner/work/ibti-chatbot/ibti-chatbot/src/components/ChatbotBody/styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY,6NAAe,CAAA;AAExC,eAAO,MAAM,YAAY,iOAQxB,CAAA;AAED,eAAO,MAAM,OAAO,6NA4BnB,CAAA"}
91
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../home/runner/work/ibti-chatbot/ibti-chatbot/src/components/ChatbotBody/styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY,6NAAe,CAAA;AAExC,eAAO,MAAM,YAAY,iOAQxB,CAAA;AAED,eAAO,MAAM,OAAO,6NAsCnB,CAAA"}
92
92
  }
93
93
  declare module '@ibti-tech/chatbot/components/ChatbotDevice/index' {
94
94
  import React from 'react';
@@ -110,7 +110,7 @@ declare module '@ibti-tech/chatbot/components/ChatbotDevice/styles' {
110
110
  //# sourceMappingURL=styles.d.ts.map
111
111
  }
112
112
  declare module '@ibti-tech/chatbot/components/ChatbotDevice/styles.d.ts' {
113
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../home/runner/work/ibti-chatbot/ibti-chatbot/src/components/ChatbotDevice/styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,OAAO;aACT,OAAO;uBACG,KAAK,GAAG,QAAQ;YAgEpC,CAAA"}
113
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../home/runner/work/ibti-chatbot/ibti-chatbot/src/components/ChatbotDevice/styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,OAAO;aACT,OAAO;uBACG,KAAK,GAAG,QAAQ;YA0EpC,CAAA"}
114
114
  }
115
115
  declare module '@ibti-tech/chatbot/components/ChatbotFooter/index' {
116
116
  import React from 'react';
@@ -129,7 +129,7 @@ declare module '@ibti-tech/chatbot/components/ChatbotFooter/styles' {
129
129
  //# sourceMappingURL=styles.d.ts.map
130
130
  }
131
131
  declare module '@ibti-tech/chatbot/components/ChatbotFooter/styles.d.ts' {
132
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../home/runner/work/ibti-chatbot/ibti-chatbot/src/components/ChatbotFooter/styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,yBAAyB,+NAOrC,CAAA;AAED,eAAO,MAAM,IAAI,mOA4EhB,CAAA;AAED,eAAO,MAAM,OAAO,6NAEnB,CAAA"}
132
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../home/runner/work/ibti-chatbot/ibti-chatbot/src/components/ChatbotFooter/styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,yBAAyB,+NAQrC,CAAA;AAED,eAAO,MAAM,IAAI,mOA+EhB,CAAA;AAED,eAAO,MAAM,OAAO,6NAYnB,CAAA"}
133
133
  }
134
134
  declare module '@ibti-tech/chatbot/components/ChatbotHeader/index' {
135
135
  import React from 'react';
@@ -152,7 +152,7 @@ declare module '@ibti-tech/chatbot/components/ChatbotHeader/styles' {
152
152
  //# sourceMappingURL=styles.d.ts.map
153
153
  }
154
154
  declare module '@ibti-tech/chatbot/components/ChatbotHeader/styles.d.ts' {
155
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../home/runner/work/ibti-chatbot/ibti-chatbot/src/components/ChatbotHeader/styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI,+NAGhB,CAAA;AAED,eAAO,MAAM,WAAW,6NAIvB,CAAA;AAED,eAAO,MAAM,YAAY,+NAaxB,CAAA;AAED,eAAO,MAAM,OAAO,6NAMnB,CAAA"}
155
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../home/runner/work/ibti-chatbot/ibti-chatbot/src/components/ChatbotHeader/styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI,+NAGhB,CAAA;AAED,eAAO,MAAM,WAAW,6NAIvB,CAAA;AAED,eAAO,MAAM,YAAY,+NAaxB,CAAA;AAED,eAAO,MAAM,OAAO,6NAgBnB,CAAA"}
156
156
  }
157
157
  declare module '@ibti-tech/chatbot/components/ChatbotStatusLabel/index' {
158
158
  import React from 'react';
@@ -171,7 +171,7 @@ declare module '@ibti-tech/chatbot/components/ChatbotStatusLabel/styles' {
171
171
  //# sourceMappingURL=styles.d.ts.map
172
172
  }
173
173
  declare module '@ibti-tech/chatbot/components/ChatbotStatusLabel/styles.d.ts' {
174
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../home/runner/work/ibti-chatbot/ibti-chatbot/src/components/ChatbotStatusLabel/styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,OAAO;kBAA+B,MAAM;YAaxD,CAAA"}
174
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../home/runner/work/ibti-chatbot/ibti-chatbot/src/components/ChatbotStatusLabel/styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,OAAO;kBAA+B,MAAM;YAoBxD,CAAA"}
175
175
  }
176
176
  declare module '@ibti-tech/chatbot/components/ChatbotToggle/index' {
177
177
  import React from 'react';
@@ -194,7 +194,7 @@ declare module '@ibti-tech/chatbot/components/ChatbotToggle/styles' {
194
194
  //# sourceMappingURL=styles.d.ts.map
195
195
  }
196
196
  declare module '@ibti-tech/chatbot/components/ChatbotToggle/styles.d.ts' {
197
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../home/runner/work/ibti-chatbot/ibti-chatbot/src/components/ChatbotToggle/styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,aAAa;aACf,OAAO;uBACG,KAAK,GAAG,QAAQ;YA0CpC,CAAA"}
197
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../home/runner/work/ibti-chatbot/ibti-chatbot/src/components/ChatbotToggle/styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,aAAa;aACf,OAAO;uBACG,KAAK,GAAG,QAAQ;YAgDpC,CAAA"}
198
198
  }
199
199
  declare module '@ibti-tech/chatbot/components/MessageBalloon/index' {
200
200
  import React from 'react';
@@ -244,7 +244,7 @@ declare module '@ibti-tech/chatbot/components/MessageBalloon/styles' {
244
244
  //# sourceMappingURL=styles.d.ts.map
245
245
  }
246
246
  declare module '@ibti-tech/chatbot/components/MessageBalloon/styles.d.ts' {
247
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../home/runner/work/ibti-chatbot/ibti-chatbot/src/components/MessageBalloon/styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,IAAI;WAAwB,UAAU,GAAG,MAAM;YAkB3D,CAAA;AAED,eAAO,MAAM,OAAO;WACX,UAAU,GAAG,MAAM;aACjB,OAAO;YA2JjB,CAAA;AAED,eAAO,MAAM,KAAK,+NAGjB,CAAA;AAED,eAAO,MAAM,wBAAwB;WAAuB,UAAU,GAAG,MAAM;YAiB9E,CAAA;AAED,eAAO,MAAM,gBAAgB;WAAuB,UAAU,GAAG,MAAM;YAmBtE,CAAA;AAED,eAAO,MAAM,sBAAsB;WAAuB,UAAU,GAAG,MAAM;YAqB5E,CAAA;AAED,eAAO,MAAM,gBAAgB;WAAuB,UAAU,GAAG,MAAM;gBAAc,OAAO;YAoC3F,CAAA;AAED,eAAO,MAAM,YAAY;kBAAiC,UAAU,GAAG,MAAM;YA2B5E,CAAA;AAED,eAAO,MAAM,OAAO;kBAA+B,UAAU,GAAG,MAAM;YAerE,CAAA;AAED,eAAO,MAAM,OAAO;WAAuB,UAAU,GAAG,MAAM;YAiB7D,CAAA"}
247
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../home/runner/work/ibti-chatbot/ibti-chatbot/src/components/MessageBalloon/styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,IAAI;WAAwB,UAAU,GAAG,MAAM;YAoB3D,CAAA;AAED,eAAO,MAAM,OAAO;WACX,UAAU,GAAG,MAAM;aACjB,OAAO;YAqKjB,CAAA;AAED,eAAO,MAAM,KAAK,+NAKjB,CAAA;AAED,eAAO,MAAM,wBAAwB;WAAuB,UAAU,GAAG,MAAM;YAiB9E,CAAA;AAED,eAAO,MAAM,gBAAgB;WAAuB,UAAU,GAAG,MAAM;YAmBtE,CAAA;AAED,eAAO,MAAM,sBAAsB;WAAuB,UAAU,GAAG,MAAM;YAqB5E,CAAA;AAED,eAAO,MAAM,gBAAgB;WAAuB,UAAU,GAAG,MAAM;gBAAc,OAAO;YAoC3F,CAAA;AAED,eAAO,MAAM,YAAY;kBAAiC,UAAU,GAAG,MAAM;YA2B5E,CAAA;AAED,eAAO,MAAM,OAAO;kBAA+B,UAAU,GAAG,MAAM;YAgBrE,CAAA;AAED,eAAO,MAAM,OAAO;WAAuB,UAAU,GAAG,MAAM;YAkB7D,CAAA"}
248
248
  }
249
249
  declare module '@ibti-tech/chatbot/components/SuggestedQuestions/index' {
250
250
  import React from 'react';
@@ -265,7 +265,7 @@ declare module '@ibti-tech/chatbot/components/SuggestedQuestions/styles' {
265
265
  //# sourceMappingURL=styles.d.ts.map
266
266
  }
267
267
  declare module '@ibti-tech/chatbot/components/SuggestedQuestions/styles.d.ts' {
268
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../home/runner/work/ibti-chatbot/ibti-chatbot/src/components/SuggestedQuestions/styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,cAAc,mcAK1B,CAAA;AAED,eAAO,MAAM,gBAAgB,6NAAc,CAAA;AAE3C,eAAO,MAAM,YAAY,iOAIxB,CAAA;AAED,eAAO,MAAM,KAAK,+NAMjB,CAAA;AAED,eAAO,MAAM,OAAO,6NAEnB,CAAA"}
268
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../home/runner/work/ibti-chatbot/ibti-chatbot/src/components/SuggestedQuestions/styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,cAAc,mcAY1B,CAAA;AAED,eAAO,MAAM,gBAAgB,6NAAc,CAAA;AAE3C,eAAO,MAAM,YAAY,iOAIxB,CAAA;AAED,eAAO,MAAM,KAAK,+NAMjB,CAAA;AAED,eAAO,MAAM,OAAO,6NAYnB,CAAA"}
269
269
  }
270
270
  declare module '@ibti-tech/chatbot/components/WritingIndicator/index' {
271
271
  import React from 'react';
@@ -288,7 +288,7 @@ declare module '@ibti-tech/chatbot/components/WritingIndicator/styles' {
288
288
  //# sourceMappingURL=styles.d.ts.map
289
289
  }
290
290
  declare module '@ibti-tech/chatbot/components/WritingIndicator/styles.d.ts' {
291
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../home/runner/work/ibti-chatbot/ibti-chatbot/src/components/WritingIndicator/styles.ts"],"names":[],"mappings":"AAiBA,eAAO,MAAM,IAAI,+NAKhB,CAAA;AAED,eAAO,MAAM,GAAG;YAAyB,MAAM;YAO9C,CAAA;AAED,eAAO,MAAM,IAAI,+NAEhB,CAAA;AAED,eAAO,MAAM,OAAO,6NA0BnB,CAAA;AAED,eAAO,MAAM,KAAK,+NAEjB,CAAA;AAED,eAAO,MAAM,OAAO,6NAKnB,CAAA"}
291
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../home/runner/work/ibti-chatbot/ibti-chatbot/src/components/WritingIndicator/styles.ts"],"names":[],"mappings":"AAiBA,eAAO,MAAM,IAAI,+NAKhB,CAAA;AAED,eAAO,MAAM,GAAG;YAAyB,MAAM;YAO9C,CAAA;AAED,eAAO,MAAM,IAAI,+NAEhB,CAAA;AAED,eAAO,MAAM,OAAO,6NAiCnB,CAAA;AAED,eAAO,MAAM,KAAK,+NAIjB,CAAA;AAED,eAAO,MAAM,OAAO,6NAYnB,CAAA"}
292
292
  }
293
293
  declare module '@ibti-tech/chatbot/contexts/Chatbot/context' {
294
294
  import * as React from 'react';
package/dist/index.mjs CHANGED
@@ -738,6 +738,16 @@ var Wrapper = styled.div`
738
738
  max-height: calc(100vh - 45px);
739
739
  box-sizing: border-box;
740
740
  position: relative;
741
+ font-family: 'Montserrat', sans-serif !important;
742
+ font-weight: 600 !important;
743
+
744
+ * {
745
+ font-family: 'Montserrat', sans-serif !important;
746
+ }
747
+
748
+ *:not(b):not(strong):not(h1):not(h2):not(h3):not(h4):not(h5):not(h6) {
749
+ font-weight: 600 !important;
750
+ }
741
751
 
742
752
  @media screen and (max-width: ${breakpoints.tablet}px) {
743
753
  ${(props) => props.$opened && props.$verticalPosition === "bottom" ? css`
@@ -787,7 +797,7 @@ import React6 from "react";
787
797
  import { styled as styled2 } from "styled-components";
788
798
  var Name = styled2.span`
789
799
  color: ${(props) => props.theme.colors.content.title};
790
- font-weight: ${(props) => props.theme.fontFamily.montserrat.weights.bold};
800
+ font-weight: 700;
791
801
  `;
792
802
  var ProfileInfo = styled2.div`
793
803
  display: flex;
@@ -814,6 +824,16 @@ var Wrapper2 = styled2.div`
814
824
  display: flex;
815
825
  padding: ${(props) => props.theme.spacing.components.small};
816
826
  gap: ${(props) => props.theme.spacing.components.small};
827
+ font-family: 'Montserrat', sans-serif !important;
828
+ font-weight: 600 !important;
829
+
830
+ * {
831
+ font-family: 'Montserrat', sans-serif !important;
832
+ }
833
+
834
+ *:not(b):not(strong):not(h1):not(h2):not(h3):not(h4):not(h5):not(h6) {
835
+ font-weight: 600 !important;
836
+ }
817
837
  `;
818
838
 
819
839
  // src/components/BotIcon/index.tsx
@@ -950,6 +970,13 @@ import { styled as styled3 } from "styled-components";
950
970
  var Wrapper3 = styled3.span`
951
971
  color: ${(props) => props.theme.colors.content.detail};
952
972
  font-size: ${(props) => props.theme.fontSizes.small};
973
+ font-family: 'Montserrat', sans-serif !important;
974
+ font-weight: 600 !important;
975
+
976
+ * {
977
+ font-family: 'Montserrat', sans-serif !important;
978
+ font-weight: 600 !important;
979
+ }
953
980
 
954
981
  &::before {
955
982
  content: '';
@@ -1022,6 +1049,16 @@ var Wrapper4 = styled4.div`
1022
1049
  flex: 1;
1023
1050
  height: 100%;
1024
1051
  padding-right: ${(props) => props.theme.spacing.components.small};
1052
+ font-family: 'Montserrat', sans-serif !important;
1053
+ font-weight: 600 !important;
1054
+
1055
+ * {
1056
+ font-family: 'Montserrat', sans-serif !important;
1057
+ }
1058
+
1059
+ *:not(b):not(strong):not(h1):not(h2):not(h3):not(h4):not(h5):not(h6) {
1060
+ font-weight: 600 !important;
1061
+ }
1025
1062
 
1026
1063
  /* Custom scrollbar styles */
1027
1064
  &::-webkit-scrollbar {
@@ -1056,6 +1093,8 @@ var Time = styled5.span`
1056
1093
  font-size: ${(props) => props.theme.fontSizes.small};
1057
1094
  color: ${(props) => props.theme.colors.content.detail};
1058
1095
  white-space: nowrap;
1096
+ font-family: 'Montserrat', sans-serif !important;
1097
+ font-weight: 600 !important;
1059
1098
 
1060
1099
  ${({ $type }) => {
1061
1100
  switch ($type) {
@@ -1080,6 +1119,16 @@ var Balloon = styled5.div`
1080
1119
  line-height: 1.5em;
1081
1120
  display: flex;
1082
1121
  gap: ${(props) => props.theme.spacing.components.small};
1122
+ font-family: 'Montserrat', sans-serif !important;
1123
+ font-weight: 600 !important;
1124
+
1125
+ * {
1126
+ font-family: 'Montserrat', sans-serif !important;
1127
+ }
1128
+
1129
+ p, li, span, div, code, pre {
1130
+ font-weight: 600 !important;
1131
+ }
1083
1132
 
1084
1133
  &::after {
1085
1134
  position: absolute;
@@ -1140,7 +1189,7 @@ var Balloon = styled5.div`
1140
1189
 
1141
1190
  a {
1142
1191
  color: ${(props) => props.theme.colors.palette.primary.normal};
1143
- font-weight: semibold;
1192
+ font-weight: 700 !important;
1144
1193
 
1145
1194
  ${({ $type }) => $type === "sent" && css2`
1146
1195
  color: white;
@@ -1209,7 +1258,7 @@ var Balloon = styled5.div`
1209
1258
  strong,
1210
1259
  b {
1211
1260
  color: inherit;
1212
- font-weight: ${(props) => props.theme.fontFamily.montserrat.weights.bold};
1261
+ font-weight: 700;
1213
1262
  }
1214
1263
 
1215
1264
  em,
@@ -1220,6 +1269,8 @@ var Balloon = styled5.div`
1220
1269
  var Label = styled5.span`
1221
1270
  font-size: ${(props) => props.theme.fontSizes.small};
1222
1271
  color: ${(props) => props.theme.colors.content.detail};
1272
+ font-family: 'Montserrat', sans-serif !important;
1273
+ font-weight: 600 !important;
1223
1274
  `;
1224
1275
  var BalloonAndActionsWrapper = styled5.div`
1225
1276
  display: flex;
@@ -1355,6 +1406,7 @@ var Tooltip = styled5.span`
1355
1406
  color: ${(props) => props.theme.colors.content.text};
1356
1407
  border-radius: ${(props) => props.theme.borderRadius.small};
1357
1408
  font-size: ${(props) => props.theme.fontSizes.xsmall};
1409
+ font-weight: 500;
1358
1410
  pointer-events: none;
1359
1411
  z-index: 30;
1360
1412
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
@@ -1364,6 +1416,7 @@ var Tooltip = styled5.span`
1364
1416
  `;
1365
1417
  var Wrapper5 = styled5.div`
1366
1418
  font-size: ${(props) => props.theme.fontSizes.small};
1419
+ font-weight: 600 !important;
1367
1420
  display: flex;
1368
1421
  flex-direction: column;
1369
1422
  gap: 2px;
@@ -1561,6 +1614,13 @@ var Balloon2 = styled6.div`
1561
1614
  align-items: center;
1562
1615
  background: ${(props) => props.theme.colors.layers[2].background};
1563
1616
  color: ${(props) => props.theme.colors.content.text};
1617
+ font-family: 'Montserrat', sans-serif !important;
1618
+ font-weight: 600 !important;
1619
+
1620
+ * {
1621
+ font-family: 'Montserrat', sans-serif !important;
1622
+ font-weight: 600 !important;
1623
+ }
1564
1624
 
1565
1625
  &::after {
1566
1626
  position: absolute;
@@ -1578,12 +1638,21 @@ var Balloon2 = styled6.div`
1578
1638
  `;
1579
1639
  var Label2 = styled6.span`
1580
1640
  font-size: ${(props) => props.theme.fontSizes.small};
1641
+ font-family: 'Montserrat', sans-serif !important;
1642
+ font-weight: 600 !important;
1581
1643
  `;
1582
1644
  var Wrapper6 = styled6.div`
1583
1645
  font-size: ${(props) => props.theme.fontSizes.small};
1584
1646
  display: flex;
1585
1647
  flex-direction: column;
1586
1648
  gap: ${(props) => props.theme.spacing.components.xsmall};
1649
+ font-family: 'Montserrat', sans-serif !important;
1650
+ font-weight: 600 !important;
1651
+
1652
+ * {
1653
+ font-family: 'Montserrat', sans-serif !important;
1654
+ font-weight: 600 !important;
1655
+ }
1587
1656
  `;
1588
1657
 
1589
1658
  // src/components/WritingIndicator/index.tsx
@@ -1673,6 +1742,13 @@ var QuestionButton = styled7(Button2)`
1673
1742
  justify-content: flex-start;
1674
1743
  height: auto;
1675
1744
  padding: ${(props) => props.theme.spacing.components.small};
1745
+ font-family: 'Montserrat', sans-serif !important;
1746
+ font-weight: 600 !important;
1747
+
1748
+ * {
1749
+ font-family: 'Montserrat', sans-serif !important;
1750
+ font-weight: 600 !important;
1751
+ }
1676
1752
  `;
1677
1753
  var QuestionListItem = styled7.li``;
1678
1754
  var QuestionList = styled7.ul`
@@ -1683,12 +1759,22 @@ var QuestionList = styled7.ul`
1683
1759
  var Title = styled7.span`
1684
1760
  display: block;
1685
1761
  font-size: ${(props) => props.theme.fontSizes.small};
1686
- font-weight: ${(props) => props.theme.fontFamily.montserrat.weights.bold};
1762
+ font-weight: 700;
1687
1763
  margin-bottom: ${(props) => props.theme.spacing.components.medium};
1688
1764
  /* text-align: center; */
1689
1765
  `;
1690
1766
  var Wrapper7 = styled7.div`
1691
1767
  padding: ${(props) => props.theme.spacing.components.medium};
1768
+ font-family: 'Montserrat', sans-serif !important;
1769
+ font-weight: 600 !important;
1770
+
1771
+ * {
1772
+ font-family: 'Montserrat', sans-serif !important;
1773
+ }
1774
+
1775
+ *:not(b):not(strong):not(h1):not(h2):not(h3):not(h4):not(h5):not(h6) {
1776
+ font-weight: 600 !important;
1777
+ }
1692
1778
  `;
1693
1779
 
1694
1780
  // src/components/SuggestedQuestions/index.tsx
@@ -1758,6 +1844,7 @@ var LoadingSuggestedQuestions = styled8.span`
1758
1844
  align-items: center;
1759
1845
  gap: ${(props) => props.theme.spacing.components.small};
1760
1846
  font-size: ${(props) => props.theme.fontSizes.small};
1847
+ font-weight: 600 !important;
1761
1848
  padding: ${(props) => props.theme.spacing.components.small}
1762
1849
  ${(props) => props.theme.spacing.components.medium};
1763
1850
  `;
@@ -1774,13 +1861,14 @@ var Form = styled8.form`
1774
1861
 
1775
1862
  /* Chatbot textarea styles */
1776
1863
  .textareaField {
1777
- font-family: inherit !important;
1864
+ font-family: 'Montserrat', sans-serif !important;
1778
1865
 
1779
1866
  &,
1780
1867
  *,
1781
1868
  textarea {
1782
1869
  font-size: ${(props) => props.theme.fontSizes.medium} !important;
1783
- font-family: inherit !important;
1870
+ font-family: 'Montserrat', sans-serif !important;
1871
+ font-weight: 600 !important;
1784
1872
  }
1785
1873
 
1786
1874
  textarea {
@@ -1794,7 +1882,8 @@ var Form = styled8.form`
1794
1882
  line-height: 1.5 !important;
1795
1883
  width: 100% !important;
1796
1884
  box-sizing: border-box !important;
1797
- font-family: inherit !important;
1885
+ font-family: 'Montserrat', sans-serif !important;
1886
+ font-weight: 600 !important;
1798
1887
  overflow-y: auto !important;
1799
1888
  overflow-x: hidden !important;
1800
1889
 
@@ -1828,7 +1917,8 @@ var Form = styled8.form`
1828
1917
  &::placeholder {
1829
1918
  color: ${(props) => props.theme.colors.content.detail} !important;
1830
1919
  font-size: ${(props) => props.theme.fontSizes.medium} !important;
1831
- font-family: inherit !important;
1920
+ font-family: 'Montserrat', sans-serif !important;
1921
+ font-weight: 600 !important;
1832
1922
  }
1833
1923
  }
1834
1924
 
@@ -1840,6 +1930,16 @@ var Form = styled8.form`
1840
1930
  `;
1841
1931
  var Wrapper8 = styled8.div`
1842
1932
  padding: ${(props) => props.theme.spacing.components.small};
1933
+ font-family: 'Montserrat', sans-serif !important;
1934
+ font-weight: 600 !important;
1935
+
1936
+ * {
1937
+ font-family: 'Montserrat', sans-serif !important;
1938
+ }
1939
+
1940
+ *:not(b):not(strong):not(h1):not(h2):not(h3):not(h4):not(h5):not(h6) {
1941
+ font-weight: 600 !important;
1942
+ }
1843
1943
  `;
1844
1944
 
1845
1945
  // src/components/ChatbotFooter/index.tsx
@@ -1921,7 +2021,13 @@ var ButtonWrapper = styled9.button`
1921
2021
  color: ${(props) => props.theme.colors.palette.primary.normal};
1922
2022
  padding: ${(props) => props.theme.spacing.components.small};
1923
2023
  font-size: ${(props) => props.theme.fontSizes.small};
1924
- font-weight: ${(props) => props.theme.fontFamily.montserrat.weights.semibold};
2024
+ font-family: 'Montserrat', sans-serif !important;
2025
+ font-weight: 700 !important;
2026
+
2027
+ * {
2028
+ font-family: 'Montserrat', sans-serif !important;
2029
+ font-weight: 700 !important;
2030
+ }
1925
2031
  display: flex;
1926
2032
  align-items: center;
1927
2033
  justify-content: center;
@@ -2005,13 +2111,14 @@ var Form2 = styled10.form`
2005
2111
 
2006
2112
  /* Feedback textarea styles */
2007
2113
  .feedbackTextarea {
2008
- font-family: inherit !important;
2114
+ font-family: 'Montserrat', sans-serif !important;
2009
2115
 
2010
2116
  &,
2011
2117
  *,
2012
2118
  textarea {
2013
2119
  font-size: ${(props) => props.theme.fontSizes.medium} !important;
2014
- font-family: inherit !important;
2120
+ font-family: 'Montserrat', sans-serif !important;
2121
+ font-weight: 600 !important;
2015
2122
  }
2016
2123
 
2017
2124
  textarea {
@@ -2024,7 +2131,8 @@ var Form2 = styled10.form`
2024
2131
  line-height: 1.5 !important;
2025
2132
  width: 100% !important;
2026
2133
  box-sizing: border-box !important;
2027
- font-family: inherit !important;
2134
+ font-family: 'Montserrat', sans-serif !important;
2135
+ font-weight: 600 !important;
2028
2136
  color: ${(props) => props.theme.colors.content.text} !important;
2029
2137
  background-color: ${(props) => props.theme.colors.layers[2].background} !important;
2030
2138
 
@@ -2036,7 +2144,8 @@ var Form2 = styled10.form`
2036
2144
  &::placeholder {
2037
2145
  color: ${(props) => props.theme.colors.content.detail} !important;
2038
2146
  font-size: ${(props) => props.theme.fontSizes.medium} !important;
2039
- font-family: inherit !important;
2147
+ font-family: 'Montserrat', sans-serif !important;
2148
+ font-weight: 600 !important;
2040
2149
  }
2041
2150
  }
2042
2151
 
@@ -2050,10 +2159,11 @@ var Description = styled10.div`
2050
2159
  font-size: ${(props) => props.theme.fontSizes.small};
2051
2160
  color: ${(props) => props.theme.colors.content.text};
2052
2161
  margin-bottom: ${(props) => props.theme.spacing.components.medium};
2162
+ font-weight: 600 !important;
2053
2163
  `;
2054
2164
  var Title2 = styled10.span`
2055
2165
  display: block;
2056
- font-weight: ${(props) => props.theme.fontFamily.montserrat.weights.bold};
2166
+ font-weight: 700;
2057
2167
  color: ${(props) => props.theme.colors.content.text};
2058
2168
  margin-bottom: ${(props) => props.theme.spacing.components.small};
2059
2169
  `;
@@ -2062,6 +2172,16 @@ var Box = styled10(CardBase)`
2062
2172
  height: max-content;
2063
2173
  padding: ${(props) => props.theme.spacing.components.medium};
2064
2174
  transition: ${(props) => props.theme.transitionDurations.default};
2175
+ font-family: 'Montserrat', sans-serif !important;
2176
+ font-weight: 600 !important;
2177
+
2178
+ * {
2179
+ font-family: 'Montserrat', sans-serif !important;
2180
+ }
2181
+
2182
+ *:not(b):not(strong):not(h1):not(h2):not(h3):not(h4):not(h5):not(h6) {
2183
+ font-weight: 600 !important;
2184
+ }
2065
2185
  `;
2066
2186
  var Wrapper9 = styled10.div`
2067
2187
  position: absolute;
@@ -2201,6 +2321,17 @@ import { breakpoints as breakpoints3, screens as screens3 } from "@ibti-tech/ui"
2201
2321
  import { Container } from "@ibti-tech/ui/dist/components/Container";
2202
2322
  import { css as css6, styled as styled11 } from "styled-components";
2203
2323
  var BarContainer = styled11(Container)`
2324
+ font-family: 'Montserrat', sans-serif !important;
2325
+ font-weight: 600 !important;
2326
+
2327
+ * {
2328
+ font-family: 'Montserrat', sans-serif !important;
2329
+ }
2330
+
2331
+ *:not(b):not(strong):not(h1):not(h2):not(h3):not(h4):not(h5):not(h6) {
2332
+ font-weight: 600 !important;
2333
+ }
2334
+
2204
2335
  @media screen and (max-width: ${breakpoints3.tablet}px) {
2205
2336
  padding: 0;
2206
2337
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ibti-tech/chatbot",
3
- "version": "0.5.6",
3
+ "version": "0.5.8",
4
4
  "description": "Chatbot developed for IBTI products",
5
5
  "packageManager": "yarn@3.6.4",
6
6
  "main": "./dist/index.mjs",