@kroonen-ai/librebot-widget 1.5.0 → 1.6.0

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.
@@ -823,6 +823,8 @@ const checkIcon = `<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" st
823
823
 
824
824
  const WIDGET_TRANSLATIONS = {
825
825
  en: {
826
+ title: 'Libre Bot',
827
+ subtitle: 'AI Documentation Assistant',
826
828
  placeholder: 'Ask a question...',
827
829
  welcomeMessage: 'Hi! I can help you find answers in the documentation. What would you like to know?',
828
830
  errorPrefix: 'Sorry, I encountered an error:',
@@ -846,6 +848,8 @@ const WIDGET_TRANSLATIONS = {
846
848
  joinMeeting: 'Join Meeting',
847
849
  },
848
850
  fr: {
851
+ title: 'Libre Bot',
852
+ subtitle: 'Assistant IA de documentation',
849
853
  placeholder: 'Posez une question...',
850
854
  welcomeMessage: 'Bonjour ! Je peux vous aider à trouver des réponses dans la documentation. Que souhaitez-vous savoir ?',
851
855
  errorPrefix: 'Désolé, j\'ai rencontré une erreur :',
@@ -869,6 +873,8 @@ const WIDGET_TRANSLATIONS = {
869
873
  joinMeeting: 'Rejoindre la réunion',
870
874
  },
871
875
  de: {
876
+ title: 'Libre Bot',
877
+ subtitle: 'KI-Dokumentationsassistent',
872
878
  placeholder: 'Stellen Sie eine Frage...',
873
879
  welcomeMessage: 'Hallo! Ich kann Ihnen helfen, Antworten in der Dokumentation zu finden. Was möchten Sie wissen?',
874
880
  errorPrefix: 'Entschuldigung, ein Fehler ist aufgetreten:',
@@ -892,6 +898,8 @@ const WIDGET_TRANSLATIONS = {
892
898
  joinMeeting: 'An Meeting teilnehmen',
893
899
  },
894
900
  nl: {
901
+ title: 'Libre Bot',
902
+ subtitle: 'AI-documentatieassistent',
895
903
  placeholder: 'Stel een vraag...',
896
904
  welcomeMessage: 'Hallo! Ik kan je helpen antwoorden te vinden in de documentatie. Wat wil je weten?',
897
905
  errorPrefix: 'Sorry, er is een fout opgetreden:',
@@ -915,6 +923,8 @@ const WIDGET_TRANSLATIONS = {
915
923
  joinMeeting: 'Deelnemen aan vergadering',
916
924
  },
917
925
  es: {
926
+ title: 'Libre Bot',
927
+ subtitle: 'Asistente de documentación con IA',
918
928
  placeholder: 'Haz una pregunta...',
919
929
  welcomeMessage: '¡Hola! Puedo ayudarte a encontrar respuestas en la documentación. ¿Qué te gustaría saber?',
920
930
  errorPrefix: 'Lo siento, encontré un error:',
@@ -938,6 +948,8 @@ const WIDGET_TRANSLATIONS = {
938
948
  joinMeeting: 'Unirse a la reunión',
939
949
  },
940
950
  pt: {
951
+ title: 'Libre Bot',
952
+ subtitle: 'Assistente de documentação com IA',
941
953
  placeholder: 'Faça uma pergunta...',
942
954
  welcomeMessage: 'Olá! Posso ajudá-lo a encontrar respostas na documentação. O que você gostaria de saber?',
943
955
  errorPrefix: 'Desculpe, encontrei um erro:',
@@ -961,6 +973,8 @@ const WIDGET_TRANSLATIONS = {
961
973
  joinMeeting: 'Entrar na reunião',
962
974
  },
963
975
  ko: {
976
+ title: 'Libre Bot',
977
+ subtitle: 'AI 문서 도우미',
964
978
  placeholder: '질문하세요...',
965
979
  welcomeMessage: '안녕하세요! 문서에서 답변을 찾는 데 도움을 드릴 수 있습니다. 무엇을 알고 싶으신가요?',
966
980
  errorPrefix: '죄송합니다. 오류가 발생했습니다:',
@@ -984,6 +998,8 @@ const WIDGET_TRANSLATIONS = {
984
998
  joinMeeting: '미팅 참가',
985
999
  },
986
1000
  ja: {
1001
+ title: 'Libre Bot',
1002
+ subtitle: 'AIドキュメントアシスタント',
987
1003
  placeholder: '質問してください...',
988
1004
  welcomeMessage: 'こんにちは!ドキュメントから回答を見つけるお手伝いができます。何をお知りになりたいですか?',
989
1005
  errorPrefix: '申し訳ありません。エラーが発生しました:',
@@ -1007,6 +1023,8 @@ const WIDGET_TRANSLATIONS = {
1007
1023
  joinMeeting: 'ミーティングに参加',
1008
1024
  },
1009
1025
  zh: {
1026
+ title: 'Libre Bot',
1027
+ subtitle: 'AI文档助手',
1010
1028
  placeholder: '请提问...',
1011
1029
  welcomeMessage: '您好!我可以帮助您在文档中查找答案。您想了解什么?',
1012
1030
  errorPrefix: '抱歉,遇到了错误:',
@@ -1030,6 +1048,8 @@ const WIDGET_TRANSLATIONS = {
1030
1048
  joinMeeting: '加入会议',
1031
1049
  },
1032
1050
  hi: {
1051
+ title: 'Libre Bot',
1052
+ subtitle: 'AI दस्तावेज़ सहायक',
1033
1053
  placeholder: 'कोई प्रश्न पूछें...',
1034
1054
  welcomeMessage: 'नमस्ते! मैं आपको दस्तावेज़ों में उत्तर खोजने में मदद कर सकता हूं। आप क्या जानना चाहते हैं?',
1035
1055
  errorPrefix: 'क्षमा करें, एक त्रुटि हुई:',
@@ -1053,6 +1073,8 @@ const WIDGET_TRANSLATIONS = {
1053
1073
  joinMeeting: 'मीटिंग में शामिल हों',
1054
1074
  },
1055
1075
  ar: {
1076
+ title: 'Libre Bot',
1077
+ subtitle: 'مساعد الوثائق بالذكاء الاصطناعي',
1056
1078
  placeholder: 'اطرح سؤالاً...',
1057
1079
  welcomeMessage: 'مرحباً! يمكنني مساعدتك في العثور على إجابات في الوثائق. ماذا تريد أن تعرف؟',
1058
1080
  errorPrefix: 'عذراً، حدث خطأ:',
@@ -1077,6 +1099,8 @@ const WIDGET_TRANSLATIONS = {
1077
1099
  },
1078
1100
  // Bengali (বাংলা) - ~270M speakers
1079
1101
  bn: {
1102
+ title: 'Libre Bot',
1103
+ subtitle: 'AI ডকুমেন্টেশন সহায়ক',
1080
1104
  placeholder: 'একটি প্রশ্ন জিজ্ঞাসা করুন...',
1081
1105
  welcomeMessage: 'হ্যালো! আমি আপনাকে ডকুমেন্টেশনে উত্তর খুঁজে পেতে সাহায্য করতে পারি। আপনি কী জানতে চান?',
1082
1106
  errorPrefix: 'দুঃখিত, একটি ত্রুটি ঘটেছে:',
@@ -1101,6 +1125,8 @@ const WIDGET_TRANSLATIONS = {
1101
1125
  },
1102
1126
  // Russian (Русский) - ~255M speakers
1103
1127
  ru: {
1128
+ title: 'Libre Bot',
1129
+ subtitle: 'ИИ-ассистент по документации',
1104
1130
  placeholder: 'Задайте вопрос...',
1105
1131
  welcomeMessage: 'Привет! Я могу помочь вам найти ответы в документации. Что бы вы хотели узнать?',
1106
1132
  errorPrefix: 'Извините, произошла ошибка:',
@@ -1125,6 +1151,8 @@ const WIDGET_TRANSLATIONS = {
1125
1151
  },
1126
1152
  // Indonesian (Bahasa Indonesia) - ~200M speakers
1127
1153
  id: {
1154
+ title: 'Libre Bot',
1155
+ subtitle: 'Asisten Dokumentasi AI',
1128
1156
  placeholder: 'Ajukan pertanyaan...',
1129
1157
  welcomeMessage: 'Halo! Saya dapat membantu Anda menemukan jawaban di dokumentasi. Apa yang ingin Anda ketahui?',
1130
1158
  errorPrefix: 'Maaf, terjadi kesalahan:',
@@ -1149,6 +1177,8 @@ const WIDGET_TRANSLATIONS = {
1149
1177
  },
1150
1178
  // Vietnamese (Tiếng Việt) - ~85M speakers
1151
1179
  vi: {
1180
+ title: 'Libre Bot',
1181
+ subtitle: 'Trợ lý tài liệu AI',
1152
1182
  placeholder: 'Đặt câu hỏi...',
1153
1183
  welcomeMessage: 'Xin chào! Tôi có thể giúp bạn tìm câu trả lời trong tài liệu. Bạn muốn biết điều gì?',
1154
1184
  errorPrefix: 'Xin lỗi, đã xảy ra lỗi:',
@@ -1173,6 +1203,8 @@ const WIDGET_TRANSLATIONS = {
1173
1203
  },
1174
1204
  // Turkish (Türkçe) - ~80M speakers
1175
1205
  tr: {
1206
+ title: 'Libre Bot',
1207
+ subtitle: 'Yapay Zeka Dokümantasyon Asistanı',
1176
1208
  placeholder: 'Bir soru sorun...',
1177
1209
  welcomeMessage: 'Merhaba! Dokümantasyonda cevap bulmanıza yardımcı olabilirim. Ne öğrenmek istersiniz?',
1178
1210
  errorPrefix: 'Üzgünüm, bir hata oluştu:',
@@ -1197,6 +1229,8 @@ const WIDGET_TRANSLATIONS = {
1197
1229
  },
1198
1230
  // Italian (Italiano) - ~65M speakers
1199
1231
  it: {
1232
+ title: 'Libre Bot',
1233
+ subtitle: 'Assistente documentazione AI',
1200
1234
  placeholder: 'Fai una domanda...',
1201
1235
  welcomeMessage: 'Ciao! Posso aiutarti a trovare risposte nella documentazione. Cosa vorresti sapere?',
1202
1236
  errorPrefix: 'Mi dispiace, si è verificato un errore:',
@@ -1221,6 +1255,8 @@ const WIDGET_TRANSLATIONS = {
1221
1255
  },
1222
1256
  // Thai (ไทย) - ~60M speakers
1223
1257
  th: {
1258
+ title: 'Libre Bot',
1259
+ subtitle: 'ผู้ช่วยเอกสาร AI',
1224
1260
  placeholder: 'ถามคำถาม...',
1225
1261
  welcomeMessage: 'สวัสดี! ฉันสามารถช่วยคุณค้นหาคำตอบในเอกสารได้ คุณต้องการทราบอะไร?',
1226
1262
  errorPrefix: 'ขออภัย เกิดข้อผิดพลาด:',
@@ -1245,6 +1281,8 @@ const WIDGET_TRANSLATIONS = {
1245
1281
  },
1246
1282
  // Polish (Polski) - ~45M speakers
1247
1283
  pl: {
1284
+ title: 'Libre Bot',
1285
+ subtitle: 'Asystent dokumentacji AI',
1248
1286
  placeholder: 'Zadaj pytanie...',
1249
1287
  welcomeMessage: 'Cześć! Mogę pomóc Ci znaleźć odpowiedzi w dokumentacji. Co chciałbyś wiedzieć?',
1250
1288
  errorPrefix: 'Przepraszam, wystąpił błąd:',
@@ -1269,6 +1307,8 @@ const WIDGET_TRANSLATIONS = {
1269
1307
  },
1270
1308
  // Ukrainian (Українська) - ~40M speakers
1271
1309
  uk: {
1310
+ title: 'Libre Bot',
1311
+ subtitle: 'ШІ-асистент документації',
1272
1312
  placeholder: 'Поставте запитання...',
1273
1313
  welcomeMessage: 'Привіт! Я можу допомогти вам знайти відповіді в документації. Що б ви хотіли дізнатися?',
1274
1314
  errorPrefix: 'Вибачте, сталася помилка:',
@@ -1293,6 +1333,8 @@ const WIDGET_TRANSLATIONS = {
1293
1333
  },
1294
1334
  // Malay (Bahasa Melayu) - ~30M speakers
1295
1335
  ms: {
1336
+ title: 'Libre Bot',
1337
+ subtitle: 'Pembantu Dokumentasi AI',
1296
1338
  placeholder: 'Tanya soalan...',
1297
1339
  welcomeMessage: 'Hai! Saya boleh membantu anda mencari jawapan dalam dokumentasi. Apa yang anda ingin tahu?',
1298
1340
  errorPrefix: 'Maaf, berlaku ralat:',
@@ -1317,6 +1359,8 @@ const WIDGET_TRANSLATIONS = {
1317
1359
  },
1318
1360
  // Czech (Čeština) - ~10M speakers
1319
1361
  cs: {
1362
+ title: 'Libre Bot',
1363
+ subtitle: 'AI asistent dokumentace',
1320
1364
  placeholder: 'Položte otázku...',
1321
1365
  welcomeMessage: 'Ahoj! Mohu vám pomoci najít odpovědi v dokumentaci. Co byste chtěli vědět?',
1322
1366
  errorPrefix: 'Omlouvám se, došlo k chybě:',
@@ -1341,6 +1385,8 @@ const WIDGET_TRANSLATIONS = {
1341
1385
  },
1342
1386
  // Swedish (Svenska) - ~10M speakers
1343
1387
  sv: {
1388
+ title: 'Libre Bot',
1389
+ subtitle: 'AI-dokumentationsassistent',
1344
1390
  placeholder: 'Ställ en fråga...',
1345
1391
  welcomeMessage: 'Hej! Jag kan hjälpa dig hitta svar i dokumentationen. Vad vill du veta?',
1346
1392
  errorPrefix: 'Tyvärr uppstod ett fel:',
@@ -1365,6 +1411,8 @@ const WIDGET_TRANSLATIONS = {
1365
1411
  },
1366
1412
  // Danish (Dansk) - ~6M speakers
1367
1413
  da: {
1414
+ title: 'Libre Bot',
1415
+ subtitle: 'AI-dokumentationsassistent',
1368
1416
  placeholder: 'Stil et spørgsmål...',
1369
1417
  welcomeMessage: 'Hej! Jeg kan hjælpe dig med at finde svar i dokumentationen. Hvad vil du gerne vide?',
1370
1418
  errorPrefix: 'Beklager, der opstod en fejl:',
@@ -1389,6 +1437,8 @@ const WIDGET_TRANSLATIONS = {
1389
1437
  },
1390
1438
  // Icelandic (Íslenska) - ~350K speakers
1391
1439
  is: {
1440
+ title: 'Libre Bot',
1441
+ subtitle: 'Gervigreind skjalahjálpari',
1392
1442
  placeholder: 'Spurðu spurningu...',
1393
1443
  welcomeMessage: 'Hæ! Ég get hjálpað þér að finna svör í skjölunum. Hvað viltu vita?',
1394
1444
  errorPrefix: 'Því miður kom upp villa:',
@@ -1454,8 +1504,8 @@ class LibreBotWidget {
1454
1504
  position: 'bottom-right',
1455
1505
  theme: 'dark',
1456
1506
  primaryColor: '#14b8a6',
1457
- title: 'Libre Bot',
1458
- subtitle: 'AI Documentation Assistant',
1507
+ title: '', // Will be set from translations
1508
+ subtitle: '', // Will be set from translations
1459
1509
  placeholder: '', // Will be set from translations
1460
1510
  welcomeMessage: '', // Will be set from translations
1461
1511
  streaming: true,
@@ -1475,6 +1525,8 @@ class LibreBotWidget {
1475
1525
  const configWithTranslations = {
1476
1526
  ...config,
1477
1527
  lang: detectedLang,
1528
+ title: config.title || this.translations.title,
1529
+ subtitle: config.subtitle || this.translations.subtitle,
1478
1530
  placeholder: config.placeholder || this.translations.placeholder,
1479
1531
  welcomeMessage: config.welcomeMessage || this.translations.welcomeMessage,
1480
1532
  };