@magmamath/students-features 0.5.0 → 0.5.1-rc-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.
Files changed (414) 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/components/CorrectAnswer/AnimatedCard.js +2 -4
  39. package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.js.map +1 -1
  40. package/dist/commonjs/features/endOfAssignment/ui/PracticeButtonGroup.js.map +1 -1
  41. package/dist/commonjs/index.js.map +1 -1
  42. package/dist/commonjs/lib/effector/createEntityFieldStore.js +0 -4
  43. package/dist/commonjs/lib/effector/createEntityFieldStore.js.map +1 -1
  44. package/{src/shared/translation → dist/commonjs/lib}/localization/en.json +1 -8
  45. package/dist/{module/shared/translation → commonjs/lib}/localization/gb.json +1 -8
  46. package/dist/commonjs/{shared/translation → lib}/localization/sw.json +1 -8
  47. package/dist/commonjs/shared/icons/icon.types.js +0 -4
  48. package/dist/commonjs/shared/translation/constants.js +3 -3
  49. package/dist/commonjs/shared/translation/constants.js.map +1 -1
  50. package/dist/commonjs/shared/translation/helpers.js +6 -22
  51. package/dist/commonjs/shared/translation/helpers.js.map +1 -1
  52. package/dist/commonjs/shared/translation/hooks.js +5 -3
  53. package/dist/commonjs/shared/translation/hooks.js.map +1 -1
  54. package/dist/commonjs/shared/translation/model.js +1 -1
  55. package/dist/commonjs/shared/translation/model.js.map +1 -1
  56. package/dist/commonjs/shared/translation/types.js +1 -1
  57. package/dist/commonjs/shared/translation/types.js.map +1 -1
  58. package/dist/module/features/celebrations/config.js +4 -4
  59. package/dist/module/features/celebrations/config.js.map +1 -1
  60. package/dist/module/features/chatbot/components/Alternatives/Alternatives.js +1 -2
  61. package/dist/module/features/chatbot/components/Alternatives/Alternatives.js.map +1 -1
  62. package/dist/module/features/chatbot/components/ChatMessage/ChatMessage.js.map +1 -1
  63. package/dist/module/features/chatbot/components/ChatMessage/MessageTextToSpeech.js +48 -31
  64. package/dist/module/features/chatbot/components/ChatMessage/MessageTextToSpeech.js.map +1 -1
  65. package/dist/module/features/chatbot/components/ChatMessage/ReceivedMessage.js +43 -23
  66. package/dist/module/features/chatbot/components/ChatMessage/ReceivedMessage.js.map +1 -1
  67. package/dist/module/features/chatbot/components/ChatMessage/SentMessage.js +13 -11
  68. package/dist/module/features/chatbot/components/ChatMessage/SentMessage.js.map +1 -1
  69. package/dist/module/features/chatbot/components/ChatMessages/ChatbotMessages.js +32 -17
  70. package/dist/module/features/chatbot/components/ChatMessages/ChatbotMessages.js.map +1 -1
  71. package/dist/module/features/chatbot/components/Chatbot.js +8 -6
  72. package/dist/module/features/chatbot/components/Chatbot.js.map +1 -1
  73. package/dist/module/features/chatbot/index.js +1 -0
  74. package/dist/module/features/chatbot/index.js.map +1 -1
  75. package/dist/module/features/chatbot/model/{ChatBotThreadManager.js → ChatBotMessageHandler.js} +20 -42
  76. package/dist/module/features/chatbot/model/ChatBotMessageHandler.js.map +1 -0
  77. package/dist/module/features/chatbot/model/ChatBotModel.js +126 -147
  78. package/dist/module/features/chatbot/model/ChatBotModel.js.map +1 -1
  79. package/dist/module/features/chatbot/model/DefaultMessageCreator.js +12 -12
  80. package/dist/module/features/chatbot/model/DefaultMessageCreator.js.map +1 -1
  81. package/dist/module/features/chatbot/model/ThreadItem.js +8 -16
  82. package/dist/module/features/chatbot/model/ThreadItem.js.map +1 -1
  83. package/dist/module/features/chatbot/model/{ChatbotApi.js → api.js} +1 -2
  84. package/dist/module/features/chatbot/model/api.js.map +1 -0
  85. package/dist/module/features/chatbot/model/constants.js.map +1 -1
  86. package/dist/module/features/chatbot/model/messagesHelper.js +7 -7
  87. package/dist/module/features/chatbot/model/messagesHelper.js.map +1 -1
  88. package/dist/module/features/chatbot/model/t2s.js +14 -19
  89. package/dist/module/features/chatbot/model/t2s.js.map +1 -1
  90. package/dist/module/features/chatbot/model/translation.helpers.js.map +1 -1
  91. package/dist/module/features/chatbot/model/translation.js +19 -28
  92. package/dist/module/features/chatbot/model/translation.js.map +1 -1
  93. package/dist/module/features/chatbot/types/api.types.js +0 -2
  94. package/dist/module/features/chatbot/types/model.types.js.map +1 -1
  95. package/dist/module/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.js +2 -4
  96. package/dist/module/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.js.map +1 -1
  97. package/dist/module/features/endOfAssignment/ui/PracticeButtonGroup.js.map +1 -1
  98. package/dist/module/index.js.map +1 -1
  99. package/dist/module/lib/effector/createEntityFieldStore.js +0 -4
  100. package/dist/module/lib/effector/createEntityFieldStore.js.map +1 -1
  101. package/dist/module/{shared/translation → lib}/localization/en.json +1 -8
  102. package/dist/{commonjs/shared/translation → module/lib}/localization/gb.json +1 -8
  103. package/dist/module/{shared/translation → lib}/localization/sw.json +1 -8
  104. package/dist/module/shared/icons/icon.types.js +0 -2
  105. package/dist/module/shared/translation/constants.js +3 -3
  106. package/dist/module/shared/translation/constants.js.map +1 -1
  107. package/dist/module/shared/translation/helpers.js +5 -19
  108. package/dist/module/shared/translation/helpers.js.map +1 -1
  109. package/dist/module/shared/translation/hooks.js +6 -4
  110. package/dist/module/shared/translation/hooks.js.map +1 -1
  111. package/dist/module/shared/translation/model.js +1 -1
  112. package/dist/module/shared/translation/model.js.map +1 -1
  113. package/dist/module/shared/translation/types.js +0 -2
  114. package/dist/module/shared/translation/types.js.map +1 -1
  115. package/dist/typescript/commonjs/features/chatbot/components/Alternatives/Alternatives.d.ts +3 -1
  116. package/dist/typescript/commonjs/features/chatbot/components/Alternatives/Alternatives.d.ts.map +1 -1
  117. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/ChatMessage.d.ts +10 -7
  118. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/ChatMessage.d.ts.map +1 -1
  119. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageTextToSpeech.d.ts +7 -5
  120. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageTextToSpeech.d.ts.map +1 -1
  121. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/ReceivedMessage.d.ts +1 -1
  122. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/ReceivedMessage.d.ts.map +1 -1
  123. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/SentMessage.d.ts +1 -1
  124. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/SentMessage.d.ts.map +1 -1
  125. package/dist/typescript/commonjs/features/chatbot/components/ChatMessages/ChatbotMessages.d.ts +10 -2
  126. package/dist/typescript/commonjs/features/chatbot/components/ChatMessages/ChatbotMessages.d.ts.map +1 -1
  127. package/dist/typescript/commonjs/features/chatbot/components/Chatbot.d.ts +5 -2
  128. package/dist/typescript/commonjs/features/chatbot/components/Chatbot.d.ts.map +1 -1
  129. package/dist/typescript/commonjs/features/chatbot/index.d.ts +3 -4
  130. package/dist/typescript/commonjs/features/chatbot/index.d.ts.map +1 -1
  131. package/dist/typescript/commonjs/features/chatbot/model/ChatBotMessageHandler.d.ts +31 -0
  132. package/dist/typescript/commonjs/features/chatbot/model/ChatBotMessageHandler.d.ts.map +1 -0
  133. package/dist/typescript/commonjs/features/chatbot/model/ChatBotModel.d.ts +18 -24
  134. package/dist/typescript/commonjs/features/chatbot/model/ChatBotModel.d.ts.map +1 -1
  135. package/dist/typescript/commonjs/features/chatbot/model/DefaultMessageCreator.d.ts +3 -5
  136. package/dist/typescript/commonjs/features/chatbot/model/DefaultMessageCreator.d.ts.map +1 -1
  137. package/dist/typescript/commonjs/features/chatbot/model/ThreadItem.d.ts +7 -13
  138. package/dist/typescript/commonjs/features/chatbot/model/ThreadItem.d.ts.map +1 -1
  139. package/dist/typescript/commonjs/features/chatbot/model/{ChatbotApi.d.ts → api.d.ts} +3 -4
  140. package/dist/typescript/commonjs/features/chatbot/model/api.d.ts.map +1 -0
  141. package/dist/typescript/commonjs/features/chatbot/model/constants.d.ts.map +1 -1
  142. package/dist/typescript/commonjs/features/chatbot/model/messagesHelper.d.ts +5 -7
  143. package/dist/typescript/commonjs/features/chatbot/model/messagesHelper.d.ts.map +1 -1
  144. package/dist/typescript/commonjs/features/chatbot/model/t2s.d.ts +6 -16
  145. package/dist/typescript/commonjs/features/chatbot/model/t2s.d.ts.map +1 -1
  146. package/dist/typescript/commonjs/features/chatbot/model/translation.d.ts +9 -8
  147. package/dist/typescript/commonjs/features/chatbot/model/translation.d.ts.map +1 -1
  148. package/dist/typescript/commonjs/features/chatbot/model/translation.helpers.d.ts +1 -2
  149. package/dist/typescript/commonjs/features/chatbot/model/translation.helpers.d.ts.map +1 -1
  150. package/dist/typescript/commonjs/features/chatbot/types/api.types.d.ts +11 -12
  151. package/dist/typescript/commonjs/features/chatbot/types/api.types.d.ts.map +1 -1
  152. package/dist/typescript/commonjs/features/chatbot/types/model.types.d.ts +24 -19
  153. package/dist/typescript/commonjs/features/chatbot/types/model.types.d.ts.map +1 -1
  154. package/dist/typescript/commonjs/features/chatbot/types/t2s.types.d.ts +7 -9
  155. package/dist/typescript/commonjs/features/chatbot/types/t2s.types.d.ts.map +1 -1
  156. package/dist/typescript/commonjs/features/chatbot/types/translation.types.d.ts +2 -3
  157. package/dist/typescript/commonjs/features/chatbot/types/translation.types.d.ts.map +1 -1
  158. package/dist/typescript/commonjs/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.d.ts.map +1 -1
  159. package/dist/typescript/commonjs/features/endOfAssignment/ui/PracticeButtonGroup.d.ts.map +1 -1
  160. package/dist/typescript/commonjs/index.d.ts +1 -0
  161. package/dist/typescript/commonjs/index.d.ts.map +1 -1
  162. package/dist/typescript/commonjs/lib/effector/createEntityFieldStore.d.ts +0 -2
  163. package/dist/typescript/commonjs/lib/effector/createEntityFieldStore.d.ts.map +1 -1
  164. package/dist/typescript/commonjs/shared/icons/icon.types.d.ts +0 -2
  165. package/dist/typescript/commonjs/shared/icons/icon.types.d.ts.map +1 -1
  166. package/dist/typescript/commonjs/shared/translation/constants.d.ts +0 -21
  167. package/dist/typescript/commonjs/shared/translation/constants.d.ts.map +1 -1
  168. package/dist/typescript/commonjs/shared/translation/helpers.d.ts +2 -3
  169. package/dist/typescript/commonjs/shared/translation/helpers.d.ts.map +1 -1
  170. package/dist/typescript/commonjs/shared/translation/hooks.d.ts +2 -2
  171. package/dist/typescript/commonjs/shared/translation/hooks.d.ts.map +1 -1
  172. package/dist/typescript/commonjs/shared/translation/index.d.ts +1 -0
  173. package/dist/typescript/commonjs/shared/translation/index.d.ts.map +1 -1
  174. package/dist/typescript/commonjs/shared/translation/model.d.ts +3 -43
  175. package/dist/typescript/commonjs/shared/translation/model.d.ts.map +1 -1
  176. package/dist/typescript/commonjs/shared/translation/types.d.ts +4 -4
  177. package/dist/typescript/commonjs/shared/translation/types.d.ts.map +1 -1
  178. package/dist/typescript/module/features/chatbot/components/Alternatives/Alternatives.d.ts +3 -1
  179. package/dist/typescript/module/features/chatbot/components/Alternatives/Alternatives.d.ts.map +1 -1
  180. package/dist/typescript/module/features/chatbot/components/ChatMessage/ChatMessage.d.ts +10 -7
  181. package/dist/typescript/module/features/chatbot/components/ChatMessage/ChatMessage.d.ts.map +1 -1
  182. package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageTextToSpeech.d.ts +7 -5
  183. package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageTextToSpeech.d.ts.map +1 -1
  184. package/dist/typescript/module/features/chatbot/components/ChatMessage/ReceivedMessage.d.ts +1 -1
  185. package/dist/typescript/module/features/chatbot/components/ChatMessage/ReceivedMessage.d.ts.map +1 -1
  186. package/dist/typescript/module/features/chatbot/components/ChatMessage/SentMessage.d.ts +1 -1
  187. package/dist/typescript/module/features/chatbot/components/ChatMessage/SentMessage.d.ts.map +1 -1
  188. package/dist/typescript/module/features/chatbot/components/ChatMessages/ChatbotMessages.d.ts +10 -2
  189. package/dist/typescript/module/features/chatbot/components/ChatMessages/ChatbotMessages.d.ts.map +1 -1
  190. package/dist/typescript/module/features/chatbot/components/Chatbot.d.ts +5 -2
  191. package/dist/typescript/module/features/chatbot/components/Chatbot.d.ts.map +1 -1
  192. package/dist/typescript/module/features/chatbot/index.d.ts +3 -4
  193. package/dist/typescript/module/features/chatbot/index.d.ts.map +1 -1
  194. package/dist/typescript/module/features/chatbot/model/ChatBotMessageHandler.d.ts +31 -0
  195. package/dist/typescript/module/features/chatbot/model/ChatBotMessageHandler.d.ts.map +1 -0
  196. package/dist/typescript/module/features/chatbot/model/ChatBotModel.d.ts +18 -24
  197. package/dist/typescript/module/features/chatbot/model/ChatBotModel.d.ts.map +1 -1
  198. package/dist/typescript/module/features/chatbot/model/DefaultMessageCreator.d.ts +3 -5
  199. package/dist/typescript/module/features/chatbot/model/DefaultMessageCreator.d.ts.map +1 -1
  200. package/dist/typescript/module/features/chatbot/model/ThreadItem.d.ts +7 -13
  201. package/dist/typescript/module/features/chatbot/model/ThreadItem.d.ts.map +1 -1
  202. package/dist/typescript/module/features/chatbot/model/{ChatbotApi.d.ts → api.d.ts} +3 -4
  203. package/dist/typescript/module/features/chatbot/model/api.d.ts.map +1 -0
  204. package/dist/typescript/module/features/chatbot/model/constants.d.ts.map +1 -1
  205. package/dist/typescript/module/features/chatbot/model/messagesHelper.d.ts +5 -7
  206. package/dist/typescript/module/features/chatbot/model/messagesHelper.d.ts.map +1 -1
  207. package/dist/typescript/module/features/chatbot/model/t2s.d.ts +6 -16
  208. package/dist/typescript/module/features/chatbot/model/t2s.d.ts.map +1 -1
  209. package/dist/typescript/module/features/chatbot/model/translation.d.ts +9 -8
  210. package/dist/typescript/module/features/chatbot/model/translation.d.ts.map +1 -1
  211. package/dist/typescript/module/features/chatbot/model/translation.helpers.d.ts +1 -2
  212. package/dist/typescript/module/features/chatbot/model/translation.helpers.d.ts.map +1 -1
  213. package/dist/typescript/module/features/chatbot/types/api.types.d.ts +11 -12
  214. package/dist/typescript/module/features/chatbot/types/api.types.d.ts.map +1 -1
  215. package/dist/typescript/module/features/chatbot/types/model.types.d.ts +24 -19
  216. package/dist/typescript/module/features/chatbot/types/model.types.d.ts.map +1 -1
  217. package/dist/typescript/module/features/chatbot/types/t2s.types.d.ts +7 -9
  218. package/dist/typescript/module/features/chatbot/types/t2s.types.d.ts.map +1 -1
  219. package/dist/typescript/module/features/chatbot/types/translation.types.d.ts +2 -3
  220. package/dist/typescript/module/features/chatbot/types/translation.types.d.ts.map +1 -1
  221. package/dist/typescript/module/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.d.ts.map +1 -1
  222. package/dist/typescript/module/features/endOfAssignment/ui/PracticeButtonGroup.d.ts.map +1 -1
  223. package/dist/typescript/module/index.d.ts +1 -0
  224. package/dist/typescript/module/index.d.ts.map +1 -1
  225. package/dist/typescript/module/lib/effector/createEntityFieldStore.d.ts +0 -2
  226. package/dist/typescript/module/lib/effector/createEntityFieldStore.d.ts.map +1 -1
  227. package/dist/typescript/module/shared/icons/icon.types.d.ts +0 -2
  228. package/dist/typescript/module/shared/icons/icon.types.d.ts.map +1 -1
  229. package/dist/typescript/module/shared/translation/constants.d.ts +0 -21
  230. package/dist/typescript/module/shared/translation/constants.d.ts.map +1 -1
  231. package/dist/typescript/module/shared/translation/helpers.d.ts +2 -3
  232. package/dist/typescript/module/shared/translation/helpers.d.ts.map +1 -1
  233. package/dist/typescript/module/shared/translation/hooks.d.ts +2 -2
  234. package/dist/typescript/module/shared/translation/hooks.d.ts.map +1 -1
  235. package/dist/typescript/module/shared/translation/index.d.ts +1 -0
  236. package/dist/typescript/module/shared/translation/index.d.ts.map +1 -1
  237. package/dist/typescript/module/shared/translation/model.d.ts +3 -43
  238. package/dist/typescript/module/shared/translation/model.d.ts.map +1 -1
  239. package/dist/typescript/module/shared/translation/types.d.ts +4 -4
  240. package/dist/typescript/module/shared/translation/types.d.ts.map +1 -1
  241. package/package.json +2 -2
  242. package/src/features/celebrations/config.ts +4 -4
  243. package/src/features/chatbot/components/Alternatives/Alternatives.tsx +4 -2
  244. package/src/features/chatbot/components/ChatMessage/ChatMessage.tsx +10 -7
  245. package/src/features/chatbot/components/ChatMessage/MessageTextToSpeech.tsx +51 -34
  246. package/src/features/chatbot/components/ChatMessage/ReceivedMessage.tsx +40 -15
  247. package/src/features/chatbot/components/ChatMessage/SentMessage.tsx +10 -9
  248. package/src/features/chatbot/components/ChatMessages/ChatbotMessages.tsx +34 -17
  249. package/src/features/chatbot/components/Chatbot.tsx +11 -5
  250. package/src/features/chatbot/index.ts +4 -3
  251. package/src/features/chatbot/model/{ChatBotThreadManager.ts → ChatBotMessageHandler.ts} +27 -53
  252. package/src/features/chatbot/model/ChatBotModel.ts +149 -151
  253. package/src/features/chatbot/model/DefaultMessageCreator.ts +16 -17
  254. package/src/features/chatbot/model/ThreadItem.ts +10 -15
  255. package/src/features/chatbot/model/{ChatbotApi.ts → api.ts} +2 -5
  256. package/src/features/chatbot/model/constants.ts +0 -2
  257. package/src/features/chatbot/model/messagesHelper.ts +7 -12
  258. package/src/features/chatbot/model/t2s.ts +13 -28
  259. package/src/features/chatbot/model/translation.helpers.ts +1 -2
  260. package/src/features/chatbot/model/translation.ts +24 -34
  261. package/src/features/chatbot/types/api.types.ts +12 -12
  262. package/src/features/chatbot/types/model.types.ts +32 -31
  263. package/src/features/chatbot/types/t2s.types.ts +15 -18
  264. package/src/features/chatbot/types/translation.types.ts +2 -3
  265. package/src/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.tsx +2 -3
  266. package/src/features/endOfAssignment/ui/PracticeButtonGroup.tsx +1 -0
  267. package/src/index.ts +1 -0
  268. package/src/lib/effector/createEntityFieldStore.ts +1 -9
  269. package/{dist/commonjs/shared/translation → src/lib}/localization/en.json +1 -8
  270. package/src/{shared/translation → lib}/localization/gb.json +1 -8
  271. package/src/{shared/translation → lib}/localization/sw.json +1 -8
  272. package/src/shared/icons/icon.types.ts +6 -9
  273. package/src/shared/translation/constants.ts +3 -3
  274. package/src/shared/translation/helpers.ts +9 -22
  275. package/src/shared/translation/hooks.ts +16 -12
  276. package/src/shared/translation/index.ts +1 -0
  277. package/src/shared/translation/model.ts +8 -8
  278. package/src/shared/translation/types.ts +8 -11
  279. package/dist/commonjs/features/chatbot/components/ChatMessage/MessageButtonsBlock.js +0 -44
  280. package/dist/commonjs/features/chatbot/components/ChatMessage/MessageButtonsBlock.js.map +0 -1
  281. package/dist/commonjs/features/chatbot/components/ChatMessage/MessageContent.js +0 -62
  282. package/dist/commonjs/features/chatbot/components/ChatMessage/MessageContent.js.map +0 -1
  283. package/dist/commonjs/features/chatbot/components/ChatMessage/helpers.js +0 -13
  284. package/dist/commonjs/features/chatbot/components/ChatMessage/helpers.js.map +0 -1
  285. package/dist/commonjs/features/chatbot/context/ChatBotModelContext.js +0 -17
  286. package/dist/commonjs/features/chatbot/context/ChatBotModelContext.js.map +0 -1
  287. package/dist/commonjs/features/chatbot/errorSpotting/ErrorSpottingButton.js +0 -57
  288. package/dist/commonjs/features/chatbot/errorSpotting/ErrorSpottingButton.js.map +0 -1
  289. package/dist/commonjs/features/chatbot/errorSpotting/ErrorSpottingModel.js +0 -130
  290. package/dist/commonjs/features/chatbot/errorSpotting/ErrorSpottingModel.js.map +0 -1
  291. package/dist/commonjs/features/chatbot/model/ChatBotThreadManager.js.map +0 -1
  292. package/dist/commonjs/features/chatbot/model/ChatBoxTextManager.js +0 -22
  293. package/dist/commonjs/features/chatbot/model/ChatBoxTextManager.js.map +0 -1
  294. package/dist/commonjs/features/chatbot/model/ChatbotApi.js.map +0 -1
  295. package/dist/commonjs/features/chatbot/model/ChatsCacheModel.js +0 -110
  296. package/dist/commonjs/features/chatbot/model/ChatsCacheModel.js.map +0 -1
  297. package/dist/commonjs/features/chatbot/types/units.types.js +0 -2
  298. package/dist/commonjs/features/chatbot/types/units.types.js.map +0 -1
  299. package/dist/commonjs/lib/effector/withEvent.js +0 -13
  300. package/dist/commonjs/lib/effector/withEvent.js.map +0 -1
  301. package/dist/commonjs/lib/types/keys.js +0 -2
  302. package/dist/commonjs/lib/types/keys.js.map +0 -1
  303. package/dist/commonjs/shared/icons/HighlighterIcon.js +0 -36
  304. package/dist/commonjs/shared/icons/HighlighterIcon.js.map +0 -1
  305. package/dist/commonjs/shared/icons/StopIcon.js +0 -33
  306. package/dist/commonjs/shared/icons/StopIcon.js.map +0 -1
  307. package/dist/commonjs/shared/translation/validation.types.js +0 -6
  308. package/dist/commonjs/shared/translation/validation.types.js.map +0 -1
  309. package/dist/module/features/chatbot/components/ChatMessage/MessageButtonsBlock.js +0 -38
  310. package/dist/module/features/chatbot/components/ChatMessage/MessageButtonsBlock.js.map +0 -1
  311. package/dist/module/features/chatbot/components/ChatMessage/MessageContent.js +0 -57
  312. package/dist/module/features/chatbot/components/ChatMessage/MessageContent.js.map +0 -1
  313. package/dist/module/features/chatbot/components/ChatMessage/helpers.js +0 -9
  314. package/dist/module/features/chatbot/components/ChatMessage/helpers.js.map +0 -1
  315. package/dist/module/features/chatbot/context/ChatBotModelContext.js +0 -12
  316. package/dist/module/features/chatbot/context/ChatBotModelContext.js.map +0 -1
  317. package/dist/module/features/chatbot/errorSpotting/ErrorSpottingButton.js +0 -51
  318. package/dist/module/features/chatbot/errorSpotting/ErrorSpottingButton.js.map +0 -1
  319. package/dist/module/features/chatbot/errorSpotting/ErrorSpottingModel.js +0 -125
  320. package/dist/module/features/chatbot/errorSpotting/ErrorSpottingModel.js.map +0 -1
  321. package/dist/module/features/chatbot/model/ChatBotThreadManager.js.map +0 -1
  322. package/dist/module/features/chatbot/model/ChatBoxTextManager.js +0 -17
  323. package/dist/module/features/chatbot/model/ChatBoxTextManager.js.map +0 -1
  324. package/dist/module/features/chatbot/model/ChatbotApi.js.map +0 -1
  325. package/dist/module/features/chatbot/model/ChatsCacheModel.js +0 -104
  326. package/dist/module/features/chatbot/model/ChatsCacheModel.js.map +0 -1
  327. package/dist/module/features/chatbot/types/units.types.js +0 -2
  328. package/dist/module/features/chatbot/types/units.types.js.map +0 -1
  329. package/dist/module/lib/effector/withEvent.js +0 -9
  330. package/dist/module/lib/effector/withEvent.js.map +0 -1
  331. package/dist/module/lib/types/keys.js +0 -2
  332. package/dist/module/lib/types/keys.js.map +0 -1
  333. package/dist/module/shared/icons/HighlighterIcon.js +0 -29
  334. package/dist/module/shared/icons/HighlighterIcon.js.map +0 -1
  335. package/dist/module/shared/icons/StopIcon.js +0 -26
  336. package/dist/module/shared/icons/StopIcon.js.map +0 -1
  337. package/dist/module/shared/translation/validation.types.js +0 -4
  338. package/dist/module/shared/translation/validation.types.js.map +0 -1
  339. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageButtonsBlock.d.ts +0 -10
  340. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageButtonsBlock.d.ts.map +0 -1
  341. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageContent.d.ts +0 -11
  342. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageContent.d.ts.map +0 -1
  343. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/helpers.d.ts +0 -4
  344. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/helpers.d.ts.map +0 -1
  345. package/dist/typescript/commonjs/features/chatbot/context/ChatBotModelContext.d.ts +0 -4
  346. package/dist/typescript/commonjs/features/chatbot/context/ChatBotModelContext.d.ts.map +0 -1
  347. package/dist/typescript/commonjs/features/chatbot/errorSpotting/ErrorSpottingButton.d.ts +0 -8
  348. package/dist/typescript/commonjs/features/chatbot/errorSpotting/ErrorSpottingButton.d.ts.map +0 -1
  349. package/dist/typescript/commonjs/features/chatbot/errorSpotting/ErrorSpottingModel.d.ts +0 -35
  350. package/dist/typescript/commonjs/features/chatbot/errorSpotting/ErrorSpottingModel.d.ts.map +0 -1
  351. package/dist/typescript/commonjs/features/chatbot/model/ChatBotThreadManager.d.ts +0 -33
  352. package/dist/typescript/commonjs/features/chatbot/model/ChatBotThreadManager.d.ts.map +0 -1
  353. package/dist/typescript/commonjs/features/chatbot/model/ChatBoxTextManager.d.ts +0 -6
  354. package/dist/typescript/commonjs/features/chatbot/model/ChatBoxTextManager.d.ts.map +0 -1
  355. package/dist/typescript/commonjs/features/chatbot/model/ChatbotApi.d.ts.map +0 -1
  356. package/dist/typescript/commonjs/features/chatbot/model/ChatsCacheModel.d.ts +0 -27
  357. package/dist/typescript/commonjs/features/chatbot/model/ChatsCacheModel.d.ts.map +0 -1
  358. package/dist/typescript/commonjs/features/chatbot/types/units.types.d.ts +0 -34
  359. package/dist/typescript/commonjs/features/chatbot/types/units.types.d.ts.map +0 -1
  360. package/dist/typescript/commonjs/lib/effector/withEvent.d.ts +0 -2
  361. package/dist/typescript/commonjs/lib/effector/withEvent.d.ts.map +0 -1
  362. package/dist/typescript/commonjs/lib/types/keys.d.ts +0 -8
  363. package/dist/typescript/commonjs/lib/types/keys.d.ts.map +0 -1
  364. package/dist/typescript/commonjs/shared/icons/HighlighterIcon.d.ts +0 -4
  365. package/dist/typescript/commonjs/shared/icons/HighlighterIcon.d.ts.map +0 -1
  366. package/dist/typescript/commonjs/shared/icons/StopIcon.d.ts +0 -4
  367. package/dist/typescript/commonjs/shared/icons/StopIcon.d.ts.map +0 -1
  368. package/dist/typescript/commonjs/shared/translation/validation.types.d.ts +0 -17
  369. package/dist/typescript/commonjs/shared/translation/validation.types.d.ts.map +0 -1
  370. package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageButtonsBlock.d.ts +0 -10
  371. package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageButtonsBlock.d.ts.map +0 -1
  372. package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageContent.d.ts +0 -11
  373. package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageContent.d.ts.map +0 -1
  374. package/dist/typescript/module/features/chatbot/components/ChatMessage/helpers.d.ts +0 -4
  375. package/dist/typescript/module/features/chatbot/components/ChatMessage/helpers.d.ts.map +0 -1
  376. package/dist/typescript/module/features/chatbot/context/ChatBotModelContext.d.ts +0 -4
  377. package/dist/typescript/module/features/chatbot/context/ChatBotModelContext.d.ts.map +0 -1
  378. package/dist/typescript/module/features/chatbot/errorSpotting/ErrorSpottingButton.d.ts +0 -8
  379. package/dist/typescript/module/features/chatbot/errorSpotting/ErrorSpottingButton.d.ts.map +0 -1
  380. package/dist/typescript/module/features/chatbot/errorSpotting/ErrorSpottingModel.d.ts +0 -35
  381. package/dist/typescript/module/features/chatbot/errorSpotting/ErrorSpottingModel.d.ts.map +0 -1
  382. package/dist/typescript/module/features/chatbot/model/ChatBotThreadManager.d.ts +0 -33
  383. package/dist/typescript/module/features/chatbot/model/ChatBotThreadManager.d.ts.map +0 -1
  384. package/dist/typescript/module/features/chatbot/model/ChatBoxTextManager.d.ts +0 -6
  385. package/dist/typescript/module/features/chatbot/model/ChatBoxTextManager.d.ts.map +0 -1
  386. package/dist/typescript/module/features/chatbot/model/ChatbotApi.d.ts.map +0 -1
  387. package/dist/typescript/module/features/chatbot/model/ChatsCacheModel.d.ts +0 -27
  388. package/dist/typescript/module/features/chatbot/model/ChatsCacheModel.d.ts.map +0 -1
  389. package/dist/typescript/module/features/chatbot/types/units.types.d.ts +0 -34
  390. package/dist/typescript/module/features/chatbot/types/units.types.d.ts.map +0 -1
  391. package/dist/typescript/module/lib/effector/withEvent.d.ts +0 -2
  392. package/dist/typescript/module/lib/effector/withEvent.d.ts.map +0 -1
  393. package/dist/typescript/module/lib/types/keys.d.ts +0 -8
  394. package/dist/typescript/module/lib/types/keys.d.ts.map +0 -1
  395. package/dist/typescript/module/shared/icons/HighlighterIcon.d.ts +0 -4
  396. package/dist/typescript/module/shared/icons/HighlighterIcon.d.ts.map +0 -1
  397. package/dist/typescript/module/shared/icons/StopIcon.d.ts +0 -4
  398. package/dist/typescript/module/shared/icons/StopIcon.d.ts.map +0 -1
  399. package/dist/typescript/module/shared/translation/validation.types.d.ts +0 -17
  400. package/dist/typescript/module/shared/translation/validation.types.d.ts.map +0 -1
  401. package/src/features/chatbot/components/ChatMessage/MessageButtonsBlock.tsx +0 -38
  402. package/src/features/chatbot/components/ChatMessage/MessageContent.tsx +0 -52
  403. package/src/features/chatbot/components/ChatMessage/helpers.ts +0 -9
  404. package/src/features/chatbot/context/ChatBotModelContext.ts +0 -14
  405. package/src/features/chatbot/errorSpotting/ErrorSpottingButton.tsx +0 -53
  406. package/src/features/chatbot/errorSpotting/ErrorSpottingModel.ts +0 -150
  407. package/src/features/chatbot/model/ChatBoxTextManager.ts +0 -18
  408. package/src/features/chatbot/model/ChatsCacheModel.ts +0 -95
  409. package/src/features/chatbot/types/units.types.ts +0 -37
  410. package/src/lib/effector/withEvent.ts +0 -7
  411. package/src/lib/types/keys.ts +0 -18
  412. package/src/shared/icons/HighlighterIcon.tsx +0 -21
  413. package/src/shared/icons/StopIcon.tsx +0 -17
  414. package/src/shared/translation/validation.types.ts +0 -26
@@ -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":"AnimatedCard.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkC,MAAM,OAAO,CAAA;AAqBtD,OAAO,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAa/D,KAAK,iBAAiB,GAAG;IACvB,OAAO,EAAE,mBAAmB,CAAA;IAC5B,WAAW,EAAE,YAAY,CAAA;IACzB,qBAAqB,EAAE,OAAO,CAAA;IAC9B,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,cAAc,CAAC,EAAE,MAAM,IAAI,CAAA;CAC5B,CAAA;AAED,eAAO,MAAM,YAAY,+IAUpB,iBAAiB,uBA4KrB,CAAA"}
1
+ {"version":3,"file":"AnimatedCard.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkC,MAAM,OAAO,CAAA;AAqBtD,OAAO,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAa/D,KAAK,iBAAiB,GAAG;IACvB,OAAO,EAAE,mBAAmB,CAAA;IAC5B,WAAW,EAAE,YAAY,CAAA;IACzB,qBAAqB,EAAE,OAAO,CAAA;IAC9B,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,cAAc,CAAC,EAAE,MAAM,IAAI,CAAA;CAC5B,CAAA;AAED,eAAO,MAAM,YAAY,+IAUpB,iBAAiB,uBA0KrB,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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@magmamath/students-features",
3
- "version": "0.5.0",
3
+ "version": "0.5.1-rc-0",
4
4
  "description": "Magmamath features library",
5
5
  "source": "src/index.ts",
6
6
  "main": "src/index.ts",
@@ -29,7 +29,7 @@
29
29
  "react-native-svg": "^15.10.0"
30
30
  },
31
31
  "devDependencies": {
32
- "@magmamath/react-native-ui": "0.4.0",
32
+ "@magmamath/react-native-ui": "0.3.22",
33
33
  "@react-native/eslint-config": "^0.73.1",
34
34
  "@release-it/conventional-changelog": "^9.0.2",
35
35
  "@types/jest": "^29.5.5",
@@ -181,10 +181,10 @@ export const CELEBRATION_VARIANTS = {
181
181
  },
182
182
  speedRange: {
183
183
  spark: [14, 28],
184
- main: [6, 18],
184
+ main: [12, 24],
185
185
  },
186
186
  life: 100,
187
- gravity: 0.1,
187
+ gravity: 0.19,
188
188
  },
189
189
  [CelebrationVariant.CORRECT_FINISH_ASSIGNMENT]: {
190
190
  color: COLORS.PRIMARY_GREEN,
@@ -216,9 +216,9 @@ export const CELEBRATION_VARIANTS = {
216
216
  },
217
217
  speedRange: {
218
218
  spark: [14, 28],
219
- main: [6, 18],
219
+ main: [12, 24],
220
220
  },
221
221
  life: 100,
222
- gravity: 0.1,
222
+ gravity: 0.19,
223
223
  },
224
224
  }
@@ -1,21 +1,23 @@
1
1
  import React from 'react'
2
2
  import { StyleSheet, View } from 'react-native'
3
3
  import { useStoreMap, useUnit } from 'effector-react'
4
+
5
+ import { ChatbotModel } from '../../model/ChatBotModel'
4
6
  import { HelpRequestOption } from './HelpRequestOption'
5
- import { useChatModel } from '../../context/ChatBotModelContext'
6
7
 
7
8
  type AlternativesProps = {
9
+ model: ChatbotModel
8
10
  onPressAlternative: (message: string, translatedMessage?: string) => void
9
11
  hasMessages: boolean
10
12
  isHintFeedback: boolean
11
13
  }
12
14
 
13
15
  export const Alternatives = ({
16
+ model,
14
17
  onPressAlternative,
15
18
  hasMessages,
16
19
  isHintFeedback,
17
20
  }: AlternativesProps) => {
18
- const model = useChatModel()
19
21
  const isTranslated = useUnit(model.translation.$isTranslated)
20
22
  const alternatives = useUnit(model.$alternatives)
21
23
  const isTranslationPending = useUnit(model.translation.translateAllMessagesFx.pending)
@@ -1,15 +1,18 @@
1
- import React, { ComponentType } from 'react'
1
+ import React, { ComponentType, ReactNode } from 'react'
2
2
  import { ReceivedMessage } from './ReceivedMessage'
3
3
  import { SentMessage } from './SentMessage'
4
- import { T2SState } from '../../types/t2s.types'
5
- import { MessageVariant } from '../../types/model.types'
6
- import { ConversationMessage } from '../../types/units.types'
4
+ import { AudioStatus } from '../../types/t2s.types'
5
+ import { MessageVariant, ChatbotRenderer } from '../../types/model.types'
7
6
 
8
7
  type ChatMessageProps = {
9
8
  variant: MessageVariant
10
- message: ConversationMessage
11
- isTranslated?: boolean
12
- t2sState: T2SState
9
+ message: string
10
+ onPressTextToSpeech: () => void
11
+ isTextToSpeechPending: boolean
12
+ isActive: boolean
13
+ withTextToSpeech?: boolean
14
+ audioStatus: AudioStatus
15
+ renderer?: (props: ChatbotRenderer) => ReactNode
13
16
  }
14
17
 
15
18
  export type VariantProps = Omit<ChatMessageProps, 'variant'>
@@ -1,12 +1,9 @@
1
1
  import React from 'react'
2
- import { ActivityIndicator } from 'react-native'
2
+ import { ActivityIndicator, Pressable, StyleSheet, TouchableOpacity } from 'react-native'
3
3
  import { SpeakerIcon } from '../../../../shared/icons/SpeakerIcon'
4
4
  import { PlayIcon } from '../../../../shared/icons/PlayIcon'
5
5
  import { PauseIcon } from '../../../../shared/icons/PauseIcon'
6
- import { AudioStatus, T2SState } from '../../types/t2s.types'
7
- import { useChatModel } from '../../context/ChatBotModelContext'
8
- import { ConversationMessage } from '../../types/units.types'
9
- import { Button, COLORS } from '@magmamath/react-native-ui'
6
+ import { AudioStatus } from '../../types/t2s.types'
10
7
 
11
8
  type TextToSpeechIconProps = {
12
9
  status: AudioStatus
@@ -20,41 +17,61 @@ const TextToSpeechIcon = ({ status, isActive, isLoading }: TextToSpeechIconProps
20
17
  }
21
18
 
22
19
  if (!isActive) {
23
- return <SpeakerIcon color={isActive ? COLORS.PRIMARY_BLUE : undefined} />
20
+ return <SpeakerIcon color={isActive ? '#55ABE0' : undefined} />
24
21
  }
25
22
 
26
- if (status === 'playing') return <PauseIcon color={COLORS.NEUTRAL_1} />
27
- if (status === 'paused') return <PlayIcon color={COLORS.NEUTRAL_1} />
28
- return <SpeakerIcon color={isActive ? COLORS.PRIMARY_BLUE : undefined} />
23
+ if (status === 'playing') return <PauseIcon color="#FFF" />
24
+ if (status === 'paused') return <PlayIcon color="#FFF" />
25
+ return <SpeakerIcon color={isActive ? '#55ABE0' : undefined} />
29
26
  }
30
27
 
31
28
  type MessageTextToSpeechProps = {
32
- state: T2SState
33
- message: ConversationMessage
29
+ status: AudioStatus
30
+ disabled: boolean
31
+ isActive: boolean
32
+ isLoading: boolean
33
+ onPress: () => void
34
34
  }
35
35
 
36
36
  export const MessageTextToSpeech = ({
37
- state: { status, disabled, isActive, isLoading },
38
- message,
39
- }: MessageTextToSpeechProps) => {
40
- const model = useChatModel()
41
-
42
- function play() {
43
- void model.t2s.play({
44
- isTranslated: model.translation.$isTranslated.getState(),
45
- message,
46
- })
47
- }
48
-
49
- return (
50
- <Button
37
+ status,
38
+ disabled,
39
+ isActive,
40
+ isLoading,
41
+ onPress,
42
+ }: MessageTextToSpeechProps) => (
43
+ <TouchableOpacity style={styles.container} onPress={onPress}>
44
+ <Pressable
51
45
  disabled={disabled}
52
- isActive={isActive}
53
- variant={'secondary'}
54
- colorScheme={'blue'}
55
- size={'small'}
56
- onPress={play}
57
- icon={<TextToSpeechIcon isActive={isActive} isLoading={isLoading} status={status} />}
58
- />
59
- )
60
- }
46
+ onPress={onPress}
47
+ style={[styles.button, { backgroundColor: isActive && !isLoading ? '#55ABE0' : '#FFF' }]}
48
+ >
49
+ <TextToSpeechIcon isActive={isActive} isLoading={isLoading} status={status} />
50
+ </Pressable>
51
+ </TouchableOpacity>
52
+ )
53
+
54
+ const styles = StyleSheet.create({
55
+ container: {
56
+ alignSelf: 'stretch',
57
+ justifyContent: 'flex-end',
58
+ width: 45,
59
+ },
60
+ button: {
61
+ alignItems: 'center',
62
+ justifyContent: 'center',
63
+ width: 28,
64
+ height: 28,
65
+ padding: 1,
66
+ marginLeft: 'auto',
67
+ shadowColor: '#333',
68
+ shadowOffset: { width: 0, height: 1 },
69
+ shadowOpacity: 0.25,
70
+ shadowRadius: 3,
71
+ elevation: 3,
72
+ borderRadius: 6,
73
+ borderColor: '#F2F2F4',
74
+ borderWidth: 0.5,
75
+ backgroundColor: '#FFF',
76
+ },
77
+ })
@@ -1,24 +1,42 @@
1
1
  import React from 'react'
2
- import { StyleSheet, View } from 'react-native'
2
+ import { StyleSheet, Text, View } from 'react-native'
3
3
  import { VariantProps } from './ChatMessage'
4
4
  import { ChatbotIcon } from '../../../../shared/icons/ChatbotIcon'
5
- import { MessageContent } from './MessageContent'
5
+ import { MessageTextToSpeech } from './MessageTextToSpeech'
6
+ import { MessageVariant } from '../../types/model.types'
6
7
 
7
- export const ReceivedMessage = ({ message, isTranslated, t2sState }: VariantProps) => {
8
- const text = isTranslated ? message.translatedMessage : message.message
9
-
10
- return (
11
- <View style={styles.container}>
12
- <View style={styles.icon}>
13
- <ChatbotIcon width={60} height={80} />
14
- </View>
8
+ export const ReceivedMessage = ({
9
+ message,
10
+ onPressTextToSpeech,
11
+ isTextToSpeechPending,
12
+ isActive,
13
+ audioStatus,
14
+ renderer,
15
+ withTextToSpeech = true,
16
+ }: VariantProps) => (
17
+ <View style={styles.container}>
18
+ <View style={styles.icon}>
19
+ <ChatbotIcon width={60} height={80} />
20
+ </View>
15
21
 
16
- <View style={styles.message}>
17
- <MessageContent message={message} t2sState={t2sState} text={text ?? ''} />
18
- </View>
22
+ <View style={styles.message}>
23
+ <Text style={[styles.messageText, { width: withTextToSpeech ? 240 : 305 }]}>
24
+ {renderer
25
+ ? renderer({ message, variant: MessageVariant.RECEIVED, withTextToSpeech })
26
+ : message}
27
+ </Text>
28
+ {withTextToSpeech && (
29
+ <MessageTextToSpeech
30
+ isActive={isActive}
31
+ isLoading={isTextToSpeechPending}
32
+ onPress={onPressTextToSpeech}
33
+ disabled={isTextToSpeechPending}
34
+ status={audioStatus}
35
+ />
36
+ )}
19
37
  </View>
20
- )
21
- }
38
+ </View>
39
+ )
22
40
 
23
41
  const styles = StyleSheet.create({
24
42
  container: {
@@ -46,4 +64,11 @@ const styles = StyleSheet.create({
46
64
  borderBottomLeftRadius: 0,
47
65
  backgroundColor: '#F2F2F4',
48
66
  },
67
+ messageText: {
68
+ flex: 1,
69
+ fontSize: 20,
70
+ fontWeight: 400,
71
+ fontFamily: 'Buenos Aires',
72
+ color: '#33334D',
73
+ },
49
74
  })
@@ -1,16 +1,17 @@
1
1
  import React from 'react'
2
2
  import { StyleSheet, Text, View } from 'react-native'
3
3
  import { VariantProps } from './ChatMessage'
4
+ import { MessageVariant } from '../../types/model.types'
4
5
 
5
- export const SentMessage = React.memo(({ message, isTranslated }: VariantProps) => {
6
- const text = isTranslated ? message.translatedMessage : message.message
7
-
8
- return (
9
- <View style={styles.container}>
10
- <Text style={styles.text}>{text}</Text>
11
- </View>
12
- )
13
- })
6
+ export const SentMessage = ({ message, renderer }: VariantProps) => (
7
+ <View style={styles.container}>
8
+ <Text style={styles.text}>
9
+ {renderer
10
+ ? renderer({ message, variant: MessageVariant.SENT, withTextToSpeech: false })
11
+ : message}
12
+ </Text>
13
+ </View>
14
+ )
14
15
 
15
16
  const styles = StyleSheet.create({
16
17
  container: {