@magmamath/students-features 0.5.0 → 0.5.1-rc-1

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.
Files changed (407) hide show
  1. package/dist/commonjs/features/celebrations/config.js +4 -4
  2. package/dist/commonjs/features/celebrations/config.js.map +1 -1
  3. package/dist/commonjs/features/chatbot/components/Alternatives/Alternatives.js +1 -2
  4. package/dist/commonjs/features/chatbot/components/Alternatives/Alternatives.js.map +1 -1
  5. package/dist/commonjs/features/chatbot/components/ChatMessage/ChatMessage.js.map +1 -1
  6. package/dist/commonjs/features/chatbot/components/ChatMessage/MessageTextToSpeech.js +47 -30
  7. package/dist/commonjs/features/chatbot/components/ChatMessage/MessageTextToSpeech.js.map +1 -1
  8. package/dist/commonjs/features/chatbot/components/ChatMessage/ReceivedMessage.js +42 -22
  9. package/dist/commonjs/features/chatbot/components/ChatMessage/ReceivedMessage.js.map +1 -1
  10. package/dist/commonjs/features/chatbot/components/ChatMessage/SentMessage.js +14 -11
  11. package/dist/commonjs/features/chatbot/components/ChatMessage/SentMessage.js.map +1 -1
  12. package/dist/commonjs/features/chatbot/components/ChatMessages/ChatbotMessages.js +32 -17
  13. package/dist/commonjs/features/chatbot/components/ChatMessages/ChatbotMessages.js.map +1 -1
  14. package/dist/commonjs/features/chatbot/components/Chatbot.js +7 -5
  15. package/dist/commonjs/features/chatbot/components/Chatbot.js.map +1 -1
  16. package/dist/commonjs/features/chatbot/index.js +7 -0
  17. package/dist/commonjs/features/chatbot/index.js.map +1 -1
  18. package/dist/commonjs/features/chatbot/model/{ChatBotThreadManager.js → ChatBotMessageHandler.js} +22 -44
  19. package/dist/commonjs/features/chatbot/model/ChatBotMessageHandler.js.map +1 -0
  20. package/dist/commonjs/features/chatbot/model/ChatBotModel.js +125 -146
  21. package/dist/commonjs/features/chatbot/model/ChatBotModel.js.map +1 -1
  22. package/dist/commonjs/features/chatbot/model/DefaultMessageCreator.js +12 -12
  23. package/dist/commonjs/features/chatbot/model/DefaultMessageCreator.js.map +1 -1
  24. package/dist/commonjs/features/chatbot/model/ThreadItem.js +8 -16
  25. package/dist/commonjs/features/chatbot/model/ThreadItem.js.map +1 -1
  26. package/dist/commonjs/features/chatbot/model/{ChatbotApi.js → api.js} +1 -2
  27. package/dist/commonjs/features/chatbot/model/api.js.map +1 -0
  28. package/dist/commonjs/features/chatbot/model/constants.js.map +1 -1
  29. package/dist/commonjs/features/chatbot/model/messagesHelper.js +7 -7
  30. package/dist/commonjs/features/chatbot/model/messagesHelper.js.map +1 -1
  31. package/dist/commonjs/features/chatbot/model/t2s.js +13 -18
  32. package/dist/commonjs/features/chatbot/model/t2s.js.map +1 -1
  33. package/dist/commonjs/features/chatbot/model/translation.helpers.js.map +1 -1
  34. package/dist/commonjs/features/chatbot/model/translation.js +19 -28
  35. package/dist/commonjs/features/chatbot/model/translation.js.map +1 -1
  36. package/dist/commonjs/features/chatbot/types/api.types.js +0 -4
  37. package/dist/commonjs/features/chatbot/types/model.types.js.map +1 -1
  38. package/dist/commonjs/features/endOfAssignment/ui/PracticeButtonGroup.js.map +1 -1
  39. package/dist/commonjs/index.js.map +1 -1
  40. package/dist/commonjs/lib/effector/createEntityFieldStore.js +0 -4
  41. package/dist/commonjs/lib/effector/createEntityFieldStore.js.map +1 -1
  42. package/{src/shared/translation → dist/commonjs/lib}/localization/en.json +1 -8
  43. package/dist/{module/shared/translation → commonjs/lib}/localization/gb.json +1 -8
  44. package/dist/commonjs/{shared/translation → lib}/localization/sw.json +1 -8
  45. package/dist/commonjs/shared/icons/icon.types.js +0 -4
  46. package/dist/commonjs/shared/translation/constants.js +3 -3
  47. package/dist/commonjs/shared/translation/constants.js.map +1 -1
  48. package/dist/commonjs/shared/translation/helpers.js +6 -22
  49. package/dist/commonjs/shared/translation/helpers.js.map +1 -1
  50. package/dist/commonjs/shared/translation/hooks.js +5 -3
  51. package/dist/commonjs/shared/translation/hooks.js.map +1 -1
  52. package/dist/commonjs/shared/translation/model.js +1 -1
  53. package/dist/commonjs/shared/translation/model.js.map +1 -1
  54. package/dist/commonjs/shared/translation/types.js +1 -1
  55. package/dist/commonjs/shared/translation/types.js.map +1 -1
  56. package/dist/module/features/celebrations/config.js +4 -4
  57. package/dist/module/features/celebrations/config.js.map +1 -1
  58. package/dist/module/features/chatbot/components/Alternatives/Alternatives.js +1 -2
  59. package/dist/module/features/chatbot/components/Alternatives/Alternatives.js.map +1 -1
  60. package/dist/module/features/chatbot/components/ChatMessage/ChatMessage.js.map +1 -1
  61. package/dist/module/features/chatbot/components/ChatMessage/MessageTextToSpeech.js +48 -31
  62. package/dist/module/features/chatbot/components/ChatMessage/MessageTextToSpeech.js.map +1 -1
  63. package/dist/module/features/chatbot/components/ChatMessage/ReceivedMessage.js +43 -23
  64. package/dist/module/features/chatbot/components/ChatMessage/ReceivedMessage.js.map +1 -1
  65. package/dist/module/features/chatbot/components/ChatMessage/SentMessage.js +13 -11
  66. package/dist/module/features/chatbot/components/ChatMessage/SentMessage.js.map +1 -1
  67. package/dist/module/features/chatbot/components/ChatMessages/ChatbotMessages.js +32 -17
  68. package/dist/module/features/chatbot/components/ChatMessages/ChatbotMessages.js.map +1 -1
  69. package/dist/module/features/chatbot/components/Chatbot.js +8 -6
  70. package/dist/module/features/chatbot/components/Chatbot.js.map +1 -1
  71. package/dist/module/features/chatbot/index.js +1 -0
  72. package/dist/module/features/chatbot/index.js.map +1 -1
  73. package/dist/module/features/chatbot/model/{ChatBotThreadManager.js → ChatBotMessageHandler.js} +20 -42
  74. package/dist/module/features/chatbot/model/ChatBotMessageHandler.js.map +1 -0
  75. package/dist/module/features/chatbot/model/ChatBotModel.js +126 -147
  76. package/dist/module/features/chatbot/model/ChatBotModel.js.map +1 -1
  77. package/dist/module/features/chatbot/model/DefaultMessageCreator.js +12 -12
  78. package/dist/module/features/chatbot/model/DefaultMessageCreator.js.map +1 -1
  79. package/dist/module/features/chatbot/model/ThreadItem.js +8 -16
  80. package/dist/module/features/chatbot/model/ThreadItem.js.map +1 -1
  81. package/dist/module/features/chatbot/model/{ChatbotApi.js → api.js} +1 -2
  82. package/dist/module/features/chatbot/model/api.js.map +1 -0
  83. package/dist/module/features/chatbot/model/constants.js.map +1 -1
  84. package/dist/module/features/chatbot/model/messagesHelper.js +7 -7
  85. package/dist/module/features/chatbot/model/messagesHelper.js.map +1 -1
  86. package/dist/module/features/chatbot/model/t2s.js +14 -19
  87. package/dist/module/features/chatbot/model/t2s.js.map +1 -1
  88. package/dist/module/features/chatbot/model/translation.helpers.js.map +1 -1
  89. package/dist/module/features/chatbot/model/translation.js +19 -28
  90. package/dist/module/features/chatbot/model/translation.js.map +1 -1
  91. package/dist/module/features/chatbot/types/api.types.js +0 -2
  92. package/dist/module/features/chatbot/types/model.types.js.map +1 -1
  93. package/dist/module/features/endOfAssignment/ui/PracticeButtonGroup.js.map +1 -1
  94. package/dist/module/index.js.map +1 -1
  95. package/dist/module/lib/effector/createEntityFieldStore.js +0 -4
  96. package/dist/module/lib/effector/createEntityFieldStore.js.map +1 -1
  97. package/dist/module/{shared/translation → lib}/localization/en.json +1 -8
  98. package/dist/{commonjs/shared/translation → module/lib}/localization/gb.json +1 -8
  99. package/dist/module/{shared/translation → lib}/localization/sw.json +1 -8
  100. package/dist/module/shared/icons/icon.types.js +0 -2
  101. package/dist/module/shared/translation/constants.js +3 -3
  102. package/dist/module/shared/translation/constants.js.map +1 -1
  103. package/dist/module/shared/translation/helpers.js +5 -19
  104. package/dist/module/shared/translation/helpers.js.map +1 -1
  105. package/dist/module/shared/translation/hooks.js +6 -4
  106. package/dist/module/shared/translation/hooks.js.map +1 -1
  107. package/dist/module/shared/translation/model.js +1 -1
  108. package/dist/module/shared/translation/model.js.map +1 -1
  109. package/dist/module/shared/translation/types.js +0 -2
  110. package/dist/module/shared/translation/types.js.map +1 -1
  111. package/dist/typescript/commonjs/features/chatbot/components/Alternatives/Alternatives.d.ts +3 -1
  112. package/dist/typescript/commonjs/features/chatbot/components/Alternatives/Alternatives.d.ts.map +1 -1
  113. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/ChatMessage.d.ts +10 -7
  114. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/ChatMessage.d.ts.map +1 -1
  115. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageTextToSpeech.d.ts +7 -5
  116. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageTextToSpeech.d.ts.map +1 -1
  117. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/ReceivedMessage.d.ts +1 -1
  118. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/ReceivedMessage.d.ts.map +1 -1
  119. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/SentMessage.d.ts +1 -1
  120. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/SentMessage.d.ts.map +1 -1
  121. package/dist/typescript/commonjs/features/chatbot/components/ChatMessages/ChatbotMessages.d.ts +10 -2
  122. package/dist/typescript/commonjs/features/chatbot/components/ChatMessages/ChatbotMessages.d.ts.map +1 -1
  123. package/dist/typescript/commonjs/features/chatbot/components/Chatbot.d.ts +5 -2
  124. package/dist/typescript/commonjs/features/chatbot/components/Chatbot.d.ts.map +1 -1
  125. package/dist/typescript/commonjs/features/chatbot/index.d.ts +3 -4
  126. package/dist/typescript/commonjs/features/chatbot/index.d.ts.map +1 -1
  127. package/dist/typescript/commonjs/features/chatbot/model/ChatBotMessageHandler.d.ts +31 -0
  128. package/dist/typescript/commonjs/features/chatbot/model/ChatBotMessageHandler.d.ts.map +1 -0
  129. package/dist/typescript/commonjs/features/chatbot/model/ChatBotModel.d.ts +18 -24
  130. package/dist/typescript/commonjs/features/chatbot/model/ChatBotModel.d.ts.map +1 -1
  131. package/dist/typescript/commonjs/features/chatbot/model/DefaultMessageCreator.d.ts +3 -5
  132. package/dist/typescript/commonjs/features/chatbot/model/DefaultMessageCreator.d.ts.map +1 -1
  133. package/dist/typescript/commonjs/features/chatbot/model/ThreadItem.d.ts +7 -13
  134. package/dist/typescript/commonjs/features/chatbot/model/ThreadItem.d.ts.map +1 -1
  135. package/dist/typescript/commonjs/features/chatbot/model/{ChatbotApi.d.ts → api.d.ts} +3 -4
  136. package/dist/typescript/commonjs/features/chatbot/model/api.d.ts.map +1 -0
  137. package/dist/typescript/commonjs/features/chatbot/model/constants.d.ts.map +1 -1
  138. package/dist/typescript/commonjs/features/chatbot/model/messagesHelper.d.ts +5 -7
  139. package/dist/typescript/commonjs/features/chatbot/model/messagesHelper.d.ts.map +1 -1
  140. package/dist/typescript/commonjs/features/chatbot/model/t2s.d.ts +6 -16
  141. package/dist/typescript/commonjs/features/chatbot/model/t2s.d.ts.map +1 -1
  142. package/dist/typescript/commonjs/features/chatbot/model/translation.d.ts +9 -8
  143. package/dist/typescript/commonjs/features/chatbot/model/translation.d.ts.map +1 -1
  144. package/dist/typescript/commonjs/features/chatbot/model/translation.helpers.d.ts +1 -2
  145. package/dist/typescript/commonjs/features/chatbot/model/translation.helpers.d.ts.map +1 -1
  146. package/dist/typescript/commonjs/features/chatbot/types/api.types.d.ts +11 -12
  147. package/dist/typescript/commonjs/features/chatbot/types/api.types.d.ts.map +1 -1
  148. package/dist/typescript/commonjs/features/chatbot/types/model.types.d.ts +24 -19
  149. package/dist/typescript/commonjs/features/chatbot/types/model.types.d.ts.map +1 -1
  150. package/dist/typescript/commonjs/features/chatbot/types/t2s.types.d.ts +7 -9
  151. package/dist/typescript/commonjs/features/chatbot/types/t2s.types.d.ts.map +1 -1
  152. package/dist/typescript/commonjs/features/chatbot/types/translation.types.d.ts +2 -3
  153. package/dist/typescript/commonjs/features/chatbot/types/translation.types.d.ts.map +1 -1
  154. package/dist/typescript/commonjs/features/endOfAssignment/ui/PracticeButtonGroup.d.ts.map +1 -1
  155. package/dist/typescript/commonjs/index.d.ts +1 -0
  156. package/dist/typescript/commonjs/index.d.ts.map +1 -1
  157. package/dist/typescript/commonjs/lib/effector/createEntityFieldStore.d.ts +0 -2
  158. package/dist/typescript/commonjs/lib/effector/createEntityFieldStore.d.ts.map +1 -1
  159. package/dist/typescript/commonjs/shared/icons/icon.types.d.ts +0 -2
  160. package/dist/typescript/commonjs/shared/icons/icon.types.d.ts.map +1 -1
  161. package/dist/typescript/commonjs/shared/translation/constants.d.ts +0 -21
  162. package/dist/typescript/commonjs/shared/translation/constants.d.ts.map +1 -1
  163. package/dist/typescript/commonjs/shared/translation/helpers.d.ts +2 -3
  164. package/dist/typescript/commonjs/shared/translation/helpers.d.ts.map +1 -1
  165. package/dist/typescript/commonjs/shared/translation/hooks.d.ts +2 -2
  166. package/dist/typescript/commonjs/shared/translation/hooks.d.ts.map +1 -1
  167. package/dist/typescript/commonjs/shared/translation/index.d.ts +1 -0
  168. package/dist/typescript/commonjs/shared/translation/index.d.ts.map +1 -1
  169. package/dist/typescript/commonjs/shared/translation/model.d.ts +3 -43
  170. package/dist/typescript/commonjs/shared/translation/model.d.ts.map +1 -1
  171. package/dist/typescript/commonjs/shared/translation/types.d.ts +4 -4
  172. package/dist/typescript/commonjs/shared/translation/types.d.ts.map +1 -1
  173. package/dist/typescript/module/features/chatbot/components/Alternatives/Alternatives.d.ts +3 -1
  174. package/dist/typescript/module/features/chatbot/components/Alternatives/Alternatives.d.ts.map +1 -1
  175. package/dist/typescript/module/features/chatbot/components/ChatMessage/ChatMessage.d.ts +10 -7
  176. package/dist/typescript/module/features/chatbot/components/ChatMessage/ChatMessage.d.ts.map +1 -1
  177. package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageTextToSpeech.d.ts +7 -5
  178. package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageTextToSpeech.d.ts.map +1 -1
  179. package/dist/typescript/module/features/chatbot/components/ChatMessage/ReceivedMessage.d.ts +1 -1
  180. package/dist/typescript/module/features/chatbot/components/ChatMessage/ReceivedMessage.d.ts.map +1 -1
  181. package/dist/typescript/module/features/chatbot/components/ChatMessage/SentMessage.d.ts +1 -1
  182. package/dist/typescript/module/features/chatbot/components/ChatMessage/SentMessage.d.ts.map +1 -1
  183. package/dist/typescript/module/features/chatbot/components/ChatMessages/ChatbotMessages.d.ts +10 -2
  184. package/dist/typescript/module/features/chatbot/components/ChatMessages/ChatbotMessages.d.ts.map +1 -1
  185. package/dist/typescript/module/features/chatbot/components/Chatbot.d.ts +5 -2
  186. package/dist/typescript/module/features/chatbot/components/Chatbot.d.ts.map +1 -1
  187. package/dist/typescript/module/features/chatbot/index.d.ts +3 -4
  188. package/dist/typescript/module/features/chatbot/index.d.ts.map +1 -1
  189. package/dist/typescript/module/features/chatbot/model/ChatBotMessageHandler.d.ts +31 -0
  190. package/dist/typescript/module/features/chatbot/model/ChatBotMessageHandler.d.ts.map +1 -0
  191. package/dist/typescript/module/features/chatbot/model/ChatBotModel.d.ts +18 -24
  192. package/dist/typescript/module/features/chatbot/model/ChatBotModel.d.ts.map +1 -1
  193. package/dist/typescript/module/features/chatbot/model/DefaultMessageCreator.d.ts +3 -5
  194. package/dist/typescript/module/features/chatbot/model/DefaultMessageCreator.d.ts.map +1 -1
  195. package/dist/typescript/module/features/chatbot/model/ThreadItem.d.ts +7 -13
  196. package/dist/typescript/module/features/chatbot/model/ThreadItem.d.ts.map +1 -1
  197. package/dist/typescript/module/features/chatbot/model/{ChatbotApi.d.ts → api.d.ts} +3 -4
  198. package/dist/typescript/module/features/chatbot/model/api.d.ts.map +1 -0
  199. package/dist/typescript/module/features/chatbot/model/constants.d.ts.map +1 -1
  200. package/dist/typescript/module/features/chatbot/model/messagesHelper.d.ts +5 -7
  201. package/dist/typescript/module/features/chatbot/model/messagesHelper.d.ts.map +1 -1
  202. package/dist/typescript/module/features/chatbot/model/t2s.d.ts +6 -16
  203. package/dist/typescript/module/features/chatbot/model/t2s.d.ts.map +1 -1
  204. package/dist/typescript/module/features/chatbot/model/translation.d.ts +9 -8
  205. package/dist/typescript/module/features/chatbot/model/translation.d.ts.map +1 -1
  206. package/dist/typescript/module/features/chatbot/model/translation.helpers.d.ts +1 -2
  207. package/dist/typescript/module/features/chatbot/model/translation.helpers.d.ts.map +1 -1
  208. package/dist/typescript/module/features/chatbot/types/api.types.d.ts +11 -12
  209. package/dist/typescript/module/features/chatbot/types/api.types.d.ts.map +1 -1
  210. package/dist/typescript/module/features/chatbot/types/model.types.d.ts +24 -19
  211. package/dist/typescript/module/features/chatbot/types/model.types.d.ts.map +1 -1
  212. package/dist/typescript/module/features/chatbot/types/t2s.types.d.ts +7 -9
  213. package/dist/typescript/module/features/chatbot/types/t2s.types.d.ts.map +1 -1
  214. package/dist/typescript/module/features/chatbot/types/translation.types.d.ts +2 -3
  215. package/dist/typescript/module/features/chatbot/types/translation.types.d.ts.map +1 -1
  216. package/dist/typescript/module/features/endOfAssignment/ui/PracticeButtonGroup.d.ts.map +1 -1
  217. package/dist/typescript/module/index.d.ts +1 -0
  218. package/dist/typescript/module/index.d.ts.map +1 -1
  219. package/dist/typescript/module/lib/effector/createEntityFieldStore.d.ts +0 -2
  220. package/dist/typescript/module/lib/effector/createEntityFieldStore.d.ts.map +1 -1
  221. package/dist/typescript/module/shared/icons/icon.types.d.ts +0 -2
  222. package/dist/typescript/module/shared/icons/icon.types.d.ts.map +1 -1
  223. package/dist/typescript/module/shared/translation/constants.d.ts +0 -21
  224. package/dist/typescript/module/shared/translation/constants.d.ts.map +1 -1
  225. package/dist/typescript/module/shared/translation/helpers.d.ts +2 -3
  226. package/dist/typescript/module/shared/translation/helpers.d.ts.map +1 -1
  227. package/dist/typescript/module/shared/translation/hooks.d.ts +2 -2
  228. package/dist/typescript/module/shared/translation/hooks.d.ts.map +1 -1
  229. package/dist/typescript/module/shared/translation/index.d.ts +1 -0
  230. package/dist/typescript/module/shared/translation/index.d.ts.map +1 -1
  231. package/dist/typescript/module/shared/translation/model.d.ts +3 -43
  232. package/dist/typescript/module/shared/translation/model.d.ts.map +1 -1
  233. package/dist/typescript/module/shared/translation/types.d.ts +4 -4
  234. package/dist/typescript/module/shared/translation/types.d.ts.map +1 -1
  235. package/package.json +2 -2
  236. package/src/features/celebrations/config.ts +4 -4
  237. package/src/features/chatbot/components/Alternatives/Alternatives.tsx +4 -2
  238. package/src/features/chatbot/components/ChatMessage/ChatMessage.tsx +10 -7
  239. package/src/features/chatbot/components/ChatMessage/MessageTextToSpeech.tsx +51 -34
  240. package/src/features/chatbot/components/ChatMessage/ReceivedMessage.tsx +40 -15
  241. package/src/features/chatbot/components/ChatMessage/SentMessage.tsx +10 -9
  242. package/src/features/chatbot/components/ChatMessages/ChatbotMessages.tsx +34 -17
  243. package/src/features/chatbot/components/Chatbot.tsx +11 -5
  244. package/src/features/chatbot/index.ts +4 -3
  245. package/src/features/chatbot/model/{ChatBotThreadManager.ts → ChatBotMessageHandler.ts} +27 -53
  246. package/src/features/chatbot/model/ChatBotModel.ts +149 -151
  247. package/src/features/chatbot/model/DefaultMessageCreator.ts +16 -17
  248. package/src/features/chatbot/model/ThreadItem.ts +10 -15
  249. package/src/features/chatbot/model/{ChatbotApi.ts → api.ts} +2 -5
  250. package/src/features/chatbot/model/constants.ts +0 -2
  251. package/src/features/chatbot/model/messagesHelper.ts +7 -12
  252. package/src/features/chatbot/model/t2s.ts +13 -28
  253. package/src/features/chatbot/model/translation.helpers.ts +1 -2
  254. package/src/features/chatbot/model/translation.ts +24 -34
  255. package/src/features/chatbot/types/api.types.ts +12 -12
  256. package/src/features/chatbot/types/model.types.ts +32 -31
  257. package/src/features/chatbot/types/t2s.types.ts +15 -18
  258. package/src/features/chatbot/types/translation.types.ts +2 -3
  259. package/src/features/endOfAssignment/ui/PracticeButtonGroup.tsx +1 -0
  260. package/src/index.ts +1 -0
  261. package/src/lib/effector/createEntityFieldStore.ts +1 -9
  262. package/{dist/commonjs/shared/translation → src/lib}/localization/en.json +1 -8
  263. package/src/{shared/translation → lib}/localization/gb.json +1 -8
  264. package/src/{shared/translation → lib}/localization/sw.json +1 -8
  265. package/src/shared/icons/icon.types.ts +6 -9
  266. package/src/shared/translation/constants.ts +3 -3
  267. package/src/shared/translation/helpers.ts +9 -22
  268. package/src/shared/translation/hooks.ts +16 -12
  269. package/src/shared/translation/index.ts +1 -0
  270. package/src/shared/translation/model.ts +8 -8
  271. package/src/shared/translation/types.ts +8 -11
  272. package/dist/commonjs/features/chatbot/components/ChatMessage/MessageButtonsBlock.js +0 -44
  273. package/dist/commonjs/features/chatbot/components/ChatMessage/MessageButtonsBlock.js.map +0 -1
  274. package/dist/commonjs/features/chatbot/components/ChatMessage/MessageContent.js +0 -62
  275. package/dist/commonjs/features/chatbot/components/ChatMessage/MessageContent.js.map +0 -1
  276. package/dist/commonjs/features/chatbot/components/ChatMessage/helpers.js +0 -13
  277. package/dist/commonjs/features/chatbot/components/ChatMessage/helpers.js.map +0 -1
  278. package/dist/commonjs/features/chatbot/context/ChatBotModelContext.js +0 -17
  279. package/dist/commonjs/features/chatbot/context/ChatBotModelContext.js.map +0 -1
  280. package/dist/commonjs/features/chatbot/errorSpotting/ErrorSpottingButton.js +0 -57
  281. package/dist/commonjs/features/chatbot/errorSpotting/ErrorSpottingButton.js.map +0 -1
  282. package/dist/commonjs/features/chatbot/errorSpotting/ErrorSpottingModel.js +0 -130
  283. package/dist/commonjs/features/chatbot/errorSpotting/ErrorSpottingModel.js.map +0 -1
  284. package/dist/commonjs/features/chatbot/model/ChatBotThreadManager.js.map +0 -1
  285. package/dist/commonjs/features/chatbot/model/ChatBoxTextManager.js +0 -22
  286. package/dist/commonjs/features/chatbot/model/ChatBoxTextManager.js.map +0 -1
  287. package/dist/commonjs/features/chatbot/model/ChatbotApi.js.map +0 -1
  288. package/dist/commonjs/features/chatbot/model/ChatsCacheModel.js +0 -110
  289. package/dist/commonjs/features/chatbot/model/ChatsCacheModel.js.map +0 -1
  290. package/dist/commonjs/features/chatbot/types/units.types.js +0 -2
  291. package/dist/commonjs/features/chatbot/types/units.types.js.map +0 -1
  292. package/dist/commonjs/lib/effector/withEvent.js +0 -13
  293. package/dist/commonjs/lib/effector/withEvent.js.map +0 -1
  294. package/dist/commonjs/lib/types/keys.js +0 -2
  295. package/dist/commonjs/lib/types/keys.js.map +0 -1
  296. package/dist/commonjs/shared/icons/HighlighterIcon.js +0 -36
  297. package/dist/commonjs/shared/icons/HighlighterIcon.js.map +0 -1
  298. package/dist/commonjs/shared/icons/StopIcon.js +0 -33
  299. package/dist/commonjs/shared/icons/StopIcon.js.map +0 -1
  300. package/dist/commonjs/shared/translation/validation.types.js +0 -6
  301. package/dist/commonjs/shared/translation/validation.types.js.map +0 -1
  302. package/dist/module/features/chatbot/components/ChatMessage/MessageButtonsBlock.js +0 -38
  303. package/dist/module/features/chatbot/components/ChatMessage/MessageButtonsBlock.js.map +0 -1
  304. package/dist/module/features/chatbot/components/ChatMessage/MessageContent.js +0 -57
  305. package/dist/module/features/chatbot/components/ChatMessage/MessageContent.js.map +0 -1
  306. package/dist/module/features/chatbot/components/ChatMessage/helpers.js +0 -9
  307. package/dist/module/features/chatbot/components/ChatMessage/helpers.js.map +0 -1
  308. package/dist/module/features/chatbot/context/ChatBotModelContext.js +0 -12
  309. package/dist/module/features/chatbot/context/ChatBotModelContext.js.map +0 -1
  310. package/dist/module/features/chatbot/errorSpotting/ErrorSpottingButton.js +0 -51
  311. package/dist/module/features/chatbot/errorSpotting/ErrorSpottingButton.js.map +0 -1
  312. package/dist/module/features/chatbot/errorSpotting/ErrorSpottingModel.js +0 -125
  313. package/dist/module/features/chatbot/errorSpotting/ErrorSpottingModel.js.map +0 -1
  314. package/dist/module/features/chatbot/model/ChatBotThreadManager.js.map +0 -1
  315. package/dist/module/features/chatbot/model/ChatBoxTextManager.js +0 -17
  316. package/dist/module/features/chatbot/model/ChatBoxTextManager.js.map +0 -1
  317. package/dist/module/features/chatbot/model/ChatbotApi.js.map +0 -1
  318. package/dist/module/features/chatbot/model/ChatsCacheModel.js +0 -104
  319. package/dist/module/features/chatbot/model/ChatsCacheModel.js.map +0 -1
  320. package/dist/module/features/chatbot/types/units.types.js +0 -2
  321. package/dist/module/features/chatbot/types/units.types.js.map +0 -1
  322. package/dist/module/lib/effector/withEvent.js +0 -9
  323. package/dist/module/lib/effector/withEvent.js.map +0 -1
  324. package/dist/module/lib/types/keys.js +0 -2
  325. package/dist/module/lib/types/keys.js.map +0 -1
  326. package/dist/module/shared/icons/HighlighterIcon.js +0 -29
  327. package/dist/module/shared/icons/HighlighterIcon.js.map +0 -1
  328. package/dist/module/shared/icons/StopIcon.js +0 -26
  329. package/dist/module/shared/icons/StopIcon.js.map +0 -1
  330. package/dist/module/shared/translation/validation.types.js +0 -4
  331. package/dist/module/shared/translation/validation.types.js.map +0 -1
  332. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageButtonsBlock.d.ts +0 -10
  333. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageButtonsBlock.d.ts.map +0 -1
  334. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageContent.d.ts +0 -11
  335. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageContent.d.ts.map +0 -1
  336. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/helpers.d.ts +0 -4
  337. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/helpers.d.ts.map +0 -1
  338. package/dist/typescript/commonjs/features/chatbot/context/ChatBotModelContext.d.ts +0 -4
  339. package/dist/typescript/commonjs/features/chatbot/context/ChatBotModelContext.d.ts.map +0 -1
  340. package/dist/typescript/commonjs/features/chatbot/errorSpotting/ErrorSpottingButton.d.ts +0 -8
  341. package/dist/typescript/commonjs/features/chatbot/errorSpotting/ErrorSpottingButton.d.ts.map +0 -1
  342. package/dist/typescript/commonjs/features/chatbot/errorSpotting/ErrorSpottingModel.d.ts +0 -35
  343. package/dist/typescript/commonjs/features/chatbot/errorSpotting/ErrorSpottingModel.d.ts.map +0 -1
  344. package/dist/typescript/commonjs/features/chatbot/model/ChatBotThreadManager.d.ts +0 -33
  345. package/dist/typescript/commonjs/features/chatbot/model/ChatBotThreadManager.d.ts.map +0 -1
  346. package/dist/typescript/commonjs/features/chatbot/model/ChatBoxTextManager.d.ts +0 -6
  347. package/dist/typescript/commonjs/features/chatbot/model/ChatBoxTextManager.d.ts.map +0 -1
  348. package/dist/typescript/commonjs/features/chatbot/model/ChatbotApi.d.ts.map +0 -1
  349. package/dist/typescript/commonjs/features/chatbot/model/ChatsCacheModel.d.ts +0 -27
  350. package/dist/typescript/commonjs/features/chatbot/model/ChatsCacheModel.d.ts.map +0 -1
  351. package/dist/typescript/commonjs/features/chatbot/types/units.types.d.ts +0 -34
  352. package/dist/typescript/commonjs/features/chatbot/types/units.types.d.ts.map +0 -1
  353. package/dist/typescript/commonjs/lib/effector/withEvent.d.ts +0 -2
  354. package/dist/typescript/commonjs/lib/effector/withEvent.d.ts.map +0 -1
  355. package/dist/typescript/commonjs/lib/types/keys.d.ts +0 -8
  356. package/dist/typescript/commonjs/lib/types/keys.d.ts.map +0 -1
  357. package/dist/typescript/commonjs/shared/icons/HighlighterIcon.d.ts +0 -4
  358. package/dist/typescript/commonjs/shared/icons/HighlighterIcon.d.ts.map +0 -1
  359. package/dist/typescript/commonjs/shared/icons/StopIcon.d.ts +0 -4
  360. package/dist/typescript/commonjs/shared/icons/StopIcon.d.ts.map +0 -1
  361. package/dist/typescript/commonjs/shared/translation/validation.types.d.ts +0 -17
  362. package/dist/typescript/commonjs/shared/translation/validation.types.d.ts.map +0 -1
  363. package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageButtonsBlock.d.ts +0 -10
  364. package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageButtonsBlock.d.ts.map +0 -1
  365. package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageContent.d.ts +0 -11
  366. package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageContent.d.ts.map +0 -1
  367. package/dist/typescript/module/features/chatbot/components/ChatMessage/helpers.d.ts +0 -4
  368. package/dist/typescript/module/features/chatbot/components/ChatMessage/helpers.d.ts.map +0 -1
  369. package/dist/typescript/module/features/chatbot/context/ChatBotModelContext.d.ts +0 -4
  370. package/dist/typescript/module/features/chatbot/context/ChatBotModelContext.d.ts.map +0 -1
  371. package/dist/typescript/module/features/chatbot/errorSpotting/ErrorSpottingButton.d.ts +0 -8
  372. package/dist/typescript/module/features/chatbot/errorSpotting/ErrorSpottingButton.d.ts.map +0 -1
  373. package/dist/typescript/module/features/chatbot/errorSpotting/ErrorSpottingModel.d.ts +0 -35
  374. package/dist/typescript/module/features/chatbot/errorSpotting/ErrorSpottingModel.d.ts.map +0 -1
  375. package/dist/typescript/module/features/chatbot/model/ChatBotThreadManager.d.ts +0 -33
  376. package/dist/typescript/module/features/chatbot/model/ChatBotThreadManager.d.ts.map +0 -1
  377. package/dist/typescript/module/features/chatbot/model/ChatBoxTextManager.d.ts +0 -6
  378. package/dist/typescript/module/features/chatbot/model/ChatBoxTextManager.d.ts.map +0 -1
  379. package/dist/typescript/module/features/chatbot/model/ChatbotApi.d.ts.map +0 -1
  380. package/dist/typescript/module/features/chatbot/model/ChatsCacheModel.d.ts +0 -27
  381. package/dist/typescript/module/features/chatbot/model/ChatsCacheModel.d.ts.map +0 -1
  382. package/dist/typescript/module/features/chatbot/types/units.types.d.ts +0 -34
  383. package/dist/typescript/module/features/chatbot/types/units.types.d.ts.map +0 -1
  384. package/dist/typescript/module/lib/effector/withEvent.d.ts +0 -2
  385. package/dist/typescript/module/lib/effector/withEvent.d.ts.map +0 -1
  386. package/dist/typescript/module/lib/types/keys.d.ts +0 -8
  387. package/dist/typescript/module/lib/types/keys.d.ts.map +0 -1
  388. package/dist/typescript/module/shared/icons/HighlighterIcon.d.ts +0 -4
  389. package/dist/typescript/module/shared/icons/HighlighterIcon.d.ts.map +0 -1
  390. package/dist/typescript/module/shared/icons/StopIcon.d.ts +0 -4
  391. package/dist/typescript/module/shared/icons/StopIcon.d.ts.map +0 -1
  392. package/dist/typescript/module/shared/translation/validation.types.d.ts +0 -17
  393. package/dist/typescript/module/shared/translation/validation.types.d.ts.map +0 -1
  394. package/src/features/chatbot/components/ChatMessage/MessageButtonsBlock.tsx +0 -38
  395. package/src/features/chatbot/components/ChatMessage/MessageContent.tsx +0 -52
  396. package/src/features/chatbot/components/ChatMessage/helpers.ts +0 -9
  397. package/src/features/chatbot/context/ChatBotModelContext.ts +0 -14
  398. package/src/features/chatbot/errorSpotting/ErrorSpottingButton.tsx +0 -53
  399. package/src/features/chatbot/errorSpotting/ErrorSpottingModel.ts +0 -150
  400. package/src/features/chatbot/model/ChatBoxTextManager.ts +0 -18
  401. package/src/features/chatbot/model/ChatsCacheModel.ts +0 -95
  402. package/src/features/chatbot/types/units.types.ts +0 -37
  403. package/src/lib/effector/withEvent.ts +0 -7
  404. package/src/lib/types/keys.ts +0 -18
  405. package/src/shared/icons/HighlighterIcon.tsx +0 -21
  406. package/src/shared/icons/StopIcon.tsx +0 -17
  407. package/src/shared/translation/validation.types.ts +0 -26
@@ -1,26 +1,30 @@
1
1
  import type { Store } from 'effector';
2
- import { ChatHintPayload, ChatHintResponse, ErrorSpottingPayload, ErrorSpottingResponse, GetAlternativesPayload, GetAlternativesResponse, GoogleText2SpeechPayload, GoogleText2SpeechResponse, GoogleTranslatePayload, GoogleTranslateResponse, PostMessagePayload, PostMessageResponse } from './api.types';
2
+ import { GetAlternativesResponse, PostMessagePayload, PostMessageResponse, GoogleTranslatePayload, GoogleTranslateResponse, GoogleText2SpeechPayload, GoogleText2SpeechResponse, ChatAnswer, GetAlternativesPayload, Stroke } from './api.types';
3
3
  import { ExtendWithOptional } from '../../../lib/helpers/types';
4
- import { ChatAnswer, ConversationMessage, FullStrokeData } from './units.types';
4
+ export type ConversationMessage = {
5
+ id: string;
6
+ message: string;
7
+ threadId: string;
8
+ options: ChatAnswer[];
9
+ isOwnMessage: boolean;
10
+ translatedMessage?: string;
11
+ endMessage?: boolean;
12
+ };
5
13
  export type ChatbotMessages = {
6
14
  error: ConversationMessage;
7
15
  start: ConversationMessage;
8
16
  endMessage: ConversationMessage;
9
17
  anotherHintOption: ChatAnswer;
10
18
  };
11
- export type ChatbotApiRequests = {
12
- getAlternatives: (props: GetAlternativesPayload) => Promise<GetAlternativesResponse>;
13
- postMessage: (props: PostMessagePayload) => Promise<PostMessageResponse>;
14
- postTranslateText: (props: GoogleTranslatePayload) => Promise<GoogleTranslateResponse>;
15
- postTextToSpeech: (props: GoogleText2SpeechPayload) => Promise<GoogleText2SpeechResponse>;
16
- spotError: (props: ErrorSpottingPayload) => Promise<ErrorSpottingResponse>;
17
- };
18
19
  export type ChatbotModelProps = {
19
20
  $key?: Store<string>;
20
- api: Omit<ChatbotApiRequests, 'postMessage'> & {
21
- requestHint: (props: ChatHintPayload) => Promise<ChatHintResponse>;
21
+ api: {
22
+ getAlternatives: (props: GetAlternativesPayload) => Promise<GetAlternativesResponse>;
23
+ postMessage: (props: PostMessagePayload) => Promise<PostMessageResponse>;
24
+ postTranslateText: (props: GoogleTranslatePayload) => Promise<GoogleTranslateResponse>;
25
+ postTextToSpeech: (props: GoogleText2SpeechPayload) => Promise<GoogleText2SpeechResponse>;
22
26
  };
23
- threadMessagesLimit?: number;
27
+ messages: ChatbotMessages;
24
28
  };
25
29
  export type SendHelpParams = {
26
30
  message: string;
@@ -28,6 +32,8 @@ export type SendHelpParams = {
28
32
  };
29
33
  export type SendHelpProps = SendHelpParams & {
30
34
  key: string;
35
+ isTranslated: boolean;
36
+ threadId: string;
31
37
  context: ChatbotContext | null;
32
38
  };
33
39
  export type SetHintMessageProps = {
@@ -44,14 +50,14 @@ export declare enum MessageVariant {
44
50
  SENT = "sent",
45
51
  RECEIVED = "received"
46
52
  }
47
- export type CreateMessageResponse = ExtendWithOptional<Omit<PostMessageResponse, 'threadId'>, ConversationMessage>;
48
- type GetVisibleStrokesResponse = {
49
- strokes: FullStrokeData[];
50
- validationKey: string;
53
+ export type ChatbotRenderer = {
54
+ message: string;
55
+ variant: MessageVariant;
56
+ withTextToSpeech: boolean;
51
57
  };
58
+ export type CreateMessageResponse = ExtendWithOptional<PostMessageResponse, ConversationMessage>;
52
59
  export type IChatDrawBoardAdapter = {
53
- $strokesValidationKey: Store<string | null>;
54
- getVisibleStrokes(): Promise<GetVisibleStrokesResponse | null>;
60
+ getVisibleStrokes(): Promise<Stroke[] | null>;
55
61
  };
56
62
  export type ChatbotContext = {
57
63
  language: string;
@@ -61,5 +67,4 @@ export type ChatbotContext = {
61
67
  translationTargetLanguage: string;
62
68
  imageDescription?: string;
63
69
  };
64
- export {};
65
70
  //# sourceMappingURL=model.types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"model.types.d.ts","sourceRoot":"","sources":["../../../../../../src/features/chatbot/types/model.types.ts"],"names":[],"mappings":"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"}
1
+ {"version":3,"file":"model.types.d.ts","sourceRoot":"","sources":["../../../../../../src/features/chatbot/types/model.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAA;AACrC,OAAO,EACL,uBAAuB,EACvB,kBAAkB,EAClB,mBAAmB,EACnB,sBAAsB,EACtB,uBAAuB,EACvB,wBAAwB,EACxB,yBAAyB,EACzB,UAAU,EACV,sBAAsB,EACtB,MAAM,EACP,MAAM,aAAa,CAAA;AACpB,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;AAE/D,MAAM,MAAM,mBAAmB,GAAG;IAChC,EAAE,EAAE,MAAM,CAAA;IACV,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,UAAU,EAAE,CAAA;IACrB,YAAY,EAAE,OAAO,CAAA;IACrB,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB,CAAA;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B,KAAK,EAAE,mBAAmB,CAAA;IAC1B,KAAK,EAAE,mBAAmB,CAAA;IAC1B,UAAU,EAAE,mBAAmB,CAAA;IAC/B,iBAAiB,EAAE,UAAU,CAAA;CAC9B,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;IACpB,GAAG,EAAE;QACH,eAAe,EAAE,CAAC,KAAK,EAAE,sBAAsB,KAAK,OAAO,CAAC,uBAAuB,CAAC,CAAA;QACpF,WAAW,EAAE,CAAC,KAAK,EAAE,kBAAkB,KAAK,OAAO,CAAC,mBAAmB,CAAC,CAAA;QACxE,iBAAiB,EAAE,CAAC,KAAK,EAAE,sBAAsB,KAAK,OAAO,CAAC,uBAAuB,CAAC,CAAA;QACtF,gBAAgB,EAAE,CAAC,KAAK,EAAE,wBAAwB,KAAK,OAAO,CAAC,yBAAyB,CAAC,CAAA;KAC1F,CAAA;IACD,QAAQ,EAAE,eAAe,CAAA;CAC1B,CAAA;AAED,MAAM,MAAM,cAAc,GAAG;IAC3B,OAAO,EAAE,MAAM,CAAA;IACf,iBAAiB,CAAC,EAAE,MAAM,CAAA;CAC3B,CAAA;AAED,MAAM,MAAM,aAAa,GAAG,cAAc,GAAG;IAC3C,GAAG,EAAE,MAAM,CAAA;IACX,YAAY,EAAE,OAAO,CAAA;IACrB,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,cAAc,GAAG,IAAI,CAAA;CAC/B,CAAA;AAED,MAAM,MAAM,mBAAmB,GAAG;IAChC,GAAG,EAAE,MAAM,CAAA;CACZ,GAAG,mBAAmB,CAAA;AAEvB,MAAM,MAAM,sBAAsB,GAAG;IACnC,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AAED,MAAM,MAAM,uBAAuB,GAAG;IACpC,GAAG,EAAE,MAAM,CAAA;IACX,QAAQ,EAAE,mBAAmB,EAAE,CAAA;CAChC,GAAG,sBAAsB,CAAA;AAE1B,oBAAY,cAAc;IACxB,IAAI,SAAS;IACb,QAAQ,aAAa;CACtB;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,cAAc,CAAA;IACvB,gBAAgB,EAAE,OAAO,CAAA;CAC1B,CAAA;AAED,MAAM,MAAM,qBAAqB,GAAG,kBAAkB,CAAC,mBAAmB,EAAE,mBAAmB,CAAC,CAAA;AAEhG,MAAM,MAAM,qBAAqB,GAAG;IAClC,iBAAiB,IAAI,OAAO,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC,CAAA;CAC9C,CAAA;AAED,MAAM,MAAM,cAAc,GAAG;IAC3B,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,MAAM,CAAA;IACf,aAAa,EAAE,MAAM,EAAE,CAAA;IACvB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;IAC1B,yBAAyB,EAAE,MAAM,CAAA;IACjC,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAC1B,CAAA"}
@@ -1,4 +1,4 @@
1
- import { ConversationMessage } from './units.types';
1
+ import { AUDIO_CONFIG, DEFAULT_VOICE } from '../constants';
2
2
  export declare enum AudioStatus {
3
3
  PLAYING = "playing",
4
4
  STOPPED = "stopped",
@@ -11,14 +11,12 @@ export type AudioProvider = {
11
11
  stop: () => void;
12
12
  };
13
13
  export type PlayTextToSpeechProps = {
14
- message: ConversationMessage;
14
+ text: string;
15
+ messageId: string;
15
16
  isTranslated: boolean;
16
- };
17
- export type T2SState = {
18
- status: AudioStatus;
19
- disabled: boolean;
20
- isActive: boolean;
21
- isLoading: boolean;
22
- isEnabled: boolean;
17
+ config?: {
18
+ voice?: typeof DEFAULT_VOICE;
19
+ audioConfig?: typeof AUDIO_CONFIG;
20
+ };
23
21
  };
24
22
  //# sourceMappingURL=t2s.types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"t2s.types.d.ts","sourceRoot":"","sources":["../../../../../../src/features/chatbot/types/t2s.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAA;AAEnD,oBAAY,WAAW;IACrB,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,MAAM,WAAW;CAClB;AAED,MAAM,MAAM,aAAa,GAAG;IAC1B,IAAI,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,kBAAkB,EAAE,MAAM,IAAI,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IAC1E,KAAK,EAAE,MAAM,IAAI,CAAA;IACjB,MAAM,EAAE,MAAM,IAAI,CAAA;IAClB,IAAI,EAAE,MAAM,IAAI,CAAA;CACjB,CAAA;AAED,MAAM,MAAM,qBAAqB,GAAG;IAClC,OAAO,EAAE,mBAAmB,CAAA;IAC5B,YAAY,EAAE,OAAO,CAAA;CACtB,CAAA;AAED,MAAM,MAAM,QAAQ,GAAG;IACrB,MAAM,EAAE,WAAW,CAAA;IACnB,QAAQ,EAAE,OAAO,CAAA;IACjB,QAAQ,EAAE,OAAO,CAAA;IACjB,SAAS,EAAE,OAAO,CAAA;IAClB,SAAS,EAAE,OAAO,CAAA;CACnB,CAAA"}
1
+ {"version":3,"file":"t2s.types.d.ts","sourceRoot":"","sources":["../../../../../../src/features/chatbot/types/t2s.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAE1D,oBAAY,WAAW;IACnB,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,MAAM,WAAW;CACpB;AAED,MAAM,MAAM,aAAa,GAAG;IACxB,IAAI,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,kBAAkB,EAAE,MAAM,IAAI,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IAC1E,KAAK,EAAE,MAAM,IAAI,CAAA;IACjB,MAAM,EAAE,MAAM,IAAI,CAAA;IAClB,IAAI,EAAE,MAAM,IAAI,CAAA;CACnB,CAAA;AAED,MAAM,MAAM,qBAAqB,GAAG;IAChC,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,MAAM,CAAA;IACjB,YAAY,EAAE,OAAO,CAAA;IACrB,MAAM,CAAC,EAAE;QACL,KAAK,CAAC,EAAE,OAAO,aAAa,CAAA;QAC5B,WAAW,CAAC,EAAE,OAAO,YAAY,CAAA;KACpC,CAAA;CACJ,CAAA"}
@@ -1,14 +1,13 @@
1
+ import { ConversationMessage } from './model.types';
1
2
  import { GetAlternativesResponse } from './api.types';
2
- import { ConversationMessage } from './units.types';
3
3
  export type TranslateBatchFxProps = {
4
4
  messages: ConversationMessage[];
5
5
  targetLanguage: string;
6
6
  alternatives: GetAlternativesResponse | null;
7
7
  };
8
- export type ApplyTranslationProps = {
8
+ export type TranslateMessageFxProps = {
9
9
  messages: ConversationMessage[];
10
10
  targetLanguage: string;
11
- isTranslationActive: boolean;
12
11
  };
13
12
  export type AddTranslationToAlternativesProps = {
14
13
  alternatives: GetAlternativesResponse;
@@ -1 +1 @@
1
- {"version":3,"file":"translation.types.d.ts","sourceRoot":"","sources":["../../../../../../src/features/chatbot/types/translation.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAA;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAA;AAEnD,MAAM,MAAM,qBAAqB,GAAG;IAClC,QAAQ,EAAE,mBAAmB,EAAE,CAAA;IAC/B,cAAc,EAAE,MAAM,CAAA;IACtB,YAAY,EAAE,uBAAuB,GAAG,IAAI,CAAA;CAC7C,CAAA;AAED,MAAM,MAAM,qBAAqB,GAAG;IAClC,QAAQ,EAAE,mBAAmB,EAAE,CAAA;IAC/B,cAAc,EAAE,MAAM,CAAA;IACtB,mBAAmB,EAAE,OAAO,CAAA;CAC7B,CAAA;AAED,MAAM,MAAM,iCAAiC,GAAG;IAC9C,YAAY,EAAE,uBAAuB,CAAA;IACrC,eAAe,EAAE,MAAM,EAAE,CAAA;IACzB,kBAAkB,EAAE,MAAM,EAAE,CAAA;CAC7B,CAAA;AACD,MAAM,MAAM,eAAe,GAAG;IAC5B,YAAY,EAAE,uBAAuB,GAAG,IAAI,CAAA;IAC5C,WAAW,EAAE,mBAAmB,GAAG,SAAS,CAAA;CAC7C,CAAA;AACD,MAAM,MAAM,gBAAgB,GAAG;IAC7B,WAAW,EAAE,MAAM,EAAE,GAAG,IAAI,CAAA;IAC5B,YAAY,EAAE;QACZ,KAAK,EAAE,MAAM,EAAE,CAAA;QACf,OAAO,EAAE,MAAM,EAAE,CAAA;KAClB,GAAG,IAAI,CAAA;CACT,CAAA;AAED,MAAM,MAAM,qBAAqB,CAAC,IAAI,SAAS,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,IAAI;IACzE,QAAQ,EAAE,IAAI,CAAA;IACd,cAAc,EAAE,MAAM,CAAA;CACvB,CAAA"}
1
+ {"version":3,"file":"translation.types.d.ts","sourceRoot":"","sources":["../../../../../../src/features/chatbot/types/translation.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAA;AACnD,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAA;AAErD,MAAM,MAAM,qBAAqB,GAAG;IAClC,QAAQ,EAAE,mBAAmB,EAAE,CAAA;IAC/B,cAAc,EAAE,MAAM,CAAA;IACtB,YAAY,EAAE,uBAAuB,GAAG,IAAI,CAAA;CAC7C,CAAA;AAED,MAAM,MAAM,uBAAuB,GAAG;IACpC,QAAQ,EAAE,mBAAmB,EAAE,CAAA;IAC/B,cAAc,EAAE,MAAM,CAAA;CACvB,CAAA;AAED,MAAM,MAAM,iCAAiC,GAAG;IAC9C,YAAY,EAAE,uBAAuB,CAAA;IACrC,eAAe,EAAE,MAAM,EAAE,CAAA;IACzB,kBAAkB,EAAE,MAAM,EAAE,CAAA;CAC7B,CAAA;AACD,MAAM,MAAM,eAAe,GAAG;IAC5B,YAAY,EAAE,uBAAuB,GAAG,IAAI,CAAA;IAC5C,WAAW,EAAE,mBAAmB,GAAG,SAAS,CAAA;CAC7C,CAAA;AACD,MAAM,MAAM,gBAAgB,GAAG;IAC7B,WAAW,EAAE,MAAM,EAAE,GAAG,IAAI,CAAA;IAC5B,YAAY,EAAE;QACZ,KAAK,EAAE,MAAM,EAAE,CAAA;QACf,OAAO,EAAE,MAAM,EAAE,CAAA;KAClB,GAAG,IAAI,CAAA;CACT,CAAA;AAED,MAAM,MAAM,qBAAqB,CAAC,IAAI,SAAS,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,IAAI;IACzE,QAAQ,EAAE,IAAI,CAAA;IACd,cAAc,EAAE,MAAM,CAAA;CACvB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"PracticeButtonGroup.d.ts","sourceRoot":"","sources":["../../../../../../src/features/endOfAssignment/ui/PracticeButtonGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAA;AAcxC,KAAK,wBAAwB,GAAG;IAC9B,WAAW,EAAE;QAAE,cAAc,CAAC,EAAE,MAAM,CAAC;QAAC,eAAe,CAAC,EAAE,MAAM,CAAA;KAAE,CAAA;IAClE,uBAAuB,EAAE,OAAO,CAAA;IAChC,iBAAiB,EAAE,MAAM,IAAI,CAAA;IAC7B,kBAAkB,EAAE,MAAM,IAAI,CAAA;IAC9B,MAAM,EAAE,OAAO,CAAA;CAChB,CAAA;AAED,eAAO,MAAM,mBAAmB,6FAM7B,wBAAwB,sBAiC1B,CAAA"}
1
+ {"version":3,"file":"PracticeButtonGroup.d.ts","sourceRoot":"","sources":["../../../../../../src/features/endOfAssignment/ui/PracticeButtonGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAA;AAexC,KAAK,wBAAwB,GAAG;IAC9B,WAAW,EAAE;QAAE,cAAc,CAAC,EAAE,MAAM,CAAC;QAAC,eAAe,CAAC,EAAE,MAAM,CAAA;KAAE,CAAA;IAClE,uBAAuB,EAAE,OAAO,CAAA;IAChC,iBAAiB,EAAE,MAAM,IAAI,CAAA;IAC7B,kBAAkB,EAAE,MAAM,IAAI,CAAA;IAC9B,MAAM,EAAE,OAAO,CAAA;CAChB,CAAA;AAED,eAAO,MAAM,mBAAmB,6FAM7B,wBAAwB,sBAiC1B,CAAA"}
@@ -1,4 +1,5 @@
1
1
  export { useFeaturesLocalization, setFeaturesLocalization, Locale } from './shared/translation';
2
+ export type { LocalizationConfig } from './shared/translation';
2
3
  export { generateRandomId } from './lib/helpers/helpers';
3
4
  export * from './features/chatbot';
4
5
  export * from './features/feedback';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAC/F,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,cAAc,oBAAoB,CAAA;AAClC,cAAc,qBAAqB,CAAA;AACnC,cAAc,yBAAyB,CAAA;AACvC,cAAc,4BAA4B,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAC/F,YAAY,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,cAAc,oBAAoB,CAAA;AAClC,cAAc,qBAAqB,CAAA;AACnC,cAAc,yBAAyB,CAAA;AACvC,cAAc,4BAA4B,CAAA"}
@@ -1,4 +1,3 @@
1
- import { Event } from 'effector';
2
1
  type UpdateField<T> = {
3
2
  key: string;
4
3
  } & ({
@@ -12,7 +11,6 @@ export declare class EntityFieldStore<T> {
12
11
  readonly setField: import("effector").EventCallable<UpdateField<T>>;
13
12
  readonly reset: import("effector").EventCallable<void>;
14
13
  readonly $state: import("effector").StoreWritable<Record<string, T>>;
15
- on<EV>(event: Event<EV>, fn: (state: Record<string, T>, payload: EV) => Record<string, T> | void): this;
16
14
  }
17
15
  export declare function createEntityFieldStore<T>(): EntityFieldStore<T>;
18
16
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"createEntityFieldStore.d.ts","sourceRoot":"","sources":["../../../../../src/lib/effector/createEntityFieldStore.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,KAAK,EAAE,MAAM,UAAU,CAAA;AAE1D,KAAK,WAAW,CAAC,CAAC,IAAI;IACpB,GAAG,EAAE,MAAM,CAAA;CACZ,GAAG,CAAC;IAAE,IAAI,EAAE,CAAC,CAAC;IAAC,EAAE,CAAC,EAAE,KAAK,CAAA;CAAE,GAAG;IAAE,IAAI,CAAC,EAAE,KAAK,CAAC;IAAC,EAAE,EAAE,CAAC,KAAK,EAAE,CAAC,GAAG,IAAI,KAAK,CAAC,GAAG,IAAI,CAAA;CAAE,CAAC,CAAA;AAEnF,qBAAa,gBAAgB,CAAC,CAAC;IAC7B,SAAgB,QAAQ,mDAAgC;IACxD,SAAgB,KAAK,yCAAgB;IAErC,SAAgB,MAAM,sDAUF;IAEb,EAAE,CAAC,EAAE,EACV,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,EAChB,EAAE,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,EAAE,KAAK,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,GAAG,IAAI;CAK1E;AAED,wBAAgB,sBAAsB,CAAC,CAAC,yBAEvC"}
1
+ {"version":3,"file":"createEntityFieldStore.d.ts","sourceRoot":"","sources":["../../../../../src/lib/effector/createEntityFieldStore.ts"],"names":[],"mappings":"AAEA,KAAK,WAAW,CAAC,CAAC,IAAI;IACpB,GAAG,EAAE,MAAM,CAAA;CACZ,GAAG,CAAC;IAAE,IAAI,EAAE,CAAC,CAAC;IAAC,EAAE,CAAC,EAAE,KAAK,CAAA;CAAE,GAAG;IAAE,IAAI,CAAC,EAAE,KAAK,CAAC;IAAC,EAAE,EAAE,CAAC,KAAK,EAAE,CAAC,GAAG,IAAI,KAAK,CAAC,GAAG,IAAI,CAAA;CAAE,CAAC,CAAA;AAEnF,qBAAa,gBAAgB,CAAC,CAAC;IAC7B,SAAgB,QAAQ,mDAAgC;IACxD,SAAgB,KAAK,yCAAgB;IAErC,SAAgB,MAAM,sDAUF;CACrB;AAED,wBAAgB,sBAAsB,CAAC,CAAC,yBAEvC"}
@@ -1,4 +1,3 @@
1
- import { StyleProp, ViewStyle } from 'react-native';
2
1
  export type IconProps = {
3
2
  color?: string;
4
3
  className?: string;
@@ -6,6 +5,5 @@ export type IconProps = {
6
5
  strokeWidth?: string;
7
6
  width?: number;
8
7
  height?: number;
9
- style?: StyleProp<ViewStyle>;
10
8
  };
11
9
  //# sourceMappingURL=icon.types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"icon.types.d.ts","sourceRoot":"","sources":["../../../../../src/shared/icons/icon.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAEnD,MAAM,MAAM,SAAS,GAAG;IACtB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAA;CAC7B,CAAA"}
1
+ {"version":3,"file":"icon.types.d.ts","sourceRoot":"","sources":["../../../../../src/shared/icons/icon.types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GAAG;IACpB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;CAClB,CAAA"}
@@ -12,13 +12,6 @@ export declare const LOCALIZATION_CONFIGS: {
12
12
  "time.monthsAgo": string;
13
13
  "time.yearAgo": string;
14
14
  "time.yearsAgo": string;
15
- chat: {
16
- anotherHint: string;
17
- answerAgain: string;
18
- errorMessage: string;
19
- howCanIHelp: string;
20
- showError: string;
21
- };
22
15
  };
23
16
  "en-GB": {
24
17
  "teacherFeedback.noComments": string;
@@ -33,13 +26,6 @@ export declare const LOCALIZATION_CONFIGS: {
33
26
  "time.monthsAgo": string;
34
27
  "time.yearAgo": string;
35
28
  "time.yearsAgo": string;
36
- chat: {
37
- anotherHint: string;
38
- answerAgain: string;
39
- errorMessage: string;
40
- howCanIHelp: string;
41
- showError: string;
42
- };
43
29
  };
44
30
  "sv-SE": {
45
31
  "teacherFeedback.noComments": string;
@@ -54,13 +40,6 @@ export declare const LOCALIZATION_CONFIGS: {
54
40
  "time.monthsAgo": string;
55
41
  "time.yearAgo": string;
56
42
  "time.yearsAgo": string;
57
- chat: {
58
- anotherHint: string;
59
- answerAgain: string;
60
- errorMessage: string;
61
- howCanIHelp: string;
62
- showError: string;
63
- };
64
43
  };
65
44
  };
66
45
  //# sourceMappingURL=constants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/shared/translation/constants.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAIhC,CAAA"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/shared/translation/constants.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAIhC,CAAA"}
@@ -1,7 +1,6 @@
1
1
  import { LOCALIZATION_CONFIGS } from './constants';
2
- import { GetText, TranslationKeys, Translations } from './types';
3
- export declare function getTranslation(config: Translations, key: TranslationKeys): string;
2
+ import { GetText, LocalizationConfig } from './types';
4
3
  export declare const getSubstitutedString: (str: string, substitutions?: Record<string, string>) => string;
5
4
  export declare const getText: GetText;
6
- export declare const setFeaturesLocalization: (generator: ((config: typeof LOCALIZATION_CONFIGS) => Translations) | Translations) => void;
5
+ export declare const setFeaturesLocalization: (generator: ((config: typeof LOCALIZATION_CONFIGS) => LocalizationConfig) | LocalizationConfig) => void;
7
6
  //# sourceMappingURL=helpers.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../../src/shared/translation/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAElD,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAEhE,wBAAgB,cAAc,CAAC,MAAM,EAAE,YAAY,EAAE,GAAG,EAAE,eAAe,UAexE;AAED,eAAO,MAAM,oBAAoB,QAAS,MAAM,kBAAiB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,WAWtF,CAAA;AAED,eAAO,MAAM,OAAO,EAAE,OAMrB,CAAA;AAED,eAAO,MAAM,uBAAuB,cACvB,CAAC,CAAC,MAAM,EAAE,OAAO,oBAAoB,KAAK,YAAY,CAAC,GAAG,YAAY,SAGlF,CAAA"}
1
+ {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../../src/shared/translation/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAElD,OAAO,EAAE,OAAO,EAAE,kBAAkB,EAAmB,MAAM,SAAS,CAAA;AAEtE,eAAO,MAAM,oBAAoB,QAAS,MAAM,kBAAiB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,WAWtF,CAAA;AAED,eAAO,MAAM,OAAO,EAAE,OAUrB,CAAA;AAED,eAAO,MAAM,uBAAuB,cACvB,CAAC,CAAC,MAAM,EAAE,OAAO,oBAAoB,KAAK,kBAAkB,CAAC,GAAG,kBAAkB,SAG9F,CAAA"}
@@ -1,5 +1,5 @@
1
- import { GetText, Translations } from './types';
1
+ import { GetText, LocalizationConfig } from './types';
2
2
  import { LOCALIZATION_CONFIGS } from './constants';
3
3
  export declare const useText: () => GetText;
4
- export declare const useFeaturesLocalization: (generator: ((config: typeof LOCALIZATION_CONFIGS) => Translations) | Translations) => void;
4
+ export declare const useFeaturesLocalization: (generator: ((config: typeof LOCALIZATION_CONFIGS) => LocalizationConfig) | LocalizationConfig) => void;
5
5
  //# sourceMappingURL=hooks.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../../../src/shared/translation/hooks.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAE/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAGlD,eAAO,MAAM,OAAO,QAAO,OAQ1B,CAAA;AAED,eAAO,MAAM,uBAAuB,cACvB,CAAC,CAAC,MAAM,EAAE,OAAO,oBAAoB,KAAK,YAAY,CAAC,GAAG,YAAY,SAKlF,CAAA"}
1
+ {"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../../../src/shared/translation/hooks.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA;AAErD,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAGlD,eAAO,MAAM,OAAO,QAAO,OAY1B,CAAA;AAED,eAAO,MAAM,uBAAuB,cACrB,CAAC,CAAC,MAAM,EAAE,OAAO,oBAAoB,KAAK,kBAAkB,CAAC,GAAG,kBAAkB,SAKhG,CAAA"}
@@ -2,4 +2,5 @@ export { useFeaturesLocalization, useText } from './hooks';
2
2
  export { setFeaturesLocalization, getText as t } from './helpers';
3
3
  export { $localization, setLocalization } from './model';
4
4
  export { Locale } from './types';
5
+ export type { LocalizationConfig } from './types';
5
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/shared/translation/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AAC1D,OAAO,EAAE,uBAAuB,EAAE,OAAO,IAAI,CAAC,EAAE,MAAM,WAAW,CAAA;AACjE,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/shared/translation/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AAC1D,OAAO,EAAE,uBAAuB,EAAE,OAAO,IAAI,CAAC,EAAE,MAAM,WAAW,CAAA;AACjE,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAChC,YAAY,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA"}
@@ -1,45 +1,5 @@
1
- import { Translations } from './types';
1
+ import { LocalizationConfig } from './types';
2
2
  import { LOCALIZATION_CONFIGS } from './constants';
3
- export declare const setLocalization: import("effector").EventCallable<{
4
- "teacherFeedback.noComments": string;
5
- "time.justNow": string;
6
- "time.minuteAgo": string;
7
- "time.minutesAgo": string;
8
- "time.hourAgo": string;
9
- "time.hoursAgo": string;
10
- "time.dayAgo": string;
11
- "time.daysAgo": string;
12
- "time.monthAgo": string;
13
- "time.monthsAgo": string;
14
- "time.yearAgo": string;
15
- "time.yearsAgo": string;
16
- chat: {
17
- anotherHint: string;
18
- answerAgain: string;
19
- errorMessage: string;
20
- howCanIHelp: string;
21
- showError: string;
22
- };
23
- } | ((config: typeof LOCALIZATION_CONFIGS) => Translations)>;
24
- export declare const $localization: import("effector").StoreWritable<{
25
- "teacherFeedback.noComments": string;
26
- "time.justNow": string;
27
- "time.minuteAgo": string;
28
- "time.minutesAgo": string;
29
- "time.hourAgo": string;
30
- "time.hoursAgo": string;
31
- "time.dayAgo": string;
32
- "time.daysAgo": string;
33
- "time.monthAgo": string;
34
- "time.monthsAgo": string;
35
- "time.yearAgo": string;
36
- "time.yearsAgo": string;
37
- chat: {
38
- anotherHint: string;
39
- answerAgain: string;
40
- errorMessage: string;
41
- howCanIHelp: string;
42
- showError: string;
43
- };
44
- }>;
3
+ export declare const setLocalization: import("effector").EventCallable<LocalizationConfig | ((config: typeof LOCALIZATION_CONFIGS) => LocalizationConfig)>;
4
+ export declare const $localization: import("effector").StoreWritable<LocalizationConfig>;
45
5
  //# sourceMappingURL=model.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../../../../src/shared/translation/model.ts"],"names":[],"mappings":"AACA,OAAO,EAAU,YAAY,EAAE,MAAM,SAAS,CAAA;AAC9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAElD,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;cACD,OAAO,oBAAoB,KAAK,YAAY,EACpE,CAAA;AAEH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;EAMzB,CAAA"}
1
+ {"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../../../../src/shared/translation/model.ts"],"names":[],"mappings":"AACA,OAAO,EAAU,kBAAkB,EAAE,MAAM,SAAS,CAAA;AACpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAElD,eAAO,MAAM,eAAe,kEACO,OAAO,oBAAoB,KAAK,kBAAkB,EAClF,CAAA;AAEH,eAAO,MAAM,aAAa,sDAMzB,CAAA"}
@@ -1,11 +1,11 @@
1
- import enTranslations from './localization/en.json';
2
- import { RetrieveKeys } from '../../lib/types/keys';
1
+ import enTranslations from '../../lib/localization/en.json';
3
2
  export type Translations = typeof enTranslations;
4
- export type TranslationKeys = RetrieveKeys<Translations>;
5
- export type GetText = (key: TranslationKeys, args?: Record<string, string> | null) => string;
3
+ export type TranslationKeys = keyof Translations;
4
+ export type GetText = <T extends TranslationKeys>(key: T, args?: Record<string, string> | null) => Translations[T];
6
5
  export declare enum Locale {
7
6
  EN = "en-SE",
8
7
  SW = "sv-SE",
9
8
  GB = "en-GB"
10
9
  }
10
+ export type LocalizationConfig = Record<string, string>;
11
11
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/shared/translation/types.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,wBAAwB,CAAA;AAGnD,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAGnD,MAAM,MAAM,YAAY,GAAG,OAAO,cAAc,CAAA;AAChD,MAAM,MAAM,eAAe,GAAG,YAAY,CAAC,YAAY,CAAC,CAAA;AACxD,MAAM,MAAM,OAAO,GAAG,CAAC,GAAG,EAAE,eAAe,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,KAAK,MAAM,CAAA;AAE5F,oBAAY,MAAM;IAChB,EAAE,UAAU;IACZ,EAAE,UAAU;IACZ,EAAE,UAAU;CACb"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/shared/translation/types.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,gCAAgC,CAAA;AAE3D,MAAM,MAAM,YAAY,GAAG,OAAO,cAAc,CAAA;AAChD,MAAM,MAAM,eAAe,GAAG,MAAM,YAAY,CAAA;AAEhD,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,SAAS,eAAe,EAC9C,GAAG,EAAE,CAAC,EACN,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,KACjC,YAAY,CAAC,CAAC,CAAC,CAAA;AAEpB,oBAAY,MAAM;IAChB,EAAE,UAAU;IACZ,EAAE,UAAU;IACZ,EAAE,UAAU;CACb;AAED,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA"}
@@ -1,9 +1,11 @@
1
1
  import React from 'react';
2
+ import { ChatbotModel } from '../../model/ChatBotModel';
2
3
  type AlternativesProps = {
4
+ model: ChatbotModel;
3
5
  onPressAlternative: (message: string, translatedMessage?: string) => void;
4
6
  hasMessages: boolean;
5
7
  isHintFeedback: boolean;
6
8
  };
7
- export declare const Alternatives: ({ onPressAlternative, hasMessages, isHintFeedback, }: AlternativesProps) => React.JSX.Element;
9
+ export declare const Alternatives: ({ model, onPressAlternative, hasMessages, isHintFeedback, }: AlternativesProps) => React.JSX.Element;
8
10
  export {};
9
11
  //# sourceMappingURL=Alternatives.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Alternatives.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/chatbot/components/Alternatives/Alternatives.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAMzB,KAAK,iBAAiB,GAAG;IACvB,kBAAkB,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,iBAAiB,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;IACzE,WAAW,EAAE,OAAO,CAAA;IACpB,cAAc,EAAE,OAAO,CAAA;CACxB,CAAA;AAED,eAAO,MAAM,YAAY,yDAItB,iBAAiB,sBA4BnB,CAAA"}
1
+ {"version":3,"file":"Alternatives.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/chatbot/components/Alternatives/Alternatives.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAGvD,KAAK,iBAAiB,GAAG;IACvB,KAAK,EAAE,YAAY,CAAA;IACnB,kBAAkB,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,iBAAiB,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;IACzE,WAAW,EAAE,OAAO,CAAA;IACpB,cAAc,EAAE,OAAO,CAAA;CACxB,CAAA;AAED,eAAO,MAAM,YAAY,gEAKtB,iBAAiB,sBA2BnB,CAAA"}
@@ -1,12 +1,15 @@
1
- import React from 'react';
2
- import { T2SState } from '../../types/t2s.types';
3
- import { MessageVariant } from '../../types/model.types';
4
- import { ConversationMessage } from '../../types/units.types';
1
+ import React, { ReactNode } from 'react';
2
+ import { AudioStatus } from '../../types/t2s.types';
3
+ import { MessageVariant, ChatbotRenderer } from '../../types/model.types';
5
4
  type ChatMessageProps = {
6
5
  variant: MessageVariant;
7
- message: ConversationMessage;
8
- isTranslated?: boolean;
9
- t2sState: T2SState;
6
+ message: string;
7
+ onPressTextToSpeech: () => void;
8
+ isTextToSpeechPending: boolean;
9
+ isActive: boolean;
10
+ withTextToSpeech?: boolean;
11
+ audioStatus: AudioStatus;
12
+ renderer?: (props: ChatbotRenderer) => ReactNode;
10
13
  };
11
14
  export type VariantProps = Omit<ChatMessageProps, 'variant'>;
12
15
  export declare const ChatMessage: ({ variant, ...props }: ChatMessageProps) => React.JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"ChatMessage.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/chatbot/components/ChatMessage/ChatMessage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAAO,CAAA;AAG5C,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AACxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAA;AAE7D,KAAK,gBAAgB,GAAG;IACtB,OAAO,EAAE,cAAc,CAAA;IACvB,OAAO,EAAE,mBAAmB,CAAA;IAC5B,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,QAAQ,EAAE,QAAQ,CAAA;CACnB,CAAA;AAED,MAAM,MAAM,YAAY,GAAG,IAAI,CAAC,gBAAgB,EAAE,SAAS,CAAC,CAAA;AAO5D,eAAO,MAAM,WAAW,0BAA2B,gBAAgB,sBAGlE,CAAA"}
1
+ {"version":3,"file":"ChatMessage.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/chatbot/components/ChatMessage/ChatMessage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAiB,SAAS,EAAE,MAAM,OAAO,CAAA;AAGvD,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACnD,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AAEzE,KAAK,gBAAgB,GAAG;IACtB,OAAO,EAAE,cAAc,CAAA;IACvB,OAAO,EAAE,MAAM,CAAA;IACf,mBAAmB,EAAE,MAAM,IAAI,CAAA;IAC/B,qBAAqB,EAAE,OAAO,CAAA;IAC9B,QAAQ,EAAE,OAAO,CAAA;IACjB,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,WAAW,EAAE,WAAW,CAAA;IACxB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,SAAS,CAAA;CACjD,CAAA;AAED,MAAM,MAAM,YAAY,GAAG,IAAI,CAAC,gBAAgB,EAAE,SAAS,CAAC,CAAA;AAO5D,eAAO,MAAM,WAAW,0BAA2B,gBAAgB,sBAGlE,CAAA"}
@@ -1,10 +1,12 @@
1
1
  import React from 'react';
2
- import { T2SState } from '../../types/t2s.types';
3
- import { ConversationMessage } from '../../types/units.types';
2
+ import { AudioStatus } from '../../types/t2s.types';
4
3
  type MessageTextToSpeechProps = {
5
- state: T2SState;
6
- message: ConversationMessage;
4
+ status: AudioStatus;
5
+ disabled: boolean;
6
+ isActive: boolean;
7
+ isLoading: boolean;
8
+ onPress: () => void;
7
9
  };
8
- export declare const MessageTextToSpeech: ({ state: { status, disabled, isActive, isLoading }, message, }: MessageTextToSpeechProps) => React.JSX.Element;
10
+ export declare const MessageTextToSpeech: ({ status, disabled, isActive, isLoading, onPress, }: MessageTextToSpeechProps) => React.JSX.Element;
9
11
  export {};
10
12
  //# sourceMappingURL=MessageTextToSpeech.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"MessageTextToSpeech.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/chatbot/components/ChatMessage/MessageTextToSpeech.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAKzB,OAAO,EAAe,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAE7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAA;AAuB7D,KAAK,wBAAwB,GAAG;IAC9B,KAAK,EAAE,QAAQ,CAAA;IACf,OAAO,EAAE,mBAAmB,CAAA;CAC7B,CAAA;AAED,eAAO,MAAM,mBAAmB,mEAG7B,wBAAwB,sBAqB1B,CAAA"}
1
+ {"version":3,"file":"MessageTextToSpeech.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/chatbot/components/ChatMessage/MessageTextToSpeech.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAKzB,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAsBnD,KAAK,wBAAwB,GAAG;IAC9B,MAAM,EAAE,WAAW,CAAA;IACnB,QAAQ,EAAE,OAAO,CAAA;IACjB,QAAQ,EAAE,OAAO,CAAA;IACjB,SAAS,EAAE,OAAO,CAAA;IAClB,OAAO,EAAE,MAAM,IAAI,CAAA;CACpB,CAAA;AAED,eAAO,MAAM,mBAAmB,wDAM7B,wBAAwB,sBAU1B,CAAA"}
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
2
  import { VariantProps } from './ChatMessage';
3
- export declare const ReceivedMessage: ({ message, isTranslated, t2sState }: VariantProps) => React.JSX.Element;
3
+ export declare const ReceivedMessage: ({ message, onPressTextToSpeech, isTextToSpeechPending, isActive, audioStatus, renderer, withTextToSpeech, }: VariantProps) => React.JSX.Element;
4
4
  //# sourceMappingURL=ReceivedMessage.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ReceivedMessage.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/chatbot/components/ChatMessage/ReceivedMessage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAI5C,eAAO,MAAM,eAAe,wCAAyC,YAAY,sBAchF,CAAA"}
1
+ {"version":3,"file":"ReceivedMessage.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/chatbot/components/ChatMessage/ReceivedMessage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAK5C,eAAO,MAAM,eAAe,gHAQzB,YAAY,sBAuBd,CAAA"}
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
2
  import { VariantProps } from './ChatMessage';
3
- export declare const SentMessage: React.MemoExoticComponent<({ message, isTranslated }: VariantProps) => React.JSX.Element>;
3
+ export declare const SentMessage: ({ message, renderer }: VariantProps) => React.JSX.Element;
4
4
  //# sourceMappingURL=SentMessage.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SentMessage.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/chatbot/components/ChatMessage/SentMessage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAE5C,eAAO,MAAM,WAAW,wDAA0C,YAAY,uBAQ5E,CAAA"}
1
+ {"version":3,"file":"SentMessage.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/chatbot/components/ChatMessage/SentMessage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAG5C,eAAO,MAAM,WAAW,0BAA2B,YAAY,sBAQ9D,CAAA"}
@@ -1,10 +1,18 @@
1
- import React from 'react';
1
+ import React, { ReactNode } from 'react';
2
2
  import { ChatbotModel } from '../../model/ChatBotModel';
3
+ import { AUDIO_CONFIG, DEFAULT_VOICE } from '../../constants';
4
+ import { ChatbotRenderer } from '../../types/model.types';
3
5
  type ChatbotMessagesProps = {
4
6
  model: ChatbotModel;
5
7
  isHintFeedback: boolean;
8
+ sanitizeSpeechInput: (speech: string) => string;
6
9
  isTextToSpeechEnabled: boolean;
10
+ textToSpeechConfig?: {
11
+ voice: typeof DEFAULT_VOICE;
12
+ audioConfig: typeof AUDIO_CONFIG;
13
+ };
14
+ renderer?: (props: ChatbotRenderer) => ReactNode;
7
15
  };
8
- export declare const ChatbotMessages: ({ model, isHintFeedback, isTextToSpeechEnabled, }: ChatbotMessagesProps) => React.JSX.Element;
16
+ export declare const ChatbotMessages: ({ model, isHintFeedback, sanitizeSpeechInput, isTextToSpeechEnabled, textToSpeechConfig, renderer, }: ChatbotMessagesProps) => React.JSX.Element;
9
17
  export {};
10
18
  //# sourceMappingURL=ChatbotMessages.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ChatbotMessages.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/chatbot/components/ChatMessages/ChatbotMessages.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiB,MAAM,OAAO,CAAA;AAGrC,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAMvD,KAAK,oBAAoB,GAAG;IAC1B,KAAK,EAAE,YAAY,CAAA;IACnB,cAAc,EAAE,OAAO,CAAA;IACvB,qBAAqB,EAAE,OAAO,CAAA;CAC/B,CAAA;AAQD,eAAO,MAAM,eAAe,sDAIzB,oBAAoB,sBAkEtB,CAAA"}
1
+ {"version":3,"file":"ChatbotMessages.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/chatbot/components/ChatMessages/ChatbotMessages.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAU,MAAM,OAAO,CAAA;AAGhD,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAIvD,OAAO,EAAE,YAAY,EAAE,aAAa,EAAyB,MAAM,iBAAiB,CAAA;AACpF,OAAO,EAAkB,eAAe,EAAE,MAAM,yBAAyB,CAAA;AAEzE,KAAK,oBAAoB,GAAG;IAC1B,KAAK,EAAE,YAAY,CAAA;IACnB,cAAc,EAAE,OAAO,CAAA;IACvB,mBAAmB,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,CAAA;IAC/C,qBAAqB,EAAE,OAAO,CAAA;IAC9B,kBAAkB,CAAC,EAAE;QACnB,KAAK,EAAE,OAAO,aAAa,CAAA;QAC3B,WAAW,EAAE,OAAO,YAAY,CAAA;KACjC,CAAA;IACD,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,SAAS,CAAA;CACjD,CAAA;AAQD,eAAO,MAAM,eAAe,yGAOzB,oBAAoB,sBA0EtB,CAAA"}
@@ -1,10 +1,12 @@
1
- import { ComponentType, PropsWithChildren } from 'react';
1
+ import { ComponentType, PropsWithChildren, ReactNode } from 'react';
2
2
  import { ChatbotModel } from '../model/ChatBotModel';
3
3
  import { AUDIO_CONFIG, DEFAULT_VOICE } from '../constants';
4
+ import { ChatbotRenderer } from '../types/model.types';
4
5
  import React from 'react';
5
6
  type ChatbotProps = {
6
7
  model: ChatbotModel;
7
8
  isHintFeedback: boolean;
9
+ sanitizeSpeechInput: (speech: string) => string;
8
10
  isTextToSpeechEnabled: boolean;
9
11
  isTranslationEnabled: boolean;
10
12
  textToSpeechConfig?: {
@@ -12,11 +14,12 @@ type ChatbotProps = {
12
14
  audioConfig: typeof AUDIO_CONFIG;
13
15
  };
14
16
  ButtonWrapper: ComponentType<PropsWithChildren>;
17
+ renderer?: (props: ChatbotRenderer) => ReactNode;
15
18
  iconSize?: {
16
19
  width: number;
17
20
  height: number;
18
21
  };
19
22
  };
20
- export declare const Chatbot: ({ model, isHintFeedback, isTextToSpeechEnabled, textToSpeechConfig, isTranslationEnabled, ButtonWrapper, iconSize, }: ChatbotProps) => React.JSX.Element | null;
23
+ export declare const Chatbot: ({ model, isHintFeedback, sanitizeSpeechInput, isTextToSpeechEnabled, textToSpeechConfig, isTranslationEnabled, renderer, ButtonWrapper, iconSize, }: ChatbotProps) => React.JSX.Element | null;
21
24
  export {};
22
25
  //# sourceMappingURL=Chatbot.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Chatbot.d.ts","sourceRoot":"","sources":["../../../../../../src/features/chatbot/components/Chatbot.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAA;AAExD,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAGpD,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAC1D,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,KAAK,YAAY,GAAG;IAClB,KAAK,EAAE,YAAY,CAAA;IACnB,cAAc,EAAE,OAAO,CAAA;IACvB,qBAAqB,EAAE,OAAO,CAAA;IAC9B,oBAAoB,EAAE,OAAO,CAAA;IAC7B,kBAAkB,CAAC,EAAE;QACnB,KAAK,EAAE,OAAO,aAAa,CAAA;QAC3B,WAAW,EAAE,OAAO,YAAY,CAAA;KACjC,CAAA;IACD,aAAa,EAAE,aAAa,CAAC,iBAAiB,CAAC,CAAA;IAC/C,QAAQ,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAA;CAC7C,CAAA;AAED,eAAO,MAAM,OAAO,yHAQjB,YAAY,6BAmCd,CAAA"}
1
+ {"version":3,"file":"Chatbot.d.ts","sourceRoot":"","sources":["../../../../../../src/features/chatbot/components/Chatbot.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEnE,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAGpD,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AACtD,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,KAAK,YAAY,GAAG;IAClB,KAAK,EAAE,YAAY,CAAA;IACnB,cAAc,EAAE,OAAO,CAAA;IACvB,mBAAmB,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,CAAA;IAC/C,qBAAqB,EAAE,OAAO,CAAA;IAC9B,oBAAoB,EAAE,OAAO,CAAA;IAC7B,kBAAkB,CAAC,EAAE;QACnB,KAAK,EAAE,OAAO,aAAa,CAAA;QAC3B,WAAW,EAAE,OAAO,YAAY,CAAA;KACjC,CAAA;IACD,aAAa,EAAE,aAAa,CAAC,iBAAiB,CAAC,CAAA;IAC/C,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,SAAS,CAAA;IAChD,QAAQ,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAA;CAC7C,CAAA;AAED,eAAO,MAAM,OAAO,wJAUjB,YAAY,6BAqCd,CAAA"}
@@ -1,9 +1,8 @@
1
1
  export { Chatbot } from './components/Chatbot';
2
2
  export { ChatbotModel } from './model/ChatBotModel';
3
3
  export { AudioStatus, type AudioProvider } from './types/t2s.types';
4
- export { MessageVariant, type ChatbotModelProps, type IChatDrawBoardAdapter, } from './types/model.types';
5
- export type { PostMessageResponse } from './types/api.types';
4
+ export { MessageVariant, type ConversationMessage, type ChatbotRenderer, type ChatbotModelProps, type IChatDrawBoardAdapter, } from './types/model.types';
5
+ export type { PostMessageResponse, ChatAnswer } from './types/api.types';
6
+ export { ChatMessageHandler } from './model/ChatBotMessageHandler';
6
7
  export { DefaultMessagesCreator } from './model/DefaultMessageCreator';
7
- export type { ChatAnswer } from './types/units.types';
8
- export type { ConversationMessage } from './types/units.types';
9
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/chatbot/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACnD,OAAO,EAAE,WAAW,EAAE,KAAK,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACnE,OAAO,EACL,cAAc,EACd,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,GAC3B,MAAM,qBAAqB,CAAA;AAC5B,YAAY,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAA;AACtE,YAAY,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AACrD,YAAY,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/chatbot/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACnD,OAAO,EAAE,WAAW,EAAE,KAAK,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACnE,OAAO,EACL,cAAc,EACd,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,GAC3B,MAAM,qBAAqB,CAAA;AAC5B,YAAY,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AACxE,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAA;AAClE,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAA"}